aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/binutils/ChangeLog1844
-rw-r--r--contrib/binutils/MAINTAINERS47
-rw-r--r--contrib/binutils/Makefile.def338
-rw-r--r--contrib/binutils/Makefile.in43768
-rw-r--r--contrib/binutils/Makefile.tpl1800
-rw-r--r--contrib/binutils/bfd/ChangeLog2475
-rw-r--r--contrib/binutils/bfd/Makefile.am1385
-rw-r--r--contrib/binutils/bfd/Makefile.in2139
-rw-r--r--contrib/binutils/bfd/acinclude.m480
-rw-r--r--contrib/binutils/bfd/aclocal.m41125
-rw-r--r--contrib/binutils/bfd/aout-arm.c419
-rw-r--r--contrib/binutils/bfd/aout-encap.c239
-rw-r--r--contrib/binutils/bfd/aout-sparcle.c2
-rw-r--r--contrib/binutils/bfd/aout-target.h295
-rw-r--r--contrib/binutils/bfd/aout0.c2
-rw-r--r--contrib/binutils/bfd/aout32.c2
-rw-r--r--contrib/binutils/bfd/aout64.c2
-rw-r--r--contrib/binutils/bfd/aoutf1.h447
-rw-r--r--contrib/binutils/bfd/aoutx.h3757
-rw-r--r--contrib/binutils/bfd/archive.c350
-rw-r--r--contrib/binutils/bfd/archive64.c25
-rw-r--r--contrib/binutils/bfd/archures.c94
-rw-r--r--contrib/binutils/bfd/armnetbsd.c20
-rw-r--r--contrib/binutils/bfd/bfd-in.h129
-rw-r--r--contrib/binutils/bfd/bfd-in2.h1135
-rw-r--r--contrib/binutils/bfd/bfd.c289
-rw-r--r--contrib/binutils/bfd/bfdio.c167
-rw-r--r--contrib/binutils/bfd/bfdwin.c15
-rw-r--r--contrib/binutils/bfd/binary.c148
-rw-r--r--contrib/binutils/bfd/bout.c1032
-rw-r--r--contrib/binutils/bfd/cache.c390
-rw-r--r--contrib/binutils/bfd/coff-alpha.c100
-rw-r--r--contrib/binutils/bfd/coff-arm.c602
-rw-r--r--contrib/binutils/bfd/coff-aux.c2
-rw-r--r--contrib/binutils/bfd/coff-i386.c73
-rw-r--r--contrib/binutils/bfd/coff-ia64.c2
-rw-r--r--contrib/binutils/bfd/coff-mips.c1257
-rw-r--r--contrib/binutils/bfd/coff-ppc.c268
-rw-r--r--contrib/binutils/bfd/coff-rs6000.c85
-rw-r--r--contrib/binutils/bfd/coff-sparc.c23
-rw-r--r--contrib/binutils/bfd/coff64-rs6000.c61
-rw-r--r--contrib/binutils/bfd/coffcode.h1325
-rw-r--r--contrib/binutils/bfd/coffgen.c738
-rw-r--r--contrib/binutils/bfd/cofflink.c153
-rw-r--r--contrib/binutils/bfd/coffswap.h161
-rwxr-xr-xcontrib/binutils/bfd/config.bfd324
-rw-r--r--contrib/binutils/bfd/config.in437
-rwxr-xr-xcontrib/binutils/bfd/configure16532
-rw-r--r--contrib/binutils/bfd/configure.host8
-rw-r--r--contrib/binutils/bfd/configure.in197
-rw-r--r--contrib/binutils/bfd/corefile.c63
-rw-r--r--contrib/binutils/bfd/cpu-alpha.c5
-rw-r--r--contrib/binutils/bfd/cpu-arc.c2
-rw-r--r--contrib/binutils/bfd/cpu-arm.c100
-rw-r--r--contrib/binutils/bfd/cpu-i386.c54
-rw-r--r--contrib/binutils/bfd/cpu-ia64-opc.c35
-rw-r--r--contrib/binutils/bfd/cpu-ia64.c2
-rw-r--r--contrib/binutils/bfd/cpu-powerpc.c18
-rw-r--r--contrib/binutils/bfd/cpu-rs6000.c2
-rw-r--r--contrib/binutils/bfd/cpu-s390.c4
-rw-r--r--contrib/binutils/bfd/cpu-sparc.c2
-rw-r--r--contrib/binutils/bfd/demo64.c2
-rw-r--r--contrib/binutils/bfd/dep-in.sed1
-rw-r--r--contrib/binutils/bfd/doc/ChangeLog101
-rw-r--r--contrib/binutils/bfd/doc/Makefile.am207
-rw-r--r--contrib/binutils/bfd/doc/Makefile.in773
-rw-r--r--contrib/binutils/bfd/doc/aoutx.texi12
-rw-r--r--contrib/binutils/bfd/doc/archive.texi3
-rw-r--r--contrib/binutils/bfd/doc/archures.texi67
-rw-r--r--contrib/binutils/bfd/doc/bfd.texinfo17
-rw-r--r--contrib/binutils/bfd/doc/bfdint.texi2
-rw-r--r--contrib/binutils/bfd/doc/bfdio.texi31
-rw-r--r--contrib/binutils/bfd/doc/bfdt.texi75
-rw-r--r--contrib/binutils/bfd/doc/cache.texi60
-rw-r--r--contrib/binutils/bfd/doc/chew.c46
-rw-r--r--contrib/binutils/bfd/doc/coffcode.texi90
-rw-r--r--contrib/binutils/bfd/doc/core.texi22
-rw-r--r--contrib/binutils/bfd/doc/elf.texi4
-rw-r--r--contrib/binutils/bfd/doc/fdl.texi4
-rw-r--r--contrib/binutils/bfd/doc/format.texi3
-rw-r--r--contrib/binutils/bfd/doc/hash.texi18
-rw-r--r--contrib/binutils/bfd/doc/init.texi3
-rw-r--r--contrib/binutils/bfd/doc/libbfd.texi5
-rw-r--r--contrib/binutils/bfd/doc/linker.texi17
-rw-r--r--contrib/binutils/bfd/doc/mmo.texi12
-rw-r--r--contrib/binutils/bfd/doc/opncls.texi102
-rw-r--r--contrib/binutils/bfd/doc/reloc.texi494
-rw-r--r--contrib/binutils/bfd/doc/section.texi426
-rw-r--r--contrib/binutils/bfd/doc/syms.texi16
-rw-r--r--contrib/binutils/bfd/doc/targets.texi40
-rw-r--r--contrib/binutils/bfd/dwarf1.c174
-rw-r--r--contrib/binutils/bfd/dwarf2.c1520
-rw-r--r--contrib/binutils/bfd/ecoff.c2598
-rw-r--r--contrib/binutils/bfd/ecofflink.c92
-rw-r--r--contrib/binutils/bfd/ecoffswap.h230
-rw-r--r--contrib/binutils/bfd/efi-app-ia32.c2
-rw-r--r--contrib/binutils/bfd/efi-app-ia64.c2
-rw-r--r--contrib/binutils/bfd/elf-bfd.h429
-rw-r--r--contrib/binutils/bfd/elf-eh-frame.c1015
-rw-r--r--contrib/binutils/bfd/elf-strtab.c11
-rw-r--r--contrib/binutils/bfd/elf-vxworks.c213
-rw-r--r--contrib/binutils/bfd/elf-vxworks.h35
-rw-r--r--contrib/binutils/bfd/elf.c2718
-rw-r--r--contrib/binutils/bfd/elf32-arc.c210
-rw-r--r--contrib/binutils/bfd/elf32-arm.c8376
-rw-r--r--contrib/binutils/bfd/elf32-arm.h4108
-rw-r--r--contrib/binutils/bfd/elf32-gen.c85
-rw-r--r--contrib/binutils/bfd/elf32-i386.c1105
-rw-r--r--contrib/binutils/bfd/elf32-mips.c670
-rw-r--r--contrib/binutils/bfd/elf32-ppc.c5984
-rw-r--r--contrib/binutils/bfd/elf32-ppc.h6
-rw-r--r--contrib/binutils/bfd/elf32-s390.c341
-rw-r--r--contrib/binutils/bfd/elf32-sparc.c3414
-rw-r--r--contrib/binutils/bfd/elf32.c2
-rw-r--r--contrib/binutils/bfd/elf64-alpha.c3718
-rw-r--r--contrib/binutils/bfd/elf64-gen.c85
-rw-r--r--contrib/binutils/bfd/elf64-mips.c586
-rw-r--r--contrib/binutils/bfd/elf64-ppc.c4342
-rw-r--r--contrib/binutils/bfd/elf64-ppc.h14
-rw-r--r--contrib/binutils/bfd/elf64-s390.c340
-rw-r--r--contrib/binutils/bfd/elf64-sparc.c2617
-rw-r--r--contrib/binutils/bfd/elf64-x86-64.c1315
-rw-r--r--contrib/binutils/bfd/elf64.c2
-rw-r--r--contrib/binutils/bfd/elfarm-nabi.c752
-rw-r--r--contrib/binutils/bfd/elfarm-oabi.c426
-rw-r--r--contrib/binutils/bfd/elfcode.h178
-rw-r--r--contrib/binutils/bfd/elfcore.h27
-rw-r--r--contrib/binutils/bfd/elflink.c3051
-rw-r--r--contrib/binutils/bfd/elfn32-mips.c592
-rw-r--r--contrib/binutils/bfd/elfxx-ia64.c1716
-rw-r--r--contrib/binutils/bfd/elfxx-mips.c4129
-rw-r--r--contrib/binutils/bfd/elfxx-mips.h33
-rw-r--r--contrib/binutils/bfd/elfxx-sparc.c4165
-rw-r--r--contrib/binutils/bfd/elfxx-sparc.h145
-rw-r--r--contrib/binutils/bfd/elfxx-target.h129
-rw-r--r--contrib/binutils/bfd/format.c38
-rw-r--r--contrib/binutils/bfd/freebsd.h92
-rw-r--r--contrib/binutils/bfd/gen-aout.c2
-rw-r--r--contrib/binutils/bfd/genlink.h38
-rw-r--r--contrib/binutils/bfd/hash.c260
-rw-r--r--contrib/binutils/bfd/host-aout.c2
-rw-r--r--contrib/binutils/bfd/i386aout.c93
-rw-r--r--contrib/binutils/bfd/i386bsd.c2
-rw-r--r--contrib/binutils/bfd/i386freebsd.c2
-rw-r--r--contrib/binutils/bfd/i386linux.c21
-rw-r--r--contrib/binutils/bfd/i386netbsd.c2
-rw-r--r--contrib/binutils/bfd/ieee.c1464
-rw-r--r--contrib/binutils/bfd/ihex.c269
-rw-r--r--contrib/binutils/bfd/init.c5
-rw-r--r--contrib/binutils/bfd/libaout.h445
-rw-r--r--contrib/binutils/bfd/libbfd-in.h123
-rw-r--r--contrib/binutils/bfd/libbfd.c202
-rw-r--r--contrib/binutils/bfd/libbfd.h441
-rw-r--r--contrib/binutils/bfd/libcoff-in.h228
-rw-r--r--contrib/binutils/bfd/libcoff.h318
-rw-r--r--contrib/binutils/bfd/libecoff.h157
-rw-r--r--contrib/binutils/bfd/libieee.h2
-rw-r--r--contrib/binutils/bfd/libpei.h78
-rw-r--r--contrib/binutils/bfd/libxcoff.h128
-rw-r--r--contrib/binutils/bfd/linker.c371
-rw-r--r--contrib/binutils/bfd/merge.c208
-rw-r--r--contrib/binutils/bfd/mipsbsd.c6
-rw-r--r--contrib/binutils/bfd/netbsd-core.c243
-rw-r--r--contrib/binutils/bfd/netbsd.h61
-rw-r--r--contrib/binutils/bfd/opncls.c465
-rw-r--r--contrib/binutils/bfd/osf-core.c21
-rw-r--r--contrib/binutils/bfd/pe-arm.c2
-rw-r--r--contrib/binutils/bfd/pe-i386.c21
-rw-r--r--contrib/binutils/bfd/pe-mips.c611
-rw-r--r--contrib/binutils/bfd/pe-ppc.c6
-rw-r--r--contrib/binutils/bfd/peXXigen.c461
-rw-r--r--contrib/binutils/bfd/pei-mips.c2
-rw-r--r--contrib/binutils/bfd/peicode.h324
-rw-r--r--contrib/binutils/bfd/po/Make-in6
-rw-r--r--contrib/binutils/bfd/po/SRC-POTFILES.in28
-rw-r--r--contrib/binutils/bfd/po/bfd.pot2572
-rw-r--r--contrib/binutils/bfd/ppcboot.c17
-rw-r--r--contrib/binutils/bfd/ptrace-core.c20
-rw-r--r--contrib/binutils/bfd/reloc.c952
-rw-r--r--contrib/binutils/bfd/reloc16.c15
-rw-r--r--contrib/binutils/bfd/rs6000-core.c50
-rw-r--r--contrib/binutils/bfd/sco5-core.c35
-rw-r--r--contrib/binutils/bfd/section.c667
-rw-r--r--contrib/binutils/bfd/simple.c70
-rw-r--r--contrib/binutils/bfd/sparclinux.c21
-rw-r--r--contrib/binutils/bfd/sparcnetbsd.c2
-rw-r--r--contrib/binutils/bfd/srec.c435
-rw-r--r--contrib/binutils/bfd/stab-syms.c2
-rw-r--r--contrib/binutils/bfd/stabs.c318
-rw-r--r--contrib/binutils/bfd/sunos.c1100
-rw-r--r--contrib/binutils/bfd/syms.c47
-rw-r--r--contrib/binutils/bfd/sysdep.h55
-rw-r--r--contrib/binutils/bfd/targets.c106
-rw-r--r--contrib/binutils/bfd/tekhex.c786
-rw-r--r--contrib/binutils/bfd/trad-core.c31
-rw-r--r--contrib/binutils/bfd/version.h2
-rw-r--r--contrib/binutils/bfd/xcoff-target.h160
-rw-r--r--contrib/binutils/bfd/xcofflink.c3474
-rw-r--r--contrib/binutils/binutils/ChangeLog321
-rw-r--r--contrib/binutils/binutils/MAINTAINERS103
-rw-r--r--contrib/binutils/binutils/Makefile.am157
-rw-r--r--contrib/binutils/binutils/Makefile.in1371
-rw-r--r--contrib/binutils/binutils/NEWS61
-rw-r--r--contrib/binutils/binutils/acinclude.m431
-rw-r--r--contrib/binutils/binutils/aclocal.m41000
-rw-r--r--contrib/binutils/binutils/addr2line.c144
-rw-r--r--contrib/binutils/binutils/ar.c187
-rw-r--r--contrib/binutils/binutils/arlex.l9
-rw-r--r--contrib/binutils/binutils/arparse.y4
-rw-r--r--contrib/binutils/binutils/arsup.c14
-rw-r--r--contrib/binutils/binutils/arsup.h5
-rw-r--r--contrib/binutils/binutils/binemul.c45
-rw-r--r--contrib/binutils/binutils/binemul.h9
-rw-r--r--contrib/binutils/binutils/bucomm.c48
-rw-r--r--contrib/binutils/binutils/bucomm.h51
-rw-r--r--contrib/binutils/binutils/budbg.h4
-rw-r--r--contrib/binutils/binutils/budemang.c63
-rw-r--r--contrib/binutils/binutils/budemang.h4
-rw-r--r--contrib/binutils/binutils/coffdump.c11
-rw-r--r--contrib/binutils/binutils/coffgrok.c18
-rw-r--r--contrib/binutils/binutils/coffgrok.h4
-rw-r--r--contrib/binutils/binutils/config.in311
-rwxr-xr-xcontrib/binutils/binutils/configure13112
-rw-r--r--contrib/binutils/binutils/configure.in84
-rw-r--r--contrib/binutils/binutils/cxxfilt.c258
-rw-r--r--contrib/binutils/binutils/debug.c7
-rw-r--r--contrib/binutils/binutils/debug.h4
-rw-r--r--contrib/binutils/binutils/deflex.l7
-rw-r--r--contrib/binutils/binutils/defparse.c1940
-rw-r--r--contrib/binutils/binutils/defparse.h139
-rw-r--r--contrib/binutils/binutils/defparse.y8
-rw-r--r--contrib/binutils/binutils/dep-in.sed1
-rw-r--r--contrib/binutils/binutils/dlltool.c968
-rw-r--r--contrib/binutils/binutils/dlltool.h4
-rw-r--r--contrib/binutils/binutils/dllwrap.c127
-rw-r--r--contrib/binutils/binutils/doc/Makefile.am71
-rw-r--r--contrib/binutils/binutils/doc/Makefile.in690
-rw-r--r--contrib/binutils/binutils/doc/addr2line.167
-rw-r--r--contrib/binutils/binutils/doc/ar.135
-rw-r--r--contrib/binutils/binutils/doc/binutils.texi416
-rw-r--r--contrib/binutils/binutils/doc/cxxfilt.man121
-rw-r--r--contrib/binutils/binutils/doc/dlltool.191
-rw-r--r--contrib/binutils/binutils/doc/fdl.texi4
-rw-r--r--contrib/binutils/binutils/doc/nm.147
-rw-r--r--contrib/binutils/binutils/doc/objcopy.189
-rw-r--r--contrib/binutils/binutils/doc/objdump.178
-rw-r--r--contrib/binutils/binutils/doc/ranlib.133
-rw-r--r--contrib/binutils/binutils/doc/readelf.176
-rw-r--r--contrib/binutils/binutils/doc/size.137
-rw-r--r--contrib/binutils/binutils/doc/strings.133
-rw-r--r--contrib/binutils/binutils/doc/strip.147
-rw-r--r--contrib/binutils/binutils/dwarf.c3732
-rw-r--r--contrib/binutils/binutils/dwarf.h122
-rw-r--r--contrib/binutils/binutils/emul_vanilla.c5
-rw-r--r--contrib/binutils/binutils/filemode.c18
-rw-r--r--contrib/binutils/binutils/ieee.c13
-rw-r--r--contrib/binutils/binutils/nm.c1168
-rw-r--r--contrib/binutils/binutils/objcopy.c464
-rw-r--r--contrib/binutils/binutils/objdump.c502
-rw-r--r--contrib/binutils/binutils/po/Make-in6
-rw-r--r--contrib/binutils/binutils/po/POTFILES.in1
-rw-r--r--contrib/binutils/binutils/po/binutils.pot3561
-rw-r--r--contrib/binutils/binutils/prdbg.c9
-rwxr-xr-xcontrib/binutils/binutils/ranlib.sh2
-rw-r--r--contrib/binutils/binutils/rclex.c200
-rw-r--r--contrib/binutils/binutils/rclex.l16
-rw-r--r--contrib/binutils/binutils/rcparse.y17
-rw-r--r--contrib/binutils/binutils/rdcoff.c6
-rw-r--r--contrib/binutils/binutils/rddbg.c15
-rw-r--r--contrib/binutils/binutils/readelf.c6726
-rw-r--r--contrib/binutils/binutils/rename.c8
-rw-r--r--contrib/binutils/binutils/resbin.c48
-rw-r--r--contrib/binutils/binutils/rescoff.c4
-rw-r--r--contrib/binutils/binutils/resrc.c48
-rw-r--r--contrib/binutils/binutils/resres.c8
-rw-r--r--contrib/binutils/binutils/size.c45
-rw-r--r--contrib/binutils/binutils/srconv.c186
-rw-r--r--contrib/binutils/binutils/stabs.c74
-rw-r--r--contrib/binutils/binutils/strings.c126
-rw-r--r--contrib/binutils/binutils/sysdump.c127
-rw-r--r--contrib/binutils/binutils/sysinfo.y39
-rw-r--r--contrib/binutils/binutils/syslex.l33
-rw-r--r--contrib/binutils/binutils/unwind-ia64.c12
-rw-r--r--contrib/binutils/binutils/unwind-ia64.h2
-rw-r--r--contrib/binutils/binutils/version.c6
-rw-r--r--contrib/binutils/binutils/wrstabs.c14
-rw-r--r--contrib/binutils/config-ml.in37
-rwxr-xr-xcontrib/binutils/config.guess619
-rw-r--r--contrib/binutils/config.if37
-rwxr-xr-xcontrib/binutils/config.sub157
-rw-r--r--contrib/binutils/config/ChangeLog170
-rw-r--r--contrib/binutils/config/mh-mingw327
-rw-r--r--contrib/binutils/config/mt-linux1
-rwxr-xr-xcontrib/binutils/configure5760
-rw-r--r--contrib/binutils/configure.in1956
-rw-r--r--contrib/binutils/contrib/ChangeLog7
-rwxr-xr-xcontrib/binutils/contrib/texi2pod.pl431
-rw-r--r--contrib/binutils/etc/ChangeLog92
-rw-r--r--contrib/binutils/etc/Makefile.in50
-rw-r--r--contrib/binutils/gas/ChangeLog1206
-rw-r--r--contrib/binutils/gas/ChangeLog-000111
-rw-r--r--contrib/binutils/gas/ChangeLog-020340
-rw-r--r--contrib/binutils/gas/ChangeLog-929537
-rw-r--r--contrib/binutils/gas/ChangeLog-9697397
-rw-r--r--contrib/binutils/gas/ChangeLog-98997
-rw-r--r--contrib/binutils/gas/Makefile.am968
-rw-r--r--contrib/binutils/gas/Makefile.in1121
-rw-r--r--contrib/binutils/gas/NEWS70
-rw-r--r--contrib/binutils/gas/README77
-rw-r--r--contrib/binutils/gas/acinclude.m42
-rw-r--r--contrib/binutils/gas/aclocal.m4591
-rw-r--r--contrib/binutils/gas/app.c106
-rw-r--r--contrib/binutils/gas/as.c302
-rw-r--r--contrib/binutils/gas/as.h322
-rw-r--r--contrib/binutils/gas/asintl.h15
-rw-r--r--contrib/binutils/gas/atof-generic.c22
-rw-r--r--contrib/binutils/gas/bignum-copy.c80
-rw-r--r--contrib/binutils/gas/bignum.h15
-rw-r--r--contrib/binutils/gas/bit_fix.h6
-rw-r--r--contrib/binutils/gas/cgen.c34
-rw-r--r--contrib/binutils/gas/cgen.h11
-rw-r--r--contrib/binutils/gas/cond.c48
-rw-r--r--contrib/binutils/gas/config.in350
-rw-r--r--contrib/binutils/gas/config/aout_gnu.h12
-rw-r--r--contrib/binutils/gas/config/atof-ieee.c72
-rw-r--r--contrib/binutils/gas/config/atof-vax.c352
-rw-r--r--contrib/binutils/gas/config/itbl-mips.h4
-rw-r--r--contrib/binutils/gas/config/obj-aout.c551
-rw-r--r--contrib/binutils/gas/config/obj-aout.h201
-rw-r--r--contrib/binutils/gas/config/obj-coff.c3792
-rw-r--r--contrib/binutils/gas/config/obj-coff.h712
-rw-r--r--contrib/binutils/gas/config/obj-ecoff.c226
-rw-r--r--contrib/binutils/gas/config/obj-ecoff.h15
-rw-r--r--contrib/binutils/gas/config/obj-elf.c186
-rw-r--r--contrib/binutils/gas/config/obj-elf.h20
-rw-r--r--contrib/binutils/gas/config/obj-ieee.c26
-rw-r--r--contrib/binutils/gas/config/obj-ieee.h8
-rw-r--r--contrib/binutils/gas/config/obj-multi.h12
-rw-r--r--contrib/binutils/gas/config/tc-alpha.c4475
-rw-r--r--contrib/binutils/gas/config/tc-alpha.h45
-rw-r--r--contrib/binutils/gas/config/tc-arc.c1485
-rw-r--r--contrib/binutils/gas/config/tc-arc.h27
-rw-r--r--contrib/binutils/gas/config/tc-arm.c21536
-rw-r--r--contrib/binutils/gas/config/tc-arm.h69
-rw-r--r--contrib/binutils/gas/config/tc-generic.c22
-rw-r--r--contrib/binutils/gas/config/tc-generic.h2
-rw-r--r--contrib/binutils/gas/config/tc-i386.c2776
-rw-r--r--contrib/binutils/gas/config/tc-i386.h83
-rw-r--r--contrib/binutils/gas/config/tc-ia64.c4168
-rw-r--r--contrib/binutils/gas/config/tc-ia64.h60
-rw-r--r--contrib/binutils/gas/config/tc-m68851.h4
-rw-r--r--contrib/binutils/gas/config/tc-mips.c121
-rw-r--r--contrib/binutils/gas/config/tc-mips.h42
-rw-r--r--contrib/binutils/gas/config/tc-ppc.c147
-rw-r--r--contrib/binutils/gas/config/tc-ppc.h25
-rw-r--r--contrib/binutils/gas/config/tc-s390.c91
-rw-r--r--contrib/binutils/gas/config/tc-s390.h15
-rw-r--r--contrib/binutils/gas/config/tc-sparc.c171
-rw-r--r--contrib/binutils/gas/config/tc-sparc.h17
-rw-r--r--contrib/binutils/gas/config/te-386bsd.h4
-rw-r--r--contrib/binutils/gas/config/te-aux.h17
-rw-r--r--contrib/binutils/gas/config/te-freebsd.h4
-rw-r--r--contrib/binutils/gas/config/te-nbsd.h4
-rw-r--r--contrib/binutils/gas/config/te-ppcnw.h32
-rw-r--r--contrib/binutils/gas/config/te-sparcaout.h4
-rw-r--r--contrib/binutils/gas/config/te-sysv32.h6
-rw-r--r--contrib/binutils/gas/config/te-tmips.h6
-rwxr-xr-xcontrib/binutils/gas/configure1592
-rw-r--r--contrib/binutils/gas/configure.in604
-rw-r--r--contrib/binutils/gas/debug.c2
-rw-r--r--contrib/binutils/gas/dep-in.sed1
-rw-r--r--contrib/binutils/gas/depend.c6
-rw-r--r--contrib/binutils/gas/doc/Makefile.am52
-rw-r--r--contrib/binutils/gas/doc/Makefile.in125
-rw-r--r--contrib/binutils/gas/doc/all.texi14
-rw-r--r--contrib/binutils/gas/doc/as.1237
-rw-r--r--contrib/binutils/gas/doc/as.texinfo713
-rw-r--r--contrib/binutils/gas/doc/c-alpha.texi8
-rw-r--r--contrib/binutils/gas/doc/c-arc.texi146
-rw-r--r--contrib/binutils/gas/doc/c-arm.texi170
-rw-r--r--contrib/binutils/gas/doc/c-i386.texi36
-rw-r--r--contrib/binutils/gas/doc/c-ia64.texi42
-rw-r--r--contrib/binutils/gas/doc/c-mips.texi105
-rw-r--r--contrib/binutils/gas/doc/c-ppc.texi8
-rw-r--r--contrib/binutils/gas/doc/c-sh.texi40
-rw-r--r--contrib/binutils/gas/doc/c-sparc.texi2
-rw-r--r--contrib/binutils/gas/doc/gasver.texi2
-rw-r--r--contrib/binutils/gas/doc/internals.texi276
-rw-r--r--contrib/binutils/gas/dw2gencfi.c129
-rw-r--r--contrib/binutils/gas/dw2gencfi.h4
-rw-r--r--contrib/binutils/gas/dwarf2dbg.c462
-rw-r--r--contrib/binutils/gas/dwarf2dbg.h28
-rw-r--r--contrib/binutils/gas/ecoff.c17
-rw-r--r--contrib/binutils/gas/ecoff.h8
-rw-r--r--contrib/binutils/gas/ehopt.c14
-rw-r--r--contrib/binutils/gas/emul-target.h6
-rw-r--r--contrib/binutils/gas/emul.h6
-rw-r--r--contrib/binutils/gas/expr.c441
-rw-r--r--contrib/binutils/gas/expr.h25
-rw-r--r--contrib/binutils/gas/flonum-copy.c6
-rw-r--r--contrib/binutils/gas/flonum-konst.c4
-rw-r--r--contrib/binutils/gas/flonum-mult.c2
-rw-r--r--contrib/binutils/gas/flonum.h6
-rw-r--r--contrib/binutils/gas/frags.c68
-rw-r--r--contrib/binutils/gas/frags.h31
-rw-r--r--contrib/binutils/gas/hash.c101
-rw-r--r--contrib/binutils/gas/hash.h16
-rw-r--r--contrib/binutils/gas/input-file.c40
-rw-r--r--contrib/binutils/gas/input-file.h7
-rw-r--r--contrib/binutils/gas/input-scrub.c45
-rw-r--r--contrib/binutils/gas/itbl-lex.h23
-rw-r--r--contrib/binutils/gas/itbl-lex.l7
-rw-r--r--contrib/binutils/gas/itbl-ops.c19
-rw-r--r--contrib/binutils/gas/itbl-ops.h6
-rw-r--r--contrib/binutils/gas/itbl-parse.y10
-rw-r--r--contrib/binutils/gas/link.cmd10
-rw-r--r--contrib/binutils/gas/listing.c19
-rw-r--r--contrib/binutils/gas/listing.h8
-rw-r--r--contrib/binutils/gas/literal.c10
-rw-r--r--contrib/binutils/gas/macro.c632
-rw-r--r--contrib/binutils/gas/macro.h22
-rw-r--r--contrib/binutils/gas/messages.c144
-rw-r--r--contrib/binutils/gas/obj.h19
-rw-r--r--contrib/binutils/gas/output-file.c103
-rw-r--r--contrib/binutils/gas/output-file.h4
-rw-r--r--contrib/binutils/gas/po/Make-in6
-rw-r--r--contrib/binutils/gas/po/POTFILES.in59
-rw-r--r--contrib/binutils/gas/po/gas.pot8520
-rw-r--r--contrib/binutils/gas/read.c1074
-rw-r--r--contrib/binutils/gas/read.h18
-rw-r--r--contrib/binutils/gas/sb.c126
-rw-r--r--contrib/binutils/gas/sb.h59
-rw-r--r--contrib/binutils/gas/stabs.c13
-rw-r--r--contrib/binutils/gas/struc-symbol.h47
-rw-r--r--contrib/binutils/gas/subsegs.c314
-rw-r--r--contrib/binutils/gas/subsegs.h50
-rw-r--r--contrib/binutils/gas/symbols.c648
-rw-r--r--contrib/binutils/gas/symbols.h53
-rw-r--r--contrib/binutils/gas/tc.h89
-rw-r--r--contrib/binutils/gas/write.c722
-rw-r--r--contrib/binutils/gas/write.h57
-rw-r--r--contrib/binutils/gprof/mips.c7
-rw-r--r--contrib/binutils/gprof/po/Make-in6
-rw-r--r--contrib/binutils/gprof/po/gprof.pot172
-rw-r--r--contrib/binutils/include/ChangeLog2398
-rw-r--r--contrib/binutils/include/ansidecl.h62
-rw-r--r--contrib/binutils/include/aout/ChangeLog7
-rw-r--r--contrib/binutils/include/aout/aout64.h4
-rw-r--r--contrib/binutils/include/aout/ar.h2
-rw-r--r--contrib/binutils/include/aout/encap.h3
-rw-r--r--contrib/binutils/include/aout/host.h2
-rw-r--r--contrib/binutils/include/aout/ranlib.h2
-rw-r--r--contrib/binutils/include/aout/reloc.h2
-rw-r--r--contrib/binutils/include/aout/stab.def2
-rw-r--r--contrib/binutils/include/aout/stab_gnu.h2
-rw-r--r--contrib/binutils/include/aout/sun4.h2
-rw-r--r--contrib/binutils/include/bfdlink.h129
-rw-r--r--contrib/binutils/include/bin-bugs.h2
-rw-r--r--contrib/binutils/include/coff/ChangeLog61
-rw-r--r--contrib/binutils/include/coff/alpha.h7
-rw-r--r--contrib/binutils/include/coff/arm.h4
-rw-r--r--contrib/binutils/include/coff/aux-coff.h2
-rw-r--r--contrib/binutils/include/coff/ecoff.h34
-rw-r--r--contrib/binutils/include/coff/external.h2
-rw-r--r--contrib/binutils/include/coff/i386.h2
-rw-r--r--contrib/binutils/include/coff/ia64.h4
-rw-r--r--contrib/binutils/include/coff/mips.h34
-rw-r--r--contrib/binutils/include/coff/mipspe.h4
-rw-r--r--contrib/binutils/include/coff/pe.h9
-rw-r--r--contrib/binutils/include/coff/powerpc.h2
-rw-r--r--contrib/binutils/include/coff/rs6000.h2
-rw-r--r--contrib/binutils/include/coff/rs6k64.h4
-rw-r--r--contrib/binutils/include/coff/sh.h4
-rw-r--r--contrib/binutils/include/coff/sparc.h2
-rw-r--r--contrib/binutils/include/coff/symconst.h2
-rw-r--r--contrib/binutils/include/coff/ti.h4
-rw-r--r--contrib/binutils/include/coff/xcoff.h6
-rw-r--r--contrib/binutils/include/demangle.h79
-rw-r--r--contrib/binutils/include/dis-asm.h54
-rw-r--r--contrib/binutils/include/dyn-string.h74
-rw-r--r--contrib/binutils/include/elf/ChangeLog431
-rw-r--r--contrib/binutils/include/elf/ChangeLog-910348
-rw-r--r--contrib/binutils/include/elf/alpha.h8
-rw-r--r--contrib/binutils/include/elf/arc.h2
-rw-r--r--contrib/binutils/include/elf/arm.h279
-rw-r--r--contrib/binutils/include/elf/avr.h35
-rw-r--r--contrib/binutils/include/elf/bfin.h92
-rw-r--r--contrib/binutils/include/elf/common.h117
-rw-r--r--contrib/binutils/include/elf/cris.h16
-rw-r--r--contrib/binutils/include/elf/crx.h53
-rw-r--r--contrib/binutils/include/elf/d10v.h2
-rw-r--r--contrib/binutils/include/elf/d30v.h2
-rw-r--r--contrib/binutils/include/elf/dlx.h2
-rw-r--r--contrib/binutils/include/elf/dwarf.h54
-rw-r--r--contrib/binutils/include/elf/dwarf2.h77
-rw-r--r--contrib/binutils/include/elf/external.h7
-rw-r--r--contrib/binutils/include/elf/fr30.h2
-rw-r--r--contrib/binutils/include/elf/frv.h22
-rw-r--r--contrib/binutils/include/elf/h8.h2
-rw-r--r--contrib/binutils/include/elf/hppa.h108
-rw-r--r--contrib/binutils/include/elf/i370.h2
-rw-r--r--contrib/binutils/include/elf/i386.h12
-rw-r--r--contrib/binutils/include/elf/i860.h2
-rw-r--r--contrib/binutils/include/elf/i960.h2
-rw-r--r--contrib/binutils/include/elf/ia64.h7
-rw-r--r--contrib/binutils/include/elf/internal.h31
-rw-r--r--contrib/binutils/include/elf/ip2k.h2
-rw-r--r--contrib/binutils/include/elf/iq2000.h4
-rw-r--r--contrib/binutils/include/elf/m32c.h67
-rw-r--r--contrib/binutils/include/elf/m32r.h10
-rw-r--r--contrib/binutils/include/elf/m68hc11.h2
-rw-r--r--contrib/binutils/include/elf/m68k.h25
-rw-r--r--contrib/binutils/include/elf/mcore.h2
-rw-r--r--contrib/binutils/include/elf/mips.h41
-rw-r--r--contrib/binutils/include/elf/mmix.h2
-rw-r--r--contrib/binutils/include/elf/mn10200.h2
-rw-r--r--contrib/binutils/include/elf/mn10300.h4
-rw-r--r--contrib/binutils/include/elf/msp430.h6
-rw-r--r--contrib/binutils/include/elf/mt.h46
-rw-r--r--contrib/binutils/include/elf/openrisc.h2
-rw-r--r--contrib/binutils/include/elf/or32.h2
-rw-r--r--contrib/binutils/include/elf/pj.h2
-rw-r--r--contrib/binutils/include/elf/ppc.h22
-rw-r--r--contrib/binutils/include/elf/ppc64.h2
-rw-r--r--contrib/binutils/include/elf/reloc-macros.h2
-rw-r--r--contrib/binutils/include/elf/s390.h6
-rw-r--r--contrib/binutils/include/elf/sh.h87
-rw-r--r--contrib/binutils/include/elf/sparc.h5
-rw-r--r--contrib/binutils/include/elf/v850.h6
-rw-r--r--contrib/binutils/include/elf/vax.h2
-rw-r--r--contrib/binutils/include/elf/x86-64.h37
-rw-r--r--contrib/binutils/include/elf/xstormy16.h2
-rw-r--r--contrib/binutils/include/elf/xtensa.h114
-rw-r--r--contrib/binutils/include/fibheap.h34
-rw-r--r--contrib/binutils/include/filenames.h2
-rw-r--r--contrib/binutils/include/floatformat.h33
-rw-r--r--contrib/binutils/include/fnmatch.h4
-rw-r--r--contrib/binutils/include/gdbm.h2
-rw-r--r--contrib/binutils/include/hashtab.h115
-rw-r--r--contrib/binutils/include/ieee.h4
-rw-r--r--contrib/binutils/include/libiberty.h408
-rw-r--r--contrib/binutils/include/md5.h35
-rw-r--r--contrib/binutils/include/objalloc.h16
-rw-r--r--contrib/binutils/include/obstack.h78
-rw-r--r--contrib/binutils/include/opcode/ChangeLog477
-rw-r--r--contrib/binutils/include/opcode/ChangeLog-910319
-rw-r--r--contrib/binutils/include/opcode/alpha.h2
-rw-r--r--contrib/binutils/include/opcode/arc.h4
-rw-r--r--contrib/binutils/include/opcode/arm.h480
-rw-r--r--contrib/binutils/include/opcode/cgen.h33
-rw-r--r--contrib/binutils/include/opcode/convex.h2
-rw-r--r--contrib/binutils/include/opcode/i386.h1188
-rw-r--r--contrib/binutils/include/opcode/ia64.h10
-rw-r--r--contrib/binutils/include/opcode/np1.h2
-rw-r--r--contrib/binutils/include/opcode/pn.h2
-rw-r--r--contrib/binutils/include/opcode/ppc.h12
-rw-r--r--contrib/binutils/include/opcode/s390.h15
-rw-r--r--contrib/binutils/include/opcode/sparc.h166
-rw-r--r--contrib/binutils/include/partition.h15
-rw-r--r--contrib/binutils/include/progress.h2
-rw-r--r--contrib/binutils/include/safe-ctype.h4
-rw-r--r--contrib/binutils/include/sort.h6
-rw-r--r--contrib/binutils/include/splay-tree.h85
-rw-r--r--contrib/binutils/include/symcat.h2
-rw-r--r--contrib/binutils/include/ternary.h10
-rw-r--r--contrib/binutils/include/xregex2.h88
-rwxr-xr-xcontrib/binutils/install-sh477
-rw-r--r--contrib/binutils/ld/ChangeLog538
-rw-r--r--contrib/binutils/ld/Makefile.am431
-rw-r--r--contrib/binutils/ld/Makefile.in1554
-rw-r--r--contrib/binutils/ld/NEWS76
-rw-r--r--contrib/binutils/ld/acinclude.m415
-rw-r--r--contrib/binutils/ld/aclocal.m41007
-rw-r--r--contrib/binutils/ld/config.in259
-rwxr-xr-xcontrib/binutils/ld/configure12093
-rw-r--r--contrib/binutils/ld/configure.host75
-rw-r--r--contrib/binutils/ld/configure.in55
-rw-r--r--contrib/binutils/ld/configure.tgt735
-rw-r--r--contrib/binutils/ld/deffile.h6
-rw-r--r--contrib/binutils/ld/deffilep.y50
-rw-r--r--contrib/binutils/ld/dep-in.sed1
-rw-r--r--contrib/binutils/ld/emulparams/armelf.sh11
-rw-r--r--contrib/binutils/ld/emulparams/armelf_fbsd.sh1
-rw-r--r--contrib/binutils/ld/emulparams/armelf_linux.sh5
-rw-r--r--contrib/binutils/ld/emulparams/armelf_nbsd.sh1
-rw-r--r--contrib/binutils/ld/emulparams/armelf_oabi.sh23
-rw-r--r--contrib/binutils/ld/emulparams/armpe.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmip.sh17
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh6
-rw-r--r--contrib/binutils/ld/emulparams/elf32btsmip.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc.sh48
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppccommon.sh49
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppclinux.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64_s390.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha.sh8
-rw-r--r--contrib/binutils/ld/emulparams/elf64ppc.sh8
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf_s390.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64.sh2
-rw-r--r--contrib/binutils/ld/emulparams/i386freebsd.sh6
-rw-r--r--contrib/binutils/ld/emulparams/i386pe.sh1
-rw-r--r--contrib/binutils/ld/emulparams/i386pe_posix.sh1
-rw-r--r--contrib/binutils/ld/emulparams/mipsidt.sh3
-rw-r--r--contrib/binutils/ld/emulparams/mipsidtl.sh3
-rw-r--r--contrib/binutils/ld/emulparams/mipspe.sh1
-rw-r--r--contrib/binutils/ld/emulparams/ppcpe.sh1
-rw-r--r--contrib/binutils/ld/emultempl/alphaelf.em95
-rw-r--r--contrib/binutils/ld/emultempl/armcoff.em8
-rw-r--r--contrib/binutils/ld/emultempl/armelf.em123
-rw-r--r--contrib/binutils/ld/emultempl/armelf_oabi.em176
-rw-r--r--contrib/binutils/ld/emultempl/elf32.em1064
-rw-r--r--contrib/binutils/ld/emultempl/generic.em6
-rw-r--r--contrib/binutils/ld/emultempl/ia64elf.em4
-rw-r--r--contrib/binutils/ld/emultempl/linux.em10
-rw-r--r--contrib/binutils/ld/emultempl/mipsecoff.em255
-rw-r--r--contrib/binutils/ld/emultempl/mipself.em177
-rw-r--r--contrib/binutils/ld/emultempl/needrelax.em2
-rw-r--r--contrib/binutils/ld/emultempl/pe.em637
-rw-r--r--contrib/binutils/ld/emultempl/ppc32elf.em114
-rw-r--r--contrib/binutils/ld/emultempl/ppc64elf.em186
-rw-r--r--contrib/binutils/ld/emultempl/sunos.em24
-rw-r--r--contrib/binutils/ld/emultempl/ticoff.em4
-rw-r--r--contrib/binutils/ld/emultempl/vanilla.em4
-rw-r--r--contrib/binutils/ld/fdl.texi4
-rw-r--r--contrib/binutils/ld/gen-doc.texi2
-rwxr-xr-xcontrib/binutils/ld/genscripts.sh63
-rw-r--r--contrib/binutils/ld/ld.1256
-rw-r--r--contrib/binutils/ld/ld.h89
-rw-r--r--contrib/binutils/ld/ld.texinfo1081
-rw-r--r--contrib/binutils/ld/ldcref.c217
-rw-r--r--contrib/binutils/ld/ldctor.c8
-rw-r--r--contrib/binutils/ld/ldctor.h4
-rw-r--r--contrib/binutils/ld/ldemul.c30
-rw-r--r--contrib/binutils/ld/ldemul.h14
-rw-r--r--contrib/binutils/ld/ldexp.c838
-rw-r--r--contrib/binutils/ld/ldexp.h91
-rw-r--r--contrib/binutils/ld/ldfile.c95
-rw-r--r--contrib/binutils/ld/ldfile.h6
-rw-r--r--contrib/binutils/ld/ldgram.y269
-rw-r--r--contrib/binutils/ld/ldint.texinfo2
-rw-r--r--contrib/binutils/ld/ldlang.c3145
-rw-r--r--contrib/binutils/ld/ldlang.h137
-rw-r--r--contrib/binutils/ld/ldlex.h4
-rw-r--r--contrib/binutils/ld/ldlex.l114
-rw-r--r--contrib/binutils/ld/ldmain.c229
-rw-r--r--contrib/binutils/ld/ldmain.h11
-rw-r--r--contrib/binutils/ld/ldmisc.c246
-rw-r--r--contrib/binutils/ld/ldmisc.h7
-rw-r--r--contrib/binutils/ld/ldver.c30
-rw-r--r--contrib/binutils/ld/ldver.h5
-rw-r--r--contrib/binutils/ld/ldver.texi2
-rw-r--r--contrib/binutils/ld/ldwrite.c112
-rw-r--r--contrib/binutils/ld/ldwrite.h4
-rw-r--r--contrib/binutils/ld/lexsup.c504
-rw-r--r--contrib/binutils/ld/mri.c44
-rw-r--r--contrib/binutils/ld/mri.h4
-rw-r--r--contrib/binutils/ld/pe-dll.c156
-rw-r--r--contrib/binutils/ld/pe-dll.h6
-rw-r--r--contrib/binutils/ld/po/Make-in6
-rw-r--r--contrib/binutils/ld/po/POTFILES.in1
-rw-r--r--contrib/binutils/ld/po/ld.pot1071
-rw-r--r--contrib/binutils/ld/scripttempl/elf.sc209
-rw-r--r--contrib/binutils/ld/scripttempl/mips.sc3
-rw-r--r--contrib/binutils/ld/scripttempl/pe.sc119
-rw-r--r--contrib/binutils/ld/sysdep.h12
-rw-r--r--contrib/binutils/libiberty/ChangeLog1114
-rw-r--r--contrib/binutils/libiberty/Makefile.in249
-rw-r--r--contrib/binutils/libiberty/_doprnt.c17
-rw-r--r--contrib/binutils/libiberty/aclocal.m410
-rw-r--r--contrib/binutils/libiberty/alloca.c23
-rw-r--r--contrib/binutils/libiberty/argv.c165
-rw-r--r--contrib/binutils/libiberty/asprintf.c13
-rw-r--r--contrib/binutils/libiberty/at-file.texi15
-rw-r--r--contrib/binutils/libiberty/atexit.c3
-rw-r--r--contrib/binutils/libiberty/basename.c6
-rw-r--r--contrib/binutils/libiberty/bcmp.c19
-rw-r--r--contrib/binutils/libiberty/bcopy.c20
-rw-r--r--contrib/binutils/libiberty/bsearch.c17
-rw-r--r--contrib/binutils/libiberty/bzero.c12
-rw-r--r--contrib/binutils/libiberty/calloc.c11
-rw-r--r--contrib/binutils/libiberty/choose-temp.c10
-rw-r--r--contrib/binutils/libiberty/clock.c4
-rw-r--r--contrib/binutils/libiberty/concat.c42
-rw-r--r--contrib/binutils/libiberty/config.in92
-rw-r--r--contrib/binutils/libiberty/config.table68
-rwxr-xr-xcontrib/binutils/libiberty/configure3536
-rw-r--r--contrib/binutils/libiberty/copying-lib.texi4
-rw-r--r--contrib/binutils/libiberty/copysign.c6
-rw-r--r--contrib/binutils/libiberty/cp-demangle.c902
-rw-r--r--contrib/binutils/libiberty/cp-demangle.h40
-rw-r--r--contrib/binutils/libiberty/cp-demint.c33
-rw-r--r--contrib/binutils/libiberty/cplus-dem.c569
-rw-r--r--contrib/binutils/libiberty/dyn-string.c95
-rw-r--r--contrib/binutils/libiberty/fdmatch.c11
-rw-r--r--contrib/binutils/libiberty/ffs.c3
-rw-r--r--contrib/binutils/libiberty/fibheap.c125
-rw-r--r--contrib/binutils/libiberty/floatformat.c134
-rw-r--r--contrib/binutils/libiberty/fnmatch.c19
-rw-r--r--contrib/binutils/libiberty/functions.texi504
-rw-r--r--contrib/binutils/libiberty/gather-docs4
-rw-r--r--contrib/binutils/libiberty/getcwd.c4
-rw-r--r--contrib/binutils/libiberty/getpagesize.c4
-rw-r--r--contrib/binutils/libiberty/getpwd.c14
-rw-r--r--contrib/binutils/libiberty/getruntime.c6
-rw-r--r--contrib/binutils/libiberty/hashtab.c559
-rw-r--r--contrib/binutils/libiberty/hex.c11
-rw-r--r--contrib/binutils/libiberty/index.c6
-rw-r--r--contrib/binutils/libiberty/insque.c7
-rw-r--r--contrib/binutils/libiberty/lbasename.c10
-rw-r--r--contrib/binutils/libiberty/libiberty.texi2
-rw-r--r--contrib/binutils/libiberty/lrealpath.c39
-rw-r--r--contrib/binutils/libiberty/maint-tool5
-rw-r--r--contrib/binutils/libiberty/make-relative-prefix.c29
-rw-r--r--contrib/binutils/libiberty/make-temp-file.c34
-rw-r--r--contrib/binutils/libiberty/md5.c49
-rw-r--r--contrib/binutils/libiberty/memchr.c9
-rw-r--r--contrib/binutils/libiberty/memcmp.c9
-rw-r--r--contrib/binutils/libiberty/memcpy.c11
-rw-r--r--contrib/binutils/libiberty/memmove.c11
-rw-r--r--contrib/binutils/libiberty/memset.c9
-rw-r--r--contrib/binutils/libiberty/mkstemps.c32
-rw-r--r--contrib/binutils/libiberty/objalloc.c25
-rw-r--r--contrib/binutils/libiberty/obstack.c137
-rw-r--r--contrib/binutils/libiberty/partition.c26
-rw-r--r--contrib/binutils/libiberty/pexecute.c124
-rw-r--r--contrib/binutils/libiberty/physmem.c10
-rw-r--r--contrib/binutils/libiberty/putenv.c7
-rw-r--r--contrib/binutils/libiberty/random.c15
-rw-r--r--contrib/binutils/libiberty/regex.c503
-rw-r--r--contrib/binutils/libiberty/rename.c4
-rw-r--r--contrib/binutils/libiberty/rindex.c6
-rw-r--r--contrib/binutils/libiberty/safe-ctype.c7
-rw-r--r--contrib/binutils/libiberty/setenv.c20
-rw-r--r--contrib/binutils/libiberty/sigsetmask.c13
-rw-r--r--contrib/binutils/libiberty/sort.c16
-rw-r--r--contrib/binutils/libiberty/spaces.c16
-rw-r--r--contrib/binutils/libiberty/splay-tree.c345
-rw-r--r--contrib/binutils/libiberty/strcasecmp.c7
-rw-r--r--contrib/binutils/libiberty/strchr.c4
-rw-r--r--contrib/binutils/libiberty/strdup.c13
-rw-r--r--contrib/binutils/libiberty/strerror.c23
-rw-r--r--contrib/binutils/libiberty/strncasecmp.c8
-rw-r--r--contrib/binutils/libiberty/strncmp.c8
-rw-r--r--contrib/binutils/libiberty/strrchr.c4
-rw-r--r--contrib/binutils/libiberty/strsignal.c30
-rw-r--r--contrib/binutils/libiberty/strstr.c22
-rw-r--r--contrib/binutils/libiberty/strtod.c8
-rw-r--r--contrib/binutils/libiberty/strtol.c7
-rw-r--r--contrib/binutils/libiberty/strtoul.c5
-rw-r--r--contrib/binutils/libiberty/ternary.c21
-rw-r--r--contrib/binutils/libiberty/tmpnam.c5
-rw-r--r--contrib/binutils/libiberty/unlink-if-ordinary.c72
-rw-r--r--contrib/binutils/libiberty/vasprintf.c30
-rw-r--r--contrib/binutils/libiberty/vfork.c4
-rw-r--r--contrib/binutils/libiberty/vfprintf.c9
-rw-r--r--contrib/binutils/libiberty/vprintf.c8
-rw-r--r--contrib/binutils/libiberty/vsprintf.c11
-rw-r--r--contrib/binutils/libiberty/waitpid.c5
-rw-r--r--contrib/binutils/libiberty/xatexit.c20
-rw-r--r--contrib/binutils/libiberty/xexit.c9
-rw-r--r--contrib/binutils/libiberty/xmalloc.c47
-rw-r--r--contrib/binutils/libiberty/xmemdup.c12
-rw-r--r--contrib/binutils/libiberty/xstrdup.c12
-rw-r--r--contrib/binutils/libiberty/xstrerror.c36
-rw-r--r--contrib/binutils/libtool.m4123
-rw-r--r--contrib/binutils/ltcf-c.sh12
-rw-r--r--contrib/binutils/ltcf-cxx.sh11
-rw-r--r--contrib/binutils/ltcf-gcj.sh8
-rwxr-xr-xcontrib/binutils/ltconfig29
-rw-r--r--contrib/binutils/ltmain.sh62
-rw-r--r--contrib/binutils/missing144
-rwxr-xr-xcontrib/binutils/mkinstalldirs89
-rwxr-xr-xcontrib/binutils/move-if-change44
-rw-r--r--contrib/binutils/opcodes/ChangeLog400
-rw-r--r--contrib/binutils/opcodes/Makefile.am397
-rw-r--r--contrib/binutils/opcodes/Makefile.in1138
-rw-r--r--contrib/binutils/opcodes/aclocal.m4983
-rw-r--r--contrib/binutils/opcodes/alpha-dis.c7
-rw-r--r--contrib/binutils/opcodes/alpha-opc.c413
-rw-r--r--contrib/binutils/opcodes/arc-dis.c337
-rw-r--r--contrib/binutils/opcodes/arc-dis.h2
-rw-r--r--contrib/binutils/opcodes/arc-ext.c19
-rw-r--r--contrib/binutils/opcodes/arc-ext.h16
-rw-r--r--contrib/binutils/opcodes/arc-opc.c1537
-rw-r--r--contrib/binutils/opcodes/arm-dis.c3006
-rw-r--r--contrib/binutils/opcodes/arm-opc.h717
-rw-r--r--contrib/binutils/opcodes/cgen-asm.c5
-rw-r--r--contrib/binutils/opcodes/cgen-asm.in58
-rw-r--r--contrib/binutils/opcodes/cgen-dis.c4
-rw-r--r--contrib/binutils/opcodes/cgen-dis.in90
-rw-r--r--contrib/binutils/opcodes/cgen-ibld.in77
-rw-r--r--contrib/binutils/opcodes/cgen-opc.c8
-rw-r--r--contrib/binutils/opcodes/cgen.sh8
-rw-r--r--contrib/binutils/opcodes/config.in192
-rwxr-xr-xcontrib/binutils/opcodes/configure10780
-rw-r--r--contrib/binutils/opcodes/configure.in55
-rw-r--r--contrib/binutils/opcodes/dep-in.sed1
-rw-r--r--contrib/binutils/opcodes/dis-buf.c91
-rw-r--r--contrib/binutils/opcodes/dis-init.c4
-rw-r--r--contrib/binutils/opcodes/disassemble.c115
-rw-r--r--contrib/binutils/opcodes/i386-dis.c1259
-rw-r--r--contrib/binutils/opcodes/ia64-asmtab.c13812
-rw-r--r--contrib/binutils/opcodes/ia64-asmtab.h4
-rw-r--r--contrib/binutils/opcodes/ia64-dis.c16
-rw-r--r--contrib/binutils/opcodes/ia64-gen.c77
-rw-r--r--contrib/binutils/opcodes/ia64-ic.tbl17
-rw-r--r--contrib/binutils/opcodes/ia64-opc-a.c10
-rw-r--r--contrib/binutils/opcodes/ia64-opc-b.c9
-rw-r--r--contrib/binutils/opcodes/ia64-opc-d.c6
-rw-r--r--contrib/binutils/opcodes/ia64-opc-f.c4
-rw-r--r--contrib/binutils/opcodes/ia64-opc-i.c40
-rw-r--r--contrib/binutils/opcodes/ia64-opc-m.c87
-rw-r--r--contrib/binutils/opcodes/ia64-opc-x.c4
-rw-r--r--contrib/binutils/opcodes/ia64-opc.c10
-rw-r--r--contrib/binutils/opcodes/ia64-opc.h8
-rw-r--r--contrib/binutils/opcodes/ia64-raw.tbl120
-rw-r--r--contrib/binutils/opcodes/ia64-waw.tbl12
-rw-r--r--contrib/binutils/opcodes/opintl.h4
-rw-r--r--contrib/binutils/opcodes/po/Make-in6
-rw-r--r--contrib/binutils/opcodes/po/POTFILES.in31
-rw-r--r--contrib/binutils/opcodes/po/opcodes.pot613
-rw-r--r--contrib/binutils/opcodes/ppc-dis.c54
-rw-r--r--contrib/binutils/opcodes/ppc-opc.c318
-rw-r--r--contrib/binutils/opcodes/s390-dis.c25
-rw-r--r--contrib/binutils/opcodes/s390-mkopc.c11
-rw-r--r--contrib/binutils/opcodes/s390-opc.c33
-rw-r--r--contrib/binutils/opcodes/s390-opc.txt106
-rw-r--r--contrib/binutils/opcodes/sh-dis.c240
-rw-r--r--contrib/binutils/opcodes/sh-opc.h729
-rw-r--r--contrib/binutils/opcodes/sparc-dis.c642
-rw-r--r--contrib/binutils/opcodes/sparc-opc.c188
-rw-r--r--contrib/binutils/opcodes/sysdep.h31
-rwxr-xr-xcontrib/binutils/symlink-tree4
-rwxr-xr-xcontrib/binutils/ylwrap244
836 files changed, 228888 insertions, 143947 deletions
diff --git a/contrib/binutils/ChangeLog b/contrib/binutils/ChangeLog
index f054da6c1aa7..1d6afc2e0f1d 100644
--- a/contrib/binutils/ChangeLog
+++ b/contrib/binutils/ChangeLog
@@ -1,40 +1,1802 @@
-2004-05-06 Daniel Jacobowitz <dan@debian.org>
+2006-05-17 Daniel Jacobowitz <dan@codesourcery.com>
- * src-release (do-tar): Add directories to the tar file.
+ * src-release (MAKEINFOFLAGS): Define.
+ (do-proto-toplev): Pass MAKEINFOFLAGS to submakes.
-2004-05-06 Daniel Jacobowitz <dan@debian.org>
+2006-04-10 Ben Elliston <bje@au.ibm.com>
+
+ * contrib: Remove directory.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.tpl: Add install-html target.
+ * Makefile.def: Add install-html target.
+ * Makefile.in: Regenerate.
+ * configure.in: Add --with-datarootdir, --with-docdir,
+ and --with-htmldir options.
+ * configure: Regenerate.
+
+2006-03-31 Ben Elliston <bje@au.ibm.com>
+
+ PR binutils/1860
+ * configure.in: Require makeinfo 4.4 or higher.
+ * configure: Regenerate.
+
+2006-03-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.in: Regenerate.
+
+2006-03-14 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync with gcc:
+ 2006-03-10 Aldy Hernandez <aldyh@redhat.com>
+
+ * configure.in: Handle --disable-<component> generically.
+ * 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).
+ * Makefile.in, configure: Regenerated.
+
+
+2006-03-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR libgcj/17311
+ * ltmain.sh: Don't use "$finalize_rpath" for compile.
+
+2006-02-20 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/25670
+
+ * Makefile.tpl ([+compare-target+]): Print explanation messages.
+
+ * Makefile.def (ADAFLAGS, BOOT_ADAFLAGS, LANGUAGES): New flags_to_pass.
+ * Makefile.tpl (BASE_FLAGS_TO_PASS): Support optional flags_to_pass.
+ (EXTRA_GCC_FLAGS): Remove ADAFLAGS, BOOT_ADAFLAGS, LANGUAGES,
+ BUILD_PREFIX, BUILD_PREFIX_1.
+ * configure.in: (BUILD_PREFIX, BUILD_PREFIX_1): Don't substitute.
+
+ * Makefile.def (bootstrap stage 1): Pass LIBCFLAGS too.
+ * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Override LIBCFLAGS too.
+
+ * Makefile.tpl (configure-stage[+id+]-[+prefix+][+module+],
+ all-stage[+id+]-[+prefix+][+module+], : Use $(current_stage) instead
+ of `cat stage_current`. Always provide the `r' and `s' variables.
+ (clean-stage[+id+]-[+prefix+][+module+]): Likewise, and make it into
+ a single shell execution.
+ (configure-[+prefix+][+module+], all-[+prefix+][+module+]): For
+ bootstrapped modules, make the stage1 module if the build was not
+ started yet, else build the current stage.
+ (all-host, all-target): Omit bootstrapped modules (if bootstrapping).
+ (all-build, all-host, all-target, [+make_target+]-host,
+ [+make_target+]-target): Do not use \-continued lines.
+ (target modules): Depend on stage_last, not all-gcc, if bootstrapping.
+ (current_stage, restrap, stage_last): New.
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2006-02-14 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync from gcc:
+
+ 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.
+ * libgcc-math: New toplevel directory.
+
+ 2006-01-18 Richard Henderson <rth@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+ Diego Novillo <dnovillo@redhat.com>
+
+ * libgomp: New directory.
+ * Makefile.def: Add target_module libgomp.
+ * Makefile.in: Regenerate.
+ * configure.in (target_libraries): Add target-libgomp.
+ * configure: Regenerate.
+
+2006-02-14 Paolo Bonzini <bonzini@gnu.org>
+ Andreas Schwab <schwab@suse.de>
+
+ * configure: Regenerate.
+
+2006-01-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Set with_gnu_as, with_gnu_ld, with_newlib earlier.
+ Set md_exec_prefix. Use ACX_CHECK_INSTALLED_TARGET_TOOL to find
+ the assembler, linker and binutils.
+ * configure: Regenerate.
+
+2006-01-16 Nick Clifton <nickc@redhat.com>
+
+ * config.sub, config.guess: Sync from config repository.
+
+2006-01-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.tpl (clean-stage[+id+]-[+prefix+][+module+]): Remove
+ @ from continuation.
+ * Makefile.in: Rebuilt.
+
+2006-01-04 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync from gcc:
+
+ 2006-01-04 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/24252
+
+ * Makefile.def (flags_to_pass): Add STAGE1_CFLAGS and STAGE1_LANGUAGES.
+ * Makefile.tpl (OBJDUMP): New.
+ (EXTRA_HOST_FLAGS): Add it.
+ (EXTRA_GCC_FLAGS): Remove flags already specified in flags_to_pass.
+
+ * Makefile.tpl (stage[+id+]-start, stage[+id+]-end): Do not try
+ to use symbolic links between directories. Avoid race conditions
+ or make them harmless.
+ * configure.in: Do not try to use symbolic links between directories.
+
+ * Makefile.def (LEAN): Pass.
+ * Makefile.tpl (LEAN): Define.
+ (stage[+id+]-start): Accept that the previous directory does not
+ exist, if the bootstrap is lean.
+ (stage[+id+]-bubble): Invoke lean bootstrap commands after
+ stage[+id+]-start. Use a makefile variable and an `if' instead of a
+ configure substitution.
+ ([+compare-target+]): Likewise.
+ ([+bootstrap-target+]-lean): New.
+ * configure.in: Remove lean bootstrap support from here.
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+ 2006-01-02 Andreas Schwab <schwab@suse.de>
+
+ * configure.in: When reconfiguring remove Makefile in
+ all stage directories.
+ * configure: Regenerate.
+
+2005-12-27 Leif Ekblad <leif@rdos.net>
+
+ * configure.in: Add support for RDOS target.
+ * configure: Regenerate.
+
+2005-12-27 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/1990
+ * libtool.m4: Synchronize with version in GCC sources.
+
+2005-12-20 Paolo Bonzini <bonzini@gnu.org>
+
+ Revert Ada-related part of the previous change.
+
+ * Makefile.def (ADAFLAGS, BOOT_ADAFLAGS, ADAFLAGS_FOR_TARGET):
+ Do not pass.
+ * Makefile.tpl (BOOT_ADAFLAGS): Do not define.
+ * Makefile.in: Regenerate.
+ * configure.in: Do not include mt-ppc-aix target fragment.
+ * configure: Regenerate.
+
+2005-12-19 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Select appropriate fragments for PowerPC/AIX.
+ * configure: Regenerate.
+
+ * Makefile.def (flags_to_pass): Add ADAFLAGS, BOOT_ADAFLAGS,
+ BOOT_CFLAGS, BOOT_LDFLAGS.
+ * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Handle BOOT_ADAFLAGS,
+ BOOT_CFLAGS, BOOT_LDFLAGS.
+ (TARGET_FLAGS_TO_PASS): Handle ADAFLAGS_FOR_TARGET.
+ (stage[+id+]-bubble): Pass flags recursively to the comparison target.
+ (stage): Fail if we cannot complete the work.
+ * Makefile.in: Regenerate.
+
+2005-12-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.NEWLIB: Update copyright year for default
+ copyright.
+
+2005-12-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (all, do-[+make_target+], do-check, install,
+ install-host-nogcc): Don't invoke $(stage) at the end.
+ * Makefile.in: Regenerate.
+
+2005-12-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Flip the top-level bootstrap switch.
+ * configure: Regenerate.
+
+ Merge from gcc:
+
+ 2005-12-14 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.tpl: Throughout the file, use : $(MAKE) along with
+ $(stage) and $(unstage).
+ (EXTRA_TARGET_FLAGS): Correct double-quoting.
+ (all): Remove stray semicolon.
+ (local-distclean): Don't handle multilib.tmp and multilib.out.
+ (install.all): Set $s for consistency.
+ (configure-[+prefix+][+module+]): Instead of [+deps+], handle
+ check_multilibs setting. Always make the install directory.
+ (configure-stage[+id+]-[+prefix+][+module+]): Likewise.
+ Correct @if/@endif.
+ (all-stage[+id+]-[+prefix+][+module+]): Correct @if/@endif.
+ ($(TARGET_SUBDIR)/[+module+]/multilib.out): Remove.
+ (stage[+id+]-start, stage[+id+]-end): Stage $(TARGET_SUBDIR).
+ (multilib.out): Remove.
+ * Makefile.in: Regenerated.
+
+2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config.sub: Replace ms1 arch with mt. Allow ms1 as alias.
+ * configure.in: Replace ms1 arch with mt.
+ * configure: Rebuilt.
+
+2005-12-05 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync with gcc:
+
+2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config.sub: Replace ms1 arch with mt. Allow ms1 as alias.
+ * configure.in: Replace ms1 arch with mt.
+ * configure: Rebuilt.
+
+2005-12-05 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync with gcc:
+
+ 2005-12-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in (CONFIGURED_BISON, CONFIGURED_YACC, CONFIGURED_M4,
+ CONFIGURED_FLEX, CONFIGURED_LEX, CONFIGURED_MAKEINFO): Remove
+ "CONFIGURED_" from the AC_CHECK_PROGS invocation. Move below.
+ Find in-tree tools if available.
+ (EXPECT, RUNTEST, LIPO, STRIP): Find them and substitute them.
+ (CONFIGURED_*_FOR_TARGET): Don't set nor substitute.
+ (*_FOR_TARGET): Set them with GCC_TARGET_TOOL.
+ (COMPILER_*_FOR_TARGET): New.
+ * Makefile.tpl (HOST_EXPORTS): Add *_FOR_TARGET symbols that gcc needs.
+ (BASE_TARGET_EXPORTS): Use COMPILER_*_FOR_TARGET symbols.
+ (CONFIGURED_*, USUAL_*): Remove.
+ (BISON, YACC, FLEX, LEX, M4, MAKEINFO, EXPECT, RUNTEST, LIPO,
+ STRIP): Use autoconf substitutions.
+ (COMPILER_AS_FOR_TARGET, COMPILER_LD_FOR_TARGET,
+ COMPILER_NM_FOR_TARGET): New.
+ (EXTRA_HOST_FLAGS): Pass LIPO and STRIP.
+
+ (all): Make all-host and all-target in parallel.
+ (do-[+make_target+], do-check, install, [+compare-target+]): Ensure
+ that $$r and $$s are set before invoking a recursive make.
+ (stage[+id+]-bubble): Likewise, and invoke the comparison at the end.
+ ([+bootstrap-target+]): Inline most of the `all' target.
+
+ 2005-11-29 Ben Elliston <bje@au.ibm.com>
+
+ * Makefile.tpl (clean-target-libgcc): Invoke clean-target-libgcc
+ from the gcc build directory.
+ * Makefile.in: Regenerate.
+
+ 2005-11-29 Ben Elliston <bje@au.ibm.com>
+
+ * Makefile.def: Add new libdecnumber host_module. Make all-gcc
+ depend on all-libdecnumber.
+ * configure.in (host_libs): Include libdecnumber.
+ * Makefile.in: Regenerate.
+ * configure: Likewise.
+
+ 2005-11-21 Kean Johnston <jkj@sco.com>
+
+ * config.sub, config.guess: Sync from upstream sources.
+
+2005-11-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.def: Remove gdb dependencies for gdbtk.
+ * Makefile.tpl (CONFIGURE_GDB_TK, INSTALL_GDB_TK): New variables.
+ (configure-gdb, install-gdb): New rules.
+ * configure.in: Set CONFIGURE_GDB_TK and INSTALL_GDB_TK.
+ * Makefile.in, configure: Regenerated.
+
+2005-10-22 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/24297
+ * Makefile.tpl (do-[+make-target+], do-check, install,
+ stage[+id+]-bubble, [+compare-target+]): Ensure $$r and $$s
+ are set before recursing.
+ * Makefile.in: Regenerate.
+
+2005-10-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR bootstrap/18939
+ * Makefile.def (gcc) <target>: Fix thinko.
+ * Makefile.in: Regenerate.
+
+2005-10-17 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * configure.in (bfin-*-*): Use test, not brackets, in if statement.
+ * configure: Regenerate.
+
+2005-10-09 Kazu Hirata <kazu@codesourcery.com>
+
+ * configure.in (arm-*-linux-gnueabi): Add to noconfigdirs
+ target-libffi, target-qthreads, target-libjava, and
+ targetlibobjc.
+ * configure: Regenerate.
+
+2005-10-06 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.def (flags_to_pass): Add OBJDUMP_FOR_TARGET.
+ * Makefile.tpl (BASE_TARGET_EXPORTS): Add OBJDUMP.
+ (OBJDUMP_FOR_TARGET, CONFIGURED_OBJDUMP_FOR_TARGET)
+ (USUAL_OBJDUMP_FOR_TARGET): New.
+ (EXTRA_TARGET_FLAGS): Add OBJDUMP.
+ * configure.in: Check for $OBJDUMP_FOR_TARGET.
+ * configure, Makefile.in: Regenerated.
+
+2005-10-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (all) [gcc-no-bootstrap]: Make prebootstrap packages
+ before other host packages.
+
+2005-10-05 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/22340
+
+ * configure.in (default_target): Remove.
+ * Makefile.tpl (all): Do not use prerequisites as subroutines
+ (all) [gcc-bootstrap]: Bootstrap gcc first if it was not done yet.
+ (do-[+make_target+], check, install, [+bootstrap_target+]): Do not
+ use prerequisites as subroutines.
+ (check-host, check-target): New.
+ (bootstrap configure & all targets): Do not use stage*-start
+ if the directory layout is already ok.
+ (non-bootstrap configure & all targets): Prepend a $(unstage).
+ (stage[+id+]-bubble): Do that here. Do not use NOTPARALLEL.
+ (NOTPARALLEL): Remove.
+ (unstage, stage variables): New variables.
+ (unstage, stage targets): Simply expand to those variables.
+
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+2005-10-04 James E Wilson <wilson@specifix.com>
+
+ * Makefile.def (lang_env_dependencies): Add libmudflap.
+ * Makefile.in: Regenerate.
+
+2005-10-03 Catherine Moore <clm@cm00re.com>
+
+ * configure.in (bfin-*-*): Support bfin.
+ * configure: Regenerated.
+
+2005-09-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.in (*-*-darwin*): Build bfd, binutils and opcodes.
+ * configure: Regenerated.
+
+2005-09-28 Geoffrey Keating <geoffk@apple.com>
+
+ * Makefile.tpl (BASE_TARGET_EXPORTS): Add LIPO, STRIP.
+ (LIPO_FOR_TARGET): New.
+ (CONFIGURED_LIPO_FOR_TARGET): New.
+ (USUAL_LIPO_FOR_TARGET): New.
+ (STRIP_FOR_TARGET): New.
+ (CONFIGURED_STRIP_FOR_TARGET): New.
+ (USUAL_STRIP_FOR_TARGET): New.
+ * Makefile.def (flags_to_pass): Add LIPO_FOR_TARGET and
+ STRIP_FOR_TARGET.
+ * configure.in: Set LIPO_FOR_TARGET, STRIP_FOR_TARGET,
+ 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.
+ (rs6000-*-aix*): Same.
+ * configure: Regenerate.
+
+2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * configure.in: Recognize f95 in the --enable-languages option,
+ and substitute it for fortran, issuing a warning.
+ * configure: Regenerate.
+
+2005-09-07 Ben Elliston <bje@au.ibm.com>
+
+ Import from Autoconf sources:
+
+ 2005-09-06 Paul Eggert <eggert@cs.ucla.edu>
+ * move-if-change: Don't output "$2 is unchanged"; suggested by Ben
+ Elliston. Handle weird characters correctly.
+
+2005-08-30 Phil Edwards <phil@codesourcery.com>
+
+ * configure.in (*-*-vxworks*): Add target-libstdc++-v3 to noconfigdirs.
+ * configure: Regenerated.
+
+2005-08-20 Richard Earnshaw <richard.earnshaw@arm.com>
+
+ * Makefile.def (libssp): Add to lang_env_dependencies.
+ * Makefile.in: Regenerate.
+
+2005-08-17 Christian Groessler <chris@groessler.org>
+
+ * Makefile.tpl: (USUAL_CC_FOR_TARGET): Add missing trailing slash.
+ * Makefile.in: Regenerate.
+
+2005-08-12 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Replace NCN_STRICT_CHECK_TOOL with
+ NCN_STRICT_CHECK_TOOLS, and likewise for NCN_STRICT_CHECK_TARGET_TOOLS.
+ Look for alternate names of the target cc and c++
+ * configure: Regenerate.
+
+2005-08-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in (CC_FOR_TARGET, CXX_FOR_TARGET, GCJ_FOR_TARGET,
+ GCC_FOR_TARGET, RAW_CXX_FOR_TARGET, GFORTRAN_FOR_TARGET): Find
+ them with NCN_STRICT_CHECK_TARGET_TOOL, like the other target
+ tools; remove code to manually set them.
+ (Target tools): Look in the environment for them.
+ * Makefile.tpl (CC_FOR_TARGET, CXX_FOR_TARGET, GCJ_FOR_TARGET,
+ GCC_FOR_TARGET, RAW_CXX_FOR_TARGET, GFORTRAN_FOR_TARGET): Redefine.
+ (AS_FOR_TARGET, LD_FOR_TARGET, NM_FOR_TARGET): Look into gcc
+ build directory.
+ (CONFIGURED_CC_FOR_TARGET, CONFIGURED_CXX_FOR_TARGET,
+ CONFIGURED_GCJ_FOR_TARGET, CONFIGURED_GCC_FOR_TARGET,
+ CONFIGURED_GFORTRAN_FOR_TARGET, USUAL_CC_FOR_TARGET,
+ USUAL_CXX_FOR_TARGET, USUAL_GCJ_FOR_TARGET, USUAL_GCC_FOR_TARGET,
+ USUAL_RAW_CXX_FOR_TARGET, USUAL_GFORTRAN_FOR_TARGET): New.
+ (CXX_FOR_TARGET_FOR_RECURSIVE_MAKE,
+ RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS): Delete.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+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.in: Regenerated.
+
+2005-07-26 Mark Mitchell <mark@codesourcery.com>
+
+ * Makefile.tpl (SYSROOT_CFLAGS_FOR_TARGET): New variable.
+ (CFLAGS_FOR_TARGET): Use it.
+ (CXXFLAGS_FOR_TARGET): Likewise.
+ * Makefile.in: Regenerated.
+ * configure.in (--with-build-sysroot): New option.
+ * configure: Regenerated.
+
+2005-07-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl: Wrap install between unstage and stage
+ * Makefile.in: Regenerate.
+
+2005-07-16 Kelley Cook <kcook@gcc.gnu.org>
+
+ * all files: Update FSF address.
+
+2005-07-14 Jim Blandy <jimb@redhat.com>
+
+ * 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,
+ config.sub, install-sh, missing, mkinstalldirs,
+ symlink-tree, ylwrap: Sync from upstream sources.
+
+2005-07-13 Eric Christopher <echristo@redhat.com>
+
+ * configure.in: Add toplevel noconfigdir support for tpf.
+ * configure: Regenerate.
+
+2005-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ * Makefile.def (target_modules): Add libssp.
+ * configure.in (target_libraries): Add target-libssp.
+ * configure: Rebuilt.
+ * Makefile.in: Rebuilt.
+
+2005-07-11 Paolo Bonzini <bonzini@gnu.org>
+
+ PR ada/22340
+
+ * Makefile.def: Sync with gcc.
+ * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Fix pasto.
+ * Makefile.in: Regenerate.
+
+2005-07-07 Andreas Schwab <schwab@suse.de>
+
+ * Makefile.def (flags_to_pass): Add CFLAGS_FOR_BUILD.
+ * Makefile.tpl (EXTRA_GCC_FLAGS): Don't pass CFLAGS_FOR_BUILD here.
+ * Makefile.in: Regenerated.
+
+2005-07-07 Kazu Hirata <kazu@codesourcery.com>
+
+ * configure.in: Add --enable-libssp and --disable-libssp.
+ * configure: Regenerate with autoconf-2.13.
+
+2005-07-06 Geoffrey Keating <geoffk@apple.com>
+
+ * configure.in: Don't build sim or rda when targetting darwin.
+ * configure: Regenerate.
+
+2005-07-04 Ben Elliston <bje@gnu.org>
+
+ * src-release (do-proto-toplev): Remove dejagnu bits.
+ (DEJAGNU_SUPPORT_DIRS): Remove.
+ (dejagnu.tar.bz2, dejagnu.tar): Likewise.
+ (GDBD_SUPPORT_DIRS): Likewise.
+ (gdb+dejagnu.tar.bz2, gdb+dejagnu.tar): Likewise.
+ (INSIGHTD_SUPPORT_DIRS): Likewise.
+ (insight+dejagnu.tar.bz2, insight+dejagnu.tar): Likewise.
+
+2005-06-30 Ben Elliston <bje@gnu.org>
+
+ * setup.com (mpw): Remove unused directive.
+
+2005-06-22 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (stagefeedback): Come after profile.
+ Define profiledbootstrap target.
+ * Makefile.tpl (profiledbootstrap): Remove.
+ (stageprofile-end): Zap stagefeedback.
+ (stagefeedback-start): Copy all .gcda files, not only GCC's.
+ * Makefile.in: Regenerate.
+
+2005-06-13 Zack Weinberg <zack@codesourcery.com>
+
+ * depcomp: Update from automake CVS. Add 'ia64hp' stanza.
+ In 'cpp' stanza, support '#line' as well as '# '.
+
+2005-06-07 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.in (unsupported_languages): New macro.
+ <mmix-knuth-mmixware>: Set unsupported_languages. Name explicit
+ non-ported target libraries in noconfigdirs.
+ <cris-*, crisv32-*> Ditto, except for non-aout, non-elf,
+ non-linux-gnu. Remove libgcj_ex_libffi.
+ <lang_frag loop>: Set add_this_lang=no if the language is in
+ unsupported_languages.
+ * configure: Regenerate.
+
+2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
+
+ * configure.in: Fix typo in handling of --with-mpfr-dir.
+ * configure: Regenerate.
+
+2005-06-02 Jim Blandy <jimb@redhat.com>
+
+ * config.sub: Add cases for the Renesas m32c. (This patch has been
+ accepted into the master sources.)
+
+2005-06-02 Aldy Hernandez <aldyh@redhat.com>
+ Michael Snyder <msnyder@redhat.com>
+ Stan Cox <scox@redhat.com>
+
+ * configure.in: Set noconfigdirs for ms1.
+
+ * configure: Regenerate.
+
+2005-05-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (stage[+id+]-start): Iterate over target module as well.
+ (Dependencies): Consider target modules for bootstrap dependencies.
+ Make target bootstrap modules depend on each stage's gcc.
+ * Makefile.in: Regenerate.
+
+2005-05-20 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (configure-gcc): Depend on binutils having been built.
+ (all-gcc): No need to do it here.
+ * Makefile.in: Regenerate.
+
+2005-05-19 Paul Brook <paul@codesourcery.com>
+
+ * configure.in: Rewrite misleading error message when requested
+ language cannot be built.
+ * configure: Regenerate.
+
+2005-05-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * ylwrap: Import from Automake 1.9.5.
+
+2005-05-04 Mike Stump <mrs@apple.com>
+
+ * configure.in: Always pass --target to target configures as
+ otherwise rebuilds that do --recheck will fail.
+ * configure: Rebuilt.
+
+2005-05-04 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Rename from
+ STAGE_HOST_EXPORTS.
+ (configure, all): Add bootstrap support.
+ (Host modules, target modules): Pass post-stage1 flags and exports.
+ (Top-level bootstrap): Remove bootstrap rules, expanded elsewhere.
+ * Makefile.in: Regenerate.
+
+2005-04-29 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync from gcc:
+
+ 2005-04-22 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config.sub: Update from master copy.
+
+ 2005-04-19 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.in <crisv32-*-*, cris-*-*>: New local variable
+ libgcj_ex_libffi. Have specific match for *-*-linux*. Separate
+ matches for "*-*-aout" and "*-*-elf". Don't disable libffi for
+ "*-*-elf" and "*-*-linux*".
+ * configure: Regenerate.
+
+2005-04-06 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (BUILD_CONFIGARGS): Include --with-build-subdir.
+ (TARGET_CONFIGARGS): Include --with-target-subdir.
+ (configure, all): New macros. Use them throughout.
+
+2005-04-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl: Sync with gcc.
+ * Makefile.in: Regenerate.
+
+2005-03-30 J"orn Rennecke <joern.rennecke@st.com>
+
+ * config/mh-mingw32: Delete.
+ * configure.in: Don't use it.
+ * configure: Regenerate.
+
+2005-03-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (bfd, opcodes, libstdc++-v3, libmudflap): Set lib_path.
+ * Makefile.tpl (SET_LIB_PATH, REALLY_SET_LIB_PATH): Remove.
+ (HOST_EXPORTS, STAGE_HOST_EXPORTS, TARGET_EXPORTS): Set $(RPATH_ENVVAR).
+ (HOST_LIB_PATH): Generate from Makefile.def.
+ (TARGET_LIB_PATH): Likewise.
+ (Old bootstrap targets): Include TARGET_LIB_PATH into RPATH_ENVVAR.
+ * Makefile.in: Regenerate.
+ * configure.in (set_lib_path, SET_LIB_PATH, SET_GCC_LIB_PATH): Remove.
+ (RPATH_ENVVAR): Include Darwin case.
+ * configure: Regenerate.
+
+2005-03-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in (RPATH_ENVVAR): Set to DYLD_LIBRARY_PATH on Darwin.
+ * configure: Regenerate.
+
+2005-03-21 Zack Weinberg <zack@codesourcery.com>
+
+ * Makefile.def: Remove libstdcxx_incdir, libsubdir, gxx_include_dir,
+ gcc_version, and gcc_version_trigger from set of flags to pass.
+ * Makefile.tpl: Remove definitions of above variables.
+ (config.status): Remove dependency on $(gcc_version_trigger).
+ * Makefile.in: Regenerate.
+ * configure.in: Do not reference config/gcc-version.m4 nor
+ config/gxx-include-dir.m4. Do not invoke TL_AC_GCC_VERSION nor
+ TL_AC_GXX_INCLUDE_DIR. Do not set gcc_version_trigger.
+ * configure: Regenerate.
+
+2005-03-16 Manfred Hollstein <manfred.h@gmx.net>
+ Andrew Pinski <pinskia@physics.uc.edu>
+
+ * Makefile.tpl (check-[+module+]): Fix shell statement inside if ... fi.
+ * Makefile.in: Regenerate.
+
+2005-03-01 Alexandre Oliva <aoliva@redhat.com>
+
+ PR libgcj/20160
+ * ltmain.sh: Avoid creating archives with components that have
+ duplicate basenames.
+
+2005-02-28 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR bootstrap/20250
+ * Makefile.tpl (HOST target installs): Fix copy and pasto, use install
+ instead of check.
+ * Makefile.in: Regenerate.
+
+2005-02-28 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync from gcc.
+
+ 2005-02-28 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/17383
+ * Makefile.def (target_modules): Remove "stage", now unnecessary.
+ * Makefile.tpl (HOST_SUBDIR): New substitution.
+ (STAGE_HOST_EXPORTS, EXPECT, HOST_LIB_PATH, USUAL_AR_FOR_TARGET,
+ USUAL_AS_FOR_TARGET, USUAL_DLLTOOL_FOR_TARGET, USUAL_GCC_FOR_TARGET,
+ USUAL_LD_FOR_TARGET, USUAL_NM_FOR_TARGET, USUAL_OBJDUMP_FOR_TARGET,
+ USUAL_RANLIB_FOR_TARGET, USUAL_WINDRES_FOR_TARGET): Use it.
+ (Host modules, Bootstrapped modules): Use it.
+ (Build modules, Target modules): Do not create symlink trees,
+ always configure out-of-srcdir.
+ (distclean): Try removing $(host_subdir) with rm before using rm -rf.
+ * configure.in (FLAGS_FOR_TARGET, CC_FOR_TARGET, GCJ_FOR_TARGET,
+ GFORTRAN_FOR_TARGET, CXX_FOR_TARGET, RAW_CXX_FOR_TARGET): Use
+ $(HOST_SUBDIR). Create a symlink for host_subdir.
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+ Merged from libada-gnattools-branch:
+ 2004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.def: Add gnattools as a module, depending on target-libada.
+ * Makefile.in: Regenerate.
+ * configure.in: Include gnattools in host_tools; disable it if ada
+ is disabled.
+ * configure: Regenerate.
+
+2005-02-23 Nick Clifton <nickc@redhat.com>
+
+ * configure: Regenerate.
+
+2005-02-22 Paul Schlie <schlie@comcast.net>
+
+ * configure.in: Allow darwin targeted ports to build tk, itcl and
+ libgui.
+
+2005-02-21 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR libgcj/10353
+ * configure.in (noconfigdirs) <sparc-*-solaris2.[0-6]>: Add libgcj.
+ * configure: Regenerate.
+
+2005-02-08 Andrew Cagney <cagney@gnu.org>
+
+ * MAINTAINERS: Delete reference to dejagnu/ and mmalloc/ from the
+ gdb/ section. Update GDB's URL.
+
+2005-01-31 Andrew Cagney <cagney@gnu.org>
+
+ * gettext.m4: Only set ENABLE_NLS when gettext is present.
+
+2005-01-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.in (noconfigdirs) <crisv32-*-*>: Match like cris-*-*.
+ <crisv32-*-*, cris-*-*>: Only disable target-newlib and
+ target-libgloss when not *-*-elf and *-*-aout.
+ * configure: Regenerate.
+
+2005-01-27 Andrew Cagney <cagney@gnu.org>
+
+ * gettext.m4: Don't use NONE as a default for CATOBJEXT.
+
+2005-01-24 Andrew Cagney <cagney@gnu.org>
+
+ * gettext.m4: Only fall back to ../intl/ when it's present.
+
+2005-01-17 Kelley Cook <kcook@gcc.gnu.org>
+
+ * install-sh, config.sub: Import from upstream.
+
+2005-01-17 Kelley Cook <kcook@gcc.gnu.org>
+
+ PR bootstrap/18222
+ * Makefile.def: Pass CPPFLAGS_FOR_TARGET.
+ * Makefile.tpl: Define target CPPFLAGS on CPPFLAGS_FOR_TARGET.
+ * Makefile.in: Regenerate.
+
+2005-01-03 Paolo Bonzini <bonzini@gnu.org>
+
+ Revert 2004-12-28 Makefile changes, a better fix will be
+ applied to mainline and src after GCC 4.0 branches.
+
+2004-12-28 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/17383
+
+ * Makefile.def (target_modules): Remove stage parameter,
+ it is always true now.
+ * Makefile.tpl (configure-build-[+module+],
+ configure-target-[+module+]): Always build symlink tree
+ for the directory and for include. BUILD_SUBDIR and
+ TARGET_SUBDIR cannot be . anymore.
+ * Makefile.in: Regenerate.
+
+2004-12-25 David Edelsohn <edelsohn@gnu.org>
+
+ Revert 2004-12-08 Makefile changes.
+
+2004-12-16 Andrew Stubbs <andrew.stubbs@st.com>
+
+ * configure.in (sh64-*-*): Reenable gprof.
+ * configure: Regenerate.
+
+2004-12-09 Jim Blandy <jimb@redhat.com>
+
+ * MAINTAINERS: List 'depcomp' as part of automake.
+
+2004-12-08 David Edelsohn <edelsohn@gnu.org>
+
+ * Makefile.def (flags_to_pass): Add PICFLAG_FOR_TARGET.
+ * Makefile.tpl (EXTRA_HOST_FLAGS): Add PICFLAG.
+ (EXTRA_TARGET_FLAGS): Add PICFLAG.
+ * Makefile.in: Regenerate.
+
+2004-12-07 Matt Kraai <kraai@ftbfs.org>
+
+ * Makefile.tpl: Generate normal dependencies if the LHS module is
+ not bootstrapped.
+ * Makefile.in: Regenerate.
+
+2004-12-03 Richard Sandiford <rsandifo@redhat.com>
+
+ * configure.in: Include config/gxx-include-dir.m4. Use
+ TL_AC_GXX_INCLUDE_DIR. Remove some now-redundant AC_SUBSTs.
+ * configure: Regenerate.
+
+2004-12-03 Richard Sandiford <rsandifo@redhat.com>
+
+ * config.if: Delete.
+ * configure.in: Set libstdcxx_incdir directly.
+ * configure: Regenerate.
+ * MAINTAINERS: Remove mention of config.if.
+ * src-release (DEVO_SUPPORT): Remove config.if.
+
+2004-12-02 Eric Christopher <echristo@redhat.com>
+
+ * Makefile.tpl (clean-target-libgcc): Add stmp-dirs to list
+ of things to remove.
+ * Makefile.in: Regenerate.
+
+2004-12-02 Richard Sandiford <rsandifo@redhat.com>
+
+ * configure.in: Clear gcc_version_trigger if the file doesn't exist.
+ * configure: Regenerate.
+
+2004-12-02 Richard Sandiford <rsandifo@redhat.com>
+
+ * configure.in: Include config/gcc-version.m4. Use TL_AC_GCC_VERSION
+ to set gcc_version_trigger. Remove some now-redundant AC_SUBSTs.
+ * configure: Regenerate.
+
+2004-11-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * configure.in (hppa*-*-linux*): Don't add libgcj to noconfigdirs.
+ (hppa*64*-*-*): Delete incorrect comment.
+ * configure: Rebuilt.
+
+2004-11-15 Kelley Cook <kcook@gcc.gnu.org>
+
+ * install-sh, compile: Import from automake.
+
+2004-11-15 Kelley Cook <kcook@gcc.gnu.org>
+
+ * config.guess, config.sub: Import from savannnah.
+
+2004-11-12 Mike Stump <mrs@apple.com>
+
+ * Makefile.def: Add html support.
+ * Makefile.tpl: Likewise.
+ * Makefile.in: Regenerate.
+
+2004-11-11 Geoffrey Keating <geoffk@apple.com>
+
+ PR 18423
+ * configure.in: Remove all instances of build-fixincludes from
+ noconfigdirs.
+ (build_configargs): Supply --target to subdirectories.
+ * configure: Regenerate.
+
+ * Makefile.def: Make gcc install depend on fixincludes install.
+ * Makefile.in: Regenerate.
+
+2004-11-08 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * configure.in (noconfigdirs) [mmix-*-*]: Disable
+ target-libgfortran.
+ * configure: Regenerate.
+
+2004-11-07 David Edelsohn <edelsohn@gnu.org>
+
+ * config-ml.in: Pass FCFLAGS for multilibs, handle GFORTRAN
+ like CC.
+
+2004-11-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (host fixincludes): Specify missing targets.
+ * Makefile.in: Regenerate.
+
+2004-11-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR other/17783
+ * configure.in: Set up LD_LIBRARY_PATH by default for gcc.
+ * configure: Regenerated.
+
+2004-11-04 Daniel Jacobowitz <dan@debian.org>
+
+ * configure.in (arm-*-oabi*, thumb-*-oabi*): Remove.
+ * configure: Regenerated.
+
+2004-10-28 Eric B. Weddington <ericw@evcohs.com>
+
+ PR target/18151
+ * configure.in (case ${target}): Do not build fixincludes for avr.
+ * configure: Regenerated.
+
+2004-10-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in (case ${target}): Do not build fixincludes
+ on platforms where it is not used.
+ * configure: Regenerated.
+
+2004-10-23 Daniel Jacobowitz <dan@debian.org>
+
+ * configure.in: Use an absolute path to install-sh.
+ * configure: Regenerated.
+
+2004-10-19 Andrew Cagney <cagney@gnu.org>
+
+ * src-release (do-djunpack, do-md5sum): Install the generated file
+ directly into the proto-toplev/ directory.
+
+2004-10-19 Andrew Cagney <cagney@gnu.org>
+
+ * src-release (GDB_SUPPORT_DIRS): Remove utils and intl.
+
+2004-10-12 Kelley Cook <kcook@gcc.gnu.org>
+
+ * configure.in (*-*-cygwin*): Supress warning if newlib not present.
+ * configure: Regenerate.
+
+2004-10-06 Paolo Bonzini <bonzini@gnu.org>
+
+ Fix wrong conflict resolution in:
+
+ 2004-08-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.in: Regenerate.
+ * Makefile.tpl (Autogenerated `all-*' targets): Invoke $(TARGET-*)
+ in the recursive `make', instead of hardwiring `all'.
+ (Autogenerated TARGET-* variables): New.
+
+2004-10-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ Merged from GCC / libtool upstream:
+ 2004-10-02 P.J. Darcy <darcypj@us.ibm.com>
+ * ltcf-c.sh (tpf*): Add ld_shlibs=yes.
+ * ltcf-cxx.sh (tpf*): Likewise.
+ * ltconfig (tpf*): Add TPF OS configuration support.
+
+2004-09-30 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * configure.in: Enable target-libgloss for crx-*-*.
+ * configure: Regenerate.
+
+2004-09-24 Michael Roth <mroth@nessie.de>
+
+ * configure.in (--without-headers): Add missing double quotes.
+ * configure: Regenerate.
+
+2004-09-24 Kelley Cook <kcook@gcc.gnu.org>
+
+ * ylwrap: Revert to previous version.
+
+2004-09-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR bootstrap/17369
+ * Makefile.tpl (REALLY_SET_LIB_PATH): Add @SET_GCC_LIB_PATH@.
+ (HOST_EXPORTS]): Add @SET_GCC_LIB_PATH@. Set and export
+ SET_GCC_LIB_PATH_CMD.
+ (BASE_TARGET_EXPORTS): Likewise.
+ * Makefile.in: Regenerated.
+
+ * configure.in (SET_GCC_LIB_PATH): Set and substitute.
+ * configure: Regenerated.
+
+2004-09-23 Kelley Cook <kcook@gcc.gnu.org>
+
+ * config.guess: New upstream version
+ * compile, depcomp, install-sh, ylwrap: Likewise.
+
+2004-09-19 Roger Sayle <roger@eyesopen.com>
+
+ * config/mh-x86omitfp: New host makefile fragment. Add
+ -fomit-frame-pointer to the default BOOT_CFLAGS.
+ * configure.in: Use it to speed up bootstrap on some IA-32 hosts.
+ * configure: Regenerate.
+
+2004-09-15 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR target/11572
+ * configure.in (*-*-darwin*): Renable libobjc.
+ * configure: Regenerate.
+
+2004-09-09 Daniel Berlin <dberlin@dberlin.org>
+
+ * Makefile.def: Remove libbanshee.
+ * Makefile.tpl: Ditto.
+ * configure.in: Ditto.
+ * Makefile.in: Regen.
+ * configure: Ditto.
+
+2004-09-07 Paolo Bonzini <bonzini@gnu.org>
+
+ * missing: Import latest version from master repository.
+
+2004-09-04 Nick Clifton <nickc@redhat.com>
+
+ * config.sub: Import latest version from master repository.
+ * config.guess: Likewise.
+ This includes these changes:
+
+ 2004-08-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * config.sub: Handle crisv32, alias etraxfs.
+ * config.guess (crisv32:Linux:*:*): Handle.
+
+ 2004-08-13 Brad Smith <brad@comstyle.com>
+
+ * config.guess (*:OpenBSD:*:*): Remove defunct MIPS machines.
+ (sgi:OpenBSD:*:*): Emit mips64, not mipseb.
+
+ 2004-08-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * config.guess (*:Darwin:*:*): If uname -p reports "unknown",
+ assume the processor is a powerpc. This is because coreutils
+ uname (at least versions 4.5.7 through 5.2.1) outputs "unknown"
+ in this case, due to a MacOS X bug that causes
+ sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0)
+ to return a negative number.
+ Problem reported by Petter Reinholdtsen in:
+ http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html
+
+ 2004-07-19 Ben Elliston <bje@gnu.org>
+
+ * config.guess (S7501:*:4.0:3.0): Handle NCR System V UNIX machine.
+
+ 2004-06-24 Ben Elliston <bje@gnu.org>
+
+ * config.guess: Update copyright years.
+ * config.sub: Likewise.
+
+ 2004-06-22 Robert Millan <robertmh@gnu.org>
+
+ * config.guess (*:FreeBSD:*:*): Remove check for glibc (unneeded
+ since GNU/kFreeBSD systems match *:GNU/*:*:* instead).
+
+ 2004-06-22 Stanley F. Quayle <stan@stanq.com>
+
+ * config.guess (*:*VMS:*:*): New entry. Replaces
+ Alpha:OpenVMS:*. Recognize and advertise all VMS flavors as dec
+ manufacturer.
+
+ 2004-06-22 Ben Elliston <bje@gnu.org>
+
+ * config.guess: Cray fixes from Wendy Palm <wendyp@cray.com>.
+ * config.sub: Likewise.
+
+ 2004-06-22 Ben Elliston <bje@gnu.org>
+
+ Reported by Hans-Peter Nilsson <hp@bitrange.com>:
+ * config.sub: Correctly handle mmix-knuth and mmix-knuth-mmixware.
+
+ 2004-06-11 Ben Elliston <bje@gnu.org>
+
+ * config.guess (pegasos:OpenBSD:*:*): Remove.
+
+ 2004-06-11 Ben Elliston <bje@gnu.org>
+
+ From Wouter Verhelst <wouter@grep.be>:
+ * config.guess (M68*:*:R3V[5678]:*): Detect R3V8.
+
+ 2004-06-11 Ben Elliston <bje@gnu.org>
+
+ * config.guess (luna88k:OpenBSD:*:*): New.
+
+ 2004-03-12 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * config.guess (m32r*:Linux:*:*): New case.
+ * config.sub: Handle m32rle.
+
+ 2004-03-12 Ben Elliston <bje@wasabisystems.com>
+
+ From Jens Petersen <petersen@redhat.com>:
+ * config.sub: Handle sparcv8.
+
+ 2004-03-03 Ben Elliston <bje@wasabisystems.com>
+
+ From Tom Smith <smith@cag.lkg.hp.com>:
+ * config.guess: Version suffixes are equally significant on Tru64
+ V4.* and V5.*, so do not ignore them on V5.*. Handle a version
+ prefix of "P" (patched kernel).
+
+ 2004-02-23 Tal Agmon <Tal.Agmon@nsc.com>
+
+ * config.sub: Add support for National Semiconductor CRX target.
+
+2004-09-03 Jan Beulich <jbeulich@novell.com>
+
+ * configure.in: Remove target-libstdc++-v3 from noconfigdirs for
+ *-*-netware, but add target-libmudflap.
+ Consolidate *-*-netware targets (of which really only i?86 exists)
+ into a single entry.
+ * configure: Likewise.
+
+2004-09-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (sorry): Remove.
+ (clean-stage[+id+], clean-stage[+id+]-module): New targets.
+ (cleanstrap targets): Depend on distclean, not distclean-stage1.
+ (do-clean): Clean per-stage directories too.
+ (do-distclean): Run distclean-stage1 too.
+ (.NOTPARALLEL): Enable during toplevel bootstrap.
+ (stage[+id+]-bubble): Enable parallel execution during
+ the recursive invocation.
+ * Makefile.in: Regenerate.
+
+ Sync from gcc (moving the Makefile.in change to Makefile.tpl):
+
+ 2004-08-31 Robert Bowdidge <bowdidge@apple.com>
+
+ * Makefile.in: Move BOOT_CFLAGS above host makefile fragment include.
+ * configure.in: add test for powerpc-*-darwin* to specify makefile frag
+ * configure: regenerate
+ * config/mh-ppc-darwin: create file, override BOOT_CFLAGS for
+ -mdynamic-no-pic
+
+2004-08-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl: Move BOOT_CFLAGS above host makefile fragment
+ include.
+ * configure.in: Fix indentation.
+ * configure: Regenerate.
+
+2004-08-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (build_modules): Add fixincludes.
+ (dependencies): Make gcc depend on fixincludes.
+ * configure.in (build_tools): Add fixincludes.
+ (build_configdirs): Always include build_libs.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2004-08-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (bootstrap stages): Add 'lean' parameter.
+ * Makefile.tpl (configure-stageN-*, all-stageN-*): Turned into
+ phony targets; do not generate timestamp files.
+ (distclean-stageN): Remove references to their timestamp files.
+ (restageN, touch-stageN): Remove.
+ (stageN-bubble): Rewritten.
+ (compare): Support lean bootstraps.
+ * Makefile.in: Regenerate.
+
+ * configure.in: Only warn when bootstrapping but
+ build != host or build != target. Support lean bootstraps.
+ * configure: Regenerate.
+
+ Sync from gcc:
+ 2004-08-26 Phil Edwards <phil@codesourcery.com>
+
+ * configure.in: Give a better error message if GMP/MPFR are missing
+ and a language needing them has been requested.
+ * configure: Regenerated.
+
+ 2004-08-25 Phil Edwards <phil@codesourcery.com>
+
+ * configure.in: Print a list of available language front-ends if
+ a requested one is missing. Tidy stray tab characters.
+ * configure: Regenerated.
+
+2004-08-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+ * Makefile.def (bootstrap-stage): Rename extra_*_flags to
+ stage_*_flags.
+ * Makefile.tpl (configure-[+module+], all-[+module+]): Exit
+ for bootstrapped modules if toplevel bootstrap is going.
+ (GCC bootstrap): Generate per-stage targets for all bootstrapped
+ modules. Adjust for changes in Makefile.def. Enable several
+ rules even in non-bootstrap mode, just to avoid peppering the
+ template with unnecessary "@if/@endif gcc-bootstrap" pairs.
+ (stage-[+prev+]-bubble): Remove.
+
+ * Makefile.def (Dependencies): Depend on all-build-bison,
+ all-build-flex, all-build-byacc, all-build-texinfo, rather
+ than the host variations.
+ * Makefile.tpl (BUILD_DIR_PREFIX): Remove. Replace throughout
+ with BUILD_SUBDIR.
+ (BISON): Update for recent Bisons.
+ (YACC): Fix typo.
+ (cross): Depend on all-build.
+ (all): Do not depend on all-build.
+ (prebootstrap): Remove.
+ (dep-kind): Accept separate prefixes for MODULE and ON variables.
+ (Prebootstrap dependencies): Add them to the per-stage targets
+ and to all-prebootstrap.
+ * configure.in (build_configdirs): Always enable build_tools.
+ (BUILD_DIR_PREFIX): Remove.
+
+ * Makefile.def (gcc): Add target variable.
+ (gdb, expect, guile, tk, tix): Replace with_x with extra_make_flags.
+ * Makefile.tpl (Autogenerated `all-*' targets): Invoke $(TARGET-*)
+ in the recursive `make', instead of hardwiring `all'.
+ (Autogenerated TARGET-* variables): New.
+
+2004-08-17 Robert Millan <robertmh@gnu.org>
+
+ * configure.in: In noconfigdirs check, match GNU/k*BSD with GNU/Linux
+ (instead of FreeBSD).
+ * configure: Regenerate.
+
+2004-08-12 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.def, configure.in, src-release: Remove useless, bogus
+ references to tix.
+ * Makefile.in, configure: Regenerate.
+
+ * src-release: Stop distributing mmalloc with gdb (which doesn't
+ use it).
+ * Makefile.def: GDB doesn't depend on mmalloc anymore.
+ * Makefile.in: Regenerate.
+
+2004-08-09 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.in (arm*-*-eabi*): New target.
+ * configure: Regenerate.
+
+2004-08-01 Robert Millan <robertmh@gnu.org>
+
+ * configure.in: Turn mt-linux into mt-gnu. Use mt-gnu and enable
+ libmudflap for all GNU-based systems (with Glibc).
+ * configure: Regenerate.
+
+2004-08-06 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (bfd, opcodes, gcc, zlib): Mark as bootstrap module.
+ (bison, byacc, flex, texinfo): Do not mark as bootstrap module.
+ (Dependencies): New section.
+ * Makefile.tpl (Dependencies): Generate from Makefile.def.
+ (configure-target-[+module+]): Depend on maybe-all-gcc
+ (all-prebootstrap): New name of all-bootstrap. Changed throughout.
+ (toplevel profiledbootstrap): Fix dependencies.
+ * Makefile.in: Regenerate.
+
+2004-08-03 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.in (arm*-*-symbianelf*): Add ${libgcj} and
+ target-libiberty to noconfigdirs.
+
+2004-08-03 Paul Brook <paul@codesourcery.com>
+
+ * configure.in: Check for MPFR as well as GMP.
+ * configure: Regenerate.
+
+2004-08-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (host-modules): Add gcc.
+ * Makefile.in: Regenerate.
+ * Makefile.tpl (sorry): New rule.
+ (configure-host, all-host, [+make_target+]-host, do-check,
+ install-host): Do not add gcc as a special case.
+ (host modules): Add a small special-casing for gcc. Export
+ extra_make_flags through the environment.
+ (maybe-configure-gcc, configure-gcc, maybe-all-gcc, all-gcc,
+ maybe-check-gcc, check-gcc, maybe-install-gcc, install-gcc,
+ other recursive targets for gcc): Remove.
+
+ (all, do-[+make_target+], do-check): Wrap between unstage and stage.
+ (stage, unstage): New rules.
+ (stage[+id+]-start, stage[+id+]-end, [+compare-target+],
+ distclean-stage[+id+]): Use stage_current.
+ ([+bootstrap-target+], profiledbootstrap): Do not invoke manually
+ the stage*-start rules.
+
+2004-07-19 Robert Millan <robertmh@gnu.org>
+
+ Synced from gcc:
+
+ 2004-04-26 Robert Millan <robertmh@gnu.org>
+
+ Add patches from libtool CVS.
+ * libtool.m4: Add kfreebsd*-gnu and knetbsd*-gnu.
+ * ltconfig: Likewise.
+ * ltcf-c.sh: Likewise.
+ * ltcf-cxx.sh: Likewise.
+ * ltcf-gcj.sh: Likewise.
+
+2004-07-12 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Add noconfigdirs for crx-*-*.
+ * configure: Regenerate.
+
+2004-07-12 Paolo Bonzini <bonzini@gnu.org>
+
+ Synced from gcc:
+
+ 2004-07-09 Loren J. Rittle <ljrittle@acm.org>
+
+ * configure.in: Build libmudflap by default on FreeBSD.
+ * configure: Regenerated.
+
+ 2004-07-09 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.in: Do not build libmudflap by default on non-GNU/Linux
+ systems.
+ * configure: Regenerated.
+
+ 2004-07-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR target/16344
+ * Makefile.tpl (profiledbootstrap): Build runtime libraries with
+ feedback based compiler.
+ * Makefile.in: Rebuilt.
+
+ 2004-07-05 Phil Edwards <phil@codesourcery.com>
+
+ * configure.in: Do not prepend $srcdir to /dev/null in
+ makefile fragments.
+ * configure: Regenerate.
+
+2004-07-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.def (host_modules): Set bootstrap=true for flex.
+ * Makefile.tpl (all-gcc): Depend on texinfo and flex.
+ * Makefile.in: Rebuilt.
+
+2004-07-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (build_modules): Add bison, byacc, flex,
+ m4, texinfo.
+ (flags_to_pass): Add FLEX.
+ * Makefile.tpl (BUILD_DIR_PREFIX, BASE_EXPORTS): New.
+ (BUILD_EXPORTS, HOST_EXPORTS, BASE_TARGET_EXPORTS): Include it.
+ (DEFAULT_YACC, USUAL_YACC, DEFAULT_LEX, USUAL_LEX, DEFAULT_M4,
+ DEFAULT_MAKEINFO): Remove.
+ (CONFIGURED_YACC, CONFIGURED_FLEX, CONFIGURED_BISON,
+ CONFIGURED_LEX, CONFIGURED_M4, CONFIGURED_MAKEINFO): Substitute.
+ (YACC, FLEX, BISON, LEX, M4, MAKEINFO): Define to look into
+ objdir or else use configured tool.
+ (all-build): New.
+ (all): Depend on it.
+ (Build module dependencies): Add.
+ * Makefile.in: Regenerate.
+ * configure.in: Better support for multiple build modules,
+ matching what is done for host/target modules. Do not look
+ for "plausible" locations of build tools if Canadian cross.
+ Use autoconf's AC_PROG_CC to find a C compiler. Define
+ BUILD_DIR_PREFIX. Look for flex, makeinfo and m4.
+ * configure: Regenerate.
+
+2004-06-22 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (HOST_EXPORTS): Fix pasto.
+ * Makefile.in: Regenerate.
+
+2004-06-22 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (configure-build-[+module+],
+ configure-[+module+], configure-target-[+module+]): Pass
+ [+extra_configure_args+].
+ (all-build-[+module+], all-[+module+], check-[+module+],
+ install-[+module+], [+make_target+]-[+module+],
+ all-target-[+module+], check-target-[+module+],
+ install-target-[+module+], [+make_target+]-target-[+module+]):
+ Pass [+extra_make_args+].
+ (HOST_EXPORTS): Include the former GCC_HOST_EXPORTS.
+ (GCC_HOST_EXPORTS): Remove.
+ (configure-gcc, all-gcc, GCC_STRAP_TARGETS, profiledbootstrap,
+ cross, check-gcc, check-gcc-c++, install-gcc,
+ gcc-no-fixedincludes, [+make_target+]-gcc, stage[+id+]-bubble):
+ Replace GCC_HOST_EXPORTS with HOST_EXPORTS.
+ * Makefile.in: Regenerate.
+
+2004-06-21 Christopher Faylor <cgf@alum.bu.edu>
+
+ * configure.in: Check for srcdir/winsup rather than build directory
+ winsup.
+ * configure: Regenerate.
+
+2004-06-17 Corinna Vinschen <vinschen@redhat.com>
+
+ * configure.in: Don't build Cygwin native newlib if winsup
+ directory is missing. Emit warning instead.
+ * configure: Regenerate.
+
+2004-06-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (touch-stage[+id+]): New.
+ (restage[+prev+]): Depend on touch-stage[+id+].
+
+ * Makefile.tpl (RECURSE_FLAGS_TO_PASS): New.
+ Use it throughout.
+
+ * Makefile.def: Add profile and feedback bootstrap stages.
+ Remove next field from bootstrap stages.
+ * Makefile.tpl (LN, LN_S): Substitute.
+ (stageN-start, stageN-end): Use double-colon rules, to
+ provide a hook for additional setup commands.
+ (distclean-stageN-gcc, restageN): Create dependencies from
+ [+prev+], not from [+next+].
+ (stageN-bubble): Add commands for successive stages from
+ [+prev+], using double-colon rules.
+ (all-stageN-gcc): Fix typo.
+ (stagefeedback-start, profiledbootstrap): New.
+ * Makefile.in: Regenerate.
+ * configure.in: Call ACX_PROG_LN.
+ * configure: Regenerate.
+
+2004-06-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Fix --enable-bootstrap breakage introduced in trees
+ without gcc.
+ * configure: Regenerate.
+
+2004-06-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl: Fix typo.
+ * Makefile.in: Regenerate.
+
+2004-06-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Remove new- prefix from toplevel
+ bootstrap targets.
+ * configure: Regenerate.
+
+2004-06-01 Paolo Bonzini <bonzini@gnu.org>
+
+ Merge this patch from the gcc tree:
+
+ 2004-05-30 Andreas Jaeger <aj@suse.de>
+ Jim Wilson <wilson@specifixinc.com>
+
+ * config-ml.in: Pass FFLAGS and ADAFLAGS for multilibs, handle F77
+ like CC.
+
+2004-06-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (all.normal): Rename to all.
+ (all): Replace with a rule to pick the default
+ target from configure.
+ (all-gcc, configure-gcc): Use conditionals to
+ do nothing when toplevel bootstrap is going on.
+ (GCC directory bootstrap) [gcc-bootstrap]: Disable.
+ (Toplevel bootstrap) [gcc-no-bootstrap]: Disable.
+ * configure.in: Support --enable-bootstrap.
+
+ * Makefile.def: Remove new- prefix from toplevel
+ bootstrap targets.
+ * Makefile.tpl: Likewise.
+
+ * Makefile.def: Add bootstrap_stage 4. Add bootstrap2
+ target.
+
+ * Makefile.tpl (Toplevel bootstrap): Pass $(BASE_FLAGS_TO_PASS)
+ $(RECURSE_FLAGS) to recursive invocation of make.
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2004-05-27 Daniel Jacobowitz <dan@debian.org>
+
+ * configure.in: Fix sed invocation for GFORTRAN_FOR_TARGET.
+ * configure: Regenerate.
+
+2004-05-25 Daniel Jacobowitz <drow@false.org>
+
+ * Makefile.tpl (BUILD_EXPORTS, HOST_EXPORTS, GCC_HOST_EXPORTS)
+ (STAGE_HOST_EXPORTS, BASE_TARGET_EXPORTS, RAW_CXX_TARGET_EXPORTS)
+ (NORMAL_TARGET_EXPORTS): New macros. Use them in all the recursive
+ targets.
+ * Makefile.in: Regenerate.
+
+2005-05-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Test the ability to symlink directories.
+ * configure: Regenerate.
+
+ * Makefile.def (bootstrap-stage): New definitions.
+ * Makefile.tpl (configure-stage1-gcc,
+ configure-stage2-gcc, configure-stage3-gcc,
+ all-stage1-gcc, all-stage2-gcc, all-stage3-gcc,
+ new-bootstrap, new-cleanstrap, new-restage1, new-restage2,
+ new-restage3, compare): Autogenerate, see Makefile.in
+ entry for behavioral changes.
+ (distclean-stage1, new-stage1-start, new-stage1-end,
+ new-stage1-bubble, distclean-stage2, new-stage2-start,
+ new-stage2-end, new-stage2-bubble, distclean-stage3,
+ new-stage3-start, new-stage3-end): New autogenerated targets.
+ (objext, prebootstrap, BOOT_CFLAGS,
+ POSTSTAGE1_FLAGS_TO_PASS): Move above the autogenerated
+ targets.
+
+ * Makefile.in: Regenerate.
+ (distclean-stage1, new-stage1-start, new-stage1-end,
+ new-stage1-bubble, distclean-stage2, new-stage2-start,
+ new-stage2-end, new-stage2-bubble, distclean-stage3,
+ new-stage3-start, new-stage3-end): New targets.
+ (all-stage1-gcc): Move prebootstrap dependency from here...
+ (configure-stage1-gcc): ...to here.
+ (new-bootstrap): Use bubble targets.
+ (new-cleanstrap, new-restage1, new-restage2, new-restage3):
+ Use per-stage distclean targets.
+ (configure-stage1-gcc, configure-stage2-gcc,
+ configure-stage3-gcc, all-stage1-gcc,
+ all-stage2-gcc, all-stage3-gcc, new-bootstrap):
+ Use new-stageN-start to prepare the tree.
+
+2004-05-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (host_modules): add libcpp.
+ * Makefile.tpl: Add dependencies on and for libcpp.
+ * Makefile.in: Regenerate.
+ * configure.in: Add libcpp host module.
+ * configure: Regenerate.
+
+2004-05-17 Zack Weinberg <zack@codesourcery.com>
+
+ * Makefile.def, Makefile.tpl, configure.in: Remove all mention
+ of libf2c.
+ * configure, Makefile.in: Regenerate.
+
+2004-05-13 Diego Novillo <dnovillo@redhat.com>
+
+ Merge from tree-ssa-20020619-branch.
+
+ * Makefile.def: Add libbanshee, libmudflap and libgfortran.
+ * Makefile.tpl (BUILD_CONFIGDIRS): Add libbanshee.
+ (HOST_GMPLIBS): Define.
+ (HOST_GMPINC): Define.
+ (TARGET_LIB_PATH): Add libmudflap.
+ (GFORTRAN_FOR_TARGET): Define.
+ (configure-build*): Export GFORTRAN.
+ (configure-gcc): Export GMPLIBS and GMPINC.
+ (all-gcc): Add maybe-all-libbanshee.
+ (configure-target-libgfortran): Define.
+ * Makefile.in: Regenerate.
+ * configure.in (host_libs): Add libbanshee.
+ (target_libraries): Add target-libmudflap and target-libgfortran.
+ Add --with-libbanshee.
+ Handle --disable-libmudflap.
+ (*-*-freebsd*): Use with_gmp.
+ Add $(libgcj) to noconfigdirs.
+ * configure: Regenerate.
+ * depcomp: New file.
+ * MAINTAINERS: Add tree-ssa maintainers.
+
+2004-04-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * config/acx.m4: Fix fastcompare support for new-bootstrap.
+ * configure: Regenerate.
+
+2004-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ Revert:
+ 2004-04-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (flags_to_pass): Remove *dir variables that
+ are passed to the modules via TOPLEVEL_CONFIGURE_ARGUMENTS,
+ as well as prefix and exec_prefix.
+ * Makefile.in: Regenerate.
+
+2004-04-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (host_modules): Mark with the bootstrap
+ flag packages on which gcc depends.
+ * Makefile.tpl (all-bootstrap): Use it.
+ * Makefile.in: Regenerate.
+
+2004-04-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (flags_to_pass): Remove *dir variables that
+ are passed to the modules via TOPLEVEL_CONFIGURE_ARGUMENTS,
+ as well as prefix and exec_prefix.
+ * Makefile.in: Regenerate.
+
+2004-04-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Invoke ACX_PROG_CMP_IGNORE_INITIAL.
+ * configure: Regenerate.
+ * config/acx.m4: Mutuate ACX_PROG_CMP_IGNORE_INITIAL from gcc.
+ * gcc/Makefile.tpl (compare): Use the result of the test.
+ * gcc/Makefile.in: Regenerate.
+
+2004-04-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (all-stage1-gcc, all-stage2-gcc, all-stage3-gcc):
+ Always relocate gcc and prev-gcc to the original names, even
+ if the build fails.
+ (new-cleanstrap, new-restage1, new-restage2, new-restage3):
+ New targets.
+
+2004-04-19 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * configure.in (mips*-*-irix5*): Enable ld.
+ * configure: Regenerate.
+
+2004-04-15 James E Wilson <wilson@specifixinc.com>
- Merge from mainline:
- 2004-04-15 James E Wilson <wilson@specifixinc.com>
* Makefile.tpl (configure-[+module+], configure-gcc,
configure-stage1-gcc, configure-stage2-gcc, configure-stage3-gcc):
Set and export LDFLAGS.
* Makefile.in: Regenerate.
-2004-04-19 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+2004-04-09 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ PR bootstrap/14871
+ * Makefile.tpl: If we don't have built-in-tree target tools,
+ use the ones found by configure rather than hacking around with
+ program_transform_name.
+ * configure.in: Give Makefile.tpl the information necessary
+ to do that.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2004-04-06 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ PR bootstrap/14760
+ * configure.in: When computing baseargs, strip *all* copies of
+ offending options. Also, don't match/substitute the trailing space,
+ so that this actually works when two similar options are separated by
+ only one space.
+ * configure: Regenerate.
+
+2004-04-06 David Edelsohn <edelsohn@gnu.org>
+
+ * configure.in (powerpc-*-aix*): Remove target-libada from noconfigdirs.
+ (rs6000-*-aix*): Same.
+ * configure: Regenerate.
+
+2004-03-25 Stan Shebs <shebs@apple.com>
+
+ Remove MPW support, no longer used.
+ * mpw-README, mpw-build.in, mpw-config.in, mpw-configure,
+ mpw-install: Remove files.
+ * src-release (DEVO_SUPPORT): Remove names of removed files.
+ * MAINTAINERS: Likewise.
+
+2004-03-24 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl (top level bootstrap support): Remove now-unneeded
+ STRICT_WARN, WARN_CFLAGS flags passed down to make.
+ * Makefile.in: Regenerate.
+
+ * configure.in (top level bootstrap support): Rework --enable-werror
+ to set @stage2_werror_flag@.
+ * configure: Regenerate.
+ * Makefile.tpl (top level bootstrap support): Pass
+ @stage2_werror_flag@ down to configure in stages 2 and 3.
+ * Makefile.in: Regenerate.
+
+2004-03-23 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl (new-bootstrap): Set CC and CC_FOR_BUILD in configure
+ for stages 2 and 3 as well as in make. As a consequence, remove
+ OUTPUT_OPTION (now detected by configure) from the flags passed down
+ to make.
+ * Makefile.in: Regenerate.
+
+ * Makefile.tpl (new-bootstrap): Fix typo.
+ * Makefile.in: Regenerate.
+
+2004-03-22 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Rearrange by moving recursive_targets rules
+ into their proper sections.
+ * Makefile.tpl (top level bootstrap support): Move disabling
+ of coverage flags from 'make' to 'configure'; improve comments.
+ * Makefile.in: Regenerate.
+
+ * Makefile.tpl (experimental top level bootstrap) Move stage1
+ language setting from all- target to configure- target; disable
+ intermodule optimization in stage 1; prevent gratuitous rebuilds
+ of stage 1.
+ * Makefile.in: Regenerate.
+ * configure.in: Comma-separate stage 1 language list for top
+ level bootstrap.
+ * configure: Regenerate.
+
+ * Makefile.tpl: Clean up experimental top level bootstrap support:
+ note known problems; set CONFIG_SHELL; don't set BUILD_CC; relocate
+ prev-gcc in configure- targets as well as all- targets.
+ * Makefile.in: Regenerate.
+
+2004-03-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Remove symbolic link section.
+ * configure: Regenerate.
+ * Makefile.tpl (links): Remove.
+ * Makefile.in: Regenerate.
+
+2004-03-15 Paolo Bonzini <bonzini@gnu.org>
+ Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in (DEFAULT_YACC, DEFAULT_M4, DEFAULT_LEX):
+ Set with AC_CHECK_PROGS.
+ * configure.in: Fix comment typo from last patch.
+ * configure: Regenerate.
+
+2004-03-15 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Introduce experimental top level bootstrap support.
+ * Makefile.in: Regenerate.
+ * configure.in: Introduce support for top level bootstrap.
+ * configure: Regenerate.
+
+2004-03-12 Eric Botcazou <ebotcazou@gcc.gnu.org>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/14522
+ * configure.in: Cope with shells that do not support unquoted ^
+ * configure: Regenerate.
+
+2004-03-11 Eric Botcazou <ebotcazou@gcc.gnu.org>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/14522
+ * configure.in: Cope with shell that do not support nesting
+ quotes inside quoted backquote substitutions.
+ * configure: Regenerate.
+
+2004-03-10 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR bootstrap/14522
+ * configure.in: Fix escaping of $.
+ * configure: Regenerate.
+
+2004-03-11 Nathanael Nerode <neroden@gcc.gnu.org>
- * configure.in (mips*-*-irix5*): Enable ld.
* configure: Regenerate.
-2004-04-09 Daniel Jacobowitz <drow@mvista.com>
+2004-03-08 Paolo Bonzini <bonzini@gnu.org>
+
+ PR ada/14131
+ Move language detection to the top level.
+ * configure.in: Find default values for the tools as
+ soon as possible. Disable ada if GNAT is not found.
+ Emit error message about missing languages. Expand
+ --enable-languages=all for the gcc subdirectory.
+
+2004-03-01 Richard Sandiford <rsandifo@redhat.com>
+
+ * configure.in (mips64*-*-linux*): Override mips*-*-linux* case
+ and disable libgcj.
+ * configure: Regenerated.
- Merge from mainline:
- 2004-03-25 Stan Shebs <shebs@apple.com>
- Remove MPW support, no longer used.
- * mpw-README, mpw-build.in, mpw-config.in, mpw-configure,
- mpw-install: Remove files.
- * src-release (DEVO_SUPPORT): Remove names of removed files.
- * MAINTAINERS: Likewise.
+2004-02-28 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ PR bootstrap/7087
+ * Makefile.tpl: Guard XFOO sed statements better.
+ * Makefile.tpl: Add dependency for configure-target-libada.
+ * Makefile.in: Regenerate (incidentally fixes broken
+ commit when libada-branch was merged).
+
+2004-02-28 Andrew Cagney <cagney@redhat.com>
- 2004-02-28 Andrew Cagney <cagney@redhat.com>
* src-release (CVS_NAMES): Define.
(do-tar, do-tar): Prune $(CVS_NAMES).
- 2004-02-23 Andrew Cagney <cagney@redhat.com>
+2004-02-23 Andrew Cagney <cagney@redhat.com>
+
* texinfo/texinfo.tex: Update from version 2003-02-03.16 to
2004-02-19.09.
- 2004-02-19 Andrew Cagney <cagney@redhat.com>
+2004-02-19 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ PR bootstrap/11932
+ * mkinstalldirs, install-sh: Import from automake CVS HEAD.
+
+2004-02-19 Andrew Cagney <cagney@redhat.com>
+
* config.guess: Update from version 2003-06-12 to 2004-02-16.
* config.sub: Update from version 2003-06-13 to 2004-02-16.
@@ -53,7 +1815,7 @@
Nathanael Nerode <neroden@gcc.gnu.org>
PR ada/6637, PR ada/5911
- Merge with libada-branch:
+ Merge with libada-branch:
* configure.in, Makefile.tpl, Makefile.def: Add target-libada,
with appropriate dependencies. Add --enable-libada configure switch.
* configure, Makefile.in: Regenerate.
@@ -66,14 +1828,14 @@
2004-02-02 Jeff Johnston <jjohnstn@redhat.com>
* COPYING.NEWLIB: Update Red Hat license to 2004.
-
+
2004-01-23 DJ Delorie <dj@redhat.com>
* Makefile.def (target_modules) [libiberty]: Don't stage.
* Makefile.in: Rebuilt.
2004-01-23 Jeff Johnston <jjohnstn@redhat.com>
-
+
* COPYING.NEWLIB: Update to include copyrights for new
iconv code.
@@ -125,7 +1887,7 @@
* configure: Regenerated.
2003-12-21 Bernardo Innocenti <bernie@develer.com>
-
+
* configure.in (*-*-uclinux): Exclude newlib, libgloss and rda.
* configure: Regenerated.
@@ -145,7 +1907,7 @@
2003-11-27 Jeff Johnston <jjohnstn@redhat.com>
- * COPYING.NEWLIB: Add license info for long long routines added to
+ * COPYING.NEWLIB: Add license info for long long routines added to
stdlib.
2003-11-14 Arnaud Charlet <charlet@act-europe.fr>
@@ -225,7 +1987,7 @@
2003-09-04 Robert Millan <robertmh@gnu.org>
* configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
-
+
2003-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in: Ensure arguments to sed are properly spaced.
@@ -256,7 +2018,7 @@
* configure.in: When testing with_libs and with_headers, treat
'no' as unset. Based on a patch by Dan Kegel <dank@kegel.com>.
* configure: Regenerate.
-
+
* configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS): Quote properly for
make, shell, etc.
(baseargs): Likewise.
@@ -388,14 +2150,14 @@
* configure.in: Update testsuite_flags to new location.
* configure. Regenerate.
-
+
2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
* Makefile.tpl: Remove BUILD_CC stuff.
* Makefile.in: Regenerate.
2003-06-14 H.J. Lu <hongjiu.lu@intel.com>
-
+
* config.guess: Update to 2003-06-12 version.
* config.sub: Update to 2003-06-13 version.
@@ -404,7 +2166,7 @@
* MAINTAINERS: Add myself as MIPS co-maintainer.
2003-06-12 H.J. Lu <hongjiu.lu@intel.com>
-
+
* config.guess: Update to 2003-06-06 version.
* config.sub: Update to 2003-06-06 version.
@@ -469,10 +2231,10 @@
2003-05-28 Jeff Johnston <jjohnstn@redhat.com>
- * COPYING.NEWLIB: Add license info for newlib/libc/sys/linux/stdlib.
+ * COPYING.NEWLIB: Add license info for newlib/libc/sys/linux/stdlib.
2003-05-21 DJ Delorie <dj@redhat.com>
-
+
* Makefile.tpl (configure-target-libiberty): Depend only on gcc, not
newlib or libgloss.
* Makefile.in: Regenerate.
@@ -490,7 +2252,7 @@
2003-05-19 Nathanael Nerode <neroden@gcc.gnu.org>
* configure.in: Switch more things to use maybe dependencies.
- * Makefile.tpl: Switch more things to use maybe dependencies.
+ * Makefile.tpl: Switch more things to use maybe dependencies.
Factor out common code from autogen IF statements.
* configure: Regenerate.
* Makefile.in: Regenerate.
@@ -536,8 +2298,8 @@
2003-05-02 Chris Demetriou <cgd@broadcom.com>
- * Makefile.tpl: Require "makeinfo" from texinfo 4.2 or later.
- * Makefile.in: Regenerate.
+ * Makefile.tpl: Require "makeinfo" from texinfo 4.2 or later.
+ * Makefile.in: Regenerate.
2003-04-27 Daniel Jacobowitz <drow@mvista.com>
@@ -784,8 +2546,8 @@
2003-01-07 Christopher Faylor <cgf@redhat.com>
- * configure.in: Add AC_PREREQ for consistency.
- * configure: Regenerate.
+ * configure.in: Add AC_PREREQ for consistency.
+ * configure: Regenerate.
2003-01-06 Andrew Cagney <ac131313@redhat.com>
@@ -956,9 +2718,9 @@
2002-12-12 Jeff Johnston <jjohnstn@redhat.com>
- * COPYING.NEWLIB: Update list of alternate Regent of California
- licenses and discuss official revoking of advertising clause.
- * COPYING.LIBGLOSS: Ditto.
+ * COPYING.NEWLIB: Update list of alternate Regent of California
+ licenses and discuss official revoking of advertising clause.
+ * COPYING.LIBGLOSS: Ditto.
2002-12-12 Alexandre Oliva <aoliva@redhat.com>
@@ -3077,7 +4839,7 @@ Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
Bad merge removed these two changes.
Tue Apr 13 22:50:54 1999 Donn Terry (donn@interix.com)
- Martin Heller (Ing.-Buero_Heller@t-online.de)
+ Martin Heller (Ing.-Buero_Heller@t-online.de)
* config.guess (interix Alpha): Add.
@@ -5386,8 +7148,8 @@ Mon Jun 24 15:01:12 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
Sun Jun 23 22:41:54 1996 Geoffrey Noer <noer@cygnus.com>
* configure.in: enable dosrel for cygwin32-hosted builds,
- remove diff from the list of things not buildable
- via Canadian Cross
+ remove diff from the list of things not buildable
+ via Canadian Cross
Sat Jun 22 11:39:01 1996 Jason Merrill <jason@yorick.cygnus.com>
diff --git a/contrib/binutils/MAINTAINERS b/contrib/binutils/MAINTAINERS
index 71942684b284..b2077e7c26a1 100644
--- a/contrib/binutils/MAINTAINERS
+++ b/contrib/binutils/MAINTAINERS
@@ -4,8 +4,12 @@ Please do not make ChangeLog entries.
COPYING, COPYING.LIB, README
http://gnu.org.
-Makefile.in; configure; configure.in; src-release
- Please notify the following of any committed patches.
+Makefile.*; configure; configure.in; src-release
+ Any global maintainer can approve changes to these
+ files, but they should be aware that they need to
+ be kept in sync with their counterparts in the GCC
+ repository. Also please notify the following of
+ any committed patches:
binutils@sources.redhat.com
gdb-patches@sources.redhat.com
@@ -21,8 +25,7 @@ cgen/; cgen parts of opcodes/, sim/ & include/
May need separate opcodes/ or sim/ approval for
commits of regenerated files there.
-config.guess; config.sub; dejagnu/config.guess; dejagnu/config.sub;
-readline/support/config.sub; readline/support/config.guess
+config.guess; config.sub; readline/support/config.{sub,guess}
config: http://savannah.gnu.org/projects/config
Patches to config-patches@gnu.org.
Changes need to be done in tandem with the official CONFIG
@@ -33,18 +36,13 @@ readline/support/config.sub; readline/support/config.guess
binutils@sources.redhat.com
gdb-patches@sources.redhat.com
-dejagnu/
- dejagnu: http://www.gnu.org/software/dejagnu/
- Patches to bug-dejagnu@gnu.org
- Avoid making changes to the local repository; please send
- patches upstream. Important and approved patches can be
- checked into the src repository, otheriwse patches will be
- imported from the next release.
+depcomp
+ Send bug reports and patches to bug-automake@gnu.org.
-gdb/; mmalloc/; readline/; sim/; GDB's part of include/ & dejagnu/
- gdb: http://sources.redhat.com/gdb/
+gdb/; readline/; sim/; GDB's part of include/
+ GDB: http://www.gnu.org/software/gdb/
Patches to gdb-patches@sources.redhat.com.
- See also gdb/MAINTAINERS, sim/MAINTAINERS, mmalloc/MAINTAINERS.
+ See also gdb/MAINTAINERS and sim/MAINTAINERS.
include/
See binutils/, gdb/, sid/, gcc/, libiberty/ etc.
@@ -59,8 +57,8 @@ libiberty/; libiberty's part of include/
Otherwise, changes are automatically merged, usually within
a day.
-ltconfig; ltmain.sh
- libtool: http://gnu.org
+ltconfig; ltmain.sh; ltcf-*.sh
+ libtool: http://www.gnu.org/software/libtool/
Changes need to be done in tandem with the official LIBTOOL
sources or submitted to the master file maintainer and brought
in via a merge.
@@ -80,7 +78,7 @@ newlib/; libgloss/
http://sources.redhat.com/newlib/
Patches to newlib@sources.redhat.com.
-sid/; SID's part of cgen/ & dejagnu/
+sid/; SID's part of cgen/
sid: http://sources.redhat.com/sid/
Patches to sid@sources.redhat.com
@@ -100,10 +98,17 @@ winsup/
General discussion cygwin@sources.redhat.com.
See also winsup/MAINTAINERS.
-expect/; config-ml.in; setup.com; missing; makefile.vms; utils/;
-config/; config.if; makefile.vms; missing; ylwrap; mkdep; etc/;
-install-sh; intl/
- Ask DJ Delorie <dj@redhat.com> after reading the libiberty entry.
+config-ml.in; makefile.vms; mkdep; setup.com;
+etc/; intl/; utils/;
+ Any global maintainer can approve changes to these
+ files and directories.
+
+compile; depcomp; install-sh; missing; ylwrap;
+config/
+ Any global maintainer can approve changes to these
+ files and directories, but they should be aware
+ that they need to be kept in sync with their
+ counterparts in the GCC repository.
modules file
Obviously changes to this file should not go through
diff --git a/contrib/binutils/Makefile.def b/contrib/binutils/Makefile.def
index 5a68098157b2..4c58ab5a71f7 100644
--- a/contrib/binutils/Makefile.def
+++ b/contrib/binutils/Makefile.def
@@ -4,7 +4,7 @@ AutoGen definitions Makefile.tpl;
// Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
// This file was originally written by Nathanael Nerode.
//
-// Copyright 2002, 2003 Free Software Foundation
+// Copyright 2002, 2003, 2004, 2005, 2006 Free Software Foundation
//
// This file is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -18,21 +18,28 @@ AutoGen definitions Makefile.tpl;
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// "missing" indicates that that module doesn't supply
// that recursive target in its Makefile.
build_modules= { module= libiberty; };
+build_modules= { module= bison; };
+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)'; };
host_modules= { module= ash; };
host_modules= { module= autoconf; };
host_modules= { module= automake; };
host_modules= { module= bash; };
-host_modules= { module= bfd; };
-host_modules= { module= opcodes; };
-host_modules= { module= binutils; };
+host_modules= { module= bfd; lib_path=.; bootstrap=true; };
+host_modules= { module= opcodes; lib_path=.; bootstrap=true; };
+host_modules= { module= binutils; bootstrap=true; };
host_modules= { module= bison; no_check_cross= true; };
host_modules= { module= byacc; no_check_cross= true; };
host_modules= { module= bzip2; };
@@ -44,8 +51,17 @@ host_modules= { module= fastjar; no_check_cross= true; };
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; };
host_modules= { module= flex; no_check_cross= true; };
-host_modules= { module= gas; };
+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= gnuserv; };
@@ -53,13 +69,15 @@ host_modules= { module= gprof; };
host_modules= { module= gzip; };
host_modules= { module= hello; };
host_modules= { module= indent; };
-host_modules= { module= intl; };
+host_modules= { module= intl; bootstrap=true; };
host_modules= { module= tcl;
missing=mostlyclean; };
host_modules= { module= itcl; };
-host_modules= { module= ld; };
+host_modules= { module= ld; bootstrap=true; };
+host_modules= { module= libcpp; bootstrap=true; };
+host_modules= { module= libdecnumber; bootstrap=true; };
host_modules= { module= libgui; };
-host_modules= { module= libiberty; };
+host_modules= { module= libiberty; bootstrap=true; };
host_modules= { module= libtool; };
host_modules= { module= m4; };
host_modules= { module= make; };
@@ -83,24 +101,27 @@ host_modules= { module= time; };
host_modules= { module= uudecode; };
host_modules= { module= wdiff; };
host_modules= { module= zip; no_check_cross=true; };
-host_modules= { module= zlib; no_install=true; no_check=true; };
-host_modules= { module= gdb; with_x=true; };
-host_modules= { module= expect; with_x=true; };
-host_modules= { module= guile; with_x=true; };
-host_modules= { module= tk; with_x=true; };
-host_modules= { module= tix; with_x=true; };
+host_modules= { module= zlib; no_install=true; no_check=true; bootstrap=true; };
+host_modules= { module= gdb; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
+host_modules= { module= expect; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
+host_modules= { module= guile; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
+host_modules= { module= tk; extra_make_flags="$(X11_FLAGS_TO_PASS)"; };
host_modules= { module= libtermcap; no_check=true;
missing=mostlyclean;
missing=clean;
missing=distclean;
missing=maintainer-clean; };
host_modules= { module= utils; no_check=true; };
+host_modules= { module= gnattools; };
-target_modules = { module= libstdc++-v3; raw_cxx=true; };
+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= libf2c; };
+target_modules = { module= libgfortran; };
target_modules = { module= libobjc; };
-target_modules = { module= libtermcap; no_check=true; stage=true;
+target_modules = { module= libtermcap; no_check=true;
missing=mostlyclean;
missing=clean;
missing=distclean;
@@ -112,11 +133,12 @@ target_modules = { module= gperf; };
target_modules = { module= examples; no_check=true; no_install=true; };
target_modules = { module= libffi; };
target_modules = { module= libjava; raw_cxx=true; };
-target_modules = { module= zlib; stage=true; };
+target_modules = { module= zlib; };
target_modules = { module= boehm-gc; };
target_modules = { module= qthreads; };
target_modules = { module= rda; };
target_modules = { module= libada; };
+target_modules = { module= libgomp; lib_path=.libs; };
// These are (some of) the make targets to be done in each subdirectory.
// Not all; these are the ones which don't have special options.
@@ -126,11 +148,16 @@ recursive_targets = { make_target= info;
depend=configure; };
recursive_targets = { make_target= dvi;
depend=configure; };
+recursive_targets = { make_target= html;
+ depend=configure; };
recursive_targets = { make_target= TAGS;
depend=configure; };
recursive_targets = { make_target= install-info;
depend=configure;
depend=info; };
+recursive_targets = { make_target= install-html;
+ depend=configure;
+ depend=html; };
recursive_targets = { make_target= installcheck;
depend=configure; };
recursive_targets = { make_target= mostlyclean; };
@@ -148,12 +175,13 @@ flags_to_pass = { flag= bindir ; };
flags_to_pass = { flag= datadir ; };
flags_to_pass = { flag= exec_prefix ; };
flags_to_pass = { flag= includedir ; };
+flags_to_pass = { flag= datarootdir ; };
+flags_to_pass = { flag= docdir ; };
flags_to_pass = { flag= infodir ; };
+flags_to_pass = { flag= htmldir ; };
flags_to_pass = { flag= libdir ; };
flags_to_pass = { flag= libexecdir ; };
flags_to_pass = { flag= lispdir ; };
-flags_to_pass = { flag= libstdcxx_incdir ; };
-flags_to_pass = { flag= libsubdir ; };
flags_to_pass = { flag= localstatedir ; };
flags_to_pass = { flag= mandir ; };
flags_to_pass = { flag= oldincludedir ; };
@@ -163,16 +191,15 @@ flags_to_pass = { flag= sharedstatedir ; };
flags_to_pass = { flag= sysconfdir ; };
flags_to_pass = { flag= tooldir ; };
flags_to_pass = { flag= build_tooldir ; };
-flags_to_pass = { flag= gxx_include_dir ; };
-flags_to_pass = { flag= gcc_version ; };
-flags_to_pass = { flag= gcc_version_trigger ; };
flags_to_pass = { flag= target_alias ; };
// Build tools
flags_to_pass = { flag= BISON ; };
flags_to_pass = { flag= CC_FOR_BUILD ; };
+flags_to_pass = { flag= CFLAGS_FOR_BUILD ; };
flags_to_pass = { flag= CXX_FOR_BUILD ; };
flags_to_pass = { flag= EXPECT ; };
+flags_to_pass = { flag= FLEX ; };
flags_to_pass = { flag= INSTALL ; };
flags_to_pass = { flag= INSTALL_DATA ; };
flags_to_pass = { flag= INSTALL_PROGRAM ; };
@@ -186,25 +213,288 @@ flags_to_pass = { flag= SHELL ; };
flags_to_pass = { flag= YACC ; };
// Host tools
+flags_to_pass = { flag= ADAFLAGS ; optional=true ; };
flags_to_pass = { flag= AR_FLAGS ; };
+flags_to_pass = { flag= BOOT_ADAFLAGS ; optional=true ; };
+flags_to_pass = { flag= BOOT_CFLAGS ; };
+flags_to_pass = { flag= BOOT_LDFLAGS ; };
flags_to_pass = { flag= CFLAGS ; };
flags_to_pass = { flag= CXXFLAGS ; };
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_LANGUAGES ; };
// Target tools
flags_to_pass = { flag= AR_FOR_TARGET ; };
flags_to_pass = { flag= AS_FOR_TARGET ; };
flags_to_pass = { flag= CC_FOR_TARGET ; };
flags_to_pass = { flag= CFLAGS_FOR_TARGET ; };
+flags_to_pass = { flag= CPPFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= CXX_FOR_TARGET ; };
flags_to_pass = { flag= CXXFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= DLLTOOL_FOR_TARGET ; };
flags_to_pass = { flag= GCJ_FOR_TARGET ; };
+flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
flags_to_pass = { flag= LD_FOR_TARGET ; };
+flags_to_pass = { flag= LIPO_FOR_TARGET ; };
+flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= LIBCFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= NM_FOR_TARGET ; };
+flags_to_pass = { flag= OBJDUMP_FOR_TARGET ; };
flags_to_pass = { flag= RANLIB_FOR_TARGET ; };
+flags_to_pass = { flag= STRIP_FOR_TARGET ; };
flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
+
+// Miscellaneous
+flags_to_pass = { flag= LANGUAGES ; optional=true ; };
+flags_to_pass = { flag= LEAN ; };
+
+// Inter-module dependencies
+
+// Build modules
+dependencies = { module=all-build-bison; on=all-build-texinfo; };
+dependencies = { module=all-build-byacc; on=all-build-texinfo; };
+dependencies = { module=all-build-flex; on=all-build-texinfo; };
+dependencies = { module=all-build-flex; on=all-build-bison; };
+dependencies = { module=all-build-flex; on=all-build-byacc; };
+dependencies = { module=all-build-flex; on=all-build-m4; };
+dependencies = { module=all-build-libiberty; on=all-build-texinfo; };
+dependencies = { module=all-build-m4; on=all-build-texinfo; };
+dependencies = { module=all-build-fixincludes; on=all-build-libiberty; };
+
+// Host modules specific to gcc.
+dependencies = { module=configure-gcc; on=configure-intl; };
+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-intl; };
+dependencies = { module=all-gcc; on=all-build-texinfo; };
+dependencies = { module=all-gcc; on=all-build-bison; };
+dependencies = { module=all-gcc; on=all-build-byacc; };
+dependencies = { module=all-gcc; on=all-build-flex; };
+dependencies = { module=all-gcc; on=all-build-libiberty; };
+dependencies = { module=all-gcc; on=all-build-fixincludes; };
+dependencies = { module=all-gcc; on=all-zlib; };
+dependencies = { module=all-gcc; on=all-libcpp; hard=true; };
+dependencies = { module=all-gcc; on=all-libdecnumber; hard=true; };
+dependencies = { module=all-gcc; on=all-libiberty; };
+dependencies = { module=all-gcc; on=all-fixincludes; };
+dependencies = { module=install-gcc ; on=install-fixincludes; };
+
+dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
+dependencies = { module=configure-libcpp; on=configure-intl; };
+dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
+dependencies = { module=all-libcpp; on=all-intl; };
+
+dependencies = { module=all-fixincludes; on=all-libiberty; };
+
+dependencies = { module=all-gnattools; on=all-target-libada; };
+
+// Host modules specific to gdb.
+dependencies = { module=configure-gdb; on=configure-sim; };
+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; };
+dependencies = { module=all-gdb; on=all-sim; };
+
+dependencies = { module=configure-libgui; on=configure-tcl; };
+dependencies = { module=configure-libgui; on=configure-tk; };
+dependencies = { module=all-libgui; on=all-tcl; };
+dependencies = { module=all-libgui; on=all-tk; };
+dependencies = { module=all-libgui; on=all-itcl; };
+
+// Host modules specific to binutils.
+dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
+dependencies = { module=all-bfd; on=all-libiberty; };
+dependencies = { module=all-bfd; on=all-intl; };
+
+dependencies = { module=all-binutils; on=all-libiberty; };
+dependencies = { module=all-binutils; on=all-opcodes; };
+dependencies = { module=all-binutils; on=all-bfd; };
+dependencies = { module=all-binutils; on=all-build-flex; };
+dependencies = { module=all-binutils; on=all-build-bison; };
+dependencies = { module=all-binutils; on=all-build-byacc; };
+dependencies = { module=all-binutils; on=all-intl; };
+
+// We put install-opcodes before install-binutils because the installed
+// binutils might be on PATH, and they might need the shared opcodes
+// library.
+dependencies = { module=install-binutils; on=install-opcodes; };
+
+// libopcodes depends on libbfd
+dependencies = { module=install-opcodes; on=install-bfd; };
+
+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=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=all-ld; on=all-libiberty; };
+dependencies = { module=all-ld; on=all-bfd; };
+dependencies = { module=all-ld; on=all-opcodes; };
+dependencies = { module=all-ld; on=all-build-bison; };
+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=all-opcodes; on=all-bfd; };
+dependencies = { module=all-opcodes; on=all-libiberty; };
+
+// Other host modules in the 'src' repository.
+dependencies = { module=all-dejagnu; on=all-tcl; };
+dependencies = { module=all-dejagnu; on=all-expect; };
+dependencies = { module=all-dejagnu; on=all-tk; };
+dependencies = { module=configure-expect; on=configure-tcl; };
+dependencies = { module=configure-expect; on=configure-tk; };
+dependencies = { module=all-expect; on=all-tcl; };
+dependencies = { module=all-expect; on=all-tk; };
+
+// We put install-tcl before install-itcl because itcl wants to run a
+// program on installation which uses the Tcl libraries.
+dependencies = { module=configure-itcl; on=configure-tcl; };
+dependencies = { module=configure-itcl; on=configure-tk; };
+dependencies = { module=all-itcl; on=all-tcl; };
+dependencies = { module=all-itcl; on=all-tk; };
+dependencies = { module=install-itcl; on=install-tcl; };
+
+dependencies = { module=configure-tk; on=configure-tcl; };
+dependencies = { module=all-tk; on=all-tcl; };
+
+dependencies = { module=all-sid; on=all-libiberty; };
+dependencies = { module=all-sid; on=all-bfd; };
+dependencies = { module=all-sid; on=all-opcodes; };
+dependencies = { module=all-sid; on=all-tcl; };
+dependencies = { module=all-sid; on=all-tk; };
+dependencies = { module=install-sid; on=install-tcl; };
+dependencies = { module=install-sid; on=install-tk; };
+
+dependencies = { module=all-sim; on=all-libiberty; };
+dependencies = { module=all-sim; on=all-bfd; };
+dependencies = { module=all-sim; on=all-opcodes; };
+dependencies = { module=all-sim; on=all-readline; };
+dependencies = { module=all-sim; on=configure-gdb; };
+
+// Other host modules.
+dependencies = { module=all-fastjar; on=all-zlib; };
+dependencies = { module=all-fastjar; on=all-build-texinfo; };
+dependencies = { module=all-fastjar; on=all-libiberty; };
+
+// Warning, these are not well tested.
+dependencies = { module=all-autoconf; on=all-m4; };
+dependencies = { module=all-autoconf; on=all-build-texinfo; };
+dependencies = { module=all-automake; on=all-m4; };
+dependencies = { module=all-automake; on=all-build-texinfo; };
+dependencies = { module=all-automake; on=all-autoconf; };
+dependencies = { module=all-bison; on=all-intl; };
+dependencies = { module=all-bison; on=all-build-texinfo; };
+dependencies = { module=all-diff; on=all-intl; };
+dependencies = { module=all-diff; on=all-build-texinfo; };
+dependencies = { module=all-fileutils; on=all-intl; };
+dependencies = { module=all-fileutils; on=all-build-texinfo; };
+dependencies = { module=all-flex; on=all-build-bison; };
+dependencies = { module=all-flex; on=all-build-byacc; };
+dependencies = { module=all-flex; on=all-intl; };
+dependencies = { module=all-flex; on=all-m4; };
+dependencies = { module=all-flex; on=all-build-texinfo; };
+dependencies = { module=all-gzip; on=all-intl; };
+dependencies = { module=all-gzip; on=all-zlib; };
+dependencies = { module=all-gzip; on=all-build-texinfo; };
+dependencies = { module=all-hello; on=all-intl; };
+dependencies = { module=all-hello; on=all-build-texinfo; };
+dependencies = { module=all-m4; on=all-intl; };
+dependencies = { module=all-m4; on=all-build-texinfo; };
+dependencies = { module=all-make; on=all-intl; };
+dependencies = { module=all-make; on=all-build-texinfo; };
+dependencies = { module=all-patch; on=all-build-texinfo; };
+dependencies = { module=all-make; on=all-build-texinfo; };
+dependencies = { module=all-prms; on=all-libiberty; };
+dependencies = { module=all-recode; on=all-build-texinfo; };
+dependencies = { module=all-sed; on=all-build-texinfo; };
+dependencies = { module=all-send-pr; on=all-prms; };
+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; };
+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; };
+
+dependencies = { module=configure-target-boehm-gc; on=configure-target-qthreads; };
+dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
+dependencies = { module=all-target-fastjar; on=all-target-zlib; };
+dependencies = { module=all-target-fastjar; on=all-target-libiberty; };
+dependencies = { module=configure-target-libjava; on=configure-target-zlib; };
+dependencies = { module=configure-target-libjava; on=configure-target-boehm-gc; };
+dependencies = { module=configure-target-libjava; on=configure-target-qthreads; };
+dependencies = { module=configure-target-libjava; on=configure-target-libffi; };
+dependencies = { module=all-target-libjava; on=all-fastjar; };
+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=all-target-libobjc; on=all-target-libiberty; };
+dependencies = { module=all-target-libstdc++-v3; on=all-target-libiberty; };
+
+// Target modules in the 'src' repository.
+lang_env_dependencies = { module=examples; };
+lang_env_dependencies = { module=libtermcap; };
+lang_env_dependencies = { module=rda; };
+lang_env_dependencies = { module=winsup; };
+lang_env_dependencies = { module=qthreads; };
+
+dependencies = { module=all-target-libgloss; on=configure-target-newlib; };
+dependencies = { module=all-target-winsup; on=all-target-libiberty; };
+dependencies = { module=all-target-winsup; on=all-target-libtermcap; };
+
+// Toplevel bootstrap
+bootstrap_stage = {
+ id=1 ;
+ stage_configure_flags='--disable-intermodule \
+ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ;
+ stage_make_flags='CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)"' ; };
+bootstrap_stage = {
+ id=2 ; prev=1 ;
+ bootstrap_target=bootstrap2 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+ stage_make_flags="" ; };
+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="" ; };
+bootstrap_stage = {
+ id=4 ; prev=3 ; lean=2 ;
+ compare_target=compare3 ;
+ bootstrap_target=bootstrap4 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+ stage_make_flags="" ; };
+bootstrap_stage = {
+ id=profile ; prev=1 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+ stage_make_flags='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"' ; };
diff --git a/contrib/binutils/Makefile.in b/contrib/binutils/Makefile.in
index 2acda0180b89..2d0da2e7c3c5 100644
--- a/contrib/binutils/Makefile.in
+++ b/contrib/binutils/Makefile.in
@@ -3,7 +3,7 @@
#
# Makefile for directory with subdirs to build.
# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003 Free Software Foundation
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# -------------------------------
@@ -50,6 +50,9 @@ libdir = @libdir@
includedir = @includedir@
oldincludedir = @oldincludedir@
infodir = @infodir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+htmldir = @htmldir@
mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
@@ -65,65 +68,158 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
+LN = @LN@
+LN_S = @LN_S@
# -------------------------------------------------
# Miscellaneous non-standard autoconf-set variables
# -------------------------------------------------
-links=@configlinks@
-# The file containing GCC's version number.
-gcc_version_trigger = @gcc_version_trigger@
-gcc_version = @gcc_version@
-
# The gcc driver likes to know the arguments it was configured with.
TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@
-gxx_include_dir = @gxx_include_dir@
-libstdcxx_incdir = @libstdcxx_incdir@
-
tooldir = @tooldir@
build_tooldir = @build_tooldir@
-# Directory in which the compiler finds executables, libraries, etc.
-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)
GDB_NLM_DEPS =
# This is the name of the environment variable used for the path to
# the libraries.
RPATH_ENVVAR = @RPATH_ENVVAR@
-# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
-# was used.
-SET_LIB_PATH = @SET_LIB_PATH@
-
-# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
-# Some platforms don't like blank entries, so we remove duplicate,
-# leading and trailing colons.
-REALLY_SET_LIB_PATH = \
- $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
-
-# This is the list of directories to be built for the build system.
-BUILD_CONFIGDIRS = libiberty
# Build programs are put under this directory.
BUILD_SUBDIR = @build_subdir@
# This is set by the configure script to the arguments to use when configuring
# directories built for the build system.
-BUILD_CONFIGARGS = @build_configargs@
+BUILD_CONFIGARGS = @build_configargs@ --with-build-subdir="$(BUILD_SUBDIR)"
+
+# This is the list of variables to export in the environment when
+# configuring any subdirectory. It must also be exported whenever
+# recursing into a build directory in case that directory's Makefile
+# re-runs configure.
+BASE_EXPORTS = \
+ FLEX="$(FLEX)"; export FLEX; \
+ LEX="$(LEX)"; export LEX; \
+ BISON="$(BISON)"; export BISON; \
+ YACC="$(YACC)"; export YACC; \
+ M4="$(M4)"; export M4; \
+ MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
+
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the build system.
+BUILD_EXPORTS = \
+ $(BASE_EXPORTS) \
+ AR="$(AR_FOR_BUILD)"; export AR; \
+ AS="$(AS_FOR_BUILD)"; export AS; \
+ CC="$(CC_FOR_BUILD)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
+ LD="$(LD_FOR_BUILD)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
+ NM="$(NM_FOR_BUILD)"; export NM; \
+ RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
+ WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES;
# This is the list of directories to built for the host system.
SUBDIRS = @configdirs@
# This is set by the configure script to the arguments to use when configuring
# directories built for the host system.
HOST_CONFIGARGS = @host_configargs@
+# Host programs are put under this directory, which is . except if building
+# with srcdir=..
+HOST_SUBDIR = @host_subdir@
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the host system. We need to pass
+# some to the GCC configure because of its hybrid host/target nature.
+HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
+ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
+ GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \
+ LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \
+ NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
+ OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
+ RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
+ GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
+ GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+@if gcc-bootstrap
+ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
+@endif gcc-bootstrap
+ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
+
+# Similar, for later GCC stages.
+POSTSTAGE1_HOST_EXPORTS = \
+ $(HOST_EXPORTS) \
+ CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
+ -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
+ 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;
-# This is set by the configure script to the list of directories which
-# should be built using the target tools.
-TARGET_CONFIGDIRS = @target_configdirs@
# Target libraries are put under this directory:
TARGET_SUBDIR = @target_subdir@
# This is set by the configure script to the arguments to use when configuring
# directories built for the target.
-TARGET_CONFIGARGS = @target_configargs@
+TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the host system.
+BASE_TARGET_EXPORTS = \
+ $(BASE_EXPORTS) \
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
+ LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
+ LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \
+ NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
+ OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
+ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+ STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
+ WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
+
+RAW_CXX_TARGET_EXPORTS = \
+ $(BASE_TARGET_EXPORTS) \
+ CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
+ CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
+
+NORMAL_TARGET_EXPORTS = \
+ $(BASE_TARGET_EXPORTS) \
+ CXX="$(CXX_FOR_TARGET)"; export CXX;
+
+# Where to find GMP
+HOST_GMPLIBS = @gmplibs@
+HOST_GMPINC = @gmpinc@
# ----------------------------------------------
# Programs producing files for the BUILD machine
@@ -151,42 +247,19 @@ CXX_FOR_BUILD = $(CXX)
BUILD_PREFIX = @BUILD_PREFIX@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
-BISON=@BISON@
-USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
- echo $$r/bison/bison -L $$s/bison/ ; \
- else \
- echo bison ; \
- fi`
-
-DEFAULT_YACC = @DEFAULT_YACC@
-YACC=@YACC@
-USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
- echo $$r/bison/bison -y -L $$s/bison/ ; \
- elif [ -f $$r/byacc/byacc ] ; then \
- echo $$r/byacc/byacc ; \
- else \
- echo ${DEFAULT_YACC} ; \
- fi`
-
-DEFAULT_LEX = @DEFAULT_LEX@
-LEX=@LEX@
-USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
- then echo $$r/flex/flex ; \
- else echo ${DEFAULT_LEX} ; fi`
-
-DEFAULT_M4 = @DEFAULT_M4@
-M4 = `if [ -f $$r/m4/m4 ] ; \
- then echo $$r/m4/m4 ; \
- else echo ${DEFAULT_M4} ; fi`
-
-# For an installed makeinfo, we require it to be from texinfo 4.2 or
-# higher, else we use the "missing" dummy.
-MAKEINFO=@MAKEINFO@
-USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
- then echo $$r/texinfo/makeinfo/makeinfo ; \
- else if (makeinfo --version \
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
- then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
+# Flags to pass to stage2 and later makes. They are defined
+# here so that they can be overridden by Makefile fragments.
+BOOT_CFLAGS= -g -O2
+BOOT_LDFLAGS=
+
+BISON = @BISON@
+YACC = @YACC@
+FLEX = @FLEX@
+LEX = @LEX@
+M4 = @M4@
+MAKEINFO = @MAKEINFO@
+EXPECT = @EXPECT@
+RUNTEST = @RUNTEST@
# This just becomes part of the MAKEINFO definition passed down to
# sub-makes. It lets flags be given on the command line while still
@@ -194,177 +267,74 @@ USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
# (Default to avoid splitting info files by setting the threshold high.)
MAKEINFOFLAGS = --split-size=5000000
-EXPECT = `if [ -f $$r/expect/expect ] ; \
- then echo $$r/expect/expect ; \
- else echo expect ; fi`
-
-RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
- then echo $$s/dejagnu/runtest ; \
- else echo runtest ; fi`
-
# ---------------------------------------------
# Programs producing files for the HOST machine
# ---------------------------------------------
-# This is the list of directories that may be needed in RPATH_ENVVAR
-# so that programs built for the host machine work.
-HOST_LIB_PATH = $$r/bfd:$$r/opcodes
-
AS = @AS@
-
AR = @AR@
AR_FLAGS = rc
-
CC = @CC@
-CFLAGS = @CFLAGS@
-LIBCFLAGS = $(CFLAGS)
-
CXX = @CXX@
-CXXFLAGS = @CXXFLAGS@
-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
-
DLLTOOL = @DLLTOOL@
-
-NM = @NM@
-
LD = @LD@
-LDFLAGS =
-
+LIPO = @LIPO@
+NM = @NM@
+OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
-
+STRIP = @STRIP@
WINDRES = @WINDRES@
+CFLAGS = @CFLAGS@
+LDFLAGS =
+LIBCFLAGS = $(CFLAGS)
+CXXFLAGS = @CXXFLAGS@
+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
PICFLAG =
# -----------------------------------------------
# Programs producing files for the TARGET machine
# -----------------------------------------------
-# This is the list of directories that may be needed in RPATH_ENVVAR
-# so that prorgams built for the target machine work.
-TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
-
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
AR_FOR_TARGET=@AR_FOR_TARGET@
-USUAL_AR_FOR_TARGET = ` \
- if [ -f $$r/binutils/ar ] ; then \
- echo $$r/binutils/ar ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(AR); \
- else \
- echo ar | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
AS_FOR_TARGET=@AS_FOR_TARGET@
-USUAL_AS_FOR_TARGET = ` \
- if [ -f $$r/gas/as-new ] ; then \
- echo $$r/gas/as-new ; \
- elif [ -f $$r/gcc/xgcc ]; then \
- $(CC_FOR_TARGET) -print-prog-name=as ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(AS); \
- else \
- echo as | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
-CC_FOR_TARGET = @CC_FOR_TARGET@
-# During gcc bootstrap, if we use some random cc for stage1 then
-# CFLAGS will be just -g. We want to ensure that TARGET libraries
-# (which we know are built with gcc) are built with optimizations so
-# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
+CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+
# If GCC_FOR_TARGET is not overriden on the command line, then this
# variable is passed down to the gcc Makefile, where it is used to
# build libgcc2.a. We define it here so that it can itself be
# overridden on the command line.
-GCC_FOR_TARGET=@GCC_FOR_TARGET@
-USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
-LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
-
-CXX_FOR_TARGET = @CXX_FOR_TARGET@
-RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
-CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
-RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
-LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
-
+GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
-USUAL_DLLTOOL_FOR_TARGET = ` \
- if [ -f $$r/binutils/dlltool ] ; then \
- echo $$r/binutils/dlltool ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(DLLTOOL); \
- else \
- echo dlltool | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
-GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
-
LD_FOR_TARGET=@LD_FOR_TARGET@
-USUAL_LD_FOR_TARGET = ` \
- if [ -f $$r/ld/ld-new ] ; then \
- echo $$r/ld/ld-new ; \
- elif [ -f $$r/gcc/xgcc ]; then \
- $(CC_FOR_TARGET) -print-prog-name=ld ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(LD); \
- else \
- echo ld | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
-LDFLAGS_FOR_TARGET =
+LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
NM_FOR_TARGET=@NM_FOR_TARGET@
-USUAL_NM_FOR_TARGET = ` \
- if [ -f $$r/binutils/nm-new ] ; then \
- echo $$r/binutils/nm-new ; \
- elif [ -f $$r/gcc/xgcc ]; then \
- $(CC_FOR_TARGET) -print-prog-name=nm ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(NM); \
- else \
- echo nm | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
+OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
-USUAL_RANLIB_FOR_TARGET = ` \
- if [ -f $$r/binutils/ranlib ] ; then \
- echo $$r/binutils/ranlib ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- if [ x'$(RANLIB)' != x ]; then \
- echo $(RANLIB); \
- else \
- echo ranlib; \
- fi; \
- else \
- echo ranlib | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
+STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
-USUAL_WINDRES_FOR_TARGET = ` \
- if [ -f $$r/binutils/windres ] ; then \
- echo $$r/binutils/windres ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(WINDRES); \
- else \
- echo windres | sed '$(program_transform_name)' ; \
- fi; \
- fi`
+COMPILER_AS_FOR_TARGET=@COMPILER_AS_FOR_TARGET@
+COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
+COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
+
+# During gcc bootstrap, if we use some random cc for stage1 then
+# CFLAGS will be just -g. We want to ensure that TARGET libraries
+# (which we know are built with gcc) are built with optimizations so
+# prepend -O2 when setting CFLAGS_FOR_TARGET.
+CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
+CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+LDFLAGS_FOR_TARGET =
PICFLAG_FOR_TARGET =
# ------------------------------------
@@ -373,8 +343,7 @@ PICFLAG_FOR_TARGET =
# The first rule in the file had better be this one. Don't put any above it.
# This lives here to allow makefile fragments to contain dependencies.
-all: all.normal
-.PHONY: all
+all:
#### host and target specific makefile fragments come in here.
@target_makefile_frag@
@@ -383,6 +352,53 @@ all: all.normal
@host_makefile_frag@
###
+# 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)
+
+@if target-libstdc++-v3
+TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/.libs:
+@endif target-libstdc++-v3
+
+@if target-libmudflap
+TARGET_LIB_PATH_libmudflap = $$r/$(TARGET_SUBDIR)/libmudflap/.libs:
+@endif target-libmudflap
+
+@if target-libssp
+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
+
+
+
+# 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)
+
+# Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
+@if gcc
+HOST_LIB_PATH_gcc = $$r/$(HOST_SUBDIR)/gcc:$$r/$(HOST_SUBDIR)/prev-gcc:
+@endif gcc
+
+
+@if bfd
+HOST_LIB_PATH_bfd = \
+ $$r/$(HOST_SUBDIR)/bfd/.:$$r/$(HOST_SUBDIR)/prev-bfd/.:
+@endif bfd
+
+@if opcodes
+HOST_LIB_PATH_opcodes = \
+ $$r/$(HOST_SUBDIR)/opcodes/.:$$r/$(HOST_SUBDIR)/prev-opcodes/.:
+@endif opcodes
+
+
# Flags to pass down to all sub-makes.
BASE_FLAGS_TO_PASS = \
"DESTDIR=$(DESTDIR)" \
@@ -392,12 +408,13 @@ BASE_FLAGS_TO_PASS = \
"datadir=$(datadir)" \
"exec_prefix=$(exec_prefix)" \
"includedir=$(includedir)" \
+ "datarootdir=$(datarootdir)" \
+ "docdir=$(docdir)" \
"infodir=$(infodir)" \
+ "htmldir=$(htmldir)" \
"libdir=$(libdir)" \
"libexecdir=$(libexecdir)" \
"lispdir=$(lispdir)" \
- "libstdcxx_incdir=$(libstdcxx_incdir)" \
- "libsubdir=$(libsubdir)" \
"localstatedir=$(localstatedir)" \
"mandir=$(mandir)" \
"oldincludedir=$(oldincludedir)" \
@@ -407,14 +424,13 @@ BASE_FLAGS_TO_PASS = \
"sysconfdir=$(sysconfdir)" \
"tooldir=$(tooldir)" \
"build_tooldir=$(build_tooldir)" \
- "gxx_include_dir=$(gxx_include_dir)" \
- "gcc_version=$(gcc_version)" \
- "gcc_version_trigger=$(gcc_version_trigger)" \
"target_alias=$(target_alias)" \
"BISON=$(BISON)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
"EXPECT=$(EXPECT)" \
+ "FLEX=$(FLEX)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
@@ -426,37 +442,45 @@ BASE_FLAGS_TO_PASS = \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"SHELL=$(SHELL)" \
"YACC=$(YACC)" \
+ "`echo 'ADAFLAGS=$(ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
"AR_FLAGS=$(AR_FLAGS)" \
+ "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "BOOT_CFLAGS=$(BOOT_CFLAGS)" \
+ "BOOT_LDFLAGS=$(BOOT_LDFLAGS)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCXXFLAGS=$(LIBCXXFLAGS)" \
+ "STAGE1_CFLAGS=$(STAGE1_CFLAGS)" \
+ "STAGE1_LANGUAGES=$(STAGE1_LANGUAGES)" \
"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+ "CPPFLAGS_FOR_TARGET=$(CPPFLAGS_FOR_TARGET)" \
"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
"GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
+ "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
+ "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
+ "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
+ "OBJDUMP_FOR_TARGET=$(OBJDUMP_FOR_TARGET)" \
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
+ "STRIP_FOR_TARGET=$(STRIP_FOR_TARGET)" \
"WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
+ "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "LEAN=$(LEAN)" \
"CONFIG_SHELL=$(SHELL)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
-# For any flags above that may contain shell code that varies from one
-# target library to another. When doing recursive invocations of the
-# top-level Makefile, we don't want the outer make to evaluate them,
-# so we pass these variables down unchanged. They must not contain
-# single nor double quotes.
-RECURSE_FLAGS = \
- CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
- RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
+# We leave this in just in case, but it is not needed anymore.
+RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
@@ -467,8 +491,11 @@ EXTRA_HOST_FLAGS = \
'CXX=$(CXX)' \
'DLLTOOL=$(DLLTOOL)' \
'LD=$(LD)' \
+ 'LIPO=$(LIPO)' \
'NM=$(NM)' \
+ 'OBJDUMP=$(OBJDUMP)' \
'RANLIB=$(RANLIB)' \
+ 'STRIP=$(STRIP)' \
'WINDRES=$(WINDRES)'
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
@@ -486,20 +513,23 @@ X11_FLAGS_TO_PASS = \
'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
# Flags to pass down to makes which are built with the target environment.
-# The double $ decreases the length of the command line; the variables
-# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
+# 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
+# COMPILER_ prefixed variables are not passed down so we expand them here.
EXTRA_TARGET_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
- 'AS=$$(AS_FOR_TARGET)' \
+ 'AS=$(COMPILER_AS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET)' \
'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
'CXX=$$(CXX_FOR_TARGET)' \
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
- 'LD=$$(LD_FOR_TARGET)' \
+ 'LD=$(COMPILER_LD_FOR_TARGET)' \
+ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
- 'NM=$$(NM_FOR_TARGET)' \
+ 'NM=$(COMPILER_NM_FOR_TARGET)' \
+ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)'
@@ -512,24 +542,17 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# The BUILD_* variables are a special case, which are used for the gcc
# cross-building scheme.
EXTRA_GCC_FLAGS = \
- 'BUILD_PREFIX=$(BUILD_PREFIX)' \
- 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s/.*=$$/XFOO=/`"
+ "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
.PHONY: configure-host
-configure-host: maybe-configure-gcc \
+configure-host: \
maybe-configure-ash \
maybe-configure-autoconf \
maybe-configure-automake \
@@ -548,8 +571,10 @@ configure-host: maybe-configure-gcc \
maybe-configure-fileutils \
maybe-configure-findutils \
maybe-configure-find \
+ maybe-configure-fixincludes \
maybe-configure-flex \
maybe-configure-gas \
+ maybe-configure-gcc \
maybe-configure-gawk \
maybe-configure-gettext \
maybe-configure-gnuserv \
@@ -561,6 +586,8 @@ configure-host: maybe-configure-gcc \
maybe-configure-tcl \
maybe-configure-itcl \
maybe-configure-ld \
+ maybe-configure-libcpp \
+ maybe-configure-libdecnumber \
maybe-configure-libgui \
maybe-configure-libiberty \
maybe-configure-libtool \
@@ -591,14 +618,17 @@ configure-host: maybe-configure-gcc \
maybe-configure-expect \
maybe-configure-guile \
maybe-configure-tk \
- maybe-configure-tix \
maybe-configure-libtermcap \
- maybe-configure-utils
+ maybe-configure-utils \
+ maybe-configure-gnattools
.PHONY: configure-target
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-libf2c \
+ maybe-configure-target-libgfortran \
maybe-configure-target-libobjc \
maybe-configure-target-libtermcap \
maybe-configure-target-winsup \
@@ -612,97 +642,153 @@ configure-target: \
maybe-configure-target-boehm-gc \
maybe-configure-target-qthreads \
maybe-configure-target-rda \
- maybe-configure-target-libada
+ maybe-configure-target-libada \
+ maybe-configure-target-libgomp
+
+# The target built for a native non-bootstrap build.
+.PHONY: all
+all:
+@if gcc-bootstrap
+ [ -f stage_final ] || echo stage3 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) `cat stage_final`-bubble
+@endif gcc-bootstrap
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if [ -f stage_last ]; then \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \
+ else \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \
+ fi
-# The target built for a native build.
-.PHONY: all.normal
-all.normal: @all_build_modules@ all-host all-target
+.PHONY: all-build
+
+all-build: maybe-all-build-libiberty
+all-build: maybe-all-build-bison
+all-build: maybe-all-build-byacc
+all-build: maybe-all-build-flex
+all-build: maybe-all-build-m4
+all-build: maybe-all-build-texinfo
+all-build: maybe-all-build-fixincludes
.PHONY: all-host
-all-host: maybe-all-gcc \
- maybe-all-ash \
- maybe-all-autoconf \
- maybe-all-automake \
- maybe-all-bash \
- maybe-all-bfd \
- maybe-all-opcodes \
- maybe-all-binutils \
- maybe-all-bison \
- maybe-all-byacc \
- maybe-all-bzip2 \
- maybe-all-dejagnu \
- maybe-all-diff \
- maybe-all-dosutils \
- maybe-all-etc \
- maybe-all-fastjar \
- maybe-all-fileutils \
- maybe-all-findutils \
- maybe-all-find \
- maybe-all-flex \
- maybe-all-gas \
- maybe-all-gawk \
- maybe-all-gettext \
- maybe-all-gnuserv \
- maybe-all-gprof \
- maybe-all-gzip \
- maybe-all-hello \
- maybe-all-indent \
- maybe-all-intl \
- maybe-all-tcl \
- maybe-all-itcl \
- maybe-all-ld \
- maybe-all-libgui \
- maybe-all-libiberty \
- maybe-all-libtool \
- maybe-all-m4 \
- maybe-all-make \
- maybe-all-mmalloc \
- maybe-all-patch \
- maybe-all-perl \
- maybe-all-prms \
- maybe-all-rcs \
- maybe-all-readline \
- maybe-all-release \
- maybe-all-recode \
- maybe-all-sed \
- maybe-all-send-pr \
- maybe-all-shellutils \
- maybe-all-sid \
- maybe-all-sim \
- maybe-all-tar \
- maybe-all-texinfo \
- maybe-all-textutils \
- maybe-all-time \
- maybe-all-uudecode \
- maybe-all-wdiff \
- maybe-all-zip \
- maybe-all-zlib \
- maybe-all-gdb \
- maybe-all-expect \
- maybe-all-guile \
- maybe-all-tk \
- maybe-all-tix \
- maybe-all-libtermcap \
- maybe-all-utils
+
+all-host: maybe-all-ash
+all-host: maybe-all-autoconf
+all-host: maybe-all-automake
+all-host: maybe-all-bash
+@if bfd-no-bootstrap
+all-host: maybe-all-bfd
+@endif bfd-no-bootstrap
+@if opcodes-no-bootstrap
+all-host: maybe-all-opcodes
+@endif opcodes-no-bootstrap
+@if binutils-no-bootstrap
+all-host: maybe-all-binutils
+@endif binutils-no-bootstrap
+all-host: maybe-all-bison
+all-host: maybe-all-byacc
+all-host: maybe-all-bzip2
+all-host: maybe-all-dejagnu
+all-host: maybe-all-diff
+all-host: maybe-all-dosutils
+all-host: maybe-all-etc
+all-host: maybe-all-fastjar
+all-host: maybe-all-fileutils
+all-host: maybe-all-findutils
+all-host: maybe-all-find
+all-host: maybe-all-fixincludes
+all-host: maybe-all-flex
+@if gas-no-bootstrap
+all-host: maybe-all-gas
+@endif gas-no-bootstrap
+@if gcc-no-bootstrap
+all-host: maybe-all-gcc
+@endif gcc-no-bootstrap
+all-host: maybe-all-gawk
+all-host: maybe-all-gettext
+all-host: maybe-all-gnuserv
+all-host: maybe-all-gprof
+all-host: maybe-all-gzip
+all-host: maybe-all-hello
+all-host: maybe-all-indent
+@if intl-no-bootstrap
+all-host: maybe-all-intl
+@endif intl-no-bootstrap
+all-host: maybe-all-tcl
+all-host: maybe-all-itcl
+@if ld-no-bootstrap
+all-host: maybe-all-ld
+@endif ld-no-bootstrap
+@if libcpp-no-bootstrap
+all-host: maybe-all-libcpp
+@endif libcpp-no-bootstrap
+@if libdecnumber-no-bootstrap
+all-host: maybe-all-libdecnumber
+@endif libdecnumber-no-bootstrap
+all-host: maybe-all-libgui
+@if libiberty-no-bootstrap
+all-host: maybe-all-libiberty
+@endif libiberty-no-bootstrap
+all-host: maybe-all-libtool
+all-host: maybe-all-m4
+all-host: maybe-all-make
+all-host: maybe-all-mmalloc
+all-host: maybe-all-patch
+all-host: maybe-all-perl
+all-host: maybe-all-prms
+all-host: maybe-all-rcs
+all-host: maybe-all-readline
+all-host: maybe-all-release
+all-host: maybe-all-recode
+all-host: maybe-all-sed
+all-host: maybe-all-send-pr
+all-host: maybe-all-shellutils
+all-host: maybe-all-sid
+all-host: maybe-all-sim
+all-host: maybe-all-tar
+all-host: maybe-all-texinfo
+all-host: maybe-all-textutils
+all-host: maybe-all-time
+all-host: maybe-all-uudecode
+all-host: maybe-all-wdiff
+all-host: maybe-all-zip
+@if zlib-no-bootstrap
+all-host: maybe-all-zlib
+@endif zlib-no-bootstrap
+all-host: maybe-all-gdb
+all-host: maybe-all-expect
+all-host: maybe-all-guile
+all-host: maybe-all-tk
+all-host: maybe-all-libtermcap
+all-host: maybe-all-utils
+all-host: maybe-all-gnattools
+
.PHONY: all-target
-all-target: \
- maybe-all-target-libstdc++-v3 \
- maybe-all-target-newlib \
- maybe-all-target-libf2c \
- maybe-all-target-libobjc \
- maybe-all-target-libtermcap \
- maybe-all-target-winsup \
- maybe-all-target-libgloss \
- maybe-all-target-libiberty \
- maybe-all-target-gperf \
- maybe-all-target-examples \
- maybe-all-target-libffi \
- maybe-all-target-libjava \
- maybe-all-target-zlib \
- maybe-all-target-boehm-gc \
- maybe-all-target-qthreads \
- maybe-all-target-rda \
- maybe-all-target-libada
+
+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
+all-target: maybe-all-target-libgfortran
+all-target: maybe-all-target-libobjc
+all-target: maybe-all-target-libtermcap
+all-target: maybe-all-target-winsup
+all-target: maybe-all-target-libgloss
+all-target: maybe-all-target-libiberty
+all-target: maybe-all-target-gperf
+all-target: maybe-all-target-examples
+all-target: maybe-all-target-libffi
+all-target: maybe-all-target-libjava
+all-target: maybe-all-target-zlib
+all-target: maybe-all-target-boehm-gc
+all-target: maybe-all-target-qthreads
+all-target: maybe-all-target-rda
+all-target: maybe-all-target-libada
+all-target: maybe-all-target-libgomp
# 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
@@ -710,109 +796,2009 @@ all-target: \
# but it may do additional work as well).
.PHONY: do-info
-do-info: info-host info-target
+do-info:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) info-host \
+ info-target
+
.PHONY: info-host
-info-host: maybe-info-gcc \
- maybe-info-ash \
- maybe-info-autoconf \
- maybe-info-automake \
- maybe-info-bash \
- maybe-info-bfd \
- maybe-info-opcodes \
- maybe-info-binutils \
- maybe-info-bison \
- maybe-info-byacc \
- maybe-info-bzip2 \
- maybe-info-dejagnu \
- maybe-info-diff \
- maybe-info-dosutils \
- maybe-info-etc \
- maybe-info-fastjar \
- maybe-info-fileutils \
- maybe-info-findutils \
- maybe-info-find \
- maybe-info-flex \
- maybe-info-gas \
- maybe-info-gawk \
- maybe-info-gettext \
- maybe-info-gnuserv \
- maybe-info-gprof \
- maybe-info-gzip \
- maybe-info-hello \
- maybe-info-indent \
- maybe-info-intl \
- maybe-info-tcl \
- maybe-info-itcl \
- maybe-info-ld \
- maybe-info-libgui \
- maybe-info-libiberty \
- maybe-info-libtool \
- maybe-info-m4 \
- maybe-info-make \
- maybe-info-mmalloc \
- maybe-info-patch \
- maybe-info-perl \
- maybe-info-prms \
- maybe-info-rcs \
- maybe-info-readline \
- maybe-info-release \
- maybe-info-recode \
- maybe-info-sed \
- maybe-info-send-pr \
- maybe-info-shellutils \
- maybe-info-sid \
- maybe-info-sim \
- maybe-info-tar \
- maybe-info-texinfo \
- maybe-info-textutils \
- maybe-info-time \
- maybe-info-uudecode \
- maybe-info-wdiff \
- maybe-info-zip \
- maybe-info-zlib \
- maybe-info-gdb \
- maybe-info-expect \
- maybe-info-guile \
- maybe-info-tk \
- maybe-info-tix \
- maybe-info-libtermcap \
- maybe-info-utils
+
+info-host: maybe-info-ash
+info-host: maybe-info-autoconf
+info-host: maybe-info-automake
+info-host: maybe-info-bash
+info-host: maybe-info-bfd
+info-host: maybe-info-opcodes
+info-host: maybe-info-binutils
+info-host: maybe-info-bison
+info-host: maybe-info-byacc
+info-host: maybe-info-bzip2
+info-host: maybe-info-dejagnu
+info-host: maybe-info-diff
+info-host: maybe-info-dosutils
+info-host: maybe-info-etc
+info-host: maybe-info-fastjar
+info-host: maybe-info-fileutils
+info-host: maybe-info-findutils
+info-host: maybe-info-find
+info-host: maybe-info-fixincludes
+info-host: maybe-info-flex
+info-host: maybe-info-gas
+info-host: maybe-info-gcc
+info-host: maybe-info-gawk
+info-host: maybe-info-gettext
+info-host: maybe-info-gnuserv
+info-host: maybe-info-gprof
+info-host: maybe-info-gzip
+info-host: maybe-info-hello
+info-host: maybe-info-indent
+info-host: maybe-info-intl
+info-host: maybe-info-tcl
+info-host: maybe-info-itcl
+info-host: maybe-info-ld
+info-host: maybe-info-libcpp
+info-host: maybe-info-libdecnumber
+info-host: maybe-info-libgui
+info-host: maybe-info-libiberty
+info-host: maybe-info-libtool
+info-host: maybe-info-m4
+info-host: maybe-info-make
+info-host: maybe-info-mmalloc
+info-host: maybe-info-patch
+info-host: maybe-info-perl
+info-host: maybe-info-prms
+info-host: maybe-info-rcs
+info-host: maybe-info-readline
+info-host: maybe-info-release
+info-host: maybe-info-recode
+info-host: maybe-info-sed
+info-host: maybe-info-send-pr
+info-host: maybe-info-shellutils
+info-host: maybe-info-sid
+info-host: maybe-info-sim
+info-host: maybe-info-tar
+info-host: maybe-info-texinfo
+info-host: maybe-info-textutils
+info-host: maybe-info-time
+info-host: maybe-info-uudecode
+info-host: maybe-info-wdiff
+info-host: maybe-info-zip
+info-host: maybe-info-zlib
+info-host: maybe-info-gdb
+info-host: maybe-info-expect
+info-host: maybe-info-guile
+info-host: maybe-info-tk
+info-host: maybe-info-libtermcap
+info-host: maybe-info-utils
+info-host: maybe-info-gnattools
.PHONY: info-target
-info-target: \
- maybe-info-target-libstdc++-v3 \
- maybe-info-target-newlib \
- maybe-info-target-libf2c \
- maybe-info-target-libobjc \
- maybe-info-target-libtermcap \
- maybe-info-target-winsup \
- maybe-info-target-libgloss \
- maybe-info-target-libiberty \
- maybe-info-target-gperf \
- maybe-info-target-examples \
- maybe-info-target-libffi \
- maybe-info-target-libjava \
- maybe-info-target-zlib \
- maybe-info-target-boehm-gc \
- maybe-info-target-qthreads \
- maybe-info-target-rda \
- maybe-info-target-libada
-
-# GCC, the eternal special case
-.PHONY: maybe-info-gcc info-gcc
-maybe-info-gcc:
-info-gcc: \
- configure-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
+
+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-libgfortran
+info-target: maybe-info-target-libobjc
+info-target: maybe-info-target-libtermcap
+info-target: maybe-info-target-winsup
+info-target: maybe-info-target-libgloss
+info-target: maybe-info-target-libiberty
+info-target: maybe-info-target-gperf
+info-target: maybe-info-target-examples
+info-target: maybe-info-target-libffi
+info-target: maybe-info-target-libjava
+info-target: maybe-info-target-zlib
+info-target: maybe-info-target-boehm-gc
+info-target: maybe-info-target-qthreads
+info-target: maybe-info-target-rda
+info-target: maybe-info-target-libada
+info-target: maybe-info-target-libgomp
+
+.PHONY: do-dvi
+do-dvi:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) dvi-host \
+ dvi-target
+
+
+.PHONY: dvi-host
+
+dvi-host: maybe-dvi-ash
+dvi-host: maybe-dvi-autoconf
+dvi-host: maybe-dvi-automake
+dvi-host: maybe-dvi-bash
+dvi-host: maybe-dvi-bfd
+dvi-host: maybe-dvi-opcodes
+dvi-host: maybe-dvi-binutils
+dvi-host: maybe-dvi-bison
+dvi-host: maybe-dvi-byacc
+dvi-host: maybe-dvi-bzip2
+dvi-host: maybe-dvi-dejagnu
+dvi-host: maybe-dvi-diff
+dvi-host: maybe-dvi-dosutils
+dvi-host: maybe-dvi-etc
+dvi-host: maybe-dvi-fastjar
+dvi-host: maybe-dvi-fileutils
+dvi-host: maybe-dvi-findutils
+dvi-host: maybe-dvi-find
+dvi-host: maybe-dvi-fixincludes
+dvi-host: maybe-dvi-flex
+dvi-host: maybe-dvi-gas
+dvi-host: maybe-dvi-gcc
+dvi-host: maybe-dvi-gawk
+dvi-host: maybe-dvi-gettext
+dvi-host: maybe-dvi-gnuserv
+dvi-host: maybe-dvi-gprof
+dvi-host: maybe-dvi-gzip
+dvi-host: maybe-dvi-hello
+dvi-host: maybe-dvi-indent
+dvi-host: maybe-dvi-intl
+dvi-host: maybe-dvi-tcl
+dvi-host: maybe-dvi-itcl
+dvi-host: maybe-dvi-ld
+dvi-host: maybe-dvi-libcpp
+dvi-host: maybe-dvi-libdecnumber
+dvi-host: maybe-dvi-libgui
+dvi-host: maybe-dvi-libiberty
+dvi-host: maybe-dvi-libtool
+dvi-host: maybe-dvi-m4
+dvi-host: maybe-dvi-make
+dvi-host: maybe-dvi-mmalloc
+dvi-host: maybe-dvi-patch
+dvi-host: maybe-dvi-perl
+dvi-host: maybe-dvi-prms
+dvi-host: maybe-dvi-rcs
+dvi-host: maybe-dvi-readline
+dvi-host: maybe-dvi-release
+dvi-host: maybe-dvi-recode
+dvi-host: maybe-dvi-sed
+dvi-host: maybe-dvi-send-pr
+dvi-host: maybe-dvi-shellutils
+dvi-host: maybe-dvi-sid
+dvi-host: maybe-dvi-sim
+dvi-host: maybe-dvi-tar
+dvi-host: maybe-dvi-texinfo
+dvi-host: maybe-dvi-textutils
+dvi-host: maybe-dvi-time
+dvi-host: maybe-dvi-uudecode
+dvi-host: maybe-dvi-wdiff
+dvi-host: maybe-dvi-zip
+dvi-host: maybe-dvi-zlib
+dvi-host: maybe-dvi-gdb
+dvi-host: maybe-dvi-expect
+dvi-host: maybe-dvi-guile
+dvi-host: maybe-dvi-tk
+dvi-host: maybe-dvi-libtermcap
+dvi-host: maybe-dvi-utils
+dvi-host: maybe-dvi-gnattools
+
+.PHONY: dvi-target
+
+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-libgfortran
+dvi-target: maybe-dvi-target-libobjc
+dvi-target: maybe-dvi-target-libtermcap
+dvi-target: maybe-dvi-target-winsup
+dvi-target: maybe-dvi-target-libgloss
+dvi-target: maybe-dvi-target-libiberty
+dvi-target: maybe-dvi-target-gperf
+dvi-target: maybe-dvi-target-examples
+dvi-target: maybe-dvi-target-libffi
+dvi-target: maybe-dvi-target-libjava
+dvi-target: maybe-dvi-target-zlib
+dvi-target: maybe-dvi-target-boehm-gc
+dvi-target: maybe-dvi-target-qthreads
+dvi-target: maybe-dvi-target-rda
+dvi-target: maybe-dvi-target-libada
+dvi-target: maybe-dvi-target-libgomp
+
+.PHONY: do-html
+do-html:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) html-host \
+ html-target
+
+
+.PHONY: html-host
+
+html-host: maybe-html-ash
+html-host: maybe-html-autoconf
+html-host: maybe-html-automake
+html-host: maybe-html-bash
+html-host: maybe-html-bfd
+html-host: maybe-html-opcodes
+html-host: maybe-html-binutils
+html-host: maybe-html-bison
+html-host: maybe-html-byacc
+html-host: maybe-html-bzip2
+html-host: maybe-html-dejagnu
+html-host: maybe-html-diff
+html-host: maybe-html-dosutils
+html-host: maybe-html-etc
+html-host: maybe-html-fastjar
+html-host: maybe-html-fileutils
+html-host: maybe-html-findutils
+html-host: maybe-html-find
+html-host: maybe-html-fixincludes
+html-host: maybe-html-flex
+html-host: maybe-html-gas
+html-host: maybe-html-gcc
+html-host: maybe-html-gawk
+html-host: maybe-html-gettext
+html-host: maybe-html-gnuserv
+html-host: maybe-html-gprof
+html-host: maybe-html-gzip
+html-host: maybe-html-hello
+html-host: maybe-html-indent
+html-host: maybe-html-intl
+html-host: maybe-html-tcl
+html-host: maybe-html-itcl
+html-host: maybe-html-ld
+html-host: maybe-html-libcpp
+html-host: maybe-html-libdecnumber
+html-host: maybe-html-libgui
+html-host: maybe-html-libiberty
+html-host: maybe-html-libtool
+html-host: maybe-html-m4
+html-host: maybe-html-make
+html-host: maybe-html-mmalloc
+html-host: maybe-html-patch
+html-host: maybe-html-perl
+html-host: maybe-html-prms
+html-host: maybe-html-rcs
+html-host: maybe-html-readline
+html-host: maybe-html-release
+html-host: maybe-html-recode
+html-host: maybe-html-sed
+html-host: maybe-html-send-pr
+html-host: maybe-html-shellutils
+html-host: maybe-html-sid
+html-host: maybe-html-sim
+html-host: maybe-html-tar
+html-host: maybe-html-texinfo
+html-host: maybe-html-textutils
+html-host: maybe-html-time
+html-host: maybe-html-uudecode
+html-host: maybe-html-wdiff
+html-host: maybe-html-zip
+html-host: maybe-html-zlib
+html-host: maybe-html-gdb
+html-host: maybe-html-expect
+html-host: maybe-html-guile
+html-host: maybe-html-tk
+html-host: maybe-html-libtermcap
+html-host: maybe-html-utils
+html-host: maybe-html-gnattools
+
+.PHONY: html-target
+
+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-libgfortran
+html-target: maybe-html-target-libobjc
+html-target: maybe-html-target-libtermcap
+html-target: maybe-html-target-winsup
+html-target: maybe-html-target-libgloss
+html-target: maybe-html-target-libiberty
+html-target: maybe-html-target-gperf
+html-target: maybe-html-target-examples
+html-target: maybe-html-target-libffi
+html-target: maybe-html-target-libjava
+html-target: maybe-html-target-zlib
+html-target: maybe-html-target-boehm-gc
+html-target: maybe-html-target-qthreads
+html-target: maybe-html-target-rda
+html-target: maybe-html-target-libada
+html-target: maybe-html-target-libgomp
+
+.PHONY: do-TAGS
+do-TAGS:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) TAGS-host \
+ TAGS-target
+
+
+.PHONY: TAGS-host
+
+TAGS-host: maybe-TAGS-ash
+TAGS-host: maybe-TAGS-autoconf
+TAGS-host: maybe-TAGS-automake
+TAGS-host: maybe-TAGS-bash
+TAGS-host: maybe-TAGS-bfd
+TAGS-host: maybe-TAGS-opcodes
+TAGS-host: maybe-TAGS-binutils
+TAGS-host: maybe-TAGS-bison
+TAGS-host: maybe-TAGS-byacc
+TAGS-host: maybe-TAGS-bzip2
+TAGS-host: maybe-TAGS-dejagnu
+TAGS-host: maybe-TAGS-diff
+TAGS-host: maybe-TAGS-dosutils
+TAGS-host: maybe-TAGS-etc
+TAGS-host: maybe-TAGS-fastjar
+TAGS-host: maybe-TAGS-fileutils
+TAGS-host: maybe-TAGS-findutils
+TAGS-host: maybe-TAGS-find
+TAGS-host: maybe-TAGS-fixincludes
+TAGS-host: maybe-TAGS-flex
+TAGS-host: maybe-TAGS-gas
+TAGS-host: maybe-TAGS-gcc
+TAGS-host: maybe-TAGS-gawk
+TAGS-host: maybe-TAGS-gettext
+TAGS-host: maybe-TAGS-gnuserv
+TAGS-host: maybe-TAGS-gprof
+TAGS-host: maybe-TAGS-gzip
+TAGS-host: maybe-TAGS-hello
+TAGS-host: maybe-TAGS-indent
+TAGS-host: maybe-TAGS-intl
+TAGS-host: maybe-TAGS-tcl
+TAGS-host: maybe-TAGS-itcl
+TAGS-host: maybe-TAGS-ld
+TAGS-host: maybe-TAGS-libcpp
+TAGS-host: maybe-TAGS-libdecnumber
+TAGS-host: maybe-TAGS-libgui
+TAGS-host: maybe-TAGS-libiberty
+TAGS-host: maybe-TAGS-libtool
+TAGS-host: maybe-TAGS-m4
+TAGS-host: maybe-TAGS-make
+TAGS-host: maybe-TAGS-mmalloc
+TAGS-host: maybe-TAGS-patch
+TAGS-host: maybe-TAGS-perl
+TAGS-host: maybe-TAGS-prms
+TAGS-host: maybe-TAGS-rcs
+TAGS-host: maybe-TAGS-readline
+TAGS-host: maybe-TAGS-release
+TAGS-host: maybe-TAGS-recode
+TAGS-host: maybe-TAGS-sed
+TAGS-host: maybe-TAGS-send-pr
+TAGS-host: maybe-TAGS-shellutils
+TAGS-host: maybe-TAGS-sid
+TAGS-host: maybe-TAGS-sim
+TAGS-host: maybe-TAGS-tar
+TAGS-host: maybe-TAGS-texinfo
+TAGS-host: maybe-TAGS-textutils
+TAGS-host: maybe-TAGS-time
+TAGS-host: maybe-TAGS-uudecode
+TAGS-host: maybe-TAGS-wdiff
+TAGS-host: maybe-TAGS-zip
+TAGS-host: maybe-TAGS-zlib
+TAGS-host: maybe-TAGS-gdb
+TAGS-host: maybe-TAGS-expect
+TAGS-host: maybe-TAGS-guile
+TAGS-host: maybe-TAGS-tk
+TAGS-host: maybe-TAGS-libtermcap
+TAGS-host: maybe-TAGS-utils
+TAGS-host: maybe-TAGS-gnattools
+
+.PHONY: TAGS-target
+
+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-libgfortran
+TAGS-target: maybe-TAGS-target-libobjc
+TAGS-target: maybe-TAGS-target-libtermcap
+TAGS-target: maybe-TAGS-target-winsup
+TAGS-target: maybe-TAGS-target-libgloss
+TAGS-target: maybe-TAGS-target-libiberty
+TAGS-target: maybe-TAGS-target-gperf
+TAGS-target: maybe-TAGS-target-examples
+TAGS-target: maybe-TAGS-target-libffi
+TAGS-target: maybe-TAGS-target-libjava
+TAGS-target: maybe-TAGS-target-zlib
+TAGS-target: maybe-TAGS-target-boehm-gc
+TAGS-target: maybe-TAGS-target-qthreads
+TAGS-target: maybe-TAGS-target-rda
+TAGS-target: maybe-TAGS-target-libada
+TAGS-target: maybe-TAGS-target-libgomp
+
+.PHONY: do-install-info
+do-install-info:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) install-info-host \
+ install-info-target
+
+
+.PHONY: install-info-host
+
+install-info-host: maybe-install-info-ash
+install-info-host: maybe-install-info-autoconf
+install-info-host: maybe-install-info-automake
+install-info-host: maybe-install-info-bash
+install-info-host: maybe-install-info-bfd
+install-info-host: maybe-install-info-opcodes
+install-info-host: maybe-install-info-binutils
+install-info-host: maybe-install-info-bison
+install-info-host: maybe-install-info-byacc
+install-info-host: maybe-install-info-bzip2
+install-info-host: maybe-install-info-dejagnu
+install-info-host: maybe-install-info-diff
+install-info-host: maybe-install-info-dosutils
+install-info-host: maybe-install-info-etc
+install-info-host: maybe-install-info-fastjar
+install-info-host: maybe-install-info-fileutils
+install-info-host: maybe-install-info-findutils
+install-info-host: maybe-install-info-find
+install-info-host: maybe-install-info-fixincludes
+install-info-host: maybe-install-info-flex
+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-gnuserv
+install-info-host: maybe-install-info-gprof
+install-info-host: maybe-install-info-gzip
+install-info-host: maybe-install-info-hello
+install-info-host: maybe-install-info-indent
+install-info-host: maybe-install-info-intl
+install-info-host: maybe-install-info-tcl
+install-info-host: maybe-install-info-itcl
+install-info-host: maybe-install-info-ld
+install-info-host: maybe-install-info-libcpp
+install-info-host: maybe-install-info-libdecnumber
+install-info-host: maybe-install-info-libgui
+install-info-host: maybe-install-info-libiberty
+install-info-host: maybe-install-info-libtool
+install-info-host: maybe-install-info-m4
+install-info-host: maybe-install-info-make
+install-info-host: maybe-install-info-mmalloc
+install-info-host: maybe-install-info-patch
+install-info-host: maybe-install-info-perl
+install-info-host: maybe-install-info-prms
+install-info-host: maybe-install-info-rcs
+install-info-host: maybe-install-info-readline
+install-info-host: maybe-install-info-release
+install-info-host: maybe-install-info-recode
+install-info-host: maybe-install-info-sed
+install-info-host: maybe-install-info-send-pr
+install-info-host: maybe-install-info-shellutils
+install-info-host: maybe-install-info-sid
+install-info-host: maybe-install-info-sim
+install-info-host: maybe-install-info-tar
+install-info-host: maybe-install-info-texinfo
+install-info-host: maybe-install-info-textutils
+install-info-host: maybe-install-info-time
+install-info-host: maybe-install-info-uudecode
+install-info-host: maybe-install-info-wdiff
+install-info-host: maybe-install-info-zip
+install-info-host: maybe-install-info-zlib
+install-info-host: maybe-install-info-gdb
+install-info-host: maybe-install-info-expect
+install-info-host: maybe-install-info-guile
+install-info-host: maybe-install-info-tk
+install-info-host: maybe-install-info-libtermcap
+install-info-host: maybe-install-info-utils
+install-info-host: maybe-install-info-gnattools
+
+.PHONY: install-info-target
+
+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-libgfortran
+install-info-target: maybe-install-info-target-libobjc
+install-info-target: maybe-install-info-target-libtermcap
+install-info-target: maybe-install-info-target-winsup
+install-info-target: maybe-install-info-target-libgloss
+install-info-target: maybe-install-info-target-libiberty
+install-info-target: maybe-install-info-target-gperf
+install-info-target: maybe-install-info-target-examples
+install-info-target: maybe-install-info-target-libffi
+install-info-target: maybe-install-info-target-libjava
+install-info-target: maybe-install-info-target-zlib
+install-info-target: maybe-install-info-target-boehm-gc
+install-info-target: maybe-install-info-target-qthreads
+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-html
+do-install-html:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) install-html-host \
+ install-html-target
+
+
+.PHONY: install-html-host
+
+install-html-host: maybe-install-html-ash
+install-html-host: maybe-install-html-autoconf
+install-html-host: maybe-install-html-automake
+install-html-host: maybe-install-html-bash
+install-html-host: maybe-install-html-bfd
+install-html-host: maybe-install-html-opcodes
+install-html-host: maybe-install-html-binutils
+install-html-host: maybe-install-html-bison
+install-html-host: maybe-install-html-byacc
+install-html-host: maybe-install-html-bzip2
+install-html-host: maybe-install-html-dejagnu
+install-html-host: maybe-install-html-diff
+install-html-host: maybe-install-html-dosutils
+install-html-host: maybe-install-html-etc
+install-html-host: maybe-install-html-fastjar
+install-html-host: maybe-install-html-fileutils
+install-html-host: maybe-install-html-findutils
+install-html-host: maybe-install-html-find
+install-html-host: maybe-install-html-fixincludes
+install-html-host: maybe-install-html-flex
+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-gnuserv
+install-html-host: maybe-install-html-gprof
+install-html-host: maybe-install-html-gzip
+install-html-host: maybe-install-html-hello
+install-html-host: maybe-install-html-indent
+install-html-host: maybe-install-html-intl
+install-html-host: maybe-install-html-tcl
+install-html-host: maybe-install-html-itcl
+install-html-host: maybe-install-html-ld
+install-html-host: maybe-install-html-libcpp
+install-html-host: maybe-install-html-libdecnumber
+install-html-host: maybe-install-html-libgui
+install-html-host: maybe-install-html-libiberty
+install-html-host: maybe-install-html-libtool
+install-html-host: maybe-install-html-m4
+install-html-host: maybe-install-html-make
+install-html-host: maybe-install-html-mmalloc
+install-html-host: maybe-install-html-patch
+install-html-host: maybe-install-html-perl
+install-html-host: maybe-install-html-prms
+install-html-host: maybe-install-html-rcs
+install-html-host: maybe-install-html-readline
+install-html-host: maybe-install-html-release
+install-html-host: maybe-install-html-recode
+install-html-host: maybe-install-html-sed
+install-html-host: maybe-install-html-send-pr
+install-html-host: maybe-install-html-shellutils
+install-html-host: maybe-install-html-sid
+install-html-host: maybe-install-html-sim
+install-html-host: maybe-install-html-tar
+install-html-host: maybe-install-html-texinfo
+install-html-host: maybe-install-html-textutils
+install-html-host: maybe-install-html-time
+install-html-host: maybe-install-html-uudecode
+install-html-host: maybe-install-html-wdiff
+install-html-host: maybe-install-html-zip
+install-html-host: maybe-install-html-zlib
+install-html-host: maybe-install-html-gdb
+install-html-host: maybe-install-html-expect
+install-html-host: maybe-install-html-guile
+install-html-host: maybe-install-html-tk
+install-html-host: maybe-install-html-libtermcap
+install-html-host: maybe-install-html-utils
+install-html-host: maybe-install-html-gnattools
+
+.PHONY: install-html-target
+
+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-libgfortran
+install-html-target: maybe-install-html-target-libobjc
+install-html-target: maybe-install-html-target-libtermcap
+install-html-target: maybe-install-html-target-winsup
+install-html-target: maybe-install-html-target-libgloss
+install-html-target: maybe-install-html-target-libiberty
+install-html-target: maybe-install-html-target-gperf
+install-html-target: maybe-install-html-target-examples
+install-html-target: maybe-install-html-target-libffi
+install-html-target: maybe-install-html-target-libjava
+install-html-target: maybe-install-html-target-zlib
+install-html-target: maybe-install-html-target-boehm-gc
+install-html-target: maybe-install-html-target-qthreads
+install-html-target: maybe-install-html-target-rda
+install-html-target: maybe-install-html-target-libada
+install-html-target: maybe-install-html-target-libgomp
+
+.PHONY: do-installcheck
+do-installcheck:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) installcheck-host \
+ installcheck-target
+
+
+.PHONY: installcheck-host
+
+installcheck-host: maybe-installcheck-ash
+installcheck-host: maybe-installcheck-autoconf
+installcheck-host: maybe-installcheck-automake
+installcheck-host: maybe-installcheck-bash
+installcheck-host: maybe-installcheck-bfd
+installcheck-host: maybe-installcheck-opcodes
+installcheck-host: maybe-installcheck-binutils
+installcheck-host: maybe-installcheck-bison
+installcheck-host: maybe-installcheck-byacc
+installcheck-host: maybe-installcheck-bzip2
+installcheck-host: maybe-installcheck-dejagnu
+installcheck-host: maybe-installcheck-diff
+installcheck-host: maybe-installcheck-dosutils
+installcheck-host: maybe-installcheck-etc
+installcheck-host: maybe-installcheck-fastjar
+installcheck-host: maybe-installcheck-fileutils
+installcheck-host: maybe-installcheck-findutils
+installcheck-host: maybe-installcheck-find
+installcheck-host: maybe-installcheck-fixincludes
+installcheck-host: maybe-installcheck-flex
+installcheck-host: maybe-installcheck-gas
+installcheck-host: maybe-installcheck-gcc
+installcheck-host: maybe-installcheck-gawk
+installcheck-host: maybe-installcheck-gettext
+installcheck-host: maybe-installcheck-gnuserv
+installcheck-host: maybe-installcheck-gprof
+installcheck-host: maybe-installcheck-gzip
+installcheck-host: maybe-installcheck-hello
+installcheck-host: maybe-installcheck-indent
+installcheck-host: maybe-installcheck-intl
+installcheck-host: maybe-installcheck-tcl
+installcheck-host: maybe-installcheck-itcl
+installcheck-host: maybe-installcheck-ld
+installcheck-host: maybe-installcheck-libcpp
+installcheck-host: maybe-installcheck-libdecnumber
+installcheck-host: maybe-installcheck-libgui
+installcheck-host: maybe-installcheck-libiberty
+installcheck-host: maybe-installcheck-libtool
+installcheck-host: maybe-installcheck-m4
+installcheck-host: maybe-installcheck-make
+installcheck-host: maybe-installcheck-mmalloc
+installcheck-host: maybe-installcheck-patch
+installcheck-host: maybe-installcheck-perl
+installcheck-host: maybe-installcheck-prms
+installcheck-host: maybe-installcheck-rcs
+installcheck-host: maybe-installcheck-readline
+installcheck-host: maybe-installcheck-release
+installcheck-host: maybe-installcheck-recode
+installcheck-host: maybe-installcheck-sed
+installcheck-host: maybe-installcheck-send-pr
+installcheck-host: maybe-installcheck-shellutils
+installcheck-host: maybe-installcheck-sid
+installcheck-host: maybe-installcheck-sim
+installcheck-host: maybe-installcheck-tar
+installcheck-host: maybe-installcheck-texinfo
+installcheck-host: maybe-installcheck-textutils
+installcheck-host: maybe-installcheck-time
+installcheck-host: maybe-installcheck-uudecode
+installcheck-host: maybe-installcheck-wdiff
+installcheck-host: maybe-installcheck-zip
+installcheck-host: maybe-installcheck-zlib
+installcheck-host: maybe-installcheck-gdb
+installcheck-host: maybe-installcheck-expect
+installcheck-host: maybe-installcheck-guile
+installcheck-host: maybe-installcheck-tk
+installcheck-host: maybe-installcheck-libtermcap
+installcheck-host: maybe-installcheck-utils
+installcheck-host: maybe-installcheck-gnattools
+
+.PHONY: installcheck-target
+
+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-libgfortran
+installcheck-target: maybe-installcheck-target-libobjc
+installcheck-target: maybe-installcheck-target-libtermcap
+installcheck-target: maybe-installcheck-target-winsup
+installcheck-target: maybe-installcheck-target-libgloss
+installcheck-target: maybe-installcheck-target-libiberty
+installcheck-target: maybe-installcheck-target-gperf
+installcheck-target: maybe-installcheck-target-examples
+installcheck-target: maybe-installcheck-target-libffi
+installcheck-target: maybe-installcheck-target-libjava
+installcheck-target: maybe-installcheck-target-zlib
+installcheck-target: maybe-installcheck-target-boehm-gc
+installcheck-target: maybe-installcheck-target-qthreads
+installcheck-target: maybe-installcheck-target-rda
+installcheck-target: maybe-installcheck-target-libada
+installcheck-target: maybe-installcheck-target-libgomp
+
+.PHONY: do-mostlyclean
+do-mostlyclean:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) mostlyclean-host \
+ mostlyclean-target
+
+
+.PHONY: mostlyclean-host
+
+mostlyclean-host: maybe-mostlyclean-ash
+mostlyclean-host: maybe-mostlyclean-autoconf
+mostlyclean-host: maybe-mostlyclean-automake
+mostlyclean-host: maybe-mostlyclean-bash
+mostlyclean-host: maybe-mostlyclean-bfd
+mostlyclean-host: maybe-mostlyclean-opcodes
+mostlyclean-host: maybe-mostlyclean-binutils
+mostlyclean-host: maybe-mostlyclean-bison
+mostlyclean-host: maybe-mostlyclean-byacc
+mostlyclean-host: maybe-mostlyclean-bzip2
+mostlyclean-host: maybe-mostlyclean-dejagnu
+mostlyclean-host: maybe-mostlyclean-diff
+mostlyclean-host: maybe-mostlyclean-dosutils
+mostlyclean-host: maybe-mostlyclean-etc
+mostlyclean-host: maybe-mostlyclean-fastjar
+mostlyclean-host: maybe-mostlyclean-fileutils
+mostlyclean-host: maybe-mostlyclean-findutils
+mostlyclean-host: maybe-mostlyclean-find
+mostlyclean-host: maybe-mostlyclean-fixincludes
+mostlyclean-host: maybe-mostlyclean-flex
+mostlyclean-host: maybe-mostlyclean-gas
+mostlyclean-host: maybe-mostlyclean-gcc
+mostlyclean-host: maybe-mostlyclean-gawk
+mostlyclean-host: maybe-mostlyclean-gettext
+mostlyclean-host: maybe-mostlyclean-gnuserv
+mostlyclean-host: maybe-mostlyclean-gprof
+mostlyclean-host: maybe-mostlyclean-gzip
+mostlyclean-host: maybe-mostlyclean-hello
+mostlyclean-host: maybe-mostlyclean-indent
+mostlyclean-host: maybe-mostlyclean-intl
+mostlyclean-host: maybe-mostlyclean-tcl
+mostlyclean-host: maybe-mostlyclean-itcl
+mostlyclean-host: maybe-mostlyclean-ld
+mostlyclean-host: maybe-mostlyclean-libcpp
+mostlyclean-host: maybe-mostlyclean-libdecnumber
+mostlyclean-host: maybe-mostlyclean-libgui
+mostlyclean-host: maybe-mostlyclean-libiberty
+mostlyclean-host: maybe-mostlyclean-libtool
+mostlyclean-host: maybe-mostlyclean-m4
+mostlyclean-host: maybe-mostlyclean-make
+mostlyclean-host: maybe-mostlyclean-mmalloc
+mostlyclean-host: maybe-mostlyclean-patch
+mostlyclean-host: maybe-mostlyclean-perl
+mostlyclean-host: maybe-mostlyclean-prms
+mostlyclean-host: maybe-mostlyclean-rcs
+mostlyclean-host: maybe-mostlyclean-readline
+mostlyclean-host: maybe-mostlyclean-release
+mostlyclean-host: maybe-mostlyclean-recode
+mostlyclean-host: maybe-mostlyclean-sed
+mostlyclean-host: maybe-mostlyclean-send-pr
+mostlyclean-host: maybe-mostlyclean-shellutils
+mostlyclean-host: maybe-mostlyclean-sid
+mostlyclean-host: maybe-mostlyclean-sim
+mostlyclean-host: maybe-mostlyclean-tar
+mostlyclean-host: maybe-mostlyclean-texinfo
+mostlyclean-host: maybe-mostlyclean-textutils
+mostlyclean-host: maybe-mostlyclean-time
+mostlyclean-host: maybe-mostlyclean-uudecode
+mostlyclean-host: maybe-mostlyclean-wdiff
+mostlyclean-host: maybe-mostlyclean-zip
+mostlyclean-host: maybe-mostlyclean-zlib
+mostlyclean-host: maybe-mostlyclean-gdb
+mostlyclean-host: maybe-mostlyclean-expect
+mostlyclean-host: maybe-mostlyclean-guile
+mostlyclean-host: maybe-mostlyclean-tk
+mostlyclean-host: maybe-mostlyclean-libtermcap
+mostlyclean-host: maybe-mostlyclean-utils
+mostlyclean-host: maybe-mostlyclean-gnattools
+
+.PHONY: mostlyclean-target
+
+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-libgfortran
+mostlyclean-target: maybe-mostlyclean-target-libobjc
+mostlyclean-target: maybe-mostlyclean-target-libtermcap
+mostlyclean-target: maybe-mostlyclean-target-winsup
+mostlyclean-target: maybe-mostlyclean-target-libgloss
+mostlyclean-target: maybe-mostlyclean-target-libiberty
+mostlyclean-target: maybe-mostlyclean-target-gperf
+mostlyclean-target: maybe-mostlyclean-target-examples
+mostlyclean-target: maybe-mostlyclean-target-libffi
+mostlyclean-target: maybe-mostlyclean-target-libjava
+mostlyclean-target: maybe-mostlyclean-target-zlib
+mostlyclean-target: maybe-mostlyclean-target-boehm-gc
+mostlyclean-target: maybe-mostlyclean-target-qthreads
+mostlyclean-target: maybe-mostlyclean-target-rda
+mostlyclean-target: maybe-mostlyclean-target-libada
+mostlyclean-target: maybe-mostlyclean-target-libgomp
+
+.PHONY: do-clean
+do-clean:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) clean-host \
+ clean-target
+
+
+.PHONY: clean-host
+
+clean-host: maybe-clean-ash
+clean-host: maybe-clean-autoconf
+clean-host: maybe-clean-automake
+clean-host: maybe-clean-bash
+clean-host: maybe-clean-bfd
+clean-host: maybe-clean-opcodes
+clean-host: maybe-clean-binutils
+clean-host: maybe-clean-bison
+clean-host: maybe-clean-byacc
+clean-host: maybe-clean-bzip2
+clean-host: maybe-clean-dejagnu
+clean-host: maybe-clean-diff
+clean-host: maybe-clean-dosutils
+clean-host: maybe-clean-etc
+clean-host: maybe-clean-fastjar
+clean-host: maybe-clean-fileutils
+clean-host: maybe-clean-findutils
+clean-host: maybe-clean-find
+clean-host: maybe-clean-fixincludes
+clean-host: maybe-clean-flex
+clean-host: maybe-clean-gas
+clean-host: maybe-clean-gcc
+clean-host: maybe-clean-gawk
+clean-host: maybe-clean-gettext
+clean-host: maybe-clean-gnuserv
+clean-host: maybe-clean-gprof
+clean-host: maybe-clean-gzip
+clean-host: maybe-clean-hello
+clean-host: maybe-clean-indent
+clean-host: maybe-clean-intl
+clean-host: maybe-clean-tcl
+clean-host: maybe-clean-itcl
+clean-host: maybe-clean-ld
+clean-host: maybe-clean-libcpp
+clean-host: maybe-clean-libdecnumber
+clean-host: maybe-clean-libgui
+clean-host: maybe-clean-libiberty
+clean-host: maybe-clean-libtool
+clean-host: maybe-clean-m4
+clean-host: maybe-clean-make
+clean-host: maybe-clean-mmalloc
+clean-host: maybe-clean-patch
+clean-host: maybe-clean-perl
+clean-host: maybe-clean-prms
+clean-host: maybe-clean-rcs
+clean-host: maybe-clean-readline
+clean-host: maybe-clean-release
+clean-host: maybe-clean-recode
+clean-host: maybe-clean-sed
+clean-host: maybe-clean-send-pr
+clean-host: maybe-clean-shellutils
+clean-host: maybe-clean-sid
+clean-host: maybe-clean-sim
+clean-host: maybe-clean-tar
+clean-host: maybe-clean-texinfo
+clean-host: maybe-clean-textutils
+clean-host: maybe-clean-time
+clean-host: maybe-clean-uudecode
+clean-host: maybe-clean-wdiff
+clean-host: maybe-clean-zip
+clean-host: maybe-clean-zlib
+clean-host: maybe-clean-gdb
+clean-host: maybe-clean-expect
+clean-host: maybe-clean-guile
+clean-host: maybe-clean-tk
+clean-host: maybe-clean-libtermcap
+clean-host: maybe-clean-utils
+clean-host: maybe-clean-gnattools
+
+.PHONY: clean-target
+
+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-libgfortran
+clean-target: maybe-clean-target-libobjc
+clean-target: maybe-clean-target-libtermcap
+clean-target: maybe-clean-target-winsup
+clean-target: maybe-clean-target-libgloss
+clean-target: maybe-clean-target-libiberty
+clean-target: maybe-clean-target-gperf
+clean-target: maybe-clean-target-examples
+clean-target: maybe-clean-target-libffi
+clean-target: maybe-clean-target-libjava
+clean-target: maybe-clean-target-zlib
+clean-target: maybe-clean-target-boehm-gc
+clean-target: maybe-clean-target-qthreads
+clean-target: maybe-clean-target-rda
+clean-target: maybe-clean-target-libada
+clean-target: maybe-clean-target-libgomp
+
+.PHONY: do-distclean
+do-distclean:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) distclean-host \
+ distclean-target
+
+
+.PHONY: distclean-host
+
+distclean-host: maybe-distclean-ash
+distclean-host: maybe-distclean-autoconf
+distclean-host: maybe-distclean-automake
+distclean-host: maybe-distclean-bash
+distclean-host: maybe-distclean-bfd
+distclean-host: maybe-distclean-opcodes
+distclean-host: maybe-distclean-binutils
+distclean-host: maybe-distclean-bison
+distclean-host: maybe-distclean-byacc
+distclean-host: maybe-distclean-bzip2
+distclean-host: maybe-distclean-dejagnu
+distclean-host: maybe-distclean-diff
+distclean-host: maybe-distclean-dosutils
+distclean-host: maybe-distclean-etc
+distclean-host: maybe-distclean-fastjar
+distclean-host: maybe-distclean-fileutils
+distclean-host: maybe-distclean-findutils
+distclean-host: maybe-distclean-find
+distclean-host: maybe-distclean-fixincludes
+distclean-host: maybe-distclean-flex
+distclean-host: maybe-distclean-gas
+distclean-host: maybe-distclean-gcc
+distclean-host: maybe-distclean-gawk
+distclean-host: maybe-distclean-gettext
+distclean-host: maybe-distclean-gnuserv
+distclean-host: maybe-distclean-gprof
+distclean-host: maybe-distclean-gzip
+distclean-host: maybe-distclean-hello
+distclean-host: maybe-distclean-indent
+distclean-host: maybe-distclean-intl
+distclean-host: maybe-distclean-tcl
+distclean-host: maybe-distclean-itcl
+distclean-host: maybe-distclean-ld
+distclean-host: maybe-distclean-libcpp
+distclean-host: maybe-distclean-libdecnumber
+distclean-host: maybe-distclean-libgui
+distclean-host: maybe-distclean-libiberty
+distclean-host: maybe-distclean-libtool
+distclean-host: maybe-distclean-m4
+distclean-host: maybe-distclean-make
+distclean-host: maybe-distclean-mmalloc
+distclean-host: maybe-distclean-patch
+distclean-host: maybe-distclean-perl
+distclean-host: maybe-distclean-prms
+distclean-host: maybe-distclean-rcs
+distclean-host: maybe-distclean-readline
+distclean-host: maybe-distclean-release
+distclean-host: maybe-distclean-recode
+distclean-host: maybe-distclean-sed
+distclean-host: maybe-distclean-send-pr
+distclean-host: maybe-distclean-shellutils
+distclean-host: maybe-distclean-sid
+distclean-host: maybe-distclean-sim
+distclean-host: maybe-distclean-tar
+distclean-host: maybe-distclean-texinfo
+distclean-host: maybe-distclean-textutils
+distclean-host: maybe-distclean-time
+distclean-host: maybe-distclean-uudecode
+distclean-host: maybe-distclean-wdiff
+distclean-host: maybe-distclean-zip
+distclean-host: maybe-distclean-zlib
+distclean-host: maybe-distclean-gdb
+distclean-host: maybe-distclean-expect
+distclean-host: maybe-distclean-guile
+distclean-host: maybe-distclean-tk
+distclean-host: maybe-distclean-libtermcap
+distclean-host: maybe-distclean-utils
+distclean-host: maybe-distclean-gnattools
+
+.PHONY: distclean-target
+
+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-libgfortran
+distclean-target: maybe-distclean-target-libobjc
+distclean-target: maybe-distclean-target-libtermcap
+distclean-target: maybe-distclean-target-winsup
+distclean-target: maybe-distclean-target-libgloss
+distclean-target: maybe-distclean-target-libiberty
+distclean-target: maybe-distclean-target-gperf
+distclean-target: maybe-distclean-target-examples
+distclean-target: maybe-distclean-target-libffi
+distclean-target: maybe-distclean-target-libjava
+distclean-target: maybe-distclean-target-zlib
+distclean-target: maybe-distclean-target-boehm-gc
+distclean-target: maybe-distclean-target-qthreads
+distclean-target: maybe-distclean-target-rda
+distclean-target: maybe-distclean-target-libada
+distclean-target: maybe-distclean-target-libgomp
+
+.PHONY: do-maintainer-clean
+do-maintainer-clean:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) maintainer-clean-host \
+ maintainer-clean-target
+
+
+.PHONY: maintainer-clean-host
+
+maintainer-clean-host: maybe-maintainer-clean-ash
+maintainer-clean-host: maybe-maintainer-clean-autoconf
+maintainer-clean-host: maybe-maintainer-clean-automake
+maintainer-clean-host: maybe-maintainer-clean-bash
+maintainer-clean-host: maybe-maintainer-clean-bfd
+maintainer-clean-host: maybe-maintainer-clean-opcodes
+maintainer-clean-host: maybe-maintainer-clean-binutils
+maintainer-clean-host: maybe-maintainer-clean-bison
+maintainer-clean-host: maybe-maintainer-clean-byacc
+maintainer-clean-host: maybe-maintainer-clean-bzip2
+maintainer-clean-host: maybe-maintainer-clean-dejagnu
+maintainer-clean-host: maybe-maintainer-clean-diff
+maintainer-clean-host: maybe-maintainer-clean-dosutils
+maintainer-clean-host: maybe-maintainer-clean-etc
+maintainer-clean-host: maybe-maintainer-clean-fastjar
+maintainer-clean-host: maybe-maintainer-clean-fileutils
+maintainer-clean-host: maybe-maintainer-clean-findutils
+maintainer-clean-host: maybe-maintainer-clean-find
+maintainer-clean-host: maybe-maintainer-clean-fixincludes
+maintainer-clean-host: maybe-maintainer-clean-flex
+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-gnuserv
+maintainer-clean-host: maybe-maintainer-clean-gprof
+maintainer-clean-host: maybe-maintainer-clean-gzip
+maintainer-clean-host: maybe-maintainer-clean-hello
+maintainer-clean-host: maybe-maintainer-clean-indent
+maintainer-clean-host: maybe-maintainer-clean-intl
+maintainer-clean-host: maybe-maintainer-clean-tcl
+maintainer-clean-host: maybe-maintainer-clean-itcl
+maintainer-clean-host: maybe-maintainer-clean-ld
+maintainer-clean-host: maybe-maintainer-clean-libcpp
+maintainer-clean-host: maybe-maintainer-clean-libdecnumber
+maintainer-clean-host: maybe-maintainer-clean-libgui
+maintainer-clean-host: maybe-maintainer-clean-libiberty
+maintainer-clean-host: maybe-maintainer-clean-libtool
+maintainer-clean-host: maybe-maintainer-clean-m4
+maintainer-clean-host: maybe-maintainer-clean-make
+maintainer-clean-host: maybe-maintainer-clean-mmalloc
+maintainer-clean-host: maybe-maintainer-clean-patch
+maintainer-clean-host: maybe-maintainer-clean-perl
+maintainer-clean-host: maybe-maintainer-clean-prms
+maintainer-clean-host: maybe-maintainer-clean-rcs
+maintainer-clean-host: maybe-maintainer-clean-readline
+maintainer-clean-host: maybe-maintainer-clean-release
+maintainer-clean-host: maybe-maintainer-clean-recode
+maintainer-clean-host: maybe-maintainer-clean-sed
+maintainer-clean-host: maybe-maintainer-clean-send-pr
+maintainer-clean-host: maybe-maintainer-clean-shellutils
+maintainer-clean-host: maybe-maintainer-clean-sid
+maintainer-clean-host: maybe-maintainer-clean-sim
+maintainer-clean-host: maybe-maintainer-clean-tar
+maintainer-clean-host: maybe-maintainer-clean-texinfo
+maintainer-clean-host: maybe-maintainer-clean-textutils
+maintainer-clean-host: maybe-maintainer-clean-time
+maintainer-clean-host: maybe-maintainer-clean-uudecode
+maintainer-clean-host: maybe-maintainer-clean-wdiff
+maintainer-clean-host: maybe-maintainer-clean-zip
+maintainer-clean-host: maybe-maintainer-clean-zlib
+maintainer-clean-host: maybe-maintainer-clean-gdb
+maintainer-clean-host: maybe-maintainer-clean-expect
+maintainer-clean-host: maybe-maintainer-clean-guile
+maintainer-clean-host: maybe-maintainer-clean-tk
+maintainer-clean-host: maybe-maintainer-clean-libtermcap
+maintainer-clean-host: maybe-maintainer-clean-utils
+maintainer-clean-host: maybe-maintainer-clean-gnattools
+
+.PHONY: maintainer-clean-target
+
+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-libgfortran
+maintainer-clean-target: maybe-maintainer-clean-target-libobjc
+maintainer-clean-target: maybe-maintainer-clean-target-libtermcap
+maintainer-clean-target: maybe-maintainer-clean-target-winsup
+maintainer-clean-target: maybe-maintainer-clean-target-libgloss
+maintainer-clean-target: maybe-maintainer-clean-target-libiberty
+maintainer-clean-target: maybe-maintainer-clean-target-gperf
+maintainer-clean-target: maybe-maintainer-clean-target-examples
+maintainer-clean-target: maybe-maintainer-clean-target-libffi
+maintainer-clean-target: maybe-maintainer-clean-target-libjava
+maintainer-clean-target: maybe-maintainer-clean-target-zlib
+maintainer-clean-target: maybe-maintainer-clean-target-boehm-gc
+maintainer-clean-target: maybe-maintainer-clean-target-qthreads
+maintainer-clean-target: maybe-maintainer-clean-target-rda
+maintainer-clean-target: maybe-maintainer-clean-target-libada
+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: clean distclean mostlyclean maintainer-clean realclean
+.PHONY: local-clean local-distclean local-maintainer-clean
+info: do-info
+installcheck: do-installcheck
+dvi: do-dvi
+html: do-html
+
+# Make sure makeinfo is built before we do a `make info', if we're
+# in fact building texinfo.
+do-info: maybe-all-texinfo
+
+install-info: do-install-info dir.info
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if [ -f dir.info ] ; then \
+ $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
+ else true ; fi
+
+install-html: do-install-html
+
+local-clean:
+ -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
+
+local-distclean:
+ -rm -f Makefile config.status config.cache mh-frag mt-frag
+ -rm -f maybedep.tmp serdep.tmp
+ -if [ "$(TARGET_SUBDIR)" != "." ]; then \
+ rm -rf $(TARGET_SUBDIR); \
+ else true; fi
+ -rm -rf $(BUILD_SUBDIR)
+ -if [ "$(HOST_SUBDIR)" != "." ]; then \
+ rm -rf $(HOST_SUBDIR); \
+ else true; fi
+ -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
+ -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
+ -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
+ -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
+ -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
+
+local-maintainer-clean:
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+clean: do-clean local-clean
+mostlyclean: do-mostlyclean local-clean
+distclean: do-distclean local-clean local-distclean
+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
+check: do-check
+
+# Only include modules actually being configured and built.
+.PHONY: check-host
+check-host: \
+ maybe-check-ash \
+ maybe-check-autoconf \
+ maybe-check-automake \
+ maybe-check-bash \
+ maybe-check-bfd \
+ maybe-check-opcodes \
+ maybe-check-binutils \
+ maybe-check-bison \
+ maybe-check-byacc \
+ maybe-check-bzip2 \
+ maybe-check-dejagnu \
+ maybe-check-diff \
+ maybe-check-dosutils \
+ maybe-check-etc \
+ maybe-check-fastjar \
+ maybe-check-fileutils \
+ maybe-check-findutils \
+ maybe-check-find \
+ maybe-check-fixincludes \
+ maybe-check-flex \
+ maybe-check-gas \
+ maybe-check-gcc \
+ maybe-check-gawk \
+ maybe-check-gettext \
+ maybe-check-gnuserv \
+ maybe-check-gprof \
+ maybe-check-gzip \
+ maybe-check-hello \
+ maybe-check-indent \
+ maybe-check-intl \
+ maybe-check-tcl \
+ maybe-check-itcl \
+ maybe-check-ld \
+ maybe-check-libcpp \
+ maybe-check-libdecnumber \
+ maybe-check-libgui \
+ maybe-check-libiberty \
+ maybe-check-libtool \
+ maybe-check-m4 \
+ maybe-check-make \
+ maybe-check-mmalloc \
+ maybe-check-patch \
+ maybe-check-perl \
+ maybe-check-prms \
+ maybe-check-rcs \
+ maybe-check-readline \
+ maybe-check-release \
+ maybe-check-recode \
+ maybe-check-sed \
+ maybe-check-send-pr \
+ maybe-check-shellutils \
+ maybe-check-sid \
+ maybe-check-sim \
+ maybe-check-tar \
+ maybe-check-texinfo \
+ maybe-check-textutils \
+ maybe-check-time \
+ maybe-check-uudecode \
+ maybe-check-wdiff \
+ maybe-check-zip \
+ maybe-check-zlib \
+ maybe-check-gdb \
+ maybe-check-expect \
+ maybe-check-guile \
+ maybe-check-tk \
+ maybe-check-libtermcap \
+ maybe-check-utils \
+ maybe-check-gnattools
+
+.PHONY: check-target
+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-libgfortran \
+ maybe-check-target-libobjc \
+ maybe-check-target-libtermcap \
+ maybe-check-target-winsup \
+ maybe-check-target-libgloss \
+ maybe-check-target-libiberty \
+ maybe-check-target-gperf \
+ maybe-check-target-examples \
+ maybe-check-target-libffi \
+ maybe-check-target-libjava \
+ maybe-check-target-zlib \
+ maybe-check-target-boehm-gc \
+ maybe-check-target-qthreads \
+ maybe-check-target-rda \
+ maybe-check-target-libada \
+ maybe-check-target-libgomp
+
+do-check:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) check-host check-target
+
+# Automated reporting of test results.
+
+warning.log: build.log
+ $(srcdir)/contrib/warn_summary build.log > $@
+
+mail-report.log:
+ if test x'$(BOOT_CFLAGS)' != x''; then \
+ BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
+ fi; \
+ $(srcdir)/contrib/test_summary -t >$@
+ chmod +x $@
+ echo If you really want to send e-mail, run ./$@ now
+
+mail-report-with-warnings.log: warning.log
+ if test x'$(BOOT_CFLAGS)' != x''; then \
+ BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
+ fi; \
+ $(srcdir)/contrib/test_summary -t -i warning.log >$@
+ chmod +x $@
+ echo If you really want to send e-mail, run ./$@ now
+
+# Installation targets.
+
+.PHONY: install uninstall
+install:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-host install-target
+
+.PHONY: install-host-nogcc
+install-host-nogcc: \
+ maybe-install-ash \
+ maybe-install-autoconf \
+ maybe-install-automake \
+ maybe-install-bash \
+ maybe-install-bfd \
+ maybe-install-opcodes \
+ maybe-install-binutils \
+ maybe-install-bison \
+ maybe-install-byacc \
+ maybe-install-bzip2 \
+ maybe-install-dejagnu \
+ maybe-install-diff \
+ maybe-install-dosutils \
+ maybe-install-etc \
+ maybe-install-fastjar \
+ maybe-install-fileutils \
+ maybe-install-findutils \
+ maybe-install-find \
+ maybe-install-fixincludes \
+ maybe-install-flex \
+ maybe-install-gas \
+ maybe-install-gawk \
+ maybe-install-gettext \
+ maybe-install-gnuserv \
+ maybe-install-gprof \
+ maybe-install-gzip \
+ maybe-install-hello \
+ maybe-install-indent \
+ maybe-install-intl \
+ maybe-install-tcl \
+ maybe-install-itcl \
+ maybe-install-ld \
+ maybe-install-libcpp \
+ maybe-install-libdecnumber \
+ maybe-install-libgui \
+ maybe-install-libiberty \
+ maybe-install-libtool \
+ maybe-install-m4 \
+ maybe-install-make \
+ maybe-install-mmalloc \
+ maybe-install-patch \
+ maybe-install-perl \
+ maybe-install-prms \
+ maybe-install-rcs \
+ maybe-install-readline \
+ maybe-install-release \
+ maybe-install-recode \
+ maybe-install-sed \
+ maybe-install-send-pr \
+ maybe-install-shellutils \
+ maybe-install-sid \
+ maybe-install-sim \
+ maybe-install-tar \
+ maybe-install-texinfo \
+ maybe-install-textutils \
+ maybe-install-time \
+ maybe-install-uudecode \
+ maybe-install-wdiff \
+ maybe-install-zip \
+ maybe-install-zlib \
+ maybe-install-gdb \
+ maybe-install-expect \
+ maybe-install-guile \
+ maybe-install-tk \
+ maybe-install-libtermcap \
+ maybe-install-utils \
+ maybe-install-gnattools
+
+.PHONY: install-host
+install-host: \
+ maybe-install-ash \
+ maybe-install-autoconf \
+ maybe-install-automake \
+ maybe-install-bash \
+ maybe-install-bfd \
+ maybe-install-opcodes \
+ maybe-install-binutils \
+ maybe-install-bison \
+ maybe-install-byacc \
+ maybe-install-bzip2 \
+ maybe-install-dejagnu \
+ maybe-install-diff \
+ maybe-install-dosutils \
+ maybe-install-etc \
+ maybe-install-fastjar \
+ maybe-install-fileutils \
+ maybe-install-findutils \
+ maybe-install-find \
+ maybe-install-fixincludes \
+ maybe-install-flex \
+ maybe-install-gas \
+ maybe-install-gcc \
+ maybe-install-gawk \
+ maybe-install-gettext \
+ maybe-install-gnuserv \
+ maybe-install-gprof \
+ maybe-install-gzip \
+ maybe-install-hello \
+ maybe-install-indent \
+ maybe-install-intl \
+ maybe-install-tcl \
+ maybe-install-itcl \
+ maybe-install-ld \
+ maybe-install-libcpp \
+ maybe-install-libdecnumber \
+ maybe-install-libgui \
+ maybe-install-libiberty \
+ maybe-install-libtool \
+ maybe-install-m4 \
+ maybe-install-make \
+ maybe-install-mmalloc \
+ maybe-install-patch \
+ maybe-install-perl \
+ maybe-install-prms \
+ maybe-install-rcs \
+ maybe-install-readline \
+ maybe-install-release \
+ maybe-install-recode \
+ maybe-install-sed \
+ maybe-install-send-pr \
+ maybe-install-shellutils \
+ maybe-install-sid \
+ maybe-install-sim \
+ maybe-install-tar \
+ maybe-install-texinfo \
+ maybe-install-textutils \
+ maybe-install-time \
+ maybe-install-uudecode \
+ maybe-install-wdiff \
+ maybe-install-zip \
+ maybe-install-zlib \
+ maybe-install-gdb \
+ maybe-install-expect \
+ maybe-install-guile \
+ maybe-install-tk \
+ maybe-install-libtermcap \
+ maybe-install-utils \
+ maybe-install-gnattools
+
+.PHONY: install-target
+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-libgfortran \
+ maybe-install-target-libobjc \
+ maybe-install-target-libtermcap \
+ maybe-install-target-winsup \
+ maybe-install-target-libgloss \
+ maybe-install-target-libiberty \
+ maybe-install-target-gperf \
+ maybe-install-target-examples \
+ maybe-install-target-libffi \
+ maybe-install-target-libjava \
+ maybe-install-target-zlib \
+ maybe-install-target-boehm-gc \
+ maybe-install-target-qthreads \
+ maybe-install-target-rda \
+ maybe-install-target-libada \
+ maybe-install-target-libgomp
+
+uninstall:
+ @echo "the uninstall target is not supported in this tree"
+
+.PHONY: install.all
+install.all: install-no-fixedincludes
+ @if [ -f ./gcc/Makefile ] ; then \
+ r=`${PWD_COMMAND}` ; export r ; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd ./gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
+ else \
+ true ; \
+ fi
+
+# install-no-fixedincludes is used because Cygnus can not distribute
+# the fixed header files.
+.PHONY: install-no-fixedincludes
+install-no-fixedincludes: installdirs install-host-nogcc \
+ install-target gcc-no-fixedincludes
+
+### other supporting targets
+
+MAKEDIRS= \
+ $(DESTDIR)$(prefix) \
+ $(DESTDIR)$(exec_prefix)
+.PHONY: installdirs
+installdirs: mkinstalldirs
+ $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
+
+dir.info: do-install-info
+ if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
+ $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
+ mv -f dir.info.new dir.info ; \
+ else true ; \
+ fi
+
+dist:
+ @echo "Building a full distribution of this tree isn't done"
+ @echo "via 'make dist'. Check out the etc/ subdirectory"
+
+etags tags: TAGS
+
+# Right now this just builds TAGS in each subdirectory. emacs19 has the
+# ability to use several tags files at once, so there is probably no need
+# to combine them into one big TAGS file (like CVS 1.3 does). We could
+# (if we felt like it) have this Makefile write a piece of elisp which
+# the user could load to tell emacs19 where all the TAGS files we just
+# built are.
+TAGS: do-TAGS
+
+# ------------------------------------
+# Macros for configure and all targets
+# ------------------------------------
+
+
+
+
+
+# --------------------------------------
+# Modules which run on the build machine
+# --------------------------------------
+
+
+.PHONY: configure-build-libiberty maybe-configure-build-libiberty
+maybe-configure-build-libiberty:
+@if build-libiberty
+maybe-configure-build-libiberty: configure-build-libiberty
+configure-build-libiberty:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/libiberty; \
+ cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(BUILD_SUBDIR)/libiberty/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif build-libiberty
+
+
+
+
+
+.PHONY: all-build-libiberty maybe-all-build-libiberty
+maybe-all-build-libiberty:
+@if build-libiberty
+TARGET-build-libiberty=all
+maybe-all-build-libiberty: all-build-libiberty
+all-build-libiberty: configure-build-libiberty
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/libiberty && \
+ $(MAKE) $(TARGET-build-libiberty))
+@endif build-libiberty
+
+
+
+
+
+.PHONY: configure-build-bison maybe-configure-build-bison
+maybe-configure-build-bison:
+@if build-bison
+maybe-configure-build-bison: configure-build-bison
+configure-build-bison:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(BUILD_SUBDIR)/bison/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/bison ; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/bison; \
+ cd "$(BUILD_SUBDIR)/bison" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(BUILD_SUBDIR)/bison/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bison"; \
+ libsrcdir="$$s/bison"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif build-bison
+
+
+
+
+
+.PHONY: all-build-bison maybe-all-build-bison
+maybe-all-build-bison:
+@if build-bison
+TARGET-build-bison=all
+maybe-all-build-bison: all-build-bison
+all-build-bison: configure-build-bison
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/bison && \
+ $(MAKE) $(TARGET-build-bison))
+@endif build-bison
+
+
+
+
+
+.PHONY: configure-build-byacc maybe-configure-build-byacc
+maybe-configure-build-byacc:
+@if build-byacc
+maybe-configure-build-byacc: configure-build-byacc
+configure-build-byacc:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(BUILD_SUBDIR)/byacc/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/byacc ; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/byacc; \
+ cd "$(BUILD_SUBDIR)/byacc" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(BUILD_SUBDIR)/byacc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/byacc"; \
+ libsrcdir="$$s/byacc"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif build-byacc
+
+
+
+
+
+.PHONY: all-build-byacc maybe-all-build-byacc
+maybe-all-build-byacc:
+@if build-byacc
+TARGET-build-byacc=all
+maybe-all-build-byacc: all-build-byacc
+all-build-byacc: configure-build-byacc
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/byacc && \
+ $(MAKE) $(TARGET-build-byacc))
+@endif build-byacc
+
+
+
+
+
+.PHONY: configure-build-flex maybe-configure-build-flex
+maybe-configure-build-flex:
+@if build-flex
+maybe-configure-build-flex: configure-build-flex
+configure-build-flex:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(BUILD_SUBDIR)/flex/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/flex ; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/flex; \
+ cd "$(BUILD_SUBDIR)/flex" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(BUILD_SUBDIR)/flex/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/flex"; \
+ libsrcdir="$$s/flex"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif build-flex
+
+
+
+
+
+.PHONY: all-build-flex maybe-all-build-flex
+maybe-all-build-flex:
+@if build-flex
+TARGET-build-flex=all
+maybe-all-build-flex: all-build-flex
+all-build-flex: configure-build-flex
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/flex && \
+ $(MAKE) $(TARGET-build-flex))
+@endif build-flex
+
+
+
+
+
+.PHONY: configure-build-m4 maybe-configure-build-m4
+maybe-configure-build-m4:
+@if build-m4
+maybe-configure-build-m4: configure-build-m4
+configure-build-m4:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(BUILD_SUBDIR)/m4/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/m4 ; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/m4; \
+ cd "$(BUILD_SUBDIR)/m4" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(BUILD_SUBDIR)/m4/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/m4"; \
+ libsrcdir="$$s/m4"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif build-m4
+
+
+
+
+
+.PHONY: all-build-m4 maybe-all-build-m4
+maybe-all-build-m4:
+@if build-m4
+TARGET-build-m4=all
+maybe-all-build-m4: all-build-m4
+all-build-m4: configure-build-m4
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/m4 && \
+ $(MAKE) $(TARGET-build-m4))
+@endif build-m4
+
+
+
+
+
+.PHONY: configure-build-texinfo maybe-configure-build-texinfo
+maybe-configure-build-texinfo:
+@if build-texinfo
+maybe-configure-build-texinfo: configure-build-texinfo
+configure-build-texinfo:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(BUILD_SUBDIR)/texinfo/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/texinfo ; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/texinfo; \
+ cd "$(BUILD_SUBDIR)/texinfo" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(BUILD_SUBDIR)/texinfo/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/texinfo"; \
+ libsrcdir="$$s/texinfo"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif build-texinfo
+
+
+
+
+
+.PHONY: all-build-texinfo maybe-all-build-texinfo
+maybe-all-build-texinfo:
+@if build-texinfo
+TARGET-build-texinfo=all
+maybe-all-build-texinfo: all-build-texinfo
+all-build-texinfo: configure-build-texinfo
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/texinfo && \
+ $(MAKE) $(TARGET-build-texinfo))
+@endif build-texinfo
+
+
+
+
+
+.PHONY: configure-build-fixincludes maybe-configure-build-fixincludes
+maybe-configure-build-fixincludes:
+@if build-fixincludes
+maybe-configure-build-fixincludes: configure-build-fixincludes
+configure-build-fixincludes:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(BUILD_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/fixincludes ; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/fixincludes; \
+ cd "$(BUILD_SUBDIR)/fixincludes" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(BUILD_SUBDIR)/fixincludes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/fixincludes"; \
+ libsrcdir="$$s/fixincludes"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif build-fixincludes
+
+
+
+
+
+.PHONY: all-build-fixincludes maybe-all-build-fixincludes
+maybe-all-build-fixincludes:
+@if build-fixincludes
+TARGET-build-fixincludes=all
+maybe-all-build-fixincludes: all-build-fixincludes
+all-build-fixincludes: configure-build-fixincludes
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/fixincludes && \
+ $(MAKE) $(TARGET-build-fixincludes))
+@endif build-fixincludes
+
+
+
+
+
+# --------------------------------------
+# Modules which run on the host machine
+# --------------------------------------
+
+
+.PHONY: configure-ash maybe-configure-ash
+maybe-configure-ash:
+@if ash
+maybe-configure-ash: configure-ash
+configure-ash:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ash/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ash ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/ash; \
+ cd "$(HOST_SUBDIR)/ash" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/ash/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/ash"; \
+ libsrcdir="$$s/ash"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif ash
+
+
+
+
+
+.PHONY: all-ash maybe-all-ash
+maybe-all-ash:
+@if ash
+TARGET-ash=all
+maybe-all-ash: all-ash
+all-ash: configure-ash
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/ash && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-ash))
+@endif ash
+
+
+
+
+.PHONY: check-ash maybe-check-ash
+maybe-check-ash:
+@if ash
+maybe-check-ash: check-ash
+
+check-ash:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/ash && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif ash
+
+.PHONY: install-ash maybe-install-ash
+maybe-install-ash:
+@if ash
+maybe-install-ash: install-ash
+
+install-ash: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/ash && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif ash
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-ash info-ash
+maybe-info-ash:
+@if ash
+maybe-info-ash: info-ash
+
+info-ash: \
+ configure-ash
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gcc" ; \
- (cd gcc && \
+ echo "Doing info 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}" \
@@ -820,242 +2806,363 @@ info-gcc: \
info) \
|| exit 1
-# Host modules.
+@endif ash
-.PHONY: maybe-info-ash info-ash
-maybe-info-ash:
+.PHONY: maybe-dvi-ash dvi-ash
+maybe-dvi-ash:
+@if ash
+maybe-dvi-ash: dvi-ash
-info-ash: \
+dvi-ash: \
configure-ash
+ @: $(MAKE); $(unstage)
@[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in ash" ; \
- (cd ash && \
+ echo "Doing dvi 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}" \
- info) \
+ dvi) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-autoconf info-autoconf
-maybe-info-autoconf:
+.PHONY: maybe-html-ash html-ash
+maybe-html-ash:
+@if ash
+maybe-html-ash: html-ash
-info-autoconf: \
- configure-autoconf
- @[ -f ./autoconf/Makefile ] || exit 0; \
+html-ash: \
+ configure-ash
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in autoconf" ; \
- (cd autoconf && \
+ echo "Doing html 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}" \
- info) \
+ html) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-automake info-automake
-maybe-info-automake:
+.PHONY: maybe-TAGS-ash TAGS-ash
+maybe-TAGS-ash:
+@if ash
+maybe-TAGS-ash: TAGS-ash
-info-automake: \
- configure-automake
- @[ -f ./automake/Makefile ] || exit 0; \
+TAGS-ash: \
+ configure-ash
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in automake" ; \
- (cd automake && \
+ echo "Doing TAGS 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}" \
- info) \
+ TAGS) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-bash info-bash
-maybe-info-bash:
+.PHONY: maybe-install-info-ash install-info-ash
+maybe-install-info-ash:
+@if ash
+maybe-install-info-ash: install-info-ash
-info-bash: \
- configure-bash
- @[ -f ./bash/Makefile ] || exit 0; \
+install-info-ash: \
+ configure-ash \
+ info-ash
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in bash" ; \
- (cd bash && \
+ echo "Doing install-info 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}" \
- info) \
+ install-info) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-bfd info-bfd
-maybe-info-bfd:
+.PHONY: maybe-install-html-ash install-html-ash
+maybe-install-html-ash:
+@if ash
+maybe-install-html-ash: install-html-ash
-info-bfd: \
- configure-bfd
- @[ -f ./bfd/Makefile ] || exit 0; \
+install-html-ash: \
+ configure-ash \
+ html-ash
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in bfd" ; \
- (cd bfd && \
+ echo "Doing install-html 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}" \
- info) \
+ install-html) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-opcodes info-opcodes
-maybe-info-opcodes:
+.PHONY: maybe-installcheck-ash installcheck-ash
+maybe-installcheck-ash:
+@if ash
+maybe-installcheck-ash: installcheck-ash
-info-opcodes: \
- configure-opcodes
- @[ -f ./opcodes/Makefile ] || exit 0; \
+installcheck-ash: \
+ configure-ash
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in opcodes" ; \
- (cd opcodes && \
+ echo "Doing installcheck 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}" \
- info) \
+ installcheck) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-binutils info-binutils
-maybe-info-binutils:
+.PHONY: maybe-mostlyclean-ash mostlyclean-ash
+maybe-mostlyclean-ash:
+@if ash
+maybe-mostlyclean-ash: mostlyclean-ash
-info-binutils: \
- configure-binutils
- @[ -f ./binutils/Makefile ] || exit 0; \
+mostlyclean-ash:
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in binutils" ; \
- (cd binutils && \
+ echo "Doing mostlyclean 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}" \
- info) \
+ mostlyclean) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-bison info-bison
-maybe-info-bison:
+.PHONY: maybe-clean-ash clean-ash
+maybe-clean-ash:
+@if ash
+maybe-clean-ash: clean-ash
-info-bison: \
- configure-bison
- @[ -f ./bison/Makefile ] || exit 0; \
+clean-ash:
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in bison" ; \
- (cd bison && \
+ echo "Doing clean 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}" \
- info) \
+ clean) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-byacc info-byacc
-maybe-info-byacc:
+.PHONY: maybe-distclean-ash distclean-ash
+maybe-distclean-ash:
+@if ash
+maybe-distclean-ash: distclean-ash
-info-byacc: \
- configure-byacc
- @[ -f ./byacc/Makefile ] || exit 0; \
+distclean-ash:
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in byacc" ; \
- (cd byacc && \
+ echo "Doing distclean 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}" \
- info) \
+ distclean) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-bzip2 info-bzip2
-maybe-info-bzip2:
+.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash
+maybe-maintainer-clean-ash:
+@if ash
+maybe-maintainer-clean-ash: maintainer-clean-ash
-info-bzip2: \
- configure-bzip2
- @[ -f ./bzip2/Makefile ] || exit 0; \
+maintainer-clean-ash:
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in bzip2" ; \
- (cd bzip2 && \
+ echo "Doing maintainer-clean 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}" \
- info) \
+ maintainer-clean) \
|| exit 1
+@endif ash
-.PHONY: maybe-info-dejagnu info-dejagnu
-maybe-info-dejagnu:
-info-dejagnu: \
- configure-dejagnu
- @[ -f ./dejagnu/Makefile ] || exit 0; \
+
+.PHONY: configure-autoconf maybe-configure-autoconf
+maybe-configure-autoconf:
+@if autoconf
+maybe-configure-autoconf: configure-autoconf
+configure-autoconf:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/autoconf/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/autoconf ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/autoconf; \
+ cd "$(HOST_SUBDIR)/autoconf" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/autoconf/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/autoconf"; \
+ libsrcdir="$$s/autoconf"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif autoconf
+
+
+
+
+
+.PHONY: all-autoconf maybe-all-autoconf
+maybe-all-autoconf:
+@if autoconf
+TARGET-autoconf=all
+maybe-all-autoconf: all-autoconf
+all-autoconf: configure-autoconf
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/autoconf && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-autoconf))
+@endif autoconf
+
+
+
+
+.PHONY: check-autoconf maybe-check-autoconf
+maybe-check-autoconf:
+@if autoconf
+maybe-check-autoconf: check-autoconf
+
+check-autoconf:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/autoconf && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif autoconf
+
+.PHONY: install-autoconf maybe-install-autoconf
+maybe-install-autoconf:
+@if autoconf
+maybe-install-autoconf: install-autoconf
+
+install-autoconf: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/autoconf && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif autoconf
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-autoconf info-autoconf
+maybe-info-autoconf:
+@if autoconf
+maybe-info-autoconf: info-autoconf
+
+info-autoconf: \
+ configure-autoconf
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in dejagnu" ; \
- (cd dejagnu && \
+ echo "Doing info 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}" \
@@ -1063,241 +3170,363 @@ info-dejagnu: \
info) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-diff info-diff
-maybe-info-diff:
+.PHONY: maybe-dvi-autoconf dvi-autoconf
+maybe-dvi-autoconf:
+@if autoconf
+maybe-dvi-autoconf: dvi-autoconf
-info-diff: \
- configure-diff
- @[ -f ./diff/Makefile ] || exit 0; \
+dvi-autoconf: \
+ configure-autoconf
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in diff" ; \
- (cd diff && \
+ echo "Doing dvi 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}" \
- info) \
+ dvi) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-dosutils info-dosutils
-maybe-info-dosutils:
+.PHONY: maybe-html-autoconf html-autoconf
+maybe-html-autoconf:
+@if autoconf
+maybe-html-autoconf: html-autoconf
-info-dosutils: \
- configure-dosutils
- @[ -f ./dosutils/Makefile ] || exit 0; \
+html-autoconf: \
+ configure-autoconf
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in dosutils" ; \
- (cd dosutils && \
+ echo "Doing html 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}" \
- info) \
+ html) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-etc info-etc
-maybe-info-etc:
+.PHONY: maybe-TAGS-autoconf TAGS-autoconf
+maybe-TAGS-autoconf:
+@if autoconf
+maybe-TAGS-autoconf: TAGS-autoconf
-info-etc: \
- configure-etc
- @[ -f ./etc/Makefile ] || exit 0; \
+TAGS-autoconf: \
+ configure-autoconf
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in etc" ; \
- (cd etc && \
+ echo "Doing TAGS 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}" \
- info) \
+ TAGS) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-fastjar info-fastjar
-maybe-info-fastjar:
+.PHONY: maybe-install-info-autoconf install-info-autoconf
+maybe-install-info-autoconf:
+@if autoconf
+maybe-install-info-autoconf: install-info-autoconf
-info-fastjar: \
- configure-fastjar
- @[ -f ./fastjar/Makefile ] || exit 0; \
+install-info-autoconf: \
+ configure-autoconf \
+ info-autoconf
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in fastjar" ; \
- (cd fastjar && \
+ echo "Doing install-info 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}" \
- info) \
+ install-info) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-fileutils info-fileutils
-maybe-info-fileutils:
+.PHONY: maybe-install-html-autoconf install-html-autoconf
+maybe-install-html-autoconf:
+@if autoconf
+maybe-install-html-autoconf: install-html-autoconf
-info-fileutils: \
- configure-fileutils
- @[ -f ./fileutils/Makefile ] || exit 0; \
+install-html-autoconf: \
+ configure-autoconf \
+ html-autoconf
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in fileutils" ; \
- (cd fileutils && \
+ echo "Doing install-html 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}" \
- info) \
+ install-html) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-findutils info-findutils
-maybe-info-findutils:
+.PHONY: maybe-installcheck-autoconf installcheck-autoconf
+maybe-installcheck-autoconf:
+@if autoconf
+maybe-installcheck-autoconf: installcheck-autoconf
-info-findutils: \
- configure-findutils
- @[ -f ./findutils/Makefile ] || exit 0; \
+installcheck-autoconf: \
+ configure-autoconf
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in findutils" ; \
- (cd findutils && \
+ echo "Doing installcheck 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}" \
- info) \
+ installcheck) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-find info-find
-maybe-info-find:
+.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf
+maybe-mostlyclean-autoconf:
+@if autoconf
+maybe-mostlyclean-autoconf: mostlyclean-autoconf
-info-find: \
- configure-find
- @[ -f ./find/Makefile ] || exit 0; \
+mostlyclean-autoconf:
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in find" ; \
- (cd find && \
+ echo "Doing mostlyclean 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}" \
- info) \
+ mostlyclean) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-flex info-flex
-maybe-info-flex:
+.PHONY: maybe-clean-autoconf clean-autoconf
+maybe-clean-autoconf:
+@if autoconf
+maybe-clean-autoconf: clean-autoconf
-info-flex: \
- configure-flex
- @[ -f ./flex/Makefile ] || exit 0; \
+clean-autoconf:
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in flex" ; \
- (cd flex && \
+ echo "Doing clean 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}" \
- info) \
+ clean) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-gas info-gas
-maybe-info-gas:
+.PHONY: maybe-distclean-autoconf distclean-autoconf
+maybe-distclean-autoconf:
+@if autoconf
+maybe-distclean-autoconf: distclean-autoconf
-info-gas: \
- configure-gas
- @[ -f ./gas/Makefile ] || exit 0; \
+distclean-autoconf:
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gas" ; \
- (cd gas && \
+ echo "Doing distclean 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}" \
- info) \
+ distclean) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-gawk info-gawk
-maybe-info-gawk:
+.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf
+maybe-maintainer-clean-autoconf:
+@if autoconf
+maybe-maintainer-clean-autoconf: maintainer-clean-autoconf
-info-gawk: \
- configure-gawk
- @[ -f ./gawk/Makefile ] || exit 0; \
+maintainer-clean-autoconf:
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gawk" ; \
- (cd gawk && \
+ echo "Doing maintainer-clean 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}" \
- info) \
+ maintainer-clean) \
|| exit 1
+@endif autoconf
-.PHONY: maybe-info-gettext info-gettext
-maybe-info-gettext:
-info-gettext: \
- configure-gettext
- @[ -f ./gettext/Makefile ] || exit 0; \
+
+.PHONY: configure-automake maybe-configure-automake
+maybe-configure-automake:
+@if automake
+maybe-configure-automake: configure-automake
+configure-automake:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/automake/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/automake ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/automake; \
+ cd "$(HOST_SUBDIR)/automake" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/automake/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/automake"; \
+ libsrcdir="$$s/automake"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif automake
+
+
+
+
+
+.PHONY: all-automake maybe-all-automake
+maybe-all-automake:
+@if automake
+TARGET-automake=all
+maybe-all-automake: all-automake
+all-automake: configure-automake
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/automake && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-automake))
+@endif automake
+
+
+
+
+.PHONY: check-automake maybe-check-automake
+maybe-check-automake:
+@if automake
+maybe-check-automake: check-automake
+
+check-automake:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/automake && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif automake
+
+.PHONY: install-automake maybe-install-automake
+maybe-install-automake:
+@if automake
+maybe-install-automake: install-automake
+
+install-automake: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/automake && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif automake
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-automake info-automake
+maybe-info-automake:
+@if automake
+maybe-info-automake: info-automake
+
+info-automake: \
+ configure-automake
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gettext" ; \
- (cd gettext && \
+ echo "Doing info 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}" \
@@ -1305,241 +3534,363 @@ info-gettext: \
info) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-gnuserv info-gnuserv
-maybe-info-gnuserv:
+.PHONY: maybe-dvi-automake dvi-automake
+maybe-dvi-automake:
+@if automake
+maybe-dvi-automake: dvi-automake
-info-gnuserv: \
- configure-gnuserv
- @[ -f ./gnuserv/Makefile ] || exit 0; \
+dvi-automake: \
+ configure-automake
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gnuserv" ; \
- (cd gnuserv && \
+ echo "Doing dvi 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}" \
- info) \
+ dvi) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-gprof info-gprof
-maybe-info-gprof:
+.PHONY: maybe-html-automake html-automake
+maybe-html-automake:
+@if automake
+maybe-html-automake: html-automake
-info-gprof: \
- configure-gprof
- @[ -f ./gprof/Makefile ] || exit 0; \
+html-automake: \
+ configure-automake
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gprof" ; \
- (cd gprof && \
+ echo "Doing html 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}" \
- info) \
+ html) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-gzip info-gzip
-maybe-info-gzip:
+.PHONY: maybe-TAGS-automake TAGS-automake
+maybe-TAGS-automake:
+@if automake
+maybe-TAGS-automake: TAGS-automake
-info-gzip: \
- configure-gzip
- @[ -f ./gzip/Makefile ] || exit 0; \
+TAGS-automake: \
+ configure-automake
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gzip" ; \
- (cd gzip && \
+ echo "Doing TAGS 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}" \
- info) \
+ TAGS) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-hello info-hello
-maybe-info-hello:
+.PHONY: maybe-install-info-automake install-info-automake
+maybe-install-info-automake:
+@if automake
+maybe-install-info-automake: install-info-automake
-info-hello: \
- configure-hello
- @[ -f ./hello/Makefile ] || exit 0; \
+install-info-automake: \
+ configure-automake \
+ info-automake
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in hello" ; \
- (cd hello && \
+ echo "Doing install-info 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}" \
- info) \
+ install-info) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-indent info-indent
-maybe-info-indent:
+.PHONY: maybe-install-html-automake install-html-automake
+maybe-install-html-automake:
+@if automake
+maybe-install-html-automake: install-html-automake
-info-indent: \
- configure-indent
- @[ -f ./indent/Makefile ] || exit 0; \
+install-html-automake: \
+ configure-automake \
+ html-automake
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in indent" ; \
- (cd indent && \
+ echo "Doing install-html 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}" \
- info) \
+ install-html) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-intl info-intl
-maybe-info-intl:
+.PHONY: maybe-installcheck-automake installcheck-automake
+maybe-installcheck-automake:
+@if automake
+maybe-installcheck-automake: installcheck-automake
-info-intl: \
- configure-intl
- @[ -f ./intl/Makefile ] || exit 0; \
+installcheck-automake: \
+ configure-automake
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in intl" ; \
- (cd intl && \
+ echo "Doing installcheck 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}" \
- info) \
+ installcheck) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-tcl info-tcl
-maybe-info-tcl:
+.PHONY: maybe-mostlyclean-automake mostlyclean-automake
+maybe-mostlyclean-automake:
+@if automake
+maybe-mostlyclean-automake: mostlyclean-automake
-info-tcl: \
- configure-tcl
- @[ -f ./tcl/Makefile ] || exit 0; \
+mostlyclean-automake:
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in tcl" ; \
- (cd tcl && \
+ echo "Doing mostlyclean 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}" \
- info) \
+ mostlyclean) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-itcl info-itcl
-maybe-info-itcl:
+.PHONY: maybe-clean-automake clean-automake
+maybe-clean-automake:
+@if automake
+maybe-clean-automake: clean-automake
-info-itcl: \
- configure-itcl
- @[ -f ./itcl/Makefile ] || exit 0; \
+clean-automake:
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in itcl" ; \
- (cd itcl && \
+ echo "Doing clean 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}" \
- info) \
+ clean) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-ld info-ld
-maybe-info-ld:
+.PHONY: maybe-distclean-automake distclean-automake
+maybe-distclean-automake:
+@if automake
+maybe-distclean-automake: distclean-automake
-info-ld: \
- configure-ld
- @[ -f ./ld/Makefile ] || exit 0; \
+distclean-automake:
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in ld" ; \
- (cd ld && \
+ echo "Doing distclean 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}" \
- info) \
+ distclean) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-libgui info-libgui
-maybe-info-libgui:
+.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake
+maybe-maintainer-clean-automake:
+@if automake
+maybe-maintainer-clean-automake: maintainer-clean-automake
-info-libgui: \
- configure-libgui
- @[ -f ./libgui/Makefile ] || exit 0; \
+maintainer-clean-automake:
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libgui" ; \
- (cd libgui && \
+ echo "Doing maintainer-clean 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}" \
- info) \
+ maintainer-clean) \
|| exit 1
+@endif automake
-.PHONY: maybe-info-libiberty info-libiberty
-maybe-info-libiberty:
-info-libiberty: \
- configure-libiberty
- @[ -f ./libiberty/Makefile ] || exit 0; \
+
+.PHONY: configure-bash maybe-configure-bash
+maybe-configure-bash:
+@if bash
+maybe-configure-bash: configure-bash
+configure-bash:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bash/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bash ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/bash; \
+ cd "$(HOST_SUBDIR)/bash" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bash/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bash"; \
+ libsrcdir="$$s/bash"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif bash
+
+
+
+
+
+.PHONY: all-bash maybe-all-bash
+maybe-all-bash:
+@if bash
+TARGET-bash=all
+maybe-all-bash: all-bash
+all-bash: configure-bash
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bash && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bash))
+@endif bash
+
+
+
+
+.PHONY: check-bash maybe-check-bash
+maybe-check-bash:
+@if bash
+maybe-check-bash: check-bash
+
+check-bash:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bash && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif bash
+
+.PHONY: install-bash maybe-install-bash
+maybe-install-bash:
+@if bash
+maybe-install-bash: install-bash
+
+install-bash: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bash && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif bash
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-bash info-bash
+maybe-info-bash:
+@if bash
+maybe-info-bash: info-bash
+
+info-bash: \
+ configure-bash
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libiberty" ; \
- (cd libiberty && \
+ echo "Doing info 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}" \
@@ -1547,241 +3898,719 @@ info-libiberty: \
info) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-libtool info-libtool
-maybe-info-libtool:
+.PHONY: maybe-dvi-bash dvi-bash
+maybe-dvi-bash:
+@if bash
+maybe-dvi-bash: dvi-bash
-info-libtool: \
- configure-libtool
- @[ -f ./libtool/Makefile ] || exit 0; \
+dvi-bash: \
+ configure-bash
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libtool" ; \
- (cd libtool && \
+ echo "Doing dvi 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}" \
- info) \
+ dvi) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-m4 info-m4
-maybe-info-m4:
+.PHONY: maybe-html-bash html-bash
+maybe-html-bash:
+@if bash
+maybe-html-bash: html-bash
-info-m4: \
- configure-m4
- @[ -f ./m4/Makefile ] || exit 0; \
+html-bash: \
+ configure-bash
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in m4" ; \
- (cd m4 && \
+ echo "Doing html 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}" \
- info) \
+ html) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-make info-make
-maybe-info-make:
+.PHONY: maybe-TAGS-bash TAGS-bash
+maybe-TAGS-bash:
+@if bash
+maybe-TAGS-bash: TAGS-bash
-info-make: \
- configure-make
- @[ -f ./make/Makefile ] || exit 0; \
+TAGS-bash: \
+ configure-bash
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in make" ; \
- (cd make && \
+ echo "Doing TAGS 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}" \
- info) \
+ TAGS) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-mmalloc info-mmalloc
-maybe-info-mmalloc:
+.PHONY: maybe-install-info-bash install-info-bash
+maybe-install-info-bash:
+@if bash
+maybe-install-info-bash: install-info-bash
-info-mmalloc: \
- configure-mmalloc
- @[ -f ./mmalloc/Makefile ] || exit 0; \
+install-info-bash: \
+ configure-bash \
+ info-bash
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in mmalloc" ; \
- (cd mmalloc && \
+ echo "Doing install-info 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}" \
- info) \
+ install-info) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-patch info-patch
-maybe-info-patch:
+.PHONY: maybe-install-html-bash install-html-bash
+maybe-install-html-bash:
+@if bash
+maybe-install-html-bash: install-html-bash
-info-patch: \
- configure-patch
- @[ -f ./patch/Makefile ] || exit 0; \
+install-html-bash: \
+ configure-bash \
+ html-bash
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in patch" ; \
- (cd patch && \
+ echo "Doing install-html 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}" \
- info) \
+ install-html) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-perl info-perl
-maybe-info-perl:
+.PHONY: maybe-installcheck-bash installcheck-bash
+maybe-installcheck-bash:
+@if bash
+maybe-installcheck-bash: installcheck-bash
-info-perl: \
- configure-perl
- @[ -f ./perl/Makefile ] || exit 0; \
+installcheck-bash: \
+ configure-bash
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in perl" ; \
- (cd perl && \
+ echo "Doing installcheck 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}" \
- info) \
+ installcheck) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-prms info-prms
-maybe-info-prms:
+.PHONY: maybe-mostlyclean-bash mostlyclean-bash
+maybe-mostlyclean-bash:
+@if bash
+maybe-mostlyclean-bash: mostlyclean-bash
-info-prms: \
- configure-prms
- @[ -f ./prms/Makefile ] || exit 0; \
+mostlyclean-bash:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in prms" ; \
- (cd prms && \
+ echo "Doing mostlyclean 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}" \
- info) \
+ mostlyclean) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-rcs info-rcs
-maybe-info-rcs:
+.PHONY: maybe-clean-bash clean-bash
+maybe-clean-bash:
+@if bash
+maybe-clean-bash: clean-bash
-info-rcs: \
- configure-rcs
- @[ -f ./rcs/Makefile ] || exit 0; \
+clean-bash:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in rcs" ; \
- (cd rcs && \
+ echo "Doing clean 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}" \
- info) \
+ clean) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-readline info-readline
-maybe-info-readline:
+.PHONY: maybe-distclean-bash distclean-bash
+maybe-distclean-bash:
+@if bash
+maybe-distclean-bash: distclean-bash
-info-readline: \
- configure-readline
- @[ -f ./readline/Makefile ] || exit 0; \
+distclean-bash:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in readline" ; \
- (cd readline && \
+ echo "Doing distclean 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}" \
- info) \
+ distclean) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-release info-release
-maybe-info-release:
+.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash
+maybe-maintainer-clean-bash:
+@if bash
+maybe-maintainer-clean-bash: maintainer-clean-bash
-info-release: \
- configure-release
- @[ -f ./release/Makefile ] || exit 0; \
+maintainer-clean-bash:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in release" ; \
- (cd release && \
+ echo "Doing maintainer-clean 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}" \
- info) \
+ maintainer-clean) \
|| exit 1
+@endif bash
-.PHONY: maybe-info-recode info-recode
-maybe-info-recode:
-info-recode: \
- configure-recode
- @[ -f ./recode/Makefile ] || exit 0; \
+
+.PHONY: configure-bfd maybe-configure-bfd
+maybe-configure-bfd:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/bfd; \
+ cd "$(HOST_SUBDIR)/bfd" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bfd"; \
+ libsrcdir="$$s/bfd"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif bfd
+
+
+
+.PHONY: configure-stage1-bfd maybe-configure-stage1-bfd
+maybe-configure-stage1-bfd:
+@if bfd-bootstrap
+maybe-configure-stage1-bfd: configure-stage1-bfd
+configure-stage1-bfd:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bfd"; \
+ libsrcdir="$$s/bfd"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif bfd-bootstrap
+
+.PHONY: configure-stage2-bfd maybe-configure-stage2-bfd
+maybe-configure-stage2-bfd:
+@if bfd-bootstrap
+maybe-configure-stage2-bfd: configure-stage2-bfd
+configure-stage2-bfd:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bfd"; \
+ libsrcdir="$$s/bfd"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif bfd-bootstrap
+
+.PHONY: configure-stage3-bfd maybe-configure-stage3-bfd
+maybe-configure-stage3-bfd:
+@if bfd-bootstrap
+maybe-configure-stage3-bfd: configure-stage3-bfd
+configure-stage3-bfd:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bfd"; \
+ libsrcdir="$$s/bfd"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif bfd-bootstrap
+
+.PHONY: configure-stage4-bfd maybe-configure-stage4-bfd
+maybe-configure-stage4-bfd:
+@if bfd-bootstrap
+maybe-configure-stage4-bfd: configure-stage4-bfd
+configure-stage4-bfd:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bfd"; \
+ libsrcdir="$$s/bfd"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif bfd-bootstrap
+
+.PHONY: configure-stageprofile-bfd maybe-configure-stageprofile-bfd
+maybe-configure-stageprofile-bfd:
+@if bfd-bootstrap
+maybe-configure-stageprofile-bfd: configure-stageprofile-bfd
+configure-stageprofile-bfd:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bfd"; \
+ libsrcdir="$$s/bfd"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif bfd-bootstrap
+
+.PHONY: configure-stagefeedback-bfd maybe-configure-stagefeedback-bfd
+maybe-configure-stagefeedback-bfd:
+@if bfd-bootstrap
+maybe-configure-stagefeedback-bfd: configure-stagefeedback-bfd
+configure-stagefeedback-bfd:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bfd"; \
+ libsrcdir="$$s/bfd"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif bfd-bootstrap
+
+
+
+
+
+.PHONY: all-bfd maybe-all-bfd
+maybe-all-bfd:
+@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) \
+ (cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bfd))
+@endif bfd
+
+
+
+.PHONY: all-stage1-bfd maybe-all-stage1-bfd
+.PHONY: clean-stage1-bfd maybe-clean-stage1-bfd
+maybe-all-stage1-bfd:
+maybe-clean-stage1-bfd:
+@if bfd-bootstrap
+maybe-all-stage1-bfd: all-stage1-bfd
+all-stage1: all-stage1-bfd
+TARGET-stage1-bfd = $(TARGET-bfd)
+all-stage1-bfd: configure-stage1-bfd
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/bfd && \
+ $(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; \
+ cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif bfd-bootstrap
+
+
+.PHONY: all-stage2-bfd maybe-all-stage2-bfd
+.PHONY: clean-stage2-bfd maybe-clean-stage2-bfd
+maybe-all-stage2-bfd:
+maybe-clean-stage2-bfd:
+@if bfd-bootstrap
+maybe-all-stage2-bfd: all-stage2-bfd
+all-stage2: all-stage2-bfd
+TARGET-stage2-bfd = $(TARGET-bfd)
+all-stage2-bfd: configure-stage2-bfd
+ @[ $(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)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif bfd-bootstrap
+
+
+.PHONY: all-stage3-bfd maybe-all-stage3-bfd
+.PHONY: clean-stage3-bfd maybe-clean-stage3-bfd
+maybe-all-stage3-bfd:
+maybe-clean-stage3-bfd:
+@if bfd-bootstrap
+maybe-all-stage3-bfd: all-stage3-bfd
+all-stage3: all-stage3-bfd
+TARGET-stage3-bfd = $(TARGET-bfd)
+all-stage3-bfd: configure-stage3-bfd
+ @[ $(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)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif bfd-bootstrap
+
+
+.PHONY: all-stage4-bfd maybe-all-stage4-bfd
+.PHONY: clean-stage4-bfd maybe-clean-stage4-bfd
+maybe-all-stage4-bfd:
+maybe-clean-stage4-bfd:
+@if bfd-bootstrap
+maybe-all-stage4-bfd: all-stage4-bfd
+all-stage4: all-stage4-bfd
+TARGET-stage4-bfd = $(TARGET-bfd)
+all-stage4-bfd: configure-stage4-bfd
+ @[ $(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)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif bfd-bootstrap
+
+
+.PHONY: all-stageprofile-bfd maybe-all-stageprofile-bfd
+.PHONY: clean-stageprofile-bfd maybe-clean-stageprofile-bfd
+maybe-all-stageprofile-bfd:
+maybe-clean-stageprofile-bfd:
+@if bfd-bootstrap
+maybe-all-stageprofile-bfd: all-stageprofile-bfd
+all-stageprofile: all-stageprofile-bfd
+TARGET-stageprofile-bfd = $(TARGET-bfd)
+all-stageprofile-bfd: configure-stageprofile-bfd
+ @[ $(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)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif bfd-bootstrap
+
+
+.PHONY: all-stagefeedback-bfd maybe-all-stagefeedback-bfd
+.PHONY: clean-stagefeedback-bfd maybe-clean-stagefeedback-bfd
+maybe-all-stagefeedback-bfd:
+maybe-clean-stagefeedback-bfd:
+@if bfd-bootstrap
+maybe-all-stagefeedback-bfd: all-stagefeedback-bfd
+all-stagefeedback: all-stagefeedback-bfd
+TARGET-stagefeedback-bfd = $(TARGET-bfd)
+all-stagefeedback-bfd: configure-stagefeedback-bfd
+ @[ $(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)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif bfd-bootstrap
+
+
+
+
+
+.PHONY: check-bfd maybe-check-bfd
+maybe-check-bfd:
+@if bfd
+maybe-check-bfd: check-bfd
+
+check-bfd:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif bfd
+
+.PHONY: install-bfd maybe-install-bfd
+maybe-install-bfd:
+@if bfd
+maybe-install-bfd: install-bfd
+
+install-bfd: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif bfd
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-bfd info-bfd
+maybe-info-bfd:
+@if bfd
+maybe-info-bfd: info-bfd
+
+info-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in recode" ; \
- (cd recode && \
+ echo "Doing info 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}" \
@@ -1789,241 +4618,709 @@ info-recode: \
info) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-sed info-sed
-maybe-info-sed:
+.PHONY: maybe-dvi-bfd dvi-bfd
+maybe-dvi-bfd:
+@if bfd
+maybe-dvi-bfd: dvi-bfd
-info-sed: \
- configure-sed
- @[ -f ./sed/Makefile ] || exit 0; \
+dvi-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in sed" ; \
- (cd sed && \
+ echo "Doing dvi 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}" \
- info) \
+ dvi) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-send-pr info-send-pr
-maybe-info-send-pr:
+.PHONY: maybe-html-bfd html-bfd
+maybe-html-bfd:
+@if bfd
+maybe-html-bfd: html-bfd
-info-send-pr: \
- configure-send-pr
- @[ -f ./send-pr/Makefile ] || exit 0; \
+html-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in send-pr" ; \
- (cd send-pr && \
+ echo "Doing html 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}" \
- info) \
+ html) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-shellutils info-shellutils
-maybe-info-shellutils:
+.PHONY: maybe-TAGS-bfd TAGS-bfd
+maybe-TAGS-bfd:
+@if bfd
+maybe-TAGS-bfd: TAGS-bfd
-info-shellutils: \
- configure-shellutils
- @[ -f ./shellutils/Makefile ] || exit 0; \
+TAGS-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in shellutils" ; \
- (cd shellutils && \
+ echo "Doing TAGS 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}" \
- info) \
+ TAGS) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-sid info-sid
-maybe-info-sid:
+.PHONY: maybe-install-info-bfd install-info-bfd
+maybe-install-info-bfd:
+@if bfd
+maybe-install-info-bfd: install-info-bfd
-info-sid: \
- configure-sid
- @[ -f ./sid/Makefile ] || exit 0; \
+install-info-bfd: \
+ configure-bfd \
+ info-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in sid" ; \
- (cd sid && \
+ echo "Doing install-info 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}" \
- info) \
+ install-info) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-sim info-sim
-maybe-info-sim:
+.PHONY: maybe-install-html-bfd install-html-bfd
+maybe-install-html-bfd:
+@if bfd
+maybe-install-html-bfd: install-html-bfd
-info-sim: \
- configure-sim
- @[ -f ./sim/Makefile ] || exit 0; \
+install-html-bfd: \
+ configure-bfd \
+ html-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in sim" ; \
- (cd sim && \
+ echo "Doing install-html 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}" \
- info) \
+ install-html) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-tar info-tar
-maybe-info-tar:
+.PHONY: maybe-installcheck-bfd installcheck-bfd
+maybe-installcheck-bfd:
+@if bfd
+maybe-installcheck-bfd: installcheck-bfd
-info-tar: \
- configure-tar
- @[ -f ./tar/Makefile ] || exit 0; \
+installcheck-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in tar" ; \
- (cd tar && \
+ echo "Doing installcheck 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}" \
- info) \
+ installcheck) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-texinfo info-texinfo
-maybe-info-texinfo:
+.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd
+maybe-mostlyclean-bfd:
+@if bfd
+maybe-mostlyclean-bfd: mostlyclean-bfd
-info-texinfo: \
- configure-texinfo
- @[ -f ./texinfo/Makefile ] || exit 0; \
+mostlyclean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in texinfo" ; \
- (cd texinfo && \
+ echo "Doing mostlyclean 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}" \
- info) \
+ mostlyclean) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-textutils info-textutils
-maybe-info-textutils:
+.PHONY: maybe-clean-bfd clean-bfd
+maybe-clean-bfd:
+@if bfd
+maybe-clean-bfd: clean-bfd
-info-textutils: \
- configure-textutils
- @[ -f ./textutils/Makefile ] || exit 0; \
+clean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in textutils" ; \
- (cd textutils && \
+ echo "Doing clean 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}" \
- info) \
+ clean) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-time info-time
-maybe-info-time:
+.PHONY: maybe-distclean-bfd distclean-bfd
+maybe-distclean-bfd:
+@if bfd
+maybe-distclean-bfd: distclean-bfd
-info-time: \
- configure-time
- @[ -f ./time/Makefile ] || exit 0; \
+distclean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in time" ; \
- (cd time && \
+ echo "Doing distclean 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}" \
- info) \
+ distclean) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-uudecode info-uudecode
-maybe-info-uudecode:
+.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd
+maybe-maintainer-clean-bfd:
+@if bfd
+maybe-maintainer-clean-bfd: maintainer-clean-bfd
-info-uudecode: \
- configure-uudecode
- @[ -f ./uudecode/Makefile ] || exit 0; \
+maintainer-clean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in uudecode" ; \
- (cd uudecode && \
+ echo "Doing maintainer-clean 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}" \
- info) \
+ maintainer-clean) \
|| exit 1
+@endif bfd
-.PHONY: maybe-info-wdiff info-wdiff
-maybe-info-wdiff:
-info-wdiff: \
- configure-wdiff
- @[ -f ./wdiff/Makefile ] || exit 0; \
+
+.PHONY: configure-opcodes maybe-configure-opcodes
+maybe-configure-opcodes:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/opcodes; \
+ cd "$(HOST_SUBDIR)/opcodes" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/opcodes"; \
+ libsrcdir="$$s/opcodes"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif opcodes
+
+
+
+.PHONY: configure-stage1-opcodes maybe-configure-stage1-opcodes
+maybe-configure-stage1-opcodes:
+@if opcodes-bootstrap
+maybe-configure-stage1-opcodes: configure-stage1-opcodes
+configure-stage1-opcodes:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/opcodes"; \
+ libsrcdir="$$s/opcodes"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif opcodes-bootstrap
+
+.PHONY: configure-stage2-opcodes maybe-configure-stage2-opcodes
+maybe-configure-stage2-opcodes:
+@if opcodes-bootstrap
+maybe-configure-stage2-opcodes: configure-stage2-opcodes
+configure-stage2-opcodes:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/opcodes"; \
+ libsrcdir="$$s/opcodes"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif opcodes-bootstrap
+
+.PHONY: configure-stage3-opcodes maybe-configure-stage3-opcodes
+maybe-configure-stage3-opcodes:
+@if opcodes-bootstrap
+maybe-configure-stage3-opcodes: configure-stage3-opcodes
+configure-stage3-opcodes:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/opcodes"; \
+ libsrcdir="$$s/opcodes"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif opcodes-bootstrap
+
+.PHONY: configure-stage4-opcodes maybe-configure-stage4-opcodes
+maybe-configure-stage4-opcodes:
+@if opcodes-bootstrap
+maybe-configure-stage4-opcodes: configure-stage4-opcodes
+configure-stage4-opcodes:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/opcodes"; \
+ libsrcdir="$$s/opcodes"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif opcodes-bootstrap
+
+.PHONY: configure-stageprofile-opcodes maybe-configure-stageprofile-opcodes
+maybe-configure-stageprofile-opcodes:
+@if opcodes-bootstrap
+maybe-configure-stageprofile-opcodes: configure-stageprofile-opcodes
+configure-stageprofile-opcodes:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/opcodes"; \
+ libsrcdir="$$s/opcodes"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif opcodes-bootstrap
+
+.PHONY: configure-stagefeedback-opcodes maybe-configure-stagefeedback-opcodes
+maybe-configure-stagefeedback-opcodes:
+@if opcodes-bootstrap
+maybe-configure-stagefeedback-opcodes: configure-stagefeedback-opcodes
+configure-stagefeedback-opcodes:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/opcodes"; \
+ libsrcdir="$$s/opcodes"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif opcodes-bootstrap
+
+
+
+
+
+.PHONY: all-opcodes maybe-all-opcodes
+maybe-all-opcodes:
+@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) \
+ (cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-opcodes))
+@endif opcodes
+
+
+
+.PHONY: all-stage1-opcodes maybe-all-stage1-opcodes
+.PHONY: clean-stage1-opcodes maybe-clean-stage1-opcodes
+maybe-all-stage1-opcodes:
+maybe-clean-stage1-opcodes:
+@if opcodes-bootstrap
+maybe-all-stage1-opcodes: all-stage1-opcodes
+all-stage1: all-stage1-opcodes
+TARGET-stage1-opcodes = $(TARGET-opcodes)
+all-stage1-opcodes: configure-stage1-opcodes
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/opcodes && \
+ $(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; \
+ cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif opcodes-bootstrap
+
+
+.PHONY: all-stage2-opcodes maybe-all-stage2-opcodes
+.PHONY: clean-stage2-opcodes maybe-clean-stage2-opcodes
+maybe-all-stage2-opcodes:
+maybe-clean-stage2-opcodes:
+@if opcodes-bootstrap
+maybe-all-stage2-opcodes: all-stage2-opcodes
+all-stage2: all-stage2-opcodes
+TARGET-stage2-opcodes = $(TARGET-opcodes)
+all-stage2-opcodes: configure-stage2-opcodes
+ @[ $(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)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif opcodes-bootstrap
+
+
+.PHONY: all-stage3-opcodes maybe-all-stage3-opcodes
+.PHONY: clean-stage3-opcodes maybe-clean-stage3-opcodes
+maybe-all-stage3-opcodes:
+maybe-clean-stage3-opcodes:
+@if opcodes-bootstrap
+maybe-all-stage3-opcodes: all-stage3-opcodes
+all-stage3: all-stage3-opcodes
+TARGET-stage3-opcodes = $(TARGET-opcodes)
+all-stage3-opcodes: configure-stage3-opcodes
+ @[ $(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)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif opcodes-bootstrap
+
+
+.PHONY: all-stage4-opcodes maybe-all-stage4-opcodes
+.PHONY: clean-stage4-opcodes maybe-clean-stage4-opcodes
+maybe-all-stage4-opcodes:
+maybe-clean-stage4-opcodes:
+@if opcodes-bootstrap
+maybe-all-stage4-opcodes: all-stage4-opcodes
+all-stage4: all-stage4-opcodes
+TARGET-stage4-opcodes = $(TARGET-opcodes)
+all-stage4-opcodes: configure-stage4-opcodes
+ @[ $(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)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif opcodes-bootstrap
+
+
+.PHONY: all-stageprofile-opcodes maybe-all-stageprofile-opcodes
+.PHONY: clean-stageprofile-opcodes maybe-clean-stageprofile-opcodes
+maybe-all-stageprofile-opcodes:
+maybe-clean-stageprofile-opcodes:
+@if opcodes-bootstrap
+maybe-all-stageprofile-opcodes: all-stageprofile-opcodes
+all-stageprofile: all-stageprofile-opcodes
+TARGET-stageprofile-opcodes = $(TARGET-opcodes)
+all-stageprofile-opcodes: configure-stageprofile-opcodes
+ @[ $(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)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif opcodes-bootstrap
+
+
+.PHONY: all-stagefeedback-opcodes maybe-all-stagefeedback-opcodes
+.PHONY: clean-stagefeedback-opcodes maybe-clean-stagefeedback-opcodes
+maybe-all-stagefeedback-opcodes:
+maybe-clean-stagefeedback-opcodes:
+@if opcodes-bootstrap
+maybe-all-stagefeedback-opcodes: all-stagefeedback-opcodes
+all-stagefeedback: all-stagefeedback-opcodes
+TARGET-stagefeedback-opcodes = $(TARGET-opcodes)
+all-stagefeedback-opcodes: configure-stagefeedback-opcodes
+ @[ $(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)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif opcodes-bootstrap
+
+
+
+
+
+.PHONY: check-opcodes maybe-check-opcodes
+maybe-check-opcodes:
+@if opcodes
+maybe-check-opcodes: check-opcodes
+
+check-opcodes:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif opcodes
+
+.PHONY: install-opcodes maybe-install-opcodes
+maybe-install-opcodes:
+@if opcodes
+maybe-install-opcodes: install-opcodes
+
+install-opcodes: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif opcodes
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-opcodes info-opcodes
+maybe-info-opcodes:
+@if opcodes
+maybe-info-opcodes: info-opcodes
+
+info-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in wdiff" ; \
- (cd wdiff && \
+ echo "Doing info 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}" \
@@ -2031,244 +5328,709 @@ info-wdiff: \
info) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-zip info-zip
-maybe-info-zip:
+.PHONY: maybe-dvi-opcodes dvi-opcodes
+maybe-dvi-opcodes:
+@if opcodes
+maybe-dvi-opcodes: dvi-opcodes
-info-zip: \
- configure-zip
- @[ -f ./zip/Makefile ] || exit 0; \
+dvi-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in zip" ; \
- (cd zip && \
+ echo "Doing dvi 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}" \
- info) \
+ dvi) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-zlib info-zlib
-maybe-info-zlib:
+.PHONY: maybe-html-opcodes html-opcodes
+maybe-html-opcodes:
+@if opcodes
+maybe-html-opcodes: html-opcodes
-info-zlib: \
- configure-zlib
- @[ -f ./zlib/Makefile ] || exit 0; \
+html-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in zlib" ; \
- (cd zlib && \
+ echo "Doing html 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}" \
- info) \
+ html) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-gdb info-gdb
-maybe-info-gdb:
+.PHONY: maybe-TAGS-opcodes TAGS-opcodes
+maybe-TAGS-opcodes:
+@if opcodes
+maybe-TAGS-opcodes: TAGS-opcodes
-info-gdb: \
- configure-gdb
- @[ -f ./gdb/Makefile ] || exit 0; \
+TAGS-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gdb" ; \
- (cd gdb && \
+ echo "Doing TAGS 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}" \
- info) \
+ TAGS) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-expect info-expect
-maybe-info-expect:
+.PHONY: maybe-install-info-opcodes install-info-opcodes
+maybe-install-info-opcodes:
+@if opcodes
+maybe-install-info-opcodes: install-info-opcodes
-info-expect: \
- configure-expect
- @[ -f ./expect/Makefile ] || exit 0; \
+install-info-opcodes: \
+ configure-opcodes \
+ info-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in expect" ; \
- (cd expect && \
+ echo "Doing install-info 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}" \
- info) \
+ install-info) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-guile info-guile
-maybe-info-guile:
+.PHONY: maybe-install-html-opcodes install-html-opcodes
+maybe-install-html-opcodes:
+@if opcodes
+maybe-install-html-opcodes: install-html-opcodes
-info-guile: \
- configure-guile
- @[ -f ./guile/Makefile ] || exit 0; \
+install-html-opcodes: \
+ configure-opcodes \
+ html-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in guile" ; \
- (cd guile && \
+ echo "Doing install-html 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}" \
- info) \
+ install-html) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-tk info-tk
-maybe-info-tk:
+.PHONY: maybe-installcheck-opcodes installcheck-opcodes
+maybe-installcheck-opcodes:
+@if opcodes
+maybe-installcheck-opcodes: installcheck-opcodes
-info-tk: \
- configure-tk
- @[ -f ./tk/Makefile ] || exit 0; \
+installcheck-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in tk" ; \
- (cd tk && \
+ echo "Doing installcheck 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}" \
- info) \
+ installcheck) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-tix info-tix
-maybe-info-tix:
+.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes
+maybe-mostlyclean-opcodes:
+@if opcodes
+maybe-mostlyclean-opcodes: mostlyclean-opcodes
-info-tix: \
- configure-tix
- @[ -f ./tix/Makefile ] || exit 0; \
+mostlyclean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in tix" ; \
- (cd tix && \
+ echo "Doing mostlyclean 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}" \
- info) \
+ mostlyclean) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-libtermcap info-libtermcap
-maybe-info-libtermcap:
+.PHONY: maybe-clean-opcodes clean-opcodes
+maybe-clean-opcodes:
+@if opcodes
+maybe-clean-opcodes: clean-opcodes
-info-libtermcap: \
- configure-libtermcap
- @[ -f ./libtermcap/Makefile ] || exit 0; \
+clean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libtermcap" ; \
- (cd libtermcap && \
+ echo "Doing clean 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}" \
- info) \
+ clean) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-utils info-utils
-maybe-info-utils:
+.PHONY: maybe-distclean-opcodes distclean-opcodes
+maybe-distclean-opcodes:
+@if opcodes
+maybe-distclean-opcodes: distclean-opcodes
-info-utils: \
- configure-utils
- @[ -f ./utils/Makefile ] || exit 0; \
+distclean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in utils" ; \
- (cd utils && \
+ echo "Doing distclean 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}" \
- info) \
+ distclean) \
|| exit 1
+@endif opcodes
+.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes
+maybe-maintainer-clean-opcodes:
+@if opcodes
+maybe-maintainer-clean-opcodes: maintainer-clean-opcodes
-# Target modules.
-
-.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3
-maybe-info-target-libstdc++-v3:
-
-info-target-libstdc++-v3: \
- configure-target-libstdc++-v3
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+maintainer-clean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ echo "Doing maintainer-clean 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}" \
- info) \
+ maintainer-clean) \
|| exit 1
+@endif opcodes
-.PHONY: maybe-info-target-newlib info-target-newlib
-maybe-info-target-newlib:
-info-target-newlib: \
- configure-target-newlib
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+
+.PHONY: configure-binutils maybe-configure-binutils
+maybe-configure-binutils:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/binutils; \
+ cd "$(HOST_SUBDIR)/binutils" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/binutils"; \
+ libsrcdir="$$s/binutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif binutils
+
+
+
+.PHONY: configure-stage1-binutils maybe-configure-stage1-binutils
+maybe-configure-stage1-binutils:
+@if binutils-bootstrap
+maybe-configure-stage1-binutils: configure-stage1-binutils
+configure-stage1-binutils:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/binutils"; \
+ libsrcdir="$$s/binutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif binutils-bootstrap
+
+.PHONY: configure-stage2-binutils maybe-configure-stage2-binutils
+maybe-configure-stage2-binutils:
+@if binutils-bootstrap
+maybe-configure-stage2-binutils: configure-stage2-binutils
+configure-stage2-binutils:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/binutils"; \
+ libsrcdir="$$s/binutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif binutils-bootstrap
+
+.PHONY: configure-stage3-binutils maybe-configure-stage3-binutils
+maybe-configure-stage3-binutils:
+@if binutils-bootstrap
+maybe-configure-stage3-binutils: configure-stage3-binutils
+configure-stage3-binutils:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/binutils"; \
+ libsrcdir="$$s/binutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif binutils-bootstrap
+
+.PHONY: configure-stage4-binutils maybe-configure-stage4-binutils
+maybe-configure-stage4-binutils:
+@if binutils-bootstrap
+maybe-configure-stage4-binutils: configure-stage4-binutils
+configure-stage4-binutils:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/binutils"; \
+ libsrcdir="$$s/binutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif binutils-bootstrap
+
+.PHONY: configure-stageprofile-binutils maybe-configure-stageprofile-binutils
+maybe-configure-stageprofile-binutils:
+@if binutils-bootstrap
+maybe-configure-stageprofile-binutils: configure-stageprofile-binutils
+configure-stageprofile-binutils:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/binutils"; \
+ libsrcdir="$$s/binutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif binutils-bootstrap
+
+.PHONY: configure-stagefeedback-binutils maybe-configure-stagefeedback-binutils
+maybe-configure-stagefeedback-binutils:
+@if binutils-bootstrap
+maybe-configure-stagefeedback-binutils: configure-stagefeedback-binutils
+configure-stagefeedback-binutils:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/binutils"; \
+ libsrcdir="$$s/binutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif binutils-bootstrap
+
+
+
+
+
+.PHONY: all-binutils maybe-all-binutils
+maybe-all-binutils:
+@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) \
+ (cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-binutils))
+@endif binutils
+
+
+
+.PHONY: all-stage1-binutils maybe-all-stage1-binutils
+.PHONY: clean-stage1-binutils maybe-clean-stage1-binutils
+maybe-all-stage1-binutils:
+maybe-clean-stage1-binutils:
+@if binutils-bootstrap
+maybe-all-stage1-binutils: all-stage1-binutils
+all-stage1: all-stage1-binutils
+TARGET-stage1-binutils = $(TARGET-binutils)
+all-stage1-binutils: configure-stage1-binutils
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/binutils && \
+ $(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; \
+ cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif binutils-bootstrap
+
+
+.PHONY: all-stage2-binutils maybe-all-stage2-binutils
+.PHONY: clean-stage2-binutils maybe-clean-stage2-binutils
+maybe-all-stage2-binutils:
+maybe-clean-stage2-binutils:
+@if binutils-bootstrap
+maybe-all-stage2-binutils: all-stage2-binutils
+all-stage2: all-stage2-binutils
+TARGET-stage2-binutils = $(TARGET-binutils)
+all-stage2-binutils: configure-stage2-binutils
+ @[ $(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)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif binutils-bootstrap
+
+
+.PHONY: all-stage3-binutils maybe-all-stage3-binutils
+.PHONY: clean-stage3-binutils maybe-clean-stage3-binutils
+maybe-all-stage3-binutils:
+maybe-clean-stage3-binutils:
+@if binutils-bootstrap
+maybe-all-stage3-binutils: all-stage3-binutils
+all-stage3: all-stage3-binutils
+TARGET-stage3-binutils = $(TARGET-binutils)
+all-stage3-binutils: configure-stage3-binutils
+ @[ $(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)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif binutils-bootstrap
+
+
+.PHONY: all-stage4-binutils maybe-all-stage4-binutils
+.PHONY: clean-stage4-binutils maybe-clean-stage4-binutils
+maybe-all-stage4-binutils:
+maybe-clean-stage4-binutils:
+@if binutils-bootstrap
+maybe-all-stage4-binutils: all-stage4-binutils
+all-stage4: all-stage4-binutils
+TARGET-stage4-binutils = $(TARGET-binutils)
+all-stage4-binutils: configure-stage4-binutils
+ @[ $(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)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif binutils-bootstrap
+
+
+.PHONY: all-stageprofile-binutils maybe-all-stageprofile-binutils
+.PHONY: clean-stageprofile-binutils maybe-clean-stageprofile-binutils
+maybe-all-stageprofile-binutils:
+maybe-clean-stageprofile-binutils:
+@if binutils-bootstrap
+maybe-all-stageprofile-binutils: all-stageprofile-binutils
+all-stageprofile: all-stageprofile-binutils
+TARGET-stageprofile-binutils = $(TARGET-binutils)
+all-stageprofile-binutils: configure-stageprofile-binutils
+ @[ $(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)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif binutils-bootstrap
+
+
+.PHONY: all-stagefeedback-binutils maybe-all-stagefeedback-binutils
+.PHONY: clean-stagefeedback-binutils maybe-clean-stagefeedback-binutils
+maybe-all-stagefeedback-binutils:
+maybe-clean-stagefeedback-binutils:
+@if binutils-bootstrap
+maybe-all-stagefeedback-binutils: all-stagefeedback-binutils
+all-stagefeedback: all-stagefeedback-binutils
+TARGET-stagefeedback-binutils = $(TARGET-binutils)
+all-stagefeedback-binutils: configure-stagefeedback-binutils
+ @[ $(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)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif binutils-bootstrap
+
+
+
+
+
+.PHONY: check-binutils maybe-check-binutils
+maybe-check-binutils:
+@if binutils
+maybe-check-binutils: check-binutils
+
+check-binutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif binutils
+
+.PHONY: install-binutils maybe-install-binutils
+maybe-install-binutils:
+@if binutils
+maybe-install-binutils: install-binutils
+
+install-binutils: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif binutils
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-binutils info-binutils
+maybe-info-binutils:
+@if binutils
+maybe-info-binutils: info-binutils
+
+info-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ echo "Doing info 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}" \
@@ -2276,241 +6038,356 @@ info-target-newlib: \
info) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-libf2c info-target-libf2c
-maybe-info-target-libf2c:
+.PHONY: maybe-dvi-binutils dvi-binutils
+maybe-dvi-binutils:
+@if binutils
+maybe-dvi-binutils: dvi-binutils
-info-target-libf2c: \
- configure-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+dvi-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ echo "Doing dvi 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}" \
- info) \
+ dvi) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-libobjc info-target-libobjc
-maybe-info-target-libobjc:
+.PHONY: maybe-html-binutils html-binutils
+maybe-html-binutils:
+@if binutils
+maybe-html-binutils: html-binutils
-info-target-libobjc: \
- configure-target-libobjc
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+html-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
+ echo "Doing html 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}" \
- info) \
+ html) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-libtermcap info-target-libtermcap
-maybe-info-target-libtermcap:
+.PHONY: maybe-TAGS-binutils TAGS-binutils
+maybe-TAGS-binutils:
+@if binutils
+maybe-TAGS-binutils: TAGS-binutils
-info-target-libtermcap: \
- configure-target-libtermcap
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+TAGS-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libtermcap && \
+ echo "Doing TAGS 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}" \
- info) \
+ TAGS) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-winsup info-target-winsup
-maybe-info-target-winsup:
+.PHONY: maybe-install-info-binutils install-info-binutils
+maybe-install-info-binutils:
+@if binutils
+maybe-install-info-binutils: install-info-binutils
-info-target-winsup: \
- configure-target-winsup
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+install-info-binutils: \
+ configure-binutils \
+ info-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/winsup && \
+ echo "Doing install-info 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}" \
- info) \
+ install-info) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-libgloss info-target-libgloss
-maybe-info-target-libgloss:
+.PHONY: maybe-install-html-binutils install-html-binutils
+maybe-install-html-binutils:
+@if binutils
+maybe-install-html-binutils: install-html-binutils
-info-target-libgloss: \
- configure-target-libgloss
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+install-html-binutils: \
+ configure-binutils \
+ html-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
+ echo "Doing install-html 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}" \
- info) \
+ install-html) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-libiberty info-target-libiberty
-maybe-info-target-libiberty:
+.PHONY: maybe-installcheck-binutils installcheck-binutils
+maybe-installcheck-binutils:
+@if binutils
+maybe-installcheck-binutils: installcheck-binutils
-info-target-libiberty: \
- configure-target-libiberty
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+installcheck-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
+ echo "Doing installcheck 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}" \
- info) \
+ installcheck) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-gperf info-target-gperf
-maybe-info-target-gperf:
+.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils
+maybe-mostlyclean-binutils:
+@if binutils
+maybe-mostlyclean-binutils: mostlyclean-binutils
-info-target-gperf: \
- configure-target-gperf
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+mostlyclean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/gperf && \
+ echo "Doing mostlyclean 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}" \
- info) \
+ mostlyclean) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-examples info-target-examples
-maybe-info-target-examples:
+.PHONY: maybe-clean-binutils clean-binutils
+maybe-clean-binutils:
+@if binutils
+maybe-clean-binutils: clean-binutils
-info-target-examples: \
- configure-target-examples
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+clean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/examples && \
+ echo "Doing clean 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}" \
- info) \
+ clean) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-libffi info-target-libffi
-maybe-info-target-libffi:
+.PHONY: maybe-distclean-binutils distclean-binutils
+maybe-distclean-binutils:
+@if binutils
+maybe-distclean-binutils: distclean-binutils
-info-target-libffi: \
- configure-target-libffi
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+distclean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libffi && \
+ echo "Doing distclean 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}" \
- info) \
+ distclean) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-libjava info-target-libjava
-maybe-info-target-libjava:
+.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils
+maybe-maintainer-clean-binutils:
+@if binutils
+maybe-maintainer-clean-binutils: maintainer-clean-binutils
-info-target-libjava: \
- configure-target-libjava
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+maintainer-clean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libjava && \
+ echo "Doing maintainer-clean 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}" \
- info) \
+ maintainer-clean) \
|| exit 1
+@endif binutils
-.PHONY: maybe-info-target-zlib info-target-zlib
-maybe-info-target-zlib:
-info-target-zlib: \
- configure-target-zlib
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+
+.PHONY: configure-bison maybe-configure-bison
+maybe-configure-bison:
+@if bison
+maybe-configure-bison: configure-bison
+configure-bison:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bison/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bison ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/bison; \
+ cd "$(HOST_SUBDIR)/bison" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bison/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bison"; \
+ libsrcdir="$$s/bison"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif bison
+
+
+
+
+
+.PHONY: all-bison maybe-all-bison
+maybe-all-bison:
+@if bison
+TARGET-bison=all
+maybe-all-bison: all-bison
+all-bison: configure-bison
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bison && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bison))
+@endif bison
+
+
+
+
+.PHONY: check-bison maybe-check-bison
+maybe-check-bison:
+@if bison
+maybe-check-bison: check-bison
+
+# This module is only tested in a native toolchain.
+check-bison:
+ @: $(MAKE); $(unstage)
+ @if [ '$(host)' = '$(target)' ] ; then \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bison && \
+ $(MAKE) $(FLAGS_TO_PASS) check); \
+ fi
+
+@endif bison
+
+.PHONY: install-bison maybe-install-bison
+maybe-install-bison:
+@if bison
+maybe-install-bison: install-bison
+
+install-bison: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bison && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif bison
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-bison info-bison
+maybe-info-bison:
+@if bison
+maybe-info-bison: info-bison
+
+info-bison: \
+ configure-bison
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/zlib && \
+ echo "Doing info 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}" \
@@ -2518,355 +6395,392 @@ info-target-zlib: \
info) \
|| exit 1
+@endif bison
-.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc
-maybe-info-target-boehm-gc:
+.PHONY: maybe-dvi-bison dvi-bison
+maybe-dvi-bison:
+@if bison
+maybe-dvi-bison: dvi-bison
-info-target-boehm-gc: \
- configure-target-boehm-gc
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+dvi-bison: \
+ configure-bison
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
+ echo "Doing dvi 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}" \
- info) \
+ dvi) \
|| exit 1
+@endif bison
-.PHONY: maybe-info-target-qthreads info-target-qthreads
-maybe-info-target-qthreads:
+.PHONY: maybe-html-bison html-bison
+maybe-html-bison:
+@if bison
+maybe-html-bison: html-bison
-info-target-qthreads: \
- configure-target-qthreads
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+html-bison: \
+ configure-bison
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/qthreads && \
+ echo "Doing html 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}" \
- info) \
+ html) \
|| exit 1
+@endif bison
-.PHONY: maybe-info-target-rda info-target-rda
-maybe-info-target-rda:
+.PHONY: maybe-TAGS-bison TAGS-bison
+maybe-TAGS-bison:
+@if bison
+maybe-TAGS-bison: TAGS-bison
-info-target-rda: \
- configure-target-rda
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+TAGS-bison: \
+ configure-bison
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/rda" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/rda && \
+ echo "Doing TAGS 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}" \
- info) \
+ TAGS) \
|| exit 1
+@endif bison
-.PHONY: maybe-info-target-libada info-target-libada
-maybe-info-target-libada:
+.PHONY: maybe-install-info-bison install-info-bison
+maybe-install-info-bison:
+@if bison
+maybe-install-info-bison: install-info-bison
-info-target-libada: \
- configure-target-libada
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+install-info-bison: \
+ configure-bison \
+ info-bison
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing info in $(TARGET_SUBDIR)/libada" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libada && \
+ echo "Doing install-info 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}" \
- info) \
+ install-info) \
|| exit 1
+@endif bison
+.PHONY: maybe-install-html-bison install-html-bison
+maybe-install-html-bison:
+@if bison
+maybe-install-html-bison: install-html-bison
-.PHONY: do-dvi
-do-dvi: dvi-host dvi-target
-
-.PHONY: dvi-host
-dvi-host: maybe-dvi-gcc \
- maybe-dvi-ash \
- maybe-dvi-autoconf \
- maybe-dvi-automake \
- maybe-dvi-bash \
- maybe-dvi-bfd \
- maybe-dvi-opcodes \
- maybe-dvi-binutils \
- maybe-dvi-bison \
- maybe-dvi-byacc \
- maybe-dvi-bzip2 \
- maybe-dvi-dejagnu \
- maybe-dvi-diff \
- maybe-dvi-dosutils \
- maybe-dvi-etc \
- maybe-dvi-fastjar \
- maybe-dvi-fileutils \
- maybe-dvi-findutils \
- maybe-dvi-find \
- maybe-dvi-flex \
- maybe-dvi-gas \
- maybe-dvi-gawk \
- maybe-dvi-gettext \
- maybe-dvi-gnuserv \
- maybe-dvi-gprof \
- maybe-dvi-gzip \
- maybe-dvi-hello \
- maybe-dvi-indent \
- maybe-dvi-intl \
- maybe-dvi-tcl \
- maybe-dvi-itcl \
- maybe-dvi-ld \
- maybe-dvi-libgui \
- maybe-dvi-libiberty \
- maybe-dvi-libtool \
- maybe-dvi-m4 \
- maybe-dvi-make \
- maybe-dvi-mmalloc \
- maybe-dvi-patch \
- maybe-dvi-perl \
- maybe-dvi-prms \
- maybe-dvi-rcs \
- maybe-dvi-readline \
- maybe-dvi-release \
- maybe-dvi-recode \
- maybe-dvi-sed \
- maybe-dvi-send-pr \
- maybe-dvi-shellutils \
- maybe-dvi-sid \
- maybe-dvi-sim \
- maybe-dvi-tar \
- maybe-dvi-texinfo \
- maybe-dvi-textutils \
- maybe-dvi-time \
- maybe-dvi-uudecode \
- maybe-dvi-wdiff \
- maybe-dvi-zip \
- maybe-dvi-zlib \
- maybe-dvi-gdb \
- maybe-dvi-expect \
- maybe-dvi-guile \
- maybe-dvi-tk \
- maybe-dvi-tix \
- maybe-dvi-libtermcap \
- maybe-dvi-utils
-
-.PHONY: dvi-target
-dvi-target: \
- maybe-dvi-target-libstdc++-v3 \
- maybe-dvi-target-newlib \
- maybe-dvi-target-libf2c \
- maybe-dvi-target-libobjc \
- maybe-dvi-target-libtermcap \
- maybe-dvi-target-winsup \
- maybe-dvi-target-libgloss \
- maybe-dvi-target-libiberty \
- maybe-dvi-target-gperf \
- maybe-dvi-target-examples \
- maybe-dvi-target-libffi \
- maybe-dvi-target-libjava \
- maybe-dvi-target-zlib \
- maybe-dvi-target-boehm-gc \
- maybe-dvi-target-qthreads \
- maybe-dvi-target-rda \
- maybe-dvi-target-libada
-
-# GCC, the eternal special case
-.PHONY: maybe-dvi-gcc dvi-gcc
-maybe-dvi-gcc:
-dvi-gcc: \
- configure-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
+install-html-bison: \
+ configure-bison \
+ html-bison
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gcc" ; \
- (cd gcc && \
+ echo "Doing install-html 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}" \
- dvi) \
+ install-html) \
|| exit 1
-# Host modules.
+@endif bison
-.PHONY: maybe-dvi-ash dvi-ash
-maybe-dvi-ash:
+.PHONY: maybe-installcheck-bison installcheck-bison
+maybe-installcheck-bison:
+@if bison
+maybe-installcheck-bison: installcheck-bison
-dvi-ash: \
- configure-ash
- @[ -f ./ash/Makefile ] || exit 0; \
+installcheck-bison: \
+ configure-bison
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in ash" ; \
- (cd ash && \
+ echo "Doing installcheck 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}" \
- dvi) \
+ installcheck) \
|| exit 1
+@endif bison
-.PHONY: maybe-dvi-autoconf dvi-autoconf
-maybe-dvi-autoconf:
+.PHONY: maybe-mostlyclean-bison mostlyclean-bison
+maybe-mostlyclean-bison:
+@if bison
+maybe-mostlyclean-bison: mostlyclean-bison
-dvi-autoconf: \
- configure-autoconf
- @[ -f ./autoconf/Makefile ] || exit 0; \
+mostlyclean-bison:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in autoconf" ; \
- (cd autoconf && \
+ echo "Doing mostlyclean 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}" \
- dvi) \
+ mostlyclean) \
|| exit 1
+@endif bison
-.PHONY: maybe-dvi-automake dvi-automake
-maybe-dvi-automake:
+.PHONY: maybe-clean-bison clean-bison
+maybe-clean-bison:
+@if bison
+maybe-clean-bison: clean-bison
-dvi-automake: \
- configure-automake
- @[ -f ./automake/Makefile ] || exit 0; \
+clean-bison:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in automake" ; \
- (cd automake && \
+ echo "Doing clean 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}" \
- dvi) \
+ clean) \
|| exit 1
+@endif bison
-.PHONY: maybe-dvi-bash dvi-bash
-maybe-dvi-bash:
+.PHONY: maybe-distclean-bison distclean-bison
+maybe-distclean-bison:
+@if bison
+maybe-distclean-bison: distclean-bison
-dvi-bash: \
- configure-bash
- @[ -f ./bash/Makefile ] || exit 0; \
+distclean-bison:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in bash" ; \
- (cd bash && \
+ echo "Doing distclean 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}" \
- dvi) \
+ distclean) \
|| exit 1
+@endif bison
-.PHONY: maybe-dvi-bfd dvi-bfd
-maybe-dvi-bfd:
+.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison
+maybe-maintainer-clean-bison:
+@if bison
+maybe-maintainer-clean-bison: maintainer-clean-bison
-dvi-bfd: \
- configure-bfd
- @[ -f ./bfd/Makefile ] || exit 0; \
+maintainer-clean-bison:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in bfd" ; \
- (cd bfd && \
+ echo "Doing maintainer-clean 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}" \
- dvi) \
+ maintainer-clean) \
|| exit 1
+@endif bison
-.PHONY: maybe-dvi-opcodes dvi-opcodes
-maybe-dvi-opcodes:
-dvi-opcodes: \
- configure-opcodes
- @[ -f ./opcodes/Makefile ] || exit 0; \
+
+.PHONY: configure-byacc maybe-configure-byacc
+maybe-configure-byacc:
+@if byacc
+maybe-configure-byacc: configure-byacc
+configure-byacc:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/byacc/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/byacc ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/byacc; \
+ cd "$(HOST_SUBDIR)/byacc" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/byacc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/byacc"; \
+ libsrcdir="$$s/byacc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif byacc
+
+
+
+
+
+.PHONY: all-byacc maybe-all-byacc
+maybe-all-byacc:
+@if byacc
+TARGET-byacc=all
+maybe-all-byacc: all-byacc
+all-byacc: configure-byacc
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/byacc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-byacc))
+@endif byacc
+
+
+
+
+.PHONY: check-byacc maybe-check-byacc
+maybe-check-byacc:
+@if byacc
+maybe-check-byacc: check-byacc
+
+# This module is only tested in a native toolchain.
+check-byacc:
+ @: $(MAKE); $(unstage)
+ @if [ '$(host)' = '$(target)' ] ; then \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/byacc && \
+ $(MAKE) $(FLAGS_TO_PASS) check); \
+ fi
+
+@endif byacc
+
+.PHONY: install-byacc maybe-install-byacc
+maybe-install-byacc:
+@if byacc
+maybe-install-byacc: install-byacc
+
+install-byacc: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/byacc && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif byacc
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-byacc info-byacc
+maybe-info-byacc:
+@if byacc
+maybe-info-byacc: info-byacc
+
+info-byacc: \
+ configure-byacc
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in opcodes" ; \
- (cd opcodes && \
+ echo "Doing info 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}" \
- dvi) \
+ info) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-binutils dvi-binutils
-maybe-dvi-binutils:
+.PHONY: maybe-dvi-byacc dvi-byacc
+maybe-dvi-byacc:
+@if byacc
+maybe-dvi-byacc: dvi-byacc
-dvi-binutils: \
- configure-binutils
- @[ -f ./binutils/Makefile ] || exit 0; \
+dvi-byacc: \
+ configure-byacc
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in binutils" ; \
- (cd binutils && \
+ echo "Doing dvi 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}" \
@@ -2874,241 +6788,363 @@ dvi-binutils: \
dvi) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-bison dvi-bison
-maybe-dvi-bison:
+.PHONY: maybe-html-byacc html-byacc
+maybe-html-byacc:
+@if byacc
+maybe-html-byacc: html-byacc
-dvi-bison: \
- configure-bison
- @[ -f ./bison/Makefile ] || exit 0; \
+html-byacc: \
+ configure-byacc
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in bison" ; \
- (cd bison && \
+ echo "Doing html 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}" \
- dvi) \
+ html) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-byacc dvi-byacc
-maybe-dvi-byacc:
+.PHONY: maybe-TAGS-byacc TAGS-byacc
+maybe-TAGS-byacc:
+@if byacc
+maybe-TAGS-byacc: TAGS-byacc
-dvi-byacc: \
+TAGS-byacc: \
configure-byacc
+ @: $(MAKE); $(unstage)
@[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in byacc" ; \
- (cd byacc && \
+ echo "Doing TAGS 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}" \
- dvi) \
+ TAGS) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-bzip2 dvi-bzip2
-maybe-dvi-bzip2:
+.PHONY: maybe-install-info-byacc install-info-byacc
+maybe-install-info-byacc:
+@if byacc
+maybe-install-info-byacc: install-info-byacc
-dvi-bzip2: \
- configure-bzip2
- @[ -f ./bzip2/Makefile ] || exit 0; \
+install-info-byacc: \
+ configure-byacc \
+ info-byacc
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in bzip2" ; \
- (cd bzip2 && \
+ echo "Doing install-info 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}" \
- dvi) \
+ install-info) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-dejagnu dvi-dejagnu
-maybe-dvi-dejagnu:
+.PHONY: maybe-install-html-byacc install-html-byacc
+maybe-install-html-byacc:
+@if byacc
+maybe-install-html-byacc: install-html-byacc
-dvi-dejagnu: \
- configure-dejagnu
- @[ -f ./dejagnu/Makefile ] || exit 0; \
+install-html-byacc: \
+ configure-byacc \
+ html-byacc
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in dejagnu" ; \
- (cd dejagnu && \
+ echo "Doing install-html 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}" \
- dvi) \
+ install-html) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-diff dvi-diff
-maybe-dvi-diff:
+.PHONY: maybe-installcheck-byacc installcheck-byacc
+maybe-installcheck-byacc:
+@if byacc
+maybe-installcheck-byacc: installcheck-byacc
-dvi-diff: \
- configure-diff
- @[ -f ./diff/Makefile ] || exit 0; \
+installcheck-byacc: \
+ configure-byacc
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in diff" ; \
- (cd diff && \
+ echo "Doing installcheck 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}" \
- dvi) \
+ installcheck) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-dosutils dvi-dosutils
-maybe-dvi-dosutils:
+.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc
+maybe-mostlyclean-byacc:
+@if byacc
+maybe-mostlyclean-byacc: mostlyclean-byacc
-dvi-dosutils: \
- configure-dosutils
- @[ -f ./dosutils/Makefile ] || exit 0; \
+mostlyclean-byacc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in dosutils" ; \
- (cd dosutils && \
+ echo "Doing mostlyclean 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}" \
- dvi) \
+ mostlyclean) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-etc dvi-etc
-maybe-dvi-etc:
+.PHONY: maybe-clean-byacc clean-byacc
+maybe-clean-byacc:
+@if byacc
+maybe-clean-byacc: clean-byacc
-dvi-etc: \
- configure-etc
- @[ -f ./etc/Makefile ] || exit 0; \
+clean-byacc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in etc" ; \
- (cd etc && \
+ echo "Doing clean 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}" \
- dvi) \
+ clean) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-fastjar dvi-fastjar
-maybe-dvi-fastjar:
+.PHONY: maybe-distclean-byacc distclean-byacc
+maybe-distclean-byacc:
+@if byacc
+maybe-distclean-byacc: distclean-byacc
-dvi-fastjar: \
- configure-fastjar
- @[ -f ./fastjar/Makefile ] || exit 0; \
+distclean-byacc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in fastjar" ; \
- (cd fastjar && \
+ echo "Doing distclean 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}" \
- dvi) \
+ distclean) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-fileutils dvi-fileutils
-maybe-dvi-fileutils:
+.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc
+maybe-maintainer-clean-byacc:
+@if byacc
+maybe-maintainer-clean-byacc: maintainer-clean-byacc
-dvi-fileutils: \
- configure-fileutils
- @[ -f ./fileutils/Makefile ] || exit 0; \
+maintainer-clean-byacc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in fileutils" ; \
- (cd fileutils && \
+ echo "Doing maintainer-clean 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}" \
- dvi) \
+ maintainer-clean) \
|| exit 1
+@endif byacc
-.PHONY: maybe-dvi-findutils dvi-findutils
-maybe-dvi-findutils:
-dvi-findutils: \
- configure-findutils
- @[ -f ./findutils/Makefile ] || exit 0; \
+
+.PHONY: configure-bzip2 maybe-configure-bzip2
+maybe-configure-bzip2:
+@if bzip2
+maybe-configure-bzip2: configure-bzip2
+configure-bzip2:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bzip2/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bzip2 ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/bzip2; \
+ cd "$(HOST_SUBDIR)/bzip2" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/bzip2/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/bzip2"; \
+ libsrcdir="$$s/bzip2"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif bzip2
+
+
+
+
+
+.PHONY: all-bzip2 maybe-all-bzip2
+maybe-all-bzip2:
+@if bzip2
+TARGET-bzip2=all
+maybe-all-bzip2: all-bzip2
+all-bzip2: configure-bzip2
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bzip2 && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bzip2))
+@endif bzip2
+
+
+
+
+.PHONY: check-bzip2 maybe-check-bzip2
+maybe-check-bzip2:
+@if bzip2
+maybe-check-bzip2: check-bzip2
+
+check-bzip2:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bzip2 && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif bzip2
+
+.PHONY: install-bzip2 maybe-install-bzip2
+maybe-install-bzip2:
+@if bzip2
+maybe-install-bzip2: install-bzip2
+
+install-bzip2: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bzip2 && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif bzip2
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-bzip2 info-bzip2
+maybe-info-bzip2:
+@if bzip2
+maybe-info-bzip2: info-bzip2
+
+info-bzip2: \
+ configure-bzip2
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in findutils" ; \
- (cd findutils && \
+ echo "Doing info 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}" \
- dvi) \
+ info) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-find dvi-find
-maybe-dvi-find:
+.PHONY: maybe-dvi-bzip2 dvi-bzip2
+maybe-dvi-bzip2:
+@if bzip2
+maybe-dvi-bzip2: dvi-bzip2
-dvi-find: \
- configure-find
- @[ -f ./find/Makefile ] || exit 0; \
+dvi-bzip2: \
+ configure-bzip2
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in find" ; \
- (cd find && \
+ echo "Doing dvi 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}" \
@@ -3116,241 +7152,363 @@ dvi-find: \
dvi) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-flex dvi-flex
-maybe-dvi-flex:
+.PHONY: maybe-html-bzip2 html-bzip2
+maybe-html-bzip2:
+@if bzip2
+maybe-html-bzip2: html-bzip2
-dvi-flex: \
- configure-flex
- @[ -f ./flex/Makefile ] || exit 0; \
+html-bzip2: \
+ configure-bzip2
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in flex" ; \
- (cd flex && \
+ echo "Doing html 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}" \
- dvi) \
+ html) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-gas dvi-gas
-maybe-dvi-gas:
+.PHONY: maybe-TAGS-bzip2 TAGS-bzip2
+maybe-TAGS-bzip2:
+@if bzip2
+maybe-TAGS-bzip2: TAGS-bzip2
-dvi-gas: \
- configure-gas
- @[ -f ./gas/Makefile ] || exit 0; \
+TAGS-bzip2: \
+ configure-bzip2
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gas" ; \
- (cd gas && \
+ echo "Doing TAGS 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}" \
- dvi) \
+ TAGS) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-gawk dvi-gawk
-maybe-dvi-gawk:
+.PHONY: maybe-install-info-bzip2 install-info-bzip2
+maybe-install-info-bzip2:
+@if bzip2
+maybe-install-info-bzip2: install-info-bzip2
-dvi-gawk: \
- configure-gawk
- @[ -f ./gawk/Makefile ] || exit 0; \
+install-info-bzip2: \
+ configure-bzip2 \
+ info-bzip2
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gawk" ; \
- (cd gawk && \
+ echo "Doing install-info 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}" \
- dvi) \
+ install-info) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-gettext dvi-gettext
-maybe-dvi-gettext:
+.PHONY: maybe-install-html-bzip2 install-html-bzip2
+maybe-install-html-bzip2:
+@if bzip2
+maybe-install-html-bzip2: install-html-bzip2
-dvi-gettext: \
- configure-gettext
- @[ -f ./gettext/Makefile ] || exit 0; \
+install-html-bzip2: \
+ configure-bzip2 \
+ html-bzip2
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gettext" ; \
- (cd gettext && \
+ echo "Doing install-html 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}" \
- dvi) \
+ install-html) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-gnuserv dvi-gnuserv
-maybe-dvi-gnuserv:
+.PHONY: maybe-installcheck-bzip2 installcheck-bzip2
+maybe-installcheck-bzip2:
+@if bzip2
+maybe-installcheck-bzip2: installcheck-bzip2
-dvi-gnuserv: \
- configure-gnuserv
- @[ -f ./gnuserv/Makefile ] || exit 0; \
+installcheck-bzip2: \
+ configure-bzip2
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gnuserv" ; \
- (cd gnuserv && \
+ echo "Doing installcheck 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}" \
- dvi) \
+ installcheck) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-gprof dvi-gprof
-maybe-dvi-gprof:
+.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2
+maybe-mostlyclean-bzip2:
+@if bzip2
+maybe-mostlyclean-bzip2: mostlyclean-bzip2
-dvi-gprof: \
- configure-gprof
- @[ -f ./gprof/Makefile ] || exit 0; \
+mostlyclean-bzip2:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gprof" ; \
- (cd gprof && \
+ echo "Doing mostlyclean 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}" \
- dvi) \
+ mostlyclean) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-gzip dvi-gzip
-maybe-dvi-gzip:
+.PHONY: maybe-clean-bzip2 clean-bzip2
+maybe-clean-bzip2:
+@if bzip2
+maybe-clean-bzip2: clean-bzip2
-dvi-gzip: \
- configure-gzip
- @[ -f ./gzip/Makefile ] || exit 0; \
+clean-bzip2:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gzip" ; \
- (cd gzip && \
+ echo "Doing clean 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}" \
- dvi) \
+ clean) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-hello dvi-hello
-maybe-dvi-hello:
+.PHONY: maybe-distclean-bzip2 distclean-bzip2
+maybe-distclean-bzip2:
+@if bzip2
+maybe-distclean-bzip2: distclean-bzip2
-dvi-hello: \
- configure-hello
- @[ -f ./hello/Makefile ] || exit 0; \
+distclean-bzip2:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in hello" ; \
- (cd hello && \
+ echo "Doing distclean 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}" \
- dvi) \
+ distclean) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-indent dvi-indent
-maybe-dvi-indent:
+.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2
+maybe-maintainer-clean-bzip2:
+@if bzip2
+maybe-maintainer-clean-bzip2: maintainer-clean-bzip2
-dvi-indent: \
- configure-indent
- @[ -f ./indent/Makefile ] || exit 0; \
+maintainer-clean-bzip2:
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in indent" ; \
- (cd indent && \
+ echo "Doing maintainer-clean 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}" \
- dvi) \
+ maintainer-clean) \
|| exit 1
+@endif bzip2
-.PHONY: maybe-dvi-intl dvi-intl
-maybe-dvi-intl:
-dvi-intl: \
- configure-intl
- @[ -f ./intl/Makefile ] || exit 0; \
+
+.PHONY: configure-dejagnu maybe-configure-dejagnu
+maybe-configure-dejagnu:
+@if dejagnu
+maybe-configure-dejagnu: configure-dejagnu
+configure-dejagnu:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/dejagnu/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/dejagnu ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/dejagnu; \
+ cd "$(HOST_SUBDIR)/dejagnu" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/dejagnu/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/dejagnu"; \
+ libsrcdir="$$s/dejagnu"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif dejagnu
+
+
+
+
+
+.PHONY: all-dejagnu maybe-all-dejagnu
+maybe-all-dejagnu:
+@if dejagnu
+TARGET-dejagnu=all
+maybe-all-dejagnu: all-dejagnu
+all-dejagnu: configure-dejagnu
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/dejagnu && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-dejagnu))
+@endif dejagnu
+
+
+
+
+.PHONY: check-dejagnu maybe-check-dejagnu
+maybe-check-dejagnu:
+@if dejagnu
+maybe-check-dejagnu: check-dejagnu
+
+check-dejagnu:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/dejagnu && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif dejagnu
+
+.PHONY: install-dejagnu maybe-install-dejagnu
+maybe-install-dejagnu:
+@if dejagnu
+maybe-install-dejagnu: install-dejagnu
+
+install-dejagnu: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/dejagnu && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif dejagnu
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-dejagnu info-dejagnu
+maybe-info-dejagnu:
+@if dejagnu
+maybe-info-dejagnu: info-dejagnu
+
+info-dejagnu: \
+ configure-dejagnu
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in intl" ; \
- (cd intl && \
+ echo "Doing info 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}" \
- dvi) \
+ info) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-tcl dvi-tcl
-maybe-dvi-tcl:
+.PHONY: maybe-dvi-dejagnu dvi-dejagnu
+maybe-dvi-dejagnu:
+@if dejagnu
+maybe-dvi-dejagnu: dvi-dejagnu
-dvi-tcl: \
- configure-tcl
- @[ -f ./tcl/Makefile ] || exit 0; \
+dvi-dejagnu: \
+ configure-dejagnu
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in tcl" ; \
- (cd tcl && \
+ echo "Doing dvi 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}" \
@@ -3358,241 +7516,363 @@ dvi-tcl: \
dvi) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-itcl dvi-itcl
-maybe-dvi-itcl:
+.PHONY: maybe-html-dejagnu html-dejagnu
+maybe-html-dejagnu:
+@if dejagnu
+maybe-html-dejagnu: html-dejagnu
-dvi-itcl: \
- configure-itcl
- @[ -f ./itcl/Makefile ] || exit 0; \
+html-dejagnu: \
+ configure-dejagnu
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in itcl" ; \
- (cd itcl && \
+ echo "Doing html 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}" \
- dvi) \
+ html) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-ld dvi-ld
-maybe-dvi-ld:
+.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu
+maybe-TAGS-dejagnu:
+@if dejagnu
+maybe-TAGS-dejagnu: TAGS-dejagnu
-dvi-ld: \
- configure-ld
- @[ -f ./ld/Makefile ] || exit 0; \
+TAGS-dejagnu: \
+ configure-dejagnu
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in ld" ; \
- (cd ld && \
+ echo "Doing TAGS 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}" \
- dvi) \
+ TAGS) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-libgui dvi-libgui
-maybe-dvi-libgui:
+.PHONY: maybe-install-info-dejagnu install-info-dejagnu
+maybe-install-info-dejagnu:
+@if dejagnu
+maybe-install-info-dejagnu: install-info-dejagnu
-dvi-libgui: \
- configure-libgui
- @[ -f ./libgui/Makefile ] || exit 0; \
+install-info-dejagnu: \
+ configure-dejagnu \
+ info-dejagnu
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libgui" ; \
- (cd libgui && \
+ echo "Doing install-info 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}" \
- dvi) \
+ install-info) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-libiberty dvi-libiberty
-maybe-dvi-libiberty:
+.PHONY: maybe-install-html-dejagnu install-html-dejagnu
+maybe-install-html-dejagnu:
+@if dejagnu
+maybe-install-html-dejagnu: install-html-dejagnu
-dvi-libiberty: \
- configure-libiberty
- @[ -f ./libiberty/Makefile ] || exit 0; \
+install-html-dejagnu: \
+ configure-dejagnu \
+ html-dejagnu
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libiberty" ; \
- (cd libiberty && \
+ echo "Doing install-html 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}" \
- dvi) \
+ install-html) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-libtool dvi-libtool
-maybe-dvi-libtool:
+.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu
+maybe-installcheck-dejagnu:
+@if dejagnu
+maybe-installcheck-dejagnu: installcheck-dejagnu
-dvi-libtool: \
- configure-libtool
- @[ -f ./libtool/Makefile ] || exit 0; \
+installcheck-dejagnu: \
+ configure-dejagnu
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libtool" ; \
- (cd libtool && \
+ echo "Doing installcheck 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}" \
- dvi) \
+ installcheck) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-m4 dvi-m4
-maybe-dvi-m4:
+.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu
+maybe-mostlyclean-dejagnu:
+@if dejagnu
+maybe-mostlyclean-dejagnu: mostlyclean-dejagnu
-dvi-m4: \
- configure-m4
- @[ -f ./m4/Makefile ] || exit 0; \
+mostlyclean-dejagnu:
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in m4" ; \
- (cd m4 && \
+ echo "Doing mostlyclean 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}" \
- dvi) \
+ mostlyclean) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-make dvi-make
-maybe-dvi-make:
+.PHONY: maybe-clean-dejagnu clean-dejagnu
+maybe-clean-dejagnu:
+@if dejagnu
+maybe-clean-dejagnu: clean-dejagnu
-dvi-make: \
- configure-make
- @[ -f ./make/Makefile ] || exit 0; \
+clean-dejagnu:
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in make" ; \
- (cd make && \
+ echo "Doing clean 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}" \
- dvi) \
+ clean) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-mmalloc dvi-mmalloc
-maybe-dvi-mmalloc:
+.PHONY: maybe-distclean-dejagnu distclean-dejagnu
+maybe-distclean-dejagnu:
+@if dejagnu
+maybe-distclean-dejagnu: distclean-dejagnu
-dvi-mmalloc: \
- configure-mmalloc
- @[ -f ./mmalloc/Makefile ] || exit 0; \
+distclean-dejagnu:
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in mmalloc" ; \
- (cd mmalloc && \
+ echo "Doing distclean 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}" \
- dvi) \
+ distclean) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-patch dvi-patch
-maybe-dvi-patch:
+.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu
+maybe-maintainer-clean-dejagnu:
+@if dejagnu
+maybe-maintainer-clean-dejagnu: maintainer-clean-dejagnu
-dvi-patch: \
- configure-patch
- @[ -f ./patch/Makefile ] || exit 0; \
+maintainer-clean-dejagnu:
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in patch" ; \
- (cd patch && \
+ echo "Doing maintainer-clean 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}" \
- dvi) \
+ maintainer-clean) \
|| exit 1
+@endif dejagnu
-.PHONY: maybe-dvi-perl dvi-perl
-maybe-dvi-perl:
-dvi-perl: \
- configure-perl
- @[ -f ./perl/Makefile ] || exit 0; \
+
+.PHONY: configure-diff maybe-configure-diff
+maybe-configure-diff:
+@if diff
+maybe-configure-diff: configure-diff
+configure-diff:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/diff/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/diff ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/diff; \
+ cd "$(HOST_SUBDIR)/diff" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/diff/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/diff"; \
+ libsrcdir="$$s/diff"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif diff
+
+
+
+
+
+.PHONY: all-diff maybe-all-diff
+maybe-all-diff:
+@if diff
+TARGET-diff=all
+maybe-all-diff: all-diff
+all-diff: configure-diff
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/diff && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-diff))
+@endif diff
+
+
+
+
+.PHONY: check-diff maybe-check-diff
+maybe-check-diff:
+@if diff
+maybe-check-diff: check-diff
+
+check-diff:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/diff && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif diff
+
+.PHONY: install-diff maybe-install-diff
+maybe-install-diff:
+@if diff
+maybe-install-diff: install-diff
+
+install-diff: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/diff && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif diff
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-diff info-diff
+maybe-info-diff:
+@if diff
+maybe-info-diff: info-diff
+
+info-diff: \
+ configure-diff
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in perl" ; \
- (cd perl && \
+ echo "Doing info 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}" \
- dvi) \
+ info) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-prms dvi-prms
-maybe-dvi-prms:
+.PHONY: maybe-dvi-diff dvi-diff
+maybe-dvi-diff:
+@if diff
+maybe-dvi-diff: dvi-diff
-dvi-prms: \
- configure-prms
- @[ -f ./prms/Makefile ] || exit 0; \
+dvi-diff: \
+ configure-diff
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in prms" ; \
- (cd prms && \
+ echo "Doing dvi 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}" \
@@ -3600,241 +7880,357 @@ dvi-prms: \
dvi) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-rcs dvi-rcs
-maybe-dvi-rcs:
+.PHONY: maybe-html-diff html-diff
+maybe-html-diff:
+@if diff
+maybe-html-diff: html-diff
-dvi-rcs: \
- configure-rcs
- @[ -f ./rcs/Makefile ] || exit 0; \
+html-diff: \
+ configure-diff
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in rcs" ; \
- (cd rcs && \
+ echo "Doing html 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}" \
- dvi) \
+ html) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-readline dvi-readline
-maybe-dvi-readline:
+.PHONY: maybe-TAGS-diff TAGS-diff
+maybe-TAGS-diff:
+@if diff
+maybe-TAGS-diff: TAGS-diff
-dvi-readline: \
- configure-readline
- @[ -f ./readline/Makefile ] || exit 0; \
+TAGS-diff: \
+ configure-diff
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in readline" ; \
- (cd readline && \
+ echo "Doing TAGS 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}" \
- dvi) \
+ TAGS) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-release dvi-release
-maybe-dvi-release:
+.PHONY: maybe-install-info-diff install-info-diff
+maybe-install-info-diff:
+@if diff
+maybe-install-info-diff: install-info-diff
-dvi-release: \
- configure-release
- @[ -f ./release/Makefile ] || exit 0; \
+install-info-diff: \
+ configure-diff \
+ info-diff
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in release" ; \
- (cd release && \
+ echo "Doing install-info 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}" \
- dvi) \
+ install-info) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-recode dvi-recode
-maybe-dvi-recode:
+.PHONY: maybe-install-html-diff install-html-diff
+maybe-install-html-diff:
+@if diff
+maybe-install-html-diff: install-html-diff
-dvi-recode: \
- configure-recode
- @[ -f ./recode/Makefile ] || exit 0; \
+install-html-diff: \
+ configure-diff \
+ html-diff
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in recode" ; \
- (cd recode && \
+ echo "Doing install-html 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}" \
- dvi) \
+ install-html) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-sed dvi-sed
-maybe-dvi-sed:
+.PHONY: maybe-installcheck-diff installcheck-diff
+maybe-installcheck-diff:
+@if diff
+maybe-installcheck-diff: installcheck-diff
-dvi-sed: \
- configure-sed
- @[ -f ./sed/Makefile ] || exit 0; \
+installcheck-diff: \
+ configure-diff
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in sed" ; \
- (cd sed && \
+ echo "Doing installcheck 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}" \
- dvi) \
+ installcheck) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-send-pr dvi-send-pr
-maybe-dvi-send-pr:
+.PHONY: maybe-mostlyclean-diff mostlyclean-diff
+maybe-mostlyclean-diff:
+@if diff
+maybe-mostlyclean-diff: mostlyclean-diff
-dvi-send-pr: \
- configure-send-pr
- @[ -f ./send-pr/Makefile ] || exit 0; \
+mostlyclean-diff:
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in send-pr" ; \
- (cd send-pr && \
+ echo "Doing mostlyclean 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}" \
- dvi) \
+ mostlyclean) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-shellutils dvi-shellutils
-maybe-dvi-shellutils:
+.PHONY: maybe-clean-diff clean-diff
+maybe-clean-diff:
+@if diff
+maybe-clean-diff: clean-diff
-dvi-shellutils: \
- configure-shellutils
- @[ -f ./shellutils/Makefile ] || exit 0; \
+clean-diff:
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in shellutils" ; \
- (cd shellutils && \
+ echo "Doing clean 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}" \
- dvi) \
+ clean) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-sid dvi-sid
-maybe-dvi-sid:
+.PHONY: maybe-distclean-diff distclean-diff
+maybe-distclean-diff:
+@if diff
+maybe-distclean-diff: distclean-diff
-dvi-sid: \
- configure-sid
- @[ -f ./sid/Makefile ] || exit 0; \
+distclean-diff:
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in sid" ; \
- (cd sid && \
+ echo "Doing distclean 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}" \
- dvi) \
+ distclean) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-sim dvi-sim
-maybe-dvi-sim:
+.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff
+maybe-maintainer-clean-diff:
+@if diff
+maybe-maintainer-clean-diff: maintainer-clean-diff
-dvi-sim: \
- configure-sim
- @[ -f ./sim/Makefile ] || exit 0; \
+maintainer-clean-diff:
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in sim" ; \
- (cd sim && \
+ echo "Doing maintainer-clean 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}" \
- dvi) \
+ maintainer-clean) \
|| exit 1
+@endif diff
-.PHONY: maybe-dvi-tar dvi-tar
-maybe-dvi-tar:
-dvi-tar: \
- configure-tar
- @[ -f ./tar/Makefile ] || exit 0; \
+
+.PHONY: configure-dosutils maybe-configure-dosutils
+maybe-configure-dosutils:
+@if dosutils
+maybe-configure-dosutils: configure-dosutils
+configure-dosutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/dosutils/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/dosutils ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/dosutils; \
+ cd "$(HOST_SUBDIR)/dosutils" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/dosutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/dosutils"; \
+ libsrcdir="$$s/dosutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif dosutils
+
+
+
+
+
+.PHONY: all-dosutils maybe-all-dosutils
+maybe-all-dosutils:
+@if dosutils
+TARGET-dosutils=all
+maybe-all-dosutils: all-dosutils
+all-dosutils: configure-dosutils
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/dosutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-dosutils))
+@endif dosutils
+
+
+
+
+.PHONY: check-dosutils maybe-check-dosutils
+maybe-check-dosutils:
+@if dosutils
+maybe-check-dosutils: check-dosutils
+
+check-dosutils:
+
+@endif dosutils
+
+.PHONY: install-dosutils maybe-install-dosutils
+maybe-install-dosutils:
+@if dosutils
+maybe-install-dosutils: install-dosutils
+
+install-dosutils: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/dosutils && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif dosutils
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-dosutils info-dosutils
+maybe-info-dosutils:
+@if dosutils
+maybe-info-dosutils: info-dosutils
+
+info-dosutils: \
+ configure-dosutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in tar" ; \
- (cd tar && \
+ echo "Doing info 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}" \
- dvi) \
+ info) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-texinfo dvi-texinfo
-maybe-dvi-texinfo:
+.PHONY: maybe-dvi-dosutils dvi-dosutils
+maybe-dvi-dosutils:
+@if dosutils
+maybe-dvi-dosutils: dvi-dosutils
-dvi-texinfo: \
- configure-texinfo
- @[ -f ./texinfo/Makefile ] || exit 0; \
+dvi-dosutils: \
+ configure-dosutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in texinfo" ; \
- (cd texinfo && \
+ echo "Doing dvi 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}" \
@@ -3842,241 +8238,363 @@ dvi-texinfo: \
dvi) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-textutils dvi-textutils
-maybe-dvi-textutils:
+.PHONY: maybe-html-dosutils html-dosutils
+maybe-html-dosutils:
+@if dosutils
+maybe-html-dosutils: html-dosutils
-dvi-textutils: \
- configure-textutils
- @[ -f ./textutils/Makefile ] || exit 0; \
+html-dosutils: \
+ configure-dosutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in textutils" ; \
- (cd textutils && \
+ echo "Doing html 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}" \
- dvi) \
+ html) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-time dvi-time
-maybe-dvi-time:
+.PHONY: maybe-TAGS-dosutils TAGS-dosutils
+maybe-TAGS-dosutils:
+@if dosutils
+maybe-TAGS-dosutils: TAGS-dosutils
-dvi-time: \
- configure-time
- @[ -f ./time/Makefile ] || exit 0; \
+TAGS-dosutils: \
+ configure-dosutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in time" ; \
- (cd time && \
+ echo "Doing TAGS 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}" \
- dvi) \
+ TAGS) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-uudecode dvi-uudecode
-maybe-dvi-uudecode:
+.PHONY: maybe-install-info-dosutils install-info-dosutils
+maybe-install-info-dosutils:
+@if dosutils
+maybe-install-info-dosutils: install-info-dosutils
-dvi-uudecode: \
- configure-uudecode
- @[ -f ./uudecode/Makefile ] || exit 0; \
+install-info-dosutils: \
+ configure-dosutils \
+ info-dosutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in uudecode" ; \
- (cd uudecode && \
+ echo "Doing install-info 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}" \
- dvi) \
+ install-info) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-wdiff dvi-wdiff
-maybe-dvi-wdiff:
+.PHONY: maybe-install-html-dosutils install-html-dosutils
+maybe-install-html-dosutils:
+@if dosutils
+maybe-install-html-dosutils: install-html-dosutils
-dvi-wdiff: \
- configure-wdiff
- @[ -f ./wdiff/Makefile ] || exit 0; \
+install-html-dosutils: \
+ configure-dosutils \
+ html-dosutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in wdiff" ; \
- (cd wdiff && \
+ echo "Doing install-html 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}" \
- dvi) \
+ install-html) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-zip dvi-zip
-maybe-dvi-zip:
+.PHONY: maybe-installcheck-dosutils installcheck-dosutils
+maybe-installcheck-dosutils:
+@if dosutils
+maybe-installcheck-dosutils: installcheck-dosutils
-dvi-zip: \
- configure-zip
- @[ -f ./zip/Makefile ] || exit 0; \
+installcheck-dosutils: \
+ configure-dosutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in zip" ; \
- (cd zip && \
+ echo "Doing installcheck 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}" \
- dvi) \
+ installcheck) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-zlib dvi-zlib
-maybe-dvi-zlib:
+.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils
+maybe-mostlyclean-dosutils:
+@if dosutils
+maybe-mostlyclean-dosutils: mostlyclean-dosutils
-dvi-zlib: \
- configure-zlib
- @[ -f ./zlib/Makefile ] || exit 0; \
+mostlyclean-dosutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in zlib" ; \
- (cd zlib && \
+ echo "Doing mostlyclean 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}" \
- dvi) \
+ mostlyclean) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-gdb dvi-gdb
-maybe-dvi-gdb:
+.PHONY: maybe-clean-dosutils clean-dosutils
+maybe-clean-dosutils:
+@if dosutils
+maybe-clean-dosutils: clean-dosutils
-dvi-gdb: \
- configure-gdb
- @[ -f ./gdb/Makefile ] || exit 0; \
+clean-dosutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gdb" ; \
- (cd gdb && \
+ echo "Doing clean 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}" \
- dvi) \
+ clean) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-expect dvi-expect
-maybe-dvi-expect:
+.PHONY: maybe-distclean-dosutils distclean-dosutils
+maybe-distclean-dosutils:
+@if dosutils
+maybe-distclean-dosutils: distclean-dosutils
-dvi-expect: \
- configure-expect
- @[ -f ./expect/Makefile ] || exit 0; \
+distclean-dosutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in expect" ; \
- (cd expect && \
+ echo "Doing distclean 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}" \
- dvi) \
+ distclean) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-guile dvi-guile
-maybe-dvi-guile:
+.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils
+maybe-maintainer-clean-dosutils:
+@if dosutils
+maybe-maintainer-clean-dosutils: maintainer-clean-dosutils
-dvi-guile: \
- configure-guile
- @[ -f ./guile/Makefile ] || exit 0; \
+maintainer-clean-dosutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in guile" ; \
- (cd guile && \
+ echo "Doing maintainer-clean 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}" \
- dvi) \
+ maintainer-clean) \
|| exit 1
+@endif dosutils
-.PHONY: maybe-dvi-tk dvi-tk
-maybe-dvi-tk:
-dvi-tk: \
- configure-tk
- @[ -f ./tk/Makefile ] || exit 0; \
+
+.PHONY: configure-etc maybe-configure-etc
+maybe-configure-etc:
+@if etc
+maybe-configure-etc: configure-etc
+configure-etc:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/etc/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/etc ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/etc; \
+ cd "$(HOST_SUBDIR)/etc" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/etc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/etc"; \
+ libsrcdir="$$s/etc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif etc
+
+
+
+
+
+.PHONY: all-etc maybe-all-etc
+maybe-all-etc:
+@if etc
+TARGET-etc=all
+maybe-all-etc: all-etc
+all-etc: configure-etc
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/etc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-etc))
+@endif etc
+
+
+
+
+.PHONY: check-etc maybe-check-etc
+maybe-check-etc:
+@if etc
+maybe-check-etc: check-etc
+
+check-etc:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/etc && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif etc
+
+.PHONY: install-etc maybe-install-etc
+maybe-install-etc:
+@if etc
+maybe-install-etc: install-etc
+
+install-etc: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/etc && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif etc
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-etc info-etc
+maybe-info-etc:
+@if etc
+maybe-info-etc: info-etc
+
+info-etc: \
+ configure-etc
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in tk" ; \
- (cd tk && \
+ echo "Doing info 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}" \
- dvi) \
+ info) \
|| exit 1
+@endif etc
-.PHONY: maybe-dvi-tix dvi-tix
-maybe-dvi-tix:
+.PHONY: maybe-dvi-etc dvi-etc
+maybe-dvi-etc:
+@if etc
+maybe-dvi-etc: dvi-etc
-dvi-tix: \
- configure-tix
- @[ -f ./tix/Makefile ] || exit 0; \
+dvi-etc: \
+ configure-etc
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in tix" ; \
- (cd tix && \
+ echo "Doing dvi 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}" \
@@ -4084,222 +8602,366 @@ dvi-tix: \
dvi) \
|| exit 1
+@endif etc
-.PHONY: maybe-dvi-libtermcap dvi-libtermcap
-maybe-dvi-libtermcap:
+.PHONY: maybe-html-etc html-etc
+maybe-html-etc:
+@if etc
+maybe-html-etc: html-etc
-dvi-libtermcap: \
- configure-libtermcap
- @[ -f ./libtermcap/Makefile ] || exit 0; \
+html-etc: \
+ configure-etc
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libtermcap" ; \
- (cd libtermcap && \
+ echo "Doing html 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}" \
- dvi) \
+ html) \
|| exit 1
+@endif etc
-.PHONY: maybe-dvi-utils dvi-utils
-maybe-dvi-utils:
+.PHONY: maybe-TAGS-etc TAGS-etc
+maybe-TAGS-etc:
+@if etc
+maybe-TAGS-etc: TAGS-etc
-dvi-utils: \
- configure-utils
- @[ -f ./utils/Makefile ] || exit 0; \
+TAGS-etc: \
+ configure-etc
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in utils" ; \
- (cd utils && \
+ echo "Doing TAGS 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}" \
- dvi) \
+ TAGS) \
|| exit 1
+@endif etc
+
+.PHONY: maybe-install-info-etc install-info-etc
+maybe-install-info-etc:
+@if etc
+maybe-install-info-etc: install-info-etc
+install-info-etc: \
+ configure-etc \
+ info-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-info 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-info) \
+ || exit 1
-# Target modules.
+@endif etc
-.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3
-maybe-dvi-target-libstdc++-v3:
+.PHONY: maybe-install-html-etc install-html-etc
+maybe-install-html-etc:
+@if etc
+maybe-install-html-etc: install-html-etc
-dvi-target-libstdc++-v3: \
- configure-target-libstdc++-v3
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+install-html-etc: \
+ configure-etc \
+ html-etc
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ echo "Doing install-html 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}" \
- dvi) \
+ install-html) \
|| exit 1
+@endif etc
-.PHONY: maybe-dvi-target-newlib dvi-target-newlib
-maybe-dvi-target-newlib:
+.PHONY: maybe-installcheck-etc installcheck-etc
+maybe-installcheck-etc:
+@if etc
+maybe-installcheck-etc: installcheck-etc
-dvi-target-newlib: \
- configure-target-newlib
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+installcheck-etc: \
+ configure-etc
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ echo "Doing installcheck 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}" \
- dvi) \
+ installcheck) \
|| exit 1
+@endif etc
-.PHONY: maybe-dvi-target-libf2c dvi-target-libf2c
-maybe-dvi-target-libf2c:
+.PHONY: maybe-mostlyclean-etc mostlyclean-etc
+maybe-mostlyclean-etc:
+@if etc
+maybe-mostlyclean-etc: mostlyclean-etc
-dvi-target-libf2c: \
- configure-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+mostlyclean-etc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ echo "Doing mostlyclean 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}" \
- dvi) \
+ mostlyclean) \
|| exit 1
+@endif etc
-.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc
-maybe-dvi-target-libobjc:
+.PHONY: maybe-clean-etc clean-etc
+maybe-clean-etc:
+@if etc
+maybe-clean-etc: clean-etc
-dvi-target-libobjc: \
- configure-target-libobjc
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+clean-etc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
+ echo "Doing clean 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}" \
- dvi) \
+ clean) \
|| exit 1
+@endif etc
-.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap
-maybe-dvi-target-libtermcap:
+.PHONY: maybe-distclean-etc distclean-etc
+maybe-distclean-etc:
+@if etc
+maybe-distclean-etc: distclean-etc
-dvi-target-libtermcap: \
- configure-target-libtermcap
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+distclean-etc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libtermcap && \
+ echo "Doing distclean 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}" \
- dvi) \
+ distclean) \
|| exit 1
+@endif etc
-.PHONY: maybe-dvi-target-winsup dvi-target-winsup
-maybe-dvi-target-winsup:
+.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc
+maybe-maintainer-clean-etc:
+@if etc
+maybe-maintainer-clean-etc: maintainer-clean-etc
-dvi-target-winsup: \
- configure-target-winsup
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+maintainer-clean-etc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/winsup && \
+ echo "Doing maintainer-clean 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}" \
- dvi) \
+ maintainer-clean) \
|| exit 1
+@endif etc
-.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss
-maybe-dvi-target-libgloss:
-dvi-target-libgloss: \
- configure-target-libgloss
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+
+.PHONY: configure-fastjar maybe-configure-fastjar
+maybe-configure-fastjar:
+@if fastjar
+maybe-configure-fastjar: configure-fastjar
+configure-fastjar:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/fastjar/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fastjar ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/fastjar; \
+ cd "$(HOST_SUBDIR)/fastjar" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/fastjar/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/fastjar"; \
+ libsrcdir="$$s/fastjar"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif fastjar
+
+
+
+
+
+.PHONY: all-fastjar maybe-all-fastjar
+maybe-all-fastjar:
+@if fastjar
+TARGET-fastjar=all
+maybe-all-fastjar: all-fastjar
+all-fastjar: configure-fastjar
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fastjar && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-fastjar))
+@endif fastjar
+
+
+
+
+.PHONY: check-fastjar maybe-check-fastjar
+maybe-check-fastjar:
+@if fastjar
+maybe-check-fastjar: check-fastjar
+
+# This module is only tested in a native toolchain.
+check-fastjar:
+ @: $(MAKE); $(unstage)
+ @if [ '$(host)' = '$(target)' ] ; then \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fastjar && \
+ $(MAKE) $(FLAGS_TO_PASS) check); \
+ fi
+
+@endif fastjar
+
+.PHONY: install-fastjar maybe-install-fastjar
+maybe-install-fastjar:
+@if fastjar
+maybe-install-fastjar: install-fastjar
+
+install-fastjar: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fastjar && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif fastjar
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-fastjar info-fastjar
+maybe-info-fastjar:
+@if fastjar
+maybe-info-fastjar: info-fastjar
+
+info-fastjar: \
+ configure-fastjar
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
+ echo "Doing info 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}" \
- dvi) \
+ info) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty
-maybe-dvi-target-libiberty:
+.PHONY: maybe-dvi-fastjar dvi-fastjar
+maybe-dvi-fastjar:
+@if fastjar
+maybe-dvi-fastjar: dvi-fastjar
-dvi-target-libiberty: \
- configure-target-libiberty
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+dvi-fastjar: \
+ configure-fastjar
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
+ echo "Doing dvi 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}" \
@@ -4307,377 +8969,415 @@ dvi-target-libiberty: \
dvi) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-gperf dvi-target-gperf
-maybe-dvi-target-gperf:
+.PHONY: maybe-html-fastjar html-fastjar
+maybe-html-fastjar:
+@if fastjar
+maybe-html-fastjar: html-fastjar
-dvi-target-gperf: \
- configure-target-gperf
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+html-fastjar: \
+ configure-fastjar
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/gperf && \
+ echo "Doing html 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}" \
- dvi) \
+ html) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-examples dvi-target-examples
-maybe-dvi-target-examples:
+.PHONY: maybe-TAGS-fastjar TAGS-fastjar
+maybe-TAGS-fastjar:
+@if fastjar
+maybe-TAGS-fastjar: TAGS-fastjar
-dvi-target-examples: \
- configure-target-examples
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+TAGS-fastjar: \
+ configure-fastjar
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/examples && \
+ echo "Doing TAGS 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}" \
- dvi) \
+ TAGS) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-libffi dvi-target-libffi
-maybe-dvi-target-libffi:
+.PHONY: maybe-install-info-fastjar install-info-fastjar
+maybe-install-info-fastjar:
+@if fastjar
+maybe-install-info-fastjar: install-info-fastjar
-dvi-target-libffi: \
- configure-target-libffi
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+install-info-fastjar: \
+ configure-fastjar \
+ info-fastjar
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libffi && \
+ echo "Doing install-info 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}" \
- dvi) \
+ install-info) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-libjava dvi-target-libjava
-maybe-dvi-target-libjava:
+.PHONY: maybe-install-html-fastjar install-html-fastjar
+maybe-install-html-fastjar:
+@if fastjar
+maybe-install-html-fastjar: install-html-fastjar
-dvi-target-libjava: \
- configure-target-libjava
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+install-html-fastjar: \
+ configure-fastjar \
+ html-fastjar
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libjava && \
+ echo "Doing install-html 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}" \
- dvi) \
+ install-html) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-zlib dvi-target-zlib
-maybe-dvi-target-zlib:
+.PHONY: maybe-installcheck-fastjar installcheck-fastjar
+maybe-installcheck-fastjar:
+@if fastjar
+maybe-installcheck-fastjar: installcheck-fastjar
-dvi-target-zlib: \
- configure-target-zlib
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+installcheck-fastjar: \
+ configure-fastjar
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/zlib && \
+ echo "Doing installcheck 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}" \
- dvi) \
+ installcheck) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc
-maybe-dvi-target-boehm-gc:
+.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar
+maybe-mostlyclean-fastjar:
+@if fastjar
+maybe-mostlyclean-fastjar: mostlyclean-fastjar
-dvi-target-boehm-gc: \
- configure-target-boehm-gc
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+mostlyclean-fastjar:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
+ echo "Doing mostlyclean 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}" \
- dvi) \
+ mostlyclean) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads
-maybe-dvi-target-qthreads:
+.PHONY: maybe-clean-fastjar clean-fastjar
+maybe-clean-fastjar:
+@if fastjar
+maybe-clean-fastjar: clean-fastjar
-dvi-target-qthreads: \
- configure-target-qthreads
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+clean-fastjar:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/qthreads && \
+ echo "Doing clean 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}" \
- dvi) \
+ clean) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-rda dvi-target-rda
-maybe-dvi-target-rda:
+.PHONY: maybe-distclean-fastjar distclean-fastjar
+maybe-distclean-fastjar:
+@if fastjar
+maybe-distclean-fastjar: distclean-fastjar
-dvi-target-rda: \
- configure-target-rda
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+distclean-fastjar:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/rda && \
+ echo "Doing distclean 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}" \
- dvi) \
+ distclean) \
|| exit 1
+@endif fastjar
-.PHONY: maybe-dvi-target-libada dvi-target-libada
-maybe-dvi-target-libada:
+.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar
+maybe-maintainer-clean-fastjar:
+@if fastjar
+maybe-maintainer-clean-fastjar: maintainer-clean-fastjar
-dvi-target-libada: \
- configure-target-libada
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+maintainer-clean-fastjar:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libada && \
+ echo "Doing maintainer-clean 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}" \
- dvi) \
+ maintainer-clean) \
|| exit 1
+@endif fastjar
-.PHONY: do-TAGS
-do-TAGS: TAGS-host TAGS-target
-.PHONY: TAGS-host
-TAGS-host: maybe-TAGS-gcc \
- maybe-TAGS-ash \
- maybe-TAGS-autoconf \
- maybe-TAGS-automake \
- maybe-TAGS-bash \
- maybe-TAGS-bfd \
- maybe-TAGS-opcodes \
- maybe-TAGS-binutils \
- maybe-TAGS-bison \
- maybe-TAGS-byacc \
- maybe-TAGS-bzip2 \
- maybe-TAGS-dejagnu \
- maybe-TAGS-diff \
- maybe-TAGS-dosutils \
- maybe-TAGS-etc \
- maybe-TAGS-fastjar \
- maybe-TAGS-fileutils \
- maybe-TAGS-findutils \
- maybe-TAGS-find \
- maybe-TAGS-flex \
- maybe-TAGS-gas \
- maybe-TAGS-gawk \
- maybe-TAGS-gettext \
- maybe-TAGS-gnuserv \
- maybe-TAGS-gprof \
- maybe-TAGS-gzip \
- maybe-TAGS-hello \
- maybe-TAGS-indent \
- maybe-TAGS-intl \
- maybe-TAGS-tcl \
- maybe-TAGS-itcl \
- maybe-TAGS-ld \
- maybe-TAGS-libgui \
- maybe-TAGS-libiberty \
- maybe-TAGS-libtool \
- maybe-TAGS-m4 \
- maybe-TAGS-make \
- maybe-TAGS-mmalloc \
- maybe-TAGS-patch \
- maybe-TAGS-perl \
- maybe-TAGS-prms \
- maybe-TAGS-rcs \
- maybe-TAGS-readline \
- maybe-TAGS-release \
- maybe-TAGS-recode \
- maybe-TAGS-sed \
- maybe-TAGS-send-pr \
- maybe-TAGS-shellutils \
- maybe-TAGS-sid \
- maybe-TAGS-sim \
- maybe-TAGS-tar \
- maybe-TAGS-texinfo \
- maybe-TAGS-textutils \
- maybe-TAGS-time \
- maybe-TAGS-uudecode \
- maybe-TAGS-wdiff \
- maybe-TAGS-zip \
- maybe-TAGS-zlib \
- maybe-TAGS-gdb \
- maybe-TAGS-expect \
- maybe-TAGS-guile \
- maybe-TAGS-tk \
- maybe-TAGS-tix \
- maybe-TAGS-libtermcap \
- maybe-TAGS-utils
+.PHONY: configure-fileutils maybe-configure-fileutils
+maybe-configure-fileutils:
+@if fileutils
+maybe-configure-fileutils: configure-fileutils
+configure-fileutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/fileutils/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fileutils ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/fileutils; \
+ cd "$(HOST_SUBDIR)/fileutils" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/fileutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/fileutils"; \
+ libsrcdir="$$s/fileutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif fileutils
-.PHONY: TAGS-target
-TAGS-target: \
- maybe-TAGS-target-libstdc++-v3 \
- maybe-TAGS-target-newlib \
- maybe-TAGS-target-libf2c \
- maybe-TAGS-target-libobjc \
- maybe-TAGS-target-libtermcap \
- maybe-TAGS-target-winsup \
- maybe-TAGS-target-libgloss \
- maybe-TAGS-target-libiberty \
- maybe-TAGS-target-gperf \
- maybe-TAGS-target-examples \
- maybe-TAGS-target-libffi \
- maybe-TAGS-target-libjava \
- maybe-TAGS-target-zlib \
- maybe-TAGS-target-boehm-gc \
- maybe-TAGS-target-qthreads \
- maybe-TAGS-target-rda \
- maybe-TAGS-target-libada
-
-# GCC, the eternal special case
-.PHONY: maybe-TAGS-gcc TAGS-gcc
-maybe-TAGS-gcc:
-TAGS-gcc: \
- configure-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
+
+
+
+
+.PHONY: all-fileutils maybe-all-fileutils
+maybe-all-fileutils:
+@if fileutils
+TARGET-fileutils=all
+maybe-all-fileutils: all-fileutils
+all-fileutils: configure-fileutils
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fileutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-fileutils))
+@endif fileutils
+
+
+
+
+.PHONY: check-fileutils maybe-check-fileutils
+maybe-check-fileutils:
+@if fileutils
+maybe-check-fileutils: check-fileutils
+
+check-fileutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fileutils && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif fileutils
+
+.PHONY: install-fileutils maybe-install-fileutils
+maybe-install-fileutils:
+@if fileutils
+maybe-install-fileutils: install-fileutils
+
+install-fileutils: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fileutils && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif fileutils
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-fileutils info-fileutils
+maybe-info-fileutils:
+@if fileutils
+maybe-info-fileutils: info-fileutils
+
+info-fileutils: \
+ configure-fileutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gcc" ; \
- (cd gcc && \
+ echo "Doing info 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}" \
- TAGS) \
+ info) \
|| exit 1
-# Host modules.
+@endif fileutils
-.PHONY: maybe-TAGS-ash TAGS-ash
-maybe-TAGS-ash:
+.PHONY: maybe-dvi-fileutils dvi-fileutils
+maybe-dvi-fileutils:
+@if fileutils
+maybe-dvi-fileutils: dvi-fileutils
-TAGS-ash: \
- configure-ash
- @[ -f ./ash/Makefile ] || exit 0; \
+dvi-fileutils: \
+ configure-fileutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in ash" ; \
- (cd ash && \
+ echo "Doing dvi 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}" \
- TAGS) \
+ dvi) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-autoconf TAGS-autoconf
-maybe-TAGS-autoconf:
+.PHONY: maybe-html-fileutils html-fileutils
+maybe-html-fileutils:
+@if fileutils
+maybe-html-fileutils: html-fileutils
-TAGS-autoconf: \
- configure-autoconf
- @[ -f ./autoconf/Makefile ] || exit 0; \
+html-fileutils: \
+ configure-fileutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in autoconf" ; \
- (cd autoconf && \
+ echo "Doing html 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}" \
- TAGS) \
+ html) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-automake TAGS-automake
-maybe-TAGS-automake:
+.PHONY: maybe-TAGS-fileutils TAGS-fileutils
+maybe-TAGS-fileutils:
+@if fileutils
+maybe-TAGS-fileutils: TAGS-fileutils
-TAGS-automake: \
- configure-automake
- @[ -f ./automake/Makefile ] || exit 0; \
+TAGS-fileutils: \
+ configure-fileutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in automake" ; \
- (cd automake && \
+ echo "Doing TAGS 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}" \
@@ -4685,241 +9385,363 @@ TAGS-automake: \
TAGS) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-bash TAGS-bash
-maybe-TAGS-bash:
+.PHONY: maybe-install-info-fileutils install-info-fileutils
+maybe-install-info-fileutils:
+@if fileutils
+maybe-install-info-fileutils: install-info-fileutils
-TAGS-bash: \
- configure-bash
- @[ -f ./bash/Makefile ] || exit 0; \
+install-info-fileutils: \
+ configure-fileutils \
+ info-fileutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in bash" ; \
- (cd bash && \
+ echo "Doing install-info 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}" \
- TAGS) \
+ install-info) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-bfd TAGS-bfd
-maybe-TAGS-bfd:
+.PHONY: maybe-install-html-fileutils install-html-fileutils
+maybe-install-html-fileutils:
+@if fileutils
+maybe-install-html-fileutils: install-html-fileutils
-TAGS-bfd: \
- configure-bfd
- @[ -f ./bfd/Makefile ] || exit 0; \
+install-html-fileutils: \
+ configure-fileutils \
+ html-fileutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in bfd" ; \
- (cd bfd && \
+ echo "Doing install-html 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}" \
- TAGS) \
+ install-html) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-opcodes TAGS-opcodes
-maybe-TAGS-opcodes:
+.PHONY: maybe-installcheck-fileutils installcheck-fileutils
+maybe-installcheck-fileutils:
+@if fileutils
+maybe-installcheck-fileutils: installcheck-fileutils
-TAGS-opcodes: \
- configure-opcodes
- @[ -f ./opcodes/Makefile ] || exit 0; \
+installcheck-fileutils: \
+ configure-fileutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in opcodes" ; \
- (cd opcodes && \
+ echo "Doing installcheck 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}" \
- TAGS) \
+ installcheck) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-binutils TAGS-binutils
-maybe-TAGS-binutils:
+.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils
+maybe-mostlyclean-fileutils:
+@if fileutils
+maybe-mostlyclean-fileutils: mostlyclean-fileutils
-TAGS-binutils: \
- configure-binutils
- @[ -f ./binutils/Makefile ] || exit 0; \
+mostlyclean-fileutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in binutils" ; \
- (cd binutils && \
+ echo "Doing mostlyclean 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}" \
- TAGS) \
+ mostlyclean) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-bison TAGS-bison
-maybe-TAGS-bison:
+.PHONY: maybe-clean-fileutils clean-fileutils
+maybe-clean-fileutils:
+@if fileutils
+maybe-clean-fileutils: clean-fileutils
-TAGS-bison: \
- configure-bison
- @[ -f ./bison/Makefile ] || exit 0; \
+clean-fileutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in bison" ; \
- (cd bison && \
+ echo "Doing clean 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}" \
- TAGS) \
+ clean) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-byacc TAGS-byacc
-maybe-TAGS-byacc:
+.PHONY: maybe-distclean-fileutils distclean-fileutils
+maybe-distclean-fileutils:
+@if fileutils
+maybe-distclean-fileutils: distclean-fileutils
-TAGS-byacc: \
- configure-byacc
- @[ -f ./byacc/Makefile ] || exit 0; \
+distclean-fileutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in byacc" ; \
- (cd byacc && \
+ echo "Doing distclean 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}" \
- TAGS) \
+ distclean) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-bzip2 TAGS-bzip2
-maybe-TAGS-bzip2:
+.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils
+maybe-maintainer-clean-fileutils:
+@if fileutils
+maybe-maintainer-clean-fileutils: maintainer-clean-fileutils
-TAGS-bzip2: \
- configure-bzip2
- @[ -f ./bzip2/Makefile ] || exit 0; \
+maintainer-clean-fileutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in bzip2" ; \
- (cd bzip2 && \
+ echo "Doing maintainer-clean 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}" \
- TAGS) \
+ maintainer-clean) \
|| exit 1
+@endif fileutils
-.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu
-maybe-TAGS-dejagnu:
-TAGS-dejagnu: \
- configure-dejagnu
- @[ -f ./dejagnu/Makefile ] || exit 0; \
+
+.PHONY: configure-findutils maybe-configure-findutils
+maybe-configure-findutils:
+@if findutils
+maybe-configure-findutils: configure-findutils
+configure-findutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/findutils/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/findutils ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/findutils; \
+ cd "$(HOST_SUBDIR)/findutils" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/findutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/findutils"; \
+ libsrcdir="$$s/findutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif findutils
+
+
+
+
+
+.PHONY: all-findutils maybe-all-findutils
+maybe-all-findutils:
+@if findutils
+TARGET-findutils=all
+maybe-all-findutils: all-findutils
+all-findutils: configure-findutils
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/findutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-findutils))
+@endif findutils
+
+
+
+
+.PHONY: check-findutils maybe-check-findutils
+maybe-check-findutils:
+@if findutils
+maybe-check-findutils: check-findutils
+
+check-findutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/findutils && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif findutils
+
+.PHONY: install-findutils maybe-install-findutils
+maybe-install-findutils:
+@if findutils
+maybe-install-findutils: install-findutils
+
+install-findutils: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/findutils && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif findutils
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-findutils info-findutils
+maybe-info-findutils:
+@if findutils
+maybe-info-findutils: info-findutils
+
+info-findutils: \
+ configure-findutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in dejagnu" ; \
- (cd dejagnu && \
+ echo "Doing info 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}" \
- TAGS) \
+ info) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-diff TAGS-diff
-maybe-TAGS-diff:
+.PHONY: maybe-dvi-findutils dvi-findutils
+maybe-dvi-findutils:
+@if findutils
+maybe-dvi-findutils: dvi-findutils
-TAGS-diff: \
- configure-diff
- @[ -f ./diff/Makefile ] || exit 0; \
+dvi-findutils: \
+ configure-findutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in diff" ; \
- (cd diff && \
+ echo "Doing dvi 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}" \
- TAGS) \
+ dvi) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-dosutils TAGS-dosutils
-maybe-TAGS-dosutils:
+.PHONY: maybe-html-findutils html-findutils
+maybe-html-findutils:
+@if findutils
+maybe-html-findutils: html-findutils
-TAGS-dosutils: \
- configure-dosutils
- @[ -f ./dosutils/Makefile ] || exit 0; \
+html-findutils: \
+ configure-findutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in dosutils" ; \
- (cd dosutils && \
+ echo "Doing html 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}" \
- TAGS) \
+ html) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-etc TAGS-etc
-maybe-TAGS-etc:
+.PHONY: maybe-TAGS-findutils TAGS-findutils
+maybe-TAGS-findutils:
+@if findutils
+maybe-TAGS-findutils: TAGS-findutils
-TAGS-etc: \
- configure-etc
- @[ -f ./etc/Makefile ] || exit 0; \
+TAGS-findutils: \
+ configure-findutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in etc" ; \
- (cd etc && \
+ echo "Doing TAGS 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}" \
@@ -4927,241 +9749,363 @@ TAGS-etc: \
TAGS) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-fastjar TAGS-fastjar
-maybe-TAGS-fastjar:
+.PHONY: maybe-install-info-findutils install-info-findutils
+maybe-install-info-findutils:
+@if findutils
+maybe-install-info-findutils: install-info-findutils
-TAGS-fastjar: \
- configure-fastjar
- @[ -f ./fastjar/Makefile ] || exit 0; \
+install-info-findutils: \
+ configure-findutils \
+ info-findutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in fastjar" ; \
- (cd fastjar && \
+ echo "Doing install-info 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}" \
- TAGS) \
+ install-info) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-fileutils TAGS-fileutils
-maybe-TAGS-fileutils:
+.PHONY: maybe-install-html-findutils install-html-findutils
+maybe-install-html-findutils:
+@if findutils
+maybe-install-html-findutils: install-html-findutils
-TAGS-fileutils: \
- configure-fileutils
- @[ -f ./fileutils/Makefile ] || exit 0; \
+install-html-findutils: \
+ configure-findutils \
+ html-findutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in fileutils" ; \
- (cd fileutils && \
+ echo "Doing install-html 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}" \
- TAGS) \
+ install-html) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-findutils TAGS-findutils
-maybe-TAGS-findutils:
+.PHONY: maybe-installcheck-findutils installcheck-findutils
+maybe-installcheck-findutils:
+@if findutils
+maybe-installcheck-findutils: installcheck-findutils
-TAGS-findutils: \
+installcheck-findutils: \
configure-findutils
+ @: $(MAKE); $(unstage)
@[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in findutils" ; \
- (cd findutils && \
+ echo "Doing installcheck 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}" \
- TAGS) \
+ installcheck) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-find TAGS-find
-maybe-TAGS-find:
+.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils
+maybe-mostlyclean-findutils:
+@if findutils
+maybe-mostlyclean-findutils: mostlyclean-findutils
-TAGS-find: \
- configure-find
- @[ -f ./find/Makefile ] || exit 0; \
+mostlyclean-findutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in find" ; \
- (cd find && \
+ echo "Doing mostlyclean 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}" \
- TAGS) \
+ mostlyclean) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-flex TAGS-flex
-maybe-TAGS-flex:
+.PHONY: maybe-clean-findutils clean-findutils
+maybe-clean-findutils:
+@if findutils
+maybe-clean-findutils: clean-findutils
-TAGS-flex: \
- configure-flex
- @[ -f ./flex/Makefile ] || exit 0; \
+clean-findutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in flex" ; \
- (cd flex && \
+ echo "Doing clean 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}" \
- TAGS) \
+ clean) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-gas TAGS-gas
-maybe-TAGS-gas:
+.PHONY: maybe-distclean-findutils distclean-findutils
+maybe-distclean-findutils:
+@if findutils
+maybe-distclean-findutils: distclean-findutils
-TAGS-gas: \
- configure-gas
- @[ -f ./gas/Makefile ] || exit 0; \
+distclean-findutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gas" ; \
- (cd gas && \
+ echo "Doing distclean 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}" \
- TAGS) \
+ distclean) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-gawk TAGS-gawk
-maybe-TAGS-gawk:
+.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils
+maybe-maintainer-clean-findutils:
+@if findutils
+maybe-maintainer-clean-findutils: maintainer-clean-findutils
-TAGS-gawk: \
- configure-gawk
- @[ -f ./gawk/Makefile ] || exit 0; \
+maintainer-clean-findutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gawk" ; \
- (cd gawk && \
+ echo "Doing maintainer-clean 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}" \
- TAGS) \
+ maintainer-clean) \
|| exit 1
+@endif findutils
-.PHONY: maybe-TAGS-gettext TAGS-gettext
-maybe-TAGS-gettext:
-TAGS-gettext: \
- configure-gettext
- @[ -f ./gettext/Makefile ] || exit 0; \
+
+.PHONY: configure-find maybe-configure-find
+maybe-configure-find:
+@if find
+maybe-configure-find: configure-find
+configure-find:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/find/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/find ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/find; \
+ cd "$(HOST_SUBDIR)/find" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/find/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/find"; \
+ libsrcdir="$$s/find"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif find
+
+
+
+
+
+.PHONY: all-find maybe-all-find
+maybe-all-find:
+@if find
+TARGET-find=all
+maybe-all-find: all-find
+all-find: configure-find
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/find && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-find))
+@endif find
+
+
+
+
+.PHONY: check-find maybe-check-find
+maybe-check-find:
+@if find
+maybe-check-find: check-find
+
+check-find:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/find && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif find
+
+.PHONY: install-find maybe-install-find
+maybe-install-find:
+@if find
+maybe-install-find: install-find
+
+install-find: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/find && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif find
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-find info-find
+maybe-info-find:
+@if find
+maybe-info-find: info-find
+
+info-find: \
+ configure-find
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gettext" ; \
- (cd gettext && \
+ echo "Doing info 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}" \
- TAGS) \
+ info) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv
-maybe-TAGS-gnuserv:
+.PHONY: maybe-dvi-find dvi-find
+maybe-dvi-find:
+@if find
+maybe-dvi-find: dvi-find
-TAGS-gnuserv: \
- configure-gnuserv
- @[ -f ./gnuserv/Makefile ] || exit 0; \
+dvi-find: \
+ configure-find
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gnuserv" ; \
- (cd gnuserv && \
+ echo "Doing dvi 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}" \
- TAGS) \
+ dvi) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-gprof TAGS-gprof
-maybe-TAGS-gprof:
+.PHONY: maybe-html-find html-find
+maybe-html-find:
+@if find
+maybe-html-find: html-find
-TAGS-gprof: \
- configure-gprof
- @[ -f ./gprof/Makefile ] || exit 0; \
+html-find: \
+ configure-find
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gprof" ; \
- (cd gprof && \
+ echo "Doing html 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}" \
- TAGS) \
+ html) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-gzip TAGS-gzip
-maybe-TAGS-gzip:
+.PHONY: maybe-TAGS-find TAGS-find
+maybe-TAGS-find:
+@if find
+maybe-TAGS-find: TAGS-find
-TAGS-gzip: \
- configure-gzip
- @[ -f ./gzip/Makefile ] || exit 0; \
+TAGS-find: \
+ configure-find
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gzip" ; \
- (cd gzip && \
+ echo "Doing TAGS 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}" \
@@ -5169,373 +10113,649 @@ TAGS-gzip: \
TAGS) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-hello TAGS-hello
-maybe-TAGS-hello:
+.PHONY: maybe-install-info-find install-info-find
+maybe-install-info-find:
+@if find
+maybe-install-info-find: install-info-find
-TAGS-hello: \
- configure-hello
- @[ -f ./hello/Makefile ] || exit 0; \
+install-info-find: \
+ configure-find \
+ info-find
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in hello" ; \
- (cd hello && \
+ echo "Doing install-info 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}" \
- TAGS) \
+ install-info) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-indent TAGS-indent
-maybe-TAGS-indent:
+.PHONY: maybe-install-html-find install-html-find
+maybe-install-html-find:
+@if find
+maybe-install-html-find: install-html-find
-TAGS-indent: \
- configure-indent
- @[ -f ./indent/Makefile ] || exit 0; \
+install-html-find: \
+ configure-find \
+ html-find
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in indent" ; \
- (cd indent && \
+ echo "Doing install-html 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}" \
- TAGS) \
+ install-html) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-intl TAGS-intl
-maybe-TAGS-intl:
+.PHONY: maybe-installcheck-find installcheck-find
+maybe-installcheck-find:
+@if find
+maybe-installcheck-find: installcheck-find
-TAGS-intl: \
- configure-intl
- @[ -f ./intl/Makefile ] || exit 0; \
+installcheck-find: \
+ configure-find
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in intl" ; \
- (cd intl && \
+ echo "Doing installcheck 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}" \
- TAGS) \
+ installcheck) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-tcl TAGS-tcl
-maybe-TAGS-tcl:
+.PHONY: maybe-mostlyclean-find mostlyclean-find
+maybe-mostlyclean-find:
+@if find
+maybe-mostlyclean-find: mostlyclean-find
-TAGS-tcl: \
- configure-tcl
- @[ -f ./tcl/Makefile ] || exit 0; \
+mostlyclean-find:
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in tcl" ; \
- (cd tcl && \
+ echo "Doing mostlyclean 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}" \
- TAGS) \
+ mostlyclean) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-itcl TAGS-itcl
-maybe-TAGS-itcl:
+.PHONY: maybe-clean-find clean-find
+maybe-clean-find:
+@if find
+maybe-clean-find: clean-find
-TAGS-itcl: \
- configure-itcl
- @[ -f ./itcl/Makefile ] || exit 0; \
+clean-find:
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in itcl" ; \
- (cd itcl && \
+ echo "Doing clean 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}" \
- TAGS) \
+ clean) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-ld TAGS-ld
-maybe-TAGS-ld:
+.PHONY: maybe-distclean-find distclean-find
+maybe-distclean-find:
+@if find
+maybe-distclean-find: distclean-find
-TAGS-ld: \
- configure-ld
- @[ -f ./ld/Makefile ] || exit 0; \
+distclean-find:
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in ld" ; \
- (cd ld && \
+ echo "Doing distclean 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}" \
- TAGS) \
+ distclean) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-libgui TAGS-libgui
-maybe-TAGS-libgui:
+.PHONY: maybe-maintainer-clean-find maintainer-clean-find
+maybe-maintainer-clean-find:
+@if find
+maybe-maintainer-clean-find: maintainer-clean-find
-TAGS-libgui: \
- configure-libgui
- @[ -f ./libgui/Makefile ] || exit 0; \
+maintainer-clean-find:
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libgui" ; \
- (cd libgui && \
+ echo "Doing maintainer-clean 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}" \
- TAGS) \
+ maintainer-clean) \
|| exit 1
+@endif find
-.PHONY: maybe-TAGS-libiberty TAGS-libiberty
-maybe-TAGS-libiberty:
-TAGS-libiberty: \
- configure-libiberty
- @[ -f ./libiberty/Makefile ] || exit 0; \
+
+.PHONY: configure-fixincludes maybe-configure-fixincludes
+maybe-configure-fixincludes:
+@if fixincludes
+maybe-configure-fixincludes: configure-fixincludes
+configure-fixincludes:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/fixincludes; \
+ cd "$(HOST_SUBDIR)/fixincludes" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/fixincludes"; \
+ libsrcdir="$$s/fixincludes"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif fixincludes
+
+
+
+
+
+.PHONY: all-fixincludes maybe-all-fixincludes
+maybe-all-fixincludes:
+@if fixincludes
+TARGET-fixincludes=all
+maybe-all-fixincludes: all-fixincludes
+all-fixincludes: configure-fixincludes
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-fixincludes))
+@endif fixincludes
+
+
+
+
+.PHONY: check-fixincludes maybe-check-fixincludes
+maybe-check-fixincludes:
+@if fixincludes
+maybe-check-fixincludes: check-fixincludes
+
+check-fixincludes:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif fixincludes
+
+.PHONY: install-fixincludes maybe-install-fixincludes
+maybe-install-fixincludes:
+@if fixincludes
+maybe-install-fixincludes: install-fixincludes
+
+install-fixincludes: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif fixincludes
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-fixincludes info-fixincludes
+maybe-info-fixincludes:
+@if fixincludes
+maybe-info-fixincludes: info-fixincludes
+
+# fixincludes doesn't support info.
+info-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-dvi-fixincludes dvi-fixincludes
+maybe-dvi-fixincludes:
+@if fixincludes
+maybe-dvi-fixincludes: dvi-fixincludes
+
+# fixincludes doesn't support dvi.
+dvi-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-html-fixincludes html-fixincludes
+maybe-html-fixincludes:
+@if fixincludes
+maybe-html-fixincludes: html-fixincludes
+
+html-fixincludes: \
+ configure-fixincludes
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libiberty" ; \
- (cd libiberty && \
+ echo "Doing html 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}" \
- TAGS) \
+ html) \
|| exit 1
+@endif fixincludes
-.PHONY: maybe-TAGS-libtool TAGS-libtool
-maybe-TAGS-libtool:
+.PHONY: maybe-TAGS-fixincludes TAGS-fixincludes
+maybe-TAGS-fixincludes:
+@if fixincludes
+maybe-TAGS-fixincludes: TAGS-fixincludes
-TAGS-libtool: \
- configure-libtool
- @[ -f ./libtool/Makefile ] || exit 0; \
+# fixincludes doesn't support TAGS.
+TAGS-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-install-info-fixincludes install-info-fixincludes
+maybe-install-info-fixincludes:
+@if fixincludes
+maybe-install-info-fixincludes: install-info-fixincludes
+
+# fixincludes doesn't support install-info.
+install-info-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-install-html-fixincludes install-html-fixincludes
+maybe-install-html-fixincludes:
+@if fixincludes
+maybe-install-html-fixincludes: install-html-fixincludes
+
+install-html-fixincludes: \
+ configure-fixincludes \
+ html-fixincludes
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libtool" ; \
- (cd libtool && \
+ echo "Doing install-html 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}" \
- TAGS) \
+ install-html) \
|| exit 1
+@endif fixincludes
-.PHONY: maybe-TAGS-m4 TAGS-m4
-maybe-TAGS-m4:
+.PHONY: maybe-installcheck-fixincludes installcheck-fixincludes
+maybe-installcheck-fixincludes:
+@if fixincludes
+maybe-installcheck-fixincludes: installcheck-fixincludes
-TAGS-m4: \
- configure-m4
- @[ -f ./m4/Makefile ] || exit 0; \
+# fixincludes doesn't support installcheck.
+installcheck-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-mostlyclean-fixincludes mostlyclean-fixincludes
+maybe-mostlyclean-fixincludes:
+@if fixincludes
+maybe-mostlyclean-fixincludes: mostlyclean-fixincludes
+
+mostlyclean-fixincludes:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in m4" ; \
- (cd m4 && \
+ echo "Doing mostlyclean 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}" \
- TAGS) \
+ mostlyclean) \
|| exit 1
+@endif fixincludes
-.PHONY: maybe-TAGS-make TAGS-make
-maybe-TAGS-make:
+.PHONY: maybe-clean-fixincludes clean-fixincludes
+maybe-clean-fixincludes:
+@if fixincludes
+maybe-clean-fixincludes: clean-fixincludes
-TAGS-make: \
- configure-make
- @[ -f ./make/Makefile ] || exit 0; \
+clean-fixincludes:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in make" ; \
- (cd make && \
+ echo "Doing clean 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}" \
- TAGS) \
+ clean) \
|| exit 1
+@endif fixincludes
-.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc
-maybe-TAGS-mmalloc:
+.PHONY: maybe-distclean-fixincludes distclean-fixincludes
+maybe-distclean-fixincludes:
+@if fixincludes
+maybe-distclean-fixincludes: distclean-fixincludes
-TAGS-mmalloc: \
- configure-mmalloc
- @[ -f ./mmalloc/Makefile ] || exit 0; \
+distclean-fixincludes:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in mmalloc" ; \
- (cd mmalloc && \
+ echo "Doing distclean 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}" \
- TAGS) \
+ distclean) \
|| exit 1
+@endif fixincludes
-.PHONY: maybe-TAGS-patch TAGS-patch
-maybe-TAGS-patch:
+.PHONY: maybe-maintainer-clean-fixincludes maintainer-clean-fixincludes
+maybe-maintainer-clean-fixincludes:
+@if fixincludes
+maybe-maintainer-clean-fixincludes: maintainer-clean-fixincludes
-TAGS-patch: \
- configure-patch
- @[ -f ./patch/Makefile ] || exit 0; \
+maintainer-clean-fixincludes:
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in patch" ; \
- (cd patch && \
+ echo "Doing maintainer-clean 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}" \
- TAGS) \
+ maintainer-clean) \
|| exit 1
+@endif fixincludes
-.PHONY: maybe-TAGS-perl TAGS-perl
-maybe-TAGS-perl:
-TAGS-perl: \
- configure-perl
- @[ -f ./perl/Makefile ] || exit 0; \
+
+.PHONY: configure-flex maybe-configure-flex
+maybe-configure-flex:
+@if flex
+maybe-configure-flex: configure-flex
+configure-flex:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/flex/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/flex ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/flex; \
+ cd "$(HOST_SUBDIR)/flex" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/flex/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/flex"; \
+ libsrcdir="$$s/flex"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif flex
+
+
+
+
+
+.PHONY: all-flex maybe-all-flex
+maybe-all-flex:
+@if flex
+TARGET-flex=all
+maybe-all-flex: all-flex
+all-flex: configure-flex
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/flex && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-flex))
+@endif flex
+
+
+
+
+.PHONY: check-flex maybe-check-flex
+maybe-check-flex:
+@if flex
+maybe-check-flex: check-flex
+
+# This module is only tested in a native toolchain.
+check-flex:
+ @: $(MAKE); $(unstage)
+ @if [ '$(host)' = '$(target)' ] ; then \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/flex && \
+ $(MAKE) $(FLAGS_TO_PASS) check); \
+ fi
+
+@endif flex
+
+.PHONY: install-flex maybe-install-flex
+maybe-install-flex:
+@if flex
+maybe-install-flex: install-flex
+
+install-flex: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/flex && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif flex
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-flex info-flex
+maybe-info-flex:
+@if flex
+maybe-info-flex: info-flex
+
+info-flex: \
+ configure-flex
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in perl" ; \
- (cd perl && \
+ echo "Doing info 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}" \
- TAGS) \
+ info) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-prms TAGS-prms
-maybe-TAGS-prms:
+.PHONY: maybe-dvi-flex dvi-flex
+maybe-dvi-flex:
+@if flex
+maybe-dvi-flex: dvi-flex
-TAGS-prms: \
- configure-prms
- @[ -f ./prms/Makefile ] || exit 0; \
+dvi-flex: \
+ configure-flex
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in prms" ; \
- (cd prms && \
+ echo "Doing dvi 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}" \
- TAGS) \
+ dvi) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-rcs TAGS-rcs
-maybe-TAGS-rcs:
+.PHONY: maybe-html-flex html-flex
+maybe-html-flex:
+@if flex
+maybe-html-flex: html-flex
-TAGS-rcs: \
- configure-rcs
- @[ -f ./rcs/Makefile ] || exit 0; \
+html-flex: \
+ configure-flex
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in rcs" ; \
- (cd rcs && \
+ echo "Doing html 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}" \
- TAGS) \
+ html) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-readline TAGS-readline
-maybe-TAGS-readline:
+.PHONY: maybe-TAGS-flex TAGS-flex
+maybe-TAGS-flex:
+@if flex
+maybe-TAGS-flex: TAGS-flex
-TAGS-readline: \
- configure-readline
- @[ -f ./readline/Makefile ] || exit 0; \
+TAGS-flex: \
+ configure-flex
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in readline" ; \
- (cd readline && \
+ echo "Doing TAGS 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}" \
@@ -5543,241 +10763,716 @@ TAGS-readline: \
TAGS) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-release TAGS-release
-maybe-TAGS-release:
+.PHONY: maybe-install-info-flex install-info-flex
+maybe-install-info-flex:
+@if flex
+maybe-install-info-flex: install-info-flex
-TAGS-release: \
- configure-release
- @[ -f ./release/Makefile ] || exit 0; \
+install-info-flex: \
+ configure-flex \
+ info-flex
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in release" ; \
- (cd release && \
+ echo "Doing install-info 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}" \
- TAGS) \
+ install-info) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-recode TAGS-recode
-maybe-TAGS-recode:
+.PHONY: maybe-install-html-flex install-html-flex
+maybe-install-html-flex:
+@if flex
+maybe-install-html-flex: install-html-flex
-TAGS-recode: \
- configure-recode
- @[ -f ./recode/Makefile ] || exit 0; \
+install-html-flex: \
+ configure-flex \
+ html-flex
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in recode" ; \
- (cd recode && \
+ echo "Doing install-html 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}" \
- TAGS) \
+ install-html) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-sed TAGS-sed
-maybe-TAGS-sed:
+.PHONY: maybe-installcheck-flex installcheck-flex
+maybe-installcheck-flex:
+@if flex
+maybe-installcheck-flex: installcheck-flex
-TAGS-sed: \
- configure-sed
- @[ -f ./sed/Makefile ] || exit 0; \
+installcheck-flex: \
+ configure-flex
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in sed" ; \
- (cd sed && \
+ echo "Doing installcheck 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}" \
- TAGS) \
+ installcheck) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-send-pr TAGS-send-pr
-maybe-TAGS-send-pr:
+.PHONY: maybe-mostlyclean-flex mostlyclean-flex
+maybe-mostlyclean-flex:
+@if flex
+maybe-mostlyclean-flex: mostlyclean-flex
-TAGS-send-pr: \
- configure-send-pr
- @[ -f ./send-pr/Makefile ] || exit 0; \
+mostlyclean-flex:
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in send-pr" ; \
- (cd send-pr && \
+ echo "Doing mostlyclean 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}" \
- TAGS) \
+ mostlyclean) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-shellutils TAGS-shellutils
-maybe-TAGS-shellutils:
+.PHONY: maybe-clean-flex clean-flex
+maybe-clean-flex:
+@if flex
+maybe-clean-flex: clean-flex
-TAGS-shellutils: \
- configure-shellutils
- @[ -f ./shellutils/Makefile ] || exit 0; \
+clean-flex:
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in shellutils" ; \
- (cd shellutils && \
+ echo "Doing clean 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}" \
- TAGS) \
+ clean) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-sid TAGS-sid
-maybe-TAGS-sid:
+.PHONY: maybe-distclean-flex distclean-flex
+maybe-distclean-flex:
+@if flex
+maybe-distclean-flex: distclean-flex
-TAGS-sid: \
- configure-sid
- @[ -f ./sid/Makefile ] || exit 0; \
+distclean-flex:
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in sid" ; \
- (cd sid && \
+ echo "Doing distclean 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}" \
- TAGS) \
+ distclean) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-sim TAGS-sim
-maybe-TAGS-sim:
+.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex
+maybe-maintainer-clean-flex:
+@if flex
+maybe-maintainer-clean-flex: maintainer-clean-flex
-TAGS-sim: \
- configure-sim
- @[ -f ./sim/Makefile ] || exit 0; \
+maintainer-clean-flex:
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in sim" ; \
- (cd sim && \
+ echo "Doing maintainer-clean 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}" \
- TAGS) \
+ maintainer-clean) \
|| exit 1
+@endif flex
-.PHONY: maybe-TAGS-tar TAGS-tar
-maybe-TAGS-tar:
-TAGS-tar: \
- configure-tar
- @[ -f ./tar/Makefile ] || exit 0; \
+
+.PHONY: configure-gas maybe-configure-gas
+maybe-configure-gas:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gas; \
+ cd "$(HOST_SUBDIR)/gas" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gas"; \
+ libsrcdir="$$s/gas"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gas
+
+
+
+.PHONY: configure-stage1-gas maybe-configure-stage1-gas
+maybe-configure-stage1-gas:
+@if gas-bootstrap
+maybe-configure-stage1-gas: configure-stage1-gas
+configure-stage1-gas:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gas"; \
+ libsrcdir="$$s/gas"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif gas-bootstrap
+
+.PHONY: configure-stage2-gas maybe-configure-stage2-gas
+maybe-configure-stage2-gas:
+@if gas-bootstrap
+maybe-configure-stage2-gas: configure-stage2-gas
+configure-stage2-gas:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gas"; \
+ libsrcdir="$$s/gas"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gas-bootstrap
+
+.PHONY: configure-stage3-gas maybe-configure-stage3-gas
+maybe-configure-stage3-gas:
+@if gas-bootstrap
+maybe-configure-stage3-gas: configure-stage3-gas
+configure-stage3-gas:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gas"; \
+ libsrcdir="$$s/gas"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gas-bootstrap
+
+.PHONY: configure-stage4-gas maybe-configure-stage4-gas
+maybe-configure-stage4-gas:
+@if gas-bootstrap
+maybe-configure-stage4-gas: configure-stage4-gas
+configure-stage4-gas:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gas"; \
+ libsrcdir="$$s/gas"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gas-bootstrap
+
+.PHONY: configure-stageprofile-gas maybe-configure-stageprofile-gas
+maybe-configure-stageprofile-gas:
+@if gas-bootstrap
+maybe-configure-stageprofile-gas: configure-stageprofile-gas
+configure-stageprofile-gas:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gas"; \
+ libsrcdir="$$s/gas"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gas-bootstrap
+
+.PHONY: configure-stagefeedback-gas maybe-configure-stagefeedback-gas
+maybe-configure-stagefeedback-gas:
+@if gas-bootstrap
+maybe-configure-stagefeedback-gas: configure-stagefeedback-gas
+configure-stagefeedback-gas:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gas"; \
+ libsrcdir="$$s/gas"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gas-bootstrap
+
+
+
+
+
+.PHONY: all-gas maybe-all-gas
+maybe-all-gas:
+@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) \
+ (cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gas))
+@endif gas
+
+
+
+.PHONY: all-stage1-gas maybe-all-stage1-gas
+.PHONY: clean-stage1-gas maybe-clean-stage1-gas
+maybe-all-stage1-gas:
+maybe-clean-stage1-gas:
+@if gas-bootstrap
+maybe-all-stage1-gas: all-stage1-gas
+all-stage1: all-stage1-gas
+TARGET-stage1-gas = $(TARGET-gas)
+all-stage1-gas: configure-stage1-gas
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gas && \
+ $(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; \
+ cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif gas-bootstrap
+
+
+.PHONY: all-stage2-gas maybe-all-stage2-gas
+.PHONY: clean-stage2-gas maybe-clean-stage2-gas
+maybe-all-stage2-gas:
+maybe-clean-stage2-gas:
+@if gas-bootstrap
+maybe-all-stage2-gas: all-stage2-gas
+all-stage2: all-stage2-gas
+TARGET-stage2-gas = $(TARGET-gas)
+all-stage2-gas: configure-stage2-gas
+ @[ $(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)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gas-bootstrap
+
+
+.PHONY: all-stage3-gas maybe-all-stage3-gas
+.PHONY: clean-stage3-gas maybe-clean-stage3-gas
+maybe-all-stage3-gas:
+maybe-clean-stage3-gas:
+@if gas-bootstrap
+maybe-all-stage3-gas: all-stage3-gas
+all-stage3: all-stage3-gas
+TARGET-stage3-gas = $(TARGET-gas)
+all-stage3-gas: configure-stage3-gas
+ @[ $(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)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gas-bootstrap
+
+
+.PHONY: all-stage4-gas maybe-all-stage4-gas
+.PHONY: clean-stage4-gas maybe-clean-stage4-gas
+maybe-all-stage4-gas:
+maybe-clean-stage4-gas:
+@if gas-bootstrap
+maybe-all-stage4-gas: all-stage4-gas
+all-stage4: all-stage4-gas
+TARGET-stage4-gas = $(TARGET-gas)
+all-stage4-gas: configure-stage4-gas
+ @[ $(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)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gas-bootstrap
+
+
+.PHONY: all-stageprofile-gas maybe-all-stageprofile-gas
+.PHONY: clean-stageprofile-gas maybe-clean-stageprofile-gas
+maybe-all-stageprofile-gas:
+maybe-clean-stageprofile-gas:
+@if gas-bootstrap
+maybe-all-stageprofile-gas: all-stageprofile-gas
+all-stageprofile: all-stageprofile-gas
+TARGET-stageprofile-gas = $(TARGET-gas)
+all-stageprofile-gas: configure-stageprofile-gas
+ @[ $(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)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif gas-bootstrap
+
+
+.PHONY: all-stagefeedback-gas maybe-all-stagefeedback-gas
+.PHONY: clean-stagefeedback-gas maybe-clean-stagefeedback-gas
+maybe-all-stagefeedback-gas:
+maybe-clean-stagefeedback-gas:
+@if gas-bootstrap
+maybe-all-stagefeedback-gas: all-stagefeedback-gas
+all-stagefeedback: all-stagefeedback-gas
+TARGET-stagefeedback-gas = $(TARGET-gas)
+all-stagefeedback-gas: configure-stagefeedback-gas
+ @[ $(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)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif gas-bootstrap
+
+
+
+
+
+.PHONY: check-gas maybe-check-gas
+maybe-check-gas:
+@if gas
+maybe-check-gas: check-gas
+
+check-gas:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif gas
+
+.PHONY: install-gas maybe-install-gas
+maybe-install-gas:
+@if gas
+maybe-install-gas: install-gas
+
+install-gas: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif gas
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gas info-gas
+maybe-info-gas:
+@if gas
+maybe-info-gas: info-gas
+
+info-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in tar" ; \
- (cd tar && \
+ echo "Doing info 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}" \
- TAGS) \
+ info) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-texinfo TAGS-texinfo
-maybe-TAGS-texinfo:
+.PHONY: maybe-dvi-gas dvi-gas
+maybe-dvi-gas:
+@if gas
+maybe-dvi-gas: dvi-gas
-TAGS-texinfo: \
- configure-texinfo
- @[ -f ./texinfo/Makefile ] || exit 0; \
+dvi-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in texinfo" ; \
- (cd texinfo && \
+ echo "Doing dvi 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}" \
- TAGS) \
+ dvi) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-textutils TAGS-textutils
-maybe-TAGS-textutils:
+.PHONY: maybe-html-gas html-gas
+maybe-html-gas:
+@if gas
+maybe-html-gas: html-gas
-TAGS-textutils: \
- configure-textutils
- @[ -f ./textutils/Makefile ] || exit 0; \
+html-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in textutils" ; \
- (cd textutils && \
+ echo "Doing html 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}" \
- TAGS) \
+ html) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-time TAGS-time
-maybe-TAGS-time:
+.PHONY: maybe-TAGS-gas TAGS-gas
+maybe-TAGS-gas:
+@if gas
+maybe-TAGS-gas: TAGS-gas
-TAGS-time: \
- configure-time
- @[ -f ./time/Makefile ] || exit 0; \
+TAGS-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in time" ; \
- (cd time && \
+ echo "Doing TAGS 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}" \
@@ -5785,241 +11480,709 @@ TAGS-time: \
TAGS) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-uudecode TAGS-uudecode
-maybe-TAGS-uudecode:
+.PHONY: maybe-install-info-gas install-info-gas
+maybe-install-info-gas:
+@if gas
+maybe-install-info-gas: install-info-gas
-TAGS-uudecode: \
- configure-uudecode
- @[ -f ./uudecode/Makefile ] || exit 0; \
+install-info-gas: \
+ configure-gas \
+ info-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in uudecode" ; \
- (cd uudecode && \
+ echo "Doing install-info 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}" \
- TAGS) \
+ install-info) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-wdiff TAGS-wdiff
-maybe-TAGS-wdiff:
+.PHONY: maybe-install-html-gas install-html-gas
+maybe-install-html-gas:
+@if gas
+maybe-install-html-gas: install-html-gas
-TAGS-wdiff: \
- configure-wdiff
- @[ -f ./wdiff/Makefile ] || exit 0; \
+install-html-gas: \
+ configure-gas \
+ html-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in wdiff" ; \
- (cd wdiff && \
+ echo "Doing install-html 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}" \
- TAGS) \
+ install-html) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-zip TAGS-zip
-maybe-TAGS-zip:
+.PHONY: maybe-installcheck-gas installcheck-gas
+maybe-installcheck-gas:
+@if gas
+maybe-installcheck-gas: installcheck-gas
-TAGS-zip: \
- configure-zip
- @[ -f ./zip/Makefile ] || exit 0; \
+installcheck-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in zip" ; \
- (cd zip && \
+ echo "Doing installcheck 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}" \
- TAGS) \
+ installcheck) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-zlib TAGS-zlib
-maybe-TAGS-zlib:
+.PHONY: maybe-mostlyclean-gas mostlyclean-gas
+maybe-mostlyclean-gas:
+@if gas
+maybe-mostlyclean-gas: mostlyclean-gas
-TAGS-zlib: \
- configure-zlib
- @[ -f ./zlib/Makefile ] || exit 0; \
+mostlyclean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in zlib" ; \
- (cd zlib && \
+ echo "Doing mostlyclean 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}" \
- TAGS) \
+ mostlyclean) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-gdb TAGS-gdb
-maybe-TAGS-gdb:
+.PHONY: maybe-clean-gas clean-gas
+maybe-clean-gas:
+@if gas
+maybe-clean-gas: clean-gas
-TAGS-gdb: \
- configure-gdb
- @[ -f ./gdb/Makefile ] || exit 0; \
+clean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gdb" ; \
- (cd gdb && \
+ echo "Doing clean 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}" \
- TAGS) \
+ clean) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-expect TAGS-expect
-maybe-TAGS-expect:
+.PHONY: maybe-distclean-gas distclean-gas
+maybe-distclean-gas:
+@if gas
+maybe-distclean-gas: distclean-gas
-TAGS-expect: \
- configure-expect
- @[ -f ./expect/Makefile ] || exit 0; \
+distclean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in expect" ; \
- (cd expect && \
+ echo "Doing distclean 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}" \
- TAGS) \
+ distclean) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-guile TAGS-guile
-maybe-TAGS-guile:
+.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas
+maybe-maintainer-clean-gas:
+@if gas
+maybe-maintainer-clean-gas: maintainer-clean-gas
-TAGS-guile: \
- configure-guile
- @[ -f ./guile/Makefile ] || exit 0; \
+maintainer-clean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in guile" ; \
- (cd guile && \
+ echo "Doing maintainer-clean 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}" \
- TAGS) \
+ maintainer-clean) \
|| exit 1
+@endif gas
-.PHONY: maybe-TAGS-tk TAGS-tk
-maybe-TAGS-tk:
-TAGS-tk: \
- configure-tk
- @[ -f ./tk/Makefile ] || exit 0; \
+
+.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
+@endif gcc-bootstrap
+@if gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gcc; \
+ cd "$(HOST_SUBDIR)/gcc" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gcc"; \
+ libsrcdir="$$s/gcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gcc
+
+
+
+.PHONY: configure-stage1-gcc maybe-configure-stage1-gcc
+maybe-configure-stage1-gcc:
+@if gcc-bootstrap
+maybe-configure-stage1-gcc: configure-stage1-gcc
+configure-stage1-gcc:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gcc"; \
+ libsrcdir="$$s/gcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif gcc-bootstrap
+
+.PHONY: configure-stage2-gcc maybe-configure-stage2-gcc
+maybe-configure-stage2-gcc:
+@if gcc-bootstrap
+maybe-configure-stage2-gcc: configure-stage2-gcc
+configure-stage2-gcc:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gcc"; \
+ libsrcdir="$$s/gcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gcc-bootstrap
+
+.PHONY: configure-stage3-gcc maybe-configure-stage3-gcc
+maybe-configure-stage3-gcc:
+@if gcc-bootstrap
+maybe-configure-stage3-gcc: configure-stage3-gcc
+configure-stage3-gcc:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gcc"; \
+ libsrcdir="$$s/gcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gcc-bootstrap
+
+.PHONY: configure-stage4-gcc maybe-configure-stage4-gcc
+maybe-configure-stage4-gcc:
+@if gcc-bootstrap
+maybe-configure-stage4-gcc: configure-stage4-gcc
+configure-stage4-gcc:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gcc"; \
+ libsrcdir="$$s/gcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gcc-bootstrap
+
+.PHONY: configure-stageprofile-gcc maybe-configure-stageprofile-gcc
+maybe-configure-stageprofile-gcc:
+@if gcc-bootstrap
+maybe-configure-stageprofile-gcc: configure-stageprofile-gcc
+configure-stageprofile-gcc:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gcc"; \
+ libsrcdir="$$s/gcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gcc-bootstrap
+
+.PHONY: configure-stagefeedback-gcc maybe-configure-stagefeedback-gcc
+maybe-configure-stagefeedback-gcc:
+@if gcc-bootstrap
+maybe-configure-stagefeedback-gcc: configure-stagefeedback-gcc
+configure-stagefeedback-gcc:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gcc"; \
+ libsrcdir="$$s/gcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif gcc-bootstrap
+
+
+
+
+
+.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
+@endif gcc-bootstrap
+@if gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) $(TARGET-gcc))
+@endif gcc
+
+
+
+.PHONY: all-stage1-gcc maybe-all-stage1-gcc
+.PHONY: clean-stage1-gcc maybe-clean-stage1-gcc
+maybe-all-stage1-gcc:
+maybe-clean-stage1-gcc:
+@if gcc-bootstrap
+maybe-all-stage1-gcc: all-stage1-gcc
+all-stage1: all-stage1-gcc
+TARGET-stage1-gcc = $(TARGET-gcc)
+all-stage1-gcc: configure-stage1-gcc
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ 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) \
+ $(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; \
+ cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+.PHONY: all-stage2-gcc maybe-all-stage2-gcc
+.PHONY: clean-stage2-gcc maybe-clean-stage2-gcc
+maybe-all-stage2-gcc:
+maybe-clean-stage2-gcc:
+@if gcc-bootstrap
+maybe-all-stage2-gcc: all-stage2-gcc
+all-stage2: all-stage2-gcc
+TARGET-stage2-gcc = $(TARGET-gcc)
+all-stage2-gcc: configure-stage2-gcc
+ @[ $(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)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+.PHONY: all-stage3-gcc maybe-all-stage3-gcc
+.PHONY: clean-stage3-gcc maybe-clean-stage3-gcc
+maybe-all-stage3-gcc:
+maybe-clean-stage3-gcc:
+@if gcc-bootstrap
+maybe-all-stage3-gcc: all-stage3-gcc
+all-stage3: all-stage3-gcc
+TARGET-stage3-gcc = $(TARGET-gcc)
+all-stage3-gcc: configure-stage3-gcc
+ @[ $(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)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+.PHONY: all-stage4-gcc maybe-all-stage4-gcc
+.PHONY: clean-stage4-gcc maybe-clean-stage4-gcc
+maybe-all-stage4-gcc:
+maybe-clean-stage4-gcc:
+@if gcc-bootstrap
+maybe-all-stage4-gcc: all-stage4-gcc
+all-stage4: all-stage4-gcc
+TARGET-stage4-gcc = $(TARGET-gcc)
+all-stage4-gcc: configure-stage4-gcc
+ @[ $(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)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+.PHONY: all-stageprofile-gcc maybe-all-stageprofile-gcc
+.PHONY: clean-stageprofile-gcc maybe-clean-stageprofile-gcc
+maybe-all-stageprofile-gcc:
+maybe-clean-stageprofile-gcc:
+@if gcc-bootstrap
+maybe-all-stageprofile-gcc: all-stageprofile-gcc
+all-stageprofile: all-stageprofile-gcc
+TARGET-stageprofile-gcc = $(TARGET-gcc)
+all-stageprofile-gcc: configure-stageprofile-gcc
+ @[ $(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)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(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; \
+ cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+.PHONY: all-stagefeedback-gcc maybe-all-stagefeedback-gcc
+.PHONY: clean-stagefeedback-gcc maybe-clean-stagefeedback-gcc
+maybe-all-stagefeedback-gcc:
+maybe-clean-stagefeedback-gcc:
+@if gcc-bootstrap
+maybe-all-stagefeedback-gcc: all-stagefeedback-gcc
+all-stagefeedback: all-stagefeedback-gcc
+TARGET-stagefeedback-gcc = $(TARGET-gcc)
+all-stagefeedback-gcc: configure-stagefeedback-gcc
+ @[ $(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)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(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; \
+ cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(EXTRA_GCC_FLAGS) clean
+@endif gcc-bootstrap
+
+
+
+
+
+.PHONY: check-gcc maybe-check-gcc
+maybe-check-gcc:
+@if gcc
+maybe-check-gcc: check-gcc
+
+check-gcc:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) check)
+
+@endif gcc
+
+.PHONY: install-gcc maybe-install-gcc
+maybe-install-gcc:
+@if gcc
+maybe-install-gcc: install-gcc
+
+install-gcc: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) install)
+
+@endif gcc
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gcc info-gcc
+maybe-info-gcc:
+@if gcc
+maybe-info-gcc: info-gcc
+
+info-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 TAGS in tk" ; \
- (cd tk && \
+ echo "Doing info 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}" \
- TAGS) \
+ info) \
|| exit 1
+@endif gcc
-.PHONY: maybe-TAGS-tix TAGS-tix
-maybe-TAGS-tix:
+.PHONY: maybe-dvi-gcc dvi-gcc
+maybe-dvi-gcc:
+@if gcc
+maybe-dvi-gcc: dvi-gcc
-TAGS-tix: \
- configure-tix
- @[ -f ./tix/Makefile ] || exit 0; \
+dvi-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 TAGS in tix" ; \
- (cd tix && \
+ echo "Doing dvi 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}" \
- TAGS) \
+ dvi) \
|| exit 1
+@endif gcc
-.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap
-maybe-TAGS-libtermcap:
+.PHONY: maybe-html-gcc html-gcc
+maybe-html-gcc:
+@if gcc
+maybe-html-gcc: html-gcc
-TAGS-libtermcap: \
- configure-libtermcap
- @[ -f ./libtermcap/Makefile ] || exit 0; \
+html-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 TAGS in libtermcap" ; \
- (cd libtermcap && \
+ echo "Doing html 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}" \
- TAGS) \
+ html) \
|| exit 1
+@endif gcc
-.PHONY: maybe-TAGS-utils TAGS-utils
-maybe-TAGS-utils:
+.PHONY: maybe-TAGS-gcc TAGS-gcc
+maybe-TAGS-gcc:
+@if gcc
+maybe-TAGS-gcc: TAGS-gcc
-TAGS-utils: \
- configure-utils
- @[ -f ./utils/Makefile ] || exit 0; \
+TAGS-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 TAGS in utils" ; \
- (cd utils && \
+ echo "Doing TAGS 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}" \
@@ -6027,222 +12190,356 @@ TAGS-utils: \
TAGS) \
|| exit 1
+@endif gcc
+
+.PHONY: maybe-install-info-gcc install-info-gcc
+maybe-install-info-gcc:
+@if gcc
+maybe-install-info-gcc: install-info-gcc
+install-info-gcc: \
+ configure-gcc \
+ info-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-info 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-info) \
+ || exit 1
-# Target modules.
+@endif gcc
-.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3
-maybe-TAGS-target-libstdc++-v3:
+.PHONY: maybe-install-html-gcc install-html-gcc
+maybe-install-html-gcc:
+@if gcc
+maybe-install-html-gcc: install-html-gcc
-TAGS-target-libstdc++-v3: \
- configure-target-libstdc++-v3
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+install-html-gcc: \
+ configure-gcc \
+ html-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ echo "Doing install-html 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}" \
- TAGS) \
+ install-html) \
|| exit 1
+@endif gcc
-.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib
-maybe-TAGS-target-newlib:
+.PHONY: maybe-installcheck-gcc installcheck-gcc
+maybe-installcheck-gcc:
+@if gcc
+maybe-installcheck-gcc: installcheck-gcc
-TAGS-target-newlib: \
- configure-target-newlib
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+installcheck-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ echo "Doing installcheck 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}" \
- TAGS) \
+ installcheck) \
|| exit 1
+@endif gcc
-.PHONY: maybe-TAGS-target-libf2c TAGS-target-libf2c
-maybe-TAGS-target-libf2c:
+.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc
+maybe-mostlyclean-gcc:
+@if gcc
+maybe-mostlyclean-gcc: mostlyclean-gcc
-TAGS-target-libf2c: \
- configure-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+mostlyclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ echo "Doing mostlyclean 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}" \
- TAGS) \
+ mostlyclean) \
|| exit 1
+@endif gcc
-.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc
-maybe-TAGS-target-libobjc:
+.PHONY: maybe-clean-gcc clean-gcc
+maybe-clean-gcc:
+@if gcc
+maybe-clean-gcc: clean-gcc
-TAGS-target-libobjc: \
- configure-target-libobjc
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
+ echo "Doing clean 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}" \
- TAGS) \
+ clean) \
|| exit 1
+@endif gcc
-.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap
-maybe-TAGS-target-libtermcap:
+.PHONY: maybe-distclean-gcc distclean-gcc
+maybe-distclean-gcc:
+@if gcc
+maybe-distclean-gcc: distclean-gcc
-TAGS-target-libtermcap: \
- configure-target-libtermcap
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+distclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libtermcap && \
+ echo "Doing distclean 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}" \
- TAGS) \
+ distclean) \
|| exit 1
+@endif gcc
-.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup
-maybe-TAGS-target-winsup:
+.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc
+maybe-maintainer-clean-gcc:
+@if gcc
+maybe-maintainer-clean-gcc: maintainer-clean-gcc
-TAGS-target-winsup: \
- configure-target-winsup
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+maintainer-clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/winsup && \
+ echo "Doing maintainer-clean 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}" \
- TAGS) \
+ maintainer-clean) \
|| exit 1
+@endif gcc
-.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss
-maybe-TAGS-target-libgloss:
-TAGS-target-libgloss: \
- configure-target-libgloss
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+
+.PHONY: configure-gawk maybe-configure-gawk
+maybe-configure-gawk:
+@if gawk
+maybe-configure-gawk: configure-gawk
+configure-gawk:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gawk/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gawk ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gawk; \
+ cd "$(HOST_SUBDIR)/gawk" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gawk/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gawk"; \
+ libsrcdir="$$s/gawk"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gawk
+
+
+
+
+
+.PHONY: all-gawk maybe-all-gawk
+maybe-all-gawk:
+@if gawk
+TARGET-gawk=all
+maybe-all-gawk: all-gawk
+all-gawk: configure-gawk
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gawk && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gawk))
+@endif gawk
+
+
+
+
+.PHONY: check-gawk maybe-check-gawk
+maybe-check-gawk:
+@if gawk
+maybe-check-gawk: check-gawk
+
+check-gawk:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gawk && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif gawk
+
+.PHONY: install-gawk maybe-install-gawk
+maybe-install-gawk:
+@if gawk
+maybe-install-gawk: install-gawk
+
+install-gawk: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gawk && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif gawk
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gawk info-gawk
+maybe-info-gawk:
+@if gawk
+maybe-info-gawk: info-gawk
+
+info-gawk: \
+ configure-gawk
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
+ echo "Doing info 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}" \
- TAGS) \
+ info) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty
-maybe-TAGS-target-libiberty:
+.PHONY: maybe-dvi-gawk dvi-gawk
+maybe-dvi-gawk:
+@if gawk
+maybe-dvi-gawk: dvi-gawk
-TAGS-target-libiberty: \
- configure-target-libiberty
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+dvi-gawk: \
+ configure-gawk
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
+ echo "Doing dvi 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}" \
- TAGS) \
+ dvi) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf
-maybe-TAGS-target-gperf:
+.PHONY: maybe-html-gawk html-gawk
+maybe-html-gawk:
+@if gawk
+maybe-html-gawk: html-gawk
-TAGS-target-gperf: \
- configure-target-gperf
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+html-gawk: \
+ configure-gawk
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/gperf && \
+ echo "Doing html 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}" \
- TAGS) \
+ html) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-examples TAGS-target-examples
-maybe-TAGS-target-examples:
+.PHONY: maybe-TAGS-gawk TAGS-gawk
+maybe-TAGS-gawk:
+@if gawk
+maybe-TAGS-gawk: TAGS-gawk
-TAGS-target-examples: \
- configure-target-examples
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+TAGS-gawk: \
+ configure-gawk
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/examples && \
+ echo "Doing TAGS 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}" \
@@ -6250,360 +12547,390 @@ TAGS-target-examples: \
TAGS) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi
-maybe-TAGS-target-libffi:
+.PHONY: maybe-install-info-gawk install-info-gawk
+maybe-install-info-gawk:
+@if gawk
+maybe-install-info-gawk: install-info-gawk
-TAGS-target-libffi: \
- configure-target-libffi
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+install-info-gawk: \
+ configure-gawk \
+ info-gawk
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libffi && \
+ echo "Doing install-info 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}" \
- TAGS) \
+ install-info) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava
-maybe-TAGS-target-libjava:
+.PHONY: maybe-install-html-gawk install-html-gawk
+maybe-install-html-gawk:
+@if gawk
+maybe-install-html-gawk: install-html-gawk
-TAGS-target-libjava: \
- configure-target-libjava
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+install-html-gawk: \
+ configure-gawk \
+ html-gawk
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libjava && \
+ echo "Doing install-html 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}" \
- TAGS) \
+ install-html) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib
-maybe-TAGS-target-zlib:
+.PHONY: maybe-installcheck-gawk installcheck-gawk
+maybe-installcheck-gawk:
+@if gawk
+maybe-installcheck-gawk: installcheck-gawk
-TAGS-target-zlib: \
- configure-target-zlib
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+installcheck-gawk: \
+ configure-gawk
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/zlib && \
+ echo "Doing installcheck 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}" \
- TAGS) \
+ installcheck) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc
-maybe-TAGS-target-boehm-gc:
+.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk
+maybe-mostlyclean-gawk:
+@if gawk
+maybe-mostlyclean-gawk: mostlyclean-gawk
-TAGS-target-boehm-gc: \
- configure-target-boehm-gc
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+mostlyclean-gawk:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
+ echo "Doing mostlyclean 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}" \
- TAGS) \
+ mostlyclean) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads
-maybe-TAGS-target-qthreads:
+.PHONY: maybe-clean-gawk clean-gawk
+maybe-clean-gawk:
+@if gawk
+maybe-clean-gawk: clean-gawk
-TAGS-target-qthreads: \
- configure-target-qthreads
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+clean-gawk:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/qthreads && \
+ echo "Doing clean 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}" \
- TAGS) \
+ clean) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-rda TAGS-target-rda
-maybe-TAGS-target-rda:
+.PHONY: maybe-distclean-gawk distclean-gawk
+maybe-distclean-gawk:
+@if gawk
+maybe-distclean-gawk: distclean-gawk
-TAGS-target-rda: \
- configure-target-rda
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+distclean-gawk:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/rda && \
+ echo "Doing distclean 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}" \
- TAGS) \
+ distclean) \
|| exit 1
+@endif gawk
-.PHONY: maybe-TAGS-target-libada TAGS-target-libada
-maybe-TAGS-target-libada:
+.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk
+maybe-maintainer-clean-gawk:
+@if gawk
+maybe-maintainer-clean-gawk: maintainer-clean-gawk
-TAGS-target-libada: \
- configure-target-libada
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+maintainer-clean-gawk:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libada && \
+ echo "Doing maintainer-clean 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}" \
- TAGS) \
+ maintainer-clean) \
|| exit 1
+@endif gawk
-.PHONY: do-install-info
-do-install-info: install-info-host install-info-target
-.PHONY: install-info-host
-install-info-host: maybe-install-info-gcc \
- maybe-install-info-ash \
- maybe-install-info-autoconf \
- maybe-install-info-automake \
- maybe-install-info-bash \
- maybe-install-info-bfd \
- maybe-install-info-opcodes \
- maybe-install-info-binutils \
- maybe-install-info-bison \
- maybe-install-info-byacc \
- maybe-install-info-bzip2 \
- maybe-install-info-dejagnu \
- maybe-install-info-diff \
- maybe-install-info-dosutils \
- maybe-install-info-etc \
- maybe-install-info-fastjar \
- maybe-install-info-fileutils \
- maybe-install-info-findutils \
- maybe-install-info-find \
- maybe-install-info-flex \
- maybe-install-info-gas \
- maybe-install-info-gawk \
- maybe-install-info-gettext \
- maybe-install-info-gnuserv \
- maybe-install-info-gprof \
- maybe-install-info-gzip \
- maybe-install-info-hello \
- maybe-install-info-indent \
- maybe-install-info-intl \
- maybe-install-info-tcl \
- maybe-install-info-itcl \
- maybe-install-info-ld \
- maybe-install-info-libgui \
- maybe-install-info-libiberty \
- maybe-install-info-libtool \
- maybe-install-info-m4 \
- maybe-install-info-make \
- maybe-install-info-mmalloc \
- maybe-install-info-patch \
- maybe-install-info-perl \
- maybe-install-info-prms \
- maybe-install-info-rcs \
- maybe-install-info-readline \
- maybe-install-info-release \
- maybe-install-info-recode \
- maybe-install-info-sed \
- maybe-install-info-send-pr \
- maybe-install-info-shellutils \
- maybe-install-info-sid \
- maybe-install-info-sim \
- maybe-install-info-tar \
- maybe-install-info-texinfo \
- maybe-install-info-textutils \
- maybe-install-info-time \
- maybe-install-info-uudecode \
- maybe-install-info-wdiff \
- maybe-install-info-zip \
- maybe-install-info-zlib \
- maybe-install-info-gdb \
- maybe-install-info-expect \
- maybe-install-info-guile \
- maybe-install-info-tk \
- maybe-install-info-tix \
- maybe-install-info-libtermcap \
- maybe-install-info-utils
+.PHONY: configure-gettext maybe-configure-gettext
+maybe-configure-gettext:
+@if gettext
+maybe-configure-gettext: configure-gettext
+configure-gettext:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gettext/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gettext; \
+ cd "$(HOST_SUBDIR)/gettext" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gettext/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gettext"; \
+ libsrcdir="$$s/gettext"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gettext
-.PHONY: install-info-target
-install-info-target: \
- maybe-install-info-target-libstdc++-v3 \
- maybe-install-info-target-newlib \
- maybe-install-info-target-libf2c \
- maybe-install-info-target-libobjc \
- maybe-install-info-target-libtermcap \
- maybe-install-info-target-winsup \
- maybe-install-info-target-libgloss \
- maybe-install-info-target-libiberty \
- maybe-install-info-target-gperf \
- maybe-install-info-target-examples \
- maybe-install-info-target-libffi \
- maybe-install-info-target-libjava \
- maybe-install-info-target-zlib \
- maybe-install-info-target-boehm-gc \
- maybe-install-info-target-qthreads \
- maybe-install-info-target-rda \
- maybe-install-info-target-libada
-
-# GCC, the eternal special case
-.PHONY: maybe-install-info-gcc install-info-gcc
-maybe-install-info-gcc:
-install-info-gcc: \
- configure-gcc \
- info-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
+
+
+
+
+.PHONY: all-gettext maybe-all-gettext
+maybe-all-gettext:
+@if gettext
+TARGET-gettext=all
+maybe-all-gettext: all-gettext
+all-gettext: configure-gettext
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gettext && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gettext))
+@endif gettext
+
+
+
+
+.PHONY: check-gettext maybe-check-gettext
+maybe-check-gettext:
+@if gettext
+maybe-check-gettext: check-gettext
+
+check-gettext:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gettext && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif gettext
+
+.PHONY: install-gettext maybe-install-gettext
+maybe-install-gettext:
+@if gettext
+maybe-install-gettext: install-gettext
+
+install-gettext: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gettext && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif gettext
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gettext info-gettext
+maybe-info-gettext:
+@if gettext
+maybe-info-gettext: info-gettext
+
+info-gettext: \
+ configure-gettext
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
+ $(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 gcc" ; \
- (cd gcc && \
+ echo "Doing info 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-info) \
+ info) \
|| exit 1
-# Host modules.
+@endif gettext
-.PHONY: maybe-install-info-ash install-info-ash
-maybe-install-info-ash:
+.PHONY: maybe-dvi-gettext dvi-gettext
+maybe-dvi-gettext:
+@if gettext
+maybe-dvi-gettext: dvi-gettext
-install-info-ash: \
- configure-ash \
- info-ash
- @[ -f ./ash/Makefile ] || exit 0; \
+dvi-gettext: \
+ configure-gettext
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 ash" ; \
- (cd ash && \
+ echo "Doing dvi 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-info) \
+ dvi) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-autoconf install-info-autoconf
-maybe-install-info-autoconf:
+.PHONY: maybe-html-gettext html-gettext
+maybe-html-gettext:
+@if gettext
+maybe-html-gettext: html-gettext
-install-info-autoconf: \
- configure-autoconf \
- info-autoconf
- @[ -f ./autoconf/Makefile ] || exit 0; \
+html-gettext: \
+ configure-gettext
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 autoconf" ; \
- (cd autoconf && \
+ echo "Doing html 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-info) \
+ html) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-automake install-info-automake
-maybe-install-info-automake:
+.PHONY: maybe-TAGS-gettext TAGS-gettext
+maybe-TAGS-gettext:
+@if gettext
+maybe-TAGS-gettext: TAGS-gettext
-install-info-automake: \
- configure-automake \
- info-automake
- @[ -f ./automake/Makefile ] || exit 0; \
+TAGS-gettext: \
+ configure-gettext
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 automake" ; \
- (cd automake && \
+ echo "Doing TAGS 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-info) \
+ TAGS) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-bash install-info-bash
-maybe-install-info-bash:
+.PHONY: maybe-install-info-gettext install-info-gettext
+maybe-install-info-gettext:
+@if gettext
+maybe-install-info-gettext: install-info-gettext
-install-info-bash: \
- configure-bash \
- info-bash
- @[ -f ./bash/Makefile ] || exit 0; \
+install-info-gettext: \
+ configure-gettext \
+ info-gettext
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 bash" ; \
- (cd bash && \
+ echo "Doing install-info 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}" \
@@ -6611,252 +12938,363 @@ install-info-bash: \
install-info) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-bfd install-info-bfd
-maybe-install-info-bfd:
+.PHONY: maybe-install-html-gettext install-html-gettext
+maybe-install-html-gettext:
+@if gettext
+maybe-install-html-gettext: install-html-gettext
-install-info-bfd: \
- configure-bfd \
- info-bfd
- @[ -f ./bfd/Makefile ] || exit 0; \
+install-html-gettext: \
+ configure-gettext \
+ html-gettext
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 bfd" ; \
- (cd bfd && \
+ echo "Doing install-html 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-info) \
+ install-html) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-opcodes install-info-opcodes
-maybe-install-info-opcodes:
+.PHONY: maybe-installcheck-gettext installcheck-gettext
+maybe-installcheck-gettext:
+@if gettext
+maybe-installcheck-gettext: installcheck-gettext
-install-info-opcodes: \
- configure-opcodes \
- info-opcodes
- @[ -f ./opcodes/Makefile ] || exit 0; \
+installcheck-gettext: \
+ configure-gettext
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 opcodes" ; \
- (cd opcodes && \
+ echo "Doing installcheck 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-info) \
+ installcheck) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-binutils install-info-binutils
-maybe-install-info-binutils:
+.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext
+maybe-mostlyclean-gettext:
+@if gettext
+maybe-mostlyclean-gettext: mostlyclean-gettext
-install-info-binutils: \
- configure-binutils \
- info-binutils
- @[ -f ./binutils/Makefile ] || exit 0; \
+mostlyclean-gettext:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 binutils" ; \
- (cd binutils && \
+ echo "Doing mostlyclean 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-info) \
+ mostlyclean) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-bison install-info-bison
-maybe-install-info-bison:
+.PHONY: maybe-clean-gettext clean-gettext
+maybe-clean-gettext:
+@if gettext
+maybe-clean-gettext: clean-gettext
-install-info-bison: \
- configure-bison \
- info-bison
- @[ -f ./bison/Makefile ] || exit 0; \
+clean-gettext:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 bison" ; \
- (cd bison && \
+ echo "Doing clean 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-info) \
+ clean) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-byacc install-info-byacc
-maybe-install-info-byacc:
+.PHONY: maybe-distclean-gettext distclean-gettext
+maybe-distclean-gettext:
+@if gettext
+maybe-distclean-gettext: distclean-gettext
-install-info-byacc: \
- configure-byacc \
- info-byacc
- @[ -f ./byacc/Makefile ] || exit 0; \
+distclean-gettext:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 byacc" ; \
- (cd byacc && \
+ echo "Doing distclean 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-info) \
+ distclean) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-bzip2 install-info-bzip2
-maybe-install-info-bzip2:
+.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext
+maybe-maintainer-clean-gettext:
+@if gettext
+maybe-maintainer-clean-gettext: maintainer-clean-gettext
-install-info-bzip2: \
- configure-bzip2 \
- info-bzip2
- @[ -f ./bzip2/Makefile ] || exit 0; \
+maintainer-clean-gettext:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 bzip2" ; \
- (cd bzip2 && \
+ echo "Doing maintainer-clean 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-info) \
+ maintainer-clean) \
|| exit 1
+@endif gettext
-.PHONY: maybe-install-info-dejagnu install-info-dejagnu
-maybe-install-info-dejagnu:
-install-info-dejagnu: \
- configure-dejagnu \
- info-dejagnu
- @[ -f ./dejagnu/Makefile ] || exit 0; \
+
+.PHONY: configure-gnuserv maybe-configure-gnuserv
+maybe-configure-gnuserv:
+@if gnuserv
+maybe-configure-gnuserv: configure-gnuserv
+configure-gnuserv:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gnuserv/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gnuserv ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gnuserv; \
+ cd "$(HOST_SUBDIR)/gnuserv" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gnuserv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gnuserv"; \
+ libsrcdir="$$s/gnuserv"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gnuserv
+
+
+
+
+
+.PHONY: all-gnuserv maybe-all-gnuserv
+maybe-all-gnuserv:
+@if gnuserv
+TARGET-gnuserv=all
+maybe-all-gnuserv: all-gnuserv
+all-gnuserv: configure-gnuserv
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gnuserv && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gnuserv))
+@endif gnuserv
+
+
+
+
+.PHONY: check-gnuserv maybe-check-gnuserv
+maybe-check-gnuserv:
+@if gnuserv
+maybe-check-gnuserv: check-gnuserv
+
+check-gnuserv:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gnuserv && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif gnuserv
+
+.PHONY: install-gnuserv maybe-install-gnuserv
+maybe-install-gnuserv:
+@if gnuserv
+maybe-install-gnuserv: install-gnuserv
+
+install-gnuserv: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gnuserv && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif gnuserv
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gnuserv info-gnuserv
+maybe-info-gnuserv:
+@if gnuserv
+maybe-info-gnuserv: info-gnuserv
+
+info-gnuserv: \
+ configure-gnuserv
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 dejagnu" ; \
- (cd dejagnu && \
+ echo "Doing info 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-info) \
+ info) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-diff install-info-diff
-maybe-install-info-diff:
+.PHONY: maybe-dvi-gnuserv dvi-gnuserv
+maybe-dvi-gnuserv:
+@if gnuserv
+maybe-dvi-gnuserv: dvi-gnuserv
-install-info-diff: \
- configure-diff \
- info-diff
- @[ -f ./diff/Makefile ] || exit 0; \
+dvi-gnuserv: \
+ configure-gnuserv
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 diff" ; \
- (cd diff && \
+ echo "Doing dvi 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-info) \
+ dvi) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-dosutils install-info-dosutils
-maybe-install-info-dosutils:
+.PHONY: maybe-html-gnuserv html-gnuserv
+maybe-html-gnuserv:
+@if gnuserv
+maybe-html-gnuserv: html-gnuserv
-install-info-dosutils: \
- configure-dosutils \
- info-dosutils
- @[ -f ./dosutils/Makefile ] || exit 0; \
+html-gnuserv: \
+ configure-gnuserv
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 dosutils" ; \
- (cd dosutils && \
+ echo "Doing html 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-info) \
+ html) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-etc install-info-etc
-maybe-install-info-etc:
+.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv
+maybe-TAGS-gnuserv:
+@if gnuserv
+maybe-TAGS-gnuserv: TAGS-gnuserv
-install-info-etc: \
- configure-etc \
- info-etc
- @[ -f ./etc/Makefile ] || exit 0; \
+TAGS-gnuserv: \
+ configure-gnuserv
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 etc" ; \
- (cd etc && \
+ echo "Doing TAGS 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-info) \
+ TAGS) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-fastjar install-info-fastjar
-maybe-install-info-fastjar:
+.PHONY: maybe-install-info-gnuserv install-info-gnuserv
+maybe-install-info-gnuserv:
+@if gnuserv
+maybe-install-info-gnuserv: install-info-gnuserv
-install-info-fastjar: \
- configure-fastjar \
- info-fastjar
- @[ -f ./fastjar/Makefile ] || exit 0; \
+install-info-gnuserv: \
+ configure-gnuserv \
+ info-gnuserv
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 fastjar" ; \
- (cd fastjar && \
+ echo "Doing install-info 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}" \
@@ -6864,206 +13302,363 @@ install-info-fastjar: \
install-info) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-fileutils install-info-fileutils
-maybe-install-info-fileutils:
+.PHONY: maybe-install-html-gnuserv install-html-gnuserv
+maybe-install-html-gnuserv:
+@if gnuserv
+maybe-install-html-gnuserv: install-html-gnuserv
-install-info-fileutils: \
- configure-fileutils \
- info-fileutils
- @[ -f ./fileutils/Makefile ] || exit 0; \
+install-html-gnuserv: \
+ configure-gnuserv \
+ html-gnuserv
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 fileutils" ; \
- (cd fileutils && \
+ echo "Doing install-html 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-info) \
+ install-html) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-findutils install-info-findutils
-maybe-install-info-findutils:
+.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv
+maybe-installcheck-gnuserv:
+@if gnuserv
+maybe-installcheck-gnuserv: installcheck-gnuserv
-install-info-findutils: \
- configure-findutils \
- info-findutils
- @[ -f ./findutils/Makefile ] || exit 0; \
+installcheck-gnuserv: \
+ configure-gnuserv
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 findutils" ; \
- (cd findutils && \
+ echo "Doing installcheck 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-info) \
+ installcheck) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-find install-info-find
-maybe-install-info-find:
+.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv
+maybe-mostlyclean-gnuserv:
+@if gnuserv
+maybe-mostlyclean-gnuserv: mostlyclean-gnuserv
-install-info-find: \
- configure-find \
- info-find
- @[ -f ./find/Makefile ] || exit 0; \
+mostlyclean-gnuserv:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 find" ; \
- (cd find && \
+ echo "Doing mostlyclean 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-info) \
+ mostlyclean) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-flex install-info-flex
-maybe-install-info-flex:
+.PHONY: maybe-clean-gnuserv clean-gnuserv
+maybe-clean-gnuserv:
+@if gnuserv
+maybe-clean-gnuserv: clean-gnuserv
-install-info-flex: \
- configure-flex \
- info-flex
- @[ -f ./flex/Makefile ] || exit 0; \
+clean-gnuserv:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 flex" ; \
- (cd flex && \
+ echo "Doing clean 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-info) \
+ clean) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-gas install-info-gas
-maybe-install-info-gas:
+.PHONY: maybe-distclean-gnuserv distclean-gnuserv
+maybe-distclean-gnuserv:
+@if gnuserv
+maybe-distclean-gnuserv: distclean-gnuserv
-install-info-gas: \
- configure-gas \
- info-gas
- @[ -f ./gas/Makefile ] || exit 0; \
+distclean-gnuserv:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 gas" ; \
- (cd gas && \
+ echo "Doing distclean 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-info) \
+ distclean) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-gawk install-info-gawk
-maybe-install-info-gawk:
+.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv
+maybe-maintainer-clean-gnuserv:
+@if gnuserv
+maybe-maintainer-clean-gnuserv: maintainer-clean-gnuserv
-install-info-gawk: \
- configure-gawk \
- info-gawk
- @[ -f ./gawk/Makefile ] || exit 0; \
+maintainer-clean-gnuserv:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 gawk" ; \
- (cd gawk && \
+ echo "Doing maintainer-clean 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-info) \
+ maintainer-clean) \
|| exit 1
+@endif gnuserv
-.PHONY: maybe-install-info-gettext install-info-gettext
-maybe-install-info-gettext:
-install-info-gettext: \
- configure-gettext \
- info-gettext
- @[ -f ./gettext/Makefile ] || exit 0; \
+
+.PHONY: configure-gprof maybe-configure-gprof
+maybe-configure-gprof:
+@if gprof
+maybe-configure-gprof: configure-gprof
+configure-gprof:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gprof/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprof ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gprof; \
+ cd "$(HOST_SUBDIR)/gprof" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gprof/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gprof"; \
+ libsrcdir="$$s/gprof"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gprof
+
+
+
+
+
+.PHONY: all-gprof maybe-all-gprof
+maybe-all-gprof:
+@if gprof
+TARGET-gprof=all
+maybe-all-gprof: all-gprof
+all-gprof: configure-gprof
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gprof && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gprof))
+@endif gprof
+
+
+
+
+.PHONY: check-gprof maybe-check-gprof
+maybe-check-gprof:
+@if gprof
+maybe-check-gprof: check-gprof
+
+check-gprof:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gprof && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif gprof
+
+.PHONY: install-gprof maybe-install-gprof
+maybe-install-gprof:
+@if gprof
+maybe-install-gprof: install-gprof
+
+install-gprof: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gprof && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif gprof
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gprof info-gprof
+maybe-info-gprof:
+@if gprof
+maybe-info-gprof: info-gprof
+
+info-gprof: \
+ configure-gprof
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 gettext" ; \
- (cd gettext && \
+ echo "Doing info 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-info) \
+ info) \
|| exit 1
+@endif gprof
-.PHONY: maybe-install-info-gnuserv install-info-gnuserv
-maybe-install-info-gnuserv:
+.PHONY: maybe-dvi-gprof dvi-gprof
+maybe-dvi-gprof:
+@if gprof
+maybe-dvi-gprof: dvi-gprof
-install-info-gnuserv: \
- configure-gnuserv \
- info-gnuserv
- @[ -f ./gnuserv/Makefile ] || exit 0; \
+dvi-gprof: \
+ configure-gprof
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 gnuserv" ; \
- (cd gnuserv && \
+ echo "Doing dvi 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-info) \
+ dvi) \
+ || exit 1
+
+@endif gprof
+
+.PHONY: maybe-html-gprof html-gprof
+maybe-html-gprof:
+@if gprof
+maybe-html-gprof: html-gprof
+
+html-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 html 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}" \
+ html) \
+ || exit 1
+
+@endif gprof
+
+.PHONY: maybe-TAGS-gprof TAGS-gprof
+maybe-TAGS-gprof:
+@if gprof
+maybe-TAGS-gprof: TAGS-gprof
+
+TAGS-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 TAGS 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}" \
+ TAGS) \
|| exit 1
+@endif gprof
.PHONY: maybe-install-info-gprof install-info-gprof
maybe-install-info-gprof:
+@if gprof
+maybe-install-info-gprof: install-info-gprof
install-info-gprof: \
configure-gprof \
info-gprof
+ @: $(MAKE); $(unstage)
@[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 gprof" ; \
- (cd gprof && \
+ (cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -7071,252 +13666,363 @@ install-info-gprof: \
install-info) \
|| exit 1
+@endif gprof
-.PHONY: maybe-install-info-gzip install-info-gzip
-maybe-install-info-gzip:
+.PHONY: maybe-install-html-gprof install-html-gprof
+maybe-install-html-gprof:
+@if gprof
+maybe-install-html-gprof: install-html-gprof
-install-info-gzip: \
- configure-gzip \
- info-gzip
- @[ -f ./gzip/Makefile ] || exit 0; \
+install-html-gprof: \
+ configure-gprof \
+ html-gprof
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 gzip" ; \
- (cd gzip && \
+ echo "Doing install-html 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-info) \
+ install-html) \
|| exit 1
+@endif gprof
-.PHONY: maybe-install-info-hello install-info-hello
-maybe-install-info-hello:
+.PHONY: maybe-installcheck-gprof installcheck-gprof
+maybe-installcheck-gprof:
+@if gprof
+maybe-installcheck-gprof: installcheck-gprof
-install-info-hello: \
- configure-hello \
- info-hello
- @[ -f ./hello/Makefile ] || exit 0; \
+installcheck-gprof: \
+ configure-gprof
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 hello" ; \
- (cd hello && \
+ echo "Doing installcheck 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-info) \
+ installcheck) \
|| exit 1
+@endif gprof
-.PHONY: maybe-install-info-indent install-info-indent
-maybe-install-info-indent:
+.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof
+maybe-mostlyclean-gprof:
+@if gprof
+maybe-mostlyclean-gprof: mostlyclean-gprof
-install-info-indent: \
- configure-indent \
- info-indent
- @[ -f ./indent/Makefile ] || exit 0; \
+mostlyclean-gprof:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 indent" ; \
- (cd indent && \
+ echo "Doing mostlyclean 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-info) \
+ mostlyclean) \
|| exit 1
+@endif gprof
-.PHONY: maybe-install-info-intl install-info-intl
-maybe-install-info-intl:
+.PHONY: maybe-clean-gprof clean-gprof
+maybe-clean-gprof:
+@if gprof
+maybe-clean-gprof: clean-gprof
-install-info-intl: \
- configure-intl \
- info-intl
- @[ -f ./intl/Makefile ] || exit 0; \
+clean-gprof:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 intl" ; \
- (cd intl && \
+ echo "Doing clean 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-info) \
+ clean) \
|| exit 1
+@endif gprof
-.PHONY: maybe-install-info-tcl install-info-tcl
-maybe-install-info-tcl:
+.PHONY: maybe-distclean-gprof distclean-gprof
+maybe-distclean-gprof:
+@if gprof
+maybe-distclean-gprof: distclean-gprof
-install-info-tcl: \
- configure-tcl \
- info-tcl
- @[ -f ./tcl/Makefile ] || exit 0; \
+distclean-gprof:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 tcl" ; \
- (cd tcl && \
+ echo "Doing distclean 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-info) \
+ distclean) \
|| exit 1
+@endif gprof
-.PHONY: maybe-install-info-itcl install-info-itcl
-maybe-install-info-itcl:
+.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof
+maybe-maintainer-clean-gprof:
+@if gprof
+maybe-maintainer-clean-gprof: maintainer-clean-gprof
-install-info-itcl: \
- configure-itcl \
- info-itcl
- @[ -f ./itcl/Makefile ] || exit 0; \
+maintainer-clean-gprof:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 itcl" ; \
- (cd itcl && \
+ echo "Doing maintainer-clean 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-info) \
+ maintainer-clean) \
|| exit 1
+@endif gprof
-.PHONY: maybe-install-info-ld install-info-ld
-maybe-install-info-ld:
-install-info-ld: \
- configure-ld \
- info-ld
- @[ -f ./ld/Makefile ] || exit 0; \
+
+.PHONY: configure-gzip maybe-configure-gzip
+maybe-configure-gzip:
+@if gzip
+maybe-configure-gzip: configure-gzip
+configure-gzip:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gzip/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gzip ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gzip; \
+ cd "$(HOST_SUBDIR)/gzip" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gzip/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gzip"; \
+ libsrcdir="$$s/gzip"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gzip
+
+
+
+
+
+.PHONY: all-gzip maybe-all-gzip
+maybe-all-gzip:
+@if gzip
+TARGET-gzip=all
+maybe-all-gzip: all-gzip
+all-gzip: configure-gzip
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gzip && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gzip))
+@endif gzip
+
+
+
+
+.PHONY: check-gzip maybe-check-gzip
+maybe-check-gzip:
+@if gzip
+maybe-check-gzip: check-gzip
+
+check-gzip:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gzip && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif gzip
+
+.PHONY: install-gzip maybe-install-gzip
+maybe-install-gzip:
+@if gzip
+maybe-install-gzip: install-gzip
+
+install-gzip: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gzip && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif gzip
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gzip info-gzip
+maybe-info-gzip:
+@if gzip
+maybe-info-gzip: info-gzip
+
+info-gzip: \
+ configure-gzip
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 ld" ; \
- (cd ld && \
+ echo "Doing info 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-info) \
+ info) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-libgui install-info-libgui
-maybe-install-info-libgui:
+.PHONY: maybe-dvi-gzip dvi-gzip
+maybe-dvi-gzip:
+@if gzip
+maybe-dvi-gzip: dvi-gzip
-install-info-libgui: \
- configure-libgui \
- info-libgui
- @[ -f ./libgui/Makefile ] || exit 0; \
+dvi-gzip: \
+ configure-gzip
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 libgui" ; \
- (cd libgui && \
+ echo "Doing dvi 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-info) \
+ dvi) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-libiberty install-info-libiberty
-maybe-install-info-libiberty:
+.PHONY: maybe-html-gzip html-gzip
+maybe-html-gzip:
+@if gzip
+maybe-html-gzip: html-gzip
-install-info-libiberty: \
- configure-libiberty \
- info-libiberty
- @[ -f ./libiberty/Makefile ] || exit 0; \
+html-gzip: \
+ configure-gzip
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 libiberty" ; \
- (cd libiberty && \
+ echo "Doing html 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-info) \
+ html) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-libtool install-info-libtool
-maybe-install-info-libtool:
+.PHONY: maybe-TAGS-gzip TAGS-gzip
+maybe-TAGS-gzip:
+@if gzip
+maybe-TAGS-gzip: TAGS-gzip
-install-info-libtool: \
- configure-libtool \
- info-libtool
- @[ -f ./libtool/Makefile ] || exit 0; \
+TAGS-gzip: \
+ configure-gzip
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 libtool" ; \
- (cd libtool && \
+ echo "Doing TAGS 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-info) \
+ TAGS) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-m4 install-info-m4
-maybe-install-info-m4:
+.PHONY: maybe-install-info-gzip install-info-gzip
+maybe-install-info-gzip:
+@if gzip
+maybe-install-info-gzip: install-info-gzip
-install-info-m4: \
- configure-m4 \
- info-m4
- @[ -f ./m4/Makefile ] || exit 0; \
+install-info-gzip: \
+ configure-gzip \
+ info-gzip
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 m4" ; \
- (cd m4 && \
+ echo "Doing install-info 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}" \
@@ -7324,252 +14030,363 @@ install-info-m4: \
install-info) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-make install-info-make
-maybe-install-info-make:
+.PHONY: maybe-install-html-gzip install-html-gzip
+maybe-install-html-gzip:
+@if gzip
+maybe-install-html-gzip: install-html-gzip
-install-info-make: \
- configure-make \
- info-make
- @[ -f ./make/Makefile ] || exit 0; \
+install-html-gzip: \
+ configure-gzip \
+ html-gzip
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 make" ; \
- (cd make && \
+ echo "Doing install-html 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-info) \
+ install-html) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-mmalloc install-info-mmalloc
-maybe-install-info-mmalloc:
+.PHONY: maybe-installcheck-gzip installcheck-gzip
+maybe-installcheck-gzip:
+@if gzip
+maybe-installcheck-gzip: installcheck-gzip
-install-info-mmalloc: \
- configure-mmalloc \
- info-mmalloc
- @[ -f ./mmalloc/Makefile ] || exit 0; \
+installcheck-gzip: \
+ configure-gzip
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 mmalloc" ; \
- (cd mmalloc && \
+ echo "Doing installcheck 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-info) \
+ installcheck) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-patch install-info-patch
-maybe-install-info-patch:
+.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip
+maybe-mostlyclean-gzip:
+@if gzip
+maybe-mostlyclean-gzip: mostlyclean-gzip
-install-info-patch: \
- configure-patch \
- info-patch
- @[ -f ./patch/Makefile ] || exit 0; \
+mostlyclean-gzip:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 patch" ; \
- (cd patch && \
+ echo "Doing mostlyclean 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-info) \
+ mostlyclean) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-perl install-info-perl
-maybe-install-info-perl:
+.PHONY: maybe-clean-gzip clean-gzip
+maybe-clean-gzip:
+@if gzip
+maybe-clean-gzip: clean-gzip
-install-info-perl: \
- configure-perl \
- info-perl
- @[ -f ./perl/Makefile ] || exit 0; \
+clean-gzip:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 perl" ; \
- (cd perl && \
+ echo "Doing clean 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-info) \
+ clean) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-prms install-info-prms
-maybe-install-info-prms:
+.PHONY: maybe-distclean-gzip distclean-gzip
+maybe-distclean-gzip:
+@if gzip
+maybe-distclean-gzip: distclean-gzip
-install-info-prms: \
- configure-prms \
- info-prms
- @[ -f ./prms/Makefile ] || exit 0; \
+distclean-gzip:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 prms" ; \
- (cd prms && \
+ echo "Doing distclean 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-info) \
+ distclean) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-rcs install-info-rcs
-maybe-install-info-rcs:
+.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip
+maybe-maintainer-clean-gzip:
+@if gzip
+maybe-maintainer-clean-gzip: maintainer-clean-gzip
-install-info-rcs: \
- configure-rcs \
- info-rcs
- @[ -f ./rcs/Makefile ] || exit 0; \
+maintainer-clean-gzip:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 rcs" ; \
- (cd rcs && \
+ echo "Doing maintainer-clean 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-info) \
+ maintainer-clean) \
|| exit 1
+@endif gzip
-.PHONY: maybe-install-info-readline install-info-readline
-maybe-install-info-readline:
-install-info-readline: \
- configure-readline \
- info-readline
- @[ -f ./readline/Makefile ] || exit 0; \
+
+.PHONY: configure-hello maybe-configure-hello
+maybe-configure-hello:
+@if hello
+maybe-configure-hello: configure-hello
+configure-hello:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/hello/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/hello ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/hello; \
+ cd "$(HOST_SUBDIR)/hello" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/hello/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/hello"; \
+ libsrcdir="$$s/hello"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif hello
+
+
+
+
+
+.PHONY: all-hello maybe-all-hello
+maybe-all-hello:
+@if hello
+TARGET-hello=all
+maybe-all-hello: all-hello
+all-hello: configure-hello
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/hello && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-hello))
+@endif hello
+
+
+
+
+.PHONY: check-hello maybe-check-hello
+maybe-check-hello:
+@if hello
+maybe-check-hello: check-hello
+
+check-hello:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/hello && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif hello
+
+.PHONY: install-hello maybe-install-hello
+maybe-install-hello:
+@if hello
+maybe-install-hello: install-hello
+
+install-hello: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/hello && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif hello
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-hello info-hello
+maybe-info-hello:
+@if hello
+maybe-info-hello: info-hello
+
+info-hello: \
+ configure-hello
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 readline" ; \
- (cd readline && \
+ echo "Doing info 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-info) \
+ info) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-release install-info-release
-maybe-install-info-release:
+.PHONY: maybe-dvi-hello dvi-hello
+maybe-dvi-hello:
+@if hello
+maybe-dvi-hello: dvi-hello
-install-info-release: \
- configure-release \
- info-release
- @[ -f ./release/Makefile ] || exit 0; \
+dvi-hello: \
+ configure-hello
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 release" ; \
- (cd release && \
+ echo "Doing dvi 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-info) \
+ dvi) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-recode install-info-recode
-maybe-install-info-recode:
+.PHONY: maybe-html-hello html-hello
+maybe-html-hello:
+@if hello
+maybe-html-hello: html-hello
-install-info-recode: \
- configure-recode \
- info-recode
- @[ -f ./recode/Makefile ] || exit 0; \
+html-hello: \
+ configure-hello
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 recode" ; \
- (cd recode && \
+ echo "Doing html 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-info) \
+ html) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-sed install-info-sed
-maybe-install-info-sed:
+.PHONY: maybe-TAGS-hello TAGS-hello
+maybe-TAGS-hello:
+@if hello
+maybe-TAGS-hello: TAGS-hello
-install-info-sed: \
- configure-sed \
- info-sed
- @[ -f ./sed/Makefile ] || exit 0; \
+TAGS-hello: \
+ configure-hello
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 sed" ; \
- (cd sed && \
+ echo "Doing TAGS 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-info) \
+ TAGS) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-send-pr install-info-send-pr
-maybe-install-info-send-pr:
+.PHONY: maybe-install-info-hello install-info-hello
+maybe-install-info-hello:
+@if hello
+maybe-install-info-hello: install-info-hello
-install-info-send-pr: \
- configure-send-pr \
- info-send-pr
- @[ -f ./send-pr/Makefile ] || exit 0; \
+install-info-hello: \
+ configure-hello \
+ info-hello
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 send-pr" ; \
- (cd send-pr && \
+ echo "Doing install-info 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}" \
@@ -7577,252 +14394,363 @@ install-info-send-pr: \
install-info) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-shellutils install-info-shellutils
-maybe-install-info-shellutils:
+.PHONY: maybe-install-html-hello install-html-hello
+maybe-install-html-hello:
+@if hello
+maybe-install-html-hello: install-html-hello
-install-info-shellutils: \
- configure-shellutils \
- info-shellutils
- @[ -f ./shellutils/Makefile ] || exit 0; \
+install-html-hello: \
+ configure-hello \
+ html-hello
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 shellutils" ; \
- (cd shellutils && \
+ echo "Doing install-html 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-info) \
+ install-html) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-sid install-info-sid
-maybe-install-info-sid:
+.PHONY: maybe-installcheck-hello installcheck-hello
+maybe-installcheck-hello:
+@if hello
+maybe-installcheck-hello: installcheck-hello
-install-info-sid: \
- configure-sid \
- info-sid
- @[ -f ./sid/Makefile ] || exit 0; \
+installcheck-hello: \
+ configure-hello
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 sid" ; \
- (cd sid && \
+ echo "Doing installcheck 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-info) \
+ installcheck) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-sim install-info-sim
-maybe-install-info-sim:
+.PHONY: maybe-mostlyclean-hello mostlyclean-hello
+maybe-mostlyclean-hello:
+@if hello
+maybe-mostlyclean-hello: mostlyclean-hello
-install-info-sim: \
- configure-sim \
- info-sim
- @[ -f ./sim/Makefile ] || exit 0; \
+mostlyclean-hello:
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 sim" ; \
- (cd sim && \
+ echo "Doing mostlyclean 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-info) \
+ mostlyclean) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-tar install-info-tar
-maybe-install-info-tar:
+.PHONY: maybe-clean-hello clean-hello
+maybe-clean-hello:
+@if hello
+maybe-clean-hello: clean-hello
-install-info-tar: \
- configure-tar \
- info-tar
- @[ -f ./tar/Makefile ] || exit 0; \
+clean-hello:
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 tar" ; \
- (cd tar && \
+ echo "Doing clean 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-info) \
+ clean) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-texinfo install-info-texinfo
-maybe-install-info-texinfo:
+.PHONY: maybe-distclean-hello distclean-hello
+maybe-distclean-hello:
+@if hello
+maybe-distclean-hello: distclean-hello
-install-info-texinfo: \
- configure-texinfo \
- info-texinfo
- @[ -f ./texinfo/Makefile ] || exit 0; \
+distclean-hello:
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 texinfo" ; \
- (cd texinfo && \
+ echo "Doing distclean 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-info) \
+ distclean) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-textutils install-info-textutils
-maybe-install-info-textutils:
+.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello
+maybe-maintainer-clean-hello:
+@if hello
+maybe-maintainer-clean-hello: maintainer-clean-hello
-install-info-textutils: \
- configure-textutils \
- info-textutils
- @[ -f ./textutils/Makefile ] || exit 0; \
+maintainer-clean-hello:
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 textutils" ; \
- (cd textutils && \
+ echo "Doing maintainer-clean 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-info) \
+ maintainer-clean) \
|| exit 1
+@endif hello
-.PHONY: maybe-install-info-time install-info-time
-maybe-install-info-time:
-install-info-time: \
- configure-time \
- info-time
- @[ -f ./time/Makefile ] || exit 0; \
+
+.PHONY: configure-indent maybe-configure-indent
+maybe-configure-indent:
+@if indent
+maybe-configure-indent: configure-indent
+configure-indent:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/indent/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/indent ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/indent; \
+ cd "$(HOST_SUBDIR)/indent" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/indent/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/indent"; \
+ libsrcdir="$$s/indent"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif indent
+
+
+
+
+
+.PHONY: all-indent maybe-all-indent
+maybe-all-indent:
+@if indent
+TARGET-indent=all
+maybe-all-indent: all-indent
+all-indent: configure-indent
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/indent && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-indent))
+@endif indent
+
+
+
+
+.PHONY: check-indent maybe-check-indent
+maybe-check-indent:
+@if indent
+maybe-check-indent: check-indent
+
+check-indent:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/indent && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif indent
+
+.PHONY: install-indent maybe-install-indent
+maybe-install-indent:
+@if indent
+maybe-install-indent: install-indent
+
+install-indent: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/indent && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif indent
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-indent info-indent
+maybe-info-indent:
+@if indent
+maybe-info-indent: info-indent
+
+info-indent: \
+ configure-indent
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 time" ; \
- (cd time && \
+ echo "Doing info 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-info) \
+ info) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-uudecode install-info-uudecode
-maybe-install-info-uudecode:
+.PHONY: maybe-dvi-indent dvi-indent
+maybe-dvi-indent:
+@if indent
+maybe-dvi-indent: dvi-indent
-install-info-uudecode: \
- configure-uudecode \
- info-uudecode
- @[ -f ./uudecode/Makefile ] || exit 0; \
+dvi-indent: \
+ configure-indent
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 uudecode" ; \
- (cd uudecode && \
+ echo "Doing dvi 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-info) \
+ dvi) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-wdiff install-info-wdiff
-maybe-install-info-wdiff:
+.PHONY: maybe-html-indent html-indent
+maybe-html-indent:
+@if indent
+maybe-html-indent: html-indent
-install-info-wdiff: \
- configure-wdiff \
- info-wdiff
- @[ -f ./wdiff/Makefile ] || exit 0; \
+html-indent: \
+ configure-indent
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 wdiff" ; \
- (cd wdiff && \
+ echo "Doing html 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-info) \
+ html) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-zip install-info-zip
-maybe-install-info-zip:
+.PHONY: maybe-TAGS-indent TAGS-indent
+maybe-TAGS-indent:
+@if indent
+maybe-TAGS-indent: TAGS-indent
-install-info-zip: \
- configure-zip \
- info-zip
- @[ -f ./zip/Makefile ] || exit 0; \
+TAGS-indent: \
+ configure-indent
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 zip" ; \
- (cd zip && \
+ echo "Doing TAGS 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-info) \
+ TAGS) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-zlib install-info-zlib
-maybe-install-info-zlib:
+.PHONY: maybe-install-info-indent install-info-indent
+maybe-install-info-indent:
+@if indent
+maybe-install-info-indent: install-info-indent
-install-info-zlib: \
- configure-zlib \
- info-zlib
- @[ -f ./zlib/Makefile ] || exit 0; \
+install-info-indent: \
+ configure-indent \
+ info-indent
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 zlib" ; \
- (cd zlib && \
+ echo "Doing install-info 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}" \
@@ -7830,255 +14758,715 @@ install-info-zlib: \
install-info) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-gdb install-info-gdb
-maybe-install-info-gdb:
+.PHONY: maybe-install-html-indent install-html-indent
+maybe-install-html-indent:
+@if indent
+maybe-install-html-indent: install-html-indent
-install-info-gdb: \
- configure-gdb \
- info-gdb
- @[ -f ./gdb/Makefile ] || exit 0; \
+install-html-indent: \
+ configure-indent \
+ html-indent
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 gdb" ; \
- (cd gdb && \
+ echo "Doing install-html 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-info) \
+ install-html) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-expect install-info-expect
-maybe-install-info-expect:
+.PHONY: maybe-installcheck-indent installcheck-indent
+maybe-installcheck-indent:
+@if indent
+maybe-installcheck-indent: installcheck-indent
-install-info-expect: \
- configure-expect \
- info-expect
- @[ -f ./expect/Makefile ] || exit 0; \
+installcheck-indent: \
+ configure-indent
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 expect" ; \
- (cd expect && \
+ echo "Doing installcheck 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-info) \
+ installcheck) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-guile install-info-guile
-maybe-install-info-guile:
+.PHONY: maybe-mostlyclean-indent mostlyclean-indent
+maybe-mostlyclean-indent:
+@if indent
+maybe-mostlyclean-indent: mostlyclean-indent
-install-info-guile: \
- configure-guile \
- info-guile
- @[ -f ./guile/Makefile ] || exit 0; \
+mostlyclean-indent:
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 guile" ; \
- (cd guile && \
+ echo "Doing mostlyclean 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-info) \
+ mostlyclean) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-tk install-info-tk
-maybe-install-info-tk:
+.PHONY: maybe-clean-indent clean-indent
+maybe-clean-indent:
+@if indent
+maybe-clean-indent: clean-indent
-install-info-tk: \
- configure-tk \
- info-tk
- @[ -f ./tk/Makefile ] || exit 0; \
+clean-indent:
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 tk" ; \
- (cd tk && \
+ echo "Doing clean 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-info) \
+ clean) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-tix install-info-tix
-maybe-install-info-tix:
+.PHONY: maybe-distclean-indent distclean-indent
+maybe-distclean-indent:
+@if indent
+maybe-distclean-indent: distclean-indent
-install-info-tix: \
- configure-tix \
- info-tix
- @[ -f ./tix/Makefile ] || exit 0; \
+distclean-indent:
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 tix" ; \
- (cd tix && \
+ echo "Doing distclean 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-info) \
+ distclean) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-libtermcap install-info-libtermcap
-maybe-install-info-libtermcap:
+.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent
+maybe-maintainer-clean-indent:
+@if indent
+maybe-maintainer-clean-indent: maintainer-clean-indent
-install-info-libtermcap: \
- configure-libtermcap \
- info-libtermcap
- @[ -f ./libtermcap/Makefile ] || exit 0; \
+maintainer-clean-indent:
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 libtermcap" ; \
- (cd libtermcap && \
+ echo "Doing maintainer-clean 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-info) \
+ maintainer-clean) \
|| exit 1
+@endif indent
-.PHONY: maybe-install-info-utils install-info-utils
-maybe-install-info-utils:
-install-info-utils: \
- configure-utils \
- info-utils
- @[ -f ./utils/Makefile ] || exit 0; \
+
+.PHONY: configure-intl maybe-configure-intl
+maybe-configure-intl:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/intl; \
+ cd "$(HOST_SUBDIR)/intl" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/intl"; \
+ libsrcdir="$$s/intl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif intl
+
+
+
+.PHONY: configure-stage1-intl maybe-configure-stage1-intl
+maybe-configure-stage1-intl:
+@if intl-bootstrap
+maybe-configure-stage1-intl: configure-stage1-intl
+configure-stage1-intl:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/intl"; \
+ libsrcdir="$$s/intl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif intl-bootstrap
+
+.PHONY: configure-stage2-intl maybe-configure-stage2-intl
+maybe-configure-stage2-intl:
+@if intl-bootstrap
+maybe-configure-stage2-intl: configure-stage2-intl
+configure-stage2-intl:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/intl"; \
+ libsrcdir="$$s/intl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif intl-bootstrap
+
+.PHONY: configure-stage3-intl maybe-configure-stage3-intl
+maybe-configure-stage3-intl:
+@if intl-bootstrap
+maybe-configure-stage3-intl: configure-stage3-intl
+configure-stage3-intl:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/intl"; \
+ libsrcdir="$$s/intl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif intl-bootstrap
+
+.PHONY: configure-stage4-intl maybe-configure-stage4-intl
+maybe-configure-stage4-intl:
+@if intl-bootstrap
+maybe-configure-stage4-intl: configure-stage4-intl
+configure-stage4-intl:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/intl"; \
+ libsrcdir="$$s/intl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif intl-bootstrap
+
+.PHONY: configure-stageprofile-intl maybe-configure-stageprofile-intl
+maybe-configure-stageprofile-intl:
+@if intl-bootstrap
+maybe-configure-stageprofile-intl: configure-stageprofile-intl
+configure-stageprofile-intl:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/intl"; \
+ libsrcdir="$$s/intl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif intl-bootstrap
+
+.PHONY: configure-stagefeedback-intl maybe-configure-stagefeedback-intl
+maybe-configure-stagefeedback-intl:
+@if intl-bootstrap
+maybe-configure-stagefeedback-intl: configure-stagefeedback-intl
+configure-stagefeedback-intl:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/intl"; \
+ libsrcdir="$$s/intl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif intl-bootstrap
+
+
+
+
+
+.PHONY: all-intl maybe-all-intl
+maybe-all-intl:
+@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) \
+ (cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-intl))
+@endif intl
+
+
+
+.PHONY: all-stage1-intl maybe-all-stage1-intl
+.PHONY: clean-stage1-intl maybe-clean-stage1-intl
+maybe-all-stage1-intl:
+maybe-clean-stage1-intl:
+@if intl-bootstrap
+maybe-all-stage1-intl: all-stage1-intl
+all-stage1: all-stage1-intl
+TARGET-stage1-intl = $(TARGET-intl)
+all-stage1-intl: configure-stage1-intl
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/intl && \
+ $(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; \
+ cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif intl-bootstrap
+
+
+.PHONY: all-stage2-intl maybe-all-stage2-intl
+.PHONY: clean-stage2-intl maybe-clean-stage2-intl
+maybe-all-stage2-intl:
+maybe-clean-stage2-intl:
+@if intl-bootstrap
+maybe-all-stage2-intl: all-stage2-intl
+all-stage2: all-stage2-intl
+TARGET-stage2-intl = $(TARGET-intl)
+all-stage2-intl: configure-stage2-intl
+ @[ $(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)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif intl-bootstrap
+
+
+.PHONY: all-stage3-intl maybe-all-stage3-intl
+.PHONY: clean-stage3-intl maybe-clean-stage3-intl
+maybe-all-stage3-intl:
+maybe-clean-stage3-intl:
+@if intl-bootstrap
+maybe-all-stage3-intl: all-stage3-intl
+all-stage3: all-stage3-intl
+TARGET-stage3-intl = $(TARGET-intl)
+all-stage3-intl: configure-stage3-intl
+ @[ $(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)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif intl-bootstrap
+
+
+.PHONY: all-stage4-intl maybe-all-stage4-intl
+.PHONY: clean-stage4-intl maybe-clean-stage4-intl
+maybe-all-stage4-intl:
+maybe-clean-stage4-intl:
+@if intl-bootstrap
+maybe-all-stage4-intl: all-stage4-intl
+all-stage4: all-stage4-intl
+TARGET-stage4-intl = $(TARGET-intl)
+all-stage4-intl: configure-stage4-intl
+ @[ $(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)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif intl-bootstrap
+
+
+.PHONY: all-stageprofile-intl maybe-all-stageprofile-intl
+.PHONY: clean-stageprofile-intl maybe-clean-stageprofile-intl
+maybe-all-stageprofile-intl:
+maybe-clean-stageprofile-intl:
+@if intl-bootstrap
+maybe-all-stageprofile-intl: all-stageprofile-intl
+all-stageprofile: all-stageprofile-intl
+TARGET-stageprofile-intl = $(TARGET-intl)
+all-stageprofile-intl: configure-stageprofile-intl
+ @[ $(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)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif intl-bootstrap
+
+
+.PHONY: all-stagefeedback-intl maybe-all-stagefeedback-intl
+.PHONY: clean-stagefeedback-intl maybe-clean-stagefeedback-intl
+maybe-all-stagefeedback-intl:
+maybe-clean-stagefeedback-intl:
+@if intl-bootstrap
+maybe-all-stagefeedback-intl: all-stagefeedback-intl
+all-stagefeedback: all-stagefeedback-intl
+TARGET-stagefeedback-intl = $(TARGET-intl)
+all-stagefeedback-intl: configure-stagefeedback-intl
+ @[ $(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)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif intl-bootstrap
+
+
+
+
+
+.PHONY: check-intl maybe-check-intl
+maybe-check-intl:
+@if intl
+maybe-check-intl: check-intl
+
+check-intl:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif intl
+
+.PHONY: install-intl maybe-install-intl
+maybe-install-intl:
+@if intl
+maybe-install-intl: install-intl
+
+install-intl: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif intl
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-intl info-intl
+maybe-info-intl:
+@if intl
+maybe-info-intl: info-intl
+
+info-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 utils" ; \
- (cd utils && \
+ echo "Doing info 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-info) \
+ info) \
|| exit 1
+@endif intl
+.PHONY: maybe-dvi-intl dvi-intl
+maybe-dvi-intl:
+@if intl
+maybe-dvi-intl: dvi-intl
-# Target modules.
-
-.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3
-maybe-install-info-target-libstdc++-v3:
-
-install-info-target-libstdc++-v3: \
- configure-target-libstdc++-v3 \
- info-target-libstdc++-v3
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+dvi-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ echo "Doing dvi 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-info) \
+ dvi) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-newlib install-info-target-newlib
-maybe-install-info-target-newlib:
+.PHONY: maybe-html-intl html-intl
+maybe-html-intl:
+@if intl
+maybe-html-intl: html-intl
-install-info-target-newlib: \
- configure-target-newlib \
- info-target-newlib
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+html-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ echo "Doing html 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-info) \
+ html) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-libf2c install-info-target-libf2c
-maybe-install-info-target-libf2c:
+.PHONY: maybe-TAGS-intl TAGS-intl
+maybe-TAGS-intl:
+@if intl
+maybe-TAGS-intl: TAGS-intl
-install-info-target-libf2c: \
- configure-target-libf2c \
- info-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+TAGS-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ echo "Doing TAGS 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-info) \
+ TAGS) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc
-maybe-install-info-target-libobjc:
+.PHONY: maybe-install-info-intl install-info-intl
+maybe-install-info-intl:
+@if intl
+maybe-install-info-intl: install-info-intl
-install-info-target-libobjc: \
- configure-target-libobjc \
- info-target-libobjc
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+install-info-intl: \
+ configure-intl \
+ info-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
+ echo "Doing install-info 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}" \
@@ -8086,252 +15474,357 @@ install-info-target-libobjc: \
install-info) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap
-maybe-install-info-target-libtermcap:
+.PHONY: maybe-install-html-intl install-html-intl
+maybe-install-html-intl:
+@if intl
+maybe-install-html-intl: install-html-intl
-install-info-target-libtermcap: \
- configure-target-libtermcap \
- info-target-libtermcap
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+install-html-intl: \
+ configure-intl \
+ html-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libtermcap && \
+ echo "Doing install-html 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-info) \
+ install-html) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-winsup install-info-target-winsup
-maybe-install-info-target-winsup:
+.PHONY: maybe-installcheck-intl installcheck-intl
+maybe-installcheck-intl:
+@if intl
+maybe-installcheck-intl: installcheck-intl
-install-info-target-winsup: \
- configure-target-winsup \
- info-target-winsup
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+installcheck-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/winsup && \
+ echo "Doing installcheck 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-info) \
+ installcheck) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss
-maybe-install-info-target-libgloss:
+.PHONY: maybe-mostlyclean-intl mostlyclean-intl
+maybe-mostlyclean-intl:
+@if intl
+maybe-mostlyclean-intl: mostlyclean-intl
-install-info-target-libgloss: \
- configure-target-libgloss \
- info-target-libgloss
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+mostlyclean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
+ echo "Doing mostlyclean 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-info) \
+ mostlyclean) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty
-maybe-install-info-target-libiberty:
+.PHONY: maybe-clean-intl clean-intl
+maybe-clean-intl:
+@if intl
+maybe-clean-intl: clean-intl
-install-info-target-libiberty: \
- configure-target-libiberty \
- info-target-libiberty
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+clean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
+ echo "Doing clean 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-info) \
+ clean) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-gperf install-info-target-gperf
-maybe-install-info-target-gperf:
+.PHONY: maybe-distclean-intl distclean-intl
+maybe-distclean-intl:
+@if intl
+maybe-distclean-intl: distclean-intl
-install-info-target-gperf: \
- configure-target-gperf \
- info-target-gperf
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+distclean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/gperf && \
+ echo "Doing distclean 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-info) \
+ distclean) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-examples install-info-target-examples
-maybe-install-info-target-examples:
+.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl
+maybe-maintainer-clean-intl:
+@if intl
+maybe-maintainer-clean-intl: maintainer-clean-intl
-install-info-target-examples: \
- configure-target-examples \
- info-target-examples
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+maintainer-clean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/examples && \
+ echo "Doing maintainer-clean 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-info) \
+ maintainer-clean) \
|| exit 1
+@endif intl
-.PHONY: maybe-install-info-target-libffi install-info-target-libffi
-maybe-install-info-target-libffi:
-install-info-target-libffi: \
- configure-target-libffi \
- info-target-libffi
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+
+.PHONY: configure-tcl maybe-configure-tcl
+maybe-configure-tcl:
+@if tcl
+maybe-configure-tcl: configure-tcl
+configure-tcl:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/tcl/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tcl ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/tcl; \
+ cd "$(HOST_SUBDIR)/tcl" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/tcl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/tcl"; \
+ libsrcdir="$$s/tcl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif tcl
+
+
+
+
+
+.PHONY: all-tcl maybe-all-tcl
+maybe-all-tcl:
+@if tcl
+TARGET-tcl=all
+maybe-all-tcl: all-tcl
+all-tcl: configure-tcl
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tcl && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-tcl))
+@endif tcl
+
+
+
+
+.PHONY: check-tcl maybe-check-tcl
+maybe-check-tcl:
+@if tcl
+maybe-check-tcl: check-tcl
+
+check-tcl:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tcl && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif tcl
+
+.PHONY: install-tcl maybe-install-tcl
+maybe-install-tcl:
+@if tcl
+maybe-install-tcl: install-tcl
+
+install-tcl: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tcl && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif tcl
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-tcl info-tcl
+maybe-info-tcl:
+@if tcl
+maybe-info-tcl: info-tcl
+
+info-tcl: \
+ configure-tcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libffi && \
+ echo "Doing info 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-info) \
+ info) \
|| exit 1
+@endif tcl
-.PHONY: maybe-install-info-target-libjava install-info-target-libjava
-maybe-install-info-target-libjava:
+.PHONY: maybe-dvi-tcl dvi-tcl
+maybe-dvi-tcl:
+@if tcl
+maybe-dvi-tcl: dvi-tcl
-install-info-target-libjava: \
- configure-target-libjava \
- info-target-libjava
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+dvi-tcl: \
+ configure-tcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libjava && \
+ echo "Doing dvi 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-info) \
+ dvi) \
|| exit 1
+@endif tcl
-.PHONY: maybe-install-info-target-zlib install-info-target-zlib
-maybe-install-info-target-zlib:
+.PHONY: maybe-html-tcl html-tcl
+maybe-html-tcl:
+@if tcl
+maybe-html-tcl: html-tcl
-install-info-target-zlib: \
- configure-target-zlib \
- info-target-zlib
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+html-tcl: \
+ configure-tcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/zlib && \
+ echo "Doing html 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-info) \
+ html) \
|| exit 1
+@endif tcl
-.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc
-maybe-install-info-target-boehm-gc:
+.PHONY: maybe-TAGS-tcl TAGS-tcl
+maybe-TAGS-tcl:
+@if tcl
+maybe-TAGS-tcl: TAGS-tcl
-install-info-target-boehm-gc: \
- configure-target-boehm-gc \
- info-target-boehm-gc
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+TAGS-tcl: \
+ configure-tcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
+ echo "Doing TAGS 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-info) \
+ TAGS) \
|| exit 1
+@endif tcl
-.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads
-maybe-install-info-target-qthreads:
+.PHONY: maybe-install-info-tcl install-info-tcl
+maybe-install-info-tcl:
+@if tcl
+maybe-install-info-tcl: install-info-tcl
-install-info-target-qthreads: \
- configure-target-qthreads \
- info-target-qthreads
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+install-info-tcl: \
+ configure-tcl \
+ info-tcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/qthreads && \
+ echo "Doing install-info 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}" \
@@ -8339,357 +15832,401 @@ install-info-target-qthreads: \
install-info) \
|| exit 1
+@endif tcl
-.PHONY: maybe-install-info-target-rda install-info-target-rda
-maybe-install-info-target-rda:
+.PHONY: maybe-install-html-tcl install-html-tcl
+maybe-install-html-tcl:
+@if tcl
+maybe-install-html-tcl: install-html-tcl
-install-info-target-rda: \
- configure-target-rda \
- info-target-rda
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+install-html-tcl: \
+ configure-tcl \
+ html-tcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/rda && \
+ echo "Doing install-html 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-info) \
+ install-html) \
|| exit 1
+@endif tcl
-.PHONY: maybe-install-info-target-libada install-info-target-libada
-maybe-install-info-target-libada:
+.PHONY: maybe-installcheck-tcl installcheck-tcl
+maybe-installcheck-tcl:
+@if tcl
+maybe-installcheck-tcl: installcheck-tcl
-install-info-target-libada: \
- configure-target-libada \
- info-target-libada
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+installcheck-tcl: \
+ configure-tcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libada && \
+ echo "Doing installcheck 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-info) \
+ installcheck) \
|| exit 1
+@endif tcl
+.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl
+maybe-mostlyclean-tcl:
+@if tcl
+maybe-mostlyclean-tcl: mostlyclean-tcl
-.PHONY: do-installcheck
-do-installcheck: installcheck-host installcheck-target
+# tcl doesn't support mostlyclean.
+mostlyclean-tcl:
-.PHONY: installcheck-host
-installcheck-host: maybe-installcheck-gcc \
- maybe-installcheck-ash \
- maybe-installcheck-autoconf \
- maybe-installcheck-automake \
- maybe-installcheck-bash \
- maybe-installcheck-bfd \
- maybe-installcheck-opcodes \
- maybe-installcheck-binutils \
- maybe-installcheck-bison \
- maybe-installcheck-byacc \
- maybe-installcheck-bzip2 \
- maybe-installcheck-dejagnu \
- maybe-installcheck-diff \
- maybe-installcheck-dosutils \
- maybe-installcheck-etc \
- maybe-installcheck-fastjar \
- maybe-installcheck-fileutils \
- maybe-installcheck-findutils \
- maybe-installcheck-find \
- maybe-installcheck-flex \
- maybe-installcheck-gas \
- maybe-installcheck-gawk \
- maybe-installcheck-gettext \
- maybe-installcheck-gnuserv \
- maybe-installcheck-gprof \
- maybe-installcheck-gzip \
- maybe-installcheck-hello \
- maybe-installcheck-indent \
- maybe-installcheck-intl \
- maybe-installcheck-tcl \
- maybe-installcheck-itcl \
- maybe-installcheck-ld \
- maybe-installcheck-libgui \
- maybe-installcheck-libiberty \
- maybe-installcheck-libtool \
- maybe-installcheck-m4 \
- maybe-installcheck-make \
- maybe-installcheck-mmalloc \
- maybe-installcheck-patch \
- maybe-installcheck-perl \
- maybe-installcheck-prms \
- maybe-installcheck-rcs \
- maybe-installcheck-readline \
- maybe-installcheck-release \
- maybe-installcheck-recode \
- maybe-installcheck-sed \
- maybe-installcheck-send-pr \
- maybe-installcheck-shellutils \
- maybe-installcheck-sid \
- maybe-installcheck-sim \
- maybe-installcheck-tar \
- maybe-installcheck-texinfo \
- maybe-installcheck-textutils \
- maybe-installcheck-time \
- maybe-installcheck-uudecode \
- maybe-installcheck-wdiff \
- maybe-installcheck-zip \
- maybe-installcheck-zlib \
- maybe-installcheck-gdb \
- maybe-installcheck-expect \
- maybe-installcheck-guile \
- maybe-installcheck-tk \
- maybe-installcheck-tix \
- maybe-installcheck-libtermcap \
- maybe-installcheck-utils
+@endif tcl
-.PHONY: installcheck-target
-installcheck-target: \
- maybe-installcheck-target-libstdc++-v3 \
- maybe-installcheck-target-newlib \
- maybe-installcheck-target-libf2c \
- maybe-installcheck-target-libobjc \
- maybe-installcheck-target-libtermcap \
- maybe-installcheck-target-winsup \
- maybe-installcheck-target-libgloss \
- maybe-installcheck-target-libiberty \
- maybe-installcheck-target-gperf \
- maybe-installcheck-target-examples \
- maybe-installcheck-target-libffi \
- maybe-installcheck-target-libjava \
- maybe-installcheck-target-zlib \
- maybe-installcheck-target-boehm-gc \
- maybe-installcheck-target-qthreads \
- maybe-installcheck-target-rda \
- maybe-installcheck-target-libada
-
-# GCC, the eternal special case
-.PHONY: maybe-installcheck-gcc installcheck-gcc
-maybe-installcheck-gcc:
-installcheck-gcc: \
- configure-gcc
- @[ -f ./gcc/Makefile ] || exit 0; \
+.PHONY: maybe-clean-tcl clean-tcl
+maybe-clean-tcl:
+@if tcl
+maybe-clean-tcl: clean-tcl
+
+clean-tcl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gcc" ; \
- (cd gcc && \
+ echo "Doing clean 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}" \
- installcheck) \
+ clean) \
|| exit 1
-# Host modules.
+@endif tcl
-.PHONY: maybe-installcheck-ash installcheck-ash
-maybe-installcheck-ash:
+.PHONY: maybe-distclean-tcl distclean-tcl
+maybe-distclean-tcl:
+@if tcl
+maybe-distclean-tcl: distclean-tcl
-installcheck-ash: \
- configure-ash
- @[ -f ./ash/Makefile ] || exit 0; \
+distclean-tcl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in ash" ; \
- (cd ash && \
+ echo "Doing distclean 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}" \
- installcheck) \
+ distclean) \
|| exit 1
+@endif tcl
-.PHONY: maybe-installcheck-autoconf installcheck-autoconf
-maybe-installcheck-autoconf:
+.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl
+maybe-maintainer-clean-tcl:
+@if tcl
+maybe-maintainer-clean-tcl: maintainer-clean-tcl
-installcheck-autoconf: \
- configure-autoconf
- @[ -f ./autoconf/Makefile ] || exit 0; \
+maintainer-clean-tcl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in autoconf" ; \
- (cd autoconf && \
+ echo "Doing maintainer-clean 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}" \
- installcheck) \
+ maintainer-clean) \
|| exit 1
+@endif tcl
-.PHONY: maybe-installcheck-automake installcheck-automake
-maybe-installcheck-automake:
-installcheck-automake: \
- configure-automake
- @[ -f ./automake/Makefile ] || exit 0; \
+
+.PHONY: configure-itcl maybe-configure-itcl
+maybe-configure-itcl:
+@if itcl
+maybe-configure-itcl: configure-itcl
+configure-itcl:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/itcl/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/itcl ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/itcl; \
+ cd "$(HOST_SUBDIR)/itcl" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/itcl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/itcl"; \
+ libsrcdir="$$s/itcl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif itcl
+
+
+
+
+
+.PHONY: all-itcl maybe-all-itcl
+maybe-all-itcl:
+@if itcl
+TARGET-itcl=all
+maybe-all-itcl: all-itcl
+all-itcl: configure-itcl
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/itcl && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-itcl))
+@endif itcl
+
+
+
+
+.PHONY: check-itcl maybe-check-itcl
+maybe-check-itcl:
+@if itcl
+maybe-check-itcl: check-itcl
+
+check-itcl:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/itcl && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif itcl
+
+.PHONY: install-itcl maybe-install-itcl
+maybe-install-itcl:
+@if itcl
+maybe-install-itcl: install-itcl
+
+install-itcl: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/itcl && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif itcl
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-itcl info-itcl
+maybe-info-itcl:
+@if itcl
+maybe-info-itcl: info-itcl
+
+info-itcl: \
+ configure-itcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in automake" ; \
- (cd automake && \
+ echo "Doing info 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}" \
- installcheck) \
+ info) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-bash installcheck-bash
-maybe-installcheck-bash:
+.PHONY: maybe-dvi-itcl dvi-itcl
+maybe-dvi-itcl:
+@if itcl
+maybe-dvi-itcl: dvi-itcl
-installcheck-bash: \
- configure-bash
- @[ -f ./bash/Makefile ] || exit 0; \
+dvi-itcl: \
+ configure-itcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in bash" ; \
- (cd bash && \
+ echo "Doing dvi 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}" \
- installcheck) \
+ dvi) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-bfd installcheck-bfd
-maybe-installcheck-bfd:
+.PHONY: maybe-html-itcl html-itcl
+maybe-html-itcl:
+@if itcl
+maybe-html-itcl: html-itcl
-installcheck-bfd: \
- configure-bfd
- @[ -f ./bfd/Makefile ] || exit 0; \
+html-itcl: \
+ configure-itcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in bfd" ; \
- (cd bfd && \
+ echo "Doing html 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}" \
- installcheck) \
+ html) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-opcodes installcheck-opcodes
-maybe-installcheck-opcodes:
+.PHONY: maybe-TAGS-itcl TAGS-itcl
+maybe-TAGS-itcl:
+@if itcl
+maybe-TAGS-itcl: TAGS-itcl
-installcheck-opcodes: \
- configure-opcodes
- @[ -f ./opcodes/Makefile ] || exit 0; \
+TAGS-itcl: \
+ configure-itcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in opcodes" ; \
- (cd opcodes && \
+ echo "Doing TAGS 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}" \
- installcheck) \
+ TAGS) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-binutils installcheck-binutils
-maybe-installcheck-binutils:
+.PHONY: maybe-install-info-itcl install-info-itcl
+maybe-install-info-itcl:
+@if itcl
+maybe-install-info-itcl: install-info-itcl
-installcheck-binutils: \
- configure-binutils
- @[ -f ./binutils/Makefile ] || exit 0; \
+install-info-itcl: \
+ configure-itcl \
+ info-itcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in binutils" ; \
- (cd binutils && \
+ echo "Doing install-info 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}" \
- installcheck) \
+ install-info) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-bison installcheck-bison
-maybe-installcheck-bison:
+.PHONY: maybe-install-html-itcl install-html-itcl
+maybe-install-html-itcl:
+@if itcl
+maybe-install-html-itcl: install-html-itcl
-installcheck-bison: \
- configure-bison
- @[ -f ./bison/Makefile ] || exit 0; \
+install-html-itcl: \
+ configure-itcl \
+ html-itcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in bison" ; \
- (cd bison && \
+ echo "Doing install-html 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}" \
- installcheck) \
+ install-html) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-byacc installcheck-byacc
-maybe-installcheck-byacc:
+.PHONY: maybe-installcheck-itcl installcheck-itcl
+maybe-installcheck-itcl:
+@if itcl
+maybe-installcheck-itcl: installcheck-itcl
-installcheck-byacc: \
- configure-byacc
- @[ -f ./byacc/Makefile ] || exit 0; \
+installcheck-itcl: \
+ configure-itcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in byacc" ; \
- (cd byacc && \
+ echo "Doing installcheck 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}" \
@@ -8697,241 +16234,713 @@ installcheck-byacc: \
installcheck) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-bzip2 installcheck-bzip2
-maybe-installcheck-bzip2:
+.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl
+maybe-mostlyclean-itcl:
+@if itcl
+maybe-mostlyclean-itcl: mostlyclean-itcl
-installcheck-bzip2: \
- configure-bzip2
- @[ -f ./bzip2/Makefile ] || exit 0; \
+mostlyclean-itcl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in bzip2" ; \
- (cd bzip2 && \
+ echo "Doing mostlyclean 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}" \
- installcheck) \
+ mostlyclean) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu
-maybe-installcheck-dejagnu:
+.PHONY: maybe-clean-itcl clean-itcl
+maybe-clean-itcl:
+@if itcl
+maybe-clean-itcl: clean-itcl
-installcheck-dejagnu: \
- configure-dejagnu
- @[ -f ./dejagnu/Makefile ] || exit 0; \
+clean-itcl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in dejagnu" ; \
- (cd dejagnu && \
+ echo "Doing clean 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}" \
- installcheck) \
+ clean) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-diff installcheck-diff
-maybe-installcheck-diff:
+.PHONY: maybe-distclean-itcl distclean-itcl
+maybe-distclean-itcl:
+@if itcl
+maybe-distclean-itcl: distclean-itcl
-installcheck-diff: \
- configure-diff
- @[ -f ./diff/Makefile ] || exit 0; \
+distclean-itcl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in diff" ; \
- (cd diff && \
+ echo "Doing distclean 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}" \
- installcheck) \
+ distclean) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-dosutils installcheck-dosutils
-maybe-installcheck-dosutils:
+.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl
+maybe-maintainer-clean-itcl:
+@if itcl
+maybe-maintainer-clean-itcl: maintainer-clean-itcl
-installcheck-dosutils: \
- configure-dosutils
- @[ -f ./dosutils/Makefile ] || exit 0; \
+maintainer-clean-itcl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in dosutils" ; \
- (cd dosutils && \
+ echo "Doing maintainer-clean 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}" \
- installcheck) \
+ maintainer-clean) \
|| exit 1
+@endif itcl
-.PHONY: maybe-installcheck-etc installcheck-etc
-maybe-installcheck-etc:
-installcheck-etc: \
- configure-etc
- @[ -f ./etc/Makefile ] || exit 0; \
+
+.PHONY: configure-ld maybe-configure-ld
+maybe-configure-ld:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/ld; \
+ cd "$(HOST_SUBDIR)/ld" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/ld"; \
+ libsrcdir="$$s/ld"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif ld
+
+
+
+.PHONY: configure-stage1-ld maybe-configure-stage1-ld
+maybe-configure-stage1-ld:
+@if ld-bootstrap
+maybe-configure-stage1-ld: configure-stage1-ld
+configure-stage1-ld:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/ld"; \
+ libsrcdir="$$s/ld"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif ld-bootstrap
+
+.PHONY: configure-stage2-ld maybe-configure-stage2-ld
+maybe-configure-stage2-ld:
+@if ld-bootstrap
+maybe-configure-stage2-ld: configure-stage2-ld
+configure-stage2-ld:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/ld"; \
+ libsrcdir="$$s/ld"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif ld-bootstrap
+
+.PHONY: configure-stage3-ld maybe-configure-stage3-ld
+maybe-configure-stage3-ld:
+@if ld-bootstrap
+maybe-configure-stage3-ld: configure-stage3-ld
+configure-stage3-ld:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/ld"; \
+ libsrcdir="$$s/ld"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif ld-bootstrap
+
+.PHONY: configure-stage4-ld maybe-configure-stage4-ld
+maybe-configure-stage4-ld:
+@if ld-bootstrap
+maybe-configure-stage4-ld: configure-stage4-ld
+configure-stage4-ld:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/ld"; \
+ libsrcdir="$$s/ld"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif ld-bootstrap
+
+.PHONY: configure-stageprofile-ld maybe-configure-stageprofile-ld
+maybe-configure-stageprofile-ld:
+@if ld-bootstrap
+maybe-configure-stageprofile-ld: configure-stageprofile-ld
+configure-stageprofile-ld:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/ld"; \
+ libsrcdir="$$s/ld"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif ld-bootstrap
+
+.PHONY: configure-stagefeedback-ld maybe-configure-stagefeedback-ld
+maybe-configure-stagefeedback-ld:
+@if ld-bootstrap
+maybe-configure-stagefeedback-ld: configure-stagefeedback-ld
+configure-stagefeedback-ld:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/ld"; \
+ libsrcdir="$$s/ld"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif ld-bootstrap
+
+
+
+
+
+.PHONY: all-ld maybe-all-ld
+maybe-all-ld:
+@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) \
+ (cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-ld))
+@endif ld
+
+
+
+.PHONY: all-stage1-ld maybe-all-stage1-ld
+.PHONY: clean-stage1-ld maybe-clean-stage1-ld
+maybe-all-stage1-ld:
+maybe-clean-stage1-ld:
+@if ld-bootstrap
+maybe-all-stage1-ld: all-stage1-ld
+all-stage1: all-stage1-ld
+TARGET-stage1-ld = $(TARGET-ld)
+all-stage1-ld: configure-stage1-ld
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/ld && \
+ $(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; \
+ cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif ld-bootstrap
+
+
+.PHONY: all-stage2-ld maybe-all-stage2-ld
+.PHONY: clean-stage2-ld maybe-clean-stage2-ld
+maybe-all-stage2-ld:
+maybe-clean-stage2-ld:
+@if ld-bootstrap
+maybe-all-stage2-ld: all-stage2-ld
+all-stage2: all-stage2-ld
+TARGET-stage2-ld = $(TARGET-ld)
+all-stage2-ld: configure-stage2-ld
+ @[ $(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)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif ld-bootstrap
+
+
+.PHONY: all-stage3-ld maybe-all-stage3-ld
+.PHONY: clean-stage3-ld maybe-clean-stage3-ld
+maybe-all-stage3-ld:
+maybe-clean-stage3-ld:
+@if ld-bootstrap
+maybe-all-stage3-ld: all-stage3-ld
+all-stage3: all-stage3-ld
+TARGET-stage3-ld = $(TARGET-ld)
+all-stage3-ld: configure-stage3-ld
+ @[ $(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)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif ld-bootstrap
+
+
+.PHONY: all-stage4-ld maybe-all-stage4-ld
+.PHONY: clean-stage4-ld maybe-clean-stage4-ld
+maybe-all-stage4-ld:
+maybe-clean-stage4-ld:
+@if ld-bootstrap
+maybe-all-stage4-ld: all-stage4-ld
+all-stage4: all-stage4-ld
+TARGET-stage4-ld = $(TARGET-ld)
+all-stage4-ld: configure-stage4-ld
+ @[ $(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)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif ld-bootstrap
+
+
+.PHONY: all-stageprofile-ld maybe-all-stageprofile-ld
+.PHONY: clean-stageprofile-ld maybe-clean-stageprofile-ld
+maybe-all-stageprofile-ld:
+maybe-clean-stageprofile-ld:
+@if ld-bootstrap
+maybe-all-stageprofile-ld: all-stageprofile-ld
+all-stageprofile: all-stageprofile-ld
+TARGET-stageprofile-ld = $(TARGET-ld)
+all-stageprofile-ld: configure-stageprofile-ld
+ @[ $(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)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif ld-bootstrap
+
+
+.PHONY: all-stagefeedback-ld maybe-all-stagefeedback-ld
+.PHONY: clean-stagefeedback-ld maybe-clean-stagefeedback-ld
+maybe-all-stagefeedback-ld:
+maybe-clean-stagefeedback-ld:
+@if ld-bootstrap
+maybe-all-stagefeedback-ld: all-stagefeedback-ld
+all-stagefeedback: all-stagefeedback-ld
+TARGET-stagefeedback-ld = $(TARGET-ld)
+all-stagefeedback-ld: configure-stagefeedback-ld
+ @[ $(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)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif ld-bootstrap
+
+
+
+
+
+.PHONY: check-ld maybe-check-ld
+maybe-check-ld:
+@if ld
+maybe-check-ld: check-ld
+
+check-ld:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif ld
+
+.PHONY: install-ld maybe-install-ld
+maybe-install-ld:
+@if ld
+maybe-install-ld: install-ld
+
+install-ld: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif ld
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-ld info-ld
+maybe-info-ld:
+@if ld
+maybe-info-ld: info-ld
+
+info-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in etc" ; \
- (cd etc && \
+ echo "Doing info 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}" \
- installcheck) \
+ info) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-fastjar installcheck-fastjar
-maybe-installcheck-fastjar:
+.PHONY: maybe-dvi-ld dvi-ld
+maybe-dvi-ld:
+@if ld
+maybe-dvi-ld: dvi-ld
-installcheck-fastjar: \
- configure-fastjar
- @[ -f ./fastjar/Makefile ] || exit 0; \
+dvi-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in fastjar" ; \
- (cd fastjar && \
+ echo "Doing dvi 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}" \
- installcheck) \
+ dvi) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-fileutils installcheck-fileutils
-maybe-installcheck-fileutils:
+.PHONY: maybe-html-ld html-ld
+maybe-html-ld:
+@if ld
+maybe-html-ld: html-ld
-installcheck-fileutils: \
- configure-fileutils
- @[ -f ./fileutils/Makefile ] || exit 0; \
+html-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in fileutils" ; \
- (cd fileutils && \
+ echo "Doing html 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}" \
- installcheck) \
+ html) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-findutils installcheck-findutils
-maybe-installcheck-findutils:
+.PHONY: maybe-TAGS-ld TAGS-ld
+maybe-TAGS-ld:
+@if ld
+maybe-TAGS-ld: TAGS-ld
-installcheck-findutils: \
- configure-findutils
- @[ -f ./findutils/Makefile ] || exit 0; \
+TAGS-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in findutils" ; \
- (cd findutils && \
+ echo "Doing TAGS 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}" \
- installcheck) \
+ TAGS) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-find installcheck-find
-maybe-installcheck-find:
+.PHONY: maybe-install-info-ld install-info-ld
+maybe-install-info-ld:
+@if ld
+maybe-install-info-ld: install-info-ld
-installcheck-find: \
- configure-find
- @[ -f ./find/Makefile ] || exit 0; \
+install-info-ld: \
+ configure-ld \
+ info-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in find" ; \
- (cd find && \
+ echo "Doing install-info 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}" \
- installcheck) \
+ install-info) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-flex installcheck-flex
-maybe-installcheck-flex:
+.PHONY: maybe-install-html-ld install-html-ld
+maybe-install-html-ld:
+@if ld
+maybe-install-html-ld: install-html-ld
-installcheck-flex: \
- configure-flex
- @[ -f ./flex/Makefile ] || exit 0; \
+install-html-ld: \
+ configure-ld \
+ html-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in flex" ; \
- (cd flex && \
+ echo "Doing install-html 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}" \
- installcheck) \
+ install-html) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-gas installcheck-gas
-maybe-installcheck-gas:
+.PHONY: maybe-installcheck-ld installcheck-ld
+maybe-installcheck-ld:
+@if ld
+maybe-installcheck-ld: installcheck-ld
-installcheck-gas: \
- configure-gas
- @[ -f ./gas/Makefile ] || exit 0; \
+installcheck-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gas" ; \
- (cd gas && \
+ echo "Doing installcheck 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}" \
@@ -8939,241 +16948,709 @@ installcheck-gas: \
installcheck) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-gawk installcheck-gawk
-maybe-installcheck-gawk:
+.PHONY: maybe-mostlyclean-ld mostlyclean-ld
+maybe-mostlyclean-ld:
+@if ld
+maybe-mostlyclean-ld: mostlyclean-ld
-installcheck-gawk: \
- configure-gawk
- @[ -f ./gawk/Makefile ] || exit 0; \
+mostlyclean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gawk" ; \
- (cd gawk && \
+ echo "Doing mostlyclean 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}" \
- installcheck) \
+ mostlyclean) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-gettext installcheck-gettext
-maybe-installcheck-gettext:
+.PHONY: maybe-clean-ld clean-ld
+maybe-clean-ld:
+@if ld
+maybe-clean-ld: clean-ld
-installcheck-gettext: \
- configure-gettext
- @[ -f ./gettext/Makefile ] || exit 0; \
+clean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gettext" ; \
- (cd gettext && \
+ echo "Doing clean 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}" \
- installcheck) \
+ clean) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv
-maybe-installcheck-gnuserv:
+.PHONY: maybe-distclean-ld distclean-ld
+maybe-distclean-ld:
+@if ld
+maybe-distclean-ld: distclean-ld
-installcheck-gnuserv: \
- configure-gnuserv
- @[ -f ./gnuserv/Makefile ] || exit 0; \
+distclean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gnuserv" ; \
- (cd gnuserv && \
+ echo "Doing distclean 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}" \
- installcheck) \
+ distclean) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-gprof installcheck-gprof
-maybe-installcheck-gprof:
+.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld
+maybe-maintainer-clean-ld:
+@if ld
+maybe-maintainer-clean-ld: maintainer-clean-ld
-installcheck-gprof: \
- configure-gprof
- @[ -f ./gprof/Makefile ] || exit 0; \
+maintainer-clean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gprof" ; \
- (cd gprof && \
+ echo "Doing maintainer-clean 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}" \
- installcheck) \
+ maintainer-clean) \
|| exit 1
+@endif ld
-.PHONY: maybe-installcheck-gzip installcheck-gzip
-maybe-installcheck-gzip:
-installcheck-gzip: \
- configure-gzip
- @[ -f ./gzip/Makefile ] || exit 0; \
+
+.PHONY: configure-libcpp maybe-configure-libcpp
+maybe-configure-libcpp:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libcpp; \
+ cd "$(HOST_SUBDIR)/libcpp" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libcpp"; \
+ libsrcdir="$$s/libcpp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif libcpp
+
+
+
+.PHONY: configure-stage1-libcpp maybe-configure-stage1-libcpp
+maybe-configure-stage1-libcpp:
+@if libcpp-bootstrap
+maybe-configure-stage1-libcpp: configure-stage1-libcpp
+configure-stage1-libcpp:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libcpp"; \
+ libsrcdir="$$s/libcpp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif libcpp-bootstrap
+
+.PHONY: configure-stage2-libcpp maybe-configure-stage2-libcpp
+maybe-configure-stage2-libcpp:
+@if libcpp-bootstrap
+maybe-configure-stage2-libcpp: configure-stage2-libcpp
+configure-stage2-libcpp:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libcpp"; \
+ libsrcdir="$$s/libcpp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libcpp-bootstrap
+
+.PHONY: configure-stage3-libcpp maybe-configure-stage3-libcpp
+maybe-configure-stage3-libcpp:
+@if libcpp-bootstrap
+maybe-configure-stage3-libcpp: configure-stage3-libcpp
+configure-stage3-libcpp:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libcpp"; \
+ libsrcdir="$$s/libcpp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libcpp-bootstrap
+
+.PHONY: configure-stage4-libcpp maybe-configure-stage4-libcpp
+maybe-configure-stage4-libcpp:
+@if libcpp-bootstrap
+maybe-configure-stage4-libcpp: configure-stage4-libcpp
+configure-stage4-libcpp:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libcpp"; \
+ libsrcdir="$$s/libcpp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libcpp-bootstrap
+
+.PHONY: configure-stageprofile-libcpp maybe-configure-stageprofile-libcpp
+maybe-configure-stageprofile-libcpp:
+@if libcpp-bootstrap
+maybe-configure-stageprofile-libcpp: configure-stageprofile-libcpp
+configure-stageprofile-libcpp:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libcpp"; \
+ libsrcdir="$$s/libcpp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libcpp-bootstrap
+
+.PHONY: configure-stagefeedback-libcpp maybe-configure-stagefeedback-libcpp
+maybe-configure-stagefeedback-libcpp:
+@if libcpp-bootstrap
+maybe-configure-stagefeedback-libcpp: configure-stagefeedback-libcpp
+configure-stagefeedback-libcpp:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libcpp"; \
+ libsrcdir="$$s/libcpp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libcpp-bootstrap
+
+
+
+
+
+.PHONY: all-libcpp maybe-all-libcpp
+maybe-all-libcpp:
+@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) \
+ (cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libcpp))
+@endif libcpp
+
+
+
+.PHONY: all-stage1-libcpp maybe-all-stage1-libcpp
+.PHONY: clean-stage1-libcpp maybe-clean-stage1-libcpp
+maybe-all-stage1-libcpp:
+maybe-clean-stage1-libcpp:
+@if libcpp-bootstrap
+maybe-all-stage1-libcpp: all-stage1-libcpp
+all-stage1: all-stage1-libcpp
+TARGET-stage1-libcpp = $(TARGET-libcpp)
+all-stage1-libcpp: configure-stage1-libcpp
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libcpp && \
+ $(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; \
+ cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif libcpp-bootstrap
+
+
+.PHONY: all-stage2-libcpp maybe-all-stage2-libcpp
+.PHONY: clean-stage2-libcpp maybe-clean-stage2-libcpp
+maybe-all-stage2-libcpp:
+maybe-clean-stage2-libcpp:
+@if libcpp-bootstrap
+maybe-all-stage2-libcpp: all-stage2-libcpp
+all-stage2: all-stage2-libcpp
+TARGET-stage2-libcpp = $(TARGET-libcpp)
+all-stage2-libcpp: configure-stage2-libcpp
+ @[ $(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)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libcpp-bootstrap
+
+
+.PHONY: all-stage3-libcpp maybe-all-stage3-libcpp
+.PHONY: clean-stage3-libcpp maybe-clean-stage3-libcpp
+maybe-all-stage3-libcpp:
+maybe-clean-stage3-libcpp:
+@if libcpp-bootstrap
+maybe-all-stage3-libcpp: all-stage3-libcpp
+all-stage3: all-stage3-libcpp
+TARGET-stage3-libcpp = $(TARGET-libcpp)
+all-stage3-libcpp: configure-stage3-libcpp
+ @[ $(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)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libcpp-bootstrap
+
+
+.PHONY: all-stage4-libcpp maybe-all-stage4-libcpp
+.PHONY: clean-stage4-libcpp maybe-clean-stage4-libcpp
+maybe-all-stage4-libcpp:
+maybe-clean-stage4-libcpp:
+@if libcpp-bootstrap
+maybe-all-stage4-libcpp: all-stage4-libcpp
+all-stage4: all-stage4-libcpp
+TARGET-stage4-libcpp = $(TARGET-libcpp)
+all-stage4-libcpp: configure-stage4-libcpp
+ @[ $(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)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libcpp-bootstrap
+
+
+.PHONY: all-stageprofile-libcpp maybe-all-stageprofile-libcpp
+.PHONY: clean-stageprofile-libcpp maybe-clean-stageprofile-libcpp
+maybe-all-stageprofile-libcpp:
+maybe-clean-stageprofile-libcpp:
+@if libcpp-bootstrap
+maybe-all-stageprofile-libcpp: all-stageprofile-libcpp
+all-stageprofile: all-stageprofile-libcpp
+TARGET-stageprofile-libcpp = $(TARGET-libcpp)
+all-stageprofile-libcpp: configure-stageprofile-libcpp
+ @[ $(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)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif libcpp-bootstrap
+
+
+.PHONY: all-stagefeedback-libcpp maybe-all-stagefeedback-libcpp
+.PHONY: clean-stagefeedback-libcpp maybe-clean-stagefeedback-libcpp
+maybe-all-stagefeedback-libcpp:
+maybe-clean-stagefeedback-libcpp:
+@if libcpp-bootstrap
+maybe-all-stagefeedback-libcpp: all-stagefeedback-libcpp
+all-stagefeedback: all-stagefeedback-libcpp
+TARGET-stagefeedback-libcpp = $(TARGET-libcpp)
+all-stagefeedback-libcpp: configure-stagefeedback-libcpp
+ @[ $(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)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif libcpp-bootstrap
+
+
+
+
+
+.PHONY: check-libcpp maybe-check-libcpp
+maybe-check-libcpp:
+@if libcpp
+maybe-check-libcpp: check-libcpp
+
+check-libcpp:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif libcpp
+
+.PHONY: install-libcpp maybe-install-libcpp
+maybe-install-libcpp:
+@if libcpp
+maybe-install-libcpp: install-libcpp
+
+install-libcpp: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif libcpp
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-libcpp info-libcpp
+maybe-info-libcpp:
+@if libcpp
+maybe-info-libcpp: info-libcpp
+
+info-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gzip" ; \
- (cd gzip && \
+ echo "Doing info 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}" \
- installcheck) \
+ info) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-hello installcheck-hello
-maybe-installcheck-hello:
+.PHONY: maybe-dvi-libcpp dvi-libcpp
+maybe-dvi-libcpp:
+@if libcpp
+maybe-dvi-libcpp: dvi-libcpp
-installcheck-hello: \
- configure-hello
- @[ -f ./hello/Makefile ] || exit 0; \
+dvi-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in hello" ; \
- (cd hello && \
+ echo "Doing dvi 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}" \
- installcheck) \
+ dvi) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-indent installcheck-indent
-maybe-installcheck-indent:
+.PHONY: maybe-html-libcpp html-libcpp
+maybe-html-libcpp:
+@if libcpp
+maybe-html-libcpp: html-libcpp
-installcheck-indent: \
- configure-indent
- @[ -f ./indent/Makefile ] || exit 0; \
+html-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in indent" ; \
- (cd indent && \
+ echo "Doing html 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}" \
- installcheck) \
+ html) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-intl installcheck-intl
-maybe-installcheck-intl:
+.PHONY: maybe-TAGS-libcpp TAGS-libcpp
+maybe-TAGS-libcpp:
+@if libcpp
+maybe-TAGS-libcpp: TAGS-libcpp
-installcheck-intl: \
- configure-intl
- @[ -f ./intl/Makefile ] || exit 0; \
+TAGS-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in intl" ; \
- (cd intl && \
+ echo "Doing TAGS 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}" \
- installcheck) \
+ TAGS) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-tcl installcheck-tcl
-maybe-installcheck-tcl:
+.PHONY: maybe-install-info-libcpp install-info-libcpp
+maybe-install-info-libcpp:
+@if libcpp
+maybe-install-info-libcpp: install-info-libcpp
-installcheck-tcl: \
- configure-tcl
- @[ -f ./tcl/Makefile ] || exit 0; \
+install-info-libcpp: \
+ configure-libcpp \
+ info-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in tcl" ; \
- (cd tcl && \
+ echo "Doing install-info 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}" \
- installcheck) \
+ install-info) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-itcl installcheck-itcl
-maybe-installcheck-itcl:
+.PHONY: maybe-install-html-libcpp install-html-libcpp
+maybe-install-html-libcpp:
+@if libcpp
+maybe-install-html-libcpp: install-html-libcpp
-installcheck-itcl: \
- configure-itcl
- @[ -f ./itcl/Makefile ] || exit 0; \
+install-html-libcpp: \
+ configure-libcpp \
+ html-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in itcl" ; \
- (cd itcl && \
+ echo "Doing install-html 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}" \
- installcheck) \
+ install-html) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-ld installcheck-ld
-maybe-installcheck-ld:
+.PHONY: maybe-installcheck-libcpp installcheck-libcpp
+maybe-installcheck-libcpp:
+@if libcpp
+maybe-installcheck-libcpp: installcheck-libcpp
-installcheck-ld: \
- configure-ld
- @[ -f ./ld/Makefile ] || exit 0; \
+installcheck-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in ld" ; \
- (cd ld && \
+ echo "Doing installcheck 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}" \
@@ -9181,241 +17658,709 @@ installcheck-ld: \
installcheck) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-libgui installcheck-libgui
-maybe-installcheck-libgui:
+.PHONY: maybe-mostlyclean-libcpp mostlyclean-libcpp
+maybe-mostlyclean-libcpp:
+@if libcpp
+maybe-mostlyclean-libcpp: mostlyclean-libcpp
-installcheck-libgui: \
- configure-libgui
- @[ -f ./libgui/Makefile ] || exit 0; \
+mostlyclean-libcpp:
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libgui" ; \
- (cd libgui && \
+ echo "Doing mostlyclean 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}" \
- installcheck) \
+ mostlyclean) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-libiberty installcheck-libiberty
-maybe-installcheck-libiberty:
+.PHONY: maybe-clean-libcpp clean-libcpp
+maybe-clean-libcpp:
+@if libcpp
+maybe-clean-libcpp: clean-libcpp
-installcheck-libiberty: \
- configure-libiberty
- @[ -f ./libiberty/Makefile ] || exit 0; \
+clean-libcpp:
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libiberty" ; \
- (cd libiberty && \
+ echo "Doing clean 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}" \
- installcheck) \
+ clean) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-libtool installcheck-libtool
-maybe-installcheck-libtool:
+.PHONY: maybe-distclean-libcpp distclean-libcpp
+maybe-distclean-libcpp:
+@if libcpp
+maybe-distclean-libcpp: distclean-libcpp
-installcheck-libtool: \
- configure-libtool
- @[ -f ./libtool/Makefile ] || exit 0; \
+distclean-libcpp:
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libtool" ; \
- (cd libtool && \
+ echo "Doing distclean 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}" \
- installcheck) \
+ distclean) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-m4 installcheck-m4
-maybe-installcheck-m4:
+.PHONY: maybe-maintainer-clean-libcpp maintainer-clean-libcpp
+maybe-maintainer-clean-libcpp:
+@if libcpp
+maybe-maintainer-clean-libcpp: maintainer-clean-libcpp
-installcheck-m4: \
- configure-m4
- @[ -f ./m4/Makefile ] || exit 0; \
+maintainer-clean-libcpp:
+ @[ -f ./libcpp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in m4" ; \
- (cd m4 && \
+ echo "Doing maintainer-clean 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}" \
- installcheck) \
+ maintainer-clean) \
|| exit 1
+@endif libcpp
-.PHONY: maybe-installcheck-make installcheck-make
-maybe-installcheck-make:
-installcheck-make: \
- configure-make
- @[ -f ./make/Makefile ] || exit 0; \
+
+.PHONY: configure-libdecnumber maybe-configure-libdecnumber
+maybe-configure-libdecnumber:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libdecnumber; \
+ cd "$(HOST_SUBDIR)/libdecnumber" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
+ libsrcdir="$$s/libdecnumber"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif libdecnumber
+
+
+
+.PHONY: configure-stage1-libdecnumber maybe-configure-stage1-libdecnumber
+maybe-configure-stage1-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-configure-stage1-libdecnumber: configure-stage1-libdecnumber
+configure-stage1-libdecnumber:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
+ libsrcdir="$$s/libdecnumber"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif libdecnumber-bootstrap
+
+.PHONY: configure-stage2-libdecnumber maybe-configure-stage2-libdecnumber
+maybe-configure-stage2-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-configure-stage2-libdecnumber: configure-stage2-libdecnumber
+configure-stage2-libdecnumber:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
+ libsrcdir="$$s/libdecnumber"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libdecnumber-bootstrap
+
+.PHONY: configure-stage3-libdecnumber maybe-configure-stage3-libdecnumber
+maybe-configure-stage3-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-configure-stage3-libdecnumber: configure-stage3-libdecnumber
+configure-stage3-libdecnumber:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
+ libsrcdir="$$s/libdecnumber"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libdecnumber-bootstrap
+
+.PHONY: configure-stage4-libdecnumber maybe-configure-stage4-libdecnumber
+maybe-configure-stage4-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-configure-stage4-libdecnumber: configure-stage4-libdecnumber
+configure-stage4-libdecnumber:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
+ libsrcdir="$$s/libdecnumber"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libdecnumber-bootstrap
+
+.PHONY: configure-stageprofile-libdecnumber maybe-configure-stageprofile-libdecnumber
+maybe-configure-stageprofile-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-configure-stageprofile-libdecnumber: configure-stageprofile-libdecnumber
+configure-stageprofile-libdecnumber:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
+ libsrcdir="$$s/libdecnumber"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libdecnumber-bootstrap
+
+.PHONY: configure-stagefeedback-libdecnumber maybe-configure-stagefeedback-libdecnumber
+maybe-configure-stagefeedback-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-configure-stagefeedback-libdecnumber: configure-stagefeedback-libdecnumber
+configure-stagefeedback-libdecnumber:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
+ libsrcdir="$$s/libdecnumber"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libdecnumber-bootstrap
+
+
+
+
+
+.PHONY: all-libdecnumber maybe-all-libdecnumber
+maybe-all-libdecnumber:
+@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) \
+ (cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libdecnumber))
+@endif libdecnumber
+
+
+
+.PHONY: all-stage1-libdecnumber maybe-all-stage1-libdecnumber
+.PHONY: clean-stage1-libdecnumber maybe-clean-stage1-libdecnumber
+maybe-all-stage1-libdecnumber:
+maybe-clean-stage1-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-all-stage1-libdecnumber: all-stage1-libdecnumber
+all-stage1: all-stage1-libdecnumber
+TARGET-stage1-libdecnumber = $(TARGET-libdecnumber)
+all-stage1-libdecnumber: configure-stage1-libdecnumber
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+ $(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; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif libdecnumber-bootstrap
+
+
+.PHONY: all-stage2-libdecnumber maybe-all-stage2-libdecnumber
+.PHONY: clean-stage2-libdecnumber maybe-clean-stage2-libdecnumber
+maybe-all-stage2-libdecnumber:
+maybe-clean-stage2-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-all-stage2-libdecnumber: all-stage2-libdecnumber
+all-stage2: all-stage2-libdecnumber
+TARGET-stage2-libdecnumber = $(TARGET-libdecnumber)
+all-stage2-libdecnumber: configure-stage2-libdecnumber
+ @[ $(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)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libdecnumber-bootstrap
+
+
+.PHONY: all-stage3-libdecnumber maybe-all-stage3-libdecnumber
+.PHONY: clean-stage3-libdecnumber maybe-clean-stage3-libdecnumber
+maybe-all-stage3-libdecnumber:
+maybe-clean-stage3-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-all-stage3-libdecnumber: all-stage3-libdecnumber
+all-stage3: all-stage3-libdecnumber
+TARGET-stage3-libdecnumber = $(TARGET-libdecnumber)
+all-stage3-libdecnumber: configure-stage3-libdecnumber
+ @[ $(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)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libdecnumber-bootstrap
+
+
+.PHONY: all-stage4-libdecnumber maybe-all-stage4-libdecnumber
+.PHONY: clean-stage4-libdecnumber maybe-clean-stage4-libdecnumber
+maybe-all-stage4-libdecnumber:
+maybe-clean-stage4-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-all-stage4-libdecnumber: all-stage4-libdecnumber
+all-stage4: all-stage4-libdecnumber
+TARGET-stage4-libdecnumber = $(TARGET-libdecnumber)
+all-stage4-libdecnumber: configure-stage4-libdecnumber
+ @[ $(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)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libdecnumber-bootstrap
+
+
+.PHONY: all-stageprofile-libdecnumber maybe-all-stageprofile-libdecnumber
+.PHONY: clean-stageprofile-libdecnumber maybe-clean-stageprofile-libdecnumber
+maybe-all-stageprofile-libdecnumber:
+maybe-clean-stageprofile-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-all-stageprofile-libdecnumber: all-stageprofile-libdecnumber
+all-stageprofile: all-stageprofile-libdecnumber
+TARGET-stageprofile-libdecnumber = $(TARGET-libdecnumber)
+all-stageprofile-libdecnumber: configure-stageprofile-libdecnumber
+ @[ $(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)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif libdecnumber-bootstrap
+
+
+.PHONY: all-stagefeedback-libdecnumber maybe-all-stagefeedback-libdecnumber
+.PHONY: clean-stagefeedback-libdecnumber maybe-clean-stagefeedback-libdecnumber
+maybe-all-stagefeedback-libdecnumber:
+maybe-clean-stagefeedback-libdecnumber:
+@if libdecnumber-bootstrap
+maybe-all-stagefeedback-libdecnumber: all-stagefeedback-libdecnumber
+all-stagefeedback: all-stagefeedback-libdecnumber
+TARGET-stagefeedback-libdecnumber = $(TARGET-libdecnumber)
+all-stagefeedback-libdecnumber: configure-stagefeedback-libdecnumber
+ @[ $(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)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif libdecnumber-bootstrap
+
+
+
+
+
+.PHONY: check-libdecnumber maybe-check-libdecnumber
+maybe-check-libdecnumber:
+@if libdecnumber
+maybe-check-libdecnumber: check-libdecnumber
+
+check-libdecnumber:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif libdecnumber
+
+.PHONY: install-libdecnumber maybe-install-libdecnumber
+maybe-install-libdecnumber:
+@if libdecnumber
+maybe-install-libdecnumber: install-libdecnumber
+
+install-libdecnumber: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif libdecnumber
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-libdecnumber info-libdecnumber
+maybe-info-libdecnumber:
+@if libdecnumber
+maybe-info-libdecnumber: info-libdecnumber
+
+info-libdecnumber: \
+ configure-libdecnumber
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in make" ; \
- (cd make && \
+ echo "Doing info 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}" \
- installcheck) \
+ info) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc
-maybe-installcheck-mmalloc:
+.PHONY: maybe-dvi-libdecnumber dvi-libdecnumber
+maybe-dvi-libdecnumber:
+@if libdecnumber
+maybe-dvi-libdecnumber: dvi-libdecnumber
-installcheck-mmalloc: \
- configure-mmalloc
- @[ -f ./mmalloc/Makefile ] || exit 0; \
+dvi-libdecnumber: \
+ configure-libdecnumber
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in mmalloc" ; \
- (cd mmalloc && \
+ echo "Doing dvi 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}" \
- installcheck) \
+ dvi) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-patch installcheck-patch
-maybe-installcheck-patch:
+.PHONY: maybe-html-libdecnumber html-libdecnumber
+maybe-html-libdecnumber:
+@if libdecnumber
+maybe-html-libdecnumber: html-libdecnumber
-installcheck-patch: \
- configure-patch
- @[ -f ./patch/Makefile ] || exit 0; \
+html-libdecnumber: \
+ configure-libdecnumber
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in patch" ; \
- (cd patch && \
+ echo "Doing html 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}" \
- installcheck) \
+ html) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-perl installcheck-perl
-maybe-installcheck-perl:
+.PHONY: maybe-TAGS-libdecnumber TAGS-libdecnumber
+maybe-TAGS-libdecnumber:
+@if libdecnumber
+maybe-TAGS-libdecnumber: TAGS-libdecnumber
-installcheck-perl: \
- configure-perl
- @[ -f ./perl/Makefile ] || exit 0; \
+TAGS-libdecnumber: \
+ configure-libdecnumber
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in perl" ; \
- (cd perl && \
+ echo "Doing TAGS 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}" \
- installcheck) \
+ TAGS) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-prms installcheck-prms
-maybe-installcheck-prms:
+.PHONY: maybe-install-info-libdecnumber install-info-libdecnumber
+maybe-install-info-libdecnumber:
+@if libdecnumber
+maybe-install-info-libdecnumber: install-info-libdecnumber
-installcheck-prms: \
- configure-prms
- @[ -f ./prms/Makefile ] || exit 0; \
+install-info-libdecnumber: \
+ configure-libdecnumber \
+ info-libdecnumber
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in prms" ; \
- (cd prms && \
+ echo "Doing install-info 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}" \
- installcheck) \
+ install-info) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-rcs installcheck-rcs
-maybe-installcheck-rcs:
+.PHONY: maybe-install-html-libdecnumber install-html-libdecnumber
+maybe-install-html-libdecnumber:
+@if libdecnumber
+maybe-install-html-libdecnumber: install-html-libdecnumber
-installcheck-rcs: \
- configure-rcs
- @[ -f ./rcs/Makefile ] || exit 0; \
+install-html-libdecnumber: \
+ configure-libdecnumber \
+ html-libdecnumber
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in rcs" ; \
- (cd rcs && \
+ echo "Doing install-html 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}" \
- installcheck) \
+ install-html) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-readline installcheck-readline
-maybe-installcheck-readline:
+.PHONY: maybe-installcheck-libdecnumber installcheck-libdecnumber
+maybe-installcheck-libdecnumber:
+@if libdecnumber
+maybe-installcheck-libdecnumber: installcheck-libdecnumber
-installcheck-readline: \
- configure-readline
- @[ -f ./readline/Makefile ] || exit 0; \
+installcheck-libdecnumber: \
+ configure-libdecnumber
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in readline" ; \
- (cd readline && \
+ echo "Doing installcheck 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}" \
@@ -9423,241 +18368,359 @@ installcheck-readline: \
installcheck) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-release installcheck-release
-maybe-installcheck-release:
+.PHONY: maybe-mostlyclean-libdecnumber mostlyclean-libdecnumber
+maybe-mostlyclean-libdecnumber:
+@if libdecnumber
+maybe-mostlyclean-libdecnumber: mostlyclean-libdecnumber
-installcheck-release: \
- configure-release
- @[ -f ./release/Makefile ] || exit 0; \
+mostlyclean-libdecnumber:
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in release" ; \
- (cd release && \
+ echo "Doing mostlyclean 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}" \
- installcheck) \
+ mostlyclean) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-recode installcheck-recode
-maybe-installcheck-recode:
+.PHONY: maybe-clean-libdecnumber clean-libdecnumber
+maybe-clean-libdecnumber:
+@if libdecnumber
+maybe-clean-libdecnumber: clean-libdecnumber
-installcheck-recode: \
- configure-recode
- @[ -f ./recode/Makefile ] || exit 0; \
+clean-libdecnumber:
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in recode" ; \
- (cd recode && \
+ echo "Doing clean 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}" \
- installcheck) \
+ clean) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-sed installcheck-sed
-maybe-installcheck-sed:
+.PHONY: maybe-distclean-libdecnumber distclean-libdecnumber
+maybe-distclean-libdecnumber:
+@if libdecnumber
+maybe-distclean-libdecnumber: distclean-libdecnumber
-installcheck-sed: \
- configure-sed
- @[ -f ./sed/Makefile ] || exit 0; \
+distclean-libdecnumber:
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in sed" ; \
- (cd sed && \
+ echo "Doing distclean 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}" \
- installcheck) \
+ distclean) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-send-pr installcheck-send-pr
-maybe-installcheck-send-pr:
+.PHONY: maybe-maintainer-clean-libdecnumber maintainer-clean-libdecnumber
+maybe-maintainer-clean-libdecnumber:
+@if libdecnumber
+maybe-maintainer-clean-libdecnumber: maintainer-clean-libdecnumber
-installcheck-send-pr: \
- configure-send-pr
- @[ -f ./send-pr/Makefile ] || exit 0; \
+maintainer-clean-libdecnumber:
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in send-pr" ; \
- (cd send-pr && \
+ echo "Doing maintainer-clean 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}" \
- installcheck) \
+ maintainer-clean) \
|| exit 1
+@endif libdecnumber
-.PHONY: maybe-installcheck-shellutils installcheck-shellutils
-maybe-installcheck-shellutils:
-installcheck-shellutils: \
- configure-shellutils
- @[ -f ./shellutils/Makefile ] || exit 0; \
+
+.PHONY: configure-libgui maybe-configure-libgui
+maybe-configure-libgui:
+@if libgui
+maybe-configure-libgui: configure-libgui
+configure-libgui:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libgui/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libgui ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libgui; \
+ cd "$(HOST_SUBDIR)/libgui" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libgui/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libgui"; \
+ libsrcdir="$$s/libgui"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif libgui
+
+
+
+
+
+.PHONY: all-libgui maybe-all-libgui
+maybe-all-libgui:
+@if libgui
+TARGET-libgui=all
+maybe-all-libgui: all-libgui
+all-libgui: configure-libgui
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libgui && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libgui))
+@endif libgui
+
+
+
+
+.PHONY: check-libgui maybe-check-libgui
+maybe-check-libgui:
+@if libgui
+maybe-check-libgui: check-libgui
+
+check-libgui:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libgui && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif libgui
+
+.PHONY: install-libgui maybe-install-libgui
+maybe-install-libgui:
+@if libgui
+maybe-install-libgui: install-libgui
+
+install-libgui: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libgui && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif libgui
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-libgui info-libgui
+maybe-info-libgui:
+@if libgui
+maybe-info-libgui: info-libgui
+
+info-libgui: \
+ configure-libgui
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in shellutils" ; \
- (cd shellutils && \
+ echo "Doing info 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}" \
- installcheck) \
+ info) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-sid installcheck-sid
-maybe-installcheck-sid:
+.PHONY: maybe-dvi-libgui dvi-libgui
+maybe-dvi-libgui:
+@if libgui
+maybe-dvi-libgui: dvi-libgui
-installcheck-sid: \
- configure-sid
- @[ -f ./sid/Makefile ] || exit 0; \
+dvi-libgui: \
+ configure-libgui
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in sid" ; \
- (cd sid && \
+ echo "Doing dvi 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}" \
- installcheck) \
+ dvi) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-sim installcheck-sim
-maybe-installcheck-sim:
+.PHONY: maybe-html-libgui html-libgui
+maybe-html-libgui:
+@if libgui
+maybe-html-libgui: html-libgui
-installcheck-sim: \
- configure-sim
- @[ -f ./sim/Makefile ] || exit 0; \
+html-libgui: \
+ configure-libgui
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in sim" ; \
- (cd sim && \
+ echo "Doing html 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}" \
- installcheck) \
+ html) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-tar installcheck-tar
-maybe-installcheck-tar:
+.PHONY: maybe-TAGS-libgui TAGS-libgui
+maybe-TAGS-libgui:
+@if libgui
+maybe-TAGS-libgui: TAGS-libgui
-installcheck-tar: \
- configure-tar
- @[ -f ./tar/Makefile ] || exit 0; \
+TAGS-libgui: \
+ configure-libgui
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in tar" ; \
- (cd tar && \
+ echo "Doing TAGS 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}" \
- installcheck) \
+ TAGS) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-texinfo installcheck-texinfo
-maybe-installcheck-texinfo:
+.PHONY: maybe-install-info-libgui install-info-libgui
+maybe-install-info-libgui:
+@if libgui
+maybe-install-info-libgui: install-info-libgui
-installcheck-texinfo: \
- configure-texinfo
- @[ -f ./texinfo/Makefile ] || exit 0; \
+install-info-libgui: \
+ configure-libgui \
+ info-libgui
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in texinfo" ; \
- (cd texinfo && \
+ echo "Doing install-info 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}" \
- installcheck) \
+ install-info) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-textutils installcheck-textutils
-maybe-installcheck-textutils:
+.PHONY: maybe-install-html-libgui install-html-libgui
+maybe-install-html-libgui:
+@if libgui
+maybe-install-html-libgui: install-html-libgui
-installcheck-textutils: \
- configure-textutils
- @[ -f ./textutils/Makefile ] || exit 0; \
+install-html-libgui: \
+ configure-libgui \
+ html-libgui
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in textutils" ; \
- (cd textutils && \
+ echo "Doing install-html 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}" \
- installcheck) \
+ install-html) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-time installcheck-time
-maybe-installcheck-time:
+.PHONY: maybe-installcheck-libgui installcheck-libgui
+maybe-installcheck-libgui:
+@if libgui
+maybe-installcheck-libgui: installcheck-libgui
-installcheck-time: \
- configure-time
- @[ -f ./time/Makefile ] || exit 0; \
+installcheck-libgui: \
+ configure-libgui
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in time" ; \
- (cd time && \
+ echo "Doing installcheck 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}" \
@@ -9665,241 +18728,713 @@ installcheck-time: \
installcheck) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-uudecode installcheck-uudecode
-maybe-installcheck-uudecode:
+.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui
+maybe-mostlyclean-libgui:
+@if libgui
+maybe-mostlyclean-libgui: mostlyclean-libgui
-installcheck-uudecode: \
- configure-uudecode
- @[ -f ./uudecode/Makefile ] || exit 0; \
+mostlyclean-libgui:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in uudecode" ; \
- (cd uudecode && \
+ echo "Doing mostlyclean 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}" \
- installcheck) \
+ mostlyclean) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-wdiff installcheck-wdiff
-maybe-installcheck-wdiff:
+.PHONY: maybe-clean-libgui clean-libgui
+maybe-clean-libgui:
+@if libgui
+maybe-clean-libgui: clean-libgui
-installcheck-wdiff: \
- configure-wdiff
- @[ -f ./wdiff/Makefile ] || exit 0; \
+clean-libgui:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in wdiff" ; \
- (cd wdiff && \
+ echo "Doing clean 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}" \
- installcheck) \
+ clean) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-zip installcheck-zip
-maybe-installcheck-zip:
+.PHONY: maybe-distclean-libgui distclean-libgui
+maybe-distclean-libgui:
+@if libgui
+maybe-distclean-libgui: distclean-libgui
-installcheck-zip: \
- configure-zip
- @[ -f ./zip/Makefile ] || exit 0; \
+distclean-libgui:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in zip" ; \
- (cd zip && \
+ echo "Doing distclean 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}" \
- installcheck) \
+ distclean) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-zlib installcheck-zlib
-maybe-installcheck-zlib:
+.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui
+maybe-maintainer-clean-libgui:
+@if libgui
+maybe-maintainer-clean-libgui: maintainer-clean-libgui
-installcheck-zlib: \
- configure-zlib
- @[ -f ./zlib/Makefile ] || exit 0; \
+maintainer-clean-libgui:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in zlib" ; \
- (cd zlib && \
+ echo "Doing maintainer-clean 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}" \
- installcheck) \
+ maintainer-clean) \
|| exit 1
+@endif libgui
-.PHONY: maybe-installcheck-gdb installcheck-gdb
-maybe-installcheck-gdb:
-installcheck-gdb: \
- configure-gdb
- @[ -f ./gdb/Makefile ] || exit 0; \
+
+.PHONY: configure-libiberty maybe-configure-libiberty
+maybe-configure-libiberty:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libiberty; \
+ cd "$(HOST_SUBDIR)/libiberty" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif libiberty
+
+
+
+.PHONY: configure-stage1-libiberty maybe-configure-stage1-libiberty
+maybe-configure-stage1-libiberty:
+@if libiberty-bootstrap
+maybe-configure-stage1-libiberty: configure-stage1-libiberty
+configure-stage1-libiberty:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif libiberty-bootstrap
+
+.PHONY: configure-stage2-libiberty maybe-configure-stage2-libiberty
+maybe-configure-stage2-libiberty:
+@if libiberty-bootstrap
+maybe-configure-stage2-libiberty: configure-stage2-libiberty
+configure-stage2-libiberty:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libiberty-bootstrap
+
+.PHONY: configure-stage3-libiberty maybe-configure-stage3-libiberty
+maybe-configure-stage3-libiberty:
+@if libiberty-bootstrap
+maybe-configure-stage3-libiberty: configure-stage3-libiberty
+configure-stage3-libiberty:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libiberty-bootstrap
+
+.PHONY: configure-stage4-libiberty maybe-configure-stage4-libiberty
+maybe-configure-stage4-libiberty:
+@if libiberty-bootstrap
+maybe-configure-stage4-libiberty: configure-stage4-libiberty
+configure-stage4-libiberty:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libiberty-bootstrap
+
+.PHONY: configure-stageprofile-libiberty maybe-configure-stageprofile-libiberty
+maybe-configure-stageprofile-libiberty:
+@if libiberty-bootstrap
+maybe-configure-stageprofile-libiberty: configure-stageprofile-libiberty
+configure-stageprofile-libiberty:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libiberty-bootstrap
+
+.PHONY: configure-stagefeedback-libiberty maybe-configure-stagefeedback-libiberty
+maybe-configure-stagefeedback-libiberty:
+@if libiberty-bootstrap
+maybe-configure-stagefeedback-libiberty: configure-stagefeedback-libiberty
+configure-stagefeedback-libiberty:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif libiberty-bootstrap
+
+
+
+
+
+.PHONY: all-libiberty maybe-all-libiberty
+maybe-all-libiberty:
+@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) \
+ (cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libiberty))
+@endif libiberty
+
+
+
+.PHONY: all-stage1-libiberty maybe-all-stage1-libiberty
+.PHONY: clean-stage1-libiberty maybe-clean-stage1-libiberty
+maybe-all-stage1-libiberty:
+maybe-clean-stage1-libiberty:
+@if libiberty-bootstrap
+maybe-all-stage1-libiberty: all-stage1-libiberty
+all-stage1: all-stage1-libiberty
+TARGET-stage1-libiberty = $(TARGET-libiberty)
+all-stage1-libiberty: configure-stage1-libiberty
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty && \
+ $(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; \
+ cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif libiberty-bootstrap
+
+
+.PHONY: all-stage2-libiberty maybe-all-stage2-libiberty
+.PHONY: clean-stage2-libiberty maybe-clean-stage2-libiberty
+maybe-all-stage2-libiberty:
+maybe-clean-stage2-libiberty:
+@if libiberty-bootstrap
+maybe-all-stage2-libiberty: all-stage2-libiberty
+all-stage2: all-stage2-libiberty
+TARGET-stage2-libiberty = $(TARGET-libiberty)
+all-stage2-libiberty: configure-stage2-libiberty
+ @[ $(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)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libiberty-bootstrap
+
+
+.PHONY: all-stage3-libiberty maybe-all-stage3-libiberty
+.PHONY: clean-stage3-libiberty maybe-clean-stage3-libiberty
+maybe-all-stage3-libiberty:
+maybe-clean-stage3-libiberty:
+@if libiberty-bootstrap
+maybe-all-stage3-libiberty: all-stage3-libiberty
+all-stage3: all-stage3-libiberty
+TARGET-stage3-libiberty = $(TARGET-libiberty)
+all-stage3-libiberty: configure-stage3-libiberty
+ @[ $(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)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libiberty-bootstrap
+
+
+.PHONY: all-stage4-libiberty maybe-all-stage4-libiberty
+.PHONY: clean-stage4-libiberty maybe-clean-stage4-libiberty
+maybe-all-stage4-libiberty:
+maybe-clean-stage4-libiberty:
+@if libiberty-bootstrap
+maybe-all-stage4-libiberty: all-stage4-libiberty
+all-stage4: all-stage4-libiberty
+TARGET-stage4-libiberty = $(TARGET-libiberty)
+all-stage4-libiberty: configure-stage4-libiberty
+ @[ $(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)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif libiberty-bootstrap
+
+
+.PHONY: all-stageprofile-libiberty maybe-all-stageprofile-libiberty
+.PHONY: clean-stageprofile-libiberty maybe-clean-stageprofile-libiberty
+maybe-all-stageprofile-libiberty:
+maybe-clean-stageprofile-libiberty:
+@if libiberty-bootstrap
+maybe-all-stageprofile-libiberty: all-stageprofile-libiberty
+all-stageprofile: all-stageprofile-libiberty
+TARGET-stageprofile-libiberty = $(TARGET-libiberty)
+all-stageprofile-libiberty: configure-stageprofile-libiberty
+ @[ $(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)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif libiberty-bootstrap
+
+
+.PHONY: all-stagefeedback-libiberty maybe-all-stagefeedback-libiberty
+.PHONY: clean-stagefeedback-libiberty maybe-clean-stagefeedback-libiberty
+maybe-all-stagefeedback-libiberty:
+maybe-clean-stagefeedback-libiberty:
+@if libiberty-bootstrap
+maybe-all-stagefeedback-libiberty: all-stagefeedback-libiberty
+all-stagefeedback: all-stagefeedback-libiberty
+TARGET-stagefeedback-libiberty = $(TARGET-libiberty)
+all-stagefeedback-libiberty: configure-stagefeedback-libiberty
+ @[ $(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)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif libiberty-bootstrap
+
+
+
+
+
+.PHONY: check-libiberty maybe-check-libiberty
+maybe-check-libiberty:
+@if libiberty
+maybe-check-libiberty: check-libiberty
+
+check-libiberty:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif libiberty
+
+.PHONY: install-libiberty maybe-install-libiberty
+maybe-install-libiberty:
+@if libiberty
+maybe-install-libiberty: install-libiberty
+
+install-libiberty: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif libiberty
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-libiberty info-libiberty
+maybe-info-libiberty:
+@if libiberty
+maybe-info-libiberty: info-libiberty
+
+info-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gdb" ; \
- (cd gdb && \
+ echo "Doing info 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}" \
- installcheck) \
+ info) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-expect installcheck-expect
-maybe-installcheck-expect:
+.PHONY: maybe-dvi-libiberty dvi-libiberty
+maybe-dvi-libiberty:
+@if libiberty
+maybe-dvi-libiberty: dvi-libiberty
-installcheck-expect: \
- configure-expect
- @[ -f ./expect/Makefile ] || exit 0; \
+dvi-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in expect" ; \
- (cd expect && \
+ echo "Doing dvi 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}" \
- installcheck) \
+ dvi) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-guile installcheck-guile
-maybe-installcheck-guile:
+.PHONY: maybe-html-libiberty html-libiberty
+maybe-html-libiberty:
+@if libiberty
+maybe-html-libiberty: html-libiberty
-installcheck-guile: \
- configure-guile
- @[ -f ./guile/Makefile ] || exit 0; \
+html-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in guile" ; \
- (cd guile && \
+ echo "Doing html 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}" \
- installcheck) \
+ html) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-tk installcheck-tk
-maybe-installcheck-tk:
+.PHONY: maybe-TAGS-libiberty TAGS-libiberty
+maybe-TAGS-libiberty:
+@if libiberty
+maybe-TAGS-libiberty: TAGS-libiberty
-installcheck-tk: \
- configure-tk
- @[ -f ./tk/Makefile ] || exit 0; \
+TAGS-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in tk" ; \
- (cd tk && \
+ echo "Doing TAGS 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}" \
- installcheck) \
+ TAGS) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-tix installcheck-tix
-maybe-installcheck-tix:
+.PHONY: maybe-install-info-libiberty install-info-libiberty
+maybe-install-info-libiberty:
+@if libiberty
+maybe-install-info-libiberty: install-info-libiberty
-installcheck-tix: \
- configure-tix
- @[ -f ./tix/Makefile ] || exit 0; \
+install-info-libiberty: \
+ configure-libiberty \
+ info-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in tix" ; \
- (cd tix && \
+ echo "Doing install-info 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}" \
- installcheck) \
+ install-info) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap
-maybe-installcheck-libtermcap:
+.PHONY: maybe-install-html-libiberty install-html-libiberty
+maybe-install-html-libiberty:
+@if libiberty
+maybe-install-html-libiberty: install-html-libiberty
-installcheck-libtermcap: \
- configure-libtermcap
- @[ -f ./libtermcap/Makefile ] || exit 0; \
+install-html-libiberty: \
+ configure-libiberty \
+ html-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libtermcap" ; \
- (cd libtermcap && \
+ echo "Doing install-html 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}" \
- installcheck) \
+ install-html) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-utils installcheck-utils
-maybe-installcheck-utils:
+.PHONY: maybe-installcheck-libiberty installcheck-libiberty
+maybe-installcheck-libiberty:
+@if libiberty
+maybe-installcheck-libiberty: installcheck-libiberty
-installcheck-utils: \
- configure-utils
- @[ -f ./utils/Makefile ] || exit 0; \
+installcheck-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in utils" ; \
- (cd utils && \
+ echo "Doing installcheck 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}" \
@@ -9907,244 +19442,359 @@ installcheck-utils: \
installcheck) \
|| exit 1
+@endif libiberty
+.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty
+maybe-mostlyclean-libiberty:
+@if libiberty
+maybe-mostlyclean-libiberty: mostlyclean-libiberty
-# Target modules.
-
-.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3
-maybe-installcheck-target-libstdc++-v3:
-
-installcheck-target-libstdc++-v3: \
- configure-target-libstdc++-v3
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+mostlyclean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ echo "Doing mostlyclean 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}" \
- installcheck) \
+ mostlyclean) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib
-maybe-installcheck-target-newlib:
+.PHONY: maybe-clean-libiberty clean-libiberty
+maybe-clean-libiberty:
+@if libiberty
+maybe-clean-libiberty: clean-libiberty
-installcheck-target-newlib: \
- configure-target-newlib
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+clean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ echo "Doing clean 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}" \
- installcheck) \
+ clean) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-target-libf2c installcheck-target-libf2c
-maybe-installcheck-target-libf2c:
+.PHONY: maybe-distclean-libiberty distclean-libiberty
+maybe-distclean-libiberty:
+@if libiberty
+maybe-distclean-libiberty: distclean-libiberty
-installcheck-target-libf2c: \
- configure-target-libf2c
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+distclean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ echo "Doing distclean 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}" \
- installcheck) \
+ distclean) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc
-maybe-installcheck-target-libobjc:
+.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty
+maybe-maintainer-clean-libiberty:
+@if libiberty
+maybe-maintainer-clean-libiberty: maintainer-clean-libiberty
-installcheck-target-libobjc: \
- configure-target-libobjc
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+maintainer-clean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
+ echo "Doing maintainer-clean 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}" \
- installcheck) \
+ maintainer-clean) \
|| exit 1
+@endif libiberty
-.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap
-maybe-installcheck-target-libtermcap:
-installcheck-target-libtermcap: \
- configure-target-libtermcap
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+
+.PHONY: configure-libtool maybe-configure-libtool
+maybe-configure-libtool:
+@if libtool
+maybe-configure-libtool: configure-libtool
+configure-libtool:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libtool/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libtool ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libtool; \
+ cd "$(HOST_SUBDIR)/libtool" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libtool/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libtool"; \
+ libsrcdir="$$s/libtool"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif libtool
+
+
+
+
+
+.PHONY: all-libtool maybe-all-libtool
+maybe-all-libtool:
+@if libtool
+TARGET-libtool=all
+maybe-all-libtool: all-libtool
+all-libtool: configure-libtool
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libtool && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libtool))
+@endif libtool
+
+
+
+
+.PHONY: check-libtool maybe-check-libtool
+maybe-check-libtool:
+@if libtool
+maybe-check-libtool: check-libtool
+
+check-libtool:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libtool && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif libtool
+
+.PHONY: install-libtool maybe-install-libtool
+maybe-install-libtool:
+@if libtool
+maybe-install-libtool: install-libtool
+
+install-libtool: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libtool && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif libtool
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-libtool info-libtool
+maybe-info-libtool:
+@if libtool
+maybe-info-libtool: info-libtool
+
+info-libtool: \
+ configure-libtool
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libtermcap && \
+ echo "Doing info 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}" \
- installcheck) \
+ info) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup
-maybe-installcheck-target-winsup:
+.PHONY: maybe-dvi-libtool dvi-libtool
+maybe-dvi-libtool:
+@if libtool
+maybe-dvi-libtool: dvi-libtool
-installcheck-target-winsup: \
- configure-target-winsup
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+dvi-libtool: \
+ configure-libtool
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/winsup && \
+ echo "Doing dvi 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}" \
- installcheck) \
+ dvi) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss
-maybe-installcheck-target-libgloss:
+.PHONY: maybe-html-libtool html-libtool
+maybe-html-libtool:
+@if libtool
+maybe-html-libtool: html-libtool
-installcheck-target-libgloss: \
- configure-target-libgloss
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+html-libtool: \
+ configure-libtool
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
+ echo "Doing html 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}" \
- installcheck) \
+ html) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty
-maybe-installcheck-target-libiberty:
+.PHONY: maybe-TAGS-libtool TAGS-libtool
+maybe-TAGS-libtool:
+@if libtool
+maybe-TAGS-libtool: TAGS-libtool
-installcheck-target-libiberty: \
- configure-target-libiberty
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+TAGS-libtool: \
+ configure-libtool
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
+ echo "Doing TAGS 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}" \
- installcheck) \
+ TAGS) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf
-maybe-installcheck-target-gperf:
+.PHONY: maybe-install-info-libtool install-info-libtool
+maybe-install-info-libtool:
+@if libtool
+maybe-install-info-libtool: install-info-libtool
-installcheck-target-gperf: \
- configure-target-gperf
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+install-info-libtool: \
+ configure-libtool \
+ info-libtool
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/gperf && \
+ echo "Doing install-info 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}" \
- installcheck) \
+ install-info) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-examples installcheck-target-examples
-maybe-installcheck-target-examples:
+.PHONY: maybe-install-html-libtool install-html-libtool
+maybe-install-html-libtool:
+@if libtool
+maybe-install-html-libtool: install-html-libtool
-installcheck-target-examples: \
- configure-target-examples
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+install-html-libtool: \
+ configure-libtool \
+ html-libtool
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/examples && \
+ echo "Doing install-html 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}" \
- installcheck) \
+ install-html) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi
-maybe-installcheck-target-libffi:
+.PHONY: maybe-installcheck-libtool installcheck-libtool
+maybe-installcheck-libtool:
+@if libtool
+maybe-installcheck-libtool: installcheck-libtool
-installcheck-target-libffi: \
- configure-target-libffi
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+installcheck-libtool: \
+ configure-libtool
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libffi && \
+ echo "Doing installcheck 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}" \
@@ -10152,349 +19802,388 @@ installcheck-target-libffi: \
installcheck) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava
-maybe-installcheck-target-libjava:
+.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool
+maybe-mostlyclean-libtool:
+@if libtool
+maybe-mostlyclean-libtool: mostlyclean-libtool
-installcheck-target-libjava: \
- configure-target-libjava
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+mostlyclean-libtool:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libjava && \
+ echo "Doing mostlyclean 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}" \
- installcheck) \
+ mostlyclean) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib
-maybe-installcheck-target-zlib:
+.PHONY: maybe-clean-libtool clean-libtool
+maybe-clean-libtool:
+@if libtool
+maybe-clean-libtool: clean-libtool
-installcheck-target-zlib: \
- configure-target-zlib
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+clean-libtool:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/zlib && \
+ echo "Doing clean 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}" \
- installcheck) \
+ clean) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc
-maybe-installcheck-target-boehm-gc:
+.PHONY: maybe-distclean-libtool distclean-libtool
+maybe-distclean-libtool:
+@if libtool
+maybe-distclean-libtool: distclean-libtool
-installcheck-target-boehm-gc: \
- configure-target-boehm-gc
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+distclean-libtool:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
+ echo "Doing distclean 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}" \
- installcheck) \
+ distclean) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads
-maybe-installcheck-target-qthreads:
+.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool
+maybe-maintainer-clean-libtool:
+@if libtool
+maybe-maintainer-clean-libtool: maintainer-clean-libtool
-installcheck-target-qthreads: \
- configure-target-qthreads
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+maintainer-clean-libtool:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/qthreads && \
+ echo "Doing maintainer-clean 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}" \
- installcheck) \
+ maintainer-clean) \
|| exit 1
+@endif libtool
-.PHONY: maybe-installcheck-target-rda installcheck-target-rda
-maybe-installcheck-target-rda:
-installcheck-target-rda: \
- configure-target-rda
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+
+.PHONY: configure-m4 maybe-configure-m4
+maybe-configure-m4:
+@if m4
+maybe-configure-m4: configure-m4
+configure-m4:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/m4/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/m4 ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/m4; \
+ cd "$(HOST_SUBDIR)/m4" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/m4/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/m4"; \
+ libsrcdir="$$s/m4"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif m4
+
+
+
+
+
+.PHONY: all-m4 maybe-all-m4
+maybe-all-m4:
+@if m4
+TARGET-m4=all
+maybe-all-m4: all-m4
+all-m4: configure-m4
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/m4 && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-m4))
+@endif m4
+
+
+
+
+.PHONY: check-m4 maybe-check-m4
+maybe-check-m4:
+@if m4
+maybe-check-m4: check-m4
+
+check-m4:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/m4 && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif m4
+
+.PHONY: install-m4 maybe-install-m4
+maybe-install-m4:
+@if m4
+maybe-install-m4: install-m4
+
+install-m4: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/m4 && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif m4
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-m4 info-m4
+maybe-info-m4:
+@if m4
+maybe-info-m4: info-m4
+
+info-m4: \
+ configure-m4
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/rda && \
+ echo "Doing info 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}" \
- installcheck) \
+ info) \
|| exit 1
+@endif m4
-.PHONY: maybe-installcheck-target-libada installcheck-target-libada
-maybe-installcheck-target-libada:
+.PHONY: maybe-dvi-m4 dvi-m4
+maybe-dvi-m4:
+@if m4
+maybe-dvi-m4: dvi-m4
-installcheck-target-libada: \
- configure-target-libada
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+dvi-m4: \
+ configure-m4
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libada && \
+ echo "Doing dvi 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}" \
- installcheck) \
+ dvi) \
|| exit 1
+@endif m4
+.PHONY: maybe-html-m4 html-m4
+maybe-html-m4:
+@if m4
+maybe-html-m4: html-m4
-.PHONY: do-mostlyclean
-do-mostlyclean: mostlyclean-host mostlyclean-target
-
-.PHONY: mostlyclean-host
-mostlyclean-host: maybe-mostlyclean-gcc \
- maybe-mostlyclean-ash \
- maybe-mostlyclean-autoconf \
- maybe-mostlyclean-automake \
- maybe-mostlyclean-bash \
- maybe-mostlyclean-bfd \
- maybe-mostlyclean-opcodes \
- maybe-mostlyclean-binutils \
- maybe-mostlyclean-bison \
- maybe-mostlyclean-byacc \
- maybe-mostlyclean-bzip2 \
- maybe-mostlyclean-dejagnu \
- maybe-mostlyclean-diff \
- maybe-mostlyclean-dosutils \
- maybe-mostlyclean-etc \
- maybe-mostlyclean-fastjar \
- maybe-mostlyclean-fileutils \
- maybe-mostlyclean-findutils \
- maybe-mostlyclean-find \
- maybe-mostlyclean-flex \
- maybe-mostlyclean-gas \
- maybe-mostlyclean-gawk \
- maybe-mostlyclean-gettext \
- maybe-mostlyclean-gnuserv \
- maybe-mostlyclean-gprof \
- maybe-mostlyclean-gzip \
- maybe-mostlyclean-hello \
- maybe-mostlyclean-indent \
- maybe-mostlyclean-intl \
- maybe-mostlyclean-tcl \
- maybe-mostlyclean-itcl \
- maybe-mostlyclean-ld \
- maybe-mostlyclean-libgui \
- maybe-mostlyclean-libiberty \
- maybe-mostlyclean-libtool \
- maybe-mostlyclean-m4 \
- maybe-mostlyclean-make \
- maybe-mostlyclean-mmalloc \
- maybe-mostlyclean-patch \
- maybe-mostlyclean-perl \
- maybe-mostlyclean-prms \
- maybe-mostlyclean-rcs \
- maybe-mostlyclean-readline \
- maybe-mostlyclean-release \
- maybe-mostlyclean-recode \
- maybe-mostlyclean-sed \
- maybe-mostlyclean-send-pr \
- maybe-mostlyclean-shellutils \
- maybe-mostlyclean-sid \
- maybe-mostlyclean-sim \
- maybe-mostlyclean-tar \
- maybe-mostlyclean-texinfo \
- maybe-mostlyclean-textutils \
- maybe-mostlyclean-time \
- maybe-mostlyclean-uudecode \
- maybe-mostlyclean-wdiff \
- maybe-mostlyclean-zip \
- maybe-mostlyclean-zlib \
- maybe-mostlyclean-gdb \
- maybe-mostlyclean-expect \
- maybe-mostlyclean-guile \
- maybe-mostlyclean-tk \
- maybe-mostlyclean-tix \
- maybe-mostlyclean-libtermcap \
- maybe-mostlyclean-utils
-
-.PHONY: mostlyclean-target
-mostlyclean-target: \
- maybe-mostlyclean-target-libstdc++-v3 \
- maybe-mostlyclean-target-newlib \
- maybe-mostlyclean-target-libf2c \
- maybe-mostlyclean-target-libobjc \
- maybe-mostlyclean-target-libtermcap \
- maybe-mostlyclean-target-winsup \
- maybe-mostlyclean-target-libgloss \
- maybe-mostlyclean-target-libiberty \
- maybe-mostlyclean-target-gperf \
- maybe-mostlyclean-target-examples \
- maybe-mostlyclean-target-libffi \
- maybe-mostlyclean-target-libjava \
- maybe-mostlyclean-target-zlib \
- maybe-mostlyclean-target-boehm-gc \
- maybe-mostlyclean-target-qthreads \
- maybe-mostlyclean-target-rda \
- maybe-mostlyclean-target-libada
-
-# GCC, the eternal special case
-.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc
-maybe-mostlyclean-gcc:
-mostlyclean-gcc:
- @[ -f ./gcc/Makefile ] || exit 0; \
+html-m4: \
+ configure-m4
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gcc" ; \
- (cd gcc && \
+ echo "Doing html 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}" \
- mostlyclean) \
+ html) \
|| exit 1
-# Host modules.
+@endif m4
-.PHONY: maybe-mostlyclean-ash mostlyclean-ash
-maybe-mostlyclean-ash:
+.PHONY: maybe-TAGS-m4 TAGS-m4
+maybe-TAGS-m4:
+@if m4
+maybe-TAGS-m4: TAGS-m4
-mostlyclean-ash:
- @[ -f ./ash/Makefile ] || exit 0; \
+TAGS-m4: \
+ configure-m4
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in ash" ; \
- (cd ash && \
+ echo "Doing TAGS 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}" \
- mostlyclean) \
+ TAGS) \
|| exit 1
+@endif m4
-.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf
-maybe-mostlyclean-autoconf:
+.PHONY: maybe-install-info-m4 install-info-m4
+maybe-install-info-m4:
+@if m4
+maybe-install-info-m4: install-info-m4
-mostlyclean-autoconf:
- @[ -f ./autoconf/Makefile ] || exit 0; \
+install-info-m4: \
+ configure-m4 \
+ info-m4
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in autoconf" ; \
- (cd autoconf && \
+ echo "Doing install-info 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}" \
- mostlyclean) \
+ install-info) \
|| exit 1
+@endif m4
-.PHONY: maybe-mostlyclean-automake mostlyclean-automake
-maybe-mostlyclean-automake:
+.PHONY: maybe-install-html-m4 install-html-m4
+maybe-install-html-m4:
+@if m4
+maybe-install-html-m4: install-html-m4
-mostlyclean-automake:
- @[ -f ./automake/Makefile ] || exit 0; \
+install-html-m4: \
+ configure-m4 \
+ html-m4
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in automake" ; \
- (cd automake && \
+ echo "Doing install-html 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}" \
- mostlyclean) \
+ install-html) \
|| exit 1
+@endif m4
-.PHONY: maybe-mostlyclean-bash mostlyclean-bash
-maybe-mostlyclean-bash:
+.PHONY: maybe-installcheck-m4 installcheck-m4
+maybe-installcheck-m4:
+@if m4
+maybe-installcheck-m4: installcheck-m4
-mostlyclean-bash:
- @[ -f ./bash/Makefile ] || exit 0; \
+installcheck-m4: \
+ configure-m4
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in bash" ; \
- (cd bash && \
+ echo "Doing installcheck 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}" \
- mostlyclean) \
+ installcheck) \
|| exit 1
+@endif m4
-.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd
-maybe-mostlyclean-bfd:
+.PHONY: maybe-mostlyclean-m4 mostlyclean-m4
+maybe-mostlyclean-m4:
+@if m4
+maybe-mostlyclean-m4: mostlyclean-m4
-mostlyclean-bfd:
- @[ -f ./bfd/Makefile ] || exit 0; \
+mostlyclean-m4:
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in bfd" ; \
- (cd bfd && \
+ echo "Doing mostlyclean 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}" \
@@ -10502,230 +20191,363 @@ mostlyclean-bfd:
mostlyclean) \
|| exit 1
+@endif m4
-.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes
-maybe-mostlyclean-opcodes:
+.PHONY: maybe-clean-m4 clean-m4
+maybe-clean-m4:
+@if m4
+maybe-clean-m4: clean-m4
-mostlyclean-opcodes:
- @[ -f ./opcodes/Makefile ] || exit 0; \
+clean-m4:
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in opcodes" ; \
- (cd opcodes && \
+ echo "Doing clean 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}" \
- mostlyclean) \
+ clean) \
|| exit 1
+@endif m4
-.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils
-maybe-mostlyclean-binutils:
+.PHONY: maybe-distclean-m4 distclean-m4
+maybe-distclean-m4:
+@if m4
+maybe-distclean-m4: distclean-m4
-mostlyclean-binutils:
- @[ -f ./binutils/Makefile ] || exit 0; \
+distclean-m4:
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in binutils" ; \
- (cd binutils && \
+ echo "Doing distclean 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}" \
- mostlyclean) \
+ distclean) \
|| exit 1
+@endif m4
-.PHONY: maybe-mostlyclean-bison mostlyclean-bison
-maybe-mostlyclean-bison:
+.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4
+maybe-maintainer-clean-m4:
+@if m4
+maybe-maintainer-clean-m4: maintainer-clean-m4
-mostlyclean-bison:
- @[ -f ./bison/Makefile ] || exit 0; \
+maintainer-clean-m4:
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in bison" ; \
- (cd bison && \
+ echo "Doing maintainer-clean 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}" \
- mostlyclean) \
+ maintainer-clean) \
|| exit 1
+@endif m4
-.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc
-maybe-mostlyclean-byacc:
-mostlyclean-byacc:
- @[ -f ./byacc/Makefile ] || exit 0; \
+
+.PHONY: configure-make maybe-configure-make
+maybe-configure-make:
+@if make
+maybe-configure-make: configure-make
+configure-make:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/make/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/make ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/make; \
+ cd "$(HOST_SUBDIR)/make" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/make/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/make"; \
+ libsrcdir="$$s/make"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif make
+
+
+
+
+
+.PHONY: all-make maybe-all-make
+maybe-all-make:
+@if make
+TARGET-make=all
+maybe-all-make: all-make
+all-make: configure-make
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/make && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-make))
+@endif make
+
+
+
+
+.PHONY: check-make maybe-check-make
+maybe-check-make:
+@if make
+maybe-check-make: check-make
+
+check-make:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/make && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif make
+
+.PHONY: install-make maybe-install-make
+maybe-install-make:
+@if make
+maybe-install-make: install-make
+
+install-make: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/make && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif make
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-make info-make
+maybe-info-make:
+@if make
+maybe-info-make: info-make
+
+info-make: \
+ configure-make
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in byacc" ; \
- (cd byacc && \
+ echo "Doing info 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}" \
- mostlyclean) \
+ info) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2
-maybe-mostlyclean-bzip2:
+.PHONY: maybe-dvi-make dvi-make
+maybe-dvi-make:
+@if make
+maybe-dvi-make: dvi-make
-mostlyclean-bzip2:
- @[ -f ./bzip2/Makefile ] || exit 0; \
+dvi-make: \
+ configure-make
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in bzip2" ; \
- (cd bzip2 && \
+ echo "Doing dvi 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}" \
- mostlyclean) \
+ dvi) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu
-maybe-mostlyclean-dejagnu:
+.PHONY: maybe-html-make html-make
+maybe-html-make:
+@if make
+maybe-html-make: html-make
-mostlyclean-dejagnu:
- @[ -f ./dejagnu/Makefile ] || exit 0; \
+html-make: \
+ configure-make
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in dejagnu" ; \
- (cd dejagnu && \
+ echo "Doing html 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}" \
- mostlyclean) \
+ html) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-diff mostlyclean-diff
-maybe-mostlyclean-diff:
+.PHONY: maybe-TAGS-make TAGS-make
+maybe-TAGS-make:
+@if make
+maybe-TAGS-make: TAGS-make
-mostlyclean-diff:
- @[ -f ./diff/Makefile ] || exit 0; \
+TAGS-make: \
+ configure-make
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in diff" ; \
- (cd diff && \
+ echo "Doing TAGS 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}" \
- mostlyclean) \
+ TAGS) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils
-maybe-mostlyclean-dosutils:
+.PHONY: maybe-install-info-make install-info-make
+maybe-install-info-make:
+@if make
+maybe-install-info-make: install-info-make
-mostlyclean-dosutils:
- @[ -f ./dosutils/Makefile ] || exit 0; \
+install-info-make: \
+ configure-make \
+ info-make
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in dosutils" ; \
- (cd dosutils && \
+ echo "Doing install-info 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}" \
- mostlyclean) \
+ install-info) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-etc mostlyclean-etc
-maybe-mostlyclean-etc:
+.PHONY: maybe-install-html-make install-html-make
+maybe-install-html-make:
+@if make
+maybe-install-html-make: install-html-make
-mostlyclean-etc:
- @[ -f ./etc/Makefile ] || exit 0; \
+install-html-make: \
+ configure-make \
+ html-make
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in etc" ; \
- (cd etc && \
+ echo "Doing install-html 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}" \
- mostlyclean) \
+ install-html) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar
-maybe-mostlyclean-fastjar:
+.PHONY: maybe-installcheck-make installcheck-make
+maybe-installcheck-make:
+@if make
+maybe-installcheck-make: installcheck-make
-mostlyclean-fastjar:
- @[ -f ./fastjar/Makefile ] || exit 0; \
+installcheck-make: \
+ configure-make
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in fastjar" ; \
- (cd fastjar && \
+ echo "Doing installcheck 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}" \
- mostlyclean) \
+ installcheck) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils
-maybe-mostlyclean-fileutils:
+.PHONY: maybe-mostlyclean-make mostlyclean-make
+maybe-mostlyclean-make:
+@if make
+maybe-mostlyclean-make: mostlyclean-make
-mostlyclean-fileutils:
- @[ -f ./fileutils/Makefile ] || exit 0; \
+mostlyclean-make:
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in fileutils" ; \
- (cd fileutils && \
+ echo "Doing mostlyclean 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}" \
@@ -10733,230 +20555,357 @@ mostlyclean-fileutils:
mostlyclean) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils
-maybe-mostlyclean-findutils:
+.PHONY: maybe-clean-make clean-make
+maybe-clean-make:
+@if make
+maybe-clean-make: clean-make
-mostlyclean-findutils:
- @[ -f ./findutils/Makefile ] || exit 0; \
+clean-make:
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in findutils" ; \
- (cd findutils && \
+ echo "Doing clean 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}" \
- mostlyclean) \
+ clean) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-find mostlyclean-find
-maybe-mostlyclean-find:
+.PHONY: maybe-distclean-make distclean-make
+maybe-distclean-make:
+@if make
+maybe-distclean-make: distclean-make
-mostlyclean-find:
- @[ -f ./find/Makefile ] || exit 0; \
+distclean-make:
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in find" ; \
- (cd find && \
+ echo "Doing distclean 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}" \
- mostlyclean) \
+ distclean) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-flex mostlyclean-flex
-maybe-mostlyclean-flex:
+.PHONY: maybe-maintainer-clean-make maintainer-clean-make
+maybe-maintainer-clean-make:
+@if make
+maybe-maintainer-clean-make: maintainer-clean-make
-mostlyclean-flex:
- @[ -f ./flex/Makefile ] || exit 0; \
+maintainer-clean-make:
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in flex" ; \
- (cd flex && \
+ echo "Doing maintainer-clean 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}" \
- mostlyclean) \
+ maintainer-clean) \
|| exit 1
+@endif make
-.PHONY: maybe-mostlyclean-gas mostlyclean-gas
-maybe-mostlyclean-gas:
-mostlyclean-gas:
- @[ -f ./gas/Makefile ] || exit 0; \
+
+.PHONY: configure-mmalloc maybe-configure-mmalloc
+maybe-configure-mmalloc:
+@if mmalloc
+maybe-configure-mmalloc: configure-mmalloc
+configure-mmalloc:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mmalloc/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mmalloc ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/mmalloc; \
+ cd "$(HOST_SUBDIR)/mmalloc" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/mmalloc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/mmalloc"; \
+ libsrcdir="$$s/mmalloc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif mmalloc
+
+
+
+
+
+.PHONY: all-mmalloc maybe-all-mmalloc
+maybe-all-mmalloc:
+@if mmalloc
+TARGET-mmalloc=all
+maybe-all-mmalloc: all-mmalloc
+all-mmalloc: configure-mmalloc
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/mmalloc && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-mmalloc))
+@endif mmalloc
+
+
+
+
+.PHONY: check-mmalloc maybe-check-mmalloc
+maybe-check-mmalloc:
+@if mmalloc
+maybe-check-mmalloc: check-mmalloc
+
+check-mmalloc:
+
+@endif mmalloc
+
+.PHONY: install-mmalloc maybe-install-mmalloc
+maybe-install-mmalloc:
+@if mmalloc
+maybe-install-mmalloc: install-mmalloc
+
+install-mmalloc: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/mmalloc && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif mmalloc
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-mmalloc info-mmalloc
+maybe-info-mmalloc:
+@if mmalloc
+maybe-info-mmalloc: info-mmalloc
+
+info-mmalloc: \
+ configure-mmalloc
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gas" ; \
- (cd gas && \
+ echo "Doing info 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}" \
- mostlyclean) \
+ info) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk
-maybe-mostlyclean-gawk:
+.PHONY: maybe-dvi-mmalloc dvi-mmalloc
+maybe-dvi-mmalloc:
+@if mmalloc
+maybe-dvi-mmalloc: dvi-mmalloc
-mostlyclean-gawk:
- @[ -f ./gawk/Makefile ] || exit 0; \
+dvi-mmalloc: \
+ configure-mmalloc
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gawk" ; \
- (cd gawk && \
+ echo "Doing dvi 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}" \
- mostlyclean) \
+ dvi) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext
-maybe-mostlyclean-gettext:
+.PHONY: maybe-html-mmalloc html-mmalloc
+maybe-html-mmalloc:
+@if mmalloc
+maybe-html-mmalloc: html-mmalloc
-mostlyclean-gettext:
- @[ -f ./gettext/Makefile ] || exit 0; \
+html-mmalloc: \
+ configure-mmalloc
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gettext" ; \
- (cd gettext && \
+ echo "Doing html 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}" \
- mostlyclean) \
+ html) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv
-maybe-mostlyclean-gnuserv:
+.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc
+maybe-TAGS-mmalloc:
+@if mmalloc
+maybe-TAGS-mmalloc: TAGS-mmalloc
-mostlyclean-gnuserv:
- @[ -f ./gnuserv/Makefile ] || exit 0; \
+TAGS-mmalloc: \
+ configure-mmalloc
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gnuserv" ; \
- (cd gnuserv && \
+ echo "Doing TAGS 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}" \
- mostlyclean) \
+ TAGS) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof
-maybe-mostlyclean-gprof:
+.PHONY: maybe-install-info-mmalloc install-info-mmalloc
+maybe-install-info-mmalloc:
+@if mmalloc
+maybe-install-info-mmalloc: install-info-mmalloc
-mostlyclean-gprof:
- @[ -f ./gprof/Makefile ] || exit 0; \
+install-info-mmalloc: \
+ configure-mmalloc \
+ info-mmalloc
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gprof" ; \
- (cd gprof && \
+ echo "Doing install-info 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}" \
- mostlyclean) \
+ install-info) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip
-maybe-mostlyclean-gzip:
+.PHONY: maybe-install-html-mmalloc install-html-mmalloc
+maybe-install-html-mmalloc:
+@if mmalloc
+maybe-install-html-mmalloc: install-html-mmalloc
-mostlyclean-gzip:
- @[ -f ./gzip/Makefile ] || exit 0; \
+install-html-mmalloc: \
+ configure-mmalloc \
+ html-mmalloc
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gzip" ; \
- (cd gzip && \
+ echo "Doing install-html 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}" \
- mostlyclean) \
+ install-html) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-hello mostlyclean-hello
-maybe-mostlyclean-hello:
+.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc
+maybe-installcheck-mmalloc:
+@if mmalloc
+maybe-installcheck-mmalloc: installcheck-mmalloc
-mostlyclean-hello:
- @[ -f ./hello/Makefile ] || exit 0; \
+installcheck-mmalloc: \
+ configure-mmalloc
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in hello" ; \
- (cd hello && \
+ echo "Doing installcheck 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}" \
- mostlyclean) \
+ installcheck) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-indent mostlyclean-indent
-maybe-mostlyclean-indent:
+.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc
+maybe-mostlyclean-mmalloc:
+@if mmalloc
+maybe-mostlyclean-mmalloc: mostlyclean-mmalloc
-mostlyclean-indent:
- @[ -f ./indent/Makefile ] || exit 0; \
+mostlyclean-mmalloc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in indent" ; \
- (cd indent && \
+ echo "Doing mostlyclean 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}" \
@@ -10964,216 +20913,363 @@ mostlyclean-indent:
mostlyclean) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-intl mostlyclean-intl
-maybe-mostlyclean-intl:
+.PHONY: maybe-clean-mmalloc clean-mmalloc
+maybe-clean-mmalloc:
+@if mmalloc
+maybe-clean-mmalloc: clean-mmalloc
-mostlyclean-intl:
- @[ -f ./intl/Makefile ] || exit 0; \
+clean-mmalloc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in intl" ; \
- (cd intl && \
+ echo "Doing clean 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}" \
- mostlyclean) \
+ clean) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl
-maybe-mostlyclean-tcl:
+.PHONY: maybe-distclean-mmalloc distclean-mmalloc
+maybe-distclean-mmalloc:
+@if mmalloc
+maybe-distclean-mmalloc: distclean-mmalloc
-# tcl doesn't support mostlyclean.
-mostlyclean-tcl:
+distclean-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 distclean 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}" \
+ distclean) \
+ || exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl
-maybe-mostlyclean-itcl:
+.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc
+maybe-maintainer-clean-mmalloc:
+@if mmalloc
+maybe-maintainer-clean-mmalloc: maintainer-clean-mmalloc
-mostlyclean-itcl:
- @[ -f ./itcl/Makefile ] || exit 0; \
+maintainer-clean-mmalloc:
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in itcl" ; \
- (cd itcl && \
+ echo "Doing maintainer-clean 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}" \
- mostlyclean) \
+ maintainer-clean) \
|| exit 1
+@endif mmalloc
-.PHONY: maybe-mostlyclean-ld mostlyclean-ld
-maybe-mostlyclean-ld:
-mostlyclean-ld:
- @[ -f ./ld/Makefile ] || exit 0; \
+
+.PHONY: configure-patch maybe-configure-patch
+maybe-configure-patch:
+@if patch
+maybe-configure-patch: configure-patch
+configure-patch:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/patch/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/patch ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/patch; \
+ cd "$(HOST_SUBDIR)/patch" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/patch/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/patch"; \
+ libsrcdir="$$s/patch"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif patch
+
+
+
+
+
+.PHONY: all-patch maybe-all-patch
+maybe-all-patch:
+@if patch
+TARGET-patch=all
+maybe-all-patch: all-patch
+all-patch: configure-patch
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/patch && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-patch))
+@endif patch
+
+
+
+
+.PHONY: check-patch maybe-check-patch
+maybe-check-patch:
+@if patch
+maybe-check-patch: check-patch
+
+check-patch:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/patch && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif patch
+
+.PHONY: install-patch maybe-install-patch
+maybe-install-patch:
+@if patch
+maybe-install-patch: install-patch
+
+install-patch: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/patch && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif patch
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-patch info-patch
+maybe-info-patch:
+@if patch
+maybe-info-patch: info-patch
+
+info-patch: \
+ configure-patch
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in ld" ; \
- (cd ld && \
+ echo "Doing info 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}" \
- mostlyclean) \
+ info) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui
-maybe-mostlyclean-libgui:
+.PHONY: maybe-dvi-patch dvi-patch
+maybe-dvi-patch:
+@if patch
+maybe-dvi-patch: dvi-patch
-mostlyclean-libgui:
- @[ -f ./libgui/Makefile ] || exit 0; \
+dvi-patch: \
+ configure-patch
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libgui" ; \
- (cd libgui && \
+ echo "Doing dvi 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}" \
- mostlyclean) \
+ dvi) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty
-maybe-mostlyclean-libiberty:
+.PHONY: maybe-html-patch html-patch
+maybe-html-patch:
+@if patch
+maybe-html-patch: html-patch
-mostlyclean-libiberty:
- @[ -f ./libiberty/Makefile ] || exit 0; \
+html-patch: \
+ configure-patch
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libiberty" ; \
- (cd libiberty && \
+ echo "Doing html 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}" \
- mostlyclean) \
+ html) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool
-maybe-mostlyclean-libtool:
+.PHONY: maybe-TAGS-patch TAGS-patch
+maybe-TAGS-patch:
+@if patch
+maybe-TAGS-patch: TAGS-patch
-mostlyclean-libtool:
- @[ -f ./libtool/Makefile ] || exit 0; \
+TAGS-patch: \
+ configure-patch
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libtool" ; \
- (cd libtool && \
+ echo "Doing TAGS 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}" \
- mostlyclean) \
+ TAGS) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-m4 mostlyclean-m4
-maybe-mostlyclean-m4:
+.PHONY: maybe-install-info-patch install-info-patch
+maybe-install-info-patch:
+@if patch
+maybe-install-info-patch: install-info-patch
-mostlyclean-m4:
- @[ -f ./m4/Makefile ] || exit 0; \
+install-info-patch: \
+ configure-patch \
+ info-patch
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in m4" ; \
- (cd m4 && \
+ echo "Doing install-info 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}" \
- mostlyclean) \
+ install-info) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-make mostlyclean-make
-maybe-mostlyclean-make:
+.PHONY: maybe-install-html-patch install-html-patch
+maybe-install-html-patch:
+@if patch
+maybe-install-html-patch: install-html-patch
-mostlyclean-make:
- @[ -f ./make/Makefile ] || exit 0; \
+install-html-patch: \
+ configure-patch \
+ html-patch
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in make" ; \
- (cd make && \
+ echo "Doing install-html 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}" \
- mostlyclean) \
+ install-html) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc
-maybe-mostlyclean-mmalloc:
+.PHONY: maybe-installcheck-patch installcheck-patch
+maybe-installcheck-patch:
+@if patch
+maybe-installcheck-patch: installcheck-patch
-mostlyclean-mmalloc:
- @[ -f ./mmalloc/Makefile ] || exit 0; \
+installcheck-patch: \
+ configure-patch
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in mmalloc" ; \
- (cd mmalloc && \
+ echo "Doing installcheck 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}" \
- mostlyclean) \
+ installcheck) \
|| exit 1
+@endif patch
.PHONY: maybe-mostlyclean-patch mostlyclean-patch
maybe-mostlyclean-patch:
+@if patch
+maybe-mostlyclean-patch: mostlyclean-patch
mostlyclean-patch:
+ @: $(MAKE); $(unstage)
@[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing mostlyclean in patch" ; \
- (cd patch && \
+ (cd $(HOST_SUBDIR)/patch && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -11181,230 +21277,363 @@ mostlyclean-patch:
mostlyclean) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-perl mostlyclean-perl
-maybe-mostlyclean-perl:
+.PHONY: maybe-clean-patch clean-patch
+maybe-clean-patch:
+@if patch
+maybe-clean-patch: clean-patch
-mostlyclean-perl:
- @[ -f ./perl/Makefile ] || exit 0; \
+clean-patch:
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in perl" ; \
- (cd perl && \
+ echo "Doing clean 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}" \
- mostlyclean) \
+ clean) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-prms mostlyclean-prms
-maybe-mostlyclean-prms:
+.PHONY: maybe-distclean-patch distclean-patch
+maybe-distclean-patch:
+@if patch
+maybe-distclean-patch: distclean-patch
-mostlyclean-prms:
- @[ -f ./prms/Makefile ] || exit 0; \
+distclean-patch:
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in prms" ; \
- (cd prms && \
+ echo "Doing distclean 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}" \
- mostlyclean) \
+ distclean) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs
-maybe-mostlyclean-rcs:
+.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch
+maybe-maintainer-clean-patch:
+@if patch
+maybe-maintainer-clean-patch: maintainer-clean-patch
-mostlyclean-rcs:
- @[ -f ./rcs/Makefile ] || exit 0; \
+maintainer-clean-patch:
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in rcs" ; \
- (cd rcs && \
+ echo "Doing maintainer-clean 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}" \
- mostlyclean) \
+ maintainer-clean) \
|| exit 1
+@endif patch
-.PHONY: maybe-mostlyclean-readline mostlyclean-readline
-maybe-mostlyclean-readline:
-mostlyclean-readline:
- @[ -f ./readline/Makefile ] || exit 0; \
+
+.PHONY: configure-perl maybe-configure-perl
+maybe-configure-perl:
+@if perl
+maybe-configure-perl: configure-perl
+configure-perl:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/perl/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/perl ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/perl; \
+ cd "$(HOST_SUBDIR)/perl" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/perl/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/perl"; \
+ libsrcdir="$$s/perl"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif perl
+
+
+
+
+
+.PHONY: all-perl maybe-all-perl
+maybe-all-perl:
+@if perl
+TARGET-perl=all
+maybe-all-perl: all-perl
+all-perl: configure-perl
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/perl && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-perl))
+@endif perl
+
+
+
+
+.PHONY: check-perl maybe-check-perl
+maybe-check-perl:
+@if perl
+maybe-check-perl: check-perl
+
+check-perl:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/perl && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif perl
+
+.PHONY: install-perl maybe-install-perl
+maybe-install-perl:
+@if perl
+maybe-install-perl: install-perl
+
+install-perl: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/perl && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif perl
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-perl info-perl
+maybe-info-perl:
+@if perl
+maybe-info-perl: info-perl
+
+info-perl: \
+ configure-perl
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in readline" ; \
- (cd readline && \
+ echo "Doing info 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}" \
- mostlyclean) \
+ info) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-release mostlyclean-release
-maybe-mostlyclean-release:
+.PHONY: maybe-dvi-perl dvi-perl
+maybe-dvi-perl:
+@if perl
+maybe-dvi-perl: dvi-perl
-mostlyclean-release:
- @[ -f ./release/Makefile ] || exit 0; \
+dvi-perl: \
+ configure-perl
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in release" ; \
- (cd release && \
+ echo "Doing dvi 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}" \
- mostlyclean) \
+ dvi) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-recode mostlyclean-recode
-maybe-mostlyclean-recode:
+.PHONY: maybe-html-perl html-perl
+maybe-html-perl:
+@if perl
+maybe-html-perl: html-perl
-mostlyclean-recode:
- @[ -f ./recode/Makefile ] || exit 0; \
+html-perl: \
+ configure-perl
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in recode" ; \
- (cd recode && \
+ echo "Doing html 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}" \
- mostlyclean) \
+ html) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-sed mostlyclean-sed
-maybe-mostlyclean-sed:
+.PHONY: maybe-TAGS-perl TAGS-perl
+maybe-TAGS-perl:
+@if perl
+maybe-TAGS-perl: TAGS-perl
-mostlyclean-sed:
- @[ -f ./sed/Makefile ] || exit 0; \
+TAGS-perl: \
+ configure-perl
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in sed" ; \
- (cd sed && \
+ echo "Doing TAGS 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}" \
- mostlyclean) \
+ TAGS) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr
-maybe-mostlyclean-send-pr:
+.PHONY: maybe-install-info-perl install-info-perl
+maybe-install-info-perl:
+@if perl
+maybe-install-info-perl: install-info-perl
-mostlyclean-send-pr:
- @[ -f ./send-pr/Makefile ] || exit 0; \
+install-info-perl: \
+ configure-perl \
+ info-perl
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in send-pr" ; \
- (cd send-pr && \
+ echo "Doing install-info 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}" \
- mostlyclean) \
+ install-info) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils
-maybe-mostlyclean-shellutils:
+.PHONY: maybe-install-html-perl install-html-perl
+maybe-install-html-perl:
+@if perl
+maybe-install-html-perl: install-html-perl
-mostlyclean-shellutils:
- @[ -f ./shellutils/Makefile ] || exit 0; \
+install-html-perl: \
+ configure-perl \
+ html-perl
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in shellutils" ; \
- (cd shellutils && \
+ echo "Doing install-html 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}" \
- mostlyclean) \
+ install-html) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-sid mostlyclean-sid
-maybe-mostlyclean-sid:
+.PHONY: maybe-installcheck-perl installcheck-perl
+maybe-installcheck-perl:
+@if perl
+maybe-installcheck-perl: installcheck-perl
-mostlyclean-sid:
- @[ -f ./sid/Makefile ] || exit 0; \
+installcheck-perl: \
+ configure-perl
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in sid" ; \
- (cd sid && \
+ echo "Doing installcheck 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}" \
- mostlyclean) \
+ installcheck) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-sim mostlyclean-sim
-maybe-mostlyclean-sim:
+.PHONY: maybe-mostlyclean-perl mostlyclean-perl
+maybe-mostlyclean-perl:
+@if perl
+maybe-mostlyclean-perl: mostlyclean-perl
-mostlyclean-sim:
- @[ -f ./sim/Makefile ] || exit 0; \
+mostlyclean-perl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in sim" ; \
- (cd sim && \
+ echo "Doing mostlyclean 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}" \
@@ -11412,230 +21641,363 @@ mostlyclean-sim:
mostlyclean) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-tar mostlyclean-tar
-maybe-mostlyclean-tar:
+.PHONY: maybe-clean-perl clean-perl
+maybe-clean-perl:
+@if perl
+maybe-clean-perl: clean-perl
-mostlyclean-tar:
- @[ -f ./tar/Makefile ] || exit 0; \
+clean-perl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in tar" ; \
- (cd tar && \
+ echo "Doing clean 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}" \
- mostlyclean) \
+ clean) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo
-maybe-mostlyclean-texinfo:
+.PHONY: maybe-distclean-perl distclean-perl
+maybe-distclean-perl:
+@if perl
+maybe-distclean-perl: distclean-perl
-mostlyclean-texinfo:
- @[ -f ./texinfo/Makefile ] || exit 0; \
+distclean-perl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in texinfo" ; \
- (cd texinfo && \
+ echo "Doing distclean 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}" \
- mostlyclean) \
+ distclean) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils
-maybe-mostlyclean-textutils:
+.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl
+maybe-maintainer-clean-perl:
+@if perl
+maybe-maintainer-clean-perl: maintainer-clean-perl
-mostlyclean-textutils:
- @[ -f ./textutils/Makefile ] || exit 0; \
+maintainer-clean-perl:
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in textutils" ; \
- (cd textutils && \
+ echo "Doing maintainer-clean 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}" \
- mostlyclean) \
+ maintainer-clean) \
|| exit 1
+@endif perl
-.PHONY: maybe-mostlyclean-time mostlyclean-time
-maybe-mostlyclean-time:
-mostlyclean-time:
- @[ -f ./time/Makefile ] || exit 0; \
+
+.PHONY: configure-prms maybe-configure-prms
+maybe-configure-prms:
+@if prms
+maybe-configure-prms: configure-prms
+configure-prms:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/prms/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/prms ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/prms; \
+ cd "$(HOST_SUBDIR)/prms" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/prms/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/prms"; \
+ libsrcdir="$$s/prms"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif prms
+
+
+
+
+
+.PHONY: all-prms maybe-all-prms
+maybe-all-prms:
+@if prms
+TARGET-prms=all
+maybe-all-prms: all-prms
+all-prms: configure-prms
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/prms && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-prms))
+@endif prms
+
+
+
+
+.PHONY: check-prms maybe-check-prms
+maybe-check-prms:
+@if prms
+maybe-check-prms: check-prms
+
+check-prms:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/prms && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif prms
+
+.PHONY: install-prms maybe-install-prms
+maybe-install-prms:
+@if prms
+maybe-install-prms: install-prms
+
+install-prms: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/prms && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif prms
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-prms info-prms
+maybe-info-prms:
+@if prms
+maybe-info-prms: info-prms
+
+info-prms: \
+ configure-prms
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in time" ; \
- (cd time && \
+ echo "Doing info 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}" \
- mostlyclean) \
+ info) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode
-maybe-mostlyclean-uudecode:
+.PHONY: maybe-dvi-prms dvi-prms
+maybe-dvi-prms:
+@if prms
+maybe-dvi-prms: dvi-prms
-mostlyclean-uudecode:
- @[ -f ./uudecode/Makefile ] || exit 0; \
+dvi-prms: \
+ configure-prms
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in uudecode" ; \
- (cd uudecode && \
+ echo "Doing dvi 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}" \
- mostlyclean) \
+ dvi) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff
-maybe-mostlyclean-wdiff:
+.PHONY: maybe-html-prms html-prms
+maybe-html-prms:
+@if prms
+maybe-html-prms: html-prms
-mostlyclean-wdiff:
- @[ -f ./wdiff/Makefile ] || exit 0; \
+html-prms: \
+ configure-prms
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in wdiff" ; \
- (cd wdiff && \
+ echo "Doing html 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}" \
- mostlyclean) \
+ html) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-zip mostlyclean-zip
-maybe-mostlyclean-zip:
+.PHONY: maybe-TAGS-prms TAGS-prms
+maybe-TAGS-prms:
+@if prms
+maybe-TAGS-prms: TAGS-prms
-mostlyclean-zip:
- @[ -f ./zip/Makefile ] || exit 0; \
+TAGS-prms: \
+ configure-prms
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in zip" ; \
- (cd zip && \
+ echo "Doing TAGS 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}" \
- mostlyclean) \
+ TAGS) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib
-maybe-mostlyclean-zlib:
+.PHONY: maybe-install-info-prms install-info-prms
+maybe-install-info-prms:
+@if prms
+maybe-install-info-prms: install-info-prms
-mostlyclean-zlib:
- @[ -f ./zlib/Makefile ] || exit 0; \
+install-info-prms: \
+ configure-prms \
+ info-prms
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in zlib" ; \
- (cd zlib && \
+ echo "Doing install-info 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}" \
- mostlyclean) \
+ install-info) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb
-maybe-mostlyclean-gdb:
+.PHONY: maybe-install-html-prms install-html-prms
+maybe-install-html-prms:
+@if prms
+maybe-install-html-prms: install-html-prms
-mostlyclean-gdb:
- @[ -f ./gdb/Makefile ] || exit 0; \
+install-html-prms: \
+ configure-prms \
+ html-prms
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gdb" ; \
- (cd gdb && \
+ echo "Doing install-html 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}" \
- mostlyclean) \
+ install-html) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-expect mostlyclean-expect
-maybe-mostlyclean-expect:
+.PHONY: maybe-installcheck-prms installcheck-prms
+maybe-installcheck-prms:
+@if prms
+maybe-installcheck-prms: installcheck-prms
-mostlyclean-expect:
- @[ -f ./expect/Makefile ] || exit 0; \
+installcheck-prms: \
+ configure-prms
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in expect" ; \
- (cd expect && \
+ echo "Doing installcheck 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}" \
- mostlyclean) \
+ installcheck) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-guile mostlyclean-guile
-maybe-mostlyclean-guile:
+.PHONY: maybe-mostlyclean-prms mostlyclean-prms
+maybe-mostlyclean-prms:
+@if prms
+maybe-mostlyclean-prms: mostlyclean-prms
-mostlyclean-guile:
- @[ -f ./guile/Makefile ] || exit 0; \
+mostlyclean-prms:
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in guile" ; \
- (cd guile && \
+ echo "Doing mostlyclean 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}" \
@@ -11643,226 +22005,363 @@ mostlyclean-guile:
mostlyclean) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-tk mostlyclean-tk
-maybe-mostlyclean-tk:
+.PHONY: maybe-clean-prms clean-prms
+maybe-clean-prms:
+@if prms
+maybe-clean-prms: clean-prms
-mostlyclean-tk:
- @[ -f ./tk/Makefile ] || exit 0; \
+clean-prms:
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in tk" ; \
- (cd tk && \
+ echo "Doing clean 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}" \
- mostlyclean) \
+ clean) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-tix mostlyclean-tix
-maybe-mostlyclean-tix:
+.PHONY: maybe-distclean-prms distclean-prms
+maybe-distclean-prms:
+@if prms
+maybe-distclean-prms: distclean-prms
-mostlyclean-tix:
- @[ -f ./tix/Makefile ] || exit 0; \
+distclean-prms:
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in tix" ; \
- (cd tix && \
+ echo "Doing distclean 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}" \
- mostlyclean) \
+ distclean) \
|| exit 1
+@endif prms
-.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap
-maybe-mostlyclean-libtermcap:
-
-# libtermcap doesn't support mostlyclean.
-mostlyclean-libtermcap:
-
-
-.PHONY: maybe-mostlyclean-utils mostlyclean-utils
-maybe-mostlyclean-utils:
+.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms
+maybe-maintainer-clean-prms:
+@if prms
+maybe-maintainer-clean-prms: maintainer-clean-prms
-mostlyclean-utils:
- @[ -f ./utils/Makefile ] || exit 0; \
+maintainer-clean-prms:
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in utils" ; \
- (cd utils && \
+ echo "Doing maintainer-clean 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}" \
- mostlyclean) \
+ maintainer-clean) \
|| exit 1
+@endif prms
-# Target modules.
-.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3
-maybe-mostlyclean-target-libstdc++-v3:
+.PHONY: configure-rcs maybe-configure-rcs
+maybe-configure-rcs:
+@if rcs
+maybe-configure-rcs: configure-rcs
+configure-rcs:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/rcs/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/rcs ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/rcs; \
+ cd "$(HOST_SUBDIR)/rcs" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/rcs/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/rcs"; \
+ libsrcdir="$$s/rcs"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif rcs
-mostlyclean-target-libstdc++-v3:
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+
+
+
+
+.PHONY: all-rcs maybe-all-rcs
+maybe-all-rcs:
+@if rcs
+TARGET-rcs=all
+maybe-all-rcs: all-rcs
+all-rcs: configure-rcs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/rcs && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-rcs))
+@endif rcs
+
+
+
+
+.PHONY: check-rcs maybe-check-rcs
+maybe-check-rcs:
+@if rcs
+maybe-check-rcs: check-rcs
+
+check-rcs:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/rcs && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif rcs
+
+.PHONY: install-rcs maybe-install-rcs
+maybe-install-rcs:
+@if rcs
+maybe-install-rcs: install-rcs
+
+install-rcs: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/rcs && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif rcs
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-rcs info-rcs
+maybe-info-rcs:
+@if rcs
+maybe-info-rcs: info-rcs
+
+info-rcs: \
+ configure-rcs
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ echo "Doing info 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}" \
- mostlyclean) \
+ info) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib
-maybe-mostlyclean-target-newlib:
+.PHONY: maybe-dvi-rcs dvi-rcs
+maybe-dvi-rcs:
+@if rcs
+maybe-dvi-rcs: dvi-rcs
-mostlyclean-target-newlib:
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+dvi-rcs: \
+ configure-rcs
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ echo "Doing dvi 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}" \
- mostlyclean) \
+ dvi) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-libf2c mostlyclean-target-libf2c
-maybe-mostlyclean-target-libf2c:
+.PHONY: maybe-html-rcs html-rcs
+maybe-html-rcs:
+@if rcs
+maybe-html-rcs: html-rcs
-mostlyclean-target-libf2c:
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+html-rcs: \
+ configure-rcs
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ echo "Doing html 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}" \
- mostlyclean) \
+ html) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc
-maybe-mostlyclean-target-libobjc:
+.PHONY: maybe-TAGS-rcs TAGS-rcs
+maybe-TAGS-rcs:
+@if rcs
+maybe-TAGS-rcs: TAGS-rcs
-mostlyclean-target-libobjc:
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+TAGS-rcs: \
+ configure-rcs
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
+ echo "Doing TAGS 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}" \
- mostlyclean) \
+ TAGS) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap
-maybe-mostlyclean-target-libtermcap:
+.PHONY: maybe-install-info-rcs install-info-rcs
+maybe-install-info-rcs:
+@if rcs
+maybe-install-info-rcs: install-info-rcs
-# libtermcap doesn't support mostlyclean.
-mostlyclean-target-libtermcap:
+install-info-rcs: \
+ configure-rcs \
+ info-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-info 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-info) \
+ || exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup
-maybe-mostlyclean-target-winsup:
+.PHONY: maybe-install-html-rcs install-html-rcs
+maybe-install-html-rcs:
+@if rcs
+maybe-install-html-rcs: install-html-rcs
-mostlyclean-target-winsup:
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+install-html-rcs: \
+ configure-rcs \
+ html-rcs
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/winsup && \
+ echo "Doing install-html 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}" \
- mostlyclean) \
+ install-html) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss
-maybe-mostlyclean-target-libgloss:
+.PHONY: maybe-installcheck-rcs installcheck-rcs
+maybe-installcheck-rcs:
+@if rcs
+maybe-installcheck-rcs: installcheck-rcs
-mostlyclean-target-libgloss:
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+installcheck-rcs: \
+ configure-rcs
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
+ echo "Doing installcheck 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}" \
- mostlyclean) \
+ installcheck) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty
-maybe-mostlyclean-target-libiberty:
+.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs
+maybe-mostlyclean-rcs:
+@if rcs
+maybe-mostlyclean-rcs: mostlyclean-rcs
-mostlyclean-target-libiberty:
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+mostlyclean-rcs:
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
+ echo "Doing mostlyclean 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}" \
@@ -11870,343 +22369,388 @@ mostlyclean-target-libiberty:
mostlyclean) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf
-maybe-mostlyclean-target-gperf:
+.PHONY: maybe-clean-rcs clean-rcs
+maybe-clean-rcs:
+@if rcs
+maybe-clean-rcs: clean-rcs
-mostlyclean-target-gperf:
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+clean-rcs:
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/gperf && \
+ echo "Doing clean 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}" \
- mostlyclean) \
+ clean) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples
-maybe-mostlyclean-target-examples:
+.PHONY: maybe-distclean-rcs distclean-rcs
+maybe-distclean-rcs:
+@if rcs
+maybe-distclean-rcs: distclean-rcs
-mostlyclean-target-examples:
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+distclean-rcs:
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/examples && \
+ echo "Doing distclean 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}" \
- mostlyclean) \
+ distclean) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi
-maybe-mostlyclean-target-libffi:
+.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs
+maybe-maintainer-clean-rcs:
+@if rcs
+maybe-maintainer-clean-rcs: maintainer-clean-rcs
-mostlyclean-target-libffi:
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+maintainer-clean-rcs:
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libffi && \
+ echo "Doing maintainer-clean 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}" \
- mostlyclean) \
+ maintainer-clean) \
|| exit 1
+@endif rcs
-.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava
-maybe-mostlyclean-target-libjava:
-mostlyclean-target-libjava:
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+
+.PHONY: configure-readline maybe-configure-readline
+maybe-configure-readline:
+@if readline
+maybe-configure-readline: configure-readline
+configure-readline:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/readline/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/readline ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/readline; \
+ cd "$(HOST_SUBDIR)/readline" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/readline/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/readline"; \
+ libsrcdir="$$s/readline"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif readline
+
+
+
+
+
+.PHONY: all-readline maybe-all-readline
+maybe-all-readline:
+@if readline
+TARGET-readline=all
+maybe-all-readline: all-readline
+all-readline: configure-readline
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/readline && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-readline))
+@endif readline
+
+
+
+
+.PHONY: check-readline maybe-check-readline
+maybe-check-readline:
+@if readline
+maybe-check-readline: check-readline
+
+check-readline:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/readline && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif readline
+
+.PHONY: install-readline maybe-install-readline
+maybe-install-readline:
+@if readline
+maybe-install-readline: install-readline
+
+install-readline: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/readline && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif readline
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-readline info-readline
+maybe-info-readline:
+@if readline
+maybe-info-readline: info-readline
+
+info-readline: \
+ configure-readline
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libjava && \
+ echo "Doing info 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}" \
- mostlyclean) \
+ info) \
|| exit 1
+@endif readline
-.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib
-maybe-mostlyclean-target-zlib:
+.PHONY: maybe-dvi-readline dvi-readline
+maybe-dvi-readline:
+@if readline
+maybe-dvi-readline: dvi-readline
-mostlyclean-target-zlib:
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+dvi-readline: \
+ configure-readline
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/zlib && \
+ echo "Doing dvi 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}" \
- mostlyclean) \
+ dvi) \
|| exit 1
+@endif readline
-.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc
-maybe-mostlyclean-target-boehm-gc:
+.PHONY: maybe-html-readline html-readline
+maybe-html-readline:
+@if readline
+maybe-html-readline: html-readline
-mostlyclean-target-boehm-gc:
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+html-readline: \
+ configure-readline
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
+ echo "Doing html 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}" \
- mostlyclean) \
+ html) \
|| exit 1
+@endif readline
-.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads
-maybe-mostlyclean-target-qthreads:
+.PHONY: maybe-TAGS-readline TAGS-readline
+maybe-TAGS-readline:
+@if readline
+maybe-TAGS-readline: TAGS-readline
-mostlyclean-target-qthreads:
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+TAGS-readline: \
+ configure-readline
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/qthreads && \
+ echo "Doing TAGS 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}" \
- mostlyclean) \
+ TAGS) \
|| exit 1
+@endif readline
-.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda
-maybe-mostlyclean-target-rda:
+.PHONY: maybe-install-info-readline install-info-readline
+maybe-install-info-readline:
+@if readline
+maybe-install-info-readline: install-info-readline
-mostlyclean-target-rda:
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+install-info-readline: \
+ configure-readline \
+ info-readline
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/rda && \
+ echo "Doing install-info 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}" \
- mostlyclean) \
+ install-info) \
|| exit 1
+@endif readline
-.PHONY: maybe-mostlyclean-target-libada mostlyclean-target-libada
-maybe-mostlyclean-target-libada:
+.PHONY: maybe-install-html-readline install-html-readline
+maybe-install-html-readline:
+@if readline
+maybe-install-html-readline: install-html-readline
-mostlyclean-target-libada:
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+install-html-readline: \
+ configure-readline \
+ html-readline
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libada" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libada && \
+ echo "Doing install-html 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}" \
- mostlyclean) \
+ install-html) \
|| exit 1
+@endif readline
+.PHONY: maybe-installcheck-readline installcheck-readline
+maybe-installcheck-readline:
+@if readline
+maybe-installcheck-readline: installcheck-readline
-.PHONY: do-clean
-do-clean: clean-host clean-target
-
-.PHONY: clean-host
-clean-host: maybe-clean-gcc \
- maybe-clean-ash \
- maybe-clean-autoconf \
- maybe-clean-automake \
- maybe-clean-bash \
- maybe-clean-bfd \
- maybe-clean-opcodes \
- maybe-clean-binutils \
- maybe-clean-bison \
- maybe-clean-byacc \
- maybe-clean-bzip2 \
- maybe-clean-dejagnu \
- maybe-clean-diff \
- maybe-clean-dosutils \
- maybe-clean-etc \
- maybe-clean-fastjar \
- maybe-clean-fileutils \
- maybe-clean-findutils \
- maybe-clean-find \
- maybe-clean-flex \
- maybe-clean-gas \
- maybe-clean-gawk \
- maybe-clean-gettext \
- maybe-clean-gnuserv \
- maybe-clean-gprof \
- maybe-clean-gzip \
- maybe-clean-hello \
- maybe-clean-indent \
- maybe-clean-intl \
- maybe-clean-tcl \
- maybe-clean-itcl \
- maybe-clean-ld \
- maybe-clean-libgui \
- maybe-clean-libiberty \
- maybe-clean-libtool \
- maybe-clean-m4 \
- maybe-clean-make \
- maybe-clean-mmalloc \
- maybe-clean-patch \
- maybe-clean-perl \
- maybe-clean-prms \
- maybe-clean-rcs \
- maybe-clean-readline \
- maybe-clean-release \
- maybe-clean-recode \
- maybe-clean-sed \
- maybe-clean-send-pr \
- maybe-clean-shellutils \
- maybe-clean-sid \
- maybe-clean-sim \
- maybe-clean-tar \
- maybe-clean-texinfo \
- maybe-clean-textutils \
- maybe-clean-time \
- maybe-clean-uudecode \
- maybe-clean-wdiff \
- maybe-clean-zip \
- maybe-clean-zlib \
- maybe-clean-gdb \
- maybe-clean-expect \
- maybe-clean-guile \
- maybe-clean-tk \
- maybe-clean-tix \
- maybe-clean-libtermcap \
- maybe-clean-utils
-
-.PHONY: clean-target
-clean-target: \
- maybe-clean-target-libstdc++-v3 \
- maybe-clean-target-newlib \
- maybe-clean-target-libf2c \
- maybe-clean-target-libobjc \
- maybe-clean-target-libtermcap \
- maybe-clean-target-winsup \
- maybe-clean-target-libgloss \
- maybe-clean-target-libiberty \
- maybe-clean-target-gperf \
- maybe-clean-target-examples \
- maybe-clean-target-libffi \
- maybe-clean-target-libjava \
- maybe-clean-target-zlib \
- maybe-clean-target-boehm-gc \
- maybe-clean-target-qthreads \
- maybe-clean-target-rda \
- maybe-clean-target-libada
-
-# GCC, the eternal special case
-.PHONY: maybe-clean-gcc clean-gcc
-maybe-clean-gcc:
-clean-gcc:
- @[ -f ./gcc/Makefile ] || exit 0; \
+installcheck-readline: \
+ configure-readline
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gcc" ; \
- (cd gcc && \
+ echo "Doing installcheck 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}" \
- clean) \
+ installcheck) \
|| exit 1
-# Host modules.
+@endif readline
-.PHONY: maybe-clean-ash clean-ash
-maybe-clean-ash:
+.PHONY: maybe-mostlyclean-readline mostlyclean-readline
+maybe-mostlyclean-readline:
+@if readline
+maybe-mostlyclean-readline: mostlyclean-readline
-clean-ash:
- @[ -f ./ash/Makefile ] || exit 0; \
+mostlyclean-readline:
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in ash" ; \
- (cd ash && \
+ echo "Doing mostlyclean 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}" \
- clean) \
+ mostlyclean) \
|| exit 1
+@endif readline
-.PHONY: maybe-clean-autoconf clean-autoconf
-maybe-clean-autoconf:
+.PHONY: maybe-clean-readline clean-readline
+maybe-clean-readline:
+@if readline
+maybe-clean-readline: clean-readline
-clean-autoconf:
- @[ -f ./autoconf/Makefile ] || exit 0; \
+clean-readline:
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in autoconf" ; \
- (cd autoconf && \
+ echo "Doing clean 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}" \
@@ -12214,230 +22758,351 @@ clean-autoconf:
clean) \
|| exit 1
+@endif readline
-.PHONY: maybe-clean-automake clean-automake
-maybe-clean-automake:
+.PHONY: maybe-distclean-readline distclean-readline
+maybe-distclean-readline:
+@if readline
+maybe-distclean-readline: distclean-readline
-clean-automake:
- @[ -f ./automake/Makefile ] || exit 0; \
+distclean-readline:
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in automake" ; \
- (cd automake && \
+ echo "Doing distclean 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}" \
- clean) \
+ distclean) \
|| exit 1
+@endif readline
-.PHONY: maybe-clean-bash clean-bash
-maybe-clean-bash:
+.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline
+maybe-maintainer-clean-readline:
+@if readline
+maybe-maintainer-clean-readline: maintainer-clean-readline
-clean-bash:
- @[ -f ./bash/Makefile ] || exit 0; \
+maintainer-clean-readline:
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in bash" ; \
- (cd bash && \
+ echo "Doing maintainer-clean 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}" \
- clean) \
+ maintainer-clean) \
|| exit 1
+@endif readline
-.PHONY: maybe-clean-bfd clean-bfd
-maybe-clean-bfd:
-clean-bfd:
- @[ -f ./bfd/Makefile ] || exit 0; \
+
+.PHONY: configure-release maybe-configure-release
+maybe-configure-release:
+@if release
+maybe-configure-release: configure-release
+configure-release:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/release/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/release ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/release; \
+ cd "$(HOST_SUBDIR)/release" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/release/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/release"; \
+ libsrcdir="$$s/release"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif release
+
+
+
+
+
+.PHONY: all-release maybe-all-release
+maybe-all-release:
+@if release
+TARGET-release=all
+maybe-all-release: all-release
+all-release: configure-release
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/release && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-release))
+@endif release
+
+
+
+
+.PHONY: check-release maybe-check-release
+maybe-check-release:
+@if release
+maybe-check-release: check-release
+
+check-release:
+
+@endif release
+
+.PHONY: install-release maybe-install-release
+maybe-install-release:
+@if release
+maybe-install-release: install-release
+
+install-release:
+
+@endif release
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-release info-release
+maybe-info-release:
+@if release
+maybe-info-release: info-release
+
+info-release: \
+ configure-release
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in bfd" ; \
- (cd bfd && \
+ echo "Doing info 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}" \
- clean) \
+ info) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-opcodes clean-opcodes
-maybe-clean-opcodes:
+.PHONY: maybe-dvi-release dvi-release
+maybe-dvi-release:
+@if release
+maybe-dvi-release: dvi-release
-clean-opcodes:
- @[ -f ./opcodes/Makefile ] || exit 0; \
+dvi-release: \
+ configure-release
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in opcodes" ; \
- (cd opcodes && \
+ echo "Doing dvi 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}" \
- clean) \
+ dvi) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-binutils clean-binutils
-maybe-clean-binutils:
+.PHONY: maybe-html-release html-release
+maybe-html-release:
+@if release
+maybe-html-release: html-release
-clean-binutils:
- @[ -f ./binutils/Makefile ] || exit 0; \
+html-release: \
+ configure-release
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in binutils" ; \
- (cd binutils && \
+ echo "Doing html 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}" \
- clean) \
+ html) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-bison clean-bison
-maybe-clean-bison:
+.PHONY: maybe-TAGS-release TAGS-release
+maybe-TAGS-release:
+@if release
+maybe-TAGS-release: TAGS-release
-clean-bison:
- @[ -f ./bison/Makefile ] || exit 0; \
+TAGS-release: \
+ configure-release
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in bison" ; \
- (cd bison && \
+ echo "Doing TAGS 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}" \
- clean) \
+ TAGS) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-byacc clean-byacc
-maybe-clean-byacc:
+.PHONY: maybe-install-info-release install-info-release
+maybe-install-info-release:
+@if release
+maybe-install-info-release: install-info-release
-clean-byacc:
- @[ -f ./byacc/Makefile ] || exit 0; \
+install-info-release: \
+ configure-release \
+ info-release
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in byacc" ; \
- (cd byacc && \
+ echo "Doing install-info 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}" \
- clean) \
+ install-info) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-bzip2 clean-bzip2
-maybe-clean-bzip2:
+.PHONY: maybe-install-html-release install-html-release
+maybe-install-html-release:
+@if release
+maybe-install-html-release: install-html-release
-clean-bzip2:
- @[ -f ./bzip2/Makefile ] || exit 0; \
+install-html-release: \
+ configure-release \
+ html-release
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in bzip2" ; \
- (cd bzip2 && \
+ echo "Doing install-html 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}" \
- clean) \
+ install-html) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-dejagnu clean-dejagnu
-maybe-clean-dejagnu:
+.PHONY: maybe-installcheck-release installcheck-release
+maybe-installcheck-release:
+@if release
+maybe-installcheck-release: installcheck-release
-clean-dejagnu:
- @[ -f ./dejagnu/Makefile ] || exit 0; \
+installcheck-release: \
+ configure-release
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in dejagnu" ; \
- (cd dejagnu && \
+ echo "Doing installcheck 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}" \
- clean) \
+ installcheck) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-diff clean-diff
-maybe-clean-diff:
+.PHONY: maybe-mostlyclean-release mostlyclean-release
+maybe-mostlyclean-release:
+@if release
+maybe-mostlyclean-release: mostlyclean-release
-clean-diff:
- @[ -f ./diff/Makefile ] || exit 0; \
+mostlyclean-release:
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in diff" ; \
- (cd diff && \
+ echo "Doing mostlyclean 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}" \
- clean) \
+ mostlyclean) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-dosutils clean-dosutils
-maybe-clean-dosutils:
+.PHONY: maybe-clean-release clean-release
+maybe-clean-release:
+@if release
+maybe-clean-release: clean-release
-clean-dosutils:
- @[ -f ./dosutils/Makefile ] || exit 0; \
+clean-release:
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in dosutils" ; \
- (cd dosutils && \
+ echo "Doing clean 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}" \
@@ -12445,230 +23110,363 @@ clean-dosutils:
clean) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-etc clean-etc
-maybe-clean-etc:
+.PHONY: maybe-distclean-release distclean-release
+maybe-distclean-release:
+@if release
+maybe-distclean-release: distclean-release
-clean-etc:
- @[ -f ./etc/Makefile ] || exit 0; \
+distclean-release:
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in etc" ; \
- (cd etc && \
+ echo "Doing distclean 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}" \
- clean) \
+ distclean) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-fastjar clean-fastjar
-maybe-clean-fastjar:
+.PHONY: maybe-maintainer-clean-release maintainer-clean-release
+maybe-maintainer-clean-release:
+@if release
+maybe-maintainer-clean-release: maintainer-clean-release
-clean-fastjar:
- @[ -f ./fastjar/Makefile ] || exit 0; \
+maintainer-clean-release:
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in fastjar" ; \
- (cd fastjar && \
+ echo "Doing maintainer-clean 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}" \
- clean) \
+ maintainer-clean) \
|| exit 1
+@endif release
-.PHONY: maybe-clean-fileutils clean-fileutils
-maybe-clean-fileutils:
-clean-fileutils:
- @[ -f ./fileutils/Makefile ] || exit 0; \
+
+.PHONY: configure-recode maybe-configure-recode
+maybe-configure-recode:
+@if recode
+maybe-configure-recode: configure-recode
+configure-recode:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/recode/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/recode ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/recode; \
+ cd "$(HOST_SUBDIR)/recode" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/recode/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/recode"; \
+ libsrcdir="$$s/recode"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif recode
+
+
+
+
+
+.PHONY: all-recode maybe-all-recode
+maybe-all-recode:
+@if recode
+TARGET-recode=all
+maybe-all-recode: all-recode
+all-recode: configure-recode
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/recode && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-recode))
+@endif recode
+
+
+
+
+.PHONY: check-recode maybe-check-recode
+maybe-check-recode:
+@if recode
+maybe-check-recode: check-recode
+
+check-recode:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/recode && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif recode
+
+.PHONY: install-recode maybe-install-recode
+maybe-install-recode:
+@if recode
+maybe-install-recode: install-recode
+
+install-recode: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/recode && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif recode
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-recode info-recode
+maybe-info-recode:
+@if recode
+maybe-info-recode: info-recode
+
+info-recode: \
+ configure-recode
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in fileutils" ; \
- (cd fileutils && \
+ echo "Doing info 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}" \
- clean) \
+ info) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-findutils clean-findutils
-maybe-clean-findutils:
+.PHONY: maybe-dvi-recode dvi-recode
+maybe-dvi-recode:
+@if recode
+maybe-dvi-recode: dvi-recode
-clean-findutils:
- @[ -f ./findutils/Makefile ] || exit 0; \
+dvi-recode: \
+ configure-recode
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in findutils" ; \
- (cd findutils && \
+ echo "Doing dvi 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}" \
- clean) \
+ dvi) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-find clean-find
-maybe-clean-find:
+.PHONY: maybe-html-recode html-recode
+maybe-html-recode:
+@if recode
+maybe-html-recode: html-recode
-clean-find:
- @[ -f ./find/Makefile ] || exit 0; \
+html-recode: \
+ configure-recode
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in find" ; \
- (cd find && \
+ echo "Doing html 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}" \
- clean) \
+ html) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-flex clean-flex
-maybe-clean-flex:
+.PHONY: maybe-TAGS-recode TAGS-recode
+maybe-TAGS-recode:
+@if recode
+maybe-TAGS-recode: TAGS-recode
-clean-flex:
- @[ -f ./flex/Makefile ] || exit 0; \
+TAGS-recode: \
+ configure-recode
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in flex" ; \
- (cd flex && \
+ echo "Doing TAGS 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}" \
- clean) \
+ TAGS) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-gas clean-gas
-maybe-clean-gas:
+.PHONY: maybe-install-info-recode install-info-recode
+maybe-install-info-recode:
+@if recode
+maybe-install-info-recode: install-info-recode
-clean-gas:
- @[ -f ./gas/Makefile ] || exit 0; \
+install-info-recode: \
+ configure-recode \
+ info-recode
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gas" ; \
- (cd gas && \
+ echo "Doing install-info 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}" \
- clean) \
+ install-info) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-gawk clean-gawk
-maybe-clean-gawk:
+.PHONY: maybe-install-html-recode install-html-recode
+maybe-install-html-recode:
+@if recode
+maybe-install-html-recode: install-html-recode
-clean-gawk:
- @[ -f ./gawk/Makefile ] || exit 0; \
+install-html-recode: \
+ configure-recode \
+ html-recode
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gawk" ; \
- (cd gawk && \
+ echo "Doing install-html 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}" \
- clean) \
+ install-html) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-gettext clean-gettext
-maybe-clean-gettext:
+.PHONY: maybe-installcheck-recode installcheck-recode
+maybe-installcheck-recode:
+@if recode
+maybe-installcheck-recode: installcheck-recode
-clean-gettext:
- @[ -f ./gettext/Makefile ] || exit 0; \
+installcheck-recode: \
+ configure-recode
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gettext" ; \
- (cd gettext && \
+ echo "Doing installcheck 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}" \
- clean) \
+ installcheck) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-gnuserv clean-gnuserv
-maybe-clean-gnuserv:
+.PHONY: maybe-mostlyclean-recode mostlyclean-recode
+maybe-mostlyclean-recode:
+@if recode
+maybe-mostlyclean-recode: mostlyclean-recode
-clean-gnuserv:
- @[ -f ./gnuserv/Makefile ] || exit 0; \
+mostlyclean-recode:
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gnuserv" ; \
- (cd gnuserv && \
+ echo "Doing mostlyclean 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}" \
- clean) \
+ mostlyclean) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-gprof clean-gprof
-maybe-clean-gprof:
+.PHONY: maybe-clean-recode clean-recode
+maybe-clean-recode:
+@if recode
+maybe-clean-recode: clean-recode
-clean-gprof:
- @[ -f ./gprof/Makefile ] || exit 0; \
+clean-recode:
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gprof" ; \
- (cd gprof && \
+ echo "Doing clean 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}" \
@@ -12676,230 +23474,363 @@ clean-gprof:
clean) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-gzip clean-gzip
-maybe-clean-gzip:
+.PHONY: maybe-distclean-recode distclean-recode
+maybe-distclean-recode:
+@if recode
+maybe-distclean-recode: distclean-recode
-clean-gzip:
- @[ -f ./gzip/Makefile ] || exit 0; \
+distclean-recode:
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gzip" ; \
- (cd gzip && \
+ echo "Doing distclean 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}" \
- clean) \
+ distclean) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-hello clean-hello
-maybe-clean-hello:
+.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode
+maybe-maintainer-clean-recode:
+@if recode
+maybe-maintainer-clean-recode: maintainer-clean-recode
-clean-hello:
- @[ -f ./hello/Makefile ] || exit 0; \
+maintainer-clean-recode:
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in hello" ; \
- (cd hello && \
+ echo "Doing maintainer-clean 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}" \
- clean) \
+ maintainer-clean) \
|| exit 1
+@endif recode
-.PHONY: maybe-clean-indent clean-indent
-maybe-clean-indent:
-clean-indent:
- @[ -f ./indent/Makefile ] || exit 0; \
+
+.PHONY: configure-sed maybe-configure-sed
+maybe-configure-sed:
+@if sed
+maybe-configure-sed: configure-sed
+configure-sed:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/sed/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sed ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/sed; \
+ cd "$(HOST_SUBDIR)/sed" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/sed/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/sed"; \
+ libsrcdir="$$s/sed"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif sed
+
+
+
+
+
+.PHONY: all-sed maybe-all-sed
+maybe-all-sed:
+@if sed
+TARGET-sed=all
+maybe-all-sed: all-sed
+all-sed: configure-sed
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sed && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-sed))
+@endif sed
+
+
+
+
+.PHONY: check-sed maybe-check-sed
+maybe-check-sed:
+@if sed
+maybe-check-sed: check-sed
+
+check-sed:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sed && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif sed
+
+.PHONY: install-sed maybe-install-sed
+maybe-install-sed:
+@if sed
+maybe-install-sed: install-sed
+
+install-sed: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sed && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif sed
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-sed info-sed
+maybe-info-sed:
+@if sed
+maybe-info-sed: info-sed
+
+info-sed: \
+ configure-sed
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in indent" ; \
- (cd indent && \
+ echo "Doing info 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}" \
- clean) \
+ info) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-intl clean-intl
-maybe-clean-intl:
+.PHONY: maybe-dvi-sed dvi-sed
+maybe-dvi-sed:
+@if sed
+maybe-dvi-sed: dvi-sed
-clean-intl:
- @[ -f ./intl/Makefile ] || exit 0; \
+dvi-sed: \
+ configure-sed
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in intl" ; \
- (cd intl && \
+ echo "Doing dvi 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}" \
- clean) \
+ dvi) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-tcl clean-tcl
-maybe-clean-tcl:
+.PHONY: maybe-html-sed html-sed
+maybe-html-sed:
+@if sed
+maybe-html-sed: html-sed
-clean-tcl:
- @[ -f ./tcl/Makefile ] || exit 0; \
+html-sed: \
+ configure-sed
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in tcl" ; \
- (cd tcl && \
+ echo "Doing html 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}" \
- clean) \
+ html) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-itcl clean-itcl
-maybe-clean-itcl:
+.PHONY: maybe-TAGS-sed TAGS-sed
+maybe-TAGS-sed:
+@if sed
+maybe-TAGS-sed: TAGS-sed
-clean-itcl:
- @[ -f ./itcl/Makefile ] || exit 0; \
+TAGS-sed: \
+ configure-sed
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in itcl" ; \
- (cd itcl && \
+ echo "Doing TAGS 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}" \
- clean) \
+ TAGS) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-ld clean-ld
-maybe-clean-ld:
+.PHONY: maybe-install-info-sed install-info-sed
+maybe-install-info-sed:
+@if sed
+maybe-install-info-sed: install-info-sed
-clean-ld:
- @[ -f ./ld/Makefile ] || exit 0; \
+install-info-sed: \
+ configure-sed \
+ info-sed
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in ld" ; \
- (cd ld && \
+ echo "Doing install-info 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}" \
- clean) \
+ install-info) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-libgui clean-libgui
-maybe-clean-libgui:
+.PHONY: maybe-install-html-sed install-html-sed
+maybe-install-html-sed:
+@if sed
+maybe-install-html-sed: install-html-sed
-clean-libgui:
- @[ -f ./libgui/Makefile ] || exit 0; \
+install-html-sed: \
+ configure-sed \
+ html-sed
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libgui" ; \
- (cd libgui && \
+ echo "Doing install-html 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}" \
- clean) \
+ install-html) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-libiberty clean-libiberty
-maybe-clean-libiberty:
+.PHONY: maybe-installcheck-sed installcheck-sed
+maybe-installcheck-sed:
+@if sed
+maybe-installcheck-sed: installcheck-sed
-clean-libiberty:
- @[ -f ./libiberty/Makefile ] || exit 0; \
+installcheck-sed: \
+ configure-sed
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libiberty" ; \
- (cd libiberty && \
+ echo "Doing installcheck 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}" \
- clean) \
+ installcheck) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-libtool clean-libtool
-maybe-clean-libtool:
+.PHONY: maybe-mostlyclean-sed mostlyclean-sed
+maybe-mostlyclean-sed:
+@if sed
+maybe-mostlyclean-sed: mostlyclean-sed
-clean-libtool:
- @[ -f ./libtool/Makefile ] || exit 0; \
+mostlyclean-sed:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libtool" ; \
- (cd libtool && \
+ echo "Doing mostlyclean 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}" \
- clean) \
+ mostlyclean) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-m4 clean-m4
-maybe-clean-m4:
+.PHONY: maybe-clean-sed clean-sed
+maybe-clean-sed:
+@if sed
+maybe-clean-sed: clean-sed
-clean-m4:
- @[ -f ./m4/Makefile ] || exit 0; \
+clean-sed:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in m4" ; \
- (cd m4 && \
+ echo "Doing clean 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}" \
@@ -12907,230 +23838,363 @@ clean-m4:
clean) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-make clean-make
-maybe-clean-make:
+.PHONY: maybe-distclean-sed distclean-sed
+maybe-distclean-sed:
+@if sed
+maybe-distclean-sed: distclean-sed
-clean-make:
- @[ -f ./make/Makefile ] || exit 0; \
+distclean-sed:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in make" ; \
- (cd make && \
+ echo "Doing distclean 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}" \
- clean) \
+ distclean) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-mmalloc clean-mmalloc
-maybe-clean-mmalloc:
+.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed
+maybe-maintainer-clean-sed:
+@if sed
+maybe-maintainer-clean-sed: maintainer-clean-sed
-clean-mmalloc:
- @[ -f ./mmalloc/Makefile ] || exit 0; \
+maintainer-clean-sed:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in mmalloc" ; \
- (cd mmalloc && \
+ echo "Doing maintainer-clean 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}" \
- clean) \
+ maintainer-clean) \
|| exit 1
+@endif sed
-.PHONY: maybe-clean-patch clean-patch
-maybe-clean-patch:
-clean-patch:
- @[ -f ./patch/Makefile ] || exit 0; \
+
+.PHONY: configure-send-pr maybe-configure-send-pr
+maybe-configure-send-pr:
+@if send-pr
+maybe-configure-send-pr: configure-send-pr
+configure-send-pr:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/send-pr/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/send-pr ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/send-pr; \
+ cd "$(HOST_SUBDIR)/send-pr" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/send-pr/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/send-pr"; \
+ libsrcdir="$$s/send-pr"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif send-pr
+
+
+
+
+
+.PHONY: all-send-pr maybe-all-send-pr
+maybe-all-send-pr:
+@if send-pr
+TARGET-send-pr=all
+maybe-all-send-pr: all-send-pr
+all-send-pr: configure-send-pr
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/send-pr && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-send-pr))
+@endif send-pr
+
+
+
+
+.PHONY: check-send-pr maybe-check-send-pr
+maybe-check-send-pr:
+@if send-pr
+maybe-check-send-pr: check-send-pr
+
+check-send-pr:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/send-pr && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif send-pr
+
+.PHONY: install-send-pr maybe-install-send-pr
+maybe-install-send-pr:
+@if send-pr
+maybe-install-send-pr: install-send-pr
+
+install-send-pr: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/send-pr && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif send-pr
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-send-pr info-send-pr
+maybe-info-send-pr:
+@if send-pr
+maybe-info-send-pr: info-send-pr
+
+info-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; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in patch" ; \
- (cd patch && \
+ echo "Doing info 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}" \
- clean) \
+ info) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-perl clean-perl
-maybe-clean-perl:
+.PHONY: maybe-dvi-send-pr dvi-send-pr
+maybe-dvi-send-pr:
+@if send-pr
+maybe-dvi-send-pr: dvi-send-pr
-clean-perl:
- @[ -f ./perl/Makefile ] || exit 0; \
+dvi-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; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in perl" ; \
- (cd perl && \
+ echo "Doing dvi 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}" \
- clean) \
+ dvi) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-prms clean-prms
-maybe-clean-prms:
+.PHONY: maybe-html-send-pr html-send-pr
+maybe-html-send-pr:
+@if send-pr
+maybe-html-send-pr: html-send-pr
-clean-prms:
- @[ -f ./prms/Makefile ] || exit 0; \
+html-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; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in prms" ; \
- (cd prms && \
+ echo "Doing html 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}" \
- clean) \
+ html) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-rcs clean-rcs
-maybe-clean-rcs:
+.PHONY: maybe-TAGS-send-pr TAGS-send-pr
+maybe-TAGS-send-pr:
+@if send-pr
+maybe-TAGS-send-pr: TAGS-send-pr
-clean-rcs:
- @[ -f ./rcs/Makefile ] || exit 0; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in rcs" ; \
- (cd rcs && \
+ echo "Doing TAGS 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}" \
- clean) \
+ TAGS) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-readline clean-readline
-maybe-clean-readline:
+.PHONY: maybe-install-info-send-pr install-info-send-pr
+maybe-install-info-send-pr:
+@if send-pr
+maybe-install-info-send-pr: install-info-send-pr
-clean-readline:
- @[ -f ./readline/Makefile ] || exit 0; \
+install-info-send-pr: \
+ configure-send-pr \
+ info-send-pr
+ @: $(MAKE); $(unstage)
+ @[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in readline" ; \
- (cd readline && \
+ echo "Doing install-info 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}" \
- clean) \
+ install-info) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-release clean-release
-maybe-clean-release:
+.PHONY: maybe-install-html-send-pr install-html-send-pr
+maybe-install-html-send-pr:
+@if send-pr
+maybe-install-html-send-pr: install-html-send-pr
-clean-release:
- @[ -f ./release/Makefile ] || exit 0; \
+install-html-send-pr: \
+ configure-send-pr \
+ html-send-pr
+ @: $(MAKE); $(unstage)
+ @[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in release" ; \
- (cd release && \
+ echo "Doing install-html 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}" \
- clean) \
+ install-html) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-recode clean-recode
-maybe-clean-recode:
+.PHONY: maybe-installcheck-send-pr installcheck-send-pr
+maybe-installcheck-send-pr:
+@if send-pr
+maybe-installcheck-send-pr: installcheck-send-pr
-clean-recode:
- @[ -f ./recode/Makefile ] || exit 0; \
+installcheck-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; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in recode" ; \
- (cd recode && \
+ echo "Doing installcheck 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}" \
- clean) \
+ installcheck) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-sed clean-sed
-maybe-clean-sed:
+.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr
+maybe-mostlyclean-send-pr:
+@if send-pr
+maybe-mostlyclean-send-pr: mostlyclean-send-pr
-clean-sed:
- @[ -f ./sed/Makefile ] || exit 0; \
+mostlyclean-send-pr:
+ @: $(MAKE); $(unstage)
+ @[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in sed" ; \
- (cd sed && \
+ echo "Doing mostlyclean 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}" \
- clean) \
+ mostlyclean) \
|| exit 1
+@endif send-pr
.PHONY: maybe-clean-send-pr clean-send-pr
maybe-clean-send-pr:
+@if send-pr
+maybe-clean-send-pr: clean-send-pr
clean-send-pr:
+ @: $(MAKE); $(unstage)
@[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
echo "Doing clean in send-pr" ; \
- (cd 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}" \
@@ -13138,230 +24202,363 @@ clean-send-pr:
clean) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-shellutils clean-shellutils
-maybe-clean-shellutils:
+.PHONY: maybe-distclean-send-pr distclean-send-pr
+maybe-distclean-send-pr:
+@if send-pr
+maybe-distclean-send-pr: distclean-send-pr
-clean-shellutils:
- @[ -f ./shellutils/Makefile ] || exit 0; \
+distclean-send-pr:
+ @: $(MAKE); $(unstage)
+ @[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in shellutils" ; \
- (cd shellutils && \
+ echo "Doing distclean 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}" \
- clean) \
+ distclean) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-sid clean-sid
-maybe-clean-sid:
+.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr
+maybe-maintainer-clean-send-pr:
+@if send-pr
+maybe-maintainer-clean-send-pr: maintainer-clean-send-pr
-clean-sid:
- @[ -f ./sid/Makefile ] || exit 0; \
+maintainer-clean-send-pr:
+ @: $(MAKE); $(unstage)
+ @[ -f ./send-pr/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in sid" ; \
- (cd sid && \
+ echo "Doing maintainer-clean 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}" \
- clean) \
+ maintainer-clean) \
|| exit 1
+@endif send-pr
-.PHONY: maybe-clean-sim clean-sim
-maybe-clean-sim:
-clean-sim:
- @[ -f ./sim/Makefile ] || exit 0; \
+
+.PHONY: configure-shellutils maybe-configure-shellutils
+maybe-configure-shellutils:
+@if shellutils
+maybe-configure-shellutils: configure-shellutils
+configure-shellutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/shellutils/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/shellutils ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/shellutils; \
+ cd "$(HOST_SUBDIR)/shellutils" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/shellutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/shellutils"; \
+ libsrcdir="$$s/shellutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif shellutils
+
+
+
+
+
+.PHONY: all-shellutils maybe-all-shellutils
+maybe-all-shellutils:
+@if shellutils
+TARGET-shellutils=all
+maybe-all-shellutils: all-shellutils
+all-shellutils: configure-shellutils
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/shellutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-shellutils))
+@endif shellutils
+
+
+
+
+.PHONY: check-shellutils maybe-check-shellutils
+maybe-check-shellutils:
+@if shellutils
+maybe-check-shellutils: check-shellutils
+
+check-shellutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/shellutils && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif shellutils
+
+.PHONY: install-shellutils maybe-install-shellutils
+maybe-install-shellutils:
+@if shellutils
+maybe-install-shellutils: install-shellutils
+
+install-shellutils: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/shellutils && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif shellutils
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-shellutils info-shellutils
+maybe-info-shellutils:
+@if shellutils
+maybe-info-shellutils: info-shellutils
+
+info-shellutils: \
+ configure-shellutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in sim" ; \
- (cd sim && \
+ echo "Doing info 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}" \
- clean) \
+ info) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-tar clean-tar
-maybe-clean-tar:
+.PHONY: maybe-dvi-shellutils dvi-shellutils
+maybe-dvi-shellutils:
+@if shellutils
+maybe-dvi-shellutils: dvi-shellutils
-clean-tar:
- @[ -f ./tar/Makefile ] || exit 0; \
+dvi-shellutils: \
+ configure-shellutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in tar" ; \
- (cd tar && \
+ echo "Doing dvi 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}" \
- clean) \
+ dvi) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-texinfo clean-texinfo
-maybe-clean-texinfo:
+.PHONY: maybe-html-shellutils html-shellutils
+maybe-html-shellutils:
+@if shellutils
+maybe-html-shellutils: html-shellutils
-clean-texinfo:
- @[ -f ./texinfo/Makefile ] || exit 0; \
+html-shellutils: \
+ configure-shellutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in texinfo" ; \
- (cd texinfo && \
+ echo "Doing html 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}" \
- clean) \
+ html) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-textutils clean-textutils
-maybe-clean-textutils:
+.PHONY: maybe-TAGS-shellutils TAGS-shellutils
+maybe-TAGS-shellutils:
+@if shellutils
+maybe-TAGS-shellutils: TAGS-shellutils
-clean-textutils:
- @[ -f ./textutils/Makefile ] || exit 0; \
+TAGS-shellutils: \
+ configure-shellutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in textutils" ; \
- (cd textutils && \
+ echo "Doing TAGS 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}" \
- clean) \
+ TAGS) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-time clean-time
-maybe-clean-time:
+.PHONY: maybe-install-info-shellutils install-info-shellutils
+maybe-install-info-shellutils:
+@if shellutils
+maybe-install-info-shellutils: install-info-shellutils
-clean-time:
- @[ -f ./time/Makefile ] || exit 0; \
+install-info-shellutils: \
+ configure-shellutils \
+ info-shellutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in time" ; \
- (cd time && \
+ echo "Doing install-info 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}" \
- clean) \
+ install-info) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-uudecode clean-uudecode
-maybe-clean-uudecode:
+.PHONY: maybe-install-html-shellutils install-html-shellutils
+maybe-install-html-shellutils:
+@if shellutils
+maybe-install-html-shellutils: install-html-shellutils
-clean-uudecode:
- @[ -f ./uudecode/Makefile ] || exit 0; \
+install-html-shellutils: \
+ configure-shellutils \
+ html-shellutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in uudecode" ; \
- (cd uudecode && \
+ echo "Doing install-html 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}" \
- clean) \
+ install-html) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-wdiff clean-wdiff
-maybe-clean-wdiff:
+.PHONY: maybe-installcheck-shellutils installcheck-shellutils
+maybe-installcheck-shellutils:
+@if shellutils
+maybe-installcheck-shellutils: installcheck-shellutils
-clean-wdiff:
- @[ -f ./wdiff/Makefile ] || exit 0; \
+installcheck-shellutils: \
+ configure-shellutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in wdiff" ; \
- (cd wdiff && \
+ echo "Doing installcheck 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}" \
- clean) \
+ installcheck) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-zip clean-zip
-maybe-clean-zip:
+.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils
+maybe-mostlyclean-shellutils:
+@if shellutils
+maybe-mostlyclean-shellutils: mostlyclean-shellutils
-clean-zip:
- @[ -f ./zip/Makefile ] || exit 0; \
+mostlyclean-shellutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in zip" ; \
- (cd zip && \
+ echo "Doing mostlyclean 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}" \
- clean) \
+ mostlyclean) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-zlib clean-zlib
-maybe-clean-zlib:
+.PHONY: maybe-clean-shellutils clean-shellutils
+maybe-clean-shellutils:
+@if shellutils
+maybe-clean-shellutils: clean-shellutils
-clean-zlib:
- @[ -f ./zlib/Makefile ] || exit 0; \
+clean-shellutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in zlib" ; \
- (cd zlib && \
+ echo "Doing clean 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}" \
@@ -13369,219 +24566,363 @@ clean-zlib:
clean) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-gdb clean-gdb
-maybe-clean-gdb:
+.PHONY: maybe-distclean-shellutils distclean-shellutils
+maybe-distclean-shellutils:
+@if shellutils
+maybe-distclean-shellutils: distclean-shellutils
-clean-gdb:
- @[ -f ./gdb/Makefile ] || exit 0; \
+distclean-shellutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gdb" ; \
- (cd gdb && \
+ echo "Doing distclean 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}" \
- clean) \
+ distclean) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-expect clean-expect
-maybe-clean-expect:
+.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils
+maybe-maintainer-clean-shellutils:
+@if shellutils
+maybe-maintainer-clean-shellutils: maintainer-clean-shellutils
-clean-expect:
- @[ -f ./expect/Makefile ] || exit 0; \
+maintainer-clean-shellutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in expect" ; \
- (cd expect && \
+ echo "Doing maintainer-clean 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}" \
- clean) \
+ maintainer-clean) \
|| exit 1
+@endif shellutils
-.PHONY: maybe-clean-guile clean-guile
-maybe-clean-guile:
-clean-guile:
- @[ -f ./guile/Makefile ] || exit 0; \
+
+.PHONY: configure-sid maybe-configure-sid
+maybe-configure-sid:
+@if sid
+maybe-configure-sid: configure-sid
+configure-sid:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/sid/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sid ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/sid; \
+ cd "$(HOST_SUBDIR)/sid" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/sid/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/sid"; \
+ libsrcdir="$$s/sid"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif sid
+
+
+
+
+
+.PHONY: all-sid maybe-all-sid
+maybe-all-sid:
+@if sid
+TARGET-sid=all
+maybe-all-sid: all-sid
+all-sid: configure-sid
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sid && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-sid))
+@endif sid
+
+
+
+
+.PHONY: check-sid maybe-check-sid
+maybe-check-sid:
+@if sid
+maybe-check-sid: check-sid
+
+check-sid:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sid && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif sid
+
+.PHONY: install-sid maybe-install-sid
+maybe-install-sid:
+@if sid
+maybe-install-sid: install-sid
+
+install-sid: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sid && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif sid
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-sid info-sid
+maybe-info-sid:
+@if sid
+maybe-info-sid: info-sid
+
+info-sid: \
+ configure-sid
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in guile" ; \
- (cd guile && \
+ echo "Doing info 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}" \
- clean) \
+ info) \
|| exit 1
+@endif sid
-.PHONY: maybe-clean-tk clean-tk
-maybe-clean-tk:
+.PHONY: maybe-dvi-sid dvi-sid
+maybe-dvi-sid:
+@if sid
+maybe-dvi-sid: dvi-sid
-clean-tk:
- @[ -f ./tk/Makefile ] || exit 0; \
+dvi-sid: \
+ configure-sid
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in tk" ; \
- (cd tk && \
+ echo "Doing dvi 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}" \
- clean) \
+ dvi) \
|| exit 1
+@endif sid
-.PHONY: maybe-clean-tix clean-tix
-maybe-clean-tix:
+.PHONY: maybe-html-sid html-sid
+maybe-html-sid:
+@if sid
+maybe-html-sid: html-sid
-clean-tix:
- @[ -f ./tix/Makefile ] || exit 0; \
+html-sid: \
+ configure-sid
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in tix" ; \
- (cd tix && \
+ echo "Doing html 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}" \
- clean) \
+ html) \
|| exit 1
+@endif sid
-.PHONY: maybe-clean-libtermcap clean-libtermcap
-maybe-clean-libtermcap:
+.PHONY: maybe-TAGS-sid TAGS-sid
+maybe-TAGS-sid:
+@if sid
+maybe-TAGS-sid: TAGS-sid
-# libtermcap doesn't support clean.
-clean-libtermcap:
+TAGS-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 TAGS 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}" \
+ TAGS) \
+ || exit 1
+@endif sid
-.PHONY: maybe-clean-utils clean-utils
-maybe-clean-utils:
+.PHONY: maybe-install-info-sid install-info-sid
+maybe-install-info-sid:
+@if sid
+maybe-install-info-sid: install-info-sid
-clean-utils:
- @[ -f ./utils/Makefile ] || exit 0; \
+install-info-sid: \
+ configure-sid \
+ info-sid
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in utils" ; \
- (cd utils && \
+ echo "Doing install-info 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}" \
- clean) \
+ install-info) \
|| exit 1
+@endif sid
+.PHONY: maybe-install-html-sid install-html-sid
+maybe-install-html-sid:
+@if sid
+maybe-install-html-sid: install-html-sid
-# Target modules.
-
-.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3
-maybe-clean-target-libstdc++-v3:
-
-clean-target-libstdc++-v3:
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+install-html-sid: \
+ configure-sid \
+ html-sid
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ echo "Doing install-html 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}" \
- clean) \
+ install-html) \
|| exit 1
+@endif sid
-.PHONY: maybe-clean-target-newlib clean-target-newlib
-maybe-clean-target-newlib:
+.PHONY: maybe-installcheck-sid installcheck-sid
+maybe-installcheck-sid:
+@if sid
+maybe-installcheck-sid: installcheck-sid
-clean-target-newlib:
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+installcheck-sid: \
+ configure-sid
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ echo "Doing installcheck 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}" \
- clean) \
+ installcheck) \
|| exit 1
+@endif sid
-.PHONY: maybe-clean-target-libf2c clean-target-libf2c
-maybe-clean-target-libf2c:
+.PHONY: maybe-mostlyclean-sid mostlyclean-sid
+maybe-mostlyclean-sid:
+@if sid
+maybe-mostlyclean-sid: mostlyclean-sid
-clean-target-libf2c:
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+mostlyclean-sid:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ echo "Doing mostlyclean 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}" \
- clean) \
+ mostlyclean) \
|| exit 1
+@endif sid
-.PHONY: maybe-clean-target-libobjc clean-target-libobjc
-maybe-clean-target-libobjc:
+.PHONY: maybe-clean-sid clean-sid
+maybe-clean-sid:
+@if sid
+maybe-clean-sid: clean-sid
-clean-target-libobjc:
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+clean-sid:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
+ echo "Doing clean 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}" \
@@ -13589,216 +24930,363 @@ clean-target-libobjc:
clean) \
|| exit 1
+@endif sid
-.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap
-maybe-clean-target-libtermcap:
+.PHONY: maybe-distclean-sid distclean-sid
+maybe-distclean-sid:
+@if sid
+maybe-distclean-sid: distclean-sid
-# libtermcap doesn't support clean.
-clean-target-libtermcap:
+distclean-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 distclean 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}" \
+ distclean) \
+ || exit 1
+@endif sid
-.PHONY: maybe-clean-target-winsup clean-target-winsup
-maybe-clean-target-winsup:
+.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid
+maybe-maintainer-clean-sid:
+@if sid
+maybe-maintainer-clean-sid: maintainer-clean-sid
-clean-target-winsup:
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+maintainer-clean-sid:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/winsup && \
+ echo "Doing maintainer-clean 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}" \
- clean) \
+ maintainer-clean) \
|| exit 1
+@endif sid
-.PHONY: maybe-clean-target-libgloss clean-target-libgloss
-maybe-clean-target-libgloss:
-clean-target-libgloss:
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+
+.PHONY: configure-sim maybe-configure-sim
+maybe-configure-sim:
+@if sim
+maybe-configure-sim: configure-sim
+configure-sim:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/sim/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sim ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/sim; \
+ cd "$(HOST_SUBDIR)/sim" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/sim/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/sim"; \
+ libsrcdir="$$s/sim"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif sim
+
+
+
+
+
+.PHONY: all-sim maybe-all-sim
+maybe-all-sim:
+@if sim
+TARGET-sim=all
+maybe-all-sim: all-sim
+all-sim: configure-sim
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sim && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-sim))
+@endif sim
+
+
+
+
+.PHONY: check-sim maybe-check-sim
+maybe-check-sim:
+@if sim
+maybe-check-sim: check-sim
+
+check-sim:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sim && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif sim
+
+.PHONY: install-sim maybe-install-sim
+maybe-install-sim:
+@if sim
+maybe-install-sim: install-sim
+
+install-sim: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sim && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif sim
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-sim info-sim
+maybe-info-sim:
+@if sim
+maybe-info-sim: info-sim
+
+info-sim: \
+ configure-sim
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
+ echo "Doing info 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}" \
- clean) \
+ info) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-libiberty clean-target-libiberty
-maybe-clean-target-libiberty:
+.PHONY: maybe-dvi-sim dvi-sim
+maybe-dvi-sim:
+@if sim
+maybe-dvi-sim: dvi-sim
-clean-target-libiberty:
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+dvi-sim: \
+ configure-sim
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
+ echo "Doing dvi 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}" \
- clean) \
+ dvi) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-gperf clean-target-gperf
-maybe-clean-target-gperf:
+.PHONY: maybe-html-sim html-sim
+maybe-html-sim:
+@if sim
+maybe-html-sim: html-sim
-clean-target-gperf:
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+html-sim: \
+ configure-sim
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/gperf && \
+ echo "Doing html 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}" \
- clean) \
+ html) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-examples clean-target-examples
-maybe-clean-target-examples:
+.PHONY: maybe-TAGS-sim TAGS-sim
+maybe-TAGS-sim:
+@if sim
+maybe-TAGS-sim: TAGS-sim
-clean-target-examples:
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+TAGS-sim: \
+ configure-sim
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/examples && \
+ echo "Doing TAGS 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}" \
- clean) \
+ TAGS) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-libffi clean-target-libffi
-maybe-clean-target-libffi:
+.PHONY: maybe-install-info-sim install-info-sim
+maybe-install-info-sim:
+@if sim
+maybe-install-info-sim: install-info-sim
-clean-target-libffi:
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+install-info-sim: \
+ configure-sim \
+ info-sim
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libffi && \
+ echo "Doing install-info 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}" \
- clean) \
+ install-info) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-libjava clean-target-libjava
-maybe-clean-target-libjava:
+.PHONY: maybe-install-html-sim install-html-sim
+maybe-install-html-sim:
+@if sim
+maybe-install-html-sim: install-html-sim
-clean-target-libjava:
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+install-html-sim: \
+ configure-sim \
+ html-sim
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libjava && \
+ echo "Doing install-html 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}" \
- clean) \
+ install-html) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-zlib clean-target-zlib
-maybe-clean-target-zlib:
+.PHONY: maybe-installcheck-sim installcheck-sim
+maybe-installcheck-sim:
+@if sim
+maybe-installcheck-sim: installcheck-sim
-clean-target-zlib:
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+installcheck-sim: \
+ configure-sim
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/zlib && \
+ echo "Doing installcheck 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}" \
- clean) \
+ installcheck) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc
-maybe-clean-target-boehm-gc:
+.PHONY: maybe-mostlyclean-sim mostlyclean-sim
+maybe-mostlyclean-sim:
+@if sim
+maybe-mostlyclean-sim: mostlyclean-sim
-clean-target-boehm-gc:
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+mostlyclean-sim:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
+ echo "Doing mostlyclean 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}" \
- clean) \
+ mostlyclean) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-qthreads clean-target-qthreads
-maybe-clean-target-qthreads:
+.PHONY: maybe-clean-sim clean-sim
+maybe-clean-sim:
+@if sim
+maybe-clean-sim: clean-sim
-clean-target-qthreads:
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+clean-sim:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/qthreads && \
+ echo "Doing clean 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}" \
@@ -13806,343 +25294,388 @@ clean-target-qthreads:
clean) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-rda clean-target-rda
-maybe-clean-target-rda:
+.PHONY: maybe-distclean-sim distclean-sim
+maybe-distclean-sim:
+@if sim
+maybe-distclean-sim: distclean-sim
-clean-target-rda:
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+distclean-sim:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/rda && \
+ echo "Doing distclean 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}" \
- clean) \
+ distclean) \
|| exit 1
+@endif sim
-.PHONY: maybe-clean-target-libada clean-target-libada
-maybe-clean-target-libada:
+.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim
+maybe-maintainer-clean-sim:
+@if sim
+maybe-maintainer-clean-sim: maintainer-clean-sim
-clean-target-libada:
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+maintainer-clean-sim:
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing clean in $(TARGET_SUBDIR)/libada" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libada && \
+ echo "Doing maintainer-clean 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}" \
- clean) \
+ maintainer-clean) \
|| exit 1
+@endif sim
-.PHONY: do-distclean
-do-distclean: distclean-host distclean-target
-.PHONY: distclean-host
-distclean-host: maybe-distclean-gcc \
- maybe-distclean-ash \
- maybe-distclean-autoconf \
- maybe-distclean-automake \
- maybe-distclean-bash \
- maybe-distclean-bfd \
- maybe-distclean-opcodes \
- maybe-distclean-binutils \
- maybe-distclean-bison \
- maybe-distclean-byacc \
- maybe-distclean-bzip2 \
- maybe-distclean-dejagnu \
- maybe-distclean-diff \
- maybe-distclean-dosutils \
- maybe-distclean-etc \
- maybe-distclean-fastjar \
- maybe-distclean-fileutils \
- maybe-distclean-findutils \
- maybe-distclean-find \
- maybe-distclean-flex \
- maybe-distclean-gas \
- maybe-distclean-gawk \
- maybe-distclean-gettext \
- maybe-distclean-gnuserv \
- maybe-distclean-gprof \
- maybe-distclean-gzip \
- maybe-distclean-hello \
- maybe-distclean-indent \
- maybe-distclean-intl \
- maybe-distclean-tcl \
- maybe-distclean-itcl \
- maybe-distclean-ld \
- maybe-distclean-libgui \
- maybe-distclean-libiberty \
- maybe-distclean-libtool \
- maybe-distclean-m4 \
- maybe-distclean-make \
- maybe-distclean-mmalloc \
- maybe-distclean-patch \
- maybe-distclean-perl \
- maybe-distclean-prms \
- maybe-distclean-rcs \
- maybe-distclean-readline \
- maybe-distclean-release \
- maybe-distclean-recode \
- maybe-distclean-sed \
- maybe-distclean-send-pr \
- maybe-distclean-shellutils \
- maybe-distclean-sid \
- maybe-distclean-sim \
- maybe-distclean-tar \
- maybe-distclean-texinfo \
- maybe-distclean-textutils \
- maybe-distclean-time \
- maybe-distclean-uudecode \
- maybe-distclean-wdiff \
- maybe-distclean-zip \
- maybe-distclean-zlib \
- maybe-distclean-gdb \
- maybe-distclean-expect \
- maybe-distclean-guile \
- maybe-distclean-tk \
- maybe-distclean-tix \
- maybe-distclean-libtermcap \
- maybe-distclean-utils
+.PHONY: configure-tar maybe-configure-tar
+maybe-configure-tar:
+@if tar
+maybe-configure-tar: configure-tar
+configure-tar:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/tar/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tar ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/tar; \
+ cd "$(HOST_SUBDIR)/tar" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/tar/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/tar"; \
+ libsrcdir="$$s/tar"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif tar
-.PHONY: distclean-target
-distclean-target: \
- maybe-distclean-target-libstdc++-v3 \
- maybe-distclean-target-newlib \
- maybe-distclean-target-libf2c \
- maybe-distclean-target-libobjc \
- maybe-distclean-target-libtermcap \
- maybe-distclean-target-winsup \
- maybe-distclean-target-libgloss \
- maybe-distclean-target-libiberty \
- maybe-distclean-target-gperf \
- maybe-distclean-target-examples \
- maybe-distclean-target-libffi \
- maybe-distclean-target-libjava \
- maybe-distclean-target-zlib \
- maybe-distclean-target-boehm-gc \
- maybe-distclean-target-qthreads \
- maybe-distclean-target-rda \
- maybe-distclean-target-libada
-
-# GCC, the eternal special case
-.PHONY: maybe-distclean-gcc distclean-gcc
-maybe-distclean-gcc:
-distclean-gcc:
- @[ -f ./gcc/Makefile ] || exit 0; \
+
+
+
+
+.PHONY: all-tar maybe-all-tar
+maybe-all-tar:
+@if tar
+TARGET-tar=all
+maybe-all-tar: all-tar
+all-tar: configure-tar
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tar && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-tar))
+@endif tar
+
+
+
+
+.PHONY: check-tar maybe-check-tar
+maybe-check-tar:
+@if tar
+maybe-check-tar: check-tar
+
+check-tar:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tar && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif tar
+
+.PHONY: install-tar maybe-install-tar
+maybe-install-tar:
+@if tar
+maybe-install-tar: install-tar
+
+install-tar: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tar && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif tar
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-tar info-tar
+maybe-info-tar:
+@if tar
+maybe-info-tar: info-tar
+
+info-tar: \
+ configure-tar
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gcc" ; \
- (cd gcc && \
+ echo "Doing info 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}" \
- distclean) \
+ info) \
|| exit 1
-# Host modules.
+@endif tar
-.PHONY: maybe-distclean-ash distclean-ash
-maybe-distclean-ash:
+.PHONY: maybe-dvi-tar dvi-tar
+maybe-dvi-tar:
+@if tar
+maybe-dvi-tar: dvi-tar
-distclean-ash:
- @[ -f ./ash/Makefile ] || exit 0; \
+dvi-tar: \
+ configure-tar
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in ash" ; \
- (cd ash && \
+ echo "Doing dvi 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}" \
- distclean) \
+ dvi) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-autoconf distclean-autoconf
-maybe-distclean-autoconf:
+.PHONY: maybe-html-tar html-tar
+maybe-html-tar:
+@if tar
+maybe-html-tar: html-tar
-distclean-autoconf:
- @[ -f ./autoconf/Makefile ] || exit 0; \
+html-tar: \
+ configure-tar
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in autoconf" ; \
- (cd autoconf && \
+ echo "Doing html 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}" \
- distclean) \
+ html) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-automake distclean-automake
-maybe-distclean-automake:
+.PHONY: maybe-TAGS-tar TAGS-tar
+maybe-TAGS-tar:
+@if tar
+maybe-TAGS-tar: TAGS-tar
-distclean-automake:
- @[ -f ./automake/Makefile ] || exit 0; \
+TAGS-tar: \
+ configure-tar
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in automake" ; \
- (cd automake && \
+ echo "Doing TAGS 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}" \
- distclean) \
+ TAGS) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-bash distclean-bash
-maybe-distclean-bash:
+.PHONY: maybe-install-info-tar install-info-tar
+maybe-install-info-tar:
+@if tar
+maybe-install-info-tar: install-info-tar
-distclean-bash:
- @[ -f ./bash/Makefile ] || exit 0; \
+install-info-tar: \
+ configure-tar \
+ info-tar
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in bash" ; \
- (cd bash && \
+ echo "Doing install-info 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}" \
- distclean) \
+ install-info) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-bfd distclean-bfd
-maybe-distclean-bfd:
+.PHONY: maybe-install-html-tar install-html-tar
+maybe-install-html-tar:
+@if tar
+maybe-install-html-tar: install-html-tar
-distclean-bfd:
- @[ -f ./bfd/Makefile ] || exit 0; \
+install-html-tar: \
+ configure-tar \
+ html-tar
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in bfd" ; \
- (cd bfd && \
+ echo "Doing install-html 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}" \
- distclean) \
+ install-html) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-opcodes distclean-opcodes
-maybe-distclean-opcodes:
+.PHONY: maybe-installcheck-tar installcheck-tar
+maybe-installcheck-tar:
+@if tar
+maybe-installcheck-tar: installcheck-tar
-distclean-opcodes:
- @[ -f ./opcodes/Makefile ] || exit 0; \
+installcheck-tar: \
+ configure-tar
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in opcodes" ; \
- (cd opcodes && \
+ echo "Doing installcheck 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}" \
- distclean) \
+ installcheck) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-binutils distclean-binutils
-maybe-distclean-binutils:
+.PHONY: maybe-mostlyclean-tar mostlyclean-tar
+maybe-mostlyclean-tar:
+@if tar
+maybe-mostlyclean-tar: mostlyclean-tar
-distclean-binutils:
- @[ -f ./binutils/Makefile ] || exit 0; \
+mostlyclean-tar:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in binutils" ; \
- (cd binutils && \
+ echo "Doing mostlyclean 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}" \
- distclean) \
+ mostlyclean) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-bison distclean-bison
-maybe-distclean-bison:
+.PHONY: maybe-clean-tar clean-tar
+maybe-clean-tar:
+@if tar
+maybe-clean-tar: clean-tar
-distclean-bison:
- @[ -f ./bison/Makefile ] || exit 0; \
+clean-tar:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in bison" ; \
- (cd bison && \
+ echo "Doing clean 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}" \
- distclean) \
+ clean) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-byacc distclean-byacc
-maybe-distclean-byacc:
+.PHONY: maybe-distclean-tar distclean-tar
+maybe-distclean-tar:
+@if tar
+maybe-distclean-tar: distclean-tar
-distclean-byacc:
- @[ -f ./byacc/Makefile ] || exit 0; \
+distclean-tar:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in byacc" ; \
- (cd byacc && \
+ echo "Doing distclean 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}" \
@@ -14150,230 +25683,357 @@ distclean-byacc:
distclean) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-bzip2 distclean-bzip2
-maybe-distclean-bzip2:
+.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar
+maybe-maintainer-clean-tar:
+@if tar
+maybe-maintainer-clean-tar: maintainer-clean-tar
-distclean-bzip2:
- @[ -f ./bzip2/Makefile ] || exit 0; \
+maintainer-clean-tar:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in bzip2" ; \
- (cd bzip2 && \
+ echo "Doing maintainer-clean 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}" \
- distclean) \
+ maintainer-clean) \
|| exit 1
+@endif tar
-.PHONY: maybe-distclean-dejagnu distclean-dejagnu
-maybe-distclean-dejagnu:
-distclean-dejagnu:
- @[ -f ./dejagnu/Makefile ] || exit 0; \
+
+.PHONY: configure-texinfo maybe-configure-texinfo
+maybe-configure-texinfo:
+@if texinfo
+maybe-configure-texinfo: configure-texinfo
+configure-texinfo:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/texinfo/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/texinfo ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/texinfo; \
+ cd "$(HOST_SUBDIR)/texinfo" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/texinfo/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/texinfo"; \
+ libsrcdir="$$s/texinfo"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif texinfo
+
+
+
+
+
+.PHONY: all-texinfo maybe-all-texinfo
+maybe-all-texinfo:
+@if texinfo
+TARGET-texinfo=all
+maybe-all-texinfo: all-texinfo
+all-texinfo: configure-texinfo
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/texinfo && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-texinfo))
+@endif texinfo
+
+
+
+
+.PHONY: check-texinfo maybe-check-texinfo
+maybe-check-texinfo:
+@if texinfo
+maybe-check-texinfo: check-texinfo
+
+check-texinfo:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/texinfo && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif texinfo
+
+.PHONY: install-texinfo maybe-install-texinfo
+maybe-install-texinfo:
+@if texinfo
+maybe-install-texinfo: install-texinfo
+
+install-texinfo:
+
+@endif texinfo
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-texinfo info-texinfo
+maybe-info-texinfo:
+@if texinfo
+maybe-info-texinfo: info-texinfo
+
+info-texinfo: \
+ configure-texinfo
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in dejagnu" ; \
- (cd dejagnu && \
+ echo "Doing info 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}" \
- distclean) \
+ info) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-diff distclean-diff
-maybe-distclean-diff:
+.PHONY: maybe-dvi-texinfo dvi-texinfo
+maybe-dvi-texinfo:
+@if texinfo
+maybe-dvi-texinfo: dvi-texinfo
-distclean-diff:
- @[ -f ./diff/Makefile ] || exit 0; \
+dvi-texinfo: \
+ configure-texinfo
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in diff" ; \
- (cd diff && \
+ echo "Doing dvi 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}" \
- distclean) \
+ dvi) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-dosutils distclean-dosutils
-maybe-distclean-dosutils:
+.PHONY: maybe-html-texinfo html-texinfo
+maybe-html-texinfo:
+@if texinfo
+maybe-html-texinfo: html-texinfo
-distclean-dosutils:
- @[ -f ./dosutils/Makefile ] || exit 0; \
+html-texinfo: \
+ configure-texinfo
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in dosutils" ; \
- (cd dosutils && \
+ echo "Doing html 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}" \
- distclean) \
+ html) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-etc distclean-etc
-maybe-distclean-etc:
+.PHONY: maybe-TAGS-texinfo TAGS-texinfo
+maybe-TAGS-texinfo:
+@if texinfo
+maybe-TAGS-texinfo: TAGS-texinfo
-distclean-etc:
- @[ -f ./etc/Makefile ] || exit 0; \
+TAGS-texinfo: \
+ configure-texinfo
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in etc" ; \
- (cd etc && \
+ echo "Doing TAGS 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}" \
- distclean) \
+ TAGS) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-fastjar distclean-fastjar
-maybe-distclean-fastjar:
+.PHONY: maybe-install-info-texinfo install-info-texinfo
+maybe-install-info-texinfo:
+@if texinfo
+maybe-install-info-texinfo: install-info-texinfo
-distclean-fastjar:
- @[ -f ./fastjar/Makefile ] || exit 0; \
+install-info-texinfo: \
+ configure-texinfo \
+ info-texinfo
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in fastjar" ; \
- (cd fastjar && \
+ echo "Doing install-info 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}" \
- distclean) \
+ install-info) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-fileutils distclean-fileutils
-maybe-distclean-fileutils:
+.PHONY: maybe-install-html-texinfo install-html-texinfo
+maybe-install-html-texinfo:
+@if texinfo
+maybe-install-html-texinfo: install-html-texinfo
-distclean-fileutils:
- @[ -f ./fileutils/Makefile ] || exit 0; \
+install-html-texinfo: \
+ configure-texinfo \
+ html-texinfo
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in fileutils" ; \
- (cd fileutils && \
+ echo "Doing install-html 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}" \
- distclean) \
+ install-html) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-findutils distclean-findutils
-maybe-distclean-findutils:
+.PHONY: maybe-installcheck-texinfo installcheck-texinfo
+maybe-installcheck-texinfo:
+@if texinfo
+maybe-installcheck-texinfo: installcheck-texinfo
-distclean-findutils:
- @[ -f ./findutils/Makefile ] || exit 0; \
+installcheck-texinfo: \
+ configure-texinfo
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in findutils" ; \
- (cd findutils && \
+ echo "Doing installcheck 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}" \
- distclean) \
+ installcheck) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-find distclean-find
-maybe-distclean-find:
+.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo
+maybe-mostlyclean-texinfo:
+@if texinfo
+maybe-mostlyclean-texinfo: mostlyclean-texinfo
-distclean-find:
- @[ -f ./find/Makefile ] || exit 0; \
+mostlyclean-texinfo:
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in find" ; \
- (cd find && \
+ echo "Doing mostlyclean 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}" \
- distclean) \
+ mostlyclean) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-flex distclean-flex
-maybe-distclean-flex:
+.PHONY: maybe-clean-texinfo clean-texinfo
+maybe-clean-texinfo:
+@if texinfo
+maybe-clean-texinfo: clean-texinfo
-distclean-flex:
- @[ -f ./flex/Makefile ] || exit 0; \
+clean-texinfo:
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in flex" ; \
- (cd flex && \
+ echo "Doing clean 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}" \
- distclean) \
+ clean) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-gas distclean-gas
-maybe-distclean-gas:
+.PHONY: maybe-distclean-texinfo distclean-texinfo
+maybe-distclean-texinfo:
+@if texinfo
+maybe-distclean-texinfo: distclean-texinfo
-distclean-gas:
- @[ -f ./gas/Makefile ] || exit 0; \
+distclean-texinfo:
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gas" ; \
- (cd gas && \
+ echo "Doing distclean 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}" \
@@ -14381,230 +26041,363 @@ distclean-gas:
distclean) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-gawk distclean-gawk
-maybe-distclean-gawk:
+.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo
+maybe-maintainer-clean-texinfo:
+@if texinfo
+maybe-maintainer-clean-texinfo: maintainer-clean-texinfo
-distclean-gawk:
- @[ -f ./gawk/Makefile ] || exit 0; \
+maintainer-clean-texinfo:
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gawk" ; \
- (cd gawk && \
+ echo "Doing maintainer-clean 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}" \
- distclean) \
+ maintainer-clean) \
|| exit 1
+@endif texinfo
-.PHONY: maybe-distclean-gettext distclean-gettext
-maybe-distclean-gettext:
-distclean-gettext:
- @[ -f ./gettext/Makefile ] || exit 0; \
+
+.PHONY: configure-textutils maybe-configure-textutils
+maybe-configure-textutils:
+@if textutils
+maybe-configure-textutils: configure-textutils
+configure-textutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/textutils/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/textutils ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/textutils; \
+ cd "$(HOST_SUBDIR)/textutils" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/textutils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/textutils"; \
+ libsrcdir="$$s/textutils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif textutils
+
+
+
+
+
+.PHONY: all-textutils maybe-all-textutils
+maybe-all-textutils:
+@if textutils
+TARGET-textutils=all
+maybe-all-textutils: all-textutils
+all-textutils: configure-textutils
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/textutils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-textutils))
+@endif textutils
+
+
+
+
+.PHONY: check-textutils maybe-check-textutils
+maybe-check-textutils:
+@if textutils
+maybe-check-textutils: check-textutils
+
+check-textutils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/textutils && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif textutils
+
+.PHONY: install-textutils maybe-install-textutils
+maybe-install-textutils:
+@if textutils
+maybe-install-textutils: install-textutils
+
+install-textutils: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/textutils && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif textutils
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-textutils info-textutils
+maybe-info-textutils:
+@if textutils
+maybe-info-textutils: info-textutils
+
+info-textutils: \
+ configure-textutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gettext" ; \
- (cd gettext && \
+ echo "Doing info 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}" \
- distclean) \
+ info) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-gnuserv distclean-gnuserv
-maybe-distclean-gnuserv:
+.PHONY: maybe-dvi-textutils dvi-textutils
+maybe-dvi-textutils:
+@if textutils
+maybe-dvi-textutils: dvi-textutils
-distclean-gnuserv:
- @[ -f ./gnuserv/Makefile ] || exit 0; \
+dvi-textutils: \
+ configure-textutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gnuserv" ; \
- (cd gnuserv && \
+ echo "Doing dvi 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}" \
- distclean) \
+ dvi) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-gprof distclean-gprof
-maybe-distclean-gprof:
+.PHONY: maybe-html-textutils html-textutils
+maybe-html-textutils:
+@if textutils
+maybe-html-textutils: html-textutils
-distclean-gprof:
- @[ -f ./gprof/Makefile ] || exit 0; \
+html-textutils: \
+ configure-textutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gprof" ; \
- (cd gprof && \
+ echo "Doing html 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}" \
- distclean) \
+ html) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-gzip distclean-gzip
-maybe-distclean-gzip:
+.PHONY: maybe-TAGS-textutils TAGS-textutils
+maybe-TAGS-textutils:
+@if textutils
+maybe-TAGS-textutils: TAGS-textutils
-distclean-gzip:
- @[ -f ./gzip/Makefile ] || exit 0; \
+TAGS-textutils: \
+ configure-textutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gzip" ; \
- (cd gzip && \
+ echo "Doing TAGS 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}" \
- distclean) \
+ TAGS) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-hello distclean-hello
-maybe-distclean-hello:
+.PHONY: maybe-install-info-textutils install-info-textutils
+maybe-install-info-textutils:
+@if textutils
+maybe-install-info-textutils: install-info-textutils
-distclean-hello:
- @[ -f ./hello/Makefile ] || exit 0; \
+install-info-textutils: \
+ configure-textutils \
+ info-textutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in hello" ; \
- (cd hello && \
+ echo "Doing install-info 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}" \
- distclean) \
+ install-info) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-indent distclean-indent
-maybe-distclean-indent:
+.PHONY: maybe-install-html-textutils install-html-textutils
+maybe-install-html-textutils:
+@if textutils
+maybe-install-html-textutils: install-html-textutils
-distclean-indent:
- @[ -f ./indent/Makefile ] || exit 0; \
+install-html-textutils: \
+ configure-textutils \
+ html-textutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in indent" ; \
- (cd indent && \
+ echo "Doing install-html 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}" \
- distclean) \
+ install-html) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-intl distclean-intl
-maybe-distclean-intl:
+.PHONY: maybe-installcheck-textutils installcheck-textutils
+maybe-installcheck-textutils:
+@if textutils
+maybe-installcheck-textutils: installcheck-textutils
-distclean-intl:
- @[ -f ./intl/Makefile ] || exit 0; \
+installcheck-textutils: \
+ configure-textutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in intl" ; \
- (cd intl && \
+ echo "Doing installcheck 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}" \
- distclean) \
+ installcheck) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-tcl distclean-tcl
-maybe-distclean-tcl:
+.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils
+maybe-mostlyclean-textutils:
+@if textutils
+maybe-mostlyclean-textutils: mostlyclean-textutils
-distclean-tcl:
- @[ -f ./tcl/Makefile ] || exit 0; \
+mostlyclean-textutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in tcl" ; \
- (cd tcl && \
+ echo "Doing mostlyclean 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}" \
- distclean) \
+ mostlyclean) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-itcl distclean-itcl
-maybe-distclean-itcl:
+.PHONY: maybe-clean-textutils clean-textutils
+maybe-clean-textutils:
+@if textutils
+maybe-clean-textutils: clean-textutils
-distclean-itcl:
- @[ -f ./itcl/Makefile ] || exit 0; \
+clean-textutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in itcl" ; \
- (cd itcl && \
+ echo "Doing clean 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}" \
- distclean) \
+ clean) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-ld distclean-ld
-maybe-distclean-ld:
+.PHONY: maybe-distclean-textutils distclean-textutils
+maybe-distclean-textutils:
+@if textutils
+maybe-distclean-textutils: distclean-textutils
-distclean-ld:
- @[ -f ./ld/Makefile ] || exit 0; \
+distclean-textutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in ld" ; \
- (cd ld && \
+ echo "Doing distclean 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}" \
@@ -14612,230 +26405,363 @@ distclean-ld:
distclean) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-libgui distclean-libgui
-maybe-distclean-libgui:
+.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils
+maybe-maintainer-clean-textutils:
+@if textutils
+maybe-maintainer-clean-textutils: maintainer-clean-textutils
-distclean-libgui:
- @[ -f ./libgui/Makefile ] || exit 0; \
+maintainer-clean-textutils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libgui" ; \
- (cd libgui && \
+ echo "Doing maintainer-clean 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}" \
- distclean) \
+ maintainer-clean) \
|| exit 1
+@endif textutils
-.PHONY: maybe-distclean-libiberty distclean-libiberty
-maybe-distclean-libiberty:
-distclean-libiberty:
- @[ -f ./libiberty/Makefile ] || exit 0; \
+
+.PHONY: configure-time maybe-configure-time
+maybe-configure-time:
+@if time
+maybe-configure-time: configure-time
+configure-time:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/time/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/time ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/time; \
+ cd "$(HOST_SUBDIR)/time" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/time/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/time"; \
+ libsrcdir="$$s/time"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif time
+
+
+
+
+
+.PHONY: all-time maybe-all-time
+maybe-all-time:
+@if time
+TARGET-time=all
+maybe-all-time: all-time
+all-time: configure-time
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/time && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-time))
+@endif time
+
+
+
+
+.PHONY: check-time maybe-check-time
+maybe-check-time:
+@if time
+maybe-check-time: check-time
+
+check-time:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/time && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif time
+
+.PHONY: install-time maybe-install-time
+maybe-install-time:
+@if time
+maybe-install-time: install-time
+
+install-time: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/time && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif time
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-time info-time
+maybe-info-time:
+@if time
+maybe-info-time: info-time
+
+info-time: \
+ configure-time
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libiberty" ; \
- (cd libiberty && \
+ echo "Doing info 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}" \
- distclean) \
+ info) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-libtool distclean-libtool
-maybe-distclean-libtool:
+.PHONY: maybe-dvi-time dvi-time
+maybe-dvi-time:
+@if time
+maybe-dvi-time: dvi-time
-distclean-libtool:
- @[ -f ./libtool/Makefile ] || exit 0; \
+dvi-time: \
+ configure-time
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libtool" ; \
- (cd libtool && \
+ echo "Doing dvi 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}" \
- distclean) \
+ dvi) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-m4 distclean-m4
-maybe-distclean-m4:
+.PHONY: maybe-html-time html-time
+maybe-html-time:
+@if time
+maybe-html-time: html-time
-distclean-m4:
- @[ -f ./m4/Makefile ] || exit 0; \
+html-time: \
+ configure-time
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in m4" ; \
- (cd m4 && \
+ echo "Doing html 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}" \
- distclean) \
+ html) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-make distclean-make
-maybe-distclean-make:
+.PHONY: maybe-TAGS-time TAGS-time
+maybe-TAGS-time:
+@if time
+maybe-TAGS-time: TAGS-time
-distclean-make:
- @[ -f ./make/Makefile ] || exit 0; \
+TAGS-time: \
+ configure-time
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in make" ; \
- (cd make && \
+ echo "Doing TAGS 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}" \
- distclean) \
+ TAGS) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-mmalloc distclean-mmalloc
-maybe-distclean-mmalloc:
+.PHONY: maybe-install-info-time install-info-time
+maybe-install-info-time:
+@if time
+maybe-install-info-time: install-info-time
-distclean-mmalloc:
- @[ -f ./mmalloc/Makefile ] || exit 0; \
+install-info-time: \
+ configure-time \
+ info-time
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in mmalloc" ; \
- (cd mmalloc && \
+ echo "Doing install-info 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}" \
- distclean) \
+ install-info) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-patch distclean-patch
-maybe-distclean-patch:
+.PHONY: maybe-install-html-time install-html-time
+maybe-install-html-time:
+@if time
+maybe-install-html-time: install-html-time
-distclean-patch:
- @[ -f ./patch/Makefile ] || exit 0; \
+install-html-time: \
+ configure-time \
+ html-time
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in patch" ; \
- (cd patch && \
+ echo "Doing install-html 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}" \
- distclean) \
+ install-html) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-perl distclean-perl
-maybe-distclean-perl:
+.PHONY: maybe-installcheck-time installcheck-time
+maybe-installcheck-time:
+@if time
+maybe-installcheck-time: installcheck-time
-distclean-perl:
- @[ -f ./perl/Makefile ] || exit 0; \
+installcheck-time: \
+ configure-time
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in perl" ; \
- (cd perl && \
+ echo "Doing installcheck 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}" \
- distclean) \
+ installcheck) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-prms distclean-prms
-maybe-distclean-prms:
+.PHONY: maybe-mostlyclean-time mostlyclean-time
+maybe-mostlyclean-time:
+@if time
+maybe-mostlyclean-time: mostlyclean-time
-distclean-prms:
- @[ -f ./prms/Makefile ] || exit 0; \
+mostlyclean-time:
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in prms" ; \
- (cd prms && \
+ echo "Doing mostlyclean 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}" \
- distclean) \
+ mostlyclean) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-rcs distclean-rcs
-maybe-distclean-rcs:
+.PHONY: maybe-clean-time clean-time
+maybe-clean-time:
+@if time
+maybe-clean-time: clean-time
-distclean-rcs:
- @[ -f ./rcs/Makefile ] || exit 0; \
+clean-time:
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in rcs" ; \
- (cd rcs && \
+ echo "Doing clean 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}" \
- distclean) \
+ clean) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-readline distclean-readline
-maybe-distclean-readline:
+.PHONY: maybe-distclean-time distclean-time
+maybe-distclean-time:
+@if time
+maybe-distclean-time: distclean-time
-distclean-readline:
- @[ -f ./readline/Makefile ] || exit 0; \
+distclean-time:
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in readline" ; \
- (cd readline && \
+ echo "Doing distclean 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}" \
@@ -14843,230 +26769,363 @@ distclean-readline:
distclean) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-release distclean-release
-maybe-distclean-release:
+.PHONY: maybe-maintainer-clean-time maintainer-clean-time
+maybe-maintainer-clean-time:
+@if time
+maybe-maintainer-clean-time: maintainer-clean-time
-distclean-release:
- @[ -f ./release/Makefile ] || exit 0; \
+maintainer-clean-time:
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in release" ; \
- (cd release && \
+ echo "Doing maintainer-clean 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}" \
- distclean) \
+ maintainer-clean) \
|| exit 1
+@endif time
-.PHONY: maybe-distclean-recode distclean-recode
-maybe-distclean-recode:
-distclean-recode:
- @[ -f ./recode/Makefile ] || exit 0; \
+
+.PHONY: configure-uudecode maybe-configure-uudecode
+maybe-configure-uudecode:
+@if uudecode
+maybe-configure-uudecode: configure-uudecode
+configure-uudecode:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/uudecode/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/uudecode ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/uudecode; \
+ cd "$(HOST_SUBDIR)/uudecode" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/uudecode/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/uudecode"; \
+ libsrcdir="$$s/uudecode"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif uudecode
+
+
+
+
+
+.PHONY: all-uudecode maybe-all-uudecode
+maybe-all-uudecode:
+@if uudecode
+TARGET-uudecode=all
+maybe-all-uudecode: all-uudecode
+all-uudecode: configure-uudecode
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/uudecode && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-uudecode))
+@endif uudecode
+
+
+
+
+.PHONY: check-uudecode maybe-check-uudecode
+maybe-check-uudecode:
+@if uudecode
+maybe-check-uudecode: check-uudecode
+
+check-uudecode:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/uudecode && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif uudecode
+
+.PHONY: install-uudecode maybe-install-uudecode
+maybe-install-uudecode:
+@if uudecode
+maybe-install-uudecode: install-uudecode
+
+install-uudecode: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/uudecode && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif uudecode
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-uudecode info-uudecode
+maybe-info-uudecode:
+@if uudecode
+maybe-info-uudecode: info-uudecode
+
+info-uudecode: \
+ configure-uudecode
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in recode" ; \
- (cd recode && \
+ echo "Doing info 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}" \
- distclean) \
+ info) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-sed distclean-sed
-maybe-distclean-sed:
+.PHONY: maybe-dvi-uudecode dvi-uudecode
+maybe-dvi-uudecode:
+@if uudecode
+maybe-dvi-uudecode: dvi-uudecode
-distclean-sed:
- @[ -f ./sed/Makefile ] || exit 0; \
+dvi-uudecode: \
+ configure-uudecode
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in sed" ; \
- (cd sed && \
+ echo "Doing dvi 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}" \
- distclean) \
+ dvi) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-send-pr distclean-send-pr
-maybe-distclean-send-pr:
+.PHONY: maybe-html-uudecode html-uudecode
+maybe-html-uudecode:
+@if uudecode
+maybe-html-uudecode: html-uudecode
-distclean-send-pr:
- @[ -f ./send-pr/Makefile ] || exit 0; \
+html-uudecode: \
+ configure-uudecode
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in send-pr" ; \
- (cd send-pr && \
+ echo "Doing html 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}" \
- distclean) \
+ html) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-shellutils distclean-shellutils
-maybe-distclean-shellutils:
+.PHONY: maybe-TAGS-uudecode TAGS-uudecode
+maybe-TAGS-uudecode:
+@if uudecode
+maybe-TAGS-uudecode: TAGS-uudecode
-distclean-shellutils:
- @[ -f ./shellutils/Makefile ] || exit 0; \
+TAGS-uudecode: \
+ configure-uudecode
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in shellutils" ; \
- (cd shellutils && \
+ echo "Doing TAGS 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}" \
- distclean) \
+ TAGS) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-sid distclean-sid
-maybe-distclean-sid:
+.PHONY: maybe-install-info-uudecode install-info-uudecode
+maybe-install-info-uudecode:
+@if uudecode
+maybe-install-info-uudecode: install-info-uudecode
-distclean-sid:
- @[ -f ./sid/Makefile ] || exit 0; \
+install-info-uudecode: \
+ configure-uudecode \
+ info-uudecode
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in sid" ; \
- (cd sid && \
+ echo "Doing install-info 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}" \
- distclean) \
+ install-info) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-sim distclean-sim
-maybe-distclean-sim:
+.PHONY: maybe-install-html-uudecode install-html-uudecode
+maybe-install-html-uudecode:
+@if uudecode
+maybe-install-html-uudecode: install-html-uudecode
-distclean-sim:
- @[ -f ./sim/Makefile ] || exit 0; \
+install-html-uudecode: \
+ configure-uudecode \
+ html-uudecode
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in sim" ; \
- (cd sim && \
+ echo "Doing install-html 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}" \
- distclean) \
+ install-html) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-tar distclean-tar
-maybe-distclean-tar:
+.PHONY: maybe-installcheck-uudecode installcheck-uudecode
+maybe-installcheck-uudecode:
+@if uudecode
+maybe-installcheck-uudecode: installcheck-uudecode
-distclean-tar:
- @[ -f ./tar/Makefile ] || exit 0; \
+installcheck-uudecode: \
+ configure-uudecode
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in tar" ; \
- (cd tar && \
+ echo "Doing installcheck 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}" \
- distclean) \
+ installcheck) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-texinfo distclean-texinfo
-maybe-distclean-texinfo:
+.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode
+maybe-mostlyclean-uudecode:
+@if uudecode
+maybe-mostlyclean-uudecode: mostlyclean-uudecode
-distclean-texinfo:
- @[ -f ./texinfo/Makefile ] || exit 0; \
+mostlyclean-uudecode:
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in texinfo" ; \
- (cd texinfo && \
+ echo "Doing mostlyclean 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}" \
- distclean) \
+ mostlyclean) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-textutils distclean-textutils
-maybe-distclean-textutils:
+.PHONY: maybe-clean-uudecode clean-uudecode
+maybe-clean-uudecode:
+@if uudecode
+maybe-clean-uudecode: clean-uudecode
-distclean-textutils:
- @[ -f ./textutils/Makefile ] || exit 0; \
+clean-uudecode:
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in textutils" ; \
- (cd textutils && \
+ echo "Doing clean 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}" \
- distclean) \
+ clean) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-time distclean-time
-maybe-distclean-time:
+.PHONY: maybe-distclean-uudecode distclean-uudecode
+maybe-distclean-uudecode:
+@if uudecode
+maybe-distclean-uudecode: distclean-uudecode
-distclean-time:
- @[ -f ./time/Makefile ] || exit 0; \
+distclean-uudecode:
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in time" ; \
- (cd time && \
+ echo "Doing distclean 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}" \
@@ -15074,216 +27133,363 @@ distclean-time:
distclean) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-uudecode distclean-uudecode
-maybe-distclean-uudecode:
+.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode
+maybe-maintainer-clean-uudecode:
+@if uudecode
+maybe-maintainer-clean-uudecode: maintainer-clean-uudecode
-distclean-uudecode:
+maintainer-clean-uudecode:
+ @: $(MAKE); $(unstage)
@[ -f ./uudecode/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in uudecode" ; \
- (cd uudecode && \
+ echo "Doing maintainer-clean 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}" \
- distclean) \
+ maintainer-clean) \
|| exit 1
+@endif uudecode
-.PHONY: maybe-distclean-wdiff distclean-wdiff
-maybe-distclean-wdiff:
-distclean-wdiff:
+
+.PHONY: configure-wdiff maybe-configure-wdiff
+maybe-configure-wdiff:
+@if wdiff
+maybe-configure-wdiff: configure-wdiff
+configure-wdiff:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/wdiff/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/wdiff ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/wdiff; \
+ cd "$(HOST_SUBDIR)/wdiff" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/wdiff/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/wdiff"; \
+ libsrcdir="$$s/wdiff"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif wdiff
+
+
+
+
+
+.PHONY: all-wdiff maybe-all-wdiff
+maybe-all-wdiff:
+@if wdiff
+TARGET-wdiff=all
+maybe-all-wdiff: all-wdiff
+all-wdiff: configure-wdiff
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/wdiff && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-wdiff))
+@endif wdiff
+
+
+
+
+.PHONY: check-wdiff maybe-check-wdiff
+maybe-check-wdiff:
+@if wdiff
+maybe-check-wdiff: check-wdiff
+
+check-wdiff:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/wdiff && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif wdiff
+
+.PHONY: install-wdiff maybe-install-wdiff
+maybe-install-wdiff:
+@if wdiff
+maybe-install-wdiff: install-wdiff
+
+install-wdiff: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/wdiff && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif wdiff
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-wdiff info-wdiff
+maybe-info-wdiff:
+@if wdiff
+maybe-info-wdiff: info-wdiff
+
+info-wdiff: \
+ configure-wdiff
+ @: $(MAKE); $(unstage)
@[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in wdiff" ; \
- (cd wdiff && \
+ echo "Doing info 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}" \
- distclean) \
+ info) \
|| exit 1
+@endif wdiff
-.PHONY: maybe-distclean-zip distclean-zip
-maybe-distclean-zip:
+.PHONY: maybe-dvi-wdiff dvi-wdiff
+maybe-dvi-wdiff:
+@if wdiff
+maybe-dvi-wdiff: dvi-wdiff
-distclean-zip:
- @[ -f ./zip/Makefile ] || exit 0; \
+dvi-wdiff: \
+ configure-wdiff
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in zip" ; \
- (cd zip && \
+ echo "Doing dvi 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}" \
- distclean) \
+ dvi) \
|| exit 1
+@endif wdiff
-.PHONY: maybe-distclean-zlib distclean-zlib
-maybe-distclean-zlib:
+.PHONY: maybe-html-wdiff html-wdiff
+maybe-html-wdiff:
+@if wdiff
+maybe-html-wdiff: html-wdiff
-distclean-zlib:
- @[ -f ./zlib/Makefile ] || exit 0; \
+html-wdiff: \
+ configure-wdiff
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in zlib" ; \
- (cd zlib && \
+ echo "Doing html 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}" \
- distclean) \
+ html) \
|| exit 1
+@endif wdiff
-.PHONY: maybe-distclean-gdb distclean-gdb
-maybe-distclean-gdb:
+.PHONY: maybe-TAGS-wdiff TAGS-wdiff
+maybe-TAGS-wdiff:
+@if wdiff
+maybe-TAGS-wdiff: TAGS-wdiff
-distclean-gdb:
- @[ -f ./gdb/Makefile ] || exit 0; \
+TAGS-wdiff: \
+ configure-wdiff
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gdb" ; \
- (cd gdb && \
+ echo "Doing TAGS 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}" \
- distclean) \
+ TAGS) \
|| exit 1
+@endif wdiff
-.PHONY: maybe-distclean-expect distclean-expect
-maybe-distclean-expect:
+.PHONY: maybe-install-info-wdiff install-info-wdiff
+maybe-install-info-wdiff:
+@if wdiff
+maybe-install-info-wdiff: install-info-wdiff
-distclean-expect:
- @[ -f ./expect/Makefile ] || exit 0; \
+install-info-wdiff: \
+ configure-wdiff \
+ info-wdiff
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in expect" ; \
- (cd expect && \
+ echo "Doing install-info 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}" \
- distclean) \
+ install-info) \
|| exit 1
+@endif wdiff
-.PHONY: maybe-distclean-guile distclean-guile
-maybe-distclean-guile:
+.PHONY: maybe-install-html-wdiff install-html-wdiff
+maybe-install-html-wdiff:
+@if wdiff
+maybe-install-html-wdiff: install-html-wdiff
-distclean-guile:
- @[ -f ./guile/Makefile ] || exit 0; \
+install-html-wdiff: \
+ configure-wdiff \
+ html-wdiff
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in guile" ; \
- (cd guile && \
+ echo "Doing install-html 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}" \
- distclean) \
+ install-html) \
|| exit 1
+@endif wdiff
-.PHONY: maybe-distclean-tk distclean-tk
-maybe-distclean-tk:
+.PHONY: maybe-installcheck-wdiff installcheck-wdiff
+maybe-installcheck-wdiff:
+@if wdiff
+maybe-installcheck-wdiff: installcheck-wdiff
-distclean-tk:
- @[ -f ./tk/Makefile ] || exit 0; \
+installcheck-wdiff: \
+ configure-wdiff
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in tk" ; \
- (cd tk && \
+ echo "Doing installcheck 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}" \
- distclean) \
+ installcheck) \
|| exit 1
+@endif wdiff
-.PHONY: maybe-distclean-tix distclean-tix
-maybe-distclean-tix:
+.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff
+maybe-mostlyclean-wdiff:
+@if wdiff
+maybe-mostlyclean-wdiff: mostlyclean-wdiff
-distclean-tix:
- @[ -f ./tix/Makefile ] || exit 0; \
+mostlyclean-wdiff:
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in tix" ; \
- (cd tix && \
+ echo "Doing mostlyclean 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}" \
- distclean) \
+ mostlyclean) \
|| exit 1
+@endif wdiff
-.PHONY: maybe-distclean-libtermcap distclean-libtermcap
-maybe-distclean-libtermcap:
+.PHONY: maybe-clean-wdiff clean-wdiff
+maybe-clean-wdiff:
+@if wdiff
+maybe-clean-wdiff: clean-wdiff
-# libtermcap doesn't support distclean.
-distclean-libtermcap:
+clean-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 clean 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}" \
+ clean) \
+ || exit 1
+@endif wdiff
-.PHONY: maybe-distclean-utils distclean-utils
-maybe-distclean-utils:
+.PHONY: maybe-distclean-wdiff distclean-wdiff
+maybe-distclean-wdiff:
+@if wdiff
+maybe-distclean-wdiff: distclean-wdiff
-distclean-utils:
- @[ -f ./utils/Makefile ] || exit 0; \
+distclean-wdiff:
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in utils" ; \
- (cd utils && \
+ echo "Doing distclean 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}" \
@@ -15291,198 +27497,366 @@ distclean-utils:
distclean) \
|| exit 1
+@endif wdiff
+.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff
+maybe-maintainer-clean-wdiff:
+@if wdiff
+maybe-maintainer-clean-wdiff: maintainer-clean-wdiff
-# Target modules.
+maintainer-clean-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 maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
-.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3
-maybe-distclean-target-libstdc++-v3:
+@endif wdiff
-distclean-target-libstdc++-v3:
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+
+
+.PHONY: configure-zip maybe-configure-zip
+maybe-configure-zip:
+@if zip
+maybe-configure-zip: configure-zip
+configure-zip:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zip/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zip ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/zip; \
+ cd "$(HOST_SUBDIR)/zip" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/zip/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/zip"; \
+ libsrcdir="$$s/zip"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif zip
+
+
+
+
+
+.PHONY: all-zip maybe-all-zip
+maybe-all-zip:
+@if zip
+TARGET-zip=all
+maybe-all-zip: all-zip
+all-zip: configure-zip
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/zip && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-zip))
+@endif zip
+
+
+
+
+.PHONY: check-zip maybe-check-zip
+maybe-check-zip:
+@if zip
+maybe-check-zip: check-zip
+
+# This module is only tested in a native toolchain.
+check-zip:
+ @: $(MAKE); $(unstage)
+ @if [ '$(host)' = '$(target)' ] ; then \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/zip && \
+ $(MAKE) $(FLAGS_TO_PASS) check); \
+ fi
+
+@endif zip
+
+.PHONY: install-zip maybe-install-zip
+maybe-install-zip:
+@if zip
+maybe-install-zip: install-zip
+
+install-zip: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/zip && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif zip
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-zip info-zip
+maybe-info-zip:
+@if zip
+maybe-info-zip: info-zip
+
+info-zip: \
+ configure-zip
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ echo "Doing info 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}" \
- distclean) \
+ info) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-newlib distclean-target-newlib
-maybe-distclean-target-newlib:
+.PHONY: maybe-dvi-zip dvi-zip
+maybe-dvi-zip:
+@if zip
+maybe-dvi-zip: dvi-zip
-distclean-target-newlib:
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+dvi-zip: \
+ configure-zip
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ echo "Doing dvi 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}" \
- distclean) \
+ dvi) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-libf2c distclean-target-libf2c
-maybe-distclean-target-libf2c:
+.PHONY: maybe-html-zip html-zip
+maybe-html-zip:
+@if zip
+maybe-html-zip: html-zip
-distclean-target-libf2c:
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+html-zip: \
+ configure-zip
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ echo "Doing html 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}" \
- distclean) \
+ html) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc
-maybe-distclean-target-libobjc:
+.PHONY: maybe-TAGS-zip TAGS-zip
+maybe-TAGS-zip:
+@if zip
+maybe-TAGS-zip: TAGS-zip
-distclean-target-libobjc:
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+TAGS-zip: \
+ configure-zip
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
+ echo "Doing TAGS 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}" \
- distclean) \
+ TAGS) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap
-maybe-distclean-target-libtermcap:
+.PHONY: maybe-install-info-zip install-info-zip
+maybe-install-info-zip:
+@if zip
+maybe-install-info-zip: install-info-zip
-# libtermcap doesn't support distclean.
-distclean-target-libtermcap:
+install-info-zip: \
+ configure-zip \
+ info-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-info 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-info) \
+ || exit 1
+@endif zip
-.PHONY: maybe-distclean-target-winsup distclean-target-winsup
-maybe-distclean-target-winsup:
+.PHONY: maybe-install-html-zip install-html-zip
+maybe-install-html-zip:
+@if zip
+maybe-install-html-zip: install-html-zip
-distclean-target-winsup:
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+install-html-zip: \
+ configure-zip \
+ html-zip
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/winsup && \
+ echo "Doing install-html 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}" \
- distclean) \
+ install-html) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss
-maybe-distclean-target-libgloss:
+.PHONY: maybe-installcheck-zip installcheck-zip
+maybe-installcheck-zip:
+@if zip
+maybe-installcheck-zip: installcheck-zip
-distclean-target-libgloss:
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+installcheck-zip: \
+ configure-zip
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
+ echo "Doing installcheck 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}" \
- distclean) \
+ installcheck) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty
-maybe-distclean-target-libiberty:
+.PHONY: maybe-mostlyclean-zip mostlyclean-zip
+maybe-mostlyclean-zip:
+@if zip
+maybe-mostlyclean-zip: mostlyclean-zip
-distclean-target-libiberty:
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+mostlyclean-zip:
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
+ echo "Doing mostlyclean 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}" \
- distclean) \
+ mostlyclean) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-gperf distclean-target-gperf
-maybe-distclean-target-gperf:
+.PHONY: maybe-clean-zip clean-zip
+maybe-clean-zip:
+@if zip
+maybe-clean-zip: clean-zip
-distclean-target-gperf:
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+clean-zip:
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/gperf && \
+ echo "Doing clean 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}" \
- distclean) \
+ clean) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-examples distclean-target-examples
-maybe-distclean-target-examples:
+.PHONY: maybe-distclean-zip distclean-zip
+maybe-distclean-zip:
+@if zip
+maybe-distclean-zip: distclean-zip
-distclean-target-examples:
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+distclean-zip:
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/examples && \
+ echo "Doing distclean 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}" \
@@ -15490,322 +27864,722 @@ distclean-target-examples:
distclean) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-libffi distclean-target-libffi
-maybe-distclean-target-libffi:
+.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip
+maybe-maintainer-clean-zip:
+@if zip
+maybe-maintainer-clean-zip: maintainer-clean-zip
-distclean-target-libffi:
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+maintainer-clean-zip:
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libffi && \
+ echo "Doing maintainer-clean 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}" \
- distclean) \
+ maintainer-clean) \
|| exit 1
+@endif zip
-.PHONY: maybe-distclean-target-libjava distclean-target-libjava
-maybe-distclean-target-libjava:
-distclean-target-libjava:
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+
+.PHONY: configure-zlib maybe-configure-zlib
+maybe-configure-zlib:
+@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; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/zlib; \
+ cd "$(HOST_SUBDIR)/zlib" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/zlib"; \
+ libsrcdir="$$s/zlib"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif zlib
+
+
+
+.PHONY: configure-stage1-zlib maybe-configure-stage1-zlib
+maybe-configure-stage1-zlib:
+@if zlib-bootstrap
+maybe-configure-stage1-zlib: configure-stage1-zlib
+configure-stage1-zlib:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/zlib"; \
+ libsrcdir="$$s/zlib"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif zlib-bootstrap
+
+.PHONY: configure-stage2-zlib maybe-configure-stage2-zlib
+maybe-configure-stage2-zlib:
+@if zlib-bootstrap
+maybe-configure-stage2-zlib: configure-stage2-zlib
+configure-stage2-zlib:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/zlib"; \
+ libsrcdir="$$s/zlib"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif zlib-bootstrap
+
+.PHONY: configure-stage3-zlib maybe-configure-stage3-zlib
+maybe-configure-stage3-zlib:
+@if zlib-bootstrap
+maybe-configure-stage3-zlib: configure-stage3-zlib
+configure-stage3-zlib:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/zlib"; \
+ libsrcdir="$$s/zlib"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif zlib-bootstrap
+
+.PHONY: configure-stage4-zlib maybe-configure-stage4-zlib
+maybe-configure-stage4-zlib:
+@if zlib-bootstrap
+maybe-configure-stage4-zlib: configure-stage4-zlib
+configure-stage4-zlib:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/zlib"; \
+ libsrcdir="$$s/zlib"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif zlib-bootstrap
+
+.PHONY: configure-stageprofile-zlib maybe-configure-stageprofile-zlib
+maybe-configure-stageprofile-zlib:
+@if zlib-bootstrap
+maybe-configure-stageprofile-zlib: configure-stageprofile-zlib
+configure-stageprofile-zlib:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage profile in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/zlib"; \
+ libsrcdir="$$s/zlib"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif zlib-bootstrap
+
+.PHONY: configure-stagefeedback-zlib maybe-configure-stagefeedback-zlib
+maybe-configure-stagefeedback-zlib:
+@if zlib-bootstrap
+maybe-configure-stagefeedback-zlib: configure-stagefeedback-zlib
+configure-stagefeedback-zlib:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/zlib"; \
+ libsrcdir="$$s/zlib"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ @stage2_werror_flag@
+@endif zlib-bootstrap
+
+
+
+
+
+.PHONY: all-zlib maybe-all-zlib
+maybe-all-zlib:
+@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) \
+ (cd $(HOST_SUBDIR)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-zlib))
+@endif zlib
+
+
+
+.PHONY: all-stage1-zlib maybe-all-stage1-zlib
+.PHONY: clean-stage1-zlib maybe-clean-stage1-zlib
+maybe-all-stage1-zlib:
+maybe-clean-stage1-zlib:
+@if zlib-bootstrap
+maybe-all-stage1-zlib: all-stage1-zlib
+all-stage1: all-stage1-zlib
+TARGET-stage1-zlib = $(TARGET-zlib)
+all-stage1-zlib: configure-stage1-zlib
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/zlib && \
+ $(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; \
+ cd $(HOST_SUBDIR)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+@endif zlib-bootstrap
+
+
+.PHONY: all-stage2-zlib maybe-all-stage2-zlib
+.PHONY: clean-stage2-zlib maybe-clean-stage2-zlib
+maybe-all-stage2-zlib:
+maybe-clean-stage2-zlib:
+@if zlib-bootstrap
+maybe-all-stage2-zlib: all-stage2-zlib
+all-stage2: all-stage2-zlib
+TARGET-stage2-zlib = $(TARGET-zlib)
+all-stage2-zlib: configure-stage2-zlib
+ @[ $(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)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif zlib-bootstrap
+
+
+.PHONY: all-stage3-zlib maybe-all-stage3-zlib
+.PHONY: clean-stage3-zlib maybe-clean-stage3-zlib
+maybe-all-stage3-zlib:
+maybe-clean-stage3-zlib:
+@if zlib-bootstrap
+maybe-all-stage3-zlib: all-stage3-zlib
+all-stage3: all-stage3-zlib
+TARGET-stage3-zlib = $(TARGET-zlib)
+all-stage3-zlib: configure-stage3-zlib
+ @[ $(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)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif zlib-bootstrap
+
+
+.PHONY: all-stage4-zlib maybe-all-stage4-zlib
+.PHONY: clean-stage4-zlib maybe-clean-stage4-zlib
+maybe-all-stage4-zlib:
+maybe-clean-stage4-zlib:
+@if zlib-bootstrap
+maybe-all-stage4-zlib: all-stage4-zlib
+all-stage4: all-stage4-zlib
+TARGET-stage4-zlib = $(TARGET-zlib)
+all-stage4-zlib: configure-stage4-zlib
+ @[ $(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)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) $(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; \
+ cd $(HOST_SUBDIR)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif zlib-bootstrap
+
+
+.PHONY: all-stageprofile-zlib maybe-all-stageprofile-zlib
+.PHONY: clean-stageprofile-zlib maybe-clean-stageprofile-zlib
+maybe-all-stageprofile-zlib:
+maybe-clean-stageprofile-zlib:
+@if zlib-bootstrap
+maybe-all-stageprofile-zlib: all-stageprofile-zlib
+all-stageprofile: all-stageprofile-zlib
+TARGET-stageprofile-zlib = $(TARGET-zlib)
+all-stageprofile-zlib: configure-stageprofile-zlib
+ @[ $(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)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(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; \
+ cd $(HOST_SUBDIR)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+@endif zlib-bootstrap
+
+
+.PHONY: all-stagefeedback-zlib maybe-all-stagefeedback-zlib
+.PHONY: clean-stagefeedback-zlib maybe-clean-stagefeedback-zlib
+maybe-all-stagefeedback-zlib:
+maybe-clean-stagefeedback-zlib:
+@if zlib-bootstrap
+maybe-all-stagefeedback-zlib: all-stagefeedback-zlib
+all-stagefeedback: all-stagefeedback-zlib
+TARGET-stagefeedback-zlib = $(TARGET-zlib)
+all-stagefeedback-zlib: configure-stagefeedback-zlib
+ @[ $(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)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(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; \
+ cd $(HOST_SUBDIR)/zlib && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+@endif zlib-bootstrap
+
+
+
+
+
+.PHONY: check-zlib maybe-check-zlib
+maybe-check-zlib:
+@if zlib
+maybe-check-zlib: check-zlib
+
+check-zlib:
+
+@endif zlib
+
+.PHONY: install-zlib maybe-install-zlib
+maybe-install-zlib:
+@if zlib
+maybe-install-zlib: install-zlib
+
+install-zlib:
+
+@endif zlib
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-zlib info-zlib
+maybe-info-zlib:
+@if zlib
+maybe-info-zlib: info-zlib
+
+info-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libjava && \
+ echo "Doing info 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}" \
- distclean) \
+ info) \
|| exit 1
+@endif zlib
-.PHONY: maybe-distclean-target-zlib distclean-target-zlib
-maybe-distclean-target-zlib:
+.PHONY: maybe-dvi-zlib dvi-zlib
+maybe-dvi-zlib:
+@if zlib
+maybe-dvi-zlib: dvi-zlib
-distclean-target-zlib:
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+dvi-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/zlib && \
+ echo "Doing dvi 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}" \
- distclean) \
+ dvi) \
|| exit 1
+@endif zlib
-.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc
-maybe-distclean-target-boehm-gc:
+.PHONY: maybe-html-zlib html-zlib
+maybe-html-zlib:
+@if zlib
+maybe-html-zlib: html-zlib
-distclean-target-boehm-gc:
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+html-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
+ echo "Doing html 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}" \
- distclean) \
+ html) \
|| exit 1
+@endif zlib
-.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads
-maybe-distclean-target-qthreads:
+.PHONY: maybe-TAGS-zlib TAGS-zlib
+maybe-TAGS-zlib:
+@if zlib
+maybe-TAGS-zlib: TAGS-zlib
-distclean-target-qthreads:
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+TAGS-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/qthreads && \
+ echo "Doing TAGS 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}" \
- distclean) \
+ TAGS) \
|| exit 1
+@endif zlib
-.PHONY: maybe-distclean-target-rda distclean-target-rda
-maybe-distclean-target-rda:
+.PHONY: maybe-install-info-zlib install-info-zlib
+maybe-install-info-zlib:
+@if zlib
+maybe-install-info-zlib: install-info-zlib
-distclean-target-rda:
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+install-info-zlib: \
+ configure-zlib \
+ info-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/rda && \
+ echo "Doing install-info 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}" \
- distclean) \
+ install-info) \
|| exit 1
+@endif zlib
-.PHONY: maybe-distclean-target-libada distclean-target-libada
-maybe-distclean-target-libada:
+.PHONY: maybe-install-html-zlib install-html-zlib
+maybe-install-html-zlib:
+@if zlib
+maybe-install-html-zlib: install-html-zlib
-distclean-target-libada:
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+install-html-zlib: \
+ configure-zlib \
+ html-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libada" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libada && \
+ echo "Doing install-html 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}" \
- distclean) \
+ install-html) \
|| exit 1
+@endif zlib
+.PHONY: maybe-installcheck-zlib installcheck-zlib
+maybe-installcheck-zlib:
+@if zlib
+maybe-installcheck-zlib: installcheck-zlib
-.PHONY: do-maintainer-clean
-do-maintainer-clean: maintainer-clean-host maintainer-clean-target
+installcheck-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 installcheck 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}" \
+ installcheck) \
+ || exit 1
-.PHONY: maintainer-clean-host
-maintainer-clean-host: maybe-maintainer-clean-gcc \
- maybe-maintainer-clean-ash \
- maybe-maintainer-clean-autoconf \
- maybe-maintainer-clean-automake \
- maybe-maintainer-clean-bash \
- maybe-maintainer-clean-bfd \
- maybe-maintainer-clean-opcodes \
- maybe-maintainer-clean-binutils \
- maybe-maintainer-clean-bison \
- maybe-maintainer-clean-byacc \
- maybe-maintainer-clean-bzip2 \
- maybe-maintainer-clean-dejagnu \
- maybe-maintainer-clean-diff \
- maybe-maintainer-clean-dosutils \
- maybe-maintainer-clean-etc \
- maybe-maintainer-clean-fastjar \
- maybe-maintainer-clean-fileutils \
- maybe-maintainer-clean-findutils \
- maybe-maintainer-clean-find \
- maybe-maintainer-clean-flex \
- maybe-maintainer-clean-gas \
- maybe-maintainer-clean-gawk \
- maybe-maintainer-clean-gettext \
- maybe-maintainer-clean-gnuserv \
- maybe-maintainer-clean-gprof \
- maybe-maintainer-clean-gzip \
- maybe-maintainer-clean-hello \
- maybe-maintainer-clean-indent \
- maybe-maintainer-clean-intl \
- maybe-maintainer-clean-tcl \
- maybe-maintainer-clean-itcl \
- maybe-maintainer-clean-ld \
- maybe-maintainer-clean-libgui \
- maybe-maintainer-clean-libiberty \
- maybe-maintainer-clean-libtool \
- maybe-maintainer-clean-m4 \
- maybe-maintainer-clean-make \
- maybe-maintainer-clean-mmalloc \
- maybe-maintainer-clean-patch \
- maybe-maintainer-clean-perl \
- maybe-maintainer-clean-prms \
- maybe-maintainer-clean-rcs \
- maybe-maintainer-clean-readline \
- maybe-maintainer-clean-release \
- maybe-maintainer-clean-recode \
- maybe-maintainer-clean-sed \
- maybe-maintainer-clean-send-pr \
- maybe-maintainer-clean-shellutils \
- maybe-maintainer-clean-sid \
- maybe-maintainer-clean-sim \
- maybe-maintainer-clean-tar \
- maybe-maintainer-clean-texinfo \
- maybe-maintainer-clean-textutils \
- maybe-maintainer-clean-time \
- maybe-maintainer-clean-uudecode \
- maybe-maintainer-clean-wdiff \
- maybe-maintainer-clean-zip \
- maybe-maintainer-clean-zlib \
- maybe-maintainer-clean-gdb \
- maybe-maintainer-clean-expect \
- maybe-maintainer-clean-guile \
- maybe-maintainer-clean-tk \
- maybe-maintainer-clean-tix \
- maybe-maintainer-clean-libtermcap \
- maybe-maintainer-clean-utils
+@endif zlib
-.PHONY: maintainer-clean-target
-maintainer-clean-target: \
- maybe-maintainer-clean-target-libstdc++-v3 \
- maybe-maintainer-clean-target-newlib \
- maybe-maintainer-clean-target-libf2c \
- maybe-maintainer-clean-target-libobjc \
- maybe-maintainer-clean-target-libtermcap \
- maybe-maintainer-clean-target-winsup \
- maybe-maintainer-clean-target-libgloss \
- maybe-maintainer-clean-target-libiberty \
- maybe-maintainer-clean-target-gperf \
- maybe-maintainer-clean-target-examples \
- maybe-maintainer-clean-target-libffi \
- maybe-maintainer-clean-target-libjava \
- maybe-maintainer-clean-target-zlib \
- maybe-maintainer-clean-target-boehm-gc \
- maybe-maintainer-clean-target-qthreads \
- maybe-maintainer-clean-target-rda \
- maybe-maintainer-clean-target-libada
-
-# GCC, the eternal special case
-.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc
-maybe-maintainer-clean-gcc:
-maintainer-clean-gcc:
- @[ -f ./gcc/Makefile ] || exit 0; \
+.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib
+maybe-mostlyclean-zlib:
+@if zlib
+maybe-mostlyclean-zlib: mostlyclean-zlib
+
+mostlyclean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
+ $(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 gcc" ; \
- (cd gcc && \
+ echo "Doing mostlyclean 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}" \
- maintainer-clean) \
+ mostlyclean) \
|| exit 1
-# Host modules.
+@endif zlib
-.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash
-maybe-maintainer-clean-ash:
+.PHONY: maybe-clean-zlib clean-zlib
+maybe-clean-zlib:
+@if zlib
+maybe-clean-zlib: clean-zlib
-maintainer-clean-ash:
- @[ -f ./ash/Makefile ] || exit 0; \
+clean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 ash" ; \
- (cd ash && \
+ echo "Doing clean 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}" \
- maintainer-clean) \
+ clean) \
|| exit 1
+@endif zlib
-.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf
-maybe-maintainer-clean-autoconf:
+.PHONY: maybe-distclean-zlib distclean-zlib
+maybe-distclean-zlib:
+@if zlib
+maybe-distclean-zlib: distclean-zlib
-maintainer-clean-autoconf:
- @[ -f ./autoconf/Makefile ] || exit 0; \
+distclean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 autoconf" ; \
- (cd autoconf && \
+ echo "Doing distclean 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}" \
- maintainer-clean) \
+ distclean) \
|| exit 1
+@endif zlib
-.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake
-maybe-maintainer-clean-automake:
+.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib
+maybe-maintainer-clean-zlib:
+@if zlib
+maybe-maintainer-clean-zlib: maintainer-clean-zlib
-maintainer-clean-automake:
- @[ -f ./automake/Makefile ] || exit 0; \
+maintainer-clean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 automake" ; \
- (cd automake && \
+ echo "Doing maintainer-clean 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}" \
@@ -15813,230 +28587,363 @@ maintainer-clean-automake:
maintainer-clean) \
|| exit 1
+@endif zlib
-.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash
-maybe-maintainer-clean-bash:
-maintainer-clean-bash:
- @[ -f ./bash/Makefile ] || exit 0; \
+
+.PHONY: configure-gdb maybe-configure-gdb
+maybe-configure-gdb:
+@if gdb
+maybe-configure-gdb: configure-gdb
+configure-gdb:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gdb/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gdb ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gdb; \
+ cd "$(HOST_SUBDIR)/gdb" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gdb/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gdb"; \
+ libsrcdir="$$s/gdb"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gdb
+
+
+
+
+
+.PHONY: all-gdb maybe-all-gdb
+maybe-all-gdb:
+@if gdb
+TARGET-gdb=all
+maybe-all-gdb: all-gdb
+all-gdb: configure-gdb
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gdb && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-gdb))
+@endif gdb
+
+
+
+
+.PHONY: check-gdb maybe-check-gdb
+maybe-check-gdb:
+@if gdb
+maybe-check-gdb: check-gdb
+
+check-gdb:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gdb && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+
+@endif gdb
+
+.PHONY: install-gdb maybe-install-gdb
+maybe-install-gdb:
+@if gdb
+maybe-install-gdb: install-gdb
+
+install-gdb: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gdb && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+
+@endif gdb
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gdb info-gdb
+maybe-info-gdb:
+@if gdb
+maybe-info-gdb: info-gdb
+
+info-gdb: \
+ configure-gdb
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in bash" ; \
- (cd bash && \
+ echo "Doing info 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}" \
- maintainer-clean) \
+ info) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd
-maybe-maintainer-clean-bfd:
+.PHONY: maybe-dvi-gdb dvi-gdb
+maybe-dvi-gdb:
+@if gdb
+maybe-dvi-gdb: dvi-gdb
-maintainer-clean-bfd:
- @[ -f ./bfd/Makefile ] || exit 0; \
+dvi-gdb: \
+ configure-gdb
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in bfd" ; \
- (cd bfd && \
+ echo "Doing dvi 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}" \
- maintainer-clean) \
+ dvi) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes
-maybe-maintainer-clean-opcodes:
+.PHONY: maybe-html-gdb html-gdb
+maybe-html-gdb:
+@if gdb
+maybe-html-gdb: html-gdb
-maintainer-clean-opcodes:
- @[ -f ./opcodes/Makefile ] || exit 0; \
+html-gdb: \
+ configure-gdb
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in opcodes" ; \
- (cd opcodes && \
+ echo "Doing html 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}" \
- maintainer-clean) \
+ html) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils
-maybe-maintainer-clean-binutils:
+.PHONY: maybe-TAGS-gdb TAGS-gdb
+maybe-TAGS-gdb:
+@if gdb
+maybe-TAGS-gdb: TAGS-gdb
-maintainer-clean-binutils:
- @[ -f ./binutils/Makefile ] || exit 0; \
+TAGS-gdb: \
+ configure-gdb
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in binutils" ; \
- (cd binutils && \
+ echo "Doing TAGS 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}" \
- maintainer-clean) \
+ TAGS) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison
-maybe-maintainer-clean-bison:
+.PHONY: maybe-install-info-gdb install-info-gdb
+maybe-install-info-gdb:
+@if gdb
+maybe-install-info-gdb: install-info-gdb
-maintainer-clean-bison:
- @[ -f ./bison/Makefile ] || exit 0; \
+install-info-gdb: \
+ configure-gdb \
+ info-gdb
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in bison" ; \
- (cd bison && \
+ echo "Doing install-info 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}" \
- maintainer-clean) \
+ install-info) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc
-maybe-maintainer-clean-byacc:
+.PHONY: maybe-install-html-gdb install-html-gdb
+maybe-install-html-gdb:
+@if gdb
+maybe-install-html-gdb: install-html-gdb
-maintainer-clean-byacc:
- @[ -f ./byacc/Makefile ] || exit 0; \
+install-html-gdb: \
+ configure-gdb \
+ html-gdb
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in byacc" ; \
- (cd byacc && \
+ echo "Doing install-html 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}" \
- maintainer-clean) \
+ install-html) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2
-maybe-maintainer-clean-bzip2:
+.PHONY: maybe-installcheck-gdb installcheck-gdb
+maybe-installcheck-gdb:
+@if gdb
+maybe-installcheck-gdb: installcheck-gdb
-maintainer-clean-bzip2:
- @[ -f ./bzip2/Makefile ] || exit 0; \
+installcheck-gdb: \
+ configure-gdb
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in bzip2" ; \
- (cd bzip2 && \
+ echo "Doing installcheck 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}" \
- maintainer-clean) \
+ installcheck) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu
-maybe-maintainer-clean-dejagnu:
+.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb
+maybe-mostlyclean-gdb:
+@if gdb
+maybe-mostlyclean-gdb: mostlyclean-gdb
-maintainer-clean-dejagnu:
- @[ -f ./dejagnu/Makefile ] || exit 0; \
+mostlyclean-gdb:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in dejagnu" ; \
- (cd dejagnu && \
+ echo "Doing mostlyclean 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}" \
- maintainer-clean) \
+ mostlyclean) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff
-maybe-maintainer-clean-diff:
+.PHONY: maybe-clean-gdb clean-gdb
+maybe-clean-gdb:
+@if gdb
+maybe-clean-gdb: clean-gdb
-maintainer-clean-diff:
- @[ -f ./diff/Makefile ] || exit 0; \
+clean-gdb:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in diff" ; \
- (cd diff && \
+ echo "Doing clean 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}" \
- maintainer-clean) \
+ clean) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils
-maybe-maintainer-clean-dosutils:
+.PHONY: maybe-distclean-gdb distclean-gdb
+maybe-distclean-gdb:
+@if gdb
+maybe-distclean-gdb: distclean-gdb
-maintainer-clean-dosutils:
- @[ -f ./dosutils/Makefile ] || exit 0; \
+distclean-gdb:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in dosutils" ; \
- (cd dosutils && \
+ echo "Doing distclean 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}" \
- maintainer-clean) \
+ distclean) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc
-maybe-maintainer-clean-etc:
+.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb
+maybe-maintainer-clean-gdb:
+@if gdb
+maybe-maintainer-clean-gdb: maintainer-clean-gdb
-maintainer-clean-etc:
- @[ -f ./etc/Makefile ] || exit 0; \
+maintainer-clean-gdb:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in etc" ; \
- (cd etc && \
+ echo "Doing maintainer-clean 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}" \
@@ -16044,230 +28951,363 @@ maintainer-clean-etc:
maintainer-clean) \
|| exit 1
+@endif gdb
-.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar
-maybe-maintainer-clean-fastjar:
-maintainer-clean-fastjar:
- @[ -f ./fastjar/Makefile ] || exit 0; \
+
+.PHONY: configure-expect maybe-configure-expect
+maybe-configure-expect:
+@if expect
+maybe-configure-expect: configure-expect
+configure-expect:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/expect/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/expect ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/expect; \
+ cd "$(HOST_SUBDIR)/expect" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/expect/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/expect"; \
+ libsrcdir="$$s/expect"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif expect
+
+
+
+
+
+.PHONY: all-expect maybe-all-expect
+maybe-all-expect:
+@if expect
+TARGET-expect=all
+maybe-all-expect: all-expect
+all-expect: configure-expect
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/expect && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-expect))
+@endif expect
+
+
+
+
+.PHONY: check-expect maybe-check-expect
+maybe-check-expect:
+@if expect
+maybe-check-expect: check-expect
+
+check-expect:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/expect && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+
+@endif expect
+
+.PHONY: install-expect maybe-install-expect
+maybe-install-expect:
+@if expect
+maybe-install-expect: install-expect
+
+install-expect: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/expect && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+
+@endif expect
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-expect info-expect
+maybe-info-expect:
+@if expect
+maybe-info-expect: info-expect
+
+info-expect: \
+ configure-expect
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in fastjar" ; \
- (cd fastjar && \
+ echo "Doing info 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}" \
- maintainer-clean) \
+ info) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils
-maybe-maintainer-clean-fileutils:
+.PHONY: maybe-dvi-expect dvi-expect
+maybe-dvi-expect:
+@if expect
+maybe-dvi-expect: dvi-expect
-maintainer-clean-fileutils:
- @[ -f ./fileutils/Makefile ] || exit 0; \
+dvi-expect: \
+ configure-expect
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in fileutils" ; \
- (cd fileutils && \
+ echo "Doing dvi 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}" \
- maintainer-clean) \
+ dvi) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils
-maybe-maintainer-clean-findutils:
+.PHONY: maybe-html-expect html-expect
+maybe-html-expect:
+@if expect
+maybe-html-expect: html-expect
-maintainer-clean-findutils:
- @[ -f ./findutils/Makefile ] || exit 0; \
+html-expect: \
+ configure-expect
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in findutils" ; \
- (cd findutils && \
+ echo "Doing html 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}" \
- maintainer-clean) \
+ html) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-find maintainer-clean-find
-maybe-maintainer-clean-find:
+.PHONY: maybe-TAGS-expect TAGS-expect
+maybe-TAGS-expect:
+@if expect
+maybe-TAGS-expect: TAGS-expect
-maintainer-clean-find:
- @[ -f ./find/Makefile ] || exit 0; \
+TAGS-expect: \
+ configure-expect
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in find" ; \
- (cd find && \
+ echo "Doing TAGS 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}" \
- maintainer-clean) \
+ TAGS) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex
-maybe-maintainer-clean-flex:
+.PHONY: maybe-install-info-expect install-info-expect
+maybe-install-info-expect:
+@if expect
+maybe-install-info-expect: install-info-expect
-maintainer-clean-flex:
- @[ -f ./flex/Makefile ] || exit 0; \
+install-info-expect: \
+ configure-expect \
+ info-expect
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in flex" ; \
- (cd flex && \
+ echo "Doing install-info 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}" \
- maintainer-clean) \
+ install-info) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas
-maybe-maintainer-clean-gas:
+.PHONY: maybe-install-html-expect install-html-expect
+maybe-install-html-expect:
+@if expect
+maybe-install-html-expect: install-html-expect
-maintainer-clean-gas:
- @[ -f ./gas/Makefile ] || exit 0; \
+install-html-expect: \
+ configure-expect \
+ html-expect
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in gas" ; \
- (cd gas && \
+ echo "Doing install-html 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}" \
- maintainer-clean) \
+ install-html) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk
-maybe-maintainer-clean-gawk:
+.PHONY: maybe-installcheck-expect installcheck-expect
+maybe-installcheck-expect:
+@if expect
+maybe-installcheck-expect: installcheck-expect
-maintainer-clean-gawk:
- @[ -f ./gawk/Makefile ] || exit 0; \
+installcheck-expect: \
+ configure-expect
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in gawk" ; \
- (cd gawk && \
+ echo "Doing installcheck 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}" \
- maintainer-clean) \
+ installcheck) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext
-maybe-maintainer-clean-gettext:
+.PHONY: maybe-mostlyclean-expect mostlyclean-expect
+maybe-mostlyclean-expect:
+@if expect
+maybe-mostlyclean-expect: mostlyclean-expect
-maintainer-clean-gettext:
- @[ -f ./gettext/Makefile ] || exit 0; \
+mostlyclean-expect:
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in gettext" ; \
- (cd gettext && \
+ echo "Doing mostlyclean 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}" \
- maintainer-clean) \
+ mostlyclean) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv
-maybe-maintainer-clean-gnuserv:
+.PHONY: maybe-clean-expect clean-expect
+maybe-clean-expect:
+@if expect
+maybe-clean-expect: clean-expect
-maintainer-clean-gnuserv:
- @[ -f ./gnuserv/Makefile ] || exit 0; \
+clean-expect:
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in gnuserv" ; \
- (cd gnuserv && \
+ echo "Doing clean 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}" \
- maintainer-clean) \
+ clean) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof
-maybe-maintainer-clean-gprof:
+.PHONY: maybe-distclean-expect distclean-expect
+maybe-distclean-expect:
+@if expect
+maybe-distclean-expect: distclean-expect
-maintainer-clean-gprof:
- @[ -f ./gprof/Makefile ] || exit 0; \
+distclean-expect:
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in gprof" ; \
- (cd gprof && \
+ echo "Doing distclean 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}" \
- maintainer-clean) \
+ distclean) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip
-maybe-maintainer-clean-gzip:
+.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect
+maybe-maintainer-clean-expect:
+@if expect
+maybe-maintainer-clean-expect: maintainer-clean-expect
-maintainer-clean-gzip:
- @[ -f ./gzip/Makefile ] || exit 0; \
+maintainer-clean-expect:
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in gzip" ; \
- (cd gzip && \
+ echo "Doing maintainer-clean 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}" \
@@ -16275,230 +29315,363 @@ maintainer-clean-gzip:
maintainer-clean) \
|| exit 1
+@endif expect
-.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello
-maybe-maintainer-clean-hello:
-maintainer-clean-hello:
- @[ -f ./hello/Makefile ] || exit 0; \
+
+.PHONY: configure-guile maybe-configure-guile
+maybe-configure-guile:
+@if guile
+maybe-configure-guile: configure-guile
+configure-guile:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/guile/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/guile ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/guile; \
+ cd "$(HOST_SUBDIR)/guile" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/guile/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/guile"; \
+ libsrcdir="$$s/guile"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif guile
+
+
+
+
+
+.PHONY: all-guile maybe-all-guile
+maybe-all-guile:
+@if guile
+TARGET-guile=all
+maybe-all-guile: all-guile
+all-guile: configure-guile
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/guile && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-guile))
+@endif guile
+
+
+
+
+.PHONY: check-guile maybe-check-guile
+maybe-check-guile:
+@if guile
+maybe-check-guile: check-guile
+
+check-guile:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/guile && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+
+@endif guile
+
+.PHONY: install-guile maybe-install-guile
+maybe-install-guile:
+@if guile
+maybe-install-guile: install-guile
+
+install-guile: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/guile && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+
+@endif guile
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-guile info-guile
+maybe-info-guile:
+@if guile
+maybe-info-guile: info-guile
+
+info-guile: \
+ configure-guile
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in hello" ; \
- (cd hello && \
+ echo "Doing info 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}" \
- maintainer-clean) \
+ info) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent
-maybe-maintainer-clean-indent:
+.PHONY: maybe-dvi-guile dvi-guile
+maybe-dvi-guile:
+@if guile
+maybe-dvi-guile: dvi-guile
-maintainer-clean-indent:
- @[ -f ./indent/Makefile ] || exit 0; \
+dvi-guile: \
+ configure-guile
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in indent" ; \
- (cd indent && \
+ echo "Doing dvi 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}" \
- maintainer-clean) \
+ dvi) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl
-maybe-maintainer-clean-intl:
+.PHONY: maybe-html-guile html-guile
+maybe-html-guile:
+@if guile
+maybe-html-guile: html-guile
-maintainer-clean-intl:
- @[ -f ./intl/Makefile ] || exit 0; \
+html-guile: \
+ configure-guile
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in intl" ; \
- (cd intl && \
+ echo "Doing html 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}" \
- maintainer-clean) \
+ html) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl
-maybe-maintainer-clean-tcl:
+.PHONY: maybe-TAGS-guile TAGS-guile
+maybe-TAGS-guile:
+@if guile
+maybe-TAGS-guile: TAGS-guile
-maintainer-clean-tcl:
- @[ -f ./tcl/Makefile ] || exit 0; \
+TAGS-guile: \
+ configure-guile
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in tcl" ; \
- (cd tcl && \
+ echo "Doing TAGS 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}" \
- maintainer-clean) \
+ TAGS) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl
-maybe-maintainer-clean-itcl:
+.PHONY: maybe-install-info-guile install-info-guile
+maybe-install-info-guile:
+@if guile
+maybe-install-info-guile: install-info-guile
-maintainer-clean-itcl:
- @[ -f ./itcl/Makefile ] || exit 0; \
+install-info-guile: \
+ configure-guile \
+ info-guile
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in itcl" ; \
- (cd itcl && \
+ echo "Doing install-info 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}" \
- maintainer-clean) \
+ install-info) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld
-maybe-maintainer-clean-ld:
+.PHONY: maybe-install-html-guile install-html-guile
+maybe-install-html-guile:
+@if guile
+maybe-install-html-guile: install-html-guile
-maintainer-clean-ld:
- @[ -f ./ld/Makefile ] || exit 0; \
+install-html-guile: \
+ configure-guile \
+ html-guile
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in ld" ; \
- (cd ld && \
+ echo "Doing install-html 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}" \
- maintainer-clean) \
+ install-html) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui
-maybe-maintainer-clean-libgui:
+.PHONY: maybe-installcheck-guile installcheck-guile
+maybe-installcheck-guile:
+@if guile
+maybe-installcheck-guile: installcheck-guile
-maintainer-clean-libgui:
- @[ -f ./libgui/Makefile ] || exit 0; \
+installcheck-guile: \
+ configure-guile
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in libgui" ; \
- (cd libgui && \
+ echo "Doing installcheck 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}" \
- maintainer-clean) \
+ installcheck) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty
-maybe-maintainer-clean-libiberty:
+.PHONY: maybe-mostlyclean-guile mostlyclean-guile
+maybe-mostlyclean-guile:
+@if guile
+maybe-mostlyclean-guile: mostlyclean-guile
-maintainer-clean-libiberty:
- @[ -f ./libiberty/Makefile ] || exit 0; \
+mostlyclean-guile:
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in libiberty" ; \
- (cd libiberty && \
+ echo "Doing mostlyclean 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}" \
- maintainer-clean) \
+ mostlyclean) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool
-maybe-maintainer-clean-libtool:
+.PHONY: maybe-clean-guile clean-guile
+maybe-clean-guile:
+@if guile
+maybe-clean-guile: clean-guile
-maintainer-clean-libtool:
- @[ -f ./libtool/Makefile ] || exit 0; \
+clean-guile:
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in libtool" ; \
- (cd libtool && \
+ echo "Doing clean 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}" \
- maintainer-clean) \
+ clean) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4
-maybe-maintainer-clean-m4:
+.PHONY: maybe-distclean-guile distclean-guile
+maybe-distclean-guile:
+@if guile
+maybe-distclean-guile: distclean-guile
-maintainer-clean-m4:
- @[ -f ./m4/Makefile ] || exit 0; \
+distclean-guile:
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in m4" ; \
- (cd m4 && \
+ echo "Doing distclean 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}" \
- maintainer-clean) \
+ distclean) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-make maintainer-clean-make
-maybe-maintainer-clean-make:
+.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile
+maybe-maintainer-clean-guile:
+@if guile
+maybe-maintainer-clean-guile: maintainer-clean-guile
-maintainer-clean-make:
- @[ -f ./make/Makefile ] || exit 0; \
+maintainer-clean-guile:
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in make" ; \
- (cd make && \
+ echo "Doing maintainer-clean 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}" \
@@ -16506,230 +29679,363 @@ maintainer-clean-make:
maintainer-clean) \
|| exit 1
+@endif guile
-.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc
-maybe-maintainer-clean-mmalloc:
-maintainer-clean-mmalloc:
- @[ -f ./mmalloc/Makefile ] || exit 0; \
+
+.PHONY: configure-tk maybe-configure-tk
+maybe-configure-tk:
+@if tk
+maybe-configure-tk: configure-tk
+configure-tk:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/tk/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tk ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/tk; \
+ cd "$(HOST_SUBDIR)/tk" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/tk/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/tk"; \
+ libsrcdir="$$s/tk"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif tk
+
+
+
+
+
+.PHONY: all-tk maybe-all-tk
+maybe-all-tk:
+@if tk
+TARGET-tk=all
+maybe-all-tk: all-tk
+all-tk: configure-tk
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tk && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-tk))
+@endif tk
+
+
+
+
+.PHONY: check-tk maybe-check-tk
+maybe-check-tk:
+@if tk
+maybe-check-tk: check-tk
+
+check-tk:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tk && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+
+@endif tk
+
+.PHONY: install-tk maybe-install-tk
+maybe-install-tk:
+@if tk
+maybe-install-tk: install-tk
+
+install-tk: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tk && \
+ $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+
+@endif tk
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-tk info-tk
+maybe-info-tk:
+@if tk
+maybe-info-tk: info-tk
+
+info-tk: \
+ configure-tk
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in mmalloc" ; \
- (cd mmalloc && \
+ echo "Doing info 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}" \
- maintainer-clean) \
+ info) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch
-maybe-maintainer-clean-patch:
+.PHONY: maybe-dvi-tk dvi-tk
+maybe-dvi-tk:
+@if tk
+maybe-dvi-tk: dvi-tk
-maintainer-clean-patch:
- @[ -f ./patch/Makefile ] || exit 0; \
+dvi-tk: \
+ configure-tk
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in patch" ; \
- (cd patch && \
+ echo "Doing dvi 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}" \
- maintainer-clean) \
+ dvi) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl
-maybe-maintainer-clean-perl:
+.PHONY: maybe-html-tk html-tk
+maybe-html-tk:
+@if tk
+maybe-html-tk: html-tk
-maintainer-clean-perl:
- @[ -f ./perl/Makefile ] || exit 0; \
+html-tk: \
+ configure-tk
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in perl" ; \
- (cd perl && \
+ echo "Doing html 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}" \
- maintainer-clean) \
+ html) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms
-maybe-maintainer-clean-prms:
+.PHONY: maybe-TAGS-tk TAGS-tk
+maybe-TAGS-tk:
+@if tk
+maybe-TAGS-tk: TAGS-tk
-maintainer-clean-prms:
- @[ -f ./prms/Makefile ] || exit 0; \
+TAGS-tk: \
+ configure-tk
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in prms" ; \
- (cd prms && \
+ echo "Doing TAGS 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}" \
- maintainer-clean) \
+ TAGS) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs
-maybe-maintainer-clean-rcs:
+.PHONY: maybe-install-info-tk install-info-tk
+maybe-install-info-tk:
+@if tk
+maybe-install-info-tk: install-info-tk
-maintainer-clean-rcs:
- @[ -f ./rcs/Makefile ] || exit 0; \
+install-info-tk: \
+ configure-tk \
+ info-tk
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in rcs" ; \
- (cd rcs && \
+ echo "Doing install-info 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}" \
- maintainer-clean) \
+ install-info) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline
-maybe-maintainer-clean-readline:
+.PHONY: maybe-install-html-tk install-html-tk
+maybe-install-html-tk:
+@if tk
+maybe-install-html-tk: install-html-tk
-maintainer-clean-readline:
- @[ -f ./readline/Makefile ] || exit 0; \
+install-html-tk: \
+ configure-tk \
+ html-tk
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in readline" ; \
- (cd readline && \
+ echo "Doing install-html 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}" \
- maintainer-clean) \
+ install-html) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-release maintainer-clean-release
-maybe-maintainer-clean-release:
+.PHONY: maybe-installcheck-tk installcheck-tk
+maybe-installcheck-tk:
+@if tk
+maybe-installcheck-tk: installcheck-tk
-maintainer-clean-release:
- @[ -f ./release/Makefile ] || exit 0; \
+installcheck-tk: \
+ configure-tk
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in release" ; \
- (cd release && \
+ echo "Doing installcheck 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}" \
- maintainer-clean) \
+ installcheck) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode
-maybe-maintainer-clean-recode:
+.PHONY: maybe-mostlyclean-tk mostlyclean-tk
+maybe-mostlyclean-tk:
+@if tk
+maybe-mostlyclean-tk: mostlyclean-tk
-maintainer-clean-recode:
- @[ -f ./recode/Makefile ] || exit 0; \
+mostlyclean-tk:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in recode" ; \
- (cd recode && \
+ echo "Doing mostlyclean 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}" \
- maintainer-clean) \
+ mostlyclean) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed
-maybe-maintainer-clean-sed:
+.PHONY: maybe-clean-tk clean-tk
+maybe-clean-tk:
+@if tk
+maybe-clean-tk: clean-tk
-maintainer-clean-sed:
- @[ -f ./sed/Makefile ] || exit 0; \
+clean-tk:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in sed" ; \
- (cd sed && \
+ echo "Doing clean 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}" \
- maintainer-clean) \
+ clean) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr
-maybe-maintainer-clean-send-pr:
+.PHONY: maybe-distclean-tk distclean-tk
+maybe-distclean-tk:
+@if tk
+maybe-distclean-tk: distclean-tk
-maintainer-clean-send-pr:
- @[ -f ./send-pr/Makefile ] || exit 0; \
+distclean-tk:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in send-pr" ; \
- (cd send-pr && \
+ echo "Doing distclean 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}" \
- maintainer-clean) \
+ distclean) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils
-maybe-maintainer-clean-shellutils:
+.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk
+maybe-maintainer-clean-tk:
+@if tk
+maybe-maintainer-clean-tk: maintainer-clean-tk
-maintainer-clean-shellutils:
- @[ -f ./shellutils/Makefile ] || exit 0; \
+maintainer-clean-tk:
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 maintainer-clean in shellutils" ; \
- (cd shellutils && \
+ echo "Doing maintainer-clean 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}" \
@@ -16737,342 +30043,655 @@ maintainer-clean-shellutils:
maintainer-clean) \
|| exit 1
+@endif tk
-.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid
-maybe-maintainer-clean-sid:
-maintainer-clean-sid:
- @[ -f ./sid/Makefile ] || exit 0; \
+
+.PHONY: configure-libtermcap maybe-configure-libtermcap
+maybe-configure-libtermcap:
+@if libtermcap
+maybe-configure-libtermcap: configure-libtermcap
+configure-libtermcap:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libtermcap/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libtermcap ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libtermcap; \
+ cd "$(HOST_SUBDIR)/libtermcap" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libtermcap/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libtermcap"; \
+ libsrcdir="$$s/libtermcap"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif libtermcap
+
+
+
+
+
+.PHONY: all-libtermcap maybe-all-libtermcap
+maybe-all-libtermcap:
+@if libtermcap
+TARGET-libtermcap=all
+maybe-all-libtermcap: all-libtermcap
+all-libtermcap: configure-libtermcap
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libtermcap && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libtermcap))
+@endif libtermcap
+
+
+
+
+.PHONY: check-libtermcap maybe-check-libtermcap
+maybe-check-libtermcap:
+@if libtermcap
+maybe-check-libtermcap: check-libtermcap
+
+check-libtermcap:
+
+@endif libtermcap
+
+.PHONY: install-libtermcap maybe-install-libtermcap
+maybe-install-libtermcap:
+@if libtermcap
+maybe-install-libtermcap: install-libtermcap
+
+install-libtermcap: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libtermcap && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif libtermcap
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-libtermcap info-libtermcap
+maybe-info-libtermcap:
+@if libtermcap
+maybe-info-libtermcap: info-libtermcap
+
+info-libtermcap: \
+ configure-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 sid" ; \
- (cd sid && \
+ echo "Doing info 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}" \
- maintainer-clean) \
+ info) \
|| exit 1
+@endif libtermcap
-.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim
-maybe-maintainer-clean-sim:
+.PHONY: maybe-dvi-libtermcap dvi-libtermcap
+maybe-dvi-libtermcap:
+@if libtermcap
+maybe-dvi-libtermcap: dvi-libtermcap
-maintainer-clean-sim:
- @[ -f ./sim/Makefile ] || exit 0; \
+dvi-libtermcap: \
+ configure-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 sim" ; \
- (cd sim && \
+ echo "Doing dvi 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}" \
- maintainer-clean) \
+ dvi) \
|| exit 1
+@endif libtermcap
-.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar
-maybe-maintainer-clean-tar:
+.PHONY: maybe-html-libtermcap html-libtermcap
+maybe-html-libtermcap:
+@if libtermcap
+maybe-html-libtermcap: html-libtermcap
-maintainer-clean-tar:
- @[ -f ./tar/Makefile ] || exit 0; \
+html-libtermcap: \
+ configure-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 tar" ; \
- (cd tar && \
+ echo "Doing html 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}" \
- maintainer-clean) \
+ html) \
|| exit 1
+@endif libtermcap
-.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo
-maybe-maintainer-clean-texinfo:
+.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap
+maybe-TAGS-libtermcap:
+@if libtermcap
+maybe-TAGS-libtermcap: TAGS-libtermcap
-maintainer-clean-texinfo:
- @[ -f ./texinfo/Makefile ] || exit 0; \
+TAGS-libtermcap: \
+ configure-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 texinfo" ; \
- (cd texinfo && \
+ echo "Doing TAGS 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}" \
- maintainer-clean) \
+ TAGS) \
|| exit 1
+@endif libtermcap
-.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils
-maybe-maintainer-clean-textutils:
+.PHONY: maybe-install-info-libtermcap install-info-libtermcap
+maybe-install-info-libtermcap:
+@if libtermcap
+maybe-install-info-libtermcap: install-info-libtermcap
-maintainer-clean-textutils:
- @[ -f ./textutils/Makefile ] || exit 0; \
+install-info-libtermcap: \
+ configure-libtermcap \
+ info-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 textutils" ; \
- (cd textutils && \
+ echo "Doing install-info 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}" \
- maintainer-clean) \
+ install-info) \
|| exit 1
+@endif libtermcap
-.PHONY: maybe-maintainer-clean-time maintainer-clean-time
-maybe-maintainer-clean-time:
+.PHONY: maybe-install-html-libtermcap install-html-libtermcap
+maybe-install-html-libtermcap:
+@if libtermcap
+maybe-install-html-libtermcap: install-html-libtermcap
-maintainer-clean-time:
- @[ -f ./time/Makefile ] || exit 0; \
+install-html-libtermcap: \
+ configure-libtermcap \
+ html-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 time" ; \
- (cd time && \
+ echo "Doing install-html 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}" \
- maintainer-clean) \
+ install-html) \
|| exit 1
+@endif libtermcap
-.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode
-maybe-maintainer-clean-uudecode:
+.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap
+maybe-installcheck-libtermcap:
+@if libtermcap
+maybe-installcheck-libtermcap: installcheck-libtermcap
-maintainer-clean-uudecode:
- @[ -f ./uudecode/Makefile ] || exit 0; \
+installcheck-libtermcap: \
+ configure-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 uudecode" ; \
- (cd uudecode && \
+ echo "Doing installcheck 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}" \
- maintainer-clean) \
+ installcheck) \
|| exit 1
+@endif libtermcap
-.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff
-maybe-maintainer-clean-wdiff:
+.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap
+maybe-mostlyclean-libtermcap:
+@if libtermcap
+maybe-mostlyclean-libtermcap: mostlyclean-libtermcap
-maintainer-clean-wdiff:
- @[ -f ./wdiff/Makefile ] || exit 0; \
+# libtermcap doesn't support mostlyclean.
+mostlyclean-libtermcap:
+
+@endif libtermcap
+
+.PHONY: maybe-clean-libtermcap clean-libtermcap
+maybe-clean-libtermcap:
+@if libtermcap
+maybe-clean-libtermcap: clean-libtermcap
+
+# libtermcap doesn't support clean.
+clean-libtermcap:
+
+@endif libtermcap
+
+.PHONY: maybe-distclean-libtermcap distclean-libtermcap
+maybe-distclean-libtermcap:
+@if libtermcap
+maybe-distclean-libtermcap: distclean-libtermcap
+
+# libtermcap doesn't support distclean.
+distclean-libtermcap:
+
+@endif libtermcap
+
+.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap
+maybe-maintainer-clean-libtermcap:
+@if libtermcap
+maybe-maintainer-clean-libtermcap: maintainer-clean-libtermcap
+
+# libtermcap doesn't support maintainer-clean.
+maintainer-clean-libtermcap:
+
+@endif libtermcap
+
+
+
+.PHONY: configure-utils maybe-configure-utils
+maybe-configure-utils:
+@if utils
+maybe-configure-utils: configure-utils
+configure-utils:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/utils/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/utils ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/utils; \
+ cd "$(HOST_SUBDIR)/utils" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/utils/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/utils"; \
+ libsrcdir="$$s/utils"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif utils
+
+
+
+
+
+.PHONY: all-utils maybe-all-utils
+maybe-all-utils:
+@if utils
+TARGET-utils=all
+maybe-all-utils: all-utils
+all-utils: configure-utils
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/utils && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-utils))
+@endif utils
+
+
+
+
+.PHONY: check-utils maybe-check-utils
+maybe-check-utils:
+@if utils
+maybe-check-utils: check-utils
+
+check-utils:
+
+@endif utils
+
+.PHONY: install-utils maybe-install-utils
+maybe-install-utils:
+@if utils
+maybe-install-utils: install-utils
+
+install-utils: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/utils && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif utils
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-utils info-utils
+maybe-info-utils:
+@if utils
+maybe-info-utils: info-utils
+
+info-utils: \
+ configure-utils
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 wdiff" ; \
- (cd wdiff && \
+ echo "Doing info 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}" \
- maintainer-clean) \
+ info) \
|| exit 1
+@endif utils
-.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip
-maybe-maintainer-clean-zip:
+.PHONY: maybe-dvi-utils dvi-utils
+maybe-dvi-utils:
+@if utils
+maybe-dvi-utils: dvi-utils
-maintainer-clean-zip:
- @[ -f ./zip/Makefile ] || exit 0; \
+dvi-utils: \
+ configure-utils
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 zip" ; \
- (cd zip && \
+ echo "Doing dvi 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}" \
- maintainer-clean) \
+ dvi) \
|| exit 1
+@endif utils
-.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib
-maybe-maintainer-clean-zlib:
+.PHONY: maybe-html-utils html-utils
+maybe-html-utils:
+@if utils
+maybe-html-utils: html-utils
-maintainer-clean-zlib:
- @[ -f ./zlib/Makefile ] || exit 0; \
+html-utils: \
+ configure-utils
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 zlib" ; \
- (cd zlib && \
+ echo "Doing html 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}" \
- maintainer-clean) \
+ html) \
|| exit 1
+@endif utils
-.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb
-maybe-maintainer-clean-gdb:
+.PHONY: maybe-TAGS-utils TAGS-utils
+maybe-TAGS-utils:
+@if utils
+maybe-TAGS-utils: TAGS-utils
-maintainer-clean-gdb:
- @[ -f ./gdb/Makefile ] || exit 0; \
+TAGS-utils: \
+ configure-utils
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 gdb" ; \
- (cd gdb && \
+ echo "Doing TAGS 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}" \
- maintainer-clean) \
+ TAGS) \
|| exit 1
+@endif utils
-.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect
-maybe-maintainer-clean-expect:
+.PHONY: maybe-install-info-utils install-info-utils
+maybe-install-info-utils:
+@if utils
+maybe-install-info-utils: install-info-utils
-maintainer-clean-expect:
- @[ -f ./expect/Makefile ] || exit 0; \
+install-info-utils: \
+ configure-utils \
+ info-utils
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 expect" ; \
- (cd expect && \
+ echo "Doing install-info 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}" \
- maintainer-clean) \
+ install-info) \
|| exit 1
+@endif utils
-.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile
-maybe-maintainer-clean-guile:
+.PHONY: maybe-install-html-utils install-html-utils
+maybe-install-html-utils:
+@if utils
+maybe-install-html-utils: install-html-utils
-maintainer-clean-guile:
- @[ -f ./guile/Makefile ] || exit 0; \
+install-html-utils: \
+ configure-utils \
+ html-utils
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 guile" ; \
- (cd guile && \
+ echo "Doing install-html 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}" \
- maintainer-clean) \
+ install-html) \
|| exit 1
+@endif utils
-.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk
-maybe-maintainer-clean-tk:
+.PHONY: maybe-installcheck-utils installcheck-utils
+maybe-installcheck-utils:
+@if utils
+maybe-installcheck-utils: installcheck-utils
-maintainer-clean-tk:
- @[ -f ./tk/Makefile ] || exit 0; \
+installcheck-utils: \
+ configure-utils
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 tk" ; \
- (cd tk && \
+ echo "Doing installcheck 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}" \
- maintainer-clean) \
+ installcheck) \
+ || exit 1
+
+@endif utils
+
+.PHONY: maybe-mostlyclean-utils mostlyclean-utils
+maybe-mostlyclean-utils:
+@if utils
+maybe-mostlyclean-utils: mostlyclean-utils
+
+mostlyclean-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 mostlyclean 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}" \
+ mostlyclean) \
|| exit 1
+@endif utils
-.PHONY: maybe-maintainer-clean-tix maintainer-clean-tix
-maybe-maintainer-clean-tix:
+.PHONY: maybe-clean-utils clean-utils
+maybe-clean-utils:
+@if utils
+maybe-clean-utils: clean-utils
-maintainer-clean-tix:
- @[ -f ./tix/Makefile ] || exit 0; \
+clean-utils:
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 tix" ; \
- (cd tix && \
+ echo "Doing clean 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}" \
- maintainer-clean) \
+ clean) \
|| exit 1
+@endif utils
-.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap
-maybe-maintainer-clean-libtermcap:
+.PHONY: maybe-distclean-utils distclean-utils
+maybe-distclean-utils:
+@if utils
+maybe-distclean-utils: distclean-utils
-# libtermcap doesn't support maintainer-clean.
-maintainer-clean-libtermcap:
+distclean-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 distclean 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}" \
+ distclean) \
+ || exit 1
+@endif utils
.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils
maybe-maintainer-clean-utils:
+@if utils
+maybe-maintainer-clean-utils: maintainer-clean-utils
maintainer-clean-utils:
+ @: $(MAKE); $(unstage)
@[ -f ./utils/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
+ $(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 utils" ; \
- (cd utils && \
+ (cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -17080,219 +30699,363 @@ maintainer-clean-utils:
maintainer-clean) \
|| exit 1
+@endif utils
-# Target modules.
-.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3
-maybe-maintainer-clean-target-libstdc++-v3:
+.PHONY: configure-gnattools maybe-configure-gnattools
+maybe-configure-gnattools:
+@if gnattools
+maybe-configure-gnattools: configure-gnattools
+configure-gnattools:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gnattools/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gnattools ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gnattools; \
+ cd "$(HOST_SUBDIR)/gnattools" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gnattools/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gnattools"; \
+ libsrcdir="$$s/gnattools"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif gnattools
-maintainer-clean-target-libstdc++-v3:
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+
+
+
+
+.PHONY: all-gnattools maybe-all-gnattools
+maybe-all-gnattools:
+@if gnattools
+TARGET-gnattools=all
+maybe-all-gnattools: all-gnattools
+all-gnattools: configure-gnattools
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gnattools && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gnattools))
+@endif gnattools
+
+
+
+
+.PHONY: check-gnattools maybe-check-gnattools
+maybe-check-gnattools:
+@if gnattools
+maybe-check-gnattools: check-gnattools
+
+check-gnattools:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gnattools && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif gnattools
+
+.PHONY: install-gnattools maybe-install-gnattools
+maybe-install-gnattools:
+@if gnattools
+maybe-install-gnattools: install-gnattools
+
+install-gnattools: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gnattools && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif gnattools
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-gnattools info-gnattools
+maybe-info-gnattools:
+@if gnattools
+maybe-info-gnattools: info-gnattools
+
+info-gnattools: \
+ configure-gnattools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ echo "Doing info 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}" \
- maintainer-clean) \
+ info) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib
-maybe-maintainer-clean-target-newlib:
+.PHONY: maybe-dvi-gnattools dvi-gnattools
+maybe-dvi-gnattools:
+@if gnattools
+maybe-dvi-gnattools: dvi-gnattools
-maintainer-clean-target-newlib:
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+dvi-gnattools: \
+ configure-gnattools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ echo "Doing dvi 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}" \
- maintainer-clean) \
+ dvi) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-libf2c maintainer-clean-target-libf2c
-maybe-maintainer-clean-target-libf2c:
+.PHONY: maybe-html-gnattools html-gnattools
+maybe-html-gnattools:
+@if gnattools
+maybe-html-gnattools: html-gnattools
-maintainer-clean-target-libf2c:
- @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+html-gnattools: \
+ configure-gnattools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libf2c && \
+ echo "Doing html 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}" \
- maintainer-clean) \
+ html) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc
-maybe-maintainer-clean-target-libobjc:
+.PHONY: maybe-TAGS-gnattools TAGS-gnattools
+maybe-TAGS-gnattools:
+@if gnattools
+maybe-TAGS-gnattools: TAGS-gnattools
-maintainer-clean-target-libobjc:
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+TAGS-gnattools: \
+ configure-gnattools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libobjc && \
+ echo "Doing TAGS 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}" \
- maintainer-clean) \
+ TAGS) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap
-maybe-maintainer-clean-target-libtermcap:
+.PHONY: maybe-install-info-gnattools install-info-gnattools
+maybe-install-info-gnattools:
+@if gnattools
+maybe-install-info-gnattools: install-info-gnattools
-# libtermcap doesn't support maintainer-clean.
-maintainer-clean-target-libtermcap:
+install-info-gnattools: \
+ configure-gnattools \
+ info-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-info 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-info) \
+ || exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup
-maybe-maintainer-clean-target-winsup:
+.PHONY: maybe-install-html-gnattools install-html-gnattools
+maybe-install-html-gnattools:
+@if gnattools
+maybe-install-html-gnattools: install-html-gnattools
-maintainer-clean-target-winsup:
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+install-html-gnattools: \
+ configure-gnattools \
+ html-gnattools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/winsup && \
+ echo "Doing install-html 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}" \
- maintainer-clean) \
+ install-html) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss
-maybe-maintainer-clean-target-libgloss:
+.PHONY: maybe-installcheck-gnattools installcheck-gnattools
+maybe-installcheck-gnattools:
+@if gnattools
+maybe-installcheck-gnattools: installcheck-gnattools
-maintainer-clean-target-libgloss:
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+installcheck-gnattools: \
+ configure-gnattools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgloss && \
+ echo "Doing installcheck 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}" \
- maintainer-clean) \
+ installcheck) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty
-maybe-maintainer-clean-target-libiberty:
+.PHONY: maybe-mostlyclean-gnattools mostlyclean-gnattools
+maybe-mostlyclean-gnattools:
+@if gnattools
+maybe-mostlyclean-gnattools: mostlyclean-gnattools
-maintainer-clean-target-libiberty:
- @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+mostlyclean-gnattools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libiberty && \
+ echo "Doing mostlyclean 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}" \
- maintainer-clean) \
+ mostlyclean) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf
-maybe-maintainer-clean-target-gperf:
+.PHONY: maybe-clean-gnattools clean-gnattools
+maybe-clean-gnattools:
+@if gnattools
+maybe-clean-gnattools: clean-gnattools
-maintainer-clean-target-gperf:
- @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+clean-gnattools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/gperf && \
+ echo "Doing clean 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}" \
- maintainer-clean) \
+ clean) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples
-maybe-maintainer-clean-target-examples:
+.PHONY: maybe-distclean-gnattools distclean-gnattools
+maybe-distclean-gnattools:
+@if gnattools
+maybe-distclean-gnattools: distclean-gnattools
-maintainer-clean-target-examples:
- @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+distclean-gnattools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/examples && \
+ echo "Doing distclean 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}" \
- maintainer-clean) \
+ distclean) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi
-maybe-maintainer-clean-target-libffi:
+.PHONY: maybe-maintainer-clean-gnattools maintainer-clean-gnattools
+maybe-maintainer-clean-gnattools:
+@if gnattools
+maybe-maintainer-clean-gnattools: maintainer-clean-gnattools
-maintainer-clean-target-libffi:
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+maintainer-clean-gnattools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libffi && \
+ echo "Doing maintainer-clean 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}" \
@@ -17300,6401 +31063,7953 @@ maintainer-clean-target-libffi:
maintainer-clean) \
|| exit 1
+@endif gnattools
-.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava
-maybe-maintainer-clean-target-libjava:
-maintainer-clean-target-libjava:
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+
+# ---------------------------------------
+# Modules which run on the target machine
+# ---------------------------------------
+
+
+
+
+.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3
+maybe-configure-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-configure-target-libstdc++-v3: configure-target-libstdc++-v3
+configure-target-libstdc++-v3:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libstdc++-v3..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \
+ cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+ libsrcdir="$$s/libstdc++-v3"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif target-libstdc++-v3
+
+
+
+
+
+.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3
+maybe-all-target-libstdc++-v3:
+@if target-libstdc++-v3
+TARGET-target-libstdc++-v3=all
+maybe-all-target-libstdc++-v3: all-target-libstdc++-v3
+all-target-libstdc++-v3: configure-target-libstdc++-v3
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' $(TARGET-target-libstdc++-v3))
+@endif target-libstdc++-v3
+
+
+
+
+
+.PHONY: check-target-libstdc++-v3 maybe-check-target-libstdc++-v3
+maybe-check-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-check-target-libstdc++-v3: check-target-libstdc++-v3
+
+check-target-libstdc++-v3:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+
+@endif target-libstdc++-v3
+
+.PHONY: install-target-libstdc++-v3 maybe-install-target-libstdc++-v3
+maybe-install-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-install-target-libstdc++-v3: install-target-libstdc++-v3
+
+install-target-libstdc++-v3: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libstdc++-v3
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3
+maybe-info-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-info-target-libstdc++-v3: info-target-libstdc++-v3
+
+info-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; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing info 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)/libjava && \
+ (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}" \
- maintainer-clean) \
+ info) \
|| exit 1
+@endif target-libstdc++-v3
-.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib
-maybe-maintainer-clean-target-zlib:
+.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3
+maybe-dvi-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-dvi-target-libstdc++-v3: dvi-target-libstdc++-v3
-maintainer-clean-target-zlib:
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+dvi-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; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing dvi 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)/zlib && \
+ (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}" \
- maintainer-clean) \
+ dvi) \
|| exit 1
+@endif target-libstdc++-v3
-.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc
-maybe-maintainer-clean-target-boehm-gc:
+.PHONY: maybe-html-target-libstdc++-v3 html-target-libstdc++-v3
+maybe-html-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-html-target-libstdc++-v3: html-target-libstdc++-v3
-maintainer-clean-target-boehm-gc:
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+html-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; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing html 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)/boehm-gc && \
+ (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}" \
- maintainer-clean) \
+ html) \
|| exit 1
+@endif target-libstdc++-v3
-.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads
-maybe-maintainer-clean-target-qthreads:
+.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3
+maybe-TAGS-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-TAGS-target-libstdc++-v3: TAGS-target-libstdc++-v3
-maintainer-clean-target-qthreads:
- @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing TAGS 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)/qthreads && \
+ (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}" \
- maintainer-clean) \
+ TAGS) \
|| exit 1
+@endif target-libstdc++-v3
-.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda
-maybe-maintainer-clean-target-rda:
+.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3
+maybe-install-info-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-install-info-target-libstdc++-v3: install-info-target-libstdc++-v3
-maintainer-clean-target-rda:
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+install-info-target-libstdc++-v3: \
+ configure-target-libstdc++-v3 \
+ info-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; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-info 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)/rda && \
+ (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}" \
- maintainer-clean) \
+ install-info) \
|| exit 1
+@endif target-libstdc++-v3
-.PHONY: maybe-maintainer-clean-target-libada maintainer-clean-target-libada
-maybe-maintainer-clean-target-libada:
+.PHONY: maybe-install-html-target-libstdc++-v3 install-html-target-libstdc++-v3
+maybe-install-html-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-install-html-target-libstdc++-v3: install-html-target-libstdc++-v3
-maintainer-clean-target-libada:
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+install-html-target-libstdc++-v3: \
+ configure-target-libstdc++-v3 \
+ html-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; \
- $(SET_LIB_PATH) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libada" ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-html 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)/libada && \
+ (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}" \
- maintainer-clean) \
+ install-html) \
|| exit 1
+@endif target-libstdc++-v3
+
+.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3
+maybe-installcheck-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-installcheck-target-libstdc++-v3: installcheck-target-libstdc++-v3
+
+installcheck-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 installcheck 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}" \
+ installcheck) \
+ || exit 1
+@endif target-libstdc++-v3
+.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3
+maybe-mostlyclean-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-mostlyclean-target-libstdc++-v3: mostlyclean-target-libstdc++-v3
-# Here are the targets which correspond to the do-X targets.
+mostlyclean-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 mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
-.PHONY: info installcheck dvi install-info
-.PHONY: clean distclean mostlyclean maintainer-clean realclean
-.PHONY: local-clean local-distclean local-maintainer-clean
-info: do-info
-installcheck: do-installcheck
-dvi: do-dvi
+@endif target-libstdc++-v3
-# Make sure makeinfo is built before we do a `make info', if we're
-# in fact building texinfo.
-do-info: maybe-all-texinfo
+.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3
+maybe-clean-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-clean-target-libstdc++-v3: clean-target-libstdc++-v3
-install-info: do-install-info dir.info
+clean-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; \
- if [ -f dir.info ] ; then \
- $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
- else true ; fi
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
-local-clean:
- -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
+@endif target-libstdc++-v3
-local-distclean:
- -rm -f Makefile config.status config.cache mh-frag mt-frag
- -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
- -if [ "$(TARGET_SUBDIR)" != "." ]; then \
- rm -rf $(TARGET_SUBDIR); \
- else true; fi
- -rm -rf $(BUILD_SUBDIR)
- -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
- -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
- -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
- -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
- -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
+.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3
+maybe-distclean-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-distclean-target-libstdc++-v3: distclean-target-libstdc++-v3
-local-maintainer-clean:
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+distclean-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 distclean 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}" \
+ distclean) \
+ || exit 1
-clean: do-clean local-clean
-mostlyclean: do-mostlyclean local-clean
-distclean: do-distclean local-clean local-distclean
-maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
-maintainer-clean: local-distclean
-realclean: maintainer-clean
+@endif target-libstdc++-v3
-# Extra dependency for clean-target, owing to the mixed nature of gcc
-clean-target: clean-target-libgcc
-clean-target-libgcc:
- test ! -d gcc/libgcc || \
- (cd gcc/libgcc && find . -type d -print) | \
- while read d; do rm -f gcc/$$d/libgcc.a || : ; done
- -rm -rf gcc/libgcc
+.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3
+maybe-maintainer-clean-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-maintainer-clean-target-libstdc++-v3: maintainer-clean-target-libstdc++-v3
-# Check target.
+maintainer-clean-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 maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
-.PHONY: check do-check
-check: do-check
+@endif target-libstdc++-v3
-# Only include modules actually being configured and built.
-do-check: maybe-check-gcc \
- maybe-check-ash \
- maybe-check-autoconf \
- maybe-check-automake \
- maybe-check-bash \
- maybe-check-bfd \
- maybe-check-opcodes \
- maybe-check-binutils \
- maybe-check-bison \
- maybe-check-byacc \
- maybe-check-bzip2 \
- maybe-check-dejagnu \
- maybe-check-diff \
- maybe-check-dosutils \
- maybe-check-etc \
- maybe-check-fastjar \
- maybe-check-fileutils \
- maybe-check-findutils \
- maybe-check-find \
- maybe-check-flex \
- maybe-check-gas \
- maybe-check-gawk \
- maybe-check-gettext \
- maybe-check-gnuserv \
- maybe-check-gprof \
- maybe-check-gzip \
- maybe-check-hello \
- maybe-check-indent \
- maybe-check-intl \
- maybe-check-tcl \
- maybe-check-itcl \
- maybe-check-ld \
- maybe-check-libgui \
- maybe-check-libiberty \
- maybe-check-libtool \
- maybe-check-m4 \
- maybe-check-make \
- maybe-check-mmalloc \
- maybe-check-patch \
- maybe-check-perl \
- maybe-check-prms \
- maybe-check-rcs \
- maybe-check-readline \
- maybe-check-release \
- maybe-check-recode \
- maybe-check-sed \
- maybe-check-send-pr \
- maybe-check-shellutils \
- maybe-check-sid \
- maybe-check-sim \
- maybe-check-tar \
- maybe-check-texinfo \
- maybe-check-textutils \
- maybe-check-time \
- maybe-check-uudecode \
- maybe-check-wdiff \
- maybe-check-zip \
- maybe-check-zlib \
- maybe-check-gdb \
- maybe-check-expect \
- maybe-check-guile \
- maybe-check-tk \
- maybe-check-tix \
- maybe-check-libtermcap \
- maybe-check-utils \
- maybe-check-target-libstdc++-v3 \
- maybe-check-target-newlib \
- maybe-check-target-libf2c \
- maybe-check-target-libobjc \
- maybe-check-target-libtermcap \
- maybe-check-target-winsup \
- maybe-check-target-libgloss \
- maybe-check-target-libiberty \
- maybe-check-target-gperf \
- maybe-check-target-examples \
- maybe-check-target-libffi \
- maybe-check-target-libjava \
- maybe-check-target-zlib \
- maybe-check-target-boehm-gc \
- maybe-check-target-qthreads \
- maybe-check-target-rda \
- maybe-check-target-libada
-# Automated reporting of test results.
-warning.log: build.log
- $(srcdir)/contrib/warn_summary build.log > $@
-mail-report.log:
- if test x'$(BOOT_CFLAGS)' != x''; then \
- BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
- fi; \
- $(srcdir)/contrib/test_summary -t >$@
- chmod +x $@
- echo If you really want to send e-mail, run ./$@ now
-mail-report-with-warnings.log: warning.log
- if test x'$(BOOT_CFLAGS)' != x''; then \
- BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
+.PHONY: configure-target-libmudflap maybe-configure-target-libmudflap
+maybe-configure-target-libmudflap:
+@if target-libmudflap
+maybe-configure-target-libmudflap: configure-target-libmudflap
+configure-target-libmudflap:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libmudflap..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmudflap/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libmudflap/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libmudflap/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libmudflap/Makefile; \
+ mv $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; \
fi; \
- $(srcdir)/contrib/test_summary -t -i warning.log >$@
- chmod +x $@
- echo If you really want to send e-mail, run ./$@ now
+ test ! -f $(TARGET_SUBDIR)/libmudflap/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libmudflap; \
+ cd "$(TARGET_SUBDIR)/libmudflap" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libmudflap/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libmudflap"; \
+ libsrcdir="$$s/libmudflap"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif target-libmudflap
-# Installation targets.
-.PHONY: install uninstall
-install: installdirs install-host install-target
-.PHONY: install-host-nogcc
-install-host-nogcc: \
- maybe-install-ash \
- maybe-install-autoconf \
- maybe-install-automake \
- maybe-install-bash \
- maybe-install-bfd \
- maybe-install-opcodes \
- maybe-install-binutils \
- maybe-install-bison \
- maybe-install-byacc \
- maybe-install-bzip2 \
- maybe-install-dejagnu \
- maybe-install-diff \
- maybe-install-dosutils \
- maybe-install-etc \
- maybe-install-fastjar \
- maybe-install-fileutils \
- maybe-install-findutils \
- maybe-install-find \
- maybe-install-flex \
- maybe-install-gas \
- maybe-install-gawk \
- maybe-install-gettext \
- maybe-install-gnuserv \
- maybe-install-gprof \
- maybe-install-gzip \
- maybe-install-hello \
- maybe-install-indent \
- maybe-install-intl \
- maybe-install-tcl \
- maybe-install-itcl \
- maybe-install-ld \
- maybe-install-libgui \
- maybe-install-libiberty \
- maybe-install-libtool \
- maybe-install-m4 \
- maybe-install-make \
- maybe-install-mmalloc \
- maybe-install-patch \
- maybe-install-perl \
- maybe-install-prms \
- maybe-install-rcs \
- maybe-install-readline \
- maybe-install-release \
- maybe-install-recode \
- maybe-install-sed \
- maybe-install-send-pr \
- maybe-install-shellutils \
- maybe-install-sid \
- maybe-install-sim \
- maybe-install-tar \
- maybe-install-texinfo \
- maybe-install-textutils \
- maybe-install-time \
- maybe-install-uudecode \
- maybe-install-wdiff \
- maybe-install-zip \
- maybe-install-zlib \
- maybe-install-gdb \
- maybe-install-expect \
- maybe-install-guile \
- maybe-install-tk \
- maybe-install-tix \
- maybe-install-libtermcap \
- maybe-install-utils
-.PHONY: install-host
-install-host: maybe-install-gcc \
- maybe-install-ash \
- maybe-install-autoconf \
- maybe-install-automake \
- maybe-install-bash \
- maybe-install-bfd \
- maybe-install-opcodes \
- maybe-install-binutils \
- maybe-install-bison \
- maybe-install-byacc \
- maybe-install-bzip2 \
- maybe-install-dejagnu \
- maybe-install-diff \
- maybe-install-dosutils \
- maybe-install-etc \
- maybe-install-fastjar \
- maybe-install-fileutils \
- maybe-install-findutils \
- maybe-install-find \
- maybe-install-flex \
- maybe-install-gas \
- maybe-install-gawk \
- maybe-install-gettext \
- maybe-install-gnuserv \
- maybe-install-gprof \
- maybe-install-gzip \
- maybe-install-hello \
- maybe-install-indent \
- maybe-install-intl \
- maybe-install-tcl \
- maybe-install-itcl \
- maybe-install-ld \
- maybe-install-libgui \
- maybe-install-libiberty \
- maybe-install-libtool \
- maybe-install-m4 \
- maybe-install-make \
- maybe-install-mmalloc \
- maybe-install-patch \
- maybe-install-perl \
- maybe-install-prms \
- maybe-install-rcs \
- maybe-install-readline \
- maybe-install-release \
- maybe-install-recode \
- maybe-install-sed \
- maybe-install-send-pr \
- maybe-install-shellutils \
- maybe-install-sid \
- maybe-install-sim \
- maybe-install-tar \
- maybe-install-texinfo \
- maybe-install-textutils \
- maybe-install-time \
- maybe-install-uudecode \
- maybe-install-wdiff \
- maybe-install-zip \
- maybe-install-zlib \
- maybe-install-gdb \
- maybe-install-expect \
- maybe-install-guile \
- maybe-install-tk \
- maybe-install-tix \
- maybe-install-libtermcap \
- maybe-install-utils
-.PHONY: install-target
-install-target: \
- maybe-install-target-libstdc++-v3 \
- maybe-install-target-newlib \
- maybe-install-target-libf2c \
- maybe-install-target-libobjc \
- maybe-install-target-libtermcap \
- maybe-install-target-winsup \
- maybe-install-target-libgloss \
- maybe-install-target-libiberty \
- maybe-install-target-gperf \
- maybe-install-target-examples \
- maybe-install-target-libffi \
- maybe-install-target-libjava \
- maybe-install-target-zlib \
- maybe-install-target-boehm-gc \
- maybe-install-target-qthreads \
- maybe-install-target-rda \
- maybe-install-target-libada
+.PHONY: all-target-libmudflap maybe-all-target-libmudflap
+maybe-all-target-libmudflap:
+@if target-libmudflap
+TARGET-target-libmudflap=all
+maybe-all-target-libmudflap: all-target-libmudflap
+all-target-libmudflap: configure-target-libmudflap
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libmudflap))
+@endif target-libmudflap
-uninstall:
- @echo "the uninstall target is not supported in this tree"
-.PHONY: install.all
-install.all: install-no-fixedincludes
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}` ; export r ; \
- $(SET_LIB_PATH) \
- (cd ./gcc && \
- $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
- else \
- true ; \
- fi
-# install-no-fixedincludes is used because Cygnus can not distribute
-# the fixed header files.
-.PHONY: install-no-fixedincludes
-install-no-fixedincludes: installdirs install-host-nogcc \
- install-target gcc-no-fixedincludes
-### other supporting targets
-MAKEDIRS= \
- $(DESTDIR)$(prefix) \
- $(DESTDIR)$(exec_prefix)
-.PHONY: installdirs
-installdirs: mkinstalldirs
- $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
+.PHONY: check-target-libmudflap maybe-check-target-libmudflap
+maybe-check-target-libmudflap:
+@if target-libmudflap
+maybe-check-target-libmudflap: check-target-libmudflap
-dir.info: do-install-info
- if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
- $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
- mv -f dir.info.new dir.info ; \
- else true ; \
- fi
+check-target-libmudflap:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-dist:
- @echo "Building a full distribution of this tree isn't done"
- @echo "via 'make dist'. Check out the etc/ subdirectory"
+@endif target-libmudflap
-etags tags: TAGS
+.PHONY: install-target-libmudflap maybe-install-target-libmudflap
+maybe-install-target-libmudflap:
+@if target-libmudflap
+maybe-install-target-libmudflap: install-target-libmudflap
-# Right now this just builds TAGS in each subdirectory. emacs19 has the
-# ability to use several tags files at once, so there is probably no need
-# to combine them into one big TAGS file (like CVS 1.3 does). We could
-# (if we felt like it) have this Makefile write a piece of elisp which
-# the user could load to tell emacs19 where all the TAGS files we just
-# built are.
-TAGS: do-TAGS
+install-target-libmudflap: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-# --------------------------------------
-# Modules which run on the build machine
-# --------------------------------------
+@endif target-libmudflap
-.PHONY: configure-build-libiberty maybe-configure-build-libiberty
-maybe-configure-build-libiberty:
-configure-build-libiberty:
- @test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libmudflap info-target-libmudflap
+maybe-info-target-libmudflap:
+@if target-libmudflap
+maybe-info-target-libmudflap: info-target-libmudflap
+
+info-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; \
- AR="$(AR_FOR_BUILD)"; export AR; \
- AS="$(AS_FOR_BUILD)"; export AS; \
- CC="$(CC_FOR_BUILD)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
- NM="$(NM_FOR_BUILD)"; export NM; \
- RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
- echo Configuring in $(BUILD_SUBDIR)/libiberty; \
- cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(BUILD_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- if [ "$(srcdir)" = "." ] ; then \
- if [ "$(BUILD_SUBDIR)" != "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \
- if [ -f Makefile ]; then \
- if $(MAKE) distclean; then \
- true; \
- else \
- exit 1; \
- fi; \
- else \
- true; \
- fi; \
- else \
- exit 1; \
- fi; \
- else \
- true; \
- fi; \
- srcdiroption="--srcdir=."; \
- libsrcdir="."; \
- else \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
- fi; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(BUILD_CONFIGARGS) $${srcdiroption} \
- --with-build-subdir="$(BUILD_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-build-libiberty maybe-all-build-libiberty
-maybe-all-build-libiberty:
-all-build-libiberty: configure-build-libiberty
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libmudflap
+
+.PHONY: maybe-dvi-target-libmudflap dvi-target-libmudflap
+maybe-dvi-target-libmudflap:
+@if target-libmudflap
+maybe-dvi-target-libmudflap: dvi-target-libmudflap
+
+dvi-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; \
- (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-libmudflap
-# --------------------------------------
-# Modules which run on the host machine
-# --------------------------------------
+.PHONY: maybe-html-target-libmudflap html-target-libmudflap
+maybe-html-target-libmudflap:
+@if target-libmudflap
+maybe-html-target-libmudflap: html-target-libmudflap
-.PHONY: configure-ash maybe-configure-ash
-maybe-configure-ash:
-configure-ash:
- @test ! -f ash/Makefile || exit 0; \
- [ -d ash ] || mkdir ash; \
+html-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in ash; \
- cd ash || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/ash"; \
- libsrcdir="$$s/ash";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/ash"; \
- libsrcdir="$$s/ash";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
|| exit 1
-.PHONY: all-ash maybe-all-ash
-maybe-all-ash:
-all-ash: configure-ash
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libmudflap
+
+.PHONY: maybe-TAGS-target-libmudflap TAGS-target-libmudflap
+maybe-TAGS-target-libmudflap:
+@if target-libmudflap
+maybe-TAGS-target-libmudflap: TAGS-target-libmudflap
+
+TAGS-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; \
- $(SET_LIB_PATH) \
- (cd ash && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
+ || exit 1
-.PHONY: check-ash maybe-check-ash
-maybe-check-ash:
+@endif target-libmudflap
-check-ash:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-install-info-target-libmudflap install-info-target-libmudflap
+maybe-install-info-target-libmudflap:
+@if target-libmudflap
+maybe-install-info-target-libmudflap: install-info-target-libmudflap
+
+install-info-target-libmudflap: \
+ configure-target-libmudflap \
+ info-target-libmudflap
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd ash && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
+@endif target-libmudflap
-.PHONY: install-ash maybe-install-ash
-maybe-install-ash:
+.PHONY: maybe-install-html-target-libmudflap install-html-target-libmudflap
+maybe-install-html-target-libmudflap:
+@if target-libmudflap
+maybe-install-html-target-libmudflap: install-html-target-libmudflap
-install-ash: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-libmudflap: \
+ configure-target-libmudflap \
+ html-target-libmudflap
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd ash && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-libmudflap
-.PHONY: configure-autoconf maybe-configure-autoconf
-maybe-configure-autoconf:
-configure-autoconf:
- @test ! -f autoconf/Makefile || exit 0; \
- [ -d autoconf ] || mkdir autoconf; \
+.PHONY: maybe-installcheck-target-libmudflap installcheck-target-libmudflap
+maybe-installcheck-target-libmudflap:
+@if target-libmudflap
+maybe-installcheck-target-libmudflap: installcheck-target-libmudflap
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in autoconf; \
- cd autoconf || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/autoconf"; \
- libsrcdir="$$s/autoconf";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/autoconf"; \
- libsrcdir="$$s/autoconf";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
|| exit 1
-.PHONY: all-autoconf maybe-all-autoconf
-maybe-all-autoconf:
-all-autoconf: configure-autoconf
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libmudflap
+
+.PHONY: maybe-mostlyclean-target-libmudflap mostlyclean-target-libmudflap
+maybe-mostlyclean-target-libmudflap:
+@if target-libmudflap
+maybe-mostlyclean-target-libmudflap: mostlyclean-target-libmudflap
+
+mostlyclean-target-libmudflap:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
-.PHONY: check-autoconf maybe-check-autoconf
-maybe-check-autoconf:
+@endif target-libmudflap
-check-autoconf:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-clean-target-libmudflap clean-target-libmudflap
+maybe-clean-target-libmudflap:
+@if target-libmudflap
+maybe-clean-target-libmudflap: clean-target-libmudflap
+
+clean-target-libmudflap:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-libmudflap
-.PHONY: install-autoconf maybe-install-autoconf
-maybe-install-autoconf:
+.PHONY: maybe-distclean-target-libmudflap distclean-target-libmudflap
+maybe-distclean-target-libmudflap:
+@if target-libmudflap
+maybe-distclean-target-libmudflap: distclean-target-libmudflap
-install-autoconf: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+distclean-target-libmudflap:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
+@endif target-libmudflap
-.PHONY: configure-automake maybe-configure-automake
-maybe-configure-automake:
-configure-automake:
- @test ! -f automake/Makefile || exit 0; \
- [ -d automake ] || mkdir automake; \
+.PHONY: maybe-maintainer-clean-target-libmudflap maintainer-clean-target-libmudflap
+maybe-maintainer-clean-target-libmudflap:
+@if target-libmudflap
+maybe-maintainer-clean-target-libmudflap: maintainer-clean-target-libmudflap
+
+maintainer-clean-target-libmudflap:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in automake; \
- cd automake || exit 1; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libmudflap
+
+
+
+
+
+.PHONY: configure-target-libssp maybe-configure-target-libssp
+maybe-configure-target-libssp:
+@if target-libssp
+maybe-configure-target-libssp: configure-target-libssp
+configure-target-libssp:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libssp..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libssp/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libssp/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libssp/multilib.tmp $(TARGET_SUBDIR)/libssp/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libssp/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libssp/Makefile; \
+ mv $(TARGET_SUBDIR)/libssp/multilib.tmp $(TARGET_SUBDIR)/libssp/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libssp/multilib.tmp $(TARGET_SUBDIR)/libssp/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libssp/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libssp; \
+ cd "$(TARGET_SUBDIR)/libssp" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/automake"; \
- libsrcdir="$$s/automake";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/automake"; \
- libsrcdir="$$s/automake";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libssp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/libssp"; \
+ libsrcdir="$$s/libssp"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libssp
-.PHONY: all-automake maybe-all-automake
-maybe-all-automake:
-all-automake: configure-automake
+
+
+
+
+.PHONY: all-target-libssp maybe-all-target-libssp
+maybe-all-target-libssp:
+@if target-libssp
+TARGET-target-libssp=all
+maybe-all-target-libssp: all-target-libssp
+all-target-libssp: configure-target-libssp
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd automake && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libssp))
+@endif target-libssp
-.PHONY: check-automake maybe-check-automake
-maybe-check-automake:
-check-automake:
+
+
+
+.PHONY: check-target-libssp maybe-check-target-libssp
+maybe-check-target-libssp:
+@if target-libssp
+maybe-check-target-libssp: check-target-libssp
+
+check-target-libssp:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd automake && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libssp
-.PHONY: install-automake maybe-install-automake
-maybe-install-automake:
+.PHONY: install-target-libssp maybe-install-target-libssp
+maybe-install-target-libssp:
+@if target-libssp
+maybe-install-target-libssp: install-target-libssp
-install-automake: installdirs
+install-target-libssp: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd automake && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libssp
-.PHONY: configure-bash maybe-configure-bash
-maybe-configure-bash:
-configure-bash:
- @test ! -f bash/Makefile || exit 0; \
- [ -d bash ] || mkdir bash; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libssp info-target-libssp
+maybe-info-target-libssp:
+@if target-libssp
+maybe-info-target-libssp: info-target-libssp
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in bash; \
- cd bash || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/bash"; \
- libsrcdir="$$s/bash";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/bash"; \
- libsrcdir="$$s/bash";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-bash maybe-all-bash
-maybe-all-bash:
-all-bash: configure-bash
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bash && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libssp
-.PHONY: check-bash maybe-check-bash
-maybe-check-bash:
+.PHONY: maybe-dvi-target-libssp dvi-target-libssp
+maybe-dvi-target-libssp:
+@if target-libssp
+maybe-dvi-target-libssp: dvi-target-libssp
-check-bash:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd bash && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-libssp
-.PHONY: install-bash maybe-install-bash
-maybe-install-bash:
+.PHONY: maybe-html-target-libssp html-target-libssp
+maybe-html-target-libssp:
+@if target-libssp
+maybe-html-target-libssp: html-target-libssp
-install-bash: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd bash && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libssp
-.PHONY: configure-bfd maybe-configure-bfd
-maybe-configure-bfd:
-configure-bfd:
- @test ! -f bfd/Makefile || exit 0; \
- [ -d bfd ] || mkdir bfd; \
+.PHONY: maybe-TAGS-target-libssp TAGS-target-libssp
+maybe-TAGS-target-libssp:
+@if target-libssp
+maybe-TAGS-target-libssp: TAGS-target-libssp
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in bfd; \
- cd bfd || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/bfd"; \
- libsrcdir="$$s/bfd";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/bfd"; \
- libsrcdir="$$s/bfd";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-bfd maybe-all-bfd
-maybe-all-bfd:
-all-bfd: configure-bfd
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libssp
-.PHONY: check-bfd maybe-check-bfd
-maybe-check-bfd:
+.PHONY: maybe-install-info-target-libssp install-info-target-libssp
+maybe-install-info-target-libssp:
+@if target-libssp
+maybe-install-info-target-libssp: install-info-target-libssp
-check-bfd:
- @r=`${PWD_COMMAND}`; export r; \
+install-info-target-libssp: \
+ configure-target-libssp \
+ info-target-libssp
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
+@endif target-libssp
-.PHONY: install-bfd maybe-install-bfd
-maybe-install-bfd:
+.PHONY: maybe-install-html-target-libssp install-html-target-libssp
+maybe-install-html-target-libssp:
+@if target-libssp
+maybe-install-html-target-libssp: install-html-target-libssp
-install-bfd: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-libssp: \
+ configure-target-libssp \
+ html-target-libssp
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-libssp
-.PHONY: configure-opcodes maybe-configure-opcodes
-maybe-configure-opcodes:
-configure-opcodes:
- @test ! -f opcodes/Makefile || exit 0; \
- [ -d opcodes ] || mkdir opcodes; \
+.PHONY: maybe-installcheck-target-libssp installcheck-target-libssp
+maybe-installcheck-target-libssp:
+@if target-libssp
+maybe-installcheck-target-libssp: installcheck-target-libssp
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in opcodes; \
- cd opcodes || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/opcodes"; \
- libsrcdir="$$s/opcodes";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/opcodes"; \
- libsrcdir="$$s/opcodes";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
|| exit 1
-.PHONY: all-opcodes maybe-all-opcodes
-maybe-all-opcodes:
-all-opcodes: configure-opcodes
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libssp
+
+.PHONY: maybe-mostlyclean-target-libssp mostlyclean-target-libssp
+maybe-mostlyclean-target-libssp:
+@if target-libssp
+maybe-mostlyclean-target-libssp: mostlyclean-target-libssp
+
+mostlyclean-target-libssp:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
-.PHONY: check-opcodes maybe-check-opcodes
-maybe-check-opcodes:
+@endif target-libssp
-check-opcodes:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-clean-target-libssp clean-target-libssp
+maybe-clean-target-libssp:
+@if target-libssp
+maybe-clean-target-libssp: clean-target-libssp
+
+clean-target-libssp:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-libssp
-.PHONY: install-opcodes maybe-install-opcodes
-maybe-install-opcodes:
+.PHONY: maybe-distclean-target-libssp distclean-target-libssp
+maybe-distclean-target-libssp:
+@if target-libssp
+maybe-distclean-target-libssp: distclean-target-libssp
-install-opcodes: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+distclean-target-libssp:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
+@endif target-libssp
-.PHONY: configure-binutils maybe-configure-binutils
-maybe-configure-binutils:
-configure-binutils:
- @test ! -f binutils/Makefile || exit 0; \
- [ -d binutils ] || mkdir binutils; \
+.PHONY: maybe-maintainer-clean-target-libssp maintainer-clean-target-libssp
+maybe-maintainer-clean-target-libssp:
+@if target-libssp
+maybe-maintainer-clean-target-libssp: maintainer-clean-target-libssp
+
+maintainer-clean-target-libssp:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in binutils; \
- cd binutils || exit 1; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif 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:
+ @: $(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; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgcc-math/Makefile; \
+ mv $(TARGET_SUBDIR)/libgcc-math/multilib.tmp $(TARGET_SUBDIR)/libgcc-math/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgcc-math/multilib.tmp $(TARGET_SUBDIR)/libgcc-math/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc-math/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc-math ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libgcc-math; \
+ cd "$(TARGET_SUBDIR)/libgcc-math" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/binutils"; \
- libsrcdir="$$s/binutils";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/binutils"; \
- libsrcdir="$$s/binutils";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgcc-math/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/libgcc-math"; \
+ libsrcdir="$$s/libgcc-math"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libgcc-math
-.PHONY: all-binutils maybe-all-binutils
-maybe-all-binutils:
-all-binutils: configure-binutils
+
+
+
+
+.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
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgcc-math))
+@endif target-libgcc-math
-.PHONY: check-binutils maybe-check-binutils
-maybe-check-binutils:
-check-binutils:
+
+
+
+.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
+
+check-target-libgcc-math:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libgcc-math
-.PHONY: install-binutils maybe-install-binutils
-maybe-install-binutils:
+.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
-install-binutils: installdirs
+install-target-libgcc-math: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libgcc-math
-.PHONY: configure-bison maybe-configure-bison
-maybe-configure-bison:
-configure-bison:
- @test ! -f bison/Makefile || exit 0; \
- [ -d bison ] || mkdir bison; \
+# Other targets (info, dvi, 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
+
+info-target-libgcc-math: \
+ configure-target-libgcc-math
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in bison; \
- cd bison || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/bison"; \
- libsrcdir="$$s/bison";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/bison"; \
- libsrcdir="$$s/bison";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libgcc-math" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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
-.PHONY: all-bison maybe-all-bison
-maybe-all-bison:
-all-bison: configure-bison
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bison && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgcc-math
-.PHONY: check-bison maybe-check-bison
-maybe-check-bison:
+.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
-# This module is only tested in a native toolchain.
-check-bison:
- @if [ '$(host)' = '$(target)' ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \
- fi
+dvi-target-libgcc-math: \
+ configure-target-libgcc-math
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/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" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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 target-libgcc-math
-.PHONY: install-bison maybe-install-bison
-maybe-install-bison:
+.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
-install-bison: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-target-libgcc-math: \
+ configure-target-libgcc-math
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bison && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libgcc-math" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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 target-libgcc-math
-.PHONY: configure-byacc maybe-configure-byacc
-maybe-configure-byacc:
-configure-byacc:
- @test ! -f byacc/Makefile || exit 0; \
- [ -d byacc ] || mkdir byacc; \
+.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
+
+TAGS-target-libgcc-math: \
+ configure-target-libgcc-math
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in byacc; \
- cd byacc || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/byacc"; \
- libsrcdir="$$s/byacc";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/byacc"; \
- libsrcdir="$$s/byacc";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgcc-math" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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
-.PHONY: all-byacc maybe-all-byacc
-maybe-all-byacc:
-all-byacc: configure-byacc
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgcc-math
-.PHONY: check-byacc maybe-check-byacc
-maybe-check-byacc:
+.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
-# This module is only tested in a native toolchain.
-check-byacc:
- @if [ '$(host)' = '$(target)' ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \
- fi
+install-info-target-libgcc-math: \
+ configure-target-libgcc-math \
+ info-target-libgcc-math
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/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" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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 target-libgcc-math
-.PHONY: install-byacc maybe-install-byacc
-maybe-install-byacc:
+.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
-install-byacc: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-libgcc-math: \
+ configure-target-libgcc-math \
+ html-target-libgcc-math
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libgcc-math" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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 target-libgcc-math
-.PHONY: configure-bzip2 maybe-configure-bzip2
-maybe-configure-bzip2:
-configure-bzip2:
- @test ! -f bzip2/Makefile || exit 0; \
- [ -d bzip2 ] || mkdir bzip2; \
+.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
+
+installcheck-target-libgcc-math: \
+ configure-target-libgcc-math
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in bzip2; \
- cd bzip2 || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/bzip2"; \
- libsrcdir="$$s/bzip2";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/bzip2"; \
- libsrcdir="$$s/bzip2";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgcc-math" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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
-.PHONY: all-bzip2 maybe-all-bzip2
-maybe-all-bzip2:
-all-bzip2: configure-bzip2
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgcc-math
-.PHONY: check-bzip2 maybe-check-bzip2
-maybe-check-bzip2:
+.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
-check-bzip2:
- @r=`${PWD_COMMAND}`; export r; \
+mostlyclean-target-libgcc-math:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgcc-math" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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 target-libgcc-math
-.PHONY: install-bzip2 maybe-install-bzip2
-maybe-install-bzip2:
+.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
-install-bzip2: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-libgcc-math:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgcc-math" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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 target-libgcc-math
-.PHONY: configure-dejagnu maybe-configure-dejagnu
-maybe-configure-dejagnu:
-configure-dejagnu:
- @test ! -f dejagnu/Makefile || exit 0; \
- [ -d dejagnu ] || mkdir dejagnu; \
+.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
+
+distclean-target-libgcc-math:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in dejagnu; \
- cd dejagnu || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/dejagnu"; \
- libsrcdir="$$s/dejagnu";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/dejagnu"; \
- libsrcdir="$$s/dejagnu";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgcc-math" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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
-.PHONY: all-dejagnu maybe-all-dejagnu
-maybe-all-dejagnu:
-all-dejagnu: configure-dejagnu
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgcc-math
-.PHONY: check-dejagnu maybe-check-dejagnu
-maybe-check-dejagnu:
+.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
-check-dejagnu:
- @r=`${PWD_COMMAND}`; export r; \
+maintainer-clean-target-libgcc-math:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgcc-math" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc-math && \
+ $(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 target-libgcc-math
-.PHONY: install-dejagnu maybe-install-dejagnu
-maybe-install-dejagnu:
-install-dejagnu: installdirs
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install)
-.PHONY: configure-diff maybe-configure-diff
-maybe-configure-diff:
-configure-diff:
- @test ! -f diff/Makefile || exit 0; \
- [ -d diff ] || mkdir diff; \
- r=`${PWD_COMMAND}`; export r; \
+
+.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)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in diff; \
- cd diff || exit 1; \
+ 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)/newlib/Makefile; \
+ mv $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/newlib; \
+ cd "$(TARGET_SUBDIR)/newlib" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/diff"; \
- libsrcdir="$$s/diff";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/diff"; \
- libsrcdir="$$s/diff";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/newlib/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/newlib"; \
+ libsrcdir="$$s/newlib"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-newlib
-.PHONY: all-diff maybe-all-diff
-maybe-all-diff:
-all-diff: configure-diff
+
+
+
+
+.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)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd diff && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-newlib))
+@endif target-newlib
-.PHONY: check-diff maybe-check-diff
-maybe-check-diff:
-check-diff:
+
+
+
+.PHONY: check-target-newlib maybe-check-target-newlib
+maybe-check-target-newlib:
+@if target-newlib
+maybe-check-target-newlib: check-target-newlib
+
+check-target-newlib:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd diff && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-newlib
-.PHONY: install-diff maybe-install-diff
-maybe-install-diff:
+.PHONY: install-target-newlib maybe-install-target-newlib
+maybe-install-target-newlib:
+@if target-newlib
+maybe-install-target-newlib: install-target-newlib
-install-diff: installdirs
+install-target-newlib: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd diff && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-newlib
-.PHONY: configure-dosutils maybe-configure-dosutils
-maybe-configure-dosutils:
-configure-dosutils:
- @test ! -f dosutils/Makefile || exit 0; \
- [ -d dosutils ] || mkdir dosutils; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-newlib info-target-newlib
+maybe-info-target-newlib:
+@if target-newlib
+maybe-info-target-newlib: info-target-newlib
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in dosutils; \
- cd dosutils || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/dosutils"; \
- libsrcdir="$$s/dosutils";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/dosutils"; \
- libsrcdir="$$s/dosutils";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ 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)/newlib && \
+ $(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
-.PHONY: all-dosutils maybe-all-dosutils
-maybe-all-dosutils:
-all-dosutils: configure-dosutils
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-newlib
-.PHONY: check-dosutils maybe-check-dosutils
-maybe-check-dosutils:
+.PHONY: maybe-dvi-target-newlib dvi-target-newlib
+maybe-dvi-target-newlib:
+@if target-newlib
+maybe-dvi-target-newlib: dvi-target-newlib
-check-dosutils:
+dvi-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 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)/newlib && \
+ $(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 target-newlib
-.PHONY: install-dosutils maybe-install-dosutils
-maybe-install-dosutils:
+.PHONY: maybe-html-target-newlib html-target-newlib
+maybe-html-target-newlib:
+@if target-newlib
+maybe-html-target-newlib: html-target-newlib
-install-dosutils: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ 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)/newlib && \
+ $(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 target-newlib
-.PHONY: configure-etc maybe-configure-etc
-maybe-configure-etc:
-configure-etc:
- @test ! -f etc/Makefile || exit 0; \
- [ -d etc ] || mkdir etc; \
+.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib
+maybe-TAGS-target-newlib:
+@if target-newlib
+maybe-TAGS-target-newlib: TAGS-target-newlib
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in etc; \
- cd etc || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/etc"; \
- libsrcdir="$$s/etc";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/etc"; \
- libsrcdir="$$s/etc";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ 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)/newlib && \
+ $(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
-.PHONY: all-etc maybe-all-etc
-maybe-all-etc:
-all-etc: configure-etc
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd etc && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-newlib
-.PHONY: check-etc maybe-check-etc
-maybe-check-etc:
+.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
-check-etc:
- @r=`${PWD_COMMAND}`; export r; \
+install-info-target-newlib: \
+ configure-target-newlib \
+ info-target-newlib
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd etc && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ 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)/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-info) \
+ || exit 1
+@endif target-newlib
-.PHONY: install-etc maybe-install-etc
-maybe-install-etc:
+.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-etc: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+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; \
- $(SET_LIB_PATH) \
- (cd etc && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(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}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-html) \
+ || exit 1
+@endif target-newlib
-.PHONY: configure-fastjar maybe-configure-fastjar
-maybe-configure-fastjar:
-configure-fastjar:
- @test ! -f fastjar/Makefile || exit 0; \
- [ -d fastjar ] || mkdir fastjar; \
+.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib
+maybe-installcheck-target-newlib:
+@if target-newlib
+maybe-installcheck-target-newlib: installcheck-target-newlib
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in fastjar; \
- cd fastjar || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/fastjar"; \
- libsrcdir="$$s/fastjar";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/fastjar"; \
- libsrcdir="$$s/fastjar";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ 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)/newlib && \
+ $(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
-.PHONY: all-fastjar maybe-all-fastjar
-maybe-all-fastjar:
-all-fastjar: configure-fastjar
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-newlib
-.PHONY: check-fastjar maybe-check-fastjar
-maybe-check-fastjar:
+.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib
+maybe-mostlyclean-target-newlib:
+@if target-newlib
+maybe-mostlyclean-target-newlib: mostlyclean-target-newlib
-# This module is only tested in a native toolchain.
-check-fastjar:
- @if [ '$(host)' = '$(target)' ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \
- fi
+mostlyclean-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 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)/newlib && \
+ $(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 target-newlib
-.PHONY: install-fastjar maybe-install-fastjar
-maybe-install-fastjar:
+.PHONY: maybe-clean-target-newlib clean-target-newlib
+maybe-clean-target-newlib:
+@if target-newlib
+maybe-clean-target-newlib: clean-target-newlib
-install-fastjar: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-newlib:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ 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)/newlib && \
+ $(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 target-newlib
-.PHONY: configure-fileutils maybe-configure-fileutils
-maybe-configure-fileutils:
-configure-fileutils:
- @test ! -f fileutils/Makefile || exit 0; \
- [ -d fileutils ] || mkdir fileutils; \
+.PHONY: maybe-distclean-target-newlib distclean-target-newlib
+maybe-distclean-target-newlib:
+@if target-newlib
+maybe-distclean-target-newlib: distclean-target-newlib
+
+distclean-target-newlib:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in fileutils; \
- cd fileutils || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/fileutils"; \
- libsrcdir="$$s/fileutils";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/fileutils"; \
- libsrcdir="$$s/fileutils";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ 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)/newlib && \
+ $(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
-.PHONY: all-fileutils maybe-all-fileutils
-maybe-all-fileutils:
-all-fileutils: configure-fileutils
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-newlib
-.PHONY: check-fileutils maybe-check-fileutils
-maybe-check-fileutils:
+.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
-check-fileutils:
- @r=`${PWD_COMMAND}`; export r; \
+maintainer-clean-target-newlib:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ 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)/newlib && \
+ $(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 target-newlib
-.PHONY: install-fileutils maybe-install-fileutils
-maybe-install-fileutils:
-install-fileutils: installdirs
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install)
-.PHONY: configure-findutils maybe-configure-findutils
-maybe-configure-findutils:
-configure-findutils:
- @test ! -f findutils/Makefile || exit 0; \
- [ -d findutils ] || mkdir findutils; \
- r=`${PWD_COMMAND}`; export r; \
+
+.PHONY: configure-target-libgfortran maybe-configure-target-libgfortran
+maybe-configure-target-libgfortran:
+@if target-libgfortran
+maybe-configure-target-libgfortran: configure-target-libgfortran
+configure-target-libgfortran:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in findutils; \
- cd findutils || exit 1; \
+ echo "Checking multilib configuration for libgfortran..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgfortran/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgfortran/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgfortran/multilib.tmp $(TARGET_SUBDIR)/libgfortran/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgfortran/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgfortran/Makefile; \
+ mv $(TARGET_SUBDIR)/libgfortran/multilib.tmp $(TARGET_SUBDIR)/libgfortran/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgfortran/multilib.tmp $(TARGET_SUBDIR)/libgfortran/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgfortran/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libgfortran; \
+ cd "$(TARGET_SUBDIR)/libgfortran" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/findutils"; \
- libsrcdir="$$s/findutils";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/findutils"; \
- libsrcdir="$$s/findutils";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgfortran/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/libgfortran"; \
+ libsrcdir="$$s/libgfortran"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libgfortran
-.PHONY: all-findutils maybe-all-findutils
-maybe-all-findutils:
-all-findutils: configure-findutils
+
+
+
+
+.PHONY: all-target-libgfortran maybe-all-target-libgfortran
+maybe-all-target-libgfortran:
+@if target-libgfortran
+TARGET-target-libgfortran=all
+maybe-all-target-libgfortran: all-target-libgfortran
+all-target-libgfortran: configure-target-libgfortran
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgfortran))
+@endif target-libgfortran
-.PHONY: check-findutils maybe-check-findutils
-maybe-check-findutils:
-check-findutils:
+
+
+
+.PHONY: check-target-libgfortran maybe-check-target-libgfortran
+maybe-check-target-libgfortran:
+@if target-libgfortran
+maybe-check-target-libgfortran: check-target-libgfortran
+
+check-target-libgfortran:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libgfortran
-.PHONY: install-findutils maybe-install-findutils
-maybe-install-findutils:
+.PHONY: install-target-libgfortran maybe-install-target-libgfortran
+maybe-install-target-libgfortran:
+@if target-libgfortran
+maybe-install-target-libgfortran: install-target-libgfortran
-install-findutils: installdirs
+install-target-libgfortran: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libgfortran
-.PHONY: configure-find maybe-configure-find
-maybe-configure-find:
-configure-find:
- @test ! -f find/Makefile || exit 0; \
- [ -d find ] || mkdir find; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libgfortran info-target-libgfortran
+maybe-info-target-libgfortran:
+@if target-libgfortran
+maybe-info-target-libgfortran: info-target-libgfortran
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in find; \
- cd find || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/find"; \
- libsrcdir="$$s/find";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/find"; \
- libsrcdir="$$s/find";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-find maybe-all-find
-maybe-all-find:
-all-find: configure-find
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd find && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgfortran
-.PHONY: check-find maybe-check-find
-maybe-check-find:
+.PHONY: maybe-dvi-target-libgfortran dvi-target-libgfortran
+maybe-dvi-target-libgfortran:
+@if target-libgfortran
+maybe-dvi-target-libgfortran: dvi-target-libgfortran
-check-find:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd find && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-libgfortran
-.PHONY: install-find maybe-install-find
-maybe-install-find:
+.PHONY: maybe-html-target-libgfortran html-target-libgfortran
+maybe-html-target-libgfortran:
+@if target-libgfortran
+maybe-html-target-libgfortran: html-target-libgfortran
-install-find: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd find && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libgfortran
-.PHONY: configure-flex maybe-configure-flex
-maybe-configure-flex:
-configure-flex:
- @test ! -f flex/Makefile || exit 0; \
- [ -d flex ] || mkdir flex; \
+.PHONY: maybe-TAGS-target-libgfortran TAGS-target-libgfortran
+maybe-TAGS-target-libgfortran:
+@if target-libgfortran
+maybe-TAGS-target-libgfortran: TAGS-target-libgfortran
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in flex; \
- cd flex || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/flex"; \
- libsrcdir="$$s/flex";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/flex"; \
- libsrcdir="$$s/flex";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-flex maybe-all-flex
-maybe-all-flex:
-all-flex: configure-flex
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd flex && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgfortran
-.PHONY: check-flex maybe-check-flex
-maybe-check-flex:
+.PHONY: maybe-install-info-target-libgfortran install-info-target-libgfortran
+maybe-install-info-target-libgfortran:
+@if target-libgfortran
+maybe-install-info-target-libgfortran: install-info-target-libgfortran
-# This module is only tested in a native toolchain.
-check-flex:
- @if [ '$(host)' = '$(target)' ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \
- fi
+install-info-target-libgfortran: \
+ configure-target-libgfortran \
+ info-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-info 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-info) \
+ || exit 1
+@endif target-libgfortran
-.PHONY: install-flex maybe-install-flex
-maybe-install-flex:
+.PHONY: maybe-install-html-target-libgfortran install-html-target-libgfortran
+maybe-install-html-target-libgfortran:
+@if target-libgfortran
+maybe-install-html-target-libgfortran: install-html-target-libgfortran
-install-flex: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-libgfortran: \
+ configure-target-libgfortran \
+ html-target-libgfortran
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd flex && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-libgfortran
-.PHONY: configure-gas maybe-configure-gas
-maybe-configure-gas:
-configure-gas:
- @test ! -f gas/Makefile || exit 0; \
- [ -d gas ] || mkdir gas; \
+.PHONY: maybe-installcheck-target-libgfortran installcheck-target-libgfortran
+maybe-installcheck-target-libgfortran:
+@if target-libgfortran
+maybe-installcheck-target-libgfortran: installcheck-target-libgfortran
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in gas; \
- cd gas || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gas"; \
- libsrcdir="$$s/gas";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gas"; \
- libsrcdir="$$s/gas";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
|| exit 1
-.PHONY: all-gas maybe-all-gas
-maybe-all-gas:
-all-gas: configure-gas
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gas && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgfortran
-.PHONY: check-gas maybe-check-gas
-maybe-check-gas:
+.PHONY: maybe-mostlyclean-target-libgfortran mostlyclean-target-libgfortran
+maybe-mostlyclean-target-libgfortran:
+@if target-libgfortran
+maybe-mostlyclean-target-libgfortran: mostlyclean-target-libgfortran
-check-gas:
- @r=`${PWD_COMMAND}`; export r; \
+mostlyclean-target-libgfortran:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gas && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+@endif target-libgfortran
-.PHONY: install-gas maybe-install-gas
-maybe-install-gas:
+.PHONY: maybe-clean-target-libgfortran clean-target-libgfortran
+maybe-clean-target-libgfortran:
+@if target-libgfortran
+maybe-clean-target-libgfortran: clean-target-libgfortran
-install-gas: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-libgfortran:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gas && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-libgfortran
-.PHONY: configure-gawk maybe-configure-gawk
-maybe-configure-gawk:
-configure-gawk:
- @test ! -f gawk/Makefile || exit 0; \
- [ -d gawk ] || mkdir gawk; \
+.PHONY: maybe-distclean-target-libgfortran distclean-target-libgfortran
+maybe-distclean-target-libgfortran:
+@if target-libgfortran
+maybe-distclean-target-libgfortran: distclean-target-libgfortran
+
+distclean-target-libgfortran:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in gawk; \
- cd gawk || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gawk"; \
- libsrcdir="$$s/gawk";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gawk"; \
- libsrcdir="$$s/gawk";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
|| exit 1
-.PHONY: all-gawk maybe-all-gawk
-maybe-all-gawk:
-all-gawk: configure-gawk
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgfortran
-.PHONY: check-gawk maybe-check-gawk
-maybe-check-gawk:
+.PHONY: maybe-maintainer-clean-target-libgfortran maintainer-clean-target-libgfortran
+maybe-maintainer-clean-target-libgfortran:
+@if target-libgfortran
+maybe-maintainer-clean-target-libgfortran: maintainer-clean-target-libgfortran
-check-gawk:
- @r=`${PWD_COMMAND}`; export r; \
+maintainer-clean-target-libgfortran:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+@endif target-libgfortran
-.PHONY: install-gawk maybe-install-gawk
-maybe-install-gawk:
-install-gawk: installdirs
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install)
-.PHONY: configure-gettext maybe-configure-gettext
-maybe-configure-gettext:
-configure-gettext:
- @test ! -f gettext/Makefile || exit 0; \
- [ -d gettext ] || mkdir gettext; \
- r=`${PWD_COMMAND}`; export r; \
+
+.PHONY: configure-target-libobjc maybe-configure-target-libobjc
+maybe-configure-target-libobjc:
+@if target-libobjc
+maybe-configure-target-libobjc: configure-target-libobjc
+configure-target-libobjc:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in gettext; \
- cd gettext || exit 1; \
+ echo "Checking multilib configuration for libobjc..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libobjc/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libobjc/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libobjc/multilib.tmp $(TARGET_SUBDIR)/libobjc/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libobjc/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libobjc/Makefile; \
+ mv $(TARGET_SUBDIR)/libobjc/multilib.tmp $(TARGET_SUBDIR)/libobjc/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libobjc/multilib.tmp $(TARGET_SUBDIR)/libobjc/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libobjc; \
+ cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gettext"; \
- libsrcdir="$$s/gettext";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gettext"; \
- libsrcdir="$$s/gettext";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libobjc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/libobjc"; \
+ libsrcdir="$$s/libobjc"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libobjc
-.PHONY: all-gettext maybe-all-gettext
-maybe-all-gettext:
-all-gettext: configure-gettext
+
+
+
+
+.PHONY: all-target-libobjc maybe-all-target-libobjc
+maybe-all-target-libobjc:
+@if target-libobjc
+TARGET-target-libobjc=all
+maybe-all-target-libobjc: all-target-libobjc
+all-target-libobjc: configure-target-libobjc
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libobjc))
+@endif target-libobjc
-.PHONY: check-gettext maybe-check-gettext
-maybe-check-gettext:
-check-gettext:
+
+
+
+.PHONY: check-target-libobjc maybe-check-target-libobjc
+maybe-check-target-libobjc:
+@if target-libobjc
+maybe-check-target-libobjc: check-target-libobjc
+
+check-target-libobjc:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libobjc
-.PHONY: install-gettext maybe-install-gettext
-maybe-install-gettext:
+.PHONY: install-target-libobjc maybe-install-target-libobjc
+maybe-install-target-libobjc:
+@if target-libobjc
+maybe-install-target-libobjc: install-target-libobjc
-install-gettext: installdirs
+install-target-libobjc: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libobjc
-.PHONY: configure-gnuserv maybe-configure-gnuserv
-maybe-configure-gnuserv:
-configure-gnuserv:
- @test ! -f gnuserv/Makefile || exit 0; \
- [ -d gnuserv ] || mkdir gnuserv; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libobjc info-target-libobjc
+maybe-info-target-libobjc:
+@if target-libobjc
+maybe-info-target-libobjc: info-target-libobjc
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in gnuserv; \
- cd gnuserv || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gnuserv"; \
- libsrcdir="$$s/gnuserv";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gnuserv"; \
- libsrcdir="$$s/gnuserv";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-gnuserv maybe-all-gnuserv
-maybe-all-gnuserv:
-all-gnuserv: configure-gnuserv
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libobjc
-.PHONY: check-gnuserv maybe-check-gnuserv
-maybe-check-gnuserv:
+.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc
+maybe-dvi-target-libobjc:
+@if target-libobjc
+maybe-dvi-target-libobjc: dvi-target-libobjc
-check-gnuserv:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-libobjc
-.PHONY: install-gnuserv maybe-install-gnuserv
-maybe-install-gnuserv:
+.PHONY: maybe-html-target-libobjc html-target-libobjc
+maybe-html-target-libobjc:
+@if target-libobjc
+maybe-html-target-libobjc: html-target-libobjc
-install-gnuserv: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libobjc
-.PHONY: configure-gprof maybe-configure-gprof
-maybe-configure-gprof:
-configure-gprof:
- @test ! -f gprof/Makefile || exit 0; \
- [ -d gprof ] || mkdir gprof; \
+.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc
+maybe-TAGS-target-libobjc:
+@if target-libobjc
+maybe-TAGS-target-libobjc: TAGS-target-libobjc
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in gprof; \
- cd gprof || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gprof"; \
- libsrcdir="$$s/gprof";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gprof"; \
- libsrcdir="$$s/gprof";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-gprof maybe-all-gprof
-maybe-all-gprof:
-all-gprof: configure-gprof
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libobjc
-.PHONY: check-gprof maybe-check-gprof
-maybe-check-gprof:
+.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc
+maybe-install-info-target-libobjc:
+@if target-libobjc
+maybe-install-info-target-libobjc: install-info-target-libobjc
-check-gprof:
- @r=`${PWD_COMMAND}`; export r; \
+install-info-target-libobjc: \
+ configure-target-libobjc \
+ info-target-libobjc
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
+@endif target-libobjc
-.PHONY: install-gprof maybe-install-gprof
-maybe-install-gprof:
+.PHONY: maybe-install-html-target-libobjc install-html-target-libobjc
+maybe-install-html-target-libobjc:
+@if target-libobjc
+maybe-install-html-target-libobjc: install-html-target-libobjc
-install-gprof: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-libobjc: \
+ configure-target-libobjc \
+ html-target-libobjc
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-libobjc
-.PHONY: configure-gzip maybe-configure-gzip
-maybe-configure-gzip:
-configure-gzip:
- @test ! -f gzip/Makefile || exit 0; \
- [ -d gzip ] || mkdir gzip; \
+.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc
+maybe-installcheck-target-libobjc:
+@if target-libobjc
+maybe-installcheck-target-libobjc: installcheck-target-libobjc
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in gzip; \
- cd gzip || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gzip"; \
- libsrcdir="$$s/gzip";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gzip"; \
- libsrcdir="$$s/gzip";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
|| exit 1
-.PHONY: all-gzip maybe-all-gzip
-maybe-all-gzip:
-all-gzip: configure-gzip
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libobjc
-.PHONY: check-gzip maybe-check-gzip
-maybe-check-gzip:
+.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc
+maybe-mostlyclean-target-libobjc:
+@if target-libobjc
+maybe-mostlyclean-target-libobjc: mostlyclean-target-libobjc
-check-gzip:
- @r=`${PWD_COMMAND}`; export r; \
+mostlyclean-target-libobjc:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+@endif target-libobjc
-.PHONY: install-gzip maybe-install-gzip
-maybe-install-gzip:
+.PHONY: maybe-clean-target-libobjc clean-target-libobjc
+maybe-clean-target-libobjc:
+@if target-libobjc
+maybe-clean-target-libobjc: clean-target-libobjc
-install-gzip: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-libobjc:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-libobjc
-.PHONY: configure-hello maybe-configure-hello
-maybe-configure-hello:
-configure-hello:
- @test ! -f hello/Makefile || exit 0; \
- [ -d hello ] || mkdir hello; \
+.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc
+maybe-distclean-target-libobjc:
+@if target-libobjc
+maybe-distclean-target-libobjc: distclean-target-libobjc
+
+distclean-target-libobjc:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in hello; \
- cd hello || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/hello"; \
- libsrcdir="$$s/hello";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/hello"; \
- libsrcdir="$$s/hello";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
|| exit 1
-.PHONY: all-hello maybe-all-hello
-maybe-all-hello:
-all-hello: configure-hello
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd hello && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libobjc
-.PHONY: check-hello maybe-check-hello
-maybe-check-hello:
+.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc
+maybe-maintainer-clean-target-libobjc:
+@if target-libobjc
+maybe-maintainer-clean-target-libobjc: maintainer-clean-target-libobjc
-check-hello:
- @r=`${PWD_COMMAND}`; export r; \
+maintainer-clean-target-libobjc:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd hello && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+@endif target-libobjc
-.PHONY: install-hello maybe-install-hello
-maybe-install-hello:
-install-hello: installdirs
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd hello && $(MAKE) $(FLAGS_TO_PASS) install)
-.PHONY: configure-indent maybe-configure-indent
-maybe-configure-indent:
-configure-indent:
- @test ! -f indent/Makefile || exit 0; \
- [ -d indent ] || mkdir indent; \
- r=`${PWD_COMMAND}`; export r; \
+
+.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap
+maybe-configure-target-libtermcap:
+@if target-libtermcap
+maybe-configure-target-libtermcap: configure-target-libtermcap
+configure-target-libtermcap:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in indent; \
- cd indent || exit 1; \
+ echo "Checking multilib configuration for libtermcap..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libtermcap/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libtermcap/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libtermcap/multilib.tmp $(TARGET_SUBDIR)/libtermcap/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libtermcap/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libtermcap/Makefile; \
+ mv $(TARGET_SUBDIR)/libtermcap/multilib.tmp $(TARGET_SUBDIR)/libtermcap/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libtermcap/multilib.tmp $(TARGET_SUBDIR)/libtermcap/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libtermcap; \
+ cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/indent"; \
- libsrcdir="$$s/indent";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/indent"; \
- libsrcdir="$$s/indent";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libtermcap/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/libtermcap"; \
+ libsrcdir="$$s/libtermcap"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libtermcap
-.PHONY: all-indent maybe-all-indent
-maybe-all-indent:
-all-indent: configure-indent
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd indent && $(MAKE) $(FLAGS_TO_PASS) all)
-.PHONY: check-indent maybe-check-indent
-maybe-check-indent:
-check-indent:
+
+
+.PHONY: all-target-libtermcap maybe-all-target-libtermcap
+maybe-all-target-libtermcap:
+@if target-libtermcap
+TARGET-target-libtermcap=all
+maybe-all-target-libtermcap: all-target-libtermcap
+all-target-libtermcap: configure-target-libtermcap
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd indent && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libtermcap))
+@endif target-libtermcap
-.PHONY: install-indent maybe-install-indent
-maybe-install-indent:
-install-indent: installdirs
+
+
+.PHONY: check-target-libtermcap maybe-check-target-libtermcap
+maybe-check-target-libtermcap:
+@if target-libtermcap
+maybe-check-target-libtermcap: check-target-libtermcap
+
+# Dummy target for uncheckable module.
+check-target-libtermcap:
+
+@endif target-libtermcap
+
+.PHONY: install-target-libtermcap maybe-install-target-libtermcap
+maybe-install-target-libtermcap:
+@if target-libtermcap
+maybe-install-target-libtermcap: install-target-libtermcap
+
+install-target-libtermcap: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd indent && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libtermcap
-.PHONY: configure-intl maybe-configure-intl
-maybe-configure-intl:
-configure-intl:
- @test ! -f intl/Makefile || exit 0; \
- [ -d intl ] || mkdir intl; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libtermcap info-target-libtermcap
+maybe-info-target-libtermcap:
+@if target-libtermcap
+maybe-info-target-libtermcap: info-target-libtermcap
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in intl; \
- cd intl || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/intl"; \
- libsrcdir="$$s/intl";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/intl"; \
- libsrcdir="$$s/intl";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-intl maybe-all-intl
-maybe-all-intl:
-all-intl: configure-intl
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd intl && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libtermcap
-.PHONY: check-intl maybe-check-intl
-maybe-check-intl:
+.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap
+maybe-dvi-target-libtermcap:
+@if target-libtermcap
+maybe-dvi-target-libtermcap: dvi-target-libtermcap
-check-intl:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd intl && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-libtermcap
-.PHONY: install-intl maybe-install-intl
-maybe-install-intl:
+.PHONY: maybe-html-target-libtermcap html-target-libtermcap
+maybe-html-target-libtermcap:
+@if target-libtermcap
+maybe-html-target-libtermcap: html-target-libtermcap
-install-intl: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd intl && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libtermcap
-.PHONY: configure-tcl maybe-configure-tcl
-maybe-configure-tcl:
-configure-tcl:
- @test ! -f tcl/Makefile || exit 0; \
- [ -d tcl ] || mkdir tcl; \
+.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap
+maybe-TAGS-target-libtermcap:
+@if target-libtermcap
+maybe-TAGS-target-libtermcap: TAGS-target-libtermcap
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in tcl; \
- cd tcl || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/tcl"; \
- libsrcdir="$$s/tcl";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/tcl"; \
- libsrcdir="$$s/tcl";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-tcl maybe-all-tcl
-maybe-all-tcl:
-all-tcl: configure-tcl
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libtermcap
-.PHONY: check-tcl maybe-check-tcl
-maybe-check-tcl:
+.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap
+maybe-install-info-target-libtermcap:
+@if target-libtermcap
+maybe-install-info-target-libtermcap: install-info-target-libtermcap
-check-tcl:
- @r=`${PWD_COMMAND}`; export r; \
+install-info-target-libtermcap: \
+ configure-target-libtermcap \
+ info-target-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
+@endif target-libtermcap
-.PHONY: install-tcl maybe-install-tcl
-maybe-install-tcl:
+.PHONY: maybe-install-html-target-libtermcap install-html-target-libtermcap
+maybe-install-html-target-libtermcap:
+@if target-libtermcap
+maybe-install-html-target-libtermcap: install-html-target-libtermcap
-install-tcl: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-libtermcap: \
+ configure-target-libtermcap \
+ html-target-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-libtermcap
-.PHONY: configure-itcl maybe-configure-itcl
-maybe-configure-itcl:
-configure-itcl:
- @test ! -f itcl/Makefile || exit 0; \
- [ -d itcl ] || mkdir itcl; \
+.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap
+maybe-installcheck-target-libtermcap:
+@if target-libtermcap
+maybe-installcheck-target-libtermcap: installcheck-target-libtermcap
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in itcl; \
- cd itcl || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/itcl"; \
- libsrcdir="$$s/itcl";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/itcl"; \
- libsrcdir="$$s/itcl";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
|| exit 1
-.PHONY: all-itcl maybe-all-itcl
-maybe-all-itcl:
-all-itcl: configure-itcl
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libtermcap
-.PHONY: check-itcl maybe-check-itcl
-maybe-check-itcl:
+.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap
+maybe-mostlyclean-target-libtermcap:
+@if target-libtermcap
+maybe-mostlyclean-target-libtermcap: mostlyclean-target-libtermcap
-check-itcl:
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check)
+# libtermcap doesn't support mostlyclean.
+mostlyclean-target-libtermcap:
+@endif target-libtermcap
-.PHONY: install-itcl maybe-install-itcl
-maybe-install-itcl:
+.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap
+maybe-clean-target-libtermcap:
+@if target-libtermcap
+maybe-clean-target-libtermcap: clean-target-libtermcap
-install-itcl: installdirs
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install)
+# libtermcap doesn't support clean.
+clean-target-libtermcap:
+@endif target-libtermcap
-.PHONY: configure-ld maybe-configure-ld
-maybe-configure-ld:
-configure-ld:
- @test ! -f ld/Makefile || exit 0; \
- [ -d ld ] || mkdir ld; \
- r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap
+maybe-distclean-target-libtermcap:
+@if target-libtermcap
+maybe-distclean-target-libtermcap: distclean-target-libtermcap
+
+# libtermcap doesn't support distclean.
+distclean-target-libtermcap:
+
+@endif target-libtermcap
+
+.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap
+maybe-maintainer-clean-target-libtermcap:
+@if target-libtermcap
+maybe-maintainer-clean-target-libtermcap: maintainer-clean-target-libtermcap
+
+# libtermcap doesn't support maintainer-clean.
+maintainer-clean-target-libtermcap:
+
+@endif target-libtermcap
+
+
+
+
+
+.PHONY: configure-target-winsup maybe-configure-target-winsup
+maybe-configure-target-winsup:
+@if target-winsup
+maybe-configure-target-winsup: configure-target-winsup
+configure-target-winsup:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in ld; \
- cd ld || exit 1; \
+ echo "Checking multilib configuration for winsup..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/winsup/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/winsup/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/winsup/multilib.tmp $(TARGET_SUBDIR)/winsup/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/winsup/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/winsup/Makefile; \
+ mv $(TARGET_SUBDIR)/winsup/multilib.tmp $(TARGET_SUBDIR)/winsup/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/winsup/multilib.tmp $(TARGET_SUBDIR)/winsup/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/winsup; \
+ cd "$(TARGET_SUBDIR)/winsup" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/ld"; \
- libsrcdir="$$s/ld";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/ld"; \
- libsrcdir="$$s/ld";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/winsup/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/winsup"; \
+ libsrcdir="$$s/winsup"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-winsup
-.PHONY: all-ld maybe-all-ld
-maybe-all-ld:
-all-ld: configure-ld
+
+
+
+
+.PHONY: all-target-winsup maybe-all-target-winsup
+maybe-all-target-winsup:
+@if target-winsup
+TARGET-target-winsup=all
+maybe-all-target-winsup: all-target-winsup
+all-target-winsup: configure-target-winsup
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd ld && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-winsup))
+@endif target-winsup
-.PHONY: check-ld maybe-check-ld
-maybe-check-ld:
-check-ld:
+
+
+
+.PHONY: check-target-winsup maybe-check-target-winsup
+maybe-check-target-winsup:
+@if target-winsup
+maybe-check-target-winsup: check-target-winsup
+
+check-target-winsup:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd ld && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-winsup
-.PHONY: install-ld maybe-install-ld
-maybe-install-ld:
+.PHONY: install-target-winsup maybe-install-target-winsup
+maybe-install-target-winsup:
+@if target-winsup
+maybe-install-target-winsup: install-target-winsup
-install-ld: installdirs
+install-target-winsup: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd ld && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-winsup
-.PHONY: configure-libgui maybe-configure-libgui
-maybe-configure-libgui:
-configure-libgui:
- @test ! -f libgui/Makefile || exit 0; \
- [ -d libgui ] || mkdir libgui; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-winsup info-target-winsup
+maybe-info-target-winsup:
+@if target-winsup
+maybe-info-target-winsup: info-target-winsup
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in libgui; \
- cd libgui || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/libgui"; \
- libsrcdir="$$s/libgui";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/libgui"; \
- libsrcdir="$$s/libgui";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-libgui maybe-all-libgui
-maybe-all-libgui:
-all-libgui: configure-libgui
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-winsup
-.PHONY: check-libgui maybe-check-libgui
-maybe-check-libgui:
+.PHONY: maybe-dvi-target-winsup dvi-target-winsup
+maybe-dvi-target-winsup:
+@if target-winsup
+maybe-dvi-target-winsup: dvi-target-winsup
-check-libgui:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-winsup
-.PHONY: install-libgui maybe-install-libgui
-maybe-install-libgui:
+.PHONY: maybe-html-target-winsup html-target-winsup
+maybe-html-target-winsup:
+@if target-winsup
+maybe-html-target-winsup: html-target-winsup
-install-libgui: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-winsup
-.PHONY: configure-libiberty maybe-configure-libiberty
-maybe-configure-libiberty:
-configure-libiberty:
- @test ! -f libiberty/Makefile || exit 0; \
- [ -d libiberty ] || mkdir libiberty; \
+.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup
+maybe-TAGS-target-winsup:
+@if target-winsup
+maybe-TAGS-target-winsup: TAGS-target-winsup
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in libiberty; \
- cd libiberty || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/libiberty"; \
- libsrcdir="$$s/libiberty";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/libiberty"; \
- libsrcdir="$$s/libiberty";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-libiberty maybe-all-libiberty
-maybe-all-libiberty:
-all-libiberty: configure-libiberty
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-winsup
-.PHONY: check-libiberty maybe-check-libiberty
-maybe-check-libiberty:
+.PHONY: maybe-install-info-target-winsup install-info-target-winsup
+maybe-install-info-target-winsup:
+@if target-winsup
+maybe-install-info-target-winsup: install-info-target-winsup
-check-libiberty:
- @r=`${PWD_COMMAND}`; export r; \
+install-info-target-winsup: \
+ configure-target-winsup \
+ info-target-winsup
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
+@endif target-winsup
-.PHONY: install-libiberty maybe-install-libiberty
-maybe-install-libiberty:
+.PHONY: maybe-install-html-target-winsup install-html-target-winsup
+maybe-install-html-target-winsup:
+@if target-winsup
+maybe-install-html-target-winsup: install-html-target-winsup
-install-libiberty: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-winsup: \
+ configure-target-winsup \
+ html-target-winsup
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-winsup
-.PHONY: configure-libtool maybe-configure-libtool
-maybe-configure-libtool:
-configure-libtool:
- @test ! -f libtool/Makefile || exit 0; \
- [ -d libtool ] || mkdir libtool; \
+.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup
+maybe-installcheck-target-winsup:
+@if target-winsup
+maybe-installcheck-target-winsup: installcheck-target-winsup
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in libtool; \
- cd libtool || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/libtool"; \
- libsrcdir="$$s/libtool";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/libtool"; \
- libsrcdir="$$s/libtool";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
|| exit 1
-.PHONY: all-libtool maybe-all-libtool
-maybe-all-libtool:
-all-libtool: configure-libtool
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-winsup
-.PHONY: check-libtool maybe-check-libtool
-maybe-check-libtool:
+.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup
+maybe-mostlyclean-target-winsup:
+@if target-winsup
+maybe-mostlyclean-target-winsup: mostlyclean-target-winsup
-check-libtool:
- @r=`${PWD_COMMAND}`; export r; \
+mostlyclean-target-winsup:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+@endif target-winsup
-.PHONY: install-libtool maybe-install-libtool
-maybe-install-libtool:
+.PHONY: maybe-clean-target-winsup clean-target-winsup
+maybe-clean-target-winsup:
+@if target-winsup
+maybe-clean-target-winsup: clean-target-winsup
-install-libtool: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-winsup:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-winsup
-.PHONY: configure-m4 maybe-configure-m4
-maybe-configure-m4:
-configure-m4:
- @test ! -f m4/Makefile || exit 0; \
- [ -d m4 ] || mkdir m4; \
+.PHONY: maybe-distclean-target-winsup distclean-target-winsup
+maybe-distclean-target-winsup:
+@if target-winsup
+maybe-distclean-target-winsup: distclean-target-winsup
+
+distclean-target-winsup:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in m4; \
- cd m4 || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/m4"; \
- libsrcdir="$$s/m4";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/m4"; \
- libsrcdir="$$s/m4";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
|| exit 1
-.PHONY: all-m4 maybe-all-m4
-maybe-all-m4:
-all-m4: configure-m4
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-winsup
-.PHONY: check-m4 maybe-check-m4
-maybe-check-m4:
+.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup
+maybe-maintainer-clean-target-winsup:
+@if target-winsup
+maybe-maintainer-clean-target-winsup: maintainer-clean-target-winsup
-check-m4:
- @r=`${PWD_COMMAND}`; export r; \
+maintainer-clean-target-winsup:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+@endif target-winsup
-.PHONY: install-m4 maybe-install-m4
-maybe-install-m4:
-install-m4: installdirs
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install)
-.PHONY: configure-make maybe-configure-make
-maybe-configure-make:
-configure-make:
- @test ! -f make/Makefile || exit 0; \
- [ -d make ] || mkdir make; \
- r=`${PWD_COMMAND}`; export r; \
+
+.PHONY: configure-target-libgloss maybe-configure-target-libgloss
+maybe-configure-target-libgloss:
+@if target-libgloss
+maybe-configure-target-libgloss: configure-target-libgloss
+configure-target-libgloss:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in make; \
- cd make || exit 1; \
+ echo "Checking multilib configuration for libgloss..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgloss/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgloss/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgloss/multilib.tmp $(TARGET_SUBDIR)/libgloss/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgloss/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgloss/Makefile; \
+ mv $(TARGET_SUBDIR)/libgloss/multilib.tmp $(TARGET_SUBDIR)/libgloss/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgloss/multilib.tmp $(TARGET_SUBDIR)/libgloss/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libgloss; \
+ cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/make"; \
- libsrcdir="$$s/make";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/make"; \
- libsrcdir="$$s/make";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgloss/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/libgloss"; \
+ libsrcdir="$$s/libgloss"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libgloss
-.PHONY: all-make maybe-all-make
-maybe-all-make:
-all-make: configure-make
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd make && $(MAKE) $(FLAGS_TO_PASS) all)
-.PHONY: check-make maybe-check-make
-maybe-check-make:
-check-make:
+
+
+.PHONY: all-target-libgloss maybe-all-target-libgloss
+maybe-all-target-libgloss:
+@if target-libgloss
+TARGET-target-libgloss=all
+maybe-all-target-libgloss: all-target-libgloss
+all-target-libgloss: configure-target-libgloss
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd make && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgloss))
+@endif target-libgloss
-.PHONY: install-make maybe-install-make
-maybe-install-make:
-install-make: installdirs
+
+
+.PHONY: check-target-libgloss maybe-check-target-libgloss
+maybe-check-target-libgloss:
+@if target-libgloss
+maybe-check-target-libgloss: check-target-libgloss
+
+# Dummy target for uncheckable module.
+check-target-libgloss:
+
+@endif target-libgloss
+
+.PHONY: install-target-libgloss maybe-install-target-libgloss
+maybe-install-target-libgloss:
+@if target-libgloss
+maybe-install-target-libgloss: install-target-libgloss
+
+install-target-libgloss: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd make && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libgloss
-.PHONY: configure-mmalloc maybe-configure-mmalloc
-maybe-configure-mmalloc:
-configure-mmalloc:
- @test ! -f mmalloc/Makefile || exit 0; \
- [ -d mmalloc ] || mkdir mmalloc; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libgloss info-target-libgloss
+maybe-info-target-libgloss:
+@if target-libgloss
+maybe-info-target-libgloss: info-target-libgloss
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in mmalloc; \
- cd mmalloc || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/mmalloc"; \
- libsrcdir="$$s/mmalloc";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/mmalloc"; \
- libsrcdir="$$s/mmalloc";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-mmalloc maybe-all-mmalloc
-maybe-all-mmalloc:
-all-mmalloc: configure-mmalloc
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgloss
-.PHONY: check-mmalloc maybe-check-mmalloc
-maybe-check-mmalloc:
+.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss
+maybe-dvi-target-libgloss:
+@if target-libgloss
+maybe-dvi-target-libgloss: dvi-target-libgloss
-check-mmalloc:
+dvi-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 dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-libgloss
-.PHONY: install-mmalloc maybe-install-mmalloc
-maybe-install-mmalloc:
+.PHONY: maybe-html-target-libgloss html-target-libgloss
+maybe-html-target-libgloss:
+@if target-libgloss
+maybe-html-target-libgloss: html-target-libgloss
-install-mmalloc: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libgloss
-.PHONY: configure-patch maybe-configure-patch
-maybe-configure-patch:
-configure-patch:
- @test ! -f patch/Makefile || exit 0; \
- [ -d patch ] || mkdir patch; \
+.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss
+maybe-TAGS-target-libgloss:
+@if target-libgloss
+maybe-TAGS-target-libgloss: TAGS-target-libgloss
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in patch; \
- cd patch || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/patch"; \
- libsrcdir="$$s/patch";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/patch"; \
- libsrcdir="$$s/patch";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-patch maybe-all-patch
-maybe-all-patch:
-all-patch: configure-patch
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd patch && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libgloss
-.PHONY: check-patch maybe-check-patch
-maybe-check-patch:
+.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss
+maybe-install-info-target-libgloss:
+@if target-libgloss
+maybe-install-info-target-libgloss: install-info-target-libgloss
-check-patch:
- @r=`${PWD_COMMAND}`; export r; \
+install-info-target-libgloss: \
+ configure-target-libgloss \
+ info-target-libgloss
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd patch && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
+@endif target-libgloss
-.PHONY: install-patch maybe-install-patch
-maybe-install-patch:
+.PHONY: maybe-install-html-target-libgloss install-html-target-libgloss
+maybe-install-html-target-libgloss:
+@if target-libgloss
+maybe-install-html-target-libgloss: install-html-target-libgloss
-install-patch: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-libgloss: \
+ configure-target-libgloss \
+ html-target-libgloss
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd patch && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-libgloss
-.PHONY: configure-perl maybe-configure-perl
-maybe-configure-perl:
-configure-perl:
- @test ! -f perl/Makefile || exit 0; \
- [ -d perl ] || mkdir perl; \
+.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss
+maybe-installcheck-target-libgloss:
+@if target-libgloss
+maybe-installcheck-target-libgloss: installcheck-target-libgloss
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in perl; \
- cd perl || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/perl"; \
- libsrcdir="$$s/perl";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/perl"; \
- libsrcdir="$$s/perl";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
|| exit 1
-.PHONY: all-perl maybe-all-perl
-maybe-all-perl:
-all-perl: configure-perl
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libgloss
+
+.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss
+maybe-mostlyclean-target-libgloss:
+@if target-libgloss
+maybe-mostlyclean-target-libgloss: mostlyclean-target-libgloss
+
+mostlyclean-target-libgloss:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd perl && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
-.PHONY: check-perl maybe-check-perl
-maybe-check-perl:
+@endif target-libgloss
-check-perl:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-clean-target-libgloss clean-target-libgloss
+maybe-clean-target-libgloss:
+@if target-libgloss
+maybe-clean-target-libgloss: clean-target-libgloss
+
+clean-target-libgloss:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd perl && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-libgloss
-.PHONY: install-perl maybe-install-perl
-maybe-install-perl:
+.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss
+maybe-distclean-target-libgloss:
+@if target-libgloss
+maybe-distclean-target-libgloss: distclean-target-libgloss
-install-perl: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+distclean-target-libgloss:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd perl && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
+@endif target-libgloss
-.PHONY: configure-prms maybe-configure-prms
-maybe-configure-prms:
-configure-prms:
- @test ! -f prms/Makefile || exit 0; \
- [ -d prms ] || mkdir prms; \
+.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss
+maybe-maintainer-clean-target-libgloss:
+@if target-libgloss
+maybe-maintainer-clean-target-libgloss: maintainer-clean-target-libgloss
+
+maintainer-clean-target-libgloss:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in prms; \
- cd prms || exit 1; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libgloss
+
+
+
+
+
+.PHONY: configure-target-libiberty maybe-configure-target-libiberty
+maybe-configure-target-libiberty:
+@if target-libiberty
+maybe-configure-target-libiberty: configure-target-libiberty
+configure-target-libiberty:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libiberty..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libiberty/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libiberty/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libiberty/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libiberty/Makefile; \
+ mv $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libiberty; \
+ cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/prms"; \
- libsrcdir="$$s/prms";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/prms"; \
- libsrcdir="$$s/prms";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libiberty/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libiberty
-.PHONY: all-prms maybe-all-prms
-maybe-all-prms:
-all-prms: configure-prms
+
+
+
+
+.PHONY: all-target-libiberty maybe-all-target-libiberty
+maybe-all-target-libiberty:
+@if target-libiberty
+TARGET-target-libiberty=all
+maybe-all-target-libiberty: all-target-libiberty
+all-target-libiberty: configure-target-libiberty
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd prms && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libiberty))
+@endif target-libiberty
-.PHONY: check-prms maybe-check-prms
-maybe-check-prms:
-check-prms:
+
+
+
+.PHONY: check-target-libiberty maybe-check-target-libiberty
+maybe-check-target-libiberty:
+@if target-libiberty
+maybe-check-target-libiberty: check-target-libiberty
+
+check-target-libiberty:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd prms && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libiberty
-.PHONY: install-prms maybe-install-prms
-maybe-install-prms:
+.PHONY: install-target-libiberty maybe-install-target-libiberty
+maybe-install-target-libiberty:
+@if target-libiberty
+maybe-install-target-libiberty: install-target-libiberty
-install-prms: installdirs
+install-target-libiberty: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd prms && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libiberty
-.PHONY: configure-rcs maybe-configure-rcs
-maybe-configure-rcs:
-configure-rcs:
- @test ! -f rcs/Makefile || exit 0; \
- [ -d rcs ] || mkdir rcs; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libiberty info-target-libiberty
+maybe-info-target-libiberty:
+@if target-libiberty
+maybe-info-target-libiberty: info-target-libiberty
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in rcs; \
- cd rcs || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/rcs"; \
- libsrcdir="$$s/rcs";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/rcs"; \
- libsrcdir="$$s/rcs";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-rcs maybe-all-rcs
-maybe-all-rcs:
-all-rcs: configure-rcs
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libiberty
+
+.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty
+maybe-dvi-target-libiberty:
+@if target-libiberty
+maybe-dvi-target-libiberty: dvi-target-libiberty
+
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
-.PHONY: check-rcs maybe-check-rcs
-maybe-check-rcs:
+@endif target-libiberty
-check-rcs:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-html-target-libiberty html-target-libiberty
+maybe-html-target-libiberty:
+@if target-libiberty
+maybe-html-target-libiberty: html-target-libiberty
+
+html-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; \
- $(SET_LIB_PATH) \
- (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libiberty
-.PHONY: install-rcs maybe-install-rcs
-maybe-install-rcs:
+.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty
+maybe-TAGS-target-libiberty:
+@if target-libiberty
+maybe-TAGS-target-libiberty: TAGS-target-libiberty
-install-rcs: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
+ || exit 1
+@endif target-libiberty
-.PHONY: configure-readline maybe-configure-readline
-maybe-configure-readline:
-configure-readline:
- @test ! -f readline/Makefile || exit 0; \
- [ -d readline ] || mkdir readline; \
+.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty
+maybe-install-info-target-libiberty:
+@if target-libiberty
+maybe-install-info-target-libiberty: install-info-target-libiberty
+
+install-info-target-libiberty: \
+ configure-target-libiberty \
+ info-target-libiberty
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in readline; \
- cd readline || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/readline"; \
- libsrcdir="$$s/readline";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/readline"; \
- libsrcdir="$$s/readline";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
|| exit 1
-.PHONY: all-readline maybe-all-readline
-maybe-all-readline:
-all-readline: configure-readline
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libiberty
+
+.PHONY: maybe-install-html-target-libiberty install-html-target-libiberty
+maybe-install-html-target-libiberty:
+@if target-libiberty
+maybe-install-html-target-libiberty: install-html-target-libiberty
+
+install-html-target-libiberty: \
+ configure-target-libiberty \
+ html-target-libiberty
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd readline && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
-.PHONY: check-readline maybe-check-readline
-maybe-check-readline:
+@endif target-libiberty
-check-readline:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty
+maybe-installcheck-target-libiberty:
+@if target-libiberty
+maybe-installcheck-target-libiberty: installcheck-target-libiberty
+
+installcheck-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; \
- $(SET_LIB_PATH) \
- (cd readline && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
+ || exit 1
+@endif target-libiberty
-.PHONY: install-readline maybe-install-readline
-maybe-install-readline:
+.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty
+maybe-mostlyclean-target-libiberty:
+@if target-libiberty
+maybe-mostlyclean-target-libiberty: mostlyclean-target-libiberty
-install-readline: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+mostlyclean-target-libiberty:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd readline && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+@endif target-libiberty
-.PHONY: configure-release maybe-configure-release
-maybe-configure-release:
-configure-release:
- @test ! -f release/Makefile || exit 0; \
- [ -d release ] || mkdir release; \
+.PHONY: maybe-clean-target-libiberty clean-target-libiberty
+maybe-clean-target-libiberty:
+@if target-libiberty
+maybe-clean-target-libiberty: clean-target-libiberty
+
+clean-target-libiberty:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in release; \
- cd release || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/release"; \
- libsrcdir="$$s/release";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/release"; \
- libsrcdir="$$s/release";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
|| exit 1
-.PHONY: all-release maybe-all-release
-maybe-all-release:
-all-release: configure-release
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libiberty
+
+.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty
+maybe-distclean-target-libiberty:
+@if target-libiberty
+maybe-distclean-target-libiberty: distclean-target-libiberty
+
+distclean-target-libiberty:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd release && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
-.PHONY: check-release maybe-check-release
-maybe-check-release:
+@endif target-libiberty
-check-release:
+.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty
+maybe-maintainer-clean-target-libiberty:
+@if target-libiberty
+maybe-maintainer-clean-target-libiberty: maintainer-clean-target-libiberty
+
+maintainer-clean-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 maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+@endif target-libiberty
-.PHONY: install-release maybe-install-release
-maybe-install-release:
-install-release:
-.PHONY: configure-recode maybe-configure-recode
-maybe-configure-recode:
-configure-recode:
- @test ! -f recode/Makefile || exit 0; \
- [ -d recode ] || mkdir recode; \
- r=`${PWD_COMMAND}`; export r; \
+
+.PHONY: configure-target-gperf maybe-configure-target-gperf
+maybe-configure-target-gperf:
+@if target-gperf
+maybe-configure-target-gperf: configure-target-gperf
+configure-target-gperf:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in recode; \
- cd recode || exit 1; \
+ echo "Checking multilib configuration for gperf..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/gperf/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/gperf/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/gperf/multilib.tmp $(TARGET_SUBDIR)/gperf/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/gperf/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/gperf/Makefile; \
+ mv $(TARGET_SUBDIR)/gperf/multilib.tmp $(TARGET_SUBDIR)/gperf/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/gperf/multilib.tmp $(TARGET_SUBDIR)/gperf/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/gperf; \
+ cd "$(TARGET_SUBDIR)/gperf" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/recode"; \
- libsrcdir="$$s/recode";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/recode"; \
- libsrcdir="$$s/recode";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/gperf/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/gperf"; \
+ libsrcdir="$$s/gperf"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-gperf
-.PHONY: all-recode maybe-all-recode
-maybe-all-recode:
-all-recode: configure-recode
+
+
+
+
+.PHONY: all-target-gperf maybe-all-target-gperf
+maybe-all-target-gperf:
+@if target-gperf
+TARGET-target-gperf=all
+maybe-all-target-gperf: all-target-gperf
+all-target-gperf: configure-target-gperf
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd recode && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-gperf))
+@endif target-gperf
-.PHONY: check-recode maybe-check-recode
-maybe-check-recode:
-check-recode:
+
+
+
+.PHONY: check-target-gperf maybe-check-target-gperf
+maybe-check-target-gperf:
+@if target-gperf
+maybe-check-target-gperf: check-target-gperf
+
+check-target-gperf:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd recode && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-gperf
-.PHONY: install-recode maybe-install-recode
-maybe-install-recode:
+.PHONY: install-target-gperf maybe-install-target-gperf
+maybe-install-target-gperf:
+@if target-gperf
+maybe-install-target-gperf: install-target-gperf
-install-recode: installdirs
+install-target-gperf: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd recode && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-gperf
-.PHONY: configure-sed maybe-configure-sed
-maybe-configure-sed:
-configure-sed:
- @test ! -f sed/Makefile || exit 0; \
- [ -d sed ] || mkdir sed; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-gperf info-target-gperf
+maybe-info-target-gperf:
+@if target-gperf
+maybe-info-target-gperf: info-target-gperf
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in sed; \
- cd sed || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/sed"; \
- libsrcdir="$$s/sed";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/sed"; \
- libsrcdir="$$s/sed";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-sed maybe-all-sed
-maybe-all-sed:
-all-sed: configure-sed
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd sed && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-gperf
-.PHONY: check-sed maybe-check-sed
-maybe-check-sed:
+.PHONY: maybe-dvi-target-gperf dvi-target-gperf
+maybe-dvi-target-gperf:
+@if target-gperf
+maybe-dvi-target-gperf: dvi-target-gperf
-check-sed:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd sed && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-gperf
-.PHONY: install-sed maybe-install-sed
-maybe-install-sed:
+.PHONY: maybe-html-target-gperf html-target-gperf
+maybe-html-target-gperf:
+@if target-gperf
+maybe-html-target-gperf: html-target-gperf
-install-sed: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd sed && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-gperf
-.PHONY: configure-send-pr maybe-configure-send-pr
-maybe-configure-send-pr:
-configure-send-pr:
- @test ! -f send-pr/Makefile || exit 0; \
- [ -d send-pr ] || mkdir send-pr; \
+.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf
+maybe-TAGS-target-gperf:
+@if target-gperf
+maybe-TAGS-target-gperf: TAGS-target-gperf
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in send-pr; \
- cd send-pr || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/send-pr"; \
- libsrcdir="$$s/send-pr";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/send-pr"; \
- libsrcdir="$$s/send-pr";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-send-pr maybe-all-send-pr
-maybe-all-send-pr:
-all-send-pr: configure-send-pr
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-gperf
-.PHONY: check-send-pr maybe-check-send-pr
-maybe-check-send-pr:
+.PHONY: maybe-install-info-target-gperf install-info-target-gperf
+maybe-install-info-target-gperf:
+@if target-gperf
+maybe-install-info-target-gperf: install-info-target-gperf
-check-send-pr:
- @r=`${PWD_COMMAND}`; export r; \
+install-info-target-gperf: \
+ configure-target-gperf \
+ info-target-gperf
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
+@endif target-gperf
-.PHONY: install-send-pr maybe-install-send-pr
-maybe-install-send-pr:
+.PHONY: maybe-install-html-target-gperf install-html-target-gperf
+maybe-install-html-target-gperf:
+@if target-gperf
+maybe-install-html-target-gperf: install-html-target-gperf
-install-send-pr: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-gperf: \
+ configure-target-gperf \
+ html-target-gperf
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-gperf
-.PHONY: configure-shellutils maybe-configure-shellutils
-maybe-configure-shellutils:
-configure-shellutils:
- @test ! -f shellutils/Makefile || exit 0; \
- [ -d shellutils ] || mkdir shellutils; \
+.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf
+maybe-installcheck-target-gperf:
+@if target-gperf
+maybe-installcheck-target-gperf: installcheck-target-gperf
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in shellutils; \
- cd shellutils || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/shellutils"; \
- libsrcdir="$$s/shellutils";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/shellutils"; \
- libsrcdir="$$s/shellutils";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
|| exit 1
-.PHONY: all-shellutils maybe-all-shellutils
-maybe-all-shellutils:
-all-shellutils: configure-shellutils
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-gperf
-.PHONY: check-shellutils maybe-check-shellutils
-maybe-check-shellutils:
+.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf
+maybe-mostlyclean-target-gperf:
+@if target-gperf
+maybe-mostlyclean-target-gperf: mostlyclean-target-gperf
-check-shellutils:
- @r=`${PWD_COMMAND}`; export r; \
+mostlyclean-target-gperf:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+@endif target-gperf
-.PHONY: install-shellutils maybe-install-shellutils
-maybe-install-shellutils:
+.PHONY: maybe-clean-target-gperf clean-target-gperf
+maybe-clean-target-gperf:
+@if target-gperf
+maybe-clean-target-gperf: clean-target-gperf
-install-shellutils: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-gperf:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-gperf
-.PHONY: configure-sid maybe-configure-sid
-maybe-configure-sid:
-configure-sid:
- @test ! -f sid/Makefile || exit 0; \
- [ -d sid ] || mkdir sid; \
+.PHONY: maybe-distclean-target-gperf distclean-target-gperf
+maybe-distclean-target-gperf:
+@if target-gperf
+maybe-distclean-target-gperf: distclean-target-gperf
+
+distclean-target-gperf:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in sid; \
- cd sid || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/sid"; \
- libsrcdir="$$s/sid";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/sid"; \
- libsrcdir="$$s/sid";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
|| exit 1
-.PHONY: all-sid maybe-all-sid
-maybe-all-sid:
-all-sid: configure-sid
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-gperf
+
+.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf
+maybe-maintainer-clean-target-gperf:
+@if target-gperf
+maybe-maintainer-clean-target-gperf: maintainer-clean-target-gperf
+
+maintainer-clean-target-gperf:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd sid && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
-.PHONY: check-sid maybe-check-sid
-maybe-check-sid:
+@endif target-gperf
-check-sid:
+
+
+
+
+.PHONY: configure-target-examples maybe-configure-target-examples
+maybe-configure-target-examples:
+@if target-examples
+maybe-configure-target-examples: configure-target-examples
+configure-target-examples:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd sid && $(MAKE) $(FLAGS_TO_PASS) check)
+ echo "Checking multilib configuration for examples..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/examples/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/examples/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/examples/multilib.tmp $(TARGET_SUBDIR)/examples/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/examples/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/examples/Makefile; \
+ mv $(TARGET_SUBDIR)/examples/multilib.tmp $(TARGET_SUBDIR)/examples/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/examples/multilib.tmp $(TARGET_SUBDIR)/examples/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/examples; \
+ cd "$(TARGET_SUBDIR)/examples" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/examples/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/examples"; \
+ libsrcdir="$$s/examples"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif target-examples
-.PHONY: install-sid maybe-install-sid
-maybe-install-sid:
-install-sid: installdirs
+
+
+.PHONY: all-target-examples maybe-all-target-examples
+maybe-all-target-examples:
+@if target-examples
+TARGET-target-examples=all
+maybe-all-target-examples: all-target-examples
+all-target-examples: configure-target-examples
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd sid && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-examples))
+@endif target-examples
-.PHONY: configure-sim maybe-configure-sim
-maybe-configure-sim:
-configure-sim:
- @test ! -f sim/Makefile || exit 0; \
- [ -d sim ] || mkdir sim; \
+
+
+
+.PHONY: check-target-examples maybe-check-target-examples
+maybe-check-target-examples:
+@if target-examples
+maybe-check-target-examples: check-target-examples
+
+# Dummy target for uncheckable module.
+check-target-examples:
+
+@endif target-examples
+
+.PHONY: install-target-examples maybe-install-target-examples
+maybe-install-target-examples:
+@if target-examples
+maybe-install-target-examples: install-target-examples
+
+# Dummy target for uninstallable.
+install-target-examples:
+
+@endif target-examples
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-examples info-target-examples
+maybe-info-target-examples:
+@if target-examples
+maybe-info-target-examples: info-target-examples
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in sim; \
- cd sim || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/sim"; \
- libsrcdir="$$s/sim";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/sim"; \
- libsrcdir="$$s/sim";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-sim maybe-all-sim
-maybe-all-sim:
-all-sim: configure-sim
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-examples
+
+.PHONY: maybe-dvi-target-examples dvi-target-examples
+maybe-dvi-target-examples:
+@if target-examples
+maybe-dvi-target-examples: dvi-target-examples
+
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd sim && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
-.PHONY: check-sim maybe-check-sim
-maybe-check-sim:
+@endif target-examples
-check-sim:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-html-target-examples html-target-examples
+maybe-html-target-examples:
+@if target-examples
+maybe-html-target-examples: html-target-examples
+
+html-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; \
- $(SET_LIB_PATH) \
- (cd sim && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-examples
-.PHONY: install-sim maybe-install-sim
-maybe-install-sim:
+.PHONY: maybe-TAGS-target-examples TAGS-target-examples
+maybe-TAGS-target-examples:
+@if target-examples
+maybe-TAGS-target-examples: TAGS-target-examples
-install-sim: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- (cd sim && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
+ || exit 1
+@endif target-examples
-.PHONY: configure-tar maybe-configure-tar
-maybe-configure-tar:
-configure-tar:
- @test ! -f tar/Makefile || exit 0; \
- [ -d tar ] || mkdir tar; \
+.PHONY: maybe-install-info-target-examples install-info-target-examples
+maybe-install-info-target-examples:
+@if target-examples
+maybe-install-info-target-examples: install-info-target-examples
+
+install-info-target-examples: \
+ configure-target-examples \
+ info-target-examples
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in tar; \
- cd tar || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/tar"; \
- libsrcdir="$$s/tar";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/tar"; \
- libsrcdir="$$s/tar";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
|| exit 1
-.PHONY: all-tar maybe-all-tar
-maybe-all-tar:
-all-tar: configure-tar
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-examples
+
+.PHONY: maybe-install-html-target-examples install-html-target-examples
+maybe-install-html-target-examples:
+@if target-examples
+maybe-install-html-target-examples: install-html-target-examples
+
+install-html-target-examples: \
+ configure-target-examples \
+ html-target-examples
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tar && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
-.PHONY: check-tar maybe-check-tar
-maybe-check-tar:
+@endif target-examples
-check-tar:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-installcheck-target-examples installcheck-target-examples
+maybe-installcheck-target-examples:
+@if target-examples
+maybe-installcheck-target-examples: installcheck-target-examples
+
+installcheck-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; \
- $(SET_LIB_PATH) \
- (cd tar && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
+ || exit 1
+@endif target-examples
-.PHONY: install-tar maybe-install-tar
-maybe-install-tar:
+.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples
+maybe-mostlyclean-target-examples:
+@if target-examples
+maybe-mostlyclean-target-examples: mostlyclean-target-examples
-install-tar: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+mostlyclean-target-examples:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tar && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+@endif target-examples
-.PHONY: configure-texinfo maybe-configure-texinfo
-maybe-configure-texinfo:
-configure-texinfo:
- @test ! -f texinfo/Makefile || exit 0; \
- [ -d texinfo ] || mkdir texinfo; \
+.PHONY: maybe-clean-target-examples clean-target-examples
+maybe-clean-target-examples:
+@if target-examples
+maybe-clean-target-examples: clean-target-examples
+
+clean-target-examples:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in texinfo; \
- cd texinfo || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/texinfo"; \
- libsrcdir="$$s/texinfo";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/texinfo"; \
- libsrcdir="$$s/texinfo";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
|| exit 1
-.PHONY: all-texinfo maybe-all-texinfo
-maybe-all-texinfo:
-all-texinfo: configure-texinfo
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-examples
+
+.PHONY: maybe-distclean-target-examples distclean-target-examples
+maybe-distclean-target-examples:
+@if target-examples
+maybe-distclean-target-examples: distclean-target-examples
+
+distclean-target-examples:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
-.PHONY: check-texinfo maybe-check-texinfo
-maybe-check-texinfo:
+@endif target-examples
-check-texinfo:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples
+maybe-maintainer-clean-target-examples:
+@if target-examples
+maybe-maintainer-clean-target-examples: maintainer-clean-target-examples
+
+maintainer-clean-target-examples:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+@endif target-examples
-.PHONY: install-texinfo maybe-install-texinfo
-maybe-install-texinfo:
-install-texinfo:
-.PHONY: configure-textutils maybe-configure-textutils
-maybe-configure-textutils:
-configure-textutils:
- @test ! -f textutils/Makefile || exit 0; \
- [ -d textutils ] || mkdir textutils; \
- r=`${PWD_COMMAND}`; export r; \
+
+.PHONY: configure-target-libffi maybe-configure-target-libffi
+maybe-configure-target-libffi:
+@if target-libffi
+maybe-configure-target-libffi: configure-target-libffi
+configure-target-libffi:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in textutils; \
- cd textutils || exit 1; \
+ echo "Checking multilib configuration for libffi..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libffi/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libffi/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libffi/multilib.tmp $(TARGET_SUBDIR)/libffi/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libffi/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libffi/Makefile; \
+ mv $(TARGET_SUBDIR)/libffi/multilib.tmp $(TARGET_SUBDIR)/libffi/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libffi/multilib.tmp $(TARGET_SUBDIR)/libffi/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libffi; \
+ cd "$(TARGET_SUBDIR)/libffi" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/textutils"; \
- libsrcdir="$$s/textutils";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/textutils"; \
- libsrcdir="$$s/textutils";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libffi/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/libffi"; \
+ libsrcdir="$$s/libffi"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libffi
-.PHONY: all-textutils maybe-all-textutils
-maybe-all-textutils:
-all-textutils: configure-textutils
+
+
+
+
+.PHONY: all-target-libffi maybe-all-target-libffi
+maybe-all-target-libffi:
+@if target-libffi
+TARGET-target-libffi=all
+maybe-all-target-libffi: all-target-libffi
+all-target-libffi: configure-target-libffi
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libffi))
+@endif target-libffi
-.PHONY: check-textutils maybe-check-textutils
-maybe-check-textutils:
-check-textutils:
+
+
+
+.PHONY: check-target-libffi maybe-check-target-libffi
+maybe-check-target-libffi:
+@if target-libffi
+maybe-check-target-libffi: check-target-libffi
+
+check-target-libffi:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libffi
-.PHONY: install-textutils maybe-install-textutils
-maybe-install-textutils:
+.PHONY: install-target-libffi maybe-install-target-libffi
+maybe-install-target-libffi:
+@if target-libffi
+maybe-install-target-libffi: install-target-libffi
-install-textutils: installdirs
+install-target-libffi: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libffi
-.PHONY: configure-time maybe-configure-time
-maybe-configure-time:
-configure-time:
- @test ! -f time/Makefile || exit 0; \
- [ -d time ] || mkdir time; \
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libffi info-target-libffi
+maybe-info-target-libffi:
+@if target-libffi
+maybe-info-target-libffi: info-target-libffi
+
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in time; \
- cd time || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/time"; \
- libsrcdir="$$s/time";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/time"; \
- libsrcdir="$$s/time";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-time maybe-all-time
-maybe-all-time:
-all-time: configure-time
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd time && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libffi
-.PHONY: check-time maybe-check-time
-maybe-check-time:
+.PHONY: maybe-dvi-target-libffi dvi-target-libffi
+maybe-dvi-target-libffi:
+@if target-libffi
+maybe-dvi-target-libffi: dvi-target-libffi
-check-time:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd time && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-libffi
-.PHONY: install-time maybe-install-time
-maybe-install-time:
+.PHONY: maybe-html-target-libffi html-target-libffi
+maybe-html-target-libffi:
+@if target-libffi
+maybe-html-target-libffi: html-target-libffi
-install-time: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd time && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libffi
-.PHONY: configure-uudecode maybe-configure-uudecode
-maybe-configure-uudecode:
-configure-uudecode:
- @test ! -f uudecode/Makefile || exit 0; \
- [ -d uudecode ] || mkdir uudecode; \
+.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi
+maybe-TAGS-target-libffi:
+@if target-libffi
+maybe-TAGS-target-libffi: TAGS-target-libffi
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in uudecode; \
- cd uudecode || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/uudecode"; \
- libsrcdir="$$s/uudecode";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/uudecode"; \
- libsrcdir="$$s/uudecode";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-uudecode maybe-all-uudecode
-maybe-all-uudecode:
-all-uudecode: configure-uudecode
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all)
+@endif target-libffi
-.PHONY: check-uudecode maybe-check-uudecode
-maybe-check-uudecode:
+.PHONY: maybe-install-info-target-libffi install-info-target-libffi
+maybe-install-info-target-libffi:
+@if target-libffi
+maybe-install-info-target-libffi: install-info-target-libffi
-check-uudecode:
- @r=`${PWD_COMMAND}`; export r; \
+install-info-target-libffi: \
+ configure-target-libffi \
+ info-target-libffi
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
+@endif target-libffi
-.PHONY: install-uudecode maybe-install-uudecode
-maybe-install-uudecode:
+.PHONY: maybe-install-html-target-libffi install-html-target-libffi
+maybe-install-html-target-libffi:
+@if target-libffi
+maybe-install-html-target-libffi: install-html-target-libffi
-install-uudecode: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-libffi: \
+ configure-target-libffi \
+ html-target-libffi
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-libffi
-.PHONY: configure-wdiff maybe-configure-wdiff
-maybe-configure-wdiff:
-configure-wdiff:
- @test ! -f wdiff/Makefile || exit 0; \
- [ -d wdiff ] || mkdir wdiff; \
+.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi
+maybe-installcheck-target-libffi:
+@if target-libffi
+maybe-installcheck-target-libffi: installcheck-target-libffi
+
+installcheck-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in wdiff; \
- cd wdiff || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/wdiff"; \
- libsrcdir="$$s/wdiff";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/wdiff"; \
- libsrcdir="$$s/wdiff";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
|| exit 1
-.PHONY: all-wdiff maybe-all-wdiff
-maybe-all-wdiff:
-all-wdiff: configure-wdiff
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libffi
+
+.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi
+maybe-mostlyclean-target-libffi:
+@if target-libffi
+maybe-mostlyclean-target-libffi: mostlyclean-target-libffi
+
+mostlyclean-target-libffi:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
-.PHONY: check-wdiff maybe-check-wdiff
-maybe-check-wdiff:
+@endif target-libffi
-check-wdiff:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-clean-target-libffi clean-target-libffi
+maybe-clean-target-libffi:
+@if target-libffi
+maybe-clean-target-libffi: clean-target-libffi
+
+clean-target-libffi:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-libffi
-.PHONY: install-wdiff maybe-install-wdiff
-maybe-install-wdiff:
+.PHONY: maybe-distclean-target-libffi distclean-target-libffi
+maybe-distclean-target-libffi:
+@if target-libffi
+maybe-distclean-target-libffi: distclean-target-libffi
-install-wdiff: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+distclean-target-libffi:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
+@endif target-libffi
-.PHONY: configure-zip maybe-configure-zip
-maybe-configure-zip:
-configure-zip:
- @test ! -f zip/Makefile || exit 0; \
- [ -d zip ] || mkdir zip; \
+.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi
+maybe-maintainer-clean-target-libffi:
+@if target-libffi
+maybe-maintainer-clean-target-libffi: maintainer-clean-target-libffi
+
+maintainer-clean-target-libffi:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in zip; \
- cd zip || exit 1; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libffi
+
+
+
+
+
+.PHONY: configure-target-libjava maybe-configure-target-libjava
+maybe-configure-target-libjava:
+@if target-libjava
+maybe-configure-target-libjava: configure-target-libjava
+configure-target-libjava:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libjava..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libjava/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libjava/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libjava/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libjava/Makefile; \
+ mv $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libjava; \
+ cd "$(TARGET_SUBDIR)/libjava" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/zip"; \
- libsrcdir="$$s/zip";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/zip"; \
- libsrcdir="$$s/zip";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libjava/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/libjava"; \
+ libsrcdir="$$s/libjava"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libjava
-.PHONY: all-zip maybe-all-zip
-maybe-all-zip:
-all-zip: configure-zip
+
+
+
+
+.PHONY: all-target-libjava maybe-all-target-libjava
+maybe-all-target-libjava:
+@if target-libjava
+TARGET-target-libjava=all
+maybe-all-target-libjava: all-target-libjava
+all-target-libjava: configure-target-libjava
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd zip && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' $(TARGET-target-libjava))
+@endif target-libjava
-.PHONY: check-zip maybe-check-zip
-maybe-check-zip:
-# This module is only tested in a native toolchain.
-check-zip:
- @if [ '$(host)' = '$(target)' ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \
- fi
-.PHONY: install-zip maybe-install-zip
-maybe-install-zip:
-install-zip: installdirs
+.PHONY: check-target-libjava maybe-check-target-libjava
+maybe-check-target-libjava:
+@if target-libjava
+maybe-check-target-libjava: check-target-libjava
+
+check-target-libjava:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd zip && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+@endif target-libjava
-.PHONY: configure-zlib maybe-configure-zlib
-maybe-configure-zlib:
-configure-zlib:
- @test ! -f zlib/Makefile || exit 0; \
- [ -d zlib ] || mkdir zlib; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in zlib; \
- cd zlib || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/zlib"; \
- libsrcdir="$$s/zlib";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/zlib"; \
- libsrcdir="$$s/zlib";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- || exit 1
+.PHONY: install-target-libjava maybe-install-target-libjava
+maybe-install-target-libjava:
+@if target-libjava
+maybe-install-target-libjava: install-target-libjava
-.PHONY: all-zlib maybe-all-zlib
-maybe-all-zlib:
-all-zlib: configure-zlib
+install-target-libjava: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-.PHONY: check-zlib maybe-check-zlib
-maybe-check-zlib:
+@endif target-libjava
-check-zlib:
+# Other targets (info, dvi, etc.)
+.PHONY: maybe-info-target-libjava info-target-libjava
+maybe-info-target-libjava:
+@if target-libjava
+maybe-info-target-libjava: info-target-libjava
-.PHONY: install-zlib maybe-install-zlib
-maybe-install-zlib:
+info-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 info 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}" \
+ info) \
+ || exit 1
-install-zlib:
+@endif target-libjava
+.PHONY: maybe-dvi-target-libjava dvi-target-libjava
+maybe-dvi-target-libjava:
+@if target-libjava
+maybe-dvi-target-libjava: dvi-target-libjava
-.PHONY: configure-gdb maybe-configure-gdb
-maybe-configure-gdb:
-configure-gdb:
- @test ! -f gdb/Makefile || exit 0; \
- [ -d gdb ] || mkdir gdb; \
+dvi-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in gdb; \
- cd gdb || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gdb"; \
- libsrcdir="$$s/gdb";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gdb"; \
- libsrcdir="$$s/gdb";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
|| exit 1
-.PHONY: all-gdb maybe-all-gdb
-maybe-all-gdb:
-all-gdb: configure-gdb
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+@endif target-libjava
-.PHONY: check-gdb maybe-check-gdb
-maybe-check-gdb:
+.PHONY: maybe-html-target-libjava html-target-libjava
+maybe-html-target-libjava:
+@if target-libjava
+maybe-html-target-libjava: html-target-libjava
-check-gdb:
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libjava
-.PHONY: install-gdb maybe-install-gdb
-maybe-install-gdb:
+.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava
+maybe-TAGS-target-libjava:
+@if target-libjava
+maybe-TAGS-target-libjava: TAGS-target-libjava
-install-gdb: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
+ || exit 1
+@endif target-libjava
-.PHONY: configure-expect maybe-configure-expect
-maybe-configure-expect:
-configure-expect:
- @test ! -f expect/Makefile || exit 0; \
- [ -d expect ] || mkdir expect; \
+.PHONY: maybe-install-info-target-libjava install-info-target-libjava
+maybe-install-info-target-libjava:
+@if target-libjava
+maybe-install-info-target-libjava: install-info-target-libjava
+
+install-info-target-libjava: \
+ configure-target-libjava \
+ info-target-libjava
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in expect; \
- cd expect || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/expect"; \
- libsrcdir="$$s/expect";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/expect"; \
- libsrcdir="$$s/expect";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
|| exit 1
-.PHONY: all-expect maybe-all-expect
-maybe-all-expect:
-all-expect: configure-expect
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+@endif target-libjava
-.PHONY: check-expect maybe-check-expect
-maybe-check-expect:
+.PHONY: maybe-install-html-target-libjava install-html-target-libjava
+maybe-install-html-target-libjava:
+@if target-libjava
+maybe-install-html-target-libjava: install-html-target-libjava
-check-expect:
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-libjava: \
+ configure-target-libjava \
+ html-target-libjava
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-libjava
-.PHONY: install-expect maybe-install-expect
-maybe-install-expect:
+.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava
+maybe-installcheck-target-libjava:
+@if target-libjava
+maybe-installcheck-target-libjava: installcheck-target-libjava
-install-expect: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+installcheck-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; \
- $(SET_LIB_PATH) \
- (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
+ || exit 1
+@endif target-libjava
-.PHONY: configure-guile maybe-configure-guile
-maybe-configure-guile:
-configure-guile:
- @test ! -f guile/Makefile || exit 0; \
- [ -d guile ] || mkdir guile; \
+.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava
+maybe-mostlyclean-target-libjava:
+@if target-libjava
+maybe-mostlyclean-target-libjava: mostlyclean-target-libjava
+
+mostlyclean-target-libjava:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in guile; \
- cd guile || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/guile"; \
- libsrcdir="$$s/guile";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/guile"; \
- libsrcdir="$$s/guile";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
|| exit 1
-.PHONY: all-guile maybe-all-guile
-maybe-all-guile:
-all-guile: configure-guile
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+@endif target-libjava
-.PHONY: check-guile maybe-check-guile
-maybe-check-guile:
+.PHONY: maybe-clean-target-libjava clean-target-libjava
+maybe-clean-target-libjava:
+@if target-libjava
+maybe-clean-target-libjava: clean-target-libjava
-check-guile:
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-libjava:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-libjava
-.PHONY: install-guile maybe-install-guile
-maybe-install-guile:
+.PHONY: maybe-distclean-target-libjava distclean-target-libjava
+maybe-distclean-target-libjava:
+@if target-libjava
+maybe-distclean-target-libjava: distclean-target-libjava
-install-guile: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+distclean-target-libjava:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
+@endif target-libjava
-.PHONY: configure-tk maybe-configure-tk
-maybe-configure-tk:
-configure-tk:
- @test ! -f tk/Makefile || exit 0; \
- [ -d tk ] || mkdir tk; \
+.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava
+maybe-maintainer-clean-target-libjava:
+@if target-libjava
+maybe-maintainer-clean-target-libjava: maintainer-clean-target-libjava
+
+maintainer-clean-target-libjava:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in tk; \
- cd tk || exit 1; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libjava
+
+
+
+
+
+.PHONY: configure-target-zlib maybe-configure-target-zlib
+maybe-configure-target-zlib:
+@if target-zlib
+maybe-configure-target-zlib: configure-target-zlib
+configure-target-zlib:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for zlib..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/zlib/Makefile; \
+ mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/zlib; \
+ cd "$(TARGET_SUBDIR)/zlib" || exit 1; \
case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/tk"; \
- libsrcdir="$$s/tk";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/tk"; \
- libsrcdir="$$s/tk";; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ srcdiroption="--srcdir=$${topdir}/zlib"; \
+ libsrcdir="$$s/zlib"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-zlib
-.PHONY: all-tk maybe-all-tk
-maybe-all-tk:
-all-tk: configure-tk
+
+
+
+
+.PHONY: all-target-zlib maybe-all-target-zlib
+maybe-all-target-zlib:
+@if target-zlib
+TARGET-target-zlib=all
+maybe-all-target-zlib: all-target-zlib
+all-target-zlib: configure-target-zlib
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-zlib))
+@endif target-zlib
-.PHONY: check-tk maybe-check-tk
-maybe-check-tk:
-check-tk:
+
+
+
+.PHONY: check-target-zlib maybe-check-target-zlib
+maybe-check-target-zlib:
+@if target-zlib
+maybe-check-target-zlib: check-target-zlib
+
+check-target-zlib:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-zlib
-.PHONY: install-tk maybe-install-tk
-maybe-install-tk:
+.PHONY: install-target-zlib maybe-install-target-zlib
+maybe-install-target-zlib:
+@if target-zlib
+maybe-install-target-zlib: install-target-zlib
-install-tk: installdirs
+install-target-zlib: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-zlib
+
+# Other targets (info, dvi, etc.)
+.PHONY: maybe-info-target-zlib info-target-zlib
+maybe-info-target-zlib:
+@if target-zlib
+maybe-info-target-zlib: info-target-zlib
-.PHONY: configure-tix maybe-configure-tix
-maybe-configure-tix:
-configure-tix:
- @test ! -f tix/Makefile || exit 0; \
- [ -d tix ] || mkdir tix; \
+info-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in tix; \
- cd tix || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/tix"; \
- libsrcdir="$$s/tix";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/tix"; \
- libsrcdir="$$s/tix";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-tix maybe-all-tix
-maybe-all-tix:
-all-tix: configure-tix
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+@endif target-zlib
-.PHONY: check-tix maybe-check-tix
-maybe-check-tix:
+.PHONY: maybe-dvi-target-zlib dvi-target-zlib
+maybe-dvi-target-zlib:
+@if target-zlib
+maybe-dvi-target-zlib: dvi-target-zlib
-check-tix:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-zlib
-.PHONY: install-tix maybe-install-tix
-maybe-install-tix:
+.PHONY: maybe-html-target-zlib html-target-zlib
+maybe-html-target-zlib:
+@if target-zlib
+maybe-html-target-zlib: html-target-zlib
-install-tix: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-zlib
-.PHONY: configure-libtermcap maybe-configure-libtermcap
-maybe-configure-libtermcap:
-configure-libtermcap:
- @test ! -f libtermcap/Makefile || exit 0; \
- [ -d libtermcap ] || mkdir libtermcap; \
+.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib
+maybe-TAGS-target-zlib:
+@if target-zlib
+maybe-TAGS-target-zlib: TAGS-target-zlib
+
+TAGS-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; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in libtermcap; \
- cd libtermcap || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/libtermcap"; \
- libsrcdir="$$s/libtermcap";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/libtermcap"; \
- libsrcdir="$$s/libtermcap";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-libtermcap maybe-all-libtermcap
-maybe-all-libtermcap:
-all-libtermcap: configure-libtermcap
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-zlib
+
+.PHONY: maybe-install-info-target-zlib install-info-target-zlib
+maybe-install-info-target-zlib:
+@if target-zlib
+maybe-install-info-target-zlib: install-info-target-zlib
+
+install-info-target-zlib: \
+ configure-target-zlib \
+ info-target-zlib
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
-.PHONY: check-libtermcap maybe-check-libtermcap
-maybe-check-libtermcap:
+@endif target-zlib
-check-libtermcap:
+.PHONY: maybe-install-html-target-zlib install-html-target-zlib
+maybe-install-html-target-zlib:
+@if target-zlib
+maybe-install-html-target-zlib: install-html-target-zlib
+install-html-target-zlib: \
+ configure-target-zlib \
+ html-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-html 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-html) \
+ || exit 1
-.PHONY: install-libtermcap maybe-install-libtermcap
-maybe-install-libtermcap:
+@endif target-zlib
-install-libtermcap: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib
+maybe-installcheck-target-zlib:
+@if target-zlib
+maybe-installcheck-target-zlib: installcheck-target-zlib
+
+installcheck-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; \
- $(SET_LIB_PATH) \
- (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
+ || exit 1
+@endif target-zlib
-.PHONY: configure-utils maybe-configure-utils
-maybe-configure-utils:
-configure-utils:
- @test ! -f utils/Makefile || exit 0; \
- [ -d utils ] || mkdir utils; \
+.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib
+maybe-mostlyclean-target-zlib:
+@if target-zlib
+maybe-mostlyclean-target-zlib: mostlyclean-target-zlib
+
+mostlyclean-target-zlib:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in utils; \
- cd utils || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/utils"; \
- libsrcdir="$$s/utils";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/utils"; \
- libsrcdir="$$s/utils";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
|| exit 1
-.PHONY: all-utils maybe-all-utils
-maybe-all-utils:
-all-utils: configure-utils
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-zlib
+
+.PHONY: maybe-clean-target-zlib clean-target-zlib
+maybe-clean-target-zlib:
+@if target-zlib
+maybe-clean-target-zlib: clean-target-zlib
+
+clean-target-zlib:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd utils && $(MAKE) $(FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
-.PHONY: check-utils maybe-check-utils
-maybe-check-utils:
+@endif target-zlib
-check-utils:
+.PHONY: maybe-distclean-target-zlib distclean-target-zlib
+maybe-distclean-target-zlib:
+@if target-zlib
+maybe-distclean-target-zlib: distclean-target-zlib
+distclean-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 distclean 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}" \
+ distclean) \
+ || exit 1
-.PHONY: install-utils maybe-install-utils
-maybe-install-utils:
+@endif target-zlib
-install-utils: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib
+maybe-maintainer-clean-target-zlib:
+@if target-zlib
+maybe-maintainer-clean-target-zlib: maintainer-clean-target-zlib
+
+maintainer-clean-target-zlib:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd utils && $(MAKE) $(FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+@endif target-zlib
-# ---------------------------------------
-# Modules which run on the target machine
-# ---------------------------------------
-.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3
-maybe-configure-target-libstdc++-v3:
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
- rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
-configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
- r=`${PWD_COMMAND}`; export r; \
+.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc
+maybe-configure-target-boehm-gc:
+@if target-boehm-gc
+maybe-configure-target-boehm-gc: configure-target-boehm-gc
+configure-target-boehm-gc:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
- CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \
- cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \
+ echo "Checking multilib configuration for boehm-gc..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/boehm-gc/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/boehm-gc/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/boehm-gc/multilib.tmp $(TARGET_SUBDIR)/boehm-gc/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/boehm-gc/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile; \
+ mv $(TARGET_SUBDIR)/boehm-gc/multilib.tmp $(TARGET_SUBDIR)/boehm-gc/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/boehm-gc/multilib.tmp $(TARGET_SUBDIR)/boehm-gc/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \
+ cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \
case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/boehm-gc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
- libsrcdir="$$s/libstdc++-v3"; \
+ srcdiroption="--srcdir=$${topdir}/boehm-gc"; \
+ libsrcdir="$$s/boehm-gc"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-boehm-gc
-.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3
-maybe-all-target-libstdc++-v3:
-all-target-libstdc++-v3: configure-target-libstdc++-v3
+
+
+
+
+.PHONY: all-target-boehm-gc maybe-all-target-boehm-gc
+maybe-all-target-boehm-gc:
+@if target-boehm-gc
+TARGET-target-boehm-gc=all
+maybe-all-target-boehm-gc: all-target-boehm-gc
+all-target-boehm-gc: configure-target-boehm-gc
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-boehm-gc))
+@endif target-boehm-gc
-.PHONY: check-target-libstdc++-v3 maybe-check-target-libstdc++-v3
-maybe-check-target-libstdc++-v3:
-check-target-libstdc++-v3:
+
+
+
+.PHONY: check-target-boehm-gc maybe-check-target-boehm-gc
+maybe-check-target-boehm-gc:
+@if target-boehm-gc
+maybe-check-target-boehm-gc: check-target-boehm-gc
+
+check-target-boehm-gc:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-boehm-gc
-.PHONY: install-target-libstdc++-v3 maybe-install-target-libstdc++-v3
-maybe-install-target-libstdc++-v3:
+.PHONY: install-target-boehm-gc maybe-install-target-boehm-gc
+maybe-install-target-boehm-gc:
+@if target-boehm-gc
+maybe-install-target-boehm-gc: install-target-boehm-gc
-install-target-libstdc++-v3: installdirs
+install-target-boehm-gc: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-boehm-gc
-.PHONY: configure-target-newlib maybe-configure-target-newlib
-maybe-configure-target-newlib:
+# Other targets (info, dvi, etc.)
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
- rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out
+.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc
+maybe-info-target-boehm-gc:
+@if target-boehm-gc
+maybe-info-target-boehm-gc: info-target-boehm-gc
-configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out
- @test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
+info-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; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/newlib; \
- cd "$(TARGET_SUBDIR)/newlib" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/newlib"; \
- libsrcdir="$$s/newlib"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-target-newlib maybe-all-target-newlib
-maybe-all-target-newlib:
-all-target-newlib: configure-target-newlib
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+@endif target-boehm-gc
-.PHONY: check-target-newlib maybe-check-target-newlib
-maybe-check-target-newlib:
+.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc
+maybe-dvi-target-boehm-gc:
+@if target-boehm-gc
+maybe-dvi-target-boehm-gc: dvi-target-boehm-gc
-check-target-newlib:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-boehm-gc
-.PHONY: install-target-newlib maybe-install-target-newlib
-maybe-install-target-newlib:
+.PHONY: maybe-html-target-boehm-gc html-target-boehm-gc
+maybe-html-target-boehm-gc:
+@if target-boehm-gc
+maybe-html-target-boehm-gc: html-target-boehm-gc
-install-target-newlib: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
-.PHONY: configure-target-libf2c maybe-configure-target-libf2c
-maybe-configure-target-libf2c:
+@endif target-boehm-gc
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \
- rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out
+.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc
+maybe-TAGS-target-boehm-gc:
+@if target-boehm-gc
+maybe-TAGS-target-boehm-gc: TAGS-target-boehm-gc
-configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libf2c; \
- cd "$(TARGET_SUBDIR)/libf2c" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/libf2c"; \
- libsrcdir="$$s/libf2c"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-target-libf2c maybe-all-target-libf2c
-maybe-all-target-libf2c:
-all-target-libf2c: configure-target-libf2c
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libf2c && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+@endif target-boehm-gc
-.PHONY: check-target-libf2c maybe-check-target-libf2c
-maybe-check-target-libf2c:
+.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc
+maybe-install-info-target-boehm-gc:
+@if target-boehm-gc
+maybe-install-info-target-boehm-gc: install-info-target-boehm-gc
-check-target-libf2c:
- @r=`${PWD_COMMAND}`; export r; \
+install-info-target-boehm-gc: \
+ configure-target-boehm-gc \
+ info-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libf2c && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
+@endif target-boehm-gc
-.PHONY: install-target-libf2c maybe-install-target-libf2c
-maybe-install-target-libf2c:
+.PHONY: maybe-install-html-target-boehm-gc install-html-target-boehm-gc
+maybe-install-html-target-boehm-gc:
+@if target-boehm-gc
+maybe-install-html-target-boehm-gc: install-html-target-boehm-gc
-install-target-libf2c: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+install-html-target-boehm-gc: \
+ configure-target-boehm-gc \
+ html-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libf2c && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
+ || exit 1
+@endif target-boehm-gc
-.PHONY: configure-target-libobjc maybe-configure-target-libobjc
-maybe-configure-target-libobjc:
+.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc
+maybe-installcheck-target-boehm-gc:
+@if target-boehm-gc
+maybe-installcheck-target-boehm-gc: installcheck-target-boehm-gc
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
- rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out
+installcheck-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 installcheck 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}" \
+ installcheck) \
+ || exit 1
-configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
+@endif target-boehm-gc
+
+.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc
+maybe-mostlyclean-target-boehm-gc:
+@if target-boehm-gc
+maybe-mostlyclean-target-boehm-gc: mostlyclean-target-boehm-gc
+
+mostlyclean-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; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libobjc; \
- cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/libobjc"; \
- libsrcdir="$$s/libobjc"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
|| exit 1
-.PHONY: all-target-libobjc maybe-all-target-libobjc
-maybe-all-target-libobjc:
-all-target-libobjc: configure-target-libobjc
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-boehm-gc
+
+.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc
+maybe-clean-target-boehm-gc:
+@if target-boehm-gc
+maybe-clean-target-boehm-gc: clean-target-boehm-gc
+
+clean-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libobjc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
-.PHONY: check-target-libobjc maybe-check-target-libobjc
-maybe-check-target-libobjc:
+@endif target-boehm-gc
-check-target-libobjc:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc
+maybe-distclean-target-boehm-gc:
+@if target-boehm-gc
+maybe-distclean-target-boehm-gc: distclean-target-boehm-gc
+
+distclean-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libobjc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
+@endif target-boehm-gc
-.PHONY: install-target-libobjc maybe-install-target-libobjc
-maybe-install-target-libobjc:
+.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc
+maybe-maintainer-clean-target-boehm-gc:
+@if target-boehm-gc
+maybe-maintainer-clean-target-boehm-gc: maintainer-clean-target-boehm-gc
-install-target-libobjc: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+maintainer-clean-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libobjc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+@endif target-boehm-gc
-.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap
-maybe-configure-target-libtermcap:
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \
- rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out
-configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \
- r=`${PWD_COMMAND}`; export r; \
+
+
+.PHONY: configure-target-qthreads maybe-configure-target-qthreads
+maybe-configure-target-qthreads:
+@if target-qthreads
+maybe-configure-target-qthreads: configure-target-qthreads
+configure-target-qthreads:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libtermcap; \
- cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- if [ "$(srcdir)" = "." ] ; then \
- if [ "$(TARGET_SUBDIR)" != "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/libtermcap "no-such-file" ; then \
- if [ -f Makefile ]; then \
- if $(MAKE) distclean; then \
- true; \
- else \
- exit 1; \
- fi; \
- else \
- true; \
- fi; \
- else \
- exit 1; \
- fi; \
+ echo "Checking multilib configuration for qthreads..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/qthreads/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/qthreads/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/qthreads/multilib.tmp $(TARGET_SUBDIR)/qthreads/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/qthreads/multilib.tmp; \
else \
- true; \
+ rm -f $(TARGET_SUBDIR)/qthreads/Makefile; \
+ mv $(TARGET_SUBDIR)/qthreads/multilib.tmp $(TARGET_SUBDIR)/qthreads/multilib.out; \
fi; \
- srcdiroption="--srcdir=."; \
- libsrcdir="."; \
else \
- srcdiroption="--srcdir=$${topdir}/libtermcap"; \
- libsrcdir="$$s/libtermcap"; \
+ mv $(TARGET_SUBDIR)/qthreads/multilib.tmp $(TARGET_SUBDIR)/qthreads/multilib.out; \
fi; \
+ test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/qthreads; \
+ cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/qthreads/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/qthreads"; \
+ libsrcdir="$$s/qthreads"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-qthreads
-.PHONY: all-target-libtermcap maybe-all-target-libtermcap
-maybe-all-target-libtermcap:
-all-target-libtermcap: configure-target-libtermcap
+
+
+
+
+.PHONY: all-target-qthreads maybe-all-target-qthreads
+maybe-all-target-qthreads:
+@if target-qthreads
+TARGET-target-qthreads=all
+maybe-all-target-qthreads: all-target-qthreads
+all-target-qthreads: configure-target-qthreads
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libtermcap && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-qthreads))
+@endif target-qthreads
-.PHONY: check-target-libtermcap maybe-check-target-libtermcap
-maybe-check-target-libtermcap:
-# Dummy target for uncheckable module.
-check-target-libtermcap:
-.PHONY: install-target-libtermcap maybe-install-target-libtermcap
-maybe-install-target-libtermcap:
-install-target-libtermcap: installdirs
+.PHONY: check-target-qthreads maybe-check-target-qthreads
+maybe-check-target-qthreads:
+@if target-qthreads
+maybe-check-target-qthreads: check-target-qthreads
+
+check-target-qthreads:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libtermcap && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-qthreads
-.PHONY: configure-target-winsup maybe-configure-target-winsup
-maybe-configure-target-winsup:
+.PHONY: install-target-qthreads maybe-install-target-qthreads
+maybe-install-target-qthreads:
+@if target-qthreads
+maybe-install-target-qthreads: install-target-qthreads
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \
- rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out
+install-target-qthreads: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out
- @test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \
+@endif target-qthreads
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-qthreads info-target-qthreads
+maybe-info-target-qthreads:
+@if target-qthreads
+maybe-info-target-qthreads: info-target-qthreads
+
+info-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; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/winsup; \
- cd "$(TARGET_SUBDIR)/winsup" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/winsup"; \
- libsrcdir="$$s/winsup"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-target-winsup maybe-all-target-winsup
-maybe-all-target-winsup:
-all-target-winsup: configure-target-winsup
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-qthreads
+
+.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads
+maybe-dvi-target-qthreads:
+@if target-qthreads
+maybe-dvi-target-qthreads: dvi-target-qthreads
+
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/winsup && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
-.PHONY: check-target-winsup maybe-check-target-winsup
-maybe-check-target-winsup:
+@endif target-qthreads
-check-target-winsup:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-html-target-qthreads html-target-qthreads
+maybe-html-target-qthreads:
+@if target-qthreads
+maybe-html-target-qthreads: html-target-qthreads
+
+html-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/winsup && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-qthreads
-.PHONY: install-target-winsup maybe-install-target-winsup
-maybe-install-target-winsup:
+.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads
+maybe-TAGS-target-qthreads:
+@if target-qthreads
+maybe-TAGS-target-qthreads: TAGS-target-qthreads
-install-target-winsup: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/winsup && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
+ || exit 1
+@endif target-qthreads
-.PHONY: configure-target-libgloss maybe-configure-target-libgloss
-maybe-configure-target-libgloss:
+.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads
+maybe-install-info-target-qthreads:
+@if target-qthreads
+maybe-install-info-target-qthreads: install-info-target-qthreads
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \
- rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out
+install-info-target-qthreads: \
+ configure-target-qthreads \
+ info-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-info 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-info) \
+ || exit 1
-configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \
+@endif target-qthreads
+
+.PHONY: maybe-install-html-target-qthreads install-html-target-qthreads
+maybe-install-html-target-qthreads:
+@if target-qthreads
+maybe-install-html-target-qthreads: install-html-target-qthreads
+
+install-html-target-qthreads: \
+ configure-target-qthreads \
+ html-target-qthreads
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libgloss; \
- cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/libgloss"; \
- libsrcdir="$$s/libgloss"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
|| exit 1
-.PHONY: all-target-libgloss maybe-all-target-libgloss
-maybe-all-target-libgloss:
-all-target-libgloss: configure-target-libgloss
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-qthreads
+
+.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads
+maybe-installcheck-target-qthreads:
+@if target-qthreads
+maybe-installcheck-target-qthreads: installcheck-target-qthreads
+
+installcheck-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libgloss && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
+ || exit 1
-.PHONY: check-target-libgloss maybe-check-target-libgloss
-maybe-check-target-libgloss:
+@endif target-qthreads
-# Dummy target for uncheckable module.
-check-target-libgloss:
+.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads
+maybe-mostlyclean-target-qthreads:
+@if target-qthreads
+maybe-mostlyclean-target-qthreads: mostlyclean-target-qthreads
+
+mostlyclean-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 mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+@endif target-qthreads
-.PHONY: install-target-libgloss maybe-install-target-libgloss
-maybe-install-target-libgloss:
+.PHONY: maybe-clean-target-qthreads clean-target-qthreads
+maybe-clean-target-qthreads:
+@if target-qthreads
+maybe-clean-target-qthreads: clean-target-qthreads
-install-target-libgloss: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-qthreads:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libgloss && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-qthreads
-.PHONY: configure-target-libiberty maybe-configure-target-libiberty
-maybe-configure-target-libiberty:
+.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads
+maybe-distclean-target-qthreads:
+@if target-qthreads
+maybe-distclean-target-qthreads: distclean-target-qthreads
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
- rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out
+distclean-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 distclean 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}" \
+ distclean) \
+ || exit 1
-configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
+@endif target-qthreads
+
+.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads
+maybe-maintainer-clean-target-qthreads:
+@if target-qthreads
+maybe-maintainer-clean-target-qthreads: maintainer-clean-target-qthreads
+
+maintainer-clean-target-qthreads:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libiberty; \
- cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-qthreads
+
+
+
+
+
+.PHONY: configure-target-rda maybe-configure-target-rda
+maybe-configure-target-rda:
+@if target-rda
+maybe-configure-target-rda: configure-target-rda
+configure-target-rda:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for rda..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/rda/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/rda/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/rda/multilib.tmp $(TARGET_SUBDIR)/rda/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/rda/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/rda/Makefile; \
+ mv $(TARGET_SUBDIR)/rda/multilib.tmp $(TARGET_SUBDIR)/rda/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/rda/multilib.tmp $(TARGET_SUBDIR)/rda/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/rda; \
+ cd "$(TARGET_SUBDIR)/rda" || exit 1; \
case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/rda/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
+ srcdiroption="--srcdir=$${topdir}/rda"; \
+ libsrcdir="$$s/rda"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-rda
-.PHONY: all-target-libiberty maybe-all-target-libiberty
-maybe-all-target-libiberty:
-all-target-libiberty: configure-target-libiberty
+
+
+
+
+.PHONY: all-target-rda maybe-all-target-rda
+maybe-all-target-rda:
+@if target-rda
+TARGET-target-rda=all
+maybe-all-target-rda: all-target-rda
+all-target-rda: configure-target-rda
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-rda))
+@endif target-rda
-.PHONY: check-target-libiberty maybe-check-target-libiberty
-maybe-check-target-libiberty:
-check-target-libiberty:
+
+
+
+.PHONY: check-target-rda maybe-check-target-rda
+maybe-check-target-rda:
+@if target-rda
+maybe-check-target-rda: check-target-rda
+
+check-target-rda:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-rda
-.PHONY: install-target-libiberty maybe-install-target-libiberty
-maybe-install-target-libiberty:
+.PHONY: install-target-rda maybe-install-target-rda
+maybe-install-target-rda:
+@if target-rda
+maybe-install-target-rda: install-target-rda
-install-target-libiberty: installdirs
+install-target-rda: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libiberty && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-rda
-.PHONY: configure-target-gperf maybe-configure-target-gperf
-maybe-configure-target-gperf:
+# Other targets (info, dvi, etc.)
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \
- rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out
+.PHONY: maybe-info-target-rda info-target-rda
+maybe-info-target-rda:
+@if target-rda
+maybe-info-target-rda: info-target-rda
-configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out
- @test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \
+info-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; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/gperf; \
- cd "$(TARGET_SUBDIR)/gperf" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/gperf"; \
- libsrcdir="$$s/gperf"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-target-gperf maybe-all-target-gperf
-maybe-all-target-gperf:
-all-target-gperf: configure-target-gperf
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/gperf && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+@endif target-rda
-.PHONY: check-target-gperf maybe-check-target-gperf
-maybe-check-target-gperf:
+.PHONY: maybe-dvi-target-rda dvi-target-rda
+maybe-dvi-target-rda:
+@if target-rda
+maybe-dvi-target-rda: dvi-target-rda
-check-target-gperf:
- @r=`${PWD_COMMAND}`; export r; \
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/gperf && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
+@endif target-rda
-.PHONY: install-target-gperf maybe-install-target-gperf
-maybe-install-target-gperf:
+.PHONY: maybe-html-target-rda html-target-rda
+maybe-html-target-rda:
+@if target-rda
+maybe-html-target-rda: html-target-rda
-install-target-gperf: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+html-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/gperf && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
-.PHONY: configure-target-examples maybe-configure-target-examples
-maybe-configure-target-examples:
+@endif target-rda
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/examples/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \
- rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out
+.PHONY: maybe-TAGS-target-rda TAGS-target-rda
+maybe-TAGS-target-rda:
+@if target-rda
+maybe-TAGS-target-rda: TAGS-target-rda
-configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out
- @test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/examples; \
- cd "$(TARGET_SUBDIR)/examples" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/examples"; \
- libsrcdir="$$s/examples"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
|| exit 1
-.PHONY: all-target-examples maybe-all-target-examples
-maybe-all-target-examples:
-all-target-examples: configure-target-examples
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-rda
+
+.PHONY: maybe-install-info-target-rda install-info-target-rda
+maybe-install-info-target-rda:
+@if target-rda
+maybe-install-info-target-rda: install-info-target-rda
+
+install-info-target-rda: \
+ configure-target-rda \
+ info-target-rda
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/examples && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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-info) \
+ || exit 1
-.PHONY: check-target-examples maybe-check-target-examples
-maybe-check-target-examples:
+@endif target-rda
-# Dummy target for uncheckable module.
-check-target-examples:
+.PHONY: maybe-install-html-target-rda install-html-target-rda
+maybe-install-html-target-rda:
+@if target-rda
+maybe-install-html-target-rda: install-html-target-rda
+install-html-target-rda: \
+ configure-target-rda \
+ html-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-html 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-html) \
+ || exit 1
-.PHONY: install-target-examples maybe-install-target-examples
-maybe-install-target-examples:
+@endif target-rda
-# Dummy target for uninstallable.
-install-target-examples:
+.PHONY: maybe-installcheck-target-rda installcheck-target-rda
+maybe-installcheck-target-rda:
+@if target-rda
+maybe-installcheck-target-rda: installcheck-target-rda
+installcheck-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 installcheck 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}" \
+ installcheck) \
+ || exit 1
-.PHONY: configure-target-libffi maybe-configure-target-libffi
-maybe-configure-target-libffi:
+@endif target-rda
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \
- rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out
+.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda
+maybe-mostlyclean-target-rda:
+@if target-rda
+maybe-mostlyclean-target-rda: mostlyclean-target-rda
-configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \
+mostlyclean-target-rda:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libffi; \
- cd "$(TARGET_SUBDIR)/libffi" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/libffi"; \
- libsrcdir="$$s/libffi"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
|| exit 1
-.PHONY: all-target-libffi maybe-all-target-libffi
-maybe-all-target-libffi:
-all-target-libffi: configure-target-libffi
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-rda
+
+.PHONY: maybe-clean-target-rda clean-target-rda
+maybe-clean-target-rda:
+@if target-rda
+maybe-clean-target-rda: clean-target-rda
+
+clean-target-rda:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libffi && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
-.PHONY: check-target-libffi maybe-check-target-libffi
-maybe-check-target-libffi:
+@endif target-rda
-check-target-libffi:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-distclean-target-rda distclean-target-rda
+maybe-distclean-target-rda:
+@if target-rda
+maybe-distclean-target-rda: distclean-target-rda
+
+distclean-target-rda:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libffi && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
+@endif target-rda
-.PHONY: install-target-libffi maybe-install-target-libffi
-maybe-install-target-libffi:
+.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda
+maybe-maintainer-clean-target-rda:
+@if target-rda
+maybe-maintainer-clean-target-rda: maintainer-clean-target-rda
-install-target-libffi: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+maintainer-clean-target-rda:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libffi && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+@endif target-rda
-.PHONY: configure-target-libjava maybe-configure-target-libjava
-maybe-configure-target-libjava:
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \
- rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out
-configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \
- r=`${PWD_COMMAND}`; export r; \
+
+
+.PHONY: configure-target-libada maybe-configure-target-libada
+maybe-configure-target-libada:
+@if target-libada
+maybe-configure-target-libada: configure-target-libada
+configure-target-libada:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
- CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libjava; \
- cd "$(TARGET_SUBDIR)/libjava" || exit 1; \
+ echo "Checking multilib configuration for libada..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libada/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libada/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libada/multilib.tmp $(TARGET_SUBDIR)/libada/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libada/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libada/Makefile; \
+ mv $(TARGET_SUBDIR)/libada/multilib.tmp $(TARGET_SUBDIR)/libada/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libada/multilib.tmp $(TARGET_SUBDIR)/libada/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libada/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libada; \
+ cd "$(TARGET_SUBDIR)/libada" || exit 1; \
case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libada/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libjava"; \
- libsrcdir="$$s/libjava"; \
+ srcdiroption="--srcdir=$${topdir}/libada"; \
+ libsrcdir="$$s/libada"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libada
-.PHONY: all-target-libjava maybe-all-target-libjava
-maybe-all-target-libjava:
-all-target-libjava: configure-target-libjava
+
+
+
+
+.PHONY: all-target-libada maybe-all-target-libada
+maybe-all-target-libada:
+@if target-libada
+TARGET-target-libada=all
+maybe-all-target-libada: all-target-libada
+all-target-libada: configure-target-libada
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libjava && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libada && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libada))
+@endif target-libada
-.PHONY: check-target-libjava maybe-check-target-libjava
-maybe-check-target-libjava:
-check-target-libjava:
+
+
+
+.PHONY: check-target-libada maybe-check-target-libada
+maybe-check-target-libada:
+@if target-libada
+maybe-check-target-libada: check-target-libada
+
+check-target-libada:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libjava && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libada && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libada
-.PHONY: install-target-libjava maybe-install-target-libjava
-maybe-install-target-libjava:
+.PHONY: install-target-libada maybe-install-target-libada
+maybe-install-target-libada:
+@if target-libada
+maybe-install-target-libada: install-target-libada
-install-target-libjava: installdirs
+install-target-libada: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libjava && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libada && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libada
-.PHONY: configure-target-zlib maybe-configure-target-zlib
-maybe-configure-target-zlib:
+# Other targets (info, dvi, etc.)
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \
- rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out
+.PHONY: maybe-info-target-libada info-target-libada
+maybe-info-target-libada:
+@if target-libada
+maybe-info-target-libada: info-target-libada
-configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out
- @test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \
+info-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; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/zlib; \
- cd "$(TARGET_SUBDIR)/zlib" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- if [ "$(srcdir)" = "." ] ; then \
- if [ "$(TARGET_SUBDIR)" != "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/zlib "no-such-file" ; then \
- if [ -f Makefile ]; then \
- if $(MAKE) distclean; then \
- true; \
- else \
- exit 1; \
- fi; \
- else \
- true; \
- fi; \
- else \
- exit 1; \
- fi; \
- else \
- true; \
- fi; \
- srcdiroption="--srcdir=."; \
- libsrcdir="."; \
- else \
- srcdiroption="--srcdir=$${topdir}/zlib"; \
- libsrcdir="$$s/zlib"; \
- fi; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-target-zlib maybe-all-target-zlib
-maybe-all-target-zlib:
-all-target-zlib: configure-target-zlib
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libada
+
+.PHONY: maybe-dvi-target-libada dvi-target-libada
+maybe-dvi-target-libada:
+@if target-libada
+maybe-dvi-target-libada: dvi-target-libada
+
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/zlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
-.PHONY: check-target-zlib maybe-check-target-zlib
-maybe-check-target-zlib:
+@endif target-libada
-check-target-zlib:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-html-target-libada html-target-libada
+maybe-html-target-libada:
+@if target-libada
+maybe-html-target-libada: html-target-libada
+
+html-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/zlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libada
-.PHONY: install-target-zlib maybe-install-target-zlib
-maybe-install-target-zlib:
+.PHONY: maybe-TAGS-target-libada TAGS-target-libada
+maybe-TAGS-target-libada:
+@if target-libada
+maybe-TAGS-target-libada: TAGS-target-libada
-install-target-zlib: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/zlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
+ || exit 1
+@endif target-libada
-.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc
-maybe-configure-target-boehm-gc:
+.PHONY: maybe-install-info-target-libada install-info-target-libada
+maybe-install-info-target-libada:
+@if target-libada
+maybe-install-info-target-libada: install-info-target-libada
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \
- rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out
+install-info-target-libada: \
+ configure-target-libada \
+ info-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-info 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-info) \
+ || exit 1
-configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out
- @test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \
+@endif target-libada
+
+.PHONY: maybe-install-html-target-libada install-html-target-libada
+maybe-install-html-target-libada:
+@if target-libada
+maybe-install-html-target-libada: install-html-target-libada
+
+install-html-target-libada: \
+ configure-target-libada \
+ html-target-libada
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \
- cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/boehm-gc"; \
- libsrcdir="$$s/boehm-gc"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
|| exit 1
-.PHONY: all-target-boehm-gc maybe-all-target-boehm-gc
-maybe-all-target-boehm-gc:
-all-target-boehm-gc: configure-target-boehm-gc
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libada
+
+.PHONY: maybe-installcheck-target-libada installcheck-target-libada
+maybe-installcheck-target-libada:
+@if target-libada
+maybe-installcheck-target-libada: installcheck-target-libada
+
+installcheck-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
+ || exit 1
-.PHONY: check-target-boehm-gc maybe-check-target-boehm-gc
-maybe-check-target-boehm-gc:
+@endif target-libada
-check-target-boehm-gc:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-mostlyclean-target-libada mostlyclean-target-libada
+maybe-mostlyclean-target-libada:
+@if target-libada
+maybe-mostlyclean-target-libada: mostlyclean-target-libada
+
+mostlyclean-target-libada:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+@endif target-libada
-.PHONY: install-target-boehm-gc maybe-install-target-boehm-gc
-maybe-install-target-boehm-gc:
+.PHONY: maybe-clean-target-libada clean-target-libada
+maybe-clean-target-libada:
+@if target-libada
+maybe-clean-target-libada: clean-target-libada
-install-target-boehm-gc: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-libada:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/boehm-gc && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-libada
-.PHONY: configure-target-qthreads maybe-configure-target-qthreads
-maybe-configure-target-qthreads:
+.PHONY: maybe-distclean-target-libada distclean-target-libada
+maybe-distclean-target-libada:
+@if target-libada
+maybe-distclean-target-libada: distclean-target-libada
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \
- rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out
+distclean-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 distclean 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}" \
+ distclean) \
+ || exit 1
-configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out
- @test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \
+@endif target-libada
+
+.PHONY: maybe-maintainer-clean-target-libada maintainer-clean-target-libada
+maybe-maintainer-clean-target-libada:
+@if target-libada
+maybe-maintainer-clean-target-libada: maintainer-clean-target-libada
+
+maintainer-clean-target-libada:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/qthreads; \
- cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libada
+
+
+
+
+
+.PHONY: configure-target-libgomp maybe-configure-target-libgomp
+maybe-configure-target-libgomp:
+@if target-libgomp
+maybe-configure-target-libgomp: configure-target-libgomp
+configure-target-libgomp:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libgomp..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgomp/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgomp/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgomp/Makefile; \
+ mv $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgomp/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libgomp; \
+ cd "$(TARGET_SUBDIR)/libgomp" || exit 1; \
case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgomp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/qthreads"; \
- libsrcdir="$$s/qthreads"; \
+ srcdiroption="--srcdir=$${topdir}/libgomp"; \
+ libsrcdir="$$s/libgomp"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
+@endif target-libgomp
-.PHONY: all-target-qthreads maybe-all-target-qthreads
-maybe-all-target-qthreads:
-all-target-qthreads: configure-target-qthreads
+
+
+
+
+.PHONY: all-target-libgomp maybe-all-target-libgomp
+maybe-all-target-libgomp:
+@if target-libgomp
+TARGET-target-libgomp=all
+maybe-all-target-libgomp: all-target-libgomp
+all-target-libgomp: configure-target-libgomp
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/qthreads && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgomp && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgomp))
+@endif target-libgomp
-.PHONY: check-target-qthreads maybe-check-target-qthreads
-maybe-check-target-qthreads:
-check-target-qthreads:
+
+
+
+.PHONY: check-target-libgomp maybe-check-target-libgomp
+maybe-check-target-libgomp:
+@if target-libgomp
+maybe-check-target-libgomp: check-target-libgomp
+
+check-target-libgomp:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/qthreads && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgomp && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+@endif target-libgomp
-.PHONY: install-target-qthreads maybe-install-target-qthreads
-maybe-install-target-qthreads:
+.PHONY: install-target-libgomp maybe-install-target-libgomp
+maybe-install-target-libgomp:
+@if target-libgomp
+maybe-install-target-libgomp: install-target-libgomp
-install-target-qthreads: installdirs
+install-target-libgomp: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/qthreads && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgomp && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+@endif target-libgomp
-.PHONY: configure-target-rda maybe-configure-target-rda
-maybe-configure-target-rda:
+# Other targets (info, dvi, etc.)
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/rda/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \
- rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out
+.PHONY: maybe-info-target-libgomp info-target-libgomp
+maybe-info-target-libgomp:
+@if target-libgomp
+maybe-info-target-libgomp: info-target-libgomp
-configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out
- @test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \
+info-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; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/rda; \
- cd "$(TARGET_SUBDIR)/rda" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/rda"; \
- libsrcdir="$$s/rda"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info 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}" \
+ info) \
|| exit 1
-.PHONY: all-target-rda maybe-all-target-rda
-maybe-all-target-rda:
-all-target-rda: configure-target-rda
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libgomp
+
+.PHONY: maybe-dvi-target-libgomp dvi-target-libgomp
+maybe-dvi-target-libgomp:
+@if target-libgomp
+maybe-dvi-target-libgomp: dvi-target-libgomp
+
+dvi-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/rda && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi 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}" \
+ dvi) \
+ || exit 1
-.PHONY: check-target-rda maybe-check-target-rda
-maybe-check-target-rda:
+@endif target-libgomp
-check-target-rda:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-html-target-libgomp html-target-libgomp
+maybe-html-target-libgomp:
+@if target-libgomp
+maybe-html-target-libgomp: html-target-libgomp
+
+html-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/rda && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html 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}" \
+ html) \
+ || exit 1
+@endif target-libgomp
-.PHONY: install-target-rda maybe-install-target-rda
-maybe-install-target-rda:
+.PHONY: maybe-TAGS-target-libgomp TAGS-target-libgomp
+maybe-TAGS-target-libgomp:
+@if target-libgomp
+maybe-TAGS-target-libgomp: TAGS-target-libgomp
-install-target-rda: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+TAGS-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/rda && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
+ || exit 1
+@endif target-libgomp
-.PHONY: configure-target-libada maybe-configure-target-libada
-maybe-configure-target-libada:
+.PHONY: maybe-install-info-target-libgomp install-info-target-libgomp
+maybe-install-info-target-libgomp:
+@if target-libgomp
+maybe-install-info-target-libgomp: install-info-target-libgomp
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libada/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \
- rm -f $(TARGET_SUBDIR)/libada/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/libada/multilib.out
+install-info-target-libgomp: \
+ configure-target-libgomp \
+ info-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-info 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-info) \
+ || exit 1
-configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out
- @test ! -f $(TARGET_SUBDIR)/libada/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \
+@endif target-libgomp
+
+.PHONY: maybe-install-html-target-libgomp install-html-target-libgomp
+maybe-install-html-target-libgomp:
+@if target-libgomp
+maybe-install-html-target-libgomp: install-html-target-libgomp
+
+install-html-target-libgomp: \
+ configure-target-libgomp \
+ html-target-libgomp
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_TARGET)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/libada; \
- cd "$(TARGET_SUBDIR)/libada" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/libada"; \
- libsrcdir="$$s/libada"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html 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-html) \
|| exit 1
-.PHONY: all-target-libada maybe-all-target-libada
-maybe-all-target-libada:
-all-target-libada: configure-target-libada
- @r=`${PWD_COMMAND}`; export r; \
+@endif target-libgomp
+
+.PHONY: maybe-installcheck-target-libgomp installcheck-target-libgomp
+maybe-installcheck-target-libgomp:
+@if target-libgomp
+maybe-installcheck-target-libgomp: installcheck-target-libgomp
+
+installcheck-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; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libada && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
+ || exit 1
-.PHONY: check-target-libada maybe-check-target-libada
-maybe-check-target-libada:
+@endif target-libgomp
-check-target-libada:
- @r=`${PWD_COMMAND}`; export r; \
+.PHONY: maybe-mostlyclean-target-libgomp mostlyclean-target-libgomp
+maybe-mostlyclean-target-libgomp:
+@if target-libgomp
+maybe-mostlyclean-target-libgomp: mostlyclean-target-libgomp
+
+mostlyclean-target-libgomp:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libada && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+@endif target-libgomp
-.PHONY: install-target-libada maybe-install-target-libada
-maybe-install-target-libada:
+.PHONY: maybe-clean-target-libgomp clean-target-libgomp
+maybe-clean-target-libgomp:
+@if target-libgomp
+maybe-clean-target-libgomp: clean-target-libgomp
-install-target-libada: installdirs
- @r=`${PWD_COMMAND}`; export r; \
+clean-target-libgomp:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/libada && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+@endif target-libgomp
+.PHONY: maybe-distclean-target-libgomp distclean-target-libgomp
+maybe-distclean-target-libgomp:
+@if target-libgomp
+maybe-distclean-target-libgomp: distclean-target-libgomp
-# ----------
-# GCC module
-# ----------
+distclean-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 distclean 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}" \
+ distclean) \
+ || exit 1
-# Unfortunately, while gcc _should_ be a host module,
-# libgcc is a target module, and gen* programs are
-# build modules. So GCC is a sort of hybrid.
+@endif target-libgomp
-# gcc is the only module which uses GCC_FLAGS_TO_PASS.
-# Don't use shared host config.cache, as it will confuse later
-# directories; GCC wants slightly different values for some
-# precious variables. *sigh*
-.PHONY: configure-gcc maybe-configure-gcc
-maybe-configure-gcc:
-configure-gcc:
- @test ! -f gcc/Makefile || exit 0; \
- [ -d gcc ] || mkdir gcc; \
+.PHONY: maybe-maintainer-clean-target-libgomp maintainer-clean-target-libgomp
+maybe-maintainer-clean-target-libgomp:
+@if target-libgomp
+maybe-maintainer-clean-target-libgomp: maintainer-clean-target-libgomp
+
+maintainer-clean-target-libgomp:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in gcc; \
- cd gcc || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
|| exit 1
-# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
-# causes trouble. This wart will be fixed eventually by moving
-# the bootstrap behavior to this file.
-.PHONY: all-gcc maybe-all-gcc
-maybe-all-gcc:
-all-gcc: configure-gcc
- @if [ -f gcc/stage_last ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
- else \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
- fi
+@endif target-libgomp
+
+
+
+# ----------
+# GCC module
+# ----------
+
+@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.
-# Building GCC uses some tools for rebuilding "source" files
-# like texinfo, bison/byacc, etc. So we must depend on those.
-#
-# While building GCC, it may be necessary to run various target
-# programs like the assembler, linker, etc. So we depend on
-# those too.
-#
-# In theory, on an SMP all those dependencies can be resolved
-# in parallel.
-#
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-bootstrap configure-gcc
+$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(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; \
@@ -23712,64 +39027,51 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
msg="Comparing stage2 and stage3 of the compiler"; \
compare=compare ;; \
esac; \
- $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "$$msg"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- $(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-profiledbootstrap: all-bootstrap configure-gcc
+profiledbootstrap: all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Bootstrapping the compiler"; \
+ $(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; \
- $(SET_LIB_PATH) \
- echo "Building runtime libraries and training compiler"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
- @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(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-texinfo all-bison all-byacc all-binutils all-gas all-ld
+cross: all-build all-gas all-ld
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "Building the C and C++ compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- $(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
- LANGUAGES="c c++" all
-
-.PHONY: check-gcc maybe-check-gcc
-maybe-check-gcc:
-check-gcc:
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
- else \
- true; \
- fi
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
+@endif gcc-no-bootstrap
+@if gcc
.PHONY: check-gcc-c++
check-gcc-c++:
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
else \
true; \
@@ -23778,18 +39080,6 @@ check-gcc-c++:
.PHONY: check-c++
check-c++: check-target-libstdc++-v3 check-gcc-c++
-.PHONY: install-gcc maybe-install-gcc
-maybe-install-gcc:
-install-gcc:
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
- else \
- true; \
- fi
-
# Install the gcc headers files, but not the fixed include files,
# which Cygnus is not allowed to distribute. This rule is very
# dependent on the workings of the gcc Makefile.in.
@@ -23804,134 +39094,1985 @@ gcc-no-fixedincludes:
rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ./gcc && \
$(MAKE) $(GCC_FLAGS_TO_PASS) install); \
rm -rf gcc/include; \
mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi
+@endif gcc
+
+# ---------------------
+# GCC bootstrap support
+# ---------------------
+
+# We track the current stage (the one in 'gcc') in the stage_current file.
+# stage_last instead tracks the stage that was built last. These targets
+# are dummy when toplevel bootstrap is not active.
+
+# While making host and target tools, symlinks to the final stage must be
+# there, so $(unstage) should be run at various points. To avoid excessive
+# recursive invocations of make, we "inline" them using a variable. These
+# must be referenced as ": $(MAKE) ; $(unstage)" rather than "$(unstage)"
+# to avoid warnings from the GNU Make job server.
+
+unstage = :
+stage = :
+current_stage = ""
+
+@if gcc-bootstrap
+unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start
+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
+
+.PHONY: unstage stage
+unstage:
+ @: $(MAKE); $(unstage)
+stage:
+ @: $(MAKE); $(stage)
+
+# Disable commands for lean bootstrap.
+LEAN = false
+
+# We name the build directories for the various stages "stage1-gcc",
+# "stage2-gcc","stage3-gcc", etc.
+
+# Since the 'compare' process will fail (on debugging information) if any
+# directory names are different, we need to link the gcc directory for
+# the previous stage to a constant name ('prev-gcc'), and to make the name of
+# the build directories constant as well. For the latter, we use naked names
+# like 'gcc', because the scripts in that directory assume it. We use
+# mv on platforms where symlinks to directories do not work or are not
+# reliable.
+
+# '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
+
+stage1-start::
+ @: $(MAKE); $(stage); \
+ echo stage1 > stage_current ; \
+ echo stage1 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+@if bfd
+ @cd $(HOST_SUBDIR); [ -d stage1-bfd ] || \
+ mkdir stage1-bfd; \
+ mv stage1-bfd bfd
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); [ -d stage1-opcodes ] || \
+ mkdir stage1-opcodes; \
+ mv stage1-opcodes opcodes
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); [ -d stage1-binutils ] || \
+ mkdir stage1-binutils; \
+ mv stage1-binutils binutils
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); [ -d stage1-gas ] || \
+ mkdir stage1-gas; \
+ mv stage1-gas gas
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); [ -d stage1-gcc ] || \
+ mkdir stage1-gcc; \
+ mv stage1-gcc gcc
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); [ -d stage1-intl ] || \
+ mkdir stage1-intl; \
+ mv stage1-intl intl
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); [ -d stage1-ld ] || \
+ mkdir stage1-ld; \
+ mv stage1-ld ld
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); [ -d stage1-libcpp ] || \
+ mkdir stage1-libcpp; \
+ mv stage1-libcpp libcpp
+@endif libcpp
+@if libdecnumber
+ @cd $(HOST_SUBDIR); [ -d stage1-libdecnumber ] || \
+ mkdir stage1-libdecnumber; \
+ mv stage1-libdecnumber libdecnumber
+@endif libdecnumber
+@if libiberty
+ @cd $(HOST_SUBDIR); [ -d stage1-libiberty ] || \
+ mkdir stage1-libiberty; \
+ mv stage1-libiberty libiberty
+@endif libiberty
+@if zlib
+ @cd $(HOST_SUBDIR); [ -d stage1-zlib ] || \
+ mkdir stage1-zlib; \
+ mv stage1-zlib zlib
+@endif zlib
+ @[ -d stage1-$(TARGET_SUBDIR) ] || \
+ mkdir stage1-$(TARGET_SUBDIR); \
+ mv stage1-$(TARGET_SUBDIR) $(TARGET_SUBDIR)
+
+stage1-end::
+@if bfd
+ @if test -d $(HOST_SUBDIR)/bfd ; then \
+ cd $(HOST_SUBDIR); mv bfd stage1-bfd ; \
+ fi
+@endif bfd
+@if opcodes
+ @if test -d $(HOST_SUBDIR)/opcodes ; then \
+ cd $(HOST_SUBDIR); mv opcodes stage1-opcodes ; \
+ fi
+@endif opcodes
+@if binutils
+ @if test -d $(HOST_SUBDIR)/binutils ; then \
+ cd $(HOST_SUBDIR); mv binutils stage1-binutils ; \
+ fi
+@endif binutils
+@if gas
+ @if test -d $(HOST_SUBDIR)/gas ; then \
+ cd $(HOST_SUBDIR); mv gas stage1-gas ; \
+ fi
+@endif gas
+@if gcc
+ @if test -d $(HOST_SUBDIR)/gcc ; then \
+ cd $(HOST_SUBDIR); mv gcc stage1-gcc ; \
+ fi
+@endif gcc
+@if intl
+ @if test -d $(HOST_SUBDIR)/intl ; then \
+ cd $(HOST_SUBDIR); mv intl stage1-intl ; \
+ fi
+@endif intl
+@if ld
+ @if test -d $(HOST_SUBDIR)/ld ; then \
+ cd $(HOST_SUBDIR); mv ld stage1-ld ; \
+ fi
+@endif ld
+@if libcpp
+ @if test -d $(HOST_SUBDIR)/libcpp ; then \
+ cd $(HOST_SUBDIR); mv libcpp stage1-libcpp ; \
+ fi
+@endif libcpp
+@if libdecnumber
+ @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stage1-libdecnumber ; \
+ fi
+@endif libdecnumber
+@if libiberty
+ @if test -d $(HOST_SUBDIR)/libiberty ; then \
+ cd $(HOST_SUBDIR); mv libiberty stage1-libiberty ; \
+ fi
+@endif libiberty
+@if zlib
+ @if test -d $(HOST_SUBDIR)/zlib ; then \
+ cd $(HOST_SUBDIR); mv zlib stage1-zlib ; \
+ fi
+@endif zlib
+ @if test -d $(TARGET_SUBDIR) ; then \
+ mv $(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; \
+ fi
+ rm -f stage_current
+
+# Bubble a bugfix 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
+stage1-bubble::
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage1-lean ; then \
+ echo Skipping rebuild of stage1 ; \
+ else \
+ $(MAKE) stage1-start; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage1; \
+ fi
+
+.PHONY: all-stage1 clean-stage1
+do-clean: clean-stage1
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+
+.PHONY: distclean-stage1
+distclean-stage1::
+ @: $(MAKE); $(stage)
+ rm -rf stage1-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage2-start stage2-end
+
+stage2-start::
+ @: $(MAKE); $(stage); \
+ echo stage2 > stage_current ; \
+ echo stage2 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+@if bfd
+ @cd $(HOST_SUBDIR); [ -d stage2-bfd ] || \
+ mkdir stage2-bfd; \
+ mv stage2-bfd bfd ; \
+ mv stage1-bfd prev-bfd || test -f stage1-lean
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); [ -d stage2-opcodes ] || \
+ mkdir stage2-opcodes; \
+ mv stage2-opcodes opcodes ; \
+ mv stage1-opcodes prev-opcodes || test -f stage1-lean
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); [ -d stage2-binutils ] || \
+ mkdir stage2-binutils; \
+ mv stage2-binutils binutils ; \
+ mv stage1-binutils prev-binutils || test -f stage1-lean
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); [ -d stage2-gas ] || \
+ mkdir stage2-gas; \
+ mv stage2-gas gas ; \
+ mv stage1-gas prev-gas || test -f stage1-lean
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); [ -d stage2-gcc ] || \
+ mkdir stage2-gcc; \
+ mv stage2-gcc gcc ; \
+ mv stage1-gcc prev-gcc || test -f stage1-lean
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); [ -d stage2-intl ] || \
+ mkdir stage2-intl; \
+ mv stage2-intl intl ; \
+ mv stage1-intl prev-intl || test -f stage1-lean
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); [ -d stage2-ld ] || \
+ mkdir stage2-ld; \
+ mv stage2-ld ld ; \
+ mv stage1-ld prev-ld || test -f stage1-lean
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); [ -d stage2-libcpp ] || \
+ mkdir stage2-libcpp; \
+ mv stage2-libcpp libcpp ; \
+ mv stage1-libcpp prev-libcpp || test -f stage1-lean
+@endif libcpp
+@if libdecnumber
+ @cd $(HOST_SUBDIR); [ -d stage2-libdecnumber ] || \
+ mkdir stage2-libdecnumber; \
+ mv stage2-libdecnumber libdecnumber ; \
+ mv stage1-libdecnumber prev-libdecnumber || test -f stage1-lean
+@endif libdecnumber
+@if libiberty
+ @cd $(HOST_SUBDIR); [ -d stage2-libiberty ] || \
+ mkdir stage2-libiberty; \
+ mv stage2-libiberty libiberty ; \
+ mv stage1-libiberty prev-libiberty || test -f stage1-lean
+@endif libiberty
+@if zlib
+ @cd $(HOST_SUBDIR); [ -d stage2-zlib ] || \
+ mkdir stage2-zlib; \
+ mv stage2-zlib zlib ; \
+ mv stage1-zlib prev-zlib || test -f stage1-lean
+@endif zlib
+ @[ -d stage2-$(TARGET_SUBDIR) ] || \
+ mkdir stage2-$(TARGET_SUBDIR); \
+ mv stage2-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stage1-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage1-lean
+
+stage2-end::
+@if bfd
+ @if test -d $(HOST_SUBDIR)/bfd ; then \
+ cd $(HOST_SUBDIR); mv bfd stage2-bfd ; \
+ mv prev-bfd stage1-bfd ; : ; \
+ fi
+@endif bfd
+@if opcodes
+ @if test -d $(HOST_SUBDIR)/opcodes ; then \
+ cd $(HOST_SUBDIR); mv opcodes stage2-opcodes ; \
+ mv prev-opcodes stage1-opcodes ; : ; \
+ fi
+@endif opcodes
+@if binutils
+ @if test -d $(HOST_SUBDIR)/binutils ; then \
+ cd $(HOST_SUBDIR); mv binutils stage2-binutils ; \
+ mv prev-binutils stage1-binutils ; : ; \
+ fi
+@endif binutils
+@if gas
+ @if test -d $(HOST_SUBDIR)/gas ; then \
+ cd $(HOST_SUBDIR); mv gas stage2-gas ; \
+ mv prev-gas stage1-gas ; : ; \
+ fi
+@endif gas
+@if gcc
+ @if test -d $(HOST_SUBDIR)/gcc ; then \
+ cd $(HOST_SUBDIR); mv gcc stage2-gcc ; \
+ mv prev-gcc stage1-gcc ; : ; \
+ fi
+@endif gcc
+@if intl
+ @if test -d $(HOST_SUBDIR)/intl ; then \
+ cd $(HOST_SUBDIR); mv intl stage2-intl ; \
+ mv prev-intl stage1-intl ; : ; \
+ fi
+@endif intl
+@if ld
+ @if test -d $(HOST_SUBDIR)/ld ; then \
+ cd $(HOST_SUBDIR); mv ld stage2-ld ; \
+ mv prev-ld stage1-ld ; : ; \
+ fi
+@endif ld
+@if libcpp
+ @if test -d $(HOST_SUBDIR)/libcpp ; then \
+ cd $(HOST_SUBDIR); mv libcpp stage2-libcpp ; \
+ mv prev-libcpp stage1-libcpp ; : ; \
+ fi
+@endif libcpp
+@if libdecnumber
+ @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stage2-libdecnumber ; \
+ mv prev-libdecnumber stage1-libdecnumber ; : ; \
+ fi
+@endif libdecnumber
+@if libiberty
+ @if test -d $(HOST_SUBDIR)/libiberty ; then \
+ cd $(HOST_SUBDIR); mv libiberty stage2-libiberty ; \
+ mv prev-libiberty stage1-libiberty ; : ; \
+ fi
+@endif libiberty
+@if zlib
+ @if test -d $(HOST_SUBDIR)/zlib ; then \
+ cd $(HOST_SUBDIR); mv zlib stage2-zlib ; \
+ mv prev-zlib stage1-zlib ; : ; \
+ fi
+@endif zlib
+ @if test -d $(TARGET_SUBDIR) ; then \
+ mv $(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; \
+ mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; : ; \
+ fi
+ rm -f stage_current
+
+# Bubble a bugfix 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
+stage2-bubble:: stage1-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage2-lean || test -f stage1-lean ; then \
+ echo Skipping rebuild of stage2 ; \
+ else \
+ $(MAKE) stage2-start; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage2; \
+ fi
+
+.PHONY: all-stage2 clean-stage2
+do-clean: clean-stage2
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+
+
+.PHONY: bootstrap2 bootstrap2-lean
+bootstrap2:
+ echo stage2 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage2-bubble
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+
+bootstrap2-lean:
+ echo stage2 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage2-bubble
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage1:: distclean-stage2
+.PHONY: distclean-stage2
+distclean-stage2::
+ @: $(MAKE); $(stage)
+ rm -rf stage2-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage3-start stage3-end
+
+stage3-start::
+ @: $(MAKE); $(stage); \
+ echo stage3 > stage_current ; \
+ echo stage3 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+@if bfd
+ @cd $(HOST_SUBDIR); [ -d stage3-bfd ] || \
+ mkdir stage3-bfd; \
+ mv stage3-bfd bfd ; \
+ mv stage2-bfd prev-bfd || test -f stage2-lean
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); [ -d stage3-opcodes ] || \
+ mkdir stage3-opcodes; \
+ mv stage3-opcodes opcodes ; \
+ mv stage2-opcodes prev-opcodes || test -f stage2-lean
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); [ -d stage3-binutils ] || \
+ mkdir stage3-binutils; \
+ mv stage3-binutils binutils ; \
+ mv stage2-binutils prev-binutils || test -f stage2-lean
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); [ -d stage3-gas ] || \
+ mkdir stage3-gas; \
+ mv stage3-gas gas ; \
+ mv stage2-gas prev-gas || test -f stage2-lean
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); [ -d stage3-gcc ] || \
+ mkdir stage3-gcc; \
+ mv stage3-gcc gcc ; \
+ mv stage2-gcc prev-gcc || test -f stage2-lean
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); [ -d stage3-intl ] || \
+ mkdir stage3-intl; \
+ mv stage3-intl intl ; \
+ mv stage2-intl prev-intl || test -f stage2-lean
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); [ -d stage3-ld ] || \
+ mkdir stage3-ld; \
+ mv stage3-ld ld ; \
+ mv stage2-ld prev-ld || test -f stage2-lean
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); [ -d stage3-libcpp ] || \
+ mkdir stage3-libcpp; \
+ mv stage3-libcpp libcpp ; \
+ mv stage2-libcpp prev-libcpp || test -f stage2-lean
+@endif libcpp
+@if libdecnumber
+ @cd $(HOST_SUBDIR); [ -d stage3-libdecnumber ] || \
+ mkdir stage3-libdecnumber; \
+ mv stage3-libdecnumber libdecnumber ; \
+ mv stage2-libdecnumber prev-libdecnumber || test -f stage2-lean
+@endif libdecnumber
+@if libiberty
+ @cd $(HOST_SUBDIR); [ -d stage3-libiberty ] || \
+ mkdir stage3-libiberty; \
+ mv stage3-libiberty libiberty ; \
+ mv stage2-libiberty prev-libiberty || test -f stage2-lean
+@endif libiberty
+@if zlib
+ @cd $(HOST_SUBDIR); [ -d stage3-zlib ] || \
+ mkdir stage3-zlib; \
+ mv stage3-zlib zlib ; \
+ mv stage2-zlib prev-zlib || test -f stage2-lean
+@endif zlib
+ @[ -d stage3-$(TARGET_SUBDIR) ] || \
+ mkdir stage3-$(TARGET_SUBDIR); \
+ mv stage3-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stage2-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage2-lean
+
+stage3-end::
+@if bfd
+ @if test -d $(HOST_SUBDIR)/bfd ; then \
+ cd $(HOST_SUBDIR); mv bfd stage3-bfd ; \
+ mv prev-bfd stage2-bfd ; : ; \
+ fi
+@endif bfd
+@if opcodes
+ @if test -d $(HOST_SUBDIR)/opcodes ; then \
+ cd $(HOST_SUBDIR); mv opcodes stage3-opcodes ; \
+ mv prev-opcodes stage2-opcodes ; : ; \
+ fi
+@endif opcodes
+@if binutils
+ @if test -d $(HOST_SUBDIR)/binutils ; then \
+ cd $(HOST_SUBDIR); mv binutils stage3-binutils ; \
+ mv prev-binutils stage2-binutils ; : ; \
+ fi
+@endif binutils
+@if gas
+ @if test -d $(HOST_SUBDIR)/gas ; then \
+ cd $(HOST_SUBDIR); mv gas stage3-gas ; \
+ mv prev-gas stage2-gas ; : ; \
+ fi
+@endif gas
+@if gcc
+ @if test -d $(HOST_SUBDIR)/gcc ; then \
+ cd $(HOST_SUBDIR); mv gcc stage3-gcc ; \
+ mv prev-gcc stage2-gcc ; : ; \
+ fi
+@endif gcc
+@if intl
+ @if test -d $(HOST_SUBDIR)/intl ; then \
+ cd $(HOST_SUBDIR); mv intl stage3-intl ; \
+ mv prev-intl stage2-intl ; : ; \
+ fi
+@endif intl
+@if ld
+ @if test -d $(HOST_SUBDIR)/ld ; then \
+ cd $(HOST_SUBDIR); mv ld stage3-ld ; \
+ mv prev-ld stage2-ld ; : ; \
+ fi
+@endif ld
+@if libcpp
+ @if test -d $(HOST_SUBDIR)/libcpp ; then \
+ cd $(HOST_SUBDIR); mv libcpp stage3-libcpp ; \
+ mv prev-libcpp stage2-libcpp ; : ; \
+ fi
+@endif libcpp
+@if libdecnumber
+ @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stage3-libdecnumber ; \
+ mv prev-libdecnumber stage2-libdecnumber ; : ; \
+ fi
+@endif libdecnumber
+@if libiberty
+ @if test -d $(HOST_SUBDIR)/libiberty ; then \
+ cd $(HOST_SUBDIR); mv libiberty stage3-libiberty ; \
+ mv prev-libiberty stage2-libiberty ; : ; \
+ fi
+@endif libiberty
+@if zlib
+ @if test -d $(HOST_SUBDIR)/zlib ; then \
+ cd $(HOST_SUBDIR); mv zlib stage3-zlib ; \
+ mv prev-zlib stage2-zlib ; : ; \
+ fi
+@endif zlib
+ @if test -d $(TARGET_SUBDIR) ; then \
+ mv $(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR) ; \
+ mv prev-$(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; : ; \
+ fi
+ rm -f stage_current
+
+# Bubble a bugfix 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
+stage3-bubble:: stage2-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage3-lean || test -f stage2-lean ; then \
+ echo Skipping rebuild of stage3 ; \
+ else \
+ $(MAKE) stage3-start; \
+ if $(LEAN); then \
+ rm -rf stage1-* ; \
+ $(STAMP) stage1-lean ; \
+ fi; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage3; \
+ fi
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare
+
+.PHONY: all-stage3 clean-stage3
+do-clean: clean-stage3
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+compare:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage2-lean; then \
+ echo Cannot compare object files as stage 2 was deleted. ; \
+ exit 0 ; \
+ fi; \
+ : $(MAKE); $(stage); \
+ rm -f .bad_compare ; \
+ echo Comparing stages 2 and 3 ; \
+ cd stage3-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \
+ cd .. ; \
+ for file in $${files} ; do \
+ f1=$$r/stage2-gcc/$$file; f2=$$r/stage3-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
+ if test $$? -eq 1; then \
+ case $$file in \
+ ./cc*-checksum$(objext) | ./libgcc/* ) \
+ echo warning: $$file differs ;; \
+ *) \
+ echo $$file differs >> .bad_compare ;; \
+ esac ; \
+ fi ; \
+ done ; \
+ if [ -f .bad_compare ]; then \
+ echo "Bootstrap comparison failure!"; \
+ cat .bad_compare; \
+ exit 1; \
+ else \
+ echo Comparison successful.; \
+ fi ; \
+ $(STAMP) compare
+ if $(LEAN); then \
+ rm -rf stage2-*; \
+ $(STAMP) stage2-lean; \
+ fi
+
+
+
+.PHONY: bootstrap bootstrap-lean
+bootstrap:
+ 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
+
+bootstrap-lean:
+ echo stage3 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: 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
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage2:: distclean-stage3
+.PHONY: distclean-stage3
+distclean-stage3::
+ @: $(MAKE); $(stage)
+ rm -rf stage3-* compare
+
+
+.PHONY: cleanstrap
+cleanstrap: distclean bootstrap
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage4-start stage4-end
+
+stage4-start::
+ @: $(MAKE); $(stage); \
+ echo stage4 > stage_current ; \
+ echo stage4 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+@if bfd
+ @cd $(HOST_SUBDIR); [ -d stage4-bfd ] || \
+ mkdir stage4-bfd; \
+ mv stage4-bfd bfd ; \
+ mv stage3-bfd prev-bfd || test -f stage3-lean
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); [ -d stage4-opcodes ] || \
+ mkdir stage4-opcodes; \
+ mv stage4-opcodes opcodes ; \
+ mv stage3-opcodes prev-opcodes || test -f stage3-lean
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); [ -d stage4-binutils ] || \
+ mkdir stage4-binutils; \
+ mv stage4-binutils binutils ; \
+ mv stage3-binutils prev-binutils || test -f stage3-lean
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); [ -d stage4-gas ] || \
+ mkdir stage4-gas; \
+ mv stage4-gas gas ; \
+ mv stage3-gas prev-gas || test -f stage3-lean
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); [ -d stage4-gcc ] || \
+ mkdir stage4-gcc; \
+ mv stage4-gcc gcc ; \
+ mv stage3-gcc prev-gcc || test -f stage3-lean
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); [ -d stage4-intl ] || \
+ mkdir stage4-intl; \
+ mv stage4-intl intl ; \
+ mv stage3-intl prev-intl || test -f stage3-lean
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); [ -d stage4-ld ] || \
+ mkdir stage4-ld; \
+ mv stage4-ld ld ; \
+ mv stage3-ld prev-ld || test -f stage3-lean
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); [ -d stage4-libcpp ] || \
+ mkdir stage4-libcpp; \
+ mv stage4-libcpp libcpp ; \
+ mv stage3-libcpp prev-libcpp || test -f stage3-lean
+@endif libcpp
+@if libdecnumber
+ @cd $(HOST_SUBDIR); [ -d stage4-libdecnumber ] || \
+ mkdir stage4-libdecnumber; \
+ mv stage4-libdecnumber libdecnumber ; \
+ mv stage3-libdecnumber prev-libdecnumber || test -f stage3-lean
+@endif libdecnumber
+@if libiberty
+ @cd $(HOST_SUBDIR); [ -d stage4-libiberty ] || \
+ mkdir stage4-libiberty; \
+ mv stage4-libiberty libiberty ; \
+ mv stage3-libiberty prev-libiberty || test -f stage3-lean
+@endif libiberty
+@if zlib
+ @cd $(HOST_SUBDIR); [ -d stage4-zlib ] || \
+ mkdir stage4-zlib; \
+ mv stage4-zlib zlib ; \
+ mv stage3-zlib prev-zlib || test -f stage3-lean
+@endif zlib
+ @[ -d stage4-$(TARGET_SUBDIR) ] || \
+ mkdir stage4-$(TARGET_SUBDIR); \
+ mv stage4-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stage3-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage3-lean
+
+stage4-end::
+@if bfd
+ @if test -d $(HOST_SUBDIR)/bfd ; then \
+ cd $(HOST_SUBDIR); mv bfd stage4-bfd ; \
+ mv prev-bfd stage3-bfd ; : ; \
+ fi
+@endif bfd
+@if opcodes
+ @if test -d $(HOST_SUBDIR)/opcodes ; then \
+ cd $(HOST_SUBDIR); mv opcodes stage4-opcodes ; \
+ mv prev-opcodes stage3-opcodes ; : ; \
+ fi
+@endif opcodes
+@if binutils
+ @if test -d $(HOST_SUBDIR)/binutils ; then \
+ cd $(HOST_SUBDIR); mv binutils stage4-binutils ; \
+ mv prev-binutils stage3-binutils ; : ; \
+ fi
+@endif binutils
+@if gas
+ @if test -d $(HOST_SUBDIR)/gas ; then \
+ cd $(HOST_SUBDIR); mv gas stage4-gas ; \
+ mv prev-gas stage3-gas ; : ; \
+ fi
+@endif gas
+@if gcc
+ @if test -d $(HOST_SUBDIR)/gcc ; then \
+ cd $(HOST_SUBDIR); mv gcc stage4-gcc ; \
+ mv prev-gcc stage3-gcc ; : ; \
+ fi
+@endif gcc
+@if intl
+ @if test -d $(HOST_SUBDIR)/intl ; then \
+ cd $(HOST_SUBDIR); mv intl stage4-intl ; \
+ mv prev-intl stage3-intl ; : ; \
+ fi
+@endif intl
+@if ld
+ @if test -d $(HOST_SUBDIR)/ld ; then \
+ cd $(HOST_SUBDIR); mv ld stage4-ld ; \
+ mv prev-ld stage3-ld ; : ; \
+ fi
+@endif ld
+@if libcpp
+ @if test -d $(HOST_SUBDIR)/libcpp ; then \
+ cd $(HOST_SUBDIR); mv libcpp stage4-libcpp ; \
+ mv prev-libcpp stage3-libcpp ; : ; \
+ fi
+@endif libcpp
+@if libdecnumber
+ @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stage4-libdecnumber ; \
+ mv prev-libdecnumber stage3-libdecnumber ; : ; \
+ fi
+@endif libdecnumber
+@if libiberty
+ @if test -d $(HOST_SUBDIR)/libiberty ; then \
+ cd $(HOST_SUBDIR); mv libiberty stage4-libiberty ; \
+ mv prev-libiberty stage3-libiberty ; : ; \
+ fi
+@endif libiberty
+@if zlib
+ @if test -d $(HOST_SUBDIR)/zlib ; then \
+ cd $(HOST_SUBDIR); mv zlib stage4-zlib ; \
+ mv prev-zlib stage3-zlib ; : ; \
+ fi
+@endif zlib
+ @if test -d $(TARGET_SUBDIR) ; then \
+ mv $(TARGET_SUBDIR) stage4-$(TARGET_SUBDIR) ; \
+ mv prev-$(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR) ; : ; \
+ fi
+ rm -f stage_current
+
+# Bubble a bugfix 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
+stage4-bubble:: stage3-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage4-lean || test -f stage3-lean ; then \
+ echo Skipping rebuild of stage4 ; \
+ else \
+ $(MAKE) stage4-start; \
+ if $(LEAN); then \
+ rm -rf stage2-* ; \
+ $(STAMP) stage2-lean ; \
+ fi; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage4; \
+ fi
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare3
+
+.PHONY: all-stage4 clean-stage4
+do-clean: clean-stage4
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+compare3:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage3-lean; then \
+ echo Cannot compare object files as stage 3 was deleted. ; \
+ exit 0 ; \
+ fi; \
+ : $(MAKE); $(stage); \
+ rm -f .bad_compare ; \
+ echo Comparing stages 3 and 4 ; \
+ cd stage4-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \
+ cd .. ; \
+ for file in $${files} ; do \
+ f1=$$r/stage3-gcc/$$file; f2=$$r/stage4-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
+ if test $$? -eq 1; then \
+ case $$file in \
+ ./cc*-checksum$(objext) | ./libgcc/* ) \
+ echo warning: $$file differs ;; \
+ *) \
+ echo $$file differs >> .bad_compare ;; \
+ esac ; \
+ fi ; \
+ done ; \
+ if [ -f .bad_compare ]; then \
+ echo "Bootstrap comparison failure!"; \
+ cat .bad_compare; \
+ exit 1; \
+ else \
+ echo Comparison successful.; \
+ fi ; \
+ $(STAMP) compare3
+ if $(LEAN); then \
+ rm -rf stage3-*; \
+ $(STAMP) stage3-lean; \
+ fi
+
+
+
+.PHONY: bootstrap4 bootstrap4-lean
+bootstrap4:
+ echo stage4 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage4-bubble
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+
+bootstrap4-lean:
+ echo stage4 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage4-bubble
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage3:: distclean-stage4
+.PHONY: distclean-stage4
+distclean-stage4::
+ @: $(MAKE); $(stage)
+ rm -rf stage4-* compare3
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stageprofile-start stageprofile-end
+
+stageprofile-start::
+ @: $(MAKE); $(stage); \
+ echo stageprofile > stage_current ; \
+ echo stageprofile > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+@if bfd
+ @cd $(HOST_SUBDIR); [ -d stageprofile-bfd ] || \
+ mkdir stageprofile-bfd; \
+ mv stageprofile-bfd bfd ; \
+ mv stage1-bfd prev-bfd || test -f stage1-lean
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); [ -d stageprofile-opcodes ] || \
+ mkdir stageprofile-opcodes; \
+ mv stageprofile-opcodes opcodes ; \
+ mv stage1-opcodes prev-opcodes || test -f stage1-lean
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); [ -d stageprofile-binutils ] || \
+ mkdir stageprofile-binutils; \
+ mv stageprofile-binutils binutils ; \
+ mv stage1-binutils prev-binutils || test -f stage1-lean
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); [ -d stageprofile-gas ] || \
+ mkdir stageprofile-gas; \
+ mv stageprofile-gas gas ; \
+ mv stage1-gas prev-gas || test -f stage1-lean
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); [ -d stageprofile-gcc ] || \
+ mkdir stageprofile-gcc; \
+ mv stageprofile-gcc gcc ; \
+ mv stage1-gcc prev-gcc || test -f stage1-lean
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); [ -d stageprofile-intl ] || \
+ mkdir stageprofile-intl; \
+ mv stageprofile-intl intl ; \
+ mv stage1-intl prev-intl || test -f stage1-lean
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); [ -d stageprofile-ld ] || \
+ mkdir stageprofile-ld; \
+ mv stageprofile-ld ld ; \
+ mv stage1-ld prev-ld || test -f stage1-lean
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); [ -d stageprofile-libcpp ] || \
+ mkdir stageprofile-libcpp; \
+ mv stageprofile-libcpp libcpp ; \
+ mv stage1-libcpp prev-libcpp || test -f stage1-lean
+@endif libcpp
+@if libdecnumber
+ @cd $(HOST_SUBDIR); [ -d stageprofile-libdecnumber ] || \
+ mkdir stageprofile-libdecnumber; \
+ mv stageprofile-libdecnumber libdecnumber ; \
+ mv stage1-libdecnumber prev-libdecnumber || test -f stage1-lean
+@endif libdecnumber
+@if libiberty
+ @cd $(HOST_SUBDIR); [ -d stageprofile-libiberty ] || \
+ mkdir stageprofile-libiberty; \
+ mv stageprofile-libiberty libiberty ; \
+ mv stage1-libiberty prev-libiberty || test -f stage1-lean
+@endif libiberty
+@if zlib
+ @cd $(HOST_SUBDIR); [ -d stageprofile-zlib ] || \
+ mkdir stageprofile-zlib; \
+ mv stageprofile-zlib zlib ; \
+ mv stage1-zlib prev-zlib || test -f stage1-lean
+@endif zlib
+ @[ -d stageprofile-$(TARGET_SUBDIR) ] || \
+ mkdir stageprofile-$(TARGET_SUBDIR); \
+ mv stageprofile-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stage1-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage1-lean
+
+stageprofile-end::
+@if bfd
+ @if test -d $(HOST_SUBDIR)/bfd ; then \
+ cd $(HOST_SUBDIR); mv bfd stageprofile-bfd ; \
+ mv prev-bfd stage1-bfd ; : ; \
+ fi
+@endif bfd
+@if opcodes
+ @if test -d $(HOST_SUBDIR)/opcodes ; then \
+ cd $(HOST_SUBDIR); mv opcodes stageprofile-opcodes ; \
+ mv prev-opcodes stage1-opcodes ; : ; \
+ fi
+@endif opcodes
+@if binutils
+ @if test -d $(HOST_SUBDIR)/binutils ; then \
+ cd $(HOST_SUBDIR); mv binutils stageprofile-binutils ; \
+ mv prev-binutils stage1-binutils ; : ; \
+ fi
+@endif binutils
+@if gas
+ @if test -d $(HOST_SUBDIR)/gas ; then \
+ cd $(HOST_SUBDIR); mv gas stageprofile-gas ; \
+ mv prev-gas stage1-gas ; : ; \
+ fi
+@endif gas
+@if gcc
+ @if test -d $(HOST_SUBDIR)/gcc ; then \
+ cd $(HOST_SUBDIR); mv gcc stageprofile-gcc ; \
+ mv prev-gcc stage1-gcc ; : ; \
+ fi
+@endif gcc
+@if intl
+ @if test -d $(HOST_SUBDIR)/intl ; then \
+ cd $(HOST_SUBDIR); mv intl stageprofile-intl ; \
+ mv prev-intl stage1-intl ; : ; \
+ fi
+@endif intl
+@if ld
+ @if test -d $(HOST_SUBDIR)/ld ; then \
+ cd $(HOST_SUBDIR); mv ld stageprofile-ld ; \
+ mv prev-ld stage1-ld ; : ; \
+ fi
+@endif ld
+@if libcpp
+ @if test -d $(HOST_SUBDIR)/libcpp ; then \
+ cd $(HOST_SUBDIR); mv libcpp stageprofile-libcpp ; \
+ mv prev-libcpp stage1-libcpp ; : ; \
+ fi
+@endif libcpp
+@if libdecnumber
+ @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stageprofile-libdecnumber ; \
+ mv prev-libdecnumber stage1-libdecnumber ; : ; \
+ fi
+@endif libdecnumber
+@if libiberty
+ @if test -d $(HOST_SUBDIR)/libiberty ; then \
+ cd $(HOST_SUBDIR); mv libiberty stageprofile-libiberty ; \
+ mv prev-libiberty stage1-libiberty ; : ; \
+ fi
+@endif libiberty
+@if zlib
+ @if test -d $(HOST_SUBDIR)/zlib ; then \
+ cd $(HOST_SUBDIR); mv zlib stageprofile-zlib ; \
+ mv prev-zlib stage1-zlib ; : ; \
+ fi
+@endif zlib
+ @if test -d $(TARGET_SUBDIR) ; then \
+ mv $(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR) ; \
+ mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; : ; \
+ fi
+ rm -f stage_current
+
+# Bubble a bugfix 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
+stageprofile-bubble:: stage1-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stageprofile-lean || test -f stage1-lean ; then \
+ echo Skipping rebuild of stageprofile ; \
+ else \
+ $(MAKE) stageprofile-start; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stageprofile; \
+ fi
+
+.PHONY: all-stageprofile clean-stageprofile
+do-clean: clean-stageprofile
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage1:: distclean-stageprofile
+.PHONY: distclean-stageprofile
+distclean-stageprofile::
+ @: $(MAKE); $(stage)
+ rm -rf stageprofile-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stagefeedback-start stagefeedback-end
+
+stagefeedback-start::
+ @: $(MAKE); $(stage); \
+ echo stagefeedback > stage_current ; \
+ echo stagefeedback > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+@if bfd
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-bfd ] || \
+ mkdir stagefeedback-bfd; \
+ mv stagefeedback-bfd bfd ; \
+ mv stageprofile-bfd prev-bfd || test -f stageprofile-lean
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-opcodes ] || \
+ mkdir stagefeedback-opcodes; \
+ mv stagefeedback-opcodes opcodes ; \
+ mv stageprofile-opcodes prev-opcodes || test -f stageprofile-lean
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-binutils ] || \
+ mkdir stagefeedback-binutils; \
+ mv stagefeedback-binutils binutils ; \
+ mv stageprofile-binutils prev-binutils || test -f stageprofile-lean
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-gas ] || \
+ mkdir stagefeedback-gas; \
+ mv stagefeedback-gas gas ; \
+ mv stageprofile-gas prev-gas || test -f stageprofile-lean
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-gcc ] || \
+ mkdir stagefeedback-gcc; \
+ mv stagefeedback-gcc gcc ; \
+ mv stageprofile-gcc prev-gcc || test -f stageprofile-lean
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-intl ] || \
+ mkdir stagefeedback-intl; \
+ mv stagefeedback-intl intl ; \
+ mv stageprofile-intl prev-intl || test -f stageprofile-lean
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-ld ] || \
+ mkdir stagefeedback-ld; \
+ mv stagefeedback-ld ld ; \
+ mv stageprofile-ld prev-ld || test -f stageprofile-lean
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-libcpp ] || \
+ mkdir stagefeedback-libcpp; \
+ mv stagefeedback-libcpp libcpp ; \
+ mv stageprofile-libcpp prev-libcpp || test -f stageprofile-lean
+@endif libcpp
+@if libdecnumber
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-libdecnumber ] || \
+ mkdir stagefeedback-libdecnumber; \
+ mv stagefeedback-libdecnumber libdecnumber ; \
+ mv stageprofile-libdecnumber prev-libdecnumber || test -f stageprofile-lean
+@endif libdecnumber
+@if libiberty
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-libiberty ] || \
+ mkdir stagefeedback-libiberty; \
+ mv stagefeedback-libiberty libiberty ; \
+ mv stageprofile-libiberty prev-libiberty || test -f stageprofile-lean
+@endif libiberty
+@if zlib
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-zlib ] || \
+ mkdir stagefeedback-zlib; \
+ mv stagefeedback-zlib zlib ; \
+ mv stageprofile-zlib prev-zlib || test -f stageprofile-lean
+@endif zlib
+ @[ -d stagefeedback-$(TARGET_SUBDIR) ] || \
+ mkdir stagefeedback-$(TARGET_SUBDIR); \
+ mv stagefeedback-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stageprofile-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stageprofile-lean
+
+stagefeedback-end::
+@if bfd
+ @if test -d $(HOST_SUBDIR)/bfd ; then \
+ cd $(HOST_SUBDIR); mv bfd stagefeedback-bfd ; \
+ mv prev-bfd stageprofile-bfd ; : ; \
+ fi
+@endif bfd
+@if opcodes
+ @if test -d $(HOST_SUBDIR)/opcodes ; then \
+ cd $(HOST_SUBDIR); mv opcodes stagefeedback-opcodes ; \
+ mv prev-opcodes stageprofile-opcodes ; : ; \
+ fi
+@endif opcodes
+@if binutils
+ @if test -d $(HOST_SUBDIR)/binutils ; then \
+ cd $(HOST_SUBDIR); mv binutils stagefeedback-binutils ; \
+ mv prev-binutils stageprofile-binutils ; : ; \
+ fi
+@endif binutils
+@if gas
+ @if test -d $(HOST_SUBDIR)/gas ; then \
+ cd $(HOST_SUBDIR); mv gas stagefeedback-gas ; \
+ mv prev-gas stageprofile-gas ; : ; \
+ fi
+@endif gas
+@if gcc
+ @if test -d $(HOST_SUBDIR)/gcc ; then \
+ cd $(HOST_SUBDIR); mv gcc stagefeedback-gcc ; \
+ mv prev-gcc stageprofile-gcc ; : ; \
+ fi
+@endif gcc
+@if intl
+ @if test -d $(HOST_SUBDIR)/intl ; then \
+ cd $(HOST_SUBDIR); mv intl stagefeedback-intl ; \
+ mv prev-intl stageprofile-intl ; : ; \
+ fi
+@endif intl
+@if ld
+ @if test -d $(HOST_SUBDIR)/ld ; then \
+ cd $(HOST_SUBDIR); mv ld stagefeedback-ld ; \
+ mv prev-ld stageprofile-ld ; : ; \
+ fi
+@endif ld
+@if libcpp
+ @if test -d $(HOST_SUBDIR)/libcpp ; then \
+ cd $(HOST_SUBDIR); mv libcpp stagefeedback-libcpp ; \
+ mv prev-libcpp stageprofile-libcpp ; : ; \
+ fi
+@endif libcpp
+@if libdecnumber
+ @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stagefeedback-libdecnumber ; \
+ mv prev-libdecnumber stageprofile-libdecnumber ; : ; \
+ fi
+@endif libdecnumber
+@if libiberty
+ @if test -d $(HOST_SUBDIR)/libiberty ; then \
+ cd $(HOST_SUBDIR); mv libiberty stagefeedback-libiberty ; \
+ mv prev-libiberty stageprofile-libiberty ; : ; \
+ fi
+@endif libiberty
+@if zlib
+ @if test -d $(HOST_SUBDIR)/zlib ; then \
+ cd $(HOST_SUBDIR); mv zlib stagefeedback-zlib ; \
+ mv prev-zlib stageprofile-zlib ; : ; \
+ fi
+@endif zlib
+ @if test -d $(TARGET_SUBDIR) ; then \
+ mv $(TARGET_SUBDIR) stagefeedback-$(TARGET_SUBDIR) ; \
+ mv prev-$(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR) ; : ; \
+ fi
+ rm -f stage_current
+
+# Bubble a bugfix 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
+stagefeedback-bubble:: stageprofile-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stagefeedback-lean || test -f stageprofile-lean ; then \
+ echo Skipping rebuild of stagefeedback ; \
+ else \
+ $(MAKE) stagefeedback-start; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stagefeedback; \
+ fi
+
+.PHONY: all-stagefeedback clean-stagefeedback
+do-clean: clean-stagefeedback
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+
+
+
+.PHONY: profiledbootstrap profiledbootstrap-lean
+profiledbootstrap:
+ echo stagefeedback > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stagefeedback-bubble
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+
+profiledbootstrap-lean:
+ echo stagefeedback > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stagefeedback-bubble
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stageprofile:: distclean-stagefeedback
+.PHONY: distclean-stagefeedback
+distclean-stagefeedback::
+ @: $(MAKE); $(stage)
+ rm -rf stagefeedback-*
+
+
+@endif gcc-bootstrap
+
+
+
+stageprofile-end::
+ $(MAKE) distclean-stagefeedback
+
+stagefeedback-start::
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ for i in prev-*; do \
+ j=`echo $$i | sed s/^prev-//` ; \
+ cd $$r/$$i && \
+ { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL) ; } && \
+ { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL) ; } ; \
+ done
+
+@if gcc-bootstrap
+do-distclean: distclean-stage1
+
+# Provide a GCC build when we're building target libraries. This does
+# 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
+
+.PHONY: restrap
+restrap:
+ @: $(MAKE); $(stage)
+ rm -rf stage1-$(TARGET_SUBDIR) stage2 stage3 stage4 stageprofile stagefeedback
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
# --------------------------------------
# Dependencies between different modules
# --------------------------------------
+# Generic dependencies for target modules on host stuff, especially gcc
+@if gcc-bootstrap
+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-target-libgfortran: stage_last
+configure-target-libobjc: stage_last
+configure-target-libtermcap: stage_last
+configure-target-winsup: stage_last
+configure-target-libgloss: stage_last
+configure-target-libiberty: stage_last
+configure-target-gperf: stage_last
+configure-target-examples: stage_last
+configure-target-libffi: stage_last
+configure-target-libjava: stage_last
+configure-target-zlib: stage_last
+configure-target-boehm-gc: stage_last
+configure-target-qthreads: stage_last
+configure-target-rda: stage_last
+configure-target-libada: stage_last
+configure-target-libgomp: stage_last
+@endif gcc-bootstrap
+
+@if gcc-no-bootstrap
+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-libgfortran: maybe-all-gcc
+configure-target-libobjc: maybe-all-gcc
+configure-target-libtermcap: maybe-all-gcc
+configure-target-winsup: maybe-all-gcc
+configure-target-libgloss: maybe-all-gcc
+configure-target-libiberty: maybe-all-gcc
+configure-target-gperf: maybe-all-gcc
+configure-target-examples: maybe-all-gcc
+configure-target-libffi: maybe-all-gcc
+configure-target-libjava: maybe-all-gcc
+configure-target-zlib: maybe-all-gcc
+configure-target-boehm-gc: maybe-all-gcc
+configure-target-qthreads: maybe-all-gcc
+configure-target-rda: maybe-all-gcc
+configure-target-libada: maybe-all-gcc
+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
# or find a substitute somewhere (perhaps installed). Soft dependencies
-# are specified by depending on a 'maybe-' target. If you're not sure,
+# are made here to depend on a 'maybe-' target. If you're not sure,
# it's safer to use a soft dependency.
-# Host modules specific to gcc.
-# GCC needs to identify certain tools.
-# GCC also needs the information exported by the intl configure script.
-configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
-all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
-# This is a slightly kludgy method of getting dependencies on
-# all-build-libiberty correct; it would be better to build it every time.
-all-gcc: maybe-all-build-libiberty
-all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
-# Host modules specific to gdb.
-# GDB needs to know that the simulator is being built.
-configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
-GDB_TK = @GDB_TK@
-all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
-install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
-configure-libgui: maybe-configure-tcl maybe-configure-tk
-all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
-# Host modules specific to binutils.
+
+
+
+# With all the machinery above in place, it is pretty easy to generate
+# dependencies. Host dependencies are a bit more complex because we have
+# to check for bootstrap/prebootstrap dependencies. To resolve
+# prebootstrap dependencies, prebootstrap modules are gathered in
+# a hash table.
+all-build-bison: maybe-all-build-texinfo
+all-build-byacc: maybe-all-build-texinfo
+all-build-flex: maybe-all-build-texinfo
+all-build-flex: maybe-all-build-bison
+all-build-flex: maybe-all-build-byacc
+all-build-flex: maybe-all-build-m4
+all-build-libiberty: maybe-all-build-texinfo
+all-build-m4: maybe-all-build-texinfo
+all-build-fixincludes: maybe-all-build-libiberty
+configure-gcc: maybe-configure-intl
+
+configure-stage1-gcc: maybe-configure-stage1-intl
+configure-stage2-gcc: maybe-configure-stage2-intl
+configure-stage3-gcc: maybe-configure-stage3-intl
+configure-stage4-gcc: maybe-configure-stage4-intl
+configure-stageprofile-gcc: maybe-configure-stageprofile-intl
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
+configure-gcc: maybe-all-binutils
+
+configure-stage1-gcc: maybe-all-stage1-binutils
+configure-stage2-gcc: maybe-all-stage2-binutils
+configure-stage3-gcc: maybe-all-stage3-binutils
+configure-stage4-gcc: maybe-all-stage4-binutils
+configure-stageprofile-gcc: maybe-all-stageprofile-binutils
+configure-stagefeedback-gcc: maybe-all-stagefeedback-binutils
+configure-gcc: maybe-all-gas
+
+configure-stage1-gcc: maybe-all-stage1-gas
+configure-stage2-gcc: maybe-all-stage2-gas
+configure-stage3-gcc: maybe-all-stage3-gas
+configure-stage4-gcc: maybe-all-stage4-gas
+configure-stageprofile-gcc: maybe-all-stageprofile-gas
+configure-stagefeedback-gcc: maybe-all-stagefeedback-gas
+configure-gcc: maybe-all-ld
+
+configure-stage1-gcc: maybe-all-stage1-ld
+configure-stage2-gcc: maybe-all-stage2-ld
+configure-stage3-gcc: maybe-all-stage3-ld
+configure-stage4-gcc: maybe-all-stage4-ld
+configure-stageprofile-gcc: maybe-all-stageprofile-ld
+configure-stagefeedback-gcc: maybe-all-stagefeedback-ld
+all-gcc: all-libiberty
+
+all-stage1-gcc: all-stage1-libiberty
+all-stage2-gcc: all-stage2-libiberty
+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-intl
+
+all-stage1-gcc: maybe-all-stage1-intl
+all-stage2-gcc: maybe-all-stage2-intl
+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-build-texinfo
+
+all-stage1-gcc: maybe-all-build-texinfo
+all-stage2-gcc: maybe-all-build-texinfo
+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
+all-stage2-gcc: maybe-all-build-bison
+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
+all-stage2-gcc: maybe-all-build-byacc
+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
+all-stage2-gcc: maybe-all-build-flex
+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
+all-stage2-gcc: maybe-all-build-libiberty
+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
+all-stage2-gcc: maybe-all-build-fixincludes
+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
+all-stage2-gcc: maybe-all-stage2-zlib
+all-stage3-gcc: maybe-all-stage3-zlib
+all-stage4-gcc: maybe-all-stage4-zlib
+all-stageprofile-gcc: maybe-all-stageprofile-zlib
+all-stagefeedback-gcc: maybe-all-stagefeedback-zlib
+all-gcc: all-libcpp
+
+all-stage1-gcc: all-stage1-libcpp
+all-stage2-gcc: all-stage2-libcpp
+all-stage3-gcc: all-stage3-libcpp
+all-stage4-gcc: all-stage4-libcpp
+all-stageprofile-gcc: all-stageprofile-libcpp
+all-stagefeedback-gcc: all-stagefeedback-libcpp
+all-gcc: all-libdecnumber
+
+all-stage1-gcc: all-stage1-libdecnumber
+all-stage2-gcc: all-stage2-libdecnumber
+all-stage3-gcc: all-stage3-libdecnumber
+all-stage4-gcc: all-stage4-libdecnumber
+all-stageprofile-gcc: all-stageprofile-libdecnumber
+all-stagefeedback-gcc: all-stagefeedback-libdecnumber
+all-gcc: maybe-all-libiberty
+
+all-stage1-gcc: maybe-all-stage1-libiberty
+all-stage2-gcc: maybe-all-stage2-libiberty
+all-stage3-gcc: maybe-all-stage3-libiberty
+all-stage4-gcc: maybe-all-stage4-libiberty
+all-stageprofile-gcc: maybe-all-stageprofile-libiberty
+all-stagefeedback-gcc: maybe-all-stagefeedback-libiberty
+all-gcc: maybe-all-fixincludes
+install-gcc: maybe-install-fixincludes
+configure-libcpp: configure-libiberty
+
+configure-stage1-libcpp: configure-stage1-libiberty
+configure-stage2-libcpp: configure-stage2-libiberty
+configure-stage3-libcpp: configure-stage3-libiberty
+configure-stage4-libcpp: configure-stage4-libiberty
+configure-stageprofile-libcpp: configure-stageprofile-libiberty
+configure-stagefeedback-libcpp: configure-stagefeedback-libiberty
+configure-libcpp: maybe-configure-intl
+
+configure-stage1-libcpp: maybe-configure-stage1-intl
+configure-stage2-libcpp: maybe-configure-stage2-intl
+configure-stage3-libcpp: maybe-configure-stage3-intl
+configure-stage4-libcpp: maybe-configure-stage4-intl
+configure-stageprofile-libcpp: maybe-configure-stageprofile-intl
+configure-stagefeedback-libcpp: maybe-configure-stagefeedback-intl
+all-libcpp: all-libiberty
+
+all-stage1-libcpp: all-stage1-libiberty
+all-stage2-libcpp: all-stage2-libiberty
+all-stage3-libcpp: all-stage3-libiberty
+all-stage4-libcpp: all-stage4-libiberty
+all-stageprofile-libcpp: all-stageprofile-libiberty
+all-stagefeedback-libcpp: all-stagefeedback-libiberty
+all-libcpp: maybe-all-intl
+
+all-stage1-libcpp: maybe-all-stage1-intl
+all-stage2-libcpp: maybe-all-stage2-intl
+all-stage3-libcpp: maybe-all-stage3-intl
+all-stage4-libcpp: maybe-all-stage4-intl
+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-gdb: maybe-configure-sim
+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
+all-gdb: maybe-all-sim
+configure-libgui: maybe-configure-tcl
+configure-libgui: maybe-configure-tk
+all-libgui: maybe-all-tcl
+all-libgui: maybe-all-tk
+all-libgui: maybe-all-itcl
configure-bfd: configure-libiberty
-all-bfd: maybe-all-libiberty maybe-all-intl
-all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
-# We put install-opcodes before install-binutils because the installed
-# binutils might be on PATH, and they might need the shared opcodes
-# library.
+
+configure-stage1-bfd: configure-stage1-libiberty
+configure-stage2-bfd: configure-stage2-libiberty
+configure-stage3-bfd: configure-stage3-libiberty
+configure-stage4-bfd: configure-stage4-libiberty
+configure-stageprofile-bfd: configure-stageprofile-libiberty
+configure-stagefeedback-bfd: configure-stagefeedback-libiberty
+all-bfd: maybe-all-libiberty
+
+all-stage1-bfd: maybe-all-stage1-libiberty
+all-stage2-bfd: maybe-all-stage2-libiberty
+all-stage3-bfd: maybe-all-stage3-libiberty
+all-stage4-bfd: maybe-all-stage4-libiberty
+all-stageprofile-bfd: maybe-all-stageprofile-libiberty
+all-stagefeedback-bfd: maybe-all-stagefeedback-libiberty
+all-bfd: maybe-all-intl
+
+all-stage1-bfd: maybe-all-stage1-intl
+all-stage2-bfd: maybe-all-stage2-intl
+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
+all-binutils: maybe-all-libiberty
+
+all-stage1-binutils: maybe-all-stage1-libiberty
+all-stage2-binutils: maybe-all-stage2-libiberty
+all-stage3-binutils: maybe-all-stage3-libiberty
+all-stage4-binutils: maybe-all-stage4-libiberty
+all-stageprofile-binutils: maybe-all-stageprofile-libiberty
+all-stagefeedback-binutils: maybe-all-stagefeedback-libiberty
+all-binutils: maybe-all-opcodes
+
+all-stage1-binutils: maybe-all-stage1-opcodes
+all-stage2-binutils: maybe-all-stage2-opcodes
+all-stage3-binutils: maybe-all-stage3-opcodes
+all-stage4-binutils: maybe-all-stage4-opcodes
+all-stageprofile-binutils: maybe-all-stageprofile-opcodes
+all-stagefeedback-binutils: maybe-all-stagefeedback-opcodes
+all-binutils: maybe-all-bfd
+
+all-stage1-binutils: maybe-all-stage1-bfd
+all-stage2-binutils: maybe-all-stage2-bfd
+all-stage3-binutils: maybe-all-stage3-bfd
+all-stage4-binutils: maybe-all-stage4-bfd
+all-stageprofile-binutils: maybe-all-stageprofile-bfd
+all-stagefeedback-binutils: maybe-all-stagefeedback-bfd
+all-binutils: maybe-all-build-flex
+
+all-stage1-binutils: maybe-all-build-flex
+all-stage2-binutils: maybe-all-build-flex
+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
+all-stage2-binutils: maybe-all-build-bison
+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
+all-stage2-binutils: maybe-all-build-byacc
+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
+all-stage2-binutils: maybe-all-stage2-intl
+all-stage3-binutils: maybe-all-stage3-intl
+all-stage4-binutils: maybe-all-stage4-intl
+all-stageprofile-binutils: maybe-all-stageprofile-intl
+all-stagefeedback-binutils: maybe-all-stagefeedback-intl
install-binutils: maybe-install-opcodes
-# libopcodes depends on libbfd
install-opcodes: maybe-install-bfd
-all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
-all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
-all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
-all-opcodes: maybe-all-bfd maybe-all-libiberty
-
-# Other host modules in the 'src' repository.
-all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
-configure-expect: maybe-configure-tcl maybe-configure-tk
-all-expect: maybe-all-tcl maybe-all-tk
-configure-itcl: maybe-configure-tcl maybe-configure-tk
-all-itcl: maybe-all-tcl maybe-all-tk
-# We put install-tcl before install-itcl because itcl wants to run a
-# program on installation which uses the Tcl libraries.
+all-gas: maybe-all-libiberty
+
+all-stage1-gas: maybe-all-stage1-libiberty
+all-stage2-gas: maybe-all-stage2-libiberty
+all-stage3-gas: maybe-all-stage3-libiberty
+all-stage4-gas: maybe-all-stage4-libiberty
+all-stageprofile-gas: maybe-all-stageprofile-libiberty
+all-stagefeedback-gas: maybe-all-stagefeedback-libiberty
+all-gas: maybe-all-opcodes
+
+all-stage1-gas: maybe-all-stage1-opcodes
+all-stage2-gas: maybe-all-stage2-opcodes
+all-stage3-gas: maybe-all-stage3-opcodes
+all-stage4-gas: maybe-all-stage4-opcodes
+all-stageprofile-gas: maybe-all-stageprofile-opcodes
+all-stagefeedback-gas: maybe-all-stagefeedback-opcodes
+all-gas: maybe-all-bfd
+
+all-stage1-gas: maybe-all-stage1-bfd
+all-stage2-gas: maybe-all-stage2-bfd
+all-stage3-gas: maybe-all-stage3-bfd
+all-stage4-gas: maybe-all-stage4-bfd
+all-stageprofile-gas: maybe-all-stageprofile-bfd
+all-stagefeedback-gas: maybe-all-stagefeedback-bfd
+all-gas: maybe-all-intl
+
+all-stage1-gas: maybe-all-stage1-intl
+all-stage2-gas: maybe-all-stage2-intl
+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
+all-gprof: maybe-all-libiberty
+all-gprof: maybe-all-bfd
+all-gprof: maybe-all-opcodes
+all-gprof: maybe-all-intl
+all-ld: maybe-all-libiberty
+
+all-stage1-ld: maybe-all-stage1-libiberty
+all-stage2-ld: maybe-all-stage2-libiberty
+all-stage3-ld: maybe-all-stage3-libiberty
+all-stage4-ld: maybe-all-stage4-libiberty
+all-stageprofile-ld: maybe-all-stageprofile-libiberty
+all-stagefeedback-ld: maybe-all-stagefeedback-libiberty
+all-ld: maybe-all-bfd
+
+all-stage1-ld: maybe-all-stage1-bfd
+all-stage2-ld: maybe-all-stage2-bfd
+all-stage3-ld: maybe-all-stage3-bfd
+all-stage4-ld: maybe-all-stage4-bfd
+all-stageprofile-ld: maybe-all-stageprofile-bfd
+all-stagefeedback-ld: maybe-all-stagefeedback-bfd
+all-ld: maybe-all-opcodes
+
+all-stage1-ld: maybe-all-stage1-opcodes
+all-stage2-ld: maybe-all-stage2-opcodes
+all-stage3-ld: maybe-all-stage3-opcodes
+all-stage4-ld: maybe-all-stage4-opcodes
+all-stageprofile-ld: maybe-all-stageprofile-opcodes
+all-stagefeedback-ld: maybe-all-stagefeedback-opcodes
+all-ld: maybe-all-build-bison
+
+all-stage1-ld: maybe-all-build-bison
+all-stage2-ld: maybe-all-build-bison
+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
+all-stage2-ld: maybe-all-build-byacc
+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
+all-stage2-ld: maybe-all-build-flex
+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
+all-stage2-ld: maybe-all-stage2-intl
+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
+all-opcodes: maybe-all-bfd
+
+all-stage1-opcodes: maybe-all-stage1-bfd
+all-stage2-opcodes: maybe-all-stage2-bfd
+all-stage3-opcodes: maybe-all-stage3-bfd
+all-stage4-opcodes: maybe-all-stage4-bfd
+all-stageprofile-opcodes: maybe-all-stageprofile-bfd
+all-stagefeedback-opcodes: maybe-all-stagefeedback-bfd
+all-opcodes: maybe-all-libiberty
+
+all-stage1-opcodes: maybe-all-stage1-libiberty
+all-stage2-opcodes: maybe-all-stage2-libiberty
+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-dejagnu: maybe-all-tcl
+all-dejagnu: maybe-all-expect
+all-dejagnu: maybe-all-tk
+configure-expect: maybe-configure-tcl
+configure-expect: maybe-configure-tk
+all-expect: maybe-all-tcl
+all-expect: maybe-all-tk
+configure-itcl: maybe-configure-tcl
+configure-itcl: maybe-configure-tk
+all-itcl: maybe-all-tcl
+all-itcl: maybe-all-tk
install-itcl: maybe-install-tcl
-all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
-install-sid: maybe-install-tcl maybe-install-tk
-all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
configure-tk: maybe-configure-tcl
all-tk: maybe-all-tcl
-configure-tix: maybe-configure-tcl maybe-configure-tk
-all-tix: maybe-all-tcl maybe-all-tk
-all-texinfo: maybe-all-libiberty
-
-# Other host modules. Warning, these are not well tested.
-all-autoconf: maybe-all-m4 maybe-all-texinfo
-all-automake: maybe-all-m4 maybe-all-texinfo
-all-bison: maybe-all-texinfo
-all-diff: maybe-all-libiberty
-all-fastjar: maybe-all-zlib maybe-all-libiberty
-all-fileutils: maybe-all-libiberty
-all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
-all-gzip: maybe-all-libiberty
-all-hello: maybe-all-libiberty
-all-m4: maybe-all-libiberty maybe-all-texinfo
-all-make: maybe-all-libiberty maybe-all-intl
-all-patch: maybe-all-libiberty
+all-sid: maybe-all-libiberty
+all-sid: maybe-all-bfd
+all-sid: maybe-all-opcodes
+all-sid: maybe-all-tcl
+all-sid: maybe-all-tk
+install-sid: maybe-install-tcl
+install-sid: maybe-install-tk
+all-sim: maybe-all-libiberty
+all-sim: maybe-all-bfd
+all-sim: maybe-all-opcodes
+all-sim: maybe-all-readline
+all-sim: maybe-configure-gdb
+all-fastjar: maybe-all-zlib
+all-fastjar: maybe-all-build-texinfo
+all-fastjar: maybe-all-libiberty
+all-autoconf: maybe-all-m4
+all-autoconf: maybe-all-build-texinfo
+all-automake: maybe-all-m4
+all-automake: maybe-all-build-texinfo
+all-automake: maybe-all-autoconf
+all-bison: maybe-all-intl
+all-bison: maybe-all-build-texinfo
+all-diff: maybe-all-intl
+all-diff: maybe-all-build-texinfo
+all-fileutils: maybe-all-intl
+all-fileutils: maybe-all-build-texinfo
+all-flex: maybe-all-build-bison
+all-flex: maybe-all-build-byacc
+all-flex: maybe-all-intl
+all-flex: maybe-all-m4
+all-flex: maybe-all-build-texinfo
+all-gzip: maybe-all-intl
+all-gzip: maybe-all-zlib
+all-gzip: maybe-all-build-texinfo
+all-hello: maybe-all-intl
+all-hello: maybe-all-build-texinfo
+all-m4: maybe-all-intl
+all-m4: maybe-all-build-texinfo
+all-make: maybe-all-intl
+all-make: maybe-all-build-texinfo
+all-patch: maybe-all-build-texinfo
+all-make: maybe-all-build-texinfo
all-prms: maybe-all-libiberty
-all-recode: maybe-all-libiberty
-all-sed: maybe-all-libiberty
+all-recode: maybe-all-build-texinfo
+all-sed: maybe-all-build-texinfo
all-send-pr: maybe-all-prms
-all-tar: maybe-all-libiberty
-all-uudecode: maybe-all-libiberty
-
-ALL_GCC = maybe-all-gcc
-ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
-ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
-
-# Target modules specific to gcc.
-configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
+all-tar: maybe-all-build-texinfo
+all-uudecode: maybe-all-build-texinfo
+configure-target-boehm-gc: maybe-configure-target-qthreads
configure-target-fastjar: maybe-configure-target-zlib
-all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
-configure-target-libf2c: $(ALL_GCC_C)
-all-target-libf2c: maybe-all-target-libiberty
-configure-target-libffi: $(ALL_GCC_C)
-configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
-all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
-configure-target-libobjc: $(ALL_GCC_C)
+all-target-fastjar: maybe-all-target-zlib
+all-target-fastjar: maybe-all-target-libiberty
+configure-target-libjava: maybe-configure-target-zlib
+configure-target-libjava: maybe-configure-target-boehm-gc
+configure-target-libjava: maybe-configure-target-qthreads
+configure-target-libjava: maybe-configure-target-libffi
+all-target-libjava: maybe-all-fastjar
+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
all-target-libobjc: maybe-all-target-libiberty
-configure-target-libstdc++-v3: $(ALL_GCC_C)
all-target-libstdc++-v3: maybe-all-target-libiberty
-configure-target-zlib: $(ALL_GCC_C)
-
-# Target modules in the 'src' repository.
-configure-target-examples: $(ALL_GCC_C)
-configure-target-libgloss: $(ALL_GCC)
all-target-libgloss: maybe-configure-target-newlib
-configure-target-libiberty: $(ALL_GCC)
-configure-target-libtermcap: $(ALL_GCC_C)
-configure-target-newlib: $(ALL_GCC)
-configure-target-rda: $(ALL_GCC_C)
-configure-target-winsup: $(ALL_GCC_C)
-all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
-
-# Other target modules. Warning, these are not well tested.
-configure-target-gperf: $(ALL_GCC_CXX)
-all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
-configure-target-qthreads: $(ALL_GCC_C)
-
-# Dependencies of maybe-foo on foo. These are used because, for example,
-# all-gcc only depends on all-gas if gas is present and being configured.
-@maybe_dependencies@
+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
+
+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
+@endif gcc-no-bootstrap
+
+CONFIGURE_GDB_TK = @CONFIGURE_GDB_TK@
+GDB_TK = @GDB_TK@
+INSTALL_GDB_TK = @INSTALL_GDB_TK@
+configure-gdb: $(CONFIGURE_GDB_TK)
+all-gdb: $(gdbnlmrequirements) $(GDB_TK)
+install-gdb: $(INSTALL_GDB_TK)
# Serialization dependencies. Host configures don't work well in parallel to
# each other, due to contention over config.cache. Target configures and
@@ -23942,17 +41083,6 @@ configure-target-qthreads: $(ALL_GCC_C)
# Regenerating top level configury
# --------------------------------
-# Multilib.out tells target dirs what multilibs they should build.
-# There is really only one copy. We use the 'timestamp' method to
-# work around various timestamp bugs on some systems.
-# We use move-if-change so that it's only considered updated when it
-# actually changes, because it has to depend on a phony target.
-multilib.out: maybe-all-gcc
- @r=`${PWD_COMMAND}`; export r; \
- echo "Checking multilib configuration..."; \
- $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
- $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
-
# Rebuilding Makefile.in, using autogen.
AUTOGEN = autogen
$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
@@ -23962,7 +41092,7 @@ $(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
Makefile: $(srcdir)/Makefile.in config.status
CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-config.status: configure $(gcc_version_trigger)
+config.status: configure
CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck
# Rebuilding configure.
diff --git a/contrib/binutils/Makefile.tpl b/contrib/binutils/Makefile.tpl
index 3a7750c845a8..b83d8d5abd98 100644
--- a/contrib/binutils/Makefile.tpl
+++ b/contrib/binutils/Makefile.tpl
@@ -6,7 +6,7 @@ in
#
# Makefile for directory with subdirs to build.
# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003 Free Software Foundation
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ in
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# -------------------------------
@@ -53,6 +53,9 @@ libdir = @libdir@
includedir = @includedir@
oldincludedir = @oldincludedir@
infodir = @infodir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+htmldir = @htmldir@
mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
@@ -68,65 +71,158 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
+LN = @LN@
+LN_S = @LN_S@
# -------------------------------------------------
# Miscellaneous non-standard autoconf-set variables
# -------------------------------------------------
-links=@configlinks@
-# The file containing GCC's version number.
-gcc_version_trigger = @gcc_version_trigger@
-gcc_version = @gcc_version@
-
# The gcc driver likes to know the arguments it was configured with.
TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@
-gxx_include_dir = @gxx_include_dir@
-libstdcxx_incdir = @libstdcxx_incdir@
-
tooldir = @tooldir@
build_tooldir = @build_tooldir@
-# Directory in which the compiler finds executables, libraries, etc.
-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)
GDB_NLM_DEPS =
# This is the name of the environment variable used for the path to
# the libraries.
RPATH_ENVVAR = @RPATH_ENVVAR@
-# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
-# was used.
-SET_LIB_PATH = @SET_LIB_PATH@
-
-# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
-# Some platforms don't like blank entries, so we remove duplicate,
-# leading and trailing colons.
-REALLY_SET_LIB_PATH = \
- $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
-
-# This is the list of directories to be built for the build system.
-BUILD_CONFIGDIRS = libiberty
# Build programs are put under this directory.
BUILD_SUBDIR = @build_subdir@
# This is set by the configure script to the arguments to use when configuring
# directories built for the build system.
-BUILD_CONFIGARGS = @build_configargs@
+BUILD_CONFIGARGS = @build_configargs@ --with-build-subdir="$(BUILD_SUBDIR)"
+
+# This is the list of variables to export in the environment when
+# configuring any subdirectory. It must also be exported whenever
+# recursing into a build directory in case that directory's Makefile
+# re-runs configure.
+BASE_EXPORTS = \
+ FLEX="$(FLEX)"; export FLEX; \
+ LEX="$(LEX)"; export LEX; \
+ BISON="$(BISON)"; export BISON; \
+ YACC="$(YACC)"; export YACC; \
+ M4="$(M4)"; export M4; \
+ MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
+
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the build system.
+BUILD_EXPORTS = \
+ $(BASE_EXPORTS) \
+ AR="$(AR_FOR_BUILD)"; export AR; \
+ AS="$(AS_FOR_BUILD)"; export AS; \
+ CC="$(CC_FOR_BUILD)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
+ LD="$(LD_FOR_BUILD)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
+ NM="$(NM_FOR_BUILD)"; export NM; \
+ RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
+ WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES;
# This is the list of directories to built for the host system.
SUBDIRS = @configdirs@
# This is set by the configure script to the arguments to use when configuring
# directories built for the host system.
HOST_CONFIGARGS = @host_configargs@
+# Host programs are put under this directory, which is . except if building
+# with srcdir=..
+HOST_SUBDIR = @host_subdir@
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the host system. We need to pass
+# some to the GCC configure because of its hybrid host/target nature.
+HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
+ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
+ GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \
+ LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \
+ NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
+ OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
+ RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
+ GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
+ GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+@if gcc-bootstrap
+ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
+@endif gcc-bootstrap
+ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
+
+# Similar, for later GCC stages.
+POSTSTAGE1_HOST_EXPORTS = \
+ $(HOST_EXPORTS) \
+ CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
+ -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
+ 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;
-# This is set by the configure script to the list of directories which
-# should be built using the target tools.
-TARGET_CONFIGDIRS = @target_configdirs@
# Target libraries are put under this directory:
TARGET_SUBDIR = @target_subdir@
# This is set by the configure script to the arguments to use when configuring
# directories built for the target.
-TARGET_CONFIGARGS = @target_configargs@
+TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
+# This is the list of variables to export in the environment when
+# configuring subdirectories for the host system.
+BASE_TARGET_EXPORTS = \
+ $(BASE_EXPORTS) \
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
+ LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
+ LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \
+ NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
+ OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
+ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+ STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
+ WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
+
+RAW_CXX_TARGET_EXPORTS = \
+ $(BASE_TARGET_EXPORTS) \
+ CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
+ CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
+
+NORMAL_TARGET_EXPORTS = \
+ $(BASE_TARGET_EXPORTS) \
+ CXX="$(CXX_FOR_TARGET)"; export CXX;
+
+# Where to find GMP
+HOST_GMPLIBS = @gmplibs@
+HOST_GMPINC = @gmpinc@
# ----------------------------------------------
# Programs producing files for the BUILD machine
@@ -154,42 +250,19 @@ CXX_FOR_BUILD = $(CXX)
BUILD_PREFIX = @BUILD_PREFIX@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
-BISON=@BISON@
-USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
- echo $$r/bison/bison -L $$s/bison/ ; \
- else \
- echo bison ; \
- fi`
-
-DEFAULT_YACC = @DEFAULT_YACC@
-YACC=@YACC@
-USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
- echo $$r/bison/bison -y -L $$s/bison/ ; \
- elif [ -f $$r/byacc/byacc ] ; then \
- echo $$r/byacc/byacc ; \
- else \
- echo ${DEFAULT_YACC} ; \
- fi`
-
-DEFAULT_LEX = @DEFAULT_LEX@
-LEX=@LEX@
-USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
- then echo $$r/flex/flex ; \
- else echo ${DEFAULT_LEX} ; fi`
-
-DEFAULT_M4 = @DEFAULT_M4@
-M4 = `if [ -f $$r/m4/m4 ] ; \
- then echo $$r/m4/m4 ; \
- else echo ${DEFAULT_M4} ; fi`
-
-# For an installed makeinfo, we require it to be from texinfo 4.2 or
-# higher, else we use the "missing" dummy.
-MAKEINFO=@MAKEINFO@
-USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
- then echo $$r/texinfo/makeinfo/makeinfo ; \
- else if (makeinfo --version \
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
- then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
+# Flags to pass to stage2 and later makes. They are defined
+# here so that they can be overridden by Makefile fragments.
+BOOT_CFLAGS= -g -O2
+BOOT_LDFLAGS=
+
+BISON = @BISON@
+YACC = @YACC@
+FLEX = @FLEX@
+LEX = @LEX@
+M4 = @M4@
+MAKEINFO = @MAKEINFO@
+EXPECT = @EXPECT@
+RUNTEST = @RUNTEST@
# This just becomes part of the MAKEINFO definition passed down to
# sub-makes. It lets flags be given on the command line while still
@@ -197,177 +270,74 @@ USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
# (Default to avoid splitting info files by setting the threshold high.)
MAKEINFOFLAGS = --split-size=5000000
-EXPECT = `if [ -f $$r/expect/expect ] ; \
- then echo $$r/expect/expect ; \
- else echo expect ; fi`
-
-RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
- then echo $$s/dejagnu/runtest ; \
- else echo runtest ; fi`
-
# ---------------------------------------------
# Programs producing files for the HOST machine
# ---------------------------------------------
-# This is the list of directories that may be needed in RPATH_ENVVAR
-# so that programs built for the host machine work.
-HOST_LIB_PATH = $$r/bfd:$$r/opcodes
-
AS = @AS@
-
AR = @AR@
AR_FLAGS = rc
-
CC = @CC@
-CFLAGS = @CFLAGS@
-LIBCFLAGS = $(CFLAGS)
-
CXX = @CXX@
-CXXFLAGS = @CXXFLAGS@
-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
-
DLLTOOL = @DLLTOOL@
-
-NM = @NM@
-
LD = @LD@
-LDFLAGS =
-
+LIPO = @LIPO@
+NM = @NM@
+OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
-
+STRIP = @STRIP@
WINDRES = @WINDRES@
+CFLAGS = @CFLAGS@
+LDFLAGS =
+LIBCFLAGS = $(CFLAGS)
+CXXFLAGS = @CXXFLAGS@
+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
PICFLAG =
# -----------------------------------------------
# Programs producing files for the TARGET machine
# -----------------------------------------------
-# This is the list of directories that may be needed in RPATH_ENVVAR
-# so that prorgams built for the target machine work.
-TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
-
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
AR_FOR_TARGET=@AR_FOR_TARGET@
-USUAL_AR_FOR_TARGET = ` \
- if [ -f $$r/binutils/ar ] ; then \
- echo $$r/binutils/ar ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(AR); \
- else \
- echo ar | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
AS_FOR_TARGET=@AS_FOR_TARGET@
-USUAL_AS_FOR_TARGET = ` \
- if [ -f $$r/gas/as-new ] ; then \
- echo $$r/gas/as-new ; \
- elif [ -f $$r/gcc/xgcc ]; then \
- $(CC_FOR_TARGET) -print-prog-name=as ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(AS); \
- else \
- echo as | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
-CC_FOR_TARGET = @CC_FOR_TARGET@
-# During gcc bootstrap, if we use some random cc for stage1 then
-# CFLAGS will be just -g. We want to ensure that TARGET libraries
-# (which we know are built with gcc) are built with optimizations so
-# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
+CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+
# If GCC_FOR_TARGET is not overriden on the command line, then this
# variable is passed down to the gcc Makefile, where it is used to
# build libgcc2.a. We define it here so that it can itself be
# overridden on the command line.
-GCC_FOR_TARGET=@GCC_FOR_TARGET@
-USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
-LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
-
-CXX_FOR_TARGET = @CXX_FOR_TARGET@
-RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
-CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
-RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
-LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
-
+GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
-USUAL_DLLTOOL_FOR_TARGET = ` \
- if [ -f $$r/binutils/dlltool ] ; then \
- echo $$r/binutils/dlltool ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(DLLTOOL); \
- else \
- echo dlltool | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
-GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
-
LD_FOR_TARGET=@LD_FOR_TARGET@
-USUAL_LD_FOR_TARGET = ` \
- if [ -f $$r/ld/ld-new ] ; then \
- echo $$r/ld/ld-new ; \
- elif [ -f $$r/gcc/xgcc ]; then \
- $(CC_FOR_TARGET) -print-prog-name=ld ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(LD); \
- else \
- echo ld | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
-LDFLAGS_FOR_TARGET =
+LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
NM_FOR_TARGET=@NM_FOR_TARGET@
-USUAL_NM_FOR_TARGET = ` \
- if [ -f $$r/binutils/nm-new ] ; then \
- echo $$r/binutils/nm-new ; \
- elif [ -f $$r/gcc/xgcc ]; then \
- $(CC_FOR_TARGET) -print-prog-name=nm ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(NM); \
- else \
- echo nm | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
+OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
-USUAL_RANLIB_FOR_TARGET = ` \
- if [ -f $$r/binutils/ranlib ] ; then \
- echo $$r/binutils/ranlib ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- if [ x'$(RANLIB)' != x ]; then \
- echo $(RANLIB); \
- else \
- echo ranlib; \
- fi; \
- else \
- echo ranlib | sed '$(program_transform_name)' ; \
- fi; \
- fi`
-
+STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
-USUAL_WINDRES_FOR_TARGET = ` \
- if [ -f $$r/binutils/windres ] ; then \
- echo $$r/binutils/windres ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(WINDRES); \
- else \
- echo windres | sed '$(program_transform_name)' ; \
- fi; \
- fi`
+COMPILER_AS_FOR_TARGET=@COMPILER_AS_FOR_TARGET@
+COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
+COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
+
+# During gcc bootstrap, if we use some random cc for stage1 then
+# CFLAGS will be just -g. We want to ensure that TARGET libraries
+# (which we know are built with gcc) are built with optimizations so
+# prepend -O2 when setting CFLAGS_FOR_TARGET.
+CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
+CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+LDFLAGS_FOR_TARGET =
PICFLAG_FOR_TARGET =
# ------------------------------------
@@ -376,8 +346,7 @@ PICFLAG_FOR_TARGET =
# The first rule in the file had better be this one. Don't put any above it.
# This lives here to allow makefile fragments to contain dependencies.
-all: all.normal
-.PHONY: all
+all:
#### host and target specific makefile fragments come in here.
@target_makefile_frag@
@@ -386,20 +355,46 @@ all: all.normal
@host_makefile_frag@
###
+# 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 = [+ FOR target_modules +][+
+ IF lib_path +]$(TARGET_LIB_PATH_[+module+])[+ ENDIF lib_path +][+
+ ENDFOR target_modules +]$(HOST_LIB_PATH_gcc)
+[+ FOR target_modules +][+ IF lib_path +]
+@if target-[+module+]
+TARGET_LIB_PATH_[+module+] = $$r/$(TARGET_SUBDIR)/[+module+]/[+lib_path+]:
+@endif target-[+module+]
+[+ ENDIF lib_path +][+ ENDFOR target_modules +]
+
+
+# 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 = [+ FOR host_modules +][+
+ IF lib_path +]$(HOST_LIB_PATH_[+module+])[+ ENDIF lib_path +][+
+ ENDFOR host_modules +]
+
+# Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
+@if gcc
+HOST_LIB_PATH_gcc = $$r/$(HOST_SUBDIR)/gcc:$$r/$(HOST_SUBDIR)/prev-gcc:
+@endif gcc
+
+[+ FOR host_modules +][+ IF lib_path +]
+@if [+module+]
+HOST_LIB_PATH_[+module+] = \
+ $$r/$(HOST_SUBDIR)/[+module+]/[+lib_path+]:[+ IF bootstrap
+ +]$$r/$(HOST_SUBDIR)/prev-[+module+]/[+lib_path+]:[+ ENDIF bootstrap +]
+@endif [+module+]
+[+ ENDIF lib_path +][+ ENDFOR host_modules +]
+
# Flags to pass down to all sub-makes.
-BASE_FLAGS_TO_PASS = [+ FOR flags_to_pass +]\
- "[+flag+]=$([+flag+])" [+ ENDFOR flags_to_pass +]\
+BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
+ "`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \
+ "[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +] \
"CONFIG_SHELL=$(SHELL)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
-# For any flags above that may contain shell code that varies from one
-# target library to another. When doing recursive invocations of the
-# top-level Makefile, we don't want the outer make to evaluate them,
-# so we pass these variables down unchanged. They must not contain
-# single nor double quotes.
-RECURSE_FLAGS = \
- CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
- RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
+# We leave this in just in case, but it is not needed anymore.
+RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
@@ -410,8 +405,11 @@ EXTRA_HOST_FLAGS = \
'CXX=$(CXX)' \
'DLLTOOL=$(DLLTOOL)' \
'LD=$(LD)' \
+ 'LIPO=$(LIPO)' \
'NM=$(NM)' \
+ 'OBJDUMP=$(OBJDUMP)' \
'RANLIB=$(RANLIB)' \
+ 'STRIP=$(STRIP)' \
'WINDRES=$(WINDRES)'
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
@@ -429,20 +427,23 @@ X11_FLAGS_TO_PASS = \
'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
# Flags to pass down to makes which are built with the target environment.
-# The double $ decreases the length of the command line; the variables
-# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
+# 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
+# COMPILER_ prefixed variables are not passed down so we expand them here.
EXTRA_TARGET_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
- 'AS=$$(AS_FOR_TARGET)' \
+ 'AS=$(COMPILER_AS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET)' \
'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
'CXX=$$(CXX_FOR_TARGET)' \
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
- 'LD=$$(LD_FOR_TARGET)' \
+ 'LD=$(COMPILER_LD_FOR_TARGET)' \
+ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
- 'NM=$$(NM_FOR_TARGET)' \
+ 'NM=$(COMPILER_NM_FOR_TARGET)' \
+ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)'
@@ -455,24 +456,17 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# The BUILD_* variables are a special case, which are used for the gcc
# cross-building scheme.
EXTRA_GCC_FLAGS = \
- 'BUILD_PREFIX=$(BUILD_PREFIX)' \
- 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s/.*=$$/XFOO=/`"
+ "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
+ "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
.PHONY: configure-host
-configure-host: maybe-configure-gcc [+
+configure-host: [+
FOR host_modules +] \
maybe-configure-[+module+][+
ENDFOR host_modules +]
@@ -482,20 +476,39 @@ configure-target: [+
maybe-configure-target-[+module+][+
ENDFOR target_modules +]
-# The target built for a native build.
-.PHONY: all.normal
-all.normal: @all_build_modules@ all-host all-target
+# The target built for a native non-bootstrap build.
+.PHONY: all
+all:
+@if gcc-bootstrap
+ [ -f stage_final ] || echo stage3 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) `cat stage_final`-bubble
+@endif gcc-bootstrap
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if [ -f stage_last ]; then \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \
+ else \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \
+ fi
+
+.PHONY: all-build
+[+ FOR build_modules +]
+all-build: maybe-all-build-[+module+][+ ENDFOR build_modules +]
.PHONY: all-host
-all-host: maybe-all-gcc [+
- FOR host_modules +] \
- maybe-all-[+module+][+
- ENDFOR host_modules +]
+[+ FOR host_modules +][+ IF bootstrap +]
+@if [+module+]-no-bootstrap[+ ENDIF bootstrap +]
+all-host: maybe-all-[+module+][+ IF bootstrap +]
+@endif [+module+]-no-bootstrap[+ ENDIF bootstrap +][+ ENDFOR host_modules +]
+
.PHONY: all-target
-all-target: [+
- FOR target_modules +] \
- maybe-all-target-[+module+][+
- ENDFOR target_modules +]
+[+ FOR target_modules +][+ IF bootstrap +]
+@if [+module+]-no-bootstrap[+ ENDIF bootstrap +]
+all-target: maybe-all-target-[+module+][+ IF bootstrap +]
+@endif [+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
@@ -503,112 +516,32 @@ all-target: [+
# but it may do additional work as well).
[+ FOR recursive_targets +]
.PHONY: do-[+make_target+]
-do-[+make_target+]: [+make_target+]-host [+make_target+]-target
-
-.PHONY: [+make_target+]-host
-[+make_target+]-host: maybe-[+make_target+]-gcc [+
- FOR host_modules +] \
- maybe-[+make_target+]-[+module+][+
- ENDFOR host_modules +]
-
-.PHONY: [+make_target+]-target
-[+make_target+]-target: [+
- FOR target_modules +] \
- maybe-[+make_target+]-target-[+module+][+
- ENDFOR target_modules +]
-
-# GCC, the eternal special case
-.PHONY: maybe-[+make_target+]-gcc [+make_target+]-gcc
-maybe-[+make_target+]-gcc:
-[+make_target+]-gcc: [+
- FOR depend +]\
- [+depend+]-gcc [+
- ENDFOR depend +]
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
+do-[+make_target+]:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing [+make_target+] in gcc" ; \
- (cd gcc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+make_target+]) \
- || exit 1
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+make_target+]-host \
+ [+make_target+]-target
-# Host modules.
+
+.PHONY: [+make_target+]-host
[+ FOR host_modules +]
-.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
-maybe-[+make_target+]-[+module+]:
-[+ IF (match-value? = "missing" (get "make_target") ) +]
-# [+module+] doesn't support [+make_target+].
-[+make_target+]-[+module+]:
-[+ ELSE +]
-[+make_target+]-[+module+]: [+
- FOR depend +]\
- [+depend+]-[+module+] [+
- ENDFOR depend +]
- @[ -f ./[+module+]/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing [+make_target+] in [+module+]" ; \
- (cd [+module+] && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+make_target+]) \
- || exit 1
-[+ ENDIF +]
-[+ ENDFOR host_modules +]
+[+make_target+]-host: maybe-[+make_target+]-[+module+][+ ENDFOR host_modules +]
-# Target modules.
+.PHONY: [+make_target+]-target
[+ FOR target_modules +]
-.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
-maybe-[+make_target+]-target-[+module+]:
-[+ IF (match-value? = "missing" (get "make_target") ) +]
-# [+module+] doesn't support [+make_target+].
-[+make_target+]-target-[+module+]:
-[+ ELSE +]
-[+make_target+]-target-[+module+]: [+
- FOR depend +]\
- [+depend+]-target-[+module+] [+
- ENDFOR depend +]
- @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/[+module+] && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+make_target+]) \
- || exit 1
-[+ ENDIF +]
-[+ ENDFOR target_modules +]
+[+make_target+]-target: maybe-[+make_target+]-target-[+module+][+ ENDFOR target_modules +]
[+ ENDFOR recursive_targets +]
# Here are the targets which correspond to the do-X targets.
-.PHONY: info installcheck dvi install-info
+.PHONY: info installcheck dvi html install-info 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
+html: do-html
# Make sure makeinfo is built before we do a `make info', if we're
# in fact building texinfo.
@@ -620,16 +553,21 @@ install-info: do-install-info dir.info
$(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
else true ; fi
+install-html: do-install-html
+
local-clean:
-rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
local-distclean:
-rm -f Makefile config.status config.cache mh-frag mt-frag
- -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
+ -rm -f maybedep.tmp serdep.tmp
-if [ "$(TARGET_SUBDIR)" != "." ]; then \
rm -rf $(TARGET_SUBDIR); \
else true; fi
-rm -rf $(BUILD_SUBDIR)
+ -if [ "$(HOST_SUBDIR)" != "." ]; then \
+ rm -rf $(HOST_SUBDIR); \
+ else true; fi
-rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
-rm -f texinfo/doc/Makefile texinfo/po/POTFILES
-rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
@@ -647,13 +585,10 @@ 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
+# Extra dependency for clean-target, owing to the mixed nature of gcc.
clean-target: clean-target-libgcc
clean-target-libgcc:
- test ! -d gcc/libgcc || \
- (cd gcc/libgcc && find . -type d -print) | \
- while read d; do rm -f gcc/$$d/libgcc.a || : ; done
- -rm -rf gcc/libgcc
+ test ! -d gcc || (cd gcc && $(MAKE) $@)
# Check target.
@@ -661,14 +596,24 @@ clean-target-libgcc:
check: do-check
# Only include modules actually being configured and built.
-do-check: maybe-check-gcc [+
+.PHONY: check-host
+check-host: [+
FOR host_modules +] \
maybe-check-[+module+][+
- ENDFOR host_modules +][+
+ ENDFOR host_modules +]
+
+.PHONY: check-target
+check-target: [+
FOR target_modules +] \
maybe-check-target-[+module+][+
ENDFOR target_modules +]
+do-check:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) check-host check-target
+
# Automated reporting of test results.
warning.log: build.log
@@ -693,16 +638,20 @@ mail-report-with-warnings.log: warning.log
# Installation targets.
.PHONY: install uninstall
-install: installdirs install-host install-target
+install:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-host install-target
.PHONY: install-host-nogcc
install-host-nogcc: [+
- FOR host_modules +] \
- maybe-install-[+module+][+
+ FOR host_modules +][+ IF (not (= (get "module") "gcc")) +] \
+ maybe-install-[+module+][+ ENDIF +][+
ENDFOR host_modules +]
.PHONY: install-host
-install-host: maybe-install-gcc [+
+install-host: [+
FOR host_modules +] \
maybe-install-[+module+][+
ENDFOR host_modules +]
@@ -720,7 +669,8 @@ uninstall:
install.all: install-no-fixedincludes
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD_COMMAND}` ; export r ; \
- $(SET_LIB_PATH) \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
(cd ./gcc && \
$(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
else \
@@ -763,392 +713,394 @@ etags tags: TAGS
# built are.
TAGS: do-TAGS
-# --------------------------------------
-# Modules which run on the build machine
-# --------------------------------------
-[+ FOR build_modules +]
-.PHONY: configure-build-[+module+] maybe-configure-build-[+module+]
-maybe-configure-build-[+module+]:
-configure-build-[+module+]:
- @test ! -f $(BUILD_SUBDIR)/[+module+]/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/[+module+] ; \
- r=`${PWD_COMMAND}`; export r; \
+# ------------------------------------
+# Macros for configure and all targets
+# ------------------------------------
+
+[+ DEFINE configure +]
+.PHONY: configure-[+prefix+][+module+] maybe-configure-[+prefix+][+module+]
+maybe-configure-[+prefix+][+module+]:
+@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 +]
+ @: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
+ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- AR="$(AR_FOR_BUILD)"; export AR; \
- AS="$(AS_FOR_BUILD)"; export AS; \
- CC="$(CC_FOR_BUILD)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
- LD="$(LD_FOR_BUILD)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
- NM="$(NM_FOR_BUILD)"; export NM; \
- RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
- echo Configuring in $(BUILD_SUBDIR)/[+module+]; \
- cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \
+ [+ IF check_multilibs
+ +]echo "Checking multilib configuration for [+module+]..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
+ $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
+ if test -r [+subdir+]/[+module+]/multilib.out; then \
+ if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
+ rm -f [+subdir+]/[+module+]/multilib.tmp; \
+ else \
+ rm -f [+subdir+]/[+module+]/Makefile; \
+ mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
+ fi; \
+ else \
+ mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
+ fi; \
+ [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
+ [+exports+] \
+ echo Configuring in [+subdir+]/[+module+]; \
+ cd "[+subdir+]/[+module+]" || exit 1; \
case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(BUILD_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo [+subdir+]/[+module+]/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- if [ "$(srcdir)" = "." ] ; then \
- if [ "$(BUILD_SUBDIR)" != "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
- if [ -f Makefile ]; then \
- if $(MAKE) distclean; then \
- true; \
- else \
- exit 1; \
- fi; \
- else \
- true; \
- fi; \
- else \
- exit 1; \
- fi; \
+ srcdiroption="--srcdir=$${topdir}/[+module+]"; \
+ 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+] \
+ || exit 1
+@endif [+prefix+][+module+]
+
+[+ IF bootstrap +]
+[+ FOR bootstrap_stage +]
+.PHONY: configure-stage[+id+]-[+prefix+][+module+] maybe-configure-stage[+id+]-[+prefix+][+module+]
+maybe-configure-stage[+id+]-[+prefix+][+module+]:
+@if [+prefix+][+module+]-bootstrap
+maybe-configure-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
+configure-stage[+id+]-[+prefix+][+module+]:
+ @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
+ @$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ [+ IF check_multilibs
+ +]echo "Checking multilib configuration for [+module+]..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
+ if test -r [+subdir+]/[+module+]/multilib.out; then \
+ if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
+ rm -f [+subdir+]/[+module+]/multilib.tmp; \
else \
- true; \
+ rm -f [+subdir+]/[+module+]/Makefile; \
+ mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
fi; \
- srcdiroption="--srcdir=."; \
- libsrcdir="."; \
else \
- srcdiroption="--srcdir=$${topdir}/[+module+]"; \
- libsrcdir="$$s/[+module+]"; \
+ mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
fi; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(BUILD_CONFIGARGS) $${srcdiroption} \
- --with-build-subdir="$(BUILD_SUBDIR)" \
- || exit 1
-
-.PHONY: all-build-[+module+] maybe-all-build-[+module+]
-maybe-all-build-[+module+]:
-all-build-[+module+]: configure-build-[+module+]
+ [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
+ [+exports+][+ IF prev +] \
+ [+poststage1_exports+][+ ENDIF prev +] \
+ echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
+ $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
+ cd [+subdir+]/[+module+] || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo [+subdir+]/[+module+]/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/[+module+]"; \
+ libsrcdir="$$s/[+module+]"; \
+ $(SHELL) $${libsrcdir}/configure \
+ [+args+] $${srcdiroption} \
+ [+stage_configure_flags+] [+extra_configure_flags+]
+@endif [+prefix+][+module+]-bootstrap
+[+ ENDFOR bootstrap_stage +]
+[+ ENDIF bootstrap +]
+[+ ENDDEF +]
+
+[+ DEFINE all +]
+.PHONY: all-[+prefix+][+module+] maybe-all-[+prefix+][+module+]
+maybe-all-[+prefix+][+module+]:
+@if [+prefix+][+module+]
+TARGET-[+prefix+][+module+]=[+
+ IF target +][+target+][+ ELSE +]all[+ ENDIF 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 +]
+ @: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ [+exports+] \
+ (cd [+subdir+]/[+module+] && \
+ $(MAKE) [+args+] [+extra_make_flags+] $(TARGET-[+prefix+][+module+]))
+@endif [+prefix+][+module+]
+
+[+ IF bootstrap +]
+[+ FOR bootstrap_stage +]
+.PHONY: all-stage[+id+]-[+prefix+][+module+] maybe-all-stage[+id+]-[+prefix+][+module+]
+.PHONY: clean-stage[+id+]-[+prefix+][+module+] maybe-clean-stage[+id+]-[+prefix+][+module+]
+maybe-all-stage[+id+]-[+prefix+][+module+]:
+maybe-clean-stage[+id+]-[+prefix+][+module+]:
+@if [+prefix+][+module+]-bootstrap
+maybe-all-stage[+id+]-[+prefix+][+module+]: all-stage[+id+]-[+prefix+][+module+]
+all-stage[+id+]: all-stage[+id+]-[+prefix+][+module+]
+TARGET-stage[+id+]-[+prefix+][+module+] = $(TARGET-[+prefix+][+module+])
+all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
+ @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- (cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all)
-[+ ENDFOR build_modules +]
+ [+exports+][+ IF prev +] \
+ [+poststage1_exports+][+ ENDIF prev +] \
+ cd [+subdir+]/[+module+] && \
+ $(MAKE) [+args+] [+ IF prev
+ +][+poststage1_args+][+ ENDIF prev
+ +] [+stage_make_flags+] [+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; \
+ cd [+subdir+]/[+module+] && \
+ $(MAKE) [+args+] [+ IF prev +] \
+ [+poststage1_args+] [+ ENDIF prev +] \
+ [+stage_make_flags+] [+extra_make_flags+] clean
+@endif [+prefix+][+module+]-bootstrap
+
+[+ ENDFOR bootstrap_stage +]
+[+ ENDIF bootstrap +]
+[+ ENDDEF +]
+
+# --------------------------------------
+# Modules which run on the build machine
+# --------------------------------------
+[+ FOR build_modules +]
+[+ configure prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
+ args="$(BUILD_CONFIGARGS)" no-config-site=true +]
+
+[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +]
+[+ ENDFOR build_module +]
# --------------------------------------
# Modules which run on the host machine
# --------------------------------------
[+ FOR host_modules +]
-.PHONY: configure-[+module+] maybe-configure-[+module+]
-maybe-configure-[+module+]:
-configure-[+module+]:
- @test ! -f [+module+]/Makefile || exit 0; \
- [ -d [+module+] ] || mkdir [+module+]; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in [+module+]; \
- cd [+module+] || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/[+module+]"; \
- libsrcdir="$$s/[+module+]";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/[+module+]"; \
- libsrcdir="$$s/[+module+]";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- || exit 1
+[+ configure prefix="" subdir="$(HOST_SUBDIR)"
+ exports="$(HOST_EXPORTS)"
+ poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
+ args="$(HOST_CONFIGARGS)" +]
-.PHONY: all-[+module+] maybe-all-[+module+]
-maybe-all-[+module+]:
-all-[+module+]: configure-[+module+]
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
- IF with_x
- +] $(X11_FLAGS_TO_PASS)[+
- ENDIF with_x +] all)
+[+ all prefix="" subdir="$(HOST_SUBDIR)"
+ exports="$(HOST_EXPORTS)"
+ poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
+ args="$(FLAGS_TO_PASS)"
+ poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +]
.PHONY: check-[+module+] maybe-check-[+module+]
maybe-check-[+module+]:
+@if [+module+]
+maybe-check-[+module+]: check-[+module+]
[+ IF no_check +]
check-[+module+]:
[+ ELIF no_check_cross +]
# This module is only tested in a native toolchain.
check-[+module+]:
+ @: $(MAKE); $(unstage)
@if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
- IF with_x
- +] $(X11_FLAGS_TO_PASS)[+
- ENDIF with_x +] check); \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/[+module+] && \
+ $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check); \
fi
[+ ELSE check +]
check-[+module+]:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
- IF with_x
- +] $(X11_FLAGS_TO_PASS)[+
- ENDIF with_x +] check)
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/[+module+] && \
+ $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check)
[+ ENDIF no_check +]
+@endif [+module+]
.PHONY: install-[+module+] maybe-install-[+module+]
maybe-install-[+module+]:
+@if [+module+]
+maybe-install-[+module+]: install-[+module+]
[+ IF no_install +]
install-[+module+]:
[+ ELSE install +]
install-[+module+]: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
- IF with_x
- +] $(X11_FLAGS_TO_PASS)[+
- ENDIF with_x +] install)
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/[+module+] && \
+ $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] install)
[+ ENDIF no_install +]
+@endif [+module+]
+
+# Other targets (info, dvi, etc.)
+[+ FOR recursive_targets +]
+.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
+maybe-[+make_target+]-[+module+]:
+@if [+module+]
+maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
+[+ IF (match-value? = "missing" (get "make_target") ) +]
+# [+module+] doesn't support [+make_target+].
+[+make_target+]-[+module+]:
+[+ ELSE +]
+[+make_target+]-[+module+]: [+
+ FOR depend +]\
+ [+depend+]-[+module+] [+
+ ENDFOR depend +]
+ @[+ IF bootstrap +][+ ELSE +]: $(MAKE); $(unstage)
+ @[+ ENDIF bootstrap +][ -f ./[+module+]/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) [+extra_make_flags+]; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing [+make_target+] in [+module+]" ; \
+ (cd $(HOST_SUBDIR)/[+module+] && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+[+ ENDIF +]
+@endif [+module+]
+[+ ENDFOR recursive_targets +]
[+ ENDFOR host_modules +]
# ---------------------------------------
# Modules which run on the target machine
# ---------------------------------------
[+ FOR target_modules +]
-.PHONY: configure-target-[+module+] maybe-configure-target-[+module+]
-maybe-configure-target-[+module+]:
-
-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
- rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \
- cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out
-
-configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/multilib.out
- @test ! -f $(TARGET_SUBDIR)/[+module+]/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
- CC="$(CC_FOR_TARGET)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \[+
-IF raw_cxx +]
- CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
- CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \[+
-ELSE normal_cxx +]
- CXX="$(CXX_FOR_TARGET)"; export CXX; \[+
-ENDIF raw_cxx +]
- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
- DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
- LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
- NM="$(NM_FOR_TARGET)"; export NM; \
- RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
- WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
- echo Configuring in $(TARGET_SUBDIR)/[+module+]; \
- cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
- *) \
- case "$(TARGET_SUBDIR)" in \
- .) topdir="../$(srcdir)" ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac ;; \
- esac; \[+ IF stage +]
- if [ "$(srcdir)" = "." ] ; then \
- if [ "$(TARGET_SUBDIR)" != "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
- if [ -f Makefile ]; then \
- if $(MAKE) distclean; then \
- true; \
- else \
- exit 1; \
- fi; \
- else \
- true; \
- fi; \
- else \
- exit 1; \
- fi; \
- else \
- true; \
- fi; \
- srcdiroption="--srcdir=."; \
- libsrcdir="."; \
- else \[+ ENDIF stage +]
- srcdiroption="--srcdir=$${topdir}/[+module+]"; \
- libsrcdir="$$s/[+module+]"; \[+ IF stage +]
- fi; \[+ ENDIF stage +]
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
- --with-target-subdir="$(TARGET_SUBDIR)" \
- || exit 1
-.PHONY: all-target-[+module+] maybe-all-target-[+module+]
-maybe-all-target-[+module+]:
-all-target-[+module+]: configure-target-[+module+]
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/[+module+] && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
- IF raw_cxx
- +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
- ENDIF raw_cxx
- +] all)
+[+ IF raw_cxx +]
+[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
+ check_multilibs=true
+ exports="$(RAW_CXX_TARGET_EXPORTS)"
+ args="$(TARGET_CONFIGARGS)" no-config-site=true +]
+
+[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
+ exports="$(RAW_CXX_TARGET_EXPORTS)"
+ args="$(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
+[+ ELSE +]
+[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
+ check_multilibs=true
+ exports="$(NORMAL_TARGET_EXPORTS)"
+ args="$(TARGET_CONFIGARGS)" no-config-site=true +]
+
+[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
+ exports="$(NORMAL_TARGET_EXPORTS)"
+ args="$(TARGET_FLAGS_TO_PASS)" +]
+[+ ENDIF +]
.PHONY: check-target-[+module+] maybe-check-target-[+module+]
maybe-check-target-[+module+]:
+@if target-[+module+]
+maybe-check-target-[+module+]: check-target-[+module+]
[+ IF no_check +]
# Dummy target for uncheckable module.
check-target-[+module+]:
[+ ELSE check +]
check-target-[+module+]:
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
+IF raw_cxx +]
+ $(RAW_CXX_TARGET_EXPORTS) \[+
+ELSE normal_cxx +]
+ $(NORMAL_TARGET_EXPORTS) \[+
+ENDIF raw_cxx +]
(cd $(TARGET_SUBDIR)/[+module+] && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) [+
IF raw_cxx
+] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
ENDIF raw_cxx
- +] check)
+ +] [+extra_make_flags+] check)
[+ ENDIF no_check +]
+@endif target-[+module+]
.PHONY: install-target-[+module+] maybe-install-target-[+module+]
maybe-install-target-[+module+]:
+@if target-[+module+]
+maybe-install-target-[+module+]: install-target-[+module+]
[+ IF no_install +]
# Dummy target for uninstallable.
install-target-[+module+]:
[+ ELSE install +]
install-target-[+module+]: installdirs
+ @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
+IF raw_cxx +]
+ $(RAW_CXX_TARGET_EXPORTS) \[+
+ELSE normal_cxx +]
+ $(NORMAL_TARGET_EXPORTS) \[+
+ENDIF raw_cxx +]
(cd $(TARGET_SUBDIR)/[+module+] && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) [+extra_make_flags+] install)
[+ ENDIF no_install +]
+@endif target-[+module+]
+
+# Other targets (info, dvi, etc.)
+[+ FOR recursive_targets +]
+.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
+maybe-[+make_target+]-target-[+module+]:
+@if target-[+module+]
+maybe-[+make_target+]-target-[+module+]: [+make_target+]-target-[+module+]
+[+ IF (match-value? = "missing" (get "make_target") ) +]
+# [+module+] doesn't support [+make_target+].
+[+make_target+]-target-[+module+]:
+[+ ELSE +]
+[+make_target+]-target-[+module+]: [+
+ FOR depend +]\
+ [+depend+]-target-[+module+] [+
+ ENDFOR depend +]
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
+IF raw_cxx +]
+ $(RAW_CXX_TARGET_EXPORTS) \[+
+ELSE normal_cxx +]
+ $(NORMAL_TARGET_EXPORTS) \[+
+ENDIF raw_cxx +]
+ echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/[+module+] && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+extra_make_flags+] [+make_target+]) \
+ || exit 1
+[+ ENDIF +]
+@endif target-[+module+]
+[+ ENDFOR recursive_targets +]
[+ ENDFOR target_modules +]
# ----------
# GCC module
# ----------
-# Unfortunately, while gcc _should_ be a host module,
-# libgcc is a target module, and gen* programs are
-# build modules. So GCC is a sort of hybrid.
-
-# gcc is the only module which uses GCC_FLAGS_TO_PASS.
-# Don't use shared host config.cache, as it will confuse later
-# directories; GCC wants slightly different values for some
-# precious variables. *sigh*
-.PHONY: configure-gcc maybe-configure-gcc
-maybe-configure-gcc:
-configure-gcc:
- @test ! -f gcc/Makefile || exit 0; \
- [ -d gcc ] || mkdir gcc; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- CC="$(CC)"; export CC; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- echo Configuring in gcc; \
- cd gcc || exit 1; \
- case $(srcdir) in \
- \.) \
- srcdiroption="--srcdir=."; \
- libsrcdir=".";; \
- /* | [A-Za-z]:[\\/]*) \
- srcdiroption="--srcdir=$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- *) \
- srcdiroption="--srcdir=../$(srcdir)/gcc"; \
- libsrcdir="$$s/gcc";; \
- esac; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- || exit 1
-
-# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
-# causes trouble. This wart will be fixed eventually by moving
-# the bootstrap behavior to this file.
-.PHONY: all-gcc maybe-all-gcc
-maybe-all-gcc:
-all-gcc: configure-gcc
- @if [ -f gcc/stage_last ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
- else \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
- fi
+@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.
-# Building GCC uses some tools for rebuilding "source" files
-# like texinfo, bison/byacc, etc. So we must depend on those.
-#
-# While building GCC, it may be necessary to run various target
-# programs like the assembler, linker, etc. So we depend on
-# those too.
-#
-# In theory, on an SMP all those dependencies can be resolved
-# in parallel.
-#
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-bootstrap configure-gcc
+$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(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; \
@@ -1166,64 +1118,51 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
msg="Comparing stage2 and stage3 of the compiler"; \
compare=compare ;; \
esac; \
- $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "$$msg"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- $(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-profiledbootstrap: all-bootstrap configure-gcc
+profiledbootstrap: all-prebootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Bootstrapping the compiler"; \
+ $(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; \
- $(SET_LIB_PATH) \
- echo "Building runtime libraries and training compiler"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
- @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(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-texinfo all-bison all-byacc all-binutils all-gas all-ld
+cross: all-build all-gas all-ld
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
echo "Building the C and C++ compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- $(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
- LANGUAGES="c c++" all
-
-.PHONY: check-gcc maybe-check-gcc
-maybe-check-gcc:
-check-gcc:
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
- else \
- true; \
- fi
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
+@endif gcc-no-bootstrap
+@if gcc
.PHONY: check-gcc-c++
check-gcc-c++:
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
else \
true; \
@@ -1232,18 +1171,6 @@ check-gcc-c++:
.PHONY: check-c++
check-c++: check-target-libstdc++-v3 check-gcc-c++
-.PHONY: install-gcc maybe-install-gcc
-maybe-install-gcc:
-install-gcc:
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
- else \
- true; \
- fi
-
# Install the gcc headers files, but not the fixed include files,
# which Cygnus is not allowed to distribute. This rule is very
# dependent on the workings of the gcc Makefile.in.
@@ -1258,134 +1185,396 @@ gcc-no-fixedincludes:
rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- $(SET_LIB_PATH) \
+ $(HOST_EXPORTS) \
(cd ./gcc && \
$(MAKE) $(GCC_FLAGS_TO_PASS) install); \
rm -rf gcc/include; \
mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi
+@endif gcc
+
+# ---------------------
+# GCC bootstrap support
+# ---------------------
+
+# We track the current stage (the one in 'gcc') in the stage_current file.
+# stage_last instead tracks the stage that was built last. These targets
+# are dummy when toplevel bootstrap is not active.
+
+# While making host and target tools, symlinks to the final stage must be
+# there, so $(unstage) should be run at various points. To avoid excessive
+# recursive invocations of make, we "inline" them using a variable. These
+# must be referenced as ": $(MAKE) ; $(unstage)" rather than "$(unstage)"
+# to avoid warnings from the GNU Make job server.
+
+unstage = :
+stage = :
+current_stage = ""
+
+@if gcc-bootstrap
+unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start
+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
+
+.PHONY: unstage stage
+unstage:
+ @: $(MAKE); $(unstage)
+stage:
+ @: $(MAKE); $(stage)
+
+# Disable commands for lean bootstrap.
+LEAN = false
+
+# We name the build directories for the various stages "stage1-gcc",
+# "stage2-gcc","stage3-gcc", etc.
+
+# Since the 'compare' process will fail (on debugging information) if any
+# directory names are different, we need to link the gcc directory for
+# the previous stage to a constant name ('prev-gcc'), and to make the name of
+# the build directories constant as well. For the latter, we use naked names
+# like 'gcc', because the scripts in that directory assume it. We use
+# mv on platforms where symlinks to directories do not work or are not
+# reliable.
+
+# '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
+
+stage[+id+]-start::
+ @: $(MAKE); $(stage); \
+ echo stage[+id+] > stage_current ; \
+ echo stage[+id+] > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)[+
+ FOR host_modules +][+ IF bootstrap +]
+@if [+ module +]
+ @cd $(HOST_SUBDIR); [ -d stage[+id+]-[+module+] ] || \
+ mkdir stage[+id+]-[+module+]; \
+ mv stage[+id+]-[+module+] [+module+] [+ IF prev +] ; \
+ mv stage[+prev+]-[+module+] prev-[+module+] || test -f stage[+prev+]-lean [+ ENDIF prev +]
+@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
+ @[ -d stage[+id+]-$(TARGET_SUBDIR) ] || \
+ mkdir stage[+id+]-$(TARGET_SUBDIR); \
+ mv stage[+id+]-$(TARGET_SUBDIR) $(TARGET_SUBDIR) [+ IF prev +] ; \
+ mv stage[+prev+]-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage[+prev+]-lean [+ ENDIF prev +]
+
+stage[+id+]-end:: [+ FOR host_modules +][+ IF bootstrap +]
+@if [+ module +]
+ @if test -d $(HOST_SUBDIR)/[+module+] ; then \
+ cd $(HOST_SUBDIR); mv [+module+] stage[+id+]-[+module+] [+ IF prev +]; \
+ mv prev-[+module+] stage[+prev+]-[+module+] ; : [+ ENDIF prev +] ; \
+ fi
+@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
+ @if test -d $(TARGET_SUBDIR) ; then \
+ mv $(TARGET_SUBDIR) stage[+id+]-$(TARGET_SUBDIR) [+ IF prev +] ; \
+ mv prev-$(TARGET_SUBDIR) stage[+prev+]-$(TARGET_SUBDIR) ; : [+ ENDIF prev +] ; \
+ fi
+ rm -f stage_current
+
+# Bubble a bugfix 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
+stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +]
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage[+id+]-lean [+
+ IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +] ; then \
+ echo Skipping rebuild of stage[+id+] ; \
+ else \
+ $(MAKE) stage[+id+]-start; \[+IF lean +]
+ if $(LEAN); then \
+ rm -rf stage[+lean+]-* ; \
+ $(STAMP) stage[+lean+]-lean ; \
+ fi; \[+ ENDIF lean +]
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \
+ fi[+ IF compare-target +]
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+compare-target+][+ ENDIF compare-target +]
+
+.PHONY: all-stage[+id+] clean-stage[+id+]
+do-clean: clean-stage[+id+]
+
+# FIXME: Will not need to be conditional when toplevel bootstrap is the
+# only possibility, but now it conflicts with no-bootstrap rules
+@if gcc-bootstrap
+[+ IF compare-target +]
+[+compare-target+]:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage[+prev+]-lean; then \
+ echo Cannot compare object files as stage [+prev+] was deleted. ; \
+ exit 0 ; \
+ fi; \
+ : $(MAKE); $(stage); \
+ rm -f .bad_compare ; \
+ echo Comparing stages [+prev+] and [+id+] ; \
+ cd stage[+id+]-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \
+ cd .. ; \
+ for file in $${files} ; do \
+ f1=$$r/stage[+prev+]-gcc/$$file; f2=$$r/stage[+id+]-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
+ if test $$? -eq 1; then \
+ case $$file in \
+ ./cc*-checksum$(objext) | ./libgcc/* ) \
+ echo warning: $$file differs ;; \
+ *) \
+ echo $$file differs >> .bad_compare ;; \
+ esac ; \
+ fi ; \
+ done ; \
+ if [ -f .bad_compare ]; then \
+ echo "Bootstrap comparison failure!"; \
+ cat .bad_compare; \
+ exit 1; \
+ else \
+ echo Comparison successful.; \
+ fi ; \
+ $(STAMP) [+compare-target+][+ IF prev +]
+ if $(LEAN); then \
+ rm -rf stage[+prev+]-*; \
+ $(STAMP) stage[+prev+]-lean; \
+ fi[+ ENDIF prev +]
+[+ ENDIF compare-target +]
+
+[+ IF bootstrap-target +]
+.PHONY: [+bootstrap-target+] [+bootstrap-target+]-lean
+[+bootstrap-target+]:
+ 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
+
+[+bootstrap-target+]-lean:
+ echo stage[+id+] > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: 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 bootstrap-target +]
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+[+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +]
+.PHONY: distclean-stage[+id+]
+distclean-stage[+id+]::
+ @: $(MAKE); $(stage)
+ rm -rf stage[+id+]-* [+
+ IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
+
+[+ IF cleanstrap-target +]
+.PHONY: [+cleanstrap-target+]
+[+cleanstrap-target+]: distclean [+bootstrap-target+]
+[+ ENDIF cleanstrap-target +]
+@endif gcc-bootstrap
+
+[+ ENDFOR bootstrap-stage +]
+
+stageprofile-end::
+ $(MAKE) distclean-stagefeedback
+
+stagefeedback-start::
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ for i in prev-*; do \
+ j=`echo $$i | sed s/^prev-//` ; \
+ cd $$r/$$i && \
+ { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL) ; } && \
+ { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL) ; } ; \
+ done
+
+@if gcc-bootstrap
+do-distclean: distclean-stage1
+
+# Provide a GCC build when we're building target libraries. This does
+# 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
+
+.PHONY: restrap
+restrap:
+ @: $(MAKE); $(stage)
+ rm -rf stage1-$(TARGET_SUBDIR) [+ FOR bootstrap-stage +][+ IF prev
+ +]stage[+id+] [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
# --------------------------------------
# Dependencies between different modules
# --------------------------------------
+# Generic dependencies for target modules on host stuff, especially gcc
+@if gcc-bootstrap[+ FOR target_modules +][+ IF bootstrap
+ +][+ FOR bootstrap_stage +]
+configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-gcc[+
+ ENDFOR +][+ ELSE bootstrap +]
+configure-target-[+module+]: stage_last[+
+ ENDIF bootstrap +][+ ENDFOR target_modules +]
+@endif gcc-bootstrap
+
+@if gcc-no-bootstrap[+ FOR target_modules +][+ IF bootstrap
+ +][+ ELSE +]
+configure-target-[+module+]: maybe-all-gcc[+
+ ENDIF bootstrap +][+ 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
# or find a substitute somewhere (perhaps installed). Soft dependencies
-# are specified by depending on a 'maybe-' target. If you're not sure,
+# are made here to depend on a 'maybe-' target. If you're not sure,
# it's safer to use a soft dependency.
-# Host modules specific to gcc.
-# GCC needs to identify certain tools.
-# GCC also needs the information exported by the intl configure script.
-configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
-all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
-# This is a slightly kludgy method of getting dependencies on
-# all-build-libiberty correct; it would be better to build it every time.
-all-gcc: maybe-all-build-libiberty
-all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
-
-# Host modules specific to gdb.
-# GDB needs to know that the simulator is being built.
-configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
+[+ ;; These Scheme functions build the bulk of the dependencies.
+ ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc",
+ ;; where "maybe-" is only included if HARD is true, and all-gcc
+ ;; is taken from VAR-NAME.
+ (define dep-target (lambda (module-kind var-name hard)
+ (string-append
+ (if hard "" "maybe-")
+ (dep-subtarget var-name)
+ module-kind
+ (dep-module var-name)
+ )))
+
+ ;; make-dep builds a dependency from the MODULE and ON AutoGen vars.
+ (define make-dep (lambda (module-kind on-kind)
+ (string-append
+ (dep-target module-kind "module" #t) ": "
+ (dep-target on-kind "on" (exist? "hard")))))
+
+ ;; dep-subtarget extracts everything up to the first dash in the given
+ ;; AutoGen variable, for example it extracts "all-" out of "all-gcc".
+ (define dep-subtarget (lambda (var-name)
+ (substring (get var-name) 0 (+ 1 (string-index (get var-name) #\-)))))
+
+ ;; dep-module extracts everything up to the first dash in the given
+ ;; AutoGen variable, for example it extracts "gcc" out of "all-gcc".
+ (define dep-module (lambda (var-name)
+ (substring (get var-name) (+ 1 (string-index (get var-name) #\-)))))
+
+ ;; dep-stage builds a string for the prefix of a bootstrap stage.
+ (define dep-stage (lambda ()
+ (string-append
+ "stage"
+ (get "id")
+ "-")))
+
+ ;; dep-maybe is the same as the AutoGen expression "- hard 'maybe-'"
+ ;; but is written in Scheme.
+ (define dep-maybe (lambda ()
+ (if (exist? "hard") "" "maybe-")))
+
+ ;; dep-kind returns "normal" if the dependency is on an "install" target,
+ ;; or if either module is not bootstrapped. It returns "bootstrap" for
+ ;; configure or build dependencies between bootstrapped modules; it returns
+ ;; "prebootstrap" for configure or build dependencies of bootstrapped
+ ;; modules on a build module (e.g. all-gcc on all-build-bison). All this
+ ;; is only necessary for host modules.
+ (define dep-kind (lambda ()
+ (if (and (hash-ref boot-modules (dep-module "module"))
+ (=* (dep-module "on") "build-"))
+ "prebootstrap"
+
+ (if (or (= (dep-subtarget "on") "install-")
+ (not (hash-ref boot-modules (dep-module "module")))
+ (not (hash-ref boot-modules (dep-module "on"))))
+ "normal"
+ "bootstrap"))))
+
+ ;; We now build the hash table that is used by dep-kind.
+ (define boot-modules (make-hash-table 113))
++]
+
+[+ FOR host_modules +][+
+ (if (exist? "bootstrap")
+ (hash-create-handle! boot-modules (get "module") #t))
+ "" +][+ ENDFOR host_modules +]
+[+ FOR target_modules +][+
+ (if (exist? "bootstrap")
+ (hash-create-handle! boot-modules (string-append "target-" (get "module")) #t))
+ "" +][+ ENDFOR target_modules +]
+
+# With all the machinery above in place, it is pretty easy to generate
+# dependencies. Host dependencies are a bit more complex because we have
+# to check for bootstrap/prebootstrap dependencies. To resolve
+# prebootstrap dependencies, prebootstrap modules are gathered in
+# a hash table.
+[+ FOR dependencies +][+ (make-dep "" "") +]
+[+ CASE (dep-kind) +]
+[+ == "prebootstrap"
+ +][+ 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)) +][+
+ ENDFOR bootstrap_stage +]
+[+ 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 +]
+@endif gcc-no-bootstrap
+
+CONFIGURE_GDB_TK = @CONFIGURE_GDB_TK@
GDB_TK = @GDB_TK@
-all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
-install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
-configure-libgui: maybe-configure-tcl maybe-configure-tk
-all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
-
-# Host modules specific to binutils.
-configure-bfd: configure-libiberty
-all-bfd: maybe-all-libiberty maybe-all-intl
-all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
-# We put install-opcodes before install-binutils because the installed
-# binutils might be on PATH, and they might need the shared opcodes
-# library.
-install-binutils: maybe-install-opcodes
-# libopcodes depends on libbfd
-install-opcodes: maybe-install-bfd
-all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
-all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
-all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
-all-opcodes: maybe-all-bfd maybe-all-libiberty
-
-# Other host modules in the 'src' repository.
-all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
-configure-expect: maybe-configure-tcl maybe-configure-tk
-all-expect: maybe-all-tcl maybe-all-tk
-configure-itcl: maybe-configure-tcl maybe-configure-tk
-all-itcl: maybe-all-tcl maybe-all-tk
-# We put install-tcl before install-itcl because itcl wants to run a
-# program on installation which uses the Tcl libraries.
-install-itcl: maybe-install-tcl
-all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
-install-sid: maybe-install-tcl maybe-install-tk
-all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
-configure-tk: maybe-configure-tcl
-all-tk: maybe-all-tcl
-configure-tix: maybe-configure-tcl maybe-configure-tk
-all-tix: maybe-all-tcl maybe-all-tk
-all-texinfo: maybe-all-libiberty
-
-# Other host modules. Warning, these are not well tested.
-all-autoconf: maybe-all-m4 maybe-all-texinfo
-all-automake: maybe-all-m4 maybe-all-texinfo
-all-bison: maybe-all-texinfo
-all-diff: maybe-all-libiberty
-all-fastjar: maybe-all-zlib maybe-all-libiberty
-all-fileutils: maybe-all-libiberty
-all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
-all-gzip: maybe-all-libiberty
-all-hello: maybe-all-libiberty
-all-m4: maybe-all-libiberty maybe-all-texinfo
-all-make: maybe-all-libiberty maybe-all-intl
-all-patch: maybe-all-libiberty
-all-prms: maybe-all-libiberty
-all-recode: maybe-all-libiberty
-all-sed: maybe-all-libiberty
-all-send-pr: maybe-all-prms
-all-tar: maybe-all-libiberty
-all-uudecode: maybe-all-libiberty
-
-ALL_GCC = maybe-all-gcc
-ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
-ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
-
-# Target modules specific to gcc.
-configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
-configure-target-fastjar: maybe-configure-target-zlib
-all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
-configure-target-libf2c: $(ALL_GCC_C)
-all-target-libf2c: maybe-all-target-libiberty
-configure-target-libffi: $(ALL_GCC_C)
-configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
-all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
-configure-target-libobjc: $(ALL_GCC_C)
-all-target-libobjc: maybe-all-target-libiberty
-configure-target-libstdc++-v3: $(ALL_GCC_C)
-all-target-libstdc++-v3: maybe-all-target-libiberty
-configure-target-zlib: $(ALL_GCC_C)
-
-# Target modules in the 'src' repository.
-configure-target-examples: $(ALL_GCC_C)
-configure-target-libgloss: $(ALL_GCC)
-all-target-libgloss: maybe-configure-target-newlib
-configure-target-libiberty: $(ALL_GCC)
-configure-target-libtermcap: $(ALL_GCC_C)
-configure-target-newlib: $(ALL_GCC)
-configure-target-rda: $(ALL_GCC_C)
-configure-target-winsup: $(ALL_GCC_C)
-all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
-
-# Other target modules. Warning, these are not well tested.
-configure-target-gperf: $(ALL_GCC_CXX)
-all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
-configure-target-qthreads: $(ALL_GCC_C)
-
-# Dependencies of maybe-foo on foo. These are used because, for example,
-# all-gcc only depends on all-gas if gas is present and being configured.
-@maybe_dependencies@
+INSTALL_GDB_TK = @INSTALL_GDB_TK@
+configure-gdb: $(CONFIGURE_GDB_TK)
+all-gdb: $(gdbnlmrequirements) $(GDB_TK)
+install-gdb: $(INSTALL_GDB_TK)
# Serialization dependencies. Host configures don't work well in parallel to
# each other, due to contention over config.cache. Target configures and
@@ -1396,17 +1585,6 @@ configure-target-qthreads: $(ALL_GCC_C)
# Regenerating top level configury
# --------------------------------
-# Multilib.out tells target dirs what multilibs they should build.
-# There is really only one copy. We use the 'timestamp' method to
-# work around various timestamp bugs on some systems.
-# We use move-if-change so that it's only considered updated when it
-# actually changes, because it has to depend on a phony target.
-multilib.out: maybe-all-gcc
- @r=`${PWD_COMMAND}`; export r; \
- echo "Checking multilib configuration..."; \
- $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
- $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
-
# Rebuilding Makefile.in, using autogen.
AUTOGEN = autogen
$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
@@ -1416,7 +1594,7 @@ $(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
Makefile: $(srcdir)/Makefile.in config.status
CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-config.status: configure $(gcc_version_trigger)
+config.status: configure
CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck
# Rebuilding configure.
diff --git a/contrib/binutils/bfd/ChangeLog b/contrib/binutils/bfd/ChangeLog
index 89cf8797d6bc..5bb5bb2a6009 100644
--- a/contrib/binutils/bfd/ChangeLog
+++ b/contrib/binutils/bfd/ChangeLog
@@ -1,1276 +1,1359 @@
-2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
+2006-12-11 Eric Botcazou <ebotcazou@adacore.com>
- * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
- from STABS debugging sections again.
+ * elflink.c (bfd_elf_gc_sections): Also search for corresponding
+ sections with .gnu.linkonce.t. prefix.
-2004-10-16 H.J. Lu <hongjiu.lu@intel.com>
+2006-08-08 Nick Clifton <nickc@redhat.com>
- * elflink.c (elf_link_add_object_symbols): Also clear
- _cooked_size for warning sections.
+ PR binutils/2724
+ * coffcode.h (coff_new_section_hook): Only modify the section
+ symbol of sections which were created by the user.
-2004-09-07 Eric Botcazou <ebotcazou@libertysurf.fr>
+2006-07-19 Alan Modra <amodra@bigpond.net.au>
- Merge from mainline:
- 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
- * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
+ * 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-12 Matthew R. Dempsky <mrd@alkemio.org>
+
+ * cpu-m68k.c (bfd_m68k_compatible): Handle CPU32.
+
+2006-06-23 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am: Clear RELEASE.
+ * Makefile.in: Regenerated.
+
+2006-06-23 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Update version to 2.17.
+ * Makefile.am: Set RELEASE.
+ * configure, Makefile.in: Regenerated.
+
+2006-06-12 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Update version to 2.16.94.
+ * configure: Regenerated.
+
+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.
- 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
- * elflink.c (elf_sort_symbol): Compare section id, not pointers.
- (elf_link_add_object_symbols): Likewise.
+2006-06-08 David Daney <ddaney@avtrex.com>
-2004-08-10 Daniel Jacobowitz <dan@debian.org>
+ * 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.
- * elf.c (assign_file_positions_except_relocs): Revert unintended
- change from 2004-04-08.
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
-2004-05-28 Jason Thorpe <thorpej@wasabisystems.com>
+ * po/Make-in (pdf, ps): New dummy targets.
- * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
- bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
- to targ_selvecs.
- * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
- * configure: Regenerate.
- * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
- case that accepts OSABI=NetBSD and OSABI=SysV.
- (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
- the base of .got or .data (if .got does not exist).
- (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
- set OSABI=NetBSD.
- (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
- (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
- * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
- (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
-
-2004-05-17 Daniel Jacobowitz <dan@debian.org>
-
- * configure.in: Mark unreleased for post-2.15 snapshots.
- * configure: Regenerate.
+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>
-2004-05-17 Daniel Jacobowitz <dan@debian.org>
+ * po/es.po: Updated Spanish translation.
- * configure.in: Bump version to 2.15. Mark as released.
- * configure: Regenerate.
+2006-05-23 Alan Modra <amodra@bigpond.net.au>
-2004-05-13 Joel Sherrill <joel@oarcorp.com>
+ * elf64-ppc.c (compare_symbols): Prefer strong dynamic global
+ function syms over other syms.
- * config.bfd (or32-*-rtems*): Switch to elf.
+2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
-2004-05-13 Nick Clifton <nickc@redhat.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.
- * po/fr.po: Updated French translation.
+2006-05-17 Daniel Jacobowitz <dan@codesourcery.com>
-2004-05-07 Daniel Jacobowitz <dan@debian.org>
+ * configure.in: Update version to 2.16.93.
+ * configure: Regenerated.
- * configure.in: Bump version to 2.14.92.
- * configure: Regenerate.
+2006-05-17 Alan Modra <amodra@bigpond.net.au>
-2004-05-07 Daniel Jacobowitz <dan@debian.org>
-
- Merge from mainline:
- 2004-04-16 Alan Modra <amodra@bigpond.net.au>
- * simple.c (bfd_simple_get_relocated_section_contents): Don't
- change reloc_done. Set and restore _cooked_size.
- (RETURN): Delete.
-
-2004-05-07 Alexandre Oliva <aoliva@redhat.com>
-
- * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
- immediately if there's no link info.
- (elf32_frvfdpic_copy_private_bfd_data): New.
- (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
-
-2004-05-06 Zack Weinberg <zack@codesourcery.com>
-
- * dwarf2.c (add_line_info): Also set info->filename to NULL if
- filename argument is null; do not call strlen on a null pointer.
-
-2004-05-06 Daniel Jacobowitz <drow@mvista.com>
-
- * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
- special case.
-
-2004-05-05 Alexandre Oliva <aoliva@redhat.com>
-
- * configure.in (bfd_elf32_frvfdpic_vec): New.
- * configure: Rebuilt.
- * targets.c (bfd_elf32_frvfdpic_vec): New.
- * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
- on the latter.
- * elf32-frv.c: Prefix all identifiers added for FDPIC support with
- frvfdpic instead of frv. Rearrange elf-target macros such that
- the FDPIC-specific ones are only defined for this new target
- vector.
- (bfd_elf32_frvfdpic_vec): Declare.
- (IS_FDPIC): New.
- (elf32_frv_relocate_section): Use it to enable segment checking
- and to control rofixup emission. Add output section vma to
- applied relocation in non-LOAD non-ALLOC sections. Use
- _bfd_error_handler for errors.
- (_frv_create_got_section): Create .rel.got and .rofixup only in
- FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
- linker script.
- (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
- (elf32_frvfdpic_modify_segment_map): Likewise.
- (elf32_frv_finish_dynamic_sections): New, do-nothing.
- (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
- error message if we miscompute the rofixup size.
- (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
- (frvfdpic_elf_encode_eh_address): Likewise.
- (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
- Record relocs only in FDPIC. Make sure _gp is defined for GPREL
- relocs. Reject unknown relocation types.
- (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
- (frv_elf_merge_private_bfd_data): Likewise.
- (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
- 0x4000 for newly-added elf32-frvfdpic.
-
-2004-05-05 Alexandre Oliva <aoliva@redhat.com>
-
- Merge from mainline:
- 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
- * elf-bfd.h (struct elf_backend_data): Added
- elf_backend_can_make_relative_eh_frame,
- elf_backend_can_make_lsda_relative_eh_frame and
- elf_backend_encode_eh_address.
- (_bfd_elf_encode_eh_address): Declare.
- (_bfd_elf_can_make_relative): Declare.
- * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
- hooks to decide whether to attempt to make_relative and
- make_lsda_relative.
- (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
- (_bfd_elf_can_make_relative): New.
- (_bfd_elf_encode_eh_address): New.
- * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
- (frv_elf_encode_eh_address): New.
- (elf_backend_can_make_relative_eh_frame): Define.
- (elf_backend_can_make_lsda_relative_eh_frame): Define.
- (elf_backend_encode_eh_address): Define.
- * elfxx-target.h
- (elf_backend_can_make_relative_eh_frame): Define.
- (elf_backend_can_make_lsda_relative_eh_frame): Define.
- (elf_backend_encode_eh_address): Define.
- (elfNN_bed): Add them.
-
-2004-04-27 Bob Wilson <bob.wilson@acm.org>
-
- * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
- if set. Check reloc_done flag before applying relocations. Use
- output addresses, both when applying relocations and when comparing
- against the specified section.
- (elf_xtensa_relocate_section): Use output address to check if dynamic
- reloc is in a literal pool. Set section's reloc_done flag.
-
-2004-04-21 Philip Blundell <pb@nexus.co.uk>
-
- * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
- relocs for locally defined symbols during -shared final link.
- (elf32_arm_final_link_relocate): Likewise.
-
-2004-04-21 Bob Wilson <bob.wilson@acm.org>
-
- * elf32-xtensa.c (is_same_value): Add final_static_link argument and
- require relocations against a weak symbol to reference the same
- symbol hash entry if not a final, static link.
- (get_cached_value, add_value_map): Add final_static_link argument.
- (remove_literals): Pass final_static_link argument as needed.
-
-2004-04-16 Nick Clifton <nickc@redhat.com>
-
- * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
-
-2004-04-16 H.J. Lu <hongjiu.lu@intel.com>
-
- * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
- when it is a definition.
-
-2004-04-16 Alan Modra <amodra@bigpond.net.au>
-
- * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
- when statically linking PIC code.
- * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
-
-2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
- * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
- targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
- * configure: Regenerate.
+ * elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
+ non-load sections if they have relocs.
+
+2006-05-16 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-15 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2658
+ * elf32-ppc.c (ppc_elf_relax_section): Don't segfault on non-pic
+ -shared link.
-2004-04-09 Daniel Jacobowitz <drow@mvista.com>
-
- * configure.in: Update version to 2.14.91.
- * configure: Likewise.
-
-2004-04-09 Daniel Jacobowitz <drow@mvista.com>
-
- Merge from mainline:
- 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
- * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
- ".MIPS.stubs".
-
- 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
- * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
- reserve the memory for dynamic linker
-
- 2004-04-05 Mark Kettenis <kettenis@gnu.org>
- * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
- (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
-
- 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
- * stabs.c (struct stab_link_includes_totals): Add field 'symb'
- that keeps the characters in a B_INCL..B_EINCL range.
- (_bfd_link_section_stabs): When computing the sum of the
- characters in a B_INCL..B_EINCL range also keep a copy of those
- characters. Use this information to distinguish between
- include sections that have the same sum and the same length
- but which are nevertheless unique.
-
- 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
- * stabs.c (struct stab_link_includes_totals): Rename field 'total'
- to 'sum_chars' and add field 'num_chars'.
- (_bfd_link_section_stabs): When computing the sum of the
- characters in a B_INCL..B_EINCL range also keep a count of the
- number of characters. Use this information to help distinguish
- between include sections when have the same sum but which
- nevertheless are still unique.
-
- 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
- * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
-
- 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
- * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
- (final_link_relocate): Likewise.
-
- 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
- * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
- R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
-
- 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
- * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
- logic for null_input_bfd detection.
-
- 2004-03-12 Nick Clifton <nickc@redhat.com>
- Dave Murphy <wintermute2k4@ntlworld.com>
-
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
- if the input bfd does not contain any code.
-
- 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
- dynrelocs.
- (_frv_count_got_plt_entries): Initialize them.
- (frv_pic_relocs_info_find): Add insert argument. Adjust all
- callers.
- (frv_pic_relocs_info_for_global): Likewise.
- (frv_pic_relocs_info_for_local): Likewise.
- (frv_pic_merge_early_relocs_info): New.
- (_frv_resolve_final_relocs_info): Use it in case one entry maps to
- another.
- (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
- Check that we don't exceed the allocated count for entry.
- (_frv_add_rofixup): Likewise.
- (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
- (elf32_frv_finish_dynamic_sections): Improve error message in case
- we emit too few rofixup entries.
-
- 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
- complain_on_overflow to signed.
-
- 2004-02-27 Jakub Jelinek <jakub@redhat.com>
- * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
- for pc relative relocs.
- (elf_s390_relocate_section): Likewise.
- * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
- for pc relative relocs.
- (elf_s390_relocate_section): Likewise.
-
- 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
- * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
- count_dyn_reloc.
-
- 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
- * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
- field to track if a relocation is against readonly section.
- (count_dyn_reloc): Take a new argument for rent->reltext.
- (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
- (get_reloc_section): Don't set ia64_info->reltext here.
- (allocate_dynrel_entries): Set ia64_info->reltext here.
-
- 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
- (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
- function's descriptor to symbol+offset, and map local undefweak
- symbol to NULL function descriptor.
- (elf32_frv_relocate_section): Likewise.
-
- 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
- * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
- IMAGE_SCN_MEM_WRITE on known sections only.
-
- 2004-02-19 Jakub Jelinek <jakub@redhat.com>
- * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
- .plt sh_entsize.
-
-2004-04-08 Richard Sandiford <rsandifo@redhat.com>
-
- * elflink.c: Include libiberty.h.
- * Makefile.am (elflink.lo): Depend on libiberty.h.
- * Makefile.in: Regenerate.
+2006-05-11 Michael Matz <matz@suse.de>
+
+ * elflink.c (match_group_member): Correctly iterate group
+ members.
+
+2006-05-11 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 Nick Clifton <nickc@redhat.com>
+
+ PR ld/2257
+ * elfcode.h (elf_object_p): Allow files with corrupt e_shstrndx
+ fields to still be handled as ELF files.
+
+2006-05-10 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2342
+ * elflink.c (_bfd_elf_default_action_discarded): Revert 2006-02-16.
+
+2006-05-10 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-03 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-05-02 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Set thumb funciton bit
+ for R_ARM_REL32.
+
+2006-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ * coff-rs6000.c (xcoff_write_archive_contents_old): Warning fix.
+
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Update version to 2.16.92.
+ * configure: Regenerated.
-2004-04-08 Alan Modra <amodra@bigpond.net.au>
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
- Apply from mainline.
- 2004-03-30 Jakub Jelinek <jakub@redhat.com>
- * elf.c (map_sections_to_segments): Fix handling of .tbss.
+ * po/SRC-POTFILES.in: Regenerated.
- 2004-03-27 Alan Modra <amodra@bigpond.net.au>
- * Makefile.am: Remove all mention of elflink.h.
+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.
- * bfd-in.h (bfd_elf_discard_info): Declare.
- (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
- * bfd-in2.h: Regenerate.
- * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
- bfd_elf32_link_record_dynamic_symbol,
- bfd_elf64_link_record_dynamic_symbol,
- _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
- bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
- _bfd_elf32_link_record_local_dynamic_symbol,
- _bfd_elf64_link_record_local_dynamic_symbol,
- _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
- _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
- _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
- _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
- _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
- _bfd_elf32_reloc_symbol_deleted_p,
- _bfd_elf64_reloc_symbol_deleted_p): Delete.
- (bfd_elf_link_record_dynamic_symbol,
- bfd_elf_link_record_local_dynamic_symbol,
- bfd_elf_final_link, bfd_elf_gc_sections,
- bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
- bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
- bfd_elf_reloc_symbol_deleted_p): Declare.
- (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
- * elf32-arm.h: Update for changed function names. Remove local
- WILL_CALL_FINISH_DYNAMIC_SECTION define.
- * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
- * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
- * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
- * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
- * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
- * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
- * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
- * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
- * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
- (bfd_elfNN_print_symbol): Define.
- * elfcode.h: Don't include elflink.h.
- (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
- elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
- elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
- elf_gc_record_vtinherit, elf_gc_record_vtentry,
- elf_link_record_local_dynamic_symbol): Don't define.
- * elflink.c: Update for changed function names. Move elflink.h
- code here.
- * elflink.h: Delete file.
- * po/SRC-POTFILES.in: Regenerate.
- * po/bfd.pot: Regenerate.
-
- 2004-03-27 Alan Modra <amodra@bigpond.net.au>
- * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
- "name" for global syms accidentally removed in 2004-03-20 change.
-
- 2004-03-27 Alan Modra <amodra@bigpond.net.au>
- * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
- * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
- where Elf_External_* is different for 64 and 32 bit, with
- corresponding elf_size_info field.
- (struct elf_final_link_info): Use "bfd_byte *" instead
- of "Elf_External_Sym *" for external_syms and symbuf.
- (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
- vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
- (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
- (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
- (elf_link_sort_cmp2): Adjust.
- (elf_link_sort_relocs): Set up r_sym_mask local var instead of
- using ELF_R_SYM macro. Set u.sym_mask.
- (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
- version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
- vs. section_from_elf_index. Adjust Elf_External_Sym pointer
- arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
- Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
- swap_syn_out functions. Rearrange dyn swap in/out switch.
- (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
- Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
- (elf_link_flush_output_syms): Add elf_backend_data arg.
- (elf_link_check_versioned_symbol): Likewise.
- (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
- Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
- (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
- r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
- ELF_R_TYPE and ELF_R_INFO macros.
- (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
- based on size rather than using ELF_R_INFO.
- (elf_gc_mark): Set up r_sym_shift local var and use instead of
- ELF_R_SYM macro.
- (struct alloc_got_off_arg): New.
- (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
- ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
- (elf_gc_allocate_got_offsets): Adjust.
- (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
- ELF_R_SYM. Use bfd_section_from_elf_index.
- (elf_bfd_discard_info): Set cookie.r_sym_shift.
- * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
- (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
-
- 2004-03-26 Alan Modra <amodra@bigpond.net.au>
- * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
- (ppc64_elf_add_symbol_hook): New function.
- * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
- const from Elf_Internal_Sym param.
- * elflink.c (elf_link_add_object_symbols): Adjust.
- * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
- * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
- * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
- * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
- * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
- * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
- * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
- * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
- * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
- * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
- * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
- * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
- * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
- * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
- * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
- * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
-
- 2004-03-26 Alan Modra <amodra@bigpond.net.au>
- * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
- * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
- (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
- (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
- (bfd_elf64_bfd_link_add_symbols): Delete.
- (bfd_elf_link_add_symbols): Declare.
- * elfcode.h (elf_bfd_link_add_symbols): Delete.
- * elflink.c: Include safe-ctype.h.
- (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
- make static.
- (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
- (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
- static.
- (elf_link_add_archive_symbols): Rename from
- _bfd_elf_link_add_archive_symbols, make static.
- (elf_link_add_object_symbols): New function. Corresponding
- elflink.h function converted to use elf_size_info.
- (bfd_elf_link_add_symbols): Likewise.
- (bfd_elf_size_dynamic_sections): Adjust.
- * elflink.h (elf_bfd_link_add_symbols): Delete.
- (elf_link_add_object_symbols): Delete.
- * elf32-gen.c (elf32_generic_link_add_symbols): Call
- bfd_elf_link_add_symbols.
- * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
-
- 2004-03-25 Alan Modra <amodra@bigpond.net.au>
- * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
- and chained shared libs only if dynsym. Clear dynsym on forced-local.
- * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
- (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
- (_bfd_elf_add_dt_needed_tag): Declare.
- (_bfd_elf_sort_symbol): Declare.
- (_bfd_elf_finalize_dynstr): Declare.
- (RELOC_FOR_GLOBAL_SYM): Formatting.
- * elfcode.h (elf_add_dynamic_entry): Delete.
- * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
- elflink.h function converted to use elf_size_info.
- (_bfd_elf_add_dt_needed_tag): Likewise.
- (_bfd_elf_sort_symbol): Likewise.
- (_bfd_elf_finalize_dynstr): Likewise.
- (compute_bucket_count): Likewise.
- (bfd_elf_size_dynamic_sections): Likewise. Check result of
- _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
- (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
- * elflink.h: ..here.
- (sort_symbol, add_dt_needed_tag): Delete.
- (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
- (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
- Update all users.
- * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
- * elf32-cris.c (add_dynamic_entry): Likewise.
- * elf32-hppa.c (add_dynamic_entry): Likewise.
- * elf32-i370.c (add_dynamic_entry): Likewise.
- * elf32-i386.c (add_dynamic_entry): Likewise.
- * elf32-m32r.c (add_dynamic_entry): Likewise.
- * elf32-m68k.c (add_dynamic_entry): Likewise.
- * elf32-ppc.c (add_dynamic_entry): Likewise.
- * elf32-s390.c (add_dynamic_entry): Likewise.
- * elf32-sh.c (add_dynamic_entry): Likewise.
- * elf32-sparc.c (add_dynamic_entry): Likewise.
- * elf32-vax.c (add_dynamic_entry): Likewise.
- * elf32-xtensa.c (add_dynamic_entry): Likewise.
- * elf64-alpha.c (add_dynamic_entry): Likewise.
- * elf64-hppa.c (add_dynamic_entry): Likewise.
- * elf64-ppc.c (add_dynamic_entry): Likewise.
- * elf64-s390.c (add_dynamic_entry): Likewise.
- * elf64-sparc.c (add_dynamic_entry): Likewise.
- * elf64-x86-64.c (add_dynamic_entry): Likewise.
- * elfxx-ia64.c (add_dynamic_entry): Likewise.
- * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
- * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
- * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
- * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
-
- 2004-03-22 Alan Modra <amodra@bigpond.net.au>
- * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
- and rel args. Group input and output args. Wrap to 80 columns.
- * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
- elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
- elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
- elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
- elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
- elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
- elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
- elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
- RELOC_FOR_GLOBAL_SYMBOL invocation.
-
- 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
- * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
- unresolved symbols in objects aren't allowed.
- * elf-hppa.h (elf_hppa_relocate_section): Properly handle
- unresolved symbols.
- (elf_hppa_remark_useless_dynamic_symbols): Likewise.
- (elf_hppa_unmark_useless_dynamic_symbols):
- * elf32-frv.c (elf32_frv_relocate_section): Likewise.
- * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
- (elf32_hppa_relocate_section): Likewise.
- * elf32-i370.c (i370_elf_relocate_section): Likewise.
- * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
- * elf32-sh.c (sh_elf_relocate_section): Likewise.
- * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
- * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
- * elf-m10200.c (mn10200_elf_relocate_section): Use
- RELOC_FOR_GLOBAL_SYMBOL.
- * elf32-avr.c (elf32_avr_relocate_section): Likewise.
- * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
- * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
- * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
- * elf32-i860.c (elf32_i860_relocate_section): Likewise.
- * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
- * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
- * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
- * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
- * elf32-v850.c (v850_elf_relocate_section): Likewise.
- * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
- * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
-
- 2004-03-19 Alan Modra <amodra@bigpond.net.au>
- H.J. Lu <hongjiu.lu@intel.com>
- * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
- type and size change code to where it was previously. Remove
- dt_needed param. Treat old weak syms as strong if new sym is
- from a shared lib, even when old sym is from another shared
- lib. Remove unnecessary tests of oldweak and newweak. Correct
- comments.
- (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
- _bfd_elf_merge_symbol calls.
- * elflink.h (elf_link_add_object_symbols): Update calls. Remove
- dt_needed local var. Update comments.
- * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
- (_bfd_elf_add_default_symbol): Likewise.
- * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
- strong syms in one shared object overriding weak syms in another.
-
- 2004-03-18 Alan Modra <amodra@bigpond.net.au>
- * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
- dyn_lib_class field. Rearrange for better packing.
- (elf_dt_soname): Delete.
- (elf_dyn_lib_class): Define.
- * elf.c (bfd_elf_set_dt_needed_name): Update comment.
- (bfd_elf_set_dt_needed_soname): Delete.
- (bfd_elf_set_dyn_lib_class): New function.
- * elflink.h (add_dt_needed_tag): New function. Split out from..
- (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
- Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
- initialization of soname.
- (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
- elf_dt_soname.
- * bfd-in.h (enum dynamic_lib_link_class): New.
- (bfd_elf_set_dt_needed_soname): Delete.
- (bfd_elf_set_dyn_lib_class): Declare.
- * bfd-in2.h: Regenerate.
- * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
- (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
- * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
- symbol loop. Instead use add_needed to flag tag as written.
-
- 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
- * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
- undefined symbols as hash_new.
-
- 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
- * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
- * elflink.h (is_global_data_symbol_definition): Moved to
- elflink.c.
- (elf_link_is_defined_archive_symbol): Likewise.
- (elf_link_add_archive_symbols): Likewise. Renamed to
- _bfd_elf_link_add_archive_symbols.
- * elflink.c (elf_link_is_defined_archive_symbol): Get the size
- of ELF symbol table entry from backend.
- (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
- instead of elf_link_add_object_symbols.
-
- 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
- * elflink.h (sort_symbol): New.
- (elf_link_add_object_symbols): Use a sorted symbol array for
- weakdef.
-
- 2004-02-23 Jakub Jelinek <jakub@redhat.com>
- * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
- DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
-
- 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
- * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
- symbols with non-default visibility.
-
-2004-03-22 Bob Wilson <bob.wilson@acm.org>
-
- * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
- literal tables and check for relocs outside of literal pools.
- (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
- (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
- set DF_TEXTREL.
- (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
- (elf_xtensa_relocate_section): Read literal tables and check for
- dynamic relocations in read-only sections and not in literal pools.
-
-2004-03-23 Alan Modra <amodra@bigpond.net.au>
-
- PR 51.
- * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
-
-2004-03-22 Hans-Peter Nilsson <hp@axis.com>
-
- * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
- R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
- not defined by the executable, or defined in a DSO.
- <eliding run-time relocation of .got>: Initialize GOT entry for a
- function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
- executable.
- (cris_elf_gc_sweep_hook): Improve fallthrough marking.
- (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
- a PLT reloc to GOT for an executable.
- (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
- .got for a DSO and explain why.
- (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
- and unreferenced symbols for which a PLT is defined. Adjust
- dynamic-symbol pruning correspondingly, to make sure we don't lose
- a dynamic symbol also defined by a DSO.
-
-2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
-
-2004-03-16 Alan Modra <amodra@bigpond.net.au>
-
- * elflink.c (elf_link_read_relocs_from_section): Don't use
- NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
- (_bfd_elf_link_read_relocs): ..to here.
- * elf32-ppc.c (ppc_elf_relax_section): Formatting.
-
- Merge from mainline.
- 2004-02-20 Jakub Jelinek <jakub@redhat.com>
- * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
- symbols used in PIE relocs.
-
-2004-03-16 Alan Modra <amodra@bigpond.net.au>
-
- * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
- values selected in configure.host. Require both to be defined
- before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
- corresponding BFD_HOST vars with quotes.
- <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
- Always require BFD_HOST_64_BIT_DEFINED.
- <file_ptr type>: Find off_t size before emitting message. Combine
- off_t and ftello64 conditional.
+ * configure.in: AC_SUBST for datarootdir, docdir and htmldir.
* configure: Regenerate.
-2004-03-16 Alan Modra <amodra@bigpond.net.au>
-
- * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
- aliasing warning. Remove trailing whitespace throughout file.
-
-2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
- input_section in calls to get_dyn_name.
- * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
- local symbols.
- (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
-
-2004-03-15 Alan Modra <amodra@bigpond.net.au>
-
- * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
- (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
- (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
- (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
- (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
- * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
- (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
- when using long.
- * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
- (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
- (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
- (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
- (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
- * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
- (read_8_bytes, read_indirect_string, read_address): Likewise.
- (read_abbrevs, parse_comp_unit): Likewise.
- * targets.c (struct bfd_target): Likewise.
- * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
- * hppabsd-core.c: Likewise. Formatting.
- * hpux-core.c: Likewise.
- * irix-core.c: Likewise.
- * netbsd-core.c: Likewise.
- * osf-core.c: Likewise.
- * ptrace-core.c: Likewise.
- * sco5-core.c: Likewise.
- * trad-core.c: Likewise.
+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.
-2004-03-15 Alan Modra <amodra@bigpond.net.au>
-
- * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
- (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
- (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
- (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
- (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
- (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
- (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
- * libbfd.c: Likewise in function definitions.
- (bfd_put_8): Mask with 0xff rather than casting to char.
- (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
- (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
- (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
- (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
- (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
- (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
- * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
- (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
- (H_GET_64, H_GET_32, H_GET_16): Likewise.
- (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
- * archive.c (do_slurp_coff_armap): Update swap prototype.
- * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
- (tic54x_getl_signed_32): Likewise.
- (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
- * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
- * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
- (bfd_getp_signed_32, bfd_putp32): Likewise.
- * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
- bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
- bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
- bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
- bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
- bfd_h_getx_signed_16, bfd_h_putx16.
- * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
- * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
- * hpux-core.c: Likewise.
- * irix-core.c: Likewise.
- * netbsd-core.c: Likewise.
- * osf-core.c: Likewise.
- * ptrace-core.c: Likewise.
- * sco5-core.c: Likewise.
- * trad-core.c: Likewise.
- * bfd-in2.h: Regenerate.
+2006-03-25 Richard Sandiford <richard@codesourcery.com>
-2004-03-15 Matt Thomas <matt@3am-software.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.
- * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
- selected.
+2006-03-22 Bob Wilson <bob.wilson@acm.org>
-2004-03-13 Mark Kettenis <kettenis@gnu.org>
+ * elf32-xtensa.c (xtensa_read_table_entries): Remove assertion that
+ rel->r_addend is zero.
- * config.bfd: Add x86_64-*-openbsd*.
- * configure.in (x86_64-*-openbsd*): Set COREFILE to
- netbsd-core.lo.
- * configure: Regenerate.
+2006-03-22 Richard Sandiford <richard@codesourcery.com>
-2004-03-09 Steve Ellcey <sje@cup.hp.com>
+ * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Fix type
+ of "loc".
- * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
+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>
-2004-03-05 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.
- * elf.c (map_sections_to_segments): Ignore .tbss sections for
- layout purposes.
+2006-03-16 Alan Modra <amodra@bigpond.net.au>
-2004-02-17 Daniel Jacobowitz <drow@mvista.com>
- Richard Sandiford <rsandifo@redhat.com>
+ * 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.
- * elfxx-mips.c (mips_elf_calculate_relocation): Use
- _bfd_elf_symbol_refs_local_p to decide whether to decay
- a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
- (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
- relocs if the symbol wasn't defined by a regular object file.
- Don't check the symbol's dynindx.
+2006-03-16 Alan Modra <amodra@bigpond.net.au>
-2004-02-16 Andrew Cagney <cagney@redhat.com>
+ * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24
+ checks from REL32.
- * bfd-in.h (file_ptr, ufile_ptr): Configure type using
- @bfd_file_ptr@.
- * bfd-in2.h: Re-generate.
+2006-03-15 Ben Elliston <bje@au.ibm.com>
-2004-02-14 Andrew Cagney <cagney@redhat.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>
- * configure.host (HDEFINES): When hppa*-*-hpux*, define
- _LARGEFILE64_SOURCE.
+ * 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.
-2004-02-13 Andrew Cagney <cagney@redhat.com>
+2006-03-13 Richard Sandiford <richard@codesourcery.com>
- * elf.c (vma_page_aligned_bias): New function.
- (assign_file_positions_except_relocs)
- (assign_file_positions_for_segments): Replace broken modulo
- arithmetic with call to vma_page_aligned_bias.
+ * elfxx-mips.c (mips_elf_create_got_section): Initialize hgot.
-2004-02-11 Andrew Cagney <cagney@redhat.com>
+2006-03-11 H.J. Lu <hongjiu.lu@intel.com>
- * bfd-in.h: Update copyright.
- (bfd_tell): Change return type to file_ptr.
- * bfd-in2.h: Re-generate.
- * cache.c: Update copyright.
- (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
- parameter.
- (close_one): Use real_ftell.
- * bfdio.c: Update copyright.
- (real_ftell, real_fseek): New functions.
- (bfd_tell): Use real_fseek and real_ftell, change return type to
- file_ptr.
- (bfd_seek): Use real_ftell and real_fseek, change type of
- file_position to a file_ptr.
- * libbfd-in.h: Update copyright.
- (real_ftell, real_fseek): Declare.
- * libbfd.h: Re-generate.
+ PR ld/2443
+ * dwarf2.c (concat_filename): Don't issue an error if file is
+ 0.
- * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
- fseeko and fseeko64. Determine bfd_file_ptr.
- * configure: Re-generate.
- * config.in: Re-generate.
+2006-03-10 Paul Brook <paul@codesourcery.com>
-2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
+ * elf32-arm.c (INTERWORK_FLAG): Handle EABIv5.
+ (elf32_arm_print_private_bfd_data): Ditto.
- * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
- * elf32-h8300.c: Likewise.
+2006-03-09 Paul Brook <paul@codesourcery.com>
-2004-02-09 Christian Vogel <vogelchr@vogel.cx>
- Nick Clifton <nickc@redhat.com>
+ * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
+ mapping symbols.
- * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
- GOT entries with no associated GOT subsection.
+2006-03-09 Khem Raj <khem@mvista.com>
-2004-02-09 Richard Sandiford <rsandifo@redhat.com>
+ * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned
+ char type.
- * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
- * elf.c (swap_out_syms): Use it to decide whether local section
- symbols should be named.
- * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
- * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
- (elf_backend_name_local_section_symbols): Define.
- * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
+2006-03-08 H.J. Lu <hongjiu.lu@intel.com>
-2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
+ * elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
- * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
- (elfNN_ia64_relax_section): Optimize brl to br during the relax
- finalize pass.
+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>
-2004-01-30 Alexandre Oliva <aoliva@redhat.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.
- * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
- to bfd_link_hash_entry passed by reference to
- _bfd_generic_link_add_one_symbol.
+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>
-2004-01-25 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.
- * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
- relocations against dynamic symbols.
+ * elflink.c (_bfd_elf_link_hash_fixup_symbol): New.
+ (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if
+ it isn't NULL.
-2004-01-23 Daniel Jacobowitz <drow@mvista.com>
+ * elfxx-ia64.c (elf_backend_fixup_symbol): Defined.
- * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
- change.
+ * elfxx-target.h (elf_backend_fixup_symbol): New.
+ (elfNN_bed): Initialize elf_backend_fixup_symbol.
-2004-01-21 Tom Rix <tcrix@worldnet.att.net>
+2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
- * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
- * bfd-in2.h, libbfd.h: Rebuilt.
+ * cpu-ia64-opc.c (ins_immu5b): New.
+ (ext_immu5b): Likewise.
+ (elf64_ia64_operands): Add IMMU5b.
-2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
+2006-02-21 Alan Modra <amodra@bigpond.net.au>
- * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
- IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
- flag has been cleared.
+ 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.
-2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
+2006-02-21 Alan Modra <amodra@bigpond.net.au>
- * coff-h8300.c: Add and adjust comments about relaxation.
- * elf32-h8300.c: Likewise.
+ * bfd.c: (_bfd_default_error_handler): Don't call abort on
+ error, instead call _exit.
+ (_bfd_abort): Call _exit not xexit.
-2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
+2006-02-17 Kevin Buettner <kevinb@redhat.com>
- * coff-h8300.c: Fix comment typos.
- * elf32-h8300.c: Likewise.
+ * elf32-frv.c (elf32_frv_grok_prstatus, elf32_frv_grok_psinfo):
+ New functions.
+ * elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
-2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
+2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
+ Anil Paranjape <anilp1@kpitcummins.com>
+ Shilin Shakti <shilins@kpitcummins.com>
- * coff-h8300.c: Add comments about relaxation.
- * elf32-h8300.c: Likewise.
+ * 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>
-2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ 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.
- * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
- throughout.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
+2006-02-16 H.J. Lu <hongjiu.lu@intel.com>
-2004-01-13 Ian Lance Taylor <ian@wasabisystems.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.
- * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
- mips_elf64_rtype_to_howto instead of using howto_table.
+2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
-2004-01-13 Daniel Jacobowitz <drow@mvista.com>
-
- * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
- the .plt section.
- (elf32_arm_check_relocs): Don't increment the PLT refcount for
- relocs which would not use the PLT.
-
-2004-01-13 Alan Modra <amodra@bigpond.net.au>
-
- * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
- (ppc64_elf_gc_sweep_hook): Likewise.
- (ppc64_elf_size_dynamic_sections): Test for .plt directly.
-
-2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
-
- Adds linker relaxation support for bit manipulation insns like
- band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
- bst, btst, bxor.
- * elf32-h8300.c: Opcode for bit manipulation insn is checked in
- elf32_h8_relax_section function while relxation for aa:16 and aa:32.
- * coff-h8300.c: Opcode for bit manipulation insn is checked in
- h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
-
-2004-01-12 Alan Modra <amodra@bigpond.net.au>
-
- * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
-
-2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
-
- * elf32-h8300.c: Fix formatting.
-
-2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
-
- * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
- dynamic object is present. Declare r_symndx and h in an inner
- scope.
- * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
-
-2004-01-09 Daniel Jacobowitz <drow@mvista.com>
-
- * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
- (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
- (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
- identically. Do not emit PC24 relocations for shared libraries.
- (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
- identically. Don't adjust pc_count.
- (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
- Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
- adjust count for branch relocations.
- (allocate_dynrelocs): Correct typo in call to
- WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
- PC24 or PLT32 relocs when linking.
-
-2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
-
- * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
- relocation howto with ARM_26 one for consistency.
- (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
- that will be converted to ARM_26D ones, since we always want 'done'
- relocations to be reflected in section's data.
- (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
- offset.
- (_bfd_final_link_relocate): Do not modify "inplace" data, if not
- requested.
-
-2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
-
- * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
- are not partial_inplace during a relocatable link.
-
-2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
-
- * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
- if no dynamic object is present. Declare r_symndx and h in an
- inner scope.
-
-2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
-
- * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
- trampoline if it is known out of range.
-
-2004-01-06 Alexandre Oliva <aoliva@redhat.com>
-
- 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (_frv_osec_readonly_p): New.
- (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
- undefweak symbol.
- (_frv_count_got_plt_entries): Adjust expected count accordingly.
- (elf32_frv_relocate_section): Likewise. Error out if attempting
- to emit rofixups or dynamic relocs in read-only segments. Use
- _bfd_elf_section_offset to adjust r_offsets in rofixups and
- dynamic relocations.
- 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
- relocations or fixups involving merged sections correctly. Avoid
- crash when undefined symbol is referenced by R_FRV_32 or
- R_FRV_FUNCDESC_VALUE.
- 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
- input section holding local symbol to addend of R_FRV_32 or
- R_FRV_FUNCDESC_VALUE dynamic relocation.
- 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
- (elf32_frv_always_size_sections): Don't store pointer to
- __stacksize symbol in sec_info.
- (elf32_frv_modify_segment_map): Look it up here.
- 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
- of the lazy PLT entry, not only its offset, as the low word of a
- function descriptor.
- 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
- if a hash table entry already exists but is not a definition.
- 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
- (_frv_add_rofixup): Don't inline.
- (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
- for undefweak symbols.
- (elf32_frv_relocate_section): Avoid crash while computing
- relocation when linking with shared library. Only emit rofixups
- and dynamic relocations for alloc&load sections. Mark binaries
- with inter-segment relocations for relocation as a unit.
- (_frv_create_got_section): Rename .rofixup.got to .rofixup.
- (DEFAULT_STACK_SIZE): New.
- (_frv_count_got_plt_entries): Fix thinko in deciding whether to
- emit rofixups or dynamic relocs when linking dynamic non-PIE
- executables.
- (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
- shared libs too. Reserve the last entry for the GOT pointer.
- (elf32_frv_finish_dynamic_sections): Emit it.
- (elf32_frv_always_size_sections): New.
- (elf32_frv_modify_segment_map): New.
- (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
- sections.
- (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
- (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
- (elf_backend_always_size_sections): New.
- (elf_backend_modify_segment_map): New.
- 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
- * config.bfd: Added frv-*-*linux*.
- * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
- ABS section, instead of crashing.
- (elf32_frv_relocate_section): Don't crash before warning about
- different segments in non-PIC relocation.
- 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
- relocs to undefweak symbols.
- (elf32_frv_relocate_section): Ditto for undefined symbols.
- 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
- gotfixup section was created.
- 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
- FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
- complain_overflow_signed.
- * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
- have not been allocated.
- (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
- privfd only if dynamic sections were created.
- (elf32_frv_relocate_section): Compute gprel_segment, and use it
- for GPREL relocs. When linking relocatable FDPIC executables,
- emit warnings for relocations that would be illegal on PIE or
- shared libraries. Emit rofixup for R_FRV_32 only if input object
- is not FDPIC.
- (_frv_create_got_section): Define _gp symbol in the rofixup
- section.
- (elf32_frv_finish_dynamic_sections): If rofixups needed but
- dynamic sections missing, error out requesting -melf32frvfd.
- 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
- computation of addends from section and global or local symbol
- value. Change return type to bfd_boolean, and return a failure if
- a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
- nonzero addend is required.
- (elf32_frv_relocate_section): Likewise. Print error for
- unsupported nonzero addends.
- 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
- force everything local.
- (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
- * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
- (frv_gotfixup_section): New.
- (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
- (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
- and relocsfdv.
- (_frv_add_rofixup): New.
- (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
- fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
- improve some ugly conditions.
- (elf32_frv_relocate_section): Likewise. Reject inter-segment
- relocations in fdpic.
- (_frv_create_got_section): Create .rofixup.got section.
- (struct _frv_dynamic_got_info): Added fixups.
- (_frv_count_got_plt_entries): Account in-GOT relocations into
- relocs32, relocsfd and relocsfdv. Account them into relocs or
- fixups, as appropriate.
- (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
- sizing of gotrel.
- (elf32_frv_finish_dynamic_sections): Verify that the right number
- of relocations and fixups was generated.
- (elf32_frv_check_relocs): Compute relocs32, relocsfd and
- relocsfdv.
- * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
- SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
- (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
- descriptor of a (formerly-)global symbol is local.
- (struct frv_pic_relocs_info): Adjust comments.
- (_frv_emit_got_relocs_plt_entries): Adjust.
- (elf32_frv_relocate_section): Likewise.
- (_frv_count_got_plt_entries): Likewise.
- * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
- symbol's value to addend in the common preamble. Decay dynamic
- symbols to section+offset if they bind or call locally, for GOT
- and FUNCDESC_VALUE, respectively.
- (elf32_frv_relocate_section): Likewise.
- (elf32_frv_check_relocs): Don't register as dynamic symbols of
- internal or hidden visibility.
- 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
- argument, so as to not call _bfd_elf_rel_local_sym to compute it.
- (elf32_frv_relocate_section): Pass relocation addend in. Use
- original relocation addend to look up the got relocs/plt entries
- table. Do not call _bfd_elf_rel_local_sym. Don't error out when
- processing relocations that reference .scommon symbols.
- 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
- Introduce support for dynamic linking.
- * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
- (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
- elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
- (frv_reloc_type_lookup): Return REL howtos for executables and
- dynamic libraries.
- (frv_info_to_howto_rel): New.
- (struct frv_elf_link_hash_table): New.
- (frv_hash_table, frv_got_section, frv_gotrel_section,
- frv_plt_section, frv_pltrel_section, frv_relocs_info,
- frv_got_initial_offset, frv_plt_initial_offset): New macros.
- (frv_elf_link_hash_table_create): New.
- (struct frv_pic_relocs_info): New.
- (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
- (frv_pic_relocs_info_find): New.
- (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
- New.
- (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
- (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
- (_frv_emit_got_relocs_plt_entries): New.
- (elf32_frv_relocate_section): Add support for dynamic linking.
- Handle new relocations.
- (_frv_create_got_section): New.
- (elf32_frv_create_dynamic_sections): New.
- (ELF_DYNAMIC_INTERPRETER): New.
- (struct _frv_dynamic_got_info): New.
- (_frv_count_got_plt_entries): New.
- (struct _frv_dynamic_got_plt_info): New.
- (_frv_compute_got_alloc_data): New.
- (_frv_get_got_entry, _frv_get_fd_entry): New.
- (_frv_assign_got_entries, _frv_assign_plt_entries): New.
- (_frv_resolve_final_relocs_info): New.
- (elf32_frv_size_dynamic_sections): New.
- (elf32_frv_finish_dynamic_sections): New.
- (elf32_frv_adjust_dynamic_symbol): New.
- (elf32_frv_finish_dynamic_symbol): New.
- (elf32_frv_check_relocs): Handle new relocs. Explain how the
- whole thing works.
- (elf_info_to_howto_rel): Define.
- (bfd_elf32_bfd_link_hash_table_create): Define.
- (elf_backend_create_dynamic_sections): Define.
- (elf_backend_adjust_dynamic_symbol): Define.
- (elf_backend_size_dynamic_sections): Define.
- (elf_backend_finish_dynamic_symbol): Define.
- (elf_backend_finish_dynamic_sections): Define.
- (elf_backend_want_got_sym): Define.
- (elf_backend_got_header_size): Define.
- (elf_backend_want_got_plt): Define.
- (elf_backend_plt_readonly): Define.
- (elf_backend_want_plt_sym): Define.
- (elf_backend_plt_header_size): Define.
- (elf_backend_may_use_rel_p): Define.
- (elf_backend_may_use_rela_p): Define.
- (elf_backend_default_use_rela_p): Define.
- 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
- R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
- R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
- (frv_reloc_map): Map the corresponding BFD relocs to them.
- (frv_reloc_type_lookup): ... and back to BFD relocs.
- * reloc.c: New relocs.
- * bfd-in2.h, libbfd.h: Rebuilt.
- 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
- * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
- R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
- R_FRV_FUNCDESC_GOTLO): New.
- (frv_reloc_map): Map the corresponding BFD relocs to them.
- (frv_reloc_type_lookup): ... and back to BFD relocs.
- * reloc.c: New relocs.
- * bfd-in2.h, libbfd.h: Rebuilt.
-
-2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-
- * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
- targets to support pages of up to 64kB.
- (elf32_bed): Redefine to get a separate backend data structure for
- traditional targets.
- * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
- targets to support pages of up to 64kB.
- (elf64_bed): Redefine to get a separate backend data structure for
- traditional targets.
- * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
- targets to support pages of up to 64kB.
- (elf32_bed): Redefine to get a separate backend data structure for
- traditional targets.
-
-2004-01-04 Mark Kettenis <kettenis@gnu.org>
-
- * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
-
-2004-01-02 Mark Kettenis <kettenis@gnu.org>
-
- * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
- (elf_i386_grok_psinfo): Likewise.
-
-2004-01-02 Bernardo Innocenti <bernie@develer.com>
-
- * config.bfd: Add m68k-uClinux target.
-
-2004-01-01 Grant Edwards <grante@visi.com>
-
- * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
- * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
- (elf32_h8_gc_sweep_hook): New function.
- (elf_backend_gc_mark_hook): Define.
- (elf_backend_gc_sweep_hook): Define.
- (elf_backend_can_gc_sections): Define.
-
-For older changes see ChangeLog-0203
+ * 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
diff --git a/contrib/binutils/bfd/Makefile.am b/contrib/binutils/bfd/Makefile.am
index de811af6f791..77278a832a16 100644
--- a/contrib/binutils/bfd/Makefile.am
+++ b/contrib/binutils/bfd/Makefile.am
@@ -1,6 +1,9 @@
## Process this file with automake to generate Makefile.in
-AUTOMAKE_OPTIONS = cygnus
+AUTOMAKE_OPTIONS = 1.9 cygnus
+
+# Uncomment the following line when doing a release.
+# RELEASE=y
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
@@ -8,13 +11,18 @@ MKDEP = gcc -MM
SUBDIRS = doc po
-docdir = doc
+bfddocdir = doc
bfdlibdir = @bfdlibdir@
bfdincludedir = @bfdincludedir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+htmldir = @htmldir@
+
bfdlib_LTLIBRARIES = libbfd.la
WARN_CFLAGS = @WARN_CFLAGS@
+NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS)
# bfd.h goes here, for now
@@ -50,12 +58,14 @@ BFD64_LIBS_CFILES = archive64.c
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
ALL_MACHINES = \
- cpu-a29k.lo \
cpu-alpha.lo \
cpu-arc.lo \
cpu-arm.lo \
cpu-avr.lo \
+ cpu-bfin.lo \
+ cpu-cr16c.lo \
cpu-cris.lo \
+ cpu-crx.lo \
cpu-d10v.lo \
cpu-d30v.lo \
cpu-dlx.lo \
@@ -71,6 +81,7 @@ ALL_MACHINES = \
cpu-i960.lo \
cpu-ip2k.lo \
cpu-iq2000.lo \
+ cpu-m32c.lo \
cpu-m32r.lo \
cpu-m68hc11.lo \
cpu-m68hc12.lo \
@@ -78,9 +89,11 @@ ALL_MACHINES = \
cpu-m88k.lo \
cpu-m10200.lo \
cpu-m10300.lo \
+ cpu-maxq.lo \
cpu-mcore.lo \
cpu-mips.lo \
cpu-mmix.lo \
+ cpu-mt.lo \
cpu-msp430.lo \
cpu-or32.lo \
cpu-ns32k.lo \
@@ -102,15 +115,19 @@ ALL_MACHINES = \
cpu-w65.lo \
cpu-xstormy16.lo \
cpu-xtensa.lo \
+ cpu-xc16x.lo \
+ cpu-z80.lo \
cpu-z8k.lo
ALL_MACHINES_CFILES = \
- cpu-a29k.c \
cpu-alpha.c \
cpu-arc.c \
cpu-arm.c \
cpu-avr.c \
+ cpu-bfin.c \
cpu-cris.c \
+ cpu-cr16c.c \
+ cpu-crx.c \
cpu-d10v.c \
cpu-d30v.c \
cpu-dlx.c \
@@ -126,6 +143,7 @@ ALL_MACHINES_CFILES = \
cpu-i960.c \
cpu-ip2k.c \
cpu-iq2000.c \
+ cpu-m32c.c \
cpu-m32r.c \
cpu-m68hc11.c \
cpu-m68hc12.c \
@@ -133,9 +151,11 @@ ALL_MACHINES_CFILES = \
cpu-m88k.c \
cpu-m10200.c \
cpu-m10300.c \
+ cpu-maxq.c \
cpu-mcore.c \
cpu-mips.c \
cpu-mmix.c \
+ cpu-mt.c \
cpu-msp430.c \
cpu-or32.c \
cpu-ns32k.c \
@@ -157,6 +177,8 @@ ALL_MACHINES_CFILES = \
cpu-w65.c \
cpu-xstormy16.c \
cpu-xtensa.c \
+ cpu-xc16x.c \
+ cpu-z80.c \
cpu-z8k.c
# The .o files needed by all of the 32 bit vectors that are configured into
@@ -173,9 +195,7 @@ BFD32_BACKENDS = \
armnetbsd.lo \
bout.lo \
cf-i386lynx.lo \
- cf-m68klynx.lo \
cf-sparclynx.lo \
- coff-a29k.lo \
coff-apollo.lo \
coff-arm.lo \
coff-aux.lo \
@@ -187,6 +207,7 @@ BFD32_BACKENDS = \
coff-i960.lo \
coff-m68k.lo \
coff-m88k.lo \
+ coff-maxq.lo \
coff-mips.lo \
coff-or32.lo \
coff-rs6000.lo \
@@ -201,6 +222,7 @@ BFD32_BACKENDS = \
coff-u68k.lo \
coff-we32k.lo \
coff-w65.lo \
+ coff-z80.lo \
coff-z8k.lo \
cofflink.lo \
dwarf1.lo \
@@ -210,10 +232,12 @@ BFD32_BACKENDS = \
elf.lo \
elf32-am33lin.lo \
elf32-arc.lo \
- elfarm-oabi.lo \
- elfarm-nabi.lo \
+ elf32-arm.lo \
elf32-avr.lo \
+ elf32-bfin.lo \
+ elf32-cr16c.lo \
elf32-cris.lo \
+ elf32-crx.lo \
elf32-d10v.lo \
elf32-d30v.lo \
elf32-dlx.lo \
@@ -226,9 +250,9 @@ BFD32_BACKENDS = \
elf32-i386.lo \
elf32-i860.lo \
elf32-i960.lo \
- elf32-ia64.lo \
elf32-ip2k.lo \
elf32-iq2000.lo \
+ elf32-m32c.lo \
elf32-m32r.lo \
elf32-m68hc11.lo \
elf32-m68hc12.lo \
@@ -240,6 +264,7 @@ BFD32_BACKENDS = \
elf32-mcore.lo \
elfxx-mips.lo \
elf32-mips.lo \
+ elf32-mt.lo \
elf32-msp430.lo \
elf32-openrisc.lo \
elf32-or32.lo \
@@ -247,17 +272,21 @@ BFD32_BACKENDS = \
elf32-ppc.lo \
elf32-s390.lo \
elf32-sh.lo \
+ elf32-sh-symbian.lo \
elf32-sh64.lo \
elf32-sh64-com.lo \
+ elfxx-sparc.lo \
elf32-sparc.lo \
elf32-v850.lo \
elf32-vax.lo \
elf32-xstormy16.lo \
elf32-xtensa.lo \
+ elf32-xc16x.lo \
elf32.lo \
elflink.lo \
elf-strtab.lo \
elf-eh-frame.lo \
+ elf-vxworks.lo \
epoc-pe-arm.lo \
epoc-pei-arm.lo \
hp300bsd.lo \
@@ -276,9 +305,9 @@ BFD32_BACKENDS = \
ieee.lo \
m68k4knetbsd.lo \
m68klinux.lo \
- m68klynx.lo \
m68knetbsd.lo \
m88kmach3.lo \
+ m88kopenbsd.lo \
mach-o.lo \
mipsbsd.lo \
newsos3.lo \
@@ -338,9 +367,7 @@ BFD32_BACKENDS_CFILES = \
armnetbsd.c \
bout.c \
cf-i386lynx.c \
- cf-m68klynx.c \
cf-sparclynx.c \
- coff-a29k.c \
coff-apollo.c \
coff-arm.c \
coff-aux.c \
@@ -352,6 +379,7 @@ BFD32_BACKENDS_CFILES = \
coff-i960.c \
coff-m68k.c \
coff-m88k.c \
+ coff-maxq.c \
coff-mips.c \
coff-or32.c \
coff-rs6000.c \
@@ -366,6 +394,7 @@ BFD32_BACKENDS_CFILES = \
coff-u68k.c \
coff-we32k.c \
coff-w65.c \
+ coff-z80.c \
coff-z8k.c \
cofflink.c \
dwarf1.c \
@@ -375,10 +404,12 @@ BFD32_BACKENDS_CFILES = \
elf.c \
elf32-am33lin.c \
elf32-arc.c \
- elfarm-oabi.c \
- elfarm-nabi.c \
+ elf32-arm.c \
elf32-avr.c \
+ elf32-bfin.c \
+ elf32-cr16c.c \
elf32-cris.c \
+ elf32-crx.c \
elf32-d10v.c \
elf32-d30v.c \
elf32-dlx.c \
@@ -393,6 +424,7 @@ BFD32_BACKENDS_CFILES = \
elf32-i960.c \
elf32-ip2k.c \
elf32-iq2000.c \
+ elf32-m32c.c \
elf32-m32r.c \
elf32-m68k.c \
elf32-m68hc11.c \
@@ -404,6 +436,7 @@ BFD32_BACKENDS_CFILES = \
elf32-mcore.c \
elfxx-mips.c \
elf32-mips.c \
+ elf32-mt.c \
elf32-msp430.c \
elf32-openrisc.c \
elf32-or32.c \
@@ -413,15 +446,19 @@ BFD32_BACKENDS_CFILES = \
elf32-sh64-com.c \
elf32-s390.c \
elf32-sh.c \
+ elf32-sh-symbian.c \
+ elfxx-sparc.c \
elf32-sparc.c \
elf32-v850.c \
elf32-vax.c \
elf32-xstormy16.c \
elf32-xtensa.c \
+ elf32-xc16x.c \
elf32.c \
elflink.c \
elf-strtab.c \
elf-eh-frame.c \
+ elf-vxworks.c \
epoc-pe-arm.c \
epoc-pei-arm.c \
hp300bsd.c \
@@ -440,9 +477,9 @@ BFD32_BACKENDS_CFILES = \
ieee.c \
m68k4knetbsd.c \
m68klinux.c \
- m68klynx.c \
m68knetbsd.c \
m88kmach3.c \
+ m88kopenbsd.c \
mach-o.c \
mipsbsd.c \
newsos3.c \
@@ -492,6 +529,8 @@ BFD32_BACKENDS_CFILES = \
# The .o files needed by all of the 64 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all
# and --enable-64-bit-bfd.
+# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in
+# BFD32_BACKENDS.
BFD64_BACKENDS = \
aix5ppc-core.lo \
aout64.lo \
@@ -502,6 +541,7 @@ BFD64_BACKENDS = \
elf64-x86-64.lo \
elf64-alpha.lo \
elf64-hppa.lo \
+ elf32-ia64.lo \
elf64-ia64.lo \
elf64-gen.lo \
elfn32-mips.lo \
@@ -560,6 +600,14 @@ OPTIONAL_BACKENDS_CFILES = \
trad-core.c \
cisco-core.c
+# We want to rerun configure if configure.in, config.bfd or
+# configure.host change. configure.in is needed since the version
+# number in Makefile comes from configure.in.
+CONFIG_STATUS_DEPENDENCIES = \
+ $(srcdir)/configure.in \
+ $(srcdir)/config.bfd \
+ $(srcdir)/configure.host
+
# These are defined by configure.in:
WORDSIZE = @wordsize@
ALL_BACKENDS = @all_backends@
@@ -568,7 +616,7 @@ BFD_LIBS = @bfd_libs@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
-INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
+INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
# C source files that correspond to .o's.
SOURCE_CFILES = \
@@ -587,7 +635,7 @@ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h \
+ elf-bfd.h elf-hppa.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h \
freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
@@ -615,7 +663,36 @@ po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
| LC_COLLATE= sort > tmp.bld \
&& mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
-diststuff: info
+all diststuff: info
+
+.PHONY: install-html install-html-am install-html-recursive
+
+install-html: install-html-recursive
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
# Various kinds of .o files to put in libbfd.a:
# BFD_BACKENDS Routines the configured targets need.
@@ -748,8 +825,6 @@ uninstall_libbfd:
rm -f $(DESTDIR)$(bfdincludedir)/symcat.h
rm -f $(DESTDIR)$(bfdincludedir)/bfdlink.h
-Makefile: $(srcdir)/configure.in
-
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) bfd.h
rm -f DEP1
@@ -817,12 +892,12 @@ LIBCOFF_H_FILES = libcoff-in.h coffcode.h
# Could really use a "copy-if-change"...
headers:
- (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS))
- cp $(docdir)/bfd.h bfd-in2.h-new
+ (cd $(bfddocdir); $(MAKE) protos $(FLAGS_TO_PASS))
+ cp $(bfddocdir)/bfd.h bfd-in2.h-new
$(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
- cp $(docdir)/libbfd.h libbfd.h-new
+ cp $(bfddocdir)/libbfd.h libbfd.h-new
$(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
- cp $(docdir)/libcoff.h libcoff.h-new
+ cp $(bfddocdir)/libcoff.h libcoff.h-new
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
# We only rebuild the header files automatically if we have been
@@ -830,22 +905,22 @@ headers:
$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES)
- (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
- cp $(docdir)/bfd.h bfd-in2.h-new
+ (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
+ cp $(bfddocdir)/bfd.h bfd-in2.h-new
$(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
touch stmp-bin2-h
$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true
stmp-lbfd-h: $(LIBBFD_H_FILES)
- (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
- cp $(docdir)/libbfd.h libbfd.h-new
+ (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
+ cp $(bfddocdir)/libbfd.h libbfd.h-new
$(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
touch stmp-lbfd-h
$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true
stmp-lcoff-h: $(LIBCOFF_H_FILES)
- (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
- cp $(docdir)/libcoff.h libcoff.h-new
+ (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
+ cp $(bfddocdir)/libcoff.h libcoff.h-new
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
touch stmp-lcoff-h
@@ -856,777 +931,909 @@ CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
-# We want to rerun configure if config.bfd, configure.host or version.h change.
-config.status: $(srcdir)/configure $(srcdir)/config.bfd \
- $(srcdir)/configure.host $(srcdir)/version.h
- $(SHELL) ./config.status --recheck
+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)\"" ;\
+ 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}\"" ;\
+ fi ;\
+ sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $(srcdir)/version.h > $@
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
- $(INCDIR)/aout/ranlib.h $(INCDIR)/safe-ctype.h
-archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
+archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.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)/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
-bfdwin.lo: bfdwin.c $(INCDIR)/filenames.h
-cache.lo: cache.c $(INCDIR)/filenames.h
-coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h
-corefile.lo: corefile.c $(INCDIR)/filenames.h
-format.lo: format.c $(INCDIR)/filenames.h
-init.lo: init.c $(INCDIR)/filenames.h
-libbfd.lo: libbfd.c $(INCDIR)/filenames.h
+ $(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 \
+ $(INCDIR)/libiberty.h
+coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
+corefile.lo: corefile.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+format.lo: format.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+init.lo: init.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+libbfd.lo: libbfd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
+reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h
+section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h
+syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def
+targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/fnmatch.h targmatch.h
+hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/objalloc.h $(INCDIR)/libiberty.h
+linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h
+srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+binary.lo: binary.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/hashtab.h
+tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h
-reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
-section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
-syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
-targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h \
- targmatch.h
-hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
-linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h
-srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
-binary.lo: binary.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
-tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
-ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
-stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
+ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h
dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
-simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
-archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
-cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
-cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
-cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h
-cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
-cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h
-cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
-cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
-cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h
-cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h
-cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h
-cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h
-cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h
-cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h
-cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h
-cpu-ia64.lo: cpu-ia64.c $(INCDIR)/filenames.h cpu-ia64-opc.c \
- $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h
-cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h
-cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h
-cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h
-cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h
-cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h
-cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h
-cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h
-cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h
-cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h
-cpu-m68k.lo: cpu-m68k.c $(INCDIR)/filenames.h
-cpu-m88k.lo: cpu-m88k.c $(INCDIR)/filenames.h
-cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h
-cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
-cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
-cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
-cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
-cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
-cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
-cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
-cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
-cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
-cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
-cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h
-cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h
-cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
-cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
-cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
-cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
-cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h
-cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h
-cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h
-cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
-cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h
-cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h
-cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h
-cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h
-cpu-xtensa.lo: cpu-xtensa.c $(INCDIR)/filenames.h
-cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h
-aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/dwarf2.h
+simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/bfdlink.h
+archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/ar.h
+cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+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-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
+cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-ia64.lo: cpu-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ cpu-ia64-opc.c $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h
+cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-m32c.lo: cpu-m32c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
+cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
+cpu-m68k.lo: cpu-m68k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/opcode/m68k.h
+cpu-m88k.lo: cpu-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+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-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
+cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ ns32k.h
+cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
+cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+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-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-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
+cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/safe-ctype.h
+cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
+cpu-xtensa.lo: cpu-xtensa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-xc16x.lo: cpu-xc16x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-z80.lo: cpu-z80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/adobe.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ libaout.h $(INCDIR)/bfdlink.h
aout-arm.lo: aout-arm.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aoutx.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
aout-cris.lo: aout-cris.c aout32.c aoutx.h $(INCDIR)/filenames.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h libaout.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \
ns32k.h libaout.h $(INCDIR)/bfdlink.h aoutx.h $(INCDIR)/filenames.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \
- libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
aout-tic30.lo: aout-tic30.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h \
- $(INCDIR)/safe-ctype.h
-aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
- libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h
+aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.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
armnetbsd.lo: armnetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def libaout.h
+ $(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
+bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
cf-i386lynx.lo: cf-i386lynx.c $(INCDIR)/filenames.h \
- coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
-cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-a29k.lo: coff-a29k.c $(INCDIR)/filenames.h $(INCDIR)/coff/a29k.h \
+ coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
coff-apollo.lo: coff-apollo.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/apollo.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/coff/arm.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/apollo.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
- coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- coffswap.h
-coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/libiberty.h \
+ coff-m68k.c $(INCDIR)/hashtab.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
-coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/coff/i386.h \
+coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/libiberty.h coffcode.h coffswap.h
+coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/coff/i860.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/i860.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/coff/i960.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m68k.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m88k.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
- libcoff.h libecoff.h coffswap.h ecoffswap.h
-coff-or32.lo: coff-or32.c $(INCDIR)/filenames.h $(INCDIR)/coff/or32.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+coff-maxq.lo: coff-maxq.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
coffcode.h coffswap.h
+coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \
+ $(INCDIR)/coff/external.h libcoff.h libecoff.h coffswap.h \
+ ecoffswap.h
+coff-or32.lo: coff-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/or32.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
- $(INCDIR)/coff/rs6000.h libcoff.h libxcoff.h coffcode.h \
- coffswap.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/xcoff.h $(INCDIR)/coff/rs6000.h libcoff.h \
+ libxcoff.h coffcode.h coffswap.h
coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/coff/sparc.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
+coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/go32exe.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h go32stub.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \
+ go32stub.h
coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
-coff-tic4x.lo: coff-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
-coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-tic4x.lo: coff-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+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 \
- $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.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 \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/coff/we32k.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/we32k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
-coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
+coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-z80.lo: coff-z80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/safe-ctype.h
dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf.h
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/dwarf.h
ecoff.lo: ecoff.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def libaout.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h
+ $(INCDIR)/hashtab.h $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h libcoff.h \
+ libecoff.h $(INCDIR)/libiberty.h
ecofflink.lo: ecofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/objalloc.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h
+ $(INCDIR)/hashtab.h $(INCDIR)/objalloc.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h libcoff.h \
+ libecoff.h
efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \
- coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.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 $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
-elf32-am33lin.lo: elf32-am33lin.c elf-m10300.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
+elf32-am33lin.lo: elf32-am33lin.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/libiberty.h elf32-target.h
-elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-arm.h elf32-target.h
-elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-arm.h elf32-target.h
-elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-cris.lo: elf32-cris.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-d10v.lo: elf32-d10v.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/d10v.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-d30v.lo: elf32-d30v.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/reloc-macros.h elf-m10300.c $(INCDIR)/hashtab.h \
elf32-target.h
-elf32-dlx.lo: elf32-dlx.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/dlx.h $(INCDIR)/elf/reloc-macros.h \
+elf32-arc.lo: elf32-arc.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/arc.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \
+elf32-arm.lo: elf32-arm.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-vxworks.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/hashtab.h elf32-target.h
-elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf32-target.h
-elf32-h8300.lo: elf32-h8300.c $(INCDIR)/filenames.h \
+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/h8.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
- libhppa.h elf32-hppa.h elf-hppa.h elf32-target.h
-elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.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
+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 \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-target.h
+elf32-cris.lo: elf32-cris.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/cris.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-crx.lo: elf32-crx.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/crx.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-d10v.lo: elf32-d10v.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/d10v.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-d30v.lo: elf32-d30v.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/d30v.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-dlx.lo: elf32-dlx.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/dlx.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-fr30.lo: elf32-fr30.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/fr30.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \
elf32-target.h
+elf32-gen.lo: elf32-gen.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 elf32-target.h
+elf32-h8300.lo: elf32-h8300.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/h8.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-hppa.lo: elf32-hppa.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/hppa.h \
+ $(INCDIR)/elf/reloc-macros.h libhppa.h elf32-hppa.h \
+ elf-hppa.h elf32-target.h
+elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i386.lo: elf32-i386.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 elf-vxworks.h \
+ $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-i960.lo: elf32-i960.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/i960.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-i960.lo: elf32-i960.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/i960.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-ip2k.lo: elf32-ip2k.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/ip2k.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-iq2000.lo: elf32-iq2000.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/iq2000.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-ip2k.lo: elf32-ip2k.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
+elf32-m32c.lo: elf32-m32c.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/m32c.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-iq2000.lo: elf32-iq2000.c $(INCDIR)/filenames.h \
+elf32-m32r.lo: elf32-m32r.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/iq2000.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68k.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68k.h \
elf32-target.h
elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
$(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
$(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
$(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/opcode/m68hc11.h
-elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf32-target.h
-elf-m10200.lo: elf-m10200.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf32-target.h
-elf-m10300.lo: elf-m10300.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+elf32-m88k.lo: elf32-m88k.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 elf32-target.h
+elf-m10200.lo: elf-m10200.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 elf32-target.h
+elf-m10300.lo: elf-m10300.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/mn10300.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.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
-elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h 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 $(INCDIR)/hashtab.h
-elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h 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)/coff/ecoff.h $(INCDIR)/coff/mips.h \
- $(INCDIR)/coff/external.h ecoffswap.h elf32-target.h
-elf32-msp430.lo: elf32-msp430.c $(INCDIR)/filenames.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 \
- $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.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
+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)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
+ ecoffswap.h elf32-target.h elf-vxworks.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 \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-msp430.lo: elf32-msp430.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 $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-openrisc.lo: elf32-openrisc.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/openrisc.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/libiberty.h elf32-target.h
+elf32-or32.lo: elf32-or32.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/openrisc.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/or32.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-or32.lo: elf32-or32.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/libiberty.h elf32-target.h
elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-ppc.h elf32-target.h
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-ppc.h elf-vxworks.h \
+ elf32-target.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)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.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-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
- 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 elf32-sh64.h $(srcdir)/../opcodes/sh64-opc.h
+ $(INCDIR)/hashtab.h 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 elf32-sh64.h \
+ $(srcdir)/../opcodes/sh64-opc.h
elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+ $(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-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
+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
+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
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.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 \
- elf32-target.h
+ elfxx-sparc.h elf32-target.h elf-vxworks.h
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/libiberty.h elf32-target.h
-elf32-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
+elf32-vax.lo: elf32-vax.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/vax.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-xstormy16.lo: elf32-xstormy16.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/xstormy16.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/libiberty.h elf32-target.h
elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/xtensa.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/xtensa-isa.h \
$(INCDIR)/xtensa-config.h elf32-target.h
+elf32-xc16x.lo: elf32-xc16x.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/xc16x.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/libiberty.h elf32-target.h
elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h
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-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)/libiberty.h
-elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h
elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/dwarf2.h
+elf-vxworks.lo: elf-vxworks.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 \
+ elf-vxworks.h
epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \
- coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+ 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
epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c $(INCDIR)/filenames.h \
- coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-hp300bsd.lo: hp300bsd.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ 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
+hp300bsd.lo: hp300bsd.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
hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \
aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.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 \
aout-target.h
som.lo: som.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h
-i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h $(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
i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
$(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
- libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-i386freebsd.lo: i386freebsd.c freebsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386linux.lo: i386linux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
+ libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-i386lynx.lo: i386lynx.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386msdos.lo: i386msdos.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h
+ aout-target.h
+i386freebsd.lo: i386freebsd.c freebsd.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
+i386linux.lo: i386linux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
+i386lynx.lo: i386lynx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+i386msdos.lo: i386msdos.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libaout.h $(INCDIR)/bfdlink.h
i386netbsd.lo: i386netbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- libaout.h $(INCDIR)/os9k.h
-ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/ieee.h \
- libieee.h $(INCDIR)/safe-ctype.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
+i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
+i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/os9k.h
+ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/ieee.h libieee.h $(INCDIR)/safe-ctype.h
m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-m68klinux.lo: m68klinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-m68klynx.lo: m68klynx.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(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
+m68klinux.lo: m68klinux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
m68knetbsd.lo: m68knetbsd.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
+m88kmach3.lo: m88kmach3.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
-m88kmach3.lo: m88kmach3.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+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 \
- $(INCDIR)/libiberty.h mach-o-target.c
-mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.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 \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-newsos3.lo: newsos3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-nlm.lo: nlm.c $(INCDIR)/filenames.h libnlm.h $(INCDIR)/nlm/common.h \
- $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
-nlm32-i386.lo: nlm32-i386.c $(INCDIR)/filenames.h $(INCDIR)/nlm/i386-ext.h \
+newsos3.lo: newsos3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
+nlm.lo: nlm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
+ $(INCDIR)/nlm/external.h
+nlm32-i386.lo: nlm32-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/nlm/i386-ext.h libnlm.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
+ nlm-target.h
nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/nlm/sparc32-ext.h libnlm.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/nlm/sparc32-ext.h libnlm.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
+ nlmswap.h nlm-target.h
+nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/nlm/ppc-ext.h libnlm.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
nlm-target.h
-nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/nlm/ppc-ext.h \
+nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
-nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
- $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
+ $(INCDIR)/nlm/external.h
ns32knetbsd.lo: ns32knetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(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
oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/oasys.h liboasys.h
+ $(INCDIR)/hashtab.h $(INCDIR)/oasys.h liboasys.h
pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-pdp11.lo: pdp11.c $(INCDIR)/filenames.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \
+ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+pdp11.lo: pdp11.c $(INCDIR)/filenames.h $(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)/libiberty.h
+ $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
- $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(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.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \
- $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(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)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pei-i386.lo: pei-i386.c $(INCDIR)/filenames.h coff-i386.c \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-mcore.lo: pe-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
- $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
- $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
- $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
- $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- coffcode.h peicode.h libpei.h
-pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
- $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
libpei.h
-pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/coff/mipspe.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
-pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \
+pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
+ $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
+ libpei.h
+pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/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
-reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h $(INCDIR)/coff/internal.h libcoff.h
-riscix.lo: riscix.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-sparclinux.lo: sparclinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-sparclynx.lo: sparclynx.c $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
+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 \
+ $(INCDIR)/hashtab.h
+reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \
+ libcoff.h
+riscix.lo: riscix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+sparclinux.lo: sparclinux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
+sparclynx.lo: sparclynx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
sparcnetbsd.lo: sparcnetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(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
sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
- $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/aout/sun4.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(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
vax1knetbsd.lo: vax1knetbsd.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
+vaxbsd.lo: vaxbsd.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
-vaxbsd.lo: vaxbsd.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
+versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h
vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- vms.h
+ $(INCDIR)/hashtab.h vms.h
vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- vms.h
+ $(INCDIR)/hashtab.h vms.h
vms-hdr.lo: vms-hdr.c bfdver.h $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h vms.h
-vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.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 \
+ $(INCDIR)/hashtab.h vms.h
vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- vms.h
+ $(INCDIR)/hashtab.h vms.h
xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h libcoff.h \
- libxcoff.h
-xsym.lo: xsym.c xsym.h $(INCDIR)/filenames.h
-xtensa-isa.lo: xtensa-isa.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/xtensa-isa-internal.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
+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
aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.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
coff-alpha.lo: coff-alpha.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \
- libcoff.h libecoff.h coffswap.h ecoffswap.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
+ $(INCDIR)/aout/ar.h libcoff.h libecoff.h coffswap.h \
+ ecoffswap.h
coff64-rs6000.lo: coff64-rs6000.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
- $(INCDIR)/coff/rs6k64.h libcoff.h libxcoff.h coffcode.h \
- coffswap.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/xcoff.h $(INCDIR)/coff/rs6k64.h libcoff.h \
+ libxcoff.h coffcode.h coffswap.h
demo64.lo: demo64.c aoutf1.h $(INCDIR)/filenames.h \
- $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ $(INCDIR)/hashtab.h $(INCDIR)/aout/sun4.h libaout.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \
- coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+ coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.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 \
$(INCDIR)/elf/reloc-macros.h elf64-target.h
elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \
- libecoff.h ecoffswap.h elf64-target.h
-elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \
- $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h libhppa.h \
- elf64-hppa.h elf-hppa.h elf64-target.h
-elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \
+ libcoff.h libecoff.h ecoffswap.h elf64-target.h
+elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \
+ $(INCDIR)/filenames.h $(INCDIR)/hashtab.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf64-target.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
+ libhppa.h elf64-hppa.h elf-hppa.h elf64-target.h
+elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf64-target.h
elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h 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)/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)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
ecoffswap.h elf32-target.h
-elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
- $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
+elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h genlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ 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)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \
elf64-target.h
-elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/opcode/mmix.h elf64-target.h
-elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/reloc-macros.h \
- elf64-ppc.h elf64-target.h
-elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.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 \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \
elf64-target.h
+elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc64.h \
+ $(INCDIR)/elf/reloc-macros.h elf64-ppc.h elf64-target.h
+elf64-s390.lo: elf64-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 elf64-target.h
elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf64-target.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 elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
- elf64-target.h
+ $(INCDIR)/opcode/sparc.h elfxx-sparc.h elf64-target.h
elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
- $(INCDIR)/safe-ctype.h
-mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h
+mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/mmix.h
nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
- $(INCDIR)/nlm/alpha-ext.h libnlm.h $(INCDIR)/nlm/common.h \
- $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
- nlm-target.h
-nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
- $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
+ $(INCDIR)/hashtab.h $(INCDIR)/nlm/alpha-ext.h libnlm.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
+ nlmswap.h nlm-target.h
+nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
+ $(INCDIR)/nlm/external.h
aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h
-hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h
-irix-core.lo: irix-core.c $(INCDIR)/filenames.h
-lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h
-osf-core.lo: osf-core.c $(INCDIR)/filenames.h
-sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h
-trad-core.lo: trad-core.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h
-cisco-core.lo: cisco-core.c $(INCDIR)/filenames.h
-elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
+hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+irix-core.lo: irix-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+osf-core.lo: osf-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libaout.h $(INCDIR)/bfdlink.h
+trad-core.lo: trad-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libaout.h $(INCDIR)/bfdlink.h
+cisco-core.lo: cisco-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+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
-elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h $(INCDIR)/hashtab.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
-peigen.lo: peigen.c $(INCDIR)/filenames.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)/coff/internal.h \
- $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h libpei.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
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/bfd/Makefile.in b/contrib/binutils/bfd/Makefile.in
index a6685f260d19..8ed905635617 100644
--- a/contrib/binutils/bfd/Makefile.in
+++ b/contrib/binutils/bfd/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,61 +12,108 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+@SET_MAKE@
-SHELL = @SHELL@
+
+SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub README \
+ ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/config.in $(srcdir)/../mkinstalldirs \
+ $(srcdir)/bfd-in2.h $(top_srcdir)/po/Make-in \
+ $(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)/../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__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = bfd-in3.h po/Makefile.in
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+libbfd_a_AR = $(AR) $(ARFLAGS)
+libbfd_a_LIBADD =
+am_libbfd_a_OBJECTS =
+libbfd_a_OBJECTS = $(am_libbfd_a_OBJECTS)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(bfdlibdir)"
+bfdlibLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(bfdlib_LTLIBRARIES)
+am__objects_1 = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
+ cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo \
+ opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo \
+ linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo \
+ stab-syms.lo merge.lo dwarf2.lo simple.lo
+am__objects_2 = archive64.lo
+am_libbfd_la_OBJECTS = $(am__objects_1) $(am__objects_2)
+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) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --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 \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
AR = @AR@
-AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
@@ -73,74 +122,144 @@ BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CC_FOR_BUILD = @CC_FOR_BUILD@
+CFLAGS = @CFLAGS@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@
+INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
-OBJDUMP = @OBJDUMP@
+NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+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@
WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
all_backends = @all_backends@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
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@
-bfd_version = @bfd_version@
-bfd_version_string = @bfd_version_string@
+bfdincludedir = @bfdincludedir@
+bfdlibdir = @bfdlibdir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_noncanonical = @host_noncanonical@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
l = @l@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_noncanonical = @target_noncanonical@
+target_os = @target_os@
+target_vendor = @target_vendor@
tdefaults = @tdefaults@
wordsize = @wordsize@
+AUTOMAKE_OPTIONS = 1.9 cygnus
-AUTOMAKE_OPTIONS = cygnus
-
+# Uncomment the following line when doing a release.
+# RELEASE=y
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
MKDEP = gcc -MM
-
SUBDIRS = doc po
-
-docdir = doc
-bfdlibdir = @bfdlibdir@
-bfdincludedir = @bfdincludedir@
-
+bfddocdir = doc
bfdlib_LTLIBRARIES = libbfd.la
-
-WARN_CFLAGS = @WARN_CFLAGS@
AM_CFLAGS = $(WARN_CFLAGS)
# bfd.h goes here, for now
@@ -161,9 +280,7 @@ BFD32_LIBS = \
srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
merge.lo dwarf2.lo simple.lo
-
BFD64_LIBS = archive64.lo
-
BFD32_LIBS_CFILES = \
archive.c archures.c bfd.c bfdio.c bfdwin.c \
cache.c coffgen.c corefile.c \
@@ -172,18 +289,19 @@ BFD32_LIBS_CFILES = \
srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
merge.c dwarf2.c simple.c
-
BFD64_LIBS_CFILES = archive64.c
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
ALL_MACHINES = \
- cpu-a29k.lo \
cpu-alpha.lo \
cpu-arc.lo \
cpu-arm.lo \
cpu-avr.lo \
+ cpu-bfin.lo \
+ cpu-cr16c.lo \
cpu-cris.lo \
+ cpu-crx.lo \
cpu-d10v.lo \
cpu-d30v.lo \
cpu-dlx.lo \
@@ -199,6 +317,7 @@ ALL_MACHINES = \
cpu-i960.lo \
cpu-ip2k.lo \
cpu-iq2000.lo \
+ cpu-m32c.lo \
cpu-m32r.lo \
cpu-m68hc11.lo \
cpu-m68hc12.lo \
@@ -206,9 +325,11 @@ ALL_MACHINES = \
cpu-m88k.lo \
cpu-m10200.lo \
cpu-m10300.lo \
+ cpu-maxq.lo \
cpu-mcore.lo \
cpu-mips.lo \
cpu-mmix.lo \
+ cpu-mt.lo \
cpu-msp430.lo \
cpu-or32.lo \
cpu-ns32k.lo \
@@ -230,16 +351,19 @@ ALL_MACHINES = \
cpu-w65.lo \
cpu-xstormy16.lo \
cpu-xtensa.lo \
+ cpu-xc16x.lo \
+ cpu-z80.lo \
cpu-z8k.lo
-
ALL_MACHINES_CFILES = \
- cpu-a29k.c \
cpu-alpha.c \
cpu-arc.c \
cpu-arm.c \
cpu-avr.c \
+ cpu-bfin.c \
cpu-cris.c \
+ cpu-cr16c.c \
+ cpu-crx.c \
cpu-d10v.c \
cpu-d30v.c \
cpu-dlx.c \
@@ -255,6 +379,7 @@ ALL_MACHINES_CFILES = \
cpu-i960.c \
cpu-ip2k.c \
cpu-iq2000.c \
+ cpu-m32c.c \
cpu-m32r.c \
cpu-m68hc11.c \
cpu-m68hc12.c \
@@ -262,9 +387,11 @@ ALL_MACHINES_CFILES = \
cpu-m88k.c \
cpu-m10200.c \
cpu-m10300.c \
+ cpu-maxq.c \
cpu-mcore.c \
cpu-mips.c \
cpu-mmix.c \
+ cpu-mt.c \
cpu-msp430.c \
cpu-or32.c \
cpu-ns32k.c \
@@ -286,6 +413,8 @@ ALL_MACHINES_CFILES = \
cpu-w65.c \
cpu-xstormy16.c \
cpu-xtensa.c \
+ cpu-xc16x.c \
+ cpu-z80.c \
cpu-z8k.c
@@ -303,9 +432,7 @@ BFD32_BACKENDS = \
armnetbsd.lo \
bout.lo \
cf-i386lynx.lo \
- cf-m68klynx.lo \
cf-sparclynx.lo \
- coff-a29k.lo \
coff-apollo.lo \
coff-arm.lo \
coff-aux.lo \
@@ -317,6 +444,7 @@ BFD32_BACKENDS = \
coff-i960.lo \
coff-m68k.lo \
coff-m88k.lo \
+ coff-maxq.lo \
coff-mips.lo \
coff-or32.lo \
coff-rs6000.lo \
@@ -331,6 +459,7 @@ BFD32_BACKENDS = \
coff-u68k.lo \
coff-we32k.lo \
coff-w65.lo \
+ coff-z80.lo \
coff-z8k.lo \
cofflink.lo \
dwarf1.lo \
@@ -340,10 +469,12 @@ BFD32_BACKENDS = \
elf.lo \
elf32-am33lin.lo \
elf32-arc.lo \
- elfarm-oabi.lo \
- elfarm-nabi.lo \
+ elf32-arm.lo \
elf32-avr.lo \
+ elf32-bfin.lo \
+ elf32-cr16c.lo \
elf32-cris.lo \
+ elf32-crx.lo \
elf32-d10v.lo \
elf32-d30v.lo \
elf32-dlx.lo \
@@ -356,9 +487,9 @@ BFD32_BACKENDS = \
elf32-i386.lo \
elf32-i860.lo \
elf32-i960.lo \
- elf32-ia64.lo \
elf32-ip2k.lo \
elf32-iq2000.lo \
+ elf32-m32c.lo \
elf32-m32r.lo \
elf32-m68hc11.lo \
elf32-m68hc12.lo \
@@ -370,6 +501,7 @@ BFD32_BACKENDS = \
elf32-mcore.lo \
elfxx-mips.lo \
elf32-mips.lo \
+ elf32-mt.lo \
elf32-msp430.lo \
elf32-openrisc.lo \
elf32-or32.lo \
@@ -377,17 +509,21 @@ BFD32_BACKENDS = \
elf32-ppc.lo \
elf32-s390.lo \
elf32-sh.lo \
+ elf32-sh-symbian.lo \
elf32-sh64.lo \
elf32-sh64-com.lo \
+ elfxx-sparc.lo \
elf32-sparc.lo \
elf32-v850.lo \
elf32-vax.lo \
elf32-xstormy16.lo \
elf32-xtensa.lo \
+ elf32-xc16x.lo \
elf32.lo \
elflink.lo \
elf-strtab.lo \
elf-eh-frame.lo \
+ elf-vxworks.lo \
epoc-pe-arm.lo \
epoc-pei-arm.lo \
hp300bsd.lo \
@@ -406,9 +542,9 @@ BFD32_BACKENDS = \
ieee.lo \
m68k4knetbsd.lo \
m68klinux.lo \
- m68klynx.lo \
m68knetbsd.lo \
m88kmach3.lo \
+ m88kopenbsd.lo \
mach-o.lo \
mipsbsd.lo \
newsos3.lo \
@@ -456,7 +592,6 @@ BFD32_BACKENDS = \
xtensa-isa.lo \
xtensa-modules.lo
-
BFD32_BACKENDS_CFILES = \
aout-adobe.c \
aout-arm.c \
@@ -469,9 +604,7 @@ BFD32_BACKENDS_CFILES = \
armnetbsd.c \
bout.c \
cf-i386lynx.c \
- cf-m68klynx.c \
cf-sparclynx.c \
- coff-a29k.c \
coff-apollo.c \
coff-arm.c \
coff-aux.c \
@@ -483,6 +616,7 @@ BFD32_BACKENDS_CFILES = \
coff-i960.c \
coff-m68k.c \
coff-m88k.c \
+ coff-maxq.c \
coff-mips.c \
coff-or32.c \
coff-rs6000.c \
@@ -497,6 +631,7 @@ BFD32_BACKENDS_CFILES = \
coff-u68k.c \
coff-we32k.c \
coff-w65.c \
+ coff-z80.c \
coff-z8k.c \
cofflink.c \
dwarf1.c \
@@ -506,10 +641,12 @@ BFD32_BACKENDS_CFILES = \
elf.c \
elf32-am33lin.c \
elf32-arc.c \
- elfarm-oabi.c \
- elfarm-nabi.c \
+ elf32-arm.c \
elf32-avr.c \
+ elf32-bfin.c \
+ elf32-cr16c.c \
elf32-cris.c \
+ elf32-crx.c \
elf32-d10v.c \
elf32-d30v.c \
elf32-dlx.c \
@@ -524,6 +661,7 @@ BFD32_BACKENDS_CFILES = \
elf32-i960.c \
elf32-ip2k.c \
elf32-iq2000.c \
+ elf32-m32c.c \
elf32-m32r.c \
elf32-m68k.c \
elf32-m68hc11.c \
@@ -535,6 +673,7 @@ BFD32_BACKENDS_CFILES = \
elf32-mcore.c \
elfxx-mips.c \
elf32-mips.c \
+ elf32-mt.c \
elf32-msp430.c \
elf32-openrisc.c \
elf32-or32.c \
@@ -544,15 +683,19 @@ BFD32_BACKENDS_CFILES = \
elf32-sh64-com.c \
elf32-s390.c \
elf32-sh.c \
+ elf32-sh-symbian.c \
+ elfxx-sparc.c \
elf32-sparc.c \
elf32-v850.c \
elf32-vax.c \
elf32-xstormy16.c \
elf32-xtensa.c \
+ elf32-xc16x.c \
elf32.c \
elflink.c \
elf-strtab.c \
elf-eh-frame.c \
+ elf-vxworks.c \
epoc-pe-arm.c \
epoc-pei-arm.c \
hp300bsd.c \
@@ -571,9 +714,9 @@ BFD32_BACKENDS_CFILES = \
ieee.c \
m68k4knetbsd.c \
m68klinux.c \
- m68klynx.c \
m68knetbsd.c \
m88kmach3.c \
+ m88kopenbsd.c \
mach-o.c \
mipsbsd.c \
newsos3.c \
@@ -624,6 +767,8 @@ BFD32_BACKENDS_CFILES = \
# The .o files needed by all of the 64 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all
# and --enable-64-bit-bfd.
+# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in
+# BFD32_BACKENDS.
BFD64_BACKENDS = \
aix5ppc-core.lo \
aout64.lo \
@@ -634,6 +779,7 @@ BFD64_BACKENDS = \
elf64-x86-64.lo \
elf64-alpha.lo \
elf64-hppa.lo \
+ elf32-ia64.lo \
elf64-ia64.lo \
elf64-gen.lo \
elfn32-mips.lo \
@@ -649,7 +795,6 @@ BFD64_BACKENDS = \
nlm64.lo \
pepigen.lo
-
BFD64_BACKENDS_CFILES = \
aix5ppc-core.c \
aout64.c \
@@ -673,7 +818,6 @@ BFD64_BACKENDS_CFILES = \
nlm32-alpha.c \
nlm64.c
-
OPTIONAL_BACKENDS = \
aix386-core.lo \
hpux-core.lo \
@@ -684,7 +828,6 @@ OPTIONAL_BACKENDS = \
trad-core.lo \
cisco-core.lo
-
OPTIONAL_BACKENDS_CFILES = \
aix386-core.c \
hpux-core.c \
@@ -696,6 +839,15 @@ OPTIONAL_BACKENDS_CFILES = \
cisco-core.c
+# We want to rerun configure if configure.in, config.bfd or
+# configure.host change. configure.in is needed since the version
+# number in Makefile comes from configure.in.
+CONFIG_STATUS_DEPENDENCIES = \
+ $(srcdir)/configure.in \
+ $(srcdir)/config.bfd \
+ $(srcdir)/configure.host
+
+
# These are defined by configure.in:
WORDSIZE = @wordsize@
ALL_BACKENDS = @all_backends@
@@ -703,8 +855,7 @@ BFD_BACKENDS = @bfd_backends@
BFD_LIBS = @bfd_libs@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
-
-INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
+INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
# C source files that correspond to .o's.
SOURCE_CFILES = \
@@ -715,16 +866,13 @@ SOURCE_CFILES = \
$(BFD64_BACKENDS_CFILES) \
$(OPTIONAL_BACKENDS_CFILES)
-
BUILD_CFILES = \
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
-
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
-
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h \
+ elf-bfd.h elf-hppa.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h \
freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
@@ -733,13 +881,10 @@ SOURCE_HFILES = \
pef.h pef-traceback.h peicode.h som.h version.h \
vms.h xcoff-target.h xsym.h
-
BUILD_HFILES = \
bfdver.h elf32-target.h elf64-target.h targmatch.h
-
HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
-
SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES)
BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
@@ -748,7 +893,6 @@ BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
# 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)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
@@ -758,13 +902,10 @@ libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# directory so that we don't have to convert all the programs that use
# libbfd.a simultaneously. This is a hack which should be removed if
# everything else starts using libtool. FIXME.
-
noinst_LIBRARIES = libbfd.a
libbfd_a_SOURCES =
-
BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
LOCAL_H_DEPS = libbfd.h sysdep.h config.h
-
BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
reloc.c syms.c bfd.c bfdio.c bfdwin.c \
archive.c corefile.c targets.c format.c
@@ -774,140 +915,99 @@ LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \
cache.c reloc.c archures.c elf.c
LIBCOFF_H_FILES = libcoff-in.h coffcode.h
-
MOSTLYCLEANFILES = ofiles stamp-ofiles
-
CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
-
DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = bfd-in3.h bfdver.h
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-libbfd_a_LIBADD =
-libbfd_a_OBJECTS =
-LTLIBRARIES = $(bfdlib_LTLIBRARIES)
-
-libbfd_la_OBJECTS = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
-cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo \
-reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo \
-binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo \
-simple.lo archive64.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = README ./stamp-h.in COPYING ChangeLog Makefile.am \
-Makefile.in TODO acinclude.m4 aclocal.m4 bfd-in2.h config.in configure \
-configure.in version.h
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
-OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
-all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+.SUFFIXES: .c .lo .o .obj
+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 \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-config.h: stamp-h
- @if test ! -f $@; then \
- rm -f stamp-h; \
- $(MAKE) stamp-h; \
- else :; fi
-stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
- $(SHELL) ./config.status
- @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+config.h: stamp-h1
@if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-
-mostlyclean-hdr:
-clean-hdr:
+stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
distclean-hdr:
- -rm -f config.h
-
-maintainer-clean-hdr:
-bfd-in3.h: $(top_builddir)/config.status bfd-in2.h
- cd $(top_builddir) && CONFIG_FILES=$@:bfd-in2.h CONFIG_HEADERS= $(SHELL) ./config.status
-bfdver.h: $(top_builddir)/config.status version.h
- cd $(top_builddir) && CONFIG_FILES=$@:version.h CONFIG_HEADERS= $(SHELL) ./config.status
-
-mostlyclean-noinstLIBRARIES:
+ -rm -f config.h stamp-h1
+bfd-in3.h: $(top_builddir)/config.status $(srcdir)/bfd-in2.h
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
+clean-bfdlibLTLIBRARIES:
+ -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES)
+ @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
+ $(LINK) -rpath $(bfdlibdir) $(libbfd_la_LDFLAGS) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS)
mostlyclean-compile:
- -rm -f *.o core *.core
-rm -f *.$(OBJEXT)
-clean-compile:
-
distclean-compile:
-rm -f *.tab.c
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.c.o:
+ $(COMPILE) -c $<
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.c.lo:
+ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -916,20 +1016,8 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-
-maintainer-clean-libtool:
-
-mostlyclean-bfdlibLTLIBRARIES:
-
-clean-bfdlibLTLIBRARIES:
- -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES)
-
-distclean-bfdlibLTLIBRARIES:
-
-maintainer-clean-bfdlibLTLIBRARIES:
-
-libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
- $(LINK) -rpath $(bfdlibdir) $(libbfd_la_LDFLAGS) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS)
+ -rm -f libtool
+uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -937,13 +1025,14 @@ libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -955,7 +1044,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -963,13 +1052,24 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
+ rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
@@ -979,138 +1079,99 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique
+tags: TAGS
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-clean-tags:
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-am:
check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-all-recursive-am: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-install-exec-am:
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(bfdlibdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
install-exec: install-exec-recursive
-
-install-data-am: install-bfdlibLTLIBRARIES
install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-bfdlibLTLIBRARIES
-uninstall: uninstall-recursive
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
-all-redirect: all-recursive-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(bfdlibdir)
-
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@@ -1118,65 +1179,81 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \
- mostlyclean-compile mostlyclean-libtool \
- mostlyclean-bfdlibLTLIBRARIES mostlyclean-tags \
- mostlyclean-generic
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
-mostlyclean: mostlyclean-recursive
+clean-am: clean-bfdlibLTLIBRARIES clean-generic clean-libtool \
+ clean-noinstLIBRARIES mostlyclean-am
-clean-am: clean-hdr clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-bfdlibLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags
-clean: clean-recursive
+dvi: dvi-recursive
-distclean-am: distclean-hdr distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-bfdlibLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
+dvi-am:
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-hdr \
- maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-bfdlibLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-bfdlibLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-bfdlibLTLIBRARIES \
-distclean-bfdlibLTLIBRARIES clean-bfdlibLTLIBRARIES \
-maintainer-clean-bfdlibLTLIBRARIES uninstall-bfdlibLTLIBRARIES \
-install-bfdlibLTLIBRARIES install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info all-recursive-am install-exec-am install-exec \
-install-data-am install-data install-am install uninstall-am uninstall \
-all-redirect all-am all installdirs-am installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-bfdlibLTLIBRARIES
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-bfdlibLTLIBRARIES clean-generic \
+ clean-libtool clean-noinstLIBRARIES clean-recursive ctags \
+ ctags-recursive distclean distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-recursive \
+ distclean-tags dvi dvi-am html html-am info info-am install \
+ install-am install-bfdlibLTLIBRARIES install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-bfdlibLTLIBRARIES uninstall-info-am
po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
@@ -1189,7 +1266,36 @@ po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
| LC_COLLATE= sort > tmp.bld \
&& mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
-diststuff: info
+all diststuff: info
+
+.PHONY: install-html install-html-am install-html-recursive
+
+install-html: install-html-recursive
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
stamp-ofiles: Makefile
rm -f tofiles
@@ -1300,8 +1406,6 @@ uninstall_libbfd:
rm -f $(DESTDIR)$(bfdincludedir)/symcat.h
rm -f $(DESTDIR)$(bfdincludedir)/bfdlink.h
-Makefile: $(srcdir)/configure.in
-
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) bfd.h
rm -f DEP1
@@ -1361,12 +1465,12 @@ stmp-bfd-h: bfd-in3.h
# Could really use a "copy-if-change"...
headers:
- (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS))
- cp $(docdir)/bfd.h bfd-in2.h-new
+ (cd $(bfddocdir); $(MAKE) protos $(FLAGS_TO_PASS))
+ cp $(bfddocdir)/bfd.h bfd-in2.h-new
$(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
- cp $(docdir)/libbfd.h libbfd.h-new
+ cp $(bfddocdir)/libbfd.h libbfd.h-new
$(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
- cp $(docdir)/libcoff.h libcoff.h-new
+ cp $(bfddocdir)/libcoff.h libcoff.h-new
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
# We only rebuild the header files automatically if we have been
@@ -1374,800 +1478,931 @@ headers:
$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES)
- (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
- cp $(docdir)/bfd.h bfd-in2.h-new
+ (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
+ cp $(bfddocdir)/bfd.h bfd-in2.h-new
$(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
touch stmp-bin2-h
$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true
stmp-lbfd-h: $(LIBBFD_H_FILES)
- (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
- cp $(docdir)/libbfd.h libbfd.h-new
+ (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
+ cp $(bfddocdir)/libbfd.h libbfd.h-new
$(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
touch stmp-lbfd-h
$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true
stmp-lcoff-h: $(LIBCOFF_H_FILES)
- (cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
- cp $(docdir)/libcoff.h libcoff.h-new
+ (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
+ cp $(bfddocdir)/libcoff.h libcoff.h-new
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
touch stmp-lcoff-h
-# We want to rerun configure if config.bfd, configure.host or version.h change.
-config.status: $(srcdir)/configure $(srcdir)/config.bfd \
- $(srcdir)/configure.host $(srcdir)/version.h
- $(SHELL) ./config.status --recheck
+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)\"" ;\
+ 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}\"" ;\
+ fi ;\
+ sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $(srcdir)/version.h > $@
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
- $(INCDIR)/aout/ranlib.h $(INCDIR)/safe-ctype.h
-archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
+archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.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)/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
-bfdwin.lo: bfdwin.c $(INCDIR)/filenames.h
-cache.lo: cache.c $(INCDIR)/filenames.h
-coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h
-corefile.lo: corefile.c $(INCDIR)/filenames.h
-format.lo: format.c $(INCDIR)/filenames.h
-init.lo: init.c $(INCDIR)/filenames.h
-libbfd.lo: libbfd.c $(INCDIR)/filenames.h
+ $(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 \
+ $(INCDIR)/libiberty.h
+coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
+corefile.lo: corefile.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+format.lo: format.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+init.lo: init.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+libbfd.lo: libbfd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
+reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h
+section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h
+syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def
+targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/fnmatch.h targmatch.h
+hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/objalloc.h $(INCDIR)/libiberty.h
+linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h
+srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+binary.lo: binary.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/hashtab.h
+tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h
-reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
-section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
-syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
-targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h \
- targmatch.h
-hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
-linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h
-srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
-binary.lo: binary.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
-tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
-ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
-stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
+ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h
dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
-simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
-archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
-cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
-cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
-cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h
-cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
-cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h
-cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
-cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
-cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h
-cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h
-cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h
-cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h
-cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h
-cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h
-cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h
-cpu-ia64.lo: cpu-ia64.c $(INCDIR)/filenames.h cpu-ia64-opc.c \
- $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h
-cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h
-cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h
-cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h
-cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h
-cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h
-cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h
-cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h
-cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h
-cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h
-cpu-m68k.lo: cpu-m68k.c $(INCDIR)/filenames.h
-cpu-m88k.lo: cpu-m88k.c $(INCDIR)/filenames.h
-cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h
-cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
-cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
-cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
-cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
-cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
-cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
-cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
-cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
-cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
-cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
-cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h
-cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h
-cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
-cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
-cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
-cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
-cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h
-cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h
-cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h
-cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
-cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h
-cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h
-cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h
-cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h
-cpu-xtensa.lo: cpu-xtensa.c $(INCDIR)/filenames.h
-cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h
-aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/dwarf2.h
+simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/bfdlink.h
+archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/ar.h
+cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+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-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
+cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-ia64.lo: cpu-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ cpu-ia64-opc.c $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h
+cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-m32c.lo: cpu-m32c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
+cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
+cpu-m68k.lo: cpu-m68k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/opcode/m68k.h
+cpu-m88k.lo: cpu-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+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-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
+cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ ns32k.h
+cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
+cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+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-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-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
+cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/safe-ctype.h
+cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
+cpu-xtensa.lo: cpu-xtensa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-xc16x.lo: cpu-xc16x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-z80.lo: cpu-z80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/adobe.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ libaout.h $(INCDIR)/bfdlink.h
aout-arm.lo: aout-arm.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aoutx.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
aout-cris.lo: aout-cris.c aout32.c aoutx.h $(INCDIR)/filenames.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h libaout.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \
ns32k.h libaout.h $(INCDIR)/bfdlink.h aoutx.h $(INCDIR)/filenames.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \
- libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
aout-tic30.lo: aout-tic30.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h \
- $(INCDIR)/safe-ctype.h
-aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
- libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h
+aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.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
armnetbsd.lo: armnetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def libaout.h
+ $(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
+bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
cf-i386lynx.lo: cf-i386lynx.c $(INCDIR)/filenames.h \
- coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
-cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-a29k.lo: coff-a29k.c $(INCDIR)/filenames.h $(INCDIR)/coff/a29k.h \
+ coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
coff-apollo.lo: coff-apollo.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/apollo.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/coff/arm.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/apollo.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
- coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- coffswap.h
-coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/libiberty.h \
+ coff-m68k.c $(INCDIR)/hashtab.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
-coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/coff/i386.h \
+coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/libiberty.h coffcode.h coffswap.h
+coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/coff/i860.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/i860.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/coff/i960.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
-coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m68k.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m88k.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
- libcoff.h libecoff.h coffswap.h ecoffswap.h
-coff-or32.lo: coff-or32.c $(INCDIR)/filenames.h $(INCDIR)/coff/or32.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+coff-maxq.lo: coff-maxq.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
coffcode.h coffswap.h
+coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \
+ $(INCDIR)/coff/external.h libcoff.h libecoff.h coffswap.h \
+ ecoffswap.h
+coff-or32.lo: coff-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/or32.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
- $(INCDIR)/coff/rs6000.h libcoff.h libxcoff.h coffcode.h \
- coffswap.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/xcoff.h $(INCDIR)/coff/rs6000.h libcoff.h \
+ libxcoff.h coffcode.h coffswap.h
coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
-coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/coff/sparc.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
+coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/go32exe.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h go32stub.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \
+ go32stub.h
coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
-coff-tic4x.lo: coff-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
-coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-tic4x.lo: coff-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+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 \
- $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.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 \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/coff/we32k.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
+coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/we32k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
-coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
-coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
+coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-z80.lo: coff-z80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
+coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h libcoff.h \
+ $(INCDIR)/safe-ctype.h
dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf.h
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/dwarf.h
ecoff.lo: ecoff.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def libaout.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h
+ $(INCDIR)/hashtab.h $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h libcoff.h \
+ libecoff.h $(INCDIR)/libiberty.h
ecofflink.lo: ecofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/objalloc.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h
+ $(INCDIR)/hashtab.h $(INCDIR)/objalloc.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h libcoff.h \
+ libecoff.h
efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \
- coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.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 $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
-elf32-am33lin.lo: elf32-am33lin.c elf-m10300.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
+elf32-am33lin.lo: elf32-am33lin.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/libiberty.h elf32-target.h
-elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-arm.h elf32-target.h
-elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-arm.h elf32-target.h
-elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-cris.lo: elf32-cris.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/reloc-macros.h elf-m10300.c $(INCDIR)/hashtab.h \
elf32-target.h
-elf32-d10v.lo: elf32-d10v.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/d10v.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-d30v.lo: elf32-d30v.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-dlx.lo: elf32-dlx.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/dlx.h $(INCDIR)/elf/reloc-macros.h \
+elf32-arc.lo: elf32-arc.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/arc.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \
+elf32-arm.lo: elf32-arm.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-vxworks.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/elf/dwarf2.h $(INCDIR)/hashtab.h elf32-target.h
-elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf32-target.h
-elf32-h8300.lo: elf32-h8300.c $(INCDIR)/filenames.h \
+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/h8.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
- libhppa.h elf32-hppa.h elf-hppa.h elf32-target.h
-elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.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
+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 \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-target.h
+elf32-cris.lo: elf32-cris.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/cris.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-crx.lo: elf32-crx.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/crx.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-d10v.lo: elf32-d10v.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/d10v.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-d30v.lo: elf32-d30v.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/d30v.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-dlx.lo: elf32-dlx.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/dlx.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-frv.lo: elf32-frv.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/frv.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \
elf32-target.h
+elf32-gen.lo: elf32-gen.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 elf32-target.h
+elf32-h8300.lo: elf32-h8300.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/h8.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-hppa.lo: elf32-hppa.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/hppa.h \
+ $(INCDIR)/elf/reloc-macros.h libhppa.h elf32-hppa.h \
+ elf-hppa.h elf32-target.h
+elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i386.lo: elf32-i386.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 elf-vxworks.h \
+ $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-i960.lo: elf32-i960.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/i960.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-i960.lo: elf32-i960.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/i960.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-ip2k.lo: elf32-ip2k.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/ip2k.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-iq2000.lo: elf32-iq2000.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/iq2000.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-ip2k.lo: elf32-ip2k.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
+elf32-m32c.lo: elf32-m32c.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/m32c.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-iq2000.lo: elf32-iq2000.c $(INCDIR)/filenames.h \
+elf32-m32r.lo: elf32-m32r.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/iq2000.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68k.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68k.h \
elf32-target.h
elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
$(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
$(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
$(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/opcode/m68hc11.h
-elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf32-target.h
-elf-m10200.lo: elf-m10200.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf32-target.h
-elf-m10300.lo: elf-m10300.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+elf32-m88k.lo: elf32-m88k.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 elf32-target.h
+elf-m10200.lo: elf-m10200.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 elf32-target.h
+elf-m10300.lo: elf-m10300.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/mn10300.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.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
-elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h 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 $(INCDIR)/hashtab.h
-elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h 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)/coff/ecoff.h $(INCDIR)/coff/mips.h \
- $(INCDIR)/coff/external.h ecoffswap.h elf32-target.h
-elf32-msp430.lo: elf32-msp430.c $(INCDIR)/filenames.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 \
- $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.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
+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)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
+ ecoffswap.h elf32-target.h elf-vxworks.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 \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-msp430.lo: elf32-msp430.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 $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-openrisc.lo: elf32-openrisc.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/openrisc.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/libiberty.h elf32-target.h
+elf32-or32.lo: elf32-or32.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/openrisc.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/or32.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-or32.lo: elf32-or32.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/libiberty.h elf32-target.h
elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-ppc.h elf32-target.h
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-ppc.h elf-vxworks.h \
+ elf32-target.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)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.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-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
- 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 elf32-sh64.h $(srcdir)/../opcodes/sh64-opc.h
+ $(INCDIR)/hashtab.h 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 elf32-sh64.h \
+ $(srcdir)/../opcodes/sh64-opc.h
elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+ $(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-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
+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
+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
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.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 \
- elf32-target.h
+ elfxx-sparc.h elf32-target.h elf-vxworks.h
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/libiberty.h elf32-target.h
-elf32-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
+elf32-vax.lo: elf32-vax.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/vax.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-xstormy16.lo: elf32-xstormy16.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/xstormy16.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/libiberty.h elf32-target.h
elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/xtensa.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/xtensa-isa.h \
$(INCDIR)/xtensa-config.h elf32-target.h
+elf32-xc16x.lo: elf32-xc16x.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/xc16x.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/libiberty.h elf32-target.h
elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h
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-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)/libiberty.h
-elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h
elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/dwarf2.h
+elf-vxworks.lo: elf-vxworks.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 \
+ elf-vxworks.h
epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \
- coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+ 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
epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c $(INCDIR)/filenames.h \
- coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-hp300bsd.lo: hp300bsd.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ 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
+hp300bsd.lo: hp300bsd.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
hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \
aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.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 \
aout-target.h
som.lo: som.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h
-i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h $(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
i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
$(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
- libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
-i386freebsd.lo: i386freebsd.c freebsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386linux.lo: i386linux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
+ libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-i386lynx.lo: i386lynx.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386msdos.lo: i386msdos.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h
+ aout-target.h
+i386freebsd.lo: i386freebsd.c freebsd.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
+i386linux.lo: i386linux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
+i386lynx.lo: i386lynx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+i386msdos.lo: i386msdos.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libaout.h $(INCDIR)/bfdlink.h
i386netbsd.lo: i386netbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- libaout.h $(INCDIR)/os9k.h
-ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/ieee.h \
- libieee.h $(INCDIR)/safe-ctype.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
+i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
+i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/os9k.h
+ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/ieee.h libieee.h $(INCDIR)/safe-ctype.h
m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-m68klinux.lo: m68klinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-m68klynx.lo: m68klynx.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(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
+m68klinux.lo: m68klinux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
m68knetbsd.lo: m68knetbsd.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
+m88kmach3.lo: m88kmach3.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
-m88kmach3.lo: m88kmach3.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+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 \
- $(INCDIR)/libiberty.h mach-o-target.c
-mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.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 \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-newsos3.lo: newsos3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-nlm.lo: nlm.c $(INCDIR)/filenames.h libnlm.h $(INCDIR)/nlm/common.h \
- $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
-nlm32-i386.lo: nlm32-i386.c $(INCDIR)/filenames.h $(INCDIR)/nlm/i386-ext.h \
+newsos3.lo: newsos3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
+nlm.lo: nlm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
+ $(INCDIR)/nlm/external.h
+nlm32-i386.lo: nlm32-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/nlm/i386-ext.h libnlm.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
+ nlm-target.h
nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/nlm/sparc32-ext.h libnlm.h $(INCDIR)/nlm/common.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/nlm/sparc32-ext.h libnlm.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
+ nlmswap.h nlm-target.h
+nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/nlm/ppc-ext.h libnlm.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
nlm-target.h
-nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/nlm/ppc-ext.h \
+nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
- $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
-nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
- $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
+ $(INCDIR)/nlm/external.h
ns32knetbsd.lo: ns32knetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(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
oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/oasys.h liboasys.h
+ $(INCDIR)/hashtab.h $(INCDIR)/oasys.h liboasys.h
pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-pdp11.lo: pdp11.c $(INCDIR)/filenames.h libaout.h $(INCDIR)/bfdlink.h \
- aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \
+ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+pdp11.lo: pdp11.c $(INCDIR)/filenames.h $(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)/libiberty.h
+ $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
- $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(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.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \
- $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(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)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pei-i386.lo: pei-i386.c $(INCDIR)/filenames.h coff-i386.c \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-mcore.lo: pe-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
- $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
- $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
- $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
- $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- coffcode.h peicode.h libpei.h
-pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
- $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
libpei.h
-pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/coff/mipspe.h \
- $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
-pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \
+pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
+ $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
+ libpei.h
+pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/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
-reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h $(INCDIR)/coff/internal.h libcoff.h
-riscix.lo: riscix.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-sparclinux.lo: sparclinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h
-sparclynx.lo: sparclynx.c $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
+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 \
+ $(INCDIR)/hashtab.h
+reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \
+ libcoff.h
+riscix.lo: riscix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
+sparclinux.lo: sparclinux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h
+sparclynx.lo: sparclynx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
sparcnetbsd.lo: sparcnetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(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
sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
- $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/aout/sun4.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \
- libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(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
vax1knetbsd.lo: vax1knetbsd.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
+vaxbsd.lo: vaxbsd.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
-vaxbsd.lo: vaxbsd.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
+versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h
vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- vms.h
+ $(INCDIR)/hashtab.h vms.h
vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- vms.h
+ $(INCDIR)/hashtab.h vms.h
vms-hdr.lo: vms-hdr.c bfdver.h $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h vms.h
-vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.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 \
+ $(INCDIR)/hashtab.h vms.h
vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- vms.h
+ $(INCDIR)/hashtab.h vms.h
xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h libcoff.h \
- libxcoff.h
-xsym.lo: xsym.c xsym.h $(INCDIR)/filenames.h
-xtensa-isa.lo: xtensa-isa.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/xtensa-isa-internal.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
+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
aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.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
coff-alpha.lo: coff-alpha.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \
- libcoff.h libecoff.h coffswap.h ecoffswap.h
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
+ $(INCDIR)/aout/ar.h libcoff.h libecoff.h coffswap.h \
+ ecoffswap.h
coff64-rs6000.lo: coff64-rs6000.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
- $(INCDIR)/coff/rs6k64.h libcoff.h libxcoff.h coffcode.h \
- coffswap.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/xcoff.h $(INCDIR)/coff/rs6k64.h libcoff.h \
+ libxcoff.h coffcode.h coffswap.h
demo64.lo: demo64.c aoutf1.h $(INCDIR)/filenames.h \
- $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ $(INCDIR)/hashtab.h $(INCDIR)/aout/sun4.h libaout.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \
- coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+ coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.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 \
$(INCDIR)/elf/reloc-macros.h elf64-target.h
elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \
- libecoff.h ecoffswap.h elf64-target.h
-elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \
- $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h libhppa.h \
- elf64-hppa.h elf-hppa.h elf64-target.h
-elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \
+ libcoff.h libecoff.h ecoffswap.h elf64-target.h
+elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \
+ $(INCDIR)/filenames.h $(INCDIR)/hashtab.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf64-target.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
+ libhppa.h elf64-hppa.h elf-hppa.h elf64-target.h
+elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf64-target.h
elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h 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)/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)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
ecoffswap.h elf32-target.h
-elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
- $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
+elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h genlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ 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)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \
elf64-target.h
-elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/opcode/mmix.h elf64-target.h
-elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/reloc-macros.h \
- elf64-ppc.h elf64-target.h
-elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \
elf64-target.h
+elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc64.h \
+ $(INCDIR)/elf/reloc-macros.h elf64-ppc.h elf64-target.h
+elf64-s390.lo: elf64-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 elf64-target.h
elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf64-target.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 elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
- elf64-target.h
+ $(INCDIR)/opcode/sparc.h elfxx-sparc.h elf64-target.h
elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
- $(INCDIR)/safe-ctype.h
-mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h
+mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/mmix.h
nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
- $(INCDIR)/nlm/alpha-ext.h libnlm.h $(INCDIR)/nlm/common.h \
- $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
- nlm-target.h
-nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
- $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
+ $(INCDIR)/hashtab.h $(INCDIR)/nlm/alpha-ext.h libnlm.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
+ nlmswap.h nlm-target.h
+nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
+ $(INCDIR)/nlm/external.h
aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h
-hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h
-irix-core.lo: irix-core.c $(INCDIR)/filenames.h
-lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h
-osf-core.lo: osf-core.c $(INCDIR)/filenames.h
-sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h
-trad-core.lo: trad-core.c $(INCDIR)/filenames.h libaout.h \
- $(INCDIR)/bfdlink.h
-cisco-core.lo: cisco-core.c $(INCDIR)/filenames.h
-elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
+hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+irix-core.lo: irix-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+osf-core.lo: osf-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libaout.h $(INCDIR)/bfdlink.h
+trad-core.lo: trad-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ libaout.h $(INCDIR)/bfdlink.h
+cisco-core.lo: cisco-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+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
-elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h $(INCDIR)/hashtab.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
-peigen.lo: peigen.c $(INCDIR)/filenames.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)/coff/internal.h \
- $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h libpei.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
# 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.
.NOEXPORT:
diff --git a/contrib/binutils/bfd/acinclude.m4 b/contrib/binutils/bfd/acinclude.m4
index 63b4bf92b177..95e3d4a702d3 100644
--- a/contrib/binutils/bfd/acinclude.m4
+++ b/contrib/binutils/bfd/acinclude.m4
@@ -1,8 +1,10 @@
-sinclude(../config/accross.m4)
+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_SYSTEM])
+[AC_REQUIRE([AC_CANONICAL_TARGET])
case "${host}" in
changequote(,)dnl
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
@@ -43,73 +45,6 @@ else
fi
AC_SUBST(EXEEXT_FOR_BUILD)])dnl
-dnl See whether we need a declaration for a function.
-AC_DEFUN([BFD_NEED_DECLARATION],
-[AC_MSG_CHECKING([whether $1 must be declared])
-AC_CACHE_VAL(bfd_cv_decl_needed_$1,
-[AC_TRY_COMPILE([
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif],
-[char *(*pfn) = (char *(*)) $1],
-bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
-AC_MSG_RESULT($bfd_cv_decl_needed_$1)
-if test $bfd_cv_decl_needed_$1 = yes; then
- AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
- [Define if $1 is not declared in system header files.])
-fi
-])dnl
-
-dnl Check for existence of a type $1 in sys/procfs.h
-
-AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE],
-[AC_MSG_CHECKING([for $1 in sys/procfs.h])
- AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
- [AC_TRY_COMPILE([
-#define _SYSCALL32
-#include <sys/procfs.h>],
- [$1 avar],
- bfd_cv_have_sys_procfs_type_$1=yes,
- bfd_cv_have_sys_procfs_type_$1=no
- )])
- if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
- AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
- [Define if <sys/procfs.h> has $1.])
- fi
- AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
-])
-
-
-dnl Check for existence of member $2 in type $1 in sys/procfs.h
-
-AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE_MEMBER],
-[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
- AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
- [AC_TRY_COMPILE([
-#define _SYSCALL32
-#include <sys/procfs.h>],
- [$1 avar; void* aref = (void*) &avar.$2],
- bfd_cv_have_sys_procfs_type_member_$1_$2=yes,
- bfd_cv_have_sys_procfs_type_member_$1_$2=no
- )])
- if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
- AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
- [Define if <sys/procfs.h> has $1.$2.])
- fi
- AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
-])
-
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
@@ -138,12 +73,15 @@ AC_DEFUN([AM_INSTALL_LIBBFD],
fi)
AC_MSG_RESULT($install_libbfd_p)
AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes)
+ # Need _noncanonical variables for this.
+ ACX_NONCANONICAL_HOST
+ ACX_NONCANONICAL_TARGET
# libbfd.a is a host library containing target dependent code
bfdlibdir='$(libdir)'
bfdincludedir='$(includedir)'
if test "${host}" != "${target}"; then
- bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
- bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
+ bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
+ bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
fi
AC_SUBST(bfdlibdir)
AC_SUBST(bfdincludedir)
diff --git a/contrib/binutils/bfd/aclocal.m4 b/contrib/binutils/bfd/aclocal.m4
index 9d27670a0f18..d5f315805a9c 100644
--- a/contrib/binutils/bfd/aclocal.m4
+++ b/contrib/binutils/bfd/aclocal.m4
@@ -1,292 +1,750 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-sinclude(../config/accross.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_SYSTEM])
-case "${host}" in
-changequote(,)dnl
-*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
-changequote([,])dnl
- AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
-esac])dnl
-
-dnl Get a default for CC_FOR_BUILD to put into Makefile.
-AC_DEFUN(BFD_CC_FOR_BUILD,
-[# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test -z "$CC_FOR_BUILD"; then
- if test "x$cross_compiling" = "xno"; then
- CC_FOR_BUILD='$(CC)'
- else
- CC_FOR_BUILD=gcc
- fi
-fi
-AC_SUBST(CC_FOR_BUILD)
-# Also set EXEEXT_FOR_BUILD.
-if test "x$cross_compiling" = "xno"; then
- EXEEXT_FOR_BUILD='$(EXEEXT)'
-else
- AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
- [rm -f conftest*
- echo 'int main () { return 0; }' > conftest.c
- bfd_cv_build_exeext=
- ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- rm -f conftest*
- test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
- EXEEXT_FOR_BUILD=""
- test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
-fi
-AC_SUBST(EXEEXT_FOR_BUILD)])dnl
-
-dnl See whether we need a declaration for a function.
-AC_DEFUN(BFD_NEED_DECLARATION,
-[AC_MSG_CHECKING([whether $1 must be declared])
-AC_CACHE_VAL(bfd_cv_decl_needed_$1,
-[AC_TRY_COMPILE([
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif],
-[char *(*pfn) = (char *(*)) $1],
-bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
-AC_MSG_RESULT($bfd_cv_decl_needed_$1)
-if test $bfd_cv_decl_needed_$1 = yes; then
- AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
- [Define if $1 is not declared in system header files.])
-fi
-])dnl
-
-dnl Check for existence of a type $1 in sys/procfs.h
-
-AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE,
-[AC_MSG_CHECKING([for $1 in sys/procfs.h])
- AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
- [AC_TRY_COMPILE([
-#define _SYSCALL32
-#include <sys/procfs.h>],
- [$1 avar],
- bfd_cv_have_sys_procfs_type_$1=yes,
- bfd_cv_have_sys_procfs_type_$1=no
- )])
- if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
- AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
- [Define if <sys/procfs.h> has $1.])
- fi
- AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
-])
+# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 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.
-dnl Check for existence of member $2 in type $1 in sys/procfs.h
-
-AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
-[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
- AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
- [AC_TRY_COMPILE([
-#define _SYSCALL32
-#include <sys/procfs.h>],
- [$1 avar; void* aref = (void*) &avar.$2],
- bfd_cv_have_sys_procfs_type_member_$1_$2=yes,
- bfd_cv_have_sys_procfs_type_member_$1_$2=no
- )])
- if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
- AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
- [Define if <sys/procfs.h> has $1.$2.])
- fi
- AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
-])
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-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)
-])
+# Copyright (C) 2002, 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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# 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_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 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.
-sinclude(../gettext.m4)
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
])
-AC_DEFUN([AM_INSTALL_LIBBFD],
-[AC_MSG_CHECKING([whether to install libbfd])
- AC_ARG_ENABLE(install-libbfd,
-[ --enable-install-libbfd controls installation of libbfd and related headers],
- install_libbfd_p=$enableval,
- if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
- install_libbfd_p=yes
- else
- install_libbfd_p=no
- fi)
- AC_MSG_RESULT($install_libbfd_p)
- AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes)
- # libbfd.a is a host library containing target dependent code
- bfdlibdir='$(libdir)'
- bfdincludedir='$(includedir)'
- if test "${host}" != "${target}"; then
- bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib'
- bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
- fi
- AC_SUBST(bfdlibdir)
- AC_SUBST(bfdincludedir)
-]
-)
+# AM_CONDITIONAL -*- Autoconf -*-
-# Define a conditional.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 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 7
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
-fi])
-
-# isc-posix.m4 serial 2 (gettext-0.11.2)
-dnl Copyright (C) 1995-2002 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.
-
-# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
-
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-
-undefine([AC_ISC_POSIX])
-
-AC_DEFUN([AC_ISC_POSIX],
- [
- dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- ]
-)
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-# serial 1
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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 8
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 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 8
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 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 12
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 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.
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
-# 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
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# 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.4-p6])])
+# Copyright (C) 2001, 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+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
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 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 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
-# Check to make sure that the build environment is sane.
+# 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
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 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 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 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 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 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 4
+
+# AM_SANITY_CHECK
+# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
@@ -296,7 +754,7 @@ if (
alias in your environment])
fi
- test "[$]2" = conftestfile
+ test "$[2]" = conftest.file
)
then
# Ok.
@@ -305,65 +763,130 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-rm -f conftest*
AC_MSG_RESULT(yes)])
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
+# Copyright (C) 2001, 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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
fi
-AC_SUBST($1)])
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 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.
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
;;
esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+m4_include([acinclude.m4])
diff --git a/contrib/binutils/bfd/aout-arm.c b/contrib/binutils/bfd/aout-arm.c
index 38ecfab9d418..d8834a4f331d 100644
--- a/contrib/binutils/bfd/aout-arm.c
+++ b/contrib/binutils/bfd/aout-arm.c
@@ -1,23 +1,23 @@
/* BFD back-end for raw ARM a.out binaries.
- Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-This file is part of BFD, the Binary File Descriptor library.
+ This 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -54,66 +54,49 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libaout.h"
#include "aout/aout64.h"
-static bfd_boolean MY(write_object_contents)
- PARAMS ((bfd *));
-static bfd_reloc_status_type MY(fix_pcrel_26_done)
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type MY(fix_pcrel_26)
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static void MY(swap_std_reloc_in)
- PARAMS ((bfd *, struct reloc_std_external *, arelent *, asymbol **,
- bfd_size_type));
-reloc_howto_type *MY(bfd_reloc_type_lookup)
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-reloc_howto_type * MY(reloc_howto)
- PARAMS ((bfd *, struct reloc_std_external *, int *, int *, int *));
-void MY(put_reloc)
- PARAMS ((bfd *, int, int, bfd_vma, reloc_howto_type *,
- struct reloc_std_external *));
-void MY(relocatable_reloc)
- PARAMS ((reloc_howto_type *, bfd *, struct reloc_std_external *, bfd_vma *,
- bfd_vma));
-void MY(swap_std_reloc_out)
- PARAMS ((bfd *, arelent *, struct reloc_std_external *));
-reloc_howto_type MY(howto_table)[] =
- {
- /* Type rs size bsz pcrel bitpos ovrf sf name part_inpl
- readmask setmask pcdone. */
- HOWTO (0, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "8", TRUE,
- 0x000000ff, 0x000000ff, FALSE),
- HOWTO (1, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "16", TRUE,
- 0x0000ffff, 0x0000ffff, FALSE),
- HOWTO (2, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "32", TRUE,
- 0xffffffff, 0xffffffff, FALSE),
- HOWTO (3, 2, 2, 26, TRUE, 0, complain_overflow_signed, MY(fix_pcrel_26),
- "ARM26", TRUE, 0x00ffffff, 0x00ffffff, TRUE),
- HOWTO (4, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, "DISP8", TRUE,
- 0x000000ff, 0x000000ff, TRUE),
- HOWTO (5, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "DISP16", TRUE,
- 0x0000ffff, 0x0000ffff, TRUE),
- HOWTO (6, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", TRUE,
- 0xffffffff, 0xffffffff, TRUE),
- HOWTO (7, 2, 2, 26, FALSE, 0, complain_overflow_signed,
- MY(fix_pcrel_26_done), "ARM26D", TRUE, 0x0, 0x0,
- FALSE),
- EMPTY_HOWTO (-1),
- HOWTO (9, 0, -1, 16, FALSE, 0, complain_overflow_bitfield, 0, "NEG16", TRUE,
- 0x0000ffff, 0x0000ffff, FALSE),
- HOWTO (10, 0, -2, 32, FALSE, 0, complain_overflow_bitfield, 0, "NEG32", TRUE,
- 0xffffffff, 0xffffffff, FALSE)
- };
+static bfd_reloc_status_type
+ MY (fix_pcrel_26) (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type
+ MY (fix_pcrel_26_done) (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+
+reloc_howto_type MY (howto_table)[] =
+{
+ /* Type rs size bsz pcrel bitpos ovrf sf name part_inpl
+ readmask setmask pcdone. */
+ HOWTO (0, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "8", TRUE,
+ 0x000000ff, 0x000000ff, FALSE),
+ HOWTO (1, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "16", TRUE,
+ 0x0000ffff, 0x0000ffff, FALSE),
+ HOWTO (2, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "32", TRUE,
+ 0xffffffff, 0xffffffff, FALSE),
+ HOWTO (3, 2, 2, 26, TRUE, 0, complain_overflow_signed, MY (fix_pcrel_26),
+ "ARM26", TRUE, 0x00ffffff, 0x00ffffff, TRUE),
+ HOWTO (4, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, "DISP8", TRUE,
+ 0x000000ff, 0x000000ff, TRUE),
+ HOWTO (5, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "DISP16", TRUE,
+ 0x0000ffff, 0x0000ffff, TRUE),
+ HOWTO (6, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", TRUE,
+ 0xffffffff, 0xffffffff, TRUE),
+ HOWTO (7, 2, 2, 26, FALSE, 0, complain_overflow_signed,
+ MY (fix_pcrel_26_done), "ARM26D", TRUE, 0x0, 0x0,
+ FALSE),
+ EMPTY_HOWTO (-1),
+ HOWTO (9, 0, -1, 16, FALSE, 0, complain_overflow_bitfield, 0, "NEG16", TRUE,
+ 0x0000ffff, 0x0000ffff, FALSE),
+ HOWTO (10, 0, -2, 32, FALSE, 0, complain_overflow_bitfield, 0, "NEG32", TRUE,
+ 0xffffffff, 0xffffffff, FALSE)
+};
#define RELOC_ARM_BITS_NEG_BIG ((unsigned int) 0x08)
#define RELOC_ARM_BITS_NEG_LITTLE ((unsigned int) 0x10)
-reloc_howto_type *
-MY(reloc_howto) (abfd, rel, r_index, r_extern, r_pcrel)
- bfd *abfd;
- struct reloc_std_external *rel;
- int *r_index;
- int *r_extern;
- int *r_pcrel;
+static reloc_howto_type *
+MY (reloc_howto) (bfd *abfd,
+ struct reloc_std_external *rel,
+ int *r_index,
+ int *r_extern,
+ int *r_pcrel)
{
unsigned int r_length;
unsigned int r_pcrel_done;
@@ -147,20 +130,19 @@ MY(reloc_howto) (abfd, rel, r_index, r_extern, r_pcrel)
if (index == 3)
*r_pcrel = 1;
- return MY(howto_table) + index;
+ return MY (howto_table) + index;
}
#define MY_reloc_howto(BFD, REL, IN, EX, PC) \
- MY(reloc_howto) (BFD, REL, &IN, &EX, &PC)
+ MY (reloc_howto) (BFD, REL, &IN, &EX, &PC)
-void
-MY(put_reloc) (abfd, r_extern, r_index, value, howto, reloc)
- bfd *abfd;
- int r_extern;
- int r_index;
- bfd_vma value;
- reloc_howto_type *howto;
- struct reloc_std_external *reloc;
+static void
+MY (put_reloc) (bfd *abfd,
+ int r_extern,
+ int r_index,
+ bfd_vma value,
+ reloc_howto_type *howto,
+ struct reloc_std_external *reloc)
{
unsigned int r_length;
int r_pcrel;
@@ -202,25 +184,22 @@ MY(put_reloc) (abfd, r_extern, r_index, value, howto, reloc)
}
#define MY_put_reloc(BFD, EXT, IDX, VAL, HOWTO, RELOC) \
- MY(put_reloc) (BFD, EXT, IDX, VAL, HOWTO, RELOC)
+ MY (put_reloc) (BFD, EXT, IDX, VAL, HOWTO, RELOC)
-void
-MY(relocatable_reloc) (howto, abfd, reloc, amount, r_addr)
- reloc_howto_type *howto;
- bfd *abfd;
- struct reloc_std_external *reloc;
- bfd_vma *amount;
- bfd_vma r_addr;
+static void
+MY (relocatable_reloc) (reloc_howto_type *howto,
+ bfd *abfd,
+ struct reloc_std_external *reloc,
+ bfd_vma *amount,
+ bfd_vma r_addr)
{
if (howto->type == 3)
{
if (reloc->r_type[0]
& (bfd_header_big_endian (abfd)
? RELOC_STD_BITS_EXTERN_BIG : RELOC_STD_BITS_EXTERN_LITTLE))
- {
- /* The reloc is still external, so don't modify anything. */
- *amount = 0;
- }
+ /* The reloc is still external, so don't modify anything. */
+ *amount = 0;
else
{
*amount -= r_addr;
@@ -237,33 +216,29 @@ MY(relocatable_reloc) (howto, abfd, reloc, amount, r_addr)
}
#define MY_relocatable_reloc(HOW, BFD, REL, AMOUNT, ADDR) \
- MY(relocatable_reloc) (HOW, BFD, REL, &(AMOUNT), ADDR)
+ MY (relocatable_reloc) (HOW, BFD, REL, &(AMOUNT), ADDR)
static bfd_reloc_status_type
-MY(fix_pcrel_26_done) (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
+MY (fix_pcrel_26_done) (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
{
/* This is dead simple at present. */
return bfd_reloc_ok;
}
static bfd_reloc_status_type
-MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+MY (fix_pcrel_26) (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
bfd_vma relocation;
bfd_size_type addr = reloc_entry->address;
@@ -278,7 +253,7 @@ MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section,
/* If the sections are different, and we are doing a partial relocation,
just ignore it for now. */
if (symbol->section->name != input_section->name
- && output_bfd != (bfd *)NULL)
+ && output_bfd != NULL)
return bfd_reloc_ok;
relocation = (target & 0x00ffffff) << 2;
@@ -308,17 +283,17 @@ MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section,
/* Now the ARM magic... Change the reloc type so that it is marked as done.
Strictly this is only necessary if we are doing a partial relocation. */
- reloc_entry->howto = &MY(howto_table)[7];
+ reloc_entry->howto = &MY (howto_table)[7];
return flag;
}
-reloc_howto_type *
-MY(bfd_reloc_type_lookup) (abfd,code)
- bfd *abfd;
- bfd_reloc_code_real_type code;
+static reloc_howto_type *
+MY (bfd_reloc_type_lookup) (bfd *abfd,
+ bfd_reloc_code_real_type code)
{
-#define ASTD(i,j) case i: return &MY(howto_table)[j]
+#define ASTD(i,j) case i: return & MY (howto_table)[j]
+
if (code == BFD_RELOC_CTOR)
switch (bfd_get_arch_info (abfd)->bits_per_address)
{
@@ -326,7 +301,7 @@ MY(bfd_reloc_type_lookup) (abfd,code)
code = BFD_RELOC_32;
break;
default:
- return (const struct reloc_howto_struct *) 0;
+ return NULL;
}
switch (code)
@@ -338,26 +313,25 @@ MY(bfd_reloc_type_lookup) (abfd,code)
ASTD (BFD_RELOC_16_PCREL, 5);
ASTD (BFD_RELOC_32_PCREL, 6);
default:
- return (const struct reloc_howto_struct *) 0;
+ 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
-/* #define MY_bfd_link_hash_table_create _bfd_generic_link_hash_table_create */
-/* #define MY_bfd_link_add_symbols _bfd_generic_link_add_symbols */
-/* #define MY_bfd_final_link _bfd_generic_final_link */
+#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
+
+void MY_swap_std_reloc_in (bfd *, struct reloc_std_external *, arelent *, asymbol **, bfd_size_type);
+void MY_swap_std_reloc_out (bfd *, arelent *, struct reloc_std_external *);
#include "aoutx.h"
-static void
-MY_swap_std_reloc_in (abfd, bytes, cache_ptr, symbols, symcount)
- bfd *abfd;
- struct reloc_std_external *bytes;
- arelent *cache_ptr;
- asymbol **symbols;
- bfd_size_type symcount ATTRIBUTE_UNUSED;
+void
+MY_swap_std_reloc_in (bfd *abfd,
+ struct reloc_std_external *bytes,
+ arelent *cache_ptr,
+ asymbol **symbols,
+ bfd_size_type symcount ATTRIBUTE_UNUSED)
{
int r_index;
int r_extern;
@@ -372,10 +346,9 @@ MY_swap_std_reloc_in (abfd, bytes, cache_ptr, symbols, symcount)
}
void
-MY_swap_std_reloc_out (abfd, g, natptr)
- bfd *abfd;
- arelent *g;
- struct reloc_std_external *natptr;
+MY_swap_std_reloc_out (bfd *abfd,
+ arelent *g,
+ struct reloc_std_external *natptr)
{
int r_index;
asymbol *sym = *(g->sym_ptr_ptr);
@@ -385,21 +358,19 @@ MY_swap_std_reloc_out (abfd, g, natptr)
int r_neg = 0; /* Negative relocs use the BASEREL bit. */
asection *output_section = sym->section->output_section;
- PUT_WORD(abfd, g->address, natptr->r_address);
+ PUT_WORD (abfd, g->address, natptr->r_address);
- r_length = g->howto->size ; /* Size as a power of two */
+ r_length = g->howto->size ; /* Size as a power of two. */
if (r_length < 0)
{
r_length = -r_length;
r_neg = 1;
}
- r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */
+ r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */
/* For RISC iX, in pc-relative relocs the r_pcrel bit means that the
- relocation has been done already (Only for the 26-bit one I think)???!!!
- */
-
+ relocation has been done already (Only for the 26-bit one I think). */
if (g->howto->type == 3)
{
r_length = 3;
@@ -411,20 +382,14 @@ MY_swap_std_reloc_out (abfd, g, natptr)
r_pcrel = 1;
}
-#if 0
- /* For a standard reloc, the addend is in the object file. */
- r_addend = g->addend + (*(g->sym_ptr_ptr))->section->output_section->vma;
-#endif
-
- /* name was clobbered by aout_write_syms to be symbol index */
+ /* Name was clobbered by aout_write_syms to be symbol index. */
/* If this relocation is relative to a symbol then set the
r_index to the symbols index, and the r_extern bit.
Absolute symbols can come in in two ways, either as an offset
from the abs section, or as a symbol which has an abs value.
- check for that here
- */
+ check for that here. */
if (bfd_is_com_section (output_section)
|| output_section == &bfd_abs_section
@@ -483,83 +448,83 @@ MY_swap_std_reloc_out (abfd, g, natptr)
extern const bfd_target aout_arm_big_vec;
const bfd_target aout_arm_little_vec =
- {
- "a.out-arm-little", /* name */
- bfd_target_aout_flavour,
- BFD_ENDIAN_LITTLE, /* target byte order (little) */
- BFD_ENDIAN_LITTLE, /* target headers byte order (little) */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
- MY_symbol_leading_char,
- AR_PAD_CHAR, /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format */
- bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (MY),
- BFD_JUMP_TABLE_COPY (MY),
- BFD_JUMP_TABLE_CORE (MY),
- BFD_JUMP_TABLE_ARCHIVE (MY),
- BFD_JUMP_TABLE_SYMBOLS (MY),
- BFD_JUMP_TABLE_RELOCS (MY),
- BFD_JUMP_TABLE_WRITE (MY),
- BFD_JUMP_TABLE_LINK (MY),
- BFD_JUMP_TABLE_DYNAMIC (MY),
-
- & aout_arm_big_vec,
-
- (PTR) MY_backend_data,
- };
+{
+ "a.out-arm-little", /* Name. */
+ bfd_target_aout_flavour,
+ BFD_ENDIAN_LITTLE, /* Target byte order (little). */
+ BFD_ENDIAN_LITTLE, /* Target headers byte order (little). */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
+ MY_symbol_leading_char,
+ AR_PAD_CHAR, /* AR_pad_char. */
+ 15, /* AR_max_namelen. */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
+ {_bfd_dummy_target, MY_object_p, /* bfd_check_format. */
+ bfd_generic_archive_p, MY_core_file_p},
+ {bfd_false, MY_mkobject, /* bfd_set_format. */
+ _bfd_generic_mkarchive, bfd_false},
+ {bfd_false, MY_write_object_contents, /* bfd_write_contents. */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (MY),
+ BFD_JUMP_TABLE_COPY (MY),
+ BFD_JUMP_TABLE_CORE (MY),
+ BFD_JUMP_TABLE_ARCHIVE (MY),
+ BFD_JUMP_TABLE_SYMBOLS (MY),
+ BFD_JUMP_TABLE_RELOCS (MY),
+ BFD_JUMP_TABLE_WRITE (MY),
+ BFD_JUMP_TABLE_LINK (MY),
+ BFD_JUMP_TABLE_DYNAMIC (MY),
+
+ & aout_arm_big_vec,
+
+ (void *) MY_backend_data,
+};
const bfd_target aout_arm_big_vec =
- {
- "a.out-arm-big", /* name */
- bfd_target_aout_flavour,
- BFD_ENDIAN_BIG, /* target byte order (big) */
- BFD_ENDIAN_BIG, /* target headers byte order (big) */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
- MY_symbol_leading_char,
- AR_PAD_CHAR, /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format */
- bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (MY),
- BFD_JUMP_TABLE_COPY (MY),
- BFD_JUMP_TABLE_CORE (MY),
- BFD_JUMP_TABLE_ARCHIVE (MY),
- BFD_JUMP_TABLE_SYMBOLS (MY),
- BFD_JUMP_TABLE_RELOCS (MY),
- BFD_JUMP_TABLE_WRITE (MY),
- BFD_JUMP_TABLE_LINK (MY),
- BFD_JUMP_TABLE_DYNAMIC (MY),
-
- & aout_arm_little_vec,
-
- (PTR) MY_backend_data,
- };
+{
+ "a.out-arm-big", /* Name. */
+ bfd_target_aout_flavour,
+ BFD_ENDIAN_BIG, /* Target byte order (big). */
+ BFD_ENDIAN_BIG, /* Target headers byte order (big). */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
+ MY_symbol_leading_char,
+ AR_PAD_CHAR, /* AR_pad_char. */
+ 15, /* AR_max_namelen. */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
+ {_bfd_dummy_target, MY_object_p, /* bfd_check_format. */
+ bfd_generic_archive_p, MY_core_file_p},
+ {bfd_false, MY_mkobject, /* bfd_set_format. */
+ _bfd_generic_mkarchive, bfd_false},
+ {bfd_false, MY_write_object_contents, /* bfd_write_contents. */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (MY),
+ BFD_JUMP_TABLE_COPY (MY),
+ BFD_JUMP_TABLE_CORE (MY),
+ BFD_JUMP_TABLE_ARCHIVE (MY),
+ BFD_JUMP_TABLE_SYMBOLS (MY),
+ BFD_JUMP_TABLE_RELOCS (MY),
+ BFD_JUMP_TABLE_WRITE (MY),
+ BFD_JUMP_TABLE_LINK (MY),
+ BFD_JUMP_TABLE_DYNAMIC (MY),
+
+ & aout_arm_little_vec,
+
+ (void *) MY_backend_data,
+};
diff --git a/contrib/binutils/bfd/aout-encap.c b/contrib/binutils/bfd/aout-encap.c
deleted file mode 100644
index 96c708293332..000000000000
--- a/contrib/binutils/bfd/aout-encap.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/* BFD back-end for a.out files encapsulated with COFF headers.
- Copyright 1990, 1991, 1994, 1995, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* THIS MODULE IS NOT FINISHED. IT PROBABLY DOESN'T EVEN COMPILE. */
-
-#if 0
-#define TARGET_PAGE_SIZE 4096
-#define SEGMENT_SIZE TARGET_PAGE_SIZE
-#define TEXT_START_ADDR 0
-#endif
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-#include "aout/aout64.h"
-#include "aout/stab_gnu.h"
-#include "aout/ar.h"
-#include "libaout.h" /* BFD a.out internal data structures */
-
-const bfd_target *encap_real_callback ();
-
-const bfd_target *
-encap_object_p (abfd)
- bfd *abfd;
-{
- unsigned char magicbuf[4]; /* Raw bytes of magic number from file */
- unsigned long magic; /* Swapped magic number */
- short coff_magic;
- struct external_exec exec_bytes;
- struct internal_exec exec;
- bfd_size_type amt = sizeof (magicbuf);
-
- if (bfd_bread ((PTR) magicbuf, amt, abfd) != amt)
- {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
-
- coff_magic = H_GET_16 (abfd, magicbuf);
- if (coff_magic != COFF_MAGIC)
- return 0; /* Not an encap coff file */
-
- magic = H_GET_32 (abfd, magicbuf);
-
- if (N_BADMAG (*((struct internal_exec *) &magic)))
- return 0;
-
- if (bfd_seek (abfd, (file_ptr) sizeof (struct coffheader), SEEK_SET) != 0)
- return 0;
-
- amt = EXEC_BYTES_SIZE;
- if (bfd_bread ((PTR) &exec_bytes, amt, abfd) != amt)
- {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
- NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec);
-
- return aout_32_some_aout_object_p (abfd, &exec, encap_realcallback);
-}
-
-/* Finish up the reading of an encapsulated-coff a.out file header. */
-const bfd_target *
-encap_real_callback (abfd)
- bfd *abfd;
-{
- struct internal_exec *execp = exec_hdr (abfd);
-
- MY(callback) (abfd, execp);
-
- /* If we have a coff header, it can give us better values for
- text_start and exec_data_start. This is particularly useful
- for remote debugging of embedded systems. */
- if (N_FLAGS(exec_aouthdr) & N_FLAGS_COFF_ENCAPSULATE)
- {
- struct coffheader ch;
- int val;
- val = lseek (execchan, -(sizeof (AOUTHDR) + sizeof (ch)), 1);
- if (val == -1)
- perror_with_name (filename);
- val = myread (execchan, &ch, sizeof (ch));
- if (val < 0)
- perror_with_name (filename);
- text_start = ch.text_start;
- exec_data_start = ch.data_start;
- }
- else
- {
- text_start =
- IS_OBJECT_FILE (exec_aouthdr) ? 0 : N_TXTADDR (exec_aouthdr);
- exec_data_start = (IS_OBJECT_FILE (exec_aouthdr)
- ? exec_aouthdr.a_text
- : N_DATADDR (exec_aouthdr));
- }
-
- /* Determine the architecture and machine type of the object file. */
- bfd_default_set_arch_mach(abfd, bfd_arch_m68k, 0); /* FIXME */
-
- return abfd->xvec;
-}
-
-/* Write an object file in Encapsulated COFF format.
- Section contents have already been written. We write the
- file header, symbols, and relocation. */
-
-bfd_boolean
-encap_write_object_contents (abfd)
- bfd *abfd;
-{
- bfd_size_type data_pad = 0;
- struct external_exec exec_bytes;
- struct internal_exec *execp = exec_hdr (abfd);
-
- /* FIXME: Fragments from the old GNU LD program for dealing with
- encap coff. */
- struct coffheader coffheader;
- int need_coff_header;
-
- /* Determine whether to count the header as part of
- the text size, and initialize the text size accordingly.
- This depends on the kind of system and on the output format selected. */
-
- N_SET_MAGIC (outheader, magic);
-#ifdef INITIALIZE_HEADER
- INITIALIZE_HEADER;
-#endif
-
- text_size = sizeof (struct exec);
-#ifdef COFF_ENCAPSULATE
- if (relocatable_output == 0 && file_table[0].just_syms_flag == 0)
- {
- need_coff_header = 1;
- /* set this flag now, since it will change the values of N_TXTOFF, etc */
- N_SET_FLAGS (outheader, aout_backend_info (abfd)->exec_hdr_flags);
- text_size += sizeof (struct coffheader);
- }
-#endif
-
-#ifdef COFF_ENCAPSULATE
- if (need_coff_header)
- {
- /* We are encapsulating BSD format within COFF format. */
- struct coffscn *tp, *dp, *bp;
-
- tp = &coffheader.scns[0];
- dp = &coffheader.scns[1];
- bp = &coffheader.scns[2];
-
- strcpy (tp->s_name, ".text");
- tp->s_paddr = text_start;
- tp->s_vaddr = text_start;
- tp->s_size = text_size;
- tp->s_scnptr = sizeof (struct coffheader) + sizeof (struct exec);
- tp->s_relptr = 0;
- tp->s_lnnoptr = 0;
- tp->s_nreloc = 0;
- tp->s_nlnno = 0;
- tp->s_flags = 0x20;
- strcpy (dp->s_name, ".data");
- dp->s_paddr = data_start;
- dp->s_vaddr = data_start;
- dp->s_size = data_size;
- dp->s_scnptr = tp->s_scnptr + tp->s_size;
- dp->s_relptr = 0;
- dp->s_lnnoptr = 0;
- dp->s_nreloc = 0;
- dp->s_nlnno = 0;
- dp->s_flags = 0x40;
- strcpy (bp->s_name, ".bss");
- bp->s_paddr = dp->s_vaddr + dp->s_size;
- bp->s_vaddr = bp->s_paddr;
- bp->s_size = bss_size;
- bp->s_scnptr = 0;
- bp->s_relptr = 0;
- bp->s_lnnoptr = 0;
- bp->s_nreloc = 0;
- bp->s_nlnno = 0;
- bp->s_flags = 0x80;
-
- coffheader.f_magic = COFF_MAGIC;
- coffheader.f_nscns = 3;
- /* store an unlikely time so programs can
- * tell that there is a bsd header
- */
- coffheader.f_timdat = 1;
- coffheader.f_symptr = 0;
- coffheader.f_nsyms = 0;
- coffheader.f_opthdr = 28;
- coffheader.f_flags = 0x103;
- /* aouthdr */
- coffheader.magic = ZMAGIC;
- coffheader.vstamp = 0;
- coffheader.tsize = tp->s_size;
- coffheader.dsize = dp->s_size;
- coffheader.bsize = bp->s_size;
- coffheader.entry = outheader.a_entry;
- coffheader.text_start = tp->s_vaddr;
- coffheader.data_start = dp->s_vaddr;
- }
-#endif
-
-#ifdef COFF_ENCAPSULATE
- if (need_coff_header)
- mywrite (&coffheader, sizeof coffheader, 1, outdesc);
-#endif
-
-#ifndef COFF_ENCAPSULATE
- padfile (N_TXTOFF (outheader) - sizeof outheader, outdesc);
-#endif
-
- text_size -= N_TXTOFF (outheader);
- WRITE_HEADERS(abfd, execp);
- return TRUE;
-}
-
-#define MY_write_object_content encap_write_object_contents
-#define MY_object_p encap_object_p
-#define MY_exec_hdr_flags N_FLAGS_COFF_ENCAPSULATE
-
-#include "aout-target.h"
diff --git a/contrib/binutils/bfd/aout-sparcle.c b/contrib/binutils/bfd/aout-sparcle.c
index 7772c290deaa..233473164097 100644
--- a/contrib/binutils/bfd/aout-sparcle.c
+++ b/contrib/binutils/bfd/aout-sparcle.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGETNAME "a.out-sparc-little"
diff --git a/contrib/binutils/bfd/aout-target.h b/contrib/binutils/bfd/aout-target.h
index d8cad54708de..5a30eda74142 100644
--- a/contrib/binutils/bfd/aout-target.h
+++ b/contrib/binutils/bfd/aout-target.h
@@ -1,23 +1,23 @@
/* 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
+ 2000, 2001, 2002, 2003, 2004, 2005
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
@@ -28,30 +28,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SEGMENT_SIZE TARGET_PAGE_SIZE
#endif
-extern reloc_howto_type * NAME(aout,reloc_type_lookup)
- PARAMS ((bfd *, bfd_reloc_code_real_type));
+extern reloc_howto_type * NAME (aout, reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
/* Set parameters about this a.out file that are machine-dependent.
This routine is called from some_aout_object_p just before it returns. */
#ifndef MY_callback
-static const bfd_target *MY(callback) PARAMS ((bfd *));
-
static const bfd_target *
-MY(callback) (abfd)
- bfd *abfd;
+MY (callback) (bfd *abfd)
{
struct internal_exec *execp = exec_hdr (abfd);
unsigned int arch_align_power;
unsigned long arch_align;
- /* Calculate the file positions of the parts of a newly read aout header */
- obj_textsec (abfd)->_raw_size = N_TXTSIZE(*execp);
+ /* Calculate the file positions of the parts of a newly read aout header. */
+ obj_textsec (abfd)->size = N_TXTSIZE (*execp);
- /* The virtual memory addresses of the sections */
- obj_textsec (abfd)->vma = N_TXTADDR(*execp);
- obj_datasec (abfd)->vma = N_DATADDR(*execp);
- obj_bsssec (abfd)->vma = N_BSSADDR(*execp);
+ /* The virtual memory addresses of the sections. */
+ obj_textsec (abfd)->vma = N_TXTADDR (*execp);
+ obj_datasec (abfd)->vma = N_DATADDR (*execp);
+ obj_bsssec (abfd)->vma = N_BSSADDR (*execp);
/* For some targets, if the entry point is not in the same page
as the start of the text, then adjust the VMA so that it is.
@@ -74,13 +70,13 @@ MY(callback) (abfd)
obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
- /* The file offsets of the sections */
+ /* The file offsets of the sections. */
obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
obj_datasec (abfd)->filepos = N_DATOFF (*execp);
- /* The file offsets of the relocation info */
- obj_textsec (abfd)->rel_filepos = N_TRELOFF(*execp);
- obj_datasec (abfd)->rel_filepos = N_DRELOFF(*execp);
+ /* The file offsets of the relocation info. */
+ obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
+ obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
/* The file offsets of the string table and symbol table. */
obj_sym_filepos (abfd) = N_SYMOFF (*execp);
@@ -103,19 +99,19 @@ MY(callback) (abfd)
execp->a_drsize / obj_reloc_entry_size (abfd);
/* Now that we know the architecture, set the alignments of the
- sections. This is normally done by NAME(aout,new_section_hook),
+ sections. This is normally done by NAME (aout,new_section_hook),
but when the initial sections were created the architecture had
not yet been set. However, for backward compatibility, we don't
set the alignment power any higher than as required by the size
of the section. */
arch_align_power = bfd_get_arch_info (abfd)->section_align_power;
arch_align = 1 << arch_align_power;
- if ((BFD_ALIGN (obj_textsec (abfd)->_raw_size, arch_align)
- == obj_textsec (abfd)->_raw_size)
- && (BFD_ALIGN (obj_datasec (abfd)->_raw_size, arch_align)
- == obj_datasec (abfd)->_raw_size)
- && (BFD_ALIGN (obj_bsssec (abfd)->_raw_size, arch_align)
- == obj_bsssec (abfd)->_raw_size))
+ if ((BFD_ALIGN (obj_textsec (abfd)->size, arch_align)
+ == obj_textsec (abfd)->size)
+ && (BFD_ALIGN (obj_datasec (abfd)->size, arch_align)
+ == obj_datasec (abfd)->size)
+ && (BFD_ALIGN (obj_bsssec (abfd)->size, arch_align)
+ == obj_bsssec (abfd)->size))
{
obj_textsec (abfd)->alignment_power = arch_align_power;
obj_datasec (abfd)->alignment_power = arch_align_power;
@@ -124,31 +120,23 @@ MY(callback) (abfd)
/* Don't set sizes now -- can't be sure until we know arch & mach.
Sizes get set in set_sizes callback, later. */
-#if 0
- adata(abfd).page_size = TARGET_PAGE_SIZE;
- adata(abfd).segment_size = SEGMENT_SIZE;
- adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
-#endif
return abfd->xvec;
}
#endif
#ifndef MY_object_p
-/* Finish up the reading of an a.out file header */
-
-static const bfd_target *MY(object_p) PARAMS ((bfd *));
+/* Finish up the reading of an a.out file header. */
static const bfd_target *
-MY(object_p) (abfd)
- bfd *abfd;
+MY (object_p) (bfd *abfd)
{
- struct external_exec exec_bytes; /* Raw exec header from file */
- struct internal_exec exec; /* Cleaned-up exec header */
+ struct external_exec exec_bytes; /* Raw exec header from file. */
+ struct internal_exec exec; /* Cleaned-up exec header. */
const bfd_target *target;
bfd_size_type amt = EXEC_BYTES_SIZE;
- if (bfd_bread ((PTR) &exec_bytes, amt, abfd) != amt)
+ if (bfd_bread ((void *) &exec_bytes, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -159,28 +147,31 @@ MY(object_p) (abfd)
exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
#else
exec.a_info = GET_MAGIC (abfd, exec_bytes.e_info);
-#endif /* SWAP_MAGIC */
+#endif
+
+ if (N_BADMAG (exec))
+ return 0;
- if (N_BADMAG (exec)) return 0;
#ifdef MACHTYPE_OK
- if (!(MACHTYPE_OK (N_MACHTYPE (exec)))) return 0;
+ if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
+ return 0;
#endif
- NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec);
+ NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec);
#ifdef SWAP_MAGIC
- /* swap_exec_header_in read in a_info with the wrong byte order */
+ /* Swap_exec_header_in read in a_info with the wrong byte order. */
exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
-#endif /* SWAP_MAGIC */
+#endif
- target = NAME(aout,some_aout_object_p) (abfd, &exec, MY(callback));
+ target = NAME (aout, some_aout_object_p) (abfd, &exec, MY (callback));
#ifdef ENTRY_CAN_BE_ZERO
/* The NEWSOS3 entry-point is/was 0, which (amongst other lossage)
- * means that it isn't obvious if EXEC_P should be set.
- * All of the following must be true for an executable:
- * There must be no relocations, the bfd can be neither an
- * archive nor an archive element, and the file must be executable. */
+ means that it isn't obvious if EXEC_P should be set.
+ All of the following must be true for an executable:
+ There must be no relocations, the bfd can be neither an
+ archive nor an archive element, and the file must be executable. */
if (exec.a_trsize + exec.a_drsize == 0
&& bfd_get_format(abfd) == bfd_object && abfd->my_archive == NULL)
@@ -196,28 +187,18 @@ MY(object_p) (abfd)
return target;
}
-#define MY_object_p MY(object_p)
+#define MY_object_p MY (object_p)
#endif
#ifndef MY_mkobject
-static bfd_boolean MY(mkobject) PARAMS ((bfd *));
-
static bfd_boolean
-MY(mkobject) (abfd)
- bfd *abfd;
+MY (mkobject) (bfd *abfd)
{
- if (! NAME(aout,mkobject) (abfd))
- return FALSE;
-#if 0 /* Sizes get set in set_sizes callback, later, after we know
- the architecture and machine. */
- adata(abfd).page_size = TARGET_PAGE_SIZE;
- adata(abfd).segment_size = SEGMENT_SIZE;
- adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
-#endif
- return TRUE;
+ return NAME (aout, mkobject (abfd));
}
-#define MY_mkobject MY(mkobject)
+
+#define MY_mkobject MY (mkobject)
#endif
#ifndef MY_bfd_copy_private_section_data
@@ -228,15 +209,11 @@ MY(mkobject) (abfd)
section contents, and copy_private_bfd_data is not called until
after the section contents have been set. */
-static bfd_boolean MY_bfd_copy_private_section_data
- PARAMS ((bfd *, asection *, bfd *, asection *));
-
static bfd_boolean
-MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
- bfd *ibfd;
- asection *isec ATTRIBUTE_UNUSED;
- bfd *obfd;
- asection *osec ATTRIBUTE_UNUSED;
+MY_bfd_copy_private_section_data (bfd *ibfd,
+ asection *isec ATTRIBUTE_UNUSED,
+ bfd *obfd,
+ asection *osec ATTRIBUTE_UNUSED)
{
if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
&& bfd_get_flavour (obfd) == bfd_target_aout_flavour)
@@ -251,31 +228,26 @@ MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
file header, symbols, and relocation. */
#ifndef MY_write_object_contents
-static bfd_boolean MY(write_object_contents) PARAMS ((bfd *));
static bfd_boolean
-MY(write_object_contents) (abfd)
- bfd *abfd;
+MY (write_object_contents) (bfd *abfd)
{
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
- WRITE_HEADERS(abfd, execp);
+ WRITE_HEADERS (abfd, execp);
return TRUE;
}
-#define MY_write_object_contents MY(write_object_contents)
+#define MY_write_object_contents MY (write_object_contents)
#endif
#ifndef MY_set_sizes
-static bfd_boolean MY(set_sizes) PARAMS ((bfd *));
-
static bfd_boolean
-MY(set_sizes) (abfd)
- bfd *abfd;
+MY (set_sizes) (bfd *abfd)
{
adata(abfd).page_size = TARGET_PAGE_SIZE;
adata(abfd).segment_size = SEGMENT_SIZE;
@@ -289,7 +261,7 @@ MY(set_sizes) (abfd)
adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
return TRUE;
}
-#define MY_set_sizes MY(set_sizes)
+#define MY_set_sizes MY (set_sizes)
#endif
#ifndef MY_exec_hdr_flags
@@ -329,12 +301,13 @@ MY(set_sizes) (abfd)
#define MY_finish_dynamic_link 0
#endif
-static const struct aout_backend_data MY(backend_data) = {
+static const struct aout_backend_data MY (backend_data) =
+{
MY_zmagic_contiguous,
MY_text_includes_header,
MY_entry_is_text_address,
MY_exec_hdr_flags,
- 0, /* text vma? */
+ 0, /* Text vma? */
MY_set_sizes,
MY_exec_header_not_counted,
MY_add_dynamic_symbols,
@@ -344,22 +317,18 @@ static const struct aout_backend_data MY(backend_data) = {
MY_check_dynamic_reloc,
MY_finish_dynamic_link
};
-#define MY_backend_data &MY(backend_data)
+#define MY_backend_data &MY (backend_data)
#endif
#ifndef MY_final_link_callback
/* Callback for the final_link routine to set the section offsets. */
-static void MY_final_link_callback
- PARAMS ((bfd *, file_ptr *, file_ptr *, file_ptr *));
-
static void
-MY_final_link_callback (abfd, ptreloff, pdreloff, psymoff)
- bfd *abfd;
- file_ptr *ptreloff;
- file_ptr *pdreloff;
- file_ptr *psymoff;
+MY_final_link_callback (bfd *abfd,
+ file_ptr *ptreloff,
+ file_ptr *pdreloff,
+ file_ptr *psymoff)
{
struct internal_exec *execp = exec_hdr (abfd);
@@ -375,14 +344,10 @@ MY_final_link_callback (abfd, ptreloff, pdreloff, psymoff)
/* Final link routine. We need to use a call back to get the correct
offsets in the output file. */
-static bfd_boolean MY_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *));
-
static bfd_boolean
-MY_bfd_final_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
{
- return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
+ return NAME (aout, final_link) (abfd, info, MY_final_link_callback);
}
#endif
@@ -443,62 +408,65 @@ MY_bfd_final_link (abfd, info)
#endif
#ifndef MY_bfd_debug_info_accumulate
#define MY_bfd_debug_info_accumulate \
- (void (*) PARAMS ((bfd*, struct bfd_section *))) bfd_void
+ (void (*) (bfd *, struct bfd_section *)) bfd_void
#endif
#ifndef MY_core_file_failing_command
-#define MY_core_file_failing_command NAME(aout,core_file_failing_command)
+#define MY_core_file_failing_command NAME (aout, core_file_failing_command)
#endif
#ifndef MY_core_file_failing_signal
-#define MY_core_file_failing_signal NAME(aout,core_file_failing_signal)
+#define MY_core_file_failing_signal NAME (aout, core_file_failing_signal)
#endif
#ifndef MY_core_file_matches_executable_p
-#define MY_core_file_matches_executable_p NAME(aout,core_file_matches_executable_p)
+#define MY_core_file_matches_executable_p NAME (aout, core_file_matches_executable_p)
#endif
#ifndef MY_set_section_contents
-#define MY_set_section_contents NAME(aout,set_section_contents)
+#define MY_set_section_contents NAME (aout, set_section_contents)
#endif
#ifndef MY_get_section_contents
-#define MY_get_section_contents NAME(aout,get_section_contents)
+#define MY_get_section_contents NAME (aout, get_section_contents)
#endif
#ifndef MY_get_section_contents_in_window
#define MY_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
#endif
#ifndef MY_new_section_hook
-#define MY_new_section_hook NAME(aout,new_section_hook)
+#define MY_new_section_hook NAME (aout, new_section_hook)
#endif
#ifndef MY_get_symtab_upper_bound
-#define MY_get_symtab_upper_bound NAME(aout,get_symtab_upper_bound)
+#define MY_get_symtab_upper_bound NAME (aout, get_symtab_upper_bound)
#endif
#ifndef MY_canonicalize_symtab
-#define MY_canonicalize_symtab NAME(aout,canonicalize_symtab)
+#define MY_canonicalize_symtab NAME (aout, canonicalize_symtab)
#endif
#ifndef MY_get_reloc_upper_bound
-#define MY_get_reloc_upper_bound NAME(aout,get_reloc_upper_bound)
+#define MY_get_reloc_upper_bound NAME (aout,get_reloc_upper_bound)
#endif
#ifndef MY_canonicalize_reloc
-#define MY_canonicalize_reloc NAME(aout,canonicalize_reloc)
+#define MY_canonicalize_reloc NAME (aout, canonicalize_reloc)
#endif
#ifndef MY_make_empty_symbol
-#define MY_make_empty_symbol NAME(aout,make_empty_symbol)
+#define MY_make_empty_symbol NAME (aout, make_empty_symbol)
#endif
#ifndef MY_print_symbol
-#define MY_print_symbol NAME(aout,print_symbol)
+#define MY_print_symbol NAME (aout, print_symbol)
#endif
#ifndef MY_get_symbol_info
-#define MY_get_symbol_info NAME(aout,get_symbol_info)
+#define MY_get_symbol_info NAME (aout, get_symbol_info)
#endif
#ifndef MY_get_lineno
-#define MY_get_lineno NAME(aout,get_lineno)
+#define MY_get_lineno NAME (aout, get_lineno)
#endif
#ifndef MY_set_arch_mach
-#define MY_set_arch_mach NAME(aout,set_arch_mach)
+#define MY_set_arch_mach NAME (aout, set_arch_mach)
#endif
#ifndef MY_find_nearest_line
-#define MY_find_nearest_line NAME(aout,find_nearest_line)
+#define MY_find_nearest_line NAME (aout, find_nearest_line)
+#endif
+#ifndef MY_find_inliner_info
+#define MY_find_inliner_info _bfd_nosymbols_find_inliner_info
#endif
#ifndef MY_sizeof_headers
-#define MY_sizeof_headers NAME(aout,sizeof_headers)
+#define MY_sizeof_headers NAME (aout, sizeof_headers)
#endif
#ifndef MY_bfd_get_relocated_section_contents
#define MY_bfd_get_relocated_section_contents \
@@ -513,29 +481,36 @@ MY_bfd_final_link (abfd, info)
#ifndef MY_bfd_merge_sections
#define MY_bfd_merge_sections bfd_generic_merge_sections
#endif
+#ifndef MY_bfd_is_group_section
+#define MY_bfd_is_group_section bfd_generic_is_group_section
+#endif
#ifndef MY_bfd_discard_group
#define MY_bfd_discard_group bfd_generic_discard_group
#endif
+#ifndef MY_section_already_linked
+#define MY_section_already_linked \
+ _bfd_generic_section_already_linked
+#endif
#ifndef MY_bfd_reloc_type_lookup
-#define MY_bfd_reloc_type_lookup NAME(aout,reloc_type_lookup)
+#define MY_bfd_reloc_type_lookup NAME (aout, reloc_type_lookup)
#endif
#ifndef MY_bfd_make_debug_symbol
#define MY_bfd_make_debug_symbol 0
#endif
#ifndef MY_read_minisymbols
-#define MY_read_minisymbols NAME(aout,read_minisymbols)
+#define MY_read_minisymbols NAME (aout, read_minisymbols)
#endif
#ifndef MY_minisymbol_to_symbol
-#define MY_minisymbol_to_symbol NAME(aout,minisymbol_to_symbol)
+#define MY_minisymbol_to_symbol NAME (aout, minisymbol_to_symbol)
#endif
#ifndef MY_bfd_link_hash_table_create
-#define MY_bfd_link_hash_table_create NAME(aout,link_hash_table_create)
+#define MY_bfd_link_hash_table_create NAME (aout, link_hash_table_create)
#endif
#ifndef MY_bfd_link_hash_table_free
#define MY_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#endif
#ifndef MY_bfd_link_add_symbols
-#define MY_bfd_link_add_symbols NAME(aout,link_add_symbols)
+#define MY_bfd_link_add_symbols NAME (aout, link_add_symbols)
#endif
#ifndef MY_bfd_link_just_syms
#define MY_bfd_link_just_syms _bfd_generic_link_just_syms
@@ -556,6 +531,10 @@ MY_bfd_final_link (abfd, info)
#define MY_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
#endif
+#ifndef MY_bfd_copy_private_header_data
+#define MY_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
+#endif
+
#ifndef MY_bfd_print_private_bfd_data
#define MY_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
#endif
@@ -568,8 +547,12 @@ MY_bfd_final_link (abfd, info)
#define MY_bfd_is_local_label_name bfd_generic_is_local_label_name
#endif
+#ifndef MY_bfd_is_target_special_symbol
+#define MY_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
+#endif
+
#ifndef MY_bfd_free_cached_info
-#define MY_bfd_free_cached_info NAME(aout,bfd_free_cached_info)
+#define MY_bfd_free_cached_info NAME (aout, bfd_free_cached_info)
#endif
#ifndef MY_close_and_cleanup
@@ -584,6 +567,10 @@ MY_bfd_final_link (abfd, info)
#define MY_canonicalize_dynamic_symtab \
_bfd_nodynamic_canonicalize_dynamic_symtab
#endif
+#ifndef MY_get_synthetic_symtab
+#define MY_get_synthetic_symtab \
+ _bfd_nodynamic_get_synthetic_symtab
+#endif
#ifndef MY_get_dynamic_reloc_upper_bound
#define MY_get_dynamic_reloc_upper_bound \
_bfd_nodynamic_get_dynamic_reloc_upper_bound
@@ -593,55 +580,55 @@ MY_bfd_final_link (abfd, info)
_bfd_nodynamic_canonicalize_dynamic_reloc
#endif
-/* Aout symbols normally have leading underscores */
+/* Aout symbols normally have leading underscores. */
#ifndef MY_symbol_leading_char
#define MY_symbol_leading_char '_'
#endif
-/* Aout archives normally use spaces for padding */
+/* Aout archives normally use spaces for padding. */
#ifndef AR_PAD_CHAR
#define AR_PAD_CHAR ' '
#endif
#ifndef MY_BFD_TARGET
-const bfd_target MY(vec) =
+const bfd_target MY (vec) =
{
- TARGETNAME, /* name */
+ TARGETNAME, /* Name. */
bfd_target_aout_flavour,
#ifdef TARGET_IS_BIG_ENDIAN_P
- BFD_ENDIAN_BIG, /* target byte order (big) */
- BFD_ENDIAN_BIG, /* target headers byte order (big) */
+ BFD_ENDIAN_BIG, /* Target byte order (big). */
+ BFD_ENDIAN_BIG, /* Target headers byte order (big). */
#else
- BFD_ENDIAN_LITTLE, /* target byte order (little) */
- BFD_ENDIAN_LITTLE, /* target headers byte order (little) */
+ BFD_ENDIAN_LITTLE, /* Target byte order (little). */
+ BFD_ENDIAN_LITTLE, /* Target headers byte order (little). */
#endif
- (HAS_RELOC | EXEC_P | /* object flags */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
MY_symbol_leading_char,
- AR_PAD_CHAR, /* ar_pad_char */
- 15, /* ar_max_namelen */
+ AR_PAD_CHAR, /* AR_pad_char. */
+ 15, /* AR_max_namelen. */
#ifdef TARGET_IS_BIG_ENDIAN_P
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
#else
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
#endif
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format */
+ {_bfd_dummy_target, MY_object_p, /* bfd_check_format. */
bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format */
+ {bfd_false, MY_mkobject, /* bfd_set_format. */
_bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents */
+ {bfd_false, MY_write_object_contents, /* bfd_write_contents. */
_bfd_write_archive_contents, bfd_false},
BFD_JUMP_TABLE_GENERIC (MY),
@@ -654,9 +641,9 @@ const bfd_target MY(vec) =
BFD_JUMP_TABLE_LINK (MY),
BFD_JUMP_TABLE_DYNAMIC (MY),
- /* Alternative_target */
+ /* Alternative_target. */
NULL,
- (PTR) MY_backend_data
+ MY_backend_data
};
#endif /* MY_BFD_TARGET */
diff --git a/contrib/binutils/bfd/aout0.c b/contrib/binutils/bfd/aout0.c
index 731d476cfb37..382fa8e526d9 100644
--- a/contrib/binutils/bfd/aout0.c
+++ b/contrib/binutils/bfd/aout0.c
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGETNAME "a.out-zero-big"
diff --git a/contrib/binutils/bfd/aout32.c b/contrib/binutils/bfd/aout32.c
index afe7fa219032..dca338edf9f5 100644
--- a/contrib/binutils/bfd/aout32.c
+++ b/contrib/binutils/bfd/aout32.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define ARCH_SIZE 32
diff --git a/contrib/binutils/bfd/aout64.c b/contrib/binutils/bfd/aout64.c
index 0f31dab6fcba..a18882364d00 100644
--- a/contrib/binutils/bfd/aout64.c
+++ b/contrib/binutils/bfd/aout64.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define ARCH_SIZE 64
diff --git a/contrib/binutils/bfd/aoutf1.h b/contrib/binutils/bfd/aoutf1.h
index 352dadf4e544..cba4fbbeff99 100644
--- a/contrib/binutils/bfd/aoutf1.h
+++ b/contrib/binutils/bfd/aoutf1.h
@@ -1,31 +1,31 @@
/* A.out "format 1" file handling code for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "aout/sun4.h"
-#include "libaout.h" /* BFD a.out internal data structures */
+#include "libaout.h" /* BFD a.out internal data structures. */
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
@@ -42,30 +42,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
&& bfd_lookup_arch (bfd_arch_m68k, 0) != NULL))
#endif
-/*
-The file @code{aoutf1.h} contains the code for BFD's
-a.out back end. Control over the generated back end is given by these
-two preprocessor names:
-@table @code
-@item ARCH_SIZE
-This value should be either 32 or 64, depending upon the size of an
-int in the target format. It changes the sizes of the structs which
-perform the memory/disk mapping of structures.
-
-The 64 bit backend may only be used if the host compiler supports 64
-ints (eg long long with gcc), by defining the name @code{BFD_HOST_64_BIT} in @code{bfd.h}.
-With this name defined, @emph{all} bfd operations are performed with 64bit
-arithmetic, not just those to a 64bit target.
-
-@item TARGETNAME
-The name put into the target vector.
-@item
-@end table
-
-*/
-
-/*SUPPRESS558*/
-/*SUPPRESS529*/
+/* The file @code{aoutf1.h} contains the code for BFD's
+ a.out back end. Control over the generated back end is given by these
+ two preprocessor names:
+ @table @code
+ @item ARCH_SIZE
+ This value should be either 32 or 64, depending upon the size of an
+ int in the target format. It changes the sizes of the structs which
+ perform the memory/disk mapping of structures.
+
+ The 64 bit backend may only be used if the host compiler supports 64
+ ints (eg long long with gcc), by defining the name @code{BFD_HOST_64_BIT} in @code{bfd.h}.
+ With this name defined, @emph{all} bfd operations are performed with 64bit
+ arithmetic, not just those to a 64bit target.
+
+ @item TARGETNAME
+ The name put into the target vector.
+ @item
+ @end table. */
#if ARCH_SIZE == 64
#define sunos_set_arch_mach sunos_64_set_arch_mach
@@ -75,25 +69,6 @@ The name put into the target vector.
#define sunos_write_object_contents aout_32_sunos4_write_object_contents
#endif
-static bfd_boolean sunos_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static void sunos_set_arch_mach
- PARAMS ((bfd *, enum machine_type));
-static void choose_reloc_size
- PARAMS ((bfd *));
-static bfd_boolean sunos_write_object_contents
- PARAMS ((bfd *));
-static const bfd_target *sunos4_core_file_p
- PARAMS ((bfd *));
-static char *sunos4_core_file_failing_command
- PARAMS ((bfd *));
-static int sunos4_core_file_failing_signal
- PARAMS ((bfd *));
-static bfd_boolean sunos4_core_file_matches_executable_p
- PARAMS ((bfd *, bfd *));
-static bfd_boolean sunos4_set_sizes
- PARAMS ((bfd *));
-
/* Merge backend data into the output file.
This is necessary on sparclet-aout where we want the resultant machine
number to be M_SPARCLET if any input file is M_SPARCLET. */
@@ -101,8 +76,7 @@ static bfd_boolean sunos4_set_sizes
#define MY_bfd_merge_private_bfd_data sunos_merge_private_bfd_data
static bfd_boolean
-sunos_merge_private_bfd_data (ibfd, obfd)
- bfd *ibfd, *obfd;
+sunos_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
if (bfd_get_flavour (ibfd) != bfd_target_aout_flavour
|| bfd_get_flavour (obfd) != bfd_target_aout_flavour)
@@ -121,16 +95,14 @@ sunos_merge_private_bfd_data (ibfd, obfd)
depending upon ARCH_SIZE. */
static void
-sunos_set_arch_mach (abfd, machtype)
- bfd *abfd;
- enum machine_type machtype;
+sunos_set_arch_mach (bfd *abfd, enum machine_type machtype)
{
/* Determine the architecture and machine type of the object file. */
enum bfd_architecture arch;
unsigned long machine;
+
switch (machtype)
{
-
case M_UNKNOWN:
/* Some Sun3s make magic numbers without cpu types in them, so
we'll default to the 68000. */
@@ -171,11 +143,6 @@ sunos_set_arch_mach (abfd, machtype)
machine = 0;
break;
- case M_29K:
- arch = bfd_arch_a29k;
- machine = 0;
- break;
-
case M_HPUX:
arch = bfd_arch_m68k;
machine = 0;
@@ -193,15 +160,14 @@ sunos_set_arch_mach (abfd, machtype)
NAME(sunos,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
choose_reloc_size(ABFD);
-/* Determine the size of a relocation entry, based on the architecture */
+/* Determine the size of a relocation entry, based on the architecture. */
+
static void
-choose_reloc_size (abfd)
- bfd *abfd;
+choose_reloc_size (bfd *abfd)
{
switch (bfd_get_arch (abfd))
{
case bfd_arch_sparc:
- case bfd_arch_a29k:
obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
break;
default:
@@ -217,8 +183,7 @@ choose_reloc_size (abfd)
aout_32_sunos4_write_object_contents, depending upon ARCH_SIZE. */
static bfd_boolean
-sunos_write_object_contents (abfd)
- bfd *abfd;
+sunos_write_object_contents (bfd *abfd)
{
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
@@ -258,9 +223,6 @@ sunos_write_object_contents (abfd)
case bfd_arch_i386:
N_SET_MACHTYPE (*execp, M_386);
break;
- case bfd_arch_a29k:
- N_SET_MACHTYPE (*execp, M_29K);
- break;
default:
N_SET_MACHTYPE (*execp, M_UNKNOWN);
}
@@ -276,9 +238,9 @@ sunos_write_object_contents (abfd)
return TRUE;
}
-/* core files */
+/* Core files. */
-#define CORE_MAGIC 0x080456
+#define CORE_MAGIC 0x080456
#define CORE_NAMELEN 16
/* The core structure is taken from the Sun documentation.
@@ -320,121 +282,112 @@ struct regs
even portably access the stuff in between! */
struct external_sparc_core
- {
- int c_magic; /* Corefile magic number */
- int c_len; /* Sizeof (struct core) */
+{
+ int c_magic; /* Corefile magic number. */
+ int c_len; /* Sizeof (struct core). */
#define SPARC_CORE_LEN 432
- int c_regs[19]; /* General purpose registers -- MACHDEP SIZE */
- struct external_exec c_aouthdr; /* A.out header */
- int c_signo; /* Killing signal, if any */
- int c_tsize; /* Text size (bytes) */
- int c_dsize; /* Data size (bytes) */
- int c_ssize; /* Stack size (bytes) */
- char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
- double fp_stuff[1]; /* external FPU state (size unknown by us) */
- /* The type "double" is critical here, for alignment.
- SunOS declares a struct here, but the struct's alignment
- is double since it contains doubles. */
- int c_ucode; /* Exception no. from u_code */
- /* (this member is not accessible by name since we don't
- portably know the size of fp_stuff.) */
- };
+ struct regs c_regs; /* General purpose registers -- MACHDEP SIZE. */
+ struct external_exec c_aouthdr; /* A.out header. */
+ int c_signo; /* Killing signal, if any. */
+ int c_tsize; /* Text size (bytes). */
+ int c_dsize; /* Data size (bytes). */
+ int c_ssize; /* Stack size (bytes). */
+ char c_cmdname[CORE_NAMELEN + 1]; /* Command name. */
+ double fp_stuff[1]; /* External FPU state (size unknown by us). */
+ /* The type "double" is critical here, for alignment.
+ SunOS declares a struct here, but the struct's
+ alignment is double since it contains doubles. */
+ int c_ucode; /* Exception no. from u_code. */
+ /* This member is not accessible by name since
+ we don't portably know the size of fp_stuff. */
+};
/* Core files generated by the BCP (the part of Solaris which allows
it to run SunOS4 a.out files). */
struct external_solaris_bcp_core
- {
- int c_magic; /* Corefile magic number */
- int c_len; /* Sizeof (struct core) */
+{
+ int c_magic; /* Corefile magic number. */
+ int c_len; /* Sizeof (struct core). */
#define SOLARIS_BCP_CORE_LEN 456
- int c_regs[19]; /* General purpose registers -- MACHDEP SIZE */
- int c_exdata_vp; /* exdata structure */
- int c_exdata_tsize;
- int c_exdata_dsize;
- int c_exdata_bsize;
- int c_exdata_lsize;
- int c_exdata_nshlibs;
- short c_exdata_mach;
- short c_exdata_mag;
- int c_exdata_toffset;
- int c_exdata_doffset;
- int c_exdata_loffset;
- int c_exdata_txtorg;
- int c_exdata_datorg;
- int c_exdata_entloc;
- int c_signo; /* Killing signal, if any */
- int c_tsize; /* Text size (bytes) */
- int c_dsize; /* Data size (bytes) */
- int c_ssize; /* Stack size (bytes) */
- char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
- double fp_stuff[1]; /* external FPU state (size unknown by us) */
- /* The type "double" is critical here, for alignment.
- SunOS declares a struct here, but the struct's alignment
- is double since it contains doubles. */
- int c_ucode; /* Exception no. from u_code */
- /* (this member is not accessible by name since we don't
- portably know the size of fp_stuff.) */
- };
+ struct regs c_regs; /* General purpose registers -- MACHDEP SIZE. */
+ int c_exdata_vp; /* Exdata structure. */
+ int c_exdata_tsize;
+ int c_exdata_dsize;
+ int c_exdata_bsize;
+ int c_exdata_lsize;
+ int c_exdata_nshlibs;
+ short c_exdata_mach;
+ short c_exdata_mag;
+ int c_exdata_toffset;
+ int c_exdata_doffset;
+ int c_exdata_loffset;
+ int c_exdata_txtorg;
+ int c_exdata_datorg;
+ int c_exdata_entloc;
+ int c_signo; /* Killing signal, if any. */
+ int c_tsize; /* Text size (bytes). */
+ int c_dsize; /* Data size (bytes). */
+ int c_ssize; /* Stack size (bytes). */
+ char c_cmdname[CORE_NAMELEN + 1]; /* Command name. */
+ double fp_stuff[1]; /* External FPU state (size unknown by us). */
+ /* The type "double" is critical here, for alignment.
+ SunOS declares a struct here, but the struct's
+ alignment is double since it contains doubles. */
+ int c_ucode; /* Exception no. from u_code. */
+ /* This member is not accessible by name since
+ we don't portably know the size of fp_stuff. */
+};
struct external_sun3_core
- {
- int c_magic; /* Corefile magic number */
- int c_len; /* Sizeof (struct core) */
-#define SUN3_CORE_LEN 826 /* As of SunOS 4.1.1 */
- int c_regs[18]; /* General purpose registers -- MACHDEP SIZE */
- struct external_exec c_aouthdr; /* A.out header */
- int c_signo; /* Killing signal, if any */
- int c_tsize; /* Text size (bytes) */
- int c_dsize; /* Data size (bytes) */
- int c_ssize; /* Stack size (bytes) */
- char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
- double fp_stuff[1]; /* external FPU state (size unknown by us) */
- /* The type "double" is critical here, for alignment.
- SunOS declares a struct here, but the struct's alignment
- is double since it contains doubles. */
- int c_ucode; /* Exception no. from u_code */
- /* (this member is not accessible by name since we don't
- portably know the size of fp_stuff.) */
- };
+{
+ int c_magic; /* Corefile magic number. */
+ int c_len; /* Sizeof (struct core). */
+#define SUN3_CORE_LEN 826 /* As of SunOS 4.1.1. */
+ int c_regs[18]; /* General purpose registers -- MACHDEP SIZE. */
+ struct external_exec c_aouthdr; /* A.out header. */
+ int c_signo; /* Killing signal, if any. */
+ int c_tsize; /* Text size (bytes). */
+ int c_dsize; /* Data size (bytes). */
+ int c_ssize; /* Stack size (bytes). */
+ char c_cmdname[CORE_NAMELEN + 1]; /* Command name. */
+ double fp_stuff[1]; /* External FPU state (size unknown by us). */
+ /* The type "double" is critical here, for alignment.
+ SunOS declares a struct here, but the struct's
+ alignment is double since it contains doubles. */
+ int c_ucode; /* Exception no. from u_code. */
+ /* This member is not accessible by name since
+ we don't portably know the size of fp_stuff. */
+};
struct internal_sunos_core
- {
- int c_magic; /* Corefile magic number */
- int c_len; /* Sizeof (struct core) */
- long c_regs_pos; /* file offset of General purpose registers */
- int c_regs_size; /* size of General purpose registers */
- struct internal_exec c_aouthdr; /* A.out header */
- int c_signo; /* Killing signal, if any */
- int c_tsize; /* Text size (bytes) */
- int c_dsize; /* Data size (bytes) */
- bfd_vma c_data_addr; /* Data start (address) */
- int c_ssize; /* Stack size (bytes) */
- bfd_vma c_stacktop; /* Stack top (address) */
- char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
- long fp_stuff_pos; /* file offset of external FPU state (regs) */
- int fp_stuff_size; /* Size of it */
- int c_ucode; /* Exception no. from u_code */
- };
-
-static void swapcore_sun3
- PARAMS ((bfd *, char *, struct internal_sunos_core *));
-static void swapcore_sparc
- PARAMS ((bfd *, char *, struct internal_sunos_core *));
-static void swapcore_solaris_bcp
- PARAMS ((bfd *, char *, struct internal_sunos_core *));
-
-/* byte-swap in the Sun-3 core structure */
+{
+ int c_magic; /* Corefile magic number. */
+ int c_len; /* Sizeof (struct core). */
+ long c_regs_pos; /* File offset of General purpose registers. */
+ int c_regs_size; /* Size of General purpose registers. */
+ struct internal_exec c_aouthdr; /* A.out header. */
+ int c_signo; /* Killing signal, if any. */
+ int c_tsize; /* Text size (bytes). */
+ int c_dsize; /* Data size (bytes). */
+ bfd_vma c_data_addr; /* Data start (address). */
+ int c_ssize; /* Stack size (bytes). */
+ bfd_vma c_stacktop; /* Stack top (address). */
+ char c_cmdname[CORE_NAMELEN + 1]; /* Command name. */
+ long fp_stuff_pos; /* File offset of external FPU state (regs). */
+ int fp_stuff_size; /* Size of it. */
+ int c_ucode; /* Exception no. from u_code. */
+};
+
+/* Byte-swap in the Sun-3 core structure. */
+
static void
-swapcore_sun3 (abfd, ext, intcore)
- bfd *abfd;
- char *ext;
- struct internal_sunos_core *intcore;
+swapcore_sun3 (bfd *abfd, char *ext, struct internal_sunos_core *intcore)
{
struct external_sun3_core *extcore = (struct external_sun3_core *) ext;
intcore->c_magic = H_GET_32 (abfd, &extcore->c_magic);
intcore->c_len = H_GET_32 (abfd, &extcore->c_len);
- intcore->c_regs_pos = (long) (((struct external_sun3_core *) 0)->c_regs);
+ intcore->c_regs_pos = offsetof (struct external_sun3_core, c_regs);
intcore->c_regs_size = sizeof (extcore->c_regs);
#if ARCH_SIZE == 64
aout_64_swap_exec_header_in
@@ -448,30 +401,28 @@ swapcore_sun3 (abfd, ext, intcore)
intcore->c_data_addr = N_DATADDR (intcore->c_aouthdr);
intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
- intcore->fp_stuff_pos = (long) (((struct external_sun3_core *) 0)->fp_stuff);
+ intcore->fp_stuff_pos = offsetof (struct external_sun3_core, fp_stuff);
/* FP stuff takes up whole rest of struct, except c_ucode. */
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
- (file_ptr) (((struct external_sun3_core *) 0)->fp_stuff);
- /* Ucode is the last thing in the struct -- just before the end */
+ offsetof (struct external_sun3_core, fp_stuff);
+ /* Ucode is the last thing in the struct -- just before the end. */
intcore->c_ucode = H_GET_32 (abfd,
(intcore->c_len
- sizeof (extcore->c_ucode)
+ (unsigned char *) extcore));
- intcore->c_stacktop = 0x0E000000; /* By experimentation */
+ intcore->c_stacktop = 0x0E000000; /* By experimentation. */
}
-/* byte-swap in the Sparc core structure */
+/* Byte-swap in the Sparc core structure. */
+
static void
-swapcore_sparc (abfd, ext, intcore)
- bfd *abfd;
- char *ext;
- struct internal_sunos_core *intcore;
+swapcore_sparc (bfd *abfd, char *ext, struct internal_sunos_core *intcore)
{
struct external_sparc_core *extcore = (struct external_sparc_core *) ext;
intcore->c_magic = H_GET_32 (abfd, &extcore->c_magic);
intcore->c_len = H_GET_32 (abfd, &extcore->c_len);
- intcore->c_regs_pos = (long) (((struct external_sparc_core *) 0)->c_regs);
+ intcore->c_regs_pos = offsetof (struct external_sparc_core, c_regs);
intcore->c_regs_size = sizeof (extcore->c_regs);
#if ARCH_SIZE == 64
aout_64_swap_exec_header_in
@@ -485,11 +436,11 @@ swapcore_sparc (abfd, ext, intcore)
intcore->c_data_addr = N_DATADDR (intcore->c_aouthdr);
intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
- intcore->fp_stuff_pos = (long) (((struct external_sparc_core *) 0)->fp_stuff);
+ intcore->fp_stuff_pos = offsetof (struct external_sparc_core, fp_stuff);
/* FP stuff takes up whole rest of struct, except c_ucode. */
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
- (file_ptr) (((struct external_sparc_core *) 0)->fp_stuff);
- /* Ucode is the last thing in the struct -- just before the end */
+ offsetof (struct external_sparc_core, fp_stuff);
+ /* Ucode is the last thing in the struct -- just before the end. */
intcore->c_ucode = H_GET_32 (abfd,
(intcore->c_len
- sizeof (extcore->c_ucode)
@@ -511,7 +462,7 @@ swapcore_sparc (abfd, ext, intcore)
#define SPARC_USRSTACK_SPARC2 ((bfd_vma)0xf8000000)
#define SPARC_USRSTACK_SPARC10 ((bfd_vma)0xf0000000)
{
- bfd_vma sp = H_GET_32 (abfd, &((struct regs *) &extcore->c_regs[0])->r_o6);
+ bfd_vma sp = H_GET_32 (abfd, &extcore->c_regs.r_o6);
if (sp < SPARC_USRSTACK_SPARC10)
intcore->c_stacktop = SPARC_USRSTACK_SPARC10;
else
@@ -519,19 +470,17 @@ swapcore_sparc (abfd, ext, intcore)
}
}
-/* byte-swap in the Solaris BCP core structure */
+/* Byte-swap in the Solaris BCP core structure. */
+
static void
-swapcore_solaris_bcp (abfd, ext, intcore)
- bfd *abfd;
- char *ext;
- struct internal_sunos_core *intcore;
+swapcore_solaris_bcp (bfd *abfd, char *ext, struct internal_sunos_core *intcore)
{
struct external_solaris_bcp_core *extcore =
(struct external_solaris_bcp_core *) ext;
intcore->c_magic = H_GET_32 (abfd, &extcore->c_magic);
intcore->c_len = H_GET_32 (abfd, &extcore->c_len);
- intcore->c_regs_pos = (long) (((struct external_solaris_bcp_core *) 0)->c_regs);
+ intcore->c_regs_pos = offsetof (struct external_solaris_bcp_core, c_regs);
intcore->c_regs_size = sizeof (extcore->c_regs);
/* The Solaris BCP exdata structure does not contain an a_syms field,
@@ -544,7 +493,7 @@ swapcore_solaris_bcp (abfd, ext, intcore)
are buggy. The exdata structure is not properly filled in, and
the data section is written from address zero instead of the data
start address. */
- memset ((PTR) &intcore->c_aouthdr, 0, sizeof (struct internal_exec));
+ memset ((void *) &intcore->c_aouthdr, 0, sizeof (struct internal_exec));
intcore->c_data_addr = H_GET_32 (abfd, &extcore->c_exdata_datorg);
intcore->c_signo = H_GET_32 (abfd, &extcore->c_signo);
intcore->c_tsize = H_GET_32 (abfd, &extcore->c_tsize);
@@ -552,10 +501,10 @@ swapcore_solaris_bcp (abfd, ext, intcore)
intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
intcore->fp_stuff_pos =
- (long) (((struct external_solaris_bcp_core *) 0)->fp_stuff);
+ offsetof (struct external_solaris_bcp_core, fp_stuff);
/* FP stuff takes up whole rest of struct, except c_ucode. */
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
- (file_ptr) (((struct external_solaris_bcp_core *) 0)->fp_stuff);
+ offsetof (struct external_solaris_bcp_core, fp_stuff);
/* Ucode is the last thing in the struct -- just before the end */
intcore->c_ucode = H_GET_32 (abfd,
(intcore->c_len
@@ -578,7 +527,7 @@ swapcore_solaris_bcp (abfd, ext, intcore)
#define SPARC_USRSTACK_SPARC2 ((bfd_vma)0xf8000000)
#define SPARC_USRSTACK_SPARC10 ((bfd_vma)0xf0000000)
{
- bfd_vma sp = H_GET_32 (abfd, &((struct regs *) &extcore->c_regs[0])->r_o6);
+ bfd_vma sp = H_GET_32 (abfd, &extcore->c_regs.r_o6);
if (sp < SPARC_USRSTACK_SPARC10)
intcore->c_stacktop = SPARC_USRSTACK_SPARC10;
else
@@ -586,17 +535,17 @@ swapcore_solaris_bcp (abfd, ext, intcore)
}
}
-/* need this cast because ptr is really void * */
-#define core_hdr(bfd) ((bfd)->tdata.sun_core_data)
-#define core_datasec(bfd) (core_hdr(bfd)->data_section)
-#define core_stacksec(bfd) (core_hdr(bfd)->stack_section)
-#define core_regsec(bfd) (core_hdr(bfd)->reg_section)
-#define core_reg2sec(bfd) (core_hdr(bfd)->reg2_section)
+/* Need this cast because ptr is really void *. */
+#define core_hdr(bfd) ((bfd)->tdata.sun_core_data)
+#define core_datasec(bfd) (core_hdr (bfd)->data_section)
+#define core_stacksec(bfd) (core_hdr (bfd)->stack_section)
+#define core_regsec(bfd) (core_hdr (bfd)->reg_section)
+#define core_reg2sec(bfd) (core_hdr (bfd)->reg2_section)
-/* These are stored in the bfd's tdata */
+/* These are stored in the bfd's tdata. */
struct sun_core_struct
{
- struct internal_sunos_core *hdr; /* core file header */
+ struct internal_sunos_core *hdr; /* Core file header. */
asection *data_section;
asection *stack_section;
asection *reg_section;
@@ -604,10 +553,9 @@ struct sun_core_struct
};
static const bfd_target *
-sunos4_core_file_p (abfd)
- bfd *abfd;
+sunos4_core_file_p (bfd *abfd)
{
- unsigned char longbuf[4]; /* Raw bytes of various header fields */
+ unsigned char longbuf[4]; /* Raw bytes of various header fields. */
bfd_size_type core_size, amt;
unsigned long core_mag;
struct internal_sunos_core *core;
@@ -619,40 +567,40 @@ sunos4_core_file_p (abfd)
char external_core[1];
} *mergem;
- if (bfd_bread ((PTR) longbuf, (bfd_size_type) sizeof (longbuf), abfd)
+ if (bfd_bread ((void *) longbuf, (bfd_size_type) sizeof (longbuf), abfd)
!= sizeof (longbuf))
- return 0;
+ return NULL;
core_mag = H_GET_32 (abfd, longbuf);
if (core_mag != CORE_MAGIC)
- return 0;
+ return NULL;
/* SunOS core headers can vary in length; second word is size; */
- if (bfd_bread ((PTR) longbuf, (bfd_size_type) sizeof (longbuf), abfd)
+ if (bfd_bread ((void *) longbuf, (bfd_size_type) sizeof (longbuf), abfd)
!= sizeof (longbuf))
- return 0;
+ return NULL;
core_size = H_GET_32 (abfd, longbuf);
- /* Sanity check */
+ /* Sanity check. */
if (core_size > 20000)
- return 0;
+ return NULL;
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
- return 0;
+ return NULL;
amt = core_size + sizeof (struct mergem);
- mergem = (struct mergem *) bfd_zalloc (abfd, amt);
+ mergem = bfd_zalloc (abfd, amt);
if (mergem == NULL)
- return 0;
+ return NULL;
extcore = mergem->external_core;
- if ((bfd_bread ((PTR) extcore, core_size, abfd)) != core_size)
+ if ((bfd_bread ((void *) extcore, core_size, abfd)) != core_size)
{
loser:
bfd_release (abfd, (char *) mergem);
abfd->tdata.any = NULL;
bfd_section_list_clear (abfd);
- return 0;
+ return NULL;
}
/* Validate that it's a core file we know how to handle, due to sun
@@ -671,7 +619,7 @@ sunos4_core_file_p (abfd)
swapcore_solaris_bcp (abfd, extcore, core);
break;
default:
- bfd_set_error (bfd_error_system_call); /* FIXME */
+ bfd_set_error (bfd_error_system_call); /* FIXME. */
goto loser;
}
@@ -701,10 +649,10 @@ sunos4_core_file_p (abfd)
core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
core_reg2sec (abfd)->flags = SEC_HAS_CONTENTS;
- core_stacksec (abfd)->_raw_size = core->c_ssize;
- core_datasec (abfd)->_raw_size = core->c_dsize;
- core_regsec (abfd)->_raw_size = core->c_regs_size;
- core_reg2sec (abfd)->_raw_size = core->fp_stuff_size;
+ core_stacksec (abfd)->size = core->c_ssize;
+ core_datasec (abfd)->size = core->c_dsize;
+ core_regsec (abfd)->size = core->c_regs_size;
+ core_reg2sec (abfd)->size = core->fp_stuff_size;
core_stacksec (abfd)->vma = (core->c_stacktop - core->c_ssize);
core_datasec (abfd)->vma = core->c_data_addr;
@@ -713,11 +661,11 @@ sunos4_core_file_p (abfd)
core_stacksec (abfd)->filepos = core->c_len + core->c_dsize;
core_datasec (abfd)->filepos = core->c_len;
- /* We'll access the regs afresh in the core file, like any section: */
+ /* We'll access the regs afresh in the core file, like any section: */
core_regsec (abfd)->filepos = (file_ptr) core->c_regs_pos;
core_reg2sec (abfd)->filepos = (file_ptr) core->fp_stuff_pos;
- /* Align to word at least */
+ /* Align to word at least. */
core_stacksec (abfd)->alignment_power = 2;
core_datasec (abfd)->alignment_power = 2;
core_regsec (abfd)->alignment_power = 2;
@@ -727,23 +675,19 @@ sunos4_core_file_p (abfd)
}
static char *
-sunos4_core_file_failing_command (abfd)
- bfd *abfd;
+sunos4_core_file_failing_command (bfd *abfd)
{
return core_hdr (abfd)->hdr->c_cmdname;
}
static int
-sunos4_core_file_failing_signal (abfd)
- bfd *abfd;
+sunos4_core_file_failing_signal (bfd *abfd)
{
return core_hdr (abfd)->hdr->c_signo;
}
static bfd_boolean
-sunos4_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd;
- bfd *exec_bfd;
+sunos4_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
{
if (core_bfd->xvec != exec_bfd->xvec)
{
@@ -755,15 +699,15 @@ sunos4_core_file_matches_executable_p (core_bfd, exec_bfd)
if ((core_hdr (core_bfd)->hdr)->c_len == SOLARIS_BCP_CORE_LEN)
return TRUE;
- return (memcmp ((char *) &((core_hdr (core_bfd)->hdr)->c_aouthdr),
- (char *) exec_hdr (exec_bfd),
- sizeof (struct internal_exec)) == 0);
+ return memcmp ((char *) &((core_hdr (core_bfd)->hdr)->c_aouthdr),
+ (char *) exec_hdr (exec_bfd),
+ sizeof (struct internal_exec)) == 0;
}
#define MY_set_sizes sunos4_set_sizes
+
static bfd_boolean
-sunos4_set_sizes (abfd)
- bfd *abfd;
+sunos4_set_sizes (bfd *abfd)
{
switch (bfd_get_arch (abfd))
{
@@ -812,13 +756,13 @@ sunos4_set_sizes (abfd)
static const struct aout_backend_data sunos4_aout_backend =
{
- 0, /* zmagic files are not contiguous */
- 1, /* text includes header */
+ 0, /* Zmagic files are not contiguous. */
+ 1, /* Text includes header. */
MY_entry_is_text_address,
MY_exec_hdr_flags,
- 0, /* default text vma */
+ 0, /* Default text vma. */
sunos4_set_sizes,
- 0, /* header is counted in zmagic text */
+ 0, /* Header is counted in zmagic text. */
MY_add_dynamic_symbols,
MY_add_one_symbol,
MY_link_dynamic_object,
@@ -833,11 +777,10 @@ static const struct aout_backend_data sunos4_aout_backend =
#define MY_bfd_debug_info_start bfd_void
#define MY_bfd_debug_info_end bfd_void
-#define MY_bfd_debug_info_accumulate \
- (void (*) PARAMS ((bfd *, struct bfd_section *))) bfd_void
+#define MY_bfd_debug_info_accumulate (void (*) (bfd *, struct bfd_section *)) bfd_void
#define MY_core_file_p sunos4_core_file_p
-#define MY_write_object_contents NAME(aout,sunos4_write_object_contents)
-#define MY_backend_data &sunos4_aout_backend
+#define MY_write_object_contents NAME(aout, sunos4_write_object_contents)
+#define MY_backend_data & sunos4_aout_backend
#ifndef TARGET_IS_LITTLE_ENDIAN_P
#define TARGET_IS_BIG_ENDIAN_P
diff --git a/contrib/binutils/bfd/aoutx.h b/contrib/binutils/bfd/aoutx.h
index 3282f87dfe23..7dce07240ff6 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, 2000,
- 2001, 2002, 2003
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
SECTION
@@ -129,20 +129,7 @@ DESCRIPTION
#include "aout/stab_gnu.h"
#include "aout/ar.h"
-static bfd_boolean aout_get_external_symbols
- PARAMS ((bfd *));
-static bfd_boolean translate_from_native_sym_flags
- PARAMS ((bfd *, aout_symbol_type *));
-static bfd_boolean translate_to_native_sym_flags
- PARAMS ((bfd *, asymbol *, struct external_nlist *));
-static void adjust_o_magic
- PARAMS ((bfd *, struct internal_exec *));
-static void adjust_z_magic
- PARAMS ((bfd *, struct internal_exec *));
-static void adjust_n_magic
- PARAMS ((bfd *, struct internal_exec *));
-reloc_howto_type * NAME(aout,reloc_type_lookup)
- PARAMS ((bfd *, bfd_reloc_code_real_type));
+reloc_howto_type * NAME (aout, reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
/*
SUBSECTION
@@ -166,19 +153,19 @@ DESCRIPTION
#endif
#ifndef MY_swap_std_reloc_in
-#define MY_swap_std_reloc_in NAME(aout,swap_std_reloc_in)
+#define MY_swap_std_reloc_in NAME (aout, swap_std_reloc_in)
#endif
#ifndef MY_swap_ext_reloc_in
-#define MY_swap_ext_reloc_in NAME(aout,swap_ext_reloc_in)
+#define MY_swap_ext_reloc_in NAME (aout, swap_ext_reloc_in)
#endif
#ifndef MY_swap_std_reloc_out
-#define MY_swap_std_reloc_out NAME(aout,swap_std_reloc_out)
+#define MY_swap_std_reloc_out NAME (aout, swap_std_reloc_out)
#endif
#ifndef MY_swap_ext_reloc_out
-#define MY_swap_ext_reloc_out NAME(aout,swap_ext_reloc_out)
+#define MY_swap_ext_reloc_out NAME (aout, swap_ext_reloc_out)
#endif
#ifndef MY_final_link_relocate
@@ -189,40 +176,40 @@ DESCRIPTION
#define MY_relocate_contents _bfd_relocate_contents
#endif
-#define howto_table_ext NAME(aout,ext_howto_table)
-#define howto_table_std NAME(aout,std_howto_table)
+#define howto_table_ext NAME (aout, ext_howto_table)
+#define howto_table_std NAME (aout, std_howto_table)
reloc_howto_type howto_table_ext[] =
{
- /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone. */
- HOWTO(RELOC_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,0,"8", FALSE, 0,0x000000ff, FALSE),
- HOWTO(RELOC_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,0,"16", FALSE, 0,0x0000ffff, FALSE),
- HOWTO(RELOC_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"32", FALSE, 0,0xffffffff, FALSE),
- HOWTO(RELOC_DISP8, 0, 0, 8, TRUE, 0, complain_overflow_signed,0,"DISP8", FALSE, 0,0x000000ff, FALSE),
- HOWTO(RELOC_DISP16, 0, 1, 16, TRUE, 0, complain_overflow_signed,0,"DISP16", FALSE, 0,0x0000ffff, FALSE),
- HOWTO(RELOC_DISP32, 0, 2, 32, TRUE, 0, complain_overflow_signed,0,"DISP32", FALSE, 0,0xffffffff, FALSE),
- HOWTO(RELOC_WDISP30,2, 2, 30, TRUE, 0, complain_overflow_signed,0,"WDISP30", FALSE, 0,0x3fffffff, FALSE),
- HOWTO(RELOC_WDISP22,2, 2, 22, TRUE, 0, complain_overflow_signed,0,"WDISP22", FALSE, 0,0x003fffff, FALSE),
- HOWTO(RELOC_HI22, 10, 2, 22, FALSE, 0, complain_overflow_bitfield,0,"HI22", FALSE, 0,0x003fffff, FALSE),
- HOWTO(RELOC_22, 0, 2, 22, FALSE, 0, complain_overflow_bitfield,0,"22", FALSE, 0,0x003fffff, FALSE),
- HOWTO(RELOC_13, 0, 2, 13, FALSE, 0, complain_overflow_bitfield,0,"13", FALSE, 0,0x00001fff, FALSE),
- HOWTO(RELOC_LO10, 0, 2, 10, FALSE, 0, complain_overflow_dont,0,"LO10", FALSE, 0,0x000003ff, FALSE),
- HOWTO(RELOC_SFA_BASE,0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"SFA_BASE", FALSE, 0,0xffffffff, FALSE),
- HOWTO(RELOC_SFA_OFF13,0,2, 32, FALSE, 0, complain_overflow_bitfield,0,"SFA_OFF13",FALSE, 0,0xffffffff, FALSE),
- HOWTO(RELOC_BASE10, 0, 2, 10, FALSE, 0, complain_overflow_dont,0,"BASE10", FALSE, 0,0x000003ff, FALSE),
- HOWTO(RELOC_BASE13, 0, 2, 13, FALSE, 0, complain_overflow_signed,0,"BASE13", FALSE, 0,0x00001fff, FALSE),
- HOWTO(RELOC_BASE22, 10, 2, 22, FALSE, 0, complain_overflow_bitfield,0,"BASE22", FALSE, 0,0x003fffff, FALSE),
- HOWTO(RELOC_PC10, 0, 2, 10, TRUE, 0, complain_overflow_dont,0,"PC10", FALSE, 0,0x000003ff, TRUE),
- HOWTO(RELOC_PC22, 10, 2, 22, TRUE, 0, complain_overflow_signed,0,"PC22", FALSE, 0,0x003fffff, TRUE),
- HOWTO(RELOC_JMP_TBL,2, 2, 30, TRUE, 0, complain_overflow_signed,0,"JMP_TBL", FALSE, 0,0x3fffffff, FALSE),
- HOWTO(RELOC_SEGOFF16,0, 2, 0, FALSE, 0, complain_overflow_bitfield,0,"SEGOFF16", FALSE, 0,0x00000000, FALSE),
- HOWTO(RELOC_GLOB_DAT,0, 2, 0, FALSE, 0, complain_overflow_bitfield,0,"GLOB_DAT", FALSE, 0,0x00000000, FALSE),
- HOWTO(RELOC_JMP_SLOT,0, 2, 0, FALSE, 0, complain_overflow_bitfield,0,"JMP_SLOT", FALSE, 0,0x00000000, FALSE),
- HOWTO(RELOC_RELATIVE,0, 2, 0, FALSE, 0, complain_overflow_bitfield,0,"RELATIVE", FALSE, 0,0x00000000, FALSE),
- HOWTO(0, 0, 0, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(0, 0, 0, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
+ /* Type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone. */
+ HOWTO (RELOC_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "8", FALSE, 0, 0x000000ff, FALSE),
+ HOWTO (RELOC_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "16", FALSE, 0, 0x0000ffff, FALSE),
+ HOWTO (RELOC_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "32", FALSE, 0, 0xffffffff, FALSE),
+ HOWTO (RELOC_DISP8, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, "DISP8", FALSE, 0, 0x000000ff, FALSE),
+ HOWTO (RELOC_DISP16, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "DISP16", FALSE, 0, 0x0000ffff, FALSE),
+ HOWTO (RELOC_DISP32, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", FALSE, 0, 0xffffffff, FALSE),
+ HOWTO (RELOC_WDISP30, 2, 2, 30, TRUE, 0, complain_overflow_signed, 0, "WDISP30", FALSE, 0, 0x3fffffff, FALSE),
+ HOWTO (RELOC_WDISP22, 2, 2, 22, TRUE, 0, complain_overflow_signed, 0, "WDISP22", FALSE, 0, 0x003fffff, FALSE),
+ HOWTO (RELOC_HI22, 10, 2, 22, FALSE, 0, complain_overflow_bitfield, 0, "HI22", FALSE, 0, 0x003fffff, FALSE),
+ HOWTO (RELOC_22, 0, 2, 22, FALSE, 0, complain_overflow_bitfield, 0, "22", FALSE, 0, 0x003fffff, FALSE),
+ HOWTO (RELOC_13, 0, 2, 13, FALSE, 0, complain_overflow_bitfield, 0, "13", FALSE, 0, 0x00001fff, FALSE),
+ HOWTO (RELOC_LO10, 0, 2, 10, FALSE, 0, complain_overflow_dont, 0, "LO10", FALSE, 0, 0x000003ff, FALSE),
+ HOWTO (RELOC_SFA_BASE,0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "SFA_BASE", FALSE, 0, 0xffffffff, FALSE),
+ HOWTO (RELOC_SFA_OFF13,0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "SFA_OFF13", FALSE, 0, 0xffffffff, FALSE),
+ HOWTO (RELOC_BASE10, 0, 2, 10, FALSE, 0, complain_overflow_dont, 0, "BASE10", FALSE, 0, 0x000003ff, FALSE),
+ HOWTO (RELOC_BASE13, 0, 2, 13, FALSE, 0, complain_overflow_signed, 0, "BASE13", FALSE, 0, 0x00001fff, FALSE),
+ HOWTO (RELOC_BASE22, 10, 2, 22, FALSE, 0, complain_overflow_bitfield, 0, "BASE22", FALSE, 0, 0x003fffff, FALSE),
+ HOWTO (RELOC_PC10, 0, 2, 10, TRUE, 0, complain_overflow_dont, 0, "PC10", FALSE, 0, 0x000003ff, TRUE),
+ HOWTO (RELOC_PC22, 10, 2, 22, TRUE, 0, complain_overflow_signed, 0, "PC22", FALSE, 0, 0x003fffff, TRUE),
+ HOWTO (RELOC_JMP_TBL, 2, 2, 30, TRUE, 0, complain_overflow_signed, 0, "JMP_TBL", FALSE, 0, 0x3fffffff, FALSE),
+ HOWTO (RELOC_SEGOFF16,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "SEGOFF16", FALSE, 0, 0x00000000, FALSE),
+ HOWTO (RELOC_GLOB_DAT,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "GLOB_DAT", FALSE, 0, 0x00000000, FALSE),
+ HOWTO (RELOC_JMP_SLOT,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "JMP_SLOT", FALSE, 0, 0x00000000, FALSE),
+ HOWTO (RELOC_RELATIVE,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "RELATIVE", FALSE, 0, 0x00000000, FALSE),
+ HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE",FALSE, 0, 0x00000000, TRUE),
+ HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE",FALSE, 0, 0x00000000, TRUE),
#define RELOC_SPARC_REV32 RELOC_WDISP19
- HOWTO(RELOC_SPARC_REV32, 0, 2, 32, FALSE, 0, complain_overflow_dont,0,"R_SPARC_REV32", FALSE, 0,0xffffffff, FALSE),
+ HOWTO (RELOC_SPARC_REV32, 0, 2, 32, FALSE, 0, complain_overflow_dont, 0,"R_SPARC_REV32",FALSE, 0, 0xffffffff, FALSE),
};
/* Convert standard reloc records to "arelent" format (incl byte swap). */
@@ -276,12 +263,10 @@ EMPTY_HOWTO (-1),
#define TABLE_SIZE(TABLE) (sizeof (TABLE) / sizeof (TABLE[0]))
reloc_howto_type *
-NAME(aout,reloc_type_lookup) (abfd,code)
- bfd *abfd;
- bfd_reloc_code_real_type code;
+NAME (aout, reloc_type_lookup) (bfd *abfd, bfd_reloc_code_real_type code)
{
-#define EXT(i, j) case i: return &howto_table_ext[j]
-#define STD(i, j) case i: return &howto_table_std[j]
+#define EXT(i, j) case i: return & howto_table_ext [j]
+#define STD(i, j) case i: return & howto_table_std [j]
int ext = obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE;
if (code == BFD_RELOC_CTOR)
@@ -314,7 +299,8 @@ NAME(aout,reloc_type_lookup) (abfd,code)
EXT (BFD_RELOC_SPARC_PC22, 18);
EXT (BFD_RELOC_SPARC_WPLT30, 19);
EXT (BFD_RELOC_SPARC_REV32, 26);
- default: return (reloc_howto_type *) NULL;
+ default:
+ return NULL;
}
else
/* std relocs. */
@@ -328,7 +314,8 @@ NAME(aout,reloc_type_lookup) (abfd,code)
STD (BFD_RELOC_32_PCREL, 6);
STD (BFD_RELOC_16_BASEREL, 9);
STD (BFD_RELOC_32_BASEREL, 10);
- default: return (reloc_howto_type *) NULL;
+ default:
+ return NULL;
}
}
@@ -340,7 +327,6 @@ 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).
-
*/
/*
@@ -350,7 +336,7 @@ FUNCTION
SYNOPSIS
void aout_@var{size}_swap_exec_header_in,
(bfd *abfd,
- struct external_exec *raw_bytes,
+ struct external_exec *bytes,
struct internal_exec *execp);
DESCRIPTION
@@ -361,18 +347,15 @@ DESCRIPTION
#ifndef NAME_swap_exec_header_in
void
-NAME(aout,swap_exec_header_in) (abfd, raw_bytes, execp)
- bfd *abfd;
- struct external_exec *raw_bytes;
- struct internal_exec *execp;
+NAME (aout, swap_exec_header_in) (bfd *abfd,
+ struct external_exec *bytes,
+ struct internal_exec *execp)
{
- struct external_exec *bytes = (struct external_exec *)raw_bytes;
-
/* The internal_exec structure has some fields that are unused in this
configuration (IE for i960), so ensure that all such uninitialized
fields are zero'd out. There are places where two of these structs
are memcmp'd, and thus the contents do matter. */
- memset ((PTR) execp, 0, sizeof (struct internal_exec));
+ memset ((void *) execp, 0, sizeof (struct internal_exec));
/* Now fill in fields in the execp, from the bytes in the raw data. */
execp->a_info = H_GET_32 (abfd, bytes->e_info);
execp->a_text = GET_WORD (abfd, bytes->e_text);
@@ -383,7 +366,7 @@ NAME(aout,swap_exec_header_in) (abfd, raw_bytes, execp)
execp->a_trsize = GET_WORD (abfd, bytes->e_trsize);
execp->a_drsize = GET_WORD (abfd, bytes->e_drsize);
}
-#define NAME_swap_exec_header_in NAME(aout,swap_exec_header_in)
+#define NAME_swap_exec_header_in NAME (aout, swap_exec_header_in)
#endif
/*
@@ -401,13 +384,10 @@ DESCRIPTION
@var{execp} into the buffer @var{raw_bytes} ready for writing to disk.
*/
void
-NAME(aout,swap_exec_header_out) (abfd, execp, raw_bytes)
- bfd *abfd;
- struct internal_exec *execp;
- struct external_exec *raw_bytes;
+NAME (aout, swap_exec_header_out) (bfd *abfd,
+ struct internal_exec *execp,
+ struct external_exec *bytes)
{
- struct external_exec *bytes = (struct external_exec *)raw_bytes;
-
/* Now fill in fields in the raw data, from the fields in the exec struct. */
H_PUT_32 (abfd, execp->a_info , bytes->e_info);
PUT_WORD (abfd, execp->a_text , bytes->e_text);
@@ -422,17 +402,13 @@ NAME(aout,swap_exec_header_out) (abfd, execp, raw_bytes)
/* Make all the section for an a.out file. */
bfd_boolean
-NAME(aout,make_sections) (abfd)
- bfd *abfd;
+NAME (aout, make_sections) (bfd *abfd)
{
- if (obj_textsec (abfd) == (asection *) NULL
- && bfd_make_section (abfd, ".text") == (asection *) NULL)
+ if (obj_textsec (abfd) == NULL && bfd_make_section (abfd, ".text") == NULL)
return FALSE;
- if (obj_datasec (abfd) == (asection *) NULL
- && bfd_make_section (abfd, ".data") == (asection *) NULL)
+ if (obj_datasec (abfd) == NULL && bfd_make_section (abfd, ".data") == NULL)
return FALSE;
- if (obj_bsssec (abfd) == (asection *) NULL
- && bfd_make_section (abfd, ".bss") == (asection *) NULL)
+ if (obj_bsssec (abfd) == NULL && bfd_make_section (abfd, ".bss") == NULL)
return FALSE;
return TRUE;
}
@@ -444,7 +420,8 @@ FUNCTION
SYNOPSIS
const bfd_target *aout_@var{size}_some_aout_object_p
(bfd *abfd,
- const bfd_target *(*callback_to_real_object_p) ());
+ struct internal_exec *execp,
+ const bfd_target *(*callback_to_real_object_p) (bfd *));
DESCRIPTION
Some a.out variant thinks that the file open in @var{abfd}
@@ -455,18 +432,17 @@ DESCRIPTION
*/
const bfd_target *
-NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
- bfd *abfd;
- struct internal_exec *execp;
- const bfd_target *(*callback_to_real_object_p) PARAMS ((bfd *));
+NAME (aout, some_aout_object_p) (bfd *abfd,
+ struct internal_exec *execp,
+ const bfd_target *(*callback_to_real_object_p) (bfd *))
{
struct aout_data_struct *rawptr, *oldrawptr;
const bfd_target *result;
- bfd_size_type amt = sizeof (struct aout_data_struct);
+ bfd_size_type amt = sizeof (* rawptr);
- rawptr = (struct aout_data_struct *) bfd_zalloc (abfd, amt);
+ rawptr = bfd_zalloc (abfd, amt);
if (rawptr == NULL)
- return 0;
+ return NULL;
oldrawptr = abfd->tdata.aout_data;
abfd->tdata.aout_data = rawptr;
@@ -513,15 +489,13 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
|| N_MAGIC (*execp) == BMAGIC)
adata (abfd).magic = o_magic;
else
- {
- /* Should have been checked with N_BADMAG before this routine
- was called. */
- abort ();
- }
+ /* Should have been checked with N_BADMAG before this routine
+ was called. */
+ abort ();
bfd_get_start_address (abfd) = execp->a_entry;
- obj_aout_symbols (abfd) = (aout_symbol_type *)NULL;
+ obj_aout_symbols (abfd) = NULL;
bfd_get_symcount (abfd) = execp->a_syms / sizeof (struct external_nlist);
/* The default relocation entry size is that of traditional V7 Unix. */
@@ -538,11 +512,11 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
obj_aout_external_strings (abfd) = NULL;
obj_aout_sym_hashes (abfd) = NULL;
- if (! NAME(aout,make_sections) (abfd))
+ if (! NAME (aout, make_sections) (abfd))
goto error_ret;
- obj_datasec (abfd)->_raw_size = execp->a_data;
- obj_bsssec (abfd)->_raw_size = execp->a_bss;
+ obj_datasec (abfd)->size = execp->a_data;
+ obj_bsssec (abfd)->size = execp->a_bss;
obj_textsec (abfd)->flags =
(execp->a_trsize != 0
@@ -568,7 +542,6 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
struct exec *execp = exec_hdr (abfd);
obj_textsec (abfd)->size = N_TXTSIZE (*execp);
- obj_textsec (abfd)->raw_size = N_TXTSIZE (*execp);
/* Data and bss are already filled in since they're so standard. */
/* The virtual memory addresses of the sections. */
@@ -632,7 +605,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
if (execp->a_entry != 0
|| (execp->a_entry >= obj_textsec (abfd)->vma
&& execp->a_entry < (obj_textsec (abfd)->vma
- + obj_textsec (abfd)->_raw_size)))
+ + obj_textsec (abfd)->size)))
abfd->flags |= EXEC_P;
#ifdef STAT_FOR_EXEC
else
@@ -655,14 +628,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
#endif /* STAT_FOR_EXEC */
if (result)
- {
-#if 0 /* These should be set correctly anyways. */
- abfd->sections = obj_textsec (abfd);
- obj_textsec (abfd)->next = obj_datasec (abfd);
- obj_datasec (abfd)->next = obj_bsssec (abfd);
-#endif
- return result;
- }
+ return result;
error_ret:
bfd_release (abfd, rawptr);
@@ -682,24 +648,23 @@ DESCRIPTION
*/
bfd_boolean
-NAME(aout,mkobject) (abfd)
- bfd *abfd;
+NAME (aout, mkobject) (bfd *abfd)
{
struct aout_data_struct *rawptr;
- bfd_size_type amt = sizeof (struct aout_data_struct);
+ bfd_size_type amt = sizeof (* rawptr);
bfd_set_error (bfd_error_system_call);
- rawptr = (struct aout_data_struct *) bfd_zalloc (abfd, amt);
+ rawptr = bfd_zalloc (abfd, amt);
if (rawptr == NULL)
return FALSE;
abfd->tdata.aout_data = rawptr;
exec_hdr (abfd) = &(rawptr->e);
- obj_textsec (abfd) = (asection *) NULL;
- obj_datasec (abfd) = (asection *) NULL;
- obj_bsssec (abfd) = (asection *) NULL;
+ obj_textsec (abfd) = NULL;
+ obj_datasec (abfd) = NULL;
+ obj_bsssec (abfd) = NULL;
return TRUE;
}
@@ -711,7 +676,8 @@ FUNCTION
SYNOPSIS
enum machine_type aout_@var{size}_machine_type
(enum bfd_architecture arch,
- unsigned long machine));
+ unsigned long machine,
+ bfd_boolean *unknown);
DESCRIPTION
Keep track of machine architecture and machine type for
@@ -724,10 +690,9 @@ DESCRIPTION
*/
enum machine_type
-NAME(aout,machine_type) (arch, machine, unknown)
- enum bfd_architecture arch;
- unsigned long machine;
- bfd_boolean *unknown;
+NAME (aout, machine_type) (enum bfd_architecture arch,
+ unsigned long machine,
+ bfd_boolean *unknown)
{
enum machine_type arch_flags;
@@ -741,7 +706,12 @@ NAME(aout,machine_type) (arch, machine, unknown)
|| machine == bfd_mach_sparc
|| machine == bfd_mach_sparc_sparclite
|| machine == bfd_mach_sparc_sparclite_le
- || machine == bfd_mach_sparc_v9)
+ || machine == bfd_mach_sparc_v8plus
+ || machine == bfd_mach_sparc_v8plusa
+ || machine == bfd_mach_sparc_v8plusb
+ || machine == bfd_mach_sparc_v9
+ || machine == bfd_mach_sparc_v9a
+ || machine == bfd_mach_sparc_v9b)
arch_flags = M_SPARC;
else if (machine == bfd_mach_sparc_sparclet)
arch_flags = M_SPARCLET;
@@ -765,11 +735,6 @@ NAME(aout,machine_type) (arch, machine, unknown)
arch_flags = M_386;
break;
- case bfd_arch_a29k:
- if (machine == 0)
- arch_flags = M_29K;
- break;
-
case bfd_arch_arm:
if (machine == 0)
arch_flags = M_ARM;
@@ -794,6 +759,7 @@ NAME(aout,machine_type) (arch, machine, unknown)
case bfd_mach_mips4600:
case bfd_mach_mips4650:
case bfd_mach_mips8000:
+ case bfd_mach_mips9000:
case bfd_mach_mips10000:
case bfd_mach_mips12000:
case bfd_mach_mips16:
@@ -831,6 +797,10 @@ NAME(aout,machine_type) (arch, machine, unknown)
arch_flags = M_CRIS;
break;
+ case bfd_arch_m88k:
+ *unknown = FALSE;
+ break;
+
default:
arch_flags = M_UNKNOWN;
}
@@ -849,7 +819,7 @@ SYNOPSIS
bfd_boolean aout_@var{size}_set_arch_mach,
(bfd *,
enum bfd_architecture arch,
- unsigned long machine));
+ unsigned long machine);
DESCRIPTION
Set the architecture and the machine of the BFD @var{abfd} to the
@@ -858,10 +828,9 @@ DESCRIPTION
*/
bfd_boolean
-NAME(aout,set_arch_mach) (abfd, arch, machine)
- bfd *abfd;
- enum bfd_architecture arch;
- unsigned long machine;
+NAME (aout, set_arch_mach) (bfd *abfd,
+ enum bfd_architecture arch,
+ unsigned long machine)
{
if (! bfd_default_set_arch_mach (abfd, arch, machine))
return FALSE;
@@ -870,7 +839,7 @@ NAME(aout,set_arch_mach) (abfd, arch, machine)
{
bfd_boolean unknown;
- NAME(aout,machine_type) (arch, machine, &unknown);
+ NAME (aout, machine_type) (arch, machine, &unknown);
if (unknown)
return FALSE;
}
@@ -879,7 +848,6 @@ NAME(aout,set_arch_mach) (abfd, arch, machine)
switch (arch)
{
case bfd_arch_sparc:
- case bfd_arch_a29k:
case bfd_arch_mips:
obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
break;
@@ -892,9 +860,7 @@ NAME(aout,set_arch_mach) (abfd, arch, machine)
}
static void
-adjust_o_magic (abfd, execp)
- bfd *abfd;
- struct internal_exec *execp;
+adjust_o_magic (bfd *abfd, struct internal_exec *execp)
{
file_ptr pos = adata (abfd).exec_bytes_size;
bfd_vma vma = 0;
@@ -907,16 +873,13 @@ adjust_o_magic (abfd, execp)
else
vma = obj_textsec (abfd)->vma;
- pos += obj_textsec (abfd)->_raw_size;
- vma += obj_textsec (abfd)->_raw_size;
+ pos += obj_textsec (abfd)->size;
+ vma += obj_textsec (abfd)->size;
/* Data. */
if (!obj_datasec (abfd)->user_set_vma)
{
-#if 0 /* ?? Does alignment in the file image really matter? */
- pad = align_power (vma, obj_datasec (abfd)->alignment_power) - vma;
-#endif
- obj_textsec (abfd)->_raw_size += pad;
+ obj_textsec (abfd)->size += pad;
pos += pad;
vma += pad;
obj_datasec (abfd)->vma = vma;
@@ -924,16 +887,13 @@ adjust_o_magic (abfd, execp)
else
vma = obj_datasec (abfd)->vma;
obj_datasec (abfd)->filepos = pos;
- pos += obj_datasec (abfd)->_raw_size;
- vma += obj_datasec (abfd)->_raw_size;
+ pos += obj_datasec (abfd)->size;
+ vma += obj_datasec (abfd)->size;
/* BSS. */
if (!obj_bsssec (abfd)->user_set_vma)
{
-#if 0
- pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
-#endif
- obj_datasec (abfd)->_raw_size += pad;
+ obj_datasec (abfd)->size += pad;
pos += pad;
vma += pad;
obj_bsssec (abfd)->vma = vma;
@@ -946,28 +906,27 @@ adjust_o_magic (abfd, execp)
pad = obj_bsssec (abfd)->vma - vma;
if (pad > 0)
{
- obj_datasec (abfd)->_raw_size += pad;
+ obj_datasec (abfd)->size += pad;
pos += pad;
}
}
obj_bsssec (abfd)->filepos = pos;
/* Fix up the exec header. */
- execp->a_text = obj_textsec (abfd)->_raw_size;
- execp->a_data = obj_datasec (abfd)->_raw_size;
- execp->a_bss = obj_bsssec (abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->size;
+ execp->a_data = obj_datasec (abfd)->size;
+ execp->a_bss = obj_bsssec (abfd)->size;
N_SET_MAGIC (*execp, OMAGIC);
}
static void
-adjust_z_magic (abfd, execp)
- bfd *abfd;
- struct internal_exec *execp;
+adjust_z_magic (bfd *abfd, struct internal_exec *execp)
{
bfd_size_type data_pad, text_pad;
file_ptr text_end;
const struct aout_backend_data *abdp;
- int ztih; /* Nonzero if text includes exec header. */
+ /* TRUE if text includes exec header. */
+ bfd_boolean ztih;
abdp = aout_backend_info (abfd);
@@ -1005,7 +964,7 @@ adjust_z_magic (abfd, execp)
/* Find start of data. */
if (ztih)
{
- text_end = obj_textsec (abfd)->filepos + obj_textsec (abfd)->_raw_size;
+ text_end = obj_textsec (abfd)->filepos + obj_textsec (abfd)->size;
text_pad += BFD_ALIGN (text_end, adata (abfd).page_size) - text_end;
}
else
@@ -1013,18 +972,18 @@ adjust_z_magic (abfd, execp)
/* Note that if page_size == zmagic_disk_block_size, then
filepos == page_size, and this case is the same as the ztih
case. */
- text_end = obj_textsec (abfd)->_raw_size;
+ text_end = obj_textsec (abfd)->size;
text_pad += BFD_ALIGN (text_end, adata (abfd).page_size) - text_end;
text_end += obj_textsec (abfd)->filepos;
}
- obj_textsec (abfd)->_raw_size += text_pad;
+ obj_textsec (abfd)->size += text_pad;
text_end += text_pad;
/* Data. */
if (!obj_datasec (abfd)->user_set_vma)
{
bfd_vma vma;
- vma = obj_textsec (abfd)->vma + obj_textsec (abfd)->_raw_size;
+ vma = obj_textsec (abfd)->vma + obj_textsec (abfd)->size;
obj_datasec (abfd)->vma = BFD_ALIGN (vma, adata (abfd).segment_size);
}
if (abdp && abdp->zmagic_mapped_contiguous)
@@ -1032,17 +991,17 @@ adjust_z_magic (abfd, execp)
asection * text = obj_textsec (abfd);
asection * data = obj_datasec (abfd);
- text_pad = data->vma - (text->vma + text->_raw_size);
+ text_pad = data->vma - (text->vma + text->size);
/* Only pad the text section if the data
section is going to be placed after it. */
if (text_pad > 0)
- text->_raw_size += text_pad;
+ text->size += text_pad;
}
obj_datasec (abfd)->filepos = (obj_textsec (abfd)->filepos
- + obj_textsec (abfd)->_raw_size);
+ + obj_textsec (abfd)->size);
/* Fix up exec header while we're at it. */
- execp->a_text = obj_textsec (abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->size;
if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
execp->a_text += adata (abfd).exec_bytes_size;
if (obj_aout_subformat (abfd) == q_magic_format)
@@ -1051,17 +1010,17 @@ adjust_z_magic (abfd, execp)
N_SET_MAGIC (*execp, ZMAGIC);
/* Spec says data section should be rounded up to page boundary. */
- obj_datasec (abfd)->_raw_size
- = align_power (obj_datasec (abfd)->_raw_size,
+ obj_datasec (abfd)->size
+ = align_power (obj_datasec (abfd)->size,
obj_bsssec (abfd)->alignment_power);
- execp->a_data = BFD_ALIGN (obj_datasec (abfd)->_raw_size,
+ execp->a_data = BFD_ALIGN (obj_datasec (abfd)->size,
adata (abfd).page_size);
- data_pad = execp->a_data - obj_datasec (abfd)->_raw_size;
+ data_pad = execp->a_data - obj_datasec (abfd)->size;
/* BSS. */
if (!obj_bsssec (abfd)->user_set_vma)
obj_bsssec (abfd)->vma = (obj_datasec (abfd)->vma
- + obj_datasec (abfd)->_raw_size);
+ + obj_datasec (abfd)->size);
/* If the BSS immediately follows the data section and extra space
in the page is left after the data section, fudge data
in the header so that the bss section looks smaller by that
@@ -1070,17 +1029,15 @@ adjust_z_magic (abfd, execp)
could have explicitly set the BSS vma to immediately follow
the data section.) */
if (align_power (obj_bsssec (abfd)->vma, obj_bsssec (abfd)->alignment_power)
- == obj_datasec (abfd)->vma + obj_datasec (abfd)->_raw_size)
- execp->a_bss = (data_pad > obj_bsssec (abfd)->_raw_size
- ? 0 : obj_bsssec (abfd)->_raw_size - data_pad);
+ == obj_datasec (abfd)->vma + obj_datasec (abfd)->size)
+ execp->a_bss = (data_pad > obj_bsssec (abfd)->size
+ ? 0 : obj_bsssec (abfd)->size - data_pad);
else
- execp->a_bss = obj_bsssec (abfd)->_raw_size;
+ execp->a_bss = obj_bsssec (abfd)->size;
}
static void
-adjust_n_magic (abfd, execp)
- bfd *abfd;
- struct internal_exec *execp;
+adjust_n_magic (bfd *abfd, struct internal_exec *execp)
{
file_ptr pos = adata (abfd).exec_bytes_size;
bfd_vma vma = 0;
@@ -1092,8 +1049,8 @@ adjust_n_magic (abfd, execp)
obj_textsec (abfd)->vma = vma;
else
vma = obj_textsec (abfd)->vma;
- pos += obj_textsec (abfd)->_raw_size;
- vma += obj_textsec (abfd)->_raw_size;
+ pos += obj_textsec (abfd)->size;
+ vma += obj_textsec (abfd)->size;
/* Data. */
obj_datasec (abfd)->filepos = pos;
@@ -1102,10 +1059,10 @@ adjust_n_magic (abfd, execp)
vma = obj_datasec (abfd)->vma;
/* Since BSS follows data immediately, see if it needs alignment. */
- vma += obj_datasec (abfd)->_raw_size;
+ vma += obj_datasec (abfd)->size;
pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
- obj_datasec (abfd)->_raw_size += pad;
- pos += obj_datasec (abfd)->_raw_size;
+ obj_datasec (abfd)->size += pad;
+ pos += obj_datasec (abfd)->size;
/* BSS. */
if (!obj_bsssec (abfd)->user_set_vma)
@@ -1114,31 +1071,30 @@ adjust_n_magic (abfd, execp)
vma = obj_bsssec (abfd)->vma;
/* Fix up exec header. */
- execp->a_text = obj_textsec (abfd)->_raw_size;
- execp->a_data = obj_datasec (abfd)->_raw_size;
- execp->a_bss = obj_bsssec (abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->size;
+ execp->a_data = obj_datasec (abfd)->size;
+ execp->a_bss = obj_bsssec (abfd)->size;
N_SET_MAGIC (*execp, NMAGIC);
}
bfd_boolean
-NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
- bfd *abfd;
- bfd_size_type *text_size;
- file_ptr *text_end ATTRIBUTE_UNUSED;
+NAME (aout, adjust_sizes_and_vmas) (bfd *abfd,
+ bfd_size_type *text_size,
+ file_ptr *text_end ATTRIBUTE_UNUSED)
{
struct internal_exec *execp = exec_hdr (abfd);
- if (! NAME(aout,make_sections) (abfd))
+ if (! NAME (aout, make_sections) (abfd))
return FALSE;
if (adata (abfd).magic != undecided_magic)
return TRUE;
- obj_textsec (abfd)->_raw_size =
- align_power (obj_textsec (abfd)->_raw_size,
+ obj_textsec (abfd)->size =
+ align_power (obj_textsec (abfd)->size,
obj_textsec (abfd)->alignment_power);
- *text_size = obj_textsec (abfd)->_raw_size;
+ *text_size = obj_textsec (abfd)->size;
/* Rule (heuristic) for when to pad to a new page. Note that there
are (at least) two ways demand-paged (ZMAGIC) files have been
handled. Most Berkeley-based systems start the text segment at
@@ -1176,11 +1132,11 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
}
str;
}),
- obj_textsec (abfd)->vma, obj_textsec (abfd)->_raw_size,
+ obj_textsec (abfd)->vma, obj_textsec (abfd)->size,
obj_textsec (abfd)->alignment_power,
- obj_datasec (abfd)->vma, obj_datasec (abfd)->_raw_size,
+ obj_datasec (abfd)->vma, obj_datasec (abfd)->size,
obj_datasec (abfd)->alignment_power,
- obj_bsssec (abfd)->vma, obj_bsssec (abfd)->_raw_size,
+ obj_bsssec (abfd)->vma, obj_bsssec (abfd)->size,
obj_bsssec (abfd)->alignment_power);
#endif
#endif
@@ -1202,11 +1158,11 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
#ifdef BFD_AOUT_DEBUG
fprintf (stderr, " text=<%x,%x,%x> data=<%x,%x,%x> bss=<%x,%x>\n",
- obj_textsec (abfd)->vma, obj_textsec (abfd)->_raw_size,
+ obj_textsec (abfd)->vma, obj_textsec (abfd)->size,
obj_textsec (abfd)->filepos,
- obj_datasec (abfd)->vma, obj_datasec (abfd)->_raw_size,
+ obj_datasec (abfd)->vma, obj_datasec (abfd)->size,
obj_datasec (abfd)->filepos,
- obj_bsssec (abfd)->vma, obj_bsssec (abfd)->_raw_size);
+ obj_bsssec (abfd)->vma, obj_bsssec (abfd)->size);
#endif
return TRUE;
@@ -1219,16 +1175,14 @@ FUNCTION
SYNOPSIS
bfd_boolean aout_@var{size}_new_section_hook,
(bfd *abfd,
- asection *newsect));
+ asection *newsect);
DESCRIPTION
Called by the BFD in response to a @code{bfd_make_section}
request.
*/
bfd_boolean
-NAME(aout,new_section_hook) (abfd, newsect)
- bfd *abfd;
- asection *newsect;
+NAME (aout, new_section_hook) (bfd *abfd, asection *newsect)
{
/* Align to double at least. */
newsect->alignment_power = bfd_get_arch_info (abfd)->section_align_power;
@@ -1262,19 +1216,18 @@ NAME(aout,new_section_hook) (abfd, newsect)
}
bfd_boolean
-NAME(aout,set_section_contents) (abfd, section, location, offset, count)
- bfd *abfd;
- sec_ptr section;
- const PTR location;
- file_ptr offset;
- bfd_size_type count;
+NAME (aout, set_section_contents) (bfd *abfd,
+ sec_ptr section,
+ const void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
file_ptr text_end;
bfd_size_type text_size;
if (! abfd->output_has_begun)
{
- if (! NAME(aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
+ if (! NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
return FALSE;
}
@@ -1313,10 +1266,9 @@ NAME(aout,set_section_contents) (abfd, section, location, offset, count)
/* Read the external symbols from an a.out file. */
static bfd_boolean
-aout_get_external_symbols (abfd)
- bfd *abfd;
+aout_get_external_symbols (bfd *abfd)
{
- if (obj_aout_external_syms (abfd) == (struct external_nlist *) NULL)
+ if (obj_aout_external_syms (abfd) == NULL)
{
bfd_size_type count;
struct external_nlist *syms;
@@ -1334,9 +1286,8 @@ aout_get_external_symbols (abfd)
/* We allocate using malloc to make the values easy to free
later on. If we put them on the objalloc it might not be
possible to free them. */
- syms = ((struct external_nlist *)
- bfd_malloc (count * EXTERNAL_NLIST_SIZE));
- if (syms == (struct external_nlist *) NULL && count != 0)
+ syms = bfd_malloc (count * EXTERNAL_NLIST_SIZE);
+ if (syms == NULL && count != 0)
return FALSE;
amt = exec_hdr (abfd)->a_syms;
@@ -1362,7 +1313,7 @@ aout_get_external_symbols (abfd)
/* Get the size of the strings. */
if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0
- || bfd_bread ((PTR) string_chars, amt, abfd) != amt)
+ || bfd_bread ((void *) string_chars, amt, abfd) != amt)
return FALSE;
stringsize = GET_WORD (abfd, string_chars);
@@ -1372,7 +1323,7 @@ aout_get_external_symbols (abfd)
return FALSE;
strings = (char *) obj_aout_string_window (abfd).data;
#else
- strings = (char *) bfd_malloc (stringsize + 1);
+ strings = bfd_malloc (stringsize + 1);
if (strings == NULL)
return FALSE;
@@ -1404,9 +1355,7 @@ aout_get_external_symbols (abfd)
symbol->flags and symbol->section, and adjusting symbol->value. */
static bfd_boolean
-translate_from_native_sym_flags (abfd, cache_ptr)
- bfd *abfd;
- aout_symbol_type *cache_ptr;
+translate_from_native_sym_flags (bfd *abfd, aout_symbol_type *cache_ptr)
{
flagword visible;
@@ -1505,88 +1454,6 @@ translate_from_native_sym_flags (abfd, cache_ptr)
/* This code is no longer needed. It used to be used to make
the linker handle set symbols, but they are now handled in
the add_symbols routine instead. */
-#if 0
- asection *section;
- arelent_chain *reloc;
- asection *into_section;
- bfd_size_type amt;
-
- /* This is a set symbol. The name of the symbol is the name
- of the set (e.g., __CTOR_LIST__). The value of the symbol
- is the value to add to the set. We create a section with
- the same name as the symbol, and add a reloc to insert the
- appropriate value into the section.
-
- This action is actually obsolete; it used to make the
- linker do the right thing, but the linker no longer uses
- this function. */
-
- section = bfd_get_section_by_name (abfd, cache_ptr->symbol.name);
- if (section == NULL)
- {
- char *copy;
-
- amt = strlen (cache_ptr->symbol.name) + 1;
- copy = bfd_alloc (abfd, amt);
- if (copy == NULL)
- return FALSE;
-
- strcpy (copy, cache_ptr->symbol.name);
- section = bfd_make_section (abfd, copy);
- if (section == NULL)
- return FALSE;
- }
-
- amt = sizeof (arelent_chain);
- reloc = (arelent_chain *) bfd_alloc (abfd, amt);
- if (reloc == NULL)
- return FALSE;
-
- /* Build a relocation entry for the constructor. */
- switch (cache_ptr->type & N_TYPE)
- {
- case N_SETA:
- into_section = bfd_abs_section_ptr;
- cache_ptr->type = N_ABS;
- break;
- case N_SETT:
- into_section = obj_textsec (abfd);
- cache_ptr->type = N_TEXT;
- break;
- case N_SETD:
- into_section = obj_datasec (abfd);
- cache_ptr->type = N_DATA;
- break;
- case N_SETB:
- into_section = obj_bsssec (abfd);
- cache_ptr->type = N_BSS;
- break;
- }
-
- /* Build a relocation pointing into the constructor section
- pointing at the symbol in the set vector specified. */
- reloc->relent.addend = cache_ptr->symbol.value;
- cache_ptr->symbol.section = into_section;
- reloc->relent.sym_ptr_ptr = into_section->symbol_ptr_ptr;
-
- /* We modify the symbol to belong to a section depending upon
- the name of the symbol, and add to the size of the section
- to contain a pointer to the symbol. Build a reloc entry to
- relocate to this symbol attached to this section. */
- section->flags = SEC_CONSTRUCTOR | SEC_RELOC;
-
- section->reloc_count++;
- section->alignment_power = 2;
-
- reloc->next = section->constructor_chain;
- section->constructor_chain = reloc;
- reloc->relent.address = section->_raw_size;
- section->_raw_size += BYTES_IN_WORD;
-
- reloc->relent.howto = CTOR_TABLE_RELOC_HOWTO (abfd);
-
-#endif /* 0 */
-
switch (cache_ptr->type & N_TYPE)
{
case N_SETA:
@@ -1659,10 +1526,9 @@ translate_from_native_sym_flags (abfd, cache_ptr)
/* Set the fields of SYM_POINTER according to CACHE_PTR. */
static bfd_boolean
-translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
- bfd *abfd;
- asymbol *cache_ptr;
- struct external_nlist *sym_pointer;
+translate_to_native_sym_flags (bfd *abfd,
+ asymbol *cache_ptr,
+ struct external_nlist *sym_pointer)
{
bfd_vma value = cache_ptr->value;
asection *sec;
@@ -1772,11 +1638,11 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
/* Native-level interface to symbols. */
asymbol *
-NAME(aout,make_empty_symbol) (abfd)
- bfd *abfd;
+NAME (aout, make_empty_symbol) (bfd *abfd)
{
bfd_size_type amt = sizeof (aout_symbol_type);
- aout_symbol_type *new = (aout_symbol_type *) bfd_zalloc (abfd, amt);
+
+ aout_symbol_type *new = bfd_zalloc (abfd, amt);
if (!new)
return NULL;
new->symbol.the_bfd = abfd;
@@ -1787,14 +1653,13 @@ NAME(aout,make_empty_symbol) (abfd)
/* Translate a set of internal symbols into external symbols. */
bfd_boolean
-NAME(aout,translate_symbol_table) (abfd, in, ext, count, str, strsize, dynamic)
- bfd *abfd;
- aout_symbol_type *in;
- struct external_nlist *ext;
- bfd_size_type count;
- char *str;
- bfd_size_type strsize;
- bfd_boolean dynamic;
+NAME (aout, translate_symbol_table) (bfd *abfd,
+ aout_symbol_type *in,
+ struct external_nlist *ext,
+ bfd_size_type count,
+ char *str,
+ bfd_size_type strsize,
+ bfd_boolean dynamic)
{
struct external_nlist *ext_end;
@@ -1839,15 +1704,14 @@ NAME(aout,translate_symbol_table) (abfd, in, ext, count, str, strsize, dynamic)
hold them all plus all the cached symbol entries. */
bfd_boolean
-NAME(aout,slurp_symbol_table) (abfd)
- bfd *abfd;
+NAME (aout, slurp_symbol_table) (bfd *abfd)
{
struct external_nlist *old_external_syms;
aout_symbol_type *cached;
bfd_size_type cached_size;
/* If there's no work to be done, don't do any. */
- if (obj_aout_symbols (abfd) != (aout_symbol_type *) NULL)
+ if (obj_aout_symbols (abfd) != NULL)
return TRUE;
old_external_syms = obj_aout_external_syms (abfd);
@@ -1857,12 +1721,12 @@ NAME(aout,slurp_symbol_table) (abfd)
cached_size = obj_aout_external_sym_count (abfd);
cached_size *= sizeof (aout_symbol_type);
- cached = (aout_symbol_type *) bfd_zmalloc (cached_size);
+ cached = bfd_zmalloc (cached_size);
if (cached == NULL && cached_size != 0)
return FALSE;
/* Convert from external symbol information to internal. */
- if (! (NAME(aout,translate_symbol_table)
+ if (! (NAME (aout, translate_symbol_table)
(abfd, cached,
obj_aout_external_syms (abfd),
obj_aout_external_sym_count (abfd),
@@ -1882,8 +1746,8 @@ NAME(aout,slurp_symbol_table) (abfd)
want the external symbol information, so if it was allocated
because of our call to aout_get_external_symbols, we free it up
right away to save space. */
- if (old_external_syms == (struct external_nlist *) NULL
- && obj_aout_external_syms (abfd) != (struct external_nlist *) NULL)
+ if (old_external_syms == NULL
+ && obj_aout_external_syms (abfd) != NULL)
{
#ifdef USE_MMAP
bfd_free_window (&obj_aout_sym_window (abfd));
@@ -1905,20 +1769,14 @@ NAME(aout,slurp_symbol_table) (abfd)
This hash table code breaks dbx on SunOS 4.1.3, so we don't do it
if BFD_TRADITIONAL_FORMAT is set. */
-static bfd_size_type add_to_stringtab
- PARAMS ((bfd *, struct bfd_strtab_hash *, const char *, bfd_boolean));
-static bfd_boolean emit_stringtab
- PARAMS ((bfd *, struct bfd_strtab_hash *));
-
/* Get the index of a string in a strtab, adding it if it is not
already present. */
-static INLINE bfd_size_type
-add_to_stringtab (abfd, tab, str, copy)
- bfd *abfd;
- struct bfd_strtab_hash *tab;
- const char *str;
- bfd_boolean copy;
+static inline bfd_size_type
+add_to_stringtab (bfd *abfd,
+ struct bfd_strtab_hash *tab,
+ const char *str,
+ bfd_boolean copy)
{
bfd_boolean hash;
bfd_size_type index;
@@ -1936,11 +1794,9 @@ add_to_stringtab (abfd, tab, str, copy)
index = _bfd_stringtab_add (tab, str, hash, copy);
if (index != (bfd_size_type) -1)
- {
- /* Add BYTES_IN_WORD to the return value to account for the
- space taken up by the string table size. */
- index += BYTES_IN_WORD;
- }
+ /* Add BYTES_IN_WORD to the return value to account for the
+ space taken up by the string table size. */
+ index += BYTES_IN_WORD;
return index;
}
@@ -1949,24 +1805,21 @@ add_to_stringtab (abfd, tab, str, copy)
file. */
static bfd_boolean
-emit_stringtab (abfd, tab)
- register bfd *abfd;
- struct bfd_strtab_hash *tab;
+emit_stringtab (bfd *abfd, struct bfd_strtab_hash *tab)
{
bfd_byte buffer[BYTES_IN_WORD];
bfd_size_type amt = BYTES_IN_WORD;
/* The string table starts with the size. */
PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer);
- if (bfd_bwrite ((PTR) buffer, amt, abfd) != amt)
+ if (bfd_bwrite ((void *) buffer, amt, abfd) != amt)
return FALSE;
return _bfd_stringtab_emit (abfd, tab);
}
bfd_boolean
-NAME(aout,write_syms) (abfd)
- bfd *abfd;
+NAME (aout, write_syms) (bfd *abfd)
{
unsigned int count ;
asymbol **generic = bfd_get_outsymbols (abfd);
@@ -2005,7 +1858,7 @@ NAME(aout,write_syms) (abfd)
goto error_return;
amt = EXTERNAL_NLIST_SIZE;
- if (bfd_bwrite ((PTR) &nsp, amt, abfd) != amt)
+ if (bfd_bwrite ((void *) &nsp, amt, abfd) != amt)
goto error_return;
/* NB: `KEEPIT' currently overlays `udata.p', so set this only
@@ -2026,35 +1879,32 @@ error_return:
}
long
-NAME(aout,canonicalize_symtab) (abfd, location)
- bfd *abfd;
- asymbol **location;
+NAME (aout, canonicalize_symtab) (bfd *abfd, asymbol **location)
{
- unsigned int counter = 0;
- aout_symbol_type *symbase;
+ unsigned int counter = 0;
+ aout_symbol_type *symbase;
- if (!NAME(aout,slurp_symbol_table) (abfd))
- return -1;
+ if (!NAME (aout, slurp_symbol_table) (abfd))
+ return -1;
- for (symbase = obj_aout_symbols (abfd);
- counter++ < bfd_get_symcount (abfd);
- )
- *(location++) = (asymbol *) (symbase++);
- *location++ =0;
- return bfd_get_symcount (abfd);
+ for (symbase = obj_aout_symbols (abfd);
+ counter++ < bfd_get_symcount (abfd);
+ )
+ *(location++) = (asymbol *) (symbase++);
+ *location++ =0;
+ return bfd_get_symcount (abfd);
}
/* Standard reloc stuff. */
/* Output standard relocation information to a file in target byte order. */
-extern void NAME(aout,swap_std_reloc_out)
- PARAMS ((bfd *, arelent *, struct reloc_std_external *));
+extern void NAME (aout, swap_std_reloc_out)
+ (bfd *, arelent *, struct reloc_std_external *);
void
-NAME(aout,swap_std_reloc_out) (abfd, g, natptr)
- bfd *abfd;
- arelent *g;
- struct reloc_std_external *natptr;
+NAME (aout, swap_std_reloc_out) (bfd *abfd,
+ arelent *g,
+ struct reloc_std_external *natptr)
{
int r_index;
asymbol *sym = *(g->sym_ptr_ptr);
@@ -2073,11 +1923,6 @@ NAME(aout,swap_std_reloc_out) (abfd, g, natptr)
r_jmptable = (g->howto->type & 16) != 0;
r_relative = (g->howto->type & 32) != 0;
-#if 0
- /* For a standard reloc, the addend is in the object file. */
- r_addend = g->addend + (*(g->sym_ptr_ptr))->section->output_section->vma;
-#endif
-
/* Name was clobbered by aout_write_syms to be symbol index. */
/* If this relocation is relative to a symbol then set the
@@ -2142,14 +1987,13 @@ NAME(aout,swap_std_reloc_out) (abfd, g, natptr)
/* Extended stuff. */
/* Output extended relocation information to a file in target byte order. */
-extern void NAME(aout,swap_ext_reloc_out)
- PARAMS ((bfd *, arelent *, struct reloc_ext_external *));
+extern void NAME (aout, swap_ext_reloc_out)
+ (bfd *, arelent *, struct reloc_ext_external *);
void
-NAME(aout,swap_ext_reloc_out) (abfd, g, natptr)
- bfd *abfd;
- arelent *g;
- register struct reloc_ext_external *natptr;
+NAME (aout, swap_ext_reloc_out) (bfd *abfd,
+ arelent *g,
+ struct reloc_ext_external *natptr)
{
int r_index;
int r_extern;
@@ -2260,12 +2104,11 @@ NAME(aout,swap_ext_reloc_out) (abfd, g, natptr)
}
void
-NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
- bfd *abfd;
- struct reloc_ext_external *bytes;
- arelent *cache_ptr;
- asymbol **symbols;
- bfd_size_type symcount;
+NAME (aout, swap_ext_reloc_in) (bfd *abfd,
+ struct reloc_ext_external *bytes,
+ arelent *cache_ptr,
+ asymbol **symbols,
+ bfd_size_type symcount)
{
unsigned int r_index;
int r_extern;
@@ -2316,12 +2159,11 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
}
void
-NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
- bfd *abfd;
- struct reloc_std_external *bytes;
- arelent *cache_ptr;
- asymbol **symbols;
- bfd_size_type symcount;
+NAME (aout, swap_std_reloc_in) (bfd *abfd,
+ struct reloc_std_external *bytes,
+ arelent *cache_ptr,
+ asymbol **symbols,
+ bfd_size_type symcount)
{
unsigned int r_index;
int r_extern;
@@ -2387,14 +2229,11 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
/* Read and swap the relocs for a section. */
bfd_boolean
-NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
- bfd *abfd;
- sec_ptr asect;
- asymbol **symbols;
+NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols)
{
bfd_size_type count;
bfd_size_type reloc_size;
- PTR relocs;
+ void * relocs;
arelent *reloc_cache;
size_t each_size;
unsigned int counter = 0;
@@ -2427,7 +2266,7 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
count = reloc_size / each_size;
amt = count * sizeof (arelent);
- reloc_cache = (arelent *) bfd_zmalloc (amt);
+ reloc_cache = bfd_zmalloc (amt);
if (reloc_cache == NULL && count != 0)
return FALSE;
@@ -2474,9 +2313,7 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
/* Write out a relocation section into an object file. */
bfd_boolean
-NAME(aout,squirt_out_relocs) (abfd, section)
- bfd *abfd;
- asection *section;
+NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section)
{
arelent **generic;
unsigned char *native, *natptr;
@@ -2490,7 +2327,7 @@ NAME(aout,squirt_out_relocs) (abfd, section)
each_size = obj_reloc_entry_size (abfd);
natsize = (bfd_size_type) each_size * count;
- native = (unsigned char *) bfd_zalloc (abfd, natsize);
+ native = bfd_zalloc (abfd, natsize);
if (!native)
return FALSE;
@@ -2513,7 +2350,7 @@ NAME(aout,squirt_out_relocs) (abfd, section)
(struct reloc_std_external *) natptr);
}
- if (bfd_bwrite ((PTR) native, natsize, abfd) != natsize)
+ if (bfd_bwrite ((void *) native, natsize, abfd) != natsize)
{
bfd_release (abfd, native);
return FALSE;
@@ -2526,11 +2363,10 @@ NAME(aout,squirt_out_relocs) (abfd, section)
/* This is stupid. This function should be a boolean predicate. */
long
-NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols)
- bfd *abfd;
- sec_ptr section;
- arelent **relptr;
- asymbol **symbols;
+NAME (aout, canonicalize_reloc) (bfd *abfd,
+ sec_ptr section,
+ arelent **relptr,
+ asymbol **symbols)
{
arelent *tblptr = section->relocation;
unsigned int count;
@@ -2541,7 +2377,7 @@ NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols)
return 0;
}
- if (!(tblptr || NAME(aout,slurp_reloc_table) (abfd, section, symbols)))
+ if (!(tblptr || NAME (aout, slurp_reloc_table) (abfd, section, symbols)))
return -1;
if (section->flags & SEC_CONSTRUCTOR)
@@ -2568,9 +2404,7 @@ NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols)
}
long
-NAME(aout,get_reloc_upper_bound) (abfd, asect)
- bfd *abfd;
- sec_ptr asect;
+NAME (aout, get_reloc_upper_bound) (bfd *abfd, sec_ptr asect)
{
if (bfd_get_format (abfd) != bfd_object)
{
@@ -2579,17 +2413,17 @@ NAME(aout,get_reloc_upper_bound) (abfd, asect)
}
if (asect->flags & SEC_CONSTRUCTOR)
- return (sizeof (arelent *) * (asect->reloc_count+1));
+ return sizeof (arelent *) * (asect->reloc_count + 1);
if (asect == obj_datasec (abfd))
- return (sizeof (arelent *)
- * ((exec_hdr (abfd)->a_drsize / obj_reloc_entry_size (abfd))
- + 1));
+ return sizeof (arelent *)
+ * ((exec_hdr (abfd)->a_drsize / obj_reloc_entry_size (abfd))
+ + 1);
if (asect == obj_textsec (abfd))
- return (sizeof (arelent *)
- * ((exec_hdr (abfd)->a_trsize / obj_reloc_entry_size (abfd))
- + 1));
+ return sizeof (arelent *)
+ * ((exec_hdr (abfd)->a_trsize / obj_reloc_entry_size (abfd))
+ + 1);
if (asect == obj_bsssec (abfd))
return sizeof (arelent *);
@@ -2602,28 +2436,25 @@ NAME(aout,get_reloc_upper_bound) (abfd, asect)
}
long
-NAME(aout,get_symtab_upper_bound) (abfd)
- bfd *abfd;
+NAME (aout, get_symtab_upper_bound) (bfd *abfd)
{
- if (!NAME(aout,slurp_symbol_table) (abfd))
+ if (!NAME (aout, slurp_symbol_table) (abfd))
return -1;
return (bfd_get_symcount (abfd)+1) * (sizeof (aout_symbol_type *));
}
alent *
-NAME(aout,get_lineno) (ignore_abfd, ignore_symbol)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- asymbol *ignore_symbol ATTRIBUTE_UNUSED;
+NAME (aout, get_lineno) (bfd *ignore_abfd ATTRIBUTE_UNUSED,
+ asymbol *ignore_symbol ATTRIBUTE_UNUSED)
{
- return (alent *)NULL;
+ return NULL;
}
void
-NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- asymbol *symbol;
- symbol_info *ret;
+NAME (aout, get_symbol_info) (bfd *ignore_abfd ATTRIBUTE_UNUSED,
+ asymbol *symbol,
+ symbol_info *ret)
{
bfd_symbol_info (symbol, ret);
@@ -2647,11 +2478,10 @@ NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
}
void
-NAME(aout,print_symbol) (abfd, afile, symbol, how)
- bfd *abfd;
- PTR afile;
- asymbol *symbol;
- bfd_print_symbol_type how;
+NAME (aout, print_symbol) (bfd *abfd,
+ void * afile,
+ asymbol *symbol,
+ bfd_print_symbol_type how)
{
FILE *file = (FILE *)afile;
@@ -2671,7 +2501,7 @@ NAME(aout,print_symbol) (abfd, afile, symbol, how)
{
const char *section_name = symbol->section->name;
- bfd_print_symbol_vandf (abfd, (PTR)file, symbol);
+ bfd_print_symbol_vandf (abfd, (void *)file, symbol);
fprintf (file," %-5s %04x %02x %02x",
section_name,
@@ -2695,18 +2525,15 @@ NAME(aout,print_symbol) (abfd, afile, symbol, how)
BFD asymbol structures. */
long
-NAME(aout,read_minisymbols) (abfd, dynamic, minisymsp, sizep)
- bfd *abfd;
- bfd_boolean dynamic;
- PTR *minisymsp;
- unsigned int *sizep;
+NAME (aout, read_minisymbols) (bfd *abfd,
+ bfd_boolean dynamic,
+ void * *minisymsp,
+ unsigned int *sizep)
{
if (dynamic)
- {
- /* We could handle the dynamic symbols here as well, but it's
- easier to hand them off. */
- return _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep);
- }
+ /* We could handle the dynamic symbols here as well, but it's
+ easier to hand them off. */
+ return _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep);
if (! aout_get_external_symbols (abfd))
return -1;
@@ -2714,7 +2541,7 @@ NAME(aout,read_minisymbols) (abfd, dynamic, minisymsp, sizep)
if (obj_aout_external_sym_count (abfd) < MINISYM_THRESHOLD)
return _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep);
- *minisymsp = (PTR) obj_aout_external_syms (abfd);
+ *minisymsp = (void *) obj_aout_external_syms (abfd);
/* By passing the external symbols back from this routine, we are
giving up control over the memory block. Clear
@@ -2731,11 +2558,10 @@ NAME(aout,read_minisymbols) (abfd, dynamic, minisymsp, sizep)
by bfd_make_empty_symbol, which we fill in here. */
asymbol *
-NAME(aout,minisymbol_to_symbol) (abfd, dynamic, minisym, sym)
- bfd *abfd;
- bfd_boolean dynamic;
- const PTR minisym;
- asymbol *sym;
+NAME (aout, minisymbol_to_symbol) (bfd *abfd,
+ bfd_boolean dynamic,
+ const void * minisym,
+ asymbol *sym)
{
if (dynamic
|| obj_aout_external_sym_count (abfd) < MINISYM_THRESHOLD)
@@ -2744,7 +2570,7 @@ NAME(aout,minisymbol_to_symbol) (abfd, dynamic, minisym, sym)
memset (sym, 0, sizeof (aout_symbol_type));
/* We call translate_symbol_table to translate a single symbol. */
- if (! (NAME(aout,translate_symbol_table)
+ if (! (NAME (aout, translate_symbol_table)
(abfd,
(aout_symbol_type *) sym,
(struct external_nlist *) minisym,
@@ -2762,22 +2588,20 @@ NAME(aout,minisymbol_to_symbol) (abfd, dynamic, minisym, sym)
wanted location. */
bfd_boolean
-NAME(aout,find_nearest_line)
- (abfd, section, symbols, offset, filename_ptr, functionname_ptr, line_ptr)
- bfd *abfd;
- asection *section;
- asymbol **symbols;
- bfd_vma offset;
- const char **filename_ptr;
- const char **functionname_ptr;
- unsigned int *line_ptr;
+NAME (aout, find_nearest_line) (bfd *abfd,
+ asection *section,
+ asymbol **symbols,
+ bfd_vma offset,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
{
/* Run down the file looking for the filename, function and linenumber. */
asymbol **p;
const char *directory_name = NULL;
const char *main_file_name = NULL;
const char *current_file_name = NULL;
- const char *line_file_name = NULL; /* Value of current_file_name at line number. */
+ const char *line_file_name = NULL; /* Value of current_file_name at line number. */
const char *line_directory_name = NULL; /* Value of directory_name at line number. */
bfd_vma low_line_vma = 0;
bfd_vma low_func_vma = 0;
@@ -2789,7 +2613,7 @@ NAME(aout,find_nearest_line)
*functionname_ptr = 0;
*line_ptr = 0;
- if (symbols != (asymbol **)NULL)
+ if (symbols != NULL)
{
for (p = symbols; *p; p++)
{
@@ -2844,7 +2668,7 @@ NAME(aout,find_nearest_line)
/* Look ahead to next symbol to check if that too is an N_SO. */
p++;
if (*p == NULL)
- break;
+ goto done;
q = (aout_symbol_type *) (*p);
if (q->type != (int)N_SO)
goto next;
@@ -2917,7 +2741,7 @@ NAME(aout,find_nearest_line)
adata (abfd).line_buf = buf = NULL;
else
{
- buf = (char *) bfd_malloc (filelen + funclen + 3);
+ buf = bfd_malloc (filelen + funclen + 3);
adata (abfd).line_buf = buf;
if (buf == NULL)
return FALSE;
@@ -2961,9 +2785,7 @@ NAME(aout,find_nearest_line)
}
int
-NAME(aout,sizeof_headers) (abfd, execable)
- bfd *abfd;
- bfd_boolean execable ATTRIBUTE_UNUSED;
+NAME (aout, sizeof_headers) (bfd *abfd, bfd_boolean execable ATTRIBUTE_UNUSED)
{
return adata (abfd).exec_bytes_size;
}
@@ -2972,8 +2794,7 @@ NAME(aout,sizeof_headers) (abfd, execable)
read it again later if we need it. */
bfd_boolean
-NAME(aout,bfd_free_cached_info) (abfd)
- bfd *abfd;
+NAME (aout, bfd_free_cached_info) (bfd *abfd)
{
asection *o;
@@ -2992,7 +2813,7 @@ NAME(aout,bfd_free_cached_info) (abfd)
BFCI_FREE (obj_aout_external_syms (abfd));
BFCI_FREE (obj_aout_external_strings (abfd));
#endif
- for (o = abfd->sections; o != (asection *) NULL; o = o->next)
+ for (o = abfd->sections; o != NULL; o = o->next)
BFCI_FREE (o->relocation);
#undef BFCI_FREE
@@ -3001,34 +2822,21 @@ NAME(aout,bfd_free_cached_info) (abfd)
/* a.out link code. */
-static bfd_boolean aout_link_add_object_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean aout_link_check_archive_element
- PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean aout_link_free_symbols
- PARAMS ((bfd *));
-static bfd_boolean aout_link_check_ar_symbols
- PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *pneeded));
-static bfd_boolean aout_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-
/* Routine to create an entry in an a.out link hash table. */
struct bfd_hash_entry *
-NAME(aout,link_hash_newfunc) (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+NAME (aout, link_hash_newfunc) (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct aout_link_hash_entry *ret = (struct aout_link_hash_entry *) entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct aout_link_hash_entry *) NULL)
- ret = ((struct aout_link_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct aout_link_hash_entry)));
- if (ret == (struct aout_link_hash_entry *) NULL)
- return (struct bfd_hash_entry *) ret;
+ if (ret == NULL)
+ ret = bfd_hash_allocate (table, sizeof (* ret));
+ if (ret == NULL)
+ return NULL;
/* Call the allocation method of the superclass. */
ret = ((struct aout_link_hash_entry *)
@@ -3047,105 +2855,251 @@ NAME(aout,link_hash_newfunc) (entry, table, string)
/* Initialize an a.out link hash table. */
bfd_boolean
-NAME(aout,link_hash_table_init) (table, abfd, newfunc)
- struct aout_link_hash_table *table;
- bfd *abfd;
- struct bfd_hash_entry *(*newfunc)
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
- const char *));
+NAME (aout, link_hash_table_init) (struct aout_link_hash_table *table,
+ bfd *abfd,
+ struct bfd_hash_entry *(*newfunc)
+ (struct bfd_hash_entry *, struct bfd_hash_table *,
+ const char *),
+ unsigned int entsize)
{
- return _bfd_link_hash_table_init (&table->root, abfd, newfunc);
+ return _bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize);
}
/* Create an a.out link hash table. */
struct bfd_link_hash_table *
-NAME(aout,link_hash_table_create) (abfd)
- bfd *abfd;
+NAME (aout, link_hash_table_create) (bfd *abfd)
{
struct aout_link_hash_table *ret;
- bfd_size_type amt = sizeof (struct aout_link_hash_table);
+ bfd_size_type amt = sizeof (* ret);
- ret = (struct aout_link_hash_table *) bfd_malloc (amt);
+ ret = bfd_malloc (amt);
if (ret == NULL)
- return (struct bfd_link_hash_table *) NULL;
+ return NULL;
- if (! NAME(aout,link_hash_table_init) (ret, abfd,
- NAME(aout,link_hash_newfunc)))
+ if (!NAME (aout, link_hash_table_init) (ret, abfd,
+ NAME (aout, link_hash_newfunc),
+ sizeof (struct aout_link_hash_entry)))
{
free (ret);
- return (struct bfd_link_hash_table *) NULL;
+ return NULL;
}
return &ret->root;
}
-/* Given an a.out BFD, add symbols to the global hash table as
- appropriate. */
+/* Add all symbols from an object file to the hash table. */
-bfd_boolean
-NAME(aout,link_add_symbols) (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+static bfd_boolean
+aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
- switch (bfd_get_format (abfd))
- {
- case bfd_object:
- return aout_link_add_object_symbols (abfd, info);
- case bfd_archive:
- return _bfd_generic_link_add_archive_symbols
- (abfd, info, aout_link_check_archive_element);
- default:
- bfd_set_error (bfd_error_wrong_format);
- return FALSE;
- }
-}
+ bfd_boolean (*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 **);
+ struct external_nlist *syms;
+ bfd_size_type sym_count;
+ char *strings;
+ bfd_boolean copy;
+ struct aout_link_hash_entry **sym_hash;
+ struct external_nlist *p;
+ struct external_nlist *pend;
+ bfd_size_type amt;
-/* Add symbols from an a.out object file. */
+ syms = obj_aout_external_syms (abfd);
+ sym_count = obj_aout_external_sym_count (abfd);
+ strings = obj_aout_external_strings (abfd);
+ if (info->keep_memory)
+ copy = FALSE;
+ else
+ copy = TRUE;
-static bfd_boolean
-aout_link_add_object_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
- if (! aout_get_external_symbols (abfd))
- return FALSE;
- if (! aout_link_add_symbols (abfd, info))
- return FALSE;
- if (! info->keep_memory)
+ if (aout_backend_info (abfd)->add_dynamic_symbols != NULL)
{
- if (! aout_link_free_symbols (abfd))
+ if (! ((*aout_backend_info (abfd)->add_dynamic_symbols)
+ (abfd, info, &syms, &sym_count, &strings)))
return FALSE;
}
- return TRUE;
-}
-/* Check a single archive element to see if we need to include it in
- the link. *PNEEDED is set according to whether this element is
- needed in the link or not. This is called from
- _bfd_generic_link_add_archive_symbols. */
-
-static bfd_boolean
-aout_link_check_archive_element (abfd, info, pneeded)
- bfd *abfd;
- struct bfd_link_info *info;
- bfd_boolean *pneeded;
-{
- if (! aout_get_external_symbols (abfd))
+ /* We keep a list of the linker hash table entries that correspond
+ to particular symbols. We could just look them up in the hash
+ table, but keeping the list is more efficient. Perhaps this
+ should be conditional on info->keep_memory. */
+ amt = sym_count * sizeof (struct aout_link_hash_entry *);
+ sym_hash = bfd_alloc (abfd, amt);
+ if (sym_hash == NULL && sym_count != 0)
return FALSE;
+ obj_aout_sym_hashes (abfd) = sym_hash;
- if (! aout_link_check_ar_symbols (abfd, info, pneeded))
- return FALSE;
+ add_one_symbol = aout_backend_info (abfd)->add_one_symbol;
+ if (add_one_symbol == NULL)
+ add_one_symbol = _bfd_generic_link_add_one_symbol;
- if (*pneeded)
+ p = syms;
+ pend = p + sym_count;
+ for (; p < pend; p++, sym_hash++)
{
- if (! aout_link_add_symbols (abfd, info))
- return FALSE;
- }
+ int type;
+ const char *name;
+ bfd_vma value;
+ asection *section;
+ flagword flags;
+ const char *string;
- if (! info->keep_memory || ! *pneeded)
- {
- if (! aout_link_free_symbols (abfd))
+ *sym_hash = NULL;
+
+ type = H_GET_8 (abfd, p->e_type);
+
+ /* Ignore debugging symbols. */
+ if ((type & N_STAB) != 0)
+ continue;
+
+ name = strings + GET_WORD (abfd, p->e_strx);
+ value = GET_WORD (abfd, p->e_value);
+ flags = BSF_GLOBAL;
+ string = NULL;
+ switch (type)
+ {
+ default:
+ abort ();
+
+ case N_UNDF:
+ case N_ABS:
+ case N_TEXT:
+ case N_DATA:
+ case N_BSS:
+ case N_FN_SEQ:
+ case N_COMM:
+ case N_SETV:
+ case N_FN:
+ /* Ignore symbols that are not externally visible. */
+ continue;
+ case N_INDR:
+ /* Ignore local indirect symbol. */
+ ++p;
+ ++sym_hash;
+ continue;
+
+ case N_UNDF | N_EXT:
+ if (value == 0)
+ {
+ section = bfd_und_section_ptr;
+ flags = 0;
+ }
+ else
+ section = bfd_com_section_ptr;
+ break;
+ case N_ABS | N_EXT:
+ section = bfd_abs_section_ptr;
+ break;
+ case N_TEXT | N_EXT:
+ section = obj_textsec (abfd);
+ value -= bfd_get_section_vma (abfd, section);
+ break;
+ case N_DATA | N_EXT:
+ case N_SETV | N_EXT:
+ /* Treat N_SETV symbols as N_DATA symbol; see comment in
+ translate_from_native_sym_flags. */
+ section = obj_datasec (abfd);
+ value -= bfd_get_section_vma (abfd, section);
+ break;
+ case N_BSS | N_EXT:
+ section = obj_bsssec (abfd);
+ value -= bfd_get_section_vma (abfd, section);
+ break;
+ case N_INDR | N_EXT:
+ /* An indirect symbol. The next symbol is the symbol
+ which this one really is. */
+ BFD_ASSERT (p + 1 < pend);
+ ++p;
+ string = strings + GET_WORD (abfd, p->e_strx);
+ section = bfd_ind_section_ptr;
+ flags |= BSF_INDIRECT;
+ break;
+ case N_COMM | N_EXT:
+ section = bfd_com_section_ptr;
+ break;
+ case N_SETA: case N_SETA | N_EXT:
+ section = bfd_abs_section_ptr;
+ flags |= BSF_CONSTRUCTOR;
+ break;
+ case N_SETT: case N_SETT | N_EXT:
+ section = obj_textsec (abfd);
+ flags |= BSF_CONSTRUCTOR;
+ value -= bfd_get_section_vma (abfd, section);
+ break;
+ case N_SETD: case N_SETD | N_EXT:
+ section = obj_datasec (abfd);
+ flags |= BSF_CONSTRUCTOR;
+ value -= bfd_get_section_vma (abfd, section);
+ break;
+ case N_SETB: case N_SETB | N_EXT:
+ section = obj_bsssec (abfd);
+ flags |= BSF_CONSTRUCTOR;
+ value -= bfd_get_section_vma (abfd, section);
+ break;
+ case N_WARNING:
+ /* A warning symbol. The next symbol is the one to warn
+ about. If there is no next symbol, just look away. */
+ if (p + 1 >= pend)
+ return TRUE;
+ ++p;
+ string = name;
+ name = strings + GET_WORD (abfd, p->e_strx);
+ section = bfd_und_section_ptr;
+ flags |= BSF_WARNING;
+ break;
+ case N_WEAKU:
+ section = bfd_und_section_ptr;
+ flags = BSF_WEAK;
+ break;
+ case N_WEAKA:
+ section = bfd_abs_section_ptr;
+ flags = BSF_WEAK;
+ break;
+ case N_WEAKT:
+ section = obj_textsec (abfd);
+ value -= bfd_get_section_vma (abfd, section);
+ flags = BSF_WEAK;
+ break;
+ case N_WEAKD:
+ section = obj_datasec (abfd);
+ value -= bfd_get_section_vma (abfd, section);
+ flags = BSF_WEAK;
+ break;
+ case N_WEAKB:
+ section = obj_bsssec (abfd);
+ value -= bfd_get_section_vma (abfd, section);
+ flags = BSF_WEAK;
+ break;
+ }
+
+ if (! ((*add_one_symbol)
+ (info, abfd, name, flags, section, value, string, copy, FALSE,
+ (struct bfd_link_hash_entry **) sym_hash)))
return FALSE;
+
+ /* Restrict the maximum alignment of a common symbol based on
+ the architecture, since a.out has no way to represent
+ alignment requirements of a section in a .o file. FIXME:
+ This isn't quite right: it should use the architecture of the
+ output file, not the input files. */
+ if ((*sym_hash)->root.type == bfd_link_hash_common
+ && ((*sym_hash)->root.u.c.p->alignment_power >
+ bfd_get_arch_info (abfd)->section_align_power))
+ (*sym_hash)->root.u.c.p->alignment_power =
+ bfd_get_arch_info (abfd)->section_align_power;
+
+ /* If this is a set symbol, and we are not building sets, then
+ it is possible for the hash entry to not have been set. In
+ such a case, treat the symbol as not globally defined. */
+ if ((*sym_hash)->root.type == bfd_link_hash_new)
+ {
+ BFD_ASSERT ((flags & BSF_CONSTRUCTOR) != 0);
+ *sym_hash = NULL;
+ }
+
+ if (type == (N_INDR | N_EXT) || type == N_WARNING)
+ ++sym_hash;
}
return TRUE;
@@ -3154,26 +3108,42 @@ aout_link_check_archive_element (abfd, info, pneeded)
/* Free up the internal symbols read from an a.out file. */
static bfd_boolean
-aout_link_free_symbols (abfd)
- bfd *abfd;
+aout_link_free_symbols (bfd *abfd)
{
- if (obj_aout_external_syms (abfd) != (struct external_nlist *) NULL)
+ if (obj_aout_external_syms (abfd) != NULL)
{
#ifdef USE_MMAP
bfd_free_window (&obj_aout_sym_window (abfd));
#else
- free ((PTR) obj_aout_external_syms (abfd));
+ free ((void *) obj_aout_external_syms (abfd));
#endif
- obj_aout_external_syms (abfd) = (struct external_nlist *) NULL;
+ obj_aout_external_syms (abfd) = NULL;
}
- if (obj_aout_external_strings (abfd) != (char *) NULL)
+ if (obj_aout_external_strings (abfd) != NULL)
{
#ifdef USE_MMAP
bfd_free_window (&obj_aout_string_window (abfd));
#else
- free ((PTR) obj_aout_external_strings (abfd));
+ free ((void *) obj_aout_external_strings (abfd));
#endif
- obj_aout_external_strings (abfd) = (char *) NULL;
+ obj_aout_external_strings (abfd) = NULL;
+ }
+ return TRUE;
+}
+
+/* Add symbols from an a.out object file. */
+
+static bfd_boolean
+aout_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
+{
+ if (! aout_get_external_symbols (abfd))
+ return FALSE;
+ if (! aout_link_add_symbols (abfd, info))
+ return FALSE;
+ if (! info->keep_memory)
+ {
+ if (! aout_link_free_symbols (abfd))
+ return FALSE;
}
return TRUE;
}
@@ -3186,12 +3156,11 @@ aout_link_free_symbols (abfd)
(unless there is some other reason to include it). */
static bfd_boolean
-aout_link_check_ar_symbols (abfd, info, pneeded)
- bfd *abfd;
- struct bfd_link_info *info;
- bfd_boolean *pneeded;
+aout_link_check_ar_symbols (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean *pneeded)
{
- register struct external_nlist *p;
+ struct external_nlist *p;
struct external_nlist *pend;
char *strings;
@@ -3229,7 +3198,7 @@ aout_link_check_ar_symbols (abfd, info, pneeded)
/* We are only interested in symbols that are currently
undefined or common. */
- if (h == (struct bfd_link_hash_entry *) NULL
+ if (h == NULL
|| (h->type != bfd_link_hash_undefined
&& h->type != bfd_link_hash_common))
{
@@ -3304,7 +3273,7 @@ aout_link_check_ar_symbols (abfd, info, pneeded)
unsigned int power;
symbfd = h->u.undef.abfd;
- if (symbfd == (bfd *) NULL)
+ if (symbfd == NULL)
{
/* This symbol was created as undefined from
outside BFD. We assume that we should link
@@ -3320,9 +3289,8 @@ aout_link_check_ar_symbols (abfd, info, pneeded)
/* Turn the current link symbol into a common
symbol. It is already on the undefs list. */
h->type = bfd_link_hash_common;
- h->u.c.p = ((struct bfd_link_hash_common_entry *)
- bfd_hash_allocate (&info->hash->table,
- sizeof (struct bfd_link_hash_common_entry)));
+ h->u.c.p = bfd_hash_allocate (&info->hash->table,
+ sizeof (struct bfd_link_hash_common_entry));
if (h->u.c.p == NULL)
return FALSE;
@@ -3371,224 +3339,54 @@ aout_link_check_ar_symbols (abfd, info, pneeded)
/* We do not need this object file. */
return TRUE;
}
-
-/* Add all symbols from an object file to the hash table. */
+/* Check a single archive element to see if we need to include it in
+ the link. *PNEEDED is set according to whether this element is
+ needed in the link or not. This is called from
+ _bfd_generic_link_add_archive_symbols. */
static bfd_boolean
-aout_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+aout_link_check_archive_element (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean *pneeded)
{
- bfd_boolean (*add_one_symbol)
- PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword, asection *,
- bfd_vma, const char *, bfd_boolean, bfd_boolean,
- struct bfd_link_hash_entry **));
- struct external_nlist *syms;
- bfd_size_type sym_count;
- char *strings;
- bfd_boolean copy;
- struct aout_link_hash_entry **sym_hash;
- register struct external_nlist *p;
- struct external_nlist *pend;
- bfd_size_type amt;
+ if (! aout_get_external_symbols (abfd))
+ return FALSE;
- syms = obj_aout_external_syms (abfd);
- sym_count = obj_aout_external_sym_count (abfd);
- strings = obj_aout_external_strings (abfd);
- if (info->keep_memory)
- copy = FALSE;
- else
- copy = TRUE;
+ if (! aout_link_check_ar_symbols (abfd, info, pneeded))
+ return FALSE;
- if (aout_backend_info (abfd)->add_dynamic_symbols != NULL)
+ if (*pneeded)
{
- if (! ((*aout_backend_info (abfd)->add_dynamic_symbols)
- (abfd, info, &syms, &sym_count, &strings)))
+ if (! aout_link_add_symbols (abfd, info))
return FALSE;
}
- /* We keep a list of the linker hash table entries that correspond
- to particular symbols. We could just look them up in the hash
- table, but keeping the list is more efficient. Perhaps this
- should be conditional on info->keep_memory. */
- amt = sym_count * sizeof (struct aout_link_hash_entry *);
- sym_hash = (struct aout_link_hash_entry **) bfd_alloc (abfd, amt);
- if (sym_hash == NULL && sym_count != 0)
- return FALSE;
- obj_aout_sym_hashes (abfd) = sym_hash;
-
- add_one_symbol = aout_backend_info (abfd)->add_one_symbol;
- if (add_one_symbol == NULL)
- add_one_symbol = _bfd_generic_link_add_one_symbol;
-
- p = syms;
- pend = p + sym_count;
- for (; p < pend; p++, sym_hash++)
+ if (! info->keep_memory || ! *pneeded)
{
- int type;
- const char *name;
- bfd_vma value;
- asection *section;
- flagword flags;
- const char *string;
-
- *sym_hash = NULL;
-
- type = H_GET_8 (abfd, p->e_type);
-
- /* Ignore debugging symbols. */
- if ((type & N_STAB) != 0)
- continue;
-
- name = strings + GET_WORD (abfd, p->e_strx);
- value = GET_WORD (abfd, p->e_value);
- flags = BSF_GLOBAL;
- string = NULL;
- switch (type)
- {
- default:
- abort ();
-
- case N_UNDF:
- case N_ABS:
- case N_TEXT:
- case N_DATA:
- case N_BSS:
- case N_FN_SEQ:
- case N_COMM:
- case N_SETV:
- case N_FN:
- /* Ignore symbols that are not externally visible. */
- continue;
- case N_INDR:
- /* Ignore local indirect symbol. */
- ++p;
- ++sym_hash;
- continue;
-
- case N_UNDF | N_EXT:
- if (value == 0)
- {
- section = bfd_und_section_ptr;
- flags = 0;
- }
- else
- section = bfd_com_section_ptr;
- break;
- case N_ABS | N_EXT:
- section = bfd_abs_section_ptr;
- break;
- case N_TEXT | N_EXT:
- section = obj_textsec (abfd);
- value -= bfd_get_section_vma (abfd, section);
- break;
- case N_DATA | N_EXT:
- case N_SETV | N_EXT:
- /* Treat N_SETV symbols as N_DATA symbol; see comment in
- translate_from_native_sym_flags. */
- section = obj_datasec (abfd);
- value -= bfd_get_section_vma (abfd, section);
- break;
- case N_BSS | N_EXT:
- section = obj_bsssec (abfd);
- value -= bfd_get_section_vma (abfd, section);
- break;
- case N_INDR | N_EXT:
- /* An indirect symbol. The next symbol is the symbol
- which this one really is. */
- BFD_ASSERT (p + 1 < pend);
- ++p;
- string = strings + GET_WORD (abfd, p->e_strx);
- section = bfd_ind_section_ptr;
- flags |= BSF_INDIRECT;
- break;
- case N_COMM | N_EXT:
- section = bfd_com_section_ptr;
- break;
- case N_SETA: case N_SETA | N_EXT:
- section = bfd_abs_section_ptr;
- flags |= BSF_CONSTRUCTOR;
- break;
- case N_SETT: case N_SETT | N_EXT:
- section = obj_textsec (abfd);
- flags |= BSF_CONSTRUCTOR;
- value -= bfd_get_section_vma (abfd, section);
- break;
- case N_SETD: case N_SETD | N_EXT:
- section = obj_datasec (abfd);
- flags |= BSF_CONSTRUCTOR;
- value -= bfd_get_section_vma (abfd, section);
- break;
- case N_SETB: case N_SETB | N_EXT:
- section = obj_bsssec (abfd);
- flags |= BSF_CONSTRUCTOR;
- value -= bfd_get_section_vma (abfd, section);
- break;
- case N_WARNING:
- /* A warning symbol. The next symbol is the one to warn
- about. */
- BFD_ASSERT (p + 1 < pend);
- ++p;
- string = name;
- name = strings + GET_WORD (abfd, p->e_strx);
- section = bfd_und_section_ptr;
- flags |= BSF_WARNING;
- break;
- case N_WEAKU:
- section = bfd_und_section_ptr;
- flags = BSF_WEAK;
- break;
- case N_WEAKA:
- section = bfd_abs_section_ptr;
- flags = BSF_WEAK;
- break;
- case N_WEAKT:
- section = obj_textsec (abfd);
- value -= bfd_get_section_vma (abfd, section);
- flags = BSF_WEAK;
- break;
- case N_WEAKD:
- section = obj_datasec (abfd);
- value -= bfd_get_section_vma (abfd, section);
- flags = BSF_WEAK;
- break;
- case N_WEAKB:
- section = obj_bsssec (abfd);
- value -= bfd_get_section_vma (abfd, section);
- flags = BSF_WEAK;
- break;
- }
-
- if (! ((*add_one_symbol)
- (info, abfd, name, flags, section, value, string, copy, FALSE,
- (struct bfd_link_hash_entry **) sym_hash)))
+ if (! aout_link_free_symbols (abfd))
return FALSE;
+ }
- /* Restrict the maximum alignment of a common symbol based on
- the architecture, since a.out has no way to represent
- alignment requirements of a section in a .o file. FIXME:
- This isn't quite right: it should use the architecture of the
- output file, not the input files. */
- if ((*sym_hash)->root.type == bfd_link_hash_common
- && ((*sym_hash)->root.u.c.p->alignment_power >
- bfd_get_arch_info (abfd)->section_align_power))
- (*sym_hash)->root.u.c.p->alignment_power =
- bfd_get_arch_info (abfd)->section_align_power;
+ return TRUE;
+}
- /* If this is a set symbol, and we are not building sets, then
- it is possible for the hash entry to not have been set. In
- such a case, treat the symbol as not globally defined. */
- if ((*sym_hash)->root.type == bfd_link_hash_new)
- {
- BFD_ASSERT ((flags & BSF_CONSTRUCTOR) != 0);
- *sym_hash = NULL;
- }
+/* Given an a.out BFD, add symbols to the global hash table as
+ appropriate. */
- if (type == (N_INDR | N_EXT) || type == N_WARNING)
- ++sym_hash;
+bfd_boolean
+NAME (aout, link_add_symbols) (bfd *abfd, struct bfd_link_info *info)
+{
+ switch (bfd_get_format (abfd))
+ {
+ case bfd_object:
+ return aout_link_add_object_symbols (abfd, info);
+ case bfd_archive:
+ return _bfd_generic_link_add_archive_symbols
+ (abfd, info, aout_link_check_archive_element);
+ default:
+ bfd_set_error (bfd_error_wrong_format);
+ return FALSE;
}
-
- return TRUE;
}
/* A hash table used for header files with N_BINCL entries. */
@@ -3642,58 +3440,29 @@ struct aout_final_link_info
/* A buffer large enough to hold the contents of any section. */
bfd_byte *contents;
/* A buffer large enough to hold the relocs of any section. */
- PTR relocs;
+ void * relocs;
/* A buffer large enough to hold the symbol map of any input BFD. */
int *symbol_map;
/* A buffer large enough to hold output symbols of any input BFD. */
struct external_nlist *output_syms;
};
-static struct bfd_hash_entry *aout_link_includes_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static bfd_boolean aout_link_input_bfd
- PARAMS ((struct aout_final_link_info *, bfd *input_bfd));
-static bfd_boolean aout_link_write_symbols
- PARAMS ((struct aout_final_link_info *, bfd *input_bfd));
-static bfd_boolean aout_link_write_other_symbol
- PARAMS ((struct aout_link_hash_entry *, PTR));
-static bfd_boolean aout_link_input_section
- PARAMS ((struct aout_final_link_info *, bfd *input_bfd,
- asection *input_section, file_ptr *reloff_ptr,
- bfd_size_type rel_size));
-static bfd_boolean aout_link_input_section_std
- PARAMS ((struct aout_final_link_info *, bfd *input_bfd,
- asection *input_section, struct reloc_std_external *,
- bfd_size_type rel_size, bfd_byte *contents));
-static bfd_boolean aout_link_input_section_ext
- PARAMS ((struct aout_final_link_info *, bfd *input_bfd,
- asection *input_section, struct reloc_ext_external *,
- bfd_size_type rel_size, bfd_byte *contents));
-static INLINE asection *aout_reloc_index_to_section
- PARAMS ((bfd *, int));
-static bfd_boolean aout_link_reloc_link_order
- PARAMS ((struct aout_final_link_info *, asection *,
- struct bfd_link_order *));
-
/* The function to create a new entry in the header file hash table. */
static struct bfd_hash_entry *
-aout_link_includes_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+aout_link_includes_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct aout_link_includes_entry *ret =
(struct aout_link_includes_entry *) entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct aout_link_includes_entry *) NULL)
- ret = ((struct aout_link_includes_entry *)
- bfd_hash_allocate (table,
- sizeof (struct aout_link_includes_entry)));
- if (ret == (struct aout_link_includes_entry *) NULL)
- return (struct bfd_hash_entry *) ret;
+ if (ret == NULL)
+ ret = bfd_hash_allocate (table, sizeof (* ret));
+ if (ret == NULL)
+ return NULL;
/* Call the allocation method of the superclass. */
ret = ((struct aout_link_includes_entry *)
@@ -3707,907 +3476,11 @@ aout_link_includes_newfunc (entry, table, string)
return (struct bfd_hash_entry *) ret;
}
-/* Do the final link step. This is called on the output BFD. The
- INFO structure should point to a list of BFDs linked through the
- link_next field which can be used to find each BFD which takes part
- in the output. Also, each section in ABFD should point to a list
- of bfd_link_order structures which list all the input sections for
- the output section. */
-
-bfd_boolean
-NAME(aout,final_link) (abfd, info, callback)
- bfd *abfd;
- struct bfd_link_info *info;
- void (*callback) PARAMS ((bfd *, file_ptr *, file_ptr *, file_ptr *));
-{
- struct aout_final_link_info aout_info;
- bfd_boolean includes_hash_initialized = FALSE;
- register bfd *sub;
- bfd_size_type trsize, drsize;
- bfd_size_type max_contents_size;
- bfd_size_type max_relocs_size;
- bfd_size_type max_sym_count;
- bfd_size_type text_size;
- file_ptr text_end;
- register struct bfd_link_order *p;
- asection *o;
- bfd_boolean have_link_order_relocs;
-
- if (info->shared)
- abfd->flags |= DYNAMIC;
-
- aout_info.info = info;
- aout_info.output_bfd = abfd;
- aout_info.contents = NULL;
- aout_info.relocs = NULL;
- aout_info.symbol_map = NULL;
- aout_info.output_syms = NULL;
-
- if (! bfd_hash_table_init_n (&aout_info.includes.root,
- aout_link_includes_newfunc,
- 251))
- goto error_return;
- includes_hash_initialized = TRUE;
-
- /* Figure out the largest section size. Also, if generating
- relocatable output, count the relocs. */
- trsize = 0;
- drsize = 0;
- max_contents_size = 0;
- max_relocs_size = 0;
- max_sym_count = 0;
- for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
- {
- bfd_size_type sz;
-
- if (info->relocatable)
- {
- if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
- {
- trsize += exec_hdr (sub)->a_trsize;
- drsize += exec_hdr (sub)->a_drsize;
- }
- else
- {
- /* FIXME: We need to identify the .text and .data sections
- and call get_reloc_upper_bound and canonicalize_reloc to
- work out the number of relocs needed, and then multiply
- by the reloc size. */
- (*_bfd_error_handler)
- (_("%s: relocatable link from %s to %s not supported"),
- bfd_get_filename (abfd),
- sub->xvec->name, abfd->xvec->name);
- bfd_set_error (bfd_error_invalid_operation);
- goto error_return;
- }
- }
-
- if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
- {
- sz = bfd_section_size (sub, obj_textsec (sub));
- if (sz > max_contents_size)
- max_contents_size = sz;
- sz = bfd_section_size (sub, obj_datasec (sub));
- if (sz > max_contents_size)
- max_contents_size = sz;
-
- sz = exec_hdr (sub)->a_trsize;
- if (sz > max_relocs_size)
- max_relocs_size = sz;
- sz = exec_hdr (sub)->a_drsize;
- if (sz > max_relocs_size)
- max_relocs_size = sz;
-
- sz = obj_aout_external_sym_count (sub);
- if (sz > max_sym_count)
- max_sym_count = sz;
- }
- }
-
- if (info->relocatable)
- {
- if (obj_textsec (abfd) != (asection *) NULL)
- trsize += (_bfd_count_link_order_relocs (obj_textsec (abfd)
- ->link_order_head)
- * obj_reloc_entry_size (abfd));
- if (obj_datasec (abfd) != (asection *) NULL)
- drsize += (_bfd_count_link_order_relocs (obj_datasec (abfd)
- ->link_order_head)
- * obj_reloc_entry_size (abfd));
- }
-
- exec_hdr (abfd)->a_trsize = trsize;
- exec_hdr (abfd)->a_drsize = drsize;
-
- exec_hdr (abfd)->a_entry = bfd_get_start_address (abfd);
-
- /* Adjust the section sizes and vmas according to the magic number.
- This sets a_text, a_data and a_bss in the exec_hdr and sets the
- filepos for each section. */
- if (! NAME(aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
- goto error_return;
-
- /* The relocation and symbol file positions differ among a.out
- targets. We are passed a callback routine from the backend
- specific code to handle this.
- FIXME: At this point we do not know how much space the symbol
- table will require. This will not work for any (nonstandard)
- a.out target that needs to know the symbol table size before it
- can compute the relocation file positions. This may or may not
- be the case for the hp300hpux target, for example. */
- (*callback) (abfd, &aout_info.treloff, &aout_info.dreloff,
- &aout_info.symoff);
- obj_textsec (abfd)->rel_filepos = aout_info.treloff;
- obj_datasec (abfd)->rel_filepos = aout_info.dreloff;
- obj_sym_filepos (abfd) = aout_info.symoff;
-
- /* We keep a count of the symbols as we output them. */
- obj_aout_external_sym_count (abfd) = 0;
-
- /* We accumulate the string table as we write out the symbols. */
- aout_info.strtab = _bfd_stringtab_init ();
- if (aout_info.strtab == NULL)
- goto error_return;
-
- /* Allocate buffers to hold section contents and relocs. */
- aout_info.contents = (bfd_byte *) bfd_malloc (max_contents_size);
- aout_info.relocs = (PTR) bfd_malloc (max_relocs_size);
- aout_info.symbol_map = (int *) bfd_malloc (max_sym_count * sizeof (int *));
- aout_info.output_syms = ((struct external_nlist *)
- bfd_malloc ((max_sym_count + 1)
- * sizeof (struct external_nlist)));
- if ((aout_info.contents == NULL && max_contents_size != 0)
- || (aout_info.relocs == NULL && max_relocs_size != 0)
- || (aout_info.symbol_map == NULL && max_sym_count != 0)
- || aout_info.output_syms == NULL)
- goto error_return;
-
- /* If we have a symbol named __DYNAMIC, force it out now. This is
- required by SunOS. Doing this here rather than in sunos.c is a
- hack, but it's easier than exporting everything which would be
- needed. */
- {
- struct aout_link_hash_entry *h;
-
- h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC",
- FALSE, FALSE, FALSE);
- if (h != NULL)
- aout_link_write_other_symbol (h, &aout_info);
- }
-
- /* The most time efficient way to do the link would be to read all
- the input object files into memory and then sort out the
- information into the output file. Unfortunately, that will
- probably use too much memory. Another method would be to step
- through everything that composes the text section and write it
- out, and then everything that composes the data section and write
- it out, and then write out the relocs, and then write out the
- symbols. Unfortunately, that requires reading stuff from each
- input file several times, and we will not be able to keep all the
- input files open simultaneously, and reopening them will be slow.
-
- What we do is basically process one input file at a time. We do
- everything we need to do with an input file once--copy over the
- section contents, handle the relocation information, and write
- out the symbols--and then we throw away the information we read
- from it. This approach requires a lot of lseeks of the output
- file, which is unfortunate but still faster than reopening a lot
- of files.
-
- We use the output_has_begun field of the input BFDs to see
- whether we have already handled it. */
- for (sub = info->input_bfds; sub != (bfd *) NULL; sub = sub->link_next)
- sub->output_has_begun = FALSE;
-
- /* Mark all sections which are to be included in the link. This
- will normally be every section. We need to do this so that we
- can identify any sections which the linker has decided to not
- include. */
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- for (p = o->link_order_head; p != NULL; p = p->next)
- if (p->type == bfd_indirect_link_order)
- p->u.indirect.section->linker_mark = TRUE;
- }
-
- have_link_order_relocs = FALSE;
- for (o = abfd->sections; o != (asection *) NULL; o = o->next)
- {
- for (p = o->link_order_head;
- p != (struct bfd_link_order *) NULL;
- p = p->next)
- {
- if (p->type == bfd_indirect_link_order
- && (bfd_get_flavour (p->u.indirect.section->owner)
- == bfd_target_aout_flavour))
- {
- bfd *input_bfd;
-
- input_bfd = p->u.indirect.section->owner;
- if (! input_bfd->output_has_begun)
- {
- if (! aout_link_input_bfd (&aout_info, input_bfd))
- goto error_return;
- input_bfd->output_has_begun = TRUE;
- }
- }
- else if (p->type == bfd_section_reloc_link_order
- || p->type == bfd_symbol_reloc_link_order)
- {
- /* These are handled below. */
- have_link_order_relocs = TRUE;
- }
- else
- {
- if (! _bfd_default_link_order (abfd, info, o, p))
- goto error_return;
- }
- }
- }
-
- /* Write out any symbols that we have not already written out. */
- aout_link_hash_traverse (aout_hash_table (info),
- aout_link_write_other_symbol,
- (PTR) &aout_info);
-
- /* Now handle any relocs we were asked to create by the linker.
- These did not come from any input file. We must do these after
- we have written out all the symbols, so that we know the symbol
- indices to use. */
- if (have_link_order_relocs)
- {
- for (o = abfd->sections; o != (asection *) NULL; o = o->next)
- {
- for (p = o->link_order_head;
- p != (struct bfd_link_order *) NULL;
- p = p->next)
- {
- if (p->type == bfd_section_reloc_link_order
- || p->type == bfd_symbol_reloc_link_order)
- {
- if (! aout_link_reloc_link_order (&aout_info, o, p))
- goto error_return;
- }
- }
- }
- }
-
- if (aout_info.contents != NULL)
- {
- free (aout_info.contents);
- aout_info.contents = NULL;
- }
- if (aout_info.relocs != NULL)
- {
- free (aout_info.relocs);
- aout_info.relocs = NULL;
- }
- if (aout_info.symbol_map != NULL)
- {
- free (aout_info.symbol_map);
- aout_info.symbol_map = NULL;
- }
- if (aout_info.output_syms != NULL)
- {
- free (aout_info.output_syms);
- aout_info.output_syms = NULL;
- }
- if (includes_hash_initialized)
- {
- bfd_hash_table_free (&aout_info.includes.root);
- includes_hash_initialized = FALSE;
- }
-
- /* Finish up any dynamic linking we may be doing. */
- if (aout_backend_info (abfd)->finish_dynamic_link != NULL)
- {
- if (! (*aout_backend_info (abfd)->finish_dynamic_link) (abfd, info))
- goto error_return;
- }
-
- /* Update the header information. */
- abfd->symcount = obj_aout_external_sym_count (abfd);
- exec_hdr (abfd)->a_syms = abfd->symcount * EXTERNAL_NLIST_SIZE;
- obj_str_filepos (abfd) = obj_sym_filepos (abfd) + exec_hdr (abfd)->a_syms;
- obj_textsec (abfd)->reloc_count =
- exec_hdr (abfd)->a_trsize / obj_reloc_entry_size (abfd);
- obj_datasec (abfd)->reloc_count =
- exec_hdr (abfd)->a_drsize / obj_reloc_entry_size (abfd);
-
- /* Write out the string table, unless there are no symbols. */
- if (abfd->symcount > 0)
- {
- if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0
- || ! emit_stringtab (abfd, aout_info.strtab))
- goto error_return;
- }
- else if (obj_textsec (abfd)->reloc_count == 0
- && obj_datasec (abfd)->reloc_count == 0)
- {
- bfd_byte b;
- file_ptr pos;
-
- b = 0;
- pos = obj_datasec (abfd)->filepos + exec_hdr (abfd)->a_data - 1;
- if (bfd_seek (abfd, pos, SEEK_SET) != 0
- || bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1)
- goto error_return;
- }
-
- return TRUE;
-
- error_return:
- if (aout_info.contents != NULL)
- free (aout_info.contents);
- if (aout_info.relocs != NULL)
- free (aout_info.relocs);
- if (aout_info.symbol_map != NULL)
- free (aout_info.symbol_map);
- if (aout_info.output_syms != NULL)
- free (aout_info.output_syms);
- if (includes_hash_initialized)
- bfd_hash_table_free (&aout_info.includes.root);
- return FALSE;
-}
-
-/* Link an a.out input BFD into the output file. */
-
-static bfd_boolean
-aout_link_input_bfd (finfo, input_bfd)
- struct aout_final_link_info *finfo;
- bfd *input_bfd;
-{
- bfd_size_type sym_count;
-
- BFD_ASSERT (bfd_get_format (input_bfd) == bfd_object);
-
- /* If this is a dynamic object, it may need special handling. */
- if ((input_bfd->flags & DYNAMIC) != 0
- && aout_backend_info (input_bfd)->link_dynamic_object != NULL)
- {
- return ((*aout_backend_info (input_bfd)->link_dynamic_object)
- (finfo->info, input_bfd));
- }
-
- /* Get the symbols. We probably have them already, unless
- finfo->info->keep_memory is FALSE. */
- if (! aout_get_external_symbols (input_bfd))
- return FALSE;
-
- sym_count = obj_aout_external_sym_count (input_bfd);
-
- /* Write out the symbols and get a map of the new indices. The map
- is placed into finfo->symbol_map. */
- if (! aout_link_write_symbols (finfo, input_bfd))
- return FALSE;
-
- /* Relocate and write out the sections. These functions use the
- symbol map created by aout_link_write_symbols. The linker_mark
- field will be set if these sections are to be included in the
- link, which will normally be the case. */
- if (obj_textsec (input_bfd)->linker_mark)
- {
- if (! aout_link_input_section (finfo, input_bfd,
- obj_textsec (input_bfd),
- &finfo->treloff,
- exec_hdr (input_bfd)->a_trsize))
- return FALSE;
- }
- if (obj_datasec (input_bfd)->linker_mark)
- {
- if (! aout_link_input_section (finfo, input_bfd,
- obj_datasec (input_bfd),
- &finfo->dreloff,
- exec_hdr (input_bfd)->a_drsize))
- return FALSE;
- }
-
- /* If we are not keeping memory, we don't need the symbols any
- longer. We still need them if we are keeping memory, because the
- strings in the hash table point into them. */
- if (! finfo->info->keep_memory)
- {
- if (! aout_link_free_symbols (input_bfd))
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* Adjust and write out the symbols for an a.out file. Set the new
- symbol indices into a symbol_map. */
-
-static bfd_boolean
-aout_link_write_symbols (finfo, input_bfd)
- struct aout_final_link_info *finfo;
- bfd *input_bfd;
-{
- bfd *output_bfd;
- bfd_size_type sym_count;
- char *strings;
- enum bfd_link_strip strip;
- enum bfd_link_discard discard;
- struct external_nlist *outsym;
- bfd_size_type strtab_index;
- register struct external_nlist *sym;
- struct external_nlist *sym_end;
- struct aout_link_hash_entry **sym_hash;
- int *symbol_map;
- bfd_boolean pass;
- bfd_boolean skip_next;
-
- output_bfd = finfo->output_bfd;
- sym_count = obj_aout_external_sym_count (input_bfd);
- strings = obj_aout_external_strings (input_bfd);
- strip = finfo->info->strip;
- discard = finfo->info->discard;
- outsym = finfo->output_syms;
-
- /* First write out a symbol for this object file, unless we are
- discarding such symbols. */
- if (strip != strip_all
- && (strip != strip_some
- || bfd_hash_lookup (finfo->info->keep_hash, input_bfd->filename,
- FALSE, FALSE) != NULL)
- && discard != discard_all)
- {
- H_PUT_8 (output_bfd, N_TEXT, outsym->e_type);
- H_PUT_8 (output_bfd, 0, outsym->e_other);
- H_PUT_16 (output_bfd, 0, outsym->e_desc);
- strtab_index = add_to_stringtab (output_bfd, finfo->strtab,
- input_bfd->filename, FALSE);
- if (strtab_index == (bfd_size_type) -1)
- return FALSE;
- PUT_WORD (output_bfd, strtab_index, outsym->e_strx);
- PUT_WORD (output_bfd,
- (bfd_get_section_vma (output_bfd,
- obj_textsec (input_bfd)->output_section)
- + obj_textsec (input_bfd)->output_offset),
- outsym->e_value);
- ++obj_aout_external_sym_count (output_bfd);
- ++outsym;
- }
-
- pass = FALSE;
- skip_next = FALSE;
- sym = obj_aout_external_syms (input_bfd);
- sym_end = sym + sym_count;
- sym_hash = obj_aout_sym_hashes (input_bfd);
- symbol_map = finfo->symbol_map;
- memset (symbol_map, 0, (size_t) sym_count * sizeof *symbol_map);
- for (; sym < sym_end; sym++, sym_hash++, symbol_map++)
- {
- const char *name;
- int type;
- struct aout_link_hash_entry *h;
- bfd_boolean skip;
- asection *symsec;
- bfd_vma val = 0;
- bfd_boolean copy;
-
- /* We set *symbol_map to 0 above for all symbols. If it has
- already been set to -1 for this symbol, it means that we are
- discarding it because it appears in a duplicate header file.
- See the N_BINCL code below. */
- if (*symbol_map == -1)
- continue;
-
- /* Initialize *symbol_map to -1, which means that the symbol was
- not copied into the output file. We will change it later if
- we do copy the symbol over. */
- *symbol_map = -1;
-
- type = H_GET_8 (input_bfd, sym->e_type);
- name = strings + GET_WORD (input_bfd, sym->e_strx);
-
- h = NULL;
-
- if (pass)
- {
- /* Pass this symbol through. It is the target of an
- indirect or warning symbol. */
- val = GET_WORD (input_bfd, sym->e_value);
- pass = FALSE;
- }
- else if (skip_next)
- {
- /* Skip this symbol, which is the target of an indirect
- symbol that we have changed to no longer be an indirect
- symbol. */
- skip_next = FALSE;
- continue;
- }
- else
- {
- struct aout_link_hash_entry *hresolve;
-
- /* We have saved the hash table entry for this symbol, if
- there is one. Note that we could just look it up again
- in the hash table, provided we first check that it is an
- external symbol. */
- h = *sym_hash;
-
- /* Use the name from the hash table, in case the symbol was
- wrapped. */
- if (h != NULL
- && h->root.type != bfd_link_hash_warning)
- name = h->root.root.string;
-
- /* If this is an indirect or warning symbol, then change
- hresolve to the base symbol. We also change *sym_hash so
- that the relocation routines relocate against the real
- symbol. */
- hresolve = h;
- if (h != (struct aout_link_hash_entry *) NULL
- && (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning))
- {
- hresolve = (struct aout_link_hash_entry *) h->root.u.i.link;
- while (hresolve->root.type == bfd_link_hash_indirect
- || hresolve->root.type == bfd_link_hash_warning)
- hresolve = ((struct aout_link_hash_entry *)
- hresolve->root.u.i.link);
- *sym_hash = hresolve;
- }
-
- /* If the symbol has already been written out, skip it. */
- if (h != (struct aout_link_hash_entry *) NULL
- && h->written)
- {
- if ((type & N_TYPE) == N_INDR
- || type == N_WARNING)
- skip_next = TRUE;
- *symbol_map = h->indx;
- continue;
- }
-
- /* See if we are stripping this symbol. */
- skip = FALSE;
- switch (strip)
- {
- case strip_none:
- break;
- case strip_debugger:
- if ((type & N_STAB) != 0)
- skip = TRUE;
- break;
- case strip_some:
- if (bfd_hash_lookup (finfo->info->keep_hash, name, FALSE, FALSE)
- == NULL)
- skip = TRUE;
- break;
- case strip_all:
- skip = TRUE;
- break;
- }
- if (skip)
- {
- if (h != (struct aout_link_hash_entry *) NULL)
- h->written = TRUE;
- continue;
- }
-
- /* Get the value of the symbol. */
- if ((type & N_TYPE) == N_TEXT
- || type == N_WEAKT)
- symsec = obj_textsec (input_bfd);
- else if ((type & N_TYPE) == N_DATA
- || type == N_WEAKD)
- symsec = obj_datasec (input_bfd);
- else if ((type & N_TYPE) == N_BSS
- || type == N_WEAKB)
- symsec = obj_bsssec (input_bfd);
- else if ((type & N_TYPE) == N_ABS
- || type == N_WEAKA)
- symsec = bfd_abs_section_ptr;
- else if (((type & N_TYPE) == N_INDR
- && (hresolve == (struct aout_link_hash_entry *) NULL
- || (hresolve->root.type != bfd_link_hash_defined
- && hresolve->root.type != bfd_link_hash_defweak
- && hresolve->root.type != bfd_link_hash_common)))
- || type == N_WARNING)
- {
- /* Pass the next symbol through unchanged. The
- condition above for indirect symbols is so that if
- the indirect symbol was defined, we output it with
- the correct definition so the debugger will
- understand it. */
- pass = TRUE;
- val = GET_WORD (input_bfd, sym->e_value);
- symsec = NULL;
- }
- else if ((type & N_STAB) != 0)
- {
- val = GET_WORD (input_bfd, sym->e_value);
- symsec = NULL;
- }
- else
- {
- /* If we get here with an indirect symbol, it means that
- we are outputting it with a real definition. In such
- a case we do not want to output the next symbol,
- which is the target of the indirection. */
- if ((type & N_TYPE) == N_INDR)
- skip_next = TRUE;
-
- symsec = NULL;
-
- /* We need to get the value from the hash table. We use
- hresolve so that if we have defined an indirect
- symbol we output the final definition. */
- if (h == (struct aout_link_hash_entry *) NULL)
- {
- switch (type & N_TYPE)
- {
- case N_SETT:
- symsec = obj_textsec (input_bfd);
- break;
- case N_SETD:
- symsec = obj_datasec (input_bfd);
- break;
- case N_SETB:
- symsec = obj_bsssec (input_bfd);
- break;
- case N_SETA:
- symsec = bfd_abs_section_ptr;
- break;
- default:
- val = 0;
- break;
- }
- }
- else if (hresolve->root.type == bfd_link_hash_defined
- || hresolve->root.type == bfd_link_hash_defweak)
- {
- asection *input_section;
- asection *output_section;
-
- /* This case usually means a common symbol which was
- turned into a defined symbol. */
- input_section = hresolve->root.u.def.section;
- output_section = input_section->output_section;
- BFD_ASSERT (bfd_is_abs_section (output_section)
- || output_section->owner == output_bfd);
- val = (hresolve->root.u.def.value
- + bfd_get_section_vma (output_bfd, output_section)
- + input_section->output_offset);
-
- /* Get the correct type based on the section. If
- this is a constructed set, force it to be
- globally visible. */
- if (type == N_SETT
- || type == N_SETD
- || type == N_SETB
- || type == N_SETA)
- type |= N_EXT;
-
- type &=~ N_TYPE;
-
- if (output_section == obj_textsec (output_bfd))
- type |= (hresolve->root.type == bfd_link_hash_defined
- ? N_TEXT
- : N_WEAKT);
- else if (output_section == obj_datasec (output_bfd))
- type |= (hresolve->root.type == bfd_link_hash_defined
- ? N_DATA
- : N_WEAKD);
- else if (output_section == obj_bsssec (output_bfd))
- type |= (hresolve->root.type == bfd_link_hash_defined
- ? N_BSS
- : N_WEAKB);
- else
- type |= (hresolve->root.type == bfd_link_hash_defined
- ? N_ABS
- : N_WEAKA);
- }
- else if (hresolve->root.type == bfd_link_hash_common)
- val = hresolve->root.u.c.size;
- else if (hresolve->root.type == bfd_link_hash_undefweak)
- {
- val = 0;
- type = N_WEAKU;
- }
- else
- val = 0;
- }
- if (symsec != (asection *) NULL)
- val = (symsec->output_section->vma
- + symsec->output_offset
- + (GET_WORD (input_bfd, sym->e_value)
- - symsec->vma));
-
- /* If this is a global symbol set the written flag, and if
- it is a local symbol see if we should discard it. */
- if (h != (struct aout_link_hash_entry *) NULL)
- {
- h->written = TRUE;
- h->indx = obj_aout_external_sym_count (output_bfd);
- }
- else if ((type & N_TYPE) != N_SETT
- && (type & N_TYPE) != N_SETD
- && (type & N_TYPE) != N_SETB
- && (type & N_TYPE) != N_SETA)
- {
- switch (discard)
- {
- case discard_none:
- case discard_sec_merge:
- break;
- case discard_l:
- if ((type & N_STAB) == 0
- && bfd_is_local_label_name (input_bfd, name))
- skip = TRUE;
- break;
- case discard_all:
- skip = TRUE;
- break;
- }
- if (skip)
- {
- pass = FALSE;
- continue;
- }
- }
-
- /* An N_BINCL symbol indicates the start of the stabs
- entries for a header file. We need to scan ahead to the
- next N_EINCL symbol, ignoring nesting, adding up all the
- characters in the symbol names, not including the file
- numbers in types (the first number after an open
- parenthesis). */
- if (type == (int) N_BINCL)
- {
- struct external_nlist *incl_sym;
- int nest;
- struct aout_link_includes_entry *incl_entry;
- struct aout_link_includes_totals *t;
-
- val = 0;
- nest = 0;
- for (incl_sym = sym + 1; incl_sym < sym_end; incl_sym++)
- {
- int incl_type;
-
- incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
- if (incl_type == (int) N_EINCL)
- {
- if (nest == 0)
- break;
- --nest;
- }
- else if (incl_type == (int) N_BINCL)
- ++nest;
- else if (nest == 0)
- {
- const char *s;
-
- s = strings + GET_WORD (input_bfd, incl_sym->e_strx);
- for (; *s != '\0'; s++)
- {
- val += *s;
- if (*s == '(')
- {
- /* Skip the file number. */
- ++s;
- while (ISDIGIT (*s))
- ++s;
- --s;
- }
- }
- }
- }
-
- /* If we have already included a header file with the
- same value, then replace this one with an N_EXCL
- symbol. */
- copy = (bfd_boolean) (! finfo->info->keep_memory);
- incl_entry = aout_link_includes_lookup (&finfo->includes,
- name, TRUE, copy);
- if (incl_entry == NULL)
- return FALSE;
- for (t = incl_entry->totals; t != NULL; t = t->next)
- if (t->total == val)
- break;
- if (t == NULL)
- {
- /* This is the first time we have seen this header
- file with this set of stabs strings. */
- t = ((struct aout_link_includes_totals *)
- bfd_hash_allocate (&finfo->includes.root,
- sizeof *t));
- if (t == NULL)
- return FALSE;
- t->total = val;
- t->next = incl_entry->totals;
- incl_entry->totals = t;
- }
- else
- {
- int *incl_map;
-
- /* This is a duplicate header file. We must change
- it to be an N_EXCL entry, and mark all the
- included symbols to prevent outputting them. */
- type = (int) N_EXCL;
-
- nest = 0;
- for (incl_sym = sym + 1, incl_map = symbol_map + 1;
- incl_sym < sym_end;
- incl_sym++, incl_map++)
- {
- int incl_type;
-
- incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
- if (incl_type == (int) N_EINCL)
- {
- if (nest == 0)
- {
- *incl_map = -1;
- break;
- }
- --nest;
- }
- else if (incl_type == (int) N_BINCL)
- ++nest;
- else if (nest == 0)
- *incl_map = -1;
- }
- }
- }
- }
-
- /* Copy this symbol into the list of symbols we are going to
- write out. */
- H_PUT_8 (output_bfd, type, outsym->e_type);
- H_PUT_8 (output_bfd, H_GET_8 (input_bfd, sym->e_other), outsym->e_other);
- H_PUT_16 (output_bfd, H_GET_16 (input_bfd, sym->e_desc), outsym->e_desc);
- copy = FALSE;
- if (! finfo->info->keep_memory)
- {
- /* name points into a string table which we are going to
- free. If there is a hash table entry, use that string.
- Otherwise, copy name into memory. */
- if (h != (struct aout_link_hash_entry *) NULL)
- name = h->root.root.string;
- else
- copy = TRUE;
- }
- strtab_index = add_to_stringtab (output_bfd, finfo->strtab,
- name, copy);
- if (strtab_index == (bfd_size_type) -1)
- return FALSE;
- PUT_WORD (output_bfd, strtab_index, outsym->e_strx);
- PUT_WORD (output_bfd, val, outsym->e_value);
- *symbol_map = obj_aout_external_sym_count (output_bfd);
- ++obj_aout_external_sym_count (output_bfd);
- ++outsym;
- }
-
- /* Write out the output symbols we have just constructed. */
- if (outsym > finfo->output_syms)
- {
- bfd_size_type outsym_size;
-
- if (bfd_seek (output_bfd, finfo->symoff, SEEK_SET) != 0)
- return FALSE;
- outsym_size = outsym - finfo->output_syms;
- outsym_size *= EXTERNAL_NLIST_SIZE;
- if (bfd_bwrite ((PTR) finfo->output_syms, outsym_size, output_bfd)
- != outsym_size)
- return FALSE;
- finfo->symoff += outsym_size;
- }
-
- return TRUE;
-}
-
/* Write out a symbol that was not associated with an a.out input
object. */
static bfd_boolean
-aout_link_write_other_symbol (h, data)
- struct aout_link_hash_entry *h;
- PTR data;
+aout_link_write_other_symbol (struct aout_link_hash_entry *h, void * data)
{
struct aout_final_link_info *finfo = (struct aout_final_link_info *) data;
bfd *output_bfd;
@@ -4705,20 +3578,17 @@ aout_link_write_other_symbol (h, data)
indx = add_to_stringtab (output_bfd, finfo->strtab, h->root.root.string,
FALSE);
if (indx == - (bfd_size_type) 1)
- {
- /* FIXME: No way to handle errors. */
- abort ();
- }
+ /* FIXME: No way to handle errors. */
+ abort ();
+
PUT_WORD (output_bfd, indx, outsym.e_strx);
PUT_WORD (output_bfd, val, outsym.e_value);
amt = EXTERNAL_NLIST_SIZE;
if (bfd_seek (output_bfd, finfo->symoff, SEEK_SET) != 0
- || bfd_bwrite ((PTR) &outsym, amt, output_bfd) != amt)
- {
- /* FIXME: No way to handle errors. */
- abort ();
- }
+ || bfd_bwrite ((void *) &outsym, amt, output_bfd) != amt)
+ /* FIXME: No way to handle errors. */
+ abort ();
finfo->symoff += EXTERNAL_NLIST_SIZE;
h->indx = obj_aout_external_sym_count (output_bfd);
@@ -4727,129 +3597,260 @@ aout_link_write_other_symbol (h, data)
return TRUE;
}
-/* Link an a.out section into the output file. */
+/* Handle a link order which is supposed to generate a reloc. */
static bfd_boolean
-aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
- rel_size)
- struct aout_final_link_info *finfo;
- bfd *input_bfd;
- asection *input_section;
- file_ptr *reloff_ptr;
- bfd_size_type rel_size;
+aout_link_reloc_link_order (struct aout_final_link_info *finfo,
+ asection *o,
+ struct bfd_link_order *p)
{
- bfd_size_type input_size;
- PTR relocs;
+ struct bfd_link_order_reloc *pr;
+ int r_index;
+ int r_extern;
+ reloc_howto_type *howto;
+ file_ptr *reloff_ptr = NULL;
+ struct reloc_std_external srel;
+ struct reloc_ext_external erel;
+ void * rel_ptr;
+ bfd_size_type amt;
- /* Get the section contents. */
- input_size = bfd_section_size (input_bfd, input_section);
- if (! bfd_get_section_contents (input_bfd, input_section,
- (PTR) finfo->contents,
- (file_ptr) 0, input_size))
- return FALSE;
+ pr = p->u.reloc.p;
- /* Read in the relocs if we haven't already done it. */
- if (aout_section_data (input_section) != NULL
- && aout_section_data (input_section)->relocs != NULL)
- relocs = aout_section_data (input_section)->relocs;
+ if (p->type == bfd_section_reloc_link_order)
+ {
+ r_extern = 0;
+ if (bfd_is_abs_section (pr->u.section))
+ r_index = N_ABS | N_EXT;
+ else
+ {
+ BFD_ASSERT (pr->u.section->owner == finfo->output_bfd);
+ r_index = pr->u.section->target_index;
+ }
+ }
else
{
- relocs = finfo->relocs;
- if (rel_size > 0)
+ struct aout_link_hash_entry *h;
+
+ BFD_ASSERT (p->type == bfd_symbol_reloc_link_order);
+ r_extern = 1;
+ h = ((struct aout_link_hash_entry *)
+ bfd_wrapped_link_hash_lookup (finfo->output_bfd, finfo->info,
+ pr->u.name, FALSE, FALSE, TRUE));
+ if (h != NULL
+ && h->indx >= 0)
+ r_index = h->indx;
+ else if (h != NULL)
{
- if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
- || bfd_bread (relocs, rel_size, input_bfd) != rel_size)
+ /* We decided to strip this symbol, but it turns out that we
+ can't. Note that we lose the other and desc information
+ here. I don't think that will ever matter for a global
+ symbol. */
+ h->indx = -2;
+ h->written = FALSE;
+ if (! aout_link_write_other_symbol (h, (void *) finfo))
return FALSE;
+ r_index = h->indx;
+ }
+ else
+ {
+ if (! ((*finfo->info->callbacks->unattached_reloc)
+ (finfo->info, pr->u.name, NULL, NULL, (bfd_vma) 0)))
+ return FALSE;
+ r_index = 0;
}
}
- /* Relocate the section contents. */
- if (obj_reloc_entry_size (input_bfd) == RELOC_STD_SIZE)
+ howto = bfd_reloc_type_lookup (finfo->output_bfd, pr->reloc);
+ if (howto == 0)
{
- if (! aout_link_input_section_std (finfo, input_bfd, input_section,
- (struct reloc_std_external *) relocs,
- rel_size, finfo->contents))
- return FALSE;
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
+
+ if (o == obj_textsec (finfo->output_bfd))
+ reloff_ptr = &finfo->treloff;
+ else if (o == obj_datasec (finfo->output_bfd))
+ reloff_ptr = &finfo->dreloff;
else
+ abort ();
+
+ if (obj_reloc_entry_size (finfo->output_bfd) == RELOC_STD_SIZE)
{
- if (! aout_link_input_section_ext (finfo, input_bfd, input_section,
- (struct reloc_ext_external *) relocs,
- rel_size, finfo->contents))
- return FALSE;
- }
+#ifdef MY_put_reloc
+ MY_put_reloc (finfo->output_bfd, r_extern, r_index, p->offset, howto,
+ &srel);
+#else
+ {
+ int r_pcrel;
+ int r_baserel;
+ int r_jmptable;
+ int r_relative;
+ int r_length;
- /* Write out the section contents. */
- if (! bfd_set_section_contents (finfo->output_bfd,
- input_section->output_section,
- (PTR) finfo->contents,
- (file_ptr) input_section->output_offset,
- input_size))
- return FALSE;
+ r_pcrel = (int) howto->pc_relative;
+ r_baserel = (howto->type & 8) != 0;
+ r_jmptable = (howto->type & 16) != 0;
+ r_relative = (howto->type & 32) != 0;
+ r_length = howto->size;
- /* If we are producing relocatable output, the relocs were
- modified, and we now write them out. */
- if (finfo->info->relocatable && rel_size > 0)
+ PUT_WORD (finfo->output_bfd, p->offset, srel.r_address);
+ if (bfd_header_big_endian (finfo->output_bfd))
+ {
+ srel.r_index[0] = r_index >> 16;
+ srel.r_index[1] = r_index >> 8;
+ srel.r_index[2] = r_index;
+ srel.r_type[0] =
+ ((r_extern ? RELOC_STD_BITS_EXTERN_BIG : 0)
+ | (r_pcrel ? RELOC_STD_BITS_PCREL_BIG : 0)
+ | (r_baserel ? RELOC_STD_BITS_BASEREL_BIG : 0)
+ | (r_jmptable ? RELOC_STD_BITS_JMPTABLE_BIG : 0)
+ | (r_relative ? RELOC_STD_BITS_RELATIVE_BIG : 0)
+ | (r_length << RELOC_STD_BITS_LENGTH_SH_BIG));
+ }
+ else
+ {
+ srel.r_index[2] = r_index >> 16;
+ srel.r_index[1] = r_index >> 8;
+ srel.r_index[0] = r_index;
+ srel.r_type[0] =
+ ((r_extern ? RELOC_STD_BITS_EXTERN_LITTLE : 0)
+ | (r_pcrel ? RELOC_STD_BITS_PCREL_LITTLE : 0)
+ | (r_baserel ? RELOC_STD_BITS_BASEREL_LITTLE : 0)
+ | (r_jmptable ? RELOC_STD_BITS_JMPTABLE_LITTLE : 0)
+ | (r_relative ? RELOC_STD_BITS_RELATIVE_LITTLE : 0)
+ | (r_length << RELOC_STD_BITS_LENGTH_SH_LITTLE));
+ }
+ }
+#endif
+ rel_ptr = (void *) &srel;
+
+ /* We have to write the addend into the object file, since
+ standard a.out relocs are in place. It would be more
+ reliable if we had the current contents of the file here,
+ rather than assuming zeroes, but we can't read the file since
+ it was opened using bfd_openw. */
+ if (pr->addend != 0)
+ {
+ bfd_size_type size;
+ bfd_reloc_status_type r;
+ bfd_byte *buf;
+ bfd_boolean ok;
+
+ size = bfd_get_reloc_size (howto);
+ buf = bfd_zmalloc (size);
+ if (buf == NULL)
+ return FALSE;
+ r = MY_relocate_contents (howto, finfo->output_bfd,
+ (bfd_vma) pr->addend, buf);
+ switch (r)
+ {
+ case bfd_reloc_ok:
+ break;
+ default:
+ case bfd_reloc_outofrange:
+ abort ();
+ case bfd_reloc_overflow:
+ if (! ((*finfo->info->callbacks->reloc_overflow)
+ (finfo->info, NULL,
+ (p->type == bfd_section_reloc_link_order
+ ? bfd_section_name (finfo->output_bfd,
+ pr->u.section)
+ : pr->u.name),
+ howto->name, pr->addend, NULL, NULL, (bfd_vma) 0)))
+ {
+ free (buf);
+ return FALSE;
+ }
+ break;
+ }
+ ok = bfd_set_section_contents (finfo->output_bfd, o, (void *) buf,
+ (file_ptr) p->offset, size);
+ free (buf);
+ if (! ok)
+ return FALSE;
+ }
+ }
+ else
{
- if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
- return FALSE;
- if (bfd_bwrite (relocs, rel_size, finfo->output_bfd) != rel_size)
- return FALSE;
- *reloff_ptr += rel_size;
+#ifdef MY_put_ext_reloc
+ MY_put_ext_reloc (finfo->output_bfd, r_extern, r_index, p->offset,
+ howto, &erel, pr->addend);
+#else
+ PUT_WORD (finfo->output_bfd, p->offset, erel.r_address);
- /* Assert that the relocs have not run into the symbols, and
- that if these are the text relocs they have not run into the
- data relocs. */
- BFD_ASSERT (*reloff_ptr <= obj_sym_filepos (finfo->output_bfd)
- && (reloff_ptr != &finfo->treloff
- || (*reloff_ptr
- <= obj_datasec (finfo->output_bfd)->rel_filepos)));
+ if (bfd_header_big_endian (finfo->output_bfd))
+ {
+ erel.r_index[0] = r_index >> 16;
+ erel.r_index[1] = r_index >> 8;
+ erel.r_index[2] = r_index;
+ erel.r_type[0] =
+ ((r_extern ? RELOC_EXT_BITS_EXTERN_BIG : 0)
+ | (howto->type << RELOC_EXT_BITS_TYPE_SH_BIG));
+ }
+ else
+ {
+ erel.r_index[2] = r_index >> 16;
+ erel.r_index[1] = r_index >> 8;
+ erel.r_index[0] = r_index;
+ erel.r_type[0] =
+ (r_extern ? RELOC_EXT_BITS_EXTERN_LITTLE : 0)
+ | (howto->type << RELOC_EXT_BITS_TYPE_SH_LITTLE);
+ }
+
+ PUT_WORD (finfo->output_bfd, (bfd_vma) pr->addend, erel.r_addend);
+#endif /* MY_put_ext_reloc */
+
+ rel_ptr = (void *) &erel;
}
+ amt = obj_reloc_entry_size (finfo->output_bfd);
+ if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0
+ || bfd_bwrite (rel_ptr, amt, finfo->output_bfd) != amt)
+ return FALSE;
+
+ *reloff_ptr += obj_reloc_entry_size (finfo->output_bfd);
+
+ /* Assert that the relocs have not run into the symbols, and that n
+ the text relocs have not run into the data relocs. */
+ BFD_ASSERT (*reloff_ptr <= obj_sym_filepos (finfo->output_bfd)
+ && (reloff_ptr != &finfo->treloff
+ || (*reloff_ptr
+ <= obj_datasec (finfo->output_bfd)->rel_filepos)));
+
return TRUE;
}
/* Get the section corresponding to a reloc index. */
static INLINE asection *
-aout_reloc_index_to_section (abfd, indx)
- bfd *abfd;
- int indx;
+aout_reloc_index_to_section (bfd *abfd, int indx)
{
switch (indx & N_TYPE)
{
- case N_TEXT:
- return obj_textsec (abfd);
- case N_DATA:
- return obj_datasec (abfd);
- case N_BSS:
- return obj_bsssec (abfd);
+ case N_TEXT: return obj_textsec (abfd);
+ case N_DATA: return obj_datasec (abfd);
+ case N_BSS: return obj_bsssec (abfd);
case N_ABS:
- case N_UNDF:
- return bfd_abs_section_ptr;
- default:
- abort ();
+ case N_UNDF: return bfd_abs_section_ptr;
+ default: abort ();
}
- /*NOTREACHED*/
return NULL;
}
/* Relocate an a.out section using standard a.out relocs. */
static bfd_boolean
-aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
- rel_size, contents)
- struct aout_final_link_info *finfo;
- bfd *input_bfd;
- asection *input_section;
- struct reloc_std_external *relocs;
- bfd_size_type rel_size;
- bfd_byte *contents;
+aout_link_input_section_std (struct aout_final_link_info *finfo,
+ bfd *input_bfd,
+ asection *input_section,
+ struct reloc_std_external *relocs,
+ bfd_size_type rel_size,
+ bfd_byte *contents)
{
bfd_boolean (*check_dynamic_reloc)
- PARAMS ((struct bfd_link_info *, bfd *, asection *,
- struct aout_link_hash_entry *, PTR, bfd_byte *, bfd_boolean *,
- bfd_vma *));
+ (struct bfd_link_info *, bfd *, asection *,
+ struct aout_link_hash_entry *, void *, bfd_byte *, bfd_boolean *,
+ bfd_vma *);
bfd *output_bfd;
bfd_boolean relocatable;
struct external_nlist *syms;
@@ -4857,7 +3858,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
struct aout_link_hash_entry **sym_hashes;
int *symbol_map;
bfd_size_type reloc_count;
- register struct reloc_std_external *rel;
+ struct reloc_std_external *rel;
struct reloc_std_external *rel_end;
output_bfd = finfo->output_bfd;
@@ -4946,7 +3947,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
convert it into a relocation against a section. This
is what the native linker does. */
h = sym_hashes[r_index];
- if (h != (struct aout_link_hash_entry *) NULL
+ if (h != NULL
&& (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak))
{
@@ -4995,7 +3996,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
h->indx = -2;
h->written = FALSE;
if (! aout_link_write_other_symbol (h,
- (PTR) finfo))
+ (void *) finfo))
return FALSE;
}
r_index = h->indx;
@@ -5079,7 +4080,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
{
h = sym_hashes[r_index];
- if (h != (struct aout_link_hash_entry *) NULL
+ if (h != NULL
&& (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak))
{
@@ -5087,7 +4088,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
+ h->root.u.def.section->output_section->vma
+ h->root.u.def.section->output_offset);
}
- else if (h != (struct aout_link_hash_entry *) NULL
+ else if (h != NULL
&& h->root.type == bfd_link_hash_undefweak)
relocation = 0;
else
@@ -5114,7 +4115,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
if (! ((*check_dynamic_reloc)
(finfo->info, input_bfd, input_section, h,
- (PTR) rel, contents, &skip, &relocation)))
+ (void *) rel, contents, &skip, &relocation)))
return FALSE;
if (skip)
continue;
@@ -5155,7 +4156,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else if (r_extern)
name = strings + GET_WORD (input_bfd,
syms[r_index].e_strx);
@@ -5167,8 +4168,9 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
name = bfd_section_name (input_bfd, s);
}
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, r_addr)))
+ (finfo->info, (h ? &h->root : NULL), name,
+ howto->name, (bfd_vma) 0, input_bfd,
+ input_section, r_addr)))
return FALSE;
}
break;
@@ -5182,19 +4184,17 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
/* Relocate an a.out section using extended a.out relocs. */
static bfd_boolean
-aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
- rel_size, contents)
- struct aout_final_link_info *finfo;
- bfd *input_bfd;
- asection *input_section;
- struct reloc_ext_external *relocs;
- bfd_size_type rel_size;
- bfd_byte *contents;
+aout_link_input_section_ext (struct aout_final_link_info *finfo,
+ bfd *input_bfd,
+ asection *input_section,
+ struct reloc_ext_external *relocs,
+ bfd_size_type rel_size,
+ bfd_byte *contents)
{
bfd_boolean (*check_dynamic_reloc)
- PARAMS ((struct bfd_link_info *, bfd *, asection *,
- struct aout_link_hash_entry *, PTR, bfd_byte *, bfd_boolean *,
- bfd_vma *));
+ (struct bfd_link_info *, bfd *, asection *,
+ struct aout_link_hash_entry *, void *, bfd_byte *, bfd_boolean *,
+ bfd_vma *);
bfd *output_bfd;
bfd_boolean relocatable;
struct external_nlist *syms;
@@ -5202,7 +4202,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
struct aout_link_hash_entry **sym_hashes;
int *symbol_map;
bfd_size_type reloc_count;
- register struct reloc_ext_external *rel;
+ struct reloc_ext_external *rel;
struct reloc_ext_external *rel_end;
output_bfd = finfo->output_bfd;
@@ -5275,7 +4275,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
h = NULL;
else
h = sym_hashes[r_index];
- if (h != (struct aout_link_hash_entry *) NULL
+ if (h != NULL
&& (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak))
{
@@ -5332,7 +4332,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
h->indx = -2;
h->written = FALSE;
if (! aout_link_write_other_symbol (h,
- (PTR) finfo))
+ (void *) finfo))
return FALSE;
}
r_index = h->indx;
@@ -5422,7 +4422,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
{
h = sym_hashes[r_index];
- if (h != (struct aout_link_hash_entry *) NULL
+ if (h != NULL
&& (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak))
{
@@ -5430,7 +4430,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
+ h->root.u.def.section->output_section->vma
+ h->root.u.def.section->output_offset);
}
- else if (h != (struct aout_link_hash_entry *) NULL
+ else if (h != NULL
&& h->root.type == bfd_link_hash_undefweak)
relocation = 0;
else
@@ -5512,7 +4512,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
if (! ((*check_dynamic_reloc)
(finfo->info, input_bfd, input_section, h,
- (PTR) rel, contents, &skip, &relocation)))
+ (void *) rel, contents, &skip, &relocation)))
return FALSE;
if (skip)
continue;
@@ -5566,7 +4566,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else if (r_extern
|| r_type == (unsigned int) RELOC_BASE10
|| r_type == (unsigned int) RELOC_BASE13
@@ -5581,7 +4581,8 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
name = bfd_section_name (input_bfd, s);
}
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, name, howto_table_ext[r_type].name,
+ (finfo->info, (h ? &h->root : NULL), name,
+ howto_table_ext[r_type].name,
r_addend, input_bfd, input_section, r_addr)))
return FALSE;
}
@@ -5594,228 +4595,968 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
return TRUE;
}
-/* Handle a link order which is supposed to generate a reloc. */
+/* Link an a.out section into the output file. */
static bfd_boolean
-aout_link_reloc_link_order (finfo, o, p)
- struct aout_final_link_info *finfo;
- asection *o;
- struct bfd_link_order *p;
+aout_link_input_section (struct aout_final_link_info *finfo,
+ bfd *input_bfd,
+ asection *input_section,
+ file_ptr *reloff_ptr,
+ bfd_size_type rel_size)
{
- struct bfd_link_order_reloc *pr;
- int r_index;
- int r_extern;
- reloc_howto_type *howto;
- file_ptr *reloff_ptr = NULL;
- struct reloc_std_external srel;
- struct reloc_ext_external erel;
- PTR rel_ptr;
- bfd_size_type amt;
+ bfd_size_type input_size;
+ void * relocs;
- pr = p->u.reloc.p;
+ /* Get the section contents. */
+ input_size = input_section->size;
+ if (! bfd_get_section_contents (input_bfd, input_section,
+ (void *) finfo->contents,
+ (file_ptr) 0, input_size))
+ return FALSE;
- if (p->type == bfd_section_reloc_link_order)
+ /* Read in the relocs if we haven't already done it. */
+ if (aout_section_data (input_section) != NULL
+ && aout_section_data (input_section)->relocs != NULL)
+ relocs = aout_section_data (input_section)->relocs;
+ else
{
- r_extern = 0;
- if (bfd_is_abs_section (pr->u.section))
- r_index = N_ABS | N_EXT;
- else
+ relocs = finfo->relocs;
+ if (rel_size > 0)
{
- BFD_ASSERT (pr->u.section->owner == finfo->output_bfd);
- r_index = pr->u.section->target_index;
+ if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
+ || bfd_bread (relocs, rel_size, input_bfd) != rel_size)
+ return FALSE;
}
}
+
+ /* Relocate the section contents. */
+ if (obj_reloc_entry_size (input_bfd) == RELOC_STD_SIZE)
+ {
+ if (! aout_link_input_section_std (finfo, input_bfd, input_section,
+ (struct reloc_std_external *) relocs,
+ rel_size, finfo->contents))
+ return FALSE;
+ }
else
{
+ if (! aout_link_input_section_ext (finfo, input_bfd, input_section,
+ (struct reloc_ext_external *) relocs,
+ rel_size, finfo->contents))
+ return FALSE;
+ }
+
+ /* Write out the section contents. */
+ if (! bfd_set_section_contents (finfo->output_bfd,
+ input_section->output_section,
+ (void *) finfo->contents,
+ (file_ptr) input_section->output_offset,
+ input_size))
+ return FALSE;
+
+ /* If we are producing relocatable output, the relocs were
+ modified, and we now write them out. */
+ if (finfo->info->relocatable && rel_size > 0)
+ {
+ if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
+ return FALSE;
+ if (bfd_bwrite (relocs, rel_size, finfo->output_bfd) != rel_size)
+ return FALSE;
+ *reloff_ptr += rel_size;
+
+ /* Assert that the relocs have not run into the symbols, and
+ that if these are the text relocs they have not run into the
+ data relocs. */
+ BFD_ASSERT (*reloff_ptr <= obj_sym_filepos (finfo->output_bfd)
+ && (reloff_ptr != &finfo->treloff
+ || (*reloff_ptr
+ <= obj_datasec (finfo->output_bfd)->rel_filepos)));
+ }
+
+ return TRUE;
+}
+
+/* Adjust and write out the symbols for an a.out file. Set the new
+ symbol indices into a symbol_map. */
+
+static bfd_boolean
+aout_link_write_symbols (struct aout_final_link_info *finfo, bfd *input_bfd)
+{
+ bfd *output_bfd;
+ bfd_size_type sym_count;
+ char *strings;
+ enum bfd_link_strip strip;
+ enum bfd_link_discard discard;
+ struct external_nlist *outsym;
+ bfd_size_type strtab_index;
+ struct external_nlist *sym;
+ struct external_nlist *sym_end;
+ struct aout_link_hash_entry **sym_hash;
+ int *symbol_map;
+ bfd_boolean pass;
+ bfd_boolean skip_next;
+
+ output_bfd = finfo->output_bfd;
+ sym_count = obj_aout_external_sym_count (input_bfd);
+ strings = obj_aout_external_strings (input_bfd);
+ strip = finfo->info->strip;
+ discard = finfo->info->discard;
+ outsym = finfo->output_syms;
+
+ /* First write out a symbol for this object file, unless we are
+ discarding such symbols. */
+ if (strip != strip_all
+ && (strip != strip_some
+ || bfd_hash_lookup (finfo->info->keep_hash, input_bfd->filename,
+ FALSE, FALSE) != NULL)
+ && discard != discard_all)
+ {
+ H_PUT_8 (output_bfd, N_TEXT, outsym->e_type);
+ H_PUT_8 (output_bfd, 0, outsym->e_other);
+ H_PUT_16 (output_bfd, 0, outsym->e_desc);
+ strtab_index = add_to_stringtab (output_bfd, finfo->strtab,
+ input_bfd->filename, FALSE);
+ if (strtab_index == (bfd_size_type) -1)
+ return FALSE;
+ PUT_WORD (output_bfd, strtab_index, outsym->e_strx);
+ PUT_WORD (output_bfd,
+ (bfd_get_section_vma (output_bfd,
+ obj_textsec (input_bfd)->output_section)
+ + obj_textsec (input_bfd)->output_offset),
+ outsym->e_value);
+ ++obj_aout_external_sym_count (output_bfd);
+ ++outsym;
+ }
+
+ pass = FALSE;
+ skip_next = FALSE;
+ sym = obj_aout_external_syms (input_bfd);
+ sym_end = sym + sym_count;
+ sym_hash = obj_aout_sym_hashes (input_bfd);
+ symbol_map = finfo->symbol_map;
+ memset (symbol_map, 0, (size_t) sym_count * sizeof *symbol_map);
+ for (; sym < sym_end; sym++, sym_hash++, symbol_map++)
+ {
+ const char *name;
+ int type;
struct aout_link_hash_entry *h;
+ bfd_boolean skip;
+ asection *symsec;
+ bfd_vma val = 0;
+ bfd_boolean copy;
- BFD_ASSERT (p->type == bfd_symbol_reloc_link_order);
- r_extern = 1;
- h = ((struct aout_link_hash_entry *)
- bfd_wrapped_link_hash_lookup (finfo->output_bfd, finfo->info,
- pr->u.name, FALSE, FALSE, TRUE));
- if (h != (struct aout_link_hash_entry *) NULL
- && h->indx >= 0)
- r_index = h->indx;
- else if (h != NULL)
+ /* We set *symbol_map to 0 above for all symbols. If it has
+ already been set to -1 for this symbol, it means that we are
+ discarding it because it appears in a duplicate header file.
+ See the N_BINCL code below. */
+ if (*symbol_map == -1)
+ continue;
+
+ /* Initialize *symbol_map to -1, which means that the symbol was
+ not copied into the output file. We will change it later if
+ we do copy the symbol over. */
+ *symbol_map = -1;
+
+ type = H_GET_8 (input_bfd, sym->e_type);
+ name = strings + GET_WORD (input_bfd, sym->e_strx);
+
+ h = NULL;
+
+ if (pass)
{
- /* We decided to strip this symbol, but it turns out that we
- can't. Note that we lose the other and desc information
- here. I don't think that will ever matter for a global
+ /* Pass this symbol through. It is the target of an
+ indirect or warning symbol. */
+ val = GET_WORD (input_bfd, sym->e_value);
+ pass = FALSE;
+ }
+ else if (skip_next)
+ {
+ /* Skip this symbol, which is the target of an indirect
+ symbol that we have changed to no longer be an indirect
symbol. */
- h->indx = -2;
- h->written = FALSE;
- if (! aout_link_write_other_symbol (h, (PTR) finfo))
- return FALSE;
- r_index = h->indx;
+ skip_next = FALSE;
+ continue;
}
else
{
- if (! ((*finfo->info->callbacks->unattached_reloc)
- (finfo->info, pr->u.name, (bfd *) NULL,
- (asection *) NULL, (bfd_vma) 0)))
- return FALSE;
- r_index = 0;
+ struct aout_link_hash_entry *hresolve;
+
+ /* We have saved the hash table entry for this symbol, if
+ there is one. Note that we could just look it up again
+ in the hash table, provided we first check that it is an
+ external symbol. */
+ h = *sym_hash;
+
+ /* Use the name from the hash table, in case the symbol was
+ wrapped. */
+ if (h != NULL
+ && h->root.type != bfd_link_hash_warning)
+ name = h->root.root.string;
+
+ /* If this is an indirect or warning symbol, then change
+ hresolve to the base symbol. We also change *sym_hash so
+ that the relocation routines relocate against the real
+ symbol. */
+ hresolve = h;
+ if (h != (struct aout_link_hash_entry *) NULL
+ && (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning))
+ {
+ hresolve = (struct aout_link_hash_entry *) h->root.u.i.link;
+ while (hresolve->root.type == bfd_link_hash_indirect
+ || hresolve->root.type == bfd_link_hash_warning)
+ hresolve = ((struct aout_link_hash_entry *)
+ hresolve->root.u.i.link);
+ *sym_hash = hresolve;
+ }
+
+ /* If the symbol has already been written out, skip it. */
+ if (h != NULL
+ && h->written)
+ {
+ if ((type & N_TYPE) == N_INDR
+ || type == N_WARNING)
+ skip_next = TRUE;
+ *symbol_map = h->indx;
+ continue;
+ }
+
+ /* See if we are stripping this symbol. */
+ skip = FALSE;
+ switch (strip)
+ {
+ case strip_none:
+ break;
+ case strip_debugger:
+ if ((type & N_STAB) != 0)
+ skip = TRUE;
+ break;
+ case strip_some:
+ if (bfd_hash_lookup (finfo->info->keep_hash, name, FALSE, FALSE)
+ == NULL)
+ skip = TRUE;
+ break;
+ case strip_all:
+ skip = TRUE;
+ break;
+ }
+ if (skip)
+ {
+ if (h != NULL)
+ h->written = TRUE;
+ continue;
+ }
+
+ /* Get the value of the symbol. */
+ if ((type & N_TYPE) == N_TEXT
+ || type == N_WEAKT)
+ symsec = obj_textsec (input_bfd);
+ else if ((type & N_TYPE) == N_DATA
+ || type == N_WEAKD)
+ symsec = obj_datasec (input_bfd);
+ else if ((type & N_TYPE) == N_BSS
+ || type == N_WEAKB)
+ symsec = obj_bsssec (input_bfd);
+ else if ((type & N_TYPE) == N_ABS
+ || type == N_WEAKA)
+ symsec = bfd_abs_section_ptr;
+ else if (((type & N_TYPE) == N_INDR
+ && (hresolve == NULL
+ || (hresolve->root.type != bfd_link_hash_defined
+ && hresolve->root.type != bfd_link_hash_defweak
+ && hresolve->root.type != bfd_link_hash_common)))
+ || type == N_WARNING)
+ {
+ /* Pass the next symbol through unchanged. The
+ condition above for indirect symbols is so that if
+ the indirect symbol was defined, we output it with
+ the correct definition so the debugger will
+ understand it. */
+ pass = TRUE;
+ val = GET_WORD (input_bfd, sym->e_value);
+ symsec = NULL;
+ }
+ else if ((type & N_STAB) != 0)
+ {
+ val = GET_WORD (input_bfd, sym->e_value);
+ symsec = NULL;
+ }
+ else
+ {
+ /* If we get here with an indirect symbol, it means that
+ we are outputting it with a real definition. In such
+ a case we do not want to output the next symbol,
+ which is the target of the indirection. */
+ if ((type & N_TYPE) == N_INDR)
+ skip_next = TRUE;
+
+ symsec = NULL;
+
+ /* We need to get the value from the hash table. We use
+ hresolve so that if we have defined an indirect
+ symbol we output the final definition. */
+ if (h == NULL)
+ {
+ switch (type & N_TYPE)
+ {
+ case N_SETT:
+ symsec = obj_textsec (input_bfd);
+ break;
+ case N_SETD:
+ symsec = obj_datasec (input_bfd);
+ break;
+ case N_SETB:
+ symsec = obj_bsssec (input_bfd);
+ break;
+ case N_SETA:
+ symsec = bfd_abs_section_ptr;
+ break;
+ default:
+ val = 0;
+ break;
+ }
+ }
+ else if (hresolve->root.type == bfd_link_hash_defined
+ || hresolve->root.type == bfd_link_hash_defweak)
+ {
+ asection *input_section;
+ asection *output_section;
+
+ /* This case usually means a common symbol which was
+ turned into a defined symbol. */
+ input_section = hresolve->root.u.def.section;
+ output_section = input_section->output_section;
+ BFD_ASSERT (bfd_is_abs_section (output_section)
+ || output_section->owner == output_bfd);
+ val = (hresolve->root.u.def.value
+ + bfd_get_section_vma (output_bfd, output_section)
+ + input_section->output_offset);
+
+ /* Get the correct type based on the section. If
+ this is a constructed set, force it to be
+ globally visible. */
+ if (type == N_SETT
+ || type == N_SETD
+ || type == N_SETB
+ || type == N_SETA)
+ type |= N_EXT;
+
+ type &=~ N_TYPE;
+
+ if (output_section == obj_textsec (output_bfd))
+ type |= (hresolve->root.type == bfd_link_hash_defined
+ ? N_TEXT
+ : N_WEAKT);
+ else if (output_section == obj_datasec (output_bfd))
+ type |= (hresolve->root.type == bfd_link_hash_defined
+ ? N_DATA
+ : N_WEAKD);
+ else if (output_section == obj_bsssec (output_bfd))
+ type |= (hresolve->root.type == bfd_link_hash_defined
+ ? N_BSS
+ : N_WEAKB);
+ else
+ type |= (hresolve->root.type == bfd_link_hash_defined
+ ? N_ABS
+ : N_WEAKA);
+ }
+ else if (hresolve->root.type == bfd_link_hash_common)
+ val = hresolve->root.u.c.size;
+ else if (hresolve->root.type == bfd_link_hash_undefweak)
+ {
+ val = 0;
+ type = N_WEAKU;
+ }
+ else
+ val = 0;
+ }
+ if (symsec != NULL)
+ val = (symsec->output_section->vma
+ + symsec->output_offset
+ + (GET_WORD (input_bfd, sym->e_value)
+ - symsec->vma));
+
+ /* If this is a global symbol set the written flag, and if
+ it is a local symbol see if we should discard it. */
+ if (h != NULL)
+ {
+ h->written = TRUE;
+ h->indx = obj_aout_external_sym_count (output_bfd);
+ }
+ else if ((type & N_TYPE) != N_SETT
+ && (type & N_TYPE) != N_SETD
+ && (type & N_TYPE) != N_SETB
+ && (type & N_TYPE) != N_SETA)
+ {
+ switch (discard)
+ {
+ case discard_none:
+ case discard_sec_merge:
+ break;
+ case discard_l:
+ if ((type & N_STAB) == 0
+ && bfd_is_local_label_name (input_bfd, name))
+ skip = TRUE;
+ break;
+ case discard_all:
+ skip = TRUE;
+ break;
+ }
+ if (skip)
+ {
+ pass = FALSE;
+ continue;
+ }
+ }
+
+ /* An N_BINCL symbol indicates the start of the stabs
+ entries for a header file. We need to scan ahead to the
+ next N_EINCL symbol, ignoring nesting, adding up all the
+ characters in the symbol names, not including the file
+ numbers in types (the first number after an open
+ parenthesis). */
+ if (type == (int) N_BINCL)
+ {
+ struct external_nlist *incl_sym;
+ int nest;
+ struct aout_link_includes_entry *incl_entry;
+ struct aout_link_includes_totals *t;
+
+ val = 0;
+ nest = 0;
+ for (incl_sym = sym + 1; incl_sym < sym_end; incl_sym++)
+ {
+ int incl_type;
+
+ incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
+ if (incl_type == (int) N_EINCL)
+ {
+ if (nest == 0)
+ break;
+ --nest;
+ }
+ else if (incl_type == (int) N_BINCL)
+ ++nest;
+ else if (nest == 0)
+ {
+ const char *s;
+
+ s = strings + GET_WORD (input_bfd, incl_sym->e_strx);
+ for (; *s != '\0'; s++)
+ {
+ val += *s;
+ if (*s == '(')
+ {
+ /* Skip the file number. */
+ ++s;
+ while (ISDIGIT (*s))
+ ++s;
+ --s;
+ }
+ }
+ }
+ }
+
+ /* If we have already included a header file with the
+ same value, then replace this one with an N_EXCL
+ symbol. */
+ copy = (bfd_boolean) (! finfo->info->keep_memory);
+ incl_entry = aout_link_includes_lookup (&finfo->includes,
+ name, TRUE, copy);
+ if (incl_entry == NULL)
+ return FALSE;
+ for (t = incl_entry->totals; t != NULL; t = t->next)
+ if (t->total == val)
+ break;
+ if (t == NULL)
+ {
+ /* This is the first time we have seen this header
+ file with this set of stabs strings. */
+ t = bfd_hash_allocate (&finfo->includes.root,
+ sizeof *t);
+ if (t == NULL)
+ return FALSE;
+ t->total = val;
+ t->next = incl_entry->totals;
+ incl_entry->totals = t;
+ }
+ else
+ {
+ int *incl_map;
+
+ /* This is a duplicate header file. We must change
+ it to be an N_EXCL entry, and mark all the
+ included symbols to prevent outputting them. */
+ type = (int) N_EXCL;
+
+ nest = 0;
+ for (incl_sym = sym + 1, incl_map = symbol_map + 1;
+ incl_sym < sym_end;
+ incl_sym++, incl_map++)
+ {
+ int incl_type;
+
+ incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
+ if (incl_type == (int) N_EINCL)
+ {
+ if (nest == 0)
+ {
+ *incl_map = -1;
+ break;
+ }
+ --nest;
+ }
+ else if (incl_type == (int) N_BINCL)
+ ++nest;
+ else if (nest == 0)
+ *incl_map = -1;
+ }
+ }
+ }
+ }
+
+ /* Copy this symbol into the list of symbols we are going to
+ write out. */
+ H_PUT_8 (output_bfd, type, outsym->e_type);
+ H_PUT_8 (output_bfd, H_GET_8 (input_bfd, sym->e_other), outsym->e_other);
+ H_PUT_16 (output_bfd, H_GET_16 (input_bfd, sym->e_desc), outsym->e_desc);
+ copy = FALSE;
+ if (! finfo->info->keep_memory)
+ {
+ /* name points into a string table which we are going to
+ free. If there is a hash table entry, use that string.
+ Otherwise, copy name into memory. */
+ if (h != NULL)
+ name = h->root.root.string;
+ else
+ copy = TRUE;
}
+ strtab_index = add_to_stringtab (output_bfd, finfo->strtab,
+ name, copy);
+ if (strtab_index == (bfd_size_type) -1)
+ return FALSE;
+ PUT_WORD (output_bfd, strtab_index, outsym->e_strx);
+ PUT_WORD (output_bfd, val, outsym->e_value);
+ *symbol_map = obj_aout_external_sym_count (output_bfd);
+ ++obj_aout_external_sym_count (output_bfd);
+ ++outsym;
}
- howto = bfd_reloc_type_lookup (finfo->output_bfd, pr->reloc);
- if (howto == 0)
+ /* Write out the output symbols we have just constructed. */
+ if (outsym > finfo->output_syms)
{
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ bfd_size_type outsym_size;
+
+ if (bfd_seek (output_bfd, finfo->symoff, SEEK_SET) != 0)
+ return FALSE;
+ outsym_size = outsym - finfo->output_syms;
+ outsym_size *= EXTERNAL_NLIST_SIZE;
+ if (bfd_bwrite ((void *) finfo->output_syms, outsym_size, output_bfd)
+ != outsym_size)
+ return FALSE;
+ finfo->symoff += outsym_size;
}
- if (o == obj_textsec (finfo->output_bfd))
- reloff_ptr = &finfo->treloff;
- else if (o == obj_datasec (finfo->output_bfd))
- reloff_ptr = &finfo->dreloff;
- else
- abort ();
+ return TRUE;
+}
- if (obj_reloc_entry_size (finfo->output_bfd) == RELOC_STD_SIZE)
+/* Link an a.out input BFD into the output file. */
+
+static bfd_boolean
+aout_link_input_bfd (struct aout_final_link_info *finfo, bfd *input_bfd)
+{
+ bfd_size_type sym_count;
+
+ BFD_ASSERT (bfd_get_format (input_bfd) == bfd_object);
+
+ /* If this is a dynamic object, it may need special handling. */
+ if ((input_bfd->flags & DYNAMIC) != 0
+ && aout_backend_info (input_bfd)->link_dynamic_object != NULL)
+ return ((*aout_backend_info (input_bfd)->link_dynamic_object)
+ (finfo->info, input_bfd));
+
+ /* Get the symbols. We probably have them already, unless
+ finfo->info->keep_memory is FALSE. */
+ if (! aout_get_external_symbols (input_bfd))
+ return FALSE;
+
+ sym_count = obj_aout_external_sym_count (input_bfd);
+
+ /* Write out the symbols and get a map of the new indices. The map
+ is placed into finfo->symbol_map. */
+ if (! aout_link_write_symbols (finfo, input_bfd))
+ return FALSE;
+
+ /* Relocate and write out the sections. These functions use the
+ symbol map created by aout_link_write_symbols. The linker_mark
+ field will be set if these sections are to be included in the
+ link, which will normally be the case. */
+ if (obj_textsec (input_bfd)->linker_mark)
{
-#ifdef MY_put_reloc
- MY_put_reloc (finfo->output_bfd, r_extern, r_index, p->offset, howto,
- &srel);
-#else
- {
- int r_pcrel;
- int r_baserel;
- int r_jmptable;
- int r_relative;
- int r_length;
+ if (! aout_link_input_section (finfo, input_bfd,
+ obj_textsec (input_bfd),
+ &finfo->treloff,
+ exec_hdr (input_bfd)->a_trsize))
+ return FALSE;
+ }
+ if (obj_datasec (input_bfd)->linker_mark)
+ {
+ if (! aout_link_input_section (finfo, input_bfd,
+ obj_datasec (input_bfd),
+ &finfo->dreloff,
+ exec_hdr (input_bfd)->a_drsize))
+ return FALSE;
+ }
- r_pcrel = (int) howto->pc_relative;
- r_baserel = (howto->type & 8) != 0;
- r_jmptable = (howto->type & 16) != 0;
- r_relative = (howto->type & 32) != 0;
- r_length = howto->size;
+ /* If we are not keeping memory, we don't need the symbols any
+ longer. We still need them if we are keeping memory, because the
+ strings in the hash table point into them. */
+ if (! finfo->info->keep_memory)
+ {
+ if (! aout_link_free_symbols (input_bfd))
+ return FALSE;
+ }
- PUT_WORD (finfo->output_bfd, p->offset, srel.r_address);
- if (bfd_header_big_endian (finfo->output_bfd))
- {
- srel.r_index[0] = r_index >> 16;
- srel.r_index[1] = r_index >> 8;
- srel.r_index[2] = r_index;
- srel.r_type[0] =
- ((r_extern ? RELOC_STD_BITS_EXTERN_BIG : 0)
- | (r_pcrel ? RELOC_STD_BITS_PCREL_BIG : 0)
- | (r_baserel ? RELOC_STD_BITS_BASEREL_BIG : 0)
- | (r_jmptable ? RELOC_STD_BITS_JMPTABLE_BIG : 0)
- | (r_relative ? RELOC_STD_BITS_RELATIVE_BIG : 0)
- | (r_length << RELOC_STD_BITS_LENGTH_SH_BIG));
- }
- else
- {
- srel.r_index[2] = r_index >> 16;
- srel.r_index[1] = r_index >> 8;
- srel.r_index[0] = r_index;
- srel.r_type[0] =
- ((r_extern ? RELOC_STD_BITS_EXTERN_LITTLE : 0)
- | (r_pcrel ? RELOC_STD_BITS_PCREL_LITTLE : 0)
- | (r_baserel ? RELOC_STD_BITS_BASEREL_LITTLE : 0)
- | (r_jmptable ? RELOC_STD_BITS_JMPTABLE_LITTLE : 0)
- | (r_relative ? RELOC_STD_BITS_RELATIVE_LITTLE : 0)
- | (r_length << RELOC_STD_BITS_LENGTH_SH_LITTLE));
- }
- }
-#endif
- rel_ptr = (PTR) &srel;
+ return TRUE;
+}
- /* We have to write the addend into the object file, since
- standard a.out relocs are in place. It would be more
- reliable if we had the current contents of the file here,
- rather than assuming zeroes, but we can't read the file since
- it was opened using bfd_openw. */
- if (pr->addend != 0)
- {
- bfd_size_type size;
- bfd_reloc_status_type r;
- bfd_byte *buf;
- bfd_boolean ok;
+/* Do the final link step. This is called on the output BFD. The
+ INFO structure should point to a list of BFDs linked through the
+ link_next field which can be used to find each BFD which takes part
+ in the output. Also, each section in ABFD should point to a list
+ of bfd_link_order structures which list all the input sections for
+ the output section. */
- size = bfd_get_reloc_size (howto);
- buf = (bfd_byte *) bfd_zmalloc (size);
- if (buf == (bfd_byte *) NULL)
- return FALSE;
- r = MY_relocate_contents (howto, finfo->output_bfd,
- (bfd_vma) pr->addend, buf);
- switch (r)
+bfd_boolean
+NAME (aout, final_link) (bfd *abfd,
+ struct bfd_link_info *info,
+ void (*callback) (bfd *, file_ptr *, file_ptr *, file_ptr *))
+{
+ struct aout_final_link_info aout_info;
+ bfd_boolean includes_hash_initialized = FALSE;
+ bfd *sub;
+ bfd_size_type trsize, drsize;
+ bfd_size_type max_contents_size;
+ bfd_size_type max_relocs_size;
+ bfd_size_type max_sym_count;
+ bfd_size_type text_size;
+ file_ptr text_end;
+ struct bfd_link_order *p;
+ asection *o;
+ bfd_boolean have_link_order_relocs;
+
+ if (info->shared)
+ abfd->flags |= DYNAMIC;
+
+ aout_info.info = info;
+ aout_info.output_bfd = abfd;
+ aout_info.contents = NULL;
+ aout_info.relocs = NULL;
+ aout_info.symbol_map = NULL;
+ aout_info.output_syms = NULL;
+
+ if (!bfd_hash_table_init_n (&aout_info.includes.root,
+ aout_link_includes_newfunc,
+ sizeof (struct aout_link_includes_entry),
+ 251))
+ goto error_return;
+ includes_hash_initialized = TRUE;
+
+ /* Figure out the largest section size. Also, if generating
+ relocatable output, count the relocs. */
+ trsize = 0;
+ drsize = 0;
+ max_contents_size = 0;
+ max_relocs_size = 0;
+ max_sym_count = 0;
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ {
+ bfd_size_type sz;
+
+ if (info->relocatable)
+ {
+ if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
{
- case bfd_reloc_ok:
- break;
- default:
- case bfd_reloc_outofrange:
- abort ();
- case bfd_reloc_overflow:
- if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info,
- (p->type == bfd_section_reloc_link_order
- ? bfd_section_name (finfo->output_bfd,
- pr->u.section)
- : pr->u.name),
- howto->name, pr->addend, (bfd *) NULL,
- (asection *) NULL, (bfd_vma) 0)))
- {
- free (buf);
- return FALSE;
- }
- break;
+ trsize += exec_hdr (sub)->a_trsize;
+ drsize += exec_hdr (sub)->a_drsize;
}
- ok = bfd_set_section_contents (finfo->output_bfd, o, (PTR) buf,
- (file_ptr) p->offset, size);
- free (buf);
- if (! ok)
- return FALSE;
+ else
+ {
+ /* FIXME: We need to identify the .text and .data sections
+ and call get_reloc_upper_bound and canonicalize_reloc to
+ work out the number of relocs needed, and then multiply
+ by the reloc size. */
+ (*_bfd_error_handler)
+ (_("%s: relocatable link from %s to %s not supported"),
+ bfd_get_filename (abfd),
+ sub->xvec->name, abfd->xvec->name);
+ bfd_set_error (bfd_error_invalid_operation);
+ goto error_return;
+ }
+ }
+
+ if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
+ {
+ sz = obj_textsec (sub)->size;
+ if (sz > max_contents_size)
+ max_contents_size = sz;
+ sz = obj_datasec (sub)->size;
+ if (sz > max_contents_size)
+ max_contents_size = sz;
+
+ sz = exec_hdr (sub)->a_trsize;
+ if (sz > max_relocs_size)
+ max_relocs_size = sz;
+ sz = exec_hdr (sub)->a_drsize;
+ if (sz > max_relocs_size)
+ max_relocs_size = sz;
+
+ sz = obj_aout_external_sym_count (sub);
+ if (sz > max_sym_count)
+ max_sym_count = sz;
}
}
- else
+
+ if (info->relocatable)
{
-#ifdef MY_put_ext_reloc
- MY_put_ext_reloc (finfo->output_bfd, r_extern, r_index, p->offset,
- howto, &erel, pr->addend);
-#else
- PUT_WORD (finfo->output_bfd, p->offset, erel.r_address);
+ if (obj_textsec (abfd) != NULL)
+ trsize += (_bfd_count_link_order_relocs (obj_textsec (abfd)
+ ->map_head.link_order)
+ * obj_reloc_entry_size (abfd));
+ if (obj_datasec (abfd) != NULL)
+ drsize += (_bfd_count_link_order_relocs (obj_datasec (abfd)
+ ->map_head.link_order)
+ * obj_reloc_entry_size (abfd));
+ }
- if (bfd_header_big_endian (finfo->output_bfd))
+ exec_hdr (abfd)->a_trsize = trsize;
+ exec_hdr (abfd)->a_drsize = drsize;
+
+ exec_hdr (abfd)->a_entry = bfd_get_start_address (abfd);
+
+ /* Adjust the section sizes and vmas according to the magic number.
+ This sets a_text, a_data and a_bss in the exec_hdr and sets the
+ filepos for each section. */
+ if (! NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end))
+ goto error_return;
+
+ /* The relocation and symbol file positions differ among a.out
+ targets. We are passed a callback routine from the backend
+ specific code to handle this.
+ FIXME: At this point we do not know how much space the symbol
+ table will require. This will not work for any (nonstandard)
+ a.out target that needs to know the symbol table size before it
+ can compute the relocation file positions. This may or may not
+ be the case for the hp300hpux target, for example. */
+ (*callback) (abfd, &aout_info.treloff, &aout_info.dreloff,
+ &aout_info.symoff);
+ obj_textsec (abfd)->rel_filepos = aout_info.treloff;
+ obj_datasec (abfd)->rel_filepos = aout_info.dreloff;
+ obj_sym_filepos (abfd) = aout_info.symoff;
+
+ /* We keep a count of the symbols as we output them. */
+ obj_aout_external_sym_count (abfd) = 0;
+
+ /* We accumulate the string table as we write out the symbols. */
+ aout_info.strtab = _bfd_stringtab_init ();
+ if (aout_info.strtab == NULL)
+ goto error_return;
+
+ /* Allocate buffers to hold section contents and relocs. */
+ aout_info.contents = bfd_malloc (max_contents_size);
+ aout_info.relocs = bfd_malloc (max_relocs_size);
+ aout_info.symbol_map = bfd_malloc (max_sym_count * sizeof (int *));
+ aout_info.output_syms = bfd_malloc ((max_sym_count + 1)
+ * sizeof (struct external_nlist));
+ if ((aout_info.contents == NULL && max_contents_size != 0)
+ || (aout_info.relocs == NULL && max_relocs_size != 0)
+ || (aout_info.symbol_map == NULL && max_sym_count != 0)
+ || aout_info.output_syms == NULL)
+ goto error_return;
+
+ /* If we have a symbol named __DYNAMIC, force it out now. This is
+ required by SunOS. Doing this here rather than in sunos.c is a
+ hack, but it's easier than exporting everything which would be
+ needed. */
+ {
+ struct aout_link_hash_entry *h;
+
+ h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC",
+ FALSE, FALSE, FALSE);
+ if (h != NULL)
+ aout_link_write_other_symbol (h, &aout_info);
+ }
+
+ /* The most time efficient way to do the link would be to read all
+ the input object files into memory and then sort out the
+ information into the output file. Unfortunately, that will
+ probably use too much memory. Another method would be to step
+ through everything that composes the text section and write it
+ out, and then everything that composes the data section and write
+ it out, and then write out the relocs, and then write out the
+ symbols. Unfortunately, that requires reading stuff from each
+ input file several times, and we will not be able to keep all the
+ input files open simultaneously, and reopening them will be slow.
+
+ What we do is basically process one input file at a time. We do
+ everything we need to do with an input file once--copy over the
+ section contents, handle the relocation information, and write
+ out the symbols--and then we throw away the information we read
+ from it. This approach requires a lot of lseeks of the output
+ file, which is unfortunate but still faster than reopening a lot
+ of files.
+
+ We use the output_has_begun field of the input BFDs to see
+ whether we have already handled it. */
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ sub->output_has_begun = FALSE;
+
+ /* Mark all sections which are to be included in the link. This
+ will normally be every section. We need to do this so that we
+ can identify any sections which the linker has decided to not
+ include. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
+ if (p->type == bfd_indirect_link_order)
+ p->u.indirect.section->linker_mark = TRUE;
+ }
+
+ have_link_order_relocs = FALSE;
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ for (p = o->map_head.link_order;
+ p != NULL;
+ p = p->next)
{
- erel.r_index[0] = r_index >> 16;
- erel.r_index[1] = r_index >> 8;
- erel.r_index[2] = r_index;
- erel.r_type[0] =
- ((r_extern ? RELOC_EXT_BITS_EXTERN_BIG : 0)
- | (howto->type << RELOC_EXT_BITS_TYPE_SH_BIG));
+ if (p->type == bfd_indirect_link_order
+ && (bfd_get_flavour (p->u.indirect.section->owner)
+ == bfd_target_aout_flavour))
+ {
+ bfd *input_bfd;
+
+ input_bfd = p->u.indirect.section->owner;
+ if (! input_bfd->output_has_begun)
+ {
+ if (! aout_link_input_bfd (&aout_info, input_bfd))
+ goto error_return;
+ input_bfd->output_has_begun = TRUE;
+ }
+ }
+ else if (p->type == bfd_section_reloc_link_order
+ || p->type == bfd_symbol_reloc_link_order)
+ {
+ /* These are handled below. */
+ have_link_order_relocs = TRUE;
+ }
+ else
+ {
+ if (! _bfd_default_link_order (abfd, info, o, p))
+ goto error_return;
+ }
}
- else
+ }
+
+ /* Write out any symbols that we have not already written out. */
+ aout_link_hash_traverse (aout_hash_table (info),
+ aout_link_write_other_symbol,
+ (void *) &aout_info);
+
+ /* Now handle any relocs we were asked to create by the linker.
+ These did not come from any input file. We must do these after
+ we have written out all the symbols, so that we know the symbol
+ indices to use. */
+ if (have_link_order_relocs)
+ {
+ for (o = abfd->sections; o != NULL; o = o->next)
{
- erel.r_index[2] = r_index >> 16;
- erel.r_index[1] = r_index >> 8;
- erel.r_index[0] = r_index;
- erel.r_type[0] =
- (r_extern ? RELOC_EXT_BITS_EXTERN_LITTLE : 0)
- | (howto->type << RELOC_EXT_BITS_TYPE_SH_LITTLE);
+ for (p = o->map_head.link_order;
+ p != NULL;
+ p = p->next)
+ {
+ if (p->type == bfd_section_reloc_link_order
+ || p->type == bfd_symbol_reloc_link_order)
+ {
+ if (! aout_link_reloc_link_order (&aout_info, o, p))
+ goto error_return;
+ }
+ }
}
+ }
- PUT_WORD (finfo->output_bfd, (bfd_vma) pr->addend, erel.r_addend);
-#endif /* MY_put_ext_reloc */
+ if (aout_info.contents != NULL)
+ {
+ free (aout_info.contents);
+ aout_info.contents = NULL;
+ }
+ if (aout_info.relocs != NULL)
+ {
+ free (aout_info.relocs);
+ aout_info.relocs = NULL;
+ }
+ if (aout_info.symbol_map != NULL)
+ {
+ free (aout_info.symbol_map);
+ aout_info.symbol_map = NULL;
+ }
+ if (aout_info.output_syms != NULL)
+ {
+ free (aout_info.output_syms);
+ aout_info.output_syms = NULL;
+ }
+ if (includes_hash_initialized)
+ {
+ bfd_hash_table_free (&aout_info.includes.root);
+ includes_hash_initialized = FALSE;
+ }
- rel_ptr = (PTR) &erel;
+ /* Finish up any dynamic linking we may be doing. */
+ if (aout_backend_info (abfd)->finish_dynamic_link != NULL)
+ {
+ if (! (*aout_backend_info (abfd)->finish_dynamic_link) (abfd, info))
+ goto error_return;
}
- amt = obj_reloc_entry_size (finfo->output_bfd);
- if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0
- || bfd_bwrite (rel_ptr, amt, finfo->output_bfd) != amt)
- return FALSE;
+ /* Update the header information. */
+ abfd->symcount = obj_aout_external_sym_count (abfd);
+ exec_hdr (abfd)->a_syms = abfd->symcount * EXTERNAL_NLIST_SIZE;
+ obj_str_filepos (abfd) = obj_sym_filepos (abfd) + exec_hdr (abfd)->a_syms;
+ obj_textsec (abfd)->reloc_count =
+ exec_hdr (abfd)->a_trsize / obj_reloc_entry_size (abfd);
+ obj_datasec (abfd)->reloc_count =
+ exec_hdr (abfd)->a_drsize / obj_reloc_entry_size (abfd);
- *reloff_ptr += obj_reloc_entry_size (finfo->output_bfd);
+ /* Write out the string table, unless there are no symbols. */
+ if (abfd->symcount > 0)
+ {
+ if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0
+ || ! emit_stringtab (abfd, aout_info.strtab))
+ goto error_return;
+ }
+ else if (obj_textsec (abfd)->reloc_count == 0
+ && obj_datasec (abfd)->reloc_count == 0)
+ {
+ bfd_byte b;
+ file_ptr pos;
- /* Assert that the relocs have not run into the symbols, and that n
- the text relocs have not run into the data relocs. */
- BFD_ASSERT (*reloff_ptr <= obj_sym_filepos (finfo->output_bfd)
- && (reloff_ptr != &finfo->treloff
- || (*reloff_ptr
- <= obj_datasec (finfo->output_bfd)->rel_filepos)));
+ b = 0;
+ pos = obj_datasec (abfd)->filepos + exec_hdr (abfd)->a_data - 1;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1)
+ goto error_return;
+ }
return TRUE;
+
+ error_return:
+ if (aout_info.contents != NULL)
+ free (aout_info.contents);
+ if (aout_info.relocs != NULL)
+ free (aout_info.relocs);
+ if (aout_info.symbol_map != NULL)
+ free (aout_info.symbol_map);
+ if (aout_info.output_syms != NULL)
+ free (aout_info.output_syms);
+ if (includes_hash_initialized)
+ bfd_hash_table_free (&aout_info.includes.root);
+ return FALSE;
}
diff --git a/contrib/binutils/bfd/archive.c b/contrib/binutils/bfd/archive.c
index ba6e684ee234..5a12f01f7cc5 100644
--- a/contrib/binutils/bfd/archive.c
+++ b/contrib/binutils/bfd/archive.c
@@ -1,24 +1,24 @@
/* BFD back-end for archive files (libraries).
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
@setfilename archive-info
@@ -74,6 +74,8 @@ DESCRIPTION
Archives are supported in BFD in <<archive.c>>.
+SUBSECTION
+ Archive functions
*/
/* Assumes:
@@ -121,7 +123,7 @@ DESCRIPTION
Regular files with long names (or embedded spaces, for BSD variants):
"/18 " - SVR4 style, name at offset 18 in name table.
- "#1/23 " - Long name (or embedded paces) 23 characters long,
+ "#1/23 " - Long name (or embedded spaces) 23 characters long,
BSD 4.4 style, full name follows header.
Implemented for reading, not writing.
" 18 " - Long name 18 characters long, extended pseudo-BSD.
@@ -129,19 +131,17 @@ DESCRIPTION
#include "bfd.h"
#include "sysdep.h"
+#include "libiberty.h"
#include "libbfd.h"
#include "aout/ar.h"
#include "aout/ranlib.h"
#include "safe-ctype.h"
+#include "hashtab.h"
#ifndef errno
extern int errno;
#endif
-#ifdef GNU960
-#define BFD_GNU960_ARMAG(abfd) (BFD_COFF_FILE_P((abfd)) ? ARMAG : ARMAGB)
-#endif
-
/* We keep a cache of archive filepointers to archive elements to
speed up searching the archive by filepos. We only add an entry to
the cache when we actually read one. We also don't sort the cache;
@@ -150,8 +150,7 @@ extern int errno;
to the front of the contents! */
struct ar_cache {
file_ptr ptr;
- bfd *arelt;
- struct ar_cache *next;
+ bfd *arbfd;
};
#define ar_padchar(abfd) ((abfd)->xvec->ar_pad_char)
@@ -159,7 +158,22 @@ struct ar_cache {
#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
#define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata(bfd)->arch_header)
-
+
+void
+_bfd_ar_spacepad (char *p, size_t n, const char *fmt, long val)
+{
+ static char buf[20];
+ size_t len;
+ snprintf (buf, sizeof (buf), fmt, val);
+ len = strlen (buf);
+ if (len < n)
+ {
+ memcpy (p, buf, len);
+ memset (p + len, ' ', n - len);
+ }
+ else
+ memcpy (p, buf, n);
+}
bfd_boolean
_bfd_generic_mkarchive (bfd *abfd)
@@ -170,11 +184,13 @@ _bfd_generic_mkarchive (bfd *abfd)
if (bfd_ardata (abfd) == NULL)
return FALSE;
- bfd_ardata (abfd)->cache = NULL;
- bfd_ardata (abfd)->archive_head = NULL;
- bfd_ardata (abfd)->symdefs = NULL;
- bfd_ardata (abfd)->extended_names = NULL;
- bfd_ardata (abfd)->tdata = NULL;
+ /* Already cleared by bfd_zalloc above.
+ bfd_ardata (abfd)->cache = NULL;
+ bfd_ardata (abfd)->archive_head = NULL;
+ bfd_ardata (abfd)->symdefs = NULL;
+ bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->extended_names_size = 0;
+ bfd_ardata (abfd)->tdata = NULL; */
return TRUE;
}
@@ -221,7 +237,7 @@ bfd_get_next_mapent (bfd *abfd, symindex prev, carsym **entry)
return prev;
}
-/* To be called by backends only */
+/* To be called by backends only. */
bfd *
_bfd_create_empty_archive_element_shell (bfd *obfd)
@@ -251,40 +267,62 @@ bfd_set_archive_head (bfd *output_archive, bfd *new_head)
bfd *
_bfd_look_for_bfd_in_cache (bfd *arch_bfd, file_ptr filepos)
{
- struct ar_cache *current;
+ htab_t hash_table = bfd_ardata (arch_bfd)->cache;
+ struct ar_cache m;
+ m.ptr = filepos;
- for (current = bfd_ardata (arch_bfd)->cache; current != NULL;
- current = current->next)
- if (current->ptr == filepos)
- return current->arelt;
+ if (hash_table)
+ {
+ struct ar_cache *entry = (struct ar_cache *) htab_find (hash_table, &m);
+ if (!entry)
+ return NULL;
+ else
+ return entry->arbfd;
+ }
+ else
+ return NULL;
+}
- return NULL;
+static hashval_t
+hash_file_ptr (const PTR p)
+{
+ return (hashval_t) (((struct ar_cache *) p)->ptr);
+}
+
+/* Returns non-zero if P1 and P2 are equal. */
+
+static int
+eq_file_ptr (const PTR p1, const PTR p2)
+{
+ struct ar_cache *arc1 = (struct ar_cache *) p1;
+ struct ar_cache *arc2 = (struct ar_cache *) p2;
+ return arc1->ptr == arc2->ptr;
}
-/* Kind of stupid to call cons for each one, but we don't do too many */
+/* Kind of stupid to call cons for each one, but we don't do too many. */
+
bfd_boolean
_bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
{
- bfd_size_type amt = sizeof (struct ar_cache);
-
- struct ar_cache *new_cache = bfd_zalloc (arch_bfd, amt);
- if (new_cache == NULL)
- return FALSE;
+ struct ar_cache *cache;
+ htab_t hash_table = bfd_ardata (arch_bfd)->cache;
- new_cache->ptr = filepos;
- new_cache->arelt = new_elt;
- new_cache->next = NULL;
- if (bfd_ardata (arch_bfd)->cache == NULL)
- bfd_ardata (arch_bfd)->cache = new_cache;
- else
+ /* If the hash table hasn't been created, create it. */
+ if (hash_table == NULL)
{
- struct ar_cache *current = bfd_ardata (arch_bfd)->cache;
-
- while (current->next != NULL)
- current = current->next;
- current->next = new_cache;
+ hash_table = htab_create_alloc (16, hash_file_ptr, eq_file_ptr,
+ NULL, calloc, free);
+ if (hash_table == NULL)
+ return FALSE;
+ bfd_ardata (arch_bfd)->cache = hash_table;
}
+ /* Insert new_elt into the hash table by filepos. */
+ cache = bfd_zalloc (arch_bfd, sizeof (struct ar_cache));
+ cache->ptr = filepos;
+ cache->arbfd = new_elt;
+ *htab_find_slot (hash_table, (const void *) cache, INSERT) = cache;
+
return TRUE;
}
@@ -301,7 +339,7 @@ get_extended_arelt_filename (bfd *arch, const char *name)
errno = 0;
/* Skip first char, which is '/' in SVR4 or ' ' in some other variants. */
index = strtol (name + 1, NULL, 10);
- if (errno != 0)
+ if (errno != 0 || index >= bfd_ardata (arch)->extended_names_size)
{
bfd_set_error (bfd_error_malformed_archive);
return NULL;
@@ -316,8 +354,7 @@ get_extended_arelt_filename (bfd *arch, const char *name)
Presumes the file pointer is already in the right place (ie pointing
to the ar_hdr in the file). Moves the file pointer; on success it
should be pointing to the front of the file contents; on failure it
- could have been moved arbitrarily.
-*/
+ could have been moved arbitrarily. */
void *
_bfd_generic_read_ar_hdr (bfd *abfd)
@@ -372,10 +409,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag)
{
filename = get_extended_arelt_filename (abfd, hdr.ar_name);
if (filename == NULL)
- {
- bfd_set_error (bfd_error_malformed_archive);
- return NULL;
- }
+ return NULL;
}
/* BSD4.4-style long filename.
Only implemented for reading, so far! */
@@ -467,6 +501,12 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
struct areltdata *new_areldata;
bfd *n_nfd;
+ if (archive->my_archive)
+ {
+ filepos += archive->origin;
+ archive = archive->my_archive;
+ }
+
n_nfd = _bfd_look_for_bfd_in_cache (archive, filepos);
if (n_nfd)
return n_nfd;
@@ -549,10 +589,12 @@ bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file)
else
{
unsigned int size = arelt_size (last_file);
+ filestart = last_file->origin + size;
+ if (archive->my_archive)
+ filestart -= archive->origin;
/* Pad to an even boundary...
Note that last_file->origin can be odd in the case of
BSD-4.4-style element with a long odd size. */
- filestart = last_file->origin + size;
filestart += filestart % 2;
}
@@ -573,14 +615,9 @@ bfd_generic_archive_p (bfd *abfd)
return NULL;
}
-#ifdef GNU960
- if (strncmp (armag, BFD_GNU960_ARMAG (abfd), SARMAG) != 0)
- return 0;
-#else
if (strncmp (armag, ARMAG, SARMAG) != 0 &&
strncmp (armag, ARMAGB, SARMAG) != 0)
return 0;
-#endif
tdata_hold = bfd_ardata (abfd);
@@ -593,11 +630,13 @@ bfd_generic_archive_p (bfd *abfd)
}
bfd_ardata (abfd)->first_file_filepos = SARMAG;
- bfd_ardata (abfd)->cache = NULL;
- bfd_ardata (abfd)->archive_head = NULL;
- bfd_ardata (abfd)->symdefs = NULL;
- bfd_ardata (abfd)->extended_names = NULL;
- bfd_ardata (abfd)->tdata = NULL;
+ /* Cleared by bfd_zalloc above.
+ bfd_ardata (abfd)->cache = NULL;
+ bfd_ardata (abfd)->archive_head = NULL;
+ bfd_ardata (abfd)->symdefs = NULL;
+ bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->extended_names_size = 0;
+ bfd_ardata (abfd)->tdata = NULL; */
if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd))
|| !BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd)))
@@ -634,14 +673,6 @@ bfd_generic_archive_p (bfd *abfd)
if (bfd_check_format (first, bfd_object)
&& first->xvec != abfd->xvec)
{
-#if 0
- /* We ought to close `first' here, but we can't, because
- we have no way to remove it from the archive cache.
- It's close to impossible to figure out when we can
- release bfd_ardata. FIXME. */
- bfd_close (first);
- bfd_release (abfd, bfd_ardata (abfd));
-#endif
bfd_set_error (bfd_error_wrong_object_format);
bfd_ardata (abfd) = tdata_hold;
return NULL;
@@ -670,7 +701,7 @@ bfd_generic_archive_p (bfd *abfd)
/* The size of the string count. */
#define BSD_STRING_COUNT_SIZE 4
-/* Returns FALSE on error, TRUE otherwise */
+/* Returns FALSE on error, TRUE otherwise. */
static bfd_boolean
do_slurp_bsd_armap (bfd *abfd)
@@ -776,7 +807,6 @@ do_slurp_coff_armap (bfd *abfd)
nsymz = bfd_getb32 (int_buf);
stringsize = parsed_size - (4 * nsymz) - 4;
-#if 1
/* ... except that some archive formats are broken, and it may be our
fault - the i960 little endian coff sometimes has big and sometimes
little, because our tools changed. Here's a horrible hack to clean
@@ -791,14 +821,19 @@ do_slurp_coff_armap (bfd *abfd)
stringsize = parsed_size - (4 * nsymz) - 4;
swap = bfd_getl32;
}
-#endif
/* The coff armap must be read sequentially. So we construct a
bsd-style one in core all at once, for simplicity. */
+ if (nsymz > ~ (bfd_size_type) 0 / sizeof (carsym))
+ return FALSE;
+
carsym_size = (nsymz * sizeof (carsym));
ptrsize = (4 * nsymz);
+ if (carsym_size + stringsize + 1 <= carsym_size)
+ return FALSE;
+
ardata->symdefs = bfd_zalloc (abfd, carsym_size + stringsize + 1);
if (ardata->symdefs == NULL)
return FALSE;
@@ -901,8 +936,8 @@ bfd_slurp_armap (bfd *abfd)
return TRUE;
}
-/* Returns FALSE on error, TRUE otherwise */
-/* flavor 2 of a bsd armap, similar to bfd_slurp_bsd_armap except the
+/* Returns FALSE on error, TRUE otherwise. */
+/* Flavor 2 of a bsd armap, similar to bfd_slurp_bsd_armap except the
header is in a slightly different order and the map name is '/'.
This flavour is used by hp300hpux. */
@@ -932,7 +967,7 @@ bfd_slurp_bsd_armap_f2 (bfd *abfd)
return FALSE;
if (!strncmp (nextname, "__.SYMDEF ", 16)
- || !strncmp (nextname, "__.SYMDEF/ ", 16)) /* old Linux archives */
+ || !strncmp (nextname, "__.SYMDEF/ ", 16)) /* Old Linux archives. */
return do_slurp_bsd_armap (abfd);
if (strncmp (nextname, "/ ", 16))
@@ -1035,6 +1070,7 @@ _bfd_slurp_extended_name_table (bfd *abfd)
strncmp (nextname, "// ", 16) != 0)
{
bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->extended_names_size = 0;
return TRUE;
}
@@ -1043,7 +1079,11 @@ _bfd_slurp_extended_name_table (bfd *abfd)
return FALSE;
amt = namedata->parsed_size;
- bfd_ardata (abfd)->extended_names = bfd_zalloc (abfd, amt);
+ if (amt + 1 == 0)
+ goto byebye;
+
+ bfd_ardata (abfd)->extended_names_size = amt;
+ bfd_ardata (abfd)->extended_names = bfd_zalloc (abfd, amt + 1);
if (bfd_ardata (abfd)->extended_names == NULL)
{
byebye:
@@ -1066,15 +1106,17 @@ _bfd_slurp_extended_name_table (bfd *abfd)
trailing '/'. DOS/NT created archive often have \ in them
We'll fix all problems here.. */
{
- char *temp = bfd_ardata (abfd)->extended_names;
+ char *ext_names = bfd_ardata (abfd)->extended_names;
+ char *temp = ext_names;
char *limit = temp + namedata->parsed_size;
for (; temp < limit; ++temp)
{
if (*temp == '\012')
- temp[temp[-1] == '/' ? -1 : 0] = '\0';
+ temp[temp > ext_names && temp[-1] == '/' ? -1 : 0] = '\0';
if (*temp == '\\')
*temp = '/';
}
+ *limit = '\0';
}
/* Pad to an even boundary if you have to. */
@@ -1084,9 +1126,6 @@ _bfd_slurp_extended_name_table (bfd *abfd)
/* FIXME, we can't release namedata here because it was allocated
below extended_names on the objalloc... */
-#if 0
- bfd_release (abfd, namedata);
-#endif
}
return TRUE;
}
@@ -1276,17 +1315,8 @@ _bfd_construct_extended_name_table (bfd *abfd,
strptr[thislen + 1] = '\012';
}
hdr->ar_name[0] = ar_padchar (current);
- /* We know there will always be enough room (one of the few
- cases where you may safely use sprintf). */
- sprintf ((hdr->ar_name) + 1, "%-d", (unsigned) (strptr - *tabloc));
- /* Kinda Kludgy. We should just use the returned value of
- sprintf but not all implementations get this right. */
- {
- char *temp = hdr->ar_name + 2;
- for (; temp < hdr->ar_name + maxname; temp++)
- if (*temp == '\0')
- *temp = ' ';
- }
+ _bfd_ar_spacepad (hdr->ar_name + 1, maxname - 1, "%-ld",
+ strptr - *tabloc);
strptr += thislen + 1;
if (trailing_slash)
++strptr;
@@ -1296,7 +1326,7 @@ _bfd_construct_extended_name_table (bfd *abfd,
return TRUE;
}
-/** A couple of functions for creating ar_hdrs */
+/* A couple of functions for creating ar_hdrs. */
#ifdef HPUX_LARGE_AR_IDS
/* Function to encode large UID/GID values according to HP. */
@@ -1333,7 +1363,6 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member)
struct stat status;
struct areltdata *ared;
struct ar_hdr *hdr;
- char *temp, *temp1;
bfd_size_type amt;
if (member && (member->flags & BFD_IN_MEMORY) != 0)
@@ -1361,39 +1390,31 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member)
/* ar headers are space padded, not null padded! */
memset (hdr, ' ', sizeof (struct ar_hdr));
- strncpy (hdr->ar_fmag, ARFMAG, 2);
-
- /* Goddamned sprintf doesn't permit MAXIMUM field lengths. */
- sprintf ((hdr->ar_date), "%-12ld", (long) status.st_mtime);
+ _bfd_ar_spacepad (hdr->ar_date, sizeof (hdr->ar_date), "%-12ld",
+ status.st_mtime);
#ifdef HPUX_LARGE_AR_IDS
/* HP has a very "special" way to handle UID/GID's with numeric values
> 99999. */
if (status.st_uid > 99999)
- hpux_uid_gid_encode (hdr->ar_gid, (long) status.st_uid);
+ hpux_uid_gid_encode (hdr->ar_uid, (long) status.st_uid);
else
#endif
- sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid);
+ _bfd_ar_spacepad (hdr->ar_uid, sizeof (hdr->ar_uid), "%ld",
+ status.st_uid);
#ifdef HPUX_LARGE_AR_IDS
/* HP has a very "special" way to handle UID/GID's with numeric values
> 99999. */
if (status.st_gid > 99999)
- hpux_uid_gid_encode (hdr->ar_uid, (long) status.st_gid);
+ hpux_uid_gid_encode (hdr->ar_gid, (long) status.st_gid);
else
#endif
- sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid);
- sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode);
- sprintf ((hdr->ar_size), "%-10ld", (long) status.st_size);
- /* Correct for a lossage in sprintf whereby it null-terminates. I cannot
- understand how these C losers could design such a ramshackle bunch of
- IO operations. */
- temp = (char *) hdr;
- temp1 = temp + sizeof (struct ar_hdr) - 2;
- for (; temp < temp1; temp++)
- {
- if (*temp == '\0')
- *temp = ' ';
- }
- strncpy (hdr->ar_fmag, ARFMAG, 2);
+ _bfd_ar_spacepad (hdr->ar_gid, sizeof (hdr->ar_gid), "%ld",
+ status.st_gid);
+ _bfd_ar_spacepad (hdr->ar_mode, sizeof (hdr->ar_mode), "%-8lo",
+ status.st_mode);
+ _bfd_ar_spacepad (hdr->ar_size, sizeof (hdr->ar_size), "%-10ld",
+ status.st_size);
+ memcpy (hdr->ar_fmag, ARFMAG, 2);
ared->parsed_size = status.st_size;
ared->arch_header = (char *) hdr;
@@ -1614,7 +1635,6 @@ _bfd_write_archive_contents (bfd *arch)
/* If no .o's, don't bother to make a map. */
bfd_boolean hasobjects = FALSE;
bfd_size_type wrote;
- unsigned int i;
int tries;
/* Verify the viability of all entries; if any of them live in the
@@ -1646,11 +1666,7 @@ _bfd_write_archive_contents (bfd *arch)
if (makemap && ! hasobjects)
{ /* Don't bother if we won't make a map! */
- if ((bfd_check_format (current, bfd_object))
-#if 0 /* FIXME -- these are not set correctly */
- && ((bfd_get_file_flags (current) & HAS_SYMS))
-#endif
- )
+ if ((bfd_check_format (current, bfd_object)))
hasobjects = TRUE;
}
}
@@ -1661,11 +1677,7 @@ _bfd_write_archive_contents (bfd *arch)
if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0)
return FALSE;
-#ifdef GNU960
- wrote = bfd_bwrite (BFD_GNU960_ARMAG (arch), SARMAG, arch);
-#else
wrote = bfd_bwrite (ARMAG, SARMAG, arch);
-#endif
if (wrote != SARMAG)
return FALSE;
@@ -1679,15 +1691,12 @@ _bfd_write_archive_contents (bfd *arch)
{
struct ar_hdr hdr;
- memset (&hdr, 0, sizeof (struct ar_hdr));
- strcpy (hdr.ar_name, ename);
+ memset (&hdr, ' ', sizeof (struct ar_hdr));
+ memcpy (hdr.ar_name, ename, strlen (ename));
/* Round size up to even number in archive header. */
- sprintf (&(hdr.ar_size[0]), "%-10d",
- (int) ((elength + 1) & ~(bfd_size_type) 1));
- strncpy (hdr.ar_fmag, ARFMAG, 2);
- for (i = 0; i < sizeof (struct ar_hdr); i++)
- if (((char *) (&hdr))[i] == '\0')
- (((char *) (&hdr))[i]) = ' ';
+ _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld",
+ (elength + 1) & ~(bfd_size_type) 1);
+ memcpy (hdr.ar_fmag, ARFMAG, 2);
if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
|| bfd_bwrite (etable, elength, arch) != elength)
@@ -1765,9 +1774,9 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
bfd *current;
file_ptr elt_no = 0;
struct orl *map = NULL;
- unsigned int orl_max = 1024; /* fine initial default */
+ unsigned int orl_max = 1024; /* Fine initial default. */
unsigned int orl_count = 0;
- int stridx = 0; /* string index */
+ int stridx = 0;
asymbol **syms = NULL;
long syms_max = 0;
bfd_boolean ret;
@@ -1916,30 +1925,27 @@ bsd_write_armap (bfd *arch,
unsigned int mapsize = ranlibsize + stringsize + 8;
file_ptr firstreal;
bfd *current = arch->archive_head;
- bfd *last_elt = current; /* last element arch seen */
+ bfd *last_elt = current; /* Last element arch seen. */
bfd_byte temp[4];
unsigned int count;
struct ar_hdr hdr;
struct stat statbuf;
- unsigned int i;
firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG;
stat (arch->filename, &statbuf);
- memset (&hdr, 0, sizeof (struct ar_hdr));
- sprintf (hdr.ar_name, RANLIBMAG);
+ memset (&hdr, ' ', sizeof (struct ar_hdr));
+ memcpy (hdr.ar_name, RANLIBMAG, strlen (RANLIBMAG));
/* Remember the timestamp, to keep it holy. But fudge it a little. */
bfd_ardata (arch)->armap_timestamp = statbuf.st_mtime + ARMAP_TIME_OFFSET;
bfd_ardata (arch)->armap_datepos = (SARMAG
+ offsetof (struct ar_hdr, ar_date[0]));
- sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp);
- sprintf (hdr.ar_uid, "%ld", (long) getuid ());
- sprintf (hdr.ar_gid, "%ld", (long) getgid ());
- sprintf (hdr.ar_size, "%-10d", (int) mapsize);
- strncpy (hdr.ar_fmag, ARFMAG, 2);
- for (i = 0; i < sizeof (struct ar_hdr); i++)
- if (((char *) (&hdr))[i] == '\0')
- (((char *) (&hdr))[i]) = ' ';
+ _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
+ bfd_ardata (arch)->armap_timestamp);
+ _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", getuid ());
+ _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", getgid ());
+ _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", mapsize);
+ memcpy (hdr.ar_fmag, ARFMAG, 2);
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
return FALSE;
@@ -1960,7 +1966,7 @@ bsd_write_armap (bfd *arch,
current = current->next;
}
while (current != map[count].u.abfd);
- } /* if new archive element */
+ }
last_elt = current;
H_PUT_32 (arch, map[count].namidx, buf);
@@ -2004,7 +2010,6 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
{
struct stat archstat;
struct ar_hdr hdr;
- unsigned int i;
/* Flush writes, get last-write timestamp from file, and compare it
to the timestamp IN the file. */
@@ -2024,11 +2029,9 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
bfd_ardata (arch)->armap_timestamp = archstat.st_mtime + ARMAP_TIME_OFFSET;
/* Prepare an ASCII version suitable for writing. */
- memset (hdr.ar_date, 0, sizeof (hdr.ar_date));
- sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp);
- for (i = 0; i < sizeof (hdr.ar_date); i++)
- if (hdr.ar_date[i] == '\0')
- (hdr.ar_date)[i] = ' ';
+ memset (hdr.ar_date, ' ', sizeof (hdr.ar_date));
+ _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
+ bfd_ardata (arch)->armap_timestamp);
/* Write it into the file. */
bfd_ardata (arch)->armap_datepos = (SARMAG
@@ -2058,8 +2061,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
symbol name 0
symbol name 1
- symbol name n-1
-*/
+ symbol name n-1 */
bfd_boolean
coff_write_armap (bfd *arch,
@@ -2077,7 +2079,6 @@ coff_write_armap (bfd *arch,
bfd *current = arch->archive_head;
unsigned int count;
struct ar_hdr hdr;
- unsigned int i;
int padit = mapsize & 1;
if (padit)
@@ -2089,22 +2090,19 @@ coff_write_armap (bfd *arch,
+ sizeof (struct ar_hdr)
+ SARMAG);
- memset (&hdr, 0, sizeof (struct ar_hdr));
+ memset (&hdr, ' ', sizeof (struct ar_hdr));
hdr.ar_name[0] = '/';
- sprintf (hdr.ar_size, "%-10d", (int) mapsize);
- sprintf (hdr.ar_date, "%ld", (long) time (NULL));
+ _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld",
+ mapsize);
+ _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
+ time (NULL));
/* This, at least, is what Intel coff sets the values to. */
- sprintf ((hdr.ar_uid), "%d", 0);
- sprintf ((hdr.ar_gid), "%d", 0);
- sprintf ((hdr.ar_mode), "%-7o", (unsigned) 0);
- strncpy (hdr.ar_fmag, ARFMAG, 2);
-
- for (i = 0; i < sizeof (struct ar_hdr); i++)
- if (((char *) (&hdr))[i] == '\0')
- (((char *) (&hdr))[i]) = ' ';
+ _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0);
+ _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0);
+ _bfd_ar_spacepad (hdr.ar_mode, sizeof (hdr.ar_mode), "%-7lo", 0);
+ memcpy (hdr.ar_fmag, ARFMAG, 2);
/* Write the ar header for this item and the number of symbols. */
-
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
return FALSE;
diff --git a/contrib/binutils/bfd/archive64.c b/contrib/binutils/bfd/archive64.c
index 1b9f5f3c0f2e..3b28f853c216 100644
--- a/contrib/binutils/bfd/archive64.c
+++ b/contrib/binutils/bfd/archive64.c
@@ -19,7 +19,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file supports the 64-bit (MIPS) ELF archives. */
@@ -156,7 +156,6 @@ bfd_elf64_archive_write_armap (bfd *arch,
bfd *current = arch->archive_head;
unsigned int count;
struct ar_hdr hdr;
- unsigned int i;
int padding;
bfd_byte buf[8];
@@ -169,19 +168,17 @@ bfd_elf64_archive_write_armap (bfd *arch,
+ sizeof (struct ar_hdr)
+ SARMAG);
- memset (&hdr, 0, sizeof (struct ar_hdr));
- strcpy (hdr.ar_name, "/SYM64/");
- sprintf (hdr.ar_size, "%-10d", (int) mapsize);
- sprintf (hdr.ar_date, "%ld", (long) time (NULL));
+ memset (&hdr, ' ', sizeof (struct ar_hdr));
+ memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/"));
+ _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld",
+ mapsize);
+ _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
+ time (NULL));
/* This, at least, is what Intel coff sets the values to.: */
- sprintf ((hdr.ar_uid), "%d", 0);
- sprintf ((hdr.ar_gid), "%d", 0);
- sprintf ((hdr.ar_mode), "%-7o", (unsigned) 0);
- strncpy (hdr.ar_fmag, ARFMAG, 2);
-
- for (i = 0; i < sizeof (struct ar_hdr); i++)
- if (((char *) (&hdr))[i] == '\0')
- (((char *) (&hdr))[i]) = ' ';
+ _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0);
+ _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0);
+ _bfd_ar_spacepad (hdr.ar_mode, sizeof (hdr.ar_mode), "%-7lo", 0);
+ memcpy (hdr.ar_fmag, ARFMAG, 2);
/* Write the ar header for this item and the number of symbols */
diff --git a/contrib/binutils/bfd/archures.c b/contrib/binutils/bfd/archures.c
index 58893b02290b..137c8285806b 100644
--- a/contrib/binutils/bfd/archures.c
+++ b/contrib/binutils/bfd/archures.c
@@ -80,11 +80,22 @@ DESCRIPTION
.#define bfd_mach_m68040 6
.#define bfd_mach_m68060 7
.#define bfd_mach_cpu32 8
-.#define bfd_mach_mcf5200 9
-.#define bfd_mach_mcf5206e 10
-.#define bfd_mach_mcf5307 11
-.#define bfd_mach_mcf5407 12
-.#define bfd_mach_mcf528x 13
+.#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.
@@ -106,7 +117,6 @@ DESCRIPTION
.
. bfd_arch_or32, {* OpenRISC 32 *}
.
-. bfd_arch_a29k, {* AMD 29000 *}
. bfd_arch_sparc, {* SPARC *}
.#define bfd_mach_sparc 1
.{* The difference between v8plus and v9 is that v9 is a true 64 bit env. *}
@@ -123,6 +133,9 @@ DESCRIPTION
.#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
@@ -163,7 +176,6 @@ DESCRIPTION
. bfd_arch_i860, {* Intel 860 *}
. bfd_arch_i370, {* IBM 360/370 Mainframes *}
. bfd_arch_romp, {* IBM ROMP PC/RT *}
-. bfd_arch_alliant, {* Alliant *}
. bfd_arch_convex, {* Convex *}
. bfd_arch_m88k, {* Motorola 88xxx *}
. bfd_arch_m98k, {* Motorola 98xxx *}
@@ -226,12 +238,20 @@ DESCRIPTION
.#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
@@ -271,6 +291,9 @@ DESCRIPTION
.#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'
@@ -287,6 +310,7 @@ DESCRIPTION
.#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
@@ -300,6 +324,10 @@ DESCRIPTION
. 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
@@ -307,7 +335,16 @@ DESCRIPTION
.#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
@@ -322,7 +359,8 @@ DESCRIPTION
.#define bfd_mach_msp13 13
.#define bfd_mach_msp14 14
.#define bfd_mach_msp15 15
-.#define bfd_mach_msp16 16
+.#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
@@ -330,8 +368,20 @@ DESCRIPTION
.#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
. };
*/
@@ -370,12 +420,14 @@ DESCRIPTION
.
*/
-extern const bfd_arch_info_type bfd_a29k_arch;
extern const bfd_arch_info_type bfd_alpha_arch;
extern const bfd_arch_info_type bfd_arc_arch;
extern const bfd_arch_info_type bfd_arm_arch;
extern const bfd_arch_info_type bfd_avr_arch;
+extern const bfd_arch_info_type bfd_bfin_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;
extern const bfd_arch_info_type bfd_d10v_arch;
extern const bfd_arch_info_type bfd_d30v_arch;
extern const bfd_arch_info_type bfd_dlx_arch;
@@ -391,17 +443,20 @@ extern const bfd_arch_info_type bfd_i960_arch;
extern const bfd_arch_info_type bfd_ia64_arch;
extern const bfd_arch_info_type bfd_ip2k_arch;
extern const bfd_arch_info_type bfd_iq2000_arch;
+extern const bfd_arch_info_type bfd_m32c_arch;
extern const bfd_arch_info_type bfd_m32r_arch;
extern const bfd_arch_info_type bfd_m68hc11_arch;
extern const bfd_arch_info_type bfd_m68hc12_arch;
extern const bfd_arch_info_type bfd_m68k_arch;
extern const bfd_arch_info_type bfd_m88k_arch;
+extern const bfd_arch_info_type bfd_maxq_arch;
extern const bfd_arch_info_type bfd_mcore_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;
extern const bfd_arch_info_type bfd_mn10300_arch;
extern const bfd_arch_info_type bfd_msp430_arch;
+extern const bfd_arch_info_type bfd_mt_arch;
extern const bfd_arch_info_type bfd_ns32k_arch;
extern const bfd_arch_info_type bfd_openrisc_arch;
extern const bfd_arch_info_type bfd_or32_arch;
@@ -423,6 +478,8 @@ extern const bfd_arch_info_type bfd_we32k_arch;
extern const bfd_arch_info_type bfd_w65_arch;
extern const bfd_arch_info_type bfd_xstormy16_arch;
extern const bfd_arch_info_type bfd_xtensa_arch;
+extern const bfd_arch_info_type bfd_xc16x_arch;
+extern const bfd_arch_info_type bfd_z80_arch;
extern const bfd_arch_info_type bfd_z8k_arch;
static const bfd_arch_info_type * const bfd_archures_list[] =
@@ -430,12 +487,14 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
#ifdef SELECT_ARCHITECTURES
SELECT_ARCHITECTURES,
#else
- &bfd_a29k_arch,
&bfd_alpha_arch,
&bfd_arc_arch,
&bfd_arm_arch,
&bfd_avr_arch,
+ &bfd_bfin_arch,
+ &bfd_cr16c_arch,
&bfd_cris_arch,
+ &bfd_crx_arch,
&bfd_d10v_arch,
&bfd_d30v_arch,
&bfd_dlx_arch,
@@ -451,16 +510,19 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_ia64_arch,
&bfd_ip2k_arch,
&bfd_iq2000_arch,
+ &bfd_m32c_arch,
&bfd_m32r_arch,
&bfd_m68hc11_arch,
&bfd_m68hc12_arch,
&bfd_m68k_arch,
&bfd_m88k_arch,
+ &bfd_maxq_arch,
&bfd_mcore_arch,
&bfd_mips_arch,
&bfd_mmix_arch,
&bfd_mn10200_arch,
&bfd_mn10300_arch,
+ &bfd_mt_arch,
&bfd_msp430_arch,
&bfd_ns32k_arch,
&bfd_openrisc_arch,
@@ -481,6 +543,8 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_we32k_arch,
&bfd_xstormy16_arch,
&bfd_xtensa_arch,
+ &bfd_xc16x_arch,
+ &bfd_z80_arch,
&bfd_z8k_arch,
#endif
0
@@ -953,23 +1017,23 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string)
break;
case 5200:
arch = bfd_arch_m68k;
- number = bfd_mach_mcf5200;
+ number = bfd_mach_mcf_isa_a_nodiv;
break;
case 5206:
arch = bfd_arch_m68k;
- number = bfd_mach_mcf5206e;
+ number = bfd_mach_mcf_isa_a_mac;
break;
case 5307:
arch = bfd_arch_m68k;
- number = bfd_mach_mcf5307;
+ number = bfd_mach_mcf_isa_a_mac;
break;
case 5407:
arch = bfd_arch_m68k;
- number = bfd_mach_mcf5407;
+ number = bfd_mach_mcf_isa_b_nousp_mac;
break;
case 5282:
arch = bfd_arch_m68k;
- number = bfd_mach_mcf528x;
+ number = bfd_mach_mcf_isa_aplus_emac;
break;
case 32000:
diff --git a/contrib/binutils/bfd/armnetbsd.c b/contrib/binutils/bfd/armnetbsd.c
index d82e98f49eba..602c1e058a08 100644
--- a/contrib/binutils/bfd/armnetbsd.c
+++ b/contrib/binutils/bfd/armnetbsd.c
@@ -1,5 +1,6 @@
/* BFD back-end for NetBSD/ARM a.out-ish binaries.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2005
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define BYTES_IN_WORD 4
#undef TARGET_IS_BIG_ENDIAN_P
@@ -35,19 +36,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This needs to start with a.out so GDB knows it is an a.out variant. */
#define TARGETNAME "a.out-arm-netbsd"
-#if 0
-#define NAME(x,y) CONCAT3 (aoutarm,_32_,y)
-
-#define aoutarm_32_get_section_contents aout_32_get_section_contents
-
-#define MY_bfd_reloc_type_lookup aoutarm_bfd_reloc_type_lookup
-
-#include "bfd.h" /* To ensure following declaration is OK */
-
-const struct reloc_howto_struct *
-MY_bfd_reloc_type_lookup
- PARAMS ((bfd * abfd AND
- bfd_reloc_code_real_type code));
-#endif
-
#include "netbsd.h"
diff --git a/contrib/binutils/bfd/bfd-in.h b/contrib/binutils/bfd/bfd-in.h
index 1a5d1ea0dd6b..33b649d05855 100644
--- a/contrib/binutils/bfd/bfd-in.h
+++ b/contrib/binutils/bfd/bfd-in.h
@@ -1,7 +1,8 @@
/* 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 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -19,7 +20,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
@@ -89,14 +90,6 @@ typedef int bfd_boolean;
#define FALSE 0
#define TRUE 1
-#if 0
-/* Poison. */
-#undef false
-#undef true
-#define false dont_use_false_in_bfd
-#define true dont_use_true_in_bfd
-#endif
-
#ifdef BFD64
#ifndef BFD_HOST_64_BIT
@@ -144,6 +137,9 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
+#define HALF_BFD_SIZE_TYPE \
+ (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
+
#ifndef BFD_HOST_64_BIT
/* Fall back on a 32 bit type. The idea is to make these types always
available for function return types, but in the case that
@@ -238,6 +234,10 @@ bfd_format;
/* The sections in this BFD specify a memory page. */
#define HAS_LOAD_PAGE 0x1000
+
+/* This BFD has been created by the linker and doesn't correspond
+ to any input file. */
+#define BFD_LINKER_CREATED 0x2000
/* Symbols and relocation. */
@@ -308,7 +308,8 @@ typedef struct bfd_section *sec_ptr;
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
+#define bfd_section_size(bfd, ptr) ((ptr)->size)
+#define bfd_get_section_size(ptr) ((ptr)->size)
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
@@ -320,6 +321,10 @@ typedef struct bfd_section *sec_ptr;
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
+/* Find the address one past the end of SEC. */
+#define bfd_get_section_limit(bfd, sec) \
+ (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
+ / bfd_octets_per_byte (bfd))
typedef struct stat stat_type;
@@ -371,6 +376,8 @@ struct bfd_hash_table
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,7 +397,8 @@ extern bfd_boolean bfd_hash_table_init
(struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *));
+ const char *),
+ unsigned int);
/* Initialize a hash table specifying a size. */
extern bfd_boolean bfd_hash_table_init_n
@@ -398,7 +406,7 @@ extern bfd_boolean bfd_hash_table_init_n
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *),
- unsigned int size);
+ unsigned int, unsigned int);
/* Free up a hash table. */
extern void bfd_hash_table_free
@@ -433,6 +441,24 @@ extern void bfd_hash_traverse
bfd_boolean (*) (struct bfd_hash_entry *, void *),
void *info);
+/* Allows the default size of a hash table to be configured. New hash
+ tables allocated using bfd_hash_table_init will be created with
+ this size. */
+extern void bfd_hash_set_default_size (bfd_size_type);
+
+/* This structure is used to keep track of stabs in sections
+ information while linking. */
+
+struct stab_info
+{
+ /* A hash table used to hold stabs strings. */
+ struct bfd_strtab_hash *strings;
+ /* The header file hash table. */
+ struct bfd_hash_table includes;
+ /* The first .stabstr section. */
+ struct bfd_section *stabstr;
+};
+
#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
/* User program access to BFD facilities. */
@@ -505,6 +531,8 @@ extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
+extern bfd_boolean bfd_cache_close_all (void);
+
extern bfd_boolean bfd_record_phdr
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
@@ -534,6 +562,9 @@ void bfd_putl16 (bfd_vma, void *);
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
+
+extern bfd_boolean bfd_section_already_linked_table_init (void);
+extern void bfd_section_already_linked_table_free (void);
/* Externally visible ECOFF routines. */
@@ -587,8 +618,6 @@ extern bfd_boolean bfd_ecoff_write_accumulated_debug
(void *handle, bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
struct bfd_link_info *info, file_ptr where);
-extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* Externally visible ELF routines. */
@@ -602,28 +631,44 @@ struct bfd_link_needed_list
enum dynamic_lib_link_class {
DYN_NORMAL = 0,
DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2
+ DYN_DT_NEEDED = 2,
+ DYN_NO_ADD_NEEDED = 4,
+ DYN_NO_NEEDED = 8
+};
+
+enum notice_asneeded_action {
+ notice_as_needed,
+ notice_not_needed,
+ notice_needed
};
extern bfd_boolean bfd_elf_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean);
+ (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
+ bfd_boolean);
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_get_bfd_needed_list
(bfd *, struct bfd_link_needed_list **);
extern bfd_boolean bfd_elf_size_dynamic_sections
(bfd *, const char *, const char *, const char *, const char * const *,
- struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *);
+ struct bfd_link_info *, struct bfd_section **,
+ struct bfd_elf_version_tree *);
+extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
+ (bfd *, struct bfd_link_info *);
extern void bfd_elf_set_dt_needed_name
(bfd *, const char *);
extern const char *bfd_elf_get_dt_soname
(bfd *);
extern void bfd_elf_set_dyn_lib_class
(bfd *, int);
+extern int bfd_elf_get_dyn_lib_class
+ (bfd *);
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_discard_info
(bfd *, struct bfd_link_info *);
+extern unsigned int _bfd_elf_default_action_discarded
+ (struct bfd_section *);
/* Return an upper bound on the number of bytes required to store a
copy of ABFD's program header table entries. Return -1 if an error
@@ -655,7 +700,7 @@ extern int bfd_get_elf_phdrs
the remote memory. */
extern bfd *bfd_elf_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, char *myaddr, int len));
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
/* Return the arch_size field of an elf bfd, or -1 if not elf. */
extern int bfd_get_arch_size
@@ -668,10 +713,20 @@ extern int bfd_get_sign_extend_vma
extern struct bfd_section *_bfd_elf_tls_setup
(bfd *, struct bfd_link_info *);
+extern void _bfd_fix_excluded_sec_syms
+ (bfd *, struct bfd_link_info *);
+
+extern unsigned bfd_m68k_mach_to_features (int);
+
+extern int bfd_m68k_features_to_mach (unsigned);
+
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
-extern bfd_boolean bfd_mips_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
+ char **);
+
+extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
+ char **);
/* SunOS shared library support routines for the linker. */
@@ -680,7 +735,8 @@ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
extern bfd_boolean bfd_sunos_record_link_assignment
(bfd *, struct bfd_link_info *, const char *);
extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct bfd_section **, struct bfd_section **, struct bfd_section **);
+ (bfd *, struct bfd_link_info *, struct bfd_section **,
+ struct bfd_section **, struct bfd_section **);
/* Linux shared library support routines for the linker. */
@@ -788,12 +844,19 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
extern bfd_boolean bfd_elf32_arm_process_before_allocation
(bfd *, struct bfd_link_info *, int);
+void bfd_elf32_arm_set_target_relocs
+ (struct bfd_link_info *, int, char *, int, int);
+
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *);
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);
+
/* ARM Note section processing. */
extern bfd_boolean bfd_arm_merge_machines
(bfd *, bfd *);
@@ -822,3 +885,23 @@ extern void bfd_elf32_ia64_after_parse
extern void bfd_elf64_ia64_after_parse
(int);
+/* This structure is used for a comdat section, as in PE. A comdat
+ section is associated with a particular symbol. When the linker
+ sees a comdat section, it keeps only one of the sections with a
+ given name and associated with a given symbol. */
+
+struct coff_comdat_info
+{
+ /* The name of the symbol associated with a comdat section. */
+ const char *name;
+
+ /* The local symbol table index of the symbol associated with a
+ comdat section. This is only meaningful to the object file format
+ specific code; it is not an index into the list returned by
+ bfd_canonicalize_symtab. */
+ long symbol;
+};
+
+extern struct coff_comdat_info *bfd_coff_get_comdat_section
+ (bfd *, struct bfd_section *);
+
diff --git a/contrib/binutils/bfd/bfd-in2.h b/contrib/binutils/bfd/bfd-in2.h
index 91447a12cbb1..ddcda2377df6 100644
--- a/contrib/binutils/bfd/bfd-in2.h
+++ b/contrib/binutils/bfd/bfd-in2.h
@@ -97,14 +97,6 @@ typedef int bfd_boolean;
#define FALSE 0
#define TRUE 1
-#if 0
-/* Poison. */
-#undef false
-#undef true
-#define false dont_use_false_in_bfd
-#define true dont_use_true_in_bfd
-#endif
-
#ifdef BFD64
#ifndef BFD_HOST_64_BIT
@@ -152,6 +144,9 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
+#define HALF_BFD_SIZE_TYPE \
+ (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
+
#ifndef BFD_HOST_64_BIT
/* Fall back on a 32 bit type. The idea is to make these types always
available for function return types, but in the case that
@@ -246,6 +241,10 @@ bfd_format;
/* The sections in this BFD specify a memory page. */
#define HAS_LOAD_PAGE 0x1000
+
+/* This BFD has been created by the linker and doesn't correspond
+ to any input file. */
+#define BFD_LINKER_CREATED 0x2000
/* Symbols and relocation. */
@@ -316,7 +315,8 @@ typedef struct bfd_section *sec_ptr;
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
+#define bfd_section_size(bfd, ptr) ((ptr)->size)
+#define bfd_get_section_size(ptr) ((ptr)->size)
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
@@ -328,6 +328,10 @@ typedef struct bfd_section *sec_ptr;
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
+/* Find the address one past the end of SEC. */
+#define bfd_get_section_limit(bfd, sec) \
+ (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
+ / bfd_octets_per_byte (bfd))
typedef struct stat stat_type;
@@ -379,6 +383,8 @@ struct bfd_hash_table
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,
@@ -398,7 +404,8 @@ extern bfd_boolean bfd_hash_table_init
(struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *));
+ const char *),
+ unsigned int);
/* Initialize a hash table specifying a size. */
extern bfd_boolean bfd_hash_table_init_n
@@ -406,7 +413,7 @@ extern bfd_boolean bfd_hash_table_init_n
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *),
- unsigned int size);
+ unsigned int, unsigned int);
/* Free up a hash table. */
extern void bfd_hash_table_free
@@ -441,6 +448,24 @@ extern void bfd_hash_traverse
bfd_boolean (*) (struct bfd_hash_entry *, void *),
void *info);
+/* Allows the default size of a hash table to be configured. New hash
+ tables allocated using bfd_hash_table_init will be created with
+ this size. */
+extern void bfd_hash_set_default_size (bfd_size_type);
+
+/* This structure is used to keep track of stabs in sections
+ information while linking. */
+
+struct stab_info
+{
+ /* A hash table used to hold stabs strings. */
+ struct bfd_strtab_hash *strings;
+ /* The header file hash table. */
+ struct bfd_hash_table includes;
+ /* The first .stabstr section. */
+ struct bfd_section *stabstr;
+};
+
#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
/* User program access to BFD facilities. */
@@ -513,6 +538,8 @@ extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
+extern bfd_boolean bfd_cache_close_all (void);
+
extern bfd_boolean bfd_record_phdr
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
@@ -542,6 +569,9 @@ void bfd_putl16 (bfd_vma, void *);
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
+
+extern bfd_boolean bfd_section_already_linked_table_init (void);
+extern void bfd_section_already_linked_table_free (void);
/* Externally visible ECOFF routines. */
@@ -595,8 +625,6 @@ extern bfd_boolean bfd_ecoff_write_accumulated_debug
(void *handle, bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
struct bfd_link_info *info, file_ptr where);
-extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* Externally visible ELF routines. */
@@ -610,28 +638,44 @@ struct bfd_link_needed_list
enum dynamic_lib_link_class {
DYN_NORMAL = 0,
DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2
+ DYN_DT_NEEDED = 2,
+ DYN_NO_ADD_NEEDED = 4,
+ DYN_NO_NEEDED = 8
+};
+
+enum notice_asneeded_action {
+ notice_as_needed,
+ notice_not_needed,
+ notice_needed
};
extern bfd_boolean bfd_elf_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean);
+ (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
+ bfd_boolean);
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_get_bfd_needed_list
(bfd *, struct bfd_link_needed_list **);
extern bfd_boolean bfd_elf_size_dynamic_sections
(bfd *, const char *, const char *, const char *, const char * const *,
- struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *);
+ struct bfd_link_info *, struct bfd_section **,
+ struct bfd_elf_version_tree *);
+extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
+ (bfd *, struct bfd_link_info *);
extern void bfd_elf_set_dt_needed_name
(bfd *, const char *);
extern const char *bfd_elf_get_dt_soname
(bfd *);
extern void bfd_elf_set_dyn_lib_class
(bfd *, int);
+extern int bfd_elf_get_dyn_lib_class
+ (bfd *);
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_discard_info
(bfd *, struct bfd_link_info *);
+extern unsigned int _bfd_elf_default_action_discarded
+ (struct bfd_section *);
/* Return an upper bound on the number of bytes required to store a
copy of ABFD's program header table entries. Return -1 if an error
@@ -663,7 +707,7 @@ extern int bfd_get_elf_phdrs
the remote memory. */
extern bfd *bfd_elf_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, char *myaddr, int len));
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
/* Return the arch_size field of an elf bfd, or -1 if not elf. */
extern int bfd_get_arch_size
@@ -676,10 +720,20 @@ extern int bfd_get_sign_extend_vma
extern struct bfd_section *_bfd_elf_tls_setup
(bfd *, struct bfd_link_info *);
+extern void _bfd_fix_excluded_sec_syms
+ (bfd *, struct bfd_link_info *);
+
+extern unsigned bfd_m68k_mach_to_features (int);
+
+extern int bfd_m68k_features_to_mach (unsigned);
+
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
-extern bfd_boolean bfd_mips_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
+ char **);
+
+extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
+ char **);
/* SunOS shared library support routines for the linker. */
@@ -688,7 +742,8 @@ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
extern bfd_boolean bfd_sunos_record_link_assignment
(bfd *, struct bfd_link_info *, const char *);
extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct bfd_section **, struct bfd_section **, struct bfd_section **);
+ (bfd *, struct bfd_link_info *, struct bfd_section **,
+ struct bfd_section **, struct bfd_section **);
/* Linux shared library support routines for the linker. */
@@ -796,12 +851,19 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
extern bfd_boolean bfd_elf32_arm_process_before_allocation
(bfd *, struct bfd_link_info *, int);
+void bfd_elf32_arm_set_target_relocs
+ (struct bfd_link_info *, int, char *, int, int);
+
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *);
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);
+
/* ARM Note section processing. */
extern bfd_boolean bfd_arm_merge_machines
(bfd *, bfd *);
@@ -830,16 +892,51 @@ extern void bfd_elf32_ia64_after_parse
extern void bfd_elf64_ia64_after_parse
(int);
+/* This structure is used for a comdat section, as in PE. A comdat
+ section is associated with a particular symbol. When the linker
+ sees a comdat section, it keeps only one of the sections with a
+ given name and associated with a given symbol. */
+
+struct coff_comdat_info
+{
+ /* The name of the symbol associated with a comdat section. */
+ const char *name;
+
+ /* The local symbol table index of the symbol associated with a
+ comdat section. This is only meaningful to the object file format
+ specific code; it is not an index into the list returned by
+ bfd_canonicalize_symtab. */
+ long symbol;
+};
+
+extern struct coff_comdat_info *bfd_coff_get_comdat_section
+ (bfd *, struct bfd_section *);
+
/* Extracted from init.c. */
void bfd_init (void);
/* Extracted from opncls.c. */
+bfd *bfd_fopen (const char *filename, const char *target,
+ const char *mode, int fd);
+
bfd *bfd_openr (const char *filename, const char *target);
bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
bfd *bfd_openstreamr (const char *, const char *, void *);
+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));
+
bfd *bfd_openw (const char *filename, const char *target);
bfd_boolean bfd_close (bfd *abfd);
@@ -983,23 +1080,6 @@ long bfd_get_size (bfd *abfd);
/* Extracted from bfdwin.c. */
/* Extracted from section.c. */
-/* This structure is used for a comdat section, as in PE. A comdat
- section is associated with a particular symbol. When the linker
- sees a comdat section, it keeps only one of the sections with a
- given name and associated with a given symbol. */
-
-struct bfd_comdat_info
-{
- /* The name of the symbol associated with a comdat section. */
- const char *name;
-
- /* The local symbol table index of the symbol associated with a
- comdat section. This is only meaningful to the object file format
- specific code; it is not an index into the list returned by
- bfd_canonicalize_symtab. */
- long symbol;
-};
-
typedef struct bfd_section
{
/* The name of the section; the name isn't a copy, the pointer is
@@ -1015,6 +1095,9 @@ typedef struct bfd_section
/* 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. */
@@ -1034,23 +1117,17 @@ typedef struct bfd_section
some relocation information too. */
#define SEC_RELOC 0x004
- /* ELF reserves 4 processor specific bits and 8 operating system
- specific bits in sh_flags; at present we can get away with just
- one in communicating between the assembler and BFD, but this
- isn't a good long-term solution. */
-#define SEC_ARCH_BIT_0 0x008
-
/* A signal to the OS that the section contains read only data. */
-#define SEC_READONLY 0x010
+#define SEC_READONLY 0x008
/* The section contains code only. */
-#define SEC_CODE 0x020
+#define SEC_CODE 0x010
/* The section contains data only. */
-#define SEC_DATA 0x040
+#define SEC_DATA 0x020
/* The section will reside in ROM. */
-#define SEC_ROM 0x080
+#define SEC_ROM 0x040
/* The section contains constructor information. This section
type is used by the linker to create lists of constructors and
@@ -1062,30 +1139,19 @@ typedef struct bfd_section
sections called <<__CTOR_LIST__>> and relocate the data
contained within - exactly the operations it would peform on
standard data. */
-#define SEC_CONSTRUCTOR 0x100
+#define SEC_CONSTRUCTOR 0x080
/* The section has contents - a data section could be
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
<<SEC_HAS_CONTENTS>> */
-#define SEC_HAS_CONTENTS 0x200
+#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 0x400
-
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
-#define SEC_COFF_SHARED_LIBRARY 0x800
+#define SEC_NEVER_LOAD 0x200
/* The section contains thread local data. */
-#define SEC_THREAD_LOCAL 0x1000
+#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.
@@ -1093,46 +1159,46 @@ typedef struct bfd_section
in this section, which indicate to the linker that the section
contains PIC code, and must be handled specially when doing a
static link. */
-#define SEC_HAS_GOT_REF 0x4000
+#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 0x8000
+#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 0x10000
+#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 0x20000
+#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 0x40000
+#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 0x80000
+#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 0x100000
+#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 0x600000
+#define SEC_LINK_DUPLICATES 0x40000
/* This value for SEC_LINK_DUPLICATES means that duplicate
sections with the same name should simply be discarded. */
@@ -1141,55 +1207,69 @@ typedef struct bfd_section
/* This value for SEC_LINK_DUPLICATES means that the linker
should warn if there are any duplicate sections, although
it should still only link one copy. */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
+#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 0x400000
+#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 0x600000
+#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 0x800000
+#define SEC_LINKER_CREATED 0x200000
/* This section should not be subject to garbage collection. */
-#define SEC_KEEP 0x1000000
+#define SEC_KEEP 0x400000
/* This section contains "short" data, and should be placed
"near" the GP. */
-#define SEC_SMALL_DATA 0x2000000
-
- /* This section contains data which may be shared with other
- executables or shared objects. */
-#define SEC_SHARED 0x4000000
-
- /* When a section with this flag is being linked, then if the size of
- the input section is less than a page, it should not cross a page
- boundary. If the size of the input section is one page or more, it
- should be aligned on a page boundary. */
-#define SEC_BLOCK 0x8000000
-
- /* Conditionally link this section; do not link if there are no
- references found to any symbol in the section. */
-#define SEC_CLINK 0x10000000
+#define SEC_SMALL_DATA 0x800000
/* Attempt to merge identical entities in the section.
Entity size is given in the entsize field. */
-#define SEC_MERGE 0x20000000
+#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 0x40000000
+#define SEC_STRINGS 0x2000000
/* This section contains data about section groups. */
-#define SEC_GROUP 0x80000000
+#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. */
@@ -1198,9 +1278,6 @@ typedef struct bfd_section
/* See the vma field. */
unsigned int user_set_vma : 1;
- /* Whether relocations have been processed. */
- unsigned int reloc_done : 1;
-
/* A mark flag used by some of the linker backends. */
unsigned int linker_mark : 1;
@@ -1208,8 +1285,9 @@ typedef struct bfd_section
output sections that have an input section. */
unsigned int linker_has_input : 1;
- /* A mark flag used by some linker backends for garbage collection. */
+ /* 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. */
@@ -1227,22 +1305,20 @@ typedef struct bfd_section
/* Nonzero if this section uses RELA relocations, rather than REL. */
unsigned int use_rela_p:1;
- /* Bits used by various backends. */
- unsigned int has_tls_reloc:1;
+ /* Bits used by various backends. The generic code doesn't touch
+ these fields. */
- /* Nonzero if this section needs the relax finalize pass. */
- unsigned int need_finalize_relax:1;
+ /* 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;
- /* Unused bits. */
- unsigned int flag13:1;
- unsigned int flag14:1;
- unsigned int flag15:1;
- unsigned int flag16:4;
- unsigned int flag20:4;
- unsigned int flag24:8;
+ /* 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. */
@@ -1261,13 +1337,18 @@ typedef struct bfd_section
/* The size of the section in octets, as it will be output.
Contains a value even if the section has no contents (e.g., the
- size of <<.bss>>). This will be filled in after relocation. */
- bfd_size_type _cooked_size;
+ size of <<.bss>>). */
+ bfd_size_type size;
- /* The original size on disk of the section, in octets. Normally this
- value is the same as the size, but if some relaxing has
- been done, then this value will be bigger. */
- bfd_size_type _raw_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
@@ -1324,9 +1405,6 @@ typedef struct bfd_section
/* Entity size for merging purposes. */
unsigned int entsize;
- /* Optional information about a COMDAT entry; NULL if not COMDAT. */
- struct bfd_comdat_info *comdat;
-
/* Points to the kept section if this section is a link-once section,
and is discarded. */
struct bfd_section *kept_section;
@@ -1351,8 +1429,14 @@ typedef struct bfd_section
struct bfd_symbol *symbol;
struct bfd_symbol **symbol_ptr_ptr;
- struct bfd_link_order *link_order_head;
- struct bfd_link_order *link_order_tail;
+ /* 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
@@ -1391,48 +1475,161 @@ 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;
-#define bfd_get_section_size_before_reloc(section) \
- ((section)->_raw_size)
-#define bfd_get_section_size_after_reloc(section) \
- ((section)->reloc_done ? (section)->_cooked_size \
- : (abort (), (bfd_size_type) 1))
/* Macros to handle insertion and deletion of a bfd's sections. These
only handle the list pointers, ie. do not adjust section_count,
target_index etc. */
-#define bfd_section_list_remove(ABFD, PS) \
+#define bfd_section_list_remove(ABFD, S) \
do \
{ \
- asection **_ps = PS; \
- asection *_s = *_ps; \
- *_ps = _s->next; \
- if (_s->next == NULL) \
- (ABFD)->section_tail = _ps; \
+ 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(ABFD, PS, S) \
+#define bfd_section_list_insert_before(ABFD, B, S) \
do \
{ \
- asection **_ps = PS; \
+ asection *_b = B; \
asection *_s = S; \
- _s->next = *_ps; \
- *_ps = _s; \
- if (_s->next == NULL) \
- (ABFD)->section_tail = &_s->next; \
+ 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 } \
+ }
void bfd_section_list_clear (bfd *);
asection *bfd_get_section_by_name (bfd *abfd, const char *name);
+asection *bfd_get_section_by_name_if
+ (bfd *abfd,
+ const char *name,
+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
char *bfd_get_unique_section_name
(bfd *abfd, const char *templat, int *count);
asection *bfd_make_section_old_way (bfd *abfd, const char *name);
+asection *bfd_make_section_anyway_with_flags
+ (bfd *abfd, const char *name, flagword flags);
+
asection *bfd_make_section_anyway (bfd *abfd, const char *name);
+asection *bfd_make_section_with_flags
+ (bfd *, const char *name, flagword flags);
+
asection *bfd_make_section (bfd *, const char *name);
bfd_boolean bfd_set_section_flags
@@ -1443,6 +1640,11 @@ void bfd_map_over_sections
void (*func) (bfd *abfd, asection *sect, void *obj),
void *obj);
+asection *bfd_sections_find_if
+ (bfd *abfd,
+ bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
bfd_boolean bfd_set_section_size
(bfd *abfd, asection *sec, bfd_size_type val);
@@ -1454,14 +1656,16 @@ bfd_boolean bfd_get_section_contents
(bfd *abfd, asection *section, void *location, file_ptr offset,
bfd_size_type count);
+bfd_boolean bfd_malloc_and_get_section
+ (bfd *abfd, asection *section, bfd_byte **buf);
+
bfd_boolean bfd_copy_private_section_data
(bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
BFD_SEND (obfd, _bfd_copy_private_section_data, \
(ibfd, isection, obfd, osection))
-void _bfd_strip_section_from_output
- (struct bfd_link_info *info, asection *section);
+bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
@@ -1479,11 +1683,22 @@ enum bfd_architecture
#define bfd_mach_m68040 6
#define bfd_mach_m68060 7
#define bfd_mach_cpu32 8
-#define bfd_mach_mcf5200 9
-#define bfd_mach_mcf5206e 10
-#define bfd_mach_mcf5307 11
-#define bfd_mach_mcf5407 12
-#define bfd_mach_mcf528x 13
+#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.
@@ -1505,7 +1720,6 @@ enum bfd_architecture
bfd_arch_or32, /* OpenRISC 32 */
- bfd_arch_a29k, /* AMD 29000 */
bfd_arch_sparc, /* SPARC */
#define bfd_mach_sparc 1
/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
@@ -1522,6 +1736,9 @@ enum bfd_architecture
#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
@@ -1540,6 +1757,7 @@ enum bfd_architecture
#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
@@ -1560,7 +1778,6 @@ enum bfd_architecture
bfd_arch_i860, /* Intel 860 */
bfd_arch_i370, /* IBM 360/370 Mainframes */
bfd_arch_romp, /* IBM ROMP PC/RT */
- bfd_arch_alliant, /* Alliant */
bfd_arch_convex, /* Convex */
bfd_arch_m88k, /* Motorola 88xxx */
bfd_arch_m98k, /* Motorola 98xxx */
@@ -1623,12 +1840,20 @@ enum bfd_architecture
#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
@@ -1668,6 +1893,9 @@ enum bfd_architecture
#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'
@@ -1684,6 +1912,7 @@ enum bfd_architecture
#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
@@ -1697,6 +1926,10 @@ enum bfd_architecture
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
@@ -1704,7 +1937,16 @@ enum bfd_architecture
#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
@@ -1719,7 +1961,8 @@ enum bfd_architecture
#define bfd_mach_msp13 13
#define bfd_mach_msp14 14
#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
+#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
@@ -1727,8 +1970,20 @@ enum bfd_architecture
#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
};
@@ -1842,11 +2097,12 @@ enum complain_overflow
/* Do not complain on overflow. */
complain_overflow_dont,
- /* Complain if the bitfield overflows, whether it is considered
- as signed or unsigned. */
+ /* Complain if the 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 signed
+ /* Complain if the value overflows when considered as a signed
number. */
complain_overflow_signed,
@@ -2024,6 +2280,9 @@ The 24-bit relocation is used in some Intel 960 configurations. */
BFD_RELOC_12_PCREL,
BFD_RELOC_8_PCREL,
+/* Section relative relocations. Some targets need this for DWARF2. */
+ BFD_RELOC_32_SECREL,
+
/* For ELF. */
BFD_RELOC_32_GOT_PCREL,
BFD_RELOC_16_GOT_PCREL,
@@ -2274,11 +2533,26 @@ to compensate for the borrow when the low bits are added. */
/* Low 16 bits. */
BFD_RELOC_LO16,
-/* Like BFD_RELOC_HI16_S, but PC relative. */
- BFD_RELOC_PCREL_HI16_S,
+/* High 16 bits of 32-bit pc-relative value */
+ BFD_RELOC_HI16_PCREL,
+
+/* High 16 bits of 32-bit pc-relative value, adjusted */
+ BFD_RELOC_HI16_S_PCREL,
+
+/* Low 16 bits of pc-relative value */
+ BFD_RELOC_LO16_PCREL,
+
+/* MIPS16 high 16 bits of 32-bit value. */
+ BFD_RELOC_MIPS16_HI16,
+
+/* 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. */
+ BFD_RELOC_MIPS16_HI16_S,
-/* Like BFD_RELOC_LO16, but PC relative. */
- BFD_RELOC_PCREL_LO16,
+/* MIPS16 low 16 bits. */
+ BFD_RELOC_MIPS16_LO16,
/* Relocation against a MIPS literal section. */
BFD_RELOC_MIPS_LITERAL,
@@ -2305,6 +2579,24 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_REL16,
BFD_RELOC_MIPS_RELGOT,
BFD_RELOC_MIPS_JALR,
+ BFD_RELOC_MIPS_TLS_DTPMOD32,
+ BFD_RELOC_MIPS_TLS_DTPREL32,
+ BFD_RELOC_MIPS_TLS_DTPMOD64,
+ BFD_RELOC_MIPS_TLS_DTPREL64,
+ BFD_RELOC_MIPS_TLS_GD,
+ BFD_RELOC_MIPS_TLS_LDM,
+ BFD_RELOC_MIPS_TLS_DTPREL_HI16,
+ BFD_RELOC_MIPS_TLS_DTPREL_LO16,
+ BFD_RELOC_MIPS_TLS_GOTTPREL,
+ BFD_RELOC_MIPS_TLS_TPREL32,
+ BFD_RELOC_MIPS_TLS_TPREL64,
+ BFD_RELOC_MIPS_TLS_TPREL_HI16,
+ BFD_RELOC_MIPS_TLS_TPREL_LO16,
+
+
+/* MIPS ELF relocations (VxWorks extensions). */
+ BFD_RELOC_MIPS_COPY,
+ BFD_RELOC_MIPS_JUMP_SLOT,
/* Fujitsu Frv Relocations. */
@@ -2331,6 +2623,22 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_FRV_GOTOFF12,
BFD_RELOC_FRV_GOTOFFHI,
BFD_RELOC_FRV_GOTOFFLO,
+ BFD_RELOC_FRV_GETTLSOFF,
+ BFD_RELOC_FRV_TLSDESC_VALUE,
+ BFD_RELOC_FRV_GOTTLSDESC12,
+ BFD_RELOC_FRV_GOTTLSDESCHI,
+ BFD_RELOC_FRV_GOTTLSDESCLO,
+ BFD_RELOC_FRV_TLSMOFF12,
+ BFD_RELOC_FRV_TLSMOFFHI,
+ BFD_RELOC_FRV_TLSMOFFLO,
+ BFD_RELOC_FRV_GOTTLSOFF12,
+ BFD_RELOC_FRV_GOTTLSOFFHI,
+ BFD_RELOC_FRV_GOTTLSOFFLO,
+ BFD_RELOC_FRV_TLSOFF,
+ BFD_RELOC_FRV_TLSDESC_RELAX,
+ BFD_RELOC_FRV_GETTLSOFF_RELAX,
+ BFD_RELOC_FRV_TLSOFF_RELAX,
+ BFD_RELOC_FRV_TLSMOFF,
/* This is a 24bit GOT-relative reloc for the mn10300. */
@@ -2382,6 +2690,9 @@ in the instruction. */
BFD_RELOC_386_TLS_DTPMOD32,
BFD_RELOC_386_TLS_DTPOFF32,
BFD_RELOC_386_TLS_TPOFF32,
+ BFD_RELOC_386_TLS_GOTDESC,
+ BFD_RELOC_386_TLS_DESC_CALL,
+ BFD_RELOC_386_TLS_DESC,
/* x86-64/elf relocations */
BFD_RELOC_X86_64_GOT32,
@@ -2400,6 +2711,16 @@ in the instruction. */
BFD_RELOC_X86_64_DTPOFF32,
BFD_RELOC_X86_64_GOTTPOFF,
BFD_RELOC_X86_64_TPOFF32,
+ BFD_RELOC_X86_64_GOTOFF64,
+ BFD_RELOC_X86_64_GOTPC32,
+ 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_RELOC_X86_64_GOTPC32_TLSDESC,
+ BFD_RELOC_X86_64_TLSDESC_CALL,
+ BFD_RELOC_X86_64_TLSDESC,
/* ns32k relocations */
BFD_RELOC_NS32K_IMM_8,
@@ -2546,39 +2867,105 @@ not stored in the instruction. The 2nd lowest bit comes from a 1 bit
field in the instruction. */
BFD_RELOC_THUMB_PCREL_BLX,
+/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */
+ BFD_RELOC_ARM_PCREL_CALL,
+
+/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */
+ BFD_RELOC_ARM_PCREL_JUMP,
+
+/* 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. */
+ BFD_RELOC_THUMB_PCREL_BRANCH7,
+ BFD_RELOC_THUMB_PCREL_BRANCH9,
+ BFD_RELOC_THUMB_PCREL_BRANCH12,
+ BFD_RELOC_THUMB_PCREL_BRANCH20,
+ BFD_RELOC_THUMB_PCREL_BRANCH23,
+ BFD_RELOC_THUMB_PCREL_BRANCH25,
+
+/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */
+ BFD_RELOC_ARM_OFFSET_IMM,
+
+/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */
+ BFD_RELOC_ARM_THUMB_OFFSET,
+
+/* Pc-relative or absolute relocation depending on target. Used for
+entries in .init_array sections. */
+ BFD_RELOC_ARM_TARGET1,
+
+/* Read-only segment base relative address. */
+ BFD_RELOC_ARM_ROSEGREL32,
+
+/* Data segment base relative address. */
+ BFD_RELOC_ARM_SBREL32,
+
+/* 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. */
+ BFD_RELOC_ARM_TARGET2,
+
+/* 31-bit PC relative address. */
+ BFD_RELOC_ARM_PREL31,
+
+/* Relocations for setting up GOTs and PLTs for shared libraries. */
+ BFD_RELOC_ARM_JUMP_SLOT,
+ BFD_RELOC_ARM_GLOB_DAT,
+ BFD_RELOC_ARM_GOT32,
+ BFD_RELOC_ARM_PLT32,
+ BFD_RELOC_ARM_RELATIVE,
+ BFD_RELOC_ARM_GOTOFF,
+ BFD_RELOC_ARM_GOTPC,
+
+/* ARM thread-local storage relocations. */
+ BFD_RELOC_ARM_TLS_GD32,
+ BFD_RELOC_ARM_TLS_LDO32,
+ BFD_RELOC_ARM_TLS_LDM32,
+ BFD_RELOC_ARM_TLS_DTPOFF32,
+ BFD_RELOC_ARM_TLS_DTPMOD32,
+ BFD_RELOC_ARM_TLS_TPOFF32,
+ BFD_RELOC_ARM_TLS_IE32,
+ BFD_RELOC_ARM_TLS_LE32,
+
/* These relocs are only used within the ARM assembler. They are not
(at present) written to any object files. */
BFD_RELOC_ARM_IMMEDIATE,
BFD_RELOC_ARM_ADRL_IMMEDIATE,
- BFD_RELOC_ARM_OFFSET_IMM,
+ BFD_RELOC_ARM_T32_IMMEDIATE,
+ BFD_RELOC_ARM_T32_IMM12,
+ BFD_RELOC_ARM_T32_ADD_PC12,
BFD_RELOC_ARM_SHIFT_IMM,
+ BFD_RELOC_ARM_SMC,
BFD_RELOC_ARM_SWI,
BFD_RELOC_ARM_MULTI,
BFD_RELOC_ARM_CP_OFF_IMM,
BFD_RELOC_ARM_CP_OFF_IMM_S2,
+ BFD_RELOC_ARM_T32_CP_OFF_IMM,
+ BFD_RELOC_ARM_T32_CP_OFF_IMM_S2,
BFD_RELOC_ARM_ADR_IMM,
BFD_RELOC_ARM_LDR_IMM,
BFD_RELOC_ARM_LITERAL,
BFD_RELOC_ARM_IN_POOL,
BFD_RELOC_ARM_OFFSET_IMM8,
+ BFD_RELOC_ARM_T32_OFFSET_U8,
+ BFD_RELOC_ARM_T32_OFFSET_IMM,
BFD_RELOC_ARM_HWLITERAL,
BFD_RELOC_ARM_THUMB_ADD,
BFD_RELOC_ARM_THUMB_IMM,
BFD_RELOC_ARM_THUMB_SHIFT,
- BFD_RELOC_ARM_THUMB_OFFSET,
- BFD_RELOC_ARM_GOT12,
- BFD_RELOC_ARM_GOT32,
- BFD_RELOC_ARM_JUMP_SLOT,
- BFD_RELOC_ARM_COPY,
- BFD_RELOC_ARM_GLOB_DAT,
- BFD_RELOC_ARM_PLT32,
- BFD_RELOC_ARM_RELATIVE,
- BFD_RELOC_ARM_GOTOFF,
- BFD_RELOC_ARM_GOTPC,
/* Renesas / SuperH SH relocs. Not all of these appear in object files. */
BFD_RELOC_SH_PCDISP8BY2,
BFD_RELOC_SH_PCDISP12BY2,
+ BFD_RELOC_SH_IMM3,
+ BFD_RELOC_SH_IMM3U,
+ BFD_RELOC_SH_DISP12,
+ BFD_RELOC_SH_DISP12BY2,
+ BFD_RELOC_SH_DISP12BY4,
+ BFD_RELOC_SH_DISP12BY8,
+ BFD_RELOC_SH_DISP20,
+ BFD_RELOC_SH_DISP20BY8,
BFD_RELOC_SH_IMM4,
BFD_RELOC_SH_IMM4BY2,
BFD_RELOC_SH_IMM4BY4,
@@ -2660,12 +3047,6 @@ field in the instruction. */
BFD_RELOC_SH_TLS_DTPOFF32,
BFD_RELOC_SH_TLS_TPOFF32,
-/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
-be zero and is not stored in the instruction. */
- BFD_RELOC_THUMB_PCREL_BRANCH9,
- BFD_RELOC_THUMB_PCREL_BRANCH12,
- BFD_RELOC_THUMB_PCREL_BRANCH23,
-
/* 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
@@ -2677,6 +3058,121 @@ stored in the instruction. The high 24 bits are installed in bits 23
through 0. */
BFD_RELOC_ARC_B26,
+/* ADI Blackfin 16 bit immediate absolute reloc. */
+ BFD_RELOC_BFIN_16_IMM,
+
+/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */
+ BFD_RELOC_BFIN_16_HIGH,
+
+/* ADI Blackfin 'a' part of LSETUP. */
+ BFD_RELOC_BFIN_4_PCREL,
+
+/* ADI Blackfin. */
+ BFD_RELOC_BFIN_5_PCREL,
+
+/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */
+ BFD_RELOC_BFIN_16_LOW,
+
+/* ADI Blackfin. */
+ BFD_RELOC_BFIN_10_PCREL,
+
+/* ADI Blackfin 'b' part of LSETUP. */
+ BFD_RELOC_BFIN_11_PCREL,
+
+/* ADI Blackfin. */
+ BFD_RELOC_BFIN_12_PCREL_JUMP,
+
+/* ADI Blackfin Short jump, pcrel. */
+ BFD_RELOC_BFIN_12_PCREL_JUMP_S,
+
+/* ADI Blackfin Call.x not implemented. */
+ BFD_RELOC_BFIN_24_PCREL_CALL_X,
+
+/* ADI Blackfin Long Jump pcrel. */
+ BFD_RELOC_BFIN_24_PCREL_JUMP_L,
+
+/* ADI Blackfin FD-PIC relocations. */
+ 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_GOTOFF17M4,
+ BFD_RELOC_BFIN_GOTOFFHI,
+ BFD_RELOC_BFIN_GOTOFFLO,
+
+/* ADI Blackfin GOT relocation. */
+ BFD_RELOC_BFIN_GOT,
+
+/* ADI Blackfin PLTPC relocation. */
+ BFD_RELOC_BFIN_PLTPC,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_PUSH,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_CONST,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_ADD,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_SUB,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_MULT,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_DIV,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_MOD,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_LSHIFT,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_RSHIFT,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_AND,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_OR,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_XOR,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_LAND,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_LOR,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_LEN,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_NEG,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_COMP,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_PAGE,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_HWPAGE,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_ADDR,
+
/* Mitsubishi D10V relocs.
This is a 10-bit reloc with the right 2 bits
assumed to be 0. */
@@ -2754,6 +3250,12 @@ of the container. */
/* DLX relocs */
BFD_RELOC_DLX_JMP26,
+/* Renesas M16C/M32C Relocations. */
+ BFD_RELOC_M32C_HI8,
+ BFD_RELOC_M32C_RL_JUMP,
+ BFD_RELOC_M32C_RL_1ADDR,
+ BFD_RELOC_M32C_RL_2ADDR,
+
/* Renesas M32R (formerly Mitsubishi M32R) relocs.
This is a 24 bit absolute address. */
BFD_RELOC_M32R_24,
@@ -2790,6 +3292,9 @@ add3, load, and store instructions. */
BFD_RELOC_M32R_JMP_SLOT,
BFD_RELOC_M32R_RELATIVE,
BFD_RELOC_M32R_GOTOFF,
+ BFD_RELOC_M32R_GOTOFF_HI_ULO,
+ BFD_RELOC_M32R_GOTOFF_HI_SLO,
+ BFD_RELOC_M32R_GOTOFF_LO,
BFD_RELOC_M32R_GOTPC24,
BFD_RELOC_M32R_GOT16_HI_ULO,
BFD_RELOC_M32R_GOT16_HI_SLO,
@@ -2862,6 +3367,10 @@ bits placed non-contiguously in the instruction. */
/* Used to maintain alignment whilst relaxing. */
BFD_RELOC_V850_ALIGN,
+/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
+instructions. */
+ BFD_RELOC_V850_LO16_SPLIT_OFFSET,
+
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
instruction. */
BFD_RELOC_MN10300_32_PCREL,
@@ -3010,6 +3519,10 @@ of data memory address) into 8 bit immediate value of LDI insn. */
of program memory address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_HH8_LDI,
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
+of 32 bit value) into 8 bit immediate value of LDI insn. */
+ BFD_RELOC_AVR_MS8_LDI,
+
/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
(usually data memory address) into 8 bit immediate value of SUBI insn. */
BFD_RELOC_AVR_LO8_LDI_NEG,
@@ -3024,6 +3537,10 @@ SUBI insn. */
of LDI or SUBI insn. */
BFD_RELOC_AVR_HH8_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. */
+ BFD_RELOC_AVR_MS8_LDI_NEG,
+
/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
command address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_LO8_LDI_PM,
@@ -3054,6 +3571,18 @@ value of SUBI insn. */
into 22 bits. */
BFD_RELOC_AVR_CALL,
+/* This is a 16 bit reloc for the AVR that stores all needed bits
+for absolute addressing with ldi with overflow check to linktime */
+ BFD_RELOC_AVR_LDI,
+
+/* This is a 6 bit reloc for the AVR that stores offset for ldd/std
+instructions */
+ BFD_RELOC_AVR_6,
+
+/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
+instructions */
+ BFD_RELOC_AVR_6_ADIW,
+
/* Direct 12 bit. */
BFD_RELOC_390_12,
@@ -3342,12 +3871,81 @@ to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
This is the 5 bits of a value. */
BFD_RELOC_M68HC12_5B,
+/* NS CR16C Relocations. */
+ BFD_RELOC_16C_NUM08,
+ BFD_RELOC_16C_NUM08_C,
+ BFD_RELOC_16C_NUM16,
+ BFD_RELOC_16C_NUM16_C,
+ BFD_RELOC_16C_NUM32,
+ BFD_RELOC_16C_NUM32_C,
+ BFD_RELOC_16C_DISP04,
+ BFD_RELOC_16C_DISP04_C,
+ BFD_RELOC_16C_DISP08,
+ BFD_RELOC_16C_DISP08_C,
+ BFD_RELOC_16C_DISP16,
+ BFD_RELOC_16C_DISP16_C,
+ BFD_RELOC_16C_DISP24,
+ BFD_RELOC_16C_DISP24_C,
+ BFD_RELOC_16C_DISP24a,
+ BFD_RELOC_16C_DISP24a_C,
+ BFD_RELOC_16C_REG04,
+ BFD_RELOC_16C_REG04_C,
+ BFD_RELOC_16C_REG04a,
+ BFD_RELOC_16C_REG04a_C,
+ BFD_RELOC_16C_REG14,
+ BFD_RELOC_16C_REG14_C,
+ BFD_RELOC_16C_REG16,
+ BFD_RELOC_16C_REG16_C,
+ BFD_RELOC_16C_REG20,
+ BFD_RELOC_16C_REG20_C,
+ BFD_RELOC_16C_ABS20,
+ BFD_RELOC_16C_ABS20_C,
+ BFD_RELOC_16C_ABS24,
+ BFD_RELOC_16C_ABS24_C,
+ BFD_RELOC_16C_IMM04,
+ BFD_RELOC_16C_IMM04_C,
+ BFD_RELOC_16C_IMM16,
+ BFD_RELOC_16C_IMM16_C,
+ BFD_RELOC_16C_IMM20,
+ BFD_RELOC_16C_IMM20_C,
+ BFD_RELOC_16C_IMM24,
+ BFD_RELOC_16C_IMM24_C,
+ BFD_RELOC_16C_IMM32,
+ BFD_RELOC_16C_IMM32_C,
+
+/* NS CRX Relocations. */
+ BFD_RELOC_CRX_REL4,
+ BFD_RELOC_CRX_REL8,
+ BFD_RELOC_CRX_REL8_CMP,
+ BFD_RELOC_CRX_REL16,
+ BFD_RELOC_CRX_REL24,
+ BFD_RELOC_CRX_REL32,
+ BFD_RELOC_CRX_REGREL12,
+ BFD_RELOC_CRX_REGREL22,
+ BFD_RELOC_CRX_REGREL28,
+ BFD_RELOC_CRX_REGREL32,
+ BFD_RELOC_CRX_ABS16,
+ BFD_RELOC_CRX_ABS32,
+ BFD_RELOC_CRX_NUM8,
+ BFD_RELOC_CRX_NUM16,
+ BFD_RELOC_CRX_NUM32,
+ BFD_RELOC_CRX_IMM16,
+ BFD_RELOC_CRX_IMM32,
+ BFD_RELOC_CRX_SWITCH8,
+ BFD_RELOC_CRX_SWITCH16,
+ BFD_RELOC_CRX_SWITCH32,
+
/* These relocs are only used within the CRIS assembler. They are not
(at present) written to any object files. */
BFD_RELOC_CRIS_BDISP8,
BFD_RELOC_CRIS_UNSIGNED_5,
BFD_RELOC_CRIS_SIGNED_6,
BFD_RELOC_CRIS_UNSIGNED_6,
+ BFD_RELOC_CRIS_SIGNED_8,
+ BFD_RELOC_CRIS_UNSIGNED_8,
+ BFD_RELOC_CRIS_SIGNED_16,
+ BFD_RELOC_CRIS_UNSIGNED_16,
+ BFD_RELOC_CRIS_LAPCQ_OFFSET,
BFD_RELOC_CRIS_UNSIGNED_4,
/* Relocs used in ELF shared libraries for CRIS. */
@@ -3428,17 +4026,43 @@ This is the 5 bits of a value. */
BFD_RELOC_XSTORMY16_24,
BFD_RELOC_XSTORMY16_FPTR16,
+/* Infineon Relocations. */
+ BFD_RELOC_XC16X_PAG,
+ BFD_RELOC_XC16X_POF,
+ BFD_RELOC_XC16X_SEG,
+ BFD_RELOC_XC16X_SOF,
+
/* Relocations used by VAX ELF. */
BFD_RELOC_VAX_GLOB_DAT,
BFD_RELOC_VAX_JMP_SLOT,
BFD_RELOC_VAX_RELATIVE,
+/* Morpho MT - 16 bit immediate relocation. */
+ BFD_RELOC_MT_PC16,
+
+/* Morpho MT - Hi 16 bits of an address. */
+ BFD_RELOC_MT_HI16,
+
+/* Morpho MT - Low 16 bits of an address. */
+ BFD_RELOC_MT_LO16,
+
+/* Morpho MT - Used to tell the linker which vtable entries are used. */
+ BFD_RELOC_MT_GNU_VTINHERIT,
+
+/* Morpho MT - Used to tell the linker which vtable entries are used. */
+ BFD_RELOC_MT_GNU_VTENTRY,
+
+/* Morpho MT - 8 bit immediate relocation. */
+ BFD_RELOC_MT_PCINSN8,
+
/* msp430 specific relocation codes */
BFD_RELOC_MSP430_10_PCREL,
BFD_RELOC_MSP430_16_PCREL,
BFD_RELOC_MSP430_16,
BFD_RELOC_MSP430_16_PCREL_BYTE,
BFD_RELOC_MSP430_16_BYTE,
+ BFD_RELOC_MSP430_2X_PCREL,
+ BFD_RELOC_MSP430_RL_PCREL,
/* IQ2000 Relocations. */
BFD_RELOC_IQ2000_OFFSET_16,
@@ -3459,23 +4083,82 @@ to one of its own internal functions or data structures. */
PLT entries. Otherwise, this is just a generic 32-bit relocation. */
BFD_RELOC_XTENSA_PLT,
-/* Generic Xtensa relocations. Only the operand number is encoded
-in the relocation. The details are determined by extracting the
-instruction opcode. */
+/* 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. */
+ BFD_RELOC_XTENSA_DIFF8,
+ BFD_RELOC_XTENSA_DIFF16,
+ BFD_RELOC_XTENSA_DIFF32,
+
+/* 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. */
+ BFD_RELOC_XTENSA_SLOT0_OP,
+ BFD_RELOC_XTENSA_SLOT1_OP,
+ BFD_RELOC_XTENSA_SLOT2_OP,
+ BFD_RELOC_XTENSA_SLOT3_OP,
+ BFD_RELOC_XTENSA_SLOT4_OP,
+ BFD_RELOC_XTENSA_SLOT5_OP,
+ BFD_RELOC_XTENSA_SLOT6_OP,
+ BFD_RELOC_XTENSA_SLOT7_OP,
+ BFD_RELOC_XTENSA_SLOT8_OP,
+ BFD_RELOC_XTENSA_SLOT9_OP,
+ BFD_RELOC_XTENSA_SLOT10_OP,
+ BFD_RELOC_XTENSA_SLOT11_OP,
+ BFD_RELOC_XTENSA_SLOT12_OP,
+ BFD_RELOC_XTENSA_SLOT13_OP,
+ BFD_RELOC_XTENSA_SLOT14_OP,
+
+/* Alternate Xtensa relocations. Only the slot is encoded in the
+relocation. The meaning of these relocations is opcode-specific. */
+ BFD_RELOC_XTENSA_SLOT0_ALT,
+ BFD_RELOC_XTENSA_SLOT1_ALT,
+ BFD_RELOC_XTENSA_SLOT2_ALT,
+ BFD_RELOC_XTENSA_SLOT3_ALT,
+ BFD_RELOC_XTENSA_SLOT4_ALT,
+ BFD_RELOC_XTENSA_SLOT5_ALT,
+ BFD_RELOC_XTENSA_SLOT6_ALT,
+ BFD_RELOC_XTENSA_SLOT7_ALT,
+ BFD_RELOC_XTENSA_SLOT8_ALT,
+ BFD_RELOC_XTENSA_SLOT9_ALT,
+ BFD_RELOC_XTENSA_SLOT10_ALT,
+ BFD_RELOC_XTENSA_SLOT11_ALT,
+ BFD_RELOC_XTENSA_SLOT12_ALT,
+ BFD_RELOC_XTENSA_SLOT13_ALT,
+ BFD_RELOC_XTENSA_SLOT14_ALT,
+
+/* Xtensa relocations for backward compatibility. These have all been
+replaced by BFD_RELOC_XTENSA_SLOT0_OP. */
BFD_RELOC_XTENSA_OP0,
BFD_RELOC_XTENSA_OP1,
BFD_RELOC_XTENSA_OP2,
-/* Xtensa relocation to mark that the assembler expanded the
+/* Xtensa relocation to mark that the assembler expanded the
instructions from an original target. The expansion size is
encoded in the reloc size. */
BFD_RELOC_XTENSA_ASM_EXPAND,
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
+/* 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. */
BFD_RELOC_XTENSA_ASM_SIMPLIFY,
+
+/* 8 bit signed offset in (ix+d) or (iy+d). */
+ BFD_RELOC_Z80_DISP8,
+
+/* DJNZ offset. */
+ BFD_RELOC_Z8K_DISP7,
+
+/* CALR offset. */
+ BFD_RELOC_Z8K_CALLR,
+
+/* 4 bit value. */
+ BFD_RELOC_Z8K_IMM4L,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *bfd_reloc_type_lookup
@@ -3619,6 +4302,11 @@ bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
#define bfd_is_local_label_name(abfd, name) \
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
+bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
+
+#define bfd_is_target_special_symbol(abfd, sym) \
+ BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
+
#define bfd_canonicalize_symtab(abfd, location) \
BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
@@ -3660,14 +4348,10 @@ struct bfd
/* A pointer to the target jump table. */
const struct bfd_target *xvec;
- /* To avoid dragging too many header files into every file that
- includes `<<bfd.h>>', IOSTREAM has been declared as a "char *",
- and MTIME as a "long". Their correct types, to which they
- are cast when used, are "FILE *" and "time_t". The iostream
- is the result of an fopen on the filename. However, if the
- BFD_IN_MEMORY flag is set, then iostream is actually a pointer
- to a bfd_in_memory struct. */
+ /* 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? */
@@ -3730,8 +4414,8 @@ struct bfd
/* Pointer to linked list of sections. */
struct bfd_section *sections;
- /* The place where we add to the section list. */
- struct bfd_section **section_tail;
+ /* The last section on the section list. */
+ struct bfd_section *section_last;
/* The number of sections. */
unsigned int section_count;
@@ -3752,6 +4436,9 @@ struct bfd
/* 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. */
@@ -3857,8 +4544,6 @@ void bfd_set_error_program_name (const char *);
bfd_error_handler_type bfd_get_error_handler (void);
-const char *bfd_archive_filename (bfd *);
-
long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
long bfd_canonicalize_reloc
@@ -3881,6 +4566,11 @@ void bfd_set_gp_size (bfd *abfd, unsigned int i);
bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
+bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
+
+#define bfd_copy_private_header_data(ibfd, obfd) \
+ BFD_SEND (obfd, _bfd_copy_private_header_data, \
+ (ibfd, obfd))
bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
#define bfd_copy_private_bfd_data(ibfd, obfd) \
@@ -3902,6 +4592,14 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
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))
@@ -3929,6 +4627,9 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#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))
@@ -3941,7 +4642,7 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#define bfd_link_add_symbols(abfd, info) \
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-#define bfd_link_just_syms(sec, info) \
+#define bfd_link_just_syms(abfd, sec, info) \
BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
#define bfd_final_link(abfd, info) \
@@ -3959,6 +4660,10 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#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))
@@ -3978,7 +4683,7 @@ struct bfd_preserve
flagword flags;
const struct bfd_arch_info *arch_info;
struct bfd_section *sections;
- struct bfd_section **section_tail;
+ struct bfd_section *section_last;
unsigned int section_count;
struct bfd_hash_table section_htab;
};
@@ -4005,6 +4710,9 @@ int bfd_core_file_failing_signal (bfd *abfd);
bfd_boolean core_file_matches_executable_p
(bfd *core_bfd, bfd *exec_bfd);
+bfd_boolean generic_core_file_matches_executable_p
+ (bfd *core_bfd, bfd *exec_bfd);
+
/* Extracted from targets.c. */
#define BFD_SEND(bfd, message, arglist) \
((*((bfd)->xvec->message)) arglist)
@@ -4093,7 +4801,7 @@ typedef struct bfd_target
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 asthe first argument.
+ 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 *);
@@ -4153,8 +4861,10 @@ typedef struct bfd_target
#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
@@ -4164,6 +4874,12 @@ typedef struct bfd_target
/* 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)
@@ -4172,6 +4888,10 @@ typedef struct bfd_target
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);
@@ -4223,8 +4943,11 @@ typedef struct bfd_target
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
@@ -4241,11 +4964,16 @@ typedef struct bfd_target
(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. */
@@ -4296,7 +5024,9 @@ typedef struct bfd_target
NAME##_bfd_link_split_section, \
NAME##_bfd_gc_sections, \
NAME##_bfd_merge_sections, \
- NAME##_bfd_discard_group
+ 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)
@@ -4333,13 +5063,21 @@ typedef struct bfd_target
/* 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
@@ -4348,6 +5086,10 @@ typedef struct bfd_target
/* 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. */
@@ -4389,6 +5131,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);
+
+#define bfd_section_already_linked(abfd, sec) \
+ BFD_SEND (abfd, _section_already_linked, (abfd, sec))
+
/* Extracted from simple.c. */
bfd_byte *bfd_simple_get_relocated_section_contents
(bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
diff --git a/contrib/binutils/bfd/bfd.c b/contrib/binutils/bfd/bfd.c
index 59e22aaed8dd..733f6ee0272d 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
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
SECTION
@@ -45,14 +45,10 @@ CODE_FRAGMENT
. {* A pointer to the target jump table. *}
. const struct bfd_target *xvec;
.
-. {* To avoid dragging too many header files into every file that
-. includes `<<bfd.h>>', IOSTREAM has been declared as a "char *",
-. and MTIME as a "long". Their correct types, to which they
-. are cast when used, are "FILE *" and "time_t". The iostream
-. is the result of an fopen on the filename. However, if the
-. BFD_IN_MEMORY flag is set, then iostream is actually a pointer
-. to a bfd_in_memory struct. *}
+. {* 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? *}
@@ -115,8 +111,8 @@ CODE_FRAGMENT
. {* Pointer to linked list of sections. *}
. struct bfd_section *sections;
.
-. {* The place where we add to the section list. *}
-. struct bfd_section **section_tail;
+. {* The last section on the section list. *}
+. struct bfd_section *section_last;
.
. {* The number of sections. *}
. unsigned int section_count;
@@ -137,6 +133,9 @@ CODE_FRAGMENT
. {* 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. *}
@@ -217,6 +216,11 @@ CODE_FRAGMENT
#include "libecoff.h"
#undef obj_symbols
#include "elf-bfd.h"
+
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+
/* provide storage for subsystem, stack and heap data which may have been
passed in on the command line. Ld puts this data into a bfd_link_info
@@ -410,23 +414,152 @@ CODE_FRAGMENT
static const char *_bfd_error_program_name;
-/* This is the default routine to handle BFD error messages. */
+/* This is the default routine to handle BFD error messages.
+ Like fprintf (stderr, ...), but also handles some extra format specifiers.
+
+ %A section name from section. For group components, print group name too.
+ %B file name from bfd. For archive components, prints archive too.
+ */
-static void
-_bfd_default_error_handler (const char *s, ...)
+void
+_bfd_default_error_handler (const char *fmt, ...)
{
- va_list p;
+ va_list ap;
+ char *bufp;
+ const char *new_fmt, *p;
+ size_t avail = 1000;
+ char buf[1000];
if (_bfd_error_program_name != NULL)
fprintf (stderr, "%s: ", _bfd_error_program_name);
else
fprintf (stderr, "BFD: ");
- va_start (p, s);
- vfprintf (stderr, s, p);
- va_end (p);
+ va_start (ap, fmt);
+ new_fmt = fmt;
+ bufp = buf;
- fprintf (stderr, "\n");
+ /* Reserve enough space for the existing format string. */
+ avail -= strlen (fmt) + 1;
+ if (avail > 1000)
+ _exit (EXIT_FAILURE);
+
+ p = fmt;
+ while (1)
+ {
+ char *q;
+ size_t len, extra, trim;
+
+ p = strchr (p, '%');
+ if (p == NULL || p[1] == '\0')
+ {
+ if (new_fmt == buf)
+ {
+ len = strlen (fmt);
+ memcpy (bufp, fmt, len + 1);
+ }
+ break;
+ }
+
+ if (p[1] == 'A' || p[1] == 'B')
+ {
+ len = p - fmt;
+ memcpy (bufp, fmt, len);
+ bufp += len;
+ fmt = p + 2;
+ new_fmt = buf;
+
+ /* If we run out of space, tough, you lose your ridiculously
+ long file or section name. It's not safe to try to alloc
+ memory here; We might be printing an out of memory message. */
+ if (avail == 0)
+ {
+ *bufp++ = '*';
+ *bufp++ = '*';
+ *bufp = '\0';
+ }
+ else
+ {
+ if (p[1] == 'B')
+ {
+ bfd *abfd = va_arg (ap, bfd *);
+ if (abfd->my_archive)
+ snprintf (bufp, avail, "%s(%s)",
+ abfd->my_archive->filename, abfd->filename);
+ else
+ snprintf (bufp, avail, "%s", abfd->filename);
+ }
+ else
+ {
+ asection *sec = va_arg (ap, asection *);
+ bfd *abfd = sec->owner;
+ const char *group = NULL;
+ struct coff_comdat_info *ci;
+
+ if (abfd != NULL
+ && bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && elf_next_in_group (sec) != NULL
+ && (sec->flags & SEC_GROUP) == 0)
+ group = elf_group_name (sec);
+ else if (abfd != NULL
+ && bfd_get_flavour (abfd) == bfd_target_coff_flavour
+ && (ci = bfd_coff_get_comdat_section (sec->owner,
+ sec)) != NULL)
+ group = ci->name;
+ if (group != NULL)
+ snprintf (bufp, avail, "%s[%s]", sec->name, group);
+ else
+ snprintf (bufp, avail, "%s", sec->name);
+ }
+ len = strlen (bufp);
+ avail = avail - len + 2;
+
+ /* We need to replace any '%' we printed by "%%".
+ First count how many. */
+ q = bufp;
+ bufp += len;
+ extra = 0;
+ while ((q = strchr (q, '%')) != NULL)
+ {
+ ++q;
+ ++extra;
+ }
+
+ /* If there isn't room, trim off the end of the string. */
+ q = bufp;
+ bufp += extra;
+ if (extra > avail)
+ {
+ trim = extra - avail;
+ bufp -= trim;
+ do
+ {
+ if (*--q == '%')
+ --extra;
+ }
+ while (--trim != 0);
+ *q = '\0';
+ avail = extra;
+ }
+ avail -= extra;
+
+ /* Now double all '%' chars, shuffling the string as we go. */
+ while (extra != 0)
+ {
+ while ((q[extra] = *q) != '%')
+ --q;
+ q[--extra] = '%';
+ --q;
+ }
+ }
+ }
+ p = p + 2;
+ }
+
+ vfprintf (stderr, new_fmt, ap);
+ va_end (ap);
+
+ putc ('\n', stderr);
}
/* This is a function pointer to the routine which should handle BFD
@@ -495,60 +628,13 @@ bfd_get_error_handler (void)
{
return _bfd_error_handler;
}
-
-/*
-FUNCTION
- bfd_archive_filename
-
-SYNOPSIS
- const char *bfd_archive_filename (bfd *);
-
-DESCRIPTION
- For a BFD that is a component of an archive, returns a string
- with both the archive name and file name. For other BFDs, just
- returns the file name.
-*/
-
-const char *
-bfd_archive_filename (bfd *abfd)
-{
- if (abfd == NULL)
- return _("<unknown>");
-
- if (abfd->my_archive)
- {
- static size_t curr = 0;
- static char *buf;
- size_t needed;
-
- needed = (strlen (bfd_get_filename (abfd->my_archive))
- + strlen (bfd_get_filename (abfd)) + 3);
- if (needed > curr)
- {
- if (curr)
- free (buf);
- curr = needed + (needed >> 1);
- buf = bfd_malloc (curr);
- /* If we can't malloc, fail safe by returning just the file
- name. This function is only used when building error
- messages. */
- if (!buf)
- {
- curr = 0;
- return bfd_get_filename (abfd);
- }
- }
- sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
- bfd_get_filename (abfd));
- return buf;
- }
- else
- return bfd_get_filename (abfd);
-}
/*
SECTION
- Symbols
+ Miscellaneous
+
+SUBSECTION
+ Miscellaneous functions
*/
/*
@@ -694,10 +780,6 @@ bfd_assert (const char *file, int line)
/* A more or less friendly abort message. In libbfd.h abort is
defined to call this function. */
-#ifndef EXIT_FAILURE
-#define EXIT_FAILURE 1
-#endif
-
void
_bfd_abort (const char *file, int line, const char *fn)
{
@@ -710,7 +792,7 @@ _bfd_abort (const char *file, int line, const char *fn)
(_("BFD %s internal error, aborting at %s line %d\n"),
BFD_VERSION_STRING, file, line);
(*_bfd_error_handler) (_("Please report this bug.\n"));
- xexit (EXIT_FAILURE);
+ _exit (EXIT_FAILURE);
}
/*
@@ -769,12 +851,14 @@ bfd_get_sign_extend_vma (bfd *abfd)
name = bfd_get_target (abfd);
- /* Return a proper value for DJGPP COFF (an x86 COFF variant).
+ /* Return a proper value for DJGPP & PE COFF (x86 COFF variants).
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 (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0
+ || strcmp (name, "pe-i386") == 0
+ || strcmp (name, "pei-i386") == 0)
return 1;
bfd_set_error (bfd_error_wrong_format);
@@ -984,6 +1068,29 @@ bfd_scan_vma (const char *string, const char **end, int base)
/*
FUNCTION
+ bfd_copy_private_header_data
+
+SYNOPSIS
+ bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
+
+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
+ <<true>> on success, <<false>> on error.
+ Possible error returns are:
+
+ o <<bfd_error_no_memory>> -
+ Not enough memory exists to create private data for @var{obfd}.
+
+.#define bfd_copy_private_header_data(ibfd, obfd) \
+. BFD_SEND (obfd, _bfd_copy_private_header_data, \
+. (ibfd, obfd))
+
+*/
+
+/*
+FUNCTION
bfd_copy_private_bfd_data
SYNOPSIS
@@ -1058,6 +1165,14 @@ DESCRIPTION
. 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))
.
@@ -1085,6 +1200,9 @@ DESCRIPTION
.#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))
.
@@ -1097,7 +1215,7 @@ DESCRIPTION
.#define bfd_link_add_symbols(abfd, info) \
. BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
.
-.#define bfd_link_just_syms(sec, info) \
+.#define bfd_link_just_syms(abfd, sec, info) \
. BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
.
.#define bfd_final_link(abfd, info) \
@@ -1115,6 +1233,10 @@ DESCRIPTION
.#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))
.
@@ -1280,7 +1402,7 @@ CODE_FRAGMENT
. flagword flags;
. const struct bfd_arch_info *arch_info;
. struct bfd_section *sections;
-. struct bfd_section **section_tail;
+. struct bfd_section *section_last;
. unsigned int section_count;
. struct bfd_hash_table section_htab;
.};
@@ -1314,18 +1436,19 @@ bfd_preserve_save (bfd *abfd, struct bfd_preserve *preserve)
preserve->arch_info = abfd->arch_info;
preserve->flags = abfd->flags;
preserve->sections = abfd->sections;
- preserve->section_tail = abfd->section_tail;
+ preserve->section_last = abfd->section_last;
preserve->section_count = abfd->section_count;
preserve->section_htab = abfd->section_htab;
- if (! bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc))
+ if (! bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc,
+ sizeof (struct section_hash_entry)))
return FALSE;
abfd->tdata.any = NULL;
abfd->arch_info = &bfd_default_arch_struct;
abfd->flags &= BFD_IN_MEMORY;
abfd->sections = NULL;
- abfd->section_tail = &abfd->sections;
+ abfd->section_last = NULL;
abfd->section_count = 0;
return TRUE;
@@ -1355,7 +1478,7 @@ bfd_preserve_restore (bfd *abfd, struct bfd_preserve *preserve)
abfd->flags = preserve->flags;
abfd->section_htab = preserve->section_htab;
abfd->sections = preserve->sections;
- abfd->section_tail = preserve->section_tail;
+ abfd->section_last = preserve->section_last;
abfd->section_count = preserve->section_count;
/* bfd_release frees all memory more recently bfd_alloc'd than
diff --git a/contrib/binutils/bfd/bfdio.c b/contrib/binutils/bfd/bfdio.c
index a90cb33ea5f8..22ea886b5cb0 100644
--- a/contrib/binutils/bfd/bfdio.c
+++ b/contrib/binutils/bfd/bfdio.c
@@ -1,7 +1,8 @@
/* Low-level I/O routines for BFDs.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -19,7 +20,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
@@ -62,38 +63,52 @@ real_fseek (FILE *file, file_ptr offset, int whence)
#endif
}
-/* Note that archive entries don't have streams; they share their parent's.
- This allows someone to play with the iostream behind BFD's back.
-
- Also, note that the origin pointer points to the beginning of a file's
- contents (0 for non-archive elements). For archive entries this is the
- first octet in the file, NOT the beginning of the archive header. */
-
-static size_t
-real_read (void *where, size_t a, size_t b, FILE *file)
+FILE *
+real_fopen (const char *filename, const char *modes)
{
- /* FIXME - this looks like an optimization, but it's really to cover
- up for a feature of some OSs (not solaris - sigh) that
- ld/pe-dll.c takes advantage of (apparently) when it creates BFDs
- internally and tries to link against them. BFD seems to be smart
- enough to realize there are no symbol records in the "file" that
- doesn't exist but attempts to read them anyway. On Solaris,
- attempting to read zero bytes from a NULL file results in a core
- dump, but on other platforms it just returns zero bytes read.
- This makes it to something reasonable. - DJ */
- if (a == 0 || b == 0)
- return 0;
-
-
-#if defined (__VAX) && defined (VMS)
- /* Apparently fread on Vax VMS does not keep the record length
- information. */
- return read (fileno (file), where, a * b);
+#if defined (HAVE_FOPEN64)
+ return fopen64 (filename, modes);
#else
- return fread (where, a, b, file);
+ return fopen (filename, modes);
#endif
}
+/*
+INTERNAL_DEFINITION
+ struct bfd_iovec
+
+DESCRIPTION
+
+ The <<struct bfd_iovec>> contains the internal file I/O class.
+ Each <<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).
+
+.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 <<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 <<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 <<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);
+.};
+
+*/
+
+
/* Return value is amount read. */
bfd_size_type
@@ -121,25 +136,13 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd)
return get;
}
- nread = real_read (ptr, 1, (size_t) size, bfd_cache_lookup (abfd));
+ if (abfd->iovec)
+ nread = abfd->iovec->bread (abfd, ptr, size);
+ else
+ nread = 0;
if (nread != (size_t) -1)
abfd->where += nread;
- /* Set bfd_error if we did not read as much data as we expected.
-
- If the read failed due to an error set the bfd_error_system_call,
- else set bfd_error_file_truncated.
-
- A BFD backend may wish to override bfd_error_file_truncated to
- provide something more useful (eg. no_symbols or wrong_format). */
- if (nread != size)
- {
- if (ferror (bfd_cache_lookup (abfd)))
- bfd_set_error (bfd_error_system_call);
- else
- bfd_set_error (bfd_error_file_truncated);
- }
-
return nread;
}
@@ -151,6 +154,7 @@ bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd)
if ((abfd->flags & BFD_IN_MEMORY) != 0)
{
struct bfd_in_memory *bim = abfd->iostream;
+
size = (size_t) size;
if (abfd->where + size > bim->size)
{
@@ -175,7 +179,11 @@ bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd)
return size;
}
- nwrote = fwrite (ptr, 1, (size_t) size, bfd_cache_lookup (abfd));
+ if (abfd->iovec)
+ nwrote = abfd->iovec->bwrite (abfd, ptr, size);
+ else
+ nwrote = 0;
+
if (nwrote != (size_t) -1)
abfd->where += nwrote;
if (nwrote != size)
@@ -196,10 +204,16 @@ bfd_tell (bfd *abfd)
if ((abfd->flags & BFD_IN_MEMORY) != 0)
return abfd->where;
- ptr = real_ftell (bfd_cache_lookup (abfd));
+ if (abfd->iovec)
+ {
+ ptr = abfd->iovec->btell (abfd);
+
+ if (abfd->my_archive)
+ ptr -= abfd->origin;
+ }
+ else
+ ptr = 0;
- if (abfd->my_archive)
- ptr -= abfd->origin;
abfd->where = ptr;
return ptr;
}
@@ -209,7 +223,10 @@ bfd_flush (bfd *abfd)
{
if ((abfd->flags & BFD_IN_MEMORY) != 0)
return 0;
- return fflush (bfd_cache_lookup(abfd));
+
+ if (abfd->iovec)
+ return abfd->iovec->bflush (abfd);
+ return 0;
}
/* Returns 0 for success, negative value for failure (in which case
@@ -217,19 +234,16 @@ bfd_flush (bfd *abfd)
int
bfd_stat (bfd *abfd, struct stat *statbuf)
{
- FILE *f;
int result;
if ((abfd->flags & BFD_IN_MEMORY) != 0)
abort ();
- f = bfd_cache_lookup (abfd);
- if (f == NULL)
- {
- bfd_set_error (bfd_error_system_call);
- return -1;
- }
- result = fstat (fileno (f), statbuf);
+ if (abfd->iovec)
+ result = abfd->iovec->bstat (abfd, statbuf);
+ else
+ result = -1;
+
if (result < 0)
bfd_set_error (bfd_error_system_call);
return result;
@@ -242,7 +256,6 @@ int
bfd_seek (bfd *abfd, file_ptr position, int direction)
{
int result;
- FILE *f;
file_ptr file_position;
/* For the time being, a BFD may not seek to it's end. The problem
is that we don't easily have a way to recognize the end of an
@@ -270,6 +283,7 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
(abfd->direction == both_direction))
{
bfd_size_type newsize, oldsize;
+
oldsize = (bim->size + 127) & ~(bfd_size_type) 127;
bim->size = abfd->where;
/* Round up to cut down on memory fragmentation */
@@ -296,20 +310,6 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
if (abfd->format != bfd_archive && abfd->my_archive == 0)
{
-#if 0
- /* Explanation for this code: I'm only about 95+% sure that the above
- conditions are sufficient and that all i/o calls are properly
- adjusting the `where' field. So this is sort of an `assert'
- that the `where' field is correct. If we can go a while without
- tripping the abort, we can probably safely disable this code,
- so that the real optimizations happen. */
- file_ptr where_am_i_now;
- where_am_i_now = real_ftell (bfd_cache_lookup (abfd));
- if (abfd->my_archive)
- where_am_i_now -= abfd->origin;
- if (where_am_i_now != abfd->where)
- abort ();
-#endif
if (direction == SEEK_SET && (bfd_vma) position == abfd->where)
return 0;
}
@@ -328,12 +328,15 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
In the meantime, no optimization for archives. */
}
- f = bfd_cache_lookup (abfd);
file_position = position;
if (direction == SEEK_SET && abfd->my_archive != NULL)
file_position += abfd->origin;
- result = real_fseek (f, file_position, direction);
+ if (abfd->iovec)
+ result = abfd->iovec->bseek (abfd, file_position, direction);
+ else
+ result = -1;
+
if (result != 0)
{
int hold_errno = errno;
@@ -378,14 +381,15 @@ DESCRIPTION
long
bfd_get_mtime (bfd *abfd)
{
- FILE *fp;
struct stat buf;
if (abfd->mtime_set)
return abfd->mtime;
- fp = bfd_cache_lookup (abfd);
- if (0 != fstat (fileno (fp), &buf))
+ if (abfd->iovec == NULL)
+ return 0;
+
+ if (abfd->iovec->bstat (abfd, &buf) != 0)
return 0;
abfd->mtime = buf.st_mtime; /* Save value in case anyone wants it */
@@ -428,14 +432,15 @@ DESCRIPTION
long
bfd_get_size (bfd *abfd)
{
- FILE *fp;
struct stat buf;
if ((abfd->flags & BFD_IN_MEMORY) != 0)
return ((struct bfd_in_memory *) abfd->iostream)->size;
- fp = bfd_cache_lookup (abfd);
- if (0 != fstat (fileno (fp), & buf))
+ if (abfd->iovec == NULL)
+ return 0;
+
+ if (abfd->iovec->bstat (abfd, &buf) != 0)
return 0;
return buf.st_size;
diff --git a/contrib/binutils/bfd/bfdwin.c b/contrib/binutils/bfd/bfdwin.c
index fb7c967bff3b..7236906e28bc 100644
--- a/contrib/binutils/bfd/bfdwin.c
+++ b/contrib/binutils/bfd/bfdwin.c
@@ -1,5 +1,6 @@
/* Support for memory-mapped windows into a BFD.
- Copyright 1995, 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2001, 2002, 2003, 2005
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
@@ -144,7 +145,6 @@ bfd_get_file_window (bfd *abfd,
file_ptr file_offset, offset2;
size_t real_size;
int fd;
- FILE *f;
/* Find the real file and the real offset into it. */
while (abfd->my_archive != NULL)
@@ -152,8 +152,13 @@ bfd_get_file_window (bfd *abfd,
offset += abfd->origin;
abfd = abfd->my_archive;
}
- f = bfd_cache_lookup (abfd);
- fd = fileno (f);
+
+ /* Seek into the file, to ensure it is open if cacheable. */
+ if (abfd->iostream == NULL
+ && (abfd->iovec == NULL
+ || abfd->iovec->bseek (abfd, offset, SEEK_SET) != 0))
+ return FALSE;
+ fd = fileno ((FILE *) abfd->iostream);
/* Compute offsets and size for mmap and for the user's data. */
offset2 = offset % pagesize;
diff --git a/contrib/binutils/bfd/binary.c b/contrib/binutils/bfd/binary.c
index 65f46afa39c6..458626f02a35 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
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004, 2005 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.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This is a BFD backend which may be used to write binary objects.
It may only be used for output, not input. The intention is that
@@ -41,18 +41,6 @@
a start symbol, an end symbol, and an absolute length symbol. */
#define BIN_SYMS 3
-static bfd_boolean binary_mkobject PARAMS ((bfd *));
-static const bfd_target *binary_object_p PARAMS ((bfd *));
-static bfd_boolean binary_get_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
-static long binary_get_symtab_upper_bound PARAMS ((bfd *));
-static char *mangle_name PARAMS ((bfd *, char *));
-static long binary_canonicalize_symtab PARAMS ((bfd *, asymbol **));
-static void binary_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
-static bfd_boolean binary_set_section_contents
- PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
-static int binary_sizeof_headers PARAMS ((bfd *, bfd_boolean));
-
/* Set by external programs - specifies the BFD architecture and
machine number to be uses when creating binary BFDs. */
enum bfd_architecture bfd_external_binary_architecture = bfd_arch_unknown;
@@ -61,8 +49,7 @@ unsigned long bfd_external_machine = 0;
/* Create a binary object. Invoked via bfd_set_format. */
static bfd_boolean
-binary_mkobject (abfd)
- bfd *abfd ATTRIBUTE_UNUSED;
+binary_mkobject (bfd *abfd ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -72,8 +59,7 @@ binary_mkobject (abfd)
being binary. */
static const bfd_target *
-binary_object_p (abfd)
- bfd *abfd;
+binary_object_p (bfd *abfd)
{
struct stat statbuf;
asection *sec;
@@ -99,10 +85,10 @@ binary_object_p (abfd)
return NULL;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS;
sec->vma = 0;
- sec->_raw_size = statbuf.st_size;
+ sec->size = statbuf.st_size;
sec->filepos = 0;
- abfd->tdata.any = (PTR) sec;
+ abfd->tdata.any = (void *) sec;
if (bfd_get_arch_info (abfd) != NULL)
{
@@ -115,19 +101,18 @@ binary_object_p (abfd)
return abfd->xvec;
}
-#define binary_close_and_cleanup _bfd_generic_close_and_cleanup
-#define binary_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
-#define binary_new_section_hook _bfd_generic_new_section_hook
+#define binary_close_and_cleanup _bfd_generic_close_and_cleanup
+#define binary_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
+#define binary_new_section_hook _bfd_generic_new_section_hook
/* Get contents of the only section. */
static bfd_boolean
-binary_get_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- asection *section ATTRIBUTE_UNUSED;
- PTR location;
- file_ptr offset;
- bfd_size_type count;
+binary_get_section_contents (bfd *abfd,
+ asection *section ATTRIBUTE_UNUSED,
+ void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
if (bfd_seek (abfd, offset, SEEK_SET) != 0
|| bfd_bread (location, count, abfd) != count)
@@ -138,8 +123,7 @@ binary_get_section_contents (abfd, section, location, offset, count)
/* Return the amount of memory needed to read the symbol table. */
static long
-binary_get_symtab_upper_bound (abfd)
- bfd *abfd ATTRIBUTE_UNUSED;
+binary_get_symtab_upper_bound (bfd *abfd ATTRIBUTE_UNUSED)
{
return (BIN_SYMS + 1) * sizeof (asymbol *);
}
@@ -147,9 +131,7 @@ binary_get_symtab_upper_bound (abfd)
/* Create a symbol name based on the bfd's filename. */
static char *
-mangle_name (abfd, suffix)
- bfd *abfd;
- char *suffix;
+mangle_name (bfd *abfd, char *suffix)
{
bfd_size_type size;
char *buf;
@@ -159,7 +141,7 @@ mangle_name (abfd, suffix)
+ strlen (suffix)
+ sizeof "_binary__");
- buf = (char *) bfd_alloc (abfd, size);
+ buf = bfd_alloc (abfd, size);
if (buf == NULL)
return "";
@@ -176,16 +158,14 @@ mangle_name (abfd, suffix)
/* Return the symbol table. */
static long
-binary_canonicalize_symtab (abfd, alocation)
- bfd *abfd;
- asymbol **alocation;
+binary_canonicalize_symtab (bfd *abfd, asymbol **alocation)
{
asection *sec = (asection *) abfd->tdata.any;
asymbol *syms;
unsigned int i;
bfd_size_type amt = BIN_SYMS * sizeof (asymbol);
- syms = (asymbol *) bfd_alloc (abfd, amt);
+ syms = bfd_alloc (abfd, amt);
if (syms == NULL)
return 0;
@@ -200,7 +180,7 @@ binary_canonicalize_symtab (abfd, alocation)
/* End symbol. */
syms[1].the_bfd = abfd;
syms[1].name = mangle_name (abfd, "end");
- syms[1].value = sec->_raw_size;
+ syms[1].value = sec->size;
syms[1].flags = BSF_GLOBAL;
syms[1].section = sec;
syms[1].udata.p = NULL;
@@ -208,7 +188,7 @@ binary_canonicalize_symtab (abfd, alocation)
/* Size symbol. */
syms[2].the_bfd = abfd;
syms[2].name = mangle_name (abfd, "size");
- syms[2].value = sec->_raw_size;
+ syms[2].value = sec->size;
syms[2].flags = BSF_GLOBAL;
syms[2].section = bfd_abs_section_ptr;
syms[2].udata.p = NULL;
@@ -220,32 +200,30 @@ binary_canonicalize_symtab (abfd, alocation)
return BIN_SYMS;
}
-#define binary_make_empty_symbol _bfd_generic_make_empty_symbol
-#define binary_print_symbol _bfd_nosymbols_print_symbol
+#define binary_make_empty_symbol _bfd_generic_make_empty_symbol
+#define binary_print_symbol _bfd_nosymbols_print_symbol
/* Get information about a symbol. */
static void
-binary_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- asymbol *symbol;
- symbol_info *ret;
+binary_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
+ asymbol *symbol,
+ symbol_info *ret)
{
bfd_symbol_info (symbol, ret);
}
-#define binary_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define binary_get_lineno _bfd_nosymbols_get_lineno
-#define binary_find_nearest_line _bfd_nosymbols_find_nearest_line
-#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_get_reloc_upper_bound \
- ((long (*) PARAMS ((bfd *, asection *))) bfd_0l)
-#define binary_canonicalize_reloc \
- ((long (*) PARAMS ((bfd *, asection *, arelent **, asymbol **))) bfd_0l)
-#define binary_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
+#define binary_bfd_is_local_label_name bfd_generic_is_local_label_name
+#define binary_get_lineno _bfd_nosymbols_get_lineno
+#define binary_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define binary_find_inliner_info _bfd_nosymbols_find_inliner_info
+#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. */
#define binary_set_arch_mach _bfd_generic_set_arch_mach
@@ -253,12 +231,11 @@ binary_get_symbol_info (ignore_abfd, symbol, ret)
/* Write section contents of a binary file. */
static bfd_boolean
-binary_set_section_contents (abfd, sec, data, offset, size)
- bfd *abfd;
- asection *sec;
- const PTR data;
- file_ptr offset;
- bfd_size_type size;
+binary_set_section_contents (bfd *abfd,
+ asection *sec,
+ const void * data,
+ file_ptr offset,
+ bfd_size_type size)
{
if (size == 0)
return TRUE;
@@ -278,7 +255,7 @@ binary_set_section_contents (abfd, sec, data, offset, size)
if (((s->flags
& (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC | SEC_NEVER_LOAD))
== (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC))
- && (s->_raw_size > 0)
+ && (s->size > 0)
&& (! found_low || s->lma < low))
{
low = s->lma;
@@ -294,7 +271,7 @@ binary_set_section_contents (abfd, sec, data, offset, size)
if ((s->flags
& (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_NEVER_LOAD))
!= (SEC_HAS_CONTENTS | SEC_ALLOC)
- || (s->_raw_size == 0))
+ || (s->size == 0))
continue;
/* If attempting to generate a binary file from a bfd with
@@ -327,27 +304,26 @@ binary_set_section_contents (abfd, sec, data, offset, size)
/* No space is required for header information. */
static int
-binary_sizeof_headers (abfd, exec)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_boolean exec ATTRIBUTE_UNUSED;
+binary_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_boolean exec ATTRIBUTE_UNUSED)
{
return 0;
}
-#define binary_bfd_get_relocated_section_contents \
- bfd_generic_get_relocated_section_contents
-#define binary_bfd_relax_section bfd_generic_relax_section
-#define binary_bfd_gc_sections bfd_generic_gc_sections
-#define binary_bfd_merge_sections bfd_generic_merge_sections
-#define binary_bfd_discard_group bfd_generic_discard_group
-#define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#define binary_bfd_link_just_syms _bfd_generic_link_just_syms
-#define binary_bfd_link_add_symbols _bfd_generic_link_add_symbols
-#define binary_bfd_final_link _bfd_generic_final_link
-#define binary_bfd_link_split_section _bfd_generic_link_split_section
-#define binary_get_section_contents_in_window \
- _bfd_generic_get_section_contents_in_window
+#define binary_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
+#define binary_bfd_relax_section bfd_generic_relax_section
+#define binary_bfd_gc_sections bfd_generic_gc_sections
+#define binary_bfd_merge_sections bfd_generic_merge_sections
+#define binary_bfd_is_group_section bfd_generic_is_group_section
+#define binary_bfd_discard_group bfd_generic_discard_group
+#define binary_section_already_linked _bfd_generic_section_already_linked
+#define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
+#define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
+#define binary_bfd_link_just_syms _bfd_generic_link_just_syms
+#define binary_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define binary_bfd_final_link _bfd_generic_final_link
+#define binary_bfd_link_split_section _bfd_generic_link_split_section
+#define binary_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
const bfd_target binary_vec =
{
@@ -369,7 +345,7 @@ const bfd_target binary_vec =
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
{ /* bfd_check_format */
_bfd_dummy_target,
- binary_object_p, /* bfd_check_format */
+ binary_object_p,
_bfd_dummy_target,
_bfd_dummy_target,
},
diff --git a/contrib/binutils/bfd/bout.c b/contrib/binutils/bfd/bout.c
index a39a9a36a945..5102ba776223 100644
--- a/contrib/binutils/bfd/bout.c
+++ b/contrib/binutils/bfd/bout.c
@@ -1,24 +1,24 @@
/* BFD back-end for Intel 960 b.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -26,103 +26,85 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
#include "genlink.h"
#include "bout.h"
+#include "libiberty.h"
#include "aout/stab_gnu.h"
#include "libaout.h" /* BFD a.out internal data structures. */
-static int aligncode
- PARAMS ((bfd *abfd, asection *input_section, arelent *r,
- unsigned int shrink));
-static void perform_slip
- PARAMS ((bfd *abfd, unsigned int slip, asection *input_section,
- bfd_vma value));
-static bfd_boolean b_out_squirt_out_relocs
- PARAMS ((bfd *abfd, asection *section));
-static const bfd_target *b_out_callback
- PARAMS ((bfd *));
-static bfd_reloc_status_type calljx_callback
- PARAMS ((bfd *, struct bfd_link_info *, arelent *, PTR src, PTR dst,
- asection *));
-static bfd_reloc_status_type callj_callback
- PARAMS ((bfd *, struct bfd_link_info *, arelent *, PTR data,
- unsigned int srcidx, unsigned int dstidx, asection *, bfd_boolean));
-static bfd_vma get_value
- PARAMS ((arelent *, struct bfd_link_info *, asection *));
-static int abs32code
- PARAMS ((bfd *, asection *, arelent *, unsigned int,
- struct bfd_link_info *));
-static bfd_boolean b_out_bfd_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
-static bfd_byte *b_out_bfd_get_relocated_section_contents
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bfd_boolean, asymbol **));
-static int b_out_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
-static bfd_boolean b_out_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long));
-static bfd_boolean b_out_set_section_contents
- PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
-static long b_out_get_reloc_upper_bound
- PARAMS ((bfd *, sec_ptr));
-static long b_out_canonicalize_reloc
- PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
-static bfd_boolean b_out_slurp_reloc_table
- PARAMS ((bfd *, sec_ptr, asymbol **));
-static reloc_howto_type *b_out_bfd_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static bfd_boolean b_out_write_object_contents
- PARAMS ((bfd *));
-static int b_out_symbol_cmp
- PARAMS ((const void *, const void *));
-static bfd_boolean b_out_mkobject
- PARAMS ((bfd *));
-static const bfd_target *b_out_object_p
- PARAMS ((bfd *));
-
-void bout_swap_exec_header_in
- PARAMS ((bfd *, struct external_exec *, struct internal_exec *));
-void bout_swap_exec_header_out
- PARAMS ((bfd *, struct internal_exec *, struct external_exec *));
+#define ABS32CODE 0
+#define ABS32CODE_SHRUNK 1
+#define PCREL24 2
+#define CALLJ 3
+#define ABS32 4
+#define PCREL13 5
+#define ABS32_MAYBE_RELAXABLE 1
+#define ABS32_WAS_RELAXABLE 2
+
+#define ALIGNER 10
+#define ALIGNDONE 11
+
+static reloc_howto_type howto_reloc_callj =
+ HOWTO (CALLJ, 0, 2, 24, TRUE, 0, complain_overflow_signed, 0,"callj", TRUE, 0x00ffffff, 0x00ffffff,FALSE);
+static reloc_howto_type howto_reloc_abs32 =
+ HOWTO (ABS32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"abs32", TRUE, 0xffffffff,0xffffffff,FALSE);
+static reloc_howto_type howto_reloc_pcrel24 =
+ HOWTO (PCREL24, 0, 2, 24, TRUE, 0, complain_overflow_signed,0,"pcrel24", TRUE, 0x00ffffff,0x00ffffff,FALSE);
+static reloc_howto_type howto_reloc_pcrel13 =
+ HOWTO (PCREL13, 0, 2, 13, TRUE, 0, complain_overflow_signed,0,"pcrel13", TRUE, 0x00001fff,0x00001fff,FALSE);
+static reloc_howto_type howto_reloc_abs32codeshrunk =
+ HOWTO (ABS32CODE_SHRUNK, 0, 2, 24, TRUE, 0, complain_overflow_signed, 0,"callx->callj", TRUE, 0x00ffffff, 0x00ffffff,FALSE);
+static reloc_howto_type howto_reloc_abs32code =
+ HOWTO (ABS32CODE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"callx", TRUE, 0xffffffff,0xffffffff,FALSE);
+
+static reloc_howto_type howto_align_table[] =
+{
+ HOWTO (ALIGNER, 0, 0x1, 0, FALSE, 0, complain_overflow_dont, 0, "align16", FALSE, 0, 0, FALSE),
+ HOWTO (ALIGNER, 0, 0x3, 0, FALSE, 0, complain_overflow_dont, 0, "align32", FALSE, 0, 0, FALSE),
+ HOWTO (ALIGNER, 0, 0x7, 0, FALSE, 0, complain_overflow_dont, 0, "align64", FALSE, 0, 0, FALSE),
+ HOWTO (ALIGNER, 0, 0xf, 0, FALSE, 0, complain_overflow_dont, 0, "align128", FALSE, 0, 0, FALSE),
+};
+
+static reloc_howto_type howto_done_align_table[] =
+{
+ HOWTO (ALIGNDONE, 0x1, 0x1, 0, FALSE, 0, complain_overflow_dont, 0, "donealign16", FALSE, 0, 0, FALSE),
+ HOWTO (ALIGNDONE, 0x3, 0x3, 0, FALSE, 0, complain_overflow_dont, 0, "donealign32", FALSE, 0, 0, FALSE),
+ HOWTO (ALIGNDONE, 0x7, 0x7, 0, FALSE, 0, complain_overflow_dont, 0, "donealign64", FALSE, 0, 0, FALSE),
+ HOWTO (ALIGNDONE, 0xf, 0xf, 0, FALSE, 0, complain_overflow_dont, 0, "donealign128", FALSE, 0, 0, FALSE),
+};
/* Swaps the information in an executable header taken from a raw byte
stream memory image, into the internal exec_header structure. */
-void
-bout_swap_exec_header_in (abfd, raw_bytes, execp)
- bfd *abfd;
- struct external_exec *raw_bytes;
- struct internal_exec *execp;
+static void
+bout_swap_exec_header_in (bfd *abfd,
+ struct external_exec *bytes,
+ struct internal_exec *execp)
{
- struct external_exec *bytes = (struct external_exec *)raw_bytes;
-
/* Now fill in fields in the execp, from the bytes in the raw data. */
- execp->a_info = H_GET_32 (abfd, bytes->e_info);
- execp->a_text = GET_WORD (abfd, bytes->e_text);
- execp->a_data = GET_WORD (abfd, bytes->e_data);
- execp->a_bss = GET_WORD (abfd, bytes->e_bss);
- execp->a_syms = GET_WORD (abfd, bytes->e_syms);
- execp->a_entry = GET_WORD (abfd, bytes->e_entry);
- execp->a_trsize = GET_WORD (abfd, bytes->e_trsize);
- execp->a_drsize = GET_WORD (abfd, bytes->e_drsize);
- execp->a_tload = GET_WORD (abfd, bytes->e_tload);
- execp->a_dload = GET_WORD (abfd, bytes->e_dload);
- execp->a_talign = bytes->e_talign[0];
- execp->a_dalign = bytes->e_dalign[0];
- execp->a_balign = bytes->e_balign[0];
+ execp->a_info = H_GET_32 (abfd, bytes->e_info);
+ execp->a_text = GET_WORD (abfd, bytes->e_text);
+ execp->a_data = GET_WORD (abfd, bytes->e_data);
+ execp->a_bss = GET_WORD (abfd, bytes->e_bss);
+ execp->a_syms = GET_WORD (abfd, bytes->e_syms);
+ execp->a_entry = GET_WORD (abfd, bytes->e_entry);
+ execp->a_trsize = GET_WORD (abfd, bytes->e_trsize);
+ execp->a_drsize = GET_WORD (abfd, bytes->e_drsize);
+ execp->a_tload = GET_WORD (abfd, bytes->e_tload);
+ execp->a_dload = GET_WORD (abfd, bytes->e_dload);
+ execp->a_talign = bytes->e_talign[0];
+ execp->a_dalign = bytes->e_dalign[0];
+ execp->a_balign = bytes->e_balign[0];
execp->a_relaxable = bytes->e_relaxable[0];
}
/* Swaps the information in an internal exec header structure into the
supplied buffer ready for writing to disk. */
-void
-bout_swap_exec_header_out (abfd, execp, raw_bytes)
- bfd *abfd;
- struct internal_exec *execp;
- struct external_exec *raw_bytes;
+static void
+bout_swap_exec_header_out (bfd *abfd,
+ struct internal_exec *execp,
+ struct external_exec *bytes)
{
- struct external_exec *bytes = (struct external_exec *)raw_bytes;
-
/* Now fill in fields in the raw data, from the fields in the exec struct. */
H_PUT_32 (abfd, execp->a_info , bytes->e_info);
PUT_WORD (abfd, execp->a_text , bytes->e_text);
@@ -134,54 +116,26 @@ bout_swap_exec_header_out (abfd, execp, raw_bytes)
PUT_WORD (abfd, execp->a_drsize, bytes->e_drsize);
PUT_WORD (abfd, execp->a_tload , bytes->e_tload);
PUT_WORD (abfd, execp->a_dload , bytes->e_dload);
- bytes->e_talign[0] = execp->a_talign;
- bytes->e_dalign[0] = execp->a_dalign;
- bytes->e_balign[0] = execp->a_balign;
+ bytes->e_talign[0] = execp->a_talign;
+ bytes->e_dalign[0] = execp->a_dalign;
+ bytes->e_balign[0] = execp->a_balign;
bytes->e_relaxable[0] = execp->a_relaxable;
}
-static const bfd_target *
-b_out_object_p (abfd)
- bfd *abfd;
-{
- struct internal_exec anexec;
- struct external_exec exec_bytes;
- bfd_size_type amt = EXEC_BYTES_SIZE;
-
- if (bfd_bread ((PTR) &exec_bytes, amt, abfd) != amt)
- {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
-
- anexec.a_info = H_GET_32 (abfd, exec_bytes.e_info);
-
- if (N_BADMAG (anexec))
- {
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
-
- bout_swap_exec_header_in (abfd, &exec_bytes, &anexec);
- return aout_32_some_aout_object_p (abfd, &anexec, b_out_callback);
-}
-
/* Finish up the opening of a b.out file for reading. Fill in all the
fields that are not handled by common code. */
static const bfd_target *
-b_out_callback (abfd)
- bfd *abfd;
+b_out_callback (bfd *abfd)
{
struct internal_exec *execp = exec_hdr (abfd);
unsigned long bss_start;
/* Architecture and machine type. */
- bfd_set_arch_mach(abfd,
- bfd_arch_i960, /* B.out only used on i960 */
- bfd_mach_i960_core /* Default */
- );
+ bfd_set_arch_mach (abfd,
+ bfd_arch_i960, /* B.out only used on i960. */
+ bfd_mach_i960_core /* Default. */
+ );
/* The positions of the string table and symbol table. */
obj_str_filepos (abfd) = N_STROFF (*execp);
@@ -200,30 +154,56 @@ b_out_callback (abfd)
obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
/* And reload the sizes, since the aout module zaps them. */
- obj_textsec (abfd)->_raw_size = execp->a_text;
+ obj_textsec (abfd)->size = execp->a_text;
- bss_start = execp->a_dload + execp->a_data; /* BSS = end of data section */
+ bss_start = execp->a_dload + execp->a_data; /* BSS = end of data section. */
obj_bsssec (abfd)->vma = align_power (bss_start, execp->a_balign);
obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
/* The file positions of the sections. */
- obj_textsec (abfd)->filepos = N_TXTOFF(*execp);
- obj_datasec (abfd)->filepos = N_DATOFF(*execp);
+ obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
+ obj_datasec (abfd)->filepos = N_DATOFF (*execp);
/* The file positions of the relocation info. */
- obj_textsec (abfd)->rel_filepos = N_TROFF(*execp);
- obj_datasec (abfd)->rel_filepos = N_DROFF(*execp);
+ obj_textsec (abfd)->rel_filepos = N_TROFF (*execp);
+ obj_datasec (abfd)->rel_filepos = N_DROFF (*execp);
- adata(abfd).page_size = 1; /* Not applicable. */
- adata(abfd).segment_size = 1; /* Not applicable. */
- adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
+ adata (abfd).page_size = 1; /* Not applicable. */
+ adata (abfd).segment_size = 1; /* Not applicable. */
+ adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
if (execp->a_relaxable)
abfd->flags |= BFD_IS_RELAXABLE;
return abfd->xvec;
}
+static const bfd_target *
+b_out_object_p (bfd *abfd)
+{
+ struct internal_exec anexec;
+ struct external_exec exec_bytes;
+ bfd_size_type amt = EXEC_BYTES_SIZE;
+
+ if (bfd_bread ((void *) &exec_bytes, amt, abfd) != amt)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
+
+ anexec.a_info = H_GET_32 (abfd, exec_bytes.e_info);
+
+ if (N_BADMAG (anexec))
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
+
+ bout_swap_exec_header_in (abfd, &exec_bytes, &anexec);
+ return aout_32_some_aout_object_p (abfd, &anexec, b_out_callback);
+}
+
struct bout_data_struct
{
struct aoutdata a;
@@ -231,30 +211,27 @@ struct bout_data_struct
};
static bfd_boolean
-b_out_mkobject (abfd)
- bfd *abfd;
+b_out_mkobject (bfd *abfd)
{
struct bout_data_struct *rawptr;
bfd_size_type amt = sizeof (struct bout_data_struct);
- rawptr = (struct bout_data_struct *) bfd_zalloc (abfd, amt);
+ rawptr = bfd_zalloc (abfd, amt);
if (rawptr == NULL)
return FALSE;
abfd->tdata.bout_data = rawptr;
exec_hdr (abfd) = &rawptr->e;
- obj_textsec (abfd) = (asection *) NULL;
- obj_datasec (abfd) = (asection *) NULL;
- obj_bsssec (abfd) = (asection *) NULL;
+ obj_textsec (abfd) = NULL;
+ obj_datasec (abfd) = NULL;
+ obj_bsssec (abfd) = NULL;
return TRUE;
}
static int
-b_out_symbol_cmp (a_ptr, b_ptr)
- const void * a_ptr;
- const void * b_ptr;
+b_out_symbol_cmp (const void * a_ptr, const void * b_ptr)
{
struct aout_symbol ** a = (struct aout_symbol **) a_ptr;
struct aout_symbol ** b = (struct aout_symbol **) b_ptr;
@@ -272,8 +249,8 @@ b_out_symbol_cmp (a_ptr, b_ptr)
if (av > bv)
return 1;
- /* Secondary key puts CALLNAME syms last and BALNAME syms first, so
- that they have the best chance of being contiguous. */
+ /* Secondary key puts CALLNAME syms last and BALNAME syms first,
+ so that they have the best chance of being contiguous. */
if (IS_BALNAME ((*a)->other) || IS_CALLNAME ((*b)->other))
return -1;
if (IS_CALLNAME ((*a)->other) || IS_BALNAME ((*b)->other))
@@ -283,8 +260,138 @@ b_out_symbol_cmp (a_ptr, b_ptr)
}
static bfd_boolean
-b_out_write_object_contents (abfd)
- bfd *abfd;
+b_out_squirt_out_relocs (bfd *abfd, asection *section)
+{
+ arelent **generic;
+ int r_extern = 0;
+ int r_idx;
+ int incode_mask;
+ int len_1;
+ unsigned int count = section->reloc_count;
+ struct relocation_info *native, *natptr;
+ bfd_size_type natsize;
+ int extern_mask, pcrel_mask, len_2, callj_mask;
+
+ if (count == 0)
+ return TRUE;
+
+ generic = section->orelocation;
+ natsize = (bfd_size_type) count * sizeof (struct relocation_info);
+ native = bfd_malloc (natsize);
+ if (!native && natsize != 0)
+ return FALSE;
+
+ if (bfd_header_big_endian (abfd))
+ {
+ /* Big-endian bit field allocation order. */
+ pcrel_mask = 0x80;
+ extern_mask = 0x10;
+ len_2 = 0x40;
+ len_1 = 0x20;
+ callj_mask = 0x02;
+ incode_mask = 0x08;
+ }
+ else
+ {
+ /* Little-endian bit field allocation order. */
+ pcrel_mask = 0x01;
+ extern_mask = 0x08;
+ len_2 = 0x04;
+ len_1 = 0x02;
+ callj_mask = 0x40;
+ incode_mask = 0x10;
+ }
+
+ for (natptr = native; count > 0; --count, ++natptr, ++generic)
+ {
+ arelent *g = *generic;
+ unsigned char *raw = (unsigned char *) natptr;
+ asymbol *sym = *(g->sym_ptr_ptr);
+ asection *output_section = sym->section->output_section;
+
+ H_PUT_32 (abfd, g->address, raw);
+ /* Find a type in the output format which matches the input howto -
+ at the moment we assume input format == output format FIXME!! */
+ r_idx = 0;
+ /* FIXME: Need callj stuff here, and to check the howto entries to
+ be sure they are real for this architecture. */
+ if (g->howto== &howto_reloc_callj)
+ raw[7] = callj_mask + pcrel_mask + len_2;
+ else if (g->howto == &howto_reloc_pcrel24)
+ raw[7] = pcrel_mask + len_2;
+ else if (g->howto == &howto_reloc_pcrel13)
+ raw[7] = pcrel_mask + len_1;
+ else if (g->howto == &howto_reloc_abs32code)
+ raw[7] = len_2 + incode_mask;
+ else if (g->howto >= howto_align_table
+ && g->howto <= (howto_align_table + ARRAY_SIZE (howto_align_table) - 1))
+ {
+ /* symnum == -2; extern_mask not set, pcrel_mask set. */
+ r_idx = -2;
+ r_extern = 0;
+ raw[7] = (pcrel_mask
+ | ((g->howto - howto_align_table) << 1));
+ }
+ else
+ raw[7] = len_2;
+
+ if (r_idx != 0)
+ /* Already mucked with r_extern, r_idx. */;
+ else if (bfd_is_com_section (output_section)
+ || bfd_is_abs_section (output_section)
+ || bfd_is_und_section (output_section))
+ {
+ if (bfd_abs_section_ptr->symbol == sym)
+ {
+ /* Whoops, looked like an abs symbol, but is really an offset
+ from the abs section. */
+ r_idx = 0;
+ r_extern = 0;
+ }
+ else
+ {
+ /* Fill in symbol. */
+ r_extern = 1;
+ r_idx = (*g->sym_ptr_ptr)->udata.i;
+ }
+ }
+ else
+ {
+ /* Just an ordinary section. */
+ r_extern = 0;
+ r_idx = output_section->target_index;
+ }
+
+ if (bfd_header_big_endian (abfd))
+ {
+ raw[4] = (unsigned char) (r_idx >> 16);
+ raw[5] = (unsigned char) (r_idx >> 8);
+ raw[6] = (unsigned char) (r_idx );
+ }
+ else
+ {
+ raw[6] = (unsigned char) (r_idx >> 16);
+ raw[5] = (unsigned char) (r_idx>> 8);
+ raw[4] = (unsigned char) (r_idx );
+ }
+
+ if (r_extern)
+ raw[7] |= extern_mask;
+ }
+
+ if (bfd_bwrite ((void *) native, natsize, abfd) != natsize)
+ {
+ free (native);
+ return FALSE;
+ }
+
+ free (native);
+
+ return TRUE;
+}
+
+static bfd_boolean
+b_out_write_object_contents (bfd *abfd)
{
struct external_exec swapped_hdr;
bfd_size_type amt;
@@ -294,15 +401,13 @@ b_out_write_object_contents (abfd)
exec_hdr (abfd)->a_info = BMAGIC;
- exec_hdr (abfd)->a_text = obj_textsec (abfd)->_raw_size;
- exec_hdr (abfd)->a_data = obj_datasec (abfd)->_raw_size;
- exec_hdr (abfd)->a_bss = obj_bsssec (abfd)->_raw_size;
- exec_hdr (abfd)->a_syms = bfd_get_symcount (abfd) * sizeof (struct nlist);
+ exec_hdr (abfd)->a_text = obj_textsec (abfd)->size;
+ exec_hdr (abfd)->a_data = obj_datasec (abfd)->size;
+ exec_hdr (abfd)->a_bss = obj_bsssec (abfd)->size;
+ exec_hdr (abfd)->a_syms = bfd_get_symcount (abfd) * 12;
exec_hdr (abfd)->a_entry = bfd_get_start_address (abfd);
- exec_hdr (abfd)->a_trsize = ((obj_textsec (abfd)->reloc_count) *
- sizeof (struct relocation_info));
- exec_hdr (abfd)->a_drsize = ((obj_datasec (abfd)->reloc_count) *
- sizeof (struct relocation_info));
+ exec_hdr (abfd)->a_trsize = (obj_textsec (abfd)->reloc_count) * 8;
+ exec_hdr (abfd)->a_drsize = (obj_datasec (abfd)->reloc_count) * 8;
exec_hdr (abfd)->a_talign = obj_textsec (abfd)->alignment_power;
exec_hdr (abfd)->a_dalign = obj_datasec (abfd)->alignment_power;
@@ -315,7 +420,7 @@ b_out_write_object_contents (abfd)
amt = EXEC_BYTES_SIZE;
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || bfd_bwrite ((PTR) &swapped_hdr, amt, abfd) != amt)
+ || bfd_bwrite ((void *) &swapped_hdr, amt, abfd) != amt)
return FALSE;
/* Now write out reloc info, followed by syms and strings */
@@ -346,20 +451,20 @@ b_out_write_object_contents (abfd)
b_out_symbol_cmp);
/* Back to your regularly scheduled program. */
- if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*exec_hdr(abfd))), SEEK_SET)
+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*exec_hdr (abfd))), SEEK_SET)
!= 0)
return FALSE;
if (! aout_32_write_syms (abfd))
return FALSE;
- if (bfd_seek (abfd, (file_ptr) (N_TROFF(*exec_hdr(abfd))), SEEK_SET)
+ if (bfd_seek (abfd, (file_ptr) (N_TROFF (*exec_hdr (abfd))), SEEK_SET)
!= 0)
return FALSE;
if (!b_out_squirt_out_relocs (abfd, obj_textsec (abfd)))
return FALSE;
- if (bfd_seek (abfd, (file_ptr) (N_DROFF(*exec_hdr(abfd))), SEEK_SET)
+ if (bfd_seek (abfd, (file_ptr) (N_DROFF (*exec_hdr (abfd))), SEEK_SET)
!= 0)
return FALSE;
@@ -381,16 +486,64 @@ b_out_write_object_contents (abfd)
#define output_addr(sec) ((sec)->output_offset+(sec)->output_section->vma)
+static bfd_vma
+get_value (arelent *reloc,
+ struct bfd_link_info *link_info,
+ asection *input_section)
+{
+ bfd_vma value;
+ asymbol *symbol = *(reloc->sym_ptr_ptr);
+
+ /* A symbol holds a pointer to a section, and an offset from the
+ base of the section. To relocate, we find where the section will
+ live in the output and add that in. */
+ if (bfd_is_und_section (symbol->section))
+ {
+ struct bfd_link_hash_entry *h;
+
+ /* The symbol is undefined in this BFD. Look it up in the
+ global linker hash table. FIXME: This should be changed when
+ we convert b.out to use a specific final_link function and
+ change the interface to bfd_relax_section to not require the
+ generic symbols. */
+ h = bfd_wrapped_link_hash_lookup (input_section->owner, link_info,
+ bfd_asymbol_name (symbol),
+ FALSE, FALSE, TRUE);
+ if (h != (struct bfd_link_hash_entry *) NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak))
+ value = h->u.def.value + output_addr (h->u.def.section);
+ else if (h != (struct bfd_link_hash_entry *) NULL
+ && h->type == bfd_link_hash_common)
+ value = h->u.c.size;
+ else
+ {
+ if (! ((*link_info->callbacks->undefined_symbol)
+ (link_info, bfd_asymbol_name (symbol),
+ input_section->owner, input_section, reloc->address,
+ TRUE)))
+ abort ();
+ value = 0;
+ }
+ }
+ else
+ value = symbol->value + output_addr (symbol->section);
+
+ /* Add the value contained in the relocation. */
+ value += reloc->addend;
+
+ return value;
+}
+
/* Magic to turn callx into calljx. */
static bfd_reloc_status_type
-calljx_callback (abfd, link_info, reloc_entry, src, dst, input_section)
- bfd *abfd;
- struct bfd_link_info *link_info;
- arelent *reloc_entry;
- PTR src;
- PTR dst;
- asection *input_section;
+calljx_callback (bfd *abfd,
+ struct bfd_link_info *link_info,
+ arelent *reloc_entry,
+ void * src,
+ void * dst,
+ asection *input_section)
{
int word = bfd_get_32 (abfd, src);
asymbol *symbol_in = *(reloc_entry->sym_ptr_ptr);
@@ -403,6 +556,7 @@ calljx_callback (abfd, link_info, reloc_entry, src, dst, input_section)
{
aout_symbol_type *balsym = symbol+1;
int inst = bfd_get_32 (abfd, (bfd_byte *) src-4);
+
/* The next symbol should be an N_BALNAME. */
BFD_ASSERT (IS_BALNAME (balsym->other));
inst &= BALX_MASK;
@@ -422,16 +576,14 @@ calljx_callback (abfd, link_info, reloc_entry, src, dst, input_section)
/* Magic to turn call into callj. */
static bfd_reloc_status_type
-callj_callback (abfd, link_info, reloc_entry, data, srcidx, dstidx,
- input_section, shrinking)
- bfd *abfd;
- struct bfd_link_info *link_info;
- arelent *reloc_entry;
- PTR data;
- unsigned int srcidx;
- unsigned int dstidx;
- asection *input_section;
- bfd_boolean shrinking;
+callj_callback (bfd *abfd,
+ struct bfd_link_info *link_info,
+ arelent *reloc_entry,
+ void * data,
+ unsigned int srcidx,
+ unsigned int dstidx,
+ asection *input_section,
+ bfd_boolean shrinking)
{
int word = bfd_get_32 (abfd, (bfd_byte *) data + srcidx);
asymbol *symbol_in = *(reloc_entry->sym_ptr_ptr);
@@ -440,18 +592,17 @@ callj_callback (abfd, link_info, reloc_entry, data, srcidx, dstidx,
value = get_value (reloc_entry, link_info, input_section);
- if (IS_OTHER(symbol->other))
- {
- /* Call to a system procedure - replace code with system
- procedure number. */
- word = CALLS | (symbol->other - 1);
- }
- else if (IS_CALLNAME(symbol->other))
+ if (IS_OTHER (symbol->other))
+ /* Call to a system procedure - replace code with system
+ procedure number. */
+ word = CALLS | (symbol->other - 1);
+
+ else if (IS_CALLNAME (symbol->other))
{
aout_symbol_type *balsym = symbol+1;
/* The next symbol should be an N_BALNAME. */
- BFD_ASSERT(IS_BALNAME(balsym->other));
+ BFD_ASSERT (IS_BALNAME (balsym->other));
/* We are calling a leaf, so replace the call instruction with a
bal. */
@@ -472,65 +623,19 @@ callj_callback (abfd, link_info, reloc_entry, data, srcidx, dstidx,
BFD_ASSERT (symbol->symbol.section == input_section);
}
else
- {
- word = CALL | (((word & BAL_MASK)
- + value
- + reloc_entry->addend
- - (shrinking ? dstidx : 0)
- - output_addr (input_section))
- & BAL_MASK);
- }
+ word = CALL | (((word & BAL_MASK)
+ + value
+ + reloc_entry->addend
+ - (shrinking ? dstidx : 0)
+ - output_addr (input_section))
+ & BAL_MASK);
+
bfd_put_32 (abfd, (bfd_vma) word, (bfd_byte *) data + dstidx);
return bfd_reloc_ok;
}
-/* type rshift size bitsize pcrel bitpos absolute overflow check*/
-
-#define ABS32CODE 0
-#define ABS32CODE_SHRUNK 1
-#define PCREL24 2
-#define CALLJ 3
-#define ABS32 4
-#define PCREL13 5
-#define ABS32_MAYBE_RELAXABLE 1
-#define ABS32_WAS_RELAXABLE 2
-
-#define ALIGNER 10
-#define ALIGNDONE 11
-static reloc_howto_type howto_reloc_callj =
-HOWTO(CALLJ, 0, 2, 24, TRUE, 0, complain_overflow_signed, 0,"callj", TRUE, 0x00ffffff, 0x00ffffff,FALSE);
-static reloc_howto_type howto_reloc_abs32 =
-HOWTO(ABS32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"abs32", TRUE, 0xffffffff,0xffffffff,FALSE);
-static reloc_howto_type howto_reloc_pcrel24 =
-HOWTO(PCREL24, 0, 2, 24, TRUE, 0, complain_overflow_signed,0,"pcrel24", TRUE, 0x00ffffff,0x00ffffff,FALSE);
-
-static reloc_howto_type howto_reloc_pcrel13 =
-HOWTO(PCREL13, 0, 2, 13, TRUE, 0, complain_overflow_signed,0,"pcrel13", TRUE, 0x00001fff,0x00001fff,FALSE);
-
-static reloc_howto_type howto_reloc_abs32codeshrunk =
-HOWTO(ABS32CODE_SHRUNK, 0, 2, 24, TRUE, 0, complain_overflow_signed, 0,"callx->callj", TRUE, 0x00ffffff, 0x00ffffff,FALSE);
-
-static reloc_howto_type howto_reloc_abs32code =
-HOWTO(ABS32CODE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"callx", TRUE, 0xffffffff,0xffffffff,FALSE);
-
-static reloc_howto_type howto_align_table[] = {
- HOWTO (ALIGNER, 0, 0x1, 0, FALSE, 0, complain_overflow_dont, 0, "align16", FALSE, 0, 0, FALSE),
- HOWTO (ALIGNER, 0, 0x3, 0, FALSE, 0, complain_overflow_dont, 0, "align32", FALSE, 0, 0, FALSE),
- HOWTO (ALIGNER, 0, 0x7, 0, FALSE, 0, complain_overflow_dont, 0, "align64", FALSE, 0, 0, FALSE),
- HOWTO (ALIGNER, 0, 0xf, 0, FALSE, 0, complain_overflow_dont, 0, "align128", FALSE, 0, 0, FALSE),
-};
-
-static reloc_howto_type howto_done_align_table[] = {
- HOWTO (ALIGNDONE, 0x1, 0x1, 0, FALSE, 0, complain_overflow_dont, 0, "donealign16", FALSE, 0, 0, FALSE),
- HOWTO (ALIGNDONE, 0x3, 0x3, 0, FALSE, 0, complain_overflow_dont, 0, "donealign32", FALSE, 0, 0, FALSE),
- HOWTO (ALIGNDONE, 0x7, 0x7, 0, FALSE, 0, complain_overflow_dont, 0, "donealign64", FALSE, 0, 0, FALSE),
- HOWTO (ALIGNDONE, 0xf, 0xf, 0, FALSE, 0, complain_overflow_dont, 0, "donealign128", FALSE, 0, 0, FALSE),
-};
-
static reloc_howto_type *
-b_out_bfd_reloc_type_lookup (abfd, code)
- 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)
{
@@ -549,12 +654,9 @@ b_out_bfd_reloc_type_lookup (abfd, code)
/* Allocate enough room for all the reloc entries, plus pointers to them all. */
static bfd_boolean
-b_out_slurp_reloc_table (abfd, asect, symbols)
- bfd *abfd;
- sec_ptr asect;
- asymbol **symbols;
+b_out_slurp_reloc_table (bfd *abfd, sec_ptr asect, asymbol **symbols)
{
- register struct relocation_info *rptr;
+ struct relocation_info *rptr;
unsigned int counter;
arelent *cache_ptr;
int extern_mask, pcrel_mask, callj_mask, length_shift;
@@ -573,37 +675,27 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
return FALSE;
if (asect == obj_datasec (abfd))
+ reloc_size = exec_hdr (abfd)->a_drsize;
+ else if (asect == obj_textsec (abfd))
+ reloc_size = exec_hdr (abfd)->a_trsize;
+ else if (asect == obj_bsssec (abfd))
+ reloc_size = 0;
+ else
{
- reloc_size = exec_hdr(abfd)->a_drsize;
- goto doit;
- }
-
- if (asect == obj_textsec (abfd))
- {
- reloc_size = exec_hdr(abfd)->a_trsize;
- goto doit;
- }
-
- if (asect == obj_bsssec (abfd))
- {
- reloc_size = 0;
- goto doit;
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
}
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
-
- doit:
if (bfd_seek (abfd, asect->rel_filepos, SEEK_SET) != 0)
return FALSE;
count = reloc_size / sizeof (struct relocation_info);
- relocs = (struct relocation_info *) bfd_malloc (reloc_size);
+ relocs = bfd_malloc (reloc_size);
if (!relocs && reloc_size != 0)
return FALSE;
amt = ((bfd_size_type) count + 1) * sizeof (arelent);
- reloc_cache = (arelent *) bfd_malloc (amt);
+ reloc_cache = bfd_malloc (amt);
if (!reloc_cache)
{
if (relocs != NULL)
@@ -611,7 +703,7 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
return FALSE;
}
- if (bfd_bread ((PTR) relocs, reloc_size, abfd) != reloc_size)
+ if (bfd_bread ((void *) relocs, reloc_size, abfd) != reloc_size)
{
free (reloc_cache);
if (relocs != NULL)
@@ -716,7 +808,7 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
cache_ptr->addend = 0;
break;
default:
- BFD_ASSERT(0);
+ BFD_ASSERT (FALSE);
break;
}
}
@@ -761,9 +853,7 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
cursor[1] = tmp;
}
else
- {
- prev_addr = cache_ptr->address;
- }
+ prev_addr = cache_ptr->address;
}
if (relocs != NULL)
@@ -774,149 +864,13 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
return TRUE;
}
-static bfd_boolean
-b_out_squirt_out_relocs (abfd, section)
- bfd *abfd;
- asection *section;
-{
- arelent **generic;
- int r_extern = 0;
- int r_idx;
- int incode_mask;
- int len_1;
- unsigned int count = section->reloc_count;
- struct relocation_info *native, *natptr;
- bfd_size_type natsize;
- int extern_mask, pcrel_mask, len_2, callj_mask;
-
- if (count == 0)
- return TRUE;
-
- generic = section->orelocation;
- natsize = (bfd_size_type) count * sizeof (struct relocation_info);
- native = ((struct relocation_info *) bfd_malloc (natsize));
- if (!native && natsize != 0)
- return FALSE;
-
- if (bfd_header_big_endian (abfd))
- {
- /* Big-endian bit field allocation order. */
- pcrel_mask = 0x80;
- extern_mask = 0x10;
- len_2 = 0x40;
- len_1 = 0x20;
- callj_mask = 0x02;
- incode_mask = 0x08;
- }
- else
- {
- /* Little-endian bit field allocation order. */
- pcrel_mask = 0x01;
- extern_mask = 0x08;
- len_2 = 0x04;
- len_1 = 0x02;
- callj_mask = 0x40;
- incode_mask = 0x10;
- }
-
- for (natptr = native; count > 0; --count, ++natptr, ++generic)
- {
- arelent *g = *generic;
- unsigned char *raw = (unsigned char *)natptr;
- asymbol *sym = *(g->sym_ptr_ptr);
- asection *output_section = sym->section->output_section;
-
- H_PUT_32 (abfd, g->address, raw);
- /* Find a type in the output format which matches the input howto -
- at the moment we assume input format == output format FIXME!! */
- r_idx = 0;
- /* FIXME: Need callj stuff here, and to check the howto entries to
- be sure they are real for this architecture. */
- if (g->howto== &howto_reloc_callj)
- raw[7] = callj_mask + pcrel_mask + len_2;
- else if (g->howto == &howto_reloc_pcrel24)
- raw[7] = pcrel_mask + len_2;
- else if (g->howto == &howto_reloc_pcrel13)
- raw[7] = pcrel_mask + len_1;
- else if (g->howto == &howto_reloc_abs32code)
- raw[7] = len_2 + incode_mask;
- else if (g->howto >= howto_align_table
- && g->howto <= (howto_align_table
- + sizeof (howto_align_table) / sizeof (howto_align_table[0])
- - 1))
- {
- /* symnum == -2; extern_mask not set, pcrel_mask set. */
- r_idx = -2;
- r_extern = 0;
- raw[7] = (pcrel_mask
- | ((g->howto - howto_align_table) << 1));
- }
- else
- raw[7] = len_2;
-
- if (r_idx != 0)
- /* Already mucked with r_extern, r_idx. */;
- else if (bfd_is_com_section (output_section)
- || bfd_is_abs_section (output_section)
- || bfd_is_und_section (output_section))
- {
- if (bfd_abs_section_ptr->symbol == sym)
- {
- /* Whoops, looked like an abs symbol, but is really an offset
- from the abs section. */
- r_idx = 0;
- r_extern = 0;
- }
- else
- {
- /* Fill in symbol. */
- r_extern = 1;
- r_idx = (*g->sym_ptr_ptr)->udata.i;
- }
- }
- else
- {
- /* Just an ordinary section. */
- r_extern = 0;
- r_idx = output_section->target_index;
- }
-
- if (bfd_header_big_endian (abfd))
- {
- raw[4] = (unsigned char) (r_idx >> 16);
- raw[5] = (unsigned char) (r_idx >> 8);
- raw[6] = (unsigned char) (r_idx );
- }
- else
- {
- raw[6] = (unsigned char) (r_idx >> 16);
- raw[5] = (unsigned char) (r_idx>> 8);
- raw[4] = (unsigned char) (r_idx );
- }
-
- if (r_extern)
- raw[7] |= extern_mask;
- }
-
- if (bfd_bwrite ((PTR) native, natsize, abfd) != natsize)
- {
- free ((PTR)native);
- return FALSE;
- }
-
- free ((PTR)native);
-
- return TRUE;
-}
-
/* This is stupid. This function should be a boolean predicate. */
static long
-b_out_canonicalize_reloc (abfd, section, relptr, symbols)
- bfd *abfd;
- sec_ptr section;
- arelent **relptr;
- asymbol **symbols;
+b_out_canonicalize_reloc (bfd *abfd,
+ sec_ptr section,
+ arelent **relptr,
+ asymbol **symbols)
{
arelent *tblptr;
unsigned int count;
@@ -948,9 +902,7 @@ b_out_canonicalize_reloc (abfd, section, relptr, symbols)
}
static long
-b_out_get_reloc_upper_bound (abfd, asect)
- bfd *abfd;
- sec_ptr asect;
+b_out_get_reloc_upper_bound (bfd *abfd, sec_ptr asect)
{
if (bfd_get_format (abfd) != bfd_object)
{
@@ -963,13 +915,13 @@ b_out_get_reloc_upper_bound (abfd, asect)
if (asect == obj_datasec (abfd))
return (sizeof (arelent *) *
- ((exec_hdr(abfd)->a_drsize / sizeof (struct relocation_info))
- +1));
+ ((exec_hdr (abfd)->a_drsize / sizeof (struct relocation_info))
+ + 1));
if (asect == obj_textsec (abfd))
return (sizeof (arelent *) *
- ((exec_hdr(abfd)->a_trsize / sizeof (struct relocation_info))
- +1));
+ ((exec_hdr (abfd)->a_trsize / sizeof (struct relocation_info))
+ + 1));
if (asect == obj_bsssec (abfd))
return 0;
@@ -980,12 +932,11 @@ b_out_get_reloc_upper_bound (abfd, asect)
static bfd_boolean
-b_out_set_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- asection *section;
- const PTR location;
- file_ptr offset;
- bfd_size_type count;
+b_out_set_section_contents (bfd *abfd,
+ asection *section,
+ const void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
if (! abfd->output_has_begun)
{
@@ -993,9 +944,9 @@ b_out_set_section_contents (abfd, section, location, offset, count)
if (! aout_32_make_sections (abfd))
return FALSE;
- obj_textsec (abfd)->filepos = sizeof (struct internal_exec);
- obj_datasec(abfd)->filepos = obj_textsec(abfd)->filepos
- + obj_textsec (abfd)->_raw_size;
+ obj_textsec (abfd)->filepos = sizeof (struct external_exec);
+ obj_datasec (abfd)->filepos = obj_textsec (abfd)->filepos
+ + obj_textsec (abfd)->size;
}
/* Regardless, once we know what we're doing, we might as well get going. */
@@ -1005,16 +956,15 @@ b_out_set_section_contents (abfd, section, location, offset, count)
if (count == 0)
return TRUE;
- return bfd_bwrite ((PTR) location, count, abfd) == count;
+ return bfd_bwrite ((void *) location, count, abfd) == count;
}
static bfd_boolean
-b_out_set_arch_mach (abfd, arch, machine)
- bfd *abfd;
- enum bfd_architecture arch;
- unsigned long machine;
+b_out_set_arch_mach (bfd *abfd,
+ enum bfd_architecture arch,
+ unsigned long machine)
{
- bfd_default_set_arch_mach(abfd, arch, machine);
+ bfd_default_set_arch_mach (abfd, arch, machine);
if (arch == bfd_arch_unknown) /* Unknown machine arch is OK. */
return TRUE;
@@ -1040,72 +990,16 @@ b_out_set_arch_mach (abfd, arch, machine)
}
static int
-b_out_sizeof_headers (ignore_abfd, ignore)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- bfd_boolean ignore ATTRIBUTE_UNUSED;
+b_out_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED, bfd_boolean ignore ATTRIBUTE_UNUSED)
{
- return sizeof (struct internal_exec);
+ return sizeof (struct external_exec);
}
-
-static bfd_vma
-get_value (reloc, link_info, input_section)
- arelent *reloc;
- struct bfd_link_info *link_info;
- asection *input_section;
-{
- bfd_vma value;
- asymbol *symbol = *(reloc->sym_ptr_ptr);
-
- /* A symbol holds a pointer to a section, and an offset from the
- base of the section. To relocate, we find where the section will
- live in the output and add that in. */
- if (bfd_is_und_section (symbol->section))
- {
- struct bfd_link_hash_entry *h;
-
- /* The symbol is undefined in this BFD. Look it up in the
- global linker hash table. FIXME: This should be changed when
- we convert b.out to use a specific final_link function and
- change the interface to bfd_relax_section to not require the
- generic symbols. */
- h = bfd_wrapped_link_hash_lookup (input_section->owner, link_info,
- bfd_asymbol_name (symbol),
- FALSE, FALSE, TRUE);
- if (h != (struct bfd_link_hash_entry *) NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak))
- value = h->u.def.value + output_addr (h->u.def.section);
- else if (h != (struct bfd_link_hash_entry *) NULL
- && h->type == bfd_link_hash_common)
- value = h->u.c.size;
- else
- {
- if (! ((*link_info->callbacks->undefined_symbol)
- (link_info, bfd_asymbol_name (symbol),
- input_section->owner, input_section, reloc->address,
- TRUE)))
- abort ();
- value = 0;
- }
- }
- else
- {
- value = symbol->value + output_addr (symbol->section);
- }
-
- /* Add the value contained in the relocation. */
- value += reloc->addend;
-
- return value;
-}
-
static void
-perform_slip (abfd, slip, input_section, value)
- bfd *abfd;
- unsigned int slip;
- asection *input_section;
- bfd_vma value;
+perform_slip (bfd *abfd,
+ unsigned int slip,
+ asection *input_section,
+ bfd_vma value)
{
asymbol **s;
@@ -1145,12 +1039,11 @@ perform_slip (abfd, slip, input_section, value)
If it can, then it changes the amode. */
static int
-abs32code (abfd, input_section, r, shrink, link_info)
- bfd *abfd;
- asection *input_section;
- arelent *r;
- unsigned int shrink;
- struct bfd_link_info *link_info;
+abs32code (bfd *abfd,
+ asection *input_section,
+ arelent *r,
+ unsigned int shrink,
+ struct bfd_link_info *link_info)
{
bfd_vma value = get_value (r, link_info, input_section);
bfd_vma dot = output_addr (input_section) + r->address;
@@ -1178,11 +1071,10 @@ abs32code (abfd, input_section, r, shrink, link_info)
}
static int
-aligncode (abfd, input_section, r, shrink)
- bfd *abfd;
- asection *input_section;
- arelent *r;
- unsigned int shrink;
+aligncode (bfd *abfd,
+ asection *input_section,
+ arelent *r,
+ unsigned int shrink)
{
bfd_vma dot = output_addr (input_section) + r->address;
bfd_vma gap;
@@ -1224,19 +1116,17 @@ aligncode (abfd, input_section, r, shrink)
}
static bfd_boolean
-b_out_bfd_relax_section (abfd, i, link_info, again)
- bfd *abfd;
- asection *i;
- struct bfd_link_info *link_info;
- bfd_boolean *again;
+b_out_bfd_relax_section (bfd *abfd,
+ asection *i,
+ struct bfd_link_info *link_info,
+ bfd_boolean *again)
{
/* Get enough memory to hold the stuff. */
bfd *input_bfd = i->owner;
asection *input_section = i;
unsigned int shrink = 0 ;
arelent **reloc_vector = NULL;
- long reloc_size = bfd_get_reloc_upper_bound (input_bfd,
- input_section);
+ long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
if (reloc_size < 0)
return FALSE;
@@ -1249,7 +1139,7 @@ b_out_bfd_relax_section (abfd, i, link_info, again)
{
long reloc_count;
- reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
+ reloc_vector = bfd_malloc ((bfd_size_type) reloc_size);
if (reloc_vector == NULL && reloc_size != 0)
goto error_return;
@@ -1285,7 +1175,7 @@ b_out_bfd_relax_section (abfd, i, link_info, again)
}
}
}
- input_section->_cooked_size = input_section->_raw_size - shrink;
+ input_section->size -= shrink;
if (reloc_vector != NULL)
free (reloc_vector);
@@ -1297,20 +1187,17 @@ b_out_bfd_relax_section (abfd, i, link_info, again)
}
static bfd_byte *
-b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocatable, symbols)
- bfd *output_bfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- bfd_byte *data;
- bfd_boolean relocatable;
- asymbol **symbols;
+b_out_bfd_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)
{
/* Get enough memory to hold the stuff. */
bfd *input_bfd = link_order->u.indirect.section->owner;
asection *input_section = link_order->u.indirect.section;
- long reloc_size = bfd_get_reloc_upper_bound (input_bfd,
- input_section);
+ long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
long reloc_count;
@@ -1324,18 +1211,16 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
data, relocatable,
symbols);
- reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
+ reloc_vector = bfd_malloc ((bfd_size_type) reloc_size);
if (reloc_vector == NULL && reloc_size != 0)
goto error_return;
- input_section->reloc_done = 1;
-
/* Read in the section. */
BFD_ASSERT (bfd_get_section_contents (input_bfd,
input_section,
data,
(bfd_vma) 0,
- input_section->_raw_size));
+ input_section->size));
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
@@ -1366,9 +1251,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
parent++;
}
else
- {
- run = link_order->size - dst_address;
- }
+ run = link_order->size - dst_address;
/* Copy the bytes. */
for (idx = 0; idx < run; idx++)
@@ -1404,7 +1287,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
case ALIGNDONE:
BFD_ASSERT (reloc->addend >= src_address);
BFD_ASSERT ((bfd_vma) reloc->addend
- <= input_section->_raw_size);
+ <= input_section->size);
src_address = reloc->addend;
dst_address = ((dst_address + reloc->howto->size)
& ~reloc->howto->size);
@@ -1476,49 +1359,48 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
/* Build the transfer vectors for Big and Little-Endian B.OUT files. */
-#define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define aout_32_close_and_cleanup aout_32_bfd_free_cached_info
-
-#define b_out_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define b_out_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#define b_out_bfd_link_add_symbols _bfd_generic_link_add_symbols
-#define b_out_bfd_link_just_syms _bfd_generic_link_just_syms
-#define b_out_bfd_final_link _bfd_generic_final_link
-#define b_out_bfd_link_split_section _bfd_generic_link_split_section
-#define b_out_bfd_gc_sections bfd_generic_gc_sections
-#define b_out_bfd_merge_sections bfd_generic_merge_sections
-#define b_out_bfd_discard_group bfd_generic_discard_group
-
-#define aout_32_get_section_contents_in_window \
- _bfd_generic_get_section_contents_in_window
+#define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
+#define aout_32_close_and_cleanup aout_32_bfd_free_cached_info
+#define b_out_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
+#define b_out_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
+#define b_out_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define b_out_bfd_link_just_syms _bfd_generic_link_just_syms
+#define b_out_bfd_final_link _bfd_generic_final_link
+#define b_out_bfd_link_split_section _bfd_generic_link_split_section
+#define b_out_bfd_gc_sections bfd_generic_gc_sections
+#define b_out_bfd_merge_sections bfd_generic_merge_sections
+#define b_out_bfd_is_group_section bfd_generic_is_group_section
+#define b_out_bfd_discard_group bfd_generic_discard_group
+#define b_out_section_already_linked _bfd_generic_section_already_linked
+#define aout_32_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
extern const bfd_target b_out_vec_little_host;
const bfd_target b_out_vec_big_host =
{
- "b.out.big", /* name */
+ "b.out.big", /* Name. */
bfd_target_aout_flavour,
- BFD_ENDIAN_LITTLE, /* data byte order is little */
- BFD_ENDIAN_BIG, /* hdr byte order is big */
- (HAS_RELOC | EXEC_P | /* object flags */
+ BFD_ENDIAN_LITTLE, /* Data byte order. */
+ BFD_ENDIAN_BIG, /* Header byte order. */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE ),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
- '_', /* symbol leading char */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
+ '_', /* Symbol leading char. */
+ ' ', /* AR_pad_char. */
+ 16, /* AR_max_namelen. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, b_out_object_p, /* bfd_check_format */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
+ {_bfd_dummy_target, b_out_object_p, /* bfd_check_format. */
bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, b_out_mkobject, /* bfd_set_format */
+ {bfd_false, b_out_mkobject, /* bfd_set_format. */
_bfd_generic_mkarchive, bfd_false},
- {bfd_false, b_out_write_object_contents, /* bfd_write_contents */
+ {bfd_false, b_out_write_object_contents, /* bfd_write_contents. */
_bfd_write_archive_contents, bfd_false},
BFD_JUMP_TABLE_GENERIC (aout_32),
@@ -1533,34 +1415,34 @@ const bfd_target b_out_vec_big_host =
& b_out_vec_little_host,
- (PTR) 0,
+ NULL
};
const bfd_target b_out_vec_little_host =
{
- "b.out.little", /* name */
+ "b.out.little", /* Name. */
bfd_target_aout_flavour,
- BFD_ENDIAN_LITTLE, /* data byte order is little */
- BFD_ENDIAN_LITTLE, /* header byte order is little */
- (HAS_RELOC | EXEC_P | /* object flags */
+ BFD_ENDIAN_LITTLE, /* Data byte order. */
+ BFD_ENDIAN_LITTLE, /* Header byte order. */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE ),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
- '_', /* symbol leading char */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
+ '_', /* Symbol leading char. */
+ ' ', /* AR_pad_char. */
+ 16, /* AR_max_namelen. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
- {_bfd_dummy_target, b_out_object_p, /* bfd_check_format */
+ {_bfd_dummy_target, b_out_object_p, /* bfd_check_format. */
bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, b_out_mkobject, /* bfd_set_format */
+ {bfd_false, b_out_mkobject, /* bfd_set_format. */
_bfd_generic_mkarchive, bfd_false},
- {bfd_false, b_out_write_object_contents, /* bfd_write_contents */
+ {bfd_false, b_out_write_object_contents, /* bfd_write_contents. */
_bfd_write_archive_contents, bfd_false},
BFD_JUMP_TABLE_GENERIC (aout_32),
@@ -1575,5 +1457,5 @@ const bfd_target b_out_vec_little_host =
& b_out_vec_big_host,
- (PTR) 0
+ NULL
};
diff --git a/contrib/binutils/bfd/cache.c b/contrib/binutils/bfd/cache.c
index 7d056ea0cfa1..6db6a6b4d56d 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 Free Software Foundation, Inc.
+ 2003, 2004, 2005 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
@@ -19,7 +19,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
SECTION
@@ -36,61 +36,44 @@ SECTION
close, closes it and opens the one wanted, returning its file
handle.
+SUBSECTION
+ Caching functions
*/
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
-
-static bfd_boolean bfd_cache_delete (bfd *);
-
-/*
-INTERNAL_FUNCTION
- BFD_CACHE_MAX_OPEN macro
-
-DESCRIPTION
- The maximum number of files which the cache will keep open at
- one time.
-
-.#define BFD_CACHE_MAX_OPEN 10
-
-*/
+#include "libiberty.h"
+
+/* In some cases we can optimize cache operation when reopening files.
+ For instance, a flush is entirely unnecessary if the file is already
+ closed, so a flush would use CACHE_NO_OPEN. Similarly, a seek using
+ SEEK_SET or SEEK_END need not first seek to the current position.
+ For stat we ignore seek errors, just in case the file has changed
+ while we weren't looking. If it has, then it's possible that the
+ file is shorter and we don't want a seek error to prevent us doing
+ the stat. */
+enum cache_flag {
+ CACHE_NORMAL = 0,
+ CACHE_NO_OPEN = 1,
+ CACHE_NO_SEEK = 2,
+ CACHE_NO_SEEK_ERROR = 4
+};
+
+/* The maximum number of files which the cache will keep open at
+ one time. */
+
+#define BFD_CACHE_MAX_OPEN 10
/* The number of BFD files we have open. */
static int open_files;
-/*
-INTERNAL_FUNCTION
- bfd_last_cache
-
-SYNOPSIS
- extern bfd *bfd_last_cache;
-
-DESCRIPTION
- Zero, or a pointer to the topmost BFD on the chain. This is
- used by the <<bfd_cache_lookup>> macro in @file{libbfd.h} to
- determine when it can avoid a function call.
-*/
-
-bfd *bfd_last_cache;
-
-/*
- INTERNAL_FUNCTION
- bfd_cache_lookup
-
- DESCRIPTION
- Check to see if the required BFD is the same as the last one
- looked up. If so, then it can use the stream in the BFD with
- impunity, since it can't have changed since the last lookup;
- otherwise, it has to perform the complicated lookup function.
-
- .#define bfd_cache_lookup(x) \
- . ((x)==bfd_last_cache? \
- . (FILE*) (bfd_last_cache->iostream): \
- . bfd_cache_lookup_worker(x))
+/* Zero, or a pointer to the topmost BFD on the chain. This is
+ used by the <<bfd_cache_lookup>> macro in @file{libbfd.h} to
+ determine when it can avoid a function call. */
- */
+static bfd *bfd_last_cache = NULL;
/* Insert a BFD into the cache. */
@@ -127,6 +110,29 @@ snip (bfd *abfd)
}
}
+/* Close a BFD and remove it from the cache. */
+
+static bfd_boolean
+bfd_cache_delete (bfd *abfd)
+{
+ bfd_boolean ret;
+
+ if (fclose ((FILE *) abfd->iostream) == 0)
+ ret = TRUE;
+ else
+ {
+ ret = FALSE;
+ bfd_set_error (bfd_error_system_call);
+ }
+
+ snip (abfd);
+
+ abfd->iostream = NULL;
+ --open_files;
+
+ return ret;
+}
+
/* We need to open a new file, and the cache is full. Find the least
recently used cacheable BFD and close it. */
@@ -159,32 +165,205 @@ close_one (void)
kill->where = real_ftell ((FILE *) kill->iostream);
+ /* Save the file st_mtime. This is a hack so that gdb can detect when
+ an executable has been deleted and recreated. The only thing that
+ makes this reasonable is that st_mtime doesn't change when a file
+ is unlinked, so saving st_mtime makes BFD's file cache operation
+ a little more transparent for this particular usage pattern. If we
+ hadn't closed the file then we would not have lost the original
+ contents, st_mtime etc. Of course, if something is writing to an
+ existing file, then this is the wrong thing to do.
+ FIXME: gdb should save these times itself on first opening a file,
+ and this hack be removed. */
+ if (kill->direction == no_direction || kill->direction == read_direction)
+ {
+ bfd_get_mtime (kill);
+ kill->mtime_set = TRUE;
+ }
+
return bfd_cache_delete (kill);
}
-/* Close a BFD and remove it from the cache. */
-
-static bfd_boolean
-bfd_cache_delete (bfd *abfd)
+/* Check to see if the required BFD is the same as the last one
+ looked up. If so, then it can use the stream in the BFD with
+ impunity, since it can't have changed since the last lookup;
+ otherwise, it has to perform the complicated lookup function. */
+
+#define bfd_cache_lookup(x, flag) \
+ ((x) == bfd_last_cache \
+ ? (FILE *) (bfd_last_cache->iostream) \
+ : bfd_cache_lookup_worker (x, flag))
+
+/* Called when the macro <<bfd_cache_lookup>> fails to find a
+ quick answer. Find a file descriptor for @var{abfd}. If
+ necessary, it open it. If there are already more than
+ <<BFD_CACHE_MAX_OPEN>> files open, it tries to close one first, to
+ avoid running out of file descriptors. It will return NULL
+ if it is unable to (re)open the @var{abfd}. */
+
+static FILE *
+bfd_cache_lookup_worker (bfd *abfd, enum cache_flag flag)
{
- bfd_boolean ret;
+ bfd *orig_bfd = abfd;
+ if ((abfd->flags & BFD_IN_MEMORY) != 0)
+ abort ();
- if (fclose ((FILE *) abfd->iostream) == 0)
- ret = TRUE;
+ if (abfd->my_archive)
+ abfd = abfd->my_archive;
+
+ if (abfd->iostream != NULL)
+ {
+ /* Move the file to the start of the cache. */
+ if (abfd != bfd_last_cache)
+ {
+ snip (abfd);
+ insert (abfd);
+ }
+ return (FILE *) abfd->iostream;
+ }
+
+ if (flag & CACHE_NO_OPEN)
+ return NULL;
+
+ if (bfd_open_file (abfd) == NULL)
+ ;
+ else if (!(flag & CACHE_NO_SEEK)
+ && real_fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0
+ && !(flag & CACHE_NO_SEEK_ERROR))
+ bfd_set_error (bfd_error_system_call);
else
+ return (FILE *) abfd->iostream;
+
+ (*_bfd_error_handler) (_("reopening %B: %s\n"),
+ orig_bfd, bfd_errmsg (bfd_get_error ()));
+ return NULL;
+}
+
+static file_ptr
+cache_btell (struct bfd *abfd)
+{
+ FILE *f = bfd_cache_lookup (abfd, CACHE_NO_OPEN);
+ if (f == NULL)
+ return abfd->where;
+ return real_ftell (f);
+}
+
+static int
+cache_bseek (struct bfd *abfd, file_ptr offset, int whence)
+{
+ FILE *f = bfd_cache_lookup (abfd, whence != SEEK_CUR ? CACHE_NO_SEEK : 0);
+ if (f == NULL)
+ return -1;
+ return real_fseek (f, offset, whence);
+}
+
+/* Note that archive entries don't have streams; they share their parent's.
+ This allows someone to play with the iostream behind BFD's back.
+
+ Also, note that the origin pointer points to the beginning of a file's
+ contents (0 for non-archive elements). For archive entries this is the
+ first octet in the file, NOT the beginning of the archive header. */
+
+static file_ptr
+cache_bread (struct bfd *abfd, void *buf, file_ptr nbytes)
+{
+ FILE *f;
+ file_ptr nread;
+ /* FIXME - this looks like an optimization, but it's really to cover
+ up for a feature of some OSs (not solaris - sigh) that
+ ld/pe-dll.c takes advantage of (apparently) when it creates BFDs
+ internally and tries to link against them. BFD seems to be smart
+ enough to realize there are no symbol records in the "file" that
+ doesn't exist but attempts to read them anyway. On Solaris,
+ attempting to read zero bytes from a NULL file results in a core
+ dump, but on other platforms it just returns zero bytes read.
+ This makes it to something reasonable. - DJ */
+ if (nbytes == 0)
+ return 0;
+
+ f = bfd_cache_lookup (abfd, 0);
+ if (f == NULL)
+ return 0;
+
+#if defined (__VAX) && defined (VMS)
+ /* Apparently fread on Vax VMS does not keep the record length
+ information. */
+ nread = read (fileno (f), buf, nbytes);
+ /* Set bfd_error if we did not read as much data as we expected. If
+ the read failed due to an error set the bfd_error_system_call,
+ else set bfd_error_file_truncated. */
+ if (nread == (file_ptr)-1)
+ {
+ bfd_set_error (bfd_error_system_call);
+ return -1;
+ }
+#else
+ nread = fread (buf, 1, nbytes, f);
+ /* Set bfd_error if we did not read as much data as we expected. If
+ the read failed due to an error set the bfd_error_system_call,
+ else set bfd_error_file_truncated. */
+ if (nread < nbytes && ferror (f))
{
- ret = FALSE;
bfd_set_error (bfd_error_system_call);
+ return -1;
}
+#endif
+ return nread;
+}
- snip (abfd);
+static file_ptr
+cache_bwrite (struct bfd *abfd, const void *where, file_ptr nbytes)
+{
+ file_ptr nwrite;
+ FILE *f = bfd_cache_lookup (abfd, 0);
+ if (f == NULL)
+ return 0;
+ nwrite = fwrite (where, 1, nbytes, f);
+ if (nwrite < nbytes && ferror (f))
+ {
+ bfd_set_error (bfd_error_system_call);
+ return -1;
+ }
+ return nwrite;
+}
- abfd->iostream = NULL;
- --open_files;
+static int
+cache_bclose (struct bfd *abfd)
+{
+ return bfd_cache_close (abfd);
+}
- return ret;
+static int
+cache_bflush (struct bfd *abfd)
+{
+ int sts;
+ FILE *f = bfd_cache_lookup (abfd, CACHE_NO_OPEN);
+ if (f == NULL)
+ return 0;
+ sts = fflush (f);
+ if (sts < 0)
+ bfd_set_error (bfd_error_system_call);
+ return sts;
+}
+
+static int
+cache_bstat (struct bfd *abfd, struct stat *sb)
+{
+ int sts;
+ FILE *f = bfd_cache_lookup (abfd, CACHE_NO_SEEK_ERROR);
+ if (f == NULL)
+ return -1;
+ sts = fstat (fileno (f), sb);
+ if (sts < 0)
+ bfd_set_error (bfd_error_system_call);
+ return sts;
}
+static const struct bfd_iovec cache_iovec = {
+ &cache_bread, &cache_bwrite, &cache_btell, &cache_bseek,
+ &cache_bclose, &cache_bflush, &cache_bstat
+};
+
/*
INTERNAL_FUNCTION
bfd_cache_init
@@ -205,6 +384,7 @@ bfd_cache_init (bfd *abfd)
if (! close_one ())
return FALSE;
}
+ abfd->iovec = &cache_iovec;
insert (abfd);
++open_files;
return TRUE;
@@ -229,14 +409,44 @@ RETURNS
bfd_boolean
bfd_cache_close (bfd *abfd)
{
- if (abfd->iostream == NULL
- || (abfd->flags & BFD_IN_MEMORY) != 0)
+ if (abfd->iovec != &cache_iovec)
+ return TRUE;
+
+ if (abfd->iostream == NULL)
+ /* Previously closed. */
return TRUE;
return bfd_cache_delete (abfd);
}
/*
+FUNCTION
+ bfd_cache_close_all
+
+SYNOPSIS
+ bfd_boolean bfd_cache_close_all (void);
+
+DESCRIPTION
+ Remove all BFDs from the cache. If the attached file is open,
+ then close it too.
+
+RETURNS
+ <<FALSE>> is returned if closing one of the file fails, <<TRUE>> is
+ returned if all is well.
+*/
+
+bfd_boolean
+bfd_cache_close_all ()
+{
+ bfd_boolean ret = TRUE;
+
+ while (bfd_last_cache != NULL)
+ ret &= bfd_cache_close (bfd_last_cache);
+
+ return ret;
+}
+
+/*
INTERNAL_FUNCTION
bfd_open_file
@@ -266,15 +476,15 @@ bfd_open_file (bfd *abfd)
{
case read_direction:
case no_direction:
- abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_RB);
+ abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_RB);
break;
case both_direction:
case write_direction:
if (abfd->opened_once)
{
- abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_RUB);
+ abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_RUB);
if (abfd->iostream == NULL)
- abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WUB);
+ abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_WUB);
}
else
{
@@ -302,63 +512,19 @@ bfd_open_file (bfd *abfd)
struct stat s;
if (stat (abfd->filename, &s) == 0 && s.st_size != 0)
- unlink (abfd->filename);
+ unlink_if_ordinary (abfd->filename);
#endif
- abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WUB);
+ abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_WUB);
abfd->opened_once = TRUE;
}
break;
}
- if (abfd->iostream != NULL)
- {
- if (! bfd_cache_init (abfd))
- return NULL;
- }
-
- return (FILE *) abfd->iostream;
-}
-
-/*
-INTERNAL_FUNCTION
- bfd_cache_lookup_worker
-
-SYNOPSIS
- FILE *bfd_cache_lookup_worker (bfd *abfd);
-
-DESCRIPTION
- Called when the macro <<bfd_cache_lookup>> fails to find a
- quick answer. Find a file descriptor for @var{abfd}. If
- necessary, it open it. If there are already more than
- <<BFD_CACHE_MAX_OPEN>> files open, it tries to close one first, to
- avoid running out of file descriptors.
-*/
-
-FILE *
-bfd_cache_lookup_worker (bfd *abfd)
-{
- if ((abfd->flags & BFD_IN_MEMORY) != 0)
- abort ();
-
- if (abfd->my_archive)
- abfd = abfd->my_archive;
-
- if (abfd->iostream != NULL)
- {
- /* Move the file to the start of the cache. */
- if (abfd != bfd_last_cache)
- {
- snip (abfd);
- insert (abfd);
- }
- }
+ if (abfd->iostream == NULL)
+ bfd_set_error (bfd_error_system_call);
else
{
- if (bfd_open_file (abfd) == NULL)
- return NULL;
- if (abfd->where != (unsigned long) abfd->where)
- return NULL;
- if (real_fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0)
+ if (! bfd_cache_init (abfd))
return NULL;
}
diff --git a/contrib/binutils/bfd/coff-alpha.c b/contrib/binutils/bfd/coff-alpha.c
index e9dd4169b22b..d9b890502d3f 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
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005 Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
Ian Lance Taylor <ian@cygnus.com>.
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -462,8 +462,8 @@ alpha_ecoff_object_p (abfd)
bfd_size_type size;
size = sec->line_filepos * 8;
- BFD_ASSERT (size == bfd_section_size (abfd, sec)
- || size + 8 == bfd_section_size (abfd, sec));
+ BFD_ASSERT (size == sec->size
+ || size + 8 == sec->size);
if (! bfd_set_section_size (abfd, sec, size))
return NULL;
}
@@ -481,10 +481,16 @@ alpha_ecoff_bad_format_hook (abfd, filehdr)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
- if (ALPHA_ECOFF_BADMAG (*internal_f))
- return FALSE;
+ if (! ALPHA_ECOFF_BADMAG (*internal_f))
+ return TRUE;
- return TRUE;
+ if (ALPHA_ECOFF_COMPRESSEDMAG (*internal_f))
+ (*_bfd_error_handler)
+ (_("%B: Cannot handle compressed Alpha binaries.\n"
+ " Use compiler flags, or objZ, to generate uncompressed binaries."),
+ abfd);
+
+ return FALSE;
}
/* This is a hook called by coff_real_object_p to create any backend
@@ -603,8 +609,11 @@ alpha_ecoff_swap_reloc_out (abfd, intern, dst)
size = intern->r_size;
}
+ /* XXX FIXME: The maximum symndx value used to be 14 but this
+ fails with object files produced by DEC's C++ compiler.
+ Where does the value 14 (or 15) come from anyway ? */
BFD_ASSERT (intern->r_extern
- || (intern->r_symndx >= 0 && intern->r_symndx <= 14));
+ || (intern->r_symndx >= 0 && intern->r_symndx <= 15));
H_PUT_64 (abfd, intern->r_vaddr, ext->r_vaddr);
H_PUT_32 (abfd, symndx, ext->r_symndx);
@@ -632,7 +641,15 @@ alpha_adjust_reloc_in (abfd, intern, rptr)
arelent *rptr;
{
if (intern->r_type > ALPHA_R_GPVALUE)
- abort ();
+ {
+ (*_bfd_error_handler)
+ (_("%B: unknown/unsupported relocation type %d"),
+ abfd, intern->r_type);
+ bfd_set_error (bfd_error_bad_value);
+ rptr->addend = 0;
+ rptr->howto = NULL;
+ return;
+ }
switch (intern->r_type)
{
@@ -668,7 +685,7 @@ alpha_adjust_reloc_in (abfd, intern, rptr)
case ALPHA_R_OP_STORE:
/* The STORE reloc needs the size and offset fields. We store
them in the addend. */
- BFD_ASSERT (intern->r_offset <= 256 && intern->r_size <= 256);
+ BFD_ASSERT (intern->r_offset <= 256);
rptr->addend = (intern->r_offset << 8) + intern->r_size;
break;
@@ -768,6 +785,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
long reloc_count;
bfd *output_bfd = relocatable ? abfd : (bfd *) NULL;
bfd_vma gp;
+ bfd_size_type sz;
bfd_boolean gp_undefined;
bfd_vma stack[RELOC_STACKSIZE];
int tos = 0;
@@ -778,14 +796,10 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
if (reloc_vector == NULL && reloc_size != 0)
goto error_return;
- if (! bfd_get_section_contents (input_bfd, input_section, data,
- (file_ptr) 0, input_section->_raw_size))
+ sz = input_section->rawsize ? input_section->rawsize : input_section->size;
+ if (! bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
goto error_return;
- /* The section size is not going to change. */
- input_section->_cooked_size = input_section->_raw_size;
- input_section->reloc_done = TRUE;
-
reloc_count = bfd_canonicalize_reloc (input_bfd, input_section,
reloc_vector, symbols);
if (reloc_count < 0)
@@ -1148,7 +1162,8 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
break;
case bfd_reloc_overflow:
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*rel->sym_ptr_ptr),
rel->howto->name, rel->addend, input_bfd,
input_section, rel->address)))
goto error_return;
@@ -1223,23 +1238,6 @@ alpha_bfd_reloc_type_lookup (abfd, code)
case BFD_RELOC_64_PCREL:
alpha_type = ALPHA_R_SREL64;
break;
-#if 0
- case ???:
- alpha_type = ALPHA_R_OP_PUSH;
- break;
- case ???:
- alpha_type = ALPHA_R_OP_STORE;
- break;
- case ???:
- alpha_type = ALPHA_R_OP_PSUB;
- break;
- case ???:
- alpha_type = ALPHA_R_OP_PRSHIFT;
- break;
- case ???:
- alpha_type = ALPHA_R_GPVALUE;
- break;
-#endif
default:
return (reloc_howto_type *) NULL;
}
@@ -1455,7 +1453,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
amt = sizeof (struct ecoff_section_tdata);
lita_sec_data = ((struct ecoff_section_tdata *)
bfd_zalloc (input_bfd, amt));
- ecoff_section_data (input_bfd, lita_sec) = lita_sec_data;
+ lita_sec->used_by_bfd = lita_sec_data;
}
if (lita_sec_data->gp != 0)
@@ -1470,9 +1468,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_size_type lita_size;
lita_vma = lita_sec->output_offset + lita_sec->output_section->vma;
- lita_size = lita_sec->_cooked_size;
- if (lita_size == 0)
- lita_size = lita_sec->_raw_size;
+ lita_size = lita_sec->size;
if (gp == 0
|| lita_vma < gp - 0x8000
@@ -1542,8 +1538,26 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
switch (r_type)
{
+ case ALPHA_R_GPRELHIGH:
+ (*_bfd_error_handler)
+ (_("%B: unsupported relocation: ALPHA_R_GPRELHIGH"),
+ input_bfd);
+ bfd_set_error (bfd_error_bad_value);
+ continue;
+
+ case ALPHA_R_GPRELLOW:
+ (*_bfd_error_handler)
+ (_("%B: unsupported relocation: ALPHA_R_GPRELLOW"),
+ input_bfd);
+ bfd_set_error (bfd_error_bad_value);
+ continue;
+
default:
- abort ();
+ (*_bfd_error_handler)
+ (_("%B: unknown relocation type %d"),
+ input_bfd, (int) r_type);
+ bfd_set_error (bfd_error_bad_value);
+ continue;
case ALPHA_R_IGNORE:
/* This reloc appears after a GPDISP reloc. On earlier
@@ -1965,7 +1979,8 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd,
symndx_to_section[r_symndx]);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, alpha_howto_table[r_type].name,
+ (info, NULL, name,
+ alpha_howto_table[r_type].name,
(bfd_vma) 0, input_bfd, input_section,
r_vaddr - input_section->vma)))
return FALSE;
@@ -2359,7 +2374,10 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
#define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
#define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
+#define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
+#define _bfd_ecoff_section_already_linked \
+ _bfd_generic_section_already_linked
const bfd_target ecoffalpha_little_vec =
{
diff --git a/contrib/binutils/bfd/coff-arm.c b/contrib/binutils/bfd/coff-arm.c
index e51d07d583c5..6b83dc7af7fd 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
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,14 +18,12 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
-
#include "coff/arm.h"
-
#include "coff/internal.h"
#ifdef COFF_WITH_PE
@@ -75,73 +73,10 @@
#endif
typedef enum {bunknown, b9, b12, b23} thumb_pcrel_branchtype;
-/* some typedefs for holding instructions */
+/* Some typedefs for holding instructions. */
typedef unsigned long int insn32;
typedef unsigned short int insn16;
- /* Forward declarations for stupid compilers. */
-static bfd_boolean coff_arm_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-static bfd_reloc_status_type aoutarm_fix_pcrel_26_done
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type aoutarm_fix_pcrel_26
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-#ifndef ARM_WINCE
-static bfd_reloc_status_type coff_thumb_pcrel_23
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type coff_thumb_pcrel_9
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static insn32 insert_thumb_branch
- PARAMS ((insn32, int));
-#endif
-static bfd_reloc_status_type coff_thumb_pcrel_12
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type coff_arm_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_boolean coff_arm_adjust_symndx
- PARAMS ((bfd *, struct bfd_link_info *, bfd *,
- asection *, struct internal_reloc *, bfd_boolean *));
-static reloc_howto_type * coff_arm_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
-static bfd_reloc_status_type coff_thumb_pcrel_common
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **,
- thumb_pcrel_branchtype));
-static const struct reloc_howto_struct * coff_arm_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static struct bfd_link_hash_table * coff_arm_link_hash_table_create
- PARAMS ((bfd *));
-static struct coff_link_hash_entry * find_thumb_glue
- PARAMS ((struct bfd_link_info *, const char *, bfd *));
-static struct coff_link_hash_entry * find_arm_glue
- PARAMS ((struct bfd_link_info *, const char *, bfd *));
-#ifndef COFF_IMAGE_WITH_PE
-static void record_arm_to_thumb_glue
- PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *));
-#ifndef ARM_WINCE
-static void record_thumb_to_arm_glue
- PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *));
-#endif
-#endif
-static bfd_boolean coff_arm_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static bfd_boolean coff_arm_print_private_bfd_data
- PARAMS ((bfd *, PTR));
-static bfd_boolean _bfd_coff_arm_set_private_flags
- PARAMS ((bfd *, flagword));
-static bfd_boolean coff_arm_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static bfd_boolean coff_arm_is_local_label_name
- PARAMS ((bfd *, const char *));
-static bfd_boolean coff_arm_link_output_has_begun
- PARAMS ((bfd *, struct coff_final_link_info *));
-static bfd_boolean coff_arm_final_link_postscript
- PARAMS ((bfd *, struct coff_final_link_info *));
-static void arm_emit_base_file_entry
- PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_vma));
-
/* The linker script knows the section names for placement.
The entry_names are used to do simple name mangling on the stubs.
Given a function name, and its type, the stub can be found. The
@@ -156,18 +91,17 @@ static void arm_emit_base_file_entry
/* Used by the assembler. */
static bfd_reloc_status_type
-coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+coff_arm_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
symvalue diff;
- if (output_bfd == (bfd *) NULL)
+
+ if (output_bfd == NULL)
return bfd_reloc_continue;
diff = reloc_entry->addend;
@@ -237,7 +171,7 @@ coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
#define ARM_DISP16 5
#define ARM_DISP32 6
#define ARM_26D 7
-/* 8 is unused */
+/* 8 is unused. */
#define ARM_NEG16 9
#define ARM_NEG32 10
#define ARM_RVA32 11
@@ -261,6 +195,19 @@ coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
#define ARM_SECREL 15
#endif
+static bfd_reloc_status_type aoutarm_fix_pcrel_26_done
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type aoutarm_fix_pcrel_26
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type coff_thumb_pcrel_12
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+#ifndef ARM_WINCE
+static bfd_reloc_status_type coff_thumb_pcrel_9
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type coff_thumb_pcrel_23
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+#endif
+
static reloc_howto_type aoutarm_std_reloc_howto[] =
{
#ifdef ARM_WINCE
@@ -365,19 +312,19 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0xffffffff,
PCRELOFFSET),
#else /* not ARM_WINCE */
- HOWTO (ARM_8, /* type */
- 0, /* rightshift */
- 0, /* size */
- 8, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_arm_reloc, /* special_function */
- "ARM_8", /* name */
- TRUE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- PCRELOFFSET /* pcrel_offset */),
+ HOWTO (ARM_8,
+ 0,
+ 0,
+ 8,
+ FALSE,
+ 0,
+ complain_overflow_bitfield,
+ coff_arm_reloc,
+ "ARM_8",
+ TRUE,
+ 0x000000ff,
+ 0x000000ff,
+ PCRELOFFSET),
HOWTO (ARM_16,
0,
1,
@@ -555,14 +502,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
#define NUM_RELOCS NUM_ELEM (aoutarm_std_reloc_howto)
#ifdef COFF_WITH_PE
-static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
/* Return TRUE if this relocation should
appear in the output .reloc section. */
static bfd_boolean
-in_reloc_p (abfd, howto)
- bfd * abfd ATTRIBUTE_UNUSED;
- reloc_howto_type * howto;
+in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
+ reloc_howto_type * howto)
{
return !howto->pc_relative && howto->type != ARM_RVA32;
}
@@ -577,13 +522,12 @@ in_reloc_p (abfd, howto)
#define coff_rtype_to_howto coff_arm_rtype_to_howto
static reloc_howto_type *
-coff_arm_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
- struct internal_syment *sym ATTRIBUTE_UNUSED;
- bfd_vma *addendp;
+coff_arm_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
+ struct internal_syment *sym ATTRIBUTE_UNUSED,
+ bfd_vma *addendp)
{
reloc_howto_type * howto;
@@ -601,15 +545,13 @@ coff_arm_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
/* Used by the assembler. */
static bfd_reloc_status_type
-aoutarm_fix_pcrel_26_done (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
+aoutarm_fix_pcrel_26_done (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
{
/* This is dead simple at present. */
return bfd_reloc_ok;
@@ -618,15 +560,13 @@ aoutarm_fix_pcrel_26_done (abfd, reloc_entry, symbol, data, input_section,
/* Used by the assembler. */
static bfd_reloc_status_type
-aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+aoutarm_fix_pcrel_26 (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
bfd_vma relocation;
bfd_size_type addr = reloc_entry->address;
@@ -678,16 +618,14 @@ aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
}
static bfd_reloc_status_type
-coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message, btype)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
- thumb_pcrel_branchtype btype;
+coff_thumb_pcrel_common (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED,
+ thumb_pcrel_branchtype btype)
{
bfd_vma relocation = 0;
bfd_size_type addr = reloc_entry->address;
@@ -699,7 +637,6 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
/* NOTE: This routine is currently used by GAS, but not by the link
phase. */
-
switch (btype)
{
case b9:
@@ -807,15 +744,13 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
#ifndef ARM_WINCE
static bfd_reloc_status_type
-coff_thumb_pcrel_23 (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+coff_thumb_pcrel_23 (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message)
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message,
@@ -823,15 +758,13 @@ coff_thumb_pcrel_23 (abfd, reloc_entry, symbol, data, input_section,
}
static bfd_reloc_status_type
-coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+coff_thumb_pcrel_9 (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message)
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message,
@@ -840,15 +773,13 @@ coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section,
#endif /* not ARM_WINCE */
static bfd_reloc_status_type
-coff_thumb_pcrel_12 (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+coff_thumb_pcrel_12 (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message)
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message,
@@ -856,9 +787,7 @@ coff_thumb_pcrel_12 (abfd, reloc_entry, symbol, data, input_section,
}
static const struct reloc_howto_struct *
-coff_arm_reloc_type_lookup (abfd, code)
- bfd * abfd;
- bfd_reloc_code_real_type code;
+coff_arm_reloc_type_lookup (bfd * abfd, bfd_reloc_code_real_type code)
{
#define ASTD(i,j) case i: return aoutarm_std_reloc_howto + j
@@ -869,7 +798,7 @@ coff_arm_reloc_type_lookup (abfd, code)
code = BFD_RELOC_32;
break;
default:
- return (const struct reloc_howto_struct *) 0;
+ return NULL;
}
switch (code)
@@ -894,17 +823,17 @@ coff_arm_reloc_type_lookup (abfd, code)
ASTD (BFD_RELOC_THUMB_PCREL_BRANCH23, ARM_THUMB23);
ASTD (BFD_RELOC_THUMB_PCREL_BLX, ARM_THUMB23);
#endif
- default: return (const struct reloc_howto_struct *) 0;
+ default: return NULL;
}
}
-#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
-#define COFF_PAGE_SIZE 0x1000
-/* Turn a howto into a reloc nunmber */
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER 2
+#define COFF_PAGE_SIZE 0x1000
+/* Turn a howto into a reloc nunmber. */
#define SELECT_RELOC(x,howto) { x.r_type = howto->type; }
-#define BADMAG(x) ARMBADMAG(x)
-#define ARM 1 /* Customize coffcode.h */
+#define BADMAG(x) ARMBADMAG(x)
+#define ARM 1 /* Customize coffcode.h. */
#ifndef ARM_WINCE
/* Make sure that the 'r_offset' field is copied properly
@@ -941,21 +870,22 @@ struct coff_arm_link_hash_table
/* Create an ARM coff linker hash table. */
static struct bfd_link_hash_table *
-coff_arm_link_hash_table_create (abfd)
- bfd * abfd;
+coff_arm_link_hash_table_create (bfd * abfd)
{
struct coff_arm_link_hash_table * ret;
bfd_size_type amt = sizeof (struct coff_arm_link_hash_table);
- ret = (struct coff_arm_link_hash_table *) bfd_malloc (amt);
- if (ret == (struct coff_arm_link_hash_table *) NULL)
+ ret = bfd_malloc (amt);
+ if (ret == NULL)
return NULL;
- if (! _bfd_coff_link_hash_table_init
- (& ret->root, abfd, _bfd_coff_link_hash_newfunc))
+ if (!_bfd_coff_link_hash_table_init (&ret->root,
+ abfd,
+ _bfd_coff_link_hash_newfunc,
+ sizeof (struct coff_link_hash_entry)))
{
free (ret);
- return (struct bfd_link_hash_table *) NULL;
+ return NULL;
}
ret->thumb_glue_size = 0;
@@ -966,11 +896,10 @@ coff_arm_link_hash_table_create (abfd)
}
static void
-arm_emit_base_file_entry (info, output_bfd, input_section, reloc_offset)
- struct bfd_link_info *info;
- bfd *output_bfd;
- asection *input_section;
- bfd_vma reloc_offset;
+arm_emit_base_file_entry (struct bfd_link_info *info,
+ bfd *output_bfd,
+ asection *input_section,
+ bfd_vma reloc_offset)
{
bfd_vma addr = reloc_offset
- input_section->vma
@@ -1016,18 +945,16 @@ arm_emit_base_file_entry (info, output_bfd, input_section, reloc_offset)
#define HI_LOW_ORDER 0xF000F800
static insn32
-insert_thumb_branch (br_insn, rel_off)
- insn32 br_insn;
- int rel_off;
+insert_thumb_branch (insn32 br_insn, int rel_off)
{
unsigned int low_bits;
unsigned int high_bits;
- BFD_ASSERT((rel_off & 1) != 1);
+ BFD_ASSERT ((rel_off & 1) != 1);
- rel_off >>= 1; /* half word aligned address */
- low_bits = rel_off & 0x000007FF; /* the bottom 11 bits */
- high_bits = (rel_off >> 11) & 0x000007FF; /* the top 11 bits */
+ rel_off >>= 1; /* Half word aligned address. */
+ low_bits = rel_off & 0x000007FF; /* The bottom 11 bits. */
+ high_bits = (rel_off >> 11) & 0x000007FF; /* The top 11 bits. */
if ((br_insn & LOW_HI_ORDER) == LOW_HI_ORDER)
br_insn = LOW_HI_ORDER | (low_bits << 16) | high_bits;
@@ -1043,16 +970,15 @@ insert_thumb_branch (br_insn, rel_off)
static struct coff_link_hash_entry *
-find_thumb_glue (info, name, input_bfd)
- struct bfd_link_info *info;
- const char *name;
- bfd *input_bfd;
+find_thumb_glue (struct bfd_link_info *info,
+ const char *name,
+ bfd *input_bfd)
{
char *tmp_name;
struct coff_link_hash_entry *myh;
bfd_size_type amt = strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1;
- tmp_name = (char *) bfd_malloc (amt);
+ tmp_name = bfd_malloc (amt);
BFD_ASSERT (tmp_name);
@@ -1063,8 +989,8 @@ find_thumb_glue (info, name, input_bfd)
if (myh == NULL)
/* xgettext:c-format */
- _bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"),
- bfd_archive_filename (input_bfd), tmp_name, name);
+ _bfd_error_handler (_("%B: unable to find THUMB glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
free (tmp_name);
@@ -1073,16 +999,15 @@ find_thumb_glue (info, name, input_bfd)
#endif /* not ARM_WINCE */
static struct coff_link_hash_entry *
-find_arm_glue (info, name, input_bfd)
- struct bfd_link_info *info;
- const char *name;
- bfd *input_bfd;
+find_arm_glue (struct bfd_link_info *info,
+ const char *name,
+ bfd *input_bfd)
{
char *tmp_name;
struct coff_link_hash_entry * myh;
bfd_size_type amt = strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1;
- tmp_name = (char *) bfd_malloc (amt);
+ tmp_name = bfd_malloc (amt);
BFD_ASSERT (tmp_name);
@@ -1093,8 +1018,8 @@ find_arm_glue (info, name, input_bfd)
if (myh == NULL)
/* xgettext:c-format */
- _bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"),
- bfd_archive_filename (input_bfd), tmp_name, name);
+ _bfd_error_handler (_("%B: unable to find ARM glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
free (tmp_name);
@@ -1136,6 +1061,7 @@ static const insn32 a2t3_func_addr_insn = 0x00000001;
*/
#define THUMB2ARM_GLUE_SIZE (globals->support_old_code ? 20 : 8)
+#ifndef ARM_WINCE
static const insn16 t2a1_bx_pc_insn = 0x4778;
static const insn16 t2a2_noop_insn = 0x46c0;
static const insn32 t2a3_b_insn = 0xea000000;
@@ -1146,6 +1072,7 @@ static const insn16 t2a3_mov_insn = 0x46fe;
static const insn16 t2a4_bx_insn = 0x4730;
static const insn32 t2a5_pop_insn = 0xe8bd4040;
static const insn32 t2a6_bx_insn = 0xe12fff1e;
+#endif
/* TODO:
We should really create new local (static) symbols in destination
@@ -1189,19 +1116,20 @@ static const insn32 t2a6_bx_insn = 0xe12fff1e;
is different from the original. */
static bfd_boolean
-coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, syms, sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- struct internal_reloc *relocs;
- struct internal_syment *syms;
- asection **sections;
+coff_arm_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ struct internal_reloc *relocs,
+ struct internal_syment *syms,
+ asection **sections)
{
struct internal_reloc * rel;
struct internal_reloc * relend;
+#ifndef ARM_WINCE
+ bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section);
+#endif
rel = relocs;
relend = rel + input_section->reloc_count;
@@ -1278,7 +1206,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
addend -= rel->r_vaddr - input_section->vma;
#ifdef ARM_WINCE
/* FIXME: I don't know why, but the hack is necessary for correct
- generation of bl's instruction offset. */
+ generation of bl's instruction offset. */
addend -= 8;
#endif
howto = &fake_arm26_reloc;
@@ -1287,11 +1215,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
#ifdef ARM_WINCE
/* MS ARM-CE makes the reloc relative to the opcode's pc, not
the next opcode's pc, so is off by one. */
-#if 0 /* This appears to have been true for WINCE 2.0, but it is not
- true for WINCE 3.0. */
- if (howto->pc_relative && !info->relocatable)
- addend -= 8;
-#endif
#endif
/* If we are doing a relocatable link, then we can just ignore
@@ -1341,7 +1264,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
-#if 1 /* THUMBEXTENSION */
/* We don't output the stubs if we are generating a
relocatable output file, since we may as well leave the
stub generation to the final linker pass. If we fail to
@@ -1394,16 +1316,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if (h_sec->owner != NULL
&& INTERWORK_SET (h_sec->owner)
&& ! INTERWORK_FLAG (h_sec->owner))
- {
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%s(%s): warning: interworking not enabled."),
- bfd_archive_filename (h_sec->owner), name);
- _bfd_error_handler
- /* xgettext:c-format */
- (_(" first occurrence: %s: arm call to thumb"),
- bfd_archive_filename (input_bfd));
- }
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%B(%s): warning: interworking not enabled.\n"
+ " first occurrence: %B: arm call to thumb"),
+ h_sec->owner, input_bfd, name);
--my_offset;
myh->root.u.def.value = my_offset;
@@ -1457,7 +1374,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|| h->class == C_STAT
|| h->class == C_LABEL)
{
- /* Thumb code calling an ARM function */
+ /* Thumb code calling an ARM function. */
asection * s = 0;
bfd_vma my_offset;
unsigned long int tmp;
@@ -1489,18 +1406,12 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
&& INTERWORK_SET (h_sec->owner)
&& ! INTERWORK_FLAG (h_sec->owner)
&& ! globals->support_old_code)
- {
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%s(%s): warning: interworking not enabled."),
- bfd_archive_filename (h_sec->owner), name);
- _bfd_error_handler
- /* xgettext:c-format */
- (_(" first occurrence: %s: thumb call to arm"),
- bfd_archive_filename (input_bfd));
- _bfd_error_handler
- (_(" consider relinking with --support-old-code enabled"));
- }
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%B(%s): warning: interworking not enabled.\n"
+ " first occurrence: %B: thumb call to arm\n"
+ " consider relinking with --support-old-code enabled"),
+ h_sec->owner, input_bfd, name);
-- my_offset;
myh->root.u.def.value = my_offset;
@@ -1542,13 +1453,19 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
s->contents + my_offset + 2);
ret_offset =
- ((bfd_signed_vma) h_val) /* Address of destination of the stub. */
+ /* Address of destination of the stub. */
+ ((bfd_signed_vma) h_val)
- ((bfd_signed_vma)
- (s->output_offset /* Offset from the start of the current section to the start of the stubs. */
- + my_offset /* Offset of the start of this stub from the start of the stubs. */
- + s->output_section->vma) /* Address of the start of the current section. */
- + 4 /* The branch instruction is 4 bytes into the stub. */
- + 8); /* ARM branches work from the pc of the instruction + 8. */
+ /* Offset from the start of the current section to the start of the stubs. */
+ (s->output_offset
+ /* Offset of the start of this stub from the start of the stubs. */
+ + my_offset
+ /* Address of the start of the current section. */
+ + s->output_section->vma)
+ /* The branch instruction is 4 bytes into the stub. */
+ + 4
+ /* ARM branches work from the pc of the instruction + 8. */
+ + 8);
bfd_put_32 (output_bfd,
(bfd_vma) t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
@@ -1589,7 +1506,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if (done)
rstat = bfd_reloc_ok;
else
-#endif /* THUMBEXTENSION */
if ( h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
@@ -1618,11 +1534,10 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
rel->r_vaddr);
}
-#if 1 /* THUMBEXTENSION */
if (done)
rstat = bfd_reloc_ok;
#ifndef ARM_WINCE
- /* Only perform this fix during the final link, not a relocatable link. nickc@cygnus.com */
+ /* Only perform this fix during the final link, not a relocatable link. */
else if (! info->relocatable
&& howto->type == ARM_THUMB23)
{
@@ -1636,7 +1551,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma address = rel->r_vaddr - input_section->vma;
- if (address > input_section->_raw_size)
+ if (address > high_address)
rstat = bfd_reloc_outofrange;
else
{
@@ -1739,7 +1654,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
}
#endif
else
-#endif /* THUMBEXTENSION */
if (info->relocatable && ! howto->partial_inplace)
rstat = bfd_reloc_ok;
else
@@ -1747,17 +1661,12 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
contents,
rel->r_vaddr - input_section->vma,
val, addend);
-#if 1 /* THUMBEXTENSION */
- /* FIXME:
- Is this the best way to fix up thumb addresses? krk@cygnus.com
- Probably not, but it works, and if it works it don't need fixing! nickc@cygnus.com */
- /* Only perform this fix during the final link, not a relocatable link. nickc@cygnus.com */
+ /* Only perform this fix during the final link, not a relocatable link. */
if (! info->relocatable
&& (rel->r_type == ARM_32 || rel->r_type == ARM_RVA32))
{
/* Determine if we need to set the bottom bit of a relocated address
because the address is the address of a Thumb code symbol. */
-
int patchit = FALSE;
if (h != NULL
@@ -1770,7 +1679,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
&& sym->n_scnum > N_UNDEF)
{
/* No hash entry - use the symbol instead. */
-
if ( sym->n_sclass == C_THUMBSTATFUNC
|| sym->n_sclass == C_THUMBEXTFUNC)
patchit = TRUE;
@@ -1784,7 +1692,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_put_32 (input_bfd, x | 1, location);
}
}
-#endif /* THUMBEXTENSION */
switch (rstat)
{
@@ -1794,10 +1701,8 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
break;
case bfd_reloc_outofrange:
(*_bfd_error_handler)
- (_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_archive_filename (input_bfd),
- (unsigned long) rel->r_vaddr,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B: bad reloc address 0x%lx in section `%A'"),
+ input_bfd, input_section, (unsigned long) rel->r_vaddr);
return FALSE;
case bfd_reloc_overflow:
{
@@ -1807,7 +1712,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
@@ -1816,8 +1721,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
}
@@ -1829,15 +1735,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
#ifndef COFF_IMAGE_WITH_PE
bfd_boolean
-bfd_arm_allocate_interworking_sections (info)
- struct bfd_link_info * info;
+bfd_arm_allocate_interworking_sections (struct bfd_link_info * info)
{
asection * s;
bfd_byte * foo;
struct coff_arm_link_hash_table * globals;
-#if 0
- static char test_char = '1';
-#endif
globals = coff_arm_hash_table (info);
@@ -1852,13 +1754,9 @@ bfd_arm_allocate_interworking_sections (info)
BFD_ASSERT (s != NULL);
- foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner,
- globals->arm_glue_size);
-#if 0
- memset (foo, test_char, (size_t) globals->arm_glue_size);
-#endif
+ foo = bfd_alloc (globals->bfd_of_glue_owner, globals->arm_glue_size);
- s->_raw_size = s->_cooked_size = globals->arm_glue_size;
+ s->size = globals->arm_glue_size;
s->contents = foo;
}
@@ -1871,13 +1769,9 @@ bfd_arm_allocate_interworking_sections (info)
BFD_ASSERT (s != NULL);
- foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner,
- globals->thumb_glue_size);
-#if 0
- memset (foo, test_char, (size_t) globals->thumb_glue_size);
-#endif
+ foo = bfd_alloc (globals->bfd_of_glue_owner, globals->thumb_glue_size);
- s->_raw_size = s->_cooked_size = globals->thumb_glue_size;
+ s->size = globals->thumb_glue_size;
s->contents = foo;
}
@@ -1885,9 +1779,8 @@ bfd_arm_allocate_interworking_sections (info)
}
static void
-record_arm_to_thumb_glue (info, h)
- struct bfd_link_info * info;
- struct coff_link_hash_entry * h;
+record_arm_to_thumb_glue (struct bfd_link_info * info,
+ struct coff_link_hash_entry * h)
{
const char * name = h->root.root.string;
register asection * s;
@@ -1909,7 +1802,7 @@ record_arm_to_thumb_glue (info, h)
BFD_ASSERT (s != NULL);
amt = strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1;
- tmp_name = (char *) bfd_malloc (amt);
+ tmp_name = bfd_malloc (amt);
BFD_ASSERT (tmp_name);
@@ -1921,13 +1814,13 @@ record_arm_to_thumb_glue (info, h)
if (myh != NULL)
{
free (tmp_name);
- return; /* we've already seen this guy */
+ /* We've already seen this guy. */
+ return;
}
/* The only trick here is using globals->arm_glue_size as the value. Even
though the section isn't allocated yet, this is where we will be putting
it. */
-
bh = NULL;
val = globals->arm_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
@@ -1942,12 +1835,11 @@ record_arm_to_thumb_glue (info, h)
#ifndef ARM_WINCE
static void
-record_thumb_to_arm_glue (info, h)
- struct bfd_link_info * info;
- struct coff_link_hash_entry * h;
+record_thumb_to_arm_glue (struct bfd_link_info * info,
+ struct coff_link_hash_entry * h)
{
const char * name = h->root.root.string;
- register asection * s;
+ asection * s;
char * tmp_name;
struct coff_link_hash_entry * myh;
struct bfd_link_hash_entry * bh;
@@ -1966,7 +1858,7 @@ record_thumb_to_arm_glue (info, h)
BFD_ASSERT (s != NULL);
amt = strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1;
- tmp_name = (char *) bfd_malloc (amt);
+ tmp_name = bfd_malloc (amt);
BFD_ASSERT (tmp_name);
@@ -1978,7 +1870,8 @@ record_thumb_to_arm_glue (info, h)
if (myh != NULL)
{
free (tmp_name);
- return; /* we've already seen this guy */
+ /* We've already seen this guy. */
+ return;
}
bh = NULL;
@@ -1998,7 +1891,7 @@ record_thumb_to_arm_glue (info, h)
#define BACK_FROM_ARM "__%s_back_from_arm"
amt = strlen (name) + strlen (CHANGE_TO_ARM) + 1;
- tmp_name = (char *) bfd_malloc (amt);
+ tmp_name = bfd_malloc (amt);
BFD_ASSERT (tmp_name);
@@ -2022,9 +1915,8 @@ record_thumb_to_arm_glue (info, h)
{armcoff/pe}.em */
bfd_boolean
-bfd_arm_get_bfd_for_interworking (abfd, info)
- bfd * abfd;
- struct bfd_link_info * info;
+bfd_arm_get_bfd_for_interworking (bfd * abfd,
+ struct bfd_link_info * info)
{
struct coff_arm_link_hash_table * globals;
flagword flags;
@@ -2077,10 +1969,9 @@ bfd_arm_get_bfd_for_interworking (abfd, info)
}
bfd_boolean
-bfd_arm_process_before_allocation (abfd, info, support_old_code)
- bfd * abfd;
- struct bfd_link_info * info;
- int support_old_code;
+bfd_arm_process_before_allocation (bfd * abfd,
+ struct bfd_link_info * info,
+ int support_old_code)
{
asection * sec;
struct coff_arm_link_hash_table * globals;
@@ -2092,7 +1983,6 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
/* Here we have a bfd that is to be included on the link. We have a hook
to do reloc rummaging, before section sizes are nailed down. */
-
_bfd_coff_get_external_symbols (abfd);
globals = coff_arm_hash_table (info);
@@ -2118,7 +2008,6 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
/* Load the relocs. */
/* FIXME: there may be a storage leak here. */
-
i = _bfd_coff_read_internal_relocs (abfd, sec, 1, 0, 0, 0);
BFD_ASSERT (i != 0);
@@ -2138,8 +2027,8 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
/* If the index is outside of the range of our table, something has gone wrong. */
if (symndx >= obj_conv_table_size (abfd))
{
- _bfd_error_handler (_("%s: illegal symbol index in reloc: %d"),
- bfd_archive_filename (abfd), symndx);
+ _bfd_error_handler (_("%B: illegal symbol index in reloc: %d"),
+ abfd, symndx);
continue;
}
@@ -2211,13 +2100,12 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
into ARM_26D relocs. */
static bfd_boolean
-coff_arm_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
- bfd *obfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- bfd *ibfd;
- asection *sec;
- struct internal_reloc *irel;
- bfd_boolean *adjustedp;
+coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ bfd *ibfd,
+ asection *sec,
+ struct internal_reloc *irel,
+ bfd_boolean *adjustedp)
{
if (irel->r_type == ARM_26)
{
@@ -2240,9 +2128,7 @@ coff_arm_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
targets, eg different CPUs or different APCS's. */
static bfd_boolean
-coff_arm_merge_private_bfd_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
+coff_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
{
BFD_ASSERT (ibfd != NULL && obfd != NULL);
@@ -2271,9 +2157,10 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
{
_bfd_error_handler
/* xgettext: c-format */
- (_("ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"),
- bfd_archive_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
- bfd_get_filename (obfd), APCS_26_FLAG (obfd) ? 26 : 32
+ (_("ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"),
+ ibfd, obfd,
+ APCS_26_FLAG (ibfd) ? 26 : 32,
+ APCS_26_FLAG (obfd) ? 26 : 32
);
bfd_set_error (bfd_error_wrong_format);
@@ -2286,13 +2173,12 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (APCS_FLOAT_FLAG (ibfd))
/* xgettext: c-format */
- msg = _("ERROR: %s passes floats in float registers, whereas %s passes them in integer registers");
+ msg = _("ERROR: %B passes floats in float registers, whereas %B passes them in integer registers");
else
/* xgettext: c-format */
- msg = _("ERROR: %s passes floats in integer registers, whereas %s passes them in float registers");
+ msg = _("ERROR: %B passes floats in integer registers, whereas %B passes them in float registers");
- _bfd_error_handler (msg, bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler (msg, ibfd, obfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -2304,12 +2190,11 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (PIC_FLAG (ibfd))
/* xgettext: c-format */
- msg = _("ERROR: %s is compiled as position independent code, whereas target %s is absolute position");
+ msg = _("ERROR: %B is compiled as position independent code, whereas target %B is absolute position");
else
/* xgettext: c-format */
- msg = _("ERROR: %s is compiled as absolute position code, whereas target %s is position independent");
- _bfd_error_handler (msg, bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ msg = _("ERROR: %B is compiled as absolute position code, whereas target %B is position independent");
+ _bfd_error_handler (msg, ibfd, obfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -2336,13 +2221,12 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (INTERWORK_FLAG (ibfd))
/* xgettext: c-format */
- msg = _("Warning: %s supports interworking, whereas %s does not");
+ msg = _("Warning: %B supports interworking, whereas %B does not");
else
/* xgettext: c-format */
- msg = _("Warning: %s does not support interworking, whereas %s does");
+ msg = _("Warning: %B does not support interworking, whereas %B does");
- _bfd_error_handler (msg, bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ _bfd_error_handler (msg, ibfd, obfd);
}
}
else
@@ -2357,9 +2241,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
/* Display the flags field. */
static bfd_boolean
-coff_arm_print_private_bfd_data (abfd, ptr)
- bfd * abfd;
- PTR ptr;
+coff_arm_print_private_bfd_data (bfd * abfd, void * ptr)
{
FILE * file = (FILE *) ptr;
@@ -2404,9 +2286,7 @@ coff_arm_print_private_bfd_data (abfd, ptr)
called from both coffcode.h and peicode.h. */
static bfd_boolean
-_bfd_coff_arm_set_private_flags (abfd, flags)
- bfd * abfd;
- flagword flags;
+_bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags)
{
flagword flag;
@@ -2437,12 +2317,12 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
{
if (flag)
/* xgettext: c-format */
- _bfd_error_handler (_("Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"),
- bfd_archive_filename (abfd));
+ _bfd_error_handler (_("Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"),
+ abfd);
else
/* xgettext: c-format */
- _bfd_error_handler (_("Warning: Clearing the interworking flag of %s due to outside request"),
- bfd_archive_filename (abfd));
+ _bfd_error_handler (_("Warning: Clearing the interworking flag of %B due to outside request"),
+ abfd);
flag = 0;
}
@@ -2455,9 +2335,7 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
from one instance of a BFD to another. */
static bfd_boolean
-coff_arm_copy_private_bfd_data (src, dest)
- bfd * src;
- bfd * dest;
+coff_arm_copy_private_bfd_data (bfd * src, bfd * dest)
{
BFD_ASSERT (src != NULL && dest != NULL);
@@ -2469,7 +2347,7 @@ coff_arm_copy_private_bfd_data (src, dest)
if (src->xvec != dest->xvec)
return TRUE;
- /* copy the flags field */
+ /* Copy the flags field. */
if (APCS_SET (src))
{
if (APCS_SET (dest))
@@ -2501,9 +2379,8 @@ coff_arm_copy_private_bfd_data (src, dest)
{
/* xgettext:c-format */
_bfd_error_handler (("\
-Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"),
- bfd_get_filename (dest),
- bfd_archive_filename (src));
+Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it"),
+ dest, src);
}
SET_INTERWORK_FLAG (dest, 0);
@@ -2530,15 +2407,17 @@ Warning: Clearing the interworking flag of %s because non-interworking code in %
non-local.
b) Allow other prefixes than ".", e.g. an empty prefix would cause all
labels of the form Lxxx to be stripped. */
+
static bfd_boolean
-coff_arm_is_local_label_name (abfd, name)
- bfd * abfd ATTRIBUTE_UNUSED;
- const char * name;
+coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
+ const char * name)
{
#ifdef USER_LABEL_PREFIX
if (USER_LABEL_PREFIX[0] != 0)
{
- if (strncmp (name, USER_LABEL_PREFIX, strlen (USER_LABEL_PREFIX)) == 0)
+ size_t len = strlen (USER_LABEL_PREFIX);
+
+ if (strncmp (name, USER_LABEL_PREFIX, len) == 0)
return FALSE;
}
#endif
@@ -2566,23 +2445,18 @@ coff_arm_is_local_label_name (abfd, name)
the glue section is written last.
This does depend on bfd_make_section attaching a new section to the
- end of the section list for the bfd.
-
- krk@cygnus.com */
+ end of the section list for the bfd. */
static bfd_boolean
-coff_arm_link_output_has_begun (sub, info)
- bfd * sub;
- struct coff_final_link_info * info;
+coff_arm_link_output_has_begun (bfd * sub, struct coff_final_link_info * info)
{
return (sub->output_has_begun
|| sub == coff_arm_hash_table (info->info)->bfd_of_glue_owner);
}
static bfd_boolean
-coff_arm_final_link_postscript (abfd, pfinfo)
- bfd * abfd ATTRIBUTE_UNUSED;
- struct coff_final_link_info * pfinfo;
+coff_arm_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED,
+ struct coff_final_link_info * pfinfo)
{
struct coff_arm_link_hash_table * globals;
diff --git a/contrib/binutils/bfd/coff-aux.c b/contrib/binutils/bfd/coff-aux.c
index 4d7cde55571f..e22d85566a69 100644
--- a/contrib/binutils/bfd/coff-aux.c
+++ b/contrib/binutils/bfd/coff-aux.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_SYM m68kaux_coff_vec
#define TARGET_NAME "coff-m68k-aux"
diff --git a/contrib/binutils/bfd/coff-i386.c b/contrib/binutils/bfd/coff-i386.c
index a24344ad8c3b..0d71cd000657 100644
--- a/contrib/binutils/bfd/coff-i386.c
+++ b/contrib/binutils/bfd/coff-i386.c
@@ -1,24 +1,24 @@
/* BFD back-end for Intel 386 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -119,6 +119,8 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
here. */
if (howto->pc_relative && howto->pcrel_offset)
diff = -(1 << howto->size);
+ else if (symbol->flags & BSF_WEAK)
+ diff = reloc_entry->addend - symbol->value;
else
diff = -reloc_entry->addend;
}
@@ -234,7 +236,24 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (010),
EMPTY_HOWTO (011),
EMPTY_HOWTO (012),
+#ifdef COFF_WITH_PE
+ /* 32-bit longword section relative relocation (013). */
+ HOWTO (R_SECREL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ coff_i386_reloc, /* special_function */
+ "secrel32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+#else
EMPTY_HOWTO (013),
+#endif
EMPTY_HOWTO (014),
EMPTY_HOWTO (015),
EMPTY_HOWTO (016),
@@ -497,6 +516,30 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
{
*addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
}
+
+ if (rel->r_type == R_SECREL32)
+ {
+ 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;
@@ -525,6 +568,10 @@ coff_i386_reloc_type_lookup (abfd, code)
return howto_table + R_RELBYTE;
case BFD_RELOC_8_PCREL:
return howto_table + R_PCRBYTE;
+#ifdef COFF_WITH_PE
+ case BFD_RELOC_32_SECREL:
+ return howto_table + R_SECREL32;
+#endif
default:
BFD_FAIL ();
return 0;
diff --git a/contrib/binutils/bfd/coff-ia64.c b/contrib/binutils/bfd/coff-ia64.c
index 2b5b557ddbba..1e3b3440f2ef 100644
--- a/contrib/binutils/bfd/coff-ia64.c
+++ b/contrib/binutils/bfd/coff-ia64.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/coff-mips.c b/contrib/binutils/bfd/coff-mips.c
index d6d821842347..34b072c4138e 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
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -19,7 +19,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -57,28 +57,12 @@ static bfd_reloc_status_type mips_reflo_reloc
static bfd_reloc_status_type mips_gprel_reloc
PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
asection *section, bfd *output_bfd, char **error));
-static bfd_reloc_status_type mips_relhi_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
-static bfd_reloc_status_type mips_rello_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
-static bfd_reloc_status_type mips_switch_reloc
- PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, PTR data,
- asection *section, bfd *output_bfd, char **error));
static void mips_relocate_hi
PARAMS ((struct internal_reloc *refhi, struct internal_reloc *reflo,
bfd *input_bfd, asection *input_section, bfd_byte *contents,
- size_t adjust, bfd_vma relocation, bfd_boolean pcrel));
+ bfd_vma relocation));
static bfd_boolean mips_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, PTR));
-static bfd_boolean mips_read_relocs
- PARAMS ((bfd *, asection *));
-static bfd_boolean mips_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean mips_relax_pcrel16
- PARAMS ((struct bfd_link_info *, bfd *, asection *,
- struct ecoff_link_hash_entry *, bfd_byte *, bfd_vma));
static reloc_howto_type *mips_bfd_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
@@ -243,10 +227,9 @@ static reloc_howto_type mips_howto_table[] =
EMPTY_HOWTO (10),
EMPTY_HOWTO (11),
- /* This reloc is a Cygnus extension used when generating position
- independent code for embedded systems. It represents a 16 bit PC
- relative reloc rightshifted twice as used in the MIPS branch
- instructions. */
+ /* FIXME: This relocation is used (internally only) to represent branches
+ when assembling. It should never appear in output files, and
+ be removed. (It used to be used for embedded-PIC support.) */
HOWTO (MIPS_R_PCREL16, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -260,92 +243,10 @@ static reloc_howto_type mips_howto_table[] =
0xffff, /* src_mask */
0xffff, /* dst_mask */
TRUE), /* pcrel_offset */
-
- /* This reloc is a Cygnus extension used when generating position
- independent code for embedded systems. It represents the high 16
- bits of a PC relative reloc. The next reloc must be
- MIPS_R_RELLO, and the addend is formed from the addends of the
- two instructions, just as in MIPS_R_REFHI and MIPS_R_REFLO. The
- final value is actually PC relative to the location of the
- MIPS_R_RELLO reloc, not the MIPS_R_RELHI reloc. */
- HOWTO (MIPS_R_RELHI, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- mips_relhi_reloc, /* special_function */
- "RELHI", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* This reloc is a Cygnus extension used when generating position
- independent code for embedded systems. It represents the low 16
- bits of a PC relative reloc. */
- HOWTO (MIPS_R_RELLO, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- mips_rello_reloc, /* special_function */
- "RELLO", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- EMPTY_HOWTO (15),
- EMPTY_HOWTO (16),
- EMPTY_HOWTO (17),
- EMPTY_HOWTO (18),
- EMPTY_HOWTO (19),
- EMPTY_HOWTO (20),
- EMPTY_HOWTO (21),
-
- /* This reloc is a Cygnus extension used when generating position
- independent code for embedded systems. It represents an entry in
- a switch table, which is the difference between two symbols in
- the .text section. The symndx is actually the offset from the
- reloc address to the subtrahend. See include/coff/mips.h for
- more details. */
- HOWTO (MIPS_R_SWITCH, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- mips_switch_reloc, /* special_function */
- "SWITCH", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- TRUE) /* pcrel_offset */
};
#define MIPS_HOWTO_COUNT \
(sizeof mips_howto_table / sizeof mips_howto_table[0])
-
-/* When the linker is doing relaxing, it may change an external PCREL16
- reloc. This typically represents an instruction like
- bal foo
- We change it to
- .set noreorder
- bal $L1
- lui $at,%hi(foo - $L1)
- $L1:
- addiu $at,%lo(foo - $L1)
- addu $at,$at,$31
- jalr $at
- PCREL16_EXPANSION_ADJUSTMENT is the number of bytes this changes the
- instruction by. */
-
-#define PCREL16_EXPANSION_ADJUSTMENT (4 * 4)
/* See whether the magic number matches. */
@@ -418,25 +319,6 @@ mips_ecoff_swap_reloc_in (abfd, ext_ptr, intern)
<< RELOC_BITS3_TYPEHI_SH_LITTLE));
intern->r_extern = (ext->r_bits[3] & RELOC_BITS3_EXTERN_LITTLE) != 0;
}
-
- /* If this is a MIPS_R_SWITCH reloc, or an internal MIPS_R_RELHI or
- MIPS_R_RELLO reloc, r_symndx is actually the offset from the
- reloc address to the base of the difference (see
- include/coff/mips.h for more details). We copy symndx into the
- r_offset field so as not to confuse ecoff_slurp_reloc_table in
- ecoff.c. In adjust_reloc_in we then copy r_offset into the reloc
- addend. */
- if (intern->r_type == MIPS_R_SWITCH
- || (! intern->r_extern
- && (intern->r_type == MIPS_R_RELLO
- || intern->r_type == MIPS_R_RELHI)))
- {
- BFD_ASSERT (! intern->r_extern);
- intern->r_offset = intern->r_symndx;
- if (intern->r_offset & 0x800000)
- intern->r_offset -= 0x1000000;
- intern->r_symndx = RELOC_SECTION_TEXT;
- }
}
/* Swap a reloc out. */
@@ -453,20 +335,7 @@ mips_ecoff_swap_reloc_out (abfd, intern, dst)
BFD_ASSERT (intern->r_extern
|| (intern->r_symndx >= 0 && intern->r_symndx <= 12));
- /* If this is a MIPS_R_SWITCH reloc, or an internal MIPS_R_RELLO or
- MIPS_R_RELHI reloc, we actually want to write the contents of
- r_offset out as the symbol index. This undoes the change made by
- mips_ecoff_swap_reloc_in. */
- if (intern->r_type != MIPS_R_SWITCH
- && (intern->r_extern
- || (intern->r_type != MIPS_R_RELHI
- && intern->r_type != MIPS_R_RELLO)))
- r_symndx = intern->r_symndx;
- else
- {
- BFD_ASSERT (intern->r_symndx == RELOC_SECTION_TEXT);
- r_symndx = intern->r_offset & 0xffffff;
- }
+ r_symndx = intern->r_symndx;
H_PUT_32 (abfd, intern->r_vaddr, ext->r_vaddr);
if (bfd_header_big_endian (abfd))
@@ -501,7 +370,7 @@ mips_adjust_reloc_in (abfd, intern, rptr)
const struct internal_reloc *intern;
arelent *rptr;
{
- if (intern->r_type > MIPS_R_SWITCH)
+ if (intern->r_type > MIPS_R_PCREL16)
abort ();
if (! intern->r_extern
@@ -514,18 +383,6 @@ mips_adjust_reloc_in (abfd, intern, rptr)
if (intern->r_type == MIPS_R_IGNORE)
rptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
- /* If this is a MIPS_R_SWITCH reloc, or an internal MIPS_R_RELHI or
- MIPS_R_RELLO reloc, we want the addend field of the BFD relocto
- hold the value which was originally in the symndx field of the
- internal MIPS ECOFF reloc. This value was copied into
- intern->r_offset by mips_swap_reloc_in, and here we copy it into
- the addend field. */
- if (intern->r_type == MIPS_R_SWITCH
- || (! intern->r_extern
- && (intern->r_type == MIPS_R_RELHI
- || intern->r_type == MIPS_R_RELLO)))
- rptr->addend = intern->r_offset;
-
rptr->howto = &mips_howto_table[intern->r_type];
}
@@ -535,19 +392,9 @@ mips_adjust_reloc_in (abfd, intern, rptr)
static void
mips_adjust_reloc_out (abfd, rel, intern)
bfd *abfd ATTRIBUTE_UNUSED;
- const arelent *rel;
- struct internal_reloc *intern;
+ const arelent *rel ATTRIBUTE_UNUSED;
+ struct internal_reloc *intern ATTRIBUTE_UNUSED;
{
- /* For a MIPS_R_SWITCH reloc, or an internal MIPS_R_RELHI or
- MIPS_R_RELLO reloc, we must copy rel->addend into
- intern->r_offset. This will then be written out as the symbol
- index by mips_ecoff_swap_reloc_out. This operation parallels the
- action of mips_adjust_reloc_in. */
- if (intern->r_type == MIPS_R_SWITCH
- || (! intern->r_extern
- && (intern->r_type == MIPS_R_RELHI
- || intern->r_type == MIPS_R_RELLO)))
- intern->r_offset = rel->addend;
}
/* ECOFF relocs are either against external symbols, or against
@@ -652,7 +499,7 @@ mips_refhi_reloc (abfd,
relocation += symbol->section->output_offset;
relocation += reloc_entry->addend;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Save the information, and let REFLO do the actual relocation. */
@@ -850,7 +697,7 @@ mips_gprel_reloc (abfd,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
@@ -880,209 +727,6 @@ mips_gprel_reloc (abfd,
return bfd_reloc_ok;
}
-/* Do a RELHI relocation. We do this in conjunction with a RELLO
- reloc, just as REFHI and REFLO are done together. RELHI and RELLO
- are Cygnus extensions used when generating position independent
- code for embedded systems. */
-
-/* FIXME: This should not be a static variable. */
-
-static struct mips_hi *mips_relhi_list;
-
-static bfd_reloc_status_type
-mips_relhi_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- bfd_reloc_status_type ret;
- bfd_vma relocation;
- struct mips_hi *n;
-
- /* If this is a reloc against a section symbol, then it is correct
- in the object file. The only time we want to change this case is
- when we are relaxing, and that is handled entirely by
- mips_relocate_section and never calls this function. */
- if ((symbol->flags & BSF_SECTION_SYM) != 0)
- {
- if (output_bfd != (bfd *) NULL)
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* This is an external symbol. If we're relocating, we don't want
- to change anything. */
- if (output_bfd != (bfd *) NULL)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- ret = bfd_reloc_ok;
- if (bfd_is_und_section (symbol->section)
- && output_bfd == (bfd *) NULL)
- ret = bfd_reloc_undefined;
-
- if (bfd_is_com_section (symbol->section))
- relocation = 0;
- else
- relocation = symbol->value;
-
- relocation += symbol->section->output_section->vma;
- relocation += symbol->section->output_offset;
- relocation += reloc_entry->addend;
-
- if (reloc_entry->address > input_section->_cooked_size)
- return bfd_reloc_outofrange;
-
- /* Save the information, and let RELLO do the actual relocation. */
- n = (struct mips_hi *) bfd_malloc ((bfd_size_type) sizeof *n);
- if (n == NULL)
- return bfd_reloc_outofrange;
- n->addr = (bfd_byte *) data + reloc_entry->address;
- n->addend = relocation;
- n->next = mips_relhi_list;
- mips_relhi_list = n;
-
- if (output_bfd != (bfd *) NULL)
- reloc_entry->address += input_section->output_offset;
-
- return ret;
-}
-
-/* Do a RELLO relocation. This is a straightforward 16 bit PC
- relative relocation; this function exists in order to do the RELHI
- relocation described above. */
-
-static bfd_reloc_status_type
-mips_rello_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
-{
- if (mips_relhi_list != NULL)
- {
- struct mips_hi *l;
-
- l = mips_relhi_list;
- while (l != NULL)
- {
- unsigned long insn;
- unsigned long val;
- unsigned long vallo;
- struct mips_hi *next;
-
- /* Do the RELHI relocation. Note that we actually don't
- need to know anything about the RELLO itself, except
- where to find the low 16 bits of the addend needed by the
- RELHI. */
- insn = bfd_get_32 (abfd, l->addr);
- vallo = (bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address)
- & 0xffff);
- val = ((insn & 0xffff) << 16) + vallo;
- val += l->addend;
-
- /* If the symbol is defined, make val PC relative. If the
- symbol is not defined we don't want to do this, because
- we don't want the value in the object file to incorporate
- the address of the reloc. */
- if (! bfd_is_und_section (bfd_get_section (symbol))
- && ! bfd_is_com_section (bfd_get_section (symbol)))
- val -= (input_section->output_section->vma
- + input_section->output_offset
- + reloc_entry->address);
-
- /* The low order 16 bits are always treated as a signed
- value. Therefore, a negative value in the low order bits
- requires an adjustment in the high order bits. We need
- to make this adjustment in two ways: once for the bits we
- took from the data, and once for the bits we are putting
- back in to the data. */
- if ((vallo & 0x8000) != 0)
- val -= 0x10000;
- if ((val & 0x8000) != 0)
- val += 0x10000;
-
- insn = (insn &~ (unsigned) 0xffff) | ((val >> 16) & 0xffff);
- bfd_put_32 (abfd, (bfd_vma) insn, l->addr);
-
- next = l->next;
- free (l);
- l = next;
- }
-
- mips_relhi_list = NULL;
- }
-
- /* If this is a reloc against a section symbol, then it is correct
- in the object file. The only time we want to change this case is
- when we are relaxing, and that is handled entirely by
- mips_relocate_section and never calls this function. */
- if ((symbol->flags & BSF_SECTION_SYM) != 0)
- {
- if (output_bfd != (bfd *) NULL)
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* bfd_perform_relocation does not handle pcrel_offset relocations
- correctly when generating a relocatable file, so handle them
- directly here. */
- if (output_bfd != (bfd *) NULL)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* Now do the RELLO reloc in the usual way. */
- return mips_generic_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
-}
-
-/* This is the special function for the MIPS_R_SWITCH reloc. This
- special reloc is normally correct in the object file, and only
- requires special handling when relaxing. We don't want
- bfd_perform_relocation to tamper with it at all. */
-
-static bfd_reloc_status_type
-mips_switch_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
-{
- return bfd_reloc_ok;
-}
-
/* Get the howto structure for a generic reloc type. */
static reloc_howto_type *
@@ -1119,15 +763,6 @@ mips_bfd_reloc_type_lookup (abfd, code)
case BFD_RELOC_16_PCREL_S2:
mips_type = MIPS_R_PCREL16;
break;
- case BFD_RELOC_PCREL_HI16_S:
- mips_type = MIPS_R_RELHI;
- break;
- case BFD_RELOC_PCREL_LO16:
- mips_type = MIPS_R_RELLO;
- break;
- case BFD_RELOC_GPREL32:
- mips_type = MIPS_R_SWITCH;
- break;
default:
return (reloc_howto_type *) NULL;
}
@@ -1136,21 +771,19 @@ mips_bfd_reloc_type_lookup (abfd, code)
}
/* A helper routine for mips_relocate_section which handles the REFHI
- and RELHI relocations. The REFHI relocation must be followed by a
- REFLO relocation (and RELHI by a RELLO), and the addend used is
- formed from the addends of both instructions. */
+ relocations. The REFHI relocation must be followed by a REFLO
+ relocation, and the addend used is formed from the addends of both
+ instructions. */
static void
-mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
- relocation, pcrel)
+mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents,
+ relocation)
struct internal_reloc *refhi;
struct internal_reloc *reflo;
bfd *input_bfd;
asection *input_section;
bfd_byte *contents;
- size_t adjust;
bfd_vma relocation;
- bfd_boolean pcrel;
{
unsigned long insn;
unsigned long val;
@@ -1160,12 +793,12 @@ mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
return;
insn = bfd_get_32 (input_bfd,
- contents + adjust + refhi->r_vaddr - input_section->vma);
+ contents + refhi->r_vaddr - input_section->vma);
if (reflo == NULL)
vallo = 0;
else
vallo = (bfd_get_32 (input_bfd,
- contents + adjust + reflo->r_vaddr - input_section->vma)
+ contents + reflo->r_vaddr - input_section->vma)
& 0xffff);
val = ((insn & 0xffff) << 16) + vallo;
@@ -1179,17 +812,12 @@ mips_relocate_hi (refhi, reflo, input_bfd, input_section, contents, adjust,
if ((vallo & 0x8000) != 0)
val -= 0x10000;
- if (pcrel)
- val -= (input_section->output_section->vma
- + input_section->output_offset
- + (reflo->r_vaddr - input_section->vma + adjust));
-
if ((val & 0x8000) != 0)
val += 0x10000;
insn = (insn &~ (unsigned) 0xffff) | ((val >> 16) & 0xffff);
bfd_put_32 (input_bfd, (bfd_vma) insn,
- contents + adjust + refhi->r_vaddr - input_section->vma);
+ contents + refhi->r_vaddr - input_section->vma);
}
/* Relocate a section while linking a MIPS ECOFF file. */
@@ -1208,8 +836,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
struct ecoff_link_hash_entry **sym_hashes;
bfd_vma gp;
bfd_boolean gp_undefined;
- size_t adjust;
- long *offsets;
struct external_reloc *ext_rel;
struct external_reloc *ext_rel_end;
unsigned int i;
@@ -1270,13 +896,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
got_lo = FALSE;
- adjust = 0;
-
- if (ecoff_section_data (input_bfd, input_section) == NULL)
- offsets = NULL;
- else
- offsets = ecoff_section_data (input_bfd, input_section)->offsets;
-
ext_rel = (struct external_reloc *) external_relocs;
ext_rel_end = ext_rel + input_section->reloc_count;
for (i = 0; ext_rel < ext_rel_end; ext_rel++, i++)
@@ -1301,17 +920,15 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (int_rel.r_type
< sizeof mips_howto_table / sizeof mips_howto_table[0]);
- /* The REFHI and RELHI relocs requires special handling. they
- must be followed by a REFLO or RELLO reloc, respectively, and
- the addend is formed from both relocs. */
- if (int_rel.r_type == MIPS_R_REFHI
- || int_rel.r_type == MIPS_R_RELHI)
+ /* The REFHI reloc requires special handling. It must be followed
+ by a REFLO reloc, and the addend is formed from both relocs. */
+ if (int_rel.r_type == MIPS_R_REFHI)
{
struct external_reloc *lo_ext_rel;
/* As a GNU extension, permit an arbitrary number of REFHI
- or RELHI relocs before the REFLO or RELLO reloc. This
- permits gcc to emit the HI and LO relocs itself. */
+ relocs before the REFLO reloc. This permits gcc to emit
+ the HI and LO relocs itself. */
for (lo_ext_rel = ext_rel + 1;
lo_ext_rel < ext_rel_end;
lo_ext_rel++)
@@ -1323,10 +940,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (lo_ext_rel < ext_rel_end
- && (lo_int_rel.r_type
- == (int_rel.r_type == MIPS_R_REFHI
- ? MIPS_R_REFLO
- : MIPS_R_RELLO))
+ && lo_int_rel.r_type == MIPS_R_REFLO
&& int_rel.r_extern == lo_int_rel.r_extern
&& int_rel.r_symndx == lo_int_rel.r_symndx)
{
@@ -1338,32 +952,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
howto = &mips_howto_table[int_rel.r_type];
- /* The SWITCH reloc must be handled specially. This reloc is
- marks the location of a difference between two portions of an
- object file. The symbol index does not reference a symbol,
- but is actually the offset from the reloc to the subtrahend
- of the difference. This reloc is correct in the object file,
- and needs no further adjustment, unless we are relaxing. If
- we are relaxing, we may have to add in an offset. Since no
- symbols are involved in this reloc, we handle it completely
- here. */
- if (int_rel.r_type == MIPS_R_SWITCH)
- {
- if (offsets != NULL
- && offsets[i] != 0)
- {
- r = _bfd_relocate_contents (howto, input_bfd,
- (bfd_vma) offsets[i],
- (contents
- + adjust
- + int_rel.r_vaddr
- - input_section->vma));
- BFD_ASSERT (r == bfd_reloc_ok);
- }
-
- continue;
- }
-
if (int_rel.r_extern)
{
h = sym_hashes[int_rel.r_symndx];
@@ -1439,91 +1027,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
- /* If we are relaxing, mips_relax_section may have set
- offsets[i] to some value. A value of 1 means we must expand
- a PC relative branch into a multi-instruction of sequence,
- and any other value is an addend. */
- if (offsets != NULL
- && offsets[i] != 0)
- {
- BFD_ASSERT (! info->relocatable);
- BFD_ASSERT (int_rel.r_type == MIPS_R_PCREL16
- || int_rel.r_type == MIPS_R_RELHI
- || int_rel.r_type == MIPS_R_RELLO);
- if (offsets[i] != 1)
- addend += offsets[i];
- else
- {
- bfd_byte *here;
-
- BFD_ASSERT (int_rel.r_extern
- && int_rel.r_type == MIPS_R_PCREL16);
-
- /* Move the rest of the instructions up. */
- here = (contents
- + adjust
- + int_rel.r_vaddr
- - input_section->vma);
- memmove (here + PCREL16_EXPANSION_ADJUSTMENT, here,
- (size_t) (input_section->_raw_size
- - (int_rel.r_vaddr - input_section->vma)));
-
- /* Generate the new instructions. */
- if (! mips_relax_pcrel16 (info, input_bfd, input_section,
- h, here,
- (input_section->output_section->vma
- + input_section->output_offset
- + (int_rel.r_vaddr
- - input_section->vma)
- + adjust)))
- return FALSE;
-
- /* We must adjust everything else up a notch. */
- adjust += PCREL16_EXPANSION_ADJUSTMENT;
-
- /* mips_relax_pcrel16 handles all the details of this
- relocation. */
- continue;
- }
- }
-
- /* If we are relaxing, and this is a reloc against the .text
- segment, we may need to adjust it if some branches have been
- expanded. The reloc types which are likely to occur in the
- .text section are handled efficiently by mips_relax_section,
- and thus do not need to be handled here. */
- if (ecoff_data (input_bfd)->debug_info.adjust != NULL
- && ! int_rel.r_extern
- && int_rel.r_symndx == RELOC_SECTION_TEXT
- && (strcmp (bfd_get_section_name (input_bfd, input_section),
- ".text") != 0
- || (int_rel.r_type != MIPS_R_PCREL16
- && int_rel.r_type != MIPS_R_SWITCH
- && int_rel.r_type != MIPS_R_RELHI
- && int_rel.r_type != MIPS_R_RELLO)))
- {
- bfd_vma adr;
- struct ecoff_value_adjust *a;
-
- /* We need to get the addend so that we know whether we need
- to adjust the address. */
- BFD_ASSERT (int_rel.r_type == MIPS_R_REFWORD);
-
- adr = bfd_get_32 (input_bfd,
- (contents
- + adjust
- + int_rel.r_vaddr
- - input_section->vma));
-
- for (a = ecoff_data (input_bfd)->debug_info.adjust;
- a != (struct ecoff_value_adjust *) NULL;
- a = a->next)
- {
- if (adr >= a->start && adr < a->end)
- addend += a->adjust;
- }
- }
-
if (info->relocatable)
{
/* We are generating relocatable output, and must convert
@@ -1601,49 +1104,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
currently holds just the addend. We must adjust
by the address to get the right value. */
if (howto->pc_relative)
- {
- relocation -= int_rel.r_vaddr - input_section->vma;
-
- /* If we are converting a RELHI or RELLO reloc
- from being against an external symbol to
- being against a section, we must put a
- special value into the r_offset field. This
- value is the old addend. The r_offset for
- both the RELHI and RELLO relocs are the same,
- and we set both when we see RELHI. */
- if (int_rel.r_type == MIPS_R_RELHI)
- {
- long addhi, addlo;
-
- addhi = bfd_get_32 (input_bfd,
- (contents
- + adjust
- + int_rel.r_vaddr
- - input_section->vma));
- addhi &= 0xffff;
- if (addhi & 0x8000)
- addhi -= 0x10000;
- addhi <<= 16;
-
- if (! use_lo)
- addlo = 0;
- else
- {
- addlo = bfd_get_32 (input_bfd,
- (contents
- + adjust
- + lo_int_rel.r_vaddr
- - input_section->vma));
- addlo &= 0xffff;
- if (addlo & 0x8000)
- addlo -= 0x10000;
-
- lo_int_rel.r_offset = addhi + addlo;
- }
-
- int_rel.r_offset = addhi + addlo;
- }
- }
+ relocation -= int_rel.r_vaddr - input_section->vma;
h = NULL;
}
@@ -1679,14 +1140,8 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
/* Adjust a PC relative relocation by removing the reference
to the original address in the section and including the
- reference to the new address. However, external RELHI
- and RELLO relocs are PC relative, but don't include any
- reference to the address. The addend is merely an
- addend. */
- if (howto->pc_relative
- && (! int_rel.r_extern
- || (int_rel.r_type != MIPS_R_RELHI
- && int_rel.r_type != MIPS_R_RELLO)))
+ reference to the new address. */
+ if (howto->pc_relative)
relocation -= (input_section->output_section->vma
+ input_section->output_offset
- input_section->vma);
@@ -1696,11 +1151,9 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
r = bfd_reloc_ok;
else
{
- if (int_rel.r_type != MIPS_R_REFHI
- && int_rel.r_type != MIPS_R_RELHI)
+ if (int_rel.r_type != MIPS_R_REFHI)
r = _bfd_relocate_contents (howto, input_bfd, relocation,
(contents
- + adjust
+ int_rel.r_vaddr
- input_section->vma));
else
@@ -1708,8 +1161,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
mips_relocate_hi (&int_rel,
use_lo ? &lo_int_rel : NULL,
input_bfd, input_section, contents,
- adjust, relocation,
- int_rel.r_type == MIPS_R_RELHI);
+ relocation);
r = bfd_reloc_ok;
}
}
@@ -1759,32 +1211,24 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
file. Make it look like a pcrel_offset relocation by
adding in the start address. */
if (howto->pc_relative)
- {
- if (int_rel.r_type != MIPS_R_RELHI || ! use_lo)
- relocation += int_rel.r_vaddr + adjust;
- else
- relocation += lo_int_rel.r_vaddr + adjust;
- }
+ relocation += int_rel.r_vaddr;
}
- if (int_rel.r_type != MIPS_R_REFHI
- && int_rel.r_type != MIPS_R_RELHI)
+ if (int_rel.r_type != MIPS_R_REFHI)
r = _bfd_final_link_relocate (howto,
input_bfd,
input_section,
contents,
(int_rel.r_vaddr
- - input_section->vma
- + adjust),
+ - input_section->vma),
relocation,
addend);
else
{
mips_relocate_hi (&int_rel,
use_lo ? &lo_int_rel : NULL,
- input_bfd, input_section, contents, adjust,
- relocation,
- int_rel.r_type == MIPS_R_RELHI);
+ input_bfd, input_section, contents,
+ relocation);
r = bfd_reloc_ok;
}
}
@@ -1801,8 +1245,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
& 0xf0000000)
!= ((input_section->output_section->vma
+ input_section->output_offset
- + (int_rel.r_vaddr - input_section->vma)
- + adjust)
+ + (int_rel.r_vaddr - input_section->vma))
& 0xf0000000)))
r = bfd_reloc_overflow;
@@ -1818,12 +1261,12 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
if (int_rel.r_extern)
- name = h->root.root.string;
+ name = NULL;
else
name = bfd_section_name (input_bfd, s);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section,
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
int_rel.r_vaddr - input_section->vma)))
return FALSE;
}
@@ -1835,621 +1278,6 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
return TRUE;
}
-/* Read in the relocs for a section. */
-
-static bfd_boolean
-mips_read_relocs (abfd, sec)
- bfd *abfd;
- asection *sec;
-{
- struct ecoff_section_tdata *section_tdata;
- bfd_size_type amt;
-
- section_tdata = ecoff_section_data (abfd, sec);
- if (section_tdata == (struct ecoff_section_tdata *) NULL)
- {
- amt = sizeof (struct ecoff_section_tdata);
- sec->used_by_bfd = (PTR) bfd_alloc (abfd, amt);
- if (sec->used_by_bfd == NULL)
- return FALSE;
-
- section_tdata = ecoff_section_data (abfd, sec);
- section_tdata->external_relocs = NULL;
- section_tdata->contents = NULL;
- section_tdata->offsets = NULL;
- }
-
- if (section_tdata->external_relocs == NULL)
- {
- amt = ecoff_backend (abfd)->external_reloc_size;
- amt *= sec->reloc_count;
- section_tdata->external_relocs = (PTR) bfd_alloc (abfd, amt);
- if (section_tdata->external_relocs == NULL && amt != 0)
- return FALSE;
-
- if (bfd_seek (abfd, sec->rel_filepos, SEEK_SET) != 0
- || bfd_bread (section_tdata->external_relocs, amt, abfd) != amt)
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* Relax a section when linking a MIPS ECOFF file. This is used for
- embedded PIC code, which always uses PC relative branches which
- only have an 18 bit range on MIPS. If a branch is not in range, we
- generate a long instruction sequence to compensate. Each time we
- find a branch to expand, we have to check all the others again to
- make sure they are still in range. This is slow, but it only has
- to be done when -relax is passed to the linker.
-
- This routine figures out which branches need to expand; the actual
- expansion is done in mips_relocate_section when the section
- contents are relocated. The information is stored in the offsets
- field of the ecoff_section_tdata structure. An offset of 1 means
- that the branch must be expanded into a multi-instruction PC
- relative branch (such an offset will only occur for a PC relative
- branch to an external symbol). Any other offset must be a multiple
- of four, and is the amount to change the branch by (such an offset
- will only occur for a PC relative branch within the same section).
-
- We do not modify the section relocs or contents themselves so that
- if memory usage becomes an issue we can discard them and read them
- again. The only information we must save in memory between this
- routine and the mips_relocate_section routine is the table of
- offsets. */
-
-static bfd_boolean
-mips_relax_section (abfd, sec, info, again)
- bfd *abfd;
- asection *sec;
- struct bfd_link_info *info;
- bfd_boolean *again;
-{
- struct ecoff_section_tdata *section_tdata;
- bfd_byte *contents = NULL;
- long *offsets;
- struct external_reloc *ext_rel;
- struct external_reloc *ext_rel_end;
- unsigned int i;
-
- /* Assume we are not going to need another pass. */
- *again = FALSE;
-
- /* If we are not generating an ECOFF file, this is much too
- confusing to deal with. */
- if (info->hash->creator->flavour != bfd_get_flavour (abfd))
- return TRUE;
-
- /* If there are no relocs, there is nothing to do. */
- if (sec->reloc_count == 0)
- return TRUE;
-
- /* We are only interested in PC relative relocs, and why would there
- ever be one from anything but the .text section? */
- if (strcmp (bfd_get_section_name (abfd, sec), ".text") != 0)
- return TRUE;
-
- /* Read in the relocs, if we haven't already got them. */
- section_tdata = ecoff_section_data (abfd, sec);
- if (section_tdata == (struct ecoff_section_tdata *) NULL
- || section_tdata->external_relocs == NULL)
- {
- if (! mips_read_relocs (abfd, sec))
- goto error_return;
- section_tdata = ecoff_section_data (abfd, sec);
- }
-
- if (sec->_cooked_size == 0)
- {
- /* We must initialize _cooked_size only the first time we are
- called. */
- sec->_cooked_size = sec->_raw_size;
- }
-
- contents = section_tdata->contents;
- offsets = section_tdata->offsets;
-
- /* Look for any external PC relative relocs. Internal PC relative
- relocs are already correct in the object file, so they certainly
- can not overflow. */
- ext_rel = (struct external_reloc *) section_tdata->external_relocs;
- ext_rel_end = ext_rel + sec->reloc_count;
- for (i = 0; ext_rel < ext_rel_end; ext_rel++, i++)
- {
- struct internal_reloc int_rel;
- struct ecoff_link_hash_entry *h;
- asection *hsec;
- bfd_signed_vma relocation;
- struct external_reloc *adj_ext_rel;
- unsigned int adj_i;
- unsigned long ext_count;
- struct ecoff_link_hash_entry **adj_h_ptr;
- struct ecoff_link_hash_entry **adj_h_ptr_end;
- struct ecoff_value_adjust *adjust;
- bfd_size_type amt;
-
- /* If we have already expanded this reloc, we certainly don't
- need to do it again. */
- if (offsets != (long *) NULL && offsets[i] == 1)
- continue;
-
- /* Quickly check that this reloc is external PCREL16. */
- if (bfd_header_big_endian (abfd))
- {
- if ((ext_rel->r_bits[3] & RELOC_BITS3_EXTERN_BIG) == 0
- || (((ext_rel->r_bits[3] & RELOC_BITS3_TYPE_BIG)
- >> RELOC_BITS3_TYPE_SH_BIG)
- != MIPS_R_PCREL16))
- continue;
- }
- else
- {
- if ((ext_rel->r_bits[3] & RELOC_BITS3_EXTERN_LITTLE) == 0
- || (((ext_rel->r_bits[3] & RELOC_BITS3_TYPE_LITTLE)
- >> RELOC_BITS3_TYPE_SH_LITTLE)
- != MIPS_R_PCREL16))
- continue;
- }
-
- mips_ecoff_swap_reloc_in (abfd, (PTR) ext_rel, &int_rel);
-
- h = ecoff_data (abfd)->sym_hashes[int_rel.r_symndx];
- if (h == (struct ecoff_link_hash_entry *) NULL)
- abort ();
-
- if (h->root.type != bfd_link_hash_defined
- && h->root.type != bfd_link_hash_defweak)
- {
- /* Just ignore undefined symbols. These will presumably
- generate an error later in the link. */
- continue;
- }
-
- /* Get the value of the symbol. */
- hsec = h->root.u.def.section;
- relocation = (h->root.u.def.value
- + hsec->output_section->vma
- + hsec->output_offset);
-
- /* Subtract out the current address. */
- relocation -= (sec->output_section->vma
- + sec->output_offset
- + (int_rel.r_vaddr - sec->vma));
-
- /* The addend is stored in the object file. In the normal case
- of ``bal symbol'', the addend will be -4. It will only be
- different in the case of ``bal symbol+constant''. To avoid
- always reading in the section contents, we don't check the
- addend in the object file (we could easily check the contents
- if we happen to have already read them in, but I fear that
- this could be confusing). This means we will screw up if
- there is a branch to a symbol that is in range, but added to
- a constant which puts it out of range; in such a case the
- link will fail with a reloc overflow error. Since the
- compiler will never generate such code, it should be easy
- enough to work around it by changing the assembly code in the
- source file. */
- relocation -= 4;
-
- /* Now RELOCATION is the number we want to put in the object
- file. See whether it fits. */
- if (relocation >= -0x20000 && relocation < 0x20000)
- continue;
-
- /* Now that we know this reloc needs work, which will rarely
- happen, go ahead and grab the section contents. */
- if (contents == (bfd_byte *) NULL)
- {
- if (info->keep_memory)
- contents = (bfd_byte *) bfd_alloc (abfd, sec->_raw_size);
- else
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == (bfd_byte *) NULL)
- goto error_return;
- if (! bfd_get_section_contents (abfd, sec, (PTR) contents,
- (file_ptr) 0, sec->_raw_size))
- goto error_return;
- if (info->keep_memory)
- section_tdata->contents = contents;
- }
-
- /* We only support changing the bal instruction. It would be
- possible to handle other PC relative branches, but some of
- them (the conditional branches) would require a different
- length instruction sequence which would complicate both this
- routine and mips_relax_pcrel16. It could be written if
- somebody felt it were important. Ignoring this reloc will
- presumably cause a reloc overflow error later on. */
- if (bfd_get_32 (abfd, contents + int_rel.r_vaddr - sec->vma)
- != 0x0411ffff) /* bgezal $0,. == bal . */
- continue;
-
- /* Bother. We need to expand this reloc, and we will need to
- make another relaxation pass since this change may put other
- relocs out of range. We need to examine the local branches
- and we need to allocate memory to hold the offsets we must
- add to them. We also need to adjust the values of all
- symbols in the object file following this location. */
-
- sec->_cooked_size += PCREL16_EXPANSION_ADJUSTMENT;
- *again = TRUE;
-
- if (offsets == (long *) NULL)
- {
- bfd_size_type size;
-
- size = (bfd_size_type) sec->reloc_count * sizeof (long);
- offsets = (long *) bfd_zalloc (abfd, size);
- if (offsets == (long *) NULL)
- goto error_return;
- section_tdata->offsets = offsets;
- }
-
- offsets[i] = 1;
-
- /* Now look for all PC relative references that cross this reloc
- and adjust their offsets. */
- adj_ext_rel = (struct external_reloc *) section_tdata->external_relocs;
- for (adj_i = 0; adj_ext_rel < ext_rel_end; adj_ext_rel++, adj_i++)
- {
- struct internal_reloc adj_int_rel;
- bfd_vma start, stop;
- int change;
-
- mips_ecoff_swap_reloc_in (abfd, (PTR) adj_ext_rel, &adj_int_rel);
-
- if (adj_int_rel.r_type == MIPS_R_PCREL16)
- {
- unsigned long insn;
-
- /* We only care about local references. External ones
- will be relocated correctly anyhow. */
- if (adj_int_rel.r_extern)
- continue;
-
- /* We are only interested in a PC relative reloc within
- this section. FIXME: Cross section PC relative
- relocs may not be handled correctly; does anybody
- care? */
- if (adj_int_rel.r_symndx != RELOC_SECTION_TEXT)
- continue;
-
- start = adj_int_rel.r_vaddr;
-
- insn = bfd_get_32 (abfd,
- contents + adj_int_rel.r_vaddr - sec->vma);
-
- stop = (insn & 0xffff) << 2;
- if ((stop & 0x20000) != 0)
- stop -= 0x40000;
- stop += adj_int_rel.r_vaddr + 4;
- }
- else if (adj_int_rel.r_type == MIPS_R_RELHI)
- {
- struct internal_reloc rello;
- long addhi, addlo;
-
- /* The next reloc must be MIPS_R_RELLO, and we handle
- them together. */
- BFD_ASSERT (adj_ext_rel + 1 < ext_rel_end);
-
- mips_ecoff_swap_reloc_in (abfd, (PTR) (adj_ext_rel + 1), &rello);
-
- BFD_ASSERT (rello.r_type == MIPS_R_RELLO);
-
- addhi = bfd_get_32 (abfd,
- contents + adj_int_rel.r_vaddr - sec->vma);
- addhi &= 0xffff;
- if (addhi & 0x8000)
- addhi -= 0x10000;
- addhi <<= 16;
-
- addlo = bfd_get_32 (abfd, contents + rello.r_vaddr - sec->vma);
- addlo &= 0xffff;
- if (addlo & 0x8000)
- addlo -= 0x10000;
-
- if (adj_int_rel.r_extern)
- {
- /* The value we want here is
- sym - RELLOaddr + addend
- which we can express as
- sym - (RELLOaddr - addend)
- Therefore if we are expanding the area between
- RELLOaddr and RELLOaddr - addend we must adjust
- the addend. This is admittedly ambiguous, since
- we might mean (sym + addend) - RELLOaddr, but in
- practice we don't, and there is no way to handle
- that case correctly since at this point we have
- no idea whether any reloc is being expanded
- between sym and sym + addend. */
- start = rello.r_vaddr - (addhi + addlo);
- stop = rello.r_vaddr;
- }
- else
- {
- /* An internal RELHI/RELLO pair represents the
- difference between two addresses, $LC0 - foo.
- The symndx value is actually the difference
- between the reloc address and $LC0. This lets us
- compute $LC0, and, by considering the addend,
- foo. If the reloc we are expanding falls between
- those two relocs, we must adjust the addend. At
- this point, the symndx value is actually in the
- r_offset field, where it was put by
- mips_ecoff_swap_reloc_in. */
- start = rello.r_vaddr - adj_int_rel.r_offset;
- stop = start + addhi + addlo;
- }
- }
- else if (adj_int_rel.r_type == MIPS_R_SWITCH)
- {
- /* A MIPS_R_SWITCH reloc represents a word of the form
- .word $L3-$LS12
- The value in the object file is correct, assuming the
- original value of $L3. The symndx value is actually
- the difference between the reloc address and $LS12.
- This lets us compute the original value of $LS12 as
- vaddr - symndx
- and the original value of $L3 as
- vaddr - symndx + addend
- where addend is the value from the object file. At
- this point, the symndx value is actually found in the
- r_offset field, since it was moved by
- mips_ecoff_swap_reloc_in. */
- start = adj_int_rel.r_vaddr - adj_int_rel.r_offset;
- stop = start + bfd_get_32 (abfd,
- (contents
- + adj_int_rel.r_vaddr
- - sec->vma));
- }
- else
- continue;
-
- /* If the range expressed by this reloc, which is the
- distance between START and STOP crosses the reloc we are
- expanding, we must adjust the offset. The sign of the
- adjustment depends upon the direction in which the range
- crosses the reloc being expanded. */
- if (start <= int_rel.r_vaddr && stop > int_rel.r_vaddr)
- change = PCREL16_EXPANSION_ADJUSTMENT;
- else if (start > int_rel.r_vaddr && stop <= int_rel.r_vaddr)
- change = - PCREL16_EXPANSION_ADJUSTMENT;
- else
- change = 0;
-
- offsets[adj_i] += change;
-
- if (adj_int_rel.r_type == MIPS_R_RELHI)
- {
- adj_ext_rel++;
- adj_i++;
- offsets[adj_i] += change;
- }
- }
-
- /* Find all symbols in this section defined by this object file
- and adjust their values. Note that we decide whether to
- adjust the value based on the value stored in the ECOFF EXTR
- structure, because the value stored in the hash table may
- have been changed by an earlier expanded reloc and thus may
- no longer correctly indicate whether the symbol is before or
- after the expanded reloc. */
- ext_count = ecoff_data (abfd)->debug_info.symbolic_header.iextMax;
- adj_h_ptr = ecoff_data (abfd)->sym_hashes;
- adj_h_ptr_end = adj_h_ptr + ext_count;
- for (; adj_h_ptr < adj_h_ptr_end; adj_h_ptr++)
- {
- struct ecoff_link_hash_entry *adj_h;
-
- adj_h = *adj_h_ptr;
- if (adj_h != (struct ecoff_link_hash_entry *) NULL
- && (adj_h->root.type == bfd_link_hash_defined
- || adj_h->root.type == bfd_link_hash_defweak)
- && adj_h->root.u.def.section == sec
- && adj_h->esym.asym.value > int_rel.r_vaddr)
- adj_h->root.u.def.value += PCREL16_EXPANSION_ADJUSTMENT;
- }
-
- /* Add an entry to the symbol value adjust list. This is used
- by bfd_ecoff_debug_accumulate to adjust the values of
- internal symbols and FDR's. */
- amt = sizeof (struct ecoff_value_adjust);
- adjust = (struct ecoff_value_adjust *) bfd_alloc (abfd, amt);
- if (adjust == (struct ecoff_value_adjust *) NULL)
- goto error_return;
-
- adjust->start = int_rel.r_vaddr;
- adjust->end = sec->vma + sec->_raw_size;
- adjust->adjust = PCREL16_EXPANSION_ADJUSTMENT;
-
- adjust->next = ecoff_data (abfd)->debug_info.adjust;
- ecoff_data (abfd)->debug_info.adjust = adjust;
- }
-
- if (contents != (bfd_byte *) NULL && ! info->keep_memory)
- free (contents);
-
- return TRUE;
-
- error_return:
- if (contents != (bfd_byte *) NULL && ! info->keep_memory)
- free (contents);
- return FALSE;
-}
-
-/* This routine is called from mips_relocate_section when a PC
- relative reloc must be expanded into the five instruction sequence.
- It handles all the details of the expansion, including resolving
- the reloc. */
-
-static bfd_boolean
-mips_relax_pcrel16 (info, input_bfd, input_section, h, location, address)
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- bfd *input_bfd;
- asection *input_section ATTRIBUTE_UNUSED;
- struct ecoff_link_hash_entry *h;
- bfd_byte *location;
- bfd_vma address;
-{
- bfd_vma relocation;
-
- /* 0x0411ffff is bgezal $0,. == bal . */
- BFD_ASSERT (bfd_get_32 (input_bfd, location) == 0x0411ffff);
-
- /* We need to compute the distance between the symbol and the
- current address plus eight. */
- relocation = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- relocation -= address + 8;
-
- /* If the lower half is negative, increment the upper 16 half. */
- if ((relocation & 0x8000) != 0)
- relocation += 0x10000;
-
- bfd_put_32 (input_bfd, (bfd_vma) 0x04110001, location); /* bal .+8 */
- bfd_put_32 (input_bfd,
- 0x3c010000 | ((relocation >> 16) & 0xffff), /* lui $at,XX */
- location + 4);
- bfd_put_32 (input_bfd,
- 0x24210000 | (relocation & 0xffff), /* addiu $at,$at,XX */
- location + 8);
- bfd_put_32 (input_bfd,
- (bfd_vma) 0x003f0821, location + 12); /* addu $at,$at,$ra */
- bfd_put_32 (input_bfd,
- (bfd_vma) 0x0020f809, location + 16); /* jalr $at */
-
- return TRUE;
-}
-
-/* Given a .sdata section and a .rel.sdata in-memory section, store
- relocation information into the .rel.sdata section which can be
- used at runtime to relocate the section. This is called by the
- linker when the --embedded-relocs switch is used. This is called
- after the add_symbols entry point has been called for all the
- objects, and before the final_link entry point is called. This
- function presumes that the object was compiled using
- -membedded-pic. */
-
-bfd_boolean
-bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *datasec;
- asection *relsec;
- char **errmsg;
-{
- struct ecoff_link_hash_entry **sym_hashes;
- struct ecoff_section_tdata *section_tdata;
- struct external_reloc *ext_rel;
- struct external_reloc *ext_rel_end;
- bfd_byte *p;
- bfd_size_type amt;
-
- BFD_ASSERT (! info->relocatable);
-
- *errmsg = NULL;
-
- if (datasec->reloc_count == 0)
- return TRUE;
-
- sym_hashes = ecoff_data (abfd)->sym_hashes;
-
- if (! mips_read_relocs (abfd, datasec))
- return FALSE;
-
- amt = (bfd_size_type) datasec->reloc_count * 4;
- relsec->contents = (bfd_byte *) bfd_alloc (abfd, amt);
- if (relsec->contents == NULL)
- return FALSE;
-
- p = relsec->contents;
-
- section_tdata = ecoff_section_data (abfd, datasec);
- ext_rel = (struct external_reloc *) section_tdata->external_relocs;
- ext_rel_end = ext_rel + datasec->reloc_count;
- for (; ext_rel < ext_rel_end; ext_rel++, p += 4)
- {
- struct internal_reloc int_rel;
- bfd_boolean text_relative;
-
- mips_ecoff_swap_reloc_in (abfd, (PTR) ext_rel, &int_rel);
-
- /* We are going to write a four byte word into the runtime reloc
- section. The word will be the address in the data section
- which must be relocated. This must be on a word boundary,
- which means the lower two bits must be zero. We use the
- least significant bit to indicate how the value in the data
- section must be relocated. A 0 means that the value is
- relative to the text section, while a 1 indicates that the
- value is relative to the data section. Given that we are
- assuming the code was compiled using -membedded-pic, there
- should not be any other possibilities. */
-
- /* We can only relocate REFWORD relocs at run time. */
- if (int_rel.r_type != MIPS_R_REFWORD)
- {
- *errmsg = _("unsupported reloc type");
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- if (int_rel.r_extern)
- {
- struct ecoff_link_hash_entry *h;
-
- h = sym_hashes[int_rel.r_symndx];
- /* If h is NULL, that means that there is a reloc against an
- external symbol which we thought was just a debugging
- symbol. This should not happen. */
- if (h == (struct ecoff_link_hash_entry *) NULL)
- abort ();
- if ((h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && (h->root.u.def.section->flags & SEC_CODE) != 0)
- text_relative = TRUE;
- else
- text_relative = FALSE;
- }
- else
- {
- switch (int_rel.r_symndx)
- {
- case RELOC_SECTION_TEXT:
- text_relative = TRUE;
- break;
- case RELOC_SECTION_SDATA:
- case RELOC_SECTION_SBSS:
- case RELOC_SECTION_LIT8:
- text_relative = FALSE;
- break;
- default:
- /* No other sections should appear in -membedded-pic
- code. */
- *errmsg = _("reloc against unsupported section");
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- }
-
- if ((int_rel.r_offset & 3) != 0)
- {
- *errmsg = _("reloc not properly aligned");
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- bfd_put_32 (abfd,
- (int_rel.r_vaddr - datasec->vma + datasec->output_offset
- + (text_relative ? 0 : 1)),
- p);
- }
-
- return TRUE;
-}
-
/* This is the ECOFF backend structure. The backend field of the
target vector points to this. */
@@ -2557,7 +1385,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
_bfd_generic_get_section_contents_in_window
/* Relaxing sections is MIPS specific. */
-#define _bfd_ecoff_bfd_relax_section mips_relax_section
+#define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
/* GC of sections is not done. */
#define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
@@ -2565,7 +1393,10 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
/* Merging of sections is not done. */
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
+#define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
+#define _bfd_ecoff_section_already_linked \
+ _bfd_generic_section_already_linked
extern const bfd_target ecoff_big_vec;
diff --git a/contrib/binutils/bfd/coff-ppc.c b/contrib/binutils/bfd/coff-ppc.c
index c1c2c32a178b..b4427936933a 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
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Original version pieced together by Kim Knuttila (krk@cygnus.com)
@@ -23,8 +23,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, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* Current State:
- objdump works
@@ -127,11 +127,6 @@ struct ppc_coff_link_hash_table
static struct bfd_hash_entry *ppc_coff_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
const char *));
-static bfd_boolean ppc_coff_link_hash_table_init
- PARAMS ((struct ppc_coff_link_hash_table *, bfd *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *)));
static struct bfd_link_hash_table *ppc_coff_link_hash_table_create
PARAMS ((bfd *));
static bfd_boolean coff_ppc_relocate_section
@@ -184,14 +179,14 @@ ppc_coff_link_hash_newfunc (entry, table, string)
/* Initialize a PE linker hash table. */
static bfd_boolean
-ppc_coff_link_hash_table_init (table, abfd, newfunc)
- struct ppc_coff_link_hash_table *table;
- bfd *abfd;
- struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *));
+ppc_coff_link_hash_table_init (struct ppc_coff_link_hash_table *table,
+ bfd *abfd,
+ struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *),
+ unsigned int entsize)
{
- return _bfd_coff_link_hash_table_init (&table->root, abfd, newfunc);
+ return _bfd_coff_link_hash_table_init (&table->root, abfd, newfunc, entsize);
}
/* Create a PE linker hash table. */
@@ -206,8 +201,9 @@ ppc_coff_link_hash_table_create (abfd)
ret = (struct ppc_coff_link_hash_table *) bfd_malloc (amt);
if (ret == NULL)
return NULL;
- if (! ppc_coff_link_hash_table_init (ret, abfd,
- ppc_coff_link_hash_newfunc))
+ if (!ppc_coff_link_hash_table_init (ret, abfd,
+ ppc_coff_link_hash_newfunc,
+ sizeof (struct ppc_coff_link_hash_entry)))
{
free (ret);
return (struct bfd_link_hash_table *) NULL;
@@ -326,15 +322,6 @@ static bfd_reloc_status_type ppc_refhi_reloc PARAMS ((bfd *abfd,
asection *section,
bfd *output_bfd,
char **error));
-#if 0
-static bfd_reloc_status_type ppc_reflo_reloc PARAMS ((bfd *abfd,
- arelent *reloc,
- asymbol *symbol,
- PTR data,
- asection *section,
- bfd *output_bfd,
- char **error));
-#endif
static bfd_reloc_status_type ppc_pair_reloc PARAMS ((bfd *abfd,
arelent *reloc,
asymbol *symbol,
@@ -351,15 +338,6 @@ static bfd_reloc_status_type ppc_toc16_reloc PARAMS ((bfd *abfd,
bfd *output_bfd,
char **error));
-#if 0
-static bfd_reloc_status_type ppc_addr32nb_reloc PARAMS ((bfd *abfd,
- arelent *reloc,
- asymbol *symbol,
- PTR data,
- asection *section,
- bfd *output_bfd,
- char **error));
-#endif
static bfd_reloc_status_type ppc_section_reloc PARAMS ((bfd *abfd,
arelent *reloc,
asymbol *symbol,
@@ -1005,67 +983,6 @@ static bfd_boolean in_reloc_p(abfd, howto)
&& (howto->type != IMAGE_REL_PPC_TOCREL16_DEFN) ;
}
-#if 0
-
-/* This function is in charge of performing all the ppc PE relocations
- Don't yet know if we want to do this this particular way ... (krk). */
-/* FIXME: (it is not yet enabled). */
-
-static bfd_reloc_status_type
-pe_ppc_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol_in;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
-{
- /* The consth relocation comes in two parts, we have to remember
- the state between calls, in these variables. */
- static bfd_boolean part1_consth_active = FALSE;
- static unsigned long part1_consth_value;
-
- unsigned long sym_value;
- unsigned short r_type;
- unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/
-
- r_type = reloc_entry->howto->type;
-
- if (output_bfd)
- {
- /* Partial linking - do nothing. */
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- if (symbol_in != NULL
- && bfd_is_und_section (symbol_in->section))
- {
- /* Keep the state machine happy in case we're called again. */
- if (r_type == IMAGE_REL_PPC_REFHI)
- {
- part1_consth_active = TRUE;
- part1_consth_value = 0;
- }
- return(bfd_reloc_undefined);
- }
-
- if ((part1_consth_active) && (r_type != IMAGE_REL_PPC_PAIR))
- {
- part1_consth_active = FALSE;
- *error_message = (char *) _("Missing PAIR");
- return(bfd_reloc_dangerous);
- }
-
- sym_value = get_symbol_value(symbol_in);
-
- return(bfd_reloc_ok);
-}
-
-#endif /* 0 */
-
/* The reloc processing routine for the optimized COFF linker. */
static bfd_boolean
@@ -1188,8 +1105,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
{
default:
(*_bfd_error_handler)
- (_("%s: unsupported relocation type 0x%02x"),
- bfd_archive_filename (input_bfd), r_type);
+ (_("%B: unsupported relocation type 0x%02x"), input_bfd, r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
case IMAGE_REL_PPC_TOCREL16:
@@ -1278,8 +1194,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if ((bfd_vma) our_toc_offset >= 65535)
{
(*_bfd_error_handler)
- (_("%s: Relocation for %s of %lx exceeds Toc size limit"),
- bfd_archive_filename (input_bfd), name,
+ (_("%B: Relocation for %s of %lx exceeds Toc size limit"),
+ input_bfd, name,
(unsigned long) our_toc_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -1330,12 +1246,11 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
/* FIXME: this test is conservative. */
if ((r_flags & IMAGE_REL_PPC_TOCDEFN) != IMAGE_REL_PPC_TOCDEFN
- && (bfd_vma) our_toc_offset > toc_section->_raw_size)
+ && (bfd_vma) our_toc_offset > toc_section->size)
{
(*_bfd_error_handler)
- (_("%s: Relocation exceeds allocated TOC (%lx)"),
- bfd_archive_filename (input_bfd),
- (unsigned long) toc_section->_raw_size);
+ (_("%B: Relocation exceeds allocated TOC (%lx)"),
+ input_bfd, (unsigned long) toc_section->size);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1387,15 +1302,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
else
my_name = h->root.root.root.string;
- fprintf (stderr,
- _("Warning: unsupported reloc %s <file %s, section %s>\n"),
- howto->name,
- bfd_archive_filename(input_bfd),
- input_section->name);
-
- fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
- rel->r_symndx, my_name, (long) rel->r_vaddr,
- (unsigned long) rel->r_vaddr);
+ (*_bfd_error_handler)
+ (_("Warning: unsupported reloc %s <file %B, section %A>\n"
+ "sym %ld (%s), r_vaddr %ld (%lx)"),
+ input_bfd, input_section, howto->name,
+ rel->r_symndx, my_name, (long) rel->r_vaddr,
+ (unsigned long) rel->r_vaddr);
}
break;
case IMAGE_REL_PPC_IMGLUE:
@@ -1409,8 +1321,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
my_name = h->root.root.root.string;
(*_bfd_error_handler)
- (_("%s: Out of order IMGLUE reloc for %s"),
- bfd_archive_filename (input_bfd), my_name);
+ (_("%B: Out of order IMGLUE reloc for %s"), input_bfd, my_name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1569,7 +1480,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.root.string;
+ name = NULL;
else if (sym == NULL)
name = "*unknown*";
else if (sym->_n._n_n._n_zeroes == 0
@@ -1583,7 +1494,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name,
+ (info, (h ? &h->root.root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return FALSE;
@@ -1690,7 +1601,7 @@ ppc_allocate_toc_section (info)
foo = (bfd_byte *) bfd_alloc (bfd_of_toc_owner, amt);
memset(foo, test_char, (size_t) global_toc_size);
- s->_raw_size = s->_cooked_size = global_toc_size;
+ s->size = global_toc_size;
s->contents = foo;
return TRUE;
@@ -1779,30 +1690,6 @@ ppc_refhi_reloc (abfd, reloc_entry, symbol, data,
return bfd_reloc_undefined;
}
-#if 0
-
-static bfd_reloc_status_type
-ppc_reflo_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
-{
- UN_IMPL("REFLO");
- DUMP_RELOC("REFLO",reloc_entry);
-
- if (output_bfd == (bfd *) NULL)
- return bfd_reloc_continue;
-
- return bfd_reloc_undefined;
-}
-
-#endif
-
static bfd_reloc_status_type
ppc_pair_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message)
@@ -1843,31 +1730,6 @@ ppc_toc16_reloc (abfd, reloc_entry, symbol, data,
return bfd_reloc_ok;
}
-#if 0
-
-/* ADDR32NB : 32 bit address relative to the virtual origin.
- (On the alpha, this is always a linker generated thunk)
- (i.e. 32bit addr relative to the image base). */
-
-static bfd_reloc_status_type
-ppc_addr32nb_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
-{
- UN_IMPL("ADDR32NB");
- DUMP_RELOC("ADDR32NB",reloc_entry);
-
- return bfd_reloc_ok;
-}
-
-#endif
-
static bfd_reloc_status_type
ppc_secrel_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message)
@@ -2114,10 +1976,6 @@ ppc_coff_reloc_type_lookup (abfd, code)
#define coff_bfd_final_link ppc_bfd_coff_final_link
#ifndef COFF_IMAGE_WITH_PE
-/* FIXME: This no longer works. */
-#if 0
-#define coff_swap_sym_in_hook ppc_coff_swap_sym_in_hook
-#endif
#endif
#define SELECT_RELOC(internal, howto) {internal.r_type=howto->type;}
@@ -2146,62 +2004,6 @@ ppc_coff_reloc_type_lookup (abfd, code)
#include "coffcode.h"
#ifndef COFF_IMAGE_WITH_PE
-/* FIXME: This no longer works. */
-#if 0
-/* FIXME:
- What we're trying to do here is allocate a toc section (early), and attach
- it to the last bfd to be processed. This avoids the problem of having a toc
- written out before all files have been processed. This code allocates
- a toc section for every file, and records the last one seen. There are
- at least two problems with this approach:
- 1. We allocate whole bunches of toc sections that are ignored, but at
- at least we will not allocate a toc if no .toc is present.
- 2. It's not clear to me that being the last bfd read necessarily means
- that you are the last bfd closed.
- 3. Doing it on a "swap in" hook depends on when the "swap in" is called,
- and how often, etc. It's not clear to me that there isn't a hole here. */
-static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
-
-static void
-ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
- bfd *abfd;
- PTR ext1 ATTRIBUTE_UNUSED;
- PTR in1;
-{
- struct internal_syment * in = (struct internal_syment *)in1;
-
- if (bfd_of_toc_owner != 0) /* We already have a toc, so go home. */
- return;
-
- if (strcmp (in->_n._n_name, ".toc") == 0)
- {
- flagword flags;
- register asection *s;
-
- s = bfd_get_section_by_name (abfd, TOC_SECTION_NAME);
- if (s != NULL)
- return;
-
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY ;
-
- s = bfd_make_section (abfd, TOC_SECTION_NAME);
-
- if (s == NULL
- || !bfd_set_section_flags (abfd, s, flags)
- || !bfd_set_section_alignment (abfd, s, 2))
- /* FIXME: set appropriate bfd error. */
- abort ();
-
- /* Save the bfd for later allocation. */
- bfd_of_toc_owner = abfd;
- }
-
- return;
-}
-#endif
-#endif
-
-#ifndef COFF_IMAGE_WITH_PE
static bfd_boolean ppc_do_last PARAMS ((bfd *));
static bfd *ppc_get_last PARAMS ((void));
@@ -2307,7 +2109,7 @@ ppc_bfd_coff_final_link (abfd, info)
o->reloc_count = 0;
o->lineno_count = 0;
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
if (p->type == bfd_indirect_link_order)
{
@@ -2328,8 +2130,10 @@ ppc_bfd_coff_final_link (abfd, info)
if (info->relocatable)
o->reloc_count += sec->reloc_count;
- if (sec->_raw_size > max_contents_size)
- max_contents_size = sec->_raw_size;
+ if (sec->rawsize > max_contents_size)
+ max_contents_size = sec->rawsize;
+ if (sec->size > max_contents_size)
+ max_contents_size = sec->size;
if (sec->lineno_count > max_lineno_count)
max_lineno_count = sec->lineno_count;
if (sec->reloc_count > max_reloc_count)
@@ -2487,7 +2291,7 @@ ppc_bfd_coff_final_link (abfd, info)
for (o = abfd->sections; o != NULL; o = o->next)
{
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
if (p->type == bfd_indirect_link_order
&& (bfd_get_flavour (p->u.indirect.section->owner)
@@ -2663,7 +2467,7 @@ ppc_bfd_coff_final_link (abfd, info)
}
/* If we have optimized stabs strings, output them. */
- if (coff_hash_table (info)->stab_info != NULL)
+ if (coff_hash_table (info)->stab_info.stabstr != NULL)
{
if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info))
return FALSE;
diff --git a/contrib/binutils/bfd/coff-rs6000.c b/contrib/binutils/bfd/coff-rs6000.c
index 56e34e2d7201..951587f99b1e 100644
--- a/contrib/binutils/bfd/coff-rs6000.c
+++ b/contrib/binutils/bfd/coff-rs6000.c
@@ -1,5 +1,5 @@
/* BFD back-end for IBM RS/6000 "XCOFF" files.
- Copyright 1990-1999, 2000, 2001, 2002, 2003
+ Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
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
@@ -24,7 +24,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -180,7 +180,7 @@ static bfd_boolean do_pad
static bfd_boolean do_copy
PARAMS ((bfd *, bfd *));
static bfd_boolean do_shared_object_padding
- PARAMS ((bfd *, bfd *, ufile_ptr *, int));
+ PARAMS ((bfd *, bfd *, file_ptr *, int));
/* Relocation functions */
static bfd_boolean xcoff_reloc_type_br
@@ -1294,10 +1294,12 @@ _bfd_xcoff_archive_p (abfd)
if (bfd_ardata (abfd) == (struct artdata *) NULL)
goto error_ret_restore;
- bfd_ardata (abfd)->cache = NULL;
- bfd_ardata (abfd)->archive_head = NULL;
- bfd_ardata (abfd)->symdefs = NULL;
- bfd_ardata (abfd)->extended_names = NULL;
+ /* Cleared by bfd_zalloc above.
+ bfd_ardata (abfd)->cache = NULL;
+ bfd_ardata (abfd)->archive_head = NULL;
+ bfd_ardata (abfd)->symdefs = NULL;
+ bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->extended_names_size = 0; */
/* Now handle the two formats. */
if (magic[1] != 'b')
@@ -1742,7 +1744,7 @@ static bfd_boolean
do_shared_object_padding (out_bfd, in_bfd, offset, ar_header_size)
bfd *out_bfd;
bfd *in_bfd;
- ufile_ptr *offset;
+ file_ptr *offset;
int ar_header_size;
{
if (bfd_check_format (in_bfd, bfd_object)
@@ -1779,7 +1781,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
const bfd_arch_info_type *arch_info = NULL;
bfd *current_bfd;
size_t string_length;
- ufile_ptr nextoff, prevoff;
+ file_ptr nextoff, prevoff;
/* First, we look through the symbols and work out which are
from 32-bit objects and which from 64-bit ones. */
@@ -1849,8 +1851,8 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
if (sym_32)
{
struct xcoff_ar_hdr_big *hdr;
- bfd_byte *symbol_table;
- bfd_byte *st;
+ char *symbol_table;
+ char *st;
file_ptr fileoff;
bfd_vma symbol_table_size =
@@ -1860,8 +1862,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
+ 8 * sym_32
+ str_32 + (str_32 & 1);
- symbol_table = NULL;
- symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size);
+ symbol_table = bfd_zmalloc (symbol_table_size);
if (symbol_table == NULL)
return FALSE;
@@ -1941,7 +1942,6 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
bfd_bwrite (symbol_table, symbol_table_size, abfd);
free (symbol_table);
- symbol_table = NULL;
prevoff = nextoff;
nextoff = nextoff + symbol_table_size;
@@ -1952,8 +1952,8 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
if (sym_64)
{
struct xcoff_ar_hdr_big *hdr;
- bfd_byte *symbol_table;
- bfd_byte *st;
+ char *symbol_table;
+ char *st;
file_ptr fileoff;
bfd_vma symbol_table_size =
@@ -1963,8 +1963,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
+ 8 * sym_64
+ str_64 + (str_64 & 1);
- symbol_table = NULL;
- symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size);
+ symbol_table = bfd_zmalloc (symbol_table_size);
if (symbol_table == NULL)
return FALSE;
@@ -2039,7 +2038,6 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
bfd_bwrite (symbol_table, symbol_table_size, abfd);
free (symbol_table);
- symbol_table = NULL;
PRINT20 (fhdr->symoff64, nextoff);
}
@@ -2076,7 +2074,7 @@ xcoff_write_archive_contents_old (abfd)
file_ptr *offsets;
bfd_boolean makemap;
bfd_boolean hasobjects;
- ufile_ptr prevoff, nextoff;
+ file_ptr prevoff, nextoff;
bfd *sub;
size_t i;
struct xcoff_ar_hdr ahdr;
@@ -2085,7 +2083,7 @@ xcoff_write_archive_contents_old (abfd)
char decbuf[XCOFFARMAG_ELEMENT_SIZE + 1];
memset (&fhdr, 0, sizeof fhdr);
- strncpy (fhdr.magic, XCOFFARMAG, SXCOFFARMAG);
+ (void) strncpy (fhdr.magic, XCOFFARMAG, SXCOFFARMAG);
sprintf (fhdr.firstmemoff, "%d", SIZEOF_AR_FILE_HDR);
sprintf (fhdr.freeoff, "%d", 0);
@@ -2306,12 +2304,12 @@ xcoff_write_archive_contents_big (abfd)
file_ptr *offsets;
bfd_boolean makemap;
bfd_boolean hasobjects;
- ufile_ptr prevoff, nextoff;
+ file_ptr prevoff, nextoff;
bfd *current_bfd;
size_t i;
struct xcoff_ar_hdr_big *hdr, ahdr;
bfd_size_type size;
- bfd_byte *member_table, *mt;
+ char *member_table, *mt;
bfd_vma member_table_size;
memset (&fhdr, 0, SIZEOF_AR_FILE_HDR_BIG);
@@ -2476,8 +2474,7 @@ xcoff_write_archive_contents_big (abfd)
+ total_namlen);
member_table_size += member_table_size & 1;
- member_table = NULL;
- member_table = (bfd_byte *) bfd_zmalloc (member_table_size);
+ member_table = bfd_zmalloc (member_table_size);
if (member_table == NULL)
return FALSE;
@@ -2530,7 +2527,6 @@ xcoff_write_archive_contents_big (abfd)
return FALSE;
free (member_table);
- member_table = NULL;
PRINT20 (fhdr.memoff, nextoff);
@@ -2948,8 +2944,7 @@ xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
cror. */
if (NULL != h
&& bfd_link_hash_defined == h->root.type
- && (rel->r_vaddr - input_section->vma + 8
- <= input_section->_cooked_size))
+ && rel->r_vaddr - input_section->vma + 8 <= input_section->size)
{
bfd_byte *pnext;
unsigned long next;
@@ -3449,7 +3444,7 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
address = rel->r_vaddr - input_section->vma;
location = contents + address;
- if (address > input_section->_raw_size)
+ if (address > input_section->size)
abort ();
/* Get the value we are going to relocate. */
@@ -3482,7 +3477,7 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
}
else if (h != NULL)
{
- name = h->root.root.string;
+ name = NULL;
}
else
{
@@ -3493,8 +3488,9 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
sprintf (reloc_type_name, "0x%02x", rel->r_type);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, reloc_type_name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, reloc_type_name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
@@ -3530,7 +3526,7 @@ _bfd_xcoff_put_ldsymbol_name (abfd, ldinfo, ldsym, name)
if (ldinfo->string_size + len + 3 > ldinfo->string_alc)
{
bfd_size_type newalc;
- bfd_byte *newstrings;
+ char *newstrings;
newalc = ldinfo->string_alc * 2;
if (newalc == 0)
@@ -3538,8 +3534,7 @@ _bfd_xcoff_put_ldsymbol_name (abfd, ldinfo, ldsym, name)
while (ldinfo->string_size + len + 3 > newalc)
newalc *= 2;
- newstrings = ((bfd_byte *)
- bfd_realloc ((PTR) ldinfo->strings, newalc));
+ newstrings = bfd_realloc (ldinfo->strings, newalc);
if (newstrings == NULL)
{
ldinfo->failed = TRUE;
@@ -3612,8 +3607,8 @@ xcoff_create_csect_from_smclas (abfd, aux, symbol_name)
else
{
(*_bfd_error_handler)
- (_("%s: symbol `%s' has unrecognized smclas %d"),
- bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+ (_("%B: symbol `%s' has unrecognized smclas %d"),
+ abfd, symbol_name, aux->x_csect.x_smclas);
bfd_set_error (bfd_error_bad_value);
}
@@ -4140,8 +4135,10 @@ const bfd_target rs6000coff_vec =
/* Copy */
_bfd_xcoff_copy_private_bfd_data,
((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
+ _bfd_generic_init_private_section_data,
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, flagword)) bfd_true),
((bfd_boolean (*) (bfd *, void * )) bfd_true),
@@ -4169,8 +4166,11 @@ const bfd_target rs6000coff_vec =
coff_print_symbol,
coff_get_symbol_info,
_bfd_xcoff_is_local_label_name,
+ coff_bfd_is_target_special_symbol,
coff_get_lineno,
coff_find_nearest_line,
+ _bfd_generic_find_line,
+ coff_find_inliner_info,
coff_bfd_make_debug_symbol,
_bfd_generic_read_minisymbols,
_bfd_generic_minisymbol_to_symbol,
@@ -4196,11 +4196,14 @@ const bfd_target rs6000coff_vec =
_bfd_generic_link_split_section,
bfd_generic_gc_sections,
bfd_generic_merge_sections,
+ bfd_generic_is_group_section,
bfd_generic_discard_group,
+ _bfd_generic_section_already_linked,
/* Dynamic */
_bfd_xcoff_get_dynamic_symtab_upper_bound,
_bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_nodynamic_get_synthetic_symtab,
_bfd_xcoff_get_dynamic_reloc_upper_bound,
_bfd_xcoff_canonicalize_dynamic_reloc,
@@ -4382,8 +4385,10 @@ const bfd_target pmac_xcoff_vec =
/* Copy */
_bfd_xcoff_copy_private_bfd_data,
((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
+ _bfd_generic_init_private_section_data,
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, flagword)) bfd_true),
((bfd_boolean (*) (bfd *, void * )) bfd_true),
@@ -4411,8 +4416,11 @@ const bfd_target pmac_xcoff_vec =
coff_print_symbol,
coff_get_symbol_info,
_bfd_xcoff_is_local_label_name,
+ coff_bfd_is_target_special_symbol,
coff_get_lineno,
coff_find_nearest_line,
+ _bfd_generic_find_line,
+ coff_find_inliner_info,
coff_bfd_make_debug_symbol,
_bfd_generic_read_minisymbols,
_bfd_generic_minisymbol_to_symbol,
@@ -4438,11 +4446,14 @@ const bfd_target pmac_xcoff_vec =
_bfd_generic_link_split_section,
bfd_generic_gc_sections,
bfd_generic_merge_sections,
+ bfd_generic_is_group_section,
bfd_generic_discard_group,
+ _bfd_generic_section_already_linked,
/* Dynamic */
_bfd_xcoff_get_dynamic_symtab_upper_bound,
_bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_nodynamic_get_synthetic_symtab,
_bfd_xcoff_get_dynamic_reloc_upper_bound,
_bfd_xcoff_canonicalize_dynamic_reloc,
diff --git a/contrib/binutils/bfd/coff-sparc.c b/contrib/binutils/bfd/coff-sparc.c
index 372b1a72278a..0236f525e66f 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 Free Software Foundation, Inc.
+ 2002, 2003, 2005 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -56,25 +56,6 @@ enum reloc_type
R_SPARC_max
};
-#if 0
-static const char *const reloc_type_names[] =
-{
- "R_SPARC_NONE",
- "R_SPARC_8", "R_SPARC_16", "R_SPARC_32",
- "R_SPARC_DISP8", "R_SPARC_DISP16", "R_SPARC_DISP32",
- "R_SPARC_WDISP30", "R_SPARC_WDISP22",
- "R_SPARC_HI22", "R_SPARC_22",
- "R_SPARC_13", "R_SPARC_LO10",
- "R_SPARC_GOT10", "R_SPARC_GOT13", "R_SPARC_GOT22",
- "R_SPARC_PC10", "R_SPARC_PC22",
- "R_SPARC_WPLT30",
- "R_SPARC_COPY",
- "R_SPARC_GLOB_DAT", "R_SPARC_JMP_SLOT",
- "R_SPARC_RELATIVE",
- "R_SPARC_UA32",
-};
-#endif
-
/* This is stolen pretty directly from elf.c. */
static bfd_reloc_status_type
bfd_coff_generic_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR,
diff --git a/contrib/binutils/bfd/coff64-rs6000.c b/contrib/binutils/bfd/coff64-rs6000.c
index ec9c69534781..e0aa87ef6775 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
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written Clinton Popetz.
Contributed by Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -564,7 +564,7 @@ _bfd_xcoff64_put_ldsymbol_name (abfd, ldinfo, ldsym, name)
if (ldinfo->string_size + len + 3 > ldinfo->string_alc)
{
bfd_size_type newalc;
- bfd_byte *newstrings;
+ char *newstrings;
newalc = ldinfo->string_alc * 2;
if (newalc == 0)
@@ -572,8 +572,7 @@ _bfd_xcoff64_put_ldsymbol_name (abfd, ldinfo, ldsym, name)
while (ldinfo->string_size + len + 3 > newalc)
newalc *= 2;
- newstrings = ((bfd_byte *)
- bfd_realloc ((PTR) ldinfo->strings, newalc));
+ newstrings = bfd_realloc (ldinfo->strings, newalc);
if (newstrings == NULL)
{
ldinfo->failed = TRUE;
@@ -845,11 +844,11 @@ xcoff64_write_object_contents (abfd)
section.s_vaddr = current->vma;
section.s_paddr = current->lma;
- section.s_size = current->_raw_size;
+ section.s_size = current->size;
/* If this section has no size or is unloadable then the scnptr
will be 0 too. */
- if (current->_raw_size == 0
+ if (current->size == 0
|| (current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
{
section.s_scnptr = 0;
@@ -965,19 +964,19 @@ xcoff64_write_object_contents (abfd)
if (text_sec)
{
- internal_a.tsize = bfd_get_section_size_before_reloc (text_sec);
+ internal_a.tsize = text_sec->size;
internal_a.text_start = internal_a.tsize ? text_sec->vma : 0;
}
if (data_sec)
{
- internal_a.dsize = bfd_get_section_size_before_reloc (data_sec);
+ internal_a.dsize = data_sec->size;
internal_a.data_start = internal_a.dsize ? data_sec->vma : 0;
}
if (bss_sec)
{
- internal_a.bsize = bfd_get_section_size_before_reloc (bss_sec);
+ internal_a.bsize = bss_sec->size;
if (internal_a.bsize && bss_sec->vma < internal_a.data_start)
internal_a.data_start = bss_sec->vma;
}
@@ -1127,8 +1126,7 @@ xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
cror. */
if (NULL != h
&& bfd_link_hash_defined == h->root.type
- && (rel->r_vaddr - input_section->vma + 8
- <= input_section->_cooked_size))
+ && rel->r_vaddr - input_section->vma + 8 <= input_section->size)
{
bfd_byte *pnext;
unsigned long next;
@@ -1301,7 +1299,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
address = rel->r_vaddr - input_section->vma;
location = contents + address;
- if (address > input_section->_raw_size)
+ if (address > input_section->size)
abort ();
/* Get the value we are going to relocate. */
@@ -1336,7 +1334,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
}
else if (h != NULL)
{
- name = h->root.root.string;
+ name = NULL;
}
else
{
@@ -1347,8 +1345,9 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
sprintf (reloc_type_name, "0x%02x", rel->r_type);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, reloc_type_name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, reloc_type_name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
@@ -1984,10 +1983,12 @@ xcoff64_archive_p (abfd)
if (bfd_ardata (abfd) == (struct artdata *) NULL)
goto error_ret_restore;
- bfd_ardata (abfd)->cache = NULL;
- bfd_ardata (abfd)->archive_head = NULL;
- bfd_ardata (abfd)->symdefs = NULL;
- bfd_ardata (abfd)->extended_names = NULL;
+ /* Already cleared by bfd_zalloc above.
+ bfd_ardata (abfd)->cache = NULL;
+ bfd_ardata (abfd)->archive_head = NULL;
+ bfd_ardata (abfd)->symdefs = NULL;
+ bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->extended_names_size = 0; */
bfd_ardata (abfd)->first_file_filepos = bfd_scan_vma (hdr.firstmemoff,
(const char **) NULL,
10);
@@ -2105,8 +2106,8 @@ xcoff64_create_csect_from_smclas (abfd, aux, symbol_name)
else
{
(*_bfd_error_handler)
- (_("%s: symbol `%s' has unrecognized smclas %d"),
- bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+ (_("%B: symbol `%s' has unrecognized smclas %d"),
+ abfd, symbol_name, aux->x_csect.x_smclas);
bfd_set_error (bfd_error_bad_value);
}
@@ -2681,8 +2682,10 @@ const bfd_target rs6000coff64_vec =
/* Copy */
_bfd_xcoff_copy_private_bfd_data,
((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
+ _bfd_generic_init_private_section_data,
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, flagword)) bfd_true),
((bfd_boolean (*) (bfd *, void * )) bfd_true),
@@ -2710,8 +2713,11 @@ const bfd_target rs6000coff64_vec =
coff_print_symbol,
coff_get_symbol_info,
_bfd_xcoff_is_local_label_name,
+ coff_bfd_is_target_special_symbol,
coff_get_lineno,
coff_find_nearest_line,
+ _bfd_generic_find_line,
+ coff_find_inliner_info,
coff_bfd_make_debug_symbol,
_bfd_generic_read_minisymbols,
_bfd_generic_minisymbol_to_symbol,
@@ -2737,11 +2743,14 @@ const bfd_target rs6000coff64_vec =
_bfd_generic_link_split_section,
bfd_generic_gc_sections,
bfd_generic_merge_sections,
+ bfd_generic_is_group_section,
bfd_generic_discard_group,
+ _bfd_generic_section_already_linked,
/* Dynamic */
_bfd_xcoff_get_dynamic_symtab_upper_bound,
_bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_nodynamic_get_synthetic_symtab,
_bfd_xcoff_get_dynamic_reloc_upper_bound,
_bfd_xcoff_canonicalize_dynamic_reloc,
@@ -2924,8 +2933,10 @@ const bfd_target aix5coff64_vec =
/* Copy */
_bfd_xcoff_copy_private_bfd_data,
((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
+ _bfd_generic_init_private_section_data,
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true),
((bfd_boolean (*) (bfd *, flagword)) bfd_true),
((bfd_boolean (*) (bfd *, void * )) bfd_true),
@@ -2953,8 +2964,11 @@ const bfd_target aix5coff64_vec =
coff_print_symbol,
coff_get_symbol_info,
_bfd_xcoff_is_local_label_name,
+ coff_bfd_is_target_special_symbol,
coff_get_lineno,
coff_find_nearest_line,
+ _bfd_generic_find_line,
+ coff_find_inliner_info,
coff_bfd_make_debug_symbol,
_bfd_generic_read_minisymbols,
_bfd_generic_minisymbol_to_symbol,
@@ -2980,11 +2994,14 @@ const bfd_target aix5coff64_vec =
_bfd_generic_link_split_section,
bfd_generic_gc_sections,
bfd_generic_merge_sections,
+ bfd_generic_is_group_section,
bfd_generic_discard_group,
+ _bfd_generic_section_already_linked,
/* Dynamic */
_bfd_xcoff_get_dynamic_symtab_upper_bound,
_bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_nodynamic_get_synthetic_symtab,
_bfd_xcoff_get_dynamic_reloc_upper_bound,
_bfd_xcoff_canonicalize_dynamic_reloc,
diff --git a/contrib/binutils/bfd/coffcode.h b/contrib/binutils/bfd/coffcode.h
index 15d97093f67b..256732c314d4 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
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,14 +18,11 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+/* Most of this hacked by Steve Chamberlain,
+ sac@cygnus.com. */
/*
-Most of this hacked by Steve Chamberlain,
- sac@cygnus.com
-*/
-/*
-
SECTION
coff backends
@@ -307,66 +304,69 @@ CODE_FRAGMENT
#include "coffswap.h"
#endif
-#define STRING_SIZE_SIZE (4)
+#define STRING_SIZE_SIZE 4
+
+#define DOT_DEBUG ".debug"
+#define GNU_LINKONCE_WI ".gnu.linkonce.wi."
static long sec_to_styp_flags
- PARAMS ((const char *, flagword));
+ (const char *, flagword);
static bfd_boolean styp_to_sec_flags
- PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
+ (bfd *, void *, const char *, asection *, flagword *);
static bfd_boolean coff_bad_format_hook
- PARAMS ((bfd *, PTR));
+ (bfd *, void *);
static void coff_set_custom_section_alignment
- PARAMS ((bfd *, asection *, const struct coff_section_alignment_entry *,
- const unsigned int));
+ (bfd *, asection *, const struct coff_section_alignment_entry *,
+ const unsigned int);
static bfd_boolean coff_new_section_hook
- PARAMS ((bfd *, asection *));
+ (bfd *, asection *);
static bfd_boolean coff_set_arch_mach_hook
- PARAMS ((bfd *, PTR));
+ (bfd *, void *);
static bfd_boolean coff_write_relocs
- PARAMS ((bfd *, int));
+ (bfd *, int);
static bfd_boolean coff_set_flags
- PARAMS ((bfd *, unsigned int *, unsigned short *));
+ (bfd *, unsigned int *, unsigned short *);
static bfd_boolean coff_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long)) ATTRIBUTE_UNUSED;
+ (bfd *, enum bfd_architecture, unsigned long) ATTRIBUTE_UNUSED;
static bfd_boolean coff_compute_section_file_positions
- PARAMS ((bfd *));
+ (bfd *);
static bfd_boolean coff_write_object_contents
- PARAMS ((bfd *)) ATTRIBUTE_UNUSED;
+ (bfd *) ATTRIBUTE_UNUSED;
static bfd_boolean coff_set_section_contents
- PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
-static PTR buy_and_read
- PARAMS ((bfd *, file_ptr, bfd_size_type));
+ (bfd *, asection *, const void *, file_ptr, bfd_size_type);
+static void * buy_and_read
+ (bfd *, file_ptr, bfd_size_type);
static bfd_boolean coff_slurp_line_table
- PARAMS ((bfd *, asection *));
+ (bfd *, asection *);
static bfd_boolean coff_slurp_symbol_table
- PARAMS ((bfd *));
+ (bfd *);
static enum coff_symbol_classification coff_classify_symbol
- PARAMS ((bfd *, struct internal_syment *));
+ (bfd *, struct internal_syment *);
static bfd_boolean coff_slurp_reloc_table
- PARAMS ((bfd *, asection *, asymbol **));
+ (bfd *, asection *, asymbol **);
static long coff_canonicalize_reloc
- PARAMS ((bfd *, asection *, arelent **, asymbol **));
+ (bfd *, asection *, arelent **, asymbol **);
#ifndef coff_mkobject_hook
-static PTR coff_mkobject_hook
- PARAMS ((bfd *, PTR, PTR));
+static void * coff_mkobject_hook
+ (bfd *, void *, void *);
#endif
#ifdef COFF_WITH_PE
static flagword handle_COMDAT
- PARAMS ((bfd *, flagword, PTR, const char *, asection *));
+ (bfd *, flagword, void *, const char *, asection *);
#endif
#ifdef COFF_IMAGE_WITH_PE
static bfd_boolean coff_read_word
- PARAMS ((bfd *, unsigned int *));
+ (bfd *, unsigned int *);
static unsigned int coff_compute_checksum
- PARAMS ((bfd *));
+ (bfd *);
static bfd_boolean coff_apply_checksum
- PARAMS ((bfd *));
+ (bfd *);
#endif
#ifdef TICOFF
static bfd_boolean ticoff0_bad_format_hook
- PARAMS ((bfd *, PTR ));
+ (bfd *, void * );
static bfd_boolean ticoff1_bad_format_hook
- PARAMS ((bfd *, PTR ));
+ (bfd *, void * );
#endif
/* void warning(); */
@@ -379,6 +379,7 @@ static bfd_boolean ticoff1_bad_format_hook
#ifndef COFF_WITH_PE
/* Macros for setting debugging flags. */
+
#ifdef STYP_DEBUG
#define STYP_XCOFF_DEBUG STYP_DEBUG
#else
@@ -392,9 +393,7 @@ static bfd_boolean ticoff1_bad_format_hook
#endif
static long
-sec_to_styp_flags (sec_name, sec_flags)
- const char *sec_name;
- flagword sec_flags;
+sec_to_styp_flags (const char *sec_name, flagword sec_flags)
{
long styp_flags = 0;
@@ -428,7 +427,7 @@ sec_to_styp_flags (sec_name, sec_flags)
styp_flags = STYP_LIT;
#endif /* _LIT */
}
- else if (!strncmp (sec_name, ".debug", 6))
+ else if (!strncmp (sec_name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1))
{
/* Handle the XCOFF debug section and DWARF2 debug sections. */
if (!sec_name[6])
@@ -441,7 +440,7 @@ sec_to_styp_flags (sec_name, sec_flags)
styp_flags = STYP_DEBUG_INFO;
}
#ifdef COFF_LONG_SECTION_NAMES
- else if (!strncmp (sec_name, ".gnu.linkonce.wi.", 17))
+ else if (!strncmp (sec_name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1))
{
styp_flags = STYP_DEBUG_INFO;
}
@@ -491,12 +490,12 @@ sec_to_styp_flags (sec_name, sec_flags)
}
#ifdef STYP_CLINK
- if (sec_flags & SEC_CLINK)
+ if (sec_flags & SEC_TIC54X_CLINK)
styp_flags |= STYP_CLINK;
#endif
#ifdef STYP_BLOCK
- if (sec_flags & SEC_BLOCK)
+ if (sec_flags & SEC_TIC54X_BLOCK)
styp_flags |= STYP_BLOCK;
#endif
@@ -517,9 +516,7 @@ sec_to_styp_flags (sec_name, sec_flags)
and honor whatever objcopy/strip, etc. sent us as input. */
static long
-sec_to_styp_flags (sec_name, sec_flags)
- const char *sec_name ATTRIBUTE_UNUSED;
- flagword sec_flags;
+sec_to_styp_flags (const char *sec_name, flagword sec_flags)
{
long styp_flags = 0;
@@ -531,6 +528,11 @@ sec_to_styp_flags (sec_name, sec_flags)
PE files. The STYP_* flags and the IMAGE_SCN_* flags overlap,
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)
+ sec_flags = SEC_DEBUGGING;
+
/* skip LOAD */
/* READONLY later */
/* skip RELOC */
@@ -543,10 +545,6 @@ sec_to_styp_flags (sec_name, sec_flags)
/* skip ROM */
/* skip constRUCTOR */
/* skip CONTENTS */
-#ifdef STYP_NOLOAD
- if ((sec_flags & (SEC_NEVER_LOAD | SEC_COFF_SHARED_LIBRARY)) != 0)
- styp_flags |= STYP_NOLOAD;
-#endif
if ((sec_flags & SEC_IS_COMMON) != 0)
styp_flags |= IMAGE_SCN_LNK_COMDAT;
if ((sec_flags & SEC_DEBUGGING) != 0)
@@ -562,17 +560,19 @@ sec_to_styp_flags (sec_name, sec_flags)
/* skip LINK_DUPLICATES */
/* skip LINKER_CREATED */
- /* For now, the read/write bits are mapped onto SEC_READONLY, even
- though the semantics don't quite match. The bits from the input
- are retained in pei_section_data(abfd, section)->pe_flags. */
-
- styp_flags |= IMAGE_SCN_MEM_READ; /* Always readable. */
- if ((sec_flags & SEC_READONLY) == 0)
- styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write. */
- if (sec_flags & SEC_CODE)
- styp_flags |= IMAGE_SCN_MEM_EXECUTE; /* CODE->EXECUTE. */
- if (sec_flags & SEC_SHARED)
- styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful. */
+ if (sec_flags & (SEC_ALLOC | SEC_LOAD))
+ {
+ /* For now, the read/write bits are mapped onto SEC_READONLY, even
+ though the semantics don't quite match. The bits from the input
+ are retained in pei_section_data(abfd, section)->pe_flags. */
+ styp_flags |= IMAGE_SCN_MEM_READ; /* Always readable. */
+ if ((sec_flags & SEC_READONLY) == 0)
+ styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write. */
+ if (sec_flags & SEC_CODE)
+ styp_flags |= IMAGE_SCN_MEM_EXECUTE; /* CODE->EXECUTE. */
+ if (sec_flags & SEC_COFF_SHARED)
+ styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful. */
+ }
return styp_flags;
}
@@ -587,12 +587,11 @@ sec_to_styp_flags (sec_name, sec_flags)
#ifndef COFF_WITH_PE
static bfd_boolean
-styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR hdr;
- const char *name;
- asection *section ATTRIBUTE_UNUSED;
- flagword *flags_ptr;
+styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED,
+ void * hdr,
+ const char *name,
+ asection *section ATTRIBUTE_UNUSED,
+ flagword *flags_ptr)
{
struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
long styp_flags = internal_s->s_flags;
@@ -600,12 +599,12 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
#ifdef STYP_BLOCK
if (styp_flags & STYP_BLOCK)
- sec_flags |= SEC_BLOCK;
+ sec_flags |= SEC_TIC54X_BLOCK;
#endif
#ifdef STYP_CLINK
if (styp_flags & STYP_CLINK)
- sec_flags |= SEC_CLINK;
+ sec_flags |= SEC_TIC54X_CLINK;
#endif
#ifdef STYP_NOLOAD
@@ -675,12 +674,12 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
#endif
sec_flags |= SEC_ALLOC;
}
- else if (strncmp (name, ".debug", 6) == 0
+ else if (strncmp (name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1) == 0
#ifdef _COMMENT
|| strcmp (name, _COMMENT) == 0
#endif
#ifdef COFF_LONG_SECTION_NAMES
- || strncmp (name, ".gnu.linkonce.wi.", 17) == 0
+ || strncmp (name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1) == 0
#endif
|| strncmp (name, ".stab", 5) == 0)
{
@@ -730,12 +729,11 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
#else /* COFF_WITH_PE */
static flagword
-handle_COMDAT (abfd, sec_flags, hdr, name, section)
- bfd * abfd;
- flagword sec_flags;
- PTR hdr;
- const char *name;
- asection *section;
+handle_COMDAT (bfd * abfd,
+ flagword sec_flags,
+ void * hdr,
+ const char *name,
+ asection *section)
{
struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
bfd_byte *esymstart, *esym, *esymend;
@@ -773,7 +771,7 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
char buf[SYMNMLEN + 1];
const char *symname;
- bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &isym);
+ bfd_coff_swap_sym_in (abfd, esym, & isym);
if (sizeof (internal_s->s_name) > SYMNMLEN)
{
@@ -821,8 +819,6 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
/* The first time we've seen the symbol. */
union internal_auxent aux;
- seen_state = 1;
-
/* If it isn't the stuff we're expecting, die;
The MS documentation is vague, but it
appears that the second entry serves BOTH
@@ -850,12 +846,15 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
function). See comment above for more. */
if (strcmp (name, symname) != 0)
- abort ();
+ _bfd_error_handler (_("%B: warning: COMDAT symbol '%s' does not match section name '%s'"),
+ abfd, symname, name);
+
+ seen_state = 1;
/* This is the section symbol. */
- bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)),
+ bfd_coff_swap_aux_in (abfd, (esym + bfd_coff_symesz (abfd)),
isym.n_type, isym.n_sclass,
- 0, isym.n_numaux, (PTR) &aux);
+ 0, isym.n_numaux, & aux);
target_name = strchr (name, '$');
if (target_name != NULL)
@@ -957,12 +956,13 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
Intel puts the two adjacent, but Alpha (at
least) spreads them out. */
- amt = sizeof (struct bfd_comdat_info);
- section->comdat = bfd_alloc (abfd, amt);
- if (section->comdat == NULL)
+ amt = sizeof (struct coff_comdat_info);
+ coff_section_data (abfd, section)->comdat
+ = bfd_alloc (abfd, amt);
+ if (coff_section_data (abfd, section)->comdat == NULL)
abort ();
- section->comdat->symbol =
+ coff_section_data (abfd, section)->comdat->symbol =
(esym - esymstart) / bfd_coff_symesz (abfd);
amt = strlen (symname) + 1;
@@ -971,7 +971,8 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
abort ();
strcpy (newname, symname);
- section->comdat->name = newname;
+ coff_section_data (abfd, section)->comdat->name
+ = newname;
}
goto breakloop;
@@ -996,12 +997,11 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
any purpose other than objdump? */
static bfd_boolean
-styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
- bfd *abfd;
- PTR hdr;
- const char *name;
- asection *section;
- flagword *flags_ptr;
+styp_to_sec_flags (bfd *abfd,
+ void * hdr,
+ const char *name,
+ asection *section,
+ flagword *flags_ptr)
{
struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
long styp_flags = internal_s->s_flags;
@@ -1055,7 +1055,11 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
unhandled = "IMAGE_SCN_MEM_NOT_CACHED";
break;
case IMAGE_SCN_MEM_NOT_PAGED:
- unhandled = "IMAGE_SCN_MEM_NOT_PAGED";
+ /* Generate a warning message rather using the 'unhandled'
+ variable as this will allow some .sys files generate by
+ other toolchains to be processed. See bugzilla issue 196. */
+ _bfd_error_handler (_("%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s"),
+ abfd, name);
break;
case IMAGE_SCN_MEM_EXECUTE:
sec_flags |= SEC_CODE;
@@ -1071,7 +1075,7 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
sec_flags |= SEC_DEBUGGING;
break;
case IMAGE_SCN_MEM_SHARED:
- sec_flags |= SEC_SHARED;
+ sec_flags |= SEC_COFF_SHARED;
break;
case IMAGE_SCN_LNK_REMOVE:
sec_flags |= SEC_EXCLUDE;
@@ -1109,8 +1113,8 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
if (unhandled != NULL)
{
(*_bfd_error_handler)
- (_("%s (%s): Section flag %s (0x%x) ignored"),
- bfd_archive_filename (abfd), name, unhandled, flag);
+ (_("%B (%s): Section flag %s (0x%x) ignored"),
+ abfd, name, unhandled, flag);
result = FALSE;
}
}
@@ -1162,34 +1166,34 @@ Special entry points for gdb to swap in coff symbol table parts:
.typedef struct
.{
. void (*_bfd_coff_swap_aux_in)
-. PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+. (bfd *, void *, int, int, int, int, void *);
.
. void (*_bfd_coff_swap_sym_in)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. void (*_bfd_coff_swap_lineno_in)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. unsigned int (*_bfd_coff_swap_aux_out)
-. PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+. (bfd *, void *, int, int, int, int, void *);
.
. unsigned int (*_bfd_coff_swap_sym_out)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. unsigned int (*_bfd_coff_swap_lineno_out)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. unsigned int (*_bfd_coff_swap_reloc_out)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. unsigned int (*_bfd_coff_swap_filehdr_out)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. unsigned int (*_bfd_coff_swap_aouthdr_out)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. unsigned int (*_bfd_coff_swap_scnhdr_out)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. unsigned int _bfd_filhsz;
. unsigned int _bfd_aoutsz;
@@ -1206,86 +1210,86 @@ Special entry points for gdb to swap in coff symbol table parts:
. unsigned int _bfd_coff_debug_string_prefix_length;
.
. void (*_bfd_coff_swap_filehdr_in)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. void (*_bfd_coff_swap_aouthdr_in)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. void (*_bfd_coff_swap_scnhdr_in)
-. PARAMS ((bfd *, PTR, PTR));
+. (bfd *, void *, void *);
.
. void (*_bfd_coff_swap_reloc_in)
-. PARAMS ((bfd *abfd, PTR, PTR));
+. (bfd *abfd, void *, void *);
.
. bfd_boolean (*_bfd_coff_bad_format_hook)
-. PARAMS ((bfd *, PTR));
+. (bfd *, void *);
.
. bfd_boolean (*_bfd_coff_set_arch_mach_hook)
-. PARAMS ((bfd *, PTR));
+. (bfd *, void *);
.
-. PTR (*_bfd_coff_mkobject_hook)
-. PARAMS ((bfd *, PTR, PTR));
+. void * (*_bfd_coff_mkobject_hook)
+. (bfd *, void *, void *);
.
. bfd_boolean (*_bfd_styp_to_sec_flags_hook)
-. PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
+. (bfd *, void *, const char *, asection *, flagword *);
.
. void (*_bfd_set_alignment_hook)
-. PARAMS ((bfd *, asection *, PTR));
+. (bfd *, asection *, void *);
.
. bfd_boolean (*_bfd_coff_slurp_symbol_table)
-. PARAMS ((bfd *));
+. (bfd *);
.
. bfd_boolean (*_bfd_coff_symname_in_debug)
-. PARAMS ((bfd *, struct internal_syment *));
+. (bfd *, struct internal_syment *);
.
. bfd_boolean (*_bfd_coff_pointerize_aux_hook)
-. PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
-. unsigned int, combined_entry_type *));
+. (bfd *, combined_entry_type *, combined_entry_type *,
+. unsigned int, combined_entry_type *);
.
. bfd_boolean (*_bfd_coff_print_aux)
-. PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
-. combined_entry_type *, unsigned int));
+. (bfd *, FILE *, combined_entry_type *, combined_entry_type *,
+. combined_entry_type *, unsigned int);
.
. void (*_bfd_coff_reloc16_extra_cases)
-. PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
-. bfd_byte *, unsigned int *, unsigned int *));
+. (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+. bfd_byte *, unsigned int *, unsigned int *);
.
. int (*_bfd_coff_reloc16_estimate)
-. PARAMS ((bfd *, asection *, arelent *, unsigned int,
-. struct bfd_link_info *));
+. (bfd *, asection *, arelent *, unsigned int,
+. struct bfd_link_info *);
.
. enum coff_symbol_classification (*_bfd_coff_classify_symbol)
-. PARAMS ((bfd *, struct internal_syment *));
+. (bfd *, struct internal_syment *);
.
. bfd_boolean (*_bfd_coff_compute_section_file_positions)
-. PARAMS ((bfd *));
+. (bfd *);
.
. bfd_boolean (*_bfd_coff_start_final_link)
-. PARAMS ((bfd *, struct bfd_link_info *));
+. (bfd *, struct bfd_link_info *);
.
. bfd_boolean (*_bfd_coff_relocate_section)
-. PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
-. struct internal_reloc *, struct internal_syment *, asection **));
+. (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+. struct internal_reloc *, struct internal_syment *, asection **);
.
. reloc_howto_type *(*_bfd_coff_rtype_to_howto)
-. PARAMS ((bfd *, asection *, struct internal_reloc *,
+. (bfd *, asection *, struct internal_reloc *,
. struct coff_link_hash_entry *, struct internal_syment *,
-. bfd_vma *));
+. bfd_vma *);
.
. bfd_boolean (*_bfd_coff_adjust_symndx)
-. PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
-. struct internal_reloc *, bfd_boolean *));
+. (bfd *, struct bfd_link_info *, bfd *, asection *,
+. struct internal_reloc *, bfd_boolean *);
.
. bfd_boolean (*_bfd_coff_link_add_one_symbol)
-. PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
+. (struct bfd_link_info *, bfd *, const char *, flagword,
. asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
-. struct bfd_link_hash_entry **));
+. struct bfd_link_hash_entry **);
.
. bfd_boolean (*_bfd_coff_link_output_has_begun)
-. PARAMS ((bfd *, struct coff_final_link_info *));
+. (bfd *, struct coff_final_link_info *);
.
. bfd_boolean (*_bfd_coff_final_link_postscript)
-. PARAMS ((bfd *, struct coff_final_link_info *));
+. (bfd *, struct coff_final_link_info *);
.
.} bfd_coff_backend_data;
.
@@ -1415,18 +1419,16 @@ Special entry points for gdb to swap in coff symbol table parts:
. (info, abfd, name, flags, section, value, string, cp, coll, hashp))
.
.#define bfd_coff_link_output_has_begun(a,p) \
-. ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
+. ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a, p))
.#define bfd_coff_final_link_postscript(a,p) \
-. ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
+. ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p))
.
*/
/* See whether the magic number matches. */
static bfd_boolean
-coff_bad_format_hook (abfd, filehdr)
- bfd * abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
+coff_bad_format_hook (bfd * abfd ATTRIBUTE_UNUSED, void * filehdr)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
@@ -1451,9 +1453,7 @@ coff_bad_format_hook (abfd, filehdr)
#ifdef TICOFF
static bfd_boolean
-ticoff0_bad_format_hook (abfd, filehdr)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
+ticoff0_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED, void * filehdr)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
@@ -1466,9 +1466,7 @@ ticoff0_bad_format_hook (abfd, filehdr)
#ifdef TICOFF
static bfd_boolean
-ticoff1_bad_format_hook (abfd, filehdr)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
+ticoff1_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED, void * filehdr)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
@@ -1483,11 +1481,10 @@ ticoff1_bad_format_hook (abfd, filehdr)
default. */
static void
-coff_set_custom_section_alignment (abfd, section, alignment_table, table_size)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *section;
- const struct coff_section_alignment_entry *alignment_table;
- const unsigned int table_size;
+coff_set_custom_section_alignment (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *section,
+ const struct coff_section_alignment_entry *alignment_table,
+ const unsigned int table_size)
{
const unsigned int default_alignment = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
unsigned int i;
@@ -1547,13 +1544,8 @@ static const unsigned int coff_section_alignment_table_size =
particular implementation of COFF. */
static bfd_boolean
-coff_new_section_hook (abfd, section)
- bfd * abfd;
- asection * section;
+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
@@ -1565,27 +1557,34 @@ coff_new_section_hook (abfd, section)
section->alignment_power = bfd_xcoff_data_align_power (abfd);
#endif
- /* 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 = (combined_entry_type *) bfd_zalloc (abfd, amt);
- if (native == NULL)
- return FALSE;
+ /* 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;
- /* 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. */
+ /* Allocate aux records for section symbols, to store size and
+ related info.
- native->u.syment.n_type = T_NULL;
- native->u.syment.n_sclass = C_STAT;
+ @@ 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;
- coffsymbol (section->symbol)->native = native;
+ /* 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;
+ }
+
coff_set_custom_section_alignment (abfd, section,
coff_section_alignment_table,
coff_section_alignment_table_size);
@@ -1597,13 +1596,10 @@ coff_new_section_hook (abfd, section)
/* Set the alignment of a BFD section. */
-static void coff_set_alignment_hook PARAMS ((bfd *, asection *, PTR));
-
static void
-coff_set_alignment_hook (abfd, section, scnhdr)
- bfd * abfd ATTRIBUTE_UNUSED;
- asection * section;
- PTR scnhdr;
+coff_set_alignment_hook (bfd * abfd ATTRIBUTE_UNUSED,
+ asection * section,
+ void * scnhdr)
{
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
unsigned int i;
@@ -1632,25 +1628,22 @@ coff_set_alignment_hook (abfd, section, scnhdr)
#ifdef COFF_WITH_PE
/* A couple of macros to help setting the alignment power field. */
-#define ALIGN_SET(field,x,y) \
- if (((field) & IMAGE_SCN_ALIGN_64BYTES) == x )\
- {\
- section->alignment_power = y;\
- }
-
-#define ELIFALIGN_SET(field,x,y) \
- else if (( (field) & IMAGE_SCN_ALIGN_64BYTES) == x ) \
- {\
- section->alignment_power = y;\
- }
+#define ALIGN_SET(field, x, y) \
+ if (((field) & IMAGE_SCN_ALIGN_64BYTES) == x)\
+ {\
+ section->alignment_power = y;\
+ }
-static void coff_set_alignment_hook PARAMS ((bfd *, asection *, PTR));
+#define ELIFALIGN_SET(field, x, y) \
+ else if (((field) & IMAGE_SCN_ALIGN_64BYTES) == x) \
+ {\
+ section->alignment_power = y;\
+ }
static void
-coff_set_alignment_hook (abfd, section, scnhdr)
- bfd * abfd ATTRIBUTE_UNUSED;
- asection * section;
- PTR scnhdr;
+coff_set_alignment_hook (bfd * abfd ATTRIBUTE_UNUSED,
+ asection * section,
+ void * scnhdr)
{
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
bfd_size_type amt;
@@ -1670,22 +1663,19 @@ coff_set_alignment_hook (abfd, section, scnhdr)
if (coff_section_data (abfd, section) == NULL)
{
amt = sizeof (struct coff_section_tdata);
- section->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+ section->used_by_bfd = bfd_zalloc (abfd, amt);
if (section->used_by_bfd == NULL)
- {
- /* FIXME: Return error. */
- abort ();
- }
+ /* FIXME: Return error. */
+ abort ();
}
+
if (pei_section_data (abfd, section) == NULL)
{
amt = sizeof (struct pei_section_tdata);
- coff_section_data (abfd, section)->tdata = (PTR) bfd_zalloc (abfd, amt);
+ coff_section_data (abfd, section)->tdata = bfd_zalloc (abfd, amt);
if (coff_section_data (abfd, section)->tdata == NULL)
- {
- /* FIXME: Return error. */
- abort ();
- }
+ /* FIXME: Return error. */
+ abort ();
}
pei_section_data (abfd, section)->virt_size = hdr->s_paddr;
pei_section_data (abfd, section)->pe_flags = hdr->s_flags;
@@ -1701,7 +1691,7 @@ coff_set_alignment_hook (abfd, section, scnhdr)
bfd_size_type relsz = bfd_coff_relsz (abfd);
bfd_seek (abfd, (file_ptr) hdr->s_relptr, 0);
- if (bfd_bread ((PTR) &dst, relsz, abfd) != relsz)
+ if (bfd_bread (& dst, relsz, abfd) != relsz)
return;
coff_swap_reloc_in (abfd, &dst, &n);
@@ -1724,17 +1714,11 @@ coff_set_alignment_hook (abfd, section, scnhdr)
When we see one, we correct the reloc and line number counts in the
real header, and remove the section we just created. */
-static void coff_set_alignment_hook PARAMS ((bfd *, asection *, PTR));
-
static void
-coff_set_alignment_hook (abfd, section, scnhdr)
- bfd *abfd;
- asection *section;
- PTR scnhdr;
+coff_set_alignment_hook (bfd *abfd, asection *section, void * scnhdr)
{
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
asection *real_sec;
- asection **ps;
if ((hdr->s_flags & STYP_OVRFLO) == 0)
return;
@@ -1746,21 +1730,17 @@ coff_set_alignment_hook (abfd, section, scnhdr)
real_sec->reloc_count = hdr->s_paddr;
real_sec->lineno_count = hdr->s_vaddr;
- for (ps = &abfd->sections; *ps != NULL; ps = &(*ps)->next)
+ if (!bfd_section_removed_from_list (abfd, section))
{
- if (*ps == section)
- {
- bfd_section_list_remove (abfd, ps);
- --abfd->section_count;
- break;
- }
+ bfd_section_list_remove (abfd, section);
+ --abfd->section_count;
}
}
#else /* ! RS6000COFF_C */
#define coff_set_alignment_hook \
- ((void (*) PARAMS ((bfd *, asection *, PTR))) bfd_void)
+ ((void (*) (bfd *, asection *, void *)) bfd_void)
#endif /* ! RS6000COFF_C */
#endif /* ! COFF_WITH_PE */
@@ -1768,22 +1748,19 @@ coff_set_alignment_hook (abfd, section, scnhdr)
#ifndef coff_mkobject
-static bfd_boolean coff_mkobject PARAMS ((bfd *));
-
static bfd_boolean
-coff_mkobject (abfd)
- bfd * abfd;
+coff_mkobject (bfd * abfd)
{
coff_data_type *coff;
bfd_size_type amt = sizeof (coff_data_type);
- abfd->tdata.coff_obj_data = (struct coff_tdata *) bfd_zalloc (abfd, amt);
- if (abfd->tdata.coff_obj_data == 0)
+ abfd->tdata.coff_obj_data = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.coff_obj_data == NULL)
return FALSE;
coff = coff_data (abfd);
- coff->symbols = (coff_symbol_type *) NULL;
- coff->conversion_table = (unsigned int *) NULL;
- coff->raw_syments = (struct coff_ptr_struct *) NULL;
+ coff->symbols = NULL;
+ coff->conversion_table = NULL;
+ coff->raw_syments = NULL;
coff->relocbase = 0;
coff->local_toc_sym_map = 0;
@@ -1796,11 +1773,10 @@ coff_mkobject (abfd)
/* Create the COFF backend specific information. */
#ifndef coff_mkobject_hook
-static PTR
-coff_mkobject_hook (abfd, filehdr, aouthdr)
- bfd * abfd;
- PTR filehdr;
- PTR aouthdr ATTRIBUTE_UNUSED;
+static void *
+coff_mkobject_hook (bfd * abfd,
+ void * filehdr,
+ void * aouthdr ATTRIBUTE_UNUSED)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
coff_data_type *coff;
@@ -1870,7 +1846,7 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
abfd->flags |= HAS_DEBUG;
#endif
- return (PTR) coff;
+ return coff;
}
#endif
@@ -1882,9 +1858,7 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
at linking together COFF files for different architectures. */
static bfd_boolean
-coff_set_arch_mach_hook (abfd, filehdr)
- bfd *abfd;
- PTR filehdr;
+coff_set_arch_mach_hook (bfd *abfd, void * filehdr)
{
unsigned long machine;
enum bfd_architecture arch;
@@ -1918,12 +1892,6 @@ coff_set_arch_mach_hook (abfd, filehdr)
arch = bfd_arch_ia64;
break;
#endif
-#ifdef A29K_MAGIC_BIG
- case A29K_MAGIC_BIG:
- case A29K_MAGIC_LITTLE:
- arch = bfd_arch_a29k;
- break;
-#endif
#ifdef ARMMAGIC
case ARMMAGIC:
case ARMPEMAGIC:
@@ -1967,6 +1935,22 @@ coff_set_arch_mach_hook (abfd, filehdr)
machine = bfd_mach_m68020;
break;
#endif
+#ifdef MAXQ20MAGIC
+ case MAXQ20MAGIC:
+ arch = bfd_arch_maxq;
+ switch (internal_f->f_flags & F_MACHMASK)
+ {
+ case F_MAXQ10:
+ machine = bfd_mach_maxq10;
+ break;
+ case F_MAXQ20:
+ machine = bfd_mach_maxq20;
+ break;
+ default:
+ return FALSE;
+ }
+ break;
+#endif
#ifdef MC88MAGIC
case MC88MAGIC:
case MC88DMAGIC:
@@ -1975,6 +1959,23 @@ coff_set_arch_mach_hook (abfd, filehdr)
machine = 88100;
break;
#endif
+#ifdef Z80MAGIC
+ case Z80MAGIC:
+ arch = bfd_arch_z80;
+ switch (internal_f->f_flags & F_MACHMASK)
+ {
+ case 0:
+ case bfd_mach_z80strict << 12:
+ case bfd_mach_z80 << 12:
+ case bfd_mach_z80full << 12:
+ case bfd_mach_r800 << 12:
+ machine = ((unsigned)internal_f->f_flags & F_MACHMASK) >> 12;
+ break;
+ default:
+ return FALSE;
+ }
+ break;
+#endif
#ifdef Z8KMAGIC
case Z8KMAGIC:
arch = bfd_arch_z8k;
@@ -2061,14 +2062,14 @@ coff_set_arch_mach_hook (abfd, filehdr)
struct internal_syment sym;
bfd_size_type amt = bfd_coff_symesz (abfd);
- buf = (bfd_byte *) bfd_malloc (amt);
+ buf = bfd_malloc (amt);
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
|| bfd_bread (buf, amt, abfd) != amt)
{
free (buf);
return FALSE;
}
- bfd_coff_swap_sym_in (abfd, (PTR) buf, (PTR) &sym);
+ bfd_coff_swap_sym_in (abfd, buf, & sym);
if (sym.n_sclass == C_FILE)
cputype = sym.n_type & 0xff;
else
@@ -2257,13 +2258,8 @@ coff_set_arch_mach_hook (abfd, filehdr)
#ifdef SYMNAME_IN_DEBUG
-static bfd_boolean symname_in_debug_hook
- PARAMS ((bfd *, struct internal_syment *));
-
static bfd_boolean
-symname_in_debug_hook (abfd, sym)
- bfd * abfd ATTRIBUTE_UNUSED;
- struct internal_syment *sym;
+symname_in_debug_hook (bfd * abfd ATTRIBUTE_UNUSED, struct internal_syment *sym)
{
return SYMNAME_IN_DEBUG (sym) != 0;
}
@@ -2271,7 +2267,7 @@ symname_in_debug_hook (abfd, sym)
#else
#define symname_in_debug_hook \
- (bfd_boolean (*) PARAMS ((bfd *, struct internal_syment *))) bfd_false
+ (bfd_boolean (*) (bfd *, struct internal_syment *)) bfd_false
#endif
@@ -2283,17 +2279,12 @@ symname_in_debug_hook (abfd, sym)
/* Handle the csect auxent of a C_EXT or C_HIDEXT symbol. */
-static bfd_boolean coff_pointerize_aux_hook
- PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
- unsigned int, combined_entry_type *));
-
static bfd_boolean
-coff_pointerize_aux_hook (abfd, table_base, symbol, indaux, aux)
- bfd *abfd ATTRIBUTE_UNUSED;
- combined_entry_type *table_base;
- combined_entry_type *symbol;
- unsigned int indaux;
- combined_entry_type *aux;
+coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ combined_entry_type *table_base,
+ combined_entry_type *symbol,
+ unsigned int indaux,
+ combined_entry_type *aux)
{
int class = symbol->u.syment.n_sclass;
@@ -2322,17 +2313,12 @@ coff_pointerize_aux_hook (abfd, table_base, symbol, indaux, aux)
/* We don't want to pointerize bal entries. */
-static bfd_boolean coff_pointerize_aux_hook
- PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
- unsigned int, combined_entry_type *));
-
static bfd_boolean
-coff_pointerize_aux_hook (abfd, table_base, symbol, indaux, aux)
- bfd *abfd ATTRIBUTE_UNUSED;
- combined_entry_type *table_base ATTRIBUTE_UNUSED;
- combined_entry_type *symbol;
- unsigned int indaux;
- combined_entry_type *aux ATTRIBUTE_UNUSED;
+coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ combined_entry_type *table_base ATTRIBUTE_UNUSED,
+ combined_entry_type *symbol,
+ unsigned int indaux,
+ combined_entry_type *aux ATTRIBUTE_UNUSED)
{
/* Return TRUE if we don't want to pointerize this aux entry, which
is the case for the lastfirst aux entry for a C_LEAFPROC symbol. */
@@ -2351,18 +2337,13 @@ coff_pointerize_aux_hook (abfd, table_base, symbol, indaux, aux)
/* Print an aux entry. This returns TRUE if it has printed it. */
-static bfd_boolean coff_print_aux
- PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
- combined_entry_type *, unsigned int));
-
static bfd_boolean
-coff_print_aux (abfd, file, table_base, symbol, aux, indaux)
- bfd *abfd ATTRIBUTE_UNUSED;
- FILE *file ATTRIBUTE_UNUSED;
- combined_entry_type *table_base ATTRIBUTE_UNUSED;
- combined_entry_type *symbol ATTRIBUTE_UNUSED;
- combined_entry_type *aux ATTRIBUTE_UNUSED;
- unsigned int indaux ATTRIBUTE_UNUSED;
+coff_print_aux (bfd *abfd ATTRIBUTE_UNUSED,
+ FILE *file ATTRIBUTE_UNUSED,
+ combined_entry_type *table_base ATTRIBUTE_UNUSED,
+ combined_entry_type *symbol ATTRIBUTE_UNUSED,
+ combined_entry_type *aux ATTRIBUTE_UNUSED,
+ unsigned int indaux ATTRIBUTE_UNUSED)
{
#ifdef RS6000COFF_C
if ((symbol->u.syment.n_sclass == C_EXT
@@ -2375,7 +2356,8 @@ coff_print_aux (abfd, file, table_base, symbol, aux, indaux)
{
BFD_ASSERT (! aux->fix_scnlen);
#ifdef XCOFF64
- fprintf (file, "val %5lld", aux->u.auxent.x_csect.x_scnlen.l);
+ fprintf (file, "val %5lld",
+ (long long) aux->u.auxent.x_csect.x_scnlen.l);
#else
fprintf (file, "val %5ld", (long) aux->u.auxent.x_csect.x_scnlen.l);
#endif
@@ -2385,7 +2367,8 @@ coff_print_aux (abfd, file, table_base, symbol, aux, indaux)
fprintf (file, "indx ");
if (! aux->fix_scnlen)
#ifdef XCOFF64
- fprintf (file, "%4lld", aux->u.auxent.x_csect.x_scnlen.l);
+ fprintf (file, "%4lld",
+ (long long) aux->u.auxent.x_csect.x_scnlen.l);
#else
fprintf (file, "%4ld", (long) aux->u.auxent.x_csect.x_scnlen.l);
#endif
@@ -2428,13 +2411,10 @@ SUBSUBSECTION
#ifdef TARG_AUX
-static int compare_arelent_ptr PARAMS ((const PTR, const PTR));
/* AUX's ld wants relocations to be sorted. */
static int
-compare_arelent_ptr (x, y)
- const PTR x;
- const PTR y;
+compare_arelent_ptr (const void * x, const void * y)
{
const arelent **a = (const arelent **) x;
const arelent **b = (const arelent **) y;
@@ -2447,13 +2427,11 @@ compare_arelent_ptr (x, y)
#endif /* TARG_AUX */
static bfd_boolean
-coff_write_relocs (abfd, first_undef)
- bfd * abfd;
- int first_undef;
+coff_write_relocs (bfd * abfd, int first_undef)
{
asection *s;
- for (s = abfd->sections; s != (asection *) NULL; s = s->next)
+ for (s = abfd->sections; s != NULL; s = s->next)
{
unsigned int i;
struct external_reloc dst;
@@ -2468,7 +2446,7 @@ coff_write_relocs (abfd, first_undef)
amt = s->reloc_count;
amt *= sizeof (arelent *);
- p = (arelent **) bfd_malloc (amt);
+ p = bfd_malloc (amt);
if (p == NULL && s->reloc_count > 0)
return FALSE;
memcpy (p, s->orelocation, (size_t) amt);
@@ -2485,12 +2463,12 @@ coff_write_relocs (abfd, first_undef)
/* Encode real count here as first reloc. */
struct internal_reloc n;
- memset ((PTR) & n, 0, sizeof (n));
+ memset (& n, 0, sizeof (n));
/* Add one to count *this* reloc (grr). */
n.r_vaddr = s->reloc_count + 1;
coff_swap_reloc_out (abfd, &n, &dst);
- if (bfd_bwrite ((PTR) & dst, (bfd_size_type) bfd_coff_relsz (abfd),
- abfd) != bfd_coff_relsz (abfd))
+ if (bfd_bwrite (& dst, (bfd_size_type) bfd_coff_relsz (abfd),
+ abfd) != bfd_coff_relsz (abfd))
return FALSE;
}
#endif
@@ -2500,7 +2478,7 @@ coff_write_relocs (abfd, first_undef)
struct internal_reloc n;
arelent *q = p[i];
- memset ((PTR) & n, 0, sizeof (n));
+ memset (& n, 0, sizeof (n));
/* Now we've renumbered the symbols we know where the
undefined symbols live in the table. Check the reloc
@@ -2522,11 +2500,12 @@ coff_write_relocs (abfd, first_undef)
{
const char *intable = outsyms[j]->name;
- if (strcmp (intable, sname) == 0) {
- /* Got a hit, so repoint the reloc. */
- q->sym_ptr_ptr = outsyms + j;
- break;
- }
+ if (strcmp (intable, sname) == 0)
+ {
+ /* Got a hit, so repoint the reloc. */
+ q->sym_ptr_ptr = outsyms + j;
+ break;
+ }
}
}
@@ -2543,7 +2522,7 @@ coff_write_relocs (abfd, first_undef)
if (q->sym_ptr_ptr)
{
#ifdef SECTION_RELATIVE_ABSOLUTE_SYMBOL_P
- if (SECTION_RELATIVE_ABSOLUTE_SYMBOL_P (q,s))
+ if (SECTION_RELATIVE_ABSOLUTE_SYMBOL_P (q, s))
#else
if ((*q->sym_ptr_ptr)->section == bfd_abs_section_ptr
&& ((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0)
@@ -2573,7 +2552,7 @@ coff_write_relocs (abfd, first_undef)
#endif
coff_swap_reloc_out (abfd, &n, &dst);
- if (bfd_bwrite ((PTR) & dst, (bfd_size_type) bfd_coff_relsz (abfd),
+ if (bfd_bwrite (& dst, (bfd_size_type) bfd_coff_relsz (abfd),
abfd) != bfd_coff_relsz (abfd))
return FALSE;
}
@@ -2591,68 +2570,62 @@ coff_write_relocs (abfd, first_undef)
type. Result is TRUE if we can represent the arch&type, FALSE if not. */
static bfd_boolean
-coff_set_flags (abfd, magicp, flagsp)
- bfd * abfd;
- unsigned int *magicp ATTRIBUTE_UNUSED;
- unsigned short *flagsp ATTRIBUTE_UNUSED;
+coff_set_flags (bfd * abfd,
+ unsigned int *magicp ATTRIBUTE_UNUSED,
+ unsigned short *flagsp ATTRIBUTE_UNUSED)
{
switch (bfd_get_arch (abfd))
{
-#ifdef Z8KMAGIC
- case bfd_arch_z8k:
- *magicp = Z8KMAGIC;
+#ifdef Z80MAGIC
+ case bfd_arch_z80:
+ *magicp = Z80MAGIC;
switch (bfd_get_mach (abfd))
{
- case bfd_mach_z8001:
- *flagsp = F_Z8001;
- break;
- case bfd_mach_z8002:
- *flagsp = F_Z8002;
+ case 0:
+ case bfd_mach_z80strict:
+ case bfd_mach_z80:
+ case bfd_mach_z80full:
+ case bfd_mach_r800:
+ *flagsp = bfd_get_mach (abfd) << 12;
break;
default:
return FALSE;
}
return TRUE;
#endif
-#ifdef I960ROMAGIC
+#ifdef Z8KMAGIC
+ case bfd_arch_z8k:
+ *magicp = Z8KMAGIC;
+
+ switch (bfd_get_mach (abfd))
+ {
+ case bfd_mach_z8001: *flagsp = F_Z8001; break;
+ case bfd_mach_z8002: *flagsp = F_Z8002; break;
+ default: return FALSE;
+ }
+ return TRUE;
+#endif
+
+#ifdef I960ROMAGIC
case bfd_arch_i960:
{
unsigned flags;
+
*magicp = I960ROMAGIC;
- /*
- ((bfd_get_file_flags(abfd) & WP_TEXT) ? I960ROMAGIC :
- I960RWMAGIC); FIXME???
- */
+
switch (bfd_get_mach (abfd))
{
- case bfd_mach_i960_core:
- flags = F_I960CORE;
- break;
- case bfd_mach_i960_kb_sb:
- flags = F_I960KB;
- break;
- case bfd_mach_i960_mc:
- flags = F_I960MC;
- break;
- case bfd_mach_i960_xa:
- flags = F_I960XA;
- break;
- case bfd_mach_i960_ca:
- flags = F_I960CA;
- break;
- case bfd_mach_i960_ka_sa:
- flags = F_I960KA;
- break;
- case bfd_mach_i960_jx:
- flags = F_I960JX;
- break;
- case bfd_mach_i960_hx:
- flags = F_I960HX;
- break;
- default:
- return FALSE;
+ case bfd_mach_i960_core: flags = F_I960CORE; break;
+ case bfd_mach_i960_kb_sb: flags = F_I960KB; break;
+ case bfd_mach_i960_mc: flags = F_I960MC; break;
+ case bfd_mach_i960_xa: flags = F_I960XA; break;
+ case bfd_mach_i960_ca: flags = F_I960CA; break;
+ case bfd_mach_i960_ka_sa: flags = F_I960KA; break;
+ case bfd_mach_i960_jx: flags = F_I960JX; break;
+ case bfd_mach_i960_hx: flags = F_I960HX; break;
+ default: return FALSE;
}
*flagsp = flags;
return TRUE;
@@ -2698,6 +2671,7 @@ coff_set_flags (abfd, magicp, flagsp)
*magicp = TIC80_ARCH_MAGIC;
return TRUE;
#endif
+
#ifdef ARMMAGIC
case bfd_arch_arm:
#ifdef ARM_WINCE
@@ -2736,12 +2710,13 @@ coff_set_flags (abfd, magicp, flagsp)
}
return TRUE;
#endif
+
#ifdef PPCMAGIC
case bfd_arch_powerpc:
*magicp = PPCMAGIC;
return TRUE;
- break;
#endif
+
#ifdef I386MAGIC
case bfd_arch_i386:
*magicp = I386MAGIC;
@@ -2750,20 +2725,20 @@ coff_set_flags (abfd, magicp, flagsp)
*magicp = LYNXCOFFMAGIC;
#endif
return TRUE;
- break;
#endif
+
#ifdef I860MAGIC
case bfd_arch_i860:
*magicp = I860MAGIC;
return TRUE;
- break;
#endif
+
#ifdef IA64MAGIC
case bfd_arch_ia64:
*magicp = IA64MAGIC;
return TRUE;
- break;
#endif
+
#ifdef MC68MAGIC
case bfd_arch_m68k:
#ifdef APOLLOM68KMAGIC
@@ -2781,34 +2756,24 @@ coff_set_flags (abfd, magicp, flagsp)
*magicp = LYNXCOFFMAGIC;
#endif
return TRUE;
- break;
#endif
#ifdef MC88MAGIC
case bfd_arch_m88k:
*magicp = MC88OMAGIC;
return TRUE;
- break;
#endif
+
#ifdef H8300MAGIC
case bfd_arch_h8300:
switch (bfd_get_mach (abfd))
{
- case bfd_mach_h8300:
- *magicp = H8300MAGIC;
- return TRUE;
- case bfd_mach_h8300h:
- *magicp = H8300HMAGIC;
- return TRUE;
- case bfd_mach_h8300s:
- *magicp = H8300SMAGIC;
- return TRUE;
- case bfd_mach_h8300hn:
- *magicp = H8300HNMAGIC;
- return TRUE;
- case bfd_mach_h8300sn:
- *magicp = H8300SNMAGIC;
- return TRUE;
+ case bfd_mach_h8300: *magicp = H8300MAGIC; return TRUE;
+ case bfd_mach_h8300h: *magicp = H8300HMAGIC; return TRUE;
+ case bfd_mach_h8300s: *magicp = H8300SMAGIC; return TRUE;
+ case bfd_mach_h8300hn: *magicp = H8300HNMAGIC; return TRUE;
+ case bfd_mach_h8300sn: *magicp = H8300SNMAGIC; return TRUE;
+ default: break;
}
break;
#endif
@@ -2824,14 +2789,12 @@ coff_set_flags (abfd, magicp, flagsp)
*magicp = SH_ARCH_MAGIC_LITTLE;
#endif
return TRUE;
- break;
#endif
#ifdef MIPS_ARCH_MAGIC_WINCE
case bfd_arch_mips:
*magicp = MIPS_ARCH_MAGIC_WINCE;
return TRUE;
- break;
#endif
#ifdef SPARCMAGIC
@@ -2842,7 +2805,6 @@ coff_set_flags (abfd, magicp, flagsp)
*magicp = LYNXCOFFMAGIC;
#endif
return TRUE;
- break;
#endif
#ifdef H8500MAGIC
@@ -2851,21 +2813,11 @@ coff_set_flags (abfd, magicp, flagsp)
return TRUE;
break;
#endif
-#ifdef A29K_MAGIC_BIG
- case bfd_arch_a29k:
- if (bfd_big_endian (abfd))
- *magicp = A29K_MAGIC_BIG;
- else
- *magicp = A29K_MAGIC_LITTLE;
- return TRUE;
- break;
-#endif
#ifdef WE32KMAGIC
case bfd_arch_we32k:
*magicp = WE32KMAGIC;
return TRUE;
- break;
#endif
#ifdef RS6000COFF_C
@@ -2876,7 +2828,6 @@ coff_set_flags (abfd, magicp, flagsp)
BFD_ASSERT (bfd_get_flavour (abfd) == bfd_target_xcoff_flavour);
*magicp = bfd_xcoff_magic_number (abfd);
return TRUE;
- break;
#endif
#ifdef MCOREMAGIC
@@ -2900,6 +2851,17 @@ coff_set_flags (abfd, magicp, flagsp)
return TRUE;
#endif
+#ifdef MAXQ20MAGIC
+ case bfd_arch_maxq:
+ * magicp = MAXQ20MAGIC;
+ switch (bfd_get_mach (abfd))
+ {
+ case bfd_mach_maxq10: * flagsp = F_MAXQ10; return TRUE;
+ case bfd_mach_maxq20: * flagsp = F_MAXQ20; return TRUE;
+ default: return FALSE;
+ }
+#endif
+
default: /* Unknown architecture. */
/* Fall through to "return FALSE" below, to avoid
"statement never reached" errors on the one below. */
@@ -2910,10 +2872,9 @@ coff_set_flags (abfd, magicp, flagsp)
}
static bfd_boolean
-coff_set_arch_mach (abfd, arch, machine)
- bfd * abfd;
- enum bfd_architecture arch;
- unsigned long machine;
+coff_set_arch_mach (bfd * abfd,
+ enum bfd_architecture arch,
+ unsigned long machine)
{
unsigned dummy1;
unsigned short dummy2;
@@ -2923,9 +2884,9 @@ coff_set_arch_mach (abfd, arch, machine)
if (arch != bfd_arch_unknown
&& ! coff_set_flags (abfd, &dummy1, &dummy2))
- return FALSE; /* We can't represent this type */
+ return FALSE; /* We can't represent this type. */
- return TRUE; /* We're easy ... */
+ return TRUE; /* We're easy... */
}
#ifdef COFF_IMAGE_WITH_PE
@@ -2933,12 +2894,8 @@ coff_set_arch_mach (abfd, arch, machine)
/* This is used to sort sections by VMA, as required by PE image
files. */
-static int sort_by_secaddr PARAMS ((const PTR, const PTR));
-
static int
-sort_by_secaddr (arg1, arg2)
- const PTR arg1;
- const PTR arg2;
+sort_by_secaddr (const void * arg1, const void * arg2)
{
const asection *a = *(const asection **) arg1;
const asection *b = *(const asection **) arg2;
@@ -2947,8 +2904,8 @@ sort_by_secaddr (arg1, arg2)
return -1;
else if (a->vma > b->vma)
return 1;
- else
- return 0;
+
+ return 0;
}
#endif /* COFF_IMAGE_WITH_PE */
@@ -2963,11 +2920,10 @@ sort_by_secaddr (arg1, arg2)
#endif
static bfd_boolean
-coff_compute_section_file_positions (abfd)
- bfd * abfd;
+coff_compute_section_file_positions (bfd * abfd)
{
asection *current;
- asection *previous = (asection *) NULL;
+ asection *previous = NULL;
file_ptr sofar = bfd_coff_filhsz (abfd);
bfd_boolean align_adjust;
#ifdef ALIGN_SECTIONS_IN_FILE
@@ -3004,10 +2960,10 @@ coff_compute_section_file_positions (abfd)
{
asection *dsec;
- dsec = bfd_make_section_old_way (abfd, ".debug");
+ dsec = bfd_make_section_old_way (abfd, DOT_DEBUG);
if (dsec == NULL)
abort ();
- dsec->_raw_size = sz;
+ dsec->size = sz;
dsec->flags |= SEC_HAS_CONTENTS;
}
}
@@ -3015,6 +2971,7 @@ coff_compute_section_file_positions (abfd)
#ifdef COFF_IMAGE_WITH_PE
int page_size;
+
if (coff_data (abfd)->link_info)
{
page_size = pe_data (abfd)->pe_opthdr.FileAlignment;
@@ -3033,11 +2990,9 @@ coff_compute_section_file_positions (abfd)
#endif
if (bfd_get_start_address (abfd))
- {
- /* A start address may have been added to the original file. In this
- case it will need an optional header to record it. */
- abfd->flags |= EXEC_P;
- }
+ /* A start address may have been added to the original file. In this
+ case it will need an optional header to record it. */
+ abfd->flags |= EXEC_P;
if (abfd->flags & EXEC_P)
sofar += bfd_coff_aoutsz (abfd);
@@ -3095,18 +3050,19 @@ coff_compute_section_file_positions (abfd)
/* Rethread the linked list into sorted order; at the same time,
assign target_index values. */
target_index = 1;
- abfd->sections = section_list[0];
+ abfd->sections = NULL;
+ abfd->section_last = NULL;
for (i = 0; i < count; i++)
{
current = section_list[i];
- current->next = section_list[i + 1];
+ bfd_section_list_append (abfd, current);
/* Later, if the section has zero size, we'll be throwing it
away, so we don't want to number it now. Note that having
a zero size and having real contents are different
concepts: .bss has no contents, but (usually) non-zero
size. */
- if (current->_raw_size == 0)
+ if (current->size == 0)
{
/* Discard. However, it still might have (valid) symbols
in it, so arbitrarily set it to section 1 (indexing is
@@ -3118,7 +3074,6 @@ coff_compute_section_file_positions (abfd)
else
current->target_index = target_index++;
}
- abfd->section_tail = &current->next;
free (section_list);
}
@@ -3135,7 +3090,7 @@ coff_compute_section_file_positions (abfd)
align_adjust = FALSE;
for (current = abfd->sections;
- current != (asection *) NULL;
+ current != NULL;
current = current->next)
{
#ifdef COFF_IMAGE_WITH_PE
@@ -3144,20 +3099,21 @@ coff_compute_section_file_positions (abfd)
if (coff_section_data (abfd, current) == NULL)
{
bfd_size_type amt = sizeof (struct coff_section_tdata);
- current->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+
+ current->used_by_bfd = bfd_zalloc (abfd, amt);
if (current->used_by_bfd == NULL)
return FALSE;
}
if (pei_section_data (abfd, current) == NULL)
{
bfd_size_type amt = sizeof (struct pei_section_tdata);
- coff_section_data (abfd, current)->tdata
- = (PTR) bfd_zalloc (abfd, amt);
+
+ coff_section_data (abfd, current)->tdata = bfd_zalloc (abfd, amt);
if (coff_section_data (abfd, current)->tdata == NULL)
return FALSE;
}
if (pei_section_data (abfd, current)->virt_size == 0)
- pei_section_data (abfd, current)->virt_size = current->_raw_size;
+ pei_section_data (abfd, current)->virt_size = current->size;
#endif
/* Only deal with sections which have contents. */
@@ -3166,7 +3122,7 @@ coff_compute_section_file_positions (abfd)
#ifdef COFF_IMAGE_WITH_PE
/* Make sure we skip empty sections in a PE image. */
- if (current->_raw_size == 0)
+ if (current->size == 0)
continue;
#endif
@@ -3179,8 +3135,8 @@ coff_compute_section_file_positions (abfd)
{
/* Make sure this section is aligned on the right boundary - by
padding the previous section up if necessary. */
-
old_sofar = sofar;
+
#ifdef RS6000COFF_C
/* AIX loader checks the text section alignment of (vma - filepos)
So even though the filepos may be aligned wrt the o_algntext, for
@@ -3213,8 +3169,8 @@ coff_compute_section_file_positions (abfd)
sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
}
#endif
- if (previous != (asection *) NULL)
- previous->_raw_size += sofar - old_sofar;
+ if (previous != NULL)
+ previous->size += sofar - old_sofar;
}
#endif
@@ -3224,16 +3180,16 @@ coff_compute_section_file_positions (abfd)
#ifdef COFF_PAGE_SIZE
if ((abfd->flags & D_PAGED) != 0
&& (current->flags & SEC_ALLOC) != 0)
- sofar += (current->vma - sofar) % page_size;
+ sofar += (current->vma - (bfd_vma) sofar) % page_size;
#endif
current->filepos = sofar;
#ifdef COFF_IMAGE_WITH_PE
/* Set the padded size. */
- current->_raw_size = (current->_raw_size + page_size -1) & -page_size;
+ current->size = (current->size + page_size -1) & -page_size;
#endif
- sofar += current->_raw_size;
+ sofar += current->size;
#ifdef ALIGN_SECTIONS_IN_FILE
/* Make sure that this section is of the right size too. */
@@ -3241,26 +3197,26 @@ coff_compute_section_file_positions (abfd)
{
bfd_size_type old_size;
- old_size = current->_raw_size;
- current->_raw_size = BFD_ALIGN (current->_raw_size,
- 1 << current->alignment_power);
- align_adjust = current->_raw_size != old_size;
- sofar += current->_raw_size - old_size;
+ old_size = current->size;
+ current->size = BFD_ALIGN (current->size,
+ 1 << current->alignment_power);
+ align_adjust = current->size != old_size;
+ sofar += current->size - old_size;
}
else
{
old_sofar = sofar;
sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
align_adjust = sofar != old_sofar;
- current->_raw_size += sofar - old_sofar;
+ current->size += sofar - old_sofar;
}
#endif
#ifdef COFF_IMAGE_WITH_PE
/* For PE we need to make sure we pad out to the aligned
- _raw_size, in case the caller only writes out data to the
- unaligned _raw_size. */
- if (pei_section_data (abfd, current)->virt_size < current->_raw_size)
+ size, in case the caller only writes out data to the
+ unaligned size. */
+ if (pei_section_data (abfd, current)->virt_size < current->size)
align_adjust = TRUE;
#endif
@@ -3301,95 +3257,13 @@ coff_compute_section_file_positions (abfd)
return TRUE;
}
-#if 0
-
-/* This can never work, because it is called too late--after the
- section positions have been set. I can't figure out what it is
- for, so I am going to disable it--Ian Taylor 20 March 1996. */
-
-/* If .file, .text, .data, .bss symbols are missing, add them. */
-/* @@ Should we only be adding missing symbols, or overriding the aux
- values for existing section symbols? */
-static bfd_boolean
-coff_add_missing_symbols (abfd)
- bfd *abfd;
-{
- unsigned int nsyms = bfd_get_symcount (abfd);
- asymbol **sympp = abfd->outsymbols;
- asymbol **sympp2;
- unsigned int i;
- int need_text = 1, need_data = 1, need_bss = 1, need_file = 1;
- bfd_size_type amt;
-
- for (i = 0; i < nsyms; i++)
- {
- coff_symbol_type *csym = coff_symbol_from (abfd, sympp[i]);
- const char *name;
-
- if (csym)
- {
- /* Only do this if there is a coff representation of the input
- symbol. */
- if (csym->native && csym->native->u.syment.n_sclass == C_FILE)
- {
- need_file = 0;
- continue;
- }
- name = csym->symbol.name;
- if (!name)
- continue;
- if (!strcmp (name, _TEXT))
- need_text = 0;
-#ifdef APOLLO_M68
- else if (!strcmp (name, ".wtext"))
- need_text = 0;
-#endif
- else if (!strcmp (name, _DATA))
- need_data = 0;
- else if (!strcmp (name, _BSS))
- need_bss = 0;
- }
- }
- /* Now i == bfd_get_symcount (abfd). */
- /* @@ For now, don't deal with .file symbol. */
- need_file = 0;
-
- if (!need_text && !need_data && !need_bss && !need_file)
- return TRUE;
- nsyms += need_text + need_data + need_bss + need_file;
- amt = nsyms;
- amt *= sizeof (asymbol *);
- sympp2 = (asymbol **) bfd_alloc (abfd, amt);
- if (!sympp2)
- return FALSE;
- memcpy (sympp2, sympp, i * sizeof (asymbol *));
-
- if (need_file)
- /* @@ Generate fake .file symbol, in sympp2[i], and increment i. */
- abort ();
-
- if (need_text)
- sympp2[i++] = coff_section_symbol (abfd, _TEXT);
- if (need_data)
- sympp2[i++] = coff_section_symbol (abfd, _DATA);
- if (need_bss)
- sympp2[i++] = coff_section_symbol (abfd, _BSS);
- BFD_ASSERT (i == nsyms);
- bfd_set_symtab (abfd, sympp2, nsyms);
- return TRUE;
-}
-
-#endif /* 0 */
-
#ifdef COFF_IMAGE_WITH_PE
static unsigned int pelength;
static unsigned int peheader;
static bfd_boolean
-coff_read_word (abfd, value)
- bfd *abfd;
- unsigned int *value;
+coff_read_word (bfd *abfd, unsigned int *value)
{
unsigned char b[2];
int status;
@@ -3412,8 +3286,7 @@ coff_read_word (abfd, value)
}
static unsigned int
-coff_compute_checksum (abfd)
- bfd *abfd;
+coff_compute_checksum (bfd *abfd)
{
bfd_boolean more_data;
file_ptr filepos;
@@ -3440,8 +3313,7 @@ coff_compute_checksum (abfd)
}
static bfd_boolean
-coff_apply_checksum (abfd)
- bfd *abfd;
+coff_apply_checksum (bfd *abfd)
{
unsigned int computed;
unsigned int checksum = 0;
@@ -3475,11 +3347,8 @@ coff_apply_checksum (abfd)
#endif /* COFF_IMAGE_WITH_PE */
-/* SUPPRESS 558 */
-/* SUPPRESS 529 */
static bfd_boolean
-coff_write_object_contents (abfd)
- bfd * abfd;
+coff_write_object_contents (bfd * abfd)
{
asection *current;
bfd_boolean hasrelocs = FALSE;
@@ -3505,7 +3374,6 @@ coff_write_object_contents (abfd)
/* Make a pass through the symbol table to count line number entries and
put them into the correct asections. */
-
lnno_size = coff_count_linenumbers (abfd) * bfd_coff_linesz (abfd);
if (! abfd->output_has_begun)
@@ -3545,9 +3413,8 @@ coff_write_object_contents (abfd)
lineno_base += current->lineno_count * bfd_coff_linesz (abfd);
}
else
- {
- current->line_filepos = 0;
- }
+ current->line_filepos = 0;
+
if (current->reloc_count)
{
current->rel_filepos = reloc_base;
@@ -3559,9 +3426,7 @@ coff_write_object_contents (abfd)
#endif
}
else
- {
- current->rel_filepos = 0;
- }
+ current->rel_filepos = 0;
}
/* Write section headers to the file. */
@@ -3632,7 +3497,7 @@ coff_write_object_contents (abfd)
#endif
section.s_vaddr = current->vma;
section.s_paddr = current->lma;
- section.s_size = current->_raw_size;
+ section.s_size = current->size;
#ifdef coff_get_section_load_page
section.s_page = coff_get_section_load_page (current);
#endif
@@ -3651,8 +3516,8 @@ coff_write_object_contents (abfd)
/* If this section has no size or is unloadable then the scnptr
will be 0 too. */
- if (current->_raw_size == 0 ||
- (current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ if (current->size == 0
+ || (current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
section.s_scnptr = 0;
else
section.s_scnptr = current->filepos;
@@ -3720,7 +3585,7 @@ coff_write_object_contents (abfd)
bfd_size_type amt = bfd_coff_scnhsz (abfd);
if (coff_swap_scnhdr_out (abfd, &section, &buff) == 0
- || bfd_bwrite ((PTR) &buff, amt, abfd) != amt)
+ || bfd_bwrite (& buff, amt, abfd) != amt)
return FALSE;
}
@@ -3844,7 +3709,7 @@ coff_write_object_contents (abfd)
scnhdr.s_flags = STYP_OVRFLO;
amt = bfd_coff_scnhsz (abfd);
if (coff_swap_scnhdr_out (abfd, &scnhdr, &buff) == 0
- || bfd_bwrite ((PTR) &buff, amt, abfd) != amt)
+ || bfd_bwrite (& buff, amt, abfd) != amt)
return FALSE;
}
}
@@ -3886,6 +3751,8 @@ coff_write_object_contents (abfd)
#ifdef COFF_IMAGE_WITH_PE
if (! hasdebug)
internal_f.f_flags |= IMAGE_FILE_DEBUG_STRIPPED;
+ if (pe_data (abfd)->real_flags & IMAGE_FILE_LARGE_ADDRESS_AWARE)
+ internal_f.f_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
#endif
#ifdef COFF_WITH_PE
@@ -3928,18 +3795,6 @@ coff_write_object_contents (abfd)
internal_f.f_flags |= flags;
/* ...and the "opt"hdr... */
-#ifdef A29K
-#ifdef ULTRA3 /* NYU's machine */
- /* FIXME: This is a bogus check. I really want to see if there
- is a .shbss or a .shdata section, if so then set the magic
- number to indicate a shared data executable. */
- if (internal_f.f_nscns >= 7)
- internal_a.magic = SHMAGIC; /* Shared magic. */
- else
-#endif /* ULTRA3 */
- internal_a.magic = NMAGIC; /* Assume separate i/d. */
-#define __A_MAGIC_SET__
-#endif /* A29K */
#ifdef TICOFF_AOUT_MAGIC
internal_a.magic = TICOFF_AOUT_MAGIC;
#define __A_MAGIC_SET__
@@ -4042,6 +3897,11 @@ coff_write_object_contents (abfd)
internal_a.magic = NMAGIC; /* Assume separate i/d. */
#endif
+#ifdef MAXQ20MAGIC
+#define __A_MAGIC_SET__
+ internal_a.magic = MAXQ20MAGIC;
+#endif
+
#ifndef __A_MAGIC_SET__
#include "Your aouthdr magic number is not being set!"
#else
@@ -4058,10 +3918,7 @@ coff_write_object_contents (abfd)
if (bfd_get_symcount (abfd) != 0)
{
int firstundef;
-#if 0
- if (!coff_add_missing_symbols (abfd))
- return FALSE;
-#endif
+
if (!coff_renumber_symbols (abfd, &firstundef))
return FALSE;
coff_mangle_symbols (abfd);
@@ -4122,17 +3979,17 @@ coff_write_object_contents (abfd)
if (text_sec)
{
- internal_a.tsize = bfd_get_section_size_before_reloc (text_sec);
+ internal_a.tsize = text_sec->size;
internal_a.text_start = internal_a.tsize ? text_sec->vma : 0;
}
if (data_sec)
{
- internal_a.dsize = bfd_get_section_size_before_reloc (data_sec);
+ internal_a.dsize = data_sec->size;
internal_a.data_start = internal_a.dsize ? data_sec->vma : 0;
}
if (bss_sec)
{
- internal_a.bsize = bfd_get_section_size_before_reloc (bss_sec);
+ internal_a.bsize = bss_sec->size;
if (internal_a.bsize && bss_sec->vma < internal_a.data_start)
internal_a.data_start = bss_sec->vma;
}
@@ -4211,7 +4068,7 @@ coff_write_object_contents (abfd)
}
#endif
- /* now write them */
+ /* Now write them. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return FALSE;
@@ -4223,8 +4080,8 @@ coff_write_object_contents (abfd)
if (buff == NULL)
return FALSE;
- bfd_coff_swap_filehdr_out (abfd, (PTR) &internal_f, (PTR) buff);
- amount = bfd_bwrite ((PTR) buff, amount, abfd);
+ bfd_coff_swap_filehdr_out (abfd, & internal_f, buff);
+ amount = bfd_bwrite (buff, amount, abfd);
free (buff);
@@ -4243,8 +4100,8 @@ coff_write_object_contents (abfd)
if (buff == NULL)
return FALSE;
- coff_swap_aouthdr_out (abfd, (PTR) &internal_a, (PTR) buff);
- amount = bfd_bwrite ((PTR) buff, amount, abfd);
+ coff_swap_aouthdr_out (abfd, & internal_a, buff);
+ amount = bfd_bwrite (buff, amount, abfd);
free (buff);
@@ -4263,12 +4120,12 @@ coff_write_object_contents (abfd)
size_t size;
/* XCOFF seems to always write at least a small a.out header. */
- coff_swap_aouthdr_out (abfd, (PTR) &internal_a, (PTR) &buff);
+ coff_swap_aouthdr_out (abfd, & internal_a, & buff);
if (xcoff_data (abfd)->full_aouthdr)
size = bfd_coff_aoutsz (abfd);
else
size = SMALL_AOUTSZ;
- if (bfd_bwrite ((PTR) &buff, (bfd_size_type) size, abfd) != size)
+ if (bfd_bwrite (& buff, (bfd_size_type) size, abfd) != size)
return FALSE;
}
#endif
@@ -4277,12 +4134,11 @@ coff_write_object_contents (abfd)
}
static bfd_boolean
-coff_set_section_contents (abfd, section, location, offset, count)
- bfd * abfd;
- sec_ptr section;
- const PTR location;
- file_ptr offset;
- bfd_size_type count;
+coff_set_section_contents (bfd * abfd,
+ sec_ptr section,
+ const void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
if (! abfd->output_has_begun) /* Set by bfd.c handler. */
{
@@ -4291,7 +4147,6 @@ coff_set_section_contents (abfd, section, location, offset, count)
}
#if defined(_LIB) && !defined(TARG_AUX)
-
/* The physical address field of a .lib section is used to hold the
number of shared libraries in the section. This code counts the
number of sections being written, and increments the lma field
@@ -4312,7 +4167,6 @@ coff_set_section_contents (abfd, section, location, offset, count)
<robertl@arnet.com> (Thanks!).
Gvran Uddeborg <gvran@uddeborg.pp.se>. */
-
if (strcmp (section->name, _LIB) == 0)
{
bfd_byte *rec, *recend;
@@ -4327,7 +4181,6 @@ coff_set_section_contents (abfd, section, location, offset, count)
BFD_ASSERT (rec == recend);
}
-
#endif
/* Don't write out bss sections - one way to do this is to
@@ -4343,47 +4196,19 @@ coff_set_section_contents (abfd, section, location, offset, count)
return bfd_bwrite (location, count, abfd) == count;
}
-#if 0
-static bfd_boolean
-coff_close_and_cleanup (abfd)
- bfd *abfd;
-{
- if (!bfd_read_p (abfd))
- switch (abfd->format)
- {
- case bfd_archive:
- if (!_bfd_write_archive_contents (abfd))
- return FALSE;
- break;
- case bfd_object:
- if (!coff_write_object_contents (abfd))
- return FALSE;
- break;
- default:
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
- }
-
- /* We depend on bfd_close to free all the memory on the objalloc. */
- return TRUE;
-}
-#endif
-
-static PTR
-buy_and_read (abfd, where, size)
- bfd *abfd;
- file_ptr where;
- bfd_size_type size;
+static void *
+buy_and_read (bfd *abfd, file_ptr where, bfd_size_type size)
{
- PTR area = (PTR) bfd_alloc (abfd, size);
+ void * area = bfd_alloc (abfd, size);
+
if (!area)
return (NULL);
if (bfd_seek (abfd, where, SEEK_SET) != 0
|| bfd_bread (area, size, abfd) != size)
return (NULL);
return (area);
-} /* buy_and_read() */
+}
/*
SUBSUBSECTION
@@ -4406,31 +4231,27 @@ SUBSUBSECTION
pointing its...
How does this work ?
-
*/
static bfd_boolean
-coff_slurp_line_table (abfd, asect)
- bfd *abfd;
- asection *asect;
+coff_slurp_line_table (bfd *abfd, asection *asect)
{
LINENO *native_lineno;
alent *lineno_cache;
bfd_size_type amt;
- BFD_ASSERT (asect->lineno == (alent *) NULL);
+ BFD_ASSERT (asect->lineno == NULL);
amt = (bfd_size_type) bfd_coff_linesz (abfd) * asect->lineno_count;
native_lineno = (LINENO *) buy_and_read (abfd, asect->line_filepos, amt);
if (native_lineno == NULL)
{
(*_bfd_error_handler)
- (_("%s: warning: line number table read failed"),
- bfd_archive_filename (abfd));
+ (_("%B: warning: line number table read failed"), abfd);
return FALSE;
}
amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent);
- lineno_cache = (alent *) bfd_alloc (abfd, amt);
+ lineno_cache = bfd_alloc (abfd, amt);
if (lineno_cache == NULL)
return FALSE;
else
@@ -4458,8 +4279,8 @@ coff_slurp_line_table (abfd, asect)
|| (bfd_vma) symndx >= obj_raw_syment_count (abfd))
{
(*_bfd_error_handler)
- (_("%s: warning: illegal symbol index %ld in line numbers"),
- bfd_archive_filename (abfd), dst.l_addr.l_symndx);
+ (_("%B: warning: illegal symbol index %ld in line numbers"),
+ abfd, dst.l_addr.l_symndx);
symndx = 0;
warned = TRUE;
}
@@ -4472,17 +4293,14 @@ coff_slurp_line_table (abfd, asect)
if (sym->lineno != NULL && ! warned)
{
(*_bfd_error_handler)
- (_("%s: warning: duplicate line number information for `%s'"),
- bfd_archive_filename (abfd),
- bfd_asymbol_name (&sym->symbol));
+ (_("%B: warning: duplicate line number information for `%s'"),
+ abfd, bfd_asymbol_name (&sym->symbol));
}
sym->lineno = cache_ptr;
}
else
- {
- cache_ptr->u.offset = dst.l_addr.l_paddr
- - bfd_section_vma (abfd, asect);
- } /* If no linenumber expect a symbol index */
+ cache_ptr->u.offset = dst.l_addr.l_paddr
+ - bfd_section_vma (abfd, asect);
cache_ptr++;
src++;
@@ -4501,8 +4319,7 @@ coff_slurp_line_table (abfd, asect)
symbols via coff_link_add_symbols, rather than via this routine. */
static bfd_boolean
-coff_slurp_symbol_table (abfd)
- bfd * abfd;
+coff_slurp_symbol_table (bfd * abfd)
{
combined_entry_type *native_symbols;
coff_symbol_type *cached_area;
@@ -4520,13 +4337,13 @@ coff_slurp_symbol_table (abfd)
/* Allocate enough room for all the symbols in cached form. */
amt = obj_raw_syment_count (abfd);
amt *= sizeof (coff_symbol_type);
- cached_area = (coff_symbol_type *) bfd_alloc (abfd, amt);
+ cached_area = bfd_alloc (abfd, amt);
if (cached_area == NULL)
return FALSE;
amt = obj_raw_syment_count (abfd);
amt *= sizeof (unsigned int);
- table_ptr = (unsigned int *) bfd_alloc (abfd, amt);
+ table_ptr = bfd_alloc (abfd, amt);
if (table_ptr == NULL)
return FALSE;
@@ -4554,11 +4371,6 @@ coff_slurp_symbol_table (abfd)
{
#ifdef I960
case C_LEAFEXT:
-#if 0
- dst->symbol.value = src->u.syment.n_value - dst->symbol.section->vma;
- dst->symbol.flags = BSF_EXPORT | BSF_GLOBAL;
- dst->symbol.flags |= BSF_NOT_AT_END | BSF_FUNCTION;
-#endif
/* Fall through to next case. */
#endif
@@ -4593,11 +4405,9 @@ coff_slurp_symbol_table (abfd)
- dst->symbol.section->vma);
#endif
if (ISFCN ((src->u.syment.n_type)))
- {
- /* A function ext does not go at the end of a
- file. */
- dst->symbol.flags |= BSF_NOT_AT_END | BSF_FUNCTION;
- }
+ /* A function ext does not go at the end of a
+ file. */
+ dst->symbol.flags |= BSF_NOT_AT_END | BSF_FUNCTION;
break;
case COFF_SYMBOL_COMMON:
@@ -4683,11 +4493,6 @@ coff_slurp_symbol_table (abfd)
case C_MOS: /* Member of structure. */
case C_EOS: /* End of structure. */
-#ifdef NOTDEF /* C_AUTOARG has the same value. */
-#ifdef C_GLBLREG
- case C_GLBLREG: /* A29k-specific storage class. */
-#endif
-#endif
case C_REGPARM: /* Register parameter. */
case C_REG: /* register variable. */
/* C_AUTOARG conflicts with TI COFF C_UEXT. */
@@ -4828,20 +4633,18 @@ coff_slurp_symbol_table (abfd)
case C_HIDDEN: /* Ext symbol in dmert public lib. */
default:
(*_bfd_error_handler)
- (_("%s: Unrecognized storage class %d for %s symbol `%s'"),
- bfd_archive_filename (abfd), src->u.syment.n_sclass,
+ (_("%B: Unrecognized storage class %d for %s symbol `%s'"),
+ abfd, src->u.syment.n_sclass,
dst->symbol.section->name, dst->symbol.name);
dst->symbol.flags = BSF_DEBUGGING;
dst->symbol.value = (src->u.syment.n_value);
break;
}
-/* BFD_ASSERT(dst->symbol.flags != 0);*/
-
dst->native = src;
dst->symbol.udata.i = 0;
- dst->lineno = (alent *) NULL;
+ dst->lineno = NULL;
this_index += (src->u.syment.n_numaux) + 1;
dst++;
number_of_symbols++;
@@ -4866,16 +4669,15 @@ coff_slurp_symbol_table (abfd)
}
return TRUE;
-} /* coff_slurp_symbol_table() */
+}
/* Classify a COFF symbol. A couple of targets have globally visible
symbols which are not class C_EXT, and this handles those. It also
recognizes some special PE cases. */
static enum coff_symbol_classification
-coff_classify_symbol (abfd, syment)
- bfd *abfd;
- struct internal_syment *syment;
+coff_classify_symbol (bfd *abfd,
+ struct internal_syment *syment)
{
/* FIXME: This partially duplicates the switch in
coff_slurp_symbol_table. */
@@ -4913,18 +4715,15 @@ coff_classify_symbol (abfd, syment)
if (syment->n_sclass == C_STAT)
{
if (syment->n_scnum == 0)
- {
- /* The Microsoft compiler sometimes generates these if a
- small static function is inlined every time it is used.
- The function is discarded, but the symbol table entry
- remains. */
- return COFF_SYMBOL_LOCAL;
- }
+ /* The Microsoft compiler sometimes generates these if a
+ small static function is inlined every time it is used.
+ The function is discarded, but the symbol table entry
+ remains. */
+ return COFF_SYMBOL_LOCAL;
#ifdef STRICT_PE_FORMAT
/* This is correct for Microsoft generated objects, but it
breaks gas generated objects. */
-
if (syment->n_value == 0)
{
asection *sec;
@@ -4955,15 +4754,13 @@ coff_classify_symbol (abfd, syment)
#endif /* COFF_WITH_PE */
/* If it is not a global symbol, we presume it is a local symbol. */
-
if (syment->n_scnum == 0)
{
char buf[SYMNMLEN + 1];
(*_bfd_error_handler)
- (_("warning: %s: local symbol `%s' has no section"),
- bfd_archive_filename (abfd),
- _bfd_coff_internal_syment_name (abfd, syment, buf));
+ (_("warning: %B: local symbol `%s' has no section"),
+ abfd, _bfd_coff_internal_syment_name (abfd, syment, buf));
}
return COFF_SYMBOL_LOCAL;
@@ -4994,23 +4791,23 @@ SUBSUBSECTION
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.
-
*/
#ifndef CALC_ADDEND
#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
{ \
- coff_symbol_type *coffsym = (coff_symbol_type *) NULL; \
+ coff_symbol_type *coffsym = NULL; \
+ \
if (ptr && bfd_asymbol_bfd (ptr) != abfd) \
coffsym = (obj_symbols (abfd) \
+ (cache_ptr->sym_ptr_ptr - symbols)); \
else if (ptr) \
coffsym = coff_symbol_from (abfd, ptr); \
- if (coffsym != (coff_symbol_type *) NULL \
+ if (coffsym != NULL \
&& coffsym->native->u.syment.n_scnum == 0) \
cache_ptr->addend = 0; \
else if (ptr && bfd_asymbol_bfd (ptr) == abfd \
- && ptr->section != (asection *) NULL) \
+ && ptr->section != NULL) \
cache_ptr->addend = - (ptr->section->vma + ptr->value); \
else \
cache_ptr->addend = 0; \
@@ -5018,10 +4815,7 @@ SUBSUBSECTION
#endif
static bfd_boolean
-coff_slurp_reloc_table (abfd, asect, symbols)
- bfd * abfd;
- sec_ptr asect;
- asymbol ** symbols;
+coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols)
{
RELOC *native_relocs;
arelent *reloc_cache;
@@ -5037,12 +4831,13 @@ coff_slurp_reloc_table (abfd, asect, symbols)
return TRUE;
if (!coff_slurp_symbol_table (abfd))
return FALSE;
+
amt = (bfd_size_type) bfd_coff_relsz (abfd) * asect->reloc_count;
native_relocs = (RELOC *) buy_and_read (abfd, asect->rel_filepos, amt);
amt = (bfd_size_type) asect->reloc_count * sizeof (arelent);
- reloc_cache = (arelent *) bfd_alloc (abfd, amt);
+ reloc_cache = bfd_alloc (abfd, amt);
- if (reloc_cache == NULL)
+ if (reloc_cache == NULL || native_relocs == NULL)
return FALSE;
for (idx = 0; idx < asect->reloc_count; idx++)
@@ -5068,8 +4863,8 @@ coff_slurp_reloc_table (abfd, asect, symbols)
if (dst.r_symndx < 0 || dst.r_symndx >= obj_conv_table_size (abfd))
{
(*_bfd_error_handler)
- (_("%s: warning: illegal symbol index %ld in relocs"),
- bfd_archive_filename (abfd), dst.r_symndx);
+ (_("%B: warning: illegal symbol index %ld in relocs"),
+ abfd, dst.r_symndx);
cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL;
}
@@ -5097,7 +4892,7 @@ coff_slurp_reloc_table (abfd, asect, symbols)
CALC_ADDEND (abfd, ptr, dst, cache_ptr);
cache_ptr->address -= asect->vma;
-/* !! cache_ptr->section = (asection *) NULL;*/
+ /* !! cache_ptr->section = NULL;*/
/* Fill in the cache_ptr->howto field from dst.r_type. */
RTYPE2HOWTO (cache_ptr, &dst);
@@ -5106,8 +4901,8 @@ coff_slurp_reloc_table (abfd, asect, symbols)
if (cache_ptr->howto == NULL)
{
(*_bfd_error_handler)
- (_("%s: illegal relocation type %d at address 0x%lx"),
- bfd_archive_filename (abfd), dst.r_type, (long) dst.r_vaddr);
+ (_("%B: illegal relocation type %d at address 0x%lx"),
+ abfd, dst.r_type, (long) dst.r_vaddr);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5126,19 +4921,13 @@ coff_slurp_reloc_table (abfd, asect, symbols)
always work. It is the responsibility of the including file to
make sure it is reasonable if it is needed. */
-static reloc_howto_type *coff_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
-
static reloc_howto_type *
-coff_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
- struct internal_syment *sym ATTRIBUTE_UNUSED;
- bfd_vma *addendp ATTRIBUTE_UNUSED;
+coff_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
+ struct internal_syment *sym ATTRIBUTE_UNUSED,
+ bfd_vma *addendp ATTRIBUTE_UNUSED)
{
arelent genrel;
@@ -5154,12 +4943,12 @@ coff_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
#endif /* ! defined (coff_rtype_to_howto) */
/* This is stupid. This function should be a boolean predicate. */
+
static long
-coff_canonicalize_reloc (abfd, section, relptr, symbols)
- bfd * abfd;
- sec_ptr section;
- arelent ** relptr;
- asymbol ** symbols;
+coff_canonicalize_reloc (bfd * abfd,
+ sec_ptr section,
+ arelent ** relptr,
+ asymbol ** symbols)
{
arelent *tblptr = section->relocation;
unsigned int count = 0;
@@ -5191,29 +4980,15 @@ coff_canonicalize_reloc (abfd, section, relptr, symbols)
return section->reloc_count;
}
-#ifdef GNU960
-file_ptr
-coff_sym_filepos (abfd)
- bfd *abfd;
-{
- return obj_sym_filepos (abfd);
-}
-#endif
-
#ifndef coff_reloc16_estimate
#define coff_reloc16_estimate dummy_reloc16_estimate
-static int dummy_reloc16_estimate
- PARAMS ((bfd *, asection *, arelent *, unsigned int,
- struct bfd_link_info *));
-
static int
-dummy_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- arelent *reloc ATTRIBUTE_UNUSED;
- unsigned int shrink ATTRIBUTE_UNUSED;
- struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+dummy_reloc16_estimate (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ arelent *reloc ATTRIBUTE_UNUSED,
+ unsigned int shrink ATTRIBUTE_UNUSED,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
{
abort ();
return 0;
@@ -5227,20 +5002,14 @@ dummy_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
/* This works even if abort is not declared in any header file. */
-static void dummy_reloc16_extra_cases
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
- bfd_byte *, unsigned int *, unsigned int *));
-
static void
-dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
- dst_ptr)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
- struct bfd_link_order *link_order ATTRIBUTE_UNUSED;
- arelent *reloc ATTRIBUTE_UNUSED;
- bfd_byte *data ATTRIBUTE_UNUSED;
- unsigned int *src_ptr ATTRIBUTE_UNUSED;
- unsigned int *dst_ptr ATTRIBUTE_UNUSED;
+dummy_reloc16_extra_cases (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ struct bfd_link_order *link_order ATTRIBUTE_UNUSED,
+ arelent *reloc ATTRIBUTE_UNUSED,
+ bfd_byte *data ATTRIBUTE_UNUSED,
+ unsigned int *src_ptr ATTRIBUTE_UNUSED,
+ unsigned int *dst_ptr ATTRIBUTE_UNUSED)
{
abort ();
}
@@ -5252,7 +5021,9 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
/* If coff_relocate_section is defined, we can use the optimized COFF
backend linker. Otherwise we must continue to use the old linker. */
+
#ifdef coff_relocate_section
+
#ifndef coff_bfd_link_hash_table_create
#define coff_bfd_link_hash_table_create _bfd_coff_link_hash_table_create
#endif
@@ -5262,7 +5033,9 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
#ifndef coff_bfd_final_link
#define coff_bfd_final_link _bfd_coff_final_link
#endif
+
#else /* ! defined (coff_relocate_section) */
+
#define coff_relocate_section NULL
#ifndef coff_bfd_link_hash_table_create
#define coff_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
@@ -5271,9 +5044,10 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
#define coff_bfd_link_add_symbols _bfd_generic_link_add_symbols
#endif
#define coff_bfd_final_link _bfd_generic_final_link
+
#endif /* ! defined (coff_relocate_section) */
-#define coff_bfd_link_just_syms _bfd_generic_link_just_syms
+#define coff_bfd_link_just_syms _bfd_generic_link_just_syms
#define coff_bfd_link_split_section _bfd_generic_link_split_section
#ifndef coff_start_final_link
@@ -5290,13 +5064,9 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
#ifndef coff_link_output_has_begun
-static bfd_boolean coff_link_output_has_begun
- PARAMS ((bfd *, struct coff_final_link_info *));
-
static bfd_boolean
-coff_link_output_has_begun (abfd, info)
- bfd * abfd;
- struct coff_final_link_info * info ATTRIBUTE_UNUSED;
+coff_link_output_has_begun (bfd * abfd,
+ struct coff_final_link_info * info ATTRIBUTE_UNUSED)
{
return abfd->output_has_begun;
}
@@ -5304,13 +5074,9 @@ coff_link_output_has_begun (abfd, info)
#ifndef coff_final_link_postscript
-static bfd_boolean coff_final_link_postscript
- PARAMS ((bfd *, struct coff_final_link_info *));
-
static bfd_boolean
-coff_final_link_postscript (abfd, pfinfo)
- bfd * abfd ATTRIBUTE_UNUSED;
- struct coff_final_link_info * pfinfo ATTRIBUTE_UNUSED;
+coff_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED,
+ struct coff_final_link_info * pfinfo ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -5359,7 +5125,7 @@ coff_final_link_postscript (abfd, pfinfo)
#define coff_SWAP_scnhdr_in coff_swap_scnhdr_in
#endif
-static const bfd_coff_backend_data bfd_coff_std_swap_table =
+static const bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED =
{
coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
coff_SWAP_aux_out, coff_SWAP_sym_out,
@@ -5401,6 +5167,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
#ifdef TICOFF
/* COFF0 differs in file/section header size and relocation entry size. */
+
static const bfd_coff_backend_data ticoff0_swap_table =
{
coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
@@ -5444,6 +5211,7 @@ static const bfd_coff_backend_data ticoff0_swap_table =
#ifdef TICOFF
/* COFF1 differs in section header size. */
+
static const bfd_coff_backend_data ticoff1_swap_table =
{
coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
@@ -5501,6 +5269,10 @@ static const bfd_coff_backend_data ticoff1_swap_table =
#define coff_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
#endif
+#ifndef coff_bfd_copy_private_header_data
+#define coff_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
+#endif
+
#ifndef coff_bfd_copy_private_section_data
#define coff_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
#endif
@@ -5525,6 +5297,10 @@ static const bfd_coff_backend_data ticoff1_swap_table =
#define coff_bfd_is_local_label_name _bfd_coff_is_local_label_name
#endif
+#ifndef coff_bfd_is_target_special_symbol
+#define coff_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
+#endif
+
#ifndef coff_read_minisymbols
#define coff_read_minisymbols _bfd_generic_read_minisymbols
#endif
@@ -5556,25 +5332,34 @@ static const bfd_coff_backend_data ticoff1_swap_table =
#define coff_bfd_merge_sections bfd_generic_merge_sections
#endif
+#ifndef coff_bfd_is_group_section
+#define coff_bfd_is_group_section bfd_generic_is_group_section
+#endif
+
#ifndef coff_bfd_discard_group
#define coff_bfd_discard_group bfd_generic_discard_group
#endif
+#ifndef coff_section_already_linked
+#define coff_section_already_linked \
+ _bfd_generic_section_already_linked
+#endif
+
#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \
const bfd_target VAR = \
{ \
NAME , \
bfd_target_coff_flavour, \
- BFD_ENDIAN_BIG, /* data byte order is big */ \
- BFD_ENDIAN_BIG, /* header byte order is big */ \
+ BFD_ENDIAN_BIG, /* Data byte order is big. */ \
+ BFD_ENDIAN_BIG, /* Header byte order is big. */ \
/* object flags */ \
(HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \
HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \
/* section flags */ \
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\
- UNDER, /* leading symbol underscore */ \
- '/', /* ar_pad_char */ \
- 15, /* ar_max_namelen */ \
+ UNDER, /* Leading symbol underscore. */ \
+ '/', /* AR_pad_char. */ \
+ 15, /* AR_max_namelen. */ \
\
/* Data conversion functions. */ \
bfd_getb64, bfd_getb_signed_64, bfd_putb64, \
@@ -5586,12 +5371,12 @@ const bfd_target VAR = \
bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
\
- /* bfd_check_format */ \
+ /* bfd_check_format. */ \
{ _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
_bfd_dummy_target }, \
- /* bfd_set_format */ \
+ /* bfd_set_format. */ \
{ bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
- /* bfd_write_contents */ \
+ /* bfd_write_contents. */ \
{ bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
bfd_false }, \
\
@@ -5615,16 +5400,16 @@ const bfd_target VAR = \
{ \
NAME , \
bfd_target_coff_flavour, \
- BFD_ENDIAN_LITTLE, /* data byte order is little */ \
- BFD_ENDIAN_BIG, /* header byte order is big */ \
+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */ \
+ BFD_ENDIAN_BIG, /* Header byte order is big. */ \
/* object flags */ \
(HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \
HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \
/* section flags */ \
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\
- UNDER, /* leading symbol underscore */ \
- '/', /* ar_pad_char */ \
- 15, /* ar_max_namelen */ \
+ UNDER, /* Leading symbol underscore. */ \
+ '/', /* AR_pad_char. */ \
+ 15, /* AR_max_namelen. */ \
\
/* Data conversion functions. */ \
bfd_getb64, bfd_getb_signed_64, bfd_putb64, \
@@ -5636,12 +5421,12 @@ const bfd_target VAR = \
bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
\
- /* bfd_check_format */ \
+ /* bfd_check_format. */ \
{ _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
_bfd_dummy_target }, \
- /* bfd_set_format */ \
+ /* bfd_set_format. */ \
{ bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
- /* bfd_write_contents */ \
+ /* bfd_write_contents. */ \
{ bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
bfd_false }, \
\
@@ -5665,16 +5450,16 @@ const bfd_target VAR = \
{ \
NAME , \
bfd_target_coff_flavour, \
- BFD_ENDIAN_LITTLE, /* data byte order is little */ \
- BFD_ENDIAN_LITTLE, /* header byte order is little */ \
+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */ \
+ BFD_ENDIAN_LITTLE, /* Header byte order is little. */ \
/* object flags */ \
(HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \
HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \
/* section flags */ \
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\
- UNDER, /* leading symbol underscore */ \
- '/', /* ar_pad_char */ \
- 15, /* ar_max_namelen */ \
+ UNDER, /* Leading symbol underscore. */ \
+ '/', /* AR_pad_char. */ \
+ 15, /* AR_max_namelen. */ \
\
/* Data conversion functions. */ \
bfd_getl64, bfd_getl_signed_64, bfd_putl64, \
@@ -5684,12 +5469,12 @@ const bfd_target VAR = \
bfd_getl64, bfd_getl_signed_64, bfd_putl64, \
bfd_getl32, bfd_getl_signed_32, bfd_putl32, \
bfd_getl16, bfd_getl_signed_16, bfd_putl16, \
- /* bfd_check_format */ \
+ /* bfd_check_format. */ \
{ _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
_bfd_dummy_target }, \
- /* bfd_set_format */ \
+ /* bfd_set_format. */ \
{ bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
- /* bfd_write_contents */ \
+ /* bfd_write_contents. */ \
{ bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
bfd_false }, \
\
diff --git a/contrib/binutils/bfd/coffgen.c b/contrib/binutils/bfd/coffgen.c
index a712b4b36e3d..c541e6a590eb 100644
--- a/contrib/binutils/bfd/coffgen.c
+++ b/contrib/binutils/bfd/coffgen.c
@@ -1,24 +1,24 @@
/* Support for the generic parts of COFF, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Most of this hacked by Steve Chamberlain, sac@cygnus.com.
Split out of coffcode.h by Ian Taylor, ian@cygnus.com. */
@@ -43,42 +43,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/internal.h"
#include "libcoff.h"
-static void coff_fix_symbol_name
- PARAMS ((bfd *, asymbol *, combined_entry_type *, bfd_size_type *,
- asection **, bfd_size_type *));
-static bfd_boolean coff_write_symbol
- PARAMS ((bfd *, asymbol *, combined_entry_type *, bfd_vma *,
- bfd_size_type *, asection **, bfd_size_type *));
-static bfd_boolean coff_write_alien_symbol
- PARAMS ((bfd *, asymbol *, bfd_vma *, bfd_size_type *,
- asection **, bfd_size_type *));
-static bfd_boolean coff_write_native_symbol
- PARAMS ((bfd *, coff_symbol_type *, bfd_vma *, bfd_size_type *,
- asection **, bfd_size_type *));
-static void coff_pointerize_aux
- PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
- unsigned int, combined_entry_type *));
-static bfd_boolean make_a_section_from_file
- PARAMS ((bfd *, struct internal_scnhdr *, unsigned int));
-static const bfd_target *coff_real_object_p
- PARAMS ((bfd *, unsigned, struct internal_filehdr *,
- struct internal_aouthdr *));
-static void fixup_symbol_value
- PARAMS ((bfd *, coff_symbol_type *, struct internal_syment *));
-static char *build_debug_section
- PARAMS ((bfd *));
-static char *copy_name
- PARAMS ((bfd *, char *, size_t));
-
-#define STRING_SIZE_SIZE (4)
-
/* Take a section header read from a coff file (in HOST byte order),
and make a BFD "section" out of it. This is used by ECOFF. */
+
static bfd_boolean
-make_a_section_from_file (abfd, hdr, target_index)
- bfd *abfd;
- struct internal_scnhdr *hdr;
- unsigned int target_index;
+make_a_section_from_file (bfd *abfd,
+ struct internal_scnhdr *hdr,
+ unsigned int target_index)
{
asection *return_section;
char *name;
@@ -131,7 +102,7 @@ make_a_section_from_file (abfd, hdr, target_index)
return_section->vma = hdr->s_vaddr;
return_section->lma = hdr->s_paddr;
- return_section->_raw_size = hdr->s_size;
+ return_section->size = hdr->s_size;
return_section->filepos = hdr->s_scnptr;
return_section->rel_filepos = hdr->s_relptr;
return_section->reloc_count = hdr->s_nreloc;
@@ -142,7 +113,7 @@ make_a_section_from_file (abfd, hdr, target_index)
return_section->lineno_count = hdr->s_nlnno;
return_section->userdata = NULL;
- return_section->next = (asection *) NULL;
+ return_section->next = NULL;
return_section->target_index = target_index;
if (! bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name, return_section,
@@ -158,7 +129,7 @@ make_a_section_from_file (abfd, hdr, target_index)
if (hdr->s_nreloc != 0)
return_section->flags |= SEC_RELOC;
- /* FIXME: should this check 'hdr->s_size > 0' */
+ /* FIXME: should this check 'hdr->s_size > 0'. */
if (hdr->s_scnptr != 0)
return_section->flags |= SEC_HAS_CONTENTS;
@@ -169,17 +140,16 @@ make_a_section_from_file (abfd, hdr, target_index)
ECOFF as well. */
static const bfd_target *
-coff_real_object_p (abfd, nscns, internal_f, internal_a)
- bfd *abfd;
- unsigned nscns;
- struct internal_filehdr *internal_f;
- struct internal_aouthdr *internal_a;
+coff_real_object_p (bfd *abfd,
+ unsigned nscns,
+ struct internal_filehdr *internal_f,
+ struct internal_aouthdr *internal_a)
{
flagword oflags = abfd->flags;
bfd_vma ostart = bfd_get_start_address (abfd);
- PTR tdata;
- PTR tdata_save;
- bfd_size_type readsize; /* length of file_info */
+ void * tdata;
+ void * tdata_save;
+ bfd_size_type readsize; /* Length of file_info. */
unsigned int scnhsz;
char *external_sections;
@@ -208,22 +178,22 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a)
/* Set up the tdata area. ECOFF uses its own routine, and overrides
abfd->flags. */
tdata_save = abfd->tdata.any;
- tdata = bfd_coff_mkobject_hook (abfd, (PTR) internal_f, (PTR) internal_a);
+ tdata = bfd_coff_mkobject_hook (abfd, (void *) internal_f, (void *) internal_a);
if (tdata == NULL)
goto fail2;
scnhsz = bfd_coff_scnhsz (abfd);
readsize = (bfd_size_type) nscns * scnhsz;
- external_sections = (char *) bfd_alloc (abfd, readsize);
+ external_sections = bfd_alloc (abfd, readsize);
if (!external_sections)
goto fail;
- if (bfd_bread ((PTR) external_sections, readsize, abfd) != readsize)
+ if (bfd_bread ((void *) external_sections, readsize, abfd) != readsize)
goto fail;
/* Set the arch/mach *before* swapping in sections; section header swapping
may depend on arch/mach info. */
- if (! bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f))
+ if (! bfd_coff_set_arch_mach_hook (abfd, (void *) internal_f))
goto fail;
/* Now copy data as required; construct all asections etc. */
@@ -234,8 +204,8 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a)
{
struct internal_scnhdr tmp;
bfd_coff_swap_scnhdr_in (abfd,
- (PTR) (external_sections + i * scnhsz),
- (PTR) & tmp);
+ (void *) (external_sections + i * scnhsz),
+ (void *) & tmp);
if (! make_a_section_from_file (abfd, &tmp, i + 1))
goto fail;
}
@@ -256,17 +226,16 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a)
not a COFF file. This is also used by ECOFF. */
const bfd_target *
-coff_object_p (abfd)
- bfd *abfd;
+coff_object_p (bfd *abfd)
{
bfd_size_type filhsz;
bfd_size_type aoutsz;
unsigned int nscns;
- PTR filehdr;
+ void * filehdr;
struct internal_filehdr internal_f;
struct internal_aouthdr internal_a;
- /* figure out how much to read */
+ /* Figure out how much to read. */
filhsz = bfd_coff_filhsz (abfd);
aoutsz = bfd_coff_aoutsz (abfd);
@@ -301,7 +270,7 @@ coff_object_p (abfd)
if (internal_f.f_opthdr)
{
- PTR opthdr;
+ void * opthdr;
opthdr = bfd_alloc (abfd, aoutsz);
if (opthdr == NULL)
@@ -312,7 +281,7 @@ coff_object_p (abfd)
bfd_release (abfd, opthdr);
return NULL;
}
- bfd_coff_swap_aouthdr_in (abfd, opthdr, (PTR) &internal_a);
+ bfd_coff_swap_aouthdr_in (abfd, opthdr, (void *) &internal_a);
bfd_release (abfd, opthdr);
}
@@ -325,9 +294,7 @@ coff_object_p (abfd)
/* Get the BFD section from a COFF symbol section number. */
asection *
-coff_section_from_bfd_index (abfd, index)
- bfd *abfd;
- int index;
+coff_section_from_bfd_index (bfd *abfd, int index)
{
struct bfd_section *answer = abfd->sections;
@@ -353,8 +320,7 @@ coff_section_from_bfd_index (abfd, index)
/* Get the upper bound of a COFF symbol table. */
long
-coff_get_symtab_upper_bound (abfd)
- bfd *abfd;
+coff_get_symtab_upper_bound (bfd *abfd)
{
if (!bfd_coff_slurp_symbol_table (abfd))
return -1;
@@ -365,9 +331,7 @@ coff_get_symtab_upper_bound (abfd)
/* Canonicalize a COFF symbol table. */
long
-coff_canonicalize_symtab (abfd, alocation)
- bfd *abfd;
- asymbol **alocation;
+coff_canonicalize_symtab (bfd *abfd, asymbol **alocation)
{
unsigned int counter;
coff_symbol_type *symbase;
@@ -390,10 +354,9 @@ coff_canonicalize_symtab (abfd, alocation)
>= SYMNMLEN + 1. */
const char *
-_bfd_coff_internal_syment_name (abfd, sym, buf)
- bfd *abfd;
- const struct internal_syment *sym;
- char *buf;
+_bfd_coff_internal_syment_name (bfd *abfd,
+ const struct internal_syment *sym,
+ char *buf)
{
/* FIXME: It's not clear this will work correctly if sizeof
(_n_zeroes) != 4. */
@@ -430,14 +393,12 @@ _bfd_coff_internal_syment_name (abfd, sym, buf)
value must be INTERNAL_RELOCS. The function returns NULL on error. */
struct internal_reloc *
-_bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
- require_internal, internal_relocs)
- bfd *abfd;
- asection *sec;
- bfd_boolean cache;
- bfd_byte *external_relocs;
- bfd_boolean require_internal;
- struct internal_reloc *internal_relocs;
+_bfd_coff_read_internal_relocs (bfd *abfd,
+ asection *sec,
+ bfd_boolean cache,
+ bfd_byte *external_relocs,
+ bfd_boolean require_internal,
+ struct internal_reloc *internal_relocs)
{
bfd_size_type relsz;
bfd_byte *free_external = NULL;
@@ -462,7 +423,7 @@ _bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
amt = sec->reloc_count * relsz;
if (external_relocs == NULL)
{
- free_external = (bfd_byte *) bfd_malloc (amt);
+ free_external = bfd_malloc (amt);
if (free_external == NULL && sec->reloc_count > 0)
goto error_return;
external_relocs = free_external;
@@ -476,7 +437,7 @@ _bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
{
amt = sec->reloc_count;
amt *= sizeof (struct internal_reloc);
- free_internal = (struct internal_reloc *) bfd_malloc (amt);
+ free_internal = bfd_malloc (amt);
if (free_internal == NULL && sec->reloc_count > 0)
goto error_return;
internal_relocs = free_internal;
@@ -487,7 +448,7 @@ _bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
erel_end = erel + relsz * sec->reloc_count;
irel = internal_relocs;
for (; erel < erel_end; erel += relsz, irel++)
- bfd_coff_swap_reloc_in (abfd, (PTR) erel, (PTR) irel);
+ bfd_coff_swap_reloc_in (abfd, (void *) erel, (void *) irel);
if (free_external != NULL)
{
@@ -500,7 +461,7 @@ _bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
if (coff_section_data (abfd, sec) == NULL)
{
amt = sizeof (struct coff_section_tdata);
- sec->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+ sec->used_by_bfd = bfd_zalloc (abfd, amt);
if (sec->used_by_bfd == NULL)
goto error_return;
coff_section_data (abfd, sec)->contents = NULL;
@@ -521,8 +482,7 @@ _bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
/* Set lineno_count for the output sections of a COFF file. */
int
-coff_count_linenumbers (abfd)
- bfd *abfd;
+coff_count_linenumbers (bfd *abfd)
{
unsigned int limit = bfd_get_symcount (abfd);
unsigned int i;
@@ -583,9 +543,8 @@ coff_count_linenumbers (abfd)
area of the symbol if there is one. */
coff_symbol_type *
-coff_symbol_from (ignore_abfd, symbol)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- asymbol *symbol;
+coff_symbol_from (bfd *ignore_abfd ATTRIBUTE_UNUSED,
+ asymbol *symbol)
{
if (!bfd_family_coff (bfd_asymbol_bfd (symbol)))
return (coff_symbol_type *) NULL;
@@ -597,16 +556,14 @@ coff_symbol_from (ignore_abfd, symbol)
}
static void
-fixup_symbol_value (abfd, coff_symbol_ptr, syment)
- bfd *abfd;
- coff_symbol_type *coff_symbol_ptr;
- struct internal_syment *syment;
+fixup_symbol_value (bfd *abfd,
+ coff_symbol_type *coff_symbol_ptr,
+ struct internal_syment *syment)
{
-
- /* Normalize the symbol flags */
+ /* Normalize the symbol flags. */
if (bfd_is_com_section (coff_symbol_ptr->symbol.section))
{
- /* a common symbol is undefined with a value */
+ /* A common symbol is undefined with a value. */
syment->n_scnum = N_UNDEF;
syment->n_value = coff_symbol_ptr->symbol.value;
}
@@ -655,14 +612,12 @@ fixup_symbol_value (abfd, coff_symbol_ptr, syment)
do that here too. */
bfd_boolean
-coff_renumber_symbols (bfd_ptr, first_undef)
- bfd *bfd_ptr;
- int *first_undef;
+coff_renumber_symbols (bfd *bfd_ptr, int *first_undef)
{
unsigned int symbol_count = bfd_get_symcount (bfd_ptr);
asymbol **symbol_ptr_ptr = bfd_ptr->outsymbols;
unsigned int native_index = 0;
- struct internal_syment *last_file = (struct internal_syment *) NULL;
+ struct internal_syment *last_file = NULL;
unsigned int symbol_index;
/* COFF demands that undefined symbols come after all other symbols.
@@ -681,7 +636,7 @@ coff_renumber_symbols (bfd_ptr, first_undef)
bfd_size_type amt;
amt = sizeof (asymbol *) * ((bfd_size_type) symbol_count + 1);
- newsyms = (asymbol **) bfd_alloc (bfd_ptr, amt);
+ newsyms = bfd_alloc (bfd_ptr, amt);
if (!newsyms)
return FALSE;
bfd_ptr->outsymbols = newsyms;
@@ -724,26 +679,22 @@ coff_renumber_symbols (bfd_ptr, first_undef)
if (s->u.syment.n_sclass == C_FILE)
{
- if (last_file != (struct internal_syment *) NULL)
+ if (last_file != NULL)
last_file->n_value = native_index;
last_file = &(s->u.syment);
}
else
- {
+ /* Modify the symbol values according to their section and
+ type. */
+ fixup_symbol_value (bfd_ptr, coff_symbol_ptr, &(s->u.syment));
- /* Modify the symbol values according to their section and
- type */
-
- fixup_symbol_value (bfd_ptr, coff_symbol_ptr, &(s->u.syment));
- }
for (i = 0; i < s->u.syment.n_numaux + 1; i++)
s[i].offset = native_index++;
}
else
- {
- native_index++;
- }
+ native_index++;
}
+
obj_conv_table_size (bfd_ptr) = native_index;
return TRUE;
@@ -754,8 +705,7 @@ coff_renumber_symbols (bfd_ptr, first_undef)
symbol table. */
void
-coff_mangle_symbols (bfd_ptr)
- bfd *bfd_ptr;
+coff_mangle_symbols (bfd *bfd_ptr)
{
unsigned int symbol_count = bfd_get_symcount (bfd_ptr);
asymbol **symbol_ptr_ptr = bfd_ptr->outsymbols;
@@ -818,22 +768,20 @@ coff_mangle_symbols (bfd_ptr)
}
static void
-coff_fix_symbol_name (abfd, symbol, native, string_size_p,
- debug_string_section_p, debug_string_size_p)
- bfd *abfd;
- asymbol *symbol;
- combined_entry_type *native;
- bfd_size_type *string_size_p;
- asection **debug_string_section_p;
- bfd_size_type *debug_string_size_p;
+coff_fix_symbol_name (bfd *abfd,
+ asymbol *symbol,
+ combined_entry_type *native,
+ bfd_size_type *string_size_p,
+ asection **debug_string_section_p,
+ bfd_size_type *debug_string_size_p)
{
unsigned int name_length;
union internal_auxent *auxent;
char *name = (char *) (symbol->name);
- if (name == (char *) NULL)
+ if (name == NULL)
{
- /* coff symbols always have names, so we'll make one up */
+ /* COFF symbols always have names, so we'll make one up. */
symbol->name = "strange";
name = (char *) symbol->name;
}
@@ -861,9 +809,7 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
if (bfd_coff_long_filenames (abfd))
{
if (name_length <= filnmlen)
- {
- strncpy (auxent->x_file.x_fname, name, filnmlen);
- }
+ strncpy (auxent->x_file.x_fname, name, filnmlen);
else
{
auxent->x_file.x_n.x_offset = *string_size_p + STRING_SIZE_SIZE;
@@ -881,10 +827,9 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
else
{
if (name_length <= SYMNMLEN && !bfd_coff_force_symnames_in_strings (abfd))
- {
- /* This name will fit into the symbol neatly */
- strncpy (native->u.syment._n._n_name, symbol->name, SYMNMLEN);
- }
+ /* This name will fit into the symbol neatly. */
+ strncpy (native->u.syment._n._n_name, symbol->name, SYMNMLEN);
+
else if (!bfd_coff_symname_in_debug (abfd, &native->u.syment))
{
native->u.syment._n._n_n._n_offset = (*string_size_p
@@ -913,12 +858,12 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
if (!bfd_set_section_contents (abfd,
*debug_string_section_p,
- (PTR) buf,
+ (void *) buf,
(file_ptr) *debug_string_size_p,
(bfd_size_type) prefix_len)
|| !bfd_set_section_contents (abfd,
*debug_string_section_p,
- (PTR) symbol->name,
+ (void *) symbol->name,
(file_ptr) (*debug_string_size_p
+ prefix_len),
(bfd_size_type) name_length + 1))
@@ -942,20 +887,18 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
/* Write a symbol out to a COFF file. */
static bfd_boolean
-coff_write_symbol (abfd, symbol, native, written, string_size_p,
- debug_string_section_p, debug_string_size_p)
- bfd *abfd;
- asymbol *symbol;
- combined_entry_type *native;
- bfd_vma *written;
- bfd_size_type *string_size_p;
- asection **debug_string_section_p;
- bfd_size_type *debug_string_size_p;
+coff_write_symbol (bfd *abfd,
+ asymbol *symbol,
+ combined_entry_type *native,
+ bfd_vma *written,
+ bfd_size_type *string_size_p,
+ asection **debug_string_section_p,
+ bfd_size_type *debug_string_size_p)
{
unsigned int numaux = native->u.syment.n_numaux;
int type = native->u.syment.n_type;
int class = native->u.syment.n_sclass;
- PTR buf;
+ void * buf;
bfd_size_type symesz;
if (native->u.syment.n_sclass == C_FILE)
@@ -963,22 +906,17 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
if (symbol->flags & BSF_DEBUGGING
&& bfd_is_abs_section (symbol->section))
- {
- native->u.syment.n_scnum = N_DEBUG;
- }
+ native->u.syment.n_scnum = N_DEBUG;
+
else if (bfd_is_abs_section (symbol->section))
- {
- native->u.syment.n_scnum = N_ABS;
- }
+ native->u.syment.n_scnum = N_ABS;
+
else if (bfd_is_und_section (symbol->section))
- {
- native->u.syment.n_scnum = N_UNDEF;
- }
+ native->u.syment.n_scnum = N_UNDEF;
+
else
- {
- native->u.syment.n_scnum =
- symbol->section->output_section->target_index;
- }
+ native->u.syment.n_scnum =
+ symbol->section->output_section->target_index;
coff_fix_symbol_name (abfd, symbol, native, string_size_p,
debug_string_section_p, debug_string_size_p);
@@ -1005,9 +943,7 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
{
bfd_coff_swap_aux_out (abfd,
&((native + j + 1)->u.auxent),
- type,
- class,
- (int) j,
+ type, class, (int) j,
native->u.syment.n_numaux,
buf);
if (bfd_bwrite (buf, auxesz, abfd) != auxesz)
@@ -1028,14 +964,12 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
or we may be linking a non COFF file to a COFF file. */
static bfd_boolean
-coff_write_alien_symbol (abfd, symbol, written, string_size_p,
- debug_string_section_p, debug_string_size_p)
- bfd *abfd;
- asymbol *symbol;
- bfd_vma *written;
- bfd_size_type *string_size_p;
- asection **debug_string_section_p;
- bfd_size_type *debug_string_size_p;
+coff_write_alien_symbol (bfd *abfd,
+ asymbol *symbol,
+ bfd_vma *written,
+ bfd_size_type *string_size_p,
+ asection **debug_string_section_p,
+ bfd_size_type *debug_string_size_p)
{
combined_entry_type *native;
combined_entry_type dummy;
@@ -1096,14 +1030,12 @@ coff_write_alien_symbol (abfd, symbol, written, string_size_p,
/* Write a native symbol to a COFF file. */
static bfd_boolean
-coff_write_native_symbol (abfd, symbol, written, string_size_p,
- debug_string_section_p, debug_string_size_p)
- bfd *abfd;
- coff_symbol_type *symbol;
- bfd_vma *written;
- bfd_size_type *string_size_p;
- asection **debug_string_section_p;
- bfd_size_type *debug_string_size_p;
+coff_write_native_symbol (bfd *abfd,
+ coff_symbol_type *symbol,
+ bfd_vma *written,
+ bfd_size_type *string_size_p,
+ asection **debug_string_section_p,
+ bfd_size_type *debug_string_size_p)
{
combined_entry_type *native = symbol->native;
alent *lineno = symbol->lineno;
@@ -1114,6 +1046,7 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p,
if (lineno && !symbol->done_lineno && symbol->symbol.section->owner != NULL)
{
unsigned int count = 0;
+
lineno[count].u.offset = *written;
if (native->u.syment.n_numaux)
{
@@ -1127,28 +1060,9 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p,
count++;
while (lineno[count].line_number != 0)
{
-#if 0
- /* 13 april 92. sac
- I've been told this, but still need proof:
- > The second bug is also in `bfd/coffcode.h'. This bug
- > causes the linker to screw up the pc-relocations for
- > all the line numbers in COFF code. This bug isn't only
- > specific to A29K implementations, but affects all
- > systems using COFF format binaries. Note that in COFF
- > object files, the line number core offsets output by
- > the assembler are relative to the start of each
- > procedure, not to the start of the .text section. This
- > patch relocates the line numbers relative to the
- > `native->u.syment.n_value' instead of the section
- > virtual address.
- > modular!olson@cs.arizona.edu (Jon Olson)
- */
- lineno[count].u.offset += native->u.syment.n_value;
-#else
lineno[count].u.offset +=
(symbol->symbol.section->output_section->vma
+ symbol->symbol.section->output_offset);
-#endif
count++;
}
symbol->done_lineno = TRUE;
@@ -1166,15 +1080,14 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p,
/* Write out the COFF symbols. */
bfd_boolean
-coff_write_symbols (abfd)
- bfd *abfd;
+coff_write_symbols (bfd *abfd)
{
bfd_size_type string_size;
asection *debug_string_section;
bfd_size_type debug_string_size;
unsigned int i;
unsigned int limit = bfd_get_symcount (abfd);
- bfd_signed_vma written = 0;
+ bfd_vma written = 0;
asymbol **p;
string_size = 0;
@@ -1199,12 +1112,11 @@ coff_write_symbols (abfd)
}
}
- /* Seek to the right place */
+ /* Seek to the right place. */
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
return FALSE;
- /* Output all the symbols we have */
-
+ /* Output all the symbols we have. */
written = 0;
for (p = abfd->outsymbols, i = 0; i < limit; i++, p++)
{
@@ -1230,8 +1142,7 @@ coff_write_symbols (abfd)
obj_raw_syment_count (abfd) = written;
- /* Now write out strings */
-
+ /* Now write out strings. */
if (string_size != 0)
{
unsigned int size = string_size + STRING_SIZE_SIZE;
@@ -1242,7 +1153,7 @@ coff_write_symbols (abfd)
#else
#error Change H_PUT_32
#endif
- if (bfd_bwrite ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd)
+ if (bfd_bwrite ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd)
!= sizeof (buffer))
return FALSE;
@@ -1284,18 +1195,16 @@ coff_write_symbols (abfd)
if (c_symbol == NULL
|| c_symbol->native == NULL)
- {
- /* This is not a COFF symbol, so it certainly is not a
- file name, nor does it go in the .debug section. */
- maxlen = bfd_coff_force_symnames_in_strings (abfd) ? 0 : SYMNMLEN;
- }
+ /* This is not a COFF symbol, so it certainly is not a
+ file name, nor does it go in the .debug section. */
+ maxlen = bfd_coff_force_symnames_in_strings (abfd) ? 0 : SYMNMLEN;
+
else if (bfd_coff_symname_in_debug (abfd,
&c_symbol->native->u.syment))
- {
- /* This symbol name is in the XCOFF .debug section.
- Don't write it into the string table. */
- maxlen = name_length;
- }
+ /* This symbol name is in the XCOFF .debug section.
+ Don't write it into the string table. */
+ maxlen = name_length;
+
else if (c_symbol->native->u.syment.n_sclass == C_FILE
&& c_symbol->native->u.syment.n_numaux > 0)
{
@@ -1311,7 +1220,7 @@ coff_write_symbols (abfd)
if (name_length > maxlen)
{
- if (bfd_bwrite ((PTR) (q->name), (bfd_size_type) name_length + 1,
+ if (bfd_bwrite ((void *) (q->name), (bfd_size_type) name_length + 1,
abfd) != name_length + 1)
return FALSE;
}
@@ -1330,7 +1239,7 @@ coff_write_symbols (abfd)
#else
#error Change H_PUT_32
#endif
- if (bfd_bwrite ((PTR) buffer, (bfd_size_type) STRING_SIZE_SIZE, abfd)
+ if (bfd_bwrite ((void *) buffer, (bfd_size_type) STRING_SIZE_SIZE, abfd)
!= STRING_SIZE_SIZE)
return FALSE;
}
@@ -1344,18 +1253,17 @@ coff_write_symbols (abfd)
|| (debug_string_section != (asection *) NULL
&& (BFD_ALIGN (debug_string_size,
1 << debug_string_section->alignment_power)
- == bfd_section_size (abfd, debug_string_section))));
+ == debug_string_section->size)));
return TRUE;
}
bfd_boolean
-coff_write_linenumbers (abfd)
- bfd *abfd;
+coff_write_linenumbers (bfd *abfd)
{
asection *s;
bfd_size_type linesz;
- PTR buff;
+ void * buff;
linesz = bfd_coff_linesz (abfd);
buff = bfd_alloc (abfd, linesz);
@@ -1368,7 +1276,7 @@ coff_write_linenumbers (abfd)
asymbol **q = abfd->outsymbols;
if (bfd_seek (abfd, s->line_filepos, SEEK_SET) != 0)
return FALSE;
- /* Find all the linenumbers in this section */
+ /* Find all the linenumbers in this section. */
while (*q)
{
asymbol *p = *q;
@@ -1379,9 +1287,9 @@ coff_write_linenumbers (abfd)
(bfd_asymbol_bfd (p), p));
if (l)
{
- /* Found a linenumber entry, output */
+ /* Found a linenumber entry, output. */
struct internal_lineno out;
- memset ((PTR) & out, 0, sizeof (out));
+ memset ((void *) & out, 0, sizeof (out));
out.l_lnno = 0;
out.l_addr.l_symndx = l->u.offset;
bfd_coff_swap_lineno_out (abfd, &out, buff);
@@ -1410,76 +1318,20 @@ coff_write_linenumbers (abfd)
}
alent *
-coff_get_lineno (ignore_abfd, symbol)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- asymbol *symbol;
+coff_get_lineno (bfd *ignore_abfd ATTRIBUTE_UNUSED, asymbol *symbol)
{
return coffsymbol (symbol)->lineno;
}
-#if 0
-
-/* This is only called from coff_add_missing_symbols, which has been
- disabled. */
-
-asymbol *
-coff_section_symbol (abfd, name)
- bfd *abfd;
- char *name;
-{
- asection *sec = bfd_make_section_old_way (abfd, name);
- asymbol *sym;
- combined_entry_type *csym;
-
- sym = sec->symbol;
- csym = coff_symbol_from (abfd, sym)->native;
- /* Make sure back-end COFF stuff is there. */
- if (csym == 0)
- {
- struct foo
- {
- coff_symbol_type sym;
- /* @@FIXME This shouldn't use a fixed size!! */
- combined_entry_type e[10];
- };
- struct foo *f;
-
- f = (struct foo *) bfd_zalloc (abfd, (bfd_size_type) sizeof (*f));
- if (!f)
- {
- bfd_set_error (bfd_error_no_error);
- return NULL;
- }
- coff_symbol_from (abfd, sym)->native = csym = f->e;
- }
- csym[0].u.syment.n_sclass = C_STAT;
- csym[0].u.syment.n_numaux = 1;
-/* SF_SET_STATICS (sym); @@ ??? */
- csym[1].u.auxent.x_scn.x_scnlen = sec->_raw_size;
- csym[1].u.auxent.x_scn.x_nreloc = sec->reloc_count;
- csym[1].u.auxent.x_scn.x_nlinno = sec->lineno_count;
-
- if (sec->output_section == NULL)
- {
- sec->output_section = sec;
- sec->output_offset = 0;
- }
-
- return sym;
-}
-
-#endif /* 0 */
-
/* This function transforms the offsets into the symbol table into
pointers to syments. */
static void
-coff_pointerize_aux (abfd, table_base, symbol, indaux, auxent)
- bfd *abfd;
- combined_entry_type *table_base;
- combined_entry_type *symbol;
- unsigned int indaux;
- combined_entry_type *auxent;
+coff_pointerize_aux (bfd *abfd,
+ combined_entry_type *table_base,
+ combined_entry_type *symbol,
+ unsigned int indaux,
+ combined_entry_type *auxent)
{
unsigned int type = symbol->u.syment.n_type;
unsigned int class = symbol->u.syment.n_sclass;
@@ -1491,15 +1343,16 @@ coff_pointerize_aux (abfd, table_base, symbol, indaux, auxent)
return;
}
- /* Don't bother if this is a file or a section */
+ /* Don't bother if this is a file or a section. */
if (class == C_STAT && type == T_NULL)
return;
if (class == C_FILE)
return;
- /* Otherwise patch up */
-#define N_TMASK coff_data (abfd)->local_n_tmask
+ /* Otherwise patch up. */
+#define N_TMASK coff_data (abfd)->local_n_tmask
#define N_BTSHFT coff_data (abfd)->local_n_btshft
+
if ((ISFCN (type) || ISTAG (class) || class == C_BLOCK || class == C_FCN)
&& auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l > 0)
{
@@ -1522,8 +1375,7 @@ coff_pointerize_aux (abfd, table_base, symbol, indaux, auxent)
we didn't want to go to the trouble until someone needed it. */
static char *
-build_debug_section (abfd)
- bfd *abfd;
+build_debug_section (bfd *abfd)
{
char *debug_section;
file_ptr position;
@@ -1537,8 +1389,8 @@ build_debug_section (abfd)
return NULL;
}
- sec_size = bfd_get_section_size_before_reloc (sect);
- debug_section = (PTR) bfd_alloc (abfd, sec_size);
+ sec_size = sect->size;
+ debug_section = bfd_alloc (abfd, sec_size);
if (debug_section == NULL)
return NULL;
@@ -1557,25 +1409,20 @@ build_debug_section (abfd)
/* Return a pointer to a malloc'd copy of 'name'. 'name' may not be
\0-terminated, but will not exceed 'maxlen' characters. The copy *will*
be \0-terminated. */
+
static char *
-copy_name (abfd, name, maxlen)
- bfd *abfd;
- char *name;
- size_t maxlen;
+copy_name (bfd *abfd, char *name, size_t maxlen)
{
size_t len;
char *newname;
for (len = 0; len < maxlen; ++len)
- {
- if (name[len] == '\0')
- {
- break;
- }
- }
+ if (name[len] == '\0')
+ break;
+
+ if ((newname = bfd_alloc (abfd, (bfd_size_type) len + 1)) == NULL)
+ return NULL;
- if ((newname = (PTR) bfd_alloc (abfd, (bfd_size_type) len + 1)) == NULL)
- return (NULL);
strncpy (newname, name, len);
newname[len] = '\0';
return newname;
@@ -1584,12 +1431,11 @@ copy_name (abfd, name, maxlen)
/* Read in the external symbols. */
bfd_boolean
-_bfd_coff_get_external_symbols (abfd)
- bfd *abfd;
+_bfd_coff_get_external_symbols (bfd *abfd)
{
bfd_size_type symesz;
bfd_size_type size;
- PTR syms;
+ void * syms;
if (obj_coff_external_syms (abfd) != NULL)
return TRUE;
@@ -1598,7 +1444,7 @@ _bfd_coff_get_external_symbols (abfd)
size = obj_raw_syment_count (abfd) * symesz;
- syms = (PTR) bfd_malloc (size);
+ syms = bfd_malloc (size);
if (syms == NULL && size != 0)
return FALSE;
@@ -1620,8 +1466,7 @@ _bfd_coff_get_external_symbols (abfd)
detecting a missing string table in an archive. */
const char *
-_bfd_coff_read_string_table (abfd)
- bfd *abfd;
+_bfd_coff_read_string_table (bfd *abfd)
{
char extstrsize[STRING_SIZE_SIZE];
bfd_size_type strsize;
@@ -1663,13 +1508,12 @@ _bfd_coff_read_string_table (abfd)
if (strsize < STRING_SIZE_SIZE)
{
(*_bfd_error_handler)
- (_("%s: bad string table size %lu"), bfd_archive_filename (abfd),
- (unsigned long) strsize);
+ (_("%B: bad string table size %lu"), abfd, (unsigned long) strsize);
bfd_set_error (bfd_error_bad_value);
return NULL;
}
- strings = (char *) bfd_malloc (strsize);
+ strings = bfd_malloc (strsize);
if (strings == NULL)
return NULL;
@@ -1688,8 +1532,7 @@ _bfd_coff_read_string_table (abfd)
/* Free up the external symbols and strings read from a COFF file. */
bfd_boolean
-_bfd_coff_free_symbols (abfd)
- bfd *abfd;
+_bfd_coff_free_symbols (bfd *abfd)
{
if (obj_coff_external_syms (abfd) != NULL
&& ! obj_coff_keep_syms (abfd))
@@ -1712,8 +1555,7 @@ _bfd_coff_free_symbols (abfd)
terminated string. */
combined_entry_type *
-coff_get_normalized_symtab (abfd)
- bfd *abfd;
+coff_get_normalized_symtab (bfd *abfd)
{
combined_entry_type *internal;
combined_entry_type *internal_ptr;
@@ -1730,7 +1572,7 @@ coff_get_normalized_symtab (abfd)
return obj_raw_syments (abfd);
size = obj_raw_syment_count (abfd) * sizeof (combined_entry_type);
- internal = (combined_entry_type *) bfd_zalloc (abfd, size);
+ internal = bfd_zalloc (abfd, size);
if (internal == NULL && size != 0)
return NULL;
internal_end = internal + obj_raw_syment_count (abfd);
@@ -1740,22 +1582,22 @@ coff_get_normalized_symtab (abfd)
raw_src = (char *) obj_coff_external_syms (abfd);
- /* mark the end of the symbols */
+ /* Mark the end of the symbols. */
symesz = bfd_coff_symesz (abfd);
raw_end = (char *) raw_src + obj_raw_syment_count (abfd) * symesz;
/* FIXME SOMEDAY. A string table size of zero is very weird, but
probably possible. If one shows up, it will probably kill us. */
- /* Swap all the raw entries */
+ /* Swap all the raw entries. */
for (internal_ptr = internal;
raw_src < raw_end;
raw_src += symesz, internal_ptr++)
{
unsigned int i;
- bfd_coff_swap_sym_in (abfd, (PTR) raw_src,
- (PTR) & internal_ptr->u.syment);
+ bfd_coff_swap_sym_in (abfd, (void *) raw_src,
+ (void *) & internal_ptr->u.syment);
symbol_ptr = internal_ptr;
for (i = 0;
@@ -1764,7 +1606,7 @@ coff_get_normalized_symtab (abfd)
{
internal_ptr++;
raw_src += symesz;
- bfd_coff_swap_aux_in (abfd, (PTR) raw_src,
+ bfd_coff_swap_aux_in (abfd, (void *) raw_src,
symbol_ptr->u.syment.n_type,
symbol_ptr->u.syment.n_sclass,
(int) i, symbol_ptr->u.syment.n_numaux,
@@ -1785,11 +1627,11 @@ coff_get_normalized_symtab (abfd)
if (internal_ptr->u.syment.n_sclass == C_FILE
&& internal_ptr->u.syment.n_numaux > 0)
{
- /* make a file symbol point to the name in the auxent, since
- the text ".file" is redundant */
+ /* Make a file symbol point to the name in the auxent, since
+ the text ".file" is redundant. */
if ((internal_ptr + 1)->u.auxent.x_file.x_n.x_zeroes == 0)
{
- /* the filename is a long one, point into the string table */
+ /* The filename is a long one, point into the string table. */
if (string_table == NULL)
{
string_table = _bfd_coff_read_string_table (abfd);
@@ -1809,21 +1651,17 @@ coff_get_normalized_symtab (abfd)
multiple AUX entries. */
if (internal_ptr->u.syment.n_numaux > 1
&& coff_data (abfd)->pe)
- {
- internal_ptr->u.syment._n._n_n._n_offset =
- ((long)
- copy_name (abfd,
- (internal_ptr + 1)->u.auxent.x_file.x_fname,
- internal_ptr->u.syment.n_numaux * symesz));
- }
+ internal_ptr->u.syment._n._n_n._n_offset =
+ ((long)
+ copy_name (abfd,
+ (internal_ptr + 1)->u.auxent.x_file.x_fname,
+ internal_ptr->u.syment.n_numaux * symesz));
else
- {
- internal_ptr->u.syment._n._n_n._n_offset =
- ((long)
- copy_name (abfd,
- (internal_ptr + 1)->u.auxent.x_file.x_fname,
- (size_t) bfd_coff_filnmlen (abfd)));
- }
+ internal_ptr->u.syment._n._n_n._n_offset =
+ ((long)
+ copy_name (abfd,
+ (internal_ptr + 1)->u.auxent.x_file.x_fname,
+ (size_t) bfd_coff_filnmlen (abfd)));
}
}
else
@@ -1834,15 +1672,15 @@ coff_get_normalized_symtab (abfd)
size_t i;
char *newstring;
- /* find the length of this string without walking into memory
+ /* Find the length of this string without walking into memory
that isn't ours. */
for (i = 0; i < 8; ++i)
if (internal_ptr->u.syment._n._n_name[i] == '\0')
break;
- newstring = (PTR) bfd_zalloc (abfd, (bfd_size_type) (i + 1));
+ newstring = bfd_zalloc (abfd, (bfd_size_type) (i + 1));
if (newstring == NULL)
- return (NULL);
+ return NULL;
strncpy (newstring, internal_ptr->u.syment._n._n_name, i);
internal_ptr->u.syment._n._n_n._n_offset = (long int) newstring;
internal_ptr->u.syment._n._n_n._n_zeroes = 0;
@@ -1880,13 +1718,11 @@ coff_get_normalized_symtab (abfd)
BFD_ASSERT (obj_raw_syment_count (abfd)
== (unsigned int) (internal_ptr - internal));
- return (internal);
-} /* coff_get_normalized_symtab() */
+ return internal;
+}
long
-coff_get_reloc_upper_bound (abfd, asect)
- bfd *abfd;
- sec_ptr asect;
+coff_get_reloc_upper_bound (bfd *abfd, sec_ptr asect)
{
if (bfd_get_format (abfd) != bfd_object)
{
@@ -1897,69 +1733,66 @@ coff_get_reloc_upper_bound (abfd, asect)
}
asymbol *
-coff_make_empty_symbol (abfd)
- bfd *abfd;
+coff_make_empty_symbol (bfd *abfd)
{
bfd_size_type amt = sizeof (coff_symbol_type);
- coff_symbol_type *new = (coff_symbol_type *) bfd_zalloc (abfd, amt);
+ coff_symbol_type *new = bfd_zalloc (abfd, amt);
+
if (new == NULL)
- return (NULL);
+ return NULL;
new->symbol.section = 0;
new->native = 0;
- new->lineno = (alent *) NULL;
+ new->lineno = NULL;
new->done_lineno = FALSE;
new->symbol.the_bfd = abfd;
- return &new->symbol;
+
+ return & new->symbol;
}
/* Make a debugging symbol. */
asymbol *
-coff_bfd_make_debug_symbol (abfd, ptr, sz)
- bfd *abfd;
- PTR ptr ATTRIBUTE_UNUSED;
- unsigned long sz ATTRIBUTE_UNUSED;
+coff_bfd_make_debug_symbol (bfd *abfd,
+ void * ptr ATTRIBUTE_UNUSED,
+ unsigned long sz ATTRIBUTE_UNUSED)
{
bfd_size_type amt = sizeof (coff_symbol_type);
- coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, amt);
+ coff_symbol_type *new = bfd_alloc (abfd, amt);
+
if (new == NULL)
- return (NULL);
+ return NULL;
/* @@ 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;
- new->native = (combined_entry_type *) bfd_zalloc (abfd, amt);
+ new->native = bfd_zalloc (abfd, amt);
if (!new->native)
- return (NULL);
+ return NULL;
new->symbol.section = bfd_abs_section_ptr;
new->symbol.flags = BSF_DEBUGGING;
- new->lineno = (alent *) NULL;
+ new->lineno = NULL;
new->done_lineno = FALSE;
new->symbol.the_bfd = abfd;
- return &new->symbol;
+
+ return & new->symbol;
}
void
-coff_get_symbol_info (abfd, symbol, ret)
- bfd *abfd;
- asymbol *symbol;
- symbol_info *ret;
+coff_get_symbol_info (bfd *abfd, asymbol *symbol, symbol_info *ret)
{
bfd_symbol_info (symbol, ret);
+
if (coffsymbol (symbol)->native != NULL
&& coffsymbol (symbol)->native->fix_value)
- {
- ret->value = coffsymbol (symbol)->native->u.syment.n_value -
- (unsigned long) obj_raw_syments (abfd);
- }
+ ret->value = coffsymbol (symbol)->native->u.syment.n_value -
+ (unsigned long) obj_raw_syments (abfd);
}
/* Return the COFF syment for a symbol. */
bfd_boolean
-bfd_coff_get_syment (abfd, symbol, psyment)
- bfd *abfd;
- asymbol *symbol;
- struct internal_syment *psyment;
+bfd_coff_get_syment (bfd *abfd,
+ asymbol *symbol,
+ struct internal_syment *psyment)
{
coff_symbol_type *csym;
@@ -1984,11 +1817,10 @@ bfd_coff_get_syment (abfd, symbol, psyment)
/* Return the COFF auxent for a symbol. */
bfd_boolean
-bfd_coff_get_auxent (abfd, symbol, indx, pauxent)
- bfd *abfd;
- asymbol *symbol;
- int indx;
- union internal_auxent *pauxent;
+bfd_coff_get_auxent (bfd *abfd,
+ asymbol *symbol,
+ int indx,
+ union internal_auxent *pauxent)
{
coff_symbol_type *csym;
combined_entry_type *ent;
@@ -2028,13 +1860,12 @@ bfd_coff_get_auxent (abfd, symbol, indx, pauxent)
/* Print out information about COFF symbol. */
void
-coff_print_symbol (abfd, filep, symbol, how)
- bfd *abfd;
- PTR filep;
- asymbol *symbol;
- bfd_print_symbol_type how;
+coff_print_symbol (bfd *abfd,
+ void * filep,
+ asymbol *symbol,
+ bfd_print_symbol_type how)
{
- FILE *file = (FILE *) filep;
+ FILE * file = (FILE *) filep;
switch (how)
{
@@ -2064,28 +1895,14 @@ coff_print_symbol (abfd, filep, symbol, how)
else
val = combined->u.syment.n_value - (unsigned long) root;
-#ifndef XCOFF64
- fprintf (file,
- "(sec %2d)(fl 0x%02x)(ty %3x)(scl %3d) (nx %d) 0x%08lx %s",
+ fprintf (file, "(sec %2d)(fl 0x%02x)(ty %3x)(scl %3d) (nx %d) 0x",
combined->u.syment.n_scnum,
combined->u.syment.n_flags,
combined->u.syment.n_type,
combined->u.syment.n_sclass,
- combined->u.syment.n_numaux,
- (unsigned long) val,
- symbol->name);
-#else
- /* Print out the wide, 64 bit, symbol value */
- fprintf (file,
- "(sec %2d)(fl 0x%02x)(ty %3x)(scl %3d) (nx %d) 0x%016llx %s",
- combined->u.syment.n_scnum,
- combined->u.syment.n_flags,
- combined->u.syment.n_type,
- combined->u.syment.n_sclass,
- combined->u.syment.n_numaux,
- val,
- symbol->name);
-#endif
+ combined->u.syment.n_numaux);
+ fprintf_vma (file, val);
+ fprintf (file, " %s", symbol->name);
for (aux = 0; aux < combined->u.syment.n_numaux; aux++)
{
@@ -2110,7 +1927,7 @@ coff_print_symbol (abfd, filep, symbol, how)
case C_STAT:
if (combined->u.syment.n_type == T_NULL)
- /* probably a section symbol? */
+ /* Probably a section symbol ? */
{
fprintf (file, "AUX scnlen 0x%lx nreloc %d nlnno %d",
(long) auxp->u.auxent.x_scn.x_scnlen,
@@ -2125,7 +1942,7 @@ coff_print_symbol (abfd, filep, symbol, how)
auxp->u.auxent.x_scn.x_comdat);
break;
}
- /* else fall through */
+ /* Otherwise fall through. */
case C_EXT:
if (ISFCN (combined->u.syment.n_type))
{
@@ -2143,7 +1960,7 @@ coff_print_symbol (abfd, filep, symbol, how)
llnos, next);
break;
}
- /* else fall through */
+ /* Otherwise fall through. */
default:
fprintf (file, "AUX lnno %d size 0x%x tagndx %ld",
auxp->u.auxent.x_sym.x_misc.x_lnsz.x_lnno,
@@ -2164,17 +1981,15 @@ coff_print_symbol (abfd, filep, symbol, how)
l++;
while (l->line_number)
{
- fprintf (file, "\n%4d : 0x%lx",
- l->line_number,
- ((unsigned long)
- (l->u.offset + symbol->section->vma)));
+ fprintf (file, "\n%4d : ", l->line_number);
+ fprintf_vma (file, l->u.offset + symbol->section->vma);
l++;
}
}
}
else
{
- bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
+ bfd_print_symbol_vandf (abfd, (void *) file, symbol);
fprintf (file, " %-5s %s %s %s",
symbol->section->name,
coffsymbol (symbol)->native ? "n" : "g",
@@ -2190,9 +2005,8 @@ coff_print_symbol (abfd, filep, symbol, how)
override it. */
bfd_boolean
-_bfd_coff_is_local_label_name (abfd, name)
- bfd *abfd ATTRIBUTE_UNUSED;
- const char *name;
+_bfd_coff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *name)
{
return name[0] == '.' && name[1] == 'L';
}
@@ -2202,21 +2016,19 @@ _bfd_coff_is_local_label_name (abfd, name)
nearest to the wanted location. */
bfd_boolean
-coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
- functionname_ptr, line_ptr)
- bfd *abfd;
- asection *section;
- asymbol **symbols;
- bfd_vma offset;
- const char **filename_ptr;
- const char **functionname_ptr;
- unsigned int *line_ptr;
+coff_find_nearest_line (bfd *abfd,
+ asection *section,
+ asymbol **symbols,
+ bfd_vma offset,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
{
bfd_boolean found;
unsigned int i;
unsigned int line_base;
coff_data_type *cof = coff_data (abfd);
- /* Run through the raw syments if available */
+ /* Run through the raw syments if available. */
combined_entry_type *p;
combined_entry_type *pend;
alent *l;
@@ -2245,7 +2057,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
*functionname_ptr = 0;
*line_ptr = 0;
- /* Don't try and find line numbers in a non coff file */
+ /* Don't try and find line numbers in a non coff file. */
if (!bfd_family_coff (abfd))
return FALSE;
@@ -2315,8 +2127,8 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
}
}
- /* Now wander though the raw linenumbers of the section */
- /* If we have been called on this section before, and the offset we
+ /* Now wander though the raw linenumbers of the section. */
+ /* If we have been called on this section before, and th. e offset we
want is further down then we can prime the lookup loop. */
sec_data = coff_section_data (abfd, section);
if (sec_data != NULL
@@ -2343,7 +2155,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
{
if (l->line_number == 0)
{
- /* Get the symbol this line number points at */
+ /* Get the symbol this line number points at. */
coff_symbol_type *coff = (coff_symbol_type *) (l->u.sym);
if (coff->symbol.value > offset)
break;
@@ -2397,7 +2209,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
if (sec_data == NULL && section->owner == abfd)
{
amt = sizeof (struct coff_section_tdata);
- section->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+ section->used_by_bfd = bfd_zalloc (abfd, amt);
sec_data = (struct coff_section_tdata *) section->used_by_bfd;
}
if (sec_data != NULL)
@@ -2411,32 +2223,40 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
return TRUE;
}
+bfd_boolean
+coff_find_inliner_info (bfd *abfd,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
+{
+ bfd_boolean found;
+
+ found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr,
+ functionname_ptr, line_ptr,
+ &coff_data(abfd)->dwarf2_find_line_info);
+ return (found);
+}
+
int
-coff_sizeof_headers (abfd, reloc)
- bfd *abfd;
- bfd_boolean reloc;
+coff_sizeof_headers (bfd *abfd, bfd_boolean reloc)
{
size_t size;
if (! reloc)
- {
- size = bfd_coff_filhsz (abfd) + bfd_coff_aoutsz (abfd);
- }
+ size = bfd_coff_filhsz (abfd) + bfd_coff_aoutsz (abfd);
else
- {
- size = bfd_coff_filhsz (abfd);
- }
+ size = bfd_coff_filhsz (abfd);
size += abfd->section_count * bfd_coff_scnhsz (abfd);
return size;
}
/* Change the class of a coff symbol held by BFD. */
+
bfd_boolean
-bfd_coff_set_symbol_class (abfd, symbol, class)
- bfd * abfd;
- asymbol * symbol;
- unsigned int class;
+bfd_coff_set_symbol_class (bfd * abfd,
+ asymbol * symbol,
+ unsigned int class)
{
coff_symbol_type * csym;
@@ -2456,7 +2276,7 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
combined_entry_type * native;
bfd_size_type amt = sizeof (* native);
- native = (combined_entry_type *) bfd_zalloc (abfd, amt);
+ native = bfd_zalloc (abfd, amt);
if (native == NULL)
return FALSE;
@@ -2490,9 +2310,17 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
csym->native = native;
}
else
- {
- csym->native->u.syment.n_sclass = class;
- }
+ csym->native->u.syment.n_sclass = class;
return TRUE;
}
+
+struct coff_comdat_info *
+bfd_coff_get_comdat_section (bfd *abfd, struct bfd_section *sec)
+{
+ if (bfd_get_flavour (abfd) == bfd_target_coff_flavour
+ && coff_section_data (abfd, sec) != NULL)
+ return coff_section_data (abfd, sec)->comdat;
+ else
+ return NULL;
+}
diff --git a/contrib/binutils/bfd/cofflink.c b/contrib/binutils/bfd/cofflink.c
index 4ad566cc22ed..a1f6684bb61c 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
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file contains the COFF backend linker code. */
@@ -94,10 +94,11 @@ _bfd_coff_link_hash_table_init (struct coff_link_hash_table *table,
bfd *abfd,
struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *))
+ const char *),
+ unsigned int entsize)
{
- table->stab_info = NULL;
- return _bfd_link_hash_table_init (&table->root, abfd, newfunc);
+ memset (&table->stab_info, 0, sizeof (table->stab_info));
+ return _bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize);
}
/* Create a COFF linker hash table. */
@@ -113,7 +114,8 @@ _bfd_coff_link_hash_table_create (bfd *abfd)
return NULL;
if (! _bfd_coff_link_hash_table_init (ret, abfd,
- _bfd_coff_link_hash_newfunc))
+ _bfd_coff_link_hash_newfunc,
+ sizeof (struct coff_link_hash_entry)))
{
free (ret);
return (struct bfd_link_hash_table *) NULL;
@@ -435,18 +437,19 @@ coff_link_add_symbols (bfd *abfd,
if (obj_pe (abfd)
&& (classification == COFF_SYMBOL_GLOBAL
|| classification == COFF_SYMBOL_PE_SECTION)
- && section->comdat != NULL
+ && coff_section_data (abfd, section) != NULL
+ && coff_section_data (abfd, section)->comdat != NULL
&& strncmp (name, "??_", 3) == 0
- && strcmp (name, section->comdat->name) == 0)
+ && strcmp (name, coff_section_data (abfd, section)->comdat->name) == 0)
{
if (*sym_hash == NULL)
*sym_hash = coff_link_hash_lookup (coff_hash_table (info),
name, FALSE, copy, FALSE);
if (*sym_hash != NULL
&& (*sym_hash)->root.type == bfd_link_hash_defined
- && (*sym_hash)->root.u.def.section->comdat != NULL
- && strcmp ((*sym_hash)->root.u.def.section->comdat->name,
- section->comdat->name) == 0)
+ && coff_section_data (abfd, (*sym_hash)->root.u.def.section)->comdat != NULL
+ && strcmp (coff_section_data (abfd, (*sym_hash)->root.u.def.section)->comdat->name,
+ coff_section_data (abfd, section)->comdat->name) == 0)
addit = FALSE;
}
@@ -503,9 +506,8 @@ coff_link_add_symbols (bfd *abfd,
&& (BTYPE ((*sym_hash)->type) == T_NULL
|| BTYPE (sym.n_type) == T_NULL)))
(*_bfd_error_handler)
- (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
- name, (*sym_hash)->type, sym.n_type,
- bfd_archive_filename (abfd));
+ (_("Warning: type of symbol `%s' changed from %d to %d in %B"),
+ abfd, name, (*sym_hash)->type, sym.n_type);
/* We don't want to change from a meaningful
base type to a null one, but if we know
@@ -551,8 +553,8 @@ coff_link_add_symbols (bfd *abfd,
For example, it won't help objdump. This needs to be
done when we swap in the section header. */
BFD_ASSERT ((*sym_hash)->numaux == 1);
- if (section->_raw_size == 0)
- section->_raw_size = (*sym_hash)->aux[0].x_scn.x_scnlen;
+ if (section->size == 0)
+ section->size = (*sym_hash)->aux[0].x_scn.x_scnlen;
/* FIXME: We could test whether the section sizes
matches the size in the aux entry, but apparently
@@ -693,7 +695,7 @@ _bfd_coff_final_link (bfd *abfd,
{
o->reloc_count = 0;
o->lineno_count = 0;
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
if (p->type == bfd_indirect_link_order)
{
@@ -714,8 +716,10 @@ _bfd_coff_final_link (bfd *abfd,
if (info->relocatable)
o->reloc_count += sec->reloc_count;
- if (sec->_raw_size > max_contents_size)
- max_contents_size = sec->_raw_size;
+ if (sec->rawsize > max_contents_size)
+ max_contents_size = sec->rawsize;
+ if (sec->size > max_contents_size)
+ max_contents_size = sec->size;
if (sec->lineno_count > max_lineno_count)
max_lineno_count = sec->lineno_count;
if (sec->reloc_count > max_reloc_count)
@@ -886,7 +890,7 @@ _bfd_coff_final_link (bfd *abfd,
for (o = abfd->sections; o != NULL; o = o->next)
{
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
if (p->type == bfd_indirect_link_order
&& bfd_family_coff (p->u.indirect.section->owner))
@@ -1080,7 +1084,7 @@ _bfd_coff_final_link (bfd *abfd,
}
/* If we have optimized stabs strings, output them. */
- if (coff_hash_table (info)->stab_info != NULL)
+ if (coff_hash_table (info)->stab_info.stabstr != NULL)
{
if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info))
return FALSE;
@@ -1208,30 +1212,27 @@ process_embedded_commands (bfd *output_bfd,
asection *sec = bfd_get_section_by_name (abfd, ".drectve");
char *s;
char *e;
- char *copy;
+ bfd_byte *copy;
if (!sec)
return 1;
- copy = bfd_malloc (sec->_raw_size);
- if (!copy)
- return 0;
-
- if (! bfd_get_section_contents (abfd, sec, copy, (bfd_vma) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &copy))
{
- free (copy);
+ if (copy != NULL)
+ free (copy);
return 0;
}
- e = copy + sec->_raw_size;
+ e = (char *) copy + sec->size;
- for (s = copy; s < e ; )
+ for (s = (char *) copy; s < e ; )
{
- if (s[0]!= '-')
+ if (s[0] != '-')
{
s++;
continue;
}
- if (strncmp (s,"-attr", 5) == 0)
+ if (strncmp (s, "-attr", 5) == 0)
{
char *name;
char *attribs;
@@ -1346,9 +1347,6 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
{
unsigned int n_tmask = coff_data (input_bfd)->local_n_tmask;
unsigned int n_btshft = coff_data (input_bfd)->local_n_btshft;
-#if 0
- unsigned int n_btmask = coff_data (input_bfd)->local_n_btmask;
-#endif
bfd_boolean (*adjust_symndx)
(bfd *, struct bfd_link_info *, bfd *, asection *,
struct internal_reloc *, bfd_boolean *);
@@ -1977,7 +1975,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
auxp->x_file.x_n.x_offset = STRING_SIZE_SIZE + indx;
}
}
- else if (isymp->n_sclass != C_STAT || isymp->n_type != T_NULL)
+ else if ((isymp->n_sclass != C_STAT || isymp->n_type != T_NULL)
+ && isymp->n_sclass != C_NT_WEAK)
{
unsigned long indx;
@@ -2283,16 +2282,18 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
/* This section was omitted from the link. */
continue;
+ if ((o->flags & SEC_LINKER_CREATED) != 0)
+ continue;
+
if ((o->flags & SEC_HAS_CONTENTS) == 0
- || (o->_raw_size == 0 && (o->flags & SEC_RELOC) == 0))
+ || (o->size == 0 && (o->flags & SEC_RELOC) == 0))
{
if ((o->flags & SEC_RELOC) != 0
&& o->reloc_count != 0)
{
- ((*_bfd_error_handler)
- (_("%s: relocs in section `%s', but it has no contents"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, o)));
+ (*_bfd_error_handler)
+ (_("%B: relocs in section `%A', but it has no contents"),
+ input_bfd, o);
bfd_set_error (bfd_error_no_contents);
return FALSE;
}
@@ -2305,8 +2306,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
contents = secdata->contents;
else
{
- if (! bfd_get_section_contents (input_bfd, o, finfo->contents,
- (file_ptr) 0, o->_raw_size))
+ bfd_size_type x = o->rawsize ? o->rawsize : o->size;
+ if (! bfd_get_section_contents (input_bfd, o, finfo->contents, 0, x))
return FALSE;
contents = finfo->contents;
}
@@ -2431,10 +2432,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
if (secdata == NULL || secdata->stab_info == NULL)
{
file_ptr loc = o->output_offset * bfd_octets_per_byte (output_bfd);
- bfd_size_type amt = (o->_cooked_size != 0
- ? o->_cooked_size : o->_raw_size);
if (! bfd_set_section_contents (output_bfd, o->output_section,
- contents, loc, amt))
+ contents, loc, o->size))
return FALSE;
}
else
@@ -2616,9 +2615,7 @@ _bfd_coff_write_global_sym (struct coff_link_hash_entry *h, void *data)
sec = h->root.u.def.section->output_section;
if (sec != NULL)
{
- auxp->x_scn.x_scnlen = (sec->_cooked_size != 0
- ? sec->_cooked_size
- : sec->_raw_size);
+ auxp->x_scn.x_scnlen = sec->size;
/* For PE, an overflow on the final link reportedly does
not matter. FIXME: Why not? */
@@ -2738,7 +2735,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
abort ();
case bfd_reloc_overflow:
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info,
+ (finfo->info, NULL,
(link_order->type == bfd_section_reloc_link_order
? bfd_section_name (output_bfd,
link_order->u.reloc.p->u.section)
@@ -2863,8 +2860,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
|| (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
{
(*_bfd_error_handler)
- ("%s: illegal symbol index %ld in relocs",
- bfd_archive_filename (input_bfd), symndx);
+ ("%B: illegal symbol index %ld in relocs", input_bfd, symndx);
return FALSE;
}
else
@@ -2925,16 +2921,50 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
+ /* Defined weak symbols are a GNU extension. */
asection *sec;
sec = h->root.u.def.section;
val = (h->root.u.def.value
+ sec->output_section->vma
+ sec->output_offset);
- }
+ }
else if (h->root.type == bfd_link_hash_undefweak)
- val = 0;
+ {
+ if (h->class == C_NT_WEAK && h->numaux == 1)
+ {
+ /* See _Microsoft Portable Executable and Common Object
+ File Format Specification_, section 5.5.3.
+ Note that weak symbols without aux records are a GNU
+ extension.
+ FIXME: All weak externals are treated as having
+ characteristic IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY (1).
+ These behave as per SVR4 ABI: A library member
+ will resolve a weak external only if a normal
+ external causes the library member to be linked.
+ See also linker.c: generic_link_check_archive_element. */
+ asection *sec;
+ struct coff_link_hash_entry *h2 =
+ input_bfd->tdata.coff_obj_data->sym_hashes[
+ h->aux->x_sym.x_tagndx.l];
+
+ if (!h2 || h2->root.type == bfd_link_hash_undefined)
+ {
+ sec = bfd_abs_section_ptr;
+ val = 0;
+ }
+ else
+ {
+ sec = h2->root.u.def.section;
+ val = h2->root.u.def.value
+ + sec->output_section->vma + sec->output_offset;
+ }
+ }
+ else
+ /* This is a GNU extension. */
+ val = 0;
+ }
else if (! info->relocatable)
{
@@ -2984,10 +3014,8 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
break;
case bfd_reloc_outofrange:
(*_bfd_error_handler)
- (_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_archive_filename (input_bfd),
- (unsigned long) rel->r_vaddr,
- bfd_get_section_name (input_bfd, input_section));
+ (_("%B: bad reloc address 0x%lx in section `%A'"),
+ input_bfd, input_section, (unsigned long) rel->r_vaddr);
return FALSE;
case bfd_reloc_overflow:
{
@@ -2997,7 +3025,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
@@ -3006,8 +3034,9 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
}
diff --git a/contrib/binutils/bfd/coffswap.h b/contrib/binutils/bfd/coffswap.h
index 5f23ecc07b30..f0af329daea0 100644
--- a/contrib/binutils/bfd/coffswap.h
+++ b/contrib/binutils/bfd/coffswap.h
@@ -1,6 +1,6 @@
/* Generic COFF swapping routines, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file contains routines used to swap COFF data. It is a header
file because the details of swapping depend on the details of the
@@ -210,41 +210,17 @@
#define PUT_RELOC_VADDR H_PUT_32
#endif
-static void coff_swap_aouthdr_in PARAMS ((bfd *, PTR, PTR));
-static unsigned int coff_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR));
-static void coff_swap_scnhdr_in PARAMS ((bfd *, PTR, PTR));
-static unsigned int coff_swap_scnhdr_out PARAMS ((bfd *, PTR, PTR));
-static void coff_swap_filehdr_in PARAMS ((bfd *, PTR, PTR));
-static unsigned int coff_swap_filehdr_out PARAMS ((bfd *, PTR, PTR));
-#ifndef NO_COFF_RELOCS
-static void coff_swap_reloc_in PARAMS ((bfd *, PTR, PTR));
-static unsigned int coff_swap_reloc_out PARAMS ((bfd *, PTR, PTR));
-#endif /* NO_COFF_RELOCS */
-#ifndef NO_COFF_SYMBOLS
-static void coff_swap_sym_in PARAMS ((bfd *, PTR, PTR));
-static unsigned int coff_swap_sym_out PARAMS ((bfd *, PTR, PTR));
-static void coff_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-static unsigned int coff_swap_aux_out PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-#endif /* NO_COFF_SYMBOLS */
-#ifndef NO_COFF_LINENOS
-static void coff_swap_lineno_in PARAMS ((bfd *, PTR, PTR));
-static unsigned int coff_swap_lineno_out PARAMS ((bfd *, PTR, PTR));
-#endif /* NO_COFF_LINENOS */
-
#ifndef NO_COFF_RELOCS
static void
-coff_swap_reloc_in (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+coff_swap_reloc_in (bfd * abfd, void * src, void * dst)
{
RELOC *reloc_src = (RELOC *) src;
struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
- reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
+ reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
- reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type);
+ reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type);
#ifdef SWAP_IN_RELOC_OFFSET
reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
@@ -252,13 +228,11 @@ coff_swap_reloc_in (abfd, src, dst)
}
static unsigned int
-coff_swap_reloc_out (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
{
struct internal_reloc *reloc_src = (struct internal_reloc *) src;
struct external_reloc *reloc_dst = (struct external_reloc *) dst;
+
PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
@@ -276,10 +250,7 @@ coff_swap_reloc_out (abfd, src, dst)
#endif /* NO_COFF_RELOCS */
static void
-coff_swap_filehdr_in (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
{
FILHDR *filehdr_src = (FILHDR *) src;
struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
@@ -287,13 +258,13 @@ coff_swap_filehdr_in (abfd, src, dst)
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
#endif
- filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic);
- filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns);
+ filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic);
+ filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns);
filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
- filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms);
+ filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms);
filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
- filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags);
+ filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags);
#ifdef TIC80_TARGET_ID
filehdr_dst->f_target_id = H_GET_16 (abfd, filehdr_src->f_target_id);
#endif
@@ -304,10 +275,7 @@ coff_swap_filehdr_in (abfd, src, dst)
}
static unsigned int
-coff_swap_filehdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+coff_swap_filehdr_out (bfd *abfd, void * in, void * out)
{
struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
FILHDR *filehdr_out = (FILHDR *) out;
@@ -335,10 +303,7 @@ coff_swap_filehdr_out (abfd, in, out)
#ifndef NO_COFF_SYMBOLS
static void
-coff_swap_sym_in (abfd, ext1, in1)
- bfd *abfd;
- PTR ext1;
- PTR in1;
+coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
{
SYMENT *ext = (SYMENT *) ext1;
struct internal_syment *in = (struct internal_syment *) in1;
@@ -351,21 +316,18 @@ coff_swap_sym_in (abfd, ext1, in1)
else
{
#if SYMNMLEN != E_SYMNMLEN
- -> Error, we need to cope with truncating or extending SYMNMLEN!;
+#error we need to cope with truncating or extending SYMNMLEN
#else
memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
#endif
}
+
in->n_value = H_GET_32 (abfd, ext->e_value);
in->n_scnum = H_GET_16 (abfd, ext->e_scnum);
if (sizeof (ext->e_type) == 2)
- {
- in->n_type = H_GET_16 (abfd, ext->e_type);
- }
+ in->n_type = H_GET_16 (abfd, ext->e_type);
else
- {
- in->n_type = H_GET_32 (abfd, ext->e_type);
- }
+ in->n_type = H_GET_32 (abfd, ext->e_type);
in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
#ifdef COFF_ADJUST_SYM_IN_POST
@@ -374,10 +336,7 @@ coff_swap_sym_in (abfd, ext1, in1)
}
static unsigned int
-coff_swap_sym_out (abfd, inp, extp)
- bfd *abfd;
- PTR inp;
- PTR extp;
+coff_swap_sym_out (bfd * abfd, void * inp, void * extp)
{
struct internal_syment *in = (struct internal_syment *) inp;
SYMENT *ext =(SYMENT *) extp;
@@ -394,7 +353,7 @@ coff_swap_sym_out (abfd, inp, extp)
else
{
#if SYMNMLEN != E_SYMNMLEN
- -> Error, we need to cope with truncating or extending SYMNMLEN!;
+#error we need to cope with truncating or extending SYMNMLEN
#else
memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
#endif
@@ -404,13 +363,9 @@ coff_swap_sym_out (abfd, inp, extp)
H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
if (sizeof (ext->e_type) == 2)
- {
- H_PUT_16 (abfd, in->n_type, ext->e_type);
- }
+ H_PUT_16 (abfd, in->n_type, ext->e_type);
else
- {
- H_PUT_32 (abfd, in->n_type, ext->e_type);
- }
+ H_PUT_32 (abfd, in->n_type, ext->e_type);
H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
@@ -423,14 +378,13 @@ coff_swap_sym_out (abfd, inp, extp)
}
static void
-coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
- bfd *abfd;
- PTR ext1;
- int type;
- int class;
- int indx;
- int numaux;
- PTR in1;
+coff_swap_aux_in (bfd *abfd,
+ void * ext1,
+ int type,
+ int class,
+ int indx,
+ int numaux,
+ void * in1)
{
AUXENT *ext = (AUXENT *) ext1;
union internal_auxent *in = (union internal_auxent *) in1;
@@ -450,7 +404,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
else
{
#if FILNMLEN != E_FILNMLEN
- -> Error, we need to cope with truncating or extending FILNMLEN!;
+#error we need to cope with truncating or extending FILNMLEN
#else
if (numaux > 1)
{
@@ -512,9 +466,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
}
if (ISFCN (type))
- {
- in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
- }
+ in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
else
{
in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
@@ -529,23 +481,22 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
}
static unsigned int
-coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
- bfd *abfd;
- PTR inp;
- int type;
- int class;
- int indx ATTRIBUTE_UNUSED;
- int numaux ATTRIBUTE_UNUSED;
- PTR extp;
+coff_swap_aux_out (bfd * abfd,
+ void * inp,
+ int type,
+ int class,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void * extp)
{
- union internal_auxent *in = (union internal_auxent *) inp;
+ union internal_auxent * in = (union internal_auxent *) inp;
AUXENT *ext = (AUXENT *) extp;
#ifdef COFF_ADJUST_AUX_OUT_PRE
COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp);
#endif
- memset ((PTR)ext, 0, AUXESZ);
+ memset (ext, 0, AUXESZ);
switch (class)
{
@@ -558,7 +509,7 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
else
{
#if FILNMLEN != E_FILNMLEN
- -> Error, we need to cope with truncating or extending FILNMLEN!;
+#error we need to cope with truncating or extending FILNMLEN
#else
memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
#endif
@@ -625,10 +576,7 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
#ifndef NO_COFF_LINENOS
static void
-coff_swap_lineno_in (abfd, ext1, in1)
- bfd *abfd;
- PTR ext1;
- PTR in1;
+coff_swap_lineno_in (bfd * abfd, void * ext1, void * in1)
{
LINENO *ext = (LINENO *) ext1;
struct internal_lineno *in = (struct internal_lineno *) in1;
@@ -638,10 +586,7 @@ coff_swap_lineno_in (abfd, ext1, in1)
}
static unsigned int
-coff_swap_lineno_out (abfd, inp, outp)
- bfd *abfd;
- PTR inp;
- PTR outp;
+coff_swap_lineno_out (bfd * abfd, void * inp, void * outp)
{
struct internal_lineno *in = (struct internal_lineno *) inp;
struct external_lineno *ext = (struct external_lineno *) outp;
@@ -654,10 +599,7 @@ coff_swap_lineno_out (abfd, inp, outp)
#endif /* NO_COFF_LINENOS */
static void
-coff_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
- bfd *abfd;
- PTR aouthdr_ext1;
- PTR aouthdr_int1;
+coff_swap_aouthdr_in (bfd * abfd, void * aouthdr_ext1, void * aouthdr_int1)
{
AOUTHDR *aouthdr_ext;
struct internal_aouthdr *aouthdr_int;
@@ -730,10 +672,7 @@ coff_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
}
static unsigned int
-coff_swap_aouthdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+coff_swap_aouthdr_out (bfd * abfd, void * in, void * out)
{
struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
AOUTHDR *aouthdr_out = (AOUTHDR *) out;
@@ -807,10 +746,7 @@ coff_swap_aouthdr_out (abfd, in, out)
}
static void
-coff_swap_scnhdr_in (abfd, ext, in)
- bfd *abfd;
- PTR ext;
- PTR in;
+coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
{
SCNHDR *scnhdr_ext = (SCNHDR *) ext;
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
@@ -839,10 +775,7 @@ coff_swap_scnhdr_in (abfd, ext, in)
}
static unsigned int
-coff_swap_scnhdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
{
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
SCNHDR *scnhdr_ext = (SCNHDR *) out;
diff --git a/contrib/binutils/bfd/config.bfd b/contrib/binutils/bfd/config.bfd
index 2b06abee91da..b112f4b656ff 100755
--- a/contrib/binutils/bfd/config.bfd
+++ b/contrib/binutils/bfd/config.bfd
@@ -31,8 +31,13 @@ targ_underscore=no
# Catch obsolete configurations.
case $targ in
- vax-*-vms* \
- )
+ m68*-apple-aux* | \
+ m68*-apollo-* | \
+ m68*-bull-sysv* | \
+ m68*-*-rtemscoff* | \
+ i960-*-rtems* | \
+ or32-*-rtems* | \
+ null)
if test "x$enable_obsolete" != xyes; then
echo "*** Configuration $targ is obsolete." >&2
echo "*** Specify --enable-obsolete to build it anyway." >&2
@@ -42,40 +47,64 @@ case $targ in
fi;;
esac
+case $targ in
+ m68*-*-lynxos* | \
+ sparc-*-lynxos* | \
+ vax-*-vms* | \
+ arm-*-oabi | \
+ thumb-*-oabi | \
+ a29k-* | \
+ hppa*-*-rtems* | \
+ *-go32-rtems* | \
+ i[3-7]86*-*-rtemscoff* | \
+ mips*el-*-rtems* | \
+ powerpcle-*-rtems* | \
+ sparc*-*-rtemsaout* | \
+ null)
+ echo "*** Configuration $targ is obsolete." >&2
+ echo "*** Support has been REMOVED." >&2
+ exit 1
+ ;;
+esac
targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
case "${targ_cpu}" in
-alpha*) targ_archs=bfd_alpha_arch ;;
-arm*) targ_archs=bfd_arm_arch ;;
-c30*) targ_archs=bfd_tic30_arch ;;
-c4x*) targ_archs=bfd_tic4x_arch ;;
-c54x*) targ_archs=bfd_tic54x_arch ;;
+alpha*) targ_archs=bfd_alpha_arch ;;
+arm*) targ_archs=bfd_arm_arch ;;
+bfin*) targ_archs=bfd_bfin_arch ;;
+c30*) targ_archs=bfd_tic30_arch ;;
+c4x*) targ_archs=bfd_tic4x_arch ;;
+c54x*) targ_archs=bfd_tic54x_arch ;;
+crisv32) targ_archs=bfd_cris_arch ;;
+crx*) targ_archs=bfd_crx_arch ;;
dlx*) targ_archs=bfd_dlx_arch ;;
-hppa*) targ_archs=bfd_hppa_arch ;;
-i[3-7]86) targ_archs=bfd_i386_arch ;;
-i370) targ_archs=bfd_i370_arch ;;
+hppa*) targ_archs=bfd_hppa_arch ;;
+i[3-7]86) targ_archs=bfd_i386_arch ;;
+i370) targ_archs=bfd_i370_arch ;;
m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch" ;;
m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;;
-m68*) targ_archs=bfd_m68k_arch ;;
-m88*) targ_archs=bfd_m88k_arch ;;
-mips*) targ_archs=bfd_mips_arch ;;
+m68*) targ_archs=bfd_m68k_arch ;;
+m88*) targ_archs=bfd_m88k_arch ;;
+maxq*) targ_archs=bfd_maxq_arch ;;
+mips*) targ_archs=bfd_mips_arch ;;
or32*) targ_archs=bfd_or32_arch ;;
-pdp11*) targ_archs=bfd_pdp11_arch ;;
-pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
-powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
-rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
-s390*) targ_archs=bfd_s390_arch ;;
-sh*) targ_archs=bfd_sh_arch ;;
-sparc*) targ_archs=bfd_sparc_arch ;;
-strongarm*) targ_archs=bfd_arm_arch ;;
-thumb*) targ_archs=bfd_arm_arch ;;
-v850*) targ_archs=bfd_v850_arch ;;
-x86_64) targ_archs=bfd_i386_arch ;;
-xscale*) targ_archs=bfd_arm_arch ;;
-xtensa*) targ_archs=bfd_xtensa_arch ;;
-z8k*) targ_archs=bfd_z8k_arch ;;
-am33_2.0) targ_archs=bfd_mn10300_arch ;;
-*) targ_archs=bfd_${targ_cpu}_arch ;;
+pdp11*) targ_archs=bfd_pdp11_arch ;;
+pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
+powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
+rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
+s390*) targ_archs=bfd_s390_arch ;;
+sh*) targ_archs=bfd_sh_arch ;;
+sparc*) targ_archs=bfd_sparc_arch ;;
+strongarm*) targ_archs=bfd_arm_arch ;;
+thumb*) targ_archs=bfd_arm_arch ;;
+v850*) targ_archs=bfd_v850_arch ;;
+x86_64) targ_archs=bfd_i386_arch ;;
+xscale*) targ_archs=bfd_arm_arch ;;
+xtensa*) targ_archs=bfd_xtensa_arch ;;
+z80|r800) targ_archs=bfd_z80_arch ;;
+z8k*) targ_archs=bfd_z8k_arch ;;
+am33_2.0) targ_archs=bfd_mn10300_arch ;;
+*) targ_archs=bfd_${targ_cpu}_arch ;;
esac
@@ -126,7 +155,7 @@ case "${targ}" in
targ_defvec=ecoffalpha_little_vec
targ_selvecs=bfd_elf64_alpha_vec
;;
- alpha*-*-linux-gnu* | alpha*-*-elf*)
+ alpha*-*-linux-* | alpha*-*-elf*)
targ_defvec=bfd_elf64_alpha_vec
targ_selvecs=ecoffalpha_little_vec
;;
@@ -136,7 +165,7 @@ case "${targ}" in
alpha*-*-*)
targ_defvec=ecoffalpha_little_vec
;;
- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
+ 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"
;;
@@ -213,7 +242,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
- armeb-*-elf | arm*b-*-linux-gnu*)
+ armeb-*-elf | arm*b-*-linux-*)
targ_defvec=bfd_elf32_bigarm_vec
targ_selvecs=bfd_elf32_littlearm_vec
;;
@@ -225,29 +254,30 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigarm_vec
targ_selvecs=bfd_elf32_littlearm_vec
;;
- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
+ arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \
+ arm*-*-eabi* )
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
+ arm*-*-vxworks | arm*-*-windiss)
+ targ_defvec=bfd_elf32_littlearm_vxworks_vec
+ targ_selvecs=bfd_elf32_bigarm_vxworks_vec
+ ;;
+ arm*-*-symbianelf*)
+ targ_defvec=bfd_elf32_littlearm_symbian_vec
+ targ_selvecs=bfd_elf32_bigarm_symbian_vec
+ ;;
arm9e-*-elf)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
- arm-*-oabi)
- targ_defvec=bfd_elf32_littlearm_oabi_vec
- targ_selvecs=bfd_elf32_bigarm_oabi_vec
- ;;
thumb-*-coff)
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
targ_underscore=yes
;;
- thumb-*-oabi)
- targ_defvec=bfd_elf32_littlearm_oabi_vec
- targ_selvecs=bfd_elf32_bigarm_oabi_vec
- ;;
thumb-*-elf)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
@@ -281,21 +311,16 @@ case "${targ}" in
targ_underscore=yes
;;
- a29k-*-ebmon* | a29k-*-udi* | a29k-*-coff* | a29k-*-sym1* | \
- a29k-*-vxworks* | a29k-*-sysv* | a29k-*rtems*)
- targ_defvec=a29kcoff_big_vec
- targ_selvecs=sunos_big_vec
- targ_underscore=yes
- ;;
- a29k-*-aout* | a29k-*-bsd* | a29k-*-vsta*)
- targ_defvec=sunos_big_vec
- targ_underscore=yes
- ;;
-
avr-*-*)
targ_defvec=bfd_elf32_avr_vec
;;
+ bfin-*-*)
+ targ_defvec=bfd_elf32_bfin_vec
+ targ_selvecs=bfd_elf32_bfinfdpic_vec
+ targ_underscore=yes
+ ;;
+
c30-*-*aout* | tic30-*-*aout*)
targ_defvec=tic30_aout_vec
;;
@@ -315,12 +340,22 @@ case "${targ}" in
targ_underscore=yes
;;
- cris-*-*)
+ cr16c-*-elf*)
+ targ_defvec=bfd_elf32_cr16c_vec
+ targ_underscore=yes
+ ;;
+
+ cris-*-* | crisv32-*-*)
targ_defvec=cris_aout_vec
targ_selvecs="bfd_elf32_us_cris_vec bfd_elf32_cris_vec ieee_vec"
targ_underscore=yes # Note: not true for bfd_elf32_cris_vec.
;;
+ crx-*-elf*)
+ targ_defvec=bfd_elf32_crx_vec
+ targ_underscore=yes
+ ;;
+
d10v-*-*)
targ_defvec=bfd_elf32_d10v_vec
;;
@@ -348,7 +383,12 @@ case "${targ}" in
targ_selvecs=bfd_elf32_frv_vec
;;
- h8300*-*-elf)
+ h8300*-*-rtemscoff*)
+ targ_defvec=h8300coff_vec
+ targ_underscore=yes
+ ;;
+
+ h8300*-*-elf | h8300*-*-rtems*)
targ_defvec=bfd_elf32_h8300_vec
targ_underscore=yes
;;
@@ -364,7 +404,7 @@ case "${targ}" in
;;
#ifdef BFD64
- hppa*64*-*-linux-gnu*)
+ hppa*64*-*-linux-*)
targ_defvec=bfd_elf64_hppa_linux_vec
targ_selvecs=bfd_elf64_hppa_vec
;;
@@ -375,7 +415,7 @@ case "${targ}" in
;;
#endif
- hppa*-*-linux-gnu*)
+ hppa*-*-linux-*)
targ_defvec=bfd_elf32_hppa_linux_vec
targ_selvecs=bfd_elf32_hppa_vec
;;
@@ -383,7 +423,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_hppa_nbsd_vec
targ_selvecs="bfd_elf32_hppa_vec bfd_elf32_hppa_linux_vec"
;;
- hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems* | hppa*-*-openbsd*)
+ hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-openbsd*)
targ_defvec=bfd_elf32_hppa_vec
targ_selvecs=bfd_elf32_hppa_linux_vec
;;
@@ -402,7 +442,7 @@ case "${targ}" in
;;
#endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */
- i370-*-*)
+ i370-*-*)
targ_defvec=bfd_elf32_i370_vec
targ_selvecs="bfd_elf32_i370_vec"
;;
@@ -410,12 +450,18 @@ case "${targ}" in
targ_defvec=i386coff_vec
targ_selvecs=bfd_elf32_i386_vec
;;
- i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | i[3-7]86-*-solaris2* | \
+ i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \
i[3-7]86-*-elf | i[3-7]86-*-sco3.2v5* | \
i[3-7]86-*-dgux* | i[3-7]86-*-sysv5*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
+ i[3-7]86-*-solaris2*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs=i386coff_vec
+ targ64_selvecs=bfd_elf64_x86_64_vec
+ want64=true
+ ;;
i[3-7]86-*-kaos*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=bfd_elf32_i386_vec
@@ -430,7 +476,7 @@ case "${targ}" in
i[3-7]86-*-chorus*)
targ_defvec=bfd_elf32_i386_vec
;;
- *-*-msdosdjgpp* | *-*-go32* | *-go32-rtems* )
+ *-*-msdosdjgpp* | *-*-go32* )
targ_defvec=go32coff_vec
targ_selvecs="go32stubbedcoff_vec i386aout_vec"
;;
@@ -438,11 +484,7 @@ case "${targ}" in
i[3-7]86-*-aix*)
targ_defvec=i386coff_vec
;;
- i[3-7]86*-*-rtemscoff*)
- targ_defvec=i386coff_vec
- targ_selvecs="bfd_elf32_i386_vec i386aout_vec"
- ;;
- i[3-7]86-*-rtemself* | i[3-7]86-*-rtems*)
+ i[3-7]86-*-rtems*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386coff_vec i386aout_vec"
;;
@@ -489,7 +531,7 @@ case "${targ}" in
targ_selvecs="bfd_elf32_i386_vec i386bsd_vec"
targ_underscore=yes
;;
- i[3-7]86-*-openbsd*)
+ i[3-7]86-*-openbsd*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386netbsd_vec
;;
@@ -502,12 +544,16 @@ case "${targ}" in
targ_selvecs=bfd_elf32_i386_vec
targ_underscore=yes
;;
- i[3-7]86-*-linux-gnu*)
+ i[3-7]86-*-linux-*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
targ64_selvecs=bfd_elf64_x86_64_vec
;;
#ifdef BFD64
+ x86_64-*-elf*)
+ targ_defvec=bfd_elf64_x86_64_vec
+ targ_selvecs="bfd_elf32_i386_vec i386coff_vec"
+ ;;
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"
@@ -516,14 +562,14 @@ case "${targ}" in
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
;;
- x86_64-*-linux-gnu*)
+ x86_64-*-linux-*)
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
;;
#endif
i[3-7]86-*-lynxos*)
- targ_defvec=i386lynx_coff_vec
- targ_selvecs=i386lynx_aout_vec
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs="i386lynx_coff_vec i386lynx_aout_vec"
;;
i[3-7]86-*-gnu*)
targ_defvec=bfd_elf32_i386_vec
@@ -558,9 +604,14 @@ case "${targ}" in
# FIXME: This should eventually be checked at runtime.
targ_cflags=-DSTRICT_PE_FORMAT
;;
+ i[3-7]86-*-rdos*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs=i386coff_vec
+ ;;
i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
targ_defvec=i386pe_vec
targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec"
+ targ_underscore=yes
;;
i[3-7]86-none-*)
targ_defvec=i386coff_vec
@@ -568,8 +619,8 @@ case "${targ}" in
i[3-7]86-*-aout* | i[3-7]86*-*-vsta*)
targ_defvec=i386aout_vec
;;
- i[3-7]86-*-vxworks)
- targ_defvec=bfd_elf32_i386_vec
+ i[3-7]86-*-vxworks*)
+ targ_defvec=bfd_elf32_i386_vxworks_vec
targ_underscore=yes
;;
i[3-7]86-*-chaos)
@@ -616,16 +667,20 @@ case "${targ}" in
targ_defvec=bfd_elf32_iq2000_vec
;;
+ m32c-*-elf)
+ targ_defvec=bfd_elf32_m32c_vec
+ ;;
+
m32r*le-*-linux*)
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"
@@ -691,7 +746,7 @@ case "${targ}" in
targ_selvecs=bfd_elf32_m68k_vec
targ_underscore=yes
;;
- m68*-*-linux-gnu*)
+ m68*-*-linux-*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs=m68klinux_vec
;;
@@ -700,16 +755,12 @@ case "${targ}" in
# targ_selvecs=m68kmach3_vec
# targ_cflags=-DSTAT_FOR_EXEC
;;
- m68*-*-lynxos*)
- targ_defvec=m68klynx_coff_vec
- targ_selvecs=m68klynx_aout_vec
- ;;
m68*-hp*-netbsd*)
targ_defvec=m68k4knetbsd_vec
targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
targ_underscore=yes
;;
- m68*-*-netbsdelf*)
+ m68*-*-netbsdelf*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs="m68knetbsd_vec m68k4knetbsd_vec hp300bsd_vec sunos_big_vec"
;;
@@ -754,11 +805,19 @@ case "${targ}" in
targ_defvec=m88kmach3_vec
targ_cflags=-DSTAT_FOR_EXEC
;;
+ m88*-*-openbsd*)
+ targ_defvec=m88kopenbsd_vec
+ targ_underscore=yes
+ ;;
m88*-*-*)
targ_defvec=m88kbcs_vec
targ_underscore=yes
;;
+ maxq-*-coff)
+ targ_defvec=maxqcoff_vec
+ ;;
+
mcore-*-elf)
targ_defvec=bfd_elf32_mcore_big_vec
targ_selvecs="bfd_elf32_mcore_big_vec bfd_elf32_mcore_little_vec"
@@ -773,16 +832,16 @@ case "${targ}" in
targ_selvecs=ecoff_little_vec
;;
mips*el-*-netbsd*)
- targ_defvec=bfd_elf32_littlemips_vec
- targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
+ targ_defvec=bfd_elf32_tradlittlemips_vec
+ targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec"
;;
mips*-*-freebsd*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
;;
mips*-*-netbsd*)
- targ_defvec=bfd_elf32_bigmips_vec
- targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
+ targ_defvec=bfd_elf32_tradbigmips_vec
+ targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
;;
mips*-dec-* | mips*el-*-ecoff*)
targ_defvec=ecoff_little_vec
@@ -818,7 +877,17 @@ case "${targ}" in
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
- mips*el-*-elf* | mips*el-*-rtems* | mips*el-*-vxworks* | mips*-*-chorus*)
+#ifdef BFD64
+ 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"
+ ;;
+ 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"
+ ;;
+#endif
+ 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"
;;
@@ -830,6 +899,12 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
+#ifdef BFD64
+ 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"
+ ;;
+#endif
mips*el-*-openbsd*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
@@ -873,6 +948,10 @@ case "${targ}" in
targ_underscore=yes
;;
+ mt-*-elf)
+ targ_defvec=bfd_elf32_mt_vec
+ ;;
+
msp430-*-*)
targ_defvec=bfd_elf32_msp430_vec
;;
@@ -890,12 +969,12 @@ case "${targ}" in
targ_defvec=bfd_elf32_openrisc_vec
;;
- or32-*-coff)
+ or32-*-coff | or32-*-rtems* )
targ_defvec=or32coff_big_vec
targ_underscore=yes
;;
- or32-*-elf | or32-*-rtems*)
+ or32-*-elf)
targ_defvec=bfd_elf32_or32_big_vec
;;
@@ -945,7 +1024,7 @@ case "${targ}" in
targ_defvec=rs6000coff_vec
targ64_selvecs=rs6000coff64_vec
case "${targ}" in
- *-*-aix4.[3456789]* | *-*-aix[56789]*)
+ *-*-aix4.[3456789]* | *-*-aix[56789]*)
want64=true;;
*)
targ_cflags=-DSMALL_ARCHIVE;;
@@ -967,8 +1046,8 @@ case "${targ}" in
;;
#endif
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
- powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
+ powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \
+ powerpc-*-chorus*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
@@ -983,9 +1062,14 @@ case "${targ}" in
targ_selvecs="mach_o_be_vec mach_o_le_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
targ_archs="bfd_powerpc_arch bfd_rs6000_arch bfd_i386_arch"
;;
- powerpc-*-macos* | powerpc-*-mpw*)
+ powerpc-*-macos*)
targ_defvec=pmac_xcoff_vec
;;
+ powerpc-*-lynxos*)
+ targ_defvec=bfd_elf32_powerpc_vec
+ targ_selvecs="rs6000coff_vec"
+ targ_cflags=-DSMALL_ARCHIVE
+ ;;
powerpc-*-netware*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
@@ -994,13 +1078,17 @@ case "${targ}" in
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
;;
+ powerpc-*-vxworks* | powerpc-*-windiss*)
+ targ_defvec=bfd_elf32_powerpc_vxworks_vec
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec ppcboot_vec"
+ targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
+ ;;
powerpcle-*-nto*)
targ_defvec=bfd_elf32_powerpcle_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
;;
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
- powerpcle-*-rtems*)
+ powerpcle-*-solaris2* | powerpcle-*-linux-* | powerpcle-*-vxworks*)
targ_defvec=bfd_elf32_powerpcle_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
@@ -1013,12 +1101,16 @@ case "${targ}" in
s390-*-linux*)
targ_defvec=bfd_elf32_s390_vec
targ64_selvecs=bfd_elf64_s390_vec
+ want64=true
;;
#ifdef BFD64
s390x-*-linux*)
targ_defvec=bfd_elf64_s390_vec
targ_selvecs=bfd_elf32_s390_vec
;;
+ s390x-*-tpf*)
+ targ_defvec=bfd_elf64_s390_vec
+ ;;
#endif
#ifdef BFD64
@@ -1061,20 +1153,20 @@ case "${targ}" in
#ifdef BFD64
sh5le-*-netbsd*)
targ_defvec=bfd_elf32_sh64lnbsd_vec
- targ_selvecs="bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
+ targ_selvecs="bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec bfd_elf32_shnbsd_vec bfd_elf32_shlnbsd_vec"
;;
sh5-*-netbsd*)
targ_defvec=bfd_elf32_sh64nbsd_vec
- targ_selvecs="bfd_elf32_sh64lnbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
+ targ_selvecs="bfd_elf32_sh64lnbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec bfd_elf32_shnbsd_vec bfd_elf32_shlnbsd_vec"
;;
sh64le-*-netbsd*)
targ_defvec=bfd_elf64_sh64lnbsd_vec
- targ_selvecs="bfd_elf64_sh64nbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec"
+ targ_selvecs="bfd_elf64_sh64nbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf32_shnbsd_vec bfd_elf32_shlnbsd_vec"
;;
sh64-*-netbsd*)
targ_defvec=bfd_elf64_sh64nbsd_vec
- targ_selvecs="bfd_elf64_sh64lnbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec"
+ targ_selvecs="bfd_elf64_sh64lnbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf32_shnbsd_vec bfd_elf32_shlnbsd_vec"
;;
#endif
@@ -1096,6 +1188,11 @@ case "${targ}" in
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
;;
+ sh*-*-symbianelf*)
+ targ_defvec=bfd_elf32_shl_symbian_vec
+ targ_selvecs="shlcoff_vec shlcoff_small_vec"
+ targ_underscore=yes
+ ;;
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"
@@ -1161,14 +1258,10 @@ case "${targ}" in
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
targ_underscore=yes
;;
- sparc-*-linux-gnu*)
+ sparc-*-linux-*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
;;
- sparc-*-lynxos*)
- targ_defvec=sparclynx_coff_vec
- targ_selvecs=sparclynx_aout_vec
- ;;
sparc-*-netbsdelf*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs=sparcnetbsd_vec
@@ -1199,6 +1292,10 @@ case "${targ}" in
sparc-*-sysv4*)
targ_defvec=bfd_elf32_sparc_vec
;;
+ sparc-*-vxworks*)
+ targ_defvec=bfd_elf32_sparc_vxworks_vec
+ targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
+ ;;
sparc-*-netware*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs="nlm32_sparc_vec sunos_big_vec"
@@ -1208,7 +1305,7 @@ case "${targ}" in
targ_defvec=sunos_big_vec
targ_underscore=yes
;;
- sparc64-*-linux-gnu*)
+ sparc64-*-linux-*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
;;
@@ -1220,16 +1317,11 @@ case "${targ}" in
sparc*-*-coff*)
targ_defvec=sparccoff_vec
;;
- sparc*-*-rtemsaout*)
- targ_defvec=sunos_big_vec
- targ_selvecs="bfd_elf32_sparc_vec sparccoff_vec"
- targ_underscore=yes
- ;;
- sparc*-*-rtems* | sparc*-*-rtemself*)
+ sparc*-*-rtems*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs="sunos_big_vec sparccoff_vec"
;;
- sparc*-*-* | sparc*-*-rtems*)
+ sparc*-*-*)
targ_defvec=sunos_big_vec
targ_underscore=yes
;;
@@ -1277,7 +1369,7 @@ case "${targ}" in
targ_underscore=yes
;;
- vax-*-linux-gnu*)
+ vax-*-linux-*)
targ_defvec=bfd_elf32_vax_vec
;;
@@ -1301,6 +1393,14 @@ case "${targ}" in
targ_defvec=bfd_elf32_xtensa_le_vec
targ_selvecs=bfd_elf32_xtensa_be_vec
;;
+ xc16x-*-elf)
+ targ_defvec=bfd_elf32_xc16x_vec
+ ;;
+
+ z80-*-*)
+ targ_defvec=z80coff_vec
+ targ_underscore=no
+ ;;
z8k*-*-*)
targ_defvec=z8kcoff_vec
diff --git a/contrib/binutils/bfd/config.in b/contrib/binutils/bfd/config.in
index ef9eca414fbf..6c738257d982 100644
--- a/contrib/binutils/bfd/config.in
+++ b/contrib/binutils/bfd/config.in
@@ -1,288 +1,375 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-#undef C_ALLOCA
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
-/* Define to empty if the keyword does not work. */
-#undef const
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
-/* Define if you have alloca, as a function or macro. */
+/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
#undef HAVE_ALLOCA_H
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define to 1 if you have the declaration of `basename', and to 0 if you
+ don't. */
+#undef HAVE_DECL_BASENAME
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
+#undef HAVE_DECL_FFS
-/* 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 declaration of `free', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FREE
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FSEEKO
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
+/* Define to 1 if you have the declaration of `fseeko64', and to 0 if you
+ don't. */
+#undef HAVE_DECL_FSEEKO64
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FTELLO
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define to 1 if you have the declaration of `ftello64', and to 0 if you
+ don't. */
+#undef HAVE_DECL_FTELLO64
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_GETENV
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
+ */
+#undef HAVE_DECL_MALLOC
+
+/* Define to 1 if you have the declaration of `realloc', and to 0 if you
+ don't. */
+#undef HAVE_DECL_REALLOC
+
+/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_SNPRINTF
+
+/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
+ */
+#undef HAVE_DECL_STPCPY
+
+/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
+ */
+#undef HAVE_DECL_STRSTR
-/* Define if you have the fcntl function. */
+/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_VSNPRINTF
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `fcntl' function. */
#undef HAVE_FCNTL
-/* Define if you have the fdopen function. */
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `fdopen' function. */
#undef HAVE_FDOPEN
-/* Define if you have the fseeko function. */
+/* Define to 1 if you have the `fopen64' function. */
+#undef HAVE_FOPEN64
+
+/* Define to 1 if you have the `fseeko' function. */
#undef HAVE_FSEEKO
-/* Define if you have the fseeko64 function. */
+/* Define to 1 if you have the `fseeko64' function. */
#undef HAVE_FSEEKO64
-/* Define if you have the ftello function. */
+/* Define to 1 if you have the `ftello' function. */
#undef HAVE_FTELLO
-/* Define if you have the ftello64 function. */
+/* Define to 1 if you have the `ftello64' function. */
#undef HAVE_FTELLO64
-/* Define if you have the getcwd function. */
+/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD
-/* Define if you have the getgid function. */
+/* Define to 1 if you have the `getgid' function. */
#undef HAVE_GETGID
-/* Define if you have the getpagesize function. */
+/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
-/* Define if you have the getuid function. */
+/* 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 if you have the madvise function. */
+/* 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
+
+/* Define if <sys/procfs.h> has lwpstatus_t.pr_context. */
+#undef HAVE_LWPSTATUS_T_PR_CONTEXT
+
+/* Define if <sys/procfs.h> has lwpstatus_t.pr_reg. */
+#undef HAVE_LWPSTATUS_T_PR_REG
+
+/* Define if <sys/procfs.h> has lwpxstatus_t. */
+#undef HAVE_LWPXSTATUS_T
+
+/* Define to 1 if you have the `madvise' function. */
#undef HAVE_MADVISE
-/* Define if you have the mprotect function. */
+/* 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 `mprotect' function. */
#undef HAVE_MPROTECT
-/* Define if you have the munmap function. */
+/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
+/* Define to 1 if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
-/* Define if you have the setitimer function. */
-#undef HAVE_SETITIMER
+/* Define if <sys/procfs.h> has prpsinfo32_t. */
+#undef HAVE_PRPSINFO32_T
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
+/* Define if <sys/procfs.h> has prpsinfo_t. */
+#undef HAVE_PRPSINFO_T
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
+/* Define if <sys/procfs.h> has prstatus32_t. */
+#undef HAVE_PRSTATUS32_T
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
+/* Define if <sys/procfs.h> has prstatus32_t.pr_who. */
+#undef HAVE_PRSTATUS32_T_PR_WHO
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
+/* Define if <sys/procfs.h> has prstatus_t. */
+#undef HAVE_PRSTATUS_T
-/* Define if you have the strtoull function. */
-#undef HAVE_STRTOULL
+/* Define if <sys/procfs.h> has prstatus_t.pr_who. */
+#undef HAVE_PRSTATUS_T_PR_WHO
-/* Define if you have the sysconf function. */
-#undef HAVE_SYSCONF
+/* Define if <sys/procfs.h> has psinfo32_t. */
+#undef HAVE_PSINFO32_T
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
+/* Define if <sys/procfs.h> has psinfo_t. */
+#undef HAVE_PSINFO_T
-/* Define if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
+/* Define if <sys/procfs.h> has pstatus32_t. */
+#undef HAVE_PSTATUS32_T
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
+/* Define if <sys/procfs.h> has pstatus_t. */
+#undef HAVE_PSTATUS_T
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define if <sys/procfs.h> has pxstatus_t. */
+#undef HAVE_PXSTATUS_T
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
-/* Define if you have the <ndir.h> header file. */
-#undef HAVE_NDIR_H
+/* Define to 1 if you have the `setitimer' function. */
+#undef HAVE_SETITIMER
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
-/* Define if you have the <stddef.h> header file. */
+/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
-/* Define if you have the <stdlib.h> header file. */
+/* 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 <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define if you have the stpcpy function */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
-/* Define if you have the <strings.h> header file. */
+/* 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 if you have the <sys/dir.h> header file. */
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
+/* Define if struct core_dumpx has member c_impl */
+#undef HAVE_ST_C_IMPL
+
+/* Define to 1 if you have the `sysconf' function. */
+#undef HAVE_SYSCONF
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_DIR_H
-/* Define if you have the <sys/file.h> header file. */
+/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
-/* Define if you have the <sys/ndir.h> header file. */
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_NDIR_H
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <sys/procfs.h> header file. */
+/* Define to 1 if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H
-/* Define if you have the <sys/time.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
-/* Define if you have the <time.h> header file. */
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <time.h> header file. */
#undef HAVE_TIME_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <values.h> header file. */
+/* Define to 1 if you have the <values.h> header file. */
#undef HAVE_VALUES_H
-/* Name of package */
-#undef PACKAGE
-
-/* Version number of package */
-#undef VERSION
-
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
-/* The number of bytes in type long long */
-#undef SIZEOF_LONG_LONG
-
-/* The number of bytes in type long */
-#undef SIZEOF_LONG
-
-/* Use b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
+/* Define if <sys/procfs.h> has win32_pstatus_t. */
+#undef HAVE_WIN32_PSTATUS_T
-/* Define if strstr is not declared in system header files. */
-#undef NEED_DECLARATION_STRSTR
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
-/* Define if malloc is not declared in system header files. */
-#undef NEED_DECLARATION_MALLOC
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
-/* Define if realloc is not declared in system header files. */
-#undef NEED_DECLARATION_REALLOC
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
-/* Define if free is not declared in system header files. */
-#undef NEED_DECLARATION_FREE
+/* Name of package */
+#undef PACKAGE
-/* Define if getenv is not declared in system header files. */
-#undef NEED_DECLARATION_GETENV
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Define if struct core_dumpx has member c_impl */
-#undef HAVE_ST_C_IMPL
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/* Define if <sys/procfs.h> has prstatus_t. */
-#undef HAVE_PRSTATUS_T
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
-/* Define if <sys/procfs.h> has prstatus32_t. */
-#undef HAVE_PRSTATUS32_T
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
-/* Define if <sys/procfs.h> has prstatus_t.pr_who. */
-#undef HAVE_PRSTATUS_T_PR_WHO
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
-/* Define if <sys/procfs.h> has prstatus32_t.pr_who. */
-#undef HAVE_PRSTATUS32_T_PR_WHO
+/* The size of a `long', as computed by sizeof. */
+#undef SIZEOF_LONG
-/* Define if <sys/procfs.h> has pstatus_t. */
-#undef HAVE_PSTATUS_T
+/* The size of a `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
-/* Define if <sys/procfs.h> has pxstatus_t. */
-#undef HAVE_PXSTATUS_T
+/* The size of a `off_t', as computed by sizeof. */
+#undef SIZEOF_OFF_T
-/* Define if <sys/procfs.h> has pstatus32_t. */
-#undef HAVE_PSTATUS32_T
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
-/* Define if <sys/procfs.h> has prpsinfo_t. */
-#undef HAVE_PRPSINFO_T
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
-/* Define if <sys/procfs.h> has prpsinfo32_t. */
-#undef HAVE_PRPSINFO32_T
+/* Define if you can safely include both <string.h> and <strings.h>. */
+#undef STRING_WITH_STRINGS
-/* Define if <sys/procfs.h> has psinfo_t. */
-#undef HAVE_PSINFO_T
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
-/* Define if <sys/procfs.h> has psinfo32_t. */
-#undef HAVE_PSINFO32_T
+/* Name of host specific header file to include in trad-core.c. */
+#undef TRAD_HEADER
-/* Define if <sys/procfs.h> has lwpstatus_t. */
-#undef HAVE_LWPSTATUS_T
+/* Use b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
-/* Define if <sys/procfs.h> has lwpxstatus_t. */
-#undef HAVE_LWPXSTATUS_T
+/* Use mmap if it's available? */
+#undef USE_MMAP
-/* Define if <sys/procfs.h> has lwpstatus_t.pr_context. */
-#undef HAVE_LWPSTATUS_T_PR_CONTEXT
+/* Define if we should default to creating read-only plt entries */
+#undef USE_SECUREPLT
-/* Define if <sys/procfs.h> has lwpstatus_t.pr_reg. */
-#undef HAVE_LWPSTATUS_T_PR_REG
+/* Version number of package */
+#undef VERSION
-/* Define if <sys/procfs.h> has win32_pstatus_t. */
-#undef HAVE_WIN32_PSTATUS_T
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
-/* Name of host specific header file to include in trad-core.c. */
-#undef TRAD_HEADER
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
-/* The number of bytes in type off_t */
-#undef SIZEOF_OFF_T
+/* 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
-/* Use mmap if it's available? */
-#undef USE_MMAP
+/* 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 8c8ff3b25a01..af6c22b5a669 100755
--- a/contrib/binutils/bfd/configure
+++ b/contrib/binutils/bfd/configure
@@ -1,57 +1,325 @@
#! /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
+
+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
-# Defaults:
-ac_help=
+
+# 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-shared[=PKGS] build shared libraries [default=no]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-ac_help="$ac_help
- --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
-ac_help="$ac_help
- --enable-targets alternative target configurations"
-ac_help="$ac_help
- --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
-ac_help="$ac_help
- --with-mmap try using mmap for BFD input files if available"
-ac_help="$ac_help
- --enable-build-warnings Enable build-time compiler warnings if gcc is used"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-install-libbfd controls installation of libbfd and related headers"
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
+ac_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="libbfd.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# 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_files=''
# 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
@@ -60,10 +328,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'
@@ -77,17 +350,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"
@@ -95,59 +360,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- \
@@ -156,95 +421,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 \
@@ -253,19 +470,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 \
@@ -279,26 +496,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 \
@@ -315,7 +532,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)
@@ -325,7 +542,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 \
@@ -336,58 +553,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.
@@ -398,99 +614,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; }
-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
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 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
+
+# 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
-# 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
+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=libbfd.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ 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=..
@@ -500,13 +727,492 @@ 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; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(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_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# 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]
+ --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
+ --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-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
+ --disable-nls do not use Native Language Support
+
+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-mmap try using mmap for BFD input files if available
+ --with-included-gettext use the GNU gettext library included here
+
+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>
+ CPP C preprocessor
+
+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
+
+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
@@ -517,102 +1223,105 @@ 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
+
+
+
+
+
+
+
+
+
+
+
+
+
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:556: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 561 "configure"
-#include "confdefs.h"
-int main() {
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:589: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 594 "configure"
-#include "confdefs.h"
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
ac_aux_dir=
@@ -625,149 +1334,1162 @@ 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/'`
+
+
+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
+ 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/'`
-# 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; } ;;
-esac
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+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
-# 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
+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
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:666: checking host system type" >&5
+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
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
-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:687: 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
+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
-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:705: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+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
-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
+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
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+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
- echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:729: checking for strerror in -lcposix" >&5
-ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
- ac_save_LIBS="$LIBS"
-LIBS="-lcposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 737 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror();
+ 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
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+if 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ 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); }
+
+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
+ 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 "$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 -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+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
+ 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.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
+ 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
+
+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
+ 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
+
+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*
-LIBS="$ac_save_LIBS"
+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
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lcposix"
+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
+
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ 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_search_strerror="none required"
+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 "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ 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_search_strerror="-l$ac_lib"
+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_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
+fi
-am__api_version="1.4"
+am__api_version="1.9"
# 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:
@@ -775,348 +2497,742 @@ am__api_version="1.4"
# 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:784: 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
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ 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 build environment is sane""... $ac_c" 1>&6
-echo "configure:837: checking whether build environment is sane" >&5
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
fi
- test "$2" = conftestfile
+ test "$2" = conftest.file
)
then
# Ok.
:
else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
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
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+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_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+ test -n "$AWK" && break
+done
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:894: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftestmake <<\EOF
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
-rm -f conftestmake
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
+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
+
+DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
-PACKAGE=bfd
-VERSION=2.15
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
fi
-cat >> confdefs.h <<EOF
+
+
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=bfd
+ VERSION=2.17
+
+
+cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
-EOF
+_ACEOF
+
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
-EOF
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:940: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ 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
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
+ 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
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:953: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
+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
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:966: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
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
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:979: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
+ 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
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:992: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
+ STRIP=$ac_ct_STRIP
else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-# Uncomment the next line to remove the date from the reported bfd version
-#is_release=y
-bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
-bfd_version_string="\"${VERSION}\""
-if test x${is_release} = x; then
- bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
- bfd_version_string="\"${VERSION} ${bfd_version_date}\""
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
else
- ac_tool_prefix=
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
fi
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+
+
+
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1027: 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="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+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"
+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"; 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
+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
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1059: 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="${ac_tool_prefix}ranlib"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1091: 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_ac_ct_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.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
@@ -1141,8 +3257,7 @@ no) enable_shared=no ;;
esac
else
enable_shared=no
-fi
-
+fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
@@ -1165,8 +3280,7 @@ no) enable_static=no ;;
esac
else
enable_static=yes
-fi
-
+fi;
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
@@ -1188,229 +3302,7 @@ no) enable_fast_install=no ;;
esac
else
enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1197: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1227: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1278: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1310: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1321 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1352: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1357: 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:1366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1385: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
+fi;
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
@@ -1418,13 +3310,12 @@ if test "${with_gnu_ld+set}" = set; then
test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi
-
+fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1428: checking for ld used by GCC" >&5
+ 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
@@ -1453,14 +3344,14 @@ echo "configure:1428: checking for ld used by GCC" >&5
;;
esac
elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1458: checking for GNU ld" >&5
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1461: checking for non-GNU ld" >&5
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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-:}"
@@ -1486,15 +3377,19 @@ fi
LD="$lt_cv_path_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
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1496: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
@@ -1503,27 +3398,27 @@ else
lt_cv_prog_gnu_ld=no
fi
fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+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 $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1513: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+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 $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1525: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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.
@@ -1556,33 +3451,24 @@ fi
fi
NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
+echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1563: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
+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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1584: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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=
@@ -1619,6 +3505,7 @@ cygwin* | mingw* |pw32*)
;;
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
@@ -1629,9 +3516,10 @@ darwin* | rhapsody*)
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -1689,17 +3577,10 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case $host_cpu in
- alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+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
@@ -1747,78 +3628,85 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+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
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1757: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
+# 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
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1783: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
fi
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
+if test -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
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1820: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
/*)
@@ -1870,17 +3758,19 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1882: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
/*)
@@ -1932,9 +3822,11 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
else
@@ -1946,138 +3838,164 @@ fi
;;
esac
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1953: 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="${ac_tool_prefix}ranlib"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1985: 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_ac_ct_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.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2020: 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="${ac_tool_prefix}strip"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2052: 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_ac_ct_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.
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+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
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ STRIP=$ac_ct_STRIP
else
- STRIP=":"
-fi
+ STRIP="$ac_cv_prog_STRIP"
fi
@@ -2093,20 +4011,19 @@ 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
+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
-
+fi;
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
@@ -2115,8 +4032,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2119 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ 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*)
@@ -2149,7 +4070,11 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ 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"
@@ -2162,51 +4087,124 @@ ia64-*-hpux*)
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 $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2171: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
-# 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_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 <<EOF
-#line 2184 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
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_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 "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+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"
@@ -2218,54 +4216,61 @@ esac
# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
+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
-
# 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" \
@@ -2275,15 +4280,26 @@ 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 "configure: error: libtool configure failed" 1>&2; exit 1; }
+|| { { 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
- 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
@@ -2297,11 +4313,11 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# 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
@@ -2309,85 +4325,142 @@ if test "${enable_64_bit_bfd+set}" = set; then
case "${enableval}" in
yes) want64=true ;;
no) want64=false ;;
- *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
+ *) { { 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.
+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 "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ 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.
+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 "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
+ *) { { 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
+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 "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
+ *) { { 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
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
+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 "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
+ { { 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 $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2381: 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
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
@@ -2396,11 +4469,27 @@ else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
+
MAINT=$MAINTAINER_MODE_TRUE
-
-echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
-echo "configure:2404: checking whether to install libbfd" >&5
+
+ 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"
@@ -2411,10 +4500,10 @@ else
else
install_libbfd_p=no
fi
-fi
+fi;
+ echo "$as_me:$LINENO: result: $install_libbfd_p" >&5
+echo "${ECHO_T}$install_libbfd_p" >&6
- echo "$ac_t""$install_libbfd_p" 1>&6
-
if test $install_libbfd_p = yes; then
INSTALL_LIBBFD_TRUE=
@@ -2423,49 +4512,23 @@ 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_alias)/$(target_alias)/lib'
- bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
+ bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
+ bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
fi
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2441: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
host64=false
@@ -2474,380 +4537,1143 @@ bfd_default_target_size=32
# host stuff:
-# Extract the first word of "gcc", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2481: 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:2511: 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:2562: 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:2594: 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
+
+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
-cat > conftest.$ac_ext << EOF
+ ;
+ 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. */
-#line 2605 "configure"
-#include "confdefs.h"
+int
+main ()
+{
-main(){return(0);}
-EOF
-if { (eval echo configure:2610: \"$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
+ ;
+ 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
- ac_cv_prog_cc_cross=yes
+ CFLAGS="-g"
fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
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 "$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
-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:2636: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2641: 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;
+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
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+_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
- ac_cv_prog_gcc=no
-fi
+ 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
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+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
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
else
- GCC=
+ 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_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2669: 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
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+
+
+ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw 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
+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
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
+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
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
+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 "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
+ 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
-ALL_LINGUAS="fr tr ja es sv da zh_CN ro"
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2703: checking how to run the C preprocessor" >&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
+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 eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
+ # 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.
- cat > conftest.$ac_ext <<EOF
-#line 2718 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
+ # 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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 2735 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2741: \"$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
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 2752 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2758: \"$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
- :
+ 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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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*
+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
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+
+ done
+ ac_cv_prog_CPP=$CPP
+
fi
- CPP="$ac_cv_prog_CPP"
+ CPP=$ac_cv_prog_CPP
else
- ac_cv_prog_CPP="$CPP"
+ ac_cv_prog_CPP=$CPP
fi
-echo "$ac_t""$CPP" 1>&6
-
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2785: 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: 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
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+ 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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+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 "$ac_t""no" 1>&6
+ { { 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
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2813: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
- cat > conftest.$ac_ext <<EOF
-#line 2818 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2826: \"$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*
+
+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 "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest*
+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 <<EOF
-#line 2843 "configure"
-#include "confdefs.h"
+ 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>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2856,16 +5682,19 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2861 "configure"
-#include "confdefs.h"
+ 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>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2874,269 +5703,530 @@ 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
+ if test "$cross_compiling" = yes; then
:
else
- cat > conftest.$ac_ext <<EOF
-#line 2882 "configure"
-#include "confdefs.h"
+ 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>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#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
-EOF
-if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
+ 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 -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2917: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
+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. */
-; return 0; }
-EOF
-if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+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 <<\EOF
-#define const
-EOF
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
fi
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2992: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 2999 "configure"
-#include "confdefs.h"
+ 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
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:3006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+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
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
+ *)
+ 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
+_ACEOF
+ ;;
esac
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3032: checking for off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+# 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 <<EOF
-#line 3037 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ 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
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
+ 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 "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3065: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3070 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ 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
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_size_t=no
fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3100: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3105 "configure"
-#include "confdefs.h"
+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 = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3133: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3138 "configure"
-#include "confdefs.h"
-
+ 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
@@ -3158,137 +6248,217 @@ char *alloca ();
# endif
#endif
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
fi
-rm -f conftest*
+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
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
-if test $ac_cv_func_alloca_works = no; then
+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 <<\EOF
+# 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
-EOF
+_ACEOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3198: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3203 "configure"
-#include "confdefs.h"
+ 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
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
- rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+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
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3228: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3233 "configure"
-#include "confdefs.h"
+ 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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
+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
-EOF
+_ACEOF
- break
-else
- echo "$ac_t""no" 1>&6
+ break
fi
-done
+ done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3283: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3291 "configure"
-#include "confdefs.h"
+ 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;
@@ -3301,138 +6471,316 @@ find_stack_direction ()
else
return (&dummy > addr) ? 1 : -1;
}
+
+int
main ()
{
- exit (find_stack_direction() < 0);
+ exit (find_stack_direction () < 0);
}
-EOF
-if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ 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 -fr conftest*
+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
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
fi
-for ac_hdr in unistd.h
+
+
+for ac_header in stdlib.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3335: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3340 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3345: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3374: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3379 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3427: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3435 "configure"
-#include "confdefs.h"
+ 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:
@@ -3446,34 +6794,34 @@ else
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
+ 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
- propogated back to all the places they're supposed to be.
+ 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 <sys/types.h>
+
#include <fcntl.h>
#include <sys/mman.h>
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+#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. */
-# ifndef 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 */
-# ifdef HAVE_SYS_PARAM_H
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
@@ -3500,469 +6848,910 @@ else
#endif /* no HAVE_GETPAGESIZE */
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
-main()
+main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
+ 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);
}
-
-EOF
-if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ 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 -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
fi
+rm -f conftest.mmap
+
+
+
+
+
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+
+
+
+
+
+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
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3603: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3608 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3613: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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 \
+
+
+
+
+
+
+
+
+
+
+for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3643: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3648 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
if test "${ac_cv_func_stpcpy+set}" != "set"; then
- for ac_func in stpcpy
+
+for ac_func in stpcpy
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3700: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3705 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STPCPY 1
-EOF
+_ACEOF
fi
if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3762: checking for LC_MESSAGES" >&5
-if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3767 "configure"
-#include "confdefs.h"
+ 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() {
+int
+main ()
+{
return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LC_MESSAGES 1
-EOF
+_ACEOF
fi
fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3795: 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.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
USE_NLS=$enableval
else
USE_NLS=yes
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
- echo "$ac_t""$USE_NLS" 1>&6
-
USE_INCLUDED_LIBINTL=no
if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
+ echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
+echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3815: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
+# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
nls_cv_force_use_gnu_gettext=$withval
else
nls_cv_force_use_gnu_gettext=no
-fi
-
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+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=NONE
-
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3834: checking for libintl.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3839 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3844: \"$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"
+_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
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3861: checking for gettext in libc" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3866 "configure"
-#include "confdefs.h"
+ 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() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libc=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+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 $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3889: checking for bindtextdomain in -lintl" >&5
-ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3897 "configure"
-#include "confdefs.h"
+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; }
-EOF
-if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3924: checking for gettext in libintl" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3929 "configure"
-#include "confdefs.h"
+ 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
+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() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libintl=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
- echo "$ac_t""no" 1>&6
+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
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GETTEXT 1
-EOF
+_ACEOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3964: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+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_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -3986,108 +7775,161 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
+
+for ac_func in dcgettext
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3998: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4003 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4053: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+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_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ 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"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4089: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+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_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4111,44 +7953,75 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- cat > conftest.$ac_ext <<EOF
-#line 4121 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CATOBJEXT=.mo
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CATOBJEXT=.mo
DATADIRNAME=lib
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
INSTOBJEXT=.mo
fi
fi
-
-else
- echo "$ac_t""no" 1>&6
+
fi
-
- if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
+
+
+ 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
@@ -4156,10 +8029,10 @@ fi
INTLOBJS="\$(GETTOBJS)"
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4161: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+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_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -4183,53 +8056,59 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4195: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+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_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ 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"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4231: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+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_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4253,12 +8132,14 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
@@ -4274,7 +8155,8 @@ fi
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
- echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
@@ -4299,25 +8181,32 @@ fi
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 $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4321: checking for catalogs to be installed" >&5
+ 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
@@ -4325,7 +8214,8 @@ echo "configure:4321: checking for catalogs to be installed" >&5
esac
done
LINGUAS=$NEW_LINGUAS
- echo "$ac_t""$LINGUAS" 1>&6
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
fi
if test -n "$LINGUAS"; then
@@ -4339,45 +8229,155 @@ echo "configure:4321: checking for catalogs to be installed" >&5
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
-
+
if test -f $srcdir/po2tbl.sed.in; then
if test "$CATOBJEXT" = ".cat"; then
- ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4349: checking for linux/version.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4354 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4359: \"$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"
+_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=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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: 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 eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_linux_version_h = yes; then
msgformat=linux
else
- echo "$ac_t""no" 1>&6
-msgformat=xopen
+ msgformat=xopen
fi
+
sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
fi
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
@@ -4391,14 +8391,14 @@ fi
GT_NO=
GT_YES="#YES#"
fi
-
-
+
+
MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
+
l=
-
+
if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
@@ -4415,7 +8415,7 @@ fi
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
fi
-
+
# Permit host specific settings.
. ${srcdir}/configure.host
@@ -4428,60 +8428,75 @@ fi
# 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:4437: 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
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ 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'
@@ -4492,112 +8507,890 @@ BFD_HOST_64_BIT_DEFINED=0
BFD_HOST_64_BIT=
BFD_HOST_U_64_BIT=
-echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:4497: checking for long long" >&5
-if eval "test \"`echo '$''{'bfd_cv_has_long_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for long long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6
+if test "${bfd_cv_has_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 4502 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
unsigned long long ll = 18446744073709551615ULL;
-; return 0; }
-EOF
-if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_has_long_long=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_has_long_long=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_has_long_long=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bfd_cv_has_long_long" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_has_long_long" >&5
+echo "${ECHO_T}$bfd_cv_has_long_long" >&6
if test $bfd_cv_has_long_long = yes; then
BFD_HOST_LONG_LONG=1
- echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:4525: checking size of long long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 4531 "configure"
-#include "confdefs.h"
-#include "confdefs.h"
-#include <sys/types.h>
+ echo "$as_me:$LINENO: checking for long long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6
+if test "${ac_cv_type_long_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 long *) 0)
+ return 0;
+if (sizeof (long 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_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
+echo "${ECHO_T}$ac_cv_type_long_long" >&6
+
+echo "$as_me:$LINENO: checking size of long long" >&5
+echo $ECHO_N "checking size of long long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long_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 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 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
-int main() {
-switch (0) case 0: case (sizeof (long long) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_sizeof_long_long=$ac_size
+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 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 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
fi
-rm -f conftest*
- if test x$ac_cv_sizeof_long_long != x ; then break; 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 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_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long 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 long)); }
+unsigned long ulongval () { return (long) (sizeof (long long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
-fi
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
-if test x$ac_cv_sizeof_long_long = x ; then
- { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
-fi
-echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
-cat >> confdefs.h <<EOF
+ ;
+ 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_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 long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long 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_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-EOF
+_ACEOF
fi
-echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:4566: checking size of long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
- for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 4572 "configure"
-#include "confdefs.h"
-#include "confdefs.h"
-#include <sys/types.h>
+ 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
-int main() {
-switch (0) case 0: case (sizeof (long) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:4582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_sizeof_long=$ac_size
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ 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*
- if test x$ac_cv_sizeof_long != x ; then break; 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 ()
+{
-fi
+ 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);
-if test x$ac_cv_sizeof_long = x ; then
- { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
-fi
-echo "$ac_t""$ac_cv_sizeof_long" 1>&6
-cat >> confdefs.h <<EOF
+ ;
+ 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
-EOF
+_ACEOF
if test "x${ac_cv_sizeof_long}" = "x8"; then
@@ -4635,10 +9428,10 @@ fi
if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
- echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4640: checking for build system executable suffix" >&5
-if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for build system executable suffix" >&5
+echo $ECHO_N "checking for build system executable suffix... $ECHO_C" >&6
+if test "${bfd_cv_build_exeext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.c
@@ -4653,609 +9446,2008 @@ else
rm -f conftest*
test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
fi
-
-echo "$ac_t""$bfd_cv_build_exeext" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_build_exeext" >&5
+echo "${ECHO_T}$bfd_cv_build_exeext" >&6
EXEEXT_FOR_BUILD=""
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
-for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
+
+
+
+
+
+
+for ac_header in stddef.h string.h strings.h stdlib.h time.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4668: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4673 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4678: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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_hdr in fcntl.h sys/file.h sys/time.h
+
+
+
+for ac_header in fcntl.h sys/file.h sys/time.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4708: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4713 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4718: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4745: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4750 "configure"
-#include "confdefs.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
+ 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 <sys/time.h>
#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+
+int
+main ()
+{
+if ((struct tm *) 0)
+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_header_time=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define TIME_WITH_SYS_TIME 1
-EOF
+_ACEOF
fi
+
+
+
+
+
ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4784: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4789 "configure"
-#include "confdefs.h"
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $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. */
#include <sys/types.h>
#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- ac_header_dirent=$ac_hdr; break
-else
- echo "$ac_t""no" 1>&6
+
+int
+main ()
+{
+if ((DIR *) 0)
+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
+ 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_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
fi
+
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4822: checking for opendir in -ldir" >&5
-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldir $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4830 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+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 opendir();
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ 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_search_opendir="none required"
+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 "$ac_cv_search_opendir" = no; then
+ for ac_lib in dir; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+/* 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 opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ 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_search_opendir="-l$ac_lib"
+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_exeext conftest.$ac_ext
+ done
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+LIBS=$ac_func_search_save_LIBS
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ldir"
-else
- echo "$ac_t""no" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
fi
else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4863: checking for opendir in -lx" >&5
-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lx $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4871 "configure"
-#include "confdefs.h"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+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 opendir();
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ 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_search_opendir="none required"
+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 "$ac_cv_search_opendir" = no; then
+ for ac_lib in x; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+/* 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 opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ 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_search_opendir="-l$ac_lib"
+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_exeext conftest.$ac_ext
+ done
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lx"
+
+fi
+
+echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
+echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
+if test "${gcc_cv_header_string+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ 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>
+#include <strings.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
+ gcc_cv_header_string=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_header_string=no
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
+echo "${ECHO_T}$gcc_cv_header_string" >&6
+if test $gcc_cv_header_string = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRING_WITH_STRINGS 1
+_ACEOF
fi
+
+
+
+
+
+
+
for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4907: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4912 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
+
for ac_func in strtoull
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4962: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4967 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
-case "${host}" in
-*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
- cat >> confdefs.h <<\EOF
-#define USE_BINARY_FOPEN 1
-EOF
- ;;
-esac
-
-echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:5025: checking whether strstr must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether basename is declared" >&5
+echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_basename+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5030 "configure"
-#include "confdefs.h"
+ 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 ()
+{
+#ifndef basename
+ char *p = (char *) basename;
+#endif
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.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
+ ac_cv_have_decl_basename=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_basename=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
+echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
+if test $ac_cv_have_decl_basename = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_BASENAME 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_BASENAME 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether ftello is declared" >&5
+echo $ECHO_N "checking whether ftello is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_ftello+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 ()
+{
+#ifndef ftello
+ char *p = (char *) ftello;
#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_have_decl_ftello=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_ftello=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_ftello" >&5
+echo "${ECHO_T}$ac_cv_have_decl_ftello" >&6
+if test $ac_cv_have_decl_ftello = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FTELLO 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FTELLO 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether ftello64 is declared" >&5
+echo $ECHO_N "checking whether ftello64 is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_ftello64+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 ()
+{
+#ifndef ftello64
+ char *p = (char *) ftello64;
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.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
+ ac_cv_have_decl_ftello64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_ftello64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_ftello64" >&5
+echo "${ECHO_T}$ac_cv_have_decl_ftello64" >&6
+if test $ac_cv_have_decl_ftello64 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FTELLO64 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FTELLO64 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether fseeko is declared" >&5
+echo $ECHO_N "checking whether fseeko is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fseeko+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 ()
+{
+#ifndef fseeko
+ char *p = (char *) fseeko;
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.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
+ ac_cv_have_decl_fseeko=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fseeko=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fseeko" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fseeko" >&6
+if test $ac_cv_have_decl_fseeko = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FSEEKO 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FSEEKO 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether fseeko64 is declared" >&5
+echo $ECHO_N "checking whether fseeko64 is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fseeko64+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 ()
+{
+#ifndef fseeko64
+ char *p = (char *) fseeko64;
#endif
-int main() {
-char *(*pfn) = (char *(*)) strstr
-; return 0; }
-EOF
-if { (eval echo configure:5051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_strstr=no
+
+ ;
+ 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_have_decl_fseeko64=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_strstr=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fseeko64=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fseeko64" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fseeko64" >&6
+if test $ac_cv_have_decl_fseeko64 = yes; then
-echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
-if test $bfd_cv_decl_needed_strstr = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRSTR 1
-EOF
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FSEEKO64 1
+_ACEOF
-fi
-echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:5072: checking whether malloc must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5077 "configure"
-#include "confdefs.h"
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FSEEKO64 0
+_ACEOF
+
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *(*pfn) = (char *(*)) malloc
-; return 0; }
-EOF
-if { (eval echo configure:5098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_malloc=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_malloc=yes
-fi
-rm -f conftest*
fi
-echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
-if test $bfd_cv_decl_needed_malloc = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_MALLOC 1
-EOF
-fi
-echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:5119: checking whether realloc must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5124 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
+case "${host}" in
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BINARY_FOPEN 1
+_ACEOF
+ ;;
+esac
+
+echo "$as_me:$LINENO: checking whether ffs is declared" >&5
+echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_ffs+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 ()
+{
+#ifndef ffs
+ char *p = (char *) ffs;
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.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
+ ac_cv_have_decl_ffs=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_ffs=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5
+echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6
+if test $ac_cv_have_decl_ffs = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFS 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFS 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether free is declared" >&5
+echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_free+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 ()
+{
+#ifndef free
+ char *p = (char *) free;
#endif
-int main() {
-char *(*pfn) = (char *(*)) realloc
-; return 0; }
-EOF
-if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_realloc=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_realloc=yes
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
-if test $bfd_cv_decl_needed_realloc = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_REALLOC 1
-EOF
+ ;
+ 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_have_decl_free=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_free=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
+echo "${ECHO_T}$ac_cv_have_decl_free" >&6
+if test $ac_cv_have_decl_free = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREE 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREE 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether getenv is declared" >&5
+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getenv+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 ()
+{
+#ifndef getenv
+ char *p = (char *) getenv;
+#endif
-fi
+ ;
+ 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_have_decl_getenv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getenv=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
+if test $ac_cv_have_decl_getenv = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether malloc is declared" >&5
+echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_malloc+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 ()
+{
+#ifndef malloc
+ char *p = (char *) malloc;
+#endif
-echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:5166: checking whether free must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5171 "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
+ ac_cv_have_decl_malloc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_malloc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
+if test $ac_cv_have_decl_malloc = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MALLOC 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MALLOC 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether realloc is declared" >&5
+echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_realloc+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 ()
+{
+#ifndef realloc
+ char *p = (char *) realloc;
+#endif
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.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
+ ac_cv_have_decl_realloc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_realloc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
+if test $ac_cv_have_decl_realloc = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_REALLOC 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_REALLOC 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether stpcpy is declared" >&5
+echo $ECHO_N "checking whether stpcpy is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_stpcpy+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 ()
+{
+#ifndef stpcpy
+ char *p = (char *) stpcpy;
#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_have_decl_stpcpy=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_stpcpy=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_stpcpy" >&5
+echo "${ECHO_T}$ac_cv_have_decl_stpcpy" >&6
+if test $ac_cv_have_decl_stpcpy = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STPCPY 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STPCPY 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether strstr is declared" >&5
+echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strstr+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 ()
+{
+#ifndef strstr
+ char *p = (char *) strstr;
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.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
+ ac_cv_have_decl_strstr=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_strstr=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
+if test $ac_cv_have_decl_strstr = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
+echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_snprintf+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 ()
+{
+#ifndef snprintf
+ char *p = (char *) snprintf;
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.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
+ ac_cv_have_decl_snprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_snprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
+if test $ac_cv_have_decl_snprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
+echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_vsnprintf+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 ()
+{
+#ifndef vsnprintf
+ char *p = (char *) vsnprintf;
#endif
-int main() {
-char *(*pfn) = (char *(*)) free
-; return 0; }
-EOF
-if { (eval echo configure:5192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_free=no
+
+ ;
+ 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_have_decl_vsnprintf=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_free=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_vsnprintf=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
+if test $ac_cv_have_decl_vsnprintf = yes; then
-echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
-if test $bfd_cv_decl_needed_free = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_FREE 1
-EOF
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 1
+_ACEOF
-fi
-echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5213: checking whether getenv must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5218 "configure"
-#include "confdefs.h"
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 0
+_ACEOF
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *(*pfn) = (char *(*)) getenv
-; return 0; }
-EOF
-if { (eval echo configure:5239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_getenv=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_getenv=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
-if test $bfd_cv_decl_needed_getenv = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_GETENV 1
-EOF
fi
+
# If we are configured native, pick a core file support file.
COREFILE=
COREFLAG=
@@ -5265,7 +11457,7 @@ if test "${target}" = "${host}"; then
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
COREFILE=''
;;
- alpha*-*-linux-gnu*)
+ alpha*-*-linux-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/alphalinux.h"'
;;
@@ -5282,6 +11474,10 @@ if test "${target}" = "${host}"; then
hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
+ hppa*-*-netbsd* | hppa*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
+
i370-*-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i370linux.h"'
@@ -5299,7 +11495,7 @@ if test "${target}" = "${host}"; then
i[3-7]86-*-bsdi)
COREFILE=
;;
- i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234]* | i[3-7]86-*-freebsd*aout*)
+ i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
;;
@@ -5325,7 +11521,7 @@ if test "${target}" = "${host}"; then
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386mach3.h"'
;;
- i[3-7]86-*-linux-gnu*)
+ i[3-7]86-*-linux-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386linux.h"'
;;
@@ -5363,7 +11559,7 @@ if test "${target}" = "${host}"; then
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/hp300bsd.h"'
;;
- m68*-*-linux-gnu*)
+ m68*-*-linux-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/m68klinux.h"'
;;
@@ -5391,6 +11587,9 @@ if test "${target}" = "${host}"; then
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/m88kmach3.h"'
;;
+ m88*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
ns32k-pc532-mach)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/pc532mach.h"'
@@ -5410,30 +11609,60 @@ if test "${target}" = "${host}"; then
COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
# have c_impl as a member of struct core_dumpx
- echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6
-echo "configure:5415: checking for c_impl in struct core_dumpx" >&5
- cat > conftest.$ac_ext <<EOF
-#line 5417 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for c_impl in struct core_dumpx" >&5
+echo $ECHO_N "checking for c_impl in struct core_dumpx... $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 <core.h>
-int main() {
+int
+main ()
+{
struct core_dumpx c; c.c_impl = 0;
-; return 0; }
-EOF
-if { (eval echo configure:5424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ 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
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_ST_C_IMPL 1
-EOF
+_ACEOF
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ 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*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
;;
rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
rs6000-*-*) COREFILE=rs6000-core.lo ;;
@@ -5464,7 +11693,7 @@ rm -f conftest*
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxult2.h"'
;;
- vax-*-linux-gnu*)
+ vax-*-linux-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxlinux.h"'
;;
@@ -5493,631 +11722,1206 @@ rm -f conftest*
# ELF corefile support has several flavors, but all of
# them use something called <sys/procfs.h>
- for ac_hdr in sys/procfs.h
+
+for ac_header in sys/procfs.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5501: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5506 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5511: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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
if test "$ac_cv_header_sys_procfs_h" = yes; then
- echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5539: checking for prstatus_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5544 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for prstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for prstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_prstatus_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. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_prstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prstatus_t" >&6
- echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5575: checking for prstatus32_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for prstatus32_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for prstatus32_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_prstatus32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5580 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prstatus32_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_prstatus32_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prstatus32_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_prstatus32_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRSTATUS32_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prstatus32_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prstatus32_t" >&6
- echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5611: checking for prstatus_t.pr_who in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo $ECHO_N "checking for prstatus_t.pr_who in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5616 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prstatus_t avar; void* aref = (void*) &avar.pr_who
-; return 0; }
-EOF
-if { (eval echo configure:5625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRSTATUS_T_PR_WHO 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&6
- echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5647: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo $ECHO_N "checking for prstatus32_t.pr_who in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5652 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prstatus32_t avar; void* aref = (void*) &avar.pr_who
-; return 0; }
-EOF
-if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRSTATUS32_T_PR_WHO 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&6
- echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5683: checking for pstatus_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5688 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
pstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_pstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
- echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5719: checking for pxstatus_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for pxstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for pxstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_pxstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5724 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
pxstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_pxstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pxstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_pxstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PXSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pxstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pxstatus_t" >&6
- echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5755: checking for pstatus32_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for pstatus32_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for pstatus32_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_pstatus32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5760 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
pstatus32_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_pstatus32_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pstatus32_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_pstatus32_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PSTATUS32_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus32_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus32_t" >&6
- echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5791: checking for prpsinfo_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for prpsinfo_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for prpsinfo_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5796 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prpsinfo_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prpsinfo_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_prpsinfo_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRPSINFO_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prpsinfo_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prpsinfo_t" >&6
- echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5827: checking for prpsinfo32_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for prpsinfo32_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_prpsinfo32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5832 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
prpsinfo32_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRPSINFO32_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&6
- echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5863: checking for psinfo_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for psinfo_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for psinfo_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5868 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
psinfo_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_psinfo_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_psinfo_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PSINFO_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psinfo_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psinfo_t" >&6
- echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5899: checking for psinfo32_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for psinfo32_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for psinfo32_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_psinfo32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5904 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
psinfo32_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_psinfo32_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_psinfo32_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_psinfo32_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PSINFO32_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psinfo32_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psinfo32_t" >&6
- echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5935: checking for lwpstatus_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for lwpstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for lwpstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5940 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
lwpstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_lwpstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_lwpstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LWPSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpstatus_t" >&6
- echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5971: checking for lwpxstatus_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for lwpxstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_lwpxstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5976 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
lwpxstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:5985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LWPXSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&6
- echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6007: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo $ECHO_N "checking for lwpstatus_t.pr_context in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6012 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
-; return 0; }
-EOF
-if { (eval echo configure:6021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LWPSTATUS_T_PR_CONTEXT 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&6
- echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6043: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo $ECHO_N "checking for lwpstatus_t.pr_reg in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6048 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
-; return 0; }
-EOF
-if { (eval echo configure:6057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LWPSTATUS_T_PR_REG 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&6
- echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6079: checking for win32_pstatus_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo $ECHO_N "checking for win32_pstatus_t in sys/procfs.h... $ECHO_C" >&6
+ if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 6084 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define _SYSCALL32
#include <sys/procfs.h>
-int main() {
+int
+main ()
+{
win32_pstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:6093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_WIN32_PSTATUS_T 1
-EOF
+_ACEOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
+ echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&5
+echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&6
fi
fi
if test -n "$TRAD_HEADER"; then
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define TRAD_HEADER $TRAD_HEADER
-EOF
+_ACEOF
fi
@@ -6243,7 +13047,6 @@ do
# This list is alphabetized to make it easy to compare
# with the two vector lists in targets.c. For the same reason,
# use one entry per line, even though this leads to long lines.
- a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
@@ -6267,12 +13070,21 @@ do
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" ;;
+ bfd_elf32_bfin_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
+ bfd_elf32_bfinfdpic_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_symbian_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_vxworks_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ 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_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" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
@@ -6284,8 +13096,9 @@ do
bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
- bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
- bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@@ -6295,9 +13108,15 @@ do
bfd_elf32_iq2000_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_littlearm_symbian_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlearm_vxworks_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_littlemips_vxworks_vec)
+ tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m32rlin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
@@ -6310,17 +13129,19 @@ do
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
- bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
- bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ 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" ;;
# 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
@@ -6334,29 +13155,32 @@ do
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_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
- bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
- bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.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_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" ;;
bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
+ bfd_elf32_xc16x_vec) tb="$tb elf32-xc16x.lo elf32.lo $elf" ;;
bfd_elf32_xtensa_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
@@ -6367,9 +13191,9 @@ do
bfd_elf64_sh64blin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
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 elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; 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_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_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" ;;
@@ -6412,12 +13236,12 @@ do
m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
- m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
- m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;;
+ m88kopenbsd_vec) tb="$tb m88kopenbsd.lo aout32.lo" ;;
+ maxqcoff_vec) tb="$tb coff-maxq.lo" ;;
mach_o_be_vec) tb="$tb mach-o.lo" ;;
mach_o_le_vec) tb="$tb mach-o.lo" ;;
mach_o_fat_vec) tb="$tb mach-o.lo" ;;
@@ -6481,7 +13305,8 @@ do
vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
- z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
+ z80coff_vec) tb="$tb coff-z80.lo reloc16.lo" ;;
+ z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo cofflink.lo" ;;
# These appear out of order in targets.c
srec_vec) tb="$tb srec.lo" ;;
@@ -6491,7 +13316,9 @@ do
cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
"") ;;
- *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
+ *) { { echo "$as_me:$LINENO: error: *** unknown target vector $vec" >&5
+echo "$as_me: error: *** unknown target vector $vec" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
if test ${target_size} = 64; then
@@ -6555,32 +13382,39 @@ case ${host64}-${target64}-${want64} in
bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
if test $BFD_HOST_64_BIT_DEFINED = 0; then
- echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
- echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
+ { echo "$as_me:$LINENO: WARNING: You have requested a 64 bit BFD configuration, but" >&5
+echo "$as_me: WARNING: You have requested a 64 bit BFD configuration, but" >&2;}
+ { echo "$as_me:$LINENO: WARNING: your compiler may not have a 64 bit integral type" >&5
+echo "$as_me: WARNING: your compiler may not have a 64 bit integral type" >&2;}
fi
if test -n "$GCC" ; then
bad_64bit_gcc=no;
- echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6565: checking for gcc version with buggy 64-bit support" >&5
+ echo "$as_me:$LINENO: checking for gcc version with buggy 64-bit support" >&5
+echo $ECHO_N "checking for gcc version with buggy 64-bit support... $ECHO_C" >&6
# Add more tests for gcc versions with non-working 64-bit support here.
- cat > conftest.$ac_ext <<EOF
-#line 6568 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
:__GNUC__:__GNUC_MINOR__:__i386__:
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep ": 2 : 91 : 1 :" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP ": 2 : 91 : 1 :" >/dev/null 2>&1; then
bad_64bit_gcc=yes;
- echo "$ac_t""yes: egcs-1.1.2 on ix86 spotted" 1>&6
+ echo "$as_me:$LINENO: result: yes: egcs-1.1.2 on ix86 spotted" >&5
+echo "${ECHO_T}yes: egcs-1.1.2 on ix86 spotted" >&6
else
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
rm -f conftest*
if test $bad_64bit_gcc = yes ; then
- { echo "configure: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" >&5
+echo "$as_me: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" >&2;}
+ { (exit 1); exit 1; }; }
fi
fi
;;
@@ -6603,104 +13437,530 @@ esac
# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
# Hopefully a reasonable assumption since fseeko et.al. should be
# upward compatible.
-for ac_func in ftello ftello64 fseeko fseeko64
+
+
+
+
+
+for ac_func in ftello ftello64 fseeko fseeko64 fopen64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6610: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6615 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
+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 x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_off_t=no
fi
-rm -f conftest*
+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 eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
+echo "$as_me:$LINENO: checking size of off_t" >&5
+echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_off_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
-fi
-done
+ if test "$ac_cv_type_off_t" = 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 (off_t))) >= 0)];
+test_array [0] = 0
-if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
- echo $ac_n "checking size of off_t""... $ac_c" 1>&6
-echo "configure:6664: checking size of off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
- cat > conftest.$ac_ext <<EOF
-#line 6670 "configure"
-#include "confdefs.h"
-#include "confdefs.h"
-#include <sys/types.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
+ 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 (off_t))) <= $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 (off_t))) < 0)];
+test_array [0] = 0
-int main() {
-switch (0) case 0: case (sizeof (off_t) == $ac_size):;
-; return 0; }
-EOF
-if { (eval echo configure:6680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_sizeof_off_t=$ac_size
+ ;
+ 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 (off_t))) >= $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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
fi
-rm -f conftest*
- if test x$ac_cv_sizeof_off_t != x ; then break; 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 (off_t))) <= $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_off_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (off_t), 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 (off_t)); }
+unsigned long ulongval () { return (long) (sizeof (off_t)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
-fi
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (off_t))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (off_t))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (off_t))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
-if test x$ac_cv_sizeof_off_t = x ; then
- { echo "configure: error: cannot determine a size for off_t" 1>&2; exit 1; }
-fi
-echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
-cat >> confdefs.h <<EOF
+ ;
+ 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_off_t=`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 (off_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (off_t), 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_off_t=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
-EOF
+_ACEOF
fi
-echo $ac_n "checking file_ptr type""... $ac_c" 1>&6
-echo "configure:6704: checking file_ptr type" >&5
+echo "$as_me:$LINENO: checking file_ptr type" >&5
+echo $ECHO_N "checking file_ptr type... $ECHO_C" >&6
bfd_file_ptr="long"
bfd_ufile_ptr="unsigned long"
if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
@@ -6708,7 +13968,8 @@ if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
bfd_file_ptr=BFD_HOST_64_BIT
bfd_ufile_ptr=BFD_HOST_U_64_BIT
fi
-echo "$ac_t""$bfd_file_ptr" 1>&6
+echo "$as_me:$LINENO: result: $bfd_file_ptr" >&5
+echo "${ECHO_T}$bfd_file_ptr" >&6
@@ -6721,112 +13982,276 @@ test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selar
test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
-for ac_hdr in unistd.h
+
+
+for ac_header in stdlib.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6729: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6734 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6739: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6768: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6773 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6821: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 6829 "configure"
-#include "confdefs.h"
+ 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:
@@ -6840,34 +14265,34 @@ else
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
+ 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
- propogated back to all the places they're supposed to be.
+ 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 <sys/types.h>
+
#include <fcntl.h>
#include <sys/mman.h>
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+#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. */
-# ifndef 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 */
-# ifdef HAVE_SYS_PARAM_H
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
@@ -6894,602 +14319,1705 @@ else
#endif /* no HAVE_GETPAGESIZE */
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
-main()
+main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
+ 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);
}
-
-EOF
-if { (eval echo configure:6969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ 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 -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
fi
+rm -f conftest.mmap
+
+
for ac_func in madvise mprotect
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6994: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6999 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
- true+yes ) cat >> confdefs.h <<\EOF
+ true+yes )
+cat >>confdefs.h <<\_ACEOF
#define USE_MMAP 1
-EOF
+_ACEOF
;;
esac
rm -f doc/config.status
-trap '' 1 2 15
-cat > confcache <<\EOF
+ 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"
+
+
+
+
+
+
+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
-
DEFS=-DHAVE_CONFIG_H
-# 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
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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 "${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
+echo "$as_me: error: conditional \"INSTALL_LIBBFD\" 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
+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
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ 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
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+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%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@bfd_version@%$bfd_version%g
-s%@bfd_version_string@%$bfd_version_string%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@CC@%$CC%g
-s%@LN_S@%$LN_S%g
-s%@OBJEXT@%$OBJEXT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@STRIP@%$STRIP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g
-s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g
-s%@bfdlibdir@%$bfdlibdir%g
-s%@bfdincludedir@%$bfdincludedir%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@HDEFINES@%$HDEFINES%g
-s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
-s%@BFD_HOST_LONG_LONG@%$BFD_HOST_LONG_LONG%g
-s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
-s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
-s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
-s%@COREFILE@%$COREFILE%g
-s%@COREFLAG@%$COREFLAG%g
-s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
-s%@WIN32LIBADD@%$WIN32LIBADD%g
-s%@TDEFINES@%$TDEFINES%g
-s%@wordsize@%$wordsize%g
-s%@bfd_libs@%$bfd_libs%g
-s%@all_backends@%$all_backends%g
-s%@bfd_backends@%$bfd_backends%g
-s%@bfd_machines@%$bfd_machines%g
-s%@bfd_default_target_size@%$bfd_default_target_size%g
-s%@bfd_file_ptr@%$bfd_file_ptr%g
-s%@bfd_ufile_ptr@%$bfd_ufile_ptr%g
-s%@tdefaults@%$tdefaults%g
-CEOF
-EOF
+# 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'`
-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
+
+# 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
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ 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
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ 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
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ 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
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+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)
+ 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
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_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
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_ACEOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # 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" ;;
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+_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" ;;
+ "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "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" ;;
+ "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
+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
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+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
+}
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# Create a (secure) tmp directory for tmp files.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+{
+ 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,@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,@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,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+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,@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,@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,@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,@XGETTEXT@,$XGETTEXT,;t t
+s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;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,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@l@,$l,;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
+s,@BFD_HOST_64_BIT_DEFINED@,$BFD_HOST_64_BIT_DEFINED,;t t
+s,@BFD_HOST_64_BIT@,$BFD_HOST_64_BIT,;t t
+s,@BFD_HOST_U_64_BIT@,$BFD_HOST_U_64_BIT,;t t
+s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
+s,@EXEEXT_FOR_BUILD@,$EXEEXT_FOR_BUILD,;t t
+s,@COREFILE@,$COREFILE,;t t
+s,@COREFLAG@,$COREFLAG,;t t
+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,@all_backends@,$all_backends,;t t
+s,@bfd_backends@,$bfd_backends,;t t
+s,@bfd_machines@,$bfd_machines,;t t
+s,@bfd_default_target_size@,$bfd_default_target_size,;t t
+s,@bfd_file_ptr@,$bfd_file_ptr,;t t
+s,@bfd_ufile_ptr@,$bfd_ufile_ptr,;t t
+s,@tdefaults@,$tdefaults,;t t
+s,@datarootdir@,$datarootdir,;t t
+s,@docdir@,$docdir,;t t
+s,@htmldir@,$htmldir,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_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
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ 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
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_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
+ - | *:- | *:-:* ) # 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
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # 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
+ 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=.
- 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= ;;
+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.
+ 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
+
+
+ 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
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; 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
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # 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; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ 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; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # 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
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ 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
+ 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; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
fi
-fi; done
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`(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'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ 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
+ 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=.
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile
-exit 0
-EOF
+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.
+ 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
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$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 $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ 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 $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ default ) sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (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/bfd/configure.host b/contrib/binutils/bfd/configure.host
index 024ed6254201..11b42e0fc137 100644
--- a/contrib/binutils/bfd/configure.host
+++ b/contrib/binutils/bfd/configure.host
@@ -19,16 +19,20 @@ HOST_U_64BIT_TYPE=
case "${host}" in
-hppa*-*-hpux*) # HP/UX's ftello64 et.al. declarations are only
+hppa*64*-*-hpux*) # HP/UX's ftello64 et.al. declarations are only
# visible when _LARGEFILE64_SOURCE is defined.
# Without those declarations, real_ftell et.al.
# get mis-compiled.
- HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE" ;;
+ HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE"
+ host64=true;;
+hppa*-*-hpux*) HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE" ;;
hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;;
hppa*-*-mpeix*) HDEFINES=-DHOST_HPPAMPEIX ;;
hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;;
hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;;
+ia64-*-hpux*) HDEFINES=-D_LARGEFILE64_SOURCE
+ host64=true;;
ia64-*-*) host64=true;;
# Workaround for limitations on win9x where file contents are
diff --git a/contrib/binutils/bfd/configure.in b/contrib/binutils/bfd/configure.in
index 9ed695c19791..212f96142fd8 100644
--- a/contrib/binutils/bfd/configure.in
+++ b/contrib/binutils/bfd/configure.in
@@ -1,27 +1,14 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.13)
-AC_INIT(libbfd.c)
+AC_PREREQ(2.59)
+AC_INIT
+AC_CONFIG_SRCDIR([libbfd.c])
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.15)
-# Uncomment the next line to remove the date from the reported bfd version
-#is_release=y
-
-changequote(,)dnl
-bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
-changequote([,])dnl
-
-bfd_version_string="\"${VERSION}\""
-if test x${is_release} = x; then
- bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
- bfd_version_string="\"${VERSION} ${bfd_version_date}\""
-fi
-AC_SUBST(bfd_version)
-AC_SUBST(bfd_version_string)
+AM_INIT_AUTOMAKE(bfd, 2.17)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
@@ -44,7 +31,7 @@ esac],[want64=false])dnl
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
[case "${enableval}" in
- yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
+ yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all'])
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
@@ -64,26 +51,19 @@ AC_ARG_WITH(mmap,
*) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
esac],[want_mmap=false])dnl
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-AC_ARG_ENABLE(build-warnings,
-[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+AC_ARG_ENABLE(secureplt,
+[ --enable-secureplt Default to creating read-only plt entries],
[case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi])dnl
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
+ yes) use_secureplt=true ;;
+ no) use_secureplt=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for secureplt option) ;;
+esac],[use_secureplt=false])dnl
+if test $use_secureplt = true; then
+ AC_DEFINE(USE_SECUREPLT, 1,
+ [Define if we should default to creating read-only plt entries])
fi
-AC_SUBST(WARN_CFLAGS)
+
+AM_BINUTILS_WARNINGS
AM_CONFIG_HEADER(config.h:config.in)
@@ -102,8 +82,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"
+ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi"
CY_GNU_GETTEXT
# Permit host specific settings.
@@ -120,16 +101,14 @@ BFD_HOST_U_64_BIT=
AC_MSG_CHECKING([for long long])
AC_CACHE_VAL(bfd_cv_has_long_long,
-[AC_TRY_COMPILE(,
-[unsigned long long ll = 18446744073709551615ULL;],
-bfd_cv_has_long_long=yes, bfd_cv_has_long_long=no)])
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[unsigned long long ll = 18446744073709551615ULL;]])],[bfd_cv_has_long_long=yes],[bfd_cv_has_long_long=no])])
AC_MSG_RESULT($bfd_cv_has_long_long)
if test $bfd_cv_has_long_long = yes; then
BFD_HOST_LONG_LONG=1
- AC_COMPILE_CHECK_SIZEOF(long long)
+ AC_CHECK_SIZEOF(long long)
fi
-AC_COMPILE_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long)
if test "x${ac_cv_sizeof_long}" = "x8"; then
host64=true
BFD_HOST_64BIT_LONG=1
@@ -158,16 +137,27 @@ AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
AC_HEADER_TIME
AC_HEADER_DIRENT
+ACX_HEADER_STRING
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
AC_CHECK_FUNCS(strtoull)
+AC_CHECK_DECLS(basename)
+AC_CHECK_DECLS(ftello)
+AC_CHECK_DECLS(ftello64)
+AC_CHECK_DECLS(fseeko)
+AC_CHECK_DECLS(fseeko64)
+
BFD_BINARY_FOPEN
-BFD_NEED_DECLARATION(strstr)
-BFD_NEED_DECLARATION(malloc)
-BFD_NEED_DECLARATION(realloc)
-BFD_NEED_DECLARATION(free)
-BFD_NEED_DECLARATION(getenv)
+AC_CHECK_DECLS(ffs)
+AC_CHECK_DECLS(free)
+AC_CHECK_DECLS(getenv)
+AC_CHECK_DECLS(malloc)
+AC_CHECK_DECLS(realloc)
+AC_CHECK_DECLS(stpcpy)
+AC_CHECK_DECLS(strstr)
+AC_CHECK_DECLS(snprintf)
+AC_CHECK_DECLS(vsnprintf)
# If we are configured native, pick a core file support file.
COREFILE=
@@ -178,7 +168,7 @@ if test "${target}" = "${host}"; then
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
COREFILE=''
;;
- alpha*-*-linux-gnu*)
+ alpha*-*-linux-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/alphalinux.h"'
;;
@@ -195,6 +185,10 @@ if test "${target}" = "${host}"; then
hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
+ hppa*-*-netbsd* | hppa*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
+
i370-*-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i370linux.h"'
@@ -219,7 +213,7 @@ changequote([,])dnl
COREFILE=
;;
changequote(,)dnl
- i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234]* | i[3-7]86-*-freebsd*aout*)
+ i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
@@ -259,7 +253,7 @@ changequote([,])dnl
TRAD_HEADER='"hosts/i386mach3.h"'
;;
changequote(,)dnl
- i[3-7]86-*-linux-gnu*)
+ i[3-7]86-*-linux-*)
changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386linux.h"'
@@ -300,7 +294,7 @@ changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/hp300bsd.h"'
;;
- m68*-*-linux-gnu*)
+ m68*-*-linux-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/m68klinux.h"'
;;
@@ -328,6 +322,9 @@ changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/m88kmach3.h"'
;;
+ m88*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
ns32k-pc532-mach)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/pc532mach.h"'
@@ -350,9 +347,7 @@ changequote([,])dnl
# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
# have c_impl as a member of struct core_dumpx
AC_MSG_CHECKING([for c_impl in struct core_dumpx])
- AC_TRY_COMPILE([#include <core.h>],
- [struct core_dumpx c; c.c_impl = 0;],
- [AC_DEFINE(HAVE_ST_C_IMPL, 1,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
[Define if struct core_dumpx has member c_impl])
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
;;
@@ -385,7 +380,7 @@ changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxult2.h"'
;;
- vax-*-linux-gnu*)
+ vax-*-linux-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxlinux.h"'
;;
@@ -565,7 +560,6 @@ do
# This list is alphabetized to make it easy to compare
# with the two vector lists in targets.c. For the same reason,
# use one entry per line, even though this leads to long lines.
- a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
@@ -589,12 +583,21 @@ do
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" ;;
+ bfd_elf32_bfin_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
+ bfd_elf32_bfinfdpic_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_symbian_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_bigarm_vxworks_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ 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_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" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
@@ -606,8 +609,9 @@ do
bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
- bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
- bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@@ -617,9 +621,15 @@ do
bfd_elf32_iq2000_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_littlearm_symbian_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlearm_vxworks_vec)
+ tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
+ bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_littlemips_vxworks_vec)
+ tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m32rlin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
@@ -632,17 +642,19 @@ do
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
- bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
- bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ 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" ;;
# 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
@@ -656,29 +668,32 @@ do
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_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
- bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
- bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.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_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" ;;
bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
+ bfd_elf32_xc16x_vec) tb="$tb elf32-xc16x.lo elf32.lo $elf" ;;
bfd_elf32_xtensa_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
@@ -689,9 +704,9 @@ do
bfd_elf64_sh64blin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
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 elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
- bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; 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_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_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" ;;
@@ -734,12 +749,12 @@ do
m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
- m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
- m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;;
+ m88kopenbsd_vec) tb="$tb m88kopenbsd.lo aout32.lo" ;;
+ maxqcoff_vec) tb="$tb coff-maxq.lo" ;;
mach_o_be_vec) tb="$tb mach-o.lo" ;;
mach_o_le_vec) tb="$tb mach-o.lo" ;;
mach_o_fat_vec) tb="$tb mach-o.lo" ;;
@@ -803,7 +818,8 @@ do
vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
- z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
+ z80coff_vec) tb="$tb coff-z80.lo reloc16.lo" ;;
+ z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo cofflink.lo" ;;
# These appear out of order in targets.c
srec_vec) tb="$tb srec.lo" ;;
@@ -889,7 +905,7 @@ case ${host64}-${target64}-${want64} in
AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
AC_MSG_RESULT(no))
if test $bad_64bit_gcc = yes ; then
- AC_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
+ AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
fi
fi
;;
@@ -912,9 +928,9 @@ AC_SUBST(bfd_default_target_size)
# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
# Hopefully a reasonable assumption since fseeko et.al. should be
# upward compatible.
-AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64)
+AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64)
if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
- AC_COMPILE_CHECK_SIZEOF(off_t)
+ AC_CHECK_SIZEOF(off_t)
fi
AC_MSG_CHECKING([file_ptr type])
bfd_file_ptr="long"
@@ -945,6 +961,13 @@ case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
esac
rm -f doc/config.status
-AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in,
-[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile])
+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 Required by html and install-html
+AC_SUBST(datarootdir)
+AC_SUBST(docdir)
+AC_SUBST(htmldir)
+
+AC_OUTPUT
diff --git a/contrib/binutils/bfd/corefile.c b/contrib/binutils/bfd/corefile.c
index 8af4f4517846..602de911a2c5 100644
--- a/contrib/binutils/bfd/corefile.c
+++ b/contrib/binutils/bfd/corefile.c
@@ -1,5 +1,5 @@
/* Core file generic interface routines for BFD.
- Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002, 2003
+ Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -17,12 +17,15 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
SECTION
Core files
+SUBSECTION
+ Core file functions
+
DESCRIPTION
These are functions pertaining to core files.
*/
@@ -104,3 +107,59 @@ core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
return BFD_SEND (core_bfd, _core_file_matches_executable_p,
(core_bfd, exec_bfd));
}
+
+/*
+FUNCTION
+ generic_core_file_matches_executable_p
+
+SYNOPSIS
+ bfd_boolean generic_core_file_matches_executable_p
+ (bfd *core_bfd, bfd *exec_bfd);
+
+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.
+*/
+
+bfd_boolean
+generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
+{
+ char *exec;
+ char *core;
+ char *last_slash;
+
+ if (exec_bfd == NULL || core_bfd == NULL)
+ return TRUE;
+
+ /* The cast below is to avoid a compiler warning due to the assignment
+ of the const char * returned by bfd_core_file_failing_command to a
+ non-const char *. In this case, the assignement does not lead to
+ breaking the const, as we're only reading the string. */
+
+ core = (char *) bfd_core_file_failing_command (core_bfd);
+ if (core == NULL)
+ return TRUE;
+
+ exec = bfd_get_filename (exec_bfd);
+ if (exec == NULL)
+ return TRUE;
+
+ last_slash = strrchr (core, '/');
+ if (last_slash != NULL)
+ core = last_slash + 1;
+
+ last_slash = strrchr (exec, '/');
+ if (last_slash != NULL)
+ exec = last_slash + 1;
+
+ return strcmp (exec, core) == 0;
+}
+
diff --git a/contrib/binutils/bfd/cpu-alpha.c b/contrib/binutils/bfd/cpu-alpha.c
index c593fc385371..48b748d9f36e 100644
--- a/contrib/binutils/bfd/cpu-alpha.c
+++ b/contrib/binutils/bfd/cpu-alpha.c
@@ -1,5 +1,6 @@
/* BFD support for the Alpha architecture.
- Copyright 1992, 1993, 1998, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1998, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/cpu-arc.c b/contrib/binutils/bfd/cpu-arc.c
index c69df0e715ce..ef97da0eda2e 100644
--- a/contrib/binutils/bfd/cpu-arc.c
+++ b/contrib/binutils/bfd/cpu-arc.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/cpu-arm.c b/contrib/binutils/bfd/cpu-arm.c
index 17889f3b4726..a28a1f9e8fcf 100644
--- a/contrib/binutils/bfd/cpu-arm.c
+++ b/contrib/binutils/bfd/cpu-arm.c
@@ -1,5 +1,6 @@
/* BFD support for the ARM processor
- Copyright 1994, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
This file is part of BFD, the Binary File Descriptor library.
@@ -16,28 +17,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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "libiberty.h"
-static const bfd_arch_info_type * compatible
- PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
-static bfd_boolean scan
- PARAMS ((const struct bfd_arch_info *, const char *));
-static bfd_boolean arm_check_note
- PARAMS ((bfd *, char *, bfd_size_type, const char *, char **));
-
/* This routine is provided two arch_infos and works out which ARM
machine which would be compatible with both and returns a pointer
to its info structure. */
static const bfd_arch_info_type *
-compatible (a,b)
- const bfd_arch_info_type * a;
- const bfd_arch_info_type * b;
+compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
{
/* If a & b are for different architecture we can do nothing. */
if (a->arch != b->arch)
@@ -104,9 +96,7 @@ processors[] =
};
static bfd_boolean
-scan (info, string)
- const struct bfd_arch_info * info;
- const char * string;
+scan (const struct bfd_arch_info *info, const char *string)
{
int i;
@@ -161,9 +151,7 @@ const bfd_arch_info_type bfd_arm_arch =
Returns TRUE if they were merged successfully or FALSE otherwise. */
bfd_boolean
-bfd_arm_merge_machines (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
+bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
{
unsigned int in = bfd_get_mach (ibfd);
unsigned int out = bfd_get_mach (obfd);
@@ -194,9 +182,8 @@ bfd_arm_merge_machines (ibfd, obfd)
&& (out == bfd_mach_arm_XScale || out == bfd_mach_arm_iWMMXt))
{
_bfd_error_handler (_("\
-ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
+ ibfd, obfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
}
@@ -204,9 +191,8 @@ ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"),
&& (in == bfd_mach_arm_XScale || in == bfd_mach_arm_iWMMXt))
{
_bfd_error_handler (_("\
-ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"),
- bfd_archive_filename (obfd),
- bfd_get_filename (ibfd));
+ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
+ obfd, ibfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
}
@@ -227,12 +213,11 @@ typedef struct
} arm_Note;
static bfd_boolean
-arm_check_note (abfd, buffer, buffer_size, expected_name, description_return)
- bfd * abfd;
- char * buffer;
- bfd_size_type buffer_size;
- const char * expected_name;
- char ** description_return;
+arm_check_note (bfd *abfd,
+ bfd_byte *buffer,
+ bfd_size_type buffer_size,
+ const char *expected_name,
+ char **description_return)
{
unsigned long namesz;
unsigned long descsz;
@@ -247,7 +232,7 @@ arm_check_note (abfd, buffer, buffer_size, expected_name, description_return)
namesz = bfd_get_32 (abfd, buffer);
descsz = bfd_get_32 (abfd, buffer + offsetof (arm_Note, descsz));
type = bfd_get_32 (abfd, buffer + offsetof (arm_Note, type));
- descr = buffer + offsetof (arm_Note, name);
+ descr = (char *) buffer + offsetof (arm_Note, name);
/* Check for buffer overflow. */
if (namesz + descsz + offsetof (arm_Note, name) > buffer_size)
@@ -280,13 +265,11 @@ arm_check_note (abfd, buffer, buffer_size, expected_name, description_return)
#define NOTE_ARCH_STRING "arch: "
bfd_boolean
-bfd_arm_update_notes (abfd, note_section)
- bfd * abfd;
- const char * note_section;
+bfd_arm_update_notes (bfd *abfd, const char *note_section)
{
asection * arm_arch_section;
bfd_size_type buffer_size;
- char * buffer;
+ bfd_byte * buffer;
char * arch_string;
char * expected;
@@ -298,16 +281,11 @@ bfd_arm_update_notes (abfd, note_section)
if (arm_arch_section == NULL)
return TRUE;
- buffer_size = arm_arch_section->_raw_size;
+ buffer_size = arm_arch_section->size;
if (buffer_size == 0)
return FALSE;
- buffer = bfd_malloc (buffer_size);
- if (buffer == NULL)
- return FALSE;
-
- if (! bfd_get_section_contents (abfd, arm_arch_section, buffer,
- (file_ptr) 0, buffer_size))
+ if (!bfd_malloc_and_get_section (abfd, arm_arch_section, &buffer))
goto FAIL;
/* Parse the note. */
@@ -335,7 +313,9 @@ bfd_arm_update_notes (abfd, note_section)
if (strcmp (arch_string, expected) != 0)
{
- strcpy (buffer + offsetof (arm_Note, name) + ((strlen (NOTE_ARCH_STRING) + 3) & ~3), expected);
+ strcpy ((char *) buffer + (offsetof (arm_Note, name)
+ + ((strlen (NOTE_ARCH_STRING) + 3) & ~3)),
+ expected);
if (! bfd_set_section_contents (abfd, arm_arch_section, buffer,
(file_ptr) 0, buffer_size))
@@ -351,7 +331,8 @@ bfd_arm_update_notes (abfd, note_section)
return TRUE;
FAIL:
- free (buffer);
+ if (buffer != NULL)
+ free (buffer);
return FALSE;
}
@@ -379,13 +360,11 @@ architectures[] =
/* Extract the machine number stored in a note section. */
unsigned int
-bfd_arm_get_mach_from_notes (abfd, note_section)
- bfd * abfd;
- const char * note_section;
+bfd_arm_get_mach_from_notes (bfd *abfd, const char *note_section)
{
asection * arm_arch_section;
bfd_size_type buffer_size;
- char * buffer;
+ bfd_byte * buffer;
char * arch_string;
int i;
@@ -397,16 +376,11 @@ bfd_arm_get_mach_from_notes (abfd, note_section)
if (arm_arch_section == NULL)
return bfd_mach_arm_unknown;
- buffer_size = arm_arch_section->_raw_size;
+ buffer_size = arm_arch_section->size;
if (buffer_size == 0)
return bfd_mach_arm_unknown;
- buffer = bfd_malloc (buffer_size);
- if (buffer == NULL)
- return bfd_mach_arm_unknown;
-
- if (! bfd_get_section_contents (abfd, arm_arch_section, buffer,
- (file_ptr) 0, buffer_size))
+ if (!bfd_malloc_and_get_section (abfd, arm_arch_section, &buffer))
goto FAIL;
/* Parse the note. */
@@ -422,6 +396,20 @@ bfd_arm_get_mach_from_notes (abfd, note_section)
}
FAIL:
- free (buffer);
+ if (buffer != NULL)
+ free (buffer);
return bfd_mach_arm_unknown;
}
+
+bfd_boolean
+bfd_is_arm_mapping_symbol_name (const char * name)
+{
+ /* 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] == '.');
+}
+
diff --git a/contrib/binutils/bfd/cpu-i386.c b/contrib/binutils/bfd/cpu-i386.c
index 272c7196242f..8886c47d0a09 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
+ Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,27 +16,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
-const bfd_arch_info_type bfd_i386_arch_intel_syntax =
-{
- 32, /* 32 bits in a word */
- 32, /* 32 bits in an address */
- 8, /* 8 bits in a byte */
- bfd_arch_i386,
- bfd_mach_i386_i386_intel_syntax,
- "i386:intel",
- "i386:intel",
- 3,
- TRUE,
- bfd_default_compatible,
- bfd_default_scan ,
- 0,
-};
const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
{
64, /* 64 bits in a word */
@@ -47,12 +32,29 @@ const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
"i386:intel",
"i386:x86-64:intel",
3,
+ FALSE,
+ bfd_default_compatible,
+ bfd_default_scan,
+ 0
+};
+
+const bfd_arch_info_type bfd_i386_arch_intel_syntax =
+{
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_i386,
+ bfd_mach_i386_i386_intel_syntax,
+ "i386:intel",
+ "i386:intel",
+ 3,
TRUE,
bfd_default_compatible,
- bfd_default_scan ,
- &bfd_i386_arch_intel_syntax,
+ bfd_default_scan,
+ &bfd_x86_64_arch_intel_syntax
};
-static const bfd_arch_info_type i8086_arch =
+
+const bfd_arch_info_type i8086_arch =
{
32, /* 32 bits in a word */
32, /* 32 bits in an address (well, not really) */
@@ -64,8 +66,8 @@ static const bfd_arch_info_type i8086_arch =
3,
FALSE,
bfd_default_compatible,
- bfd_default_scan ,
- &bfd_x86_64_arch_intel_syntax,
+ bfd_default_scan,
+ &bfd_i386_arch_intel_syntax
};
const bfd_arch_info_type bfd_x86_64_arch =
@@ -78,10 +80,10 @@ const bfd_arch_info_type bfd_x86_64_arch =
"i386",
"i386:x86-64",
3,
- TRUE,
+ FALSE,
bfd_default_compatible,
- bfd_default_scan ,
- &i8086_arch,
+ bfd_default_scan,
+ &i8086_arch
};
const bfd_arch_info_type bfd_i386_arch =
@@ -96,6 +98,6 @@ const bfd_arch_info_type bfd_i386_arch =
3,
TRUE,
bfd_default_compatible,
- bfd_default_scan ,
+ bfd_default_scan,
&bfd_x86_64_arch
};
diff --git a/contrib/binutils/bfd/cpu-ia64-opc.c b/contrib/binutils/bfd/cpu-ia64-opc.c
index 740c2eeda1b2..a3adc478886a 100644
--- a/contrib/binutils/bfd/cpu-ia64-opc.c
+++ b/contrib/binutils/bfd/cpu-ia64-opc.c
@@ -1,4 +1,4 @@
-/* Copyright 1998, 1999, 2000, 2001, 2002, 2003
+/* Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Logically, this code should be part of libopcode but since some of
the operand insertion/extraction functions help bfd to implement
@@ -114,6 +114,29 @@ ext_immu (const struct ia64_operand *self, ia64_insn code, ia64_insn *valuep)
}
static const char*
+ins_immu5b (const struct ia64_operand *self, ia64_insn value,
+ ia64_insn *code)
+{
+ if (value < 32 || value > 63)
+ return "value must be between 32 and 63";
+ return ins_immu (self, value - 32, code);
+}
+
+static const char*
+ext_immu5b (const struct ia64_operand *self, ia64_insn code,
+ ia64_insn *valuep)
+{
+ const char *result;
+
+ result = ext_immu (self, code, valuep);
+ if (result)
+ return result;
+
+ *valuep = *valuep + 32;
+ return 0;
+}
+
+static const char*
ins_immus8 (const struct ia64_operand *self, ia64_insn value, ia64_insn *code)
{
if (value & 0x7)
@@ -457,6 +480,10 @@ const struct ia64_operand elf64_ia64_operands[IA64_OPND_COUNT] =
{ REG, ins_reg, ext_reg, "r", {{ 2, 20}}, 0, /* R3_2 */
"a general register r0-r3" },
+ /* memory operands: */
+ { IND, ins_reg, ext_reg, "", {{7, 20}}, 0, /* MR3 */
+ "a memory address" },
+
/* indirect operands: */
{ IND, ins_reg, ext_reg, "cpuid", {{7, 20}}, 0, /* CPUID_R3 */
"a cpuid register" },
@@ -468,8 +495,6 @@ const struct ia64_operand elf64_ia64_operands[IA64_OPND_COUNT] =
"an itr register" },
{ IND, ins_reg, ext_reg, "ibr", {{7, 20}}, 0, /* IBR_R3 */
"an ibr register" },
- { IND, ins_reg, ext_reg, "", {{7, 20}}, 0, /* MR3 */
- "an indirect memory address" },
{ IND, ins_reg, ext_reg, "msr", {{7, 20}}, 0, /* MSR_R3 */
"an msr register" },
{ IND, ins_reg, ext_reg, "pkr", {{7, 20}}, 0, /* PKR_R3 */
@@ -504,6 +529,8 @@ const struct ia64_operand elf64_ia64_operands[IA64_OPND_COUNT] =
"a 1-bit integer (-1, 0)" },
{ ABS, ins_immu, ext_immu, 0, {{ 2, 13}}, UDEC, /* IMMU2 */
"a 2-bit unsigned (0-3)" },
+ { ABS, ins_immu5b, ext_immu5b, 0, {{ 5, 14}}, UDEC, /* IMMU5b */
+ "a 5-bit unsigned (32 + (0-31))" },
{ ABS, ins_immu, ext_immu, 0, {{ 7, 13}}, 0, /* IMMU7a */
"a 7-bit unsigned (0-127)" },
{ ABS, ins_immu, ext_immu, 0, {{ 7, 20}}, 0, /* IMMU7b */
diff --git a/contrib/binutils/bfd/cpu-ia64.c b/contrib/binutils/bfd/cpu-ia64.c
index 2185241e4867..e172f5a85f2b 100644
--- a/contrib/binutils/bfd/cpu-ia64.c
+++ b/contrib/binutils/bfd/cpu-ia64.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/cpu-powerpc.c b/contrib/binutils/bfd/cpu-powerpc.c
index a4e72d5bf306..2584d6511622 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
+ Copyright 1994, 1995, 1996, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, Cygnus Support.
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -295,6 +295,20 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
FALSE, /* not the default */
powerpc_compatible,
bfd_default_scan,
+ &bfd_powerpc_archs[15]
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_750,
+ "powerpc",
+ "powerpc:750",
+ 3,
+ FALSE, /* not the default */
+ powerpc_compatible,
+ bfd_default_scan,
0
}
};
diff --git a/contrib/binutils/bfd/cpu-rs6000.c b/contrib/binutils/bfd/cpu-rs6000.c
index d94921ff748d..43c7be7539f9 100644
--- a/contrib/binutils/bfd/cpu-rs6000.c
+++ b/contrib/binutils/bfd/cpu-rs6000.c
@@ -22,7 +22,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/cpu-s390.c b/contrib/binutils/bfd/cpu-s390.c
index 66fd2461f2e1..e7c714f26dc8 100644
--- a/contrib/binutils/bfd/cpu-s390.c
+++ b/contrib/binutils/bfd/cpu-s390.c
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/cpu-sparc.c b/contrib/binutils/bfd/cpu-sparc.c
index 3c0eae50fada..42153269a24b 100644
--- a/contrib/binutils/bfd/cpu-sparc.c
+++ b/contrib/binutils/bfd/cpu-sparc.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/demo64.c b/contrib/binutils/bfd/demo64.c
index a8c0b32f4d78..d284850b9b5a 100644
--- a/contrib/binutils/bfd/demo64.c
+++ b/contrib/binutils/bfd/demo64.c
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define ARCH_SIZE 64
diff --git a/contrib/binutils/bfd/dep-in.sed b/contrib/binutils/bfd/dep-in.sed
index 90a2e6a7f066..2732d6b42e35 100644
--- a/contrib/binutils/bfd/dep-in.sed
+++ b/contrib/binutils/bfd/dep-in.sed
@@ -4,6 +4,7 @@ s/\\\n */ /g
t loop
s!\.o:!.lo:!
+s! \./! !g
s! @BFD_H@!!g
s!@SRCDIR@/../include!$(INCDIR)!g
s!@TOPDIR@/include!$(INCDIR)!g
diff --git a/contrib/binutils/bfd/doc/ChangeLog b/contrib/binutils/bfd/doc/ChangeLog
index fc0693343f38..7909268f98bf 100644
--- a/contrib/binutils/bfd/doc/ChangeLog
+++ b/contrib/binutils/bfd/doc/ChangeLog
@@ -1,9 +1,104 @@
-2004-04-08 Alan Modra <amodra@bigpond.net.au>
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+
+ * bfd.texinfo: Remove local @tex code.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.am: Add install-html and install-html-am targets.
+ Define datarootdir, docdir and htmldir.
+ * Makefile.in: Regenerate.
+
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.am: Add html target.
+ * Makefile.in: Regenerate.
+
+2005-07-24 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * chew.c: Include <string.h>.
+
+2005-07-22 DJ Delorie <dj@redhat.com>
+
+ * chew.c: Include stdlib.h.
+
+2005-07-22 Kazu Hirata <kazu@codesourcery.com>
+
+ * chew.c: Don't include sysdep.h.
+
+2005-05-09 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am: Use a temporary file to build chew.
+ * Makefile.in: Regenerated.
+
+2005-05-04 Nick Clifton <nickc@redhat.com>
+
+ * chew.c: Update the address and phone number of the FSF
+ organization in the GPL notice.
+
+2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (INCLUDES): Remove -D_GNU_SOURCE.
+ * Makefile.in: Regenerate.
+
+2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am: Remove stamp rules. Depend on chew.c
+ instead of $(MKDOC).
+ * Makefile.in: Regnerated.
+
+2005-04-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (INCLUDES): New. Add -D_GNU_SOURCE.
+ (chew.o): Use it.
+ * Makefile.in: Regenerate.
+
+2005-04-14 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2005-04-12 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2005-02-21 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2005-02-13 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * Makefile.am: Use CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD for
+ building chew.
+ * Makefile.in: Regenerate.
+
+2005-02-01 Ben Elliston <bje@au.ibm.com>
+
+ * chew.c: Remove #if 0'd code throughout. Similarly, collapse #if
+ 1'd code.
+
+2004-12-20 Ian Lance Taylor <ian@c2microsystems.com>
+
+ * Makefile.am: Use $(SHELL) whenever we run move-if-change.
+ * Makefile.in: Rebuild.
+
+2004-09-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
+ (bfd.info): Rename the target to ...
+ ($(srcdir)/bfd.info): This.
+ * Makefile.in: Regenerated.
+
+2004-09-17 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2004-03-27 Alan Modra <amodra@bigpond.net.au>
- Apply from mainline.
- 2004-03-27 Alan Modra <amodra@bigpond.net.au>
* bfdint.texi: Remove all mention of elflink.h.
+2004-03-19 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
For older changes see ChangeLog-9103
Local Variables:
diff --git a/contrib/binutils/bfd/doc/Makefile.am b/contrib/binutils/bfd/doc/Makefile.am
index 4aaa341807ce..6d221faad4a2 100644
--- a/contrib/binutils/bfd/doc/Makefile.am
+++ b/contrib/binutils/bfd/doc/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
-AUTOMAKE_OPTIONS = cygnus
+AUTOMAKE_OPTIONS = 1.9 cygnus
DOCFILES = aoutx.texi archive.texi archures.texi \
bfdt.texi cache.texi coffcode.texi \
@@ -54,159 +54,141 @@ info_TEXINFOS = bfd.texinfo
MKDOC = chew$(EXEEXT_FOR_BUILD)
-$(MKDOC): chew.o
- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
+INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
+ -I$(srcdir)/../../intl -I../../intl
+
+$(MKDOC): $(srcdir)/chew.c
+ $(CC_FOR_BUILD) -o chew.$$$$ $(srcdir)/chew.c \
+ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
+ $(INCLUDES); \
+ $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
chew.o: chew.c
- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
+ $(CC_FOR_BUILD) -c $(INCLUDES) $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
protos: libbfd.h libcoff.h bfd.h
-bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
+$(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 `..'.
-# We use s-XXX targets so that we can distribute the info files,
-# and permit people to rebuild them, without requiring the makeinfo
-# program. If somebody tries to rebuild info, but none of the .texi
-# files have changed, then this Makefile will build chew, and will
-# build all of the stamp files, but will not actually have to rebuild
-# bfd.info.
+# We do not depend on chew directly so that we can distribute the info
+# files, and permit people to rebuild them, without requiring the makeinfo
+# program. If somebody tries to rebuild info, but none of the .texi files
+# have changed, then nothing will be rebuilt.
-s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
+aoutx.texi: chew.c $(srcdir)/../aoutx.h $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
- $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
- touch s-aoutx
-aoutx.texi: s-aoutx
+ $(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
-s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
+archive.texi: chew.c $(srcdir)/../archive.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
- $(srcdir)/../../move-if-change archive.tmp archive.texi
- touch s-archive
-archive.texi: s-archive
+ $(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
-s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
+archures.texi: chew.c $(srcdir)/../archures.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
- $(srcdir)/../../move-if-change archures.tmp archures.texi
- touch s-archures
-archures.texi: s-archures
+ $(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
# bfd.texinfo on an 8.3 filesystem.
-s-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
+bfdt.texi: chew.c $(srcdir)/../bfd.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
- $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
- touch s-bfd
-bfdt.texi: s-bfd
+ $(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
-s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
+cache.texi: chew.c $(srcdir)/../cache.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
- $(srcdir)/../../move-if-change cache.tmp cache.texi
- touch s-cache
-cache.texi: s-cache
+ $(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
-s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
+coffcode.texi: chew.c $(srcdir)/../coffcode.h $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
- $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
- touch s-coffcode
-coffcode.texi: s-coffcode
+ $(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
-s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
+core.texi: chew.c $(srcdir)/../corefile.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
- $(srcdir)/../../move-if-change core.tmp core.texi
- touch s-core
-core.texi: s-core
+ $(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
-s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
+elf.texi: chew.c $(srcdir)/../elf.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
- $(srcdir)/../../move-if-change elf.tmp elf.texi
- touch s-elf
-elf.texi: s-elf
+ $(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
-s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
+elfcode.texi: chew.c $(srcdir)/../elfcode.h $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
- $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
- touch s-elfcode
-elfcode.texi: s-elfcode
+ $(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
-s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
+mmo.texi: chew.c $(srcdir)/../mmo.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
- $(srcdir)/../../move-if-change mmo.tmp mmo.texi
- touch s-mmo
-mmo.texi: s-mmo
+ $(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
-s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
+format.texi: chew.c $(srcdir)/../format.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
- $(srcdir)/../../move-if-change format.tmp format.texi
- touch s-format
-format.texi: s-format
+ $(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
-s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
+libbfd.texi: chew.c $(srcdir)/../libbfd.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
- $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
- touch s-libbfd
-libbfd.texi: s-libbfd
+ $(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
-s-bfdio: $(MKDOC) $(srcdir)/../bfdio.c $(srcdir)/doc.str
+bfdio.texi: chew.c $(srcdir)/../bfdio.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
- $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
- touch s-bfdio
-bfdio.texi: s-bfdio
+ $(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
-s-bfdwin: $(MKDOC) $(srcdir)/../bfdwin.c $(srcdir)/doc.str
+bfdwin.texi: chew.c $(srcdir)/../bfdwin.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
- $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
- touch s-bfdwin
-bfdwin.texi: s-bfdwin
+ $(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
-s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
+opncls.texi: chew.c $(srcdir)/../opncls.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
- $(srcdir)/../../move-if-change opncls.tmp opncls.texi
- touch s-opncls
-opncls.texi: s-opncls
+ $(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
-s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
+reloc.texi: chew.c $(srcdir)/../reloc.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
- $(srcdir)/../../move-if-change reloc.tmp reloc.texi
- touch s-reloc
-reloc.texi: s-reloc
+ $(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi
-s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
+section.texi: chew.c $(srcdir)/../section.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
- $(srcdir)/../../move-if-change section.tmp section.texi
- touch s-section
-section.texi: s-section
+ $(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
-s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
+syms.texi: chew.c $(srcdir)/../syms.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
- $(srcdir)/../../move-if-change syms.tmp syms.texi
- touch s-syms
-syms.texi: s-syms
+ $(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
-s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
+targets.texi: chew.c $(srcdir)/../targets.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
- $(srcdir)/../../move-if-change targets.tmp targets.texi
- touch s-targets
-targets.texi: s-targets
+ $(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
-s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
+init.texi: chew.c $(srcdir)/../init.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
- $(srcdir)/../../move-if-change init.tmp init.texi
- touch s-init
-init.texi: s-init
+ $(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
-s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
+hash.texi: chew.c $(srcdir)/../hash.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
- $(srcdir)/../../move-if-change hash.tmp hash.texi
- touch s-hash
-hash.texi: s-hash
+ $(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
-s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
+linker.texi: chew.c $(srcdir)/../linker.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
- $(srcdir)/../../move-if-change linker.tmp linker.texi
- touch s-linker
-linker.texi: s-linker
+ $(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
LIBBFD_H_DEP = \
$(srcdir)/../libbfd-in.h \
@@ -296,7 +278,7 @@ noinst_TEXINFOS = bfdint.texi
MOSTLYCLEANFILES = $(MKDOC) *.o
-CLEANFILES = s-* *.p *.ip
+CLEANFILES = *.p *.ip
DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
@@ -305,3 +287,28 @@ MAINTAINERCLEANFILES = $(DOCFILES)
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install: install-info
+
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
+
+
+
+
diff --git a/contrib/binutils/bfd/doc/Makefile.in b/contrib/binutils/bfd/doc/Makefile.in
index 85d64277e3c3..ad81061ec7b7 100644
--- a/contrib/binutils/bfd/doc/Makefile.in
+++ b/contrib/binutils/bfd/doc/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,61 +12,72 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
-SHELL = @SHELL@
-
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+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__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+depcomp =
+am__depfiles_maybe =
+SOURCES =
+INFO_DEPS = $(srcdir)/bfd.info
+TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
+DVIS = bfd.dvi
+PDFS = bfd.pdf
+PSS = bfd.ps
+HTMLS = bfd.html
+TEXINFOS = bfd.texinfo
+TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
+ echo $(top_srcdir)/../texinfo/util/texi2dvi; \
+ else \
+ echo texi2dvi; \
+ fi`
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
+DVIPS = dvips
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
AR = @AR@
-AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
@@ -73,39 +86,65 @@ BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CC_FOR_BUILD = @CC_FOR_BUILD@
+CFLAGS = @CFLAGS@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@
+INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
-OBJDUMP = @OBJDUMP@
+NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
TDEFINES = @TDEFINES@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
@@ -114,23 +153,68 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
all_backends = @all_backends@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
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@
-bfd_version = @bfd_version@
-bfd_version_string = @bfd_version_string@
bfdincludedir = @bfdincludedir@
bfdlibdir = @bfdlibdir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_noncanonical = @host_noncanonical@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
l = @l@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_noncanonical = @target_noncanonical@
+target_os = @target_os@
+target_vendor = @target_vendor@
tdefaults = @tdefaults@
wordsize = @wordsize@
-
-AUTOMAKE_OPTIONS = cygnus
-
+AUTOMAKE_OPTIONS = 1.9 cygnus
DOCFILES = aoutx.texi archive.texi archures.texi \
bfdt.texi cache.texi coffcode.texi \
core.texi elf.texi elfcode.texi format.texi \
@@ -139,7 +223,6 @@ DOCFILES = aoutx.texi archive.texi archures.texi \
syms.texi targets.texi init.texi hash.texi linker.texi \
mmo.texi
-
PROTOS = archive.p archures.p bfd.p \
core.p format.p \
bfdio.p bfdwin.p \
@@ -147,7 +230,6 @@ PROTOS = archive.p archures.p bfd.p \
section.p syms.p targets.p \
format.p core.p init.p
-
IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
# SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
@@ -165,7 +247,6 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
$(srcdir)/../hash.c $(srcdir)/../linker.c \
$(srcdir)/../mmo.c
-
SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
$(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
$(srcdir)/../format.c $(srcdir)/../libbfd.c \
@@ -174,19 +255,17 @@ SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
$(srcdir)/../section.c $(srcdir)/../syms.c \
$(srcdir)/../targets.c $(srcdir)/../init.c
-
SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
$(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
$(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
$(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
$(srcdir)/../init.c
-
TEXIDIR = $(srcdir)/../../texinfo/fsf
-
info_TEXINFOS = bfd.texinfo
-
MKDOC = chew$(EXEEXT_FOR_BUILD)
+INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
+ -I$(srcdir)/../../intl -I../../intl
LIBBFD_H_DEP = \
$(srcdir)/../libbfd-in.h \
@@ -202,7 +281,6 @@ LIBBFD_H_DEP = \
$(srcdir)/proto.str \
$(MKDOC)
-
LIBCOFF_H_DEP = \
$(srcdir)/../libcoff-in.h \
$(srcdir)/../coffcode.h \
@@ -210,7 +288,6 @@ LIBCOFF_H_DEP = \
$(srcdir)/proto.str \
$(MKDOC)
-
BFD_H_DEP = \
$(srcdir)/../bfd-in.h \
$(srcdir)/../init.c \
@@ -234,200 +311,178 @@ BFD_H_DEP = \
$(srcdir)/../version.h \
$(MKDOC)
-
noinst_TEXINFOS = bfdint.texi
-
MOSTLYCLEANFILES = $(MKDOC) *.o
-
-CLEANFILES = s-* *.p *.ip
-
+CLEANFILES = *.p *.ip
DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
-
MAINTAINERCLEANFILES = $(DOCFILES)
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
-TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
-INFO_DEPS = bfd.info
-DVIS = bfd.dvi
-TEXINFOS = bfd.texinfo
-DIST_COMMON = ChangeLog Makefile.am Makefile.in
-
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+all: all-am
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-all: all-redirect
.SUFFIXES:
-.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-bfd.info: bfd.texinfo
-bfd.dvi: bfd.texinfo
-
-
-DVIPS = dvips
-
-.texi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.texi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+.SUFFIXES: .dvi .html .info .pdf .ps .texinfo
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
.texinfo.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ 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) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $@ $<; \
+ then \
+ rc=0; \
+ cd $(srcdir); \
+ else \
+ rc=$$?; \
+ cd $(srcdir) && \
+ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+ fi; \
+ rm -rf $$backupdir; exit $$rc
.texinfo.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.txi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2DVI) $<
+
+.texinfo.pdf:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2PDF) $<
+
+.texinfo.html:
+ rm -rf $(@:.html=.htp)
+ if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $(@:.html=.htp) $<; \
+ then \
+ rm -rf $@; \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+ else \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ 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:
- $(DVIPS) $< -o $@
+ $(DVIPS) -o $@ $<
-install-info-am: $(INFO_DEPS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(infodir)
- @list='$(INFO_DEPS)'; \
- for file in $$list; do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
- if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
- else : ; fi; \
- done; \
- done
- @$(POST_INSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+uninstall-info-am:
+ @$(PRE_UNINSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
- echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
- install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
+ install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
done; \
- else : ; fi
-
-uninstall-info:
- $(PRE_UNINSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- ii=yes; \
- else ii=; fi; \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- test -z "$$ii" \
- || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
- done
+ else :; fi
@$(NORMAL_UNINSTALL)
- list='$(INFO_DEPS)'; \
+ @list='$(INFO_DEPS)'; \
for file in $$list; do \
- (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+ (if cd "$(DESTDIR)$(infodir)"; then \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+ else :; fi); \
done
dist-info: $(INFO_DEPS)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for base in $$list; do \
+ case $$base in \
+ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in `cd $$d && eval echo $$base*`; do \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ for file in $$d/$$base*; do \
+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+ test -f $(distdir)/$$relfile || \
+ cp -p $$file $(distdir)/$$relfile; \
done; \
done
mostlyclean-aminfo:
- -rm -f bfd.aux bfd.cp bfd.cps bfd.dvi bfd.fn bfd.fns bfd.ky bfd.kys \
- bfd.ps bfd.log bfd.pg bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs \
- bfd.op bfd.tr bfd.cv bfd.cn
-
-clean-aminfo:
-
-distclean-aminfo:
+ -rm -rf bfd.aux bfd.cp bfd.cps bfd.fn bfd.ky bfd.kys bfd.log bfd.pg bfd.pgs \
+ bfd.tmp bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs bfd.dvi \
+ bfd.pdf bfd.ps bfd.html
maintainer-clean-aminfo:
- for i in $(INFO_DEPS); do \
- rm -f $$i; \
- if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
- rm -f $$i-[0-9]*; \
- fi; \
+ @list='$(INFO_DEPS)'; for i in $$list; do \
+ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
+
clean-info: mostlyclean-aminfo
tags: TAGS
TAGS:
+ctags: CTAGS
+CTAGS:
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = doc
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-info-am: $(INFO_DEPS)
-info: info-am
-dvi-am: $(DVIS)
-dvi: dvi-am
check-am:
check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
+all-am: Makefile
+installdirs:
install-exec: install-exec-am
-
-install-data-am:
install-data: install-data-am
+uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@@ -435,195 +490,237 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
+clean: clean-am
-mostlyclean: mostlyclean-am
+clean-am: clean-generic clean-libtool mostlyclean-am
-clean-am: clean-aminfo clean-generic mostlyclean-am
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
-clean: clean-am
+dvi: dvi-am
-distclean-am: distclean-aminfo distclean-generic clean-am
- -rm -f libtool
+dvi-am: $(DVIS)
-distclean: distclean-am
+html: html-am
-maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+html-am: $(HTMLS)
+
+info: info-am
+
+info-am: $(INFO_DEPS)
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+ if test -f $$ifile; then \
+ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
+ $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
+ done; \
+ else : ; fi
+install-man:
+
+installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+ maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
-.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
-distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir \
-info-am info dvi-am dvi check check-am installcheck-am installcheck \
-install-info-am install-info install-exec-am install-exec \
-install-data-am install-data install-am install uninstall-am uninstall \
-all-redirect all-am all installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
+ mostlyclean-libtool
+pdf: pdf-am
-$(MKDOC): chew.o
- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
+pdf-am: $(PDFS)
+
+ps: ps-am
+
+ps-am: $(PSS)
+
+uninstall-am:
+
+.PHONY: all all-am check check-am clean clean-generic clean-info \
+ clean-libtool dist-info distclean distclean-generic \
+ distclean-libtool dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-aminfo \
+ maintainer-clean-generic mostlyclean mostlyclean-aminfo \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ uninstall uninstall-am uninstall-info-am
+
+
+$(MKDOC): $(srcdir)/chew.c
+ $(CC_FOR_BUILD) -o chew.$$$$ $(srcdir)/chew.c \
+ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
+ $(INCLUDES); \
+ $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
chew.o: chew.c
- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
+ $(CC_FOR_BUILD) -c $(INCLUDES) $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
protos: libbfd.h libcoff.h bfd.h
-bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
+$(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 `..'.
-# We use s-XXX targets so that we can distribute the info files,
-# and permit people to rebuild them, without requiring the makeinfo
-# program. If somebody tries to rebuild info, but none of the .texi
-# files have changed, then this Makefile will build chew, and will
-# build all of the stamp files, but will not actually have to rebuild
-# bfd.info.
+# We do not depend on chew directly so that we can distribute the info
+# files, and permit people to rebuild them, without requiring the makeinfo
+# program. If somebody tries to rebuild info, but none of the .texi files
+# have changed, then nothing will be rebuilt.
-s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
+aoutx.texi: chew.c $(srcdir)/../aoutx.h $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
- $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
- touch s-aoutx
-aoutx.texi: s-aoutx
+ $(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
-s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
+archive.texi: chew.c $(srcdir)/../archive.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
- $(srcdir)/../../move-if-change archive.tmp archive.texi
- touch s-archive
-archive.texi: s-archive
+ $(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
-s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
+archures.texi: chew.c $(srcdir)/../archures.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
- $(srcdir)/../../move-if-change archures.tmp archures.texi
- touch s-archures
-archures.texi: s-archures
+ $(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
# bfd.texinfo on an 8.3 filesystem.
-s-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
+bfdt.texi: chew.c $(srcdir)/../bfd.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
- $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
- touch s-bfd
-bfdt.texi: s-bfd
+ $(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
-s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
+cache.texi: chew.c $(srcdir)/../cache.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
- $(srcdir)/../../move-if-change cache.tmp cache.texi
- touch s-cache
-cache.texi: s-cache
+ $(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
-s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
+coffcode.texi: chew.c $(srcdir)/../coffcode.h $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
- $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
- touch s-coffcode
-coffcode.texi: s-coffcode
+ $(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
-s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
+core.texi: chew.c $(srcdir)/../corefile.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
- $(srcdir)/../../move-if-change core.tmp core.texi
- touch s-core
-core.texi: s-core
+ $(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
-s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
+elf.texi: chew.c $(srcdir)/../elf.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
- $(srcdir)/../../move-if-change elf.tmp elf.texi
- touch s-elf
-elf.texi: s-elf
+ $(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
-s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
+elfcode.texi: chew.c $(srcdir)/../elfcode.h $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
- $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
- touch s-elfcode
-elfcode.texi: s-elfcode
+ $(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
-s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
+mmo.texi: chew.c $(srcdir)/../mmo.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
- $(srcdir)/../../move-if-change mmo.tmp mmo.texi
- touch s-mmo
-mmo.texi: s-mmo
+ $(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
-s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
+format.texi: chew.c $(srcdir)/../format.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
- $(srcdir)/../../move-if-change format.tmp format.texi
- touch s-format
-format.texi: s-format
+ $(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
-s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
+libbfd.texi: chew.c $(srcdir)/../libbfd.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
- $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
- touch s-libbfd
-libbfd.texi: s-libbfd
+ $(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
-s-bfdio: $(MKDOC) $(srcdir)/../bfdio.c $(srcdir)/doc.str
+bfdio.texi: chew.c $(srcdir)/../bfdio.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
- $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
- touch s-bfdio
-bfdio.texi: s-bfdio
+ $(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
-s-bfdwin: $(MKDOC) $(srcdir)/../bfdwin.c $(srcdir)/doc.str
+bfdwin.texi: chew.c $(srcdir)/../bfdwin.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
- $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
- touch s-bfdwin
-bfdwin.texi: s-bfdwin
+ $(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
-s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
+opncls.texi: chew.c $(srcdir)/../opncls.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
- $(srcdir)/../../move-if-change opncls.tmp opncls.texi
- touch s-opncls
-opncls.texi: s-opncls
+ $(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
-s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
+reloc.texi: chew.c $(srcdir)/../reloc.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
- $(srcdir)/../../move-if-change reloc.tmp reloc.texi
- touch s-reloc
-reloc.texi: s-reloc
+ $(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi
-s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
+section.texi: chew.c $(srcdir)/../section.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
- $(srcdir)/../../move-if-change section.tmp section.texi
- touch s-section
-section.texi: s-section
+ $(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
-s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
+syms.texi: chew.c $(srcdir)/../syms.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
- $(srcdir)/../../move-if-change syms.tmp syms.texi
- touch s-syms
-syms.texi: s-syms
+ $(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
-s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
+targets.texi: chew.c $(srcdir)/../targets.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
- $(srcdir)/../../move-if-change targets.tmp targets.texi
- touch s-targets
-targets.texi: s-targets
+ $(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
-s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
+init.texi: chew.c $(srcdir)/../init.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
- $(srcdir)/../../move-if-change init.tmp init.texi
- touch s-init
-init.texi: s-init
+ $(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
-s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
+hash.texi: chew.c $(srcdir)/../hash.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
- $(srcdir)/../../move-if-change hash.tmp hash.texi
- touch s-hash
-hash.texi: s-hash
+ $(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
-s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
+linker.texi: chew.c $(srcdir)/../linker.c $(srcdir)/doc.str
+ $(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
- $(srcdir)/../../move-if-change linker.tmp linker.texi
- touch s-linker
-linker.texi: s-linker
+ $(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
libbfd.h: $(LIBBFD_H_DEP)
echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
@@ -669,6 +766,24 @@ bfd.h: $(BFD_H_DEP)
# cygnus option.
install: install-info
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/binutils/bfd/doc/aoutx.texi b/contrib/binutils/bfd/doc/aoutx.texi
index 0c4167b7775b..7cf9787f106f 100644
--- a/contrib/binutils/bfd/doc/aoutx.texi
+++ b/contrib/binutils/bfd/doc/aoutx.texi
@@ -121,7 +121,7 @@ turn by various format specific files (eg sunos.c).
@example
void aout_@var{size}_swap_exec_header_in,
(bfd *abfd,
- struct external_exec *raw_bytes,
+ struct external_exec *bytes,
struct internal_exec *execp);
@end example
@strong{Description}@*
@@ -148,7 +148,8 @@ Swap the information in an internal exec header structure
@example
const bfd_target *aout_@var{size}_some_aout_object_p
(bfd *abfd,
- const bfd_target *(*callback_to_real_object_p) ());
+ 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}
@@ -172,7 +173,8 @@ Initialize BFD @var{abfd} for use with a.out files.
@example
enum machine_type aout_@var{size}_machine_type
(enum bfd_architecture arch,
- unsigned long machine));
+ unsigned long machine,
+ bfd_boolean *unknown);
@end example
@strong{Description}@*
Keep track of machine architecture and machine type for
@@ -190,7 +192,7 @@ is always understood.
bfd_boolean aout_@var{size}_set_arch_mach,
(bfd *,
enum bfd_architecture arch,
- unsigned long machine));
+ unsigned long machine);
@end example
@strong{Description}@*
Set the architecture and the machine of the BFD @var{abfd} to the
@@ -203,7 +205,7 @@ can support the architecture required.
@example
bfd_boolean aout_@var{size}_new_section_hook,
(bfd *abfd,
- asection *newsect));
+ asection *newsect);
@end example
@strong{Description}@*
Called by the BFD in response to a @code{bfd_make_section}
diff --git a/contrib/binutils/bfd/doc/archive.texi b/contrib/binutils/bfd/doc/archive.texi
index e20906aa551e..3d0a97d4b82e 100644
--- a/contrib/binutils/bfd/doc/archive.texi
+++ b/contrib/binutils/bfd/doc/archive.texi
@@ -50,6 +50,9 @@ 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}
diff --git a/contrib/binutils/bfd/doc/archures.texi b/contrib/binutils/bfd/doc/archures.texi
index 06ee6d318cee..bf72179dad31 100644
--- a/contrib/binutils/bfd/doc/archures.texi
+++ b/contrib/binutils/bfd/doc/archures.texi
@@ -46,11 +46,22 @@ enum bfd_architecture
#define bfd_mach_m68040 6
#define bfd_mach_m68060 7
#define bfd_mach_cpu32 8
-#define bfd_mach_mcf5200 9
-#define bfd_mach_mcf5206e 10
-#define bfd_mach_mcf5307 11
-#define bfd_mach_mcf5407 12
-#define bfd_mach_mcf528x 13
+#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.
@@ -72,7 +83,6 @@ enum bfd_architecture
bfd_arch_or32, /* OpenRISC 32 */
- bfd_arch_a29k, /* AMD 29000 */
bfd_arch_sparc, /* SPARC */
#define bfd_mach_sparc 1
/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
@@ -89,6 +99,9 @@ enum bfd_architecture
#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
@@ -107,6 +120,7 @@ enum bfd_architecture
#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
@@ -127,7 +141,6 @@ enum bfd_architecture
bfd_arch_i860, /* Intel 860 */
bfd_arch_i370, /* IBM 360/370 Mainframes */
bfd_arch_romp, /* IBM ROMP PC/RT */
- bfd_arch_alliant, /* Alliant */
bfd_arch_convex, /* Convex */
bfd_arch_m88k, /* Motorola 88xxx */
bfd_arch_m98k, /* Motorola 98xxx */
@@ -190,12 +203,20 @@ enum bfd_architecture
#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
@@ -235,6 +256,9 @@ enum bfd_architecture
#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'
@@ -251,6 +275,7 @@ enum bfd_architecture
#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
@@ -264,6 +289,10 @@ enum bfd_architecture
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
@@ -271,7 +300,16 @@ enum bfd_architecture
#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
@@ -286,7 +324,8 @@ enum bfd_architecture
#define bfd_mach_msp13 13
#define bfd_mach_msp14 14
#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
+#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
@@ -294,8 +333,20 @@ enum bfd_architecture
#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
diff --git a/contrib/binutils/bfd/doc/bfd.texinfo b/contrib/binutils/bfd/doc/bfd.texinfo
index 3ed419476d1e..432e05264491 100644
--- a/contrib/binutils/bfd/doc/bfd.texinfo
+++ b/contrib/binutils/bfd/doc/bfd.texinfo
@@ -1,22 +1,9 @@
\input texinfo.tex
@setfilename bfd.info
-@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000, 2003
+@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000,
+@c 2001, 2002, 2003
@c Free Software Foundation, Inc.
@c
-@tex
-% NOTE LOCAL KLUGE TO AVOID TOO MUCH WHITESPACE
-\global\long\def\example{%
-\begingroup
-\let\aboveenvbreak=\par
-\let\afterenvbreak=\par
-\parskip=0pt
-\lisp}
-\global\long\def\Eexample{%
-\Elisp
-\endgroup
-\vskip -\parskip% to cancel out effect of following \par
-}
-@end tex
@synindex fn cp
@ifinfo
diff --git a/contrib/binutils/bfd/doc/bfdint.texi b/contrib/binutils/bfd/doc/bfdint.texi
index 95c0096e468d..98826fd52062 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
+@c 2000, 2001, 2002, 2003, 2004
@c Free Software Foundation, Inc.
@setfilename bfdint.info
diff --git a/contrib/binutils/bfd/doc/bfdio.texi b/contrib/binutils/bfd/doc/bfdio.texi
index b8c79d30ccdf..eb7e31df9d08 100644
--- a/contrib/binutils/bfd/doc/bfdio.texi
+++ b/contrib/binutils/bfd/doc/bfdio.texi
@@ -1,3 +1,34 @@
+@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}
diff --git a/contrib/binutils/bfd/doc/bfdt.texi b/contrib/binutils/bfd/doc/bfdt.texi
index 74cace4a60a5..a22fe3861d96 100644
--- a/contrib/binutils/bfd/doc/bfdt.texi
+++ b/contrib/binutils/bfd/doc/bfdt.texi
@@ -21,14 +21,10 @@ struct bfd
/* A pointer to the target jump table. */
const struct bfd_target *xvec;
- /* To avoid dragging too many header files into every file that
- includes `@code{bfd.h}', IOSTREAM has been declared as a "char *",
- and MTIME as a "long". Their correct types, to which they
- are cast when used, are "FILE *" and "time_t". The iostream
- is the result of an fopen on the filename. However, if the
- BFD_IN_MEMORY flag is set, then iostream is actually a pointer
- to a bfd_in_memory struct. */
+ /* 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? */
@@ -91,8 +87,8 @@ struct bfd
/* Pointer to linked list of sections. */
struct bfd_section *sections;
- /* The place where we add to the section list. */
- struct bfd_section **section_tail;
+ /* The last section on the section list. */
+ struct bfd_section *section_last;
/* The number of sections. */
unsigned int section_count;
@@ -113,6 +109,9 @@ struct bfd
/* 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. */
@@ -307,18 +306,10 @@ bfd_error_handler_type bfd_get_error_handler (void);
@strong{Description}@*
Return the BFD error handler function.
-@findex bfd_archive_filename
-@subsubsection @code{bfd_archive_filename}
-@strong{Synopsis}
-@example
-const char *bfd_archive_filename (bfd *);
-@end example
-@strong{Description}@*
-For a BFD that is a component of an archive, returns a string
-with both the archive name and file name. For other BFDs, just
-returns the file name.
+@section Miscellaneous
+
-@section Symbols
+@subsection Miscellaneous functions
@findex bfd_get_reloc_upper_bound
@@ -472,6 +463,31 @@ 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}
@@ -552,6 +568,14 @@ The following functions exist but have not yet been documented.
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))
@@ -579,6 +603,9 @@ The following functions exist but have not yet been documented.
#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))
@@ -591,7 +618,7 @@ The following functions exist but have not yet been documented.
#define bfd_link_add_symbols(abfd, info) \
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-#define bfd_link_just_syms(sec, info) \
+#define bfd_link_just_syms(abfd, sec, info) \
BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
#define bfd_final_link(abfd, info) \
@@ -609,6 +636,10 @@ The following functions exist but have not yet been documented.
#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))
@@ -643,7 +674,7 @@ struct bfd_preserve
flagword flags;
const struct bfd_arch_info *arch_info;
struct bfd_section *sections;
- struct bfd_section **section_tail;
+ struct bfd_section *section_last;
unsigned int section_count;
struct bfd_hash_table section_htab;
@};
diff --git a/contrib/binutils/bfd/doc/cache.texi b/contrib/binutils/bfd/doc/cache.texi
index 2bc3696b101b..5820a2a6a1d3 100644
--- a/contrib/binutils/bfd/doc/cache.texi
+++ b/contrib/binutils/bfd/doc/cache.texi
@@ -10,39 +10,8 @@ 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.
-@findex BFD_CACHE_MAX_OPEN macro
-@subsubsection @code{BFD_CACHE_MAX_OPEN macro}
-@strong{Description}@*
-The maximum number of files which the cache will keep open at
-one time.
-@example
-#define BFD_CACHE_MAX_OPEN 10
-@end example
+@subsection Caching functions
-@findex bfd_last_cache
-@subsubsection @code{bfd_last_cache}
-@strong{Synopsis}
-@example
-extern bfd *bfd_last_cache;
-@end example
-@strong{Description}@*
-Zero, or a pointer to the topmost BFD on the chain. This is
-used by the @code{bfd_cache_lookup} macro in @file{libbfd.h} to
-determine when it can avoid a function call.
-
-@findex bfd_cache_lookup
-@subsubsection @code{bfd_cache_lookup}
-@strong{Description}@*
-Check to see if the required BFD is the same as the last one
-looked up. If so, then it can use the stream in the BFD with
-impunity, since it can't have changed since the last lookup;
-otherwise, it has to perform the complicated lookup function.
-@example
-#define bfd_cache_lookup(x) \
- ((x)==bfd_last_cache? \
- (FILE*) (bfd_last_cache->iostream): \
- bfd_cache_lookup_worker(x))
-@end example
@findex bfd_cache_init
@subsubsection @code{bfd_cache_init}
@@ -67,6 +36,20 @@ then close it too.
@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}
@@ -80,16 +63,3 @@ 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.
-@findex bfd_cache_lookup_worker
-@subsubsection @code{bfd_cache_lookup_worker}
-@strong{Synopsis}
-@example
-FILE *bfd_cache_lookup_worker (bfd *abfd);
-@end example
-@strong{Description}@*
-Called when the macro @code{bfd_cache_lookup} fails to find a
-quick answer. Find a file descriptor for @var{abfd}. If
-necessary, it open it. If there are already more than
-@code{BFD_CACHE_MAX_OPEN} files open, it tries to close one first, to
-avoid running out of file descriptors.
-
diff --git a/contrib/binutils/bfd/doc/chew.c b/contrib/binutils/bfd/doc/chew.c
index 7c060da2d1cb..542fc2feb701 100644
--- a/contrib/binutils/bfd/doc/chew.c
+++ b/contrib/binutils/bfd/doc/chew.c
@@ -1,6 +1,6 @@
/* chew
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
- 2002, 2003
+ 2002, 2003, 2005
Free Software Foundation, Inc.
Contributed by steve chamberlain @cygnus
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Yet another way of extracting documentation from source.
No, I haven't finished it yet, but I hope you people like it better
@@ -83,10 +83,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Foo. */
#include "ansidecl.h"
-#include "sysdep.h"
#include <assert.h>
#include <stdio.h>
#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
#define DEF_SIZE 5000
#define STACK 50
@@ -588,45 +589,6 @@ translatecomments ()
pc++;
}
-#if 0
-
-/* This is not currently used. */
-
-/* turn everything not starting with a . into a comment */
-
-static void
-manglecomments ()
-{
- unsigned int idx = 0;
- string_type out;
- init_string (&out);
-
- while (at (tos, idx))
- {
- if (at (tos, idx) == '\n' && at (tos, idx + 1) == '*')
- {
- cattext (&out, " /*");
- idx += 2;
- }
- else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
- {
- cattext (&out, "*/");
- idx += 2;
- }
- else
- {
- catchar (&out, at (tos, idx));
- idx++;
- }
- }
-
- overwrite_string (tos, &out);
-
- pc++;
-}
-
-#endif
-
/* Mod tos so that only lines with leading dots remain */
static void
outputdots ()
diff --git a/contrib/binutils/bfd/doc/coffcode.texi b/contrib/binutils/bfd/doc/coffcode.texi
index f9e15a62834e..6689009c0817 100644
--- a/contrib/binutils/bfd/doc/coffcode.texi
+++ b/contrib/binutils/bfd/doc/coffcode.texi
@@ -288,34 +288,34 @@ Special entry points for gdb to swap in coff symbol table parts:
typedef struct
@{
void (*_bfd_coff_swap_aux_in)
- PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+ (bfd *, void *, int, int, int, int, void *);
void (*_bfd_coff_swap_sym_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
void (*_bfd_coff_swap_lineno_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_aux_out)
- PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+ (bfd *, void *, int, int, int, int, void *);
unsigned int (*_bfd_coff_swap_sym_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_lineno_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_reloc_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_filehdr_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_aouthdr_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_scnhdr_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int _bfd_filhsz;
unsigned int _bfd_aoutsz;
@@ -332,86 +332,86 @@ typedef struct
unsigned int _bfd_coff_debug_string_prefix_length;
void (*_bfd_coff_swap_filehdr_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
void (*_bfd_coff_swap_aouthdr_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
void (*_bfd_coff_swap_scnhdr_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
void (*_bfd_coff_swap_reloc_in)
- PARAMS ((bfd *abfd, PTR, PTR));
+ (bfd *abfd, void *, void *);
bfd_boolean (*_bfd_coff_bad_format_hook)
- PARAMS ((bfd *, PTR));
+ (bfd *, void *);
bfd_boolean (*_bfd_coff_set_arch_mach_hook)
- PARAMS ((bfd *, PTR));
+ (bfd *, void *);
- PTR (*_bfd_coff_mkobject_hook)
- PARAMS ((bfd *, PTR, PTR));
+ void * (*_bfd_coff_mkobject_hook)
+ (bfd *, void *, void *);
bfd_boolean (*_bfd_styp_to_sec_flags_hook)
- PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
+ (bfd *, void *, const char *, asection *, flagword *);
void (*_bfd_set_alignment_hook)
- PARAMS ((bfd *, asection *, PTR));
+ (bfd *, asection *, void *);
bfd_boolean (*_bfd_coff_slurp_symbol_table)
- PARAMS ((bfd *));
+ (bfd *);
bfd_boolean (*_bfd_coff_symname_in_debug)
- PARAMS ((bfd *, struct internal_syment *));
+ (bfd *, struct internal_syment *);
bfd_boolean (*_bfd_coff_pointerize_aux_hook)
- PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
- unsigned int, combined_entry_type *));
+ (bfd *, combined_entry_type *, combined_entry_type *,
+ unsigned int, combined_entry_type *);
bfd_boolean (*_bfd_coff_print_aux)
- PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
- combined_entry_type *, unsigned int));
+ (bfd *, FILE *, combined_entry_type *, combined_entry_type *,
+ combined_entry_type *, unsigned int);
void (*_bfd_coff_reloc16_extra_cases)
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
- bfd_byte *, unsigned int *, unsigned int *));
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+ bfd_byte *, unsigned int *, unsigned int *);
int (*_bfd_coff_reloc16_estimate)
- PARAMS ((bfd *, asection *, arelent *, unsigned int,
- struct bfd_link_info *));
+ (bfd *, asection *, arelent *, unsigned int,
+ struct bfd_link_info *);
enum coff_symbol_classification (*_bfd_coff_classify_symbol)
- PARAMS ((bfd *, struct internal_syment *));
+ (bfd *, struct internal_syment *);
bfd_boolean (*_bfd_coff_compute_section_file_positions)
- PARAMS ((bfd *));
+ (bfd *);
bfd_boolean (*_bfd_coff_start_final_link)
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
bfd_boolean (*_bfd_coff_relocate_section)
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
+ (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **);
reloc_howto_type *(*_bfd_coff_rtype_to_howto)
- PARAMS ((bfd *, asection *, struct internal_reloc *,
+ (bfd *, asection *, struct internal_reloc *,
struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
+ bfd_vma *);
bfd_boolean (*_bfd_coff_adjust_symndx)
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- struct internal_reloc *, bfd_boolean *));
+ (bfd *, struct bfd_link_info *, bfd *, asection *,
+ struct internal_reloc *, bfd_boolean *);
bfd_boolean (*_bfd_coff_link_add_one_symbol)
- PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
+ (struct bfd_link_info *, bfd *, const char *, flagword,
asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
- struct bfd_link_hash_entry **));
+ struct bfd_link_hash_entry **);
bfd_boolean (*_bfd_coff_link_output_has_begun)
- PARAMS ((bfd *, struct coff_final_link_info *));
+ (bfd *, struct coff_final_link_info *);
bfd_boolean (*_bfd_coff_final_link_postscript)
- PARAMS ((bfd *, struct coff_final_link_info *));
+ (bfd *, struct coff_final_link_info *);
@} bfd_coff_backend_data;
@@ -541,9 +541,9 @@ typedef struct
(info, abfd, name, flags, section, value, string, cp, coll, hashp))
#define bfd_coff_link_output_has_begun(a,p) \
- ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
+ ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a, p))
#define bfd_coff_final_link_postscript(a,p) \
- ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
+ ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p))
@end example
@subsubsection Writing relocations
diff --git a/contrib/binutils/bfd/doc/core.texi b/contrib/binutils/bfd/doc/core.texi
index e45759cf647b..1f09445ef76d 100644
--- a/contrib/binutils/bfd/doc/core.texi
+++ b/contrib/binutils/bfd/doc/core.texi
@@ -1,6 +1,9 @@
@section Core files
+@subsection Core file functions
+
+
@strong{Description}@*
These are functions pertaining to core files.
@@ -36,3 +39,22 @@ 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
index 101001c7d979..4f9434cf69d4 100644
--- a/contrib/binutils/bfd/doc/elf.texi
+++ b/contrib/binutils/bfd/doc/elf.texi
@@ -1,6 +1,4 @@
-@section
-ELF backends
-
+@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).
diff --git a/contrib/binutils/bfd/doc/fdl.texi b/contrib/binutils/bfd/doc/fdl.texi
index 176233cb1b05..a83ecf75b59e 100644
--- a/contrib/binutils/bfd/doc/fdl.texi
+++ b/contrib/binutils/bfd/doc/fdl.texi
@@ -3,8 +3,8 @@
@center Version 1.1, March 2000
@display
-Copyright (C) 2000, Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/contrib/binutils/bfd/doc/format.texi b/contrib/binutils/bfd/doc/format.texi
index 32a1d751fcd4..9674acff440b 100644
--- a/contrib/binutils/bfd/doc/format.texi
+++ b/contrib/binutils/bfd/doc/format.texi
@@ -23,6 +23,9 @@ The BFD contains other BFDs and an optional index.
@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}
diff --git a/contrib/binutils/bfd/doc/hash.texi b/contrib/binutils/bfd/doc/hash.texi
index 3e7372c88add..88d9585cc405 100644
--- a/contrib/binutils/bfd/doc/hash.texi
+++ b/contrib/binutils/bfd/doc/hash.texi
@@ -55,6 +55,10 @@ 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
@@ -178,20 +182,18 @@ from.
@example
struct bfd_hash_entry *
-@var{function_name} (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+@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 == (@var{entry_type} *) NULL)
+ if (ret == NULL)
@{
- ret = ((@var{entry_type} *)
- bfd_hash_allocate (table, sizeof (@var{entry_type})));
- if (ret == (@var{entry_type} *) NULL)
+ ret = bfd_hash_allocate (table, sizeof (* ret));
+ if (ret == NULL)
return NULL;
@}
diff --git a/contrib/binutils/bfd/doc/init.texi b/contrib/binutils/bfd/doc/init.texi
index 0905f6bc4ca9..ab735f8e986c 100644
--- a/contrib/binutils/bfd/doc/init.texi
+++ b/contrib/binutils/bfd/doc/init.texi
@@ -1,4 +1,7 @@
@section Initialization
+
+
+@subsection Initialization functions
These are the functions that handle initializing a BFD.
@findex bfd_init
diff --git a/contrib/binutils/bfd/doc/libbfd.texi b/contrib/binutils/bfd/doc/libbfd.texi
index 5c9ced016304..fef6e0e842ec 100644
--- a/contrib/binutils/bfd/doc/libbfd.texi
+++ b/contrib/binutils/bfd/doc/libbfd.texi
@@ -1,4 +1,7 @@
-@section Internal functions
+@section Implementation details
+
+
+@subsection Internal functions
@strong{Description}@*
diff --git a/contrib/binutils/bfd/doc/linker.texi b/contrib/binutils/bfd/doc/linker.texi
index f2e2bc1cb74f..8a55006a187c 100644
--- a/contrib/binutils/bfd/doc/linker.texi
+++ b/contrib/binutils/bfd/doc/linker.texi
@@ -258,7 +258,7 @@ 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{link_order_head}
+@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
@@ -363,3 +363,18 @@ reloceatable or final link.
@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
index c30895287fec..b0d726aad9c1 100644
--- a/contrib/binutils/bfd/doc/mmo.texi
+++ b/contrib/binutils/bfd/doc/mmo.texi
@@ -32,6 +32,12 @@ 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
@@ -42,12 +48,6 @@ various purposes different for each lopcode. As documented in
@url{http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz},
the lopcodes are:
-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}.
-
@table @code
@item lop_quote
0x98000001. The next word is contents, regardless of whether it
diff --git a/contrib/binutils/bfd/doc/opncls.texi b/contrib/binutils/bfd/doc/opncls.texi
index 8cd2ab9048b1..6b47adfbb45d 100644
--- a/contrib/binutils/bfd/doc/opncls.texi
+++ b/contrib/binutils/bfd/doc/opncls.texi
@@ -1,6 +1,32 @@
@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}
@@ -52,6 +78,50 @@ bfd *bfd_openstreamr (const char *, const char *, void *);
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}
@@ -151,12 +221,42 @@ direction.
@subsubsection @code{bfd_alloc}
@strong{Synopsis}
@example
-void *bfd_alloc (bfd *abfd, size_t wanted);
+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}
diff --git a/contrib/binutils/bfd/doc/reloc.texi b/contrib/binutils/bfd/doc/reloc.texi
index 9253a33f032e..0540be862551 100644
--- a/contrib/binutils/bfd/doc/reloc.texi
+++ b/contrib/binutils/bfd/doc/reloc.texi
@@ -236,11 +236,12 @@ enum complain_overflow
/* Do not complain on overflow. */
complain_overflow_dont,
- /* Complain if the bitfield overflows, whether it is considered
- as signed or unsigned. */
+ /* Complain if the 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 signed
+ /* Complain if the value overflows when considered as a signed
number. */
complain_overflow_signed,
@@ -486,7 +487,7 @@ assembler.
@node howto manager, , typedef arelent, Relocations
-@section The howto manager
+@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.
@@ -526,6 +527,9 @@ 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
@@ -776,11 +780,26 @@ to compensate for the borrow when the low bits are added.
@deffn {} BFD_RELOC_LO16
Low 16 bits.
@end deffn
-@deffn {} BFD_RELOC_PCREL_HI16_S
-Like BFD_RELOC_HI16_S, but PC relative.
+@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_PCREL_LO16
-Like BFD_RELOC_LO16, but PC relative.
+@deffn {} BFD_RELOC_MIPS16_LO16
+MIPS16 low 16 bits.
@end deffn
@deffn {} BFD_RELOC_MIPS_LITERAL
Relocation against a MIPS literal section.
@@ -806,8 +825,25 @@ Relocation against a MIPS literal section.
@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
@@ -831,6 +867,22 @@ MIPS ELF relocations.
@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
@@ -880,6 +932,9 @@ Adjust by program base.
@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
@@ -898,6 +953,16 @@ i386/elf relocations
@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
@@ -1045,38 +1110,104 @@ 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_OFFSET_IMM
+@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
-@deffnx {} BFD_RELOC_ARM_THUMB_OFFSET
-@deffnx {} BFD_RELOC_ARM_GOT12
-@deffnx {} BFD_RELOC_ARM_GOT32
-@deffnx {} BFD_RELOC_ARM_JUMP_SLOT
-@deffnx {} BFD_RELOC_ARM_COPY
-@deffnx {} BFD_RELOC_ARM_GLOB_DAT
-@deffnx {} BFD_RELOC_ARM_PLT32
-@deffnx {} BFD_RELOC_ARM_RELATIVE
-@deffnx {} BFD_RELOC_ARM_GOTOFF
-@deffnx {} BFD_RELOC_ARM_GOTPC
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
@@ -1159,12 +1290,6 @@ These relocs are only used within the ARM assembler. They are not
@deffnx {} BFD_RELOC_SH_TLS_TPOFF32
Renesas / SuperH SH relocs. Not all of these appear in object files.
@end deffn
-@deffn {} BFD_RELOC_THUMB_PCREL_BRANCH9
-@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH12
-@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH23
-Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
-be zero and is not stored in the instruction.
-@end deffn
@deffn {} BFD_RELOC_ARC_B22_PCREL
ARC Cores relocs.
ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
@@ -1176,6 +1301,121 @@ 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
@@ -1253,6 +1493,12 @@ DLX relocs
@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.
@@ -1288,6 +1534,9 @@ add3, load, and store instructions.
@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
@@ -1361,6 +1610,10 @@ Used for relaxing indirect jumps.
@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.
@@ -1509,6 +1762,10 @@ of data memory address) into 8 bit immediate value of LDI insn.
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.
@@ -1523,6 +1780,10 @@ 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.
@@ -1553,6 +1814,18 @@ value of SUBI insn.
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
@@ -1841,10 +2114,79 @@ to follow the 16K memory bank of 68HC12 (seen as mapped in the window).
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.
@@ -1927,16 +2269,42 @@ H8 elf Relocations.
@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
@@ -1958,24 +2326,83 @@ Xtensa relocations for ELF shared objects.
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
-Generic Xtensa relocations. Only the operand number is encoded
-in the relocation. The details are determined by extracting the
-instruction opcode.
+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
+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
+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
@@ -2025,8 +2452,7 @@ bfd_boolean bfd_generic_relax_section
@end example
@strong{Description}@*
Provides default handling for relaxing for back ends which
-don't do relaxing -- i.e., does nothing except make sure that the
-final size of the section is set.
+don't do relaxing.
@findex bfd_generic_gc_sections
@subsubsection @code{bfd_generic_gc_sections}
diff --git a/contrib/binutils/bfd/doc/section.texi b/contrib/binutils/bfd/doc/section.texi
index b1501f9bbb44..4347679ef49c 100644
--- a/contrib/binutils/bfd/doc/section.texi
+++ b/contrib/binutils/bfd/doc/section.texi
@@ -107,23 +107,6 @@ Here is the section structure:
@example
-/* This structure is used for a comdat section, as in PE. A comdat
- section is associated with a particular symbol. When the linker
- sees a comdat section, it keeps only one of the sections with a
- given name and associated with a given symbol. */
-
-struct bfd_comdat_info
-@{
- /* The name of the symbol associated with a comdat section. */
- const char *name;
-
- /* The local symbol table index of the symbol associated with a
- comdat section. This is only meaningful to the object file format
- specific code; it is not an index into the list returned by
- bfd_canonicalize_symtab. */
- long symbol;
-@};
-
typedef struct bfd_section
@{
/* The name of the section; the name isn't a copy, the pointer is
@@ -139,6 +122,9 @@ typedef struct bfd_section
/* 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. */
@@ -158,23 +144,17 @@ typedef struct bfd_section
some relocation information too. */
#define SEC_RELOC 0x004
- /* ELF reserves 4 processor specific bits and 8 operating system
- specific bits in sh_flags; at present we can get away with just
- one in communicating between the assembler and BFD, but this
- isn't a good long-term solution. */
-#define SEC_ARCH_BIT_0 0x008
-
/* A signal to the OS that the section contains read only data. */
-#define SEC_READONLY 0x010
+#define SEC_READONLY 0x008
/* The section contains code only. */
-#define SEC_CODE 0x020
+#define SEC_CODE 0x010
/* The section contains data only. */
-#define SEC_DATA 0x040
+#define SEC_DATA 0x020
/* The section will reside in ROM. */
-#define SEC_ROM 0x080
+#define SEC_ROM 0x040
/* The section contains constructor information. This section
type is used by the linker to create lists of constructors and
@@ -186,30 +166,19 @@ typedef struct bfd_section
sections called @code{__CTOR_LIST__} and relocate the data
contained within - exactly the operations it would peform on
standard data. */
-#define SEC_CONSTRUCTOR 0x100
+#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 0x200
+#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 0x400
-
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
-#define SEC_COFF_SHARED_LIBRARY 0x800
+#define SEC_NEVER_LOAD 0x200
/* The section contains thread local data. */
-#define SEC_THREAD_LOCAL 0x1000
+#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.
@@ -217,46 +186,46 @@ typedef struct bfd_section
in this section, which indicate to the linker that the section
contains PIC code, and must be handled specially when doing a
static link. */
-#define SEC_HAS_GOT_REF 0x4000
+#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 0x8000
+#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 0x10000
+#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 0x20000
+#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 0x40000
+#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 0x80000
+#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 0x100000
+#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 0x600000
+#define SEC_LINK_DUPLICATES 0x40000
/* This value for SEC_LINK_DUPLICATES means that duplicate
sections with the same name should simply be discarded. */
@@ -265,55 +234,69 @@ typedef struct bfd_section
/* This value for SEC_LINK_DUPLICATES means that the linker
should warn if there are any duplicate sections, although
it should still only link one copy. */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
+#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 0x400000
+#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 0x600000
+#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 0x800000
+#define SEC_LINKER_CREATED 0x200000
/* This section should not be subject to garbage collection. */
-#define SEC_KEEP 0x1000000
+#define SEC_KEEP 0x400000
/* This section contains "short" data, and should be placed
"near" the GP. */
-#define SEC_SMALL_DATA 0x2000000
-
- /* This section contains data which may be shared with other
- executables or shared objects. */
-#define SEC_SHARED 0x4000000
-
- /* When a section with this flag is being linked, then if the size of
- the input section is less than a page, it should not cross a page
- boundary. If the size of the input section is one page or more, it
- should be aligned on a page boundary. */
-#define SEC_BLOCK 0x8000000
-
- /* Conditionally link this section; do not link if there are no
- references found to any symbol in the section. */
-#define SEC_CLINK 0x10000000
+#define SEC_SMALL_DATA 0x800000
/* Attempt to merge identical entities in the section.
Entity size is given in the entsize field. */
-#define SEC_MERGE 0x20000000
+#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 0x40000000
+#define SEC_STRINGS 0x2000000
/* This section contains data about section groups. */
-#define SEC_GROUP 0x80000000
+#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. */
@@ -322,9 +305,6 @@ typedef struct bfd_section
/* See the vma field. */
unsigned int user_set_vma : 1;
- /* Whether relocations have been processed. */
- unsigned int reloc_done : 1;
-
/* A mark flag used by some of the linker backends. */
unsigned int linker_mark : 1;
@@ -332,8 +312,9 @@ typedef struct bfd_section
output sections that have an input section. */
unsigned int linker_has_input : 1;
- /* A mark flag used by some linker backends for garbage collection. */
+ /* 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. */
@@ -351,22 +332,20 @@ typedef struct bfd_section
/* Nonzero if this section uses RELA relocations, rather than REL. */
unsigned int use_rela_p:1;
- /* Bits used by various backends. */
- unsigned int has_tls_reloc:1;
+ /* Bits used by various backends. The generic code doesn't touch
+ these fields. */
- /* Nonzero if this section needs the relax finalize pass. */
- unsigned int need_finalize_relax:1;
+ /* 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;
- /* Unused bits. */
- unsigned int flag13:1;
- unsigned int flag14:1;
- unsigned int flag15:1;
- unsigned int flag16:4;
- unsigned int flag20:4;
- unsigned int flag24:8;
+ /* 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. */
@@ -385,13 +364,18 @@ typedef struct bfd_section
/* The size of the section in octets, as it will be output.
Contains a value even if the section has no contents (e.g., the
- size of @code{.bss}). This will be filled in after relocation. */
- bfd_size_type _cooked_size;
-
- /* The original size on disk of the section, in octets. Normally this
- value is the same as the size, but if some relaxing has
- been done, then this value will be bigger. */
- bfd_size_type _raw_size;
+ 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
@@ -448,9 +432,6 @@ typedef struct bfd_section
/* Entity size for merging purposes. */
unsigned int entsize;
- /* Optional information about a COMDAT entry; NULL if not COMDAT. */
- struct bfd_comdat_info *comdat;
-
/* Points to the kept section if this section is a link-once section,
and is discarded. */
struct bfd_section *kept_section;
@@ -475,8 +456,14 @@ typedef struct bfd_section
struct bfd_symbol *symbol;
struct bfd_symbol **symbol_ptr_ptr;
- struct bfd_link_order *link_order_head;
- struct bfd_link_order *link_order_tail;
+ /* 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
@@ -515,36 +502,137 @@ 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;
-#define bfd_get_section_size_before_reloc(section) \
- ((section)->_raw_size)
-#define bfd_get_section_size_after_reloc(section) \
- ((section)->reloc_done ? (section)->_cooked_size \
- : (abort (), (bfd_size_type) 1))
/* Macros to handle insertion and deletion of a bfd's sections. These
only handle the list pointers, ie. do not adjust section_count,
target_index etc. */
-#define bfd_section_list_remove(ABFD, PS) \
+#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 **_ps = PS; \
- asection *_s = *_ps; \
- *_ps = _s->next; \
- if (_s->next == NULL) \
- (ABFD)->section_tail = _ps; \
+ 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_insert(ABFD, PS, S) \
+#define bfd_section_list_prepend(ABFD, S) \
do \
@{ \
- asection **_ps = PS; \
asection *_s = S; \
- _s->next = *_ps; \
- *_ps = _s; \
- if (_s->next == NULL) \
- (ABFD)->section_tail = &_s->next; \
+ 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
@@ -578,6 +666,29 @@ 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}
@@ -619,6 +730,28 @@ If output has already started for this BFD.
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}
@@ -639,6 +772,20 @@ Return @code{NULL} and set @code{bfd_error} on error; possible errors are:
@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}
@@ -699,6 +846,26 @@ alternative would be to use a loop:
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}
@@ -766,6 +933,17 @@ flag set are requested or if the section does not have the
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}
@@ -791,20 +969,14 @@ Not enough memory exists to create private data for @var{osec}.
(ibfd, isection, obfd, osection))
@end example
-@findex _bfd_strip_section_from_output
-@subsubsection @code{_bfd_strip_section_from_output}
+@findex bfd_generic_is_group_section
+@subsubsection @code{bfd_generic_is_group_section}
@strong{Synopsis}
@example
-void _bfd_strip_section_from_output
- (struct bfd_link_info *info, asection *section);
+bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
@end example
@strong{Description}@*
-Remove @var{section} from the output. If the output section
-becomes empty, remove it from the output bfd.
-
-This function won't actually do anything except twiddle flags
-if called too late in the linking process, when it's not safe
-to remove sections.
+Returns TRUE if @var{sec} is a member of a group.
@findex bfd_generic_discard_group
@subsubsection @code{bfd_generic_discard_group}
diff --git a/contrib/binutils/bfd/doc/syms.texi b/contrib/binutils/bfd/doc/syms.texi
index 415d15698803..dc56bbc7e1b5 100644
--- a/contrib/binutils/bfd/doc/syms.texi
+++ b/contrib/binutils/bfd/doc/syms.texi
@@ -309,6 +309,22 @@ local label.
@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}@*
diff --git a/contrib/binutils/bfd/doc/targets.texi b/contrib/binutils/bfd/doc/targets.texi
index 9b499cf41995..a85c84911080 100644
--- a/contrib/binutils/bfd/doc/targets.texi
+++ b/contrib/binutils/bfd/doc/targets.texi
@@ -178,7 +178,7 @@ typedef struct bfd_target
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 asthe first argument.
+ 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 *);
@@ -242,8 +242,10 @@ BFD_JUMP_TABLE macros.
#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
@@ -253,6 +255,12 @@ BFD_JUMP_TABLE macros.
/* 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)
@@ -261,6 +269,10 @@ BFD_JUMP_TABLE macros.
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);
@@ -312,8 +324,11 @@ BFD_JUMP_TABLE macros.
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
@@ -330,11 +345,16 @@ BFD_JUMP_TABLE macros.
(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. */
@@ -385,7 +405,9 @@ BFD_JUMP_TABLE macros.
NAME##_bfd_link_split_section, \
NAME##_bfd_gc_sections, \
NAME##_bfd_merge_sections, \
- NAME##_bfd_discard_group
+ 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)
@@ -422,13 +444,21 @@ BFD_JUMP_TABLE macros.
/* 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
@@ -437,6 +467,10 @@ BFD_JUMP_TABLE macros.
/* 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. */
diff --git a/contrib/binutils/bfd/dwarf1.c b/contrib/binutils/bfd/dwarf1.c
index 1047ebfc2e99..5d6c1e359e51 100644
--- a/contrib/binutils/bfd/dwarf1.c
+++ b/contrib/binutils/bfd/dwarf1.c
@@ -1,23 +1,24 @@
/* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line).
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2004, 2005
+ Free Software Foundation, Inc.
-Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).
+ Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).
-This file is part of BFD.
+ This file is part of BFD.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at
-your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at
+ your option) any later version.
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -28,8 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* dwarf1_debug is the starting point for all dwarf1 info. */
-struct dwarf1_debug {
-
+struct dwarf1_debug
+{
/* The bfd we are working with. */
bfd* abfd;
@@ -55,7 +56,8 @@ struct dwarf1_debug {
/* One dwarf1_unit for each parsed compilation unit die. */
-struct dwarf1_unit {
+struct dwarf1_unit
+{
/* Linked starting from stash->lastUnit. */
struct dwarf1_unit* prev;
@@ -66,7 +68,7 @@ struct dwarf1_unit {
unsigned long low_pc;
unsigned long high_pc;
- /* Does this unit have a statement list? */
+ /* Does this unit have a statement list? */
int has_stmt_list;
/* If any, the offset of the line number table in the .line section. */
@@ -75,7 +77,7 @@ struct dwarf1_unit {
/* If non-zero, a pointer to the first child of this unit. */
char* first_child;
- /* How many line entries? */
+ /* How many line entries? */
unsigned long line_count;
/* The decoded line number table (line_count entries). */
@@ -87,7 +89,8 @@ struct dwarf1_unit {
/* One dwarf1_func for each parsed function die. */
-struct dwarf1_func {
+struct dwarf1_func
+{
/* Linked starting from aUnit->func_list. */
struct dwarf1_func* prev;
@@ -100,7 +103,8 @@ struct dwarf1_func {
};
/* Used to return info about a parsed die. */
-struct die_info {
+struct die_info
+{
unsigned long length;
unsigned long sibling;
unsigned long low_pc;
@@ -115,7 +119,8 @@ struct die_info {
};
/* Parsed line number information. */
-struct linenumber {
+struct linenumber
+{
/* First address in the line. */
unsigned long addr;
@@ -124,32 +129,17 @@ struct linenumber {
};
/* Find the form of an attr, from the attr field. */
-#define FORM_FROM_ATTR(attr) ((attr) & 0xF) /* Implicitly specified */
-
-static struct dwarf1_unit *alloc_dwarf1_unit
- PARAMS ((struct dwarf1_debug *));
-static struct dwarf1_func *alloc_dwarf1_func
- PARAMS ((struct dwarf1_debug *, struct dwarf1_unit *));
-static bfd_boolean parse_die
- PARAMS ((bfd *, struct die_info *, char *, char *));
-static bfd_boolean parse_line_table
- PARAMS ((struct dwarf1_debug *, struct dwarf1_unit *));
-static bfd_boolean parse_functions_in_unit
- PARAMS ((struct dwarf1_debug *, struct dwarf1_unit *));
-static bfd_boolean dwarf1_unit_find_nearest_line
- PARAMS ((struct dwarf1_debug *, struct dwarf1_unit *, unsigned long,
- const char **, const char **, unsigned int *));
+#define FORM_FROM_ATTR(attr) ((attr) & 0xF) /* Implicitly specified. */
/* Return a newly allocated dwarf1_unit. It should be cleared and
then attached into the 'stash' at 'stash->lastUnit'. */
static struct dwarf1_unit*
-alloc_dwarf1_unit (stash)
- struct dwarf1_debug* stash;
+alloc_dwarf1_unit (struct dwarf1_debug* stash)
{
bfd_size_type amt = sizeof (struct dwarf1_unit);
- struct dwarf1_unit* x = (struct dwarf1_unit*) bfd_zalloc (stash->abfd, amt);
+ struct dwarf1_unit* x = bfd_zalloc (stash->abfd, amt);
x->prev = stash->lastUnit;
stash->lastUnit = x;
@@ -159,14 +149,12 @@ alloc_dwarf1_unit (stash)
/* Return a newly allocated dwarf1_func. It must be cleared and
attached into 'aUnit' at 'aUnit->func_list'. */
-static struct dwarf1_func*
-alloc_dwarf1_func (stash, aUnit)
- struct dwarf1_debug* stash;
- struct dwarf1_unit* aUnit;
+static struct dwarf1_func *
+alloc_dwarf1_func (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit)
{
bfd_size_type amt = sizeof (struct dwarf1_func);
- struct dwarf1_func* x = (struct dwarf1_func*) bfd_zalloc (stash->abfd, amt);
+ struct dwarf1_func* x = bfd_zalloc (stash->abfd, amt);
x->prev = aUnit->func_list;
aUnit->func_list = x;
@@ -181,16 +169,15 @@ alloc_dwarf1_func (stash, aUnit)
Return FALSE if the die is invalidly formatted; TRUE otherwise. */
static bfd_boolean
-parse_die (abfd, aDieInfo, aDiePtr, aDiePtrEnd)
- bfd* abfd;
- struct die_info* aDieInfo;
- char* aDiePtr;
- char* aDiePtrEnd;
+parse_die (bfd * abfd,
+ struct die_info * aDieInfo,
+ char * aDiePtr,
+ char * aDiePtrEnd)
{
char* this_die = aDiePtr;
char* xptr = this_die;
- memset (aDieInfo,0,sizeof (*aDieInfo));
+ memset (aDieInfo, 0, sizeof (* aDieInfo));
/* First comes the length. */
aDieInfo->length = bfd_get_32 (abfd, (bfd_byte *) xptr);
@@ -217,7 +204,6 @@ parse_die (abfd, aDieInfo, aDiePtr, aDiePtrEnd)
/* Parse the attribute based on its form. This section
must handle all dwarf1 forms, but need only handle the
actual attributes that we care about. */
-
attr = bfd_get_16 (abfd, (bfd_byte *) xptr);
xptr += 2;
@@ -269,9 +255,7 @@ parse_die (abfd, aDieInfo, aDiePtr, aDiePtrEnd)
occurs; TRUE otherwise. */
static bfd_boolean
-parse_line_table (stash, aUnit)
- struct dwarf1_debug* stash;
- struct dwarf1_unit* aUnit;
+parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit)
{
char* xptr;
@@ -285,14 +269,14 @@ parse_line_table (stash, aUnit)
if (! msec)
return FALSE;
- size = bfd_get_section_size_before_reloc (msec);
- stash->line_section = (char *) bfd_alloc (stash->abfd, size);
+ size = msec->rawsize ? msec->rawsize : msec->size;
+ stash->line_section = bfd_alloc (stash->abfd, size);
if (! stash->line_section)
return FALSE;
if (! bfd_get_section_contents (stash->abfd, msec, stash->line_section,
- (bfd_vma) 0, size))
+ 0, size))
{
stash->line_section = 0;
return FALSE;
@@ -318,13 +302,12 @@ parse_line_table (stash, aUnit)
xptr += 4;
/* How many line entrys?
- 10 = 4 (line number) + 2 (pos in line) + 4 (address in line) */
+ 10 = 4 (line number) + 2 (pos in line) + 4 (address in line). */
aUnit->line_count = (tblend - xptr) / 10;
/* Allocate an array for the entries. */
amt = sizeof (struct linenumber) * aUnit->line_count;
- aUnit->linenumber_table = ((struct linenumber *)
- bfd_alloc (stash->abfd, amt));
+ aUnit->linenumber_table = bfd_alloc (stash->abfd, amt);
for (eachLine = 0; eachLine < aUnit->line_count; eachLine++)
{
@@ -352,15 +335,13 @@ parse_line_table (stash, aUnit)
Return FALSE if error; TRUE otherwise. */
static bfd_boolean
-parse_functions_in_unit (stash, aUnit)
- struct dwarf1_debug* stash;
- struct dwarf1_unit* aUnit;
+parse_functions_in_unit (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit)
{
char* eachDie;
if (aUnit->first_child)
for (eachDie = aUnit->first_child;
- eachDie < stash->debug_section_end;
+ eachDie < stash->debug_section_end;
)
{
struct die_info eachDieInfo;
@@ -395,15 +376,12 @@ parse_functions_in_unit (stash, aUnit)
Return whether we found the line (or a function) without error. */
static bfd_boolean
-dwarf1_unit_find_nearest_line (stash, aUnit, addr,
- filename_ptr, functionname_ptr,
- linenumber_ptr)
- struct dwarf1_debug* stash;
- struct dwarf1_unit* aUnit;
- unsigned long addr;
- const char **filename_ptr;
- const char **functionname_ptr;
- unsigned int *linenumber_ptr;
+dwarf1_unit_find_nearest_line (struct dwarf1_debug* stash,
+ struct dwarf1_unit* aUnit,
+ unsigned long addr,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *linenumber_ptr)
{
int line_p = FALSE;
int func_p = FALSE;
@@ -461,15 +439,13 @@ dwarf1_unit_find_nearest_line (stash, aUnit, addr,
Return TRUE if the line is found without error. */
bfd_boolean
-_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
- filename_ptr, functionname_ptr, linenumber_ptr)
- bfd *abfd;
- asection *section;
- asymbol **symbols ATTRIBUTE_UNUSED;
- bfd_vma offset;
- const char **filename_ptr;
- const char **functionname_ptr;
- unsigned int *linenumber_ptr;
+_bfd_dwarf1_find_nearest_line (bfd *abfd,
+ asection *section,
+ asymbol **symbols ATTRIBUTE_UNUSED,
+ bfd_vma offset,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *linenumber_ptr)
{
struct dwarf1_debug *stash = elf_tdata (abfd)->dwarf1_find_line_info;
@@ -488,28 +464,26 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
bfd_size_type size = sizeof (struct dwarf1_debug);
stash = elf_tdata (abfd)->dwarf1_find_line_info
- = (struct dwarf1_debug *) bfd_zalloc (abfd, size);
+ = bfd_zalloc (abfd, size);
if (! stash)
return FALSE;
msec = bfd_get_section_by_name (abfd, ".debug");
if (! msec)
- {
- /* No dwarf1 info. Note that at this point the stash
- has been allocated, but contains zeros, this lets
- future calls to this function fail quicker. */
- return FALSE;
- }
+ /* No dwarf1 info. Note that at this point the stash
+ has been allocated, but contains zeros, this lets
+ future calls to this function fail quicker. */
+ return FALSE;
- size = bfd_get_section_size_before_reloc (msec);
- stash->debug_section = (char *) bfd_alloc (abfd, size);
+ size = msec->rawsize ? msec->rawsize : msec->size;
+ stash->debug_section = bfd_alloc (abfd, size);
if (! stash->debug_section)
return FALSE;
if (! bfd_get_section_contents (abfd, msec, stash->debug_section,
- (bfd_vma) 0, size))
+ 0, size))
{
stash->debug_section = 0;
return FALSE;
@@ -529,13 +503,11 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
/* Look at the previously parsed units to see if any contain
the addr. */
for (eachUnit = stash->lastUnit; eachUnit; eachUnit = eachUnit->prev)
- {
- if (eachUnit->low_pc <= addr && addr < eachUnit->high_pc)
- return dwarf1_unit_find_nearest_line (stash, eachUnit, addr,
- filename_ptr,
- functionname_ptr,
- linenumber_ptr);
- }
+ if (eachUnit->low_pc <= addr && addr < eachUnit->high_pc)
+ return dwarf1_unit_find_nearest_line (stash, eachUnit, addr,
+ filename_ptr,
+ functionname_ptr,
+ linenumber_ptr);
while (stash->currentDie < stash->debug_section_end)
{
@@ -582,5 +554,3 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
return FALSE;
}
-
-/* EOF */
diff --git a/contrib/binutils/bfd/dwarf2.c b/contrib/binutils/bfd/dwarf2.c
index 6182ea9ac357..ae68d1886818 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 Free Software Foundation, Inc.
+ 2004, 2005, 2006 Free Software Foundation, Inc.
Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
(gavin@cygnus.com).
@@ -27,7 +27,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -71,47 +71,71 @@ struct attribute
struct dwarf_block
{
unsigned int size;
- char *data;
+ bfd_byte *data;
+};
+
+struct loadable_section
+{
+ asection *section;
+ bfd_vma adj_vma;
};
struct dwarf2_debug
{
/* A list of all previously read comp_units. */
- struct comp_unit* all_comp_units;
+ struct comp_unit *all_comp_units;
/* The next unread compilation unit within the .debug_info section.
Zero indicates that the .debug_info section has not been loaded
into a buffer yet. */
- char* info_ptr;
+ bfd_byte *info_ptr;
/* Pointer to the end of the .debug_info section memory buffer. */
- char* info_ptr_end;
+ bfd_byte *info_ptr_end;
/* Pointer to the section and address of the beginning of the
section. */
- asection* sec;
- char* sec_info_ptr;
+ asection *sec;
+ bfd_byte *sec_info_ptr;
/* Pointer to the symbol table. */
- asymbol** syms;
+ asymbol **syms;
/* Pointer to the .debug_abbrev section loaded into memory. */
- char* dwarf_abbrev_buffer;
+ bfd_byte *dwarf_abbrev_buffer;
/* Length of the loaded .debug_abbrev section. */
unsigned long dwarf_abbrev_size;
/* Buffer for decode_line_info. */
- char *dwarf_line_buffer;
+ bfd_byte *dwarf_line_buffer;
/* Length of the loaded .debug_line section. */
unsigned long dwarf_line_size;
/* Pointer to the .debug_str section loaded into memory. */
- char* dwarf_str_buffer;
+ bfd_byte *dwarf_str_buffer;
/* Length of the loaded .debug_str section. */
unsigned long dwarf_str_size;
+
+ /* Pointer to the .debug_ranges section loaded into memory. */
+ bfd_byte *dwarf_ranges_buffer;
+
+ /* Length of the loaded .debug_ranges section. */
+ unsigned long dwarf_ranges_size;
+
+ /* If the most recent call to bfd_find_nearest_line was given an
+ address in an inlined function, preserve a pointer into the
+ calling chain for subsequent calls to bfd_find_inliner_info to
+ use. */
+ struct funcinfo *inliner_chain;
+
+ /* Number of loadable sections. */
+ unsigned int loadable_section_count;
+
+ /* Array of loadable sections. */
+ struct loadable_section *loadable_sections;
};
struct arange
@@ -127,44 +151,51 @@ struct arange
struct comp_unit
{
/* Chain the previously read compilation units. */
- struct comp_unit* next_unit;
+ struct comp_unit *next_unit;
- /* Keep the bdf convenient (for memory allocation). */
- bfd* abfd;
+ /* Keep the bfd convenient (for memory allocation). */
+ bfd *abfd;
- /* The lowest and higest addresses contained in this compilation
+ /* The lowest and highest addresses contained in this compilation
unit as specified in the compilation unit header. */
struct arange arange;
/* The DW_AT_name attribute (for error messages). */
- char* name;
+ char *name;
/* The abbrev hash table. */
- struct abbrev_info** abbrevs;
+ struct abbrev_info **abbrevs;
/* Note that an error was found by comp_unit_find_nearest_line. */
int error;
/* The DW_AT_comp_dir attribute. */
- char* comp_dir;
+ char *comp_dir;
/* TRUE if there is a line number table associated with this comp. unit. */
int stmtlist;
+ /* Pointer to the current comp_unit so that we can find a given entry
+ by its reference. */
+ bfd_byte *info_ptr_unit;
+
/* The offset into .debug_line of the line number table. */
unsigned long line_offset;
/* Pointer to the first child die for the comp unit. */
- char *first_child_die_ptr;
+ bfd_byte *first_child_die_ptr;
/* The end of the comp unit. */
- char *end_ptr;
+ bfd_byte *end_ptr;
/* The decoded line number, NULL if not yet decoded. */
- struct line_info_table* line_table;
+ struct line_info_table *line_table;
/* A list of the functions found in this comp. unit. */
- struct funcinfo* function_table;
+ struct funcinfo *function_table;
+
+ /* A list of the variables found in this comp. unit. */
+ struct varinfo *variable_table;
/* Pointer to dwarf2_debug structure. */
struct dwarf2_debug *stash;
@@ -174,6 +205,10 @@ struct comp_unit
/* Offset size for this unit - from unit header. */
unsigned char offset_size;
+
+ /* Base address for this unit - from DW_AT_low_pc attribute of
+ DW_TAG_compile_unit DIE */
+ bfd_vma base_address;
};
/* This data structure holds the information of an abbrev. */
@@ -207,38 +242,38 @@ struct attr_abbrev
/* Read dwarf information from a buffer. */
static unsigned int
-read_1_byte (bfd *abfd ATTRIBUTE_UNUSED, char *buf)
+read_1_byte (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *buf)
{
return bfd_get_8 (abfd, buf);
}
static int
-read_1_signed_byte (bfd *abfd ATTRIBUTE_UNUSED, char *buf)
+read_1_signed_byte (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *buf)
{
return bfd_get_signed_8 (abfd, buf);
}
static unsigned int
-read_2_bytes (bfd *abfd, char *buf)
+read_2_bytes (bfd *abfd, bfd_byte *buf)
{
return bfd_get_16 (abfd, buf);
}
static unsigned int
-read_4_bytes (bfd *abfd, char *buf)
+read_4_bytes (bfd *abfd, bfd_byte *buf)
{
return bfd_get_32 (abfd, buf);
}
static bfd_uint64_t
-read_8_bytes (bfd *abfd, char *buf)
+read_8_bytes (bfd *abfd, bfd_byte *buf)
{
return bfd_get_64 (abfd, buf);
}
-static char *
+static bfd_byte *
read_n_bytes (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
+ bfd_byte *buf,
unsigned int size ATTRIBUTE_UNUSED)
{
/* If the size of a host char is 8 bits, we can return a pointer
@@ -249,27 +284,29 @@ read_n_bytes (bfd *abfd ATTRIBUTE_UNUSED,
static char *
read_string (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
+ bfd_byte *buf,
unsigned int *bytes_read_ptr)
{
/* Return a pointer to the embedded string. */
- if (*buf == '\0')
+ char *str = (char *) buf;
+ if (*str == '\0')
{
*bytes_read_ptr = 1;
return NULL;
}
- *bytes_read_ptr = strlen (buf) + 1;
- return buf;
+ *bytes_read_ptr = strlen (str) + 1;
+ return str;
}
static char *
read_indirect_string (struct comp_unit* unit,
- char *buf,
+ bfd_byte *buf,
unsigned int *bytes_read_ptr)
{
bfd_uint64_t offset;
struct dwarf2_debug *stash = unit->stash;
+ char *str;
if (unit->offset_size == 4)
offset = read_4_bytes (unit->abfd, buf);
@@ -281,6 +318,7 @@ read_indirect_string (struct comp_unit* unit,
{
asection *msec;
bfd *abfd = unit->abfd;
+ bfd_size_type sz;
msec = bfd_get_section_by_name (abfd, ".debug_str");
if (! msec)
@@ -291,13 +329,14 @@ read_indirect_string (struct comp_unit* unit,
return NULL;
}
- stash->dwarf_str_size = msec->_raw_size;
- stash->dwarf_str_buffer = bfd_alloc (abfd, msec->_raw_size);
- if (! stash->dwarf_abbrev_buffer)
+ sz = msec->rawsize ? msec->rawsize : msec->size;
+ stash->dwarf_str_size = sz;
+ stash->dwarf_str_buffer = bfd_alloc (abfd, sz);
+ if (! stash->dwarf_str_buffer)
return NULL;
if (! bfd_get_section_contents (abfd, msec, stash->dwarf_str_buffer,
- 0, msec->_raw_size))
+ 0, sz))
return NULL;
}
@@ -309,88 +348,46 @@ read_indirect_string (struct comp_unit* unit,
return NULL;
}
- buf = stash->dwarf_str_buffer + offset;
- if (*buf == '\0')
+ str = (char *) stash->dwarf_str_buffer + offset;
+ if (*str == '\0')
return NULL;
- return buf;
+ return str;
}
-static unsigned int
-read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
- unsigned int *bytes_read_ptr)
-{
- unsigned int result;
- unsigned int num_read;
- int shift;
- unsigned char byte;
-
- result = 0;
- shift = 0;
- num_read = 0;
-
- do
- {
- byte = bfd_get_8 (abfd, buf);
- buf ++;
- num_read ++;
- result |= ((byte & 0x7f) << shift);
- shift += 7;
- }
- while (byte & 0x80);
-
- * bytes_read_ptr = num_read;
-
- return result;
-}
+/* END VERBATIM */
-static int
-read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
- unsigned int * bytes_read_ptr)
+static bfd_uint64_t
+read_address (struct comp_unit *unit, bfd_byte *buf)
{
- int result;
- int shift;
- int num_read;
- unsigned char byte;
+ int signed_vma = get_elf_backend_data (unit->abfd)->sign_extend_vma;
- result = 0;
- shift = 0;
- num_read = 0;
-
- do
+ if (signed_vma)
{
- byte = bfd_get_8 (abfd, buf);
- buf ++;
- num_read ++;
- result |= ((byte & 0x7f) << shift);
- shift += 7;
+ switch (unit->addr_size)
+ {
+ case 8:
+ return bfd_get_signed_64 (unit->abfd, buf);
+ case 4:
+ return bfd_get_signed_32 (unit->abfd, buf);
+ case 2:
+ return bfd_get_signed_16 (unit->abfd, buf);
+ default:
+ abort ();
+ }
}
- while (byte & 0x80);
-
- if ((shift < 32) && (byte & 0x40))
- result |= -(1 << shift);
-
- * bytes_read_ptr = num_read;
-
- return result;
-}
-
-/* END VERBATIM */
-
-static bfd_uint64_t
-read_address (struct comp_unit *unit, char *buf)
-{
- switch (unit->addr_size)
+ else
{
- case 8:
- return bfd_get_64 (unit->abfd, buf);
- case 4:
- return bfd_get_32 (unit->abfd, buf);
- case 2:
- return bfd_get_16 (unit->abfd, buf);
- default:
- abort ();
+ switch (unit->addr_size)
+ {
+ case 8:
+ return bfd_get_64 (unit->abfd, buf);
+ case 4:
+ return bfd_get_32 (unit->abfd, buf);
+ case 2:
+ return bfd_get_16 (unit->abfd, buf);
+ default:
+ abort ();
+ }
}
}
@@ -425,7 +422,7 @@ static struct abbrev_info**
read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash)
{
struct abbrev_info **abbrevs;
- char *abbrev_ptr;
+ bfd_byte *abbrev_ptr;
struct abbrev_info *cur_abbrev;
unsigned int abbrev_number, bytes_read, abbrev_name;
unsigned int abbrev_form, hash_number;
@@ -443,7 +440,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash)
return 0;
}
- stash->dwarf_abbrev_size = msec->_raw_size;
+ stash->dwarf_abbrev_size = msec->size;
stash->dwarf_abbrev_buffer
= bfd_simple_get_relocated_section_contents (abfd, msec, NULL,
stash->syms);
@@ -490,11 +487,28 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash)
{
if ((cur_abbrev->num_attrs % ATTR_ALLOC_CHUNK) == 0)
{
+ struct attr_abbrev *tmp;
+
amt = cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK;
amt *= sizeof (struct attr_abbrev);
- cur_abbrev->attrs = bfd_realloc (cur_abbrev->attrs, amt);
- if (! cur_abbrev->attrs)
- return 0;
+ tmp = bfd_realloc (cur_abbrev->attrs, amt);
+ if (tmp == NULL)
+ {
+ size_t i;
+
+ for (i = 0; i < ABBREV_HASH_SIZE; i++)
+ {
+ struct abbrev_info *abbrev = abbrevs[i];
+
+ while (abbrev)
+ {
+ free (abbrev->attrs);
+ abbrev = abbrev->next;
+ }
+ }
+ return NULL;
+ }
+ cur_abbrev->attrs = tmp;
}
cur_abbrev->attrs[cur_abbrev->num_attrs].name
@@ -519,7 +533,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash)
for the next compile unit) or if the end of the abbreviation
table is reached. */
if ((unsigned int) (abbrev_ptr - stash->dwarf_abbrev_buffer)
- >= stash->dwarf_abbrev_size)
+ >= stash->dwarf_abbrev_size)
break;
abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
abbrev_ptr += bytes_read;
@@ -532,11 +546,11 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash)
/* Read an attribute value described by an attribute form. */
-static char *
+static bfd_byte *
read_attribute_value (struct attribute *attr,
unsigned form,
struct comp_unit *unit,
- char *info_ptr)
+ bfd_byte *info_ptr)
{
bfd *abfd = unit->abfd;
unsigned int bytes_read;
@@ -660,11 +674,11 @@ read_attribute_value (struct attribute *attr,
/* Read an attribute described by an abbreviated attribute. */
-static char *
+static bfd_byte *
read_attribute (struct attribute *attr,
struct attr_abbrev *abbrev,
struct comp_unit *unit,
- char *info_ptr)
+ bfd_byte *info_ptr)
{
attr->name = abbrev->name;
info_ptr = read_attribute_value (attr, abbrev->form, unit, info_ptr);
@@ -680,7 +694,7 @@ struct line_info
{
struct line_info* prev_line;
bfd_vma address;
- char* filename;
+ char *filename;
unsigned int line;
unsigned int column;
int end_sequence; /* End of (sequential) code sequence. */
@@ -699,21 +713,60 @@ struct line_info_table
bfd* abfd;
unsigned int num_files;
unsigned int num_dirs;
- char* comp_dir;
- char** dirs;
+ char *comp_dir;
+ char **dirs;
struct fileinfo* files;
struct line_info* last_line; /* largest VMA */
struct line_info* lcl_head; /* local head; used in 'add_line_info' */
};
+/* Remember some information about each function. If the function is
+ inlined (DW_TAG_inlined_subroutine) it may have two additional
+ attributes, DW_AT_call_file and DW_AT_call_line, which specify the
+ source code location where this function was inlined. */
+
struct funcinfo
{
- struct funcinfo *prev_func;
- char* name;
- bfd_vma low;
- bfd_vma high;
+ struct funcinfo *prev_func; /* Pointer to previous function in list of all functions */
+ struct funcinfo *caller_func; /* Pointer to function one scope higher */
+ char *caller_file; /* Source location file name where caller_func inlines this func */
+ int caller_line; /* Source location line number where caller_func inlines this func */
+ char *file; /* Source location file name */
+ int line; /* Source location line number */
+ int tag;
+ char *name;
+ struct arange arange;
+ asection *sec; /* Where the symbol is defined */
+};
+
+struct varinfo
+{
+ /* Pointer to previous variable in list of all variables */
+ struct varinfo *prev_var;
+ /* Source location file name */
+ char *file;
+ /* Source location line number */
+ int line;
+ int tag;
+ char *name;
+ bfd_vma addr;
+ /* Where the symbol is defined */
+ asection *sec;
+ /* Is this a stack variable? */
+ unsigned int stack: 1;
};
+/* Return TRUE if NEW_LINE should sort after LINE. */
+
+static inline bfd_boolean
+new_line_sorts_after (struct line_info *new_line, struct line_info *line)
+{
+ return (new_line->address > line->address
+ || (new_line->address == line->address
+ && new_line->end_sequence < line->end_sequence));
+}
+
+
/* Adds a new entry to the line_info list in the line_info_table, ensuring
that the list is sorted. Note that the line_info list is sorted from
highest to lowest VMA (with possible duplicates); that is,
@@ -730,6 +783,21 @@ add_line_info (struct line_info_table *table,
bfd_size_type amt = sizeof (struct line_info);
struct line_info* info = bfd_alloc (table->abfd, amt);
+ /* Set member data of 'info'. */
+ info->address = address;
+ info->line = line;
+ info->column = column;
+ info->end_sequence = end_sequence;
+
+ if (filename && filename[0])
+ {
+ info->filename = bfd_alloc (table->abfd, strlen (filename) + 1);
+ if (info->filename)
+ strcpy (info->filename, filename);
+ }
+ else
+ info->filename = NULL;
+
/* Find the correct location for 'info'. Normally we will receive
new line_info data 1) in order and 2) with increasing VMAs.
However some compilers break the rules (cf. decode_line_info) and
@@ -745,70 +813,45 @@ add_line_info (struct line_info_table *table,
Note: we may receive duplicate entries from 'decode_line_info'. */
- while (1)
- if (!table->last_line
- || address >= table->last_line->address)
- {
- /* Normal case: add 'info' to the beginning of the list */
- info->prev_line = table->last_line;
- table->last_line = info;
-
- /* lcl_head: initialize to head a *possible* sequence at the end. */
- if (!table->lcl_head)
- table->lcl_head = info;
- break;
- }
- else if (!table->lcl_head->prev_line
- && table->lcl_head->address > address)
- {
- /* Abnormal but easy: lcl_head is 1) at the *end* of the line
- list and 2) the head of 'info'. */
- info->prev_line = NULL;
- table->lcl_head->prev_line = info;
- break;
- }
- else if (table->lcl_head->prev_line
- && table->lcl_head->address > address
- && address >= table->lcl_head->prev_line->address)
- {
- /* Abnormal but easy: lcl_head is 1) in the *middle* of the line
- list and 2) the head of 'info'. */
- info->prev_line = table->lcl_head->prev_line;
- table->lcl_head->prev_line = info;
- break;
- }
- else
- {
- /* Abnormal and hard: Neither 'last_line' nor 'lcl_head' are valid
- heads for 'info'. Reset 'lcl_head' and repeat. */
- struct line_info* li2 = table->last_line; /* always non-NULL */
- struct line_info* li1 = li2->prev_line;
-
- while (li1)
- {
- if (li2->address > address && address >= li1->address)
- break;
-
- li2 = li1; /* always non-NULL */
- li1 = li1->prev_line;
- }
- table->lcl_head = li2;
- }
-
- /* Set member data of 'info'. */
- info->address = address;
- info->line = line;
- info->column = column;
- info->end_sequence = end_sequence;
+ if (!table->last_line
+ || new_line_sorts_after (info, table->last_line))
+ {
+ /* Normal case: add 'info' to the beginning of the list */
+ info->prev_line = table->last_line;
+ table->last_line = info;
- if (filename && filename[0])
+ /* lcl_head: initialize to head a *possible* sequence at the end. */
+ if (!table->lcl_head)
+ table->lcl_head = info;
+ }
+ else if (!new_line_sorts_after (info, table->lcl_head)
+ && (!table->lcl_head->prev_line
+ || new_line_sorts_after (info, table->lcl_head->prev_line)))
{
- info->filename = bfd_alloc (table->abfd, strlen (filename) + 1);
- if (info->filename)
- strcpy (info->filename, filename);
+ /* Abnormal but easy: lcl_head is the head of 'info'. */
+ info->prev_line = table->lcl_head->prev_line;
+ table->lcl_head->prev_line = info;
}
else
- info->filename = NULL;
+ {
+ /* Abnormal and hard: Neither 'last_line' nor 'lcl_head' are valid
+ heads for 'info'. Reset 'lcl_head'. */
+ struct line_info* li2 = table->last_line; /* always non-NULL */
+ struct line_info* li1 = li2->prev_line;
+
+ while (li1)
+ {
+ if (!new_line_sorts_after (info, li2)
+ && new_line_sorts_after (info, li1))
+ break;
+
+ li2 = li1; /* always non-NULL */
+ li1 = li1->prev_line;
+ }
+ table->lcl_head = li2;
+ info->prev_line = table->lcl_head->prev_line;
+ table->lcl_head->prev_line = info;
+ }
}
/* Extract a fully qualified filename from a line info table.
@@ -818,12 +861,14 @@ add_line_info (struct line_info_table *table,
static char *
concat_filename (struct line_info_table *table, unsigned int file)
{
- char* filename;
+ char *filename;
if (file - 1 >= table->num_files)
{
- (*_bfd_error_handler)
- (_("Dwarf Error: mangled line number section (bad file number)."));
+ /* FILE == 0 means unknown. */
+ if (file)
+ (*_bfd_error_handler)
+ (_("Dwarf Error: mangled line number section (bad file number)."));
return strdup ("<unknown>");
}
@@ -831,7 +876,7 @@ concat_filename (struct line_info_table *table, unsigned int file)
if (! IS_ABSOLUTE_PATH (filename))
{
- char* dirname = (table->files[file - 1].dir
+ char *dirname = (table->files[file - 1].dir
? table->dirs[table->files[file - 1].dir - 1]
: table->comp_dir);
@@ -853,13 +898,20 @@ concat_filename (struct line_info_table *table, unsigned int file)
}
static void
-arange_add (struct comp_unit *unit, bfd_vma low_pc, bfd_vma high_pc)
+arange_add (bfd *abfd, struct arange *first_arange, bfd_vma low_pc, bfd_vma high_pc)
{
struct arange *arange;
- /* First see if we can cheaply extend an existing range. */
- arange = &unit->arange;
+ /* If the first arange is empty, use it. */
+ if (first_arange->high == 0)
+ {
+ first_arange->low = low_pc;
+ first_arange->high = high_pc;
+ return;
+ }
+ /* Next see if we can cheaply extend an existing range. */
+ arange = first_arange;
do
{
if (low_pc == arange->high)
@@ -876,22 +928,13 @@ arange_add (struct comp_unit *unit, bfd_vma low_pc, bfd_vma high_pc)
}
while (arange);
- if (unit->arange.high == 0)
- {
- /* This is the first address range: store it in unit->arange. */
- unit->arange.next = 0;
- unit->arange.low = low_pc;
- unit->arange.high = high_pc;
- return;
- }
-
- /* Need to allocate a new arange and insert it into the arange list. */
- arange = bfd_zalloc (unit->abfd, sizeof (*arange));
+ /* Need to allocate a new arange and insert it into the arange list.
+ Order isn't significant, so just insert after the first arange. */
+ arange = bfd_zalloc (abfd, sizeof (*arange));
arange->low = low_pc;
arange->high = high_pc;
-
- arange->next = unit->arange.next;
- unit->arange.next = arange;
+ arange->next = first_arange->next;
+ first_arange->next = arange;
}
/* Decode the line number information for UNIT. */
@@ -901,8 +944,8 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
{
bfd *abfd = unit->abfd;
struct line_info_table* table;
- char *line_ptr;
- char *line_end;
+ bfd_byte *line_ptr;
+ bfd_byte *line_end;
struct line_head lh;
unsigned int i, bytes_read, offset_size;
char *cur_file, *cur_dir;
@@ -921,7 +964,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
return 0;
}
- stash->dwarf_line_size = msec->_raw_size;
+ stash->dwarf_line_size = msec->size;
stash->dwarf_line_buffer
= bfd_simple_get_relocated_section_contents (abfd, msec, NULL,
stash->syms);
@@ -1009,11 +1052,18 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
if ((table->num_dirs % DIR_ALLOC_CHUNK) == 0)
{
+ char **tmp;
+
amt = table->num_dirs + DIR_ALLOC_CHUNK;
amt *= sizeof (char *);
- table->dirs = bfd_realloc (table->dirs, amt);
- if (! table->dirs)
- return 0;
+
+ tmp = bfd_realloc (table->dirs, amt);
+ if (tmp == NULL)
+ {
+ free (table->dirs);
+ return NULL;
+ }
+ table->dirs = tmp;
}
table->dirs[table->num_dirs++] = cur_dir;
@@ -1028,11 +1078,19 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
if ((table->num_files % FILE_ALLOC_CHUNK) == 0)
{
+ struct fileinfo *tmp;
+
amt = table->num_files + FILE_ALLOC_CHUNK;
amt *= sizeof (struct fileinfo);
- table->files = bfd_realloc (table->files, amt);
- if (! table->files)
- return 0;
+
+ tmp = bfd_realloc (table->files, amt);
+ if (tmp == NULL)
+ {
+ free (table->files);
+ free (table->dirs);
+ return NULL;
+ }
+ table->files = tmp;
}
table->files[table->num_files].name = cur_file;
@@ -1066,7 +1124,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
order using DW_LNE_set_address (e.g. Intel C++ 6.0 compiler
for ia64-Linux). Thus, to determine the low and high
address, we must compare on every DW_LNS_copy, etc. */
- bfd_vma low_pc = 0;
+ bfd_vma low_pc = (bfd_vma) -1;
bfd_vma high_pc = 0;
/* Decode the table. */
@@ -1085,7 +1143,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
/* Append row to matrix using current values. */
add_line_info (table, address, filename, line, column, 0);
basic_block = 1;
- if (low_pc == 0 || address < low_pc)
+ if (address < low_pc)
low_pc = address;
if (address > high_pc)
high_pc = address;
@@ -1104,11 +1162,11 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
end_sequence = 1;
add_line_info (table, address, filename, line, column,
end_sequence);
- if (low_pc == 0 || address < low_pc)
+ if (address < low_pc)
low_pc = address;
if (address > high_pc)
high_pc = address;
- arange_add (unit, low_pc, high_pc);
+ arange_add (unit->abfd, &unit->arange, low_pc, high_pc);
break;
case DW_LNE_set_address:
address = read_address (unit, line_ptr);
@@ -1119,11 +1177,19 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
line_ptr += bytes_read;
if ((table->num_files % FILE_ALLOC_CHUNK) == 0)
{
+ struct fileinfo *tmp;
+
amt = table->num_files + FILE_ALLOC_CHUNK;
amt *= sizeof (struct fileinfo);
- table->files = bfd_realloc (table->files, amt);
- if (! table->files)
- return 0;
+ tmp = bfd_realloc (table->files, amt);
+ if (tmp == NULL)
+ {
+ free (table->files);
+ free (table->dirs);
+ free (filename);
+ return NULL;
+ }
+ table->files = tmp;
}
table->files[table->num_files].name = cur_file;
table->files[table->num_files].dir =
@@ -1140,13 +1206,16 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
default:
(*_bfd_error_handler) (_("Dwarf Error: mangled line number section."));
bfd_set_error (bfd_error_bad_value);
- return 0;
+ free (filename);
+ free (table->files);
+ free (table->dirs);
+ return NULL;
}
break;
case DW_LNS_copy:
add_line_info (table, address, filename, line, column, 0);
basic_block = 0;
- if (low_pc == 0 || address < low_pc)
+ if (address < low_pc)
low_pc = address;
if (address > high_pc)
high_pc = address;
@@ -1244,7 +1313,7 @@ lookup_address_in_line_info_table (struct line_info_table *table,
to return as good as results as possible for strange debugging
info. */
bfd_boolean addr_match = FALSE;
- if (each_line->address <= addr && addr <= next_line->address)
+ if (each_line->address <= addr && addr < next_line->address)
{
addr_match = TRUE;
@@ -1252,12 +1321,34 @@ lookup_address_in_line_info_table (struct line_info_table *table,
later function, return the first line of that function instead
of the last line of the earlier one. This check is for GCC
2.95, which emits the first line number for a function late. */
- if (function != NULL
- && each_line->address < function->low
- && next_line->address > function->low)
+
+ if (function != NULL)
{
- *filename_ptr = next_line->filename;
- *linenumber_ptr = next_line->line;
+ bfd_vma lowest_pc;
+ struct arange *arange;
+
+ /* Find the lowest address in the function's range list */
+ lowest_pc = function->arange.low;
+ for (arange = &function->arange;
+ arange;
+ arange = arange->next)
+ {
+ if (function->arange.low < lowest_pc)
+ lowest_pc = function->arange.low;
+ }
+ /* Check for spanning function and set outgoing line info */
+ if (addr >= lowest_pc
+ && each_line->address < lowest_pc
+ && next_line->address > lowest_pc)
+ {
+ *filename_ptr = next_line->filename;
+ *linenumber_ptr = next_line->line;
+ }
+ else
+ {
+ *filename_ptr = each_line->filename;
+ *linenumber_ptr = each_line->line;
+ }
}
else
{
@@ -1289,44 +1380,276 @@ lookup_address_in_line_info_table (struct line_info_table *table,
return FALSE;
}
+/* Read in the .debug_ranges section for future reference */
+
+static bfd_boolean
+read_debug_ranges (struct comp_unit *unit)
+{
+ struct dwarf2_debug *stash = unit->stash;
+ if (! stash->dwarf_ranges_buffer)
+ {
+ bfd *abfd = unit->abfd;
+ asection *msec;
+
+ msec = bfd_get_section_by_name (abfd, ".debug_ranges");
+ if (! msec)
+ {
+ (*_bfd_error_handler) (_("Dwarf Error: Can't find .debug_ranges section."));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ stash->dwarf_ranges_size = msec->size;
+ stash->dwarf_ranges_buffer
+ = bfd_simple_get_relocated_section_contents (abfd, msec, NULL,
+ stash->syms);
+ if (! stash->dwarf_ranges_buffer)
+ return FALSE;
+ }
+ return TRUE;
+}
+
/* Function table functions. */
-/* If ADDR is within TABLE, set FUNCTIONNAME_PTR, and return TRUE. */
+/* If ADDR is within TABLE, set FUNCTIONNAME_PTR, and return TRUE.
+ Note that we need to find the function that has the smallest
+ range that contains ADDR, to handle inlined functions without
+ depending upon them being ordered in TABLE by increasing range. */
static bfd_boolean
-lookup_address_in_function_table (struct funcinfo *table,
+lookup_address_in_function_table (struct comp_unit *unit,
bfd_vma addr,
struct funcinfo **function_ptr,
const char **functionname_ptr)
{
struct funcinfo* each_func;
+ struct funcinfo* best_fit = NULL;
+ struct arange *arange;
- for (each_func = table;
+ for (each_func = unit->function_table;
each_func;
each_func = each_func->prev_func)
{
- if (addr >= each_func->low && addr < each_func->high)
+ for (arange = &each_func->arange;
+ arange;
+ arange = arange->next)
{
- *functionname_ptr = each_func->name;
- *function_ptr = each_func;
- return TRUE;
+ if (addr >= arange->low && addr < arange->high)
+ {
+ if (!best_fit ||
+ ((arange->high - arange->low) < (best_fit->arange.high - best_fit->arange.low)))
+ best_fit = each_func;
+ }
}
}
- return FALSE;
+ if (best_fit)
+ {
+ *functionname_ptr = best_fit->name;
+ *function_ptr = best_fit;
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+/* If SYM at ADDR is within function table of UNIT, set FILENAME_PTR
+ and LINENUMBER_PTR, and return TRUE. */
+
+static bfd_boolean
+lookup_symbol_in_function_table (struct comp_unit *unit,
+ asymbol *sym,
+ bfd_vma addr,
+ const char **filename_ptr,
+ unsigned int *linenumber_ptr)
+{
+ struct funcinfo* each_func;
+ struct funcinfo* best_fit = NULL;
+ struct arange *arange;
+ const char *name = bfd_asymbol_name (sym);
+ asection *sec = bfd_get_section (sym);
+
+ for (each_func = unit->function_table;
+ each_func;
+ each_func = each_func->prev_func)
+ {
+ for (arange = &each_func->arange;
+ arange;
+ arange = arange->next)
+ {
+ if ((!each_func->sec || each_func->sec == sec)
+ && addr >= arange->low
+ && addr < arange->high
+ && each_func->name
+ && strcmp (name, each_func->name) == 0
+ && (!best_fit
+ || ((arange->high - arange->low)
+ < (best_fit->arange.high - best_fit->arange.low))))
+ best_fit = each_func;
+ }
+ }
+
+ if (best_fit)
+ {
+ best_fit->sec = sec;
+ *filename_ptr = best_fit->file;
+ *linenumber_ptr = best_fit->line;
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+/* Variable table functions. */
+
+/* If SYM is within variable table of UNIT, set FILENAME_PTR and
+ LINENUMBER_PTR, and return TRUE. */
+
+static bfd_boolean
+lookup_symbol_in_variable_table (struct comp_unit *unit,
+ asymbol *sym,
+ bfd_vma addr,
+ const char **filename_ptr,
+ unsigned int *linenumber_ptr)
+{
+ const char *name = bfd_asymbol_name (sym);
+ asection *sec = bfd_get_section (sym);
+ struct varinfo* each;
+
+ for (each = unit->variable_table; each; each = each->prev_var)
+ if (each->stack == 0
+ && each->file != NULL
+ && each->name != NULL
+ && each->addr == addr
+ && (!each->sec || each->sec == sec)
+ && strcmp (name, each->name) == 0)
+ break;
+
+ if (each)
+ {
+ each->sec = sec;
+ *filename_ptr = each->file;
+ *linenumber_ptr = each->line;
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+static char *
+find_abstract_instance_name (struct comp_unit *unit, bfd_uint64_t die_ref)
+{
+ bfd *abfd = unit->abfd;
+ bfd_byte *info_ptr;
+ unsigned int abbrev_number, bytes_read, i;
+ struct abbrev_info *abbrev;
+ struct attribute attr;
+ char *name = 0;
+
+ info_ptr = unit->info_ptr_unit + die_ref;
+ abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+
+ if (abbrev_number)
+ {
+ abbrev = lookup_abbrev (abbrev_number, unit->abbrevs);
+ if (! abbrev)
+ {
+ (*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %u."),
+ abbrev_number);
+ bfd_set_error (bfd_error_bad_value);
+ }
+ else
+ {
+ for (i = 0; i < abbrev->num_attrs; ++i)
+ {
+ info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr);
+ switch (attr.name)
+ {
+ case DW_AT_name:
+ /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */
+ if (name == NULL)
+ name = attr.u.str;
+ break;
+ case DW_AT_specification:
+ name = find_abstract_instance_name (unit, attr.u.val);
+ break;
+ case DW_AT_MIPS_linkage_name:
+ name = attr.u.str;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ return (name);
+}
+
+static void
+read_rangelist (struct comp_unit *unit, struct arange *arange, bfd_uint64_t offset)
+{
+ bfd_byte *ranges_ptr;
+ bfd_vma base_address = unit->base_address;
+
+ if (! unit->stash->dwarf_ranges_buffer)
+ {
+ if (! read_debug_ranges (unit))
+ return;
+ }
+ ranges_ptr = unit->stash->dwarf_ranges_buffer + offset;
+
+ for (;;)
+ {
+ bfd_vma low_pc;
+ bfd_vma high_pc;
+
+ if (unit->addr_size == 4)
+ {
+ low_pc = read_4_bytes (unit->abfd, ranges_ptr);
+ ranges_ptr += 4;
+ high_pc = read_4_bytes (unit->abfd, ranges_ptr);
+ ranges_ptr += 4;
+ }
+ else
+ {
+ low_pc = read_8_bytes (unit->abfd, ranges_ptr);
+ ranges_ptr += 8;
+ high_pc = read_8_bytes (unit->abfd, ranges_ptr);
+ ranges_ptr += 8;
+ }
+ if (low_pc == 0 && high_pc == 0)
+ break;
+ 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);
+ }
}
/* DWARF2 Compilation unit functions. */
/* Scan over each die in a comp. unit looking for functions to add
- to the function table. */
+ to the function table and variables to the variable table. */
static bfd_boolean
-scan_unit_for_functions (struct comp_unit *unit)
+scan_unit_for_symbols (struct comp_unit *unit)
{
bfd *abfd = unit->abfd;
- char *info_ptr = unit->first_child_die_ptr;
+ bfd_byte *info_ptr = unit->first_child_die_ptr;
int nesting_level = 1;
+ struct funcinfo **nested_funcs;
+ int nested_funcs_size;
+
+ /* Maintain a stack of in-scope functions and inlined functions, which we
+ can use to set the caller_func field. */
+ nested_funcs_size = 32;
+ nested_funcs = bfd_malloc (nested_funcs_size * sizeof (struct funcinfo *));
+ if (nested_funcs == NULL)
+ return FALSE;
+ nested_funcs[nesting_level] = 0;
while (nesting_level)
{
@@ -1334,7 +1657,9 @@ scan_unit_for_functions (struct comp_unit *unit)
struct abbrev_info *abbrev;
struct attribute attr;
struct funcinfo *func;
- char* name = 0;
+ struct varinfo *var;
+ bfd_vma low_pc = 0;
+ bfd_vma high_pc = 0;
abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
@@ -1351,18 +1676,46 @@ scan_unit_for_functions (struct comp_unit *unit)
(*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %u."),
abbrev_number);
bfd_set_error (bfd_error_bad_value);
+ free (nested_funcs);
return FALSE;
}
- if (abbrev->tag == DW_TAG_subprogram)
+ var = NULL;
+ if (abbrev->tag == DW_TAG_subprogram
+ || abbrev->tag == DW_TAG_entry_point
+ || abbrev->tag == DW_TAG_inlined_subroutine)
{
bfd_size_type amt = sizeof (struct funcinfo);
func = bfd_zalloc (abfd, amt);
+ func->tag = abbrev->tag;
func->prev_func = unit->function_table;
unit->function_table = func;
+
+ if (func->tag == DW_TAG_inlined_subroutine)
+ for (i = nesting_level - 1; i >= 1; i--)
+ if (nested_funcs[i])
+ {
+ func->caller_func = nested_funcs[i];
+ break;
+ }
+ nested_funcs[nesting_level] = func;
}
else
- func = NULL;
+ {
+ func = NULL;
+ if (abbrev->tag == DW_TAG_variable)
+ {
+ bfd_size_type amt = sizeof (struct varinfo);
+ var = bfd_zalloc (abfd, amt);
+ var->tag = abbrev->tag;
+ var->stack = 1;
+ var->prev_var = unit->variable_table;
+ unit->variable_table = var;
+ }
+
+ /* No inline function in scope at this nesting level. */
+ nested_funcs[nesting_level] = 0;
+ }
for (i = 0; i < abbrev->num_attrs; ++i)
{
@@ -1372,10 +1725,19 @@ scan_unit_for_functions (struct comp_unit *unit)
{
switch (attr.name)
{
- case DW_AT_name:
+ case DW_AT_call_file:
+ func->caller_file = concat_filename (unit->line_table, attr.u.val);
+ break;
- name = attr.u.str;
+ case DW_AT_call_line:
+ func->caller_line = attr.u.val;
+ break;
+
+ case DW_AT_abstract_origin:
+ func->name = find_abstract_instance_name (unit, attr.u.val);
+ break;
+ case DW_AT_name:
/* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */
if (func->name == NULL)
func->name = attr.u.str;
@@ -1386,23 +1748,79 @@ scan_unit_for_functions (struct comp_unit *unit)
break;
case DW_AT_low_pc:
- func->low = attr.u.val;
+ low_pc = attr.u.val;
break;
case DW_AT_high_pc:
- func->high = attr.u.val;
+ high_pc = attr.u.val;
+ break;
+
+ case DW_AT_ranges:
+ read_rangelist (unit, &func->arange, attr.u.val);
+ break;
+
+ case DW_AT_decl_file:
+ func->file = concat_filename (unit->line_table,
+ attr.u.val);
+ break;
+
+ case DW_AT_decl_line:
+ func->line = attr.u.val;
break;
default:
break;
}
}
- else
+ else if (var)
{
switch (attr.name)
{
case DW_AT_name:
- name = attr.u.str;
+ var->name = attr.u.str;
+ break;
+
+ case DW_AT_decl_file:
+ var->file = concat_filename (unit->line_table,
+ attr.u.val);
+ break;
+
+ case DW_AT_decl_line:
+ var->line = attr.u.val;
+ break;
+
+ case DW_AT_external:
+ if (attr.u.val != 0)
+ var->stack = 0;
+ break;
+
+ case DW_AT_location:
+ switch (attr.form)
+ {
+ case DW_FORM_block:
+ case DW_FORM_block1:
+ case DW_FORM_block2:
+ case DW_FORM_block4:
+ if (*attr.u.blk->data == DW_OP_addr)
+ {
+ var->stack = 0;
+
+ /* Verify that DW_OP_addr is the only opcode in the
+ location, in which case the block size will be 1
+ plus the address size. */
+ /* ??? For TLS variables, gcc can emit
+ DW_OP_addr <addr> DW_OP_GNU_push_tls_address
+ which we don't handle here yet. */
+ if (attr.u.blk->size == unit->addr_size + 1U)
+ var->addr = bfd_get (unit->addr_size * 8,
+ unit->abfd,
+ attr.u.blk->data + 1);
+ }
+ break;
+
+ default:
+ break;
+ }
break;
default:
@@ -1411,10 +1829,35 @@ scan_unit_for_functions (struct comp_unit *unit)
}
}
+ if (func && high_pc != 0)
+ {
+ arange_add (unit->abfd, &func->arange, low_pc, high_pc);
+ }
+
if (abbrev->has_children)
- nesting_level++;
+ {
+ nesting_level++;
+
+ if (nesting_level >= nested_funcs_size)
+ {
+ struct funcinfo **tmp;
+
+ nested_funcs_size *= 2;
+ tmp = bfd_realloc (nested_funcs,
+ (nested_funcs_size
+ * sizeof (struct funcinfo *)));
+ if (tmp == NULL)
+ {
+ free (nested_funcs);
+ return FALSE;
+ }
+ nested_funcs = tmp;
+ }
+ nested_funcs[nesting_level] = 0;
+ }
}
+ free (nested_funcs);
return TRUE;
}
@@ -1431,6 +1874,7 @@ static struct comp_unit *
parse_comp_unit (bfd *abfd,
struct dwarf2_debug *stash,
bfd_vma unit_length,
+ bfd_byte *info_ptr_unit,
unsigned int offset_size)
{
struct comp_unit* unit;
@@ -1441,9 +1885,11 @@ parse_comp_unit (bfd *abfd,
unsigned int abbrev_number, bytes_read, i;
struct abbrev_info *abbrev;
struct attribute attr;
- char *info_ptr = stash->info_ptr;
- char *end_ptr = info_ptr + unit_length;
+ bfd_byte *info_ptr = stash->info_ptr;
+ bfd_byte *end_ptr = info_ptr + unit_length;
bfd_size_type amt;
+ bfd_vma low_pc = 0;
+ bfd_vma high_pc = 0;
version = read_2_bytes (abfd, info_ptr);
info_ptr += 2;
@@ -1511,6 +1957,7 @@ parse_comp_unit (bfd *abfd,
unit->abbrevs = abbrevs;
unit->end_ptr = end_ptr;
unit->stash = stash;
+ unit->info_ptr_unit = info_ptr_unit;
for (i = 0; i < abbrev->num_attrs; ++i)
{
@@ -1530,16 +1977,24 @@ parse_comp_unit (bfd *abfd,
break;
case DW_AT_low_pc:
- unit->arange.low = attr.u.val;
+ low_pc = attr.u.val;
+ /* If the compilation unit DIE has a DW_AT_low_pc attribute,
+ this is the base address to use when reading location
+ lists or range lists. */
+ unit->base_address = low_pc;
break;
case DW_AT_high_pc:
- unit->arange.high = attr.u.val;
+ high_pc = attr.u.val;
+ break;
+
+ case DW_AT_ranges:
+ read_rangelist (unit, &unit->arange, attr.u.val);
break;
case DW_AT_comp_dir:
{
- char* comp_dir = attr.u.str;
+ char *comp_dir = attr.u.str;
if (comp_dir)
{
/* Irix 6.2 native cc prepends <machine>.: to the compilation
@@ -1557,12 +2012,20 @@ parse_comp_unit (bfd *abfd,
break;
}
}
+ if (high_pc != 0)
+ {
+ arange_add (unit->abfd, &unit->arange, low_pc, high_pc);
+ }
unit->first_child_die_ptr = info_ptr;
return unit;
}
-/* Return TRUE if UNIT contains the address given by ADDR. */
+/* Return TRUE if UNIT may contain the address given by ADDR. When
+ there are functions written entirely with inline asm statements, the
+ range info in the compilation unit header may not be correct. We
+ need to consult the line info table to see if a compilation unit
+ really contains the given address. */
static bfd_boolean
comp_unit_contains_address (struct comp_unit *unit, bfd_vma addr)
@@ -1624,7 +2087,7 @@ comp_unit_find_nearest_line (struct comp_unit *unit,
}
if (unit->first_child_die_ptr < unit->end_ptr
- && ! scan_unit_for_functions (unit))
+ && ! scan_unit_for_symbols (unit))
{
unit->error = 1;
return FALSE;
@@ -1632,14 +2095,69 @@ comp_unit_find_nearest_line (struct comp_unit *unit,
}
function = NULL;
- func_p = lookup_address_in_function_table (unit->function_table, addr,
+ func_p = lookup_address_in_function_table (unit, addr,
&function, functionname_ptr);
+ if (func_p && (function->tag == DW_TAG_inlined_subroutine))
+ stash->inliner_chain = function;
line_p = lookup_address_in_line_info_table (unit->line_table, addr,
function, filename_ptr,
linenumber_ptr);
return line_p || func_p;
}
+/* If UNIT contains SYM at ADDR, set the output parameters to the
+ values for the line containing SYM. The output parameters,
+ FILENAME_PTR, and LINENUMBER_PTR, are pointers to the objects to be
+ filled in.
+
+ Return TRUE if UNIT contains SYM, and no errors were encountered;
+ FALSE otherwise. */
+
+static bfd_boolean
+comp_unit_find_line (struct comp_unit *unit,
+ asymbol *sym,
+ bfd_vma addr,
+ const char **filename_ptr,
+ unsigned int *linenumber_ptr,
+ struct dwarf2_debug *stash)
+{
+ if (unit->error)
+ return FALSE;
+
+ if (! unit->line_table)
+ {
+ if (! unit->stmtlist)
+ {
+ unit->error = 1;
+ return FALSE;
+ }
+
+ unit->line_table = decode_line_info (unit, stash);
+
+ if (! unit->line_table)
+ {
+ unit->error = 1;
+ return FALSE;
+ }
+
+ if (unit->first_child_die_ptr < unit->end_ptr
+ && ! scan_unit_for_symbols (unit))
+ {
+ unit->error = 1;
+ return FALSE;
+ }
+ }
+
+ if (sym->flags & BSF_FUNCTION)
+ return lookup_symbol_in_function_table (unit, sym, addr,
+ filename_ptr,
+ linenumber_ptr);
+ else
+ return lookup_symbol_in_variable_table (unit, sym, addr,
+ filename_ptr,
+ linenumber_ptr);
+}
+
/* Locate a section in a BFD containing debugging info. The search starts
from the section after AFTER_SEC, or from the first section in the BFD if
AFTER_SEC is NULL. The search works by examining the names of the
@@ -1676,7 +2194,98 @@ find_debug_info (bfd *abfd, asection *after_sec)
return NULL;
}
-/* The DWARF2 version of find_nearest line. Return TRUE if the line
+/* Unset vmas for loadable sections in STASH. */
+
+static void
+unset_sections (struct dwarf2_debug *stash)
+{
+ unsigned int i;
+ struct loadable_section *p;
+
+ i = stash->loadable_section_count;
+ p = stash->loadable_sections;
+ for (; i > 0; i--, p++)
+ p->section->vma = 0;
+}
+
+/* Set unique vmas for loadable sections in ABFD and save vmas in
+ STASH for unset_sections. */
+
+static bfd_boolean
+place_sections (bfd *abfd, struct dwarf2_debug *stash)
+{
+ struct loadable_section *p;
+ unsigned int i;
+
+ if (stash->loadable_section_count != 0)
+ {
+ i = stash->loadable_section_count;
+ p = stash->loadable_sections;
+ for (; i > 0; i--, p++)
+ p->section->vma = p->adj_vma;
+ }
+ else
+ {
+ asection *sect;
+ bfd_vma last_vma = 0;
+ bfd_size_type amt;
+ struct loadable_section *p;
+
+ i = 0;
+ for (sect = abfd->sections; sect != NULL; sect = sect->next)
+ {
+ bfd_size_type sz;
+
+ if (sect->vma != 0 || (sect->flags & SEC_LOAD) == 0)
+ continue;
+
+ sz = sect->rawsize ? sect->rawsize : sect->size;
+ if (sz == 0)
+ continue;
+
+ i++;
+ }
+
+ amt = i * sizeof (struct loadable_section);
+ p = (struct loadable_section *) bfd_zalloc (abfd, amt);
+ if (! p)
+ return FALSE;
+
+ stash->loadable_sections = p;
+ stash->loadable_section_count = i;
+
+ for (sect = abfd->sections; sect != NULL; sect = sect->next)
+ {
+ bfd_size_type sz;
+
+ if (sect->vma != 0 || (sect->flags & SEC_LOAD) == 0)
+ continue;
+
+ sz = sect->rawsize ? sect->rawsize : sect->size;
+ if (sz == 0)
+ continue;
+
+ p->section = sect;
+ if (last_vma != 0)
+ {
+ /* Align the new address to the current section
+ alignment. */
+ last_vma = ((last_vma
+ + ~((bfd_vma) -1 << sect->alignment_power))
+ & ((bfd_vma) -1 << sect->alignment_power));
+ sect->vma = last_vma;
+ }
+ p->adj_vma = sect->vma;
+ last_vma += sect->vma + sz;
+
+ p++;
+ }
+ }
+
+ 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
@@ -1701,13 +2310,39 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
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 = *pinfo;
+ struct dwarf2_debug *stash;
/* What address are we looking for? */
- bfd_vma addr = offset + section->vma;
+ bfd_vma addr;
struct comp_unit* each;
+ bfd_vma found = FALSE;
+
+ 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 ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
+ {
+ if (! place_sections (abfd, stash))
+ return FALSE;
+ }
+
+ addr = offset;
+ if (section->output_section)
+ addr += section->output_section->vma + section->output_offset;
+ else
+ addr += section->vma;
*filename_ptr = NULL;
*functionname_ptr = NULL;
*linenumber_ptr = 0;
@@ -1719,15 +2354,226 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
addr_size = 4;
BFD_ASSERT (addr_size == 4 || addr_size == 8);
- if (! stash)
+ 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;
+
+ /* 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)
+ {
+ 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)
+ {
+ 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;
+ }
+ }
+ }
+ }
+
+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;
@@ -1736,7 +2582,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
/* No dwarf2 info. Note that at this point the stash
has been allocated, but contains zeros, this lets
future calls to this function fail quicker. */
- return FALSE;
+ 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
@@ -1744,11 +2590,11 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
In the second pass we read in the section's contents. The allows
us to avoid reallocing the data as we add sections to the stash. */
for (total_size = 0; msec; msec = find_debug_info (abfd, msec))
- total_size += msec->_raw_size;
+ total_size += msec->size;
stash->info_ptr = bfd_alloc (abfd, total_size);
if (stash->info_ptr == NULL)
- return FALSE;
+ goto done;
stash->info_ptr_end = stash->info_ptr;
@@ -1759,7 +2605,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
bfd_size_type size;
bfd_size_type start;
- size = msec->_raw_size;
+ size = msec->size;
if (size == 0)
continue;
@@ -1782,21 +2628,34 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
/* A null info_ptr indicates that there is no dwarf2 info
(or that an error occured while setting up the stash). */
if (! stash->info_ptr)
- return FALSE;
+ 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))
- return comp_unit_find_nearest_line (each, addr, filename_ptr,
- functionname_ptr, linenumber_ptr,
- stash);
+ 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;
+ }
+
+ /* 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);
/* Read each remaining comp. units checking each as they are read. */
while (stash->info_ptr < stash->info_ptr_end)
{
bfd_vma length;
- bfd_boolean found;
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
@@ -1829,11 +2688,12 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
if (length > 0)
{
- each = parse_comp_unit (abfd, stash, length, offset_size);
+ 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->_raw_size)
+ == stash->sec->size)
{
stash->sec = find_debug_info (abfd, stash->sec);
stash->sec_info_ptr = stash->info_ptr;
@@ -1849,28 +2709,90 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
unit->high == 0), we need to consult the line info
table to see if a compilation unit contains the given
address. */
- if (each->arange.high > 0)
- {
- if (comp_unit_contains_address (each, addr))
- return comp_unit_find_nearest_line (each, addr,
- filename_ptr,
- functionname_ptr,
- linenumber_ptr,
- stash);
- }
- else
- {
- found = comp_unit_find_nearest_line (each, addr,
- filename_ptr,
- functionname_ptr,
- linenumber_ptr,
- stash);
- if (found)
- return TRUE;
- }
+ 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 (found)
+ goto done;
}
}
}
- return FALSE;
+done:
+ if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
+ unset_sections (stash);
+
+ return found;
+}
+
+bfd_boolean
+_bfd_dwarf2_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *linenumber_ptr,
+ void **pinfo)
+{
+ struct dwarf2_debug *stash;
+
+ stash = *pinfo;
+ 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 (FALSE);
+}
+
+void
+_bfd_dwarf2_cleanup_debug_info (bfd *abfd)
+{
+ struct comp_unit *each;
+ struct dwarf2_debug *stash;
+
+ if (abfd == NULL || elf_tdata (abfd) == NULL)
+ return;
+
+ stash = elf_tdata (abfd)->dwarf2_find_line_info;
+
+ if (stash == NULL)
+ return;
+
+ for (each = stash->all_comp_units; each; each = each->next_unit)
+ {
+ struct abbrev_info **abbrevs = each->abbrevs;
+ size_t i;
+
+ for (i = 0; i < ABBREV_HASH_SIZE; i++)
+ {
+ struct abbrev_info *abbrev = abbrevs[i];
+
+ while (abbrev)
+ {
+ free (abbrev->attrs);
+ abbrev = abbrev->next;
+ }
+ }
+
+ if (each->line_table)
+ {
+ free (each->line_table->dirs);
+ free (each->line_table->files);
+ }
+ }
+
+ free (stash->dwarf_abbrev_buffer);
+ free (stash->dwarf_line_buffer);
+ free (stash->dwarf_ranges_buffer);
}
diff --git a/contrib/binutils/bfd/ecoff.c b/contrib/binutils/bfd/ecoff.c
index cfc5ae1b9fa2..75e1cc2a398d 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 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -43,79 +43,51 @@
#include "coff/ecoff.h"
#include "libcoff.h"
#include "libecoff.h"
-
-/* Prototypes for static functions. */
-
-static int ecoff_get_magic
- PARAMS ((bfd *));
-static long ecoff_sec_to_styp_flags
- PARAMS ((const char *, flagword));
-static bfd_boolean ecoff_slurp_symbolic_header
- PARAMS ((bfd *));
-static bfd_boolean ecoff_set_symbol_info
- PARAMS ((bfd *, SYMR *, asymbol *, int, int));
-static void ecoff_emit_aggregate
- PARAMS ((bfd *, FDR *, char *, RNDXR *, long, const char *));
-static char *ecoff_type_to_string
- PARAMS ((bfd *, FDR *, unsigned int));
-static bfd_boolean ecoff_slurp_reloc_table
- PARAMS ((bfd *, asection *, asymbol **));
-static int ecoff_sort_hdrs
- PARAMS ((const PTR, const PTR));
-static bfd_boolean ecoff_compute_section_file_positions
- PARAMS ((bfd *));
-static bfd_size_type ecoff_compute_reloc_file_positions
- PARAMS ((bfd *));
-static bfd_boolean ecoff_get_extr
- PARAMS ((asymbol *, EXTR *));
-static void ecoff_set_index
- PARAMS ((asymbol *, bfd_size_type));
-static unsigned int ecoff_armap_hash
- PARAMS ((const char *, unsigned int *, unsigned int, unsigned int));
+#include "libiberty.h"
+
+#define streq(a, b) (strcmp ((a), (b)) == 0)
+#define strneq(a, b, n) (strncmp ((a), (b), (n)) == 0)
+
/* This stuff is somewhat copied from coffcode.h. */
-
static asection bfd_debug_section =
{
- /* name, id, index, next, flags, user_set_vma, reloc_done, */
- "*DEBUG*", 0, 0, NULL, 0, 0, 0,
- /* linker_mark, linker_has_input, gc_mark, segment_mark, */
- 0, 0, 0, 0,
- /* sec_info_type, use_rela_p, has_tls_reloc, */
- 0, 0, 0,
- /* need_finalize_relax, has_gp_reloc, */
- 0, 0,
- /* flag13, flag14, flag15, flag16, flag20, flag24, */
- 0, 0, 0, 0, 0, 0,
- /* vma, lma, _cooked_size, _raw_size, */
- 0, 0, 0, 0,
+ /* name, id, index, next, prev, flags, user_set_vma, */
+ "*DEBUG*", 0, 0, NULL, NULL, 0, 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, NULL, 0,
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */
NULL, NULL, 0, 0, 0,
/* line_filepos, userdata, contents, lineno, lineno_count, */
0, NULL, NULL, NULL, 0,
- /* entsize, comdat, kept_section, moving_line_filepos, */
- 0, 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 *) NULL,
+ NULL,
/* symbol_ptr_ptr, */
- (struct bfd_symbol **) NULL,
- /* link_order_head, link_order_tail */
- NULL, NULL
+ NULL,
+ /* map_head, map_tail */
+ { NULL }, { NULL }
};
/* Create an ECOFF object. */
bfd_boolean
-_bfd_ecoff_mkobject (abfd)
- bfd *abfd;
+_bfd_ecoff_mkobject (bfd *abfd)
{
bfd_size_type amt = sizeof (ecoff_data_type);
- abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt);
+ abfd->tdata.ecoff_obj_data = bfd_zalloc (abfd, amt);
if (abfd->tdata.ecoff_obj_data == NULL)
return FALSE;
@@ -125,11 +97,8 @@ _bfd_ecoff_mkobject (abfd)
/* This is a hook called by coff_real_object_p to create any backend
specific information. */
-PTR
-_bfd_ecoff_mkobject_hook (abfd, filehdr, aouthdr)
- bfd *abfd;
- PTR filehdr;
- PTR aouthdr;
+void *
+_bfd_ecoff_mkobject_hook (bfd *abfd, void * filehdr, void * aouthdr)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
struct internal_aouthdr *internal_a = (struct internal_aouthdr *) aouthdr;
@@ -142,7 +111,7 @@ _bfd_ecoff_mkobject_hook (abfd, filehdr, aouthdr)
ecoff->gp_size = 8;
ecoff->sym_filepos = internal_f->f_symptr;
- if (internal_a != (struct internal_aouthdr *) NULL)
+ if (internal_a != NULL)
{
int i;
@@ -165,37 +134,48 @@ _bfd_ecoff_mkobject_hook (abfd, filehdr, aouthdr)
fprmask) and let the swapping routines ensure that only relevant
information is written out. */
- return (PTR) ecoff;
+ return (void *) ecoff;
}
/* Initialize a new section. */
bfd_boolean
-_bfd_ecoff_new_section_hook (abfd, section)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *section;
+_bfd_ecoff_new_section_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *section)
{
+ unsigned int i;
+ static struct
+ {
+ const char * name;
+ flagword flags;
+ }
+ section_flags [] =
+ {
+ { _TEXT, SEC_ALLOC | SEC_CODE | SEC_LOAD },
+ { _INIT, SEC_ALLOC | SEC_CODE | SEC_LOAD },
+ { _FINI, SEC_ALLOC | SEC_CODE | SEC_LOAD },
+ { _DATA, SEC_ALLOC | SEC_DATA | SEC_LOAD },
+ { _SDATA, SEC_ALLOC | SEC_DATA | SEC_LOAD },
+ { _RDATA, SEC_ALLOC | SEC_DATA | SEC_LOAD | SEC_READONLY},
+ { _LIT8, SEC_ALLOC | SEC_DATA | SEC_LOAD | SEC_READONLY},
+ { _LIT4, SEC_ALLOC | SEC_DATA | SEC_LOAD | SEC_READONLY},
+ { _RCONST, SEC_ALLOC | SEC_DATA | SEC_LOAD | SEC_READONLY},
+ { _PDATA, SEC_ALLOC | SEC_DATA | SEC_LOAD | SEC_READONLY},
+ { _BSS, SEC_ALLOC},
+ { _SBSS, SEC_ALLOC},
+ /* An Irix 4 shared libary. */
+ { _LIB, SEC_COFF_SHARED_LIBRARY}
+ };
+
section->alignment_power = 4;
- if (strcmp (section->name, _TEXT) == 0
- || strcmp (section->name, _INIT) == 0
- || strcmp (section->name, _FINI) == 0)
- section->flags |= SEC_CODE | SEC_LOAD | SEC_ALLOC;
- else if (strcmp (section->name, _DATA) == 0
- || strcmp (section->name, _SDATA) == 0)
- section->flags |= SEC_DATA | SEC_LOAD | SEC_ALLOC;
- else if (strcmp (section->name, _RDATA) == 0
- || strcmp (section->name, _LIT8) == 0
- || strcmp (section->name, _LIT4) == 0
- || strcmp (section->name, _RCONST) == 0
- || strcmp (section->name, _PDATA) == 0)
- section->flags |= SEC_DATA | SEC_LOAD | SEC_ALLOC | SEC_READONLY;
- else if (strcmp (section->name, _BSS) == 0
- || strcmp (section->name, _SBSS) == 0)
- section->flags |= SEC_ALLOC;
- else if (strcmp (section->name, _LIB) == 0)
- /* An Irix 4 shared libary. */
- section->flags |= SEC_COFF_SHARED_LIBRARY;
+ for (i = 0; i < ARRAY_SIZE (section_flags); i++)
+ if (streq (section->name, section_flags[i].name))
+ {
+ section->flags |= section_flags[i].flags;
+ break;
+ }
+
/* Probably any other section name is SEC_NEVER_LOAD, but I'm
uncertain about .init on some systems and I don't know how shared
@@ -210,11 +190,9 @@ _bfd_ecoff_new_section_hook (abfd, section)
for each target, but there aren't all that many ECOFF targets. */
bfd_boolean
-_bfd_ecoff_set_arch_mach_hook (abfd, filehdr)
- bfd *abfd;
- PTR filehdr;
+_bfd_ecoff_set_arch_mach_hook (bfd *abfd, void * filehdr)
{
- struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+ struct internal_filehdr *internal_f = filehdr;
enum bfd_architecture arch;
unsigned long mach;
@@ -259,8 +237,7 @@ _bfd_ecoff_set_arch_mach_hook (abfd, filehdr)
This is the inverse of _bfd_ecoff_set_arch_mach_hook, above. */
static int
-ecoff_get_magic (abfd)
- bfd *abfd;
+ecoff_get_magic (bfd *abfd)
{
int big, little;
@@ -301,75 +278,67 @@ ecoff_get_magic (abfd)
/* Get the section s_flags to use for a section. */
static long
-ecoff_sec_to_styp_flags (name, flags)
- const char *name;
- flagword flags;
+ecoff_sec_to_styp_flags (const char *name, flagword flags)
{
- long styp;
-
- styp = 0;
-
- if (strcmp (name, _TEXT) == 0)
- styp = STYP_TEXT;
- else if (strcmp (name, _DATA) == 0)
- styp = STYP_DATA;
- else if (strcmp (name, _SDATA) == 0)
- styp = STYP_SDATA;
- else if (strcmp (name, _RDATA) == 0)
- styp = STYP_RDATA;
- else if (strcmp (name, _LITA) == 0)
- styp = STYP_LITA;
- else if (strcmp (name, _LIT8) == 0)
- styp = STYP_LIT8;
- else if (strcmp (name, _LIT4) == 0)
- styp = STYP_LIT4;
- else if (strcmp (name, _BSS) == 0)
- styp = STYP_BSS;
- else if (strcmp (name, _SBSS) == 0)
- styp = STYP_SBSS;
- else if (strcmp (name, _INIT) == 0)
- styp = STYP_ECOFF_INIT;
- else if (strcmp (name, _FINI) == 0)
- styp = STYP_ECOFF_FINI;
- else if (strcmp (name, _PDATA) == 0)
- styp = STYP_PDATA;
- else if (strcmp (name, _XDATA) == 0)
- styp = STYP_XDATA;
- else if (strcmp (name, _LIB) == 0)
- styp = STYP_ECOFF_LIB;
- else if (strcmp (name, _GOT) == 0)
- styp = STYP_GOT;
- else if (strcmp (name, _HASH) == 0)
- styp = STYP_HASH;
- else if (strcmp (name, _DYNAMIC) == 0)
- styp = STYP_DYNAMIC;
- else if (strcmp (name, _LIBLIST) == 0)
- styp = STYP_LIBLIST;
- else if (strcmp (name, _RELDYN) == 0)
- styp = STYP_RELDYN;
- else if (strcmp (name, _CONFLIC) == 0)
- styp = STYP_CONFLIC;
- else if (strcmp (name, _DYNSTR) == 0)
- styp = STYP_DYNSTR;
- else if (strcmp (name, _DYNSYM) == 0)
- styp = STYP_DYNSYM;
- else if (strcmp (name, _COMMENT) == 0)
+ unsigned int i;
+ static struct
+ {
+ const char * name;
+ long flags;
+ }
+ styp_flags [] =
+ {
+ { _TEXT, STYP_TEXT },
+ { _DATA, STYP_DATA },
+ { _SDATA, STYP_SDATA },
+ { _RDATA, STYP_RDATA },
+ { _LITA, STYP_LITA },
+ { _LIT8, STYP_LIT8 },
+ { _LIT4, STYP_LIT4 },
+ { _BSS, STYP_BSS },
+ { _SBSS, STYP_SBSS },
+ { _INIT, STYP_ECOFF_INIT },
+ { _FINI, STYP_ECOFF_FINI },
+ { _PDATA, STYP_PDATA },
+ { _XDATA, STYP_XDATA },
+ { _LIB, STYP_ECOFF_LIB },
+ { _GOT, STYP_GOT },
+ { _HASH, STYP_HASH },
+ { _DYNAMIC, STYP_DYNAMIC },
+ { _LIBLIST, STYP_LIBLIST },
+ { _RELDYN, STYP_RELDYN },
+ { _CONFLIC, STYP_CONFLIC },
+ { _DYNSTR, STYP_DYNSTR },
+ { _DYNSYM, STYP_DYNSYM },
+ { _RCONST, STYP_RCONST }
+ };
+ long styp = 0;
+
+ for (i = 0; i < ARRAY_SIZE (styp_flags); i++)
+ if (streq (name, styp_flags[i].name))
+ {
+ styp = styp_flags[i].flags;
+ break;
+ }
+
+ if (styp == 0)
{
- styp = STYP_COMMENT;
- flags &=~ SEC_NEVER_LOAD;
+ if (streq (name, _COMMENT))
+ {
+ styp = STYP_COMMENT;
+ flags &=~ SEC_NEVER_LOAD;
+ }
+ else if (flags & SEC_CODE)
+ styp = STYP_TEXT;
+ else if (flags & SEC_DATA)
+ styp = STYP_DATA;
+ else if (flags & SEC_READONLY)
+ styp = STYP_RDATA;
+ else if (flags & SEC_LOAD)
+ styp = STYP_REG;
+ else
+ styp = STYP_BSS;
}
- else if (strcmp (name, _RCONST) == 0)
- styp = STYP_RCONST;
- else if (flags & SEC_CODE)
- styp = STYP_TEXT;
- else if (flags & SEC_DATA)
- styp = STYP_DATA;
- else if (flags & SEC_READONLY)
- styp = STYP_RDATA;
- else if (flags & SEC_LOAD)
- styp = STYP_REG;
- else
- styp = STYP_BSS;
if (flags & SEC_NEVER_LOAD)
styp |= STYP_NOLOAD;
@@ -380,14 +349,13 @@ ecoff_sec_to_styp_flags (name, flags)
/* Get the BFD flags to use for a section. */
bfd_boolean
-_bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR hdr;
- const char *name ATTRIBUTE_UNUSED;
- asection *section ATTRIBUTE_UNUSED;
- flagword * flags_ptr;
+_bfd_ecoff_styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED,
+ void * hdr,
+ const char *name ATTRIBUTE_UNUSED,
+ asection *section ATTRIBUTE_UNUSED,
+ flagword * flags_ptr)
{
- struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
+ struct internal_scnhdr *internal_s = hdr;
long styp_flags = internal_s->s_flags;
flagword sec_flags = 0;
@@ -450,12 +418,11 @@ _bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
/* Read in the symbolic header for an ECOFF object file. */
static bfd_boolean
-ecoff_slurp_symbolic_header (abfd)
- bfd *abfd;
+ecoff_slurp_symbolic_header (bfd *abfd)
{
const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
bfd_size_type external_hdr_size;
- PTR raw = NULL;
+ void * raw = NULL;
HDRR *internal_symhdr;
/* See if we've already read it in. */
@@ -482,7 +449,7 @@ ecoff_slurp_symbolic_header (abfd)
}
/* Read the symbolic information header. */
- raw = (PTR) bfd_malloc (external_hdr_size);
+ raw = bfd_malloc (external_hdr_size);
if (raw == NULL)
goto error_return;
@@ -516,16 +483,15 @@ ecoff_slurp_symbolic_header (abfd)
point in the backend structure. */
bfd_boolean
-_bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
- bfd *abfd;
- asection *ignore ATTRIBUTE_UNUSED;
- struct ecoff_debug_info *debug;
+_bfd_ecoff_slurp_symbolic_info (bfd *abfd,
+ asection *ignore ATTRIBUTE_UNUSED,
+ struct ecoff_debug_info *debug)
{
const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
HDRR *internal_symhdr;
bfd_size_type raw_base;
bfd_size_type raw_size;
- PTR raw;
+ void * raw;
bfd_size_type external_fdr_size;
char *fraw_src;
char *fraw_end;
@@ -539,7 +505,7 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
/* Check whether we've already gotten it, and whether there's any to
get. */
- if (ecoff_data (abfd)->raw_syments != (PTR) NULL)
+ if (ecoff_data (abfd)->raw_syments != NULL)
return TRUE;
if (ecoff_data (abfd)->sym_filepos == 0)
{
@@ -573,7 +539,7 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
UPDATE_RAW_END (cbPdOffset, ipdMax, backend->debug_swap.external_pdr_size);
UPDATE_RAW_END (cbSymOffset, isymMax, backend->debug_swap.external_sym_size);
/* eraxxon@alumni.rice.edu: ioptMax refers to the size of the
- optimization symtab, not the number of entries */
+ optimization symtab, not the number of entries. */
UPDATE_RAW_END (cbOptOffset, ioptMax, sizeof (char));
UPDATE_RAW_END (cbAuxOffset, iauxMax, sizeof (union aux_ext));
UPDATE_RAW_END (cbSsOffset, issMax, sizeof (char));
@@ -590,7 +556,7 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
ecoff_data (abfd)->sym_filepos = 0;
return TRUE;
}
- raw = (PTR) bfd_alloc (abfd, raw_size);
+ raw = bfd_alloc (abfd, raw_size);
if (raw == NULL)
return FALSE;
@@ -606,25 +572,25 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
ecoff_data (abfd)->raw_syments = raw;
/* Get pointers for the numeric offsets in the HDRR structure. */
-#define FIX(off1, off2, type) \
- if (internal_symhdr->off1 == 0) \
- debug->off2 = (type) NULL; \
- else \
- debug->off2 = (type) ((char *) raw \
- + (internal_symhdr->off1 \
+#define FIX(off1, off2, type) \
+ if (internal_symhdr->off1 == 0) \
+ debug->off2 = NULL; \
+ else \
+ debug->off2 = (type) ((char *) raw \
+ + (internal_symhdr->off1 \
- raw_base))
FIX (cbLineOffset, line, unsigned char *);
- FIX (cbDnOffset, external_dnr, PTR);
- FIX (cbPdOffset, external_pdr, PTR);
- FIX (cbSymOffset, external_sym, PTR);
- FIX (cbOptOffset, external_opt, PTR);
+ FIX (cbDnOffset, external_dnr, void *);
+ FIX (cbPdOffset, external_pdr, void *);
+ FIX (cbSymOffset, external_sym, void *);
+ FIX (cbOptOffset, external_opt, void *);
FIX (cbAuxOffset, external_aux, union aux_ext *);
FIX (cbSsOffset, ss, char *);
FIX (cbSsExtOffset, ssext, char *);
- FIX (cbFdOffset, external_fdr, PTR);
- FIX (cbRfdOffset, external_rfd, PTR);
- FIX (cbExtOffset, external_ext, PTR);
+ FIX (cbFdOffset, external_fdr, void *);
+ FIX (cbRfdOffset, external_rfd, void *);
+ FIX (cbExtOffset, external_ext, void *);
#undef FIX
/* I don't want to always swap all the data, because it will just
@@ -637,7 +603,7 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
the symbols, so we swap them here. */
amt = internal_symhdr->ifdMax;
amt *= sizeof (struct fdr);
- debug->fdr = (struct fdr *) bfd_alloc (abfd, amt);
+ debug->fdr = bfd_alloc (abfd, amt);
if (debug->fdr == NULL)
return FALSE;
external_fdr_size = backend->debug_swap.external_fdr_size;
@@ -645,7 +611,7 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
fraw_src = (char *) debug->external_fdr;
fraw_end = fraw_src + internal_symhdr->ifdMax * external_fdr_size;
for (; fraw_src < fraw_end; fraw_src += external_fdr_size, fdr_ptr++)
- (*backend->debug_swap.swap_fdr_in) (abfd, (PTR) fraw_src, fdr_ptr);
+ (*backend->debug_swap.swap_fdr_in) (abfd, (void *) fraw_src, fdr_ptr);
return TRUE;
}
@@ -665,17 +631,16 @@ static asymbol *ecoff_scom_symbol_ptr;
/* Create an empty symbol. */
asymbol *
-_bfd_ecoff_make_empty_symbol (abfd)
- bfd *abfd;
+_bfd_ecoff_make_empty_symbol (bfd *abfd)
{
ecoff_symbol_type *new;
bfd_size_type amt = sizeof (ecoff_symbol_type);
- new = (ecoff_symbol_type *) bfd_zalloc (abfd, amt);
- if (new == (ecoff_symbol_type *) NULL)
- return (asymbol *) NULL;
- new->symbol.section = (asection *) NULL;
- new->fdr = (FDR *) NULL;
+ new = bfd_zalloc (abfd, amt);
+ if (new == NULL)
+ return NULL;
+ new->symbol.section = NULL;
+ new->fdr = NULL;
new->local = FALSE;
new->native = NULL;
new->symbol.the_bfd = abfd;
@@ -685,12 +650,11 @@ _bfd_ecoff_make_empty_symbol (abfd)
/* Set the BFD flags and section for an ECOFF symbol. */
static bfd_boolean
-ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
- bfd *abfd;
- SYMR *ecoff_sym;
- asymbol *asym;
- int ext;
- int weak;
+ecoff_set_symbol_info (bfd *abfd,
+ SYMR *ecoff_sym,
+ asymbol *asym,
+ int ext,
+ int weak)
{
asym->the_bfd = abfd;
asym->value = ecoff_sym->value;
@@ -750,15 +714,15 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
asym->flags = BSF_LOCAL;
break;
case scText:
- asym->section = bfd_make_section_old_way (abfd, ".text");
+ asym->section = bfd_make_section_old_way (abfd, _TEXT);
asym->value -= asym->section->vma;
break;
case scData:
- asym->section = bfd_make_section_old_way (abfd, ".data");
+ asym->section = bfd_make_section_old_way (abfd, _DATA);
asym->value -= asym->section->vma;
break;
case scBss:
- asym->section = bfd_make_section_old_way (abfd, ".bss");
+ asym->section = bfd_make_section_old_way (abfd, _BSS);
asym->value -= asym->section->vma;
break;
case scRegister:
@@ -864,77 +828,8 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
case N_SETT:
case N_SETD:
case N_SETB:
- {
- /* This code is no longer needed. It used to be used to
- make the linker handle set symbols, but they are now
- handled in the add_symbols routine instead. */
-#if 0
- const char *name;
- asection *section;
- arelent_chain *reloc_chain;
- unsigned int bitsize;
- bfd_size_type amt;
-
- /* Get a section with the same name as the symbol (usually
- __CTOR_LIST__ or __DTOR_LIST__). FIXME: gcc uses the
- name ___CTOR_LIST (three underscores). We need
- __CTOR_LIST (two underscores), since ECOFF doesn't use
- a leading underscore. This should be handled by gcc,
- but instead we do it here. Actually, this should all
- be done differently anyhow. */
- name = bfd_asymbol_name (asym);
- if (name[0] == '_' && name[1] == '_' && name[2] == '_')
- {
- ++name;
- asym->name = name;
- }
- section = bfd_get_section_by_name (abfd, name);
- if (section == (asection *) NULL)
- {
- char *copy;
-
- amt = strlen (name) + 1;
- copy = (char *) bfd_alloc (abfd, amt);
- if (!copy)
- return FALSE;
- strcpy (copy, name);
- section = bfd_make_section (abfd, copy);
- }
-
- /* Build a reloc pointing to this constructor. */
- amt = sizeof (arelent_chain);
- reloc_chain = (arelent_chain *) bfd_alloc (abfd, amt);
- if (!reloc_chain)
- return FALSE;
- reloc_chain->relent.sym_ptr_ptr =
- bfd_get_section (asym)->symbol_ptr_ptr;
- reloc_chain->relent.address = section->_raw_size;
- reloc_chain->relent.addend = asym->value;
- reloc_chain->relent.howto =
- ecoff_backend (abfd)->constructor_reloc;
-
- /* Set up the constructor section to hold the reloc. */
- section->flags = SEC_CONSTRUCTOR;
- ++section->reloc_count;
-
- /* Constructor sections must be rounded to a boundary
- based on the bitsize. These are not real sections--
- they are handled specially by the linker--so the ECOFF
- 16 byte alignment restriction does not apply. */
- bitsize = ecoff_backend (abfd)->constructor_bitsize;
- section->alignment_power = 1;
- while ((1 << section->alignment_power) < bitsize / 8)
- ++section->alignment_power;
-
- reloc_chain->next = section->constructor_chain;
- section->constructor_chain = reloc_chain;
- section->_raw_size += bitsize / 8;
-
-#endif /* 0 */
-
- /* Mark the symbol as a constructor. */
- asym->flags |= BSF_CONSTRUCTOR;
- }
+ /* Mark the symbol as a constructor. */
+ asym->flags |= BSF_CONSTRUCTOR;
break;
}
}
@@ -944,17 +839,16 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
/* Read an ECOFF symbol table. */
bfd_boolean
-_bfd_ecoff_slurp_symbol_table (abfd)
- bfd *abfd;
+_bfd_ecoff_slurp_symbol_table (bfd *abfd)
{
const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
const bfd_size_type external_ext_size
= backend->debug_swap.external_ext_size;
const bfd_size_type external_sym_size
= backend->debug_swap.external_sym_size;
- void (* const swap_ext_in) PARAMS ((bfd *, PTR, EXTR *))
+ void (* const swap_ext_in) (bfd *, void *, EXTR *)
= backend->debug_swap.swap_ext_in;
- void (* const swap_sym_in) PARAMS ((bfd *, PTR, SYMR *))
+ void (* const swap_sym_in) (bfd *, void *, SYMR *)
= backend->debug_swap.swap_sym_in;
bfd_size_type internal_size;
ecoff_symbol_type *internal;
@@ -969,7 +863,7 @@ _bfd_ecoff_slurp_symbol_table (abfd)
return TRUE;
/* Get the symbolic information. */
- if (! _bfd_ecoff_slurp_symbolic_info (abfd, (asection *) NULL,
+ if (! _bfd_ecoff_slurp_symbolic_info (abfd, NULL,
&ecoff_data (abfd)->debug_info))
return FALSE;
if (bfd_get_symcount (abfd) == 0)
@@ -977,7 +871,7 @@ _bfd_ecoff_slurp_symbol_table (abfd)
internal_size = bfd_get_symcount (abfd);
internal_size *= sizeof (ecoff_symbol_type);
- internal = (ecoff_symbol_type *) bfd_alloc (abfd, internal_size);
+ internal = bfd_alloc (abfd, internal_size);
if (internal == NULL)
return FALSE;
@@ -990,7 +884,7 @@ _bfd_ecoff_slurp_symbol_table (abfd)
{
EXTR internal_esym;
- (*swap_ext_in) (abfd, (PTR) eraw_src, &internal_esym);
+ (*swap_ext_in) (abfd, (void *) eraw_src, &internal_esym);
internal_ptr->symbol.name = (ecoff_data (abfd)->debug_info.ssext
+ internal_esym.asym.iss);
if (!ecoff_set_symbol_info (abfd, &internal_esym.asym,
@@ -1004,7 +898,7 @@ _bfd_ecoff_slurp_symbol_table (abfd)
else
internal_ptr->fdr = NULL;
internal_ptr->local = FALSE;
- internal_ptr->native = (PTR) eraw_src;
+ internal_ptr->native = (void *) eraw_src;
}
/* The local symbols must be accessed via the fdr's, because the
@@ -1025,7 +919,7 @@ _bfd_ecoff_slurp_symbol_table (abfd)
{
SYMR internal_sym;
- (*swap_sym_in) (abfd, (PTR) lraw_src, &internal_sym);
+ (*swap_sym_in) (abfd, (void *) lraw_src, &internal_sym);
internal_ptr->symbol.name = (ecoff_data (abfd)->debug_info.ss
+ fdr_ptr->issBase
+ internal_sym.iss);
@@ -1034,7 +928,7 @@ _bfd_ecoff_slurp_symbol_table (abfd)
return FALSE;
internal_ptr->fdr = fdr_ptr;
internal_ptr->local = TRUE;
- internal_ptr->native = (PTR) lraw_src;
+ internal_ptr->native = (void *) lraw_src;
}
}
@@ -1046,10 +940,9 @@ _bfd_ecoff_slurp_symbol_table (abfd)
/* Return the amount of space needed for the canonical symbols. */
long
-_bfd_ecoff_get_symtab_upper_bound (abfd)
- bfd *abfd;
+_bfd_ecoff_get_symtab_upper_bound (bfd *abfd)
{
- if (! _bfd_ecoff_slurp_symbolic_info (abfd, (asection *) NULL,
+ if (! _bfd_ecoff_slurp_symbolic_info (abfd, NULL,
&ecoff_data (abfd)->debug_info))
return -1;
@@ -1062,9 +955,7 @@ _bfd_ecoff_get_symtab_upper_bound (abfd)
/* Get the canonical symbols. */
long
-_bfd_ecoff_canonicalize_symtab (abfd, alocation)
- bfd *abfd;
- asymbol **alocation;
+_bfd_ecoff_canonicalize_symtab (bfd *abfd, asymbol **alocation)
{
unsigned int counter = 0;
ecoff_symbol_type *symbase;
@@ -1081,7 +972,7 @@ _bfd_ecoff_canonicalize_symtab (abfd, alocation)
*(location++) = symbase++;
counter++;
}
- *location++ = (ecoff_symbol_type *) NULL;
+ *location++ = NULL;
return bfd_get_symcount (abfd);
}
@@ -1092,13 +983,12 @@ _bfd_ecoff_canonicalize_symtab (abfd, alocation)
/* Write aggregate information to a string. */
static void
-ecoff_emit_aggregate (abfd, fdr, string, rndx, isym, which)
- bfd *abfd;
- FDR *fdr;
- char *string;
- RNDXR *rndx;
- long isym;
- const char *which;
+ecoff_emit_aggregate (bfd *abfd,
+ FDR *fdr,
+ char *string,
+ RNDXR *rndx,
+ long isym,
+ const char *which)
{
const struct ecoff_debug_swap * const debug_swap =
&ecoff_backend (abfd)->debug_swap;
@@ -1155,15 +1045,13 @@ ecoff_emit_aggregate (abfd, fdr, string, rndx, isym, which)
/* Convert the type information to string format. */
static char *
-ecoff_type_to_string (abfd, fdr, indx)
- bfd *abfd;
- FDR *fdr;
- unsigned int indx;
+ecoff_type_to_string (bfd *abfd, FDR *fdr, unsigned int indx)
{
union aux_ext *aux_ptr;
int bigendian;
AUXU u;
- struct qual {
+ struct qual
+ {
unsigned int type;
int low_bound;
int high_bound;
@@ -1452,10 +1340,9 @@ ecoff_type_to_string (abfd, fdr, indx)
/* Return information about ECOFF symbol SYMBOL in RET. */
void
-_bfd_ecoff_get_symbol_info (abfd, symbol, ret)
- bfd *abfd ATTRIBUTE_UNUSED;
- asymbol *symbol;
- symbol_info *ret;
+_bfd_ecoff_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED,
+ asymbol *symbol,
+ symbol_info *ret)
{
bfd_symbol_info (symbol, ret);
}
@@ -1463,9 +1350,8 @@ _bfd_ecoff_get_symbol_info (abfd, symbol, ret)
/* Return whether this is a local label. */
bfd_boolean
-_bfd_ecoff_bfd_is_local_label_name (abfd, name)
- bfd *abfd ATTRIBUTE_UNUSED;
- const char *name;
+_bfd_ecoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *name)
{
return name[0] == '$';
}
@@ -1473,11 +1359,10 @@ _bfd_ecoff_bfd_is_local_label_name (abfd, name)
/* Print information about an ECOFF symbol. */
void
-_bfd_ecoff_print_symbol (abfd, filep, symbol, how)
- bfd *abfd;
- PTR filep;
- asymbol *symbol;
- bfd_print_symbol_type how;
+_bfd_ecoff_print_symbol (bfd *abfd,
+ void * filep,
+ asymbol *symbol,
+ bfd_print_symbol_type how)
{
const struct ecoff_debug_swap * const debug_swap
= &ecoff_backend (abfd)->debug_swap;
@@ -1662,10 +1547,9 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how)
/* Read in the relocs for a section. */
static bfd_boolean
-ecoff_slurp_reloc_table (abfd, section, symbols)
- bfd *abfd;
- asection *section;
- asymbol **symbols;
+ecoff_slurp_reloc_table (bfd *abfd,
+ asection *section,
+ asymbol **symbols)
{
const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
arelent *internal_relocs;
@@ -1675,7 +1559,7 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
arelent *rptr;
unsigned int i;
- if (section->relocation != (arelent *) NULL
+ if (section->relocation != NULL
|| section->reloc_count == 0
|| (section->flags & SEC_CONSTRUCTOR) != 0)
return TRUE;
@@ -1685,13 +1569,12 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
amt = section->reloc_count;
amt *= sizeof (arelent);
- internal_relocs = (arelent *) bfd_alloc (abfd, amt);
+ internal_relocs = bfd_alloc (abfd, amt);
external_reloc_size = backend->external_reloc_size;
amt = external_reloc_size * section->reloc_count;
- external_relocs = (char *) bfd_alloc (abfd, amt);
- if (internal_relocs == (arelent *) NULL
- || external_relocs == (char *) NULL)
+ external_relocs = bfd_alloc (abfd, amt);
+ if (internal_relocs == NULL || external_relocs == NULL)
return FALSE;
if (bfd_seek (abfd, section->rel_filepos, SEEK_SET) != 0)
return FALSE;
@@ -1730,25 +1613,25 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
/* r_symndx is a section key. */
switch (intern.r_symndx)
{
- case RELOC_SECTION_TEXT: sec_name = ".text"; break;
- case RELOC_SECTION_RDATA: sec_name = ".rdata"; break;
- case RELOC_SECTION_DATA: sec_name = ".data"; break;
- case RELOC_SECTION_SDATA: sec_name = ".sdata"; break;
- case RELOC_SECTION_SBSS: sec_name = ".sbss"; break;
- case RELOC_SECTION_BSS: sec_name = ".bss"; break;
- case RELOC_SECTION_INIT: sec_name = ".init"; break;
- case RELOC_SECTION_LIT8: sec_name = ".lit8"; break;
- case RELOC_SECTION_LIT4: sec_name = ".lit4"; break;
- case RELOC_SECTION_XDATA: sec_name = ".xdata"; break;
- case RELOC_SECTION_PDATA: sec_name = ".pdata"; break;
- case RELOC_SECTION_FINI: sec_name = ".fini"; break;
- case RELOC_SECTION_LITA: sec_name = ".lita"; break;
- case RELOC_SECTION_RCONST: sec_name = ".rconst"; break;
+ case RELOC_SECTION_TEXT: sec_name = _TEXT; break;
+ case RELOC_SECTION_RDATA: sec_name = _RDATA; break;
+ case RELOC_SECTION_DATA: sec_name = _DATA; break;
+ case RELOC_SECTION_SDATA: sec_name = _SDATA; break;
+ case RELOC_SECTION_SBSS: sec_name = _SBSS; break;
+ case RELOC_SECTION_BSS: sec_name = _BSS; break;
+ case RELOC_SECTION_INIT: sec_name = _INIT; break;
+ case RELOC_SECTION_LIT8: sec_name = _LIT8; break;
+ case RELOC_SECTION_LIT4: sec_name = _LIT4; break;
+ case RELOC_SECTION_XDATA: sec_name = _XDATA; break;
+ case RELOC_SECTION_PDATA: sec_name = _PDATA; break;
+ case RELOC_SECTION_FINI: sec_name = _FINI; break;
+ case RELOC_SECTION_LITA: sec_name = _LITA; break;
+ case RELOC_SECTION_RCONST: sec_name = _RCONST; break;
default: abort ();
}
sec = bfd_get_section_by_name (abfd, sec_name);
- if (sec == (asection *) NULL)
+ if (sec == NULL)
abort ();
rptr->sym_ptr_ptr = sec->symbol_ptr_ptr;
@@ -1772,11 +1655,10 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
/* Get a canonical list of relocs. */
long
-_bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols)
- bfd *abfd;
- asection *section;
- arelent **relptr;
- asymbol **symbols;
+_bfd_ecoff_canonicalize_reloc (bfd *abfd,
+ asection *section,
+ arelent **relptr,
+ asymbol **symbols)
{
unsigned int count;
@@ -1805,7 +1687,7 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols)
*relptr++ = tblptr++;
}
- *relptr = (arelent *) NULL;
+ *relptr = NULL;
return section->reloc_count;
}
@@ -1815,15 +1697,13 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols)
wanted location. */
bfd_boolean
-_bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
- filename_ptr, functionname_ptr, retline_ptr)
- bfd *abfd;
- asection *section;
- asymbol **ignore_symbols ATTRIBUTE_UNUSED;
- bfd_vma offset;
- const char **filename_ptr;
- const char **functionname_ptr;
- unsigned int *retline_ptr;
+_bfd_ecoff_find_nearest_line (bfd *abfd,
+ asection *section,
+ asymbol **ignore_symbols ATTRIBUTE_UNUSED,
+ bfd_vma offset,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *retline_ptr)
{
const struct ecoff_debug_swap * const debug_swap
= &ecoff_backend (abfd)->debug_swap;
@@ -1831,15 +1711,15 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
struct ecoff_find_line *line_info;
/* Make sure we have the FDR's. */
- if (! _bfd_ecoff_slurp_symbolic_info (abfd, (asection *) NULL, debug_info)
+ if (! _bfd_ecoff_slurp_symbolic_info (abfd, NULL, debug_info)
|| bfd_get_symcount (abfd) == 0)
return FALSE;
if (ecoff_data (abfd)->find_line_info == NULL)
{
bfd_size_type amt = sizeof (struct ecoff_find_line);
- ecoff_data (abfd)->find_line_info
- = (struct ecoff_find_line *) bfd_zalloc (abfd, amt);
+
+ ecoff_data (abfd)->find_line_info = bfd_zalloc (abfd, amt);
if (ecoff_data (abfd)->find_line_info == NULL)
return FALSE;
}
@@ -1864,13 +1744,11 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
information. */
bfd_boolean
-_bfd_ecoff_bfd_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+_bfd_ecoff_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
{
struct ecoff_debug_info *iinfo = &ecoff_data (ibfd)->debug_info;
struct ecoff_debug_info *oinfo = &ecoff_data (obfd)->debug_info;
- register int i;
+ int i;
asymbol **sym_ptr_ptr;
size_t c;
bfd_boolean local;
@@ -1894,7 +1772,7 @@ _bfd_ecoff_bfd_copy_private_bfd_data (ibfd, obfd)
/* If there are no symbols, don't copy any debugging information. */
c = bfd_get_symcount (obfd);
sym_ptr_ptr = bfd_get_outsymbols (obfd);
- if (c == 0 || sym_ptr_ptr == (asymbol **) NULL)
+ if (c == 0 || sym_ptr_ptr == NULL)
return TRUE;
/* See if there are any local symbols. */
@@ -1974,10 +1852,9 @@ _bfd_ecoff_bfd_copy_private_bfd_data (ibfd, obfd)
callers ignore the return value. */
bfd_boolean
-_bfd_ecoff_set_arch_mach (abfd, arch, machine)
- bfd *abfd;
- enum bfd_architecture arch;
- unsigned long machine;
+_bfd_ecoff_set_arch_mach (bfd *abfd,
+ enum bfd_architecture arch,
+ unsigned long machine)
{
bfd_default_set_arch_mach (abfd, arch, machine);
return arch == ecoff_backend (abfd)->arch;
@@ -1986,9 +1863,7 @@ _bfd_ecoff_set_arch_mach (abfd, arch, machine)
/* Get the size of the section headers. */
int
-_bfd_ecoff_sizeof_headers (abfd, reloc)
- bfd *abfd;
- bfd_boolean reloc ATTRIBUTE_UNUSED;
+_bfd_ecoff_sizeof_headers (bfd *abfd, bfd_boolean reloc ATTRIBUTE_UNUSED)
{
asection *current;
int c;
@@ -1996,7 +1871,7 @@ _bfd_ecoff_sizeof_headers (abfd, reloc)
c = 0;
for (current = abfd->sections;
- current != (asection *)NULL;
+ current != NULL;
current = current->next)
++c;
@@ -2009,12 +1884,11 @@ _bfd_ecoff_sizeof_headers (abfd, reloc)
/* Get the contents of a section. */
bfd_boolean
-_bfd_ecoff_get_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- asection *section;
- PTR location;
- file_ptr offset;
- bfd_size_type count;
+_bfd_ecoff_get_section_contents (bfd *abfd,
+ asection *section,
+ void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
return _bfd_generic_get_section_contents (abfd, section, location,
offset, count);
@@ -2024,9 +1898,7 @@ _bfd_ecoff_get_section_contents (abfd, section, location, offset, count)
called via qsort. */
static int
-ecoff_sort_hdrs (arg1, arg2)
- const PTR arg1;
- const PTR arg2;
+ecoff_sort_hdrs (const void * arg1, const void * arg2)
{
const asection *hdr1 = *(const asection **) arg1;
const asection *hdr2 = *(const asection **) arg2;
@@ -2053,8 +1925,7 @@ ecoff_sort_hdrs (arg1, arg2)
reloc_filepos. */
static bfd_boolean
-ecoff_compute_section_file_positions (abfd)
- bfd *abfd;
+ecoff_compute_section_file_positions (bfd *abfd)
{
file_ptr sofar, file_sofar;
asection **sorted_hdrs;
@@ -2072,7 +1943,7 @@ ecoff_compute_section_file_positions (abfd)
/* Sort the sections by VMA. */
amt = abfd->section_count;
amt *= sizeof (asection *);
- sorted_hdrs = (asection **) bfd_malloc (amt);
+ sorted_hdrs = bfd_malloc (amt);
if (sorted_hdrs == NULL)
return FALSE;
for (current = abfd->sections, i = 0;
@@ -2092,11 +1963,11 @@ ecoff_compute_section_file_positions (abfd)
for (i = 0; i < abfd->section_count; i++)
{
current = sorted_hdrs[i];
- if (strcmp (current->name, _RDATA) == 0)
+ if (streq (current->name, _RDATA))
break;
if ((current->flags & SEC_CODE) == 0
- && strcmp (current->name, _PDATA) != 0
- && strcmp (current->name, _RCONST) != 0)
+ && ! streq (current->name, _PDATA)
+ && ! streq (current->name, _RCONST))
{
rdata_in_text = FALSE;
break;
@@ -2117,8 +1988,8 @@ ecoff_compute_section_file_positions (abfd)
supposed to indicate the number of .pdata entries that are
really in the section. Each entry is 8 bytes. We store this
away in line_filepos before increasing the section size. */
- if (strcmp (current->name, _PDATA) == 0)
- current->line_filepos = current->_raw_size / 8;
+ if (streq (current->name, _PDATA))
+ current->line_filepos = current->size / 8;
alignment_power = current->alignment_power;
@@ -2133,15 +2004,15 @@ ecoff_compute_section_file_positions (abfd)
&& ! first_data
&& (current->flags & SEC_CODE) == 0
&& (! rdata_in_text
- || strcmp (current->name, _RDATA) != 0)
- && strcmp (current->name, _PDATA) != 0
- && strcmp (current->name, _RCONST) != 0)
+ || ! streq (current->name, _RDATA))
+ && ! streq (current->name, _PDATA)
+ && ! streq (current->name, _RCONST))
{
sofar = (sofar + round - 1) &~ (round - 1);
file_sofar = (file_sofar + round - 1) &~ (round - 1);
first_data = FALSE;
}
- else if (strcmp (current->name, _LIB) == 0)
+ else if (streq (current->name, _LIB))
{
/* On Irix 4, the location of contents of the .lib section
from a shared library section is also rounded up to a
@@ -2179,16 +2050,16 @@ ecoff_compute_section_file_positions (abfd)
if ((current->flags & (SEC_HAS_CONTENTS | SEC_LOAD)) != 0)
current->filepos = file_sofar;
- sofar += current->_raw_size;
+ sofar += current->size;
if ((current->flags & SEC_HAS_CONTENTS) != 0)
- file_sofar += current->_raw_size;
+ file_sofar += current->size;
/* Make sure that this section is of the right size too. */
old_sofar = sofar;
sofar = BFD_ALIGN (sofar, 1 << alignment_power);
if ((current->flags & SEC_HAS_CONTENTS) != 0)
file_sofar = BFD_ALIGN (file_sofar, 1 << alignment_power);
- current->_raw_size += sofar - old_sofar;
+ current->size += sofar - old_sofar;
}
free (sorted_hdrs);
@@ -2204,8 +2075,7 @@ ecoff_compute_section_file_positions (abfd)
information. */
static bfd_size_type
-ecoff_compute_reloc_file_positions (abfd)
- bfd *abfd;
+ecoff_compute_reloc_file_positions (bfd *abfd)
{
const bfd_size_type external_reloc_size =
ecoff_backend (abfd)->external_reloc_size;
@@ -2225,7 +2095,7 @@ ecoff_compute_reloc_file_positions (abfd)
reloc_size = 0;
for (current = abfd->sections;
- current != (asection *)NULL;
+ current != NULL;
current = current->next)
{
if (current->reloc_count == 0)
@@ -2259,26 +2129,23 @@ ecoff_compute_reloc_file_positions (abfd)
/* Set the contents of a section. */
bfd_boolean
-_bfd_ecoff_set_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- asection *section;
- const PTR location;
- file_ptr offset;
- bfd_size_type count;
+_bfd_ecoff_set_section_contents (bfd *abfd,
+ asection *section,
+ const void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
file_ptr pos;
/* This must be done first, because bfd_set_section_contents is
going to set output_has_begun to TRUE. */
- if (! abfd->output_has_begun)
- {
- if (! ecoff_compute_section_file_positions (abfd))
- return FALSE;
- }
+ if (! abfd->output_has_begun
+ && ! ecoff_compute_section_file_positions (abfd))
+ return FALSE;
/* Handle the .lib section specially so that Irix 4 shared libraries
work out. See coff_set_section_contents in coffcode.h. */
- if (strcmp (section->name, _LIB) == 0)
+ if (streq (section->name, _LIB))
{
bfd_byte *rec, *recend;
@@ -2308,8 +2175,7 @@ _bfd_ecoff_set_section_contents (abfd, section, location, offset, count)
nlmconv. */
bfd_vma
-bfd_ecoff_get_gp_value (abfd)
- bfd *abfd;
+bfd_ecoff_get_gp_value (bfd *abfd)
{
if (bfd_get_flavour (abfd) != bfd_target_ecoff_flavour
|| bfd_get_format (abfd) != bfd_object)
@@ -2325,9 +2191,7 @@ bfd_ecoff_get_gp_value (abfd)
assembler. */
bfd_boolean
-bfd_ecoff_set_gp_value (abfd, gp_value)
- bfd *abfd;
- bfd_vma gp_value;
+bfd_ecoff_set_gp_value (bfd *abfd, bfd_vma gp_value)
{
if (bfd_get_flavour (abfd) != bfd_target_ecoff_flavour
|| bfd_get_format (abfd) != bfd_object)
@@ -2345,11 +2209,10 @@ bfd_ecoff_set_gp_value (abfd, gp_value)
the assembler. */
bfd_boolean
-bfd_ecoff_set_regmasks (abfd, gprmask, fprmask, cprmask)
- bfd *abfd;
- unsigned long gprmask;
- unsigned long fprmask;
- unsigned long *cprmask;
+bfd_ecoff_set_regmasks (bfd *abfd,
+ unsigned long gprmask,
+ unsigned long fprmask,
+ unsigned long *cprmask)
{
ecoff_data_type *tdata;
@@ -2363,7 +2226,7 @@ bfd_ecoff_set_regmasks (abfd, gprmask, fprmask, cprmask)
tdata = ecoff_data (abfd);
tdata->gprmask = gprmask;
tdata->fprmask = fprmask;
- if (cprmask != (unsigned long *) NULL)
+ if (cprmask != NULL)
{
int i;
@@ -2378,9 +2241,7 @@ bfd_ecoff_set_regmasks (abfd, gprmask, fprmask, cprmask)
is passed to bfd_ecoff_debug_externals. */
static bfd_boolean
-ecoff_get_extr (sym, esym)
- asymbol *sym;
- EXTR *esym;
+ecoff_get_extr (asymbol *sym, EXTR *esym)
{
ecoff_symbol_type *ecoff_sym_ptr;
bfd *input_bfd;
@@ -2432,7 +2293,7 @@ ecoff_get_extr (sym, esym)
input_debug = &ecoff_data (input_bfd)->debug_info;
BFD_ASSERT (esym->ifd < input_debug->symbolic_header.ifdMax);
- if (input_debug->ifdmap != (RFDT *) NULL)
+ if (input_debug->ifdmap != NULL)
esym->ifd = input_debug->ifdmap[esym->ifd];
}
@@ -2443,9 +2304,7 @@ ecoff_get_extr (sym, esym)
bfd_ecoff_debug_externals. */
static void
-ecoff_set_index (sym, indx)
- asymbol *sym;
- bfd_size_type indx;
+ecoff_set_index (asymbol *sym, bfd_size_type indx)
{
ecoff_set_sym_index (sym, indx);
}
@@ -2453,8 +2312,7 @@ ecoff_set_index (sym, indx)
/* Write out an ECOFF file. */
bfd_boolean
-_bfd_ecoff_write_object_contents (abfd)
- bfd *abfd;
+_bfd_ecoff_write_object_contents (bfd *abfd)
{
const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
const bfd_vma round = backend->round;
@@ -2464,11 +2322,9 @@ _bfd_ecoff_write_object_contents (abfd)
const bfd_size_type external_hdr_size
= backend->debug_swap.external_hdr_size;
const bfd_size_type external_reloc_size = backend->external_reloc_size;
- void (* const adjust_reloc_out)
- PARAMS ((bfd *, const arelent *, struct internal_reloc *))
+ void (* const adjust_reloc_out) (bfd *, const arelent *, struct internal_reloc *)
= backend->adjust_reloc_out;
- void (* const swap_reloc_out)
- PARAMS ((bfd *, const struct internal_reloc *, PTR))
+ void (* const swap_reloc_out) (bfd *, const struct internal_reloc *, void *)
= backend->swap_reloc_out;
struct ecoff_debug_info * const debug = &ecoff_data (abfd)->debug_info;
HDRR * const symhdr = &debug->symbolic_header;
@@ -2482,8 +2338,8 @@ _bfd_ecoff_write_object_contents (abfd)
bfd_vma data_start;
bfd_boolean set_data_start;
bfd_size_type bss_size;
- PTR buff = NULL;
- PTR reloc_buff = NULL;
+ void * buff = NULL;
+ void * reloc_buff = NULL;
struct internal_filehdr internal_f;
struct internal_aouthdr internal_a;
int i;
@@ -2494,7 +2350,7 @@ _bfd_ecoff_write_object_contents (abfd)
count = 1;
for (current = abfd->sections;
- current != (asection *)NULL;
+ current != NULL;
current = current->next)
{
current->target_index = count;
@@ -2518,12 +2374,13 @@ _bfd_ecoff_write_object_contents (abfd)
file header, or a.out header. */
{
bfd_size_type siz;
+
siz = scnhsz;
if (siz < filhsz)
siz = filhsz;
if (siz < aoutsz)
siz = aoutsz;
- buff = (PTR) bfd_malloc (siz);
+ buff = bfd_malloc (siz);
if (buff == NULL)
goto error_return;
}
@@ -2531,8 +2388,9 @@ _bfd_ecoff_write_object_contents (abfd)
internal_f.f_nscns = 0;
if (bfd_seek (abfd, (file_ptr) (filhsz + aoutsz), SEEK_SET) != 0)
goto error_return;
+
for (current = abfd->sections;
- current != (asection *) NULL;
+ current != NULL;
current = current->next)
{
struct internal_scnhdr section;
@@ -2544,13 +2402,13 @@ _bfd_ecoff_write_object_contents (abfd)
/* This seems to be correct for Irix 4 shared libraries. */
vma = bfd_get_section_vma (abfd, current);
- if (strcmp (current->name, _LIB) == 0)
+ if (streq (current->name, _LIB))
section.s_vaddr = 0;
else
section.s_vaddr = vma;
section.s_paddr = current->lma;
- section.s_size = bfd_get_section_size_before_reloc (current);
+ section.s_size = current->size;
/* If this section is unloadable then the scnptr will be 0. */
if ((current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
@@ -2566,7 +2424,7 @@ _bfd_ecoff_write_object_contents (abfd)
want the linker to compute the best size to use, or
something. I don't know what happens if the information is
not present. */
- if (strcmp (current->name, _PDATA) != 0)
+ if (! streq (current->name, _PDATA))
section.s_lnnoptr = 0;
else
{
@@ -2582,7 +2440,7 @@ _bfd_ecoff_write_object_contents (abfd)
section.s_flags = ecoff_sec_to_styp_flags (current->name,
current->flags);
- if (bfd_coff_swap_scnhdr_out (abfd, (PTR) &section, buff) == 0
+ if (bfd_coff_swap_scnhdr_out (abfd, (void *) &section, buff) == 0
|| bfd_bwrite (buff, scnhsz, abfd) != scnhsz)
goto error_return;
@@ -2601,7 +2459,7 @@ _bfd_ecoff_write_object_contents (abfd)
|| (section.s_flags & STYP_ECOFF_FINI) != 0
|| section.s_flags == STYP_RCONST)
{
- text_size += bfd_get_section_size_before_reloc (current);
+ text_size += current->size;
if (! set_text_start || text_start > vma)
{
text_start = vma;
@@ -2617,7 +2475,7 @@ _bfd_ecoff_write_object_contents (abfd)
|| section.s_flags == STYP_XDATA
|| (section.s_flags & STYP_GOT) != 0)
{
- data_size += bfd_get_section_size_before_reloc (current);
+ data_size += current->size;
if (! set_data_start || data_start > vma)
{
data_start = vma;
@@ -2626,7 +2484,7 @@ _bfd_ecoff_write_object_contents (abfd)
}
else if ((section.s_flags & STYP_BSS) != 0
|| (section.s_flags & STYP_SBSS) != 0)
- bss_size += bfd_get_section_size_before_reloc (current);
+ bss_size += current->size;
else if (section.s_flags == 0
|| (section.s_flags & STYP_ECOFF_LIB) != 0
|| section.s_flags == STYP_COMMENT)
@@ -2731,11 +2589,11 @@ _bfd_ecoff_write_object_contents (abfd)
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
goto error_return;
- bfd_coff_swap_filehdr_out (abfd, (PTR) &internal_f, buff);
+ bfd_coff_swap_filehdr_out (abfd, (void *) &internal_f, buff);
if (bfd_bwrite (buff, filhsz, abfd) != filhsz)
goto error_return;
- bfd_coff_swap_aouthdr_out (abfd, (PTR) &internal_a, buff);
+ bfd_coff_swap_aouthdr_out (abfd, (void *) &internal_a, buff);
if (bfd_bwrite (buff, aoutsz, abfd) != aoutsz)
goto error_return;
@@ -2756,7 +2614,7 @@ _bfd_ecoff_write_object_contents (abfd)
/* Write out the relocs. */
for (current = abfd->sections;
- current != (asection *) NULL;
+ current != NULL;
current = current->next)
{
arelent **reloc_ptr_ptr;
@@ -2775,6 +2633,7 @@ _bfd_ecoff_write_object_contents (abfd)
reloc_ptr_ptr = current->orelocation;
reloc_end = reloc_ptr_ptr + current->reloc_count;
out_ptr = (char *) reloc_buff;
+
for (;
reloc_ptr_ptr < reloc_end;
reloc_ptr_ptr++, out_ptr += external_reloc_size)
@@ -2783,11 +2642,16 @@ _bfd_ecoff_write_object_contents (abfd)
asymbol *sym;
struct internal_reloc in;
- memset ((PTR) &in, 0, sizeof in);
+ memset ((void *) &in, 0, sizeof in);
reloc = *reloc_ptr_ptr;
sym = *reloc->sym_ptr_ptr;
+ /* If the howto field has not been initialised then skip this reloc.
+ This assumes that an error message has been issued elsewhere. */
+ if (reloc->howto == NULL)
+ continue;
+
in.r_vaddr = (reloc->address
+ bfd_get_section_vma (abfd, current));
in.r_type = reloc->howto->type;
@@ -2800,46 +2664,48 @@ _bfd_ecoff_write_object_contents (abfd)
else
{
const char *name;
+ unsigned int i;
+ static struct
+ {
+ const char * name;
+ long r_symndx;
+ }
+ section_symndx [] =
+ {
+ { _TEXT, RELOC_SECTION_TEXT },
+ { _RDATA, RELOC_SECTION_RDATA },
+ { _DATA, RELOC_SECTION_DATA },
+ { _SDATA, RELOC_SECTION_SDATA },
+ { _SBSS, RELOC_SECTION_SBSS },
+ { _BSS, RELOC_SECTION_BSS },
+ { _INIT, RELOC_SECTION_INIT },
+ { _LIT8, RELOC_SECTION_LIT8 },
+ { _LIT4, RELOC_SECTION_LIT4 },
+ { _XDATA, RELOC_SECTION_XDATA },
+ { _PDATA, RELOC_SECTION_PDATA },
+ { _FINI, RELOC_SECTION_FINI },
+ { _LITA, RELOC_SECTION_LITA },
+ { "*ABS*", RELOC_SECTION_ABS },
+ { _RCONST, RELOC_SECTION_RCONST }
+ };
name = bfd_get_section_name (abfd, bfd_get_section (sym));
- if (strcmp (name, ".text") == 0)
- in.r_symndx = RELOC_SECTION_TEXT;
- else if (strcmp (name, ".rdata") == 0)
- in.r_symndx = RELOC_SECTION_RDATA;
- else if (strcmp (name, ".data") == 0)
- in.r_symndx = RELOC_SECTION_DATA;
- else if (strcmp (name, ".sdata") == 0)
- in.r_symndx = RELOC_SECTION_SDATA;
- else if (strcmp (name, ".sbss") == 0)
- in.r_symndx = RELOC_SECTION_SBSS;
- else if (strcmp (name, ".bss") == 0)
- in.r_symndx = RELOC_SECTION_BSS;
- else if (strcmp (name, ".init") == 0)
- in.r_symndx = RELOC_SECTION_INIT;
- else if (strcmp (name, ".lit8") == 0)
- in.r_symndx = RELOC_SECTION_LIT8;
- else if (strcmp (name, ".lit4") == 0)
- in.r_symndx = RELOC_SECTION_LIT4;
- else if (strcmp (name, ".xdata") == 0)
- in.r_symndx = RELOC_SECTION_XDATA;
- else if (strcmp (name, ".pdata") == 0)
- in.r_symndx = RELOC_SECTION_PDATA;
- else if (strcmp (name, ".fini") == 0)
- in.r_symndx = RELOC_SECTION_FINI;
- else if (strcmp (name, ".lita") == 0)
- in.r_symndx = RELOC_SECTION_LITA;
- else if (strcmp (name, "*ABS*") == 0)
- in.r_symndx = RELOC_SECTION_ABS;
- else if (strcmp (name, ".rconst") == 0)
- in.r_symndx = RELOC_SECTION_RCONST;
- else
+
+ for (i = 0; i < ARRAY_SIZE (section_symndx); i++)
+ if (streq (name, section_symndx[i].name))
+ {
+ in.r_symndx = section_symndx[i].r_symndx;
+ break;
+ }
+
+ if (i == ARRAY_SIZE (section_symndx))
abort ();
in.r_extern = 0;
}
(*adjust_reloc_out) (abfd, reloc, &in);
- (*swap_reloc_out) (abfd, &in, (PTR) out_ptr);
+ (*swap_reloc_out) (abfd, &in, (void *) out_ptr);
}
if (bfd_seek (abfd, current->rel_filepos, SEEK_SET) != 0)
@@ -2926,19 +2792,19 @@ _bfd_ecoff_write_object_contents (abfd)
The Alpha seems to use ________64E[BL]E[BL]_. */
-#define ARMAP_BIG_ENDIAN 'B'
-#define ARMAP_LITTLE_ENDIAN 'L'
-#define ARMAP_MARKER 'E'
-#define ARMAP_START_LENGTH 10
-#define ARMAP_HEADER_MARKER_INDEX 10
-#define ARMAP_HEADER_ENDIAN_INDEX 11
-#define ARMAP_OBJECT_MARKER_INDEX 12
-#define ARMAP_OBJECT_ENDIAN_INDEX 13
-#define ARMAP_END_INDEX 14
-#define ARMAP_END "_ "
+#define ARMAP_BIG_ENDIAN 'B'
+#define ARMAP_LITTLE_ENDIAN 'L'
+#define ARMAP_MARKER 'E'
+#define ARMAP_START_LENGTH 10
+#define ARMAP_HEADER_MARKER_INDEX 10
+#define ARMAP_HEADER_ENDIAN_INDEX 11
+#define ARMAP_OBJECT_MARKER_INDEX 12
+#define ARMAP_OBJECT_ENDIAN_INDEX 13
+#define ARMAP_END_INDEX 14
+#define ARMAP_END "_ "
/* This is a magic number used in the hashing algorithm. */
-#define ARMAP_HASH_MAGIC 0x9dd68ab5
+#define ARMAP_HASH_MAGIC 0x9dd68ab5
/* This returns the hash value to use for a string. It also sets
*REHASH to the rehash adjustment if the first slot is taken. SIZE
@@ -2946,11 +2812,10 @@ _bfd_ecoff_write_object_contents (abfd)
base 2 of SIZE. */
static unsigned int
-ecoff_armap_hash (s, rehash, size, hlog)
- const char *s;
- unsigned int *rehash;
- unsigned int size;
- unsigned int hlog;
+ecoff_armap_hash (const char *s,
+ unsigned int *rehash,
+ unsigned int size,
+ unsigned int hlog)
{
unsigned int hash;
@@ -2967,8 +2832,7 @@ ecoff_armap_hash (s, rehash, size, hlog)
/* Read in the armap. */
bfd_boolean
-_bfd_ecoff_slurp_armap (abfd)
- bfd *abfd;
+_bfd_ecoff_slurp_armap (bfd *abfd)
{
char nextname[17];
unsigned int i;
@@ -2983,7 +2847,7 @@ _bfd_ecoff_slurp_armap (abfd)
bfd_size_type amt;
/* Get the name of the first element. */
- i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
+ i = bfd_bread ((void *) nextname, (bfd_size_type) 16, abfd);
if (i == 0)
return TRUE;
if (i != 16)
@@ -2997,20 +2861,18 @@ _bfd_ecoff_slurp_armap (abfd)
bfd_slurp_armap, but that seems inappropriate since no other
target uses this format. Instead, we check directly for a COFF
armap. */
- if (strncmp (nextname, "/ ", 16) == 0)
+ if (strneq (nextname, "/ ", 16))
return bfd_slurp_armap (abfd);
/* See if the first element is an armap. */
- if (strncmp (nextname, ecoff_backend (abfd)->armap_start,
- ARMAP_START_LENGTH) != 0
+ if (! strneq (nextname, ecoff_backend (abfd)->armap_start, ARMAP_START_LENGTH)
|| nextname[ARMAP_HEADER_MARKER_INDEX] != ARMAP_MARKER
|| (nextname[ARMAP_HEADER_ENDIAN_INDEX] != ARMAP_BIG_ENDIAN
&& nextname[ARMAP_HEADER_ENDIAN_INDEX] != ARMAP_LITTLE_ENDIAN)
|| nextname[ARMAP_OBJECT_MARKER_INDEX] != ARMAP_MARKER
|| (nextname[ARMAP_OBJECT_ENDIAN_INDEX] != ARMAP_BIG_ENDIAN
&& nextname[ARMAP_OBJECT_ENDIAN_INDEX] != ARMAP_LITTLE_ENDIAN)
- || strncmp (nextname + ARMAP_END_INDEX,
- ARMAP_END, sizeof ARMAP_END - 1) != 0)
+ || ! strneq (nextname + ARMAP_END_INDEX, ARMAP_END, sizeof ARMAP_END - 1))
{
bfd_has_map (abfd) = FALSE;
return TRUE;
@@ -3029,29 +2891,29 @@ _bfd_ecoff_slurp_armap (abfd)
/* Read in the armap. */
ardata = bfd_ardata (abfd);
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
- if (mapdata == (struct areltdata *) NULL)
+ if (mapdata == NULL)
return FALSE;
parsed_size = mapdata->parsed_size;
- bfd_release (abfd, (PTR) mapdata);
+ bfd_release (abfd, (void *) mapdata);
- raw_armap = (char *) bfd_alloc (abfd, parsed_size);
- if (raw_armap == (char *) NULL)
+ raw_armap = bfd_alloc (abfd, parsed_size);
+ if (raw_armap == NULL)
return FALSE;
- if (bfd_bread ((PTR) raw_armap, parsed_size, abfd) != parsed_size)
+ if (bfd_bread ((void *) raw_armap, parsed_size, abfd) != parsed_size)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
- bfd_release (abfd, (PTR) raw_armap);
+ bfd_release (abfd, (void *) raw_armap);
return FALSE;
}
- ardata->tdata = (PTR) raw_armap;
+ ardata->tdata = (void *) raw_armap;
count = H_GET_32 (abfd, raw_armap);
ardata->symdef_count = 0;
- ardata->cache = (struct ar_cache *) NULL;
+ ardata->cache = NULL;
/* This code used to overlay the symdefs over the raw archive data,
but that doesn't work on a 64 bit host. */
@@ -3101,7 +2963,7 @@ _bfd_ecoff_slurp_armap (abfd)
amt = ardata->symdef_count;
amt *= sizeof (struct symdef);
- symdef_ptr = (struct symdef *) bfd_alloc (abfd, amt);
+ symdef_ptr = bfd_alloc (abfd, amt);
if (!symdef_ptr)
return FALSE;
@@ -3133,12 +2995,11 @@ _bfd_ecoff_slurp_armap (abfd)
/* Write out an armap. */
bfd_boolean
-_bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
- bfd *abfd;
- unsigned int elength;
- struct orl *map;
- unsigned int orl_count;
- int stridx;
+_bfd_ecoff_write_armap (bfd *abfd,
+ unsigned int elength,
+ struct orl *map,
+ unsigned int orl_count,
+ int stridx)
{
unsigned int hashsize, hashlog;
bfd_size_type symdefsize;
@@ -3169,7 +3030,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
firstreal = SARMAG + sizeof (struct ar_hdr) + mapsize + elength;
- memset ((PTR) &hdr, 0, sizeof hdr);
+ memset ((void *) &hdr, 0, sizeof hdr);
/* Work out the ECOFF armap name. */
strcpy (hdr.ar_name, ecoff_backend (abfd)->armap_start);
@@ -3195,14 +3056,10 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
armap. */
hdr.ar_uid[0] = '0';
hdr.ar_gid[0] = '0';
-#if 0
- hdr.ar_mode[0] = '0';
-#else
/* Building gcc ends up extracting the armap as a file - twice. */
hdr.ar_mode[0] = '6';
hdr.ar_mode[1] = '4';
hdr.ar_mode[2] = '4';
-#endif
sprintf (hdr.ar_size, "%-10d", (int) mapsize);
@@ -3214,15 +3071,15 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
if (((char *) (&hdr))[i] == '\0')
(((char *) (&hdr))[i]) = ' ';
- if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), abfd)
+ if (bfd_bwrite ((void *) &hdr, (bfd_size_type) sizeof (struct ar_hdr), abfd)
!= sizeof (struct ar_hdr))
return FALSE;
H_PUT_32 (abfd, hashsize, temp);
- if (bfd_bwrite ((PTR) temp, (bfd_size_type) 4, abfd) != 4)
+ if (bfd_bwrite ((void *) temp, (bfd_size_type) 4, abfd) != 4)
return FALSE;
- hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize);
+ hashtable = bfd_zalloc (abfd, symdefsize);
if (!hashtable)
return FALSE;
@@ -3268,21 +3125,21 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
H_PUT_32 (abfd, firstreal, (hashtable + hash * 8 + 4));
}
- if (bfd_bwrite ((PTR) hashtable, symdefsize, abfd) != symdefsize)
+ if (bfd_bwrite ((void *) hashtable, symdefsize, abfd) != symdefsize)
return FALSE;
bfd_release (abfd, hashtable);
/* Now write the strings. */
H_PUT_32 (abfd, stringsize, temp);
- if (bfd_bwrite ((PTR) temp, (bfd_size_type) 4, abfd) != 4)
+ if (bfd_bwrite ((void *) temp, (bfd_size_type) 4, abfd) != 4)
return FALSE;
for (i = 0; i < orl_count; i++)
{
bfd_size_type len;
len = strlen (*map[i].name) + 1;
- if (bfd_bwrite ((PTR) (*map[i].name), len, abfd) != len)
+ if (bfd_bwrite ((void *) (*map[i].name), len, abfd) != len)
return FALSE;
}
@@ -3301,21 +3158,20 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
and the extended name table. */
const bfd_target *
-_bfd_ecoff_archive_p (abfd)
- bfd *abfd;
+_bfd_ecoff_archive_p (bfd *abfd)
{
struct artdata *tdata_hold;
char armag[SARMAG + 1];
bfd_size_type amt;
- if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
+ if (bfd_bread ((void *) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return (const bfd_target *) NULL;
+ return NULL;
}
- if (strncmp (armag, ARMAG, SARMAG) != 0)
+ if (! strneq (armag, ARMAG, SARMAG))
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
@@ -3324,26 +3180,28 @@ _bfd_ecoff_archive_p (abfd)
tdata_hold = bfd_ardata (abfd);
amt = sizeof (struct artdata);
- bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
- if (bfd_ardata (abfd) == (struct artdata *) NULL)
+ bfd_ardata (abfd) = bfd_zalloc (abfd, amt);
+ if (bfd_ardata (abfd) == NULL)
{
bfd_ardata (abfd) = tdata_hold;
- return (const bfd_target *) NULL;
+ return NULL;
}
bfd_ardata (abfd)->first_file_filepos = SARMAG;
- bfd_ardata (abfd)->cache = NULL;
- bfd_ardata (abfd)->archive_head = NULL;
- bfd_ardata (abfd)->symdefs = NULL;
- bfd_ardata (abfd)->extended_names = NULL;
- bfd_ardata (abfd)->tdata = NULL;
+ /* Already cleared by bfd_zalloc above.
+ bfd_ardata (abfd)->cache = NULL;
+ bfd_ardata (abfd)->archive_head = NULL;
+ bfd_ardata (abfd)->symdefs = NULL;
+ bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->extended_names_size = 0;
+ bfd_ardata (abfd)->tdata = NULL; */
if (! _bfd_ecoff_slurp_armap (abfd)
|| ! _bfd_ecoff_slurp_extended_name_table (abfd))
{
bfd_release (abfd, bfd_ardata (abfd));
bfd_ardata (abfd) = tdata_hold;
- return (const bfd_target *) NULL;
+ return NULL;
}
if (bfd_has_map (abfd))
@@ -3357,21 +3215,17 @@ _bfd_ecoff_archive_p (abfd)
the first file is not an object file, somebody is doing
something weird, and we permit it so that ar -t will work. */
- first = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
+ first = bfd_openr_next_archived_file (abfd, NULL);
if (first != NULL)
{
first->target_defaulted = FALSE;
if (bfd_check_format (first, bfd_object)
&& first->xvec != abfd->xvec)
{
-#if 0
/* We ought to close `first' here, but we can't, because
we have no way to remove it from the archive cache.
- It's close to impossible to figure out when we can
+ It's almost impossible to figure out when we can
release bfd_ardata. FIXME. */
- (void) bfd_close (first);
- bfd_release (abfd, bfd_ardata (abfd));
-#endif
bfd_set_error (bfd_error_wrong_object_format);
bfd_ardata (abfd) = tdata_hold;
return NULL;
@@ -3385,35 +3239,21 @@ _bfd_ecoff_archive_p (abfd)
/* ECOFF linker code. */
-static struct bfd_hash_entry *ecoff_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *entry,
- struct bfd_hash_table *table,
- const char *string));
-static bfd_boolean ecoff_link_add_archive_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean ecoff_link_check_archive_element
- PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *pneeded));
-static bfd_boolean ecoff_link_add_object_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean ecoff_link_add_externals
- PARAMS ((bfd *, struct bfd_link_info *, PTR, char *));
-
/* Routine to create an entry in an ECOFF link hash table. */
static struct bfd_hash_entry *
-ecoff_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+ecoff_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct ecoff_link_hash_entry *ret = (struct ecoff_link_hash_entry *) entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct ecoff_link_hash_entry *) NULL)
+ if (ret == NULL)
ret = ((struct ecoff_link_hash_entry *)
bfd_hash_allocate (table, sizeof (struct ecoff_link_hash_entry)));
- if (ret == (struct ecoff_link_hash_entry *) NULL)
+ if (ret == NULL)
return NULL;
/* Call the allocation method of the superclass. */
@@ -3429,7 +3269,7 @@ ecoff_link_hash_newfunc (entry, table, string)
ret->written = 0;
ret->small = 0;
}
- memset ((PTR) &ret->esym, 0, sizeof ret->esym);
+ memset ((void *) &ret->esym, 0, sizeof ret->esym);
return (struct bfd_hash_entry *) ret;
}
@@ -3437,20 +3277,20 @@ ecoff_link_hash_newfunc (entry, table, string)
/* Create an ECOFF link hash table. */
struct bfd_link_hash_table *
-_bfd_ecoff_bfd_link_hash_table_create (abfd)
- bfd *abfd;
+_bfd_ecoff_bfd_link_hash_table_create (bfd *abfd)
{
struct ecoff_link_hash_table *ret;
bfd_size_type amt = sizeof (struct ecoff_link_hash_table);
- ret = (struct ecoff_link_hash_table *) bfd_malloc (amt);
+ ret = bfd_malloc (amt);
if (ret == NULL)
return NULL;
- if (! _bfd_link_hash_table_init (&ret->root, abfd,
- ecoff_link_hash_newfunc))
+ if (!_bfd_link_hash_table_init (&ret->root, abfd,
+ ecoff_link_hash_newfunc,
+ sizeof (struct ecoff_link_hash_entry)))
{
free (ret);
- return (struct bfd_link_hash_table *) NULL;
+ return NULL;
}
return &ret->root;
}
@@ -3466,7 +3306,7 @@ _bfd_ecoff_bfd_link_hash_table_create (abfd)
#define ecoff_link_hash_traverse(table, func, info) \
(bfd_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \
(info)))
/* Get the ECOFF link hash table from the info structure. This is
@@ -3474,368 +3314,6 @@ _bfd_ecoff_bfd_link_hash_table_create (abfd)
#define ecoff_hash_table(p) ((struct ecoff_link_hash_table *) ((p)->hash))
-/* Given an ECOFF BFD, add symbols to the global hash table as
- appropriate. */
-
-bfd_boolean
-_bfd_ecoff_bfd_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
- switch (bfd_get_format (abfd))
- {
- case bfd_object:
- return ecoff_link_add_object_symbols (abfd, info);
- case bfd_archive:
- return ecoff_link_add_archive_symbols (abfd, info);
- default:
- bfd_set_error (bfd_error_wrong_format);
- return FALSE;
- }
-}
-
-/* Add the symbols from an archive file to the global hash table.
- This looks through the undefined symbols, looks each one up in the
- archive hash table, and adds any associated object file. We do not
- use _bfd_generic_link_add_archive_symbols because ECOFF archives
- already have a hash table, so there is no reason to construct
- another one. */
-
-static bfd_boolean
-ecoff_link_add_archive_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
- const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
- const bfd_byte *raw_armap;
- struct bfd_link_hash_entry **pundef;
- unsigned int armap_count;
- unsigned int armap_log;
- unsigned int i;
- const bfd_byte *hashtable;
- const char *stringbase;
-
- if (! bfd_has_map (abfd))
- {
- /* An empty archive is a special case. */
- if (bfd_openr_next_archived_file (abfd, (bfd *) NULL) == NULL)
- return TRUE;
- bfd_set_error (bfd_error_no_armap);
- return FALSE;
- }
-
- /* If we don't have any raw data for this archive, as can happen on
- Irix 4.0.5F, we call the generic routine.
- FIXME: We should be more clever about this, since someday tdata
- may get to something for a generic archive. */
- raw_armap = (const bfd_byte *) bfd_ardata (abfd)->tdata;
- if (raw_armap == (bfd_byte *) NULL)
- return (_bfd_generic_link_add_archive_symbols
- (abfd, info, ecoff_link_check_archive_element));
-
- armap_count = H_GET_32 (abfd, raw_armap);
-
- armap_log = 0;
- for (i = 1; i < armap_count; i <<= 1)
- armap_log++;
- BFD_ASSERT (i == armap_count);
-
- hashtable = raw_armap + 4;
- stringbase = (const char *) raw_armap + armap_count * 8 + 8;
-
- /* Look through the list of undefined symbols. */
- pundef = &info->hash->undefs;
- while (*pundef != (struct bfd_link_hash_entry *) NULL)
- {
- struct bfd_link_hash_entry *h;
- unsigned int hash, rehash;
- unsigned int file_offset;
- const char *name;
- bfd *element;
-
- h = *pundef;
-
- /* When a symbol is defined, it is not necessarily removed from
- the list. */
- if (h->type != bfd_link_hash_undefined
- && h->type != bfd_link_hash_common)
- {
- /* Remove this entry from the list, for general cleanliness
- and because we are going to look through the list again
- if we search any more libraries. We can't remove the
- entry if it is the tail, because that would lose any
- entries we add to the list later on. */
- if (*pundef != info->hash->undefs_tail)
- *pundef = (*pundef)->und_next;
- else
- pundef = &(*pundef)->und_next;
- continue;
- }
-
- /* Native ECOFF linkers do not pull in archive elements merely
- to satisfy common definitions, so neither do we. We leave
- them on the list, though, in case we are linking against some
- other object format. */
- if (h->type != bfd_link_hash_undefined)
- {
- pundef = &(*pundef)->und_next;
- continue;
- }
-
- /* Look for this symbol in the archive hash table. */
- hash = ecoff_armap_hash (h->root.string, &rehash, armap_count,
- armap_log);
-
- file_offset = H_GET_32 (abfd, hashtable + (hash * 8) + 4);
- if (file_offset == 0)
- {
- /* Nothing in this slot. */
- pundef = &(*pundef)->und_next;
- continue;
- }
-
- name = stringbase + H_GET_32 (abfd, hashtable + (hash * 8));
- if (name[0] != h->root.string[0]
- || strcmp (name, h->root.string) != 0)
- {
- unsigned int srch;
- bfd_boolean found;
-
- /* That was the wrong symbol. Try rehashing. */
- found = FALSE;
- for (srch = (hash + rehash) & (armap_count - 1);
- srch != hash;
- srch = (srch + rehash) & (armap_count - 1))
- {
- file_offset = H_GET_32 (abfd, hashtable + (srch * 8) + 4);
- if (file_offset == 0)
- break;
- name = stringbase + H_GET_32 (abfd, hashtable + (srch * 8));
- if (name[0] == h->root.string[0]
- && strcmp (name, h->root.string) == 0)
- {
- found = TRUE;
- break;
- }
- }
-
- if (! found)
- {
- pundef = &(*pundef)->und_next;
- continue;
- }
-
- hash = srch;
- }
-
- element = (*backend->get_elt_at_filepos) (abfd, (file_ptr) file_offset);
- if (element == (bfd *) NULL)
- return FALSE;
-
- if (! bfd_check_format (element, bfd_object))
- return FALSE;
-
- /* Unlike the generic linker, we know that this element provides
- a definition for an undefined symbol and we know that we want
- to include it. We don't need to check anything. */
- if (! (*info->callbacks->add_archive_element) (info, element, name))
- return FALSE;
- if (! ecoff_link_add_object_symbols (element, info))
- return FALSE;
-
- pundef = &(*pundef)->und_next;
- }
-
- return TRUE;
-}
-
-/* This is called if we used _bfd_generic_link_add_archive_symbols
- because we were not dealing with an ECOFF archive. */
-
-static bfd_boolean
-ecoff_link_check_archive_element (abfd, info, pneeded)
- bfd *abfd;
- struct bfd_link_info *info;
- bfd_boolean *pneeded;
-{
- const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
- void (* const swap_ext_in) PARAMS ((bfd *, PTR, EXTR *))
- = backend->debug_swap.swap_ext_in;
- HDRR *symhdr;
- bfd_size_type external_ext_size;
- PTR external_ext = NULL;
- bfd_size_type esize;
- char *ssext = NULL;
- char *ext_ptr;
- char *ext_end;
-
- *pneeded = FALSE;
-
- if (! ecoff_slurp_symbolic_header (abfd))
- goto error_return;
-
- /* If there are no symbols, we don't want it. */
- if (bfd_get_symcount (abfd) == 0)
- goto successful_return;
-
- symhdr = &ecoff_data (abfd)->debug_info.symbolic_header;
-
- /* Read in the external symbols and external strings. */
- external_ext_size = backend->debug_swap.external_ext_size;
- esize = symhdr->iextMax * external_ext_size;
- external_ext = (PTR) bfd_malloc (esize);
- if (external_ext == NULL && esize != 0)
- goto error_return;
-
- if (bfd_seek (abfd, (file_ptr) symhdr->cbExtOffset, SEEK_SET) != 0
- || bfd_bread (external_ext, esize, abfd) != esize)
- goto error_return;
-
- ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax);
- if (ssext == NULL && symhdr->issExtMax != 0)
- goto error_return;
-
- if (bfd_seek (abfd, (file_ptr) symhdr->cbSsExtOffset, SEEK_SET) != 0
- || (bfd_bread (ssext, (bfd_size_type) symhdr->issExtMax, abfd)
- != (bfd_size_type) symhdr->issExtMax))
- goto error_return;
-
- /* Look through the external symbols to see if they define some
- symbol that is currently undefined. */
- ext_ptr = (char *) external_ext;
- ext_end = ext_ptr + esize;
- for (; ext_ptr < ext_end; ext_ptr += external_ext_size)
- {
- EXTR esym;
- bfd_boolean def;
- const char *name;
- struct bfd_link_hash_entry *h;
-
- (*swap_ext_in) (abfd, (PTR) ext_ptr, &esym);
-
- /* See if this symbol defines something. */
- if (esym.asym.st != stGlobal
- && esym.asym.st != stLabel
- && esym.asym.st != stProc)
- continue;
-
- switch (esym.asym.sc)
- {
- case scText:
- case scData:
- case scBss:
- case scAbs:
- case scSData:
- case scSBss:
- case scRData:
- case scCommon:
- case scSCommon:
- case scInit:
- case scFini:
- case scRConst:
- def = TRUE;
- break;
- default:
- def = FALSE;
- break;
- }
-
- if (! def)
- continue;
-
- name = ssext + esym.asym.iss;
- h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
-
- /* Unlike the generic linker, we do not pull in elements because
- of common symbols. */
- if (h == (struct bfd_link_hash_entry *) NULL
- || h->type != bfd_link_hash_undefined)
- continue;
-
- /* Include this element. */
- if (! (*info->callbacks->add_archive_element) (info, abfd, name))
- goto error_return;
- if (! ecoff_link_add_externals (abfd, info, external_ext, ssext))
- goto error_return;
-
- *pneeded = TRUE;
- goto successful_return;
- }
-
- successful_return:
- if (external_ext != NULL)
- free (external_ext);
- if (ssext != NULL)
- free (ssext);
- return TRUE;
- error_return:
- if (external_ext != NULL)
- free (external_ext);
- if (ssext != NULL)
- free (ssext);
- return FALSE;
-}
-
-/* Add symbols from an ECOFF object file to the global linker hash
- table. */
-
-static bfd_boolean
-ecoff_link_add_object_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
- HDRR *symhdr;
- bfd_size_type external_ext_size;
- PTR external_ext = NULL;
- bfd_size_type esize;
- char *ssext = NULL;
- bfd_boolean result;
-
- if (! ecoff_slurp_symbolic_header (abfd))
- return FALSE;
-
- /* If there are no symbols, we don't want it. */
- if (bfd_get_symcount (abfd) == 0)
- return TRUE;
-
- symhdr = &ecoff_data (abfd)->debug_info.symbolic_header;
-
- /* Read in the external symbols and external strings. */
- external_ext_size = ecoff_backend (abfd)->debug_swap.external_ext_size;
- esize = symhdr->iextMax * external_ext_size;
- external_ext = (PTR) bfd_malloc (esize);
- if (external_ext == NULL && esize != 0)
- goto error_return;
-
- if (bfd_seek (abfd, (file_ptr) symhdr->cbExtOffset, SEEK_SET) != 0
- || bfd_bread (external_ext, esize, abfd) != esize)
- goto error_return;
-
- ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax);
- if (ssext == NULL && symhdr->issExtMax != 0)
- goto error_return;
-
- if (bfd_seek (abfd, (file_ptr) symhdr->cbSsExtOffset, SEEK_SET) != 0
- || (bfd_bread (ssext, (bfd_size_type) symhdr->issExtMax, abfd)
- != (bfd_size_type) symhdr->issExtMax))
- goto error_return;
-
- result = ecoff_link_add_externals (abfd, info, external_ext, ssext);
-
- if (ssext != NULL)
- free (ssext);
- if (external_ext != NULL)
- free (external_ext);
- return result;
-
- error_return:
- if (ssext != NULL)
- free (ssext);
- if (external_ext != NULL)
- free (external_ext);
- return FALSE;
-}
-
/* Add the external symbols of an object file to the global linker
hash table. The external symbols and strings we are passed are
just allocated on the stack, and will be discarded. We must
@@ -3843,14 +3321,13 @@ ecoff_link_add_object_symbols (abfd, info)
We do not want to read the external symbol information again. */
static bfd_boolean
-ecoff_link_add_externals (abfd, info, external_ext, ssext)
- bfd *abfd;
- struct bfd_link_info *info;
- PTR external_ext;
- char *ssext;
+ecoff_link_add_externals (bfd *abfd,
+ struct bfd_link_info *info,
+ void * external_ext,
+ char *ssext)
{
const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
- void (* const swap_ext_in) PARAMS ((bfd *, PTR, EXTR *))
+ void (* const swap_ext_in) (bfd *, void *, EXTR *)
= backend->debug_swap.swap_ext_in;
bfd_size_type external_ext_size = backend->debug_swap.external_ext_size;
unsigned long ext_count;
@@ -3863,7 +3340,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
amt = ext_count;
amt *= sizeof (struct bfd_link_hash_entry *);
- sym_hash = (struct bfd_link_hash_entry **) bfd_alloc (abfd, amt);
+ sym_hash = bfd_alloc (abfd, amt);
if (!sym_hash)
return FALSE;
ecoff_data (abfd)->sym_hashes = (struct ecoff_link_hash_entry **) sym_hash;
@@ -3881,7 +3358,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
*sym_hash = NULL;
- (*swap_ext_in) (abfd, (PTR) ext_ptr, &esym);
+ (*swap_ext_in) (abfd, (void *) ext_ptr, &esym);
/* Skip debugging symbols. */
skip = FALSE;
@@ -3923,15 +3400,15 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
section = NULL;
break;
case scText:
- section = bfd_make_section_old_way (abfd, ".text");
+ section = bfd_make_section_old_way (abfd, _TEXT);
value -= section->vma;
break;
case scData:
- section = bfd_make_section_old_way (abfd, ".data");
+ section = bfd_make_section_old_way (abfd, _DATA);
value -= section->vma;
break;
case scBss:
- section = bfd_make_section_old_way (abfd, ".bss");
+ section = bfd_make_section_old_way (abfd, _BSS);
value -= section->vma;
break;
case scAbs:
@@ -3941,15 +3418,15 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
section = bfd_und_section_ptr;
break;
case scSData:
- section = bfd_make_section_old_way (abfd, ".sdata");
+ section = bfd_make_section_old_way (abfd, _SDATA);
value -= section->vma;
break;
case scSBss:
- section = bfd_make_section_old_way (abfd, ".sbss");
+ section = bfd_make_section_old_way (abfd, _SBSS);
value -= section->vma;
break;
case scRData:
- section = bfd_make_section_old_way (abfd, ".rdata");
+ section = bfd_make_section_old_way (abfd, _RDATA);
value -= section->vma;
break;
case scCommon:
@@ -3979,20 +3456,20 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
section = bfd_und_section_ptr;
break;
case scInit:
- section = bfd_make_section_old_way (abfd, ".init");
+ section = bfd_make_section_old_way (abfd, _INIT);
value -= section->vma;
break;
case scFini:
- section = bfd_make_section_old_way (abfd, ".fini");
+ section = bfd_make_section_old_way (abfd, _FINI);
value -= section->vma;
break;
case scRConst:
- section = bfd_make_section_old_way (abfd, ".rconst");
+ section = bfd_make_section_old_way (abfd, _RCONST);
value -= section->vma;
break;
}
- if (section == (asection *) NULL)
+ if (section == NULL)
continue;
name = ssext + esym.asym.iss;
@@ -4000,7 +3477,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name,
(flagword) (esym.weakext ? BSF_WEAK : BSF_GLOBAL),
- section, value, (const char *) NULL, TRUE, TRUE, sym_hash)))
+ section, value, NULL, TRUE, TRUE, sym_hash)))
return FALSE;
h = (struct ecoff_link_hash_entry *) *sym_hash;
@@ -4009,7 +3486,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
symbol information. */
if (info->hash->creator->flavour == bfd_get_flavour (abfd))
{
- if (h->abfd == (bfd *) NULL
+ if (h->abfd == NULL
|| (! bfd_is_und_section (section)
&& (! bfd_is_com_section (section)
|| (h->root.type != bfd_link_hash_defined
@@ -4030,7 +3507,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
on Ultrix 4.2 to handle the symbol cred in -lckrb. */
if (h->small
&& h->root.type == bfd_link_hash_common
- && strcmp (h->root.u.c.p->section->name, SCOMMON) != 0)
+ && streq (h->root.u.c.p->section->name, SCOMMON))
{
h->root.u.c.p->section = bfd_make_section_old_way (abfd,
SCOMMON);
@@ -4043,243 +3520,382 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
return TRUE;
}
-
-/* ECOFF final link routines. */
-
-static bfd_boolean ecoff_final_link_debug_accumulate
- PARAMS ((bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *,
- PTR handle));
-static bfd_boolean ecoff_link_write_external
- PARAMS ((struct ecoff_link_hash_entry *, PTR));
-static bfd_boolean ecoff_indirect_link_order
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- struct bfd_link_order *));
-static bfd_boolean ecoff_reloc_link_order
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- struct bfd_link_order *));
-/* Structure used to pass information to ecoff_link_write_external. */
+/* Add symbols from an ECOFF object file to the global linker hash
+ table. */
-struct extsym_info
+static bfd_boolean
+ecoff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
- bfd *abfd;
- struct bfd_link_info *info;
-};
+ HDRR *symhdr;
+ bfd_size_type external_ext_size;
+ void * external_ext = NULL;
+ bfd_size_type esize;
+ char *ssext = NULL;
+ bfd_boolean result;
-/* ECOFF final link routine. This looks through all the input BFDs
- and gathers together all the debugging information, and then
- processes all the link order information. This may cause it to
- close and reopen some input BFDs; I'll see how bad this is. */
+ if (! ecoff_slurp_symbolic_header (abfd))
+ return FALSE;
-bfd_boolean
-_bfd_ecoff_bfd_final_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+ /* If there are no symbols, we don't want it. */
+ if (bfd_get_symcount (abfd) == 0)
+ return TRUE;
+
+ symhdr = &ecoff_data (abfd)->debug_info.symbolic_header;
+
+ /* Read in the external symbols and external strings. */
+ external_ext_size = ecoff_backend (abfd)->debug_swap.external_ext_size;
+ esize = symhdr->iextMax * external_ext_size;
+ external_ext = bfd_malloc (esize);
+ if (external_ext == NULL && esize != 0)
+ goto error_return;
+
+ if (bfd_seek (abfd, (file_ptr) symhdr->cbExtOffset, SEEK_SET) != 0
+ || bfd_bread (external_ext, esize, abfd) != esize)
+ goto error_return;
+
+ ssext = bfd_malloc ((bfd_size_type) symhdr->issExtMax);
+ if (ssext == NULL && symhdr->issExtMax != 0)
+ goto error_return;
+
+ if (bfd_seek (abfd, (file_ptr) symhdr->cbSsExtOffset, SEEK_SET) != 0
+ || (bfd_bread (ssext, (bfd_size_type) symhdr->issExtMax, abfd)
+ != (bfd_size_type) symhdr->issExtMax))
+ goto error_return;
+
+ result = ecoff_link_add_externals (abfd, info, external_ext, ssext);
+
+ if (ssext != NULL)
+ free (ssext);
+ if (external_ext != NULL)
+ free (external_ext);
+ return result;
+
+ error_return:
+ if (ssext != NULL)
+ free (ssext);
+ if (external_ext != NULL)
+ free (external_ext);
+ return FALSE;
+}
+
+/* This is called if we used _bfd_generic_link_add_archive_symbols
+ because we were not dealing with an ECOFF archive. */
+
+static bfd_boolean
+ecoff_link_check_archive_element (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean *pneeded)
{
const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
- struct ecoff_debug_info * const debug = &ecoff_data (abfd)->debug_info;
+ void (* const swap_ext_in) (bfd *, void *, EXTR *)
+ = backend->debug_swap.swap_ext_in;
HDRR *symhdr;
- PTR handle;
- register bfd *input_bfd;
- asection *o;
- struct bfd_link_order *p;
- struct extsym_info einfo;
+ bfd_size_type external_ext_size;
+ void * external_ext = NULL;
+ bfd_size_type esize;
+ char *ssext = NULL;
+ char *ext_ptr;
+ char *ext_end;
- /* We accumulate the debugging information counts in the symbolic
- header. */
- symhdr = &debug->symbolic_header;
- symhdr->vstamp = 0;
- symhdr->ilineMax = 0;
- symhdr->cbLine = 0;
- symhdr->idnMax = 0;
- symhdr->ipdMax = 0;
- symhdr->isymMax = 0;
- symhdr->ioptMax = 0;
- symhdr->iauxMax = 0;
- symhdr->issMax = 0;
- symhdr->issExtMax = 0;
- symhdr->ifdMax = 0;
- symhdr->crfd = 0;
- symhdr->iextMax = 0;
+ *pneeded = FALSE;
- /* We accumulate the debugging information itself in the debug_info
- structure. */
- debug->line = NULL;
- debug->external_dnr = NULL;
- debug->external_pdr = NULL;
- debug->external_sym = NULL;
- debug->external_opt = NULL;
- debug->external_aux = NULL;
- debug->ss = NULL;
- debug->ssext = debug->ssext_end = NULL;
- debug->external_fdr = NULL;
- debug->external_rfd = NULL;
- debug->external_ext = debug->external_ext_end = NULL;
+ if (! ecoff_slurp_symbolic_header (abfd))
+ goto error_return;
- handle = bfd_ecoff_debug_init (abfd, debug, &backend->debug_swap, info);
- if (handle == (PTR) NULL)
- return FALSE;
+ /* If there are no symbols, we don't want it. */
+ if (bfd_get_symcount (abfd) == 0)
+ goto successful_return;
- /* Accumulate the debugging symbols from each input BFD. */
- for (input_bfd = info->input_bfds;
- input_bfd != (bfd *) NULL;
- input_bfd = input_bfd->link_next)
- {
- bfd_boolean ret;
+ symhdr = &ecoff_data (abfd)->debug_info.symbolic_header;
- if (bfd_get_flavour (input_bfd) == bfd_target_ecoff_flavour)
- {
- /* Arbitrarily set the symbolic header vstamp to the vstamp
- of the first object file in the link. */
- if (symhdr->vstamp == 0)
- symhdr->vstamp
- = ecoff_data (input_bfd)->debug_info.symbolic_header.vstamp;
- ret = ecoff_final_link_debug_accumulate (abfd, input_bfd, info,
- handle);
- }
- else
- ret = bfd_ecoff_debug_accumulate_other (handle, abfd,
- debug, &backend->debug_swap,
- input_bfd, info);
- if (! ret)
- return FALSE;
+ /* Read in the external symbols and external strings. */
+ external_ext_size = backend->debug_swap.external_ext_size;
+ esize = symhdr->iextMax * external_ext_size;
+ external_ext = bfd_malloc (esize);
+ if (external_ext == NULL && esize != 0)
+ goto error_return;
- /* Combine the register masks. */
- ecoff_data (abfd)->gprmask |= ecoff_data (input_bfd)->gprmask;
- ecoff_data (abfd)->fprmask |= ecoff_data (input_bfd)->fprmask;
- ecoff_data (abfd)->cprmask[0] |= ecoff_data (input_bfd)->cprmask[0];
- ecoff_data (abfd)->cprmask[1] |= ecoff_data (input_bfd)->cprmask[1];
- ecoff_data (abfd)->cprmask[2] |= ecoff_data (input_bfd)->cprmask[2];
- ecoff_data (abfd)->cprmask[3] |= ecoff_data (input_bfd)->cprmask[3];
- }
+ if (bfd_seek (abfd, (file_ptr) symhdr->cbExtOffset, SEEK_SET) != 0
+ || bfd_bread (external_ext, esize, abfd) != esize)
+ goto error_return;
- /* Write out the external symbols. */
- einfo.abfd = abfd;
- einfo.info = info;
- ecoff_link_hash_traverse (ecoff_hash_table (info),
- ecoff_link_write_external,
- (PTR) &einfo);
+ ssext = bfd_malloc ((bfd_size_type) symhdr->issExtMax);
+ if (ssext == NULL && symhdr->issExtMax != 0)
+ goto error_return;
- if (info->relocatable)
+ if (bfd_seek (abfd, (file_ptr) symhdr->cbSsExtOffset, SEEK_SET) != 0
+ || (bfd_bread (ssext, (bfd_size_type) symhdr->issExtMax, abfd)
+ != (bfd_size_type) symhdr->issExtMax))
+ goto error_return;
+
+ /* Look through the external symbols to see if they define some
+ symbol that is currently undefined. */
+ ext_ptr = (char *) external_ext;
+ ext_end = ext_ptr + esize;
+ for (; ext_ptr < ext_end; ext_ptr += external_ext_size)
{
- /* We need to make a pass over the link_orders to count up the
- number of relocations we will need to output, so that we know
- how much space they will take up. */
- for (o = abfd->sections; o != (asection *) NULL; o = o->next)
+ EXTR esym;
+ bfd_boolean def;
+ const char *name;
+ struct bfd_link_hash_entry *h;
+
+ (*swap_ext_in) (abfd, (void *) ext_ptr, &esym);
+
+ /* See if this symbol defines something. */
+ if (esym.asym.st != stGlobal
+ && esym.asym.st != stLabel
+ && esym.asym.st != stProc)
+ continue;
+
+ switch (esym.asym.sc)
{
- o->reloc_count = 0;
- for (p = o->link_order_head;
- p != (struct bfd_link_order *) NULL;
- p = p->next)
- if (p->type == bfd_indirect_link_order)
- o->reloc_count += p->u.indirect.section->reloc_count;
- else if (p->type == bfd_section_reloc_link_order
- || p->type == bfd_symbol_reloc_link_order)
- ++o->reloc_count;
+ case scText:
+ case scData:
+ case scBss:
+ case scAbs:
+ case scSData:
+ case scSBss:
+ case scRData:
+ case scCommon:
+ case scSCommon:
+ case scInit:
+ case scFini:
+ case scRConst:
+ def = TRUE;
+ break;
+ default:
+ def = FALSE;
+ break;
}
+
+ if (! def)
+ continue;
+
+ name = ssext + esym.asym.iss;
+ h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
+
+ /* Unlike the generic linker, we do not pull in elements because
+ of common symbols. */
+ if (h == NULL
+ || h->type != bfd_link_hash_undefined)
+ continue;
+
+ /* Include this element. */
+ if (! (*info->callbacks->add_archive_element) (info, abfd, name))
+ goto error_return;
+ if (! ecoff_link_add_externals (abfd, info, external_ext, ssext))
+ goto error_return;
+
+ *pneeded = TRUE;
+ goto successful_return;
}
- /* Compute the reloc and symbol file positions. */
- ecoff_compute_reloc_file_positions (abfd);
+ successful_return:
+ if (external_ext != NULL)
+ free (external_ext);
+ if (ssext != NULL)
+ free (ssext);
+ return TRUE;
+ error_return:
+ if (external_ext != NULL)
+ free (external_ext);
+ if (ssext != NULL)
+ free (ssext);
+ return FALSE;
+}
- /* Write out the debugging information. */
- if (! bfd_ecoff_write_accumulated_debug (handle, abfd, debug,
- &backend->debug_swap, info,
- ecoff_data (abfd)->sym_filepos))
- return FALSE;
+/* Add the symbols from an archive file to the global hash table.
+ This looks through the undefined symbols, looks each one up in the
+ archive hash table, and adds any associated object file. We do not
+ use _bfd_generic_link_add_archive_symbols because ECOFF archives
+ already have a hash table, so there is no reason to construct
+ another one. */
- bfd_ecoff_debug_free (handle, abfd, debug, &backend->debug_swap, info);
+static bfd_boolean
+ecoff_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
+{
+ const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
+ const bfd_byte *raw_armap;
+ struct bfd_link_hash_entry **pundef;
+ unsigned int armap_count;
+ unsigned int armap_log;
+ unsigned int i;
+ const bfd_byte *hashtable;
+ const char *stringbase;
- if (info->relocatable)
+ if (! bfd_has_map (abfd))
{
- /* Now reset the reloc_count field of the sections in the output
- BFD to 0, so that we can use them to keep track of how many
- relocs we have output thus far. */
- for (o = abfd->sections; o != (asection *) NULL; o = o->next)
- o->reloc_count = 0;
+ /* An empty archive is a special case. */
+ if (bfd_openr_next_archived_file (abfd, NULL) == NULL)
+ return TRUE;
+ bfd_set_error (bfd_error_no_armap);
+ return FALSE;
}
- /* Get a value for the GP register. */
- if (ecoff_data (abfd)->gp == 0)
+ /* If we don't have any raw data for this archive, as can happen on
+ Irix 4.0.5F, we call the generic routine.
+ FIXME: We should be more clever about this, since someday tdata
+ may get to something for a generic archive. */
+ raw_armap = (const bfd_byte *) bfd_ardata (abfd)->tdata;
+ if (raw_armap == NULL)
+ return (_bfd_generic_link_add_archive_symbols
+ (abfd, info, ecoff_link_check_archive_element));
+
+ armap_count = H_GET_32 (abfd, raw_armap);
+
+ armap_log = 0;
+ for (i = 1; i < armap_count; i <<= 1)
+ armap_log++;
+ BFD_ASSERT (i == armap_count);
+
+ hashtable = raw_armap + 4;
+ stringbase = (const char *) raw_armap + armap_count * 8 + 8;
+
+ /* Look through the list of undefined symbols. */
+ pundef = &info->hash->undefs;
+ while (*pundef != NULL)
{
struct bfd_link_hash_entry *h;
+ unsigned int hash, rehash;
+ unsigned int file_offset;
+ const char *name;
+ bfd *element;
- h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE);
- if (h != (struct bfd_link_hash_entry *) NULL
- && h->type == bfd_link_hash_defined)
- ecoff_data (abfd)->gp = (h->u.def.value
- + h->u.def.section->output_section->vma
- + h->u.def.section->output_offset);
- else if (info->relocatable)
+ h = *pundef;
+
+ /* When a symbol is defined, it is not necessarily removed from
+ the list. */
+ if (h->type != bfd_link_hash_undefined
+ && h->type != bfd_link_hash_common)
{
- bfd_vma lo;
+ /* Remove this entry from the list, for general cleanliness
+ and because we are going to look through the list again
+ if we search any more libraries. We can't remove the
+ entry if it is the tail, because that would lose any
+ entries we add to the list later on. */
+ if (*pundef != info->hash->undefs_tail)
+ *pundef = (*pundef)->u.undef.next;
+ else
+ pundef = &(*pundef)->u.undef.next;
+ continue;
+ }
- /* Make up a value. */
- lo = (bfd_vma) -1;
- for (o = abfd->sections; o != (asection *) NULL; o = o->next)
- {
- if (o->vma < lo
- && (strcmp (o->name, _SBSS) == 0
- || strcmp (o->name, _SDATA) == 0
- || strcmp (o->name, _LIT4) == 0
- || strcmp (o->name, _LIT8) == 0
- || strcmp (o->name, _LITA) == 0))
- lo = o->vma;
- }
- ecoff_data (abfd)->gp = lo + 0x8000;
+ /* Native ECOFF linkers do not pull in archive elements merely
+ to satisfy common definitions, so neither do we. We leave
+ them on the list, though, in case we are linking against some
+ other object format. */
+ if (h->type != bfd_link_hash_undefined)
+ {
+ pundef = &(*pundef)->u.undef.next;
+ continue;
}
- else
+
+ /* Look for this symbol in the archive hash table. */
+ hash = ecoff_armap_hash (h->root.string, &rehash, armap_count,
+ armap_log);
+
+ file_offset = H_GET_32 (abfd, hashtable + (hash * 8) + 4);
+ if (file_offset == 0)
{
- /* 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. */
+ /* Nothing in this slot. */
+ pundef = &(*pundef)->u.undef.next;
+ continue;
}
- }
- for (o = abfd->sections; o != (asection *) NULL; o = o->next)
- {
- for (p = o->link_order_head;
- p != (struct bfd_link_order *) NULL;
- p = p->next)
+ name = stringbase + H_GET_32 (abfd, hashtable + (hash * 8));
+ if (name[0] != h->root.string[0]
+ || ! streq (name, h->root.string))
{
- if (p->type == bfd_indirect_link_order
- && (bfd_get_flavour (p->u.indirect.section->owner)
- == bfd_target_ecoff_flavour))
- {
- if (! ecoff_indirect_link_order (abfd, info, o, p))
- return FALSE;
- }
- else if (p->type == bfd_section_reloc_link_order
- || p->type == bfd_symbol_reloc_link_order)
+ unsigned int srch;
+ bfd_boolean found;
+
+ /* That was the wrong symbol. Try rehashing. */
+ found = FALSE;
+ for (srch = (hash + rehash) & (armap_count - 1);
+ srch != hash;
+ srch = (srch + rehash) & (armap_count - 1))
{
- if (! ecoff_reloc_link_order (abfd, info, o, p))
- return FALSE;
+ file_offset = H_GET_32 (abfd, hashtable + (srch * 8) + 4);
+ if (file_offset == 0)
+ break;
+ name = stringbase + H_GET_32 (abfd, hashtable + (srch * 8));
+ if (name[0] == h->root.string[0]
+ && streq (name, h->root.string))
+ {
+ found = TRUE;
+ break;
+ }
}
- else
+
+ if (! found)
{
- if (! _bfd_default_link_order (abfd, info, o, p))
- return FALSE;
+ pundef = &(*pundef)->u.undef.next;
+ continue;
}
+
+ hash = srch;
}
- }
- bfd_get_symcount (abfd) = symhdr->iextMax + symhdr->isymMax;
+ element = (*backend->get_elt_at_filepos) (abfd, (file_ptr) file_offset);
+ if (element == NULL)
+ return FALSE;
- ecoff_data (abfd)->linker = TRUE;
+ if (! bfd_check_format (element, bfd_object))
+ return FALSE;
+
+ /* Unlike the generic linker, we know that this element provides
+ a definition for an undefined symbol and we know that we want
+ to include it. We don't need to check anything. */
+ if (! (*info->callbacks->add_archive_element) (info, element, name))
+ return FALSE;
+ if (! ecoff_link_add_object_symbols (element, info))
+ return FALSE;
+
+ pundef = &(*pundef)->u.undef.next;
+ }
return TRUE;
}
+/* Given an ECOFF BFD, add symbols to the global hash table as
+ appropriate. */
+
+bfd_boolean
+_bfd_ecoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
+{
+ switch (bfd_get_format (abfd))
+ {
+ case bfd_object:
+ return ecoff_link_add_object_symbols (abfd, info);
+ case bfd_archive:
+ return ecoff_link_add_archive_symbols (abfd, info);
+ default:
+ bfd_set_error (bfd_error_wrong_format);
+ return FALSE;
+ }
+}
+
+
+/* ECOFF final link routines. */
+
+/* Structure used to pass information to ecoff_link_write_external. */
+
+struct extsym_info
+{
+ bfd *abfd;
+ struct bfd_link_info *info;
+};
+
/* Accumulate the debugging information for an input BFD into the
output BFD. This must read in the symbolic information of the
input BFD. */
static bfd_boolean
-ecoff_final_link_debug_accumulate (output_bfd, input_bfd, info, handle)
- bfd *output_bfd;
- bfd *input_bfd;
- struct bfd_link_info *info;
- PTR handle;
+ecoff_final_link_debug_accumulate (bfd *output_bfd,
+ bfd *input_bfd,
+ struct bfd_link_info *info,
+ void * handle)
{
struct ecoff_debug_info * const debug = &ecoff_data (input_bfd)->debug_info;
const struct ecoff_debug_swap * const swap =
@@ -4293,7 +3909,7 @@ ecoff_final_link_debug_accumulate (output_bfd, input_bfd, info, handle)
else \
{ \
bfd_size_type amt = (bfd_size_type) size * symhdr->count; \
- debug->ptr = (type) bfd_malloc (amt); \
+ debug->ptr = bfd_malloc (amt); \
if (debug->ptr == NULL) \
{ \
ret = FALSE; \
@@ -4313,15 +3929,15 @@ ecoff_final_link_debug_accumulate (output_bfd, input_bfd, info, handle)
{
READ (line, cbLineOffset, cbLine, sizeof (unsigned char),
unsigned char *);
- READ (external_dnr, cbDnOffset, idnMax, swap->external_dnr_size, PTR);
- READ (external_pdr, cbPdOffset, ipdMax, swap->external_pdr_size, PTR);
- READ (external_sym, cbSymOffset, isymMax, swap->external_sym_size, PTR);
- READ (external_opt, cbOptOffset, ioptMax, swap->external_opt_size, PTR);
+ READ (external_dnr, cbDnOffset, idnMax, swap->external_dnr_size, void *);
+ READ (external_pdr, cbPdOffset, ipdMax, swap->external_pdr_size, void *);
+ READ (external_sym, cbSymOffset, isymMax, swap->external_sym_size, void *);
+ READ (external_opt, cbOptOffset, ioptMax, swap->external_opt_size, void *);
READ (external_aux, cbAuxOffset, iauxMax, sizeof (union aux_ext),
union aux_ext *);
READ (ss, cbSsOffset, issMax, sizeof (char), char *);
- READ (external_fdr, cbFdOffset, ifdMax, swap->external_fdr_size, PTR);
- READ (external_rfd, cbRfdOffset, crfd, swap->external_rfd_size, PTR);
+ READ (external_fdr, cbFdOffset, ifdMax, swap->external_fdr_size, void *);
+ READ (external_rfd, cbRfdOffset, crfd, swap->external_rfd_size, void *);
}
#undef READ
@@ -4370,229 +3986,49 @@ ecoff_final_link_debug_accumulate (output_bfd, input_bfd, info, handle)
return ret;
}
-/* Put out information for an external symbol. These come only from
- the hash table. */
-
-static bfd_boolean
-ecoff_link_write_external (h, data)
- struct ecoff_link_hash_entry *h;
- PTR data;
-{
- struct extsym_info *einfo = (struct extsym_info *) data;
- bfd *output_bfd = einfo->abfd;
- bfd_boolean strip;
-
- if (h->root.type == bfd_link_hash_warning)
- {
- h = (struct ecoff_link_hash_entry *) h->root.u.i.link;
- if (h->root.type == bfd_link_hash_new)
- return TRUE;
- }
-
- /* We need to check if this symbol is being stripped. */
- if (h->root.type == bfd_link_hash_undefined
- || h->root.type == bfd_link_hash_undefweak)
- strip = FALSE;
- else if (einfo->info->strip == strip_all
- || (einfo->info->strip == strip_some
- && bfd_hash_lookup (einfo->info->keep_hash,
- h->root.root.string,
- FALSE, FALSE) == NULL))
- strip = TRUE;
- else
- strip = FALSE;
-
- if (strip || h->written)
- return TRUE;
-
- if (h->abfd == (bfd *) NULL)
- {
- h->esym.jmptbl = 0;
- h->esym.cobol_main = 0;
- h->esym.weakext = 0;
- h->esym.reserved = 0;
- h->esym.ifd = ifdNil;
- h->esym.asym.value = 0;
- h->esym.asym.st = stGlobal;
-
- if (h->root.type != bfd_link_hash_defined
- && h->root.type != bfd_link_hash_defweak)
- h->esym.asym.sc = scAbs;
- else
- {
- asection *output_section;
- const char *name;
-
- output_section = h->root.u.def.section->output_section;
- name = bfd_section_name (output_section->owner, output_section);
-
- if (strcmp (name, _TEXT) == 0)
- h->esym.asym.sc = scText;
- else if (strcmp (name, _DATA) == 0)
- h->esym.asym.sc = scData;
- else if (strcmp (name, _SDATA) == 0)
- h->esym.asym.sc = scSData;
- else if (strcmp (name, _RDATA) == 0)
- h->esym.asym.sc = scRData;
- else if (strcmp (name, _BSS) == 0)
- h->esym.asym.sc = scBss;
- else if (strcmp (name, _SBSS) == 0)
- h->esym.asym.sc = scSBss;
- else if (strcmp (name, _INIT) == 0)
- h->esym.asym.sc = scInit;
- else if (strcmp (name, _FINI) == 0)
- h->esym.asym.sc = scFini;
- else if (strcmp (name, _PDATA) == 0)
- h->esym.asym.sc = scPData;
- else if (strcmp (name, _XDATA) == 0)
- h->esym.asym.sc = scXData;
- else if (strcmp (name, _RCONST) == 0)
- h->esym.asym.sc = scRConst;
- else
- h->esym.asym.sc = scAbs;
- }
-
- h->esym.asym.reserved = 0;
- h->esym.asym.index = indexNil;
- }
- else if (h->esym.ifd != -1)
- {
- struct ecoff_debug_info *debug;
-
- /* Adjust the FDR index for the symbol by that used for the
- input BFD. */
- debug = &ecoff_data (h->abfd)->debug_info;
- BFD_ASSERT (h->esym.ifd >= 0
- && h->esym.ifd < debug->symbolic_header.ifdMax);
- h->esym.ifd = debug->ifdmap[h->esym.ifd];
- }
-
- switch (h->root.type)
- {
- default:
- case bfd_link_hash_warning:
- case bfd_link_hash_new:
- abort ();
- case bfd_link_hash_undefined:
- case bfd_link_hash_undefweak:
- if (h->esym.asym.sc != scUndefined
- && h->esym.asym.sc != scSUndefined)
- h->esym.asym.sc = scUndefined;
- break;
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- if (h->esym.asym.sc == scUndefined
- || h->esym.asym.sc == scSUndefined)
- h->esym.asym.sc = scAbs;
- else if (h->esym.asym.sc == scCommon)
- h->esym.asym.sc = scBss;
- else if (h->esym.asym.sc == scSCommon)
- h->esym.asym.sc = scSBss;
- h->esym.asym.value = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- break;
- case bfd_link_hash_common:
- if (h->esym.asym.sc != scCommon
- && h->esym.asym.sc != scSCommon)
- h->esym.asym.sc = scCommon;
- h->esym.asym.value = h->root.u.c.size;
- break;
- case bfd_link_hash_indirect:
- /* We ignore these symbols, since the indirected symbol is
- already in the hash table. */
- return TRUE;
- }
-
- /* bfd_ecoff_debug_one_external uses iextMax to keep track of the
- symbol number. */
- h->indx = ecoff_data (output_bfd)->debug_info.symbolic_header.iextMax;
- h->written = 1;
-
- return (bfd_ecoff_debug_one_external
- (output_bfd, &ecoff_data (output_bfd)->debug_info,
- &ecoff_backend (output_bfd)->debug_swap, h->root.root.string,
- &h->esym));
-}
-
/* Relocate and write an ECOFF section into an ECOFF output file. */
static bfd_boolean
-ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
- bfd *output_bfd;
- struct bfd_link_info *info;
- asection *output_section;
- struct bfd_link_order *link_order;
+ecoff_indirect_link_order (bfd *output_bfd,
+ struct bfd_link_info *info,
+ asection *output_section,
+ struct bfd_link_order *link_order)
{
asection *input_section;
bfd *input_bfd;
- struct ecoff_section_tdata *section_tdata;
- bfd_size_type raw_size;
- bfd_size_type cooked_size;
bfd_byte *contents = NULL;
bfd_size_type external_reloc_size;
bfd_size_type external_relocs_size;
- PTR external_relocs = NULL;
- bfd_size_type amt;
+ void * external_relocs = NULL;
BFD_ASSERT ((output_section->flags & SEC_HAS_CONTENTS) != 0);
- if (link_order->size == 0)
- return TRUE;
-
input_section = link_order->u.indirect.section;
input_bfd = input_section->owner;
- section_tdata = ecoff_section_data (input_bfd, input_section);
-
- raw_size = input_section->_raw_size;
- cooked_size = input_section->_cooked_size;
- if (cooked_size == 0)
- cooked_size = raw_size;
+ if (input_section->size == 0)
+ return TRUE;
BFD_ASSERT (input_section->output_section == output_section);
BFD_ASSERT (input_section->output_offset == link_order->offset);
- BFD_ASSERT (cooked_size == link_order->size);
+ BFD_ASSERT (input_section->size == link_order->size);
- /* Get the section contents. We allocate memory for the larger of
- the size before relocating and the size after relocating. */
- amt = raw_size >= cooked_size ? raw_size : cooked_size;
- contents = (bfd_byte *) bfd_malloc (amt);
- if (contents == NULL && amt != 0)
+ /* Get the section contents. */
+ if (!bfd_malloc_and_get_section (input_bfd, input_section, &contents))
goto error_return;
- /* If we are relaxing, the contents may have already been read into
- memory, in which case we copy them into our new buffer. We don't
- simply reuse the old buffer in case cooked_size > raw_size. */
- if (section_tdata != (struct ecoff_section_tdata *) NULL
- && section_tdata->contents != (bfd_byte *) NULL)
- memcpy (contents, section_tdata->contents, (size_t) raw_size);
- else
- {
- if (! bfd_get_section_contents (input_bfd, input_section,
- (PTR) contents,
- (file_ptr) 0, raw_size))
- goto error_return;
- }
-
/* Get the relocs. If we are relaxing MIPS code, they will already
have been read in. Otherwise, we read them in now. */
external_reloc_size = ecoff_backend (input_bfd)->external_reloc_size;
external_relocs_size = external_reloc_size * input_section->reloc_count;
- if (section_tdata != (struct ecoff_section_tdata *) NULL
- && section_tdata->external_relocs != NULL)
- external_relocs = section_tdata->external_relocs;
- else
- {
- external_relocs = (PTR) bfd_malloc (external_relocs_size);
- if (external_relocs == NULL && external_relocs_size != 0)
- goto error_return;
+ external_relocs = bfd_malloc (external_relocs_size);
+ if (external_relocs == NULL && external_relocs_size != 0)
+ goto error_return;
- if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
- || (bfd_bread (external_relocs, external_relocs_size, input_bfd)
- != external_relocs_size))
- goto error_return;
- }
+ if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
+ || (bfd_bread (external_relocs, external_relocs_size, input_bfd)
+ != external_relocs_size))
+ goto error_return;
/* Relocate the section contents. */
if (! ((*ecoff_backend (input_bfd)->relocate_section)
@@ -4603,9 +4039,9 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
/* Write out the relocated section. */
if (! bfd_set_section_contents (output_bfd,
output_section,
- (PTR) contents,
- (file_ptr) input_section->output_offset,
- cooked_size))
+ contents,
+ input_section->output_offset,
+ input_section->size))
goto error_return;
/* If we are producing relocatable output, the relocs were
@@ -4625,14 +4061,14 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
if (contents != NULL)
free (contents);
- if (external_relocs != NULL && section_tdata == NULL)
+ if (external_relocs != NULL)
free (external_relocs);
return TRUE;
error_return:
if (contents != NULL)
free (contents);
- if (external_relocs != NULL && section_tdata == NULL)
+ if (external_relocs != NULL)
free (external_relocs);
return FALSE;
}
@@ -4643,11 +4079,10 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
with -Ur. */
static bfd_boolean
-ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
- bfd *output_bfd;
- struct bfd_link_info *info;
- asection *output_section;
- struct bfd_link_order *link_order;
+ecoff_reloc_link_order (bfd *output_bfd,
+ struct bfd_link_info *info,
+ asection *output_section,
+ struct bfd_link_order *link_order)
{
enum bfd_link_order_type type;
asection *section;
@@ -4704,7 +4139,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
/* We can't set up a reloc against a symbol correctly,
because we have no asymbol structure. Currently no
adjust_reloc_out routine cares. */
- rel.sym_ptr_ptr = (asymbol **) NULL;
+ rel.sym_ptr_ptr = NULL;
}
}
@@ -4719,8 +4154,8 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
bfd_byte *buf;
size = bfd_get_reloc_size (rel.howto);
- buf = (bfd_byte *) bfd_zmalloc (size);
- if (buf == (bfd_byte *) NULL)
+ buf = bfd_zmalloc (size);
+ if (buf == NULL)
return FALSE;
rstat = _bfd_relocate_contents (rel.howto, output_bfd,
(bfd_vma) addend, buf);
@@ -4733,19 +4168,19 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
abort ();
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info,
+ (info, NULL,
(link_order->type == bfd_section_reloc_link_order
? bfd_section_name (output_bfd, section)
: link_order->u.reloc.p->u.name),
- rel.howto->name, addend, (bfd *) NULL,
- (asection *) NULL, (bfd_vma) 0)))
+ rel.howto->name, addend, NULL,
+ NULL, (bfd_vma) 0)))
{
free (buf);
return FALSE;
}
break;
}
- ok = bfd_set_section_contents (output_bfd, output_section, (PTR) buf,
+ ok = bfd_set_section_contents (output_bfd, output_section, (void *) buf,
(file_ptr) link_order->offset, size);
free (buf);
if (! ok)
@@ -4767,14 +4202,14 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
bfd_wrapped_link_hash_lookup (output_bfd, info,
link_order->u.reloc.p->u.name,
FALSE, FALSE, TRUE));
- if (h != (struct ecoff_link_hash_entry *) NULL
+ if (h != NULL
&& h->indx != -1)
in.r_symndx = h->indx;
else
{
if (! ((*info->callbacks->unattached_reloc)
- (info, link_order->u.reloc.p->u.name, (bfd *) NULL,
- (asection *) NULL, (bfd_vma) 0)))
+ (info, link_order->u.reloc.p->u.name, NULL,
+ NULL, (bfd_vma) 0)))
return FALSE;
in.r_symndx = 0;
}
@@ -4783,40 +4218,43 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
else
{
const char *name;
+ unsigned int i;
+ static struct
+ {
+ const char * name;
+ long r_symndx;
+ }
+ section_symndx [] =
+ {
+ { _TEXT, RELOC_SECTION_TEXT },
+ { _RDATA, RELOC_SECTION_RDATA },
+ { _DATA, RELOC_SECTION_DATA },
+ { _SDATA, RELOC_SECTION_SDATA },
+ { _SBSS, RELOC_SECTION_SBSS },
+ { _BSS, RELOC_SECTION_BSS },
+ { _INIT, RELOC_SECTION_INIT },
+ { _LIT8, RELOC_SECTION_LIT8 },
+ { _LIT4, RELOC_SECTION_LIT4 },
+ { _XDATA, RELOC_SECTION_XDATA },
+ { _PDATA, RELOC_SECTION_PDATA },
+ { _FINI, RELOC_SECTION_FINI },
+ { _LITA, RELOC_SECTION_LITA },
+ { "*ABS*", RELOC_SECTION_ABS },
+ { _RCONST, RELOC_SECTION_RCONST }
+ };
name = bfd_get_section_name (output_bfd, section);
- if (strcmp (name, ".text") == 0)
- in.r_symndx = RELOC_SECTION_TEXT;
- else if (strcmp (name, ".rdata") == 0)
- in.r_symndx = RELOC_SECTION_RDATA;
- else if (strcmp (name, ".data") == 0)
- in.r_symndx = RELOC_SECTION_DATA;
- else if (strcmp (name, ".sdata") == 0)
- in.r_symndx = RELOC_SECTION_SDATA;
- else if (strcmp (name, ".sbss") == 0)
- in.r_symndx = RELOC_SECTION_SBSS;
- else if (strcmp (name, ".bss") == 0)
- in.r_symndx = RELOC_SECTION_BSS;
- else if (strcmp (name, ".init") == 0)
- in.r_symndx = RELOC_SECTION_INIT;
- else if (strcmp (name, ".lit8") == 0)
- in.r_symndx = RELOC_SECTION_LIT8;
- else if (strcmp (name, ".lit4") == 0)
- in.r_symndx = RELOC_SECTION_LIT4;
- else if (strcmp (name, ".xdata") == 0)
- in.r_symndx = RELOC_SECTION_XDATA;
- else if (strcmp (name, ".pdata") == 0)
- in.r_symndx = RELOC_SECTION_PDATA;
- else if (strcmp (name, ".fini") == 0)
- in.r_symndx = RELOC_SECTION_FINI;
- else if (strcmp (name, ".lita") == 0)
- in.r_symndx = RELOC_SECTION_LITA;
- else if (strcmp (name, "*ABS*") == 0)
- in.r_symndx = RELOC_SECTION_ABS;
- else if (strcmp (name, ".rconst") == 0)
- in.r_symndx = RELOC_SECTION_RCONST;
- else
+
+ for (i = 0; i < ARRAY_SIZE (section_symndx); i++)
+ if (streq (name, section_symndx[i].name))
+ {
+ in.r_symndx = section_symndx[i].r_symndx;
+ break;
+ }
+
+ if (i == ARRAY_SIZE (section_symndx))
abort ();
+
in.r_extern = 0;
}
@@ -4825,16 +4263,16 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
/* Get some memory and swap out the reloc. */
external_reloc_size = ecoff_backend (output_bfd)->external_reloc_size;
- rbuf = (bfd_byte *) bfd_malloc (external_reloc_size);
- if (rbuf == (bfd_byte *) NULL)
+ rbuf = bfd_malloc (external_reloc_size);
+ if (rbuf == NULL)
return FALSE;
- (*ecoff_backend (output_bfd)->swap_reloc_out) (output_bfd, &in, (PTR) rbuf);
+ (*ecoff_backend (output_bfd)->swap_reloc_out) (output_bfd, &in, (void *) rbuf);
pos = (output_section->rel_filepos
+ output_section->reloc_count * external_reloc_size);
ok = (bfd_seek (output_bfd, pos, SEEK_SET) == 0
- && (bfd_bwrite ((PTR) rbuf, external_reloc_size, output_bfd)
+ && (bfd_bwrite ((void *) rbuf, external_reloc_size, output_bfd)
== external_reloc_size));
if (ok)
@@ -4844,3 +4282,353 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
return ok;
}
+
+/* Put out information for an external symbol. These come only from
+ the hash table. */
+
+static bfd_boolean
+ecoff_link_write_external (struct ecoff_link_hash_entry *h, void * data)
+{
+ struct extsym_info *einfo = (struct extsym_info *) data;
+ bfd *output_bfd = einfo->abfd;
+ bfd_boolean strip;
+
+ if (h->root.type == bfd_link_hash_warning)
+ {
+ h = (struct ecoff_link_hash_entry *) h->root.u.i.link;
+ if (h->root.type == bfd_link_hash_new)
+ return TRUE;
+ }
+
+ /* We need to check if this symbol is being stripped. */
+ if (h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak)
+ strip = FALSE;
+ else if (einfo->info->strip == strip_all
+ || (einfo->info->strip == strip_some
+ && bfd_hash_lookup (einfo->info->keep_hash,
+ h->root.root.string,
+ FALSE, FALSE) == NULL))
+ strip = TRUE;
+ else
+ strip = FALSE;
+
+ if (strip || h->written)
+ return TRUE;
+
+ if (h->abfd == NULL)
+ {
+ h->esym.jmptbl = 0;
+ h->esym.cobol_main = 0;
+ h->esym.weakext = 0;
+ h->esym.reserved = 0;
+ h->esym.ifd = ifdNil;
+ h->esym.asym.value = 0;
+ h->esym.asym.st = stGlobal;
+
+ if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ h->esym.asym.sc = scAbs;
+ else
+ {
+ asection *output_section;
+ const char *name;
+ unsigned int i;
+ static struct
+ {
+ const char * name;
+ int sc;
+ }
+ section_storage_classes [] =
+ {
+ { _TEXT, scText },
+ { _DATA, scData },
+ { _SDATA, scSData },
+ { _RDATA, scRData },
+ { _BSS, scBss },
+ { _SBSS, scSBss },
+ { _INIT, scInit },
+ { _FINI, scFini },
+ { _PDATA, scPData },
+ { _XDATA, scXData },
+ { _RCONST, scRConst }
+ };
+
+ output_section = h->root.u.def.section->output_section;
+ name = bfd_section_name (output_section->owner, output_section);
+
+ for (i = 0; i < ARRAY_SIZE (section_storage_classes); i++)
+ if (streq (name, section_storage_classes[i].name))
+ {
+ h->esym.asym.sc = section_storage_classes[i].sc;
+ break;
+ }
+
+ if (i == ARRAY_SIZE (section_storage_classes))
+ h->esym.asym.sc = scAbs;
+ }
+
+ h->esym.asym.reserved = 0;
+ h->esym.asym.index = indexNil;
+ }
+ else if (h->esym.ifd != -1)
+ {
+ struct ecoff_debug_info *debug;
+
+ /* Adjust the FDR index for the symbol by that used for the
+ input BFD. */
+ debug = &ecoff_data (h->abfd)->debug_info;
+ BFD_ASSERT (h->esym.ifd >= 0
+ && h->esym.ifd < debug->symbolic_header.ifdMax);
+ h->esym.ifd = debug->ifdmap[h->esym.ifd];
+ }
+
+ switch (h->root.type)
+ {
+ default:
+ case bfd_link_hash_warning:
+ case bfd_link_hash_new:
+ abort ();
+ case bfd_link_hash_undefined:
+ case bfd_link_hash_undefweak:
+ if (h->esym.asym.sc != scUndefined
+ && h->esym.asym.sc != scSUndefined)
+ h->esym.asym.sc = scUndefined;
+ break;
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ if (h->esym.asym.sc == scUndefined
+ || h->esym.asym.sc == scSUndefined)
+ h->esym.asym.sc = scAbs;
+ else if (h->esym.asym.sc == scCommon)
+ h->esym.asym.sc = scBss;
+ else if (h->esym.asym.sc == scSCommon)
+ h->esym.asym.sc = scSBss;
+ h->esym.asym.value = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ break;
+ case bfd_link_hash_common:
+ if (h->esym.asym.sc != scCommon
+ && h->esym.asym.sc != scSCommon)
+ h->esym.asym.sc = scCommon;
+ h->esym.asym.value = h->root.u.c.size;
+ break;
+ case bfd_link_hash_indirect:
+ /* We ignore these symbols, since the indirected symbol is
+ already in the hash table. */
+ return TRUE;
+ }
+
+ /* bfd_ecoff_debug_one_external uses iextMax to keep track of the
+ symbol number. */
+ h->indx = ecoff_data (output_bfd)->debug_info.symbolic_header.iextMax;
+ h->written = 1;
+
+ return (bfd_ecoff_debug_one_external
+ (output_bfd, &ecoff_data (output_bfd)->debug_info,
+ &ecoff_backend (output_bfd)->debug_swap, h->root.root.string,
+ &h->esym));
+}
+
+/* ECOFF final link routine. This looks through all the input BFDs
+ and gathers together all the debugging information, and then
+ processes all the link order information. This may cause it to
+ close and reopen some input BFDs; I'll see how bad this is. */
+
+bfd_boolean
+_bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
+{
+ const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
+ struct ecoff_debug_info * const debug = &ecoff_data (abfd)->debug_info;
+ HDRR *symhdr;
+ void * handle;
+ bfd *input_bfd;
+ asection *o;
+ struct bfd_link_order *p;
+ struct extsym_info einfo;
+
+ /* We accumulate the debugging information counts in the symbolic
+ header. */
+ symhdr = &debug->symbolic_header;
+ symhdr->vstamp = 0;
+ symhdr->ilineMax = 0;
+ symhdr->cbLine = 0;
+ symhdr->idnMax = 0;
+ symhdr->ipdMax = 0;
+ symhdr->isymMax = 0;
+ symhdr->ioptMax = 0;
+ symhdr->iauxMax = 0;
+ symhdr->issMax = 0;
+ symhdr->issExtMax = 0;
+ symhdr->ifdMax = 0;
+ symhdr->crfd = 0;
+ symhdr->iextMax = 0;
+
+ /* We accumulate the debugging information itself in the debug_info
+ structure. */
+ debug->line = NULL;
+ debug->external_dnr = NULL;
+ debug->external_pdr = NULL;
+ debug->external_sym = NULL;
+ debug->external_opt = NULL;
+ debug->external_aux = NULL;
+ debug->ss = NULL;
+ debug->ssext = debug->ssext_end = NULL;
+ debug->external_fdr = NULL;
+ debug->external_rfd = NULL;
+ debug->external_ext = debug->external_ext_end = NULL;
+
+ handle = bfd_ecoff_debug_init (abfd, debug, &backend->debug_swap, info);
+ if (handle == NULL)
+ return FALSE;
+
+ /* Accumulate the debugging symbols from each input BFD. */
+ for (input_bfd = info->input_bfds;
+ input_bfd != NULL;
+ input_bfd = input_bfd->link_next)
+ {
+ bfd_boolean ret;
+
+ if (bfd_get_flavour (input_bfd) == bfd_target_ecoff_flavour)
+ {
+ /* Arbitrarily set the symbolic header vstamp to the vstamp
+ of the first object file in the link. */
+ if (symhdr->vstamp == 0)
+ symhdr->vstamp
+ = ecoff_data (input_bfd)->debug_info.symbolic_header.vstamp;
+ ret = ecoff_final_link_debug_accumulate (abfd, input_bfd, info,
+ handle);
+ }
+ else
+ ret = bfd_ecoff_debug_accumulate_other (handle, abfd,
+ debug, &backend->debug_swap,
+ input_bfd, info);
+ if (! ret)
+ return FALSE;
+
+ /* Combine the register masks. */
+ ecoff_data (abfd)->gprmask |= ecoff_data (input_bfd)->gprmask;
+ ecoff_data (abfd)->fprmask |= ecoff_data (input_bfd)->fprmask;
+ ecoff_data (abfd)->cprmask[0] |= ecoff_data (input_bfd)->cprmask[0];
+ ecoff_data (abfd)->cprmask[1] |= ecoff_data (input_bfd)->cprmask[1];
+ ecoff_data (abfd)->cprmask[2] |= ecoff_data (input_bfd)->cprmask[2];
+ ecoff_data (abfd)->cprmask[3] |= ecoff_data (input_bfd)->cprmask[3];
+ }
+
+ /* Write out the external symbols. */
+ einfo.abfd = abfd;
+ einfo.info = info;
+ ecoff_link_hash_traverse (ecoff_hash_table (info),
+ ecoff_link_write_external,
+ (void *) &einfo);
+
+ if (info->relocatable)
+ {
+ /* We need to make a pass over the link_orders to count up the
+ number of relocations we will need to output, so that we know
+ how much space they will take up. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ o->reloc_count = 0;
+ for (p = o->map_head.link_order;
+ p != NULL;
+ p = p->next)
+ if (p->type == bfd_indirect_link_order)
+ o->reloc_count += p->u.indirect.section->reloc_count;
+ else if (p->type == bfd_section_reloc_link_order
+ || p->type == bfd_symbol_reloc_link_order)
+ ++o->reloc_count;
+ }
+ }
+
+ /* Compute the reloc and symbol file positions. */
+ ecoff_compute_reloc_file_positions (abfd);
+
+ /* Write out the debugging information. */
+ if (! bfd_ecoff_write_accumulated_debug (handle, abfd, debug,
+ &backend->debug_swap, info,
+ ecoff_data (abfd)->sym_filepos))
+ return FALSE;
+
+ bfd_ecoff_debug_free (handle, abfd, debug, &backend->debug_swap, info);
+
+ if (info->relocatable)
+ {
+ /* Now reset the reloc_count field of the sections in the output
+ BFD to 0, so that we can use them to keep track of how many
+ relocs we have output thus far. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ o->reloc_count = 0;
+ }
+
+ /* Get a value for the GP register. */
+ if (ecoff_data (abfd)->gp == 0)
+ {
+ struct bfd_link_hash_entry *h;
+
+ h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE);
+ if (h != NULL
+ && h->type == bfd_link_hash_defined)
+ ecoff_data (abfd)->gp = (h->u.def.value
+ + h->u.def.section->output_section->vma
+ + h->u.def.section->output_offset);
+ else if (info->relocatable)
+ {
+ bfd_vma lo;
+
+ /* Make up a value. */
+ lo = (bfd_vma) -1;
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ if (o->vma < lo
+ && (streq (o->name, _SBSS)
+ || streq (o->name, _SDATA)
+ || streq (o->name, _LIT4)
+ || streq (o->name, _LIT8)
+ || streq (o->name, _LITA)))
+ lo = o->vma;
+ }
+ ecoff_data (abfd)->gp = lo + 0x8000;
+ }
+ 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. */
+ }
+ }
+
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ for (p = o->map_head.link_order;
+ p != NULL;
+ p = p->next)
+ {
+ if (p->type == bfd_indirect_link_order
+ && (bfd_get_flavour (p->u.indirect.section->owner)
+ == bfd_target_ecoff_flavour))
+ {
+ if (! ecoff_indirect_link_order (abfd, info, o, p))
+ return FALSE;
+ }
+ else if (p->type == bfd_section_reloc_link_order
+ || p->type == bfd_symbol_reloc_link_order)
+ {
+ if (! ecoff_reloc_link_order (abfd, info, o, p))
+ return FALSE;
+ }
+ else
+ {
+ if (! _bfd_default_link_order (abfd, info, o, p))
+ return FALSE;
+ }
+ }
+ }
+
+ bfd_get_symcount (abfd) = symhdr->iextMax + symhdr->isymMax;
+
+ ecoff_data (abfd)->linker = TRUE;
+
+ return TRUE;
+}
diff --git a/contrib/binutils/bfd/ecofflink.c b/contrib/binutils/bfd/ecofflink.c
index 9e23848fda7d..4246e94f3937 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, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
+ 2004, 2005, 2006 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.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -501,8 +501,8 @@ bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info)
ainfo = (struct accumulate *) bfd_malloc (amt);
if (!ainfo)
return NULL;
- if (! bfd_hash_table_init_n (&ainfo->fdr_hash.table, string_hash_newfunc,
- 1021))
+ if (!bfd_hash_table_init_n (&ainfo->fdr_hash.table, string_hash_newfunc,
+ sizeof (struct string_hash_entry), 1021))
return NULL;
ainfo->line = NULL;
@@ -528,7 +528,8 @@ bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info)
if (! info->relocatable)
{
- if (! bfd_hash_table_init (&ainfo->str_hash.table, string_hash_newfunc))
+ if (!bfd_hash_table_init (&ainfo->str_hash.table, string_hash_newfunc,
+ sizeof (struct string_hash_entry)))
return NULL;
/* The first entry in the string table is the empty string. */
@@ -800,20 +801,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
fdr_adr = fdr.adr;
- /* Adjust the FDR address for any changes that may have been
- made by relaxing. */
- if (input_debug->adjust != (struct ecoff_value_adjust *) NULL)
- {
- struct ecoff_value_adjust *adjust;
-
- for (adjust = input_debug->adjust;
- adjust != (struct ecoff_value_adjust *) NULL;
- adjust = adjust->next)
- if (fdr_adr >= adjust->start
- && fdr_adr < adjust->end)
- fdr.adr += adjust->adjust;
- }
-
/* FIXME: It is conceivable that this FDR points to the .init or
.fini section, in which case this will not do the right
thing. */
@@ -856,19 +843,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
case stLabel:
case stProc:
case stStaticProc:
- if (input_debug->adjust != (struct ecoff_value_adjust *) NULL)
- {
- bfd_vma value;
- struct ecoff_value_adjust *adjust;
-
- value = internal_sym.value;
- for (adjust = input_debug->adjust;
- adjust != (struct ecoff_value_adjust *) NULL;
- adjust = adjust->next)
- if (value >= adjust->start
- && value < adjust->end)
- internal_sym.value += adjust->adjust;
- }
internal_sym.value += section_adjust[internal_sym.sc];
break;
@@ -978,9 +952,8 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
output_symhdr->issMax += fdr.cbSs;
}
- if ((output_bfd->xvec->header_byteorder
- == input_bfd->xvec->header_byteorder)
- && input_debug->adjust == (struct ecoff_value_adjust *) NULL)
+ if (output_bfd->xvec->header_byteorder
+ == input_bfd->xvec->header_byteorder)
{
/* The two BFD's have the same endianness, and we don't have
to adjust the PDR addresses, so simply copying the
@@ -1036,23 +1009,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
PDR pdr;
(*input_swap->swap_pdr_in) (input_bfd, (PTR) in, &pdr);
-
- /* If we have been relaxing, we may have to adjust the
- address. */
- if (input_debug->adjust != (struct ecoff_value_adjust *) NULL)
- {
- bfd_vma adr;
- struct ecoff_value_adjust *adjust;
-
- adr = fdr_adr + pdr.adr;
- for (adjust = input_debug->adjust;
- adjust != (struct ecoff_value_adjust *) NULL;
- adjust = adjust->next)
- if (adr >= adjust->start
- && adr < adjust->end)
- pdr.adr += adjust->adjust;
- }
-
(*output_swap->swap_pdr_out) (output_bfd, &pdr, (PTR) out);
}
@@ -1199,7 +1155,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
fdr.issBase = output_symhdr->issMax;
fdr.cbSs = 0;
fdr.rss = ecoff_add_string (ainfo, info, output_debug, &fdr,
- bfd_archive_filename (input_bfd));
+ input_bfd->filename);
if (fdr.rss == -1)
return FALSE;
fdr.isymBase = output_symhdr->isymMax;
@@ -1383,10 +1339,14 @@ bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym)
- (char *) debug->external_ext)
< (symhdr->iextMax + 1) * external_ext_size)
{
- if (! ecoff_add_bytes ((char **) &debug->external_ext,
- (char **) &debug->external_ext_end,
+ char *external_ext = debug->external_ext;
+ char *external_ext_end = debug->external_ext_end;
+ if (! ecoff_add_bytes ((char **) &external_ext,
+ (char **) &external_ext_end,
(symhdr->iextMax + 1) * (size_t) external_ext_size))
return FALSE;
+ debug->external_ext = external_ext;
+ debug->external_ext_end = external_ext_end;
}
esym->asym.iss = symhdr->issExtMax;
@@ -1884,24 +1844,9 @@ mk_fdrtab (abfd, debug_info, debug_swap, line_info)
addresses do not equal the FDR vma, but they (the PDR address)
are still vma's and not offsets. Cf. comments in
'lookup_line'. */
-#if 0
- bfd_size_type external_pdr_size;
- char *pdr_ptr;
- PDR pdr;
-
- external_pdr_size = debug_swap->external_pdr_size;
-
- pdr_ptr = ((char *) debug_info->external_pdr
- + fdr_ptr->ipdFirst * external_pdr_size);
- (*debug_swap->swap_pdr_in) (abfd, (PTR) pdr_ptr, &pdr);
- /* The address of the first PDR is the offset of that
- procedure relative to the beginning of file FDR. */
- tab->base_addr = fdr_ptr->adr - pdr.adr;
-#else
/* The address of the first PDR is the offset of that
procedure relative to the beginning of file FDR. */
tab->base_addr = fdr_ptr->adr;
-#endif
}
else
{
@@ -2160,11 +2105,6 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
considerably, which is undesirable. */
external_pdr_size = debug_swap->external_pdr_size;
-#if 0 /* eraxxon: PDR addresses (pdr.adr) are not relative to FDRs!
- Leave 'offset' alone. */
- /* Make offset relative to object file's start-address. */
- offset -= tab[i].base_addr;
-#endif
/* eraxxon: The Horrible Hack: Because of the problems above, set 'i'
to 0 so we look through all FDRs.
diff --git a/contrib/binutils/bfd/ecoffswap.h b/contrib/binutils/bfd/ecoffswap.h
index 7ea03943bb01..4d93d9dd2d2c 100644
--- a/contrib/binutils/bfd/ecoffswap.h
+++ b/contrib/binutils/bfd/ecoffswap.h
@@ -1,5 +1,5 @@
/* Generic ECOFF swapping routines, for BFD.
- Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002
+ Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* NOTE: This is a header file, but it contains executable routines.
This is done this way because these routines are substantially
@@ -65,40 +65,37 @@
for all ECOFF targets, so they are defined in ecofflink.c. */
extern void _bfd_ecoff_swap_tir_in
- PARAMS ((int, const struct tir_ext *, TIR *));
+ (int, const struct tir_ext *, TIR *);
extern void _bfd_ecoff_swap_tir_out
- PARAMS ((int, const TIR *, struct tir_ext *));
+ (int, const TIR *, struct tir_ext *);
extern void _bfd_ecoff_swap_rndx_in
- PARAMS ((int, const struct rndx_ext *, RNDXR *));
+ (int, const struct rndx_ext *, RNDXR *);
extern void _bfd_ecoff_swap_rndx_out
- PARAMS ((int, const RNDXR *, struct rndx_ext *));
+ (int, const RNDXR *, struct rndx_ext *);
/* Prototypes for functions defined in this file. */
-static void ecoff_swap_hdr_in PARAMS ((bfd *, PTR, HDRR *));
-static void ecoff_swap_hdr_out PARAMS ((bfd *, const HDRR *, PTR));
-static void ecoff_swap_fdr_in PARAMS ((bfd *, PTR, FDR *));
-static void ecoff_swap_fdr_out PARAMS ((bfd *, const FDR *, PTR));
-static void ecoff_swap_pdr_in PARAMS ((bfd *, PTR, PDR *));
-static void ecoff_swap_pdr_out PARAMS ((bfd *, const PDR *, PTR));
-static void ecoff_swap_sym_in PARAMS ((bfd *, PTR, SYMR *));
-static void ecoff_swap_sym_out PARAMS ((bfd *, const SYMR *, PTR));
-static void ecoff_swap_ext_in PARAMS ((bfd *, PTR, EXTR *));
-static void ecoff_swap_ext_out PARAMS ((bfd *, const EXTR *, PTR));
-static void ecoff_swap_rfd_in PARAMS ((bfd *, PTR, RFDT *));
-static void ecoff_swap_rfd_out PARAMS ((bfd *, const RFDT *, PTR));
-static void ecoff_swap_opt_in PARAMS ((bfd *, PTR, OPTR *));
-static void ecoff_swap_opt_out PARAMS ((bfd *, const OPTR *, PTR));
-static void ecoff_swap_dnr_in PARAMS ((bfd *, PTR, DNR *));
-static void ecoff_swap_dnr_out PARAMS ((bfd *, const DNR *, PTR));
+static void ecoff_swap_hdr_in (bfd *, void *, HDRR *);
+static void ecoff_swap_hdr_out (bfd *, const HDRR *, void *);
+static void ecoff_swap_fdr_in (bfd *, void *, FDR *);
+static void ecoff_swap_fdr_out (bfd *, const FDR *, void *);
+static void ecoff_swap_pdr_in (bfd *, void *, PDR *);
+static void ecoff_swap_pdr_out (bfd *, const PDR *, void *);
+static void ecoff_swap_sym_in (bfd *, void *, SYMR *);
+static void ecoff_swap_sym_out (bfd *, const SYMR *, void *);
+static void ecoff_swap_ext_in (bfd *, void *, EXTR *);
+static void ecoff_swap_ext_out (bfd *, const EXTR *, void *);
+static void ecoff_swap_rfd_in (bfd *, void *, RFDT *);
+static void ecoff_swap_rfd_out (bfd *, const RFDT *, void *);
+static void ecoff_swap_opt_in (bfd *, void *, OPTR *);
+static void ecoff_swap_opt_out (bfd *, const OPTR *, void *);
+static void ecoff_swap_dnr_in (bfd *, void *, DNR *);
+static void ecoff_swap_dnr_out (bfd *, const DNR *, void *);
/* Swap in the symbolic header. */
static void
-ecoff_swap_hdr_in (abfd, ext_copy, intern)
- bfd *abfd;
- PTR ext_copy;
- HDRR *intern;
+ecoff_swap_hdr_in (bfd *abfd, void * ext_copy, HDRR *intern)
{
struct hdr_ext ext[1];
@@ -131,7 +128,7 @@ ecoff_swap_hdr_in (abfd, ext_copy, intern)
intern->cbExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbExtOffset);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -139,10 +136,7 @@ ecoff_swap_hdr_in (abfd, ext_copy, intern)
/* Swap out the symbolic header. */
static void
-ecoff_swap_hdr_out (abfd, intern_copy, ext_ptr)
- bfd *abfd;
- const HDRR *intern_copy;
- PTR ext_ptr;
+ecoff_swap_hdr_out (bfd *abfd, const HDRR *intern_copy, void * ext_ptr)
{
struct hdr_ext *ext = (struct hdr_ext *) ext_ptr;
HDRR intern[1];
@@ -184,10 +178,7 @@ ecoff_swap_hdr_out (abfd, intern_copy, ext_ptr)
/* Swap in the file descriptor record. */
static void
-ecoff_swap_fdr_in (abfd, ext_copy, intern)
- bfd *abfd;
- PTR ext_copy;
- FDR *intern;
+ecoff_swap_fdr_in (bfd *abfd, void * ext_copy, FDR *intern)
{
struct fdr_ext ext[1];
@@ -247,7 +238,7 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern)
intern->cbLine = ECOFF_GET_OFF (abfd, ext->f_cbLine);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -255,10 +246,7 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern)
/* Swap out the file descriptor record. */
static void
-ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr)
- bfd *abfd;
- const FDR *intern_copy;
- PTR ext_ptr;
+ecoff_swap_fdr_out (bfd *abfd, const FDR *intern_copy, void * ext_ptr)
{
struct fdr_ext *ext = (struct fdr_ext *) ext_ptr;
FDR intern[1];
@@ -319,26 +307,21 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr)
ECOFF_PUT_OFF (abfd, intern->cbLine, ext->f_cbLine);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
-#ifndef MPW_C
-
/* Swap in the procedure descriptor record. */
static void
-ecoff_swap_pdr_in (abfd, ext_copy, intern)
- bfd *abfd;
- PTR ext_copy;
- PDR *intern;
+ecoff_swap_pdr_in (bfd *abfd, void * ext_copy, PDR *intern)
{
struct pdr_ext ext[1];
*ext = *(struct pdr_ext *) ext_copy;
- memset ((PTR) intern, 0, sizeof (*intern));
+ memset ((void *) intern, 0, sizeof (*intern));
intern->adr = ECOFF_GET_OFF (abfd, ext->p_adr);
intern->isym = H_GET_32 (abfd, ext->p_isym);
@@ -386,7 +369,7 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern)
#endif
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -394,10 +377,7 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern)
/* Swap out the procedure descriptor record. */
static void
-ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
- bfd *abfd;
- const PDR *intern_copy;
- PTR ext_ptr;
+ecoff_swap_pdr_out (bfd *abfd, const PDR *intern_copy, void * ext_ptr)
{
struct pdr_ext *ext = (struct pdr_ext *) ext_ptr;
PDR intern[1];
@@ -449,90 +429,15 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
#endif
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort ();
-#endif
-}
-
-#else /* MPW_C */
-/* Same routines, but with ECOFF_64 code removed, so ^&%$#&! MPW C doesn't
- corrupt itself and then freak out. */
-/* Swap in the procedure descriptor record. */
-
-static void
-ecoff_swap_pdr_in (abfd, ext_copy, intern)
- bfd *abfd;
- PTR ext_copy;
- PDR *intern;
-{
- struct pdr_ext ext[1];
-
- *ext = *(struct pdr_ext *) ext_copy;
-
- intern->adr = ECOFF_GET_OFF (abfd, ext->p_adr);
- intern->isym = H_GET_32 (abfd, ext->p_isym);
- intern->iline = H_GET_32 (abfd, ext->p_iline);
- intern->regmask = H_GET_32 (abfd, ext->p_regmask);
- intern->regoffset = H_GET_S32 (abfd, ext->p_regoffset);
- intern->iopt = H_GET_S32 (abfd, ext->p_iopt);
- intern->fregmask = H_GET_32 (abfd, ext->p_fregmask);
- intern->fregoffset = H_GET_S32 (abfd, ext->p_fregoffset);
- intern->frameoffset = H_GET_S32 (abfd, ext->p_frameoffset);
- intern->framereg = H_GET_16 (abfd, ext->p_framereg);
- intern->pcreg = H_GET_16 (abfd, ext->p_pcreg);
- intern->lnLow = H_GET_32 (abfd, ext->p_lnLow);
- intern->lnHigh = H_GET_32 (abfd, ext->p_lnHigh);
- intern->cbLineOffset = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);
-
-#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort ();
-#endif
-}
-
-/* Swap out the procedure descriptor record. */
-
-static void
-ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
- bfd *abfd;
- const PDR *intern_copy;
- PTR ext_ptr;
-{
- struct pdr_ext *ext = (struct pdr_ext *) ext_ptr;
- PDR intern[1];
-
- /* Make it reasonable to do in-place. */
- *intern = *intern_copy;
-
- ECOFF_PUT_OFF (abfd, intern->adr, ext->p_adr);
- H_PUT_32 (abfd, intern->isym, ext->p_isym);
- H_PUT_32 (abfd, intern->iline, ext->p_iline);
- H_PUT_32 (abfd, intern->regmask, ext->p_regmask);
- H_PUT_32 (abfd, intern->regoffset, ext->p_regoffset);
- H_PUT_32 (abfd, intern->iopt, ext->p_iopt);
- H_PUT_32 (abfd, intern->fregmask, ext->p_fregmask);
- H_PUT_32 (abfd, intern->fregoffset, ext->p_fregoffset);
- H_PUT_32 (abfd, intern->frameoffset, ext->p_frameoffset);
- H_PUT_16 (abfd, intern->framereg, ext->p_framereg);
- H_PUT_16 (abfd, intern->pcreg, ext->p_pcreg);
- H_PUT_32 (abfd, intern->lnLow, ext->p_lnLow);
- H_PUT_32 (abfd, intern->lnHigh, ext->p_lnHigh);
- ECOFF_PUT_OFF (abfd, intern->cbLineOffset, ext->p_cbLineOffset);
-
-#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
-#endif /* MPW_C */
/* Swap in a symbol record. */
static void
-ecoff_swap_sym_in (abfd, ext_copy, intern)
- bfd *abfd;
- PTR ext_copy;
- SYMR *intern;
+ecoff_swap_sym_in (bfd *abfd, void * ext_copy, SYMR *intern)
{
struct sym_ext ext[1];
@@ -578,7 +483,7 @@ ecoff_swap_sym_in (abfd, ext_copy, intern)
}
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -586,10 +491,7 @@ ecoff_swap_sym_in (abfd, ext_copy, intern)
/* Swap out a symbol record. */
static void
-ecoff_swap_sym_out (abfd, intern_copy, ext_ptr)
- bfd *abfd;
- const SYMR *intern_copy;
- PTR ext_ptr;
+ecoff_swap_sym_out (bfd *abfd, const SYMR *intern_copy, void * ext_ptr)
{
struct sym_ext *ext = (struct sym_ext *) ext_ptr;
SYMR intern[1];
@@ -631,7 +533,7 @@ ecoff_swap_sym_out (abfd, intern_copy, ext_ptr)
}
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -639,10 +541,7 @@ ecoff_swap_sym_out (abfd, intern_copy, ext_ptr)
/* Swap in an external symbol record. */
static void
-ecoff_swap_ext_in (abfd, ext_copy, intern)
- bfd *abfd;
- PTR ext_copy;
- EXTR *intern;
+ecoff_swap_ext_in (bfd *abfd, void * ext_copy, EXTR *intern)
{
struct ext_ext ext[1];
@@ -673,7 +572,7 @@ ecoff_swap_ext_in (abfd, ext_copy, intern)
ecoff_swap_sym_in (abfd, &ext->es_asym, &intern->asym);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -681,10 +580,7 @@ ecoff_swap_ext_in (abfd, ext_copy, intern)
/* Swap out an external symbol record. */
static void
-ecoff_swap_ext_out (abfd, intern_copy, ext_ptr)
- bfd *abfd;
- const EXTR *intern_copy;
- PTR ext_ptr;
+ecoff_swap_ext_out (bfd *abfd, const EXTR *intern_copy, void * ext_ptr)
{
struct ext_ext *ext = (struct ext_ext *) ext_ptr;
EXTR intern[1];
@@ -726,7 +622,7 @@ ecoff_swap_ext_out (abfd, intern_copy, ext_ptr)
ecoff_swap_sym_out (abfd, &intern->asym, &ext->es_asym);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -734,17 +630,14 @@ ecoff_swap_ext_out (abfd, intern_copy, ext_ptr)
/* Swap in a relative file descriptor. */
static void
-ecoff_swap_rfd_in (abfd, ext_ptr, intern)
- bfd *abfd;
- PTR ext_ptr;
- RFDT *intern;
+ecoff_swap_rfd_in (bfd *abfd, void * ext_ptr, RFDT *intern)
{
struct rfd_ext *ext = (struct rfd_ext *) ext_ptr;
*intern = H_GET_32 (abfd, ext->rfd);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -752,17 +645,14 @@ ecoff_swap_rfd_in (abfd, ext_ptr, intern)
/* Swap out a relative file descriptor. */
static void
-ecoff_swap_rfd_out (abfd, intern, ext_ptr)
- bfd *abfd;
- const RFDT *intern;
- PTR ext_ptr;
+ecoff_swap_rfd_out (bfd *abfd, const RFDT *intern, void * ext_ptr)
{
struct rfd_ext *ext = (struct rfd_ext *) ext_ptr;
H_PUT_32 (abfd, *intern, ext->rfd);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -770,10 +660,7 @@ ecoff_swap_rfd_out (abfd, intern, ext_ptr)
/* Swap in an optimization symbol. */
static void
-ecoff_swap_opt_in (abfd, ext_copy, intern)
- bfd *abfd;
- PTR ext_copy;
- OPTR *intern;
+ecoff_swap_opt_in (bfd *abfd, void * ext_copy, OPTR * intern)
{
struct opt_ext ext[1];
@@ -803,7 +690,7 @@ ecoff_swap_opt_in (abfd, ext_copy, intern)
intern->offset = H_GET_32 (abfd, ext->o_offset);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -811,10 +698,7 @@ ecoff_swap_opt_in (abfd, ext_copy, intern)
/* Swap out an optimization symbol. */
static void
-ecoff_swap_opt_out (abfd, intern_copy, ext_ptr)
- bfd *abfd;
- const OPTR *intern_copy;
- PTR ext_ptr;
+ecoff_swap_opt_out (bfd *abfd, const OPTR *intern_copy, void * ext_ptr)
{
struct opt_ext *ext = (struct opt_ext *) ext_ptr;
OPTR intern[1];
@@ -843,7 +727,7 @@ ecoff_swap_opt_out (abfd, intern_copy, ext_ptr)
H_PUT_32 (abfd, intern->value, ext->o_offset);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -851,10 +735,7 @@ ecoff_swap_opt_out (abfd, intern_copy, ext_ptr)
/* Swap in a dense number. */
static void
-ecoff_swap_dnr_in (abfd, ext_copy, intern)
- bfd *abfd;
- PTR ext_copy;
- DNR *intern;
+ecoff_swap_dnr_in (bfd *abfd, void * ext_copy, DNR *intern)
{
struct dnr_ext ext[1];
@@ -864,7 +745,7 @@ ecoff_swap_dnr_in (abfd, ext_copy, intern)
intern->index = H_GET_32 (abfd, ext->d_index);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -872,10 +753,7 @@ ecoff_swap_dnr_in (abfd, ext_copy, intern)
/* Swap out a dense number. */
static void
-ecoff_swap_dnr_out (abfd, intern_copy, ext_ptr)
- bfd *abfd;
- const DNR *intern_copy;
- PTR ext_ptr;
+ecoff_swap_dnr_out (bfd *abfd, const DNR *intern_copy, void * ext_ptr)
{
struct dnr_ext *ext = (struct dnr_ext *) ext_ptr;
DNR intern[1];
@@ -887,7 +765,7 @@ ecoff_swap_dnr_out (abfd, intern_copy, ext_ptr)
H_PUT_32 (abfd, intern->index, ext->d_index);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
diff --git a/contrib/binutils/bfd/efi-app-ia32.c b/contrib/binutils/bfd/efi-app-ia32.c
index 92a17ef043b1..b186f907ce68 100644
--- a/contrib/binutils/bfd/efi-app-ia32.c
+++ b/contrib/binutils/bfd/efi-app-ia32.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/efi-app-ia64.c b/contrib/binutils/bfd/efi-app-ia64.c
index c7e9bcfc33c7..c2a77aca55b2 100644
--- a/contrib/binutils/bfd/efi-app-ia64.c
+++ b/contrib/binutils/bfd/efi-app-ia64.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/elf-bfd.h b/contrib/binutils/bfd/elf-bfd.h
index 110dd696c547..3fba1c228f0a 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 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _LIBELF_H_
#define _LIBELF_H_ 1
@@ -104,40 +104,6 @@ struct elf_link_hash_entry
not visible outside this DSO. */
long dynindx;
- /* String table index in .dynstr if this is a dynamic symbol. */
- unsigned long dynstr_index;
-
- /* Hash value of the name computed using the ELF hash function. */
- unsigned long elf_hash_value;
-
- /* If this is a weak defined symbol from a dynamic object, this
- field points to a defined symbol with the same value, if there is
- one. Otherwise it is NULL. */
- struct elf_link_hash_entry *weakdef;
-
- /* Version information. */
- union
- {
- /* This field is used for a symbol which is not defined in a
- regular object. It points to the version information read in
- from the dynamic object. */
- Elf_Internal_Verdef *verdef;
- /* This field is used for a symbol which is defined in a regular
- object. It is set up in size_dynamic_sections. It points to
- the version information we should write out for this symbol. */
- struct bfd_elf_version_tree *vertree;
- } verinfo;
-
- /* Virtual table entry use information. This array is nominally of size
- size/sizeof(target_void_pointer), though we have to be able to assume
- and track a size while the symbol is still undefined. It is indexed
- via offset/sizeof(target_void_pointer). */
- size_t vtable_entries_size;
- bfd_boolean *vtable_entries_used;
-
- /* Virtual table derivation info. */
- struct elf_link_hash_entry *vtable_parent;
-
/* If this symbol requires an entry in the global offset table, the
processor specific backend uses this field to track usage and
final offset. Two schemes are supported: The first assumes that
@@ -162,47 +128,89 @@ struct elf_link_hash_entry
bfd_size_type size;
/* Symbol type (STT_NOTYPE, STT_OBJECT, etc.). */
- char type;
+ unsigned int type : 8;
/* Symbol st_other value, symbol visibility. */
- unsigned char other;
+ unsigned int other : 8;
- /* Some flags; legal values follow. */
- unsigned short elf_link_hash_flags;
/* Symbol is referenced by a non-shared object. */
-#define ELF_LINK_HASH_REF_REGULAR 01
+ unsigned int ref_regular : 1;
/* Symbol is defined by a non-shared object. */
-#define ELF_LINK_HASH_DEF_REGULAR 02
+ unsigned int def_regular : 1;
/* Symbol is referenced by a shared object. */
-#define ELF_LINK_HASH_REF_DYNAMIC 04
+ unsigned int ref_dynamic : 1;
/* Symbol is defined by a shared object. */
-#define ELF_LINK_HASH_DEF_DYNAMIC 010
+ unsigned int def_dynamic : 1;
/* Symbol has a non-weak reference from a non-shared object. */
-#define ELF_LINK_HASH_REF_REGULAR_NONWEAK 020
+ unsigned int ref_regular_nonweak : 1;
/* Dynamic symbol has been adjustd. */
-#define ELF_LINK_HASH_DYNAMIC_ADJUSTED 040
+ unsigned int dynamic_adjusted : 1;
/* Symbol needs a copy reloc. */
-#define ELF_LINK_HASH_NEEDS_COPY 0100
+ unsigned int needs_copy : 1;
/* Symbol needs a procedure linkage table entry. */
-#define ELF_LINK_HASH_NEEDS_PLT 0200
+ unsigned int needs_plt : 1;
/* Symbol appears in a non-ELF input file. */
-#define ELF_LINK_NON_ELF 0400
+ unsigned int non_elf : 1;
/* Symbol should be marked as hidden in the version information. */
-#define ELF_LINK_HIDDEN 01000
+ unsigned int hidden : 1;
/* Symbol was forced to local scope due to a version script file. */
-#define ELF_LINK_FORCED_LOCAL 02000
+ unsigned int forced_local : 1;
/* Symbol was marked during garbage collection. */
-#define ELF_LINK_HASH_MARK 04000
+ unsigned int mark : 1;
/* Symbol is referenced by a non-GOT/non-PLT relocation. This is
not currently set by all the backends. */
-#define ELF_LINK_NON_GOT_REF 010000
- /* Symbol has a definition in a shared object. */
-#define ELF_LINK_DYNAMIC_DEF 020000
+ unsigned int non_got_ref : 1;
+ /* Symbol has a definition in a shared object.
+ FIXME: There is no real need for this field if def_dynamic is never
+ cleared and all places that test def_dynamic also test def_regular. */
+ unsigned int dynamic_def : 1;
/* Symbol is weak in all shared objects. */
-#define ELF_LINK_DYNAMIC_WEAK 040000
+ unsigned int dynamic_weak : 1;
/* Symbol is referenced with a relocation where C/C++ pointer equality
matters. */
-#define ELF_LINK_POINTER_EQUALITY_NEEDED 0100000
+ unsigned int pointer_equality_needed : 1;
+
+ /* String table index in .dynstr if this is a dynamic symbol. */
+ unsigned long dynstr_index;
+
+ union
+ {
+ /* If this is a weak defined symbol from a dynamic object, this
+ field points to a defined symbol with the same value, if there is
+ one. Otherwise it is NULL. */
+ struct elf_link_hash_entry *weakdef;
+
+ /* Hash value of the name computed using the ELF hash function.
+ Used part way through size_dynamic_sections, after we've finished
+ with weakdefs. */
+ unsigned long elf_hash_value;
+ } u;
+
+ /* Version information. */
+ union
+ {
+ /* This field is used for a symbol which is not defined in a
+ regular object. It points to the version information read in
+ from the dynamic object. */
+ Elf_Internal_Verdef *verdef;
+ /* This field is used for a symbol which is defined in a regular
+ object. It is set up in size_dynamic_sections. It points to
+ the version information we should write out for this symbol. */
+ struct bfd_elf_version_tree *vertree;
+ } verinfo;
+
+ struct
+ {
+ /* Virtual table entry use information. This array is nominally of size
+ size/sizeof(target_void_pointer), though we have to be able to assume
+ and track a size while the symbol is still undefined. It is indexed
+ via offset/sizeof(target_void_pointer). */
+ size_t size;
+ bfd_boolean *used;
+
+ /* Virtual table derivation info. */
+ struct elf_link_hash_entry *parent;
+ } *vtable;
};
/* Will references to this symbol always reference the symbol
@@ -218,6 +226,13 @@ struct elf_link_hash_entry
#define SYMBOL_CALLS_LOCAL(INFO, H) \
_bfd_elf_symbol_refs_local_p (H, INFO, 1)
+/* Common symbols that are turned into definitions don't have the
+ DEF_REGULAR flag set, so they might appear to be undefined. */
+#define ELF_COMMON_DEF_P(H) \
+ (!(H)->def_regular \
+ && !(H)->def_dynamic \
+ && (H)->root.type == bfd_link_hash_defined)
+
/* Records local symbols to be emitted in the dynamic symbol table. */
struct elf_link_local_dynamic_entry
@@ -254,11 +269,11 @@ struct cie
{
struct cie_header hdr;
unsigned char version;
- unsigned char augmentation[20];
- unsigned int code_align;
- int data_align;
- unsigned int ra_column;
- unsigned int augmentation_size;
+ 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;
@@ -271,18 +286,22 @@ struct cie
struct eh_cie_fde
{
- unsigned int offset;
+ /* For FDEs, this points to the CIE used. */
+ struct eh_cie_fde *cie_inf;
unsigned int size;
- asection *sec;
+ unsigned int offset;
unsigned int new_offset;
unsigned char fde_encoding;
unsigned char lsda_encoding;
unsigned char lsda_offset;
- unsigned char cie : 1;
- unsigned char removed : 1;
- unsigned char make_relative : 1;
- unsigned char make_lsda_relative : 1;
- unsigned char per_encoding_relative : 1;
+ unsigned int cie : 1;
+ unsigned int removed : 1;
+ unsigned int add_augmentation_size : 1;
+ unsigned int add_fde_encoding : 1;
+ unsigned int make_relative : 1;
+ unsigned int make_lsda_relative : 1;
+ unsigned int need_lsda_relative : 1;
+ unsigned int per_encoding_relative : 1;
};
struct eh_frame_sec_info
@@ -302,14 +321,15 @@ struct eh_frame_hdr_info
{
struct cie last_cie;
asection *last_cie_sec;
+ struct eh_cie_fde *last_cie_inf;
asection *hdr_sec;
- unsigned int last_cie_offset;
unsigned int fde_count, array_count;
struct eh_frame_array_ent *array;
/* TRUE if .eh_frame_hdr should contain the sorted search table.
We build it if we successfully read all .eh_frame input sections
and recognize them. */
bfd_boolean table;
+ bfd_boolean offsets_adjusted;
};
/* ELF linker hash table. */
@@ -329,13 +349,15 @@ struct elf_link_hash_table
/* The value to use when initialising got.refcount/offset and
plt.refcount/offset in an elf_link_hash_entry. Set to zero when
- the values are refcounts. Set to init_offset in
- size_dynamic_sections when the values may be offsets. */
- union gotplt_union init_refcount;
+ the values are refcounts. Set to init_got_offset/init_plt_offset
+ in size_dynamic_sections when the values may be offsets. */
+ union gotplt_union init_got_refcount;
+ union gotplt_union init_plt_refcount;
/* The value to use for got.refcount/offset and plt.refcount/offset
when the values may be offsets. Normally (bfd_vma) -1. */
- union gotplt_union init_offset;
+ union gotplt_union init_got_offset;
+ union gotplt_union init_plt_offset;
/* The number of symbols found in the link which must be put into
the .dynsym section. */
@@ -356,12 +378,15 @@ struct elf_link_hash_table
/* The _GLOBAL_OFFSET_TABLE_ symbol. */
struct elf_link_hash_entry *hgot;
- /* A pointer to information used to link stabs in sections. */
- void *stab_info;
+ /* The _PROCEDURE_LINKAGE_TABLE_ symbol. */
+ struct elf_link_hash_entry *hplt;
/* A pointer to information used to merge SEC_MERGE sections. */
void *merge_info;
+ /* Used to link stabs in sections. */
+ struct stab_info stab_info;
+
/* Used by eh_frame code when editing .eh_frame. */
struct eh_frame_hdr_info eh_info;
@@ -378,6 +403,10 @@ 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. */
@@ -520,6 +549,12 @@ struct bfd_elf_special_section
int attr;
};
+enum action_discarded
+ {
+ COMPLAIN = 1,
+ PRETEND = 2
+ };
+
struct elf_backend_data
{
/* The architecture for this backend. */
@@ -531,6 +566,14 @@ struct elf_backend_data
/* The maximum page size for this backend. */
bfd_vma maxpagesize;
+ /* The minimum page size for this backend. An input object will not be
+ considered page aligned unless its sections are correctly aligned for
+ pages at least this large. May be smaller than maxpagesize. */
+ bfd_vma minpagesize;
+
+ /* The BFD flags applied to sections created for dynamic linking. */
+ flagword dynamic_sec_flags;
+
/* A function to translate an ELF RELA relocation to a BFD arelent
structure. */
void (*elf_info_to_howto)
@@ -572,11 +615,16 @@ struct elf_backend_data
bfd_boolean (*elf_backend_symbol_table_processing)
(bfd *, elf_symbol_type *, unsigned int);
- /* A function to set the type of the info field. Processor-specific
+ /* A function to set the type of the info field. Processor-specific
types should be handled here. */
int (*elf_backend_get_symbol_type)
(Elf_Internal_Sym *, int);
+ /* A function to return the linker hash table entry of a symbol that
+ might be satisfied by an archive symbol. */
+ struct elf_link_hash_entry * (*elf_backend_archive_symbol_lookup)
+ (bfd *, struct bfd_link_info *, const char *);
+
/* Return true if local section symbols should have a non-null st_name.
NULL implies false. */
bfd_boolean (*elf_backend_name_local_section_symbols)
@@ -592,17 +640,22 @@ struct elf_backend_data
/* A function to handle unusual section types when creating BFD
sections from ELF sections. */
bfd_boolean (*elf_backend_section_from_shdr)
- (bfd *, Elf_Internal_Shdr *, const char *);
+ (bfd *, Elf_Internal_Shdr *, const char *, int);
- /* A function to convert machine dependent section header flags to
+ /* A function to convert machine dependent ELF section header flags to
BFD internal section header flags. */
bfd_boolean (*elf_backend_section_flags)
- (flagword *, Elf_Internal_Shdr *);
+ (flagword *, const Elf_Internal_Shdr *);
+
+ /* A function that returns a struct containing ELF section flags and
+ type for the given BFD section. */
+ const struct bfd_elf_special_section * (*get_sec_type_attr)
+ (bfd *, asection *);
/* A function to handle unusual program segment types when creating BFD
sections from ELF program segments. */
bfd_boolean (*elf_backend_section_from_phdr)
- (bfd *, Elf_Internal_Phdr *, int);
+ (bfd *, Elf_Internal_Phdr *, int, const char *);
/* A function to set up the ELF section header for a BFD section in
preparation for writing it out. This is where the flags and type
@@ -646,6 +699,11 @@ struct elf_backend_data
bfd_boolean (*elf_backend_create_dynamic_sections)
(bfd *abfd, struct bfd_link_info *info);
+ /* When creating a shared library, determine whether to omit the
+ dynamic symbol for the section. */
+ bfd_boolean (*elf_backend_omit_section_dynsym)
+ (bfd *output_bfd, struct bfd_link_info *info, asection *osec);
+
/* The CHECK_RELOCS function is called by the add_symbols phase of
the ELF backend linker. It is called once for each section with
relocs of an object file, just after the symbols for the object
@@ -660,6 +718,13 @@ struct elf_backend_data
(bfd *abfd, struct bfd_link_info *info, asection *o,
const Elf_Internal_Rela *relocs);
+ /* The CHECK_DIRECTIVES function is called once per input file by
+ the add_symbols phase of the ELF backend linker. The function
+ must inspect the bfd and create any additional symbols according
+ to any custom directives in the bfd. */
+ bfd_boolean (*check_directives)
+ (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
@@ -768,6 +833,11 @@ struct elf_backend_data
bfd_boolean (*elf_backend_modify_segment_map)
(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)
+ (struct elf_link_hash_entry *h, void *inf);
+
/* This function is called during section gc to discover the section a
particular relocation refers to. */
asection * (*gc_mark_hook)
@@ -808,7 +878,7 @@ struct elf_backend_data
newly created and plt/got refcounts and dynamic indices should not
be copied. */
void (*elf_backend_copy_indirect_symbol)
- (const struct elf_backend_data *, struct elf_link_hash_entry *,
+ (struct bfd_link_info *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *);
/* Modify any information related to dynamic linking such that the
@@ -816,15 +886,26 @@ struct elf_backend_data
void (*elf_backend_hide_symbol)
(struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean);
+ /* A function to do additional symbol fixup, called by
+ _bfd_elf_fix_symbol_flags. */
+ bfd_boolean (*elf_backend_fixup_symbol)
+ (struct bfd_link_info *, struct elf_link_hash_entry *);
+
/* Merge the backend specific symbol attribute. */
void (*elf_backend_merge_symbol_attribute)
(struct elf_link_hash_entry *, const Elf_Internal_Sym *, bfd_boolean,
bfd_boolean);
+ /* Decide whether an undefined symbol is special and can be ignored.
+ This is the case for OPTIONAL symbols on IRIX. */
+ bfd_boolean (*elf_backend_ignore_undef_symbol)
+ (struct elf_link_hash_entry *);
+
/* Emit relocations. Overrides default routine for emitting relocs,
except during a relocatable link, or if all relocs are being emitted. */
bfd_boolean (*elf_backend_emit_relocs)
- (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *);
+ (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry **);
/* Count relocations. Not called for relocatable links
or if all relocs are being preserved in the output. */
@@ -861,6 +942,17 @@ struct elf_backend_data
bfd_boolean (*elf_backend_ignore_discarded_relocs)
(asection *);
+ /* What to do when ld finds relocations against symbols defined in
+ discarded sections. */
+ unsigned int (*action_discarded)
+ (asection *);
+
+ /* This function returns the width of FDE pointers in bytes, or 0 if
+ that can't be determined for some reason. The default definition
+ goes by the bfd's EI_CLASS. */
+ unsigned int (*elf_backend_eh_frame_address_size)
+ (bfd *, asection *);
+
/* These functions tell elf-eh-frame whether to attempt to turn
absolute or lsda encodings into pc-relative ones. The default
definition enables these transformations. */
@@ -900,7 +992,41 @@ struct elf_backend_data
see elf.c, elfcode.h. */
bfd *(*elf_backend_bfd_from_remote_memory)
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, char *myaddr, int len));
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
+
+ /* This function is used by `_bfd_elf_get_synthetic_symtab';
+ see elf.c. */
+ bfd_vma (*plt_sym_val) (bfd_vma, const asection *, const arelent *);
+
+ /* Is symbol defined in common section? */
+ bfd_boolean (*common_definition) (Elf_Internal_Sym *);
+
+ /* Return a common section index for section. */
+ unsigned int (*common_section_index) (asection *);
+
+ /* Return a common section for section. */
+ asection *(*common_section) (asection *);
+
+ /* Return TRUE if we can merge 2 definitions. */
+ bfd_boolean (*merge_symbol) (struct bfd_link_info *,
+ struct elf_link_hash_entry **,
+ struct elf_link_hash_entry *,
+ Elf_Internal_Sym *, asection **,
+ bfd_vma *, unsigned int *,
+ bfd_boolean *, bfd_boolean *,
+ bfd_boolean *, bfd_boolean *,
+ bfd_boolean *, bfd_boolean *,
+ bfd_boolean *, bfd_boolean *,
+ bfd *, asection **,
+ bfd_boolean *, bfd_boolean *,
+ bfd_boolean *, bfd_boolean *,
+ bfd *, asection **);
+
+ /* Used to handle bad SHF_LINK_ORDER input. */
+ bfd_error_handler_type link_order_error_handler;
+
+ /* Name of the PLT relocation section. */
+ const char *relplt_name;
/* Alternate EM_xxxx machine codes for this backend. */
int elf_machine_alt1;
@@ -908,13 +1034,9 @@ struct elf_backend_data
const struct elf_size_info *s;
- /* An array of target specific special section map. */
+ /* An array of target specific special sections. */
const struct bfd_elf_special_section *special_sections;
- /* offset of the _GLOBAL_OFFSET_TABLE_ symbol from the start of the
- .got section */
- bfd_vma got_symbol_offset;
-
/* The size in bytes of the header for the GOT. This includes the
so-called reserved entries on some systems. */
bfd_vma got_header_size;
@@ -994,8 +1116,7 @@ struct bfd_elf_section_data
/* The number of relocations currently assigned to REL_HDR2. */
unsigned int rel_count2;
- /* The ELF section number of this section. Only used for an output
- file. */
+ /* The ELF section number of this section. */
int this_idx;
/* The ELF section number of the reloc section indicated by
@@ -1012,6 +1133,9 @@ struct bfd_elf_section_data
no dynamic symbol for this section. */
int dynindx;
+ /* A pointer to the linked-to section for SHF_LINK_ORDER. */
+ asection *linked_to;
+
/* Used by the backend linker to store the symbol hash table entries
associated with relocs against global symbols. */
struct elf_link_hash_entry **rel_hashes;
@@ -1036,6 +1160,10 @@ 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. */
+ asection *sec_group;
+
/* A linked list of sections in the group. Circular when used by
the linker. */
asection *next_in_group;
@@ -1044,19 +1172,21 @@ struct bfd_elf_section_data
void *sec_info;
};
-#define elf_section_data(sec) ((struct bfd_elf_section_data*)sec->used_by_bfd)
+#define elf_section_data(sec) ((struct bfd_elf_section_data*)(sec)->used_by_bfd)
+#define elf_linked_to_section(sec) (elf_section_data(sec)->linked_to)
#define elf_section_type(sec) (elf_section_data(sec)->this_hdr.sh_type)
#define elf_section_flags(sec) (elf_section_data(sec)->this_hdr.sh_flags)
#define elf_group_name(sec) (elf_section_data(sec)->group.name)
#define elf_group_id(sec) (elf_section_data(sec)->group.id)
#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)
+ && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
+ && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
#define get_elf_backend_data(abfd) \
((const struct elf_backend_data *) (abfd)->xvec->backend_data)
@@ -1202,7 +1332,10 @@ struct elf_obj_tdata
unsigned int cverrefs;
/* Segment flags for the PT_GNU_STACK segment. */
- unsigned int stack_flags;
+ unsigned int stack_flags;
+
+ /* Should the PT_GNU_RELRO segment be emitted? */
+ bfd_boolean relro;
/* Symbol version definitions in external objects. */
Elf_Internal_Verdef *verdef;
@@ -1295,8 +1428,8 @@ extern char *bfd_elf_get_str_section
extern Elf_Internal_Sym *bfd_elf_get_elf_syms
(bfd *, Elf_Internal_Shdr *, size_t, size_t, Elf_Internal_Sym *, void *,
Elf_External_Sym_Shndx *);
-extern const char *bfd_elf_local_sym_name
- (bfd *, Elf_Internal_Sym *);
+extern const char *bfd_elf_sym_name
+ (bfd *, Elf_Internal_Shdr *, Elf_Internal_Sym *, asection *);
extern bfd_boolean _bfd_elf_copy_private_bfd_data
(bfd *, bfd *);
@@ -1305,15 +1438,13 @@ extern bfd_boolean _bfd_elf_print_private_bfd_data
extern void bfd_elf_print_symbol
(bfd *, void *, asymbol *, bfd_print_symbol_type);
-#define elf_string_from_elf_strtab(abfd, strindex) \
- bfd_elf_string_from_elf_section (abfd, elf_elfheader(abfd)->e_shstrndx, \
- strindex)
-
extern void _bfd_elf_sprintf_vma
(bfd *, char *, bfd_vma);
extern void _bfd_elf_fprintf_vma
(bfd *, void *, bfd_vma);
+extern unsigned int _bfd_elf_eh_frame_address_size
+ (bfd *, asection *);
extern bfd_byte _bfd_elf_encode_eh_address
(bfd *abfd, struct bfd_link_info *info, asection *osec, bfd_vma offset,
asection *loc_sec, bfd_vma loc_offset, bfd_vma *encoded);
@@ -1341,7 +1472,7 @@ extern bfd_boolean bfd_elf_mkcorefile
extern Elf_Internal_Shdr *bfd_elf_find_section
(bfd *, char *);
extern bfd_boolean _bfd_elf_make_section_from_shdr
- (bfd *, Elf_Internal_Shdr *, const char *);
+ (bfd *, Elf_Internal_Shdr *, const char *, int);
extern bfd_boolean _bfd_elf_make_section_from_phdr
(bfd *, Elf_Internal_Phdr *, int, const char *);
extern struct bfd_hash_entry *_bfd_elf_link_hash_newfunc
@@ -1349,26 +1480,41 @@ extern struct bfd_hash_entry *_bfd_elf_link_hash_newfunc
extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create
(bfd *);
extern void _bfd_elf_link_hash_copy_indirect
- (const struct elf_backend_data *, struct elf_link_hash_entry *,
+ (struct bfd_link_info *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *);
extern void _bfd_elf_link_hash_hide_symbol
(struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean);
+extern bfd_boolean _bfd_elf_link_hash_fixup_symbol
+ (struct bfd_link_info *, struct elf_link_hash_entry *);
extern bfd_boolean _bfd_elf_link_hash_table_init
(struct elf_link_hash_table *, bfd *,
struct bfd_hash_entry *(*)
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *),
+ unsigned int);
extern bfd_boolean _bfd_elf_slurp_version_tables
- (bfd *);
+ (bfd *, bfd_boolean);
extern bfd_boolean _bfd_elf_merge_sections
(bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_elf_discard_group
+extern bfd_boolean _bfd_elf_match_sections_by_type
+ (bfd *, const asection *, bfd *, const asection *);
+extern bfd_boolean bfd_elf_is_group_section
+ (bfd *, const struct bfd_section *);
+extern void _bfd_elf_section_already_linked
(bfd *, struct bfd_section *);
extern void bfd_elf_set_group_contents
(bfd *, asection *, void *);
+extern asection *_bfd_elf_check_kept_section
+ (asection *);
extern void _bfd_elf_link_just_syms
(asection *, struct bfd_link_info *);
+extern bfd_boolean _bfd_elf_copy_private_header_data
+ (bfd *, bfd *);
extern bfd_boolean _bfd_elf_copy_private_symbol_data
(bfd *, asymbol *, bfd *, asymbol *);
+#define _bfd_generic_init_private_section_data \
+ _bfd_elf_init_private_section_data
+extern bfd_boolean _bfd_elf_init_private_section_data
+ (bfd *, asection *, bfd *, asection *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_copy_private_section_data
(bfd *, asection *, bfd *, asection *);
extern bfd_boolean _bfd_elf_write_object_contents
@@ -1385,6 +1531,8 @@ extern long _bfd_elf_get_dynamic_symtab_upper_bound
(bfd *);
extern long _bfd_elf_canonicalize_dynamic_symtab
(bfd *, asymbol **);
+extern long _bfd_elf_get_synthetic_symtab
+ (bfd *, long, asymbol **, long, asymbol **, asymbol **);
extern long _bfd_elf_get_reloc_upper_bound
(bfd *, sec_ptr);
extern long _bfd_elf_canonicalize_reloc
@@ -1406,6 +1554,11 @@ extern bfd_boolean _bfd_elf_set_arch_mach
extern bfd_boolean _bfd_elf_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
unsigned int *);
+extern bfd_boolean _bfd_elf_find_line
+ (bfd *, asymbol **, asymbol *, const char **, unsigned int *);
+#define _bfd_generic_find_line _bfd_elf_find_line
+extern bfd_boolean _bfd_elf_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
#define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
extern int _bfd_elf_sizeof_headers
@@ -1414,8 +1567,10 @@ extern bfd_boolean _bfd_elf_new_section_hook
(bfd *, asection *);
extern bfd_boolean _bfd_elf_init_reloc_shdr
(bfd *, Elf_Internal_Shdr *, asection *, bfd_boolean);
+extern const struct bfd_elf_special_section *_bfd_elf_get_special_section
+ (const char *, const struct bfd_elf_special_section *, unsigned int);
extern const struct bfd_elf_special_section *_bfd_elf_get_sec_type_attr
- (bfd *, const char *);
+ (bfd *, asection *);
/* If the target doesn't have reloc handling written yet: */
extern void _bfd_elf_no_info_to_howto
@@ -1463,7 +1618,7 @@ extern bfd_boolean _bfd_elf_discard_section_eh_frame
extern bfd_boolean _bfd_elf_discard_section_eh_frame_hdr
(bfd *, struct bfd_link_info *);
extern bfd_vma _bfd_elf_eh_frame_section_offset
- (bfd *, asection *, bfd_vma);
+ (bfd *, struct bfd_link_info *, asection *, bfd_vma);
extern bfd_boolean _bfd_elf_write_section_eh_frame
(bfd *, struct bfd_link_info *, asection *, bfd_byte *);
extern bfd_boolean _bfd_elf_write_section_eh_frame_hdr
@@ -1473,7 +1628,8 @@ extern bfd_boolean _bfd_elf_maybe_strip_eh_frame_hdr
extern bfd_boolean _bfd_elf_merge_symbol
(bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
- asection **, bfd_vma *, struct elf_link_hash_entry **, bfd_boolean *,
+ asection **, bfd_vma *, unsigned int *,
+ struct elf_link_hash_entry **, bfd_boolean *,
bfd_boolean *, bfd_boolean *, bfd_boolean *);
extern bfd_boolean _bfd_elf_add_default_symbol
@@ -1504,12 +1660,14 @@ extern bfd_boolean _bfd_elf_validate_reloc
extern bfd_boolean _bfd_elf_link_create_dynamic_sections
(bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_elf_link_omit_section_dynsym
+ (bfd *, struct bfd_link_info *, asection *);
extern bfd_boolean _bfd_elf_create_dynamic_sections
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_create_got_section
(bfd *, struct bfd_link_info *);
-extern unsigned long _bfd_elf_link_renumber_dynsyms
- (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 bfd_boolean _bfd_elfcore_make_pseudosection
(bfd *, char *, size_t, ufile_ptr);
@@ -1523,7 +1681,8 @@ extern bfd_boolean _bfd_elf_link_size_reloc_section
(bfd *, Elf_Internal_Shdr *, asection *);
extern bfd_boolean _bfd_elf_link_output_relocs
- (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *);
+ (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry **);
extern bfd_boolean _bfd_elf_fix_symbol_flags
(struct elf_link_hash_entry *, struct elf_info_failed *);
@@ -1540,6 +1699,12 @@ extern bfd_boolean _bfd_elf_dynamic_symbol_p
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);
+
+extern bfd_boolean _bfd_elf_setup_sections
+ (bfd *);
+
extern const bfd_target *bfd_elf32_object_p
(bfd *);
extern const bfd_target *bfd_elf32_core_file_p
@@ -1624,6 +1789,8 @@ extern void bfd_elf64_write_relocs
extern bfd_boolean bfd_elf64_slurp_reloc_table
(bfd *, asection *, asymbol **, bfd_boolean);
+extern struct elf_link_hash_entry *_bfd_elf_archive_symbol_lookup
+ (bfd *, struct bfd_link_info *, const char *);
extern bfd_boolean bfd_elf_link_add_symbols
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_add_dynamic_entry
@@ -1637,6 +1804,19 @@ extern int bfd_elf_link_record_local_dynamic_symbol
extern bfd_boolean _bfd_elf_close_and_cleanup
(bfd *);
+
+extern bfd_boolean _bfd_elf_common_definition
+ (Elf_Internal_Sym *);
+
+extern unsigned int _bfd_elf_common_section_index
+ (asection *);
+
+extern asection *_bfd_elf_common_section
+ (asection *);
+
+extern void _bfd_dwarf2_cleanup_debug_info
+ (bfd *);
+
extern bfd_reloc_status_type _bfd_elf_rel_vtable_reloc_fn
(bfd *, arelent *, struct bfd_symbol *, void *,
asection *, bfd *, char **);
@@ -1644,6 +1824,9 @@ extern bfd_reloc_status_type _bfd_elf_rel_vtable_reloc_fn
extern bfd_boolean bfd_elf_final_link
(bfd *, struct bfd_link_info *);
+extern bfd_boolean bfd_elf_gc_mark_dynamic_ref_symbol
+ (struct elf_link_hash_entry *h, void *inf);
+
extern bfd_boolean bfd_elf_gc_sections
(bfd *, struct bfd_link_info *);
@@ -1653,6 +1836,11 @@ 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 bfd_boolean _bfd_elf_gc_mark
+ (struct bfd_link_info *, asection *,
+ asection * (*) (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+
extern bfd_boolean bfd_elf_gc_common_finalize_got_offsets
(bfd *, struct bfd_link_info *);
@@ -1662,6 +1850,10 @@ 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
+ (bfd *, asection *);
+
/* Exported interface for writing elf corefile notes. */
extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int);
@@ -1680,10 +1872,13 @@ extern char *elfcore_write_lwpstatus
extern bfd *_bfd_elf32_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, char *, int));
+ int (*target_read_memory) (bfd_vma, bfd_byte *, int));
extern bfd *_bfd_elf64_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, char *, int));
+ int (*target_read_memory) (bfd_vma, bfd_byte *, int));
+
+/* Large common section. */
+extern asection _bfd_elf_large_com_section;
/* SH ELF specific routine. */
@@ -1695,10 +1890,8 @@ extern bfd_boolean _sh_elf_set_mach_from_flags
about initializing any .plt and .got entries in relocate_section. */
#define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, SHARED, H) \
((DYN) \
- && ((SHARED) \
- || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) \
- && ((H)->dynindx != -1 \
- || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0))
+ && ((SHARED) || !(H)->forced_local) \
+ && ((H)->dynindx != -1 || (H)->forced_local))
/* This macro is to avoid lots of duplicated code in the body
of xxx_relocate_section() in the various elfxx-xxxx.c files. */
diff --git a/contrib/binutils/bfd/elf-eh-frame.c b/contrib/binutils/bfd/elf-eh-frame.c
index d3777b44118a..5100e72938d9 100644
--- a/contrib/binutils/bfd/elf-eh-frame.c
+++ b/contrib/binutils/bfd/elf-eh-frame.c
@@ -1,5 +1,5 @@
/* .eh_frame section optimization.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -26,79 +26,85 @@
#define EH_FRAME_HDR_SIZE 8
-/* Helper function for reading uleb128 encoded data. */
+/* If *ITER hasn't reached END yet, read the next byte into *RESULT and
+ move onto the next byte. Return true on success. */
-static bfd_vma
-read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
- unsigned int *bytes_read_ptr)
+static inline bfd_boolean
+read_byte (bfd_byte **iter, bfd_byte *end, unsigned char *result)
{
- bfd_vma result;
- unsigned int num_read;
- int shift;
- unsigned char byte;
+ if (*iter >= end)
+ return FALSE;
+ *result = *((*iter)++);
+ return TRUE;
+}
- result = 0;
- shift = 0;
- num_read = 0;
- do
+/* Move *ITER over LENGTH bytes, or up to END, whichever is closer.
+ Return true it was possible to move LENGTH bytes. */
+
+static inline bfd_boolean
+skip_bytes (bfd_byte **iter, bfd_byte *end, bfd_size_type length)
+{
+ if ((bfd_size_type) (end - *iter) < length)
{
- byte = bfd_get_8 (abfd, (bfd_byte *) buf);
- buf++;
- num_read++;
- result |= (((bfd_vma) byte & 0x7f) << shift);
- shift += 7;
+ *iter = end;
+ return FALSE;
}
- while (byte & 0x80);
- *bytes_read_ptr = num_read;
- return result;
+ *iter += length;
+ return TRUE;
}
-/* Helper function for reading sleb128 encoded data. */
+/* Move *ITER over an leb128, stopping at END. Return true if the end
+ of the leb128 was found. */
-static bfd_signed_vma
-read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
- unsigned int * bytes_read_ptr)
+static bfd_boolean
+skip_leb128 (bfd_byte **iter, bfd_byte *end)
{
- bfd_vma result;
- int shift;
- int num_read;
unsigned char byte;
-
- result = 0;
- shift = 0;
- num_read = 0;
do
- {
- byte = bfd_get_8 (abfd, (bfd_byte *) buf);
- buf ++;
- num_read ++;
- result |= (((bfd_vma) byte & 0x7f) << shift);
- shift += 7;
- }
+ if (!read_byte (iter, end, &byte))
+ return FALSE;
while (byte & 0x80);
- if (byte & 0x40)
- result |= (((bfd_vma) -1) << (shift - 7)) << 7;
- *bytes_read_ptr = num_read;
- return result;
+ return TRUE;
+}
+
+/* Like skip_leb128, but treat the leb128 as an unsigned value and
+ store it in *VALUE. */
+
+static bfd_boolean
+read_uleb128 (bfd_byte **iter, bfd_byte *end, bfd_vma *value)
+{
+ bfd_byte *start, *p;
+
+ start = *iter;
+ if (!skip_leb128 (iter, end))
+ return FALSE;
+
+ p = *iter;
+ *value = *--p;
+ while (p > start)
+ *value = (*value << 7) | (*--p & 0x7f);
+
+ return TRUE;
}
-#define read_uleb128(VAR, BUF) \
-do \
- { \
- (VAR) = read_unsigned_leb128 (abfd, buf, &leb128_tmp); \
- (BUF) += leb128_tmp; \
- } \
-while (0)
-
-#define read_sleb128(VAR, BUF) \
-do \
- { \
- (VAR) = read_signed_leb128 (abfd, buf, &leb128_tmp); \
- (BUF) += leb128_tmp; \
- } \
-while (0)
+/* Like read_uleb128, but for signed values. */
+
+static bfd_boolean
+read_sleb128 (bfd_byte **iter, bfd_byte *end, bfd_signed_vma *value)
+{
+ bfd_byte *start, *p;
+
+ start = *iter;
+ if (!skip_leb128 (iter, end))
+ return FALSE;
+
+ p = *iter;
+ *value = ((*--p & 0x7f) ^ 0x40) - 0x40;
+ while (p > start)
+ *value = (*value << 7) | (*--p & 0x7f);
+
+ return TRUE;
+}
/* Return 0 if either encoding is variable width, or not yet known to bfd. */
@@ -200,6 +206,156 @@ int cie_compare (struct cie *c1, struct cie *c2)
return 1;
}
+/* Return the number of extra bytes that we'll be inserting into
+ ENTRY's augmentation string. */
+
+static INLINE unsigned int
+extra_augmentation_string_bytes (struct eh_cie_fde *entry)
+{
+ unsigned int size = 0;
+ if (entry->cie)
+ {
+ if (entry->add_augmentation_size)
+ size++;
+ if (entry->add_fde_encoding)
+ size++;
+ }
+ return size;
+}
+
+/* Likewise ENTRY's augmentation data. */
+
+static INLINE unsigned int
+extra_augmentation_data_bytes (struct eh_cie_fde *entry)
+{
+ unsigned int size = 0;
+ if (entry->cie)
+ {
+ if (entry->add_augmentation_size)
+ size++;
+ if (entry->add_fde_encoding)
+ size++;
+ }
+ else
+ {
+ if (entry->cie_inf->add_augmentation_size)
+ size++;
+ }
+ return size;
+}
+
+/* Return the size that ENTRY will have in the output. ALIGNMENT is the
+ required alignment of ENTRY in bytes. */
+
+static unsigned int
+size_of_output_cie_fde (struct eh_cie_fde *entry, unsigned int alignment)
+{
+ if (entry->removed)
+ return 0;
+ if (entry->size == 4)
+ return 4;
+ return (entry->size
+ + extra_augmentation_string_bytes (entry)
+ + extra_augmentation_data_bytes (entry)
+ + alignment - 1) & -alignment;
+}
+
+/* Assume that the bytes between *ITER and END are CFA instructions.
+ Try to move *ITER past the first instruction and return true on
+ success. ENCODED_PTR_WIDTH gives the width of pointer entries. */
+
+static bfd_boolean
+skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
+{
+ bfd_byte op;
+ bfd_vma length;
+
+ if (!read_byte (iter, end, &op))
+ return FALSE;
+
+ switch (op & 0x80 ? op & 0xc0 : op)
+ {
+ case DW_CFA_nop:
+ case DW_CFA_advance_loc:
+ case DW_CFA_restore:
+ /* No arguments. */
+ return TRUE;
+
+ case DW_CFA_offset:
+ case DW_CFA_restore_extended:
+ case DW_CFA_undefined:
+ case DW_CFA_same_value:
+ case DW_CFA_def_cfa_register:
+ case DW_CFA_def_cfa_offset:
+ case DW_CFA_def_cfa_offset_sf:
+ case DW_CFA_GNU_args_size:
+ /* One leb128 argument. */
+ return skip_leb128 (iter, end);
+
+ case DW_CFA_offset_extended:
+ case DW_CFA_register:
+ case DW_CFA_def_cfa:
+ case DW_CFA_offset_extended_sf:
+ case DW_CFA_GNU_negative_offset_extended:
+ case DW_CFA_def_cfa_sf:
+ /* Two leb128 arguments. */
+ return (skip_leb128 (iter, end)
+ && skip_leb128 (iter, end));
+
+ case DW_CFA_def_cfa_expression:
+ /* A variable-length argument. */
+ return (read_uleb128 (iter, end, &length)
+ && skip_bytes (iter, end, length));
+
+ case DW_CFA_expression:
+ /* A leb128 followed by a variable-length argument. */
+ return (skip_leb128 (iter, end)
+ && read_uleb128 (iter, end, &length)
+ && skip_bytes (iter, end, length));
+
+ case DW_CFA_set_loc:
+ return skip_bytes (iter, end, encoded_ptr_width);
+
+ case DW_CFA_advance_loc1:
+ return skip_bytes (iter, end, 1);
+
+ case DW_CFA_advance_loc2:
+ return skip_bytes (iter, end, 2);
+
+ case DW_CFA_advance_loc4:
+ return skip_bytes (iter, end, 4);
+
+ case DW_CFA_MIPS_advance_loc8:
+ return skip_bytes (iter, end, 8);
+
+ default:
+ return FALSE;
+ }
+}
+
+/* Try to interpret the bytes between BUF and END as CFA instructions.
+ If every byte makes sense, return a pointer to the first DW_CFA_nop
+ padding byte, or END if there is no padding. Return null otherwise.
+ 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)
+{
+ bfd_byte *last;
+
+ last = buf;
+ while (buf < end)
+ if (*buf == DW_CFA_nop)
+ buf++;
+ else
+ {
+ if (!skip_cfa_op (&buf, end, encoded_ptr_width))
+ return 0;
+ last = buf;
+ }
+ return last;
+}
+
/* This function is called for each input file before the .eh_frame
section is relocated. It discards duplicate CIEs and FDEs for discarded
functions. The function returns TRUE iff any entries have been
@@ -211,20 +367,24 @@ _bfd_elf_discard_section_eh_frame
bfd_boolean (*reloc_symbol_deleted_p) (bfd_vma, void *),
struct elf_reloc_cookie *cookie)
{
+#define REQUIRE(COND) \
+ do \
+ if (!(COND)) \
+ goto free_no_table; \
+ 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;
struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
struct eh_frame_sec_info *sec_info = NULL;
- unsigned int leb128_tmp;
- unsigned int cie_usage_count, last_cie_ndx, i, offset;
- unsigned int make_relative, make_lsda_relative;
- bfd_size_type new_size;
+ unsigned int cie_usage_count, offset;
unsigned int ptr_size;
- if (sec->_raw_size == 0)
+ if (sec->size == 0)
{
/* This file does not contain .eh_frame information. */
return FALSE;
@@ -234,7 +394,7 @@ _bfd_elf_discard_section_eh_frame
&& 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. */
+ link, so we should just ignore them. */
return FALSE;
}
@@ -243,14 +403,9 @@ _bfd_elf_discard_section_eh_frame
/* Read the frame unwind information from abfd. */
- ehbuf = bfd_malloc (sec->_raw_size);
- if (ehbuf == NULL)
- goto free_no_table;
-
- if (! bfd_get_section_contents (abfd, sec, ehbuf, 0, sec->_raw_size))
- goto free_no_table;
+ REQUIRE (bfd_malloc_and_get_section (abfd, sec, &ehbuf));
- if (sec->_raw_size >= 4
+ if (sec->size >= 4
&& bfd_get_32 (abfd, ehbuf) == 0
&& cookie->rel == cookie->relend)
{
@@ -261,90 +416,97 @@ _bfd_elf_discard_section_eh_frame
/* If .eh_frame section size doesn't fit into int, we cannot handle
it (it would need to use 64-bit .eh_frame format anyway). */
- if (sec->_raw_size != (unsigned int) sec->_raw_size)
- goto free_no_table;
+ REQUIRE (sec->size == (unsigned int) sec->size);
+
+ ptr_size = (get_elf_backend_data (abfd)
+ ->elf_backend_eh_frame_address_size (abfd, sec));
+ REQUIRE (ptr_size != 0);
- ptr_size = (elf_elfheader (abfd)->e_ident[EI_CLASS]
- == ELFCLASS64) ? 8 : 4;
buf = ehbuf;
last_cie = NULL;
- last_cie_ndx = 0;
+ last_cie_inf = NULL;
memset (&cie, 0, sizeof (cie));
cie_usage_count = 0;
- new_size = sec->_raw_size;
- make_relative = hdr_info->last_cie.make_relative;
- make_lsda_relative = hdr_info->last_cie.make_lsda_relative;
sec_info = bfd_zmalloc (sizeof (struct eh_frame_sec_info)
+ 99 * sizeof (struct eh_cie_fde));
- if (sec_info == NULL)
- goto free_no_table;
+ REQUIRE (sec_info);
+
sec_info->alloced = 100;
#define ENSURE_NO_RELOCS(buf) \
- if (cookie->rel < cookie->relend \
- && (cookie->rel->r_offset \
- < (bfd_size_type) ((buf) - ehbuf)) \
- && cookie->rel->r_info != 0) \
- goto free_no_table
+ REQUIRE (!(cookie->rel < cookie->relend \
+ && (cookie->rel->r_offset \
+ < (bfd_size_type) ((buf) - ehbuf)) \
+ && cookie->rel->r_info != 0))
#define SKIP_RELOCS(buf) \
while (cookie->rel < cookie->relend \
- && (cookie->rel->r_offset \
+ && (cookie->rel->r_offset \
< (bfd_size_type) ((buf) - ehbuf))) \
cookie->rel++
#define GET_RELOC(buf) \
((cookie->rel < cookie->relend \
&& (cookie->rel->r_offset \
- == (bfd_size_type) ((buf) - ehbuf))) \
+ == (bfd_size_type) ((buf) - ehbuf))) \
? cookie->rel : NULL)
for (;;)
{
- unsigned char *aug;
+ char *aug;
+ bfd_byte *start, *end, *insns;
+ bfd_size_type length;
if (sec_info->count == sec_info->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)
- * sizeof (struct eh_cie_fde));
- if (sec_info == NULL)
- goto free_no_table;
+ + ((sec_info->alloced + 99)
+ * sizeof (struct eh_cie_fde)));
+ REQUIRE (sec_info);
memset (&sec_info->entry[sec_info->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);
}
+ 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->_raw_size)
- hdr.id = (unsigned int) -1;
+ if ((bfd_size_type) (buf - ehbuf) == sec->size)
+ {
+ hdr.length = 0;
+ hdr.id = (unsigned int) -1;
+ end = buf;
+ }
else
{
- if ((bfd_size_type) (buf + 4 - ehbuf) > sec->_raw_size)
- /* No space for CIE/FDE header length. */
- goto free_no_table;
-
- hdr.length = bfd_get_32 (abfd, buf);
- if (hdr.length == 0xffffffff)
- /* 64-bit .eh_frame is not supported. */
- goto free_no_table;
- buf += 4;
- if ((bfd_size_type) (buf - ehbuf) + hdr.length > sec->_raw_size)
- /* CIE/FDE not contained fully in this .eh_frame input section. */
- goto free_no_table;
+ /* Read the length of the entry. */
+ REQUIRE (skip_bytes (&buf, ehbuf + sec->size, 4));
+ hdr.length = bfd_get_32 (abfd, buf - 4);
- sec_info->entry[sec_info->count].offset = last_fde - ehbuf;
- sec_info->entry[sec_info->count].size = 4 + hdr.length;
+ /* 64-bit .eh_frame is not supported. */
+ REQUIRE (hdr.length != 0xffffffff);
+
+ /* 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;
+
+ this_inf->offset = last_fde - ehbuf;
+ this_inf->size = 4 + hdr.length;
if (hdr.length == 0)
{
- /* CIE with length 0 must be only the last in the section. */
- if ((bfd_size_type) (buf - ehbuf) < sec->_raw_size)
- goto free_no_table;
+ /* 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
@@ -353,10 +515,9 @@ _bfd_elf_discard_section_eh_frame
}
else
{
- hdr.id = bfd_get_32 (abfd, buf);
- buf += 4;
- if (hdr.id == (unsigned int) -1)
- goto free_no_table;
+ REQUIRE (skip_bytes (&buf, end, 4));
+ hdr.id = bfd_get_32 (abfd, buf - 4);
+ REQUIRE (hdr.id != (unsigned int) -1);
}
}
@@ -377,23 +538,14 @@ _bfd_elf_discard_section_eh_frame
== hdr_info->last_cie_sec->output_section)
&& cie_compare (&cie, &hdr_info->last_cie) == 0)
|| cie_usage_count == 0)
- {
- new_size -= cie.hdr.length + 4;
- sec_info->entry[last_cie_ndx].removed = 1;
- sec_info->entry[last_cie_ndx].sec = hdr_info->last_cie_sec;
- sec_info->entry[last_cie_ndx].new_offset
- = hdr_info->last_cie_offset;
- }
+ last_cie_inf->removed = 1;
else
{
hdr_info->last_cie = cie;
hdr_info->last_cie_sec = sec;
- hdr_info->last_cie_offset = last_cie - ehbuf;
- sec_info->entry[last_cie_ndx].make_relative
- = cie.make_relative;
- sec_info->entry[last_cie_ndx].make_lsda_relative
- = cie.make_lsda_relative;
- sec_info->entry[last_cie_ndx].per_encoding_relative
+ 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;
}
}
@@ -401,22 +553,20 @@ _bfd_elf_discard_section_eh_frame
if (hdr.id == (unsigned int) -1)
break;
- last_cie_ndx = sec_info->count;
- sec_info->entry[sec_info->count].cie = 1;
+ last_cie_inf = this_inf;
+ this_inf->cie = 1;
cie_usage_count = 0;
memset (&cie, 0, sizeof (cie));
cie.hdr = hdr;
- cie.version = *buf++;
+ REQUIRE (read_byte (&buf, end, &cie.version));
/* Cannot handle unknown versions. */
- if (cie.version != 1)
- goto free_no_table;
- if (strlen (buf) > sizeof (cie.augmentation) - 1)
- goto free_no_table;
+ REQUIRE (cie.version == 1 || cie.version == 3);
+ REQUIRE (strlen ((char *) buf) < sizeof (cie.augmentation));
- strcpy (cie.augmentation, buf);
- buf = strchr (buf, '\0') + 1;
+ strcpy (cie.augmentation, (char *) buf);
+ buf = (bfd_byte *) strchr ((char *) buf, '\0') + 1;
ENSURE_NO_RELOCS (buf);
if (buf[0] == 'e' && buf[1] == 'h')
{
@@ -424,17 +574,18 @@ _bfd_elf_discard_section_eh_frame
/* We cannot merge "eh" CIEs because __EXCEPTION_TABLE__
is private to each CIE, so we don't need it for anything.
Just skip it. */
- buf += ptr_size;
+ REQUIRE (skip_bytes (&buf, end, ptr_size));
SKIP_RELOCS (buf);
}
- read_uleb128 (cie.code_align, buf);
- read_sleb128 (cie.data_align, buf);
- /* Note - in DWARF2 the return address column is an unsigned byte.
- In DWARF3 it is a ULEB128. We are following DWARF3. For most
- ports this will not matter as the value will be less than 128.
- For the others (eg FRV, SH, MMIX, IA64) they need a fixed GCC
- which conforms to the DWARF3 standard. */
- read_uleb128 (cie.ra_column, buf);
+ 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++;
+ }
+ else
+ 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;
@@ -445,7 +596,7 @@ _bfd_elf_discard_section_eh_frame
if (*aug == 'z')
{
aug++;
- read_uleb128 (cie.augmentation_size, buf);
+ REQUIRE (read_uleb128 (&buf, end, &cie.augmentation_size));
ENSURE_NO_RELOCS (buf);
}
@@ -453,30 +604,30 @@ _bfd_elf_discard_section_eh_frame
switch (*aug++)
{
case 'L':
- cie.lsda_encoding = *buf++;
+ REQUIRE (read_byte (&buf, end, &cie.lsda_encoding));
ENSURE_NO_RELOCS (buf);
- if (get_DW_EH_PE_width (cie.lsda_encoding, ptr_size) == 0)
- goto free_no_table;
+ REQUIRE (get_DW_EH_PE_width (cie.lsda_encoding, ptr_size));
break;
case 'R':
- cie.fde_encoding = *buf++;
+ REQUIRE (read_byte (&buf, end, &cie.fde_encoding));
ENSURE_NO_RELOCS (buf);
- if (get_DW_EH_PE_width (cie.fde_encoding, ptr_size) == 0)
- goto free_no_table;
+ REQUIRE (get_DW_EH_PE_width (cie.fde_encoding, ptr_size));
+ break;
+ case 'S':
break;
case 'P':
{
int per_width;
- cie.per_encoding = *buf++;
+ REQUIRE (read_byte (&buf, end, &cie.per_encoding));
per_width = get_DW_EH_PE_width (cie.per_encoding,
ptr_size);
- if (per_width == 0)
- goto free_no_table;
+ REQUIRE (per_width);
if ((cie.per_encoding & 0xf0) == DW_EH_PE_aligned)
- buf = (ehbuf
- + ((buf - ehbuf + per_width - 1)
- & ~((bfd_size_type) per_width - 1)));
+ {
+ 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. */
@@ -504,9 +655,12 @@ _bfd_elf_discard_section_eh_frame
cie.personality = h;
}
- cookie->rel++;
+ /* Cope with MIPS-style composite relocations. */
+ do
+ cookie->rel++;
+ while (GET_RELOC (buf) != NULL);
}
- buf += per_width;
+ REQUIRE (skip_bytes (&buf, end, per_width));
}
break;
default:
@@ -517,12 +671,25 @@ _bfd_elf_discard_section_eh_frame
/* For shared libraries, try to get rid of as many RELATIVE relocs
as possible. */
- if (info->shared
+ if (info->shared
&& (get_elf_backend_data (abfd)
->elf_backend_can_make_relative_eh_frame
- (abfd, info, sec))
- && (cie.fde_encoding & 0xf0) == DW_EH_PE_absptr)
- cie.make_relative = 1;
+ (abfd, info, sec)))
+ {
+ 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)
+ {
+ if (*cie.augmentation == 0)
+ this_inf->add_augmentation_size = 1;
+ this_inf->add_fde_encoding = 1;
+ cie.make_relative = 1;
+ }
+ }
if (info->shared
&& (get_elf_backend_data (abfd)
@@ -536,12 +703,13 @@ _bfd_elf_discard_section_eh_frame
if (cie.fde_encoding == DW_EH_PE_omit)
cie.fde_encoding = DW_EH_PE_absptr;
- initial_insn_length = cie.hdr.length - (buf - last_fde - 4);
+ initial_insn_length = end - buf;
if (initial_insn_length <= 50)
{
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;
@@ -549,21 +717,16 @@ _bfd_elf_discard_section_eh_frame
else
{
/* Ensure this FDE uses the last CIE encountered. */
- if (last_cie == NULL
- || hdr.id != (unsigned int) (buf - 4 - last_cie))
- goto free_no_table;
+ REQUIRE (last_cie);
+ REQUIRE (hdr.id == (unsigned int) (buf - 4 - last_cie));
ENSURE_NO_RELOCS (buf);
- if (GET_RELOC (buf) == NULL)
- /* This should not happen. */
- goto free_no_table;
+ REQUIRE (GET_RELOC (buf));
+
if ((*reloc_symbol_deleted_p) (buf - ehbuf, cookie))
- {
- /* This is a FDE against a discarded section. It should
- be deleted. */
- new_size -= hdr.length + 4;
- sec_info->entry[sec_info->count].removed = 1;
- }
+ /* This is a FDE against a discarded section. It should
+ be deleted. */
+ this_inf->removed = 1;
else
{
if (info->shared
@@ -580,24 +743,47 @@ _bfd_elf_discard_section_eh_frame
cie_usage_count++;
hdr_info->fde_count++;
}
+ /* Skip the initial location and address range. */
+ start = buf;
+ 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')
+ REQUIRE (read_uleb128 (&buf, end, &length));
+ else
+ length = 0;
+
+ /* 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)
{
- unsigned int dummy;
-
- aug = buf;
- buf += 2 * get_DW_EH_PE_width (cie.fde_encoding, ptr_size);
- if (cie.augmentation[0] == 'z')
- read_uleb128 (dummy, buf);
- /* If some new augmentation data is added before LSDA
- in FDE augmentation area, this need to be adjusted. */
- sec_info->entry[sec_info->count].lsda_offset = (buf - aug);
+ 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')
+ length = end - buf;
}
+
+ /* Skip over the augmentation data. */
+ REQUIRE (skip_bytes (&buf, end, length));
+ insns = buf;
+
buf = last_fde + 4 + hdr.length;
SKIP_RELOCS (buf);
}
- sec_info->entry[sec_info->count].fde_encoding = cie.fde_encoding;
- sec_info->entry[sec_info->count].lsda_encoding = cie.lsda_encoding;
+ /* 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;
sec_info->count++;
}
@@ -606,54 +792,27 @@ _bfd_elf_discard_section_eh_frame
/* Ok, now we can assign new offsets. */
offset = 0;
- last_cie_ndx = 0;
- for (i = 0; i < sec_info->count; i++)
- {
- if (! sec_info->entry[i].removed)
- {
- sec_info->entry[i].new_offset = offset;
- offset += sec_info->entry[i].size;
- if (sec_info->entry[i].cie)
- {
- last_cie_ndx = i;
- make_relative = sec_info->entry[i].make_relative;
- make_lsda_relative = sec_info->entry[i].make_lsda_relative;
- }
- else
- {
- sec_info->entry[i].make_relative = make_relative;
- sec_info->entry[i].make_lsda_relative = make_lsda_relative;
- sec_info->entry[i].per_encoding_relative = 0;
- }
- }
- else if (sec_info->entry[i].cie && sec_info->entry[i].sec == sec)
- {
- /* Need to adjust new_offset too. */
- BFD_ASSERT (sec_info->entry[last_cie_ndx].offset
- == sec_info->entry[i].new_offset);
- sec_info->entry[i].new_offset
- = sec_info->entry[last_cie_ndx].new_offset;
- }
- }
- if (hdr_info->last_cie_sec == sec)
- {
- BFD_ASSERT (sec_info->entry[last_cie_ndx].offset
- == hdr_info->last_cie_offset);
- hdr_info->last_cie_offset = sec_info->entry[last_cie_ndx].new_offset;
- }
-
- /* FIXME: Currently it is not possible to shrink sections to zero size at
- this point, so build a fake minimal CIE. */
- if (new_size == 0)
- new_size = 16;
+ 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;
+ ent->new_offset = offset;
+ offset += size_of_output_cie_fde (ent, ptr_size);
+ }
+ hdr_info->last_cie_inf = last_cie_inf;
- /* Shrink the sec as needed. */
- sec->_cooked_size = new_size;
- if (sec->_cooked_size == 0)
+ /* Resize the sec as needed. */
+ sec->rawsize = sec->size;
+ sec->size = offset;
+ if (sec->size == 0)
sec->flags |= SEC_EXCLUDE;
free (ehbuf);
- return new_size != sec->_raw_size;
+ return offset != sec->rawsize;
free_no_table:
if (ehbuf)
@@ -663,6 +822,8 @@ free_no_table:
hdr_info->table = FALSE;
hdr_info->last_cie.hdr.length = 0;
return FALSE;
+
+#undef REQUIRE
}
/* This function is called for .eh_frame_hdr section after
@@ -682,9 +843,9 @@ _bfd_elf_discard_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
if (sec == NULL)
return FALSE;
- sec->_cooked_size = EH_FRAME_HDR_SIZE;
+ sec->size = EH_FRAME_HDR_SIZE;
if (hdr_info->table)
- sec->_cooked_size += 4 + hdr_info->fde_count * 8;
+ sec->size += 4 + hdr_info->fde_count * 8;
/* Request program headers to be recalculated. */
elf_tdata (abfd)->program_header_size = 0;
@@ -694,8 +855,8 @@ _bfd_elf_discard_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
/* This function is called from size_dynamic_sections.
It needs to decide whether .eh_frame_hdr should be output or not,
- because later on it is too late for calling _bfd_strip_section_from_output,
- since dynamic symbol table has been sized. */
+ because when the dynamic symbol table has been sized it is too late
+ to strip sections. */
bfd_boolean
_bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info)
@@ -723,13 +884,13 @@ _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info)
/* Count only sections which have at least a single CIE or FDE.
There cannot be any CIE or FDE <= 8 bytes. */
o = bfd_get_section_by_name (abfd, ".eh_frame");
- if (o && o->_raw_size > 8 && !bfd_is_abs_section (o->output_section))
+ if (o && o->size > 8 && !bfd_is_abs_section (o->output_section))
break;
}
if (abfd == NULL)
{
- _bfd_strip_section_from_output (info, hdr_info->hdr_sec);
+ hdr_info->hdr_sec->flags |= SEC_EXCLUDE;
hdr_info->hdr_sec = NULL;
return TRUE;
}
@@ -745,18 +906,26 @@ _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info)
bfd_vma
_bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
asection *sec,
bfd_vma offset)
{
struct eh_frame_sec_info *sec_info;
+ struct elf_link_hash_table *htab;
+ struct eh_frame_hdr_info *hdr_info;
unsigned int lo, hi, mid;
if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
return offset;
sec_info = elf_section_data (sec)->sec_info;
- if (offset >= sec->_raw_size)
- return offset - (sec->_cooked_size - sec->_raw_size);
+ if (offset >= sec->rawsize)
+ return offset - sec->rawsize + sec->size;
+
+ htab = elf_hash_table (info);
+ hdr_info = &htab->eh_info;
+ if (hdr_info->offsets_adjusted)
+ offset += sec->output_offset;
lo = 0;
hi = sec_info->count;
@@ -781,21 +950,31 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
/* If converting to DW_EH_PE_pcrel, there will be no need for run-time
relocation against FDE's initial_location field. */
- if (sec_info->entry[mid].make_relative
- && ! sec_info->entry[mid].cie
+ if (!sec_info->entry[mid].cie
+ && sec_info->entry[mid].cie_inf->make_relative
&& offset == sec_info->entry[mid].offset + 8)
return (bfd_vma) -2;
/* If converting LSDA pointers to DW_EH_PE_pcrel, there will be no need
for run-time relocation against LSDA field. */
- if (sec_info->entry[mid].make_lsda_relative
- && ! sec_info->entry[mid].cie
+ if (!sec_info->entry[mid].cie
+ && sec_info->entry[mid].cie_inf->make_lsda_relative
&& (offset == (sec_info->entry[mid].offset + 8
- + sec_info->entry[mid].lsda_offset)))
- return (bfd_vma) -2;
+ + sec_info->entry[mid].lsda_offset))
+ && (sec_info->entry[mid].cie_inf->need_lsda_relative
+ || !hdr_info->offsets_adjusted))
+ {
+ sec_info->entry[mid].cie_inf->need_lsda_relative = 1;
+ return (bfd_vma) -2;
+ }
+ if (hdr_info->offsets_adjusted)
+ offset -= sec->output_offset;
+ /* Any new augmentation bytes go before the first relocation. */
return (offset + sec_info->entry[mid].new_offset
- - sec_info->entry[mid].offset);
+ - sec_info->entry[mid].offset
+ + extra_augmentation_string_bytes (sec_info->entry + mid)
+ + extra_augmentation_data_bytes (sec_info->entry + mid));
}
/* Write out .eh_frame section. This is called with the relocated
@@ -810,89 +989,160 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
struct eh_frame_sec_info *sec_info;
struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
- unsigned int i;
- bfd_byte *p, *buf;
- unsigned int leb128_tmp;
- unsigned int cie_offset = 0;
unsigned int ptr_size;
-
- ptr_size = (elf_elfheader (sec->owner)->e_ident[EI_CLASS]
- == ELFCLASS64) ? 8 : 4;
+ struct eh_cie_fde *ent;
if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
return bfd_set_section_contents (abfd, sec->output_section, contents,
- sec->output_offset, sec->_raw_size);
+ sec->output_offset, sec->size);
+
+ ptr_size = (get_elf_backend_data (abfd)
+ ->elf_backend_eh_frame_address_size (abfd, sec));
+ BFD_ASSERT (ptr_size != 0);
+
sec_info = elf_section_data (sec)->sec_info;
htab = elf_hash_table (info);
hdr_info = &htab->eh_info;
+
+ /* First convert all offsets to output section offsets, so that a
+ CIE offset is valid if the CIE is used by a FDE from some other
+ section. This can happen when duplicate CIEs are deleted in
+ _bfd_elf_discard_section_eh_frame. We do all sections here because
+ this function might not be called on sections in the same order as
+ _bfd_elf_discard_section_eh_frame. */
+ if (!hdr_info->offsets_adjusted)
+ {
+ bfd *ibfd;
+ asection *eh;
+ struct eh_frame_sec_info *eh_inf;
+
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || (ibfd->flags & DYNAMIC) != 0)
+ continue;
+
+ eh = bfd_get_section_by_name (ibfd, ".eh_frame");
+ if (eh == NULL || eh->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+ continue;
+
+ eh_inf = elf_section_data (eh)->sec_info;
+ for (ent = eh_inf->entry; ent < eh_inf->entry + eh_inf->count; ++ent)
+ {
+ ent->offset += eh->output_offset;
+ ent->new_offset += eh->output_offset;
+ }
+ }
+ hdr_info->offsets_adjusted = TRUE;
+ }
+
if (hdr_info->table && hdr_info->array == NULL)
hdr_info->array
= bfd_malloc (hdr_info->fde_count * sizeof(*hdr_info->array));
if (hdr_info->array == NULL)
hdr_info = NULL;
- p = contents;
- for (i = 0; i < sec_info->count; ++i)
+ /* The new offsets can be bigger or smaller than the original offsets.
+ We therefore need to make two passes over the section: one backward
+ pass to move entries up and one forward pass to move entries down.
+ The two passes won't interfere with each other because entries are
+ not reordered */
+ for (ent = sec_info->entry + sec_info->count; ent-- != sec_info->entry;)
+ if (!ent->removed && ent->new_offset > ent->offset)
+ memmove (contents + ent->new_offset - sec->output_offset,
+ contents + ent->offset - sec->output_offset, ent->size);
+
+ for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
+ if (!ent->removed && ent->new_offset < ent->offset)
+ memmove (contents + ent->new_offset - sec->output_offset,
+ contents + ent->offset - sec->output_offset, ent->size);
+
+ for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
{
- if (sec_info->entry[i].removed)
+ unsigned char *buf, *end;
+ unsigned int new_size;
+
+ if (ent->removed)
+ continue;
+
+ if (ent->size == 4)
{
- if (sec_info->entry[i].cie)
- {
- /* If CIE is removed due to no remaining FDEs referencing it
- and there were no CIEs kept before it, sec_info->entry[i].sec
- will be zero. */
- if (sec_info->entry[i].sec == NULL)
- cie_offset = 0;
- else
- {
- cie_offset = sec_info->entry[i].new_offset;
- cie_offset += (sec_info->entry[i].sec->output_section->vma
- + sec_info->entry[i].sec->output_offset
- - sec->output_section->vma
- - sec->output_offset);
- }
- }
+ /* Any terminating FDE must be at the end of the section. */
+ BFD_ASSERT (ent == sec_info->entry + sec_info->count - 1);
continue;
}
- if (sec_info->entry[i].cie)
+ buf = contents + ent->new_offset - sec->output_offset;
+ end = buf + ent->size;
+ new_size = size_of_output_cie_fde (ent, ptr_size);
+
+ /* Update the size. It may be shrinked. */
+ bfd_put_32 (abfd, new_size - 4, buf);
+
+ /* Filling the extra bytes with DW_CFA_nops. */
+ if (new_size != ent->size)
+ memset (end, 0, new_size - ent->size);
+
+ if (ent->cie)
{
/* CIE */
- cie_offset = sec_info->entry[i].new_offset;
- if (sec_info->entry[i].make_relative
- || sec_info->entry[i].make_lsda_relative
- || sec_info->entry[i].per_encoding_relative)
+ if (ent->make_relative
+ || ent->need_lsda_relative
+ || ent->per_encoding_relative)
{
- unsigned char *aug;
- unsigned int action;
- unsigned int dummy, per_width, per_encoding;
+ char *aug;
+ unsigned int action, extra_string, extra_data;
+ unsigned int per_width, per_encoding;
/* Need to find 'R' or 'L' augmentation's argument and modify
DW_EH_PE_* value. */
- action = (sec_info->entry[i].make_relative ? 1 : 0)
- | (sec_info->entry[i].make_lsda_relative ? 2 : 0)
- | (sec_info->entry[i].per_encoding_relative ? 4 : 0);
- buf = contents + sec_info->entry[i].offset;
+ action = ((ent->make_relative ? 1 : 0)
+ | (ent->need_lsda_relative ? 2 : 0)
+ | (ent->per_encoding_relative ? 4 : 0));
+ extra_string = extra_augmentation_string_bytes (ent);
+ extra_data = extra_augmentation_data_bytes (ent);
+
/* Skip length, id and version. */
buf += 9;
- aug = buf;
- buf = strchr (buf, '\0') + 1;
- read_uleb128 (dummy, buf);
- read_sleb128 (dummy, buf);
- read_uleb128 (dummy, buf);
+ aug = (char *) buf;
+ buf += strlen (aug) + 1;
+ skip_leb128 (&buf, end);
+ skip_leb128 (&buf, end);
+ skip_leb128 (&buf, end);
if (*aug == 'z')
{
- read_uleb128 (dummy, buf);
+ /* The uleb128 will always be a single byte for the kind
+ of augmentation strings that we're prepared to handle. */
+ *buf++ += extra_data;
aug++;
}
+ /* Make room for the new augmentation string and data bytes. */
+ memmove (buf + extra_string + extra_data, buf, end - buf);
+ memmove (aug + extra_string, aug, buf - (bfd_byte *) aug);
+ buf += extra_string;
+ end += extra_string + extra_data;
+
+ if (ent->add_augmentation_size)
+ {
+ *aug++ = 'z';
+ *buf++ = extra_data - 1;
+ }
+ if (ent->add_fde_encoding)
+ {
+ BFD_ASSERT (action & 1);
+ *aug++ = 'R';
+ *buf++ = DW_EH_PE_pcrel;
+ action &= ~1;
+ }
+
while (action)
switch (*aug++)
{
case 'L':
if (action & 2)
{
- BFD_ASSERT (*buf == sec_info->entry[i].lsda_encoding);
+ BFD_ASSERT (*buf == ent->lsda_encoding);
*buf |= DW_EH_PE_pcrel;
action &= ~2;
}
@@ -900,25 +1150,23 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
break;
case 'P':
per_encoding = *buf++;
- per_width = get_DW_EH_PE_width (per_encoding,
- ptr_size);
+ per_width = get_DW_EH_PE_width (per_encoding, ptr_size);
BFD_ASSERT (per_width != 0);
BFD_ASSERT (((per_encoding & 0x70) == DW_EH_PE_pcrel)
- == sec_info->entry[i].per_encoding_relative);
+ == ent->per_encoding_relative);
if ((per_encoding & 0xf0) == DW_EH_PE_aligned)
buf = (contents
+ ((buf - contents + per_width - 1)
& ~((bfd_size_type) per_width - 1)));
if (action & 4)
{
- bfd_vma value;
-
- value = read_value (abfd, buf, per_width,
- get_DW_EH_PE_signed
- (per_encoding));
- value += (sec_info->entry[i].offset
- - sec_info->entry[i].new_offset);
- write_value (abfd, buf, value, per_width);
+ bfd_vma val;
+
+ val = read_value (abfd, buf, per_width,
+ get_DW_EH_PE_signed (per_encoding));
+ val += ent->offset - ent->new_offset;
+ val -= extra_string + extra_data;
+ write_value (abfd, buf, val, per_width);
action &= ~4;
}
buf += per_width;
@@ -926,37 +1174,37 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
case 'R':
if (action & 1)
{
- BFD_ASSERT (*buf == sec_info->entry[i].fde_encoding);
+ BFD_ASSERT (*buf == ent->fde_encoding);
*buf |= DW_EH_PE_pcrel;
action &= ~1;
}
buf++;
break;
+ case 'S':
+ break;
default:
BFD_FAIL ();
}
}
}
- else if (sec_info->entry[i].size > 4)
+ else
{
/* FDE */
- bfd_vma value = 0, address;
+ bfd_vma value, address;
unsigned int width;
- buf = contents + sec_info->entry[i].offset;
/* Skip length. */
buf += 4;
- bfd_put_32 (abfd,
- sec_info->entry[i].new_offset + 4 - cie_offset, buf);
+ value = ent->new_offset + 4 - ent->cie_inf->new_offset;
+ bfd_put_32 (abfd, value, buf);
buf += 4;
- width = get_DW_EH_PE_width (sec_info->entry[i].fde_encoding,
- ptr_size);
- address = value = read_value (abfd, buf, width,
- get_DW_EH_PE_signed
- (sec_info->entry[i].fde_encoding));
+ width = get_DW_EH_PE_width (ent->fde_encoding, ptr_size);
+ value = read_value (abfd, buf, width,
+ get_DW_EH_PE_signed (ent->fde_encoding));
+ address = value;
if (value)
{
- switch (sec_info->entry[i].fde_encoding & 0xf0)
+ switch (ent->fde_encoding & 0xf0)
{
case DW_EH_PE_indirect:
case DW_EH_PE_textrel:
@@ -971,15 +1219,12 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
}
break;
case DW_EH_PE_pcrel:
- value += (sec_info->entry[i].offset
- - sec_info->entry[i].new_offset);
- address += (sec->output_section->vma + sec->output_offset
- + sec_info->entry[i].offset + 8);
+ value += ent->offset - ent->new_offset;
+ address += sec->output_section->vma + ent->offset + 8;
break;
}
- if (sec_info->entry[i].make_relative)
- value -= (sec->output_section->vma + sec->output_offset
- + sec_info->entry[i].new_offset + 8);
+ if (ent->cie_inf->make_relative)
+ value -= sec->output_section->vma + ent->new_offset + 8;
write_value (abfd, buf, value, width);
}
@@ -987,96 +1232,48 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
{
hdr_info->array[hdr_info->array_count].initial_loc = address;
hdr_info->array[hdr_info->array_count++].fde
- = (sec->output_section->vma + sec->output_offset
- + sec_info->entry[i].new_offset);
+ = sec->output_section->vma + ent->new_offset;
}
- if ((sec_info->entry[i].lsda_encoding & 0xf0) == DW_EH_PE_pcrel
- || sec_info->entry[i].make_lsda_relative)
+ if ((ent->lsda_encoding & 0xf0) == DW_EH_PE_pcrel
+ || ent->cie_inf->need_lsda_relative)
{
- buf += sec_info->entry[i].lsda_offset;
- width = get_DW_EH_PE_width (sec_info->entry[i].lsda_encoding,
- ptr_size);
+ buf += ent->lsda_offset;
+ width = get_DW_EH_PE_width (ent->lsda_encoding, ptr_size);
value = read_value (abfd, buf, width,
- get_DW_EH_PE_signed
- (sec_info->entry[i].lsda_encoding));
+ get_DW_EH_PE_signed (ent->lsda_encoding));
if (value)
{
- if ((sec_info->entry[i].lsda_encoding & 0xf0)
- == DW_EH_PE_pcrel)
- value += (sec_info->entry[i].offset
- - sec_info->entry[i].new_offset);
- else if (sec_info->entry[i].make_lsda_relative)
- value -= (sec->output_section->vma + sec->output_offset
- + sec_info->entry[i].new_offset + 8
- + sec_info->entry[i].lsda_offset);
+ if ((ent->lsda_encoding & 0xf0) == DW_EH_PE_pcrel)
+ value += ent->offset - ent->new_offset;
+ else if (ent->cie_inf->need_lsda_relative)
+ value -= (sec->output_section->vma + ent->new_offset + 8
+ + ent->lsda_offset);
write_value (abfd, buf, value, width);
}
}
- }
- else
- /* Terminating FDE must be at the end of .eh_frame section only. */
- BFD_ASSERT (i == sec_info->count - 1);
-
- BFD_ASSERT (p == contents + sec_info->entry[i].new_offset);
- memmove (p, contents + sec_info->entry[i].offset,
- sec_info->entry[i].size);
- p += sec_info->entry[i].size;
- }
-
- /* FIXME: Once _bfd_elf_discard_section_eh_frame will be able to
- shrink sections to zero size, this won't be needed any more. */
- if (p == contents && sec->_cooked_size == 16)
- {
- bfd_put_32 (abfd, 12, p); /* Fake CIE length */
- bfd_put_32 (abfd, 0, p + 4); /* Fake CIE id */
- p[8] = 1; /* Fake CIE version */
- memset (p + 9, 0, 7); /* Fake CIE augmentation, 3xleb128
- and 3xDW_CFA_nop as pad */
- p += 16;
- }
- else
- {
- unsigned int alignment = 1 << sec->alignment_power;
- unsigned int pad = sec->_cooked_size % alignment;
-
- /* Don't pad beyond the raw size of the output section. It
- can happen at the last input section. */
- if (pad
- && ((sec->output_offset + sec->_cooked_size + pad)
- <= sec->output_section->_raw_size))
- {
- /* Find the last CIE/FDE. */
- for (i = sec_info->count - 1; i > 0; i--)
- if (! sec_info->entry[i].removed)
- break;
-
- /* The size of the last CIE/FDE must be at least 4. */
- if (sec_info->entry[i].removed
- || sec_info->entry[i].size < 4)
- abort ();
-
- pad = alignment - pad;
-
- buf = contents + sec_info->entry[i].new_offset;
-
- /* Update length. */
- sec_info->entry[i].size += pad;
- bfd_put_32 (abfd, sec_info->entry[i].size - 4, buf);
-
- /* Pad it with DW_CFA_nop */
- memset (p, 0, pad);
- p += pad;
-
- sec->_cooked_size += pad;
+ else if (ent->cie_inf->add_augmentation_size)
+ {
+ /* Skip the PC and length and insert a zero byte for the
+ augmentation size. */
+ buf += width * 2;
+ memmove (buf + 1, buf, end - buf);
+ *buf = 0;
+ }
}
}
- BFD_ASSERT ((bfd_size_type) (p - contents) == sec->_cooked_size);
+ /* 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
+ have padded CIE/FDE records to multiple of pointer size with
+ size_of_output_cie_fde. */
+ if ((sec->size % ptr_size) != 0)
+ abort ();
return bfd_set_section_contents (abfd, sec->output_section,
- contents, (file_ptr) sec->output_offset,
- sec->_cooked_size);
+ contents, (file_ptr) sec->output_offset,
+ sec->size);
}
/* Helper function used to sort .eh_frame_hdr search table by increasing
@@ -1187,11 +1384,19 @@ _bfd_elf_write_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
retval = bfd_set_section_contents (abfd, sec->output_section,
contents, (file_ptr) sec->output_offset,
- sec->_cooked_size);
+ sec->size);
free (contents);
return retval;
}
+/* Return the width of FDE addresses. This is the default implementation. */
+
+unsigned int
+_bfd_elf_eh_frame_address_size (bfd *abfd, asection *sec ATTRIBUTE_UNUSED)
+{
+ return elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64 ? 8 : 4;
+}
+
/* Decide whether we can use a PC-relative encoding within the given
EH frame section. This is the default implementation. */
diff --git a/contrib/binutils/bfd/elf-strtab.c b/contrib/binutils/bfd/elf-strtab.c
index 673b9d77ac98..a0ce1d79ea8e 100644
--- a/contrib/binutils/bfd/elf-strtab.c
+++ b/contrib/binutils/bfd/elf-strtab.c
@@ -1,5 +1,5 @@
/* ELF strtab with GC and suffix merging support.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -99,7 +99,8 @@ _bfd_elf_strtab_init (void)
if (table == NULL)
return NULL;
- if (! bfd_hash_table_init (&table->table, elf_strtab_hash_newfunc))
+ if (!bfd_hash_table_init (&table->table, elf_strtab_hash_newfunc,
+ sizeof (struct elf_strtab_hash_entry)))
{
free (table);
return NULL;
@@ -263,8 +264,8 @@ strrevcmp (const void *a, const void *b)
struct elf_strtab_hash_entry *B = *(struct elf_strtab_hash_entry **) b;
unsigned int lenA = A->len;
unsigned int lenB = B->len;
- const unsigned char *s = A->root.string + lenA - 1;
- const unsigned char *t = B->root.string + lenB - 1;
+ const unsigned char *s = (const unsigned char *) A->root.string + lenA - 1;
+ const unsigned char *t = (const unsigned char *) B->root.string + lenB - 1;
int l = lenA < lenB ? lenA : lenB;
while (l)
diff --git a/contrib/binutils/bfd/elf-vxworks.c b/contrib/binutils/bfd/elf-vxworks.c
new file mode 100644
index 000000000000..90e620a90559
--- /dev/null
+++ b/contrib/binutils/bfd/elf-vxworks.c
@@ -0,0 +1,213 @@
+/* VxWorks support for ELF
+ Copyright 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.
+ */
+
+/* This file provides routines used by all VxWorks targets. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf-vxworks.h"
+
+/* Tweak magic VxWorks symbols as they are loaded. */
+bfd_boolean
+elf_vxworks_add_symbol_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ Elf_Internal_Sym *sym,
+ const char **namep,
+ flagword *flagsp,
+ asection **secp ATTRIBUTE_UNUSED,
+ bfd_vma *valp ATTRIBUTE_UNUSED)
+{
+ /* Ideally these "magic" symbols would be exported by libc.so.1
+ which would be found via a DT_NEEDED tag, and then handled
+ specially by the linker at runtime. Except shared libraries
+ don't even link to libc.so.1 by default...
+ If the symbol is imported from, or will be put in a shared library,
+ give the symbol weak binding to get the desired samantics.
+ 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))
+ {
+ sym->st_info = ELF_ST_INFO (STB_WEAK, ELF_ST_TYPE (sym->st_info));
+ *flagsp |= BSF_WEAK;
+ }
+
+ return TRUE;
+}
+
+/* Perform VxWorks-specific handling of the create_dynamic_sections hook.
+ When creating an executable, set *SRELPLT2_OUT to the .rel(a).plt.unloaded
+ section. */
+
+bfd_boolean
+elf_vxworks_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info,
+ asection **srelplt2_out)
+{
+ struct elf_link_hash_table *htab;
+ const struct elf_backend_data *bed;
+ asection *s;
+
+ htab = elf_hash_table (info);
+ bed = get_elf_backend_data (dynobj);
+
+ if (!info->shared)
+ {
+ s = bfd_make_section_with_flags (dynobj,
+ bed->default_use_rela_p
+ ? ".rela.plt.unloaded"
+ : ".rel.plt.unloaded",
+ SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_READONLY | SEC_LINKER_CREATED);
+ if (s == NULL
+ || !bfd_set_section_alignment (dynobj, s, bed->s->log_file_align))
+ return FALSE;
+
+ *srelplt2_out = s;
+ }
+
+ /* Mark the GOT and PLT symbols as having relocations; they might
+ not, but we won't know for sure until we build the GOT in
+ finish_dynamic_symbol. Also make sure that the GOT symbol
+ is entered into the dynamic symbol table; the loader uses it
+ to initialize __GOTT_BASE__[__GOTT_INDEX__]. */
+ if (htab->hgot)
+ {
+ htab->hgot->indx = -2;
+ htab->hgot->other &= ~ELF_ST_VISIBILITY (-1);
+ htab->hgot->forced_local = 0;
+ if (!bfd_elf_link_record_dynamic_symbol (info, htab->hgot))
+ return FALSE;
+ }
+ if (htab->hplt)
+ {
+ htab->hplt->indx = -2;
+ htab->hplt->type = STT_FUNC;
+ }
+
+ return TRUE;
+}
+
+/* Tweak magic VxWorks symbols as they are written to the output file. */
+bfd_boolean
+elf_vxworks_link_output_symbol_hook (struct bfd_link_info *info
+ ATTRIBUTE_UNUSED,
+ const char *name,
+ Elf_Internal_Sym *sym,
+ asection *input_sec ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h
+ ATTRIBUTE_UNUSED)
+{
+ /* 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)
+ sym->st_info = ELF_ST_INFO (STB_GLOBAL, ELF_ST_TYPE (sym->st_info));
+
+ return TRUE;
+}
+
+
+/* Copy relocations into the output file. Fixes up relocations againt PLT
+ entries, then calls the generic routine. */
+
+bfd_boolean
+elf_vxworks_emit_relocs (bfd *output_bfd,
+ asection *input_section,
+ Elf_Internal_Shdr *input_rel_hdr,
+ Elf_Internal_Rela *internal_relocs,
+ struct elf_link_hash_entry **rel_hash)
+{
+ const struct elf_backend_data *bed;
+ Elf_Internal_Rela *irela;
+ Elf_Internal_Rela *irelaend;
+ int j;
+
+ bed = get_elf_backend_data (output_bfd);
+
+ irela = internal_relocs;
+ irelaend = irela + (NUM_SHDR_ENTRIES (input_rel_hdr)
+ * bed->s->int_rels_per_ext_rel);
+ while (irela < irelaend)
+ {
+ if ((output_bfd->flags & (DYNAMIC|EXEC_P))
+ && *rel_hash
+ && (*rel_hash)->def_dynamic
+ && !(*rel_hash)->def_regular
+ && (*rel_hash)->root.type == bfd_link_hash_defined
+ && (*rel_hash)->root.u.def.section->output_section != NULL)
+ {
+ /* This is a relocation from an executable or shared library
+ against a symbol in a different shared library. We are
+ creating a definition in the output file but it does not come
+ from any of our normal (.o) files. ie. a PLT stub.
+ Normally this would be a relocation against against SHN_UNDEF
+ with the VMA of the PLT stub. This upsets the VxWorks loader.
+ Convert it to a section-relative relocation.
+ This gets some other symbols (for instance .dynbss),
+ but is conservatively correct. */
+ 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;
+
+ irela[j].r_info = ELF32_R_INFO (this_idx,
+ ELF32_R_TYPE (irela[j].r_info));
+ irela[j].r_addend += (*rel_hash)->root.u.def.value;
+ irela[j].r_addend += sec->output_offset;
+ }
+ /* Stop the generic routine adjusting this entry. */
+ *rel_hash = NULL;
+ }
+ irela += bed->s->int_rels_per_ext_rel;
+ rel_hash++;
+ }
+ return _bfd_elf_link_output_relocs (output_bfd, input_section,
+ input_rel_hdr, internal_relocs,
+ rel_hash);
+}
+
+
+/* Set the sh_link and sh_info fields on the static plt relocation secton. */
+
+void
+elf_vxworks_final_write_processing (bfd *abfd,
+ bfd_boolean linker ATTRIBUTE_UNUSED)
+{
+ asection * sec;
+ struct bfd_elf_section_data *d;
+
+ sec = bfd_get_section_by_name (abfd, ".rel.plt.unloaded");
+ if (!sec)
+ sec = bfd_get_section_by_name (abfd, ".rela.plt.unloaded");
+ if (!sec)
+ return;
+ d = elf_section_data (sec);
+ d->this_hdr.sh_link = elf_tdata (abfd)->symtab_section;
+ sec = bfd_get_section_by_name (abfd, ".plt");
+ if (sec)
+ d->this_hdr.sh_info = elf_section_data (sec)->this_idx;
+}
diff --git a/contrib/binutils/bfd/elf-vxworks.h b/contrib/binutils/bfd/elf-vxworks.h
new file mode 100644
index 000000000000..c8ea0094eeac
--- /dev/null
+++ b/contrib/binutils/bfd/elf-vxworks.h
@@ -0,0 +1,35 @@
+/* VxWorks support for ELF
+ Copyright 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.
+ */
+
+#include "elf/common.h"
+#include "elf/internal.h"
+
+bfd_boolean elf_vxworks_add_symbol_hook
+ (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **,
+ flagword *, asection **, bfd_vma *);
+bfd_boolean elf_vxworks_link_output_symbol_hook
+ (struct bfd_link_info *, const char *name, Elf_Internal_Sym *,
+ asection *, struct elf_link_hash_entry *);
+bfd_boolean elf_vxworks_emit_relocs
+ (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry **);
+void elf_vxworks_final_write_processing (bfd *, bfd_boolean);
+bfd_boolean elf_vxworks_create_dynamic_sections
+ (bfd *, struct bfd_link_info *, asection **);
diff --git a/contrib/binutils/bfd/elf.c b/contrib/binutils/bfd/elf.c
index 654d65136c35..68888809fe4b 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 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,14 +17,14 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* $FreeBSD$ */
-/* SECTION
-
+/*
+SECTION
ELF backends
BFD support for ELF formats is being worked on.
@@ -210,28 +210,6 @@ bfd_elf_hash (const char *namearg)
return h & 0xffffffff;
}
-/* Read a specified number of bytes at a specified offset in an ELF
- file, into a newly allocated buffer, and return a pointer to the
- buffer. */
-
-static char *
-elf_read (bfd *abfd, file_ptr offset, bfd_size_type size)
-{
- char *buf;
-
- if ((buf = bfd_alloc (abfd, size)) == NULL)
- return NULL;
- if (bfd_seek (abfd, offset, SEEK_SET) != 0)
- return NULL;
- if (bfd_bread (buf, size, abfd) != size)
- {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_file_truncated);
- return NULL;
- }
- return buf;
-}
-
bfd_boolean
bfd_elf_mkobject (bfd *abfd)
{
@@ -257,24 +235,38 @@ char *
bfd_elf_get_str_section (bfd *abfd, unsigned int shindex)
{
Elf_Internal_Shdr **i_shdrp;
- char *shstrtab = NULL;
+ bfd_byte *shstrtab = NULL;
file_ptr offset;
bfd_size_type shstrtabsize;
i_shdrp = elf_elfsections (abfd);
if (i_shdrp == 0 || i_shdrp[shindex] == 0)
- return 0;
+ return NULL;
- shstrtab = (char *) i_shdrp[shindex]->contents;
+ shstrtab = i_shdrp[shindex]->contents;
if (shstrtab == NULL)
{
/* No cached one, attempt to read, and cache what we read. */
offset = i_shdrp[shindex]->sh_offset;
shstrtabsize = i_shdrp[shindex]->sh_size;
- shstrtab = elf_read (abfd, offset, shstrtabsize);
+
+ /* Allocate and clear an extra byte at the end, to prevent crashes
+ in case the string table is not terminated. */
+ if (shstrtabsize + 1 == 0
+ || (shstrtab = bfd_alloc (abfd, shstrtabsize + 1)) == NULL
+ || bfd_seek (abfd, offset, SEEK_SET) != 0)
+ shstrtab = NULL;
+ else if (bfd_bread (shstrtab, shstrtabsize, abfd) != shstrtabsize)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_file_truncated);
+ shstrtab = NULL;
+ }
+ else
+ shstrtab[shstrtabsize] = '\0';
i_shdrp[shindex]->contents = shstrtab;
}
- return shstrtab;
+ return (char *) shstrtab;
}
char *
@@ -295,13 +287,13 @@ bfd_elf_string_from_elf_section (bfd *abfd,
if (strindex >= hdr->sh_size)
{
+ unsigned int shstrndx = elf_elfheader(abfd)->e_shstrndx;
(*_bfd_error_handler)
- (_("%s: invalid string offset %u >= %lu for section `%s'"),
- bfd_archive_filename (abfd), strindex, (unsigned long) hdr->sh_size,
- ((shindex == elf_elfheader(abfd)->e_shstrndx
- && strindex == hdr->sh_name)
+ (_("%B: invalid string offset %u >= %lu for section `%s'"),
+ abfd, strindex, (unsigned long) hdr->sh_size,
+ (shindex == shstrndx && strindex == hdr->sh_name
? ".shstrtab"
- : elf_string_from_elf_strtab (abfd, hdr->sh_name)));
+ : bfd_elf_string_from_elf_section (abfd, shstrndx, hdr->sh_name)));
return "";
}
@@ -352,7 +344,7 @@ bfd_elf_get_elf_syms (bfd *ibfd,
pos = symtab_hdr->sh_offset + symoffset * extsym_size;
if (extsym_buf == NULL)
{
- alloc_ext = bfd_malloc (amt);
+ alloc_ext = bfd_malloc2 (symcount, extsym_size);
extsym_buf = alloc_ext;
}
if (extsym_buf == NULL
@@ -371,7 +363,8 @@ bfd_elf_get_elf_syms (bfd *ibfd,
pos = shndx_hdr->sh_offset + symoffset * sizeof (Elf_External_Sym_Shndx);
if (extshndx_buf == NULL)
{
- alloc_extshndx = bfd_malloc (amt);
+ alloc_extshndx = bfd_malloc2 (symcount,
+ sizeof (Elf_External_Sym_Shndx));
extshndx_buf = alloc_extshndx;
}
if (extshndx_buf == NULL
@@ -385,8 +378,7 @@ bfd_elf_get_elf_syms (bfd *ibfd,
if (intsym_buf == NULL)
{
- bfd_size_type amt = symcount * sizeof (Elf_Internal_Sym);
- intsym_buf = bfd_malloc (amt);
+ intsym_buf = bfd_malloc2 (symcount, sizeof (Elf_Internal_Sym));
if (intsym_buf == NULL)
goto out;
}
@@ -409,17 +401,31 @@ bfd_elf_get_elf_syms (bfd *ibfd,
/* Look up a symbol name. */
const char *
-bfd_elf_local_sym_name (bfd *abfd, Elf_Internal_Sym *isym)
+bfd_elf_sym_name (bfd *abfd,
+ Elf_Internal_Shdr *symtab_hdr,
+ Elf_Internal_Sym *isym,
+ asection *sym_sec)
{
+ const char *name;
unsigned int iname = isym->st_name;
- unsigned int shindex = elf_tdata (abfd)->symtab_hdr.sh_link;
- if (iname == 0 && ELF_ST_TYPE (isym->st_info) == STT_SECTION)
+ unsigned int shindex = symtab_hdr->sh_link;
+
+ if (iname == 0 && ELF_ST_TYPE (isym->st_info) == STT_SECTION
+ /* Check for a bogus st_shndx to avoid crashing. */
+ && isym->st_shndx < elf_numsections (abfd)
+ && !(isym->st_shndx >= SHN_LORESERVE && isym->st_shndx <= SHN_HIRESERVE))
{
iname = elf_elfsections (abfd)[isym->st_shndx]->sh_name;
shindex = elf_elfheader (abfd)->e_shstrndx;
}
- return bfd_elf_string_from_elf_section (abfd, shindex, iname);
+ name = bfd_elf_string_from_elf_section (abfd, shindex, iname);
+ if (name == NULL)
+ name = "(null)";
+ else if (sym_sec && *name == '\0')
+ name = bfd_section_name (abfd, sym_sec);
+
+ return name;
}
/* Elf_Internal_Shdr->contents is an array of these for SHT_GROUP
@@ -442,8 +448,11 @@ group_signature (bfd *abfd, Elf_Internal_Shdr *ghdr)
Elf_External_Sym_Shndx eshndx;
Elf_Internal_Sym isym;
- /* First we need to ensure the symbol table is available. */
- if (! bfd_section_from_shdr (abfd, ghdr->sh_link))
+ /* First we need to ensure the symbol table is available. Make sure
+ that it is a symbol table section. */
+ hdr = elf_elfsections (abfd) [ghdr->sh_link];
+ if (hdr->sh_type != SHT_SYMTAB
+ || ! bfd_section_from_shdr (abfd, ghdr->sh_link))
return NULL;
/* Go read the symbol. */
@@ -452,7 +461,7 @@ group_signature (bfd *abfd, Elf_Internal_Shdr *ghdr)
&isym, esym, &eshndx) == NULL)
return NULL;
- return bfd_elf_local_sym_name (abfd, &isym);
+ return bfd_elf_sym_name (abfd, hdr, &isym, NULL);
}
/* Set next_in_group list pointer, and group name for NEWSECT. */
@@ -480,15 +489,19 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
}
if (num_group == 0)
- num_group = (unsigned) -1;
- elf_tdata (abfd)->num_group = num_group;
-
- if (num_group > 0)
+ {
+ num_group = (unsigned) -1;
+ elf_tdata (abfd)->num_group = num_group;
+ }
+ else
{
/* We keep a list of elf section headers for group sections,
so we can find them quickly. */
- bfd_size_type amt = num_group * sizeof (Elf_Internal_Shdr *);
- elf_tdata (abfd)->group_sect_ptr = bfd_alloc (abfd, amt);
+ bfd_size_type amt;
+
+ elf_tdata (abfd)->num_group = num_group;
+ elf_tdata (abfd)->group_sect_ptr
+ = bfd_alloc2 (abfd, num_group, sizeof (Elf_Internal_Shdr *));
if (elf_tdata (abfd)->group_sect_ptr == NULL)
return FALSE;
@@ -508,7 +521,8 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
/* Read the raw contents. */
BFD_ASSERT (sizeof (*dest) >= 4);
amt = shdr->sh_size * sizeof (*dest) / 4;
- shdr->contents = bfd_alloc (abfd, amt);
+ shdr->contents = bfd_alloc2 (abfd, shdr->sh_size,
+ sizeof (*dest) / 4);
if (shdr->contents == NULL
|| bfd_seek (abfd, shdr->sh_offset, SEEK_SET) != 0
|| (bfd_bread (shdr->contents, shdr->sh_size, abfd)
@@ -539,8 +553,7 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
if (idx >= shnum)
{
((*_bfd_error_handler)
- (_("%s: invalid SHT_GROUP entry"),
- bfd_archive_filename (abfd)));
+ (_("%B: invalid SHT_GROUP entry"), abfd));
idx = 0;
}
dest->shdr = elf_elfsections (abfd)[idx];
@@ -610,27 +623,105 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
if (elf_group_name (newsect) == NULL)
{
- (*_bfd_error_handler) (_("%s: no group info for section %s"),
- bfd_archive_filename (abfd), newsect->name);
+ (*_bfd_error_handler) (_("%B: no group info for section %A"),
+ abfd, newsect);
}
return TRUE;
}
bfd_boolean
-bfd_elf_discard_group (bfd *abfd ATTRIBUTE_UNUSED, asection *group)
+_bfd_elf_setup_sections (bfd *abfd)
{
- asection *first = elf_next_in_group (group);
- asection *s = first;
+ unsigned int i;
+ unsigned int num_group = elf_tdata (abfd)->num_group;
+ bfd_boolean result = TRUE;
+ asection *s;
- while (s != NULL)
+ /* Process SHF_LINK_ORDER. */
+ for (s = abfd->sections; s != NULL; s = s->next)
{
- s->output_section = bfd_abs_section_ptr;
- s = elf_next_in_group (s);
- /* These lists are circular. */
- if (s == first)
- break;
+ Elf_Internal_Shdr *this_hdr = &elf_section_data (s)->this_hdr;
+ if ((this_hdr->sh_flags & SHF_LINK_ORDER) != 0)
+ {
+ unsigned int elfsec = this_hdr->sh_link;
+ /* FIXME: The old Intel compiler and old strip/objcopy may
+ not set the sh_link or sh_info fields. Hence we could
+ get the situation where elfsec is 0. */
+ if (elfsec == 0)
+ {
+ const struct elf_backend_data *bed
+ = get_elf_backend_data (abfd);
+ if (bed->link_order_error_handler)
+ bed->link_order_error_handler
+ (_("%B: warning: sh_link not set for section `%A'"),
+ abfd, s);
+ }
+ else
+ {
+ asection *link;
+
+ this_hdr = elf_elfsections (abfd)[elfsec];
+
+ /* PR 1991, 2008:
+ Some strip/objcopy may leave an incorrect value in
+ sh_link. We don't want to proceed. */
+ link = this_hdr->bfd_section;
+ if (link == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%B: sh_link [%d] in section `%A' is incorrect"),
+ s->owner, s, elfsec);
+ result = FALSE;
+ }
+
+ elf_linked_to_section (s) = link;
+ }
+ }
}
- return TRUE;
+
+ /* Process section groups. */
+ if (num_group == (unsigned) -1)
+ return result;
+
+ for (i = 0; i < num_group; i++)
+ {
+ Elf_Internal_Shdr *shdr = elf_tdata (abfd)->group_sect_ptr[i];
+ Elf_Internal_Group *idx = (Elf_Internal_Group *) shdr->contents;
+ unsigned int n_elt = shdr->sh_size / 4;
+
+ while (--n_elt != 0)
+ if ((++idx)->shdr->bfd_section)
+ elf_sec_group (idx->shdr->bfd_section) = shdr->bfd_section;
+ else if (idx->shdr->sh_type == SHT_RELA
+ || idx->shdr->sh_type == SHT_REL)
+ /* We won't include relocation sections in section groups in
+ output object files. We adjust the group section size here
+ so that relocatable link will work correctly when
+ relocation sections are in section group in input object
+ files. */
+ shdr->bfd_section->size -= 4;
+ else
+ {
+ /* There are some unknown sections in the group. */
+ (*_bfd_error_handler)
+ (_("%B: unknown [%d] section `%s' in group [%s]"),
+ abfd,
+ (unsigned int) idx->shdr->sh_type,
+ bfd_elf_string_from_elf_section (abfd,
+ (elf_elfheader (abfd)
+ ->e_shstrndx),
+ idx->shdr->sh_name),
+ shdr->bfd_section->name);
+ result = FALSE;
+ }
+ }
+ return result;
+}
+
+bfd_boolean
+bfd_elf_is_group_section (bfd *abfd ATTRIBUTE_UNUSED, const asection *sec)
+{
+ return elf_next_in_group (sec) != NULL;
}
/* Make a BFD section from an ELF section. We store a pointer to the
@@ -639,7 +730,8 @@ bfd_elf_discard_group (bfd *abfd ATTRIBUTE_UNUSED, asection *group)
bfd_boolean
_bfd_elf_make_section_from_shdr (bfd *abfd,
Elf_Internal_Shdr *hdr,
- const char *name)
+ const char *name,
+ int shindex)
{
asection *newsect;
flagword flags;
@@ -656,6 +748,10 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
if (newsect == NULL)
return FALSE;
+ hdr->bfd_section = newsect;
+ elf_section_data (newsect)->this_hdr = *hdr;
+ elf_section_data (newsect)->this_idx = shindex;
+
/* Always use the real type/flags. */
elf_section_type (newsect) = hdr->sh_type;
elf_section_flags (newsect) = hdr->sh_flags;
@@ -698,25 +794,45 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
if ((hdr->sh_flags & SHF_TLS) != 0)
flags |= SEC_THREAD_LOCAL;
- /* The debugging sections appear to be recognized only by name, not
- any sort of flag. */
- {
- static const char *debug_sec_names [] =
+ if ((flags & SEC_ALLOC) == 0)
{
- ".debug",
- ".gnu.linkonce.wi.",
- ".line",
- ".stab"
- };
- int i;
-
- for (i = ARRAY_SIZE (debug_sec_names); i--;)
- if (strncmp (name, debug_sec_names[i], strlen (debug_sec_names[i])) == 0)
- break;
-
- if (i >= 0)
- flags |= SEC_DEBUGGING;
- }
+ /* The debugging sections appear to be recognized only by name,
+ not any sort of flag. Their SEC_ALLOC bits are cleared. */
+ static const struct
+ {
+ const char *name;
+ int len;
+ } debug_sections [] =
+ {
+ { "debug", 5 }, /* 'd' */
+ { NULL, 0 }, /* 'e' */
+ { NULL, 0 }, /* 'f' */
+ { "gnu.linkonce.wi.", 17 }, /* 'g' */
+ { NULL, 0 }, /* 'h' */
+ { NULL, 0 }, /* 'i' */
+ { NULL, 0 }, /* 'j' */
+ { NULL, 0 }, /* 'k' */
+ { "line", 4 }, /* 'l' */
+ { NULL, 0 }, /* 'm' */
+ { NULL, 0 }, /* 'n' */
+ { NULL, 0 }, /* 'o' */
+ { NULL, 0 }, /* 'p' */
+ { NULL, 0 }, /* 'q' */
+ { NULL, 0 }, /* 'r' */
+ { "stab", 4 } /* 's' */
+ };
+
+ if (name [0] == '.')
+ {
+ int i = name [1] - 'd';
+ if (i >= 0
+ && i < (int) ARRAY_SIZE (debug_sections)
+ && debug_sections [i].name != NULL
+ && strncmp (&name [1], debug_sections [i].name,
+ debug_sections [i].len) == 0)
+ flags |= SEC_DEBUGGING;
+ }
+ }
/* As a GNU extension, if the name begins with .gnu.linkonce, we
only link a single copy of the section. This is used to support
@@ -802,9 +918,6 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
}
}
- hdr->bfd_section = newsect;
- elf_section_data (newsect)->this_hdr = *hdr;
-
return TRUE;
}
@@ -899,10 +1012,31 @@ merge_sections_remove_hook (bfd *abfd ATTRIBUTE_UNUSED,
bfd_boolean
_bfd_elf_merge_sections (bfd *abfd, struct bfd_link_info *info)
{
+ bfd *ibfd;
+ asection *sec;
+
if (!is_elf_hash_table (info->hash))
return FALSE;
- if (elf_hash_table (info)->merge_info)
- _bfd_merge_sections (abfd, elf_hash_table (info)->merge_info,
+
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ if ((ibfd->flags & DYNAMIC) == 0)
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ if ((sec->flags & SEC_MERGE) != 0
+ && !bfd_is_abs_section (sec->output_section))
+ {
+ struct bfd_elf_section_data *secdata;
+
+ secdata = elf_section_data (sec);
+ if (! _bfd_add_merge_section (abfd,
+ &elf_hash_table (info)->merge_info,
+ sec, &secdata->sec_info))
+ return FALSE;
+ else if (secdata->sec_info)
+ sec->sec_info_type = ELF_INFO_TYPE_MERGE;
+ }
+
+ if (elf_hash_table (info)->merge_info != NULL)
+ _bfd_merge_sections (abfd, info, elf_hash_table (info)->merge_info,
merge_sections_remove_hook);
return TRUE;
}
@@ -938,6 +1072,28 @@ _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
return TRUE;
}
+static const char *
+get_segment_type (unsigned int p_type)
+{
+ const char *pt;
+ switch (p_type)
+ {
+ case PT_NULL: pt = "NULL"; break;
+ case PT_LOAD: pt = "LOAD"; break;
+ case PT_DYNAMIC: pt = "DYNAMIC"; break;
+ case PT_INTERP: pt = "INTERP"; break;
+ case PT_NOTE: pt = "NOTE"; break;
+ case PT_SHLIB: pt = "SHLIB"; break;
+ case PT_PHDR: pt = "PHDR"; break;
+ case PT_TLS: pt = "TLS"; break;
+ case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
+ case PT_GNU_STACK: pt = "STACK"; break;
+ case PT_GNU_RELRO: pt = "RELRO"; break;
+ default: pt = NULL; break;
+ }
+ return pt;
+}
+
/* Print out the program headers. */
bfd_boolean
@@ -957,22 +1113,13 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
c = elf_elfheader (abfd)->e_phnum;
for (i = 0; i < c; i++, p++)
{
- const char *pt;
+ const char *pt = get_segment_type (p->p_type);
char buf[20];
- switch (p->p_type)
+ if (pt == NULL)
{
- case PT_NULL: pt = "NULL"; break;
- case PT_LOAD: pt = "LOAD"; break;
- case PT_DYNAMIC: pt = "DYNAMIC"; break;
- case PT_INTERP: pt = "INTERP"; break;
- case PT_NOTE: pt = "NOTE"; break;
- case PT_SHLIB: pt = "SHLIB"; break;
- case PT_PHDR: pt = "PHDR"; break;
- case PT_TLS: pt = "TLS"; break;
- case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
- case PT_GNU_STACK: pt = "STACK"; break;
- default: sprintf (buf, "0x%lx", p->p_type); pt = buf; break;
+ sprintf (buf, "0x%lx", p->p_type);
+ pt = buf;
}
fprintf (f, "%8s off 0x", pt);
bfd_fprintf_vma (abfd, f, p->p_offset);
@@ -1006,10 +1153,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
fprintf (f, _("\nDynamic Section:\n"));
- dynbuf = bfd_malloc (s->_raw_size);
- if (dynbuf == NULL)
- goto error_return;
- if (! bfd_get_section_contents (abfd, s, dynbuf, 0, s->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, s, &dynbuf))
goto error_return;
elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
@@ -1021,7 +1165,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
swap_dyn_in = get_elf_backend_data (abfd)->s->swap_dyn_in;
extdyn = dynbuf;
- extdynend = extdyn + s->_raw_size;
+ extdynend = extdyn + s->size;
for (; extdyn < extdynend; extdyn += extdynsize)
{
Elf_Internal_Dyn dyn;
@@ -1124,7 +1268,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
if ((elf_dynverdef (abfd) != 0 && elf_tdata (abfd)->verdef == NULL)
|| (elf_dynverref (abfd) != 0 && elf_tdata (abfd)->verref == NULL))
{
- if (! _bfd_elf_slurp_version_tables (abfd))
+ if (! _bfd_elf_slurp_version_tables (abfd, FALSE))
return FALSE;
}
@@ -1136,8 +1280,9 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
for (t = elf_tdata (abfd)->verdef; t != NULL; t = t->vd_nextdef)
{
fprintf (f, "%d 0x%2.2x 0x%8.8lx %s\n", t->vd_ndx,
- t->vd_flags, t->vd_hash, t->vd_nodename);
- if (t->vd_auxptr->vda_nextptr != NULL)
+ t->vd_flags, t->vd_hash,
+ t->vd_nodename ? t->vd_nodename : "<corrupt>");
+ if (t->vd_auxptr != NULL && t->vd_auxptr->vda_nextptr != NULL)
{
Elf_Internal_Verdaux *a;
@@ -1145,7 +1290,8 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
for (a = t->vd_auxptr->vda_nextptr;
a != NULL;
a = a->vda_nextptr)
- fprintf (f, "%s ", a->vda_nodename);
+ fprintf (f, "%s ",
+ a->vda_nodename ? a->vda_nodename : "<corrupt>");
fprintf (f, "\n");
}
}
@@ -1160,10 +1306,12 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
{
Elf_Internal_Vernaux *a;
- fprintf (f, _(" required from %s:\n"), t->vn_filename);
+ fprintf (f, _(" required from %s:\n"),
+ t->vn_filename ? t->vn_filename : "<corrupt>");
for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
fprintf (f, " 0x%8.8lx 0x%2.2x %2.2d %s\n", a->vna_hash,
- a->vna_flags, a->vna_other, a->vna_nodename);
+ a->vna_flags, a->vna_other,
+ a->vna_nodename ? a->vna_nodename : "<corrupt>");
}
}
@@ -1323,23 +1471,15 @@ _bfd_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
/* Set local fields. */
ret->indx = -1;
ret->dynindx = -1;
- ret->dynstr_index = 0;
- ret->elf_hash_value = 0;
- ret->weakdef = NULL;
- ret->verinfo.verdef = NULL;
- ret->vtable_entries_size = 0;
- ret->vtable_entries_used = NULL;
- ret->vtable_parent = NULL;
- ret->got = htab->init_refcount;
- ret->plt = htab->init_refcount;
- ret->size = 0;
- ret->type = STT_NOTYPE;
- ret->other = 0;
+ ret->got = htab->init_got_refcount;
+ ret->plt = htab->init_plt_refcount;
+ 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. */
- ret->elf_link_hash_flags = ELF_LINK_NON_ELF;
+ ret->non_elf = 1;
}
return entry;
@@ -1349,56 +1489,53 @@ _bfd_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
old indirect symbol. Also used for copying flags to a weakdef. */
void
-_bfd_elf_link_hash_copy_indirect (const struct elf_backend_data *bed,
+_bfd_elf_link_hash_copy_indirect (struct bfd_link_info *info,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
- bfd_signed_vma tmp;
- bfd_signed_vma lowest_valid = bed->can_refcount;
+ struct elf_link_hash_table *htab;
/* Copy down any references that we may have already seen to the
symbol which just became indirect. */
- dir->elf_link_hash_flags
- |= ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_NON_GOT_REF
- | ELF_LINK_HASH_NEEDS_PLT
- | ELF_LINK_POINTER_EQUALITY_NEEDED);
+ dir->ref_dynamic |= ind->ref_dynamic;
+ dir->ref_regular |= ind->ref_regular;
+ dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
+ dir->non_got_ref |= ind->non_got_ref;
+ dir->needs_plt |= ind->needs_plt;
+ dir->pointer_equality_needed |= ind->pointer_equality_needed;
if (ind->root.type != bfd_link_hash_indirect)
return;
/* Copy over the global and procedure linkage table refcount entries.
These may have been already set up by a check_relocs routine. */
- tmp = dir->got.refcount;
- if (tmp < lowest_valid)
+ htab = elf_hash_table (info);
+ if (ind->got.refcount > htab->init_got_refcount.refcount)
{
- dir->got.refcount = ind->got.refcount;
- ind->got.refcount = tmp;
+ if (dir->got.refcount < 0)
+ dir->got.refcount = 0;
+ dir->got.refcount += ind->got.refcount;
+ ind->got.refcount = htab->init_got_refcount.refcount;
}
- else
- BFD_ASSERT (ind->got.refcount < lowest_valid);
- tmp = dir->plt.refcount;
- if (tmp < lowest_valid)
+ if (ind->plt.refcount > htab->init_plt_refcount.refcount)
{
- dir->plt.refcount = ind->plt.refcount;
- ind->plt.refcount = tmp;
+ if (dir->plt.refcount < 0)
+ dir->plt.refcount = 0;
+ dir->plt.refcount += ind->plt.refcount;
+ ind->plt.refcount = htab->init_plt_refcount.refcount;
}
- else
- BFD_ASSERT (ind->plt.refcount < lowest_valid);
- if (dir->dynindx == -1)
+ if (ind->dynindx != -1)
{
+ if (dir->dynindx != -1)
+ _bfd_elf_strtab_delref (htab->dynstr, dir->dynstr_index);
dir->dynindx = ind->dynindx;
dir->dynstr_index = ind->dynstr_index;
ind->dynindx = -1;
ind->dynstr_index = 0;
}
- else
- BFD_ASSERT (ind->dynindx == -1);
}
void
@@ -1406,11 +1543,11 @@ _bfd_elf_link_hash_hide_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *h,
bfd_boolean force_local)
{
- h->plt = elf_hash_table (info)->init_offset;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->plt = elf_hash_table (info)->init_plt_offset;
+ h->needs_plt = 0;
if (force_local)
{
- h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+ h->forced_local = 1;
if (h->dynindx != -1)
{
h->dynindx = -1;
@@ -1428,33 +1565,35 @@ _bfd_elf_link_hash_table_init
bfd *abfd,
struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *))
+ const char *),
+ unsigned int entsize)
{
bfd_boolean ret;
+ int can_refcount = get_elf_backend_data (abfd)->can_refcount;
table->dynamic_sections_created = FALSE;
table->dynobj = NULL;
- /* Make sure can_refcount is extended to the width and signedness of
- init_refcount before we subtract one from it. */
- table->init_refcount.refcount = get_elf_backend_data (abfd)->can_refcount;
- table->init_refcount.refcount -= 1;
- table->init_offset.offset = -(bfd_vma) 1;
+ 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->stab_info = 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);
+ ret = _bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize);
table->root.type = bfd_link_elf_hash_table;
return ret;
@@ -1472,7 +1611,8 @@ _bfd_elf_link_hash_table_create (bfd *abfd)
if (ret == NULL)
return NULL;
- if (! _bfd_elf_link_hash_table_init (ret, abfd, _bfd_elf_link_hash_newfunc))
+ if (! _bfd_elf_link_hash_table_init (ret, abfd, _bfd_elf_link_hash_newfunc,
+ sizeof (struct elf_link_hash_entry)))
{
free (ret);
return NULL;
@@ -1493,6 +1633,18 @@ bfd_elf_set_dt_needed_name (bfd *abfd, const char *name)
elf_dt_name (abfd) = name;
}
+int
+bfd_elf_get_dyn_lib_class (bfd *abfd)
+{
+ int lib_class;
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && bfd_get_format (abfd) == bfd_object)
+ lib_class = elf_dyn_lib_class (abfd);
+ else
+ lib_class = 0;
+ return lib_class;
+}
+
void
bfd_elf_set_dyn_lib_class (bfd *abfd, int lib_class)
{
@@ -1560,14 +1712,10 @@ bfd_elf_get_bfd_needed_list (bfd *abfd,
return TRUE;
s = bfd_get_section_by_name (abfd, ".dynamic");
- if (s == NULL || s->_raw_size == 0)
+ if (s == NULL || s->size == 0)
return TRUE;
- dynbuf = bfd_malloc (s->_raw_size);
- if (dynbuf == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, s, dynbuf, 0, s->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, s, &dynbuf))
goto error_return;
elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
@@ -1580,7 +1728,7 @@ bfd_elf_get_bfd_needed_list (bfd *abfd,
swap_dyn_in = get_elf_backend_data (abfd)->s->swap_dyn_in;
extdyn = dynbuf;
- extdynend = extdyn + s->_raw_size;
+ extdynend = extdyn + s->size;
for (; extdyn < extdynend; extdyn += extdynsize)
{
Elf_Internal_Dyn dyn;
@@ -1658,7 +1806,11 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
const char *name;
- name = elf_string_from_elf_strtab (abfd, hdr->sh_name);
+ name = bfd_elf_string_from_elf_section (abfd,
+ elf_elfheader (abfd)->e_shstrndx,
+ hdr->sh_name);
+ if (name == NULL)
+ return FALSE;
switch (hdr->sh_type)
{
@@ -1673,10 +1825,14 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
case SHT_INIT_ARRAY: /* .init_array section. */
case SHT_FINI_ARRAY: /* .fini_array section. */
case SHT_PREINIT_ARRAY: /* .preinit_array section. */
- return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
+ case SHT_GNU_LIBLIST: /* .gnu.liblist section. */
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
case SHT_DYNAMIC: /* Dynamic linking information. */
- if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
+ return FALSE;
+ if (hdr->sh_link > elf_numsections (abfd)
+ || elf_elfsections (abfd)[hdr->sh_link] == NULL)
return FALSE;
if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_STRTAB)
{
@@ -1712,7 +1868,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
if (elf_onesymtab (abfd) == shindex)
return TRUE;
- BFD_ASSERT (hdr->sh_entsize == bed->s->sizeof_sym);
+ if (hdr->sh_entsize != bed->s->sizeof_sym)
+ return FALSE;
BFD_ASSERT (elf_onesymtab (abfd) == 0);
elf_onesymtab (abfd) = shindex;
elf_tdata (abfd)->symtab_hdr = *hdr;
@@ -1727,16 +1884,44 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
linker. */
if ((hdr->sh_flags & SHF_ALLOC) != 0
&& (abfd->flags & DYNAMIC) != 0
- && ! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
+ && ! _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+ shindex))
return FALSE;
+ /* Go looking for SHT_SYMTAB_SHNDX too, since if there is one we
+ can't read symbols without that section loaded as well. It
+ is most likely specified by the next section header. */
+ if (elf_elfsections (abfd)[elf_symtab_shndx (abfd)]->sh_link != shindex)
+ {
+ unsigned int i, num_sec;
+
+ num_sec = elf_numsections (abfd);
+ for (i = shindex + 1; i < num_sec; i++)
+ {
+ Elf_Internal_Shdr *hdr2 = elf_elfsections (abfd)[i];
+ if (hdr2->sh_type == SHT_SYMTAB_SHNDX
+ && hdr2->sh_link == shindex)
+ break;
+ }
+ if (i == num_sec)
+ for (i = 1; i < shindex; i++)
+ {
+ Elf_Internal_Shdr *hdr2 = elf_elfsections (abfd)[i];
+ if (hdr2->sh_type == SHT_SYMTAB_SHNDX
+ && hdr2->sh_link == shindex)
+ break;
+ }
+ if (i != shindex)
+ return bfd_section_from_shdr (abfd, i);
+ }
return TRUE;
case SHT_DYNSYM: /* A dynamic symbol table */
if (elf_dynsymtab (abfd) == shindex)
return TRUE;
- BFD_ASSERT (hdr->sh_entsize == bed->s->sizeof_sym);
+ if (hdr->sh_entsize != bed->s->sizeof_sym)
+ return FALSE;
BFD_ASSERT (elf_dynsymtab (abfd) == 0);
elf_dynsymtab (abfd) = shindex;
elf_tdata (abfd)->dynsymtab_hdr = *hdr;
@@ -1745,17 +1930,13 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
/* Besides being a symbol table, we also treat this as a regular
section, so that objcopy can handle it. */
- return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
case SHT_SYMTAB_SHNDX: /* Symbol section indices when >64k sections */
if (elf_symtab_shndx (abfd) == shindex)
return TRUE;
- /* Get the associated symbol table. */
- if (! bfd_section_from_shdr (abfd, hdr->sh_link)
- || hdr->sh_link != elf_onesymtab (abfd))
- return FALSE;
-
+ BFD_ASSERT (elf_symtab_shndx (abfd) == 0);
elf_symtab_shndx (abfd) = shindex;
elf_tdata (abfd)->symtab_shndx_hdr = *hdr;
elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->symtab_shndx_hdr;
@@ -1770,49 +1951,51 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->shstrtab_hdr;
return TRUE;
}
- {
- unsigned int i, num_sec;
+ if (elf_elfsections (abfd)[elf_onesymtab (abfd)]->sh_link == shindex)
+ {
+ symtab_strtab:
+ elf_tdata (abfd)->strtab_hdr = *hdr;
+ elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->strtab_hdr;
+ return TRUE;
+ }
+ if (elf_elfsections (abfd)[elf_dynsymtab (abfd)]->sh_link == shindex)
+ {
+ dynsymtab_strtab:
+ elf_tdata (abfd)->dynstrtab_hdr = *hdr;
+ hdr = &elf_tdata (abfd)->dynstrtab_hdr;
+ elf_elfsections (abfd)[shindex] = hdr;
+ /* We also treat this as a regular section, so that objcopy
+ can handle it. */
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+ shindex);
+ }
- num_sec = elf_numsections (abfd);
- for (i = 1; i < num_sec; i++)
- {
- Elf_Internal_Shdr *hdr2 = elf_elfsections (abfd)[i];
- if (hdr2->sh_link == shindex)
- {
- if (! bfd_section_from_shdr (abfd, i))
- return FALSE;
- if (elf_onesymtab (abfd) == i)
- {
- elf_tdata (abfd)->strtab_hdr = *hdr;
- elf_elfsections (abfd)[shindex] =
- &elf_tdata (abfd)->strtab_hdr;
- return TRUE;
- }
- if (elf_dynsymtab (abfd) == i)
- {
- elf_tdata (abfd)->dynstrtab_hdr = *hdr;
- elf_elfsections (abfd)[shindex] = hdr =
- &elf_tdata (abfd)->dynstrtab_hdr;
- /* We also treat this as a regular section, so
- that objcopy can handle it. */
- break;
- }
-#if 0 /* Not handling other string tables specially right now. */
- hdr2 = elf_elfsections (abfd)[i]; /* in case it moved */
- /* We have a strtab for some random other section. */
- newsect = (asection *) hdr2->bfd_section;
- if (!newsect)
- break;
- hdr->bfd_section = newsect;
- hdr2 = &elf_section_data (newsect)->str_hdr;
- *hdr2 = *hdr;
- elf_elfsections (abfd)[shindex] = hdr2;
-#endif
- }
- }
- }
+ /* If the string table isn't one of the above, then treat it as a
+ regular section. We need to scan all the headers to be sure,
+ just in case this strtab section appeared before the above. */
+ if (elf_onesymtab (abfd) == 0 || elf_dynsymtab (abfd) == 0)
+ {
+ unsigned int i, num_sec;
- return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
+ num_sec = elf_numsections (abfd);
+ for (i = 1; i < num_sec; i++)
+ {
+ Elf_Internal_Shdr *hdr2 = elf_elfsections (abfd)[i];
+ if (hdr2->sh_link == shindex)
+ {
+ /* Prevent endless recursion on broken objects. */
+ if (i == shindex)
+ return FALSE;
+ if (! bfd_section_from_shdr (abfd, i))
+ return FALSE;
+ if (elf_onesymtab (abfd) == i)
+ goto symtab_strtab;
+ if (elf_dynsymtab (abfd) == i)
+ goto dynsymtab_strtab;
+ }
+ }
+ }
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
case SHT_REL:
case SHT_RELA:
@@ -1822,14 +2005,20 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
Elf_Internal_Shdr *hdr2;
unsigned int num_sec = elf_numsections (abfd);
+ if (hdr->sh_entsize
+ != (bfd_size_type) (hdr->sh_type == SHT_REL
+ ? bed->s->sizeof_rel : bed->s->sizeof_rela))
+ return FALSE;
+
/* Check for a bogus link to avoid crashing. */
if ((hdr->sh_link >= SHN_LORESERVE && hdr->sh_link <= SHN_HIRESERVE)
|| hdr->sh_link >= num_sec)
{
((*_bfd_error_handler)
- (_("%s: invalid link %lu for reloc section %s (index %u)"),
- bfd_archive_filename (abfd), hdr->sh_link, name, shindex));
- return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
+ (_("%B: invalid link %lu for reloc section %s (index %u)"),
+ abfd, hdr->sh_link, name, shindex));
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+ shindex);
}
/* For some incomprehensible reason Oracle distributes
@@ -1864,7 +2053,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
}
/* Get the symbol table. */
- if (elf_elfsections (abfd)[hdr->sh_link]->sh_type == SHT_SYMTAB
+ if ((elf_elfsections (abfd)[hdr->sh_link]->sh_type == SHT_SYMTAB
+ || elf_elfsections (abfd)[hdr->sh_link]->sh_type == SHT_DYNSYM)
&& ! bfd_section_from_shdr (abfd, hdr->sh_link))
return FALSE;
@@ -1873,9 +2063,15 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
represent such a section, so at least for now, we don't
try. We just present it as a normal section. We also
can't use it as a reloc section if it points to the null
- section. */
- if (hdr->sh_link != elf_onesymtab (abfd) || hdr->sh_info == SHN_UNDEF)
- return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
+ section, an invalid section, or another reloc section. */
+ if (hdr->sh_link != elf_onesymtab (abfd)
+ || hdr->sh_info == SHN_UNDEF
+ || (hdr->sh_info >= SHN_LORESERVE && hdr->sh_info <= SHN_HIRESERVE)
+ || hdr->sh_info >= num_sec
+ || elf_elfsections (abfd)[hdr->sh_info]->sh_type == SHT_REL
+ || elf_elfsections (abfd)[hdr->sh_info]->sh_type == SHT_RELA)
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+ shindex);
if (! bfd_section_from_shdr (abfd, hdr->sh_info))
return FALSE;
@@ -1912,19 +2108,21 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
case SHT_GNU_verdef:
elf_dynverdef (abfd) = shindex;
elf_tdata (abfd)->dynverdef_hdr = *hdr;
- return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
break;
case SHT_GNU_versym:
+ if (hdr->sh_entsize != sizeof (Elf_External_Versym))
+ return FALSE;
elf_dynversym (abfd) = shindex;
elf_tdata (abfd)->dynversym_hdr = *hdr;
- return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
+ 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);
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
break;
case SHT_SHLIB:
@@ -1934,10 +2132,12 @@ 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)
+ return FALSE;
name = group_signature (abfd, hdr);
if (name == NULL)
return FALSE;
- if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name))
+ if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
if (hdr->contents != NULL)
{
@@ -1949,8 +2149,10 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
hdr->bfd_section->flags
|= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
+ /* 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
+ if ((s = (--idx)->shdr->bfd_section) != NULL
&& elf_next_in_group (s) != NULL)
{
elf_next_in_group (hdr->bfd_section) = s;
@@ -1961,11 +2163,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
default:
/* Check for any processor-specific section types. */
- {
- if (bed->elf_backend_section_from_shdr)
- (*bed->elf_backend_section_from_shdr) (abfd, hdr, name);
- }
- break;
+ return bed->elf_backend_section_from_shdr (abfd, hdr, name,
+ shindex);
}
return TRUE;
@@ -2023,25 +2222,23 @@ bfd_section_from_elf_index (bfd *abfd, unsigned int index)
return elf_elfsections (abfd)[index]->bfd_section;
}
-static struct bfd_elf_special_section const special_sections[] =
+static const struct bfd_elf_special_section special_sections_b[] =
{
{ ".bss", 4, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".gnu.linkonce.b",15, -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 }
+};
+
+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 },
- { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".line", 5, 0, SHT_PROGBITS, 0 },
- { ".rodata", 7, -2, SHT_PROGBITS, SHF_ALLOC },
- { ".rodata1", 8, 0, SHT_PROGBITS, SHF_ALLOC },
- { ".tbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { ".tdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { ".text", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".init_array", 11, 0, SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".fini_array", 11, 0, SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".preinit_array", 14, 0, SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
{ ".debug_line", 11, 0, SHT_PROGBITS, 0 },
{ ".debug_info", 11, 0, SHT_PROGBITS, 0 },
{ ".debug_abbrev", 13, 0, SHT_PROGBITS, 0 },
@@ -2049,42 +2246,132 @@ static struct bfd_elf_special_section const special_sections[] =
{ ".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 }
+};
+
+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 }
+};
+
+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 },
- { ".hash", 5, 0, SHT_HASH, SHF_ALLOC },
- { ".interp", 7, 0, SHT_PROGBITS, 0 },
- { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".shstrtab", 9, 0, SHT_STRTAB, 0 },
- { ".strtab", 7, 0, SHT_STRTAB, 0 },
- { ".symtab", 7, 0, SHT_SYMTAB, 0 },
{ ".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 }
+};
+
+static const struct bfd_elf_special_section special_sections_h[] =
+{
+ { ".hash", 5, 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 }
+};
+
+static const struct bfd_elf_special_section special_sections_l[] =
+{
+ { ".line", 5, 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 }
+};
+
+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 }
+};
+
+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 }
+};
+
+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 }
};
-static const struct bfd_elf_special_section *
-get_special_section (const char *name,
- const struct bfd_elf_special_section *special_sections,
- unsigned int rela)
+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 }
+};
+
+static const struct bfd_elf_special_section *special_sections[] =
+{
+ special_sections_b, /* 'b' */
+ special_sections_c, /* 'b' */
+ special_sections_d, /* 'd' */
+ NULL, /* 'e' */
+ special_sections_f, /* 'f' */
+ special_sections_g, /* 'g' */
+ special_sections_h, /* 'h' */
+ special_sections_i, /* 'i' */
+ NULL, /* 'j' */
+ NULL, /* 'k' */
+ special_sections_l, /* 'l' */
+ NULL, /* 'm' */
+ special_sections_n, /* 'n' */
+ NULL, /* 'o' */
+ special_sections_p, /* 'p' */
+ NULL, /* 'q' */
+ special_sections_r, /* 'r' */
+ special_sections_s, /* 's' */
+ special_sections_t, /* 't' */
+};
+
+const struct bfd_elf_special_section *
+_bfd_elf_get_special_section (const char *name,
+ const struct bfd_elf_special_section *spec,
+ unsigned int rela)
{
int i;
- int len = strlen (name);
+ int len;
+
+ len = strlen (name);
- for (i = 0; special_sections[i].prefix != NULL; i++)
+ for (i = 0; spec[i].prefix != NULL; i++)
{
int suffix_len;
- int prefix_len = special_sections[i].prefix_length;
+ int prefix_len = spec[i].prefix_length;
if (len < prefix_len)
continue;
- if (memcmp (name, special_sections[i].prefix, prefix_len) != 0)
+ if (memcmp (name, spec[i].prefix, prefix_len) != 0)
continue;
- suffix_len = special_sections[i].suffix_length;
+ suffix_len = spec[i].suffix_length;
if (suffix_len <= 0)
{
if (name[prefix_len] != 0)
@@ -2093,7 +2380,7 @@ get_special_section (const char *name,
continue;
if (name[prefix_len] != '.'
&& (suffix_len == -2
- || (rela && special_sections[i].type == SHT_REL)))
+ || (rela && spec[i].type == SHT_REL)))
continue;
}
}
@@ -2102,41 +2389,58 @@ get_special_section (const char *name,
if (len < prefix_len + suffix_len)
continue;
if (memcmp (name + len - suffix_len,
- special_sections[i].prefix + prefix_len,
+ spec[i].prefix + prefix_len,
suffix_len) != 0)
continue;
}
- return &special_sections[i];
+ return &spec[i];
}
return NULL;
}
const struct bfd_elf_special_section *
-_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name)
+_bfd_elf_get_sec_type_attr (bfd *abfd, asection *sec)
{
- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- const struct bfd_elf_special_section *ssect = NULL;
+ int i;
+ const struct bfd_elf_special_section *spec;
+ const struct elf_backend_data *bed;
/* See if this is one of the special sections. */
- if (name)
+ if (sec->name == NULL)
+ return NULL;
+
+ bed = get_elf_backend_data (abfd);
+ spec = bed->special_sections;
+ if (spec)
{
- unsigned int rela = bed->default_use_rela_p;
+ spec = _bfd_elf_get_special_section (sec->name,
+ bed->special_sections,
+ sec->use_rela_p);
+ if (spec != NULL)
+ return spec;
+ }
- if (bed->special_sections)
- ssect = get_special_section (name, bed->special_sections, rela);
+ if (sec->name[0] != '.')
+ return NULL;
- if (! ssect)
- ssect = get_special_section (name, special_sections, rela);
- }
+ i = sec->name[1] - 'b';
+ if (i < 0 || i > 't' - 'b')
+ return NULL;
+
+ spec = special_sections[i];
- return ssect;
+ if (spec == NULL)
+ return NULL;
+
+ return _bfd_elf_get_special_section (sec->name, spec, sec->use_rela_p);
}
bfd_boolean
_bfd_elf_new_section_hook (bfd *abfd, asection *sec)
{
struct bfd_elf_section_data *sdata;
+ const struct elf_backend_data *bed;
const struct bfd_elf_special_section *ssect;
sdata = (struct bfd_elf_section_data *) sec->used_by_bfd;
@@ -2148,17 +2452,24 @@ _bfd_elf_new_section_hook (bfd *abfd, asection *sec)
sec->used_by_bfd = sdata;
}
- elf_section_type (sec) = SHT_NULL;
- ssect = _bfd_elf_get_sec_type_attr (abfd, sec->name);
- if (ssect != NULL)
+ /* Indicate whether or not this section should use RELA relocations. */
+ 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
+ || (sec->flags & SEC_LINKER_CREATED) != 0)
{
- elf_section_type (sec) = ssect->type;
- elf_section_flags (sec) = ssect->attr;
+ ssect = (*bed->get_sec_type_attr) (abfd, sec);
+ if (ssect != NULL)
+ {
+ elf_section_type (sec) = ssect->type;
+ elf_section_flags (sec) = ssect->attr;
+ }
}
- /* Indicate whether or not this section should use RELA relocations. */
- sec->use_rela_p = get_elf_backend_data (abfd)->default_use_rela_p;
-
return TRUE;
}
@@ -2210,7 +2521,7 @@ _bfd_elf_make_section_from_phdr (bfd *abfd,
return FALSE;
newsect->vma = hdr->p_vaddr;
newsect->lma = hdr->p_paddr;
- newsect->_raw_size = hdr->p_filesz;
+ newsect->size = hdr->p_filesz;
newsect->filepos = hdr->p_offset;
newsect->flags |= SEC_HAS_CONTENTS;
newsect->alignment_power = bfd_log2 (hdr->p_align);
@@ -2243,7 +2554,7 @@ _bfd_elf_make_section_from_phdr (bfd *abfd,
return FALSE;
newsect->vma = hdr->p_vaddr + hdr->p_filesz;
newsect->lma = hdr->p_paddr + hdr->p_filesz;
- newsect->_raw_size = hdr->p_memsz - hdr->p_filesz;
+ newsect->size = hdr->p_memsz - hdr->p_filesz;
if (hdr->p_type == PT_LOAD)
{
newsect->flags |= SEC_ALLOC;
@@ -2296,14 +2607,13 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index)
case PT_GNU_STACK:
return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "stack");
+ case PT_GNU_RELRO:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "relro");
+
default:
- /* Check for any processor-specific program segment types.
- If no handler for them, default to making "segment" sections. */
+ /* Check for any processor-specific program segment types. */
bed = get_elf_backend_data (abfd);
- if (bed->elf_backend_section_from_phdr)
- return (*bed->elf_backend_section_from_phdr) (abfd, hdr, index);
- else
- return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "segment");
+ return bed->elf_backend_section_from_phdr (abfd, hdr, index, "proc");
}
}
@@ -2369,7 +2679,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
return;
}
- this_hdr->sh_flags = 0;
+ /* Don't clear sh_flags. Assembler may set additional bits. */
if ((asect->flags & SEC_ALLOC) != 0
|| asect->user_set_vma)
@@ -2378,7 +2688,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
this_hdr->sh_addr = 0;
this_hdr->sh_offset = 0;
- this_hdr->sh_size = asect->_raw_size;
+ this_hdr->sh_size = asect->size;
this_hdr->sh_link = 0;
this_hdr->sh_addralign = 1 << asect->alignment_power;
/* The sh_entsize and sh_info fields may have been set already by
@@ -2391,7 +2701,9 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
asect->flags. */
if (this_hdr->sh_type == SHT_NULL)
{
- if ((asect->flags & SEC_ALLOC) != 0
+ 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))
this_hdr->sh_type = SHT_NOBITS;
@@ -2486,16 +2798,18 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
if ((asect->flags & SEC_THREAD_LOCAL) != 0)
{
this_hdr->sh_flags |= SHF_TLS;
- if (asect->_raw_size == 0 && (asect->flags & SEC_HAS_CONTENTS) == 0)
+ if (asect->size == 0
+ && (asect->flags & SEC_HAS_CONTENTS) == 0)
{
- struct bfd_link_order *o;
+ struct bfd_link_order *o = asect->map_tail.link_order;
this_hdr->sh_size = 0;
- for (o = asect->link_order_head; o != NULL; o = o->next)
- if (this_hdr->sh_size < o->offset + o->size)
+ if (o != NULL)
+ {
this_hdr->sh_size = o->offset + o->size;
- if (this_hdr->sh_size)
- this_hdr->sh_type = SHT_NOBITS;
+ if (this_hdr->sh_size != 0)
+ this_hdr->sh_type = SHT_NOBITS;
+ }
}
}
@@ -2525,10 +2839,11 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
unsigned long symindx;
asection *elt, *first;
unsigned char *loc;
- struct bfd_link_order *l;
bfd_boolean gas;
- if (elf_section_data (sec)->this_hdr.sh_type != SHT_GROUP
+ /* Ignore linker created group section. See elfNN_ia64_object_p in
+ elfxx-ia64.c. */
+ if (((sec->flags & (SEC_GROUP | SEC_LINKER_CREATED)) != SEC_GROUP)
|| *failedptr)
return;
@@ -2552,7 +2867,7 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
if (sec->contents == NULL)
{
gas = FALSE;
- sec->contents = bfd_alloc (abfd, sec->_raw_size);
+ sec->contents = bfd_alloc (abfd, sec->size);
/* Arrange for the section to be written out. */
elf_section_data (sec)->this_hdr.contents = sec->contents;
@@ -2563,7 +2878,7 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
}
}
- loc = sec->contents + sec->_raw_size;
+ loc = sec->contents + sec->size;
/* Get the pointer to the first section in the group that gas
squirreled away here. objcopy arranges for this to be set to the
@@ -2592,29 +2907,7 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
break;
}
- /* If this is a relocatable link, then the above did nothing because
- SEC is the output section. Look through the input sections
- instead. */
- for (l = sec->link_order_head; l != NULL; l = l->next)
- if (l->type == bfd_indirect_link_order
- && (elt = elf_next_in_group (l->u.indirect.section)) != NULL)
- do
- {
- loc -= 4;
- H_PUT_32 (abfd,
- elf_section_data (elt->output_section)->this_idx, loc);
- elt = elf_next_in_group (elt);
- /* During a relocatable link, the lists are circular. */
- }
- while (elt != elf_next_in_group (l->u.indirect.section));
-
- /* With ld -r, merging SHT_GROUP sections results in wasted space
- due to allowing for the flag word on each input. We may well
- duplicate entries too. */
- while ((loc -= 4) > sec->contents)
- H_PUT_32 (abfd, 0, loc);
-
- if (loc != sec->contents)
+ if ((loc -= 4) != sec->contents)
abort ();
H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc);
@@ -2625,25 +2918,54 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
in here too, while we're at it. */
static bfd_boolean
-assign_section_numbers (bfd *abfd)
+assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
{
struct elf_obj_tdata *t = elf_tdata (abfd);
asection *sec;
unsigned int section_number, secn;
Elf_Internal_Shdr **i_shdrp;
- bfd_size_type amt;
+ struct bfd_elf_section_data *d;
section_number = 1;
_bfd_elf_strtab_clear_all_refs (elf_shstrtab (abfd));
+ /* SHT_GROUP sections are in relocatable files only. */
+ if (link_info == NULL || link_info->relocatable)
+ {
+ /* Put SHT_GROUP sections first. */
+ for (sec = abfd->sections; sec != NULL; sec = sec->next)
+ {
+ 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
+ {
+ if (section_number == SHN_LORESERVE)
+ section_number += SHN_HIRESERVE + 1 - SHN_LORESERVE;
+ d->this_idx = section_number++;
+ }
+ }
+ }
+ }
+
for (sec = abfd->sections; sec; sec = sec->next)
{
- struct bfd_elf_section_data *d = elf_section_data (sec);
+ d = elf_section_data (sec);
- if (section_number == SHN_LORESERVE)
- section_number += SHN_HIRESERVE + 1 - SHN_LORESERVE;
- d->this_idx = section_number++;
+ if (d->this_hdr.sh_type != SHT_GROUP)
+ {
+ if (section_number == SHN_LORESERVE)
+ section_number += SHN_HIRESERVE + 1 - SHN_LORESERVE;
+ d->this_idx = section_number++;
+ }
_bfd_elf_strtab_addref (elf_shstrtab (abfd), d->this_hdr.sh_name);
if ((sec->flags & SEC_RELOC) == 0)
d->rel_idx = 0;
@@ -2705,13 +3027,11 @@ assign_section_numbers (bfd *abfd)
/* Set up the list of section header pointers, in agreement with the
indices. */
- amt = section_number * sizeof (Elf_Internal_Shdr *);
- i_shdrp = bfd_zalloc (abfd, amt);
+ i_shdrp = bfd_zalloc2 (abfd, section_number, sizeof (Elf_Internal_Shdr *));
if (i_shdrp == NULL)
return FALSE;
- amt = sizeof (Elf_Internal_Shdr);
- i_shdrp[0] = bfd_zalloc (abfd, amt);
+ i_shdrp[0] = bfd_zalloc (abfd, sizeof (Elf_Internal_Shdr));
if (i_shdrp[0] == NULL)
{
bfd_release (abfd, i_shdrp);
@@ -2732,6 +3052,7 @@ assign_section_numbers (bfd *abfd)
i_shdrp[t->strtab_section] = &t->strtab_hdr;
t->symtab_hdr.sh_link = t->strtab_section;
}
+
for (sec = abfd->sections; sec; sec = sec->next)
{
struct bfd_elf_section_data *d = elf_section_data (sec);
@@ -2760,6 +3081,68 @@ assign_section_numbers (bfd *abfd)
d->rel_hdr2->sh_info = d->this_idx;
}
+ /* We need to set up sh_link for SHF_LINK_ORDER. */
+ if ((d->this_hdr.sh_flags & SHF_LINK_ORDER) != 0)
+ {
+ s = elf_linked_to_section (sec);
+ if (s)
+ {
+ /* elf_linked_to_section points to the input section. */
+ if (link_info != NULL)
+ {
+ /* Check discarded linkonce section. */
+ if (elf_discarded_section (s))
+ {
+ asection *kept;
+ (*_bfd_error_handler)
+ (_("%B: sh_link of section `%A' points to discarded section `%A' of `%B'"),
+ abfd, d->this_hdr.bfd_section,
+ 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);
+ if (kept == NULL)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ s = kept;
+ }
+
+ s = s->output_section;
+ BFD_ASSERT (s != NULL);
+ }
+ else
+ {
+ /* Handle objcopy. */
+ if (s->output_section == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%B: sh_link of section `%A' points to removed section `%A' of `%B'"),
+ abfd, d->this_hdr.bfd_section, s, s->owner);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ s = s->output_section;
+ }
+ d->this_hdr.sh_link = elf_section_data (s)->this_idx;
+ }
+ else
+ {
+ /* 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. Hence we could get the situation
+ where s is NULL. */
+ const struct elf_backend_data *bed
+ = get_elf_backend_data (abfd);
+ if (bed->link_order_error_handler)
+ bed->link_order_error_handler
+ (_("%B: warning: sh_link not set for section `%A'"),
+ abfd, sec);
+ }
+ }
+
switch (d->this_hdr.sh_type)
{
case SHT_REL:
@@ -2828,6 +3211,17 @@ assign_section_numbers (bfd *abfd)
d->this_hdr.sh_link = elf_section_data (s)->this_idx;
break;
+ 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. */
+ s = bfd_get_section_by_name (abfd, (sec->flags & SEC_ALLOC)
+ ? ".dynstr" : ".gnu.libstr");
+ if (s != NULL)
+ d->this_hdr.sh_link = elf_section_data (s)->this_idx;
+ break;
+
case SHT_HASH:
case SHT_GNU_versym:
/* sh_link is the section header index of the symbol table
@@ -2881,7 +3275,6 @@ elf_map_symbols (bfd *abfd)
unsigned int idx;
asection *asect;
asymbol **new_syms;
- bfd_size_type amt;
#ifdef DEBUG
fprintf (stderr, "elf_map_symbols\n");
@@ -2895,8 +3288,7 @@ elf_map_symbols (bfd *abfd)
}
max_index++;
- amt = max_index * sizeof (asymbol *);
- sect_syms = bfd_zalloc (abfd, amt);
+ sect_syms = bfd_zalloc2 (abfd, max_index, sizeof (asymbol *));
if (sect_syms == NULL)
return FALSE;
elf_section_syms (abfd) = sect_syms;
@@ -2969,8 +3361,7 @@ elf_map_symbols (bfd *abfd)
}
/* Now sort the symbols so the local symbols are first. */
- amt = (num_locals + num_globals) * sizeof (asymbol *);
- new_syms = bfd_alloc (abfd, amt);
+ new_syms = bfd_alloc2 (abfd, num_locals + num_globals, sizeof (asymbol *));
if (new_syms == NULL)
return FALSE;
@@ -3054,7 +3445,7 @@ _bfd_elf_compute_section_file_positions (bfd *abfd,
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_boolean failed;
- struct bfd_strtab_hash *strtab;
+ struct bfd_strtab_hash *strtab = NULL;
Elf_Internal_Shdr *shstrtab_hdr;
if (abfd->output_has_begun)
@@ -3076,7 +3467,7 @@ _bfd_elf_compute_section_file_positions (bfd *abfd,
if (failed)
return FALSE;
- if (!assign_section_numbers (abfd))
+ if (!assign_section_numbers (abfd, link_info))
return FALSE;
/* The backend linker builds symbol table information itself. */
@@ -3178,6 +3569,25 @@ make_mapping (bfd *abfd,
return m;
}
+/* Create the PT_DYNAMIC segment, which includes DYNSEC. Returns NULL
+ on failure. */
+
+struct elf_segment_map *
+_bfd_elf_make_dynamic_segment (bfd *abfd, asection *dynsec)
+{
+ struct elf_segment_map *m;
+
+ m = bfd_zalloc (abfd, sizeof (struct elf_segment_map));
+ if (m == NULL)
+ return NULL;
+ m->next = NULL;
+ m->p_type = PT_DYNAMIC;
+ m->count = 1;
+ m->sections[0] = dynsec;
+
+ return m;
+}
+
/* Set up a mapping from BFD sections to program segments. */
static bfd_boolean
@@ -3210,8 +3620,7 @@ map_sections_to_segments (bfd *abfd)
/* Select the allocated sections, and sort them. */
- amt = bfd_count_sections (abfd) * sizeof (asection *);
- sections = bfd_malloc (amt);
+ sections = bfd_malloc2 (bfd_count_sections (abfd), sizeof (asection *));
if (sections == NULL)
goto error_return;
@@ -3370,7 +3779,7 @@ map_sections_to_segments (bfd *abfd)
last_hdr = hdr;
/* .tbss sections effectively have zero size. */
if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) != SEC_THREAD_LOCAL)
- last_size = hdr->_raw_size;
+ last_size = hdr->size;
else
last_size = 0;
continue;
@@ -3394,7 +3803,7 @@ map_sections_to_segments (bfd *abfd)
last_hdr = hdr;
/* .tbss sections effectively have zero size. */
if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) != SEC_THREAD_LOCAL)
- last_size = hdr->_raw_size;
+ last_size = hdr->size;
else
last_size = 0;
phdr_index = i;
@@ -3415,15 +3824,9 @@ map_sections_to_segments (bfd *abfd)
/* If there is a .dynamic section, throw in a PT_DYNAMIC segment. */
if (dynsec != NULL)
{
- amt = sizeof (struct elf_segment_map);
- m = bfd_zalloc (abfd, amt);
+ m = _bfd_elf_make_dynamic_segment (abfd, dynsec);
if (m == NULL)
goto error_return;
- m->next = NULL;
- m->p_type = PT_DYNAMIC;
- m->count = 1;
- m->sections[0] = dynsec;
-
*pm = m;
pm = &m->next;
}
@@ -3519,6 +3922,21 @@ map_sections_to_segments (bfd *abfd)
pm = &m->next;
}
+ 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;
+ }
+
free (sections);
sections = NULL;
@@ -3578,8 +3996,8 @@ elf_sort_sections (const void *arg1, const void *arg2)
/* Sort by size, to put zero sized sections
before others at the same address. */
- size1 = (sec1->flags & SEC_LOAD) ? sec1->_raw_size : 0;
- size2 = (sec2->flags & SEC_LOAD) ? sec2->_raw_size : 0;
+ size1 = (sec1->flags & SEC_LOAD) ? sec1->size : 0;
+ size2 = (sec2->flags & SEC_LOAD) ? sec2->size : 0;
if (size1 < size2)
return -1;
@@ -3618,6 +4036,42 @@ 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. */
@@ -3634,7 +4088,6 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
bfd_vma filehdr_vaddr, filehdr_paddr;
bfd_vma phdrs_vaddr, phdrs_paddr;
Elf_Internal_Phdr *p;
- bfd_size_type amt;
if (elf_tdata (abfd)->segment_map == NULL)
{
@@ -3645,7 +4098,8 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
{
/* 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. */
+ sections from the segment map. We also remove excluded
+ sections. */
for (m = elf_tdata (abfd)->segment_map;
m != NULL;
m = m->next)
@@ -3653,13 +4107,12 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
unsigned int new_count;
unsigned int i;
- if (m->p_type != PT_LOAD)
- continue;
-
new_count = 0;
for (i = 0; i < m->count; i ++)
{
- if ((m->sections[i]->flags & SEC_ALLOC) != 0)
+ 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];
@@ -3688,7 +4141,10 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
elf_elfheader (abfd)->e_phnum = count;
if (count == 0)
- return TRUE;
+ {
+ 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
@@ -3697,8 +4153,9 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
if (alloc != 0 && count > alloc)
{
((*_bfd_error_handler)
- (_("%s: Not enough room for program headers (allocated %u, need %u)"),
- bfd_get_filename (abfd), alloc, count));
+ (_("%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;
}
@@ -3706,8 +4163,7 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
if (alloc == 0)
alloc = count;
- amt = alloc * sizeof (Elf_Internal_Phdr);
- phdrs = bfd_alloc (abfd, amt);
+ phdrs = bfd_alloc2 (abfd, alloc, sizeof (Elf_Internal_Phdr));
if (phdrs == NULL)
return FALSE;
@@ -3737,34 +4193,75 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
qsort (m->sections, (size_t) m->count, sizeof (asection *),
elf_sort_sections);
+ /* An ELF segment (described by Elf_Internal_Phdr) may contain a
+ 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;
p->p_type = m->p_type;
p->p_flags = m->p_flags;
if (p->p_type == PT_LOAD
- && m->count > 0
- && (m->sections[0]->flags & SEC_ALLOC) != 0)
+ && m->count > 0)
{
- if ((abfd->flags & D_PAGED) != 0)
- off += vma_page_aligned_bias (m->sections[0]->vma, off,
- bed->maxpagesize);
- else
+ bfd_size_type align;
+ bfd_vma adjust;
+ unsigned int align_power = 0;
+
+ for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
{
- bfd_size_type align;
+ unsigned int secalign;
- align = 0;
- for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
- {
- bfd_size_type secalign;
+ secalign = bfd_get_section_alignment (abfd, *secpp);
+ if (secalign > align_power)
+ align_power = secalign;
+ }
+ align = (bfd_size_type) 1 << align_power;
- secalign = bfd_get_section_alignment (abfd, *secpp);
- if (secalign > align)
- align = secalign;
- }
+ if ((abfd->flags & D_PAGED) != 0 && bed->maxpagesize > align)
+ align = bed->maxpagesize;
- off += vma_page_aligned_bias (m->sections[0]->vma, off,
- 1 << align);
+ 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)
+ {
+ /* 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 ((m->sections[i]->flags & SEC_THREAD_LOCAL) == 0
+ || ++i >= m->count)
+ {
+ off -= adjust;
+ voff = adjust - align;
+ break;
+ }
+ }
}
}
+ /* Make sure the .dynamic section is the first section in the
+ PT_DYNAMIC segment. */
+ else if (p->p_type == PT_DYNAMIC
+ && m->count > 1
+ && strcmp (m->sections[0]->name, ".dynamic") != 0)
+ {
+ _bfd_error_handler
+ (_("%B: The first section in the PT_DYNAMIC segment is not the .dynamic section"),
+ abfd);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
if (m->count == 0)
p->p_vaddr = 0;
@@ -3804,8 +4301,8 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
if (p->p_vaddr < (bfd_vma) off)
{
(*_bfd_error_handler)
- (_("%s: Not enough room for program headers, try linking with -N"),
- bfd_get_filename (abfd));
+ (_("%B: Not enough room for program headers, try linking with -N"),
+ abfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -3863,7 +4360,7 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
|| (p->p_type == PT_NOTE && bfd_get_format (abfd) == bfd_core))
{
if (! m->includes_filehdr && ! m->includes_phdrs)
- p->p_offset = off;
+ p->p_offset = off + voff;
else
{
file_ptr adjust;
@@ -3874,8 +4371,6 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
}
}
- voff = off;
-
for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
{
asection *sec;
@@ -3886,130 +4381,111 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
flags = sec->flags;
align = 1 << bfd_get_section_alignment (abfd, sec);
- /* The section may have artificial alignment forced by a
- link script. Notice this case by the gap between the
- cumulative phdr lma and the section's lma. */
- if (p->p_paddr + p->p_memsz < sec->lma)
- {
- bfd_vma adjust = sec->lma - (p->p_paddr + p->p_memsz);
-
- p->p_memsz += adjust;
- if (p->p_type == PT_LOAD
- || (p->p_type == PT_NOTE
- && bfd_get_format (abfd) == bfd_core))
- {
- off += adjust;
- voff += adjust;
- }
- if ((flags & SEC_LOAD) != 0
- || (flags & SEC_THREAD_LOCAL) != 0)
- p->p_filesz += adjust;
- }
-
- if (p->p_type == PT_LOAD)
+ if (p->p_type == PT_LOAD
+ || p->p_type == PT_TLS)
{
bfd_signed_vma adjust;
if ((flags & SEC_LOAD) != 0)
{
- adjust = sec->lma - (p->p_paddr + p->p_memsz);
+ adjust = sec->lma - (p->p_paddr + p->p_filesz);
if (adjust < 0)
- adjust = 0;
+ {
+ (*_bfd_error_handler)
+ (_("%B: section %A lma 0x%lx overlaps previous sections"),
+ abfd, sec, (unsigned long) sec->lma);
+ adjust = 0;
+ }
+ off += adjust;
+ p->p_filesz += adjust;
+ p->p_memsz += adjust;
}
- else if ((flags & SEC_ALLOC) != 0)
+ /* .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. FIXME: I'm not sure if
- this adjustment is really necessary. We used to
- not have the SEC_LOAD case just above, and then
- this was necessary, but now I'm not sure. */
- if ((abfd->flags & D_PAGED) != 0)
- adjust = vma_page_aligned_bias (sec->vma, voff,
- bed->maxpagesize);
- else
- adjust = vma_page_aligned_bias (sec->vma, voff,
- align);
- }
- else
- adjust = 0;
-
- if (adjust != 0)
- {
- if (i == 0)
- {
- (* _bfd_error_handler) (_("\
-Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"),
- bfd_section_name (abfd, sec),
- sec->lma,
- p->p_paddr);
- return FALSE;
- }
+ 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;
- off += adjust;
- voff += adjust;
- if ((flags & SEC_LOAD) != 0)
- p->p_filesz += adjust;
}
-
- sec->filepos = off;
-
- /* We check SEC_HAS_CONTENTS here because if NOLOAD is
- used in a linker script we may have a section with
- SEC_LOAD clear but which is supposed to have
- contents. */
- if ((flags & SEC_LOAD) != 0
- || (flags & SEC_HAS_CONTENTS) != 0)
- off += sec->_raw_size;
-
- if ((flags & SEC_ALLOC) != 0
- && ((flags & SEC_LOAD) != 0
- || (flags & SEC_THREAD_LOCAL) == 0))
- voff += sec->_raw_size;
}
if (p->p_type == PT_NOTE && bfd_get_format (abfd) == bfd_core)
{
- /* The actual "note" segment has i == 0.
- This is the one that actually contains everything. */
+ /* The section at i == 0 is the one that actually contains
+ everything. */
if (i == 0)
{
sec->filepos = off;
- p->p_filesz = sec->_raw_size;
- off += sec->_raw_size;
- voff = off;
+ off += sec->size;
+ p->p_filesz = sec->size;
+ p->p_memsz = 0;
+ p->p_align = 1;
}
else
{
- /* Fake sections -- don't need to be written. */
+ /* The rest are fake sections that shouldn't be written. */
sec->filepos = 0;
- sec->_raw_size = 0;
- flags = sec->flags = 0;
+ sec->size = 0;
+ sec->flags = 0;
+ continue;
}
- p->p_memsz = 0;
- p->p_align = 1;
}
else
{
- if ((sec->flags & SEC_LOAD) != 0
- || (sec->flags & SEC_THREAD_LOCAL) == 0
- || p->p_type == PT_TLS)
- p->p_memsz += sec->_raw_size;
+ 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;
+ }
if ((flags & SEC_LOAD) != 0)
- p->p_filesz += sec->_raw_size;
+ {
+ p->p_filesz += sec->size;
+ p->p_memsz += sec->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->_raw_size == 0
+ && sec->size == 0
&& (sec->flags & SEC_HAS_CONTENTS) == 0)
{
- struct bfd_link_order *o;
- bfd_vma tbss_size = 0;
-
- for (o = sec->link_order_head; o != NULL; o = o->next)
- if (tbss_size < o->offset + o->size)
- tbss_size = o->offset + o->size;
-
- p->p_memsz += tbss_size;
+ struct bfd_link_order *o = sec->map_tail.link_order;
+ if (o != NULL)
+ p->p_memsz += o->offset + o->size;
}
if (align > p->p_align
@@ -4037,6 +4513,22 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
if (p->p_type != PT_LOAD && m->count > 0)
{
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)
+ {
+ 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;
+ }
p->p_offset = m->sections[0]->filepos;
}
if (m->count == 0)
@@ -4053,6 +4545,37 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
if (! m->p_paddr_valid)
p->p_paddr = phdrs_paddr;
}
+ else if (p->p_type == PT_GNU_RELRO)
+ {
+ Elf_Internal_Phdr *lp;
+
+ for (lp = phdrs; lp < phdrs + count; ++lp)
+ {
+ 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)
+ break;
+ }
+
+ if (lp < phdrs + count
+ && link_info->relro_end > lp->p_vaddr)
+ {
+ p->p_vaddr = lp->p_vaddr;
+ p->p_paddr = lp->p_paddr;
+ p->p_offset = lp->p_offset;
+ p->p_filesz = link_info->relro_end - lp->p_vaddr;
+ p->p_memsz = p->p_filesz;
+ p->p_align = 1;
+ p->p_flags = (lp->p_flags & ~PF_W);
+ }
+ else
+ {
+ memset (p, 0, sizeof *p);
+ p->p_type = PT_NULL;
+ }
+ }
}
}
@@ -4140,6 +4663,12 @@ get_program_header_size (bfd *abfd)
++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
@@ -4179,10 +4708,13 @@ get_program_header_size (bfd *abfd)
_bfd_elf_compute_section_file_positions. All the section sizes and
VMAs must be known before this is called.
- We do not consider reloc sections at this point, unless they form
- part of the loadable image. Reloc sections are assigned file
- positions in assign_file_positions_for_relocs, which is called by
- write_object_contents and final_link.
+ Reloc sections come in two flavours: Those processed specially as
+ "side-channel" data attached to a section to which they apply, and
+ those that bfd doesn't process as relocations. The latter sort are
+ stored in a normal bfd section by bfd_section_from_shdr. We don't
+ consider the former sort here, unless they form part of the loadable
+ image. Reloc sections not assigned here will be handled later by
+ assign_file_positions_for_relocs.
We also don't set the positions of the .symtab and .strtab here. */
@@ -4256,8 +4788,8 @@ assign_file_positions_except_relocs (bfd *abfd,
else if ((hdr->sh_flags & SHF_ALLOC) != 0)
{
((*_bfd_error_handler)
- (_("%s: warning: allocated section `%s' not in segment"),
- bfd_get_filename (abfd),
+ (_("%B: warning: allocated section `%s' not in segment"),
+ abfd,
(hdr->bfd_section == NULL
? "*unknown*"
: hdr->bfd_section->name)));
@@ -4368,18 +4900,8 @@ prep_headers (bfd *abfd)
/* If we're building an executable, we'll need a program header table. */
if (abfd->flags & EXEC_P)
- {
- /* It all happens later. */
-#if 0
- i_ehdrp->e_phentsize = sizeof (Elf_External_Phdr);
-
- /* elf_build_phdrs() returns a (NULL-terminated) array of
- Elf_Internal_Phdrs. */
- i_phdrp = elf_build_phdrs (abfd, i_ehdrp, i_shdrp, &i_ehdrp->e_phnum);
- i_ehdrp->e_phoff = outbase;
- outbase += i_ehdrp->e_phentsize * i_ehdrp->e_phnum;
-#endif
- }
+ /* It all happens later. */
+ ;
else
{
i_ehdrp->e_phentsize = 0;
@@ -4469,8 +4991,9 @@ _bfd_elf_write_object_contents (bfd *abfd)
}
/* Write out the section header names. */
- if (bfd_seek (abfd, elf_tdata (abfd)->shstrtab_hdr.sh_offset, SEEK_SET) != 0
- || ! _bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd)))
+ 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))))
return FALSE;
if (bed->elf_backend_final_write_processing)
@@ -4506,19 +5029,7 @@ _bfd_elf_section_from_bfd_section (bfd *abfd, struct bfd_section *asect)
else if (bfd_is_und_section (asect))
index = SHN_UNDEF;
else
- {
- Elf_Internal_Shdr **i_shdrp = elf_elfsections (abfd);
- int maxindex = elf_numsections (abfd);
-
- for (index = 1; index < maxindex; index++)
- {
- Elf_Internal_Shdr *hdr = i_shdrp[index];
-
- if (hdr != NULL && hdr->bfd_section == asect)
- return index;
- }
- index = -1;
- }
+ index = -1;
bed = get_elf_backend_data (abfd);
if (bed->elf_backend_section_from_bfd_section)
@@ -4572,8 +5083,8 @@ _bfd_elf_symbol_from_bfd_symbol (bfd *abfd, asymbol **asym_ptr_ptr)
/* This case can occur when using --strip-symbol on a symbol
which is used in a relocation entry. */
(*_bfd_error_handler)
- (_("%s: symbol `%s' required but not present"),
- bfd_archive_filename (abfd), bfd_asymbol_name (asym_ptr));
+ (_("%B: symbol `%s' required but not present"),
+ abfd, bfd_asymbol_name (asym_ptr));
bfd_set_error (bfd_error_no_symbols);
return -1;
}
@@ -4591,10 +5102,10 @@ _bfd_elf_symbol_from_bfd_symbol (bfd *abfd, asymbol **asym_ptr_ptr)
return idx;
}
-/* Copy private BFD data. This copies any program header information. */
+/* Rewrite program header information. */
static bfd_boolean
-copy_private_bfd_data (bfd *ibfd, bfd *obfd)
+rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
{
Elf_Internal_Ehdr *iehdr;
struct elf_segment_map *map;
@@ -4610,13 +5121,6 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
unsigned int phdr_adjust_num = 0;
const struct elf_backend_data *bed;
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
-
- if (elf_tdata (ibfd)->phdr == NULL)
- return TRUE;
-
bed = get_elf_backend_data (ibfd);
iehdr = elf_elfheader (ibfd);
@@ -4634,7 +5138,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
#define SECTION_SIZE(section, segment) \
(((section->flags & (SEC_HAS_CONTENTS | SEC_THREAD_LOCAL)) \
!= SEC_THREAD_LOCAL || segment->p_type == PT_TLS) \
- ? section->_raw_size : 0)
+ ? section->size : 0)
/* Returns TRUE if the given section is contained within
the given segment. VMA addresses are compared. */
@@ -4656,7 +5160,7 @@ copy_private_bfd_data (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->_raw_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
@@ -4668,9 +5172,9 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
&& p->p_memsz == 0 \
&& p->p_filesz > 0 \
&& (s->flags & SEC_HAS_CONTENTS) != 0 \
- && s->_raw_size > 0 \
+ && s->size > 0 \
&& (bfd_vma) s->filepos >= p->p_offset \
- && ((bfd_vma) s->filepos + s->_raw_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.
@@ -4682,7 +5186,9 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
4. The section has not already been allocated to a previous segment.
5. PT_GNU_STACK segments do not include any sections.
6. PT_TLS segment includes only SHF_TLS sections.
- 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments. */
+ 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) \
((((segment->p_paddr \
? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
@@ -4696,6 +5202,13 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
&& (segment->p_type == PT_LOAD \
|| segment->p_type == PT_TLS \
|| (section->flags & SEC_THREAD_LOCAL) == 0) \
+ && (segment->p_type != PT_DYNAMIC \
+ || SECTION_SIZE (section, segment) > 0 \
+ || (segment->p_paddr \
+ ? segment->p_paddr != section->lma \
+ : segment->p_vaddr != section->vma) \
+ || (strcmp (bfd_get_section_name (ibfd, section), ".dynamic") \
+ == 0)) \
&& ! section->segment_mark)
/* Returns TRUE iff seg1 starts after the end of seg2. */
@@ -4860,8 +5373,8 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
a warning is produced. */
if (segment->p_type == PT_LOAD)
(*_bfd_error_handler)
- (_("%s: warning: Empty loadable segment detected, is this intentional ?\n"),
- bfd_archive_filename (ibfd));
+ (_("%B: warning: Empty loadable segment detected, is this intentional ?\n"),
+ ibfd);
map->count = 0;
*pointer_to_map = map;
@@ -4900,8 +5413,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
/* Gcc 2.96 miscompiles this code on mips. Don't do casting here
to work around this long long bug. */
- amt = section_count * sizeof (asection *);
- sections = bfd_malloc (amt);
+ sections = bfd_malloc2 (section_count, sizeof (asection *));
if (sections == NULL)
return FALSE;
@@ -5068,10 +5580,10 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
/* If the gap between the end of the previous section
and the start of this section is more than
maxpagesize then we need to start a new segment. */
- if ((BFD_ALIGN (prev_sec->lma + prev_sec->_raw_size,
+ if ((BFD_ALIGN (prev_sec->lma + prev_sec->size,
maxpagesize)
< BFD_ALIGN (output_section->lma, maxpagesize))
- || ((prev_sec->lma + prev_sec->_raw_size)
+ || ((prev_sec->lma + prev_sec->size)
> output_section->lma))
{
if (suggested_lma == 0)
@@ -5156,31 +5668,6 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
-= (count - phdr_adjust_num) * iehdr->e_phentsize;
}
-#if 0
- /* Final Step: Sort the segments into ascending order of physical
- address. */
- if (map_first != NULL)
- {
- struct elf_segment_map *prev;
-
- prev = map_first;
- for (map = map_first->next; map != NULL; prev = map, map = map->next)
- {
- /* Yes I know - its a bubble sort.... */
- if (map->next != NULL && (map->next->p_paddr < map->p_paddr))
- {
- /* Swap map and map->next. */
- prev->next = map->next;
- map->next = map->next->next;
- prev->next->next = map;
-
- /* Restart loop. */
- map = map_first;
- }
- }
- }
-#endif
-
#undef SEGMENT_END
#undef SECTION_SIZE
#undef IS_CONTAINED_BY_VMA
@@ -5193,39 +5680,256 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
return TRUE;
}
-/* Copy private section information. This copies over the entsize
- field, and sometimes the info field. */
+/* Copy ELF program header information. */
+
+static bfd_boolean
+copy_elf_program_header (bfd *ibfd, bfd *obfd)
+{
+ Elf_Internal_Ehdr *iehdr;
+ struct elf_segment_map *map;
+ struct elf_segment_map *map_first;
+ struct elf_segment_map **pointer_to_map;
+ Elf_Internal_Phdr *segment;
+ unsigned int i;
+ unsigned int num_segments;
+ bfd_boolean phdr_included = FALSE;
+
+ iehdr = elf_elfheader (ibfd);
+
+ map_first = NULL;
+ pointer_to_map = &map_first;
+
+ num_segments = elf_elfheader (ibfd)->e_phnum;
+ for (i = 0, segment = elf_tdata (ibfd)->phdr;
+ i < num_segments;
+ i++, segment++)
+ {
+ asection *section;
+ unsigned int section_count;
+ bfd_size_type amt;
+ Elf_Internal_Shdr *this_hdr;
+
+ /* FIXME: Do we need to copy PT_NULL segment? */
+ if (segment->p_type == PT_NULL)
+ continue;
+
+ /* Compute how many sections are in this segment. */
+ for (section = ibfd->sections, section_count = 0;
+ section != NULL;
+ section = section->next)
+ {
+ this_hdr = &(elf_section_data(section)->this_hdr);
+ if (ELF_IS_SECTION_IN_SEGMENT_FILE (this_hdr, segment))
+ section_count++;
+ }
+
+ /* Allocate a segment map big enough to contain
+ all of the sections we have selected. */
+ amt = sizeof (struct elf_segment_map);
+ if (section_count != 0)
+ amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
+ map = bfd_alloc (obfd, amt);
+ if (map == NULL)
+ return FALSE;
+
+ /* Initialize the fields of the output segment map with the
+ input segment. */
+ map->next = NULL;
+ map->p_type = segment->p_type;
+ map->p_flags = segment->p_flags;
+ map->p_flags_valid = 1;
+ map->p_paddr = segment->p_paddr;
+ map->p_paddr_valid = 1;
+
+ /* Determine if this segment contains the ELF file header
+ and if it contains the program headers themselves. */
+ map->includes_filehdr = (segment->p_offset == 0
+ && segment->p_filesz >= iehdr->e_ehsize);
+
+ map->includes_phdrs = 0;
+ if (! phdr_included || segment->p_type != PT_LOAD)
+ {
+ map->includes_phdrs =
+ (segment->p_offset <= (bfd_vma) iehdr->e_phoff
+ && (segment->p_offset + segment->p_filesz
+ >= ((bfd_vma) iehdr->e_phoff
+ + iehdr->e_phnum * iehdr->e_phentsize)));
+
+ if (segment->p_type == PT_LOAD && map->includes_phdrs)
+ phdr_included = TRUE;
+ }
+
+ if (section_count != 0)
+ {
+ unsigned int isec = 0;
+
+ for (section = ibfd->sections;
+ 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->count = section_count;
+ *pointer_to_map = map;
+ pointer_to_map = &map->next;
+ }
+
+ elf_tdata (obfd)->segment_map = map_first;
+ return TRUE;
+}
+
+/* Copy private BFD data. This copies or rewrites ELF program header
+ information. */
+
+static bfd_boolean
+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;
+
+ if (elf_tdata (ibfd)->phdr == NULL)
+ return TRUE;
+
+ if (ibfd->xvec == obfd->xvec)
+ {
+ /* Check if any sections in the input BFD covered by ELF program
+ header are changed. */
+ Elf_Internal_Phdr *segment;
+ asection *section, *osec;
+ unsigned int i, num_segments;
+ Elf_Internal_Shdr *this_hdr;
+
+ /* Initialize the segment mark field. */
+ for (section = obfd->sections; section != NULL;
+ section = section->next)
+ section->segment_mark = FALSE;
+
+ num_segments = elf_elfheader (ibfd)->e_phnum;
+ for (i = 0, segment = elf_tdata (ibfd)->phdr;
+ i < num_segments;
+ i++, segment++)
+ {
+ for (section = ibfd->sections;
+ section != NULL; section = section->next)
+ {
+ /* We mark the output section so that we know it comes
+ from the input BFD. */
+ osec = section->output_section;
+ if (osec)
+ osec->segment_mark = TRUE;
+
+ /* Check if this section is covered by the segment. */
+ this_hdr = &(elf_section_data(section)->this_hdr);
+ if (ELF_IS_SECTION_IN_SEGMENT_FILE (this_hdr, segment))
+ {
+ /* FIXME: Check if its output section is changed or
+ removed. What else do we need to check? */
+ if (osec == NULL
+ || section->flags != osec->flags
+ || section->lma != osec->lma
+ || section->vma != osec->vma
+ || section->size != osec->size
+ || section->rawsize != osec->rawsize
+ || section->alignment_power != osec->alignment_power)
+ goto rewrite;
+ }
+ }
+ }
+
+ /* Check to see if any output section doesn't come from the
+ input BFD. */
+ for (section = obfd->sections; section != NULL;
+ section = section->next)
+ {
+ if (section->segment_mark == FALSE)
+ goto rewrite;
+ else
+ section->segment_mark = FALSE;
+ }
+
+ return copy_elf_program_header (ibfd, obfd);
+ }
+
+rewrite:
+ return rewrite_elf_program_header (ibfd, obfd);
+}
+
+/* Initialize private output section information from input section. */
bfd_boolean
-_bfd_elf_copy_private_section_data (bfd *ibfd,
+_bfd_elf_init_private_section_data (bfd *ibfd,
asection *isec,
bfd *obfd,
- asection *osec)
+ asection *osec,
+ struct bfd_link_info *link_info)
+
{
Elf_Internal_Shdr *ihdr, *ohdr;
+ bfd_boolean need_group = link_info == NULL || link_info->relocatable;
if (ibfd->xvec->flavour != bfd_target_elf_flavour
|| obfd->xvec->flavour != bfd_target_elf_flavour)
return TRUE;
- if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
+ /* FIXME: What if the output ELF section type has been set to
+ something different? */
+ if (elf_section_type (osec) == SHT_NULL)
+ elf_section_type (osec) = elf_section_type (isec);
+
+ /* 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)
{
- asection *s;
+ if (elf_sec_group (isec) == NULL
+ || (elf_sec_group (isec)->flags & SEC_LINKER_CREATED) == 0)
+ {
+ if (elf_section_flags (isec) & SHF_GROUP)
+ elf_section_flags (osec) |= SHF_GROUP;
+ elf_next_in_group (osec) = elf_next_in_group (isec);
+ elf_group_name (osec) = elf_group_name (isec);
+ }
+ }
- /* Only set up the segments if there are no more SEC_ALLOC
- sections. FIXME: This won't do the right thing if objcopy is
- used to remove the last SEC_ALLOC section, since objcopy
- won't call this routine in that case. */
- for (s = isec->next; s != NULL; s = s->next)
- if ((s->flags & SEC_ALLOC) != 0)
- break;
- if (s == NULL)
- {
- if (! copy_private_bfd_data (ibfd, obfd))
- return FALSE;
- }
+ ihdr = &elf_section_data (isec)->this_hdr;
+
+ /* We need to handle elf_linked_to_section for SHF_LINK_ORDER. We
+ don't use the output section of the linked-to section since it
+ may be NULL at this point. */
+ if ((ihdr->sh_flags & SHF_LINK_ORDER) != 0)
+ {
+ ohdr = &elf_section_data (osec)->this_hdr;
+ ohdr->sh_flags |= SHF_LINK_ORDER;
+ elf_linked_to_section (osec) = elf_linked_to_section (isec);
}
+ osec->use_rela_p = isec->use_rela_p;
+
+ return TRUE;
+}
+
+/* Copy private section information. This copies over the entsize
+ field, and sometimes the info field. */
+
+bfd_boolean
+_bfd_elf_copy_private_section_data (bfd *ibfd,
+ asection *isec,
+ bfd *obfd,
+ asection *osec)
+{
+ Elf_Internal_Shdr *ihdr, *ohdr;
+
+ if (ibfd->xvec->flavour != bfd_target_elf_flavour
+ || obfd->xvec->flavour != bfd_target_elf_flavour)
+ return TRUE;
+
ihdr = &elf_section_data (isec)->this_hdr;
ohdr = &elf_section_data (osec)->this_hdr;
@@ -5237,13 +5941,29 @@ _bfd_elf_copy_private_section_data (bfd *ibfd,
|| ihdr->sh_type == SHT_GNU_verdef)
ohdr->sh_info = ihdr->sh_info;
- /* Set things up for objcopy. The output SHT_GROUP section will
- have its elf_next_in_group pointing back to the input group
- members. */
- elf_next_in_group (osec) = elf_next_in_group (isec);
- elf_group_name (osec) = elf_group_name (isec);
+ return _bfd_elf_init_private_section_data (ibfd, isec, obfd, osec,
+ NULL);
+}
- osec->use_rela_p = isec->use_rela_p;
+/* Copy private header information. */
+
+bfd_boolean
+_bfd_elf_copy_private_header_data (bfd *ibfd, bfd *obfd)
+{
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ /* Copy over private BFD data if it has not already been copied.
+ This must be done here, rather than in the copy_private_bfd_data
+ entry point, because the latter is called after the section
+ contents have been set, which means that the program headers have
+ already been worked out. */
+ if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
+ {
+ if (! copy_private_bfd_data (ibfd, obfd))
+ return FALSE;
+ }
return TRUE;
}
@@ -5312,8 +6032,8 @@ swap_out_syms (bfd *abfd,
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Shdr *symtab_shndx_hdr;
Elf_Internal_Shdr *symstrtab_hdr;
- char *outbound_syms;
- char *outbound_shndx;
+ bfd_byte *outbound_syms;
+ bfd_byte *outbound_shndx;
int idx;
bfd_size_type amt;
bfd_boolean name_local_sections;
@@ -5338,8 +6058,7 @@ swap_out_syms (bfd *abfd,
symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr;
symstrtab_hdr->sh_type = SHT_STRTAB;
- amt = (bfd_size_type) (1 + symcount) * bed->s->sizeof_sym;
- outbound_syms = bfd_alloc (abfd, amt);
+ outbound_syms = bfd_alloc2 (abfd, 1 + symcount, bed->s->sizeof_sym);
if (outbound_syms == NULL)
{
_bfd_stringtab_free (stt);
@@ -5352,7 +6071,8 @@ swap_out_syms (bfd *abfd,
if (symtab_shndx_hdr->sh_name != 0)
{
amt = (bfd_size_type) (1 + symcount) * sizeof (Elf_External_Sym_Shndx);
- outbound_shndx = bfd_zalloc (abfd, amt);
+ outbound_shndx = bfd_zalloc2 (abfd, 1 + symcount,
+ sizeof (Elf_External_Sym_Shndx));
if (outbound_shndx == NULL)
{
_bfd_stringtab_free (stt);
@@ -5680,10 +6400,10 @@ _bfd_elf_canonicalize_dynamic_symtab (bfd *abfd,
return symcount;
}
-/* Return the size required for the dynamic reloc entries. Any
- section that was actually installed in the BFD, and has type
- SHT_REL or SHT_RELA, and uses the dynamic symbol table, is
- considered to be a dynamic reloc section. */
+/* Return the size required for the dynamic reloc entries. Any loadable
+ section that was actually installed in the BFD, and has type SHT_REL
+ or SHT_RELA, and uses the dynamic symbol table, is considered to be a
+ dynamic reloc section. */
long
_bfd_elf_get_dynamic_reloc_upper_bound (bfd *abfd)
@@ -5699,23 +6419,23 @@ _bfd_elf_get_dynamic_reloc_upper_bound (bfd *abfd)
ret = sizeof (arelent *);
for (s = abfd->sections; s != NULL; s = s->next)
- if (elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd)
+ if ((s->flags & SEC_LOAD) != 0
+ && elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd)
&& (elf_section_data (s)->this_hdr.sh_type == SHT_REL
|| elf_section_data (s)->this_hdr.sh_type == SHT_RELA))
- ret += ((s->_raw_size / elf_section_data (s)->this_hdr.sh_entsize)
+ ret += ((s->size / elf_section_data (s)->this_hdr.sh_entsize)
* sizeof (arelent *));
return ret;
}
-/* Canonicalize the dynamic relocation entries. Note that we return
- the dynamic relocations as a single block, although they are
- actually associated with particular sections; the interface, which
- was designed for SunOS style shared libraries, expects that there
- is only one set of dynamic relocs. Any section that was actually
- installed in the BFD, and has type SHT_REL or SHT_RELA, and uses
- the dynamic symbol table, is considered to be a dynamic reloc
- section. */
+/* Canonicalize the dynamic relocation entries. Note that we return the
+ dynamic relocations as a single block, although they are actually
+ associated with particular sections; the interface, which was
+ designed for SunOS style shared libraries, expects that there is only
+ one set of dynamic relocs. Any loadable section that was actually
+ installed in the BFD, and has type SHT_REL or SHT_RELA, and uses the
+ dynamic symbol table, is considered to be a dynamic reloc section. */
long
_bfd_elf_canonicalize_dynamic_reloc (bfd *abfd,
@@ -5736,7 +6456,8 @@ _bfd_elf_canonicalize_dynamic_reloc (bfd *abfd,
ret = 0;
for (s = abfd->sections; s != NULL; s = s->next)
{
- if (elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd)
+ if ((s->flags & SEC_LOAD) != 0
+ && elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd)
&& (elf_section_data (s)->this_hdr.sh_type == SHT_REL
|| elf_section_data (s)->this_hdr.sh_type == SHT_RELA))
{
@@ -5745,7 +6466,7 @@ _bfd_elf_canonicalize_dynamic_reloc (bfd *abfd,
if (! (*slurp_relocs) (abfd, s, syms, TRUE))
return -1;
- count = s->_raw_size / elf_section_data (s)->this_hdr.sh_entsize;
+ count = s->size / elf_section_data (s)->this_hdr.sh_entsize;
p = s->relocation;
for (i = 0; i < count; i++)
*storage++ = p++;
@@ -5761,10 +6482,123 @@ _bfd_elf_canonicalize_dynamic_reloc (bfd *abfd,
/* Read in the version information. */
bfd_boolean
-_bfd_elf_slurp_version_tables (bfd *abfd)
+_bfd_elf_slurp_version_tables (bfd *abfd, bfd_boolean default_imported_symver)
{
bfd_byte *contents = NULL;
- bfd_size_type amt;
+ unsigned int freeidx = 0;
+
+ if (elf_dynverref (abfd) != 0)
+ {
+ Elf_Internal_Shdr *hdr;
+ Elf_External_Verneed *everneed;
+ Elf_Internal_Verneed *iverneed;
+ unsigned int i;
+ bfd_byte *contents_end;
+
+ hdr = &elf_tdata (abfd)->dynverref_hdr;
+
+ elf_tdata (abfd)->verref = bfd_zalloc2 (abfd, hdr->sh_info,
+ sizeof (Elf_Internal_Verneed));
+ if (elf_tdata (abfd)->verref == NULL)
+ goto error_return;
+
+ elf_tdata (abfd)->cverrefs = hdr->sh_info;
+
+ contents = bfd_malloc (hdr->sh_size);
+ if (contents == NULL)
+ {
+error_return_verref:
+ elf_tdata (abfd)->verref = NULL;
+ elf_tdata (abfd)->cverrefs = 0;
+ goto error_return;
+ }
+ if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0
+ || bfd_bread (contents, hdr->sh_size, abfd) != hdr->sh_size)
+ goto error_return_verref;
+
+ if (hdr->sh_info && hdr->sh_size < sizeof (Elf_External_Verneed))
+ goto error_return_verref;
+
+ BFD_ASSERT (sizeof (Elf_External_Verneed)
+ == sizeof (Elf_External_Vernaux));
+ contents_end = contents + hdr->sh_size - sizeof (Elf_External_Verneed);
+ everneed = (Elf_External_Verneed *) contents;
+ iverneed = elf_tdata (abfd)->verref;
+ for (i = 0; i < hdr->sh_info; i++, iverneed++)
+ {
+ Elf_External_Vernaux *evernaux;
+ Elf_Internal_Vernaux *ivernaux;
+ unsigned int j;
+
+ _bfd_elf_swap_verneed_in (abfd, everneed, iverneed);
+
+ iverneed->vn_bfd = abfd;
+
+ iverneed->vn_filename =
+ bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
+ iverneed->vn_file);
+ if (iverneed->vn_filename == NULL)
+ goto error_return_verref;
+
+ if (iverneed->vn_cnt == 0)
+ iverneed->vn_auxptr = NULL;
+ else
+ {
+ iverneed->vn_auxptr = bfd_alloc2 (abfd, iverneed->vn_cnt,
+ sizeof (Elf_Internal_Vernaux));
+ if (iverneed->vn_auxptr == NULL)
+ goto error_return_verref;
+ }
+
+ if (iverneed->vn_aux
+ > (size_t) (contents_end - (bfd_byte *) everneed))
+ goto error_return_verref;
+
+ evernaux = ((Elf_External_Vernaux *)
+ ((bfd_byte *) everneed + iverneed->vn_aux));
+ ivernaux = iverneed->vn_auxptr;
+ for (j = 0; j < iverneed->vn_cnt; j++, ivernaux++)
+ {
+ _bfd_elf_swap_vernaux_in (abfd, evernaux, ivernaux);
+
+ ivernaux->vna_nodename =
+ bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
+ ivernaux->vna_name);
+ if (ivernaux->vna_nodename == NULL)
+ goto error_return_verref;
+
+ if (j + 1 < iverneed->vn_cnt)
+ ivernaux->vna_nextptr = ivernaux + 1;
+ else
+ ivernaux->vna_nextptr = NULL;
+
+ if (ivernaux->vna_next
+ > (size_t) (contents_end - (bfd_byte *) evernaux))
+ goto error_return_verref;
+
+ evernaux = ((Elf_External_Vernaux *)
+ ((bfd_byte *) evernaux + ivernaux->vna_next));
+
+ if (ivernaux->vna_other > freeidx)
+ freeidx = ivernaux->vna_other;
+ }
+
+ if (i + 1 < hdr->sh_info)
+ iverneed->vn_nextref = iverneed + 1;
+ else
+ iverneed->vn_nextref = NULL;
+
+ if (iverneed->vn_next
+ > (size_t) (contents_end - (bfd_byte *) everneed))
+ goto error_return_verref;
+
+ everneed = ((Elf_External_Verneed *)
+ ((bfd_byte *) everneed + iverneed->vn_next));
+ }
+
+ free (contents);
+ contents = NULL;
+ }
if (elf_dynverdef (abfd) != 0)
{
@@ -5775,6 +6609,7 @@ _bfd_elf_slurp_version_tables (bfd *abfd)
Elf_Internal_Verdef iverdefmem;
unsigned int i;
unsigned int maxidx;
+ bfd_byte *contents_end_def, *contents_end_aux;
hdr = &elf_tdata (abfd)->dynverdef_hdr;
@@ -5785,6 +6620,16 @@ _bfd_elf_slurp_version_tables (bfd *abfd)
|| bfd_bread (contents, hdr->sh_size, abfd) != hdr->sh_size)
goto error_return;
+ if (hdr->sh_info && hdr->sh_size < sizeof (Elf_External_Verdef))
+ goto error_return;
+
+ BFD_ASSERT (sizeof (Elf_External_Verdef)
+ >= sizeof (Elf_External_Verdaux));
+ contents_end_def = contents + hdr->sh_size
+ - sizeof (Elf_External_Verdef);
+ contents_end_aux = contents + hdr->sh_size
+ - sizeof (Elf_External_Verdaux);
+
/* We know the number of entries in the section but not the maximum
index. Therefore we have to run through all entries and find
the maximum. */
@@ -5797,12 +6642,23 @@ _bfd_elf_slurp_version_tables (bfd *abfd)
if ((iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION)) > maxidx)
maxidx = iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION);
+ if (iverdefmem.vd_next
+ > (size_t) (contents_end_def - (bfd_byte *) everdef))
+ goto error_return;
+
everdef = ((Elf_External_Verdef *)
((bfd_byte *) everdef + iverdefmem.vd_next));
}
- amt = (bfd_size_type) maxidx * sizeof (Elf_Internal_Verdef);
- elf_tdata (abfd)->verdef = bfd_zalloc (abfd, amt);
+ if (default_imported_symver)
+ {
+ if (freeidx > maxidx)
+ maxidx = ++freeidx;
+ else
+ freeidx = ++maxidx;
+ }
+ elf_tdata (abfd)->verdef = bfd_zalloc2 (abfd, maxidx,
+ sizeof (Elf_Internal_Verdef));
if (elf_tdata (abfd)->verdef == NULL)
goto error_return;
@@ -5818,15 +6674,32 @@ _bfd_elf_slurp_version_tables (bfd *abfd)
_bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem);
+ if ((iverdefmem.vd_ndx & VERSYM_VERSION) == 0)
+ {
+error_return_verdef:
+ elf_tdata (abfd)->verdef = NULL;
+ elf_tdata (abfd)->cverdefs = 0;
+ goto error_return;
+ }
+
iverdef = &iverdefarr[(iverdefmem.vd_ndx & VERSYM_VERSION) - 1];
memcpy (iverdef, &iverdefmem, sizeof (Elf_Internal_Verdef));
iverdef->vd_bfd = abfd;
- amt = (bfd_size_type) iverdef->vd_cnt * sizeof (Elf_Internal_Verdaux);
- iverdef->vd_auxptr = bfd_alloc (abfd, amt);
- if (iverdef->vd_auxptr == NULL)
- goto error_return;
+ if (iverdef->vd_cnt == 0)
+ iverdef->vd_auxptr = NULL;
+ else
+ {
+ iverdef->vd_auxptr = bfd_alloc2 (abfd, iverdef->vd_cnt,
+ sizeof (Elf_Internal_Verdaux));
+ if (iverdef->vd_auxptr == NULL)
+ goto error_return_verdef;
+ }
+
+ if (iverdef->vd_aux
+ > (size_t) (contents_end_aux - (bfd_byte *) everdef))
+ goto error_return_verdef;
everdaux = ((Elf_External_Verdaux *)
((bfd_byte *) everdef + iverdef->vd_aux));
@@ -5839,20 +6712,25 @@ _bfd_elf_slurp_version_tables (bfd *abfd)
bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
iverdaux->vda_name);
if (iverdaux->vda_nodename == NULL)
- goto error_return;
+ goto error_return_verdef;
if (j + 1 < iverdef->vd_cnt)
iverdaux->vda_nextptr = iverdaux + 1;
else
iverdaux->vda_nextptr = NULL;
+ if (iverdaux->vda_next
+ > (size_t) (contents_end_aux - (bfd_byte *) everdaux))
+ goto error_return_verdef;
+
everdaux = ((Elf_External_Verdaux *)
((bfd_byte *) everdaux + iverdaux->vda_next));
}
- iverdef->vd_nodename = iverdef->vd_auxptr->vda_nodename;
+ if (iverdef->vd_cnt)
+ iverdef->vd_nodename = iverdef->vd_auxptr->vda_nodename;
- if (i + 1 < hdr->sh_info)
+ if ((size_t) (iverdef - iverdefarr) + 1 < maxidx)
iverdef->vd_nextdef = iverdef + 1;
else
iverdef->vd_nextdef = NULL;
@@ -5864,85 +6742,47 @@ _bfd_elf_slurp_version_tables (bfd *abfd)
free (contents);
contents = NULL;
}
-
- if (elf_dynverref (abfd) != 0)
+ else if (default_imported_symver)
{
- Elf_Internal_Shdr *hdr;
- Elf_External_Verneed *everneed;
- Elf_Internal_Verneed *iverneed;
- unsigned int i;
-
- hdr = &elf_tdata (abfd)->dynverref_hdr;
-
- amt = (bfd_size_type) hdr->sh_info * sizeof (Elf_Internal_Verneed);
- elf_tdata (abfd)->verref = bfd_zalloc (abfd, amt);
- if (elf_tdata (abfd)->verref == NULL)
- goto error_return;
-
- elf_tdata (abfd)->cverrefs = hdr->sh_info;
+ if (freeidx < 3)
+ freeidx = 3;
+ else
+ freeidx++;
- contents = bfd_malloc (hdr->sh_size);
- if (contents == NULL)
- goto error_return;
- if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0
- || bfd_bread (contents, hdr->sh_size, abfd) != hdr->sh_size)
+ elf_tdata (abfd)->verdef = bfd_zalloc2 (abfd, freeidx,
+ sizeof (Elf_Internal_Verdef));
+ if (elf_tdata (abfd)->verdef == NULL)
goto error_return;
- everneed = (Elf_External_Verneed *) contents;
- iverneed = elf_tdata (abfd)->verref;
- for (i = 0; i < hdr->sh_info; i++, iverneed++)
- {
- Elf_External_Vernaux *evernaux;
- Elf_Internal_Vernaux *ivernaux;
- unsigned int j;
-
- _bfd_elf_swap_verneed_in (abfd, everneed, iverneed);
-
- iverneed->vn_bfd = abfd;
-
- iverneed->vn_filename =
- bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
- iverneed->vn_file);
- if (iverneed->vn_filename == NULL)
- goto error_return;
-
- amt = iverneed->vn_cnt;
- amt *= sizeof (Elf_Internal_Vernaux);
- iverneed->vn_auxptr = bfd_alloc (abfd, amt);
-
- evernaux = ((Elf_External_Vernaux *)
- ((bfd_byte *) everneed + iverneed->vn_aux));
- ivernaux = iverneed->vn_auxptr;
- for (j = 0; j < iverneed->vn_cnt; j++, ivernaux++)
- {
- _bfd_elf_swap_vernaux_in (abfd, evernaux, ivernaux);
+ elf_tdata (abfd)->cverdefs = freeidx;
+ }
- ivernaux->vna_nodename =
- bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
- ivernaux->vna_name);
- if (ivernaux->vna_nodename == NULL)
- goto error_return;
+ /* Create a default version based on the soname. */
+ if (default_imported_symver)
+ {
+ Elf_Internal_Verdef *iverdef;
+ Elf_Internal_Verdaux *iverdaux;
- if (j + 1 < iverneed->vn_cnt)
- ivernaux->vna_nextptr = ivernaux + 1;
- else
- ivernaux->vna_nextptr = NULL;
+ iverdef = &elf_tdata (abfd)->verdef[freeidx - 1];;
- evernaux = ((Elf_External_Vernaux *)
- ((bfd_byte *) evernaux + ivernaux->vna_next));
- }
+ iverdef->vd_version = VER_DEF_CURRENT;
+ iverdef->vd_flags = 0;
+ iverdef->vd_ndx = freeidx;
+ iverdef->vd_cnt = 1;
- if (i + 1 < hdr->sh_info)
- iverneed->vn_nextref = iverneed + 1;
- else
- iverneed->vn_nextref = NULL;
+ iverdef->vd_bfd = abfd;
- everneed = ((Elf_External_Verneed *)
- ((bfd_byte *) everneed + iverneed->vn_next));
- }
+ iverdef->vd_nodename = bfd_elf_get_dt_soname (abfd);
+ if (iverdef->vd_nodename == NULL)
+ goto error_return_verdef;
+ iverdef->vd_nextdef = NULL;
+ iverdef->vd_auxptr = bfd_alloc (abfd, sizeof (Elf_Internal_Verdaux));
+ if (iverdef->vd_auxptr == NULL)
+ goto error_return_verdef;
- free (contents);
- contents = NULL;
+ iverdaux = iverdef->vd_auxptr;
+ iverdaux->vda_nodename = iverdef->vd_nodename;
+ iverdaux->vda_nextptr = NULL;
}
return TRUE;
@@ -6041,13 +6881,24 @@ elf_find_function (bfd *abfd ATTRIBUTE_UNUSED,
const char **functionname_ptr)
{
const char *filename;
- asymbol *func;
+ asymbol *func, *file;
bfd_vma low_func;
asymbol **p;
+ /* ??? Given multiple file symbols, it is impossible to reliably
+ choose the right file name for global symbols. File symbols are
+ local symbols, and thus all file symbols must sort before any
+ global symbols. The ELF spec may be interpreted to say that a
+ file symbol must sort before other local symbols, but currently
+ ld -r doesn't do this. So, for ld -r output, it is possible to
+ make a better choice of file name for local symbols by ignoring
+ file symbols appearing after a given local symbol. */
+ enum { nothing_seen, symbol_seen, file_after_symbol_seen } state;
filename = NULL;
func = NULL;
+ file = NULL;
low_func = 0;
+ state = nothing_seen;
for (p = symbols; *p != NULL; p++)
{
@@ -6055,27 +6906,33 @@ elf_find_function (bfd *abfd ATTRIBUTE_UNUSED,
q = (elf_symbol_type *) *p;
- if (bfd_get_section (&q->symbol) != section)
- continue;
-
switch (ELF_ST_TYPE (q->internal_elf_sym.st_info))
{
default:
break;
case STT_FILE:
- filename = bfd_asymbol_name (&q->symbol);
- break;
+ file = &q->symbol;
+ if (state == symbol_seen)
+ state = file_after_symbol_seen;
+ continue;
case STT_NOTYPE:
case STT_FUNC:
- if (q->symbol.section == section
+ if (bfd_get_section (&q->symbol) == section
&& q->symbol.value >= low_func
&& q->symbol.value <= offset)
{
func = (asymbol *) q;
low_func = q->symbol.value;
+ filename = NULL;
+ if (file != NULL
+ && (ELF_ST_BIND (q->internal_elf_sym.st_info) == STB_LOCAL
+ || state != file_after_symbol_seen))
+ filename = bfd_asymbol_name (file);
}
break;
}
+ if (state == nothing_seen)
+ state = symbol_seen;
}
if (func == NULL)
@@ -6147,6 +7004,36 @@ _bfd_elf_find_nearest_line (bfd *abfd,
return TRUE;
}
+/* Find the line for a symbol. */
+
+bfd_boolean
+_bfd_elf_find_line (bfd *abfd, asymbol **symbols, asymbol *symbol,
+ const char **filename_ptr, unsigned int *line_ptr)
+{
+ return _bfd_dwarf2_find_line (abfd, symbols, symbol,
+ filename_ptr, line_ptr, 0,
+ &elf_tdata (abfd)->dwarf2_find_line_info);
+}
+
+/* After a call to bfd_find_nearest_line, successive calls to
+ bfd_find_inliner_info can be used to get source information about
+ each level of function inlining that terminated at the address
+ passed to bfd_find_nearest_line. Currently this is only supported
+ for DWARF2 with appropriate DWARF3 extensions. */
+
+bfd_boolean
+_bfd_elf_find_inliner_info (bfd *abfd,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
+{
+ bfd_boolean found;
+ found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr,
+ functionname_ptr, line_ptr,
+ & elf_tdata (abfd)->dwarf2_find_line_info);
+ return found;
+}
+
int
_bfd_elf_sizeof_headers (bfd *abfd, bfd_boolean reloc)
{
@@ -6279,8 +7166,8 @@ _bfd_elf_validate_reloc (bfd *abfd, arelent *areloc)
fail:
(*_bfd_error_handler)
- (_("%s: unsupported relocation type %s"),
- bfd_archive_filename (abfd), areloc->howto->name);
+ (_("%B: unsupported relocation type %s"),
+ abfd, areloc->howto->name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -6292,6 +7179,7 @@ _bfd_elf_close_and_cleanup (bfd *abfd)
{
if (elf_shstrtab (abfd) != NULL)
_bfd_elf_strtab_free (elf_shstrtab (abfd));
+ _bfd_dwarf2_cleanup_debug_info (abfd);
}
return _bfd_generic_close_and_cleanup (abfd);
@@ -6347,7 +7235,7 @@ elfcore_maybe_make_sect (bfd *abfd, char *name, asection *sect)
if (sect2 == NULL)
return FALSE;
- sect2->_raw_size = sect->_raw_size;
+ sect2->size = sect->size;
sect2->filepos = sect->filepos;
sect2->flags = sect->flags;
sect2->alignment_power = sect->alignment_power;
@@ -6384,7 +7272,7 @@ _bfd_elfcore_make_pseudosection (bfd *abfd,
sect = bfd_make_section_anyway (abfd, threaded_name);
if (sect == NULL)
return FALSE;
- sect->_raw_size = size;
+ sect->size = size;
sect->filepos = filepos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
@@ -6403,14 +7291,14 @@ _bfd_elfcore_make_pseudosection (bfd *abfd,
static bfd_boolean
elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
- size_t raw_size;
+ size_t size;
int offset;
if (note->descsz == sizeof (prstatus_t))
{
prstatus_t prstat;
- raw_size = sizeof (prstat.pr_reg);
+ size = sizeof (prstat.pr_reg);
offset = offsetof (prstatus_t, pr_reg);
memcpy (&prstat, note->descdata, sizeof (prstat));
@@ -6436,7 +7324,7 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* 64-bit host, 32-bit corefile */
prstatus32_t prstat;
- raw_size = sizeof (prstat.pr_reg);
+ size = sizeof (prstat.pr_reg);
offset = offsetof (prstatus32_t, pr_reg);
memcpy (&prstat, note->descdata, sizeof (prstat));
@@ -6466,7 +7354,7 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* Make a ".reg/999" section and a ".reg" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
#endif /* defined (HAVE_PRSTATUS_T) */
@@ -6670,13 +7558,13 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
#if defined (HAVE_LWPSTATUS_T_PR_CONTEXT)
- sect->_raw_size = sizeof (lwpstat.pr_context.uc_mcontext.gregs);
+ sect->size = sizeof (lwpstat.pr_context.uc_mcontext.gregs);
sect->filepos = note->descpos
+ offsetof (lwpstatus_t, pr_context.uc_mcontext.gregs);
#endif
#if defined (HAVE_LWPSTATUS_T_PR_REG)
- sect->_raw_size = sizeof (lwpstat.pr_reg);
+ sect->size = sizeof (lwpstat.pr_reg);
sect->filepos = note->descpos + offsetof (lwpstatus_t, pr_reg);
#endif
@@ -6700,13 +7588,13 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
#if defined (HAVE_LWPSTATUS_T_PR_CONTEXT)
- sect->_raw_size = sizeof (lwpstat.pr_context.uc_mcontext.fpregs);
+ sect->size = sizeof (lwpstat.pr_context.uc_mcontext.fpregs);
sect->filepos = note->descpos
+ offsetof (lwpstatus_t, pr_context.uc_mcontext.fpregs);
#endif
#if defined (HAVE_LWPSTATUS_T_PR_FPREG)
- sect->_raw_size = sizeof (lwpstat.pr_fpreg);
+ sect->size = sizeof (lwpstat.pr_fpreg);
sect->filepos = note->descpos + offsetof (lwpstatus_t, pr_fpreg);
#endif
@@ -6742,7 +7630,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
case NOTE_INFO_THREAD:
/* Make a ".reg/999" section. */
- sprintf (buf, ".reg/%d", pstatus.data.thread_info.tid);
+ sprintf (buf, ".reg/%ld", (long) pstatus.data.thread_info.tid);
len = strlen (buf) + 1;
name = bfd_alloc (abfd, len);
@@ -6755,7 +7643,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
if (sect == NULL)
return FALSE;
- sect->_raw_size = sizeof (pstatus.data.thread_info.thread_context);
+ sect->size = sizeof (pstatus.data.thread_info.thread_context);
sect->filepos = (note->descpos
+ offsetof (struct win32_pstatus,
data.thread_info.thread_context));
@@ -6769,7 +7657,8 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
case NOTE_INFO_MODULE:
/* Make a ".module/xxxxxxxx" section. */
- sprintf (buf, ".module/%08x", pstatus.data.module_info.base_address);
+ sprintf (buf, ".module/%08lx",
+ (long) pstatus.data.module_info.base_address);
len = strlen (buf) + 1;
name = bfd_alloc (abfd, len);
@@ -6783,7 +7672,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
if (sect == NULL)
return FALSE;
- sect->_raw_size = note->descsz;
+ sect->size = note->descsz;
sect->filepos = note->descpos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
@@ -6859,7 +7748,7 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
if (sect == NULL)
return FALSE;
- sect->_raw_size = note->descsz;
+ sect->size = note->descsz;
sect->filepos = note->descpos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
@@ -7001,7 +7890,7 @@ 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/%d", *tid);
+ sprintf (buf, ".qnx_core_status/%ld", (long) *tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
@@ -7012,7 +7901,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
if (sect == NULL)
return FALSE;
- sect->_raw_size = note->descsz;
+ sect->size = note->descsz;
sect->filepos = note->descpos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
@@ -7021,14 +7910,17 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
}
static bfd_boolean
-elfcore_grok_nto_gregs (bfd *abfd, Elf_Internal_Note *note, pid_t tid)
+elfcore_grok_nto_regs (bfd *abfd,
+ Elf_Internal_Note *note,
+ pid_t tid,
+ char *base)
{
char buf[100];
char *name;
asection *sect;
- /* Make a ".reg/%d" section. */
- sprintf (buf, ".reg/%d", tid);
+ /* Make a "(base)/%d" section. */
+ sprintf (buf, "%s/%ld", base, (long) tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
@@ -7039,14 +7931,14 @@ elfcore_grok_nto_gregs (bfd *abfd, Elf_Internal_Note *note, pid_t tid)
if (sect == NULL)
return FALSE;
- sect->_raw_size = note->descsz;
+ sect->size = note->descsz;
sect->filepos = note->descpos;
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
/* This is the current thread. */
if (elf_tdata (abfd)->core_lwpid == tid)
- return elfcore_maybe_make_sect (abfd, ".reg", sect);
+ return elfcore_maybe_make_sect (abfd, base, sect);
return TRUE;
}
@@ -7066,11 +7958,16 @@ elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note)
switch (note->type)
{
- case BFD_QNT_CORE_INFO: return elfcore_make_note_pseudosection (abfd, ".qnx_core_info", note);
- case BFD_QNT_CORE_STATUS: return elfcore_grok_nto_status (abfd, note, &tid);
- case BFD_QNT_CORE_GREG: return elfcore_grok_nto_gregs (abfd, note, tid);
- case BFD_QNT_CORE_FPREG: return elfcore_grok_prfpreg (abfd, note);
- default: return TRUE;
+ case BFD_QNT_CORE_INFO:
+ return elfcore_make_note_pseudosection (abfd, ".qnx_core_info", note);
+ case BFD_QNT_CORE_STATUS:
+ return elfcore_grok_nto_status (abfd, note, &tid);
+ case BFD_QNT_CORE_GREG:
+ return elfcore_grok_nto_regs (abfd, note, tid, ".reg");
+ case BFD_QNT_CORE_FPREG:
+ return elfcore_grok_nto_regs (abfd, note, tid, ".reg2");
+ default:
+ return TRUE;
}
}
@@ -7221,8 +8118,8 @@ elfcore_write_pstatus (bfd *abfd,
char *buf,
int *bufsiz,
long pid,
- int cursig,
- const void *gregs)
+ int cursig ATTRIBUTE_UNUSED,
+ const void *gregs ATTRIBUTE_UNUSED)
{
pstatus_t pstat;
char *note_name = "CORE";
@@ -7450,9 +8347,18 @@ _bfd_elf_rela_local_sym (bfd *abfd,
rel->r_addend =
_bfd_merged_section_offset (abfd, psec,
elf_section_data (sec)->sec_info,
- sym->st_value + rel->r_addend,
- 0);
- sec = *psec;
+ sym->st_value + rel->r_addend);
+ if (sec != *psec)
+ {
+ /* If we have changed the section, and our original section is
+ marked with SEC_EXCLUDE, it means that the original
+ SEC_MERGE section has been completely subsumed in some
+ other SEC_MERGE section. In this case, we need to leave
+ some info around for --emit-relocs. */
+ if ((sec->flags & SEC_EXCLUDE) != 0)
+ sec->kept_section = *psec;
+ sec = *psec;
+ }
rel->r_addend -= relocation;
rel->r_addend += sec->output_section->vma + sec->output_offset;
}
@@ -7472,7 +8378,7 @@ _bfd_elf_rel_local_sym (bfd *abfd,
return _bfd_merged_section_offset (abfd, psec,
elf_section_data (sec)->sec_info,
- sym->st_value + addend, 0);
+ sym->st_value + addend);
}
bfd_vma
@@ -7481,17 +8387,13 @@ _bfd_elf_section_offset (bfd *abfd,
asection *sec,
bfd_vma offset)
{
- struct bfd_elf_section_data *sec_data;
-
- sec_data = elf_section_data (sec);
switch (sec->sec_info_type)
{
case ELF_INFO_TYPE_STABS:
- return _bfd_stab_section_offset (abfd,
- &elf_hash_table (info)->merge_info,
- sec, &sec_data->sec_info, offset);
+ return _bfd_stab_section_offset (sec, elf_section_data (sec)->sec_info,
+ offset);
case ELF_INFO_TYPE_EH_FRAME:
- return _bfd_elf_eh_frame_section_offset (abfd, sec, offset);
+ return _bfd_elf_eh_frame_section_offset (abfd, info, sec, offset);
default:
return offset;
}
@@ -7515,8 +8417,330 @@ bfd_elf_bfd_from_remote_memory
(bfd *templ,
bfd_vma ehdr_vma,
bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, char *, int))
+ int (*target_read_memory) (bfd_vma, bfd_byte *, int))
{
return (*get_elf_backend_data (templ)->elf_backend_bfd_from_remote_memory)
(templ, ehdr_vma, loadbasep, target_read_memory);
}
+
+long
+_bfd_elf_get_synthetic_symtab (bfd *abfd,
+ long symcount ATTRIBUTE_UNUSED,
+ asymbol **syms ATTRIBUTE_UNUSED,
+ long dynsymcount,
+ asymbol **dynsyms,
+ asymbol **ret)
+{
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ asection *relplt;
+ asymbol *s;
+ const char *relplt_name;
+ bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean);
+ arelent *p;
+ long count, i, n;
+ size_t size;
+ Elf_Internal_Shdr *hdr;
+ char *names;
+ asection *plt;
+
+ *ret = NULL;
+
+ if ((abfd->flags & (DYNAMIC | EXEC_P)) == 0)
+ return 0;
+
+ if (dynsymcount <= 0)
+ return 0;
+
+ if (!bed->plt_sym_val)
+ return 0;
+
+ relplt_name = bed->relplt_name;
+ if (relplt_name == NULL)
+ relplt_name = bed->default_use_rela_p ? ".rela.plt" : ".rel.plt";
+ relplt = bfd_get_section_by_name (abfd, relplt_name);
+ if (relplt == NULL)
+ return 0;
+
+ hdr = &elf_section_data (relplt)->this_hdr;
+ if (hdr->sh_link != elf_dynsymtab (abfd)
+ || (hdr->sh_type != SHT_REL && hdr->sh_type != SHT_RELA))
+ return 0;
+
+ plt = bfd_get_section_by_name (abfd, ".plt");
+ if (plt == NULL)
+ return 0;
+
+ slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
+ if (! (*slurp_relocs) (abfd, relplt, dynsyms, TRUE))
+ return -1;
+
+ count = relplt->size / hdr->sh_entsize;
+ size = count * sizeof (asymbol);
+ p = relplt->relocation;
+ for (i = 0; i < count; i++, s++, p++)
+ size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
+
+ s = *ret = bfd_malloc (size);
+ if (s == NULL)
+ return -1;
+
+ names = (char *) (s + count);
+ p = relplt->relocation;
+ n = 0;
+ for (i = 0; i < count; i++, s++, p++)
+ {
+ size_t len;
+ bfd_vma addr;
+
+ addr = bed->plt_sym_val (i, plt, p);
+ if (addr == (bfd_vma) -1)
+ continue;
+
+ *s = **p->sym_ptr_ptr;
+ /* Undefined syms won't have BSF_LOCAL or BSF_GLOBAL set. Since
+ we are defining a symbol, ensure one of them is set. */
+ if ((s->flags & BSF_LOCAL) == 0)
+ s->flags |= BSF_GLOBAL;
+ s->section = plt;
+ s->value = addr - plt->vma;
+ s->name = names;
+ len = strlen ((*p->sym_ptr_ptr)->name);
+ memcpy (names, (*p->sym_ptr_ptr)->name, len);
+ names += len;
+ memcpy (names, "@plt", sizeof ("@plt"));
+ names += sizeof ("@plt");
+ ++n;
+ }
+
+ 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)
+{
+ 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;
+
+ /* Sorted by binding. */
+ return ELF_ST_BIND (s1->st_info) - ELF_ST_BIND (s2->st_info);
+}
+
+struct elf_symbol
+{
+ Elf_Internal_Sym *sym;
+ const char *name;
+};
+
+static int
+elf_sym_name_compare (const void *arg1, const void *arg2)
+{
+ const struct elf_symbol *s1 = (const struct elf_symbol *) arg1;
+ const struct elf_symbol *s2 = (const struct elf_symbol *) arg2;
+ return strcmp (s1->name, s2->name);
+}
+
+/* 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 *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;
+ bfd_size_type count1, count2, i;
+ int shndx1, shndx2;
+ bfd_boolean result;
+
+ bfd1 = sec1->owner;
+ bfd2 = sec2->owner;
+
+ /* 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)
+ return strcmp (sec1->name + sizeof ".gnu.linkonce",
+ sec2->name + sizeof ".gnu.linkonce") == 0;
+
+ /* Both sections have to be in ELF. */
+ if (bfd_get_flavour (bfd1) != bfd_target_elf_flavour
+ || bfd_get_flavour (bfd2) != bfd_target_elf_flavour)
+ return FALSE;
+
+ if (elf_section_type (sec1) != elf_section_type (sec2))
+ return FALSE;
+
+ if ((elf_section_flags (sec1) & SHF_GROUP) != 0
+ && (elf_section_flags (sec2) & SHF_GROUP) != 0)
+ {
+ /* If both are members of section groups, they have to have the
+ same group name. */
+ if (strcmp (elf_group_name (sec1), elf_group_name (sec2)) != 0)
+ return FALSE;
+ }
+
+ shndx1 = _bfd_elf_section_from_bfd_section (bfd1, sec1);
+ shndx2 = _bfd_elf_section_from_bfd_section (bfd2, sec2);
+ if (shndx1 == -1 || shndx2 == -1)
+ return FALSE;
+
+ bed1 = get_elf_backend_data (bfd1);
+ bed2 = get_elf_backend_data (bfd2);
+ hdr1 = &elf_tdata (bfd1)->symtab_hdr;
+ symcount1 = hdr1->sh_size / bed1->s->sizeof_sym;
+ hdr2 = &elf_tdata (bfd2)->symtab_hdr;
+ symcount2 = hdr2->sh_size / bed2->s->sizeof_sym;
+
+ 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;
+
+ /* 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);
+
+ /* Count definitions in the section. */
+ count1 = 0;
+ for (isym = isymbuf1, isymend = isym + symcount1;
+ isym < isymend; isym++)
+ {
+ if (isym->st_shndx == (unsigned int) shndx1)
+ {
+ if (count1 == 0)
+ isymstart1 = isym;
+ count1++;
+ }
+
+ if (count1 && isym->st_shndx != (unsigned int) shndx1)
+ break;
+ }
+
+ count2 = 0;
+ for (isym = isymbuf2, isymend = isym + symcount2;
+ isym < isymend; isym++)
+ {
+ if (isym->st_shndx == (unsigned int) shndx2)
+ {
+ if (count2 == 0)
+ isymstart2 = isym;
+ count2++;
+ }
+
+ if (count2 && isym->st_shndx != (unsigned int) shndx2)
+ break;
+ }
+
+ if (count1 == 0 || count2 == 0 || count1 != count2)
+ goto done;
+
+ symtable1 = bfd_malloc (count1 * sizeof (struct elf_symbol));
+ symtable2 = bfd_malloc (count1 * sizeof (struct elf_symbol));
+
+ if (symtable1 == NULL || symtable2 == NULL)
+ 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++;
+ }
+
+ /* 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].sym->st_info != symtable2 [i].sym->st_info
+ || symtable1 [i].sym->st_other != symtable2 [i].sym->st_other
+ || strcmp (symtable1 [i].name, symtable2 [i].name) != 0)
+ goto done;
+
+ result = TRUE;
+
+done:
+ if (symtable1)
+ free (symtable1);
+ if (symtable2)
+ free (symtable2);
+ if (isymbuf1)
+ free (isymbuf1);
+ if (isymbuf2)
+ free (isymbuf2);
+
+ return result;
+}
+
+/* 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);
+
+/* Return TRUE if 2 section types are compatible. */
+
+bfd_boolean
+_bfd_elf_match_sections_by_type (bfd *abfd, const asection *asec,
+ bfd *bbfd, const asection *bsec)
+{
+ if (asec == NULL
+ || bsec == NULL
+ || abfd->xvec->flavour != bfd_target_elf_flavour
+ || bbfd->xvec->flavour != bfd_target_elf_flavour)
+ return TRUE;
+
+ return elf_section_type (asec) == elf_section_type (bsec);
+}
diff --git a/contrib/binutils/bfd/elf32-arc.c b/contrib/binutils/bfd/elf32-arc.c
index 27c163981a0a..a6011bdb32dd 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
+ Copyright 1994, 1995, 1997, 1999, 2001, 2002, 2005
Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
@@ -17,7 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -26,83 +27,94 @@
#include "elf/arc.h"
#include "libiberty.h"
-static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
- PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-static void arc_info_to_howto_rel
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static bfd_boolean arc_elf_object_p
- PARAMS ((bfd *));
-static void arc_elf_final_write_processing
- PARAMS ((bfd *, bfd_boolean));
-static bfd_reloc_status_type arc_elf_b22_pcrel
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-
/* Try to minimize the amount of space occupied by relocation tables
on the ROM (not that the ROM won't be swamped by other ELF overhead). */
#define USE_REL 1
+static bfd_reloc_status_type
+arc_elf_b22_pcrel (bfd * abfd,
+ arelent * reloc_entry,
+ asymbol * symbol,
+ void * data,
+ asection * input_section,
+ bfd * output_bfd,
+ char ** error_message)
+{
+ /* If linking, back up the final symbol address by the address of the
+ reloc. This cannot be accomplished by setting the pcrel_offset
+ field to TRUE, as bfd_install_relocation will detect this and refuse
+ to install the offset in the first place, but bfd_perform_relocation
+ will still insist on removing it. */
+ if (output_bfd == NULL)
+ reloc_entry->addend -= reloc_entry->address;
+
+ /* Fall through to the default elf reloc handler. */
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
+}
+
static reloc_howto_type elf_arc_howto_table[] =
{
/* This reloc does nothing. */
- HOWTO (R_ARC_NONE, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARC_NONE", /* name */
- TRUE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (R_ARC_NONE, /* Type. */
+ 0, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 32, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_bitfield, /* Complain_on_overflow. */
+ bfd_elf_generic_reloc, /* Special_function. */
+ "R_ARC_NONE", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0, /* Src_mask. */
+ 0, /* Dst_mask. */
+ FALSE), /* PCrel_offset. */
/* A standard 32 bit relocation. */
- HOWTO (R_ARC_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, /* special_function */
- "R_ARC_32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (R_ARC_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, /* Special_function. */
+ "R_ARC_32", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0xffffffff, /* Src_mask. */
+ 0xffffffff, /* Dst_mask. */
+ FALSE), /* PCrel_offset. */
/* A 26 bit absolute branch, right shifted by 2. */
- HOWTO (R_ARC_B26, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARC_B26", /* name */
- TRUE, /* partial_inplace */
- 0x00ffffff, /* src_mask */
- 0x00ffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (R_ARC_B26, /* Type. */
+ 2, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 26, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_bitfield, /* Complain_on_overflow. */
+ bfd_elf_generic_reloc, /* Special_function. */
+ "R_ARC_B26", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0x00ffffff, /* Src_mask. */
+ 0x00ffffff, /* Dst_mask. */
+ FALSE), /* PCrel_offset. */
/* A relative 22 bit branch; bits 21-2 are stored in bits 26-7. */
- HOWTO (R_ARC_B22_PCREL, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 22, /* bitsize */
- TRUE, /* pc_relative */
- 7, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- arc_elf_b22_pcrel, /* special_function */
- "R_ARC_B22_PCREL", /* name */
- TRUE, /* partial_inplace */
- 0x07ffff80, /* src_mask */
- 0x07ffff80, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (R_ARC_B22_PCREL, /* Type. */
+ 2, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 22, /* Bitsize. */
+ TRUE, /* PC_relative. */
+ 7, /* Bitpos. */
+ complain_overflow_signed, /* Complain_on_overflow. */
+ arc_elf_b22_pcrel, /* Special_function. */
+ "R_ARC_B22_PCREL", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0x07ffff80, /* Src_mask. */
+ 0x07ffff80, /* Dst_mask. */
+ FALSE), /* PCrel_offset. */
};
/* Map BFD reloc types to ARC ELF reloc types. */
@@ -123,9 +135,8 @@ static const struct arc_reloc_map arc_reloc_map[] =
};
static reloc_howto_type *
-bfd_elf32_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int i;
@@ -139,10 +150,9 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code)
/* Set the howto pointer for an ARC ELF reloc. */
static void
-arc_info_to_howto_rel (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+arc_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int r_type;
@@ -154,8 +164,7 @@ arc_info_to_howto_rel (abfd, cache_ptr, dst)
/* Set the right machine number for an ARC ELF file. */
static bfd_boolean
-arc_elf_object_p (abfd)
- bfd *abfd;
+arc_elf_object_p (bfd *abfd)
{
unsigned int mach = bfd_mach_arc_6;
@@ -187,9 +196,8 @@ arc_elf_object_p (abfd)
This gets the ARC architecture right based on the machine number. */
static void
-arc_elf_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
+arc_elf_final_write_processing (bfd *abfd,
+ bfd_boolean linker ATTRIBUTE_UNUSED)
{
unsigned long val;
@@ -213,41 +221,17 @@ arc_elf_final_write_processing (abfd, linker)
elf_elfheader (abfd)->e_flags |= val;
}
-bfd_reloc_status_type
-arc_elf_b22_pcrel (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd * abfd;
- arelent * reloc_entry;
- asymbol * symbol;
- PTR data;
- asection * input_section;
- bfd * output_bfd;
- char ** error_message;
-{
- /* If linking, back up the final symbol address by the address of the
- reloc. This cannot be accomplished by setting the pcrel_offset
- field to TRUE, as bfd_install_relocation will detect this and refuse
- to install the offset in the first place, but bfd_perform_relocation
- will still insist on removing it. */
- if (output_bfd == (bfd *) NULL)
- reloc_entry->addend -= reloc_entry->address;
-
- /* Fall through to the default elf reloc handler. */
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
-}
-
-#define TARGET_LITTLE_SYM bfd_elf32_littlearc_vec
-#define TARGET_LITTLE_NAME "elf32-littlearc"
-#define TARGET_BIG_SYM bfd_elf32_bigarc_vec
-#define TARGET_BIG_NAME "elf32-bigarc"
-#define ELF_ARCH bfd_arch_arc
-#define ELF_MACHINE_CODE EM_ARC
-#define ELF_MAXPAGESIZE 0x1000
-
-#define elf_info_to_howto 0
-#define elf_info_to_howto_rel arc_info_to_howto_rel
-#define elf_backend_object_p arc_elf_object_p
-#define elf_backend_final_write_processing arc_elf_final_write_processing
+#define TARGET_LITTLE_SYM bfd_elf32_littlearc_vec
+#define TARGET_LITTLE_NAME "elf32-littlearc"
+#define TARGET_BIG_SYM bfd_elf32_bigarc_vec
+#define TARGET_BIG_NAME "elf32-bigarc"
+#define ELF_ARCH bfd_arch_arc
+#define ELF_MACHINE_CODE EM_ARC
+#define ELF_MAXPAGESIZE 0x1000
+
+#define elf_info_to_howto 0
+#define elf_info_to_howto_rel arc_info_to_howto_rel
+#define elf_backend_object_p arc_elf_object_p
+#define elf_backend_final_write_processing arc_elf_final_write_processing
#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-arm.c b/contrib/binutils/bfd/elf32-arm.c
new file mode 100644
index 000000000000..4c65de1663a2
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-arm.c
@@ -0,0 +1,8376 @@
+/* 32-bit ELF support for ARM
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 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. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libiberty.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf-vxworks.h"
+#include "elf/arm.h"
+
+#ifndef NUM_ELEM
+#define NUM_ELEM(a) (sizeof (a) / (sizeof (a)[0]))
+#endif
+
+/* Return the relocation section associated with NAME. HTAB is the
+ bfd's elf32_arm_link_hash_entry. */
+#define RELOC_SECTION(HTAB, NAME) \
+ ((HTAB)->use_rel ? ".rel" NAME : ".rela" NAME)
+
+/* Return size of a relocation entry. HTAB is the bfd's
+ elf32_arm_link_hash_entry. */
+#define RELOC_SIZE(HTAB) \
+ ((HTAB)->use_rel \
+ ? sizeof (Elf32_External_Rel) \
+ : sizeof (Elf32_External_Rela))
+
+/* Return function to swap relocations in. HTAB is the bfd's
+ elf32_arm_link_hash_entry. */
+#define SWAP_RELOC_IN(HTAB) \
+ ((HTAB)->use_rel \
+ ? bfd_elf32_swap_reloc_in \
+ : bfd_elf32_swap_reloca_in)
+
+/* Return function to swap relocations out. HTAB is the bfd's
+ elf32_arm_link_hash_entry. */
+#define SWAP_RELOC_OUT(HTAB) \
+ ((HTAB)->use_rel \
+ ? bfd_elf32_swap_reloc_out \
+ : bfd_elf32_swap_reloca_out)
+
+#define elf_info_to_howto 0
+#define elf_info_to_howto_rel elf32_arm_info_to_howto
+
+#define ARM_ELF_ABI_VERSION 0
+#ifdef __FreeBSD__
+#define ARM_ELF_OS_ABI_VERSION ELFOSABI_FREEBSD
+#else
+#define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM
+#endif
+
+static const 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
+ in that slot. */
+
+static reloc_howto_type elf32_arm_howto_table_1[] =
+{
+ /* No relocation */
+ HOWTO (R_ARM_NONE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_NONE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_PC24, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PC24", /* name */
+ FALSE, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 32 bit absolute */
+ HOWTO (R_ARM_ABS32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* standard 32bit pc-relative reloc */
+ HOWTO (R_ARM_REL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_REL32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit absolute - R_ARM_LDR_PC_G0 in AAELF */
+ HOWTO (R_ARM_PC13, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PC13", /* name */
+ FALSE, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 16 bit absolute */
+ HOWTO (R_ARM_ABS16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 12 bit absolute */
+ HOWTO (R_ARM_ABS12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS12", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_ABS5, /* type */
+ 6, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 5, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_ABS5", /* name */
+ FALSE, /* partial_inplace */
+ 0x000007e0, /* src_mask */
+ 0x000007e0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 8 bit absolute */
+ HOWTO (R_ARM_ABS8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ABS8", /* name */
+ FALSE, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_SBREL32, /* type */
+ 0, /* rightshift */
+ 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_ARM_SBREL32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 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 */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_CALL", /* name */
+ FALSE, /* partial_inplace */
+ 0x07ff07ff, /* src_mask */
+ 0x07ff07ff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_PC8, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_PC8", /* name */
+ FALSE, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_BREL_ADJ, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_BREL_ADJ", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_SWI24, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_SWI24", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x00000000, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_SWI8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_SWI8", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x00000000, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* BLX instruction for the ARM. */
+ HOWTO (R_ARM_XPC25, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 25, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_XPC25", /* name */
+ FALSE, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* BLX instruction for the Thumb. */
+ HOWTO (R_ARM_THM_XPC22, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 22, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_XPC22", /* name */
+ FALSE, /* partial_inplace */
+ 0x07ff07ff, /* src_mask */
+ 0x07ff07ff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Dynamic TLS relocations. */
+
+ HOWTO (R_ARM_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, /* special_function */
+ "R_ARM_TLS_DTPMOD32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_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, /* special_function */
+ "R_ARM_TLS_DTPOFF32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_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, /* special_function */
+ "R_ARM_TLS_TPOFF32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Relocs used in ARM Linux */
+
+ HOWTO (R_ARM_COPY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_COPY", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GLOB_DAT", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_JUMP_SLOT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_JUMP_SLOT", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_RELATIVE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RELATIVE", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOTOFF32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GOTOFF32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOTPC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GOTPC", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOT32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GOT32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_PLT32, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PLT32", /* name */
+ FALSE, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_CALL, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_CALL", /* name */
+ FALSE, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_JUMP24, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_JUMP24", /* name */
+ FALSE, /* partial_inplace */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_JUMP24, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_JUMP24", /* name */
+ FALSE, /* partial_inplace */
+ 0x07ff2fff, /* src_mask */
+ 0x07ff2fff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_BASE_ABS, /* 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_ARM_BASE_ABS", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_PCREL7_0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_PCREL_7_0", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_PCREL15_8, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ TRUE, /* pc_relative */
+ 8, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_PCREL_15_8",/* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_PCREL23_15, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ TRUE, /* pc_relative */
+ 16, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_PCREL_23_15",/* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDR_SBREL_11_0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDR_SBREL_11_0",/* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_SBREL_19_12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 12, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_SBREL_19_12",/* name */
+ FALSE, /* partial_inplace */
+ 0x000ff000, /* src_mask */
+ 0x000ff000, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_SBREL_27_20, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 20, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_SBREL_27_20",/* name */
+ FALSE, /* partial_inplace */
+ 0x0ff00000, /* src_mask */
+ 0x0ff00000, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TARGET1, /* 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_ARM_TARGET1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ROSEGREL32, /* 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_ARM_ROSEGREL32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_V4BX, /* 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_ARM_V4BX", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TARGET2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_TARGET2", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_PREL31, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 31, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_PREL31", /* name */
+ FALSE, /* partial_inplace */
+ 0x7fffffff, /* src_mask */
+ 0x7fffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_MOVW_ABS_NC, /* 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_ARM_MOVW_ABS_NC", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_MOVT_ABS, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_MOVT_ABS", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_MOVW_PREL_NC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_MOVW_PREL_NC", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_MOVT_PREL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_MOVT_PREL", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_MOVW_ABS_NC, /* 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_ARM_THM_MOVW_ABS_NC",/* name */
+ FALSE, /* partial_inplace */
+ 0x040f70ff, /* src_mask */
+ 0x040f70ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_MOVT_ABS, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_MOVT_ABS", /* name */
+ FALSE, /* partial_inplace */
+ 0x040f70ff, /* src_mask */
+ 0x040f70ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_MOVW_PREL_NC,/* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_MOVW_PREL_NC",/* name */
+ FALSE, /* partial_inplace */
+ 0x040f70ff, /* src_mask */
+ 0x040f70ff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_MOVT_PREL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_MOVT_PREL", /* name */
+ FALSE, /* partial_inplace */
+ 0x040f70ff, /* src_mask */
+ 0x040f70ff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_JUMP19, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 19, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_JUMP19", /* name */
+ FALSE, /* partial_inplace */
+ 0x043f2fff, /* src_mask */
+ 0x043f2fff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_JUMP6, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 6, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_JUMP6", /* name */
+ FALSE, /* partial_inplace */
+ 0x02f8, /* src_mask */
+ 0x02f8, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* These are declared as 13-bit signed relocations because we can
+ address -4095 .. 4095(base) by altering ADDW to SUBW or vice
+ versa. */
+ HOWTO (R_ARM_THM_ALU_PREL_11_0,/* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 13, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* 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 */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_PC12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 13, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_PC12", /* name */
+ FALSE, /* partial_inplace */
+ 0x040070ff, /* src_mask */
+ 0x040070ff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ABS32_NOI, /* 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_ARM_ABS32_NOI", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_REL32_NOI, /* 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_REL32_NOI", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+};
+
+/* Relocations 57 .. 83 are the "group relocations" which we do not
+ support. */
+
+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) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_MOVW_BREL_NC", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_MOVT_BREL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_MOVT_BREL", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_MOVW_BREL, /* 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_ARM_MOVW_BREL", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_MOVW_BREL_NC,/* 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_ARM_THM_MOVW_BREL_NC",/* name */
+ FALSE, /* partial_inplace */
+ 0x040f70ff, /* src_mask */
+ 0x040f70ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_MOVT_BREL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_MOVT_BREL", /* name */
+ FALSE, /* partial_inplace */
+ 0x040f70ff, /* src_mask */
+ 0x040f70ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_MOVW_BREL, /* 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_ARM_THM_MOVW_BREL", /* name */
+ FALSE, /* partial_inplace */
+ 0x040f70ff, /* src_mask */
+ 0x040f70ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (90), /* unallocated */
+ EMPTY_HOWTO (91),
+ EMPTY_HOWTO (92),
+ EMPTY_HOWTO (93),
+
+ HOWTO (R_ARM_PLT32_ABS, /* 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_ARM_PLT32_ABS", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOT_ABS, /* 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_ARM_GOT_ABS", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOT_PREL, /* 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_GOT_PREL", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOT_BREL12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GOT_BREL12", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_GOTOFF12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_GOTOFF12", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (R_ARM_GOTRELAX), /* reserved for future GOT-load optimizations */
+
+ /* GNU extension to record C++ vtable member usage */
+ HOWTO (R_ARM_GNU_VTENTRY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */
+ "R_ARM_GNU_VTENTRY", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable hierarchy */
+ HOWTO (R_ARM_GNU_VTINHERIT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_ARM_GNU_VTINHERIT", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_JUMP11, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 11, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_JUMP11", /* name */
+ FALSE, /* partial_inplace */
+ 0x000007ff, /* src_mask */
+ 0x000007ff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_THM_JUMP8, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_THM_JUMP8", /* name */
+ FALSE, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* TLS relocations */
+ HOWTO (R_ARM_TLS_GD32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ NULL, /* special_function */
+ "R_ARM_TLS_GD32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TLS_LDM32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_TLS_LDM32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TLS_LDO32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_TLS_LDO32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TLS_IE32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ NULL, /* special_function */
+ "R_ARM_TLS_IE32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TLS_LE32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_TLS_LE32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TLS_LDO12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_TLS_LDO12", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TLS_LE12, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_TLS_LE12", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_TLS_IE12GP, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_TLS_IE12GP", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000fff, /* src_mask */
+ 0x00000fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+};
+
+/* 112-127 private relocations
+ 128 R_ARM_ME_TOO, obsolete
+ 129-255 unallocated in AAELF.
+
+ 249-255 extended, currently unused, relocations: */
+
+static reloc_howto_type elf32_arm_howto_table_3[4] =
+{
+ HOWTO (R_ARM_RREL32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RREL32", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_RABS32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RABS32", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_RPC24, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RPC24", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_RBASE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RBASE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE) /* pcrel_offset */
+};
+
+static reloc_howto_type *
+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 NULL;
+}
+
+static void
+elf32_arm_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);
+ bfd_reloc->howto = elf32_arm_howto_from_type (r_type);
+}
+
+struct elf32_arm_reloc_map
+ {
+ bfd_reloc_code_real_type bfd_reloc_val;
+ unsigned char elf_reloc_val;
+ };
+
+/* All entries in this list must also be present in elf32_arm_howto_table. */
+static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
+ {
+ {BFD_RELOC_NONE, R_ARM_NONE},
+ {BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24},
+ {BFD_RELOC_ARM_PCREL_CALL, R_ARM_CALL},
+ {BFD_RELOC_ARM_PCREL_JUMP, R_ARM_JUMP24},
+ {BFD_RELOC_ARM_PCREL_BLX, R_ARM_XPC25},
+ {BFD_RELOC_THUMB_PCREL_BLX, R_ARM_THM_XPC22},
+ {BFD_RELOC_32, R_ARM_ABS32},
+ {BFD_RELOC_32_PCREL, R_ARM_REL32},
+ {BFD_RELOC_8, R_ARM_ABS8},
+ {BFD_RELOC_16, R_ARM_ABS16},
+ {BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12},
+ {BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5},
+ {BFD_RELOC_THUMB_PCREL_BRANCH25, R_ARM_THM_JUMP24},
+ {BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_CALL},
+ {BFD_RELOC_THUMB_PCREL_BRANCH12, R_ARM_THM_JUMP11},
+ {BFD_RELOC_THUMB_PCREL_BRANCH20, R_ARM_THM_JUMP19},
+ {BFD_RELOC_THUMB_PCREL_BRANCH9, R_ARM_THM_JUMP8},
+ {BFD_RELOC_THUMB_PCREL_BRANCH7, R_ARM_THM_JUMP6},
+ {BFD_RELOC_ARM_GLOB_DAT, R_ARM_GLOB_DAT},
+ {BFD_RELOC_ARM_JUMP_SLOT, R_ARM_JUMP_SLOT},
+ {BFD_RELOC_ARM_RELATIVE, R_ARM_RELATIVE},
+ {BFD_RELOC_ARM_GOTOFF, R_ARM_GOTOFF32},
+ {BFD_RELOC_ARM_GOTPC, R_ARM_GOTPC},
+ {BFD_RELOC_ARM_GOT32, R_ARM_GOT32},
+ {BFD_RELOC_ARM_PLT32, R_ARM_PLT32},
+ {BFD_RELOC_ARM_TARGET1, R_ARM_TARGET1},
+ {BFD_RELOC_ARM_ROSEGREL32, R_ARM_ROSEGREL32},
+ {BFD_RELOC_ARM_SBREL32, R_ARM_SBREL32},
+ {BFD_RELOC_ARM_PREL31, R_ARM_PREL31},
+ {BFD_RELOC_ARM_TARGET2, R_ARM_TARGET2},
+ {BFD_RELOC_ARM_PLT32, R_ARM_PLT32},
+ {BFD_RELOC_ARM_TLS_GD32, R_ARM_TLS_GD32},
+ {BFD_RELOC_ARM_TLS_LDO32, R_ARM_TLS_LDO32},
+ {BFD_RELOC_ARM_TLS_LDM32, R_ARM_TLS_LDM32},
+ {BFD_RELOC_ARM_TLS_DTPMOD32, R_ARM_TLS_DTPMOD32},
+ {BFD_RELOC_ARM_TLS_DTPOFF32, R_ARM_TLS_DTPOFF32},
+ {BFD_RELOC_ARM_TLS_TPOFF32, R_ARM_TLS_TPOFF32},
+ {BFD_RELOC_ARM_TLS_IE32, R_ARM_TLS_IE32},
+ {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},
+ };
+
+static reloc_howto_type *
+elf32_arm_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
+{
+ unsigned int i;
+ for (i = 0; i < NUM_ELEM (elf32_arm_reloc_map); i ++)
+ if (elf32_arm_reloc_map[i].bfd_reloc_val == code)
+ return elf32_arm_howto_from_type (elf32_arm_reloc_map[i].elf_reloc_val);
+
+ return NULL;
+}
+
+/* Support for core dump NOTE sections */
+static bfd_boolean
+elf32_arm_nabi_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+ int offset;
+ size_t size;
+
+ switch (note->descsz)
+ {
+ default:
+ return FALSE;
+
+ case 148: /* Linux/ARM 32-bit*/
+ /* pr_cursig */
+ elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+
+ /* pr_pid */
+ elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
+
+ /* pr_reg */
+ offset = 72;
+ size = 72;
+
+ break;
+
+ case 96: /* FreeBSD/ARM */
+ /* pr_cursig */
+ if (elf_tdata(abfd)->core_signal == 0)
+ elf_tdata (abfd)->core_signal = ((int *)(note->descdata))[5];
+
+ /* pr_pid */
+ elf_tdata (abfd)->core_pid = ((int *)(note->descdata))[6];
+
+ /* pr_reg */
+ offset = 28;
+ size = 68;
+ break;
+ }
+
+ /* Make a ".reg/999" section. */
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+ size, note->descpos + offset);
+}
+
+static bfd_boolean
+elf32_arm_nabi_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+ switch (note->descsz)
+ {
+ default:
+ return FALSE;
+
+ case 124: /* Linux/ARM elf_prpsinfo */
+ elf_tdata (abfd)->core_program
+ = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
+ elf_tdata (abfd)->core_command
+ = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
+ }
+
+ /* Note that for some reason, a spurious space is tacked
+ onto the end of the args in some (at least one anyway)
+ implementations, so strip it off if it exists. */
+
+ {
+ char *command = elf_tdata (abfd)->core_command;
+ int n = strlen (command);
+
+ if (0 < n && command[n - 1] == ' ')
+ command[n - 1] = '\0';
+ }
+
+ return TRUE;
+}
+
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
+#define TARGET_LITTLE_NAME "elf32-littlearm"
+#define TARGET_BIG_SYM bfd_elf32_bigarm_vec
+#define TARGET_BIG_NAME "elf32-bigarm"
+
+#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
+#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
+
+typedef unsigned long int insn32;
+typedef unsigned short int insn16;
+
+/* In lieu of proper flags, assume all EABIv4 or later objects are
+ interworkable. */
+#define INTERWORK_FLAG(abfd) \
+ (EF_ARM_EABI_VERSION (elf_elfheader (abfd)->e_flags) >= EF_ARM_EABI_VER4 \
+ || (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK))
+
+/* The linker script knows the section names for placement.
+ The entry_names are used to do simple name mangling on the stubs.
+ Given a function name, and its type, the stub can be found. The
+ name can be changed. The only requirement is the %s be present. */
+#define THUMB2ARM_GLUE_SECTION_NAME ".glue_7t"
+#define THUMB2ARM_GLUE_ENTRY_NAME "__%s_from_thumb"
+
+#define ARM2THUMB_GLUE_SECTION_NAME ".glue_7"
+#define ARM2THUMB_GLUE_ENTRY_NAME "__%s_from_arm"
+
+/* The name of the dynamic interpreter. This is put in the .interp
+ section. */
+#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+
+#ifdef FOUR_WORD_PLT
+
+/* The first entry in a procedure linkage table looks like
+ this. It is set up so that any shared library function that is
+ called before the relocation has been set up calls the dynamic
+ linker first. */
+static const bfd_vma elf32_arm_plt0_entry [] =
+ {
+ 0xe52de004, /* str lr, [sp, #-4]! */
+ 0xe59fe010, /* ldr lr, [pc, #16] */
+ 0xe08fe00e, /* add lr, pc, lr */
+ 0xe5bef008, /* ldr pc, [lr, #8]! */
+ };
+
+/* Subsequent entries in a procedure linkage table look like
+ this. */
+static const bfd_vma elf32_arm_plt_entry [] =
+ {
+ 0xe28fc600, /* add ip, pc, #NN */
+ 0xe28cca00, /* add ip, ip, #NN */
+ 0xe5bcf000, /* ldr pc, [ip, #NN]! */
+ 0x00000000, /* unused */
+ };
+
+#else
+
+/* The first entry in a procedure linkage table looks like
+ this. It is set up so that any shared library function that is
+ called before the relocation has been set up calls the dynamic
+ linker first. */
+static const bfd_vma elf32_arm_plt0_entry [] =
+ {
+ 0xe52de004, /* str lr, [sp, #-4]! */
+ 0xe59fe004, /* ldr lr, [pc, #4] */
+ 0xe08fe00e, /* add lr, pc, lr */
+ 0xe5bef008, /* ldr pc, [lr, #8]! */
+ 0x00000000, /* &GOT[0] - . */
+ };
+
+/* Subsequent entries in a procedure linkage table look like
+ this. */
+static const bfd_vma elf32_arm_plt_entry [] =
+ {
+ 0xe28fc600, /* add ip, pc, #0xNN00000 */
+ 0xe28cca00, /* add ip, ip, #0xNN000 */
+ 0xe5bcf000, /* ldr pc, [ip, #0xNNN]! */
+ };
+
+#endif
+
+/* The format of the first entry in the procedure linkage table
+ for a VxWorks executable. */
+static const bfd_vma elf32_arm_vxworks_exec_plt0_entry[] =
+ {
+ 0xe52dc008, /* str ip,[sp,#-8]! */
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xe59cf008, /* ldr pc,[ip,#8] */
+ 0x00000000, /* .long _GLOBAL_OFFSET_TABLE_ */
+ };
+
+/* The format of subsequent entries in a VxWorks executable. */
+static const bfd_vma elf32_arm_vxworks_exec_plt_entry[] =
+ {
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xe59cf000, /* ldr pc,[ip] */
+ 0x00000000, /* .long @got */
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xea000000, /* b _PLT */
+ 0x00000000, /* .long @pltindex*sizeof(Elf32_Rela) */
+ };
+
+/* The format of entries in a VxWorks shared library. */
+static const bfd_vma elf32_arm_vxworks_shared_plt_entry[] =
+ {
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xe79cf009, /* ldr pc,[ip,r9] */
+ 0x00000000, /* .long @got */
+ 0xe59fc000, /* ldr ip,[pc] */
+ 0xe599f008, /* ldr pc,[r9,#8] */
+ 0x00000000, /* .long @pltindex*sizeof(Elf32_Rela) */
+ };
+
+/* An initial stub used if the PLT entry is referenced from Thumb code. */
+#define PLT_THUMB_STUB_SIZE 4
+static const bfd_vma elf32_arm_plt_thumb_stub [] =
+ {
+ 0x4778, /* bx pc */
+ 0x46c0 /* nop */
+ };
+
+/* The entries in a PLT when using a DLL-based target with multiple
+ address spaces. */
+static const bfd_vma elf32_arm_symbian_plt_entry [] =
+ {
+ 0xe51ff004, /* ldr pc, [pc, #-4] */
+ 0x00000000, /* dcd R_ARM_GLOB_DAT(X) */
+ };
+
+/* Used to build a map of a section. This is required for mixed-endian
+ code/data. */
+
+typedef struct elf32_elf_section_map
+{
+ bfd_vma vma;
+ char type;
+}
+elf32_arm_section_map;
+
+typedef struct _arm_elf_section_data
+{
+ struct bfd_elf_section_data elf;
+ unsigned int mapcount;
+ elf32_arm_section_map *map;
+}
+_arm_elf_section_data;
+
+#define elf32_arm_section_data(sec) \
+ ((_arm_elf_section_data *) elf_section_data (sec))
+
+/* 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;
+
+ /* 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;
+};
+
+#define elf32_arm_tdata(abfd) \
+ ((struct elf32_arm_obj_tdata *) (abfd)->tdata.any)
+
+#define elf32_arm_local_got_tls_type(abfd) \
+ (elf32_arm_tdata (abfd)->local_got_tls_type)
+
+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;
+}
+
+/* The ARM linker needs to keep track of the number of relocs that it
+ decides to copy in check_relocs for each symbol. This is so that
+ it can discard PC relative relocs if it doesn't need them when
+ linking with -Bsymbolic. We store the information in a field
+ extending the regular ELF linker hash table. */
+
+/* This structure keeps track of the number of relocs we have copied
+ for a given symbol. */
+struct elf32_arm_relocs_copied
+ {
+ /* Next section. */
+ struct elf32_arm_relocs_copied * next;
+ /* A section in dynobj. */
+ asection * section;
+ /* Number of relocs copied in this section. */
+ bfd_size_type count;
+ /* Number of PC-relative relocs copied in this section. */
+ bfd_size_type pc_count;
+ };
+
+#define elf32_arm_hash_entry(ent) ((struct elf32_arm_link_hash_entry *)(ent))
+
+/* Arm ELF linker hash entry. */
+struct elf32_arm_link_hash_entry
+ {
+ struct elf_link_hash_entry root;
+
+ /* Number of PC relative relocs copied for this symbol. */
+ struct elf32_arm_relocs_copied * relocs_copied;
+
+ /* We reference count Thumb references to a PLT entry separately,
+ so that we can emit the Thumb trampoline only if needed. */
+ bfd_signed_vma plt_thumb_refcount;
+
+ /* Since PLT entries have variable size if the Thumb prologue is
+ used, we need to record the index into .got.plt instead of
+ recomputing it from the PLT offset. */
+ bfd_signed_vma plt_got_offset;
+
+#define GOT_UNKNOWN 0
+#define GOT_NORMAL 1
+#define GOT_TLS_GD 2
+#define GOT_TLS_IE 4
+ unsigned char tls_type;
+ };
+
+/* Traverse an arm ELF linker hash table. */
+#define elf32_arm_link_hash_traverse(table, func, info) \
+ (elf_link_hash_traverse \
+ (&(table)->root, \
+ (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
+ (info)))
+
+/* Get the ARM elf linker hash table from a link_info structure. */
+#define elf32_arm_hash_table(info) \
+ ((struct elf32_arm_link_hash_table *) ((info)->hash))
+
+/* ARM ELF linker hash table. */
+struct elf32_arm_link_hash_table
+ {
+ /* The main hash table. */
+ struct elf_link_hash_table root;
+
+ /* The size in bytes of the section containing the Thumb-to-ARM glue. */
+ bfd_size_type thumb_glue_size;
+
+ /* The size in bytes of the section containing the ARM-to-Thumb glue. */
+ bfd_size_type arm_glue_size;
+
+ /* An arbitrary input BFD chosen to hold the glue sections. */
+ bfd * bfd_of_glue_owner;
+
+ /* Nonzero to output a BE8 image. */
+ int byteswap_code;
+
+ /* Zero if R_ARM_TARGET1 means R_ARM_ABS32.
+ Nonzero if R_ARM_TARGET1 means R_ARM_ABS32. */
+ int target1_is_rel;
+
+ /* The relocation to use for R_ARM_TARGET2 relocations. */
+ int target2_reloc;
+
+ /* Nonzero to fix BX instructions for ARMv4 targets. */
+ int fix_v4bx;
+
+ /* Nonzero if the ARM/Thumb BLX instructions are available for use. */
+ int use_blx;
+
+ /* The number of bytes in the initial entry in the PLT. */
+ bfd_size_type plt_header_size;
+
+ /* The number of bytes in the subsequent PLT etries. */
+ bfd_size_type plt_entry_size;
+
+ /* True if the target system is VxWorks. */
+ int vxworks_p;
+
+ /* True if the target system is Symbian OS. */
+ int symbian_p;
+
+ /* True if the target uses REL relocations. */
+ int use_rel;
+
+ /* Short-cuts to get to dynamic linker sections. */
+ asection *sgot;
+ asection *sgotplt;
+ asection *srelgot;
+ asection *splt;
+ asection *srelplt;
+ asection *sdynbss;
+ asection *srelbss;
+
+ /* The (unloaded but important) VxWorks .rela.plt.unloaded section. */
+ asection *srelplt2;
+
+ /* Data for R_ARM_TLS_LDM32 relocations. */
+ union {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } tls_ldm_got;
+
+ /* Small local sym to section mapping cache. */
+ struct sym_sec_cache sym_sec;
+
+ /* For convenience in allocate_dynrelocs. */
+ bfd * obfd;
+ };
+
+/* Create an entry in an ARM ELF linker hash table. */
+
+static struct bfd_hash_entry *
+elf32_arm_link_hash_newfunc (struct bfd_hash_entry * entry,
+ struct bfd_hash_table * table,
+ const char * string)
+{
+ struct elf32_arm_link_hash_entry * ret =
+ (struct elf32_arm_link_hash_entry *) entry;
+
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (ret == (struct elf32_arm_link_hash_entry *) NULL)
+ ret = bfd_hash_allocate (table, sizeof (struct elf32_arm_link_hash_entry));
+ if (ret == NULL)
+ return (struct bfd_hash_entry *) ret;
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct elf32_arm_link_hash_entry *)
+ _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
+ table, string));
+ if (ret != NULL)
+ {
+ ret->relocs_copied = NULL;
+ ret->tls_type = GOT_UNKNOWN;
+ ret->plt_thumb_refcount = 0;
+ ret->plt_got_offset = -1;
+ }
+
+ return (struct bfd_hash_entry *) ret;
+}
+
+/* Return true if NAME is the name of the relocation section associated
+ with S. */
+
+static bfd_boolean
+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;
+ else
+ return strncmp (name, ".rela", 5) == 0 && strcmp (s->name, name + 5) == 0;
+}
+
+/* Create .got, .gotplt, and .rel(a).got sections in DYNOBJ, and set up
+ shortcuts to them in our hash table. */
+
+static bfd_boolean
+create_got_section (bfd *dynobj, struct bfd_link_info *info)
+{
+ struct elf32_arm_link_hash_table *htab;
+
+ htab = elf32_arm_hash_table (info);
+ /* BPABI objects never have a GOT, or associated sections. */
+ if (htab->symbian_p)
+ return TRUE;
+
+ if (! _bfd_elf_create_got_section (dynobj, info))
+ return FALSE;
+
+ htab->sgot = bfd_get_section_by_name (dynobj, ".got");
+ htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
+ if (!htab->sgot || !htab->sgotplt)
+ abort ();
+
+ htab->srelgot = bfd_make_section_with_flags (dynobj,
+ RELOC_SECTION (htab, ".got"),
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
+ if (htab->srelgot == NULL
+ || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
+ return FALSE;
+ return TRUE;
+}
+
+/* Create .plt, .rel(a).plt, .got, .got.plt, .rel(a).got, .dynbss, and
+ .rel(a).bss sections in DYNOBJ, and set up shortcuts to them in our
+ hash table. */
+
+static bfd_boolean
+elf32_arm_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
+{
+ struct elf32_arm_link_hash_table *htab;
+
+ htab = elf32_arm_hash_table (info);
+ if (!htab->sgot && !create_got_section (dynobj, info))
+ return FALSE;
+
+ if (!_bfd_elf_create_dynamic_sections (dynobj, info))
+ return FALSE;
+
+ htab->splt = bfd_get_section_by_name (dynobj, ".plt");
+ htab->srelplt = bfd_get_section_by_name (dynobj,
+ RELOC_SECTION (htab, ".plt"));
+ htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+ if (!info->shared)
+ htab->srelbss = bfd_get_section_by_name (dynobj,
+ RELOC_SECTION (htab, ".bss"));
+
+ if (htab->vxworks_p)
+ {
+ if (!elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2))
+ return FALSE;
+
+ if (info->shared)
+ {
+ htab->plt_header_size = 0;
+ htab->plt_entry_size
+ = 4 * ARRAY_SIZE (elf32_arm_vxworks_shared_plt_entry);
+ }
+ else
+ {
+ htab->plt_header_size
+ = 4 * ARRAY_SIZE (elf32_arm_vxworks_exec_plt0_entry);
+ htab->plt_entry_size
+ = 4 * ARRAY_SIZE (elf32_arm_vxworks_exec_plt_entry);
+ }
+ }
+
+ if (!htab->splt
+ || !htab->srelplt
+ || !htab->sdynbss
+ || (!info->shared && !htab->srelbss))
+ abort ();
+
+ return TRUE;
+}
+
+/* Copy the extra info we tack onto an elf_link_hash_entry. */
+
+static void
+elf32_arm_copy_indirect_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
+{
+ struct elf32_arm_link_hash_entry *edir, *eind;
+
+ edir = (struct elf32_arm_link_hash_entry *) dir;
+ eind = (struct elf32_arm_link_hash_entry *) ind;
+
+ if (eind->relocs_copied != NULL)
+ {
+ if (edir->relocs_copied != NULL)
+ {
+ struct elf32_arm_relocs_copied **pp;
+ struct elf32_arm_relocs_copied *p;
+
+ /* Add reloc counts against the indirect sym to the direct sym
+ list. Merge any entries against the same section. */
+ for (pp = &eind->relocs_copied; (p = *pp) != NULL; )
+ {
+ struct elf32_arm_relocs_copied *q;
+
+ for (q = edir->relocs_copied; q != NULL; q = q->next)
+ if (q->section == p->section)
+ {
+ q->pc_count += p->pc_count;
+ q->count += p->count;
+ *pp = p->next;
+ break;
+ }
+ if (q == NULL)
+ pp = &p->next;
+ }
+ *pp = edir->relocs_copied;
+ }
+
+ edir->relocs_copied = eind->relocs_copied;
+ 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)
+ {
+ edir->tls_type = eind->tls_type;
+ eind->tls_type = GOT_UNKNOWN;
+ }
+
+ _bfd_elf_link_hash_copy_indirect (info, dir, ind);
+}
+
+/* Create an ARM elf linker hash table. */
+
+static struct bfd_link_hash_table *
+elf32_arm_link_hash_table_create (bfd *abfd)
+{
+ struct elf32_arm_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct elf32_arm_link_hash_table);
+
+ ret = bfd_malloc (amt);
+ if (ret == NULL)
+ return NULL;
+
+ if (!_bfd_elf_link_hash_table_init (& ret->root, abfd,
+ elf32_arm_link_hash_newfunc,
+ sizeof (struct elf32_arm_link_hash_entry)))
+ {
+ free (ret);
+ return NULL;
+ }
+
+ ret->sgot = NULL;
+ ret->sgotplt = NULL;
+ ret->srelgot = NULL;
+ ret->splt = NULL;
+ ret->srelplt = NULL;
+ ret->sdynbss = NULL;
+ ret->srelbss = NULL;
+ ret->srelplt2 = NULL;
+ ret->thumb_glue_size = 0;
+ ret->arm_glue_size = 0;
+ ret->bfd_of_glue_owner = NULL;
+ ret->byteswap_code = 0;
+ ret->target1_is_rel = 0;
+ ret->target2_reloc = R_ARM_NONE;
+#ifdef FOUR_WORD_PLT
+ ret->plt_header_size = 16;
+ ret->plt_entry_size = 16;
+#else
+ ret->plt_header_size = 20;
+ ret->plt_entry_size = 12;
+#endif
+ ret->fix_v4bx = 0;
+ ret->use_blx = 0;
+ ret->vxworks_p = 0;
+ ret->symbian_p = 0;
+ ret->use_rel = 1;
+ ret->sym_sec.abfd = NULL;
+ ret->obfd = abfd;
+ ret->tls_ldm_got.refcount = 0;
+
+ return &ret->root.root;
+}
+
+/* Locate the Thumb encoded calling stub for NAME. */
+
+static struct elf_link_hash_entry *
+find_thumb_glue (struct bfd_link_info *link_info,
+ const char *name,
+ bfd *input_bfd)
+{
+ char *tmp_name;
+ struct elf_link_hash_entry *hash;
+ struct elf32_arm_link_hash_table *hash_table;
+
+ /* We need a pointer to the armelf specific hash table. */
+ hash_table = elf32_arm_hash_table (link_info);
+
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
+
+ hash = elf_link_hash_lookup
+ (&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
+
+ if (hash == NULL)
+ /* xgettext:c-format */
+ (*_bfd_error_handler) (_("%B: unable to find THUMB glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
+
+ free (tmp_name);
+
+ return hash;
+}
+
+/* Locate the ARM encoded calling stub for NAME. */
+
+static struct elf_link_hash_entry *
+find_arm_glue (struct bfd_link_info *link_info,
+ const char *name,
+ bfd *input_bfd)
+{
+ char *tmp_name;
+ struct elf_link_hash_entry *myh;
+ struct elf32_arm_link_hash_table *hash_table;
+
+ /* We need a pointer to the elfarm specific hash table. */
+ hash_table = elf32_arm_hash_table (link_info);
+
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
+
+ myh = elf_link_hash_lookup
+ (&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
+
+ if (myh == NULL)
+ /* xgettext:c-format */
+ (*_bfd_error_handler) (_("%B: unable to find ARM glue '%s' for `%s'"),
+ input_bfd, tmp_name, name);
+
+ free (tmp_name);
+
+ return myh;
+}
+
+/* ARM->Thumb glue (static images):
+
+ .arm
+ __func_from_arm:
+ ldr r12, __func_addr
+ bx r12
+ __func_addr:
+ .word func @ behave as if you saw a ARM_32 reloc.
+
+ (relocatable images)
+ .arm
+ __func_from_arm:
+ ldr r12, __func_offset
+ add r12, r12, pc
+ bx r12
+ __func_offset:
+ .word func - .
+ */
+
+#define ARM2THUMB_STATIC_GLUE_SIZE 12
+static const insn32 a2t1_ldr_insn = 0xe59fc000;
+static const insn32 a2t2_bx_r12_insn = 0xe12fff1c;
+static const insn32 a2t3_func_addr_insn = 0x00000001;
+
+#define ARM2THUMB_PIC_GLUE_SIZE 16
+static const insn32 a2t1p_ldr_insn = 0xe59fc004;
+static const insn32 a2t2p_add_pc_insn = 0xe08cc00f;
+static const insn32 a2t3p_bx_r12_insn = 0xe12fff1c;
+
+/* Thumb->ARM: Thumb->(non-interworking aware) ARM
+
+ .thumb .thumb
+ .align 2 .align 2
+ __func_from_thumb: __func_from_thumb:
+ bx pc push {r6, lr}
+ nop ldr r6, __func_addr
+ .arm mov lr, pc
+ __func_change_to_arm: bx r6
+ b func .arm
+ __func_back_to_thumb:
+ ldmia r13! {r6, lr}
+ bx lr
+ __func_addr:
+ .word func */
+
+#define THUMB2ARM_GLUE_SIZE 8
+static const insn16 t2a1_bx_pc_insn = 0x4778;
+static const insn16 t2a2_noop_insn = 0x46c0;
+static const insn32 t2a3_b_insn = 0xea000000;
+
+#ifndef ELFARM_NABI_C_INCLUDED
+bfd_boolean
+bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info)
+{
+ asection * s;
+ bfd_byte * foo;
+ struct elf32_arm_link_hash_table * globals;
+
+ globals = elf32_arm_hash_table (info);
+
+ BFD_ASSERT (globals != NULL);
+
+ if (globals->arm_glue_size != 0)
+ {
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
+ ARM2THUMB_GLUE_SECTION_NAME);
+
+ BFD_ASSERT (s != NULL);
+
+ foo = bfd_alloc (globals->bfd_of_glue_owner, globals->arm_glue_size);
+
+ s->size = globals->arm_glue_size;
+ s->contents = foo;
+ }
+
+ if (globals->thumb_glue_size != 0)
+ {
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ s = bfd_get_section_by_name
+ (globals->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME);
+
+ BFD_ASSERT (s != NULL);
+
+ foo = bfd_alloc (globals->bfd_of_glue_owner, globals->thumb_glue_size);
+
+ s->size = globals->thumb_glue_size;
+ s->contents = foo;
+ }
+
+ return TRUE;
+}
+
+static void
+record_arm_to_thumb_glue (struct bfd_link_info * link_info,
+ struct elf_link_hash_entry * h)
+{
+ const char * name = h->root.root.string;
+ asection * s;
+ char * tmp_name;
+ struct elf_link_hash_entry * myh;
+ struct bfd_link_hash_entry * bh;
+ struct elf32_arm_link_hash_table * globals;
+ bfd_vma val;
+
+ globals = elf32_arm_hash_table (link_info);
+
+ BFD_ASSERT (globals != NULL);
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ s = bfd_get_section_by_name
+ (globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME);
+
+ BFD_ASSERT (s != NULL);
+
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
+
+ myh = elf_link_hash_lookup
+ (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
+
+ if (myh != NULL)
+ {
+ /* We've already seen this guy. */
+ free (tmp_name);
+ return;
+ }
+
+ /* The only trick here is using hash_table->arm_glue_size as the value.
+ Even though the section isn't allocated yet, this is where we will be
+ putting it. */
+ bh = NULL;
+ val = globals->arm_glue_size + 1;
+ _bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner,
+ tmp_name, BSF_GLOBAL, s, val,
+ NULL, TRUE, FALSE, &bh);
+
+ myh = (struct elf_link_hash_entry *) bh;
+ myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
+ myh->forced_local = 1;
+
+ free (tmp_name);
+
+ if ((link_info->shared || globals->root.is_relocatable_executable))
+ globals->arm_glue_size += ARM2THUMB_PIC_GLUE_SIZE;
+ else
+ globals->arm_glue_size += ARM2THUMB_STATIC_GLUE_SIZE;
+
+ return;
+}
+
+static void
+record_thumb_to_arm_glue (struct bfd_link_info *link_info,
+ struct elf_link_hash_entry *h)
+{
+ const char *name = h->root.root.string;
+ asection *s;
+ char *tmp_name;
+ struct elf_link_hash_entry *myh;
+ struct bfd_link_hash_entry *bh;
+ struct elf32_arm_link_hash_table *hash_table;
+ bfd_vma val;
+
+ hash_table = elf32_arm_hash_table (link_info);
+
+ BFD_ASSERT (hash_table != NULL);
+ BFD_ASSERT (hash_table->bfd_of_glue_owner != NULL);
+
+ s = bfd_get_section_by_name
+ (hash_table->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME);
+
+ BFD_ASSERT (s != NULL);
+
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
+
+ myh = elf_link_hash_lookup
+ (&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
+
+ if (myh != NULL)
+ {
+ /* We've already seen this guy. */
+ free (tmp_name);
+ return;
+ }
+
+ bh = NULL;
+ val = hash_table->thumb_glue_size + 1;
+ _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
+ tmp_name, BSF_GLOBAL, s, val,
+ NULL, TRUE, FALSE, &bh);
+
+ /* If we mark it 'Thumb', the disassembler will do a better job. */
+ myh = (struct elf_link_hash_entry *) bh;
+ myh->type = ELF_ST_INFO (STB_LOCAL, STT_ARM_TFUNC);
+ myh->forced_local = 1;
+
+ free (tmp_name);
+
+#define CHANGE_TO_ARM "__%s_change_to_arm"
+#define BACK_FROM_ARM "__%s_back_from_arm"
+
+ /* Allocate another symbol to mark where we switch to Arm mode. */
+ tmp_name = bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (CHANGE_TO_ARM) + 1);
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, CHANGE_TO_ARM, name);
+
+ bh = NULL;
+ val = hash_table->thumb_glue_size + 4,
+ _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
+ tmp_name, BSF_LOCAL, s, val,
+ NULL, TRUE, FALSE, &bh);
+
+ free (tmp_name);
+
+ hash_table->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
+
+ return;
+}
+
+/* Add the glue sections to ABFD. This function is called from the
+ linker scripts in ld/emultempl/{armelf}.em. */
+
+bfd_boolean
+bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
+ struct bfd_link_info *info)
+{
+ flagword flags;
+ asection *sec;
+
+ /* If we are only performing a partial
+ link do not bother adding the glue. */
+ if (info->relocatable)
+ return TRUE;
+
+ sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME);
+
+ if (sec == NULL)
+ {
+ /* Note: we do not include the flag SEC_LINKER_CREATED, as this
+ will prevent elf_link_input_bfd() from processing the contents
+ of this section. */
+ flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
+
+ sec = bfd_make_section_with_flags (abfd,
+ ARM2THUMB_GLUE_SECTION_NAME,
+ flags);
+
+ if (sec == NULL
+ || !bfd_set_section_alignment (abfd, sec, 2))
+ return FALSE;
+
+ /* Set the gc mark to prevent the section from being removed by garbage
+ collection, despite the fact that no relocs refer to this section. */
+ sec->gc_mark = 1;
+ }
+
+ sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME);
+
+ if (sec == NULL)
+ {
+ flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY;
+
+ sec = bfd_make_section_with_flags (abfd,
+ THUMB2ARM_GLUE_SECTION_NAME,
+ flags);
+
+ if (sec == NULL
+ || !bfd_set_section_alignment (abfd, sec, 2))
+ return FALSE;
+
+ sec->gc_mark = 1;
+ }
+
+ return TRUE;
+}
+
+/* Select a BFD to be used to hold the sections used by the glue code.
+ This function is called from the linker scripts in ld/emultempl/
+ {armelf/pe}.em */
+
+bfd_boolean
+bfd_elf32_arm_get_bfd_for_interworking (bfd *abfd, struct bfd_link_info *info)
+{
+ struct elf32_arm_link_hash_table *globals;
+
+ /* If we are only performing a partial link
+ do not bother getting a bfd to hold the glue. */
+ if (info->relocatable)
+ return TRUE;
+
+ /* Make sure we don't attach the glue sections to a dynamic object. */
+ BFD_ASSERT (!(abfd->flags & DYNAMIC));
+
+ globals = elf32_arm_hash_table (info);
+
+ BFD_ASSERT (globals != NULL);
+
+ if (globals->bfd_of_glue_owner != NULL)
+ return TRUE;
+
+ /* Save the bfd for later use. */
+ globals->bfd_of_glue_owner = abfd;
+
+ return TRUE;
+}
+
+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)
+ globals->use_blx = 1;
+}
+
+bfd_boolean
+bfd_elf32_arm_process_before_allocation (bfd *abfd,
+ struct bfd_link_info *link_info,
+ int byteswap_code)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Rela *internal_relocs = NULL;
+ Elf_Internal_Rela *irel, *irelend;
+ bfd_byte *contents = NULL;
+
+ asection *sec;
+ struct elf32_arm_link_hash_table *globals;
+
+ /* If we are only performing a partial link do not bother
+ to construct any glue. */
+ if (link_info->relocatable)
+ return TRUE;
+
+ /* Here we have a bfd that is to be included on the link. We have a hook
+ to do reloc rummaging, before section sizes are nailed down. */
+ globals = elf32_arm_hash_table (link_info);
+ check_use_blx (globals);
+
+ BFD_ASSERT (globals != NULL);
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ if (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;
+
+ if (sec == NULL)
+ return TRUE;
+
+ for (; sec != NULL; sec = sec->next)
+ {
+ if (sec->reloc_count == 0)
+ continue;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+
+ /* Load the relocs. */
+ internal_relocs
+ = _bfd_elf_link_read_relocs (abfd, sec, (void *) NULL,
+ (Elf_Internal_Rela *) NULL, FALSE);
+
+ if (internal_relocs == NULL)
+ goto error_return;
+
+ irelend = internal_relocs + sec->reloc_count;
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ long r_type;
+ unsigned long r_index;
+
+ struct elf_link_hash_entry *h;
+
+ r_type = ELF32_R_TYPE (irel->r_info);
+ r_index = ELF32_R_SYM (irel->r_info);
+
+ /* These are the only relocation types we care about. */
+ if ( r_type != R_ARM_PC24
+ && r_type != R_ARM_PLT32
+ && r_type != R_ARM_CALL
+ && r_type != R_ARM_JUMP24
+ && r_type != R_ARM_THM_CALL)
+ continue;
+
+ /* Get the section contents if we haven't done so already. */
+ if (contents == NULL)
+ {
+ /* Get cached copy if it exists. */
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ contents = elf_section_data (sec)->this_hdr.contents;
+ else
+ {
+ /* Go get them off disk. */
+ if (! bfd_malloc_and_get_section (abfd, sec, &contents))
+ goto error_return;
+ }
+ }
+
+ /* If the relocation is not against a symbol it cannot concern us. */
+ h = NULL;
+
+ /* We don't care about local symbols. */
+ if (r_index < symtab_hdr->sh_info)
+ continue;
+
+ /* This is an external symbol. */
+ r_index -= symtab_hdr->sh_info;
+ h = (struct elf_link_hash_entry *)
+ elf_sym_hashes (abfd)[r_index];
+
+ /* If the relocation is against a static symbol it must be within
+ the current section and so cannot be a cross ARM/Thumb relocation. */
+ if (h == NULL)
+ continue;
+
+ /* If the call will go through a PLT entry then we do not need
+ glue. */
+ if (globals->splt != NULL && h->plt.offset != (bfd_vma) -1)
+ continue;
+
+ switch (r_type)
+ {
+ case R_ARM_PC24:
+ case R_ARM_PLT32:
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
+ /* This one is a call from arm code. We need to look up
+ the target of the call. If it is a thumb target, we
+ insert glue. */
+ if (ELF_ST_TYPE(h->type) == STT_ARM_TFUNC
+ && !(r_type == R_ARM_CALL && globals->use_blx))
+ record_arm_to_thumb_glue (link_info, h);
+ break;
+
+ case R_ARM_THM_CALL:
+ /* 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)
+ record_thumb_to_arm_glue (link_info, h);
+ break;
+
+ default:
+ abort ();
+ }
+ }
+
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
+ contents = NULL;
+
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+ internal_relocs = NULL;
+ }
+
+ return TRUE;
+
+error_return:
+ 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;
+}
+#endif
+
+
+/* Set target relocation values needed during linking. */
+
+void
+bfd_elf32_arm_set_target_relocs (struct bfd_link_info *link_info,
+ int target1_is_rel,
+ char * target2_type,
+ int fix_v4bx,
+ int use_blx)
+{
+ struct elf32_arm_link_hash_table *globals;
+
+ globals = elf32_arm_hash_table (link_info);
+
+ globals->target1_is_rel = target1_is_rel;
+ if (strcmp (target2_type, "rel") == 0)
+ globals->target2_reloc = R_ARM_REL32;
+ else if (strcmp (target2_type, "abs") == 0)
+ globals->target2_reloc = R_ARM_ABS32;
+ else if (strcmp (target2_type, "got-rel") == 0)
+ globals->target2_reloc = R_ARM_GOT_PREL;
+ else
+ {
+ _bfd_error_handler (_("Invalid TARGET2 relocation type '%s'."),
+ target2_type);
+ }
+ globals->fix_v4bx = fix_v4bx;
+ globals->use_blx |= use_blx;
+}
+
+/* The thumb form of a long branch is a bit finicky, because the offset
+ encoding is split over two fields, each in it's own instruction. They
+ can occur in any order. So given a thumb form of long branch, and an
+ offset, insert the offset into the thumb branch and return finished
+ instruction.
+
+ It takes two thumb instructions to encode the target address. Each has
+ 11 bits to invest. The upper 11 bits are stored in one (identified by
+ H-0.. see below), the lower 11 bits are stored in the other (identified
+ by H-1).
+
+ Combine together and shifted left by 1 (it's a half word address) and
+ there you have it.
+
+ Op: 1111 = F,
+ H-0, upper address-0 = 000
+ Op: 1111 = F,
+ H-1, lower address-0 = 800
+
+ They can be ordered either way, but the arm tools I've seen always put
+ the lower one first. It probably doesn't matter. krk@cygnus.com
+
+ XXX: Actually the order does matter. The second instruction (H-1)
+ moves the computed address into the PC, so it must be the second one
+ in the sequence. The problem, however is that whilst little endian code
+ stores the instructions in HI then LOW order, big endian code does the
+ reverse. nickc@cygnus.com. */
+
+#define LOW_HI_ORDER 0xF800F000
+#define HI_LOW_ORDER 0xF000F800
+
+static insn32
+insert_thumb_branch (insn32 br_insn, int rel_off)
+{
+ unsigned int low_bits;
+ unsigned int high_bits;
+
+ BFD_ASSERT ((rel_off & 1) != 1);
+
+ rel_off >>= 1; /* Half word aligned address. */
+ low_bits = rel_off & 0x000007FF; /* The bottom 11 bits. */
+ high_bits = (rel_off >> 11) & 0x000007FF; /* The top 11 bits. */
+
+ if ((br_insn & LOW_HI_ORDER) == LOW_HI_ORDER)
+ br_insn = LOW_HI_ORDER | (low_bits << 16) | high_bits;
+ else if ((br_insn & HI_LOW_ORDER) == HI_LOW_ORDER)
+ br_insn = HI_LOW_ORDER | (high_bits << 16) | low_bits;
+ else
+ /* FIXME: abort is probably not the right call. krk@cygnus.com */
+ abort (); /* Error - not a valid branch instruction form. */
+
+ return br_insn;
+}
+
+/* Thumb code calling an ARM function. */
+
+static int
+elf32_thumb_to_arm_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)
+{
+ asection * s = 0;
+ bfd_vma my_offset;
+ unsigned long int tmp;
+ long int ret_offset;
+ struct elf_link_hash_entry * myh;
+ struct elf32_arm_link_hash_table * globals;
+
+ myh = find_thumb_glue (info, name, input_bfd);
+ if (myh == NULL)
+ return FALSE;
+
+ globals = elf32_arm_hash_table (info);
+
+ BFD_ASSERT (globals != NULL);
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ my_offset = myh->root.u.def.value;
+
+ s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
+ THUMB2ARM_GLUE_SECTION_NAME);
+
+ BFD_ASSERT (s != NULL);
+ BFD_ASSERT (s->contents != NULL);
+ BFD_ASSERT (s->output_section != NULL);
+
+ if ((my_offset & 0x01) == 0x01)
+ {
+ if (sym_sec != NULL
+ && sym_sec->owner != NULL
+ && !INTERWORK_FLAG (sym_sec->owner))
+ {
+ (*_bfd_error_handler)
+ (_("%B(%s): warning: interworking not enabled.\n"
+ " first occurrence: %B: thumb call to arm"),
+ sym_sec->owner, input_bfd, name);
+
+ return FALSE;
+ }
+
+ --my_offset;
+ myh->root.u.def.value = my_offset;
+
+ bfd_put_16 (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);
+
+ ret_offset =
+ /* Address of destination of the stub. */
+ ((bfd_signed_vma) val)
+ - ((bfd_signed_vma)
+ /* Offset from the start of the current section
+ to the start of the stubs. */
+ (s->output_offset
+ /* Offset of the start of this stub from the start of the stubs. */
+ + my_offset
+ /* Address of the start of the current section. */
+ + s->output_section->vma)
+ /* The branch instruction is 4 bytes into the stub. */
+ + 4
+ /* ARM branches work from the pc of the instruction + 8. */
+ + 8);
+
+ bfd_put_32 (output_bfd,
+ (bfd_vma) t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
+ s->contents + my_offset + 4);
+ }
+
+ BFD_ASSERT (my_offset <= globals->thumb_glue_size);
+
+ /* Now go back and fix up the original BL insn to point to here. */
+ ret_offset =
+ /* Address of where the stub is located. */
+ (s->output_section->vma + s->output_offset + my_offset)
+ /* Address of where the BL is located. */
+ - (input_section->output_section->vma + input_section->output_offset
+ + offset)
+ /* Addend in the relocation. */
+ - addend
+ /* Biassing for PC-relative addressing. */
+ - 8;
+
+ tmp = bfd_get_32 (input_bfd, hit_data
+ - input_section->vma);
+
+ bfd_put_32 (output_bfd,
+ (bfd_vma) insert_thumb_branch (tmp, ret_offset),
+ hit_data - input_section->vma);
+
+ return TRUE;
+}
+
+/* Arm code calling a Thumb function. */
+
+static int
+elf32_arm_to_thumb_stub (struct bfd_link_info * info,
+ const char * name,
+ bfd * input_bfd,
+ bfd * output_bfd,
+ asection * input_section,
+ bfd_byte * hit_data,
+ asection * sym_sec,
+ bfd_vma offset,
+ bfd_signed_vma addend,
+ bfd_vma val)
+{
+ unsigned long int tmp;
+ 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);
+ if (myh == NULL)
+ return FALSE;
+
+ globals = elf32_arm_hash_table (info);
+
+ BFD_ASSERT (globals != NULL);
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ my_offset = myh->root.u.def.value;
+ s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
+ ARM2THUMB_GLUE_SECTION_NAME);
+ BFD_ASSERT (s != NULL);
+ BFD_ASSERT (s->contents != NULL);
+ BFD_ASSERT (s->output_section != NULL);
+
+ if ((my_offset & 0x01) == 0x01)
+ {
+ if (sym_sec != NULL
+ && sym_sec->owner != NULL
+ && !INTERWORK_FLAG (sym_sec->owner))
+ {
+ (*_bfd_error_handler)
+ (_("%B(%s): warning: interworking not enabled.\n"
+ " first occurrence: %B: arm call to thumb"),
+ sym_sec->owner, input_bfd, name);
+ }
+
+ --my_offset;
+ myh->root.u.def.value = my_offset;
+
+ if ((info->shared || globals->root.is_relocatable_executable))
+ {
+ /* 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);
+ /* Adjust the offset by 4 for the position of the add,
+ and 8 for the pipeline offset. */
+ ret_offset = (val - (s->output_offset
+ + s->output_section->vma
+ + my_offset + 12))
+ | 1;
+ bfd_put_32 (output_bfd, ret_offset,
+ s->contents + my_offset + 12);
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, (bfd_vma) a2t1_ldr_insn,
+ s->contents + my_offset);
+
+ bfd_put_32 (output_bfd, (bfd_vma) a2t2_bx_r12_insn,
+ s->contents + my_offset + 4);
+
+ /* It's a thumb address. Add the low order bit. */
+ bfd_put_32 (output_bfd, val | a2t3_func_addr_insn,
+ s->contents + my_offset + 8);
+ }
+ }
+
+ BFD_ASSERT (my_offset <= globals->arm_glue_size);
+
+ tmp = bfd_get_32 (input_bfd, hit_data);
+ tmp = tmp & 0xFF000000;
+
+ /* Somehow these are both 4 too far, so subtract 8. */
+ ret_offset = (s->output_offset
+ + my_offset
+ + s->output_section->vma
+ - (input_section->output_offset
+ + input_section->output_section->vma
+ + offset + addend)
+ - 8);
+
+ tmp = tmp | ((ret_offset >> 2) & 0x00FFFFFF);
+
+ bfd_put_32 (output_bfd, (bfd_vma) tmp, hit_data - input_section->vma);
+
+ return TRUE;
+}
+
+/* Some relocations map to different relocations depending on the
+ target. Return the real relocation. */
+static int
+arm_real_reloc_type (struct elf32_arm_link_hash_table * globals,
+ int r_type)
+{
+ switch (r_type)
+ {
+ case R_ARM_TARGET1:
+ if (globals->target1_is_rel)
+ return R_ARM_REL32;
+ else
+ return R_ARM_ABS32;
+
+ case R_ARM_TARGET2:
+ return globals->target2_reloc;
+
+ default:
+ return r_type;
+ }
+}
+
+/* Return the base VMA address which should be subtracted from real addresses
+ when resolving @dtpoff relocation.
+ This is PT_TLS segment p_vaddr. */
+
+static bfd_vma
+dtpoff_base (struct bfd_link_info *info)
+{
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
+ return 0;
+ return elf_hash_table (info)->tls_sec->vma;
+}
+
+/* Return the relocation value for @tpoff relocation
+ if STT_TLS virtual address is ADDRESS. */
+
+static bfd_vma
+tpoff (struct bfd_link_info *info, bfd_vma address)
+{
+ struct elf_link_hash_table *htab = elf_hash_table (info);
+ bfd_vma base;
+
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (htab->tls_sec == NULL)
+ return 0;
+ base = align_power ((bfd_vma) TCB_SIZE, htab->tls_sec->alignment_power);
+ return address - htab->tls_sec->vma + base;
+}
+
+/* Perform an R_ARM_ABS12 relocation on the field pointed to by DATA.
+ VALUE is the relocation value. */
+
+static bfd_reloc_status_type
+elf32_arm_abs12_reloc (bfd *abfd, void *data, bfd_vma value)
+{
+ if (value > 0xfff)
+ return bfd_reloc_overflow;
+
+ value |= bfd_get_32 (abfd, data) & 0xfffff000;
+ bfd_put_32 (abfd, value, data);
+ return bfd_reloc_ok;
+}
+
+/* Perform a relocation as part of a final link. */
+
+static bfd_reloc_status_type
+elf32_arm_final_link_relocate (reloc_howto_type * howto,
+ bfd * input_bfd,
+ bfd * output_bfd,
+ asection * input_section,
+ bfd_byte * contents,
+ Elf_Internal_Rela * rel,
+ bfd_vma value,
+ struct bfd_link_info * info,
+ asection * sym_sec,
+ const char * sym_name,
+ int sym_flags,
+ struct elf_link_hash_entry * h,
+ bfd_boolean * unresolved_reloc_p)
+{
+ unsigned long r_type = howto->type;
+ unsigned long r_symndx;
+ bfd_byte * hit_data = contents + rel->r_offset;
+ bfd * dynobj = NULL;
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ bfd_vma * local_got_offsets;
+ asection * sgot = NULL;
+ asection * splt = NULL;
+ asection * sreloc = NULL;
+ bfd_vma addend;
+ bfd_signed_vma signed_addend;
+ struct elf32_arm_link_hash_table * globals;
+
+ globals = elf32_arm_hash_table (info);
+
+ /* Some relocation type map to different relocations depending on the
+ target. We pick the right one here. */
+ r_type = arm_real_reloc_type (globals, r_type);
+ if (r_type != howto->type)
+ howto = elf32_arm_howto_from_type (r_type);
+
+ /* If the start address has been set, then set the EF_ARM_HASENTRY
+ flag. Setting this more than once is redundant, but the cost is
+ not too high, and it keeps the code simple.
+
+ The test is done here, rather than somewhere else, because the
+ start address is only set just before the final link commences.
+
+ Note - if the user deliberately sets a start address of 0, the
+ flag will not be set. */
+ if (bfd_get_start_address (output_bfd) != 0)
+ elf_elfheader (output_bfd)->e_flags |= EF_ARM_HASENTRY;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ if (dynobj)
+ {
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ }
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ local_got_offsets = elf_local_got_offsets (input_bfd);
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+ if (globals->use_rel)
+ {
+ addend = bfd_get_32 (input_bfd, hit_data) & howto->src_mask;
+
+ if (addend & ((howto->src_mask + 1) >> 1))
+ {
+ signed_addend = -1;
+ signed_addend &= ~ howto->src_mask;
+ signed_addend |= addend;
+ }
+ else
+ signed_addend = addend;
+ }
+ else
+ addend = signed_addend = rel->r_addend;
+
+ switch (r_type)
+ {
+ case R_ARM_NONE:
+ /* We don't need to find a value for this symbol. It's just a
+ marker. */
+ *unresolved_reloc_p = FALSE;
+ return bfd_reloc_ok;
+
+ case R_ARM_ABS12:
+ if (!globals->vxworks_p)
+ return elf32_arm_abs12_reloc (input_bfd, hit_data, value + addend);
+
+ case R_ARM_PC24:
+ case R_ARM_ABS32:
+ case R_ARM_REL32:
+ 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)
+ && h != NULL
+ && splt != NULL
+ && h->plt.offset != (bfd_vma) -1)
+ {
+ /* If we've created a .plt section, and assigned a PLT entry to
+ this function, it should not be known to bind locally. If
+ it were, we would have cleared the PLT entry. */
+ BFD_ASSERT (!SYMBOL_CALLS_LOCAL (info, h));
+
+ value = (splt->output_section->vma
+ + splt->output_offset
+ + h->plt.offset);
+ *unresolved_reloc_p = FALSE;
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ rel->r_addend);
+ }
+
+ /* When generating a shared object or relocatable executable, these
+ relocations are copied into the output file to be resolved at
+ run time. */
+ if ((info->shared || globals->root.is_relocatable_executable)
+ && (input_section->flags & SEC_ALLOC)
+ && (r_type != R_ARM_REL32
+ || !SYMBOL_CALLS_LOCAL (info, h))
+ && (h == NULL
+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak)
+ && 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)
+ {
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+ bfd_boolean skip, relocate;
+
+ *unresolved_reloc_p = FALSE;
+
+ if (sreloc == NULL)
+ {
+ const char * name;
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd,
+ elf_elfheader (input_bfd)->e_shstrndx,
+ elf_section_data (input_section)->rel_hdr.sh_name));
+ if (name == NULL)
+ return bfd_reloc_notsupported;
+
+ BFD_ASSERT (reloc_section_p (globals, name, input_section));
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ BFD_ASSERT (sreloc != NULL);
+ }
+
+ skip = FALSE;
+ relocate = FALSE;
+
+ outrel.r_addend = addend;
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = TRUE;
+ else if (outrel.r_offset == (bfd_vma) -2)
+ skip = TRUE, relocate = TRUE;
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+
+ if (skip)
+ memset (&outrel, 0, sizeof outrel);
+ else if (h != NULL
+ && h->dynindx != -1
+ && (!info->shared
+ || !info->symbolic
+ || !h->def_regular))
+ outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
+ else
+ {
+ int symbol;
+
+ /* This symbol is local, or marked to become local. */
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
+ if (globals->symbian_p)
+ {
+ /* On Symbian OS, the data segment and text segement
+ can be relocated independently. Therefore, we
+ must indicate the segment to which this
+ relocation is relative. The BPABI allows us to
+ 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.) */
+ if (sym_sec)
+ symbol = elf_section_data (sym_sec->output_section)->dynindx;
+ else
+ symbol = elf_section_data (input_section->output_section)->dynindx;
+ BFD_ASSERT (symbol != 0);
+ }
+ else
+ /* On SVR4-ish systems, the dynamic loader cannot
+ relocate the text and data segments independently,
+ so the symbol does not matter. */
+ symbol = 0;
+ outrel.r_info = ELF32_R_INFO (symbol, R_ARM_RELATIVE);
+ if (globals->use_rel)
+ relocate = TRUE;
+ else
+ outrel.r_addend += value;
+ }
+
+ loc = sreloc->contents;
+ loc += sreloc->reloc_count++ * RELOC_SIZE (globals);
+ SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+
+ /* If this reloc is against an external symbol, we do not want to
+ fiddle with the addend. Otherwise, we need to include the symbol
+ value so that it becomes an addend for the dynamic reloc. */
+ if (! relocate)
+ return bfd_reloc_ok;
+
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ (bfd_vma) 0);
+ }
+ else switch (r_type)
+ {
+ case R_ARM_ABS12:
+ return elf32_arm_abs12_reloc (input_bfd, hit_data, value + addend);
+
+ case R_ARM_XPC25: /* Arm BLX instruction. */
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
+ case R_ARM_PC24: /* Arm B/BL instruction */
+ case R_ARM_PLT32:
+ if (r_type == R_ARM_XPC25)
+ {
+ /* Check for Arm calling Arm function. */
+ /* FIXME: Should we translate the instruction into a BL
+ instruction instead ? */
+ if (sym_flags != STT_ARM_TFUNC)
+ (*_bfd_error_handler)
+ (_("\%B: Warning: Arm BLX instruction targets Arm function '%s'."),
+ input_bfd,
+ h ? h->root.root.string : "(local)");
+ }
+ else if (r_type != R_ARM_CALL || !globals->use_blx)
+ {
+ /* 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;
+ }
+ }
+
+ /* The ARM ELF ABI says that this reloc is computed as: S - P + A
+ where:
+ S is the address of the symbol in the relocation.
+ P is address of the instruction being relocated.
+ A is the addend (extracted from the instruction) in bytes.
+
+ S is held in 'value'.
+ P is the base address of the section containing the
+ instruction plus the offset of the reloc into that
+ section, ie:
+ (input_section->output_section->vma +
+ input_section->output_offset +
+ rel->r_offset).
+ A is the addend, converted into bytes, ie:
+ (signed_addend * 4)
+
+ Note: None of these operations have knowledge of the pipeline
+ size of the processor, thus it is up to the assembler to
+ encode this information into the addend. */
+ value -= (input_section->output_section->vma
+ + input_section->output_offset);
+ value -= rel->r_offset;
+ if (globals->use_rel)
+ value += (signed_addend << howto->size);
+ else
+ /* RELA addends do not have to be adjusted by howto->size. */
+ value += signed_addend;
+
+ 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)
+ {
+ /* 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);
+
+ 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). */
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= (1 << 28);
+ else
+ {
+ value &= ~(bfd_vma)(1 << 28);
+ value |= (1 << 24);
+ }
+ }
+ break;
+
+ case R_ARM_ABS32:
+ value += addend;
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
+ break;
+
+ case R_ARM_REL32:
+ value += addend;
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
+ 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);
+ value += signed_addend;
+ if (! h || h->root.type != bfd_link_hash_undefweak)
+ {
+ /* Check for overflow */
+ if ((value ^ (value >> 1)) & (1 << 30))
+ return bfd_reloc_overflow;
+ }
+ value &= 0x7fffffff;
+ value |= (bfd_get_32 (input_bfd, hit_data) & 0x80000000);
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
+ break;
+ }
+
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_ARM_ABS8:
+ value += addend;
+ if ((long) value > 0x7f || (long) value < -0x80)
+ return bfd_reloc_overflow;
+
+ bfd_put_8 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_ARM_ABS16:
+ value += addend;
+
+ if ((long) value > 0x7fff || (long) value < -0x8000)
+ return bfd_reloc_overflow;
+
+ bfd_put_16 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_ARM_THM_ABS5:
+ /* Support ldr and str instructions for the thumb. */
+ if (globals->use_rel)
+ {
+ /* Need to refetch addend. */
+ addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
+ /* ??? Need to determine shift amount from operand size. */
+ addend >>= howto->rightshift;
+ }
+ value += addend;
+
+ /* ??? Isn't value unsigned? */
+ if ((long) value > 0x1f || (long) value < -0x10)
+ return bfd_reloc_overflow;
+
+ /* ??? Value needs to be properly shifted into place first. */
+ value |= bfd_get_16 (input_bfd, hit_data) & 0xf83f;
+ bfd_put_16 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_ARM_THM_XPC22:
+ case R_ARM_THM_CALL:
+ /* Thumb BL (branch long instruction). */
+ {
+ bfd_vma relocation;
+ 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 signed_check;
+
+ /* Need to refetch the addend and squish the two 11 bit pieces
+ together. */
+ 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);
+ signed_addend = addend;
+ }
+
+ if (r_type == R_ARM_THM_XPC22)
+ {
+ /* Check for Thumb to Thumb call. */
+ /* FIXME: Should we translate the instruction into a BL
+ instruction instead ? */
+ if (sym_flags == STT_ARM_TFUNC)
+ (*_bfd_error_handler)
+ (_("%B: Warning: Thumb BLX instruction targets thumb function '%s'."),
+ input_bfd,
+ h ? h->root.root.string : "(local)");
+ }
+ else
+ {
+ /* If it is not a call to Thumb, assume call to Arm.
+ If it is a call relative to a section name, then it is not a
+ function call at all, but rather a long jump. Calls through
+ the PLT do not require stubs. */
+ if (sym_flags != STT_ARM_TFUNC && sym_flags != STT_SECTION
+ && (h == NULL || splt == NULL
+ || h->plt.offset == (bfd_vma) -1))
+ {
+ if (globals->use_blx)
+ {
+ /* Convert BL to BLX. */
+ lower_insn = (lower_insn & ~0x1000) | 0x0800;
+ }
+ 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))
+ return bfd_reloc_ok;
+ else
+ return bfd_reloc_dangerous;
+ }
+ else if (sym_flags == STT_ARM_TFUNC && globals->use_blx)
+ {
+ /* Make sure this is a BL. */
+ lower_insn |= 0x1800;
+ }
+ }
+
+ /* Handle calls via the PLT. */
+ if (h != NULL && splt != NULL && h->plt.offset != (bfd_vma) -1)
+ {
+ value = (splt->output_section->vma
+ + splt->output_offset
+ + h->plt.offset);
+ if (globals->use_blx)
+ {
+ /* If the Thumb BLX instruction is available, convert the
+ BL to a BLX instruction to call the ARM-mode PLT entry. */
+ lower_insn = (lower_insn & ~0x1000) | 0x0800;
+ }
+ else
+ /* Target the Thumb stub before the ARM PLT entry. */
+ value -= PLT_THUMB_STUB_SIZE;
+ *unresolved_reloc_p = FALSE;
+ }
+
+ relocation = value + signed_addend;
+
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+
+ check = relocation >> howto->rightshift;
+
+ /* If this is a signed value, the rightshift just dropped
+ leading 1 bits (assuming twos complement). */
+ if ((bfd_signed_vma) relocation >= 0)
+ signed_check = check;
+ else
+ signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
+
+ /* Assumes two's complement. */
+ if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
+ overflow = TRUE;
+
+ if ((lower_insn & 0x1800) == 0x0800)
+ /* For a BLX instruction, make sure that the relocation is rounded up
+ to a word boundary. This follows the semantics of the instruction
+ which specifies that bit 1 of the target address will come from bit
+ 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 the relocated value back in the object file: */
+ bfd_put_16 (input_bfd, upper_insn, hit_data);
+ bfd_put_16 (input_bfd, lower_insn, hit_data + 2);
+
+ return (overflow ? bfd_reloc_overflow : bfd_reloc_ok);
+ }
+ break;
+
+ case R_ARM_THM_JUMP24:
+ /* Thumb32 unconditional branch instruction. */
+ {
+ bfd_vma relocation;
+ 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 signed_check;
+
+ /* Need to refetch the addend, reconstruct the top three bits, and glue the
+ two pieces together. */
+ if (globals->use_rel)
+ {
+ bfd_vma S = (upper_insn & 0x0400) >> 10;
+ bfd_vma hi = (upper_insn & 0x03ff);
+ bfd_vma I1 = (lower_insn & 0x2000) >> 13;
+ bfd_vma I2 = (lower_insn & 0x0800) >> 11;
+ bfd_vma lo = (lower_insn & 0x07ff);
+
+ I1 = !(I1 ^ S);
+ I2 = !(I2 ^ S);
+ S = !S;
+
+ signed_addend = (S << 24) | (I1 << 23) | (I2 << 22) | (hi << 12) | (lo << 1);
+ signed_addend -= (1 << 24); /* Sign extend. */
+ }
+
+ /* ??? Should handle interworking? GCC might someday try to
+ use this for tail calls. */
+
+ relocation = value + signed_addend;
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+
+ check = relocation >> howto->rightshift;
+
+ /* If this is a signed value, the rightshift just dropped
+ leading 1 bits (assuming twos complement). */
+ if ((bfd_signed_vma) relocation >= 0)
+ signed_check = check;
+ else
+ signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
+
+ /* Assumes two's complement. */
+ if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
+ overflow = TRUE;
+
+ /* Put RELOCATION back into the insn. */
+ {
+ bfd_vma S = (relocation & 0x01000000) >> 24;
+ bfd_vma I1 = (relocation & 0x00800000) >> 23;
+ bfd_vma I2 = (relocation & 0x00400000) >> 22;
+ bfd_vma hi = (relocation & 0x003ff000) >> 12;
+ bfd_vma lo = (relocation & 0x00000ffe) >> 1;
+
+ I1 = !(I1 ^ S);
+ I2 = !(I2 ^ S);
+
+ upper_insn = (upper_insn & (bfd_vma) 0xf800) | (S << 10) | hi;
+ lower_insn = (lower_insn & (bfd_vma) 0xd000) | (I1 << 13) | (I2 << 11) | lo;
+ }
+
+ /* Put the relocated value back in the object file: */
+ bfd_put_16 (input_bfd, upper_insn, hit_data);
+ bfd_put_16 (input_bfd, lower_insn, hit_data + 2);
+
+ return (overflow ? bfd_reloc_overflow : bfd_reloc_ok);
+ }
+
+ case R_ARM_THM_JUMP19:
+ /* Thumb32 conditional branch instruction. */
+ {
+ bfd_vma relocation;
+ 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 signed_check;
+
+ /* Need to refetch the addend, reconstruct the top three bits,
+ and squish the two 11 bit pieces together. */
+ if (globals->use_rel)
+ {
+ bfd_vma S = (upper_insn & 0x0400) >> 10;
+ bfd_vma upper = (upper_insn & 0x001f);
+ 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 -= 0x0100; /* Sign extend. */
+
+ addend = (upper << 12) | (lower << 1);
+ signed_addend = addend;
+ }
+
+ /* ??? Should handle interworking? GCC might someday try to
+ use this for tail calls. */
+
+ relocation = value + signed_addend;
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+
+ check = relocation >> howto->rightshift;
+
+ /* If this is a signed value, the rightshift just dropped
+ leading 1 bits (assuming twos complement). */
+ if ((bfd_signed_vma) relocation >= 0)
+ signed_check = check;
+ else
+ signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
+
+ /* Assumes two's complement. */
+ if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
+ overflow = TRUE;
+
+ /* Put RELOCATION back into the insn. */
+ {
+ bfd_vma S = (relocation & 0x00100000) >> 20;
+ bfd_vma J2 = (relocation & 0x00080000) >> 19;
+ bfd_vma J1 = (relocation & 0x00040000) >> 18;
+ bfd_vma hi = (relocation & 0x0003f000) >> 12;
+ bfd_vma lo = (relocation & 0x00000ffe) >> 1;
+
+ upper_insn = (upper_insn & 0xfb30) | (S << 10) | hi;
+ lower_insn = (lower_insn & 0xd000) | (J1 << 13) | (J2 << 11) | lo;
+ }
+
+ /* Put the relocated value back in the object file: */
+ bfd_put_16 (input_bfd, upper_insn, hit_data);
+ bfd_put_16 (input_bfd, lower_insn, hit_data + 2);
+
+ return (overflow ? bfd_reloc_overflow : bfd_reloc_ok);
+ }
+
+ case R_ARM_THM_JUMP11:
+ case R_ARM_THM_JUMP8:
+ case R_ARM_THM_JUMP6:
+ /* Thumb B (branch) instruction). */
+ {
+ bfd_signed_vma relocation;
+ bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
+ bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
+ bfd_signed_vma signed_check;
+
+ /* CZB cannot jump backward. */
+ if (r_type == R_ARM_THM_JUMP6)
+ reloc_signed_min = 0;
+
+ if (globals->use_rel)
+ {
+ /* Need to refetch addend. */
+ addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
+ if (addend & ((howto->src_mask + 1) >> 1))
+ {
+ signed_addend = -1;
+ signed_addend &= ~ howto->src_mask;
+ signed_addend |= addend;
+ }
+ else
+ signed_addend = addend;
+ /* The value in the insn has been right shifted. We need to
+ undo this, so that we can perform the address calculation
+ in terms of bytes. */
+ signed_addend <<= howto->rightshift;
+ }
+ relocation = value + signed_addend;
+
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+
+ relocation >>= howto->rightshift;
+ signed_check = relocation;
+
+ if (r_type == R_ARM_THM_JUMP6)
+ relocation = ((relocation & 0x0020) << 4) | ((relocation & 0x001f) << 3);
+ else
+ relocation &= howto->dst_mask;
+ relocation |= (bfd_get_16 (input_bfd, hit_data) & (~ howto->dst_mask));
+
+ bfd_put_16 (input_bfd, relocation, hit_data);
+
+ /* Assumes two's complement. */
+ if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
+ return bfd_reloc_overflow;
+
+ return bfd_reloc_ok;
+ }
+
+ case R_ARM_ALU_PCREL7_0:
+ case R_ARM_ALU_PCREL15_8:
+ case R_ARM_ALU_PCREL23_15:
+ {
+ bfd_vma insn;
+ bfd_vma relocation;
+
+ insn = bfd_get_32 (input_bfd, hit_data);
+ if (globals->use_rel)
+ {
+ /* Extract the addend. */
+ addend = (insn & 0xff) << ((insn & 0xf00) >> 7);
+ signed_addend = addend;
+ }
+ relocation = value + signed_addend;
+
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+ insn = (insn & ~0xfff)
+ | ((howto->bitpos << 7) & 0xf00)
+ | ((relocation >> howto->bitpos) & 0xff);
+ bfd_put_32 (input_bfd, value, hit_data);
+ }
+ return bfd_reloc_ok;
+
+ case R_ARM_GNU_VTINHERIT:
+ case R_ARM_GNU_VTENTRY:
+ return bfd_reloc_ok;
+
+ case R_ARM_GOTOFF32:
+ /* Relocation is relative to the start of the
+ global offset table. */
+
+ BFD_ASSERT (sgot != NULL);
+ if (sgot == NULL)
+ return bfd_reloc_notsupported;
+
+ /* If we are addressing a Thumb function, we need to adjust the
+ address by one, so that attempts to call the function pointer will
+ correctly interpret it as Thumb code. */
+ if (sym_flags == STT_ARM_TFUNC)
+ value += 1;
+
+ /* Note that sgot->output_offset is not involved in this
+ calculation. We always want the start of .got. If we
+ define _GLOBAL_OFFSET_TABLE in a different way, as is
+ permitted by the ABI, we might have to change this
+ calculation. */
+ value -= sgot->output_section->vma;
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ rel->r_addend);
+
+ case R_ARM_GOTPC:
+ /* Use global offset table as symbol value. */
+ BFD_ASSERT (sgot != NULL);
+
+ if (sgot == NULL)
+ return bfd_reloc_notsupported;
+
+ *unresolved_reloc_p = FALSE;
+ value = sgot->output_section->vma;
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ rel->r_addend);
+
+ case R_ARM_GOT32:
+ case R_ARM_GOT_PREL:
+ /* Relocation is to the entry for this symbol in the
+ global offset table. */
+ if (sgot == NULL)
+ return bfd_reloc_notsupported;
+
+ if (h != NULL)
+ {
+ bfd_vma off;
+ bfd_boolean dyn;
+
+ off = h->got.offset;
+ BFD_ASSERT (off != (bfd_vma) -1);
+ dyn = globals->root.dynamic_sections_created;
+
+ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ || (info->shared
+ && SYMBOL_REFERENCES_LOCAL (info, h))
+ || (ELF_ST_VISIBILITY (h->other)
+ && h->root.type == bfd_link_hash_undefweak))
+ {
+ /* This is actually a static link, or it is a -Bsymbolic link
+ and the symbol is defined locally. We must initialize this
+ entry in the global offset table. Since the offset must
+ always be a multiple of 4, we use the least significant bit
+ to record whether we have initialized it already.
+
+ When doing a dynamic link, we create a .rel(a).got relocation
+ entry to initialize the value. This is done in the
+ finish_dynamic_symbol routine. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ /* If we are addressing a Thumb function, we need to
+ adjust the address by one, so that attempts to
+ call the function pointer will correctly
+ interpret it as Thumb code. */
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
+
+ bfd_put_32 (output_bfd, value, sgot->contents + off);
+ h->got.offset |= 1;
+ }
+ }
+ else
+ *unresolved_reloc_p = FALSE;
+
+ value = sgot->output_offset + off;
+ }
+ else
+ {
+ bfd_vma off;
+
+ BFD_ASSERT (local_got_offsets != NULL &&
+ local_got_offsets[r_symndx] != (bfd_vma) -1);
+
+ off = local_got_offsets[r_symndx];
+
+ /* The offset must always be a multiple of 4. We use the
+ least significant bit to record whether we have already
+ generated the necessary reloc. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ /* If we are addressing a Thumb function, we need to
+ adjust the address by one, so that attempts to
+ call the function pointer will correctly
+ interpret it as Thumb code. */
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
+
+ if (globals->use_rel)
+ bfd_put_32 (output_bfd, value, sgot->contents + off);
+
+ if (info->shared)
+ {
+ asection * srelgot;
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+
+ srelgot = (bfd_get_section_by_name
+ (dynobj, RELOC_SECTION (globals, ".got")));
+ BFD_ASSERT (srelgot != NULL);
+
+ outrel.r_addend = addend + value;
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + off);
+ outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+ loc = srelgot->contents;
+ loc += srelgot->reloc_count++ * RELOC_SIZE (globals);
+ SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+ }
+
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ value = sgot->output_offset + off;
+ }
+ if (r_type != R_ARM_GOT32)
+ value += sgot->output_section->vma;
+
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ rel->r_addend);
+
+ case R_ARM_TLS_LDO32:
+ value = value - dtpoff_base (info);
+
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ rel->r_addend);
+
+ case R_ARM_TLS_LDM32:
+ {
+ bfd_vma off;
+
+ if (globals->sgot == NULL)
+ abort ();
+
+ off = globals->tls_ldm_got.offset;
+
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ /* If we don't know the module number, create a relocation
+ for it. */
+ if (info->shared)
+ {
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+
+ if (globals->srelgot == NULL)
+ abort ();
+
+ outrel.r_addend = 0;
+ outrel.r_offset = (globals->sgot->output_section->vma
+ + globals->sgot->output_offset + off);
+ outrel.r_info = ELF32_R_INFO (0, R_ARM_TLS_DTPMOD32);
+
+ if (globals->use_rel)
+ bfd_put_32 (output_bfd, outrel.r_addend,
+ globals->sgot->contents + off);
+
+ loc = globals->srelgot->contents;
+ loc += globals->srelgot->reloc_count++ * RELOC_SIZE (globals);
+ SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+ }
+ else
+ bfd_put_32 (output_bfd, 1, globals->sgot->contents + off);
+
+ globals->tls_ldm_got.offset |= 1;
+ }
+
+ value = globals->sgot->output_section->vma + globals->sgot->output_offset + off
+ - (input_section->output_section->vma + input_section->output_offset + rel->r_offset);
+
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ rel->r_addend);
+ }
+
+ case R_ARM_TLS_GD32:
+ case R_ARM_TLS_IE32:
+ {
+ bfd_vma off;
+ int indx;
+ char tls_type;
+
+ if (globals->sgot == NULL)
+ abort ();
+
+ indx = 0;
+ if (h != NULL)
+ {
+ bfd_boolean dyn;
+ dyn = globals->root.dynamic_sections_created;
+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ && (!info->shared
+ || !SYMBOL_REFERENCES_LOCAL (info, h)))
+ {
+ *unresolved_reloc_p = FALSE;
+ indx = h->dynindx;
+ }
+ off = h->got.offset;
+ tls_type = ((struct elf32_arm_link_hash_entry *) h)->tls_type;
+ }
+ else
+ {
+ if (local_got_offsets == NULL)
+ abort ();
+ off = local_got_offsets[r_symndx];
+ tls_type = elf32_arm_local_got_tls_type (input_bfd)[r_symndx];
+ }
+
+ if (tls_type == GOT_UNKNOWN)
+ abort ();
+
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_boolean need_relocs = FALSE;
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc = NULL;
+ int cur_off = off;
+
+ /* The GOT entries have not been initialized yet. Do it
+ now, and emit any relocations. If both an IE GOT and a
+ GD GOT are necessary, we emit the GD first. */
+
+ if ((info->shared || indx != 0)
+ && (h == NULL
+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak))
+ {
+ need_relocs = TRUE;
+ if (globals->srelgot == NULL)
+ abort ();
+ loc = globals->srelgot->contents;
+ loc += globals->srelgot->reloc_count * RELOC_SIZE (globals);
+ }
+
+ if (tls_type & GOT_TLS_GD)
+ {
+ if (need_relocs)
+ {
+ outrel.r_addend = 0;
+ outrel.r_offset = (globals->sgot->output_section->vma
+ + globals->sgot->output_offset
+ + cur_off);
+ outrel.r_info = ELF32_R_INFO (indx, R_ARM_TLS_DTPMOD32);
+
+ if (globals->use_rel)
+ bfd_put_32 (output_bfd, outrel.r_addend,
+ globals->sgot->contents + cur_off);
+
+ SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+ globals->srelgot->reloc_count++;
+ loc += RELOC_SIZE (globals);
+
+ if (indx == 0)
+ bfd_put_32 (output_bfd, value - dtpoff_base (info),
+ globals->sgot->contents + cur_off + 4);
+ else
+ {
+ outrel.r_addend = 0;
+ outrel.r_info = ELF32_R_INFO (indx,
+ R_ARM_TLS_DTPOFF32);
+ outrel.r_offset += 4;
+
+ if (globals->use_rel)
+ bfd_put_32 (output_bfd, outrel.r_addend,
+ globals->sgot->contents + cur_off + 4);
+
+
+ SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+ globals->srelgot->reloc_count++;
+ loc += RELOC_SIZE (globals);
+ }
+ }
+ else
+ {
+ /* If we are not emitting relocations for a
+ general dynamic reference, then we must be in a
+ static link or an executable link with the
+ symbol binding locally. Mark it as belonging
+ to module 1, the executable. */
+ bfd_put_32 (output_bfd, 1,
+ globals->sgot->contents + cur_off);
+ bfd_put_32 (output_bfd, value - dtpoff_base (info),
+ globals->sgot->contents + cur_off + 4);
+ }
+
+ cur_off += 8;
+ }
+
+ if (tls_type & GOT_TLS_IE)
+ {
+ if (need_relocs)
+ {
+ if (indx == 0)
+ outrel.r_addend = value - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ outrel.r_offset = (globals->sgot->output_section->vma
+ + globals->sgot->output_offset
+ + cur_off);
+ outrel.r_info = ELF32_R_INFO (indx, R_ARM_TLS_TPOFF32);
+
+ if (globals->use_rel)
+ bfd_put_32 (output_bfd, outrel.r_addend,
+ globals->sgot->contents + cur_off);
+
+ SWAP_RELOC_OUT (globals) (output_bfd, &outrel, loc);
+ globals->srelgot->reloc_count++;
+ loc += RELOC_SIZE (globals);
+ }
+ else
+ bfd_put_32 (output_bfd, tpoff (info, value),
+ globals->sgot->contents + cur_off);
+ cur_off += 4;
+ }
+
+ if (h != NULL)
+ h->got.offset |= 1;
+ else
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ if ((tls_type & GOT_TLS_GD) && r_type != R_ARM_TLS_GD32)
+ off += 8;
+ value = globals->sgot->output_section->vma + globals->sgot->output_offset + off
+ - (input_section->output_section->vma + input_section->output_offset + rel->r_offset);
+
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ rel->r_addend);
+ }
+
+ case R_ARM_TLS_LE32:
+ if (info->shared)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"),
+ input_bfd, input_section,
+ (long) rel->r_offset, howto->name);
+ return FALSE;
+ }
+ else
+ value = tpoff (info, value);
+
+ return _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset, value,
+ rel->r_addend);
+
+ case R_ARM_V4BX:
+ if (globals->fix_v4bx)
+ {
+ bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
+
+ /* Ensure that we have a BX instruction. */
+ BFD_ASSERT ((insn & 0x0ffffff0) == 0x012fff10);
+
+ /* Preserve Rm (lowest four bits) and the condition code
+ (highest four bits). Other bits encode MOV PC,Rm. */
+ insn = (insn & 0xf000000f) | 0x01a0f000;
+
+ bfd_put_32 (input_bfd, insn, hit_data);
+ }
+ return bfd_reloc_ok;
+
+ default:
+ return bfd_reloc_notsupported;
+ }
+}
+
+
+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 (aeabi_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
+eabi_attr_size(int tag, aeabi_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;
+}
+
+/* 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;
+
+ 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]);
+
+ for (list = elf32_arm_tdata (abfd)->other_eabi_attributes;
+ list;
+ list = list->next)
+ size += eabi_attr_size (list->tag, &list->attr);
+
+ return size;
+}
+
+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_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;
+
+ len = strlen (attr->s) + 1;
+ memcpy (p, attr->s, len);
+ p += len;
+ }
+
+ return p;
+}
+
+/* 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;
+
+ 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);
+}
+
+/* Override final_link to handle EABI object attribute sections. */
+
+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;
+
+ 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);
+ }
+ return TRUE;
+}
+
+
+/* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS. */
+static void
+arm_add_to_rel (bfd * abfd,
+ bfd_byte * address,
+ reloc_howto_type * howto,
+ bfd_signed_vma increment)
+{
+ bfd_signed_vma addend;
+
+ if (howto->type == R_ARM_THM_CALL)
+ {
+ int upper_insn, lower_insn;
+ int upper, lower;
+
+ upper_insn = bfd_get_16 (abfd, address);
+ lower_insn = bfd_get_16 (abfd, address + 2);
+ upper = upper_insn & 0x7ff;
+ lower = lower_insn & 0x7ff;
+
+ addend = (upper << 12) | (lower << 1);
+ addend += increment;
+ addend >>= 1;
+
+ upper_insn = (upper_insn & 0xf800) | ((addend >> 11) & 0x7ff);
+ lower_insn = (lower_insn & 0xf800) | (addend & 0x7ff);
+
+ bfd_put_16 (abfd, (bfd_vma) upper_insn, address);
+ bfd_put_16 (abfd, (bfd_vma) lower_insn, address + 2);
+ }
+ else
+ {
+ bfd_vma contents;
+
+ contents = bfd_get_32 (abfd, address);
+
+ /* Get the (signed) value from the instruction. */
+ addend = contents & howto->src_mask;
+ if (addend & ((howto->src_mask + 1) >> 1))
+ {
+ bfd_signed_vma mask;
+
+ mask = -1;
+ mask &= ~ howto->src_mask;
+ addend |= mask;
+ }
+
+ /* Add in the increment, (which is a byte value). */
+ switch (howto->type)
+ {
+ default:
+ addend += increment;
+ break;
+
+ case R_ARM_PC24:
+ case R_ARM_PLT32:
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
+ addend <<= howto->size;
+ addend += increment;
+
+ /* Should we check for overflow here ? */
+
+ /* Drop any undesired bits. */
+ addend >>= howto->rightshift;
+ break;
+ }
+
+ contents = (contents & ~ howto->dst_mask) | (addend & howto->dst_mask);
+
+ bfd_put_32 (abfd, contents, address);
+ }
+}
+
+#define IS_ARM_TLS_RELOC(R_TYPE) \
+ ((R_TYPE) == R_ARM_TLS_GD32 \
+ || (R_TYPE) == R_ARM_TLS_LDO32 \
+ || (R_TYPE) == R_ARM_TLS_LDM32 \
+ || (R_TYPE) == R_ARM_TLS_DTPOFF32 \
+ || (R_TYPE) == R_ARM_TLS_DTPMOD32 \
+ || (R_TYPE) == R_ARM_TLS_TPOFF32 \
+ || (R_TYPE) == R_ARM_TLS_LE32 \
+ || (R_TYPE) == R_ARM_TLS_IE32)
+
+/* Relocate an ARM ELF section. */
+static bfd_boolean
+elf32_arm_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;
+ 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);
+
+ rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+ reloc_howto_type * howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym * sym;
+ asection * sec;
+ struct elf_link_hash_entry * h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+ arelent bfd_reloc;
+ char sym_type;
+ bfd_boolean unresolved_reloc = FALSE;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+ r_type = arm_real_reloc_type (globals, r_type);
+
+ if ( r_type == R_ARM_GNU_VTENTRY
+ || r_type == R_ARM_GNU_VTINHERIT)
+ continue;
+
+ 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;
+
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sym_type = ELF32_ST_TYPE (sym->st_info);
+ sec = local_sections[r_symndx];
+ if (globals->use_rel)
+ {
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+ if ((sec->flags & SEC_MERGE)
+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ asection *msec;
+ bfd_vma addend, value;
+
+ if (howto->rightshift)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
+ input_bfd, input_section,
+ (long) rel->r_offset, howto->name);
+ return FALSE;
+ }
+
+ value = bfd_get_32 (input_bfd, contents + rel->r_offset);
+
+ /* Get the (signed) value from the instruction. */
+ addend = value & howto->src_mask;
+ if (addend & ((howto->src_mask + 1) >> 1))
+ {
+ bfd_signed_vma mask;
+
+ mask = -1;
+ mask &= ~ howto->src_mask;
+ addend |= mask;
+ }
+ msec = sec;
+ addend =
+ _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend)
+ - relocation;
+ addend += msec->output_section->vma + msec->output_offset;
+ value = (value & ~ howto->dst_mask) | (addend & howto->dst_mask);
+ bfd_put_32 (input_bfd, value, contents + rel->r_offset);
+ }
+ }
+ else
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
+ }
+ else
+ {
+ bfd_boolean warned;
+
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
+
+ sym_type = h->type;
+ }
+
+ 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);
+ }
+
+ if (r_symndx != 0
+ && r_type != R_ARM_NONE
+ && (h == NULL
+ || h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && IS_ARM_TLS_RELOC (r_type) != (sym_type == STT_TLS))
+ {
+ (*_bfd_error_handler)
+ ((sym_type == STT_TLS
+ ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+ : _("%B(%A+0x%lx): %s used with non-TLS symbol %s")),
+ input_bfd,
+ input_section,
+ (long) rel->r_offset,
+ howto->name,
+ name);
+ }
+
+ r = elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
+ input_section, contents, rel,
+ relocation, info, sec, name,
+ (h ? ELF_ST_TYPE (h->type) :
+ ELF_ST_TYPE (sym->st_info)), h,
+ &unresolved_reloc);
+
+ /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+ because such sections are not SEC_ALLOC and thus ld.so will
+ not process them. */
+ if (unresolved_reloc
+ && !((input_section->flags & SEC_DEBUGGING) != 0
+ && h->def_dynamic))
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
+ (long) rel->r_offset,
+ howto->name,
+ h->root.root.string);
+ return FALSE;
+ }
+
+ 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.type != bfd_link_hash_undefined)
+ && (!((*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;
+}
+
+/* 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
+elf32_arm_object_p (bfd *abfd)
+{
+ unsigned int mach;
+
+ mach = bfd_arm_get_mach_from_notes (abfd, ARM_NOTE_SECTION);
+
+ if (mach != bfd_mach_arm_unknown)
+ bfd_default_set_arch_mach (abfd, bfd_arch_arm, mach);
+
+ else if (elf_elfheader (abfd)->e_flags & EF_ARM_MAVERICK_FLOAT)
+ bfd_default_set_arch_mach (abfd, bfd_arch_arm, bfd_mach_arm_ep9312);
+
+ else
+ bfd_default_set_arch_mach (abfd, bfd_arch_arm, mach);
+
+ return TRUE;
+}
+
+/* Function to keep ARM specific flags in the ELF header. */
+
+static bfd_boolean
+elf32_arm_set_private_flags (bfd *abfd, flagword flags)
+{
+ if (elf_flags_init (abfd)
+ && elf_elfheader (abfd)->e_flags != flags)
+ {
+ if (EF_ARM_EABI_VERSION (flags) == EF_ARM_EABI_UNKNOWN)
+ {
+ if (flags & EF_ARM_INTERWORK)
+ (*_bfd_error_handler)
+ (_("Warning: Not setting interworking flag of %B since it has already been specified as non-interworking"),
+ abfd);
+ else
+ _bfd_error_handler
+ (_("Warning: Clearing the interworking flag of %B due to outside request"),
+ abfd);
+ }
+ }
+ else
+ {
+ elf_elfheader (abfd)->e_flags = flags;
+ elf_flags_init (abfd) = TRUE;
+ }
+
+ 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
+elf32_arm_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
+{
+ flagword in_flags;
+ flagword out_flags;
+
+ if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ in_flags = elf_elfheader (ibfd)->e_flags;
+ out_flags = elf_elfheader (obfd)->e_flags;
+
+ if (elf_flags_init (obfd)
+ && EF_ARM_EABI_VERSION (out_flags) == EF_ARM_EABI_UNKNOWN
+ && in_flags != out_flags)
+ {
+ /* Cannot mix APCS26 and APCS32 code. */
+ if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
+ return FALSE;
+
+ /* Cannot mix float APCS and non-float APCS code. */
+ if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT))
+ return FALSE;
+
+ /* If the src and dest have different interworking flags
+ then turn off the interworking bit. */
+ if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
+ {
+ if (out_flags & EF_ARM_INTERWORK)
+ _bfd_error_handler
+ (_("Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it"),
+ obfd, ibfd);
+
+ in_flags &= ~EF_ARM_INTERWORK;
+ }
+
+ /* Likewise for PIC, though don't warn for this case. */
+ if ((in_flags & EF_ARM_PIC) != (out_flags & EF_ARM_PIC))
+ in_flags &= ~EF_ARM_PIC;
+ }
+
+ elf_elfheader (obfd)->e_flags = in_flags;
+ elf_flags_init (obfd) = TRUE;
+
+ /* Also copy the EI_OSABI field. */
+ elf_elfheader (obfd)->e_ident[EI_OSABI] =
+ elf_elfheader (ibfd)->e_ident[EI_OSABI];
+
+ /* Copy EABI object attributes. */
+ copy_eabi_attributes (ibfd, obfd);
+
+ return TRUE;
+}
+
+/* Values for Tag_ABI_PCS_R9_use. */
+enum
+{
+ AEABI_R9_V6,
+ AEABI_R9_SB,
+ AEABI_R9_TLS,
+ AEABI_R9_unused
+};
+
+/* Values for Tag_ABI_PCS_RW_data. */
+enum
+{
+ AEABI_PCS_RW_data_absolute,
+ AEABI_PCS_RW_data_PCrel,
+ AEABI_PCS_RW_data_SBrel,
+ AEABI_PCS_RW_data_unused
+};
+
+/* Values for Tag_ABI_enum_size. */
+enum
+{
+ AEABI_enum_unused,
+ AEABI_enum_short,
+ AEABI_enum_wide,
+ AEABI_enum_forced_wide
+};
+
+/* 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;
+ /* 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)
+ {
+ /* This is the first object. Copy the attributes. */
+ copy_eabi_attributes (ibfd, obfd);
+ 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;
+ /* 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)
+ {
+ /* Ignore mismatches if teh object doesn't use floating point. */
+ if (out_attr[Tag_ABI_FP_number_model].i == 0)
+ out_attr[Tag_ABI_VFP_args].i = in_attr[Tag_ABI_VFP_args].i;
+ else if (in_attr[Tag_ABI_FP_number_model].i != 0)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B uses VFP register arguments, %B does not"),
+ ibfd, obfd);
+ return FALSE;
+ }
+ }
+
+ for (i = 4; i < NUM_KNOWN_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);
+ break;
+
+ case Tag_ABI_optimization_goals:
+ case Tag_ABI_FP_optimization_goals:
+ /* Use the first value seen. */
+ break;
+
+ case Tag_CPU_arch:
+ case Tag_ARM_ISA_use:
+ case Tag_THUMB_ISA_use:
+ case Tag_VFP_arch:
+ case Tag_WMMX_arch:
+ case Tag_NEON_arch:
+ /* ??? Do NEON and WMMX conflict? */
+ case Tag_ABI_FP_rounding:
+ case Tag_ABI_FP_denormal:
+ case Tag_ABI_FP_exceptions:
+ case Tag_ABI_FP_user_exceptions:
+ case Tag_ABI_FP_number_model:
+ case Tag_ABI_align8_preserved:
+ case Tag_ABI_HardFP_use:
+ /* Use the largest value specified. */
+ if (in_attr[i].i > out_attr[i].i)
+ out_attr[i].i = in_attr[i].i;
+ break;
+
+ case Tag_CPU_arch_profile:
+ /* Warn if conflicting architecture profiles used. */
+ if (out_attr[i].i && in_attr[i].i && in_attr[i].i != out_attr[i].i)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B: Conflicting architecture profiles %c/%c"),
+ ibfd, in_attr[i].i, out_attr[i].i);
+ return FALSE;
+ }
+ if (in_attr[i].i)
+ out_attr[i].i = in_attr[i].i;
+ break;
+ case Tag_PCS_config:
+ if (out_attr[i].i == 0)
+ out_attr[i].i = in_attr[i].i;
+ else if (in_attr[i].i != 0 && out_attr[i].i != 0)
+ {
+ /* It's sometimes ok to mix different configs, so this is only
+ a warning. */
+ _bfd_error_handler
+ (_("Warning: %B: Conflicting platform configuration"), ibfd);
+ }
+ break;
+ case Tag_ABI_PCS_R9_use:
+ if (out_attr[i].i != AEABI_R9_unused
+ && in_attr[i].i != AEABI_R9_unused)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B: Conflicting use of R9"), ibfd);
+ return FALSE;
+ }
+ if (out_attr[i].i == AEABI_R9_unused)
+ out_attr[i].i = in_attr[i].i;
+ break;
+ case Tag_ABI_PCS_RW_data:
+ if (in_attr[i].i == AEABI_PCS_RW_data_SBrel
+ && out_attr[Tag_ABI_PCS_R9_use].i != AEABI_R9_SB
+ && out_attr[Tag_ABI_PCS_R9_use].i != AEABI_R9_unused)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B: SB relative addressing conflicts with use of R9"),
+ ibfd);
+ return FALSE;
+ }
+ /* Use the smallest value specified. */
+ if (in_attr[i].i < out_attr[i].i)
+ out_attr[i].i = in_attr[i].i;
+ break;
+ case Tag_ABI_PCS_RO_data:
+ /* Use the smallest value specified. */
+ if (in_attr[i].i < out_attr[i].i)
+ out_attr[i].i = in_attr[i].i;
+ break;
+ case Tag_ABI_PCS_GOT_use:
+ if (in_attr[i].i > 2 || out_attr[i].i > 2
+ || order_312[in_attr[i].i] < order_312[out_attr[i].i])
+ out_attr[i].i = in_attr[i].i;
+ break;
+ case Tag_ABI_PCS_wchar_t:
+ if (out_attr[i].i && in_attr[i].i && out_attr[i].i != in_attr[i].i)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B: Conflicting definitions of wchar_t"), ibfd);
+ return FALSE;
+ }
+ if (in_attr[i].i)
+ out_attr[i].i = in_attr[i].i;
+ break;
+ case Tag_ABI_align8_needed:
+ /* ??? Check against Tag_ABI_align8_preserved. */
+ if (in_attr[i].i > 2 || out_attr[i].i > 2
+ || order_312[in_attr[i].i] < order_312[out_attr[i].i])
+ out_attr[i].i = in_attr[i].i;
+ break;
+ case Tag_ABI_enum_size:
+ if (in_attr[i].i != AEABI_enum_unused)
+ {
+ if (out_attr[i].i == AEABI_enum_unused
+ || out_attr[i].i == AEABI_enum_forced_wide)
+ {
+ /* The existing object is compatible with anything.
+ Use whatever requirements the new object has. */
+ 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)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B: Conflicting enum sizes"), ibfd);
+ }
+ }
+ break;
+ case Tag_ABI_VFP_args:
+ /* Aready done. */
+ break;
+ case Tag_ABI_WMMX_args:
+ if (in_attr[i].i != out_attr[i].i)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B uses iWMMXt register arguments, %B does not"),
+ ibfd, obfd);
+ return FALSE;
+ }
+ break;
+ default: /* All known attributes should be explicitly covered. */
+ abort ();
+ }
+ }
+
+ 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;
+ }
+
+ /* 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;
+ }
+ }
+
+ for (; in_list; in_list = in_list->next)
+ {
+ if ((in_list->tag & 128) < 64)
+ {
+ _bfd_error_handler
+ (_("Warning: %B: Unknown EABI object attribute %d"),
+ ibfd, in_list->tag);
+ break;
+ }
+ }
+ return TRUE;
+}
+
+
+/* Return TRUE if the two EABI versions are incompatible. */
+
+static bfd_boolean
+elf32_arm_versions_compatible (unsigned iver, unsigned over)
+{
+ /* v4 and v5 are the same spec before and after it was released,
+ so allow mixing them. */
+ if ((iver == EF_ARM_EABI_VER4 && over == EF_ARM_EABI_VER5)
+ || (iver == EF_ARM_EABI_VER5 && over == EF_ARM_EABI_VER4))
+ return TRUE;
+
+ return (iver == over);
+}
+
+/* Merge backend specific data from an object file to the output
+ object file when linking. */
+
+static bfd_boolean
+elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+{
+ flagword out_flags;
+ flagword in_flags;
+ bfd_boolean flags_compatible = TRUE;
+ asection *sec;
+
+ /* Check if we have the same endianess. */
+ if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ return FALSE;
+
+ if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ if (!elf32_arm_merge_eabi_attributes (ibfd, obfd))
+ return FALSE;
+
+ /* The input BFD must have had its flags initialised. */
+ /* The following seems bogus to me -- The flags are initialized in
+ the assembler but I don't think an elf_flags_init field is
+ written into the object. */
+ /* BFD_ASSERT (elf_flags_init (ibfd)); */
+
+ in_flags = elf_elfheader (ibfd)->e_flags;
+ out_flags = elf_elfheader (obfd)->e_flags;
+
+ if (!elf_flags_init (obfd))
+ {
+ /* If the input is the default architecture and had the default
+ flags then do not bother setting the flags for the output
+ architecture, instead allow future merges to do this. If no
+ future merges ever set these flags then they will retain their
+ uninitialised values, which surprise surprise, correspond
+ to the default values. */
+ if (bfd_get_arch_info (ibfd)->the_default
+ && elf_elfheader (ibfd)->e_flags == 0)
+ return TRUE;
+
+ elf_flags_init (obfd) = TRUE;
+ elf_elfheader (obfd)->e_flags = in_flags;
+
+ if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
+ && bfd_get_arch_info (obfd)->the_default)
+ return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd));
+
+ return TRUE;
+ }
+
+ /* Determine what should happen if the input ARM architecture
+ does not match the output ARM architecture. */
+ if (! bfd_arm_merge_machines (ibfd, obfd))
+ return FALSE;
+
+ /* Identical flags must be compatible. */
+ if (in_flags == out_flags)
+ return TRUE;
+
+ /* Check to see if the input BFD actually contains any sections. If
+ not, its flags may not have been initialised either, but it
+ cannot actually cause any incompatiblity. Do not short-circuit
+ dynamic objects; their section list may be emptied by
+ elf_link_add_object_symbols.
+
+ Also check to see if there are no code sections in the input.
+ In this case there is no need to check for code specific flags.
+ XXX - do we need to worry about floating-point format compatability
+ in data sections ? */
+ if (!(ibfd->flags & DYNAMIC))
+ {
+ bfd_boolean null_input_bfd = TRUE;
+ bfd_boolean only_data_sections = TRUE;
+
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ /* Ignore synthetic glue sections. */
+ if (strcmp (sec->name, ".glue_7")
+ && strcmp (sec->name, ".glue_7t"))
+ {
+ if ((bfd_get_section_flags (ibfd, sec)
+ & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
+ == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
+ only_data_sections = FALSE;
+
+ null_input_bfd = FALSE;
+ break;
+ }
+ }
+
+ if (null_input_bfd || only_data_sections)
+ return TRUE;
+ }
+
+ /* Complain about various flag mismatches. */
+ if (!elf32_arm_versions_compatible (EF_ARM_EABI_VERSION (in_flags),
+ EF_ARM_EABI_VERSION (out_flags)))
+ {
+ _bfd_error_handler
+ (_("ERROR: Source object %B has EABI version %d, but target %B has EABI version %d"),
+ ibfd, obfd,
+ (in_flags & EF_ARM_EABIMASK) >> 24,
+ (out_flags & EF_ARM_EABIMASK) >> 24);
+ return FALSE;
+ }
+
+ /* Not sure what needs to be checked for EABI versions >= 1. */
+ /* VxWorks libraries do not use these flags. */
+ if (get_elf_backend_data (obfd) != &elf32_arm_vxworks_bed
+ && get_elf_backend_data (ibfd) != &elf32_arm_vxworks_bed
+ && EF_ARM_EABI_VERSION (in_flags) == EF_ARM_EABI_UNKNOWN)
+ {
+ if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
+ {
+ _bfd_error_handler
+ (_("ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"),
+ ibfd, obfd,
+ in_flags & EF_ARM_APCS_26 ? 26 : 32,
+ out_flags & EF_ARM_APCS_26 ? 26 : 32);
+ flags_compatible = FALSE;
+ }
+
+ if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT))
+ {
+ if (in_flags & EF_ARM_APCS_FLOAT)
+ _bfd_error_handler
+ (_("ERROR: %B passes floats in float registers, whereas %B passes them in integer registers"),
+ ibfd, obfd);
+ else
+ _bfd_error_handler
+ (_("ERROR: %B passes floats in integer registers, whereas %B passes them in float registers"),
+ ibfd, obfd);
+
+ flags_compatible = FALSE;
+ }
+
+ if ((in_flags & EF_ARM_VFP_FLOAT) != (out_flags & EF_ARM_VFP_FLOAT))
+ {
+ if (in_flags & EF_ARM_VFP_FLOAT)
+ _bfd_error_handler
+ (_("ERROR: %B uses VFP instructions, whereas %B does not"),
+ ibfd, obfd);
+ else
+ _bfd_error_handler
+ (_("ERROR: %B uses FPA instructions, whereas %B does not"),
+ ibfd, obfd);
+
+ flags_compatible = FALSE;
+ }
+
+ if ((in_flags & EF_ARM_MAVERICK_FLOAT) != (out_flags & EF_ARM_MAVERICK_FLOAT))
+ {
+ if (in_flags & EF_ARM_MAVERICK_FLOAT)
+ _bfd_error_handler
+ (_("ERROR: %B uses Maverick instructions, whereas %B does not"),
+ ibfd, obfd);
+ else
+ _bfd_error_handler
+ (_("ERROR: %B does not use Maverick instructions, whereas %B does"),
+ ibfd, obfd);
+
+ flags_compatible = FALSE;
+ }
+
+#ifdef EF_ARM_SOFT_FLOAT
+ if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT))
+ {
+ /* We can allow interworking between code that is VFP format
+ layout, and uses either soft float or integer regs for
+ passing floating point arguments and results. We already
+ know that the APCS_FLOAT flags match; similarly for VFP
+ flags. */
+ if ((in_flags & EF_ARM_APCS_FLOAT) != 0
+ || (in_flags & EF_ARM_VFP_FLOAT) == 0)
+ {
+ if (in_flags & EF_ARM_SOFT_FLOAT)
+ _bfd_error_handler
+ (_("ERROR: %B uses software FP, whereas %B uses hardware FP"),
+ ibfd, obfd);
+ else
+ _bfd_error_handler
+ (_("ERROR: %B uses hardware FP, whereas %B uses software FP"),
+ ibfd, obfd);
+
+ flags_compatible = FALSE;
+ }
+ }
+#endif
+
+ /* Interworking mismatch is only a warning. */
+ if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
+ {
+ if (in_flags & EF_ARM_INTERWORK)
+ {
+ _bfd_error_handler
+ (_("Warning: %B supports interworking, whereas %B does not"),
+ ibfd, obfd);
+ }
+ else
+ {
+ _bfd_error_handler
+ (_("Warning: %B does not support interworking, whereas %B does"),
+ ibfd, obfd);
+ }
+ }
+ }
+
+ return flags_compatible;
+}
+
+/* Display the flags field. */
+
+static bfd_boolean
+elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr)
+{
+ FILE * file = (FILE *) ptr;
+ unsigned long flags;
+
+ BFD_ASSERT (abfd != NULL && ptr != NULL);
+
+ /* Print normal ELF private data. */
+ _bfd_elf_print_private_bfd_data (abfd, ptr);
+
+ flags = elf_elfheader (abfd)->e_flags;
+ /* Ignore init flag - it may not be set, despite the flags field
+ containing valid data. */
+
+ /* xgettext:c-format */
+ fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
+
+ switch (EF_ARM_EABI_VERSION (flags))
+ {
+ case EF_ARM_EABI_UNKNOWN:
+ /* The following flag bits are GNU extensions and not part of the
+ official ARM ELF extended ABI. Hence they are only decoded if
+ the EABI version is not set. */
+ if (flags & EF_ARM_INTERWORK)
+ fprintf (file, _(" [interworking enabled]"));
+
+ if (flags & EF_ARM_APCS_26)
+ fprintf (file, " [APCS-26]");
+ else
+ fprintf (file, " [APCS-32]");
+
+ if (flags & EF_ARM_VFP_FLOAT)
+ fprintf (file, _(" [VFP float format]"));
+ else if (flags & EF_ARM_MAVERICK_FLOAT)
+ fprintf (file, _(" [Maverick float format]"));
+ else
+ fprintf (file, _(" [FPA float format]"));
+
+ if (flags & EF_ARM_APCS_FLOAT)
+ fprintf (file, _(" [floats passed in float registers]"));
+
+ if (flags & EF_ARM_PIC)
+ fprintf (file, _(" [position independent]"));
+
+ if (flags & EF_ARM_NEW_ABI)
+ fprintf (file, _(" [new ABI]"));
+
+ if (flags & EF_ARM_OLD_ABI)
+ fprintf (file, _(" [old ABI]"));
+
+ if (flags & EF_ARM_SOFT_FLOAT)
+ fprintf (file, _(" [software FP]"));
+
+ flags &= ~(EF_ARM_INTERWORK | EF_ARM_APCS_26 | EF_ARM_APCS_FLOAT
+ | EF_ARM_PIC | EF_ARM_NEW_ABI | EF_ARM_OLD_ABI
+ | EF_ARM_SOFT_FLOAT | EF_ARM_VFP_FLOAT
+ | EF_ARM_MAVERICK_FLOAT);
+ break;
+
+ case EF_ARM_EABI_VER1:
+ fprintf (file, _(" [Version1 EABI]"));
+
+ if (flags & EF_ARM_SYMSARESORTED)
+ fprintf (file, _(" [sorted symbol table]"));
+ else
+ fprintf (file, _(" [unsorted symbol table]"));
+
+ flags &= ~ EF_ARM_SYMSARESORTED;
+ break;
+
+ case EF_ARM_EABI_VER2:
+ fprintf (file, _(" [Version2 EABI]"));
+
+ if (flags & EF_ARM_SYMSARESORTED)
+ fprintf (file, _(" [sorted symbol table]"));
+ else
+ fprintf (file, _(" [unsorted symbol table]"));
+
+ if (flags & EF_ARM_DYNSYMSUSESEGIDX)
+ fprintf (file, _(" [dynamic symbols use segment index]"));
+
+ if (flags & EF_ARM_MAPSYMSFIRST)
+ fprintf (file, _(" [mapping symbols precede others]"));
+
+ flags &= ~(EF_ARM_SYMSARESORTED | EF_ARM_DYNSYMSUSESEGIDX
+ | EF_ARM_MAPSYMSFIRST);
+ break;
+
+ case EF_ARM_EABI_VER3:
+ fprintf (file, _(" [Version3 EABI]"));
+ break;
+
+ case EF_ARM_EABI_VER4:
+ fprintf (file, _(" [Version4 EABI]"));
+ goto eabi;
+
+ case EF_ARM_EABI_VER5:
+ fprintf (file, _(" [Version5 EABI]"));
+ eabi:
+ if (flags & EF_ARM_BE8)
+ fprintf (file, _(" [BE8]"));
+
+ if (flags & EF_ARM_LE8)
+ fprintf (file, _(" [LE8]"));
+
+ flags &= ~(EF_ARM_LE8 | EF_ARM_BE8);
+ break;
+
+ default:
+ fprintf (file, _(" <EABI version unrecognised>"));
+ break;
+ }
+
+ flags &= ~ EF_ARM_EABIMASK;
+
+ if (flags & EF_ARM_RELEXEC)
+ fprintf (file, _(" [relocatable executable]"));
+
+ if (flags & EF_ARM_HASENTRY)
+ fprintf (file, _(" [has entry point]"));
+
+ flags &= ~ (EF_ARM_RELEXEC | EF_ARM_HASENTRY);
+
+ if (flags)
+ fprintf (file, _("<Unrecognised flag bits set>"));
+
+ fputc ('\n', file);
+
+ return TRUE;
+}
+
+static int
+elf32_arm_get_symbol_type (Elf_Internal_Sym * elf_sym, int type)
+{
+ switch (ELF_ST_TYPE (elf_sym->st_info))
+ {
+ case STT_ARM_TFUNC:
+ return ELF_ST_TYPE (elf_sym->st_info);
+
+ case STT_ARM_16BIT:
+ /* If the symbol is not an object, return the STT_ARM_16BIT flag.
+ This allows us to distinguish between data used by Thumb instructions
+ and non-data (which is probably code) inside Thumb regions of an
+ executable. */
+ if (type != STT_OBJECT && type != STT_TLS)
+ return ELF_ST_TYPE (elf_sym->st_info);
+ break;
+
+ default:
+ break;
+ }
+
+ return 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)
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_ARM_GNU_VTINHERIT:
+ case R_ARM_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ 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
+elf32_arm_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;
+ bfd_signed_vma *local_got_refcounts;
+ const Elf_Internal_Rela *rel, *relend;
+ struct elf32_arm_link_hash_table * globals;
+
+ globals = elf32_arm_hash_table (info);
+
+ elf_section_data (sec)->local_dynrel = NULL;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ {
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h = NULL;
+ int r_type;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ 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;
+ }
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+ r_type = arm_real_reloc_type (globals, r_type);
+ switch (r_type)
+ {
+ case R_ARM_GOT32:
+ case R_ARM_GOT_PREL:
+ case R_ARM_TLS_GD32:
+ case R_ARM_TLS_IE32:
+ if (h != NULL)
+ {
+ if (h->got.refcount > 0)
+ h->got.refcount -= 1;
+ }
+ else if (local_got_refcounts != NULL)
+ {
+ if (local_got_refcounts[r_symndx] > 0)
+ local_got_refcounts[r_symndx] -= 1;
+ }
+ break;
+
+ case R_ARM_TLS_LDM32:
+ elf32_arm_hash_table (info)->tls_ldm_got.refcount -= 1;
+ break;
+
+ case R_ARM_ABS32:
+ case R_ARM_REL32:
+ 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:
+ /* Should the interworking branches be here also? */
+
+ if (h != NULL)
+ {
+ struct elf32_arm_link_hash_entry *eh;
+ struct elf32_arm_relocs_copied **pp;
+ struct elf32_arm_relocs_copied *p;
+
+ eh = (struct elf32_arm_link_hash_entry *) h;
+
+ if (h->plt.refcount > 0)
+ {
+ h->plt.refcount -= 1;
+ if (ELF32_R_TYPE (rel->r_info) == R_ARM_THM_CALL)
+ eh->plt_thumb_refcount--;
+ }
+
+ if (r_type == R_ARM_ABS32
+ || r_type == R_ARM_REL32)
+ {
+ 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)
+ p->pc_count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return TRUE;
+}
+
+/* Look through the relocs for a section during the first phase. */
+
+static bfd_boolean
+elf32_arm_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;
+ bfd *dynobj;
+ asection *sreloc;
+ bfd_vma *local_got_offsets;
+ struct elf32_arm_link_hash_table *htab;
+
+ if (info->relocatable)
+ return TRUE;
+
+ htab = elf32_arm_hash_table (info);
+ sreloc = NULL;
+
+ /* Create dynamic sections for relocatable executables so that we can
+ copy relocations. */
+ if (htab->root.is_relocatable_executable
+ && ! htab->root.dynamic_sections_created)
+ {
+ if (! _bfd_elf_link_create_dynamic_sections (abfd, info))
+ return FALSE;
+ }
+
+ dynobj = elf_hash_table (info)->dynobj;
+ local_got_offsets = elf_local_got_offsets (abfd);
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ sym_hashes_end = sym_hashes
+ + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
+
+ if (!elf_bad_symtab (abfd))
+ sym_hashes_end -= symtab_hdr->sh_info;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ struct elf_link_hash_entry *h;
+ struct elf32_arm_link_hash_entry *eh;
+ unsigned long r_symndx;
+ int r_type;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+ r_type = arm_real_reloc_type (htab, r_type);
+
+ if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
+ {
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"), abfd,
+ r_symndx);
+ return FALSE;
+ }
+
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ }
+
+ eh = (struct elf32_arm_link_hash_entry *) h;
+
+ switch (r_type)
+ {
+ case R_ARM_GOT32:
+ case R_ARM_GOT_PREL:
+ case R_ARM_TLS_GD32:
+ case R_ARM_TLS_IE32:
+ /* This symbol requires a global offset table entry. */
+ {
+ int tls_type, old_tls_type;
+
+ switch (r_type)
+ {
+ case R_ARM_TLS_GD32: tls_type = GOT_TLS_GD; break;
+ case R_ARM_TLS_IE32: tls_type = GOT_TLS_IE; break;
+ default: tls_type = GOT_NORMAL; break;
+ }
+
+ if (h != NULL)
+ {
+ h->got.refcount++;
+ old_tls_type = elf32_arm_hash_entry (h)->tls_type;
+ }
+ else
+ {
+ bfd_signed_vma *local_got_refcounts;
+
+ /* This is a global offset table entry for a local symbol. */
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+ if (local_got_refcounts == NULL)
+ {
+ bfd_size_type size;
+
+ size = symtab_hdr->sh_info;
+ size *= (sizeof (bfd_signed_vma) + sizeof(char));
+ local_got_refcounts = bfd_zalloc (abfd, size);
+ if (local_got_refcounts == NULL)
+ return FALSE;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
+ elf32_arm_local_got_tls_type (abfd)
+ = (char *) (local_got_refcounts + symtab_hdr->sh_info);
+ }
+ local_got_refcounts[r_symndx] += 1;
+ old_tls_type = elf32_arm_local_got_tls_type (abfd) [r_symndx];
+ }
+
+ /* We will already have issued an error message if there is a
+ TLS / non-TLS mismatch, based on the symbol type. We don't
+ support any linker relaxations. So just combine any TLS
+ types needed. */
+ if (old_tls_type != GOT_UNKNOWN && old_tls_type != GOT_NORMAL
+ && tls_type != GOT_NORMAL)
+ tls_type |= old_tls_type;
+
+ if (old_tls_type != tls_type)
+ {
+ if (h != NULL)
+ elf32_arm_hash_entry (h)->tls_type = tls_type;
+ else
+ elf32_arm_local_got_tls_type (abfd) [r_symndx] = tls_type;
+ }
+ }
+ /* Fall through */
+
+ case R_ARM_TLS_LDM32:
+ if (r_type == R_ARM_TLS_LDM32)
+ htab->tls_ldm_got.refcount++;
+ /* Fall through */
+
+ case R_ARM_GOTOFF32:
+ case R_ARM_GOTPC:
+ if (htab->sgot == NULL)
+ {
+ if (htab->root.dynobj == NULL)
+ htab->root.dynobj = abfd;
+ if (!create_got_section (htab->root.dynobj, info))
+ return FALSE;
+ }
+ break;
+
+ case R_ARM_ABS12:
+ /* VxWorks uses dynamic R_ARM_ABS12 relocations for
+ ldr __GOTT_INDEX__ offsets. */
+ if (!htab->vxworks_p)
+ break;
+ /* Fall through */
+
+ case R_ARM_ABS32:
+ case R_ARM_REL32:
+ 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:
+ /* Should the interworking branches be listed here? */
+ if (h != NULL)
+ {
+ /* If this reloc is in a read-only section, we might
+ need a copy reloc. We can't check reliably at this
+ stage whether the section is read-only, as input
+ sections have not yet been mapped to output sections.
+ Tentatively set the flag for now, and correct in
+ adjust_dynamic_symbol. */
+ if (!info->shared)
+ h->non_got_ref = 1;
+
+ /* We may need a .plt entry if the function this reloc
+ 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)
+ h->needs_plt = 1;
+
+ /* If we create a PLT entry, this relocation will reference
+ it, even if it's an ABS32 relocation. */
+ h->plt.refcount += 1;
+
+ if (r_type == R_ARM_THM_CALL)
+ eh->plt_thumb_refcount += 1;
+ }
+
+ /* If we are creating a shared library or relocatable executable,
+ and this is a reloc against a global symbol, or a non PC
+ relative reloc against a local symbol, then we need to copy
+ the reloc into the shared library. However, if we are linking
+ with -Bsymbolic, we do not need to copy a reloc against a
+ global symbol which is defined in an object we are
+ including in the link (i.e., DEF_REGULAR is set). At
+ this point we have not seen all the input files, so it is
+ possible that DEF_REGULAR is not set now but will be set
+ later (it is never cleared). We account for that
+ possibility below by storing information in the
+ 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
+ || (h != NULL && ! h->needs_plt
+ && (! info->symbolic || ! h->def_regular))))
+ {
+ struct elf32_arm_relocs_copied *p, **head;
+
+ /* When creating a shared object, we must copy these
+ reloc types into the output file. We create a reloc
+ section in dynobj and make room for this reloc. */
+ if (sreloc == NULL)
+ {
+ const char * name;
+
+ name = (bfd_elf_string_from_elf_section
+ (abfd,
+ elf_elfheader (abfd)->e_shstrndx,
+ elf_section_data (sec)->rel_hdr.sh_name));
+ if (name == NULL)
+ return FALSE;
+
+ BFD_ASSERT (reloc_section_p (htab, name, sec));
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ if (sreloc == NULL)
+ {
+ flagword flags;
+
+ flags = (SEC_HAS_CONTENTS | SEC_READONLY
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ if ((sec->flags & SEC_ALLOC) != 0
+ /* BPABI objects never have dynamic
+ relocations mapped. */
+ && !htab->symbian_p)
+ flags |= SEC_ALLOC | SEC_LOAD;
+ sreloc = bfd_make_section_with_flags (dynobj,
+ name,
+ flags);
+ if (sreloc == NULL
+ || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+ return FALSE;
+ }
+
+ elf_section_data (sec)->sreloc = sreloc;
+ }
+
+ /* If this is a global symbol, we count the number of
+ relocations we need for this symbol. */
+ if (h != NULL)
+ {
+ head = &((struct elf32_arm_link_hash_entry *) h)->relocs_copied;
+ }
+ else
+ {
+ /* Track dynamic relocs needed for local syms too.
+ We really need local syms available to do this
+ easily. Oh well. */
+
+ asection *s;
+ void *vpp;
+
+ s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
+ sec, r_symndx);
+ if (s == NULL)
+ return FALSE;
+
+ vpp = &elf_section_data (s)->local_dynrel;
+ head = (struct elf32_arm_relocs_copied **) vpp;
+ }
+
+ p = *head;
+ if (p == NULL || p->section != sec)
+ {
+ bfd_size_type amt = sizeof *p;
+
+ p = bfd_alloc (htab->root.dynobj, amt);
+ if (p == NULL)
+ return FALSE;
+ p->next = *head;
+ *head = p;
+ p->section = sec;
+ p->count = 0;
+ p->pc_count = 0;
+ }
+
+ if (r_type == R_ARM_REL32)
+ p->pc_count += 1;
+ p->count += 1;
+ }
+ break;
+
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_ARM_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_ARM_GNU_VTENTRY:
+ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+ return FALSE;
+ break;
+ }
+ }
+
+ 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);
+}
+
+/* This is a copy of elf_find_function() from elf.c except that
+ ARM mapping symbols are ignored when looking for function names
+ and STT_ARM_TFUNC is considered to a function type. */
+
+static bfd_boolean
+arm_elf_find_function (bfd * abfd ATTRIBUTE_UNUSED,
+ asection * section,
+ asymbol ** symbols,
+ bfd_vma offset,
+ const char ** filename_ptr,
+ const char ** functionname_ptr)
+{
+ const char * filename = NULL;
+ asymbol * func = NULL;
+ bfd_vma low_func = 0;
+ asymbol ** p;
+
+ for (p = symbols; *p != NULL; p++)
+ {
+ elf_symbol_type *q;
+
+ q = (elf_symbol_type *) *p;
+
+ switch (ELF_ST_TYPE (q->internal_elf_sym.st_info))
+ {
+ default:
+ break;
+ case STT_FILE:
+ filename = bfd_asymbol_name (&q->symbol);
+ break;
+ case STT_FUNC:
+ case STT_ARM_TFUNC:
+ case STT_NOTYPE:
+ /* Skip $a and $t symbols. */
+ if ((q->symbol.flags & BSF_LOCAL)
+ && bfd_is_arm_mapping_symbol_name (q->symbol.name))
+ continue;
+ /* Fall through. */
+ if (bfd_get_section (&q->symbol) == section
+ && q->symbol.value >= low_func
+ && q->symbol.value <= offset)
+ {
+ func = (asymbol *) q;
+ low_func = q->symbol.value;
+ }
+ break;
+ }
+ }
+
+ if (func == NULL)
+ return FALSE;
+
+ if (filename_ptr)
+ *filename_ptr = filename;
+ if (functionname_ptr)
+ *functionname_ptr = bfd_asymbol_name (func);
+
+ return TRUE;
+}
+
+
+/* Find the nearest line to a particular section and offset, for error
+ reporting. This code is a duplicate of the code in elf.c, except
+ that it uses arm_elf_find_function. */
+
+static bfd_boolean
+elf32_arm_find_nearest_line (bfd * abfd,
+ asection * section,
+ asymbol ** symbols,
+ bfd_vma offset,
+ const char ** filename_ptr,
+ const char ** functionname_ptr,
+ unsigned int * line_ptr)
+{
+ bfd_boolean found = FALSE;
+
+ /* We skip _bfd_dwarf1_find_nearest_line since no known ARM toolchain uses it. */
+
+ if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr,
+ line_ptr, 0,
+ & elf_tdata (abfd)->dwarf2_find_line_info))
+ {
+ if (!*functionname_ptr)
+ arm_elf_find_function (abfd, section, symbols, offset,
+ *filename_ptr ? NULL : filename_ptr,
+ functionname_ptr);
+
+ return TRUE;
+ }
+
+ if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
+ & found, filename_ptr,
+ functionname_ptr, line_ptr,
+ & elf_tdata (abfd)->line_info))
+ return FALSE;
+
+ if (found && (*functionname_ptr || *line_ptr))
+ return TRUE;
+
+ if (symbols == NULL)
+ return FALSE;
+
+ if (! arm_elf_find_function (abfd, section, symbols, offset,
+ filename_ptr, functionname_ptr))
+ return FALSE;
+
+ *line_ptr = 0;
+ return TRUE;
+}
+
+static bfd_boolean
+elf32_arm_find_inliner_info (bfd * abfd,
+ const char ** filename_ptr,
+ const char ** functionname_ptr,
+ unsigned int * line_ptr)
+{
+ bfd_boolean found;
+ found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr,
+ functionname_ptr, line_ptr,
+ & elf_tdata (abfd)->dwarf2_find_line_info);
+ return found;
+}
+
+/* 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
+elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
+ struct elf_link_hash_entry * h)
+{
+ bfd * dynobj;
+ asection * s;
+ unsigned int power_of_two;
+ struct elf32_arm_link_hash_entry * eh;
+ struct elf32_arm_link_hash_table *globals;
+
+ globals = elf32_arm_hash_table (info);
+ 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)));
+
+ eh = (struct elf32_arm_link_hash_entry *) h;
+
+ /* If this is a function, put it in the procedure linkage table. We
+ will fill in the contents of the procedure linkage table later,
+ when we know the address of the .got section. */
+ if (h->type == STT_FUNC || h->type == STT_ARM_TFUNC
+ || h->needs_plt)
+ {
+ if (h->plt.refcount <= 0
+ || SYMBOL_CALLS_LOCAL (info, h)
+ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ && h->root.type == bfd_link_hash_undefweak))
+ {
+ /* This case can occur if we saw a PLT32 reloc in an input
+ file, but the symbol was never referred to by a dynamic
+ object, or if all references were garbage collected. In
+ such a case, we don't actually need to build a procedure
+ linkage table, and we can just do a PC24 reloc instead. */
+ h->plt.offset = (bfd_vma) -1;
+ eh->plt_thumb_refcount = 0;
+ h->needs_plt = 0;
+ }
+
+ return TRUE;
+ }
+ else
+ {
+ /* It's possible that we incorrectly decided a .plt reloc was
+ needed for an R_ARM_PC24 or similar reloc to a non-function sym
+ in check_relocs. We can't decide accurately between function
+ and non-function syms in check-relocs; Objects loaded later in
+ the link may change h->type. So fix it now. */
+ h->plt.offset = (bfd_vma) -1;
+ eh->plt_thumb_refcount = 0;
+ }
+
+ /* 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;
+ }
+
+ /* If there are no non-GOT references, we do not need a copy
+ relocation. */
+ if (!h->non_got_ref)
+ return TRUE;
+
+ /* This is a reference to a symbol defined by a dynamic object which
+ is not a function. */
+
+ /* If we are creating a shared library, we must presume that the
+ only references to the symbol are via the global offset table.
+ For such cases we need not do anything here; the relocations will
+ be handled correctly by relocate_section. Relocatable executables
+ can reference data in shared objects directly, so we don't need to
+ do anything here. */
+ if (info->shared || globals->root.is_relocatable_executable)
+ return TRUE;
+
+ if (h->size == 0)
+ {
+ (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+ h->root.root.string);
+ return TRUE;
+ }
+
+ /* We must allocate the symbol in our .dynbss section, which will
+ become part of the .bss section of the executable. There will be
+ an entry for this symbol in the .dynsym section. The dynamic
+ object will contain position independent code, so all references
+ from the dynamic object to this symbol will go through the global
+ offset table. The dynamic linker will use the .dynsym entry to
+ determine the address it must put in the global offset table, so
+ both the dynamic object and the regular object will refer to the
+ same memory location for the variable. */
+ s = bfd_get_section_by_name (dynobj, ".dynbss");
+ BFD_ASSERT (s != NULL);
+
+ /* We must generate a R_ARM_COPY reloc to tell the dynamic linker to
+ copy the initial value out of the dynamic object and into the
+ runtime process image. We need to remember the offset into the
+ .rel(a).bss section we are going to use. */
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ {
+ asection *srel;
+
+ srel = bfd_get_section_by_name (dynobj, RELOC_SECTION (globals, ".bss"));
+ BFD_ASSERT (srel != NULL);
+ srel->size += RELOC_SIZE (globals);
+ 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;
+}
+
+/* Allocate space in .plt, .got and associated reloc sections for
+ dynamic relocs. */
+
+static bfd_boolean
+allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
+{
+ struct bfd_link_info *info;
+ struct elf32_arm_link_hash_table *htab;
+ struct elf32_arm_link_hash_entry *eh;
+ struct elf32_arm_relocs_copied *p;
+
+ eh = (struct elf32_arm_link_hash_entry *) h;
+
+ if (h->root.type == bfd_link_hash_indirect)
+ return TRUE;
+
+ 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;
+
+ info = (struct bfd_link_info *) inf;
+ htab = elf32_arm_hash_table (info);
+
+ if (htab->root.dynamic_sections_created
+ && h->plt.refcount > 0)
+ {
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ if (info->shared
+ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
+ {
+ asection *s = htab->splt;
+
+ /* If this is the first .plt entry, make room for the special
+ first entry. */
+ if (s->size == 0)
+ s->size += htab->plt_header_size;
+
+ h->plt.offset = s->size;
+
+ /* If we will insert a Thumb trampoline before this PLT, leave room
+ for it. */
+ if (!htab->use_blx && eh->plt_thumb_refcount > 0)
+ {
+ h->plt.offset += PLT_THUMB_STUB_SIZE;
+ s->size += PLT_THUMB_STUB_SIZE;
+ }
+
+ /* If this symbol is not defined in a regular file, and we are
+ not generating a shared library, then set the symbol to this
+ location in the .plt. This is required to make function
+ pointers compare as equal between the normal executable and
+ the shared library. */
+ if (! info->shared
+ && !h->def_regular)
+ {
+ h->root.u.def.section = s;
+ h->root.u.def.value = h->plt.offset;
+
+ /* Make sure the function is not marked as Thumb, in case
+ it is the target of an ABS32 relocation, which will
+ point to the PLT entry. */
+ if (ELF_ST_TYPE (h->type) == STT_ARM_TFUNC)
+ h->type = ELF_ST_INFO (ELF_ST_BIND (h->type), STT_FUNC);
+ }
+
+ /* Make room for this entry. */
+ s->size += htab->plt_entry_size;
+
+ if (!htab->symbian_p)
+ {
+ /* We also need to make an entry in the .got.plt section, which
+ will be placed in the .got section by the linker script. */
+ eh->plt_got_offset = htab->sgotplt->size;
+ htab->sgotplt->size += 4;
+ }
+
+ /* We also need to make an entry in the .rel(a).plt section. */
+ htab->srelplt->size += RELOC_SIZE (htab);
+
+ /* VxWorks executables have a second set of relocations for
+ each PLT entry. They go in a separate relocation section,
+ which is processed by the kernel loader. */
+ if (htab->vxworks_p && !info->shared)
+ {
+ /* There is a relocation for the initial PLT entry:
+ an R_ARM_32 relocation for _GLOBAL_OFFSET_TABLE_. */
+ if (h->plt.offset == htab->plt_header_size)
+ htab->srelplt2->size += RELOC_SIZE (htab);
+
+ /* There are two extra relocations for each subsequent
+ PLT entry: an R_ARM_32 relocation for the GOT entry,
+ and an R_ARM_32 relocation for the PLT entry. */
+ htab->srelplt2->size += RELOC_SIZE (htab) * 2;
+ }
+ }
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->needs_plt = 0;
+ }
+ }
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->needs_plt = 0;
+ }
+
+ if (h->got.refcount > 0)
+ {
+ asection *s;
+ bfd_boolean dyn;
+ int tls_type = elf32_arm_hash_entry (h)->tls_type;
+ int indx;
+
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ if (!htab->symbian_p)
+ {
+ s = htab->sgot;
+ h->got.offset = s->size;
+
+ if (tls_type == GOT_UNKNOWN)
+ abort ();
+
+ if (tls_type == GOT_NORMAL)
+ /* Non-TLS symbols need one GOT slot. */
+ s->size += 4;
+ else
+ {
+ if (tls_type & GOT_TLS_GD)
+ /* R_ARM_TLS_GD32 needs 2 consecutive GOT slots. */
+ s->size += 8;
+ if (tls_type & GOT_TLS_IE)
+ /* R_ARM_TLS_IE32 needs one GOT slot. */
+ s->size += 4;
+ }
+
+ dyn = htab->root.dynamic_sections_created;
+
+ indx = 0;
+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ && (!info->shared
+ || !SYMBOL_REFERENCES_LOCAL (info, h)))
+ indx = h->dynindx;
+
+ if (tls_type != GOT_NORMAL
+ && (info->shared || indx != 0)
+ && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak))
+ {
+ if (tls_type & GOT_TLS_IE)
+ htab->srelgot->size += RELOC_SIZE (htab);
+
+ if (tls_type & GOT_TLS_GD)
+ htab->srelgot->size += RELOC_SIZE (htab);
+
+ if ((tls_type & GOT_TLS_GD) && indx != 0)
+ htab->srelgot->size += RELOC_SIZE (htab);
+ }
+ else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak)
+ && (info->shared
+ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
+ htab->srelgot->size += RELOC_SIZE (htab);
+ }
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+
+ if (eh->relocs_copied == NULL)
+ return TRUE;
+
+ /* In the shared -Bsymbolic case, discard space allocated for
+ dynamic pc-relative relocs against symbols which turn out to be
+ defined in regular objects. For the normal shared case, discard
+ space for pc-relative relocs that have become local due to symbol
+ visibility changes. */
+
+ 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 - .". */
+ if (SYMBOL_CALLS_LOCAL (info, h))
+ {
+ struct elf32_arm_relocs_copied **pp;
+
+ for (pp = &eh->relocs_copied; (p = *pp) != NULL; )
+ {
+ p->count -= p->pc_count;
+ p->pc_count = 0;
+ if (p->count == 0)
+ *pp = p->next;
+ else
+ pp = &p->next;
+ }
+ }
+
+ /* Also discard relocs on undefined weak syms with non-default
+ visibility. */
+ if (eh->relocs_copied != NULL
+ && h->root.type == bfd_link_hash_undefweak)
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->relocs_copied = NULL;
+
+ /* Make sure undefined weak symbols are output as a dynamic
+ symbol in PIEs. */
+ else if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+ }
+
+ else if (htab->root.is_relocatable_executable && h->dynindx == -1
+ && h->root.type == bfd_link_hash_new)
+ {
+ /* Output absolute symbols so that we can create relocations
+ against them. For normal symbols we output a relocation
+ against the section that contains them. */
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ }
+ else
+ {
+ /* For the non-shared case, discard space for relocs against
+ symbols which turn out to need copy relocs or are not
+ dynamic. */
+
+ if (!h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
+ || (htab->root.dynamic_sections_created
+ && (h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined))))
+ {
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ /* If that succeeded, we know we'll be keeping all the
+ relocs. */
+ if (h->dynindx != -1)
+ goto keep;
+ }
+
+ eh->relocs_copied = NULL;
+
+ keep: ;
+ }
+
+ /* Finally, allocate space. */
+ for (p = eh->relocs_copied; p != NULL; p = p->next)
+ {
+ asection *sreloc = elf_section_data (p->section)->sreloc;
+ sreloc->size += p->count * RELOC_SIZE (htab);
+ }
+
+ return TRUE;
+}
+
+/* Find any dynamic relocs that apply to read-only sections. */
+
+static bfd_boolean
+elf32_arm_readonly_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
+{
+ struct elf32_arm_link_hash_entry *eh;
+ struct elf32_arm_relocs_copied *p;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ eh = (struct elf32_arm_link_hash_entry *) h;
+ for (p = eh->relocs_copied; p != NULL; p = p->next)
+ {
+ asection *s = p->section;
+
+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
+ {
+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+ info->flags |= DF_TEXTREL;
+
+ /* Not an error, just cut short the traversal. */
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+/* Set the sizes of the dynamic sections. */
+
+static bfd_boolean
+elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info)
+{
+ bfd * dynobj;
+ asection * s;
+ bfd_boolean plt;
+ bfd_boolean relocs;
+ bfd *ibfd;
+ struct elf32_arm_link_hash_table *htab;
+
+ htab = elf32_arm_hash_table (info);
+ dynobj = elf_hash_table (info)->dynobj;
+ BFD_ASSERT (dynobj != NULL);
+ check_use_blx (htab);
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Set the contents of the .interp section to the interpreter. */
+ if (info->executable)
+ {
+ s = bfd_get_section_by_name (dynobj, ".interp");
+ BFD_ASSERT (s != NULL);
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+ }
+ }
+
+ /* Set up .got offsets for local syms, and space for local dynamic
+ relocs. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ bfd_signed_vma *local_got;
+ bfd_signed_vma *end_local_got;
+ char *local_tls_type;
+ bfd_size_type locsymcount;
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *srel;
+
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
+ continue;
+
+ for (s = ibfd->sections; s != NULL; s = s->next)
+ {
+ struct elf32_arm_relocs_copied *p;
+
+ for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
+ {
+ if (!bfd_is_abs_section (p->section)
+ && bfd_is_abs_section (p->section->output_section))
+ {
+ /* Input section has been discarded, either because
+ it is a copy of a linkonce section or due to
+ linker script /DISCARD/, so we'll be discarding
+ the relocs too. */
+ }
+ else if (p->count != 0)
+ {
+ srel = elf_section_data (p->section)->sreloc;
+ srel->size += p->count * RELOC_SIZE (htab);
+ if ((p->section->output_section->flags & SEC_READONLY) != 0)
+ info->flags |= DF_TEXTREL;
+ }
+ }
+ }
+
+ local_got = elf_local_got_refcounts (ibfd);
+ if (!local_got)
+ continue;
+
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ locsymcount = symtab_hdr->sh_info;
+ end_local_got = local_got + locsymcount;
+ local_tls_type = elf32_arm_local_got_tls_type (ibfd);
+ s = htab->sgot;
+ srel = htab->srelgot;
+ for (; local_got < end_local_got; ++local_got, ++local_tls_type)
+ {
+ if (*local_got > 0)
+ {
+ *local_got = s->size;
+ if (*local_tls_type & GOT_TLS_GD)
+ /* TLS_GD relocs need an 8-byte structure in the GOT. */
+ s->size += 8;
+ if (*local_tls_type & GOT_TLS_IE)
+ s->size += 4;
+ if (*local_tls_type == GOT_NORMAL)
+ s->size += 4;
+
+ if (info->shared || *local_tls_type == GOT_TLS_GD)
+ srel->size += RELOC_SIZE (htab);
+ }
+ else
+ *local_got = (bfd_vma) -1;
+ }
+ }
+
+ if (htab->tls_ldm_got.refcount > 0)
+ {
+ /* Allocate two GOT entries and one dynamic relocation (if necessary)
+ for R_ARM_TLS_LDM32 relocations. */
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += 8;
+ if (info->shared)
+ htab->srelgot->size += RELOC_SIZE (htab);
+ }
+ else
+ htab->tls_ldm_got.offset = -1;
+
+ /* Allocate global sym .plt and .got entries, and space for global
+ sym dynamic relocs. */
+ elf_link_hash_traverse (& htab->root, allocate_dynrelocs, info);
+
+ /* The check_relocs and adjust_dynamic_symbol entry points have
+ determined the sizes of the various dynamic sections. Allocate
+ memory for them. */
+ plt = FALSE;
+ relocs = FALSE;
+ 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 (strcmp (name, ".plt") == 0)
+ {
+ /* Remember whether there is a PLT. */
+ plt = s->size != 0;
+ }
+ else if (strncmp (name, ".rel", 4) == 0)
+ {
+ if (s->size != 0)
+ {
+ /* Remember whether there are any reloc sections other
+ than .rel(a).plt and .rela.plt.unloaded. */
+ if (s != htab->srelplt && s != htab->srelplt2)
+ relocs = TRUE;
+
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ s->reloc_count = 0;
+ }
+ }
+ else if (strncmp (name, ".got", 4) != 0
+ && strcmp (name, ".dynbss") != 0)
+ {
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
+
+ if (s->size == 0)
+ {
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rel(a).bss and
+ .rel(a).plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
+ s->flags |= SEC_EXCLUDE;
+ continue;
+ }
+
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
+ /* Allocate memory for the section contents. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL)
+ return FALSE;
+ }
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Add some entries to the .dynamic section. We fill in the
+ values later, in elf32_arm_finish_dynamic_sections, but we
+ must add the entries now so that we get the correct size for
+ the .dynamic section. The DT_DEBUG entry is filled in by the
+ dynamic linker and used by the debugger. */
+#define add_dynamic_entry(TAG, VAL) \
+ _bfd_elf_add_dynamic_entry (info, TAG, VAL)
+
+ if (info->executable)
+ {
+ if (!add_dynamic_entry (DT_DEBUG, 0))
+ return FALSE;
+ }
+
+ if (plt)
+ {
+ if ( !add_dynamic_entry (DT_PLTGOT, 0)
+ || !add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL,
+ htab->use_rel ? DT_REL : DT_RELA)
+ || !add_dynamic_entry (DT_JMPREL, 0))
+ return FALSE;
+ }
+
+ if (relocs)
+ {
+ if (htab->use_rel)
+ {
+ if (!add_dynamic_entry (DT_REL, 0)
+ || !add_dynamic_entry (DT_RELSZ, 0)
+ || !add_dynamic_entry (DT_RELENT, RELOC_SIZE (htab)))
+ return FALSE;
+ }
+ else
+ {
+ if (!add_dynamic_entry (DT_RELA, 0)
+ || !add_dynamic_entry (DT_RELASZ, 0)
+ || !add_dynamic_entry (DT_RELAENT, RELOC_SIZE (htab)))
+ return FALSE;
+ }
+ }
+
+ /* If any dynamic relocs apply to a read-only section,
+ then we need a DT_TEXTREL entry. */
+ if ((info->flags & DF_TEXTREL) == 0)
+ elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
+ (PTR) info);
+
+ if ((info->flags & DF_TEXTREL) != 0)
+ {
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
+ return FALSE;
+ }
+ }
+#undef add_dynamic_entry
+
+ return TRUE;
+}
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
+
+static bfd_boolean
+elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info,
+ struct elf_link_hash_entry * h, Elf_Internal_Sym * sym)
+{
+ bfd * dynobj;
+ struct elf32_arm_link_hash_table *htab;
+ struct elf32_arm_link_hash_entry *eh;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ htab = elf32_arm_hash_table (info);
+ eh = (struct elf32_arm_link_hash_entry *) h;
+
+ if (h->plt.offset != (bfd_vma) -1)
+ {
+ asection * splt;
+ asection * srel;
+ bfd_byte *loc;
+ bfd_vma plt_index;
+ Elf_Internal_Rela rel;
+
+ /* This symbol has an entry in the procedure linkage table. Set
+ it up. */
+
+ BFD_ASSERT (h->dynindx != -1);
+
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ srel = bfd_get_section_by_name (dynobj, RELOC_SECTION (htab, ".plt"));
+ BFD_ASSERT (splt != NULL && srel != NULL);
+
+ /* 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);
+
+ /* 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));
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
+
+ /* Get the index in the procedure linkage table which
+ corresponds to this symbol. This is the index of this symbol
+ in all the symbols for which we are making plt entries. The
+ first entry in the procedure linkage table is reserved. */
+ plt_index = ((h->plt.offset - htab->plt_header_size)
+ / htab->plt_entry_size);
+ }
+ else
+ {
+ bfd_vma got_offset, got_address, plt_address;
+ bfd_vma got_displacement;
+ asection * sgot;
+
+ sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ BFD_ASSERT (sgot != NULL);
+
+ /* Get the offset into the .got.plt table of the entry that
+ corresponds to this function. */
+ got_offset = eh->plt_got_offset;
+
+ /* Get the index in the procedure linkage table which
+ corresponds to this symbol. This is the index of this symbol
+ in all the symbols for which we are making plt entries. The
+ first three entries in .got.plt are reserved; after that
+ symbols appear in the same order as in .plt. */
+ plt_index = (got_offset - 12) / 4;
+
+ /* Calculate the address of the GOT entry. */
+ got_address = (sgot->output_section->vma
+ + sgot->output_offset
+ + got_offset);
+
+ /* ...and the address of the PLT entry. */
+ plt_address = (splt->output_section->vma
+ + splt->output_offset
+ + 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++)
+ {
+ 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);
+ }
+ }
+ else if (htab->vxworks_p)
+ {
+ unsigned int i;
+ bfd_vma val;
+
+ for (i = 0; i != htab->plt_entry_size / 4; i++)
+ {
+ val = elf32_arm_vxworks_exec_plt_entry[i];
+ if (i == 2)
+ val |= got_address;
+ if (i == 4)
+ 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);
+ }
+
+ loc = (htab->srelplt2->contents
+ + (plt_index * 2 + 1) * RELOC_SIZE (htab));
+
+ /* Create the .rela.plt.unloaded R_ARM_ABS32 relocation
+ referencing the GOT for this PLT entry. */
+ rel.r_offset = plt_address + 8;
+ rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_ARM_ABS32);
+ rel.r_addend = got_offset;
+ SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+ loc += RELOC_SIZE (htab);
+
+ /* Create the R_ARM_ABS32 relocation referencing the
+ beginning of the PLT for this GOT entry. */
+ rel.r_offset = got_address;
+ rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_ARM_ABS32);
+ rel.r_addend = 0;
+ SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+ }
+ else
+ {
+ /* Calculate the displacement between the PLT slot and the
+ entry in the GOT. The eight-byte offset accounts for the
+ value produced by adding to pc in the first instruction
+ of the PLT stub. */
+ got_displacement = got_address - (plt_address + 8);
+
+ BFD_ASSERT ((got_displacement & 0xf0000000) == 0);
+
+ 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);
+ }
+
+ 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);
+#ifdef FOUR_WORD_PLT
+ bfd_put_32 (output_bfd, elf32_arm_plt_entry[3],
+ splt->contents + h->plt.offset + 12);
+#endif
+ }
+
+ /* Fill in the entry in the global offset table. */
+ bfd_put_32 (output_bfd,
+ (splt->output_section->vma
+ + splt->output_offset),
+ sgot->contents + got_offset);
+
+ /* Fill in the entry in the .rel(a).plt section. */
+ rel.r_addend = 0;
+ rel.r_offset = got_address;
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_JUMP_SLOT);
+ }
+
+ loc = srel->contents + plt_index * RELOC_SIZE (htab);
+ SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+
+ if (!h->def_regular)
+ {
+ /* Mark the symbol as undefined, rather than as defined in
+ the .plt section. Leave the value alone. */
+ sym->st_shndx = SHN_UNDEF;
+ /* If the symbol is weak, we do need to clear the value.
+ Otherwise, the PLT entry would provide a definition for
+ the symbol even if the symbol wasn't defined anywhere,
+ and so the symbol would never be NULL. */
+ if (!h->ref_regular_nonweak)
+ sym->st_value = 0;
+ }
+ }
+
+ if (h->got.offset != (bfd_vma) -1
+ && (elf32_arm_hash_entry (h)->tls_type & GOT_TLS_GD) == 0
+ && (elf32_arm_hash_entry (h)->tls_type & GOT_TLS_IE) == 0)
+ {
+ asection * sgot;
+ asection * srel;
+ Elf_Internal_Rela rel;
+ bfd_byte *loc;
+ bfd_vma offset;
+
+ /* This symbol has an entry in the global offset table. Set it
+ up. */
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ srel = bfd_get_section_by_name (dynobj, RELOC_SECTION (htab, ".got"));
+ BFD_ASSERT (sgot != NULL && srel != NULL);
+
+ offset = (h->got.offset & ~(bfd_vma) 1);
+ rel.r_addend = 0;
+ rel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + offset);
+
+ /* If this is a static link, or it is a -Bsymbolic link and the
+ symbol is defined locally or was forced to be local because
+ of a version file, we just want to emit a RELATIVE reloc.
+ The entry in the global offset table will already have been
+ initialized in the relocate_section function. */
+ if (info->shared
+ && SYMBOL_REFERENCES_LOCAL (info, h))
+ {
+ BFD_ASSERT((h->got.offset & 1) != 0);
+ rel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+ if (!htab->use_rel)
+ {
+ rel.r_addend = bfd_get_32 (output_bfd, sgot->contents + offset);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + offset);
+ }
+ }
+ else
+ {
+ BFD_ASSERT((h->got.offset & 1) == 0);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + offset);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
+ }
+
+ loc = srel->contents + srel->reloc_count++ * RELOC_SIZE (htab);
+ SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+ }
+
+ if (h->needs_copy)
+ {
+ asection * s;
+ Elf_Internal_Rela rel;
+ bfd_byte *loc;
+
+ /* This symbol needs a copy reloc. Set it up. */
+ BFD_ASSERT (h->dynindx != -1
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak));
+
+ s = bfd_get_section_by_name (h->root.u.def.section->owner,
+ RELOC_SECTION (htab, ".bss"));
+ BFD_ASSERT (s != NULL);
+
+ rel.r_addend = 0;
+ rel.r_offset = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_COPY);
+ loc = s->contents + s->reloc_count++ * RELOC_SIZE (htab);
+ SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+ }
+
+ /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. On VxWorks,
+ the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: it is relative
+ to the ".got" section. */
+ if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ || (!htab->vxworks_p && h == htab->root.hgot))
+ sym->st_shndx = SHN_ABS;
+
+ return TRUE;
+}
+
+/* Finish up the dynamic sections. */
+
+static bfd_boolean
+elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info)
+{
+ bfd * dynobj;
+ asection * sgot;
+ asection * sdyn;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ BFD_ASSERT (elf32_arm_hash_table (info)->symbian_p || sgot != NULL);
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ asection *splt;
+ Elf32_External_Dyn *dyncon, *dynconend;
+ struct elf32_arm_link_hash_table *htab;
+
+ htab = elf32_arm_hash_table (info);
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ BFD_ASSERT (splt != NULL && sdyn != NULL);
+
+ dyncon = (Elf32_External_Dyn *) sdyn->contents;
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
+
+ for (; dyncon < dynconend; dyncon++)
+ {
+ Elf_Internal_Dyn dyn;
+ const char * name;
+ asection * s;
+
+ bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+
+ switch (dyn.d_tag)
+ {
+ unsigned int type;
+
+ default:
+ break;
+
+ case DT_HASH:
+ name = ".hash";
+ goto get_vma_if_bpabi;
+ case DT_STRTAB:
+ name = ".dynstr";
+ goto get_vma_if_bpabi;
+ case DT_SYMTAB:
+ name = ".dynsym";
+ goto get_vma_if_bpabi;
+ case DT_VERSYM:
+ name = ".gnu.version";
+ goto get_vma_if_bpabi;
+ case DT_VERDEF:
+ name = ".gnu.version_d";
+ goto get_vma_if_bpabi;
+ case DT_VERNEED:
+ name = ".gnu.version_r";
+ goto get_vma_if_bpabi;
+
+ case DT_PLTGOT:
+ name = ".got";
+ goto get_vma;
+ case DT_JMPREL:
+ name = RELOC_SECTION (htab, ".plt");
+ get_vma:
+ s = bfd_get_section_by_name (output_bfd, name);
+ BFD_ASSERT (s != NULL);
+ if (!htab->symbian_p)
+ dyn.d_un.d_ptr = s->vma;
+ else
+ /* In the BPABI, tags in the PT_DYNAMIC section point
+ at the file offset, not the memory address, for the
+ convenience of the post linker. */
+ dyn.d_un.d_ptr = s->filepos;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+ get_vma_if_bpabi:
+ if (htab->symbian_p)
+ goto get_vma;
+ break;
+
+ case DT_PLTRELSZ:
+ s = bfd_get_section_by_name (output_bfd,
+ RELOC_SECTION (htab, ".plt"));
+ BFD_ASSERT (s != NULL);
+ dyn.d_un.d_val = s->size;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+ case DT_RELSZ:
+ case DT_RELASZ:
+ if (!htab->symbian_p)
+ {
+ /* My reading of the SVR4 ABI indicates that the
+ procedure linkage table relocs (DT_JMPREL) should be
+ included in the overall relocs (DT_REL). This is
+ what Solaris does. However, UnixWare can not handle
+ that case. Therefore, we override the DT_RELSZ entry
+ here to make it not include the JMPREL relocs. Since
+ the linker script arranges for .rel(a).plt to follow all
+ other relocation sections, we don't have to worry
+ about changing the DT_REL entry. */
+ s = bfd_get_section_by_name (output_bfd,
+ RELOC_SECTION (htab, ".plt"));
+ if (s != NULL)
+ dyn.d_un.d_val -= s->size;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+ }
+ /* Fall through */
+
+ case DT_REL:
+ case DT_RELA:
+ /* In the BPABI, the DT_REL tag must point at the file
+ offset, not the VMA, of the first relocation
+ section. So, we use code similar to that in
+ elflink.c, but do not check for SHF_ALLOC on the
+ relcoation section, since relocations sections are
+ never allocated under the BPABI. The comments above
+ about Unixware notwithstanding, we include all of the
+ relocations here. */
+ if (htab->symbian_p)
+ {
+ unsigned int i;
+ type = ((dyn.d_tag == DT_REL || dyn.d_tag == DT_RELSZ)
+ ? SHT_REL : SHT_RELA);
+ dyn.d_un.d_val = 0;
+ for (i = 1; i < elf_numsections (output_bfd); i++)
+ {
+ Elf_Internal_Shdr *hdr
+ = elf_elfsections (output_bfd)[i];
+ if (hdr->sh_type == type)
+ {
+ if (dyn.d_tag == DT_RELSZ
+ || dyn.d_tag == DT_RELASZ)
+ dyn.d_un.d_val += hdr->sh_size;
+ else if ((ufile_ptr) hdr->sh_offset
+ <= dyn.d_un.d_val - 1)
+ dyn.d_un.d_val = hdr->sh_offset;
+ }
+ }
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
+ break;
+
+ /* Set the bottom bit of DT_INIT/FINI if the
+ corresponding function is Thumb. */
+ case DT_INIT:
+ name = info->init_function;
+ goto get_sym;
+ case DT_FINI:
+ name = info->fini_function;
+ get_sym:
+ /* If it wasn't set by elf_bfd_final_link
+ then there is nothing to adjust. */
+ if (dyn.d_un.d_val != 0)
+ {
+ struct elf_link_hash_entry * eh;
+
+ eh = elf_link_hash_lookup (elf_hash_table (info), name,
+ FALSE, FALSE, TRUE);
+ if (eh != (struct elf_link_hash_entry *) NULL
+ && ELF_ST_TYPE (eh->type) == STT_ARM_TFUNC)
+ {
+ dyn.d_un.d_val |= 1;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
+ }
+ break;
+ }
+ }
+
+ /* Fill in the first entry in the procedure linkage table. */
+ if (splt->size > 0 && elf32_arm_hash_table (info)->plt_header_size)
+ {
+ const bfd_vma *plt0_entry;
+ bfd_vma got_address, plt_address, got_displacement;
+
+ /* Calculate the addresses of the GOT and PLT. */
+ got_address = sgot->output_section->vma + sgot->output_offset;
+ plt_address = splt->output_section->vma + splt->output_offset;
+
+ if (htab->vxworks_p)
+ {
+ /* The VxWorks GOT is relocated by the dynamic linker.
+ Therefore, we must emit relocations rather than simply
+ computing the values now. */
+ 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);
+ bfd_put_32 (output_bfd, got_address, splt->contents + 12);
+
+ /* Generate a relocation for _GLOBAL_OFFSET_TABLE_. */
+ rel.r_offset = plt_address + 12;
+ rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_ARM_ABS32);
+ rel.r_addend = 0;
+ SWAP_RELOC_OUT (htab) (output_bfd, &rel,
+ htab->srelplt2->contents);
+ }
+ else
+ {
+ 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);
+
+#ifdef FOUR_WORD_PLT
+ /* The displacement value goes in the otherwise-unused
+ last word of the second entry. */
+ bfd_put_32 (output_bfd, got_displacement, splt->contents + 28);
+#else
+ bfd_put_32 (output_bfd, got_displacement, splt->contents + 16);
+#endif
+ }
+ }
+
+ /* 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 (htab->vxworks_p && !info->shared && htab->splt->size > 0)
+ {
+ /* Correct the .rel(a).plt.unloaded relocations. They will have
+ incorrect symbol indexes. */
+ int num_plts;
+ unsigned char *p;
+
+ num_plts = ((htab->splt->size - htab->plt_header_size)
+ / htab->plt_entry_size);
+ p = htab->srelplt2->contents + RELOC_SIZE (htab);
+
+ for (; num_plts; num_plts--)
+ {
+ Elf_Internal_Rela rel;
+
+ SWAP_RELOC_IN (htab) (output_bfd, p, &rel);
+ rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_ARM_ABS32);
+ SWAP_RELOC_OUT (htab) (output_bfd, &rel, p);
+ p += RELOC_SIZE (htab);
+
+ SWAP_RELOC_IN (htab) (output_bfd, p, &rel);
+ rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_ARM_ABS32);
+ SWAP_RELOC_OUT (htab) (output_bfd, &rel, p);
+ p += RELOC_SIZE (htab);
+ }
+ }
+ }
+
+ /* Fill in the first three entries in the global offset table. */
+ if (sgot)
+ {
+ if (sgot->size > 0)
+ {
+ if (sdyn == NULL)
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
+ else
+ bfd_put_32 (output_bfd,
+ sdyn->output_section->vma + sdyn->output_offset,
+ sgot->contents);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 4);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 8);
+ }
+
+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
+ }
+
+ return TRUE;
+}
+
+static void
+elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATTRIBUTE_UNUSED)
+{
+ Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
+ struct elf32_arm_link_hash_table *globals;
+
+ i_ehdrp = elf_elfheader (abfd);
+
+ if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_UNKNOWN)
+ i_ehdrp->e_ident[EI_OSABI] = ARM_ELF_OS_ABI_VERSION;
+ else
+ i_ehdrp->e_ident[EI_OSABI] = 0;
+ i_ehdrp->e_ident[EI_ABIVERSION] = ARM_ELF_ABI_VERSION;
+
+ if (link_info)
+ {
+ globals = elf32_arm_hash_table (link_info);
+ if (globals->byteswap_code)
+ i_ehdrp->e_flags |= EF_ARM_BE8;
+ }
+}
+
+static enum elf_reloc_type_class
+elf32_arm_reloc_type_class (const Elf_Internal_Rela *rela)
+{
+ switch ((int) ELF32_R_TYPE (rela->r_info))
+ {
+ case R_ARM_RELATIVE:
+ return reloc_class_relative;
+ case R_ARM_JUMP_SLOT:
+ return reloc_class_plt;
+ case R_ARM_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
+}
+
+/* Set the right machine number for an Arm ELF file. */
+
+static bfd_boolean
+elf32_arm_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr)
+{
+ if (hdr->sh_type == SHT_NOTE)
+ *flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
+
+ return TRUE;
+}
+
+static void
+elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
+{
+ bfd_arm_update_notes (abfd, ARM_NOTE_SECTION);
+}
+
+/* Return TRUE if this is an unwinding table entry. */
+
+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);
+}
+
+
+/* Set the type and flags for an ARM section. We do this by
+ the section name, which is a hack, but ought to work. */
+
+static bfd_boolean
+elf32_arm_fake_sections (bfd * abfd, Elf_Internal_Shdr * hdr, asection * sec)
+{
+ const char * name;
+
+ name = bfd_get_section_name (abfd, sec);
+
+ if (is_arm_elf_unwind_section_name (abfd, name))
+ {
+ 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. */
+
+static bfd_boolean
+elf32_arm_section_from_shdr (bfd *abfd,
+ Elf_Internal_Shdr * hdr,
+ const char *name,
+ int shindex)
+{
+ /* There ought to be a place to keep ELF backend specific flags, but
+ at the moment there isn't one. We just keep track of the
+ sections by their name, instead. Fortunately, the ABI gives
+ names for all the ARM specific sections, so we will probably get
+ away with this. */
+ switch (hdr->sh_type)
+ {
+ case SHT_ARM_EXIDX:
+ case SHT_ARM_PREEMPTMAP:
+ case SHT_ARM_ATTRIBUTES:
+ break;
+
+ default:
+ return FALSE;
+ }
+
+ 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;
+}
+
+/* A structure used to record a list of sections, independently
+ of the next and prev fields in the asection structure. */
+typedef struct section_list
+{
+ asection * sec;
+ struct section_list * next;
+ struct section_list * prev;
+}
+section_list;
+
+/* Unfortunately we need to keep a list of sections for which
+ an _arm_elf_section_data structure has been allocated. This
+ is because it is possible for functions like elf32_arm_write_section
+ to be called on a section which has had an elf_data_structure
+ allocated for it (and so the used_by_bfd field is valid) but
+ for which the ARM extended version of this structure - the
+ _arm_elf_section_data structure - has not been allocated. */
+static section_list * sections_with_arm_elf_section_data = NULL;
+
+static void
+record_section_with_arm_elf_section_data (asection * sec)
+{
+ struct section_list * entry;
+
+ entry = bfd_malloc (sizeof (* entry));
+ if (entry == NULL)
+ return;
+ entry->sec = sec;
+ entry->next = sections_with_arm_elf_section_data;
+ entry->prev = NULL;
+ if (entry->next != NULL)
+ entry->next->prev = entry;
+ sections_with_arm_elf_section_data = entry;
+}
+
+static struct section_list *
+find_arm_elf_section_entry (asection * sec)
+{
+ struct section_list * entry;
+ static struct section_list * last_entry = NULL;
+
+ /* This is a short cut for the typical case where the sections are added
+ to the sections_with_arm_elf_section_data list in forward order and
+ then looked up here in backwards order. This makes a real difference
+ to the ld-srec/sec64k.exp linker test. */
+ entry = sections_with_arm_elf_section_data;
+ if (last_entry != NULL)
+ {
+ if (last_entry->sec == sec)
+ entry = last_entry;
+ else if (last_entry->next != NULL
+ && last_entry->next->sec == sec)
+ entry = last_entry->next;
+ }
+
+ for (; entry; entry = entry->next)
+ if (entry->sec == sec)
+ break;
+
+ if (entry)
+ /* Record the entry prior to this one - it is the entry we are most
+ likely to want to locate next time. Also this way if we have been
+ called from unrecord_section_with_arm_elf_section_data() we will not
+ be caching a pointer that is about to be freed. */
+ last_entry = entry->prev;
+
+ return entry;
+}
+
+static _arm_elf_section_data *
+get_arm_elf_section_data (asection * sec)
+{
+ struct section_list * entry;
+
+ entry = find_arm_elf_section_entry (sec);
+
+ if (entry)
+ return elf32_arm_section_data (entry->sec);
+ else
+ return NULL;
+}
+
+static void
+unrecord_section_with_arm_elf_section_data (asection * sec)
+{
+ struct section_list * entry;
+
+ entry = find_arm_elf_section_entry (sec);
+
+ if (entry)
+ {
+ if (entry->prev != NULL)
+ entry->prev->next = entry->next;
+ if (entry->next != NULL)
+ entry->next->prev = entry->prev;
+ if (entry == sections_with_arm_elf_section_data)
+ sections_with_arm_elf_section_data = entry->next;
+ free (entry);
+ }
+}
+
+/* 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)
+{
+ 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;
+
+ globals = elf32_arm_hash_table (info);
+ if (globals->vxworks_p
+ && !elf_vxworks_link_output_symbol_hook (info, name, elfsym,
+ input_sec, h))
+ return FALSE;
+
+ /* 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;
+
+ /* We only want mapping symbols. */
+ if (! bfd_is_arm_mapping_symbol_name (name))
+ 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)
+ return TRUE;
+
+ mapcount = arm_data->mapcount + 1;
+ map = arm_data->map;
+
+ /* 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)
+ {
+ arm_data->map = newmap;
+ arm_data->mapcount = mapcount;
+
+ newmap[mapcount - 1].vma = elfsym->st_value;
+ newmap[mapcount - 1].type = name[1];
+ }
+
+ return TRUE;
+}
+
+/* Allocate target specific section data. */
+
+static bfd_boolean
+elf32_arm_new_section_hook (bfd *abfd, asection *sec)
+{
+ _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;
+
+ record_section_with_arm_elf_section_data (sec);
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
+
+
+/* Used to order a list of mapping symbols by address. */
+
+static int
+elf32_arm_compare_mapping (const void * a, const void * b)
+{
+ return ((const elf32_arm_section_map *) a)->vma
+ > ((const elf32_arm_section_map *) b)->vma;
+}
+
+
+/* Do code byteswapping. Return FALSE afterwards so that the section is
+ written out as normal. */
+
+static bfd_boolean
+elf32_arm_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, asection *sec,
+ bfd_byte *contents)
+{
+ int mapcount;
+ _arm_elf_section_data *arm_data;
+ elf32_arm_section_map *map;
+ bfd_vma ptr;
+ bfd_vma end;
+ bfd_vma offset;
+ bfd_byte tmp;
+ int i;
+
+ /* 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 (sec);
+ if (arm_data == NULL)
+ return FALSE;
+
+ mapcount = arm_data->mapcount;
+ map = arm_data->map;
+
+ 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 (i == mapcount - 1)
+ end = sec->size;
+ else
+ end = map[i + 1].vma - offset;
+
+ 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;
+
+ 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->map = NULL;
+ unrecord_section_with_arm_elf_section_data (sec);
+
+ return FALSE;
+}
+
+static void
+unrecord_section_via_map_over_sections (bfd * abfd ATTRIBUTE_UNUSED,
+ asection * sec,
+ void * ignore ATTRIBUTE_UNUSED)
+{
+ unrecord_section_with_arm_elf_section_data (sec);
+}
+
+static bfd_boolean
+elf32_arm_close_and_cleanup (bfd * abfd)
+{
+ bfd_map_over_sections (abfd, unrecord_section_via_map_over_sections, NULL);
+
+ return _bfd_elf_close_and_cleanup (abfd);
+}
+
+/* Display STT_ARM_TFUNC symbols as functions. */
+
+static void
+elf32_arm_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
+ asymbol *asym)
+{
+ elf_symbol_type *elfsym = (elf_symbol_type *) asym;
+
+ if (ELF_ST_TYPE (elfsym->internal_elf_sym.st_info) == STT_ARM_TFUNC)
+ elfsym->symbol.flags |= BSF_FUNCTION;
+}
+
+
+/* Mangle thumb function symbols as we read them in. */
+
+static void
+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);
+
+ /* New EABI objects mark thumb function symbols by setting the low bit of
+ the address. Turn these into STT_ARM_TFUNC. */
+ if (ELF_ST_TYPE (dst->st_info) == STT_FUNC
+ && (dst->st_value & 1))
+ {
+ dst->st_info = ELF_ST_INFO (ELF_ST_BIND (dst->st_info), STT_ARM_TFUNC);
+ dst->st_value &= ~(bfd_vma) 1;
+ }
+}
+
+
+/* Mangle thumb function symbols as we write them out. */
+
+static void
+elf32_arm_swap_symbol_out (bfd *abfd,
+ const Elf_Internal_Sym *src,
+ void *cdst,
+ void *shndx)
+{
+ Elf_Internal_Sym newsym;
+
+ /* We convert STT_ARM_TFUNC symbols into STT_FUNC with the low bit
+ of the address set, as per the new EABI. We do this unconditionally
+ because objcopy does not set the elf header flags until after
+ it writes out the symbol table. */
+ if (ELF_ST_TYPE (src->st_info) == STT_ARM_TFUNC)
+ {
+ newsym = *src;
+ newsym.st_info = ELF_ST_INFO (ELF_ST_BIND (src->st_info), STT_FUNC);
+ newsym.st_value |= 1;
+
+ src = &newsym;
+ }
+ bfd_elf32_swap_symbol_out (abfd, src, cdst, shndx);
+}
+
+/* Add the PT_ARM_EXIDX program header. */
+
+static bfd_boolean
+elf32_arm_modify_segment_map (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+ struct elf_segment_map *m;
+ asection *sec;
+
+ sec = bfd_get_section_by_name (abfd, ".ARM.exidx");
+ if (sec != NULL && (sec->flags & SEC_LOAD) != 0)
+ {
+ /* If there is already a PT_ARM_EXIDX header, then we do not
+ want to add another one. This situation arises when running
+ "strip"; the input binary already has the header. */
+ m = elf_tdata (abfd)->segment_map;
+ while (m && m->p_type != PT_ARM_EXIDX)
+ m = m->next;
+ if (!m)
+ {
+ m = bfd_zalloc (abfd, sizeof (struct elf_segment_map));
+ if (m == NULL)
+ return FALSE;
+ m->p_type = PT_ARM_EXIDX;
+ m->count = 1;
+ m->sections[0] = sec;
+
+ m->next = elf_tdata (abfd)->segment_map;
+ elf_tdata (abfd)->segment_map = m;
+ }
+ }
+
+ return TRUE;
+}
+
+/* We may add a PT_ARM_EXIDX program header. */
+
+static int
+elf32_arm_additional_program_headers (bfd *abfd)
+{
+ asection *sec;
+
+ sec = bfd_get_section_by_name (abfd, ".ARM.exidx");
+ if (sec != NULL && (sec->flags & SEC_LOAD) != 0)
+ return 1;
+ else
+ return 0;
+}
+
+/* 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),
+ sizeof (Elf32_External_Phdr),
+ sizeof (Elf32_External_Shdr),
+ sizeof (Elf32_External_Rel),
+ sizeof (Elf32_External_Rela),
+ sizeof (Elf32_External_Sym),
+ sizeof (Elf32_External_Dyn),
+ sizeof (Elf_External_Note),
+ 4,
+ 1,
+ 32, 2,
+ ELFCLASS32, EV_CURRENT,
+ bfd_elf32_write_out_phdrs,
+ bfd_elf32_write_shdrs_and_ehdr,
+ bfd_elf32_write_relocs,
+ elf32_arm_swap_symbol_in,
+ elf32_arm_swap_symbol_out,
+ bfd_elf32_slurp_reloc_table,
+ bfd_elf32_slurp_symbol_table,
+ bfd_elf32_swap_dyn_in,
+ bfd_elf32_swap_dyn_out,
+ bfd_elf32_swap_reloc_in,
+ bfd_elf32_swap_reloc_out,
+ bfd_elf32_swap_reloca_in,
+ bfd_elf32_swap_reloca_out
+};
+
+#define ELF_ARCH bfd_arch_arm
+#define ELF_MACHINE_CODE EM_ARM
+#ifdef __QNXTARGET__
+#define ELF_MAXPAGESIZE 0x1000
+#else
+#define ELF_MAXPAGESIZE 0x8000
+#endif
+#define ELF_MINPAGESIZE 0x1000
+
+#define bfd_elf32_mkobject elf32_arm_mkobject
+
+#define bfd_elf32_bfd_copy_private_bfd_data elf32_arm_copy_private_bfd_data
+#define bfd_elf32_bfd_merge_private_bfd_data elf32_arm_merge_private_bfd_data
+#define bfd_elf32_bfd_set_private_flags elf32_arm_set_private_flags
+#define bfd_elf32_bfd_print_private_bfd_data elf32_arm_print_private_bfd_data
+#define bfd_elf32_bfd_link_hash_table_create elf32_arm_link_hash_table_create
+#define bfd_elf32_bfd_reloc_type_lookup elf32_arm_reloc_type_lookup
+#define bfd_elf32_find_nearest_line elf32_arm_find_nearest_line
+#define 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 elf_backend_get_symbol_type elf32_arm_get_symbol_type
+#define elf_backend_gc_mark_hook elf32_arm_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_arm_gc_sweep_hook
+#define elf_backend_check_relocs elf32_arm_check_relocs
+#define elf_backend_relocate_section elf32_arm_relocate_section
+#define elf_backend_write_section elf32_arm_write_section
+#define elf_backend_adjust_dynamic_symbol elf32_arm_adjust_dynamic_symbol
+#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_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
+#define elf_backend_section_flags elf32_arm_section_flags
+#define elf_backend_fake_sections elf32_arm_fake_sections
+#define elf_backend_section_from_shdr elf32_arm_section_from_shdr
+#define elf_backend_final_write_processing elf32_arm_final_write_processing
+#define elf_backend_copy_indirect_symbol elf32_arm_copy_indirect_symbol
+#define elf_backend_symbol_processing elf32_arm_symbol_processing
+#define elf_backend_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_can_refcount 1
+#define elf_backend_can_gc_sections 1
+#define elf_backend_plt_readonly 1
+#define elf_backend_want_got_plt 1
+#define elf_backend_want_plt_sym 0
+#define elf_backend_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
+
+#include "elf32-target.h"
+
+/* VxWorks Targets */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vxworks_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-littlearm-vxworks"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_bigarm_vxworks_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-bigarm-vxworks"
+
+/* Like elf32_arm_link_hash_table_create -- but overrides
+ appropriately for VxWorks. */
+static struct bfd_link_hash_table *
+elf32_arm_vxworks_link_hash_table_create (bfd *abfd)
+{
+ struct bfd_link_hash_table *ret;
+
+ ret = elf32_arm_link_hash_table_create (abfd);
+ if (ret)
+ {
+ struct elf32_arm_link_hash_table *htab
+ = (struct elf32_arm_link_hash_table *) ret;
+ htab->use_rel = 0;
+ htab->vxworks_p = 1;
+ }
+ return ret;
+}
+
+static void
+elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+{
+ elf32_arm_final_write_processing (abfd, linker);
+ elf_vxworks_final_write_processing (abfd, linker);
+}
+
+#undef elf32_bed
+#define elf32_bed elf32_arm_vxworks_bed
+
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ elf32_arm_vxworks_link_hash_table_create
+#undef elf_backend_add_symbol_hook
+#define elf_backend_add_symbol_hook \
+ elf_vxworks_add_symbol_hook
+#undef elf_backend_final_write_processing
+#define elf_backend_final_write_processing \
+ elf32_arm_vxworks_final_write_processing
+#undef elf_backend_emit_relocs
+#define elf_backend_emit_relocs \
+ elf_vxworks_emit_relocs
+
+#undef elf_backend_may_use_rel_p
+#define elf_backend_may_use_rel_p 0
+#undef elf_backend_may_use_rela_p
+#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
+#define ELF_MAXPAGESIZE 0x1000
+
+#include "elf32-target.h"
+
+
+/* Symbian OS Targets */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_symbian_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-littlearm-symbian"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_bigarm_symbian_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-bigarm-symbian"
+
+/* Like elf32_arm_link_hash_table_create -- but overrides
+ appropriately for Symbian OS. */
+static struct bfd_link_hash_table *
+elf32_arm_symbian_link_hash_table_create (bfd *abfd)
+{
+ struct bfd_link_hash_table *ret;
+
+ ret = elf32_arm_link_hash_table_create (abfd);
+ if (ret)
+ {
+ struct elf32_arm_link_hash_table *htab
+ = (struct elf32_arm_link_hash_table *)ret;
+ /* There is no PLT header for Symbian OS. */
+ htab->plt_header_size = 0;
+ /* The PLT entries are each three instructions. */
+ htab->plt_entry_size = 4 * NUM_ELEM (elf32_arm_symbian_plt_entry);
+ htab->symbian_p = 1;
+ /* Symbian uses armv5t or above, so use_blx is always true. */
+ htab->use_blx = 1;
+ htab->root.is_relocatable_executable = 1;
+ }
+ return ret;
+}
+
+static const struct bfd_elf_special_section
+elf32_arm_symbian_special_sections[] =
+{
+ /* In a BPABI executable, the dynamic linking sections do not go in
+ 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 },
+ /* 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 }
+};
+
+static void
+elf32_arm_symbian_begin_write_processing (bfd *abfd,
+ struct bfd_link_info *link_info
+ ATTRIBUTE_UNUSED)
+{
+ /* BPABI objects are never loaded directly by an OS kernel; they are
+ processed by a postlinker first, into an OS-specific format. If
+ the D_PAGED bit is set on the file, BFD will align segments on
+ page boundaries, so that an OS can directly map the file. With
+ BPABI objects, that just results in wasted space. In addition,
+ because we clear the D_PAGED bit, map_sections_to_segments will
+ recognize that the program headers should not be mapped into any
+ loadable segment. */
+ abfd->flags &= ~D_PAGED;
+}
+
+static bfd_boolean
+elf32_arm_symbian_modify_segment_map (bfd *abfd,
+ struct bfd_link_info *info)
+{
+ struct elf_segment_map *m;
+ asection *dynsec;
+
+ /* BPABI shared libraries and executables should have a PT_DYNAMIC
+ segment. However, because the .dynamic section is not marked
+ with SEC_LOAD, the generic ELF code will not create such a
+ segment. */
+ 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;
+ }
+
+ /* Also call the generic arm routine. */
+ return elf32_arm_modify_segment_map (abfd, info);
+}
+
+#undef elf32_bed
+#define elf32_bed elf32_arm_symbian_bed
+
+/* The dynamic sections are not allocated on SymbianOS; the postlinker
+ will process them and then discard them. */
+#undef ELF_DYNAMIC_SEC_FLAGS
+#define ELF_DYNAMIC_SEC_FLAGS \
+ (SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED)
+
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ elf32_arm_symbian_link_hash_table_create
+#undef elf_backend_add_symbol_hook
+
+#undef elf_backend_special_sections
+#define elf_backend_special_sections elf32_arm_symbian_special_sections
+
+#undef elf_backend_begin_write_processing
+#define elf_backend_begin_write_processing \
+ elf32_arm_symbian_begin_write_processing
+#undef elf_backend_final_write_processing
+#define elf_backend_final_write_processing \
+ elf32_arm_final_write_processing
+#undef elf_backend_emit_relocs
+
+#undef elf_backend_modify_segment_map
+#define elf_backend_modify_segment_map elf32_arm_symbian_modify_segment_map
+
+/* There is no .got section for BPABI objects, and hence no header. */
+#undef elf_backend_got_header_size
+#define elf_backend_got_header_size 0
+
+/* Similarly, there is no .got.plt section. */
+#undef elf_backend_want_got_plt
+#define elf_backend_want_got_plt 0
+
+#undef elf_backend_may_use_rel_p
+#define elf_backend_may_use_rel_p 1
+#undef elf_backend_may_use_rela_p
+#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
+#define ELF_MAXPAGESIZE 0x8000
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-arm.h b/contrib/binutils/bfd/elf32-arm.h
deleted file mode 100644
index 8c1acc0625cb..000000000000
--- a/contrib/binutils/bfd/elf32-arm.h
+++ /dev/null
@@ -1,4108 +0,0 @@
-/* 32-bit ELF support for ARM
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
- 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 USE_REL
-#define USE_REL 0
-#endif
-
-typedef unsigned long int insn32;
-typedef unsigned short int insn16;
-
-static bfd_boolean elf32_arm_set_private_flags
- PARAMS ((bfd *, flagword));
-static bfd_boolean elf32_arm_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static bfd_boolean elf32_arm_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static bfd_boolean elf32_arm_print_private_bfd_data
- PARAMS ((bfd *, PTR));
-static int elf32_arm_get_symbol_type
- PARAMS (( Elf_Internal_Sym *, int));
-static struct bfd_link_hash_table *elf32_arm_link_hash_table_create
- PARAMS ((bfd *));
-static bfd_reloc_status_type elf32_arm_final_link_relocate
- PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, bfd_vma, struct bfd_link_info *, asection *,
- const char *, int, struct elf_link_hash_entry *));
-static insn32 insert_thumb_branch
- PARAMS ((insn32, int));
-static struct elf_link_hash_entry *find_thumb_glue
- PARAMS ((struct bfd_link_info *, const char *, bfd *));
-static struct elf_link_hash_entry *find_arm_glue
- PARAMS ((struct bfd_link_info *, const char *, bfd *));
-static void elf32_arm_post_process_headers
- PARAMS ((bfd *, struct bfd_link_info *));
-static int elf32_arm_to_thumb_stub
- PARAMS ((struct bfd_link_info *, const char *, bfd *, bfd *, asection *,
- bfd_byte *, asection *, bfd_vma, bfd_signed_vma, bfd_vma));
-static int elf32_thumb_to_arm_stub
- PARAMS ((struct bfd_link_info *, const char *, bfd *, bfd *, asection *,
- bfd_byte *, asection *, bfd_vma, bfd_signed_vma, bfd_vma));
-static bfd_boolean elf32_arm_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static asection * elf32_arm_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static bfd_boolean elf32_arm_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static bfd_boolean elf32_arm_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static bfd_boolean elf32_arm_find_nearest_line
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
-static bfd_boolean elf32_arm_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static bfd_boolean elf32_arm_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf32_arm_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static bfd_boolean elf32_arm_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static struct bfd_hash_entry * elf32_arm_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-#if USE_REL
-static void arm_add_to_rel
- PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma));
-#endif
-static bfd_boolean allocate_dynrelocs
- PARAMS ((struct elf_link_hash_entry *h, PTR inf));
-static bfd_boolean create_got_section
- PARAMS ((bfd * dynobj, struct bfd_link_info * info));
-static bfd_boolean elf32_arm_create_dynamic_sections
- PARAMS ((bfd * dynobj, struct bfd_link_info * info));
-static enum elf_reloc_type_class elf32_arm_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
-static bfd_boolean elf32_arm_object_p
- PARAMS ((bfd *));
-
-#ifndef ELFARM_NABI_C_INCLUDED
-static void record_arm_to_thumb_glue
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static void record_thumb_to_arm_glue
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-bfd_boolean bfd_elf32_arm_allocate_interworking_sections
- PARAMS ((struct bfd_link_info *));
-bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
- PARAMS ((bfd *, struct bfd_link_info *));
-bfd_boolean bfd_elf32_arm_process_before_allocation
- PARAMS ((bfd *, struct bfd_link_info *, int));
-#endif
-
-
-#define INTERWORK_FLAG(abfd) (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK)
-
-/* The linker script knows the section names for placement.
- The entry_names are used to do simple name mangling on the stubs.
- Given a function name, and its type, the stub can be found. The
- name can be changed. The only requirement is the %s be present. */
-#define THUMB2ARM_GLUE_SECTION_NAME ".glue_7t"
-#define THUMB2ARM_GLUE_ENTRY_NAME "__%s_from_thumb"
-
-#define ARM2THUMB_GLUE_SECTION_NAME ".glue_7"
-#define ARM2THUMB_GLUE_ENTRY_NAME "__%s_from_arm"
-
-/* The name of the dynamic interpreter. This is put in the .interp
- section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-
-#ifdef FOUR_WORD_PLT
-
-/* The size in bytes of the special first entry in the procedure
- linkage table. */
-#define PLT_HEADER_SIZE 16
-
-/* The size in bytes of an entry in the procedure linkage table. */
-#define PLT_ENTRY_SIZE 16
-
-/* The first entry in a procedure linkage table looks like
- this. It is set up so that any shared library function that is
- called before the relocation has been set up calls the dynamic
- linker first. */
-static const bfd_vma elf32_arm_plt0_entry [PLT_HEADER_SIZE / 4] =
- {
- 0xe52de004, /* str lr, [sp, #-4]! */
- 0xe59fe010, /* ldr lr, [pc, #16] */
- 0xe08fe00e, /* add lr, pc, lr */
- 0xe5bef008, /* ldr pc, [lr, #8]! */
- };
-
-/* Subsequent entries in a procedure linkage table look like
- this. */
-static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
- {
- 0xe28fc600, /* add ip, pc, #NN */
- 0xe28cca00, /* add ip, ip, #NN */
- 0xe5bcf000, /* ldr pc, [ip, #NN]! */
- 0x00000000, /* unused */
- };
-
-#else
-
-/* The size in bytes of the special first entry in the procedure
- linkage table. */
-#define PLT_HEADER_SIZE 20
-
-/* The size in bytes of an entry in the procedure linkage table. */
-#define PLT_ENTRY_SIZE 12
-
-/* The first entry in a procedure linkage table looks like
- this. It is set up so that any shared library function that is
- called before the relocation has been set up calls the dynamic
- linker first. */
-static const bfd_vma elf32_arm_plt0_entry [PLT_HEADER_SIZE / 4] =
- {
- 0xe52de004, /* str lr, [sp, #-4]! */
- 0xe59fe004, /* ldr lr, [pc, #4] */
- 0xe08fe00e, /* add lr, pc, lr */
- 0xe5bef008, /* ldr pc, [lr, #8]! */
- 0x00000000, /* &GOT[0] - . */
- };
-
-/* Subsequent entries in a procedure linkage table look like
- this. */
-static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
- {
- 0xe28fc600, /* add ip, pc, #0xNN00000 */
- 0xe28cca00, /* add ip, ip, #0xNN000 */
- 0xe5bcf000, /* ldr pc, [ip, #0xNNN]! */
- };
-
-#endif
-
-/* The ARM linker needs to keep track of the number of relocs that it
- decides to copy in check_relocs for each symbol. This is so that
- it can discard PC relative relocs if it doesn't need them when
- linking with -Bsymbolic. We store the information in a field
- extending the regular ELF linker hash table. */
-
-/* This structure keeps track of the number of PC relative relocs we
- have copied for a given symbol. */
-struct elf32_arm_relocs_copied
- {
- /* Next section. */
- struct elf32_arm_relocs_copied * next;
- /* A section in dynobj. */
- asection * section;
- /* Number of relocs copied in this section. */
- bfd_size_type count;
- };
-
-/* Arm ELF linker hash entry. */
-struct elf32_arm_link_hash_entry
- {
- struct elf_link_hash_entry root;
-
- /* Number of PC relative relocs copied for this symbol. */
- struct elf32_arm_relocs_copied * relocs_copied;
- };
-
-/* Traverse an arm ELF linker hash table. */
-#define elf32_arm_link_hash_traverse(table, func, info) \
- (elf_link_hash_traverse \
- (&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
- (info)))
-
-/* Get the ARM elf linker hash table from a link_info structure. */
-#define elf32_arm_hash_table(info) \
- ((struct elf32_arm_link_hash_table *) ((info)->hash))
-
-/* ARM ELF linker hash table. */
-struct elf32_arm_link_hash_table
- {
- /* The main hash table. */
- struct elf_link_hash_table root;
-
- /* The size in bytes of the section containing the Thumb-to-ARM glue. */
- bfd_size_type thumb_glue_size;
-
- /* The size in bytes of the section containing the ARM-to-Thumb glue. */
- bfd_size_type arm_glue_size;
-
- /* An arbitrary input BFD chosen to hold the glue sections. */
- bfd * bfd_of_glue_owner;
-
- /* A boolean indicating whether knowledge of the ARM's pipeline
- length should be applied by the linker. */
- int no_pipeline_knowledge;
-
- /* Short-cuts to get to dynamic linker sections. */
- asection *sgot;
- asection *sgotplt;
- asection *srelgot;
- asection *splt;
- asection *srelplt;
- asection *sdynbss;
- asection *srelbss;
-
- /* Small local sym to section mapping cache. */
- struct sym_sec_cache sym_sec;
- };
-
-/* Create an entry in an ARM ELF linker hash table. */
-
-static struct bfd_hash_entry *
-elf32_arm_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry * entry;
- struct bfd_hash_table * table;
- const char * string;
-{
- struct elf32_arm_link_hash_entry * ret =
- (struct elf32_arm_link_hash_entry *) entry;
-
- /* Allocate the structure if it has not already been allocated by a
- subclass. */
- if (ret == (struct elf32_arm_link_hash_entry *) NULL)
- ret = ((struct elf32_arm_link_hash_entry *)
- bfd_hash_allocate (table,
- sizeof (struct elf32_arm_link_hash_entry)));
- if (ret == (struct elf32_arm_link_hash_entry *) NULL)
- return (struct bfd_hash_entry *) ret;
-
- /* Call the allocation method of the superclass. */
- ret = ((struct elf32_arm_link_hash_entry *)
- _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
- table, string));
- if (ret != (struct elf32_arm_link_hash_entry *) NULL)
- ret->relocs_copied = NULL;
-
- return (struct bfd_hash_entry *) ret;
-}
-
-/* Create .got, .gotplt, and .rel.got sections in DYNOBJ, and set up
- shortcuts to them in our hash table. */
-
-static bfd_boolean
-create_got_section (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
-{
- struct elf32_arm_link_hash_table *htab;
-
- if (! _bfd_elf_create_got_section (dynobj, info))
- return FALSE;
-
- htab = elf32_arm_hash_table (info);
- htab->sgot = bfd_get_section_by_name (dynobj, ".got");
- htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
- if (!htab->sgot || !htab->sgotplt)
- abort ();
-
- htab->srelgot = bfd_make_section (dynobj, ".rel.got");
- if (htab->srelgot == NULL
- || ! bfd_set_section_flags (dynobj, htab->srelgot,
- (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED
- | SEC_READONLY))
- || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
- return FALSE;
- return TRUE;
-}
-
-/* Create .plt, .rel.plt, .got, .got.plt, .rel.got, .dynbss, and
- .rel.bss sections in DYNOBJ, and set up shortcuts to them in our
- hash table. */
-
-static bfd_boolean
-elf32_arm_create_dynamic_sections (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
-{
- struct elf32_arm_link_hash_table *htab;
-
- htab = elf32_arm_hash_table (info);
- if (!htab->sgot && !create_got_section (dynobj, info))
- return FALSE;
-
- if (!_bfd_elf_create_dynamic_sections (dynobj, info))
- return FALSE;
-
- htab->splt = bfd_get_section_by_name (dynobj, ".plt");
- htab->srelplt = bfd_get_section_by_name (dynobj, ".rel.plt");
- htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
- if (!info->shared)
- htab->srelbss = bfd_get_section_by_name (dynobj, ".rel.bss");
-
- if (!htab->splt || !htab->srelplt || !htab->sdynbss
- || (!info->shared && !htab->srelbss))
- abort ();
-
- return TRUE;
-}
-
-/* Copy the extra info we tack onto an elf_link_hash_entry. */
-
-static void
-elf32_arm_copy_indirect_symbol (const struct elf_backend_data *bed,
- struct elf_link_hash_entry *dir,
- struct elf_link_hash_entry *ind)
-{
- struct elf32_arm_link_hash_entry *edir, *eind;
-
- edir = (struct elf32_arm_link_hash_entry *) dir;
- eind = (struct elf32_arm_link_hash_entry *) ind;
-
- if (eind->relocs_copied != NULL)
- {
- if (edir->relocs_copied != NULL)
- {
- struct elf32_arm_relocs_copied **pp;
- struct elf32_arm_relocs_copied *p;
-
- if (ind->root.type == bfd_link_hash_indirect)
- abort ();
-
- /* Add reloc counts against the weak sym to the strong sym
- list. Merge any entries against the same section. */
- for (pp = &eind->relocs_copied; (p = *pp) != NULL; )
- {
- struct elf32_arm_relocs_copied *q;
-
- for (q = edir->relocs_copied; q != NULL; q = q->next)
- if (q->section == p->section)
- {
- q->count += p->count;
- *pp = p->next;
- break;
- }
- if (q == NULL)
- pp = &p->next;
- }
- *pp = edir->relocs_copied;
- }
-
- edir->relocs_copied = eind->relocs_copied;
- eind->relocs_copied = NULL;
- }
-
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
-}
-
-/* Create an ARM elf linker hash table. */
-
-static struct bfd_link_hash_table *
-elf32_arm_link_hash_table_create (abfd)
- bfd *abfd;
-{
- struct elf32_arm_link_hash_table *ret;
- bfd_size_type amt = sizeof (struct elf32_arm_link_hash_table);
-
- ret = (struct elf32_arm_link_hash_table *) bfd_malloc (amt);
- if (ret == (struct elf32_arm_link_hash_table *) NULL)
- return NULL;
-
- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
- elf32_arm_link_hash_newfunc))
- {
- free (ret);
- return NULL;
- }
-
- ret->sgot = NULL;
- ret->sgotplt = NULL;
- ret->srelgot = NULL;
- ret->splt = NULL;
- ret->srelplt = NULL;
- ret->sdynbss = NULL;
- ret->srelbss = NULL;
- ret->thumb_glue_size = 0;
- ret->arm_glue_size = 0;
- ret->bfd_of_glue_owner = NULL;
- ret->no_pipeline_knowledge = 0;
- ret->sym_sec.abfd = NULL;
-
- return &ret->root.root;
-}
-
-/* Locate the Thumb encoded calling stub for NAME. */
-
-static struct elf_link_hash_entry *
-find_thumb_glue (link_info, name, input_bfd)
- struct bfd_link_info *link_info;
- const char *name;
- bfd *input_bfd;
-{
- char *tmp_name;
- struct elf_link_hash_entry *hash;
- struct elf32_arm_link_hash_table *hash_table;
-
- /* We need a pointer to the armelf specific hash table. */
- hash_table = elf32_arm_hash_table (link_info);
-
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
-
- BFD_ASSERT (tmp_name);
-
- sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
-
- hash = elf_link_hash_lookup
- (&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
-
- if (hash == NULL)
- /* xgettext:c-format */
- (*_bfd_error_handler) (_("%s: unable to find THUMB glue '%s' for `%s'"),
- bfd_archive_filename (input_bfd), tmp_name, name);
-
- free (tmp_name);
-
- return hash;
-}
-
-/* Locate the ARM encoded calling stub for NAME. */
-
-static struct elf_link_hash_entry *
-find_arm_glue (link_info, name, input_bfd)
- struct bfd_link_info *link_info;
- const char *name;
- bfd *input_bfd;
-{
- char *tmp_name;
- struct elf_link_hash_entry *myh;
- struct elf32_arm_link_hash_table *hash_table;
-
- /* We need a pointer to the elfarm specific hash table. */
- hash_table = elf32_arm_hash_table (link_info);
-
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
-
- BFD_ASSERT (tmp_name);
-
- sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
-
- myh = elf_link_hash_lookup
- (&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
-
- if (myh == NULL)
- /* xgettext:c-format */
- (*_bfd_error_handler) (_("%s: unable to find ARM glue '%s' for `%s'"),
- bfd_archive_filename (input_bfd), tmp_name, name);
-
- free (tmp_name);
-
- return myh;
-}
-
-/* ARM->Thumb glue:
-
- .arm
- __func_from_arm:
- ldr r12, __func_addr
- bx r12
- __func_addr:
- .word func @ behave as if you saw a ARM_32 reloc. */
-
-#define ARM2THUMB_GLUE_SIZE 12
-static const insn32 a2t1_ldr_insn = 0xe59fc000;
-static const insn32 a2t2_bx_r12_insn = 0xe12fff1c;
-static const insn32 a2t3_func_addr_insn = 0x00000001;
-
-/* Thumb->ARM: Thumb->(non-interworking aware) ARM
-
- .thumb .thumb
- .align 2 .align 2
- __func_from_thumb: __func_from_thumb:
- bx pc push {r6, lr}
- nop ldr r6, __func_addr
- .arm mov lr, pc
- __func_change_to_arm: bx r6
- b func .arm
- __func_back_to_thumb:
- ldmia r13! {r6, lr}
- bx lr
- __func_addr:
- .word func */
-
-#define THUMB2ARM_GLUE_SIZE 8
-static const insn16 t2a1_bx_pc_insn = 0x4778;
-static const insn16 t2a2_noop_insn = 0x46c0;
-static const insn32 t2a3_b_insn = 0xea000000;
-
-#ifndef ELFARM_NABI_C_INCLUDED
-bfd_boolean
-bfd_elf32_arm_allocate_interworking_sections (info)
- struct bfd_link_info * info;
-{
- asection * s;
- bfd_byte * foo;
- struct elf32_arm_link_hash_table * globals;
-
- globals = elf32_arm_hash_table (info);
-
- BFD_ASSERT (globals != NULL);
-
- if (globals->arm_glue_size != 0)
- {
- BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
- ARM2THUMB_GLUE_SECTION_NAME);
-
- BFD_ASSERT (s != NULL);
-
- foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner,
- globals->arm_glue_size);
-
- s->_raw_size = s->_cooked_size = globals->arm_glue_size;
- s->contents = foo;
- }
-
- if (globals->thumb_glue_size != 0)
- {
- BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
- s = bfd_get_section_by_name
- (globals->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME);
-
- BFD_ASSERT (s != NULL);
-
- foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner,
- globals->thumb_glue_size);
-
- s->_raw_size = s->_cooked_size = globals->thumb_glue_size;
- s->contents = foo;
- }
-
- return TRUE;
-}
-
-static void
-record_arm_to_thumb_glue (link_info, h)
- struct bfd_link_info * link_info;
- struct elf_link_hash_entry * h;
-{
- const char * name = h->root.root.string;
- asection * s;
- char * tmp_name;
- struct elf_link_hash_entry * myh;
- struct bfd_link_hash_entry * bh;
- struct elf32_arm_link_hash_table * globals;
- bfd_vma val;
-
- globals = elf32_arm_hash_table (link_info);
-
- BFD_ASSERT (globals != NULL);
- BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
- s = bfd_get_section_by_name
- (globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME);
-
- BFD_ASSERT (s != NULL);
-
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
-
- BFD_ASSERT (tmp_name);
-
- sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
-
- myh = elf_link_hash_lookup
- (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
-
- if (myh != NULL)
- {
- /* We've already seen this guy. */
- free (tmp_name);
- return;
- }
-
- /* The only trick here is using hash_table->arm_glue_size as the value. Even
- though the section isn't allocated yet, this is where we will be putting
- it. */
- bh = NULL;
- val = globals->arm_glue_size + 1;
- _bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner,
- tmp_name, BSF_GLOBAL, s, val,
- NULL, TRUE, FALSE, &bh);
-
- free (tmp_name);
-
- globals->arm_glue_size += ARM2THUMB_GLUE_SIZE;
-
- return;
-}
-
-static void
-record_thumb_to_arm_glue (link_info, h)
- struct bfd_link_info *link_info;
- struct elf_link_hash_entry *h;
-{
- const char *name = h->root.root.string;
- asection *s;
- char *tmp_name;
- struct elf_link_hash_entry *myh;
- struct bfd_link_hash_entry *bh;
- struct elf32_arm_link_hash_table *hash_table;
- char bind;
- bfd_vma val;
-
- hash_table = elf32_arm_hash_table (link_info);
-
- BFD_ASSERT (hash_table != NULL);
- BFD_ASSERT (hash_table->bfd_of_glue_owner != NULL);
-
- s = bfd_get_section_by_name
- (hash_table->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME);
-
- BFD_ASSERT (s != NULL);
-
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
-
- BFD_ASSERT (tmp_name);
-
- sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
-
- myh = elf_link_hash_lookup
- (&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
-
- if (myh != NULL)
- {
- /* We've already seen this guy. */
- free (tmp_name);
- return;
- }
-
- bh = NULL;
- val = hash_table->thumb_glue_size + 1;
- _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
- tmp_name, BSF_GLOBAL, s, val,
- NULL, TRUE, FALSE, &bh);
-
- /* If we mark it 'Thumb', the disassembler will do a better job. */
- myh = (struct elf_link_hash_entry *) bh;
- bind = ELF_ST_BIND (myh->type);
- myh->type = ELF_ST_INFO (bind, STT_ARM_TFUNC);
-
- free (tmp_name);
-
-#define CHANGE_TO_ARM "__%s_change_to_arm"
-#define BACK_FROM_ARM "__%s_back_from_arm"
-
- /* Allocate another symbol to mark where we switch to Arm mode. */
- tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
- + strlen (CHANGE_TO_ARM) + 1);
-
- BFD_ASSERT (tmp_name);
-
- sprintf (tmp_name, CHANGE_TO_ARM, name);
-
- bh = NULL;
- val = hash_table->thumb_glue_size + 4,
- _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
- tmp_name, BSF_LOCAL, s, val,
- NULL, TRUE, FALSE, &bh);
-
- free (tmp_name);
-
- hash_table->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
-
- return;
-}
-
-/* Add the glue sections to ABFD. This function is called from the
- linker scripts in ld/emultempl/{armelf}.em. */
-
-bfd_boolean
-bfd_elf32_arm_add_glue_sections_to_bfd (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
- flagword flags;
- asection *sec;
-
- /* If we are only performing a partial
- link do not bother adding the glue. */
- if (info->relocatable)
- return TRUE;
-
- sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME);
-
- if (sec == NULL)
- {
- /* Note: we do not include the flag SEC_LINKER_CREATED, as this
- will prevent elf_link_input_bfd() from processing the contents
- of this section. */
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
-
- sec = bfd_make_section (abfd, ARM2THUMB_GLUE_SECTION_NAME);
-
- if (sec == NULL
- || !bfd_set_section_flags (abfd, sec, flags)
- || !bfd_set_section_alignment (abfd, sec, 2))
- return FALSE;
-
- /* Set the gc mark to prevent the section from being removed by garbage
- collection, despite the fact that no relocs refer to this section. */
- sec->gc_mark = 1;
- }
-
- sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME);
-
- if (sec == NULL)
- {
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
-
- sec = bfd_make_section (abfd, THUMB2ARM_GLUE_SECTION_NAME);
-
- if (sec == NULL
- || !bfd_set_section_flags (abfd, sec, flags)
- || !bfd_set_section_alignment (abfd, sec, 2))
- return FALSE;
-
- sec->gc_mark = 1;
- }
-
- return TRUE;
-}
-
-/* Select a BFD to be used to hold the sections used by the glue code.
- This function is called from the linker scripts in ld/emultempl/
- {armelf/pe}.em */
-
-bfd_boolean
-bfd_elf32_arm_get_bfd_for_interworking (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
- struct elf32_arm_link_hash_table *globals;
-
- /* If we are only performing a partial link
- do not bother getting a bfd to hold the glue. */
- if (info->relocatable)
- return TRUE;
-
- globals = elf32_arm_hash_table (info);
-
- BFD_ASSERT (globals != NULL);
-
- if (globals->bfd_of_glue_owner != NULL)
- return TRUE;
-
- /* Save the bfd for later use. */
- globals->bfd_of_glue_owner = abfd;
-
- return TRUE;
-}
-
-bfd_boolean
-bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge)
- bfd *abfd;
- struct bfd_link_info *link_info;
- int no_pipeline_knowledge;
-{
- Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Rela *internal_relocs = NULL;
- Elf_Internal_Rela *irel, *irelend;
- bfd_byte *contents = NULL;
-
- asection *sec;
- struct elf32_arm_link_hash_table *globals;
-
- /* If we are only performing a partial link do not bother
- to construct any glue. */
- if (link_info->relocatable)
- return TRUE;
-
- /* Here we have a bfd that is to be included on the link. We have a hook
- to do reloc rummaging, before section sizes are nailed down. */
- globals = elf32_arm_hash_table (link_info);
-
- BFD_ASSERT (globals != NULL);
- BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
- globals->no_pipeline_knowledge = no_pipeline_knowledge;
-
- /* Rummage around all the relocs and map the glue vectors. */
- sec = abfd->sections;
-
- if (sec == NULL)
- return TRUE;
-
- for (; sec != NULL; sec = sec->next)
- {
- if (sec->reloc_count == 0)
- continue;
-
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-
- /* Load the relocs. */
- internal_relocs
- = _bfd_elf_link_read_relocs (abfd, sec, (PTR) NULL,
- (Elf_Internal_Rela *) NULL, FALSE);
-
- if (internal_relocs == NULL)
- goto error_return;
-
- irelend = internal_relocs + sec->reloc_count;
- for (irel = internal_relocs; irel < irelend; irel++)
- {
- long r_type;
- unsigned long r_index;
-
- struct elf_link_hash_entry *h;
-
- r_type = ELF32_R_TYPE (irel->r_info);
- r_index = ELF32_R_SYM (irel->r_info);
-
- /* These are the only relocation types we care about. */
- if ( r_type != R_ARM_PC24
- && r_type != R_ARM_THM_PC22)
- continue;
-
- /* Get the section contents if we haven't done so already. */
- if (contents == NULL)
- {
- /* Get cached copy if it exists. */
- if (elf_section_data (sec)->this_hdr.contents != NULL)
- contents = elf_section_data (sec)->this_hdr.contents;
- else
- {
- /* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (!bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
- goto error_return;
- }
- }
-
- /* If the relocation is not against a symbol it cannot concern us. */
- h = NULL;
-
- /* We don't care about local symbols. */
- if (r_index < symtab_hdr->sh_info)
- continue;
-
- /* This is an external symbol. */
- r_index -= symtab_hdr->sh_info;
- h = (struct elf_link_hash_entry *)
- elf_sym_hashes (abfd)[r_index];
-
- /* If the relocation is against a static symbol it must be within
- the current section and so cannot be a cross ARM/Thumb relocation. */
- if (h == NULL)
- continue;
-
- switch (r_type)
- {
- case R_ARM_PC24:
- /* This one is a call from arm code. We need to look up
- the target of the call. If it is a thumb target, we
- insert glue. */
- if (ELF_ST_TYPE(h->type) == STT_ARM_TFUNC)
- record_arm_to_thumb_glue (link_info, h);
- break;
-
- case R_ARM_THM_PC22:
- /* This one is a call from thumb code. We look
- up the target of the call. If it is not a thumb
- target, we insert glue. */
- if (ELF_ST_TYPE (h->type) != STT_ARM_TFUNC)
- record_thumb_to_arm_glue (link_info, h);
- break;
-
- default:
- break;
- }
- }
-
- if (contents != NULL
- && elf_section_data (sec)->this_hdr.contents != contents)
- free (contents);
- contents = NULL;
-
- if (internal_relocs != NULL
- && elf_section_data (sec)->relocs != internal_relocs)
- free (internal_relocs);
- internal_relocs = NULL;
- }
-
- return TRUE;
-
-error_return:
- 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;
-}
-#endif
-
-/* The thumb form of a long branch is a bit finicky, because the offset
- encoding is split over two fields, each in it's own instruction. They
- can occur in any order. So given a thumb form of long branch, and an
- offset, insert the offset into the thumb branch and return finished
- instruction.
-
- It takes two thumb instructions to encode the target address. Each has
- 11 bits to invest. The upper 11 bits are stored in one (identified by
- H-0.. see below), the lower 11 bits are stored in the other (identified
- by H-1).
-
- Combine together and shifted left by 1 (it's a half word address) and
- there you have it.
-
- Op: 1111 = F,
- H-0, upper address-0 = 000
- Op: 1111 = F,
- H-1, lower address-0 = 800
-
- They can be ordered either way, but the arm tools I've seen always put
- the lower one first. It probably doesn't matter. krk@cygnus.com
-
- XXX: Actually the order does matter. The second instruction (H-1)
- moves the computed address into the PC, so it must be the second one
- in the sequence. The problem, however is that whilst little endian code
- stores the instructions in HI then LOW order, big endian code does the
- reverse. nickc@cygnus.com. */
-
-#define LOW_HI_ORDER 0xF800F000
-#define HI_LOW_ORDER 0xF000F800
-
-static insn32
-insert_thumb_branch (br_insn, rel_off)
- insn32 br_insn;
- int rel_off;
-{
- unsigned int low_bits;
- unsigned int high_bits;
-
- BFD_ASSERT ((rel_off & 1) != 1);
-
- rel_off >>= 1; /* Half word aligned address. */
- low_bits = rel_off & 0x000007FF; /* The bottom 11 bits. */
- high_bits = (rel_off >> 11) & 0x000007FF; /* The top 11 bits. */
-
- if ((br_insn & LOW_HI_ORDER) == LOW_HI_ORDER)
- br_insn = LOW_HI_ORDER | (low_bits << 16) | high_bits;
- else if ((br_insn & HI_LOW_ORDER) == HI_LOW_ORDER)
- br_insn = HI_LOW_ORDER | (high_bits << 16) | low_bits;
- else
- /* FIXME: abort is probably not the right call. krk@cygnus.com */
- abort (); /* error - not a valid branch instruction form. */
-
- return br_insn;
-}
-
-/* Thumb code calling an ARM function. */
-
-static int
-elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
- hit_data, sym_sec, offset, addend, val)
- struct bfd_link_info * info;
- const char * name;
- bfd * input_bfd;
- bfd * output_bfd;
- asection * input_section;
- bfd_byte * hit_data;
- asection * sym_sec;
- bfd_vma offset;
- bfd_signed_vma addend;
- bfd_vma val;
-{
- asection * s = 0;
- bfd_vma my_offset;
- unsigned long int tmp;
- long int ret_offset;
- struct elf_link_hash_entry * myh;
- struct elf32_arm_link_hash_table * globals;
-
- myh = find_thumb_glue (info, name, input_bfd);
- if (myh == NULL)
- return FALSE;
-
- globals = elf32_arm_hash_table (info);
-
- BFD_ASSERT (globals != NULL);
- BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
- my_offset = myh->root.u.def.value;
-
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
- THUMB2ARM_GLUE_SECTION_NAME);
-
- BFD_ASSERT (s != NULL);
- BFD_ASSERT (s->contents != NULL);
- BFD_ASSERT (s->output_section != NULL);
-
- if ((my_offset & 0x01) == 0x01)
- {
- if (sym_sec != NULL
- && sym_sec->owner != NULL
- && !INTERWORK_FLAG (sym_sec->owner))
- {
- (*_bfd_error_handler)
- (_("%s(%s): warning: interworking not enabled."),
- bfd_archive_filename (sym_sec->owner), name);
- (*_bfd_error_handler)
- (_(" first occurrence: %s: thumb call to arm"),
- bfd_archive_filename (input_bfd));
-
- return FALSE;
- }
-
- --my_offset;
- myh->root.u.def.value = my_offset;
-
- bfd_put_16 (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);
-
- ret_offset =
- /* Address of destination of the stub. */
- ((bfd_signed_vma) val)
- - ((bfd_signed_vma)
- /* Offset from the start of the current section to the start of the stubs. */
- (s->output_offset
- /* Offset of the start of this stub from the start of the stubs. */
- + my_offset
- /* Address of the start of the current section. */
- + s->output_section->vma)
- /* The branch instruction is 4 bytes into the stub. */
- + 4
- /* ARM branches work from the pc of the instruction + 8. */
- + 8);
-
- bfd_put_32 (output_bfd,
- (bfd_vma) t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
- s->contents + my_offset + 4);
- }
-
- BFD_ASSERT (my_offset <= globals->thumb_glue_size);
-
- /* Now go back and fix up the original BL insn to point to here. */
- ret_offset =
- /* Address of where the stub is located. */
- (s->output_section->vma + s->output_offset + my_offset)
- /* Address of where the BL is located. */
- - (input_section->output_section->vma + input_section->output_offset + offset)
- /* Addend in the relocation. */
- - addend
- /* Biassing for PC-relative addressing. */
- - 8;
-
- tmp = bfd_get_32 (input_bfd, hit_data
- - input_section->vma);
-
- bfd_put_32 (output_bfd,
- (bfd_vma) insert_thumb_branch (tmp, ret_offset),
- hit_data - input_section->vma);
-
- return TRUE;
-}
-
-/* Arm code calling a Thumb function. */
-
-static int
-elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section,
- hit_data, sym_sec, offset, addend, val)
- struct bfd_link_info * info;
- const char * name;
- bfd * input_bfd;
- bfd * output_bfd;
- asection * input_section;
- bfd_byte * hit_data;
- asection * sym_sec;
- bfd_vma offset;
- bfd_signed_vma addend;
- bfd_vma val;
-{
- unsigned long int tmp;
- 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);
- if (myh == NULL)
- return FALSE;
-
- globals = elf32_arm_hash_table (info);
-
- BFD_ASSERT (globals != NULL);
- BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
-
- my_offset = myh->root.u.def.value;
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
- ARM2THUMB_GLUE_SECTION_NAME);
- BFD_ASSERT (s != NULL);
- BFD_ASSERT (s->contents != NULL);
- BFD_ASSERT (s->output_section != NULL);
-
- if ((my_offset & 0x01) == 0x01)
- {
- if (sym_sec != NULL
- && sym_sec->owner != NULL
- && !INTERWORK_FLAG (sym_sec->owner))
- {
- (*_bfd_error_handler)
- (_("%s(%s): warning: interworking not enabled."),
- bfd_archive_filename (sym_sec->owner), name);
- (*_bfd_error_handler)
- (_(" first occurrence: %s: arm call to thumb"),
- bfd_archive_filename (input_bfd));
- }
-
- --my_offset;
- myh->root.u.def.value = my_offset;
-
- bfd_put_32 (output_bfd, (bfd_vma) a2t1_ldr_insn,
- s->contents + my_offset);
-
- bfd_put_32 (output_bfd, (bfd_vma) a2t2_bx_r12_insn,
- s->contents + my_offset + 4);
-
- /* It's a thumb address. Add the low order bit. */
- bfd_put_32 (output_bfd, val | a2t3_func_addr_insn,
- s->contents + my_offset + 8);
- }
-
- BFD_ASSERT (my_offset <= globals->arm_glue_size);
-
- tmp = bfd_get_32 (input_bfd, hit_data);
- tmp = tmp & 0xFF000000;
-
- /* Somehow these are both 4 too far, so subtract 8. */
- ret_offset = (s->output_offset
- + my_offset
- + s->output_section->vma
- - (input_section->output_offset
- + input_section->output_section->vma
- + offset + addend)
- - 8);
-
- tmp = tmp | ((ret_offset >> 2) & 0x00FFFFFF);
-
- bfd_put_32 (output_bfd, (bfd_vma) tmp, hit_data - input_section->vma);
-
- return TRUE;
-}
-
-/* Perform a relocation as part of a final link. */
-
-static bfd_reloc_status_type
-elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
- input_section, contents, rel, value,
- info, sym_sec, sym_name, sym_flags, h)
- reloc_howto_type * howto;
- bfd * input_bfd;
- bfd * output_bfd;
- asection * input_section;
- bfd_byte * contents;
- Elf_Internal_Rela * rel;
- bfd_vma value;
- struct bfd_link_info * info;
- asection * sym_sec;
- const char * sym_name;
- int sym_flags;
- struct elf_link_hash_entry * h;
-{
- unsigned long r_type = howto->type;
- unsigned long r_symndx;
- bfd_byte * hit_data = contents + rel->r_offset;
- bfd * dynobj = NULL;
- Elf_Internal_Shdr * symtab_hdr;
- struct elf_link_hash_entry ** sym_hashes;
- bfd_vma * local_got_offsets;
- asection * sgot = NULL;
- asection * splt = NULL;
- asection * sreloc = NULL;
- bfd_vma addend;
- bfd_signed_vma signed_addend;
- struct elf32_arm_link_hash_table * globals;
-
- /* If the start address has been set, then set the EF_ARM_HASENTRY
- flag. Setting this more than once is redundant, but the cost is
- not too high, and it keeps the code simple.
-
- The test is done here, rather than somewhere else, because the
- start address is only set just before the final link commences.
-
- Note - if the user deliberately sets a start address of 0, the
- flag will not be set. */
- if (bfd_get_start_address (output_bfd) != 0)
- elf_elfheader (output_bfd)->e_flags |= EF_ARM_HASENTRY;
-
- globals = elf32_arm_hash_table (info);
-
- dynobj = elf_hash_table (info)->dynobj;
- if (dynobj)
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
- splt = bfd_get_section_by_name (dynobj, ".plt");
- }
- symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (input_bfd);
- local_got_offsets = elf_local_got_offsets (input_bfd);
- r_symndx = ELF32_R_SYM (rel->r_info);
-
-#if USE_REL
- addend = bfd_get_32 (input_bfd, hit_data) & howto->src_mask;
-
- if (addend & ((howto->src_mask + 1) >> 1))
- {
- signed_addend = -1;
- signed_addend &= ~ howto->src_mask;
- signed_addend |= addend;
- }
- else
- signed_addend = addend;
-#else
- addend = signed_addend = rel->r_addend;
-#endif
-
- switch (r_type)
- {
- case R_ARM_NONE:
- return bfd_reloc_ok;
-
- case R_ARM_PC24:
- case R_ARM_ABS32:
- case R_ARM_REL32:
-#ifndef OLD_ARM_ABI
- case R_ARM_XPC25:
-#endif
- 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)
- && h != NULL
- && splt != NULL
- && h->plt.offset != (bfd_vma) -1)
- {
- /* If we've created a .plt section, and assigned a PLT entry to
- this function, it should not be known to bind locally. If
- it were, we would have cleared the PLT entry. */
- BFD_ASSERT (!SYMBOL_CALLS_LOCAL (info, h));
-
- value = (splt->output_section->vma
- + splt->output_offset
- + h->plt.offset);
- return _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, value,
- (bfd_vma) 0);
- }
-
- /* When generating a shared object, these relocations are copied
- into the output file to be resolved at run time. */
- if (info->shared
- && (input_section->flags & SEC_ALLOC)
- && (r_type != R_ARM_REL32
- || !SYMBOL_CALLS_LOCAL (info, h))
- && (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak)
- && r_type != R_ARM_PC24
- && r_type != R_ARM_PLT32)
- {
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
- bfd_boolean skip, relocate;
-
- if (sreloc == NULL)
- {
- const char * name;
-
- name = (bfd_elf_string_from_elf_section
- (input_bfd,
- elf_elfheader (input_bfd)->e_shstrndx,
- elf_section_data (input_section)->rel_hdr.sh_name));
- if (name == NULL)
- return bfd_reloc_notsupported;
-
- BFD_ASSERT (strncmp (name, ".rel", 4) == 0
- && strcmp (bfd_get_section_name (input_bfd,
- input_section),
- name + 4) == 0);
-
- sreloc = bfd_get_section_by_name (dynobj, name);
- BFD_ASSERT (sreloc != NULL);
- }
-
- skip = FALSE;
- relocate = FALSE;
-
- outrel.r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section,
- rel->r_offset);
- if (outrel.r_offset == (bfd_vma) -1)
- skip = TRUE;
- else if (outrel.r_offset == (bfd_vma) -2)
- skip = TRUE, relocate = TRUE;
- outrel.r_offset += (input_section->output_section->vma
- + input_section->output_offset);
-
- if (skip)
- memset (&outrel, 0, sizeof outrel);
- else if (h != NULL
- && h->dynindx != -1
- && (!info->shared
- || !info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
- outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
- else
- {
- /* This symbol is local, or marked to become local. */
- relocate = TRUE;
- outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
- }
-
- loc = sreloc->contents;
- loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rel);
- bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
-
- /* If this reloc is against an external symbol, we do not want to
- fiddle with the addend. Otherwise, we need to include the symbol
- value so that it becomes an addend for the dynamic reloc. */
- if (! relocate)
- return bfd_reloc_ok;
-
- return _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, value,
- (bfd_vma) 0);
- }
- else switch (r_type)
- {
-#ifndef OLD_ARM_ABI
- case R_ARM_XPC25: /* Arm BLX instruction. */
-#endif
- case R_ARM_PC24: /* Arm B/BL instruction */
- case R_ARM_PLT32:
-#ifndef OLD_ARM_ABI
- if (r_type == R_ARM_XPC25)
- {
- /* Check for Arm calling Arm function. */
- /* FIXME: Should we translate the instruction into a BL
- instruction instead ? */
- if (sym_flags != STT_ARM_TFUNC)
- (*_bfd_error_handler) (_("\
-%s: Warning: Arm BLX instruction targets Arm function '%s'."),
- bfd_archive_filename (input_bfd),
- h ? h->root.root.string : "(local)");
- }
- else
-#endif
- {
- /* Check for Arm calling Thumb function. */
- if (sym_flags == STT_ARM_TFUNC)
- {
- elf32_arm_to_thumb_stub (info, sym_name, input_bfd, output_bfd,
- input_section, hit_data, sym_sec, rel->r_offset,
- signed_addend, value);
- return bfd_reloc_ok;
- }
- }
-
- if ( strcmp (bfd_get_target (input_bfd), "elf32-littlearm-oabi") == 0
- || strcmp (bfd_get_target (input_bfd), "elf32-bigarm-oabi") == 0)
- {
- /* The old way of doing things. Trearing the addend as a
- byte sized field and adding in the pipeline offset. */
- value -= (input_section->output_section->vma
- + input_section->output_offset);
- value -= rel->r_offset;
- value += addend;
-
- if (! globals->no_pipeline_knowledge)
- value -= 8;
- }
- else
- {
- /* The ARM ELF ABI says that this reloc is computed as: S - P + A
- where:
- S is the address of the symbol in the relocation.
- P is address of the instruction being relocated.
- A is the addend (extracted from the instruction) in bytes.
-
- S is held in 'value'.
- P is the base address of the section containing the instruction
- plus the offset of the reloc into that section, ie:
- (input_section->output_section->vma +
- input_section->output_offset +
- rel->r_offset).
- A is the addend, converted into bytes, ie:
- (signed_addend * 4)
-
- Note: None of these operations have knowledge of the pipeline
- size of the processor, thus it is up to the assembler to encode
- this information into the addend. */
- value -= (input_section->output_section->vma
- + input_section->output_offset);
- value -= rel->r_offset;
- value += (signed_addend << howto->size);
-
- /* Previous versions of this code also used to add in the pipeline
- offset here. This is wrong because the linker is not supposed
- to know about such things, and one day it might change. In order
- to support old binaries that need the old behaviour however, so
- we attempt to detect which ABI was used to create the reloc. */
- if (! globals->no_pipeline_knowledge)
- {
- Elf_Internal_Ehdr * i_ehdrp; /* Elf file header, internal form */
-
- i_ehdrp = elf_elfheader (input_bfd);
-
- if (i_ehdrp->e_ident[EI_OSABI] == 0)
- value -= 8;
- }
- }
-
- 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)
- {
- /* 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;
- }
-
-#ifndef OLD_ARM_ABI
- /* If necessary set the H bit in the BLX instruction. */
- if (r_type == R_ARM_XPC25 && ((value & 2) == 2))
- value = (signed_addend & howto->dst_mask)
- | (bfd_get_32 (input_bfd, hit_data) & (~ howto->dst_mask))
- | (1 << 24);
- else
-#endif
- value = (signed_addend & howto->dst_mask)
- | (bfd_get_32 (input_bfd, hit_data) & (~ howto->dst_mask));
- break;
-
- case R_ARM_ABS32:
- value += addend;
- if (sym_flags == STT_ARM_TFUNC)
- value |= 1;
- break;
-
- case R_ARM_REL32:
- value -= (input_section->output_section->vma
- + input_section->output_offset + rel->r_offset);
- value += addend;
- break;
- }
-
- bfd_put_32 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_ARM_ABS8:
- value += addend;
- if ((long) value > 0x7f || (long) value < -0x80)
- return bfd_reloc_overflow;
-
- bfd_put_8 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_ARM_ABS16:
- value += addend;
-
- if ((long) value > 0x7fff || (long) value < -0x8000)
- return bfd_reloc_overflow;
-
- bfd_put_16 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_ARM_ABS12:
- /* Support ldr and str instruction for the arm */
- /* Also thumb b (unconditional branch). ??? Really? */
- value += addend;
-
- if ((long) value > 0x7ff || (long) value < -0x800)
- return bfd_reloc_overflow;
-
- value |= (bfd_get_32 (input_bfd, hit_data) & 0xfffff000);
- bfd_put_32 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
- case R_ARM_THM_ABS5:
- /* Support ldr and str instructions for the thumb. */
-#if USE_REL
- /* Need to refetch addend. */
- addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
- /* ??? Need to determine shift amount from operand size. */
- addend >>= howto->rightshift;
-#endif
- value += addend;
-
- /* ??? Isn't value unsigned? */
- if ((long) value > 0x1f || (long) value < -0x10)
- return bfd_reloc_overflow;
-
- /* ??? Value needs to be properly shifted into place first. */
- value |= bfd_get_16 (input_bfd, hit_data) & 0xf83f;
- bfd_put_16 (input_bfd, value, hit_data);
- return bfd_reloc_ok;
-
-#ifndef OLD_ARM_ABI
- case R_ARM_THM_XPC22:
-#endif
- case R_ARM_THM_PC22:
- /* Thumb BL (branch long instruction). */
- {
- bfd_vma relocation;
- 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 signed_check;
-
-#if USE_REL
- /* Need to refetch the addend and squish the two 11 bit pieces
- together. */
- {
- bfd_vma upper = upper_insn & 0x7ff;
- bfd_vma lower = lower_insn & 0x7ff;
- upper = (upper ^ 0x400) - 0x400; /* Sign extend. */
- addend = (upper << 12) | (lower << 1);
- signed_addend = addend;
- }
-#endif
-#ifndef OLD_ARM_ABI
- if (r_type == R_ARM_THM_XPC22)
- {
- /* Check for Thumb to Thumb call. */
- /* FIXME: Should we translate the instruction into a BL
- instruction instead ? */
- if (sym_flags == STT_ARM_TFUNC)
- (*_bfd_error_handler) (_("\
-%s: Warning: Thumb BLX instruction targets thumb function '%s'."),
- bfd_archive_filename (input_bfd),
- h ? h->root.root.string : "(local)");
- }
- else
-#endif
- {
- /* If it is not a call to Thumb, assume call to Arm.
- If it is a call relative to a section name, then it is not a
- function call at all, but rather a long jump. */
- if (sym_flags != STT_ARM_TFUNC && sym_flags != STT_SECTION)
- {
- if (elf32_thumb_to_arm_stub
- (info, sym_name, input_bfd, output_bfd, input_section,
- hit_data, sym_sec, rel->r_offset, signed_addend, value))
- return bfd_reloc_ok;
- else
- return bfd_reloc_dangerous;
- }
- }
-
- relocation = value + signed_addend;
-
- relocation -= (input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset);
-
- if (! globals->no_pipeline_knowledge)
- {
- Elf_Internal_Ehdr * i_ehdrp; /* Elf file header, internal form. */
-
- i_ehdrp = elf_elfheader (input_bfd);
-
- /* Previous versions of this code also used to add in the pipline
- offset here. This is wrong because the linker is not supposed
- to know about such things, and one day it might change. In order
- to support old binaries that need the old behaviour however, so
- we attempt to detect which ABI was used to create the reloc. */
- if ( strcmp (bfd_get_target (input_bfd), "elf32-littlearm-oabi") == 0
- || strcmp (bfd_get_target (input_bfd), "elf32-bigarm-oabi") == 0
- || i_ehdrp->e_ident[EI_OSABI] == 0)
- relocation += 4;
- }
-
- check = relocation >> howto->rightshift;
-
- /* If this is a signed value, the rightshift just dropped
- leading 1 bits (assuming twos complement). */
- if ((bfd_signed_vma) relocation >= 0)
- signed_check = check;
- else
- signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
-
- /* Assumes two's complement. */
- if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
- overflow = TRUE;
-
-#ifndef OLD_ARM_ABI
- if (r_type == R_ARM_THM_XPC22
- && ((lower_insn & 0x1800) == 0x0800))
- /* For a BLX instruction, make sure that the relocation is rounded up
- to a word boundary. This follows the semantics of the instruction
- which specifies that bit 1 of the target address will come from bit
- 1 of the base address. */
- relocation = (relocation + 2) & ~ 3;
-#endif
- /* Put RELOCATION back into the insn. */
- upper_insn = (upper_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 12) & 0x7ff);
- lower_insn = (lower_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 1) & 0x7ff);
-
- /* Put the relocated value back in the object file: */
- bfd_put_16 (input_bfd, upper_insn, hit_data);
- bfd_put_16 (input_bfd, lower_insn, hit_data + 2);
-
- return (overflow ? bfd_reloc_overflow : bfd_reloc_ok);
- }
- break;
-
- case R_ARM_THM_PC11:
- /* Thumb B (branch) instruction). */
- {
- bfd_signed_vma relocation;
- bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
- bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
- bfd_signed_vma signed_check;
-
-#if USE_REL
- /* Need to refetch addend. */
- addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
- if (addend & ((howto->src_mask + 1) >> 1))
- {
- signed_addend = -1;
- signed_addend &= ~ howto->src_mask;
- signed_addend |= addend;
- }
- else
- signed_addend = addend;
- /* The value in the insn has been right shifted. We need to
- undo this, so that we can perform the address calculation
- in terms of bytes. */
- signed_addend <<= howto->rightshift;
-#endif
- relocation = value + signed_addend;
-
- relocation -= (input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset);
-
- relocation >>= howto->rightshift;
- signed_check = relocation;
- relocation &= howto->dst_mask;
- relocation |= (bfd_get_16 (input_bfd, hit_data) & (~ howto->dst_mask));
-
- bfd_put_16 (input_bfd, relocation, hit_data);
-
- /* Assumes two's complement. */
- if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
- return bfd_reloc_overflow;
-
- return bfd_reloc_ok;
- }
-
- case R_ARM_GNU_VTINHERIT:
- case R_ARM_GNU_VTENTRY:
- return bfd_reloc_ok;
-
- case R_ARM_COPY:
- return bfd_reloc_notsupported;
-
- case R_ARM_GLOB_DAT:
- return bfd_reloc_notsupported;
-
- case R_ARM_JUMP_SLOT:
- return bfd_reloc_notsupported;
-
- case R_ARM_RELATIVE:
- return bfd_reloc_notsupported;
-
- case R_ARM_GOTOFF:
- /* Relocation is relative to the start of the
- global offset table. */
-
- BFD_ASSERT (sgot != NULL);
- if (sgot == NULL)
- return bfd_reloc_notsupported;
-
- /* If we are addressing a Thumb function, we need to adjust the
- address by one, so that attempts to call the function pointer will
- correctly interpret it as Thumb code. */
- if (sym_flags == STT_ARM_TFUNC)
- value += 1;
-
- /* Note that sgot->output_offset is not involved in this
- calculation. We always want the start of .got. If we
- define _GLOBAL_OFFSET_TABLE in a different way, as is
- permitted by the ABI, we might have to change this
- calculation. */
- value -= sgot->output_section->vma;
- return _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, value,
- (bfd_vma) 0);
-
- case R_ARM_GOTPC:
- /* Use global offset table as symbol value. */
- BFD_ASSERT (sgot != NULL);
-
- if (sgot == NULL)
- return bfd_reloc_notsupported;
-
- value = sgot->output_section->vma;
- return _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, value,
- (bfd_vma) 0);
-
- case R_ARM_GOT32:
- /* Relocation is to the entry for this symbol in the
- global offset table. */
- if (sgot == NULL)
- return bfd_reloc_notsupported;
-
- if (h != NULL)
- {
- bfd_vma off;
- bfd_boolean dyn;
-
- off = h->got.offset;
- BFD_ASSERT (off != (bfd_vma) -1);
- dyn = globals->root.dynamic_sections_created;
-
- if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
- || (info->shared
- && SYMBOL_REFERENCES_LOCAL (info, h))
- || (ELF_ST_VISIBILITY (h->other)
- && h->root.type == bfd_link_hash_undefweak))
- {
- /* This is actually a static link, or it is a -Bsymbolic link
- and the symbol is defined locally. We must initialize this
- entry in the global offset table. Since the offset must
- always be a multiple of 4, we use the least significant bit
- to record whether we have initialized it already.
-
- When doing a dynamic link, we create a .rel.got relocation
- entry to initialize the value. This is done in the
- finish_dynamic_symbol routine. */
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
- /* If we are addressing a Thumb function, we need to
- adjust the address by one, so that attempts to
- call the function pointer will correctly
- interpret it as Thumb code. */
- if (sym_flags == STT_ARM_TFUNC)
- value |= 1;
-
- bfd_put_32 (output_bfd, value, sgot->contents + off);
- h->got.offset |= 1;
- }
- }
-
- value = sgot->output_offset + off;
- }
- else
- {
- bfd_vma off;
-
- BFD_ASSERT (local_got_offsets != NULL &&
- local_got_offsets[r_symndx] != (bfd_vma) -1);
-
- off = local_got_offsets[r_symndx];
-
- /* The offset must always be a multiple of 4. We use the
- least significant bit to record whether we have already
- generated the necessary reloc. */
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
- bfd_put_32 (output_bfd, value, sgot->contents + off);
-
- if (info->shared)
- {
- asection * srelgot;
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
-
- srelgot = bfd_get_section_by_name (dynobj, ".rel.got");
- BFD_ASSERT (srelgot != NULL);
-
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + off);
- outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
- loc = srelgot->contents;
- loc += srelgot->reloc_count++ * sizeof (Elf32_External_Rel);
- bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
- }
-
- local_got_offsets[r_symndx] |= 1;
- }
-
- value = sgot->output_offset + off;
- }
-
- return _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, value,
- (bfd_vma) 0);
-
- case R_ARM_SBREL32:
- return bfd_reloc_notsupported;
-
- case R_ARM_AMP_VCALL9:
- return bfd_reloc_notsupported;
-
- case R_ARM_RSBREL32:
- return bfd_reloc_notsupported;
-
- case R_ARM_THM_RPC22:
- return bfd_reloc_notsupported;
-
- case R_ARM_RREL32:
- return bfd_reloc_notsupported;
-
- case R_ARM_RABS32:
- return bfd_reloc_notsupported;
-
- case R_ARM_RPC24:
- return bfd_reloc_notsupported;
-
- case R_ARM_RBASE:
- return bfd_reloc_notsupported;
-
- default:
- return bfd_reloc_notsupported;
- }
-}
-
-#if USE_REL
-/* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS. */
-static void
-arm_add_to_rel (abfd, address, howto, increment)
- bfd * abfd;
- bfd_byte * address;
- reloc_howto_type * howto;
- bfd_signed_vma increment;
-{
- bfd_signed_vma addend;
-
- if (howto->type == R_ARM_THM_PC22)
- {
- int upper_insn, lower_insn;
- int upper, lower;
-
- upper_insn = bfd_get_16 (abfd, address);
- lower_insn = bfd_get_16 (abfd, address + 2);
- upper = upper_insn & 0x7ff;
- lower = lower_insn & 0x7ff;
-
- addend = (upper << 12) | (lower << 1);
- addend += increment;
- addend >>= 1;
-
- upper_insn = (upper_insn & 0xf800) | ((addend >> 11) & 0x7ff);
- lower_insn = (lower_insn & 0xf800) | (addend & 0x7ff);
-
- bfd_put_16 (abfd, (bfd_vma) upper_insn, address);
- bfd_put_16 (abfd, (bfd_vma) lower_insn, address + 2);
- }
- else
- {
- bfd_vma contents;
-
- contents = bfd_get_32 (abfd, address);
-
- /* Get the (signed) value from the instruction. */
- addend = contents & howto->src_mask;
- if (addend & ((howto->src_mask + 1) >> 1))
- {
- bfd_signed_vma mask;
-
- mask = -1;
- mask &= ~ howto->src_mask;
- addend |= mask;
- }
-
- /* Add in the increment, (which is a byte value). */
- switch (howto->type)
- {
- default:
- addend += increment;
- break;
-
- case R_ARM_PC24:
- addend <<= howto->size;
- addend += increment;
-
- /* Should we check for overflow here ? */
-
- /* Drop any undesired bits. */
- addend >>= howto->rightshift;
- break;
- }
-
- contents = (contents & ~ howto->dst_mask) | (addend & howto->dst_mask);
-
- bfd_put_32 (abfd, contents, address);
- }
-}
-#endif /* USE_REL */
-
-/* Relocate an ARM ELF section. */
-static bfd_boolean
-elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
-{
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- Elf_Internal_Rela *rel;
- Elf_Internal_Rela *relend;
- const char *name;
-
-#if !USE_REL
- if (info->relocatable)
- return TRUE;
-#endif
-
- symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (input_bfd);
-
- rel = relocs;
- relend = relocs + input_section->reloc_count;
- for (; rel < relend; rel++)
- {
- int r_type;
- reloc_howto_type * howto;
- unsigned long r_symndx;
- Elf_Internal_Sym * sym;
- asection * sec;
- struct elf_link_hash_entry * h;
- bfd_vma relocation;
- bfd_reloc_status_type r;
- arelent bfd_reloc;
-
- r_symndx = ELF32_R_SYM (rel->r_info);
- r_type = ELF32_R_TYPE (rel->r_info);
-
- if ( r_type == R_ARM_GNU_VTENTRY
- || r_type == R_ARM_GNU_VTINHERIT)
- continue;
-
- elf32_arm_info_to_howto (input_bfd, & bfd_reloc, rel);
- howto = bfd_reloc.howto;
-
-#if USE_REL
- 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 (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;
- }
-#endif
-
- /* This is a final link. */
- h = NULL;
- sym = NULL;
- sec = NULL;
-
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- sec = local_sections[r_symndx];
-#if USE_REL
- relocation = (sec->output_section->vma
- + sec->output_offset
- + sym->st_value);
- if ((sec->flags & SEC_MERGE)
- && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- asection *msec;
- bfd_vma addend, value;
-
- if (howto->rightshift)
- {
- (*_bfd_error_handler)
- (_("%s(%s+0x%lx): %s relocation against SEC_MERGE section"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
- (long) rel->r_offset, howto->name);
- return FALSE;
- }
-
- value = bfd_get_32 (input_bfd, contents + rel->r_offset);
-
- /* Get the (signed) value from the instruction. */
- addend = value & howto->src_mask;
- if (addend & ((howto->src_mask + 1) >> 1))
- {
- bfd_signed_vma mask;
-
- mask = -1;
- mask &= ~ howto->src_mask;
- addend |= mask;
- }
- msec = sec;
- addend =
- _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend)
- - relocation;
- addend += msec->output_section->vma + msec->output_offset;
- value = (value & ~ howto->dst_mask) | (addend & howto->dst_mask);
- bfd_put_32 (input_bfd, value, contents + rel->r_offset);
- }
-#else
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
-#endif
- }
- else
- {
- bfd_boolean warned;
- bfd_boolean unresolved_reloc;
-
- RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
- r_symndx, symtab_hdr, sym_hashes,
- h, sec, relocation,
- unresolved_reloc, warned);
-
- if (unresolved_reloc || relocation != 0)
- {
- /* In these cases, we don't need the relocation value.
- We check specially because in some obscure cases
- sec->output_section will be NULL. */
- switch (r_type)
- {
- case R_ARM_PC24:
- case R_ARM_ABS32:
- case R_ARM_THM_PC22:
- case R_ARM_PLT32:
-
- if (info->shared
- && (
- (!info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- )
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- && ((input_section->flags & SEC_ALLOC) != 0
- /* DWARF will emit R_ARM_ABS32 relocations in its
- sections against symbols defined externally
- in shared libraries. We can't do anything
- with them here. */
- || ((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
- )
- relocation = 0;
- break;
-
- case R_ARM_GOTPC:
- relocation = 0;
- break;
-
- case R_ARM_GOT32:
- if ((WILL_CALL_FINISH_DYNAMIC_SYMBOL
- (elf_hash_table (info)->dynamic_sections_created,
- info->shared, h))
- && (!info->shared
- || (!info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
- relocation = 0;
- break;
-
- default:
- if (unresolved_reloc)
- _bfd_error_handler
- (_("%s: warning: unresolvable relocation %d against symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd),
- r_type,
- h->root.root.string,
- bfd_get_section_name (input_bfd, input_section));
- break;
- }
- }
- }
-
- if (h != NULL)
- name = h->root.root.string;
- else
- {
- name = (bfd_elf_string_from_elf_section
- (input_bfd, symtab_hdr->sh_link, sym->st_name));
- if (name == NULL || *name == '\0')
- name = bfd_section_name (input_bfd, sec);
- }
-
- r = elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
- input_section, contents, rel,
- relocation, info, sec, name,
- (h ? ELF_ST_TYPE (h->type) :
- ELF_ST_TYPE (sym->st_info)), h);
-
- if (r != bfd_reloc_ok)
- {
- const char * msg = (const char *) 0;
-
- switch (r)
- {
- case bfd_reloc_overflow:
- /* If 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.type != bfd_link_hash_undefined)
- && (!((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset))))
- return FALSE;
- break;
-
- case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
- break;
-
- case bfd_reloc_outofrange:
- msg = _("internal error: out of range error");
- goto common_error;
-
- case bfd_reloc_notsupported:
- msg = _("internal error: unsupported relocation error");
- goto common_error;
-
- case bfd_reloc_dangerous:
- msg = _("internal error: dangerous error");
- goto common_error;
-
- default:
- msg = _("internal error: unknown error");
- /* fall through */
-
- common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
- break;
- }
- }
- }
-
- return TRUE;
-}
-
-/* Set the right machine number. */
-
-static bfd_boolean
-elf32_arm_object_p (abfd)
- bfd *abfd;
-{
- unsigned int mach;
-
- mach = bfd_arm_get_mach_from_notes (abfd, ARM_NOTE_SECTION);
-
- if (mach != bfd_mach_arm_unknown)
- bfd_default_set_arch_mach (abfd, bfd_arch_arm, mach);
-
- else if (elf_elfheader (abfd)->e_flags & EF_ARM_MAVERICK_FLOAT)
- bfd_default_set_arch_mach (abfd, bfd_arch_arm, bfd_mach_arm_ep9312);
-
- else
- bfd_default_set_arch_mach (abfd, bfd_arch_arm, mach);
-
- return TRUE;
-}
-
-/* Function to keep ARM specific flags in the ELF header. */
-static bfd_boolean
-elf32_arm_set_private_flags (abfd, flags)
- bfd *abfd;
- flagword flags;
-{
- if (elf_flags_init (abfd)
- && elf_elfheader (abfd)->e_flags != flags)
- {
- if (EF_ARM_EABI_VERSION (flags) == EF_ARM_EABI_UNKNOWN)
- {
- if (flags & EF_ARM_INTERWORK)
- (*_bfd_error_handler) (_("\
-Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"),
- bfd_archive_filename (abfd));
- else
- _bfd_error_handler (_("\
-Warning: Clearing the interworking flag of %s due to outside request"),
- bfd_archive_filename (abfd));
- }
- }
- else
- {
- elf_elfheader (abfd)->e_flags = flags;
- elf_flags_init (abfd) = TRUE;
- }
-
- return TRUE;
-}
-
-/* Copy backend specific data from one object module to another. */
-
-static bfd_boolean
-elf32_arm_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
-{
- flagword in_flags;
- flagword out_flags;
-
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
-
- in_flags = elf_elfheader (ibfd)->e_flags;
- out_flags = elf_elfheader (obfd)->e_flags;
-
- if (elf_flags_init (obfd)
- && EF_ARM_EABI_VERSION (out_flags) == EF_ARM_EABI_UNKNOWN
- && in_flags != out_flags)
- {
- /* Cannot mix APCS26 and APCS32 code. */
- if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
- return FALSE;
-
- /* Cannot mix float APCS and non-float APCS code. */
- if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT))
- return FALSE;
-
- /* If the src and dest have different interworking flags
- then turn off the interworking bit. */
- if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
- {
- if (out_flags & EF_ARM_INTERWORK)
- _bfd_error_handler (_("\
-Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"),
- bfd_get_filename (obfd),
- bfd_archive_filename (ibfd));
-
- in_flags &= ~EF_ARM_INTERWORK;
- }
-
- /* Likewise for PIC, though don't warn for this case. */
- if ((in_flags & EF_ARM_PIC) != (out_flags & EF_ARM_PIC))
- in_flags &= ~EF_ARM_PIC;
- }
-
- elf_elfheader (obfd)->e_flags = in_flags;
- elf_flags_init (obfd) = TRUE;
-
- return TRUE;
-}
-
-/* Merge backend specific data from an object file to the output
- object file when linking. */
-
-static bfd_boolean
-elf32_arm_merge_private_bfd_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
-{
- flagword out_flags;
- flagword in_flags;
- bfd_boolean flags_compatible = TRUE;
- asection *sec;
-
- /* Check if we have the same endianess. */
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
- return FALSE;
-
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
-
- /* The input BFD must have had its flags initialised. */
- /* The following seems bogus to me -- The flags are initialized in
- the assembler but I don't think an elf_flags_init field is
- written into the object. */
- /* BFD_ASSERT (elf_flags_init (ibfd)); */
-
- in_flags = elf_elfheader (ibfd)->e_flags;
- out_flags = elf_elfheader (obfd)->e_flags;
-
- if (!elf_flags_init (obfd))
- {
- /* If the input is the default architecture and had the default
- flags then do not bother setting the flags for the output
- architecture, instead allow future merges to do this. If no
- future merges ever set these flags then they will retain their
- uninitialised values, which surprise surprise, correspond
- to the default values. */
- if (bfd_get_arch_info (ibfd)->the_default
- && elf_elfheader (ibfd)->e_flags == 0)
- return TRUE;
-
- elf_flags_init (obfd) = TRUE;
- elf_elfheader (obfd)->e_flags = in_flags;
-
- if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
- && bfd_get_arch_info (obfd)->the_default)
- return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd));
-
- return TRUE;
- }
-
- /* Determine what should happen if the input ARM architecture
- does not match the output ARM architecture. */
- if (! bfd_arm_merge_machines (ibfd, obfd))
- return FALSE;
-
- /* Identical flags must be compatible. */
- if (in_flags == out_flags)
- return TRUE;
-
- /* Check to see if the input BFD actually contains any sections. If
- not, its flags may not have been initialised either, but it
- cannot actually cause any incompatibility. Do not short-circuit
- dynamic objects; their section list may be emptied by
- elf_link_add_object_symbols.
-
- Also check to see if there are no code sections in the input.
- In this case there is no need to check for code specific flags.
- XXX - do we need to worry about floating-point format compatability
- in data sections ? */
- if (!(ibfd->flags & DYNAMIC))
- {
- bfd_boolean null_input_bfd = TRUE;
- bfd_boolean only_data_sections = TRUE;
-
- for (sec = ibfd->sections; sec != NULL; sec = sec->next)
- {
- /* Ignore synthetic glue sections. */
- if (strcmp (sec->name, ".glue_7")
- && strcmp (sec->name, ".glue_7t"))
- {
- if ((bfd_get_section_flags (ibfd, sec)
- & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
- == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
- only_data_sections = FALSE;
-
- null_input_bfd = FALSE;
- break;
- }
- }
-
- if (null_input_bfd || only_data_sections)
- return TRUE;
- }
-
- /* Complain about various flag mismatches. */
- if (EF_ARM_EABI_VERSION (in_flags) != EF_ARM_EABI_VERSION (out_flags))
- {
- _bfd_error_handler (_("\
-ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"),
- bfd_archive_filename (ibfd),
- (in_flags & EF_ARM_EABIMASK) >> 24,
- bfd_get_filename (obfd),
- (out_flags & EF_ARM_EABIMASK) >> 24);
- return FALSE;
- }
-
- /* Not sure what needs to be checked for EABI versions >= 1. */
- if (EF_ARM_EABI_VERSION (in_flags) == EF_ARM_EABI_UNKNOWN)
- {
- if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
- {
- _bfd_error_handler (_("\
-ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"),
- bfd_archive_filename (ibfd),
- in_flags & EF_ARM_APCS_26 ? 26 : 32,
- bfd_get_filename (obfd),
- out_flags & EF_ARM_APCS_26 ? 26 : 32);
- flags_compatible = FALSE;
- }
-
- if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT))
- {
- if (in_flags & EF_ARM_APCS_FLOAT)
- _bfd_error_handler (_("\
-ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
- else
- _bfd_error_handler (_("\
-ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
-
- flags_compatible = FALSE;
- }
-
- if ((in_flags & EF_ARM_VFP_FLOAT) != (out_flags & EF_ARM_VFP_FLOAT))
- {
- if (in_flags & EF_ARM_VFP_FLOAT)
- _bfd_error_handler (_("\
-ERROR: %s uses VFP instructions, whereas %s does not"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
- else
- _bfd_error_handler (_("\
-ERROR: %s uses FPA instructions, whereas %s does not"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
-
- flags_compatible = FALSE;
- }
-
- if ((in_flags & EF_ARM_MAVERICK_FLOAT) != (out_flags & EF_ARM_MAVERICK_FLOAT))
- {
- if (in_flags & EF_ARM_MAVERICK_FLOAT)
- _bfd_error_handler (_("\
-ERROR: %s uses Maverick instructions, whereas %s does not"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
- else
- _bfd_error_handler (_("\
-ERROR: %s does not use Maverick instructions, whereas %s does"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
-
- flags_compatible = FALSE;
- }
-
-#ifdef EF_ARM_SOFT_FLOAT
- if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT))
- {
- /* We can allow interworking between code that is VFP format
- layout, and uses either soft float or integer regs for
- passing floating point arguments and results. We already
- know that the APCS_FLOAT flags match; similarly for VFP
- flags. */
- if ((in_flags & EF_ARM_APCS_FLOAT) != 0
- || (in_flags & EF_ARM_VFP_FLOAT) == 0)
- {
- if (in_flags & EF_ARM_SOFT_FLOAT)
- _bfd_error_handler (_("\
-ERROR: %s uses software FP, whereas %s uses hardware FP"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
- else
- _bfd_error_handler (_("\
-ERROR: %s uses hardware FP, whereas %s uses software FP"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
-
- flags_compatible = FALSE;
- }
- }
-#endif
-
- /* Interworking mismatch is only a warning. */
- if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
- {
- if (in_flags & EF_ARM_INTERWORK)
- {
- _bfd_error_handler (_("\
-Warning: %s supports interworking, whereas %s does not"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
- }
- else
- {
- _bfd_error_handler (_("\
-Warning: %s does not support interworking, whereas %s does"),
- bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
- }
- }
- }
-
- return flags_compatible;
-}
-
-/* Display the flags field. */
-
-static bfd_boolean
-elf32_arm_print_private_bfd_data (abfd, ptr)
- bfd *abfd;
- PTR ptr;
-{
- FILE * file = (FILE *) ptr;
- unsigned long flags;
-
- BFD_ASSERT (abfd != NULL && ptr != NULL);
-
- /* Print normal ELF private data. */
- _bfd_elf_print_private_bfd_data (abfd, ptr);
-
- flags = elf_elfheader (abfd)->e_flags;
- /* Ignore init flag - it may not be set, despite the flags field
- containing valid data. */
-
- /* xgettext:c-format */
- fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
-
- switch (EF_ARM_EABI_VERSION (flags))
- {
- case EF_ARM_EABI_UNKNOWN:
- /* The following flag bits are GNU extensions and not part of the
- official ARM ELF extended ABI. Hence they are only decoded if
- the EABI version is not set. */
- if (flags & EF_ARM_INTERWORK)
- fprintf (file, _(" [interworking enabled]"));
-
- if (flags & EF_ARM_APCS_26)
- fprintf (file, " [APCS-26]");
- else
- fprintf (file, " [APCS-32]");
-
- if (flags & EF_ARM_VFP_FLOAT)
- fprintf (file, _(" [VFP float format]"));
- else if (flags & EF_ARM_MAVERICK_FLOAT)
- fprintf (file, _(" [Maverick float format]"));
- else
- fprintf (file, _(" [FPA float format]"));
-
- if (flags & EF_ARM_APCS_FLOAT)
- fprintf (file, _(" [floats passed in float registers]"));
-
- if (flags & EF_ARM_PIC)
- fprintf (file, _(" [position independent]"));
-
- if (flags & EF_ARM_NEW_ABI)
- fprintf (file, _(" [new ABI]"));
-
- if (flags & EF_ARM_OLD_ABI)
- fprintf (file, _(" [old ABI]"));
-
- if (flags & EF_ARM_SOFT_FLOAT)
- fprintf (file, _(" [software FP]"));
-
- flags &= ~(EF_ARM_INTERWORK | EF_ARM_APCS_26 | EF_ARM_APCS_FLOAT
- | EF_ARM_PIC | EF_ARM_NEW_ABI | EF_ARM_OLD_ABI
- | EF_ARM_SOFT_FLOAT | EF_ARM_VFP_FLOAT
- | EF_ARM_MAVERICK_FLOAT);
- break;
-
- case EF_ARM_EABI_VER1:
- fprintf (file, _(" [Version1 EABI]"));
-
- if (flags & EF_ARM_SYMSARESORTED)
- fprintf (file, _(" [sorted symbol table]"));
- else
- fprintf (file, _(" [unsorted symbol table]"));
-
- flags &= ~ EF_ARM_SYMSARESORTED;
- break;
-
- case EF_ARM_EABI_VER2:
- fprintf (file, _(" [Version2 EABI]"));
-
- if (flags & EF_ARM_SYMSARESORTED)
- fprintf (file, _(" [sorted symbol table]"));
- else
- fprintf (file, _(" [unsorted symbol table]"));
-
- if (flags & EF_ARM_DYNSYMSUSESEGIDX)
- fprintf (file, _(" [dynamic symbols use segment index]"));
-
- if (flags & EF_ARM_MAPSYMSFIRST)
- fprintf (file, _(" [mapping symbols precede others]"));
-
- flags &= ~(EF_ARM_SYMSARESORTED | EF_ARM_DYNSYMSUSESEGIDX
- | EF_ARM_MAPSYMSFIRST);
- break;
-
- default:
- fprintf (file, _(" <EABI version unrecognised>"));
- break;
- }
-
- flags &= ~ EF_ARM_EABIMASK;
-
- if (flags & EF_ARM_RELEXEC)
- fprintf (file, _(" [relocatable executable]"));
-
- if (flags & EF_ARM_HASENTRY)
- fprintf (file, _(" [has entry point]"));
-
- flags &= ~ (EF_ARM_RELEXEC | EF_ARM_HASENTRY);
-
- if (flags)
- fprintf (file, _("<Unrecognised flag bits set>"));
-
- fputc ('\n', file);
-
- return TRUE;
-}
-
-static int
-elf32_arm_get_symbol_type (elf_sym, type)
- Elf_Internal_Sym * elf_sym;
- int type;
-{
- switch (ELF_ST_TYPE (elf_sym->st_info))
- {
- case STT_ARM_TFUNC:
- return ELF_ST_TYPE (elf_sym->st_info);
-
- case STT_ARM_16BIT:
- /* If the symbol is not an object, return the STT_ARM_16BIT flag.
- This allows us to distinguish between data used by Thumb instructions
- and non-data (which is probably code) inside Thumb regions of an
- executable. */
- if (type != STT_OBJECT)
- return ELF_ST_TYPE (elf_sym->st_info);
- break;
-
- default:
- break;
- }
-
- return type;
-}
-
-static asection *
-elf32_arm_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;
-{
- if (h != NULL)
- {
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_ARM_GNU_VTINHERIT:
- case R_ARM_GNU_VTENTRY:
- break;
-
- default:
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- }
- else
- 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
-elf32_arm_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
-{
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- bfd_signed_vma *local_got_refcounts;
- const Elf_Internal_Rela *rel, *relend;
- unsigned long r_symndx;
- struct elf_link_hash_entry *h;
-
- elf_section_data (sec)->local_dynrel = NULL;
-
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (abfd);
- local_got_refcounts = elf_local_got_refcounts (abfd);
-
- relend = relocs + sec->reloc_count;
- for (rel = relocs; rel < relend; rel++)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_ARM_GOT32:
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- if (h->got.refcount > 0)
- h->got.refcount -= 1;
- }
- else if (local_got_refcounts != NULL)
- {
- if (local_got_refcounts[r_symndx] > 0)
- local_got_refcounts[r_symndx] -= 1;
- }
- break;
-
- case R_ARM_ABS32:
- case R_ARM_REL32:
- case R_ARM_PC24:
- case R_ARM_PLT32:
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- struct elf32_arm_link_hash_entry *eh;
- struct elf32_arm_relocs_copied **pp;
- struct elf32_arm_relocs_copied *p;
-
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
- if (h->plt.refcount > 0)
- h->plt.refcount -= 1;
-
- if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32
- || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
- {
- eh = (struct elf32_arm_link_hash_entry *) h;
-
- for (pp = &eh->relocs_copied; (p = *pp) != NULL;
- pp = &p->next)
- if (p->section == sec)
- {
- p->count -= 1;
- if (p->count == 0)
- *pp = p->next;
- break;
- }
- }
- }
- break;
-
- default:
- break;
- }
-
- return TRUE;
-}
-
-/* Look through the relocs for a section during the first phase. */
-
-static bfd_boolean
-elf32_arm_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
-{
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- struct elf_link_hash_entry **sym_hashes_end;
- const Elf_Internal_Rela *rel;
- const Elf_Internal_Rela *rel_end;
- bfd *dynobj;
- asection *sreloc;
- bfd_vma *local_got_offsets;
- struct elf32_arm_link_hash_table *htab;
-
- if (info->relocatable)
- return TRUE;
-
- htab = elf32_arm_hash_table (info);
- sreloc = NULL;
-
- dynobj = elf_hash_table (info)->dynobj;
- local_got_offsets = elf_local_got_offsets (abfd);
-
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (abfd);
- sym_hashes_end = sym_hashes
- + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-
- if (!elf_bad_symtab (abfd))
- sym_hashes_end -= symtab_hdr->sh_info;
-
- rel_end = relocs + sec->reloc_count;
- for (rel = relocs; rel < rel_end; rel++)
- {
- struct elf_link_hash_entry *h;
- unsigned long r_symndx;
-
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx < symtab_hdr->sh_info)
- h = NULL;
- else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_ARM_GOT32:
- /* This symbol requires a global offset table entry. */
- if (h != NULL)
- {
- h->got.refcount++;
- }
- else
- {
- bfd_signed_vma *local_got_refcounts;
-
- /* This is a global offset table entry for a local symbol. */
- local_got_refcounts = elf_local_got_refcounts (abfd);
- if (local_got_refcounts == NULL)
- {
- bfd_size_type size;
-
- size = symtab_hdr->sh_info;
- size *= (sizeof (bfd_signed_vma) + sizeof(char));
- local_got_refcounts = ((bfd_signed_vma *)
- bfd_zalloc (abfd, size));
- if (local_got_refcounts == NULL)
- return FALSE;
- elf_local_got_refcounts (abfd) = local_got_refcounts;
- }
- local_got_refcounts[r_symndx] += 1;
- }
- break;
-
- case R_ARM_GOTOFF:
- case R_ARM_GOTPC:
- if (htab->sgot == NULL)
- {
- if (htab->root.dynobj == NULL)
- htab->root.dynobj = abfd;
- if (!create_got_section (htab->root.dynobj, info))
- return FALSE;
- }
- break;
-
- case R_ARM_ABS32:
- case R_ARM_REL32:
- case R_ARM_PC24:
- case R_ARM_PLT32:
- if (h != NULL)
- {
- /* If this reloc is in a read-only section, we might
- need a copy reloc. We can't check reliably at this
- stage whether the section is read-only, as input
- sections have not yet been mapped to output sections.
- Tentatively set the flag for now, and correct in
- adjust_dynamic_symbol. */
- if (!info->shared)
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
-
- /* We may need a .plt entry if the function this reloc
- refers to is in a different object. We can't tell for
- sure yet, because something later might force the
- symbol local. */
- if (ELF32_R_TYPE (rel->r_info) == R_ARM_PC24
- || ELF32_R_TYPE (rel->r_info) == R_ARM_PLT32)
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
-
- /* If we create a PLT entry, this relocation will reference
- it, even if it's an ABS32 relocation. */
- h->plt.refcount += 1;
- }
-
- /* If we are creating a shared library, and this is a reloc
- against a global symbol, or a non PC relative reloc
- against a local symbol, then we need to copy the reloc
- into the shared library. However, if we are linking with
- -Bsymbolic, we do not need to copy a reloc against a
- global symbol which is defined in an object we are
- including in the link (i.e., DEF_REGULAR is set). At
- this point we have not seen all the input files, so it is
- possible that DEF_REGULAR is not set now but will be set
- later (it is never cleared). We account for that
- possibility below by storing information in the
- relocs_copied field of the hash table entry. */
- if (info->shared
- && (sec->flags & SEC_ALLOC) != 0
- && ((ELF32_R_TYPE (rel->r_info) != R_ARM_PC24
- && ELF32_R_TYPE (rel->r_info) != R_ARM_PLT32
- && ELF32_R_TYPE (rel->r_info) != R_ARM_REL32)
- || (h != NULL
- && (! info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
- {
- struct elf32_arm_relocs_copied *p, **head;
-
- /* When creating a shared object, we must copy these
- reloc types into the output file. We create a reloc
- section in dynobj and make room for this reloc. */
- if (sreloc == NULL)
- {
- const char * name;
-
- name = (bfd_elf_string_from_elf_section
- (abfd,
- elf_elfheader (abfd)->e_shstrndx,
- elf_section_data (sec)->rel_hdr.sh_name));
- if (name == NULL)
- return FALSE;
-
- BFD_ASSERT (strncmp (name, ".rel", 4) == 0
- && strcmp (bfd_get_section_name (abfd, sec),
- name + 4) == 0);
-
- sreloc = bfd_get_section_by_name (dynobj, name);
- if (sreloc == NULL)
- {
- flagword flags;
-
- sreloc = bfd_make_section (dynobj, name);
- flags = (SEC_HAS_CONTENTS | SEC_READONLY
- | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- if ((sec->flags & SEC_ALLOC) != 0)
- flags |= SEC_ALLOC | SEC_LOAD;
- if (sreloc == NULL
- || ! bfd_set_section_flags (dynobj, sreloc, flags)
- || ! bfd_set_section_alignment (dynobj, sreloc, 2))
- return FALSE;
- }
-
- elf_section_data (sec)->sreloc = sreloc;
- }
-
- /* If this is a global symbol, we count the number of
- relocations we need for this symbol. */
- if (h != NULL)
- {
- head = &((struct elf32_arm_link_hash_entry *) h)->relocs_copied;
- }
- else
- {
- /* Track dynamic relocs needed for local syms too.
- We really need local syms available to do this
- easily. Oh well. */
-
- asection *s;
- s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
- sec, r_symndx);
- if (s == NULL)
- return FALSE;
-
- head = ((struct elf32_arm_relocs_copied **)
- &elf_section_data (s)->local_dynrel);
- }
-
- p = *head;
- if (p == NULL || p->section != sec)
- {
- bfd_size_type amt = sizeof *p;
- p = bfd_alloc (htab->root.dynobj, amt);
- if (p == NULL)
- return FALSE;
- p->next = *head;
- *head = p;
- p->section = sec;
- p->count = 0;
- }
-
- if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32
- || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
- p->count += 1;
- }
- break;
-
- /* This relocation describes the C++ object vtable hierarchy.
- Reconstruct it for later use during GC. */
- case R_ARM_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_ARM_GNU_VTENTRY:
- if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
- return FALSE;
- break;
- }
- }
-
- return TRUE;
-}
-
-/* Find the nearest line to a particular section and offset, for error
- reporting. This code is a duplicate of the code in elf.c, except
- that it also accepts STT_ARM_TFUNC as a symbol that names a function. */
-
-static bfd_boolean
-elf32_arm_find_nearest_line
- (abfd, section, symbols, offset, filename_ptr, functionname_ptr, line_ptr)
- bfd *abfd;
- asection *section;
- asymbol **symbols;
- bfd_vma offset;
- const char **filename_ptr;
- const char **functionname_ptr;
- unsigned int *line_ptr;
-{
- bfd_boolean found;
- const char *filename;
- asymbol *func;
- bfd_vma low_func;
- asymbol **p;
-
- if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
- filename_ptr, functionname_ptr,
- line_ptr, 0,
- &elf_tdata (abfd)->dwarf2_find_line_info))
- return TRUE;
-
- if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
- &found, filename_ptr,
- functionname_ptr, line_ptr,
- &elf_tdata (abfd)->line_info))
- return FALSE;
-
- if (found)
- return TRUE;
-
- if (symbols == NULL)
- return FALSE;
-
- filename = NULL;
- func = NULL;
- low_func = 0;
-
- for (p = symbols; *p != NULL; p++)
- {
- elf_symbol_type *q;
-
- q = (elf_symbol_type *) *p;
-
- if (bfd_get_section (&q->symbol) != section)
- continue;
-
- switch (ELF_ST_TYPE (q->internal_elf_sym.st_info))
- {
- default:
- break;
- case STT_FILE:
- filename = bfd_asymbol_name (&q->symbol);
- break;
- case STT_NOTYPE:
- case STT_FUNC:
- case STT_ARM_TFUNC:
- if (q->symbol.section == section
- && q->symbol.value >= low_func
- && q->symbol.value <= offset)
- {
- func = (asymbol *) q;
- low_func = q->symbol.value;
- }
- break;
- }
- }
-
- if (func == NULL)
- return FALSE;
-
- *filename_ptr = filename;
- *functionname_ptr = bfd_asymbol_name (func);
- *line_ptr = 0;
-
- return TRUE;
-}
-
-/* Adjust a symbol defined by a dynamic object and referenced by a
- regular object. The current definition is in some section of the
- dynamic object, but we're not including those sections. We have to
- change the definition to something the rest of the link can
- understand. */
-
-static bfd_boolean
-elf32_arm_adjust_dynamic_symbol (info, h)
- struct bfd_link_info * info;
- struct elf_link_hash_entry * h;
-{
- bfd * dynobj;
- asection * s;
- unsigned int power_of_two;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- /* Make sure we know what is going on here. */
- BFD_ASSERT (dynobj != NULL
- && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
- || h->weakdef != NULL
- || ((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)));
-
- /* If this is a function, put it in the procedure linkage table. We
- will fill in the contents of the procedure linkage table later,
- when we know the address of the .got section. */
- if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
- {
- if (h->plt.refcount <= 0
- || SYMBOL_CALLS_LOCAL (info, h)
- || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
- && h->root.type == bfd_link_hash_undefweak))
- {
- /* This case can occur if we saw a PLT32 reloc in an input
- file, but the symbol was never referred to by a dynamic
- object, or if all references were garbage collected. In
- such a case, we don't actually need to build a procedure
- linkage table, and we can just do a PC24 reloc instead. */
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
-
- return TRUE;
- }
- else
- /* It's possible that we incorrectly decided a .plt reloc was
- needed for an R_ARM_PC24 reloc to a non-function sym in
- check_relocs. We can't decide accurately between function and
- non-function syms in check-relocs; Objects loaded later in
- the link may change h->type. So fix it now. */
- h->plt.offset = (bfd_vma) -1;
-
- /* If this is a weak symbol, and there is a real definition, the
- processor independent code will have arranged for us to see the
- real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
- {
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
- return TRUE;
- }
-
- /* This is a reference to a symbol defined by a dynamic object which
- is not a function. */
-
- /* If we are creating a shared library, we must presume that the
- only references to the symbol are via the global offset table.
- For such cases we need not do anything here; the relocations will
- be handled correctly by relocate_section. */
- if (info->shared)
- return TRUE;
-
- /* We must allocate the symbol in our .dynbss section, which will
- become part of the .bss section of the executable. There will be
- an entry for this symbol in the .dynsym section. The dynamic
- object will contain position independent code, so all references
- from the dynamic object to this symbol will go through the global
- offset table. The dynamic linker will use the .dynsym entry to
- determine the address it must put in the global offset table, so
- both the dynamic object and the regular object will refer to the
- same memory location for the variable. */
- s = bfd_get_section_by_name (dynobj, ".dynbss");
- BFD_ASSERT (s != NULL);
-
- /* We must generate a R_ARM_COPY reloc to tell the dynamic linker to
- copy the initial value out of the dynamic object and into the
- runtime process image. We need to remember the offset into the
- .rel.bss section we are going to use. */
- if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
- {
- asection *srel;
-
- srel = bfd_get_section_by_name (dynobj, ".rel.bss");
- BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rel);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
- }
-
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 3)
- power_of_two = 3;
-
- /* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
- if (power_of_two > bfd_get_section_alignment (dynobj, s))
- {
- if (! bfd_set_section_alignment (dynobj, s, power_of_two))
- return FALSE;
- }
-
- /* Define the symbol as being at this point in the section. */
- h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
-
- /* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
-
- return TRUE;
-}
-
-/* Allocate space in .plt, .got and associated reloc sections for
- dynamic relocs. */
-
-static bfd_boolean
-allocate_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
-{
- struct bfd_link_info *info;
- struct elf32_arm_link_hash_table *htab;
- struct elf32_arm_link_hash_entry *eh;
- struct elf32_arm_relocs_copied *p;
-
- if (h->root.type == bfd_link_hash_indirect)
- return TRUE;
-
- 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;
-
- info = (struct bfd_link_info *) inf;
- htab = elf32_arm_hash_table (info);
-
- if (htab->root.dynamic_sections_created
- && h->plt.refcount > 0)
- {
- /* Make sure this symbol is output as a dynamic symbol.
- Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- if (info->shared
- || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
- {
- asection *s = htab->splt;
-
- /* If this is the first .plt entry, make room for the special
- first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_HEADER_SIZE;
-
- h->plt.offset = s->_raw_size;
-
- /* If this symbol is not defined in a regular file, and we are
- not generating a shared library, then set the symbol to this
- location in the .plt. This is required to make function
- pointers compare as equal between the normal executable and
- the shared library. */
- if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- h->root.u.def.section = s;
- h->root.u.def.value = h->plt.offset;
- }
-
- /* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
-
- /* We also need to make an entry in the .got.plt section, which
- will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += 4;
-
- /* We also need to make an entry in the .rel.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rel);
- }
- else
- {
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
- }
- else
- {
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
-
- if (h->got.refcount > 0)
- {
- asection *s;
- bfd_boolean dyn;
-
- /* Make sure this symbol is output as a dynamic symbol.
- Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += 4;
- dyn = htab->root.dynamic_sections_created;
- if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak)
- && (info->shared
- || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rel);
- }
- else
- h->got.offset = (bfd_vma) -1;
-
- eh = (struct elf32_arm_link_hash_entry *) h;
- if (eh->relocs_copied == NULL)
- return TRUE;
-
- /* In the shared -Bsymbolic case, discard space allocated for
- dynamic pc-relative relocs against symbols which turn out to be
- defined in regular objects. For the normal shared case, discard
- space for pc-relative relocs that have become local due to symbol
- visibility changes. */
-
- if (info->shared)
- {
- /* Discard relocs on undefined weak syms with non-default
- visibility. */
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
- && h->root.type == bfd_link_hash_undefweak)
- eh->relocs_copied = NULL;
- }
- else
- {
- /* For the non-shared case, discard space for relocs against
- symbols which turn out to need copy relocs or are not
- dynamic. */
-
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- || (htab->root.dynamic_sections_created
- && (h->root.type == bfd_link_hash_undefweak
- || h->root.type == bfd_link_hash_undefined))))
- {
- /* Make sure this symbol is output as a dynamic symbol.
- Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- /* If that succeeded, we know we'll be keeping all the
- relocs. */
- if (h->dynindx != -1)
- goto keep;
- }
-
- eh->relocs_copied = NULL;
-
- keep: ;
- }
-
- /* Finally, allocate space. */
- for (p = eh->relocs_copied; p != NULL; p = p->next)
- {
- asection *sreloc = elf_section_data (p->section)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rel);
- }
-
- return TRUE;
-}
-
-/* Set the sizes of the dynamic sections. */
-
-static bfd_boolean
-elf32_arm_size_dynamic_sections (output_bfd, info)
- bfd * output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info * info;
-{
- bfd * dynobj;
- asection * s;
- bfd_boolean plt;
- bfd_boolean relocs;
- bfd *ibfd;
- struct elf32_arm_link_hash_table *htab;
-
- htab = elf32_arm_hash_table (info);
- 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->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
- s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
- }
- }
-
- /* Set up .got offsets for local syms, and space for local dynamic
- relocs. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
- {
- bfd_signed_vma *local_got;
- bfd_signed_vma *end_local_got;
- char *local_tls_type;
- bfd_size_type locsymcount;
- Elf_Internal_Shdr *symtab_hdr;
- asection *srel;
-
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
- continue;
-
- for (s = ibfd->sections; s != NULL; s = s->next)
- {
- struct elf32_arm_relocs_copied *p;
-
- for (p = *((struct elf32_arm_relocs_copied **)
- &elf_section_data (s)->local_dynrel);
- p != NULL;
- p = p->next)
- {
- if (!bfd_is_abs_section (p->section)
- && bfd_is_abs_section (p->section->output_section))
- {
- /* Input section has been discarded, either because
- it is a copy of a linkonce section or due to
- linker script /DISCARD/, so we'll be discarding
- the relocs too. */
- }
- else if (p->count != 0)
- {
- srel = elf_section_data (p->section)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf32_External_Rel);
- if ((p->section->output_section->flags & SEC_READONLY) != 0)
- info->flags |= DF_TEXTREL;
- }
- }
- }
-
- local_got = elf_local_got_refcounts (ibfd);
- if (!local_got)
- continue;
-
- symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
- locsymcount = symtab_hdr->sh_info;
- end_local_got = local_got + locsymcount;
- s = htab->sgot;
- srel = htab->srelgot;
- for (; local_got < end_local_got; ++local_got, ++local_tls_type)
- {
- if (*local_got > 0)
- {
- *local_got = s->_raw_size;
- s->_raw_size += 4;
- if (info->shared)
- srel->_raw_size += sizeof (Elf32_External_Rel);
- }
- else
- *local_got = (bfd_vma) -1;
- }
- }
-
- /* Allocate global sym .plt and .got entries, and space for global
- sym dynamic relocs. */
- elf_link_hash_traverse (&htab->root, allocate_dynrelocs, (PTR) info);
-
- /* The check_relocs and adjust_dynamic_symbol entry points have
- determined the sizes of the various dynamic sections. Allocate
- memory for them. */
- plt = FALSE;
- relocs = FALSE;
- for (s = dynobj->sections; s != NULL; s = s->next)
- {
- const char * name;
- bfd_boolean strip;
-
- if ((s->flags & SEC_LINKER_CREATED) == 0)
- continue;
-
- /* It's OK to base decisions on the section name, because none
- of the dynobj section names depend upon the input files. */
- name = bfd_get_section_name (dynobj, s);
-
- strip = FALSE;
-
- if (strcmp (name, ".plt") == 0)
- {
- if (s->_raw_size == 0)
- {
- /* Strip this section if we don't need it; see the
- comment below. */
- strip = TRUE;
- }
- else
- {
- /* Remember whether there is a PLT. */
- plt = TRUE;
- }
- }
- else if (strncmp (name, ".rel", 4) == 0)
- {
- if (s->_raw_size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rel.bss and
- .rel.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
- {
- /* Remember whether there are any reloc sections other
- than .rel.plt. */
- if (strcmp (name, ".rel.plt") != 0)
- relocs = TRUE;
-
- /* We use the reloc_count field as a counter if we need
- to copy relocs into the output file. */
- s->reloc_count = 0;
- }
- }
- else if (strncmp (name, ".got", 4) != 0)
- {
- /* It's not one of our sections, so don't allocate space. */
- continue;
- }
-
- if (strip)
- {
- _bfd_strip_section_from_output (info, s);
- continue;
- }
-
- /* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
- return FALSE;
- }
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Add some entries to the .dynamic section. We fill in the
- values later, in elf32_arm_finish_dynamic_sections, but we
- must add the entries now so that we get the correct size for
- the .dynamic section. The DT_DEBUG entry is filled in by the
- dynamic linker and used by the debugger. */
-#define add_dynamic_entry(TAG, VAL) \
- _bfd_elf_add_dynamic_entry (info, TAG, VAL)
-
- if (!info->shared)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
- }
-
- if (plt)
- {
- if ( !add_dynamic_entry (DT_PLTGOT, 0)
- || !add_dynamic_entry (DT_PLTRELSZ, 0)
- || !add_dynamic_entry (DT_PLTREL, DT_REL)
- || !add_dynamic_entry (DT_JMPREL, 0))
- return FALSE;
- }
-
- if (relocs)
- {
- if ( !add_dynamic_entry (DT_REL, 0)
- || !add_dynamic_entry (DT_RELSZ, 0)
- || !add_dynamic_entry (DT_RELENT, sizeof (Elf32_External_Rel)))
- return FALSE;
- }
-
- if ((info->flags & DF_TEXTREL) != 0)
- {
- if (!add_dynamic_entry (DT_TEXTREL, 0))
- return FALSE;
- info->flags |= DF_TEXTREL;
- }
- }
-#undef add_synamic_entry
-
- return TRUE;
-}
-
-/* Finish up dynamic symbol handling. We set the contents of various
- dynamic sections here. */
-
-static bfd_boolean
-elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd * output_bfd;
- struct bfd_link_info * info;
- struct elf_link_hash_entry * h;
- Elf_Internal_Sym * sym;
-{
- bfd * dynobj;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- if (h->plt.offset != (bfd_vma) -1)
- {
- asection * splt;
- asection * sgot;
- asection * srel;
- bfd_vma plt_index;
- bfd_vma got_offset;
- Elf_Internal_Rela rel;
- bfd_byte *loc;
- bfd_vma got_displacement;
-
- /* This symbol has an entry in the procedure linkage table. Set
- it up. */
-
- BFD_ASSERT (h->dynindx != -1);
-
- splt = bfd_get_section_by_name (dynobj, ".plt");
- sgot = bfd_get_section_by_name (dynobj, ".got.plt");
- srel = bfd_get_section_by_name (dynobj, ".rel.plt");
- BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
-
- /* Get the index in the procedure linkage table which
- corresponds to this symbol. This is the index of this symbol
- in all the symbols for which we are making plt entries. The
- first entry in the procedure linkage table is reserved. */
- plt_index = (h->plt.offset - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
-
- /* Get the offset into the .got table of the entry that
- corresponds to this function. Each .got entry is 4 bytes.
- The first three are reserved. */
- got_offset = (plt_index + 3) * 4;
-
- /* Calculate the displacement between the PLT slot and the
- entry in the GOT. */
- got_displacement = (sgot->output_section->vma
- + sgot->output_offset
- + got_offset
- - splt->output_section->vma
- - splt->output_offset
- - h->plt.offset
- - 8);
-
- BFD_ASSERT ((got_displacement & 0xf0000000) == 0);
-
- /* Fill in the entry in the procedure linkage table. */
- 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);
-#ifdef FOUR_WORD_PLT
- bfd_put_32 (output_bfd, elf32_arm_plt_entry[3],
- splt->contents + h->plt.offset + 12);
-#endif
-
- /* Fill in the entry in the global offset table. */
- bfd_put_32 (output_bfd,
- (splt->output_section->vma
- + splt->output_offset),
- sgot->contents + got_offset);
-
- /* Fill in the entry in the .rel.plt section. */
- rel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + got_offset);
- rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_JUMP_SLOT);
- loc = srel->contents + plt_index * sizeof (Elf32_External_Rel);
- bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
-
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- /* Mark the symbol as undefined, rather than as defined in
- the .plt section. Leave the value alone. */
- sym->st_shndx = SHN_UNDEF;
- /* If the symbol is weak, we do need to clear the value.
- Otherwise, the PLT entry would provide a definition for
- the symbol even if the symbol wasn't defined anywhere,
- and so the symbol would never be NULL. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
- == 0)
- sym->st_value = 0;
- }
- }
-
- if (h->got.offset != (bfd_vma) -1)
- {
- asection * sgot;
- asection * srel;
- Elf_Internal_Rela rel;
- bfd_byte *loc;
-
- /* This symbol has an entry in the global offset table. Set it
- up. */
- sgot = bfd_get_section_by_name (dynobj, ".got");
- srel = bfd_get_section_by_name (dynobj, ".rel.got");
- BFD_ASSERT (sgot != NULL && srel != NULL);
-
- rel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + (h->got.offset &~ (bfd_vma) 1));
-
- /* If this is a static link, or it is a -Bsymbolic link and the
- symbol is defined locally or was forced to be local because
- of a version file, we just want to emit a RELATIVE reloc.
- The entry in the global offset table will already have been
- initialized in the relocate_section function. */
- if (info->shared
- && SYMBOL_REFERENCES_LOCAL (info, h))
- {
- BFD_ASSERT((h->got.offset & 1) != 0);
- rel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
- }
- else
- {
- BFD_ASSERT((h->got.offset & 1) == 0);
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
- rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
- }
-
- loc = srel->contents + srel->reloc_count++ * sizeof (Elf32_External_Rel);
- bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
- }
-
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
- {
- asection * s;
- Elf_Internal_Rela rel;
- bfd_byte *loc;
-
- /* This symbol needs a copy reloc. Set it up. */
- BFD_ASSERT (h->dynindx != -1
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak));
-
- s = bfd_get_section_by_name (h->root.u.def.section->owner,
- ".rel.bss");
- BFD_ASSERT (s != NULL);
-
- rel.r_offset = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_COPY);
- loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rel);
- bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
- }
-
- /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
- if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
- sym->st_shndx = SHN_ABS;
-
- return TRUE;
-}
-
-/* Finish up the dynamic sections. */
-
-static bfd_boolean
-elf32_arm_finish_dynamic_sections (output_bfd, info)
- bfd * output_bfd;
- struct bfd_link_info * info;
-{
- bfd * dynobj;
- asection * sgot;
- asection * sdyn;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- sgot = bfd_get_section_by_name (dynobj, ".got.plt");
- BFD_ASSERT (sgot != NULL);
- sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- asection *splt;
- Elf32_External_Dyn *dyncon, *dynconend;
-
- splt = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (splt != NULL && sdyn != NULL);
-
- dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
-
- for (; dyncon < dynconend; dyncon++)
- {
- Elf_Internal_Dyn dyn;
- const char * name;
- asection * s;
-
- bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
-
- switch (dyn.d_tag)
- {
- default:
- break;
-
- case DT_PLTGOT:
- name = ".got";
- goto get_vma;
- case DT_JMPREL:
- name = ".rel.plt";
- get_vma:
- s = bfd_get_section_by_name (output_bfd, name);
- BFD_ASSERT (s != NULL);
- dyn.d_un.d_ptr = s->vma;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- break;
-
- case DT_PLTRELSZ:
- s = bfd_get_section_by_name (output_bfd, ".rel.plt");
- BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- break;
-
- case DT_RELSZ:
- /* My reading of the SVR4 ABI indicates that the
- procedure linkage table relocs (DT_JMPREL) should be
- included in the overall relocs (DT_REL). This is
- what Solaris does. However, UnixWare can not handle
- that case. Therefore, we override the DT_RELSZ entry
- here to make it not include the JMPREL relocs. Since
- the linker script arranges for .rel.plt to follow all
- other relocation sections, we don't have to worry
- about changing the DT_REL entry. */
- s = bfd_get_section_by_name (output_bfd, ".rel.plt");
- if (s != NULL)
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
- }
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- break;
-
- /* Set the bottom bit of DT_INIT/FINI if the
- corresponding function is Thumb. */
- case DT_INIT:
- name = info->init_function;
- goto get_sym;
- case DT_FINI:
- name = info->fini_function;
- get_sym:
- /* If it wasn't set by elf_bfd_final_link
- then there is nothing to adjust. */
- if (dyn.d_un.d_val != 0)
- {
- struct elf_link_hash_entry * eh;
-
- eh = elf_link_hash_lookup (elf_hash_table (info), name,
- FALSE, FALSE, TRUE);
- if (eh != (struct elf_link_hash_entry *) NULL
- && ELF_ST_TYPE (eh->type) == STT_ARM_TFUNC)
- {
- dyn.d_un.d_val |= 1;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- }
- }
- break;
- }
- }
-
- /* Fill in the first entry in the procedure linkage table. */
- if (splt->_raw_size > 0)
- {
- bfd_vma got_displacement;
-
- /* Calculate the displacement between the PLT slot and &GOT[0]. */
- got_displacement = (sgot->output_section->vma
- + sgot->output_offset
- - splt->output_section->vma
- - splt->output_offset
- - 16);
-
- bfd_put_32 (output_bfd, elf32_arm_plt0_entry[0], splt->contents + 0);
- bfd_put_32 (output_bfd, elf32_arm_plt0_entry[1], splt->contents + 4);
- bfd_put_32 (output_bfd, elf32_arm_plt0_entry[2], splt->contents + 8);
- bfd_put_32 (output_bfd, elf32_arm_plt0_entry[3], splt->contents + 12);
-#ifdef FOUR_WORD_PLT
- /* The displacement value goes in the otherwise-unused last word of
- the second entry. */
- bfd_put_32 (output_bfd, got_displacement, splt->contents + 28);
-#else
- bfd_put_32 (output_bfd, got_displacement, splt->contents + 16);
-#endif
- }
-
- /* UnixWare sets the entsize of .plt to 4, although that doesn't
- really seem like the right value. */
- elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
- }
-
- /* Fill in the first three entries in the global offset table. */
- if (sgot->_raw_size > 0)
- {
- if (sdyn == NULL)
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
- else
- bfd_put_32 (output_bfd,
- sdyn->output_section->vma + sdyn->output_offset,
- sgot->contents);
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 4);
- bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 8);
- }
-
- elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
-
- return TRUE;
-}
-
-static void
-elf32_arm_post_process_headers (abfd, link_info)
- bfd * abfd;
- struct bfd_link_info * link_info ATTRIBUTE_UNUSED;
-{
- Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
-
- i_ehdrp = elf_elfheader (abfd);
-
- i_ehdrp->e_ident[EI_OSABI] = ARM_ELF_OS_ABI_VERSION;
- i_ehdrp->e_ident[EI_ABIVERSION] = ARM_ELF_ABI_VERSION;
-}
-
-static enum elf_reloc_type_class
-elf32_arm_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
-{
- switch ((int) ELF32_R_TYPE (rela->r_info))
- {
- case R_ARM_RELATIVE:
- return reloc_class_relative;
- case R_ARM_JUMP_SLOT:
- return reloc_class_plt;
- case R_ARM_COPY:
- return reloc_class_copy;
- default:
- return reloc_class_normal;
- }
-}
-
-static bfd_boolean elf32_arm_section_flags PARAMS ((flagword *, Elf_Internal_Shdr *));
-static void elf32_arm_final_write_processing PARAMS ((bfd *, bfd_boolean));
-
-/* Set the right machine number for an Arm ELF file. */
-
-static bfd_boolean
-elf32_arm_section_flags (flags, hdr)
- flagword *flags;
- Elf_Internal_Shdr *hdr;
-{
- if (hdr->sh_type == SHT_NOTE)
- *flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
-
- return TRUE;
-}
-
-void
-elf32_arm_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
-{
- bfd_arm_update_notes (abfd, ARM_NOTE_SECTION);
-}
-
-#define ELF_ARCH bfd_arch_arm
-#define ELF_MACHINE_CODE EM_ARM
-#ifdef __QNXTARGET__
-#define ELF_MAXPAGESIZE 0x1000
-#else
-#define ELF_MAXPAGESIZE 0x8000
-#endif
-
-#define bfd_elf32_bfd_copy_private_bfd_data elf32_arm_copy_private_bfd_data
-#define bfd_elf32_bfd_merge_private_bfd_data elf32_arm_merge_private_bfd_data
-#define bfd_elf32_bfd_set_private_flags elf32_arm_set_private_flags
-#define bfd_elf32_bfd_print_private_bfd_data elf32_arm_print_private_bfd_data
-#define bfd_elf32_bfd_link_hash_table_create elf32_arm_link_hash_table_create
-#define bfd_elf32_bfd_reloc_type_lookup elf32_arm_reloc_type_lookup
-#define bfd_elf32_find_nearest_line elf32_arm_find_nearest_line
-
-#define elf_backend_get_symbol_type elf32_arm_get_symbol_type
-#define elf_backend_gc_mark_hook elf32_arm_gc_mark_hook
-#define elf_backend_gc_sweep_hook elf32_arm_gc_sweep_hook
-#define elf_backend_check_relocs elf32_arm_check_relocs
-#define elf_backend_relocate_section elf32_arm_relocate_section
-#define elf_backend_adjust_dynamic_symbol elf32_arm_adjust_dynamic_symbol
-#define elf_backend_create_dynamic_sections 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_size_dynamic_sections elf32_arm_size_dynamic_sections
-#define elf_backend_post_process_headers elf32_arm_post_process_headers
-#define elf_backend_reloc_type_class elf32_arm_reloc_type_class
-#define elf_backend_object_p elf32_arm_object_p
-#define elf_backend_section_flags elf32_arm_section_flags
-#define elf_backend_final_write_processing elf32_arm_final_write_processing
-#define elf_backend_copy_indirect_symbol elf32_arm_copy_indirect_symbol
-
-#define elf_backend_can_refcount 1
-#define elf_backend_can_gc_sections 1
-#define elf_backend_plt_readonly 1
-#define elf_backend_want_got_plt 1
-#define elf_backend_want_plt_sym 0
-#if !USE_REL
-#define elf_backend_rela_normal 1
-#endif
-
-#define elf_backend_got_header_size 12
-
-#include "elf32-target.h"
-
diff --git a/contrib/binutils/bfd/elf32-gen.c b/contrib/binutils/bfd/elf32-gen.c
index f2edf69da6b8..23c74767799e 100644
--- a/contrib/binutils/bfd/elf32-gen.c
+++ b/contrib/binutils/bfd/elf32-gen.c
@@ -1,22 +1,22 @@
/* Generic support for 32-bit ELF
- Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2004
+ Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2004, 2005
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -41,53 +41,48 @@ static reloc_howto_type dummy =
0, /* dst_mask */
FALSE); /* pcrel_offset */
-static void elf_generic_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static void elf_generic_info_to_howto_rel
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static bfd_boolean elf32_generic_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-
static void
-elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *bfd_reloc;
- Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
+elf_generic_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *bfd_reloc,
+ Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED)
{
bfd_reloc->howto = &dummy;
}
static void
-elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *bfd_reloc;
- Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
+elf_generic_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *bfd_reloc,
+ Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED)
{
bfd_reloc->howto = &dummy;
}
-static bfd_boolean
-elf32_generic_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+static void
+check_for_relocs (bfd * abfd, asection * o, void * failed)
{
- asection *o;
+ if ((o->flags & SEC_RELOC) != 0)
+ {
+ Elf_Internal_Ehdr *ehdrp;
- /* Check if there are any relocations. */
- for (o = abfd->sections; o != NULL; o = o->next)
- if ((o->flags & SEC_RELOC) != 0)
- {
- Elf_Internal_Ehdr *ehdrp;
+ ehdrp = elf_elfheader (abfd);
+ _bfd_error_handler (_("%B: Relocations in generic ELF (EM: %d)"),
+ abfd, ehdrp->e_machine);
- ehdrp = elf_elfheader (abfd);
- (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
- bfd_archive_filename (abfd),
- ehdrp->e_machine);
+ bfd_set_error (bfd_error_wrong_format);
+ * (bfd_boolean *) failed = TRUE;
+ }
+}
- bfd_set_error (bfd_error_wrong_format);
- return FALSE;
- }
+static bfd_boolean
+elf32_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
+{
+ bfd_boolean failed = FALSE;
+
+ /* Check if there are any relocations. */
+ bfd_map_over_sections (abfd, check_for_relocs, & failed);
+ if (failed)
+ return FALSE;
return bfd_elf_link_add_symbols (abfd, info);
}
diff --git a/contrib/binutils/bfd/elf32-i386.c b/contrib/binutils/bfd/elf32-i386.c
index 7b173e4485c5..754aa52254d5 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 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,13 +16,14 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
+#include "elf-vxworks.h"
/* 386 uses REL relocations instead of RELA. */
#define USE_REL 1
@@ -125,9 +126,19 @@ static reloc_howto_type elf_howto_table[]=
HOWTO(R_386_TLS_TPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
bfd_elf_generic_reloc, "R_386_TLS_TPOFF32",
TRUE, 0xffffffff, 0xffffffff, FALSE),
+ EMPTY_HOWTO (38),
+ HOWTO(R_386_TLS_GOTDESC, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_TLS_GOTDESC",
+ TRUE, 0xffffffff, 0xffffffff, FALSE),
+ HOWTO(R_386_TLS_DESC_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "R_386_TLS_DESC_CALL",
+ FALSE, 0, 0, FALSE),
+ HOWTO(R_386_TLS_DESC, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_386_TLS_DESC",
+ TRUE, 0xffffffff, 0xffffffff, FALSE),
/* Another gap. */
-#define R_386_tls (R_386_TLS_TPOFF32 + 1 - R_386_tls_offset)
+#define R_386_tls (R_386_TLS_DESC + 1 - R_386_tls_offset)
#define R_386_vt_offset (R_386_GNU_VTINHERIT - R_386_tls)
/* GNU extension to record C++ vtable hierarchy. */
@@ -291,6 +302,18 @@ elf_i386_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
TRACE ("BFD_RELOC_386_TLS_TPOFF32");
return &elf_howto_table[R_386_TLS_TPOFF32 - R_386_tls_offset];
+ case BFD_RELOC_386_TLS_GOTDESC:
+ TRACE ("BFD_RELOC_386_TLS_GOTDESC");
+ return &elf_howto_table[R_386_TLS_GOTDESC - R_386_tls_offset];
+
+ case BFD_RELOC_386_TLS_DESC_CALL:
+ TRACE ("BFD_RELOC_386_TLS_DESC_CALL");
+ return &elf_howto_table[R_386_TLS_DESC_CALL - R_386_tls_offset];
+
+ case BFD_RELOC_386_TLS_DESC:
+ TRACE ("BFD_RELOC_386_TLS_DESC");
+ return &elf_howto_table[R_386_TLS_DESC - R_386_tls_offset];
+
case BFD_RELOC_VTABLE_INHERIT:
TRACE ("BFD_RELOC_VTABLE_INHERIT");
return &elf_howto_table[R_386_GNU_VTINHERIT - R_386_vt_offset];
@@ -323,8 +346,8 @@ elf_i386_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
&& ((indx = r_type - R_386_vt_offset) - R_386_tls
>= R_386_vt - R_386_tls))
{
- (*_bfd_error_handler) (_("%s: invalid relocation type %d"),
- bfd_archive_filename (abfd), (int) r_type);
+ (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
+ abfd, (int) r_type);
indx = R_386_NONE;
}
cache_ptr->howto = &elf_howto_table[indx];
@@ -351,7 +374,7 @@ static bfd_boolean
elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- size_t raw_size;
+ size_t size;
if (note->namesz == 8 && strcmp (note->namedata, "FreeBSD") == 0)
{
@@ -368,7 +391,7 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 28;
- raw_size = bfd_get_32 (abfd, note->descdata + 8);
+ size = bfd_get_32 (abfd, note->descdata + 8);
}
else
{
@@ -386,7 +409,7 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 72;
- raw_size = 68;
+ size = 68;
break;
}
@@ -394,7 +417,7 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -471,15 +494,15 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
#define PLT_ENTRY_SIZE 16
/* The first entry in an absolute procedure linkage table looks like
- this. See the SVR4 ABI i386 supplement to see how this works. */
+ this. See the SVR4 ABI i386 supplement to see how this works.
+ Will be padded to PLT_ENTRY_SIZE with htab->plt0_pad_byte. */
-static const bfd_byte elf_i386_plt0_entry[PLT_ENTRY_SIZE] =
+static const bfd_byte elf_i386_plt0_entry[12] =
{
0xff, 0x35, /* pushl contents of address */
0, 0, 0, 0, /* replaced with address of .got + 4. */
0xff, 0x25, /* jmp indirect */
- 0, 0, 0, 0, /* replaced with address of .got + 8. */
- 0, 0, 0, 0 /* pad out to 16 bytes. */
+ 0, 0, 0, 0 /* replaced with address of .got + 8. */
};
/* Subsequent entries in an absolute procedure linkage table look like
@@ -495,13 +518,13 @@ static const bfd_byte elf_i386_plt_entry[PLT_ENTRY_SIZE] =
0, 0, 0, 0 /* replaced with offset to start of .plt. */
};
-/* The first entry in a PIC procedure linkage table look like this. */
+/* The first entry in a PIC procedure linkage table look like this.
+ Will be padded to PLT_ENTRY_SIZE with htab->plt0_pad_byte. */
-static const bfd_byte elf_i386_pic_plt0_entry[PLT_ENTRY_SIZE] =
+static const bfd_byte elf_i386_pic_plt0_entry[12] =
{
0xff, 0xb3, 4, 0, 0, 0, /* pushl 4(%ebx) */
- 0xff, 0xa3, 8, 0, 0, 0, /* jmp *8(%ebx) */
- 0, 0, 0, 0 /* pad out to 16 bytes. */
+ 0xff, 0xa3, 8, 0, 0, 0 /* jmp *8(%ebx) */
};
/* Subsequent entries in a PIC procedure linkage table look like this. */
@@ -516,6 +539,12 @@ static const bfd_byte elf_i386_pic_plt_entry[PLT_ENTRY_SIZE] =
0, 0, 0, 0 /* replaced with offset to start of .plt. */
};
+/* On VxWorks, the .rel.plt.unloaded section has absolute relocations
+ for the PLTResolve stub and then for each PLT entry. */
+#define PLTRESOLVE_RELOCS_SHLIB 0
+#define PLTRESOLVE_RELOCS 2
+#define PLT_NON_JUMP_SLOT_RELOCS 2
+
/* The i386 linker needs to keep track of the number of relocs that it
decides to copy as dynamic relocs in check_relocs for each symbol.
This is so that it can later discard them if they are found to be
@@ -552,7 +581,24 @@ struct elf_i386_link_hash_entry
#define GOT_TLS_IE_POS 5
#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) \
+ ((type) == GOT_TLS_GD || GOT_TLS_GD_BOTH_P (type))
+#define GOT_TLS_GDESC_P(type) \
+ ((type) == GOT_TLS_GDESC || GOT_TLS_GD_BOTH_P (type))
+#define GOT_TLS_GD_ANY_P(type) \
+ (GOT_TLS_GD_P (type) || GOT_TLS_GDESC_P (type))
unsigned char tls_type;
+
+ /* Offset of the GOTPLT entry reserved for the TLS descriptor,
+ starting at the end of the jump table. */
+ bfd_vma tlsdesc_got;
};
#define elf_i386_hash_entry(ent) ((struct elf_i386_link_hash_entry *)(ent))
@@ -563,6 +609,9 @@ struct elf_i386_obj_tdata
/* tls_type for each local got entry. */
char *local_got_tls_type;
+
+ /* GOTPLT entries for TLS descriptors. */
+ bfd_vma *local_tlsdesc_gotent;
};
#define elf_i386_tdata(abfd) \
@@ -571,6 +620,9 @@ struct elf_i386_obj_tdata
#define elf_i386_local_got_tls_type(abfd) \
(elf_i386_tdata (abfd)->local_got_tls_type)
+#define elf_i386_local_tlsdesc_gotent(abfd) \
+ (elf_i386_tdata (abfd)->local_tlsdesc_gotent)
+
static bfd_boolean
elf_i386_mkobject (bfd *abfd)
{
@@ -596,11 +648,27 @@ struct elf_i386_link_hash_table
asection *sdynbss;
asection *srelbss;
+ /* The (unloaded but important) .rel.plt.unloaded section on VxWorks. */
+ asection *srelplt2;
+
+ /* True if the target system is VxWorks. */
+ int is_vxworks;
+
+ /* Value used to fill the last word of the first plt entry. */
+ bfd_byte plt0_pad_byte;
+
+ /* The index of the next unused R_386_TLS_DESC slot in .rel.plt. */
+ bfd_vma next_tls_desc_index;
+
union {
bfd_signed_vma refcount;
bfd_vma offset;
} tls_ldm_got;
+ /* The amount of space used by the reserved portion of the sgotplt
+ section, plus whatever space is used by the jump slots. */
+ bfd_vma sgotplt_jump_table_size;
+
/* Small local sym to section mapping cache. */
struct sym_sec_cache sym_sec;
};
@@ -610,6 +678,9 @@ struct elf_i386_link_hash_table
#define elf_i386_hash_table(p) \
((struct elf_i386_link_hash_table *) ((p)->hash))
+#define elf_i386_compute_jump_table_size(htab) \
+ ((htab)->next_tls_desc_index * 4)
+
/* Create an entry in an i386 ELF linker hash table. */
static struct bfd_hash_entry *
@@ -636,6 +707,7 @@ link_hash_newfunc (struct bfd_hash_entry *entry,
eh = (struct elf_i386_link_hash_entry *) entry;
eh->dyn_relocs = NULL;
eh->tls_type = GOT_UNKNOWN;
+ eh->tlsdesc_got = (bfd_vma) -1;
}
return entry;
@@ -653,7 +725,8 @@ elf_i386_link_hash_table_create (bfd *abfd)
if (ret == NULL)
return NULL;
- if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc))
+ if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
+ sizeof (struct elf_i386_link_hash_entry)))
{
free (ret);
return NULL;
@@ -667,7 +740,12 @@ elf_i386_link_hash_table_create (bfd *abfd)
ret->sdynbss = NULL;
ret->srelbss = NULL;
ret->tls_ldm_got.refcount = 0;
+ ret->next_tls_desc_index = 0;
+ ret->sgotplt_jump_table_size = 0;
ret->sym_sec.abfd = NULL;
+ ret->is_vxworks = 0;
+ ret->srelplt2 = NULL;
+ ret->plt0_pad_byte = 0;
return &ret->elf.root;
}
@@ -689,12 +767,13 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info)
if (!htab->sgot || !htab->sgotplt)
abort ();
- htab->srelgot = bfd_make_section (dynobj, ".rel.got");
+ htab->srelgot = bfd_make_section_with_flags (dynobj, ".rel.got",
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (htab->srelgot == NULL
- || ! bfd_set_section_flags (dynobj, htab->srelgot,
- (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED
- | SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
return FALSE;
return TRUE;
@@ -726,13 +805,17 @@ elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
|| (!info->shared && !htab->srelbss))
abort ();
+ if (htab->is_vxworks
+ && !elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2))
+ return FALSE;
+
return TRUE;
}
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf_i386_copy_indirect_symbol (const struct elf_backend_data *bed,
+elf_i386_copy_indirect_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
@@ -748,10 +831,7 @@ elf_i386_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_i386_dyn_relocs **pp;
struct elf_i386_dyn_relocs *p;
- if (ind->root.type == bfd_link_hash_indirect)
- abort ();
-
- /* Add reloc counts against the weak sym to the strong sym
+ /* Add reloc counts against the indirect sym to the direct sym
list. Merge any entries against the same section. */
for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
{
@@ -784,18 +864,19 @@ elf_i386_copy_indirect_symbol (const struct elf_backend_data *bed,
if (ELIMINATE_COPY_RELOCS
&& ind->root.type != bfd_link_hash_indirect
- && (dir->elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
- /* If called to transfer flags for a weakdef during processing
- of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
- We clear it ourselves for ELIMINATE_COPY_RELOCS. */
- dir->elf_link_hash_flags |=
- (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_HASH_NEEDS_PLT
- | ELF_LINK_POINTER_EQUALITY_NEEDED));
+ && dir->dynamic_adjusted)
+ {
+ /* If called to transfer flags for a weakdef during processing
+ of elf_adjust_dynamic_symbol, don't copy non_got_ref.
+ We clear it ourselves for ELIMINATE_COPY_RELOCS. */
+ dir->ref_dynamic |= ind->ref_dynamic;
+ dir->ref_regular |= ind->ref_regular;
+ dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
+ dir->needs_plt |= ind->needs_plt;
+ dir->pointer_equality_needed |= ind->pointer_equality_needed;
+ }
else
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+ _bfd_elf_link_hash_copy_indirect (info, dir, ind);
}
static int
@@ -807,6 +888,8 @@ elf_i386_tls_transition (struct bfd_link_info *info, int r_type, int is_local)
switch (r_type)
{
case R_386_TLS_GD:
+ case R_386_TLS_GOTDESC:
+ case R_386_TLS_DESC_CALL:
case R_386_TLS_IE_32:
if (is_local)
return R_386_TLS_LE_32;
@@ -861,8 +944,8 @@ elf_i386_check_relocs (bfd *abfd,
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd,
r_symndx);
return FALSE;
}
@@ -870,7 +953,12 @@ elf_i386_check_relocs (bfd *abfd,
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ {
+ 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;
+ }
r_type = elf_i386_tls_transition (info, r_type, h == NULL);
@@ -893,7 +981,7 @@ elf_i386_check_relocs (bfd *abfd,
if (h == NULL)
continue;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 1;
h->plt.refcount += 1;
break;
@@ -906,6 +994,8 @@ elf_i386_check_relocs (bfd *abfd,
case R_386_GOT32:
case R_386_TLS_GD:
+ case R_386_TLS_GOTDESC:
+ case R_386_TLS_DESC_CALL:
/* This symbol requires a global offset table entry. */
{
int tls_type, old_tls_type;
@@ -915,15 +1005,31 @@ elf_i386_check_relocs (bfd *abfd,
default:
case R_386_GOT32: tls_type = GOT_NORMAL; break;
case R_386_TLS_GD: tls_type = GOT_TLS_GD; break;
+ case R_386_TLS_GOTDESC:
+ case R_386_TLS_DESC_CALL:
+ tls_type = GOT_TLS_GDESC; break;
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;
}
@@ -944,13 +1050,16 @@ elf_i386_check_relocs (bfd *abfd,
bfd_size_type size;
size = symtab_hdr->sh_info;
- size *= (sizeof (bfd_signed_vma) + sizeof(char));
+ size *= (sizeof (bfd_signed_vma)
+ + sizeof (bfd_vma) + sizeof(char));
local_got_refcounts = bfd_zalloc (abfd, size);
if (local_got_refcounts == NULL)
return FALSE;
elf_local_got_refcounts (abfd) = local_got_refcounts;
+ elf_i386_local_tlsdesc_gotent (abfd)
+ = (bfd_vma *) (local_got_refcounts + symtab_hdr->sh_info);
elf_i386_local_got_tls_type (abfd)
- = (char *) (local_got_refcounts + symtab_hdr->sh_info);
+ = (char *) (local_got_refcounts + 2 * symtab_hdr->sh_info);
}
local_got_refcounts[r_symndx] += 1;
old_tls_type = elf_i386_local_got_tls_type (abfd) [r_symndx];
@@ -960,18 +1069,22 @@ 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
- && (old_tls_type != GOT_TLS_GD
+ 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))
{
- if ((old_tls_type & GOT_TLS_IE) && tls_type == GOT_TLS_GD)
+ if ((old_tls_type & GOT_TLS_IE) && GOT_TLS_GD_ANY_P (tls_type))
tls_type = old_tls_type;
+ else if (GOT_TLS_GD_ANY_P (old_tls_type)
+ && GOT_TLS_GD_ANY_P (tls_type))
+ tls_type |= old_tls_type;
else
{
(*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and "
+ (_("%B: `%s' accessed both as normal and "
"thread local symbol"),
- bfd_archive_filename (abfd),
+ abfd,
h ? h->root.root.string : "<local>");
return FALSE;
}
@@ -1018,13 +1131,13 @@ elf_i386_check_relocs (bfd *abfd,
sections have not yet been mapped to output sections.
Tentatively set the flag for now, and correct in
adjust_dynamic_symbol. */
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 1;
/* We may need a .plt entry if the function this reloc
refers to is in a shared lib. */
h->plt.refcount += 1;
if (r_type != R_386_PC32)
- h->elf_link_hash_flags |= ELF_LINK_POINTER_EQUALITY_NEEDED;
+ h->pointer_equality_needed = 1;
}
/* If we are creating a shared library, and this is a reloc
@@ -1054,15 +1167,13 @@ elf_i386_check_relocs (bfd *abfd,
|| (h != NULL
&& (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ || !h->def_regular)))
{
struct elf_i386_dyn_relocs *p;
struct elf_i386_dyn_relocs **head;
@@ -1086,8 +1197,8 @@ elf_i386_check_relocs (bfd *abfd,
name + 4) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
}
if (htab->elf.dynobj == NULL)
@@ -1099,13 +1210,14 @@ elf_i386_check_relocs (bfd *abfd,
{
flagword flags;
- sreloc = bfd_make_section (dynobj, name);
flags = (SEC_HAS_CONTENTS | SEC_READONLY
| SEC_IN_MEMORY | SEC_LINKER_CREATED);
if ((sec->flags & SEC_ALLOC) != 0)
flags |= SEC_ALLOC | SEC_LOAD;
+ sreloc = bfd_make_section_with_flags (dynobj,
+ name,
+ flags);
if (sreloc == NULL
- || ! bfd_set_section_flags (dynobj, sreloc, flags)
|| ! bfd_set_section_alignment (dynobj, sreloc, 2))
return FALSE;
}
@@ -1120,6 +1232,7 @@ elf_i386_check_relocs (bfd *abfd,
}
else
{
+ void **vpp;
/* Track dynamic relocs needed for local syms too.
We really need local syms available to do this
easily. Oh well. */
@@ -1130,8 +1243,8 @@ elf_i386_check_relocs (bfd *abfd,
if (s == NULL)
return FALSE;
- head = ((struct elf_i386_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ vpp = &elf_section_data (s)->local_dynrel;
+ head = (struct elf_i386_dyn_relocs **)vpp;
}
p = *head;
@@ -1249,6 +1362,9 @@ elf_i386_gc_sweep_hook (bfd *abfd,
struct elf_i386_dyn_relocs *p;
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;
eh = (struct elf_i386_link_hash_entry *) h;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
@@ -1270,6 +1386,8 @@ elf_i386_gc_sweep_hook (bfd *abfd,
break;
case R_386_TLS_GD:
+ case R_386_TLS_GOTDESC:
+ case R_386_TLS_DESC_CALL:
case R_386_TLS_IE_32:
case R_386_TLS_IE:
case R_386_TLS_GOTIE:
@@ -1326,7 +1444,7 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
will fill in the contents of the procedure linkage table later,
when we know the address of the .got section. */
if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ || h->needs_plt)
{
if (h->plt.refcount <= 0
|| SYMBOL_CALLS_LOCAL (info, h)
@@ -1339,7 +1457,7 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
such a case, we don't actually need to build a procedure
linkage table, and we can just do a PC32 reloc instead. */
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
}
return TRUE;
@@ -1355,16 +1473,14 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
+ if (h->u.weakdef != NULL)
{
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
+ 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;
if (ELIMINATE_COPY_RELOCS || info->nocopyreloc)
- h->elf_link_hash_flags
- = ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
- | (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
+ h->non_got_ref = h->u.weakdef->non_got_ref;
return TRUE;
}
@@ -1380,17 +1496,23 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If there are no references to this symbol that do not use the
GOT, we don't need to generate a copy reloc. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
+ if (!h->non_got_ref)
return TRUE;
/* If -z nocopyreloc was given, we won't generate them either. */
if (info->nocopyreloc)
{
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 0;
return TRUE;
}
- if (ELIMINATE_COPY_RELOCS)
+ htab = elf_i386_hash_table (info);
+
+ /* If there aren't any dynamic relocs in read-only sections, then
+ we can keep the dynamic relocs and avoid the copy reloc. This
+ doesn't work on VxWorks, where we can not have dynamic relocations
+ (other than copy and jump slot relocations) in an executable. */
+ if (ELIMINATE_COPY_RELOCS && !htab->is_vxworks)
{
struct elf_i386_link_hash_entry * eh;
struct elf_i386_dyn_relocs *p;
@@ -1403,15 +1525,20 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
break;
}
- /* If we didn't find any dynamic relocs in read-only sections, then
- we'll be keeping the dynamic relocs and avoiding the copy reloc. */
if (p == NULL)
{
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 0;
return TRUE;
}
}
+ if (h->size == 0)
+ {
+ (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+ h->root.root.string);
+ return TRUE;
+ }
+
/* We must allocate the symbol in our .dynbss section, which will
become part of the .bss section of the executable. There will be
an entry for this symbol in the .dynsym section. The dynamic
@@ -1422,15 +1549,13 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
both the dynamic object and the regular object will refer to the
same memory location for the variable. */
- htab = elf_i386_hash_table (info);
-
/* We must generate a R_386_COPY reloc to tell the dynamic linker to
copy the initial value out of the dynamic object and into the
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf32_External_Rel);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ htab->srelbss->size += sizeof (Elf32_External_Rel);
+ h->needs_copy = 1;
}
/* We need to figure out the alignment required for this symbol. I
@@ -1441,7 +1566,7 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ 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))
@@ -1450,10 +1575,10 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1487,7 +1612,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -1500,10 +1625,10 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1511,34 +1636,58 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
pointers compare as equal between the normal executable and
the shared library. */
if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->def_regular)
{
h->root.u.def.section = s;
h->root.u.def.value = h->plt.offset;
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += 4;
+ htab->sgotplt->size += 4;
/* We also need to make an entry in the .rel.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rel);
+ htab->srelplt->size += sizeof (Elf32_External_Rel);
+ htab->next_tls_desc_index++;
+
+ if (htab->is_vxworks && !info->shared)
+ {
+ /* VxWorks has a second set of relocations for each PLT entry
+ in executables. They go in a separate relocation section,
+ which is processed by the kernel loader. */
+
+ /* There are two relocations for the initial PLT entry: an
+ R_386_32 relocation for _GLOBAL_OFFSET_TABLE_ + 4 and an
+ R_386_32 relocation for _GLOBAL_OFFSET_TABLE_ + 8. */
+
+ if (h->plt.offset == PLT_ENTRY_SIZE)
+ htab->srelplt2->size += (sizeof (Elf32_External_Rel) * 2);
+
+ /* There are two extra relocations for each subsequent PLT entry:
+ an R_386_32 relocation for the GOT entry, and an R_386_32
+ relocation for the PLT entry. */
+
+ htab->srelplt2->size += (sizeof (Elf32_External_Rel) * 2);
+ }
}
else
{
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
}
}
else
{
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
}
+ eh = (struct elf_i386_link_hash_entry *) h;
+ eh->tlsdesc_got = (bfd_vma) -1;
+
/* If R_386_TLS_{IE_32,IE,GOTIE} symbol is now local to the binary,
make it a R_386_TLS_LE_32 requiring no TLS entry. */
if (h->got.refcount > 0
@@ -1551,22 +1700,41 @@ 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. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += 4;
- /* R_386_TLS_GD needs 2 consecutive GOT slots. */
- if (tls_type == GOT_TLS_GD || tls_type == GOT_TLS_IE_BOTH)
- s->_raw_size += 4;
+ if (GOT_TLS_GDESC_P (tls_type))
+ {
+ eh->tlsdesc_got = htab->sgotplt->size
+ - elf_i386_compute_jump_table_size (htab);
+ htab->sgotplt->size += 8;
+ h->got.offset = (bfd_vma) -2;
+ }
+ if (! GOT_TLS_GDESC_P (tls_type)
+ || GOT_TLS_GD_P (tls_type))
+ {
+ h->got.offset = s->size;
+ s->size += 4;
+ /* R_386_TLS_GD needs 2 consecutive GOT slots. */
+ if (GOT_TLS_GD_P (tls_type) || tls_type == GOT_TLS_IE_BOTH)
+ s->size += 4;
+ }
dyn = htab->elf.dynamic_sections_created;
/* R_386_TLS_IE_32 needs one dynamic relocation,
R_386_TLS_IE resp. R_386_TLS_GOTIE needs one dynamic relocation,
@@ -1574,22 +1742,24 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
need two), R_386_TLS_GD needs one if local symbol and two if
global. */
if (tls_type == GOT_TLS_IE_BOTH)
- htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rel);
- else if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
+ htab->srelgot->size += 2 * sizeof (Elf32_External_Rel);
+ else if ((GOT_TLS_GD_P (tls_type) && h->dynindx == -1)
|| (tls_type & GOT_TLS_IE))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rel);
- else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rel);
- else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak)
+ htab->srelgot->size += sizeof (Elf32_External_Rel);
+ else if (GOT_TLS_GD_P (tls_type))
+ htab->srelgot->size += 2 * sizeof (Elf32_External_Rel);
+ else if (! GOT_TLS_GDESC_P (tls_type)
+ && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak)
&& (info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ htab->srelgot->size += sizeof (Elf32_External_Rel);
+ if (GOT_TLS_GDESC_P (tls_type))
+ htab->srelplt->size += sizeof (Elf32_External_Rel);
}
else
h->got.offset = (bfd_vma) -1;
- eh = (struct elf_i386_link_hash_entry *) h;
if (eh->dyn_relocs == NULL)
return TRUE;
@@ -1624,9 +1794,21 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* Also discard relocs on undefined weak syms with non-default
visibility. */
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ if (eh->dyn_relocs != NULL
&& h->root.type == bfd_link_hash_undefweak)
- eh->dyn_relocs = NULL;
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->dyn_relocs = NULL;
+
+ /* Make sure undefined weak symbols are output as a dynamic
+ symbol in PIEs. */
+ else if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+ }
}
else if (ELIMINATE_COPY_RELOCS)
{
@@ -1634,9 +1816,9 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
symbols which turn out to need copy relocs or are not
dynamic. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
|| (htab->elf.dynamic_sections_created
&& (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined))))
@@ -1644,7 +1826,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -1665,7 +1847,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rel);
+ sreloc->size += p->count * sizeof (Elf32_External_Rel);
}
return TRUE;
@@ -1725,7 +1907,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1737,6 +1919,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
bfd_signed_vma *local_got;
bfd_signed_vma *end_local_got;
char *local_tls_type;
+ bfd_vma *local_tlsdesc_gotent;
bfd_size_type locsymcount;
Elf_Internal_Shdr *symtab_hdr;
asection *srel;
@@ -1748,8 +1931,8 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
struct elf_i386_dyn_relocs *p;
- for (p = *((struct elf_i386_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ for (p = ((struct elf_i386_dyn_relocs *)
+ elf_section_data (s)->local_dynrel);
p != NULL;
p = p->next)
{
@@ -1764,7 +1947,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf32_External_Rel);
+ srel->size += p->count * sizeof (Elf32_External_Rel);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -1779,25 +1962,42 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
locsymcount = symtab_hdr->sh_info;
end_local_got = local_got + locsymcount;
local_tls_type = elf_i386_local_got_tls_type (ibfd);
+ local_tlsdesc_gotent = elf_i386_local_tlsdesc_gotent (ibfd);
s = htab->sgot;
srel = htab->srelgot;
- for (; local_got < end_local_got; ++local_got, ++local_tls_type)
+ for (; local_got < end_local_got;
+ ++local_got, ++local_tls_type, ++local_tlsdesc_gotent)
{
+ *local_tlsdesc_gotent = (bfd_vma) -1;
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += 4;
- if (*local_tls_type == GOT_TLS_GD
- || *local_tls_type == GOT_TLS_IE_BOTH)
- s->_raw_size += 4;
+ if (GOT_TLS_GDESC_P (*local_tls_type))
+ {
+ *local_tlsdesc_gotent = htab->sgotplt->size
+ - elf_i386_compute_jump_table_size (htab);
+ htab->sgotplt->size += 8;
+ *local_got = (bfd_vma) -2;
+ }
+ if (! GOT_TLS_GDESC_P (*local_tls_type)
+ || GOT_TLS_GD_P (*local_tls_type))
+ {
+ *local_got = s->size;
+ s->size += 4;
+ if (GOT_TLS_GD_P (*local_tls_type)
+ || *local_tls_type == GOT_TLS_IE_BOTH)
+ s->size += 4;
+ }
if (info->shared
- || *local_tls_type == GOT_TLS_GD
+ || GOT_TLS_GD_ANY_P (*local_tls_type)
|| (*local_tls_type & GOT_TLS_IE))
{
if (*local_tls_type == GOT_TLS_IE_BOTH)
- srel->_raw_size += 2 * sizeof (Elf32_External_Rel);
- else
- srel->_raw_size += sizeof (Elf32_External_Rel);
+ srel->size += 2 * sizeof (Elf32_External_Rel);
+ else if (GOT_TLS_GD_P (*local_tls_type)
+ || ! GOT_TLS_GDESC_P (*local_tls_type))
+ srel->size += sizeof (Elf32_External_Rel);
+ if (GOT_TLS_GDESC_P (*local_tls_type))
+ htab->srelplt->size += sizeof (Elf32_External_Rel);
}
}
else
@@ -1809,9 +2009,9 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
/* Allocate 2 got entries and 1 dynamic reloc for R_386_TLS_LDM
relocs. */
- htab->tls_ldm_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 8;
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += 8;
+ htab->srelgot->size += sizeof (Elf32_External_Rel);
}
else
htab->tls_ldm_got.offset = -1;
@@ -1820,24 +2020,41 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
sym dynamic relocs. */
elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
+ /* For every jump slot reserved in the sgotplt, reloc_count is
+ incremented. However, when we reserve space for TLS descriptors,
+ it's not incremented, so in order to compute the space reserved
+ for them, it suffices to multiply the reloc count by the jump
+ slot size. */
+ if (htab->srelplt)
+ htab->sgotplt_jump_table_size = htab->next_tls_desc_index * 4;
+
/* We now have determined the sizes of the various dynamic sections.
Allocate memory for them. */
relocs = FALSE;
for (s = dynobj->sections; s != NULL; s = s->next)
{
+ bfd_boolean strip_section = TRUE;
+
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
if (s == htab->splt
|| s == htab->sgot
- || s == htab->sgotplt)
+ || s == htab->sgotplt
+ || s == htab->sdynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
+ /* We'd like to strip these sections if they aren't needed, but if
+ we've exported dynamic symbols from them we must leave them.
+ It's too late to tell BFD to get rid of the symbols. */
+
+ if (htab->elf.hplt != NULL)
+ strip_section = FALSE;
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rel", 4) == 0)
{
- if (s->_raw_size != 0 && s != htab->srelplt)
+ if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -1850,7 +2067,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rel.bss and
@@ -1861,17 +2078,20 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
adjust_dynamic_symbol is called, and it is that
function which decides whether anything needs to go
into these sections. */
-
- _bfd_strip_section_from_output (info, s);
+ if (strip_section)
+ s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
but this way if it does, we get a R_386_NONE reloc instead
of garbage. */
- s->contents = bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -1892,7 +2112,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -1926,6 +2146,41 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return TRUE;
}
+static bfd_boolean
+elf_i386_always_size_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
+{
+ asection *tls_sec = elf_hash_table (info)->tls_sec;
+
+ if (tls_sec)
+ {
+ struct elf_link_hash_entry *tlsbase;
+
+ tlsbase = elf_link_hash_lookup (elf_hash_table (info),
+ "_TLS_MODULE_BASE_",
+ FALSE, FALSE, FALSE);
+
+ if (tlsbase && tlsbase->type == STT_TLS)
+ {
+ struct bfd_link_hash_entry *bh = NULL;
+ const struct elf_backend_data *bed
+ = get_elf_backend_data (output_bfd);
+
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, output_bfd, "_TLS_MODULE_BASE_", BSF_LOCAL,
+ tls_sec, 0, NULL, FALSE,
+ bed->collect, &bh)))
+ return FALSE;
+ tlsbase = (struct elf_link_hash_entry *)bh;
+ tlsbase->def_regular = 1;
+ tlsbase->other = STV_HIDDEN;
+ (*bed->elf_backend_hide_symbol) (info, tlsbase, TRUE);
+ }
+ }
+
+ return TRUE;
+}
+
/* Set the correct type for an x86 ELF section. We do this by the
section name, which is a hack, but ought to work. */
@@ -2003,6 +2258,7 @@ elf_i386_relocate_section (bfd *output_bfd,
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
bfd_vma *local_got_offsets;
+ bfd_vma *local_tlsdesc_gotents;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
@@ -2010,6 +2266,7 @@ elf_i386_relocate_section (bfd *output_bfd,
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
local_got_offsets = elf_local_got_offsets (input_bfd);
+ local_tlsdesc_gotents = elf_i386_local_tlsdesc_gotent (input_bfd);
rel = relocs;
relend = relocs + input_section->reloc_count;
@@ -2021,7 +2278,7 @@ elf_i386_relocate_section (bfd *output_bfd,
struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym;
asection *sec;
- bfd_vma off;
+ bfd_vma off, offplt;
bfd_vma relocation;
bfd_boolean unresolved_reloc;
bfd_reloc_status_type r;
@@ -2039,6 +2296,9 @@ elf_i386_relocate_section (bfd *output_bfd,
&& ((indx = r_type - R_386_tls_offset) - R_386_ext
>= R_386_tls - R_386_ext))
{
+ (*_bfd_error_handler)
+ (_("%B: unrecognized relocation (0x%x) in section `%A'"),
+ input_bfd, input_section, r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -2174,6 +2434,21 @@ elf_i386_relocate_section (bfd *output_bfd,
unresolved_reloc, warned);
}
+ if (r_symndx == 0)
+ {
+ /* 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);
+ }
+
switch (r_type)
{
case R_386_GOT32:
@@ -2261,24 +2536,46 @@ elf_i386_relocate_section (bfd *output_bfd,
if (off >= (bfd_vma) -2)
abort ();
- relocation = htab->sgot->output_offset + off;
+ relocation = htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off
+ - htab->sgotplt->output_section->vma
+ - htab->sgotplt->output_offset;
break;
case R_386_GOTOFF:
/* Relocation is relative to the start of the global offset
table. */
- /* Note that sgot->output_offset is not involved in this
- calculation. We always want the start of .got. If we
- defined _GLOBAL_OFFSET_TABLE in a different way, as is
+ /* Check to make sure it isn't a protected function symbol
+ for shared library since it may not be local when used
+ as function address. */
+ if (info->shared
+ && !info->executable
+ && h
+ && h->def_regular
+ && h->type == STT_FUNC
+ && ELF_ST_VISIBILITY (h->other) == STV_PROTECTED)
+ {
+ (*_bfd_error_handler)
+ (_("%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object"),
+ input_bfd, h->root.root.string);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ /* Note that sgot is not involved in this
+ calculation. We always want the start of .got.plt. If we
+ defined _GLOBAL_OFFSET_TABLE_ in a different way, as is
permitted by the ABI, we might have to change this
calculation. */
- relocation -= htab->sgot->output_section->vma;
+ relocation -= htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset;
break;
case R_386_GOTPC:
/* Use global offset table as symbol value. */
- relocation = htab->sgot->output_section->vma;
+ relocation = htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset;
unresolved_reloc = FALSE;
break;
@@ -2308,11 +2605,7 @@ elf_i386_relocate_section (bfd *output_bfd,
case R_386_32:
case R_386_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
@@ -2325,11 +2618,9 @@ elf_i386_relocate_section (bfd *output_bfd,
&& !info->shared
&& h != NULL
&& h->dynindx != -1
- && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
|| h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined)))
{
@@ -2362,8 +2653,7 @@ elf_i386_relocate_section (bfd *output_bfd,
&& (r_type == R_386_PC32
|| !info->shared
|| !info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || !h->def_regular))
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
else
{
@@ -2410,6 +2700,8 @@ elf_i386_relocate_section (bfd *output_bfd,
/* Fall through */
case R_386_TLS_GD:
+ case R_386_TLS_GOTDESC:
+ case R_386_TLS_DESC_CALL:
case R_386_TLS_IE_32:
case R_386_TLS_GOTIE:
r_type = elf_i386_tls_transition (info, r_type, h == NULL);
@@ -2419,12 +2711,21 @@ 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;
}
if (tls_type == GOT_TLS_IE)
tls_type = GOT_TLS_IE_NEG;
- if (r_type == R_386_TLS_GD)
+ if (r_type == R_386_TLS_GD
+ || r_type == R_386_TLS_GOTDESC
+ || r_type == R_386_TLS_DESC_CALL)
{
if (tls_type == GOT_TLS_IE_POS)
r_type = R_386_TLS_GOTIE;
@@ -2444,7 +2745,7 @@ elf_i386_relocate_section (bfd *output_bfd,
BFD_ASSERT (rel->r_offset >= 2);
type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
BFD_ASSERT (type == 0x8d || type == 0x04);
- BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset + 4)
== 0xe8);
@@ -2470,7 +2771,7 @@ elf_i386_relocate_section (bfd *output_bfd,
else
{
BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4);
- if (rel->r_offset + 10 <= input_section->_raw_size
+ if (rel->r_offset + 10 <= input_section->size
&& bfd_get_8 (input_bfd,
contents + rel->r_offset + 9) == 0x90)
{
@@ -2498,6 +2799,63 @@ elf_i386_relocate_section (bfd *output_bfd,
rel++;
continue;
}
+ else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GOTDESC)
+ {
+ /* GDesc -> LE transition.
+ It's originally something like:
+ leal x@tlsdesc(%ebx), %eax
+
+ leal x@ntpoff, %eax
+
+ Registers other than %eax may be set up here. */
+
+ unsigned int val, type;
+ bfd_vma roff;
+
+ /* First, make sure it's a leal adding ebx to a
+ 32-bit offset into any register, although it's
+ probably almost always going to be eax. */
+ roff = rel->r_offset;
+ BFD_ASSERT (roff >= 2);
+ type = bfd_get_8 (input_bfd, contents + roff - 2);
+ BFD_ASSERT (type == 0x8d);
+ val = bfd_get_8 (input_bfd, contents + roff - 1);
+ BFD_ASSERT ((val & 0xc7) == 0x83);
+ BFD_ASSERT (roff + 4 <= input_section->size);
+
+ /* Now modify the instruction as appropriate. */
+ /* aoliva FIXME: remove the above and xor the byte
+ below with 0x86. */
+ bfd_put_8 (output_bfd, val ^ 0x86,
+ contents + roff - 1);
+ bfd_put_32 (output_bfd, -tpoff (info, relocation),
+ contents + roff);
+ continue;
+ }
+ else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_DESC_CALL)
+ {
+ /* GDesc -> LE transition.
+ It's originally:
+ call *(%eax)
+ Turn it into:
+ nop; nop */
+
+ unsigned int val, type;
+ bfd_vma roff;
+
+ /* First, make sure it's a call *(%eax). */
+ roff = rel->r_offset;
+ BFD_ASSERT (roff + 2 <= input_section->size);
+ type = bfd_get_8 (input_bfd, contents + roff);
+ BFD_ASSERT (type == 0xff);
+ 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);
+ bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
+ continue;
+ }
else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_IE)
{
unsigned int val, type;
@@ -2513,7 +2871,7 @@ elf_i386_relocate_section (bfd *output_bfd,
addl $foo, %reg. */
BFD_ASSERT (rel->r_offset >= 1);
val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
- BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 4 <= input_section->size);
if (val == 0xa1)
{
/* movl foo, %eax. */
@@ -2570,7 +2928,7 @@ elf_i386_relocate_section (bfd *output_bfd,
BFD_ASSERT (rel->r_offset >= 2);
type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
- BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 4 <= input_section->size);
BFD_ASSERT ((val & 0xc0) == 0x80 && (val & 7) != 4);
if (type == 0x8b)
{
@@ -2612,13 +2970,17 @@ elf_i386_relocate_section (bfd *output_bfd,
abort ();
if (h != NULL)
- off = h->got.offset;
+ {
+ off = h->got.offset;
+ offplt = elf_i386_hash_entry (h)->tlsdesc_got;
+ }
else
{
if (local_got_offsets == NULL)
abort ();
off = local_got_offsets[r_symndx];
+ offplt = local_tlsdesc_gotents[r_symndx];
}
if ((off & 1) != 0)
@@ -2628,35 +2990,77 @@ elf_i386_relocate_section (bfd *output_bfd,
Elf_Internal_Rela outrel;
bfd_byte *loc;
int dr_type, indx;
+ asection *sreloc;
if (htab->srelgot == NULL)
abort ();
+ indx = h && h->dynindx != -1 ? h->dynindx : 0;
+
+ if (GOT_TLS_GDESC_P (tls_type))
+ {
+ outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_DESC);
+ BFD_ASSERT (htab->sgotplt_jump_table_size + offplt + 8
+ <= htab->sgotplt->size);
+ outrel.r_offset = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + offplt
+ + htab->sgotplt_jump_table_size);
+ sreloc = htab->srelplt;
+ loc = sreloc->contents;
+ loc += (htab->next_tls_desc_index++
+ * sizeof (Elf32_External_Rel));
+ BFD_ASSERT (loc + sizeof (Elf32_External_Rel)
+ <= sreloc->contents + sreloc->size);
+ bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
+ if (indx == 0)
+ {
+ BFD_ASSERT (! unresolved_reloc);
+ bfd_put_32 (output_bfd,
+ relocation - dtpoff_base (info),
+ htab->sgotplt->contents + offplt
+ + htab->sgotplt_jump_table_size + 4);
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, 0,
+ htab->sgotplt->contents + offplt
+ + htab->sgotplt_jump_table_size + 4);
+ }
+ }
+
+ sreloc = htab->srelgot;
+
outrel.r_offset = (htab->sgot->output_section->vma
+ htab->sgot->output_offset + off);
- indx = h && h->dynindx != -1 ? h->dynindx : 0;
- if (r_type == R_386_TLS_GD)
+ if (GOT_TLS_GD_P (tls_type))
dr_type = R_386_TLS_DTPMOD32;
+ else if (GOT_TLS_GDESC_P (tls_type))
+ goto dr_done;
else if (tls_type == GOT_TLS_IE_POS)
dr_type = R_386_TLS_TPOFF;
else
dr_type = R_386_TLS_TPOFF32;
+
if (dr_type == R_386_TLS_TPOFF && indx == 0)
bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
htab->sgot->contents + off);
else if (dr_type == R_386_TLS_TPOFF32 && indx == 0)
bfd_put_32 (output_bfd, dtpoff_base (info) - relocation,
htab->sgot->contents + off);
- else
+ else if (dr_type != R_386_TLS_DESC)
bfd_put_32 (output_bfd, 0,
htab->sgot->contents + off);
outrel.r_info = ELF32_R_INFO (indx, dr_type);
- loc = htab->srelgot->contents;
- loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rel);
+
+ loc = sreloc->contents;
+ loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rel);
+ BFD_ASSERT (loc + sizeof (Elf32_External_Rel)
+ <= sreloc->contents + sreloc->size);
bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
- if (r_type == R_386_TLS_GD)
+ if (GOT_TLS_GD_P (tls_type))
{
if (indx == 0)
{
@@ -2672,8 +3076,10 @@ elf_i386_relocate_section (bfd *output_bfd,
outrel.r_info = ELF32_R_INFO (indx,
R_386_TLS_DTPOFF32);
outrel.r_offset += 4;
- htab->srelgot->reloc_count++;
+ sreloc->reloc_count++;
loc += sizeof (Elf32_External_Rel);
+ BFD_ASSERT (loc + sizeof (Elf32_External_Rel)
+ <= sreloc->contents + sreloc->size);
bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
}
}
@@ -2684,30 +3090,41 @@ elf_i386_relocate_section (bfd *output_bfd,
htab->sgot->contents + off + 4);
outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_TPOFF);
outrel.r_offset += 4;
- htab->srelgot->reloc_count++;
+ sreloc->reloc_count++;
loc += sizeof (Elf32_External_Rel);
bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
}
+ dr_done:
if (h != NULL)
h->got.offset |= 1;
else
local_got_offsets[r_symndx] |= 1;
}
- if (off >= (bfd_vma) -2)
+ if (off >= (bfd_vma) -2
+ && ! GOT_TLS_GDESC_P (tls_type))
abort ();
- if (r_type == ELF32_R_TYPE (rel->r_info))
+ if (r_type == R_386_TLS_GOTDESC
+ || r_type == R_386_TLS_DESC_CALL)
+ {
+ relocation = htab->sgotplt_jump_table_size + offplt;
+ unresolved_reloc = FALSE;
+ }
+ else if (r_type == ELF32_R_TYPE (rel->r_info))
{
- relocation = htab->sgot->output_offset + off;
+ bfd_vma g_o_t = htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset;
+ relocation = htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off - g_o_t;
if ((r_type == R_386_TLS_IE || r_type == R_386_TLS_GOTIE)
&& tls_type == GOT_TLS_IE_BOTH)
relocation += 4;
if (r_type == R_386_TLS_IE)
- relocation += htab->sgot->output_section->vma;
+ relocation += g_o_t;
unresolved_reloc = FALSE;
}
- else
+ else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GD)
{
unsigned int val, type;
bfd_vma roff;
@@ -2716,7 +3133,7 @@ elf_i386_relocate_section (bfd *output_bfd,
BFD_ASSERT (rel->r_offset >= 2);
type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
BFD_ASSERT (type == 0x8d || type == 0x04);
- BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4)
== 0xe8);
BFD_ASSERT (rel + 1 < relend);
@@ -2740,7 +3157,7 @@ elf_i386_relocate_section (bfd *output_bfd,
/* leal foo(%reg), %eax; call ___tls_get_addr; nop
Change it into:
movl %gs:0, %eax; subl $foo@gottpoff(%reg), %eax. */
- BFD_ASSERT (rel->r_offset + 10 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 10 <= input_section->size);
BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4);
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset + 9)
@@ -2761,12 +3178,104 @@ elf_i386_relocate_section (bfd *output_bfd,
if (tls_type == GOT_TLS_IE_BOTH)
off += 4;
}
- bfd_put_32 (output_bfd, htab->sgot->output_offset + off,
+ bfd_put_32 (output_bfd,
+ htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off
+ - htab->sgotplt->output_section->vma
+ - htab->sgotplt->output_offset,
contents + roff + 8);
/* Skip R_386_PLT32. */
rel++;
continue;
}
+ else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GOTDESC)
+ {
+ /* GDesc -> IE transition.
+ It's originally something like:
+ leal x@tlsdesc(%ebx), %eax
+
+ Change it to:
+ movl x@gotntpoff(%ebx), %eax # before nop; nop
+ or:
+ movl x@gottpoff(%ebx), %eax # before negl %eax
+
+ Registers other than %eax may be set up here. */
+
+ unsigned int val, type;
+ bfd_vma roff;
+
+ /* First, make sure it's a leal adding ebx to a 32-bit
+ offset into any register, although it's probably
+ almost always going to be eax. */
+ roff = rel->r_offset;
+ BFD_ASSERT (roff >= 2);
+ type = bfd_get_8 (input_bfd, contents + roff - 2);
+ BFD_ASSERT (type == 0x8d);
+ val = bfd_get_8 (input_bfd, contents + roff - 1);
+ BFD_ASSERT ((val & 0xc7) == 0x83);
+ BFD_ASSERT (roff + 4 <= input_section->size);
+
+ /* Now modify the instruction as appropriate. */
+ /* To turn a leal into a movl in the form we use it, it
+ suffices to change the first byte from 0x8d to 0x8b.
+ aoliva FIXME: should we decide to keep the leal, all
+ we have to do is remove the statement below, and
+ adjust the relaxation of R_386_TLS_DESC_CALL. */
+ bfd_put_8 (output_bfd, 0x8b, contents + roff - 2);
+
+ if (tls_type == GOT_TLS_IE_BOTH)
+ off += 4;
+
+ bfd_put_32 (output_bfd,
+ htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off
+ - htab->sgotplt->output_section->vma
+ - htab->sgotplt->output_offset,
+ contents + roff);
+ continue;
+ }
+ else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_DESC_CALL)
+ {
+ /* GDesc -> IE transition.
+ It's originally:
+ call *(%eax)
+
+ Change it to:
+ nop; nop
+ or
+ negl %eax
+ depending on how we transformed the TLS_GOTDESC above.
+ */
+
+ unsigned int val, type;
+ bfd_vma roff;
+
+ /* First, make sure it's a call *(%eax). */
+ roff = rel->r_offset;
+ BFD_ASSERT (roff + 2 <= input_section->size);
+ type = bfd_get_8 (input_bfd, contents + roff);
+ BFD_ASSERT (type == 0xff);
+ val = bfd_get_8 (input_bfd, contents + roff + 1);
+ BFD_ASSERT (val == 0x10);
+
+ /* Now modify the instruction as appropriate. */
+ if (tls_type != GOT_TLS_IE_NEG)
+ {
+ /* nop; nop */
+ bfd_put_8 (output_bfd, 0x90, contents + roff);
+ bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
+ }
+ else
+ {
+ /* negl %eax */
+ bfd_put_8 (output_bfd, 0xf7, contents + roff);
+ bfd_put_8 (output_bfd, 0xd8, contents + roff + 1);
+ }
+
+ continue;
+ }
+ else
+ BFD_ASSERT (FALSE);
break;
case R_386_TLS_LDM:
@@ -2784,7 +3293,7 @@ elf_i386_relocate_section (bfd *output_bfd,
== 0x8d);
val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4);
- BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4)
== 0xe8);
BFD_ASSERT (rel + 1 < relend);
@@ -2823,7 +3332,10 @@ elf_i386_relocate_section (bfd *output_bfd,
bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
htab->tls_ldm_got.offset |= 1;
}
- relocation = htab->sgot->output_offset + off;
+ relocation = htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off
+ - htab->sgotplt->output_section->vma
+ - htab->sgotplt->output_offset;
unresolved_reloc = FALSE;
break;
@@ -2883,13 +3395,14 @@ elf_i386_relocate_section (bfd *output_bfd,
not process them. */
if (unresolved_reloc
&& !((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
+ && h->def_dynamic))
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
+ howto->name,
h->root.root.string);
return FALSE;
}
@@ -2918,16 +3431,16 @@ elf_i386_relocate_section (bfd *output_bfd,
if (r == bfd_reloc_overflow)
{
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, name, (int) r);
return FALSE;
}
@@ -2987,6 +3500,42 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd,
+ htab->sgotplt->output_offset
+ got_offset),
htab->splt->contents + h->plt.offset + 2);
+
+ if (htab->is_vxworks)
+ {
+ int s, k, reloc_index;
+
+ /* Create the R_386_32 relocation referencing the GOT
+ for this PLT entry. */
+
+ /* S: Current slot number (zero-based). */
+ s = (h->plt.offset - PLT_ENTRY_SIZE) / PLT_ENTRY_SIZE;
+ /* K: Number of relocations for PLTResolve. */
+ if (info->shared)
+ k = PLTRESOLVE_RELOCS_SHLIB;
+ else
+ k = PLTRESOLVE_RELOCS;
+ /* Skip the PLTresolve relocations, and the relocations for
+ the other PLT slots. */
+ reloc_index = k + s * PLT_NON_JUMP_SLOT_RELOCS;
+ loc = (htab->srelplt2->contents + reloc_index
+ * sizeof (Elf32_External_Rel));
+
+ rel.r_offset = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + h->plt.offset + 2),
+ rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
+
+ /* Create the R_386_32 relocation referencing the beginning of
+ the PLT for this GOT entry. */
+ rel.r_offset = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + got_offset);
+ rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_386_32);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel,
+ loc + sizeof (Elf32_External_Rel));
+ }
}
else
{
@@ -3017,7 +3566,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd,
loc = htab->srelplt->contents + plt_index * sizeof (Elf32_External_Rel);
bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value if there were any
@@ -3028,13 +3577,13 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd,
called from a binary, there is no need to slow down
shared libraries because of that. */
sym->st_shndx = SHN_UNDEF;
- if ((h->elf_link_hash_flags & ELF_LINK_POINTER_EQUALITY_NEEDED) == 0)
+ if (!h->pointer_equality_needed)
sym->st_value = 0;
}
}
if (h->got.offset != (bfd_vma) -1
- && elf_i386_hash_entry(h)->tls_type != GOT_TLS_GD
+ && ! GOT_TLS_GD_ANY_P (elf_i386_hash_entry(h)->tls_type)
&& (elf_i386_hash_entry(h)->tls_type & GOT_TLS_IE) == 0)
{
Elf_Internal_Rela rel;
@@ -3074,7 +3623,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd,
bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
}
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ if (h->needs_copy)
{
Elf_Internal_Rela rel;
bfd_byte *loc;
@@ -3096,9 +3645,11 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd,
bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
}
- /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
+ /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.
+ On VxWorks, the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: it
+ is relative to the ".got" section. */
if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ || (!htab->is_vxworks && h == htab->elf.hgot))
sym->st_shndx = SHN_ABS;
return TRUE;
@@ -3145,7 +3696,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
abort ();
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -3159,7 +3710,8 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
continue;
case DT_PLTGOT:
- dyn.d_un.d_ptr = htab->sgot->output_section->vma;
+ s = htab->sgotplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_JMPREL:
@@ -3169,7 +3721,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
case DT_PLTRELSZ:
s = htab->srelplt;
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
case DT_RELSZ:
@@ -3182,7 +3734,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
s = htab->srelplt;
if (s == NULL)
continue;
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
break;
case DT_REL:
@@ -3194,7 +3746,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
continue;
if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
continue;
- dyn.d_un.d_ptr += s->_raw_size;
+ dyn.d_un.d_ptr += s->size;
break;
}
@@ -3202,15 +3754,23 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
}
/* Fill in the first entry in the procedure linkage table. */
- if (htab->splt && htab->splt->_raw_size > 0)
+ if (htab->splt && htab->splt->size > 0)
{
if (info->shared)
- memcpy (htab->splt->contents,
- elf_i386_pic_plt0_entry, PLT_ENTRY_SIZE);
+ {
+ memcpy (htab->splt->contents, elf_i386_pic_plt0_entry,
+ sizeof (elf_i386_pic_plt0_entry));
+ memset (htab->splt->contents + sizeof (elf_i386_pic_plt0_entry),
+ htab->plt0_pad_byte,
+ PLT_ENTRY_SIZE - sizeof (elf_i386_pic_plt0_entry));
+ }
else
{
- memcpy (htab->splt->contents,
- elf_i386_plt0_entry, PLT_ENTRY_SIZE);
+ memcpy (htab->splt->contents, elf_i386_plt0_entry,
+ sizeof(elf_i386_plt0_entry));
+ memset (htab->splt->contents + sizeof (elf_i386_plt0_entry),
+ htab->plt0_pad_byte,
+ PLT_ENTRY_SIZE - sizeof (elf_i386_plt0_entry));
bfd_put_32 (output_bfd,
(htab->sgotplt->output_section->vma
+ htab->sgotplt->output_offset
@@ -3221,19 +3781,69 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
+ htab->sgotplt->output_offset
+ 8),
htab->splt->contents + 8);
+
+ if (htab->is_vxworks)
+ {
+ Elf_Internal_Rela rel;
+
+ /* Generate a relocation for _GLOBAL_OFFSET_TABLE_ + 4.
+ On IA32 we use REL relocations so the addend goes in
+ the PLT directly. */
+ rel.r_offset = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + 2);
+ rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel,
+ htab->srelplt2->contents);
+ /* Generate a relocation for _GLOBAL_OFFSET_TABLE_ + 8. */
+ rel.r_offset = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + 8);
+ rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel,
+ htab->srelplt2->contents +
+ sizeof (Elf32_External_Rel));
+ }
}
/* UnixWare sets the entsize of .plt to 4, although that doesn't
really seem like the right value. */
elf_section_data (htab->splt->output_section)
->this_hdr.sh_entsize = 4;
+
+ /* Correct the .rel.plt.unloaded relocations. */
+ if (htab->is_vxworks && !info->shared)
+ {
+ int num_plts = (htab->splt->size / PLT_ENTRY_SIZE) - 1;
+ unsigned char *p;
+
+ p = htab->srelplt2->contents;
+ if (info->shared)
+ p += PLTRESOLVE_RELOCS_SHLIB * sizeof (Elf32_External_Rel);
+ else
+ p += PLTRESOLVE_RELOCS * sizeof (Elf32_External_Rel);
+
+ for (; num_plts; num_plts--)
+ {
+ Elf_Internal_Rela rel;
+ bfd_elf32_swap_reloc_in (output_bfd, p, &rel);
+ rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel, p);
+ p += sizeof (Elf32_External_Rel);
+
+ bfd_elf32_swap_reloc_in (output_bfd, p, &rel);
+ rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_386_32);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel, p);
+ p += sizeof (Elf32_External_Rel);
+ }
+ }
}
}
if (htab->sgotplt)
{
/* Fill in the first three entries in the global offset table. */
- if (htab->sgotplt->_raw_size > 0)
+ if (htab->sgotplt->size > 0)
{
bfd_put_32 (output_bfd,
(sdyn == NULL ? 0
@@ -3245,9 +3855,24 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize = 4;
}
+
+ if (htab->sgot && htab->sgot->size > 0)
+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4;
+
return TRUE;
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf_i386_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + (i + 1) * PLT_ENTRY_SIZE;
+}
+
+
#define TARGET_LITTLE_SYM bfd_elf32_i386_vec
#define TARGET_LITTLE_NAME "elf32-i386"
#define ELF_ARCH bfd_arch_i386
@@ -3285,6 +3910,8 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
#define elf_backend_reloc_type_class elf_i386_reloc_type_class
#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_plt_sym_val elf_i386_plt_sym_val
#include "elf32-target.h"
@@ -3321,3 +3948,57 @@ elf_i386_post_process_headers (bfd *abfd,
#define elf32_bed elf32_i386_fbsd_bed
#include "elf32-target.h"
+
+/* VxWorks support. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_i386_vxworks_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-i386-vxworks"
+
+
+/* Like elf_i386_link_hash_table_create but with tweaks for VxWorks. */
+
+static struct bfd_link_hash_table *
+elf_i386_vxworks_link_hash_table_create (bfd *abfd)
+{
+ struct bfd_link_hash_table *ret;
+ struct elf_i386_link_hash_table *htab;
+
+ ret = elf_i386_link_hash_table_create (abfd);
+ if (ret)
+ {
+ htab = (struct elf_i386_link_hash_table *) ret;
+ htab->is_vxworks = 1;
+ htab->plt0_pad_byte = 0x90;
+ }
+
+ return ret;
+}
+
+
+#undef elf_backend_post_process_headers
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ elf_i386_vxworks_link_hash_table_create
+#undef elf_backend_add_symbol_hook
+#define elf_backend_add_symbol_hook \
+ elf_vxworks_add_symbol_hook
+#undef elf_backend_link_output_symbol_hook
+#define elf_backend_link_output_symbol_hook \
+ elf_vxworks_link_output_symbol_hook
+#undef elf_backend_emit_relocs
+#define elf_backend_emit_relocs elf_vxworks_emit_relocs
+#undef elf_backend_final_write_processing
+#define elf_backend_final_write_processing \
+ elf_vxworks_final_write_processing
+
+/* On VxWorks, we emit relocations against _PROCEDURE_LINKAGE_TABLE_, so
+ define it. */
+#undef elf_backend_want_plt_sym
+#define elf_backend_want_plt_sym 1
+
+#undef elf32_bed
+#define elf32_bed elf32_i386_vxworks_bed
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-mips.c b/contrib/binutils/bfd/elf32-mips.c
index a0480f097004..6ed4ad35f627 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 Free Software Foundation, Inc.
+ 2003, 2004, 2005 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -23,7 +23,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file handles MIPS ELF targets. SGI Irix 5 uses a slightly
different MIPS ELF from other targets. This matters when linking.
@@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf-bfd.h"
#include "elfxx-mips.h"
#include "elf/mips.h"
+#include "elf-vxworks.h"
/* Get the ECOFF swapping routines. */
#include "coff/sym.h"
@@ -257,9 +258,11 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 16 bit PC relative reference. */
+ /* 16 bit PC relative reference. Note that the ABI document has a typo
+ and claims R_MIPS_PC16 to be not rightshifted, rendering it useless.
+ We do the right thing here. */
HOWTO (R_MIPS_PC16, /* type */
- 0, /* rightshift */
+ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
TRUE, /* pc_relative */
@@ -545,6 +548,160 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
0x00000000, /* src_mask */
0x00000000, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* TLS GD/LD dynamic relocations. */
+ HOWTO (R_MIPS_TLS_DTPMOD32, /* 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_TLS_DTPMOD32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MIPS_TLS_DTPREL32, /* 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_TLS_DTPREL32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64),
+ EMPTY_HOWTO (R_MIPS_TLS_DTPREL64),
+
+ /* TLS general dynamic variable reference. */
+ HOWTO (R_MIPS_TLS_GD, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GD", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic variable reference. */
+ HOWTO (R_MIPS_TLS_LDM, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_LDM", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_GOTTPREL, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GOTTPREL", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS IE dynamic relocations. */
+ HOWTO (R_MIPS_TLS_TPREL32, /* 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_TLS_TPREL32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (R_MIPS_TLS_TPREL64),
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* The reloc used for BFD_RELOC_CTOR when doing a 64 bit link. This
@@ -564,8 +721,9 @@ static reloc_howto_type elf_mips_ctor64_howto =
0xffffffff, /* dst_mask */
FALSE); /* pcrel_offset */
-/* The reloc used for the mips16 jump instruction. */
-static reloc_howto_type elf_mips16_jump_howto =
+static reloc_howto_type elf_mips16_howto_table_rel[] =
+{
+ /* The reloc used for the mips16 jump instruction. */
HOWTO (R_MIPS16_26, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -581,10 +739,9 @@ static reloc_howto_type elf_mips16_jump_howto =
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
0x3ffffff, /* dst_mask */
- FALSE); /* pcrel_offset */
+ FALSE), /* pcrel_offset */
-/* The reloc used for the mips16 gprel instruction. */
-static reloc_howto_type elf_mips16_gprel_howto =
+ /* The reloc used for the mips16 gprel instruction. */
HOWTO (R_MIPS16_GPREL, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -595,42 +752,46 @@ static reloc_howto_type elf_mips16_gprel_howto =
mips16_gprel_reloc, /* special_function */
"R_MIPS16_GPREL", /* name */
TRUE, /* partial_inplace */
- 0x07ff001f, /* src_mask */
- 0x07ff001f, /* dst_mask */
- FALSE); /* pcrel_offset */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A placeholder for MIPS16 reference to global offset table. */
+ EMPTY_HOWTO (R_MIPS16_GOT16),
-/* GNU extensions for embedded-pic. */
-/* High 16 bits of symbol value, pc-relative. */
-static reloc_howto_type elf_mips_gnu_rel_hi16 =
- HOWTO (R_MIPS_GNU_REL_HI16, /* type */
+ /* A placeholder for MIPS16 16 bit call through global offset table. */
+ EMPTY_HOWTO (R_MIPS16_CALL16),
+
+ /* MIPS16 high 16 bits of symbol value. */
+ HOWTO (R_MIPS16_HI16, /* type */
16, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- TRUE, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
_bfd_mips_elf_hi16_reloc, /* special_function */
- "R_MIPS_GNU_REL_HI16", /* name */
+ "R_MIPS16_HI16", /* name */
TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- TRUE); /* pcrel_offset */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
-/* Low 16 bits of symbol value, pc-relative. */
-static reloc_howto_type elf_mips_gnu_rel_lo16 =
- HOWTO (R_MIPS_GNU_REL_LO16, /* type */
+ /* MIPS16 low 16 bits of symbol value. */
+ HOWTO (R_MIPS16_LO16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- TRUE, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
_bfd_mips_elf_lo16_reloc, /* special_function */
- "R_MIPS_GNU_REL_LO16", /* name */
+ "R_MIPS16_LO16", /* name */
TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- TRUE); /* pcrel_offset */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+};
/* 16 bit offset for pc-relative branches. */
static reloc_howto_type elf_mips_gnu_rel16_s2 =
@@ -648,23 +809,10 @@ static reloc_howto_type elf_mips_gnu_rel16_s2 =
0xffff, /* dst_mask */
TRUE); /* pcrel_offset */
-/* 64 bit pc-relative. */
-static reloc_howto_type elf_mips_gnu_pcrel64 =
- HOWTO (R_MIPS_PC64, /* type */
- 0, /* rightshift */
- 4, /* size (0 = byte, 1 = short, 2 = long) */
- 64, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- _bfd_mips_elf_generic_reloc, /* special_function */
- "R_MIPS_PC64", /* name */
- TRUE, /* partial_inplace */
- MINUS_ONE, /* src_mask */
- MINUS_ONE, /* dst_mask */
- TRUE); /* pcrel_offset */
-
-/* 32 bit pc-relative. */
+/* 32 bit pc-relative. This was a GNU extension used by embedded-PIC.
+ It was co-opted by mips-linux for exception-handling data. It is no
+ longer used, but should continue to be supported by the linker for
+ backward compatibility. (GCC stopped using it in May, 2004.) */
static reloc_howto_type elf_mips_gnu_pcrel32 =
HOWTO (R_MIPS_PC32, /* type */
0, /* rightshift */
@@ -816,6 +964,17 @@ _bfd_mips_elf32_gprel16_reloc (bfd *abfd, arelent *reloc_entry,
bfd_reloc_status_type ret;
bfd_vma gp;
+ /* R_MIPS_LITERAL relocations are defined for local symbols only. */
+ if (reloc_entry->howto->type == R_MIPS_LITERAL
+ && output_bfd != NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (symbol->flags & BSF_LOCAL) != 0)
+ {
+ *error_message = (char *)
+ _("literal relocation occurs for an external symbol");
+ return bfd_reloc_outofrange;
+ }
+
if (output_bfd != NULL)
relocatable = TRUE;
else
@@ -846,6 +1005,16 @@ mips_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
bfd_reloc_status_type ret;
bfd_vma gp;
+ /* R_MIPS_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
@@ -879,7 +1048,7 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ 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. */
@@ -982,11 +1151,8 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
{
bfd_boolean relocatable;
bfd_reloc_status_type ret;
+ bfd_byte *location;
bfd_vma gp;
- unsigned short extend = 0;
- unsigned short insn = 0;
- bfd_signed_vma val;
- bfd_vma relocation;
/* If we're relocating, and this is an external symbol, we don't want
to change anything. */
@@ -1011,55 +1177,16 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
if (ret != bfd_reloc_ok)
return ret;
- if (reloc_entry->address > input_section->_cooked_size)
- return bfd_reloc_outofrange;
+ location = (bfd_byte *) data + reloc_entry->address;
+ _bfd_mips16_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
+ location);
+ ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+ input_section, relocatable,
+ data, gp);
+ _bfd_mips16_elf_reloc_shuffle (abfd, reloc_entry->howto->type, !relocatable,
+ location);
- if (bfd_is_com_section (symbol->section))
- relocation = 0;
- else
- relocation = symbol->value;
-
- relocation += symbol->section->output_section->vma;
- relocation += symbol->section->output_offset;
-
- /* Set val to the offset into the section or symbol. */
- val = reloc_entry->addend;
-
- if (reloc_entry->howto->partial_inplace)
- {
- /* Pick up the mips16 extend instruction and the real instruction. */
- extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
- insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
- val += ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
- }
-
- _bfd_mips_elf_sign_extend(val, 16);
-
- /* 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_16 (abfd,
- (extend & 0xf800) | ((val >> 11) & 0x1f) | (val & 0x7e0),
- (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (insn & 0xffe0) | (val & 0x1f),
- (bfd_byte *) data + reloc_entry->address + 2);
- }
- else
- reloc_entry->addend = val;
-
- if (relocatable)
- reloc_entry->address += input_section->output_offset;
- else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
- return bfd_reloc_overflow;
-
- return bfd_reloc_ok;
+ return ret;
}
/* A mapping from BFD reloc types to MIPS ELF reloc types. */
@@ -1082,7 +1209,7 @@ static const struct elf_reloc_map mips_reloc_map[] =
{ BFD_RELOC_GPREL16, R_MIPS_GPREL16 },
{ BFD_RELOC_MIPS_LITERAL, R_MIPS_LITERAL },
{ BFD_RELOC_MIPS_GOT16, R_MIPS_GOT16 },
- { BFD_RELOC_16_PCREL, R_MIPS_PC16 },
+ { BFD_RELOC_16_PCREL_S2, R_MIPS_PC16 },
{ BFD_RELOC_MIPS_CALL16, R_MIPS_CALL16 },
{ BFD_RELOC_GPREL32, R_MIPS_GPREL32 },
{ BFD_RELOC_MIPS_GOT_HI16, R_MIPS_GOT_HI16 },
@@ -1092,7 +1219,28 @@ static const struct elf_reloc_map mips_reloc_map[] =
{ BFD_RELOC_MIPS_SUB, R_MIPS_SUB },
{ BFD_RELOC_MIPS_GOT_PAGE, R_MIPS_GOT_PAGE },
{ BFD_RELOC_MIPS_GOT_OFST, R_MIPS_GOT_OFST },
- { BFD_RELOC_MIPS_GOT_DISP, R_MIPS_GOT_DISP }
+ { BFD_RELOC_MIPS_GOT_DISP, R_MIPS_GOT_DISP },
+ { BFD_RELOC_MIPS_TLS_DTPMOD32, R_MIPS_TLS_DTPMOD32 },
+ { BFD_RELOC_MIPS_TLS_DTPREL32, R_MIPS_TLS_DTPREL32 },
+ { BFD_RELOC_MIPS_TLS_DTPMOD64, R_MIPS_TLS_DTPMOD64 },
+ { BFD_RELOC_MIPS_TLS_DTPREL64, R_MIPS_TLS_DTPREL64 },
+ { BFD_RELOC_MIPS_TLS_GD, R_MIPS_TLS_GD },
+ { BFD_RELOC_MIPS_TLS_LDM, R_MIPS_TLS_LDM },
+ { BFD_RELOC_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_HI16 },
+ { BFD_RELOC_MIPS_TLS_DTPREL_LO16, R_MIPS_TLS_DTPREL_LO16 },
+ { BFD_RELOC_MIPS_TLS_GOTTPREL, R_MIPS_TLS_GOTTPREL },
+ { BFD_RELOC_MIPS_TLS_TPREL32, R_MIPS_TLS_TPREL32 },
+ { BFD_RELOC_MIPS_TLS_TPREL64, R_MIPS_TLS_TPREL64 },
+ { BFD_RELOC_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_HI16 },
+ { BFD_RELOC_MIPS_TLS_TPREL_LO16, R_MIPS_TLS_TPREL_LO16 }
+};
+
+static const struct elf_reloc_map mips16_reloc_map[] =
+{
+ { BFD_RELOC_MIPS16_JMP, R_MIPS16_26 - R_MIPS16_min },
+ { BFD_RELOC_MIPS16_GPREL, R_MIPS16_GPREL - R_MIPS16_min },
+ { BFD_RELOC_MIPS16_HI16_S, R_MIPS16_HI16 - R_MIPS16_min },
+ { BFD_RELOC_MIPS16_LO16, R_MIPS16_LO16 - R_MIPS16_min },
};
/* Given a BFD reloc type, return a howto structure. */
@@ -1102,6 +1250,7 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
{
unsigned int i;
reloc_howto_type *howto_table = elf_mips_howto_table_rel;
+ reloc_howto_type *howto16_table = elf_mips16_howto_table_rel;
for (i = 0; i < sizeof (mips_reloc_map) / sizeof (struct elf_reloc_map);
i++)
@@ -1110,6 +1259,13 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
return &howto_table[(int) mips_reloc_map[i].elf_val];
}
+ for (i = 0; i < sizeof (mips16_reloc_map) / sizeof (struct elf_reloc_map);
+ i++)
+ {
+ if (mips16_reloc_map[i].bfd_val == code)
+ return &howto16_table[(int) mips16_reloc_map[i].elf_val];
+ }
+
switch (code)
{
default:
@@ -1126,22 +1282,10 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
else
return &howto_table[(int) R_MIPS_32];
- case BFD_RELOC_MIPS16_JMP:
- return &elf_mips16_jump_howto;
- case BFD_RELOC_MIPS16_GPREL:
- return &elf_mips16_gprel_howto;
case BFD_RELOC_VTABLE_INHERIT:
return &elf_mips_gnu_vtinherit_howto;
case BFD_RELOC_VTABLE_ENTRY:
return &elf_mips_gnu_vtentry_howto;
- case BFD_RELOC_PCREL_HI16_S:
- return &elf_mips_gnu_rel_hi16;
- case BFD_RELOC_PCREL_LO16:
- return &elf_mips_gnu_rel_lo16;
- case BFD_RELOC_16_PCREL_S2:
- return &elf_mips_gnu_rel16_s2;
- case BFD_RELOC_64_PCREL:
- return &elf_mips_gnu_pcrel64;
case BFD_RELOC_32_PCREL:
return &elf_mips_gnu_pcrel32;
}
@@ -1155,25 +1299,17 @@ mips_elf32_rtype_to_howto (unsigned int r_type,
{
switch (r_type)
{
- case R_MIPS16_26:
- return &elf_mips16_jump_howto;
- case R_MIPS16_GPREL:
- return &elf_mips16_gprel_howto;
case R_MIPS_GNU_VTINHERIT:
return &elf_mips_gnu_vtinherit_howto;
case R_MIPS_GNU_VTENTRY:
return &elf_mips_gnu_vtentry_howto;
- case R_MIPS_GNU_REL_HI16:
- return &elf_mips_gnu_rel_hi16;
- case R_MIPS_GNU_REL_LO16:
- return &elf_mips_gnu_rel_lo16;
case R_MIPS_GNU_REL16_S2:
return &elf_mips_gnu_rel16_s2;
- case R_MIPS_PC64:
- return &elf_mips_gnu_pcrel64;
case R_MIPS_PC32:
return &elf_mips_gnu_pcrel32;
default:
+ if (r_type >= R_MIPS16_min && r_type < R_MIPS16_max)
+ return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min];
BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
return &elf_mips_howto_table_rel[r_type];
}
@@ -1184,10 +1320,12 @@ mips_elf32_rtype_to_howto (unsigned int r_type,
static void
mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
{
+ const struct elf_backend_data *bed;
unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info);
- cache_ptr->howto = mips_elf32_rtype_to_howto (r_type, FALSE);
+ bed = get_elf_backend_data (abfd);
+ cache_ptr->howto = bed->elf_backend_mips_rtype_to_howto (r_type, FALSE);
/* The addend for a GPREL16 or LITERAL relocation comes from the GP
value for the object file. We get the addend now, rather than
@@ -1267,7 +1405,7 @@ static bfd_boolean
elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -1283,14 +1421,14 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 72;
- raw_size = 180;
+ size = 180;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -1335,139 +1473,6 @@ elf32_mips_irix_compat (bfd *abfd)
return ict_none;
}
-/* Given a data section and an in-memory embedded reloc section, store
- relocation information into the embedded reloc section which can be
- used at runtime to relocate the data section. This is called by the
- linker when the --embedded-relocs switch is used. This is called
- after the add_symbols entry point has been called for all the
- objects, and before the final_link entry point is called. */
-
-bfd_boolean
-bfd_mips_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info,
- asection *datasec, asection *relsec,
- char **errmsg)
-{
- Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Sym *isymbuf = NULL;
- Elf_Internal_Rela *internal_relocs = NULL;
- Elf_Internal_Rela *irel, *irelend;
- bfd_byte *p;
-
- BFD_ASSERT (! info->relocatable);
-
- *errmsg = NULL;
-
- if (datasec->reloc_count == 0)
- return TRUE;
-
- /* Read this BFD's symbols if we haven't done so already, or get the cached
- copy if it exists. */
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- if (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 a copy of the native relocations. */
- internal_relocs = _bfd_elf_link_read_relocs (abfd, datasec, NULL, NULL,
- info->keep_memory);
- if (internal_relocs == NULL)
- goto error_return;
-
- relsec->contents = bfd_alloc (abfd, datasec->reloc_count * 12);
- if (relsec->contents == NULL)
- goto error_return;
-
- p = relsec->contents;
-
- irelend = internal_relocs + datasec->reloc_count;
-
- for (irel = internal_relocs; irel < irelend; irel++, p += 12)
- {
- asection *targetsec;
-
- /* We are going to write a four byte longword into the runtime
- reloc section. The longword will be the address in the data
- section which must be relocated. It is followed by the name
- of the target section NUL-padded or truncated to 8
- characters. */
-
- /* We can only relocate absolute longword relocs at run time. */
- if ((ELF32_R_TYPE (irel->r_info) != (int) R_MIPS_32) &&
- (ELF32_R_TYPE (irel->r_info) != (int) R_MIPS_64))
- {
- *errmsg = _("unsupported reloc type");
- bfd_set_error (bfd_error_bad_value);
- goto error_return;
- }
- /* Get the target section referred to by the reloc. */
- if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
- {
- Elf_Internal_Sym *isym;
-
- /* A local symbol. */
- isym = isymbuf + ELF32_R_SYM (irel->r_info);
- targetsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
- }
- else
- {
- unsigned long indx;
- struct elf_link_hash_entry *h;
-
- /* An external symbol. */
- indx = ELF32_R_SYM (irel->r_info);
- h = elf_sym_hashes (abfd)[indx];
- targetsec = NULL;
- /*
- For some reason, in certain programs, the symbol will
- not be in the hash table. It seems to happen when you
- declare a static table of pointers to const external structures.
- In this case, the relocs are relative to data, not
- text, so just treating it like an undefined link
- should be sufficient. */
- BFD_ASSERT(h != NULL);
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- targetsec = h->root.u.def.section;
- }
-
-
- /*
- Set the low bit of the relocation offset if it's a MIPS64 reloc.
- Relocations will always be on (at least) 32-bit boundaries. */
-
- bfd_put_32 (abfd, ((irel->r_offset + datasec->output_offset) +
- ((ELF32_R_TYPE (irel->r_info) == (int) R_MIPS_64) ? 1 : 0)),
- p);
- memset (p + 4, 0, 8);
- if (targetsec != NULL)
- strncpy (p + 4, targetsec->output_section->name, 8);
- }
-
- if (internal_relocs != NULL
- && elf_section_data (datasec)->relocs != internal_relocs)
- free (internal_relocs);
- if (isymbuf != NULL
- && symtab_hdr->contents != (unsigned char *) isymbuf)
- free (isymbuf);
- return TRUE;
-
- error_return:
- if (internal_relocs != NULL
- && elf_section_data (datasec)->relocs != internal_relocs)
- free (internal_relocs);
- if (isymbuf != NULL
- && symtab_hdr->contents != (unsigned char *) isymbuf)
- free (isymbuf);
- return FALSE;
-}
-
/* ECOFF swapping routines. These are used when dealing with the
.mdebug section, which is in the ECOFF debugging format. */
static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
@@ -1571,6 +1576,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#define bfd_elf32_bfd_is_local_label_name \
mips_elf_is_local_label_name
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
+#define bfd_elf32_find_inliner_info _bfd_mips_elf_find_inliner_info
#define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook
#define bfd_elf32_set_section_contents _bfd_mips_elf_set_section_contents
#define bfd_elf32_bfd_get_relocated_section_contents \
@@ -1616,3 +1622,147 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
/* Include the target file again for this target. */
#include "elf32-target.h"
+
+
+/* Specific to VxWorks. */
+static reloc_howto_type mips_vxworks_copy_howto_rela =
+ HOWTO (R_MIPS_COPY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_COPY", /* name */
+ FALSE, /* partial_inplace */
+ 0x0, /* src_mask */
+ 0x0, /* dst_mask */
+ FALSE); /* pcrel_offset */
+
+/* Specific to VxWorks. */
+static reloc_howto_type mips_vxworks_jump_slot_howto_rela =
+ HOWTO (R_MIPS_JUMP_SLOT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_JUMP_SLOT", /* name */
+ FALSE, /* partial_inplace */
+ 0x0, /* src_mask */
+ 0x0, /* dst_mask */
+ FALSE); /* pcrel_offset */
+
+/* Implement elf_backend_bfd_reloc_type_lookup for VxWorks. */
+
+static reloc_howto_type *
+mips_vxworks_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
+{
+ switch (code)
+ {
+ case BFD_RELOC_MIPS_COPY:
+ return &mips_vxworks_copy_howto_rela;
+ case BFD_RELOC_MIPS_JUMP_SLOT:
+ return &mips_vxworks_jump_slot_howto_rela;
+ default:
+ return bfd_elf32_bfd_reloc_type_lookup (abfd, code);
+ }
+}
+
+/* Implement elf_backend_mips_rtype_to_lookup for VxWorks. */
+
+static reloc_howto_type *
+mips_vxworks_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p)
+{
+ switch (r_type)
+ {
+ case R_MIPS_COPY:
+ return &mips_vxworks_copy_howto_rela;
+ case R_MIPS_JUMP_SLOT:
+ return &mips_vxworks_jump_slot_howto_rela;
+ default:
+ return mips_elf32_rtype_to_howto (r_type, rela_p);
+ }
+}
+
+/* Implement elf_backend_final_write_processing for VxWorks. */
+
+static void
+mips_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+{
+ _bfd_mips_elf_final_write_processing (abfd, linker);
+ elf_vxworks_final_write_processing (abfd, linker);
+}
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#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
+#define TARGET_BIG_NAME "elf32-bigmips-vxworks"
+
+#undef elf32_bed
+#define elf32_bed elf32_mips_vxworks_bed
+
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x1000
+
+#undef elf_backend_want_got_plt
+#define elf_backend_want_got_plt 1
+#undef elf_backend_want_plt_sym
+#define elf_backend_want_plt_sym 1
+#undef elf_backend_got_symbol_offset
+#define elf_backend_got_symbol_offset 0
+#undef elf_backend_want_dynbss
+#define elf_backend_want_dynbss 1
+#undef elf_backend_may_use_rel_p
+#define elf_backend_may_use_rel_p 0
+#undef elf_backend_may_use_rela_p
+#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_got_header_size
+#define elf_backend_got_header_size (4 * 3)
+#undef elf_backend_plt_readonly
+#define elf_backend_plt_readonly 1
+
+#undef bfd_elf32_bfd_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_type_lookup \
+ mips_vxworks_bfd_reloc_type_lookup
+#undef elf_backend_mips_rtype_to_howto
+#define elf_backend_mips_rtype_to_howto \
+ mips_vxworks_rtype_to_howto
+#undef elf_backend_adjust_dynamic_symbol
+#define elf_backend_adjust_dynamic_symbol \
+ _bfd_mips_vxworks_adjust_dynamic_symbol
+#undef elf_backend_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_symbol \
+ _bfd_mips_vxworks_finish_dynamic_symbol
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ _bfd_mips_vxworks_link_hash_table_create
+#undef elf_backend_add_symbol_hook
+#define elf_backend_add_symbol_hook \
+ elf_vxworks_add_symbol_hook
+#undef elf_backend_link_output_symbol_hook
+#define elf_backend_link_output_symbol_hook \
+ elf_vxworks_link_output_symbol_hook
+#undef elf_backend_emit_relocs
+#define elf_backend_emit_relocs \
+ elf_vxworks_emit_relocs
+#undef elf_backend_final_write_processing
+#define elf_backend_final_write_processing \
+ mips_vxworks_final_write_processing
+
+#undef elf_backend_additional_program_headers
+#undef elf_backend_modify_segment_map
+#undef elf_backend_symbol_processing
+/* NOTE: elf_backend_rela_normal is not defined for MIPS. */
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-ppc.c b/contrib/binutils/bfd/elf32-ppc.c
index 4eb08ad3e673..53d1046bb8cb 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 Free Software Foundation, Inc.
+ 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* This file is based on a preliminary PowerPC ELF ABI. The
information may not match the final PowerPC ELF ABI. It includes
@@ -32,6 +32,7 @@
#include "elf-bfd.h"
#include "elf/ppc.h"
#include "elf32-ppc.h"
+#include "elf-vxworks.h"
/* RELA relocations are used here. */
@@ -51,296 +52,109 @@ static bfd_reloc_status_type ppc_elf_unhandled_reloc
section. */
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-/* The size in bytes of an entry in the procedure linkage table. */
-#define PLT_ENTRY_SIZE 12
-/* The initial size of the plt reserved for the dynamic linker. */
-#define PLT_INITIAL_ENTRY_SIZE 72
-/* The size of the gap between entries in the PLT. */
-#define PLT_SLOT_SIZE 8
+/* For old-style PLT. */
/* The number of single-slot PLT entries (the rest use two slots). */
#define PLT_NUM_SINGLE_ENTRIES 8192
-/* Some nop instructions. */
-#define NOP 0x60000000
-#define CROR_151515 0x4def7b82
-#define CROR_313131 0x4ffffb82
-
-/* Offset of tp and dtp pointers from start of TLS block. */
-#define TP_OFFSET 0x7000
-#define DTP_OFFSET 0x8000
-
-
-/* Enumeration to specify the special section. */
-enum elf_linker_section_enum
-{
- LINKER_SECTION_SDATA,
- LINKER_SECTION_SDATA2
-};
-
-/* Sections created by the linker. */
-
-typedef struct elf_linker_section
-{
- /* pointer to the section */
- asection *section;
- /* pointer to the relocations needed for this section */
- asection *rel_section;
- /* pointer to the created symbol hash value */
- struct elf_link_hash_entry *sym_hash;
- /* offset of symbol from beginning of section */
- bfd_vma sym_offset;
-} elf_linker_section_t;
-
-/* Linked list of allocated pointer entries. This hangs off of the
- symbol lists, and provides allows us to return different pointers,
- based on different addend's. */
-
-typedef struct elf_linker_section_pointers
-{
- /* next allocated pointer for this symbol */
- struct elf_linker_section_pointers *next;
- /* offset of pointer from beginning of section */
- bfd_vma offset;
- /* addend used */
- bfd_vma addend;
- /* which linker section this is */
- elf_linker_section_t *lsect;
- /* whether address was written yet */
- bfd_boolean written_address_p;
-} elf_linker_section_pointers_t;
-
-struct ppc_elf_obj_tdata
-{
- struct elf_obj_tdata elf;
-
- /* 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;
-};
-
-#define ppc_elf_tdata(bfd) \
- ((struct ppc_elf_obj_tdata *) (bfd)->tdata.any)
-
-#define elf_local_ptr_offsets(bfd) \
- (ppc_elf_tdata (bfd)->linker_section_pointers)
-
-/* Override the generic function because we store some extras. */
-
-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;
-}
-
-/* The PPC linker needs to keep track of the number of relocs that it
- decides to copy as dynamic relocs in check_relocs for each symbol.
- This is so that it can later discard them if they are found to be
- unnecessary. We store the information in a field extending the
- regular ELF linker hash table. */
-
-struct ppc_elf_dyn_relocs
-{
- struct ppc_elf_dyn_relocs *next;
-
- /* The input section of the reloc. */
- asection *sec;
-
- /* Total number of relocs copied for the input section. */
- bfd_size_type count;
-
- /* Number of pc-relative relocs copied for the input section. */
- bfd_size_type pc_count;
-};
-
-/* PPC ELF linker hash entry. */
-
-struct ppc_elf_link_hash_entry
-{
- struct elf_link_hash_entry elf;
-
- /* If this symbol is used in the linker created sections, the processor
- specific backend uses this field to map the field into the offset
- from the beginning of the section. */
- elf_linker_section_pointers_t *linker_section_pointer;
-
- /* Track dynamic relocs copied for this symbol. */
- struct ppc_elf_dyn_relocs *dyn_relocs;
-
- /* Contexts in which symbol is used in the GOT (or TOC).
- TLS_GD .. TLS_TLS bits are or'd into the mask as the
- corresponding relocs are encountered during check_relocs.
- tls_optimize clears TLS_GD .. TLS_TPREL when optimizing to
- indicate the corresponding GOT entry type is not needed. */
-#define TLS_GD 1 /* GD reloc. */
-#define TLS_LD 2 /* LD reloc. */
-#define TLS_TPREL 4 /* TPREL reloc, => IE. */
-#define TLS_DTPREL 8 /* DTPREL reloc, => LD. */
-#define TLS_TLS 16 /* Any TLS reloc. */
-#define TLS_TPRELGD 32 /* TPREL reloc resulting from GD->IE. */
- char tls_mask;
-};
-
-#define ppc_elf_hash_entry(ent) ((struct ppc_elf_link_hash_entry *) (ent))
-
-/* PPC ELF linker hash table. */
-
-struct ppc_elf_link_hash_table
-{
- struct elf_link_hash_table elf;
-
- /* Short-cuts to get to dynamic linker sections. */
- asection *got;
- asection *relgot;
- asection *plt;
- asection *relplt;
- asection *dynbss;
- asection *relbss;
- asection *dynsbss;
- asection *relsbss;
- elf_linker_section_t *sdata;
- elf_linker_section_t *sdata2;
- asection *sbss;
-
- /* Shortcut to .__tls_get_addr. */
- struct elf_link_hash_entry *tls_get_addr;
-
- /* TLS local dynamic got entry handling. */
- union {
- bfd_signed_vma refcount;
- bfd_vma offset;
- } tlsld_got;
-
- /* 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. */
-
-#define ppc_elf_hash_table(p) \
- ((struct ppc_elf_link_hash_table *) (p)->hash)
-
-/* Create an entry in a PPC ELF linker hash table. */
-
-static struct bfd_hash_entry *
-ppc_elf_link_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 ppc_elf_link_hash_entry));
- if (entry == NULL)
- return entry;
- }
-
- /* Call the allocation method of the superclass. */
- entry = _bfd_elf_link_hash_newfunc (entry, table, string);
- if (entry != NULL)
- {
- ppc_elf_hash_entry (entry)->linker_section_pointer = NULL;
- ppc_elf_hash_entry (entry)->dyn_relocs = NULL;
- ppc_elf_hash_entry (entry)->tls_mask = 0;
- }
+/* For new-style .glink and .plt. */
+#define GLINK_PLTRESOLVE 16*4
+#define GLINK_ENTRY_SIZE 4*4
- return entry;
-}
-
-/* Create a PPC ELF linker hash table. */
-
-static struct bfd_link_hash_table *
-ppc_elf_link_hash_table_create (bfd *abfd)
-{
- struct ppc_elf_link_hash_table *ret;
+/* VxWorks uses its own plt layout, filled in by the static linker. */
- ret = bfd_zmalloc (sizeof (struct ppc_elf_link_hash_table));
- if (ret == NULL)
- return NULL;
-
- if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd,
- ppc_elf_link_hash_newfunc))
- {
- free (ret);
- return NULL;
- }
-
- return &ret->elf.root;
-}
-
-/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
- copying dynamic variables from a shared lib into an app's dynbss
- section, and instead use a dynamic relocation to point into the
- shared lib. */
-#define ELIMINATE_COPY_RELOCS 1
-
-/* Copy the extra info we tack onto an elf_link_hash_entry. */
-
-static void
-ppc_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
- struct elf_link_hash_entry *dir,
- struct elf_link_hash_entry *ind)
-{
- struct ppc_elf_link_hash_entry *edir, *eind;
-
- edir = (struct ppc_elf_link_hash_entry *) dir;
- eind = (struct ppc_elf_link_hash_entry *) ind;
-
- if (eind->dyn_relocs != NULL)
- {
- if (edir->dyn_relocs != NULL)
- {
- struct ppc_elf_dyn_relocs **pp;
- struct ppc_elf_dyn_relocs *p;
-
- if (ind->root.type == bfd_link_hash_indirect)
- abort ();
-
- /* Add reloc counts against the weak sym to the strong sym
- list. Merge any entries against the same section. */
- for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
- {
- struct ppc_elf_dyn_relocs *q;
-
- for (q = edir->dyn_relocs; q != NULL; q = q->next)
- if (q->sec == p->sec)
- {
- q->pc_count += p->pc_count;
- q->count += p->count;
- *pp = p->next;
- break;
- }
- if (q == NULL)
- pp = &p->next;
- }
- *pp = edir->dyn_relocs;
- }
+/* The standard VxWorks PLT entry. */
+#define VXWORKS_PLT_ENTRY_SIZE 32
+static const bfd_vma ppc_elf_vxworks_plt_entry
+ [VXWORKS_PLT_ENTRY_SIZE / 4] =
+ {
+ 0x3d800000, /* lis r12,0 */
+ 0x818c0000, /* lwz r12,0(r12) */
+ 0x7d8903a6, /* mtctr r12 */
+ 0x4e800420, /* bctr */
+ 0x39600000, /* li r11,0 */
+ 0x48000000, /* b 14 <.PLT0resolve+0x4> */
+ 0x60000000, /* nop */
+ 0x60000000, /* nop */
+ };
+static const bfd_vma ppc_elf_vxworks_pic_plt_entry
+ [VXWORKS_PLT_ENTRY_SIZE / 4] =
+ {
+ 0x3d9e0000, /* addis r12,r30,0 */
+ 0x818c0000, /* lwz r12,0(r12) */
+ 0x7d8903a6, /* mtctr r12 */
+ 0x4e800420, /* bctr */
+ 0x39600000, /* li r11,0 */
+ 0x48000000, /* b 14 <.PLT0resolve+0x4> 14: R_PPC_REL24 .PLTresolve */
+ 0x60000000, /* nop */
+ 0x60000000, /* nop */
+ };
- edir->dyn_relocs = eind->dyn_relocs;
- eind->dyn_relocs = NULL;
- }
+/* The initial VxWorks PLT entry. */
+#define VXWORKS_PLT_INITIAL_ENTRY_SIZE 32
+static const bfd_vma ppc_elf_vxworks_plt0_entry
+ [VXWORKS_PLT_INITIAL_ENTRY_SIZE / 4] =
+ {
+ 0x3d800000, /* lis r12,0 */
+ 0x398c0000, /* addi r12,r12,0 */
+ 0x800c0008, /* lwz r0,8(r12) */
+ 0x7c0903a6, /* mtctr r0 */
+ 0x818c0004, /* lwz r12,4(r12) */
+ 0x4e800420, /* bctr */
+ 0x60000000, /* nop */
+ 0x60000000, /* nop */
+ };
+static const bfd_vma ppc_elf_vxworks_pic_plt0_entry
+ [VXWORKS_PLT_INITIAL_ENTRY_SIZE / 4] =
+ {
+ 0x819e0008, /* lwz r12,8(r30) */
+ 0x7d8903a6, /* mtctr r12 */
+ 0x819e0004, /* lwz r12,4(r30) */
+ 0x4e800420, /* bctr */
+ 0x60000000, /* nop */
+ 0x60000000, /* nop */
+ 0x60000000, /* nop */
+ 0x60000000, /* nop */
+ };
- edir->tls_mask |= eind->tls_mask;
+/* For executables, we have some additional relocations in
+ .rela.plt.unloaded, for the kernel loader. */
+
+/* The number of non-JMP_SLOT relocations per PLT0 slot. */
+#define VXWORKS_PLT_NON_JMP_SLOT_RELOCS 3
+/* The number of relocations in the PLTResolve slot. */
+#define VXWORKS_PLTRESOLVE_RELOCS 2
+/* The number of relocations in the PLTResolve slot when when creating
+ a shared library. */
+#define VXWORKS_PLTRESOLVE_RELOCS_SHLIB 0
+
+/* Some instructions. */
+#define ADDIS_11_11 0x3d6b0000
+#define ADDIS_11_30 0x3d7e0000
+#define ADDIS_12_12 0x3d8c0000
+#define ADDI_11_11 0x396b0000
+#define ADD_0_11_11 0x7c0b5a14
+#define ADD_11_0_11 0x7d605a14
+#define B 0x48000000
+#define BCL_20_31 0x429f0005
+#define BCTR 0x4e800420
+#define LIS_11 0x3d600000
+#define LIS_12 0x3d800000
+#define LWZU_0_12 0x840c0000
+#define LWZ_0_12 0x800c0000
+#define LWZ_11_11 0x816b0000
+#define LWZ_11_30 0x817e0000
+#define LWZ_12_12 0x818c0000
+#define MFLR_0 0x7c0802a6
+#define MFLR_12 0x7d8802a6
+#define MTCTR_0 0x7c0903a6
+#define MTCTR_11 0x7d6903a6
+#define MTLR_0 0x7c0803a6
+#define NOP 0x60000000
+#define SUB_11_11_12 0x7d6c5850
- if (ELIMINATE_COPY_RELOCS
- && ind->root.type != bfd_link_hash_indirect
- && (dir->elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
- /* If called to transfer flags for a weakdef during processing
- of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
- We clear it ourselves for ELIMINATE_COPY_RELOCS. */
- dir->elf_link_hash_flags |=
- (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_HASH_NEEDS_PLT));
- else
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
-}
+/* Offset of tp and dtp pointers from start of TLS block. */
+#define TP_OFFSET 0x7000
+#define DTP_OFFSET 0x8000
static reloc_howto_type *ppc_elf_howto_table[R_PPC_max];
@@ -1532,34 +1346,66 @@ static reloc_howto_type ppc_elf_howto_raw[] = {
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Phony relocs to handle branch stubs. */
- HOWTO (R_PPC_RELAX32, /* type */
+ /* A 16 bit relative relocation. */
+ HOWTO (R_PPC_REL16, /* type */
0, /* rightshift */
- 0, /* size */
- 0, /* bitsize */
- FALSE, /* pc_relative */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
+ complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_PPC_RELAX32", /* name */
+ "R_PPC_REL16", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
- HOWTO (R_PPC_RELAX32PC, /* type */
+ /* A 16 bit relative relocation without overflow. */
+ HOWTO (R_PPC_REL16_LO, /* type */
0, /* rightshift */
- 0, /* size */
- 0, /* bitsize */
- FALSE, /* pc_relative */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_REL16_LO", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* The high order 16 bits of a relative address. */
+ HOWTO (R_PPC_REL16_HI, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_PPC_RELAX32PC", /* name */
+ "R_PPC_REL16_HI", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* The high order 16 bits of a relative address, plus 1 if the contents of
+ the low 16 bits, treated as a signed number, is negative. */
+ HOWTO (R_PPC_REL16_HA, /* type */
+ 16, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC_REL16_HA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_PPC_GNU_VTINHERIT, /* type */
@@ -1625,381 +1471,7 @@ ppc_elf_howto_init (void)
ppc_elf_howto_table[type] = &ppc_elf_howto_raw[i];
}
}
-
-#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
-
-static const int shared_stub_entry[] =
- {
- 0x7c0802a6, /* mflr 0 */
- 0x429f0005, /* bcl 20, 31, .Lxxx */
- 0x7d6802a6, /* mflr 11 */
- 0x3d6b0000, /* addis 11, 11, (xxx-.Lxxx)@ha */
- 0x396b0018, /* addi 11, 11, (xxx-.Lxxx)@l */
- 0x7c0803a6, /* mtlr 0 */
- 0x7d6903a6, /* mtctr 11 */
- 0x4e800420, /* bctr */
- };
-
-static const int stub_entry[] =
- {
- 0x3d600000, /* lis 11,xxx@ha */
- 0x396b0000, /* addi 11,11,xxx@l */
- 0x7d6903a6, /* mtctr 11 */
- 0x4e800420, /* bctr */
- };
-
-
-static bfd_boolean
-ppc_elf_relax_section (bfd *abfd,
- asection *isec,
- struct bfd_link_info *link_info,
- bfd_boolean *again)
-{
- struct one_fixup
- {
- struct one_fixup *next;
- asection *tsec;
- bfd_vma toff;
- bfd_vma trampoff;
- };
-
- Elf_Internal_Shdr *symtab_hdr;
- bfd_byte *contents = NULL;
- Elf_Internal_Sym *isymbuf = NULL;
- Elf_Internal_Rela *internal_relocs = NULL;
- Elf_Internal_Rela *irel, *irelend;
- struct one_fixup *fixups = NULL;
- bfd_boolean changed;
- struct ppc_elf_link_hash_table *ppc_info;
- bfd_size_type trampoff;
-
- *again = FALSE;
-
- /* Nothing to do if there are no relocations. */
- if ((isec->flags & SEC_RELOC) == 0 || isec->reloc_count == 0)
- return TRUE;
-
- /* If needed, initialize this section's cooked size. */
- if (isec->_cooked_size == 0)
- isec->_cooked_size = isec->_raw_size;
-
- trampoff = (isec->_cooked_size + 3) & (bfd_vma) -4;
- /* Space for a branch around any trampolines. */
- trampoff += 4;
-
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-
- /* Get a copy of the native relocations. */
- internal_relocs = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL,
- link_info->keep_memory);
- if (internal_relocs == NULL)
- goto error_return;
-
- ppc_info = ppc_elf_hash_table (link_info);
- irelend = internal_relocs + isec->reloc_count;
-
- /* Get the section contents. */
- /* Get cached copy if it exists. */
- if (elf_section_data (isec)->this_hdr.contents != NULL)
- contents = elf_section_data (isec)->this_hdr.contents;
- else
- {
- /* Go get them off disk. */
- contents = bfd_malloc (isec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (!bfd_get_section_contents (abfd, isec, contents, 0, isec->_raw_size))
- goto error_return;
- }
-
- for (irel = internal_relocs; irel < irelend; irel++)
- {
- unsigned long r_type = ELF32_R_TYPE (irel->r_info);
- bfd_vma symaddr, reladdr, toff, roff;
- asection *tsec;
- struct one_fixup *f;
- size_t insn_offset = 0;
- bfd_vma max_branch_offset, val;
- bfd_byte *hit_addr;
- unsigned long t0;
-
- switch (r_type)
- {
- case R_PPC_REL24:
- case R_PPC_LOCAL24PC:
- case R_PPC_PLTREL24:
- max_branch_offset = 1 << 25;
- break;
-
- case R_PPC_REL14:
- case R_PPC_REL14_BRTAKEN:
- case R_PPC_REL14_BRNTAKEN:
- max_branch_offset = 1 << 15;
- break;
-
- default:
- continue;
- }
-
- /* 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;
-
- /* Read this BFD's local symbols. */
- if (isymbuf == NULL)
- {
- 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 == 0)
- goto error_return;
- }
- isym = isymbuf + ELF32_R_SYM (irel->r_info);
- if (isym->st_shndx == SHN_UNDEF)
- continue; /* We can't do anything with undefined symbols. */
- else if (isym->st_shndx == SHN_ABS)
- tsec = bfd_abs_section_ptr;
- else if (isym->st_shndx == SHN_COMMON)
- tsec = bfd_com_section_ptr;
- else
- tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
-
- toff = isym->st_value;
- }
- else
- {
- /* Global symbol handling. */
- unsigned long indx;
- struct elf_link_hash_entry *h;
-
- indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
- h = elf_sym_hashes (abfd)[indx];
-
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- if (r_type == R_PPC_PLTREL24
- && ppc_info->plt != NULL
- && h->plt.offset != (bfd_vma) -1)
- {
- tsec = ppc_info->plt;
- toff = h->plt.offset;
- }
- else if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- tsec = h->root.u.def.section;
- toff = h->root.u.def.value;
- }
- else
- continue;
- }
-
- /* If the branch and target are in the same section, you have
- no hope of adding stubs. We'll error out later should the
- branch overflow. */
- if (tsec == isec)
- continue;
-
- toff += irel->r_addend;
- if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
- toff = _bfd_merged_section_offset (abfd, &tsec,
- elf_section_data (tsec)->sec_info,
- toff, 0);
-
- symaddr = tsec->output_section->vma + tsec->output_offset + toff;
-
- roff = irel->r_offset;
- reladdr = isec->output_section->vma + isec->output_offset + roff;
-
- /* If the branch is in range, no need to do anything. */
- if (symaddr - reladdr + max_branch_offset < 2 * max_branch_offset)
- continue;
-
- /* Look for an existing fixup to this address. */
- for (f = fixups; f ; f = f->next)
- if (f->tsec == tsec && f->toff == toff)
- break;
-
- if (f == NULL)
- {
- size_t size;
- unsigned long stub_rtype;
-
- val = trampoff - roff;
- if (val >= max_branch_offset)
- /* Oh dear, we can't reach a trampoline. Don't try to add
- one. We'll report an error later. */
- continue;
-
- if (link_info->shared)
- {
- size = 4 * ARRAY_SIZE (shared_stub_entry);
- insn_offset = 12;
- stub_rtype = R_PPC_RELAX32PC;
- }
- else
- {
- size = 4 * ARRAY_SIZE (stub_entry);
- insn_offset = 0;
- stub_rtype = R_PPC_RELAX32;
- }
-
- /* Hijack the old relocation. Since we need two
- relocations for this use a "composite" reloc. */
- irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
- stub_rtype);
- irel->r_offset = trampoff + insn_offset;
-
- /* Record the fixup so we don't do it again this section. */
- f = bfd_malloc (sizeof (*f));
- f->next = fixups;
- f->tsec = tsec;
- f->toff = toff;
- f->trampoff = trampoff;
- fixups = f;
-
- trampoff += size;
- }
- else
- {
- val = f->trampoff - roff;
- if (val >= max_branch_offset)
- continue;
-
- /* Nop out the reloc, since we're finalizing things here. */
- irel->r_info = ELF32_R_INFO (0, R_PPC_NONE);
- }
-
- /* Fix up the existing branch to hit the trampoline. */
- hit_addr = contents + roff;
- switch (r_type)
- {
- case R_PPC_REL24:
- case R_PPC_LOCAL24PC:
- case R_PPC_PLTREL24:
- t0 = bfd_get_32 (abfd, hit_addr);
- t0 &= ~0x3fffffc;
- t0 |= val & 0x3fffffc;
- bfd_put_32 (abfd, t0, hit_addr);
- break;
-
- case R_PPC_REL14:
- case R_PPC_REL14_BRTAKEN:
- case R_PPC_REL14_BRNTAKEN:
- t0 = bfd_get_32 (abfd, hit_addr);
- t0 &= ~0xfffc;
- t0 |= val & 0xfffc;
- bfd_put_32 (abfd, t0, hit_addr);
- break;
- }
- }
-
- /* Write out the trampolines. */
- changed = fixups != NULL;
- if (fixups != NULL)
- {
- const int *stub;
- bfd_byte *dest;
- bfd_vma val;
- int i, size;
-
- do
- {
- struct one_fixup *f = fixups;
- fixups = fixups->next;
- free (f);
- }
- while (fixups);
-
- contents = bfd_realloc (contents, trampoff);
- if (contents == NULL)
- goto error_return;
-
- isec->_cooked_size = (isec->_cooked_size + 3) & (bfd_vma) -4;
- /* Branch around the trampolines. */
- val = trampoff - isec->_cooked_size + 0x48000000;
- dest = contents + isec->_cooked_size;
- isec->_cooked_size = trampoff;
- bfd_put_32 (abfd, val, dest);
- dest += 4;
-
- if (link_info->shared)
- {
- stub = shared_stub_entry;
- size = ARRAY_SIZE (shared_stub_entry);
- }
- else
- {
- stub = stub_entry;
- size = ARRAY_SIZE (stub_entry);
- }
-
- i = 0;
- while (dest < contents + trampoff)
- {
- bfd_put_32 (abfd, stub[i], dest);
- i++;
- if (i == size)
- i = 0;
- dest += 4;
- }
- BFD_ASSERT (i == 0);
- }
-
- 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 (isec)->this_hdr.contents != contents)
- {
- if (!changed && !link_info->keep_memory)
- free (contents);
- else
- {
- /* Cache the section contents for elf_link_input_bfd. */
- elf_section_data (isec)->this_hdr.contents = contents;
- }
- }
-
- if (elf_section_data (isec)->relocs != internal_relocs)
- {
- if (!changed)
- free (internal_relocs);
- else
- elf_section_data (isec)->relocs = internal_relocs;
- }
- *again = changed;
- return TRUE;
-
- error_return:
- if (isymbuf != NULL && (unsigned char *) isymbuf != symtab_hdr->contents)
- free (isymbuf);
- if (contents != NULL
- && elf_section_data (isec)->this_hdr.contents != contents)
- free (contents);
- if (internal_relocs != NULL
- && elf_section_data (isec)->relocs != internal_relocs)
- free (internal_relocs);
- return FALSE;
-}
-
static reloc_howto_type *
ppc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
bfd_reloc_code_real_type code)
@@ -2094,6 +1566,10 @@ ppc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
case BFD_RELOC_PPC_EMB_RELST_HA: r = R_PPC_EMB_RELST_HA; break;
case BFD_RELOC_PPC_EMB_BIT_FLD: r = R_PPC_EMB_BIT_FLD; break;
case BFD_RELOC_PPC_EMB_RELSDA: r = R_PPC_EMB_RELSDA; break;
+ case BFD_RELOC_16_PCREL: r = R_PPC_REL16; break;
+ case BFD_RELOC_LO16_PCREL: r = R_PPC_REL16_LO; break;
+ case BFD_RELOC_HI16_PCREL: r = R_PPC_REL16_HI; break;
+ case BFD_RELOC_HI16_S_PCREL: r = R_PPC_REL16_HA; break;
case BFD_RELOC_VTABLE_INHERIT: r = R_PPC_GNU_VTINHERIT; break;
case BFD_RELOC_VTABLE_ENTRY: r = R_PPC_GNU_VTENTRY; break;
}
@@ -2116,7 +1592,7 @@ ppc_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
cache_ptr->howto = ppc_elf_howto_table[ELF32_R_TYPE (dst->r_info)];
}
-/* Handle the R_PPC_ADDR16_HA reloc. */
+/* Handle the R_PPC_ADDR16_HA and R_PPC_REL16_HA relocs. */
static bfd_reloc_status_type
ppc_elf_addr16_ha_reloc (bfd *abfd ATTRIBUTE_UNUSED,
@@ -2135,7 +1611,7 @@ ppc_elf_addr16_ha_reloc (bfd *abfd ATTRIBUTE_UNUSED,
return bfd_reloc_ok;
}
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
if (bfd_is_com_section (symbol->section))
@@ -2146,6 +1622,8 @@ ppc_elf_addr16_ha_reloc (bfd *abfd ATTRIBUTE_UNUSED,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
relocation += reloc_entry->addend;
+ if (reloc_entry->howto->pc_relative)
+ relocation -= reloc_entry->address;
reloc_entry->addend += (relocation & 0x8000) << 1;
@@ -2177,6 +1655,65 @@ ppc_elf_unhandled_reloc (bfd *abfd,
}
return bfd_reloc_dangerous;
}
+
+/* Sections created by the linker. */
+
+typedef struct elf_linker_section
+{
+ /* Pointer to the bfd section. */
+ asection *section;
+ /* Section name. */
+ const char *name;
+ /* Associated bss section name. */
+ const char *bss_name;
+ /* Associated symbol name. */
+ const char *sym_name;
+ /* Associated symbol. */
+ struct elf_link_hash_entry *sym;
+} elf_linker_section_t;
+
+/* Linked list of allocated pointer entries. This hangs off of the
+ symbol lists, and provides allows us to return different pointers,
+ based on different addend's. */
+
+typedef struct elf_linker_section_pointers
+{
+ /* next allocated pointer for this symbol */
+ struct elf_linker_section_pointers *next;
+ /* offset of pointer from beginning of section */
+ bfd_vma offset;
+ /* addend used */
+ bfd_vma addend;
+ /* which linker section this is */
+ elf_linker_section_t *lsect;
+} elf_linker_section_pointers_t;
+
+struct ppc_elf_obj_tdata
+{
+ struct elf_obj_tdata elf;
+
+ /* 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;
+};
+
+#define ppc_elf_tdata(bfd) \
+ ((struct ppc_elf_obj_tdata *) (bfd)->tdata.any)
+
+#define elf_local_ptr_offsets(bfd) \
+ (ppc_elf_tdata (bfd)->linker_section_pointers)
+
+/* Override the generic function because we store some extras. */
+
+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;
+}
/* Fix bad default arch selected for a 32 bit input bfd when the
default is 64 bit. */
@@ -2211,110 +1748,93 @@ ppc_elf_set_private_flags (bfd *abfd, flagword flags)
return TRUE;
}
-/* Merge backend specific data from an object file to the output
- object file when linking. */
+/* Support for core dump NOTE sections. */
static bfd_boolean
-ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
- flagword old_flags;
- flagword new_flags;
- bfd_boolean error;
+ int offset;
+ unsigned int size;
- /* Check if we have the same endianess. */
- if (! _bfd_generic_verify_endian_match (ibfd, obfd))
- return FALSE;
+ switch (note->descsz)
+ {
+ default:
+ return FALSE;
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
+ case 268: /* Linux/PPC. */
+ /* pr_cursig */
+ elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
- new_flags = elf_elfheader (ibfd)->e_flags;
- old_flags = elf_elfheader (obfd)->e_flags;
- if (!elf_flags_init (obfd))
- {
- /* First call, no flags set. */
- elf_flags_init (obfd) = TRUE;
- elf_elfheader (obfd)->e_flags = new_flags;
+ /* pr_pid */
+ elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
+
+ /* pr_reg */
+ offset = 72;
+ size = 192;
+
+ break;
}
- /* Compatible flags are ok. */
- else if (new_flags == old_flags)
- ;
+ /* Make a ".reg/999" section. */
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+ size, note->descpos + offset);
+}
- /* Incompatible flags. */
- else
+static bfd_boolean
+ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+ switch (note->descsz)
{
- /* Warn about -mrelocatable mismatch. Allow -mrelocatable-lib
- to be linked with either. */
- error = FALSE;
- if ((new_flags & EF_PPC_RELOCATABLE) != 0
- && (old_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0)
- {
- error = TRUE;
- (*_bfd_error_handler)
- (_("%s: compiled with -mrelocatable and linked with "
- "modules compiled normally"),
- bfd_archive_filename (ibfd));
- }
- else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
- && (old_flags & EF_PPC_RELOCATABLE) != 0)
- {
- error = TRUE;
- (*_bfd_error_handler)
- (_("%s: compiled normally and linked with "
- "modules compiled with -mrelocatable"),
- bfd_archive_filename (ibfd));
- }
+ default:
+ return FALSE;
- /* The output is -mrelocatable-lib iff both the input files are. */
- if (! (new_flags & EF_PPC_RELOCATABLE_LIB))
- elf_elfheader (obfd)->e_flags &= ~EF_PPC_RELOCATABLE_LIB;
+ case 128: /* Linux/PPC elf_prpsinfo. */
+ elf_tdata (abfd)->core_program
+ = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
+ elf_tdata (abfd)->core_command
+ = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
+ }
- /* The output is -mrelocatable iff it can't be -mrelocatable-lib,
- but each input file is either -mrelocatable or -mrelocatable-lib. */
- if (! (elf_elfheader (obfd)->e_flags & EF_PPC_RELOCATABLE_LIB)
- && (new_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE))
- && (old_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE)))
- elf_elfheader (obfd)->e_flags |= EF_PPC_RELOCATABLE;
+ /* 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. */
- /* Do not warn about eabi vs. V.4 mismatch, just or in the bit if
- any module uses it. */
- elf_elfheader (obfd)->e_flags |= (new_flags & EF_PPC_EMB);
+ {
+ char *command = elf_tdata (abfd)->core_command;
+ int n = strlen (command);
- new_flags &= ~(EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
- old_flags &= ~(EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
+ if (0 < n && command[n - 1] == ' ')
+ command[n - 1] = '\0';
+ }
- /* Warn about any other mismatches. */
- if (new_flags != old_flags)
- {
- error = TRUE;
- (*_bfd_error_handler)
- (_("%s: uses different e_flags (0x%lx) fields "
- "than previous modules (0x%lx)"),
- bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
- }
+ return TRUE;
+}
- if (error)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- }
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
- return TRUE;
+static bfd_vma
+ppc_elf_plt_sym_val (bfd_vma i ATTRIBUTE_UNUSED,
+ const asection *plt ATTRIBUTE_UNUSED,
+ const arelent *rel)
+{
+ return rel->address;
}
-
+
/* Handle a PowerPC specific section when reading an object file. This
- is called when elfcode.h finds a section with an unknown type. */
+ is called when bfd_section_from_shdr finds a section with an unknown
+ type. */
static bfd_boolean
-ppc_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name)
+ppc_elf_section_from_shdr (bfd *abfd,
+ Elf_Internal_Shdr *hdr,
+ const char *name,
+ int shindex)
{
asection *newsect;
flagword flags;
- if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
newsect = hdr->bfd_section;
@@ -2328,7 +1848,7 @@ ppc_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name)
bfd_set_section_flags (abfd, newsect, flags);
return TRUE;
}
-
+
/* Set up any other section flags and such that may be necessary. */
static bfd_boolean
@@ -2336,7 +1856,7 @@ ppc_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
Elf_Internal_Shdr *shdr,
asection *asect)
{
- if ((asect->flags & SEC_EXCLUDE) != 0)
+ if ((asect->flags & (SEC_GROUP | SEC_EXCLUDE)) == SEC_EXCLUDE)
shdr->sh_flags |= SHF_EXCLUDE;
if ((asect->flags & SEC_SORT_ENTRIES) != 0)
@@ -2344,402 +1864,603 @@ ppc_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
return TRUE;
}
-
-/* Find a linker generated pointer with a given addend and type. */
-static elf_linker_section_pointers_t *
-elf_find_pointer_linker_section
- (elf_linker_section_pointers_t *linker_pointers,
- bfd_vma addend,
- elf_linker_section_t *lsect)
+/* If we have .sbss2 or .PPC.EMB.sbss0 output sections, we
+ need to bump up the number of section headers. */
+
+static int
+ppc_elf_additional_program_headers (bfd *abfd)
{
- for ( ; linker_pointers != NULL; linker_pointers = linker_pointers->next)
- if (lsect == linker_pointers->lsect && addend == linker_pointers->addend)
- return linker_pointers;
+ asection *s;
+ int ret = 0;
- return NULL;
+ s = bfd_get_section_by_name (abfd, ".sbss2");
+ if (s != NULL && (s->flags & SEC_ALLOC) != 0)
+ ++ret;
+
+ s = bfd_get_section_by_name (abfd, ".PPC.EMB.sbss0");
+ if (s != NULL && (s->flags & SEC_ALLOC) != 0)
+ ++ret;
+
+ return ret;
}
-
-/* Allocate a pointer to live in a linker created section. */
-static bfd_boolean
-elf_create_pointer_linker_section (bfd *abfd,
- struct bfd_link_info *info,
- elf_linker_section_t *lsect,
- struct elf_link_hash_entry *h,
- const Elf_Internal_Rela *rel)
+/* Add extra PPC sections -- Note, for now, make .sbss2 and
+ .PPC.EMB.sbss0 a normal section, and not a bss section so
+ that the linker doesn't crater when trying to make more than
+ 2 sections. */
+
+static const struct bfd_elf_special_section ppc_elf_special_sections[] =
{
- elf_linker_section_pointers_t **ptr_linker_section_ptr = NULL;
- elf_linker_section_pointers_t *linker_section_ptr;
- unsigned long r_symndx = ELF32_R_SYM (rel->r_info);
- bfd_size_type amt;
+ { ".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 }
+};
- BFD_ASSERT (lsect != NULL);
+/* 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 };
- /* Is this a global symbol? */
- if (h != NULL)
+static const struct bfd_elf_special_section *
+ppc_elf_get_sec_type_attr (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
+{
+ const struct bfd_elf_special_section *ssect;
+
+ /* See if this is one of the special sections. */
+ if (sec->name == NULL)
+ return NULL;
+
+ ssect = _bfd_elf_get_special_section (sec->name, ppc_elf_special_sections,
+ sec->use_rela_p);
+ if (ssect != NULL)
{
- struct ppc_elf_link_hash_entry *eh;
+ if (ssect == ppc_elf_special_sections && (sec->flags & SEC_LOAD) != 0)
+ ssect = &ppc_alt_plt;
+ return ssect;
+ }
- /* Has this symbol already been allocated? If so, our work is done. */
- eh = (struct ppc_elf_link_hash_entry *) h;
- if (elf_find_pointer_linker_section (eh->linker_section_pointer,
- rel->r_addend,
- lsect))
- return TRUE;
+ return _bfd_elf_get_sec_type_attr (abfd, sec);
+}
+
+/* Very simple linked list structure for recording apuinfo values. */
+typedef struct apuinfo_list
+{
+ struct apuinfo_list *next;
+ unsigned long value;
+}
+apuinfo_list;
- ptr_linker_section_ptr = &eh->linker_section_pointer;
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
+static apuinfo_list *head;
+
+
+static void
+apuinfo_list_init (void)
+{
+ head = NULL;
+}
- if (lsect->rel_section)
- lsect->rel_section->_raw_size += sizeof (Elf32_External_Rela);
+static void
+apuinfo_list_add (unsigned long value)
+{
+ apuinfo_list *entry = head;
+
+ while (entry != NULL)
+ {
+ if (entry->value == value)
+ return;
+ entry = entry->next;
}
- else
+
+ entry = bfd_malloc (sizeof (* entry));
+ if (entry == NULL)
+ return;
+
+ entry->value = value;
+ entry->next = head;
+ head = entry;
+}
+
+static unsigned
+apuinfo_list_length (void)
+{
+ apuinfo_list *entry;
+ unsigned long count;
+
+ for (entry = head, count = 0;
+ entry;
+ entry = entry->next)
+ ++ count;
+
+ return count;
+}
+
+static inline unsigned long
+apuinfo_list_element (unsigned long number)
+{
+ apuinfo_list * entry;
+
+ for (entry = head;
+ entry && number --;
+ entry = entry->next)
+ ;
+
+ return entry ? entry->value : 0;
+}
+
+static void
+apuinfo_list_finish (void)
+{
+ apuinfo_list *entry;
+
+ for (entry = head; entry;)
{
- /* Allocation of a pointer to a local symbol. */
- elf_linker_section_pointers_t **ptr = elf_local_ptr_offsets (abfd);
+ apuinfo_list *next = entry->next;
+ free (entry);
+ entry = next;
+ }
- /* Allocate a table to hold the local symbols if first time. */
- if (!ptr)
- {
- unsigned int num_symbols = elf_tdata (abfd)->symtab_hdr.sh_info;
+ head = NULL;
+}
- amt = num_symbols;
- amt *= sizeof (elf_linker_section_pointers_t *);
- ptr = bfd_zalloc (abfd, amt);
+#define APUINFO_SECTION_NAME ".PPC.EMB.apuinfo"
+#define APUINFO_LABEL "APUinfo"
- if (!ptr)
- return FALSE;
+/* Scan the input BFDs and create a linked list of
+ the APUinfo values that will need to be emitted. */
- elf_local_ptr_offsets (abfd) = ptr;
+static void
+ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info)
+{
+ bfd *ibfd;
+ asection *asec;
+ char *buffer;
+ unsigned num_input_sections;
+ bfd_size_type output_section_size;
+ unsigned i;
+ unsigned num_entries;
+ unsigned long offset;
+ unsigned long length;
+ const char *error_message = NULL;
+
+ if (link_info == NULL)
+ return;
+
+ /* Scan the input bfds, looking for apuinfo sections. */
+ num_input_sections = 0;
+ output_section_size = 0;
+
+ for (ibfd = link_info->input_bfds; ibfd; ibfd = ibfd->link_next)
+ {
+ asec = bfd_get_section_by_name (ibfd, APUINFO_SECTION_NAME);
+ if (asec)
+ {
+ ++ num_input_sections;
+ output_section_size += asec->size;
}
+ }
- /* Has this symbol already been allocated? If so, our work is done. */
- if (elf_find_pointer_linker_section (ptr[r_symndx],
- rel->r_addend,
- lsect))
- return TRUE;
+ /* We need at least one input sections
+ in order to make merging worthwhile. */
+ if (num_input_sections < 1)
+ return;
- ptr_linker_section_ptr = &ptr[r_symndx];
+ /* Just make sure that the output section exists as well. */
+ asec = bfd_get_section_by_name (abfd, APUINFO_SECTION_NAME);
+ if (asec == NULL)
+ return;
- if (info->shared)
+ /* Allocate a buffer for the contents of the input sections. */
+ buffer = bfd_malloc (output_section_size);
+ if (buffer == NULL)
+ return;
+
+ offset = 0;
+ apuinfo_list_init ();
+
+ /* Read in the input sections contents. */
+ for (ibfd = link_info->input_bfds; ibfd; ibfd = ibfd->link_next)
+ {
+ unsigned long datum;
+ char *ptr;
+
+ asec = bfd_get_section_by_name (ibfd, APUINFO_SECTION_NAME);
+ if (asec == NULL)
+ continue;
+
+ length = asec->size;
+ if (length < 24)
{
- /* If we are generating a shared object, we need to
- output a R_<xxx>_RELATIVE reloc so that the
- dynamic linker can adjust this GOT entry. */
- BFD_ASSERT (lsect->rel_section != NULL);
- lsect->rel_section->_raw_size += sizeof (Elf32_External_Rela);
+ error_message = _("corrupt or empty %s section in %B");
+ goto fail;
}
+
+ if (bfd_seek (ibfd, asec->filepos, SEEK_SET) != 0
+ || (bfd_bread (buffer + offset, length, ibfd) != length))
+ {
+ error_message = _("unable to read in %s section from %B");
+ goto fail;
+ }
+
+ /* Process the contents of the section. */
+ ptr = buffer + offset;
+ error_message = _("corrupt %s section in %B");
+
+ /* Verify the contents of the header. Note - we have to
+ extract the values this way in order to allow for a
+ host whose endian-ness is different from the target. */
+ datum = bfd_get_32 (ibfd, ptr);
+ if (datum != sizeof APUINFO_LABEL)
+ goto fail;
+
+ datum = bfd_get_32 (ibfd, ptr + 8);
+ if (datum != 0x2)
+ goto fail;
+
+ if (strcmp (ptr + 12, APUINFO_LABEL) != 0)
+ goto fail;
+
+ /* Get the number of bytes used for apuinfo entries. */
+ datum = bfd_get_32 (ibfd, ptr + 4);
+ if (datum + 20 != length)
+ goto fail;
+
+ /* Make sure that we do not run off the end of the section. */
+ if (offset + length > output_section_size)
+ goto fail;
+
+ /* Scan the apuinfo section, building a list of apuinfo numbers. */
+ for (i = 0; i < datum; i += 4)
+ apuinfo_list_add (bfd_get_32 (ibfd, ptr + 20 + i));
+
+ /* Update the offset. */
+ offset += length;
}
- /* Allocate space for a pointer in the linker section, and allocate
- a new pointer record from internal memory. */
- BFD_ASSERT (ptr_linker_section_ptr != NULL);
- amt = sizeof (elf_linker_section_pointers_t);
- linker_section_ptr = bfd_alloc (abfd, amt);
+ error_message = NULL;
- if (!linker_section_ptr)
- return FALSE;
+ /* Compute the size of the output section. */
+ num_entries = apuinfo_list_length ();
+ output_section_size = 20 + num_entries * 4;
- linker_section_ptr->next = *ptr_linker_section_ptr;
- linker_section_ptr->addend = rel->r_addend;
- linker_section_ptr->lsect = lsect;
- linker_section_ptr->written_address_p = FALSE;
- *ptr_linker_section_ptr = linker_section_ptr;
+ asec = bfd_get_section_by_name (abfd, APUINFO_SECTION_NAME);
- linker_section_ptr->offset = lsect->section->_raw_size;
- lsect->section->_raw_size += 4;
+ if (! bfd_set_section_size (abfd, asec, output_section_size))
+ ibfd = abfd,
+ error_message = _("warning: unable to set size of %s section in %B");
-#ifdef DEBUG
- fprintf (stderr,
- "Create pointer in linker section %s, offset = %ld, section size = %ld\n",
- lsect->name, (long) linker_section_ptr->offset,
- (long) lsect->section->_raw_size);
-#endif
+ fail:
+ free (buffer);
- return TRUE;
+ if (error_message)
+ (*_bfd_error_handler) (error_message, ibfd, APUINFO_SECTION_NAME);
}
-
-#define bfd_put_ptr(BFD, VAL, ADDR) bfd_put_32 (BFD, VAL, ADDR)
-/* Fill in the address for a pointer generated in a linker section. */
+/* Prevent the output section from accumulating the input sections'
+ contents. We have already stored this in our linked list structure. */
-static bfd_vma
-elf_finish_pointer_linker_section (bfd *output_bfd,
- bfd *input_bfd,
- struct bfd_link_info *info,
- elf_linker_section_t *lsect,
- struct elf_link_hash_entry *h,
- bfd_vma relocation,
- const Elf_Internal_Rela *rel,
- int relative_reloc)
+static bfd_boolean
+ppc_elf_write_section (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *asec,
+ bfd_byte *contents ATTRIBUTE_UNUSED)
{
- elf_linker_section_pointers_t *linker_section_ptr;
+ return (apuinfo_list_length ()
+ && strcmp (asec->name, APUINFO_SECTION_NAME) == 0);
+}
- BFD_ASSERT (lsect != NULL);
+/* Finally we can generate the output section. */
- if (h != NULL)
- {
- /* Handle global symbol. */
- struct ppc_elf_link_hash_entry *eh;
+static void
+ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
+{
+ bfd_byte *buffer;
+ asection *asec;
+ unsigned i;
+ unsigned num_entries;
+ bfd_size_type length;
- eh = (struct ppc_elf_link_hash_entry *) h;
- linker_section_ptr
- = elf_find_pointer_linker_section (eh->linker_section_pointer,
- rel->r_addend,
- lsect);
+ asec = bfd_get_section_by_name (abfd, APUINFO_SECTION_NAME);
+ if (asec == NULL)
+ return;
- BFD_ASSERT (linker_section_ptr != NULL);
+ if (apuinfo_list_length () == 0)
+ return;
- if (! elf_hash_table (info)->dynamic_sections_created
- || (info->shared
- && info->symbolic
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
- {
- /* This is actually a static link, or it is a
- -Bsymbolic link and the symbol is defined
- locally. We must initialize this entry in the
- global section.
-
- When doing a dynamic link, we create a .rela.<xxx>
- relocation entry to initialize the value. This
- is done in the finish_dynamic_symbol routine. */
- if (!linker_section_ptr->written_address_p)
- {
- linker_section_ptr->written_address_p = TRUE;
- bfd_put_ptr (output_bfd,
- relocation + linker_section_ptr->addend,
- (lsect->section->contents
- + linker_section_ptr->offset));
- }
- }
+ length = asec->size;
+ if (length < 20)
+ return;
+
+ buffer = bfd_malloc (length);
+ if (buffer == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("failed to allocate space for new APUinfo section."));
+ return;
}
- else
+
+ /* Create the apuinfo header. */
+ num_entries = apuinfo_list_length ();
+ bfd_put_32 (abfd, sizeof APUINFO_LABEL, buffer);
+ bfd_put_32 (abfd, num_entries * 4, buffer + 4);
+ bfd_put_32 (abfd, 0x2, buffer + 8);
+ strcpy ((char *) buffer + 12, APUINFO_LABEL);
+
+ length = 20;
+ for (i = 0; i < num_entries; i++)
{
- /* Handle local symbol. */
- unsigned long r_symndx = ELF32_R_SYM (rel->r_info);
- BFD_ASSERT (elf_local_ptr_offsets (input_bfd) != NULL);
- BFD_ASSERT (elf_local_ptr_offsets (input_bfd)[r_symndx] != NULL);
- linker_section_ptr = (elf_find_pointer_linker_section
- (elf_local_ptr_offsets (input_bfd)[r_symndx],
- rel->r_addend,
- lsect));
+ bfd_put_32 (abfd, apuinfo_list_element (i), buffer + length);
+ length += 4;
+ }
- BFD_ASSERT (linker_section_ptr != NULL);
+ if (length != asec->size)
+ (*_bfd_error_handler) (_("failed to compute new APUinfo section."));
- /* Write out pointer if it hasn't been rewritten out before. */
- if (!linker_section_ptr->written_address_p)
- {
- linker_section_ptr->written_address_p = TRUE;
- bfd_put_ptr (output_bfd, relocation + linker_section_ptr->addend,
- lsect->section->contents + linker_section_ptr->offset);
+ if (! bfd_set_section_contents (abfd, asec, buffer, (file_ptr) 0, length))
+ (*_bfd_error_handler) (_("failed to install new APUinfo section."));
- if (info->shared)
- {
- /* We need to generate a relative reloc for the dynamic
- linker. */
+ free (buffer);
- asection *srel = lsect->rel_section;
- Elf_Internal_Rela outrel[MAX_INT_RELS_PER_EXT_REL];
- bfd_byte *erel;
- const struct elf_backend_data *bed;
- unsigned int i;
+ apuinfo_list_finish ();
+}
+
+/* The following functions are specific to the ELF linker, while
+ functions above are used generally. They appear in this file more
+ or less in the order in which they are called. eg.
+ ppc_elf_check_relocs is called early in the link process,
+ ppc_elf_finish_dynamic_sections is one of the last functions
+ called. */
- BFD_ASSERT (srel != NULL);
+/* The PPC linker needs to keep track of the number of relocs that it
+ decides to copy as dynamic relocs in check_relocs for each symbol.
+ This is so that it can later discard them if they are found to be
+ unnecessary. We store the information in a field extending the
+ regular ELF linker hash table. */
- bed = get_elf_backend_data (output_bfd);
- for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
- {
- outrel[i].r_offset = (lsect->section->output_section->vma
- + lsect->section->output_offset
- + linker_section_ptr->offset);
- outrel[i].r_info = 0;
- outrel[i].r_addend = 0;
- }
- outrel[0].r_info = ELF32_R_INFO (0, relative_reloc);
- erel = lsect->section->contents;
- erel += (elf_section_data (lsect->section)->rel_count++
- * sizeof (Elf32_External_Rela));
- bfd_elf32_swap_reloca_out (output_bfd, outrel, erel);
- }
- }
- }
+struct ppc_elf_dyn_relocs
+{
+ struct ppc_elf_dyn_relocs *next;
- relocation = (lsect->section->output_offset
- + linker_section_ptr->offset
- - lsect->sym_offset);
+ /* The input section of the reloc. */
+ asection *sec;
-#ifdef DEBUG
- fprintf (stderr,
- "Finish pointer in linker section %s, offset = %ld (0x%lx)\n",
- lsect->name, (long) relocation, (long) relocation);
-#endif
+ /* Total number of relocs copied for the input section. */
+ bfd_size_type count;
- /* Subtract out the addend, because it will get added back in by the normal
- processing. */
- return relocation - linker_section_ptr->addend;
-}
-
-/* Create a special linker section */
-static elf_linker_section_t *
-ppc_elf_create_linker_section (bfd *abfd,
- struct bfd_link_info *info,
- enum elf_linker_section_enum which)
+ /* Number of pc-relative relocs copied for the input section. */
+ bfd_size_type pc_count;
+};
+
+/* Track PLT entries needed for a given symbol. We might need more
+ than one glink entry per symbol. */
+struct plt_entry
{
- elf_linker_section_t *lsect;
- struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
- asection *s;
- bfd_size_type amt;
- flagword flags;
- const char *name;
- const char *rel_name;
- const char *sym_name;
- bfd_vma sym_offset;
+ struct plt_entry *next;
- /* Both of these sections are (technically) created by the user
- putting data in them, so they shouldn't be marked
- SEC_LINKER_CREATED.
+ /* -fPIC uses multiple GOT sections, one per file, called ".got2".
+ This field stores the offset into .got2 used to initialise the
+ GOT pointer reg. It will always be at least 32768 (and for
+ current gcc this is the only offset used). */
+ bfd_vma addend;
- The linker creates them so it has somewhere to attach their
- respective symbols. In fact, if they were empty it would
- be OK to leave the symbol set to 0 (or any random number), because
- the appropriate register should never be used. */
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY;
- sym_offset = 32768;
+ /* The .got2 section. */
+ asection *sec;
- switch (which)
+ /* PLT refcount or offset. */
+ union
{
- default:
- abort ();
- return NULL;
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } plt;
- case LINKER_SECTION_SDATA: /* .sdata/.sbss section */
- name = ".sdata";
- rel_name = ".rela.sdata";
- sym_name = "_SDA_BASE_";
- break;
+ /* .glink stub offset. */
+ bfd_vma glink_offset;
+};
- case LINKER_SECTION_SDATA2: /* .sdata2/.sbss2 section */
- name = ".sdata2";
- rel_name = ".rela.sdata2";
- sym_name = "_SDA2_BASE_";
- flags |= SEC_READONLY;
- break;
- }
+/* Of those relocs that might be copied as dynamic relocs, this macro
+ selects those that must be copied when linking a shared library,
+ even when the symbol is local. */
- /* Record the first bfd that needs the special sections. */
- if (!htab->elf.dynobj)
- htab->elf.dynobj = abfd;
+#define MUST_BE_DYN_RELOC(RTYPE) \
+ ((RTYPE) != R_PPC_REL24 \
+ && (RTYPE) != R_PPC_REL14 \
+ && (RTYPE) != R_PPC_REL14_BRTAKEN \
+ && (RTYPE) != R_PPC_REL14_BRNTAKEN \
+ && (RTYPE) != R_PPC_REL32)
- amt = sizeof (elf_linker_section_t);
- lsect = bfd_zalloc (htab->elf.dynobj, amt);
+/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
+ copying dynamic variables from a shared lib into an app's dynbss
+ section, and instead use a dynamic relocation to point into the
+ shared lib. */
+#define ELIMINATE_COPY_RELOCS 1
- lsect->sym_offset = sym_offset;
+/* PPC ELF linker hash entry. */
- /* See if the sections already exist. */
- s = bfd_get_section_by_name (htab->elf.dynobj, name);
- if (s == NULL || (s->flags & flags) != flags)
- {
- s = bfd_make_section_anyway (htab->elf.dynobj, name);
- if (s == NULL
- || !bfd_set_section_flags (htab->elf.dynobj, s, flags))
- return NULL;
- }
- lsect->section = s;
+struct ppc_elf_link_hash_entry
+{
+ struct elf_link_hash_entry elf;
- if (bfd_get_section_alignment (htab->elf.dynobj, s) < 2
- && !bfd_set_section_alignment (htab->elf.dynobj, s, 2))
- return NULL;
+ /* If this symbol is used in the linker created sections, the processor
+ specific backend uses this field to map the field into the offset
+ from the beginning of the section. */
+ elf_linker_section_pointers_t *linker_section_pointer;
- s->_raw_size = align_power (s->_raw_size, 2);
+ /* Track dynamic relocs copied for this symbol. */
+ struct ppc_elf_dyn_relocs *dyn_relocs;
-#ifdef DEBUG
- fprintf (stderr, "Creating section %s, current size = %ld\n",
- name, (long) s->_raw_size);
-#endif
+ /* Contexts in which symbol is used in the GOT (or TOC).
+ TLS_GD .. TLS_TLS bits are or'd into the mask as the
+ corresponding relocs are encountered during check_relocs.
+ tls_optimize clears TLS_GD .. TLS_TPREL when optimizing to
+ indicate the corresponding GOT entry type is not needed. */
+#define TLS_GD 1 /* GD reloc. */
+#define TLS_LD 2 /* LD reloc. */
+#define TLS_TPREL 4 /* TPREL reloc, => IE. */
+#define TLS_DTPREL 8 /* DTPREL reloc, => LD. */
+#define TLS_TLS 16 /* Any TLS reloc. */
+#define TLS_TPRELGD 32 /* TPREL reloc resulting from GD->IE. */
+ char tls_mask;
- if (sym_name)
- {
- struct elf_link_hash_entry *h;
- struct bfd_link_hash_entry *bh;
+ /* Nonzero if we have seen a small data relocation referring to this
+ symbol. */
+ unsigned char has_sda_refs;
+};
-#ifdef DEBUG
- fprintf (stderr, "Adding %s to section %s\n", sym_name, name);
-#endif
- bh = bfd_link_hash_lookup (info->hash, sym_name,
- FALSE, FALSE, FALSE);
-
- if ((bh == NULL || bh->type == bfd_link_hash_undefined)
- && !(_bfd_generic_link_add_one_symbol
- (info, abfd, sym_name, BSF_GLOBAL, s, sym_offset, NULL,
- FALSE, get_elf_backend_data (abfd)->collect, &bh)))
- return NULL;
- h = (struct elf_link_hash_entry *) bh;
-
- h->type = STT_OBJECT;
- lsect->sym_hash = h;
-
- if (info->shared
- && ! bfd_elf_link_record_dynamic_symbol (info, h))
- return NULL;
+#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
+{
+ struct elf_link_hash_table elf;
+
+ /* Short-cuts to get to dynamic linker sections. */
+ asection *got;
+ asection *relgot;
+ asection *glink;
+ asection *plt;
+ asection *relplt;
+ asection *dynbss;
+ asection *relbss;
+ asection *dynsbss;
+ asection *relsbss;
+ elf_linker_section_t sdata[2];
+ asection *sbss;
+
+ /* Shortcut to .__tls_get_addr. */
+ struct elf_link_hash_entry *tls_get_addr;
+
+ /* TLS local dynamic got entry handling. */
+ union {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } tlsld_got;
+
+ /* Offset of PltResolve function in glink. */
+ bfd_vma glink_pltresolve;
+
+ /* Size of reserved GOT entries. */
+ unsigned int got_header_size;
+ /* Non-zero if allocating the header left a gap. */
+ unsigned int got_gap;
+
+ /* 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;
+
+ /* The size of PLT entries. */
+ int plt_entry_size;
+ /* The distance between adjacent PLT slots. */
+ int plt_slot_size;
+ /* The size of the first PLT entry. */
+ int plt_initial_entry_size;
+};
+
+/* Get the PPC ELF linker hash table from a link_info structure. */
+
+#define ppc_elf_hash_table(p) \
+ ((struct ppc_elf_link_hash_table *) (p)->hash)
+
+/* Create an entry in a PPC ELF linker hash table. */
+
+static struct bfd_hash_entry *
+ppc_elf_link_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 ppc_elf_link_hash_entry));
+ if (entry == NULL)
+ return entry;
}
- if (info->shared)
+ /* Call the allocation method of the superclass. */
+ entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+ if (entry != NULL)
{
- s = bfd_make_section_anyway (htab->elf.dynobj, rel_name);
- lsect->rel_section = s;
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED | SEC_READONLY);
- if (s == NULL
- || ! bfd_set_section_flags (htab->elf.dynobj, s, flags)
- || ! bfd_set_section_alignment (htab->elf.dynobj, s, 2))
- return NULL;
+ ppc_elf_hash_entry (entry)->linker_section_pointer = NULL;
+ ppc_elf_hash_entry (entry)->dyn_relocs = NULL;
+ ppc_elf_hash_entry (entry)->tls_mask = 0;
}
- return lsect;
+ return entry;
}
-
-/* If we have a non-zero sized .sbss2 or .PPC.EMB.sbss0 sections, we
- need to bump up the number of section headers. */
-static int
-ppc_elf_additional_program_headers (bfd *abfd)
+/* Create a PPC ELF linker hash table. */
+
+static struct bfd_link_hash_table *
+ppc_elf_link_hash_table_create (bfd *abfd)
{
- asection *s;
- int ret;
+ struct ppc_elf_link_hash_table *ret;
- ret = 0;
+ ret = bfd_zmalloc (sizeof (struct ppc_elf_link_hash_table));
+ if (ret == NULL)
+ return NULL;
- s = bfd_get_section_by_name (abfd, ".interp");
- if (s != NULL)
- ++ret;
+ if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
+ ppc_elf_link_hash_newfunc,
+ sizeof (struct ppc_elf_link_hash_entry)))
+ {
+ free (ret);
+ return NULL;
+ }
- s = bfd_get_section_by_name (abfd, ".sbss2");
- if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
- ++ret;
+ ret->elf.init_plt_refcount.refcount = 0;
+ ret->elf.init_plt_refcount.glist = NULL;
+ ret->elf.init_plt_offset.offset = 0;
+ ret->elf.init_plt_offset.glist = NULL;
- s = bfd_get_section_by_name (abfd, ".PPC.EMB.sbss0");
- if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->_raw_size > 0)
- ++ret;
+ ret->sdata[0].name = ".sdata";
+ ret->sdata[0].sym_name = "_SDA_BASE_";
+ ret->sdata[0].bss_name = ".sbss";
- return ret;
-}
+ ret->sdata[1].name = ".sdata2";
+ ret->sdata[1].sym_name = "_SDA2_BASE_";
+ ret->sdata[1].bss_name = ".sbss2";
-/* Modify the segment map if needed. */
+ ret->plt_entry_size = 12;
+ ret->plt_slot_size = 8;
+ ret->plt_initial_entry_size = 72;
+
+ ret->is_vxworks = 0;
-static bfd_boolean
-ppc_elf_modify_segment_map (bfd *abfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info ATTRIBUTE_UNUSED)
-{
- return TRUE;
+ return &ret->elf.root;
}
-
-/* The powerpc .got has a blrl instruction in it. Mark it executable. */
+
+/* Create .got and the related sections. */
static bfd_boolean
ppc_elf_create_got (bfd *abfd, struct bfd_link_info *info)
@@ -2756,17 +2477,26 @@ ppc_elf_create_got (bfd *abfd, struct bfd_link_info *info)
if (s == NULL)
abort ();
- flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED);
- if (!bfd_set_section_flags (abfd, s, flags))
- return FALSE;
+ if (htab->is_vxworks)
+ {
+ htab->sgotplt = bfd_get_section_by_name (abfd, ".got.plt");
+ if (!htab->sgotplt)
+ abort ();
+ }
+ else
+ {
+ /* The powerpc .got has a blrl instruction in it. Mark it
+ executable. */
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ if (!bfd_set_section_flags (abfd, s, flags))
+ return FALSE;
+ }
- htab->relgot = bfd_make_section (abfd, ".rela.got");
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED | SEC_READONLY);
+ htab->relgot = bfd_make_section_with_flags (abfd, ".rela.got", flags);
if (!htab->relgot
- || ! bfd_set_section_flags (abfd, htab->relgot,
- (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED
- | SEC_READONLY))
|| ! bfd_set_section_alignment (abfd, htab->relgot, 2))
return FALSE;
@@ -2793,714 +2523,357 @@ ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
if (!_bfd_elf_create_dynamic_sections (abfd, info))
return FALSE;
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED);
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->dynbss = bfd_get_section_by_name (abfd, ".dynbss");
- htab->dynsbss = s = bfd_make_section (abfd, ".dynsbss");
+ s = bfd_make_section_anyway_with_flags (abfd, ".glink", flags | SEC_CODE);
+ htab->glink = s;
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
+ || !bfd_set_section_alignment (abfd, s, 4))
+ return FALSE;
+
+ htab->dynbss = bfd_get_section_by_name (abfd, ".dynbss");
+ s = bfd_make_section_with_flags (abfd, ".dynsbss",
+ SEC_ALLOC | SEC_LINKER_CREATED);
+ htab->dynsbss = s;
+ if (s == NULL)
return FALSE;
if (! info->shared)
{
htab->relbss = bfd_get_section_by_name (abfd, ".rela.bss");
- htab->relsbss = s = bfd_make_section (abfd, ".rela.sbss");
+ s = bfd_make_section_with_flags (abfd, ".rela.sbss", flags);
+ htab->relsbss = s;
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
}
+ if (htab->is_vxworks
+ && !elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2))
+ return FALSE;
+
htab->relplt = bfd_get_section_by_name (abfd, ".rela.plt");
htab->plt = s = bfd_get_section_by_name (abfd, ".plt");
if (s == NULL)
abort ();
- flags = SEC_ALLOC | SEC_CODE | SEC_IN_MEMORY | SEC_LINKER_CREATED;
+ flags = SEC_ALLOC | SEC_CODE | SEC_LINKER_CREATED;
+ if (htab->plt_type == PLT_VXWORKS)
+ /* The VxWorks PLT is a loaded section with contents. */
+ flags |= SEC_HAS_CONTENTS | SEC_LOAD | SEC_READONLY;
return bfd_set_section_flags (abfd, s, flags);
}
-/* 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. */
+/* Copy the extra info we tack onto an elf_link_hash_entry. */
-static bfd_boolean
-ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
- struct elf_link_hash_entry *h)
+static void
+ppc_elf_copy_indirect_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
{
- 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",
- h->root.root.string);
-#endif
+ struct ppc_elf_link_hash_entry *edir, *eind;
- /* Make sure we know what is going on here. */
- htab = ppc_elf_hash_table (info);
- BFD_ASSERT (htab->elf.dynobj != NULL
- && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
- || h->weakdef != NULL
- || ((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)));
+ edir = (struct ppc_elf_link_hash_entry *) dir;
+ eind = (struct ppc_elf_link_hash_entry *) ind;
- /* Deal with function syms. */
- if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ if (eind->dyn_relocs != NULL)
{
- /* Clear procedure linkage table information for any symbol that
- won't need a .plt entry. */
- if (h->plt.refcount <= 0
- || SYMBOL_CALLS_LOCAL (info, h)
- || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
- && h->root.type == bfd_link_hash_undefweak))
+ if (edir->dyn_relocs != NULL)
{
- /* A PLT entry is not required/allowed when:
-
- 1. We are not using ld.so; because then the PLT entry
- can't be set up, so we can't use one. In this case,
- ppc_elf_adjust_dynamic_symbol won't even be called.
+ struct ppc_elf_dyn_relocs **pp;
+ struct ppc_elf_dyn_relocs *p;
- 2. GC has rendered the entry unused.
+ /* Add reloc counts against the indirect sym to the direct sym
+ list. Merge any entries against the same section. */
+ for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
+ {
+ struct ppc_elf_dyn_relocs *q;
- 3. We know for certain that a call to this symbol
- will go to this object, or will remain undefined. */
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ for (q = edir->dyn_relocs; q != NULL; q = q->next)
+ if (q->sec == p->sec)
+ {
+ q->pc_count += p->pc_count;
+ q->count += p->count;
+ *pp = p->next;
+ break;
+ }
+ if (q == NULL)
+ pp = &p->next;
+ }
+ *pp = edir->dyn_relocs;
}
- return TRUE;
- }
- else
- h->plt.offset = (bfd_vma) -1;
- /* If this is a weak symbol, and there is a real definition, the
- processor independent code will have arranged for us to see the
- real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
- {
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
- if (ELIMINATE_COPY_RELOCS)
- h->elf_link_hash_flags
- = ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
- | (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
- return TRUE;
+ edir->dyn_relocs = eind->dyn_relocs;
+ eind->dyn_relocs = NULL;
}
- /* This is a reference to a symbol defined by a dynamic object which
- is not a function. */
+ edir->tls_mask |= eind->tls_mask;
+ edir->has_sda_refs |= eind->has_sda_refs;
+
+ /* If called to transfer flags for a weakdef during processing
+ of elf_adjust_dynamic_symbol, don't copy non_got_ref.
+ We clear it ourselves for ELIMINATE_COPY_RELOCS. */
+ if (!(ELIMINATE_COPY_RELOCS
+ && eind->elf.root.type != bfd_link_hash_indirect
+ && edir->elf.dynamic_adjusted))
+ edir->elf.non_got_ref |= eind->elf.non_got_ref;
+
+ edir->elf.ref_dynamic |= eind->elf.ref_dynamic;
+ edir->elf.ref_regular |= eind->elf.ref_regular;
+ edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
+ edir->elf.needs_plt |= eind->elf.needs_plt;
+
+ /* If we were called to copy over info for a weak sym, that's all. */
+ if (eind->elf.root.type != bfd_link_hash_indirect)
+ return;
- /* If we are creating a shared library, we must presume that the
- only references to the symbol are via the global offset table.
- For such cases we need not do anything here; the relocations will
- be handled correctly by relocate_section. */
- if (info->shared)
- return TRUE;
+ /* Copy over the GOT refcount entries that we may have already seen to
+ the symbol which just became indirect. */
+ edir->elf.got.refcount += eind->elf.got.refcount;
+ eind->elf.got.refcount = 0;
- /* If there are no references to this symbol that do not use the
- GOT, we don't need to generate a copy reloc. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
- return TRUE;
-
- if (ELIMINATE_COPY_RELOCS)
+ /* And plt entries. */
+ if (eind->elf.plt.plist != NULL)
{
- struct ppc_elf_dyn_relocs *p;
- for (p = ppc_elf_hash_entry (h)->dyn_relocs; p != NULL; p = p->next)
+ if (edir->elf.plt.plist != NULL)
{
- s = p->sec->output_section;
- if (s != NULL && (s->flags & SEC_READONLY) != 0)
- break;
- }
-
- /* If we didn't find any dynamic relocs in read-only sections, then
- we'll be keeping the dynamic relocs and avoiding the copy reloc. */
- if (p == NULL)
- {
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
- return TRUE;
- }
- }
-
- /* We must allocate the symbol in our .dynbss section, which will
- become part of the .bss section of the executable. There will be
- an entry for this symbol in the .dynsym section. The dynamic
- object will contain position independent code, so all references
- from the dynamic object to this symbol will go through the global
- offset table. The dynamic linker will use the .dynsym entry to
- determine the address it must put in the global offset table, so
- both the dynamic object and the regular object will refer to the
- same memory location for the variable.
+ struct plt_entry **entp;
+ struct plt_entry *ent;
- Of course, if the symbol is sufficiently small, we must instead
- allocate it in .sbss. FIXME: It would be better to do this if and
- only if there were actually SDAREL relocs for that symbol. */
-
- if (h->size <= elf_gp_size (htab->elf.dynobj))
- s = htab->dynsbss;
- else
- s = htab->dynbss;
- BFD_ASSERT (s != NULL);
+ for (entp = &eind->elf.plt.plist; (ent = *entp) != NULL; )
+ {
+ struct plt_entry *dent;
- /* We must generate a R_PPC_COPY reloc to tell the dynamic linker to
- copy the initial value out of the dynamic object and into the
- runtime process image. We need to remember the offset into the
- .rela.bss section we are going to use. */
- if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
- {
- asection *srel;
+ for (dent = edir->elf.plt.plist; dent != NULL; dent = dent->next)
+ if (dent->sec == ent->sec && dent->addend == ent->addend)
+ {
+ dent->plt.refcount += ent->plt.refcount;
+ *entp = ent->next;
+ break;
+ }
+ if (dent == NULL)
+ entp = &ent->next;
+ }
+ *entp = edir->elf.plt.plist;
+ }
- if (h->size <= elf_gp_size (htab->elf.dynobj))
- srel = htab->relsbss;
- else
- srel = htab->relbss;
- BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf32_External_Rela);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ edir->elf.plt.plist = eind->elf.plt.plist;
+ eind->elf.plt.plist = NULL;
}
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 4)
- power_of_two = 4;
-
- /* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
- if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
+ if (eind->elf.dynindx != -1)
{
- if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two))
- return FALSE;
+ if (edir->elf.dynindx != -1)
+ _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
+ edir->elf.dynstr_index);
+ edir->elf.dynindx = eind->elf.dynindx;
+ edir->elf.dynstr_index = eind->elf.dynstr_index;
+ eind->elf.dynindx = -1;
+ eind->elf.dynstr_index = 0;
}
-
- /* Define the symbol as being at this point in the section. */
- h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
-
- /* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
-
- return TRUE;
}
-
-/* Of those relocs that might be copied as dynamic relocs, this macro
- selects those that must be copied when linking a shared library,
- even when the symbol is local. */
-#define MUST_BE_DYN_RELOC(RTYPE) \
- ((RTYPE) != R_PPC_REL24 \
- && (RTYPE) != R_PPC_REL14 \
- && (RTYPE) != R_PPC_REL14_BRTAKEN \
- && (RTYPE) != R_PPC_REL14_BRNTAKEN \
- && (RTYPE) != R_PPC_REL32)
-
-/* Allocate space in associated reloc sections for dynamic relocs. */
+/* Return 1 if target is one of ours. */
static bfd_boolean
-allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
+is_ppc_elf_target (const struct bfd_target *targ)
{
- struct bfd_link_info *info = inf;
- struct ppc_elf_link_hash_entry *eh;
- struct ppc_elf_link_hash_table *htab;
- struct ppc_elf_dyn_relocs *p;
-
- if (h->root.type == bfd_link_hash_indirect)
- return TRUE;
+ extern const bfd_target bfd_elf32_powerpc_vec;
+ extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
+ extern const bfd_target bfd_elf32_powerpcle_vec;
- 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;
-
- htab = ppc_elf_hash_table (info);
- if (htab->elf.dynamic_sections_created
- && h->plt.refcount > 0)
- {
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- if (info->shared
- || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
- {
- asection *s = htab->plt;
-
- /* If this is the first .plt entry, make room for the special
- first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
-
- /* The PowerPC PLT is actually composed of two parts, the
- first part is 2 words (for a load and a jump), and then
- there is a remaining word available at the end. */
- h->plt.offset = (PLT_INITIAL_ENTRY_SIZE
- + (PLT_SLOT_SIZE
- * ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE)
- / PLT_ENTRY_SIZE)));
-
- /* If this symbol is not defined in a regular file, and we
- are not generating a shared library, then set the symbol
- to this location in the .plt. This is required to make
- function pointers compare as equal between the normal
- executable and the shared library. */
- if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- h->root.u.def.section = s;
- h->root.u.def.value = h->plt.offset;
- }
-
- /* Make room for this entry. After the 8192nd entry, room
- for two entries is allocated. */
- s->_raw_size += PLT_ENTRY_SIZE;
- if ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
- > PLT_NUM_SINGLE_ENTRIES)
- s->_raw_size += PLT_ENTRY_SIZE;
+ return (targ == &bfd_elf32_powerpc_vec
+ || targ == &bfd_elf32_powerpc_vxworks_vec
+ || targ == &bfd_elf32_powerpcle_vec);
+}
- /* We also need to make an entry in the .rela.plt section. */
- htab->relplt->_raw_size += sizeof (Elf32_External_Rela);
- }
- else
- {
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
- }
- else
- {
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
+/* Hook called by the linker routine which adds symbols from an object
+ file. We use it to put .comm items in .sbss, and not .bss. */
- eh = (struct ppc_elf_link_hash_entry *) h;
- if (eh->elf.got.refcount > 0)
+static bfd_boolean
+ppc_elf_add_symbol_hook (bfd *abfd,
+ struct bfd_link_info *info,
+ Elf_Internal_Sym *sym,
+ const char **namep ATTRIBUTE_UNUSED,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp,
+ bfd_vma *valp)
+{
+ if (sym->st_shndx == SHN_COMMON
+ && !info->relocatable
+ && sym->st_size <= elf_gp_size (abfd)
+ && is_ppc_elf_target (info->hash->creator))
{
- /* Make sure this symbol is output as a dynamic symbol. */
- if (eh->elf.dynindx == -1
- && (eh->elf.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (!bfd_elf_link_record_dynamic_symbol (info, &eh->elf))
- return FALSE;
- }
-
- if (eh->tls_mask == (TLS_TLS | TLS_LD)
- && !(eh->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC))
- /* If just an LD reloc, we'll just use htab->tlsld_got.offset. */
- eh->elf.got.offset = (bfd_vma) -1;
- else
- {
- bfd_boolean dyn;
- eh->elf.got.offset = htab->got->_raw_size;
- if ((eh->tls_mask & TLS_TLS) != 0)
- {
- if ((eh->tls_mask & TLS_LD) != 0)
- htab->got->_raw_size += 8;
- if ((eh->tls_mask & TLS_GD) != 0)
- htab->got->_raw_size += 8;
- if ((eh->tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)
- htab->got->_raw_size += 4;
- if ((eh->tls_mask & TLS_DTPREL) != 0)
- htab->got->_raw_size += 4;
- }
- else
- htab->got->_raw_size += 4;
- dyn = htab->elf.dynamic_sections_created;
- if ((info->shared
- || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, &eh->elf))
- && (ELF_ST_VISIBILITY (eh->elf.other) == STV_DEFAULT
- || eh->elf.root.type != bfd_link_hash_undefweak))
- {
- /* All the entries we allocated need relocs. */
- htab->relgot->_raw_size
- += ((htab->got->_raw_size - eh->elf.got.offset) / 4
- * sizeof (Elf32_External_Rela));
- /* Except LD only needs one. */
- if ((eh->tls_mask & TLS_LD) != 0)
- htab->relgot->_raw_size -= sizeof (Elf32_External_Rela);
- }
- }
- }
- else
- eh->elf.got.offset = (bfd_vma) -1;
-
- if (eh->dyn_relocs == NULL)
- return TRUE;
-
- /* In the shared -Bsymbolic case, discard space allocated for
- dynamic pc-relative relocs against symbols which turn out to be
- defined in regular objects. For the normal shared case, discard
- space for relocs that have become local due to symbol visibility
- changes. */
+ /* Common symbols less than or equal to -G nn bytes are automatically
+ put into .sbss. */
+ struct ppc_elf_link_hash_table *htab;
- if (info->shared)
- {
- /* Relocs that use pc_count are those that appear on a call insn,
- or certain REL relocs (see MUST_BE_DYN_RELOC) that can be
- generated via assembly. 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 weird assembly. */
- if (SYMBOL_CALLS_LOCAL (info, h))
+ htab = ppc_elf_hash_table (info);
+ if (htab->sbss == NULL)
{
- struct ppc_elf_dyn_relocs **pp;
+ flagword flags = SEC_IS_COMMON | SEC_LINKER_CREATED;
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
- {
- p->count -= p->pc_count;
- p->pc_count = 0;
- if (p->count == 0)
- *pp = p->next;
- else
- pp = &p->next;
- }
- }
+ if (!htab->elf.dynobj)
+ htab->elf.dynobj = abfd;
- /* Also discard relocs on undefined weak syms with non-default
- visibility. */
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
- && h->root.type == bfd_link_hash_undefweak)
- eh->dyn_relocs = NULL;
-
- /* Make sure undefined weak symbols are output as a dynamic symbol
- in PIEs. */
- if (info->pie
- && eh->dyn_relocs != NULL
- && h->dynindx == -1
- && h->root.type == bfd_link_hash_undefweak
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ htab->sbss = bfd_make_section_anyway_with_flags (htab->elf.dynobj,
+ ".sbss",
+ flags);
+ if (htab->sbss == NULL)
return FALSE;
}
- }
- else if (ELIMINATE_COPY_RELOCS)
- {
- /* For the non-shared case, discard space for relocs against
- symbols which turn out to need copy relocs or are not
- dynamic. */
-
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- /* Make sure this symbol is output as a dynamic symbol.
- Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- /* If that succeeded, we know we'll be keeping all the
- relocs. */
- if (h->dynindx != -1)
- goto keep;
- }
-
- eh->dyn_relocs = NULL;
- keep: ;
- }
-
- /* Finally, allocate space. */
- for (p = eh->dyn_relocs; p != NULL; p = p->next)
- {
- asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ *secp = htab->sbss;
+ *valp = sym->st_size;
}
return TRUE;
}
+
+static bfd_boolean
+create_sdata_sym (struct ppc_elf_link_hash_table *htab,
+ elf_linker_section_t *lsect)
+{
+ lsect->sym = elf_link_hash_lookup (&htab->elf, lsect->sym_name,
+ TRUE, FALSE, TRUE);
+ if (lsect->sym == NULL)
+ return FALSE;
+ if (lsect->sym->root.type == bfd_link_hash_new)
+ lsect->sym->non_elf = 0;
+ lsect->sym->ref_regular = 1;
+ return TRUE;
+}
-/* Find any dynamic relocs that apply to read-only sections. */
+/* Create a special linker section. */
static bfd_boolean
-readonly_dynrelocs (struct elf_link_hash_entry *h, void *info)
+ppc_elf_create_linker_section (bfd *abfd,
+ struct bfd_link_info *info,
+ flagword flags,
+ elf_linker_section_t *lsect)
{
- struct ppc_elf_dyn_relocs *p;
+ struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
+ asection *s;
- if (h->root.type == bfd_link_hash_indirect)
- return TRUE;
+ flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED);
- if (h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ /* Record the first bfd that needs the special sections. */
+ if (!htab->elf.dynobj)
+ htab->elf.dynobj = abfd;
- for (p = ppc_elf_hash_entry (h)->dyn_relocs; p != NULL; p = p->next)
- {
- asection *s = p->sec->output_section;
+ s = bfd_make_section_anyway_with_flags (htab->elf.dynobj,
+ lsect->name,
+ flags);
+ if (s == NULL
+ || !bfd_set_section_alignment (htab->elf.dynobj, s, 2))
+ return FALSE;
+ lsect->section = s;
- if (s != NULL
- && ((s->flags & (SEC_READONLY | SEC_ALLOC))
- == (SEC_READONLY | SEC_ALLOC)))
- {
- ((struct bfd_link_info *) info)->flags |= DF_TEXTREL;
+ return create_sdata_sym (htab, lsect);
+}
- /* Not an error, just cut short the traversal. */
- return FALSE;
- }
- }
- return TRUE;
+/* Find a linker generated pointer with a given addend and type. */
+
+static elf_linker_section_pointers_t *
+elf_find_pointer_linker_section
+ (elf_linker_section_pointers_t *linker_pointers,
+ bfd_vma addend,
+ elf_linker_section_t *lsect)
+{
+ for ( ; linker_pointers != NULL; linker_pointers = linker_pointers->next)
+ if (lsect == linker_pointers->lsect && addend == linker_pointers->addend)
+ return linker_pointers;
+
+ return NULL;
}
-/* Set the sizes of the dynamic sections. */
+/* Allocate a pointer to live in a linker created section. */
static bfd_boolean
-ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info)
+elf_create_pointer_linker_section (bfd *abfd,
+ elf_linker_section_t *lsect,
+ struct elf_link_hash_entry *h,
+ const Elf_Internal_Rela *rel)
{
- struct ppc_elf_link_hash_table *htab;
- asection *s;
- bfd_boolean relocs;
- bfd *ibfd;
-
-#ifdef DEBUG
- fprintf (stderr, "ppc_elf_size_dynamic_sections called\n");
-#endif
+ elf_linker_section_pointers_t **ptr_linker_section_ptr = NULL;
+ elf_linker_section_pointers_t *linker_section_ptr;
+ unsigned long r_symndx = ELF32_R_SYM (rel->r_info);
+ bfd_size_type amt;
- htab = ppc_elf_hash_table (info);
- BFD_ASSERT (htab->elf.dynobj != NULL);
+ BFD_ASSERT (lsect != NULL);
- if (elf_hash_table (info)->dynamic_sections_created)
+ /* Is this a global symbol? */
+ if (h != NULL)
{
- /* Set the contents of the .interp section to the interpreter. */
- if (info->executable)
- {
- s = bfd_get_section_by_name (htab->elf.dynobj, ".interp");
- BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
- s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
- }
- }
+ struct ppc_elf_link_hash_entry *eh;
- if (htab->tlsld_got.refcount > 0)
- {
- htab->tlsld_got.offset = htab->got->_raw_size;
- htab->got->_raw_size += 8;
- if (info->shared)
- htab->relgot->_raw_size += sizeof (Elf32_External_Rela);
+ /* Has this symbol already been allocated? If so, our work is done. */
+ eh = (struct ppc_elf_link_hash_entry *) h;
+ if (elf_find_pointer_linker_section (eh->linker_section_pointer,
+ rel->r_addend,
+ lsect))
+ return TRUE;
+
+ ptr_linker_section_ptr = &eh->linker_section_pointer;
}
else
- htab->tlsld_got.offset = (bfd_vma) -1;
-
- /* Set up .got offsets for local syms, and space for local dynamic
- relocs. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
{
- bfd_signed_vma *local_got;
- bfd_signed_vma *end_local_got;
- char *lgot_masks;
- bfd_size_type locsymcount;
- Elf_Internal_Shdr *symtab_hdr;
- asection *srel;
-
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
- continue;
+ /* Allocation of a pointer to a local symbol. */
+ elf_linker_section_pointers_t **ptr = elf_local_ptr_offsets (abfd);
- for (s = ibfd->sections; s != NULL; s = s->next)
+ /* Allocate a table to hold the local symbols if first time. */
+ if (!ptr)
{
- struct ppc_elf_dyn_relocs *p;
-
- for (p = ((struct ppc_elf_dyn_relocs *)
- elf_section_data (s)->local_dynrel);
- p != NULL;
- p = p->next)
- {
- if (!bfd_is_abs_section (p->sec)
- && bfd_is_abs_section (p->sec->output_section))
- {
- /* Input section has been discarded, either because
- it is a copy of a linkonce section or due to
- linker script /DISCARD/, so we'll be discarding
- the relocs too. */
- }
- else if (p->count != 0)
- {
- elf_section_data (p->sec)->sreloc->_raw_size
- += p->count * sizeof (Elf32_External_Rela);
- if ((p->sec->output_section->flags
- & (SEC_READONLY | SEC_ALLOC))
- == (SEC_READONLY | SEC_ALLOC))
- info->flags |= DF_TEXTREL;
- }
- }
- }
-
- local_got = elf_local_got_refcounts (ibfd);
- if (!local_got)
- continue;
-
- symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
- locsymcount = symtab_hdr->sh_info;
- end_local_got = local_got + locsymcount;
- lgot_masks = (char *) end_local_got;
- s = htab->got;
- srel = htab->relgot;
- for (; local_got < end_local_got; ++local_got, ++lgot_masks)
- if (*local_got > 0)
- {
- if (*lgot_masks == (TLS_TLS | TLS_LD))
- {
- /* If just an LD reloc, we'll just use
- htab->tlsld_got.offset. */
- if (htab->tlsld_got.offset == (bfd_vma) -1)
- {
- htab->tlsld_got.offset = s->_raw_size;
- s->_raw_size += 8;
- if (info->shared)
- srel->_raw_size += sizeof (Elf32_External_Rela);
- }
- *local_got = (bfd_vma) -1;
- }
- else
- {
- *local_got = s->_raw_size;
- if ((*lgot_masks & TLS_TLS) != 0)
- {
- if ((*lgot_masks & TLS_GD) != 0)
- s->_raw_size += 8;
- if ((*lgot_masks & (TLS_TPREL | TLS_TPRELGD)) != 0)
- s->_raw_size += 4;
- if ((*lgot_masks & TLS_DTPREL) != 0)
- s->_raw_size += 4;
- }
- else
- s->_raw_size += 4;
- if (info->shared)
- srel->_raw_size += ((s->_raw_size - *local_got) / 4
- * sizeof (Elf32_External_Rela));
- }
- }
- else
- *local_got = (bfd_vma) -1;
- }
-
- /* Allocate space for global sym dynamic relocs. */
- elf_link_hash_traverse (elf_hash_table (info), allocate_dynrelocs, info);
+ unsigned int num_symbols = elf_tdata (abfd)->symtab_hdr.sh_info;
- /* We've now determined the sizes of the various dynamic sections.
- Allocate memory for them. */
- relocs = FALSE;
- for (s = htab->elf.dynobj->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_LINKER_CREATED) == 0)
- continue;
+ amt = num_symbols;
+ amt *= sizeof (elf_linker_section_pointers_t *);
+ ptr = bfd_zalloc (abfd, amt);
- if (s == htab->plt
- || s == htab->got
- || (htab->sdata != NULL && s == htab->sdata->section)
- || (htab->sdata2 != NULL && s == htab->sdata2->section))
- {
- /* Strip this section if we don't need it; see the
- comment below. */
- }
- else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
- {
- if (s->_raw_size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- }
- else
- {
- /* Remember whether there are any relocation sections. */
- relocs = TRUE;
+ if (!ptr)
+ return FALSE;
- /* We use the reloc_count field as a counter if we need
- to copy relocs into the output file. */
- s->reloc_count = 0;
- }
- }
- else
- {
- /* It's not one of our sections, so don't allocate space. */
- continue;
+ elf_local_ptr_offsets (abfd) = ptr;
}
- if (s->_raw_size == 0)
- {
- _bfd_strip_section_from_output (info, s);
- continue;
- }
+ /* Has this symbol already been allocated? If so, our work is done. */
+ if (elf_find_pointer_linker_section (ptr[r_symndx],
+ rel->r_addend,
+ lsect))
+ return TRUE;
- /* Allocate memory for the section contents. */
- s->contents = bfd_zalloc (htab->elf.dynobj, s->_raw_size);
- if (s->contents == NULL)
- return FALSE;
+ ptr_linker_section_ptr = &ptr[r_symndx];
}
- if (htab->elf.dynamic_sections_created)
- {
- /* Add some entries to the .dynamic section. We fill in the
- values later, in ppc_elf_finish_dynamic_sections, but we
- must add the entries now so that we get the correct size for
- the .dynamic section. The DT_DEBUG entry is filled in by the
- dynamic linker and used by the debugger. */
-#define add_dynamic_entry(TAG, VAL) \
- _bfd_elf_add_dynamic_entry (info, TAG, VAL)
-
- if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
- }
+ /* Allocate space for a pointer in the linker section, and allocate
+ a new pointer record from internal memory. */
+ BFD_ASSERT (ptr_linker_section_ptr != NULL);
+ amt = sizeof (elf_linker_section_pointers_t);
+ linker_section_ptr = bfd_alloc (abfd, amt);
- if (htab->plt != NULL && htab->plt->_raw_size != 0)
- {
- if (!add_dynamic_entry (DT_PLTGOT, 0)
- || !add_dynamic_entry (DT_PLTRELSZ, 0)
- || !add_dynamic_entry (DT_PLTREL, DT_RELA)
- || !add_dynamic_entry (DT_JMPREL, 0))
- return FALSE;
- }
+ if (!linker_section_ptr)
+ return FALSE;
- if (relocs)
- {
- if (!add_dynamic_entry (DT_RELA, 0)
- || !add_dynamic_entry (DT_RELASZ, 0)
- || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
- return FALSE;
- }
+ linker_section_ptr->next = *ptr_linker_section_ptr;
+ linker_section_ptr->addend = rel->r_addend;
+ linker_section_ptr->lsect = lsect;
+ *ptr_linker_section_ptr = linker_section_ptr;
- /* If any dynamic relocs apply to a read-only section, then we
- need a DT_TEXTREL entry. */
- if ((info->flags & DF_TEXTREL) == 0)
- elf_link_hash_traverse (elf_hash_table (info), readonly_dynrelocs,
- info);
+ linker_section_ptr->offset = lsect->section->size;
+ lsect->section->size += 4;
- if ((info->flags & DF_TEXTREL) != 0)
- {
- if (!add_dynamic_entry (DT_TEXTREL, 0))
- return FALSE;
- }
- }
-#undef add_dynamic_entry
+#ifdef DEBUG
+ fprintf (stderr,
+ "Create pointer in linker section %s, offset = %ld, section size = %ld\n",
+ lsect->name, (long) linker_section_ptr->offset,
+ (long) lsect->section->size);
+#endif
return TRUE;
}
-
+
static bfd_boolean
update_local_sym_info (bfd *abfd,
Elf_Internal_Shdr *symtab_hdr,
@@ -3527,12 +2900,52 @@ update_local_sym_info (bfd *abfd,
return TRUE;
}
+static bfd_boolean
+update_plt_info (bfd *abfd, struct elf_link_hash_entry *h,
+ asection *sec, bfd_vma addend)
+{
+ struct plt_entry *ent;
+
+ if (addend < 32768)
+ sec = NULL;
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->sec == sec && ent->addend == addend)
+ break;
+ if (ent == NULL)
+ {
+ bfd_size_type amt = sizeof (*ent);
+ ent = bfd_alloc (abfd, amt);
+ if (ent == NULL)
+ return FALSE;
+ ent->next = h->plt.plist;
+ ent->sec = sec;
+ ent->addend = addend;
+ ent->plt.refcount = 0;
+ h->plt.plist = ent;
+ }
+ ent->plt.refcount += 1;
+ return TRUE;
+}
+
+static struct plt_entry *
+find_plt_ent (struct elf_link_hash_entry *h, asection *sec, bfd_vma addend)
+{
+ struct plt_entry *ent;
+
+ if (addend < 32768)
+ sec = NULL;
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->sec == sec && ent->addend == addend)
+ break;
+ return ent;
+}
+
static void
bad_shared_reloc (bfd *abfd, enum elf_ppc_reloc_type r_type)
{
(*_bfd_error_handler)
- (_("%s: relocation %s cannot be used when making a shared object"),
- bfd_archive_filename (abfd),
+ (_("%B: relocation %s cannot be used when making a shared object"),
+ abfd,
ppc_elf_howto_table[r_type]->name);
bfd_set_error (bfd_error_bad_value);
}
@@ -3552,42 +2965,33 @@ ppc_elf_check_relocs (bfd *abfd,
struct elf_link_hash_entry **sym_hashes;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- asection *sreloc;
+ asection *got2, *sreloc;
if (info->relocatable)
return TRUE;
+ /* Don't do anything special with non-loaded, non-alloced sections.
+ In particular, any relocs in such sections should not affect GOT
+ and PLT reference counting (ie. we don't allow them to create GOT
+ or PLT entries), there's no possibility or desire to optimize TLS
+ relocs, and there's not much point in propagating relocs to shared
+ libs that the dynamic linker won't relocate. */
+ if ((sec->flags & SEC_ALLOC) == 0)
+ return TRUE;
+
#ifdef DEBUG
- fprintf (stderr, "ppc_elf_check_relocs called for section %s in %s\n",
- bfd_get_section_name (abfd, sec),
- bfd_archive_filename (abfd));
+ _bfd_error_handler ("ppc_elf_check_relocs called for section %A in %B",
+ sec, abfd);
#endif
/* Initialize howto table if not already done. */
if (!ppc_elf_howto_table[R_PPC_ADDR32])
ppc_elf_howto_init ();
- /* Create the linker generated sections all the time so that the
- special symbols are created. */
htab = ppc_elf_hash_table (info);
- if (htab->sdata == NULL)
- {
- htab->sdata = ppc_elf_create_linker_section (abfd, info,
- LINKER_SECTION_SDATA);
- if (htab->sdata == NULL)
- return FALSE;
- }
-
- if (htab->sdata2 == NULL)
- {
- htab->sdata2 = ppc_elf_create_linker_section (abfd, info,
- LINKER_SECTION_SDATA2);
- if (htab->sdata2 == NULL)
- return FALSE;
- }
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
+ got2 = bfd_get_section_by_name (abfd, ".got2");
sreloc = NULL;
rel_end = relocs + sec->reloc_count;
@@ -3602,20 +3006,25 @@ ppc_elf_check_relocs (bfd *abfd,
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ {
+ 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 a relocation refers to _GLOBAL_OFFSET_TABLE_, create the .got.
This shows up in particular in an R_PPC_ADDR32 in the eabi
startup code. */
- if (h && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ if (h != NULL
+ && htab->got == NULL
+ && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
{
- if (htab->got == NULL)
- {
- if (htab->elf.dynobj == NULL)
- htab->elf.dynobj = abfd;
- if (!ppc_elf_create_got (htab->elf.dynobj, info))
- return FALSE;
- }
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+ if (!ppc_elf_create_got (htab->elf.dynobj, info))
+ return FALSE;
+ BFD_ASSERT (h == htab->elf.hgot);
}
r_type = ELF32_R_TYPE (rel->r_info);
@@ -3685,9 +3094,18 @@ ppc_elf_check_relocs (bfd *abfd,
bad_shared_reloc (abfd, r_type);
return FALSE;
}
- if (!elf_create_pointer_linker_section (abfd, info,
- htab->sdata, h, rel))
+ if (htab->sdata[0].section == NULL
+ && !ppc_elf_create_linker_section (abfd, info, 0,
+ &htab->sdata[0]))
+ return FALSE;
+ if (!elf_create_pointer_linker_section (abfd, &htab->sdata[0],
+ h, rel))
return FALSE;
+ if (h != NULL)
+ {
+ ppc_elf_hash_entry (h)->has_sda_refs = TRUE;
+ h->non_got_ref = TRUE;
+ }
break;
/* Indirect .sdata2 relocation. */
@@ -3697,15 +3115,72 @@ ppc_elf_check_relocs (bfd *abfd,
bad_shared_reloc (abfd, r_type);
return FALSE;
}
- if (!elf_create_pointer_linker_section (abfd, info,
- htab->sdata2, h, rel))
+ if (htab->sdata[1].section == NULL
+ && !ppc_elf_create_linker_section (abfd, info, SEC_READONLY,
+ &htab->sdata[1]))
+ return FALSE;
+ if (!elf_create_pointer_linker_section (abfd, &htab->sdata[1],
+ h, rel))
return FALSE;
+ if (h != NULL)
+ {
+ ppc_elf_hash_entry (h)->has_sda_refs = TRUE;
+ h->non_got_ref = TRUE;
+ }
break;
case R_PPC_SDAREL16:
+ if (info->shared)
+ {
+ bad_shared_reloc (abfd, r_type);
+ return FALSE;
+ }
+ if (htab->sdata[0].sym == NULL
+ && !create_sdata_sym (htab, &htab->sdata[0]))
+ return FALSE;
+ if (h != NULL)
+ {
+ ppc_elf_hash_entry (h)->has_sda_refs = TRUE;
+ h->non_got_ref = TRUE;
+ }
+ break;
+
case R_PPC_EMB_SDA2REL:
+ if (info->shared)
+ {
+ bad_shared_reloc (abfd, r_type);
+ return FALSE;
+ }
+ if (htab->sdata[1].sym == NULL
+ && !create_sdata_sym (htab, &htab->sdata[1]))
+ return FALSE;
+ if (h != NULL)
+ {
+ ppc_elf_hash_entry (h)->has_sda_refs = TRUE;
+ h->non_got_ref = TRUE;
+ }
+ break;
+
case R_PPC_EMB_SDA21:
case R_PPC_EMB_RELSDA:
+ if (info->shared)
+ {
+ bad_shared_reloc (abfd, r_type);
+ return FALSE;
+ }
+ if (htab->sdata[0].sym == NULL
+ && !create_sdata_sym (htab, &htab->sdata[0]))
+ return FALSE;
+ if (htab->sdata[1].sym == NULL
+ && !create_sdata_sym (htab, &htab->sdata[1]))
+ return FALSE;
+ if (h != NULL)
+ {
+ ppc_elf_hash_entry (h)->has_sda_refs = TRUE;
+ h->non_got_ref = TRUE;
+ }
+ break;
+
case R_PPC_EMB_NADDR32:
case R_PPC_EMB_NADDR16:
case R_PPC_EMB_NADDR16_LO:
@@ -3716,6 +3191,8 @@ ppc_elf_check_relocs (bfd *abfd,
bad_shared_reloc (abfd, r_type);
return FALSE;
}
+ if (h != NULL)
+ h->non_got_ref = TRUE;
break;
case R_PPC_PLT32:
@@ -3737,18 +3214,23 @@ ppc_elf_check_relocs (bfd *abfd,
{
/* It does not make sense to have a procedure linkage
table entry for a local symbol. */
- (*_bfd_error_handler) (_("%s(%s+0x%lx): %s reloc against "
+ (*_bfd_error_handler) (_("%B(%A+0x%lx): %s reloc against "
"local symbol"),
- bfd_archive_filename (abfd),
- sec->name,
+ abfd,
+ sec,
(long) rel->r_offset,
ppc_elf_howto_table[r_type]->name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
+ else
+ {
+ bfd_vma addend = r_type == R_PPC_PLTREL24 ? rel->r_addend : 0;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- h->plt.refcount++;
+ h->needs_plt = 1;
+ if (!update_plt_info (abfd, h, got2, addend))
+ return FALSE;
+ }
break;
/* The following relocations don't need to propagate the
@@ -3765,7 +3247,14 @@ ppc_elf_check_relocs (bfd *abfd,
case R_PPC_TOC16:
break;
- /* This are just markers. */
+ case R_PPC_REL16:
+ case R_PPC_REL16_LO:
+ case R_PPC_REL16_HI:
+ case R_PPC_REL16_HA:
+ htab->can_use_new_plt = 1;
+ break;
+
+ /* These are just markers. */
case R_PPC_TLS:
case R_PPC_EMB_MRKREF:
case R_PPC_NONE:
@@ -3790,6 +3279,8 @@ 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;
break;
/* This relocation describes the C++ object vtable hierarchy.
@@ -3825,17 +3316,42 @@ ppc_elf_check_relocs (bfd *abfd,
info->flags |= DF_STATIC_TLS;
goto dodyn;
- /* When creating a shared object, we must copy these
- relocs into the output file. We create a reloc
- section in dynobj and make room for the reloc. */
+ case R_PPC_REL32:
+ if (h == NULL
+ && got2 != NULL
+ && (sec->flags & SEC_CODE) != 0
+ && (info->shared || info->pie)
+ && htab->plt_type == PLT_UNSET)
+ {
+ /* Old -fPIC gcc code has .long LCTOC1-LCFx just before
+ the start of a function, which assembles to a REL32
+ reference to .got2. If we detect one of these, then
+ force the old PLT layout because the linker cannot
+ reliably deduce the GOT pointer value needed for
+ PLT call stubs. */
+ asection *s;
+
+ s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec,
+ r_symndx);
+ if (s == got2)
+ htab->plt_type = PLT_OLD;
+ }
+ if (h == NULL || h == htab->elf.hgot)
+ break;
+ goto dodyn1;
+
case R_PPC_REL24:
case R_PPC_REL14:
case R_PPC_REL14_BRTAKEN:
case R_PPC_REL14_BRNTAKEN:
- case R_PPC_REL32:
- if (h == NULL
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ if (h == NULL)
break;
+ if (h == htab->elf.hgot)
+ {
+ if (htab->plt_type == PLT_UNSET)
+ htab->plt_type = PLT_OLD;
+ break;
+ }
/* fall through */
case R_PPC_ADDR32:
@@ -3849,14 +3365,16 @@ ppc_elf_check_relocs (bfd *abfd,
case R_PPC_ADDR14_BRNTAKEN:
case R_PPC_UADDR32:
case R_PPC_UADDR16:
+ dodyn1:
if (h != NULL && !info->shared)
{
/* We may need a plt entry if the symbol turns out to be
a function defined in a dynamic object. */
- h->plt.refcount++;
+ if (!update_plt_info (abfd, h, NULL, 0))
+ return FALSE;
/* We may need a copy reloc too. */
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 1;
}
dodyn:
@@ -3886,15 +3404,12 @@ ppc_elf_check_relocs (bfd *abfd,
|| (h != NULL
&& (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
- && (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ || !h->def_regular)))
{
struct ppc_elf_dyn_relocs *p;
struct ppc_elf_dyn_relocs **head;
@@ -3921,19 +3436,20 @@ ppc_elf_check_relocs (bfd *abfd,
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
sreloc = bfd_get_section_by_name (htab->elf.dynobj, name);
if (sreloc == NULL)
{
flagword flags;
- sreloc = bfd_make_section (htab->elf.dynobj, name);
flags = (SEC_HAS_CONTENTS | SEC_READONLY
- | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- if ((sec->flags & SEC_ALLOC) != 0)
- flags |= SEC_ALLOC | SEC_LOAD;
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED
+ | SEC_ALLOC | SEC_LOAD);
+ sreloc = bfd_make_section_with_flags (htab->elf.dynobj,
+ name,
+ flags);
if (sreloc == NULL
- || ! bfd_set_section_flags (htab->elf.dynobj,
- sreloc, flags)
|| ! bfd_set_section_alignment (htab->elf.dynobj,
sreloc, 2))
return FALSE;
@@ -3954,13 +3470,15 @@ ppc_elf_check_relocs (bfd *abfd,
easily. Oh well. */
asection *s;
+ void *vpp;
+
s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
sec, r_symndx);
if (s == NULL)
return FALSE;
- head = ((struct ppc_elf_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ vpp = &elf_section_data (s)->local_dynrel;
+ head = (struct ppc_elf_dyn_relocs **) vpp;
}
p = *head;
@@ -3987,7 +3505,145 @@ ppc_elf_check_relocs (bfd *abfd,
return TRUE;
}
+
+/* Merge backend specific data from an object file to the output
+ object file when linking. */
+static bfd_boolean
+ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+{
+ flagword old_flags;
+ flagword new_flags;
+ bfd_boolean error;
+
+ if (!is_ppc_elf_target (ibfd->xvec)
+ || !is_ppc_elf_target (obfd->xvec))
+ return TRUE;
+
+ /* Check if we have the same endianess. */
+ if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+ return FALSE;
+
+ new_flags = elf_elfheader (ibfd)->e_flags;
+ old_flags = elf_elfheader (obfd)->e_flags;
+ if (!elf_flags_init (obfd))
+ {
+ /* First call, no flags set. */
+ elf_flags_init (obfd) = TRUE;
+ elf_elfheader (obfd)->e_flags = new_flags;
+ }
+
+ /* Compatible flags are ok. */
+ else if (new_flags == old_flags)
+ ;
+
+ /* Incompatible flags. */
+ else
+ {
+ /* Warn about -mrelocatable mismatch. Allow -mrelocatable-lib
+ to be linked with either. */
+ error = FALSE;
+ if ((new_flags & EF_PPC_RELOCATABLE) != 0
+ && (old_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0)
+ {
+ error = TRUE;
+ (*_bfd_error_handler)
+ (_("%B: compiled with -mrelocatable and linked with "
+ "modules compiled normally"), ibfd);
+ }
+ else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
+ && (old_flags & EF_PPC_RELOCATABLE) != 0)
+ {
+ error = TRUE;
+ (*_bfd_error_handler)
+ (_("%B: compiled normally and linked with "
+ "modules compiled with -mrelocatable"), ibfd);
+ }
+
+ /* The output is -mrelocatable-lib iff both the input files are. */
+ if (! (new_flags & EF_PPC_RELOCATABLE_LIB))
+ elf_elfheader (obfd)->e_flags &= ~EF_PPC_RELOCATABLE_LIB;
+
+ /* The output is -mrelocatable iff it can't be -mrelocatable-lib,
+ but each input file is either -mrelocatable or -mrelocatable-lib. */
+ if (! (elf_elfheader (obfd)->e_flags & EF_PPC_RELOCATABLE_LIB)
+ && (new_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE))
+ && (old_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE)))
+ elf_elfheader (obfd)->e_flags |= EF_PPC_RELOCATABLE;
+
+ /* Do not warn about eabi vs. V.4 mismatch, just or in the bit if
+ any module uses it. */
+ elf_elfheader (obfd)->e_flags |= (new_flags & EF_PPC_EMB);
+
+ new_flags &= ~(EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
+ old_flags &= ~(EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
+
+ /* Warn about any other mismatches. */
+ if (new_flags != old_flags)
+ {
+ error = TRUE;
+ (*_bfd_error_handler)
+ (_("%B: uses different e_flags (0x%lx) fields "
+ "than previous modules (0x%lx)"),
+ ibfd, (long) new_flags, (long) old_flags);
+ }
+
+ if (error)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+/* Choose which PLT scheme to use, and set .plt flags appropriately.
+ Returns -1 on error, 0 for old PLT, 1 for new PLT. */
+int
+ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ int force_old_plt,
+ int emit_stub_syms)
+{
+ struct ppc_elf_link_hash_table *htab;
+ flagword flags;
+
+ 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);
+
+ htab->emit_stub_syms = emit_stub_syms;
+
+ BFD_ASSERT (htab->plt_type != PLT_VXWORKS);
+
+ if (htab->plt_type == PLT_NEW)
+ {
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+
+ /* The new PLT is a loaded section. */
+ if (htab->plt != NULL
+ && !bfd_set_section_flags (htab->elf.dynobj, htab->plt, flags))
+ return -1;
+
+ /* The new GOT is not executable. */
+ if (htab->got != NULL
+ && !bfd_set_section_flags (htab->elf.dynobj, htab->got, flags))
+ return -1;
+ }
+ else
+ {
+ /* Stop an unused .glink section from affecting .text alignment. */
+ if (htab->glink != NULL
+ && !bfd_set_section_alignment (htab->elf.dynobj, htab->glink, 0))
+ return -1;
+ }
+ return htab->plt_type == PLT_NEW;
+}
+
/* Return the section that should be marked against GC for a given
relocation. */
@@ -4041,6 +3697,10 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
struct elf_link_hash_entry **sym_hashes;
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
+ asection *got2;
+
+ if ((sec->flags & SEC_ALLOC) == 0)
+ return TRUE;
elf_section_data (sec)->local_dynrel = NULL;
@@ -4048,6 +3708,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
local_got_refcounts = elf_local_got_refcounts (abfd);
+ got2 = bfd_get_section_by_name (abfd, ".got2");
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; rel++)
@@ -4063,6 +3724,9 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
struct ppc_elf_link_hash_entry *eh;
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;
eh = (struct ppc_elf_link_hash_entry *) h;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
@@ -4117,8 +3781,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
case R_PPC_REL14_BRTAKEN:
case R_PPC_REL14_BRNTAKEN:
case R_PPC_REL32:
- if (h == NULL
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ if (h == NULL || h == htab->elf.hgot)
break;
/* Fall thru */
@@ -4133,15 +3796,21 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
case R_PPC_ADDR14_BRNTAKEN:
case R_PPC_UADDR32:
case R_PPC_UADDR16:
+ if (info->shared)
+ break;
+
case R_PPC_PLT32:
case R_PPC_PLTREL24:
+ case R_PPC_PLTREL32:
case R_PPC_PLT16_LO:
case R_PPC_PLT16_HI:
case R_PPC_PLT16_HA:
if (h != NULL)
{
- if (h->plt.refcount > 0)
- h->plt.refcount--;
+ bfd_vma addend = r_type == R_PPC_PLTREL24 ? rel->r_addend : 0;
+ struct plt_entry *ent = find_plt_ent (h, got2, addend);
+ if (ent->plt.refcount > 0)
+ ent->plt.refcount -= 1;
}
break;
@@ -4151,7 +3820,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
}
return TRUE;
}
-
+
/* Set htab->tls_get_addr and call the generic ELF tls_setup function. */
asection *
@@ -4160,9 +3829,16 @@ ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
struct ppc_elf_link_hash_table *htab;
htab = ppc_elf_hash_table (info);
+ if (htab->plt_type == PLT_NEW
+ && htab->plt != NULL
+ && htab->plt->output_section != NULL)
+ {
+ elf_section_type (htab->plt->output_section) = SHT_PROGBITS;
+ elf_section_flags (htab->plt->output_section) = SHF_ALLOC + SHF_WRITE;
+ }
+
htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr",
FALSE, FALSE, TRUE);
-
return _bfd_elf_tls_setup (obfd, info);
}
@@ -4223,7 +3899,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
is_local = FALSE;
if (h == NULL
- || !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC))
+ || !h->def_dynamic)
is_local = TRUE;
r_type = ELF32_R_TYPE (rel->r_info);
@@ -4284,8 +3960,9 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
&& h != NULL
&& h == htab->tls_get_addr)
{
- if (h->plt.refcount > 0)
- h->plt.refcount -= 1;
+ struct plt_entry *ent = find_plt_ent (h, NULL, 0);
+ if (ent != NULL && ent->plt.refcount > 0)
+ ent->plt.refcount -= 1;
}
expecting_tls_get_addr = 0;
continue;
@@ -4359,230 +4036,1439 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
return TRUE;
}
-/* Hook called by the linker routine which adds symbols from an object
- file. We use it to put .comm items in .sbss, and not .bss. */
+/* 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
-ppc_elf_add_symbol_hook (bfd *abfd,
- struct bfd_link_info *info,
- Elf_Internal_Sym *sym,
- const char **namep ATTRIBUTE_UNUSED,
- flagword *flagsp ATTRIBUTE_UNUSED,
- asection **secp,
- bfd_vma *valp)
+ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
{
- if (sym->st_shndx == SHN_COMMON
- && !info->relocatable
- && sym->st_size <= elf_gp_size (abfd)
- && (info->hash->creator == abfd->xvec
- || info->hash->creator == abfd->xvec->alternative_target))
+ 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",
+ h->root.root.string);
+#endif
+
+ /* Make sure we know what is going on here. */
+ htab = ppc_elf_hash_table (info);
+ BFD_ASSERT (htab->elf.dynobj != NULL
+ && (h->needs_plt
+ || h->u.weakdef != NULL
+ || (h->def_dynamic
+ && h->ref_regular
+ && !h->def_regular)));
+
+ /* Deal with function syms. */
+ if (h->type == STT_FUNC
+ || h->needs_plt)
{
- /* Common symbols less than or equal to -G nn bytes are automatically
- put into .sbss. */
- struct ppc_elf_link_hash_table *htab;
+ /* Clear procedure linkage table information for any symbol that
+ won't need a .plt entry. */
+ struct plt_entry *ent;
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->plt.refcount > 0)
+ break;
+ if (ent == NULL
+ || SYMBOL_CALLS_LOCAL (info, h)
+ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ && h->root.type == bfd_link_hash_undefweak))
+ {
+ /* A PLT entry is not required/allowed when:
- htab = ppc_elf_hash_table (info);
- if (htab->sbss == NULL)
+ 1. We are not using ld.so; because then the PLT entry
+ can't be set up, so we can't use one. In this case,
+ ppc_elf_adjust_dynamic_symbol won't even be called.
+
+ 2. GC has rendered the entry unused.
+
+ 3. We know for certain that a call to this symbol
+ will go to this object, or will remain undefined. */
+ h->plt.plist = NULL;
+ h->needs_plt = 0;
+ }
+ return TRUE;
+ }
+ else
+ h->plt.plist = NULL;
+
+ /* 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;
+ if (ELIMINATE_COPY_RELOCS)
+ h->non_got_ref = h->u.weakdef->non_got_ref;
+ return TRUE;
+ }
+
+ /* This is a reference to a symbol defined by a dynamic object which
+ is not a function. */
+
+ /* If we are creating a shared library, we must presume that the
+ only references to the symbol are via the global offset table.
+ For such cases we need not do anything here; the relocations will
+ be handled correctly by relocate_section. */
+ if (info->shared)
+ return TRUE;
+
+ /* If there are no references to this symbol that do not use the
+ GOT, we don't need to generate a copy reloc. */
+ if (!h->non_got_ref)
+ return TRUE;
+
+ /* If we didn't find any dynamic relocs in read-only sections, then we'll
+ be keeping the dynamic relocs and avoiding the copy reloc. We can't
+ do this if there are any small data relocations. */
+ if (ELIMINATE_COPY_RELOCS
+ && !ppc_elf_hash_entry (h)->has_sda_refs)
+ {
+ struct ppc_elf_dyn_relocs *p;
+ for (p = ppc_elf_hash_entry (h)->dyn_relocs; p != NULL; p = p->next)
{
- flagword flags = SEC_IS_COMMON;
+ s = p->sec->output_section;
+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
+ break;
+ }
- htab->sbss = bfd_make_section_anyway (abfd, ".sbss");
- if (htab->sbss == NULL
- || ! bfd_set_section_flags (abfd, htab->sbss, flags))
- return FALSE;
+ if (p == NULL)
+ {
+ h->non_got_ref = 0;
+ return TRUE;
}
+ }
- *secp = htab->sbss;
- *valp = sym->st_size;
+ if (h->size == 0)
+ {
+ (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+ h->root.root.string);
+ return TRUE;
+ }
+
+ /* We must allocate the symbol in our .dynbss section, which will
+ become part of the .bss section of the executable. There will be
+ an entry for this symbol in the .dynsym section. The dynamic
+ object will contain position independent code, so all references
+ from the dynamic object to this symbol will go through the global
+ offset table. The dynamic linker will use the .dynsym entry to
+ determine the address it must put in the global offset table, so
+ both the dynamic object and the regular object will refer to the
+ same memory location for the variable.
+
+ Of course, if the symbol is referenced using SDAREL relocs, we
+ must instead allocate it in .sbss. */
+
+ if (ppc_elf_hash_entry (h)->has_sda_refs)
+ s = htab->dynsbss;
+ else
+ s = htab->dynbss;
+ BFD_ASSERT (s != NULL);
+
+ /* We must generate a R_PPC_COPY reloc to tell the dynamic linker to
+ copy the initial value out of the dynamic object and into the
+ runtime process image. We need to remember the offset into the
+ .rela.bss section we are going to use. */
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ {
+ asection *srel;
+
+ if (ppc_elf_hash_entry (h)->has_sda_refs)
+ srel = htab->relsbss;
+ else
+ srel = htab->relbss;
+ BFD_ASSERT (srel != NULL);
+ srel->size += sizeof (Elf32_External_Rela);
+ 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;
}
-/* Finish up dynamic symbol handling. We set the contents of various
- dynamic sections here. */
+/* Generate a symbol to mark plt call stubs. For non-PIC code the sym is
+ xxxxxxxx.plt_call32.<callee> where xxxxxxxx is a hex number, usually 0,
+ specifying the addend on the plt relocation. For -fpic code, the sym
+ is xxxxxxxx.plt_pic32.<callee>, and for -fPIC
+ xxxxxxxx.got2.plt_pic32.<callee>. */
static bfd_boolean
-ppc_elf_finish_dynamic_symbol (bfd *output_bfd,
- struct bfd_link_info *info,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
+add_stub_sym (struct plt_entry *ent,
+ struct elf_link_hash_entry *h,
+ struct bfd_link_info *info)
+{
+ struct elf_link_hash_entry *sh;
+ size_t len1, len2, len3;
+ char *name;
+ const char *stub;
+ struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
+
+ if (info->shared || info->pie)
+ stub = ".plt_pic32.";
+ else
+ stub = ".plt_call32.";
+
+ len1 = strlen (h->root.root.string);
+ len2 = strlen (stub);
+ len3 = 0;
+ if (ent->sec)
+ len3 = strlen (ent->sec->name);
+ name = bfd_malloc (len1 + len2 + len3 + 9);
+ if (name == NULL)
+ return FALSE;
+ sprintf (name, "%08x", (unsigned) ent->addend & 0xffffffff);
+ if (ent->sec)
+ memcpy (name + 8, ent->sec->name, len3);
+ memcpy (name + 8 + len3, stub, len2);
+ memcpy (name + 8 + len3 + len2, h->root.root.string, len1 + 1);
+ sh = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE);
+ if (sh == NULL)
+ return FALSE;
+ if (sh->root.type == bfd_link_hash_new)
+ {
+ sh->root.type = bfd_link_hash_defined;
+ sh->root.u.def.section = htab->glink;
+ sh->root.u.def.value = ent->glink_offset;
+ sh->ref_regular = 1;
+ sh->def_regular = 1;
+ sh->ref_regular_nonweak = 1;
+ sh->forced_local = 1;
+ sh->non_elf = 0;
+ }
+ return TRUE;
+}
+
+/* Allocate NEED contiguous space in .got, and return the offset.
+ Handles allocation of the got header when crossing 32k. */
+
+static bfd_vma
+allocate_got (struct ppc_elf_link_hash_table *htab, unsigned int need)
+{
+ bfd_vma where;
+ unsigned int max_before_header;
+
+ if (htab->plt_type == PLT_VXWORKS)
+ {
+ where = htab->got->size;
+ htab->got->size += need;
+ }
+ else
+ {
+ max_before_header = htab->plt_type == PLT_NEW ? 32768 : 32764;
+ if (need <= htab->got_gap)
+ {
+ where = max_before_header - htab->got_gap;
+ htab->got_gap -= need;
+ }
+ else
+ {
+ if (htab->got->size + need > max_before_header
+ && htab->got->size <= max_before_header)
+ {
+ htab->got_gap = max_before_header - htab->got->size;
+ htab->got->size = max_before_header + htab->got_header_size;
+ }
+ where = htab->got->size;
+ htab->got->size += need;
+ }
+ }
+ return where;
+}
+
+/* Allocate space in associated reloc sections for dynamic relocs. */
+
+static bfd_boolean
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
+ struct bfd_link_info *info = inf;
+ struct ppc_elf_link_hash_entry *eh;
struct ppc_elf_link_hash_table *htab;
+ struct ppc_elf_dyn_relocs *p;
+
+ if (h->root.type == bfd_link_hash_indirect)
+ return TRUE;
+
+ 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;
+
+ htab = ppc_elf_hash_table (info);
+ if (htab->elf.dynamic_sections_created)
+ {
+ struct plt_entry *ent;
+ bfd_boolean doneone = FALSE;
+ bfd_vma plt_offset = 0, glink_offset = 0;
+
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->plt.refcount > 0)
+ {
+ /* Make sure this symbol is output as a dynamic symbol. */
+ if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ if (info->shared
+ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
+ {
+ asection *s = htab->plt;
+
+ if (htab->plt_type == PLT_NEW)
+ {
+ if (!doneone)
+ {
+ plt_offset = s->size;
+ s->size += 4;
+ }
+ ent->plt.offset = plt_offset;
+
+ s = htab->glink;
+ if (!doneone || info->shared || info->pie)
+ {
+ glink_offset = s->size;
+ s->size += GLINK_ENTRY_SIZE;
+ }
+ if (!doneone
+ && !info->shared
+ && !h->def_regular)
+ {
+ h->root.u.def.section = s;
+ h->root.u.def.value = glink_offset;
+ }
+ ent->glink_offset = glink_offset;
+
+ if (htab->emit_stub_syms
+ && !add_stub_sym (ent, h, info))
+ return FALSE;
+ }
+ else
+ {
+ if (!doneone)
+ {
+ /* If this is the first .plt entry, make room
+ for the special first entry. */
+ if (s->size == 0)
+ s->size += htab->plt_initial_entry_size;
+
+ /* The PowerPC PLT is actually composed of two
+ parts, the first part is 2 words (for a load
+ and a jump), and then there is a remaining
+ word available at the end. */
+ plt_offset = (htab->plt_initial_entry_size
+ + (htab->plt_slot_size
+ * ((s->size
+ - htab->plt_initial_entry_size)
+ / htab->plt_entry_size)));
+
+ /* If this symbol is not defined in a regular
+ file, and we are not generating a shared
+ library, then set the symbol to this location
+ in the .plt. This is required to make
+ function pointers compare as equal between
+ the normal executable and the shared library. */
+ if (! info->shared
+ && !h->def_regular)
+ {
+ h->root.u.def.section = s;
+ h->root.u.def.value = plt_offset;
+ }
+
+ /* Make room for this entry. */
+ s->size += htab->plt_entry_size;
+ /* After the 8192nd entry, room for two entries
+ is allocated. */
+ if (htab->plt_type == PLT_OLD
+ && (s->size - htab->plt_initial_entry_size)
+ / htab->plt_entry_size
+ > PLT_NUM_SINGLE_ENTRIES)
+ s->size += htab->plt_entry_size;
+ }
+ ent->plt.offset = plt_offset;
+ }
+
+ /* We also need to make an entry in the .rela.plt section. */
+ if (!doneone)
+ {
+ htab->relplt->size += sizeof (Elf32_External_Rela);
+
+ if (htab->plt_type == PLT_VXWORKS)
+ {
+ /* Allocate space for the unloaded relocations. */
+ if (!info->shared)
+ {
+ if (ent->plt.offset
+ == (bfd_vma) htab->plt_initial_entry_size)
+ {
+ htab->srelplt2->size
+ += sizeof (Elf32_External_Rela)
+ * VXWORKS_PLTRESOLVE_RELOCS;
+ }
+
+ htab->srelplt2->size
+ += sizeof (Elf32_External_Rela)
+ * VXWORKS_PLT_NON_JMP_SLOT_RELOCS;
+ }
+
+ /* Every PLT entry has an associated GOT entry in
+ .got.plt. */
+ htab->sgotplt->size += 4;
+ }
+ doneone = TRUE;
+ }
+ }
+ else
+ ent->plt.offset = (bfd_vma) -1;
+
+ if (!doneone)
+ {
+ h->plt.plist = NULL;
+ h->needs_plt = 0;
+ }
+ }
+ }
+ else
+ {
+ h->plt.plist = NULL;
+ h->needs_plt = 0;
+ }
+
+ eh = (struct ppc_elf_link_hash_entry *) h;
+ if (eh->elf.got.refcount > 0)
+ {
+ /* Make sure this symbol is output as a dynamic symbol. */
+ if (eh->elf.dynindx == -1
+ && !eh->elf.forced_local)
+ {
+ if (!bfd_elf_link_record_dynamic_symbol (info, &eh->elf))
+ return FALSE;
+ }
+
+ if (eh->tls_mask == (TLS_TLS | TLS_LD)
+ && !eh->elf.def_dynamic)
+ /* If just an LD reloc, we'll just use htab->tlsld_got.offset. */
+ eh->elf.got.offset = (bfd_vma) -1;
+ else
+ {
+ bfd_boolean dyn;
+ unsigned int need = 0;
+ if ((eh->tls_mask & TLS_TLS) != 0)
+ {
+ if ((eh->tls_mask & TLS_LD) != 0)
+ need += 8;
+ if ((eh->tls_mask & TLS_GD) != 0)
+ need += 8;
+ if ((eh->tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)
+ need += 4;
+ if ((eh->tls_mask & TLS_DTPREL) != 0)
+ need += 4;
+ }
+ else
+ need += 4;
+ eh->elf.got.offset = allocate_got (htab, need);
+ dyn = htab->elf.dynamic_sections_created;
+ if ((info->shared
+ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, &eh->elf))
+ && (ELF_ST_VISIBILITY (eh->elf.other) == STV_DEFAULT
+ || eh->elf.root.type != bfd_link_hash_undefweak))
+ {
+ /* All the entries we allocated need relocs.
+ Except LD only needs one. */
+ if ((eh->tls_mask & TLS_LD) != 0)
+ need -= 4;
+ htab->relgot->size += need * (sizeof (Elf32_External_Rela) / 4);
+ }
+ }
+ }
+ else
+ eh->elf.got.offset = (bfd_vma) -1;
+
+ if (eh->dyn_relocs == NULL)
+ return TRUE;
+
+ /* In the shared -Bsymbolic case, discard space allocated for
+ dynamic pc-relative relocs against symbols which turn out to be
+ defined in regular objects. For the normal shared case, discard
+ space for relocs that have become local due to symbol visibility
+ changes. */
+
+ if (info->shared)
+ {
+ /* Relocs that use pc_count are those that appear on a call insn,
+ or certain REL relocs (see MUST_BE_DYN_RELOC) that can be
+ generated via assembly. 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 weird assembly. */
+ if (SYMBOL_CALLS_LOCAL (info, h))
+ {
+ struct ppc_elf_dyn_relocs **pp;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+ {
+ p->count -= p->pc_count;
+ p->pc_count = 0;
+ if (p->count == 0)
+ *pp = p->next;
+ else
+ pp = &p->next;
+ }
+ }
+
+ /* Also discard relocs on undefined weak syms with non-default
+ visibility. */
+ if (eh->dyn_relocs != NULL
+ && h->root.type == bfd_link_hash_undefweak)
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->dyn_relocs = NULL;
+
+ /* Make sure undefined weak symbols are output as a dynamic
+ symbol in PIEs. */
+ else if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+ }
+ }
+ else if (ELIMINATE_COPY_RELOCS)
+ {
+ /* For the non-shared case, discard space for relocs against
+ symbols which turn out to need copy relocs or are not
+ dynamic. */
+
+ if (!h->non_got_ref
+ && h->def_dynamic
+ && !h->def_regular)
+ {
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ /* If that succeeded, we know we'll be keeping all the
+ relocs. */
+ if (h->dynindx != -1)
+ goto keep;
+ }
+
+ eh->dyn_relocs = NULL;
+
+ keep: ;
+ }
+
+ /* Finally, allocate space. */
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *sreloc = elf_section_data (p->sec)->sreloc;
+ sreloc->size += p->count * sizeof (Elf32_External_Rela);
+ }
+
+ return TRUE;
+}
+
+/* Find any dynamic relocs that apply to read-only sections. */
+
+static bfd_boolean
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *info)
+{
+ struct ppc_elf_dyn_relocs *p;
+
+ if (h->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;
+
+ for (p = ppc_elf_hash_entry (h)->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *s = p->sec->output_section;
+
+ if (s != NULL
+ && ((s->flags & (SEC_READONLY | SEC_ALLOC))
+ == (SEC_READONLY | SEC_ALLOC)))
+ {
+ ((struct bfd_link_info *) info)->flags |= DF_TEXTREL;
+
+ /* Not an error, just cut short the traversal. */
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+/* Set the sizes of the dynamic sections. */
+
+static bfd_boolean
+ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
+{
+ struct ppc_elf_link_hash_table *htab;
+ asection *s;
+ bfd_boolean relocs;
+ bfd *ibfd;
#ifdef DEBUG
- fprintf (stderr, "ppc_elf_finish_dynamic_symbol called for %s",
- h->root.root.string);
+ fprintf (stderr, "ppc_elf_size_dynamic_sections called\n");
#endif
htab = ppc_elf_hash_table (info);
BFD_ASSERT (htab->elf.dynobj != NULL);
- if (h->plt.offset != (bfd_vma) -1)
+ if (elf_hash_table (info)->dynamic_sections_created)
{
- Elf_Internal_Rela rela;
- bfd_byte *loc;
- bfd_vma reloc_index;
+ /* Set the contents of the .interp section to the interpreter. */
+ if (info->executable)
+ {
+ s = bfd_get_section_by_name (htab->elf.dynobj, ".interp");
+ BFD_ASSERT (s != NULL);
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+ }
+ }
-#ifdef DEBUG
- fprintf (stderr, ", plt_offset = %d", h->plt.offset);
-#endif
+ if (htab->plt_type == PLT_OLD)
+ htab->got_header_size = 16;
+ else if (htab->plt_type == PLT_NEW)
+ htab->got_header_size = 12;
- /* This symbol has an entry in the procedure linkage table. Set
- it up. */
+ /* Set up .got offsets for local syms, and space for local dynamic
+ relocs. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ bfd_signed_vma *local_got;
+ bfd_signed_vma *end_local_got;
+ char *lgot_masks;
+ bfd_size_type locsymcount;
+ Elf_Internal_Shdr *symtab_hdr;
- BFD_ASSERT (h->dynindx != -1);
- BFD_ASSERT (htab->plt != NULL && htab->relplt != NULL);
+ if (!is_ppc_elf_target (ibfd->xvec))
+ continue;
- /* We don't need to fill in the .plt. The ppc dynamic linker
- will fill it in. */
+ for (s = ibfd->sections; s != NULL; s = s->next)
+ {
+ struct ppc_elf_dyn_relocs *p;
- /* Fill in the entry in the .rela.plt section. */
- rela.r_offset = (htab->plt->output_section->vma
- + htab->plt->output_offset
- + h->plt.offset);
- rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_JMP_SLOT);
- rela.r_addend = 0;
+ for (p = ((struct ppc_elf_dyn_relocs *)
+ elf_section_data (s)->local_dynrel);
+ p != NULL;
+ p = p->next)
+ {
+ if (!bfd_is_abs_section (p->sec)
+ && bfd_is_abs_section (p->sec->output_section))
+ {
+ /* Input section has been discarded, either because
+ it is a copy of a linkonce section or due to
+ linker script /DISCARD/, so we'll be discarding
+ the relocs too. */
+ }
+ else if (p->count != 0)
+ {
+ elf_section_data (p->sec)->sreloc->size
+ += p->count * sizeof (Elf32_External_Rela);
+ if ((p->sec->output_section->flags
+ & (SEC_READONLY | SEC_ALLOC))
+ == (SEC_READONLY | SEC_ALLOC))
+ info->flags |= DF_TEXTREL;
+ }
+ }
+ }
- reloc_index = (h->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_SLOT_SIZE;
- if (reloc_index > PLT_NUM_SINGLE_ENTRIES)
- reloc_index -= (reloc_index - PLT_NUM_SINGLE_ENTRIES) / 2;
- loc = (htab->relplt->contents
- + reloc_index * sizeof (Elf32_External_Rela));
- bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ local_got = elf_local_got_refcounts (ibfd);
+ if (!local_got)
+ continue;
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ locsymcount = symtab_hdr->sh_info;
+ end_local_got = local_got + locsymcount;
+ lgot_masks = (char *) end_local_got;
+ for (; local_got < end_local_got; ++local_got, ++lgot_masks)
+ if (*local_got > 0)
+ {
+ if (*lgot_masks == (TLS_TLS | TLS_LD))
+ {
+ /* If just an LD reloc, we'll just use
+ htab->tlsld_got.offset. */
+ htab->tlsld_got.refcount += 1;
+ *local_got = (bfd_vma) -1;
+ }
+ else
+ {
+ unsigned int need = 0;
+ if ((*lgot_masks & TLS_TLS) != 0)
+ {
+ if ((*lgot_masks & TLS_GD) != 0)
+ need += 8;
+ if ((*lgot_masks & (TLS_TPREL | TLS_TPRELGD)) != 0)
+ need += 4;
+ if ((*lgot_masks & TLS_DTPREL) != 0)
+ need += 4;
+ }
+ else
+ need += 4;
+ *local_got = allocate_got (htab, need);
+ if (info->shared)
+ htab->relgot->size += (need
+ * (sizeof (Elf32_External_Rela) / 4));
+ }
+ }
+ else
+ *local_got = (bfd_vma) -1;
+ }
+
+ if (htab->tlsld_got.refcount > 0)
+ {
+ htab->tlsld_got.offset = allocate_got (htab, 8);
+ if (info->shared)
+ htab->relgot->size += sizeof (Elf32_External_Rela);
+ }
+ else
+ htab->tlsld_got.offset = (bfd_vma) -1;
+
+ /* Allocate space for global sym dynamic relocs. */
+ elf_link_hash_traverse (elf_hash_table (info), allocate_dynrelocs, info);
+
+ if (htab->got != NULL && htab->plt_type != PLT_VXWORKS)
+ {
+ unsigned int g_o_t = 32768;
+
+ /* If we haven't allocated the header, do so now. When we get here,
+ for old plt/got the got size will be 0 to 32764 (not allocated),
+ or 32780 to 65536 (header allocated). For new plt/got, the
+ corresponding ranges are 0 to 32768 and 32780 to 65536. */
+ if (htab->got->size <= 32768)
{
- /* Mark the symbol as undefined, rather than as defined in
- the .plt section. Leave the value alone. */
- sym->st_shndx = SHN_UNDEF;
- /* If the symbol is weak, we do need to clear the value.
- Otherwise, the PLT entry would provide a definition for
- the symbol even if the symbol wasn't defined anywhere,
- and so the symbol would never be NULL. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
- == 0)
- sym->st_value = 0;
+ g_o_t = htab->got->size;
+ if (htab->plt_type == PLT_OLD)
+ g_o_t += 4;
+ htab->got->size += htab->got_header_size;
}
+
+ htab->elf.hgot->root.u.def.value = g_o_t;
}
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ if (htab->glink != NULL && htab->glink->size != 0)
{
- asection *s;
- Elf_Internal_Rela rela;
- bfd_byte *loc;
+ htab->glink_pltresolve = htab->glink->size;
+ /* Space for the branch table. */
+ htab->glink->size += htab->glink->size / (GLINK_ENTRY_SIZE / 4) - 4;
+ /* Pad out to align the start of PLTresolve. */
+ htab->glink->size += -htab->glink->size & 15;
+ htab->glink->size += GLINK_PLTRESOLVE;
+
+ if (htab->emit_stub_syms)
+ {
+ struct elf_link_hash_entry *sh;
+ sh = elf_link_hash_lookup (&htab->elf, "__glink",
+ TRUE, FALSE, FALSE);
+ if (sh == NULL)
+ return FALSE;
+ if (sh->root.type == bfd_link_hash_new)
+ {
+ sh->root.type = bfd_link_hash_defined;
+ sh->root.u.def.section = htab->glink;
+ sh->root.u.def.value = htab->glink_pltresolve;
+ sh->ref_regular = 1;
+ sh->def_regular = 1;
+ sh->ref_regular_nonweak = 1;
+ sh->forced_local = 1;
+ sh->non_elf = 0;
+ }
+ sh = elf_link_hash_lookup (&htab->elf, "__glink_PLTresolve",
+ TRUE, FALSE, FALSE);
+ if (sh == NULL)
+ return FALSE;
+ if (sh->root.type == bfd_link_hash_new)
+ {
+ sh->root.type = bfd_link_hash_defined;
+ sh->root.u.def.section = htab->glink;
+ sh->root.u.def.value = htab->glink->size - GLINK_PLTRESOLVE;
+ sh->ref_regular = 1;
+ sh->def_regular = 1;
+ sh->ref_regular_nonweak = 1;
+ sh->forced_local = 1;
+ sh->non_elf = 0;
+ }
+ }
+ }
- /* This symbols needs a copy reloc. Set it up. */
+ /* We've now determined the sizes of the various dynamic sections.
+ Allocate memory for them. */
+ relocs = FALSE;
+ for (s = htab->elf.dynobj->sections; s != NULL; s = s->next)
+ {
+ bfd_boolean strip_section = TRUE;
-#ifdef DEBUG
- fprintf (stderr, ", copy");
-#endif
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ continue;
- BFD_ASSERT (h->dynindx != -1);
+ if (s == htab->plt
+ || s == htab->glink
+ || s == htab->got
+ || s == htab->sgotplt
+ || s == htab->sbss
+ || s == htab->dynbss
+ || s == htab->dynsbss)
+ {
+ /* We'd like to strip these sections if they aren't needed, but if
+ we've exported dynamic symbols from them we must leave them.
+ It's too late to tell BFD to get rid of the symbols. */
+ if ((s == htab->plt || s == htab->got) && htab->elf.hplt != NULL)
+ strip_section = FALSE;
+ /* Strip this section if we don't need it; see the
+ comment below. */
+ }
+ else if (s == htab->sdata[0].section
+ || s == htab->sdata[1].section)
+ {
+ /* Strip these too. */
+ }
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
+ {
+ if (s->size != 0)
+ {
+ /* Remember whether there are any relocation sections. */
+ relocs = TRUE;
- if (h->size <= elf_gp_size (htab->elf.dynobj))
- s = htab->relsbss;
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ s->reloc_count = 0;
+ }
+ }
else
- s = htab->relbss;
- BFD_ASSERT (s != NULL);
+ {
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
- rela.r_offset = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_COPY);
- rela.r_addend = 0;
- loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela);
- bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ if (s->size == 0 && strip_section)
+ {
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
+ s->flags |= SEC_EXCLUDE;
+ continue;
+ }
+
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
+ /* Allocate memory for the section contents. */
+ s->contents = bfd_zalloc (htab->elf.dynobj, s->size);
+ if (s->contents == NULL)
+ return FALSE;
}
-#ifdef DEBUG
- fprintf (stderr, "\n");
-#endif
+ if (htab->elf.dynamic_sections_created)
+ {
+ /* Add some entries to the .dynamic section. We fill in the
+ values later, in ppc_elf_finish_dynamic_sections, but we
+ must add the entries now so that we get the correct size for
+ the .dynamic section. The DT_DEBUG entry is filled in by the
+ dynamic linker and used by the debugger. */
+#define add_dynamic_entry(TAG, VAL) \
+ _bfd_elf_add_dynamic_entry (info, TAG, VAL)
- /* Mark some specially defined symbols as absolute. */
- if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
- sym->st_shndx = SHN_ABS;
+ if (info->executable)
+ {
+ if (!add_dynamic_entry (DT_DEBUG, 0))
+ return FALSE;
+ }
+
+ if (htab->plt != NULL && htab->plt->size != 0)
+ {
+ if (!add_dynamic_entry (DT_PLTGOT, 0)
+ || !add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+ || !add_dynamic_entry (DT_JMPREL, 0))
+ return FALSE;
+ }
+
+ if (htab->glink != NULL && htab->glink->size != 0)
+ {
+ if (!add_dynamic_entry (DT_PPC_GOT, 0))
+ return FALSE;
+ }
+
+ if (relocs)
+ {
+ if (!add_dynamic_entry (DT_RELA, 0)
+ || !add_dynamic_entry (DT_RELASZ, 0)
+ || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
+ return FALSE;
+ }
+
+ /* If any dynamic relocs apply to a read-only section, then we
+ need a DT_TEXTREL entry. */
+ if ((info->flags & DF_TEXTREL) == 0)
+ elf_link_hash_traverse (elf_hash_table (info), readonly_dynrelocs,
+ info);
+
+ if ((info->flags & DF_TEXTREL) != 0)
+ {
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
+ return FALSE;
+ }
+ }
+#undef add_dynamic_entry
return TRUE;
}
-/* Finish up the dynamic sections. */
+#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+
+static const int shared_stub_entry[] =
+ {
+ 0x7c0802a6, /* mflr 0 */
+ 0x429f0005, /* bcl 20, 31, .Lxxx */
+ 0x7d6802a6, /* mflr 11 */
+ 0x3d6b0000, /* addis 11, 11, (xxx-.Lxxx)@ha */
+ 0x396b0018, /* addi 11, 11, (xxx-.Lxxx)@l */
+ 0x7c0803a6, /* mtlr 0 */
+ 0x7d6903a6, /* mtctr 11 */
+ 0x4e800420, /* bctr */
+ };
+
+static const int stub_entry[] =
+ {
+ 0x3d600000, /* lis 11,xxx@ha */
+ 0x396b0000, /* addi 11,11,xxx@l */
+ 0x7d6903a6, /* mtctr 11 */
+ 0x4e800420, /* bctr */
+ };
static bfd_boolean
-ppc_elf_finish_dynamic_sections (bfd *output_bfd,
- struct bfd_link_info *info)
+ppc_elf_relax_section (bfd *abfd,
+ asection *isec,
+ struct bfd_link_info *link_info,
+ bfd_boolean *again)
{
- asection *sdyn;
+ struct one_fixup
+ {
+ struct one_fixup *next;
+ asection *tsec;
+ bfd_vma toff;
+ bfd_vma trampoff;
+ };
+
+ Elf_Internal_Shdr *symtab_hdr;
+ bfd_byte *contents = NULL;
+ Elf_Internal_Sym *isymbuf = NULL;
+ Elf_Internal_Rela *internal_relocs = NULL;
+ Elf_Internal_Rela *irel, *irelend;
+ struct one_fixup *fixups = NULL;
+ bfd_boolean changed;
struct ppc_elf_link_hash_table *htab;
+ bfd_size_type trampoff;
+ asection *got2;
-#ifdef DEBUG
- fprintf (stderr, "ppc_elf_finish_dynamic_sections called\n");
-#endif
+ *again = FALSE;
- htab = ppc_elf_hash_table (info);
- sdyn = bfd_get_section_by_name (htab->elf.dynobj, ".dynamic");
+ /* Nothing to do if there are no relocations, and no need to do
+ anything with non-alloc sections. */
+ if ((isec->flags & SEC_ALLOC) == 0
+ || (isec->flags & SEC_RELOC) == 0
+ || isec->reloc_count == 0)
+ return TRUE;
- if (htab->elf.dynamic_sections_created)
+ trampoff = (isec->size + 3) & (bfd_vma) -4;
+ /* Space for a branch around any trampolines. */
+ trampoff += 4;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+
+ /* Get a copy of the native relocations. */
+ internal_relocs = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL,
+ link_info->keep_memory);
+ if (internal_relocs == NULL)
+ goto error_return;
+
+ htab = ppc_elf_hash_table (link_info);
+ got2 = bfd_get_section_by_name (abfd, ".got2");
+
+ irelend = internal_relocs + isec->reloc_count;
+ for (irel = internal_relocs; irel < irelend; irel++)
{
- Elf32_External_Dyn *dyncon, *dynconend;
+ unsigned long r_type = ELF32_R_TYPE (irel->r_info);
+ bfd_vma symaddr, reladdr, toff, roff;
+ asection *tsec;
+ struct one_fixup *f;
+ size_t insn_offset = 0;
+ bfd_vma max_branch_offset, val;
+ bfd_byte *hit_addr;
+ unsigned long t0;
+ unsigned char sym_type;
- BFD_ASSERT (htab->plt != NULL && sdyn != NULL);
+ switch (r_type)
+ {
+ case R_PPC_REL24:
+ case R_PPC_LOCAL24PC:
+ case R_PPC_PLTREL24:
+ max_branch_offset = 1 << 25;
+ break;
- dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
- for (; dyncon < dynconend; dyncon++)
+ case R_PPC_REL14:
+ case R_PPC_REL14_BRTAKEN:
+ case R_PPC_REL14_BRNTAKEN:
+ max_branch_offset = 1 << 15;
+ break;
+
+ default:
+ continue;
+ }
+
+ /* Get the value of the symbol referred to by the reloc. */
+ if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
{
- Elf_Internal_Dyn dyn;
- asection *s;
+ /* A local symbol. */
+ Elf_Internal_Sym *isym;
- bfd_elf32_swap_dyn_in (htab->elf.dynobj, dyncon, &dyn);
+ /* Read this BFD's local symbols. */
+ if (isymbuf == NULL)
+ {
+ 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 == 0)
+ goto error_return;
+ }
+ isym = isymbuf + ELF32_R_SYM (irel->r_info);
+ if (isym->st_shndx == SHN_UNDEF)
+ continue; /* We can't do anything with undefined symbols. */
+ else if (isym->st_shndx == SHN_ABS)
+ tsec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ tsec = bfd_com_section_ptr;
+ else
+ tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
- switch (dyn.d_tag)
+ toff = isym->st_value;
+ sym_type = ELF_ST_TYPE (isym->st_info);
+ }
+ else
+ {
+ /* Global symbol handling. */
+ unsigned long indx;
+ struct elf_link_hash_entry *h;
+
+ indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+ h = elf_sym_hashes (abfd)[indx];
+
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ tsec = NULL;
+ toff = 0;
+ if (r_type == R_PPC_PLTREL24
+ && htab->plt != NULL)
{
- case DT_PLTGOT:
- s = htab->plt;
- dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
- break;
+ struct plt_entry *ent = find_plt_ent (h, got2, irel->r_addend);
- case DT_PLTRELSZ:
- dyn.d_un.d_val = htab->relplt->_raw_size;
- break;
+ if (ent != NULL)
+ {
+ if (htab->plt_type == PLT_NEW)
+ {
+ tsec = htab->glink;
+ toff = ent->glink_offset;
+ }
+ else
+ {
+ tsec = htab->plt;
+ toff = ent->plt.offset;
+ }
+ }
+ }
+ if (tsec != NULL)
+ ;
+ else if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ tsec = h->root.u.def.section;
+ toff = h->root.u.def.value;
+ }
+ else
+ continue;
- case DT_JMPREL:
- s = htab->relplt;
- dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
- break;
+ sym_type = h->type;
+ }
- default:
- continue;
+ /* If the branch and target are in the same section, you have
+ no hope of adding stubs. We'll error out later should the
+ branch overflow. */
+ if (tsec == isec)
+ continue;
+
+ /* There probably isn't any reason to handle symbols in
+ SEC_MERGE sections; SEC_MERGE doesn't seem a likely
+ attribute for a code section, and we are only looking at
+ branches. However, implement it correctly here as a
+ reference for other target relax_section functions. */
+ if (0 && tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
+ {
+ /* At this stage in linking, no SEC_MERGE symbol has been
+ adjusted, so all references to such symbols need to be
+ passed through _bfd_merged_section_offset. (Later, in
+ relocate_section, all SEC_MERGE symbols *except* for
+ section symbols have been adjusted.)
+
+ gas may reduce relocations against symbols in SEC_MERGE
+ sections to a relocation against the section symbol when
+ the original addend was zero. When the reloc is against
+ a section symbol we should include the addend in the
+ offset passed to _bfd_merged_section_offset, since the
+ location of interest is the original symbol. On the
+ other hand, an access to "sym+addend" where "sym" is not
+ a section symbol should not include the addend; Such an
+ access is presumed to be an offset from "sym"; The
+ location of interest is just "sym". */
+ if (sym_type == STT_SECTION)
+ toff += irel->r_addend;
+
+ toff = _bfd_merged_section_offset (abfd, &tsec,
+ elf_section_data (tsec)->sec_info,
+ toff);
+
+ if (sym_type != STT_SECTION)
+ toff += irel->r_addend;
+ }
+ /* PLTREL24 addends are special. */
+ else if (r_type != R_PPC_PLTREL24)
+ toff += irel->r_addend;
+
+ /* Attempted -shared link of non-pic code loses. */
+ if (tsec->output_section == NULL)
+ continue;
+
+ symaddr = tsec->output_section->vma + tsec->output_offset + toff;
+
+ roff = irel->r_offset;
+ reladdr = isec->output_section->vma + isec->output_offset + roff;
+
+ /* If the branch is in range, no need to do anything. */
+ if (symaddr - reladdr + max_branch_offset < 2 * max_branch_offset)
+ continue;
+
+ /* Look for an existing fixup to this address. */
+ for (f = fixups; f ; f = f->next)
+ if (f->tsec == tsec && f->toff == toff)
+ break;
+
+ if (f == NULL)
+ {
+ size_t size;
+ unsigned long stub_rtype;
+
+ val = trampoff - roff;
+ if (val >= max_branch_offset)
+ /* Oh dear, we can't reach a trampoline. Don't try to add
+ one. We'll report an error later. */
+ continue;
+
+ if (link_info->shared)
+ {
+ size = 4 * ARRAY_SIZE (shared_stub_entry);
+ insn_offset = 12;
+ stub_rtype = R_PPC_RELAX32PC;
+ }
+ else
+ {
+ size = 4 * ARRAY_SIZE (stub_entry);
+ insn_offset = 0;
+ stub_rtype = R_PPC_RELAX32;
}
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ if (R_PPC_RELAX32_PLT - R_PPC_RELAX32
+ != R_PPC_RELAX32PC_PLT - R_PPC_RELAX32PC)
+ abort ();
+ if (tsec == htab->plt
+ || tsec == htab->glink)
+ stub_rtype += R_PPC_RELAX32_PLT - R_PPC_RELAX32;
+
+ /* Hijack the old relocation. Since we need two
+ relocations for this use a "composite" reloc. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ stub_rtype);
+ irel->r_offset = trampoff + insn_offset;
+
+ /* Record the fixup so we don't do it again this section. */
+ f = bfd_malloc (sizeof (*f));
+ f->next = fixups;
+ f->tsec = tsec;
+ f->toff = toff;
+ f->trampoff = trampoff;
+ fixups = f;
+
+ trampoff += size;
+ }
+ else
+ {
+ val = f->trampoff - roff;
+ if (val >= max_branch_offset)
+ continue;
+
+ /* Nop out the reloc, since we're finalizing things here. */
+ irel->r_info = ELF32_R_INFO (0, R_PPC_NONE);
+ }
+
+ /* Get the section contents. */
+ if (contents == NULL)
+ {
+ /* Get cached copy if it exists. */
+ if (elf_section_data (isec)->this_hdr.contents != NULL)
+ contents = elf_section_data (isec)->this_hdr.contents;
+ else
+ {
+ /* Go get them off disk. */
+ if (!bfd_malloc_and_get_section (abfd, isec, &contents))
+ goto error_return;
+ }
+ }
+
+ /* Fix up the existing branch to hit the trampoline. */
+ hit_addr = contents + roff;
+ switch (r_type)
+ {
+ case R_PPC_REL24:
+ case R_PPC_LOCAL24PC:
+ case R_PPC_PLTREL24:
+ t0 = bfd_get_32 (abfd, hit_addr);
+ t0 &= ~0x3fffffc;
+ t0 |= val & 0x3fffffc;
+ bfd_put_32 (abfd, t0, hit_addr);
+ break;
+
+ case R_PPC_REL14:
+ case R_PPC_REL14_BRTAKEN:
+ case R_PPC_REL14_BRNTAKEN:
+ t0 = bfd_get_32 (abfd, hit_addr);
+ t0 &= ~0xfffc;
+ t0 |= val & 0xfffc;
+ bfd_put_32 (abfd, t0, hit_addr);
+ break;
}
}
- /* Add a blrl instruction at _GLOBAL_OFFSET_TABLE_-4 so that a function can
- easily find the address of the _GLOBAL_OFFSET_TABLE_. */
- if (htab->got)
+ /* Write out the trampolines. */
+ changed = fixups != NULL;
+ if (fixups != NULL)
{
- unsigned char *contents = htab->got->contents;
- bfd_put_32 (output_bfd, 0x4e800021 /* blrl */, contents);
+ const int *stub;
+ bfd_byte *dest;
+ bfd_vma val;
+ int i, size;
+
+ do
+ {
+ struct one_fixup *f = fixups;
+ fixups = fixups->next;
+ free (f);
+ }
+ while (fixups);
+
+ contents = bfd_realloc (contents, trampoff);
+ if (contents == NULL)
+ goto error_return;
+
+ isec->size = (isec->size + 3) & (bfd_vma) -4;
+ /* Branch around the trampolines. */
+ val = trampoff - isec->size + 0x48000000;
+ dest = contents + isec->size;
+ isec->size = trampoff;
+ bfd_put_32 (abfd, val, dest);
+ dest += 4;
- if (sdyn == NULL)
- bfd_put_32 (output_bfd, 0, contents + 4);
+ if (link_info->shared)
+ {
+ stub = shared_stub_entry;
+ size = ARRAY_SIZE (shared_stub_entry);
+ }
else
- bfd_put_32 (output_bfd,
- sdyn->output_section->vma + sdyn->output_offset,
- contents + 4);
+ {
+ stub = stub_entry;
+ size = ARRAY_SIZE (stub_entry);
+ }
- elf_section_data (htab->got->output_section)->this_hdr.sh_entsize = 4;
+ i = 0;
+ while (dest < contents + trampoff)
+ {
+ bfd_put_32 (abfd, stub[i], dest);
+ i++;
+ if (i == size)
+ i = 0;
+ dest += 4;
+ }
+ BFD_ASSERT (i == 0);
+ }
+
+ 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 (isec)->this_hdr.contents != contents)
+ {
+ if (!changed && !link_info->keep_memory)
+ free (contents);
+ else
+ {
+ /* Cache the section contents for elf_link_input_bfd. */
+ elf_section_data (isec)->this_hdr.contents = contents;
+ }
+ }
+
+ if (elf_section_data (isec)->relocs != internal_relocs)
+ {
+ if (!changed)
+ free (internal_relocs);
+ else
+ elf_section_data (isec)->relocs = internal_relocs;
+ }
+
+ *again = changed;
return TRUE;
+
+ error_return:
+ if (isymbuf != NULL && (unsigned char *) isymbuf != symtab_hdr->contents)
+ free (isymbuf);
+ if (contents != NULL
+ && elf_section_data (isec)->this_hdr.contents != contents)
+ free (contents);
+ if (internal_relocs != NULL
+ && elf_section_data (isec)->relocs != internal_relocs)
+ free (internal_relocs);
+ return FALSE;
}
+/* What to do when ld finds relocations against symbols defined in
+ discarded sections. */
+
+static unsigned int
+ppc_elf_action_discarded (asection *sec)
+{
+ if (strcmp (".fixup", sec->name) == 0)
+ return 0;
+
+ if (strcmp (".got2", sec->name) == 0)
+ return 0;
+
+ return _bfd_elf_default_action_discarded (sec);
+}
+
+/* Fill in the address for a pointer generated in a linker section. */
+
+static bfd_vma
+elf_finish_pointer_linker_section (bfd *input_bfd,
+ elf_linker_section_t *lsect,
+ struct elf_link_hash_entry *h,
+ bfd_vma relocation,
+ const Elf_Internal_Rela *rel)
+{
+ elf_linker_section_pointers_t *linker_section_ptr;
+
+ BFD_ASSERT (lsect != NULL);
+
+ if (h != NULL)
+ {
+ /* Handle global symbol. */
+ struct ppc_elf_link_hash_entry *eh;
+
+ eh = (struct ppc_elf_link_hash_entry *) h;
+ BFD_ASSERT (eh->elf.def_regular);
+ linker_section_ptr = eh->linker_section_pointer;
+ }
+ else
+ {
+ /* Handle local symbol. */
+ unsigned long r_symndx = ELF32_R_SYM (rel->r_info);
+
+ BFD_ASSERT (elf_local_ptr_offsets (input_bfd) != NULL);
+ linker_section_ptr = elf_local_ptr_offsets (input_bfd)[r_symndx];
+ }
+
+ linker_section_ptr = elf_find_pointer_linker_section (linker_section_ptr,
+ rel->r_addend,
+ lsect);
+ BFD_ASSERT (linker_section_ptr != NULL);
+
+ /* Offset will always be a multiple of four, so use the bottom bit
+ as a "written" flag. */
+ if ((linker_section_ptr->offset & 1) == 0)
+ {
+ bfd_put_32 (lsect->section->owner,
+ relocation + linker_section_ptr->addend,
+ lsect->section->contents + linker_section_ptr->offset);
+ linker_section_ptr->offset += 1;
+ }
+
+ relocation = (lsect->section->output_offset
+ + linker_section_ptr->offset - 1
+ - 0x8000);
+
+#ifdef DEBUG
+ fprintf (stderr,
+ "Finish pointer in linker section %s, offset = %ld (0x%lx)\n",
+ lsect->name, (long) relocation, (long) relocation);
+#endif
+
+ /* Subtract out the addend, because it will get added back in by the normal
+ processing. */
+ return relocation - linker_section_ptr->addend;
+}
+
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
@@ -4629,21 +5515,42 @@ ppc_elf_relocate_section (bfd *output_bfd,
Elf_Internal_Rela *relend;
Elf_Internal_Rela outrel;
bfd_byte *loc;
- asection *sreloc = NULL;
+ asection *got2, *sreloc = NULL;
bfd_vma *local_got_offsets;
bfd_boolean ret = TRUE;
#ifdef DEBUG
- fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, "
- "%ld relocations%s\n",
- bfd_archive_filename (input_bfd),
- bfd_section_name(input_bfd, input_section),
- (long) input_section->reloc_count,
- (info->relocatable) ? " (relocatable)" : "");
+ _bfd_error_handler ("ppc_elf_relocate_section called for %B section %A, "
+ "%ld relocations%s",
+ input_bfd, input_section,
+ (long) input_section->reloc_count,
+ (info->relocatable) ? " (relocatable)" : "");
#endif
+ got2 = bfd_get_section_by_name (input_bfd, ".got2");
+
if (info->relocatable)
- return TRUE;
+ {
+ 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])
@@ -4684,7 +5591,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- sym_name = bfd_elf_local_sym_name (input_bfd, sym);
+ sym_name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec);
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
@@ -4865,6 +5772,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
insn1 |= 32 << 26; /* lwz */
insn2 = 0x7c631214; /* add 3,3,2 */
rel[1].r_info = ELF32_R_INFO (r_symndx2, R_PPC_NONE);
+ rel[1].r_addend = 0;
r_type = (((r_type - (R_PPC_GOT_TLSGD16 & 3)) & 3)
+ R_PPC_GOT_TPREL16);
rel->r_info = ELF32_R_INFO (r_symndx, r_type);
@@ -4879,13 +5787,13 @@ ppc_elf_relocate_section (bfd *output_bfd,
/* Was an LD reloc. */
r_symndx = 0;
rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
- rel[1].r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
}
r_type = R_PPC_TPREL16_HA;
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_addend = rel->r_addend;
}
bfd_put_32 (output_bfd, insn1, contents + rel->r_offset - 2);
bfd_put_32 (output_bfd, insn2, contents + offset);
@@ -4942,8 +5850,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
{
default:
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d for symbol %s"),
- bfd_archive_filename (input_bfd), (int) r_type, sym_name);
+ (_("%B: unknown relocation type %d for symbol %s"),
+ input_bfd, (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
@@ -5006,7 +5914,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
indx = 0;
if (tls_type == (TLS_TLS | TLS_LD)
&& (h == NULL
- || !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)))
+ || !h->def_dynamic))
offp = &htab->tlsld_got.offset;
else if (h != NULL)
{
@@ -5049,8 +5957,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
if (offp == &htab->tlsld_got.offset)
tls_m = TLS_LD;
else if (h == NULL
- || !(h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC))
+ || !h->def_dynamic)
tls_m &= ~TLS_LD;
/* We might have multiple got entries for this sym.
@@ -5169,8 +6076,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
{
if ((tls_mask & TLS_LD) != 0
&& !(h == NULL
- || !(h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC)))
+ || !h->def_dynamic))
off += 8;
if (tls_type != (TLS_TLS | TLS_GD))
{
@@ -5185,7 +6091,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
}
- relocation = htab->got->output_offset + off - 4;
+ relocation = htab->got->output_offset + off;
+ relocation -= htab->elf.hgot->root.u.def.value;
/* Addends on got relocations don't make much sense.
x+off@got is actually x@got+off, and since the got is
@@ -5193,9 +6100,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
got at entry m+n bears little relation to the entry m. */
if (addend != 0)
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): non-zero addend on %s reloc against `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name,
sym_name);
@@ -5251,6 +6158,12 @@ ppc_elf_relocate_section (bfd *output_bfd,
addend = 0;
goto dodyn;
+ case R_PPC_REL16:
+ case R_PPC_REL16_LO:
+ case R_PPC_REL16_HI:
+ case R_PPC_REL16_HA:
+ break;
+
case R_PPC_REL24:
case R_PPC_REL32:
case R_PPC_REL14:
@@ -5259,7 +6172,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
/* If these relocations are not to a named symbol, they can be
handled right here, no need to bother the dynamic linker. */
if (SYMBOL_REFERENCES_LOCAL (info, h)
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ || h == htab->elf.hgot)
break;
/* fall through */
@@ -5284,6 +6197,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
break;
/* Fall thru. */
+ if ((input_section->flags & SEC_ALLOC) == 0)
+ break;
+ /* Fall thru. */
+
if ((info->shared
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -5292,12 +6209,11 @@ ppc_elf_relocate_section (bfd *output_bfd,
|| !SYMBOL_CALLS_LOCAL (info, h)))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
- && (input_section->flags & SEC_ALLOC) != 0
&& h != NULL
&& h->dynindx != -1
- && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ && !h->non_got_ref
+ && h->def_dynamic
+ && !h->def_regular))
{
int skip;
@@ -5411,12 +6327,33 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
break;
+ case R_PPC_RELAX32PC_PLT:
+ case R_PPC_RELAX32_PLT:
+ {
+ struct plt_entry *ent = find_plt_ent (h, got2, addend);
+
+ if (htab->plt_type == PLT_NEW)
+ relocation = (htab->glink->output_section->vma
+ + htab->glink->output_offset
+ + ent->glink_offset);
+ else
+ relocation = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + ent->plt.offset);
+ addend = 0;
+ }
+ if (r_type == R_PPC_RELAX32_PLT)
+ goto relax32;
+ /* Fall thru */
+
case R_PPC_RELAX32PC:
relocation -= (input_section->output_section->vma
+ input_section->output_offset
+ rel->r_offset - 4);
/* Fall thru */
+
case R_PPC_RELAX32:
+ relax32:
{
unsigned long t0;
unsigned long t1;
@@ -5441,20 +6378,18 @@ ppc_elf_relocate_section (bfd *output_bfd,
/* Indirect .sdata relocation. */
case R_PPC_EMB_SDAI16:
- BFD_ASSERT (htab->sdata != NULL);
+ BFD_ASSERT (htab->sdata[0].section != NULL);
relocation
- = elf_finish_pointer_linker_section (output_bfd, input_bfd, info,
- htab->sdata, h, relocation,
- rel, R_PPC_RELATIVE);
+ = elf_finish_pointer_linker_section (input_bfd, &htab->sdata[0],
+ h, relocation, rel);
break;
/* Indirect .sdata2 relocation. */
case R_PPC_EMB_SDA2I16:
- BFD_ASSERT (htab->sdata2 != NULL);
+ BFD_ASSERT (htab->sdata[1].section != NULL);
relocation
- = elf_finish_pointer_linker_section (output_bfd, input_bfd, info,
- htab->sdata2, h, relocation,
- rel, R_PPC_RELATIVE);
+ = elf_finish_pointer_linker_section (input_bfd, &htab->sdata[1],
+ h, relocation, rel);
break;
/* Handle the TOC16 reloc. We want to use the offset within the .got
@@ -5465,7 +6400,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
BFD_ASSERT (sec != NULL);
BFD_ASSERT (bfd_is_und_section (sec)
|| strcmp (bfd_get_section_name (abfd, sec), ".got") == 0
- || strcmp (bfd_get_section_name (abfd, sec), ".cgot") == 0)
+ || strcmp (bfd_get_section_name (abfd, sec), ".cgot") == 0);
addend -= sec->output_section->vma + sec->output_offset + 0x8000;
break;
@@ -5473,28 +6408,36 @@ ppc_elf_relocate_section (bfd *output_bfd,
case R_PPC_PLTREL24:
/* Relocation is to the entry for this symbol in the
procedure linkage table. */
- BFD_ASSERT (h != NULL);
+ {
+ struct plt_entry *ent = find_plt_ent (h, got2, addend);
- if (h->plt.offset == (bfd_vma) -1
- || htab->plt == NULL)
- {
- /* We didn't make a PLT entry for this symbol. This
- happens when statically linking PIC code, or when
- using -Bsymbolic. */
- break;
- }
+ addend = 0;
+ if (ent == NULL
+ || htab->plt == NULL)
+ {
+ /* We didn't make a PLT entry for this symbol. This
+ happens when statically linking PIC code, or when
+ using -Bsymbolic. */
+ break;
+ }
- unresolved_reloc = FALSE;
- relocation = (htab->plt->output_section->vma
- + htab->plt->output_offset
- + h->plt.offset);
+ unresolved_reloc = FALSE;
+ if (htab->plt_type == PLT_NEW)
+ relocation = (htab->glink->output_section->vma
+ + htab->glink->output_offset
+ + ent->glink_offset);
+ else
+ relocation = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + ent->plt.offset);
+ }
break;
/* Relocate against _SDA_BASE_. */
case R_PPC_SDAREL16:
{
const char *name;
- const struct elf_link_hash_entry *sh;
+ struct elf_link_hash_entry *sh;
BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
@@ -5504,17 +6447,17 @@ ppc_elf_relocate_section (bfd *output_bfd,
&& (name[5] == 0 || name[5] == '.'))))
{
(*_bfd_error_handler)
- (_("%s: the target (%s) of a %s relocation is "
+ (_("%B: the target (%s) of a %s relocation is "
"in the wrong output section (%s)"),
- bfd_archive_filename (input_bfd),
+ input_bfd,
sym_name,
howto->name,
name);
}
- sh = htab->sdata->sym_hash;
+ sh = htab->sdata[0].sym;
addend -= (sh->root.u.def.value
- + sh->root.u.def.section->output_section->vma
- + sh->root.u.def.section->output_offset);
+ + sh->root.u.def.section->output_offset
+ + sh->root.u.def.section->output_section->vma);
}
break;
@@ -5522,7 +6465,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
case R_PPC_EMB_SDA2REL:
{
const char *name;
- const struct elf_link_hash_entry *sh;
+ struct elf_link_hash_entry *sh;
BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
@@ -5530,9 +6473,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
|| strncmp (name, ".sbss2", 6) == 0))
{
(*_bfd_error_handler)
- (_("%s: the target (%s) of a %s relocation is "
+ (_("%B: the target (%s) of a %s relocation is "
"in the wrong output section (%s)"),
- bfd_archive_filename (input_bfd),
+ input_bfd,
sym_name,
howto->name,
name);
@@ -5541,10 +6484,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
ret = FALSE;
continue;
}
- sh = htab->sdata2->sym_hash;
+ sh = htab->sdata[1].sym;
addend -= (sh->root.u.def.value
- + sh->root.u.def.section->output_section->vma
- + sh->root.u.def.section->output_offset);
+ + sh->root.u.def.section->output_offset
+ + sh->root.u.def.section->output_section->vma);
}
break;
@@ -5553,8 +6496,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
case R_PPC_EMB_RELSDA:
{
const char *name;
- const struct elf_link_hash_entry *sh;
int reg;
+ struct elf_link_hash_entry *sh;
BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
@@ -5564,20 +6507,20 @@ ppc_elf_relocate_section (bfd *output_bfd,
&& (name[5] == 0 || name[5] == '.'))))
{
reg = 13;
- sh = htab->sdata->sym_hash;
+ sh = htab->sdata[0].sym;
addend -= (sh->root.u.def.value
- + sh->root.u.def.section->output_section->vma
- + sh->root.u.def.section->output_offset);
+ + sh->root.u.def.section->output_offset
+ + sh->root.u.def.section->output_section->vma);
}
else if (strncmp (name, ".sdata2", 7) == 0
|| strncmp (name, ".sbss2", 6) == 0)
{
reg = 2;
- sh = htab->sdata2->sym_hash;
+ sh = htab->sdata[1].sym;
addend -= (sh->root.u.def.value
- + sh->root.u.def.section->output_section->vma
- + sh->root.u.def.section->output_offset);
+ + sh->root.u.def.section->output_offset
+ + sh->root.u.def.section->output_section->vma);
}
else if (strcmp (name, ".PPC.EMB.sdata0") == 0
@@ -5589,9 +6532,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
else
{
(*_bfd_error_handler)
- (_("%s: the target (%s) of a %s relocation is "
+ (_("%B: the target (%s) of a %s relocation is "
"in the wrong output section (%s)"),
- bfd_archive_filename (input_bfd),
+ input_bfd,
sym_name,
howto->name,
name);
@@ -5644,8 +6587,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
case R_PPC_EMB_RELST_HA:
case R_PPC_EMB_BIT_FLD:
(*_bfd_error_handler)
- (_("%s: relocation %s is not yet supported for symbol %s."),
- bfd_archive_filename (input_bfd),
+ (_("%B: relocation %s is not yet supported for symbol %s."),
+ input_bfd,
howto->name,
sym_name);
@@ -5661,6 +6604,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
break;
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:
@@ -5696,12 +6640,12 @@ ppc_elf_relocate_section (bfd *output_bfd,
if (unresolved_reloc
&& !((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
+ && h->def_dynamic))
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name,
sym_name);
@@ -5718,8 +6662,6 @@ ppc_elf_relocate_section (bfd *output_bfd,
if (r != bfd_reloc_ok)
{
- if (sym_name == NULL)
- sym_name = "(null)";
if (r == bfd_reloc_overflow)
{
if (warned)
@@ -5738,6 +6680,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
if (! (*info->callbacks->reloc_overflow) (info,
+ (h ? &h->root : NULL),
sym_name,
howto->name,
rel->r_addend,
@@ -5749,9 +6692,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): %s reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): %s reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, howto->name, sym_name, (int) r);
ret = FALSE;
}
@@ -5764,388 +6706,723 @@ ppc_elf_relocate_section (bfd *output_bfd,
return ret;
}
-
-static enum elf_reloc_type_class
-ppc_elf_reloc_type_class (const Elf_Internal_Rela *rela)
-{
- switch (ELF32_R_TYPE (rela->r_info))
- {
- case R_PPC_RELATIVE:
- return reloc_class_relative;
- case R_PPC_REL24:
- case R_PPC_ADDR24:
- case R_PPC_JMP_SLOT:
- return reloc_class_plt;
- case R_PPC_COPY:
- return reloc_class_copy;
- default:
- return reloc_class_normal;
- }
-}
-/* Support for core dump NOTE sections. */
+#define PPC_LO(v) ((v) & 0xffff)
+#define PPC_HI(v) (((v) >> 16) & 0xffff)
+#define PPC_HA(v) PPC_HI ((v) + 0x8000)
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
static bfd_boolean
-ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+ppc_elf_finish_dynamic_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
- int offset;
- unsigned int raw_size;
-
- switch (note->descsz)
- {
- default:
- return FALSE;
-
- case 268: /* Linux/PPC. */
- /* pr_cursig */
- elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+ struct ppc_elf_link_hash_table *htab;
+ struct plt_entry *ent;
+ bfd_boolean doneone;
- /* pr_pid */
- elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
+#ifdef DEBUG
+ fprintf (stderr, "ppc_elf_finish_dynamic_symbol called for %s",
+ h->root.root.string);
+#endif
- /* pr_reg */
- offset = 72;
- raw_size = 192;
+ htab = ppc_elf_hash_table (info);
+ BFD_ASSERT (htab->elf.dynobj != NULL);
- break;
- }
+ doneone = FALSE;
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->plt.offset != (bfd_vma) -1)
+ {
+ if (!doneone)
+ {
+ Elf_Internal_Rela rela;
+ bfd_byte *loc;
+ bfd_vma reloc_index;
- /* Make a ".reg/999" section. */
- return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
-}
+ if (htab->plt_type == PLT_NEW)
+ reloc_index = ent->plt.offset / 4;
+ else
+ {
+ reloc_index = ((ent->plt.offset - htab->plt_initial_entry_size)
+ / htab->plt_slot_size);
+ if (reloc_index > PLT_NUM_SINGLE_ENTRIES
+ && htab->plt_type == PLT_OLD)
+ reloc_index -= (reloc_index - PLT_NUM_SINGLE_ENTRIES) / 2;
+ }
-static bfd_boolean
-ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
-{
- switch (note->descsz)
- {
- default:
- return FALSE;
+ /* This symbol has an entry in the procedure linkage table.
+ Set it up. */
+ if (htab->plt_type == PLT_VXWORKS)
+ {
+ bfd_vma got_offset;
+ const bfd_vma *plt_entry;
+
+ /* The first three entries in .got.plt are reserved. */
+ got_offset = (reloc_index + 3) * 4;
- case 128: /* Linux/PPC elf_prpsinfo. */
- elf_tdata (abfd)->core_program
- = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
- elf_tdata (abfd)->core_command
- = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
- }
+ /* Use the right PLT. */
+ plt_entry = info->shared ? ppc_elf_vxworks_pic_plt_entry
+ : ppc_elf_vxworks_plt_entry;
- /* 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. */
+ /* Fill in the .plt on VxWorks. */
+ if (info->shared)
+ {
+ bfd_vma got_offset_hi = (got_offset >> 16)
+ + ((got_offset & 0x8000) >> 15);
+
+ bfd_put_32 (output_bfd,
+ plt_entry[0] | (got_offset_hi & 0xffff),
+ htab->plt->contents + ent->plt.offset + 0);
+ bfd_put_32 (output_bfd,
+ plt_entry[1] | (got_offset & 0xffff),
+ htab->plt->contents + ent->plt.offset + 4);
+ }
+ else
+ {
+ bfd_vma got_loc
+ = (got_offset
+ + htab->elf.hgot->root.u.def.value
+ + htab->elf.hgot->root.u.def.section->output_offset
+ + htab->elf.hgot->root.u.def.section->output_section->vma);
+ bfd_vma got_loc_hi = (got_loc >> 16)
+ + ((got_loc & 0x8000) >> 15);
+
+ bfd_put_32 (output_bfd,
+ plt_entry[0] | (got_loc_hi & 0xffff),
+ htab->plt->contents + ent->plt.offset + 0);
+ bfd_put_32 (output_bfd,
+ plt_entry[1] | (got_loc & 0xffff),
+ htab->plt->contents + ent->plt.offset + 4);
+ }
- {
- char *command = elf_tdata (abfd)->core_command;
- int n = strlen (command);
+ bfd_put_32 (output_bfd, plt_entry[2],
+ htab->plt->contents + ent->plt.offset + 8);
+ bfd_put_32 (output_bfd, plt_entry[3],
+ htab->plt->contents + ent->plt.offset + 12);
+
+ /* This instruction is an immediate load. The value loaded is
+ the byte offset of the R_PPC_JMP_SLOT relocation from the
+ start of the .rela.plt section. The value is stored in the
+ low-order 16 bits of the load instruction. */
+ /* NOTE: It appears that this is now an index rather than a
+ prescaled offset. */
+ bfd_put_32 (output_bfd,
+ plt_entry[4] | reloc_index,
+ htab->plt->contents + ent->plt.offset + 16);
+ /* This instruction is a PC-relative branch whose target is
+ the start of the PLT section. The address of this branch
+ instruction is 20 bytes beyond the start of this PLT entry.
+ The address is encoded in bits 6-29, inclusive. The value
+ stored is right-shifted by two bits, permitting a 26-bit
+ offset. */
+ bfd_put_32 (output_bfd,
+ (plt_entry[5]
+ | (-(ent->plt.offset + 20) & 0x03fffffc)),
+ htab->plt->contents + ent->plt.offset + 20);
+ bfd_put_32 (output_bfd, plt_entry[6],
+ htab->plt->contents + ent->plt.offset + 24);
+ bfd_put_32 (output_bfd, plt_entry[7],
+ htab->plt->contents + ent->plt.offset + 28);
+
+ /* Fill in the GOT entry corresponding to this PLT slot with
+ the address immediately after the the "bctr" instruction
+ in this PLT entry. */
+ bfd_put_32 (output_bfd, (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + ent->plt.offset + 16),
+ htab->sgotplt->contents + got_offset);
+
+ if (!info->shared)
+ {
+ /* Fill in a couple of entries in .rela.plt.unloaded. */
+ loc = htab->srelplt2->contents
+ + ((VXWORKS_PLTRESOLVE_RELOCS + reloc_index
+ * VXWORKS_PLT_NON_JMP_SLOT_RELOCS)
+ * sizeof (Elf32_External_Rela));
+
+ /* Provide the @ha relocation for the first instruction. */
+ rela.r_offset = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + ent->plt.offset + 2);
+ rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx,
+ R_PPC_ADDR16_HA);
+ rela.r_addend = got_offset;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Provide the @l relocation for the second instruction. */
+ rela.r_offset = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + ent->plt.offset + 6);
+ rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx,
+ R_PPC_ADDR16_LO);
+ rela.r_addend = got_offset;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Provide a relocation for the GOT entry corresponding to this
+ PLT slot. Point it at the middle of the .plt entry. */
+ rela.r_offset = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + got_offset);
+ rela.r_info = ELF32_R_INFO (htab->elf.hplt->indx,
+ R_PPC_ADDR32);
+ rela.r_addend = ent->plt.offset + 16;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ }
- if (0 < n && command[n - 1] == ' ')
- command[n - 1] = '\0';
- }
+ /* VxWorks uses non-standard semantics for R_PPC_JMP_SLOT.
+ In particular, the offset for the relocation is not the
+ address of the PLT entry for this function, as specified
+ by the ABI. Instead, the offset is set to the address of
+ the GOT slot for this function. See EABI 4.4.4.1. */
+ rela.r_offset = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + got_offset);
- return TRUE;
-}
-
-/* Very simple linked list structure for recording apuinfo values. */
-typedef struct apuinfo_list
-{
- struct apuinfo_list *next;
- unsigned long value;
-}
-apuinfo_list;
+ }
+ else
+ {
+ rela.r_offset = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + ent->plt.offset);
+ if (htab->plt_type == PLT_OLD)
+ {
+ /* We don't need to fill in the .plt. The ppc dynamic
+ linker will fill it in. */
+ }
+ else
+ {
+ bfd_vma val = (htab->glink_pltresolve + ent->plt.offset
+ + htab->glink->output_section->vma
+ + htab->glink->output_offset);
+ bfd_put_32 (output_bfd, val,
+ htab->plt->contents + ent->plt.offset);
+ }
+ }
-static apuinfo_list *head;
+ /* Fill in the entry in the .rela.plt section. */
+ rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_JMP_SLOT);
+ rela.r_addend = 0;
+ loc = (htab->relplt->contents
+ + reloc_index * sizeof (Elf32_External_Rela));
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
-static void
-apuinfo_list_init (void)
-{
- head = NULL;
-}
+ if (!h->def_regular)
+ {
+ /* Mark the symbol as undefined, rather than as defined in
+ the .plt section. Leave the value alone. */
+ sym->st_shndx = SHN_UNDEF;
+ /* If the symbol is weak, we do need to clear the value.
+ Otherwise, the PLT entry would provide a definition for
+ the symbol even if the symbol wasn't defined anywhere,
+ and so the symbol would never be NULL. */
+ if (!h->ref_regular_nonweak)
+ sym->st_value = 0;
+ }
+ doneone = TRUE;
+ }
-static void
-apuinfo_list_add (unsigned long value)
-{
- apuinfo_list *entry = head;
+ if (htab->plt_type == PLT_NEW)
+ {
+ bfd_vma plt;
+ unsigned char *p;
- while (entry != NULL)
- {
- if (entry->value == value)
- return;
- entry = entry->next;
- }
+ plt = (ent->plt.offset
+ + htab->plt->output_section->vma
+ + htab->plt->output_offset);
+ p = (unsigned char *) htab->glink->contents + ent->glink_offset;
- entry = bfd_malloc (sizeof (* entry));
- if (entry == NULL)
- return;
+ if (info->shared || info->pie)
+ {
+ bfd_vma got = 0;
- entry->value = value;
- entry->next = head;
- head = entry;
-}
+ if (ent->addend >= 32768)
+ got = (ent->addend
+ + ent->sec->output_section->vma
+ + ent->sec->output_offset);
+ else if (htab->elf.hgot != NULL)
+ got = (htab->elf.hgot->root.u.def.value
+ + htab->elf.hgot->root.u.def.section->output_section->vma
+ + htab->elf.hgot->root.u.def.section->output_offset);
-static unsigned
-apuinfo_list_length (void)
-{
- apuinfo_list *entry;
- unsigned long count;
+ plt -= got;
- for (entry = head, count = 0;
- entry;
- entry = entry->next)
- ++ count;
+ if (plt + 0x8000 < 0x10000)
+ {
+ bfd_put_32 (output_bfd, LWZ_11_30 + PPC_LO (plt), p);
+ p += 4;
+ bfd_put_32 (output_bfd, MTCTR_11, p);
+ p += 4;
+ bfd_put_32 (output_bfd, BCTR, p);
+ p += 4;
+ bfd_put_32 (output_bfd, NOP, p);
+ p += 4;
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, ADDIS_11_30 + PPC_HA (plt), p);
+ p += 4;
+ bfd_put_32 (output_bfd, LWZ_11_11 + PPC_LO (plt), p);
+ p += 4;
+ bfd_put_32 (output_bfd, MTCTR_11, p);
+ p += 4;
+ bfd_put_32 (output_bfd, BCTR, p);
+ p += 4;
+ }
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, LIS_11 + PPC_HA (plt), p);
+ p += 4;
+ bfd_put_32 (output_bfd, LWZ_11_11 + PPC_LO (plt), p);
+ p += 4;
+ bfd_put_32 (output_bfd, MTCTR_11, p);
+ p += 4;
+ bfd_put_32 (output_bfd, BCTR, p);
+ p += 4;
+
+ /* We only need one non-PIC glink stub. */
+ break;
+ }
+ }
+ else
+ break;
+ }
- return count;
-}
+ if (h->needs_copy)
+ {
+ asection *s;
+ Elf_Internal_Rela rela;
+ bfd_byte *loc;
-static inline unsigned long
-apuinfo_list_element (unsigned long number)
-{
- apuinfo_list * entry;
+ /* This symbols needs a copy reloc. Set it up. */
- for (entry = head;
- entry && number --;
- entry = entry->next)
- ;
+#ifdef DEBUG
+ fprintf (stderr, ", copy");
+#endif
- return entry ? entry->value : 0;
-}
+ BFD_ASSERT (h->dynindx != -1);
-static void
-apuinfo_list_finish (void)
-{
- apuinfo_list *entry;
+ if (ppc_elf_hash_entry (h)->has_sda_refs)
+ s = htab->relsbss;
+ else
+ s = htab->relbss;
+ BFD_ASSERT (s != NULL);
- for (entry = head; entry;)
- {
- apuinfo_list *next = entry->next;
- free (entry);
- entry = next;
+ rela.r_offset = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_COPY);
+ rela.r_addend = 0;
+ loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela);
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
}
- head = NULL;
-}
-
-#define APUINFO_SECTION_NAME ".PPC.EMB.apuinfo"
-#define APUINFO_LABEL "APUinfo"
+#ifdef DEBUG
+ fprintf (stderr, "\n");
+#endif
-/* Scan the input BFDs and create a linked list of
- the APUinfo values that will need to be emitted. */
+ /* Mark some specially defined symbols as absolute. */
+ if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ || (!htab->is_vxworks
+ && (h == htab->elf.hgot
+ || strcmp (h->root.root.string,
+ "_PROCEDURE_LINKAGE_TABLE_") == 0)))
+ sym->st_shndx = SHN_ABS;
-static void
-ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info)
+ return TRUE;
+}
+
+static enum elf_reloc_type_class
+ppc_elf_reloc_type_class (const Elf_Internal_Rela *rela)
{
- bfd *ibfd;
- asection *asec;
- char *buffer;
- unsigned num_input_sections;
- bfd_size_type output_section_size;
- unsigned i;
- unsigned num_entries;
- unsigned long offset;
- unsigned long length;
- const char *error_message = NULL;
-
- if (link_info == NULL)
- return;
-
- /* Scan the input bfds, looking for apuinfo sections. */
- num_input_sections = 0;
- output_section_size = 0;
-
- for (ibfd = link_info->input_bfds; ibfd; ibfd = ibfd->link_next)
+ switch (ELF32_R_TYPE (rela->r_info))
{
- asec = bfd_get_section_by_name (ibfd, APUINFO_SECTION_NAME);
- if (asec)
- {
- ++ num_input_sections;
- output_section_size += asec->_raw_size;
- }
+ case R_PPC_RELATIVE:
+ return reloc_class_relative;
+ case R_PPC_REL24:
+ case R_PPC_ADDR24:
+ case R_PPC_JMP_SLOT:
+ return reloc_class_plt;
+ case R_PPC_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
}
+}
+
+/* Finish up the dynamic sections. */
- /* We need at least one input sections
- in order to make merging worthwhile. */
- if (num_input_sections < 1)
- return;
+static bfd_boolean
+ppc_elf_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
+{
+ asection *sdyn;
+ asection *splt;
+ struct ppc_elf_link_hash_table *htab;
+ bfd_vma got;
+ bfd * dynobj;
- /* Just make sure that the output section exists as well. */
- asec = bfd_get_section_by_name (abfd, APUINFO_SECTION_NAME);
- if (asec == NULL)
- return;
+#ifdef DEBUG
+ fprintf (stderr, "ppc_elf_finish_dynamic_sections called\n");
+#endif
- /* Allocate a buffer for the contents of the input sections. */
- buffer = bfd_malloc (output_section_size);
- if (buffer == NULL)
- return;
+ htab = ppc_elf_hash_table (info);
+ dynobj = elf_hash_table (info)->dynobj;
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+ if (htab->is_vxworks)
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ else
+ splt = NULL;
- offset = 0;
- apuinfo_list_init ();
+ got = 0;
+ if (htab->elf.hgot != NULL)
+ got = (htab->elf.hgot->root.u.def.value
+ + htab->elf.hgot->root.u.def.section->output_section->vma
+ + htab->elf.hgot->root.u.def.section->output_offset);
- /* Read in the input sections contents. */
- for (ibfd = link_info->input_bfds; ibfd; ibfd = ibfd->link_next)
+ if (htab->elf.dynamic_sections_created)
{
- unsigned long datum;
- char *ptr;
-
- asec = bfd_get_section_by_name (ibfd, APUINFO_SECTION_NAME);
- if (asec == NULL)
- continue;
+ Elf32_External_Dyn *dyncon, *dynconend;
- length = asec->_raw_size;
- if (length < 24)
- {
- error_message = _("corrupt or empty %s section in %s");
- goto fail;
- }
+ BFD_ASSERT (htab->plt != NULL && sdyn != NULL);
- if (bfd_seek (ibfd, asec->filepos, SEEK_SET) != 0
- || (bfd_bread (buffer + offset, length, ibfd) != length))
+ dyncon = (Elf32_External_Dyn *) sdyn->contents;
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
+ for (; dyncon < dynconend; dyncon++)
{
- error_message = _("unable to read in %s section from %s");
- goto fail;
- }
+ Elf_Internal_Dyn dyn;
+ asection *s;
- /* Process the contents of the section. */
- ptr = buffer + offset;
- error_message = _("corrupt %s section in %s");
+ bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
- /* Verify the contents of the header. Note - we have to
- extract the values this way in order to allow for a
- host whose endian-ness is different from the target. */
- datum = bfd_get_32 (ibfd, ptr);
- if (datum != sizeof APUINFO_LABEL)
- goto fail;
+ switch (dyn.d_tag)
+ {
+ case DT_PLTGOT:
+ if (htab->is_vxworks)
+ s = htab->sgotplt;
+ else
+ s = htab->plt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+ break;
- datum = bfd_get_32 (ibfd, ptr + 8);
- if (datum != 0x2)
- goto fail;
+ case DT_PLTRELSZ:
+ dyn.d_un.d_val = htab->relplt->size;
+ break;
- if (strcmp (ptr + 12, APUINFO_LABEL) != 0)
- goto fail;
+ case DT_JMPREL:
+ s = htab->relplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+ break;
- /* Get the number of bytes used for apuinfo entries. */
- datum = bfd_get_32 (ibfd, ptr + 4);
- if (datum + 20 != length)
- goto fail;
+ case DT_PPC_GOT:
+ dyn.d_un.d_ptr = got;
+ break;
- /* Make sure that we do not run off the end of the section. */
- if (offset + length > output_section_size)
- goto fail;
+ case DT_RELASZ:
+ if (htab->is_vxworks)
+ {
+ if (htab->relplt)
+ dyn.d_un.d_ptr -= htab->relplt->size;
+ break;
+ }
+ continue;
- /* Scan the apuinfo section, building a list of apuinfo numbers. */
- for (i = 0; i < datum; i += 4)
- apuinfo_list_add (bfd_get_32 (ibfd, ptr + 20 + i));
+ default:
+ continue;
+ }
- /* Update the offset. */
- offset += length;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
}
- error_message = NULL;
-
- /* Compute the size of the output section. */
- num_entries = apuinfo_list_length ();
- output_section_size = 20 + num_entries * 4;
-
- asec = bfd_get_section_by_name (abfd, APUINFO_SECTION_NAME);
-
- if (! bfd_set_section_size (abfd, asec, output_section_size))
- ibfd = abfd,
- error_message = _("warning: unable to set size of %s section in %s");
-
- fail:
- free (buffer);
-
- if (error_message)
- (*_bfd_error_handler) (error_message, APUINFO_SECTION_NAME,
- bfd_archive_filename (ibfd));
-}
-
-
-/* Prevent the output section from accumulating the input sections'
- contents. We have already stored this in our linked list structure. */
-
-static bfd_boolean
-ppc_elf_write_section (bfd *abfd ATTRIBUTE_UNUSED,
- asection *asec,
- bfd_byte *contents ATTRIBUTE_UNUSED)
-{
- return (apuinfo_list_length ()
- && strcmp (asec->name, APUINFO_SECTION_NAME) == 0);
-}
-
-
-/* Finally we can generate the output section. */
-
-static void
-ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
-{
- bfd_byte *buffer;
- asection *asec;
- unsigned i;
- unsigned num_entries;
- bfd_size_type length;
-
- asec = bfd_get_section_by_name (abfd, APUINFO_SECTION_NAME);
- if (asec == NULL)
- return;
+ /* Add a blrl instruction at _GLOBAL_OFFSET_TABLE_-4 so that a function can
+ easily find the address of the _GLOBAL_OFFSET_TABLE_. */
+ if (htab->got != NULL)
+ {
+ unsigned char *p = htab->got->contents;
+ bfd_vma val;
- if (apuinfo_list_length () == 0)
- return;
+ p += htab->elf.hgot->root.u.def.value;
+ if (htab->plt_type == PLT_OLD)
+ bfd_put_32 (output_bfd, 0x4e800021 /* blrl */, p - 4);
- length = asec->_raw_size;
- if (length < 20)
- return;
+ val = 0;
+ if (sdyn != NULL)
+ val = sdyn->output_section->vma + sdyn->output_offset;
+ bfd_put_32 (output_bfd, val, p);
- buffer = bfd_malloc (length);
- if (buffer == NULL)
- {
- (*_bfd_error_handler)
- (_("failed to allocate space for new APUinfo section."));
- return;
+ elf_section_data (htab->got->output_section)->this_hdr.sh_entsize = 4;
}
- /* Create the apuinfo header. */
- num_entries = apuinfo_list_length ();
- bfd_put_32 (abfd, sizeof APUINFO_LABEL, buffer);
- bfd_put_32 (abfd, num_entries * 4, buffer + 4);
- bfd_put_32 (abfd, 0x2, buffer + 8);
- strcpy (buffer + 12, APUINFO_LABEL);
-
- length = 20;
- for (i = 0; i < num_entries; i++)
+ /* Fill in the first entry in the VxWorks procedure linkage table. */
+ if (splt && splt->size > 0)
{
- bfd_put_32 (abfd, apuinfo_list_element (i), buffer + length);
- length += 4;
+ /* Use the right PLT. */
+ static const bfd_vma *plt_entry = NULL;
+ plt_entry = info->shared ?
+ ppc_elf_vxworks_pic_plt0_entry : ppc_elf_vxworks_plt0_entry;
+
+ if (!info->shared)
+ {
+ bfd_vma got_value =
+ (htab->elf.hgot->root.u.def.section->output_section->vma
+ + htab->elf.hgot->root.u.def.section->output_offset
+ + htab->elf.hgot->root.u.def.value);
+ bfd_vma got_hi = (got_value >> 16) + ((got_value & 0x8000) >> 15);
+
+ bfd_put_32 (output_bfd, plt_entry[0] | (got_hi & 0xffff),
+ splt->contents + 0);
+ bfd_put_32 (output_bfd, plt_entry[1] | (got_value & 0xffff),
+ splt->contents + 4);
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, plt_entry[0], splt->contents + 0);
+ bfd_put_32 (output_bfd, plt_entry[1], splt->contents + 4);
+ }
+ bfd_put_32 (output_bfd, plt_entry[2], splt->contents + 8);
+ bfd_put_32 (output_bfd, plt_entry[3], splt->contents + 12);
+ bfd_put_32 (output_bfd, plt_entry[4], splt->contents + 16);
+ bfd_put_32 (output_bfd, plt_entry[5], splt->contents + 20);
+ bfd_put_32 (output_bfd, plt_entry[6], splt->contents + 24);
+ bfd_put_32 (output_bfd, plt_entry[7], splt->contents + 28);
+
+ if (! info->shared)
+ {
+ Elf_Internal_Rela rela;
+ bfd_byte *loc;
+
+ loc = htab->srelplt2->contents;
+
+ /* Output the @ha relocation for the first instruction. */
+ rela.r_offset = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + 2);
+ rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_HA);
+ rela.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Output the @l relocation for the second instruction. */
+ rela.r_offset = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + 6);
+ rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_LO);
+ rela.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Fix up the remaining relocations. They may have the wrong
+ symbol index for _G_O_T_ or _P_L_T_ depending on the order
+ in which symbols were output. */
+ while (loc < htab->srelplt2->contents + htab->srelplt2->size)
+ {
+ Elf_Internal_Rela rel;
+
+ bfd_elf32_swap_reloc_in (output_bfd, loc, &rel);
+ rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_HA);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ bfd_elf32_swap_reloc_in (output_bfd, loc, &rel);
+ rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_LO);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ bfd_elf32_swap_reloc_in (output_bfd, loc, &rel);
+ rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_PPC_ADDR32);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
+ loc += sizeof (Elf32_External_Rela);
+ }
+ }
}
- if (length != asec->_raw_size)
- (*_bfd_error_handler) (_("failed to compute new APUinfo section."));
+ if (htab->glink != NULL && htab->glink->contents != NULL)
+ {
+ unsigned char *p;
+ unsigned char *endp;
+ bfd_vma res0;
+ unsigned int i;
+
+ /*
+ * PIC glink code is the following:
+ *
+ * # ith PLT code stub.
+ * addis 11,30,(plt+(i-1)*4-got)@ha
+ * lwz 11,(plt+(i-1)*4-got)@l(11)
+ * mtctr 11
+ * bctr
+ *
+ * # A table of branches, one for each plt entry.
+ * # The idea is that the plt call stub loads ctr (and r11) with these
+ * # addresses, so (r11 - res_0) gives the plt index * 4.
+ * res_0: b PLTresolve
+ * res_1: b PLTresolve
+ * .
+ * # Some number of entries towards the end can be nops
+ * res_n_m3: nop
+ * res_n_m2: nop
+ * res_n_m1:
+ *
+ * PLTresolve:
+ * addis 11,11,(1f-res_0)@ha
+ * mflr 0
+ * bcl 20,31,1f
+ * 1: addi 11,11,(1b-res_0)@l
+ * mflr 12
+ * mtlr 0
+ * sub 11,11,12 # r11 = index * 4
+ * addis 12,12,(got+4-1b)@ha
+ * lwz 0,(got+4-1b)@l(12) # got[1] address of dl_runtime_resolve
+ * lwz 12,(got+8-1b)@l(12) # got[2] contains the map address
+ * mtctr 0
+ * add 0,11,11
+ * add 11,0,11 # r11 = index * 12 = reloc offset.
+ * bctr
+ */
+ static const unsigned int pic_plt_resolve[] =
+ {
+ ADDIS_11_11,
+ MFLR_0,
+ BCL_20_31,
+ ADDI_11_11,
+ MFLR_12,
+ MTLR_0,
+ SUB_11_11_12,
+ ADDIS_12_12,
+ LWZ_0_12,
+ LWZ_12_12,
+ MTCTR_0,
+ ADD_0_11_11,
+ ADD_11_0_11,
+ BCTR,
+ NOP,
+ NOP
+ };
+
+ static const unsigned int plt_resolve[] =
+ {
+ LIS_12,
+ ADDIS_11_11,
+ LWZ_0_12,
+ ADDI_11_11,
+ MTCTR_0,
+ ADD_0_11_11,
+ LWZ_12_12,
+ ADD_11_0_11,
+ BCTR,
+ NOP,
+ NOP,
+ NOP,
+ NOP,
+ NOP,
+ NOP,
+ NOP
+ };
+
+ if (ARRAY_SIZE (pic_plt_resolve) != GLINK_PLTRESOLVE / 4)
+ abort ();
+ if (ARRAY_SIZE (plt_resolve) != GLINK_PLTRESOLVE / 4)
+ abort ();
- if (! bfd_set_section_contents (abfd, asec, buffer, (file_ptr) 0, length))
- (*_bfd_error_handler) (_("failed to install new APUinfo section."));
+ /* Build the branch table, one for each plt entry (less one),
+ and perhaps some padding. */
+ p = htab->glink->contents;
+ p += htab->glink_pltresolve;
+ endp = htab->glink->contents;
+ endp += htab->glink->size - GLINK_PLTRESOLVE;
+ while (p < endp - 8 * 4)
+ {
+ bfd_put_32 (output_bfd, B + endp - p, p);
+ p += 4;
+ }
+ while (p < endp)
+ {
+ bfd_put_32 (output_bfd, NOP, p);
+ p += 4;
+ }
- free (buffer);
+ res0 = (htab->glink_pltresolve
+ + htab->glink->output_section->vma
+ + htab->glink->output_offset);
- apuinfo_list_finish ();
-}
+ /* Last comes the PLTresolve stub. */
+ if (info->shared || info->pie)
+ {
+ bfd_vma bcl;
-/* Add extra PPC sections -- Note, for now, make .sbss2 and
- .PPC.EMB.sbss0 a normal section, and not a bss section so
- that the linker doesn't crater when trying to make more than
- 2 sections. */
+ for (i = 0; i < ARRAY_SIZE (pic_plt_resolve); i++)
+ {
+ bfd_put_32 (output_bfd, pic_plt_resolve[i], p);
+ p += 4;
+ }
+ p -= 4 * ARRAY_SIZE (pic_plt_resolve);
+
+ bcl = (htab->glink->size - GLINK_PLTRESOLVE + 3*4
+ + htab->glink->output_section->vma
+ + htab->glink->output_offset);
+
+ bfd_put_32 (output_bfd,
+ ADDIS_11_11 + PPC_HA (bcl - res0), p + 0*4);
+ bfd_put_32 (output_bfd,
+ ADDI_11_11 + PPC_LO (bcl - res0), p + 3*4);
+ bfd_put_32 (output_bfd,
+ ADDIS_12_12 + PPC_HA (got + 4 - bcl), p + 7*4);
+ if (PPC_HA (got + 4 - bcl) == PPC_HA (got + 8 - bcl))
+ {
+ bfd_put_32 (output_bfd,
+ LWZ_0_12 + PPC_LO (got + 4 - bcl), p + 8*4);
+ bfd_put_32 (output_bfd,
+ LWZ_12_12 + PPC_LO (got + 8 - bcl), p + 9*4);
+ }
+ else
+ {
+ bfd_put_32 (output_bfd,
+ LWZU_0_12 + PPC_LO (got + 4 - bcl), p + 8*4);
+ bfd_put_32 (output_bfd,
+ LWZ_12_12 + 4, p + 9*4);
+ }
+ }
+ else
+ {
+ for (i = 0; i < ARRAY_SIZE (plt_resolve); i++)
+ {
+ bfd_put_32 (output_bfd, plt_resolve[i], p);
+ p += 4;
+ }
+ p -= 4 * ARRAY_SIZE (plt_resolve);
+
+ bfd_put_32 (output_bfd,
+ LIS_12 + PPC_HA (got + 4), p + 0*4);
+ bfd_put_32 (output_bfd,
+ ADDIS_11_11 + PPC_HA (-res0), p + 1*4);
+ bfd_put_32 (output_bfd,
+ ADDI_11_11 + PPC_LO (-res0), p + 3*4);
+ if (PPC_HA (got + 4) == PPC_HA (got + 8))
+ {
+ bfd_put_32 (output_bfd,
+ LWZ_0_12 + PPC_LO (got + 4), p + 2*4);
+ bfd_put_32 (output_bfd,
+ LWZ_12_12 + PPC_LO (got + 8), p + 6*4);
+ }
+ else
+ {
+ bfd_put_32 (output_bfd,
+ LWZU_0_12 + PPC_LO (got + 4), p + 2*4);
+ bfd_put_32 (output_bfd,
+ LWZ_12_12 + 4, p + 6*4);
+ }
+ }
+ }
-static struct bfd_elf_special_section const ppc_elf_special_sections[]=
-{
- { ".tags", 5, 0, SHT_ORDERED, SHF_ALLOC },
- { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".sdata2", 7, -2, SHT_PROGBITS, SHF_ALLOC },
- { ".sbss2", 6, -2, SHT_PROGBITS, SHF_ALLOC },
- { ".PPC.EMB.apuinfo", 16, 0, SHT_NOTE, 0 },
- { ".PPC.EMB.sdata0", 15, 0, SHT_PROGBITS, SHF_ALLOC },
- { ".PPC.EMB.sbss0", 14, 0, SHT_PROGBITS, SHF_ALLOC },
- { ".plt", 4, 0, SHT_NOBITS, SHF_ALLOC + SHF_EXECINSTR },
- { NULL, 0, 0, 0, 0 }
-};
+ return TRUE;
+}
#define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec
#define TARGET_LITTLE_NAME "elf32-powerpcle"
@@ -6158,6 +7435,7 @@ static struct bfd_elf_special_section const ppc_elf_special_sections[]=
#else
#define ELF_MAXPAGESIZE 0x10000
#endif
+#define ELF_MINPAGESIZE 0x1000
#define elf_info_to_howto ppc_elf_info_to_howto
#ifdef EM_CYGNUS_POWERPC
@@ -6169,10 +7447,8 @@ static struct bfd_elf_special_section const ppc_elf_special_sections[]=
#endif
#define elf_backend_plt_not_loaded 1
-#define elf_backend_got_symbol_offset 4
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
-#define elf_backend_got_header_size 12
#define elf_backend_rela_normal 1
#define bfd_elf32_mkobject ppc_elf_mkobject
@@ -6197,13 +7473,121 @@ static struct bfd_elf_special_section const ppc_elf_special_sections[]=
#define elf_backend_finish_dynamic_sections ppc_elf_finish_dynamic_sections
#define elf_backend_fake_sections ppc_elf_fake_sections
#define elf_backend_additional_program_headers ppc_elf_additional_program_headers
-#define elf_backend_modify_segment_map ppc_elf_modify_segment_map
#define elf_backend_grok_prstatus ppc_elf_grok_prstatus
#define elf_backend_grok_psinfo ppc_elf_grok_psinfo
#define elf_backend_reloc_type_class ppc_elf_reloc_type_class
#define elf_backend_begin_write_processing ppc_elf_begin_write_processing
#define elf_backend_final_write_processing ppc_elf_final_write_processing
#define elf_backend_write_section ppc_elf_write_section
-#define elf_backend_special_sections ppc_elf_special_sections
+#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
+
+#include "elf32-target.h"
+
+/* VxWorks Target */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_powerpc_vxworks_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-powerpc-vxworks"
+
+/* VxWorks uses the elf default section flags for .plt. */
+static const struct bfd_elf_special_section *
+ppc_elf_vxworks_get_sec_type_attr (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
+{
+ if (sec->name == NULL)
+ return NULL;
+
+ if (strcmp (sec->name, ".plt") == 0)
+ return _bfd_elf_get_sec_type_attr (abfd, sec);
+
+ return ppc_elf_get_sec_type_attr (abfd, sec);
+}
+
+/* Like ppc_elf_link_hash_table_create, but overrides
+ appropriately for VxWorks. */
+static struct bfd_link_hash_table *
+ppc_elf_vxworks_link_hash_table_create (bfd *abfd)
+{
+ struct bfd_link_hash_table *ret;
+
+ ret = ppc_elf_link_hash_table_create (abfd);
+ if (ret)
+ {
+ struct ppc_elf_link_hash_table *htab
+ = (struct ppc_elf_link_hash_table *)ret;
+ htab->is_vxworks = 1;
+ htab->plt_type = PLT_VXWORKS;
+ htab->plt_entry_size = VXWORKS_PLT_ENTRY_SIZE;
+ htab->plt_slot_size = VXWORKS_PLT_ENTRY_SIZE;
+ htab->plt_initial_entry_size = VXWORKS_PLT_INITIAL_ENTRY_SIZE;
+ }
+ return ret;
+}
+
+/* Tweak magic VxWorks symbols as they are loaded. */
+static bfd_boolean
+ppc_elf_vxworks_add_symbol_hook (bfd *abfd,
+ struct bfd_link_info *info,
+ Elf_Internal_Sym *sym,
+ const char **namep ATTRIBUTE_UNUSED,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp,
+ bfd_vma *valp)
+{
+ if (!elf_vxworks_add_symbol_hook(abfd, info, sym,namep, flagsp, secp,
+ valp))
+ return FALSE;
+
+ return ppc_elf_add_symbol_hook(abfd, info, sym,namep, flagsp, secp, valp);
+}
+
+static void
+ppc_elf_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+{
+ ppc_elf_final_write_processing(abfd, linker);
+ elf_vxworks_final_write_processing(abfd, linker);
+}
+
+/* On VxWorks, we emit relocations against _PROCEDURE_LINKAGE_TABLE_, so
+ define it. */
+#undef elf_backend_want_plt_sym
+#define elf_backend_want_plt_sym 1
+#undef elf_backend_want_got_plt
+#define elf_backend_want_got_plt 1
+#undef elf_backend_got_symbol_offset
+#define elf_backend_got_symbol_offset 0
+#undef elf_backend_plt_not_loaded
+#define elf_backend_plt_not_loaded 0
+#undef elf_backend_plt_readonly
+#define elf_backend_plt_readonly 1
+#undef elf_backend_got_header_size
+#define elf_backend_got_header_size 12
+
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ ppc_elf_vxworks_link_hash_table_create
+#undef elf_backend_add_symbol_hook
+#define elf_backend_add_symbol_hook \
+ ppc_elf_vxworks_add_symbol_hook
+#undef elf_backend_link_output_symbol_hook
+#define elf_backend_link_output_symbol_hook \
+ elf_vxworks_link_output_symbol_hook
+#undef elf_backend_final_write_processing
+#define elf_backend_final_write_processing \
+ ppc_elf_vxworks_final_write_processing
+#undef elf_backend_get_sec_type_attr
+#define elf_backend_get_sec_type_attr \
+ ppc_elf_vxworks_get_sec_type_attr
+#undef elf_backend_emit_relocs
+#define elf_backend_emit_relocs \
+ elf_vxworks_emit_relocs
+
+#undef elf32_bed
+#define elf32_bed ppc_elf_vxworks_bed
#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-ppc.h b/contrib/binutils/bfd/elf32-ppc.h
index fa2c585610b0..5f8f63a38a59 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 Free Software Foundation, Inc.
+ Copyright 2003, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +15,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+int ppc_elf_select_plt_layout (bfd *, struct bfd_link_info *, int, 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 074c10893427..eb8e1724fc19 100644
--- a/contrib/binutils/bfd/elf32-s390.c
+++ b/contrib/binutils/bfd/elf32-s390.c
@@ -1,5 +1,6 @@
/* IBM S/390-specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Contributed by Carl B. Pedersen and Martin Schwidefsky.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -40,7 +41,7 @@ static bfd_boolean create_got_section
static bfd_boolean elf_s390_create_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
static void elf_s390_copy_indirect_symbol
- PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -350,7 +351,8 @@ elf_s390_info_to_howto (abfd, cache_ptr, dst)
arelent *cache_ptr;
Elf_Internal_Rela *dst;
{
- switch (ELF32_R_TYPE(dst->r_info))
+ unsigned int r_type = ELF32_R_TYPE(dst->r_info);
+ switch (r_type)
{
case R_390_GNU_VTINHERIT:
cache_ptr->howto = &elf32_s390_vtinherit_howto;
@@ -361,8 +363,13 @@ elf_s390_info_to_howto (abfd, cache_ptr, dst)
break;
default:
- BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_390_max);
- cache_ptr->howto = &elf_howto_table[ELF32_R_TYPE(dst->r_info)];
+ if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0]))
+ {
+ (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
+ abfd, (int) r_type);
+ r_type = R_390_NONE;
+ }
+ cache_ptr->howto = &elf_howto_table[r_type];
}
}
@@ -411,7 +418,7 @@ s390_elf_ldisp_reloc (abfd, reloc_entry, symbol, data, input_section,
if (output_bfd != NULL)
return bfd_reloc_continue;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = (symbol->value
@@ -764,7 +771,8 @@ elf_s390_link_hash_table_create (abfd)
if (ret == NULL)
return NULL;
- if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc))
+ if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
+ sizeof (struct elf_s390_link_hash_entry)))
{
free (ret);
return NULL;
@@ -802,12 +810,13 @@ create_got_section (dynobj, info)
if (!htab->sgot || !htab->sgotplt)
abort ();
- htab->srelgot = bfd_make_section (dynobj, ".rela.got");
+ htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got",
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (htab->srelgot == NULL
- || ! bfd_set_section_flags (dynobj, htab->srelgot,
- (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED
- | SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
return FALSE;
return TRUE;
@@ -847,8 +856,8 @@ elf_s390_create_dynamic_sections (dynobj, info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf_s390_copy_indirect_symbol (bed, dir, ind)
- const struct elf_backend_data *bed;
+elf_s390_copy_indirect_symbol (info, dir, ind)
+ struct bfd_link_info *info;
struct elf_link_hash_entry *dir, *ind;
{
struct elf_s390_link_hash_entry *edir, *eind;
@@ -863,10 +872,7 @@ elf_s390_copy_indirect_symbol (bed, dir, ind)
struct elf_s390_dyn_relocs **pp;
struct elf_s390_dyn_relocs *p;
- if (ind->root.type == bfd_link_hash_indirect)
- abort ();
-
- /* Add reloc counts against the weak sym to the strong sym
+ /* Add reloc counts against the indirect sym to the direct sym
list. Merge any entries against the same section. */
for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
{
@@ -899,17 +905,18 @@ elf_s390_copy_indirect_symbol (bed, dir, ind)
if (ELIMINATE_COPY_RELOCS
&& ind->root.type != bfd_link_hash_indirect
- && (dir->elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
- /* If called to transfer flags for a weakdef during processing
- of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
- We clear it ourselves for ELIMINATE_COPY_RELOCS. */
- dir->elf_link_hash_flags |=
- (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_HASH_NEEDS_PLT));
+ && dir->dynamic_adjusted)
+ {
+ /* If called to transfer flags for a weakdef during processing
+ of elf_adjust_dynamic_symbol, don't copy non_got_ref.
+ We clear it ourselves for ELIMINATE_COPY_RELOCS. */
+ dir->ref_dynamic |= ind->ref_dynamic;
+ dir->ref_regular |= ind->ref_regular;
+ dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
+ dir->needs_plt |= ind->needs_plt;
+ }
else
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+ _bfd_elf_link_hash_copy_indirect (info, dir, ind);
}
static int
@@ -980,16 +987,20 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
- r_symndx);
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd, r_symndx);
return FALSE;
}
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ {
+ 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;
+ }
/* Create got section and local_got_refcounts array if they
are needed. */
@@ -1069,7 +1080,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
creating a procedure linkage table entry. */
if (h != NULL)
{
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 1;
h->plt.refcount += 1;
}
break;
@@ -1090,7 +1101,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
((struct elf_s390_link_hash_entry *) h)->gotplt_refcount++;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 1;
h->plt.refcount += 1;
}
else
@@ -1158,8 +1169,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (old_tls_type == GOT_NORMAL || tls_type == GOT_NORMAL)
{
(*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and thread local symbol"),
- bfd_archive_filename (abfd), h->root.root.string);
+ (_("%B: `%s' accessed both as normal and thread local symbol"),
+ abfd, h->root.root.string);
return FALSE;
}
if (old_tls_type > tls_type)
@@ -1199,7 +1210,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
sections have not yet been mapped to output sections.
Tentatively set the flag for now, and correct in
adjust_dynamic_symbol. */
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 1;
/* We may need a .plt entry if the function this reloc
refers to is in a shared lib. */
@@ -1236,15 +1247,13 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
|| (h != NULL
&& (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ || !h->def_regular)))
{
struct elf_s390_dyn_relocs *p;
struct elf_s390_dyn_relocs **head;
@@ -1269,8 +1278,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
name + 5) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
}
if (htab->elf.dynobj == NULL)
@@ -1282,13 +1291,14 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
{
flagword flags;
- sreloc = bfd_make_section (dynobj, name);
flags = (SEC_HAS_CONTENTS | SEC_READONLY
| SEC_IN_MEMORY | SEC_LINKER_CREATED);
if ((sec->flags & SEC_ALLOC) != 0)
flags |= SEC_ALLOC | SEC_LOAD;
+ sreloc = bfd_make_section_with_flags (dynobj,
+ name,
+ flags);
if (sreloc == NULL
- || ! bfd_set_section_flags (dynobj, sreloc, flags)
|| ! bfd_set_section_alignment (dynobj, sreloc, 2))
return FALSE;
}
@@ -1307,14 +1317,15 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
We really need local syms available to do this
easily. Oh well. */
asection *s;
+ void *vpp;
s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
sec, r_symndx);
if (s == NULL)
return FALSE;
- head = ((struct elf_s390_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ vpp = &elf_section_data (s)->local_dynrel;
+ head = (struct elf_s390_dyn_relocs **) vpp;
}
p = *head;
@@ -1439,6 +1450,9 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
struct elf_s390_dyn_relocs *p;
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;
eh = (struct elf_s390_link_hash_entry *) h;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
@@ -1581,12 +1595,12 @@ elf_s390_adjust_dynamic_symbol (info, h)
will fill in the contents of the procedure linkage table later
(although we could actually do it here). */
if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ || h->needs_plt)
{
if (h->plt.refcount <= 0
|| (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
+ && !h->def_dynamic
+ && !h->ref_dynamic
&& h->root.type != bfd_link_hash_undefweak
&& h->root.type != bfd_link_hash_undefined))
{
@@ -1596,7 +1610,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
such a case, we don't actually need to build a procedure
linkage table, and we can just do a PC32 reloc instead. */
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
@@ -1613,16 +1627,14 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
+ if (h->u.weakdef != NULL)
{
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
+ 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;
if (ELIMINATE_COPY_RELOCS || info->nocopyreloc)
- h->elf_link_hash_flags
- = ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
- | (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
+ h->non_got_ref = h->u.weakdef->non_got_ref;
return TRUE;
}
@@ -1638,13 +1650,13 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* If there are no references to this symbol that do not use the
GOT, we don't need to generate a copy reloc. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
+ if (!h->non_got_ref)
return TRUE;
/* If -z nocopyreloc was given, we won't generate them either. */
if (info->nocopyreloc)
{
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 0;
return TRUE;
}
@@ -1665,11 +1677,18 @@ elf_s390_adjust_dynamic_symbol (info, h)
we'll be keeping the dynamic relocs and avoiding the copy reloc. */
if (p == NULL)
{
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 0;
return TRUE;
}
}
+ if (h->size == 0)
+ {
+ (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+ h->root.root.string);
+ return TRUE;
+ }
+
/* We must allocate the symbol in our .dynbss section, which will
become part of the .bss section of the executable. There will be
an entry for this symbol in the .dynsym section. The dynamic
@@ -1687,8 +1706,8 @@ elf_s390_adjust_dynamic_symbol (info, h)
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf32_External_Rela);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ htab->srelbss->size += sizeof (Elf32_External_Rela);
+ h->needs_copy = 1;
}
/* We need to figure out the alignment required for this symbol. I
@@ -1699,7 +1718,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ 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))
@@ -1708,10 +1727,10 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1749,7 +1768,7 @@ allocate_dynrelocs (h, inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -1762,10 +1781,10 @@ allocate_dynrelocs (h, inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_FIRST_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_FIRST_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1773,33 +1792,33 @@ allocate_dynrelocs (h, inf)
pointers compare as equal between the normal executable and
the shared library. */
if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->def_regular)
{
h->root.u.def.section = s;
h->root.u.def.value = h->plt.offset;
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += GOT_ENTRY_SIZE;
+ htab->sgotplt->size += GOT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelplt->size += sizeof (Elf32_External_Rela);
}
else
{
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
}
else
{
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
@@ -1817,8 +1836,8 @@ allocate_dynrelocs (h, inf)
to be stored somewhere. The immediate value in the instruction
is not bit enough so the value is stored in the got. */
{
- h->got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = htab->sgot->size;
+ htab->sgot->size += GOT_ENTRY_SIZE;
}
else
h->got.offset = (bfd_vma) -1;
@@ -1832,31 +1851,31 @@ allocate_dynrelocs (h, inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = s->size;
+ s->size += GOT_ENTRY_SIZE;
/* R_390_TLS_GD32 needs 2 consecutive GOT slots. */
if (tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
dyn = htab->elf.dynamic_sections_created;
/* R_390_TLS_IE32 needs one dynamic relocation,
R_390_TLS_GD32 needs one if local symbol and two if global. */
if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
|| tls_type >= GOT_TLS_IE)
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rela);
+ htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
&& (info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
h->got.offset = (bfd_vma) -1;
@@ -1890,9 +1909,21 @@ allocate_dynrelocs (h, inf)
/* Also discard relocs on undefined weak syms with non-default
visibility. */
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ if (eh->dyn_relocs != NULL
&& h->root.type == bfd_link_hash_undefweak)
- eh->dyn_relocs = NULL;
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->dyn_relocs = NULL;
+
+ /* Make sure undefined weak symbols are output as a dynamic
+ symbol in PIEs. */
+ else if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+ }
}
else if (ELIMINATE_COPY_RELOCS)
{
@@ -1900,9 +1931,9 @@ allocate_dynrelocs (h, inf)
symbols which turn out to need copy relocs or are not
dynamic. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
|| (htab->elf.dynamic_sections_created
&& (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined))))
@@ -1910,7 +1941,7 @@ allocate_dynrelocs (h, inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -1932,7 +1963,7 @@ allocate_dynrelocs (h, inf)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ sreloc->size += p->count * sizeof (Elf32_External_Rela);
}
return TRUE;
@@ -1995,7 +2026,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -2018,10 +2049,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
struct elf_s390_dyn_relocs *p;
- for (p = *((struct elf_s390_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
- p != NULL;
- p = p->next)
+ for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
{
if (!bfd_is_abs_section (p->sec)
&& bfd_is_abs_section (p->sec->output_section))
@@ -2034,7 +2062,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
else if (p->count != 0)
{
srela = elf_section_data (p->sec)->sreloc;
- srela->_raw_size += p->count * sizeof (Elf32_External_Rela);
+ srela->size += p->count * sizeof (Elf32_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -2055,12 +2083,12 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ *local_got = s->size;
+ s->size += GOT_ENTRY_SIZE;
if (*local_tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
if (info->shared)
- srela->_raw_size += sizeof (Elf32_External_Rela);
+ srela->size += sizeof (Elf32_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@@ -2071,9 +2099,9 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
/* Allocate 2 got entries and 1 dynamic reloc for R_390_TLS_LDM32
relocs. */
- htab->tls_ldm_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 2 * GOT_ENTRY_SIZE;
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += 2 * GOT_ENTRY_SIZE;
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
}
else
htab->tls_ldm_got.offset = -1;
@@ -2092,14 +2120,15 @@ elf_s390_size_dynamic_sections (output_bfd, info)
if (s == htab->splt
|| s == htab->sgot
- || s == htab->sgotplt)
+ || s == htab->sgotplt
+ || s == htab->sdynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0)
+ if (s->size != 0)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -2112,7 +2141,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is to handle .rela.bss and
@@ -2124,16 +2153,19 @@ elf_s390_size_dynamic_sections (output_bfd, info)
function which decides whether anything needs to go
into these sections. */
- _bfd_strip_section_from_output (info, s);
+ s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
but this way if it does, we get a R_390_NONE reloc instead
of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -2154,7 +2186,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2231,9 +2263,9 @@ invalid_tls_insn (input_bfd, input_section, rel)
howto = elf_howto_table + ELF32_R_TYPE (rel->r_info);
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): invalid instruction for TLS relocation %s"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): invalid instruction for TLS relocation %s"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name);
}
@@ -2373,8 +2405,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
|| (info->shared
&& (info->symbolic
|| h->dynindx == -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ || h->forced_local)
+ && h->def_regular)
|| (ELF_ST_VISIBILITY (h->other)
&& h->root.type == bfd_link_hash_undefweak))
{
@@ -2554,11 +2586,9 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
&& !info->shared
&& h != NULL
&& h->dynindx != -1
- && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
|| h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined)))
{
@@ -2594,8 +2624,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_390_PC32
|| !info->shared
|| !info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || !h->def_regular))
{
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
outrel.r_addend = rel->r_addend;
@@ -2991,12 +3020,13 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
not process them. */
if (unresolved_reloc
&& !((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
+ && h->def_dynamic))
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
+ howto->name,
h->root.root.string);
if (r_type == R_390_20
@@ -3036,16 +3066,16 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, name, (int) r);
return FALSE;
}
@@ -3196,7 +3226,7 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
loc = htab->srelplt->contents + plt_index * sizeof (Elf32_External_Rela);
bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value alone. This is a clue
@@ -3233,8 +3263,8 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
if (info->shared
&& (info->symbolic
|| h->dynindx == -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ || h->forced_local)
+ && h->def_regular)
{
BFD_ASSERT((h->got.offset & 1) != 0);
rela.r_info = ELF32_R_INFO (0, R_390_RELATIVE);
@@ -3255,7 +3285,7 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
}
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ if (h->needs_copy)
{
Elf_Internal_Rela rela;
bfd_byte *loc;
@@ -3280,8 +3310,8 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Mark some specially defined symbols as absolute. */
if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
+ || h == htab->elf.hgot
+ || h == htab->elf.hplt)
sym->st_shndx = SHN_ABS;
return TRUE;
@@ -3330,7 +3360,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
abort ();
dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -3353,10 +3383,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
}
@@ -3364,7 +3391,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the special first entry in the procedure linkage table. */
- if (htab->splt && htab->splt->_raw_size > 0)
+ if (htab->splt && htab->splt->size > 0)
{
memset (htab->splt->contents, 0, PLT_FIRST_ENTRY_SIZE);
if (info->shared)
@@ -3408,7 +3435,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
if (htab->sgotplt)
{
/* Fill in the first three entries in the global offset table. */
- if (htab->sgotplt->_raw_size > 0)
+ if (htab->sgotplt->size > 0)
{
bfd_put_32 (output_bfd,
(sdyn == NULL ? (bfd_vma) 0
@@ -3432,7 +3459,7 @@ elf_s390_grok_prstatus (abfd, note)
Elf_Internal_Note * note;
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -3448,15 +3475,26 @@ elf_s390_grok_prstatus (abfd, note)
/* pr_reg */
offset = 72;
- raw_size = 144;
+ size = 144;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + PLT_FIRST_ENTRY_SIZE + i * PLT_ENTRY_SIZE;
+}
+
+
#define TARGET_BIG_SYM bfd_elf32_s390_vec
#define TARGET_BIG_NAME "elf32-s390"
#define ELF_ARCH bfd_arch_s390
@@ -3491,6 +3529,7 @@ elf_s390_grok_prstatus (abfd, note)
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
#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
#define bfd_elf32_mkobject elf_s390_mkobject
#define elf_backend_object_p elf_s390_object_p
diff --git a/contrib/binutils/bfd/elf32-sparc.c b/contrib/binutils/bfd/elf32-sparc.c
index 0f94f5f31bb7..3bfb38a3d44a 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 Free Software Foundation, Inc.
+ 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -25,483 +25,9 @@
#include "elf-bfd.h"
#include "elf/sparc.h"
#include "opcode/sparc.h"
+#include "elfxx-sparc.h"
+#include "elf-vxworks.h"
-static reloc_howto_type *elf32_sparc_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void elf32_sparc_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static bfd_boolean elf32_sparc_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static bfd_boolean elf32_sparc_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static bfd_boolean allocate_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean readonly_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean elf32_sparc_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf32_sparc_new_section_hook
- PARAMS ((bfd *, asection *));
-static bfd_boolean elf32_sparc_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
-static bfd_vma dtpoff_base
- PARAMS ((struct bfd_link_info *));
-static bfd_vma tpoff
- PARAMS ((struct bfd_link_info *, bfd_vma));
-static bfd_boolean elf32_sparc_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static bfd_boolean elf32_sparc_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static bfd_boolean elf32_sparc_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf32_sparc_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static struct bfd_hash_entry *link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_link_hash_table *elf32_sparc_link_hash_table_create
- PARAMS ((bfd *));
-static bfd_boolean create_got_section
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf32_sparc_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static void elf32_sparc_copy_indirect_symbol
- PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
- struct elf_link_hash_entry *));
-static int elf32_sparc_tls_transition
- PARAMS ((struct bfd_link_info *, bfd *, int, int));
-
-static bfd_boolean elf32_sparc_mkobject
- PARAMS ((bfd *));
-static bfd_boolean elf32_sparc_object_p
- PARAMS ((bfd *));
-static void elf32_sparc_final_write_processing
- PARAMS ((bfd *, bfd_boolean));
-static enum elf_reloc_type_class elf32_sparc_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
-static asection * elf32_sparc_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static bfd_boolean elf32_sparc_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-
-/* The relocation "howto" table. */
-
-static bfd_reloc_status_type sparc_elf_notsupported_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type sparc_elf_wdisp16_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type sparc_elf_hix22_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type sparc_elf_lox10_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-
-reloc_howto_type _bfd_sparc_elf_howto_table[] =
-{
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_8", FALSE,0,0x000000ff,TRUE),
- HOWTO(R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_16", FALSE,0,0x0000ffff,TRUE),
- HOWTO(R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_32", FALSE,0,0xffffffff,TRUE),
- HOWTO(R_SPARC_DISP8, 0,0, 8,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP8", FALSE,0,0x000000ff,TRUE),
- HOWTO(R_SPARC_DISP16, 0,1,16,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP16", FALSE,0,0x0000ffff,TRUE),
- HOWTO(R_SPARC_DISP32, 0,2,32,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP32", FALSE,0,0xffffffff,TRUE),
- HOWTO(R_SPARC_WDISP30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP30", FALSE,0,0x3fffffff,TRUE),
- HOWTO(R_SPARC_WDISP22, 2,2,22,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_HI22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HI22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_22, 0,2,22,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_13, 0,2,13,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_13", FALSE,0,0x00001fff,TRUE),
- HOWTO(R_SPARC_LO10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_LO10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_GOT10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_GOT13, 0,2,13,FALSE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_GOT13", FALSE,0,0x00001fff,TRUE),
- HOWTO(R_SPARC_GOT22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_PC10, 0,2,10,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_PC22, 10,2,22,TRUE, 0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PC22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_WPLT30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WPLT30", FALSE,0,0x3fffffff,TRUE),
- HOWTO(R_SPARC_COPY, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_COPY", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_GLOB_DAT, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GLOB_DAT",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_JMP_SLOT, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_RELATIVE, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_UA32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", FALSE,0,0xffffffff,TRUE),
- HOWTO(R_SPARC_PLT32, 0,0,00,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT32", FALSE,0,0xffffffff,TRUE),
- HOWTO(R_SPARC_HIPLT22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_HIPLT22", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_LOPLT10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_LOPLT10", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_PCPLT32, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PCPLT32", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_PCPLT22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PCPLT22", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_PCPLT10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PCPLT10", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_10, 0,2,10,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_11, 0,2,11,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_11", FALSE,0,0x000007ff,TRUE),
- /* These are for sparc64 in a 64 bit environment.
- Values need to be here because the table is indexed by reloc number. */
- HOWTO(R_SPARC_64, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_64", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_OLO10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_OLO10", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_HH22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_HH22", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_HM10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_HM10", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_LM22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_LM22", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_PC_HH22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PC_HH22", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_PC_HM10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PC_HM10", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_PC_LM22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PC_LM22", FALSE,0,0x00000000,TRUE),
- /* End sparc64 in 64 bit environment values.
- The following are for sparc64 in a 32 bit environment. */
- HOWTO(R_SPARC_WDISP16, 2,2,16,TRUE, 0,complain_overflow_signed, sparc_elf_wdisp16_reloc,"R_SPARC_WDISP16", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_WDISP19, 2,2,19,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP19", FALSE,0,0x0007ffff,TRUE),
- HOWTO(R_SPARC_UNUSED_42, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UNUSED_42",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_7, 0,2, 7,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_7", FALSE,0,0x0000007f,TRUE),
- HOWTO(R_SPARC_5, 0,2, 5,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_5", FALSE,0,0x0000001f,TRUE),
- HOWTO(R_SPARC_6, 0,2, 6,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_6", FALSE,0,0x0000003f,TRUE),
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_UA64, 0,0, 0,FALSE,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_UA64", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_UA16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", FALSE,0,0x0000ffff,TRUE),
- HOWTO(R_SPARC_TLS_GD_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_HI22",FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_TLS_GD_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_LO10",FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_TLS_GD_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_ADD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_GD_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_CALL",FALSE,0,0x3fffffff,TRUE),
- HOWTO(R_SPARC_TLS_LDM_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_HI22",FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_TLS_LDM_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_LO10",FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_TLS_LDM_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_ADD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_LDM_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_CALL",FALSE,0,0x3fffffff,TRUE),
- HOWTO(R_SPARC_TLS_LDO_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_TLS_LDO_HIX22",FALSE,0,0x003fffff, FALSE),
- HOWTO(R_SPARC_TLS_LDO_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LDO_LOX10",FALSE,0,0x000003ff, FALSE),
- HOWTO(R_SPARC_TLS_LDO_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDO_ADD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_IE_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_HI22",FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_TLS_IE_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LO10",FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_TLS_IE_LD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_IE_LDX,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LDX",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_IE_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_ADD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_LE_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_TLS_LE_HIX22",FALSE,0,0x003fffff, FALSE),
- HOWTO(R_SPARC_TLS_LE_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LE_LOX10",FALSE,0,0x000003ff, FALSE),
- HOWTO(R_SPARC_TLS_DTPMOD32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD32",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_DTPMOD64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD64",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_DTPOFF32,0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF32",FALSE,0,0xffffffff,TRUE),
- HOWTO(R_SPARC_TLS_DTPOFF64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPOFF64",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_TPOFF32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF32",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_TPOFF64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF64",FALSE,0,0x00000000,TRUE)
-};
-static reloc_howto_type elf32_sparc_vtinherit_howto =
- HOWTO (R_SPARC_GNU_VTINHERIT, 0,2,0,FALSE,0,complain_overflow_dont, NULL, "R_SPARC_GNU_VTINHERIT", FALSE,0, 0, FALSE);
-static reloc_howto_type elf32_sparc_vtentry_howto =
- HOWTO (R_SPARC_GNU_VTENTRY, 0,2,0,FALSE,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_SPARC_GNU_VTENTRY", FALSE,0,0, FALSE);
-static reloc_howto_type elf32_sparc_rev32_howto =
- HOWTO(R_SPARC_REV32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", FALSE,0,0xffffffff,TRUE);
-
-struct elf_reloc_map {
- bfd_reloc_code_real_type bfd_reloc_val;
- unsigned char elf_reloc_val;
-};
-
-static const struct elf_reloc_map sparc_reloc_map[] =
-{
- { BFD_RELOC_NONE, R_SPARC_NONE, },
- { BFD_RELOC_16, R_SPARC_16, },
- { BFD_RELOC_16_PCREL, R_SPARC_DISP16 },
- { BFD_RELOC_8, R_SPARC_8 },
- { BFD_RELOC_8_PCREL, R_SPARC_DISP8 },
- { BFD_RELOC_CTOR, R_SPARC_32 },
- { BFD_RELOC_32, R_SPARC_32 },
- { BFD_RELOC_32_PCREL, R_SPARC_DISP32 },
- { BFD_RELOC_HI22, R_SPARC_HI22 },
- { BFD_RELOC_LO10, R_SPARC_LO10, },
- { BFD_RELOC_32_PCREL_S2, R_SPARC_WDISP30 },
- { BFD_RELOC_SPARC_PLT32, R_SPARC_PLT32 },
- { BFD_RELOC_SPARC22, R_SPARC_22 },
- { BFD_RELOC_SPARC13, R_SPARC_13 },
- { BFD_RELOC_SPARC_GOT10, R_SPARC_GOT10 },
- { BFD_RELOC_SPARC_GOT13, R_SPARC_GOT13 },
- { BFD_RELOC_SPARC_GOT22, R_SPARC_GOT22 },
- { BFD_RELOC_SPARC_PC10, R_SPARC_PC10 },
- { BFD_RELOC_SPARC_PC22, R_SPARC_PC22 },
- { BFD_RELOC_SPARC_WPLT30, R_SPARC_WPLT30 },
- { BFD_RELOC_SPARC_COPY, R_SPARC_COPY },
- { BFD_RELOC_SPARC_GLOB_DAT, R_SPARC_GLOB_DAT },
- { BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT },
- { BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE },
- { BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 },
- { BFD_RELOC_SPARC_UA16, R_SPARC_UA16 },
- { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 },
- { BFD_RELOC_SPARC_UA64, R_SPARC_UA64 },
- { BFD_RELOC_SPARC_10, R_SPARC_10 },
- { BFD_RELOC_SPARC_11, R_SPARC_11 },
- { BFD_RELOC_SPARC_64, R_SPARC_64 },
- { BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10 },
- { BFD_RELOC_SPARC_HH22, R_SPARC_HH22 },
- { BFD_RELOC_SPARC_HM10, R_SPARC_HM10 },
- { BFD_RELOC_SPARC_LM22, R_SPARC_LM22 },
- { BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22 },
- { BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10 },
- { BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22 },
- { BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16 },
- { BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19 },
- { BFD_RELOC_SPARC_7, R_SPARC_7 },
- { BFD_RELOC_SPARC_5, R_SPARC_5 },
- { BFD_RELOC_SPARC_6, R_SPARC_6 },
- { BFD_RELOC_SPARC_TLS_GD_HI22, R_SPARC_TLS_GD_HI22 },
- { BFD_RELOC_SPARC_TLS_GD_LO10, R_SPARC_TLS_GD_LO10 },
- { BFD_RELOC_SPARC_TLS_GD_ADD, R_SPARC_TLS_GD_ADD },
- { BFD_RELOC_SPARC_TLS_GD_CALL, R_SPARC_TLS_GD_CALL },
- { BFD_RELOC_SPARC_TLS_LDM_HI22, R_SPARC_TLS_LDM_HI22 },
- { BFD_RELOC_SPARC_TLS_LDM_LO10, R_SPARC_TLS_LDM_LO10 },
- { BFD_RELOC_SPARC_TLS_LDM_ADD, R_SPARC_TLS_LDM_ADD },
- { BFD_RELOC_SPARC_TLS_LDM_CALL, R_SPARC_TLS_LDM_CALL },
- { BFD_RELOC_SPARC_TLS_LDO_HIX22, R_SPARC_TLS_LDO_HIX22 },
- { BFD_RELOC_SPARC_TLS_LDO_LOX10, R_SPARC_TLS_LDO_LOX10 },
- { BFD_RELOC_SPARC_TLS_LDO_ADD, R_SPARC_TLS_LDO_ADD },
- { BFD_RELOC_SPARC_TLS_IE_HI22, R_SPARC_TLS_IE_HI22 },
- { BFD_RELOC_SPARC_TLS_IE_LO10, R_SPARC_TLS_IE_LO10 },
- { BFD_RELOC_SPARC_TLS_IE_LD, R_SPARC_TLS_IE_LD },
- { BFD_RELOC_SPARC_TLS_IE_LDX, R_SPARC_TLS_IE_LDX },
- { BFD_RELOC_SPARC_TLS_IE_ADD, R_SPARC_TLS_IE_ADD },
- { BFD_RELOC_SPARC_TLS_LE_HIX22, R_SPARC_TLS_LE_HIX22 },
- { BFD_RELOC_SPARC_TLS_LE_LOX10, R_SPARC_TLS_LE_LOX10 },
- { BFD_RELOC_SPARC_TLS_DTPMOD32, R_SPARC_TLS_DTPMOD32 },
- { BFD_RELOC_SPARC_TLS_DTPMOD64, R_SPARC_TLS_DTPMOD64 },
- { BFD_RELOC_SPARC_TLS_DTPOFF32, R_SPARC_TLS_DTPOFF32 },
- { BFD_RELOC_SPARC_TLS_DTPOFF64, R_SPARC_TLS_DTPOFF64 },
- { BFD_RELOC_SPARC_TLS_TPOFF32, R_SPARC_TLS_TPOFF32 },
- { BFD_RELOC_SPARC_TLS_TPOFF64, R_SPARC_TLS_TPOFF64 },
- { BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT },
- { BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY },
- { BFD_RELOC_SPARC_REV32, R_SPARC_REV32 }
-};
-
-static reloc_howto_type *
-elf32_sparc_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
-{
- unsigned int i;
-
- switch (code)
- {
- case BFD_RELOC_VTABLE_INHERIT:
- return &elf32_sparc_vtinherit_howto;
-
- case BFD_RELOC_VTABLE_ENTRY:
- return &elf32_sparc_vtentry_howto;
-
- case BFD_RELOC_SPARC_REV32:
- return &elf32_sparc_rev32_howto;
-
- default:
- for (i = 0;
- i < sizeof (sparc_reloc_map) / sizeof (struct elf_reloc_map);
- i++)
- {
- if (sparc_reloc_map[i].bfd_reloc_val == code)
- return (_bfd_sparc_elf_howto_table
- + (int) sparc_reloc_map[i].elf_reloc_val);
- }
- }
- bfd_set_error (bfd_error_bad_value);
- return NULL;
-}
-
-/* We need to use ELF32_R_TYPE so we have our own copy of this function,
- and elf64-sparc.c has its own copy. */
-
-static void
-elf32_sparc_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
-{
- switch (ELF32_R_TYPE(dst->r_info))
- {
- case R_SPARC_GNU_VTINHERIT:
- cache_ptr->howto = &elf32_sparc_vtinherit_howto;
- break;
-
- case R_SPARC_GNU_VTENTRY:
- cache_ptr->howto = &elf32_sparc_vtentry_howto;
- break;
-
- case R_SPARC_REV32:
- cache_ptr->howto = &elf32_sparc_rev32_howto;
- break;
-
- default:
- BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_SPARC_max_std);
- cache_ptr->howto = &_bfd_sparc_elf_howto_table[ELF32_R_TYPE(dst->r_info)];
- }
-}
-
-/* For unsupported relocs. */
-
-static bfd_reloc_status_type
-sparc_elf_notsupported_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
-{
- return bfd_reloc_notsupported;
-}
-
-/* Handle the WDISP16 reloc. */
-
-static bfd_reloc_status_type
-sparc_elf_wdisp16_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- bfd_vma relocation;
- bfd_vma x;
-
- if (output_bfd != (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;
- }
-
- if (output_bfd != NULL)
- return bfd_reloc_continue;
-
- if (reloc_entry->address > input_section->_cooked_size)
- return bfd_reloc_outofrange;
-
- relocation = (symbol->value
- + symbol->section->output_section->vma
- + symbol->section->output_offset);
- relocation += reloc_entry->addend;
- relocation -= (input_section->output_section->vma
- + input_section->output_offset);
- relocation -= reloc_entry->address;
-
- x = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- x |= ((((relocation >> 2) & 0xc000) << 6)
- | ((relocation >> 2) & 0x3fff));
- bfd_put_32 (abfd, x, (bfd_byte *) data + reloc_entry->address);
-
- if ((bfd_signed_vma) relocation < - 0x40000
- || (bfd_signed_vma) relocation > 0x3ffff)
- return bfd_reloc_overflow;
- else
- return bfd_reloc_ok;
-}
-
-/* Handle the HIX22 reloc. */
-
-static bfd_reloc_status_type
-sparc_elf_hix22_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- bfd_vma relocation;
- bfd_vma insn;
-
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- if (output_bfd != NULL)
- return bfd_reloc_continue;
-
- if (reloc_entry->address > input_section->_cooked_size)
- return bfd_reloc_outofrange;
-
- relocation = (symbol->value
- + symbol->section->output_section->vma
- + symbol->section->output_offset);
- relocation += reloc_entry->addend;
- insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
- insn = (insn &~ (bfd_vma) 0x3fffff) | (((~relocation) >> 10) & 0x3fffff);
- bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
-
- return bfd_reloc_ok;
-}
-
-/* Handle the LOX10 reloc. */
-
-static bfd_reloc_status_type
-sparc_elf_lox10_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- bfd_vma relocation;
- bfd_vma insn;
-
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- if (output_bfd != NULL)
- return bfd_reloc_continue;
-
- if (reloc_entry->address > input_section->_cooked_size)
- return bfd_reloc_outofrange;
-
- relocation = (symbol->value
- + symbol->section->output_section->vma
- + symbol->section->output_offset);
- relocation += reloc_entry->addend;
- insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
- insn = (insn &~ (bfd_vma) 0x1fff) | 0x1c00 | (relocation & 0x3ff);
- bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
-
- return bfd_reloc_ok;
-}
-
/* Support for core dump NOTE sections. */
static bfd_boolean
@@ -530,2766 +56,6 @@ elf32_sparc_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return TRUE;
}
-
-/* Functions for the SPARC ELF linker. */
-
-/* The name of the dynamic interpreter. This is put in the .interp
- section. */
-
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-
-/* The nop opcode we use. */
-
-#define SPARC_NOP 0x01000000
-
-/* The size in bytes of an entry in the procedure linkage table. */
-
-#define PLT_ENTRY_SIZE 12
-
-/* The first four entries in a procedure linkage table are reserved,
- and the initial contents are unimportant (we zero them out).
- Subsequent entries look like this. See the SVR4 ABI SPARC
- supplement to see how this works. */
-
-/* sethi %hi(.-.plt0),%g1. We fill in the address later. */
-#define PLT_ENTRY_WORD0 0x03000000
-/* b,a .plt0. We fill in the offset later. */
-#define PLT_ENTRY_WORD1 0x30800000
-/* nop. */
-#define PLT_ENTRY_WORD2 SPARC_NOP
-
-/* The SPARC linker needs to keep track of the number of relocs that it
- decides to copy as dynamic relocs in check_relocs for each symbol.
- This is so that it can later discard them if they are found to be
- unnecessary. We store the information in a field extending the
- regular ELF linker hash table. */
-
-struct elf32_sparc_dyn_relocs
-{
- struct elf32_sparc_dyn_relocs *next;
-
- /* The input section of the reloc. */
- asection *sec;
-
- /* Total number of relocs copied for the input section. */
- bfd_size_type count;
-
- /* Number of pc-relative relocs copied for the input section. */
- bfd_size_type pc_count;
-};
-
-/* SPARC ELF linker hash entry. */
-
-struct elf32_sparc_link_hash_entry
-{
- struct elf_link_hash_entry elf;
-
- /* Track dynamic relocs copied for this symbol. */
- struct elf32_sparc_dyn_relocs *dyn_relocs;
-
-#define GOT_UNKNOWN 0
-#define GOT_NORMAL 1
-#define GOT_TLS_GD 2
-#define GOT_TLS_IE 3
- unsigned char tls_type;
-};
-
-#define elf32_sparc_hash_entry(ent) ((struct elf32_sparc_link_hash_entry *)(ent))
-
-struct elf32_sparc_obj_tdata
-{
- struct elf_obj_tdata root;
-
- /* tls_type for each local got entry. */
- char *local_got_tls_type;
-
- /* TRUE if TLS GD relocs has been seen for this object. */
- bfd_boolean has_tlsgd;
-};
-
-#define elf32_sparc_tdata(abfd) \
- ((struct elf32_sparc_obj_tdata *) (abfd)->tdata.any)
-
-#define elf32_sparc_local_got_tls_type(abfd) \
- (elf32_sparc_tdata (abfd)->local_got_tls_type)
-
-static bfd_boolean
-elf32_sparc_mkobject (abfd)
- bfd *abfd;
-{
- bfd_size_type amt = sizeof (struct elf32_sparc_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
- if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
-}
-
-/* SPARC ELF linker hash table. */
-
-struct elf32_sparc_link_hash_table
-{
- struct elf_link_hash_table elf;
-
- /* Short-cuts to get to dynamic linker sections. */
- asection *sgot;
- asection *srelgot;
- asection *splt;
- asection *srelplt;
- asection *sdynbss;
- asection *srelbss;
-
- union {
- bfd_signed_vma refcount;
- bfd_vma offset;
- } tls_ldm_got;
-
- /* Small local sym to section mapping cache. */
- struct sym_sec_cache sym_sec;
-};
-
-/* Get the SPARC ELF linker hash table from a link_info structure. */
-
-#define elf32_sparc_hash_table(p) \
- ((struct elf32_sparc_link_hash_table *) ((p)->hash))
-
-/* Create an entry in an i386 ELF linker hash table. */
-
-static struct bfd_hash_entry *
-link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
-{
- /* Allocate the structure if it has not already been allocated by a
- subclass. */
- if (entry == NULL)
- {
- entry = bfd_hash_allocate (table,
- sizeof (struct elf32_sparc_link_hash_entry));
- if (entry == NULL)
- return entry;
- }
-
- /* Call the allocation method of the superclass. */
- entry = _bfd_elf_link_hash_newfunc (entry, table, string);
- if (entry != NULL)
- {
- struct elf32_sparc_link_hash_entry *eh;
-
- eh = (struct elf32_sparc_link_hash_entry *) entry;
- eh->dyn_relocs = NULL;
- eh->tls_type = GOT_UNKNOWN;
- }
-
- return entry;
-}
-
-/* Create a SPARC ELF linker hash table. */
-
-static struct bfd_link_hash_table *
-elf32_sparc_link_hash_table_create (abfd)
- bfd *abfd;
-{
- struct elf32_sparc_link_hash_table *ret;
- bfd_size_type amt = sizeof (struct elf32_sparc_link_hash_table);
-
- ret = (struct elf32_sparc_link_hash_table *) bfd_malloc (amt);
- if (ret == NULL)
- return NULL;
-
- if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc))
- {
- free (ret);
- return NULL;
- }
-
- ret->sgot = NULL;
- ret->srelgot = NULL;
- ret->splt = NULL;
- ret->srelplt = NULL;
- ret->sdynbss = NULL;
- ret->srelbss = NULL;
- ret->tls_ldm_got.refcount = 0;
- ret->sym_sec.abfd = NULL;
-
- return &ret->elf.root;
-}
-
-/* Create .got and .rela.got sections in DYNOBJ, and set up
- shortcuts to them in our hash table. */
-
-static bfd_boolean
-create_got_section (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
-{
- struct elf32_sparc_link_hash_table *htab;
-
- if (! _bfd_elf_create_got_section (dynobj, info))
- return FALSE;
-
- htab = elf32_sparc_hash_table (info);
- htab->sgot = bfd_get_section_by_name (dynobj, ".got");
- if (!htab->sgot)
- abort ();
-
- htab->srelgot = bfd_make_section (dynobj, ".rela.got");
- if (htab->srelgot == NULL
- || ! bfd_set_section_flags (dynobj, htab->srelgot,
- (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED
- | SEC_READONLY))
- || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
- return FALSE;
- return TRUE;
-}
-
-/* Create .plt, .rela.plt, .got, .rela.got, .dynbss, and
- .rela.bss sections in DYNOBJ, and set up shortcuts to them in our
- hash table. */
-
-static bfd_boolean
-elf32_sparc_create_dynamic_sections (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
-{
- struct elf32_sparc_link_hash_table *htab;
-
- htab = elf32_sparc_hash_table (info);
- if (!htab->sgot && !create_got_section (dynobj, info))
- return FALSE;
-
- if (!_bfd_elf_create_dynamic_sections (dynobj, info))
- return FALSE;
-
- htab->splt = bfd_get_section_by_name (dynobj, ".plt");
- htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt");
- htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
- if (!info->shared)
- htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
-
- if (!htab->splt || !htab->srelplt || !htab->sdynbss
- || (!info->shared && !htab->srelbss))
- abort ();
-
- return TRUE;
-}
-
-/* Copy the extra info we tack onto an elf_link_hash_entry. */
-
-static void
-elf32_sparc_copy_indirect_symbol (bed, dir, ind)
- const struct elf_backend_data *bed;
- struct elf_link_hash_entry *dir, *ind;
-{
- struct elf32_sparc_link_hash_entry *edir, *eind;
-
- edir = (struct elf32_sparc_link_hash_entry *) dir;
- eind = (struct elf32_sparc_link_hash_entry *) ind;
-
- if (eind->dyn_relocs != NULL)
- {
- if (edir->dyn_relocs != NULL)
- {
- struct elf32_sparc_dyn_relocs **pp;
- struct elf32_sparc_dyn_relocs *p;
-
- if (ind->root.type == bfd_link_hash_indirect)
- abort ();
-
- /* Add reloc counts against the weak sym to the strong sym
- list. Merge any entries against the same section. */
- for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
- {
- struct elf32_sparc_dyn_relocs *q;
-
- for (q = edir->dyn_relocs; q != NULL; q = q->next)
- if (q->sec == p->sec)
- {
- q->pc_count += p->pc_count;
- q->count += p->count;
- *pp = p->next;
- break;
- }
- if (q == NULL)
- pp = &p->next;
- }
- *pp = edir->dyn_relocs;
- }
-
- edir->dyn_relocs = eind->dyn_relocs;
- eind->dyn_relocs = NULL;
- }
-
- if (ind->root.type == bfd_link_hash_indirect
- && dir->got.refcount <= 0)
- {
- edir->tls_type = eind->tls_type;
- eind->tls_type = GOT_UNKNOWN;
- }
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
-}
-
-static int
-elf32_sparc_tls_transition (info, abfd, r_type, is_local)
- struct bfd_link_info *info;
- bfd *abfd;
- int r_type;
- int is_local;
-{
- if (r_type == R_SPARC_TLS_GD_HI22
- && ! elf32_sparc_tdata (abfd)->has_tlsgd)
- r_type = R_SPARC_REV32;
-
- if (info->shared)
- return r_type;
-
- switch (r_type)
- {
- case R_SPARC_TLS_GD_HI22:
- if (is_local)
- return R_SPARC_TLS_LE_HIX22;
- return R_SPARC_TLS_IE_HI22;
- case R_SPARC_TLS_GD_LO10:
- if (is_local)
- return R_SPARC_TLS_LE_LOX10;
- return R_SPARC_TLS_IE_LO10;
- case R_SPARC_TLS_IE_HI22:
- if (is_local)
- return R_SPARC_TLS_LE_HIX22;
- return r_type;
- case R_SPARC_TLS_IE_LO10:
- if (is_local)
- return R_SPARC_TLS_LE_LOX10;
- return r_type;
- case R_SPARC_TLS_LDM_HI22:
- return R_SPARC_TLS_LE_HIX22;
- case R_SPARC_TLS_LDM_LO10:
- return R_SPARC_TLS_LE_LOX10;
- }
-
- return r_type;
-}
-
-/* Look through the relocs for a section during the first phase, and
- allocate space in the global offset table or procedure linkage
- table. */
-
-static bfd_boolean
-elf32_sparc_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
-{
- struct elf32_sparc_link_hash_table *htab;
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- bfd_vma *local_got_offsets;
- const Elf_Internal_Rela *rel;
- const Elf_Internal_Rela *rel_end;
- asection *sreloc;
- bfd_boolean checked_tlsgd = FALSE;
-
- if (info->relocatable)
- return TRUE;
-
- htab = elf32_sparc_hash_table (info);
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (abfd);
- local_got_offsets = elf_local_got_offsets (abfd);
-
- sreloc = NULL;
-
- rel_end = relocs + sec->reloc_count;
- for (rel = relocs; rel < rel_end; rel++)
- {
- unsigned int r_type;
- unsigned long r_symndx;
- 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 >= NUM_SHDR_ENTRIES (symtab_hdr))
- {
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
- r_symndx);
- return FALSE;
- }
-
- if (r_symndx < symtab_hdr->sh_info)
- h = NULL;
- else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
- /* Compatibility with old R_SPARC_REV32 reloc conflicting
- with R_SPARC_TLS_GD_HI22. */
- if (! checked_tlsgd)
- switch (r_type)
- {
- case R_SPARC_TLS_GD_HI22:
- {
- const Elf_Internal_Rela *relt;
-
- for (relt = rel + 1; relt < rel_end; relt++)
- if (ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_LO10
- || ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_ADD
- || ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_CALL)
- break;
- checked_tlsgd = TRUE;
- elf32_sparc_tdata (abfd)->has_tlsgd = relt < rel_end;
- }
- break;
- case R_SPARC_TLS_GD_LO10:
- case R_SPARC_TLS_GD_ADD:
- case R_SPARC_TLS_GD_CALL:
- checked_tlsgd = TRUE;
- elf32_sparc_tdata (abfd)->has_tlsgd = TRUE;
- break;
- }
-
- r_type = elf32_sparc_tls_transition (info, abfd, r_type, h == NULL);
- switch (r_type)
- {
- case R_SPARC_TLS_LDM_HI22:
- case R_SPARC_TLS_LDM_LO10:
- htab->tls_ldm_got.refcount += 1;
- break;
-
- case R_SPARC_TLS_LE_HIX22:
- case R_SPARC_TLS_LE_LOX10:
- if (info->shared)
- goto r_sparc_plt32;
- break;
-
- case R_SPARC_TLS_IE_HI22:
- case R_SPARC_TLS_IE_LO10:
- if (info->shared)
- info->flags |= DF_STATIC_TLS;
- /* Fall through */
-
- case R_SPARC_GOT10:
- case R_SPARC_GOT13:
- case R_SPARC_GOT22:
- case R_SPARC_TLS_GD_HI22:
- case R_SPARC_TLS_GD_LO10:
- /* This symbol requires a global offset table entry. */
- {
- int tls_type, old_tls_type;
-
- switch (r_type)
- {
- default:
- case R_SPARC_GOT10:
- case R_SPARC_GOT13:
- case R_SPARC_GOT22:
- tls_type = GOT_NORMAL;
- break;
- case R_SPARC_TLS_GD_HI22:
- case R_SPARC_TLS_GD_LO10:
- tls_type = GOT_TLS_GD;
- break;
- case R_SPARC_TLS_IE_HI22:
- case R_SPARC_TLS_IE_LO10:
- tls_type = GOT_TLS_IE;
- break;
- }
-
- if (h != NULL)
- {
- h->got.refcount += 1;
- old_tls_type = elf32_sparc_hash_entry(h)->tls_type;
- }
- else
- {
- bfd_signed_vma *local_got_refcounts;
-
- /* This is a global offset table entry for a local symbol. */
- local_got_refcounts = elf_local_got_refcounts (abfd);
- if (local_got_refcounts == NULL)
- {
- bfd_size_type size;
-
- size = symtab_hdr->sh_info;
- size *= (sizeof (bfd_signed_vma) + sizeof(char));
- local_got_refcounts = ((bfd_signed_vma *)
- bfd_zalloc (abfd, size));
- if (local_got_refcounts == NULL)
- return FALSE;
- elf_local_got_refcounts (abfd) = local_got_refcounts;
- elf32_sparc_local_got_tls_type (abfd)
- = (char *) (local_got_refcounts + symtab_hdr->sh_info);
- }
- local_got_refcounts[r_symndx] += 1;
- old_tls_type = elf32_sparc_local_got_tls_type (abfd) [r_symndx];
- }
-
- /* If a TLS symbol is accessed using IE at least once,
- there is no point to use dynamic model for it. */
- if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN
- && (old_tls_type != GOT_TLS_GD
- || tls_type != GOT_TLS_IE))
- {
- if (old_tls_type == GOT_TLS_IE && tls_type == GOT_TLS_GD)
- tls_type = old_tls_type;
- else
- {
- (*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and thread local symbol"),
- bfd_archive_filename (abfd),
- h ? h->root.root.string : "<local>");
- return FALSE;
- }
- }
-
- if (old_tls_type != tls_type)
- {
- if (h != NULL)
- elf32_sparc_hash_entry (h)->tls_type = tls_type;
- else
- elf32_sparc_local_got_tls_type (abfd) [r_symndx] = tls_type;
- }
- }
-
- if (htab->sgot == NULL)
- {
- if (htab->elf.dynobj == NULL)
- htab->elf.dynobj = abfd;
- if (!create_got_section (htab->elf.dynobj, info))
- return FALSE;
- }
- break;
-
- case R_SPARC_TLS_GD_CALL:
- case R_SPARC_TLS_LDM_CALL:
- if (info->shared)
- {
- /* These are basically R_SPARC_TLS_WPLT30 relocs against
- __tls_get_addr. */
- struct bfd_link_hash_entry *bh = NULL;
- if (! _bfd_generic_link_add_one_symbol (info, abfd,
- "__tls_get_addr", 0,
- bfd_und_section_ptr, 0,
- NULL, FALSE, FALSE,
- &bh))
- return FALSE;
- h = (struct elf_link_hash_entry *) bh;
- }
- else
- break;
- /* Fall through */
-
- case R_SPARC_PLT32:
- case R_SPARC_WPLT30:
- /* This symbol requires a procedure linkage table entry. We
- actually build the entry in adjust_dynamic_symbol,
- because this might be a case of linking PIC code without
- linking in any dynamic objects, in which case we don't
- need to generate a procedure linkage table after all. */
-
- if (h == NULL)
- {
- /* The Solaris native assembler will generate a WPLT30
- reloc for a local symbol if you assemble a call from
- one section to another when using -K pic. We treat
- it as WDISP30. */
- if (ELF32_R_TYPE (rel->r_info) == R_SPARC_PLT32)
- goto r_sparc_plt32;
- break;
- }
-
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
-
- if (ELF32_R_TYPE (rel->r_info) == R_SPARC_PLT32)
- goto r_sparc_plt32;
- h->plt.refcount += 1;
- break;
-
- case R_SPARC_PC10:
- case R_SPARC_PC22:
- if (h != NULL)
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
-
- if (h != NULL
- && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
- break;
- /* Fall through. */
-
- case R_SPARC_DISP8:
- case R_SPARC_DISP16:
- case R_SPARC_DISP32:
- case R_SPARC_WDISP30:
- case R_SPARC_WDISP22:
- case R_SPARC_WDISP19:
- case R_SPARC_WDISP16:
- case R_SPARC_8:
- case R_SPARC_16:
- case R_SPARC_32:
- case R_SPARC_HI22:
- case R_SPARC_22:
- case R_SPARC_13:
- case R_SPARC_LO10:
- case R_SPARC_UA16:
- case R_SPARC_UA32:
- if (h != NULL)
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
-
- r_sparc_plt32:
- if (h != NULL && !info->shared)
- {
- /* We may need a .plt entry if the function this reloc
- refers to is in a shared lib. */
- h->plt.refcount += 1;
- }
-
- /* If we are creating a shared library, and this is a reloc
- against a global symbol, or a non PC relative reloc
- against a local symbol, then we need to copy the reloc
- into the shared library. However, if we are linking with
- -Bsymbolic, we do not need to copy a reloc against a
- global symbol which is defined in an object we are
- including in the link (i.e., DEF_REGULAR is set). At
- this point we have not seen all the input files, so it is
- possible that DEF_REGULAR is not set now but will be set
- later (it is never cleared). In case of a weak definition,
- DEF_REGULAR may be cleared later by a strong definition in
- a shared library. We account for that possibility below by
- storing information in the relocs_copied field of the hash
- table entry. A similar situation occurs when creating
- shared libraries and symbol visibility changes render the
- symbol local.
-
- If on the other hand, we are creating an executable, we
- may need to keep relocations for symbols satisfied by a
- dynamic library if we manage to avoid copy relocs for the
- symbol. */
- if ((info->shared
- && (sec->flags & SEC_ALLOC) != 0
- && (! _bfd_sparc_elf_howto_table[r_type].pc_relative
- || (h != NULL
- && (! info->symbolic
- || h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
- || (!info->shared
- && (sec->flags & SEC_ALLOC) != 0
- && h != NULL
- && (h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
- {
- struct elf32_sparc_dyn_relocs *p;
- struct elf32_sparc_dyn_relocs **head;
-
- /* When creating a shared object, we must copy these
- relocs into the output file. We create a reloc
- section in dynobj and make room for the reloc. */
- if (sreloc == NULL)
- {
- const char *name;
- bfd *dynobj;
-
- name = (bfd_elf_string_from_elf_section
- (abfd,
- elf_elfheader (abfd)->e_shstrndx,
- elf_section_data (sec)->rel_hdr.sh_name));
- if (name == NULL)
- return FALSE;
-
- BFD_ASSERT (strncmp (name, ".rela", 5) == 0
- && strcmp (bfd_get_section_name (abfd, sec),
- name + 5) == 0);
-
- if (htab->elf.dynobj == NULL)
- htab->elf.dynobj = abfd;
- dynobj = htab->elf.dynobj;
-
- sreloc = bfd_get_section_by_name (dynobj, name);
- if (sreloc == NULL)
- {
- flagword flags;
-
- sreloc = bfd_make_section (dynobj, name);
- flags = (SEC_HAS_CONTENTS | SEC_READONLY
- | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- if ((sec->flags & SEC_ALLOC) != 0)
- flags |= SEC_ALLOC | SEC_LOAD;
- if (sreloc == NULL
- || ! bfd_set_section_flags (dynobj, sreloc, flags)
- || ! bfd_set_section_alignment (dynobj, sreloc, 2))
- return FALSE;
- }
- elf_section_data (sec)->sreloc = sreloc;
- }
-
- /* If this is a global symbol, we count the number of
- relocations we need for this symbol. */
- if (h != NULL)
- head = &((struct elf32_sparc_link_hash_entry *) h)->dyn_relocs;
- else
- {
- /* Track dynamic relocs needed for local syms too.
- We really need local syms available to do this
- easily. Oh well. */
-
- asection *s;
- s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
- sec, r_symndx);
- if (s == NULL)
- return FALSE;
-
- head = ((struct elf32_sparc_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
- }
-
- p = *head;
- if (p == NULL || p->sec != sec)
- {
- bfd_size_type amt = sizeof *p;
- p = ((struct elf32_sparc_dyn_relocs *)
- bfd_alloc (htab->elf.dynobj, amt));
- if (p == NULL)
- return FALSE;
- p->next = *head;
- *head = p;
- p->sec = sec;
- p->count = 0;
- p->pc_count = 0;
- }
-
- p->count += 1;
- if (_bfd_sparc_elf_howto_table[r_type].pc_relative)
- p->pc_count += 1;
- }
-
- break;
-
- case R_SPARC_GNU_VTINHERIT:
- if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
- return FALSE;
- break;
-
- case R_SPARC_GNU_VTENTRY:
- if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
- return FALSE;
- break;
-
- default:
- break;
- }
- }
-
- return TRUE;
-}
-
-static asection *
-elf32_sparc_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;
-{
- if (h != NULL)
- {
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_SPARC_GNU_VTINHERIT:
- case R_SPARC_GNU_VTENTRY:
- break;
-
- default:
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- }
- else
- 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
-elf32_sparc_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sec;
- const Elf_Internal_Rela *relocs;
-{
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- bfd_signed_vma *local_got_refcounts;
- const Elf_Internal_Rela *rel, *relend;
-
- elf_section_data (sec)->local_dynrel = NULL;
-
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (abfd);
- local_got_refcounts = elf_local_got_refcounts (abfd);
-
- relend = relocs + sec->reloc_count;
- for (rel = relocs; rel < relend; rel++)
- {
- unsigned long r_symndx;
- unsigned int r_type;
- struct elf_link_hash_entry *h = NULL;
-
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- struct elf32_sparc_link_hash_entry *eh;
- struct elf32_sparc_dyn_relocs **pp;
- struct elf32_sparc_dyn_relocs *p;
-
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- eh = (struct elf32_sparc_link_hash_entry *) h;
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
- if (p->sec == sec)
- {
- /* Everything must go for SEC. */
- *pp = p->next;
- break;
- }
- }
-
- r_type = ELF32_R_TYPE (rel->r_info);
- r_type = elf32_sparc_tls_transition (info, abfd, r_type, h != NULL);
- switch (r_type)
- {
- case R_SPARC_TLS_LDM_HI22:
- case R_SPARC_TLS_LDM_LO10:
- if (elf32_sparc_hash_table (info)->tls_ldm_got.refcount > 0)
- elf32_sparc_hash_table (info)->tls_ldm_got.refcount -= 1;
- break;
-
- case R_SPARC_TLS_GD_HI22:
- case R_SPARC_TLS_GD_LO10:
- case R_SPARC_TLS_IE_HI22:
- case R_SPARC_TLS_IE_LO10:
- case R_SPARC_GOT10:
- case R_SPARC_GOT13:
- case R_SPARC_GOT22:
- if (h != NULL)
- {
- if (h->got.refcount > 0)
- h->got.refcount--;
- }
- else
- {
- if (local_got_refcounts[r_symndx] > 0)
- local_got_refcounts[r_symndx]--;
- }
- break;
-
- case R_SPARC_PC10:
- case R_SPARC_PC22:
- if (h != NULL
- && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
- break;
- /* Fall through. */
-
- case R_SPARC_DISP8:
- case R_SPARC_DISP16:
- case R_SPARC_DISP32:
- case R_SPARC_WDISP30:
- case R_SPARC_WDISP22:
- case R_SPARC_WDISP19:
- case R_SPARC_WDISP16:
- case R_SPARC_8:
- case R_SPARC_16:
- case R_SPARC_32:
- case R_SPARC_HI22:
- case R_SPARC_22:
- case R_SPARC_13:
- case R_SPARC_LO10:
- case R_SPARC_UA16:
- case R_SPARC_UA32:
- case R_SPARC_PLT32:
- if (info->shared)
- break;
- /* Fall through. */
-
- case R_SPARC_WPLT30:
- if (h != NULL)
- {
- if (h->plt.refcount > 0)
- h->plt.refcount--;
- }
- break;
-
- default:
- break;
- }
- }
-
- return TRUE;
-}
-
-/* Adjust a symbol defined by a dynamic object and referenced by a
- regular object. The current definition is in some section of the
- dynamic object, but we're not including those sections. We have to
- change the definition to something the rest of the link can
- understand. */
-
-static bfd_boolean
-elf32_sparc_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
-{
- struct elf32_sparc_link_hash_table *htab;
- struct elf32_sparc_link_hash_entry * eh;
- struct elf32_sparc_dyn_relocs *p;
- asection *s;
- unsigned int power_of_two;
-
- htab = elf32_sparc_hash_table (info);
-
- /* Make sure we know what is going on here. */
- BFD_ASSERT (htab->elf.dynobj != NULL
- && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
- || h->weakdef != NULL
- || ((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)));
-
- /* If this is a function, put it in the procedure linkage table. We
- will fill in the contents of the procedure linkage table later
- (although we could actually do it here). The STT_NOTYPE
- condition is a hack specifically for the Oracle libraries
- delivered for Solaris; for some inexplicable reason, they define
- some of their functions as STT_NOTYPE when they really should be
- STT_FUNC. */
- if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0
- || (h->type == STT_NOTYPE
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && (h->root.u.def.section->flags & SEC_CODE) != 0))
- {
- if (h->plt.refcount <= 0
- || (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
- && h->root.type != bfd_link_hash_undefweak
- && h->root.type != bfd_link_hash_undefined))
- {
- /* This case can occur if we saw a WPLT30 reloc in an input
- file, but the symbol was never referred to by a dynamic
- object, or if all references were garbage collected. In
- such a case, we don't actually need to build a procedure
- linkage table, and we can just do a WDISP30 reloc instead. */
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
-
- return TRUE;
- }
- else
- h->plt.offset = (bfd_vma) -1;
-
- /* If this is a weak symbol, and there is a real definition, the
- processor independent code will have arranged for us to see the
- real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
- {
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
- return TRUE;
- }
-
- /* This is a reference to a symbol defined by a dynamic object which
- is not a function. */
-
- /* If we are creating a shared library, we must presume that the
- only references to the symbol are via the global offset table.
- For such cases we need not do anything here; the relocations will
- be handled correctly by relocate_section. */
- if (info->shared)
- return TRUE;
-
- /* If there are no references to this symbol that do not use the
- GOT, we don't need to generate a copy reloc. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
- return TRUE;
-
- eh = (struct elf32_sparc_link_hash_entry *) h;
- for (p = eh->dyn_relocs; p != NULL; p = p->next)
- {
- s = p->sec->output_section;
- if (s != NULL && (s->flags & SEC_READONLY) != 0)
- break;
- }
-
- /* If we didn't find any dynamic relocs in read-only sections, then
- we'll be keeping the dynamic relocs and avoiding the copy reloc. */
- if (p == NULL)
- {
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
- return TRUE;
- }
-
- /* We must allocate the symbol in our .dynbss section, which will
- become part of the .bss section of the executable. There will be
- an entry for this symbol in the .dynsym section. The dynamic
- object will contain position independent code, so all references
- from the dynamic object to this symbol will go through the global
- offset table. The dynamic linker will use the .dynsym entry to
- determine the address it must put in the global offset table, so
- both the dynamic object and the regular object will refer to the
- same memory location for the variable. */
-
- /* We must generate a R_SPARC_COPY reloc to tell the dynamic linker
- to copy the initial value out of the dynamic object and into the
- runtime process image. We need to remember the offset into the
- .rel.bss section we are going to use. */
- if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
- {
- htab->srelbss->_raw_size += sizeof (Elf32_External_Rela);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
- }
-
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 3)
- power_of_two = 3;
-
- /* Apply the required alignment. */
- s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
- if (power_of_two > bfd_get_section_alignment (dynobj, s))
- {
- if (! bfd_set_section_alignment (dynobj, s, power_of_two))
- return FALSE;
- }
-
- /* Define the symbol as being at this point in the section. */
- h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
-
- /* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
-
- return TRUE;
-}
-
-/* Allocate space in .plt, .got and associated reloc sections for
- dynamic relocs. */
-
-static bfd_boolean
-allocate_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
-{
- struct bfd_link_info *info;
- struct elf32_sparc_link_hash_table *htab;
- struct elf32_sparc_link_hash_entry *eh;
- struct elf32_sparc_dyn_relocs *p;
-
- if (h->root.type == bfd_link_hash_indirect)
- return TRUE;
-
- 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;
-
- info = (struct bfd_link_info *) inf;
- htab = elf32_sparc_hash_table (info);
-
- if (htab->elf.dynamic_sections_created
- && h->plt.refcount > 0)
- {
- /* Make sure this symbol is output as a dynamic symbol.
- Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
- {
- asection *s = htab->splt;
-
- /* The first four entries in .plt are reserved. */
- if (s->_raw_size == 0)
- s->_raw_size = 4 * PLT_ENTRY_SIZE;
-
- /* The procedure linkage table has a maximum size. */
- if (s->_raw_size >= 0x400000)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- h->plt.offset = s->_raw_size;
-
- /* If this symbol is not defined in a regular file, and we are
- not generating a shared library, then set the symbol to this
- location in the .plt. This is required to make function
- pointers compare as equal between the normal executable and
- the shared library. */
- if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- h->root.u.def.section = s;
- h->root.u.def.value = h->plt.offset;
- }
-
- /* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
-
- /* We also need to make an entry in the .rela.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf32_External_Rela);
- }
- else
- {
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
- }
- else
- {
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
-
- /* If R_SPARC_TLS_IE_{HI22,LO10} symbol is now local to the binary,
- make it a R_SPARC_TLS_LE_{HI22,LO10} requiring no TLS entry. */
- if (h->got.refcount > 0
- && !info->shared
- && h->dynindx == -1
- && elf32_sparc_hash_entry(h)->tls_type == GOT_TLS_IE)
- h->got.offset = (bfd_vma) -1;
- else if (h->got.refcount > 0)
- {
- asection *s;
- bfd_boolean dyn;
- int tls_type = elf32_sparc_hash_entry(h)->tls_type;
-
- /* Make sure this symbol is output as a dynamic symbol.
- Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += 4;
- /* R_SPARC_TLS_GD_HI{22,LO10} needs 2 consecutive GOT slots. */
- if (tls_type == GOT_TLS_GD)
- s->_raw_size += 4;
- dyn = htab->elf.dynamic_sections_created;
- /* R_SPARC_TLS_IE_{HI22,LO10} needs one dynamic relocation,
- R_SPARC_TLS_GD_{HI22,LO10} needs one if local symbol and two if
- global. */
- if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
- || tls_type == GOT_TLS_IE)
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
- else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf32_External_Rela);
- else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
- }
- else
- h->got.offset = (bfd_vma) -1;
-
- eh = (struct elf32_sparc_link_hash_entry *) h;
- if (eh->dyn_relocs == NULL)
- return TRUE;
-
- /* In the shared -Bsymbolic case, discard space allocated for
- dynamic pc-relative relocs against symbols which turn out to be
- defined in regular objects. For the normal shared case, discard
- space for pc-relative relocs that have become local due to symbol
- visibility changes. */
-
- if (info->shared)
- {
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
- && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
- || info->symbolic))
- {
- struct elf32_sparc_dyn_relocs **pp;
-
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
- {
- p->count -= p->pc_count;
- p->pc_count = 0;
- if (p->count == 0)
- *pp = p->next;
- else
- pp = &p->next;
- }
- }
- }
- else
- {
- /* For the non-shared case, discard space for relocs against
- symbols which turn out to need copy relocs or are not
- dynamic. */
-
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- || (htab->elf.dynamic_sections_created
- && (h->root.type == bfd_link_hash_undefweak
- || h->root.type == bfd_link_hash_undefined))))
- {
- /* Make sure this symbol is output as a dynamic symbol.
- Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- /* If that succeeded, we know we'll be keeping all the
- relocs. */
- if (h->dynindx != -1)
- goto keep;
- }
-
- eh->dyn_relocs = NULL;
-
- keep: ;
- }
-
- /* Finally, allocate space. */
- for (p = eh->dyn_relocs; p != NULL; p = p->next)
- {
- asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
- }
-
- return TRUE;
-}
-
-/* Find any dynamic relocs that apply to read-only sections. */
-
-static bfd_boolean
-readonly_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
-{
- struct elf32_sparc_link_hash_entry *eh;
- struct elf32_sparc_dyn_relocs *p;
-
- if (h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- eh = (struct elf32_sparc_link_hash_entry *) h;
- for (p = eh->dyn_relocs; p != NULL; p = p->next)
- {
- asection *s = p->sec->output_section;
-
- if (s != NULL && (s->flags & SEC_READONLY) != 0)
- {
- struct bfd_link_info *info = (struct bfd_link_info *) inf;
-
- info->flags |= DF_TEXTREL;
-
- /* Not an error, just cut short the traversal. */
- return FALSE;
- }
- }
- return TRUE;
-}
-
-/* Set the sizes of the dynamic sections. */
-
-static bfd_boolean
-elf32_sparc_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
-{
- struct elf32_sparc_link_hash_table *htab;
- bfd *dynobj;
- asection *s;
- bfd *ibfd;
-
- htab = elf32_sparc_hash_table (info);
- dynobj = htab->elf.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->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
- s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
- }
- }
-
- /* Set up .got offsets for local syms, and space for local dynamic
- relocs. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
- {
- bfd_signed_vma *local_got;
- bfd_signed_vma *end_local_got;
- char *local_tls_type;
- bfd_size_type locsymcount;
- Elf_Internal_Shdr *symtab_hdr;
- asection *srel;
-
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
- continue;
-
- for (s = ibfd->sections; s != NULL; s = s->next)
- {
- struct elf32_sparc_dyn_relocs *p;
-
- for (p = *((struct elf32_sparc_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
- p != NULL;
- p = p->next)
- {
- if (!bfd_is_abs_section (p->sec)
- && bfd_is_abs_section (p->sec->output_section))
- {
- /* Input section has been discarded, either because
- it is a copy of a linkonce section or due to
- linker script /DISCARD/, so we'll be discarding
- the relocs too. */
- }
- else if (p->count != 0)
- {
- srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf32_External_Rela);
- if ((p->sec->output_section->flags & SEC_READONLY) != 0)
- info->flags |= DF_TEXTREL;
- }
- }
- }
-
- local_got = elf_local_got_refcounts (ibfd);
- if (!local_got)
- continue;
-
- symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
- locsymcount = symtab_hdr->sh_info;
- end_local_got = local_got + locsymcount;
- local_tls_type = elf32_sparc_local_got_tls_type (ibfd);
- s = htab->sgot;
- srel = htab->srelgot;
- for (; local_got < end_local_got; ++local_got, ++local_tls_type)
- {
- if (*local_got > 0)
- {
- *local_got = s->_raw_size;
- s->_raw_size += 4;
- if (*local_tls_type == GOT_TLS_GD)
- s->_raw_size += 4;
- if (info->shared
- || *local_tls_type == GOT_TLS_GD
- || *local_tls_type == GOT_TLS_IE)
- srel->_raw_size += sizeof (Elf32_External_Rela);
- }
- else
- *local_got = (bfd_vma) -1;
- }
- }
-
- if (htab->tls_ldm_got.refcount > 0)
- {
- /* Allocate 2 got entries and 1 dynamic reloc for
- R_SPARC_TLS_LDM_{HI22,LO10} relocs. */
- htab->tls_ldm_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 8;
- htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
- }
- else
- htab->tls_ldm_got.offset = -1;
-
- /* Allocate global sym .plt and .got entries, and space for global
- sym dynamic relocs. */
- elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Make space for the trailing nop in .plt. */
- if (htab->splt->_raw_size > 0)
- htab->splt->_raw_size += 4;
-
- /* If the .got section is more than 0x1000 bytes, we add
- 0x1000 to the value of _GLOBAL_OFFSET_TABLE_, so that 13
- bit relocations have a greater chance of working. */
- if (htab->sgot->_raw_size >= 0x1000
- && elf_hash_table (info)->hgot->root.u.def.value == 0)
- elf_hash_table (info)->hgot->root.u.def.value = 0x1000;
- }
-
- /* The check_relocs and adjust_dynamic_symbol entry points have
- determined the sizes of the various dynamic sections. Allocate
- memory for them. */
- for (s = dynobj->sections; s != NULL; s = s->next)
- {
- const char *name;
- bfd_boolean strip = FALSE;
-
- 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 (strncmp (name, ".rela", 5) == 0)
- {
- if (s->_raw_size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is to handle .rela.bss and
- .rel.plt. We must create it in
- create_dynamic_sections, because it must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
- {
- /* We use the reloc_count field as a counter if we need
- to copy relocs into the output file. */
- s->reloc_count = 0;
- }
- }
- else if (s != htab->splt && s != htab->sgot)
- {
- /* It's not one of our sections, so don't allocate space. */
- continue;
- }
-
- if (strip)
- {
- _bfd_strip_section_from_output (info, s);
- continue;
- }
-
- /* Allocate memory for the section contents. */
- /* FIXME: This should be a call to bfd_alloc not bfd_zalloc.
- Unused entries should be reclaimed before the section's contents
- are written out, but at the moment this does not happen. Thus in
- order to prevent writing out garbage, we initialise the section's
- contents to zero. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
- return FALSE;
- }
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Add some entries to the .dynamic section. We fill in the
- values later, in elf32_sparc_finish_dynamic_sections, but we
- must add the entries now so that we get the correct size for
- the .dynamic section. The DT_DEBUG entry is filled in by the
- dynamic linker and used by the debugger. */
-#define add_dynamic_entry(TAG, VAL) \
- _bfd_elf_add_dynamic_entry (info, TAG, VAL)
-
- if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
- }
-
- if (htab->srelplt->_raw_size != 0)
- {
- if (!add_dynamic_entry (DT_PLTGOT, 0)
- || !add_dynamic_entry (DT_PLTRELSZ, 0)
- || !add_dynamic_entry (DT_PLTREL, DT_RELA)
- || !add_dynamic_entry (DT_JMPREL, 0))
- return FALSE;
- }
-
- if (!add_dynamic_entry (DT_RELA, 0)
- || !add_dynamic_entry (DT_RELASZ, 0)
- || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
- return FALSE;
-
- /* If any dynamic relocs apply to a read-only section,
- then we need a DT_TEXTREL entry. */
- if ((info->flags & DF_TEXTREL) == 0)
- elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
- (PTR) info);
-
- if (info->flags & DF_TEXTREL)
- {
- if (!add_dynamic_entry (DT_TEXTREL, 0))
- return FALSE;
- }
- }
-#undef add_dynamic_entry
-
- return TRUE;
-}
-
-struct elf32_sparc_section_data
-{
- struct bfd_elf_section_data elf;
- unsigned int do_relax;
-};
-
-#define sec_do_relax(sec) \
- ((struct elf32_sparc_section_data *) elf_section_data (sec))->do_relax
-
-static bfd_boolean
-elf32_sparc_new_section_hook (abfd, sec)
- bfd *abfd;
- asection *sec;
-{
- struct elf32_sparc_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
-
- sdata = (struct elf32_sparc_section_data *) bfd_zalloc (abfd, amt);
- if (sdata == NULL)
- return FALSE;
- sec->used_by_bfd = (PTR) sdata;
-
- return _bfd_elf_new_section_hook (abfd, sec);
-}
-
-static bfd_boolean
-elf32_sparc_relax_section (abfd, section, link_info, again)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *section ATTRIBUTE_UNUSED;
- struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
- bfd_boolean *again;
-{
- *again = FALSE;
- sec_do_relax (section) = 1;
- return TRUE;
-}
-
-/* Return the base VMA address which should be subtracted from real addresses
- when resolving @dtpoff relocation.
- This is PT_TLS segment p_vaddr. */
-
-static bfd_vma
-dtpoff_base (info)
- struct bfd_link_info *info;
-{
- /* If tls_sec is NULL, we should have signalled an error already. */
- if (elf_hash_table (info)->tls_sec == NULL)
- return 0;
- return elf_hash_table (info)->tls_sec->vma;
-}
-
-/* Return the relocation value for @tpoff relocation
- if STT_TLS virtual address is ADDRESS. */
-
-static bfd_vma
-tpoff (info, address)
- struct bfd_link_info *info;
- bfd_vma address;
-{
- struct elf_link_hash_table *htab = elf_hash_table (info);
-
- /* If tls_sec is NULL, we should have signalled an error already. */
- if (htab->tls_sec == NULL)
- return 0;
- return address - htab->tls_size - htab->tls_sec->vma;
-}
-
-/* Relocate a SPARC ELF section. */
-
-static bfd_boolean
-elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
-{
- struct elf32_sparc_link_hash_table *htab;
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- bfd_vma *local_got_offsets;
- bfd_vma got_base;
- asection *sreloc;
- Elf_Internal_Rela *rel;
- Elf_Internal_Rela *relend;
-
- if (info->relocatable)
- return TRUE;
-
- htab = elf32_sparc_hash_table (info);
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (input_bfd);
- local_got_offsets = elf_local_got_offsets (input_bfd);
-
- if (elf_hash_table (info)->hgot == NULL)
- got_base = 0;
- else
- got_base = elf_hash_table (info)->hgot->root.u.def.value;
-
- sreloc = elf_section_data (input_section)->sreloc;
-
- rel = relocs;
- relend = relocs + input_section->reloc_count;
- for (; rel < relend; rel++)
- {
- int r_type, tls_type;
- reloc_howto_type *howto;
- unsigned long r_symndx;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
- asection *sec;
- bfd_vma relocation, off;
- bfd_reloc_status_type r;
- bfd_boolean is_plt = FALSE;
- bfd_boolean unresolved_reloc;
-
- r_type = ELF32_R_TYPE (rel->r_info);
-
- if (r_type == R_SPARC_GNU_VTINHERIT
- || r_type == R_SPARC_GNU_VTENTRY)
- continue;
-
- if (r_type < 0 || r_type >= (int) R_SPARC_max_std)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- howto = _bfd_sparc_elf_howto_table + r_type;
-
- /* This is a final link. */
- r_symndx = ELF32_R_SYM (rel->r_info);
- h = NULL;
- sym = NULL;
- sec = NULL;
- unresolved_reloc = FALSE;
- 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 warned ATTRIBUTE_UNUSED;
-
- RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
- r_symndx, symtab_hdr, sym_hashes,
- h, sec, relocation,
- unresolved_reloc, warned);
- }
-
- switch (r_type)
- {
- case R_SPARC_GOT10:
- case R_SPARC_GOT13:
- case R_SPARC_GOT22:
- /* Relocation is to the entry for this symbol in the global
- offset table. */
- if (htab->sgot == NULL)
- abort ();
-
- if (h != NULL)
- {
- bfd_boolean dyn;
-
- off = h->got.offset;
- BFD_ASSERT (off != (bfd_vma) -1);
- dyn = elf_hash_table (info)->dynamic_sections_created;
-
- if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
- || (info->shared
- && (info->symbolic
- || h->dynindx == -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
- {
- /* This is actually a static link, or it is a
- -Bsymbolic link and the symbol is defined
- locally, or the symbol was forced to be local
- because of a version file. We must initialize
- this entry in the global offset table. Since the
- offset must always be a multiple of 4, we use the
- least significant bit to record whether we have
- initialized it already.
-
- When doing a dynamic link, we create a .rela.got
- relocation entry to initialize the value. This
- is done in the finish_dynamic_symbol routine. */
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
- bfd_put_32 (output_bfd, relocation,
- htab->sgot->contents + off);
- h->got.offset |= 1;
- }
- }
- else
- unresolved_reloc = FALSE;
- }
- else
- {
- BFD_ASSERT (local_got_offsets != NULL
- && local_got_offsets[r_symndx] != (bfd_vma) -1);
-
- off = local_got_offsets[r_symndx];
-
- /* The offset must always be a multiple of 4. We use
- the least significant bit to record whether we have
- already processed this entry. */
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
-
- if (info->shared)
- {
- asection *s;
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
-
- /* We need to generate a R_SPARC_RELATIVE reloc
- for the dynamic linker. */
- s = htab->srelgot;
- BFD_ASSERT (s != NULL);
-
- outrel.r_offset = (htab->sgot->output_section->vma
- + htab->sgot->output_offset
- + off);
- outrel.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
- outrel.r_addend = relocation;
- relocation = 0;
- loc = s->contents;
- loc += s->reloc_count++ * sizeof (Elf32_External_Rela);
- bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
- }
-
- bfd_put_32 (output_bfd, relocation,
- htab->sgot->contents + off);
- local_got_offsets[r_symndx] |= 1;
- }
- }
- relocation = htab->sgot->output_offset + off - got_base;
- break;
-
- case R_SPARC_PLT32:
- if (h == NULL || h->plt.offset == (bfd_vma) -1)
- {
- r_type = R_SPARC_32;
- goto r_sparc_plt32;
- }
- /* Fall through. */
- case R_SPARC_WPLT30:
- r_sparc_wplt30:
- /* Relocation is to the entry for this symbol in the
- procedure linkage table. */
-
- /* The Solaris native assembler will generate a WPLT30 reloc
- for a local symbol if you assemble a call from one
- section to another when using -K pic. We treat it as
- WDISP30. */
- if (h == NULL)
- break;
-
- if (h->plt.offset == (bfd_vma) -1 || htab->splt == NULL)
- {
- /* We didn't make a PLT entry for this symbol. This
- happens when statically linking PIC code, or when
- using -Bsymbolic. */
- break;
- }
-
- relocation = (htab->splt->output_section->vma
- + htab->splt->output_offset
- + h->plt.offset);
- unresolved_reloc = FALSE;
- if (r_type == R_SPARC_PLT32)
- {
- r_type = R_SPARC_32;
- is_plt = TRUE;
- goto r_sparc_plt32;
- }
- break;
-
- case R_SPARC_PC10:
- case R_SPARC_PC22:
- if (h != NULL
- && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
- break;
- /* Fall through. */
- case R_SPARC_DISP8:
- case R_SPARC_DISP16:
- case R_SPARC_DISP32:
- case R_SPARC_WDISP30:
- case R_SPARC_WDISP22:
- case R_SPARC_WDISP19:
- case R_SPARC_WDISP16:
- case R_SPARC_8:
- case R_SPARC_16:
- case R_SPARC_32:
- case R_SPARC_HI22:
- case R_SPARC_22:
- case R_SPARC_13:
- case R_SPARC_LO10:
- case R_SPARC_UA16:
- case R_SPARC_UA32:
- 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)
- break;
-
- if ((info->shared
- && (! howto->pc_relative
- || (h != NULL
- && h->dynindx != -1
- && (! info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
- || (!info->shared
- && h != NULL
- && h->dynindx != -1
- && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
- || h->root.type == bfd_link_hash_undefweak
- || h->root.type == bfd_link_hash_undefined)))
- {
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
- bfd_boolean skip, relocate = FALSE;
-
- /* When generating a shared object, these relocations
- are copied into the output file to be resolved at run
- time. */
-
- BFD_ASSERT (sreloc != NULL);
-
- skip = FALSE;
-
- outrel.r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section,
- rel->r_offset);
- if (outrel.r_offset == (bfd_vma) -1)
- skip = TRUE;
- else if (outrel.r_offset == (bfd_vma) -2)
- skip = TRUE, relocate = TRUE;
- outrel.r_offset += (input_section->output_section->vma
- + input_section->output_offset);
-
- /* Optimize unaligned reloc usage now that we know where
- it finally resides. */
- switch (r_type)
- {
- case R_SPARC_16:
- if (outrel.r_offset & 1)
- r_type = R_SPARC_UA16;
- break;
- case R_SPARC_UA16:
- if (!(outrel.r_offset & 1))
- r_type = R_SPARC_16;
- break;
- case R_SPARC_32:
- if (outrel.r_offset & 3)
- r_type = R_SPARC_UA32;
- break;
- case R_SPARC_UA32:
- if (!(outrel.r_offset & 3))
- r_type = R_SPARC_32;
- break;
- case R_SPARC_DISP8:
- case R_SPARC_DISP16:
- case R_SPARC_DISP32:
- /* If the symbol is not dynamic, we should not keep
- a dynamic relocation. But an .rela.* slot has been
- allocated for it, output R_SPARC_NONE.
- FIXME: Add code tracking needed dynamic relocs as
- e.g. i386 has. */
- if (h->dynindx == -1)
- skip = TRUE, relocate = TRUE;
- break;
- }
-
- if (skip)
- memset (&outrel, 0, sizeof outrel);
- /* h->dynindx may be -1 if the symbol was marked to
- become local. */
- else if (h != NULL && ! is_plt
- && ((! info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
- {
- BFD_ASSERT (h->dynindx != -1);
- outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
- outrel.r_addend = rel->r_addend;
- }
- else
- {
- if (r_type == R_SPARC_32)
- {
- outrel.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
- outrel.r_addend = relocation + rel->r_addend;
- }
- else
- {
- long indx;
-
- if (is_plt)
- sec = htab->splt;
-
- if (bfd_is_abs_section (sec))
- indx = 0;
- else if (sec == NULL || sec->owner == NULL)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- else
- {
- asection *osec;
-
- osec = sec->output_section;
- indx = elf_section_data (osec)->dynindx;
-
- /* FIXME: we really should be able to link non-pic
- shared libraries. */
- if (indx == 0)
- {
- BFD_FAIL ();
- (*_bfd_error_handler)
- (_("%s: probably compiled without -fPIC?"),
- bfd_archive_filename (input_bfd));
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- }
-
- outrel.r_info = ELF32_R_INFO (indx, r_type);
- outrel.r_addend = relocation + rel->r_addend;
- }
- }
-
- loc = sreloc->contents;
- loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela);
- bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
-
- /* This reloc will be computed at runtime, so there's no
- need to do anything now. */
- if (! relocate)
- continue;
- }
- break;
-
- case R_SPARC_TLS_GD_HI22:
- if (! elf32_sparc_tdata (input_bfd)->has_tlsgd)
- {
- /* R_SPARC_REV32 used the same reloc number as
- R_SPARC_TLS_GD_HI22. */
- r_type = R_SPARC_REV32;
- break;
- }
- /* Fall through */
-
- case R_SPARC_TLS_GD_LO10:
- case R_SPARC_TLS_IE_HI22:
- case R_SPARC_TLS_IE_LO10:
- r_type = elf32_sparc_tls_transition (info, input_bfd, r_type,
- h == NULL);
- tls_type = GOT_UNKNOWN;
- if (h == NULL && local_got_offsets)
- tls_type = elf32_sparc_local_got_tls_type (input_bfd) [r_symndx];
- else if (h != NULL)
- {
- tls_type = elf32_sparc_hash_entry(h)->tls_type;
- if (!info->shared && h->dynindx == -1 && tls_type == GOT_TLS_IE)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_SPARC_TLS_GD_HI22:
- case R_SPARC_TLS_IE_HI22:
- r_type = R_SPARC_TLS_LE_HIX22;
- break;
- default:
- r_type = R_SPARC_TLS_LE_LOX10;
- break;
- }
- }
- if (tls_type == GOT_TLS_IE)
- switch (r_type)
- {
- case R_SPARC_TLS_GD_HI22:
- r_type = R_SPARC_TLS_IE_HI22;
- break;
- case R_SPARC_TLS_GD_LO10:
- r_type = R_SPARC_TLS_IE_LO10;
- break;
- }
-
- if (r_type == R_SPARC_TLS_LE_HIX22)
- {
- relocation = tpoff (info, relocation);
- break;
- }
- if (r_type == R_SPARC_TLS_LE_LOX10)
- {
- /* Change add into xor. */
- relocation = tpoff (info, relocation);
- bfd_put_32 (output_bfd, (bfd_get_32 (input_bfd,
- contents + rel->r_offset)
- | 0x80182000), contents + rel->r_offset);
- break;
- }
-
- if (h != NULL)
- {
- off = h->got.offset;
- h->got.offset |= 1;
- }
- else
- {
- BFD_ASSERT (local_got_offsets != NULL);
- off = local_got_offsets[r_symndx];
- local_got_offsets[r_symndx] |= 1;
- }
-
- r_sparc_tlsldm:
- if (htab->sgot == NULL)
- abort ();
-
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
- Elf_Internal_Rela outrel;
- Elf32_External_Rela *loc;
- int dr_type, indx;
-
- if (htab->srelgot == NULL)
- abort ();
-
- bfd_put_32 (output_bfd, 0, htab->sgot->contents + off);
- outrel.r_offset = (htab->sgot->output_section->vma
- + htab->sgot->output_offset + off);
- indx = h && h->dynindx != -1 ? h->dynindx : 0;
- if (r_type == R_SPARC_TLS_IE_HI22
- || r_type == R_SPARC_TLS_IE_LO10)
- dr_type = R_SPARC_TLS_TPOFF32;
- else
- dr_type = R_SPARC_TLS_DTPMOD32;
- if (dr_type == R_SPARC_TLS_TPOFF32 && indx == 0)
- outrel.r_addend = relocation - dtpoff_base (info);
- else
- outrel.r_addend = 0;
- outrel.r_info = ELF32_R_INFO (indx, dr_type);
- loc = (Elf32_External_Rela *) htab->srelgot->contents;
- loc += htab->srelgot->reloc_count++;
- bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- (bfd_byte *) loc);
-
- if (r_type == R_SPARC_TLS_GD_HI22
- || r_type == R_SPARC_TLS_GD_LO10)
- {
- if (indx == 0)
- {
- BFD_ASSERT (! unresolved_reloc);
- bfd_put_32 (output_bfd,
- relocation - dtpoff_base (info),
- htab->sgot->contents + off + 4);
- }
- else
- {
- bfd_put_32 (output_bfd, 0,
- htab->sgot->contents + off + 4);
- outrel.r_info = ELF32_R_INFO (indx,
- R_SPARC_TLS_DTPOFF32);
- outrel.r_offset += 4;
- htab->srelgot->reloc_count++;
- loc++;
- bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- (bfd_byte *) loc);
- }
- }
- else if (dr_type == R_SPARC_TLS_DTPMOD32)
- {
- bfd_put_32 (output_bfd, 0,
- htab->sgot->contents + off + 4);
- }
- }
-
- if (off >= (bfd_vma) -2)
- abort ();
-
- relocation = htab->sgot->output_offset + off - got_base;
- unresolved_reloc = FALSE;
- howto = _bfd_sparc_elf_howto_table + r_type;
- break;
-
- case R_SPARC_TLS_LDM_HI22:
- case R_SPARC_TLS_LDM_LO10:
- if (! info->shared)
- {
- bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
- continue;
- }
- off = htab->tls_ldm_got.offset;
- htab->tls_ldm_got.offset |= 1;
- goto r_sparc_tlsldm;
-
- case R_SPARC_TLS_LDO_HIX22:
- case R_SPARC_TLS_LDO_LOX10:
- if (info->shared)
- relocation -= dtpoff_base (info);
- else
- relocation = tpoff (info, relocation);
- break;
-
- case R_SPARC_TLS_LE_HIX22:
- case R_SPARC_TLS_LE_LOX10:
- if (info->shared)
- {
- Elf_Internal_Rela outrel;
- bfd_boolean skip, relocate = FALSE;
-
- BFD_ASSERT (sreloc != NULL);
- skip = FALSE;
- outrel.r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section,
- rel->r_offset);
- if (outrel.r_offset == (bfd_vma) -1)
- skip = TRUE;
- else if (outrel.r_offset == (bfd_vma) -2)
- skip = TRUE, relocate = TRUE;
- outrel.r_offset += (input_section->output_section->vma
- + input_section->output_offset);
- if (skip)
- memset (&outrel, 0, sizeof outrel);
- else
- {
- outrel.r_info = ELF32_R_INFO (0, r_type);
- outrel.r_addend = relocation - dtpoff_base (info)
- + rel->r_addend;
- }
-
- bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- (bfd_byte *) (((Elf32_External_Rela *)
- sreloc->contents)
- + sreloc->reloc_count));
- ++sreloc->reloc_count;
- continue;
- }
- relocation = tpoff (info, relocation);
- break;
-
- case R_SPARC_TLS_LDM_CALL:
- if (! info->shared)
- {
- /* mov %g0, %o0 */
- bfd_put_32 (output_bfd, 0x90100000, contents + rel->r_offset);
- continue;
- }
- /* Fall through */
-
- case R_SPARC_TLS_GD_CALL:
- tls_type = GOT_UNKNOWN;
- if (h == NULL && local_got_offsets)
- tls_type = elf32_sparc_local_got_tls_type (input_bfd) [r_symndx];
- else if (h != NULL)
- tls_type = elf32_sparc_hash_entry(h)->tls_type;
- if (! info->shared
- || (r_type == R_SPARC_TLS_GD_CALL && tls_type == GOT_TLS_IE))
- {
- bfd_vma insn;
-
- if (!info->shared && (h == NULL || h->dynindx == -1))
- {
- /* GD -> LE */
- bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
- continue;
- }
-
- /* GD -> IE */
- if (rel + 1 < relend
- && ELF32_R_TYPE (rel[1].r_info) == R_SPARC_TLS_GD_ADD
- && rel[1].r_offset == rel->r_offset + 4
- && ELF32_R_SYM (rel[1].r_info) == r_symndx
- && (((insn = bfd_get_32 (input_bfd,
- contents + rel[1].r_offset))
- >> 25) & 0x1f) == 8)
- {
- /* We have
- call __tls_get_addr, %tgd_call(foo)
- add %reg1, %reg2, %o0, %tgd_add(foo)
- and change it into IE:
- ld [%reg1 + %reg2], %o0, %tie_ld(foo)
- add %g7, %o0, %o0, %tie_add(foo).
- add is 0x80000000 | (rd << 25) | (rs1 << 14) | rs2,
- ld is 0xc0000000 | (rd << 25) | (rs1 << 14) | rs2. */
- bfd_put_32 (output_bfd, insn | 0xc0000000,
- contents + rel->r_offset);
- bfd_put_32 (output_bfd, 0x9001c008,
- contents + rel->r_offset + 4);
- rel++;
- continue;
- }
-
- bfd_put_32 (output_bfd, 0x9001c008, contents + rel->r_offset);
- continue;
- }
-
- h = (struct elf_link_hash_entry *)
- bfd_link_hash_lookup (info->hash, "__tls_get_addr", FALSE,
- FALSE, TRUE);
- BFD_ASSERT (h != NULL);
- r_type = R_SPARC_WPLT30;
- howto = _bfd_sparc_elf_howto_table + r_type;
- goto r_sparc_wplt30;
-
- case R_SPARC_TLS_GD_ADD:
- tls_type = GOT_UNKNOWN;
- if (h == NULL && local_got_offsets)
- tls_type = elf32_sparc_local_got_tls_type (input_bfd) [r_symndx];
- else if (h != NULL)
- tls_type = elf32_sparc_hash_entry(h)->tls_type;
- if (! info->shared || tls_type == GOT_TLS_IE)
- {
- /* add %reg1, %reg2, %reg3, %tgd_add(foo)
- changed into IE:
- ld [%reg1 + %reg2], %reg3, %tie_ld(foo)
- or LE:
- add %g7, %reg2, %reg3. */
- bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- if ((h != NULL && h->dynindx != -1) || info->shared)
- relocation = insn | 0xc0000000;
- else
- relocation = (insn & ~0x7c000) | 0x1c000;
- bfd_put_32 (output_bfd, relocation, contents + rel->r_offset);
- }
- continue;
-
- case R_SPARC_TLS_LDM_ADD:
- if (! info->shared)
- bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
- continue;
-
- case R_SPARC_TLS_LDO_ADD:
- if (! info->shared)
- {
- /* Change rs1 into %g7. */
- bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- insn = (insn & ~0x7c000) | 0x1c000;
- bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
- }
- continue;
-
- case R_SPARC_TLS_IE_LD:
- case R_SPARC_TLS_IE_LDX:
- if (! info->shared && (h == NULL || h->dynindx == -1))
- {
- bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- int rs2 = insn & 0x1f;
- int rd = (insn >> 25) & 0x1f;
-
- if (rs2 == rd)
- relocation = SPARC_NOP;
- else
- relocation = 0x80100000 | (insn & 0x3e00001f);
- bfd_put_32 (output_bfd, relocation, contents + rel->r_offset);
- }
- continue;
-
- case R_SPARC_TLS_IE_ADD:
- /* Totally useless relocation. */
- continue;
-
- case R_SPARC_TLS_DTPOFF32:
- relocation -= dtpoff_base (info);
- break;
-
- default:
- break;
- }
-
- /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
- because such sections are not SEC_ALLOC and thus ld.so will
- not process them. */
- if (unresolved_reloc
- && !((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
- (*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
- (long) rel->r_offset,
- h->root.root.string);
-
- r = bfd_reloc_continue;
- if (r_type == R_SPARC_WDISP16)
- {
- bfd_vma x;
-
- relocation += rel->r_addend;
- relocation -= (input_section->output_section->vma
- + input_section->output_offset);
- relocation -= rel->r_offset;
-
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x |= ((((relocation >> 2) & 0xc000) << 6)
- | ((relocation >> 2) & 0x3fff));
- bfd_put_32 (input_bfd, x, contents + rel->r_offset);
-
- if ((bfd_signed_vma) relocation < - 0x40000
- || (bfd_signed_vma) relocation > 0x3ffff)
- r = bfd_reloc_overflow;
- else
- r = bfd_reloc_ok;
- }
- else if (r_type == R_SPARC_REV32)
- {
- bfd_vma x;
-
- relocation = relocation + rel->r_addend;
-
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = x + relocation;
- bfd_putl32 (/*input_bfd,*/ x, contents + rel->r_offset);
- r = bfd_reloc_ok;
- }
- else if (r_type == R_SPARC_TLS_LDO_HIX22
- || r_type == R_SPARC_TLS_LE_HIX22)
- {
- bfd_vma x;
-
- relocation += rel->r_addend;
- relocation = relocation ^ 0xffffffff;
-
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = (x & ~(bfd_vma) 0x3fffff) | ((relocation >> 10) & 0x3fffff);
- bfd_put_32 (input_bfd, x, contents + rel->r_offset);
- r = bfd_reloc_ok;
- }
- else if (r_type == R_SPARC_TLS_LDO_LOX10
- || r_type == R_SPARC_TLS_LE_LOX10)
- {
- bfd_vma x;
-
- relocation += rel->r_addend;
- relocation = (relocation & 0x3ff) | 0x1c00;
-
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = (x & ~(bfd_vma) 0x1fff) | relocation;
- bfd_put_32 (input_bfd, x, contents + rel->r_offset);
-
- r = bfd_reloc_ok;
- }
- else if ((r_type == R_SPARC_WDISP30 || r_type == R_SPARC_WPLT30)
- && sec_do_relax (input_section)
- && rel->r_offset + 4 < input_section->_raw_size)
- {
-#define G0 0
-#define O7 15
-#define XCC (2 << 20)
-#define COND(x) (((x)&0xf)<<25)
-#define CONDA COND(0x8)
-#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC)
-#define INSN_BA (F2(0,2) | CONDA)
-#define INSN_OR F3(2, 0x2, 0)
-#define INSN_NOP F2(0,4)
-
- bfd_vma x, y;
-
- /* If the instruction is a call with either:
- restore
- arithmetic instruction with rd == %o7
- where rs1 != %o7 and rs2 if it is register != %o7
- then we can optimize if the call destination is near
- by changing the call into a branch always. */
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- y = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
- if ((x & OP(~0)) == OP(1) && (y & OP(~0)) == OP(2))
- {
- if (((y & OP3(~0)) == OP3(0x3d) /* restore */
- || ((y & OP3(0x28)) == 0 /* arithmetic */
- && (y & RD(~0)) == RD(O7)))
- && (y & RS1(~0)) != RS1(O7)
- && ((y & F3I(~0))
- || (y & RS2(~0)) != RS2(O7)))
- {
- bfd_vma reloc;
-
- reloc = relocation + rel->r_addend - rel->r_offset;
- reloc -= (input_section->output_section->vma
- + input_section->output_offset);
-
- /* Ensure the reloc fits into simm22. */
- if ((reloc & 3) == 0
- && ((reloc & ~(bfd_vma)0x7fffff) == 0
- || ((reloc | 0x7fffff) == ~(bfd_vma)0)))
- {
- reloc >>= 2;
-
- /* Check whether it fits into simm19 on v9. */
- if (((reloc & 0x3c0000) == 0
- || (reloc & 0x3c0000) == 0x3c0000)
- && (elf_elfheader (output_bfd)->e_flags & EF_SPARC_32PLUS))
- x = INSN_BPA | (reloc & 0x7ffff); /* ba,pt %xcc */
- else
- x = INSN_BA | (reloc & 0x3fffff); /* ba */
- bfd_put_32 (input_bfd, x, contents + rel->r_offset);
- r = bfd_reloc_ok;
- if (rel->r_offset >= 4
- && (y & (0xffffffff ^ RS1(~0)))
- == (INSN_OR | RD(O7) | RS2(G0)))
- {
- bfd_vma z;
- unsigned int reg;
-
- z = bfd_get_32 (input_bfd,
- contents + rel->r_offset - 4);
- if ((z & (0xffffffff ^ RD(~0)))
- != (INSN_OR | RS1(O7) | RS2(G0)))
- break;
-
- /* The sequence was
- or %o7, %g0, %rN
- call foo
- or %rN, %g0, %o7
-
- If call foo was replaced with ba, replace
- or %rN, %g0, %o7 with nop. */
-
- reg = (y & RS1(~0)) >> 14;
- if (reg != ((z & RD(~0)) >> 25)
- || reg == G0 || reg == O7)
- break;
-
- bfd_put_32 (input_bfd, (bfd_vma) INSN_NOP,
- contents + rel->r_offset + 4);
- }
-
- }
- }
- }
- }
-
- if (r == bfd_reloc_continue)
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset,
- relocation, rel->r_addend);
-
- if (r != bfd_reloc_ok)
- {
- switch (r)
- {
- default:
- case bfd_reloc_outofrange:
- abort ();
- case bfd_reloc_overflow:
- {
- const char *name;
-
- if (h != NULL)
- name = h->root.root.string;
- else
- {
- name = bfd_elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
- if (name == NULL)
- return FALSE;
- if (*name == '\0')
- name = bfd_section_name (input_bfd, sec);
- }
- if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
- return FALSE;
- }
- break;
- }
- }
- }
-
- return TRUE;
-}
-
-/* Finish up dynamic symbol handling. We set the contents of various
- dynamic sections here. */
-
-static bfd_boolean
-elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
-{
- bfd *dynobj;
- struct elf32_sparc_link_hash_table *htab;
-
- htab = elf32_sparc_hash_table (info);
- dynobj = htab->elf.dynobj;
-
- if (h->plt.offset != (bfd_vma) -1)
- {
- asection *splt;
- asection *srela;
- Elf_Internal_Rela rela;
- bfd_byte *loc;
-
- /* This symbol has an entry in the procedure linkage table. Set
- it up. */
-
- BFD_ASSERT (h->dynindx != -1);
-
- splt = htab->splt;
- srela = htab->srelplt;
- BFD_ASSERT (splt != NULL && srela != NULL);
-
- /* Fill in the entry in the procedure linkage table. */
- bfd_put_32 (output_bfd,
- PLT_ENTRY_WORD0 + h->plt.offset,
- splt->contents + h->plt.offset);
- bfd_put_32 (output_bfd,
- (PLT_ENTRY_WORD1
- + (((- (h->plt.offset + 4)) >> 2) & 0x3fffff)),
- splt->contents + h->plt.offset + 4);
- bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD2,
- splt->contents + h->plt.offset + 8);
-
- /* Fill in the entry in the .rela.plt section. */
- rela.r_offset = (splt->output_section->vma
- + splt->output_offset
- + h->plt.offset);
- rela.r_info = ELF32_R_INFO (h->dynindx, R_SPARC_JMP_SLOT);
- rela.r_addend = 0;
- loc = srela->contents;
- loc += (h->plt.offset / PLT_ENTRY_SIZE - 4) * sizeof (Elf32_External_Rela);
- bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
-
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- /* Mark the symbol as undefined, rather than as defined in
- the .plt section. Leave the value alone. */
- sym->st_shndx = SHN_UNDEF;
- /* If the symbol is weak, we do need to clear the value.
- Otherwise, the PLT entry would provide a definition for
- the symbol even if the symbol wasn't defined anywhere,
- and so the symbol would never be NULL. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
- == 0)
- sym->st_value = 0;
- }
- }
-
- if (h->got.offset != (bfd_vma) -1
- && elf32_sparc_hash_entry(h)->tls_type != GOT_TLS_GD
- && elf32_sparc_hash_entry(h)->tls_type != GOT_TLS_IE)
- {
- asection *sgot;
- asection *srela;
- Elf_Internal_Rela rela;
- bfd_byte *loc;
-
- /* This symbol has an entry in the global offset table. Set it
- up. */
-
- sgot = htab->sgot;
- srela = htab->srelgot;
- BFD_ASSERT (sgot != NULL && srela != NULL);
-
- rela.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + (h->got.offset &~ (bfd_vma) 1));
-
- /* If this is a -Bsymbolic link, and the symbol is defined
- locally, we just want to emit a RELATIVE reloc. Likewise if
- the symbol was forced to be local because of a version file.
- The entry in the global offset table will already have been
- initialized in the relocate_section function. */
- if (info->shared
- && (info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
- {
- asection *sec = h->root.u.def.section;
- rela.r_info = ELF32_R_INFO (0, R_SPARC_RELATIVE);
- rela.r_addend = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else
- {
- rela.r_info = ELF32_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
- rela.r_addend = 0;
- }
-
- bfd_put_32 (output_bfd, (bfd_vma) 0,
- sgot->contents + (h->got.offset &~ (bfd_vma) 1));
- loc = srela->contents;
- loc += srela->reloc_count++ * sizeof (Elf32_External_Rela);
- bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
- }
-
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
- {
- asection *s;
- Elf_Internal_Rela rela;
- bfd_byte *loc;
-
- /* This symbols needs a copy reloc. Set it up. */
-
- BFD_ASSERT (h->dynindx != -1);
-
- s = bfd_get_section_by_name (h->root.u.def.section->owner,
- ".rela.bss");
- BFD_ASSERT (s != NULL);
-
- rela.r_offset = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- rela.r_info = ELF32_R_INFO (h->dynindx, R_SPARC_COPY);
- rela.r_addend = 0;
- loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela);
- bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
- }
-
- /* Mark some specially defined symbols as absolute. */
- if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
- sym->st_shndx = SHN_ABS;
-
- return TRUE;
-}
-
-/* Finish up the dynamic sections. */
-
-static bfd_boolean
-elf32_sparc_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
-{
- bfd *dynobj;
- asection *sdyn;
- struct elf32_sparc_link_hash_table *htab;
-
- htab = elf32_sparc_hash_table (info);
- dynobj = htab->elf.dynobj;
-
- sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- asection *splt;
- Elf32_External_Dyn *dyncon, *dynconend;
-
- splt = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (splt != NULL && sdyn != NULL);
-
- dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
- for (; dyncon < dynconend; dyncon++)
- {
- Elf_Internal_Dyn dyn;
- const char *name;
- bfd_boolean size;
-
- bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
-
- switch (dyn.d_tag)
- {
- case DT_PLTGOT: name = ".plt"; size = FALSE; break;
- case DT_PLTRELSZ: name = ".rela.plt"; size = TRUE; break;
- case DT_JMPREL: name = ".rela.plt"; size = FALSE; break;
- default: name = NULL; size = FALSE; break;
- }
-
- if (name != NULL)
- {
- asection *s;
-
- s = bfd_get_section_by_name (output_bfd, name);
- if (s == NULL)
- dyn.d_un.d_val = 0;
- else
- {
- if (! size)
- dyn.d_un.d_ptr = s->vma;
- else
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
- }
- }
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
- }
- }
-
- /* Clear the first four entries in the procedure linkage table,
- and put a nop in the last four bytes. */
- if (splt->_raw_size > 0)
- {
- memset (splt->contents, 0, 4 * PLT_ENTRY_SIZE);
- bfd_put_32 (output_bfd, (bfd_vma) SPARC_NOP,
- splt->contents + splt->_raw_size - 4);
- }
-
- elf_section_data (splt->output_section)->this_hdr.sh_entsize = 0;
- }
-
- /* Set the first entry in the global offset table to the address of
- the dynamic section. */
- if (htab->sgot && htab->sgot->_raw_size > 0)
- {
- if (sdyn == NULL)
- bfd_put_32 (output_bfd, (bfd_vma) 0, htab->sgot->contents);
- else
- bfd_put_32 (output_bfd,
- sdyn->output_section->vma + sdyn->output_offset,
- htab->sgot->contents);
- }
-
- if (htab->sgot)
- elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4;
-
- return TRUE;
-}
-
/* Functions for dealing with the e_flags field.
We don't define set_private_flags or copy_private_bfd_data because
@@ -3301,11 +67,10 @@ elf32_sparc_finish_dynamic_sections (output_bfd, info)
object file when linking. */
static bfd_boolean
-elf32_sparc_merge_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+elf32_sparc_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
bfd_boolean error;
+ unsigned long ibfd_mach;
/* FIXME: This should not be static. */
static unsigned long previous_ibfd_e_flags = (unsigned long) -1;
@@ -3315,17 +80,17 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
error = FALSE;
- if (bfd_get_mach (ibfd) >= bfd_mach_sparc_v9)
+ ibfd_mach = bfd_get_mach (ibfd);
+ if (bfd_mach_sparc_64bit_p (ibfd_mach))
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: compiled for a 64 bit system and target is 32 bit"),
- bfd_archive_filename (ibfd));
+ (_("%B: compiled for a 64 bit system and target is 32 bit"), ibfd);
}
else if ((ibfd->flags & DYNAMIC) == 0)
{
- if (bfd_get_mach (obfd) < bfd_get_mach (ibfd))
- bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd));
+ if (bfd_get_mach (obfd) < ibfd_mach)
+ bfd_set_arch_mach (obfd, bfd_arch_sparc, ibfd_mach);
}
if (((elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA)
@@ -3333,8 +98,7 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
&& previous_ibfd_e_flags != (unsigned long) -1)
{
(*_bfd_error_handler)
- (_("%s: linking little endian files with big endian files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking little endian files with big endian files"), ibfd);
error = TRUE;
}
previous_ibfd_e_flags = elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA;
@@ -3347,45 +111,19 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
return TRUE;
}
-
-/* Set the right machine number. */
-
-static bfd_boolean
-elf32_sparc_object_p (abfd)
- bfd *abfd;
-{
- if (elf_elfheader (abfd)->e_machine == EM_SPARC32PLUS)
- {
- if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
- return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
- bfd_mach_sparc_v8plusb);
- else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
- return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
- bfd_mach_sparc_v8plusa);
- else if (elf_elfheader (abfd)->e_flags & EF_SPARC_32PLUS)
- return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
- bfd_mach_sparc_v8plus);
- else
- return FALSE;
- }
- else if (elf_elfheader (abfd)->e_flags & EF_SPARC_LEDATA)
- return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
- bfd_mach_sparc_sparclite_le);
- else
- return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc);
-}
/* The final processing done just before writing out the object file.
We need to set the e_machine field appropriately. */
static void
-elf32_sparc_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
+elf32_sparc_final_write_processing (bfd *abfd,
+ bfd_boolean linker ATTRIBUTE_UNUSED)
{
switch (bfd_get_mach (abfd))
{
case bfd_mach_sparc :
+ case bfd_mach_sparc_sparclet :
+ case bfd_mach_sparc_sparclite :
break; /* nothing to do */
case bfd_mach_sparc_v8plus :
elf_elfheader (abfd)->e_machine = EM_SPARC32PLUS;
@@ -3404,7 +142,6 @@ elf32_sparc_final_write_processing (abfd, linker)
| EF_SPARC_SUN_US3;
break;
case bfd_mach_sparc_sparclite_le :
- elf_elfheader (abfd)->e_machine = EM_SPARC;
elf_elfheader (abfd)->e_flags |= EF_SPARC_LEDATA;
break;
default :
@@ -3414,8 +151,7 @@ elf32_sparc_final_write_processing (abfd, linker)
}
static enum elf_reloc_type_class
-elf32_sparc_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
+elf32_sparc_reloc_type_class (const Elf_Internal_Rela *rela)
{
switch ((int) ELF32_R_TYPE (rela->r_info))
{
@@ -3429,7 +165,7 @@ elf32_sparc_reloc_type_class (rela)
return reloc_class_normal;
}
}
-
+
#define TARGET_BIG_SYM bfd_elf32_sparc_vec
#define TARGET_BIG_NAME "elf32-sparc"
#define ELF_ARCH bfd_arch_sparc
@@ -3437,36 +173,39 @@ elf32_sparc_reloc_type_class (rela)
#define ELF_MACHINE_ALT1 EM_SPARC32PLUS
#define ELF_MAXPAGESIZE 0x10000
-#define bfd_elf32_bfd_reloc_type_lookup elf32_sparc_reloc_type_lookup
+#define bfd_elf32_bfd_merge_private_bfd_data \
+ elf32_sparc_merge_private_bfd_data
+#define elf_backend_final_write_processing \
+ elf32_sparc_final_write_processing
+#define elf_backend_grok_psinfo elf32_sparc_grok_psinfo
+#define elf_backend_reloc_type_class elf32_sparc_reloc_type_class
+
+#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_link_hash_table_create \
- elf32_sparc_link_hash_table_create
-#define bfd_elf32_bfd_relax_section elf32_sparc_relax_section
-#define bfd_elf32_new_section_hook elf32_sparc_new_section_hook
-#define elf_info_to_howto elf32_sparc_info_to_howto
+ _bfd_sparc_elf_link_hash_table_create
+#define bfd_elf32_bfd_relax_section _bfd_sparc_elf_relax_section
+#define bfd_elf32_new_section_hook _bfd_sparc_elf_new_section_hook
#define elf_backend_copy_indirect_symbol \
- elf32_sparc_copy_indirect_symbol
+ _bfd_sparc_elf_copy_indirect_symbol
#define elf_backend_create_dynamic_sections \
- elf32_sparc_create_dynamic_sections
-#define elf_backend_check_relocs elf32_sparc_check_relocs
+ _bfd_sparc_elf_create_dynamic_sections
+#define elf_backend_check_relocs _bfd_sparc_elf_check_relocs
#define elf_backend_adjust_dynamic_symbol \
- elf32_sparc_adjust_dynamic_symbol
+ _bfd_sparc_elf_adjust_dynamic_symbol
+#define elf_backend_omit_section_dynsym _bfd_sparc_elf_omit_section_dynsym
#define elf_backend_size_dynamic_sections \
- elf32_sparc_size_dynamic_sections
-#define elf_backend_relocate_section elf32_sparc_relocate_section
+ _bfd_sparc_elf_size_dynamic_sections
+#define elf_backend_relocate_section _bfd_sparc_elf_relocate_section
#define elf_backend_finish_dynamic_symbol \
- elf32_sparc_finish_dynamic_symbol
+ _bfd_sparc_elf_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
- elf32_sparc_finish_dynamic_sections
-#define bfd_elf32_bfd_merge_private_bfd_data \
- elf32_sparc_merge_private_bfd_data
-#define bfd_elf32_mkobject elf32_sparc_mkobject
-#define elf_backend_object_p elf32_sparc_object_p
-#define elf_backend_final_write_processing \
- elf32_sparc_final_write_processing
-#define elf_backend_gc_mark_hook elf32_sparc_gc_mark_hook
-#define elf_backend_gc_sweep_hook elf32_sparc_gc_sweep_hook
-#define elf_backend_grok_psinfo elf32_sparc_grok_psinfo
-#define elf_backend_reloc_type_class elf32_sparc_reloc_type_class
+ _bfd_sparc_elf_finish_dynamic_sections
+#define bfd_elf32_mkobject _bfd_sparc_elf_mkobject
+#define elf_backend_object_p _bfd_sparc_elf_object_p
+#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_can_gc_sections 1
#define elf_backend_can_refcount 1
@@ -3477,3 +216,68 @@ elf32_sparc_reloc_type_class (rela)
#define elf_backend_rela_normal 1
#include "elf32-target.h"
+
+/* A wrapper around _bfd_sparc_elf_link_hash_table_create that identifies
+ the target system as VxWorks. */
+
+static struct bfd_link_hash_table *
+elf32_sparc_vxworks_link_hash_table_create (bfd *abfd)
+{
+ struct bfd_link_hash_table *ret;
+
+ ret = _bfd_sparc_elf_link_hash_table_create (abfd);
+ if (ret)
+ {
+ struct _bfd_sparc_elf_link_hash_table *htab;
+
+ htab = (struct _bfd_sparc_elf_link_hash_table *) ret;
+ htab->is_vxworks = 1;
+ }
+ return ret;
+}
+
+/* A final_write_processing hook that does both the SPARC- and VxWorks-
+ specific handling. */
+
+static void
+elf32_sparc_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
+{
+ elf32_sparc_final_write_processing (abfd, linker);
+ elf_vxworks_final_write_processing (abfd, linker);
+}
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_sparc_vxworks_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sparc-vxworks"
+
+#undef ELF_MINPAGESIZE
+#define ELF_MINPAGESIZE 0x1000
+
+#undef bfd_elf32_bfd_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_create \
+ elf32_sparc_vxworks_link_hash_table_create
+
+#undef elf_backend_want_got_plt
+#define elf_backend_want_got_plt 1
+#undef elf_backend_plt_readonly
+#define elf_backend_plt_readonly 1
+#undef elf_backend_got_header_size
+#define elf_backend_got_header_size 12
+#undef elf_backend_add_symbol_hook
+#define elf_backend_add_symbol_hook \
+ elf_vxworks_add_symbol_hook
+#undef elf_backend_link_output_symbol_hook
+#define elf_backend_link_output_symbol_hook \
+ elf_vxworks_link_output_symbol_hook
+#undef elf_backend_emit_relocs
+#define elf_backend_emit_relocs \
+ elf_vxworks_emit_relocs
+#undef elf_backend_final_write_processing
+#define elf_backend_final_write_processing \
+ elf32_sparc_vxworks_final_write_processing
+
+#undef elf32_bed
+#define elf32_bed sparc_elf_vxworks_bed
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32.c b/contrib/binutils/bfd/elf32.c
index bfadd5cb0163..6221f0ae1dc0 100644
--- a/contrib/binutils/bfd/elf32.c
+++ b/contrib/binutils/bfd/elf32.c
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define ARCH_SIZE 32
diff --git a/contrib/binutils/bfd/elf64-alpha.c b/contrib/binutils/bfd/elf64-alpha.c
index 2d4715b4e140..76d0661a1165 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
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* We need a published ABI spec for this. Until one comes out, don't
assume this'll remain unchanged forever. */
@@ -47,116 +47,59 @@
#define ECOFF_64
#include "ecoffswap.h"
-static bfd_boolean alpha_elf_dynamic_symbol_p
- PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *));
-static struct bfd_hash_entry * elf64_alpha_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_link_hash_table * elf64_alpha_bfd_link_hash_table_create
- PARAMS ((bfd *));
-
-static bfd_reloc_status_type elf64_alpha_reloc_nil
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type elf64_alpha_reloc_bad
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type elf64_alpha_do_reloc_gpdisp
- PARAMS ((bfd *, bfd_vma, bfd_byte *, bfd_byte *));
-static bfd_reloc_status_type elf64_alpha_reloc_gpdisp
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-
-static reloc_howto_type * elf64_alpha_bfd_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void elf64_alpha_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static bfd_boolean elf64_alpha_mkobject
- PARAMS ((bfd *));
-static bfd_boolean elf64_alpha_object_p
- PARAMS ((bfd *));
-static bfd_boolean elf64_alpha_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
-static bfd_boolean elf64_alpha_section_flags
- PARAMS ((flagword *, Elf_Internal_Shdr *));
-static bfd_boolean elf64_alpha_fake_sections
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
-static bfd_boolean elf64_alpha_create_got_section
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf64_alpha_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static bfd_boolean elf64_alpha_read_ecoff_info
- PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
-static bfd_boolean elf64_alpha_is_local_label_name
- PARAMS ((bfd *, const char *));
-static bfd_boolean elf64_alpha_find_nearest_line
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct alpha_elf_link_hash_entry;
+
+/* Instruction data for plt generation and relaxation. */
+
+#define OP_LDA 0x08
+#define OP_LDAH 0x09
+#define OP_LDQ 0x29
+#define OP_BR 0x30
+#define OP_BSR 0x34
+
+#define INSN_LDA (OP_LDA << 26)
+#define INSN_LDAH (OP_LDAH << 26)
+#define INSN_LDQ (OP_LDQ << 26)
+#define INSN_BR (OP_BR << 26)
+
+#define INSN_ADDQ 0x40000400
+#define INSN_RDUNIQ 0x0000009e
+#define INSN_SUBQ 0x40000520
+#define INSN_S4SUBQ 0x40000560
+#define INSN_UNOP 0x2ffe0000
+
+#define INSN_JSR 0x68004000
+#define INSN_JMP 0x68000000
+#define INSN_JSR_MASK 0xfc00c000
+
+#define INSN_A(I,A) (I | (A << 21))
+#define INSN_AB(I,A,B) (I | (A << 21) | (B << 16))
+#define INSN_ABC(I,A,B,C) (I | (A << 21) | (B << 16) | C)
+#define INSN_ABO(I,A,B,O) (I | (A << 21) | (B << 16) | ((O) & 0xffff))
+#define INSN_AD(I,A,D) (I | (A << 21) | (((D) >> 2) & 0x1fffff))
+
+/* PLT/GOT Stuff */
+
+/* Set by ld emulation. Putting this into the link_info or hash structure
+ is simply working too hard. */
+#ifdef USE_SECUREPLT
+bfd_boolean elf64_alpha_use_secureplt = TRUE;
+#else
+bfd_boolean elf64_alpha_use_secureplt = FALSE;
#endif
-static bfd_boolean elf64_alpha_output_extsym
- PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
-
-static bfd_boolean elf64_alpha_can_merge_gots
- PARAMS ((bfd *, bfd *));
-static void elf64_alpha_merge_gots
- PARAMS ((bfd *, bfd *));
-static bfd_boolean elf64_alpha_calc_got_offsets_for_symbol
- PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
-static void elf64_alpha_calc_got_offsets
- PARAMS ((struct bfd_link_info *));
-static bfd_boolean elf64_alpha_size_got_sections
- PARAMS ((struct bfd_link_info *));
-static bfd_boolean elf64_alpha_size_plt_section
- PARAMS ((struct bfd_link_info *));
-static bfd_boolean elf64_alpha_size_plt_section_1
- PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
-static bfd_boolean elf64_alpha_always_size_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static int alpha_dynamic_entries_for_reloc
- PARAMS ((int, int, int));
-static bfd_boolean elf64_alpha_calc_dynrel_sizes
- PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *));
-static bfd_boolean elf64_alpha_size_rela_got_section
- PARAMS ((struct bfd_link_info *));
-static bfd_boolean elf64_alpha_size_rela_got_1
- PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *));
-static bfd_boolean elf64_alpha_add_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *));
-static struct alpha_elf_got_entry *get_got_entry
- PARAMS ((bfd *, struct alpha_elf_link_hash_entry *, unsigned long,
- unsigned long, bfd_vma));
-static bfd_boolean elf64_alpha_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *sec,
- const Elf_Internal_Rela *));
-static bfd_boolean elf64_alpha_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static bfd_boolean elf64_alpha_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static void elf64_alpha_emit_dynrel
- PARAMS ((bfd *, struct bfd_link_info *, asection *, asection *,
- bfd_vma, long, long, bfd_vma));
-static bfd_boolean elf64_alpha_relocate_section_r
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static bfd_boolean elf64_alpha_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static bfd_boolean elf64_alpha_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static bfd_boolean elf64_alpha_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf64_alpha_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf64_alpha_merge_ind_symbols
- PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
-static Elf_Internal_Rela * elf64_alpha_find_reloc_at_ofs
- PARAMS ((Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_vma, int));
-static enum elf_reloc_type_class elf64_alpha_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
+#define OLD_PLT_HEADER_SIZE 32
+#define OLD_PLT_ENTRY_SIZE 12
+#define NEW_PLT_HEADER_SIZE 36
+#define NEW_PLT_ENTRY_SIZE 4
+
+#define PLT_HEADER_SIZE \
+ (elf64_alpha_use_secureplt ? NEW_PLT_HEADER_SIZE : OLD_PLT_HEADER_SIZE)
+#define PLT_ENTRY_SIZE \
+ (elf64_alpha_use_secureplt ? NEW_PLT_ENTRY_SIZE : OLD_PLT_ENTRY_SIZE)
+
+#define MAX_GOT_SIZE (64*1024)
+
+#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
struct alpha_elf_link_hash_entry
{
@@ -169,19 +112,15 @@ struct alpha_elf_link_hash_entry
int flags;
/* Contexts in which a literal was referenced. */
-#define ALPHA_ELF_LINK_HASH_LU_ADDR 0x01
-#define ALPHA_ELF_LINK_HASH_LU_MEM 0x02
-#define ALPHA_ELF_LINK_HASH_LU_BYTE 0x04
-#define ALPHA_ELF_LINK_HASH_LU_JSR 0x08
-#define ALPHA_ELF_LINK_HASH_LU_TLSGD 0x10
-#define ALPHA_ELF_LINK_HASH_LU_TLSLDM 0x20
-#define ALPHA_ELF_LINK_HASH_LU_FUNC 0x38
-#define ALPHA_ELF_LINK_HASH_TLS_IE 0x40
-#define ALPHA_ELF_LINK_HASH_PLT_LOC 0x80
-
- /* Used to undo the localization of a plt symbol. */
- asection *plt_old_section;
- bfd_vma plt_old_value;
+#define ALPHA_ELF_LINK_HASH_LU_ADDR 0x01
+#define ALPHA_ELF_LINK_HASH_LU_MEM 0x02
+#define ALPHA_ELF_LINK_HASH_LU_BYTE 0x04
+#define ALPHA_ELF_LINK_HASH_LU_JSR 0x08
+#define ALPHA_ELF_LINK_HASH_LU_TLSGD 0x10
+#define ALPHA_ELF_LINK_HASH_LU_TLSLDM 0x20
+#define ALPHA_ELF_LINK_HASH_LU_JSRDIRECT 0x40
+#define ALPHA_ELF_LINK_HASH_LU_PLT 0x38
+#define ALPHA_ELF_LINK_HASH_TLS_IE 0x80
/* Used to implement multiple .got subsections. */
struct alpha_elf_got_entry
@@ -197,6 +136,9 @@ struct alpha_elf_link_hash_entry
/* The .got offset for this entry. */
int got_offset;
+ /* The .plt offset for this entry. */
+ int plt_offset;
+
/* How many references to this entry? */
int use_count;
@@ -256,7 +198,7 @@ struct alpha_elf_link_hash_table
#define alpha_elf_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct elf_link_hash_entry *, PTR)) (func), \
(info)))
/* Get the Alpha ELF linker hash table from a link_info structure. */
@@ -275,9 +217,8 @@ struct alpha_elf_link_hash_table
address is ever taken. */
static inline bfd_boolean
-alpha_elf_dynamic_symbol_p (h, info)
- struct elf_link_hash_entry *h;
- struct bfd_link_info *info;
+alpha_elf_dynamic_symbol_p (struct elf_link_hash_entry *h,
+ struct bfd_link_info *info)
{
return _bfd_elf_dynamic_symbol_p (h, info, 0);
}
@@ -285,10 +226,9 @@ alpha_elf_dynamic_symbol_p (h, info)
/* Create an entry in a Alpha ELF linker hash table. */
static struct bfd_hash_entry *
-elf64_alpha_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+elf64_alpha_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct alpha_elf_link_hash_entry *ret =
(struct alpha_elf_link_hash_entry *) entry;
@@ -324,8 +264,7 @@ elf64_alpha_link_hash_newfunc (entry, table, string)
/* Create a Alpha ELF linker hash table. */
static struct bfd_link_hash_table *
-elf64_alpha_bfd_link_hash_table_create (abfd)
- bfd *abfd;
+elf64_alpha_bfd_link_hash_table_create (bfd *abfd)
{
struct alpha_elf_link_hash_table *ret;
bfd_size_type amt = sizeof (struct alpha_elf_link_hash_table);
@@ -334,8 +273,9 @@ elf64_alpha_bfd_link_hash_table_create (abfd)
if (ret == (struct alpha_elf_link_hash_table *) NULL)
return NULL;
- if (! _bfd_elf_link_hash_table_init (&ret->root, abfd,
- elf64_alpha_link_hash_newfunc))
+ if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
+ elf64_alpha_link_hash_newfunc,
+ sizeof (struct alpha_elf_link_hash_entry)))
{
free (ret);
return NULL;
@@ -379,8 +319,7 @@ struct alpha_elf_obj_tdata
((struct alpha_elf_obj_tdata *) (abfd)->tdata.any)
static bfd_boolean
-elf64_alpha_mkobject (abfd)
- bfd *abfd;
+elf64_alpha_mkobject (bfd *abfd)
{
bfd_size_type amt = sizeof (struct alpha_elf_obj_tdata);
abfd->tdata.any = bfd_zalloc (abfd, amt);
@@ -390,13 +329,123 @@ elf64_alpha_mkobject (abfd)
}
static bfd_boolean
-elf64_alpha_object_p (abfd)
- bfd *abfd;
+elf64_alpha_object_p (bfd *abfd)
{
/* Set the right machine number for an Alpha ELF file. */
return bfd_default_set_arch_mach (abfd, bfd_arch_alpha, 0);
}
+/* A relocation function which doesn't do anything. */
+
+static bfd_reloc_status_type
+elf64_alpha_reloc_nil (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc,
+ asymbol *sym ATTRIBUTE_UNUSED,
+ PTR data ATTRIBUTE_UNUSED, asection *sec,
+ bfd *output_bfd, char **error_message ATTRIBUTE_UNUSED)
+{
+ if (output_bfd)
+ reloc->address += sec->output_offset;
+ return bfd_reloc_ok;
+}
+
+/* A relocation function used for an unsupported reloc. */
+
+static bfd_reloc_status_type
+elf64_alpha_reloc_bad (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc,
+ asymbol *sym ATTRIBUTE_UNUSED,
+ PTR data ATTRIBUTE_UNUSED, asection *sec,
+ bfd *output_bfd, char **error_message ATTRIBUTE_UNUSED)
+{
+ if (output_bfd)
+ reloc->address += sec->output_offset;
+ return bfd_reloc_notsupported;
+}
+
+/* Do the work of the GPDISP relocation. */
+
+static bfd_reloc_status_type
+elf64_alpha_do_reloc_gpdisp (bfd *abfd, bfd_vma gpdisp, bfd_byte *p_ldah,
+ bfd_byte *p_lda)
+{
+ bfd_reloc_status_type ret = bfd_reloc_ok;
+ bfd_vma addend;
+ unsigned long i_ldah, i_lda;
+
+ i_ldah = bfd_get_32 (abfd, p_ldah);
+ i_lda = bfd_get_32 (abfd, p_lda);
+
+ /* Complain if the instructions are not correct. */
+ if (((i_ldah >> 26) & 0x3f) != 0x09
+ || ((i_lda >> 26) & 0x3f) != 0x08)
+ ret = bfd_reloc_dangerous;
+
+ /* Extract the user-supplied offset, mirroring the sign extensions
+ that the instructions perform. */
+ addend = ((i_ldah & 0xffff) << 16) | (i_lda & 0xffff);
+ addend = (addend ^ 0x80008000) - 0x80008000;
+
+ gpdisp += addend;
+
+ if ((bfd_signed_vma) gpdisp < -(bfd_signed_vma) 0x80000000
+ || (bfd_signed_vma) gpdisp >= (bfd_signed_vma) 0x7fff8000)
+ ret = bfd_reloc_overflow;
+
+ /* compensate for the sign extension again. */
+ i_ldah = ((i_ldah & 0xffff0000)
+ | (((gpdisp >> 16) + ((gpdisp >> 15) & 1)) & 0xffff));
+ i_lda = (i_lda & 0xffff0000) | (gpdisp & 0xffff);
+
+ bfd_put_32 (abfd, (bfd_vma) i_ldah, p_ldah);
+ bfd_put_32 (abfd, (bfd_vma) i_lda, p_lda);
+
+ return ret;
+}
+
+/* The special function for the GPDISP reloc. */
+
+static bfd_reloc_status_type
+elf64_alpha_reloc_gpdisp (bfd *abfd, arelent *reloc_entry,
+ asymbol *sym ATTRIBUTE_UNUSED, PTR data,
+ asection *input_section, bfd *output_bfd,
+ char **err_msg)
+{
+ bfd_reloc_status_type ret;
+ bfd_vma gp, relocation;
+ bfd_vma high_address;
+ bfd_byte *p_ldah, *p_lda;
+
+ /* Don't do anything if we're not doing a final link. */
+ if (output_bfd)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ high_address = bfd_get_section_limit (abfd, input_section);
+ if (reloc_entry->address > high_address
+ || reloc_entry->address + reloc_entry->addend > high_address)
+ return bfd_reloc_outofrange;
+
+ /* The gp used in the portion of the output object to which this
+ input object belongs is cached on the input bfd. */
+ gp = _bfd_get_gp_value (abfd);
+
+ relocation = (input_section->output_section->vma
+ + input_section->output_offset
+ + reloc_entry->address);
+
+ p_ldah = (bfd_byte *) data + reloc_entry->address;
+ p_lda = p_ldah + reloc_entry->addend;
+
+ ret = elf64_alpha_do_reloc_gpdisp (abfd, gp - relocation, p_ldah, p_lda);
+
+ /* Complain if the instructions are not correct. */
+ if (ret == bfd_reloc_dangerous)
+ *err_msg = _("GPDISP relocation did not find ldah and lda instructions");
+
+ return ret;
+}
+
/* 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)
@@ -944,131 +993,6 @@ static reloc_howto_type elf64_alpha_howto_table[] =
FALSE), /* pcrel_offset */
};
-/* A relocation function which doesn't do anything. */
-
-static bfd_reloc_status_type
-elf64_alpha_reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc;
- asymbol *sym ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *sec;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- if (output_bfd)
- reloc->address += sec->output_offset;
- return bfd_reloc_ok;
-}
-
-/* A relocation function used for an unsupported reloc. */
-
-static bfd_reloc_status_type
-elf64_alpha_reloc_bad (abfd, reloc, sym, data, sec, output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc;
- asymbol *sym ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *sec;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- if (output_bfd)
- reloc->address += sec->output_offset;
- return bfd_reloc_notsupported;
-}
-
-/* Do the work of the GPDISP relocation. */
-
-static bfd_reloc_status_type
-elf64_alpha_do_reloc_gpdisp (abfd, gpdisp, p_ldah, p_lda)
- bfd *abfd;
- bfd_vma gpdisp;
- bfd_byte *p_ldah;
- bfd_byte *p_lda;
-{
- bfd_reloc_status_type ret = bfd_reloc_ok;
- bfd_vma addend;
- unsigned long i_ldah, i_lda;
-
- i_ldah = bfd_get_32 (abfd, p_ldah);
- i_lda = bfd_get_32 (abfd, p_lda);
-
- /* Complain if the instructions are not correct. */
- if (((i_ldah >> 26) & 0x3f) != 0x09
- || ((i_lda >> 26) & 0x3f) != 0x08)
- ret = bfd_reloc_dangerous;
-
- /* Extract the user-supplied offset, mirroring the sign extensions
- that the instructions perform. */
- addend = ((i_ldah & 0xffff) << 16) | (i_lda & 0xffff);
- addend = (addend ^ 0x80008000) - 0x80008000;
-
- gpdisp += addend;
-
- if ((bfd_signed_vma) gpdisp < -(bfd_signed_vma) 0x80000000
- || (bfd_signed_vma) gpdisp >= (bfd_signed_vma) 0x7fff8000)
- ret = bfd_reloc_overflow;
-
- /* compensate for the sign extension again. */
- i_ldah = ((i_ldah & 0xffff0000)
- | (((gpdisp >> 16) + ((gpdisp >> 15) & 1)) & 0xffff));
- i_lda = (i_lda & 0xffff0000) | (gpdisp & 0xffff);
-
- bfd_put_32 (abfd, (bfd_vma) i_ldah, p_ldah);
- bfd_put_32 (abfd, (bfd_vma) i_lda, p_lda);
-
- return ret;
-}
-
-/* The special function for the GPDISP reloc. */
-
-static bfd_reloc_status_type
-elf64_alpha_reloc_gpdisp (abfd, reloc_entry, sym, data, input_section,
- output_bfd, err_msg)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *sym ATTRIBUTE_UNUSED;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **err_msg;
-{
- bfd_reloc_status_type ret;
- bfd_vma gp, relocation;
- bfd_byte *p_ldah, *p_lda;
-
- /* Don't do anything if we're not doing a final link. */
- if (output_bfd)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- if (reloc_entry->address > input_section->_cooked_size ||
- reloc_entry->address + reloc_entry->addend > input_section->_cooked_size)
- return bfd_reloc_outofrange;
-
- /* The gp used in the portion of the output object to which this
- input object belongs is cached on the input bfd. */
- gp = _bfd_get_gp_value (abfd);
-
- relocation = (input_section->output_section->vma
- + input_section->output_offset
- + reloc_entry->address);
-
- p_ldah = (bfd_byte *) data + reloc_entry->address;
- p_lda = p_ldah + reloc_entry->addend;
-
- ret = elf64_alpha_do_reloc_gpdisp (abfd, gp - relocation, p_ldah, p_lda);
-
- /* Complain if the instructions are not correct. */
- if (ret == bfd_reloc_dangerous)
- *err_msg = _("GPDISP relocation did not find ldah and lda instructions");
-
- return ret;
-}
-
/* A mapping from BFD reloc types to Alpha ELF reloc types. */
struct elf_reloc_map
@@ -1114,9 +1038,8 @@ static const struct elf_reloc_map elf64_alpha_reloc_map[] =
/* Given a BFD reloc type, return a HOWTO structure. */
static reloc_howto_type *
-elf64_alpha_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+elf64_alpha_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
const struct elf_reloc_map *i, *e;
i = e = elf64_alpha_reloc_map;
@@ -1132,14 +1055,10 @@ elf64_alpha_bfd_reloc_type_lookup (abfd, code)
/* Given an Alpha ELF reloc type, fill in an arelent structure. */
static void
-elf64_alpha_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+elf64_alpha_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
- unsigned r_type;
-
- r_type = ELF64_R_TYPE(dst->r_info);
+ unsigned r_type = ELF64_R_TYPE(dst->r_info);
BFD_ASSERT (r_type < (unsigned int) R_ALPHA_max);
cache_ptr->howto = &elf64_alpha_howto_table[r_type];
}
@@ -1159,1124 +1078,17 @@ elf64_alpha_info_to_howto (abfd, cache_ptr, dst)
- align_power ((bfd_vma) 16, \
elf_hash_table (info)->tls_sec->alignment_power))
-/* These functions do relaxation for Alpha ELF.
-
- Currently I'm only handling what I can do with existing compiler
- and assembler support, which means no instructions are removed,
- though some may be nopped. At this time GCC does not emit enough
- information to do all of the relaxing that is possible. It will
- take some not small amount of work for that to happen.
-
- There are a couple of interesting papers that I once read on this
- subject, that I cannot find references to at the moment, that
- related to Alpha in particular. They are by David Wall, then of
- DEC WRL. */
-
-#define OP_LDA 0x08
-#define OP_LDAH 0x09
-#define INSN_JSR 0x68004000
-#define INSN_JSR_MASK 0xfc00c000
-#define OP_LDQ 0x29
-#define OP_BR 0x30
-#define OP_BSR 0x34
-#define INSN_UNOP 0x2ffe0000
-#define INSN_ADDQ 0x40000400
-#define INSN_RDUNIQ 0x0000009e
-
-struct alpha_relax_info
-{
- bfd *abfd;
- asection *sec;
- bfd_byte *contents;
- Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Rela *relocs, *relend;
- struct bfd_link_info *link_info;
- bfd_vma gp;
- bfd *gotobj;
- asection *tsec;
- struct alpha_elf_link_hash_entry *h;
- struct alpha_elf_got_entry **first_gotent;
- struct alpha_elf_got_entry *gotent;
- bfd_boolean changed_contents;
- bfd_boolean changed_relocs;
- unsigned char other;
-};
-
-static bfd_boolean elf64_alpha_relax_with_lituse
- PARAMS((struct alpha_relax_info *info, bfd_vma symval,
- Elf_Internal_Rela *irel));
-static bfd_vma elf64_alpha_relax_opt_call
- PARAMS((struct alpha_relax_info *info, bfd_vma symval));
-static bfd_boolean elf64_alpha_relax_got_load
- PARAMS((struct alpha_relax_info *info, bfd_vma symval,
- Elf_Internal_Rela *irel, unsigned long));
-static bfd_boolean elf64_alpha_relax_gprelhilo
- PARAMS((struct alpha_relax_info *info, bfd_vma symval,
- Elf_Internal_Rela *irel, bfd_boolean));
-static bfd_boolean elf64_alpha_relax_tls_get_addr
- PARAMS((struct alpha_relax_info *info, bfd_vma symval,
- Elf_Internal_Rela *irel, bfd_boolean));
-static bfd_boolean elf64_alpha_relax_section
- PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info,
- bfd_boolean *again));
-
-static Elf_Internal_Rela *
-elf64_alpha_find_reloc_at_ofs (rel, relend, offset, type)
- Elf_Internal_Rela *rel, *relend;
- bfd_vma offset;
- int type;
-{
- while (rel < relend)
- {
- if (rel->r_offset == offset
- && ELF64_R_TYPE (rel->r_info) == (unsigned int) type)
- return rel;
- ++rel;
- }
- return NULL;
-}
-
-static bfd_boolean
-elf64_alpha_relax_with_lituse (info, symval, irel)
- struct alpha_relax_info *info;
- bfd_vma symval;
- Elf_Internal_Rela *irel;
-{
- Elf_Internal_Rela *urel, *irelend = info->relend;
- int flags, count, i;
- bfd_signed_vma disp;
- bfd_boolean fits16;
- bfd_boolean fits32;
- bfd_boolean lit_reused = FALSE;
- bfd_boolean all_optimized = TRUE;
- unsigned int lit_insn;
-
- lit_insn = bfd_get_32 (info->abfd, info->contents + irel->r_offset);
- if (lit_insn >> 26 != OP_LDQ)
- {
- ((*_bfd_error_handler)
- ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
- bfd_archive_filename (info->abfd), info->sec->name,
- (unsigned long) irel->r_offset));
- return TRUE;
- }
-
- /* Can't relax dynamic symbols. */
- if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
- return TRUE;
-
- /* Summarize how this particular LITERAL is used. */
- for (urel = irel+1, flags = count = 0; urel < irelend; ++urel, ++count)
- {
- if (ELF64_R_TYPE (urel->r_info) != R_ALPHA_LITUSE)
- break;
- if (urel->r_addend <= 3)
- flags |= 1 << urel->r_addend;
- }
-
- /* A little preparation for the loop... */
- disp = symval - info->gp;
-
- for (urel = irel+1, i = 0; i < count; ++i, ++urel)
- {
- unsigned int insn;
- int insn_disp;
- bfd_signed_vma xdisp;
-
- insn = bfd_get_32 (info->abfd, info->contents + urel->r_offset);
-
- switch (urel->r_addend)
- {
- case LITUSE_ALPHA_ADDR:
- default:
- /* This type is really just a placeholder to note that all
- uses cannot be optimized, but to still allow some. */
- all_optimized = FALSE;
- break;
-
- case LITUSE_ALPHA_BASE:
- /* We can always optimize 16-bit displacements. */
-
- /* Extract the displacement from the instruction, sign-extending
- it if necessary, then test whether it is within 16 or 32 bits
- displacement from GP. */
- insn_disp = insn & 0x0000ffff;
- if (insn_disp & 0x8000)
- insn_disp |= ~0xffff; /* Negative: sign-extend. */
-
- xdisp = disp + insn_disp;
- fits16 = (xdisp >= - (bfd_signed_vma) 0x8000 && xdisp < 0x8000);
- fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000
- && xdisp < 0x7fff8000);
-
- if (fits16)
- {
- /* Take the op code and dest from this insn, take the base
- register from the literal insn. Leave the offset alone. */
- insn = (insn & 0xffe0ffff) | (lit_insn & 0x001f0000);
- urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
- R_ALPHA_GPREL16);
- urel->r_addend = irel->r_addend;
- info->changed_relocs = TRUE;
-
- bfd_put_32 (info->abfd, (bfd_vma) insn,
- info->contents + urel->r_offset);
- info->changed_contents = TRUE;
- }
-
- /* If all mem+byte, we can optimize 32-bit mem displacements. */
- else if (fits32 && !(flags & ~6))
- {
- /* FIXME: sanity check that lit insn Ra is mem insn Rb. */
-
- irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
- R_ALPHA_GPRELHIGH);
- lit_insn = (OP_LDAH << 26) | (lit_insn & 0x03ff0000);
- bfd_put_32 (info->abfd, (bfd_vma) lit_insn,
- info->contents + irel->r_offset);
- lit_reused = TRUE;
- info->changed_contents = TRUE;
-
- urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
- R_ALPHA_GPRELLOW);
- urel->r_addend = irel->r_addend;
- info->changed_relocs = TRUE;
- }
- else
- all_optimized = FALSE;
- break;
-
- case LITUSE_ALPHA_BYTOFF:
- /* We can always optimize byte instructions. */
-
- /* FIXME: sanity check the insn for byte op. Check that the
- literal dest reg is indeed Rb in the byte insn. */
-
- insn &= ~ (unsigned) 0x001ff000;
- insn |= ((symval & 7) << 13) | 0x1000;
-
- urel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
- urel->r_addend = 0;
- info->changed_relocs = TRUE;
-
- bfd_put_32 (info->abfd, (bfd_vma) insn,
- info->contents + urel->r_offset);
- info->changed_contents = TRUE;
- break;
-
- case LITUSE_ALPHA_JSR:
- case LITUSE_ALPHA_TLSGD:
- case LITUSE_ALPHA_TLSLDM:
- {
- bfd_vma optdest, org;
- bfd_signed_vma odisp;
-
- /* If not zero, place to jump without needing pv. */
- optdest = elf64_alpha_relax_opt_call (info, symval);
- org = (info->sec->output_section->vma
- + info->sec->output_offset
- + urel->r_offset + 4);
- odisp = (optdest ? optdest : symval) - org;
-
- if (odisp >= -0x400000 && odisp < 0x400000)
- {
- Elf_Internal_Rela *xrel;
-
- /* Preserve branch prediction call stack when possible. */
- if ((insn & INSN_JSR_MASK) == INSN_JSR)
- insn = (OP_BSR << 26) | (insn & 0x03e00000);
- else
- insn = (OP_BR << 26) | (insn & 0x03e00000);
-
- urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
- R_ALPHA_BRADDR);
- urel->r_addend = irel->r_addend;
-
- if (optdest)
- urel->r_addend += optdest - symval;
- else
- all_optimized = FALSE;
-
- bfd_put_32 (info->abfd, (bfd_vma) insn,
- info->contents + urel->r_offset);
-
- /* Kill any HINT reloc that might exist for this insn. */
- xrel = (elf64_alpha_find_reloc_at_ofs
- (info->relocs, info->relend, urel->r_offset,
- R_ALPHA_HINT));
- if (xrel)
- xrel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
-
- info->changed_contents = TRUE;
- info->changed_relocs = TRUE;
- }
- else
- all_optimized = FALSE;
-
- /* Even if the target is not in range for a direct branch,
- if we share a GP, we can eliminate the gp reload. */
- if (optdest)
- {
- Elf_Internal_Rela *gpdisp
- = (elf64_alpha_find_reloc_at_ofs
- (info->relocs, irelend, urel->r_offset + 4,
- R_ALPHA_GPDISP));
- if (gpdisp)
- {
- bfd_byte *p_ldah = info->contents + gpdisp->r_offset;
- bfd_byte *p_lda = p_ldah + gpdisp->r_addend;
- unsigned int ldah = bfd_get_32 (info->abfd, p_ldah);
- unsigned int lda = bfd_get_32 (info->abfd, p_lda);
-
- /* Verify that the instruction is "ldah $29,0($26)".
- Consider a function that ends in a noreturn call,
- and that the next function begins with an ldgp,
- and that by accident there is no padding between.
- In that case the insn would use $27 as the base. */
- if (ldah == 0x27ba0000 && lda == 0x23bd0000)
- {
- bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, p_ldah);
- bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, p_lda);
-
- gpdisp->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
- info->changed_contents = TRUE;
- info->changed_relocs = TRUE;
- }
- }
- }
- }
- break;
- }
- }
-
- /* If all cases were optimized, we can reduce the use count on this
- got entry by one, possibly eliminating it. */
- if (all_optimized)
- {
- if (--info->gotent->use_count == 0)
- {
- int sz = alpha_got_entry_size (R_ALPHA_LITERAL);
- alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
- if (!info->h)
- alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
- }
-
- /* If the literal instruction is no longer needed (it may have been
- reused. We can eliminate it. */
- /* ??? For now, I don't want to deal with compacting the section,
- so just nop it out. */
- if (!lit_reused)
- {
- irel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
- info->changed_relocs = TRUE;
-
- bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP,
- info->contents + irel->r_offset);
- info->changed_contents = TRUE;
- }
- }
-
- return TRUE;
-}
-
-static bfd_vma
-elf64_alpha_relax_opt_call (info, symval)
- struct alpha_relax_info *info;
- bfd_vma symval;
-{
- /* If the function has the same gp, and we can identify that the
- function does not use its function pointer, we can eliminate the
- address load. */
-
- /* If the symbol is marked NOPV, we are being told the function never
- needs its procedure value. */
- if ((info->other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_NOPV)
- return symval;
-
- /* If the symbol is marked STD_GP, we are being told the function does
- a normal ldgp in the first two words. */
- else if ((info->other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_STD_GPLOAD)
- ;
-
- /* Otherwise, we may be able to identify a GP load in the first two
- words, which we can then skip. */
- else
- {
- Elf_Internal_Rela *tsec_relocs, *tsec_relend, *tsec_free, *gpdisp;
- bfd_vma ofs;
-
- /* Load the relocations from the section that the target symbol is in. */
- if (info->sec == info->tsec)
- {
- tsec_relocs = info->relocs;
- tsec_relend = info->relend;
- tsec_free = NULL;
- }
- else
- {
- tsec_relocs = (_bfd_elf_link_read_relocs
- (info->abfd, info->tsec, (PTR) NULL,
- (Elf_Internal_Rela *) NULL,
- info->link_info->keep_memory));
- if (tsec_relocs == NULL)
- return 0;
- tsec_relend = tsec_relocs + info->tsec->reloc_count;
- tsec_free = (info->link_info->keep_memory ? NULL : tsec_relocs);
- }
-
- /* Recover the symbol's offset within the section. */
- ofs = (symval - info->tsec->output_section->vma
- - info->tsec->output_offset);
-
- /* Look for a GPDISP reloc. */
- gpdisp = (elf64_alpha_find_reloc_at_ofs
- (tsec_relocs, tsec_relend, ofs, R_ALPHA_GPDISP));
-
- if (!gpdisp || gpdisp->r_addend != 4)
- {
- if (tsec_free)
- free (tsec_free);
- return 0;
- }
- if (tsec_free)
- free (tsec_free);
- }
-
- /* We've now determined that we can skip an initial gp load. Verify
- that the call and the target use the same gp. */
- if (info->link_info->hash->creator != info->tsec->owner->xvec
- || info->gotobj != alpha_elf_tdata (info->tsec->owner)->gotobj)
- return 0;
-
- return symval + 8;
-}
-
-static bfd_boolean
-elf64_alpha_relax_got_load (info, symval, irel, r_type)
- struct alpha_relax_info *info;
- bfd_vma symval;
- Elf_Internal_Rela *irel;
- unsigned long r_type;
-{
- unsigned int insn;
- bfd_signed_vma disp;
-
- /* Get the instruction. */
- insn = bfd_get_32 (info->abfd, info->contents + irel->r_offset);
-
- if (insn >> 26 != OP_LDQ)
- {
- reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
- ((*_bfd_error_handler)
- ("%s: %s+0x%lx: warning: %s relocation against unexpected insn",
- bfd_archive_filename (info->abfd), info->sec->name,
- (unsigned long) irel->r_offset, howto->name));
- return TRUE;
- }
-
- /* Can't relax dynamic symbols. */
- if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
- return TRUE;
-
- /* Can't use local-exec relocations in shared libraries. */
- if (r_type == R_ALPHA_GOTTPREL && info->link_info->shared)
- return TRUE;
-
- if (r_type == R_ALPHA_LITERAL)
- disp = symval - info->gp;
- else
- {
- bfd_vma dtp_base, tp_base;
-
- BFD_ASSERT (elf_hash_table (info->link_info)->tls_sec != NULL);
- dtp_base = alpha_get_dtprel_base (info->link_info);
- tp_base = alpha_get_tprel_base (info->link_info);
- disp = symval - (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base);
- }
-
- if (disp < -0x8000 || disp >= 0x8000)
- return TRUE;
-
- /* Exchange LDQ for LDA. In the case of the TLS relocs, we're loading
- a constant, so force the base register to be $31. */
- if (r_type == R_ALPHA_LITERAL)
- insn = (OP_LDA << 26) | (insn & 0x03ff0000);
- else
- insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16);
- bfd_put_32 (info->abfd, (bfd_vma) insn, info->contents + irel->r_offset);
- info->changed_contents = TRUE;
-
- /* Reduce the use count on this got entry by one, possibly
- eliminating it. */
- if (--info->gotent->use_count == 0)
- {
- int sz = alpha_got_entry_size (r_type);
- alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
- if (!info->h)
- alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
- }
-
- /* Smash the existing GOT relocation for its 16-bit immediate pair. */
- switch (r_type)
- {
- case R_ALPHA_LITERAL:
- r_type = R_ALPHA_GPREL16;
- break;
- case R_ALPHA_GOTDTPREL:
- r_type = R_ALPHA_DTPREL16;
- break;
- case R_ALPHA_GOTTPREL:
- r_type = R_ALPHA_TPREL16;
- break;
- default:
- BFD_ASSERT (0);
- return FALSE;
- }
-
- irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), r_type);
- info->changed_relocs = TRUE;
-
- /* ??? Search forward through this basic block looking for insns
- that use the target register. Stop after an insn modifying the
- register is seen, or after a branch or call.
-
- Any such memory load insn may be substituted by a load directly
- off the GP. This allows the memory load insn to be issued before
- the calculated GP register would otherwise be ready.
-
- Any such jsr insn can be replaced by a bsr if it is in range.
-
- This would mean that we'd have to _add_ relocations, the pain of
- which gives one pause. */
-
- return TRUE;
-}
-
-static bfd_boolean
-elf64_alpha_relax_gprelhilo (info, symval, irel, hi)
- struct alpha_relax_info *info;
- bfd_vma symval;
- Elf_Internal_Rela *irel;
- bfd_boolean hi;
-{
- unsigned int insn;
- bfd_signed_vma disp;
- bfd_byte *pos = info->contents + irel->r_offset;
-
- /* ??? This assumes that the compiler doesn't render
-
- array[i]
- as
- ldah t, array(gp) !gprelhigh
- s8addl i, t, t
- ldq r, array(t) !gprellow
-
- which would indeed be the most efficient way to implement this. */
-
- return TRUE;
-
- disp = symval - info->gp;
- if (disp < -0x8000 || disp >= 0x8000)
- return TRUE;
-
- if (hi)
- {
- /* Nop out the high instruction. */
-
- bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos);
- info->changed_contents = TRUE;
-
- irel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
- irel->r_addend = 0;
- info->changed_relocs = TRUE;
- }
- else
- {
- /* Adjust the low instruction to reference GP directly. */
-
- insn = bfd_get_32 (info->abfd, pos);
- insn = (insn & 0xffe00000) | (29 << 16);
- bfd_put_32 (info->abfd, (bfd_vma) insn, pos);
- info->changed_contents = TRUE;
-
- irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
- R_ALPHA_GPREL16);
- info->changed_relocs = TRUE;
- }
-
- return TRUE;
-}
-
-static bfd_boolean
-elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
- struct alpha_relax_info *info;
- bfd_vma symval;
- Elf_Internal_Rela *irel;
- bfd_boolean is_gd;
-{
- bfd_byte *pos[5];
- unsigned int insn;
- Elf_Internal_Rela *gpdisp, *hint;
- bfd_boolean dynamic, use_gottprel, pos1_unusable;
- unsigned long new_symndx;
-
- dynamic = alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info);
-
- /* If a TLS symbol is accessed using IE at least once, there is no point
- to use dynamic model for it. */
- if (is_gd && info->h && (info->h->flags & ALPHA_ELF_LINK_HASH_TLS_IE))
- ;
-
- /* If the symbol is local, and we've already committed to DF_STATIC_TLS,
- then we might as well relax to IE. */
- else if (info->link_info->shared && !dynamic
- && (info->link_info->flags & DF_STATIC_TLS))
- ;
-
- /* Otherwise we must be building an executable to do anything. */
- else if (info->link_info->shared)
- return TRUE;
-
- /* The TLSGD/TLSLDM relocation must be followed by a LITERAL and
- the matching LITUSE_TLS relocations. */
- if (irel + 2 >= info->relend)
- return TRUE;
- if (ELF64_R_TYPE (irel[1].r_info) != R_ALPHA_LITERAL
- || ELF64_R_TYPE (irel[2].r_info) != R_ALPHA_LITUSE
- || irel[2].r_addend != (is_gd ? LITUSE_ALPHA_TLSGD : LITUSE_ALPHA_TLSLDM))
- return TRUE;
-
- /* There must be a GPDISP relocation positioned immediately after the
- LITUSE relocation. */
- gpdisp = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend,
- irel[2].r_offset + 4, R_ALPHA_GPDISP);
- if (!gpdisp)
- return TRUE;
-
- pos[0] = info->contents + irel[0].r_offset;
- pos[1] = info->contents + irel[1].r_offset;
- pos[2] = info->contents + irel[2].r_offset;
- pos[3] = info->contents + gpdisp->r_offset;
- pos[4] = pos[3] + gpdisp->r_addend;
- pos1_unusable = FALSE;
-
- /* Generally, the positions are not allowed to be out of order, lest the
- modified insn sequence have different register lifetimes. We can make
- an exception when pos 1 is adjacent to pos 0. */
- if (pos[1] + 4 == pos[0])
- {
- bfd_byte *tmp = pos[0];
- pos[0] = pos[1];
- pos[1] = tmp;
- }
- else if (pos[1] < pos[0])
- pos1_unusable = TRUE;
- if (pos[1] >= pos[2] || pos[2] >= pos[3])
- return TRUE;
-
- /* Reduce the use count on the LITERAL relocation. Do this before we
- smash the symndx when we adjust the relocations below. */
- {
- struct alpha_elf_got_entry *lit_gotent;
- struct alpha_elf_link_hash_entry *lit_h;
- unsigned long indx;
-
- BFD_ASSERT (ELF64_R_SYM (irel[1].r_info) >= info->symtab_hdr->sh_info);
- indx = ELF64_R_SYM (irel[1].r_info) - info->symtab_hdr->sh_info;
- lit_h = alpha_elf_sym_hashes (info->abfd)[indx];
-
- while (lit_h->root.root.type == bfd_link_hash_indirect
- || lit_h->root.root.type == bfd_link_hash_warning)
- lit_h = (struct alpha_elf_link_hash_entry *) lit_h->root.root.u.i.link;
-
- for (lit_gotent = lit_h->got_entries; lit_gotent ;
- lit_gotent = lit_gotent->next)
- if (lit_gotent->gotobj == info->gotobj
- && lit_gotent->reloc_type == R_ALPHA_LITERAL
- && lit_gotent->addend == irel[1].r_addend)
- break;
- BFD_ASSERT (lit_gotent);
-
- if (--lit_gotent->use_count == 0)
- {
- int sz = alpha_got_entry_size (R_ALPHA_LITERAL);
- alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
- }
- }
-
- /* Change
-
- lda $16,x($gp) !tlsgd!1
- ldq $27,__tls_get_addr($gp) !literal!1
- jsr $26,($27)__tls_get_addr !lituse_tlsgd!1
- ldah $29,0($26) !gpdisp!2
- lda $29,0($29) !gpdisp!2
- to
- ldq $16,x($gp) !gottprel
- unop
- call_pal rduniq
- addq $16,$0,$0
- unop
- or the first pair to
- lda $16,x($gp) !tprel
- unop
- or
- ldah $16,x($gp) !tprelhi
- lda $16,x($16) !tprello
-
- as appropriate. */
-
- use_gottprel = FALSE;
- new_symndx = is_gd ? ELF64_R_SYM (irel->r_info) : 0;
- switch (!dynamic && !info->link_info->shared)
- {
- case 1:
- {
- bfd_vma tp_base;
- bfd_signed_vma disp;
-
- BFD_ASSERT (elf_hash_table (info->link_info)->tls_sec != NULL);
- tp_base = alpha_get_tprel_base (info->link_info);
- disp = symval - tp_base;
-
- if (disp >= -0x8000 && disp < 0x8000)
- {
- insn = (OP_LDA << 26) | (16 << 21) | (31 << 16);
- bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
- bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
-
- irel[0].r_offset = pos[0] - info->contents;
- irel[0].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_TPREL16);
- irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
- break;
- }
- else if (disp >= -(bfd_signed_vma) 0x80000000
- && disp < (bfd_signed_vma) 0x7fff8000
- && !pos1_unusable)
- {
- insn = (OP_LDAH << 26) | (16 << 21) | (31 << 16);
- bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
- insn = (OP_LDA << 26) | (16 << 21) | (16 << 16);
- bfd_put_32 (info->abfd, (bfd_vma) insn, pos[1]);
-
- irel[0].r_offset = pos[0] - info->contents;
- irel[0].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_TPRELHI);
- irel[1].r_offset = pos[1] - info->contents;
- irel[1].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_TPRELLO);
- break;
- }
- }
- /* FALLTHRU */
-
- default:
- use_gottprel = TRUE;
-
- insn = (OP_LDQ << 26) | (16 << 21) | (29 << 16);
- bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
- bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
-
- irel[0].r_offset = pos[0] - info->contents;
- irel[0].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_GOTTPREL);
- irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
- break;
- }
-
- bfd_put_32 (info->abfd, (bfd_vma) INSN_RDUNIQ, pos[2]);
-
- insn = INSN_ADDQ | (16 << 21) | (0 << 16) | (0 << 0);
- bfd_put_32 (info->abfd, (bfd_vma) insn, pos[3]);
-
- bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[4]);
-
- irel[2].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
- gpdisp->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
-
- hint = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend,
- irel[2].r_offset, R_ALPHA_HINT);
- if (hint)
- hint->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
-
- info->changed_contents = TRUE;
- info->changed_relocs = TRUE;
-
- /* Reduce the use count on the TLSGD/TLSLDM relocation. */
- if (--info->gotent->use_count == 0)
- {
- int sz = alpha_got_entry_size (info->gotent->reloc_type);
- alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
- if (!info->h)
- alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
- }
-
- /* If we've switched to a GOTTPREL relocation, increment the reference
- count on that got entry. */
- if (use_gottprel)
- {
- struct alpha_elf_got_entry *tprel_gotent;
-
- for (tprel_gotent = *info->first_gotent; tprel_gotent ;
- tprel_gotent = tprel_gotent->next)
- if (tprel_gotent->gotobj == info->gotobj
- && tprel_gotent->reloc_type == R_ALPHA_GOTTPREL
- && tprel_gotent->addend == irel->r_addend)
- break;
- if (tprel_gotent)
- tprel_gotent->use_count++;
- else
- {
- if (info->gotent->use_count == 0)
- tprel_gotent = info->gotent;
- else
- {
- tprel_gotent = (struct alpha_elf_got_entry *)
- bfd_alloc (info->abfd, sizeof (struct alpha_elf_got_entry));
- if (!tprel_gotent)
- return FALSE;
-
- tprel_gotent->next = *info->first_gotent;
- *info->first_gotent = tprel_gotent;
-
- tprel_gotent->gotobj = info->gotobj;
- tprel_gotent->addend = irel->r_addend;
- tprel_gotent->got_offset = -1;
- tprel_gotent->reloc_done = 0;
- tprel_gotent->reloc_xlated = 0;
- }
-
- tprel_gotent->use_count = 1;
- tprel_gotent->reloc_type = R_ALPHA_GOTTPREL;
- }
- }
-
- return TRUE;
-}
-
-static bfd_boolean
-elf64_alpha_relax_section (abfd, sec, link_info, again)
- 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;
- Elf_Internal_Sym *isymbuf = NULL;
- struct alpha_elf_got_entry **local_got_entries;
- struct alpha_relax_info info;
-
- /* We are not currently changing any sizes, so only one pass. */
- *again = FALSE;
-
- if (link_info->relocatable
- || (sec->flags & SEC_RELOC) == 0
- || sec->reloc_count == 0)
- return TRUE;
-
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
-
- /* Load the relocations for this section. */
- internal_relocs = (_bfd_elf_link_read_relocs
- (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
- link_info->keep_memory));
- if (internal_relocs == NULL)
- return FALSE;
-
- memset(&info, 0, sizeof (info));
- info.abfd = abfd;
- info.sec = sec;
- info.link_info = link_info;
- info.symtab_hdr = symtab_hdr;
- info.relocs = internal_relocs;
- info.relend = irelend = internal_relocs + sec->reloc_count;
-
- /* Find the GP for this object. Do not store the result back via
- _bfd_set_gp_value, since this could change again before final. */
- info.gotobj = alpha_elf_tdata (abfd)->gotobj;
- if (info.gotobj)
- {
- asection *sgot = alpha_elf_tdata (info.gotobj)->got;
- info.gp = (sgot->output_section->vma
- + sgot->output_offset
- + 0x8000);
- }
-
- /* Get the section contents. */
- if (elf_section_data (sec)->this_hdr.contents != NULL)
- info.contents = elf_section_data (sec)->this_hdr.contents;
- else
- {
- info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (info.contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, info.contents,
- (file_ptr) 0, sec->_raw_size))
- goto error_return;
- }
-
- for (irel = internal_relocs; irel < irelend; irel++)
- {
- bfd_vma symval;
- struct alpha_elf_got_entry *gotent;
- unsigned long r_type = ELF64_R_TYPE (irel->r_info);
- unsigned long r_symndx = ELF64_R_SYM (irel->r_info);
-
- /* Early exit for unhandled or unrelaxable relocations. */
- switch (r_type)
- {
- case R_ALPHA_LITERAL:
- case R_ALPHA_GPRELHIGH:
- case R_ALPHA_GPRELLOW:
- case R_ALPHA_GOTDTPREL:
- case R_ALPHA_GOTTPREL:
- case R_ALPHA_TLSGD:
- break;
-
- case R_ALPHA_TLSLDM:
- /* The symbol for a TLSLDM reloc is ignored. Collapse the
- reloc to the 0 symbol so that they all match. */
- r_symndx = 0;
- break;
-
- default:
- continue;
- }
-
- /* Get the value of the symbol referred to by the reloc. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- /* A local symbol. */
- Elf_Internal_Sym *isym;
-
- /* Read this BFD's local symbols. */
- if (isymbuf == NULL)
- {
- 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;
- }
-
- isym = isymbuf + r_symndx;
-
- /* Given the symbol for a TLSLDM reloc is ignored, this also
- means forcing the symbol value to the tp base. */
- if (r_type == R_ALPHA_TLSLDM)
- {
- info.tsec = bfd_abs_section_ptr;
- symval = alpha_get_tprel_base (info.link_info);
- }
- else
- {
- symval = isym->st_value;
- if (isym->st_shndx == SHN_UNDEF)
- continue;
- else if (isym->st_shndx == SHN_ABS)
- info.tsec = bfd_abs_section_ptr;
- else if (isym->st_shndx == SHN_COMMON)
- info.tsec = bfd_com_section_ptr;
- else
- info.tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
- }
-
- info.h = NULL;
- info.other = isym->st_other;
- if (local_got_entries)
- info.first_gotent = &local_got_entries[r_symndx];
- else
- {
- info.first_gotent = &info.gotent;
- info.gotent = NULL;
- }
- }
- else
- {
- unsigned long indx;
- struct alpha_elf_link_hash_entry *h;
-
- indx = r_symndx - symtab_hdr->sh_info;
- h = alpha_elf_sym_hashes (abfd)[indx];
- BFD_ASSERT (h != NULL);
-
- while (h->root.root.type == bfd_link_hash_indirect
- || h->root.root.type == bfd_link_hash_warning)
- h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
-
- /* If the symbol is undefined, we can't do anything with it. */
- if (h->root.root.type == bfd_link_hash_undefweak
- || h->root.root.type == bfd_link_hash_undefined)
- continue;
-
- /* If the symbol isn't defined in the current module, again
- we can't do anything. */
- if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
- {
- /* Except for TLSGD relocs, which can sometimes be
- relaxed to GOTTPREL relocs. */
- if (r_type != R_ALPHA_TLSGD)
- continue;
- info.tsec = bfd_abs_section_ptr;
- symval = 0;
- }
- else
- {
- info.tsec = h->root.root.u.def.section;
- symval = h->root.root.u.def.value;
- }
-
- info.h = h;
- info.other = h->root.other;
- info.first_gotent = &h->got_entries;
- }
-
- /* Search for the got entry to be used by this relocation. */
- for (gotent = *info.first_gotent; gotent ; gotent = gotent->next)
- if (gotent->gotobj == info.gotobj
- && gotent->reloc_type == r_type
- && gotent->addend == irel->r_addend)
- break;
- info.gotent = gotent;
-
- symval += info.tsec->output_section->vma + info.tsec->output_offset;
- symval += irel->r_addend;
-
- switch (r_type)
- {
- case R_ALPHA_LITERAL:
- BFD_ASSERT(info.gotent != NULL);
-
- /* If there exist LITUSE relocations immediately following, this
- opens up all sorts of interesting optimizations, because we
- now know every location that this address load is used. */
- if (irel+1 < irelend
- && ELF64_R_TYPE (irel[1].r_info) == R_ALPHA_LITUSE)
- {
- if (!elf64_alpha_relax_with_lituse (&info, symval, irel))
- goto error_return;
- }
- else
- {
- if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type))
- goto error_return;
- }
- break;
-
- case R_ALPHA_GPRELHIGH:
- case R_ALPHA_GPRELLOW:
- if (!elf64_alpha_relax_gprelhilo (&info, symval, irel,
- r_type == R_ALPHA_GPRELHIGH))
- goto error_return;
- break;
-
- case R_ALPHA_GOTDTPREL:
- case R_ALPHA_GOTTPREL:
- BFD_ASSERT(info.gotent != NULL);
- if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type))
- goto error_return;
- break;
-
- case R_ALPHA_TLSGD:
- case R_ALPHA_TLSLDM:
- BFD_ASSERT(info.gotent != NULL);
- if (!elf64_alpha_relax_tls_get_addr (&info, symval, irel,
- r_type == R_ALPHA_TLSGD))
- goto error_return;
- break;
- }
- }
-
- 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)
- {
- if (!link_info->keep_memory)
- free (isymbuf);
- else
- {
- /* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = (unsigned char *) isymbuf;
- }
- }
-
- if (info.contents != NULL
- && elf_section_data (sec)->this_hdr.contents != info.contents)
- {
- if (!info.changed_contents && !link_info->keep_memory)
- free (info.contents);
- else
- {
- /* Cache the section contents for elf_link_input_bfd. */
- elf_section_data (sec)->this_hdr.contents = info.contents;
- }
- }
-
- if (elf_section_data (sec)->relocs != internal_relocs)
- {
- if (!info.changed_relocs)
- free (internal_relocs);
- else
- elf_section_data (sec)->relocs = internal_relocs;
- }
-
- *again = info.changed_contents || info.changed_relocs;
-
- return TRUE;
-
- error_return:
- if (isymbuf != NULL
- && symtab_hdr->contents != (unsigned char *) isymbuf)
- free (isymbuf);
- if (info.contents != NULL
- && elf_section_data (sec)->this_hdr.contents != info.contents)
- free (info.contents);
- if (internal_relocs != NULL
- && elf_section_data (sec)->relocs != internal_relocs)
- free (internal_relocs);
- return FALSE;
-}
-
-/* PLT/GOT Stuff */
-#define PLT_HEADER_SIZE 32
-#define PLT_HEADER_WORD1 (bfd_vma) 0xc3600000 /* br $27,.+4 */
-#define PLT_HEADER_WORD2 (bfd_vma) 0xa77b000c /* ldq $27,12($27) */
-#define PLT_HEADER_WORD3 (bfd_vma) 0x47ff041f /* nop */
-#define PLT_HEADER_WORD4 (bfd_vma) 0x6b7b0000 /* jmp $27,($27) */
-
-#define PLT_ENTRY_SIZE 12
-#define PLT_ENTRY_WORD1 0xc3800000 /* br $28, plt0 */
-#define PLT_ENTRY_WORD2 0
-#define PLT_ENTRY_WORD3 0
-
-#define MAX_GOT_SIZE (64*1024)
-
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
-
/* Handle an Alpha specific section when reading an object file. This
- is called when elfcode.h finds a section with an unknown type.
+ is called when bfd_section_from_shdr finds a section with an unknown
+ type.
FIXME: We need to handle the SHF_ALPHA_GPREL flag, but I'm not sure
how to. */
static bfd_boolean
-elf64_alpha_section_from_shdr (abfd, hdr, name)
- bfd *abfd;
- Elf_Internal_Shdr *hdr;
- const char *name;
+elf64_alpha_section_from_shdr (bfd *abfd,
+ Elf_Internal_Shdr *hdr,
+ const char *name,
+ int shindex)
{
asection *newsect;
@@ -2295,7 +1107,7 @@ elf64_alpha_section_from_shdr (abfd, hdr, name)
return FALSE;
}
- if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
newsect = hdr->bfd_section;
@@ -2313,9 +1125,7 @@ elf64_alpha_section_from_shdr (abfd, hdr, name)
/* Convert Alpha specific section flags to bfd internal section flags. */
static bfd_boolean
-elf64_alpha_section_flags (flags, hdr)
- flagword *flags;
- Elf_Internal_Shdr *hdr;
+elf64_alpha_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr)
{
if (hdr->sh_flags & SHF_ALPHA_GPREL)
*flags |= SEC_SMALL_DATA;
@@ -2327,10 +1137,7 @@ elf64_alpha_section_flags (flags, hdr)
section name, which is a hack, but ought to work. */
static bfd_boolean
-elf64_alpha_fake_sections (abfd, hdr, sec)
- bfd *abfd;
- Elf_Internal_Shdr *hdr;
- asection *sec;
+elf64_alpha_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
{
register const char *name;
@@ -2360,14 +1167,11 @@ elf64_alpha_fake_sections (abfd, hdr, sec)
file. We use it to put .comm items in .sbss, and not .bss. */
static bfd_boolean
-elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd;
- struct bfd_link_info *info;
- Elf_Internal_Sym *sym;
- const char **namep ATTRIBUTE_UNUSED;
- flagword *flagsp ATTRIBUTE_UNUSED;
- asection **secp;
- bfd_vma *valp;
+elf64_alpha_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
+ Elf_Internal_Sym *sym,
+ const char **namep ATTRIBUTE_UNUSED,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp, bfd_vma *valp)
{
if (sym->st_shndx == SHN_COMMON
&& !info->relocatable
@@ -2380,11 +1184,11 @@ elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (scomm == NULL)
{
- scomm = bfd_make_section (abfd, ".scommon");
- if (scomm == NULL
- || !bfd_set_section_flags (abfd, scomm, (SEC_ALLOC
- | SEC_IS_COMMON
- | SEC_LINKER_CREATED)))
+ scomm = bfd_make_section_with_flags (abfd, ".scommon",
+ (SEC_ALLOC
+ | SEC_IS_COMMON
+ | SEC_LINKER_CREATED));
+ if (scomm == NULL)
return FALSE;
}
@@ -2398,96 +1202,82 @@ elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
/* Create the .got section. */
static bfd_boolean
-elf64_alpha_create_got_section(abfd, info)
- bfd *abfd;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
+elf64_alpha_create_got_section (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
+ flagword flags;
asection *s;
- if ((s = bfd_get_section_by_name (abfd, ".got")))
- {
- /* Check for a non-linker created .got? */
- if (alpha_elf_tdata (abfd)->got == NULL)
- alpha_elf_tdata (abfd)->got = s;
- return TRUE;
- }
-
- s = bfd_make_section (abfd, ".got");
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED);
+ s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
if (s == NULL
- || !bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED))
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
alpha_elf_tdata (abfd)->got = s;
+ /* Make sure the object's gotobj is set to itself so that we default
+ to every object with its own .got. We'll merge .gots later once
+ we've collected each object's info. */
+ alpha_elf_tdata (abfd)->gotobj = abfd;
+
return TRUE;
}
/* Create all the dynamic sections. */
static bfd_boolean
-elf64_alpha_create_dynamic_sections (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+elf64_alpha_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
asection *s;
+ flagword flags;
struct elf_link_hash_entry *h;
- struct bfd_link_hash_entry *bh;
/* We need to create .plt, .rela.plt, .got, and .rela.got sections. */
- s = bfd_make_section (abfd, ".plt");
- if (s == NULL
- || ! bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_CODE))
- || ! bfd_set_section_alignment (abfd, s, 3))
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | (elf64_alpha_use_secureplt ? SEC_READONLY : 0));
+ s = bfd_make_section_anyway_with_flags (abfd, ".plt", flags);
+ if (s == NULL || ! bfd_set_section_alignment (abfd, s, 4))
return FALSE;
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
- bh = NULL;
- if (! (_bfd_generic_link_add_one_symbol
- (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
- (bfd_vma) 0, (const char *) NULL, FALSE,
- get_elf_backend_data (abfd)->collect, &bh)))
+ h = _bfd_elf_define_linkage_sym (abfd, info, s,
+ "_PROCEDURE_LINKAGE_TABLE_");
+ elf_hash_table (info)->hplt = h;
+ if (h == NULL)
return FALSE;
- h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
- if (info->shared
- && ! bfd_elf_link_record_dynamic_symbol (info, h))
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED | SEC_READONLY);
+ s = bfd_make_section_anyway_with_flags (abfd, ".rela.plt", flags);
+ if (s == NULL || ! bfd_set_section_alignment (abfd, s, 3))
return FALSE;
- s = bfd_make_section (abfd, ".rela.plt");
- if (s == NULL
- || !bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
- || ! bfd_set_section_alignment (abfd, s, 3))
- return FALSE;
+ if (elf64_alpha_use_secureplt)
+ {
+ flags = SEC_ALLOC | SEC_LINKER_CREATED;
+ s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
+ if (s == NULL || ! bfd_set_section_alignment (abfd, s, 3))
+ return FALSE;
+ }
/* We may or may not have created a .got section for this object, but
we definitely havn't done the rest of the work. */
- if (!elf64_alpha_create_got_section (abfd, info))
- return FALSE;
+ if (alpha_elf_tdata(abfd)->gotobj == NULL)
+ {
+ if (!elf64_alpha_create_got_section (abfd, info))
+ return FALSE;
+ }
- s = bfd_make_section(abfd, ".rela.got");
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED | SEC_READONLY);
+ s = bfd_make_section_anyway_with_flags (abfd, ".rela.got", flags);
if (s == NULL
- || !bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
|| !bfd_set_section_alignment (abfd, s, 3))
return FALSE;
@@ -2495,21 +1285,11 @@ elf64_alpha_create_dynamic_sections (abfd, info)
dynobj's .got section. We don't do this in the linker script
because we don't want to define the symbol if we are not creating
a global offset table. */
- bh = NULL;
- if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL,
- alpha_elf_tdata(abfd)->got, (bfd_vma) 0, (const char *) NULL,
- FALSE, get_elf_backend_data (abfd)->collect, &bh)))
- return FALSE;
- h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
-
- if (info->shared
- && ! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
-
+ h = _bfd_elf_define_linkage_sym (abfd, info, alpha_elf_tdata(abfd)->got,
+ "_GLOBAL_OFFSET_TABLE_");
elf_hash_table (info)->hgot = h;
+ if (h == NULL)
+ return FALSE;
return TRUE;
}
@@ -2518,10 +1298,8 @@ elf64_alpha_create_dynamic_sections (abfd, info)
ecoff_debug_info structure. */
static bfd_boolean
-elf64_alpha_read_ecoff_info (abfd, section, debug)
- bfd *abfd;
- asection *section;
- struct ecoff_debug_info *debug;
+elf64_alpha_read_ecoff_info (bfd *abfd, asection *section,
+ struct ecoff_debug_info *debug)
{
HDRR *symhdr;
const struct ecoff_debug_swap *swap;
@@ -2572,7 +1350,6 @@ elf64_alpha_read_ecoff_info (abfd, section, debug)
#undef READ
debug->fdr = NULL;
- debug->adjust = NULL;
return TRUE;
@@ -2607,9 +1384,7 @@ elf64_alpha_read_ecoff_info (abfd, section, debug)
/* Alpha ELF local labels start with '$'. */
static bfd_boolean
-elf64_alpha_is_local_label_name (abfd, name)
- bfd *abfd ATTRIBUTE_UNUSED;
- const char *name;
+elf64_alpha_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name)
{
return name[0] == '$';
}
@@ -2626,15 +1401,10 @@ struct mips_elf_find_line
};
static bfd_boolean
-elf64_alpha_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
- functionname_ptr, line_ptr)
- bfd *abfd;
- asection *section;
- asymbol **symbols;
- bfd_vma offset;
- const char **filename_ptr;
- const char **functionname_ptr;
- unsigned int *line_ptr;
+elf64_alpha_find_nearest_line (bfd *abfd, asection *section, asymbol **symbols,
+ bfd_vma offset, const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
{
asection *msec;
@@ -2737,9 +1507,7 @@ struct extsym_info
};
static bfd_boolean
-elf64_alpha_output_extsym (h, data)
- struct alpha_elf_link_hash_entry *h;
- PTR data;
+elf64_alpha_output_extsym (struct alpha_elf_link_hash_entry *h, PTR data)
{
struct extsym_info *einfo = (struct extsym_info *) data;
bfd_boolean strip;
@@ -2750,10 +1518,11 @@ elf64_alpha_output_extsym (h, data)
if (h->root.indx == -2)
strip = FALSE;
- else if (((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- || (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0)
- && (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- && (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
+ else if ((h->root.def_dynamic
+ || h->root.ref_dynamic
+ || h->root.root.type == bfd_link_hash_new)
+ && !h->root.def_regular
+ && !h->root.ref_regular)
strip = TRUE;
else if (einfo->info->strip == strip_all
|| (einfo->info->strip == strip_some
@@ -2840,24 +1609,6 @@ elf64_alpha_output_extsym (h, data)
else
h->esym.asym.value = 0;
}
- else if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
- {
- /* Set type and value for a symbol with a function stub. */
- h->esym.asym.st = stProc;
- sec = bfd_get_section_by_name (einfo->abfd, ".plt");
- if (sec == NULL)
- h->esym.asym.value = 0;
- else
- {
- output_section = sec->output_section;
- if (output_section != NULL)
- h->esym.asym.value = (h->root.plt.offset
- + sec->output_offset
- + output_section->vma);
- else
- h->esym.asym.value = 0;
- }
- }
if (! bfd_ecoff_debug_one_external (einfo->abfd, einfo->debug, einfo->swap,
h->root.root.root.string,
@@ -2873,11 +1624,9 @@ elf64_alpha_output_extsym (h, data)
/* Search for and possibly create a got entry. */
static struct alpha_elf_got_entry *
-get_got_entry (abfd, h, r_type, r_symndx, r_addend)
- bfd *abfd;
- struct alpha_elf_link_hash_entry *h;
- unsigned long r_type, r_symndx;
- bfd_vma r_addend;
+get_got_entry (bfd *abfd, struct alpha_elf_link_hash_entry *h,
+ unsigned long r_type, unsigned long r_symndx,
+ bfd_vma r_addend)
{
struct alpha_elf_got_entry *gotent;
struct alpha_elf_got_entry **slot;
@@ -2930,6 +1679,7 @@ get_got_entry (abfd, h, r_type, r_symndx, r_addend)
gotent->gotobj = abfd;
gotent->addend = r_addend;
gotent->got_offset = -1;
+ gotent->plt_offset = -1;
gotent->use_count = 1;
gotent->reloc_type = r_type;
gotent->reloc_done = 0;
@@ -2949,14 +1699,21 @@ get_got_entry (abfd, h, r_type, r_symndx, r_addend)
return gotent;
}
+static bfd_boolean
+elf64_alpha_want_plt (struct alpha_elf_link_hash_entry *ah)
+{
+ return ((ah->root.type == STT_FUNC
+ || ah->root.root.type == bfd_link_hash_undefweak
+ || ah->root.root.type == bfd_link_hash_undefined)
+ && (ah->flags & ALPHA_ELF_LINK_HASH_LU_PLT) != 0
+ && (ah->flags & ~ALPHA_ELF_LINK_HASH_LU_PLT) == 0);
+}
+
/* Handle dynamic relocations when doing an Alpha ELF link. */
static bfd_boolean
-elf64_alpha_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs)
{
bfd *dynobj;
asection *sreloc;
@@ -2964,12 +1721,20 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
Elf_Internal_Shdr *symtab_hdr;
struct alpha_elf_link_hash_entry **sym_hashes;
const Elf_Internal_Rela *rel, *relend;
- bfd_boolean got_created;
bfd_size_type amt;
if (info->relocatable)
return TRUE;
+ /* Don't do anything special with non-loaded, non-alloced sections.
+ In particular, any relocs in such sections should not affect GOT
+ and PLT reference counting (ie. we don't allow them to create GOT
+ or PLT entries), there's no possibility or desire to optimize TLS
+ relocs, and there's not much point in propagating relocs to shared
+ libs that the dynamic linker won't relocate. */
+ if ((sec->flags & SEC_ALLOC) == 0)
+ return TRUE;
+
dynobj = elf_hash_table(info)->dynobj;
if (dynobj == NULL)
elf_hash_table(info)->dynobj = dynobj = abfd;
@@ -2978,7 +1743,6 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
rel_sec_name = NULL;
symtab_hdr = &elf_tdata(abfd)->symtab_hdr;
sym_hashes = alpha_elf_sym_hashes(abfd);
- got_created = FALSE;
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; ++rel)
@@ -3007,7 +1771,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
|| h->root.root.type == bfd_link_hash_warning)
h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
- h->root.elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
+ h->root.ref_regular = 1;
}
/* We can only get preliminary data on whether a symbol is
@@ -3016,8 +1780,9 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
this may help reduce memory usage and processing time later. */
maybe_dynamic = FALSE;
if (h && ((info->shared
- && (!info->symbolic || info->unresolved_syms_in_shared_libs == RM_IGNORE))
- || ! (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
+ && (!info->symbolic
+ || info->unresolved_syms_in_shared_libs == RM_IGNORE))
+ || !h->root.def_regular
|| h->root.root.type == bfd_link_hash_defweak))
maybe_dynamic = TRUE;
@@ -3035,7 +1800,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
This will be important when it comes to decide if we can
create a .plt entry for a function symbol. */
while (++rel < relend && ELF64_R_TYPE (rel->r_info) == R_ALPHA_LITUSE)
- if (rel->r_addend >= 1 && rel->r_addend <= 5)
+ if (rel->r_addend >= 1 && rel->r_addend <= 6)
gotent_flags |= 1 << rel->r_addend;
--rel;
@@ -3055,7 +1820,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
case R_ALPHA_REFLONG:
case R_ALPHA_REFQUAD:
- if ((info->shared && (sec->flags & SEC_ALLOC)) || maybe_dynamic)
+ if (info->shared || maybe_dynamic)
need = NEED_DYNREL;
break;
@@ -3089,18 +1854,10 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
if (need & NEED_GOT)
{
- if (!got_created)
+ if (alpha_elf_tdata(abfd)->gotobj == NULL)
{
if (!elf64_alpha_create_got_section (abfd, info))
return FALSE;
-
- /* Make sure the object's gotobj is set to itself so
- that we default to every object with its own .got.
- We'll merge .gots later once we've collected each
- object's info. */
- alpha_elf_tdata(abfd)->gotobj = abfd;
-
- got_created = 1;
}
}
@@ -3121,12 +1878,13 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
h->flags = gotent_flags;
/* Make a guess as to whether a .plt entry is needed. */
- if ((gotent_flags & ALPHA_ELF_LINK_HASH_LU_FUNC)
- && !(gotent_flags & ~ALPHA_ELF_LINK_HASH_LU_FUNC))
- h->root.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- else
- h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
+ /* ??? It appears that we won't make it into
+ adjust_dynamic_symbol for symbols that remain
+ totally undefined. Copying this check here means
+ we can create a plt entry for them too. */
+ h->root.needs_plt
+ = (maybe_dynamic && elf64_alpha_want_plt (h));
+ }
}
}
@@ -3156,13 +1914,14 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
{
flagword flags;
- sreloc = bfd_make_section (dynobj, rel_sec_name);
flags = (SEC_HAS_CONTENTS | SEC_IN_MEMORY
| SEC_LINKER_CREATED | SEC_READONLY);
if (sec->flags & SEC_ALLOC)
flags |= SEC_ALLOC | SEC_LOAD;
+ sreloc = bfd_make_section_with_flags (dynobj,
+ rel_sec_name,
+ flags);
if (sreloc == NULL
- || !bfd_set_section_flags (dynobj, sreloc, flags)
|| !bfd_set_section_alignment (dynobj, sreloc, 3))
return FALSE;
}
@@ -3192,8 +1951,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
rent->srel = sreloc;
rent->rtype = r_type;
rent->count = 1;
- rent->reltext = ((sec->flags & (SEC_READONLY | SEC_ALLOC))
- == (SEC_READONLY | SEC_ALLOC));
+ rent->reltext = (sec->flags & SEC_READONLY) != 0;
rent->next = h->reloc_entries;
h->reloc_entries = rent;
@@ -3205,9 +1963,8 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
{
/* If this is a shared library, and the section is to be
loaded into memory, we need a RELATIVE reloc. */
- sreloc->_raw_size += sizeof (Elf64_External_Rela);
- if ((sec->flags & (SEC_READONLY | SEC_ALLOC))
- == (SEC_READONLY | SEC_ALLOC))
+ sreloc->size += sizeof (Elf64_External_Rela);
+ if (sec->flags & SEC_READONLY)
info->flags |= DF_TEXTREL;
}
}
@@ -3223,9 +1980,8 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
understand. */
static bfd_boolean
-elf64_alpha_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
+elf64_alpha_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
{
bfd *dynobj;
asection *s;
@@ -3235,66 +1991,36 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
ah = (struct alpha_elf_link_hash_entry *)h;
/* Now that we've seen all of the input symbols, finalize our decision
- about whether this symbol should get a .plt entry. */
-
- if (alpha_elf_dynamic_symbol_p (h, info)
- && ((h->type == STT_FUNC
- && !(ah->flags & ALPHA_ELF_LINK_HASH_LU_ADDR))
- || (h->type == STT_NOTYPE
- && (ah->flags & ALPHA_ELF_LINK_HASH_LU_FUNC)
- && !(ah->flags & ~ALPHA_ELF_LINK_HASH_LU_FUNC)))
- /* Don't prevent otherwise valid programs from linking by attempting
- to create a new .got entry somewhere. A Correct Solution would be
- to add a new .got section to a new object file and let it be merged
- somewhere later. But for now don't bother. */
- && ah->got_entries)
+ about whether this symbol should get a .plt entry. Irritatingly, it
+ is common for folk to leave undefined symbols in shared libraries,
+ and they still expect lazy binding; accept undefined symbols in lieu
+ of STT_FUNC. */
+ if (alpha_elf_dynamic_symbol_p (h, info) && elf64_alpha_want_plt (ah))
{
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = TRUE;
s = bfd_get_section_by_name(dynobj, ".plt");
if (!s && !elf64_alpha_create_dynamic_sections (dynobj, info))
return FALSE;
- /* The first bit of the .plt is reserved. */
- if (s->_raw_size == 0)
- s->_raw_size = PLT_HEADER_SIZE;
-
- h->plt.offset = s->_raw_size;
- s->_raw_size += PLT_ENTRY_SIZE;
-
- /* If this symbol is not defined in a regular file, and we are not
- generating a shared library, then set the symbol to the location
- in the .plt. This is required to make function pointers compare
- equal between the normal executable and the shared library. */
- if (! info->shared
- && h->root.type != bfd_link_hash_defweak)
- {
- ah->plt_old_section = h->root.u.def.section;
- ah->plt_old_value = h->root.u.def.value;
- ah->flags |= ALPHA_ELF_LINK_HASH_PLT_LOC;
- h->root.u.def.section = s;
- h->root.u.def.value = h->plt.offset;
- }
-
- /* We also need a JMP_SLOT entry in the .rela.plt section. */
- s = bfd_get_section_by_name (dynobj, ".rela.plt");
- BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf64_External_Rela);
+ /* We need one plt entry per got subsection. Delay allocation of
+ the actual plt entries until size_plt_section, called from
+ size_dynamic_sections or during relaxation. */
return TRUE;
}
else
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = FALSE;
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
+ if (h->u.weakdef != NULL)
{
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
+ 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;
}
@@ -3311,9 +2037,8 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
in these situations. */
static bfd_boolean
-elf64_alpha_merge_ind_symbols (hi, dummy)
- struct alpha_elf_link_hash_entry *hi;
- PTR dummy ATTRIBUTE_UNUSED;
+elf64_alpha_merge_ind_symbols (struct alpha_elf_link_hash_entry *hi,
+ PTR dummy ATTRIBUTE_UNUSED)
{
struct alpha_elf_link_hash_entry *hs;
@@ -3387,8 +2112,7 @@ elf64_alpha_merge_ind_symbols (hi, dummy)
/* Is it possible to merge two object file's .got tables? */
static bfd_boolean
-elf64_alpha_can_merge_gots (a, b)
- bfd *a, *b;
+elf64_alpha_can_merge_gots (bfd *a, bfd *b)
{
int total = alpha_elf_tdata (a)->total_got_size;
bfd *bsub;
@@ -3448,8 +2172,7 @@ elf64_alpha_can_merge_gots (a, b)
/* Actually merge two .got tables. */
static void
-elf64_alpha_merge_gots (a, b)
- bfd *a, *b;
+elf64_alpha_merge_gots (bfd *a, bfd *b)
{
int total = alpha_elf_tdata (a)->total_got_size;
bfd *bsub;
@@ -3496,16 +2219,17 @@ elf64_alpha_merge_gots (a, b)
|| h->root.root.type == bfd_link_hash_warning)
h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
- start = &h->got_entries;
- for (pbe = start, be = *start; be ; pbe = &be->next, be = be->next)
+ pbe = start = &h->got_entries;
+ while ((be = *pbe) != NULL)
{
if (be->use_count == 0)
{
*pbe = be->next;
- continue;
+ memset (be, 0xa5, sizeof (*be));
+ goto kill;
}
if (be->gotobj != b)
- continue;
+ goto next;
for (ae = *start; ae ; ae = ae->next)
if (ae->gotobj == a
@@ -3515,12 +2239,15 @@ elf64_alpha_merge_gots (a, b)
ae->flags |= be->flags;
ae->use_count += be->use_count;
*pbe = be->next;
- goto global_found;
+ memset (be, 0xa5, sizeof (*be));
+ goto kill;
}
be->gotobj = a;
total += alpha_got_entry_size (be->reloc_type);
- global_found:;
+ next:;
+ pbe = &be->next;
+ kill:;
}
}
@@ -3543,11 +2270,9 @@ elf64_alpha_merge_gots (a, b)
/* Calculate the offsets for the got entries. */
static bfd_boolean
-elf64_alpha_calc_got_offsets_for_symbol (h, arg)
- struct alpha_elf_link_hash_entry *h;
- PTR arg ATTRIBUTE_UNUSED;
+elf64_alpha_calc_got_offsets_for_symbol (struct alpha_elf_link_hash_entry *h,
+ PTR arg ATTRIBUTE_UNUSED)
{
- bfd_boolean result = TRUE;
struct alpha_elf_got_entry *gotent;
if (h->root.root.type == bfd_link_hash_warning)
@@ -3560,31 +2285,23 @@ elf64_alpha_calc_got_offsets_for_symbol (h, arg)
bfd_size_type *plge;
td = alpha_elf_tdata (gotent->gotobj);
- if (td == NULL)
- {
- _bfd_error_handler (_("Symbol %s has no GOT subsection for offset 0x%x"),
- h->root.root.root.string, gotent->got_offset);
- result = FALSE;
- continue;
- }
- plge = &td->got->_raw_size;
+ plge = &td->got->size;
gotent->got_offset = *plge;
*plge += alpha_got_entry_size (gotent->reloc_type);
}
- return result;
+ return TRUE;
}
static void
-elf64_alpha_calc_got_offsets (info)
- struct bfd_link_info *info;
+elf64_alpha_calc_got_offsets (struct bfd_link_info *info)
{
bfd *i, *got_list = alpha_elf_hash_table(info)->got_list;
/* First, zero out the .got sizes, as we may be recalculating the
.got after optimizing it. */
for (i = got_list; i ; i = alpha_elf_tdata(i)->got_link_next)
- alpha_elf_tdata(i)->got->_raw_size = 0;
+ alpha_elf_tdata(i)->got->size = 0;
/* Next, fill in the offsets for all the global entries. */
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
@@ -3594,7 +2311,7 @@ elf64_alpha_calc_got_offsets (info)
/* Finally, fill in the offsets for the local entries. */
for (i = got_list; i ; i = alpha_elf_tdata(i)->got_link_next)
{
- bfd_size_type got_offset = alpha_elf_tdata(i)->got->_raw_size;
+ bfd_size_type got_offset = alpha_elf_tdata(i)->got->size;
bfd *j;
for (j = i; j ; j = alpha_elf_tdata(j)->in_got_link_next)
@@ -3615,16 +2332,14 @@ elf64_alpha_calc_got_offsets (info)
}
}
- alpha_elf_tdata(i)->got->_raw_size = got_offset;
- alpha_elf_tdata(i)->got->_cooked_size = got_offset;
+ alpha_elf_tdata(i)->got->size = got_offset;
}
}
/* Constructs the gots. */
static bfd_boolean
-elf64_alpha_size_got_sections (info)
- struct bfd_link_info *info;
+elf64_alpha_size_got_sections (struct bfd_link_info *info)
{
bfd *i, *got_list, *cur_got_obj = NULL;
int something_changed = 0;
@@ -3648,9 +2363,8 @@ elf64_alpha_size_got_sections (info)
{
/* Yikes! A single object file has too many entries. */
(*_bfd_error_handler)
- (_("%s: .got subsegment exceeds 64K (size %d)"),
- bfd_archive_filename (i),
- alpha_elf_tdata (this_got)->total_got_size);
+ (_("%B: .got subsegment exceeds 64K (size %d)"),
+ i, alpha_elf_tdata (this_got)->total_got_size);
return FALSE;
}
@@ -3678,8 +2392,11 @@ elf64_alpha_size_got_sections (info)
if (elf64_alpha_can_merge_gots (cur_got_obj, i))
{
elf64_alpha_merge_gots (cur_got_obj, i);
+
+ 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
@@ -3697,89 +2414,84 @@ elf64_alpha_size_got_sections (info)
return TRUE;
}
+static bfd_boolean
+elf64_alpha_size_plt_section_1 (struct alpha_elf_link_hash_entry *h, PTR data)
+{
+ asection *splt = (asection *) data;
+ struct alpha_elf_got_entry *gotent;
+ bfd_boolean saw_one = FALSE;
+
+ /* If we didn't need an entry before, we still don't. */
+ if (!h->root.needs_plt)
+ return TRUE;
+
+ /* For each LITERAL got entry still in use, allocate a plt entry. */
+ for (gotent = h->got_entries; gotent ; gotent = gotent->next)
+ if (gotent->reloc_type == R_ALPHA_LITERAL
+ && gotent->use_count > 0)
+ {
+ if (splt->size == 0)
+ splt->size = PLT_HEADER_SIZE;
+ gotent->plt_offset = splt->size;
+ splt->size += PLT_ENTRY_SIZE;
+ saw_one = TRUE;
+ }
+
+ /* If there weren't any, there's no longer a need for the PLT entry. */
+ if (!saw_one)
+ h->root.needs_plt = FALSE;
+
+ return TRUE;
+}
+
/* Called from relax_section to rebuild the PLT in light of
potential changes in the function's status. */
static bfd_boolean
-elf64_alpha_size_plt_section (info)
- struct bfd_link_info *info;
+elf64_alpha_size_plt_section (struct bfd_link_info *info)
{
- asection *splt, *spltrel;
+ asection *splt, *spltrel, *sgotplt;
unsigned long entries;
bfd *dynobj;
dynobj = elf_hash_table(info)->dynobj;
- splt = bfd_get_section_by_name(dynobj, ".plt");
+ splt = bfd_get_section_by_name (dynobj, ".plt");
if (splt == NULL)
return TRUE;
- splt->_raw_size = 0;
+ splt->size = 0;
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
elf64_alpha_size_plt_section_1, splt);
- splt->_cooked_size = splt->_raw_size;
-
/* Every plt entry requires a JMP_SLOT relocation. */
spltrel = bfd_get_section_by_name (dynobj, ".rela.plt");
- if (splt->_raw_size)
- entries = (splt->_raw_size - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
- else
- entries = 0;
- spltrel->_raw_size = entries * sizeof (Elf64_External_Rela);
- spltrel->_cooked_size = spltrel->_raw_size;
-
- return TRUE;
-}
-
-static bfd_boolean
-elf64_alpha_size_plt_section_1 (h, data)
- struct alpha_elf_link_hash_entry *h;
- PTR data;
-{
- asection *splt = (asection *) data;
- struct alpha_elf_got_entry *gotent;
-
- /* If we didn't need an entry before, we still don't. */
- if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT))
- return TRUE;
-
- /* There must still be a LITERAL got entry for the function. */
- for (gotent = h->got_entries; gotent ; gotent = gotent->next)
- if (gotent->reloc_type == R_ALPHA_LITERAL
- && gotent->use_count > 0)
- break;
-
- /* If there is, reset the PLT offset. If not, there's no longer
- a need for the PLT entry. */
- if (gotent)
+ if (splt->size)
{
- if (splt->_raw_size == 0)
- splt->_raw_size = PLT_HEADER_SIZE;
- h->root.plt.offset = splt->_raw_size;
- splt->_raw_size += PLT_ENTRY_SIZE;
+ if (elf64_alpha_use_secureplt)
+ entries = (splt->size - NEW_PLT_HEADER_SIZE) / NEW_PLT_ENTRY_SIZE;
+ else
+ entries = (splt->size - OLD_PLT_HEADER_SIZE) / OLD_PLT_ENTRY_SIZE;
}
else
- {
- h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- h->root.plt.offset = -1;
+ entries = 0;
+ spltrel->size = entries * sizeof (Elf64_External_Rela);
- /* Undo the definition frobbing begun in adjust_dynamic_symbol. */
- if (h->flags & ALPHA_ELF_LINK_HASH_PLT_LOC)
- {
- h->root.root.u.def.section = h->plt_old_section;
- h->root.root.u.def.value = h->plt_old_value;
- h->flags &= ~ALPHA_ELF_LINK_HASH_PLT_LOC;
- }
+ /* When using the secureplt, we need two words somewhere in the data
+ segment for the dynamic linker to tell us where to go. This is the
+ entire contents of the .got.plt section. */
+ if (elf64_alpha_use_secureplt)
+ {
+ sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
+ sgotplt->size = entries ? 16 : 0;
}
return TRUE;
}
static bfd_boolean
-elf64_alpha_always_size_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+elf64_alpha_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
bfd *i;
@@ -3799,9 +2511,9 @@ elf64_alpha_always_size_sections (output_bfd, info)
for ( ; i ; i = alpha_elf_tdata(i)->got_link_next)
{
asection *s = alpha_elf_tdata(i)->got;
- if (s->_raw_size > 0)
+ if (s->size > 0)
{
- s->contents = (bfd_byte *) bfd_zalloc (i, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (i, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -3813,8 +2525,7 @@ elf64_alpha_always_size_sections (output_bfd, info)
/* The number of dynamic relocations required by a static relocation. */
static int
-alpha_dynamic_entries_for_reloc (r_type, dynamic, shared)
- int r_type, dynamic, shared;
+alpha_dynamic_entries_for_reloc (int r_type, int dynamic, int shared)
{
switch (r_type)
{
@@ -3845,9 +2556,8 @@ alpha_dynamic_entries_for_reloc (r_type, dynamic, shared)
/* Work out the sizes of the dynamic relocation entries. */
static bfd_boolean
-elf64_alpha_calc_dynrel_sizes (h, info)
- struct alpha_elf_link_hash_entry *h;
- struct bfd_link_info *info;
+elf64_alpha_calc_dynrel_sizes (struct alpha_elf_link_hash_entry *h,
+ struct bfd_link_info *info)
{
bfd_boolean dynamic;
struct alpha_elf_reloc_entry *relent;
@@ -3863,29 +2573,32 @@ elf64_alpha_calc_dynrel_sizes (h, info)
set. This is done for dynamic symbols in
elf_adjust_dynamic_symbol but this is not done for non-dynamic
symbols, somehow. */
- if (((h->root.elf_link_hash_flags
- & (ELF_LINK_HASH_DEF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_DEF_DYNAMIC))
- == ELF_LINK_HASH_REF_REGULAR)
+ if (!h->root.def_regular
+ && h->root.ref_regular
+ && !h->root.def_dynamic
&& (h->root.root.type == bfd_link_hash_defined
|| h->root.root.type == bfd_link_hash_defweak)
&& !(h->root.root.u.def.section->owner->flags & DYNAMIC))
- h->root.elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->root.def_regular = 1;
/* If the symbol is dynamic, we'll need all the relocations in their
natural form. If this is a shared object, and it has been forced
local, we'll need the same number of RELATIVE relocations. */
-
dynamic = alpha_elf_dynamic_symbol_p (&h->root, info);
+ /* If the symbol is a hidden undefined weak, then we never have any
+ relocations. Avoid the loop which may want to add RELATIVE relocs
+ based on info->shared. */
+ if (h->root.root.type == bfd_link_hash_undefweak && !dynamic)
+ return TRUE;
+
for (relent = h->reloc_entries; relent; relent = relent->next)
{
entries = alpha_dynamic_entries_for_reloc (relent->rtype, dynamic,
info->shared);
if (entries)
{
- relent->srel->_raw_size +=
+ relent->srel->size +=
entries * sizeof (Elf64_External_Rela) * relent->count;
if (relent->reltext)
info->flags |= DT_TEXTREL;
@@ -3895,11 +2608,57 @@ elf64_alpha_calc_dynrel_sizes (h, info)
return TRUE;
}
+/* Subroutine of elf64_alpha_size_rela_got_section for doing the
+ global symbols. */
+
+static bfd_boolean
+elf64_alpha_size_rela_got_1 (struct alpha_elf_link_hash_entry *h,
+ struct bfd_link_info *info)
+{
+ bfd_boolean dynamic;
+ struct alpha_elf_got_entry *gotent;
+ unsigned long entries;
+
+ if (h->root.root.type == bfd_link_hash_warning)
+ h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
+
+ /* If we're using a plt for this symbol, then all of its relocations
+ for its got entries go into .rela.plt. */
+ if (h->root.needs_plt)
+ return TRUE;
+
+ /* If the symbol is dynamic, we'll need all the relocations in their
+ natural form. If this is a shared object, and it has been forced
+ local, we'll need the same number of RELATIVE relocations. */
+ dynamic = alpha_elf_dynamic_symbol_p (&h->root, info);
+
+ /* If the symbol is a hidden undefined weak, then we never have any
+ relocations. Avoid the loop which may want to add RELATIVE relocs
+ based on info->shared. */
+ if (h->root.root.type == bfd_link_hash_undefweak && !dynamic)
+ return TRUE;
+
+ entries = 0;
+ for (gotent = h->got_entries; gotent ; gotent = gotent->next)
+ if (gotent->use_count > 0)
+ entries += alpha_dynamic_entries_for_reloc (gotent->reloc_type,
+ dynamic, info->shared);
+
+ if (entries > 0)
+ {
+ bfd *dynobj = elf_hash_table(info)->dynobj;
+ asection *srel = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (srel != NULL);
+ srel->size += sizeof (Elf64_External_Rela) * entries;
+ }
+
+ return TRUE;
+}
+
/* Set the sizes of the dynamic relocation sections. */
static bfd_boolean
-elf64_alpha_size_rela_got_section (info)
- struct bfd_link_info *info;
+elf64_alpha_size_rela_got_section (struct bfd_link_info *info)
{
unsigned long entries;
bfd *i, *dynobj;
@@ -3939,66 +2698,20 @@ elf64_alpha_size_rela_got_section (info)
BFD_ASSERT (entries == 0);
return TRUE;
}
- srel->_raw_size = sizeof (Elf64_External_Rela) * entries;
+ 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);
- srel->_cooked_size = srel->_raw_size;
-
- return TRUE;
-}
-
-/* Subroutine of elf64_alpha_size_rela_got_section for doing the
- global symbols. */
-
-static bfd_boolean
-elf64_alpha_size_rela_got_1 (h, info)
- struct alpha_elf_link_hash_entry *h;
- struct bfd_link_info *info;
-{
- bfd_boolean dynamic;
- struct alpha_elf_got_entry *gotent;
- unsigned long entries;
-
- if (h->root.root.type == bfd_link_hash_warning)
- h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
-
- /* If the symbol is dynamic, we'll need all the relocations in their
- natural form. If this is a shared object, and it has been forced
- local, we'll need the same number of RELATIVE relocations. */
-
- dynamic = alpha_elf_dynamic_symbol_p (&h->root, info);
-
- entries = 0;
- for (gotent = h->got_entries; gotent ; gotent = gotent->next)
- if (gotent->use_count > 0)
- entries += alpha_dynamic_entries_for_reloc (gotent->reloc_type,
- dynamic, info->shared);
-
- /* If we are using a .plt entry, subtract one, as the first
- reference uses a .rela.plt entry instead. */
- if (h->root.plt.offset != MINUS_ONE)
- entries--;
-
- if (entries > 0)
- {
- bfd *dynobj = elf_hash_table(info)->dynobj;
- asection *srel = bfd_get_section_by_name (dynobj, ".rela.got");
- BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf64_External_Rela) * entries;
- }
-
return TRUE;
}
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-elf64_alpha_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
bfd *dynobj;
asection *s;
@@ -4014,7 +2727,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
@@ -4026,6 +2739,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
elf64_alpha_calc_dynrel_sizes, info);
elf64_alpha_size_rela_got_section (info);
+ elf64_alpha_size_plt_section (info);
}
/* else we're not dynamic and by definition we don't need such things. */
@@ -4036,7 +2750,6 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
if (!(s->flags & SEC_LINKER_CREATED))
continue;
@@ -4045,23 +2758,11 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- /* If we don't need this section, strip it from the output file.
- This is to handle .rela.bss and .rela.plt. We must create it
- in create_dynamic_sections, because it must be created before
- the linker maps input sections to output sections. The
- linker does that before adjust_dynamic_symbol is called, and
- it is that function which decides whether anything needs to
- go into these sections. */
-
- strip = FALSE;
-
if (strncmp (name, ".rela", 5) == 0)
{
- strip = (s->_raw_size == 0);
-
- if (!strip)
+ if (s->size != 0)
{
- if (strcmp(name, ".rela.plt") == 0)
+ if (strcmp (name, ".rela.plt") == 0)
relplt = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -4069,19 +2770,30 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
s->reloc_count = 0;
}
}
- else if (strcmp (name, ".plt") != 0)
+ else if (strncmp (name, ".got", 4) != 0
+ && strcmp (name, ".plt") != 0
+ && strcmp (name, ".dynbss") != 0)
{
/* It's not one of our dynamic sections, so don't allocate space. */
continue;
}
- if (strip)
- _bfd_strip_section_from_output (info, s);
- else
+ if (s->size == 0)
+ {
+ /* If we don't need this section, strip it from the output file.
+ This is to handle .rela.bss and .rela.plt. We must create it
+ in create_dynamic_sections, because it must be created before
+ the linker maps input sections to output sections. The
+ linker does that before adjust_dynamic_symbol is called, and
+ it is that function which decides whether anything needs to
+ go into these sections. */
+ s->flags |= SEC_EXCLUDE;
+ }
+ else if ((s->flags & SEC_HAS_CONTENTS) != 0)
{
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL)
return FALSE;
}
}
@@ -4109,6 +2821,10 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
|| !add_dynamic_entry (DT_PLTREL, DT_RELA)
|| !add_dynamic_entry (DT_JMPREL, 0))
return FALSE;
+
+ if (elf64_alpha_use_secureplt
+ && !add_dynamic_entry (DT_ALPHA_PLTRO, 1))
+ return FALSE;
}
if (!add_dynamic_entry (DT_RELA, 0)
@@ -4126,17 +2842,1021 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
return TRUE;
}
+
+/* These functions do relaxation for Alpha ELF.
+
+ Currently I'm only handling what I can do with existing compiler
+ and assembler support, which means no instructions are removed,
+ though some may be nopped. At this time GCC does not emit enough
+ information to do all of the relaxing that is possible. It will
+ take some not small amount of work for that to happen.
+
+ There are a couple of interesting papers that I once read on this
+ subject, that I cannot find references to at the moment, that
+ related to Alpha in particular. They are by David Wall, then of
+ DEC WRL. */
+
+struct alpha_relax_info
+{
+ bfd *abfd;
+ asection *sec;
+ bfd_byte *contents;
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Rela *relocs, *relend;
+ struct bfd_link_info *link_info;
+ bfd_vma gp;
+ bfd *gotobj;
+ asection *tsec;
+ struct alpha_elf_link_hash_entry *h;
+ struct alpha_elf_got_entry **first_gotent;
+ struct alpha_elf_got_entry *gotent;
+ bfd_boolean changed_contents;
+ bfd_boolean changed_relocs;
+ unsigned char other;
+};
+
+static Elf_Internal_Rela *
+elf64_alpha_find_reloc_at_ofs (Elf_Internal_Rela *rel,
+ Elf_Internal_Rela *relend,
+ bfd_vma offset, int type)
+{
+ while (rel < relend)
+ {
+ if (rel->r_offset == offset
+ && ELF64_R_TYPE (rel->r_info) == (unsigned int) type)
+ return rel;
+ ++rel;
+ }
+ return NULL;
+}
+
+static bfd_boolean
+elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval,
+ Elf_Internal_Rela *irel, unsigned long r_type)
+{
+ unsigned int insn;
+ bfd_signed_vma disp;
+
+ /* Get the instruction. */
+ insn = bfd_get_32 (info->abfd, info->contents + irel->r_offset);
+
+ if (insn >> 26 != OP_LDQ)
+ {
+ reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
+ ((*_bfd_error_handler)
+ ("%B: %A+0x%lx: warning: %s relocation against unexpected insn",
+ info->abfd, info->sec,
+ (unsigned long) irel->r_offset, howto->name));
+ return TRUE;
+ }
+
+ /* Can't relax dynamic symbols. */
+ if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
+ return TRUE;
+
+ /* Can't use local-exec relocations in shared libraries. */
+ if (r_type == R_ALPHA_GOTTPREL && info->link_info->shared)
+ return TRUE;
+
+ if (r_type == R_ALPHA_LITERAL)
+ {
+ /* Look for nice constant addresses. This includes the not-uncommon
+ special case of 0 for undefweak symbols. */
+ if ((info->h && info->h->root.root.type == bfd_link_hash_undefweak)
+ || (!info->link_info->shared
+ && (symval >= (bfd_vma)-0x8000 || symval < 0x8000)))
+ {
+ disp = 0;
+ insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16);
+ insn |= (symval & 0xffff);
+ r_type = R_ALPHA_NONE;
+ }
+ else
+ {
+ disp = symval - info->gp;
+ insn = (OP_LDA << 26) | (insn & 0x03ff0000);
+ r_type = R_ALPHA_GPREL16;
+ }
+ }
+ else
+ {
+ bfd_vma dtp_base, tp_base;
+
+ BFD_ASSERT (elf_hash_table (info->link_info)->tls_sec != NULL);
+ dtp_base = alpha_get_dtprel_base (info->link_info);
+ tp_base = alpha_get_tprel_base (info->link_info);
+ disp = symval - (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base);
+
+ insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16);
+
+ switch (r_type)
+ {
+ case R_ALPHA_GOTDTPREL:
+ r_type = R_ALPHA_DTPREL16;
+ break;
+ case R_ALPHA_GOTTPREL:
+ r_type = R_ALPHA_TPREL16;
+ break;
+ default:
+ BFD_ASSERT (0);
+ return FALSE;
+ }
+ }
+
+ if (disp < -0x8000 || disp >= 0x8000)
+ return TRUE;
+
+ bfd_put_32 (info->abfd, (bfd_vma) insn, info->contents + irel->r_offset);
+ info->changed_contents = TRUE;
+
+ /* Reduce the use count on this got entry by one, possibly
+ eliminating it. */
+ if (--info->gotent->use_count == 0)
+ {
+ int sz = alpha_got_entry_size (r_type);
+ alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+ if (!info->h)
+ alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+ }
+
+ /* Smash the existing GOT relocation for its 16-bit immediate pair. */
+ irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), r_type);
+ info->changed_relocs = TRUE;
+ /* ??? Search forward through this basic block looking for insns
+ that use the target register. Stop after an insn modifying the
+ register is seen, or after a branch or call.
+
+ Any such memory load insn may be substituted by a load directly
+ off the GP. This allows the memory load insn to be issued before
+ the calculated GP register would otherwise be ready.
+
+ Any such jsr insn can be replaced by a bsr if it is in range.
+
+ This would mean that we'd have to _add_ relocations, the pain of
+ which gives one pause. */
+
+ return TRUE;
+}
+
+static bfd_vma
+elf64_alpha_relax_opt_call (struct alpha_relax_info *info, bfd_vma symval)
+{
+ /* If the function has the same gp, and we can identify that the
+ function does not use its function pointer, we can eliminate the
+ address load. */
+
+ /* If the symbol is marked NOPV, we are being told the function never
+ needs its procedure value. */
+ if ((info->other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_NOPV)
+ return symval;
+
+ /* If the symbol is marked STD_GP, we are being told the function does
+ a normal ldgp in the first two words. */
+ else if ((info->other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_STD_GPLOAD)
+ ;
+
+ /* Otherwise, we may be able to identify a GP load in the first two
+ words, which we can then skip. */
+ else
+ {
+ Elf_Internal_Rela *tsec_relocs, *tsec_relend, *tsec_free, *gpdisp;
+ bfd_vma ofs;
+
+ /* Load the relocations from the section that the target symbol is in. */
+ if (info->sec == info->tsec)
+ {
+ tsec_relocs = info->relocs;
+ tsec_relend = info->relend;
+ tsec_free = NULL;
+ }
+ else
+ {
+ tsec_relocs = (_bfd_elf_link_read_relocs
+ (info->abfd, info->tsec, (PTR) NULL,
+ (Elf_Internal_Rela *) NULL,
+ info->link_info->keep_memory));
+ if (tsec_relocs == NULL)
+ return 0;
+ tsec_relend = tsec_relocs + info->tsec->reloc_count;
+ tsec_free = (info->link_info->keep_memory ? NULL : tsec_relocs);
+ }
+
+ /* Recover the symbol's offset within the section. */
+ ofs = (symval - info->tsec->output_section->vma
+ - info->tsec->output_offset);
+
+ /* Look for a GPDISP reloc. */
+ gpdisp = (elf64_alpha_find_reloc_at_ofs
+ (tsec_relocs, tsec_relend, ofs, R_ALPHA_GPDISP));
+
+ if (!gpdisp || gpdisp->r_addend != 4)
+ {
+ if (tsec_free)
+ free (tsec_free);
+ return 0;
+ }
+ if (tsec_free)
+ free (tsec_free);
+ }
+
+ /* We've now determined that we can skip an initial gp load. Verify
+ that the call and the target use the same gp. */
+ if (info->link_info->hash->creator != info->tsec->owner->xvec
+ || info->gotobj != alpha_elf_tdata (info->tsec->owner)->gotobj)
+ return 0;
+
+ return symval + 8;
+}
+
+static bfd_boolean
+elf64_alpha_relax_with_lituse (struct alpha_relax_info *info,
+ bfd_vma symval, Elf_Internal_Rela *irel)
+{
+ Elf_Internal_Rela *urel, *irelend = info->relend;
+ int flags, count, i;
+ bfd_signed_vma disp;
+ bfd_boolean fits16;
+ bfd_boolean fits32;
+ bfd_boolean lit_reused = FALSE;
+ bfd_boolean all_optimized = TRUE;
+ unsigned int lit_insn;
+
+ lit_insn = bfd_get_32 (info->abfd, info->contents + irel->r_offset);
+ if (lit_insn >> 26 != OP_LDQ)
+ {
+ ((*_bfd_error_handler)
+ ("%B: %A+0x%lx: warning: LITERAL relocation against unexpected insn",
+ info->abfd, info->sec,
+ (unsigned long) irel->r_offset));
+ return TRUE;
+ }
+
+ /* Can't relax dynamic symbols. */
+ if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
+ return TRUE;
+
+ /* Summarize how this particular LITERAL is used. */
+ for (urel = irel+1, flags = count = 0; urel < irelend; ++urel, ++count)
+ {
+ if (ELF64_R_TYPE (urel->r_info) != R_ALPHA_LITUSE)
+ break;
+ if (urel->r_addend <= 6)
+ flags |= 1 << urel->r_addend;
+ }
+
+ /* A little preparation for the loop... */
+ disp = symval - info->gp;
+
+ for (urel = irel+1, i = 0; i < count; ++i, ++urel)
+ {
+ unsigned int insn;
+ int insn_disp;
+ bfd_signed_vma xdisp;
+
+ insn = bfd_get_32 (info->abfd, info->contents + urel->r_offset);
+
+ switch (urel->r_addend)
+ {
+ case LITUSE_ALPHA_ADDR:
+ default:
+ /* This type is really just a placeholder to note that all
+ uses cannot be optimized, but to still allow some. */
+ all_optimized = FALSE;
+ break;
+
+ case LITUSE_ALPHA_BASE:
+ /* We can always optimize 16-bit displacements. */
+
+ /* Extract the displacement from the instruction, sign-extending
+ it if necessary, then test whether it is within 16 or 32 bits
+ displacement from GP. */
+ insn_disp = ((insn & 0xffff) ^ 0x8000) - 0x8000;
+
+ xdisp = disp + insn_disp;
+ fits16 = (xdisp >= - (bfd_signed_vma) 0x8000 && xdisp < 0x8000);
+ fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000
+ && xdisp < 0x7fff8000);
+
+ if (fits16)
+ {
+ /* Take the op code and dest from this insn, take the base
+ register from the literal insn. Leave the offset alone. */
+ insn = (insn & 0xffe0ffff) | (lit_insn & 0x001f0000);
+ urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_GPREL16);
+ urel->r_addend = irel->r_addend;
+ info->changed_relocs = TRUE;
+
+ bfd_put_32 (info->abfd, (bfd_vma) insn,
+ info->contents + urel->r_offset);
+ info->changed_contents = TRUE;
+ }
+
+ /* If all mem+byte, we can optimize 32-bit mem displacements. */
+ else if (fits32 && !(flags & ~6))
+ {
+ /* FIXME: sanity check that lit insn Ra is mem insn Rb. */
+
+ irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_GPRELHIGH);
+ lit_insn = (OP_LDAH << 26) | (lit_insn & 0x03ff0000);
+ bfd_put_32 (info->abfd, (bfd_vma) lit_insn,
+ info->contents + irel->r_offset);
+ lit_reused = TRUE;
+ info->changed_contents = TRUE;
+
+ urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_GPRELLOW);
+ urel->r_addend = irel->r_addend;
+ info->changed_relocs = TRUE;
+ }
+ else
+ all_optimized = FALSE;
+ break;
+
+ case LITUSE_ALPHA_BYTOFF:
+ /* We can always optimize byte instructions. */
+
+ /* FIXME: sanity check the insn for byte op. Check that the
+ literal dest reg is indeed Rb in the byte insn. */
+
+ insn &= ~ (unsigned) 0x001ff000;
+ insn |= ((symval & 7) << 13) | 0x1000;
+
+ urel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ urel->r_addend = 0;
+ info->changed_relocs = TRUE;
+
+ bfd_put_32 (info->abfd, (bfd_vma) insn,
+ info->contents + urel->r_offset);
+ info->changed_contents = TRUE;
+ break;
+
+ case LITUSE_ALPHA_JSR:
+ case LITUSE_ALPHA_TLSGD:
+ case LITUSE_ALPHA_TLSLDM:
+ case LITUSE_ALPHA_JSRDIRECT:
+ {
+ bfd_vma optdest, org;
+ bfd_signed_vma odisp;
+
+ /* For undefined weak symbols, we're mostly interested in getting
+ rid of the got entry whenever possible, so optimize this to a
+ use of the zero register. */
+ if (info->h && info->h->root.root.type == bfd_link_hash_undefweak)
+ {
+ insn |= 31 << 16;
+ bfd_put_32 (info->abfd, (bfd_vma) insn,
+ info->contents + urel->r_offset);
+
+ info->changed_contents = TRUE;
+ break;
+ }
+
+ /* If not zero, place to jump without needing pv. */
+ optdest = elf64_alpha_relax_opt_call (info, symval);
+ org = (info->sec->output_section->vma
+ + info->sec->output_offset
+ + urel->r_offset + 4);
+ odisp = (optdest ? optdest : symval) - org;
+
+ if (odisp >= -0x400000 && odisp < 0x400000)
+ {
+ Elf_Internal_Rela *xrel;
+
+ /* Preserve branch prediction call stack when possible. */
+ if ((insn & INSN_JSR_MASK) == INSN_JSR)
+ insn = (OP_BSR << 26) | (insn & 0x03e00000);
+ else
+ insn = (OP_BR << 26) | (insn & 0x03e00000);
+
+ urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_BRADDR);
+ urel->r_addend = irel->r_addend;
+
+ if (optdest)
+ urel->r_addend += optdest - symval;
+ else
+ all_optimized = FALSE;
+
+ bfd_put_32 (info->abfd, (bfd_vma) insn,
+ info->contents + urel->r_offset);
+
+ /* Kill any HINT reloc that might exist for this insn. */
+ xrel = (elf64_alpha_find_reloc_at_ofs
+ (info->relocs, info->relend, urel->r_offset,
+ R_ALPHA_HINT));
+ if (xrel)
+ xrel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+
+ info->changed_contents = TRUE;
+ info->changed_relocs = TRUE;
+ }
+ else
+ all_optimized = FALSE;
+
+ /* Even if the target is not in range for a direct branch,
+ if we share a GP, we can eliminate the gp reload. */
+ if (optdest)
+ {
+ Elf_Internal_Rela *gpdisp
+ = (elf64_alpha_find_reloc_at_ofs
+ (info->relocs, irelend, urel->r_offset + 4,
+ R_ALPHA_GPDISP));
+ if (gpdisp)
+ {
+ bfd_byte *p_ldah = info->contents + gpdisp->r_offset;
+ bfd_byte *p_lda = p_ldah + gpdisp->r_addend;
+ unsigned int ldah = bfd_get_32 (info->abfd, p_ldah);
+ unsigned int lda = bfd_get_32 (info->abfd, p_lda);
+
+ /* Verify that the instruction is "ldah $29,0($26)".
+ Consider a function that ends in a noreturn call,
+ and that the next function begins with an ldgp,
+ and that by accident there is no padding between.
+ In that case the insn would use $27 as the base. */
+ if (ldah == 0x27ba0000 && lda == 0x23bd0000)
+ {
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, p_ldah);
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, p_lda);
+
+ gpdisp->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ info->changed_contents = TRUE;
+ info->changed_relocs = TRUE;
+ }
+ }
+ }
+ }
+ break;
+ }
+ }
+
+ /* If all cases were optimized, we can reduce the use count on this
+ got entry by one, possibly eliminating it. */
+ if (all_optimized)
+ {
+ if (--info->gotent->use_count == 0)
+ {
+ int sz = alpha_got_entry_size (R_ALPHA_LITERAL);
+ alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+ if (!info->h)
+ alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+ }
+
+ /* If the literal instruction is no longer needed (it may have been
+ reused. We can eliminate it. */
+ /* ??? For now, I don't want to deal with compacting the section,
+ so just nop it out. */
+ if (!lit_reused)
+ {
+ irel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ info->changed_relocs = TRUE;
+
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP,
+ info->contents + irel->r_offset);
+ info->changed_contents = TRUE;
+ }
+
+ return TRUE;
+ }
+ else
+ return elf64_alpha_relax_got_load (info, symval, irel, R_ALPHA_LITERAL);
+}
+
+static bfd_boolean
+elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval,
+ Elf_Internal_Rela *irel, bfd_boolean is_gd)
+{
+ bfd_byte *pos[5];
+ unsigned int insn;
+ Elf_Internal_Rela *gpdisp, *hint;
+ bfd_boolean dynamic, use_gottprel, pos1_unusable;
+ unsigned long new_symndx;
+
+ dynamic = alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info);
+
+ /* If a TLS symbol is accessed using IE at least once, there is no point
+ to use dynamic model for it. */
+ if (is_gd && info->h && (info->h->flags & ALPHA_ELF_LINK_HASH_TLS_IE))
+ ;
+
+ /* If the symbol is local, and we've already committed to DF_STATIC_TLS,
+ then we might as well relax to IE. */
+ else if (info->link_info->shared && !dynamic
+ && (info->link_info->flags & DF_STATIC_TLS))
+ ;
+
+ /* Otherwise we must be building an executable to do anything. */
+ else if (info->link_info->shared)
+ return TRUE;
+
+ /* The TLSGD/TLSLDM relocation must be followed by a LITERAL and
+ the matching LITUSE_TLS relocations. */
+ if (irel + 2 >= info->relend)
+ return TRUE;
+ if (ELF64_R_TYPE (irel[1].r_info) != R_ALPHA_LITERAL
+ || ELF64_R_TYPE (irel[2].r_info) != R_ALPHA_LITUSE
+ || irel[2].r_addend != (is_gd ? LITUSE_ALPHA_TLSGD : LITUSE_ALPHA_TLSLDM))
+ return TRUE;
+
+ /* There must be a GPDISP relocation positioned immediately after the
+ LITUSE relocation. */
+ gpdisp = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend,
+ irel[2].r_offset + 4, R_ALPHA_GPDISP);
+ if (!gpdisp)
+ return TRUE;
+
+ pos[0] = info->contents + irel[0].r_offset;
+ pos[1] = info->contents + irel[1].r_offset;
+ pos[2] = info->contents + irel[2].r_offset;
+ pos[3] = info->contents + gpdisp->r_offset;
+ pos[4] = pos[3] + gpdisp->r_addend;
+ pos1_unusable = FALSE;
+
+ /* Generally, the positions are not allowed to be out of order, lest the
+ modified insn sequence have different register lifetimes. We can make
+ an exception when pos 1 is adjacent to pos 0. */
+ if (pos[1] + 4 == pos[0])
+ {
+ bfd_byte *tmp = pos[0];
+ pos[0] = pos[1];
+ pos[1] = tmp;
+ }
+ else if (pos[1] < pos[0])
+ pos1_unusable = TRUE;
+ if (pos[1] >= pos[2] || pos[2] >= pos[3])
+ return TRUE;
+
+ /* Reduce the use count on the LITERAL relocation. Do this before we
+ smash the symndx when we adjust the relocations below. */
+ {
+ struct alpha_elf_got_entry *lit_gotent;
+ struct alpha_elf_link_hash_entry *lit_h;
+ unsigned long indx;
+
+ BFD_ASSERT (ELF64_R_SYM (irel[1].r_info) >= info->symtab_hdr->sh_info);
+ indx = ELF64_R_SYM (irel[1].r_info) - info->symtab_hdr->sh_info;
+ lit_h = alpha_elf_sym_hashes (info->abfd)[indx];
+
+ while (lit_h->root.root.type == bfd_link_hash_indirect
+ || lit_h->root.root.type == bfd_link_hash_warning)
+ lit_h = (struct alpha_elf_link_hash_entry *) lit_h->root.root.u.i.link;
+
+ for (lit_gotent = lit_h->got_entries; lit_gotent ;
+ lit_gotent = lit_gotent->next)
+ if (lit_gotent->gotobj == info->gotobj
+ && lit_gotent->reloc_type == R_ALPHA_LITERAL
+ && lit_gotent->addend == irel[1].r_addend)
+ break;
+ BFD_ASSERT (lit_gotent);
+
+ if (--lit_gotent->use_count == 0)
+ {
+ int sz = alpha_got_entry_size (R_ALPHA_LITERAL);
+ alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+ }
+ }
+
+ /* Change
+
+ lda $16,x($gp) !tlsgd!1
+ ldq $27,__tls_get_addr($gp) !literal!1
+ jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
+ ldah $29,0($26) !gpdisp!2
+ lda $29,0($29) !gpdisp!2
+ to
+ ldq $16,x($gp) !gottprel
+ unop
+ call_pal rduniq
+ addq $16,$0,$0
+ unop
+ or the first pair to
+ lda $16,x($gp) !tprel
+ unop
+ or
+ ldah $16,x($gp) !tprelhi
+ lda $16,x($16) !tprello
+
+ as appropriate. */
+
+ use_gottprel = FALSE;
+ new_symndx = is_gd ? ELF64_R_SYM (irel->r_info) : 0;
+ switch (!dynamic && !info->link_info->shared)
+ {
+ case 1:
+ {
+ bfd_vma tp_base;
+ bfd_signed_vma disp;
+
+ BFD_ASSERT (elf_hash_table (info->link_info)->tls_sec != NULL);
+ tp_base = alpha_get_tprel_base (info->link_info);
+ disp = symval - tp_base;
+
+ if (disp >= -0x8000 && disp < 0x8000)
+ {
+ insn = (OP_LDA << 26) | (16 << 21) | (31 << 16);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
+
+ irel[0].r_offset = pos[0] - info->contents;
+ irel[0].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_TPREL16);
+ irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ break;
+ }
+ else if (disp >= -(bfd_signed_vma) 0x80000000
+ && disp < (bfd_signed_vma) 0x7fff8000
+ && !pos1_unusable)
+ {
+ insn = (OP_LDAH << 26) | (16 << 21) | (31 << 16);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
+ insn = (OP_LDA << 26) | (16 << 21) | (16 << 16);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[1]);
+
+ irel[0].r_offset = pos[0] - info->contents;
+ irel[0].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_TPRELHI);
+ irel[1].r_offset = pos[1] - info->contents;
+ irel[1].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_TPRELLO);
+ break;
+ }
+ }
+ /* FALLTHRU */
+
+ default:
+ use_gottprel = TRUE;
+
+ insn = (OP_LDQ << 26) | (16 << 21) | (29 << 16);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
+
+ irel[0].r_offset = pos[0] - info->contents;
+ irel[0].r_info = ELF64_R_INFO (new_symndx, R_ALPHA_GOTTPREL);
+ irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ break;
+ }
+
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_RDUNIQ, pos[2]);
+
+ insn = INSN_ADDQ | (16 << 21) | (0 << 16) | (0 << 0);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[3]);
+
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[4]);
+
+ irel[2].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ gpdisp->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+
+ hint = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend,
+ irel[2].r_offset, R_ALPHA_HINT);
+ if (hint)
+ hint->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+
+ info->changed_contents = TRUE;
+ info->changed_relocs = TRUE;
+
+ /* Reduce the use count on the TLSGD/TLSLDM relocation. */
+ if (--info->gotent->use_count == 0)
+ {
+ int sz = alpha_got_entry_size (info->gotent->reloc_type);
+ alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+ if (!info->h)
+ alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+ }
+
+ /* If we've switched to a GOTTPREL relocation, increment the reference
+ count on that got entry. */
+ if (use_gottprel)
+ {
+ struct alpha_elf_got_entry *tprel_gotent;
+
+ for (tprel_gotent = *info->first_gotent; tprel_gotent ;
+ tprel_gotent = tprel_gotent->next)
+ if (tprel_gotent->gotobj == info->gotobj
+ && tprel_gotent->reloc_type == R_ALPHA_GOTTPREL
+ && tprel_gotent->addend == irel->r_addend)
+ break;
+ if (tprel_gotent)
+ tprel_gotent->use_count++;
+ else
+ {
+ if (info->gotent->use_count == 0)
+ tprel_gotent = info->gotent;
+ else
+ {
+ tprel_gotent = (struct alpha_elf_got_entry *)
+ bfd_alloc (info->abfd, sizeof (struct alpha_elf_got_entry));
+ if (!tprel_gotent)
+ return FALSE;
+
+ tprel_gotent->next = *info->first_gotent;
+ *info->first_gotent = tprel_gotent;
+
+ tprel_gotent->gotobj = info->gotobj;
+ tprel_gotent->addend = irel->r_addend;
+ tprel_gotent->got_offset = -1;
+ tprel_gotent->reloc_done = 0;
+ tprel_gotent->reloc_xlated = 0;
+ }
+
+ tprel_gotent->use_count = 1;
+ tprel_gotent->reloc_type = R_ALPHA_GOTTPREL;
+ }
+ }
+
+ return TRUE;
+}
+
+static bfd_boolean
+elf64_alpha_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;
+ Elf_Internal_Sym *isymbuf = NULL;
+ struct alpha_elf_got_entry **local_got_entries;
+ struct alpha_relax_info info;
+
+ /* We are not currently changing any sizes, so only one pass. */
+ *again = FALSE;
+
+ if (link_info->relocatable
+ || ((sec->flags & (SEC_CODE | SEC_RELOC | SEC_ALLOC))
+ != (SEC_CODE | SEC_RELOC | SEC_ALLOC))
+ || sec->reloc_count == 0)
+ return TRUE;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
+
+ /* Load the relocations for this section. */
+ internal_relocs = (_bfd_elf_link_read_relocs
+ (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+ link_info->keep_memory));
+ if (internal_relocs == NULL)
+ return FALSE;
+
+ memset(&info, 0, sizeof (info));
+ info.abfd = abfd;
+ info.sec = sec;
+ info.link_info = link_info;
+ info.symtab_hdr = symtab_hdr;
+ info.relocs = internal_relocs;
+ info.relend = irelend = internal_relocs + sec->reloc_count;
+
+ /* Find the GP for this object. Do not store the result back via
+ _bfd_set_gp_value, since this could change again before final. */
+ info.gotobj = alpha_elf_tdata (abfd)->gotobj;
+ if (info.gotobj)
+ {
+ asection *sgot = alpha_elf_tdata (info.gotobj)->got;
+ info.gp = (sgot->output_section->vma
+ + sgot->output_offset
+ + 0x8000);
+ }
+
+ /* Get the section contents. */
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ info.contents = elf_section_data (sec)->this_hdr.contents;
+ else
+ {
+ if (!bfd_malloc_and_get_section (abfd, sec, &info.contents))
+ goto error_return;
+ }
+
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ bfd_vma symval;
+ struct alpha_elf_got_entry *gotent;
+ unsigned long r_type = ELF64_R_TYPE (irel->r_info);
+ unsigned long r_symndx = ELF64_R_SYM (irel->r_info);
+
+ /* Early exit for unhandled or unrelaxable relocations. */
+ switch (r_type)
+ {
+ case R_ALPHA_LITERAL:
+ case R_ALPHA_GPRELHIGH:
+ case R_ALPHA_GPRELLOW:
+ case R_ALPHA_GOTDTPREL:
+ case R_ALPHA_GOTTPREL:
+ case R_ALPHA_TLSGD:
+ break;
+
+ case R_ALPHA_TLSLDM:
+ /* The symbol for a TLSLDM reloc is ignored. Collapse the
+ reloc to the 0 symbol so that they all match. */
+ r_symndx = 0;
+ break;
+
+ default:
+ continue;
+ }
+
+ /* Get the value of the symbol referred to by the reloc. */
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ /* A local symbol. */
+ Elf_Internal_Sym *isym;
+
+ /* Read this BFD's local symbols. */
+ if (isymbuf == NULL)
+ {
+ 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;
+ }
+
+ isym = isymbuf + r_symndx;
+
+ /* Given the symbol for a TLSLDM reloc is ignored, this also
+ means forcing the symbol value to the tp base. */
+ if (r_type == R_ALPHA_TLSLDM)
+ {
+ info.tsec = bfd_abs_section_ptr;
+ symval = alpha_get_tprel_base (info.link_info);
+ }
+ else
+ {
+ symval = isym->st_value;
+ if (isym->st_shndx == SHN_UNDEF)
+ continue;
+ else if (isym->st_shndx == SHN_ABS)
+ info.tsec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ info.tsec = bfd_com_section_ptr;
+ else
+ info.tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ }
+
+ info.h = NULL;
+ info.other = isym->st_other;
+ if (local_got_entries)
+ info.first_gotent = &local_got_entries[r_symndx];
+ else
+ {
+ info.first_gotent = &info.gotent;
+ info.gotent = NULL;
+ }
+ }
+ else
+ {
+ unsigned long indx;
+ struct alpha_elf_link_hash_entry *h;
+
+ indx = r_symndx - symtab_hdr->sh_info;
+ h = alpha_elf_sym_hashes (abfd)[indx];
+ BFD_ASSERT (h != NULL);
+
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
+
+ /* If the symbol is undefined, we can't do anything with it. */
+ if (h->root.root.type == bfd_link_hash_undefined)
+ continue;
+
+ /* If the symbol isn't defined in the current module,
+ again we can't do anything. */
+ if (h->root.root.type == bfd_link_hash_undefweak)
+ {
+ info.tsec = bfd_abs_section_ptr;
+ symval = 0;
+ }
+ else if (!h->root.def_regular)
+ {
+ /* Except for TLSGD relocs, which can sometimes be
+ relaxed to GOTTPREL relocs. */
+ if (r_type != R_ALPHA_TLSGD)
+ continue;
+ info.tsec = bfd_abs_section_ptr;
+ symval = 0;
+ }
+ else
+ {
+ info.tsec = h->root.root.u.def.section;
+ symval = h->root.root.u.def.value;
+ }
+
+ info.h = h;
+ info.other = h->root.other;
+ info.first_gotent = &h->got_entries;
+ }
+
+ /* Search for the got entry to be used by this relocation. */
+ for (gotent = *info.first_gotent; gotent ; gotent = gotent->next)
+ if (gotent->gotobj == info.gotobj
+ && gotent->reloc_type == r_type
+ && gotent->addend == irel->r_addend)
+ break;
+ info.gotent = gotent;
+
+ symval += info.tsec->output_section->vma + info.tsec->output_offset;
+ symval += irel->r_addend;
+
+ switch (r_type)
+ {
+ case R_ALPHA_LITERAL:
+ BFD_ASSERT(info.gotent != NULL);
+
+ /* If there exist LITUSE relocations immediately following, this
+ opens up all sorts of interesting optimizations, because we
+ now know every location that this address load is used. */
+ if (irel+1 < irelend
+ && ELF64_R_TYPE (irel[1].r_info) == R_ALPHA_LITUSE)
+ {
+ if (!elf64_alpha_relax_with_lituse (&info, symval, irel))
+ goto error_return;
+ }
+ else
+ {
+ if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type))
+ goto error_return;
+ }
+ break;
+
+ case R_ALPHA_GOTDTPREL:
+ case R_ALPHA_GOTTPREL:
+ BFD_ASSERT(info.gotent != NULL);
+ if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type))
+ goto error_return;
+ break;
+
+ case R_ALPHA_TLSGD:
+ case R_ALPHA_TLSLDM:
+ BFD_ASSERT(info.gotent != NULL);
+ if (!elf64_alpha_relax_tls_get_addr (&info, symval, irel,
+ r_type == R_ALPHA_TLSGD))
+ goto error_return;
+ break;
+ }
+ }
+
+ 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)
+ {
+ if (!link_info->keep_memory)
+ free (isymbuf);
+ else
+ {
+ /* Cache the symbols for elf_link_input_bfd. */
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+ }
+ }
+
+ if (info.contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != info.contents)
+ {
+ if (!info.changed_contents && !link_info->keep_memory)
+ free (info.contents);
+ else
+ {
+ /* Cache the section contents for elf_link_input_bfd. */
+ elf_section_data (sec)->this_hdr.contents = info.contents;
+ }
+ }
+
+ if (elf_section_data (sec)->relocs != internal_relocs)
+ {
+ if (!info.changed_relocs)
+ free (internal_relocs);
+ else
+ elf_section_data (sec)->relocs = internal_relocs;
+ }
+
+ *again = info.changed_contents || info.changed_relocs;
+
+ return TRUE;
+
+ error_return:
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ free (isymbuf);
+ if (info.contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != info.contents)
+ free (info.contents);
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+ return FALSE;
+}
+
/* Emit a dynamic relocation for (DYNINDX, RTYPE, ADDEND) at (SEC, OFFSET)
into the next available slot in SREL. */
static void
-elf64_alpha_emit_dynrel (abfd, info, sec, srel, offset, dynindx, rtype, addend)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec, *srel;
- bfd_vma offset, addend;
- long dynindx, rtype;
+elf64_alpha_emit_dynrel (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, asection *srel, bfd_vma offset,
+ long dynindx, long rtype, bfd_vma addend)
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
@@ -4155,8 +3875,7 @@ elf64_alpha_emit_dynrel (abfd, info, sec, srel, offset, dynindx, rtype, addend)
loc = srel->contents;
loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
- <= srel->_cooked_size);
+ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count <= srel->size);
}
/* Relocate an Alpha ELF section for a relocatable link.
@@ -4166,16 +3885,13 @@ elf64_alpha_emit_dynrel (abfd, info, sec, srel, offset, dynindx, rtype, addend)
symbol winds up in the output section. */
static bfd_boolean
-elf64_alpha_relocate_section_r (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ bfd *input_bfd, asection *input_section,
+ bfd_byte *contents ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
{
unsigned long symtab_hdr_sh_info;
Elf_Internal_Rela *rel;
@@ -4196,8 +3912,8 @@ elf64_alpha_relocate_section_r (output_bfd, info, input_bfd, input_section,
if (r_type >= R_ALPHA_max)
{
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d"),
- bfd_archive_filename (input_bfd), (int)r_type);
+ (_("%B: unknown relocation type %d"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
@@ -4227,16 +3943,11 @@ elf64_alpha_relocate_section_r (output_bfd, info, input_bfd, input_section,
/* Relocate an Alpha ELF section. */
static bfd_boolean
-elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+elf64_alpha_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;
Elf_Internal_Rela *rel;
@@ -4246,7 +3957,6 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma gp, tp_base, dtp_base;
struct alpha_elf_got_entry **local_got_entries;
bfd_boolean ret_val;
- const char *section_name;
/* Handle relocatable links with a smaller loop. */
if (info->relocatable)
@@ -4266,11 +3976,17 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
else
srelgot = NULL;
- section_name = (bfd_elf_string_from_elf_section
- (input_bfd, elf_elfheader(input_bfd)->e_shstrndx,
- elf_section_data(input_section)->rel_hdr.sh_name));
- BFD_ASSERT(section_name != NULL);
- srel = bfd_get_section_by_name (dynobj, section_name);
+ if (input_section->flags & SEC_ALLOC)
+ {
+ const char *section_name;
+ section_name = (bfd_elf_string_from_elf_section
+ (input_bfd, elf_elfheader(input_bfd)->e_shstrndx,
+ elf_section_data(input_section)->rel_hdr.sh_name));
+ BFD_ASSERT(section_name != NULL);
+ srel = bfd_get_section_by_name (dynobj, section_name);
+ }
+ else
+ srel = NULL;
/* Find the gp value for this input bfd. */
gotobj = alpha_elf_tdata (input_bfd)->gotobj;
@@ -4322,8 +4038,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_type >= R_ALPHA_max)
{
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d"),
- bfd_archive_filename (input_bfd), (int)r_type);
+ (_("%B: unknown relocation type %d"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
@@ -4347,7 +4063,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
/* If this is a tp-relative relocation against sym 0,
this is hackery from relax_section. Force the value to
- be the tls base. */
+ be the tls module base. */
if (r_symndx == 0
&& (r_type == R_ALPHA_TLSLDM
|| r_type == R_ALPHA_GOTTPREL
@@ -4355,7 +4071,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_ALPHA_TPRELHI
|| r_type == R_ALPHA_TPRELLO
|| r_type == R_ALPHA_TPREL16))
- value = tp_base;
+ value = dtp_base;
if (local_got_entries)
gotent = local_got_entries[r_symndx];
@@ -4382,8 +4098,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
_bfd_merged_section_offset (output_bfd, &msec,
elf_section_data (sec)->
sec_info,
- sym->st_value + ent->addend,
- (bfd_vma) 0);
+ sym->st_value + ent->addend);
ent->addend -= sym->st_value;
ent->addend += msec->output_section->vma
+ msec->output_offset
@@ -4465,7 +4180,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
/* If the symbol has been forced local, output a
RELATIVE reloc, otherwise it will be handled in
finish_dynamic_symbol. */
- if (info->shared && !dynamic_symbol_p)
+ if (info->shared && !dynamic_symbol_p && !undef_weak_ref)
elf64_alpha_emit_dynrel (output_bfd, info, sgot, srelgot,
gotent->got_offset, 0,
R_ALPHA_RELATIVE, value);
@@ -4495,8 +4210,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: gp-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: gp-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT(gp != 0);
@@ -4507,8 +4222,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: gp-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: gp-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT(gp != 0);
@@ -4533,8 +4248,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: pc-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: pc-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
/* The regular PC-relative stuff measures from the start of
@@ -4561,8 +4276,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
&& gotobj != alpha_elf_tdata (sec->owner)->gotobj)
{
(*_bfd_error_handler)
- (_("%s: change in gp: BRSGP %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: change in gp: BRSGP %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
@@ -4591,8 +4306,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
(*_bfd_error_handler)
- (_("%s: !samegp reloc against symbol without .prologue: %s"),
- bfd_archive_filename (input_bfd), name);
+ (_("%B: !samegp reloc against symbol without .prologue: %s"),
+ input_bfd, name);
ret_val = FALSE;
break;
}
@@ -4637,13 +4352,14 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (info->shared
&& r_symndx != 0
- && (input_section->flags & SEC_ALLOC))
+ && (input_section->flags & SEC_ALLOC)
+ && !undef_weak_ref)
{
if (r_type == R_ALPHA_REFLONG)
{
(*_bfd_error_handler)
- (_("%s: unhandled dynamic relocation against %s"),
- bfd_archive_filename (input_bfd),
+ (_("%B: unhandled dynamic relocation against %s"),
+ input_bfd,
h->root.root.root.string);
ret_val = FALSE;
}
@@ -4654,9 +4370,10 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
else
goto default_reloc;
- elf64_alpha_emit_dynrel (output_bfd, info, input_section,
- srel, rel->r_offset, dynindx,
- dyntype, dynaddend);
+ if (input_section->flags & SEC_ALLOC)
+ elf64_alpha_emit_dynrel (output_bfd, info, input_section,
+ srel, rel->r_offset, dynindx,
+ dyntype, dynaddend);
}
goto default_reloc;
@@ -4666,11 +4383,19 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: pc-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: pc-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
+ ret_val = FALSE;
+ }
+ else if ((info->shared || info->pie) && undef_weak_ref)
+ {
+ (*_bfd_error_handler)
+ (_("%B: pc-relative relocation against undefined weak symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
+
/* ??? .eh_frame references to discarded sections will be smashed
to relocations against SHN_UNDEF. The .eh_frame format allows
NULL to be encoded as 0 in any format, so this works here. */
@@ -4725,8 +4450,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: dtp-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: dtp-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
@@ -4741,15 +4466,15 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->shared)
{
(*_bfd_error_handler)
- (_("%s: TLS local exec code cannot be linked into shared objects"),
- bfd_archive_filename (input_bfd));
+ (_("%B: TLS local exec code cannot be linked into shared objects"),
+ input_bfd);
ret_val = FALSE;
}
else if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: tp-relative relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.root.string);
+ (_("%B: tp-relative relocation against dynamic symbol %s"),
+ input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
@@ -4823,7 +4548,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
break;
if (h != NULL)
- name = h->root.root.root.string;
+ name = NULL;
else
{
name = (bfd_elf_string_from_elf_section
@@ -4834,8 +4559,9 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root.root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
ret_val = FALSE;
}
break;
@@ -4853,15 +4579,14 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
dynamic sections here. */
static bfd_boolean
-elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf64_alpha_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
+ struct alpha_elf_link_hash_entry *ah = (struct alpha_elf_link_hash_entry *)h;
bfd *dynobj = elf_hash_table(info)->dynobj;
- if (h->plt.offset != MINUS_ONE)
+ if (h->needs_plt)
{
/* Fill in the .plt entry for this symbol. */
asection *splt, *sgot, *srel;
@@ -4873,83 +4598,71 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
BFD_ASSERT (h->dynindx != -1);
- /* The first .got entry will be updated by the .plt with the
- address of the target function. */
- gotent = ((struct alpha_elf_link_hash_entry *) h)->got_entries;
- BFD_ASSERT (gotent && gotent->addend == 0);
-
splt = bfd_get_section_by_name (dynobj, ".plt");
BFD_ASSERT (splt != NULL);
srel = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (srel != NULL);
- sgot = alpha_elf_tdata (gotent->gotobj)->got;
- BFD_ASSERT (sgot != NULL);
- got_addr = (sgot->output_section->vma
- + sgot->output_offset
- + gotent->got_offset);
- plt_addr = (splt->output_section->vma
- + splt->output_offset
- + h->plt.offset);
-
- plt_index = (h->plt.offset - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
-
- /* Fill in the entry in the procedure linkage table. */
- {
- bfd_vma insn1, insn2, insn3;
-
- insn1 = PLT_ENTRY_WORD1 | ((-(h->plt.offset + 4) >> 2) & 0x1fffff);
- insn2 = PLT_ENTRY_WORD2;
- insn3 = PLT_ENTRY_WORD3;
-
- bfd_put_32 (output_bfd, insn1, splt->contents + h->plt.offset);
- bfd_put_32 (output_bfd, insn2, splt->contents + h->plt.offset + 4);
- bfd_put_32 (output_bfd, insn3, splt->contents + h->plt.offset + 8);
- }
+ for (gotent = ah->got_entries; gotent ; gotent = gotent->next)
+ if (gotent->reloc_type == R_ALPHA_LITERAL
+ && gotent->use_count > 0)
+ {
+ unsigned int insn;
+ int disp;
- /* Fill in the entry in the .rela.plt section. */
- outrel.r_offset = got_addr;
- outrel.r_info = ELF64_R_INFO(h->dynindx, R_ALPHA_JMP_SLOT);
- outrel.r_addend = 0;
+ sgot = alpha_elf_tdata (gotent->gotobj)->got;
+ BFD_ASSERT (sgot != NULL);
- loc = srel->contents + plt_index * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ BFD_ASSERT (gotent->got_offset != -1);
+ BFD_ASSERT (gotent->plt_offset != -1);
- if (!(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
- {
- /* Mark the symbol as undefined, rather than as defined in the
- .plt section. Leave the value alone. */
- sym->st_shndx = SHN_UNDEF;
- }
+ got_addr = (sgot->output_section->vma
+ + sgot->output_offset
+ + gotent->got_offset);
+ plt_addr = (splt->output_section->vma
+ + splt->output_offset
+ + gotent->plt_offset);
- /* Fill in the entries in the .got. */
- bfd_put_64 (output_bfd, plt_addr, sgot->contents + gotent->got_offset);
+ plt_index = (gotent->plt_offset-PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
- /* Subsequent .got entries will continue to bounce through the .plt. */
- if (gotent->next)
- {
- srel = bfd_get_section_by_name (dynobj, ".rela.got");
- BFD_ASSERT (! info->shared || srel != NULL);
+ /* Fill in the entry in the procedure linkage table. */
+ if (elf64_alpha_use_secureplt)
+ {
+ disp = (PLT_HEADER_SIZE - 4) - (gotent->plt_offset + 4);
+ insn = INSN_AD (INSN_BR, 31, disp);
+ bfd_put_32 (output_bfd, insn,
+ splt->contents + gotent->plt_offset);
- gotent = gotent->next;
- do
- {
- sgot = alpha_elf_tdata(gotent->gotobj)->got;
- BFD_ASSERT(sgot != NULL);
- BFD_ASSERT(gotent->addend == 0);
+ plt_index = ((gotent->plt_offset - NEW_PLT_HEADER_SIZE)
+ / NEW_PLT_ENTRY_SIZE);
+ }
+ else
+ {
+ disp = -(gotent->plt_offset + 4);
+ insn = INSN_AD (INSN_BR, 28, disp);
+ bfd_put_32 (output_bfd, insn,
+ splt->contents + gotent->plt_offset);
+ bfd_put_32 (output_bfd, INSN_UNOP,
+ splt->contents + gotent->plt_offset + 4);
+ bfd_put_32 (output_bfd, INSN_UNOP,
+ splt->contents + gotent->plt_offset + 8);
+
+ plt_index = ((gotent->plt_offset - OLD_PLT_HEADER_SIZE)
+ / OLD_PLT_ENTRY_SIZE);
+ }
- bfd_put_64 (output_bfd, plt_addr,
- sgot->contents + gotent->got_offset);
+ /* Fill in the entry in the .rela.plt section. */
+ outrel.r_offset = got_addr;
+ outrel.r_info = ELF64_R_INFO(h->dynindx, R_ALPHA_JMP_SLOT);
+ outrel.r_addend = 0;
- if (info->shared)
- elf64_alpha_emit_dynrel (output_bfd, info, sgot, srel,
- gotent->got_offset, 0,
- R_ALPHA_RELATIVE, plt_addr);
+ loc = srel->contents + plt_index * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
- gotent = gotent->next;
- }
- while (gotent != NULL);
- }
+ /* Fill in the entry in the .got. */
+ bfd_put_64 (output_bfd, plt_addr,
+ sgot->contents + gotent->got_offset);
+ }
}
else if (alpha_elf_dynamic_symbol_p (h, info))
{
@@ -5005,8 +4718,8 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Mark some specially defined symbols as absolute. */
if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
+ || h == elf_hash_table (info)->hgot
+ || h == elf_hash_table (info)->hplt)
sym->st_shndx = SHN_ABS;
return TRUE;
@@ -5015,9 +4728,8 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Finish up the dynamic sections. */
static bfd_boolean
-elf64_alpha_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+elf64_alpha_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
bfd *dynobj;
asection *sdyn;
@@ -5027,33 +4739,45 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
- asection *splt;
+ asection *splt, *sgotplt, *srelaplt;
Elf64_External_Dyn *dyncon, *dynconend;
+ bfd_vma plt_vma, gotplt_vma;
splt = bfd_get_section_by_name (dynobj, ".plt");
+ srelaplt = bfd_get_section_by_name (output_bfd, ".rela.plt");
BFD_ASSERT (splt != NULL && sdyn != NULL);
+ plt_vma = splt->output_section->vma + splt->output_offset;
+
+ gotplt_vma = 0;
+ if (elf64_alpha_use_secureplt)
+ {
+ sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
+ BFD_ASSERT (sgotplt != NULL);
+ if (sgotplt->size > 0)
+ gotplt_vma = sgotplt->output_section->vma + sgotplt->output_offset;
+ }
+
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
- const char *name;
- asection *s;
bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn);
switch (dyn.d_tag)
{
case DT_PLTGOT:
- name = ".plt";
- goto get_vma;
+ dyn.d_un.d_ptr
+ = elf64_alpha_use_secureplt ? gotplt_vma : plt_vma;
+ break;
case DT_PLTRELSZ:
- name = ".rela.plt";
- goto get_size;
+ dyn.d_un.d_val = srelaplt ? srelaplt->size : 0;
+ break;
case DT_JMPREL:
- name = ".rela.plt";
- goto get_vma;
+ dyn.d_un.d_ptr = srelaplt ? srelaplt->vma : 0;
+ break;
case DT_RELASZ:
/* My interpretation of the TIS v1.1 ELF document indicates
@@ -5061,40 +4785,69 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
the rest of the BFD does. It is, however, what the
glibc ld.so wants. Do this fixup here until we found
out who is right. */
- s = bfd_get_section_by_name (output_bfd, ".rela.plt");
- if (s)
- {
- dyn.d_un.d_val -=
- (s->_cooked_size ? s->_cooked_size : s->_raw_size);
- }
- break;
-
- get_vma:
- s = bfd_get_section_by_name (output_bfd, name);
- dyn.d_un.d_ptr = (s ? s->vma : 0);
- break;
-
- get_size:
- s = bfd_get_section_by_name (output_bfd, name);
- dyn.d_un.d_val =
- (s->_cooked_size ? s->_cooked_size : s->_raw_size);
+ if (srelaplt)
+ dyn.d_un.d_val -= srelaplt->size;
break;
}
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
}
- /* Initialize the PLT0 entry. */
- if (splt->_raw_size > 0)
+ /* Initialize the plt header. */
+ if (splt->size > 0)
{
- bfd_put_32 (output_bfd, PLT_HEADER_WORD1, splt->contents);
- bfd_put_32 (output_bfd, PLT_HEADER_WORD2, splt->contents + 4);
- bfd_put_32 (output_bfd, PLT_HEADER_WORD3, splt->contents + 8);
- bfd_put_32 (output_bfd, PLT_HEADER_WORD4, splt->contents + 12);
+ unsigned int insn;
+ int ofs;
+
+ if (elf64_alpha_use_secureplt)
+ {
+ ofs = gotplt_vma - (plt_vma + PLT_HEADER_SIZE);
+
+ insn = INSN_ABC (INSN_SUBQ, 27, 28, 25);
+ bfd_put_32 (output_bfd, insn, splt->contents);
- /* The next two words will be filled in by ld.so */
- bfd_put_64 (output_bfd, (bfd_vma) 0, splt->contents + 16);
- bfd_put_64 (output_bfd, (bfd_vma) 0, splt->contents + 24);
+ insn = INSN_ABO (INSN_LDAH, 28, 28, (ofs + 0x8000) >> 16);
+ bfd_put_32 (output_bfd, insn, splt->contents + 4);
+
+ insn = INSN_ABC (INSN_S4SUBQ, 25, 25, 25);
+ bfd_put_32 (output_bfd, insn, splt->contents + 8);
+
+ insn = INSN_ABO (INSN_LDA, 28, 28, ofs);
+ bfd_put_32 (output_bfd, insn, splt->contents + 12);
+
+ insn = INSN_ABO (INSN_LDQ, 27, 28, 0);
+ bfd_put_32 (output_bfd, insn, splt->contents + 16);
+
+ insn = INSN_ABC (INSN_ADDQ, 25, 25, 25);
+ bfd_put_32 (output_bfd, insn, splt->contents + 20);
+
+ insn = INSN_ABO (INSN_LDQ, 28, 28, 8);
+ bfd_put_32 (output_bfd, insn, splt->contents + 24);
+
+ insn = INSN_AB (INSN_JMP, 31, 27);
+ bfd_put_32 (output_bfd, insn, splt->contents + 28);
+
+ insn = INSN_AD (INSN_BR, 28, -PLT_HEADER_SIZE);
+ bfd_put_32 (output_bfd, insn, splt->contents + 32);
+ }
+ else
+ {
+ insn = INSN_AD (INSN_BR, 27, 0); /* br $27, .+4 */
+ bfd_put_32 (output_bfd, insn, splt->contents);
+
+ insn = INSN_ABO (INSN_LDQ, 27, 27, 12);
+ bfd_put_32 (output_bfd, insn, splt->contents + 4);
+
+ insn = INSN_UNOP;
+ bfd_put_32 (output_bfd, insn, splt->contents + 8);
+
+ insn = INSN_AB (INSN_JMP, 27, 27);
+ bfd_put_32 (output_bfd, insn, splt->contents + 12);
+
+ /* The next two words will be filled in by ld.so. */
+ bfd_put_64 (output_bfd, 0, splt->contents + 16);
+ bfd_put_64 (output_bfd, 0, splt->contents + 24);
+ }
elf_section_data (splt->output_section)->this_hdr.sh_entsize = 0;
}
@@ -5108,9 +4861,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
them all out sequentially. */
static bfd_boolean
-elf64_alpha_final_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info)
{
asection *o;
struct bfd_link_order *p;
@@ -5196,7 +4947,7 @@ elf64_alpha_final_link (abfd, info)
if (s != NULL)
{
esym.asym.value = s->vma;
- last = s->vma + s->_raw_size;
+ last = s->vma + s->size;
}
else
esym.asym.value = last;
@@ -5207,7 +4958,7 @@ elf64_alpha_final_link (abfd, info)
}
}
- for (p = o->link_order_head;
+ for (p = o->map_head.link_order;
p != (struct bfd_link_order *) NULL;
p = p->next)
{
@@ -5241,7 +4992,7 @@ elf64_alpha_final_link (abfd, info)
input_swap = (get_elf_backend_data (input_bfd)
->elf_backend_ecoff_debug_swap);
- BFD_ASSERT (p->size == input_section->_raw_size);
+ BFD_ASSERT (p->size == input_section->size);
/* The ECOFF linking code expects that we have already
read in the debugging information and set up an
@@ -5324,11 +5075,11 @@ elf64_alpha_final_link (abfd, info)
return FALSE;
/* Set the size of the .mdebug section. */
- o->_raw_size = bfd_ecoff_debug_size (abfd, &debug, swap);
+ o->size = bfd_ecoff_debug_size (abfd, &debug, swap);
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
- o->link_order_head = (struct bfd_link_order *) NULL;
+ o->map_head.link_order = (struct bfd_link_order *) NULL;
mdebug_sec = o;
}
@@ -5357,7 +5108,7 @@ elf64_alpha_final_link (abfd, info)
if (! bfd_set_section_contents (abfd, sgot->output_section,
sgot->contents,
(file_ptr) sgot->output_offset,
- sgot->_raw_size))
+ sgot->size))
return FALSE;
}
}
@@ -5377,8 +5128,7 @@ elf64_alpha_final_link (abfd, info)
}
static enum elf_reloc_type_class
-elf64_alpha_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
+elf64_alpha_reloc_type_class (const Elf_Internal_Rela *rela)
{
switch ((int) ELF64_R_TYPE (rela->r_info))
{
@@ -5393,10 +5143,10 @@ elf64_alpha_reloc_type_class (rela)
}
}
-static struct bfd_elf_special_section const elf64_alpha_special_sections[]=
+static const struct bfd_elf_special_section elf64_alpha_special_sections[] =
{
- { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
{ ".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 }
};
@@ -5560,13 +5310,9 @@ static const struct elf_size_info alpha_elf_size_info =
"FreeBSD" label in the ELF header. So we put this label on all
executables and (for simplicity) also all other object files. */
-static void elf64_alpha_fbsd_post_process_headers
- PARAMS ((bfd *, struct bfd_link_info *));
-
static void
-elf64_alpha_fbsd_post_process_headers (abfd, link_info)
- bfd * abfd;
- struct bfd_link_info * link_info ATTRIBUTE_UNUSED;
+elf64_alpha_fbsd_post_process_headers (bfd * abfd,
+ struct bfd_link_info * link_info ATTRIBUTE_UNUSED)
{
Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
diff --git a/contrib/binutils/bfd/elf64-gen.c b/contrib/binutils/bfd/elf64-gen.c
index be1dc3e00ed6..49b8d9c55284 100644
--- a/contrib/binutils/bfd/elf64-gen.c
+++ b/contrib/binutils/bfd/elf64-gen.c
@@ -1,22 +1,22 @@
/* Generic support for 64-bit ELF
- Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2004
+ Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2004, 2005
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -41,53 +41,48 @@ static reloc_howto_type dummy =
0, /* dst_mask */
FALSE); /* pcrel_offset */
-static void elf_generic_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static void elf_generic_info_to_howto_rel
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static bfd_boolean elf64_generic_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-
static void
-elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *bfd_reloc;
- Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
+elf_generic_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *bfd_reloc,
+ Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED)
{
bfd_reloc->howto = &dummy;
}
static void
-elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *bfd_reloc;
- Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
+elf_generic_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *bfd_reloc,
+ Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED)
{
bfd_reloc->howto = &dummy;
}
-static bfd_boolean
-elf64_generic_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+static void
+check_for_relocs (bfd * abfd, asection * o, void * failed)
{
- asection *o;
+ if ((o->flags & SEC_RELOC) != 0)
+ {
+ Elf_Internal_Ehdr *ehdrp;
- /* Check if there are any relocations. */
- for (o = abfd->sections; o != NULL; o = o->next)
- if ((o->flags & SEC_RELOC) != 0)
- {
- Elf_Internal_Ehdr *ehdrp;
+ ehdrp = elf_elfheader (abfd);
+ _bfd_error_handler (_("%B: Relocations in generic ELF (EM: %d)"),
+ abfd, ehdrp->e_machine);
- ehdrp = elf_elfheader (abfd);
- (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
- bfd_archive_filename (abfd),
- ehdrp->e_machine);
+ bfd_set_error (bfd_error_wrong_format);
+ * (bfd_boolean *) failed = TRUE;
+ }
+}
- bfd_set_error (bfd_error_wrong_format);
- return FALSE;
- }
+static bfd_boolean
+elf64_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
+{
+ bfd_boolean failed = FALSE;
+
+ /* Check if there are any relocations. */
+ bfd_map_over_sections (abfd, check_for_relocs, & failed);
+ if (failed)
+ return FALSE;
return bfd_elf_link_add_symbols (abfd, info);
}
diff --git a/contrib/binutils/bfd/elf64-mips.c b/contrib/binutils/bfd/elf64-mips.c
index fa3b494b998b..c8f3127e3c9e 100644
--- a/contrib/binutils/bfd/elf64-mips.c
+++ b/contrib/binutils/bfd/elf64-mips.c
@@ -1,5 +1,5 @@
/* 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, 2004, 2005
Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
Linker support added by Mark Mitchell, CodeSourcery, LLC.
@@ -19,7 +19,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file supports the 64-bit MIPS ELF ABI.
@@ -299,9 +299,11 @@ static reloc_howto_type mips_elf64_howto_table_rel[] =
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 16 bit PC relative reference. */
+ /* 16 bit PC relative reference. Note that the ABI document has a typo
+ and claims R_MIPS_PC16 to be not rightshifted, rendering it useless.
+ We do the right thing here. */
HOWTO (R_MIPS_PC16, /* type */
- 0, /* rightshift */
+ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
TRUE, /* pc_relative */
@@ -622,7 +624,7 @@ static reloc_howto_type mips_elf64_howto_table_rel[] =
/* Protected jump conversion. This is an optimization hint. No
relocation is required for correctness. */
- HOWTO (R_MIPS_JALR, /* type */
+ HOWTO (R_MIPS_JALR, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
@@ -630,11 +632,165 @@ static reloc_howto_type mips_elf64_howto_table_rel[] =
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
_bfd_mips_elf_generic_reloc, /* special_function */
- "R_MIPS_JALR", /* name */
+ "R_MIPS_JALR", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0x00000000, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* TLS relocations. */
+ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32),
+ EMPTY_HOWTO (R_MIPS_TLS_DTPREL32),
+
+ HOWTO (R_MIPS_TLS_DTPMOD64, /* 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_DTPMOD64", /* name */
+ TRUE, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ 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 */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GD", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic variable reference. */
+ HOWTO (R_MIPS_TLS_LDM, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_LDM", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_GOTTPREL, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GOTTPREL", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS IE dynamic relocations. */
+ EMPTY_HOWTO (R_MIPS_TLS_TPREL32),
+
+ HOWTO (R_MIPS_TLS_TPREL64, /* 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_TPREL64", /* name */
+ TRUE, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* The relocation table used for SHT_RELA sections. */
@@ -794,9 +950,11 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 16 bit PC relative reference. */
+ /* 16 bit PC relative reference. Note that the ABI document has a typo
+ and claims R_MIPS_PC16 to be not rightshifted, rendering it useless.
+ We do the right thing here. */
HOWTO (R_MIPS_PC16, /* type */
- 0, /* rightshift */
+ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
TRUE, /* pc_relative */
@@ -1138,7 +1296,7 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
/* Protected jump conversion. This is an optimization hint. No
relocation is required for correctness. */
- HOWTO (R_MIPS_JALR, /* type */
+ HOWTO (R_MIPS_JALR, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
@@ -1146,15 +1304,130 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
_bfd_mips_elf_generic_reloc, /* special_function */
- "R_MIPS_JALR", /* name */
+ "R_MIPS_JALR", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0x00000000, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* TLS relocations. */
+ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32),
+ EMPTY_HOWTO (R_MIPS_TLS_DTPREL32),
+ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64),
+ EMPTY_HOWTO (R_MIPS_TLS_DTPREL64),
+
+ /* TLS general dynamic variable reference. */
+ HOWTO (R_MIPS_TLS_GD, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GD", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic variable reference. */
+ HOWTO (R_MIPS_TLS_LDM, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_LDM", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_GOTTPREL, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GOTTPREL", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (R_MIPS_TLS_TPREL32),
+ EMPTY_HOWTO (R_MIPS_TLS_TPREL64),
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
-/* The reloc used for the mips16 jump instruction. */
-static reloc_howto_type elf_mips16_jump_howto =
+static reloc_howto_type mips16_elf64_howto_table_rel[] =
+{
+ /* The reloc used for the mips16 jump instruction. */
HOWTO (R_MIPS16_26, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1170,10 +1443,9 @@ static reloc_howto_type elf_mips16_jump_howto =
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
0x3ffffff, /* dst_mask */
- FALSE); /* pcrel_offset */
+ FALSE), /* pcrel_offset */
-/* The reloc used for the mips16 gprel instruction. */
-static reloc_howto_type elf_mips16_gprel_howto =
+ /* The reloc used for the mips16 gprel instruction. */
HOWTO (R_MIPS16_GPREL, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1184,9 +1456,118 @@ static reloc_howto_type elf_mips16_gprel_howto =
mips16_gprel_reloc, /* special_function */
"R_MIPS16_GPREL", /* name */
TRUE, /* partial_inplace */
- 0x07ff001f, /* src_mask */
- 0x07ff001f, /* dst_mask */
- FALSE); /* pcrel_offset */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A placeholder for MIPS16 reference to global offset table. */
+ EMPTY_HOWTO (R_MIPS16_GOT16),
+
+ /* A placeholder for MIPS16 16 bit call through global offset table. */
+ EMPTY_HOWTO (R_MIPS16_CALL16),
+
+ /* MIPS16 high 16 bits of symbol value. */
+ HOWTO (R_MIPS16_HI16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_hi16_reloc, /* special_function */
+ "R_MIPS16_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* MIPS16 low 16 bits of symbol value. */
+ HOWTO (R_MIPS16_LO16, /* 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_mips_elf_lo16_reloc, /* special_function */
+ "R_MIPS16_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+};
+
+static reloc_howto_type mips16_elf64_howto_table_rela[] =
+{
+ /* The reloc used for the mips16 jump instruction. */
+ HOWTO (R_MIPS16_26, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ /* This needs complex overflow
+ detection, because the upper four
+ bits must match the PC. */
+ mips16_jump_reloc, /* special_function */
+ "R_MIPS16_26", /* name */
+ FALSE, /* partial_inplace */
+ 0x3ffffff, /* src_mask */
+ 0x3ffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* The reloc used for the mips16 gprel instruction. */
+ HOWTO (R_MIPS16_GPREL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ mips16_gprel_reloc, /* special_function */
+ "R_MIPS16_GPREL", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A placeholder for MIPS16 reference to global offset table. */
+ EMPTY_HOWTO (R_MIPS16_GOT16),
+
+ /* A placeholder for MIPS16 16 bit call through global offset table. */
+ EMPTY_HOWTO (R_MIPS16_CALL16),
+
+ /* MIPS16 high 16 bits of symbol value. */
+ HOWTO (R_MIPS16_HI16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_hi16_reloc, /* special_function */
+ "R_MIPS16_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* MIPS16 low 16 bits of symbol value. */
+ HOWTO (R_MIPS16_LO16, /* 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_mips_elf_lo16_reloc, /* special_function */
+ "R_MIPS16_LO16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+};
/* GNU extension to record C++ vtable hierarchy */
static reloc_howto_type elf_mips_gnu_vtinherit_howto =
@@ -1367,9 +1748,6 @@ mips_elf64_be_swap_reloc_out (bfd *abfd, const Elf_Internal_Rela *src,
mirel.r_offset = src[0].r_offset;
BFD_ASSERT(src[0].r_offset == src[1].r_offset);
-#if 0
- BFD_ASSERT(src[0].r_offset == src[2].r_offset);
-#endif
mirel.r_type = ELF64_MIPS_R_TYPE (src[0].r_info);
mirel.r_sym = ELF64_R_SYM (src[0].r_info);
@@ -1546,14 +1924,14 @@ mips_elf64_literal_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
bfd_reloc_status_type ret;
bfd_vma gp;
- /* If we're relocating, and this is an external symbol, we don't
- want to change anything. */
+ /* R_MIPS_LITERAL relocations are defined for local symbols only. */
if (output_bfd != NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
&& (symbol->flags & BSF_LOCAL) != 0)
{
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
+ *error_message = (char *)
+ _("literal relocation occurs for an external symbol");
+ return bfd_reloc_outofrange;
}
/* FIXME: The entries in the .lit8 and .lit4 sections should be merged. */
@@ -1589,8 +1967,7 @@ mips_elf64_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
bfd_vma relocation;
bfd_vma val;
- /* If we're relocating, and this is an external symbol, we don't want
- to change anything. */
+ /* R_MIPS_GPREL32 relocations are defined for local symbols only. */
if (output_bfd != NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
&& (symbol->flags & BSF_LOCAL) != 0)
@@ -1608,10 +1985,10 @@ mips_elf64_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf64_final_gp (output_bfd, symbol, relocatable,
- error_message, &gp);
- if (ret != bfd_reloc_ok)
- return ret;
+ ret = mips_elf64_final_gp (output_bfd, symbol, relocatable,
+ error_message, &gp);
+ if (ret != bfd_reloc_ok)
+ return ret;
if (bfd_is_com_section (symbol->section))
relocation = 0;
@@ -1621,7 +1998,7 @@ mips_elf64_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ 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. */
@@ -1707,14 +2084,11 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
{
bfd_boolean relocatable;
bfd_reloc_status_type ret;
+ bfd_byte *location;
bfd_vma gp;
- unsigned short extend = 0;
- unsigned short insn = 0;
- bfd_signed_vma val;
- bfd_vma relocation;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
&& (symbol->flags & BSF_LOCAL) != 0)
@@ -1736,55 +2110,16 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
if (ret != bfd_reloc_ok)
return ret;
- if (reloc_entry->address > input_section->_cooked_size)
- return bfd_reloc_outofrange;
-
- if (bfd_is_com_section (symbol->section))
- relocation = 0;
- else
- relocation = symbol->value;
-
- relocation += symbol->section->output_section->vma;
- relocation += symbol->section->output_offset;
-
- /* Set val to the offset into the section or symbol. */
- val = reloc_entry->addend;
+ location = (bfd_byte *) data + reloc_entry->address;
+ _bfd_mips16_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
+ location);
+ ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+ input_section, relocatable,
+ data, gp);
+ _bfd_mips16_elf_reloc_shuffle (abfd, reloc_entry->howto->type, !relocatable,
+ location);
- if (reloc_entry->howto->partial_inplace)
- {
- /* Pick up the mips16 extend instruction and the real instruction. */
- extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
- insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
- val += ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
- }
-
- _bfd_mips_elf_sign_extend(val, 16);
-
- /* 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_16 (abfd,
- (extend & 0xf800) | ((val >> 11) & 0x1f) | (val & 0x7e0),
- (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (insn & 0xffe0) | (val & 0x1f),
- (bfd_byte *) data + reloc_entry->address + 2);
- }
- else
- reloc_entry->addend = val;
-
- if (relocatable)
- reloc_entry->address += input_section->output_offset;
- else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
- return bfd_reloc_overflow;
-
- return bfd_reloc_ok;
+ return ret;
}
/* A mapping from BFD reloc types to MIPS ELF reloc types. */
@@ -1802,7 +2137,7 @@ static const struct elf_reloc_map mips_reloc_map[] =
/* There is no BFD reloc for R_MIPS_REL32. */
{ BFD_RELOC_64, R_MIPS_64 },
{ BFD_RELOC_CTOR, R_MIPS_64 },
- { BFD_RELOC_16_PCREL, R_MIPS_PC16 },
+ { BFD_RELOC_16_PCREL_S2, R_MIPS_PC16 },
{ BFD_RELOC_HI16_S, R_MIPS_HI16 },
{ BFD_RELOC_LO16, R_MIPS_LO16 },
{ BFD_RELOC_GPREL16, R_MIPS_GPREL16 },
@@ -1830,7 +2165,28 @@ static const struct elf_reloc_map mips_reloc_map[] =
{ BFD_RELOC_MIPS_REL16, R_MIPS_REL16 },
/* Use of R_MIPS_ADD_IMMEDIATE and R_MIPS_PJUMP is deprecated. */
{ BFD_RELOC_MIPS_RELGOT, R_MIPS_RELGOT },
- { BFD_RELOC_MIPS_JALR, R_MIPS_JALR }
+ { BFD_RELOC_MIPS_JALR, R_MIPS_JALR },
+ { BFD_RELOC_MIPS_TLS_DTPMOD32, R_MIPS_TLS_DTPMOD32 },
+ { BFD_RELOC_MIPS_TLS_DTPREL32, R_MIPS_TLS_DTPREL32 },
+ { BFD_RELOC_MIPS_TLS_DTPMOD64, R_MIPS_TLS_DTPMOD64 },
+ { BFD_RELOC_MIPS_TLS_DTPREL64, R_MIPS_TLS_DTPREL64 },
+ { BFD_RELOC_MIPS_TLS_GD, R_MIPS_TLS_GD },
+ { BFD_RELOC_MIPS_TLS_LDM, R_MIPS_TLS_LDM },
+ { BFD_RELOC_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_HI16 },
+ { BFD_RELOC_MIPS_TLS_DTPREL_LO16, R_MIPS_TLS_DTPREL_LO16 },
+ { BFD_RELOC_MIPS_TLS_GOTTPREL, R_MIPS_TLS_GOTTPREL },
+ { BFD_RELOC_MIPS_TLS_TPREL32, R_MIPS_TLS_TPREL32 },
+ { BFD_RELOC_MIPS_TLS_TPREL64, R_MIPS_TLS_TPREL64 },
+ { BFD_RELOC_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_HI16 },
+ { BFD_RELOC_MIPS_TLS_TPREL_LO16, R_MIPS_TLS_TPREL_LO16 }
+};
+
+static const struct elf_reloc_map mips16_reloc_map[] =
+{
+ { BFD_RELOC_MIPS16_JMP, R_MIPS16_26 - R_MIPS16_min },
+ { BFD_RELOC_MIPS16_GPREL, R_MIPS16_GPREL - R_MIPS16_min },
+ { BFD_RELOC_MIPS16_HI16_S, R_MIPS16_HI16 - R_MIPS16_min },
+ { BFD_RELOC_MIPS16_LO16, R_MIPS16_LO16 - R_MIPS16_min },
};
/* Given a BFD reloc type, return a howto structure. */
@@ -1843,6 +2199,7 @@ bfd_elf64_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* FIXME: We default to RELA here instead of choosing the right
relocation variant. */
reloc_howto_type *howto_table = mips_elf64_howto_table_rela;
+ reloc_howto_type *howto16_table = mips16_elf64_howto_table_rela;
for (i = 0; i < sizeof (mips_reloc_map) / sizeof (struct elf_reloc_map);
i++)
@@ -1851,18 +2208,19 @@ bfd_elf64_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return &howto_table[(int) mips_reloc_map[i].elf_val];
}
+ for (i = 0; i < sizeof (mips16_reloc_map) / sizeof (struct elf_reloc_map);
+ i++)
+ {
+ if (mips16_reloc_map[i].bfd_val == code)
+ return &howto16_table[(int) mips16_reloc_map[i].elf_val];
+ }
+
switch (code)
{
- case BFD_RELOC_MIPS16_JMP:
- return &elf_mips16_jump_howto;
- case BFD_RELOC_MIPS16_GPREL:
- return &elf_mips16_gprel_howto;
case BFD_RELOC_VTABLE_INHERIT:
return &elf_mips_gnu_vtinherit_howto;
case BFD_RELOC_VTABLE_ENTRY:
return &elf_mips_gnu_vtentry_howto;
- case BFD_RELOC_16_PCREL_S2:
- return &elf_mips_gnu_rela16_s2;
default:
bfd_set_error (bfd_error_bad_value);
return NULL;
@@ -1876,10 +2234,6 @@ mips_elf64_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p)
{
switch (r_type)
{
- case R_MIPS16_26:
- return &elf_mips16_jump_howto;
- case R_MIPS16_GPREL:
- return &elf_mips16_gprel_howto;
case R_MIPS_GNU_VTINHERIT:
return &elf_mips_gnu_vtinherit_howto;
case R_MIPS_GNU_VTENTRY:
@@ -1890,6 +2244,13 @@ mips_elf64_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p)
else
return &elf_mips_gnu_rel16_s2;
default:
+ if (r_type >= R_MIPS16_min && r_type < R_MIPS16_max)
+ {
+ if (rela_p)
+ return &mips16_elf64_howto_table_rela[r_type - R_MIPS16_min];
+ else
+ return &mips16_elf64_howto_table_rel[r_type - R_MIPS16_min];
+ }
BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
if (rela_p)
return &mips_elf64_howto_table_rela[r_type];
@@ -1984,7 +2345,7 @@ mips_elf64_canonicalize_dynamic_reloc (bfd *abfd, arelent **storage,
if (! (*slurp_relocs) (abfd, s, syms, TRUE))
return -1;
- count = s->_raw_size / elf_section_data (s)->this_hdr.sh_entsize * 3;
+ count = s->size / elf_section_data (s)->this_hdr.sh_entsize * 3;
p = s->relocation;
for (i = 0; i < count; i++)
*storage++ = p++;
@@ -2120,7 +2481,7 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect,
case RSS_GP0:
case RSS_LOC:
/* FIXME: I think these need to be handled using
- special howto structures. */
+ special howto structures. */
BFD_ASSERT (0);
break;
@@ -2210,7 +2571,7 @@ mips_elf64_slurp_reloc_table (bfd *abfd, asection *asect,
case because relocations against this section may use the
dynamic symbol table, and in that case bfd_section_from_shdr
in elf.c does not update the RELOC_COUNT. */
- if (asect->_raw_size == 0)
+ if (asect->size == 0)
return TRUE;
rel_hdr = &d->this_hdr;
@@ -2352,6 +2713,8 @@ mips_elf64_write_rel (bfd *abfd, asection *sec,
sym = *ptr->sym_ptr_ptr;
if (sym == last_sym)
n = last_sym_idx;
+ else if (bfd_is_abs_section (sym->section) && sym->value == 0)
+ n = STN_UNDEF;
else
{
last_sym = sym;
@@ -2448,6 +2811,8 @@ mips_elf64_write_rela (bfd *abfd, asection *sec,
sym = *ptr->sym_ptr_ptr;
if (sym == last_sym)
n = last_sym_idx;
+ else if (bfd_is_abs_section (sym->section) && sym->value == 0)
+ n = STN_UNDEF;
else
{
last_sym = sym;
@@ -2539,7 +2904,7 @@ static bfd_boolean
elf64_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -2555,14 +2920,14 @@ elf64_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 112;
- raw_size = 360;
+ size = 360;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -2652,8 +3017,8 @@ const struct elf_size_info mips_elf64_size_info =
sizeof (Elf64_External_Sym),
sizeof (Elf64_External_Dyn),
sizeof (Elf_External_Note),
- 4, /* hash-table entry size */
- 3, /* internal relocations per external relocations */
+ 4, /* hash-table entry size */
+ 3, /* internal relocations per external relocations */
64, /* arch_size */
3, /* log_file_align */
ELFCLASS64,
@@ -2739,6 +3104,7 @@ const struct elf_size_info mips_elf64_size_info =
MIPS-specific function only applies to IRIX5, which had no 64-bit
ABI. */
#define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line
+#define bfd_elf64_find_inliner_info _bfd_mips_elf_find_inliner_info
#define bfd_elf64_new_section_hook _bfd_mips_elf_new_section_hook
#define bfd_elf64_set_section_contents _bfd_mips_elf_set_section_contents
#define bfd_elf64_bfd_get_relocated_section_contents \
@@ -2801,10 +3167,10 @@ extern bfd_boolean bfd_elf64_archive_write_armap
#undef ELF_MAXPAGESIZE
-#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"
+#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. */
diff --git a/contrib/binutils/bfd/elf64-ppc.c b/contrib/binutils/bfd/elf64-ppc.c
index bc9e0a765dc3..f61ed8a8310a 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
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Linus Nordberg, Swox AB <info@swox.com>,
based on elf32-ppc.c by Ian Lance Taylor.
@@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* The 64-bit PowerPC ELF ABI may be found at
http://www.linuxbase.org/spec/ELF/ppc64/PPC-elf64abi.txt, and
@@ -35,6 +35,8 @@
static bfd_reloc_status_type ppc64_elf_ha_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+static bfd_reloc_status_type ppc64_elf_branch_reloc
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_brtaken_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_sectoff_reloc
@@ -49,7 +51,8 @@ static bfd_reloc_status_type ppc64_elf_toc64_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_unhandled_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-
+static bfd_vma opd_entry_value
+ (asection *, bfd_vma, asection **, bfd_vma *);
#define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec
#define TARGET_LITTLE_NAME "elf64-powerpcle"
@@ -64,7 +67,6 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
#define elf_backend_want_plt_sym 0
#define elf_backend_plt_alignment 3
#define elf_backend_plt_not_loaded 1
-#define elf_backend_got_symbol_offset 0
#define elf_backend_got_header_size 8
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
@@ -76,6 +78,7 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
#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
#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free
+#define bfd_elf64_get_synthetic_symtab ppc64_elf_get_synthetic_symtab
#define elf_backend_object_p ppc64_elf_object_p
#define elf_backend_grok_prstatus ppc64_elf_grok_prstatus
@@ -83,13 +86,17 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
#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_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
#define elf_backend_gc_mark_hook ppc64_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook ppc64_elf_gc_sweep_hook
#define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol
#define elf_backend_hide_symbol ppc64_elf_hide_symbol
#define elf_backend_always_size_sections ppc64_elf_func_desc_adjust
#define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections
+#define elf_backend_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
#define elf_backend_reloc_type_class ppc64_elf_reloc_type_class
@@ -168,9 +175,17 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
#define LIS_R0_0 0x3c000000 /* lis %r0,0 */
#define ORI_R0_R0_0 0x60000000 /* ori %r0,%r0,0 */
-/* Instructions to save and restore floating point regs. */
+/* Instructions used by the save and restore reg functions. */
+#define STD_R0_0R1 0xf8010000 /* std %r0,0(%r1) */
+#define STD_R0_0R12 0xf80c0000 /* std %r0,0(%r12) */
+#define LD_R0_0R1 0xe8010000 /* ld %r0,0(%r1) */
+#define LD_R0_0R12 0xe80c0000 /* ld %r0,0(%r12) */
#define STFD_FR0_0R1 0xd8010000 /* stfd %fr0,0(%r1) */
#define LFD_FR0_0R1 0xc8010000 /* lfd %fr0,0(%r1) */
+#define LI_R12_0 0x39800000 /* li %r12,0 */
+#define STVX_VR0_R12_R0 0x7c0c01ce /* stvx %v0,%r12,%r0 */
+#define LVX_VR0_R12_R0 0x7c0c00ce /* lvx %v0,%r12,%r0 */
+#define MTLR_R0 0x7c0803a6 /* mtlr %r0 */
#define BLR 0x4e800020 /* blr */
/* Since .opd is an array of descriptors and each entry will end up
@@ -303,7 +318,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ ppc64_elf_branch_reloc, /* special_function */
"R_PPC64_ADDR14", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
@@ -352,7 +367,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ ppc64_elf_branch_reloc, /* special_function */
"R_PPC64_REL24", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
@@ -367,7 +382,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ ppc64_elf_branch_reloc, /* special_function */
"R_PPC64_REL14", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
@@ -2104,8 +2119,13 @@ ppc64_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
ppc_howto_init ();
type = ELF64_R_TYPE (dst->r_info);
- BFD_ASSERT (type < (sizeof (ppc64_elf_howto_table)
- / sizeof (ppc64_elf_howto_table[0])));
+ if (type >= (sizeof (ppc64_elf_howto_table)
+ / sizeof (ppc64_elf_howto_table[0])))
+ {
+ (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
+ abfd, (int) type);
+ type = R_PPC64_NONE;
+ }
cache_ptr->howto = ppc64_elf_howto_table[type];
}
@@ -2131,6 +2151,29 @@ ppc64_elf_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
}
static bfd_reloc_status_type
+ppc64_elf_branch_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
+{
+ if (output_bfd != NULL)
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
+
+ if (strcmp (symbol->section->name, ".opd") == 0
+ && (symbol->section->owner->flags & DYNAMIC) == 0)
+ {
+ bfd_vma dest = opd_entry_value (symbol->section,
+ symbol->value + reloc_entry->addend,
+ NULL, NULL);
+ if (dest != (bfd_vma) -1)
+ reloc_entry->addend = dest - (symbol->value
+ + symbol->section->output_section->vma
+ + symbol->section->output_offset);
+ }
+ return bfd_reloc_continue;
+}
+
+static bfd_reloc_status_type
ppc64_elf_brtaken_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
void *data, asection *input_section,
bfd *output_bfd, char **error_message)
@@ -2166,7 +2209,7 @@ ppc64_elf_brtaken_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
else if ((insn & (0x14 << 21)) == (0x10 << 21))
insn |= 0x08 << 21;
else
- return bfd_reloc_continue;
+ goto out;
}
else
{
@@ -2188,7 +2231,9 @@ ppc64_elf_brtaken_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
insn ^= 0x01 << 21;
}
bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
- return bfd_reloc_continue;
+ out:
+ return ppc64_elf_branch_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
}
static bfd_reloc_status_type
@@ -2331,12 +2376,24 @@ 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;
+
/* TLS local dynamic got entry handling. Suppose for multiple GOT
sections means we potentially need one of these for each input bfd. */
union {
bfd_signed_vma refcount;
bfd_vma offset;
} tlsld_got;
+
+ /* A copy of relocs before they are modified for --emit-relocs. */
+ Elf_Internal_Rela *opd_relocs;
};
#define ppc64_elf_tdata(bfd) \
@@ -2357,6 +2414,17 @@ ppc64_elf_mkobject (bfd *abfd)
return TRUE;
}
+/* Return 1 if target is one of ours. */
+
+static bfd_boolean
+is_ppc64_elf_target (const struct bfd_target *targ)
+{
+ extern const bfd_target bfd_elf64_powerpc_vec;
+ extern const bfd_target bfd_elf64_powerpcle_vec;
+
+ return targ == &bfd_elf64_powerpc_vec || targ == &bfd_elf64_powerpcle_vec;
+}
+
/* Fix bad default arch selected for a 64 bit input bfd when the
default is 32 bit. */
@@ -2382,7 +2450,7 @@ ppc64_elf_object_p (bfd *abfd)
static bfd_boolean
ppc64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
- size_t offset, raw_size;
+ size_t offset, size;
if (note->descsz != 504)
return FALSE;
@@ -2395,11 +2463,11 @@ ppc64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 112;
- raw_size = 384;
+ size = 384;
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -2430,13 +2498,13 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
const char *msg;
if (bfd_big_endian (ibfd))
- msg = _("%s: compiled for a big endian system "
+ msg = _("%B: compiled for a big endian system "
"and target is little endian");
else
- msg = _("%s: compiled for a little endian system "
+ msg = _("%B: compiled for a little endian system "
"and target is big endian");
- (*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
+ (*_bfd_error_handler) (msg, ibfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -2447,11 +2515,11 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
/* Add extra PPC sections. */
-static struct bfd_elf_special_section const ppc64_elf_special_sections[]=
+static const struct bfd_elf_special_section ppc64_elf_special_sections[]=
{
- { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
{ ".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 },
@@ -2492,6 +2560,415 @@ ppc64_elf_new_section_hook (bfd *abfd, asection *sec)
return _bfd_elf_new_section_hook (abfd, sec);
}
+
+static void *
+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;
+ return NULL;
+}
+
+/* Parameters for the qsort hook. */
+static asection *synthetic_opd;
+static bfd_boolean synthetic_relocatable;
+
+/* qsort comparison function for ppc64_elf_get_synthetic_symtab. */
+
+static int
+compare_symbols (const void *ap, const void *bp)
+{
+ const asymbol *a = * (const asymbol **) ap;
+ const asymbol *b = * (const asymbol **) bp;
+
+ /* Section symbols first. */
+ if ((a->flags & BSF_SECTION_SYM) && !(b->flags & BSF_SECTION_SYM))
+ return -1;
+ if (!(a->flags & BSF_SECTION_SYM) && (b->flags & BSF_SECTION_SYM))
+ return 1;
+
+ /* then .opd symbols. */
+ if (a->section == synthetic_opd && b->section != synthetic_opd)
+ return -1;
+ if (a->section != synthetic_opd && b->section == synthetic_opd)
+ return 1;
+
+ /* then other code symbols. */
+ if ((a->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ == (SEC_CODE | SEC_ALLOC)
+ && (b->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ != (SEC_CODE | SEC_ALLOC))
+ return -1;
+
+ if ((a->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ != (SEC_CODE | SEC_ALLOC)
+ && (b->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ == (SEC_CODE | SEC_ALLOC))
+ return 1;
+
+ if (synthetic_relocatable)
+ {
+ if (a->section->id < b->section->id)
+ return -1;
+
+ if (a->section->id > b->section->id)
+ return 1;
+ }
+
+ if (a->value + a->section->vma < b->value + b->section->vma)
+ return -1;
+
+ if (a->value + a->section->vma > b->value + b->section->vma)
+ return 1;
+
+ /* For syms with the same value, prefer strong dynamic global function
+ syms over other syms. */
+ if ((a->flags & BSF_GLOBAL) != 0 && (b->flags & BSF_GLOBAL) == 0)
+ return -1;
+
+ if ((a->flags & BSF_GLOBAL) == 0 && (b->flags & BSF_GLOBAL) != 0)
+ return 1;
+
+ if ((a->flags & BSF_FUNCTION) != 0 && (b->flags & BSF_FUNCTION) == 0)
+ return -1;
+
+ if ((a->flags & BSF_FUNCTION) == 0 && (b->flags & BSF_FUNCTION) != 0)
+ return 1;
+
+ if ((a->flags & BSF_WEAK) == 0 && (b->flags & BSF_WEAK) != 0)
+ return -1;
+
+ if ((a->flags & BSF_WEAK) != 0 && (b->flags & BSF_WEAK) == 0)
+ return 1;
+
+ if ((a->flags & BSF_DYNAMIC) != 0 && (b->flags & BSF_DYNAMIC) == 0)
+ return -1;
+
+ if ((a->flags & BSF_DYNAMIC) == 0 && (b->flags & BSF_DYNAMIC) != 0)
+ return 1;
+
+ return 0;
+}
+
+/* Search SYMS for a symbol of the given VALUE. */
+
+static asymbol *
+sym_exists_at (asymbol **syms, long lo, long hi, int id, bfd_vma value)
+{
+ long mid;
+
+ if (id == -1)
+ {
+ while (lo < hi)
+ {
+ mid = (lo + hi) >> 1;
+ if (syms[mid]->value + syms[mid]->section->vma < value)
+ lo = mid + 1;
+ else if (syms[mid]->value + syms[mid]->section->vma > value)
+ hi = mid;
+ else
+ return syms[mid];
+ }
+ }
+ else
+ {
+ while (lo < hi)
+ {
+ mid = (lo + hi) >> 1;
+ if (syms[mid]->section->id < id)
+ lo = mid + 1;
+ else if (syms[mid]->section->id > id)
+ hi = mid;
+ else if (syms[mid]->value < value)
+ lo = mid + 1;
+ else if (syms[mid]->value > value)
+ hi = mid;
+ else
+ return syms[mid];
+ }
+ }
+ return NULL;
+}
+
+/* Create synthetic symbols, effectively restoring "dot-symbol" function
+ entry syms. */
+
+static long
+ppc64_elf_get_synthetic_symtab (bfd *abfd,
+ long static_count, asymbol **static_syms,
+ long dyn_count, asymbol **dyn_syms,
+ asymbol **ret)
+{
+ asymbol *s;
+ long i;
+ long count;
+ char *names;
+ long symcount, codesecsym, codesecsymend, secsymend, opdsymend;
+ asection *opd;
+ bfd_boolean relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0;
+ asymbol **syms;
+
+ *ret = NULL;
+
+ opd = bfd_get_section_by_name (abfd, ".opd");
+ if (opd == NULL)
+ return 0;
+
+ symcount = static_count;
+ if (!relocatable)
+ symcount += dyn_count;
+ if (symcount == 0)
+ return 0;
+
+ syms = bfd_malloc ((symcount + 1) * sizeof (*syms));
+ if (syms == NULL)
+ return -1;
+
+ if (!relocatable && static_count != 0 && dyn_count != 0)
+ {
+ /* Use both symbol tables. */
+ memcpy (syms, static_syms, static_count * sizeof (*syms));
+ memcpy (syms + static_count, dyn_syms, (dyn_count + 1) * sizeof (*syms));
+ }
+ else if (!relocatable && static_count == 0)
+ memcpy (syms, dyn_syms, (symcount + 1) * sizeof (*syms));
+ else
+ memcpy (syms, static_syms, (symcount + 1) * sizeof (*syms));
+
+ synthetic_opd = opd;
+ synthetic_relocatable = relocatable;
+ qsort (syms, symcount, sizeof (*syms), compare_symbols);
+
+ if (!relocatable && symcount > 1)
+ {
+ long j;
+ /* Trim duplicate syms, since we may have merged the normal and
+ dynamic symbols. Actually, we only care about syms that have
+ different values, so trim any with the same value. */
+ for (i = 1, j = 1; i < symcount; ++i)
+ if (syms[i - 1]->value + syms[i - 1]->section->vma
+ != syms[i]->value + syms[i]->section->vma)
+ syms[j++] = syms[i];
+ symcount = j;
+ }
+
+ i = 0;
+ if (syms[i]->section == opd)
+ ++i;
+ codesecsym = i;
+
+ for (; i < symcount; ++i)
+ if (((syms[i]->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ != (SEC_CODE | SEC_ALLOC))
+ || (syms[i]->flags & BSF_SECTION_SYM) == 0)
+ break;
+ codesecsymend = i;
+
+ for (; i < symcount; ++i)
+ if ((syms[i]->flags & BSF_SECTION_SYM) == 0)
+ break;
+ secsymend = i;
+
+ for (; i < symcount; ++i)
+ if (syms[i]->section != opd)
+ break;
+ opdsymend = i;
+
+ for (; i < symcount; ++i)
+ if ((syms[i]->section->flags & (SEC_CODE | SEC_ALLOC | SEC_THREAD_LOCAL))
+ != (SEC_CODE | SEC_ALLOC))
+ break;
+ symcount = i;
+
+ count = 0;
+ if (opdsymend == secsymend)
+ goto done;
+
+ if (relocatable)
+ {
+ bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean);
+ arelent *r;
+ size_t size;
+ long relcount;
+
+ slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
+ relcount = (opd->flags & SEC_RELOC) ? opd->reloc_count : 0;
+ if (relcount == 0)
+ goto done;
+
+ if (!(*slurp_relocs) (abfd, opd, static_syms, FALSE))
+ {
+ count = -1;
+ goto done;
+ }
+
+ size = 0;
+ for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
+ {
+ asymbol *sym;
+
+ while (r < opd->relocation + relcount
+ && r->address < syms[i]->value + opd->vma)
+ ++r;
+
+ if (r == opd->relocation + relcount)
+ break;
+
+ if (r->address != syms[i]->value + opd->vma)
+ continue;
+
+ if (r->howto->type != R_PPC64_ADDR64)
+ continue;
+
+ sym = *r->sym_ptr_ptr;
+ if (!sym_exists_at (syms, opdsymend, symcount,
+ sym->section->id, sym->value + r->addend))
+ {
+ ++count;
+ size += sizeof (asymbol);
+ size += strlen (syms[i]->name) + 2;
+ }
+ }
+
+ s = *ret = bfd_malloc (size);
+ if (s == NULL)
+ {
+ count = -1;
+ goto done;
+ }
+
+ names = (char *) (s + count);
+
+ for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
+ {
+ asymbol *sym;
+
+ while (r < opd->relocation + relcount
+ && r->address < syms[i]->value + opd->vma)
+ ++r;
+
+ if (r == opd->relocation + relcount)
+ break;
+
+ if (r->address != syms[i]->value + opd->vma)
+ continue;
+
+ if (r->howto->type != R_PPC64_ADDR64)
+ continue;
+
+ sym = *r->sym_ptr_ptr;
+ if (!sym_exists_at (syms, opdsymend, symcount,
+ sym->section->id, sym->value + r->addend))
+ {
+ size_t len;
+
+ *s = *syms[i];
+ s->section = sym->section;
+ s->value = sym->value + r->addend;
+ s->name = names;
+ *names++ = '.';
+ len = strlen (syms[i]->name);
+ memcpy (names, syms[i]->name, len + 1);
+ names += len + 1;
+ s++;
+ }
+ }
+ }
+ else
+ {
+ bfd_byte *contents;
+ size_t size;
+
+ if (!bfd_malloc_and_get_section (abfd, opd, &contents))
+ {
+ if (contents)
+ {
+ free_contents_and_exit:
+ free (contents);
+ }
+ count = -1;
+ goto done;
+ }
+
+ size = 0;
+ for (i = secsymend; i < opdsymend; ++i)
+ {
+ bfd_vma ent;
+
+ ent = bfd_get_64 (abfd, contents + syms[i]->value);
+ if (!sym_exists_at (syms, opdsymend, symcount, -1, ent))
+ {
+ ++count;
+ size += sizeof (asymbol);
+ size += strlen (syms[i]->name) + 2;
+ }
+ }
+
+ s = *ret = bfd_malloc (size);
+ if (s == NULL)
+ goto free_contents_and_exit;
+
+ names = (char *) (s + count);
+
+ for (i = secsymend; i < opdsymend; ++i)
+ {
+ bfd_vma ent;
+
+ ent = bfd_get_64 (abfd, contents + syms[i]->value);
+ if (!sym_exists_at (syms, opdsymend, symcount, -1, ent))
+ {
+ long lo, hi;
+ size_t len;
+ asection *sec = abfd->sections;
+
+ *s = *syms[i];
+ lo = codesecsym;
+ hi = codesecsymend;
+ while (lo < hi)
+ {
+ long mid = (lo + hi) >> 1;
+ if (syms[mid]->section->vma < ent)
+ lo = mid + 1;
+ else if (syms[mid]->section->vma > ent)
+ hi = mid;
+ else
+ {
+ sec = syms[mid]->section;
+ break;
+ }
+ }
+
+ if (lo >= hi && lo > codesecsym)
+ sec = syms[lo - 1]->section;
+
+ for (; sec != NULL; sec = sec->next)
+ {
+ if (sec->vma > ent)
+ break;
+ if ((sec->flags & SEC_ALLOC) == 0
+ || (sec->flags & SEC_LOAD) == 0)
+ break;
+ if ((sec->flags & SEC_CODE) != 0)
+ s->section = sec;
+ }
+ s->value = ent - s->section->vma;
+ s->name = names;
+ *names++ = '.';
+ len = strlen (syms[i]->name);
+ memcpy (names, syms[i]->name, len + 1);
+ names += len + 1;
+ s++;
+ }
+ }
+ free (contents);
+ }
+
+ done:
+ free (syms);
+ return count;
+}
/* The following functions are specific to the ELF linker, while
functions above are used generally. Those named ppc64_elf_* are
@@ -2559,7 +3036,11 @@ ppc64_elf_new_section_hook (bfd *abfd, asection *sec)
creating a shared library containing foo, we need to have both symbols
dynamic so that references to .foo are satisfied during the early
stages of linking. Otherwise the linker might decide to pull in a
- definition from some other object, eg. a static library. */
+ definition from some other object, eg. a static library.
+
+ Update: As of August 2004, we support a new convention. Function
+ calls may use the function descriptor symbol, ie. "bl foo". This
+ behaves exactly as "bl .foo". */
/* The linker needs to keep track of the number of relocs that it
decides to copy as dynamic relocs in check_relocs for each symbol.
@@ -2669,7 +3150,10 @@ struct plt_entry
. bctr
ppc_stub_plt_call:
- Used to call a function in a shared library.
+ Used to call a function in a shared library. If it so happens that
+ the plt entry referenced crosses a 64k boundary, then an extra
+ "addis %r12,%r12,1" will be inserted before the load at xxx+8 or
+ xxx+16 as appropriate.
. addis %r12,%r2,xxx@toc@ha
. std %r2,40(%r1)
. ld %r11,xxx+0@toc@l(%r12)
@@ -2739,7 +3223,7 @@ struct ppc_branch_hash_entry {
/* Base hash table entry structure. */
struct bfd_hash_entry root;
- /* Offset within .branch_lt. */
+ /* Offset within branch lookup table. */
unsigned int offset;
/* Generation marker. */
@@ -2758,16 +3242,21 @@ struct ppc_link_hash_entry
struct ppc_dyn_relocs *dyn_relocs;
/* Link between function code and descriptor symbols. */
- struct elf_link_hash_entry *oh;
+ struct ppc_link_hash_entry *oh;
/* Flag function code and descriptor symbols. */
unsigned int is_func:1;
unsigned int is_func_descriptor:1;
- unsigned int is_entry:1;
+ unsigned int fake:1;
- /* Whether global opd sym has been adjusted or not. */
+ /* Whether global opd/toc sym has been adjusted or not.
+ After ppc64_elf_edit_opd/ppc64_elf_edit_toc has run, this flag
+ should be set for all globals defined in any opd/toc section. */
unsigned int adjust_done:1;
+ /* Set if we twiddled this symbol to weak at some stage. */
+ unsigned int was_undefined:1;
+
/* Contexts in which symbol is used in the GOT (or TOC).
TLS_GD .. TLS_EXPLICIT bits are or'd into the mask as the
corresponding relocs are encountered during check_relocs.
@@ -2816,10 +3305,6 @@ struct ppc_link_hash_table
bfd_vma toc_off;
} *stub_group;
- /* Support for multiple toc sections. */
- unsigned int no_multi_toc;
- unsigned int multi_toc_needed;
-
/* Temp used when calculating TOC pointers. */
bfd_vma toc_curr;
@@ -2843,24 +3328,32 @@ struct ppc_link_hash_table
asection *brlt;
asection *relbrlt;
- /* Shortcut to .__tls_get_addr. */
- struct elf_link_hash_entry *tls_get_addr;
+ /* Shortcut to .__tls_get_addr and __tls_get_addr. */
+ struct ppc_link_hash_entry *tls_get_addr;
+ struct ppc_link_hash_entry *tls_get_addr_fd;
/* Statistics. */
unsigned long stub_count[ppc_stub_plt_call];
+ /* Number of stubs against global syms. */
+ unsigned long stub_globals;
+
/* Set if we should emit symbols for stubs. */
- unsigned int emit_stub_syms;
+ unsigned int emit_stub_syms:1;
+
+ /* Support for multiple toc sections. */
+ unsigned int no_multi_toc:1;
+ unsigned int multi_toc_needed:1;
/* Set on error. */
- unsigned int stub_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;
+ unsigned int has_14bit_branch:1;
- /* Set if we detect a reference undefined weak symbol. */
- unsigned int have_undefweak;
+ /* Temp used by ppc64_elf_check_directives. */
+ unsigned int twiddled_syms:1;
/* Incremented every time we size stubs. */
unsigned int stub_iteration;
@@ -2869,6 +3362,12 @@ struct ppc_link_hash_table
struct sym_sec_cache sym_sec;
};
+/* Rename some of the generic section flags to better document how they
+ are used here. */
+#define has_toc_reloc has_gp_reloc
+#define makes_toc_func_call need_finalize_relax
+#define call_check_in_progress reloc_done
+
/* Get the ppc64 ELF linker hash table from a link_info structure. */
#define ppc_hash_table(p) \
@@ -2971,14 +3470,9 @@ link_hash_newfunc (struct bfd_hash_entry *entry,
{
struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) entry;
- eh->stub_cache = NULL;
- eh->dyn_relocs = NULL;
- eh->oh = NULL;
- eh->is_func = 0;
- eh->is_func_descriptor = 0;
- eh->is_entry = 0;
- eh->adjust_done = 0;
- eh->tls_mask = 0;
+ memset (&eh->stub_cache, 0,
+ (sizeof (struct ppc_link_hash_entry)
+ - offsetof (struct ppc_link_hash_entry, stub_cache)));
}
return entry;
@@ -2996,28 +3490,35 @@ ppc64_elf_link_hash_table_create (bfd *abfd)
if (htab == NULL)
return NULL;
- if (! _bfd_elf_link_hash_table_init (&htab->elf, abfd, link_hash_newfunc))
+ if (!_bfd_elf_link_hash_table_init (&htab->elf, abfd, link_hash_newfunc,
+ sizeof (struct ppc_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))
+ if (!bfd_hash_table_init (&htab->stub_hash_table, stub_hash_newfunc,
+ sizeof (struct ppc_stub_hash_entry)))
return NULL;
/* And the branch hash table. */
- if (!bfd_hash_table_init (&htab->branch_hash_table, branch_hash_newfunc))
+ if (!bfd_hash_table_init (&htab->branch_hash_table, branch_hash_newfunc,
+ sizeof (struct ppc_branch_hash_entry)))
return NULL;
/* Initializing two fields of the union is just cosmetic. We really
only care about glist, but when compiled on a 32-bit host the
bfd_vma fields are larger. Setting the bfd_vma to zero makes
debugger inspection of these fields look nicer. */
- htab->elf.init_refcount.refcount = 0;
- htab->elf.init_refcount.glist = NULL;
- htab->elf.init_offset.offset = 0;
- htab->elf.init_offset.glist = NULL;
+ htab->elf.init_got_refcount.refcount = 0;
+ htab->elf.init_got_refcount.glist = NULL;
+ htab->elf.init_plt_refcount.refcount = 0;
+ htab->elf.init_plt_refcount.glist = NULL;
+ htab->elf.init_got_offset.offset = 0;
+ htab->elf.init_got_offset.glist = NULL;
+ htab->elf.init_plt_offset.offset = 0;
+ htab->elf.init_plt_offset.glist = NULL;
return &htab->elf.root;
}
@@ -3071,27 +3572,29 @@ ppc_stub_name (const asection *input_section,
{
len = 8 + 1 + strlen (h->elf.root.root.string) + 1 + 8 + 1;
stub_name = bfd_malloc (len);
- if (stub_name != NULL)
- {
- sprintf (stub_name, "%08x.%s+%x",
- input_section->id & 0xffffffff,
- h->elf.root.root.string,
- (int) rel->r_addend & 0xffffffff);
- }
+ if (stub_name == NULL)
+ return stub_name;
+
+ sprintf (stub_name, "%08x.%s+%x",
+ input_section->id & 0xffffffff,
+ h->elf.root.root.string,
+ (int) rel->r_addend & 0xffffffff);
}
else
{
len = 8 + 1 + 8 + 1 + 8 + 1 + 8 + 1;
stub_name = bfd_malloc (len);
- if (stub_name != NULL)
- {
- sprintf (stub_name, "%08x.%x:%x+%x",
- input_section->id & 0xffffffff,
- sym_sec->id & 0xffffffff,
- (int) ELF64_R_SYM (rel->r_info) & 0xffffffff,
- (int) rel->r_addend & 0xffffffff);
- }
+ if (stub_name == NULL)
+ return stub_name;
+
+ sprintf (stub_name, "%08x.%x:%x+%x",
+ input_section->id & 0xffffffff,
+ sym_sec->id & 0xffffffff,
+ (int) ELF64_R_SYM (rel->r_info) & 0xffffffff,
+ (int) rel->r_addend & 0xffffffff);
}
+ if (stub_name[len - 2] == '+' && stub_name[len - 1] == '0')
+ stub_name[len - 2] = 0;
return stub_name;
}
@@ -3101,12 +3604,11 @@ ppc_stub_name (const asection *input_section,
static struct ppc_stub_hash_entry *
ppc_get_stub_entry (const asection *input_section,
const asection *sym_sec,
- struct elf_link_hash_entry *hash,
+ struct ppc_link_hash_entry *h,
const Elf_Internal_Rela *rel,
struct ppc_link_hash_table *htab)
{
struct ppc_stub_hash_entry *stub_entry;
- struct ppc_link_hash_entry *h = (struct ppc_link_hash_entry *) hash;
const asection *id_sec;
/* If this input section is part of a group of sections sharing one
@@ -3185,9 +3687,8 @@ ppc_add_stub (const char *stub_name,
TRUE, FALSE);
if (stub_entry == NULL)
{
- (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
- bfd_archive_filename (section->owner),
- stub_name);
+ (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
+ section->owner, stub_name);
return NULL;
}
@@ -3210,25 +3711,37 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info)
/* Create .sfpr for code to save and restore fp regs. */
flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->sfpr = bfd_make_section_anyway (dynobj, ".sfpr");
+ htab->sfpr = bfd_make_section_anyway_with_flags (dynobj, ".sfpr",
+ flags);
if (htab->sfpr == NULL
- || ! bfd_set_section_flags (dynobj, htab->sfpr, flags)
|| ! bfd_set_section_alignment (dynobj, htab->sfpr, 2))
return FALSE;
/* Create .glink for lazy dynamic linking support. */
- htab->glink = bfd_make_section_anyway (dynobj, ".glink");
+ htab->glink = bfd_make_section_anyway_with_flags (dynobj, ".glink",
+ flags);
if (htab->glink == NULL
- || ! bfd_set_section_flags (dynobj, htab->glink, flags)
|| ! bfd_set_section_alignment (dynobj, htab->glink, 2))
return FALSE;
- /* Create .branch_lt for plt_branch stubs. */
- flags = (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->brlt = bfd_make_section_anyway (dynobj, ".branch_lt");
+ /* 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);
+ }
+
if (htab->brlt == NULL
- || ! bfd_set_section_flags (dynobj, htab->brlt, flags)
|| ! bfd_set_section_alignment (dynobj, htab->brlt, 3))
return FALSE;
@@ -3236,12 +3749,25 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info)
{
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->relbrlt = bfd_make_section_anyway (dynobj, ".rela.branch_lt");
- if (!htab->relbrlt
- || ! bfd_set_section_flags (dynobj, htab->relbrlt, flags)
- || ! bfd_set_section_alignment (dynobj, htab->relbrlt, 3))
- return FALSE;
+ 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
+ return TRUE;
+
+ if (!htab->relbrlt
+ || ! bfd_set_section_alignment (dynobj, htab->relbrlt, 3))
+ return FALSE;
+
return TRUE;
}
@@ -3268,15 +3794,14 @@ create_got_section (bfd *abfd, struct bfd_link_info *info)
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
| SEC_LINKER_CREATED);
- got = bfd_make_section_anyway (abfd, ".got");
+ got = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
if (!got
- || !bfd_set_section_flags (abfd, got, flags)
|| !bfd_set_section_alignment (abfd, got, 3))
return FALSE;
- relgot = bfd_make_section_anyway (abfd, ".rela.got");
+ relgot = bfd_make_section_anyway_with_flags (abfd, ".rela.got",
+ flags | SEC_READONLY);
if (!relgot
- || ! bfd_set_section_flags (abfd, relgot, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, relgot, 3))
return FALSE;
@@ -3311,16 +3836,49 @@ ppc64_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
return TRUE;
}
+/* Merge PLT info on FROM with that on TO. */
+
+static void
+move_plt_plist (struct ppc_link_hash_entry *from,
+ struct ppc_link_hash_entry *to)
+{
+ if (from->elf.plt.plist != NULL)
+ {
+ if (to->elf.plt.plist != NULL)
+ {
+ struct plt_entry **entp;
+ struct plt_entry *ent;
+
+ for (entp = &from->elf.plt.plist; (ent = *entp) != NULL; )
+ {
+ struct plt_entry *dent;
+
+ for (dent = to->elf.plt.plist; dent != NULL; dent = dent->next)
+ if (dent->addend == ent->addend)
+ {
+ dent->plt.refcount += ent->plt.refcount;
+ *entp = ent->next;
+ break;
+ }
+ if (dent == NULL)
+ entp = &ent->next;
+ }
+ *entp = to->elf.plt.plist;
+ }
+
+ to->elf.plt.plist = from->elf.plt.plist;
+ from->elf.plt.plist = NULL;
+ }
+}
+
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-ppc64_elf_copy_indirect_symbol
- (const struct elf_backend_data *bed ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *dir,
- struct elf_link_hash_entry *ind)
+ppc64_elf_copy_indirect_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
{
struct ppc_link_hash_entry *edir, *eind;
- flagword mask;
edir = (struct ppc_link_hash_entry *) dir;
eind = (struct ppc_link_hash_entry *) ind;
@@ -3333,10 +3891,7 @@ ppc64_elf_copy_indirect_symbol
struct ppc_dyn_relocs **pp;
struct ppc_dyn_relocs *p;
- if (eind->elf.root.type == bfd_link_hash_indirect)
- abort ();
-
- /* Add reloc counts against the weak sym to the strong sym
+ /* Add reloc counts against the indirect sym to the direct sym
list. Merge any entries against the same section. */
for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
{
@@ -3362,21 +3917,20 @@ ppc64_elf_copy_indirect_symbol
edir->is_func |= eind->is_func;
edir->is_func_descriptor |= eind->is_func_descriptor;
- edir->is_entry |= eind->is_entry;
edir->tls_mask |= eind->tls_mask;
- mask = (ELF_LINK_HASH_REF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK | ELF_LINK_NON_GOT_REF
- | ELF_LINK_HASH_NEEDS_PLT);
/* If called to transfer flags for a weakdef during processing
- of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
+ of elf_adjust_dynamic_symbol, don't copy NON_GOT_REF.
We clear it ourselves for ELIMINATE_COPY_RELOCS. */
- if (ELIMINATE_COPY_RELOCS
- && eind->elf.root.type != bfd_link_hash_indirect
- && (edir->elf.elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
- mask &= ~ELF_LINK_NON_GOT_REF;
+ if (!(ELIMINATE_COPY_RELOCS
+ && eind->elf.root.type != bfd_link_hash_indirect
+ && edir->elf.dynamic_adjusted))
+ edir->elf.non_got_ref |= eind->elf.non_got_ref;
- edir->elf.elf_link_hash_flags |= eind->elf.elf_link_hash_flags & mask;
+ edir->elf.ref_dynamic |= eind->elf.ref_dynamic;
+ edir->elf.ref_regular |= eind->elf.ref_regular;
+ edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
+ edir->elf.needs_plt |= eind->elf.needs_plt;
/* If we were called to copy over info for a weak sym, that's all. */
if (eind->elf.root.type != bfd_link_hash_indirect)
@@ -3415,83 +3969,262 @@ ppc64_elf_copy_indirect_symbol
}
/* And plt entries. */
- if (eind->elf.plt.plist != NULL)
- {
- if (edir->elf.plt.plist != NULL)
- {
- struct plt_entry **entp;
- struct plt_entry *ent;
-
- for (entp = &eind->elf.plt.plist; (ent = *entp) != NULL; )
- {
- struct plt_entry *dent;
+ move_plt_plist (eind, edir);
- for (dent = edir->elf.plt.plist; dent != NULL; dent = dent->next)
- if (dent->addend == ent->addend)
- {
- dent->plt.refcount += ent->plt.refcount;
- *entp = ent->next;
- break;
- }
- if (dent == NULL)
- entp = &ent->next;
- }
- *entp = edir->elf.plt.plist;
- }
-
- edir->elf.plt.plist = eind->elf.plt.plist;
- eind->elf.plt.plist = NULL;
- }
-
- if (edir->elf.dynindx == -1)
+ if (eind->elf.dynindx != -1)
{
+ if (edir->elf.dynindx != -1)
+ _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
+ edir->elf.dynstr_index);
edir->elf.dynindx = eind->elf.dynindx;
edir->elf.dynstr_index = eind->elf.dynstr_index;
eind->elf.dynindx = -1;
eind->elf.dynstr_index = 0;
}
- else
- BFD_ASSERT (eind->elf.dynindx == -1);
}
-/* Set a flag, used by ppc64_elf_gc_mark_hook, on the entry symbol and
- symbols undefined on the command-line. */
+/* Find the function descriptor hash entry from the given function code
+ hash entry FH. Link the entries via their OH fields. */
-bfd_boolean
-ppc64_elf_mark_entry_syms (struct bfd_link_info *info)
+static struct ppc_link_hash_entry *
+get_fdh (struct ppc_link_hash_entry *fh, struct ppc_link_hash_table *htab)
{
- struct ppc_link_hash_table *htab;
- struct bfd_sym_chain *sym;
+ struct ppc_link_hash_entry *fdh = fh->oh;
- htab = ppc_hash_table (info);
- for (sym = info->gc_sym_list; sym; sym = sym->next)
+ if (fdh == NULL)
{
- struct elf_link_hash_entry *h;
+ const char *fd_name = fh->elf.root.root.string + 1;
- h = elf_link_hash_lookup (&htab->elf, sym->name, FALSE, FALSE, FALSE);
- if (h != NULL)
- ((struct ppc_link_hash_entry *) h)->is_entry = 1;
+ fdh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, fd_name, FALSE, FALSE, FALSE);
+ if (fdh != NULL)
+ {
+ fdh->is_func_descriptor = 1;
+ fdh->oh = fh;
+ fh->is_func = 1;
+ fh->oh = fdh;
+ }
}
- return TRUE;
+
+ return fdh;
}
-/* Hack symbols defined in .opd sections to be function type. */
+/* Make a fake function descriptor sym for the code sym FH. */
+
+static struct ppc_link_hash_entry *
+make_fdh (struct bfd_link_info *info,
+ struct ppc_link_hash_entry *fh)
+{
+ bfd *abfd;
+ asymbol *newsym;
+ struct bfd_link_hash_entry *bh;
+ struct ppc_link_hash_entry *fdh;
+
+ abfd = fh->elf.root.u.undef.abfd;
+ newsym = bfd_make_empty_symbol (abfd);
+ newsym->name = fh->elf.root.root.string + 1;
+ newsym->section = bfd_und_section_ptr;
+ newsym->value = 0;
+ newsym->flags = BSF_WEAK;
+
+ bh = NULL;
+ if (!_bfd_generic_link_add_one_symbol (info, abfd, newsym->name,
+ newsym->flags, newsym->section,
+ newsym->value, NULL, FALSE, FALSE,
+ &bh))
+ return NULL;
+
+ fdh = (struct ppc_link_hash_entry *) bh;
+ fdh->elf.non_elf = 0;
+ fdh->fake = 1;
+ fdh->is_func_descriptor = 1;
+ fdh->oh = fh;
+ fh->is_func = 1;
+ fh->oh = fdh;
+ 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 ATTRIBUTE_UNUSED,
+ppc64_elf_add_symbol_hook (bfd *ibfd,
struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Sym *isym,
- const char **name ATTRIBUTE_UNUSED,
+ const char **name,
flagword *flags ATTRIBUTE_UNUSED,
asection **sec,
bfd_vma *value ATTRIBUTE_UNUSED)
{
- if (strcmp (bfd_get_section_name (ibfd, *sec), ".opd") == 0)
+ if (*sec != NULL
+ && 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;
+}
+
+/* This function makes an old ABI object reference to ".bar" cause the
+ inclusion of a new ABI object archive that defines "bar".
+ NAME is a symbol defined in an archive. Return a symbol in the hash
+ table that might be satisfied by the archive symbols. */
+
+static struct elf_link_hash_entry *
+ppc64_elf_archive_symbol_lookup (bfd *abfd,
+ struct bfd_link_info *info,
+ const char *name)
+{
+ struct elf_link_hash_entry *h;
+ char *dot_name;
+ size_t len;
+
+ h = _bfd_elf_archive_symbol_lookup (abfd, info, name);
+ if (h != NULL
+ /* Don't return this sym if it is a fake function descriptor
+ created by add_symbol_adjust. */
+ && !(h->root.type == bfd_link_hash_undefweak
+ && ((struct ppc_link_hash_entry *) h)->fake))
+ return h;
+
+ if (name[0] == '.')
+ return h;
+
+ len = strlen (name);
+ dot_name = bfd_alloc (abfd, len + 2);
+ if (dot_name == NULL)
+ return (struct elf_link_hash_entry *) 0 - 1;
+ dot_name[0] = '.';
+ memcpy (dot_name + 1, name, len + 1);
+ h = _bfd_elf_archive_symbol_lookup (abfd, info, dot_name);
+ bfd_release (abfd, dot_name);
+ return h;
+}
+
+/* This function satisfies all old ABI object references to ".bar" if a
+ new ABI object defines "bar". Well, at least, undefined dot symbols
+ are made weak. This stops later archive searches from including an
+ object if we already have a function descriptor definition. It also
+ prevents the linker complaining about undefined symbols.
+ We also check and correct mismatched symbol visibility here. The
+ 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)
+{
+ 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)
+ return TRUE;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (h->root.root.string[0] != '.')
+ return TRUE;
+
+ data = inf;
+ htab = ppc_hash_table (data->info);
+ eh = (struct ppc_link_hash_entry *) h;
+ fdh = get_fdh (eh, htab);
+ if (fdh == NULL
+ && !data->info->relocatable
+ && (eh->elf.root.type == bfd_link_hash_undefined
+ || eh->elf.root.type == bfd_link_hash_undefweak)
+ && eh->elf.ref_regular)
+ {
+ /* 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);
+ if (fdh == NULL)
+ data->ok = FALSE;
+ else
+ fdh->elf.ref_regular = 1;
+ }
+ else if (fdh != NULL)
+ {
+ unsigned entry_vis = ELF_ST_VISIBILITY (eh->elf.other) - 1;
+ unsigned descr_vis = ELF_ST_VISIBILITY (fdh->elf.other) - 1;
+ if (entry_vis < descr_vis)
+ fdh->elf.other += entry_vis - descr_vis;
+ else if (entry_vis > descr_vis)
+ eh->elf.other += descr_vis - entry_vis;
+
+ if ((fdh->elf.root.type == bfd_link_hash_defined
+ || fdh->elf.root.type == bfd_link_hash_defweak)
+ && eh->elf.root.type == bfd_link_hash_undefined)
+ {
+ eh->elf.root.type = bfd_link_hash_undefweak;
+ eh->was_undefined = 1;
+ htab->twiddled_syms = 1;
+ }
+ }
+
return TRUE;
}
static bfd_boolean
+ppc64_elf_check_directives (bfd *abfd, 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;
+
+ 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);
+
+ /* We need to fix the undefs list for any syms we have twiddled to
+ undef_weak. */
+ if (htab->twiddled_syms)
+ {
+ bfd_link_repair_undef_list (&htab->elf.root);
+ htab->twiddled_syms = 0;
+ }
+ return data.ok;
+}
+
+static bfd_boolean
update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
unsigned long r_symndx, bfd_vma r_addend, int tls_type)
{
@@ -3559,36 +4292,13 @@ update_plt_info (bfd *abfd, struct ppc_link_hash_entry *eh, bfd_vma addend)
eh->elf.plt.plist = ent;
}
ent->plt.refcount += 1;
- eh->elf.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- eh->is_func = 1;
+ eh->elf.needs_plt = 1;
+ if (eh->elf.root.root.string[0] == '.'
+ && eh->elf.root.root.string[1] != '\0')
+ eh->is_func = 1;
return TRUE;
}
-/* Find the function descriptor hash entry from the given function code
- hash entry FH. Link the entries via their OH fields. */
-static struct ppc_link_hash_entry *
-get_fdh (struct ppc_link_hash_entry *fh, struct ppc_link_hash_table *htab)
-{
- struct ppc_link_hash_entry *fdh = (struct ppc_link_hash_entry *) fh->oh;
-
- if (fdh == NULL)
- {
- const char *fd_name = fh->elf.root.root.string + 1;
-
- fdh = (struct ppc_link_hash_entry *)
- elf_link_hash_lookup (&htab->elf, fd_name, FALSE, FALSE, FALSE);
- if (fdh != NULL)
- {
- fdh->is_func_descriptor = 1;
- fdh->oh = &fh->elf;
- fh->is_func = 1;
- fh->oh = &fdh->elf;
- }
- }
-
- return fdh;
-}
-
/* Look through the relocs for a section during the first phase, and
calculate needed space in the global offset table, procedure
linkage table, and dynamic reloc sections. */
@@ -3644,7 +4354,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
};
bfd_size_type amt;
- amt = sec->_raw_size * sizeof (union opd_info) / 24;
+ amt = sec->size * sizeof (union opd_info) / 8;
opd_sym_map = bfd_zalloc (abfd, amt);
if (opd_sym_map == NULL)
return FALSE;
@@ -3667,7 +4377,12 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ {
+ 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;
+ }
r_type = ELF64_R_TYPE (rel->r_info);
switch (r_type)
@@ -3712,7 +4427,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_PPC64_GOT16_LO:
case R_PPC64_GOT16_LO_DS:
/* This symbol requires a global offset table entry. */
- sec->has_gp_reloc = 1;
+ sec->has_toc_reloc = 1;
if (ppc64_elf_tdata (abfd)->got == NULL
&& !create_got_section (abfd, info))
return FALSE;
@@ -3802,7 +4517,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_PPC64_TOC16_HA:
case R_PPC64_TOC16_DS:
case R_PPC64_TOC16_LO_DS:
- sec->has_gp_reloc = 1;
+ sec->has_toc_reloc = 1;
break;
/* This relocation describes the C++ object vtable hierarchy.
@@ -3822,27 +4537,51 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_PPC64_REL14:
case R_PPC64_REL14_BRTAKEN:
case R_PPC64_REL14_BRNTAKEN:
- htab->has_14bit_branch = 1;
+ {
+ asection *dest = NULL;
+
+ /* Heuristic: If jumping outside our section, chances are
+ we are going to need a stub. */
+ if (h != NULL)
+ {
+ /* If the sym is weak it may be overridden later, so
+ don't assume we know where a weak sym lives. */
+ if (h->root.type == bfd_link_hash_defined)
+ dest = h->root.u.def.section;
+ }
+ else
+ dest = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
+ sec, r_symndx);
+ if (dest != sec)
+ htab->has_14bit_branch = 1;
+ }
/* Fall through. */
case R_PPC64_REL24:
- if (h != NULL
- && h->root.root.string[0] == '.'
- && h->root.root.string[1] != 0)
+ if (h != NULL)
{
/* We may need a .plt entry if the function this reloc
refers to is in a shared lib. */
if (!update_plt_info (abfd, (struct ppc_link_hash_entry *) h,
rel->r_addend))
return FALSE;
- if (h == htab->tls_get_addr)
+ if (h == &htab->tls_get_addr->elf
+ || h == &htab->tls_get_addr_fd->elf)
sec->has_tls_reloc = 1;
- else if ((strncmp (h->root.root.string, ".__tls_get_addr", 15)
- == 0)
+ else if (htab->tls_get_addr == NULL
+ && !strncmp (h->root.root.string, ".__tls_get_addr", 15)
&& (h->root.root.string[15] == 0
|| h->root.root.string[15] == '@'))
{
- htab->tls_get_addr = h;
+ htab->tls_get_addr = (struct ppc_link_hash_entry *) h;
+ sec->has_tls_reloc = 1;
+ }
+ else if (htab->tls_get_addr_fd == NULL
+ && !strncmp (h->root.root.string, "__tls_get_addr", 14)
+ && (h->root.root.string[14] == 0
+ || h->root.root.string[14] == '@'))
+ {
+ htab->tls_get_addr_fd = (struct ppc_link_hash_entry *) h;
sec->has_tls_reloc = 1;
}
}
@@ -3888,7 +4627,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (ppc64_elf_section_data (sec)->t_symndx == NULL)
{
/* One extra to simplify get_tls_mask. */
- bfd_size_type amt = sec->_raw_size * sizeof (unsigned) / 8 + 1;
+ 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)
return FALSE;
@@ -3923,24 +4662,29 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_PPC64_ADDR64:
if (opd_sym_map != NULL
- && h != NULL
- && h->root.root.string[0] == '.'
- && h->root.root.string[1] != 0)
- get_fdh ((struct ppc_link_hash_entry *) h, htab);
-
- if (opd_sym_map != NULL
- && h == NULL
&& rel + 1 < rel_end
&& ELF64_R_TYPE ((rel + 1)->r_info) == R_PPC64_TOC)
{
- asection *s;
+ if (h != NULL)
+ {
+ if (h->root.root.string[0] == '.'
+ && h->root.root.string[1] != 0
+ && get_fdh ((struct ppc_link_hash_entry *) h, htab))
+ ;
+ else
+ ((struct ppc_link_hash_entry *) h)->is_func = 1;
+ }
+ else
+ {
+ asection *s;
- s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec,
- r_symndx);
- if (s == NULL)
- return FALSE;
- else if (s != sec)
- opd_sym_map[rel->r_offset / 24] = s;
+ s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec,
+ r_symndx);
+ if (s == NULL)
+ return FALSE;
+ else if (s != sec)
+ opd_sym_map[rel->r_offset / 8] = s;
+ }
}
/* Fall through. */
@@ -3968,7 +4712,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_PPC64_TOC:
if (h != NULL && !info->shared)
/* We may need a copy reloc. */
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 1;
/* Don't propagate .opd relocs. */
if (NO_OPD_RELOCS && opd_sym_map != NULL)
@@ -4001,14 +4745,12 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|| (h != NULL
&& (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& h != NULL
&& (h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ || !h->def_regular)))
{
struct ppc_dyn_relocs *p;
struct ppc_dyn_relocs **head;
@@ -4033,8 +4775,8 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
name + 5) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
}
@@ -4044,13 +4786,13 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
{
flagword flags;
- sreloc = bfd_make_section (dynobj, name);
flags = (SEC_HAS_CONTENTS | SEC_READONLY
- | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- if ((sec->flags & SEC_ALLOC) != 0)
- flags |= SEC_ALLOC | SEC_LOAD;
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED
+ | SEC_ALLOC | SEC_LOAD);
+ sreloc = bfd_make_section_with_flags (dynobj,
+ name,
+ flags);
if (sreloc == NULL
- || ! bfd_set_section_flags (dynobj, sreloc, flags)
|| ! bfd_set_section_alignment (dynobj, sreloc, 3))
return FALSE;
}
@@ -4070,13 +4812,15 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
easily. Oh well. */
asection *s;
+ void *vpp;
+
s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
sec, r_symndx);
if (s == NULL)
return FALSE;
- head = ((struct ppc_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ vpp = &elf_section_data (s)->local_dynrel;
+ head = (struct ppc_dyn_relocs **) vpp;
}
p = *head;
@@ -4106,22 +4850,235 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
return TRUE;
}
+/* OFFSET in OPD_SEC specifies a function descriptor. Return the address
+ of the code entry point, and its section. */
+
+static bfd_vma
+opd_entry_value (asection *opd_sec,
+ bfd_vma offset,
+ asection **code_sec,
+ bfd_vma *code_off)
+{
+ bfd *opd_bfd = opd_sec->owner;
+ Elf_Internal_Rela *relocs;
+ Elf_Internal_Rela *lo, *hi, *look;
+ bfd_vma val;
+
+ /* No relocs implies we are linking a --just-symbols object. */
+ if (opd_sec->reloc_count == 0)
+ {
+ bfd_vma val;
+
+ if (!bfd_get_section_contents (opd_bfd, opd_sec, &val, offset, 8))
+ return (bfd_vma) -1;
+
+ if (code_sec != NULL)
+ {
+ asection *sec, *likely = NULL;
+ for (sec = opd_bfd->sections; sec != NULL; sec = sec->next)
+ if (sec->vma <= val
+ && (sec->flags & SEC_LOAD) != 0
+ && (sec->flags & SEC_ALLOC) != 0)
+ likely = sec;
+ if (likely != NULL)
+ {
+ *code_sec = likely;
+ if (code_off != NULL)
+ *code_off = val - likely->vma;
+ }
+ }
+ return val;
+ }
+
+ relocs = ppc64_elf_tdata (opd_bfd)->opd_relocs;
+ if (relocs == NULL)
+ relocs = _bfd_elf_link_read_relocs (opd_bfd, opd_sec, NULL, NULL, TRUE);
+
+ /* Go find the opd reloc at the sym address. */
+ lo = relocs;
+ BFD_ASSERT (lo != NULL);
+ hi = lo + opd_sec->reloc_count - 1; /* ignore last reloc */
+ val = (bfd_vma) -1;
+ while (lo < hi)
+ {
+ look = lo + (hi - lo) / 2;
+ if (look->r_offset < offset)
+ lo = look + 1;
+ else if (look->r_offset > offset)
+ hi = look;
+ else
+ {
+ Elf_Internal_Shdr *symtab_hdr = &elf_tdata (opd_bfd)->symtab_hdr;
+ if (ELF64_R_TYPE (look->r_info) == R_PPC64_ADDR64
+ && ELF64_R_TYPE ((look + 1)->r_info) == R_PPC64_TOC)
+ {
+ unsigned long symndx = ELF64_R_SYM (look->r_info);
+ asection *sec;
+
+ if (symndx < symtab_hdr->sh_info)
+ {
+ Elf_Internal_Sym *sym;
+
+ sym = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (sym == NULL)
+ {
+ sym = bfd_elf_get_elf_syms (opd_bfd, symtab_hdr,
+ symtab_hdr->sh_info,
+ 0, NULL, NULL, NULL);
+ if (sym == NULL)
+ break;
+ symtab_hdr->contents = (bfd_byte *) sym;
+ }
+
+ sym += symndx;
+ val = sym->st_value;
+ sec = NULL;
+ if ((sym->st_shndx != SHN_UNDEF
+ && sym->st_shndx < SHN_LORESERVE)
+ || sym->st_shndx > SHN_HIRESERVE)
+ sec = bfd_section_from_elf_index (opd_bfd, sym->st_shndx);
+ BFD_ASSERT ((sec->flags & SEC_MERGE) == 0);
+ }
+ else
+ {
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry *rh;
+
+ sym_hashes = elf_sym_hashes (opd_bfd);
+ rh = sym_hashes[symndx - symtab_hdr->sh_info];
+ while (rh->root.type == bfd_link_hash_indirect
+ || rh->root.type == bfd_link_hash_warning)
+ rh = ((struct elf_link_hash_entry *) rh->root.u.i.link);
+ BFD_ASSERT (rh->root.type == bfd_link_hash_defined
+ || rh->root.type == bfd_link_hash_defweak);
+ val = rh->root.u.def.value;
+ sec = rh->root.u.def.section;
+ }
+ val += look->r_addend;
+ if (code_off != NULL)
+ *code_off = val;
+ if (code_sec != NULL)
+ *code_sec = sec;
+ if (sec != NULL && sec->output_section != NULL)
+ val += sec->output_section->vma + sec->output_offset;
+ }
+ break;
+ }
+ }
+
+ return val;
+}
+
+/* Mark sections containing dynamically referenced symbols. When
+ building shared libraries, we must assume that any visible symbol is
+ referenced. */
+
+static bfd_boolean
+ppc64_elf_gc_mark_dynamic_ref (struct elf_link_hash_entry *h, void *inf)
+{
+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) h;
+
+ if (eh->elf.root.type == bfd_link_hash_warning)
+ eh = (struct ppc_link_hash_entry *) eh->elf.root.u.i.link;
+
+ /* Dynamic linking info is on the func descriptor sym. */
+ if (eh->oh != NULL
+ && eh->oh->is_func_descriptor
+ && (eh->oh->elf.root.type == bfd_link_hash_defined
+ || eh->oh->elf.root.type == bfd_link_hash_defweak))
+ eh = eh->oh;
+
+ if ((eh->elf.root.type == bfd_link_hash_defined
+ || eh->elf.root.type == bfd_link_hash_defweak)
+ && (eh->elf.ref_dynamic
+ || (!info->executable
+ && eh->elf.def_regular
+ && ELF_ST_VISIBILITY (eh->elf.other) != STV_INTERNAL
+ && ELF_ST_VISIBILITY (eh->elf.other) != STV_HIDDEN)))
+ {
+ asection *code_sec;
+
+ eh->elf.root.u.def.section->flags |= SEC_KEEP;
+
+ /* Function descriptor syms cause the associated
+ function code sym section to be marked. */
+ if (eh->is_func_descriptor
+ && (eh->oh->elf.root.type == bfd_link_hash_defined
+ || eh->oh->elf.root.type == bfd_link_hash_defweak))
+ eh->oh->elf.root.u.def.section->flags |= SEC_KEEP;
+ else if (get_opd_info (eh->elf.root.u.def.section) != NULL
+ && opd_entry_value (eh->elf.root.u.def.section,
+ eh->elf.root.u.def.value,
+ &code_sec, NULL) != (bfd_vma) -1)
+ code_sec->flags |= SEC_KEEP;
+ }
+
+ return TRUE;
+}
+
/* Return the section that should be marked against GC for a given
relocation. */
static asection *
ppc64_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)
{
- asection *rsec = NULL;
+ asection *rsec;
+
+ /* First mark all our entry sym sections. */
+ if (info->gc_sym_list != NULL)
+ {
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ struct bfd_sym_chain *sym = info->gc_sym_list;
+
+ info->gc_sym_list = NULL;
+ for (; sym != NULL; sym = sym->next)
+ {
+ struct ppc_link_hash_entry *eh;
+
+ eh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, sym->name, FALSE, FALSE, FALSE);
+ if (eh == NULL)
+ continue;
+ if (eh->elf.root.type != bfd_link_hash_defined
+ && eh->elf.root.type != bfd_link_hash_defweak)
+ continue;
+
+ if (eh->is_func_descriptor
+ && (eh->oh->elf.root.type == bfd_link_hash_defined
+ || eh->oh->elf.root.type == bfd_link_hash_defweak))
+ rsec = eh->oh->elf.root.u.def.section;
+ else if (get_opd_info (eh->elf.root.u.def.section) != NULL
+ && opd_entry_value (eh->elf.root.u.def.section,
+ eh->elf.root.u.def.value,
+ &rsec, NULL) != (bfd_vma) -1)
+ ;
+ else
+ continue;
+
+ if (!rsec->gc_mark)
+ _bfd_elf_gc_mark (info, rsec, ppc64_elf_gc_mark_hook);
+
+ rsec = eh->elf.root.u.def.section;
+ if (!rsec->gc_mark)
+ _bfd_elf_gc_mark (info, rsec, ppc64_elf_gc_mark_hook);
+ }
+ }
+
+ /* Syms return NULL if we're marking .opd, so we avoid marking all
+ function sections, as all functions are referenced in .opd. */
+ rsec = NULL;
+ if (get_opd_info (sec) != NULL)
+ return rsec;
if (h != NULL)
{
enum elf_ppc64_reloc_type r_type;
- struct ppc_link_hash_entry *fdh;
+ struct ppc_link_hash_entry *eh;
r_type = ELF64_R_TYPE (rel->r_info);
switch (r_type)
@@ -4135,20 +5092,36 @@ ppc64_elf_gc_mark_hook (asection *sec,
{
case bfd_link_hash_defined:
case bfd_link_hash_defweak:
- fdh = (struct ppc_link_hash_entry *) h;
+ eh = (struct ppc_link_hash_entry *) h;
+ if (eh->oh != NULL
+ && eh->oh->is_func_descriptor
+ && (eh->oh->elf.root.type == bfd_link_hash_defined
+ || eh->oh->elf.root.type == bfd_link_hash_defweak))
+ eh = eh->oh;
/* Function descriptor syms cause the associated
function code sym section to be marked. */
- if (fdh->is_func_descriptor)
- rsec = fdh->oh->root.u.def.section;
-
- /* Function entry syms return NULL if they are in .opd
- and are not ._start (or others undefined on the ld
- command line). Thus we avoid marking all function
- sections, as all functions are referenced in .opd. */
- else if ((fdh->oh != NULL
- && ((struct ppc_link_hash_entry *) fdh->oh)->is_entry)
- || ppc64_elf_section_data (sec)->opd.func_sec == NULL)
+ if (eh->is_func_descriptor
+ && (eh->oh->elf.root.type == bfd_link_hash_defined
+ || eh->oh->elf.root.type == bfd_link_hash_defweak))
+ {
+ /* They also mark their opd section. */
+ if (!eh->elf.root.u.def.section->gc_mark)
+ _bfd_elf_gc_mark (info, eh->elf.root.u.def.section,
+ ppc64_elf_gc_mark_hook);
+
+ rsec = eh->oh->elf.root.u.def.section;
+ }
+ else if (get_opd_info (eh->elf.root.u.def.section) != NULL
+ && opd_entry_value (eh->elf.root.u.def.section,
+ eh->elf.root.u.def.value,
+ &rsec, NULL) != (bfd_vma) -1)
+ {
+ if (!eh->elf.root.u.def.section->gc_mark)
+ _bfd_elf_gc_mark (info, eh->elf.root.u.def.section,
+ ppc64_elf_gc_mark_hook);
+ }
+ else
rsec = h->root.u.def.section;
break;
@@ -4166,11 +5139,14 @@ ppc64_elf_gc_mark_hook (asection *sec,
asection **opd_sym_section;
rsec = bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- opd_sym_section = ppc64_elf_section_data (rsec)->opd.func_sec;
+ opd_sym_section = get_opd_info (rsec);
if (opd_sym_section != NULL)
- rsec = opd_sym_section[sym->st_value / 24];
- else if (ppc64_elf_section_data (sec)->opd.func_sec != NULL)
- rsec = NULL;
+ {
+ if (!rsec->gc_mark)
+ _bfd_elf_gc_mark (info, rsec, ppc64_elf_gc_mark_hook);
+
+ rsec = opd_sym_section[(sym->st_value + rel->r_addend) / 8];
+ }
}
return rsec;
@@ -4216,6 +5192,9 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
struct ppc_dyn_relocs *p;
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;
eh = (struct ppc_link_hash_entry *) h;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
@@ -4315,9 +5294,235 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
return TRUE;
}
+/* The maximum size of .sfpr. */
+#define SFPR_MAX (218*4)
+
+struct sfpr_def_parms
+{
+ const char name[12];
+ unsigned char lo, hi;
+ bfd_byte * (*write_ent) (bfd *, bfd_byte *, int);
+ bfd_byte * (*write_tail) (bfd *, bfd_byte *, int);
+};
+
+/* Auto-generate _save*, _rest* functions in .sfpr. */
+
+static unsigned int
+sfpr_define (struct bfd_link_info *info, const struct sfpr_def_parms *parm)
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ unsigned int i;
+ size_t len = strlen (parm->name);
+ bfd_boolean writing = FALSE;
+ char sym[16];
+
+ memcpy (sym, parm->name, len);
+ sym[len + 2] = 0;
+
+ for (i = parm->lo; i <= parm->hi; i++)
+ {
+ struct elf_link_hash_entry *h;
+
+ sym[len + 0] = i / 10 + '0';
+ sym[len + 1] = i % 10 + '0';
+ h = elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE);
+ if (h != NULL
+ && !h->def_regular)
+ {
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = htab->sfpr;
+ h->root.u.def.value = htab->sfpr->size;
+ h->type = STT_FUNC;
+ h->def_regular = 1;
+ _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
+ writing = TRUE;
+ if (htab->sfpr->contents == NULL)
+ {
+ htab->sfpr->contents = bfd_alloc (htab->elf.dynobj, SFPR_MAX);
+ if (htab->sfpr->contents == NULL)
+ return FALSE;
+ }
+ }
+ if (writing)
+ {
+ bfd_byte *p = htab->sfpr->contents + htab->sfpr->size;
+ if (i != parm->hi)
+ p = (*parm->write_ent) (htab->elf.dynobj, p, i);
+ else
+ p = (*parm->write_tail) (htab->elf.dynobj, p, i);
+ htab->sfpr->size = p - htab->sfpr->contents;
+ }
+ }
+
+ return TRUE;
+}
+
+static bfd_byte *
+savegpr0 (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, STD_R0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savegpr0_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savegpr0 (abfd, p, r);
+ bfd_put_32 (abfd, STD_R0_0R1 + 16, p);
+ p = p + 4;
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restgpr0 (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LD_R0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restgpr0_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LD_R0_0R1 + 16, p);
+ p = p + 4;
+ p = restgpr0 (abfd, p, r);
+ bfd_put_32 (abfd, MTLR_R0, p);
+ p = p + 4;
+ if (r == 29)
+ {
+ p = restgpr0 (abfd, p, 30);
+ p = restgpr0 (abfd, p, 31);
+ }
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savegpr1 (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, STD_R0_0R12 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savegpr1_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savegpr1 (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restgpr1 (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LD_R0_0R12 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restgpr1_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = restgpr1 (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savefpr (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, STFD_FR0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savefpr0_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savefpr (abfd, p, r);
+ bfd_put_32 (abfd, STD_R0_0R1 + 16, p);
+ p = p + 4;
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restfpr (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LFD_FR0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restfpr0_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LD_R0_0R1 + 16, p);
+ p = p + 4;
+ p = restfpr (abfd, p, r);
+ bfd_put_32 (abfd, MTLR_R0, p);
+ p = p + 4;
+ if (r == 29)
+ {
+ p = restfpr (abfd, p, 30);
+ p = restfpr (abfd, p, 31);
+ }
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savefpr1_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savefpr (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restfpr1_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = restfpr (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+savevr (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LI_R12_0 + (1 << 16) - (32 - r) * 16, p);
+ p = p + 4;
+ bfd_put_32 (abfd, STVX_VR0_R12_R0 + (r << 21), p);
+ return p + 4;
+}
+
+static bfd_byte *
+savevr_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = savevr (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
+static bfd_byte *
+restvr (bfd *abfd, bfd_byte *p, int r)
+{
+ bfd_put_32 (abfd, LI_R12_0 + (1 << 16) - (32 - r) * 16, p);
+ p = p + 4;
+ bfd_put_32 (abfd, LVX_VR0_R12_R0 + (r << 21), p);
+ return p + 4;
+}
+
+static bfd_byte *
+restvr_tail (bfd *abfd, bfd_byte *p, int r)
+{
+ p = restvr (abfd, p, r);
+ bfd_put_32 (abfd, BLR, p);
+ return p + 4;
+}
+
/* Called via elf_link_hash_traverse to transfer dynamic linking
information on function code symbol entries to their corresponding
function descriptor symbol entries. */
+
static bfd_boolean
func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
{
@@ -4338,15 +5543,29 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
info = inf;
htab = ppc_hash_table (info);
+ /* Resolve undefined references to dot-symbols as the value
+ in the function descriptor, if we have one in a regular object.
+ This is to satisfy cases like ".quad .foo". Calls to functions
+ in dynamic objects are handled elsewhere. */
+ if (fh->elf.root.type == bfd_link_hash_undefweak
+ && fh->was_undefined
+ && (fh->oh->elf.root.type == bfd_link_hash_defined
+ || fh->oh->elf.root.type == bfd_link_hash_defweak)
+ && get_opd_info (fh->oh->elf.root.u.def.section) != NULL
+ && opd_entry_value (fh->oh->elf.root.u.def.section,
+ fh->oh->elf.root.u.def.value,
+ &fh->elf.root.u.def.section,
+ &fh->elf.root.u.def.value) != (bfd_vma) -1)
+ {
+ fh->elf.root.type = fh->oh->elf.root.type;
+ fh->elf.forced_local = 1;
+ }
+
/* If this is a function code symbol, transfer dynamic linking
information to the function descriptor symbol. */
if (!fh->is_func)
return TRUE;
- if (fh->elf.root.type == bfd_link_hash_undefweak
- && (fh->elf.elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR))
- htab->have_undefweak = TRUE;
-
for (ent = fh->elf.plt.plist; ent != NULL; ent = ent->next)
if (ent->plt.refcount > 0)
break;
@@ -4369,56 +5588,56 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
&& (fh->elf.root.type == bfd_link_hash_undefined
|| fh->elf.root.type == bfd_link_hash_undefweak))
{
- bfd *abfd;
- asymbol *newsym;
- struct bfd_link_hash_entry *bh;
-
- abfd = fh->elf.root.u.undef.abfd;
- newsym = bfd_make_empty_symbol (abfd);
- newsym->name = fh->elf.root.root.string + 1;
- newsym->section = bfd_und_section_ptr;
- newsym->value = 0;
- newsym->flags = BSF_OBJECT;
- if (fh->elf.root.type == bfd_link_hash_undefweak)
- newsym->flags |= BSF_WEAK;
-
- bh = &fdh->elf.root;
- if ( !(_bfd_generic_link_add_one_symbol
- (info, abfd, newsym->name, newsym->flags,
- newsym->section, newsym->value, NULL, FALSE, FALSE, &bh)))
+ fdh = make_fdh (info, fh);
+ if (fdh == NULL)
+ return FALSE;
+ }
+
+ /* Fake function descriptors are made undefweak. If the function
+ code symbol is strong undefined, make the fake sym the same.
+ If the function code symbol is defined, then force the fake
+ descriptor local; We can't support overriding of symbols in a
+ shared library on a fake descriptor. */
+
+ if (fdh != NULL
+ && fdh->fake
+ && fdh->elf.root.type == bfd_link_hash_undefweak)
+ {
+ if (fh->elf.root.type == bfd_link_hash_undefined)
{
- return FALSE;
+ fdh->elf.root.type = bfd_link_hash_undefined;
+ bfd_link_add_undef (&htab->elf.root, &fdh->elf.root);
+ }
+ else if (fh->elf.root.type == bfd_link_hash_defined
+ || fh->elf.root.type == bfd_link_hash_defweak)
+ {
+ _bfd_elf_link_hash_hide_symbol (info, &fdh->elf, TRUE);
}
- fdh = (struct ppc_link_hash_entry *) bh;
- fdh->elf.elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
- fdh->elf.size = 24;
- fdh->elf.type = STT_OBJECT;
}
if (fdh != NULL
- && (fdh->elf.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0
+ && !fdh->elf.forced_local
&& (info->shared
- || (fdh->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- || (fdh->elf.elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
+ || fdh->elf.def_dynamic
+ || fdh->elf.ref_dynamic
|| (fdh->elf.root.type == bfd_link_hash_undefweak
&& ELF_ST_VISIBILITY (fdh->elf.other) == STV_DEFAULT)))
{
if (fdh->elf.dynindx == -1)
if (! bfd_elf_link_record_dynamic_symbol (info, &fdh->elf))
return FALSE;
- fdh->elf.elf_link_hash_flags
- |= (fh->elf.elf_link_hash_flags & (ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_NON_GOT_REF));
+ fdh->elf.ref_regular |= fh->elf.ref_regular;
+ fdh->elf.ref_dynamic |= fh->elf.ref_dynamic;
+ fdh->elf.ref_regular_nonweak |= fh->elf.ref_regular_nonweak;
+ fdh->elf.non_got_ref |= fh->elf.non_got_ref;
if (ELF_ST_VISIBILITY (fh->elf.other) == STV_DEFAULT)
{
- fdh->elf.plt.plist = fh->elf.plt.plist;
- fdh->elf.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ move_plt_plist (fh, fdh);
+ fdh->elf.needs_plt = 1;
}
fdh->is_func_descriptor = 1;
- fdh->oh = &fh->elf;
- fh->oh = &fdh->elf;
+ fdh->oh = fh;
+ fh->oh = fdh;
}
/* Now that the info is on the function descriptor, clear the
@@ -4428,130 +5647,57 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
been imported from another library. Function code syms that
are really in the library we must leave global to prevent the
linker dragging in a definition from a static library. */
- force_local
- = (info->shared
- && ((fh->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- || fdh == NULL
- || (fdh->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- || (fdh->elf.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0));
+ force_local = (!fh->elf.def_regular
+ || fdh == NULL
+ || !fdh->elf.def_regular
+ || fdh->elf.forced_local);
_bfd_elf_link_hash_hide_symbol (info, &fh->elf, force_local);
return TRUE;
}
-#define MIN_SAVE_FPR 14
-#define MAX_SAVE_FPR 31
-
/* Called near the start of bfd_elf_size_dynamic_sections. We use
this hook to a) provide some gcc support functions, and b) transfer
dynamic linking information gathered so far on function code symbol
entries, to their corresponding function descriptor symbol entries. */
+
static bfd_boolean
ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
- unsigned int lowest_savef = MAX_SAVE_FPR + 2;
- unsigned int lowest_restf = MAX_SAVE_FPR + 2;
unsigned int i;
- struct elf_link_hash_entry *h;
- bfd_byte *p;
- char sym[10];
+ const struct sfpr_def_parms funcs[] =
+ {
+ { "_savegpr0_", 14, 31, savegpr0, savegpr0_tail },
+ { "_restgpr0_", 14, 29, restgpr0, restgpr0_tail },
+ { "_restgpr0_", 30, 31, restgpr0, restgpr0_tail },
+ { "_savegpr1_", 14, 31, savegpr1, savegpr1_tail },
+ { "_restgpr1_", 14, 31, restgpr1, restgpr1_tail },
+ { "_savefpr_", 14, 31, savefpr, savefpr0_tail },
+ { "_restfpr_", 14, 29, restfpr, restfpr0_tail },
+ { "_restfpr_", 30, 31, restfpr, restfpr0_tail },
+ { "._savef", 14, 31, savefpr, savefpr1_tail },
+ { "._restf", 14, 31, restfpr, restfpr1_tail },
+ { "_savevr_", 20, 31, savevr, savevr_tail },
+ { "_restvr_", 20, 31, restvr, restvr_tail }
+ };
htab = ppc_hash_table (info);
-
if (htab->sfpr == NULL)
/* We don't have any relocs. */
return TRUE;
- /* First provide any missing ._savef* and ._restf* functions. */
- memcpy (sym, "._savef14", 10);
- for (i = MIN_SAVE_FPR; i <= MAX_SAVE_FPR; i++)
- {
- sym[7] = i / 10 + '0';
- sym[8] = i % 10 + '0';
- h = elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE);
- if (h != NULL
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- if (lowest_savef > i)
- lowest_savef = i;
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = htab->sfpr;
- h->root.u.def.value = (i - lowest_savef) * 4;
- h->type = STT_FUNC;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
- }
- }
-
- memcpy (sym, "._restf14", 10);
- for (i = MIN_SAVE_FPR; i <= MAX_SAVE_FPR; i++)
- {
- sym[7] = i / 10 + '0';
- sym[8] = i % 10 + '0';
- h = elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE);
- if (h != NULL
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- if (lowest_restf > i)
- lowest_restf = i;
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = htab->sfpr;
- h->root.u.def.value = ((MAX_SAVE_FPR + 2 - lowest_savef) * 4
- + (i - lowest_restf) * 4);
- h->type = STT_FUNC;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
- }
- }
+ /* Provide any missing _save* and _rest* functions. */
+ htab->sfpr->size = 0;
+ for (i = 0; i < sizeof (funcs) / sizeof (funcs[0]); i++)
+ if (!sfpr_define (info, &funcs[i]))
+ return FALSE;
elf_link_hash_traverse (&htab->elf, func_desc_adjust, info);
- htab->sfpr->_raw_size = ((MAX_SAVE_FPR + 2 - lowest_savef) * 4
- + (MAX_SAVE_FPR + 2 - lowest_restf) * 4);
-
- if (htab->sfpr->_raw_size == 0)
- {
- if (!htab->have_undefweak)
- {
- _bfd_strip_section_from_output (info, htab->sfpr);
- return TRUE;
- }
-
- htab->sfpr->_raw_size = 4;
- }
-
- p = bfd_alloc (htab->elf.dynobj, htab->sfpr->_raw_size);
- if (p == NULL)
- return FALSE;
- htab->sfpr->contents = p;
-
- for (i = lowest_savef; i <= MAX_SAVE_FPR; i++)
- {
- unsigned int fpr = i << 21;
- unsigned int stackoff = (1 << 16) - (MAX_SAVE_FPR + 1 - i) * 8;
- bfd_put_32 (htab->elf.dynobj, STFD_FR0_0R1 + fpr + stackoff, p);
- p += 4;
- }
- if (lowest_savef <= MAX_SAVE_FPR)
- {
- bfd_put_32 (htab->elf.dynobj, BLR, p);
- p += 4;
- }
-
- for (i = lowest_restf; i <= MAX_SAVE_FPR; i++)
- {
- unsigned int fpr = i << 21;
- unsigned int stackoff = (1 << 16) - (MAX_SAVE_FPR + 1 - i) * 8;
- bfd_put_32 (htab->elf.dynobj, LFD_FR0_0R1 + fpr + stackoff, p);
- p += 4;
- }
- if (lowest_restf <= MAX_SAVE_FPR
- || htab->sfpr->_raw_size == 4)
- {
- bfd_put_32 (htab->elf.dynobj, BLR, p);
- }
+ if (htab->sfpr->size == 0)
+ htab->sfpr->flags |= SEC_EXCLUDE;
return TRUE;
}
@@ -4574,7 +5720,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Deal with function syms. */
if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ || h->needs_plt)
{
/* Clear procedure linkage table information for any symbol that
won't need a .plt entry. */
@@ -4582,14 +5728,13 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
for (ent = h->plt.plist; ent != NULL; ent = ent->next)
if (ent->plt.refcount > 0)
break;
- if (!((struct ppc_link_hash_entry *) h)->is_func_descriptor
- || ent == NULL
+ if (ent == NULL
|| SYMBOL_CALLS_LOCAL (info, h)
|| (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
&& h->root.type == bfd_link_hash_undefweak))
{
h->plt.plist = NULL;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
}
}
else
@@ -4598,16 +5743,14 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
+ if (h->u.weakdef != NULL)
{
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
+ 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;
if (ELIMINATE_COPY_RELOCS)
- h->elf_link_hash_flags
- = ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
- | (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
+ h->non_got_ref = h->u.weakdef->non_got_ref;
return TRUE;
}
@@ -4620,7 +5763,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If there are no references to this symbol that do not use the
GOT, we don't need to generate a copy reloc. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
+ if (!h->non_got_ref)
return TRUE;
if (ELIMINATE_COPY_RELOCS)
@@ -4640,7 +5783,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
we'll be keeping the dynamic relocs and avoiding the copy reloc. */
if (p == NULL)
{
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 0;
return TRUE;
}
}
@@ -4661,6 +5804,13 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* This is a reference to a symbol defined by a dynamic object which
is not a function. */
+ if (h->size == 0)
+ {
+ (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+ h->root.root.string);
+ return TRUE;
+ }
+
/* We must allocate the symbol in our .dynbss section, which will
become part of the .bss section of the executable. There will be
an entry for this symbol in the .dynsym section. The dynamic
@@ -4677,8 +5827,8 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
.rela.bss section we are going to use. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->relbss->_raw_size += sizeof (Elf64_External_Rela);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ htab->relbss->size += sizeof (Elf64_External_Rela);
+ h->needs_copy = 1;
}
/* We need to figure out the alignment required for this symbol. I
@@ -4689,7 +5839,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Apply the required alignment. */
s = htab->dynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ 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))
@@ -4698,10 +5848,10 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -4713,11 +5863,13 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *h,
bfd_boolean force_local)
{
+ struct ppc_link_hash_entry *eh;
_bfd_elf_link_hash_hide_symbol (info, h, force_local);
- if (((struct ppc_link_hash_entry *) h)->is_func_descriptor)
+ eh = (struct ppc_link_hash_entry *) h;
+ if (eh->is_func_descriptor)
{
- struct elf_link_hash_entry *fh = ((struct ppc_link_hash_entry *) h)->oh;
+ struct ppc_link_hash_entry *fh = eh->oh;
if (fh == NULL)
{
@@ -4731,14 +5883,15 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
when it runs out of memory. This function doesn't have a
return status, so there's no way to gracefully return an
error. So cheat. We know that string[-1] can be safely
- dereferenced; It's either a string in an ELF string
- table, or allocated in an objalloc structure. */
+ accessed; It's either a string in an ELF string table,
+ or allocated in an objalloc structure. */
- p = h->root.root.string - 1;
+ p = eh->elf.root.root.string - 1;
save = *p;
*(char *) p = '.';
htab = ppc_hash_table (info);
- fh = elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
+ fh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
*(char *) p = save;
/* Unfortunately, if it so happens that the string we were
@@ -4747,27 +5900,32 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info,
reason the lookup should fail. */
if (fh == NULL)
{
- q = h->root.root.string + strlen (h->root.root.string);
- while (q >= h->root.root.string && *q == *p)
+ q = eh->elf.root.root.string + strlen (eh->elf.root.root.string);
+ while (q >= eh->elf.root.root.string && *q == *p)
--q, --p;
- if (q < h->root.root.string && *p == '.')
- fh = elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
+ if (q < eh->elf.root.root.string && *p == '.')
+ fh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, p, FALSE, FALSE, FALSE);
}
if (fh != NULL)
{
- ((struct ppc_link_hash_entry *) h)->oh = fh;
- ((struct ppc_link_hash_entry *) fh)->oh = h;
+ eh->oh = fh;
+ fh->oh = eh;
}
}
if (fh != NULL)
- _bfd_elf_link_hash_hide_symbol (info, fh, force_local);
+ _bfd_elf_link_hash_hide_symbol (info, &fh->elf, force_local);
}
}
static bfd_boolean
-get_sym_h (struct elf_link_hash_entry **hp, Elf_Internal_Sym **symp,
- asection **symsecp, char **tls_maskp, Elf_Internal_Sym **locsymsp,
- unsigned long r_symndx, bfd *ibfd)
+get_sym_h (struct elf_link_hash_entry **hp,
+ Elf_Internal_Sym **symp,
+ asection **symsecp,
+ char **tls_maskp,
+ Elf_Internal_Sym **locsymsp,
+ unsigned long r_symndx,
+ bfd *ibfd)
{
Elf_Internal_Shdr *symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
@@ -4900,15 +6058,14 @@ get_tls_mask (char **tls_maskp, unsigned long *toc_symndx,
if ((h == NULL
|| ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
- && !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)))
+ && !h->def_dynamic))
&& (next_r == -1 || next_r == -2))
return 1 - next_r;
return 1;
}
/* Adjust all global syms defined in opd sections. In gcc generated
- code these will already have been done, but I suppose we have to
- cater for all sorts of hand written assembly. */
+ code for the old ABI, these will already have been done. */
static bfd_boolean
adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
@@ -4932,16 +6089,167 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
return TRUE;
sym_sec = eh->elf.root.u.def.section;
- if (sym_sec != NULL
- && elf_section_data (sym_sec) != NULL
- && (opd_adjust = ppc64_elf_section_data (sym_sec)->opd.adjust) != NULL)
+ opd_adjust = get_opd_info (sym_sec);
+ if (opd_adjust != NULL)
{
- eh->elf.root.u.def.value += opd_adjust[eh->elf.root.u.def.value / 24];
+ long adjust = opd_adjust[eh->elf.root.u.def.value / 8];
+ if (adjust == -1)
+ {
+ /* This entry has been deleted. */
+ asection *dsec = ppc64_elf_tdata (sym_sec->owner)->u.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;
+ break;
+ }
+ }
+ eh->elf.root.u.def.value = 0;
+ eh->elf.root.u.def.section = dsec;
+ }
+ else
+ eh->elf.root.u.def.value += adjust;
eh->adjust_done = 1;
}
return TRUE;
}
+/* Handles decrementing dynamic reloc counts for the reloc specified by
+ R_INFO in section SEC. If LOCAL_SYMS is NULL, then H and SYM_SEC
+ have already been determined. */
+
+static bfd_boolean
+dec_dynrel_count (bfd_vma r_info,
+ asection *sec,
+ struct bfd_link_info *info,
+ Elf_Internal_Sym **local_syms,
+ struct elf_link_hash_entry *h,
+ asection *sym_sec)
+{
+ enum elf_ppc64_reloc_type r_type;
+ struct ppc_dyn_relocs *p;
+ struct ppc_dyn_relocs **pp;
+
+ /* Can this reloc be dynamic? This switch, and later tests here
+ should be kept in sync with the code in check_relocs. */
+ r_type = ELF64_R_TYPE (r_info);
+ switch (r_type)
+ {
+ default:
+ return TRUE;
+
+ case R_PPC64_TPREL16:
+ case R_PPC64_TPREL16_LO:
+ case R_PPC64_TPREL16_HI:
+ case R_PPC64_TPREL16_HA:
+ case R_PPC64_TPREL16_DS:
+ case R_PPC64_TPREL16_LO_DS:
+ case R_PPC64_TPREL16_HIGHER:
+ case R_PPC64_TPREL16_HIGHERA:
+ case R_PPC64_TPREL16_HIGHEST:
+ case R_PPC64_TPREL16_HIGHESTA:
+ if (!info->shared)
+ return TRUE;
+
+ case R_PPC64_TPREL64:
+ case R_PPC64_DTPMOD64:
+ case R_PPC64_DTPREL64:
+ case R_PPC64_ADDR64:
+ case R_PPC64_REL30:
+ case R_PPC64_REL32:
+ case R_PPC64_REL64:
+ case R_PPC64_ADDR14:
+ case R_PPC64_ADDR14_BRNTAKEN:
+ case R_PPC64_ADDR14_BRTAKEN:
+ case R_PPC64_ADDR16:
+ case R_PPC64_ADDR16_DS:
+ case R_PPC64_ADDR16_HA:
+ case R_PPC64_ADDR16_HI:
+ case R_PPC64_ADDR16_HIGHER:
+ case R_PPC64_ADDR16_HIGHERA:
+ case R_PPC64_ADDR16_HIGHEST:
+ case R_PPC64_ADDR16_HIGHESTA:
+ case R_PPC64_ADDR16_LO:
+ case R_PPC64_ADDR16_LO_DS:
+ case R_PPC64_ADDR24:
+ case R_PPC64_ADDR32:
+ case R_PPC64_UADDR16:
+ case R_PPC64_UADDR32:
+ case R_PPC64_UADDR64:
+ case R_PPC64_TOC:
+ break;
+ }
+
+ if (local_syms != NULL)
+ {
+ unsigned long r_symndx;
+ Elf_Internal_Sym *sym;
+ bfd *ibfd = sec->owner;
+
+ r_symndx = ELF64_R_SYM (r_info);
+ if (!get_sym_h (&h, &sym, &sym_sec, NULL, local_syms, r_symndx, ibfd))
+ return FALSE;
+ }
+
+ if ((info->shared
+ && (MUST_BE_DYN_RELOC (r_type)
+ || (h != NULL
+ && (!info->symbolic
+ || h->root.type == bfd_link_hash_defweak
+ || !h->def_regular))))
+ || (ELIMINATE_COPY_RELOCS
+ && !info->shared
+ && h != NULL
+ && (h->root.type == bfd_link_hash_defweak
+ || !h->def_regular)))
+ ;
+ else
+ return TRUE;
+
+ if (h != NULL)
+ pp = &((struct ppc_link_hash_entry *) h)->dyn_relocs;
+ else
+ {
+ if (sym_sec != NULL)
+ {
+ void *vpp = &elf_section_data (sym_sec)->local_dynrel;
+ pp = (struct ppc_dyn_relocs **) vpp;
+ }
+ else
+ {
+ void *vpp = &elf_section_data (sec)->local_dynrel;
+ pp = (struct ppc_dyn_relocs **) vpp;
+ }
+
+ /* elf_gc_sweep may have already removed all dyn relocs associated
+ with local syms for a given section. Don't report a dynreloc
+ miscount. */
+ if (*pp == NULL)
+ return TRUE;
+ }
+
+ while ((p = *pp) != NULL)
+ {
+ if (p->sec == sec)
+ {
+ if (!MUST_BE_DYN_RELOC (r_type))
+ p->pc_count -= 1;
+ p->count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ return TRUE;
+ }
+ pp = &p->next;
+ }
+
+ (*_bfd_error_handler) (_("dynreloc miscount for %B, section %A"),
+ sec->owner, sec);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+}
+
/* Remove unused Official Procedure Descriptor entries. Currently we
only remove those associated with functions in discarded link-once
sections, or weakly defined functions that have been overridden. It
@@ -4949,10 +6257,13 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
applications. */
bfd_boolean
-ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
+ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
+ bfd_boolean no_opd_opt,
+ bfd_boolean non_overlapping)
{
bfd *ibfd;
bfd_boolean some_edited = FALSE;
+ asection *need_pad = NULL;
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
{
@@ -4963,23 +6274,32 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
struct elf_link_hash_entry **sym_hashes;
bfd_vma offset;
bfd_size_type amt;
- long *adjust;
- bfd_boolean need_edit;
+ long *opd_adjust;
+ bfd_boolean need_edit, add_aux_fields;
+ bfd_size_type cnt_16b = 0;
sec = bfd_get_section_by_name (ibfd, ".opd");
- if (sec == NULL)
+ if (sec == NULL || sec->size == 0)
continue;
- amt = sec->_raw_size * sizeof (long) / 24;
- adjust = ppc64_elf_section_data (sec)->opd.adjust;
- if (adjust == NULL)
+ amt = sec->size * sizeof (long) / 8;
+ opd_adjust = get_opd_info (sec);
+ if (opd_adjust == NULL)
{
- /* Must be a ld -r link. ie. check_relocs hasn't been
- called. */
- adjust = bfd_zalloc (obfd, amt);
- ppc64_elf_section_data (sec)->opd.adjust = adjust;
+ /* check_relocs hasn't been called. Must be a ld -r link
+ or --just-symbols object. */
+ opd_adjust = bfd_alloc (obfd, amt);
+ if (opd_adjust == NULL)
+ return FALSE;
+ ppc64_elf_section_data (sec)->opd.adjust = opd_adjust;
}
- memset (adjust, 0, amt);
+ memset (opd_adjust, 0, amt);
+
+ if (no_opd_opt)
+ continue;
+
+ if (sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
+ continue;
if (sec->output_section == bfd_abs_section_ptr)
continue;
@@ -5001,6 +6321,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
/* First run through the relocs to check they are sane, and to
determine whether we need to edit this opd section. */
need_edit = FALSE;
+ need_pad = sec;
offset = 0;
relend = relstart + sec->reloc_count;
for (rel = relstart; rel < relend; )
@@ -5011,7 +6332,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym;
- /* .opd contains a regular array of 24 byte entries. We're
+ /* .opd contains a regular array of 16 or 24 byte entries. We're
only interested in the reloc pointing to a function entry
point. */
if (rel->r_offset != offset
@@ -5023,9 +6344,9 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
Also, there's nothing to prevent someone putting
something silly in .opd with the assembler. No .opd
optimization for them! */
+ broken_opd:
(*_bfd_error_handler)
- (_("%s: .opd is not a regular array of opd entries"),
- bfd_archive_filename (ibfd));
+ (_("%B: .opd is not a regular array of opd entries"), ibfd);
need_edit = FALSE;
break;
}
@@ -5034,8 +6355,8 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
|| (r_type = ELF64_R_TYPE ((rel + 1)->r_info)) != R_PPC64_TOC)
{
(*_bfd_error_handler)
- (_("%s: unexpected reloc type %u in .opd section"),
- bfd_archive_filename (ibfd), r_type);
+ (_("%B: unexpected reloc type %u in .opd section"),
+ ibfd, r_type);
need_edit = FALSE;
break;
}
@@ -5051,12 +6372,12 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
if (h != NULL)
sym_name = h->root.root.string;
else
- sym_name = bfd_elf_local_sym_name (ibfd, sym);
+ sym_name = bfd_elf_sym_name (ibfd, symtab_hdr, sym,
+ sym_sec);
(*_bfd_error_handler)
- (_("%s: undefined sym `%s' in .opd section"),
- bfd_archive_filename (ibfd),
- sym_name);
+ (_("%B: undefined sym `%s' in .opd section"),
+ ibfd, sym_name);
need_edit = FALSE;
break;
}
@@ -5072,19 +6393,54 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
|| sym_sec->output_section == bfd_abs_section_ptr)
need_edit = TRUE;
- offset += 24;
rel += 2;
- /* Allow for the possibility of a reloc on the third word. */
- if (rel < relend
- && rel->r_offset == offset - 8)
- rel += 1;
+ if (rel == relend
+ || (rel + 1 == relend && rel->r_offset == offset + 16))
+ {
+ if (sec->size == offset + 24)
+ {
+ need_pad = NULL;
+ break;
+ }
+ if (rel == relend && sec->size == offset + 16)
+ {
+ cnt_16b++;
+ break;
+ }
+ goto broken_opd;
+ }
+
+ if (rel->r_offset == offset + 24)
+ offset += 24;
+ else if (rel->r_offset != offset + 16)
+ goto broken_opd;
+ else if (rel + 1 < relend
+ && ELF64_R_TYPE (rel[0].r_info) == R_PPC64_ADDR64
+ && ELF64_R_TYPE (rel[1].r_info) == R_PPC64_TOC)
+ {
+ offset += 16;
+ cnt_16b++;
+ }
+ else if (rel + 2 < relend
+ && ELF64_R_TYPE (rel[1].r_info) == R_PPC64_ADDR64
+ && ELF64_R_TYPE (rel[2].r_info) == R_PPC64_TOC)
+ {
+ offset += 24;
+ rel += 1;
+ }
+ else
+ goto broken_opd;
}
- if (need_edit)
+ add_aux_fields = non_overlapping && cnt_16b > 0;
+
+ if (need_edit || add_aux_fields)
{
Elf_Internal_Rela *write_rel;
bfd_byte *rptr, *wptr;
+ bfd_byte *new_contents = NULL;
bfd_boolean skip;
+ long opd_ent_size;
/* This seems a waste of time as input .opd sections are all
zeros as generated by gcc, but I suppose there's no reason
@@ -5092,11 +6448,11 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
the third word of .opd entries. */
if ((sec->flags & SEC_IN_MEMORY) == 0)
{
- bfd_byte *loc = bfd_alloc (ibfd, sec->_raw_size);
- if (loc == NULL
- || !bfd_get_section_contents (ibfd, sec, loc, 0,
- sec->_raw_size))
+ bfd_byte *loc;
+ if (!bfd_malloc_and_get_section (ibfd, sec, &loc))
{
+ if (loc != NULL)
+ free (loc);
error_ret:
if (local_syms != NULL
&& symtab_hdr->contents != (unsigned char *) local_syms)
@@ -5111,11 +6467,21 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
elf_section_data (sec)->relocs = relstart;
- wptr = sec->contents;
+ new_contents = sec->contents;
+ if (add_aux_fields)
+ {
+ new_contents = bfd_malloc (sec->size + cnt_16b * 8);
+ if (new_contents == NULL)
+ return FALSE;
+ need_pad = FALSE;
+ }
+ wptr = new_contents;
rptr = sec->contents;
+
write_rel = relstart;
skip = FALSE;
offset = 0;
+ opd_ent_size = 0;
for (rel = relstart; rel < relend; rel++)
{
unsigned long r_symndx;
@@ -5131,27 +6497,48 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
if (rel->r_offset == offset)
{
struct ppc_link_hash_entry *fdh = NULL;
- if (h != NULL)
- fdh = get_fdh ((struct ppc_link_hash_entry *) h,
- ppc_hash_table (info));
+
+ /* See if the .opd entry is full 24 byte or
+ 16 byte (with fd_aux entry overlapped with next
+ fd_func). */
+ opd_ent_size = 24;
+ if ((rel + 2 == relend && sec->size == offset + 16)
+ || (rel + 3 < relend
+ && rel[2].r_offset == offset + 16
+ && rel[3].r_offset == offset + 24
+ && ELF64_R_TYPE (rel[2].r_info) == R_PPC64_ADDR64
+ && ELF64_R_TYPE (rel[3].r_info) == R_PPC64_TOC))
+ opd_ent_size = 16;
+
+ if (h != NULL
+ && h->root.root.string[0] == '.')
+ {
+ fdh = get_fdh ((struct ppc_link_hash_entry *) h,
+ ppc_hash_table (info));
+ if (fdh != NULL
+ && fdh->elf.root.type != bfd_link_hash_defined
+ && fdh->elf.root.type != bfd_link_hash_defweak)
+ fdh = NULL;
+ }
skip = (sym_sec->owner != ibfd
|| sym_sec->output_section == bfd_abs_section_ptr);
if (skip)
{
- if (h != NULL && sym_sec->owner == ibfd)
+ if (fdh != NULL && sym_sec->owner == ibfd)
{
/* Arrange for the function descriptor sym
to be dropped. */
fdh->elf.root.u.def.value = 0;
fdh->elf.root.u.def.section = sym_sec;
}
+ opd_adjust[rel->r_offset / 8] = -1;
}
else
{
/* We'll be keeping this opd entry. */
- if (h != NULL)
+ if (fdh != NULL)
{
/* Redefine the function descriptor symbol to
this location in the opd section. It is
@@ -5160,7 +6547,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
for local symbols, because various places
in the generic ELF code use the value
stored in u.def.value. */
- fdh->elf.root.u.def.value = wptr - sec->contents;
+ fdh->elf.root.u.def.value = wptr - new_contents;
fdh->adjust_done = 1;
}
@@ -5170,60 +6557,50 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
for the function descriptor sym which we
don't have at the moment. So keep an
array of adjustments. */
- adjust[rel->r_offset / 24] = wptr - rptr;
+ opd_adjust[rel->r_offset / 8]
+ = (wptr - new_contents) - (rptr - sec->contents);
if (wptr != rptr)
- memcpy (wptr, rptr, 24);
- wptr += 24;
+ memcpy (wptr, rptr, opd_ent_size);
+ wptr += opd_ent_size;
+ if (add_aux_fields && opd_ent_size == 16)
+ {
+ memset (wptr, '\0', 8);
+ wptr += 8;
+ }
}
- rptr += 24;
- offset += 24;
+ rptr += opd_ent_size;
+ offset += opd_ent_size;
}
if (skip)
{
- BFD_ASSERT (MUST_BE_DYN_RELOC (ELF64_R_TYPE (rel->r_info)));
- if (info->shared)
- {
- /* We won't be needing dynamic relocs here. */
- struct ppc_dyn_relocs **pp;
- struct ppc_dyn_relocs *p;
-
- if (h != NULL)
- pp = &((struct ppc_link_hash_entry *) h)->dyn_relocs;
- else if (sym_sec != NULL)
- pp = ((struct ppc_dyn_relocs **)
- &elf_section_data (sym_sec)->local_dynrel);
- else
- pp = ((struct ppc_dyn_relocs **)
- &elf_section_data (sec)->local_dynrel);
- while ((p = *pp) != NULL)
- {
- if (p->sec == sec)
- {
- p->count -= 1;
- if (p->count == 0)
- *pp = p->next;
- break;
- }
- pp = &p->next;
- }
- }
+ if (!NO_OPD_RELOCS
+ && !info->relocatable
+ && !dec_dynrel_count (rel->r_info, sec, info,
+ NULL, h, sym_sec))
+ goto error_ret;
}
else
{
/* We need to adjust any reloc offsets to point to the
new opd entries. While we're at it, we may as well
remove redundant relocs. */
- rel->r_offset += wptr - rptr;
+ rel->r_offset += opd_adjust[(offset - opd_ent_size) / 8];
if (write_rel != rel)
memcpy (write_rel, rel, sizeof (*rel));
++write_rel;
}
}
- sec->_cooked_size = wptr - sec->contents;
+ sec->size = wptr - new_contents;
sec->reloc_count = write_rel - relstart;
+ if (add_aux_fields)
+ {
+ free (sec->contents);
+ sec->contents = new_contents;
+ }
+
/* Fudge the 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
@@ -5247,6 +6624,40 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
if (some_edited)
elf_link_hash_traverse (elf_hash_table (info), adjust_opd_syms, NULL);
+ /* If we are doing a final link and the last .opd entry is just 16 byte
+ long, add a 8 byte padding after it. */
+ if (need_pad != NULL && !info->relocatable)
+ {
+ bfd_byte *p;
+
+ if ((need_pad->flags & SEC_IN_MEMORY) == 0)
+ {
+ BFD_ASSERT (need_pad->size > 0);
+
+ p = bfd_malloc (need_pad->size + 8);
+ if (p == NULL)
+ return FALSE;
+
+ if (! bfd_get_section_contents (need_pad->owner, need_pad,
+ p, 0, need_pad->size))
+ return FALSE;
+
+ need_pad->contents = p;
+ need_pad->flags |= (SEC_IN_MEMORY | SEC_HAS_CONTENTS);
+ }
+ else
+ {
+ p = bfd_realloc (need_pad->contents, need_pad->size + 8);
+ if (p == NULL)
+ return FALSE;
+
+ need_pad->contents = p;
+ }
+
+ memset (need_pad->contents + need_pad->size, 0, 8);
+ need_pad->size += 8;
+ }
+
return TRUE;
}
@@ -5260,13 +6671,31 @@ ppc64_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
htab = ppc_hash_table (info);
if (htab->tls_get_addr != NULL)
{
- struct elf_link_hash_entry *h = htab->tls_get_addr;
+ struct ppc_link_hash_entry *h = htab->tls_get_addr;
- 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;
+ while (h->elf.root.type == bfd_link_hash_indirect
+ || h->elf.root.type == bfd_link_hash_warning)
+ h = (struct ppc_link_hash_entry *) h->elf.root.u.i.link;
htab->tls_get_addr = h;
+
+ if (htab->tls_get_addr_fd == NULL
+ && h->oh != NULL
+ && h->oh->is_func_descriptor
+ && (h->oh->elf.root.type == bfd_link_hash_defined
+ || h->oh->elf.root.type == bfd_link_hash_defweak))
+ htab->tls_get_addr_fd = h->oh;
+ }
+
+ if (htab->tls_get_addr_fd != NULL)
+ {
+ struct ppc_link_hash_entry *h = htab->tls_get_addr_fd;
+
+ while (h->elf.root.type == bfd_link_hash_indirect
+ || h->elf.root.type == bfd_link_hash_warning)
+ h = (struct ppc_link_hash_entry *) h->elf.root.u.i.link;
+
+ htab->tls_get_addr_fd = h;
}
return _bfd_elf_tls_setup (obfd, info);
@@ -5293,12 +6722,22 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
{
Elf_Internal_Sym *locsyms = NULL;
-
- for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ asection *toc = bfd_get_section_by_name (ibfd, ".toc");
+ unsigned char *toc_ref = NULL;
+
+ /* Look at all the sections for this file, with TOC last. */
+ for (sec = (ibfd->sections == toc && toc && toc->next ? toc->next
+ : ibfd->sections);
+ sec != NULL;
+ sec = (sec == toc ? NULL
+ : sec->next == NULL ? toc
+ : sec->next == toc && toc->next ? toc->next
+ : sec->next))
if (sec->has_tls_reloc && !bfd_is_abs_section (sec->output_section))
{
Elf_Internal_Rela *relstart, *rel, *relend;
int expecting_tls_get_addr;
+ long toc_ref_index = 0;
/* Read the relocations. */
relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
@@ -5327,6 +6766,8 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
err_free_rel:
if (elf_section_data (sec)->relocs != relstart)
free (relstart);
+ if (toc_ref != NULL)
+ free (toc_ref);
if (locsyms != NULL
&& (elf_tdata (ibfd)->symtab_hdr.contents
!= (unsigned char *) locsyms))
@@ -5342,22 +6783,14 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
value = h->root.u.def.value;
}
else
- {
- value = sym->st_value;
-
- if (elf_section_data (sym_sec) != NULL)
- {
- long *adjust;
- adjust = ppc64_elf_section_data (sym_sec)->opd.adjust;
- if (adjust != NULL)
- value += adjust[value / 24];
- }
- }
+ /* Symbols referenced by TLS relocs must be of type
+ STT_TLS. So no need for .opd local sym adjust. */
+ value = sym->st_value;
ok_tprel = FALSE;
is_local = FALSE;
if (h == NULL
- || !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC))
+ || !h->def_dynamic)
{
is_local = TRUE;
value += sym_sec->output_offset;
@@ -5424,7 +6857,8 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
case R_PPC64_REL14_BRNTAKEN:
case R_PPC64_REL24:
if (h != NULL
- && h == htab->tls_get_addr)
+ && (h == &htab->tls_get_addr->elf
+ || h == &htab->tls_get_addr_fd->elf))
{
if (!expecting_tls_get_addr
&& rel != relstart
@@ -5441,8 +6875,12 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
rel - 1, ibfd);
if (retval == 0)
goto err_free_rel;
- if (toc_tls != NULL)
- expecting_tls_get_addr = retval > 1;
+ if (retval > 1 && toc_tls != NULL)
+ {
+ expecting_tls_get_addr = 1;
+ if (toc_ref != NULL)
+ toc_ref[toc_ref_index] = 1;
+ }
}
if (expecting_tls_get_addr)
@@ -5460,8 +6898,40 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
expecting_tls_get_addr = 0;
continue;
+ case R_PPC64_TOC16:
+ case R_PPC64_TOC16_LO:
+ case R_PPC64_TLS:
+ expecting_tls_get_addr = 0;
+ if (sym_sec == toc && toc != NULL)
+ {
+ /* Mark this toc entry as referenced by a TLS
+ code sequence. We can do that now in the
+ case of R_PPC64_TLS, and after checking for
+ tls_get_addr for the TOC16 relocs. */
+ if (toc_ref == NULL)
+ {
+ toc_ref = bfd_zmalloc (toc->size / 8);
+ if (toc_ref == NULL)
+ goto err_free_rel;
+ }
+ if (h != NULL)
+ value = h->root.u.def.value;
+ else
+ value = sym->st_value;
+ value += rel->r_addend;
+ BFD_ASSERT (value < toc->size && value % 8 == 0);
+ toc_ref_index = value / 8;
+ if (r_type == R_PPC64_TLS)
+ toc_ref[toc_ref_index] = 1;
+ }
+ continue;
+
case R_PPC64_TPREL64:
expecting_tls_get_addr = 0;
+ if (sec != toc
+ || toc_ref == NULL
+ || !toc_ref[rel->r_offset / 8])
+ continue;
if (ok_tprel)
{
/* IE -> LE */
@@ -5474,6 +6944,10 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
case R_PPC64_DTPMOD64:
expecting_tls_get_addr = 0;
+ if (sec != toc
+ || toc_ref == NULL
+ || !toc_ref[rel->r_offset / 8])
+ continue;
if (rel + 1 < relend
&& (rel[1].r_info
== ELF64_R_INFO (r_symndx, R_PPC64_DTPREL64))
@@ -5528,29 +7002,20 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
ent->got.refcount -= 1;
}
}
- else if (h != NULL)
+ else
{
- struct ppc_link_hash_entry * eh;
- struct ppc_dyn_relocs **pp;
- struct ppc_dyn_relocs *p;
-
- /* Adjust dynamic relocs. */
- eh = (struct ppc_link_hash_entry *) h;
- for (pp = &eh->dyn_relocs;
- (p = *pp) != NULL;
- pp = &p->next)
- if (p->sec == sec)
- {
- /* If we got rid of a DTPMOD/DTPREL reloc
- pair then we'll lose one or two dyn
- relocs. */
- if (tls_set == (TLS_EXPLICIT | TLS_GD))
- p->count -= 1;
- p->count -= 1;
- if (p->count == 0)
- *pp = p->next;
- break;
- }
+ /* If we got rid of a DTPMOD/DTPREL reloc pair then
+ we'll lose one or two dyn relocs. */
+ if (!dec_dynrel_count (rel->r_info, sec, info,
+ NULL, h, sym_sec))
+ return FALSE;
+
+ if (tls_set == (TLS_EXPLICIT | TLS_GD))
+ {
+ if (!dec_dynrel_count ((rel + 1)->r_info, sec, info,
+ NULL, h, sym_sec))
+ return FALSE;
+ }
}
*tls_mask |= tls_set;
@@ -5561,6 +7026,9 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
free (relstart);
}
+ if (toc_ref != NULL)
+ free (toc_ref);
+
if (locsyms != NULL
&& (elf_tdata (ibfd)->symtab_hdr.contents
!= (unsigned char *) locsyms))
@@ -5574,6 +7042,462 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
return TRUE;
}
+/* Called via elf_link_hash_traverse from ppc64_elf_edit_toc to adjust
+ the values of any global symbols in a toc section that has been
+ edited. Globals in toc sections should be a rarity, so this function
+ sets a flag if any are found in toc sections other than the one just
+ edited, so that futher hash table traversals can be avoided. */
+
+struct adjust_toc_info
+{
+ asection *toc;
+ unsigned long *skip;
+ bfd_boolean global_toc_syms;
+};
+
+static bfd_boolean
+adjust_toc_syms (struct elf_link_hash_entry *h, void *inf)
+{
+ struct ppc_link_hash_entry *eh;
+ struct adjust_toc_info *toc_inf = (struct adjust_toc_info *) inf;
+
+ if (h->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 (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ return TRUE;
+
+ eh = (struct ppc_link_hash_entry *) h;
+ if (eh->adjust_done)
+ return TRUE;
+
+ if (eh->elf.root.u.def.section == toc_inf->toc)
+ {
+ unsigned long skip = toc_inf->skip[eh->elf.root.u.def.value >> 3];
+ if (skip != (unsigned long) -1)
+ eh->elf.root.u.def.value -= skip;
+ else
+ {
+ (*_bfd_error_handler)
+ (_("%s defined in removed toc entry"), eh->elf.root.root.string);
+ eh->elf.root.u.def.section = &bfd_abs_section;
+ eh->elf.root.u.def.value = 0;
+ }
+ eh->adjust_done = 1;
+ }
+ else if (strcmp (eh->elf.root.u.def.section->name, ".toc") == 0)
+ toc_inf->global_toc_syms = TRUE;
+
+ return TRUE;
+}
+
+/* Examine all relocs referencing .toc sections in order to remove
+ unused .toc entries. */
+
+bfd_boolean
+ppc64_elf_edit_toc (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
+{
+ bfd *ibfd;
+ struct adjust_toc_info toc_inf;
+
+ toc_inf.global_toc_syms = TRUE;
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ asection *toc, *sec;
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Sym *local_syms;
+ struct elf_link_hash_entry **sym_hashes;
+ Elf_Internal_Rela *relstart, *rel;
+ unsigned long *skip, *drop;
+ unsigned char *used;
+ unsigned char *keep, last, some_unused;
+
+ toc = bfd_get_section_by_name (ibfd, ".toc");
+ if (toc == NULL
+ || toc->size == 0
+ || toc->sec_info_type == ELF_INFO_TYPE_JUST_SYMS
+ || elf_discarded_section (toc))
+ continue;
+
+ local_syms = NULL;
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (ibfd);
+
+ /* Look at sections dropped from the final link. */
+ skip = NULL;
+ relstart = NULL;
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ if (sec->reloc_count == 0
+ || !elf_discarded_section (sec)
+ || get_opd_info (sec)
+ || (sec->flags & SEC_ALLOC) == 0
+ || (sec->flags & SEC_DEBUGGING) != 0)
+ continue;
+
+ relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, FALSE);
+ if (relstart == NULL)
+ goto error_ret;
+
+ /* Run through the relocs to see which toc entries might be
+ unused. */
+ for (rel = relstart; rel < relstart + sec->reloc_count; ++rel)
+ {
+ enum elf_ppc64_reloc_type r_type;
+ unsigned long r_symndx;
+ asection *sym_sec;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+ bfd_vma val;
+
+ r_type = ELF64_R_TYPE (rel->r_info);
+ switch (r_type)
+ {
+ default:
+ continue;
+
+ case R_PPC64_TOC16:
+ case R_PPC64_TOC16_LO:
+ case R_PPC64_TOC16_HI:
+ case R_PPC64_TOC16_HA:
+ case R_PPC64_TOC16_DS:
+ case R_PPC64_TOC16_LO_DS:
+ break;
+ }
+
+ r_symndx = ELF64_R_SYM (rel->r_info);
+ if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
+ r_symndx, ibfd))
+ goto error_ret;
+
+ if (sym_sec != toc)
+ continue;
+
+ if (h != NULL)
+ val = h->root.u.def.value;
+ else
+ val = sym->st_value;
+ val += rel->r_addend;
+
+ if (val >= toc->size)
+ continue;
+
+ /* Anything in the toc ought to be aligned to 8 bytes.
+ If not, don't mark as unused. */
+ if (val & 7)
+ continue;
+
+ if (skip == NULL)
+ {
+ skip = bfd_zmalloc (sizeof (*skip) * (toc->size + 7) / 8);
+ if (skip == NULL)
+ goto error_ret;
+ }
+
+ skip[val >> 3] = 1;
+ }
+
+ if (elf_section_data (sec)->relocs != relstart)
+ free (relstart);
+ }
+
+ if (skip == NULL)
+ continue;
+
+ used = bfd_zmalloc (sizeof (*used) * (toc->size + 7) / 8);
+ if (used == NULL)
+ {
+ error_ret:
+ if (local_syms != NULL
+ && symtab_hdr->contents != (unsigned char *) local_syms)
+ free (local_syms);
+ if (sec != NULL
+ && relstart != NULL
+ && elf_section_data (sec)->relocs != relstart)
+ free (relstart);
+ if (skip != NULL)
+ free (skip);
+ return FALSE;
+ }
+
+ /* Now check all kept sections that might reference the toc.
+ Check the toc itself last. */
+ for (sec = (ibfd->sections == toc && toc->next ? toc->next
+ : ibfd->sections);
+ sec != NULL;
+ sec = (sec == toc ? NULL
+ : sec->next == NULL ? toc
+ : sec->next == toc && toc->next ? toc->next
+ : sec->next))
+ {
+ int repeat;
+
+ if (sec->reloc_count == 0
+ || elf_discarded_section (sec)
+ || get_opd_info (sec)
+ || (sec->flags & SEC_ALLOC) == 0
+ || (sec->flags & SEC_DEBUGGING) != 0)
+ continue;
+
+ relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, TRUE);
+ if (relstart == NULL)
+ goto error_ret;
+
+ /* Mark toc entries referenced as used. */
+ repeat = 0;
+ do
+ for (rel = relstart; rel < relstart + sec->reloc_count; ++rel)
+ {
+ enum elf_ppc64_reloc_type r_type;
+ unsigned long r_symndx;
+ asection *sym_sec;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+ bfd_vma val;
+
+ r_type = ELF64_R_TYPE (rel->r_info);
+ switch (r_type)
+ {
+ case R_PPC64_TOC16:
+ case R_PPC64_TOC16_LO:
+ case R_PPC64_TOC16_HI:
+ case R_PPC64_TOC16_HA:
+ case R_PPC64_TOC16_DS:
+ case R_PPC64_TOC16_LO_DS:
+ /* In case we're taking addresses of toc entries. */
+ case R_PPC64_ADDR64:
+ break;
+
+ default:
+ continue;
+ }
+
+ r_symndx = ELF64_R_SYM (rel->r_info);
+ if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
+ r_symndx, ibfd))
+ {
+ free (used);
+ goto error_ret;
+ }
+
+ if (sym_sec != toc)
+ continue;
+
+ if (h != NULL)
+ val = h->root.u.def.value;
+ else
+ val = sym->st_value;
+ val += rel->r_addend;
+
+ if (val >= toc->size)
+ continue;
+
+ /* For the toc section, we only mark as used if
+ this entry itself isn't unused. */
+ if (sec == toc
+ && !used[val >> 3]
+ && (used[rel->r_offset >> 3]
+ || !skip[rel->r_offset >> 3]))
+ /* Do all the relocs again, to catch reference
+ chains. */
+ repeat = 1;
+
+ used[val >> 3] = 1;
+ }
+ while (repeat);
+ }
+
+ /* Merge the used and skip arrays. Assume that TOC
+ doublewords not appearing as either used or unused belong
+ to to an entry more than one doubleword in size. */
+ for (drop = skip, keep = used, last = 0, some_unused = 0;
+ drop < skip + (toc->size + 7) / 8;
+ ++drop, ++keep)
+ {
+ if (*keep)
+ {
+ *drop = 0;
+ last = 0;
+ }
+ else if (*drop)
+ {
+ some_unused = 1;
+ last = 1;
+ }
+ else
+ *drop = last;
+ }
+
+ free (used);
+
+ if (some_unused)
+ {
+ bfd_byte *contents, *src;
+ unsigned long off;
+
+ /* Shuffle the toc contents, and at the same time convert the
+ skip array from booleans into offsets. */
+ if (!bfd_malloc_and_get_section (ibfd, toc, &contents))
+ goto error_ret;
+
+ elf_section_data (toc)->this_hdr.contents = contents;
+
+ for (src = contents, off = 0, drop = skip;
+ src < contents + toc->size;
+ src += 8, ++drop)
+ {
+ if (*drop)
+ {
+ *drop = (unsigned long) -1;
+ off += 8;
+ }
+ else if (off != 0)
+ {
+ *drop = off;
+ memcpy (src - off, src, 8);
+ }
+ }
+ toc->rawsize = toc->size;
+ toc->size = src - contents - off;
+
+ if (toc->reloc_count != 0)
+ {
+ Elf_Internal_Rela *wrel;
+ bfd_size_type sz;
+
+ /* Read toc relocs. */
+ relstart = _bfd_elf_link_read_relocs (ibfd, toc, NULL, NULL,
+ TRUE);
+ if (relstart == NULL)
+ goto error_ret;
+
+ /* Remove unused toc relocs, and adjust those we keep. */
+ wrel = relstart;
+ for (rel = relstart; rel < relstart + toc->reloc_count; ++rel)
+ if (skip[rel->r_offset >> 3] != (unsigned long) -1)
+ {
+ wrel->r_offset = rel->r_offset - skip[rel->r_offset >> 3];
+ wrel->r_info = rel->r_info;
+ wrel->r_addend = rel->r_addend;
+ ++wrel;
+ }
+ else if (!dec_dynrel_count (rel->r_info, toc, info,
+ &local_syms, NULL, NULL))
+ goto error_ret;
+
+ toc->reloc_count = wrel - relstart;
+ sz = elf_section_data (toc)->rel_hdr.sh_entsize;
+ elf_section_data (toc)->rel_hdr.sh_size = toc->reloc_count * sz;
+ BFD_ASSERT (elf_section_data (toc)->rel_hdr2 == NULL);
+ }
+
+ /* Adjust addends for relocs against the toc section sym. */
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ if (sec->reloc_count == 0
+ || elf_discarded_section (sec))
+ continue;
+
+ relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
+ TRUE);
+ if (relstart == NULL)
+ goto error_ret;
+
+ for (rel = relstart; rel < relstart + sec->reloc_count; ++rel)
+ {
+ enum elf_ppc64_reloc_type r_type;
+ unsigned long r_symndx;
+ asection *sym_sec;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+
+ r_type = ELF64_R_TYPE (rel->r_info);
+ switch (r_type)
+ {
+ default:
+ continue;
+
+ case R_PPC64_TOC16:
+ case R_PPC64_TOC16_LO:
+ case R_PPC64_TOC16_HI:
+ case R_PPC64_TOC16_HA:
+ case R_PPC64_TOC16_DS:
+ case R_PPC64_TOC16_LO_DS:
+ case R_PPC64_ADDR64:
+ break;
+ }
+
+ r_symndx = ELF64_R_SYM (rel->r_info);
+ if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
+ r_symndx, ibfd))
+ goto error_ret;
+
+ if (sym_sec != toc || h != NULL || sym->st_value != 0)
+ continue;
+
+ rel->r_addend -= skip[rel->r_addend >> 3];
+ }
+ }
+
+ /* We shouldn't have local or global symbols defined in the TOC,
+ but handle them anyway. */
+ if (local_syms != NULL)
+ {
+ Elf_Internal_Sym *sym;
+
+ for (sym = local_syms;
+ sym < local_syms + symtab_hdr->sh_info;
+ ++sym)
+ if (sym->st_shndx != SHN_UNDEF
+ && (sym->st_shndx < SHN_LORESERVE
+ || sym->st_shndx > SHN_HIRESERVE)
+ && sym->st_value != 0
+ && bfd_section_from_elf_index (ibfd, sym->st_shndx) == toc)
+ {
+ if (skip[sym->st_value >> 3] != (unsigned long) -1)
+ sym->st_value -= skip[sym->st_value >> 3];
+ else
+ {
+ (*_bfd_error_handler)
+ (_("%s defined in removed toc entry"),
+ bfd_elf_sym_name (ibfd, symtab_hdr, sym,
+ NULL));
+ sym->st_value = 0;
+ sym->st_shndx = SHN_ABS;
+ }
+ symtab_hdr->contents = (unsigned char *) local_syms;
+ }
+ }
+
+ /* Finally, adjust any global syms defined in the toc. */
+ if (toc_inf.global_toc_syms)
+ {
+ toc_inf.toc = toc;
+ toc_inf.skip = skip;
+ toc_inf.global_toc_syms = FALSE;
+ elf_link_hash_traverse (elf_hash_table (info), adjust_toc_syms,
+ &toc_inf);
+ }
+ }
+
+ 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;
+ }
+ free (skip);
+ }
+
+ return TRUE;
+}
+
/* Allocate space in .plt, .got and associated reloc sections for
dynamic relocs. */
@@ -5605,31 +7529,29 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (pent = h->plt.plist; pent != NULL; pent = pent->next)
if (pent->plt.refcount > 0)
{
- BFD_ASSERT (((struct ppc_link_hash_entry *) h)->is_func_descriptor);
-
/* If this is the first .plt entry, make room for the special
first entry. */
s = htab->plt;
- if (s->_raw_size == 0)
- s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_INITIAL_ENTRY_SIZE;
- pent->plt.offset = s->_raw_size;
+ pent->plt.offset = s->size;
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* Make room for the .glink code. */
s = htab->glink;
- if (s->_raw_size == 0)
- s->_raw_size += GLINK_CALL_STUB_SIZE;
+ if (s->size == 0)
+ s->size += GLINK_CALL_STUB_SIZE;
/* We need bigger stubs past index 32767. */
- if (s->_raw_size >= GLINK_CALL_STUB_SIZE + 32768*2*4)
- s->_raw_size += 4;
- s->_raw_size += 2*4;
+ if (s->size >= GLINK_CALL_STUB_SIZE + 32768*2*4)
+ s->size += 4;
+ s->size += 2*4;
/* We also need to make an entry in the .rela.plt section. */
s = htab->relplt;
- s->_raw_size += sizeof (Elf64_External_Rela);
+ s->size += sizeof (Elf64_External_Rela);
doneone = TRUE;
}
else
@@ -5637,13 +7559,13 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (!doneone)
{
h->plt.plist = NULL;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
}
}
else
{
h->plt.plist = NULL;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
}
eh = (struct ppc_link_hash_entry *) h;
@@ -5681,29 +7603,29 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
Undefined weak syms won't yet be marked as dynamic,
nor will all TLS symbols. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
}
if ((gent->tls_type & TLS_LD) != 0
- && !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC))
+ && !h->def_dynamic)
{
gent->got.offset = ppc64_tlsld_got (gent->owner)->offset;
continue;
}
s = ppc64_elf_tdata (gent->owner)->got;
- gent->got.offset = s->_raw_size;
- s->_raw_size
+ gent->got.offset = s->size;
+ s->size
+= (gent->tls_type & eh->tls_mask & (TLS_GD | TLS_LD)) ? 16 : 8;
dyn = htab->elf.dynamic_sections_created;
if ((info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
&& (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
- ppc64_elf_tdata (gent->owner)->relgot->_raw_size
+ ppc64_elf_tdata (gent->owner)->relgot->size
+= (gent->tls_type & eh->tls_mask & TLS_GD
? 2 * sizeof (Elf64_External_Rela)
: sizeof (Elf64_External_Rela));
@@ -5745,9 +7667,21 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* Also discard relocs on undefined weak syms with non-default
visibility. */
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ if (eh->dyn_relocs != NULL
&& h->root.type == bfd_link_hash_undefweak)
- eh->dyn_relocs = NULL;
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->dyn_relocs = NULL;
+
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ else if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+ }
}
else if (ELIMINATE_COPY_RELOCS)
{
@@ -5755,14 +7689,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
symbols which turn out to need copy relocs or are not
dynamic. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->non_got_ref
+ && h->def_dynamic
+ && !h->def_regular)
{
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -5783,7 +7717,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ sreloc->size += p->count * sizeof (Elf64_External_Rela);
}
return TRUE;
@@ -5843,7 +7777,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -5859,18 +7793,18 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
Elf_Internal_Shdr *symtab_hdr;
asection *srel;
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
+ if (!is_ppc64_elf_target (ibfd->xvec))
continue;
if (ppc64_tlsld_got (ibfd)->refcount > 0)
{
s = ppc64_elf_tdata (ibfd)->got;
- ppc64_tlsld_got (ibfd)->offset = s->_raw_size;
- s->_raw_size += 16;
+ ppc64_tlsld_got (ibfd)->offset = s->size;
+ s->size += 16;
if (info->shared)
{
srel = ppc64_elf_tdata (ibfd)->relgot;
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ srel->size += sizeof (Elf64_External_Rela);
}
}
else
@@ -5880,10 +7814,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
struct ppc_dyn_relocs *p;
- for (p = *((struct ppc_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
- p != NULL;
- p = p->next)
+ for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
{
if (!bfd_is_abs_section (p->sec)
&& bfd_is_abs_section (p->sec->output_section))
@@ -5896,7 +7827,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ srel->size += p->count * sizeof (Elf64_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -5924,27 +7855,27 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
if (ppc64_tlsld_got (ibfd)->offset == (bfd_vma) -1)
{
- ppc64_tlsld_got (ibfd)->offset = s->_raw_size;
- s->_raw_size += 16;
+ ppc64_tlsld_got (ibfd)->offset = s->size;
+ s->size += 16;
if (info->shared)
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ srel->size += sizeof (Elf64_External_Rela);
}
ent->got.offset = ppc64_tlsld_got (ibfd)->offset;
}
else
{
- ent->got.offset = s->_raw_size;
+ ent->got.offset = s->size;
if ((ent->tls_type & *lgot_masks & TLS_GD) != 0)
{
- s->_raw_size += 16;
+ s->size += 16;
if (info->shared)
- srel->_raw_size += 2 * sizeof (Elf64_External_Rela);
+ srel->size += 2 * sizeof (Elf64_External_Rela);
}
else
{
- s->_raw_size += 8;
+ s->size += 8;
if (info->shared)
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ srel->size += sizeof (Elf64_External_Rela);
}
}
}
@@ -5965,35 +7896,20 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
- /* Reset _cooked_size since prelim layout will set it wrongly,
- and a non-zero _cooked_size sticks. */
- s->_cooked_size = 0;
-
if (s == htab->brlt || s == htab->relbrlt)
/* These haven't been allocated yet; don't strip. */
continue;
else if (s == htab->got
|| s == htab->plt
- || s == htab->glink)
+ || s == htab->glink
+ || s == htab->dynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is mostly to handle .rela.bss and
- .rela.plt. We must create both sections in
- create_dynamic_sections, because they must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- }
- else
+ if (s->size != 0)
{
if (s != htab->relplt)
relocs = TRUE;
@@ -6009,14 +7925,22 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
- _bfd_strip_section_from_output (info, s);
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
+ s->flags |= SEC_EXCLUDE;
continue;
}
- /* .plt is in the bss section. We don't initialise it. */
- if (s == htab->plt)
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
continue;
/* Allocate memory for the section contents. We use bfd_zalloc
@@ -6026,26 +7950,24 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
sections instead of garbage.
We also rely on the section contents being zero when writing
the GOT. */
- s->contents = bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
{
- /* Skip this BFD if it is not ELF */
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
+ if (!is_ppc64_elf_target (ibfd->xvec))
continue;
s = ppc64_elf_tdata (ibfd)->got;
if (s != NULL && s != htab->got)
{
- s->_cooked_size = 0;
- if (s->_raw_size == 0)
- _bfd_strip_section_from_output (info, s);
+ if (s->size == 0)
+ s->flags |= SEC_EXCLUDE;
else
{
- s->contents = bfd_zalloc (ibfd, s->_raw_size);
+ s->contents = bfd_zalloc (ibfd, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -6053,12 +7975,11 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = ppc64_elf_tdata (ibfd)->relgot;
if (s != NULL)
{
- s->_cooked_size = 0;
- if (s->_raw_size == 0)
- _bfd_strip_section_from_output (info, s);
+ if (s->size == 0)
+ s->flags |= SEC_EXCLUDE;
else
{
- s->contents = bfd_zalloc (ibfd, s->_raw_size);
+ s->contents = bfd_zalloc (ibfd, s->size);
if (s->contents == NULL)
return FALSE;
relocs = TRUE;
@@ -6083,7 +8004,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (htab->plt != NULL && htab->plt->_raw_size != 0)
+ if (htab->plt != NULL && htab->plt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -6140,22 +8061,34 @@ ppc_type_of_stub (asection *input_sec,
if (h != NULL)
{
- if (h->oh != NULL
- && h->oh->dynindx != -1)
+ struct ppc_link_hash_entry *fdh = h;
+ if (fdh->oh != NULL
+ && fdh->oh->is_func_descriptor)
+ fdh = fdh->oh;
+
+ if (fdh->elf.dynindx != -1)
{
struct plt_entry *ent;
- for (ent = h->oh->plt.plist; ent != NULL; ent = ent->next)
+
+ for (ent = fdh->elf.plt.plist; ent != NULL; ent = ent->next)
if (ent->addend == rel->r_addend
&& ent->plt.offset != (bfd_vma) -1)
{
- *hash = (struct ppc_link_hash_entry *) h->oh;
+ *hash = fdh;
return ppc_stub_plt_call;
}
}
- if (!(h->elf.root.type == bfd_link_hash_defined
- || h->elf.root.type == bfd_link_hash_defweak)
- || h->elf.root.u.def.section->output_section == NULL)
+ /* Here, we know we don't have a plt entry. If we don't have a
+ either a defined function descriptor or a defined entry symbol
+ in a regular object file, then it is pointless trying to make
+ any other type of stub. */
+ if (!((fdh->elf.root.type == bfd_link_hash_defined
+ || fdh->elf.root.type == bfd_link_hash_defweak)
+ && fdh->elf.root.u.def.section->output_section != NULL)
+ && !((h->elf.root.type == bfd_link_hash_defined
+ || h->elf.root.type == bfd_link_hash_defweak)
+ && h->elf.root.u.def.section->output_section != NULL))
return ppc_stub_none;
}
@@ -6216,7 +8149,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
bfd_byte *p;
unsigned int indx;
struct plt_entry *ent;
- bfd_vma off;
+ bfd_vma dest, off;
int size;
/* Massage our args to the form they really have. */
@@ -6226,7 +8159,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
htab = ppc_hash_table (info);
/* Make a note of the offset within the stubs for this entry. */
- stub_entry->stub_offset = stub_entry->stub_sec->_cooked_size;
+ stub_entry->stub_offset = stub_entry->stub_sec->size;
loc = stub_entry->stub_sec->contents + stub_entry->stub_offset;
htab->stub_count[stub_entry->stub_type - 1] += 1;
@@ -6235,9 +8168,9 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
case ppc_stub_long_branch:
case ppc_stub_long_branch_r2off:
/* Branches are relative. This is where we are going to. */
- off = (stub_entry->target_value
- + stub_entry->target_section->output_offset
- + stub_entry->target_section->output_section->vma);
+ off = dest = (stub_entry->target_value
+ + stub_entry->target_section->output_offset
+ + stub_entry->target_section->output_section->vma);
/* And this is where we are coming from. */
off -= (stub_entry->stub_offset
@@ -6263,7 +8196,74 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
}
bfd_put_32 (htab->stub_bfd, B_DOT | (off & 0x3fffffc), loc);
- BFD_ASSERT (off + (1 << 25) < (bfd_vma) (1 << 26));
+ if (off + (1 << 25) >= (bfd_vma) (1 << 26))
+ {
+ (*_bfd_error_handler) (_("long branch stub `%s' offset overflow"),
+ stub_entry->root.string);
+ htab->stub_error = TRUE;
+ return FALSE;
+ }
+
+ if (info->emitrelocations)
+ {
+ Elf_Internal_Rela *relocs, *r;
+ struct bfd_elf_section_data *elfsec_data;
+
+ elfsec_data = elf_section_data (stub_entry->stub_sec);
+ relocs = elfsec_data->relocs;
+ if (relocs == NULL)
+ {
+ bfd_size_type relsize;
+ relsize = stub_entry->stub_sec->reloc_count * sizeof (*relocs);
+ relocs = bfd_alloc (htab->stub_bfd, relsize);
+ if (relocs == NULL)
+ return FALSE;
+ elfsec_data->relocs = relocs;
+ elfsec_data->rel_hdr.sh_size = relsize;
+ elfsec_data->rel_hdr.sh_entsize = 24;
+ stub_entry->stub_sec->reloc_count = 0;
+ }
+ r = relocs + stub_entry->stub_sec->reloc_count;
+ stub_entry->stub_sec->reloc_count += 1;
+ r->r_offset = loc - stub_entry->stub_sec->contents;
+ r->r_info = ELF64_R_INFO (0, R_PPC64_REL24);
+ r->r_addend = dest;
+ if (stub_entry->h != NULL)
+ {
+ struct elf_link_hash_entry **hashes;
+ unsigned long symndx;
+ struct ppc_link_hash_entry *h;
+
+ hashes = elf_sym_hashes (htab->stub_bfd);
+ if (hashes == NULL)
+ {
+ bfd_size_type hsize;
+
+ hsize = (htab->stub_globals + 1) * sizeof (*hashes);
+ hashes = bfd_zalloc (htab->stub_bfd, hsize);
+ if (hashes == NULL)
+ return FALSE;
+ elf_sym_hashes (htab->stub_bfd) = hashes;
+ htab->stub_globals = 1;
+ }
+ symndx = htab->stub_globals++;
+ h = stub_entry->h;
+ hashes[symndx] = &h->elf;
+ r->r_info = ELF64_R_INFO (symndx, R_PPC64_REL24);
+ if (h->oh != NULL && h->oh->is_func)
+ h = h->oh;
+ if (h->elf.root.u.def.section != stub_entry->target_section)
+ /* H is an opd symbol. The addend must be zero. */
+ r->r_addend = 0;
+ else
+ {
+ off = (h->elf.root.u.def.value
+ + h->elf.root.u.def.section->output_offset
+ + h->elf.root.u.def.section->output_section->vma);
+ r->r_addend -= off;
+ }
+ }
+ }
break;
case ppc_stub_plt_branch:
@@ -6274,7 +8274,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (br_entry == NULL)
{
(*_bfd_error_handler) (_("can't find branch stub `%s'"),
- stub_entry->root.string + 9);
+ stub_entry->root.string);
htab->stub_error = TRUE;
return FALSE;
}
@@ -6286,7 +8286,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
bfd_put_64 (htab->brlt->owner, off,
htab->brlt->contents + br_entry->offset);
- if (info->shared)
+ if (htab->relbrlt != NULL)
{
/* Create a reloc for the branch lookup table entry. */
Elf_Internal_Rela rela;
@@ -6354,17 +8354,18 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
/* Do the best we can for shared libraries built without
exporting ".foo" for each "foo". This can happen when symbol
versioning scripts strip all bar a subset of symbols. */
- if (stub_entry->h->oh->root.type != bfd_link_hash_defined
- && stub_entry->h->oh->root.type != bfd_link_hash_defweak)
+ if (stub_entry->h->oh != NULL
+ && stub_entry->h->oh->elf.root.type != bfd_link_hash_defined
+ && stub_entry->h->oh->elf.root.type != bfd_link_hash_defweak)
{
/* Point the symbol at the stub. There may be multiple stubs,
we don't really care; The main thing is to make this sym
defined somewhere. Maybe defining the symbol in the stub
section is a silly idea. If we didn't do this, htab->top_id
could disappear. */
- stub_entry->h->oh->root.type = bfd_link_hash_defined;
- stub_entry->h->oh->root.u.def.section = stub_entry->stub_sec;
- stub_entry->h->oh->root.u.def.value = stub_entry->stub_offset;
+ stub_entry->h->oh->elf.root.type = bfd_link_hash_defined;
+ stub_entry->h->oh->elf.root.u.def.section = stub_entry->stub_sec;
+ stub_entry->h->oh->elf.root.u.def.value = stub_entry->stub_offset;
}
/* Now build the stub. */
@@ -6403,17 +8404,28 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
return FALSE;
}
- stub_entry->stub_sec->_cooked_size += size;
+ stub_entry->stub_sec->size += size;
- if (htab->emit_stub_syms
- && !(stub_entry->stub_type == ppc_stub_plt_call
- && stub_entry->h->oh->root.type == bfd_link_hash_defined
- && stub_entry->h->oh->root.u.def.section == stub_entry->stub_sec
- && stub_entry->h->oh->root.u.def.value == stub_entry->stub_offset))
+ if (htab->emit_stub_syms)
{
struct elf_link_hash_entry *h;
- h = elf_link_hash_lookup (&htab->elf, stub_entry->root.string,
- TRUE, FALSE, FALSE);
+ size_t len1, len2;
+ char *name;
+ const char *const stub_str[] = { "long_branch",
+ "long_branch_r2off",
+ "plt_branch",
+ "plt_branch_r2off",
+ "plt_call" };
+
+ len1 = strlen (stub_str[stub_entry->stub_type - 1]);
+ len2 = strlen (stub_entry->root.string);
+ name = bfd_malloc (len1 + len2 + 2);
+ if (name == NULL)
+ return FALSE;
+ memcpy (name, stub_entry->root.string, 9);
+ memcpy (name + 9, stub_str[stub_entry->stub_type - 1], len1);
+ memcpy (name + len1 + 9, stub_entry->root.string + 8, len2 - 8 + 1);
+ h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE);
if (h == NULL)
return FALSE;
if (h->root.type == bfd_link_hash_new)
@@ -6421,10 +8433,11 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
h->root.type = bfd_link_hash_defined;
h->root.u.def.section = stub_entry->stub_sec;
h->root.u.def.value = stub_entry->stub_offset;
- h->elf_link_hash_flags = (ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_DEF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_FORCED_LOCAL);
+ h->ref_regular = 1;
+ h->def_regular = 1;
+ h->ref_regular_nonweak = 1;
+ h->forced_local = 1;
+ h->non_elf = 0;
}
}
@@ -6478,7 +8491,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
off = (stub_entry->target_value
+ stub_entry->target_section->output_offset
+ stub_entry->target_section->output_section->vma);
- off -= (stub_entry->stub_sec->_raw_size
+ off -= (stub_entry->stub_sec->size
+ stub_entry->stub_sec->output_offset
+ stub_entry->stub_sec->output_section->vma);
@@ -6505,7 +8518,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (br_entry == NULL)
{
(*_bfd_error_handler) (_("can't build branch stub `%s'"),
- stub_entry->root.string + 9);
+ stub_entry->root.string);
htab->stub_error = TRUE;
return FALSE;
}
@@ -6513,11 +8526,11 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (br_entry->iter != htab->stub_iteration)
{
br_entry->iter = htab->stub_iteration;
- br_entry->offset = htab->brlt->_raw_size;
- htab->brlt->_raw_size += 8;
+ br_entry->offset = htab->brlt->size;
+ htab->brlt->size += 8;
- if (info->shared)
- htab->relbrlt->_raw_size += sizeof (Elf64_External_Rela);
+ if (htab->relbrlt != NULL)
+ htab->relbrlt->size += sizeof (Elf64_External_Rela);
}
stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
@@ -6525,9 +8538,14 @@ 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;
}
- stub_entry->stub_sec->_raw_size += size;
+ stub_entry->stub_sec->size += size;
return TRUE;
}
@@ -6536,7 +8554,9 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
0 when no stubs will be needed, and 1 on success. */
int
-ppc64_elf_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
+ppc64_elf_setup_section_lists (bfd *output_bfd,
+ struct bfd_link_info *info,
+ int no_multi_toc)
{
bfd *input_bfd;
int top_id, top_index, id;
@@ -6545,6 +8565,8 @@ ppc64_elf_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
bfd_size_type amt;
struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ htab->no_multi_toc = no_multi_toc;
+
if (htab->brlt == NULL)
return 0;
@@ -6576,7 +8598,7 @@ ppc64_elf_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
/* We can't use output_bfd->section_count here to find the top output
section index as some sections may have been removed, and
- _bfd_strip_section_from_output doesn't renumber the indices. */
+ strip_excluded_output_sections doesn't renumber the indices. */
for (section = output_bfd->sections, top_index = 0;
section != NULL;
section = section->next)
@@ -6609,11 +8631,10 @@ ppc64_elf_next_toc_section (struct bfd_link_info *info, asection *isec)
{
bfd_vma addr = isec->output_offset + isec->output_section->vma;
bfd_vma off = addr - htab->toc_curr;
- if (off + isec->_raw_size > 0x10000)
- {
- htab->toc_curr = addr;
- htab->multi_toc_needed = 1;
- }
+
+ if (off + isec->size > 0x10000)
+ htab->toc_curr = addr;
+
elf_gp (isec->owner) = (htab->toc_curr
- elf_gp (isec->output_section->owner)
+ TOC_BASE_OFF);
@@ -6623,11 +8644,12 @@ ppc64_elf_next_toc_section (struct bfd_link_info *info, asection *isec)
/* Called after the last call to the above function. */
void
-ppc64_elf_reinit_toc (bfd *output_bfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info)
+ppc64_elf_reinit_toc (bfd *output_bfd, struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ htab->multi_toc_needed = htab->toc_curr != elf_gp (output_bfd);
+
/* toc_curr tracks the TOC offset used for code sections below in
ppc64_elf_next_input_section. Start off at 0x8000. */
htab->toc_curr = TOC_BASE_OFF;
@@ -6636,64 +8658,208 @@ ppc64_elf_reinit_toc (bfd *output_bfd ATTRIBUTE_UNUSED,
/* No toc references were found in ISEC. If the code in ISEC makes no
calls, then there's no need to use toc adjusting stubs when branching
into ISEC. Actually, indirect calls from ISEC are OK as they will
- load r2. */
+ load r2. Returns -1 on error, 0 for no stub needed, 1 for stub
+ needed, and 2 if a cyclical call-graph was found but no other reason
+ for a stub was detected. If called from the top level, a return of
+ 2 means the same as a return of 0. */
static int
toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec)
{
- bfd_byte *contents;
- bfd_size_type i;
+ Elf_Internal_Rela *relstart, *rel;
+ Elf_Internal_Sym *local_syms;
int ret;
- int branch_ok;
+ struct ppc_link_hash_table *htab;
/* We know none of our code bearing sections will need toc stubs. */
if ((isec->flags & SEC_LINKER_CREATED) != 0)
return 0;
- if (isec->_raw_size == 0)
+ if (isec->size == 0)
+ return 0;
+
+ if (isec->output_section == NULL)
return 0;
/* Hack for linux kernel. .fixup contains branches, but only back to
the function that hit an exception. */
- branch_ok = strcmp (isec->name, ".fixup") == 0;
+ if (strcmp (isec->name, ".fixup") == 0)
+ return 0;
+
+ if (isec->reloc_count == 0)
+ return 0;
+
+ relstart = _bfd_elf_link_read_relocs (isec->owner, isec, NULL, NULL,
+ info->keep_memory);
+ if (relstart == NULL)
+ return -1;
- contents = elf_section_data (isec)->this_hdr.contents;
- if (contents == NULL)
+ /* Look for branches to outside of this section. */
+ local_syms = NULL;
+ ret = 0;
+ htab = ppc_hash_table (info);
+ for (rel = relstart; rel < relstart + isec->reloc_count; ++rel)
{
- contents = bfd_malloc (isec->_raw_size);
- if (contents == NULL)
- return -1;
- if (! bfd_get_section_contents (isec->owner, isec, contents,
- 0, isec->_raw_size))
+ enum elf_ppc64_reloc_type r_type;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+ asection *sym_sec;
+ long *opd_adjust;
+ bfd_vma sym_value;
+ bfd_vma dest;
+
+ r_type = ELF64_R_TYPE (rel->r_info);
+ if (r_type != R_PPC64_REL24
+ && r_type != R_PPC64_REL14
+ && r_type != R_PPC64_REL14_BRTAKEN
+ && r_type != R_PPC64_REL14_BRNTAKEN)
+ continue;
+
+ r_symndx = ELF64_R_SYM (rel->r_info);
+ if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms, r_symndx,
+ isec->owner))
{
- free (contents);
- return -1;
+ ret = -1;
+ break;
}
- if (info->keep_memory)
- elf_section_data (isec)->this_hdr.contents = contents;
- }
- /* Code scan, because we don't necessarily have relocs on calls to
- static functions. */
- ret = 0;
- for (i = 0; i < isec->_raw_size; i += 4)
- {
- unsigned long insn = bfd_get_32 (isec->owner, contents + i);
- /* Is this a branch? */
- if ((insn & (0x3f << 26)) == (18 << 26)
- /* If branch and link, it's a function call. */
- && ((insn & 1) != 0
- /* Sibling calls use a plain branch. I don't know a way
- of deciding whether a branch is really a sibling call. */
- || !branch_ok))
+ /* Calls to dynamic lib functions go through a plt call stub
+ that uses r2. Branches to undefined symbols might be a call
+ using old-style dot symbols that can be satisfied by a plt
+ call into a new-style dynamic library. */
+ if (sym_sec == NULL)
+ {
+ struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) h;
+ if (eh != NULL
+ && eh->oh != NULL
+ && eh->oh->elf.plt.plist != NULL)
+ {
+ ret = 1;
+ break;
+ }
+
+ /* Ignore other undefined symbols. */
+ continue;
+ }
+
+ /* Assume branches to other sections not included in the link need
+ stubs too, to cover -R and absolute syms. */
+ if (sym_sec->output_section == NULL)
+ {
+ ret = 1;
+ break;
+ }
+
+ if (h == NULL)
+ sym_value = sym->st_value;
+ else
+ {
+ if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ abort ();
+ sym_value = h->root.u.def.value;
+ }
+ sym_value += rel->r_addend;
+
+ /* If this branch reloc uses an opd sym, find the code section. */
+ opd_adjust = get_opd_info (sym_sec);
+ if (opd_adjust != NULL)
+ {
+ if (h == NULL)
+ {
+ long adjust;
+
+ adjust = opd_adjust[sym->st_value / 8];
+ if (adjust == -1)
+ /* Assume deleted functions won't ever be called. */
+ continue;
+ sym_value += adjust;
+ }
+
+ dest = opd_entry_value (sym_sec, sym_value, &sym_sec, NULL);
+ if (dest == (bfd_vma) -1)
+ continue;
+ }
+ else
+ dest = (sym_value
+ + sym_sec->output_offset
+ + sym_sec->output_section->vma);
+
+ /* Ignore branch to self. */
+ if (sym_sec == isec)
+ continue;
+
+ /* If the called function uses the toc, we need a stub. */
+ if (sym_sec->has_toc_reloc
+ || sym_sec->makes_toc_func_call)
{
ret = 1;
break;
}
+
+ /* Assume any branch that needs a long branch stub might in fact
+ need a plt_branch stub. A plt_branch stub uses r2. */
+ else if (dest - (isec->output_offset
+ + isec->output_section->vma
+ + rel->r_offset) + (1 << 25) >= (2 << 25))
+ {
+ ret = 1;
+ break;
+ }
+
+ /* If calling back to a section in the process of being tested, we
+ can't say for sure that no toc adjusting stubs are needed, so
+ don't return zero. */
+ else if (sym_sec->call_check_in_progress)
+ ret = 2;
+
+ /* Branches to another section that itself doesn't have any TOC
+ references are OK. Recursively call ourselves to check. */
+ else if (sym_sec->id <= htab->top_id
+ && htab->stub_group[sym_sec->id].toc_off == 0)
+ {
+ int recur;
+
+ /* Mark current section as indeterminate, so that other
+ sections that call back to current won't be marked as
+ known. */
+ isec->call_check_in_progress = 1;
+ recur = toc_adjusting_stub_needed (info, sym_sec);
+ isec->call_check_in_progress = 0;
+
+ if (recur < 0)
+ {
+ /* An error. Exit. */
+ ret = -1;
+ break;
+ }
+ else if (recur <= 1)
+ {
+ /* Known result. Mark as checked and set section flag. */
+ htab->stub_group[sym_sec->id].toc_off = 1;
+ if (recur != 0)
+ {
+ sym_sec->makes_toc_func_call = 1;
+ ret = 1;
+ break;
+ }
+ }
+ else
+ {
+ /* Unknown result. Continue checking. */
+ ret = 2;
+ }
+ }
}
- if (elf_section_data (isec)->this_hdr.contents != contents)
- free (contents);
+ if (local_syms != NULL
+ && (elf_tdata (isec->owner)->symtab_hdr.contents
+ != (unsigned char *) local_syms))
+ free (local_syms);
+ if (elf_section_data (isec)->relocs != relstart)
+ free (relstart);
+
return ret;
}
@@ -6706,7 +8872,6 @@ bfd_boolean
ppc64_elf_next_input_section (struct bfd_link_info *info, asection *isec)
{
struct ppc_link_hash_table *htab = ppc_hash_table (info);
- int ret;
if ((isec->output_section->flags & SEC_CODE) != 0
&& isec->output_section->index <= htab->top_index)
@@ -6720,19 +8885,26 @@ ppc64_elf_next_input_section (struct bfd_link_info *info, asection *isec)
*list = isec;
}
- /* If a code section has a function that uses the TOC then we need
- to use the right TOC (obviously). Also, make sure that .opd gets
- the correct TOC value for R_PPC64_TOC relocs that don't have or
- can't find their function symbol (shouldn't ever happen now). */
- if (isec->has_gp_reloc || (isec->flags & SEC_CODE) == 0)
+ if (htab->multi_toc_needed)
{
- if (elf_gp (isec->owner) != 0)
- htab->toc_curr = elf_gp (isec->owner);
+ /* If a code section has a function that uses the TOC then we need
+ to use the right TOC (obviously). Also, make sure that .opd gets
+ the correct TOC value for R_PPC64_TOC relocs that don't have or
+ can't find their function symbol (shouldn't ever happen now). */
+ if (isec->has_toc_reloc || (isec->flags & SEC_CODE) == 0)
+ {
+ if (elf_gp (isec->owner) != 0)
+ htab->toc_curr = elf_gp (isec->owner);
+ }
+ else if (htab->stub_group[isec->id].toc_off == 0)
+ {
+ int ret = toc_adjusting_stub_needed (info, isec);
+ if (ret < 0)
+ return FALSE;
+ else
+ isec->makes_toc_func_call = ret & 1;
+ }
}
- else if ((ret = toc_adjusting_stub_needed (info, isec)) < 0)
- return FALSE;
- else
- isec->has_gp_reloc = ret;
/* Functions that don't use the TOC can belong in any TOC group.
Use the last TOC base. This happens to make _init and _fini
@@ -6766,11 +8938,11 @@ group_sections (struct ppc_link_hash_table *htab,
bfd_vma curr_toc;
curr = tail;
- if (tail->_cooked_size)
- total = tail->_cooked_size;
- else
- total = tail->_raw_size;
- big_sec = total >= stub_group_size;
+ total = tail->size;
+ big_sec = total > stub_group_size;
+ if (big_sec)
+ (*_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
@@ -6872,10 +9044,8 @@ ppc64_elf_size_stubs (bfd *output_bfd,
bfd *input_bfd;
unsigned int bfd_indx;
asection *stub_sec;
- bfd_boolean stub_changed;
htab->stub_iteration += 1;
- stub_changed = FALSE;
for (input_bfd = info->input_bfds, bfd_indx = 0;
input_bfd != NULL;
@@ -6885,6 +9055,9 @@ ppc64_elf_size_stubs (bfd *output_bfd,
asection *section;
Elf_Internal_Sym *local_syms = NULL;
+ if (!is_ppc64_elf_target (input_bfd->xvec))
+ continue;
+
/* We'll need the symbol table in a second. */
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
if (symtab_hdr->sh_info == 0)
@@ -6925,14 +9098,17 @@ ppc64_elf_size_stubs (bfd *output_bfd,
unsigned int r_indx;
enum ppc_stub_type stub_type;
struct ppc_stub_hash_entry *stub_entry;
- asection *sym_sec;
+ asection *sym_sec, *code_sec;
bfd_vma sym_value;
bfd_vma destination;
+ bfd_boolean ok_dest;
struct ppc_link_hash_entry *hash;
+ struct ppc_link_hash_entry *fdh;
struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym;
char *stub_name;
const asection *id_sec;
+ long *opd_adjust;
r_type = ELF64_R_TYPE (irela->r_info);
r_indx = ELF64_R_SYM (irela->r_info);
@@ -6952,41 +9128,88 @@ ppc64_elf_size_stubs (bfd *output_bfd,
/* Now determine the call target, its name, value,
section. */
- destination = 0;
if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
r_indx, input_bfd))
goto error_ret_free_internal;
hash = (struct ppc_link_hash_entry *) h;
+ ok_dest = FALSE;
+ fdh = NULL;
+ sym_value = 0;
if (hash == NULL)
{
- /* It's a local symbol. */
sym_value = sym->st_value;
- destination = (sym_value + irela->r_addend
+ ok_dest = TRUE;
+ }
+ else if (hash->elf.root.type == bfd_link_hash_defined
+ || hash->elf.root.type == bfd_link_hash_defweak)
+ {
+ sym_value = hash->elf.root.u.def.value;
+ if (sym_sec->output_section != NULL)
+ ok_dest = TRUE;
+ }
+ else if (hash->elf.root.type == bfd_link_hash_undefweak
+ || hash->elf.root.type == bfd_link_hash_undefined)
+ {
+ /* Recognise an old ABI func code entry sym, and
+ use the func descriptor sym instead if it is
+ defined. */
+ if (hash->elf.root.root.string[0] == '.'
+ && (fdh = get_fdh (hash, htab)) != NULL)
+ {
+ if (fdh->elf.root.type == bfd_link_hash_defined
+ || fdh->elf.root.type == bfd_link_hash_defweak)
+ {
+ sym_sec = fdh->elf.root.u.def.section;
+ sym_value = fdh->elf.root.u.def.value;
+ if (sym_sec->output_section != NULL)
+ ok_dest = TRUE;
+ }
+ else
+ fdh = NULL;
+ }
+ }
+ else
+ {
+ bfd_set_error (bfd_error_bad_value);
+ goto error_ret_free_internal;
+ }
+
+ destination = 0;
+ if (ok_dest)
+ {
+ sym_value += irela->r_addend;
+ destination = (sym_value
+ sym_sec->output_offset
+ sym_sec->output_section->vma);
}
- else
+
+ code_sec = sym_sec;
+ opd_adjust = get_opd_info (sym_sec);
+ if (opd_adjust != NULL)
{
- /* It's an external symbol. */
- sym_value = 0;
- if (hash->elf.root.type == bfd_link_hash_defined
- || hash->elf.root.type == bfd_link_hash_defweak)
+ bfd_vma dest;
+
+ if (hash == NULL)
{
- sym_value = hash->elf.root.u.def.value;
- if (sym_sec->output_section != NULL)
- destination = (sym_value + irela->r_addend
- + sym_sec->output_offset
- + sym_sec->output_section->vma);
+ long adjust = opd_adjust[sym_value / 8];
+ if (adjust == -1)
+ continue;
+ sym_value += adjust;
}
- else if (hash->elf.root.type == bfd_link_hash_undefweak)
- ;
- else if (hash->elf.root.type == bfd_link_hash_undefined)
- ;
- else
+ dest = opd_entry_value (sym_sec, sym_value,
+ &code_sec, &sym_value);
+ if (dest != (bfd_vma) -1)
{
- bfd_set_error (bfd_error_bad_value);
- goto error_ret_free_internal;
+ destination = dest;
+ if (fdh != NULL)
+ {
+ /* Fixup old ABI sym to point at code
+ entry. */
+ hash->elf.root.type = bfd_link_hash_defweak;
+ hash->elf.root.u.def.section = code_sec;
+ hash->elf.root.u.def.value = sym_value;
+ }
}
}
@@ -7002,12 +9225,12 @@ ppc64_elf_size_stubs (bfd *output_bfd,
_init and _fini functions, it may be that a
call to what looks like a local sym is in
fact a call needing a TOC adjustment. */
- if (sym_sec != NULL
- && sym_sec->output_section != NULL
- && (htab->stub_group[sym_sec->id].toc_off
+ if (code_sec != NULL
+ && code_sec->output_section != NULL
+ && (htab->stub_group[code_sec->id].toc_off
!= htab->stub_group[section->id].toc_off)
- && sym_sec->has_gp_reloc
- && section->has_gp_reloc)
+ && (code_sec->has_toc_reloc
+ || code_sec->makes_toc_func_call))
stub_type = ppc_stub_long_branch_r2off;
}
@@ -7017,7 +9240,8 @@ ppc64_elf_size_stubs (bfd *output_bfd,
/* __tls_get_addr calls might be eliminated. */
if (stub_type != ppc_stub_plt_call
&& hash != NULL
- && &hash->elf == htab->tls_get_addr
+ && (hash == htab->tls_get_addr
+ || hash == htab->tls_get_addr_fd)
&& section->has_tls_reloc
&& irela != internal_relocs)
{
@@ -7065,10 +9289,12 @@ ppc64_elf_size_stubs (bfd *output_bfd,
stub_entry->stub_type = stub_type;
stub_entry->target_value = sym_value;
- stub_entry->target_section = sym_sec;
+ stub_entry->target_section = code_sec;
stub_entry->h = hash;
stub_entry->addend = irela->r_addend;
- stub_changed = TRUE;
+
+ if (stub_entry->h != NULL)
+ htab->stub_globals += 1;
}
/* We're done with the internal relocs, free them. */
@@ -7086,34 +9312,41 @@ ppc64_elf_size_stubs (bfd *output_bfd,
}
}
- if (!stub_changed)
- break;
-
- /* OK, we've added some stubs. Find out the new size of the
+ /* We may have added some stubs. Find out the new size of the
stub sections. */
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
{
- stub_sec->_raw_size = 0;
- stub_sec->_cooked_size = 0;
+ stub_sec->rawsize = stub_sec->size;
+ stub_sec->size = 0;
+ stub_sec->reloc_count = 0;
}
- htab->brlt->_raw_size = 0;
- htab->brlt->_cooked_size = 0;
- if (info->shared)
- {
- htab->relbrlt->_raw_size = 0;
- htab->relbrlt->_cooked_size = 0;
- }
+
+ htab->brlt->size = 0;
+ if (htab->relbrlt != NULL)
+ htab->relbrlt->size = 0;
bfd_hash_traverse (&htab->stub_hash_table, ppc_size_one_stub, info);
+ for (stub_sec = htab->stub_bfd->sections;
+ stub_sec != NULL;
+ stub_sec = stub_sec->next)
+ if ((stub_sec->flags & SEC_LINKER_CREATED) == 0
+ && stub_sec->rawsize != stub_sec->size)
+ break;
+
+ /* Exit from this loop when no stubs have been added, and no stubs
+ have changed size. */
+ if (stub_sec == NULL)
+ break;
+
/* Ask the linker to do its stuff. */
(*htab->layout_sections_again) ();
}
- /* It would be nice to strip .branch_lt from the output if the
+ /* It would be nice to strip htab->brlt from the output if the
section is empty, but it's too late. If we strip sections here,
the dynamic symbol table is corrupted since the section symbol
for the stripped section isn't written. */
@@ -7192,22 +9425,21 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
int stub_sec_count = 0;
htab->emit_stub_syms = emit_stub_syms;
+
+ /* Allocate memory to hold the linker stubs. */
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
- if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+ if ((stub_sec->flags & SEC_LINKER_CREATED) == 0
+ && stub_sec->size != 0)
{
- bfd_size_type size;
-
- /* Allocate memory to hold the linker stubs. */
- size = stub_sec->_raw_size;
- if (size != 0)
- {
- stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
- if (stub_sec->contents == NULL)
- return FALSE;
- }
- stub_sec->_cooked_size = 0;
+ stub_sec->contents = bfd_zalloc (htab->stub_bfd, stub_sec->size);
+ if (stub_sec->contents == NULL)
+ return FALSE;
+ /* We want to check that built size is the same as calculated
+ size. rawsize is a convenient location to use. */
+ stub_sec->rawsize = stub_sec->size;
+ stub_sec->size = 0;
}
if (htab->glink != NULL && htab->glink->contents != NULL)
@@ -7239,10 +9471,11 @@ 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->elf_link_hash_flags = (ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_DEF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_FORCED_LOCAL);
+ h->ref_regular = 1;
+ h->def_regular = 1;
+ h->ref_regular_nonweak = 1;
+ h->forced_local = 1;
+ h->non_elf = 0;
}
}
p = htab->glink->contents;
@@ -7281,7 +9514,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
/* Build the .glink lazy link call stubs. */
indx = 0;
- while (p < htab->glink->contents + htab->glink->_raw_size)
+ while (p < htab->glink->contents + htab->glink->size)
{
if (indx < 0x8000)
{
@@ -7300,20 +9533,20 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
indx++;
p += 4;
}
- htab->glink->_cooked_size = p - htab->glink->contents;
+ htab->glink->rawsize = p - htab->glink->contents;
}
- if (htab->brlt->_raw_size != 0)
+ if (htab->brlt->size != 0)
{
htab->brlt->contents = bfd_zalloc (htab->brlt->owner,
- htab->brlt->_raw_size);
+ htab->brlt->size);
if (htab->brlt->contents == NULL)
return FALSE;
}
- if (info->shared && htab->relbrlt->_raw_size != 0)
+ if (htab->relbrlt != NULL && htab->relbrlt->size != 0)
{
htab->relbrlt->contents = bfd_zalloc (htab->relbrlt->owner,
- htab->relbrlt->_raw_size);
+ htab->relbrlt->size);
if (htab->relbrlt->contents == NULL)
return FALSE;
}
@@ -7327,12 +9560,12 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
{
stub_sec_count += 1;
- if (stub_sec->_raw_size != stub_sec->_cooked_size)
+ if (stub_sec->rawsize != stub_sec->size)
break;
}
if (stub_sec != NULL
- || htab->glink->_raw_size != htab->glink->_cooked_size)
+ || htab->glink->rawsize != htab->glink->size)
{
htab->stub_error = TRUE;
(*_bfd_error_handler) (_("stubs don't match calculated size"));
@@ -7347,13 +9580,14 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
if (*stats == NULL)
return FALSE;
- sprintf (*stats, _("linker stubs in %u groups\n"
+ sprintf (*stats, _("linker stubs in %u group%s\n"
" branch %lu\n"
" toc adjust %lu\n"
" long branch %lu\n"
" long toc adj %lu\n"
" plt call %lu"),
stub_sec_count,
+ stub_sec_count == 1 ? "" : "s",
htab->stub_count[ppc_stub_long_branch - 1],
htab->stub_count[ppc_stub_long_branch_r2off - 1],
htab->stub_count[ppc_stub_plt_branch - 1],
@@ -7363,6 +9597,52 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
return TRUE;
}
+/* This function undoes the changes made by add_symbol_adjust. */
+
+static bfd_boolean
+undo_symbol_twiddle (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
+{
+ struct ppc_link_hash_entry *eh;
+
+ if (h->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;
+
+ eh = (struct ppc_link_hash_entry *) h;
+ if (eh->elf.root.type != bfd_link_hash_undefweak || !eh->was_undefined)
+ return TRUE;
+
+ eh->elf.root.type = bfd_link_hash_undefined;
+ return TRUE;
+}
+
+void
+ppc64_elf_restore_symbols (struct bfd_link_info *info)
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ elf_link_hash_traverse (&htab->elf, undo_symbol_twiddle, info);
+}
+
+/* What to do when ld finds relocations against symbols defined in
+ discarded sections. */
+
+static unsigned int
+ppc64_elf_action_discarded (asection *sec)
+{
+ if (strcmp (".opd", sec->name) == 0)
+ return 0;
+
+ if (strcmp (".toc", sec->name) == 0)
+ return 0;
+
+ if (strcmp (".toc1", sec->name) == 0)
+ return 0;
+
+ return _bfd_elf_default_action_discarded (sec);
+}
+
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
@@ -7416,14 +9696,16 @@ ppc64_elf_relocate_section (bfd *output_bfd,
/* Disabled until we sort out how ld should choose 'y' vs 'at'. */
bfd_boolean is_power4 = FALSE;
- if (info->relocatable)
- return TRUE;
-
/* Initialize howto table if needed. */
if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
ppc_howto_init ();
htab = ppc_hash_table (info);
+
+ /* Don't relocate stub sections. */
+ if (input_section->owner == htab->stub_bfd)
+ return TRUE;
+
local_got_ents = elf_local_got_ents (input_bfd);
TOCstart = elf_gp (output_bfd);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -7435,12 +9717,13 @@ ppc64_elf_relocate_section (bfd *output_bfd,
for (; rel < relend; rel++)
{
enum elf_ppc64_reloc_type r_type;
- bfd_vma addend;
+ bfd_vma addend, orig_addend;
bfd_reloc_status_type r;
Elf_Internal_Sym *sym;
asection *sec;
- struct elf_link_hash_entry *h;
- struct elf_link_hash_entry *fdh;
+ struct elf_link_hash_entry *h_elf;
+ struct ppc_link_hash_entry *h;
+ struct ppc_link_hash_entry *fdh;
const char *sym_name;
unsigned long r_symndx, toc_symndx;
char tls_mask, tls_gd, tls_type;
@@ -7467,37 +9750,56 @@ ppc64_elf_relocate_section (bfd *output_bfd,
sym = NULL;
sec = NULL;
- h = NULL;
+ h_elf = NULL;
sym_name = NULL;
unresolved_reloc = FALSE;
warned = FALSE;
+ orig_addend = rel->r_addend;
if (r_symndx < symtab_hdr->sh_info)
{
/* It's a local symbol. */
+ long *opd_adjust;
+
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- sym_name = bfd_elf_local_sym_name (input_bfd, sym);
+ sym_name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec);
sym_type = ELF64_ST_TYPE (sym->st_info);
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
- if (elf_section_data (sec) != NULL)
+ opd_adjust = get_opd_info (sec);
+ if (opd_adjust != NULL)
{
- long *opd_sym_adjust;
-
- opd_sym_adjust = ppc64_elf_section_data (sec)->opd.adjust;
- if (opd_sym_adjust != NULL)
- relocation += opd_sym_adjust[sym->st_value / 24];
+ long adjust = opd_adjust[(sym->st_value + rel->r_addend) / 8];
+ if (adjust == -1)
+ relocation = 0;
+ else
+ {
+ /* If this is a relocation against the opd section sym
+ and we have edited .opd, adjust the reloc addend so
+ that ld -r and ld --emit-relocs output is correct.
+ If it is a reloc against some other .opd symbol,
+ then the symbol value will be adjusted later. */
+ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ rel->r_addend += adjust;
+ else
+ 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, sec, relocation,
+ h_elf, sec, relocation,
unresolved_reloc, warned);
- sym_name = h->root.root.string;
- sym_type = h->type;
+ sym_name = h_elf->root.root.string;
+ sym_type = h_elf->type;
}
+ h = (struct ppc_link_hash_entry *) h_elf;
/* TLS optimizations. Replace instruction sequences and relocs
based on information we collected in tls_optimize. We edit
@@ -7509,7 +9811,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (IS_PPC64_TLS_RELOC (r_type))
{
if (h != NULL)
- tls_mask = ((struct ppc_link_hash_entry *) h)->tls_mask;
+ tls_mask = h->tls_mask;
else if (local_got_ents != NULL)
{
char *lgot_masks;
@@ -7535,8 +9837,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (r_symndx != 0
&& r_type != R_PPC64_NONE
&& (h == NULL
- || h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
+ || h->elf.root.type == bfd_link_hash_defined
+ || h->elf.root.type == bfd_link_hash_defweak)
&& IS_PPC64_TLS_RELOC (r_type) != (sym_type == STT_TLS))
{
if (r_type == R_PPC64_TLS && tls_mask != 0)
@@ -7545,10 +9847,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
else
(*_bfd_error_handler)
(sym_type == STT_TLS
- ? _("%s(%s+0x%lx): %s used with TLS symbol %s")
- : _("%s(%s+0x%lx): %s used with non-TLS symbol %s"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+ : _("%B(%A+0x%lx): %s used with non-TLS symbol %s"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name);
@@ -7753,7 +10055,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
while (h2->root.type == bfd_link_hash_indirect
|| h2->root.type == bfd_link_hash_warning)
h2 = (struct elf_link_hash_entry *) h2->root.u.i.link;
- if (h2 == NULL || h2 != htab->tls_get_addr)
+ if (h2 == NULL || (h2 != &htab->tls_get_addr->elf
+ && h2 != &htab->tls_get_addr_fd->elf))
break;
/* OK, it checks out. Replace the call. */
@@ -7857,6 +10160,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
/* Handle other relocations that tweak non-addend part of insn. */
insn = 0;
+ max_br_offset = 1 << 25;
+ addend = rel->r_addend;
switch (r_type)
{
default:
@@ -7873,31 +10178,11 @@ ppc64_elf_relocate_section (bfd *output_bfd,
case R_PPC64_REL14_BRNTAKEN:
insn |= bfd_get_32 (output_bfd,
contents + rel->r_offset) & ~(0x01 << 21);
- if (is_power4)
- {
- /* Set 'a' bit. This is 0b00010 in BO field for branch
- on CR(BI) insns (BO == 001at or 011at), and 0b01000
- for branch on CTR insns (BO == 1a00t or 1a01t). */
- if ((insn & (0x14 << 21)) == (0x04 << 21))
- insn |= 0x02 << 21;
- else if ((insn & (0x14 << 21)) == (0x10 << 21))
- insn |= 0x08 << 21;
- else
- break;
- }
- else
- {
- from = (rel->r_offset
- + input_section->output_offset
- + input_section->output_section->vma);
-
- /* Invert 'y' bit if not the default. */
- if ((bfd_signed_vma) (relocation + rel->r_addend - from) < 0)
- insn ^= 0x01 << 21;
- }
+ /* Fall thru. */
- bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
- break;
+ case R_PPC64_REL14:
+ max_br_offset = 1 << 15;
+ /* Fall thru. */
case R_PPC64_REL24:
/* Calls to functions with a different TOC, such as calls to
@@ -7906,11 +10191,15 @@ ppc64_elf_relocate_section (bfd *output_bfd,
linkage stubs needs to be followed by a nop, as the nop
will be replaced with an instruction to restore the TOC
base pointer. */
+ stub_entry = NULL;
+ fdh = h;
if (((h != NULL
- && (fdh = ((struct ppc_link_hash_entry *) h)->oh) != NULL
- && fdh->plt.plist != NULL)
- || ((fdh = h, sec) != NULL
+ && (((fdh = h->oh) != NULL
+ && fdh->elf.plt.plist != NULL)
+ || (fdh = h)->elf.plt.plist != NULL))
+ || (sec != NULL
&& sec->output_section != NULL
+ && sec->id <= htab->top_id
&& (htab->stub_group[sec->id].toc_off
!= htab->stub_group[input_section->id].toc_off)))
&& (stub_entry = ppc_get_stub_entry (input_section, sec, fdh,
@@ -7919,17 +10208,18 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|| stub_entry->stub_type == ppc_stub_plt_branch_r2off
|| stub_entry->stub_type == ppc_stub_long_branch_r2off))
{
- bfd_boolean can_plt_call = 0;
+ bfd_boolean can_plt_call = FALSE;
- if (rel->r_offset + 8 <= input_section->_cooked_size)
+ if (rel->r_offset + 8 <= input_section->size)
{
- insn = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
- if (insn == NOP
- || insn == CROR_151515 || insn == CROR_313131)
+ unsigned long nop;
+ nop = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
+ if (nop == NOP
+ || nop == CROR_151515 || nop == CROR_313131)
{
bfd_put_32 (input_bfd, LD_R2_40R1,
contents + rel->r_offset + 4);
- can_plt_call = 1;
+ can_plt_call = TRUE;
}
}
@@ -7938,17 +10228,22 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (stub_entry->stub_type == ppc_stub_plt_call)
{
/* If this is a plain branch rather than a branch
- and link, don't require a nop. */
- insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- if ((insn & 1) == 0)
- can_plt_call = 1;
+ and link, don't require a nop. However, don't
+ allow tail calls in a shared library as they
+ will result in r2 being corrupted. */
+ unsigned long br;
+ br = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ if (info->executable && (br & 1) == 0)
+ can_plt_call = TRUE;
+ else
+ stub_entry = NULL;
}
else if (h != NULL
- && strcmp (h->root.root.string,
+ && strcmp (h->elf.root.root.string,
".__libc_start_main") == 0)
{
/* Allow crt1 branch to go via a toc adjusting stub. */
- can_plt_call = 1;
+ can_plt_call = TRUE;
}
else
{
@@ -7957,21 +10252,21 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|| strcmp (input_section->output_section->name,
".fini") == 0)
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): automatic multiple TOCs "
+ (_("%B(%A+0x%lx): automatic multiple TOCs "
"not supported using your crt files; "
"recompile with -mminimal-toc or upgrade gcc"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ input_bfd,
+ input_section,
(long) rel->r_offset);
else
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): sibling call optimization to `%s' "
+ (_("%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"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ input_bfd,
+ input_section,
(long) rel->r_offset,
sym_name,
sym_name);
@@ -7980,51 +10275,97 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
}
- if (can_plt_call)
+ if (can_plt_call
+ && stub_entry->stub_type == ppc_stub_plt_call)
+ unresolved_reloc = FALSE;
+ }
+
+ if (stub_entry == NULL
+ && get_opd_info (sec) != NULL)
+ {
+ /* The branch destination is the value of the opd entry. */
+ bfd_vma off = (relocation + addend
+ - sec->output_section->vma
+ - sec->output_offset);
+ bfd_vma dest = opd_entry_value (sec, off, NULL, NULL);
+ if (dest != (bfd_vma) -1)
+ {
+ relocation = dest;
+ addend = 0;
+ }
+ }
+
+ /* If the branch is out of reach we ought to have a long
+ branch stub. */
+ from = (rel->r_offset
+ + input_section->output_offset
+ + input_section->output_section->vma);
+
+ if (stub_entry == NULL
+ && (relocation + addend - from + max_br_offset
+ >= 2 * max_br_offset)
+ && r_type != R_PPC64_ADDR14_BRTAKEN
+ && r_type != R_PPC64_ADDR14_BRNTAKEN)
+ stub_entry = ppc_get_stub_entry (input_section, sec, h, rel,
+ htab);
+
+ if (stub_entry != NULL)
+ {
+ /* Munge up the value and addend so that we call the stub
+ rather than the procedure directly. */
+ relocation = (stub_entry->stub_offset
+ + stub_entry->stub_sec->output_offset
+ + stub_entry->stub_sec->output_section->vma);
+ addend = 0;
+ }
+
+ if (insn != 0)
+ {
+ if (is_power4)
{
- relocation = (stub_entry->stub_offset
- + stub_entry->stub_sec->output_offset
- + stub_entry->stub_sec->output_section->vma);
- if (stub_entry->stub_type == ppc_stub_plt_call)
- unresolved_reloc = FALSE;
+ /* Set 'a' bit. This is 0b00010 in BO field for branch
+ on CR(BI) insns (BO == 001at or 011at), and 0b01000
+ for branch on CTR insns (BO == 1a00t or 1a01t). */
+ if ((insn & (0x14 << 21)) == (0x04 << 21))
+ insn |= 0x02 << 21;
+ else if ((insn & (0x14 << 21)) == (0x10 << 21))
+ insn |= 0x08 << 21;
+ else
+ break;
+ }
+ else
+ {
+ /* Invert 'y' bit if not the default. */
+ if ((bfd_signed_vma) (relocation + addend - from) < 0)
+ insn ^= 0x01 << 21;
}
+
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
}
- if (h != NULL
- && h->root.type == bfd_link_hash_undefweak
- && relocation == 0
- && rel->r_addend == 0)
+ /* NOP out calls to undefined weak functions.
+ We can thus call a weak function without first
+ checking whether the function is defined. */
+ else if (h != NULL
+ && h->elf.root.type == bfd_link_hash_undefweak
+ && r_type == R_PPC64_REL24
+ && relocation == 0
+ && addend == 0)
{
- /* Tweak calls to undefined weak functions to point at a
- blr. We can thus call a weak function without first
- checking whether the function is defined. We have a
- blr at the end of .sfpr. */
- BFD_ASSERT (htab->sfpr->_raw_size != 0);
- relocation = (htab->sfpr->_raw_size - 4
- + htab->sfpr->output_offset
- + htab->sfpr->output_section->vma);
- from = (rel->r_offset
- + input_section->output_offset
- + input_section->output_section->vma);
-
- /* But let's not be silly about it. If the blr isn't in
- reach, just go to the next instruction. */
- if (relocation - from + (1 << 25) >= (1 << 26)
- || htab->sfpr->_raw_size == 0)
- relocation = from + 4;
+ bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
+ continue;
}
break;
}
/* Set `addend'. */
tls_type = 0;
- addend = rel->r_addend;
switch (r_type)
{
default:
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d for symbol %s"),
- bfd_archive_filename (input_bfd), (int) r_type, sym_name);
+ (_("%B: unknown relocation type %d for symbol %s"),
+ input_bfd, (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
@@ -8085,7 +10426,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (tls_type == (TLS_TLS | TLS_LD)
&& (h == NULL
- || !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)))
+ || !h->elf.def_dynamic))
offp = &ppc64_tlsld_got (input_bfd)->offset;
else
{
@@ -8094,9 +10435,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (h != NULL)
{
bfd_boolean dyn = htab->elf.dynamic_sections_created;
- if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared,
+ &h->elf)
|| (info->shared
- && SYMBOL_REFERENCES_LOCAL (info, h)))
+ && SYMBOL_REFERENCES_LOCAL (info, &h->elf)))
/* This is actually a static link, or it is a
-Bsymbolic link and the symbol is defined
locally, or the symbol was forced to be local
@@ -8104,10 +10446,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
;
else
{
- indx = h->dynindx;
+ indx = h->elf.dynindx;
unresolved_reloc = FALSE;
}
- ent = h->got.glist;
+ ent = h->elf.got.glist;
}
else
{
@@ -8117,7 +10459,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
for (; ent != NULL; ent = ent->next)
- if (ent->addend == rel->r_addend
+ if (ent->addend == orig_addend
&& ent->owner == input_bfd
&& ent->tls_type == tls_type)
break;
@@ -8146,13 +10488,13 @@ ppc64_elf_relocate_section (bfd *output_bfd,
*offp = off | 1;
if ((info->shared || indx != 0)
&& (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak))
+ || ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
+ || h->elf.root.type != bfd_link_hash_undefweak))
{
outrel.r_offset = (got->output_section->vma
+ got->output_offset
+ off);
- outrel.r_addend = rel->r_addend;
+ outrel.r_addend = addend;
if (tls_type & (TLS_LD | TLS_GD))
{
outrel.r_addend = 0;
@@ -8165,7 +10507,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
bfd_elf64_swap_reloca_out (output_bfd,
&outrel, loc);
outrel.r_offset += 8;
- outrel.r_addend = rel->r_addend;
+ outrel.r_addend = addend;
outrel.r_info
= ELF64_R_INFO (indx, R_PPC64_DTPREL64);
}
@@ -8203,7 +10545,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
emitting a reloc. */
else
{
- relocation += rel->r_addend;
+ relocation += addend;
if (tls_type == (TLS_TLS | TLS_LD))
relocation = 1;
else if (tls_type != 0)
@@ -8255,8 +10597,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (htab->plt != NULL)
{
struct plt_entry *ent;
- for (ent = h->plt.plist; ent != NULL; ent = ent->next)
- if (ent->addend == rel->r_addend
+ for (ent = h->elf.plt.plist; ent != NULL; ent = ent->next)
+ if (ent->addend == orig_addend
&& ent->plt.offset != (bfd_vma) -1)
{
relocation = (htab->plt->output_section->vma
@@ -8395,17 +10737,17 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if ((info->shared
&& (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak)
+ || ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
+ || h->elf.root.type != bfd_link_hash_undefweak)
&& (MUST_BE_DYN_RELOC (r_type)
- || !SYMBOL_CALLS_LOCAL (info, h)))
+ || !SYMBOL_CALLS_LOCAL (info, &h->elf)))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& h != NULL
- && h->dynindx != -1
- && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ && h->elf.dynindx != -1
+ && !h->elf.non_got_ref
+ && h->elf.def_dynamic
+ && !h->elf.def_regular))
{
Elf_Internal_Rela outrel;
bfd_boolean skip, relocate;
@@ -8444,10 +10786,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (skip)
memset (&outrel, 0, sizeof outrel);
- else if (!SYMBOL_REFERENCES_LOCAL (info, h)
+ else if (!SYMBOL_REFERENCES_LOCAL (info, &h->elf)
&& !is_opd
&& r_type != R_PPC64_TOC)
- outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
+ outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
else
{
/* This symbol is local, or marked to become local,
@@ -8512,6 +10854,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (sreloc == NULL)
abort ();
+ if (sreloc->reloc_count * sizeof (Elf64_External_Rela)
+ >= sreloc->size)
+ abort ();
loc = sreloc->contents;
loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
@@ -8563,8 +10908,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
/* These ones haven't been implemented yet. */
(*_bfd_error_handler)
- (_("%s: relocation %s is not supported for symbol %s."),
- bfd_archive_filename (input_bfd),
+ (_("%B: relocation %s is not supported for symbol %s."),
+ input_bfd,
ppc64_elf_howto_table[r_type]->name, sym_name);
bfd_set_error (bfd_error_invalid_operation);
@@ -8642,8 +10987,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (((relocation + addend) & mask) != 0)
{
(*_bfd_error_handler)
- (_("%s: error: relocation %s not a multiple of %d"),
- bfd_archive_filename (input_bfd),
+ (_("%B: error: relocation %s not a multiple of %d"),
+ input_bfd,
ppc64_elf_howto_table[r_type]->name,
mask + 1);
bfd_set_error (bfd_error_bad_value);
@@ -8651,40 +10996,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
continue;
}
break;
-
- case R_PPC64_REL14:
- case R_PPC64_REL14_BRNTAKEN:
- case R_PPC64_REL14_BRTAKEN:
- max_br_offset = 1 << 15;
- goto branch_check;
-
- case R_PPC64_REL24:
- max_br_offset = 1 << 25;
-
- branch_check:
- /* If the branch is out of reach or the TOC register needs
- adjusting, then redirect the call to the local stub for
- this function. */
- from = (rel->r_offset
- + input_section->output_offset
- + input_section->output_section->vma);
- if ((relocation + addend - from + max_br_offset >= 2 * max_br_offset
- || (sec != NULL
- && sec->output_section != NULL
- && sec->id <= htab->top_id
- && (htab->stub_group[sec->id].toc_off
- != htab->stub_group[input_section->id].toc_off)))
- && (stub_entry = ppc_get_stub_entry (input_section, sec, h,
- rel, htab)) != NULL)
- {
- /* Munge up the value and addend so that we call the stub
- rather than the procedure directly. */
- relocation = (stub_entry->stub_offset
- + stub_entry->stub_sec->output_offset
- + stub_entry->stub_sec->output_section->vma);
- addend = 0;
- }
- break;
}
/* Dynamic relocs are not propagated for SEC_DEBUGGING sections
@@ -8692,15 +11003,15 @@ ppc64_elf_relocate_section (bfd *output_bfd,
not process them. */
if (unresolved_reloc
&& !((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
+ && h->elf.def_dynamic))
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
ppc64_elf_howto_table[(int) r_type]->name,
- h->root.root.string);
+ h->elf.root.root.string);
ret = FALSE;
}
@@ -8721,7 +11032,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (warned)
continue;
if (h != NULL
- && h->root.type == bfd_link_hash_undefweak
+ && h->elf.root.type == bfd_link_hash_undefweak
&& ppc64_elf_howto_table[r_type]->pc_relative)
{
/* Assume this is a call protected by other code that
@@ -8734,16 +11045,17 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
if (!((*info->callbacks->reloc_overflow)
- (info, sym_name, ppc64_elf_howto_table[r_type]->name,
- rel->r_addend, input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->elf.root : NULL), sym_name,
+ ppc64_elf_howto_table[r_type]->name,
+ orig_addend, input_bfd, input_section, rel->r_offset)))
return FALSE;
}
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): %s reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): %s reloc against `%s': error %d"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name,
@@ -8753,6 +11065,22 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
}
+ /* If we're emitting relocations, then shortly after this function
+ returns, reloc offsets and addends for this section will be
+ adjusted. Worse, reloc symbol indices will be for the output
+ file rather than the input. Save a copy of the relocs for
+ opd_entry_value. */
+ if (is_opd && (info->emitrelocations || info->relocatable))
+ {
+ bfd_size_type amt;
+ amt = input_section->reloc_count * sizeof (Elf_Internal_Rela);
+ rel = bfd_alloc (input_bfd, amt);
+ BFD_ASSERT (ppc64_elf_tdata (input_bfd)->opd_relocs == NULL);
+ ppc64_elf_tdata (input_bfd)->opd_relocs = rel;
+ if (rel == NULL)
+ return FALSE;
+ memcpy (rel, relocs, amt);
+ }
return ret;
}
@@ -8765,20 +11093,25 @@ ppc64_elf_output_symbol_hook (struct bfd_link_info *info,
asection *input_sec,
struct elf_link_hash_entry *h)
{
- long *adjust;
+ long *opd_adjust, adjust;
bfd_vma value;
- if (h != NULL
- || input_sec == NULL
- || ppc64_elf_section_data (input_sec) == NULL
- || (adjust = ppc64_elf_section_data (input_sec)->opd.adjust) == NULL)
+ if (h != NULL)
+ return TRUE;
+
+ opd_adjust = get_opd_info (input_sec);
+ if (opd_adjust == NULL)
return TRUE;
value = elfsym->st_value - input_sec->output_offset;
if (!info->relocatable)
value -= input_sec->output_section->vma;
- elfsym->st_value += adjust[value / 24];
+ adjust = opd_adjust[value / 8];
+ if (adjust == -1)
+ elfsym->st_value = 0;
+ else
+ elfsym->st_value += adjust;
return TRUE;
}
@@ -8793,43 +11126,39 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd,
{
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;
- if (((struct ppc_link_hash_entry *) h)->is_func_descriptor)
- {
- struct plt_entry *ent;
- Elf_Internal_Rela rela;
- bfd_byte *loc;
-
- for (ent = h->plt.plist; ent != NULL; ent = ent->next)
- if (ent->plt.offset != (bfd_vma) -1)
- {
- /* This symbol has an entry in the procedure linkage
- table. Set it up. */
-
- if (htab->plt == NULL
- || htab->relplt == NULL
- || htab->glink == NULL)
- abort ();
-
- /* Create a JMP_SLOT reloc to inform the dynamic linker to
- fill in the PLT entry. */
- rela.r_offset = (htab->plt->output_section->vma
- + htab->plt->output_offset
- + ent->plt.offset);
- rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT);
- rela.r_addend = ent->addend;
-
- loc = htab->relplt->contents;
- loc += ((ent->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
- * sizeof (Elf64_External_Rela));
- bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
- }
- }
+ for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+ if (ent->plt.offset != (bfd_vma) -1)
+ {
+ /* This symbol has an entry in the procedure linkage
+ table. Set it up. */
+
+ if (htab->plt == NULL
+ || htab->relplt == NULL
+ || htab->glink == NULL)
+ abort ();
+
+ /* Create a JMP_SLOT reloc to inform the dynamic linker to
+ fill in the PLT entry. */
+ rela.r_offset = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ + ent->plt.offset);
+ rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT);
+ rela.r_addend = ent->addend;
+
+ loc = htab->relplt->contents;
+ loc += ((ent->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
+ * sizeof (Elf64_External_Rela));
+ bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
+ }
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ if (h->needs_copy)
{
Elf_Internal_Rela rela;
bfd_byte *loc;
@@ -8903,7 +11232,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
abort ();
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -8937,7 +11266,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
s = bfd_get_section_by_name (output_bfd, ".opd");
if (s == NULL)
continue;
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
case DT_PLTGOT:
@@ -8951,7 +11280,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
break;
case DT_PLTRELSZ:
- dyn.d_un.d_val = htab->relplt->_raw_size;
+ dyn.d_un.d_val = htab->relplt->size;
break;
case DT_RELASZ:
@@ -8960,7 +11289,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
s = htab->relplt;
if (s == NULL)
continue;
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
break;
case DT_RELA:
@@ -8972,7 +11301,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
continue;
if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
continue;
- dyn.d_un.d_ptr += s->_raw_size;
+ dyn.d_un.d_ptr += s->size;
break;
}
@@ -8980,7 +11309,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
}
}
- if (htab->got != NULL && htab->got->_raw_size != 0)
+ if (htab->got != NULL && htab->got->size != 0)
{
/* Fill in the first entry in the global offset table.
We use it to hold the link-time TOCbase. */
@@ -8992,7 +11321,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
elf_section_data (htab->got->output_section)->this_hdr.sh_entsize = 8;
}
- if (htab->plt != NULL && htab->plt->_raw_size != 0)
+ if (htab->plt != NULL && htab->plt->size != 0)
{
/* Set .plt entry size. */
elf_section_data (htab->plt->output_section)->this_hdr.sh_entsize
@@ -9000,29 +11329,30 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
}
/* We need to handle writing out multiple GOT sections ourselves,
- since we didn't add them to DYNOBJ. */
+ since we didn't add them to DYNOBJ. We know dynobj is the first
+ bfd. */
while ((dynobj = dynobj->link_next) != NULL)
{
asection *s;
- if (bfd_get_flavour (dynobj) != bfd_target_elf_flavour)
+ if (!is_ppc64_elf_target (dynobj->xvec))
continue;
s = ppc64_elf_tdata (dynobj)->got;
if (s != NULL
- && s->_raw_size != 0
+ && s->size != 0
&& s->output_section != bfd_abs_section_ptr
&& !bfd_set_section_contents (output_bfd, s->output_section,
s->contents, s->output_offset,
- s->_raw_size))
+ s->size))
return FALSE;
s = ppc64_elf_tdata (dynobj)->relgot;
if (s != NULL
- && s->_raw_size != 0
+ && s->size != 0
&& s->output_section != bfd_abs_section_ptr
&& !bfd_set_section_contents (output_bfd, s->output_section,
s->contents, s->output_offset,
- s->_raw_size))
+ s->size))
return FALSE;
}
diff --git a/contrib/binutils/bfd/elf64-ppc.h b/contrib/binutils/bfd/elf64-ppc.h
index 998e7e13e0e1..a27e93e95de0 100644
--- a/contrib/binutils/bfd/elf64-ppc.h
+++ b/contrib/binutils/bfd/elf64-ppc.h
@@ -1,5 +1,5 @@
/* PowerPC64-specific support for 64-bit ELF.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,22 +15,22 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
void ppc64_elf_init_stub_bfd
(bfd *, struct bfd_link_info *);
-bfd_boolean ppc64_elf_mark_entry_syms
- (struct bfd_link_info *);
bfd_boolean ppc64_elf_edit_opd
- (bfd *, struct bfd_link_info *);
+ (bfd *, struct bfd_link_info *, bfd_boolean, bfd_boolean);
asection *ppc64_elf_tls_setup
(bfd *, struct bfd_link_info *);
bfd_boolean ppc64_elf_tls_optimize
(bfd *, struct bfd_link_info *);
+bfd_boolean ppc64_elf_edit_toc
+ (bfd *, struct bfd_link_info *);
bfd_vma ppc64_elf_toc
(bfd *);
int ppc64_elf_setup_section_lists
- (bfd *, struct bfd_link_info *);
+ (bfd *, struct bfd_link_info *, int);
void ppc64_elf_next_toc_section
(struct bfd_link_info *, asection *);
void ppc64_elf_reinit_toc
@@ -42,3 +42,5 @@ bfd_boolean ppc64_elf_size_stubs
asection *(*) (const char *, asection *), void (*) (void));
bfd_boolean ppc64_elf_build_stubs
(bfd_boolean, struct bfd_link_info *, char **);
+void ppc64_elf_restore_symbols
+ (struct bfd_link_info *info);
diff --git a/contrib/binutils/bfd/elf64-s390.c b/contrib/binutils/bfd/elf64-s390.c
index 63a261a8e88c..1fe0c6ca915c 100644
--- a/contrib/binutils/bfd/elf64-s390.c
+++ b/contrib/binutils/bfd/elf64-s390.c
@@ -1,5 +1,6 @@
/* IBM S/390-specific support for 64-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Contributed Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of BFD, the Binary File Descriptor library.
@@ -16,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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -40,7 +41,7 @@ static bfd_boolean create_got_section
static bfd_boolean elf_s390_create_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
static void elf_s390_copy_indirect_symbol
- PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -372,7 +373,8 @@ elf_s390_info_to_howto (abfd, cache_ptr, dst)
arelent *cache_ptr;
Elf_Internal_Rela *dst;
{
- switch (ELF64_R_TYPE(dst->r_info))
+ unsigned int r_type = ELF64_R_TYPE(dst->r_info);
+ switch (r_type)
{
case R_390_GNU_VTINHERIT:
cache_ptr->howto = &elf64_s390_vtinherit_howto;
@@ -383,8 +385,13 @@ elf_s390_info_to_howto (abfd, cache_ptr, dst)
break;
default:
- BFD_ASSERT (ELF64_R_TYPE(dst->r_info) < (unsigned int) R_390_max);
- cache_ptr->howto = &elf_howto_table[ELF64_R_TYPE(dst->r_info)];
+ if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0]))
+ {
+ (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
+ abfd, (int) r_type);
+ r_type = R_390_NONE;
+ }
+ cache_ptr->howto = &elf_howto_table[r_type];
}
}
@@ -432,7 +439,7 @@ s390_elf_ldisp_reloc (abfd, reloc_entry, symbol, data, input_section,
if (output_bfd != NULL)
return bfd_reloc_continue;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = (symbol->value
@@ -717,7 +724,8 @@ elf_s390_link_hash_table_create (abfd)
if (ret == NULL)
return NULL;
- if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc))
+ if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
+ sizeof (struct elf_s390_link_hash_entry)))
{
free (ret);
return NULL;
@@ -755,12 +763,13 @@ create_got_section (dynobj, info)
if (!htab->sgot || !htab->sgotplt)
abort ();
- htab->srelgot = bfd_make_section (dynobj, ".rela.got");
+ htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got",
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (htab->srelgot == NULL
- || ! bfd_set_section_flags (dynobj, htab->srelgot,
- (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED
- | SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, htab->srelgot, 3))
return FALSE;
return TRUE;
@@ -800,8 +809,8 @@ elf_s390_create_dynamic_sections (dynobj, info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf_s390_copy_indirect_symbol (bed, dir, ind)
- const struct elf_backend_data *bed;
+elf_s390_copy_indirect_symbol (info, dir, ind)
+ struct bfd_link_info *info;
struct elf_link_hash_entry *dir, *ind;
{
struct elf_s390_link_hash_entry *edir, *eind;
@@ -816,10 +825,7 @@ elf_s390_copy_indirect_symbol (bed, dir, ind)
struct elf_s390_dyn_relocs **pp;
struct elf_s390_dyn_relocs *p;
- if (ind->root.type == bfd_link_hash_indirect)
- abort ();
-
- /* Add reloc counts against the weak sym to the strong sym
+ /* Add reloc counts against the indirect sym to the direct sym
list. Merge any entries against the same section. */
for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
{
@@ -852,17 +858,18 @@ elf_s390_copy_indirect_symbol (bed, dir, ind)
if (ELIMINATE_COPY_RELOCS
&& ind->root.type != bfd_link_hash_indirect
- && (dir->elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
- /* If called to transfer flags for a weakdef during processing
- of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
- We clear it ourselves for ELIMINATE_COPY_RELOCS. */
- dir->elf_link_hash_flags |=
- (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_HASH_NEEDS_PLT));
+ && dir->dynamic_adjusted)
+ {
+ /* If called to transfer flags for a weakdef during processing
+ of elf_adjust_dynamic_symbol, don't copy non_got_ref.
+ We clear it ourselves for ELIMINATE_COPY_RELOCS. */
+ dir->ref_dynamic |= ind->ref_dynamic;
+ dir->ref_regular |= ind->ref_regular;
+ dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
+ dir->needs_plt |= ind->needs_plt;
+ }
else
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+ _bfd_elf_link_hash_copy_indirect (info, dir, ind);
}
static int
@@ -933,8 +940,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd,
r_symndx);
return FALSE;
}
@@ -942,7 +949,12 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ {
+ 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;
+ }
/* Create got section and local_got_refcounts array if they
are needed. */
@@ -1028,7 +1040,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
creating a procedure linkage table entry. */
if (h != NULL)
{
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 1;
h->plt.refcount += 1;
}
break;
@@ -1050,7 +1062,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
((struct elf_s390_link_hash_entry *) h)->gotplt_refcount++;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 1;
h->plt.refcount += 1;
}
else
@@ -1119,8 +1131,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (old_tls_type == GOT_NORMAL || tls_type == GOT_NORMAL)
{
(*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and thread local symbol"),
- bfd_archive_filename (abfd), h->root.root.string);
+ (_("%B: `%s' accessed both as normal and thread local symbol"),
+ abfd, h->root.root.string);
return FALSE;
}
if (old_tls_type > tls_type)
@@ -1162,7 +1174,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
sections have not yet been mapped to output sections.
Tentatively set the flag for now, and correct in
adjust_dynamic_symbol. */
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 1;
/* We may need a .plt entry if the function this reloc
refers to is in a shared lib. */
@@ -1200,15 +1212,13 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
|| (h != NULL
&& (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ || !h->def_regular)))
{
struct elf_s390_dyn_relocs *p;
struct elf_s390_dyn_relocs **head;
@@ -1233,8 +1243,8 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
name + 5) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
}
if (htab->elf.dynobj == NULL)
@@ -1246,13 +1256,14 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
{
flagword flags;
- sreloc = bfd_make_section (dynobj, name);
flags = (SEC_HAS_CONTENTS | SEC_READONLY
| SEC_IN_MEMORY | SEC_LINKER_CREATED);
if ((sec->flags & SEC_ALLOC) != 0)
flags |= SEC_ALLOC | SEC_LOAD;
+ sreloc = bfd_make_section_with_flags (dynobj,
+ name,
+ flags);
if (sreloc == NULL
- || ! bfd_set_section_flags (dynobj, sreloc, flags)
|| ! bfd_set_section_alignment (dynobj, sreloc, 3))
return FALSE;
}
@@ -1272,13 +1283,15 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
easily. Oh well. */
asection *s;
+ void *vpp;
+
s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
sec, r_symndx);
if (s == NULL)
return FALSE;
- head = ((struct elf_s390_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ vpp = &elf_section_data (s)->local_dynrel;
+ head = (struct elf_s390_dyn_relocs **) vpp;
}
p = *head;
@@ -1403,6 +1416,9 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
struct elf_s390_dyn_relocs *p;
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;
eh = (struct elf_s390_link_hash_entry *) h;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
@@ -1552,12 +1568,12 @@ elf_s390_adjust_dynamic_symbol (info, h)
will fill in the contents of the procedure linkage table later
(although we could actually do it here). */
if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ || h->needs_plt)
{
if (h->plt.refcount <= 0
|| (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
+ && !h->def_dynamic
+ && !h->ref_dynamic
&& h->root.type != bfd_link_hash_undefweak
&& h->root.type != bfd_link_hash_undefined))
{
@@ -1567,7 +1583,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
such a case, we don't actually need to build a procedure
linkage table, and we can just do a PC32 reloc instead. */
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
@@ -1584,16 +1600,14 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
+ if (h->u.weakdef != NULL)
{
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
+ 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;
if (ELIMINATE_COPY_RELOCS || info->nocopyreloc)
- h->elf_link_hash_flags
- = ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
- | (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
+ h->non_got_ref = h->u.weakdef->non_got_ref;
return TRUE;
}
@@ -1609,13 +1623,13 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* If there are no references to this symbol that do not use the
GOT, we don't need to generate a copy reloc. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
+ if (!h->non_got_ref)
return TRUE;
/* If -z nocopyreloc was given, we won't generate them either. */
if (info->nocopyreloc)
{
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 0;
return TRUE;
}
@@ -1636,11 +1650,18 @@ elf_s390_adjust_dynamic_symbol (info, h)
we'll be keeping the dynamic relocs and avoiding the copy reloc. */
if (p == NULL)
{
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 0;
return TRUE;
}
}
+ if (h->size == 0)
+ {
+ (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+ h->root.root.string);
+ return TRUE;
+ }
+
/* We must allocate the symbol in our .dynbss section, which will
become part of the .bss section of the executable. There will be
an entry for this symbol in the .dynsym section. The dynamic
@@ -1658,8 +1679,8 @@ elf_s390_adjust_dynamic_symbol (info, h)
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf64_External_Rela);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ htab->srelbss->size += sizeof (Elf64_External_Rela);
+ h->needs_copy = 1;
}
/* We need to figure out the alignment required for this symbol. I
@@ -1670,7 +1691,7 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ 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))
@@ -1679,10 +1700,10 @@ elf_s390_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1720,7 +1741,7 @@ allocate_dynrelocs (h, inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -1733,10 +1754,10 @@ allocate_dynrelocs (h, inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_FIRST_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_FIRST_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1744,33 +1765,33 @@ allocate_dynrelocs (h, inf)
pointers compare as equal between the normal executable and
the shared library. */
if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->def_regular)
{
h->root.u.def.section = s;
h->root.u.def.value = h->plt.offset;
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += GOT_ENTRY_SIZE;
+ htab->sgotplt->size += GOT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelplt->size += sizeof (Elf64_External_Rela);
}
else
{
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
}
else
{
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h);
}
@@ -1788,8 +1809,8 @@ allocate_dynrelocs (h, inf)
to be stored somewhere. The immediate value in the instruction
is not bit enough so the value is stored in the got. */
{
- h->got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = htab->sgot->size;
+ htab->sgot->size += GOT_ENTRY_SIZE;
}
else
h->got.offset = (bfd_vma) -1;
@@ -1803,31 +1824,31 @@ allocate_dynrelocs (h, inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
}
s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ h->got.offset = s->size;
+ s->size += GOT_ENTRY_SIZE;
/* R_390_TLS_GD64 needs 2 consecutive GOT slots. */
if (tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
dyn = htab->elf.dynamic_sections_created;
/* R_390_TLS_IE64 needs one dynamic relocation,
R_390_TLS_GD64 needs one if local symbol and two if global. */
if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
|| tls_type >= GOT_TLS_IE)
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf64_External_Rela);
+ htab->srelgot->size += 2 * sizeof (Elf64_External_Rela);
else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
&& (info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
}
else
h->got.offset = (bfd_vma) -1;
@@ -1861,9 +1882,21 @@ allocate_dynrelocs (h, inf)
/* Also discard relocs on undefined weak syms with non-default
visibility. */
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ if (eh->dyn_relocs != NULL
&& h->root.type == bfd_link_hash_undefweak)
- eh->dyn_relocs = NULL;
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->dyn_relocs = NULL;
+
+ /* Make sure undefined weak symbols are output as a dynamic
+ symbol in PIEs. */
+ else if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+ }
}
else if (ELIMINATE_COPY_RELOCS)
{
@@ -1871,9 +1904,9 @@ allocate_dynrelocs (h, inf)
symbols which turn out to need copy relocs or are not
dynamic. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
|| (htab->elf.dynamic_sections_created
&& (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined))))
@@ -1881,7 +1914,7 @@ allocate_dynrelocs (h, inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -1902,7 +1935,7 @@ allocate_dynrelocs (h, inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ sreloc->size += p->count * sizeof (Elf64_External_Rela);
}
return TRUE;
@@ -1965,7 +1998,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1988,10 +2021,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
struct elf_s390_dyn_relocs *p;
- for (p = *((struct elf_s390_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
- p != NULL;
- p = p->next)
+ for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
{
if (!bfd_is_abs_section (p->sec)
&& bfd_is_abs_section (p->sec->output_section))
@@ -2004,7 +2034,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
else if (p->count != 0)
{
srela = elf_section_data (p->sec)->sreloc;
- srela->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ srela->size += p->count * sizeof (Elf64_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@@ -2025,12 +2055,12 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
+ *local_got = s->size;
+ s->size += GOT_ENTRY_SIZE;
if (*local_tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ s->size += GOT_ENTRY_SIZE;
if (info->shared)
- srela->_raw_size += sizeof (Elf64_External_Rela);
+ srela->size += sizeof (Elf64_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@@ -2041,9 +2071,9 @@ elf_s390_size_dynamic_sections (output_bfd, info)
{
/* Allocate 2 got entries and 1 dynamic reloc for R_390_TLS_LDM64
relocs. */
- htab->tls_ldm_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 2 * GOT_ENTRY_SIZE;
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += 2 * GOT_ENTRY_SIZE;
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
}
else
htab->tls_ldm_got.offset = -1;
@@ -2062,14 +2092,15 @@ elf_s390_size_dynamic_sections (output_bfd, info)
if (s == htab->splt
|| s == htab->sgot
- || s == htab->sgotplt)
+ || s == htab->sgotplt
+ || s == htab->sdynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0 && s != htab->srelplt)
+ if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -2082,7 +2113,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is to handle .rela.bss and
@@ -2094,16 +2125,19 @@ elf_s390_size_dynamic_sections (output_bfd, info)
function which decides whether anything needs to go
into these sections. */
- _bfd_strip_section_from_output (info, s);
+ s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
but this way if it does, we get a R_390_NONE reloc instead
of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -2124,7 +2158,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -2201,9 +2235,9 @@ invalid_tls_insn (input_bfd, input_section, rel)
howto = elf_howto_table + ELF64_R_TYPE (rel->r_info);
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): invalid instruction for TLS relocation %s"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): invalid instruction for TLS relocation %s"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
howto->name);
}
@@ -2345,8 +2379,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
|| (info->shared
&& (info->symbolic
|| h->dynindx == -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ || h->forced_local)
+ && h->def_regular)
|| (ELF_ST_VISIBILITY (h->other)
&& h->root.type == bfd_link_hash_undefweak))
{
@@ -2532,11 +2566,9 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
&& !info->shared
&& h != NULL
&& h->dynindx != -1
- && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
|| h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined)))
{
@@ -2573,8 +2605,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_390_PC64
|| !info->shared
|| !info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || !h->def_regular))
{
outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
outrel.r_addend = rel->r_addend;
@@ -2987,12 +3018,13 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
not process them. */
if (unresolved_reloc
&& !((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
+ && h->def_dynamic))
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
+ howto->name,
h->root.root.string);
if (r_type == R_390_20
@@ -3032,16 +3064,16 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, name, (int) r);
return FALSE;
}
@@ -3138,7 +3170,7 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
loc = htab->srelplt->contents + plt_index * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value alone. This is a clue
@@ -3174,8 +3206,8 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
if (info->shared
&& (info->symbolic
|| h->dynindx == -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ || h->forced_local)
+ && h->def_regular)
{
BFD_ASSERT((h->got.offset & 1) != 0);
rela.r_info = ELF64_R_INFO (0, R_390_RELATIVE);
@@ -3196,7 +3228,7 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
}
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ if (h->needs_copy)
{
Elf_Internal_Rela rela;
bfd_byte *loc;
@@ -3221,8 +3253,8 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Mark some specially defined symbols as absolute. */
if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
+ || h == htab->elf.hgot
+ || h == htab->elf.hplt)
sym->st_shndx = SHN_ABS;
return TRUE;
@@ -3271,7 +3303,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
abort ();
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -3294,10 +3326,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
case DT_RELASZ:
@@ -3309,10 +3338,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
other relocation sections, we don't have to worry
about changing the DT_RELA entry. */
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
break;
}
@@ -3320,7 +3346,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the special first entry in the procedure linkage table. */
- if (htab->splt && htab->splt->_raw_size > 0)
+ if (htab->splt && htab->splt->size > 0)
{
/* fill in blueprint for plt 0 entry */
bfd_put_32 (output_bfd, (bfd_vma) PLT_FIRST_ENTRY_WORD0,
@@ -3351,7 +3377,7 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
if (htab->sgotplt)
{
/* Fill in the first three entries in the global offset table. */
- if (htab->sgotplt->_raw_size > 0)
+ if (htab->sgotplt->size > 0)
{
bfd_put_64 (output_bfd,
(sdyn == NULL ? (bfd_vma) 0
@@ -3369,6 +3395,17 @@ elf_s390_finish_dynamic_sections (output_bfd, info)
return TRUE;
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + PLT_FIRST_ENTRY_SIZE + i * PLT_ENTRY_SIZE;
+}
+
+
/* Why was the hash table entry size definition changed from
ARCH_SIZE/8 to 4? This breaks the 64 bit dynamic linker and
this is the only reason for the s390_elf64_size_info structure. */
@@ -3438,6 +3475,7 @@ const struct elf_size_info s390_elf64_size_info =
#define elf_backend_relocate_section elf_s390_relocate_section
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
+#define elf_backend_plt_sym_val elf_s390_plt_sym_val
#define bfd_elf64_mkobject elf_s390_mkobject
#define elf_backend_object_p elf_s390_object_p
diff --git a/contrib/binutils/bfd/elf64-sparc.c b/contrib/binutils/bfd/elf64-sparc.c
index 464c4979a9df..dd1c302174af 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 Free Software Foundation, Inc.
+ 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,330 +16,31 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "elf-bfd.h"
-#include "opcode/sparc.h"
-
-/* This is defined if one wants to build upward compatible binaries
- with the original sparc64-elf toolchain. The support is kept in for
- now but is turned off by default. dje 970930 */
-/*#define SPARC64_OLD_RELOCS*/
-
#include "elf/sparc.h"
+#include "opcode/sparc.h"
+#include "elfxx-sparc.h"
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */
#define MINUS_ONE (~ (bfd_vma) 0)
-static struct bfd_link_hash_table * sparc64_elf_bfd_link_hash_table_create
- PARAMS ((bfd *));
-static bfd_reloc_status_type init_insn_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *,
- bfd *, bfd_vma *, bfd_vma *));
-static reloc_howto_type *sparc64_elf_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void sparc64_elf_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static void sparc64_elf_build_plt
- PARAMS ((bfd *, unsigned char *, int));
-static bfd_vma sparc64_elf_plt_entry_offset
- PARAMS ((bfd_vma));
-static bfd_vma sparc64_elf_plt_ptr_offset
- PARAMS ((bfd_vma, bfd_vma));
-
-static bfd_boolean sparc64_elf_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *sec,
- const Elf_Internal_Rela *));
-static bfd_boolean sparc64_elf_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static bfd_boolean sparc64_elf_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static int sparc64_elf_get_symbol_type
- PARAMS (( Elf_Internal_Sym *, int));
-static bfd_boolean sparc64_elf_add_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *));
-static bfd_boolean sparc64_elf_output_arch_syms
- PARAMS ((bfd *, struct bfd_link_info *, PTR,
- bfd_boolean (*) (PTR, const char *, Elf_Internal_Sym *,
- asection *, struct elf_link_hash_entry *)));
-static void sparc64_elf_symbol_processing
- PARAMS ((bfd *, asymbol *));
-
-static bfd_boolean sparc64_elf_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-
-static bfd_boolean sparc64_elf_fake_sections
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
-
-static const char *sparc64_elf_print_symbol_all
- PARAMS ((bfd *, PTR, asymbol *));
-static bfd_boolean sparc64_elf_new_section_hook
- PARAMS ((bfd *, asection *));
-static bfd_boolean sparc64_elf_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean sparc64_elf_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static bfd_boolean sparc64_elf_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static bfd_boolean sparc64_elf_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean sparc64_elf_object_p PARAMS ((bfd *));
-static long sparc64_elf_get_reloc_upper_bound PARAMS ((bfd *, asection *));
-static long sparc64_elf_get_dynamic_reloc_upper_bound PARAMS ((bfd *));
-static bfd_boolean sparc64_elf_slurp_one_reloc_table
- PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, asymbol **, bfd_boolean));
-static bfd_boolean sparc64_elf_slurp_reloc_table
- PARAMS ((bfd *, asection *, asymbol **, bfd_boolean));
-static long sparc64_elf_canonicalize_reloc
- PARAMS ((bfd *, asection *, arelent **, asymbol **));
-static long sparc64_elf_canonicalize_dynamic_reloc
- PARAMS ((bfd *, arelent **, asymbol **));
-static void sparc64_elf_write_relocs PARAMS ((bfd *, asection *, PTR));
-static enum elf_reloc_type_class sparc64_elf_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
-
-/* The relocation "howto" table. */
-
-static bfd_reloc_status_type sparc_elf_notsup_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type sparc_elf_wdisp16_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type sparc_elf_hix22_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type sparc_elf_lox10_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-
-static reloc_howto_type sparc64_elf_howto_table[] =
-{
- HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_8", FALSE,0,0x000000ff,TRUE),
- HOWTO(R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_16", FALSE,0,0x0000ffff,TRUE),
- HOWTO(R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_32", FALSE,0,0xffffffff,TRUE),
- HOWTO(R_SPARC_DISP8, 0,0, 8,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP8", FALSE,0,0x000000ff,TRUE),
- HOWTO(R_SPARC_DISP16, 0,1,16,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP16", FALSE,0,0x0000ffff,TRUE),
- HOWTO(R_SPARC_DISP32, 0,2,32,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP32", FALSE,0,0xffffffff,TRUE),
- HOWTO(R_SPARC_WDISP30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP30", FALSE,0,0x3fffffff,TRUE),
- HOWTO(R_SPARC_WDISP22, 2,2,22,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_HI22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HI22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_22, 0,2,22,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_13, 0,2,13,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_13", FALSE,0,0x00001fff,TRUE),
- HOWTO(R_SPARC_LO10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_LO10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_GOT10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_GOT13, 0,2,13,FALSE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_GOT13", FALSE,0,0x00001fff,TRUE),
- HOWTO(R_SPARC_GOT22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_PC10, 0,2,10,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_PC22, 10,2,22,TRUE, 0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PC22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_WPLT30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WPLT30", FALSE,0,0x3fffffff,TRUE),
- HOWTO(R_SPARC_COPY, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_COPY", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_GLOB_DAT, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GLOB_DAT",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_JMP_SLOT, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_RELATIVE, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_UA32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", FALSE,0,0xffffffff,TRUE),
-#ifndef SPARC64_OLD_RELOCS
- HOWTO(R_SPARC_PLT32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT32", FALSE,0,0xffffffff,TRUE),
- /* These aren't implemented yet. */
- HOWTO(R_SPARC_HIPLT22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_HIPLT22", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_LOPLT10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_LOPLT10", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_PCPLT32, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT32", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_PCPLT22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT22", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_PCPLT10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT10", FALSE,0,0x00000000,TRUE),
-#endif
- HOWTO(R_SPARC_10, 0,2,10,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_11, 0,2,11,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_11", FALSE,0,0x000007ff,TRUE),
- HOWTO(R_SPARC_64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_64", FALSE,0,MINUS_ONE, TRUE),
- HOWTO(R_SPARC_OLO10, 0,2,13,FALSE,0,complain_overflow_signed, sparc_elf_notsup_reloc, "R_SPARC_OLO10", FALSE,0,0x00001fff,TRUE),
- HOWTO(R_SPARC_HH22, 42,2,22,FALSE,0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_HH22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_HM10, 32,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HM10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_LM22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_LM22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_PC_HH22, 42,2,22,TRUE, 0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_PC_HH22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_PC_HM10, 32,2,10,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC_HM10", FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_PC_LM22, 10,2,22,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC_LM22", FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_WDISP16, 2,2,16,TRUE, 0,complain_overflow_signed, sparc_elf_wdisp16_reloc,"R_SPARC_WDISP16", FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_WDISP19, 2,2,19,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP19", FALSE,0,0x0007ffff,TRUE),
- HOWTO(R_SPARC_UNUSED_42, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UNUSED_42",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_7, 0,2, 7,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_7", FALSE,0,0x0000007f,TRUE),
- HOWTO(R_SPARC_5, 0,2, 5,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_5", FALSE,0,0x0000001f,TRUE),
- HOWTO(R_SPARC_6, 0,2, 6,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_6", FALSE,0,0x0000003f,TRUE),
- HOWTO(R_SPARC_DISP64, 0,4,64,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP64", FALSE,0,MINUS_ONE, TRUE),
- HOWTO(R_SPARC_PLT64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT64", FALSE,0,MINUS_ONE, TRUE),
- HOWTO(R_SPARC_HIX22, 0,4, 0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_HIX22", FALSE,0,MINUS_ONE, FALSE),
- HOWTO(R_SPARC_LOX10, 0,4, 0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_LOX10", FALSE,0,MINUS_ONE, FALSE),
- HOWTO(R_SPARC_H44, 22,2,22,FALSE,0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_H44", FALSE,0,0x003fffff,FALSE),
- HOWTO(R_SPARC_M44, 12,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_M44", FALSE,0,0x000003ff,FALSE),
- HOWTO(R_SPARC_L44, 0,2,13,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_L44", FALSE,0,0x00000fff,FALSE),
- HOWTO(R_SPARC_REGISTER, 0,4, 0,FALSE,0,complain_overflow_bitfield,sparc_elf_notsup_reloc, "R_SPARC_REGISTER",FALSE,0,MINUS_ONE, FALSE),
- HOWTO(R_SPARC_UA64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", FALSE,0,MINUS_ONE, TRUE),
- HOWTO(R_SPARC_UA16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", FALSE,0,0x0000ffff,TRUE),
- HOWTO(R_SPARC_TLS_GD_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_HI22",FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_TLS_GD_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_LO10",FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_TLS_GD_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_ADD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_GD_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_CALL",FALSE,0,0x3fffffff,TRUE),
- HOWTO(R_SPARC_TLS_LDM_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_HI22",FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_TLS_LDM_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_LO10",FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_TLS_LDM_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_ADD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_LDM_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_CALL",FALSE,0,0x3fffffff,TRUE),
- HOWTO(R_SPARC_TLS_LDO_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_TLS_LDO_HIX22",FALSE,0,0x003fffff, FALSE),
- HOWTO(R_SPARC_TLS_LDO_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LDO_LOX10",FALSE,0,0x000003ff, FALSE),
- HOWTO(R_SPARC_TLS_LDO_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDO_ADD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_IE_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_HI22",FALSE,0,0x003fffff,TRUE),
- HOWTO(R_SPARC_TLS_IE_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LO10",FALSE,0,0x000003ff,TRUE),
- HOWTO(R_SPARC_TLS_IE_LD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_IE_LDX,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LDX",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_IE_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_ADD",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_LE_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_TLS_LE_HIX22",FALSE,0,0x003fffff, FALSE),
- HOWTO(R_SPARC_TLS_LE_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LE_LOX10",FALSE,0,0x000003ff, FALSE),
- HOWTO(R_SPARC_TLS_DTPMOD32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD32",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_DTPMOD64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD64",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_DTPOFF32,0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF32",FALSE,0,0xffffffff,TRUE),
- HOWTO(R_SPARC_TLS_DTPOFF64,0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF64",FALSE,0,MINUS_ONE,TRUE),
- HOWTO(R_SPARC_TLS_TPOFF32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF32",FALSE,0,0x00000000,TRUE),
- HOWTO(R_SPARC_TLS_TPOFF64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF64",FALSE,0,0x00000000,TRUE)
-};
-
-struct elf_reloc_map {
- bfd_reloc_code_real_type bfd_reloc_val;
- unsigned char elf_reloc_val;
-};
-
-static const struct elf_reloc_map sparc_reloc_map[] =
-{
- { BFD_RELOC_NONE, R_SPARC_NONE, },
- { BFD_RELOC_16, R_SPARC_16, },
- { BFD_RELOC_16_PCREL, R_SPARC_DISP16 },
- { BFD_RELOC_8, R_SPARC_8 },
- { BFD_RELOC_8_PCREL, R_SPARC_DISP8 },
- { BFD_RELOC_CTOR, R_SPARC_64 },
- { BFD_RELOC_32, R_SPARC_32 },
- { BFD_RELOC_32_PCREL, R_SPARC_DISP32 },
- { BFD_RELOC_HI22, R_SPARC_HI22 },
- { BFD_RELOC_LO10, R_SPARC_LO10, },
- { BFD_RELOC_32_PCREL_S2, R_SPARC_WDISP30 },
- { BFD_RELOC_64_PCREL, R_SPARC_DISP64 },
- { BFD_RELOC_SPARC22, R_SPARC_22 },
- { BFD_RELOC_SPARC13, R_SPARC_13 },
- { BFD_RELOC_SPARC_GOT10, R_SPARC_GOT10 },
- { BFD_RELOC_SPARC_GOT13, R_SPARC_GOT13 },
- { BFD_RELOC_SPARC_GOT22, R_SPARC_GOT22 },
- { BFD_RELOC_SPARC_PC10, R_SPARC_PC10 },
- { BFD_RELOC_SPARC_PC22, R_SPARC_PC22 },
- { BFD_RELOC_SPARC_WPLT30, R_SPARC_WPLT30 },
- { BFD_RELOC_SPARC_COPY, R_SPARC_COPY },
- { BFD_RELOC_SPARC_GLOB_DAT, R_SPARC_GLOB_DAT },
- { BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT },
- { BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE },
- { BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 },
- { BFD_RELOC_SPARC_UA16, R_SPARC_UA16 },
- { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 },
- { BFD_RELOC_SPARC_UA64, R_SPARC_UA64 },
- { BFD_RELOC_SPARC_10, R_SPARC_10 },
- { BFD_RELOC_SPARC_11, R_SPARC_11 },
- { BFD_RELOC_SPARC_64, R_SPARC_64 },
- { BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10 },
- { BFD_RELOC_SPARC_HH22, R_SPARC_HH22 },
- { BFD_RELOC_SPARC_HM10, R_SPARC_HM10 },
- { BFD_RELOC_SPARC_LM22, R_SPARC_LM22 },
- { BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22 },
- { BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10 },
- { BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22 },
- { BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16 },
- { BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19 },
- { BFD_RELOC_SPARC_7, R_SPARC_7 },
- { BFD_RELOC_SPARC_5, R_SPARC_5 },
- { BFD_RELOC_SPARC_6, R_SPARC_6 },
- { BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64 },
- { BFD_RELOC_SPARC_TLS_GD_HI22, R_SPARC_TLS_GD_HI22 },
- { BFD_RELOC_SPARC_TLS_GD_LO10, R_SPARC_TLS_GD_LO10 },
- { BFD_RELOC_SPARC_TLS_GD_ADD, R_SPARC_TLS_GD_ADD },
- { BFD_RELOC_SPARC_TLS_GD_CALL, R_SPARC_TLS_GD_CALL },
- { BFD_RELOC_SPARC_TLS_LDM_HI22, R_SPARC_TLS_LDM_HI22 },
- { BFD_RELOC_SPARC_TLS_LDM_LO10, R_SPARC_TLS_LDM_LO10 },
- { BFD_RELOC_SPARC_TLS_LDM_ADD, R_SPARC_TLS_LDM_ADD },
- { BFD_RELOC_SPARC_TLS_LDM_CALL, R_SPARC_TLS_LDM_CALL },
- { BFD_RELOC_SPARC_TLS_LDO_HIX22, R_SPARC_TLS_LDO_HIX22 },
- { BFD_RELOC_SPARC_TLS_LDO_LOX10, R_SPARC_TLS_LDO_LOX10 },
- { BFD_RELOC_SPARC_TLS_LDO_ADD, R_SPARC_TLS_LDO_ADD },
- { BFD_RELOC_SPARC_TLS_IE_HI22, R_SPARC_TLS_IE_HI22 },
- { BFD_RELOC_SPARC_TLS_IE_LO10, R_SPARC_TLS_IE_LO10 },
- { BFD_RELOC_SPARC_TLS_IE_LD, R_SPARC_TLS_IE_LD },
- { BFD_RELOC_SPARC_TLS_IE_LDX, R_SPARC_TLS_IE_LDX },
- { BFD_RELOC_SPARC_TLS_IE_ADD, R_SPARC_TLS_IE_ADD },
- { BFD_RELOC_SPARC_TLS_LE_HIX22, R_SPARC_TLS_LE_HIX22 },
- { BFD_RELOC_SPARC_TLS_LE_LOX10, R_SPARC_TLS_LE_LOX10 },
- { BFD_RELOC_SPARC_TLS_DTPMOD32, R_SPARC_TLS_DTPMOD32 },
- { BFD_RELOC_SPARC_TLS_DTPMOD64, R_SPARC_TLS_DTPMOD64 },
- { BFD_RELOC_SPARC_TLS_DTPOFF32, R_SPARC_TLS_DTPOFF32 },
- { BFD_RELOC_SPARC_TLS_DTPOFF64, R_SPARC_TLS_DTPOFF64 },
- { BFD_RELOC_SPARC_TLS_TPOFF32, R_SPARC_TLS_TPOFF32 },
- { BFD_RELOC_SPARC_TLS_TPOFF64, R_SPARC_TLS_TPOFF64 },
-#ifndef SPARC64_OLD_RELOCS
- { BFD_RELOC_SPARC_PLT32, R_SPARC_PLT32 },
-#endif
- { BFD_RELOC_SPARC_PLT64, R_SPARC_PLT64 },
- { BFD_RELOC_SPARC_HIX22, R_SPARC_HIX22 },
- { BFD_RELOC_SPARC_LOX10, R_SPARC_LOX10 },
- { BFD_RELOC_SPARC_H44, R_SPARC_H44 },
- { BFD_RELOC_SPARC_M44, R_SPARC_M44 },
- { BFD_RELOC_SPARC_L44, R_SPARC_L44 },
- { BFD_RELOC_SPARC_REGISTER, R_SPARC_REGISTER }
-};
-
-static reloc_howto_type *
-sparc64_elf_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
-{
- unsigned int i;
- for (i = 0; i < sizeof (sparc_reloc_map) / sizeof (struct elf_reloc_map); i++)
- {
- if (sparc_reloc_map[i].bfd_reloc_val == code)
- return &sparc64_elf_howto_table[(int) sparc_reloc_map[i].elf_reloc_val];
- }
- return 0;
-}
-
-static void
-sparc64_elf_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
-{
- BFD_ASSERT (ELF64_R_TYPE_ID (dst->r_info) < (unsigned int) R_SPARC_max_std);
- cache_ptr->howto = &sparc64_elf_howto_table[ELF64_R_TYPE_ID (dst->r_info)];
-}
-
-struct sparc64_elf_section_data
-{
- struct bfd_elf_section_data elf;
- unsigned int do_relax, reloc_count;
-};
-
-#define sec_do_relax(sec) \
- ((struct sparc64_elf_section_data *) elf_section_data (sec))->do_relax
-#define canon_reloc_count(sec) \
- ((struct sparc64_elf_section_data *) elf_section_data (sec))->reloc_count
-
/* Due to the way how we handle R_SPARC_OLO10, each entry in a SHT_RELA
section can represent up to two relocs, we must tell the user to allocate
more space. */
static long
-sparc64_elf_get_reloc_upper_bound (abfd, sec)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
+elf64_sparc_get_reloc_upper_bound (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
{
return (sec->reloc_count * 2 + 1) * sizeof (arelent *);
}
static long
-sparc64_elf_get_dynamic_reloc_upper_bound (abfd)
- bfd *abfd;
+elf64_sparc_get_dynamic_reloc_upper_bound (bfd *abfd)
{
return _bfd_elf_get_dynamic_reloc_upper_bound (abfd) * 2;
}
@@ -350,12 +51,9 @@ sparc64_elf_get_dynamic_reloc_upper_bound (abfd)
for the same location, R_SPARC_LO10 and R_SPARC_13. */
static bfd_boolean
-sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)
- bfd *abfd;
- asection *asect;
- Elf_Internal_Shdr *rel_hdr;
- asymbol **symbols;
- bfd_boolean dynamic;
+elf64_sparc_slurp_one_reloc_table (bfd *abfd, asection *asect,
+ Elf_Internal_Shdr *rel_hdr,
+ asymbol **symbols, bfd_boolean dynamic)
{
PTR allocated = NULL;
bfd_byte *native_relocs;
@@ -386,6 +84,7 @@ sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)
i++, relent++, native_relocs += entsize)
{
Elf_Internal_Rela rela;
+ unsigned int r_type;
bfd_elf64_swap_reloca_in (abfd, native_relocs, &rela);
@@ -416,18 +115,18 @@ sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)
relent->addend = rela.r_addend;
- BFD_ASSERT (ELF64_R_TYPE_ID (rela.r_info) < (unsigned int) R_SPARC_max_std);
- if (ELF64_R_TYPE_ID (rela.r_info) == R_SPARC_OLO10)
+ r_type = ELF64_R_TYPE_ID (rela.r_info);
+ if (r_type == R_SPARC_OLO10)
{
- relent->howto = &sparc64_elf_howto_table[R_SPARC_LO10];
+ relent->howto = _bfd_sparc_elf_info_to_howto_ptr (R_SPARC_LO10);
relent[1].address = relent->address;
relent++;
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
relent->addend = ELF64_R_TYPE_DATA (rela.r_info);
- relent->howto = &sparc64_elf_howto_table[R_SPARC_13];
+ relent->howto = _bfd_sparc_elf_info_to_howto_ptr (R_SPARC_13);
}
else
- relent->howto = &sparc64_elf_howto_table[ELF64_R_TYPE_ID (rela.r_info)];
+ relent->howto = _bfd_sparc_elf_info_to_howto_ptr (r_type);
}
canon_reloc_count (asect) += relent - relents;
@@ -446,11 +145,8 @@ sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)
/* Read in and swap the external relocs. */
static bfd_boolean
-sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
- bfd *abfd;
- asection *asect;
- asymbol **symbols;
- bfd_boolean dynamic;
+elf64_sparc_slurp_reloc_table (bfd *abfd, asection *asect,
+ asymbol **symbols, bfd_boolean dynamic)
{
struct bfd_elf_section_data * const d = elf_section_data (asect);
Elf_Internal_Shdr *rel_hdr;
@@ -478,7 +174,7 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
case because relocations against this section may use the
dynamic symbol table, and in that case bfd_section_from_shdr
in elf.c does not update the RELOC_COUNT. */
- if (asect->_raw_size == 0)
+ if (asect->size == 0)
return TRUE;
rel_hdr = &d->this_hdr;
@@ -492,16 +188,16 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
if (asect->relocation == NULL)
return FALSE;
- /* The sparc64_elf_slurp_one_reloc_table routine increments
+ /* The elf64_sparc_slurp_one_reloc_table routine increments
canon_reloc_count. */
canon_reloc_count (asect) = 0;
- if (!sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols,
+ if (!elf64_sparc_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols,
dynamic))
return FALSE;
if (rel_hdr2
- && !sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr2, symbols,
+ && !elf64_sparc_slurp_one_reloc_table (abfd, asect, rel_hdr2, symbols,
dynamic))
return FALSE;
@@ -511,11 +207,8 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
/* Canonicalize the relocs. */
static long
-sparc64_elf_canonicalize_reloc (abfd, section, relptr, symbols)
- bfd *abfd;
- sec_ptr section;
- arelent **relptr;
- asymbol **symbols;
+elf64_sparc_canonicalize_reloc (bfd *abfd, sec_ptr section,
+ arelent **relptr, asymbol **symbols)
{
arelent *tblptr;
unsigned int i;
@@ -544,10 +237,8 @@ sparc64_elf_canonicalize_reloc (abfd, section, relptr, symbols)
section. */
static long
-sparc64_elf_canonicalize_dynamic_reloc (abfd, storage, syms)
- bfd *abfd;
- arelent **storage;
- asymbol **syms;
+elf64_sparc_canonicalize_dynamic_reloc (bfd *abfd, arelent **storage,
+ asymbol **syms)
{
asection *s;
long ret;
@@ -567,7 +258,7 @@ sparc64_elf_canonicalize_dynamic_reloc (abfd, storage, syms)
arelent *p;
long count, i;
- if (! sparc64_elf_slurp_reloc_table (abfd, s, syms, TRUE))
+ if (! elf64_sparc_slurp_reloc_table (abfd, s, syms, TRUE))
return -1;
count = canon_reloc_count (s);
p = s->relocation;
@@ -585,13 +276,11 @@ sparc64_elf_canonicalize_dynamic_reloc (abfd, storage, syms)
/* Write out the relocs. */
static void
-sparc64_elf_write_relocs (abfd, sec, data)
- bfd *abfd;
- asection *sec;
- PTR data;
+elf64_sparc_write_relocs (bfd *abfd, asection *sec, PTR data)
{
bfd_boolean *failedp = (bfd_boolean *) data;
Elf_Internal_Shdr *rela_hdr;
+ bfd_vma addr_offset;
Elf64_External_Rela *outbound_relocas, *src_rela;
unsigned int idx, count;
asymbol *last_sym = 0;
@@ -649,6 +338,13 @@ sparc64_elf_write_relocs (abfd, sec, data)
if (rela_hdr->sh_type != SHT_RELA)
abort ();
+ /* The address of an ELF reloc is section relative for an object
+ file, and absolute for an executable file or shared library.
+ The address of a BFD reloc is always section relative. */
+ addr_offset = 0;
+ if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
+ addr_offset = sec->vma;
+
/* orelocation has the data, reloc_count has the count... */
outbound_relocas = (Elf64_External_Rela *) rela_hdr->contents;
src_rela = outbound_relocas;
@@ -661,15 +357,6 @@ sparc64_elf_write_relocs (abfd, sec, data)
int n;
ptr = sec->orelocation[idx];
-
- /* The address of an ELF reloc is section relative for an object
- file, and absolute for an executable file or shared library.
- The address of a BFD reloc is always section relative. */
- if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
- dst_rela.r_offset = ptr->address;
- else
- dst_rela.r_offset = ptr->address + sec->vma;
-
sym = *ptr->sym_ptr_ptr;
if (sym == last_sym)
n = last_sym_idx;
@@ -716,687 +403,30 @@ sparc64_elf_write_relocs (abfd, sec, data)
else
dst_rela.r_info = ELF64_R_INFO (n, ptr->howto->type);
+ dst_rela.r_offset = ptr->address + addr_offset;
dst_rela.r_addend = ptr->addend;
+
bfd_elf64_swap_reloca_out (abfd, &dst_rela, (bfd_byte *) src_rela);
++src_rela;
}
}
-/* Sparc64 ELF linker hash table. */
-
-struct sparc64_elf_app_reg
-{
- unsigned char bind;
- unsigned short shndx;
- bfd *abfd;
- char *name;
-};
-
-struct sparc64_elf_link_hash_table
-{
- struct elf_link_hash_table root;
-
- struct sparc64_elf_app_reg app_regs [4];
-};
-
-/* Get the Sparc64 ELF linker hash table from a link_info structure. */
-
-#define sparc64_elf_hash_table(p) \
- ((struct sparc64_elf_link_hash_table *) ((p)->hash))
-
-/* Create a Sparc64 ELF linker hash table. */
-
-static struct bfd_link_hash_table *
-sparc64_elf_bfd_link_hash_table_create (abfd)
- bfd *abfd;
-{
- struct sparc64_elf_link_hash_table *ret;
- bfd_size_type amt = sizeof (struct sparc64_elf_link_hash_table);
-
- ret = (struct sparc64_elf_link_hash_table *) bfd_zmalloc (amt);
- if (ret == (struct sparc64_elf_link_hash_table *) NULL)
- return NULL;
-
- if (! _bfd_elf_link_hash_table_init (&ret->root, abfd,
- _bfd_elf_link_hash_newfunc))
- {
- free (ret);
- return NULL;
- }
-
- return &ret->root.root;
-}
-
-/* Utility for performing the standard initial work of an instruction
- relocation.
- *PRELOCATION will contain the relocated item.
- *PINSN will contain the instruction from the input stream.
- If the result is `bfd_reloc_other' the caller can continue with
- performing the relocation. Otherwise it must stop and return the
- value to its caller. */
-
-static bfd_reloc_status_type
-init_insn_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- prelocation,
- pinsn)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- bfd_vma *prelocation;
- bfd_vma *pinsn;
-{
- bfd_vma relocation;
- reloc_howto_type *howto = reloc_entry->howto;
-
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && (! howto->partial_inplace
- || reloc_entry->addend == 0))
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* This works because partial_inplace is FALSE. */
- if (output_bfd != NULL)
- return bfd_reloc_continue;
-
- if (reloc_entry->address > input_section->_cooked_size)
- return bfd_reloc_outofrange;
-
- relocation = (symbol->value
- + symbol->section->output_section->vma
- + symbol->section->output_offset);
- relocation += reloc_entry->addend;
- if (howto->pc_relative)
- {
- relocation -= (input_section->output_section->vma
- + input_section->output_offset);
- relocation -= reloc_entry->address;
- }
-
- *prelocation = relocation;
- *pinsn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- return bfd_reloc_other;
-}
-
-/* For unsupported relocs. */
-
-static bfd_reloc_status_type
-sparc_elf_notsup_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- char **error_message ATTRIBUTE_UNUSED;
-{
- return bfd_reloc_notsupported;
-}
-
-/* Handle the WDISP16 reloc. */
-
-static bfd_reloc_status_type
-sparc_elf_wdisp16_reloc (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- bfd_vma relocation;
- bfd_vma insn;
- bfd_reloc_status_type status;
-
- status = init_insn_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, &relocation, &insn);
- if (status != bfd_reloc_other)
- return status;
-
- insn &= ~ (bfd_vma) 0x303fff;
- insn |= (((relocation >> 2) & 0xc000) << 6) | ((relocation >> 2) & 0x3fff);
- bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
-
- if ((bfd_signed_vma) relocation < - 0x40000
- || (bfd_signed_vma) relocation > 0x3ffff)
- return bfd_reloc_overflow;
- else
- return bfd_reloc_ok;
-}
-
-/* Handle the HIX22 reloc. */
-
-static bfd_reloc_status_type
-sparc_elf_hix22_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- bfd_vma relocation;
- bfd_vma insn;
- bfd_reloc_status_type status;
-
- status = init_insn_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, &relocation, &insn);
- if (status != bfd_reloc_other)
- return status;
-
- relocation ^= MINUS_ONE;
- insn = (insn &~ (bfd_vma) 0x3fffff) | ((relocation >> 10) & 0x3fffff);
- bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
-
- if ((relocation & ~ (bfd_vma) 0xffffffff) != 0)
- return bfd_reloc_overflow;
- else
- return bfd_reloc_ok;
-}
-
-/* Handle the LOX10 reloc. */
-
-static bfd_reloc_status_type
-sparc_elf_lox10_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- bfd_vma relocation;
- bfd_vma insn;
- bfd_reloc_status_type status;
-
- status = init_insn_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, &relocation, &insn);
- if (status != bfd_reloc_other)
- return status;
-
- insn = (insn &~ (bfd_vma) 0x1fff) | 0x1c00 | (relocation & 0x3ff);
- bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
-
- return bfd_reloc_ok;
-}
-
-/* PLT/GOT stuff */
-
-/* Both the headers and the entries are icache aligned. */
-#define PLT_ENTRY_SIZE 32
-#define PLT_HEADER_SIZE (4 * PLT_ENTRY_SIZE)
-#define LARGE_PLT_THRESHOLD 32768
-#define GOT_RESERVED_ENTRIES 1
-
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/sparcv9/ld.so.1"
-
-/* Fill in the .plt section. */
-
-static void
-sparc64_elf_build_plt (output_bfd, contents, nentries)
- bfd *output_bfd;
- unsigned char *contents;
- int nentries;
-{
- const unsigned int nop = 0x01000000;
- int i, j;
-
- /* The first four entries are reserved, and are initially undefined.
- We fill them with `illtrap 0' to force ld.so to do something. */
-
- for (i = 0; i < PLT_HEADER_SIZE/4; ++i)
- bfd_put_32 (output_bfd, (bfd_vma) 0, contents+i*4);
-
- /* The first 32768 entries are close enough to plt1 to get there via
- a straight branch. */
-
- for (i = 4; i < LARGE_PLT_THRESHOLD && i < nentries; ++i)
- {
- unsigned char *entry = contents + i * PLT_ENTRY_SIZE;
- unsigned int sethi, ba;
-
- /* sethi (. - plt0), %g1 */
- sethi = 0x03000000 | (i * PLT_ENTRY_SIZE);
-
- /* ba,a,pt %xcc, plt1 */
- ba = 0x30680000 | (((contents+PLT_ENTRY_SIZE) - (entry+4)) / 4 & 0x7ffff);
-
- bfd_put_32 (output_bfd, (bfd_vma) sethi, entry);
- bfd_put_32 (output_bfd, (bfd_vma) ba, entry + 4);
- bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 8);
- bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 12);
- bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 16);
- bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 20);
- bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 24);
- bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 28);
- }
-
- /* Now the tricky bit. Entries 32768 and higher are grouped in blocks of
- 160: 160 entries and 160 pointers. This is to separate code from data,
- which is much friendlier on the cache. */
-
- for (; i < nentries; i += 160)
- {
- int block = (i + 160 <= nentries ? 160 : nentries - i);
- for (j = 0; j < block; ++j)
- {
- unsigned char *entry, *ptr;
- unsigned int ldx;
-
- entry = contents + i*PLT_ENTRY_SIZE + j*4*6;
- ptr = contents + i*PLT_ENTRY_SIZE + block*4*6 + j*8;
-
- /* ldx [%o7 + ptr - (entry+4)], %g1 */
- ldx = 0xc25be000 | ((ptr - (entry+4)) & 0x1fff);
-
- /* mov %o7,%g5
- call .+8
- nop
- ldx [%o7+P],%g1
- jmpl %o7+%g1,%g1
- mov %g5,%o7 */
- bfd_put_32 (output_bfd, (bfd_vma) 0x8a10000f, entry);
- bfd_put_32 (output_bfd, (bfd_vma) 0x40000002, entry + 4);
- bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 8);
- bfd_put_32 (output_bfd, (bfd_vma) ldx, entry + 12);
- bfd_put_32 (output_bfd, (bfd_vma) 0x83c3c001, entry + 16);
- bfd_put_32 (output_bfd, (bfd_vma) 0x9e100005, entry + 20);
-
- bfd_put_64 (output_bfd, (bfd_vma) (contents - (entry + 4)), ptr);
- }
- }
-}
-
-/* Return the offset of a particular plt entry within the .plt section. */
-
-static bfd_vma
-sparc64_elf_plt_entry_offset (index)
- bfd_vma index;
-{
- bfd_vma block, ofs;
-
- if (index < LARGE_PLT_THRESHOLD)
- return index * PLT_ENTRY_SIZE;
-
- /* See above for details. */
-
- block = (index - LARGE_PLT_THRESHOLD) / 160;
- ofs = (index - LARGE_PLT_THRESHOLD) % 160;
-
- return (LARGE_PLT_THRESHOLD + block * 160) * PLT_ENTRY_SIZE + ofs * 6 * 4;
-}
-
-static bfd_vma
-sparc64_elf_plt_ptr_offset (index, max)
- bfd_vma index;
- bfd_vma max;
-{
- bfd_vma block, ofs, last;
-
- BFD_ASSERT(index >= LARGE_PLT_THRESHOLD);
-
- /* See above for details. */
-
- block = (((index - LARGE_PLT_THRESHOLD) / 160) * 160) + LARGE_PLT_THRESHOLD;
- ofs = index - block;
- if (block + 160 > max)
- last = (max - LARGE_PLT_THRESHOLD) % 160;
- else
- last = 160;
-
- return (block * PLT_ENTRY_SIZE
- + last * 6*4
- + ofs * 8);
-}
-
-/* Look through the relocs for a section during the first phase, and
- allocate space in the global offset table or procedure linkage
- table. */
-
-static bfd_boolean
-sparc64_elf_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
-{
- bfd *dynobj;
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- bfd_vma *local_got_offsets;
- const Elf_Internal_Rela *rel;
- const Elf_Internal_Rela *rel_end;
- asection *sgot;
- asection *srelgot;
- asection *sreloc;
-
- if (info->relocatable || !(sec->flags & SEC_ALLOC))
- return TRUE;
-
- dynobj = elf_hash_table (info)->dynobj;
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (abfd);
- local_got_offsets = elf_local_got_offsets (abfd);
-
- sgot = NULL;
- srelgot = NULL;
- sreloc = NULL;
-
- rel_end = relocs + NUM_SHDR_ENTRIES (& elf_section_data (sec)->rel_hdr);
- for (rel = relocs; rel < rel_end; rel++)
- {
- unsigned long r_symndx;
- struct elf_link_hash_entry *h;
-
- r_symndx = ELF64_R_SYM (rel->r_info);
- if (r_symndx < symtab_hdr->sh_info)
- h = NULL;
- else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
- switch (ELF64_R_TYPE_ID (rel->r_info))
- {
- case R_SPARC_GOT10:
- case R_SPARC_GOT13:
- case R_SPARC_GOT22:
- /* This symbol requires a global offset table entry. */
-
- if (dynobj == NULL)
- {
- /* Create the .got section. */
- elf_hash_table (info)->dynobj = dynobj = abfd;
- if (! _bfd_elf_create_got_section (dynobj, info))
- return FALSE;
- }
-
- if (sgot == NULL)
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- }
-
- if (srelgot == NULL && (h != NULL || info->shared))
- {
- srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- if (srelgot == NULL)
- {
- srelgot = bfd_make_section (dynobj, ".rela.got");
- if (srelgot == NULL
- || ! bfd_set_section_flags (dynobj, srelgot,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
- || ! bfd_set_section_alignment (dynobj, srelgot, 3))
- return FALSE;
- }
- }
-
- if (h != NULL)
- {
- if (h->got.offset != (bfd_vma) -1)
- {
- /* We have already allocated space in the .got. */
- break;
- }
- h->got.offset = sgot->_raw_size;
-
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- srelgot->_raw_size += sizeof (Elf64_External_Rela);
- }
- else
- {
- /* This is a global offset table entry for a local
- symbol. */
- if (local_got_offsets == NULL)
- {
- bfd_size_type size;
- register unsigned int i;
-
- size = symtab_hdr->sh_info;
- size *= sizeof (bfd_vma);
- local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
- if (local_got_offsets == NULL)
- return FALSE;
- elf_local_got_offsets (abfd) = local_got_offsets;
- for (i = 0; i < symtab_hdr->sh_info; i++)
- local_got_offsets[i] = (bfd_vma) -1;
- }
- if (local_got_offsets[r_symndx] != (bfd_vma) -1)
- {
- /* We have already allocated space in the .got. */
- break;
- }
- local_got_offsets[r_symndx] = sgot->_raw_size;
-
- if (info->shared)
- {
- /* If we are generating a shared object, we need to
- output a R_SPARC_RELATIVE reloc so that the
- dynamic linker can adjust this GOT entry. */
- srelgot->_raw_size += sizeof (Elf64_External_Rela);
- }
- }
-
- sgot->_raw_size += 8;
-
-#if 0
- /* Doesn't work for 64-bit -fPIC, since sethi/or builds
- unsigned numbers. If we permit ourselves to modify
- code so we get sethi/xor, this could work.
- Question: do we consider conditionally re-enabling
- this for -fpic, once we know about object code models? */
- /* If the .got section is more than 0x1000 bytes, we add
- 0x1000 to the value of _GLOBAL_OFFSET_TABLE_, so that 13
- bit relocations have a greater chance of working. */
- if (sgot->_raw_size >= 0x1000
- && elf_hash_table (info)->hgot->root.u.def.value == 0)
- elf_hash_table (info)->hgot->root.u.def.value = 0x1000;
-#endif
-
- break;
-
- case R_SPARC_WPLT30:
- case R_SPARC_PLT32:
- case R_SPARC_HIPLT22:
- case R_SPARC_LOPLT10:
- case R_SPARC_PCPLT32:
- case R_SPARC_PCPLT22:
- case R_SPARC_PCPLT10:
- case R_SPARC_PLT64:
- /* This symbol requires a procedure linkage table entry. We
- actually build the entry in adjust_dynamic_symbol,
- because this might be a case of linking PIC code without
- linking in any dynamic objects, in which case we don't
- need to generate a procedure linkage table after all. */
-
- if (h == NULL)
- {
- /* It does not make sense to have a procedure linkage
- table entry for a local symbol. */
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- if (ELF64_R_TYPE_ID (rel->r_info) != R_SPARC_PLT32
- && ELF64_R_TYPE_ID (rel->r_info) != R_SPARC_PLT64)
- break;
- /* Fall through. */
- case R_SPARC_PC10:
- case R_SPARC_PC22:
- case R_SPARC_PC_HH22:
- case R_SPARC_PC_HM10:
- case R_SPARC_PC_LM22:
- if (h != NULL
- && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
- break;
- /* Fall through. */
- case R_SPARC_DISP8:
- case R_SPARC_DISP16:
- case R_SPARC_DISP32:
- case R_SPARC_DISP64:
- case R_SPARC_WDISP30:
- case R_SPARC_WDISP22:
- case R_SPARC_WDISP19:
- case R_SPARC_WDISP16:
- if (h == NULL)
- break;
- /* Fall through. */
- case R_SPARC_8:
- case R_SPARC_16:
- case R_SPARC_32:
- case R_SPARC_HI22:
- case R_SPARC_22:
- case R_SPARC_13:
- case R_SPARC_LO10:
- case R_SPARC_UA32:
- case R_SPARC_10:
- case R_SPARC_11:
- case R_SPARC_64:
- case R_SPARC_OLO10:
- case R_SPARC_HH22:
- case R_SPARC_HM10:
- case R_SPARC_LM22:
- case R_SPARC_7:
- case R_SPARC_5:
- case R_SPARC_6:
- case R_SPARC_HIX22:
- case R_SPARC_LOX10:
- case R_SPARC_H44:
- case R_SPARC_M44:
- case R_SPARC_L44:
- case R_SPARC_UA64:
- case R_SPARC_UA16:
- /* When creating a shared object, we must copy these relocs
- into the output file. We create a reloc section in
- dynobj and make room for the reloc.
-
- But don't do this for debugging sections -- this shows up
- with DWARF2 -- first because they are not loaded, and
- second because DWARF sez the debug info is not to be
- biased by the load address. */
- if (info->shared && (sec->flags & SEC_ALLOC))
- {
- if (sreloc == NULL)
- {
- const char *name;
-
- name = (bfd_elf_string_from_elf_section
- (abfd,
- elf_elfheader (abfd)->e_shstrndx,
- elf_section_data (sec)->rel_hdr.sh_name));
- if (name == NULL)
- return FALSE;
-
- BFD_ASSERT (strncmp (name, ".rela", 5) == 0
- && strcmp (bfd_get_section_name (abfd, sec),
- name + 5) == 0);
-
- sreloc = bfd_get_section_by_name (dynobj, name);
- if (sreloc == NULL)
- {
- flagword flags;
-
- sreloc = bfd_make_section (dynobj, name);
- flags = (SEC_HAS_CONTENTS | SEC_READONLY
- | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- if ((sec->flags & SEC_ALLOC) != 0)
- flags |= SEC_ALLOC | SEC_LOAD;
- if (sreloc == NULL
- || ! bfd_set_section_flags (dynobj, sreloc, flags)
- || ! bfd_set_section_alignment (dynobj, sreloc, 3))
- return FALSE;
- }
- if (sec->flags & SEC_READONLY)
- info->flags |= DF_TEXTREL;
- }
-
- sreloc->_raw_size += sizeof (Elf64_External_Rela);
- }
- break;
-
- case R_SPARC_REGISTER:
- /* Nothing to do. */
- break;
-
- default:
- (*_bfd_error_handler) (_("%s: check_relocs: unhandled reloc type %d"),
- bfd_archive_filename (abfd),
- ELF64_R_TYPE_ID (rel->r_info));
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
/* Hook called by the linker routine which adds symbols from an object
file. We use it for STT_REGISTER symbols. */
static bfd_boolean
-sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd;
- struct bfd_link_info *info;
- Elf_Internal_Sym *sym;
- const char **namep;
- flagword *flagsp ATTRIBUTE_UNUSED;
- asection **secp ATTRIBUTE_UNUSED;
- bfd_vma *valp ATTRIBUTE_UNUSED;
+elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
+ Elf_Internal_Sym *sym, const char **namep,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp ATTRIBUTE_UNUSED,
+ bfd_vma *valp ATTRIBUTE_UNUSED)
{
static const char *const stt_types[] = { "NOTYPE", "OBJECT", "FUNCTION" };
if (ELF_ST_TYPE (sym->st_info) == STT_REGISTER)
{
int reg;
- struct sparc64_elf_app_reg *p;
+ struct _bfd_sparc_elf_app_reg *p;
reg = (int)sym->st_value;
switch (reg & ~1)
@@ -1405,8 +435,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
case 6: reg -= 4; break;
default:
(*_bfd_error_handler)
- (_("%s: Only registers %%g[2367] can be declared using STT_REGISTER"),
- bfd_archive_filename (abfd));
+ (_("%B: Only registers %%g[2367] can be declared using STT_REGISTER"),
+ abfd);
return FALSE;
}
@@ -1420,15 +450,15 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
return TRUE;
}
- p = sparc64_elf_hash_table(info)->app_regs + reg;
+ p = _bfd_sparc_elf_hash_table(info)->app_regs + reg;
if (p->name != NULL && strcmp (p->name, *namep))
{
(*_bfd_error_handler)
- (_("Register %%g%d used incompatibly: %s in %s, previously %s in %s"),
- (int) sym->st_value,
- **namep ? *namep : "#scratch", bfd_archive_filename (abfd),
- *p->name ? p->name : "#scratch", bfd_archive_filename (p->abfd));
+ (_("Register %%g%d used incompatibly: %s in %B, previously %s in %B"),
+ abfd, p->abfd, (int) sym->st_value,
+ **namep ? *namep : "#scratch",
+ *p->name ? p->name : "#scratch");
return FALSE;
}
@@ -1448,9 +478,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (type > STT_FUNC)
type = 0;
(*_bfd_error_handler)
- (_("Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"),
- *namep, bfd_archive_filename (abfd),
- stt_types[type], bfd_archive_filename (p->abfd));
+ (_("Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"),
+ abfd, p->abfd, *namep, stt_types[type]);
return FALSE;
}
@@ -1483,9 +512,9 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
&& info->hash->creator == abfd->xvec)
{
int i;
- struct sparc64_elf_app_reg *p;
+ struct _bfd_sparc_elf_app_reg *p;
- p = sparc64_elf_hash_table(info)->app_regs;
+ p = _bfd_sparc_elf_hash_table(info)->app_regs;
for (i = 0; i < 4; i++, p++)
if (p->name != NULL && ! strcmp (p->name, *namep))
{
@@ -1494,9 +523,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (type > STT_FUNC)
type = 0;
(*_bfd_error_handler)
- (_("Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"),
- *namep, stt_types[type], bfd_archive_filename (abfd),
- bfd_archive_filename (p->abfd));
+ (_("Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"),
+ abfd, p->abfd, *namep, stt_types[type]);
return FALSE;
}
}
@@ -1507,17 +535,16 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
which we cannot easily keep in the symbol hash table. */
static bfd_boolean
-sparc64_elf_output_arch_syms (output_bfd, info, finfo, func)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
- PTR finfo;
- bfd_boolean (*func)
- PARAMS ((PTR, const char *, Elf_Internal_Sym *, asection *,
- struct elf_link_hash_entry *));
+elf64_sparc_output_arch_syms (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ PTR finfo, bfd_boolean (*func) (PTR, const char *,
+ Elf_Internal_Sym *,
+ asection *,
+ struct elf_link_hash_entry *))
{
int reg;
- struct sparc64_elf_app_reg *app_regs =
- sparc64_elf_hash_table(info)->app_regs;
+ struct _bfd_sparc_elf_app_reg *app_regs =
+ _bfd_sparc_elf_hash_table(info)->app_regs;
Elf_Internal_Sym sym;
/* We arranged in size_dynamic_sections to put the STT_REGISTER entries
@@ -1568,9 +595,7 @@ sparc64_elf_output_arch_syms (output_bfd, info, finfo, func)
}
static int
-sparc64_elf_get_symbol_type (elf_sym, type)
- Elf_Internal_Sym * elf_sym;
- int type;
+elf64_sparc_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
{
if (ELF_ST_TYPE (elf_sym->st_info) == STT_REGISTER)
return STT_REGISTER;
@@ -1582,9 +607,7 @@ sparc64_elf_get_symbol_type (elf_sym, type)
even in SHN_UNDEF section. */
static void
-sparc64_elf_symbol_processing (abfd, asym)
- bfd *abfd ATTRIBUTE_UNUSED;
- asymbol *asym;
+elf64_sparc_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *asym)
{
elf_symbol_type *elfsym;
@@ -1596,1363 +619,6 @@ sparc64_elf_symbol_processing (abfd, asym)
}
}
-/* 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
-sparc64_elf_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
-{
- bfd *dynobj;
- asection *s;
- unsigned int power_of_two;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- /* Make sure we know what is going on here. */
- BFD_ASSERT (dynobj != NULL
- && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
- || h->weakdef != NULL
- || ((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)));
-
- /* If this is a function, put it in the procedure linkage table. We
- will fill in the contents of the procedure linkage table later
- (although we could actually do it here). The STT_NOTYPE
- condition is a hack specifically for the Oracle libraries
- delivered for Solaris; for some inexplicable reason, they define
- some of their functions as STT_NOTYPE when they really should be
- STT_FUNC. */
- if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0
- || (h->type == STT_NOTYPE
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && (h->root.u.def.section->flags & SEC_CODE) != 0))
- {
- if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
- && h->root.type != bfd_link_hash_undefweak
- && h->root.type != bfd_link_hash_undefined)
- {
- /* This case can occur if we saw a WPLT30 reloc in an input
- file, but none of the input files were dynamic objects.
- In such a case, we don't actually need to build a
- procedure linkage table, and we can just do a WDISP30
- reloc instead. */
- BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0);
- return TRUE;
- }
-
- s = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (s != NULL);
-
- /* The first four bit in .plt is reserved. */
- if (s->_raw_size == 0)
- s->_raw_size = PLT_HEADER_SIZE;
-
- /* To simplify matters later, just store the plt index here. */
- h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
-
- /* If this symbol is not defined in a regular file, and we are
- not generating a shared library, then set the symbol to this
- location in the .plt. This is required to make function
- pointers compare as equal between the normal executable and
- the shared library. */
- if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- h->root.u.def.section = s;
- h->root.u.def.value = sparc64_elf_plt_entry_offset (h->plt.offset);
- }
-
- /* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
-
- /* We also need to make an entry in the .rela.plt section. */
-
- s = bfd_get_section_by_name (dynobj, ".rela.plt");
- BFD_ASSERT (s != NULL);
-
- s->_raw_size += sizeof (Elf64_External_Rela);
-
- /* The procedure linkage table size is bounded by the magnitude
- of the offset we can describe in the entry. */
- if (s->_raw_size >= (bfd_vma)1 << 32)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- return TRUE;
- }
-
- /* If this is a weak symbol, and there is a real definition, the
- processor independent code will have arranged for us to see the
- real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
- {
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
- return TRUE;
- }
-
- /* This is a reference to a symbol defined by a dynamic object which
- is not a function. */
-
- /* If we are creating a shared library, we must presume that the
- only references to the symbol are via the global offset table.
- For such cases we need not do anything here; the relocations will
- be handled correctly by relocate_section. */
- if (info->shared)
- return TRUE;
-
- /* We must allocate the symbol in our .dynbss section, which will
- become part of the .bss section of the executable. There will be
- an entry for this symbol in the .dynsym section. The dynamic
- object will contain position independent code, so all references
- from the dynamic object to this symbol will go through the global
- offset table. The dynamic linker will use the .dynsym entry to
- determine the address it must put in the global offset table, so
- both the dynamic object and the regular object will refer to the
- same memory location for the variable. */
-
- s = bfd_get_section_by_name (dynobj, ".dynbss");
- BFD_ASSERT (s != NULL);
-
- /* We must generate a R_SPARC_COPY reloc to tell the dynamic linker
- to copy the initial value out of the dynamic object and into the
- runtime process image. We need to remember the offset into the
- .rel.bss section we are going to use. */
- if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
- {
- asection *srel;
-
- srel = bfd_get_section_by_name (dynobj, ".rela.bss");
- BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf64_External_Rela);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
- }
-
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. 16-bytes is the size
- of the largest type that requires hard alignment -- long double. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 4)
- power_of_two = 4;
-
- /* Apply the required alignment. */
- s->_raw_size = BFD_ALIGN (s->_raw_size,
- (bfd_size_type) (1 << power_of_two));
- if (power_of_two > bfd_get_section_alignment (dynobj, s))
- {
- if (! bfd_set_section_alignment (dynobj, s, power_of_two))
- return FALSE;
- }
-
- /* Define the symbol as being at this point in the section. */
- h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
-
- /* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
-
- return TRUE;
-}
-
-/* Set the sizes of the dynamic sections. */
-
-static bfd_boolean
-sparc64_elf_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
-{
- bfd *dynobj;
- asection *s;
- bfd_boolean relplt;
-
- 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->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- BFD_ASSERT (s != NULL);
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
- s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
- }
- }
- else
- {
- /* We may have created entries in the .rela.got section.
- However, if we are not creating the dynamic sections, we will
- not actually use these entries. Reset the size of .rela.got,
- which will cause it to get stripped from the output file
- below. */
- s = bfd_get_section_by_name (dynobj, ".rela.got");
- if (s != NULL)
- s->_raw_size = 0;
- }
-
- /* The check_relocs and adjust_dynamic_symbol entry points have
- determined the sizes of the various dynamic sections. Allocate
- memory for them. */
- relplt = FALSE;
- for (s = dynobj->sections; s != NULL; s = s->next)
- {
- const char *name;
- bfd_boolean strip;
-
- if ((s->flags & SEC_LINKER_CREATED) == 0)
- continue;
-
- /* It's OK to base decisions on the section name, because none
- of the dynobj section names depend upon the input files. */
- name = bfd_get_section_name (dynobj, s);
-
- strip = FALSE;
-
- if (strncmp (name, ".rela", 5) == 0)
- {
- if (s->_raw_size == 0)
- {
- /* If we don't need this section, strip it from the
- output file. This is to handle .rela.bss and
- .rel.plt. We must create it in
- create_dynamic_sections, because it must be created
- before the linker maps input sections to output
- sections. The linker does that before
- adjust_dynamic_symbol is called, and it is that
- function which decides whether anything needs to go
- into these sections. */
- strip = TRUE;
- }
- else
- {
- if (strcmp (name, ".rela.plt") == 0)
- relplt = TRUE;
-
- /* We use the reloc_count field as a counter if we need
- to copy relocs into the output file. */
- s->reloc_count = 0;
- }
- }
- else if (strcmp (name, ".plt") != 0
- && strncmp (name, ".got", 4) != 0)
- {
- /* It's not one of our sections, so don't allocate space. */
- continue;
- }
-
- if (strip)
- {
- _bfd_strip_section_from_output (info, s);
- continue;
- }
-
- /* Allocate memory for the section contents. Zero the memory
- for the benefit of .rela.plt, which has 4 unused entries
- at the beginning, and we don't want garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
- return FALSE;
- }
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Add some entries to the .dynamic section. We fill in the
- values later, in sparc64_elf_finish_dynamic_sections, but we
- must add the entries now so that we get the correct size for
- the .dynamic section. The DT_DEBUG entry is filled in by the
- dynamic linker and used by the debugger. */
-#define add_dynamic_entry(TAG, VAL) \
- _bfd_elf_add_dynamic_entry (info, TAG, VAL)
-
- int reg;
- struct sparc64_elf_app_reg * app_regs;
- struct elf_strtab_hash *dynstr;
- struct elf_link_hash_table *eht = elf_hash_table (info);
-
- if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
- }
-
- if (relplt)
- {
- if (!add_dynamic_entry (DT_PLTGOT, 0)
- || !add_dynamic_entry (DT_PLTRELSZ, 0)
- || !add_dynamic_entry (DT_PLTREL, DT_RELA)
- || !add_dynamic_entry (DT_JMPREL, 0))
- return FALSE;
- }
-
- if (!add_dynamic_entry (DT_RELA, 0)
- || !add_dynamic_entry (DT_RELASZ, 0)
- || !add_dynamic_entry (DT_RELAENT, sizeof (Elf64_External_Rela)))
- return FALSE;
-
- if (info->flags & DF_TEXTREL)
- {
- if (!add_dynamic_entry (DT_TEXTREL, 0))
- return FALSE;
- }
-
- /* Add dynamic STT_REGISTER symbols and corresponding DT_SPARC_REGISTER
- entries if needed. */
- app_regs = sparc64_elf_hash_table (info)->app_regs;
- dynstr = eht->dynstr;
-
- for (reg = 0; reg < 4; reg++)
- if (app_regs [reg].name != NULL)
- {
- struct elf_link_local_dynamic_entry *entry, *e;
-
- if (!add_dynamic_entry (DT_SPARC_REGISTER, 0))
- return FALSE;
-
- entry = (struct elf_link_local_dynamic_entry *)
- bfd_hash_allocate (&info->hash->table, sizeof (*entry));
- if (entry == NULL)
- return FALSE;
-
- /* We cheat here a little bit: the symbol will not be local, so we
- put it at the end of the dynlocal linked list. We will fix it
- later on, as we have to fix other fields anyway. */
- entry->isym.st_value = reg < 2 ? reg + 2 : reg + 4;
- entry->isym.st_size = 0;
- if (*app_regs [reg].name != '\0')
- entry->isym.st_name
- = _bfd_elf_strtab_add (dynstr, app_regs[reg].name, FALSE);
- else
- entry->isym.st_name = 0;
- entry->isym.st_other = 0;
- entry->isym.st_info = ELF_ST_INFO (app_regs [reg].bind,
- STT_REGISTER);
- entry->isym.st_shndx = app_regs [reg].shndx;
- entry->next = NULL;
- entry->input_bfd = output_bfd;
- entry->input_indx = -1;
-
- if (eht->dynlocal == NULL)
- eht->dynlocal = entry;
- else
- {
- for (e = eht->dynlocal; e->next; e = e->next)
- ;
- e->next = entry;
- }
- eht->dynsymcount++;
- }
- }
-#undef add_dynamic_entry
-
- return TRUE;
-}
-
-static bfd_boolean
-sparc64_elf_new_section_hook (abfd, sec)
- bfd *abfd;
- asection *sec;
-{
- struct sparc64_elf_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
-
- sdata = (struct sparc64_elf_section_data *) bfd_zalloc (abfd, amt);
- if (sdata == NULL)
- return FALSE;
- sec->used_by_bfd = (PTR) sdata;
-
- return _bfd_elf_new_section_hook (abfd, sec);
-}
-
-static bfd_boolean
-sparc64_elf_relax_section (abfd, section, link_info, again)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *section ATTRIBUTE_UNUSED;
- struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
- bfd_boolean *again;
-{
- *again = FALSE;
- sec_do_relax (section) = 1;
- return TRUE;
-}
-
-/* Relocate a SPARC64 ELF section. */
-
-static bfd_boolean
-sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
-{
- bfd *dynobj;
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- bfd_vma *local_got_offsets;
- bfd_vma got_base;
- asection *sgot;
- asection *splt;
- asection *sreloc;
- Elf_Internal_Rela *rel;
- Elf_Internal_Rela *relend;
-
- if (info->relocatable)
- return TRUE;
-
- dynobj = elf_hash_table (info)->dynobj;
- symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (input_bfd);
- local_got_offsets = elf_local_got_offsets (input_bfd);
-
- if (elf_hash_table(info)->hgot == NULL)
- got_base = 0;
- else
- got_base = elf_hash_table (info)->hgot->root.u.def.value;
-
- sgot = splt = sreloc = NULL;
- if (dynobj != NULL)
- splt = bfd_get_section_by_name (dynobj, ".plt");
-
- rel = relocs;
- relend = relocs + NUM_SHDR_ENTRIES (& elf_section_data (input_section)->rel_hdr);
- for (; rel < relend; rel++)
- {
- int r_type;
- reloc_howto_type *howto;
- unsigned long r_symndx;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
- asection *sec;
- bfd_vma relocation, off;
- bfd_reloc_status_type r;
- bfd_boolean is_plt = FALSE;
- bfd_boolean unresolved_reloc;
-
- r_type = ELF64_R_TYPE_ID (rel->r_info);
- if (r_type < 0 || r_type >= (int) R_SPARC_max_std)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- howto = sparc64_elf_howto_table + r_type;
-
- /* This is a final link. */
- r_symndx = ELF64_R_SYM (rel->r_info);
- h = NULL;
- sym = NULL;
- sec = NULL;
- unresolved_reloc = FALSE;
- 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 warned;
-
- RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
- r_symndx, symtab_hdr, sym_hashes,
- h, sec, relocation,
- unresolved_reloc, warned);
- if (warned)
- {
- /* To avoid generating warning messages about truncated
- relocations, set the relocation's address to be the same as
- the start of this section. */
- if (input_section->output_section != NULL)
- relocation = input_section->output_section->vma;
- else
- relocation = 0;
- }
- }
-
- do_dynreloc:
- /* When generating a shared object, these relocations are copied
- into the output file to be resolved at run time. */
- if (info->shared && r_symndx != 0 && (input_section->flags & SEC_ALLOC))
- {
- switch (r_type)
- {
- case R_SPARC_PC10:
- case R_SPARC_PC22:
- case R_SPARC_PC_HH22:
- case R_SPARC_PC_HM10:
- case R_SPARC_PC_LM22:
- if (h != NULL
- && !strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_"))
- break;
- /* Fall through. */
- case R_SPARC_DISP8:
- case R_SPARC_DISP16:
- case R_SPARC_DISP32:
- case R_SPARC_DISP64:
- case R_SPARC_WDISP30:
- case R_SPARC_WDISP22:
- case R_SPARC_WDISP19:
- case R_SPARC_WDISP16:
- if (h == NULL)
- break;
- /* Fall through. */
- case R_SPARC_8:
- case R_SPARC_16:
- case R_SPARC_32:
- case R_SPARC_HI22:
- case R_SPARC_22:
- case R_SPARC_13:
- case R_SPARC_LO10:
- case R_SPARC_UA32:
- case R_SPARC_10:
- case R_SPARC_11:
- case R_SPARC_64:
- case R_SPARC_OLO10:
- case R_SPARC_HH22:
- case R_SPARC_HM10:
- case R_SPARC_LM22:
- case R_SPARC_7:
- case R_SPARC_5:
- case R_SPARC_6:
- case R_SPARC_HIX22:
- case R_SPARC_LOX10:
- case R_SPARC_H44:
- case R_SPARC_M44:
- case R_SPARC_L44:
- case R_SPARC_UA64:
- case R_SPARC_UA16:
- {
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
- bfd_boolean skip, relocate;
-
- if (sreloc == NULL)
- {
- const char *name =
- (bfd_elf_string_from_elf_section
- (input_bfd,
- elf_elfheader (input_bfd)->e_shstrndx,
- elf_section_data (input_section)->rel_hdr.sh_name));
-
- if (name == NULL)
- return FALSE;
-
- BFD_ASSERT (strncmp (name, ".rela", 5) == 0
- && strcmp (bfd_get_section_name(input_bfd,
- input_section),
- name + 5) == 0);
-
- sreloc = bfd_get_section_by_name (dynobj, name);
- BFD_ASSERT (sreloc != NULL);
- }
-
- skip = FALSE;
- relocate = FALSE;
-
- outrel.r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section,
- rel->r_offset);
- if (outrel.r_offset == (bfd_vma) -1)
- skip = TRUE;
- else if (outrel.r_offset == (bfd_vma) -2)
- skip = TRUE, relocate = TRUE;
-
- outrel.r_offset += (input_section->output_section->vma
- + input_section->output_offset);
-
- /* Optimize unaligned reloc usage now that we know where
- it finally resides. */
- switch (r_type)
- {
- case R_SPARC_16:
- if (outrel.r_offset & 1) r_type = R_SPARC_UA16;
- break;
- case R_SPARC_UA16:
- if (!(outrel.r_offset & 1)) r_type = R_SPARC_16;
- break;
- case R_SPARC_32:
- if (outrel.r_offset & 3) r_type = R_SPARC_UA32;
- break;
- case R_SPARC_UA32:
- if (!(outrel.r_offset & 3)) r_type = R_SPARC_32;
- break;
- case R_SPARC_64:
- if (outrel.r_offset & 7) r_type = R_SPARC_UA64;
- break;
- case R_SPARC_UA64:
- if (!(outrel.r_offset & 7)) r_type = R_SPARC_64;
- break;
- case R_SPARC_DISP8:
- case R_SPARC_DISP16:
- case R_SPARC_DISP32:
- case R_SPARC_DISP64:
- /* If the symbol is not dynamic, we should not keep
- a dynamic relocation. But an .rela.* slot has been
- allocated for it, output R_SPARC_NONE.
- FIXME: Add code tracking needed dynamic relocs as
- e.g. i386 has. */
- if (h->dynindx == -1)
- skip = TRUE, relocate = TRUE;
- break;
- }
-
- if (skip)
- memset (&outrel, 0, sizeof outrel);
- /* h->dynindx may be -1 if the symbol was marked to
- become local. */
- else if (h != NULL && ! is_plt
- && ((! info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
- {
- BFD_ASSERT (h->dynindx != -1);
- outrel.r_info
- = ELF64_R_INFO (h->dynindx,
- ELF64_R_TYPE_INFO (
- ELF64_R_TYPE_DATA (rel->r_info),
- r_type));
- outrel.r_addend = rel->r_addend;
- }
- else
- {
- outrel.r_addend = relocation + rel->r_addend;
- if (r_type == R_SPARC_64)
- outrel.r_info = ELF64_R_INFO (0, R_SPARC_RELATIVE);
- else
- {
- long indx;
-
- if (is_plt)
- sec = splt;
-
- if (bfd_is_abs_section (sec))
- indx = 0;
- else if (sec == NULL || sec->owner == NULL)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- else
- {
- asection *osec;
-
- osec = sec->output_section;
- indx = elf_section_data (osec)->dynindx;
-
- /* 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;
-
- /* FIXME: we really should be able to link non-pic
- shared libraries. */
- if (indx == 0)
- {
- BFD_FAIL ();
- (*_bfd_error_handler)
- (_("%s: probably compiled without -fPIC?"),
- bfd_archive_filename (input_bfd));
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- }
-
- outrel.r_info
- = ELF64_R_INFO (indx,
- ELF64_R_TYPE_INFO (
- ELF64_R_TYPE_DATA (rel->r_info),
- r_type));
- }
- }
-
- loc = sreloc->contents;
- loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
-
- /* This reloc will be computed at runtime, so there's no
- need to do anything now. */
- if (! relocate)
- continue;
- }
- break;
- }
- }
-
- switch (r_type)
- {
- case R_SPARC_GOT10:
- case R_SPARC_GOT13:
- case R_SPARC_GOT22:
- /* Relocation is to the entry for this symbol in the global
- offset table. */
- if (sgot == NULL)
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- }
-
- if (h != NULL)
- {
- bfd_boolean dyn;
-
- off = h->got.offset;
- BFD_ASSERT (off != (bfd_vma) -1);
- dyn = elf_hash_table (info)->dynamic_sections_created;
-
- if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
- || (info->shared
- && (info->symbolic
- || h->dynindx == -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
- {
- /* This is actually a static link, or it is a -Bsymbolic
- link and the symbol is defined locally, or the symbol
- was forced to be local because of a version file. We
- must initialize this entry in the global offset table.
- Since the offset must always be a multiple of 8, we
- use the least significant bit to record whether we
- have initialized it already.
-
- When doing a dynamic link, we create a .rela.got
- relocation entry to initialize the value. This is
- done in the finish_dynamic_symbol routine. */
-
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
- bfd_put_64 (output_bfd, relocation,
- sgot->contents + off);
- h->got.offset |= 1;
- }
- }
- else
- unresolved_reloc = FALSE;
- }
- else
- {
- BFD_ASSERT (local_got_offsets != NULL);
- off = local_got_offsets[r_symndx];
- BFD_ASSERT (off != (bfd_vma) -1);
-
- /* The offset must always be a multiple of 8. We use
- the least significant bit to record whether we have
- already processed this entry. */
- if ((off & 1) != 0)
- off &= ~1;
- else
- {
- local_got_offsets[r_symndx] |= 1;
-
- if (info->shared)
- {
- asection *s;
- Elf_Internal_Rela outrel;
- bfd_byte *loc;
-
- /* The Solaris 2.7 64-bit linker adds the contents
- of the location to the value of the reloc.
- Note this is different behaviour to the
- 32-bit linker, which both adds the contents
- and ignores the addend. So clear the location. */
- bfd_put_64 (output_bfd, (bfd_vma) 0,
- sgot->contents + off);
-
- /* We need to generate a R_SPARC_RELATIVE reloc
- for the dynamic linker. */
- s = bfd_get_section_by_name(dynobj, ".rela.got");
- BFD_ASSERT (s != NULL);
-
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + off);
- outrel.r_info = ELF64_R_INFO (0, R_SPARC_RELATIVE);
- outrel.r_addend = relocation;
- loc = s->contents;
- loc += s->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
- }
- else
- bfd_put_64 (output_bfd, relocation, sgot->contents + off);
- }
- }
- relocation = sgot->output_offset + off - got_base;
- goto do_default;
-
- case R_SPARC_WPLT30:
- case R_SPARC_PLT32:
- case R_SPARC_HIPLT22:
- case R_SPARC_LOPLT10:
- case R_SPARC_PCPLT32:
- case R_SPARC_PCPLT22:
- case R_SPARC_PCPLT10:
- case R_SPARC_PLT64:
- /* Relocation is to the entry for this symbol in the
- procedure linkage table. */
- BFD_ASSERT (h != NULL);
-
- if (h->plt.offset == (bfd_vma) -1 || splt == NULL)
- {
- /* We didn't make a PLT entry for this symbol. This
- happens when statically linking PIC code, or when
- using -Bsymbolic. */
- goto do_default;
- }
-
- relocation = (splt->output_section->vma
- + splt->output_offset
- + sparc64_elf_plt_entry_offset (h->plt.offset));
- unresolved_reloc = FALSE;
- if (r_type == R_SPARC_WPLT30)
- goto do_wplt30;
- if (r_type == R_SPARC_PLT32 || r_type == R_SPARC_PLT64)
- {
- r_type = r_type == R_SPARC_PLT32 ? R_SPARC_32 : R_SPARC_64;
- is_plt = TRUE;
- goto do_dynreloc;
- }
- goto do_default;
-
- case R_SPARC_OLO10:
- {
- bfd_vma x;
-
- relocation += rel->r_addend;
- relocation = (relocation & 0x3ff) + ELF64_R_TYPE_DATA (rel->r_info);
-
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = (x & ~(bfd_vma) 0x1fff) | (relocation & 0x1fff);
- bfd_put_32 (input_bfd, x, contents + rel->r_offset);
-
- r = bfd_check_overflow (howto->complain_on_overflow,
- howto->bitsize, howto->rightshift,
- bfd_arch_bits_per_address (input_bfd),
- relocation);
- }
- break;
-
- case R_SPARC_WDISP16:
- {
- bfd_vma x;
-
- relocation += rel->r_addend;
- /* Adjust for pc-relative-ness. */
- relocation -= (input_section->output_section->vma
- + input_section->output_offset);
- relocation -= rel->r_offset;
-
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x &= ~(bfd_vma) 0x303fff;
- x |= ((((relocation >> 2) & 0xc000) << 6)
- | ((relocation >> 2) & 0x3fff));
- bfd_put_32 (input_bfd, x, contents + rel->r_offset);
-
- r = bfd_check_overflow (howto->complain_on_overflow,
- howto->bitsize, howto->rightshift,
- bfd_arch_bits_per_address (input_bfd),
- relocation);
- }
- break;
-
- case R_SPARC_HIX22:
- {
- bfd_vma x;
-
- relocation += rel->r_addend;
- relocation = relocation ^ MINUS_ONE;
-
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = (x & ~(bfd_vma) 0x3fffff) | ((relocation >> 10) & 0x3fffff);
- bfd_put_32 (input_bfd, x, contents + rel->r_offset);
-
- r = bfd_check_overflow (howto->complain_on_overflow,
- howto->bitsize, howto->rightshift,
- bfd_arch_bits_per_address (input_bfd),
- relocation);
- }
- break;
-
- case R_SPARC_LOX10:
- {
- bfd_vma x;
-
- relocation += rel->r_addend;
- relocation = (relocation & 0x3ff) | 0x1c00;
-
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = (x & ~(bfd_vma) 0x1fff) | relocation;
- bfd_put_32 (input_bfd, x, contents + rel->r_offset);
-
- r = bfd_reloc_ok;
- }
- break;
-
- case R_SPARC_WDISP30:
- do_wplt30:
- if (sec_do_relax (input_section)
- && rel->r_offset + 4 < input_section->_raw_size)
- {
-#define G0 0
-#define O7 15
-#define XCC (2 << 20)
-#define COND(x) (((x)&0xf)<<25)
-#define CONDA COND(0x8)
-#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC)
-#define INSN_BA (F2(0,2) | CONDA)
-#define INSN_OR F3(2, 0x2, 0)
-#define INSN_NOP F2(0,4)
-
- bfd_vma x, y;
-
- /* If the instruction is a call with either:
- restore
- arithmetic instruction with rd == %o7
- where rs1 != %o7 and rs2 if it is register != %o7
- then we can optimize if the call destination is near
- by changing the call into a branch always. */
- x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- y = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
- if ((x & OP(~0)) == OP(1) && (y & OP(~0)) == OP(2))
- {
- if (((y & OP3(~0)) == OP3(0x3d) /* restore */
- || ((y & OP3(0x28)) == 0 /* arithmetic */
- && (y & RD(~0)) == RD(O7)))
- && (y & RS1(~0)) != RS1(O7)
- && ((y & F3I(~0))
- || (y & RS2(~0)) != RS2(O7)))
- {
- bfd_vma reloc;
-
- reloc = relocation + rel->r_addend - rel->r_offset;
- reloc -= (input_section->output_section->vma
- + input_section->output_offset);
- if (reloc & 3)
- goto do_default;
-
- /* Ensure the branch fits into simm22. */
- if ((reloc & ~(bfd_vma)0x7fffff)
- && ((reloc | 0x7fffff) != MINUS_ONE))
- goto do_default;
- reloc >>= 2;
-
- /* Check whether it fits into simm19. */
- if ((reloc & 0x3c0000) == 0
- || (reloc & 0x3c0000) == 0x3c0000)
- x = INSN_BPA | (reloc & 0x7ffff); /* ba,pt %xcc */
- else
- x = INSN_BA | (reloc & 0x3fffff); /* ba */
- bfd_put_32 (input_bfd, x, contents + rel->r_offset);
- r = bfd_reloc_ok;
- if (rel->r_offset >= 4
- && (y & (0xffffffff ^ RS1(~0)))
- == (INSN_OR | RD(O7) | RS2(G0)))
- {
- bfd_vma z;
- unsigned int reg;
-
- z = bfd_get_32 (input_bfd,
- contents + rel->r_offset - 4);
- if ((z & (0xffffffff ^ RD(~0)))
- != (INSN_OR | RS1(O7) | RS2(G0)))
- break;
-
- /* The sequence was
- or %o7, %g0, %rN
- call foo
- or %rN, %g0, %o7
-
- If call foo was replaced with ba, replace
- or %rN, %g0, %o7 with nop. */
-
- reg = (y & RS1(~0)) >> 14;
- if (reg != ((z & RD(~0)) >> 25)
- || reg == G0 || reg == O7)
- break;
-
- bfd_put_32 (input_bfd, (bfd_vma) INSN_NOP,
- contents + rel->r_offset + 4);
- }
- break;
- }
- }
- }
- /* Fall through. */
-
- default:
- do_default:
- r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset,
- relocation, rel->r_addend);
- break;
- }
-
- /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
- because such sections are not SEC_ALLOC and thus ld.so will
- not process them. */
- if (unresolved_reloc
- && !((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
- (*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
- (long) rel->r_offset,
- h->root.root.string);
-
- switch (r)
- {
- case bfd_reloc_ok:
- break;
-
- default:
- case bfd_reloc_outofrange:
- abort ();
-
- case bfd_reloc_overflow:
- {
- const char *name;
-
- /* The Solaris native linker silently disregards
- overflows. We don't, but this breaks stabs debugging
- info, whose relocations are only 32-bits wide. Ignore
- overflows in this case and also for discarded entries. */
- if ((r_type == R_SPARC_32 || r_type == R_SPARC_DISP32)
- && (((input_section->flags & SEC_DEBUGGING) != 0
- && strcmp (bfd_section_name (input_bfd, input_section),
- ".stab") == 0)
- || _bfd_elf_section_offset (output_bfd, info,
- input_section,
- rel->r_offset) == (bfd_vma)-1))
- break;
-
- if (h != NULL)
- {
- if (h->root.type == bfd_link_hash_undefweak
- && howto->pc_relative)
- {
- /* Assume this is a call protected by other code that
- detect the symbol is undefined. If this is the case,
- we can safely ignore the overflow. If not, the
- program is hosed anyway, and a little warning isn't
- going to help. */
- break;
- }
-
- name = h->root.root.string;
- }
- else
- {
- name = (bfd_elf_string_from_elf_section
- (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name));
- if (name == NULL)
- return FALSE;
- if (*name == '\0')
- name = bfd_section_name (input_bfd, sec);
- }
- if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
- return FALSE;
- }
- break;
- }
- }
-
- return TRUE;
-}
-
-/* Finish up dynamic symbol handling. We set the contents of various
- dynamic sections here. */
-
-static bfd_boolean
-sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
-{
- bfd *dynobj;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- if (h->plt.offset != (bfd_vma) -1)
- {
- asection *splt;
- asection *srela;
- Elf_Internal_Rela rela;
- bfd_byte *loc;
-
- /* This symbol has an entry in the PLT. Set it up. */
-
- BFD_ASSERT (h->dynindx != -1);
-
- splt = bfd_get_section_by_name (dynobj, ".plt");
- srela = bfd_get_section_by_name (dynobj, ".rela.plt");
- BFD_ASSERT (splt != NULL && srela != NULL);
-
- /* Fill in the entry in the .rela.plt section. */
-
- if (h->plt.offset < LARGE_PLT_THRESHOLD)
- {
- rela.r_offset = sparc64_elf_plt_entry_offset (h->plt.offset);
- rela.r_addend = 0;
- }
- else
- {
- bfd_vma max = splt->_raw_size / PLT_ENTRY_SIZE;
- rela.r_offset = sparc64_elf_plt_ptr_offset (h->plt.offset, max);
- rela.r_addend = -(sparc64_elf_plt_entry_offset (h->plt.offset) + 4)
- -(splt->output_section->vma + splt->output_offset);
- }
- rela.r_offset += (splt->output_section->vma + splt->output_offset);
- rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_JMP_SLOT);
-
- /* Adjust for the first 4 reserved elements in the .plt section
- when setting the offset in the .rela.plt section.
- Sun forgot to read their own ABI and copied elf32-sparc behaviour,
- thus .plt[4] has corresponding .rela.plt[0] and so on. */
-
- loc = srela->contents;
- loc += (h->plt.offset - 4) * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
-
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- {
- /* Mark the symbol as undefined, rather than as defined in
- the .plt section. Leave the value alone. */
- sym->st_shndx = SHN_UNDEF;
- /* If the symbol is weak, we do need to clear the value.
- Otherwise, the PLT entry would provide a definition for
- the symbol even if the symbol wasn't defined anywhere,
- and so the symbol would never be NULL. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
- == 0)
- sym->st_value = 0;
- }
- }
-
- if (h->got.offset != (bfd_vma) -1)
- {
- asection *sgot;
- asection *srela;
- Elf_Internal_Rela rela;
- bfd_byte *loc;
-
- /* This symbol has an entry in the GOT. Set it up. */
-
- sgot = bfd_get_section_by_name (dynobj, ".got");
- srela = bfd_get_section_by_name (dynobj, ".rela.got");
- BFD_ASSERT (sgot != NULL && srela != NULL);
-
- rela.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + (h->got.offset &~ (bfd_vma) 1));
-
- /* If this is a -Bsymbolic link, and the symbol is defined
- locally, we just want to emit a RELATIVE reloc. Likewise if
- the symbol was forced to be local because of a version file.
- The entry in the global offset table will already have been
- initialized in the relocate_section function. */
- if (info->shared
- && (info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
- {
- asection *sec = h->root.u.def.section;
- rela.r_info = ELF64_R_INFO (0, R_SPARC_RELATIVE);
- rela.r_addend = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else
- {
- rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
- rela.r_addend = 0;
- }
-
- bfd_put_64 (output_bfd, (bfd_vma) 0,
- sgot->contents + (h->got.offset &~ (bfd_vma) 1));
- loc = srela->contents;
- loc += srela->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
- }
-
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
- {
- asection *s;
- Elf_Internal_Rela rela;
- bfd_byte *loc;
-
- /* This symbols needs a copy reloc. Set it up. */
- BFD_ASSERT (h->dynindx != -1);
-
- s = bfd_get_section_by_name (h->root.u.def.section->owner,
- ".rela.bss");
- BFD_ASSERT (s != NULL);
-
- rela.r_offset = (h->root.u.def.value
- + h->root.u.def.section->output_section->vma
- + h->root.u.def.section->output_offset);
- rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_COPY);
- rela.r_addend = 0;
- loc = s->contents + s->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
- }
-
- /* Mark some specially defined symbols as absolute. */
- if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
- sym->st_shndx = SHN_ABS;
-
- return TRUE;
-}
-
-/* Finish up the dynamic sections. */
-
-static bfd_boolean
-sparc64_elf_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
-{
- bfd *dynobj;
- int stt_regidx = -1;
- asection *sdyn;
- asection *sgot;
-
- dynobj = elf_hash_table (info)->dynobj;
-
- sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
-
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- asection *splt;
- Elf64_External_Dyn *dyncon, *dynconend;
-
- splt = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (splt != NULL && sdyn != NULL);
-
- dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_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
- {
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
- }
- }
- bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
- }
- }
-
- /* Initialize the contents of the .plt section. */
- if (splt->_raw_size > 0)
- sparc64_elf_build_plt (output_bfd, splt->contents,
- (int) (splt->_raw_size / PLT_ENTRY_SIZE));
-
- elf_section_data (splt->output_section)->this_hdr.sh_entsize =
- PLT_ENTRY_SIZE;
- }
-
- /* Set the first entry in the global offset table to the address of
- the dynamic section. */
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- if (sgot->_raw_size > 0)
- {
- if (sdyn == NULL)
- bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents);
- else
- bfd_put_64 (output_bfd,
- sdyn->output_section->vma + sdyn->output_offset,
- sgot->contents);
- }
-
- elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 8;
-
- return TRUE;
-}
-
-static enum elf_reloc_type_class
-sparc64_elf_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
-{
- switch ((int) ELF64_R_TYPE (rela->r_info))
- {
- case R_SPARC_RELATIVE:
- return reloc_class_relative;
- case R_SPARC_JMP_SLOT:
- return reloc_class_plt;
- case R_SPARC_COPY:
- return reloc_class_copy;
- default:
- return reloc_class_normal;
- }
-}
/* Functions for dealing with the e_flags field. */
@@ -2960,9 +626,7 @@ sparc64_elf_reloc_type_class (rela)
object file when linking. */
static bfd_boolean
-sparc64_elf_merge_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+elf64_sparc_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
bfd_boolean error;
flagword new_flags, old_flags;
@@ -3010,8 +674,8 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: linking UltraSPARC specific with HAL specific code"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking UltraSPARC specific with HAL specific code"),
+ ibfd);
}
/* Choose the most restrictive memory ordering. */
old_mm = (old_flags & EF_SPARCV9_MM);
@@ -3029,8 +693,8 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
+ (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+ ibfd, (long) new_flags, (long) old_flags);
}
elf_elfheader (obfd)->e_flags = old_flags;
@@ -3047,10 +711,9 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
/* MARCO: Set the correct entry size for the .stab section. */
static bfd_boolean
-sparc64_elf_fake_sections (abfd, hdr, sec)
- bfd *abfd ATTRIBUTE_UNUSED;
- Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED;
- asection *sec;
+elf64_sparc_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
+ Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED,
+ asection *sec)
{
const char *name;
@@ -3068,10 +731,8 @@ sparc64_elf_fake_sections (abfd, hdr, sec)
/* Print a STT_REGISTER symbol to file FILE. */
static const char *
-sparc64_elf_print_symbol_all (abfd, filep, symbol)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR filep;
- asymbol *symbol;
+elf64_sparc_print_symbol_all (bfd *abfd ATTRIBUTE_UNUSED, PTR filep,
+ asymbol *symbol)
{
FILE *file = (FILE *) filep;
int reg, type;
@@ -3093,19 +754,20 @@ sparc64_elf_print_symbol_all (abfd, filep, symbol)
return symbol->name;
}
-/* Set the right machine number for a SPARC64 ELF file. */
-
-static bfd_boolean
-sparc64_elf_object_p (abfd)
- bfd *abfd;
+static enum elf_reloc_type_class
+elf64_sparc_reloc_type_class (const Elf_Internal_Rela *rela)
{
- unsigned long mach = bfd_mach_sparc_v9;
-
- if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
- mach = bfd_mach_sparc_v9b;
- else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
- mach = bfd_mach_sparc_v9a;
- return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, mach);
+ switch ((int) ELF64_R_TYPE (rela->r_info))
+ {
+ case R_SPARC_RELATIVE:
+ return reloc_class_relative;
+ case R_SPARC_JMP_SLOT:
+ return reloc_class_plt;
+ case R_SPARC_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
}
/* Relocations in the 64 bit SPARC ELF ABI are more complex than in
@@ -3113,7 +775,7 @@ sparc64_elf_object_p (abfd)
ELF64_R_TYPE_DATA field. This structure is used to redirect the
relocation handling routines. */
-const struct elf_size_info sparc64_elf_size_info =
+const struct elf_size_info elf64_sparc_size_info =
{
sizeof (Elf64_External_Ehdr),
sizeof (Elf64_External_Phdr),
@@ -3135,10 +797,10 @@ const struct elf_size_info sparc64_elf_size_info =
EV_CURRENT,
bfd_elf64_write_out_phdrs,
bfd_elf64_write_shdrs_and_ehdr,
- sparc64_elf_write_relocs,
+ elf64_sparc_write_relocs,
bfd_elf64_swap_symbol_in,
bfd_elf64_swap_symbol_out,
- sparc64_elf_slurp_reloc_table,
+ elf64_sparc_slurp_reloc_table,
bfd_elf64_slurp_symbol_table,
bfd_elf64_swap_dyn_in,
bfd_elf64_swap_dyn_out,
@@ -3159,70 +821,83 @@ const struct elf_size_info sparc64_elf_size_info =
/* This is the value that we used before the ABI was released. */
#define ELF_MACHINE_ALT1 EM_OLD_SPARCV9
-#define bfd_elf64_bfd_link_hash_table_create \
- sparc64_elf_bfd_link_hash_table_create
-
-#define elf_info_to_howto \
- sparc64_elf_info_to_howto
+#define elf_backend_reloc_type_class \
+ elf64_sparc_reloc_type_class
#define bfd_elf64_get_reloc_upper_bound \
- sparc64_elf_get_reloc_upper_bound
+ elf64_sparc_get_reloc_upper_bound
#define bfd_elf64_get_dynamic_reloc_upper_bound \
- sparc64_elf_get_dynamic_reloc_upper_bound
+ elf64_sparc_get_dynamic_reloc_upper_bound
#define bfd_elf64_canonicalize_reloc \
- sparc64_elf_canonicalize_reloc
+ elf64_sparc_canonicalize_reloc
#define bfd_elf64_canonicalize_dynamic_reloc \
- sparc64_elf_canonicalize_dynamic_reloc
+ elf64_sparc_canonicalize_dynamic_reloc
+#define elf_backend_add_symbol_hook \
+ elf64_sparc_add_symbol_hook
+#define elf_backend_get_symbol_type \
+ elf64_sparc_get_symbol_type
+#define elf_backend_symbol_processing \
+ elf64_sparc_symbol_processing
+#define elf_backend_print_symbol_all \
+ elf64_sparc_print_symbol_all
+#define elf_backend_output_arch_syms \
+ elf64_sparc_output_arch_syms
+#define bfd_elf64_bfd_merge_private_bfd_data \
+ elf64_sparc_merge_private_bfd_data
+#define elf_backend_fake_sections \
+ elf64_sparc_fake_sections
+#define elf_backend_size_info \
+ elf64_sparc_size_info
+
+#define elf_backend_plt_sym_val \
+ _bfd_sparc_elf_plt_sym_val
+#define bfd_elf64_bfd_link_hash_table_create \
+ _bfd_sparc_elf_link_hash_table_create
+#define elf_info_to_howto \
+ _bfd_sparc_elf_info_to_howto
+#define elf_backend_copy_indirect_symbol \
+ _bfd_sparc_elf_copy_indirect_symbol
#define bfd_elf64_bfd_reloc_type_lookup \
- sparc64_elf_reloc_type_lookup
+ _bfd_sparc_elf_reloc_type_lookup
#define bfd_elf64_bfd_relax_section \
- sparc64_elf_relax_section
+ _bfd_sparc_elf_relax_section
#define bfd_elf64_new_section_hook \
- sparc64_elf_new_section_hook
+ _bfd_sparc_elf_new_section_hook
#define elf_backend_create_dynamic_sections \
- _bfd_elf_create_dynamic_sections
-#define elf_backend_add_symbol_hook \
- sparc64_elf_add_symbol_hook
-#define elf_backend_get_symbol_type \
- sparc64_elf_get_symbol_type
-#define elf_backend_symbol_processing \
- sparc64_elf_symbol_processing
+ _bfd_sparc_elf_create_dynamic_sections
#define elf_backend_check_relocs \
- sparc64_elf_check_relocs
+ _bfd_sparc_elf_check_relocs
#define elf_backend_adjust_dynamic_symbol \
- sparc64_elf_adjust_dynamic_symbol
+ _bfd_sparc_elf_adjust_dynamic_symbol
+#define elf_backend_omit_section_dynsym \
+ _bfd_sparc_elf_omit_section_dynsym
#define elf_backend_size_dynamic_sections \
- sparc64_elf_size_dynamic_sections
+ _bfd_sparc_elf_size_dynamic_sections
#define elf_backend_relocate_section \
- sparc64_elf_relocate_section
+ _bfd_sparc_elf_relocate_section
#define elf_backend_finish_dynamic_symbol \
- sparc64_elf_finish_dynamic_symbol
+ _bfd_sparc_elf_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
- sparc64_elf_finish_dynamic_sections
-#define elf_backend_print_symbol_all \
- sparc64_elf_print_symbol_all
-#define elf_backend_output_arch_syms \
- sparc64_elf_output_arch_syms
-#define bfd_elf64_bfd_merge_private_bfd_data \
- sparc64_elf_merge_private_bfd_data
-#define elf_backend_fake_sections \
- sparc64_elf_fake_sections
+ _bfd_sparc_elf_finish_dynamic_sections
-#define elf_backend_size_info \
- sparc64_elf_size_info
+#define bfd_elf64_mkobject \
+ _bfd_sparc_elf_mkobject
#define elf_backend_object_p \
- sparc64_elf_object_p
-#define elf_backend_reloc_type_class \
- sparc64_elf_reloc_type_class
-
+ _bfd_sparc_elf_object_p
+#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_can_gc_sections 1
+#define elf_backend_can_refcount 1
#define elf_backend_want_got_plt 0
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 1
+#define elf_backend_got_header_size 8
#define elf_backend_rela_normal 1
/* Section 5.2.4 of the ABI specifies a 256-byte boundary for the table. */
#define elf_backend_plt_alignment 8
-#define elf_backend_got_header_size 8
-
#include "elf64-target.h"
diff --git a/contrib/binutils/bfd/elf64-x86-64.c b/contrib/binutils/bfd/elf64-x86-64.c
index a1d62501f960..9befd69c5df6 100644
--- a/contrib/binutils/bfd/elf64-x86-64.c
+++ b/contrib/binutils/bfd/elf64-x86-64.c
@@ -1,5 +1,6 @@
/* X86-64 specific support for 64-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Contributed by Jan Hubicka <jh@suse.cz>.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -30,8 +31,8 @@
#define MINUS_ONE (~ (bfd_vma) 0)
/* The relocation "howto" table. Order of fields:
- type, size, bitsize, pc_relative, complain_on_overflow,
- special_function, name, partial_inplace, src_mask, dst_pack, pcrel_offset. */
+ type, rightshift, size, bitsize, pc_relative, bitpos, complain_on_overflow,
+ special_function, name, partial_inplace, src_mask, dst_mask, pcrel_offset. */
static reloc_howto_type x86_64_elf_howto_table[] =
{
HOWTO(R_X86_64_NONE, 0, 0, 0, FALSE, 0, complain_overflow_dont,
@@ -74,7 +75,7 @@ static reloc_howto_type x86_64_elf_howto_table[] =
bfd_elf_generic_reloc, "R_X86_64_16", FALSE, 0xffff, 0xffff, FALSE),
HOWTO(R_X86_64_PC16,0, 1, 16, TRUE, 0, complain_overflow_bitfield,
bfd_elf_generic_reloc, "R_X86_64_PC16", FALSE, 0xffff, 0xffff, TRUE),
- HOWTO(R_X86_64_8, 0, 0, 8, FALSE, 0, complain_overflow_signed,
+ HOWTO(R_X86_64_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
bfd_elf_generic_reloc, "R_X86_64_8", FALSE, 0xff, 0xff, FALSE),
HOWTO(R_X86_64_PC8, 0, 0, 8, TRUE, 0, complain_overflow_signed,
bfd_elf_generic_reloc, "R_X86_64_PC8", FALSE, 0xff, 0xff, TRUE),
@@ -93,7 +94,7 @@ static reloc_howto_type x86_64_elf_howto_table[] =
HOWTO(R_X86_64_TLSLD, 0, 2, 32, TRUE, 0, complain_overflow_signed,
bfd_elf_generic_reloc, "R_X86_64_TLSLD", FALSE, 0xffffffff,
0xffffffff, TRUE),
- HOWTO(R_X86_64_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ HOWTO(R_X86_64_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_signed,
bfd_elf_generic_reloc, "R_X86_64_DTPOFF32", FALSE, 0xffffffff,
0xffffffff, FALSE),
HOWTO(R_X86_64_GOTTPOFF, 0, 2, 32, TRUE, 0, complain_overflow_signed,
@@ -102,6 +103,51 @@ static reloc_howto_type x86_64_elf_howto_table[] =
HOWTO(R_X86_64_TPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_signed,
bfd_elf_generic_reloc, "R_X86_64_TPOFF32", FALSE, 0xffffffff,
0xffffffff, FALSE),
+ HOWTO(R_X86_64_PC64, 0, 4, 64, TRUE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_X86_64_PC64", FALSE, MINUS_ONE, MINUS_ONE,
+ TRUE),
+ HOWTO(R_X86_64_GOTOFF64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "R_X86_64_GOTOFF64",
+ FALSE, MINUS_ONE, MINUS_ONE, FALSE),
+ HOWTO(R_X86_64_GOTPC32, 0, 2, 32, TRUE, 0, complain_overflow_signed,
+ bfd_elf_generic_reloc, "R_X86_64_GOTPC32",
+ FALSE, 0xffffffff, 0xffffffff, TRUE),
+ HOWTO(R_X86_64_GOT64, 0, 4, 64, FALSE, 0, complain_overflow_signed,
+ bfd_elf_generic_reloc, "R_X86_64_GOT64", FALSE, MINUS_ONE, MINUS_ONE,
+ FALSE),
+ HOWTO(R_X86_64_GOTPCREL64, 0, 4, 64, TRUE, 0, complain_overflow_signed,
+ bfd_elf_generic_reloc, "R_X86_64_GOTPCREL64", FALSE, MINUS_ONE,
+ MINUS_ONE, TRUE),
+ HOWTO(R_X86_64_GOTPC64, 0, 4, 64, TRUE, 0, complain_overflow_signed,
+ bfd_elf_generic_reloc, "R_X86_64_GOTPC64",
+ FALSE, MINUS_ONE, MINUS_ONE, TRUE),
+ HOWTO(R_X86_64_GOTPLT64, 0, 4, 64, FALSE, 0, complain_overflow_signed,
+ bfd_elf_generic_reloc, "R_X86_64_GOTPLT64", FALSE, MINUS_ONE,
+ MINUS_ONE, FALSE),
+ HOWTO(R_X86_64_PLTOFF64, 0, 4, 64, FALSE, 0, complain_overflow_signed,
+ bfd_elf_generic_reloc, "R_X86_64_PLTOFF64", FALSE, MINUS_ONE,
+ MINUS_ONE, FALSE),
+ EMPTY_HOWTO (32),
+ EMPTY_HOWTO (33),
+ HOWTO(R_X86_64_GOTPC32_TLSDESC, 0, 2, 32, TRUE, 0,
+ complain_overflow_bitfield, bfd_elf_generic_reloc,
+ "R_X86_64_GOTPC32_TLSDESC",
+ FALSE, 0xffffffff, 0xffffffff, TRUE),
+ HOWTO(R_X86_64_TLSDESC_CALL, 0, 0, 0, FALSE, 0,
+ complain_overflow_dont, bfd_elf_generic_reloc,
+ "R_X86_64_TLSDESC_CALL",
+ FALSE, 0, 0, FALSE),
+ HOWTO(R_X86_64_TLSDESC, 0, 4, 64, FALSE, 0,
+ complain_overflow_bitfield, bfd_elf_generic_reloc,
+ "R_X86_64_TLSDESC",
+ FALSE, MINUS_ONE, MINUS_ONE, FALSE),
+
+ /* We have a gap in the reloc numbers here.
+ R_X86_64_standard counts the number up to this point, and
+ R_X86_64_vt_offset is the value to subtract from a reloc type of
+ R_X86_64_GNU_VT* to form an index into this table. */
+#define R_X86_64_standard (R_X86_64_TLSDESC + 1)
+#define R_X86_64_vt_offset (R_X86_64_GNU_VTINHERIT - R_X86_64_standard)
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_X86_64_GNU_VTINHERIT, 0, 4, 0, FALSE, 0, complain_overflow_dont,
@@ -146,14 +192,46 @@ static const struct elf_reloc_map x86_64_reloc_map[] =
{ BFD_RELOC_X86_64_DTPOFF32, R_X86_64_DTPOFF32, },
{ BFD_RELOC_X86_64_GOTTPOFF, R_X86_64_GOTTPOFF, },
{ BFD_RELOC_X86_64_TPOFF32, R_X86_64_TPOFF32, },
+ { BFD_RELOC_64_PCREL, R_X86_64_PC64, },
+ { BFD_RELOC_X86_64_GOTOFF64, R_X86_64_GOTOFF64, },
+ { BFD_RELOC_X86_64_GOTPC32, R_X86_64_GOTPC32, },
+ { BFD_RELOC_X86_64_GOT64, R_X86_64_GOT64, },
+ { BFD_RELOC_X86_64_GOTPCREL64,R_X86_64_GOTPCREL64, },
+ { BFD_RELOC_X86_64_GOTPC64, R_X86_64_GOTPC64, },
+ { BFD_RELOC_X86_64_GOTPLT64, R_X86_64_GOTPLT64, },
+ { BFD_RELOC_X86_64_PLTOFF64, R_X86_64_PLTOFF64, },
+ { BFD_RELOC_X86_64_GOTPC32_TLSDESC, R_X86_64_GOTPC32_TLSDESC, },
+ { BFD_RELOC_X86_64_TLSDESC_CALL, R_X86_64_TLSDESC_CALL, },
+ { BFD_RELOC_X86_64_TLSDESC, R_X86_64_TLSDESC, },
{ BFD_RELOC_VTABLE_INHERIT, R_X86_64_GNU_VTINHERIT, },
{ BFD_RELOC_VTABLE_ENTRY, R_X86_64_GNU_VTENTRY, },
};
+static reloc_howto_type *
+elf64_x86_64_rtype_to_howto (bfd *abfd, unsigned r_type)
+{
+ unsigned i;
+
+ if (r_type < (unsigned int) R_X86_64_GNU_VTINHERIT
+ || r_type >= (unsigned int) R_X86_64_max)
+ {
+ if (r_type >= (unsigned int) R_X86_64_standard)
+ {
+ (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
+ abfd, (int) r_type);
+ r_type = R_X86_64_NONE;
+ }
+ i = r_type;
+ }
+ else
+ i = r_type - (unsigned int) R_X86_64_vt_offset;
+ BFD_ASSERT (x86_64_elf_howto_table[i].type == r_type);
+ return &x86_64_elf_howto_table[i];
+}
/* Given a BFD reloc type, return a HOWTO structure. */
static reloc_howto_type *
-elf64_x86_64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+elf64_x86_64_reloc_type_lookup (bfd *abfd,
bfd_reloc_code_real_type code)
{
unsigned int i;
@@ -162,7 +240,8 @@ elf64_x86_64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
i++)
{
if (x86_64_reloc_map[i].bfd_reloc_val == code)
- return &x86_64_elf_howto_table[i];
+ return elf64_x86_64_rtype_to_howto (abfd,
+ x86_64_reloc_map[i].elf_reloc_val);
}
return 0;
}
@@ -173,20 +252,10 @@ static void
elf64_x86_64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
- unsigned r_type, i;
+ unsigned r_type;
r_type = ELF64_R_TYPE (dst->r_info);
- if (r_type < (unsigned int) R_X86_64_GNU_VTINHERIT)
- {
- BFD_ASSERT (r_type <= (unsigned int) R_X86_64_TPOFF32);
- i = r_type;
- }
- else
- {
- BFD_ASSERT (r_type < (unsigned int) R_X86_64_max);
- i = r_type - ((unsigned int) R_X86_64_GNU_VTINHERIT - R_X86_64_TPOFF32 - 1);
- }
- cache_ptr->howto = &x86_64_elf_howto_table[i];
+ cache_ptr->howto = elf64_x86_64_rtype_to_howto (abfd, r_type);
BFD_ASSERT (r_type == cache_ptr->howto->type);
}
@@ -195,7 +264,7 @@ static bfd_boolean
elf64_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- size_t raw_size;
+ size_t size;
switch (note->descsz)
{
@@ -213,14 +282,14 @@ elf64_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 112;
- raw_size = 216;
+ size = 216;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
+ size, note->descpos + offset);
}
static bfd_boolean
@@ -330,7 +399,20 @@ struct elf64_x86_64_link_hash_entry
#define GOT_NORMAL 1
#define GOT_TLS_GD 2
#define GOT_TLS_IE 3
+#define GOT_TLS_GDESC 4
+#define GOT_TLS_GD_BOTH_P(type) \
+ ((type) == (GOT_TLS_GD | GOT_TLS_GDESC))
+#define GOT_TLS_GD_P(type) \
+ ((type) == GOT_TLS_GD || GOT_TLS_GD_BOTH_P (type))
+#define GOT_TLS_GDESC_P(type) \
+ ((type) == GOT_TLS_GDESC || GOT_TLS_GD_BOTH_P (type))
+#define GOT_TLS_GD_ANY_P(type) \
+ (GOT_TLS_GD_P (type) || GOT_TLS_GDESC_P (type))
unsigned char tls_type;
+
+ /* Offset of the GOTPLT entry reserved for the TLS descriptor,
+ starting at the end of the jump table. */
+ bfd_vma tlsdesc_got;
};
#define elf64_x86_64_hash_entry(ent) \
@@ -342,6 +424,9 @@ struct elf64_x86_64_obj_tdata
/* tls_type for each local got entry. */
char *local_got_tls_type;
+
+ /* GOTPLT entries for TLS descriptors. */
+ bfd_vma *local_tlsdesc_gotent;
};
#define elf64_x86_64_tdata(abfd) \
@@ -350,6 +435,8 @@ struct elf64_x86_64_obj_tdata
#define elf64_x86_64_local_got_tls_type(abfd) \
(elf64_x86_64_tdata (abfd)->local_got_tls_type)
+#define elf64_x86_64_local_tlsdesc_gotent(abfd) \
+ (elf64_x86_64_tdata (abfd)->local_tlsdesc_gotent)
/* x86-64 ELF linker hash table. */
@@ -366,11 +453,23 @@ struct elf64_x86_64_link_hash_table
asection *sdynbss;
asection *srelbss;
+ /* The offset into splt of the PLT entry for the TLS descriptor
+ resolver. Special values are 0, if not necessary (or not found
+ to be necessary yet), and -1 if needed but not determined
+ yet. */
+ bfd_vma tlsdesc_plt;
+ /* The offset into sgot of the GOT entry used by the PLT entry
+ above. */
+ bfd_vma tlsdesc_got;
+
union {
bfd_signed_vma refcount;
bfd_vma offset;
} tls_ld_got;
+ /* The amount of space used by the jump slots in the GOT. */
+ bfd_vma sgotplt_jump_table_size;
+
/* Small local sym to section mapping cache. */
struct sym_sec_cache sym_sec;
};
@@ -380,6 +479,9 @@ struct elf64_x86_64_link_hash_table
#define elf64_x86_64_hash_table(p) \
((struct elf64_x86_64_link_hash_table *) ((p)->hash))
+#define elf64_x86_64_compute_jump_table_size(htab) \
+ ((htab)->srelplt->reloc_count * GOT_ENTRY_SIZE)
+
/* Create an entry in an x86-64 ELF linker hash table. */
static struct bfd_hash_entry *
@@ -405,6 +507,7 @@ link_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table,
eh = (struct elf64_x86_64_link_hash_entry *) entry;
eh->dyn_relocs = NULL;
eh->tls_type = GOT_UNKNOWN;
+ eh->tlsdesc_got = (bfd_vma) -1;
}
return entry;
@@ -422,7 +525,8 @@ elf64_x86_64_link_hash_table_create (bfd *abfd)
if (ret == NULL)
return NULL;
- if (! _bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc))
+ if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
+ sizeof (struct elf64_x86_64_link_hash_entry)))
{
free (ret);
return NULL;
@@ -436,7 +540,10 @@ elf64_x86_64_link_hash_table_create (bfd *abfd)
ret->sdynbss = NULL;
ret->srelbss = NULL;
ret->sym_sec.abfd = NULL;
+ ret->tlsdesc_plt = 0;
+ ret->tlsdesc_got = 0;
ret->tls_ld_got.refcount = 0;
+ ret->sgotplt_jump_table_size = 0;
return &ret->elf.root;
}
@@ -458,12 +565,13 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info)
if (!htab->sgot || !htab->sgotplt)
abort ();
- htab->srelgot = bfd_make_section (dynobj, ".rela.got");
+ htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got",
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (htab->srelgot == NULL
- || ! bfd_set_section_flags (dynobj, htab->srelgot,
- (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED
- | SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, htab->srelgot, 3))
return FALSE;
return TRUE;
@@ -501,7 +609,7 @@ elf64_x86_64_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf64_x86_64_copy_indirect_symbol (const struct elf_backend_data *bed,
+elf64_x86_64_copy_indirect_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
@@ -517,10 +625,7 @@ elf64_x86_64_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf64_x86_64_dyn_relocs **pp;
struct elf64_x86_64_dyn_relocs *p;
- if (ind->root.type == bfd_link_hash_indirect)
- abort ();
-
- /* Add reloc counts against the weak sym to the strong sym
+ /* Add reloc counts against the indirect sym to the direct sym
list. Merge any entries against the same section. */
for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
{
@@ -553,17 +658,19 @@ elf64_x86_64_copy_indirect_symbol (const struct elf_backend_data *bed,
if (ELIMINATE_COPY_RELOCS
&& ind->root.type != bfd_link_hash_indirect
- && (dir->elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
- /* If called to transfer flags for a weakdef during processing
- of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
- We clear it ourselves for ELIMINATE_COPY_RELOCS. */
- dir->elf_link_hash_flags |=
- (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_HASH_NEEDS_PLT));
+ && dir->dynamic_adjusted)
+ {
+ /* If called to transfer flags for a weakdef during processing
+ of elf_adjust_dynamic_symbol, don't copy non_got_ref.
+ We clear it ourselves for ELIMINATE_COPY_RELOCS. */
+ dir->ref_dynamic |= ind->ref_dynamic;
+ dir->ref_regular |= ind->ref_regular;
+ dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
+ dir->needs_plt |= ind->needs_plt;
+ dir->pointer_equality_needed |= ind->pointer_equality_needed;
+ }
else
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+ _bfd_elf_link_hash_copy_indirect (info, dir, ind);
}
static bfd_boolean
@@ -593,6 +700,8 @@ elf64_x86_64_tls_transition (struct bfd_link_info *info, int r_type, int is_loca
switch (r_type)
{
case R_X86_64_TLSGD:
+ case R_X86_64_GOTPC32_TLSDESC:
+ case R_X86_64_TLSDESC_CALL:
case R_X86_64_GOTTPOFF:
if (is_local)
return R_X86_64_TPOFF32;
@@ -640,16 +749,20 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
{
- (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
- bfd_archive_filename (abfd),
- r_symndx);
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd, r_symndx);
return FALSE;
}
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ {
+ 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;
+ }
r_type = elf64_x86_64_tls_transition (info, r_type, h == NULL);
switch (r_type)
@@ -662,9 +775,10 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (info->shared)
{
(*_bfd_error_handler)
- (_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
- bfd_archive_filename (abfd),
- x86_64_elf_howto_table[r_type].name);
+ (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
+ abfd,
+ x86_64_elf_howto_table[r_type].name,
+ (h) ? h->root.root.string : "a local symbol");
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -678,6 +792,11 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
case R_X86_64_GOT32:
case R_X86_64_GOTPCREL:
case R_X86_64_TLSGD:
+ case R_X86_64_GOT64:
+ case R_X86_64_GOTPCREL64:
+ case R_X86_64_GOTPLT64:
+ case R_X86_64_GOTPC32_TLSDESC:
+ case R_X86_64_TLSDESC_CALL:
/* This symbol requires a global offset table entry. */
{
int tls_type, old_tls_type;
@@ -687,10 +806,21 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
default: tls_type = GOT_NORMAL; break;
case R_X86_64_TLSGD: tls_type = GOT_TLS_GD; break;
case R_X86_64_GOTTPOFF: tls_type = GOT_TLS_IE; break;
+ case R_X86_64_GOTPC32_TLSDESC:
+ case R_X86_64_TLSDESC_CALL:
+ tls_type = GOT_TLS_GDESC; break;
}
if (h != NULL)
{
+ if (r_type == R_X86_64_GOTPLT64)
+ {
+ /* This relocation indicates that we also need
+ a PLT entry, as this is a function. We don't need
+ a PLT entry for local symbols. */
+ h->needs_plt = 1;
+ h->plt.refcount += 1;
+ }
h->got.refcount += 1;
old_tls_type = elf64_x86_64_hash_entry (h)->tls_type;
}
@@ -705,14 +835,17 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
bfd_size_type size;
size = symtab_hdr->sh_info;
- size *= sizeof (bfd_signed_vma) + sizeof (char);
+ size *= sizeof (bfd_signed_vma)
+ + sizeof (bfd_vma) + sizeof (char);
local_got_refcounts = ((bfd_signed_vma *)
bfd_zalloc (abfd, size));
if (local_got_refcounts == NULL)
return FALSE;
elf_local_got_refcounts (abfd) = local_got_refcounts;
+ elf64_x86_64_local_tlsdesc_gotent (abfd)
+ = (bfd_vma *) (local_got_refcounts + symtab_hdr->sh_info);
elf64_x86_64_local_got_tls_type (abfd)
- = (char *) (local_got_refcounts + symtab_hdr->sh_info);
+ = (char *) (local_got_refcounts + 2 * symtab_hdr->sh_info);
}
local_got_refcounts[r_symndx] += 1;
old_tls_type
@@ -722,16 +855,19 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
/* If a TLS symbol is accessed using IE at least once,
there is no point to use dynamic model for it. */
if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN
- && (old_tls_type != GOT_TLS_GD || tls_type != GOT_TLS_IE))
+ && (! GOT_TLS_GD_ANY_P (old_tls_type)
+ || tls_type != GOT_TLS_IE))
{
- if (old_tls_type == GOT_TLS_IE && tls_type == GOT_TLS_GD)
+ if (old_tls_type == GOT_TLS_IE && GOT_TLS_GD_ANY_P (tls_type))
tls_type = old_tls_type;
+ else if (GOT_TLS_GD_ANY_P (old_tls_type)
+ && GOT_TLS_GD_ANY_P (tls_type))
+ tls_type |= old_tls_type;
else
{
(*_bfd_error_handler)
- (_("%s: %s' accessed both as normal and thread local symbol"),
- bfd_archive_filename (abfd),
- h ? h->root.root.string : "<local>");
+ (_("%B: %s' accessed both as normal and thread local symbol"),
+ abfd, h ? h->root.root.string : "<local>");
return FALSE;
}
}
@@ -746,7 +882,9 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
}
/* Fall through */
- //case R_X86_64_GOTPCREL:
+ case R_X86_64_GOTOFF64:
+ case R_X86_64_GOTPC32:
+ case R_X86_64_GOTPC64:
create_got:
if (htab->sgot == NULL)
{
@@ -770,10 +908,20 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (h == NULL)
continue;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 1;
h->plt.refcount += 1;
break;
+ case R_X86_64_PLTOFF64:
+ /* This tries to form the 'address' of a function relative
+ to GOT. For global symbols we need a PLT entry. */
+ if (h != NULL)
+ {
+ h->needs_plt = 1;
+ h->plt.refcount += 1;
+ }
+ goto create_got;
+
case R_X86_64_8:
case R_X86_64_16:
case R_X86_64_32:
@@ -787,9 +935,10 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
&& (sec->flags & SEC_READONLY) != 0)
{
(*_bfd_error_handler)
- (_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
- bfd_archive_filename (abfd),
- x86_64_elf_howto_table[r_type].name);
+ (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
+ abfd,
+ x86_64_elf_howto_table[r_type].name,
+ (h) ? h->root.root.string : "a local symbol");
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -798,6 +947,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
case R_X86_64_PC8:
case R_X86_64_PC16:
case R_X86_64_PC32:
+ case R_X86_64_PC64:
case R_X86_64_64:
if (h != NULL && !info->shared)
{
@@ -807,11 +957,13 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
sections have not yet been mapped to output sections.
Tentatively set the flag for now, and correct in
adjust_dynamic_symbol. */
- h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 1;
/* We may need a .plt entry if the function this reloc
refers to is in a shared lib. */
h->plt.refcount += 1;
+ if (r_type != R_X86_64_PC32 && r_type != R_X86_64_PC64)
+ h->pointer_equality_needed = 1;
}
/* If we are creating a shared library, and this is a reloc
@@ -839,19 +991,18 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
&& (sec->flags & SEC_ALLOC) != 0
&& (((r_type != R_X86_64_PC8)
&& (r_type != R_X86_64_PC16)
- && (r_type != R_X86_64_PC32))
+ && (r_type != R_X86_64_PC32)
+ && (r_type != R_X86_64_PC64))
|| (h != NULL
&& (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ || !h->def_regular)))
{
struct elf64_x86_64_dyn_relocs *p;
struct elf64_x86_64_dyn_relocs **head;
@@ -876,8 +1027,8 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
name + 5) != 0)
{
(*_bfd_error_handler)
- (_("%s: bad relocation section name `%s\'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: bad relocation section name `%s\'"),
+ abfd, name);
}
if (htab->elf.dynobj == NULL)
@@ -890,13 +1041,14 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
{
flagword flags;
- sreloc = bfd_make_section (dynobj, name);
flags = (SEC_HAS_CONTENTS | SEC_READONLY
| SEC_IN_MEMORY | SEC_LINKER_CREATED);
if ((sec->flags & SEC_ALLOC) != 0)
flags |= SEC_ALLOC | SEC_LOAD;
+ sreloc = bfd_make_section_with_flags (dynobj,
+ name,
+ flags);
if (sreloc == NULL
- || ! bfd_set_section_flags (dynobj, sreloc, flags)
|| ! bfd_set_section_alignment (dynobj, sreloc, 3))
return FALSE;
}
@@ -911,6 +1063,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
}
else
{
+ void **vpp;
/* Track dynamic relocs needed for local syms too.
We really need local syms available to do this
easily. Oh well. */
@@ -921,8 +1074,10 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (s == NULL)
return FALSE;
- head = ((struct elf64_x86_64_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ /* Beware of type punned pointers vs strict aliasing
+ rules. */
+ vpp = &(elf_section_data (s)->local_dynrel);
+ head = (struct elf64_x86_64_dyn_relocs **)vpp;
}
p = *head;
@@ -943,7 +1098,8 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
p->count += 1;
if (r_type == R_X86_64_PC8
|| r_type == R_X86_64_PC16
- || r_type == R_X86_64_PC32)
+ || r_type == R_X86_64_PC32
+ || r_type == R_X86_64_PC64)
p->pc_count += 1;
}
break;
@@ -1041,6 +1197,9 @@ elf64_x86_64_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
struct elf64_x86_64_dyn_relocs *p;
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;
eh = (struct elf64_x86_64_link_hash_entry *) h;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
@@ -1062,11 +1221,18 @@ elf64_x86_64_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
break;
case R_X86_64_TLSGD:
+ case R_X86_64_GOTPC32_TLSDESC:
+ case R_X86_64_TLSDESC_CALL:
case R_X86_64_GOTTPOFF:
case R_X86_64_GOT32:
case R_X86_64_GOTPCREL:
+ case R_X86_64_GOT64:
+ case R_X86_64_GOTPCREL64:
+ case R_X86_64_GOTPLT64:
if (h != NULL)
{
+ if (r_type == R_X86_64_GOTPLT64 && h->plt.refcount > 0)
+ h->plt.refcount -= 1;
if (h->got.refcount > 0)
h->got.refcount -= 1;
}
@@ -1085,11 +1251,13 @@ elf64_x86_64_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
case R_X86_64_PC8:
case R_X86_64_PC16:
case R_X86_64_PC32:
+ case R_X86_64_PC64:
if (info->shared)
break;
/* Fall thru */
case R_X86_64_PLT32:
+ case R_X86_64_PLTOFF64:
if (h != NULL)
{
if (h->plt.refcount > 0)
@@ -1123,7 +1291,7 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
will fill in the contents of the procedure linkage table later,
when we know the address of the .got section. */
if (h->type == STT_FUNC
- || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ || h->needs_plt)
{
if (h->plt.refcount <= 0
|| SYMBOL_CALLS_LOCAL (info, h)
@@ -1136,7 +1304,7 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
such a case, we don't actually need to build a procedure
linkage table, and we can just do a PC32 reloc instead. */
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
}
return TRUE;
@@ -1152,16 +1320,14 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
+ if (h->u.weakdef != NULL)
{
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
+ 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;
if (ELIMINATE_COPY_RELOCS || info->nocopyreloc)
- h->elf_link_hash_flags
- = ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
- | (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
+ h->non_got_ref = h->u.weakdef->non_got_ref;
return TRUE;
}
@@ -1177,13 +1343,13 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If there are no references to this symbol that do not use the
GOT, we don't need to generate a copy reloc. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
+ if (!h->non_got_ref)
return TRUE;
/* If -z nocopyreloc was given, we won't generate them either. */
if (info->nocopyreloc)
{
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 0;
return TRUE;
}
@@ -1204,11 +1370,18 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
we'll be keeping the dynamic relocs and avoiding the copy reloc. */
if (p == NULL)
{
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ h->non_got_ref = 0;
return TRUE;
}
}
+ if (h->size == 0)
+ {
+ (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+ h->root.root.string);
+ return TRUE;
+ }
+
/* We must allocate the symbol in our .dynbss section, which will
become part of the .bss section of the executable. There will be
an entry for this symbol in the .dynsym section. The dynamic
@@ -1226,8 +1399,8 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf64_External_Rela);
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ htab->srelbss->size += sizeof (Elf64_External_Rela);
+ h->needs_copy = 1;
}
/* We need to figure out the alignment required for this symbol. I
@@ -1241,7 +1414,7 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Apply the required alignment. */
s = htab->sdynbss;
- s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ 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))
@@ -1250,10 +1423,10 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
- s->_raw_size += h->size;
+ s->size += h->size;
return TRUE;
}
@@ -1284,7 +1457,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -1297,10 +1470,10 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- if (s->_raw_size == 0)
- s->_raw_size += PLT_ENTRY_SIZE;
+ if (s->size == 0)
+ s->size += PLT_ENTRY_SIZE;
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@@ -1308,34 +1481,38 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
pointers compare as equal between the normal executable and
the shared library. */
if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->def_regular)
{
h->root.u.def.section = s;
h->root.u.def.value = h->plt.offset;
}
/* Make room for this entry. */
- s->_raw_size += PLT_ENTRY_SIZE;
+ s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
- htab->sgotplt->_raw_size += GOT_ENTRY_SIZE;
+ htab->sgotplt->size += GOT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
- htab->srelplt->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelplt->size += sizeof (Elf64_External_Rela);
+ htab->srelplt->reloc_count++;
}
else
{
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
}
}
else
{
h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
}
+ eh = (struct elf64_x86_64_link_hash_entry *) h;
+ eh->tlsdesc_got = (bfd_vma) -1;
+
/* If R_X86_64_GOTTPOFF symbol is now local to the binary,
make it a R_X86_64_TPOFF32 requiring no GOT entry. */
if (h->got.refcount > 0
@@ -1352,37 +1529,52 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
}
- s = htab->sgot;
- h->got.offset = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
- /* R_X86_64_TLSGD needs 2 consecutive GOT slots. */
- if (tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ if (GOT_TLS_GDESC_P (tls_type))
+ {
+ eh->tlsdesc_got = htab->sgotplt->size
+ - elf64_x86_64_compute_jump_table_size (htab);
+ htab->sgotplt->size += 2 * GOT_ENTRY_SIZE;
+ h->got.offset = (bfd_vma) -2;
+ }
+ if (! GOT_TLS_GDESC_P (tls_type)
+ || GOT_TLS_GD_P (tls_type))
+ {
+ s = htab->sgot;
+ h->got.offset = s->size;
+ s->size += GOT_ENTRY_SIZE;
+ if (GOT_TLS_GD_P (tls_type))
+ s->size += GOT_ENTRY_SIZE;
+ }
dyn = htab->elf.dynamic_sections_created;
/* R_X86_64_TLSGD needs one dynamic relocation if local symbol
and two if global.
R_X86_64_GOTTPOFF needs one dynamic relocation. */
- if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
+ if ((GOT_TLS_GD_P (tls_type) && h->dynindx == -1)
|| tls_type == GOT_TLS_IE)
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
- else if (tls_type == GOT_TLS_GD)
- htab->srelgot->_raw_size += 2 * sizeof (Elf64_External_Rela);
- else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak)
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
+ else if (GOT_TLS_GD_P (tls_type))
+ htab->srelgot->size += 2 * sizeof (Elf64_External_Rela);
+ else if (! GOT_TLS_GDESC_P (tls_type)
+ && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak)
&& (info->shared
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
+ if (GOT_TLS_GDESC_P (tls_type))
+ {
+ htab->srelplt->size += sizeof (Elf64_External_Rela);
+ htab->tlsdesc_plt = (bfd_vma) -1;
+ }
}
else
h->got.offset = (bfd_vma) -1;
- eh = (struct elf64_x86_64_link_hash_entry *) h;
if (eh->dyn_relocs == NULL)
return TRUE;
@@ -1417,9 +1609,21 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
/* Also discard relocs on undefined weak syms with non-default
visibility. */
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ if (eh->dyn_relocs != NULL
&& h->root.type == bfd_link_hash_undefweak)
- eh->dyn_relocs = NULL;
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->dyn_relocs = NULL;
+
+ /* Make sure undefined weak symbols are output as a dynamic
+ symbol in PIEs. */
+ else if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+ }
}
else if (ELIMINATE_COPY_RELOCS)
{
@@ -1427,9 +1631,9 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
symbols which turn out to need copy relocs or are not
dynamic. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
|| (htab->elf.dynamic_sections_created
&& (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined))))
@@ -1437,7 +1641,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -1458,7 +1662,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
- sreloc->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ sreloc->size += p->count * sizeof (Elf64_External_Rela);
}
return TRUE;
@@ -1518,7 +1722,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
- s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@@ -1530,6 +1734,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
bfd_signed_vma *local_got;
bfd_signed_vma *end_local_got;
char *local_tls_type;
+ bfd_vma *local_tlsdesc_gotent;
bfd_size_type locsymcount;
Elf_Internal_Shdr *symtab_hdr;
asection *srel;
@@ -1541,8 +1746,8 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
struct elf64_x86_64_dyn_relocs *p;
- for (p = *((struct elf64_x86_64_dyn_relocs **)
- &elf_section_data (s)->local_dynrel);
+ for (p = (struct elf64_x86_64_dyn_relocs *)
+ (elf_section_data (s)->local_dynrel);
p != NULL;
p = p->next)
{
@@ -1557,7 +1762,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
- srel->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ srel->size += p->count * sizeof (Elf64_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
@@ -1573,20 +1778,43 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
locsymcount = symtab_hdr->sh_info;
end_local_got = local_got + locsymcount;
local_tls_type = elf64_x86_64_local_got_tls_type (ibfd);
+ local_tlsdesc_gotent = elf64_x86_64_local_tlsdesc_gotent (ibfd);
s = htab->sgot;
srel = htab->srelgot;
- for (; local_got < end_local_got; ++local_got, ++local_tls_type)
+ for (; local_got < end_local_got;
+ ++local_got, ++local_tls_type, ++local_tlsdesc_gotent)
{
+ *local_tlsdesc_gotent = (bfd_vma) -1;
if (*local_got > 0)
{
- *local_got = s->_raw_size;
- s->_raw_size += GOT_ENTRY_SIZE;
- if (*local_tls_type == GOT_TLS_GD)
- s->_raw_size += GOT_ENTRY_SIZE;
+ if (GOT_TLS_GDESC_P (*local_tls_type))
+ {
+ *local_tlsdesc_gotent = htab->sgotplt->size
+ - elf64_x86_64_compute_jump_table_size (htab);
+ htab->sgotplt->size += 2 * GOT_ENTRY_SIZE;
+ *local_got = (bfd_vma) -2;
+ }
+ if (! GOT_TLS_GDESC_P (*local_tls_type)
+ || GOT_TLS_GD_P (*local_tls_type))
+ {
+ *local_got = s->size;
+ s->size += GOT_ENTRY_SIZE;
+ if (GOT_TLS_GD_P (*local_tls_type))
+ s->size += GOT_ENTRY_SIZE;
+ }
if (info->shared
- || *local_tls_type == GOT_TLS_GD
+ || GOT_TLS_GD_ANY_P (*local_tls_type)
|| *local_tls_type == GOT_TLS_IE)
- srel->_raw_size += sizeof (Elf64_External_Rela);
+ {
+ if (GOT_TLS_GDESC_P (*local_tls_type))
+ {
+ htab->srelplt->size += sizeof (Elf64_External_Rela);
+ htab->tlsdesc_plt = (bfd_vma) -1;
+ }
+ if (! GOT_TLS_GDESC_P (*local_tls_type)
+ || GOT_TLS_GD_P (*local_tls_type))
+ srel->size += sizeof (Elf64_External_Rela);
+ }
}
else
*local_got = (bfd_vma) -1;
@@ -1597,9 +1825,9 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
/* Allocate 2 got entries and 1 dynamic reloc for R_X86_64_TLSLD
relocs. */
- htab->tls_ld_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 2 * GOT_ENTRY_SIZE;
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->tls_ld_got.offset = htab->sgot->size;
+ htab->sgot->size += 2 * GOT_ENTRY_SIZE;
+ htab->srelgot->size += sizeof (Elf64_External_Rela);
}
else
htab->tls_ld_got.offset = -1;
@@ -1608,6 +1836,34 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
sym dynamic relocs. */
elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
+ /* For every jump slot reserved in the sgotplt, reloc_count is
+ incremented. However, when we reserve space for TLS descriptors,
+ it's not incremented, so in order to compute the space reserved
+ for them, it suffices to multiply the reloc count by the jump
+ slot size. */
+ if (htab->srelplt)
+ htab->sgotplt_jump_table_size
+ = elf64_x86_64_compute_jump_table_size (htab);
+
+ if (htab->tlsdesc_plt)
+ {
+ /* If we're not using lazy TLS relocations, don't generate the
+ PLT and GOT entries they require. */
+ if ((info->flags & DF_BIND_NOW))
+ htab->tlsdesc_plt = 0;
+ else
+ {
+ htab->tlsdesc_got = htab->sgot->size;
+ htab->sgot->size += GOT_ENTRY_SIZE;
+ /* Reserve room for the initial entry.
+ FIXME: we could probably do away with it in this case. */
+ if (htab->splt->size == 0)
+ htab->splt->size += PLT_ENTRY_SIZE;
+ htab->tlsdesc_plt = htab->splt->size;
+ htab->splt->size += PLT_ENTRY_SIZE;
+ }
+ }
+
/* We now have determined the sizes of the various dynamic sections.
Allocate memory for them. */
relocs = FALSE;
@@ -1618,19 +1874,21 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
if (s == htab->splt
|| s == htab->sgot
- || s == htab->sgotplt)
+ || s == htab->sgotplt
+ || s == htab->sdynbss)
{
/* Strip this section if we don't need it; see the
comment below. */
}
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
- if (s->_raw_size != 0 && s != htab->srelplt)
+ if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
- s->reloc_count = 0;
+ if (s != htab->srelplt)
+ s->reloc_count = 0;
}
else
{
@@ -1638,7 +1896,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- if (s->_raw_size == 0)
+ if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@@ -1650,16 +1908,19 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
function which decides whether anything needs to go
into these sections. */
- _bfd_strip_section_from_output (info, s);
+ s->flags |= SEC_EXCLUDE;
continue;
}
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
but this way if it does, we get a R_X86_64_NONE reloc instead
of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -1680,13 +1941,18 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (htab->splt->_raw_size != 0)
+ if (htab->splt->size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
|| !add_dynamic_entry (DT_PLTREL, DT_RELA)
|| !add_dynamic_entry (DT_JMPREL, 0))
return FALSE;
+
+ if (htab->tlsdesc_plt
+ && (!add_dynamic_entry (DT_TLSDESC_PLT, 0)
+ || !add_dynamic_entry (DT_TLSDESC_GOT, 0)))
+ return FALSE;
}
if (relocs)
@@ -1714,6 +1980,41 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return TRUE;
}
+static bfd_boolean
+elf64_x86_64_always_size_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
+{
+ asection *tls_sec = elf_hash_table (info)->tls_sec;
+
+ if (tls_sec)
+ {
+ struct elf_link_hash_entry *tlsbase;
+
+ tlsbase = elf_link_hash_lookup (elf_hash_table (info),
+ "_TLS_MODULE_BASE_",
+ FALSE, FALSE, FALSE);
+
+ if (tlsbase && tlsbase->type == STT_TLS)
+ {
+ struct bfd_link_hash_entry *bh = NULL;
+ const struct elf_backend_data *bed
+ = get_elf_backend_data (output_bfd);
+
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, output_bfd, "_TLS_MODULE_BASE_", BSF_LOCAL,
+ tls_sec, 0, NULL, FALSE,
+ bed->collect, &bh)))
+ return FALSE;
+ tlsbase = (struct elf_link_hash_entry *)bh;
+ tlsbase->def_regular = 1;
+ tlsbase->other = STV_HIDDEN;
+ (*bed->elf_backend_hide_symbol) (info, tlsbase, TRUE);
+ }
+ }
+
+ return TRUE;
+}
+
/* Return the base VMA address which should be subtracted from real addresses
when resolving @dtpoff relocation.
This is PT_TLS segment p_vaddr. */
@@ -1741,6 +2042,24 @@ tpoff (struct bfd_link_info *info, bfd_vma address)
return address - htab->tls_size - htab->tls_sec->vma;
}
+/* Is the instruction before OFFSET in CONTENTS a 32bit relative
+ branch? */
+
+static bfd_boolean
+is_32bit_relative_branch (bfd_byte *contents, bfd_vma offset)
+{
+ /* Opcode Instruction
+ 0xe8 call
+ 0xe9 jump
+ 0x0f 0x8x conditional jump */
+ return ((offset > 0
+ && (contents [offset - 1] == 0xe8
+ || contents [offset - 1] == 0xe9))
+ || (offset > 1
+ && contents [offset - 2] == 0x0f
+ && (contents [offset - 1] & 0xf0) == 0x80));
+}
+
/* Relocate an x86_64 ELF section. */
static bfd_boolean
@@ -1754,6 +2073,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
bfd_vma *local_got_offsets;
+ bfd_vma *local_tlsdesc_gotents;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
@@ -1764,6 +2084,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
local_got_offsets = elf_local_got_offsets (input_bfd);
+ local_tlsdesc_gotents = elf64_x86_64_local_tlsdesc_gotent (input_bfd);
rel = relocs;
relend = relocs + input_section->reloc_count;
@@ -1775,7 +2096,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym;
asection *sec;
- bfd_vma off;
+ bfd_vma off, offplt;
bfd_vma relocation;
bfd_boolean unresolved_reloc;
bfd_reloc_status_type r;
@@ -1818,11 +2139,23 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
copied into the output file to be resolved at run time. */
switch (r_type)
{
+ asection *base_got;
case R_X86_64_GOT32:
+ case R_X86_64_GOT64:
/* Relocation is to the entry for this symbol in the global
offset table. */
case R_X86_64_GOTPCREL:
- /* Use global offset table as symbol value. */
+ case R_X86_64_GOTPCREL64:
+ /* Use global offset table entry as symbol value. */
+ case R_X86_64_GOTPLT64:
+ /* This is the same as GOT64 for relocation purposes, but
+ indicates the existence of a PLT entry. The difficulty is,
+ that we must calculate the GOT slot offset from the PLT
+ offset, if this symbol got a PLT entry (it was global).
+ Additionally if it's computed from the PLT entry, then that
+ GOT offset is relative to .got.plt, not to .got. */
+ base_got = htab->sgot;
+
if (htab->sgot == NULL)
abort ();
@@ -1831,6 +2164,19 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd_boolean dyn;
off = h->got.offset;
+ if (h->needs_plt
+ && h->plt.offset != (bfd_vma)-1
+ && off == (bfd_vma)-1)
+ {
+ /* We can't use h->got.offset here to save
+ state, or even just remember the offset, as
+ finish_dynamic_symbol would use that as offset into
+ .got. */
+ bfd_vma plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1;
+ off = (plt_index + 3) * GOT_ENTRY_SIZE;
+ base_got = htab->sgotplt;
+ }
+
dyn = htab->elf.dynamic_sections_created;
if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
@@ -1855,7 +2201,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
else
{
bfd_put_64 (output_bfd, relocation,
- htab->sgot->contents + off);
+ base_got->contents + off);
+ /* Note that this is harmless for the GOTPLT64 case,
+ as -1 | 1 still is -1. */
h->got.offset |= 1;
}
}
@@ -1877,7 +2225,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
else
{
bfd_put_64 (output_bfd, relocation,
- htab->sgot->contents + off);
+ base_got->contents + off);
if (info->shared)
{
@@ -1891,8 +2239,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (s == NULL)
abort ();
- outrel.r_offset = (htab->sgot->output_section->vma
- + htab->sgot->output_offset
+ outrel.r_offset = (base_got->output_section->vma
+ + base_got->output_offset
+ off);
outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE);
outrel.r_addend = relocation;
@@ -1908,10 +2256,67 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (off >= (bfd_vma) -2)
abort ();
- relocation = htab->sgot->output_offset + off;
- if (r_type == R_X86_64_GOTPCREL)
- relocation += htab->sgot->output_section->vma;
+ relocation = base_got->output_section->vma
+ + base_got->output_offset + off;
+ if (r_type != R_X86_64_GOTPCREL && r_type != R_X86_64_GOTPCREL64)
+ relocation -= htab->sgotplt->output_section->vma
+ - htab->sgotplt->output_offset;
+
+ break;
+
+ case R_X86_64_GOTOFF64:
+ /* Relocation is relative to the start of the global offset
+ table. */
+
+ /* Check to make sure it isn't a protected function symbol
+ for shared library since it may not be local when used
+ as function address. */
+ if (info->shared
+ && h
+ && h->def_regular
+ && h->type == STT_FUNC
+ && ELF_ST_VISIBILITY (h->other) == STV_PROTECTED)
+ {
+ (*_bfd_error_handler)
+ (_("%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object"),
+ input_bfd, h->root.root.string);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ /* Note that sgot is not involved in this
+ calculation. We always want the start of .got.plt. If we
+ defined _GLOBAL_OFFSET_TABLE_ in a different way, as is
+ permitted by the ABI, we might have to change this
+ calculation. */
+ relocation -= htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset;
+ break;
+
+ case R_X86_64_GOTPC32:
+ case R_X86_64_GOTPC64:
+ /* Use global offset table as symbol value. */
+ relocation = htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset;
+ unresolved_reloc = FALSE;
+ break;
+
+ case R_X86_64_PLTOFF64:
+ /* Relocation is PLT entry relative to GOT. For local
+ symbols it's the symbol itself relative to GOT. */
+ if (h != NULL
+ /* See PLT32 handling. */
+ && h->plt.offset != (bfd_vma) -1
+ && htab->splt != NULL)
+ {
+ relocation = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + h->plt.offset);
+ unresolved_reloc = FALSE;
+ }
+ relocation -= htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset;
break;
case R_X86_64_PLT32:
@@ -1941,9 +2346,38 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
case R_X86_64_PC8:
case R_X86_64_PC16:
case R_X86_64_PC32:
+ if (info->shared
+ && !SYMBOL_REFERENCES_LOCAL (info, h)
+ && (input_section->flags & SEC_ALLOC) != 0
+ && (input_section->flags & SEC_READONLY) != 0
+ && (!h->def_regular
+ || r_type != R_X86_64_PC32
+ || h->type != STT_FUNC
+ || ELF_ST_VISIBILITY (h->other) != STV_PROTECTED
+ || !is_32bit_relative_branch (contents,
+ rel->r_offset)))
+ {
+ if (h->def_regular
+ && r_type == R_X86_64_PC32
+ && h->type == STT_FUNC
+ && ELF_ST_VISIBILITY (h->other) == STV_PROTECTED)
+ (*_bfd_error_handler)
+ (_("%B: relocation R_X86_64_PC32 against protected function `%s' can not be used when making a shared object"),
+ input_bfd, h->root.root.string);
+ else
+ (*_bfd_error_handler)
+ (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
+ input_bfd, x86_64_elf_howto_table[r_type].name,
+ h->root.root.string);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ /* Fall through. */
+
case R_X86_64_8:
case R_X86_64_16:
case R_X86_64_32:
+ case R_X86_64_PC64:
case R_X86_64_64:
/* FIXME: The ABI says the linker should make sure the value is
the same when it's zeroextended to 64 bit. */
@@ -1961,17 +2395,16 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|| h->root.type != bfd_link_hash_undefweak)
&& ((r_type != R_X86_64_PC8
&& r_type != R_X86_64_PC16
- && r_type != R_X86_64_PC32)
+ && r_type != R_X86_64_PC32
+ && r_type != R_X86_64_PC64)
|| !SYMBOL_CALLS_LOCAL (info, h)))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& h != NULL
&& h->dynindx != -1
- && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
|| h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined)))
{
@@ -2007,10 +2440,10 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
&& (r_type == R_X86_64_PC8
|| r_type == R_X86_64_PC16
|| r_type == R_X86_64_PC32
+ || r_type == R_X86_64_PC64
|| !info->shared
|| !info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || !h->def_regular))
{
outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
outrel.r_addend = rel->r_addend;
@@ -2068,6 +2501,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
break;
case R_X86_64_TLSGD:
+ case R_X86_64_GOTPC32_TLSDESC:
+ case R_X86_64_TLSDESC_CALL:
case R_X86_64_GOTTPOFF:
r_type = elf64_x86_64_tls_transition (info, r_type, h == NULL);
tls_type = GOT_UNKNOWN;
@@ -2079,7 +2514,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (!info->shared && h->dynindx == -1 && tls_type == GOT_TLS_IE)
r_type = R_X86_64_TPOFF32;
}
- if (r_type == R_X86_64_TLSGD)
+ if (r_type == R_X86_64_TLSGD
+ || r_type == R_X86_64_GOTPC32_TLSDESC
+ || r_type == R_X86_64_TLSDESC_CALL)
{
if (tls_type == GOT_TLS_IE)
r_type = R_X86_64_GOTTPOFF;
@@ -2105,7 +2542,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset - 4 + i)
== tlsgd[i]);
- BFD_ASSERT (rel->r_offset + 12 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 12 <= input_section->size);
for (i = 0; i < 4; i++)
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset + 4 + i)
@@ -2121,6 +2558,67 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
rel++;
continue;
}
+ else if (ELF64_R_TYPE (rel->r_info) == R_X86_64_GOTPC32_TLSDESC)
+ {
+ /* GDesc -> LE transition.
+ It's originally something like:
+ leaq x@tlsdesc(%rip), %rax
+
+ Change it to:
+ movl $x@tpoff, %rax
+
+ Registers other than %rax may be set up here. */
+
+ unsigned int val, type, type2;
+ bfd_vma roff;
+
+ /* First, make sure it's a leaq adding rip to a
+ 32-bit offset into any register, although it's
+ probably almost always going to be rax. */
+ roff = rel->r_offset;
+ BFD_ASSERT (roff >= 3);
+ type = bfd_get_8 (input_bfd, contents + roff - 3);
+ BFD_ASSERT ((type & 0xfb) == 0x48);
+ type2 = bfd_get_8 (input_bfd, contents + roff - 2);
+ BFD_ASSERT (type2 == 0x8d);
+ val = bfd_get_8 (input_bfd, contents + roff - 1);
+ BFD_ASSERT ((val & 0xc7) == 0x05);
+ BFD_ASSERT (roff + 4 <= input_section->size);
+
+ /* Now modify the instruction as appropriate. */
+ bfd_put_8 (output_bfd, 0x48 | ((type >> 2) & 1),
+ contents + roff - 3);
+ bfd_put_8 (output_bfd, 0xc7, contents + roff - 2);
+ bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7),
+ contents + roff - 1);
+ bfd_put_32 (output_bfd, tpoff (info, relocation),
+ contents + roff);
+ continue;
+ }
+ else if (ELF64_R_TYPE (rel->r_info) == R_X86_64_TLSDESC_CALL)
+ {
+ /* GDesc -> LE transition.
+ It's originally:
+ call *(%rax)
+ Turn it into:
+ nop; nop. */
+
+ unsigned int val, type;
+ bfd_vma roff;
+
+ /* First, make sure it's a call *(%rax). */
+ roff = rel->r_offset;
+ BFD_ASSERT (roff + 2 <= input_section->size);
+ type = bfd_get_8 (input_bfd, contents + roff);
+ BFD_ASSERT (type == 0xff);
+ 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);
+ bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
+ continue;
+ }
else
{
unsigned int val, type, reg;
@@ -2141,7 +2639,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
reg = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
BFD_ASSERT ((reg & 0xc7) == 5);
reg >>= 3;
- BFD_ASSERT (rel->r_offset + 4 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 4 <= input_section->size);
if (type == 0x8b)
{
/* movq */
@@ -2186,13 +2684,17 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
abort ();
if (h != NULL)
- off = h->got.offset;
+ {
+ off = h->got.offset;
+ offplt = elf64_x86_64_hash_entry (h)->tlsdesc_got;
+ }
else
{
if (local_got_offsets == NULL)
abort ();
off = local_got_offsets[r_symndx];
+ offplt = local_tlsdesc_gotents[r_symndx];
}
if ((off & 1) != 0)
@@ -2202,30 +2704,61 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
Elf_Internal_Rela outrel;
bfd_byte *loc;
int dr_type, indx;
+ asection *sreloc;
if (htab->srelgot == NULL)
abort ();
+ indx = h && h->dynindx != -1 ? h->dynindx : 0;
+
+ if (GOT_TLS_GDESC_P (tls_type))
+ {
+ outrel.r_info = ELF64_R_INFO (indx, R_X86_64_TLSDESC);
+ BFD_ASSERT (htab->sgotplt_jump_table_size + offplt
+ + 2 * GOT_ENTRY_SIZE <= htab->sgotplt->size);
+ outrel.r_offset = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + offplt
+ + htab->sgotplt_jump_table_size);
+ sreloc = htab->srelplt;
+ loc = sreloc->contents;
+ loc += sreloc->reloc_count++
+ * sizeof (Elf64_External_Rela);
+ BFD_ASSERT (loc + sizeof (Elf64_External_Rela)
+ <= sreloc->contents + sreloc->size);
+ if (indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (info);
+ else
+ outrel.r_addend = 0;
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ }
+
+ sreloc = htab->srelgot;
+
outrel.r_offset = (htab->sgot->output_section->vma
+ htab->sgot->output_offset + off);
- indx = h && h->dynindx != -1 ? h->dynindx : 0;
- if (r_type == R_X86_64_TLSGD)
+ if (GOT_TLS_GD_P (tls_type))
dr_type = R_X86_64_DTPMOD64;
+ else if (GOT_TLS_GDESC_P (tls_type))
+ goto dr_done;
else
dr_type = R_X86_64_TPOFF64;
bfd_put_64 (output_bfd, 0, htab->sgot->contents + off);
outrel.r_addend = 0;
- if (dr_type == R_X86_64_TPOFF64 && indx == 0)
+ if ((dr_type == R_X86_64_TPOFF64
+ || dr_type == R_X86_64_TLSDESC) && indx == 0)
outrel.r_addend = relocation - dtpoff_base (info);
outrel.r_info = ELF64_R_INFO (indx, dr_type);
- loc = htab->srelgot->contents;
- loc += htab->srelgot->reloc_count++ * sizeof (Elf64_External_Rela);
+ loc = sreloc->contents;
+ loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela);
+ BFD_ASSERT (loc + sizeof (Elf64_External_Rela)
+ <= sreloc->contents + sreloc->size);
bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
- if (r_type == R_X86_64_TLSGD)
+ if (GOT_TLS_GD_P (tls_type))
{
if (indx == 0)
{
@@ -2241,27 +2774,37 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
outrel.r_info = ELF64_R_INFO (indx,
R_X86_64_DTPOFF64);
outrel.r_offset += GOT_ENTRY_SIZE;
- htab->srelgot->reloc_count++;
+ sreloc->reloc_count++;
loc += sizeof (Elf64_External_Rela);
+ BFD_ASSERT (loc + sizeof (Elf64_External_Rela)
+ <= sreloc->contents + sreloc->size);
bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
}
}
+ dr_done:
if (h != NULL)
h->got.offset |= 1;
else
local_got_offsets[r_symndx] |= 1;
}
- if (off >= (bfd_vma) -2)
+ if (off >= (bfd_vma) -2
+ && ! GOT_TLS_GDESC_P (tls_type))
abort ();
if (r_type == ELF64_R_TYPE (rel->r_info))
{
- relocation = htab->sgot->output_section->vma
- + htab->sgot->output_offset + off;
+ if (r_type == R_X86_64_GOTPC32_TLSDESC
+ || r_type == R_X86_64_TLSDESC_CALL)
+ relocation = htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + offplt + htab->sgotplt_jump_table_size;
+ else
+ relocation = htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off;
unresolved_reloc = FALSE;
}
- else
+ else if (ELF64_R_TYPE (rel->r_info) == R_X86_64_TLSGD)
{
unsigned int i;
static unsigned char tlsgd[8]
@@ -2278,7 +2821,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset - 4 + i)
== tlsgd[i]);
- BFD_ASSERT (rel->r_offset + 12 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 12 <= input_section->size);
for (i = 0; i < 4; i++)
BFD_ASSERT (bfd_get_8 (input_bfd,
contents + rel->r_offset + 4 + i)
@@ -2301,6 +2844,77 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
rel++;
continue;
}
+ else if (ELF64_R_TYPE (rel->r_info) == R_X86_64_GOTPC32_TLSDESC)
+ {
+ /* GDesc -> IE transition.
+ It's originally something like:
+ leaq x@tlsdesc(%rip), %rax
+
+ Change it to:
+ movq x@gottpoff(%rip), %rax # before nop; nop
+
+ Registers other than %rax may be set up here. */
+
+ unsigned int val, type, type2;
+ bfd_vma roff;
+
+ /* First, make sure it's a leaq adding rip to a 32-bit
+ offset into any register, although it's probably
+ almost always going to be rax. */
+ roff = rel->r_offset;
+ BFD_ASSERT (roff >= 3);
+ type = bfd_get_8 (input_bfd, contents + roff - 3);
+ BFD_ASSERT ((type & 0xfb) == 0x48);
+ type2 = bfd_get_8 (input_bfd, contents + roff - 2);
+ BFD_ASSERT (type2 == 0x8d);
+ val = bfd_get_8 (input_bfd, contents + roff - 1);
+ BFD_ASSERT ((val & 0xc7) == 0x05);
+ BFD_ASSERT (roff + 4 <= input_section->size);
+
+ /* Now modify the instruction as appropriate. */
+ /* To turn a leaq into a movq in the form we use it, it
+ suffices to change the second byte from 0x8d to
+ 0x8b. */
+ bfd_put_8 (output_bfd, 0x8b, contents + roff - 2);
+
+ bfd_put_32 (output_bfd,
+ htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off
+ - rel->r_offset
+ - input_section->output_section->vma
+ - input_section->output_offset
+ - 4,
+ contents + roff);
+ continue;
+ }
+ else if (ELF64_R_TYPE (rel->r_info) == R_X86_64_TLSDESC_CALL)
+ {
+ /* GDesc -> IE transition.
+ It's originally:
+ call *(%rax)
+
+ Change it to:
+ nop; nop. */
+
+ unsigned int val, type;
+ bfd_vma roff;
+
+ /* First, make sure it's a call *(%eax). */
+ roff = rel->r_offset;
+ BFD_ASSERT (roff + 2 <= input_section->size);
+ type = bfd_get_8 (input_bfd, contents + roff);
+ BFD_ASSERT (type == 0xff);
+ 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);
+ bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
+
+ continue;
+ }
+ else
+ BFD_ASSERT (FALSE);
break;
case R_X86_64_TLSLD:
@@ -2318,7 +2932,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
== 0x8d);
BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset - 1)
== 0x3d);
- BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size);
+ BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4)
== 0xe8);
BFD_ASSERT (rel + 1 < relend);
@@ -2384,12 +2998,13 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
not process them. */
if (unresolved_reloc
&& !((input_section->flags & SEC_DEBUGGING) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
+ && h->def_dynamic))
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
(long) rel->r_offset,
+ howto->name,
h->root.root.string);
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
@@ -2415,18 +3030,23 @@ 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, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
else
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): reloc against `%s': error %d"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (input_bfd, input_section),
+ (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+ input_bfd, input_section,
(long) rel->r_offset, name, (int) r);
return FALSE;
}
@@ -2516,19 +3136,24 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd,
loc = htab->srelplt->contents + plt_index * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
- the .plt section. Leave the value alone. This is a clue
+ the .plt section. Leave the value if there were any
+ relocations where pointer equality matters (this is a clue
for the dynamic linker, to make function pointer
comparisons work between an application and shared
- library. */
+ library), otherwise set it to zero. If a function is only
+ called from a binary, there is no need to slow down
+ shared libraries because of that. */
sym->st_shndx = SHN_UNDEF;
+ if (!h->pointer_equality_needed)
+ sym->st_value = 0;
}
}
if (h->got.offset != (bfd_vma) -1
- && elf64_x86_64_hash_entry (h)->tls_type != GOT_TLS_GD
+ && ! GOT_TLS_GD_ANY_P (elf64_x86_64_hash_entry (h)->tls_type)
&& elf64_x86_64_hash_entry (h)->tls_type != GOT_TLS_IE)
{
Elf_Internal_Rela rela;
@@ -2571,7 +3196,7 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd,
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
}
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ if (h->needs_copy)
{
Elf_Internal_Rela rela;
bfd_byte *loc;
@@ -2596,7 +3221,7 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd,
/* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ || h == htab->elf.hgot)
sym->st_shndx = SHN_ABS;
return TRUE;
@@ -2642,7 +3267,7 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
abort ();
dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@@ -2656,7 +3281,8 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
continue;
case DT_PLTGOT:
- dyn.d_un.d_ptr = htab->sgot->output_section->vma;
+ s = htab->sgotplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_JMPREL:
@@ -2665,10 +3291,7 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
case DT_PLTRELSZ:
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size;
- else
- dyn.d_un.d_val = s->_raw_size;
+ dyn.d_un.d_val = s->size;
break;
case DT_RELASZ:
@@ -2682,19 +3305,28 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
if (htab->srelplt != NULL)
{
s = htab->srelplt->output_section;
- if (s->_cooked_size != 0)
- dyn.d_un.d_val -= s->_cooked_size;
- else
- dyn.d_un.d_val -= s->_raw_size;
+ dyn.d_un.d_val -= s->size;
}
break;
+
+ case DT_TLSDESC_PLT:
+ s = htab->splt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset
+ + htab->tlsdesc_plt;
+ break;
+
+ case DT_TLSDESC_GOT:
+ s = htab->sgot;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset
+ + htab->tlsdesc_got;
+ break;
}
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
}
/* Fill in the special first entry in the procedure linkage table. */
- if (htab->splt && htab->splt->_raw_size > 0)
+ if (htab->splt && htab->splt->size > 0)
{
/* Fill in the first entry in the procedure linkage table. */
memcpy (htab->splt->contents, elf64_x86_64_plt0_entry,
@@ -2722,13 +3354,47 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
elf_section_data (htab->splt->output_section)->this_hdr.sh_entsize =
PLT_ENTRY_SIZE;
+
+ if (htab->tlsdesc_plt)
+ {
+ bfd_put_64 (output_bfd, (bfd_vma) 0,
+ htab->sgot->contents + htab->tlsdesc_got);
+
+ memcpy (htab->splt->contents + htab->tlsdesc_plt,
+ elf64_x86_64_plt0_entry,
+ PLT_ENTRY_SIZE);
+
+ /* Add offset for pushq GOT+8(%rip), since the
+ instruction uses 6 bytes subtract this value. */
+ bfd_put_32 (output_bfd,
+ (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + 8
+ - htab->splt->output_section->vma
+ - htab->splt->output_offset
+ - htab->tlsdesc_plt
+ - 6),
+ htab->splt->contents + htab->tlsdesc_plt + 2);
+ /* Add offset for jmp *GOT+TDG(%rip), where TGD stands for
+ htab->tlsdesc_got. The 12 is the offset to the end of
+ the instruction. */
+ bfd_put_32 (output_bfd,
+ (htab->sgot->output_section->vma
+ + htab->sgot->output_offset
+ + htab->tlsdesc_got
+ - htab->splt->output_section->vma
+ - htab->splt->output_offset
+ - htab->tlsdesc_plt
+ - 12),
+ htab->splt->contents + htab->tlsdesc_plt + 8);
+ }
}
}
if (htab->sgotplt)
{
/* Fill in the first three entries in the global offset table. */
- if (htab->sgotplt->_raw_size > 0)
+ if (htab->sgotplt->size > 0)
{
/* Set the first entry in the global offset table to the address of
the dynamic section. */
@@ -2747,9 +3413,218 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
GOT_ENTRY_SIZE;
}
+ if (htab->sgot && htab->sgot->size > 0)
+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize
+ = GOT_ENTRY_SIZE;
+
return TRUE;
}
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf64_x86_64_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + (i + 1) * PLT_ENTRY_SIZE;
+}
+
+/* Handle an x86-64 specific section when reading an object file. This
+ is called when elfcode.h finds a section with an unknown type. */
+
+static bfd_boolean
+elf64_x86_64_section_from_shdr (bfd *abfd,
+ Elf_Internal_Shdr *hdr,
+ const char *name,
+ int shindex)
+{
+ if (hdr->sh_type != SHT_X86_64_UNWIND)
+ return FALSE;
+
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Hook called by the linker routine which adds symbols from an object
+ file. We use it to put SHN_X86_64_LCOMMON items in .lbss, instead
+ of .bss. */
+
+static bfd_boolean
+elf64_x86_64_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)
+{
+ asection *lcomm;
+
+ switch (sym->st_shndx)
+ {
+ case SHN_X86_64_LCOMMON:
+ lcomm = bfd_get_section_by_name (abfd, "LARGE_COMMON");
+ if (lcomm == NULL)
+ {
+ lcomm = bfd_make_section_with_flags (abfd,
+ "LARGE_COMMON",
+ (SEC_ALLOC
+ | SEC_IS_COMMON
+ | SEC_LINKER_CREATED));
+ if (lcomm == NULL)
+ return FALSE;
+ elf_section_flags (lcomm) |= SHF_X86_64_LARGE;
+ }
+ *secp = lcomm;
+ *valp = sym->st_size;
+ break;
+ }
+ return TRUE;
+}
+
+
+/* Given a BFD section, try to locate the corresponding ELF section
+ index. */
+
+static bfd_boolean
+elf64_x86_64_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec, int *index)
+{
+ if (sec == &_bfd_elf_large_com_section)
+ {
+ *index = SHN_X86_64_LCOMMON;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/* Process a symbol. */
+
+static void
+elf64_x86_64_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
+ asymbol *asym)
+{
+ elf_symbol_type *elfsym = (elf_symbol_type *) asym;
+
+ switch (elfsym->internal_elf_sym.st_shndx)
+ {
+ case SHN_X86_64_LCOMMON:
+ asym->section = &_bfd_elf_large_com_section;
+ asym->value = elfsym->internal_elf_sym.st_size;
+ /* Common symbol doesn't set BSF_GLOBAL. */
+ asym->flags &= ~BSF_GLOBAL;
+ break;
+ }
+}
+
+static bfd_boolean
+elf64_x86_64_common_definition (Elf_Internal_Sym *sym)
+{
+ return (sym->st_shndx == SHN_COMMON
+ || sym->st_shndx == SHN_X86_64_LCOMMON);
+}
+
+static unsigned int
+elf64_x86_64_common_section_index (asection *sec)
+{
+ if ((elf_section_flags (sec) & SHF_X86_64_LARGE) == 0)
+ return SHN_COMMON;
+ else
+ return SHN_X86_64_LCOMMON;
+}
+
+static asection *
+elf64_x86_64_common_section (asection *sec)
+{
+ if ((elf_section_flags (sec) & SHF_X86_64_LARGE) == 0)
+ return bfd_com_section_ptr;
+ else
+ return &_bfd_elf_large_com_section;
+}
+
+static bfd_boolean
+elf64_x86_64_merge_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry **sym_hash ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym,
+ asection **psec,
+ bfd_vma *pvalue ATTRIBUTE_UNUSED,
+ unsigned int *pold_alignment ATTRIBUTE_UNUSED,
+ bfd_boolean *skip ATTRIBUTE_UNUSED,
+ bfd_boolean *override ATTRIBUTE_UNUSED,
+ bfd_boolean *type_change_ok ATTRIBUTE_UNUSED,
+ bfd_boolean *size_change_ok ATTRIBUTE_UNUSED,
+ bfd_boolean *newdef ATTRIBUTE_UNUSED,
+ bfd_boolean *newdyn,
+ bfd_boolean *newdyncommon ATTRIBUTE_UNUSED,
+ bfd_boolean *newweak ATTRIBUTE_UNUSED,
+ bfd *abfd ATTRIBUTE_UNUSED,
+ asection **sec,
+ bfd_boolean *olddef ATTRIBUTE_UNUSED,
+ bfd_boolean *olddyn,
+ bfd_boolean *olddyncommon ATTRIBUTE_UNUSED,
+ bfd_boolean *oldweak ATTRIBUTE_UNUSED,
+ bfd *oldbfd,
+ asection **oldsec)
+{
+ /* A normal common symbol and a large common symbol result in a
+ normal common symbol. We turn the large common symbol into a
+ normal one. */
+ if (!*olddyn
+ && h->root.type == bfd_link_hash_common
+ && !*newdyn
+ && bfd_is_com_section (*sec)
+ && *oldsec != *sec)
+ {
+ if (sym->st_shndx == SHN_COMMON
+ && (elf_section_flags (*oldsec) & SHF_X86_64_LARGE) != 0)
+ {
+ h->root.u.c.p->section
+ = bfd_make_section_old_way (oldbfd, "COMMON");
+ h->root.u.c.p->section->flags = SEC_ALLOC;
+ }
+ else if (sym->st_shndx == SHN_X86_64_LCOMMON
+ && (elf_section_flags (*oldsec) & SHF_X86_64_LARGE) == 0)
+ *psec = *sec = bfd_com_section_ptr;
+ }
+
+ return TRUE;
+}
+
+static int
+elf64_x86_64_additional_program_headers (bfd *abfd)
+{
+ asection *s;
+ int count = 0;
+
+ /* Check to see if we need a large readonly segment. */
+ s = bfd_get_section_by_name (abfd, ".lrodata");
+ if (s && (s->flags & SEC_LOAD))
+ count++;
+
+ /* Check to see if we need a large data segment. Since .lbss sections
+ is placed right after the .bss section, there should be no need for
+ a large data segment just because of .lbss. */
+ s = bfd_get_section_by_name (abfd, ".ldata");
+ if (s && (s->flags & SEC_LOAD))
+ count++;
+
+ return count;
+}
+
+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 }
+};
#define TARGET_LITTLE_SYM bfd_elf64_x86_64_vec
#define TARGET_LITTLE_NAME "elf64-x86-64"
@@ -2784,7 +3659,31 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
#define elf_backend_reloc_type_class elf64_x86_64_reloc_type_class
#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_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
+#define elf_backend_section_from_shdr \
+ elf64_x86_64_section_from_shdr
+
+#define elf_backend_section_from_bfd_section \
+ elf64_x86_64_elf_section_from_bfd_section
+#define elf_backend_add_symbol_hook \
+ elf64_x86_64_add_symbol_hook
+#define elf_backend_symbol_processing \
+ elf64_x86_64_symbol_processing
+#define elf_backend_common_section_index \
+ elf64_x86_64_common_section_index
+#define elf_backend_common_section \
+ elf64_x86_64_common_section
+#define elf_backend_common_definition \
+ elf64_x86_64_common_definition
+#define elf_backend_merge_symbol \
+ elf64_x86_64_merge_symbol
+#define elf_backend_special_sections \
+ elf64_x86_64_special_sections
+#define elf_backend_additional_program_headers \
+ elf64_x86_64_additional_program_headers
+
#include "elf64-target.h"
diff --git a/contrib/binutils/bfd/elf64.c b/contrib/binutils/bfd/elf64.c
index 69fb5b5e6e1d..5058c0c19871 100644
--- a/contrib/binutils/bfd/elf64.c
+++ b/contrib/binutils/bfd/elf64.c
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define ARCH_SIZE 64
diff --git a/contrib/binutils/bfd/elfarm-nabi.c b/contrib/binutils/bfd/elfarm-nabi.c
deleted file mode 100644
index 5ecbe8e3e62d..000000000000
--- a/contrib/binutils/bfd/elfarm-nabi.c
+++ /dev/null
@@ -1,752 +0,0 @@
-/* 32-bit ELF support for ARM new abi option.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "elf/arm.h"
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-#include "elf-bfd.h"
-
-#ifndef NUM_ELEM
-#define NUM_ELEM(a) (sizeof (a) / (sizeof (a)[0]))
-#endif
-
-#define USE_REL 1
-
-#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
-#define TARGET_LITTLE_NAME "elf32-littlearm"
-#define TARGET_BIG_SYM bfd_elf32_bigarm_vec
-#define TARGET_BIG_NAME "elf32-bigarm"
-
-#define elf_info_to_howto 0
-#define elf_info_to_howto_rel elf32_arm_info_to_howto
-
-#define ARM_ELF_ABI_VERSION 0
-#define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM
-
-static reloc_howto_type * elf32_arm_reloc_type_lookup
- PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
-static bfd_boolean elf32_arm_nabi_grok_prstatus
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
-static bfd_boolean elf32_arm_nabi_grok_psinfo
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
-
-/* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g.
- R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO
- in that slot. */
-
-static reloc_howto_type elf32_arm_howto_table[] =
-{
- /* No relocation */
- HOWTO (R_ARM_NONE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_NONE", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_PC24, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 24, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_PC24", /* name */
- FALSE, /* partial_inplace */
- 0x00ffffff, /* src_mask */
- 0x00ffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* 32 bit absolute */
- HOWTO (R_ARM_ABS32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_ABS32", /* name */
- FALSE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* standard 32bit pc-relative reloc */
- HOWTO (R_ARM_REL32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_REL32", /* name */
- FALSE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* 8 bit absolute */
- HOWTO (R_ARM_PC13, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_PC13", /* name */
- FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 16 bit absolute */
- HOWTO (R_ARM_ABS16, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_ABS16", /* name */
- FALSE, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 12 bit absolute */
- HOWTO (R_ARM_ABS12, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 12, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_ABS12", /* name */
- FALSE, /* partial_inplace */
- 0x000008ff, /* src_mask */
- 0x000008ff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_THM_ABS5, /* type */
- 6, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 5, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_ABS5", /* name */
- FALSE, /* partial_inplace */
- 0x000007e0, /* src_mask */
- 0x000007e0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 8 bit absolute */
- HOWTO (R_ARM_ABS8, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_ABS8", /* name */
- FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_SBREL32, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_SBREL32", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_THM_PC22, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 23, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_PC22", /* name */
- FALSE, /* partial_inplace */
- 0x07ff07ff, /* src_mask */
- 0x07ff07ff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- HOWTO (R_ARM_THM_PC8, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_PC8", /* name */
- FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- HOWTO (R_ARM_AMP_VCALL9, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_AMP_VCALL9", /* name */
- FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- HOWTO (R_ARM_SWI24, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_SWI24", /* name */
- FALSE, /* partial_inplace */
- 0x00000000, /* src_mask */
- 0x00000000, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_THM_SWI8, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_SWI8", /* name */
- FALSE, /* partial_inplace */
- 0x00000000, /* src_mask */
- 0x00000000, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* BLX instruction for the ARM. */
- HOWTO (R_ARM_XPC25, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 25, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_XPC25", /* name */
- FALSE, /* partial_inplace */
- 0x00ffffff, /* src_mask */
- 0x00ffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* BLX instruction for the Thumb. */
- HOWTO (R_ARM_THM_XPC22, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 22, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_XPC22", /* name */
- FALSE, /* partial_inplace */
- 0x07ff07ff, /* src_mask */
- 0x07ff07ff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* These next three relocs are not defined, but we need to fill the space. */
-
- HOWTO (R_ARM_NONE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_unknown_17", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_NONE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_unknown_18", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_NONE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_unknown_19", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Relocs used in ARM Linux */
-
- HOWTO (R_ARM_COPY, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_COPY", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_GLOB_DAT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_GLOB_DAT", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_JUMP_SLOT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_JUMP_SLOT", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_RELATIVE, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RELATIVE", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_GOTOFF, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_GOTOFF", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_GOTPC, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_GOTPC", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- HOWTO (R_ARM_GOT32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_GOT32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_PLT32, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_PLT32", /* name */
- TRUE, /* partial_inplace */
- 0x00ffffff, /* src_mask */
- 0x00ffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* End of relocs used in ARM Linux */
-
- HOWTO (R_ARM_RREL32, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RREL32", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_RABS32, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RABS32", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_RPC24, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RPC24", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_RBASE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RBASE", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
-};
-
- /* GNU extension to record C++ vtable hierarchy */
-static reloc_howto_type elf32_arm_vtinherit_howto =
- HOWTO (R_ARM_GNU_VTINHERIT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- NULL, /* special_function */
- "R_ARM_GNU_VTINHERIT", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE); /* pcrel_offset */
-
- /* GNU extension to record C++ vtable member usage */
-static reloc_howto_type elf32_arm_vtentry_howto =
- HOWTO (R_ARM_GNU_VTENTRY, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_elf_rel_vtable_reloc_fn, /* special_function */
- "R_ARM_GNU_VTENTRY", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE); /* pcrel_offset */
-
- /* 12 bit pc relative */
-static reloc_howto_type elf32_arm_thm_pc11_howto =
- HOWTO (R_ARM_THM_PC11, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 11, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_PC11", /* name */
- FALSE, /* partial_inplace */
- 0x000007ff, /* src_mask */
- 0x000007ff, /* dst_mask */
- TRUE); /* pcrel_offset */
-
- /* 12 bit pc relative */
-static reloc_howto_type elf32_arm_thm_pc9_howto =
- HOWTO (R_ARM_THM_PC9, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_PC9", /* name */
- FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- TRUE); /* pcrel_offset */
-
-static void elf32_arm_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static void
-elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc)
- 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);
-
- switch (r_type)
- {
- case R_ARM_GNU_VTINHERIT:
- bfd_reloc->howto = & elf32_arm_vtinherit_howto;
- break;
-
- case R_ARM_GNU_VTENTRY:
- bfd_reloc->howto = & elf32_arm_vtentry_howto;
- break;
-
- case R_ARM_THM_PC11:
- bfd_reloc->howto = & elf32_arm_thm_pc11_howto;
- break;
-
- case R_ARM_THM_PC9:
- bfd_reloc->howto = & elf32_arm_thm_pc9_howto;
- break;
-
- default:
- if (r_type >= NUM_ELEM (elf32_arm_howto_table))
- bfd_reloc->howto = NULL;
- else
- bfd_reloc->howto = & elf32_arm_howto_table[r_type];
- break;
- }
-}
-
-struct elf32_arm_reloc_map
- {
- bfd_reloc_code_real_type bfd_reloc_val;
- unsigned char elf_reloc_val;
- };
-
-static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
- {
- {BFD_RELOC_NONE, R_ARM_NONE},
- {BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24},
- {BFD_RELOC_ARM_PCREL_BLX, R_ARM_XPC25},
- {BFD_RELOC_THUMB_PCREL_BLX, R_ARM_THM_XPC22},
- {BFD_RELOC_32, R_ARM_ABS32},
- {BFD_RELOC_32_PCREL, R_ARM_REL32},
- {BFD_RELOC_8, R_ARM_ABS8},
- {BFD_RELOC_16, R_ARM_ABS16},
- {BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12},
- {BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5},
- {BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_PC22},
- {BFD_RELOC_ARM_COPY, R_ARM_COPY},
- {BFD_RELOC_ARM_GLOB_DAT, R_ARM_GLOB_DAT},
- {BFD_RELOC_ARM_JUMP_SLOT, R_ARM_JUMP_SLOT},
- {BFD_RELOC_ARM_RELATIVE, R_ARM_RELATIVE},
- {BFD_RELOC_ARM_GOTOFF, R_ARM_GOTOFF},
- {BFD_RELOC_ARM_GOTPC, R_ARM_GOTPC},
- {BFD_RELOC_ARM_GOT32, R_ARM_GOT32},
- {BFD_RELOC_ARM_PLT32, R_ARM_PLT32}
- };
-
-static reloc_howto_type *
-elf32_arm_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
-{
- unsigned int i;
-
- switch (code)
- {
- case BFD_RELOC_VTABLE_INHERIT:
- return & elf32_arm_vtinherit_howto;
-
- case BFD_RELOC_VTABLE_ENTRY:
- return & elf32_arm_vtentry_howto;
-
- case BFD_RELOC_THUMB_PCREL_BRANCH12:
- return & elf32_arm_thm_pc11_howto;
-
- case BFD_RELOC_THUMB_PCREL_BRANCH9:
- return & elf32_arm_thm_pc9_howto;
-
- default:
- for (i = 0; i < NUM_ELEM (elf32_arm_reloc_map); i ++)
- if (elf32_arm_reloc_map[i].bfd_reloc_val == code)
- return & elf32_arm_howto_table[elf32_arm_reloc_map[i].elf_reloc_val];
-
- return NULL;
- }
-}
-
-/* Support for core dump NOTE sections */
-static bfd_boolean
-elf32_arm_nabi_grok_prstatus (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
-{
- int offset;
- size_t raw_size;
-
- switch (note->descsz)
- {
- default:
- return FALSE;
-
- case 148: /* Linux/ARM 32-bit*/
- /* pr_cursig */
- elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
-
- /* pr_pid */
- elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
-
- /* pr_reg */
- offset = 72;
- raw_size = 72;
-
- break;
- }
-
- /* Make a ".reg/999" section. */
- return _bfd_elfcore_make_pseudosection (abfd, ".reg",
- raw_size, note->descpos + offset);
-}
-
-static bfd_boolean
-elf32_arm_nabi_grok_psinfo (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
-{
- switch (note->descsz)
- {
- default:
- return FALSE;
-
- case 124: /* Linux/ARM elf_prpsinfo */
- elf_tdata (abfd)->core_program
- = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
- elf_tdata (abfd)->core_command
- = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
- }
-
- /* Note that for some reason, a spurious space is tacked
- onto the end of the args in some (at least one anyway)
- implementations, so strip it off if it exists. */
-
- {
- char *command = elf_tdata (abfd)->core_command;
- int n = strlen (command);
-
- if (0 < n && command[n - 1] == ' ')
- command[n - 1] = '\0';
- }
-
- return TRUE;
-}
-
-#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
-#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
-
-#include "elf32-arm.h"
diff --git a/contrib/binutils/bfd/elfarm-oabi.c b/contrib/binutils/bfd/elfarm-oabi.c
deleted file mode 100644
index 08ba41e1ea7e..000000000000
--- a/contrib/binutils/bfd/elfarm-oabi.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/* 32-bit ELF support for ARM old abi option.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define OLD_ARM_ABI
-#define bfd_elf32_arm_allocate_interworking_sections \
- bfd_elf32_arm_oabi_allocate_interworking_sections
-#define bfd_elf32_arm_get_bfd_for_interworking \
- bfd_elf32_arm_oabi_get_bfd_for_interworking
-#define bfd_elf32_arm_process_before_allocation \
- bfd_elf32_arm_oabi_process_before_allocation
-#define bfd_elf32_arm_add_glue_sections_to_bfd \
- bfd_elf32_arm_oabi_add_glue_sections_to_bfd
-
-#include "elf/arm.h"
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-#include "elf-bfd.h"
-
-#ifndef NUM_ELEM
-#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
-#endif
-
-#define TARGET_LITTLE_SYM bfd_elf32_littlearm_oabi_vec
-#define TARGET_LITTLE_NAME "elf32-littlearm-oabi"
-#define TARGET_BIG_SYM bfd_elf32_bigarm_oabi_vec
-#define TARGET_BIG_NAME "elf32-bigarm-oabi"
-
-#define elf_info_to_howto elf32_arm_info_to_howto
-#define elf_info_to_howto_rel 0
-
-#define ARM_ELF_ABI_VERSION 0
-#define ARM_ELF_OS_ABI_VERSION 0
-
-static reloc_howto_type * find_howto PARAMS ((unsigned int));
-static void elf32_arm_info_to_howto PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static reloc_howto_type * elf32_arm_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
-
-static reloc_howto_type elf32_arm_howto_table[] =
- {
- /* No relocation. */
- HOWTO (R_ARM_NONE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_NONE", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_PC24, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 24, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_PC24", /* name */
- FALSE, /* partial_inplace */
- 0x00ffffff, /* src_mask */
- 0x00ffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* 32 bit absolute. */
- HOWTO (R_ARM_ABS32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_ABS32", /* name */
- FALSE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* Standard 32bit pc-relative reloc. */
- HOWTO (R_ARM_REL32, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_REL32", /* name */
- FALSE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* 8 bit absolute. */
- HOWTO (R_ARM_ABS8, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_ABS8", /* name */
- FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 16 bit absolute. */
- HOWTO (R_ARM_ABS16, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_ABS16", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* 12 bit absolute. */
- HOWTO (R_ARM_ABS12, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 12, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_ABS12", /* name */
- FALSE, /* partial_inplace */
- 0x000008ff, /* src_mask */
- 0x000008ff, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_THM_ABS5, /* type */
- 6, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 5, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_ABS5", /* name */
- FALSE, /* partial_inplace */
- 0x000007e0, /* src_mask */
- 0x000007e0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_THM_PC22, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 23, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_PC22", /* name */
- FALSE, /* partial_inplace */
- 0x07ff07ff, /* src_mask */
- 0x07ff07ff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- HOWTO (R_ARM_SBREL32, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_SBREL32", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_AMP_VCALL9, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_AMP_VCALL9", /* name */
- FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* 12 bit pc relative. */
- HOWTO (R_ARM_THM_PC11, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 11, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_PC11", /* name */
- FALSE, /* partial_inplace */
- 0x000007ff, /* src_mask */
- 0x000007ff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* 12 bit pc relative. */
- HOWTO (R_ARM_THM_PC9, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_THM_PC9", /* name */
- FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* GNU extension to record C++ vtable hierarchy. */
- HOWTO (R_ARM_GNU_VTINHERIT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- NULL, /* special_function */
- "R_ARM_GNU_VTINHERIT", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* GNU extension to record C++ vtable member usage. */
- HOWTO (R_ARM_GNU_VTENTRY, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_elf_rel_vtable_reloc_fn, /* special_function */
- "R_ARM_GNU_VTENTRY", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- /* XXX - gap in index numbering here. */
-
- HOWTO (R_ARM_PLT32, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- TRUE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_PLT32", /* name */
- TRUE, /* partial_inplace */
- 0x00ffffff, /* src_mask */
- 0x00ffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
-
- /* XXX - gap in index numbering here. */
-
- HOWTO (R_ARM_RREL32, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RREL32", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_RABS32, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RABS32", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_RPC24, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RPC24", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
-
- HOWTO (R_ARM_RBASE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RBASE", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE) /* pcrel_offset */
- };
-
-/* Locate a reloc in the howto table. This function must be used
- when the entry number is is > R_ARM_GNU_VTINHERIT. */
-
-static reloc_howto_type *
-find_howto (r_type)
- unsigned int r_type;
-{
- int i;
-
- for (i = NUM_ELEM (elf32_arm_howto_table); i--;)
- if (elf32_arm_howto_table [i].type == r_type)
- return elf32_arm_howto_table + i;
-
- return NULL;
-}
-
-static void
-elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *bfd_reloc;
- Elf_Internal_Rela *elf_reloc;
-{
- unsigned int r_type;
-
- r_type = ELF32_R_TYPE (elf_reloc->r_info);
-
- if (r_type <= R_ARM_GNU_VTINHERIT)
- bfd_reloc->howto = & elf32_arm_howto_table[r_type];
- else
- bfd_reloc->howto = find_howto (r_type);
-}
-
-struct elf32_arm_reloc_map
- {
- bfd_reloc_code_real_type bfd_reloc_val;
- unsigned char elf_reloc_val;
- };
-
-static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
- {
- {BFD_RELOC_NONE, R_ARM_NONE },
- {BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24 },
- {BFD_RELOC_32, R_ARM_ABS32 },
- {BFD_RELOC_32_PCREL, R_ARM_REL32 },
- {BFD_RELOC_8, R_ARM_ABS8 },
- {BFD_RELOC_16, R_ARM_ABS16 },
- {BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12 },
- {BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5 },
- {BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_PC22 },
- {BFD_RELOC_NONE, R_ARM_SBREL32 },
- {BFD_RELOC_NONE, R_ARM_AMP_VCALL9 },
- {BFD_RELOC_THUMB_PCREL_BRANCH12, R_ARM_THM_PC11 },
- {BFD_RELOC_THUMB_PCREL_BRANCH9, R_ARM_THM_PC9 },
- {BFD_RELOC_VTABLE_INHERIT, R_ARM_GNU_VTINHERIT },
- {BFD_RELOC_VTABLE_ENTRY, R_ARM_GNU_VTENTRY }
- };
-
-static reloc_howto_type *
-elf32_arm_reloc_type_lookup (abfd, code)
- bfd * abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
-{
- unsigned int i;
-
- for (i = NUM_ELEM (elf32_arm_reloc_map); i--;)
- if (elf32_arm_reloc_map[i].bfd_reloc_val == code)
- return & elf32_arm_howto_table [elf32_arm_reloc_map[i].elf_reloc_val];
-
- if (code == BFD_RELOC_ARM_PLT32)
- return find_howto (R_ARM_PLT32);
-
- return NULL;
-}
-
-#include "elf32-arm.h"
diff --git a/contrib/binutils/bfd/elfcode.h b/contrib/binutils/bfd/elfcode.h
index bc69d48db4db..1f8ec2b2b2cb 100644
--- a/contrib/binutils/bfd/elfcode.h
+++ b/contrib/binutils/bfd/elfcode.h
@@ -1,6 +1,6 @@
/* ELF executable support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -28,12 +28,12 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Problems and other issues to resolve.
(1) BFD expects there to be some fixed number of "sections" in
- the object file. I.E. there is a "section_count" variable in the
+ the object file. I.E. there is a "section_count" variable in the
bfd structure which contains the number of sections. However, ELF
supports multiple "views" of a file. In particular, with current
implementations, executable files typically have two tables, a
@@ -105,6 +105,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_canonicalize_symtab NAME(bfd_elf,canonicalize_symtab)
#define elf_canonicalize_dynamic_symtab \
NAME(bfd_elf,canonicalize_dynamic_symtab)
+#define elf_get_synthetic_symtab \
+ NAME(bfd_elf,get_synthetic_symtab)
#define elf_make_empty_symbol NAME(bfd_elf,make_empty_symbol)
#define elf_get_symbol_info NAME(bfd_elf,get_symbol_info)
#define elf_get_lineno NAME(bfd_elf,get_lineno)
@@ -456,6 +458,25 @@ elf_file_p (Elf_External_Ehdr *x_ehdrp)
&& (x_ehdrp->e_ident[EI_MAG3] == ELFMAG3));
}
+/* Determines if a given section index is valid. */
+
+static inline bfd_boolean
+valid_section_index_p (unsigned index, unsigned num_sections)
+{
+ /* Note: We allow SHN_UNDEF as a valid section index. */
+ if (index < SHN_LORESERVE || index > SHN_HIRESERVE)
+ return index < num_sections;
+
+ /* We disallow the use of reserved indcies, except for those
+ with OS or Application specific meaning. The test make use
+ of the knowledge that:
+ SHN_LORESERVE == SHN_LOPROC
+ and
+ SHN_HIPROC == SHN_LOOS - 1 */
+ /* XXX - Should we allow SHN_XINDEX as a valid index here ? */
+ return (index >= SHN_LOPROC && index <= SHN_HIOS);
+}
+
/* Check to see if the file associated with ABFD matches the target vector
that ABFD points to.
@@ -473,7 +494,6 @@ elf_object_p (bfd *abfd)
Elf_Internal_Shdr i_shdr;
Elf_Internal_Shdr *i_shdrp; /* Section header table, internal form */
unsigned int shindex;
- char *shstrtab; /* Internal copy of section header stringtab */
const struct elf_backend_data *ebd;
struct bfd_preserve preserve;
asection *s;
@@ -544,7 +564,7 @@ elf_object_p (bfd *abfd)
if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_type == ET_REL)
goto got_wrong_format_error;
- /* As a simple sanity check, verify that the what BFD thinks is the
+ /* As a simple sanity check, verify that what BFD thinks is the
size of each section header table entry actually matches the size
recorded in the file, but only if there are any sections. */
if (i_ehdrp->e_shentsize != sizeof (x_shdr) && i_ehdrp->e_shnum != 0)
@@ -606,13 +626,15 @@ elf_object_p (bfd *abfd)
goto got_no_match;
}
- /* Remember the entry point specified in the ELF file header. */
- bfd_set_start_address (abfd, i_ehdrp->e_entry);
-
if (i_ehdrp->e_shoff != 0)
{
+ bfd_signed_vma where = i_ehdrp->e_shoff;
+
+ if (where != (file_ptr) where)
+ goto got_wrong_format_error;
+
/* Seek to the section header table in the file. */
- if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0)
+ if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
goto got_no_match;
/* Read the first section header at index 0, and convert to internal
@@ -624,11 +646,46 @@ elf_object_p (bfd *abfd)
/* If the section count is zero, the actual count is in the first
section header. */
if (i_ehdrp->e_shnum == SHN_UNDEF)
- i_ehdrp->e_shnum = i_shdr.sh_size;
+ {
+ i_ehdrp->e_shnum = i_shdr.sh_size;
+ if (i_ehdrp->e_shnum != i_shdr.sh_size
+ || i_ehdrp->e_shnum == 0)
+ goto got_wrong_format_error;
+ }
/* And similarly for the string table index. */
if (i_ehdrp->e_shstrndx == SHN_XINDEX)
- i_ehdrp->e_shstrndx = i_shdr.sh_link;
+ {
+ i_ehdrp->e_shstrndx = i_shdr.sh_link;
+ if (i_ehdrp->e_shstrndx != i_shdr.sh_link)
+ goto got_wrong_format_error;
+ }
+
+ /* Sanity check that we can read all of the section headers.
+ It ought to be good enough to just read the last one. */
+ if (i_ehdrp->e_shnum != 1)
+ {
+ /* Check that we don't have a totally silly number of sections. */
+ if (i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (x_shdr)
+ || i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (i_shdr))
+ goto got_wrong_format_error;
+
+ where += (i_ehdrp->e_shnum - 1) * sizeof (x_shdr);
+ if (where != (file_ptr) where)
+ goto got_wrong_format_error;
+ if ((bfd_size_type) where <= i_ehdrp->e_shoff)
+ goto got_wrong_format_error;
+
+ if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
+ goto got_no_match;
+ if (bfd_bread (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr))
+ goto got_no_match;
+
+ /* Back to where we were. */
+ where = i_ehdrp->e_shoff + sizeof (x_shdr);
+ if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
+ goto got_no_match;
+ }
}
/* Allocate space for a copy of the section header table in
@@ -672,23 +729,45 @@ elf_object_p (bfd *abfd)
goto got_no_match;
elf_swap_shdr_in (abfd, &x_shdr, i_shdrp + shindex);
+ /* Sanity check sh_link and sh_info. */
+ if (! valid_section_index_p (i_shdrp[shindex].sh_link, num_sec))
+ goto got_wrong_format_error;
+
+ if (((i_shdrp[shindex].sh_flags & SHF_INFO_LINK)
+ || i_shdrp[shindex].sh_type == SHT_RELA
+ || i_shdrp[shindex].sh_type == SHT_REL)
+ && ! valid_section_index_p (i_shdrp[shindex].sh_info, num_sec))
+ goto got_wrong_format_error;
+
/* If the section is loaded, but not page aligned, clear
D_PAGED. */
if (i_shdrp[shindex].sh_size != 0
&& (i_shdrp[shindex].sh_flags & SHF_ALLOC) != 0
&& i_shdrp[shindex].sh_type != SHT_NOBITS
&& (((i_shdrp[shindex].sh_addr - i_shdrp[shindex].sh_offset)
- % ebd->maxpagesize)
+ % ebd->minpagesize)
!= 0))
abfd->flags &= ~D_PAGED;
}
}
- if (i_ehdrp->e_shstrndx && i_ehdrp->e_shoff)
+ /* A further sanity check. */
+ if (i_ehdrp->e_shnum != 0)
{
- if (! bfd_section_from_shdr (abfd, i_ehdrp->e_shstrndx))
- goto got_no_match;
+ if (! valid_section_index_p (i_ehdrp->e_shstrndx, elf_numsections (abfd)))
+ {
+ /* PR 2257:
+ We used to just goto got_wrong_format_error here
+ but there are binaries in existance for which this test
+ will prevent the binutils from working with them at all.
+ So we are kind, and reset the string index value to 0
+ so that at least some processing can be done. */
+ i_ehdrp->e_shstrndx = SHN_UNDEF;
+ _bfd_error_handler (_("warning: %s has a corrupt string table index - ignoring"), abfd->filename);
+ }
}
+ else if (i_ehdrp->e_shstrndx != SHN_UNDEF)
+ goto got_wrong_format_error;
/* Read in the program headers. */
if (i_ehdrp->e_phnum == 0)
@@ -715,20 +794,10 @@ elf_object_p (bfd *abfd)
}
}
- /* Read in the string table containing the names of the sections. We
- will need the base pointer to this table later. */
- /* We read this inline now, so that we don't have to go through
- bfd_section_from_shdr with it (since this particular strtab is
- used to find all of the ELF section names.) */
-
- if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff)
+ if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff != 0)
{
unsigned int num_sec;
- shstrtab = bfd_elf_get_str_section (abfd, i_ehdrp->e_shstrndx);
- if (!shstrtab)
- goto got_no_match;
-
/* Once all of the section headers have been read and converted, we
can start processing them. Note that the first section header is
a dummy placeholder entry, so we ignore it. */
@@ -740,6 +809,10 @@ elf_object_p (bfd *abfd)
if (shindex == SHN_LORESERVE - 1)
shindex += SHN_HIRESERVE + 1 - SHN_LORESERVE;
}
+
+ /* Set up ELF sections for SHF_GROUP and SHF_LINK_ORDER. */
+ if (! _bfd_elf_setup_sections (abfd))
+ goto got_wrong_format_error;
}
/* Let the backend double check the format and override global
@@ -750,6 +823,9 @@ elf_object_p (bfd *abfd)
goto got_wrong_format_error;
}
+ /* Remember the entry point specified in the ELF file header. */
+ bfd_set_start_address (abfd, i_ehdrp->e_entry);
+
/* If we have created any reloc sections that are associated with
debugging sections, mark the reloc sections as debugging as well. */
for (s = abfd->sections; s != NULL; s = s->next)
@@ -821,6 +897,12 @@ elf_write_relocs (bfd *abfd, asection *sec, void *data)
if (sec->reloc_count == 0)
return;
+ /* If we have opened an existing file for update, reloc_count may be
+ set even though we are not linking. In that case we have nothing
+ to do. */
+ if (sec->orelocation == NULL)
+ return;
+
rela_hdr = &elf_section_data (sec)->rel_hdr;
rela_hdr->sh_size = rela_hdr->sh_entsize * sec->reloc_count;
@@ -1020,7 +1102,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
|| (elf_tdata (abfd)->dynverref_section != 0
&& elf_tdata (abfd)->verref == NULL))
{
- if (! _bfd_elf_slurp_version_tables (abfd))
+ if (!_bfd_elf_slurp_version_tables (abfd, FALSE))
return -1;
}
}
@@ -1053,7 +1135,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
symcount);
/* Slurp in the symbols without the version information,
- since that is more helpful than just quitting. */
+ since that is more helpful than just quitting. */
verhdr = NULL;
}
@@ -1080,9 +1162,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
memcpy (&sym->internal_elf_sym, isym, sizeof (Elf_Internal_Sym));
sym->symbol.the_bfd = abfd;
- sym->symbol.name = bfd_elf_string_from_elf_section (abfd,
- hdr->sh_link,
- isym->st_name);
+ sym->symbol.name = bfd_elf_sym_name (abfd, hdr, isym, NULL);
sym->symbol.value = isym->st_value;
@@ -1120,7 +1200,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
sym->symbol.section = bfd_abs_section_ptr;
/* If this is a relocatable file, then the symbol value is
- already section relative. */
+ already section relative. */
if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
sym->symbol.value -= sym->symbol.section->vma;
@@ -1152,6 +1232,9 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
case STT_OBJECT:
sym->symbol.flags |= BSF_OBJECT;
break;
+ case STT_TLS:
+ sym->symbol.flags |= BSF_THREAD_LOCAL;
+ break;
}
if (dynamic)
@@ -1208,7 +1291,7 @@ error_return:
return -1;
}
-/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of
+/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of
them. */
static bfd_boolean
@@ -1279,16 +1362,11 @@ elf_slurp_reloc_table_from_section (bfd *abfd,
}
else
{
- asymbol **ps, *s;
+ asymbol **ps;
ps = symbols + ELF_R_SYM (rela.r_info) - 1;
- s = *ps;
- /* Canonicalize ELF section symbols. FIXME: Why? */
- if ((s->flags & BSF_SECTION_SYM) == 0)
- relent->sym_ptr_ptr = ps;
- else
- relent->sym_ptr_ptr = s->section->symbol_ptr_ptr;
+ relent->sym_ptr_ptr = ps;
}
relent->addend = rela.r_addend;
@@ -1353,7 +1431,7 @@ elf_slurp_reloc_table (bfd *abfd,
case because relocations against this section may use the
dynamic symbol table, and in that case bfd_section_from_shdr
in elf.c does not update the RELOC_COUNT. */
- if (asect->_raw_size == 0)
+ if (asect->size == 0)
return TRUE;
rel_hdr = &d->this_hdr;
@@ -1513,7 +1591,7 @@ NAME(_bfd_elf,bfd_from_remote_memory)
(bfd *templ,
bfd_vma ehdr_vma,
bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, char *, int))
+ int (*target_read_memory) (bfd_vma, bfd_byte *, int))
{
Elf_External_Ehdr x_ehdr; /* Elf file header, external form */
Elf_Internal_Ehdr i_ehdr; /* Elf file header, internal form */
@@ -1522,13 +1600,13 @@ NAME(_bfd_elf,bfd_from_remote_memory)
bfd *nbfd;
struct bfd_in_memory *bim;
int contents_size;
- char *contents;
+ bfd_byte *contents;
int err;
unsigned int i;
bfd_vma loadbase;
/* Read in the ELF header in external format. */
- err = target_read_memory (ehdr_vma, (char *) &x_ehdr, sizeof x_ehdr);
+ err = target_read_memory (ehdr_vma, (bfd_byte *) &x_ehdr, sizeof x_ehdr);
if (err)
{
bfd_set_error (bfd_error_system_call);
@@ -1588,7 +1666,7 @@ NAME(_bfd_elf,bfd_from_remote_memory)
bfd_set_error (bfd_error_no_memory);
return NULL;
}
- err = target_read_memory (ehdr_vma + i_ehdr.e_phoff, (char *) x_phdrs,
+ err = target_read_memory (ehdr_vma + i_ehdr.e_phoff, (bfd_byte *) x_phdrs,
i_ehdr.e_phnum * sizeof x_phdrs[0]);
if (err)
{
@@ -1605,7 +1683,10 @@ NAME(_bfd_elf,bfd_from_remote_memory)
for (i = 0; i < i_ehdr.e_phnum; ++i)
{
elf_swap_phdr_in (templ, &x_phdrs[i], &i_phdrs[i]);
- if (i_phdrs[i].p_type == PT_LOAD)
+ /* IA-64 vDSO may have two mappings for one segment, where one mapping
+ is executable only, and one is read only. We must not use the
+ executable one. */
+ if (i_phdrs[i].p_type == PT_LOAD && (i_phdrs[i].p_flags & PF_R))
{
bfd_vma segment_end;
segment_end = (i_phdrs[i].p_offset + i_phdrs[i].p_filesz
@@ -1652,7 +1733,10 @@ NAME(_bfd_elf,bfd_from_remote_memory)
}
for (i = 0; i < i_ehdr.e_phnum; ++i)
- if (i_phdrs[i].p_type == PT_LOAD)
+ /* IA-64 vDSO may have two mappings for one segment, where one mapping
+ is executable only, and one is read only. We must not use the
+ executable one. */
+ if (i_phdrs[i].p_type == PT_LOAD && (i_phdrs[i].p_flags & PF_R))
{
bfd_vma start = i_phdrs[i].p_offset & -i_phdrs[i].p_align;
bfd_vma end = (i_phdrs[i].p_offset + i_phdrs[i].p_filesz
diff --git a/contrib/binutils/bfd/elfcore.h b/contrib/binutils/bfd/elfcore.h
index 81c4cff11393..b1cf42d79fab 100644
--- a/contrib/binutils/bfd/elfcore.h
+++ b/contrib/binutils/bfd/elfcore.h
@@ -1,5 +1,5 @@
/* ELF core file support for BFD.
- Copyright 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003
+ Copyright 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
char*
elf_core_file_failing_command (bfd *abfd)
@@ -207,12 +207,19 @@ elf_core_file_p (bfd *abfd)
/* Set the machine architecture. Do this before processing the
program headers since we need to know the architecture type
when processing the notes of some systems' core files. */
- if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0))
- {
+ if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0)
/* It's OK if this fails for the generic target. */
- if (ebd->elf_machine_code != EM_NONE)
- goto fail;
- }
+ && ebd->elf_machine_code != EM_NONE)
+ goto fail;
+
+ /* Let the backend double check the format and override global
+ information. We do this before processing the program headers
+ to allow the correct machine (as opposed to just the default
+ machine) to be set, making it possible for grok_prstatus and
+ grok_psinfo to rely on the mach setting. */
+ if (ebd->elf_backend_object_p != NULL
+ && ! ebd->elf_backend_object_p (abfd))
+ goto wrong;
/* Process each program header. */
for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
@@ -222,12 +229,6 @@ elf_core_file_p (bfd *abfd)
/* Save the entry point from the ELF header. */
bfd_get_start_address (abfd) = i_ehdrp->e_entry;
- /* Let the backend double check the format and override global
- information. */
- if (ebd->elf_backend_object_p
- && (! (*ebd->elf_backend_object_p) (abfd)))
- goto wrong;
-
bfd_preserve_finish (abfd, &preserve);
return abfd->xvec;
diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c
index 0353bdcb5f33..59d9c3f1389a 100644
--- a/contrib/binutils/bfd/elflink.c
+++ b/contrib/binutils/bfd/elflink.c
@@ -1,22 +1,22 @@
/* ELF linking support for BFD.
- 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,
+ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -26,6 +26,45 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf-bfd.h"
#include "safe-ctype.h"
#include "libiberty.h"
+#include "objalloc.h"
+
+/* Define a symbol in a dynamic linkage section. */
+
+struct elf_link_hash_entry *
+_bfd_elf_define_linkage_sym (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const char *name)
+{
+ struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
+ const struct elf_backend_data *bed;
+
+ h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE, FALSE);
+ if (h != NULL)
+ {
+ /* Zap symbol defined in an as-needed lib that wasn't linked.
+ This is a symptom of a larger problem: Absolute symbols
+ defined in shared libraries can't be overridden, because we
+ lose the link to the bfd which is via the symbol section. */
+ h->root.type = bfd_link_hash_new;
+ }
+
+ bh = &h->root;
+ if (!_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL,
+ sec, 0, NULL, FALSE,
+ get_elf_backend_data (abfd)->collect,
+ &bh))
+ return NULL;
+ h = (struct elf_link_hash_entry *) bh;
+ h->def_regular = 1;
+ h->type = STT_OBJECT;
+ h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN;
+
+ bed = get_elf_backend_data (abfd);
+ (*bed->elf_backend_hide_symbol) (info, h, TRUE);
+ return h;
+}
bfd_boolean
_bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
@@ -33,7 +72,6 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
flagword flags;
asection *s;
struct elf_link_hash_entry *h;
- struct bfd_link_hash_entry *bh;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
@@ -57,20 +95,17 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
return FALSE;
}
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED);
+ flags = bed->dynamic_sec_flags;
- 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, ptralign))
return FALSE;
if (bed->want_got_plt)
{
- s = bfd_make_section (abfd, ".got.plt");
+ s = bfd_make_section_with_flags (abfd, ".got.plt", flags);
if (s == NULL
- || !bfd_set_section_flags (abfd, s, flags)
|| !bfd_set_section_alignment (abfd, s, ptralign))
return FALSE;
}
@@ -81,28 +116,37 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
(or .got.plt) section. We don't do this in the linker script
because we don't want to define the symbol if we are not creating
a global offset table. */
- bh = NULL;
- if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
- bed->got_symbol_offset, NULL, FALSE, bed->collect, &bh)))
- return FALSE;
- h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
-
- if (! info->executable
- && ! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
-
+ h = _bfd_elf_define_linkage_sym (abfd, info, s, "_GLOBAL_OFFSET_TABLE_");
elf_hash_table (info)->hgot = h;
+ if (h == NULL)
+ return FALSE;
}
/* The first bit of the global offset table is the header. */
- s->_raw_size += bed->got_header_size + bed->got_symbol_offset;
+ s->size += bed->got_header_size;
return TRUE;
}
+/* Create a strtab to hold the dynamic symbol names. */
+static bfd_boolean
+_bfd_elf_link_create_dynstrtab (bfd *abfd, struct bfd_link_info *info)
+{
+ struct elf_link_hash_table *hash_table;
+
+ hash_table = elf_hash_table (info);
+ if (hash_table->dynobj == NULL)
+ hash_table->dynobj = abfd;
+
+ if (hash_table->dynstr == NULL)
+ {
+ hash_table->dynstr = _bfd_elf_strtab_init ();
+ if (hash_table->dynstr == NULL)
+ return FALSE;
+ }
+ return TRUE;
+}
+
/* Create some sections which will be filled in with dynamic linking
information. ABFD is an input file which requires dynamic sections
to be created. The dynamic sections take up virtual memory space
@@ -115,8 +159,6 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
flagword flags;
register asection *s;
- struct elf_link_hash_entry *h;
- struct bfd_link_hash_entry *bh;
const struct elf_backend_data *bed;
if (! is_elf_hash_table (info->hash))
@@ -125,108 +167,82 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
if (elf_hash_table (info)->dynamic_sections_created)
return TRUE;
- /* Make sure that all dynamic sections use the same input BFD. */
- if (elf_hash_table (info)->dynobj == NULL)
- elf_hash_table (info)->dynobj = abfd;
- else
- abfd = elf_hash_table (info)->dynobj;
+ if (!_bfd_elf_link_create_dynstrtab (abfd, info))
+ return FALSE;
- /* Note that we set the SEC_IN_MEMORY flag for all of these
- sections. */
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ abfd = elf_hash_table (info)->dynobj;
+ bed = get_elf_backend_data (abfd);
+
+ flags = bed->dynamic_sec_flags;
/* A dynamically linked executable has a .interp section, but a
shared library does not. */
if (info->executable)
{
- s = bfd_make_section (abfd, ".interp");
- if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY))
+ s = bfd_make_section_with_flags (abfd, ".interp",
+ flags | SEC_READONLY);
+ if (s == NULL)
return FALSE;
}
if (! info->traditional_format)
{
- s = bfd_make_section (abfd, ".eh_frame_hdr");
+ s = bfd_make_section_with_flags (abfd, ".eh_frame_hdr",
+ flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
elf_hash_table (info)->eh_info.hdr_sec = s;
}
- bed = get_elf_backend_data (abfd);
-
/* Create sections to hold version informations. These are removed
if they are not needed. */
- s = bfd_make_section (abfd, ".gnu.version_d");
+ s = bfd_make_section_with_flags (abfd, ".gnu.version_d",
+ flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
return FALSE;
- s = bfd_make_section (abfd, ".gnu.version");
+ s = bfd_make_section_with_flags (abfd, ".gnu.version",
+ flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 1))
return FALSE;
- s = bfd_make_section (abfd, ".gnu.version_r");
+ s = bfd_make_section_with_flags (abfd, ".gnu.version_r",
+ flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
return FALSE;
- 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, bed->s->log_file_align))
return FALSE;
- s = bfd_make_section (abfd, ".dynstr");
- if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY))
+ s = bfd_make_section_with_flags (abfd, ".dynstr",
+ flags | SEC_READONLY);
+ if (s == NULL)
return FALSE;
- /* Create a strtab to hold the dynamic symbol names. */
- if (elf_hash_table (info)->dynstr == NULL)
- {
- elf_hash_table (info)->dynstr = _bfd_elf_strtab_init ();
- if (elf_hash_table (info)->dynstr == NULL)
- return FALSE;
- }
-
- 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, bed->s->log_file_align))
return FALSE;
/* The special symbol _DYNAMIC is always set to the start of the
- .dynamic section. This call occurs before we have processed the
- symbols for any dynamic object, so we don't have to worry about
- overriding a dynamic definition. We could set _DYNAMIC in a
- linker script, but we only want to define it if we are, in fact,
- creating a .dynamic section. We don't want to define it if there
- is no .dynamic section, since on some ELF platforms the start up
- code examines it to decide how to initialize the process. */
- bh = NULL;
- if (! (_bfd_generic_link_add_one_symbol
- (info, abfd, "_DYNAMIC", BSF_GLOBAL, s, 0, NULL, FALSE,
- get_elf_backend_data (abfd)->collect, &bh)))
- return FALSE;
- h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
-
- if (! info->executable
- && ! bfd_elf_link_record_dynamic_symbol (info, h))
+ .dynamic section. We could set _DYNAMIC in a linker script, but we
+ only want to define it if we are, in fact, creating a .dynamic
+ section. We don't want to define it if there is no .dynamic
+ section, since on some ELF platforms the start up code examines it
+ to decide how to initialize the process. */
+ if (!_bfd_elf_define_linkage_sym (abfd, info, s, "_DYNAMIC"))
return FALSE;
- 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, bed->s->log_file_align))
return FALSE;
elf_section_data (s)->this_hdr.sh_entsize = bed->s->sizeof_hash_entry;
@@ -248,52 +264,46 @@ bfd_boolean
_bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
flagword flags, pltflags;
+ struct elf_link_hash_entry *h;
asection *s;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
.rel[a].bss sections. */
-
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED);
+ flags = bed->dynamic_sec_flags;
pltflags = flags;
- pltflags |= SEC_CODE;
if (bed->plt_not_loaded)
+ /* We do not clear SEC_ALLOC here because we still want the OS to
+ allocate space for the section; it's just that there's nothing
+ to read in from the object file. */
pltflags &= ~ (SEC_CODE | SEC_LOAD | SEC_HAS_CONTENTS);
+ else
+ pltflags |= SEC_ALLOC | SEC_CODE | SEC_LOAD;
if (bed->plt_readonly)
pltflags |= SEC_READONLY;
- s = bfd_make_section (abfd, ".plt");
+ s = bfd_make_section_with_flags (abfd, ".plt", pltflags);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, pltflags)
|| ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
return FALSE;
+ /* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
+ .plt section. */
if (bed->want_plt_sym)
{
- /* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
- .plt section. */
- struct elf_link_hash_entry *h;
- struct bfd_link_hash_entry *bh = NULL;
-
- if (! (_bfd_generic_link_add_one_symbol
- (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s, 0, NULL,
- FALSE, get_elf_backend_data (abfd)->collect, &bh)))
- return FALSE;
- h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
-
- if (! info->executable
- && ! bfd_elf_link_record_dynamic_symbol (info, h))
+ h = _bfd_elf_define_linkage_sym (abfd, info, s,
+ "_PROCEDURE_LINKAGE_TABLE_");
+ elf_hash_table (info)->hplt = h;
+ if (h == NULL)
return FALSE;
}
- s = bfd_make_section (abfd,
- bed->default_use_rela_p ? ".rela.plt" : ".rel.plt");
+ s = bfd_make_section_with_flags (abfd,
+ (bed->default_use_rela_p
+ ? ".rela.plt" : ".rel.plt"),
+ flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
return FALSE;
@@ -308,29 +318,30 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
image and use a R_*_COPY reloc to tell the dynamic linker to
initialize them at run time. The linker script puts the .dynbss
section into the .bss section of the final image. */
- s = bfd_make_section (abfd, ".dynbss");
- if (s == NULL
- || ! bfd_set_section_flags (abfd, s, SEC_ALLOC | SEC_LINKER_CREATED))
+ s = bfd_make_section_with_flags (abfd, ".dynbss",
+ (SEC_ALLOC
+ | SEC_LINKER_CREATED));
+ if (s == NULL)
return FALSE;
/* The .rel[a].bss section holds copy relocs. This section is not
- normally needed. We need to create it here, though, so that the
- linker will map it to an output section. We can't just create it
- only if we need it, because we will not know whether we need it
- until we have seen all the input files, and the first time the
- main linker code calls BFD after examining all the input files
- (size_dynamic_sections) the input sections have already been
- mapped to the output sections. If the section turns out not to
- be needed, we can discard it later. We will never need this
- section when generating a shared object, since they do not use
- copy relocs. */
+ normally needed. We need to create it here, though, so that the
+ linker will map it to an output section. We can't just create it
+ only if we need it, because we will not know whether we need it
+ until we have seen all the input files, and the first time the
+ main linker code calls BFD after examining all the input files
+ (size_dynamic_sections) the input sections have already been
+ mapped to the output sections. If the section turns out not to
+ be needed, we can discard it later. We will never need this
+ section when generating a shared object, since they do not use
+ copy relocs. */
if (! info->shared)
{
- s = bfd_make_section (abfd,
- (bed->default_use_rela_p
- ? ".rela.bss" : ".rel.bss"));
+ s = bfd_make_section_with_flags (abfd,
+ (bed->default_use_rela_p
+ ? ".rela.bss" : ".rel.bss"),
+ flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
return FALSE;
}
@@ -369,8 +380,9 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
if (h->root.type != bfd_link_hash_undefined
&& h->root.type != bfd_link_hash_undefweak)
{
- h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- return TRUE;
+ h->forced_local = 1;
+ if (!elf_hash_table (info)->is_relocatable_executable)
+ return TRUE;
}
default:
@@ -418,37 +430,44 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
this in case some dynamic object refers to this symbol. */
bfd_boolean
-bfd_elf_record_link_assignment (bfd *output_bfd ATTRIBUTE_UNUSED,
+bfd_elf_record_link_assignment (bfd *output_bfd,
struct bfd_link_info *info,
const char *name,
- bfd_boolean provide)
+ bfd_boolean provide,
+ bfd_boolean hidden)
{
struct elf_link_hash_entry *h;
+ struct elf_link_hash_table *htab;
if (!is_elf_hash_table (info->hash))
return TRUE;
- h = elf_link_hash_lookup (elf_hash_table (info), name, TRUE, TRUE, FALSE);
+ htab = elf_hash_table (info);
+ h = elf_link_hash_lookup (htab, name, !provide, TRUE, FALSE);
if (h == NULL)
- return FALSE;
+ return provide;
/* Since we're defining the symbol, don't let it seem to have not
been defined. record_dynamic_symbol and size_dynamic_sections
may depend on this. */
if (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined)
- h->root.type = bfd_link_hash_new;
+ {
+ h->root.type = bfd_link_hash_new;
+ if (h->root.u.undef.next != NULL || htab->root.undefs_tail == &h->root)
+ bfd_link_repair_undef_list (&htab->root);
+ }
if (h->root.type == bfd_link_hash_new)
- h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
+ 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
object, then mark it as undefined so that the generic linker will
force the correct value. */
if (provide
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && h->def_dynamic
+ && !h->def_regular)
h->root.type = bfd_link_hash_undefined;
/* If this symbol is not being provided by the linker script, and it is
@@ -456,15 +475,32 @@ bfd_elf_record_link_assignment (bfd *output_bfd ATTRIBUTE_UNUSED,
then clear out any version information because the symbol will not be
associated with the dynamic object any more. */
if (!provide
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && h->def_dynamic
+ && !h->def_regular)
h->verinfo.verdef = NULL;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->def_regular = 1;
+
+ if (provide && hidden)
+ {
+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+
+ h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN;
+ (*bed->elf_backend_hide_symbol) (info, h, TRUE);
+ }
+
+ /* STV_HIDDEN and STV_INTERNAL symbols must be STB_LOCAL in shared objects
+ and executables. */
+ if (!info->relocatable
+ && h->dynindx != -1
+ && (ELF_ST_VISIBILITY (h->other) == STV_HIDDEN
+ || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL))
+ h->forced_local = 1;
- if (((h->elf_link_hash_flags & (ELF_LINK_HASH_DEF_DYNAMIC
- | ELF_LINK_HASH_REF_DYNAMIC)) != 0
- || info->shared)
+ if ((h->def_dynamic
+ || h->ref_dynamic
+ || info->shared
+ || (info->executable && elf_hash_table (info)->is_relocatable_executable))
&& h->dynindx == -1)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
@@ -473,10 +509,10 @@ bfd_elf_record_link_assignment (bfd *output_bfd ATTRIBUTE_UNUSED,
/* If this is a weak defined symbol, and we know a corresponding
real symbol from the same dynamic object, make sure the real
symbol is also made into a dynamic symbol. */
- if (h->weakdef != NULL
- && h->weakdef->dynindx == -1)
+ if (h->u.weakdef != NULL
+ && h->u.weakdef->dynindx == -1)
{
- if (! bfd_elf_link_record_dynamic_symbol (info, h->weakdef))
+ if (! bfd_elf_link_record_dynamic_symbol (info, h->u.weakdef))
return FALSE;
}
}
@@ -602,29 +638,101 @@ elf_link_renumber_hash_table_dynsyms (struct elf_link_hash_entry *h,
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ if (h->forced_local)
+ return TRUE;
+
+ if (h->dynindx != -1)
+ h->dynindx = ++(*count);
+
+ return TRUE;
+}
+
+
+/* Like elf_link_renumber_hash_table_dynsyms, but just number symbols with
+ STB_LOCAL binding. */
+
+static bfd_boolean
+elf_link_renumber_local_hash_table_dynsyms (struct elf_link_hash_entry *h,
+ void *data)
+{
+ size_t *count = data;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (!h->forced_local)
+ return TRUE;
+
if (h->dynindx != -1)
h->dynindx = ++(*count);
return TRUE;
}
+/* Return true if the dynamic symbol for a given section should be
+ omitted when creating a shared library. */
+bfd_boolean
+_bfd_elf_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ asection *p)
+{
+ switch (elf_section_data (p)->this_hdr.sh_type)
+ {
+ case SHT_PROGBITS:
+ case SHT_NOBITS:
+ /* If sh_type is yet undecided, assume it could be
+ SHT_PROGBITS/SHT_NOBITS. */
+ case SHT_NULL:
+ 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
+ && (ip->flags & SEC_LINKER_CREATED)
+ && ip->output_section == p)
+ return TRUE;
+ }
+ return FALSE;
+
+ /* There shouldn't be section relative relocations
+ against any other section. */
+ default:
+ return TRUE;
+ }
+}
+
/* Assign dynsym indices. In a shared library we generate a section
- symbol for each output section, which come first. Next come all of
- the back-end allocated local dynamic syms, followed by the rest of
- the global symbols. */
+ symbol for each output section, which come first. Next come symbols
+ which have been forced to local binding. Then all of the back-end
+ allocated local dynamic syms, followed by the rest of the global
+ symbols. */
-unsigned long
-_bfd_elf_link_renumber_dynsyms (bfd *output_bfd, struct bfd_link_info *info)
+static unsigned long
+_bfd_elf_link_renumber_dynsyms (bfd *output_bfd,
+ struct bfd_link_info *info,
+ unsigned long *section_sym_count)
{
unsigned long dynsymcount = 0;
- if (info->shared)
+ if (info->shared || elf_hash_table (info)->is_relocatable_executable)
{
+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
asection *p;
for (p = output_bfd->sections; p ; p = p->next)
- if ((p->flags & SEC_EXCLUDE) == 0)
+ if ((p->flags & SEC_EXCLUDE) == 0
+ && (p->flags & SEC_ALLOC) != 0
+ && !(*bed->elf_backend_omit_section_dynsym) (output_bfd, info, p))
elf_section_data (p)->dynindx = ++dynsymcount;
}
+ *section_sym_count = dynsymcount;
+
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_link_renumber_local_hash_table_dynsyms,
+ &dynsymcount);
if (elf_hash_table (info)->dynlocal)
{
@@ -643,7 +751,8 @@ _bfd_elf_link_renumber_dynsyms (bfd *output_bfd, struct bfd_link_info *info)
if (dynsymcount != 0)
++dynsymcount;
- return elf_hash_table (info)->dynsymcount = dynsymcount;
+ elf_hash_table (info)->dynsymcount = dynsymcount;
+ return dynsymcount;
}
/* This function is called when we want to define a new symbol. It
@@ -655,7 +764,8 @@ _bfd_elf_link_renumber_dynsyms (bfd *output_bfd, struct bfd_link_info *info)
TYPE_CHANGE_OK if it is OK for the type to change. We set
SIZE_CHANGE_OK if it is OK for the size to change. By OK to
change, we mean that we shouldn't warn if the type or size does
- change. */
+ change. We set POLD_ALIGNMENT if an old common symbol in a dynamic
+ object is overridden by a regular object. */
bfd_boolean
_bfd_elf_merge_symbol (bfd *abfd,
@@ -664,19 +774,21 @@ _bfd_elf_merge_symbol (bfd *abfd,
Elf_Internal_Sym *sym,
asection **psec,
bfd_vma *pvalue,
+ unsigned int *pold_alignment,
struct elf_link_hash_entry **sym_hash,
bfd_boolean *skip,
bfd_boolean *override,
bfd_boolean *type_change_ok,
bfd_boolean *size_change_ok)
{
- asection *sec;
+ asection *sec, *oldsec;
struct elf_link_hash_entry *h;
struct elf_link_hash_entry *flip;
int bind;
bfd *oldbfd;
bfd_boolean newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon;
bfd_boolean newweak, oldweak;
+ const struct elf_backend_data *bed;
*skip = FALSE;
*override = FALSE;
@@ -710,30 +822,35 @@ _bfd_elf_merge_symbol (bfd *abfd,
if (h->root.type == bfd_link_hash_new)
{
- h->elf_link_hash_flags &=~ ELF_LINK_NON_ELF;
+ h->non_elf = 0;
return TRUE;
}
- /* OLDBFD is a BFD associated with the existing symbol. */
+ /* OLDBFD and OLDSEC are a BFD and an ASECTION associated with the
+ existing symbol. */
switch (h->root.type)
{
default:
oldbfd = NULL;
+ oldsec = NULL;
break;
case bfd_link_hash_undefined:
case bfd_link_hash_undefweak:
oldbfd = h->root.u.undef.abfd;
+ oldsec = NULL;
break;
case bfd_link_hash_defined:
case bfd_link_hash_defweak:
oldbfd = h->root.u.def.section->owner;
+ oldsec = h->root.u.def.section;
break;
case bfd_link_hash_common:
oldbfd = h->root.u.c.p->section->owner;
+ oldsec = h->root.u.c.p->section;
break;
}
@@ -745,81 +862,122 @@ _bfd_elf_merge_symbol (bfd *abfd,
dynamic object, which we do want to handle here. */
if (abfd == oldbfd
&& ((abfd->flags & DYNAMIC) == 0
- || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || !h->def_regular))
return TRUE;
/* NEWDYN and OLDDYN indicate whether the new or old symbol,
respectively, is from a dynamic object. */
- if ((abfd->flags & DYNAMIC) != 0)
- newdyn = TRUE;
- else
- newdyn = FALSE;
+ newdyn = (abfd->flags & DYNAMIC) != 0;
+ olddyn = FALSE;
if (oldbfd != NULL)
olddyn = (oldbfd->flags & DYNAMIC) != 0;
- else
+ else if (oldsec != NULL)
{
- asection *hsec;
-
- /* This code handles the special SHN_MIPS_{TEXT,DATA} section
+ /* This handles the special SHN_MIPS_{TEXT,DATA} section
indices used by MIPS ELF. */
- switch (h->root.type)
- {
- default:
- hsec = NULL;
- break;
-
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- hsec = h->root.u.def.section;
- break;
-
- case bfd_link_hash_common:
- hsec = h->root.u.c.p->section;
- break;
- }
-
- if (hsec == NULL)
- olddyn = FALSE;
- else
- olddyn = (hsec->symbol->flags & BSF_DYNAMIC) != 0;
+ olddyn = (oldsec->symbol->flags & BSF_DYNAMIC) != 0;
}
/* NEWDEF and OLDDEF indicate whether the new or old symbol,
respectively, appear to be a definition rather than reference. */
- if (bfd_is_und_section (sec) || bfd_is_com_section (sec))
- newdef = FALSE;
- else
- newdef = TRUE;
+ newdef = !bfd_is_und_section (sec) && !bfd_is_com_section (sec);
+
+ olddef = (h->root.type != bfd_link_hash_undefined
+ && h->root.type != bfd_link_hash_undefweak
+ && h->root.type != bfd_link_hash_common);
+
+ /* 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
+ if the existing regular definition won't be dynamic. */
+ if (pold_alignment == NULL
+ && !info->shared
+ && !info->export_dynamic
+ && !h->ref_dynamic
+ && newdyn
+ && newdef
+ && !olddyn
+ && (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)
+ {
+ *skip = TRUE;
+ return TRUE;
+ }
- if (h->root.type == bfd_link_hash_undefined
- || h->root.type == bfd_link_hash_undefweak
- || h->root.type == bfd_link_hash_common)
- olddef = FALSE;
- else
- olddef = TRUE;
+ /* Check TLS symbol. We don't check undefined symbol introduced by
+ "ld -u". */
+ if ((ELF_ST_TYPE (sym->st_info) == STT_TLS || h->type == STT_TLS)
+ && ELF_ST_TYPE (sym->st_info) != h->type
+ && oldbfd != NULL)
+ {
+ bfd *ntbfd, *tbfd;
+ bfd_boolean ntdef, tdef;
+ asection *ntsec, *tsec;
+
+ if (h->type == STT_TLS)
+ {
+ ntbfd = abfd;
+ ntsec = sec;
+ ntdef = newdef;
+ tbfd = oldbfd;
+ tsec = oldsec;
+ tdef = olddef;
+ }
+ else
+ {
+ ntbfd = oldbfd;
+ ntsec = oldsec;
+ ntdef = olddef;
+ tbfd = abfd;
+ tsec = sec;
+ tdef = newdef;
+ }
+
+ if (tdef && ntdef)
+ (*_bfd_error_handler)
+ (_("%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A"),
+ tbfd, tsec, ntbfd, ntsec, h->root.root.string);
+ else if (!tdef && !ntdef)
+ (*_bfd_error_handler)
+ (_("%s: TLS reference in %B mismatches non-TLS reference in %B"),
+ tbfd, ntbfd, h->root.root.string);
+ else if (tdef)
+ (*_bfd_error_handler)
+ (_("%s: TLS definition in %B section %A mismatches non-TLS reference in %B"),
+ tbfd, tsec, ntbfd, h->root.root.string);
+ else
+ (*_bfd_error_handler)
+ (_("%s: TLS reference in %B mismatches non-TLS definition in %B section %A"),
+ tbfd, ntbfd, ntsec, h->root.root.string);
+
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
/* We need to remember if a symbol has a definition in a dynamic
object or is weak in all dynamic objects. Internal and hidden
visibility will make it unavailable to dynamic objects. */
- if (newdyn && (h->elf_link_hash_flags & ELF_LINK_DYNAMIC_DEF) == 0)
+ if (newdyn && !h->dynamic_def)
{
if (!bfd_is_und_section (sec))
- h->elf_link_hash_flags |= ELF_LINK_DYNAMIC_DEF;
+ h->dynamic_def = 1;
else
{
/* Check if this symbol is weak in all dynamic objects. If it
is the first time we see it in a dynamic object, we mark
if it is weak. Otherwise, we clear it. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)
+ if (!h->ref_dynamic)
{
if (bind == STB_WEAK)
- h->elf_link_hash_flags |= ELF_LINK_DYNAMIC_WEAK;
+ h->dynamic_weak = 1;
}
else if (bind != STB_WEAK)
- h->elf_link_hash_flags &= ~ELF_LINK_DYNAMIC_WEAK;
+ h->dynamic_weak = 0;
}
}
@@ -831,7 +989,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
{
*skip = TRUE;
/* Make sure this symbol is dynamic. */
- h->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC;
+ h->ref_dynamic = 1;
/* A protected symbol has external availability. Make sure it is
recorded as dynamic.
@@ -843,7 +1001,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
}
else if (!newdyn
&& ELF_ST_VISIBILITY (sym->st_other) != STV_DEFAULT
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
+ && h->def_dynamic)
{
/* If the new symbol with non-default visibility comes from a
relocatable file and the old definition comes from a dynamic
@@ -851,17 +1009,16 @@ _bfd_elf_merge_symbol (bfd *abfd,
if ((*sym_hash)->root.type == bfd_link_hash_indirect)
h = *sym_hash;
- if ((h->root.und_next || info->hash->undefs_tail == &h->root)
+ if ((h->root.u.undef.next || info->hash->undefs_tail == &h->root)
&& bfd_is_und_section (sec))
{
/* If the new symbol is undefined and the old symbol was
also undefined before, we need to make sure
_bfd_generic_link_add_one_symbol doesn't mess
- up the linker hash table undefs list. Since the old
+ up the linker hash table undefs list. Since the old
definition came from a dynamic object, it is still on the
undefs list. */
h->root.type = bfd_link_hash_undefined;
- /* FIXME: What if the new symbol is weak undefined? */
h->root.u.undef.abfd = abfd;
}
else
@@ -870,11 +1027,11 @@ _bfd_elf_merge_symbol (bfd *abfd,
h->root.u.undef.abfd = NULL;
}
- if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)
+ if (h->def_dynamic)
{
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_DEF_DYNAMIC;
- h->elf_link_hash_flags |= (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_DYNAMIC_DEF);
+ h->def_dynamic = 0;
+ h->ref_dynamic = 1;
+ h->dynamic_def = 1;
}
/* FIXME: Should we check type and size for protected symbol? */
h->size = 0;
@@ -957,7 +1114,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
if (olddyn
&& olddef
&& h->root.type == bfd_link_hash_defined
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && h->def_dynamic
&& (h->root.u.def.section->flags & SEC_ALLOC) != 0
&& (h->root.u.def.section->flags & SEC_LOAD) == 0
&& h->size > 0
@@ -966,6 +1123,19 @@ _bfd_elf_merge_symbol (bfd *abfd,
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,
+ type_change_ok, size_change_ok,
+ &newdyn, &newdef, &newdyncommon, &newweak,
+ abfd, &sec,
+ &olddyn, &olddef, &olddyncommon, &oldweak,
+ oldbfd, &oldsec))
+ return FALSE;
+
/* If both the old and the new symbols look like common symbols in a
dynamic object, set the size of the symbol to the larger of the
two. */
@@ -1032,8 +1202,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
/* Handle the special case of an old common symbol merging with a
new symbol which looks like a common symbol in a shared object.
We change *PSEC and *PVALUE to make the new symbol look like a
- common symbol, and let _bfd_generic_link_add_one_symbol will do
- the right thing. */
+ common symbol, and let _bfd_generic_link_add_one_symbol do the
+ right thing. */
if (newdyncommon
&& h->root.type == bfd_link_hash_common)
@@ -1042,10 +1212,14 @@ _bfd_elf_merge_symbol (bfd *abfd,
newdef = FALSE;
newdyncommon = FALSE;
*pvalue = sym->st_size;
- *psec = sec = bfd_com_section_ptr;
+ *psec = sec = bed->common_section (oldsec);
*size_change_ok = TRUE;
}
+ /* Skip weak definitions of symbols that are already defined. */
+ if (newdef && olddef && newweak)
+ *skip = TRUE;
+
/* If the old symbol is from a dynamic object, and the new symbol is
a definition which is not from a dynamic object, then the new
symbol overrides the old symbol. Symbols from regular files
@@ -1057,14 +1231,14 @@ _bfd_elf_merge_symbol (bfd *abfd,
symbol is a function or is weak. */
flip = NULL;
- if (! newdyn
+ if (!newdyn
&& (newdef
|| (bfd_is_com_section (sec)
&& (oldweak
|| h->type == STT_FUNC)))
&& olddyn
&& olddef
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
+ && h->def_dynamic)
{
/* Change the hash table entry to undefined, and let
_bfd_generic_link_add_one_symbol do the right thing with the
@@ -1116,9 +1290,10 @@ _bfd_elf_merge_symbol (bfd *abfd,
if (h->size > *pvalue)
*pvalue = h->size;
- /* FIXME: We no longer know the alignment required by the symbol
- in the dynamic object, so we just wind up using the one from
- the regular object. */
+ /* We need to remember the alignment required by the symbol
+ in the dynamic object. */
+ BFD_ASSERT (pold_alignment);
+ *pold_alignment = h->root.u.def.section->alignment_power;
olddef = FALSE;
olddyncommon = FALSE;
@@ -1144,12 +1319,12 @@ _bfd_elf_merge_symbol (bfd *abfd,
flip->root.type = h->root.type;
h->root.type = bfd_link_hash_indirect;
h->root.u.i.link = (struct bfd_link_hash_entry *) flip;
- (*bed->elf_backend_copy_indirect_symbol) (bed, flip, h);
+ (*bed->elf_backend_copy_indirect_symbol) (info, flip, h);
flip->root.u.undef.abfd = h->root.u.undef.abfd;
- if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)
+ if (h->def_dynamic)
{
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_DEF_DYNAMIC;
- flip->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC;
+ h->def_dynamic = 0;
+ flip->ref_dynamic = 1;
}
}
@@ -1230,8 +1405,8 @@ _bfd_elf_add_default_symbol (bfd *abfd,
size_change_ok = FALSE;
sec = *psec;
if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &sec, value,
- &hi, &skip, &override, &type_change_ok,
- &size_change_ok))
+ NULL, &hi, &skip, &override,
+ &type_change_ok, &size_change_ok))
return FALSE;
if (skip)
@@ -1272,13 +1447,12 @@ _bfd_elf_add_default_symbol (bfd *abfd,
h->root.type = bfd_link_hash_indirect;
h->root.u.i.link = (struct bfd_link_hash_entry *) hi;
- if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)
+ if (h->def_dynamic)
{
- h->elf_link_hash_flags &=~ ELF_LINK_HASH_DEF_DYNAMIC;
- hi->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC;
- if (hi->elf_link_hash_flags
- & (ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_DEF_REGULAR))
+ h->def_dynamic = 0;
+ hi->ref_dynamic = 1;
+ if (hi->ref_regular
+ || hi->def_regular)
{
if (! bfd_elf_link_record_dynamic_symbol (info, hi))
return FALSE;
@@ -1299,7 +1473,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
struct elf_link_hash_entry *ht;
ht = (struct elf_link_hash_entry *) hi->root.u.i.link;
- (*bed->elf_backend_copy_indirect_symbol) (bed, ht, hi);
+ (*bed->elf_backend_copy_indirect_symbol) (info, ht, hi);
/* See if the new flags lead us to realize that the symbol must
be dynamic. */
@@ -1308,14 +1482,12 @@ _bfd_elf_add_default_symbol (bfd *abfd,
if (! dynamic)
{
if (info->shared
- || ((hi->elf_link_hash_flags
- & ELF_LINK_HASH_REF_DYNAMIC) != 0))
+ || hi->ref_dynamic)
*dynsym = TRUE;
}
else
{
- if ((hi->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0)
+ if (hi->ref_regular)
*dynsym = TRUE;
}
}
@@ -1337,8 +1509,8 @@ nondefault:
size_change_ok = FALSE;
sec = *psec;
if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &sec, value,
- &hi, &skip, &override, &type_change_ok,
- &size_change_ok))
+ NULL, &hi, &skip, &override,
+ &type_change_ok, &size_change_ok))
return FALSE;
if (skip)
@@ -1352,8 +1524,8 @@ nondefault:
if (hi->root.type != bfd_link_hash_defined
&& hi->root.type != bfd_link_hash_defweak)
(*_bfd_error_handler)
- (_("%s: warning: unexpected redefinition of indirect versioned symbol `%s'"),
- bfd_archive_filename (abfd), shortname);
+ (_("%B: unexpected redefinition of indirect versioned symbol `%s'"),
+ abfd, shortname);
}
else
{
@@ -1370,7 +1542,7 @@ nondefault:
if (hi->root.type == bfd_link_hash_indirect)
{
- (*bed->elf_backend_copy_indirect_symbol) (bed, h, hi);
+ (*bed->elf_backend_copy_indirect_symbol) (info, h, hi);
/* See if the new flags lead us to realize that the symbol
must be dynamic. */
@@ -1379,14 +1551,12 @@ nondefault:
if (! dynamic)
{
if (info->shared
- || ((hi->elf_link_hash_flags
- & ELF_LINK_HASH_REF_DYNAMIC) != 0))
+ || hi->ref_dynamic)
*dynsym = TRUE;
}
else
{
- if ((hi->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0)
+ if (hi->ref_regular)
*dynsym = TRUE;
}
}
@@ -1412,8 +1582,8 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
if (h->dynindx == -1
- && (h->elf_link_hash_flags
- & (ELF_LINK_HASH_DEF_REGULAR | ELF_LINK_HASH_REF_REGULAR)) != 0)
+ && (h->def_regular
+ || h->ref_regular))
{
struct bfd_elf_version_tree *t;
struct bfd_elf_version_expr *d;
@@ -1468,8 +1638,8 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h,
/* We only care about symbols defined in shared objects with version
information. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
- || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+ if (!h->def_dynamic
+ || h->def_regular
|| h->dynindx == -1
|| h->verinfo.verdef == NULL)
return TRUE;
@@ -1559,7 +1729,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
/* We only need version numbers for symbols defined in regular
objects. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
return TRUE;
bed = get_elf_backend_data (sinfo->output_bfd);
@@ -1584,7 +1754,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
if (*p == '\0')
{
if (hidden)
- h->elf_link_hash_flags |= ELF_LINK_HIDDEN;
+ h->hidden = 1;
return TRUE;
}
@@ -1620,7 +1790,6 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
d = (*t->match) (&t->locals, NULL, alc);
if (d != NULL
&& h->dynindx != -1
- && info->shared
&& ! info->export_dynamic)
(*bed->elf_backend_hide_symbol) (info, h, TRUE);
}
@@ -1671,15 +1840,15 @@ _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)
- (_("%s: undefined versioned symbol name %s"),
- bfd_get_filename (sinfo->output_bfd), h->root.root.string);
+ (_("%B: undefined versioned symbol name %s"),
+ sinfo->output_bfd, h->root.root.string);
bfd_set_error (bfd_error_bad_value);
sinfo->failed = TRUE;
return FALSE;
}
if (hidden)
- h->elf_link_hash_flags |= ELF_LINK_HIDDEN;
+ h->hidden = 1;
}
/* If we don't have a version for this symbol, see if we can find
@@ -1747,7 +1916,6 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
{
h->verinfo.vertree = local_ver;
if (h->dynindx != -1
- && info->shared
&& ! info->export_dynamic)
{
(*bed->elf_backend_hide_symbol) (info, h, TRUE);
@@ -1820,9 +1988,10 @@ elf_link_read_relocs_from_section (bfd *abfd,
if ((size_t) r_symndx >= nsyms)
{
(*_bfd_error_handler)
- (_("%s: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%s'"),
- bfd_archive_filename (abfd), (unsigned long) r_symndx,
- (unsigned long) nsyms, irela->r_offset, sec->name);
+ (_("%B: bad reloc symbol index (0x%lx >= 0x%lx)"
+ " for offset 0x%lx in section `%A'"),
+ abfd, sec,
+ (unsigned long) r_symndx, (unsigned long) nsyms, irela->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1979,7 +2148,9 @@ bfd_boolean
_bfd_elf_link_output_relocs (bfd *output_bfd,
asection *input_section,
Elf_Internal_Shdr *input_rel_hdr,
- Elf_Internal_Rela *internal_relocs)
+ Elf_Internal_Rela *internal_relocs,
+ struct elf_link_hash_entry **rel_hash
+ ATTRIBUTE_UNUSED)
{
Elf_Internal_Rela *irela;
Elf_Internal_Rela *irelaend;
@@ -2009,10 +2180,8 @@ _bfd_elf_link_output_relocs (bfd *output_bfd,
else
{
(*_bfd_error_handler)
- (_("%s: relocation size mismatch in %s section %s"),
- bfd_get_filename (output_bfd),
- bfd_archive_filename (input_section->owner),
- input_section->name);
+ (_("%B: relocation size mismatch in %B section %A"),
+ output_bfd, input_section->owner, input_section);
bfd_set_error (bfd_error_wrong_object_format);
return FALSE;
}
@@ -2044,6 +2213,20 @@ _bfd_elf_link_output_relocs (bfd *output_bfd,
return TRUE;
}
+/* Make weak undefined symbols in PIE dynamic. */
+
+bfd_boolean
+_bfd_elf_link_hash_fixup_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
+{
+ if (info->pie
+ && h->dynindx == -1
+ && h->root.type == bfd_link_hash_undefweak)
+ return bfd_elf_link_record_dynamic_symbol (info, h);
+
+ return TRUE;
+}
+
/* Fix up the flags for a symbol. This handles various cases which
can only be fixed after all the input files are seen. This is
currently called by both adjust_dynamic_symbol and
@@ -2054,33 +2237,39 @@ bfd_boolean
_bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
struct elf_info_failed *eif)
{
+ const struct elf_backend_data *bed = NULL;
+
/* If this symbol was mentioned in a non-ELF file, try to set
DEF_REGULAR and REF_REGULAR correctly. This is the only way to
permit a non-ELF file to correctly refer to a symbol defined in
an ELF dynamic object. */
- if ((h->elf_link_hash_flags & ELF_LINK_NON_ELF) != 0)
+ if (h->non_elf)
{
while (h->root.type == bfd_link_hash_indirect)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
if (h->root.type != bfd_link_hash_defined
&& h->root.type != bfd_link_hash_defweak)
- h->elf_link_hash_flags |= (ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK);
+ {
+ h->ref_regular = 1;
+ h->ref_regular_nonweak = 1;
+ }
else
{
if (h->root.u.def.section->owner != NULL
&& (bfd_get_flavour (h->root.u.def.section->owner)
== bfd_target_elf_flavour))
- h->elf_link_hash_flags |= (ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK);
+ {
+ h->ref_regular = 1;
+ h->ref_regular_nonweak = 1;
+ }
else
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->def_regular = 1;
}
if (h->dynindx == -1
- && ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- || (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0))
+ && (h->def_dynamic
+ || h->ref_dynamic))
{
if (! bfd_elf_link_record_dynamic_symbol (eif->info, h))
{
@@ -2091,7 +2280,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
}
else
{
- /* Unfortunately, ELF_LINK_NON_ELF is only correct if the symbol
+ /* Unfortunately, NON_ELF is only correct if the symbol
was first seen in a non-ELF file. Fortunately, if the symbol
was first seen in an ELF file, we're probably OK unless the
symbol was defined in a non-ELF file. Catch that case here.
@@ -2099,27 +2288,35 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
a dynamic object, and then later in a non-ELF regular object. */
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
+ && !h->def_regular
&& (h->root.u.def.section->owner != NULL
? (bfd_get_flavour (h->root.u.def.section->owner)
!= bfd_target_elf_flavour)
: (bfd_is_abs_section (h->root.u.def.section)
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) == 0)))
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ && !h->def_dynamic)))
+ h->def_regular = 1;
+ }
+
+ /* Backend specific symbol fixup. */
+ if (elf_hash_table (eif->info)->dynobj)
+ {
+ bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
+ if (bed->elf_backend_fixup_symbol
+ && !(*bed->elf_backend_fixup_symbol) (eif->info, h))
+ return FALSE;
}
/* If this is a final link, and the symbol was defined as a common
symbol in a regular object file, and there was no definition in
any dynamic object, then the linker will have allocated space for
- the symbol in a common section but the ELF_LINK_HASH_DEF_REGULAR
+ the symbol in a common section but the DEF_REGULAR
flag will not have been set. */
if (h->root.type == bfd_link_hash_defined
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
+ && !h->def_regular
+ && h->ref_regular
+ && !h->def_dynamic
&& (h->root.u.def.section->owner->flags & DYNAMIC) == 0)
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->def_regular = 1;
/* If -Bsymbolic was used (which means to bind references to global
symbols to the definition within the shared object), and this
@@ -2127,18 +2324,15 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
need a PLT entry. Likewise, if the symbol has non-default
visibility. If the symbol has hidden or internal visibility, we
will force it local. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0
+ if (h->needs_plt
&& eif->info->shared
&& is_elf_hash_table (eif->info->hash)
&& (eif->info->symbolic
|| ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
+ && h->def_regular)
{
- const struct elf_backend_data *bed;
bfd_boolean force_local;
- bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
-
force_local = (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
|| ELF_ST_VISIBILITY (h->other) == STV_HIDDEN);
(*bed->elf_backend_hide_symbol) (eif->info, h, force_local);
@@ -2157,11 +2351,11 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
/* If this is a weak defined symbol in a dynamic object, and we know
the real definition in the dynamic object, copy interesting flags
over to the real definition. */
- if (h->weakdef != NULL)
+ if (h->u.weakdef != NULL)
{
struct elf_link_hash_entry *weakdef;
- weakdef = h->weakdef;
+ weakdef = h->u.weakdef;
if (h->root.type == bfd_link_hash_indirect)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -2169,20 +2363,16 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
|| h->root.type == bfd_link_hash_defweak);
BFD_ASSERT (weakdef->root.type == bfd_link_hash_defined
|| weakdef->root.type == bfd_link_hash_defweak);
- BFD_ASSERT (weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC);
+ BFD_ASSERT (weakdef->def_dynamic);
/* If the real definition is defined by a regular object file,
don't do anything special. See the longer description in
_bfd_elf_adjust_dynamic_symbol, below. */
- if ((weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
- h->weakdef = NULL;
+ if (weakdef->def_regular)
+ h->u.weakdef = NULL;
else
- {
- const struct elf_backend_data *bed;
-
- bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
- (*bed->elf_backend_copy_indirect_symbol) (bed, weakdef, h);
- }
+ (*bed->elf_backend_copy_indirect_symbol) (eif->info, weakdef,
+ h);
}
return TRUE;
@@ -2204,8 +2394,8 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
if (h->root.type == bfd_link_hash_warning)
{
- h->plt = elf_hash_table (eif->info)->init_offset;
- h->got = elf_hash_table (eif->info)->init_offset;
+ h->got = elf_hash_table (eif->info)->init_got_offset;
+ h->plt = elf_hash_table (eif->info)->init_plt_offset;
/* When warning symbols are created, they **replace** the "real"
entry in the hash table, thus we never get to see the real
@@ -2228,26 +2418,26 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
to the dynamic symbol table. FIXME: Do we normally need to worry
about symbols which are defined by one dynamic object and
referenced by another one? */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0
- && ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
- || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
- || ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
- && (h->weakdef == NULL || h->weakdef->dynindx == -1))))
+ if (!h->needs_plt
+ && (h->def_regular
+ || !h->def_dynamic
+ || (!h->ref_regular
+ && (h->u.weakdef == NULL || h->u.weakdef->dynindx == -1))))
{
- h->plt = elf_hash_table (eif->info)->init_offset;
+ h->plt = elf_hash_table (eif->info)->init_plt_offset;
return TRUE;
}
/* If we've already adjusted this symbol, don't do it again. This
can happen via a recursive call. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
+ if (h->dynamic_adjusted)
return TRUE;
/* Don't look at this symbol again. Note that we must set this
after checking the above conditions, because we may look at a
symbol once, decide not to do anything, and then get called
recursively later after REF_REGULAR is set below. */
- h->elf_link_hash_flags |= ELF_LINK_HASH_DYNAMIC_ADJUSTED;
+ h->dynamic_adjusted = 1;
/* If this is a weak definition, and we know a real definition, and
the real symbol is not itself defined by a regular object file,
@@ -2277,15 +2467,15 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
wind up at different memory locations. The tzset call will set
_timezone, leaving timezone unchanged. */
- if (h->weakdef != NULL)
+ if (h->u.weakdef != NULL)
{
/* If we get to this point, we know there is an implicit
reference by a regular object file via the weak symbol H.
FIXME: Is this really true? What if the traversal finds
- H->WEAKDEF before it finds H? */
- h->weakdef->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
+ H->U.WEAKDEF before it finds H? */
+ h->u.weakdef->ref_regular = 1;
- if (! _bfd_elf_adjust_dynamic_symbol (h->weakdef, eif))
+ if (! _bfd_elf_adjust_dynamic_symbol (h->u.weakdef, eif))
return FALSE;
}
@@ -2296,7 +2486,7 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
code, and the assembly code fails to set the symbol type. */
if (h->size == 0
&& h->type == STT_NOTYPE
- && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0)
+ && !h->needs_plt)
(*_bfd_error_handler)
(_("warning: type and size of dynamic symbol `%s' are not defined"),
h->root.root.string);
@@ -2334,7 +2524,7 @@ _bfd_elf_link_sec_merge_syms (struct elf_link_hash_entry *h, void *data)
_bfd_merged_section_offset (output_bfd,
&h->root.u.def.section,
elf_section_data (sec)->sec_info,
- h->root.u.def.value, 0);
+ h->root.u.def.value);
}
return TRUE;
@@ -2361,7 +2551,7 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h,
/* If it was forced local, then clearly it's not dynamic. */
if (h->dynindx == -1)
return FALSE;
- if (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)
+ if (h->forced_local)
return FALSE;
/* Identify the cases where name binding rules say that a
@@ -2378,7 +2568,7 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h,
/* 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)
+ if (!ignore_protected || h->type != STT_FUNC)
binding_stays_local_p = TRUE;
break;
@@ -2387,7 +2577,7 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h,
}
/* If it isn't defined locally, then clearly it's dynamic. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
return TRUE;
/* Otherwise, the symbol is dynamic if binding rules don't tell
@@ -2409,13 +2599,17 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
if (h == NULL)
return TRUE;
+ /* Common symbols that become definitions don't get the DEF_REGULAR
+ flag set, so test it first, and don't bail out. */
+ if (ELF_COMMON_DEF_P (h))
+ /* Do nothing. */;
/* If we don't have a definition in a regular file, then we can't
resolve locally. The sym is either undefined or dynamic. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ else if (!h->def_regular)
return FALSE;
/* Forced local symbols resolve locally. */
- if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ if (h->forced_local)
return TRUE;
/* As do non-dynamic symbols. */
@@ -2437,6 +2631,10 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
if (ELF_ST_VISIBILITY (h->other) != STV_PROTECTED)
return TRUE;
+ /* STV_PROTECTED non-function symbols are local. */
+ if (h->type != STT_FUNC)
+ return TRUE;
+
/* Function pointer equality tests may require that STV_PROTECTED
symbols be treated as dynamic symbols, even when we know that the
dynamic linker will resolve them locally. */
@@ -2476,6 +2674,8 @@ static bfd_boolean
is_global_data_symbol_definition (bfd *abfd ATTRIBUTE_UNUSED,
Elf_Internal_Sym *sym)
{
+ const struct elf_backend_data *bed;
+
/* Local symbols do not count, but target specific ones might. */
if (ELF_ST_BIND (sym->st_info) != STB_GLOBAL
&& ELF_ST_BIND (sym->st_info) < STB_LOOS)
@@ -2491,7 +2691,8 @@ 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. */
- if (sym->st_shndx == SHN_COMMON)
+ bed = get_elf_backend_data (abfd);
+ if (bed->common_definition (sym))
return FALSE;
/* If the symbol is in a target specific section then we
@@ -2613,16 +2814,16 @@ _bfd_elf_add_dynamic_entry (struct bfd_link_info *info,
s = bfd_get_section_by_name (hash_table->dynobj, ".dynamic");
BFD_ASSERT (s != NULL);
- newsize = s->_raw_size + bed->s->sizeof_dyn;
+ newsize = s->size + bed->s->sizeof_dyn;
newcontents = bfd_realloc (s->contents, newsize);
if (newcontents == NULL)
return FALSE;
dyn.d_tag = tag;
dyn.d_un.d_val = val;
- bed->s->swap_dyn_out (hash_table->dynobj, &dyn, newcontents + s->_raw_size);
+ bed->s->swap_dyn_out (hash_table->dynobj, &dyn, newcontents + s->size);
- s->_raw_size = newsize;
+ s->size = newsize;
s->contents = newcontents;
return TRUE;
@@ -2633,7 +2834,8 @@ _bfd_elf_add_dynamic_entry (struct bfd_link_info *info,
1 if a DT_NEEDED tag already exists, and 0 on success. */
static int
-elf_add_dt_needed_tag (struct bfd_link_info *info,
+elf_add_dt_needed_tag (bfd *abfd,
+ struct bfd_link_info *info,
const char *soname,
bfd_boolean do_it)
{
@@ -2641,6 +2843,9 @@ elf_add_dt_needed_tag (struct bfd_link_info *info,
bfd_size_type oldsize;
bfd_size_type strindex;
+ if (!_bfd_elf_link_create_dynstrtab (abfd, info))
+ return -1;
+
hash_table = elf_hash_table (info);
oldsize = _bfd_elf_strtab_size (hash_table->dynstr);
strindex = _bfd_elf_strtab_add (hash_table->dynstr, soname, FALSE);
@@ -2655,26 +2860,28 @@ elf_add_dt_needed_tag (struct bfd_link_info *info,
bed = get_elf_backend_data (hash_table->dynobj);
sdyn = bfd_get_section_by_name (hash_table->dynobj, ".dynamic");
- BFD_ASSERT (sdyn != NULL);
-
- for (extdyn = sdyn->contents;
- extdyn < sdyn->contents + sdyn->_raw_size;
- extdyn += bed->s->sizeof_dyn)
- {
- Elf_Internal_Dyn dyn;
+ if (sdyn != NULL)
+ for (extdyn = sdyn->contents;
+ extdyn < sdyn->contents + sdyn->size;
+ extdyn += bed->s->sizeof_dyn)
+ {
+ Elf_Internal_Dyn dyn;
- bed->s->swap_dyn_in (hash_table->dynobj, extdyn, &dyn);
- if (dyn.d_tag == DT_NEEDED
- && dyn.d_un.d_val == strindex)
- {
- _bfd_elf_strtab_delref (hash_table->dynstr, strindex);
- return 1;
- }
- }
+ bed->s->swap_dyn_in (hash_table->dynobj, extdyn, &dyn);
+ if (dyn.d_tag == DT_NEEDED
+ && dyn.d_un.d_val == strindex)
+ {
+ _bfd_elf_strtab_delref (hash_table->dynstr, strindex);
+ return 1;
+ }
+ }
}
if (do_it)
{
+ if (!_bfd_elf_link_create_dynamic_sections (hash_table->dynobj, info))
+ return -1;
+
if (!_bfd_elf_add_dynamic_entry (info, DT_NEEDED, strindex))
return -1;
}
@@ -2747,7 +2954,7 @@ elf_finalize_dynstr (bfd *output_bfd, struct bfd_link_info *info)
/* Update all .dynamic entries referencing .dynstr strings. */
for (extdyn = sdyn->contents;
- extdyn < sdyn->contents + sdyn->_raw_size;
+ extdyn < sdyn->contents + sdyn->size;
extdyn += bed->s->sizeof_dyn)
{
Elf_Internal_Dyn dyn;
@@ -2796,6 +3003,8 @@ elf_finalize_dynstr (bfd *output_bfd, struct bfd_link_info *info)
_bfd_elf_swap_verdef_in (output_bfd, (Elf_External_Verdef *) p,
&def);
p += sizeof (Elf_External_Verdef);
+ if (def.vd_aux != sizeof (Elf_External_Verdef))
+ continue;
for (i = 0; i < def.vd_cnt; ++i)
{
_bfd_elf_swap_verdaux_in (output_bfd,
@@ -2852,12 +3061,6 @@ elf_finalize_dynstr (bfd *output_bfd, struct bfd_link_info *info)
static bfd_boolean
elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
- bfd_boolean (*add_symbol_hook)
- (bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *);
- bfd_boolean (*check_relocs)
- (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
- bfd_boolean collect;
Elf_Internal_Shdr *hdr;
bfd_size_type symcount;
bfd_size_type extsymcount;
@@ -2874,14 +3077,20 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
Elf_Internal_Sym *isymend;
const struct elf_backend_data *bed;
bfd_boolean add_needed;
- struct elf_link_hash_table * hash_table;
+ struct elf_link_hash_table *htab;
bfd_size_type amt;
-
- hash_table = elf_hash_table (info);
-
+ void *alloc_mark = NULL;
+ void *old_tab = NULL;
+ void *old_hash;
+ void *old_ent;
+ struct bfd_link_hash_entry *old_undefs = NULL;
+ struct bfd_link_hash_entry *old_undefs_tail = NULL;
+ long old_dynsymcount = 0;
+ size_t tabsize = 0;
+ size_t hashsize = 0;
+
+ htab = elf_hash_table (info);
bed = get_elf_backend_data (abfd);
- add_symbol_hook = bed->elf_add_symbol_hook;
- collect = bed->collect;
if ((abfd->flags & DYNAMIC) == 0)
dynamic = FALSE;
@@ -2893,10 +3102,13 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
hope of using a dynamic object which does not exactly match
the format of the output file. */
if (info->relocatable
- || !is_elf_hash_table (hash_table)
- || hash_table->root.creator != abfd->xvec)
+ || !is_elf_hash_table (htab)
+ || htab->root.creator != abfd->xvec)
{
- bfd_set_error (bfd_error_invalid_operation);
+ if (info->relocatable)
+ bfd_set_error (bfd_error_invalid_operation);
+ else
+ bfd_set_error (bfd_error_wrong_format);
goto error_return;
}
}
@@ -2918,8 +3130,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
char *msg;
bfd_size_type sz;
- bfd_size_type prefix_len;
- const char * gnu_warning_prefix = _("warning: ");
name += sizeof ".gnu.warning." - 1;
@@ -2936,8 +3146,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
struct elf_link_hash_entry *h;
- h = elf_link_hash_lookup (hash_table, name,
- FALSE, FALSE, TRUE);
+ h = elf_link_hash_lookup (htab, name, FALSE, FALSE, TRUE);
/* FIXME: What about bfd_link_hash_common? */
if (h != NULL
@@ -2947,35 +3156,35 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
/* We don't want to issue this warning. Clobber
the section size so that the warning does not
get copied into the output file. */
- s->_raw_size = 0;
- s->_cooked_size = 0;
+ s->size = 0;
continue;
}
}
- sz = bfd_section_size (abfd, s);
- prefix_len = strlen (gnu_warning_prefix);
- msg = bfd_alloc (abfd, prefix_len + sz + 1);
+ sz = s->size;
+ msg = bfd_alloc (abfd, sz + 1);
if (msg == NULL)
goto error_return;
- strcpy (msg, gnu_warning_prefix);
- if (! bfd_get_section_contents (abfd, s, msg + prefix_len, 0, sz))
+ if (! bfd_get_section_contents (abfd, s, msg, 0, sz))
goto error_return;
- msg[prefix_len + sz] = '\0';
+ msg[sz] = '\0';
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name, BSF_WARNING, s, 0, msg,
- FALSE, collect, NULL)))
+ FALSE, bed->collect, NULL)))
goto error_return;
if (! info->relocatable)
{
/* Clobber the section size so that the warning does
not get copied into the output file. */
- s->_raw_size = 0;
- s->_cooked_size = 0;
+ 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;
}
}
}
@@ -2990,15 +3199,15 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
format. FIXME: If there are no input BFD's of the same
format as the output, we can't make a shared library. */
if (info->shared
- && is_elf_hash_table (hash_table)
- && hash_table->root.creator == abfd->xvec
- && ! hash_table->dynamic_sections_created)
+ && is_elf_hash_table (htab)
+ && htab->root.creator == abfd->xvec
+ && !htab->dynamic_sections_created)
{
if (! _bfd_elf_link_create_dynamic_sections (abfd, info))
goto error_return;
}
}
- else if (!is_elf_hash_table (hash_table))
+ else if (!is_elf_hash_table (htab))
goto error_return;
else
{
@@ -3008,17 +3217,21 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
int ret;
/* ld --just-symbols and dynamic objects don't mix very well.
- Test for --just-symbols by looking at info set up by
- _bfd_elf_link_just_syms. */
+ ld shouldn't allow it. */
if ((s = abfd->sections) != NULL
&& s->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
- goto error_return;
+ abort ();
/* If this dynamic lib was specified on the command line with
--as-needed in effect, then we don't want to add a DT_NEEDED
tag unless the lib is actually used. Similary for libs brought
- in by another lib's DT_NEEDED. */
- add_needed = elf_dyn_lib_class (abfd) == DYN_NORMAL;
+ in by another lib's DT_NEEDED. When --no-add-needed is used
+ on a dynamic lib, we don't want to add a DT_NEEDED entry for
+ any dynamic library in DT_NEEDED tags in the dynamic lib at
+ all. */
+ add_needed = (elf_dyn_lib_class (abfd)
+ & (DYN_AS_NEEDED | DYN_DT_NEEDED
+ | DYN_NO_NEEDED)) == 0;
s = bfd_get_section_by_name (abfd, ".dynamic");
if (s != NULL)
@@ -3028,11 +3241,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
int elfsec;
unsigned long shlink;
- dynbuf = bfd_malloc (s->_raw_size);
- if (dynbuf == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, s, dynbuf, 0, s->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, s, &dynbuf))
goto error_free_dyn;
elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
@@ -3041,7 +3250,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
shlink = elf_elfsections (abfd)[elfsec]->sh_link;
for (extdyn = dynbuf;
- extdyn < dynbuf + s->_raw_size;
+ extdyn < dynbuf + s->size;
extdyn += bed->s->sizeof_dyn)
{
Elf_Internal_Dyn dyn;
@@ -3073,9 +3282,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
n->name = anm;
n->by = abfd;
n->next = NULL;
- for (pn = & hash_table->needed;
- *pn != NULL;
- pn = &(*pn)->next)
+ for (pn = &htab->needed; *pn != NULL; pn = &(*pn)->next)
;
*pn = n;
}
@@ -3147,9 +3354,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (rpath)
{
struct bfd_link_needed_list **pn;
- for (pn = & hash_table->runpath;
- *pn != NULL;
- pn = &(*pn)->next)
+ for (pn = &htab->runpath; *pn != NULL; pn = &(*pn)->next)
;
*pn = rpath;
}
@@ -3163,11 +3368,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
file. */
bfd_section_list_clear (abfd);
- /* If this is the first dynamic object found in the link, create
- the special sections required for dynamic linking. */
- if (! _bfd_elf_link_create_dynamic_sections (abfd, info))
- goto error_return;
-
/* Find the name to use in a DT_NEEDED entry that refers to this
object. If the object has a DT_SONAME entry, we use it.
Otherwise, if the generic linker stuck something in
@@ -3184,7 +3384,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
will need to know it. */
elf_dt_name (abfd) = soname;
- ret = elf_add_dt_needed_tag (info, soname, add_needed);
+ ret = elf_add_dt_needed_tag (abfd, info, soname, add_needed);
if (ret < 0)
goto error_return;
@@ -3241,7 +3441,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (dynamic)
{
/* Read in any version definitions. */
- if (! _bfd_elf_slurp_version_tables (abfd))
+ if (!_bfd_elf_slurp_version_tables (abfd,
+ info->default_imported_symver))
goto error_free_sym;
/* Read in the symbol versions, but don't bother to convert them
@@ -3261,8 +3462,77 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
}
}
- weaks = NULL;
+ /* If we are loading an as-needed shared lib, save the symbol table
+ state before we start adding symbols. If the lib turns out
+ to be unneeded, restore the state. */
+ if ((elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0)
+ {
+ unsigned int i;
+ size_t entsize;
+
+ for (entsize = 0, i = 0; i < htab->root.table.size; i++)
+ {
+ struct bfd_hash_entry *p;
+ struct elf_link_hash_entry *h;
+
+ for (p = htab->root.table.table[i]; p != NULL; p = p->next)
+ {
+ h = (struct elf_link_hash_entry *) p;
+ entsize += htab->root.table.entsize;
+ if (h->root.type == bfd_link_hash_warning)
+ entsize += htab->root.table.entsize;
+ }
+ }
+
+ tabsize = htab->root.table.size * sizeof (struct bfd_hash_entry *);
+ hashsize = extsymcount * sizeof (struct elf_link_hash_entry *);
+ old_tab = bfd_malloc (tabsize + entsize + hashsize);
+ if (old_tab == NULL)
+ goto error_free_vers;
+
+ /* Remember the current objalloc pointer, so that all mem for
+ symbols added can later be reclaimed. */
+ alloc_mark = bfd_hash_allocate (&htab->root.table, 1);
+ if (alloc_mark == NULL)
+ goto error_free_vers;
+
+ /* Make a special call to the linker "notice" function to
+ tell it that we are about to handle an as-needed lib. */
+ if (!(*info->callbacks->notice) (info, NULL, abfd, NULL,
+ notice_as_needed))
+ return FALSE;
+
+
+ /* Clone the symbol table and sym hashes. Remember some
+ pointers into the symbol table, and dynamic symbol count. */
+ old_hash = (char *) old_tab + tabsize;
+ old_ent = (char *) old_hash + hashsize;
+ memcpy (old_tab, htab->root.table.table, tabsize);
+ memcpy (old_hash, sym_hash, hashsize);
+ old_undefs = htab->root.undefs;
+ old_undefs_tail = htab->root.undefs_tail;
+ old_dynsymcount = htab->dynsymcount;
+
+ for (i = 0; i < htab->root.table.size; i++)
+ {
+ struct bfd_hash_entry *p;
+ struct elf_link_hash_entry *h;
+
+ for (p = htab->root.table.table[i]; p != NULL; p = p->next)
+ {
+ memcpy (old_ent, p, htab->root.table.entsize);
+ old_ent = (char *) old_ent + htab->root.table.entsize;
+ h = (struct elf_link_hash_entry *) p;
+ if (h->root.type == bfd_link_hash_warning)
+ {
+ memcpy (old_ent, h->root.u.i.link, htab->root.table.entsize);
+ old_ent = (char *) old_ent + htab->root.table.entsize;
+ }
+ }
+ }
+ }
+ weaks = NULL;
ever = extversym != NULL ? extversym + extsymoff : NULL;
for (isym = isymbuf, isymend = isymbuf + extsymcount;
isym < isymend;
@@ -3270,7 +3540,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
int bind;
bfd_vma value;
- asection *sec;
+ asection *sec, *new_sec;
flagword flags;
const char *name;
struct elf_link_hash_entry *h;
@@ -3279,6 +3549,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
bfd_boolean type_change_ok;
bfd_boolean new_weakdef;
bfd_boolean override;
+ bfd_boolean common;
unsigned int old_alignment;
bfd *old_bfd;
@@ -3288,6 +3559,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
sec = NULL;
value = isym->st_value;
*sym_hash = NULL;
+ common = bed->common_definition (isym);
bind = ELF_ST_BIND (isym->st_info);
if (bind == STB_LOCAL)
@@ -3300,8 +3572,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
}
else if (bind == STB_GLOBAL)
{
- if (isym->st_shndx != SHN_UNDEF
- && isym->st_shndx != SHN_COMMON)
+ if (isym->st_shndx != SHN_UNDEF && !common)
flags = BSF_GLOBAL;
}
else if (bind == STB_WEAK)
@@ -3313,11 +3584,21 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (isym->st_shndx == SHN_UNDEF)
sec = bfd_und_section_ptr;
- else if (isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE)
+ else if (isym->st_shndx < SHN_LORESERVE
+ || isym->st_shndx > SHN_HIRESERVE)
{
sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
if (sec == NULL)
sec = bfd_abs_section_ptr;
+ else if (sec->kept_section)
+ {
+ /* Symbols from discarded section are undefined, and have
+ default 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;
}
@@ -3347,20 +3628,20 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (tcomm == NULL)
{
- tcomm = bfd_make_section (abfd, ".tcommon");
- if (tcomm == NULL
- || !bfd_set_section_flags (abfd, tcomm, (SEC_ALLOC
- | SEC_IS_COMMON
- | SEC_LINKER_CREATED
- | SEC_THREAD_LOCAL)))
+ tcomm = bfd_make_section_with_flags (abfd, ".tcommon",
+ (SEC_ALLOC
+ | SEC_IS_COMMON
+ | SEC_LINKER_CREATED
+ | SEC_THREAD_LOCAL));
+ if (tcomm == NULL)
goto error_free_vers;
}
sec = tcomm;
}
- else if (add_symbol_hook)
+ else if (bed->elf_add_symbol_hook)
{
- if (! (*add_symbol_hook) (abfd, info, isym, &name, &flags, &sec,
- &value))
+ if (! (*bed->elf_add_symbol_hook) (abfd, info, isym, &name, &flags,
+ &sec, &value))
goto error_free_vers;
/* The hook function sets the name to NULL if this symbol
@@ -3383,112 +3664,125 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
definition = TRUE;
size_change_ok = FALSE;
- type_change_ok = get_elf_backend_data (abfd)->type_change_ok;
+ type_change_ok = bed->type_change_ok;
old_alignment = 0;
old_bfd = NULL;
+ new_sec = sec;
- if (is_elf_hash_table (hash_table))
+ if (is_elf_hash_table (htab))
{
Elf_Internal_Versym iver;
unsigned int vernum = 0;
bfd_boolean skip;
- if (ever != NULL)
+ if (ever == NULL)
+ {
+ if (info->default_imported_symver)
+ /* Use the default symbol version created earlier. */
+ iver.vs_vers = elf_tdata (abfd)->cverdefs;
+ else
+ iver.vs_vers = 0;
+ }
+ else
+ _bfd_elf_swap_versym_in (abfd, ever, &iver);
+
+ vernum = iver.vs_vers & VERSYM_VERSION;
+
+ /* If this is a hidden symbol, or if it is not version
+ 1, we append the version name to the symbol name.
+ However, we do not modify a non-hidden absolute symbol
+ 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)))
{
- _bfd_elf_swap_versym_in (abfd, ever, &iver);
- vernum = iver.vs_vers & VERSYM_VERSION;
-
- /* If this is a hidden symbol, or if it is not version
- 1, we append the version name to the symbol name.
- However, we do not modify a non-hidden absolute
- symbol, 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)))
+ const char *verstr;
+ size_t namelen, verlen, newlen;
+ char *newname, *p;
+
+ if (isym->st_shndx != SHN_UNDEF)
{
- const char *verstr;
- size_t namelen, verlen, newlen;
- char *newname, *p;
+ if (vernum > elf_tdata (abfd)->cverdefs)
+ verstr = NULL;
+ else if (vernum > 1)
+ verstr =
+ elf_tdata (abfd)->verdef[vernum - 1].vd_nodename;
+ else
+ verstr = "";
- if (isym->st_shndx != SHN_UNDEF)
+ if (verstr == NULL)
{
- if (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info)
- {
- (*_bfd_error_handler)
- (_("%s: %s: invalid version %u (max %d)"),
- bfd_archive_filename (abfd), name, vernum,
- elf_tdata (abfd)->dynverdef_hdr.sh_info);
- bfd_set_error (bfd_error_bad_value);
- goto error_free_vers;
- }
- else if (vernum > 1)
- verstr =
- elf_tdata (abfd)->verdef[vernum - 1].vd_nodename;
- else
- verstr = "";
+ (*_bfd_error_handler)
+ (_("%B: %s: invalid version %u (max %d)"),
+ abfd, name, vernum,
+ elf_tdata (abfd)->cverdefs);
+ bfd_set_error (bfd_error_bad_value);
+ goto error_free_vers;
}
- else
+ }
+ else
+ {
+ /* We cannot simply test for the number of
+ entries in the VERNEED section since the
+ numbers for the needed versions do not start
+ at 0. */
+ Elf_Internal_Verneed *t;
+
+ verstr = NULL;
+ for (t = elf_tdata (abfd)->verref;
+ t != NULL;
+ t = t->vn_nextref)
{
- /* We cannot simply test for the number of
- entries in the VERNEED section since the
- numbers for the needed versions do not start
- at 0. */
- Elf_Internal_Verneed *t;
-
- verstr = NULL;
- for (t = elf_tdata (abfd)->verref;
- t != NULL;
- t = t->vn_nextref)
- {
- Elf_Internal_Vernaux *a;
+ Elf_Internal_Vernaux *a;
- for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
+ for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
+ {
+ if (a->vna_other == vernum)
{
- if (a->vna_other == vernum)
- {
- verstr = a->vna_nodename;
- break;
- }
+ verstr = a->vna_nodename;
+ break;
}
- if (a != NULL)
- break;
- }
- if (verstr == NULL)
- {
- (*_bfd_error_handler)
- (_("%s: %s: invalid needed version %d"),
- bfd_archive_filename (abfd), name, vernum);
- bfd_set_error (bfd_error_bad_value);
- goto error_free_vers;
}
+ if (a != NULL)
+ break;
+ }
+ if (verstr == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%B: %s: invalid needed version %d"),
+ abfd, name, vernum);
+ bfd_set_error (bfd_error_bad_value);
+ goto error_free_vers;
}
+ }
- namelen = strlen (name);
- verlen = strlen (verstr);
- newlen = namelen + verlen + 2;
- if ((iver.vs_vers & VERSYM_HIDDEN) == 0
- && isym->st_shndx != SHN_UNDEF)
- ++newlen;
+ namelen = strlen (name);
+ verlen = strlen (verstr);
+ newlen = namelen + verlen + 2;
+ if ((iver.vs_vers & VERSYM_HIDDEN) == 0
+ && isym->st_shndx != SHN_UNDEF)
+ ++newlen;
- newname = bfd_alloc (abfd, newlen);
- if (newname == NULL)
- goto error_free_vers;
- memcpy (newname, name, namelen);
- p = newname + namelen;
- *p++ = ELF_VER_CHR;
- /* If this is a defined non-hidden version symbol,
- we add another @ to the name. This indicates the
- default version of the symbol. */
- if ((iver.vs_vers & VERSYM_HIDDEN) == 0
- && isym->st_shndx != SHN_UNDEF)
- *p++ = ELF_VER_CHR;
- memcpy (p, verstr, verlen + 1);
+ newname = bfd_hash_allocate (&htab->root.table, newlen);
+ if (newname == NULL)
+ goto error_free_vers;
+ memcpy (newname, name, namelen);
+ p = newname + namelen;
+ *p++ = ELF_VER_CHR;
+ /* If this is a defined non-hidden version symbol,
+ we add another @ to the name. This indicates the
+ default version of the symbol. */
+ if ((iver.vs_vers & VERSYM_HIDDEN) == 0
+ && isym->st_shndx != SHN_UNDEF)
+ *p++ = ELF_VER_CHR;
+ memcpy (p, verstr, verlen + 1);
- name = newname;
- }
+ name = newname;
}
- if (!_bfd_elf_merge_symbol (abfd, info, name, isym, &sec, &value,
+ if (!_bfd_elf_merge_symbol (abfd, info, name, isym, &sec,
+ &value, &old_alignment,
sym_hash, &skip, &override,
&type_change_ok, &size_change_ok))
goto error_free_vers;
@@ -3534,7 +3828,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
}
if (! (_bfd_generic_link_add_one_symbol
- (info, abfd, name, flags, sec, value, NULL, FALSE, collect,
+ (info, abfd, name, flags, sec, value, NULL, FALSE, bed->collect,
(struct bfd_link_hash_entry **) sym_hash)))
goto error_free_vers;
@@ -3549,8 +3843,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
&& definition
&& (flags & BSF_WEAK) != 0
&& ELF_ST_TYPE (isym->st_info) != STT_FUNC
- && is_elf_hash_table (hash_table)
- && h->weakdef == NULL)
+ && is_elf_hash_table (htab)
+ && h->u.weakdef == NULL)
{
/* Keep a list of all weak defined non function symbols from
a dynamic object, using the weakdef field. Later in this
@@ -3564,18 +3858,25 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
dynamic object, and we will be using that previous
definition anyhow. */
- h->weakdef = weaks;
+ h->u.weakdef = weaks;
weaks = h;
new_weakdef = TRUE;
}
/* Set the alignment of a common symbol. */
- if (isym->st_shndx == SHN_COMMON
+ if ((common || bfd_is_com_section (sec))
&& h->root.type == bfd_link_hash_common)
{
unsigned int align;
- align = bfd_log2 (isym->st_value);
+ if (common)
+ align = bfd_log2 (isym->st_value);
+ else
+ {
+ /* The new symbol is a common symbol in a shared object.
+ We need to get the alignment from the section. */
+ align = new_sec->alignment_power;
+ }
if (align > old_alignment
/* Permit an alignment power of zero if an alignment of one
is specified and no other alignments have been specified. */
@@ -3585,18 +3886,16 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
h->root.u.c.p->alignment_power = old_alignment;
}
- if (is_elf_hash_table (hash_table))
+ if (is_elf_hash_table (htab))
{
- int old_flags;
bfd_boolean dynsym;
- int new_flag;
/* Check the alignment when a common symbol is involved. This
can change when a common symbol is overridden by a normal
definition or a common symbol is ignored due to the old
normal definition. We need to make sure the maximum
alignment is maintained. */
- if ((old_alignment || isym->st_shndx == SHN_COMMON)
+ if ((old_alignment || common)
&& h->root.type != bfd_link_hash_common)
{
unsigned int common_align;
@@ -3631,12 +3930,10 @@ 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 %s is smaller than %u in %s"),
- 1 << normal_align,
- name,
- bfd_archive_filename (normal_bfd),
- 1 << common_align,
- bfd_archive_filename (common_bfd));
+ (_("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. */
@@ -3645,11 +3942,11 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
if (h->size != 0 && h->size != isym->st_size && ! size_change_ok)
(*_bfd_error_handler)
- (_("Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"),
+ (_("Warning: size of symbol `%s' changed"
+ " from %lu in %B to %lu in %B"),
+ old_bfd, abfd,
name, (unsigned long) h->size,
- bfd_archive_filename (old_bfd),
- (unsigned long) isym->st_size,
- bfd_archive_filename (abfd));
+ (unsigned long) isym->st_size);
h->size = isym->st_size;
}
@@ -3669,9 +3966,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
&& h->type != ELF_ST_TYPE (isym->st_info)
&& ! type_change_ok)
(*_bfd_error_handler)
- (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
- name, h->type, ELF_ST_TYPE (isym->st_info),
- bfd_archive_filename (abfd));
+ (_("Warning: type of symbol `%s' changed"
+ " from %d to %d in %B"),
+ abfd, name, h->type, ELF_ST_TYPE (isym->st_info));
h->type = ELF_ST_TYPE (isym->st_info);
}
@@ -3683,6 +3980,15 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
(*bed->elf_backend_merge_symbol_attribute) (h, isym, definition,
dynamic);
+ /* If this symbol has default visibility and the user has requested
+ we not re-export it, then mark it as hidden. */
+ if (definition && !dynamic
+ && (abfd->no_export
+ || (abfd->my_archive && abfd->my_archive->no_export))
+ && ELF_ST_VISIBILITY (isym->st_other) != STV_INTERNAL)
+ isym->st_other = (STV_HIDDEN
+ | (isym->st_other & ~ELF_ST_VISIBILITY (-1)));
+
if (isym->st_other != 0 && !dynamic)
{
unsigned char hvis, symvis, other, nvis;
@@ -3709,39 +4015,36 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
the number of dynamic symbols we find. A dynamic symbol
is one which is referenced or defined by both a regular
object and a shared object. */
- old_flags = h->elf_link_hash_flags;
dynsym = FALSE;
if (! dynamic)
{
if (! definition)
{
- new_flag = ELF_LINK_HASH_REF_REGULAR;
+ h->ref_regular = 1;
if (bind != STB_WEAK)
- new_flag |= ELF_LINK_HASH_REF_REGULAR_NONWEAK;
+ h->ref_regular_nonweak = 1;
}
else
- new_flag = ELF_LINK_HASH_DEF_REGULAR;
+ h->def_regular = 1;
if (! info->executable
- || (old_flags & (ELF_LINK_HASH_DEF_DYNAMIC
- | ELF_LINK_HASH_REF_DYNAMIC)) != 0)
+ || h->def_dynamic
+ || h->ref_dynamic)
dynsym = TRUE;
}
else
{
if (! definition)
- new_flag = ELF_LINK_HASH_REF_DYNAMIC;
+ h->ref_dynamic = 1;
else
- new_flag = ELF_LINK_HASH_DEF_DYNAMIC;
- if ((old_flags & (ELF_LINK_HASH_DEF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR)) != 0
- || (h->weakdef != NULL
+ h->def_dynamic = 1;
+ if (h->def_regular
+ || h->ref_regular
+ || (h->u.weakdef != NULL
&& ! new_weakdef
- && h->weakdef->dynindx != -1))
+ && h->u.weakdef->dynindx != -1))
dynsym = TRUE;
}
- h->elf_link_hash_flags |= new_flag;
-
/* Check to see if we need to add an indirect symbol for
the default name. */
if (definition || h->root.type == bfd_link_hash_common)
@@ -3757,13 +4060,13 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
/* Queue non-default versions so that .symver x, x@FOO
aliases can be checked. */
- if (! nondeflt_vers)
+ if (!nondeflt_vers)
{
- amt = (isymend - isym + 1)
- * sizeof (struct elf_link_hash_entry *);
+ amt = ((isymend - isym + 1)
+ * sizeof (struct elf_link_hash_entry *));
nondeflt_vers = bfd_malloc (amt);
}
- nondeflt_vers [nondeflt_vers_cnt++] = h;
+ nondeflt_vers[nondeflt_vers_cnt++] = h;
}
}
@@ -3771,11 +4074,11 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
goto error_free_vers;
- if (h->weakdef != NULL
+ if (h->u.weakdef != NULL
&& ! new_weakdef
- && h->weakdef->dynindx == -1)
+ && h->u.weakdef->dynindx == -1)
{
- if (! bfd_elf_link_record_dynamic_symbol (info, h->weakdef))
+ if (!bfd_elf_link_record_dynamic_symbol (info, h->u.weakdef))
goto error_free_vers;
}
}
@@ -3795,17 +4098,28 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (!add_needed
&& definition
&& dynsym
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0)
+ && h->ref_regular)
{
int ret;
const char *soname = elf_dt_name (abfd);
/* A symbol from a library loaded via DT_NEEDED of some
other library is referenced by a regular object.
- Add a DT_NEEDED entry for it. */
+ Add a DT_NEEDED entry for it. Issue an error if
+ --no-add-needed is used. */
+ if ((elf_dyn_lib_class (abfd) & DYN_NO_NEEDED) != 0)
+ {
+ (*_bfd_error_handler)
+ (_("%s: invalid DSO for symbol `%s' definition"),
+ abfd, name);
+ bfd_set_error (bfd_error_bad_value);
+ goto error_free_vers;
+ }
+
+ elf_dyn_lib_class (abfd) &= ~DYN_AS_NEEDED;
+
add_needed = TRUE;
- ret = elf_add_dt_needed_tag (info, soname, add_needed);
+ ret = elf_add_dt_needed_tag (abfd, info, soname, add_needed);
if (ret < 0)
goto error_free_vers;
@@ -3814,6 +4128,77 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
}
}
+ if (extversym != NULL)
+ {
+ free (extversym);
+ extversym = NULL;
+ }
+
+ if (isymbuf != NULL)
+ {
+ free (isymbuf);
+ isymbuf = NULL;
+ }
+
+ if ((elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0)
+ {
+ unsigned int i;
+
+ /* Restore the symbol table. */
+ old_hash = (char *) old_tab + tabsize;
+ old_ent = (char *) old_hash + hashsize;
+ sym_hash = elf_sym_hashes (abfd);
+ memcpy (htab->root.table.table, old_tab, tabsize);
+ memcpy (sym_hash, old_hash, hashsize);
+ htab->root.undefs = old_undefs;
+ htab->root.undefs_tail = old_undefs_tail;
+ for (i = 0; i < htab->root.table.size; i++)
+ {
+ struct bfd_hash_entry *p;
+ struct elf_link_hash_entry *h;
+
+ for (p = htab->root.table.table[i]; p != NULL; p = p->next)
+ {
+ h = (struct elf_link_hash_entry *) p;
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ if (h->dynindx >= old_dynsymcount)
+ _bfd_elf_strtab_delref (htab->dynstr, h->dynstr_index);
+
+ memcpy (p, old_ent, htab->root.table.entsize);
+ old_ent = (char *) old_ent + htab->root.table.entsize;
+ h = (struct elf_link_hash_entry *) p;
+ if (h->root.type == bfd_link_hash_warning)
+ {
+ memcpy (h->root.u.i.link, old_ent, htab->root.table.entsize);
+ old_ent = (char *) old_ent + htab->root.table.entsize;
+ }
+ }
+ }
+
+ /* Make a special call to the linker "notice" function to
+ tell it that symbols added for crefs may need to be removed. */
+ if (!(*info->callbacks->notice) (info, NULL, abfd, NULL,
+ notice_not_needed))
+ return FALSE;
+
+ free (old_tab);
+ objalloc_free_block ((struct objalloc *) htab->root.table.memory,
+ alloc_mark);
+ if (nondeflt_vers != NULL)
+ free (nondeflt_vers);
+ return TRUE;
+ }
+
+ if (old_tab != NULL)
+ {
+ if (!(*info->callbacks->notice) (info, NULL, abfd, NULL,
+ notice_needed))
+ return FALSE;
+ free (old_tab);
+ old_tab = NULL;
+ }
+
/* Now that all the symbols from this input file are created, handle
.symver foo, foo@BAR such that any relocs against foo become foo@BAR. */
if (nondeflt_vers != NULL)
@@ -3837,7 +4222,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
shortname[amt] = '\0';
hi = (struct elf_link_hash_entry *)
- bfd_link_hash_lookup (&hash_table->root, shortname,
+ bfd_link_hash_lookup (&htab->root, shortname,
FALSE, FALSE, FALSE);
if (hi != NULL
&& hi->root.type == h->root.type
@@ -3847,7 +4232,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
(*bed->elf_backend_hide_symbol) (info, hi, TRUE);
hi->root.type = bfd_link_hash_indirect;
hi->root.u.i.link = (struct bfd_link_hash_entry *) h;
- (*bed->elf_backend_copy_indirect_symbol) (bed, h, hi);
+ (*bed->elf_backend_copy_indirect_symbol) (info, h, hi);
sym_hash = elf_sym_hashes (abfd);
if (sym_hash)
for (symidx = 0; symidx < extsymcount; ++symidx)
@@ -3863,16 +4248,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
nondeflt_vers = NULL;
}
- if (extversym != NULL)
- {
- free (extversym);
- extversym = NULL;
- }
-
- if (isymbuf != NULL)
- free (isymbuf);
- isymbuf = NULL;
-
/* Now set the weakdefs field correctly for all the weak defined
symbols we found. The only way to do this is to search all the
symbols. Since we only need the information for non functions in
@@ -3931,8 +4306,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
size_t i, j, idx;
hlook = weaks;
- weaks = hlook->weakdef;
- hlook->weakdef = NULL;
+ weaks = hlook->u.weakdef;
+ hlook->u.weakdef = NULL;
BFD_ASSERT (hlook->root.type == bfd_link_hash_defined
|| hlook->root.type == bfd_link_hash_defweak
@@ -3983,7 +4358,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
break;
else if (h != hlook)
{
- hlook->weakdef = h;
+ hlook->u.weakdef = h;
/* If the weak definition is in the list of dynamic
symbols, make sure the real definition is put
@@ -4012,6 +4387,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
free (sorted_sym_hash);
}
+ if (bed->check_directives)
+ (*bed->check_directives) (abfd, info);
+
/* If this object is the same format as the output object, and it is
not a shared library, then let the backend look through the
relocs.
@@ -4029,11 +4407,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
I have no idea how to handle linking PIC code into a file of a
different format. It probably can't be done. */
- check_relocs = get_elf_backend_data (abfd)->check_relocs;
if (! dynamic
- && is_elf_hash_table (hash_table)
- && hash_table->root.creator == abfd->xvec
- && check_relocs != NULL)
+ && is_elf_hash_table (htab)
+ && htab->root.creator == abfd->xvec
+ && bed->check_relocs != NULL)
{
asection *o;
@@ -4054,7 +4431,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (internal_relocs == NULL)
goto error_return;
- ok = (*check_relocs) (abfd, info, o, internal_relocs);
+ ok = (*bed->check_relocs) (abfd, info, o, internal_relocs);
if (elf_section_data (o)->relocs != internal_relocs)
free (internal_relocs);
@@ -4068,7 +4445,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
of the .stab/.stabstr sections. */
if (! dynamic
&& ! info->traditional_format
- && is_elf_hash_table (hash_table)
+ && is_elf_hash_table (htab)
&& (info->strip != strip_all && info->strip != strip_debugger))
{
asection *stabstr;
@@ -4089,10 +4466,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
struct bfd_elf_section_data *secdata;
secdata = elf_section_data (stab);
- if (! _bfd_link_section_stabs (abfd,
- & hash_table->stab_info,
- stab, stabstr,
- &secdata->sec_info,
+ if (! _bfd_link_section_stabs (abfd, &htab->stab_info, stab,
+ stabstr, &secdata->sec_info,
&string_offset))
goto error_return;
if (secdata->sec_info)
@@ -4101,29 +4476,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
}
}
- if (! info->relocatable
- && ! dynamic
- && is_elf_hash_table (hash_table))
- {
- asection *s;
-
- for (s = abfd->sections; s != NULL; s = s->next)
- if ((s->flags & SEC_MERGE) != 0
- && !bfd_is_abs_section (s->output_section))
- {
- struct bfd_elf_section_data *secdata;
-
- secdata = elf_section_data (s);
- if (! _bfd_merge_section (abfd,
- & hash_table->merge_info,
- s, &secdata->sec_info))
- goto error_return;
- else if (secdata->sec_info)
- s->sec_info_type = ELF_INFO_TYPE_MERGE;
- }
- }
-
- if (is_elf_hash_table (hash_table))
+ if (is_elf_hash_table (htab) && add_needed)
{
/* Add this bfd to the loaded list. */
struct elf_link_loaded_list *n;
@@ -4132,13 +4485,15 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (n == NULL)
goto error_return;
n->abfd = abfd;
- n->next = hash_table->loaded;
- hash_table->loaded = n;
+ n->next = htab->loaded;
+ htab->loaded = n;
}
return TRUE;
error_free_vers:
+ if (old_tab != NULL)
+ free (old_tab);
if (nondeflt_vers != NULL)
free (nondeflt_vers);
if (extversym != NULL)
@@ -4150,6 +4505,55 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
return FALSE;
}
+/* Return the linker hash table entry of a symbol that might be
+ satisfied by an archive symbol. Return -1 on error. */
+
+struct elf_link_hash_entry *
+_bfd_elf_archive_symbol_lookup (bfd *abfd,
+ struct bfd_link_info *info,
+ const char *name)
+{
+ struct elf_link_hash_entry *h;
+ char *p, *copy;
+ size_t len, first;
+
+ h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE, FALSE);
+ if (h != NULL)
+ return h;
+
+ /* If this is a default version (the name contains @@), look up the
+ symbol again with only one `@' as well as without the version.
+ The effect is that references to the symbol with and without the
+ version will be matched by the default symbol in the archive. */
+
+ p = strchr (name, ELF_VER_CHR);
+ if (p == NULL || p[1] != ELF_VER_CHR)
+ return h;
+
+ /* First check with only one `@'. */
+ len = strlen (name);
+ copy = bfd_alloc (abfd, len);
+ if (copy == NULL)
+ return (struct elf_link_hash_entry *) 0 - 1;
+
+ first = p - name + 1;
+ memcpy (copy, name, first);
+ memcpy (copy + first, name + first + 1, len - first);
+
+ h = elf_link_hash_lookup (elf_hash_table (info), copy, FALSE, FALSE, FALSE);
+ if (h == NULL)
+ {
+ /* We also need to check references to the symbol without the
+ version. */
+ copy[first - 1] = '\0';
+ h = elf_link_hash_lookup (elf_hash_table (info), copy,
+ FALSE, FALSE, FALSE);
+ }
+
+ bfd_release (abfd, copy);
+ return h;
+}
+
/* Add symbols from an ELF archive file to the linker hash table. We
don't use _bfd_generic_link_add_archive_symbols because of a
problem which arises on UnixWare. The UnixWare libc.so is an
@@ -4184,6 +4588,9 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
carsym *symdefs;
bfd_boolean loop;
bfd_size_type amt;
+ const struct elf_backend_data *bed;
+ struct elf_link_hash_entry * (*archive_symbol_lookup)
+ (bfd *, struct bfd_link_info *, const char *);
if (! bfd_has_map (abfd))
{
@@ -4208,6 +4615,8 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
goto error_return;
symdefs = bfd_ardata (abfd)->symdefs;
+ bed = get_elf_backend_data (abfd);
+ archive_symbol_lookup = bed->elf_backend_archive_symbol_lookup;
do
{
@@ -4236,48 +4645,9 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
continue;
}
- h = elf_link_hash_lookup (elf_hash_table (info), symdef->name,
- FALSE, FALSE, FALSE);
-
- if (h == NULL)
- {
- char *p, *copy;
- size_t len, first;
-
- /* If this is a default version (the name contains @@),
- look up the symbol again with only one `@' as well
- as without the version. The effect is that references
- to the symbol with and without the version will be
- matched by the default symbol in the archive. */
-
- p = strchr (symdef->name, ELF_VER_CHR);
- if (p == NULL || p[1] != ELF_VER_CHR)
- continue;
-
- /* First check with only one `@'. */
- len = strlen (symdef->name);
- copy = bfd_alloc (abfd, len);
- if (copy == NULL)
- goto error_return;
- first = p - symdef->name + 1;
- memcpy (copy, symdef->name, first);
- memcpy (copy + first, symdef->name + first + 1, len - first);
-
- h = elf_link_hash_lookup (elf_hash_table (info), copy,
- FALSE, FALSE, FALSE);
-
- if (h == NULL)
- {
- /* We also need to check references to the symbol
- without the version. */
-
- copy[first - 1] = '\0';
- h = elf_link_hash_lookup (elf_hash_table (info),
- copy, FALSE, FALSE, FALSE);
- }
-
- bfd_release (abfd, copy);
- }
+ h = archive_symbol_lookup (abfd, info, symdef->name);
+ if (h == (struct elf_link_hash_entry *) 0 - 1)
+ goto error_return;
if (h == NULL)
continue;
@@ -4429,7 +4799,7 @@ elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data)
/* And store it in the struct so that we can put it in the hash table
later. */
- h->elf_hash_value = ha;
+ h->u.elf_hash_value = ha;
if (alc != NULL)
free (alc);
@@ -4623,6 +4993,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
if (!is_elf_hash_table (info->hash))
return TRUE;
+ elf_tdata (output_bfd)->relro = info->relro;
if (info->execstack)
elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
else if (info->noexecstack)
@@ -4639,7 +5010,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
{
asection *s;
- if (inputobj->flags & DYNAMIC)
+ if (inputobj->flags & (DYNAMIC | BFD_LINKER_CREATED))
continue;
s = bfd_get_section_by_name (inputobj, ".note.GNU-stack");
if (s)
@@ -4662,7 +5033,10 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
/* Any syms created from now on start with -1 in
got.refcount/offset and plt.refcount/offset. */
- elf_hash_table (info)->init_refcount = elf_hash_table (info)->init_offset;
+ elf_hash_table (info)->init_got_refcount
+ = elf_hash_table (info)->init_got_offset;
+ elf_hash_table (info)->init_plt_refcount
+ = elf_hash_table (info)->init_plt_offset;
/* The backend may have to create some sections regardless of whether
we're dynamic or not. */
@@ -4688,6 +5062,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
asection *dynstr;
struct bfd_elf_version_tree *t;
struct bfd_elf_version_expr *d;
+ asection *s;
bfd_boolean all_defined;
*sinterpptr = bfd_get_section_by_name (dynobj, ".interp");
@@ -4813,8 +5188,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
/* Mark this version if there is a definition and it is
not defined in a shared object. */
if (newh != NULL
- && ((newh->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) == 0)
+ && !newh->def_dynamic
&& (newh->root.type == bfd_link_hash_defined
|| newh->root.type == bfd_link_hash_defweak))
d->symver = 1;
@@ -4862,7 +5236,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
return FALSE;
/* Add some entries to the .dynamic section. We fill in some of the
- values later, in elf_bfd_final_link, but we must add the entries
+ values later, in bfd_elf_final_link, but we must add the entries
now so that we know the final size of the .dynamic section. */
/* If there are initialization and/or finalization functions to
@@ -4873,8 +5247,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
FALSE, FALSE)
: NULL);
if (h != NULL
- && (h->elf_link_hash_flags & (ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_DEF_REGULAR)) != 0)
+ && (h->ref_regular
+ || h->def_regular))
{
if (!_bfd_elf_add_dynamic_entry (info, DT_INIT, 0))
return FALSE;
@@ -4885,14 +5259,15 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
FALSE, FALSE)
: NULL);
if (h != NULL
- && (h->elf_link_hash_flags & (ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_DEF_REGULAR)) != 0)
+ && (h->ref_regular
+ || h->def_regular))
{
if (!_bfd_elf_add_dynamic_entry (info, DT_FINI, 0))
return FALSE;
}
- if (bfd_get_section_by_name (output_bfd, ".preinit_array") != NULL)
+ s = bfd_get_section_by_name (output_bfd, ".preinit_array");
+ if (s != NULL && s->linker_has_input)
{
/* DT_PREINIT_ARRAY is not allowed in shared library. */
if (! info->executable)
@@ -4907,8 +5282,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
== SHT_PREINIT_ARRAY)
{
(*_bfd_error_handler)
- (_("%s: .preinit_array section is not allowed in DSO"),
- bfd_archive_filename (sub));
+ (_("%B: .preinit_array section is not allowed in DSO"),
+ sub);
break;
}
@@ -4920,13 +5295,15 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
|| !_bfd_elf_add_dynamic_entry (info, DT_PREINIT_ARRAYSZ, 0))
return FALSE;
}
- if (bfd_get_section_by_name (output_bfd, ".init_array") != NULL)
+ s = bfd_get_section_by_name (output_bfd, ".init_array");
+ if (s != NULL && s->linker_has_input)
{
if (!_bfd_elf_add_dynamic_entry (info, DT_INIT_ARRAY, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_INIT_ARRAYSZ, 0))
return FALSE;
}
- if (bfd_get_section_by_name (output_bfd, ".fini_array") != NULL)
+ s = bfd_get_section_by_name (output_bfd, ".fini_array");
+ if (s != NULL && s->linker_has_input)
{
if (!_bfd_elf_add_dynamic_entry (info, DT_FINI_ARRAY, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_FINI_ARRAYSZ, 0))
@@ -4961,11 +5338,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
if (elf_hash_table (info)->dynamic_sections_created)
{
- bfd_size_type dynsymcount;
+ unsigned long section_sym_count;
asection *s;
- size_t bucketcount = 0;
- size_t hash_entry_size;
- unsigned int dtagcount;
/* Set up the version definition section. */
s = bfd_get_section_by_name (dynobj, ".gnu.version_d");
@@ -4979,8 +5353,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
if (verdefs != NULL && verdefs->vernum == 0)
verdefs = verdefs->next;
- if (verdefs == NULL)
- _bfd_strip_section_from_output (info, s);
+ if (verdefs == NULL && !info->create_default_symver)
+ s->flags |= SEC_EXCLUDE;
else
{
unsigned int cdefs;
@@ -4989,6 +5363,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
bfd_byte *p;
Elf_Internal_Verdef def;
Elf_Internal_Verdaux defaux;
+ struct bfd_link_hash_entry *bh;
+ struct elf_link_hash_entry *h;
+ const char *name;
cdefs = 0;
size = 0;
@@ -4998,6 +5375,13 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
size += sizeof (Elf_External_Verdaux);
++cdefs;
+ /* Make space for the default version. */
+ if (info->create_default_symver)
+ {
+ size += sizeof (Elf_External_Verdef);
+ ++cdefs;
+ }
+
for (t = verdefs; t != NULL; t = t->next)
{
struct bfd_elf_version_deps *n;
@@ -5010,9 +5394,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
size += sizeof (Elf_External_Verdaux);
}
- s->_raw_size = size;
- s->contents = bfd_alloc (output_bfd, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->size = size;
+ s->contents = bfd_alloc (output_bfd, s->size);
+ if (s->contents == NULL && s->size != 0)
return FALSE;
/* Fill in the version definition section. */
@@ -5023,9 +5407,17 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
def.vd_flags = VER_FLG_BASE;
def.vd_ndx = 1;
def.vd_cnt = 1;
- def.vd_aux = sizeof (Elf_External_Verdef);
- def.vd_next = (sizeof (Elf_External_Verdef)
- + sizeof (Elf_External_Verdaux));
+ if (info->create_default_symver)
+ {
+ def.vd_aux = 2 * sizeof (Elf_External_Verdef);
+ def.vd_next = sizeof (Elf_External_Verdef);
+ }
+ else
+ {
+ def.vd_aux = sizeof (Elf_External_Verdef);
+ def.vd_next = (sizeof (Elf_External_Verdef)
+ + sizeof (Elf_External_Verdaux));
+ }
if (soname_indx != (bfd_size_type) -1)
{
@@ -5033,13 +5425,13 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
soname_indx);
def.vd_hash = bfd_elf_hash (soname);
defaux.vda_name = soname_indx;
+ name = soname;
}
else
{
- const char *name;
bfd_size_type indx;
- name = basename (output_bfd->filename);
+ name = lbasename (output_bfd->filename);
def.vd_hash = bfd_elf_hash (name);
indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
name, FALSE);
@@ -5052,6 +5444,38 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
_bfd_elf_swap_verdef_out (output_bfd, &def,
(Elf_External_Verdef *) p);
p += sizeof (Elf_External_Verdef);
+ if (info->create_default_symver)
+ {
+ /* Add a symbol representing this version. */
+ bh = NULL;
+ if (! (_bfd_generic_link_add_one_symbol
+ (info, dynobj, name, BSF_GLOBAL, bfd_abs_section_ptr,
+ 0, NULL, FALSE,
+ get_elf_backend_data (dynobj)->collect, &bh)))
+ return FALSE;
+ h = (struct elf_link_hash_entry *) bh;
+ h->non_elf = 0;
+ h->def_regular = 1;
+ h->type = STT_OBJECT;
+ h->verinfo.vertree = NULL;
+
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+
+ /* Create a duplicate of the base version with the same
+ aux block, but different flags. */
+ def.vd_flags = 0;
+ def.vd_ndx = 2;
+ def.vd_aux = sizeof (Elf_External_Verdef);
+ if (verdefs)
+ def.vd_next = (sizeof (Elf_External_Verdef)
+ + sizeof (Elf_External_Verdaux));
+ else
+ def.vd_next = 0;
+ _bfd_elf_swap_verdef_out (output_bfd, &def,
+ (Elf_External_Verdef *) p);
+ p += sizeof (Elf_External_Verdef);
+ }
_bfd_elf_swap_verdaux_out (output_bfd, &defaux,
(Elf_External_Verdaux *) p);
p += sizeof (Elf_External_Verdaux);
@@ -5060,8 +5484,6 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
{
unsigned int cdeps;
struct bfd_elf_version_deps *n;
- struct elf_link_hash_entry *h;
- struct bfd_link_hash_entry *bh;
cdeps = 0;
for (n = t->deps; n != NULL; n = n->next)
@@ -5075,8 +5497,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
get_elf_backend_data (dynobj)->collect, &bh)))
return FALSE;
h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags &= ~ ELF_LINK_NON_ELF;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->non_elf = 0;
+ h->def_regular = 1;
h->type = STT_OBJECT;
h->verinfo.vertree = t;
@@ -5089,7 +5511,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
&& t->locals.list == NULL
&& ! t->used)
def.vd_flags |= VER_FLG_WEAK;
- def.vd_ndx = t->vernum + 1;
+ def.vd_ndx = t->vernum + (info->create_default_symver ? 2 : 1);
def.vd_cnt = cdeps + 1;
def.vd_hash = bfd_elf_hash (t->name);
def.vd_aux = sizeof (Elf_External_Verdef);
@@ -5186,7 +5608,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
&sinfo);
if (elf_tdata (output_bfd)->verref == NULL)
- _bfd_strip_section_from_output (info, s);
+ s->flags |= SEC_EXCLUDE;
else
{
Elf_Internal_Verneed *t;
@@ -5209,8 +5631,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
size += sizeof (Elf_External_Vernaux);
}
- s->_raw_size = size;
- s->contents = bfd_alloc (output_bfd, s->_raw_size);
+ s->size = size;
+ s->contents = bfd_alloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
@@ -5232,7 +5654,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
elf_dt_name (t->vn_bfd) != NULL
? elf_dt_name (t->vn_bfd)
- : basename (t->vn_bfd->filename),
+ : lbasename (t->vn_bfd->filename),
FALSE);
if (indx == (bfd_size_type) -1)
return FALSE;
@@ -5275,28 +5697,53 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
}
}
+ if ((elf_tdata (output_bfd)->cverrefs == 0
+ && elf_tdata (output_bfd)->cverdefs == 0)
+ || _bfd_elf_link_renumber_dynsyms (output_bfd, info,
+ &section_sym_count) == 0)
+ {
+ s = bfd_get_section_by_name (dynobj, ".gnu.version");
+ s->flags |= SEC_EXCLUDE;
+ }
+ }
+ return TRUE;
+}
+
+bfd_boolean
+bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
+{
+ if (!is_elf_hash_table (info->hash))
+ return TRUE;
+
+ 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;
+
/* Assign dynsym indicies. In a shared library we generate a
section symbol for each output section, which come first.
Next come all of the back-end allocated local dynamic syms,
followed by the rest of the global symbols. */
- dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info);
+ dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info,
+ &section_sym_count);
/* Work out the size of the symbol version section. */
s = bfd_get_section_by_name (dynobj, ".gnu.version");
BFD_ASSERT (s != NULL);
- if (dynsymcount == 0
- || (verdefs == NULL && elf_tdata (output_bfd)->verref == NULL))
- {
- _bfd_strip_section_from_output (info, s);
- /* The DYNSYMCOUNT might have changed if we were going to
- output a dynamic symbol table entry for S. */
- dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info);
- }
- else
+ if (dynsymcount != 0
+ && (s->flags & SEC_EXCLUDE) == 0)
{
- s->_raw_size = dynsymcount * sizeof (Elf_External_Versym);
- s->contents = bfd_zalloc (output_bfd, s->_raw_size);
+ s->size = dynsymcount * sizeof (Elf_External_Versym);
+ s->contents = bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
@@ -5312,23 +5759,19 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
section as we went along in elf_link_add_object_symbols. */
s = bfd_get_section_by_name (dynobj, ".dynsym");
BFD_ASSERT (s != NULL);
- s->_raw_size = dynsymcount * bed->s->sizeof_sym;
- s->contents = bfd_alloc (output_bfd, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
- return FALSE;
+ bed = get_elf_backend_data (output_bfd);
+ s->size = dynsymcount * bed->s->sizeof_sym;
if (dynsymcount != 0)
{
- Elf_Internal_Sym isym;
+ s->contents = bfd_alloc (output_bfd, s->size);
+ if (s->contents == NULL)
+ return FALSE;
- /* The first entry in .dynsym is a dummy symbol. */
- isym.st_value = 0;
- isym.st_size = 0;
- isym.st_name = 0;
- isym.st_info = 0;
- isym.st_other = 0;
- isym.st_shndx = 0;
- bed->s->swap_symbol_out (output_bfd, &isym, s->contents, 0);
+ /* The first entry in .dynsym is a dummy symbol.
+ Clear all the section syms, in case we don't output them all. */
+ ++section_sym_count;
+ memset (s->contents, 0, section_sym_count * bed->s->sizeof_sym);
}
/* Compute the size of the hashing table. As a side effect this
@@ -5338,8 +5781,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
s = bfd_get_section_by_name (dynobj, ".hash");
BFD_ASSERT (s != NULL);
hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize;
- s->_raw_size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
- s->contents = bfd_zalloc (output_bfd, s->_raw_size);
+ s->size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
+ s->contents = bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
@@ -5354,7 +5797,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
elf_finalize_dynstr (output_bfd, info);
- s->_raw_size = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
+ s->size = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
for (dtagcount = 0; dtagcount <= info->spare_dynamic_tags; ++dtagcount)
if (!_bfd_elf_add_dynamic_entry (info, DT_NULL, 0))
@@ -5564,10 +6007,10 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
bfd_vma r_sym_mask;
reldyn = bfd_get_section_by_name (abfd, ".rela.dyn");
- if (reldyn == NULL || reldyn->_raw_size == 0)
+ if (reldyn == NULL || reldyn->size == 0)
{
reldyn = bfd_get_section_by_name (abfd, ".rel.dyn");
- if (reldyn == NULL || reldyn->_raw_size == 0)
+ if (reldyn == NULL || reldyn->size == 0)
return 0;
ext_size = bed->s->sizeof_rel;
swap_in = bed->s->swap_reloc_in;
@@ -5579,17 +6022,17 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
swap_in = bed->s->swap_reloca_in;
swap_out = bed->s->swap_reloca_out;
}
- count = reldyn->_raw_size / ext_size;
+ count = reldyn->size / ext_size;
size = 0;
- for (lo = reldyn->link_order_head; lo != NULL; lo = lo->next)
+ for (lo = reldyn->map_head.link_order; lo != NULL; lo = lo->next)
if (lo->type == bfd_indirect_link_order)
{
asection *o = lo->u.indirect.section;
- size += o->_raw_size;
+ size += o->size;
}
- if (size != reldyn->_raw_size)
+ if (size != reldyn->size)
return 0;
sort_elt = (sizeof (struct elf_link_sort_rela)
@@ -5607,14 +6050,22 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
else
r_sym_mask = ~(bfd_vma) 0xffffffff;
- for (lo = reldyn->link_order_head; lo != NULL; lo = lo->next)
+ for (lo = reldyn->map_head.link_order; lo != NULL; lo = lo->next)
if (lo->type == bfd_indirect_link_order)
{
bfd_byte *erel, *erelend;
asection *o = lo->u.indirect.section;
+ if (o->contents == NULL && o->size != 0)
+ {
+ /* This is a reloc section that is being handled as a normal
+ section. See bfd_section_from_shdr. We can't combine
+ relocs in this case. */
+ free (sort);
+ return 0;
+ }
erel = o->contents;
- erelend = o->contents + o->_raw_size;
+ erelend = o->contents + o->size;
p = sort + o->output_offset / ext_size * sort_elt;
while (erel < erelend)
{
@@ -5649,14 +6100,14 @@ 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->link_order_head; lo != NULL; lo = lo->next)
+ for (lo = reldyn->map_head.link_order; lo != NULL; lo = lo->next)
if (lo->type == bfd_indirect_link_order)
{
bfd_byte *erel, *erelend;
asection *o = lo->u.indirect.section;
erel = o->contents;
- erelend = o->contents + o->_raw_size;
+ erelend = o->contents + o->size;
p = sort + o->output_offset / ext_size * sort_elt;
while (erel < erelend)
{
@@ -5765,6 +6216,24 @@ elf_link_output_sym (struct elf_final_link_info *finfo,
return TRUE;
}
+/* Return TRUE if the dynamic symbol SYM in ABFD is supported. */
+
+static bfd_boolean
+check_dynsym (bfd *abfd, Elf_Internal_Sym *sym)
+{
+ if (sym->st_shndx > SHN_HIRESERVE)
+ {
+ /* The gABI doesn't support dynamic symbols in output sections
+ beyond 64k. */
+ (*_bfd_error_handler)
+ (_("%B: Too many sections: %d (>= %d)"),
+ abfd, bfd_count_sections (abfd), SHN_LORESERVE);
+ bfd_set_error (bfd_error_nonrepresentable_section);
+ return FALSE;
+ }
+ return TRUE;
+}
+
/* For DSOs loaded in via a DT_NEEDED entry, emulate ld.so in
allowing an unsatisfied unversioned symbol in the DSO to match a
versioned symbol that would normally require an explicit version.
@@ -5792,7 +6261,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info,
case bfd_link_hash_undefweak:
abfd = h->root.u.undef.abfd;
if ((abfd->flags & DYNAMIC) == 0
- || elf_dyn_lib_class (abfd) != DYN_DT_NEEDED)
+ || (elf_dyn_lib_class (abfd) & DYN_DT_NEEDED) == 0)
return FALSE;
break;
@@ -5940,33 +6409,43 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
/* Decide whether to output this symbol in this pass. */
if (eoinfo->localsyms)
{
- if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ if (!h->forced_local)
return TRUE;
}
else
{
- if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ if (h->forced_local)
return TRUE;
}
bed = get_elf_backend_data (finfo->output_bfd);
- /* If we have an undefined symbol reference here then it must have
- come from a shared library that is being linked in. (Undefined
- references in regular files have already been handled). If we
- are reporting errors for this situation then do so now. */
- if (h->root.type == bfd_link_hash_undefined
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
- && ! elf_link_check_versioned_symbol (finfo->info, bed, h)
- && finfo->info->unresolved_syms_in_shared_libs != RM_IGNORE)
+ if (h->root.type == bfd_link_hash_undefined)
{
- if (! ((*finfo->info->callbacks->undefined_symbol)
- (finfo->info, h->root.root.string, h->root.u.undef.abfd,
- NULL, 0, finfo->info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)))
+ /* If we have an undefined symbol reference here then it must have
+ come from a shared library that is being linked in. (Undefined
+ references in regular files have already been handled). */
+ bfd_boolean ignore_undef = FALSE;
+
+ /* Some symbols may be special in that the fact that they're
+ undefined can be safely ignored - let backend determine that. */
+ if (bed->elf_backend_ignore_undef_symbol)
+ ignore_undef = bed->elf_backend_ignore_undef_symbol (h);
+
+ /* If we are reporting errors for this situation then do so now. */
+ if (ignore_undef == FALSE
+ && h->ref_dynamic
+ && ! h->ref_regular
+ && ! elf_link_check_versioned_symbol (finfo->info, bed, h)
+ && finfo->info->unresolved_syms_in_shared_libs != RM_IGNORE)
{
- eoinfo->failed = TRUE;
- return FALSE;
+ if (! (finfo->info->callbacks->undefined_symbol
+ (finfo->info, h->root.root.string, h->root.u.undef.abfd,
+ NULL, 0, finfo->info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)))
+ {
+ eoinfo->failed = TRUE;
+ return FALSE;
+ }
}
}
@@ -5974,20 +6453,22 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
shared libraries. */
if (! finfo->info->relocatable
&& (! finfo->info->shared)
- && (h->elf_link_hash_flags
- & (ELF_LINK_FORCED_LOCAL | ELF_LINK_HASH_REF_DYNAMIC | ELF_LINK_DYNAMIC_DEF | ELF_LINK_DYNAMIC_WEAK))
- == (ELF_LINK_FORCED_LOCAL | ELF_LINK_HASH_REF_DYNAMIC)
+ && h->forced_local
+ && h->ref_dynamic
+ && !h->dynamic_def
+ && !h->dynamic_weak
&& ! elf_link_check_versioned_symbol (finfo->info, bed, h))
{
(*_bfd_error_handler)
- (_("%s: %s symbol `%s' in %s is referenced by DSO"),
- bfd_get_filename (finfo->output_bfd),
+ (_("%B: %s symbol `%s' in %B is referenced by DSO"),
+ finfo->output_bfd,
+ h->root.u.def.section == bfd_abs_section_ptr
+ ? finfo->output_bfd : h->root.u.def.section->owner,
ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
? "internal"
: ELF_ST_VISIBILITY (h->other) == STV_HIDDEN
- ? "hidden" : "local",
- h->root.root.string,
- bfd_archive_filename (h->root.u.def.section->owner));
+ ? "hidden" : "local",
+ h->root.root.string);
eoinfo->failed = TRUE;
return FALSE;
}
@@ -5998,10 +6479,11 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
output it. */
if (h->indx == -2)
strip = FALSE;
- else if (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- || (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
+ else if ((h->def_dynamic
+ || h->ref_dynamic
+ || h->root.type == bfd_link_hash_new)
+ && !h->def_regular
+ && !h->ref_regular)
strip = TRUE;
else if (finfo->info->strip == strip_all)
strip = TRUE;
@@ -6021,13 +6503,13 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
nothing else to do unless it is a forced local symbol. */
if (strip
&& h->dynindx == -1
- && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ && !h->forced_local)
return TRUE;
sym.st_value = 0;
sym.st_size = h->size;
sym.st_other = h->other;
- if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ if (h->forced_local)
sym.st_info = ELF_ST_INFO (STB_LOCAL, h->type);
else if (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_defweak)
@@ -6061,10 +6543,8 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
if (sym.st_shndx == SHN_BAD)
{
(*_bfd_error_handler)
- (_("%s: could not find output section %s for input section %s"),
- bfd_get_filename (finfo->output_bfd),
- input_sec->output_section->name,
- input_sec->name);
+ (_("%B: could not find output section %A for input section %A"),
+ finfo->output_bfd, input_sec->output_section, input_sec);
eoinfo->failed = TRUE;
return FALSE;
}
@@ -6097,7 +6577,7 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
case bfd_link_hash_common:
input_sec = h->root.u.c.p->section;
- sym.st_shndx = SHN_COMMON;
+ sym.st_shndx = bed->common_section_index (input_sec);
sym.st_value = 1 << h->root.u.c.p->alignment_power;
break;
@@ -6116,11 +6596,11 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
symbol. FIXME: Not calling elf_backend_finish_dynamic_symbol for
forced local syms when non-shared is due to a historical quirk. */
if ((h->dynindx != -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ || h->forced_local)
&& ((finfo->info->shared
&& (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ || !h->forced_local)
&& elf_hash_table (finfo->info)->dynamic_sections_created)
{
if (! ((*bed->elf_backend_finish_dynamic_symbol)
@@ -6138,13 +6618,13 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
because it might not be marked as undefined until the
finish_dynamic_symbol routine gets through with it. */
if (sym.st_shndx == SHN_UNDEF
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) != 0
+ && h->ref_regular
&& (ELF_ST_BIND (sym.st_info) == STB_GLOBAL
|| ELF_ST_BIND (sym.st_info) == STB_WEAK))
{
int bindtype;
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK) != 0)
+ if (h->ref_regular_nonweak)
bindtype = STB_GLOBAL;
else
bindtype = STB_WEAK;
@@ -6157,16 +6637,16 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
&& ELF_ST_VISIBILITY (sym.st_other) != STV_DEFAULT
&& ELF_ST_BIND (sym.st_info) != STB_WEAK
&& h->root.type == bfd_link_hash_undefined
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && !h->def_regular)
{
(*_bfd_error_handler)
- (_("%s: %s symbol `%s' isn't defined"),
- bfd_get_filename (finfo->output_bfd),
- ELF_ST_VISIBILITY (sym.st_other) == STV_PROTECTED
- ? "protected"
- : ELF_ST_VISIBILITY (sym.st_other) == STV_INTERNAL
- ? "internal" : "hidden",
- h->root.root.string);
+ (_("%B: %s symbol `%s' isn't defined"),
+ finfo->output_bfd,
+ ELF_ST_VISIBILITY (sym.st_other) == STV_PROTECTED
+ ? "protected"
+ : ELF_ST_VISIBILITY (sym.st_other) == STV_INTERNAL
+ ? "internal" : "hidden",
+ h->root.root.string);
eoinfo->failed = TRUE;
return FALSE;
}
@@ -6186,10 +6666,15 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
sym.st_name = h->dynstr_index;
esym = finfo->dynsym_sec->contents + h->dynindx * bed->s->sizeof_sym;
+ if (! check_dynsym (finfo->output_bfd, &sym))
+ {
+ eoinfo->failed = TRUE;
+ return FALSE;
+ }
bed->s->swap_symbol_out (finfo->output_bfd, &sym, esym, 0);
bucketcount = elf_hash_table (finfo->info)->bucketcount;
- bucket = h->elf_hash_value % 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
@@ -6205,7 +6690,7 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
Elf_Internal_Versym iversym;
Elf_External_Versym *eversym;
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
{
if (h->verinfo.verdef == NULL)
iversym.vs_vers = 0;
@@ -6218,9 +6703,11 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
iversym.vs_vers = 1;
else
iversym.vs_vers = h->verinfo.vertree->vernum + 1;
+ if (finfo->info->create_default_symver)
+ iversym.vs_vers++;
}
- if ((h->elf_link_hash_flags & ELF_LINK_HIDDEN) != 0)
+ if (h->hidden)
iversym.vs_vers |= VERSYM_HIDDEN;
eversym = (Elf_External_Versym *) finfo->symver_sec->contents;
@@ -6245,6 +6732,9 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
return TRUE;
}
+/* Return TRUE if special handling is done for relocs in SEC against
+ symbols defined in discarded sections. */
+
static bfd_boolean
elf_section_ignore_discarded_relocs (asection *sec)
{
@@ -6267,6 +6757,71 @@ elf_section_ignore_discarded_relocs (asection *sec)
return FALSE;
}
+/* Return a mask saying how ld should treat relocations in SEC against
+ symbols defined in discarded sections. If this function returns
+ COMPLAIN set, ld will issue a warning message. If this function
+ returns PRETEND set, and the discarded section was link-once and the
+ same size as the kept link-once section, ld will pretend that the
+ symbol was actually defined in the kept section. Otherwise ld will
+ zero the reloc (at least that is the intent, but some cooperation by
+ the target dependent code is needed, particularly for REL targets). */
+
+unsigned int
+_bfd_elf_default_action_discarded (asection *sec)
+{
+ if (sec->flags & SEC_DEBUGGING)
+ return PRETEND;
+
+ if (strcmp (".eh_frame", sec->name) == 0)
+ return 0;
+
+ if (strcmp (".gcc_except_table", sec->name) == 0)
+ return 0;
+
+ return COMPLAIN | PRETEND;
+}
+
+/* Find a match between a section and a member of a section group. */
+
+static asection *
+match_group_member (asection *sec, asection *group)
+{
+ asection *first = elf_next_in_group (group);
+ asection *s = first;
+
+ while (s != NULL)
+ {
+ if (bfd_elf_match_symbols_in_sections (s, sec))
+ return s;
+
+ s = elf_next_in_group (s);
+ if (s == first)
+ break;
+ }
+
+ return NULL;
+}
+
+/* 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. */
+
+asection *
+_bfd_elf_check_kept_section (asection *sec)
+{
+ asection *kept;
+
+ kept = sec->kept_section;
+ if (kept != NULL)
+ {
+ if (elf_sec_group (sec) != NULL)
+ kept = match_group_member (sec, kept);
+ if (kept != NULL && sec->size != kept->size)
+ kept = NULL;
+ }
+ return kept;
+}
+
/* Link an input file into the linker output file. This function
handles all the sections and relocations of the input file at once.
This is so that we only have to read the local symbols once, and
@@ -6303,8 +6858,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
return TRUE;
emit_relocs = (finfo->info->relocatable
- || finfo->info->emitrelocations
- || bed->elf_backend_emit_relocs);
+ || finfo->info->emitrelocations);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
if (elf_bad_symtab (input_bfd))
@@ -6365,7 +6919,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
isym->st_value =
_bfd_merged_section_offset (output_bfd, &isec,
elf_section_data (isec)->sec_info,
- isym->st_value, 0);
+ isym->st_value);
}
else if (isym->st_shndx == SHN_ABS)
isec = bfd_abs_section_ptr;
@@ -6373,8 +6927,10 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
isec = bfd_com_section_ptr;
else
{
- /* Who knows? */
- isec = NULL;
+ /* Don't attempt to output symbols with st_shnx in the
+ reserved range other than SHN_ABS and SHN_COMMON. */
+ *ppsection = NULL;
+ continue;
}
*ppsection = isec;
@@ -6405,15 +6961,12 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
continue;
/* If this symbol is defined in a section which we are
- discarding, we don't need to keep it, but note that
- linker_mark is only reliable for sections that have contents.
- For the benefit of the MIPS ELF linker, we check SEC_EXCLUDE
- as well as linker_mark. */
- if ((isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE)
- && isec != NULL
- && ((! isec->linker_mark && (isec->flags & SEC_HAS_CONTENTS) != 0)
- || (! finfo->info->relocatable
- && (isec->flags & SEC_EXCLUDE) != 0)))
+ discarding, we don't need to keep it. */
+ if (isym->st_shndx != SHN_UNDEF
+ && (isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE)
+ && (isec == NULL
+ || bfd_section_removed_from_list (output_bfd,
+ isec->output_section)))
continue;
/* Get the name of the symbol. */
@@ -6480,7 +7033,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
}
if ((o->flags & SEC_HAS_CONTENTS) == 0
- || (o->_raw_size == 0 && (o->flags & SEC_RELOC) == 0))
+ || (o->size == 0 && (o->flags & SEC_RELOC) == 0))
continue;
if ((o->flags & SEC_LINKER_CREATED) != 0)
@@ -6498,9 +7051,10 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
contents = elf_section_data (o)->this_hdr.contents;
else
{
+ bfd_size_type amt = o->rawsize ? o->rawsize : o->size;
+
contents = finfo->contents;
- if (! bfd_get_section_contents (input_bfd, o, contents, 0,
- o->_raw_size))
+ if (! bfd_get_section_contents (input_bfd, o, contents, 0, amt))
return FALSE;
}
@@ -6533,100 +7087,104 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
from discarded sections and section symbols from
removed link-once sections. Complain about relocs
against discarded sections. Zero relocs against removed
- link-once sections. Preserve debug information as much
- as we can. */
+ link-once sections. */
if (!elf_section_ignore_discarded_relocs (o))
{
Elf_Internal_Rela *rel, *relend;
+ unsigned int action = (*bed->action_discarded) (o);
rel = internal_relocs;
relend = rel + o->reloc_count * bed->s->int_rels_per_ext_rel;
for ( ; rel < relend; rel++)
{
unsigned long r_symndx = rel->r_info >> r_sym_shift;
- asection *sec;
+ asection **ps, *sec;
+ struct elf_link_hash_entry *h = NULL;
+ const char *sym_name;
+
+ if (r_symndx == STN_UNDEF)
+ continue;
if (r_symndx >= locsymcount
|| (elf_bad_symtab (input_bfd)
&& finfo->sections[r_symndx] == NULL))
{
- struct elf_link_hash_entry *h;
-
h = sym_hashes[r_symndx - extsymoff];
+
+ /* Badly formatted input files can contain relocs that
+ reference non-existant symbols. Check here so that
+ we do not seg fault. */
+ if (h == NULL)
+ {
+ char buffer [32];
+
+ sprintf_vma (buffer, rel->r_info);
+ (*_bfd_error_handler)
+ (_("error: %B contains a reloc (0x%s) for section %A "
+ "that references a non-existent global symbol"),
+ input_bfd, o, buffer);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- /* Complain if the definition comes from a
- discarded section. */
- sec = h->root.u.def.section;
- if ((h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && elf_discarded_section (sec))
- {
- if ((o->flags & SEC_DEBUGGING) != 0)
- {
- BFD_ASSERT (r_symndx != 0);
- /* Try to preserve debug information. */
- if ((o->flags & SEC_DEBUGGING) != 0
- && sec->kept_section != NULL
- && sec->_raw_size == sec->kept_section->_raw_size)
- h->root.u.def.section
- = sec->kept_section;
- else
- memset (rel, 0, sizeof (*rel));
- }
- else
- finfo->info->callbacks->error_handler
- (LD_DEFINITION_IN_DISCARDED_SECTION,
- _("%T: discarded in section `%s' from %s\n"),
- h->root.root.string,
- h->root.root.string,
- h->root.u.def.section->name,
- bfd_archive_filename (h->root.u.def.section->owner));
- }
+ if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ continue;
+
+ ps = &h->root.u.def.section;
+ sym_name = h->root.root.string;
}
else
{
- sec = finfo->sections[r_symndx];
+ Elf_Internal_Sym *sym = isymbuf + r_symndx;
+ ps = &finfo->sections[r_symndx];
+ sym_name = bfd_elf_sym_name (input_bfd,
+ symtab_hdr,
+ sym, *ps);
+ }
- if (sec != NULL && elf_discarded_section (sec))
+ /* Complain if the definition comes from a
+ discarded section. */
+ if ((sec = *ps) != NULL && elf_discarded_section (sec))
+ {
+ BFD_ASSERT (r_symndx != 0);
+ if (action & COMPLAIN)
+ (*finfo->info->callbacks->einfo)
+ (_("%X`%s' referenced in section `%A' of %B: "
+ "defined in discarded section `%A' of %B\n"),
+ sym_name, o, input_bfd, sec, sec->owner);
+
+ /* Try to do the best we can to support buggy old
+ versions of gcc. Pretend that the symbol is
+ really defined in the kept linkonce section.
+ FIXME: This is quite broken. Modifying the
+ symbol here means we will be changing all later
+ uses of the symbol, not just in this section. */
+ if (action & PRETEND)
{
- if ((o->flags & SEC_DEBUGGING) != 0
- || (sec->flags & SEC_LINK_ONCE) != 0)
- {
- BFD_ASSERT (r_symndx != 0);
- /* Try to preserve debug information. */
- if ((o->flags & SEC_DEBUGGING) != 0
- && sec->kept_section != NULL
- && sec->_raw_size == sec->kept_section->_raw_size)
- finfo->sections[r_symndx]
- = sec->kept_section;
- else
- {
- rel->r_info &= r_type_mask;
- rel->r_addend = 0;
- }
- }
- else
+ asection *kept;
+
+ kept = _bfd_elf_check_kept_section (sec);
+ if (kept != NULL)
{
- static int count;
- int ok;
- char *buf;
-
- ok = asprintf (&buf, "local symbol %d",
- count++);
- if (ok <= 0)
- buf = (char *) "local symbol";
- finfo->info->callbacks->error_handler
- (LD_DEFINITION_IN_DISCARDED_SECTION,
- _("%T: discarded in section `%s' from %s\n"),
- buf, buf, sec->name,
- bfd_archive_filename (input_bfd));
- if (ok != -1)
- free (buf);
+ *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;
}
}
}
@@ -6664,10 +7222,9 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
Elf_Internal_Rela *irelaend;
bfd_vma last_offset;
struct elf_link_hash_entry **rel_hash;
+ struct elf_link_hash_entry **rel_hash_list;
Elf_Internal_Shdr *input_rel_hdr, *input_rel_hdr2;
unsigned int next_erel;
- bfd_boolean (*reloc_emitter)
- (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *);
bfd_boolean rela_normal;
input_rel_hdr = &elf_section_data (o)->rel_hdr;
@@ -6682,6 +7239,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
rel_hash = (elf_section_data (o->output_section)->rel_hashes
+ elf_section_data (o->output_section)->rel_count
+ elf_section_data (o->output_section)->rel_count2);
+ rel_hash_list = rel_hash;
last_offset = o->output_offset;
if (!finfo->info->relocatable)
last_offset += o->output_section->vma;
@@ -6738,7 +7296,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
symbol. We set the rel_hash entry for this
reloc to point to the global hash table entry
for this symbol. The symbol index is then
- set at the end of elf_bfd_final_link. */
+ set at the end of bfd_elf_final_link. */
indx = r_symndx - extsymoff;
rh = elf_sym_hashes (input_bfd)[indx];
while (rh->root.type == bfd_link_hash_indirect
@@ -6765,13 +7323,10 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
{
/* I suppose the backend ought to fill in the
section of any STT_SECTION symbol against a
- processor specific section. If we have
- discarded a section, the output_section will
- be the absolute section. */
- if (bfd_is_abs_section (sec)
- || (sec != NULL
- && bfd_is_abs_section (sec->output_section)))
- r_symndx = 0;
+ processor specific section. */
+ r_symndx = 0;
+ if (bfd_is_abs_section (sec))
+ ;
else if (sec == NULL || sec->owner == NULL)
{
bfd_set_error (bfd_error_bad_value);
@@ -6779,8 +7334,25 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
}
else
{
- r_symndx = sec->output_section->target_index;
- BFD_ASSERT (r_symndx != 0);
+ asection *osec = sec->output_section;
+
+ /* 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. */
+ if (bfd_is_abs_section (osec)
+ && sec->kept_section != NULL
+ && sec->kept_section->output_section != NULL)
+ {
+ osec = sec->kept_section->output_section;
+ irela->r_addend -= osec->vma;
+ }
+
+ if (!bfd_is_abs_section (osec))
+ {
+ r_symndx = osec->target_index;
+ BFD_ASSERT (r_symndx != 0);
+ }
}
/* Adjust the addend according to where the
@@ -6850,16 +7422,11 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
}
/* Swap out the relocs. */
- if (bed->elf_backend_emit_relocs
- && !(finfo->info->relocatable
- || finfo->info->emitrelocations))
- reloc_emitter = bed->elf_backend_emit_relocs;
- else
- reloc_emitter = _bfd_elf_link_output_relocs;
-
if (input_rel_hdr->sh_size != 0
- && ! (*reloc_emitter) (output_bfd, o, input_rel_hdr,
- internal_relocs))
+ && !bed->elf_backend_emit_relocs (output_bfd, o,
+ input_rel_hdr,
+ internal_relocs,
+ rel_hash_list))
return FALSE;
input_rel_hdr2 = elf_section_data (o)->rel_hdr2;
@@ -6867,8 +7434,11 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
{
internal_relocs += (NUM_SHDR_ENTRIES (input_rel_hdr)
* bed->s->int_rels_per_ext_rel);
- if (! (*reloc_emitter) (output_bfd, o, input_rel_hdr2,
- internal_relocs))
+ rel_hash_list += NUM_SHDR_ENTRIES (input_rel_hdr);
+ if (!bed->elf_backend_emit_relocs (output_bfd, o,
+ input_rel_hdr2,
+ internal_relocs,
+ rel_hash_list))
return FALSE;
}
}
@@ -6903,14 +7473,11 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
break;
default:
{
- bfd_size_type sec_size;
-
- sec_size = (o->_cooked_size != 0 ? o->_cooked_size : o->_raw_size);
if (! (o->flags & SEC_EXCLUDE)
&& ! bfd_set_section_contents (output_bfd, o->output_section,
contents,
(file_ptr) o->output_offset,
- sec_size))
+ o->size))
return FALSE;
}
break;
@@ -6921,7 +7488,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
}
/* Generate a reloc when linking an ELF file. This is a reloc
- requested by the linker, and does come from any input file. This
+ requested by the linker, and does not come from any input file. This
is used to build constructor and destructor tables when linking
with -Ur. */
@@ -7033,7 +7600,8 @@ elf_reloc_link_order (bfd *output_bfd,
else
sym_name = link_order->u.reloc.p->u.name;
if (! ((*info->callbacks->reloc_overflow)
- (info, sym_name, howto->name, addend, NULL, NULL, 0)))
+ (info, NULL, sym_name, howto->name, addend, NULL,
+ NULL, (bfd_vma) 0)))
{
free (buf);
return FALSE;
@@ -7086,6 +7654,151 @@ elf_reloc_link_order (bfd *output_bfd,
return TRUE;
}
+
+/* Get the output vma of the section pointed to by the sh_link field. */
+
+static bfd_vma
+elf_get_linked_section_vma (struct bfd_link_order *p)
+{
+ Elf_Internal_Shdr **elf_shdrp;
+ asection *s;
+ int elfsec;
+
+ s = p->u.indirect.section;
+ elf_shdrp = elf_elfsections (s->owner);
+ elfsec = _bfd_elf_section_from_bfd_section (s->owner, s);
+ elfsec = elf_shdrp[elfsec]->sh_link;
+ /* 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. Hence we could get the situation
+ where elfsec is 0. */
+ if (elfsec == 0)
+ {
+ const struct elf_backend_data *bed
+ = get_elf_backend_data (s->owner);
+ if (bed->link_order_error_handler)
+ bed->link_order_error_handler
+ (_("%B: warning: sh_link not set for section `%A'"), s->owner, s);
+ return 0;
+ }
+ else
+ {
+ s = elf_shdrp[elfsec]->bfd_section;
+ return s->output_section->vma + s->output_offset;
+ }
+}
+
+
+/* Compare two sections based on the locations of the sections they are
+ linked to. Used by elf_fixup_link_order. */
+
+static int
+compare_link_order (const void * a, const void * b)
+{
+ bfd_vma apos;
+ bfd_vma bpos;
+
+ apos = elf_get_linked_section_vma (*(struct bfd_link_order **)a);
+ bpos = elf_get_linked_section_vma (*(struct bfd_link_order **)b);
+ if (apos < bpos)
+ return -1;
+ return apos > bpos;
+}
+
+
+/* Looks for sections with SHF_LINK_ORDER set. Rearranges them into the same
+ order as their linked sections. Returns false if this could not be done
+ because an output section includes both ordered and unordered
+ sections. Ideally we'd do this in the linker proper. */
+
+static bfd_boolean
+elf_fixup_link_order (bfd *abfd, asection *o)
+{
+ int seen_linkorder;
+ int seen_other;
+ int n;
+ struct bfd_link_order *p;
+ bfd *sub;
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ unsigned elfsec;
+ struct bfd_link_order **sections;
+ asection *s, *other_sec, *linkorder_sec;
+ bfd_vma offset;
+
+ other_sec = NULL;
+ linkorder_sec = NULL;
+ seen_other = 0;
+ seen_linkorder = 0;
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
+ {
+ if (p->type == bfd_indirect_link_order)
+ {
+ s = p->u.indirect.section;
+ sub = s->owner;
+ if (bfd_get_flavour (sub) == bfd_target_elf_flavour
+ && elf_elfheader (sub)->e_ident[EI_CLASS] == bed->s->elfclass
+ && (elfsec = _bfd_elf_section_from_bfd_section (sub, s))
+ && elfsec < elf_numsections (sub)
+ && elf_elfsections (sub)[elfsec]->sh_flags & SHF_LINK_ORDER)
+ {
+ seen_linkorder++;
+ linkorder_sec = s;
+ }
+ else
+ {
+ seen_other++;
+ other_sec = s;
+ }
+ }
+ else
+ seen_other++;
+
+ if (seen_other && seen_linkorder)
+ {
+ if (other_sec && linkorder_sec)
+ (*_bfd_error_handler) (_("%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"),
+ o, linkorder_sec,
+ linkorder_sec->owner, other_sec,
+ other_sec->owner);
+ else
+ (*_bfd_error_handler) (_("%A has both ordered and unordered sections"),
+ o);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ }
+
+ if (!seen_linkorder)
+ return TRUE;
+
+ sections = (struct bfd_link_order **)
+ xmalloc (seen_linkorder * sizeof (struct bfd_link_order *));
+ seen_linkorder = 0;
+
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
+ {
+ sections[seen_linkorder++] = p;
+ }
+ /* Sort the input sections in the order of their linked section. */
+ qsort (sections, seen_linkorder, sizeof (struct bfd_link_order *),
+ compare_link_order);
+
+ /* Change the offsets of the sections. */
+ offset = 0;
+ for (n = 0; n < seen_linkorder; n++)
+ {
+ s = sections[n]->u.indirect.section;
+ offset &= ~(bfd_vma)((1 << s->alignment_power) - 1);
+ s->output_offset = offset;
+ sections[n]->offset = offset;
+ offset += sections[n]->size;
+ }
+
+ return TRUE;
+}
+
+
/* Do the final step of an ELF link. */
bfd_boolean
@@ -7126,8 +7839,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
dynobj = elf_hash_table (info)->dynobj;
emit_relocs = (info->relocatable
- || info->emitrelocations
- || bed->elf_backend_emit_relocs);
+ || info->emitrelocations);
finfo.info = info;
finfo.output_bfd = abfd;
@@ -7177,7 +7889,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
struct bfd_elf_section_data *esdo = elf_section_data (o);
o->reloc_count = 0;
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
unsigned int reloc_count = 0;
struct bfd_elf_section_data *esdi = NULL;
@@ -7217,10 +7929,10 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
free (relocs);
}
- if (sec->_raw_size > max_contents_size)
- max_contents_size = sec->_raw_size;
- if (sec->_cooked_size > max_contents_size)
- max_contents_size = sec->_cooked_size;
+ if (sec->rawsize > max_contents_size)
+ max_contents_size = sec->rawsize;
+ if (sec->size > max_contents_size)
+ max_contents_size = sec->size;
/* We are interested in just local symbols, not all
symbols. */
@@ -7336,8 +8048,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (! _bfd_elf_compute_section_file_positions (abfd, info))
goto error_return;
- /* That created the reloc sections. Set their sizes, and assign
- them file positions, and allocate some buffers. */
+ /* Set sizes, and assign file positions for reloc sections. */
for (o = abfd->sections; o != NULL; o = o->next)
{
if ((o->flags & SEC_RELOC) != 0)
@@ -7419,22 +8130,6 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
goto error_return;
}
-#if 0
- /* Some standard ELF linkers do this, but we don't because it causes
- bootstrap comparison failures. */
- /* Output a file symbol for the output file as the second symbol.
- We output this even if we are discarding local symbols, although
- I'm not sure if this is correct. */
- elfsym.st_value = 0;
- elfsym.st_size = 0;
- elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_FILE);
- elfsym.st_other = 0;
- elfsym.st_shndx = SHN_ABS;
- if (! elf_link_output_sym (&finfo, bfd_get_filename (abfd),
- &elfsym, bfd_abs_section_ptr, NULL))
- goto error_return;
-#endif
-
/* Output a symbol for each section. We output these even if we are
discarding local symbols, since they are used for relocs. These
symbols have no names. We store the index of each one in the
@@ -7528,15 +8223,14 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
sec && (sec->flags & SEC_THREAD_LOCAL);
sec = sec->next)
{
- bfd_vma size = sec->_raw_size;
+ bfd_size_type size = sec->size;
- if (size == 0 && (sec->flags & SEC_HAS_CONTENTS) == 0)
+ if (size == 0
+ && (sec->flags & SEC_HAS_CONTENTS) == 0)
{
- struct bfd_link_order *o;
-
- for (o = sec->link_order_head; o != NULL; o = o->next)
- if (size < o->offset + o->size)
- size = o->offset + o->size;
+ struct bfd_link_order *o = sec->map_tail.link_order;
+ if (o != NULL)
+ size = o->offset + o->size;
}
end = sec->vma + size;
}
@@ -7545,6 +8239,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
elf_hash_table (info)->tls_size = end - base;
}
+ /* Reorder SHF_LINK_ORDER sections. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ if (!elf_fixup_link_order (abfd, o))
+ return FALSE;
+ }
+
/* Since ELF permits relocations to be against local symbols, we
must have the local symbols available when we do the relocations.
Since we would rather only read the local symbols once, and we
@@ -7569,7 +8270,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
sub->output_has_begun = FALSE;
for (o = abfd->sections; o != NULL; o = o->next)
{
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
if (p->type == bfd_indirect_link_order
&& (bfd_get_flavour ((sub = p->u.indirect.section->owner))
@@ -7627,7 +8328,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
long last_local = 0;
/* Write out the section symbols for the output sections. */
- if (info->shared)
+ if (info->shared || elf_hash_table (info)->is_relocatable_executable)
{
asection *s;
@@ -7642,16 +8343,20 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
bfd_byte *dest;
long dynindx;
- indx = elf_section_data (s)->this_idx;
dynindx = elf_section_data (s)->dynindx;
+ if (dynindx <= 0)
+ continue;
+ indx = elf_section_data (s)->this_idx;
BFD_ASSERT (indx > 0);
sym.st_shndx = indx;
+ if (! check_dynsym (abfd, &sym))
+ return FALSE;
sym.st_value = s->vma;
dest = dynsym + dynindx * bed->s->sizeof_sym;
+ if (last_local < dynindx)
+ last_local = dynindx;
bed->s->swap_symbol_out (abfd, &sym, dest, 0);
}
-
- last_local = bfd_count_sections (abfd);
}
/* Write out the local dynsyms. */
@@ -7680,6 +8385,8 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
sym.st_shndx =
elf_section_data (s->output_section)->this_idx;
+ if (! check_dynsym (abfd, &sym))
+ return FALSE;
sym.st_value = (s->output_section->vma
+ s->output_offset
+ e->isym.st_value);
@@ -7802,7 +8509,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
BFD_ASSERT (o != NULL);
dyncon = o->contents;
- dynconend = o->contents + o->_raw_size;
+ dynconend = o->contents + o->size;
for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn)
{
Elf_Internal_Dyn dyn;
@@ -7874,14 +8581,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (o == NULL)
{
(*_bfd_error_handler)
- (_("%s: could not find output section %s"),
- bfd_get_filename (abfd), name);
+ (_("%B: could not find output section %s"), abfd, name);
goto error_return;
}
- if (o->_raw_size == 0)
+ if (o->size == 0)
(*_bfd_error_handler)
(_("warning: %s section has zero size"), name);
- dyn.d_un.d_val = o->_raw_size;
+ dyn.d_un.d_val = o->size;
break;
case DT_PREINIT_ARRAY:
@@ -7916,8 +8622,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (o == NULL)
{
(*_bfd_error_handler)
- (_("%s: could not find output section %s"),
- bfd_get_filename (abfd), name);
+ (_("%B: could not find output section %s"), abfd, name);
goto error_return;
}
dyn.d_un.d_ptr = o->vma;
@@ -7962,10 +8667,36 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (! (*bed->elf_backend_finish_dynamic_sections) (abfd, info))
goto error_return;
+ /* Check for DT_TEXTREL (late, in case the backend removes it). */
+ if (info->warn_shared_textrel && info->shared)
+ {
+ bfd_byte *dyncon, *dynconend;
+
+ /* Fix up .dynamic entries. */
+ o = bfd_get_section_by_name (dynobj, ".dynamic");
+ BFD_ASSERT (o != NULL);
+
+ dyncon = o->contents;
+ dynconend = o->contents + o->size;
+ for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn)
+ {
+ Elf_Internal_Dyn dyn;
+
+ bed->s->swap_dyn_in (dynobj, dyncon, &dyn);
+
+ if (dyn.d_tag == DT_TEXTREL)
+ {
+ _bfd_error_handler
+ (_("warning: creating a DT_TEXTREL in a shared object."));
+ break;
+ }
+ }
+ }
+
for (o = dynobj->sections; o != NULL; o = o->next)
{
if ((o->flags & SEC_HAS_CONTENTS) == 0
- || o->_raw_size == 0
+ || o->size == 0
|| o->output_section == bfd_abs_section_ptr)
continue;
if ((o->flags & SEC_LINKER_CREATED) == 0)
@@ -7974,6 +8705,10 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
created by _bfd_elf_link_create_dynamic_sections. */
continue;
}
+ if (elf_hash_table (info)->stab_info.stabstr == o)
+ continue;
+ if (elf_hash_table (info)->eh_info.hdr_sec == o)
+ continue;
if ((elf_section_data (o->output_section)->this_hdr.sh_type
!= SHT_STRTAB)
|| strcmp (bfd_get_section_name (abfd, o), ".dynstr") != 0)
@@ -7981,7 +8716,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (! bfd_set_section_contents (abfd, o->output_section,
o->contents,
(file_ptr) o->output_offset,
- o->_raw_size))
+ o->size))
goto error_return;
}
else
@@ -8007,7 +8742,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
}
/* If we have optimized stabs strings, output them. */
- if (elf_hash_table (info)->stab_info != NULL)
+ if (elf_hash_table (info)->stab_info.stabstr != NULL)
{
if (! _bfd_write_stab_strings (abfd, &elf_hash_table (info)->stab_info))
goto error_return;
@@ -8095,12 +8830,13 @@ typedef asection * (*gc_mark_hook_fn)
(asection *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *, Elf_Internal_Sym *);
-static bfd_boolean
-elf_gc_mark (struct bfd_link_info *info,
- asection *sec,
- gc_mark_hook_fn gc_mark_hook)
+bfd_boolean
+_bfd_elf_gc_mark (struct bfd_link_info *info,
+ asection *sec,
+ gc_mark_hook_fn gc_mark_hook)
{
bfd_boolean ret;
+ bfd_boolean is_eh;
asection *group_sec;
sec->gc_mark = 1;
@@ -8108,11 +8844,12 @@ elf_gc_mark (struct bfd_link_info *info,
/* Mark all the sections in the group. */
group_sec = elf_section_data (sec)->next_in_group;
if (group_sec && !group_sec->gc_mark)
- if (!elf_gc_mark (info, group_sec, gc_mark_hook))
+ if (!_bfd_elf_gc_mark (info, group_sec, gc_mark_hook))
return FALSE;
/* Look through the section relocs. */
ret = TRUE;
+ is_eh = strcmp (sec->name, ".eh_frame") == 0;
if ((sec->flags & SEC_RELOC) != 0 && sec->reloc_count > 0)
{
Elf_Internal_Rela *relstart, *rel, *relend;
@@ -8175,6 +8912,9 @@ elf_gc_mark (struct bfd_link_info *info,
|| ELF_ST_BIND (isym[r_symndx].st_info) != STB_LOCAL)
{
h = sym_hashes[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;
rsec = (*gc_mark_hook) (sec, info, rel, h, NULL);
}
else
@@ -8186,7 +8926,9 @@ elf_gc_mark (struct bfd_link_info *info,
{
if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour)
rsec->gc_mark = 1;
- else if (!elf_gc_mark (info, rsec, gc_mark_hook))
+ else if (is_eh)
+ rsec->gc_mark_from_eh = 1;
+ else if (!_bfd_elf_gc_mark (info, rsec, gc_mark_hook))
{
ret = FALSE;
goto out2;
@@ -8212,19 +8954,26 @@ 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 bfd_link_info *info;
+ void (*hide_symbol) (struct bfd_link_info *, struct elf_link_hash_entry *,
+ bfd_boolean);
+};
+
static bfd_boolean
-elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *idxptr)
+elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data)
{
- int *idx = idxptr;
-
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (h->dynindx != -1
- && ((h->root.type != bfd_link_hash_defined
- && h->root.type != bfd_link_hash_defweak)
- || h->root.u.def.section->gc_mark))
- h->dynindx = (*idx)++;
+ if ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && !h->root.u.def.section->gc_mark
+ && !(h->root.u.def.section->owner->flags & DYNAMIC))
+ {
+ struct elf_gc_sweep_symbol_info *inf = data;
+ (*inf->hide_symbol) (inf->info, h, TRUE);
+ }
return TRUE;
}
@@ -8235,9 +8984,13 @@ typedef bfd_boolean (*gc_sweep_hook_fn)
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
static bfd_boolean
-elf_gc_sweep (struct bfd_link_info *info, gc_sweep_hook_fn gc_sweep_hook)
+elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
{
bfd *sub;
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ gc_sweep_hook_fn gc_sweep_hook = bed->gc_sweep_hook;
+ unsigned long section_sym_count;
+ struct elf_gc_sweep_symbol_info sweep_info;
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
{
@@ -8248,9 +9001,9 @@ elf_gc_sweep (struct bfd_link_info *info, gc_sweep_hook_fn gc_sweep_hook)
for (o = sub->sections; o != NULL; o = o->next)
{
- /* Keep special sections. Keep .debug sections. */
- if ((o->flags & SEC_LINKER_CREATED)
- || (o->flags & SEC_DEBUGGING))
+ /* Keep debug and special sections. */
+ if ((o->flags & (SEC_DEBUGGING | SEC_LINKER_CREATED)) != 0
+ || (o->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0)
o->gc_mark = 1;
if (o->gc_mark)
@@ -8267,7 +9020,9 @@ elf_gc_sweep (struct bfd_link_info *info, gc_sweep_hook_fn gc_sweep_hook)
/* But we also have to update some of the relocation
info we collected before. */
if (gc_sweep_hook
- && (o->flags & SEC_RELOC) && o->reloc_count > 0)
+ && (o->flags & SEC_RELOC) != 0
+ && o->reloc_count > 0
+ && !bfd_is_abs_section (o->output_section))
{
Elf_Internal_Rela *internal_relocs;
bfd_boolean r;
@@ -8292,14 +9047,12 @@ elf_gc_sweep (struct bfd_link_info *info, gc_sweep_hook_fn gc_sweep_hook)
/* Remove the symbols that were in the swept sections from the dynamic
symbol table. GCFIXME: Anyone know how to get them out of the
static symbol table as well? */
- {
- int i = 0;
-
- elf_link_hash_traverse (elf_hash_table (info), elf_gc_sweep_symbol, &i);
-
- elf_hash_table (info)->dynsymcount = i;
- }
+ sweep_info.info = info;
+ sweep_info.hide_symbol = bed->elf_backend_hide_symbol;
+ elf_link_hash_traverse (elf_hash_table (info), elf_gc_sweep_symbol,
+ &sweep_info);
+ _bfd_elf_link_renumber_dynsyms (abfd, info, &section_sym_count);
return TRUE;
}
@@ -8313,26 +9066,26 @@ elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
/* Those that are not vtables. */
- if (h->vtable_parent == NULL)
+ if (h->vtable == NULL || h->vtable->parent == NULL)
return TRUE;
/* Those vtables that do not have parents, we cannot merge. */
- if (h->vtable_parent == (struct elf_link_hash_entry *) -1)
+ if (h->vtable->parent == (struct elf_link_hash_entry *) -1)
return TRUE;
/* If we've already been done, exit. */
- if (h->vtable_entries_used && h->vtable_entries_used[-1])
+ if (h->vtable->used && h->vtable->used[-1])
return TRUE;
/* Make sure the parent's table is up to date. */
- elf_gc_propagate_vtable_entries_used (h->vtable_parent, okp);
+ elf_gc_propagate_vtable_entries_used (h->vtable->parent, okp);
- if (h->vtable_entries_used == NULL)
+ if (h->vtable->used == NULL)
{
/* None of this table's entries were referenced. Re-use the
parent's table. */
- h->vtable_entries_used = h->vtable_parent->vtable_entries_used;
- h->vtable_entries_size = h->vtable_parent->vtable_entries_size;
+ h->vtable->used = h->vtable->parent->vtable->used;
+ h->vtable->size = h->vtable->parent->vtable->size;
}
else
{
@@ -8340,9 +9093,9 @@ elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp)
bfd_boolean *cu, *pu;
/* Or the parent's entries into ours. */
- cu = h->vtable_entries_used;
+ cu = h->vtable->used;
cu[-1] = TRUE;
- pu = h->vtable_parent->vtable_entries_used;
+ pu = h->vtable->parent->vtable->used;
if (pu != NULL)
{
const struct elf_backend_data *bed;
@@ -8350,7 +9103,7 @@ elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp)
bed = get_elf_backend_data (h->root.u.def.section->owner);
log_file_align = bed->s->log_file_align;
- n = h->vtable_parent->vtable_entries_size >> log_file_align;
+ n = h->vtable->parent->vtable->size >> log_file_align;
while (n--)
{
if (*pu)
@@ -8378,7 +9131,7 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp)
/* Take care of both those symbols that do not describe vtables as
well as those that are not loaded. */
- if (h->vtable_parent == NULL)
+ if (h->vtable == NULL || h->vtable->parent == NULL)
return TRUE;
BFD_ASSERT (h->root.type == bfd_link_hash_defined
@@ -8400,11 +9153,11 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp)
if (rel->r_offset >= hstart && rel->r_offset < hend)
{
/* If the entry is in use, do nothing. */
- if (h->vtable_entries_used
- && (rel->r_offset - hstart) < h->vtable_entries_size)
+ if (h->vtable->used
+ && (rel->r_offset - hstart) < h->vtable->size)
{
bfd_vma entry = (rel->r_offset - hstart) >> log_file_align;
- if (h->vtable_entries_used[entry])
+ if (h->vtable->used[entry])
continue;
}
/* Otherwise, kill it. */
@@ -8414,6 +9167,30 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp)
return TRUE;
}
+/* Mark sections containing dynamically referenced symbols. When
+ building shared libraries, we must assume that any visible symbol is
+ referenced. */
+
+bfd_boolean
+bfd_elf_gc_mark_dynamic_ref_symbol (struct elf_link_hash_entry *h, void *inf)
+{
+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+ if (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)
+ && (h->ref_dynamic
+ || (!info->executable
+ && h->def_regular
+ && ELF_ST_VISIBILITY (h->other) != STV_INTERNAL
+ && ELF_ST_VISIBILITY (h->other) != STV_HIDDEN)))
+ h->root.u.def.section->flags |= SEC_KEEP;
+
+ return TRUE;
+}
+
/* Do mark and sweep of unused sections. */
bfd_boolean
@@ -8424,12 +9201,12 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
asection * (*gc_mark_hook)
(asection *, struct bfd_link_info *, Elf_Internal_Rela *,
struct elf_link_hash_entry *h, Elf_Internal_Sym *);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- if (!get_elf_backend_data (abfd)->can_gc_sections
+ if (!bed->can_gc_sections
|| info->relocatable
|| info->emitrelocations
- || !is_elf_hash_table (info->hash)
- || elf_hash_table (info)->dynamic_sections_created)
+ || !is_elf_hash_table (info->hash))
{
(*_bfd_error_handler)(_("Warning: gc-sections option ignored"));
return TRUE;
@@ -8449,9 +9226,28 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
if (!ok)
return FALSE;
+ /* Mark dynamically referenced symbols. */
+ if (elf_hash_table (info)->dynamic_sections_created)
+ elf_link_hash_traverse (elf_hash_table (info),
+ bed->gc_mark_dynamic_ref,
+ info);
+
/* Grovel through relocs to find out who stays ... */
+ gc_mark_hook = bed->gc_mark_hook;
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ {
+ asection *o;
+
+ if (bfd_get_flavour (sub) != bfd_target_elf_flavour)
+ continue;
+
+ for (o = sub->sections; o != NULL; o = o->next)
+ if ((o->flags & SEC_KEEP) != 0 && !o->gc_mark)
+ if (!_bfd_elf_gc_mark (info, o, gc_mark_hook))
+ return FALSE;
+ }
- gc_mark_hook = get_elf_backend_data (abfd)->gc_mark_hook;
+ /* ... again for sections marked from eh_frame. */
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
{
asection *o;
@@ -8459,19 +9255,54 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
if (bfd_get_flavour (sub) != bfd_target_elf_flavour)
continue;
+ /* Keep .gcc_except_table.* if the associated .text.* (or the
+ associated .gnu.linkonce.t.* if .text.* doesn't exist) is
+ marked. This isn't very nice, but the proper solution,
+ splitting .eh_frame up and using comdat doesn't pan out
+ 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. */
for (o = sub->sections; o != NULL; o = o->next)
- {
- if (o->flags & SEC_KEEP)
- if (!elf_gc_mark (info, o, gc_mark_hook))
+ if (!o->gc_mark && o->gc_mark_from_eh && (o->flags & SEC_CODE) == 0)
+ {
+ if (strncmp (o->name, ".gcc_except_table.", 18) == 0)
+ {
+ unsigned long len;
+ char *fn_name;
+ asection *fn_text;
+
+ len = strlen (o->name + 18) + 1;
+ fn_name = bfd_malloc (len + 16);
+ if (fn_name == NULL)
+ return FALSE;
+
+ /* Try the first prefix. */
+ memcpy (fn_name, ".text.", 6);
+ memcpy (fn_name + 6, o->name + 18, len);
+ 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);
+ fn_text = bfd_get_section_by_name (sub, fn_name);
+ }
+
+ free (fn_name);
+ if (fn_text == NULL || !fn_text->gc_mark)
+ continue;
+ }
+
+ /* If not using specially named exception table section,
+ then keep whatever we are using. */
+ if (!_bfd_elf_gc_mark (info, o, gc_mark_hook))
return FALSE;
- }
+ }
}
/* ... and mark SEC_EXCLUDE for those that go. */
- if (!elf_gc_sweep (info, get_elf_backend_data (abfd)->gc_sweep_hook))
- return FALSE;
-
- return TRUE;
+ return elf_gc_sweep (abfd, info);
}
/* Called from check_relocs to record the existence of a VTINHERIT reloc. */
@@ -8509,13 +9340,18 @@ bfd_elf_gc_record_vtinherit (bfd *abfd,
goto win;
}
- (*_bfd_error_handler) ("%s: %s+%lu: No symbol found for INHERIT",
- bfd_archive_filename (abfd), sec->name,
- (unsigned long) offset);
+ (*_bfd_error_handler) ("%B: %A+%lu: No symbol found for INHERIT",
+ abfd, sec, (unsigned long) offset);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
win:
+ if (!child->vtable)
+ {
+ child->vtable = bfd_zalloc (abfd, sizeof (*child->vtable));
+ if (!child->vtable)
+ return FALSE;
+ }
if (!h)
{
/* This *should* only be the absolute section. It could potentially
@@ -8523,10 +9359,10 @@ bfd_elf_gc_record_vtinherit (bfd *abfd,
would be bad. It isn't worth paging in the local symbols to be
sure though; that case should simply be handled by the assembler. */
- child->vtable_parent = (struct elf_link_hash_entry *) -1;
+ child->vtable->parent = (struct elf_link_hash_entry *) -1;
}
else
- child->vtable_parent = h;
+ child->vtable->parent = h;
return TRUE;
}
@@ -8542,10 +9378,17 @@ bfd_elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED,
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
unsigned int log_file_align = bed->s->log_file_align;
- if (addend >= h->vtable_entries_size)
+ if (!h->vtable)
+ {
+ h->vtable = bfd_zalloc (abfd, sizeof (*h->vtable));
+ if (!h->vtable)
+ return FALSE;
+ }
+
+ if (addend >= h->vtable->size)
{
size_t size, bytes, file_align;
- bfd_boolean *ptr = h->vtable_entries_used;
+ bfd_boolean *ptr = h->vtable->used;
/* While the symbol is undefined, we have to be prepared to handle
a zero size. */
@@ -8576,7 +9419,7 @@ bfd_elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED,
{
size_t oldbytes;
- oldbytes = (((h->vtable_entries_size >> log_file_align) + 1)
+ oldbytes = (((h->vtable->size >> log_file_align) + 1)
* sizeof (bfd_boolean));
memset (((char *) ptr) + oldbytes, 0, bytes - oldbytes);
}
@@ -8588,11 +9431,11 @@ bfd_elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED,
return FALSE;
/* And arrange for that done flag to be at index -1. */
- h->vtable_entries_used = ptr + 1;
- h->vtable_entries_size = size;
+ h->vtable->used = ptr + 1;
+ h->vtable->size = size;
}
- h->vtable_entries_used[addend >> log_file_align] = TRUE;
+ h->vtable->used[addend >> log_file_align] = TRUE;
return TRUE;
}
@@ -8797,13 +9640,13 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
eh = bfd_get_section_by_name (abfd, ".eh_frame");
if (info->relocatable
|| (eh != NULL
- && (eh->_raw_size == 0
+ && (eh->size == 0
|| bfd_is_abs_section (eh->output_section))))
eh = NULL;
stab = bfd_get_section_by_name (abfd, ".stab");
if (stab != NULL
- && (stab->_raw_size == 0
+ && (stab->size == 0
|| bfd_is_abs_section (stab->output_section)
|| stab->sec_info_type != ELF_INFO_TYPE_STABS))
stab = NULL;
@@ -8908,3 +9751,221 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
return ret;
}
+
+void
+_bfd_elf_section_already_linked (bfd *abfd, struct bfd_section * sec)
+{
+ 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 (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;
+ }
+
+ /* FIXME: When doing a relocatable link, we may have trouble
+ copying relocations in other sections that refer to local symbols
+ in the section being discarded. Those relocations will have to
+ be converted somehow; as of this writing I'm not sure that any of
+ the backends handle that correctly.
+
+ It is tempting to instead not discard link once sections when
+ doing a relocatable link (technically, they should be discarded
+ whenever we are building constructors). However, that fails,
+ because the linker winds up combining all the link once sections
+ into a single large link once section, which defeats the purpose
+ of having link once sections in the first place.
+
+ Also, not merging link once sections in a relocatable link
+ causes trouble for MIPS ELF, which relies on link once semantics
+ to handle the .reginfo section correctly. */
+
+ name = bfd_get_section_name (abfd, sec);
+
+ if (strncmp (name, ".gnu.linkonce.", sizeof (".gnu.linkonce.") - 1) == 0
+ && (p = strchr (name + sizeof (".gnu.linkonce.") - 1, '.')) != NULL)
+ p++;
+ else
+ p = name;
+
+ already_linked_list = bfd_section_already_linked_table_lookup (p);
+
+ 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. */
+ 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)
+ {
+ /* The section has already been linked. See if we should
+ issue a warning. */
+ switch (flags & SEC_LINK_DUPLICATES)
+ {
+ default:
+ abort ();
+
+ case SEC_LINK_DUPLICATES_DISCARD:
+ break;
+
+ case SEC_LINK_DUPLICATES_ONE_ONLY:
+ (*_bfd_error_handler)
+ (_("%B: ignoring duplicate section `%A'"),
+ abfd, sec);
+ break;
+
+ case SEC_LINK_DUPLICATES_SAME_SIZE:
+ if (sec->size != l->sec->size)
+ (*_bfd_error_handler)
+ (_("%B: duplicate section `%A' has different size"),
+ abfd, sec);
+ break;
+
+ case SEC_LINK_DUPLICATES_SAME_CONTENTS:
+ if (sec->size != l->sec->size)
+ (*_bfd_error_handler)
+ (_("%B: duplicate section `%A' has different size"),
+ abfd, sec);
+ else if (sec->size != 0)
+ {
+ bfd_byte *sec_contents, *l_sec_contents;
+
+ if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
+ (*_bfd_error_handler)
+ (_("%B: warning: could not read contents of section `%A'"),
+ abfd, sec);
+ else if (!bfd_malloc_and_get_section (l->sec->owner, l->sec,
+ &l_sec_contents))
+ (*_bfd_error_handler)
+ (_("%B: warning: could not read contents of section `%A'"),
+ l->sec->owner, l->sec);
+ else if (memcmp (sec_contents, l_sec_contents, sec->size) != 0)
+ (*_bfd_error_handler)
+ (_("%B: warning: duplicate section `%A' has different contents"),
+ abfd, sec);
+
+ if (sec_contents)
+ free (sec_contents);
+ if (l_sec_contents)
+ free (l_sec_contents);
+ }
+ break;
+ }
+
+ /* Set the output_section field so that lang_add_section
+ does not create a lang_input_section structure for this
+ section. Since there might be a symbol in the section
+ being discarded, we must retain a pointer to the section
+ which we are really going to use. */
+ sec->output_section = bfd_abs_section_ptr;
+ sec->kept_section = l->sec;
+
+ if (flags & SEC_GROUP)
+ {
+ asection *first = elf_next_in_group (sec);
+ asection *s = first;
+
+ while (s != NULL)
+ {
+ s->output_section = bfd_abs_section_ptr;
+ /* Record which group discards it. */
+ s->kept_section = l->sec;
+ s = elf_next_in_group (s);
+ /* These lists are circular. */
+ if (s == first)
+ break;
+ }
+ }
+
+ return;
+ }
+ }
+
+ if (group)
+ {
+ /* 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;
+ }
+ 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. */
+ for (l = already_linked_list->entry; l != NULL; l = l->next)
+ if (l->sec->flags & SEC_GROUP)
+ {
+ asection *first = elf_next_in_group (l->sec);
+
+ if (first != NULL
+ && elf_next_in_group (first) == first
+ && bfd_elf_match_symbols_in_sections (first, sec))
+ {
+ sec->output_section = bfd_abs_section_ptr;
+ sec->kept_section = l->sec;
+ break;
+ }
+ }
+
+ /* This is the first section with this name. Record it. */
+ bfd_section_already_linked_table_insert (already_linked_list, sec);
+}
+
+bfd_boolean
+_bfd_elf_common_definition (Elf_Internal_Sym *sym)
+{
+ return sym->st_shndx == SHN_COMMON;
+}
+
+unsigned int
+_bfd_elf_common_section_index (asection *sec ATTRIBUTE_UNUSED)
+{
+ return SHN_COMMON;
+}
+
+asection *
+_bfd_elf_common_section (asection *sec ATTRIBUTE_UNUSED)
+{
+ return bfd_com_section_ptr;
+}
diff --git a/contrib/binutils/bfd/elfn32-mips.c b/contrib/binutils/bfd/elfn32-mips.c
index 973edd52daf7..b1211f0c65e5 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 Free Software Foundation, Inc.
+ 2003, 2004, 2005 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -23,7 +23,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file handles MIPS ELF targets. SGI Irix 5 uses a slightly
different MIPS ELF from other targets. This matters when linking.
@@ -262,9 +262,11 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 16 bit PC relative reference. */
+ /* 16 bit PC relative reference. Note that the ABI document has a typo
+ and claims R_MIPS_PC16 to be not rightshifted, rendering it useless.
+ We do the right thing here. */
HOWTO (R_MIPS_PC16, /* type */
- 0, /* rightshift */
+ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
TRUE, /* pc_relative */
@@ -502,7 +504,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
a) It means building the addend from a R_MIPS_HIGHEST/R_MIPS_HIGHER/
R_MIPS_HI16/R_MIPS_LO16 sequence with varying ordering, using
fallable heuristics.
- b) No other NEwABI toolchain actually emits such relocations. */
+ b) No other NewABI toolchain actually emits such relocations. */
EMPTY_HOWTO (R_MIPS_HIGHER),
EMPTY_HOWTO (R_MIPS_HIGHEST),
@@ -600,6 +602,160 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
0x00000000, /* src_mask */
0x00000000, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* TLS GD/LD dynamic relocations. */
+ HOWTO (R_MIPS_TLS_DTPMOD32, /* 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_TLS_DTPMOD32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_MIPS_TLS_DTPREL32, /* 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_TLS_DTPREL32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64),
+ EMPTY_HOWTO (R_MIPS_TLS_DTPREL64),
+
+ /* TLS general dynamic variable reference. */
+ HOWTO (R_MIPS_TLS_GD, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GD", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic variable reference. */
+ HOWTO (R_MIPS_TLS_LDM, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_LDM", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_GOTTPREL, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GOTTPREL", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS IE dynamic relocations. */
+ HOWTO (R_MIPS_TLS_TPREL32, /* 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_TLS_TPREL32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (R_MIPS_TLS_TPREL64),
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* The relocation table used for SHT_RELA sections. */
@@ -759,9 +915,11 @@ static reloc_howto_type elf_mips_howto_table_rela[] =
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 16 bit PC relative reference. */
+ /* 16 bit PC relative reference. Note that the ABI document has a typo
+ and claims R_MIPS_PC16 to be not rightshifted, rendering it useless.
+ We do the right thing here. */
HOWTO (R_MIPS_PC16, /* type */
- 0, /* rightshift */
+ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
TRUE, /* pc_relative */
@@ -1115,12 +1273,167 @@ static reloc_howto_type elf_mips_howto_table_rela[] =
"R_MIPS_JALR", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS GD/LD dynamic relocations. */
+ HOWTO (R_MIPS_TLS_DTPMOD32, /* 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_TLS_DTPMOD32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ HOWTO (R_MIPS_TLS_DTPREL32, /* 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_TLS_DTPREL32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64),
+ EMPTY_HOWTO (R_MIPS_TLS_DTPREL64),
+
+ /* TLS general dynamic variable reference. */
+ HOWTO (R_MIPS_TLS_GD, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GD", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic variable reference. */
+ HOWTO (R_MIPS_TLS_LDM, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_LDM", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS local dynamic offset. */
+ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_GOTTPREL, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_GOTTPREL", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS IE dynamic relocations. */
+ HOWTO (R_MIPS_TLS_TPREL32, /* 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_TLS_TPREL32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (R_MIPS_TLS_TPREL64),
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_HI16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* TLS thread pointer offset. */
+ HOWTO (R_MIPS_TLS_TPREL_LO16, /* 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_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_TPREL_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
-/* The reloc used for the mips16 jump instruction. */
-static reloc_howto_type elf_mips16_jump_howto =
+static reloc_howto_type elf_mips16_howto_table_rel[] =
+{
+ /* The reloc used for the mips16 jump instruction. */
HOWTO (R_MIPS16_26, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1136,10 +1449,9 @@ static reloc_howto_type elf_mips16_jump_howto =
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
0x3ffffff, /* dst_mask */
- FALSE); /* pcrel_offset */
+ FALSE), /* pcrel_offset */
-/* The reloc used for the mips16 gprel instruction. */
-static reloc_howto_type elf_mips16_gprel_howto =
+ /* The reloc used for the mips16 gprel instruction. */
HOWTO (R_MIPS16_GPREL, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1150,9 +1462,118 @@ static reloc_howto_type elf_mips16_gprel_howto =
mips16_gprel_reloc, /* special_function */
"R_MIPS16_GPREL", /* name */
TRUE, /* partial_inplace */
- 0x07ff001f, /* src_mask */
- 0x07ff001f, /* dst_mask */
- FALSE); /* pcrel_offset */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A placeholder for MIPS16 reference to global offset table. */
+ EMPTY_HOWTO (R_MIPS16_GOT16),
+
+ /* A placeholder for MIPS16 16 bit call through global offset table. */
+ EMPTY_HOWTO (R_MIPS16_CALL16),
+
+ /* MIPS16 high 16 bits of symbol value. */
+ HOWTO (R_MIPS16_HI16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_hi16_reloc, /* special_function */
+ "R_MIPS16_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* MIPS16 low 16 bits of symbol value. */
+ HOWTO (R_MIPS16_LO16, /* 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_mips_elf_lo16_reloc, /* special_function */
+ "R_MIPS16_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+};
+
+static reloc_howto_type elf_mips16_howto_table_rela[] =
+{
+ /* The reloc used for the mips16 jump instruction. */
+ HOWTO (R_MIPS16_26, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ /* This needs complex overflow
+ detection, because the upper four
+ bits must match the PC. */
+ mips16_jump_reloc, /* special_function */
+ "R_MIPS16_26", /* name */
+ FALSE, /* partial_inplace */
+ 0x3ffffff, /* src_mask */
+ 0x3ffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* The reloc used for the mips16 gprel instruction. */
+ HOWTO (R_MIPS16_GPREL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ mips16_gprel_reloc, /* special_function */
+ "R_MIPS16_GPREL", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* A placeholder for MIPS16 reference to global offset table. */
+ EMPTY_HOWTO (R_MIPS16_GOT16),
+
+ /* A placeholder for MIPS16 16 bit call through global offset table. */
+ EMPTY_HOWTO (R_MIPS16_CALL16),
+
+ /* MIPS16 high 16 bits of symbol value. */
+ HOWTO (R_MIPS16_HI16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_hi16_reloc, /* special_function */
+ "R_MIPS16_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* MIPS16 low 16 bits of symbol value. */
+ HOWTO (R_MIPS16_LO16, /* 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_mips_elf_lo16_reloc, /* special_function */
+ "R_MIPS16_LO16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+};
/* GNU extension to record C++ vtable hierarchy */
static reloc_howto_type elf_mips_gnu_vtinherit_howto =
@@ -1348,6 +1769,16 @@ mips_elf_literal_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
bfd_reloc_status_type ret;
bfd_vma gp;
+ /* R_MIPS_LITERAL 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 *)
+ _("literal relocation occurs for an external symbol");
+ return bfd_reloc_outofrange;
+ }
+
/* FIXME: The entries in the .lit8 and .lit4 sections should be merged. */
if (output_bfd != NULL)
relocatable = TRUE;
@@ -1425,7 +1856,7 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
if (reloc_entry->howto->src_mask == 0)
@@ -1501,11 +1932,18 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
{
bfd_boolean relocatable;
bfd_reloc_status_type ret;
+ bfd_byte *location;
bfd_vma gp;
- unsigned short extend = 0;
- unsigned short insn = 0;
- bfd_signed_vma val;
- bfd_vma relocation;
+
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
+ if (output_bfd != NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (symbol->flags & BSF_LOCAL) != 0)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
if (output_bfd != NULL)
relocatable = TRUE;
@@ -1520,55 +1958,16 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
if (ret != bfd_reloc_ok)
return ret;
- if (reloc_entry->address > input_section->_cooked_size)
- return bfd_reloc_outofrange;
+ location = (bfd_byte *) data + reloc_entry->address;
+ _bfd_mips16_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
+ location);
+ ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+ input_section, relocatable,
+ data, gp);
+ _bfd_mips16_elf_reloc_shuffle (abfd, reloc_entry->howto->type, !relocatable,
+ location);
- if (bfd_is_com_section (symbol->section))
- relocation = 0;
- else
- relocation = symbol->value;
-
- relocation += symbol->section->output_section->vma;
- relocation += symbol->section->output_offset;
-
- /* Set val to the offset into the section or symbol. */
- val = reloc_entry->addend;
-
- if (reloc_entry->howto->partial_inplace)
- {
- /* Pick up the mips16 extend instruction and the real instruction. */
- extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
- insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
- val += ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
- }
-
- _bfd_mips_elf_sign_extend(val, 16);
-
- /* 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_16 (abfd,
- (extend & 0xf800) | ((val >> 11) & 0x1f) | (val & 0x7e0),
- (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (insn & 0xffe0) | (val & 0x1f),
- (bfd_byte *) data + reloc_entry->address + 2);
- }
- else
- reloc_entry->addend = val;
-
- if (relocatable)
- reloc_entry->address += input_section->output_offset;
- else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
- return bfd_reloc_overflow;
-
- return bfd_reloc_ok;
+ return ret;
}
/* A mapping from BFD reloc types to MIPS ELF reloc types. */
@@ -1586,7 +1985,7 @@ static const struct elf_reloc_map mips_reloc_map[] =
/* There is no BFD reloc for R_MIPS_REL32. */
{ BFD_RELOC_CTOR, R_MIPS_32 },
{ BFD_RELOC_64, R_MIPS_64 },
- { BFD_RELOC_16_PCREL, R_MIPS_PC16 },
+ { BFD_RELOC_16_PCREL_S2, R_MIPS_PC16 },
{ BFD_RELOC_HI16_S, R_MIPS_HI16 },
{ BFD_RELOC_LO16, R_MIPS_LO16 },
{ BFD_RELOC_GPREL16, R_MIPS_GPREL16 },
@@ -1614,7 +2013,28 @@ static const struct elf_reloc_map mips_reloc_map[] =
{ BFD_RELOC_MIPS_REL16, R_MIPS_REL16 },
/* Use of R_MIPS_ADD_IMMEDIATE and R_MIPS_PJUMP is deprecated. */
{ BFD_RELOC_MIPS_RELGOT, R_MIPS_RELGOT },
- { BFD_RELOC_MIPS_JALR, R_MIPS_JALR }
+ { BFD_RELOC_MIPS_JALR, R_MIPS_JALR },
+ { BFD_RELOC_MIPS_TLS_DTPMOD32, R_MIPS_TLS_DTPMOD32 },
+ { BFD_RELOC_MIPS_TLS_DTPREL32, R_MIPS_TLS_DTPREL32 },
+ { BFD_RELOC_MIPS_TLS_DTPMOD64, R_MIPS_TLS_DTPMOD64 },
+ { BFD_RELOC_MIPS_TLS_DTPREL64, R_MIPS_TLS_DTPREL64 },
+ { BFD_RELOC_MIPS_TLS_GD, R_MIPS_TLS_GD },
+ { BFD_RELOC_MIPS_TLS_LDM, R_MIPS_TLS_LDM },
+ { BFD_RELOC_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_HI16 },
+ { BFD_RELOC_MIPS_TLS_DTPREL_LO16, R_MIPS_TLS_DTPREL_LO16 },
+ { BFD_RELOC_MIPS_TLS_GOTTPREL, R_MIPS_TLS_GOTTPREL },
+ { BFD_RELOC_MIPS_TLS_TPREL32, R_MIPS_TLS_TPREL32 },
+ { BFD_RELOC_MIPS_TLS_TPREL64, R_MIPS_TLS_TPREL64 },
+ { BFD_RELOC_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_HI16 },
+ { BFD_RELOC_MIPS_TLS_TPREL_LO16, R_MIPS_TLS_TPREL_LO16 }
+};
+
+static const struct elf_reloc_map mips16_reloc_map[] =
+{
+ { BFD_RELOC_MIPS16_JMP, R_MIPS16_26 - R_MIPS16_min },
+ { BFD_RELOC_MIPS16_GPREL, R_MIPS16_GPREL - R_MIPS16_min },
+ { BFD_RELOC_MIPS16_HI16_S, R_MIPS16_HI16 - R_MIPS16_min },
+ { BFD_RELOC_MIPS16_LO16, R_MIPS16_LO16 - R_MIPS16_min },
};
/* Given a BFD reloc type, return a howto structure. */
@@ -1627,6 +2047,7 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* FIXME: We default to RELA here instead of choosing the right
relocation variant. */
reloc_howto_type *howto_table = elf_mips_howto_table_rela;
+ reloc_howto_type *howto16_table = elf_mips16_howto_table_rela;
for (i = 0; i < sizeof (mips_reloc_map) / sizeof (struct elf_reloc_map);
i++)
@@ -1635,18 +2056,19 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return &howto_table[(int) mips_reloc_map[i].elf_val];
}
+ for (i = 0; i < sizeof (mips16_reloc_map) / sizeof (struct elf_reloc_map);
+ i++)
+ {
+ if (mips16_reloc_map[i].bfd_val == code)
+ return &howto16_table[(int) mips16_reloc_map[i].elf_val];
+ }
+
switch (code)
{
- case BFD_RELOC_MIPS16_JMP:
- return &elf_mips16_jump_howto;
- case BFD_RELOC_MIPS16_GPREL:
- return &elf_mips16_gprel_howto;
case BFD_RELOC_VTABLE_INHERIT:
return &elf_mips_gnu_vtinherit_howto;
case BFD_RELOC_VTABLE_ENTRY:
return &elf_mips_gnu_vtentry_howto;
- case BFD_RELOC_16_PCREL_S2:
- return &elf_mips_gnu_rela16_s2;
default:
bfd_set_error (bfd_error_bad_value);
return NULL;
@@ -1660,10 +2082,6 @@ mips_elf_n32_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p)
{
switch (r_type)
{
- case R_MIPS16_26:
- return &elf_mips16_jump_howto;
- case R_MIPS16_GPREL:
- return &elf_mips16_gprel_howto;
case R_MIPS_GNU_VTINHERIT:
return &elf_mips_gnu_vtinherit_howto;
case R_MIPS_GNU_VTENTRY:
@@ -1674,6 +2092,13 @@ mips_elf_n32_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p)
else
return &elf_mips_gnu_rel16_s2;
default:
+ if (r_type >= R_MIPS16_min && r_type < R_MIPS16_max)
+ {
+ if (rela_p)
+ return &elf_mips16_howto_table_rela[r_type - R_MIPS16_min];
+ else
+ return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min];
+ }
BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
if (rela_p)
return &elf_mips_howto_table_rela[r_type];
@@ -1760,7 +2185,7 @@ static bfd_boolean
elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
- unsigned int raw_size;
+ unsigned int size;
switch (note->descsz)
{
@@ -1776,13 +2201,13 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* pr_reg */
offset = 72;
- raw_size = 360;
+ size = 360;
break;
}
/* Make a ".reg/999" section. */
- return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size,
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg", size,
note->descpos + offset);
}
@@ -1933,6 +2358,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#define elf_backend_mips_irix_compat elf_n32_mips_irix_compat
#define elf_backend_mips_rtype_to_howto mips_elf_n32_rtype_to_howto
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
+#define bfd_elf32_find_inliner_info _bfd_mips_elf_find_inliner_info
#define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook
#define bfd_elf32_set_section_contents _bfd_mips_elf_set_section_contents
#define bfd_elf32_bfd_get_relocated_section_contents \
diff --git a/contrib/binutils/bfd/elfxx-ia64.c b/contrib/binutils/bfd/elfxx-ia64.c
index b19aac2c55d1..6b3257afdf13 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
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -28,6 +28,16 @@
#include "objalloc.h"
#include "hashtab.h"
+#define ARCH_SIZE NN
+
+#if ARCH_SIZE == 64
+#define LOG_SECTION_ALIGN 3
+#endif
+
+#if ARCH_SIZE == 32
+#define LOG_SECTION_ALIGN 2
+#endif
+
/* THE RULES for all the stuff the linker creates --
GOT Entries created in response to LTOFF or LTOFF_FPTR
@@ -70,9 +80,6 @@ struct elfNN_ia64_dyn_sym_info
/* The addend for which this entry is relevant. */
bfd_vma addend;
- /* Next addend in the list. */
- struct elfNN_ia64_dyn_sym_info *next;
-
bfd_vma got_offset;
bfd_vma fptr_offset;
bfd_vma pltoff_offset;
@@ -123,6 +130,13 @@ struct elfNN_ia64_local_hash_entry
{
int id;
unsigned int r_sym;
+ /* The number of elements in elfNN_ia64_dyn_sym_info array. */
+ unsigned int count;
+ /* The number of sorted elements in elfNN_ia64_dyn_sym_info array. */
+ unsigned int sorted_count;
+ /* The size of elfNN_ia64_dyn_sym_info array. */
+ unsigned int size;
+ /* The array of elfNN_ia64_dyn_sym_info. */
struct elfNN_ia64_dyn_sym_info *info;
/* TRUE if this hash entry's addends was translated for
@@ -133,6 +147,13 @@ struct elfNN_ia64_local_hash_entry
struct elfNN_ia64_link_hash_entry
{
struct elf_link_hash_entry root;
+ /* The number of elements in elfNN_ia64_dyn_sym_info array. */
+ unsigned int count;
+ /* The number of sorted elements in elfNN_ia64_dyn_sym_info array. */
+ unsigned int sorted_count;
+ /* The size of elfNN_ia64_dyn_sym_info array. */
+ unsigned int size;
+ /* The array of elfNN_ia64_dyn_sym_info. */
struct elfNN_ia64_dyn_sym_info *info;
};
@@ -162,6 +183,7 @@ struct elfNN_ia64_allocate_data
{
struct bfd_link_info *info;
bfd_size_type ofs;
+ bfd_boolean only_got;
};
#define elfNN_ia64_hash_table(p) \
@@ -180,13 +202,11 @@ static bfd_boolean elfNN_ia64_relax_section
PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info,
bfd_boolean *again));
static void elfNN_ia64_relax_ldxmov
- PARAMS((bfd *abfd, bfd_byte *contents, bfd_vma off));
+ PARAMS((bfd_byte *contents, bfd_vma off));
static bfd_boolean is_unwind_section_name
PARAMS ((bfd *abfd, const char *));
-static bfd_boolean elfNN_ia64_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
static bfd_boolean elfNN_ia64_section_flags
- PARAMS ((flagword *, Elf_Internal_Shdr *));
+ PARAMS ((flagword *, const Elf_Internal_Shdr *));
static bfd_boolean elfNN_ia64_fake_sections
PARAMS ((bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec));
static void elfNN_ia64_final_write_processing
@@ -207,7 +227,7 @@ static struct bfd_hash_entry *elfNN_ia64_new_elf_hash_entry
PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
const char *string));
static void elfNN_ia64_hash_copy_indirect
- PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static void elfNN_ia64_hash_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
@@ -273,7 +293,7 @@ static bfd_boolean allocate_dynrel_entries
static bfd_boolean elfNN_ia64_size_dynamic_sections
PARAMS ((bfd *output_bfd, struct bfd_link_info *info));
static bfd_reloc_status_type elfNN_ia64_install_value
- PARAMS ((bfd *abfd, bfd_byte *hit_addr, bfd_vma val, unsigned int r_type));
+ PARAMS ((bfd_byte *hit_addr, bfd_vma val, unsigned int r_type));
static void elfNN_ia64_install_dyn_reloc
PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *sec,
asection *srel, bfd_vma offset, unsigned int type,
@@ -445,8 +465,8 @@ static reloc_howto_type ia64_howto_table[] =
IA64_HOWTO (R_IA64_TPREL64LSB, "TPREL64LSB", 4, FALSE, FALSE),
IA64_HOWTO (R_IA64_LTOFF_TPREL22, "LTOFF_TPREL22", 0, FALSE, FALSE),
- IA64_HOWTO (R_IA64_DTPMOD64MSB, "TPREL64MSB", 4, FALSE, FALSE),
- IA64_HOWTO (R_IA64_DTPMOD64LSB, "TPREL64LSB", 4, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_DTPMOD64MSB, "DTPMOD64MSB", 4, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_DTPMOD64LSB, "DTPMOD64LSB", 4, FALSE, FALSE),
IA64_HOWTO (R_IA64_LTOFF_DTPMOD22, "LTOFF_DTPMOD22", 0, FALSE, FALSE),
IA64_HOWTO (R_IA64_DTPREL14, "DTPREL14", 0, FALSE, FALSE),
@@ -479,7 +499,8 @@ lookup_howto (rtype)
elf_code_to_howto_index[ia64_howto_table[i].type] = i;
}
- BFD_ASSERT (rtype <= R_IA64_MAX_RELOC_CODE);
+ if (rtype > R_IA64_MAX_RELOC_CODE)
+ return 0;
i = elf_code_to_howto_index[rtype];
if (i >= NELEMS (ia64_howto_table))
return 0;
@@ -673,8 +694,146 @@ bfd_elfNN_ia64_after_parse (int itanium)
oor_branch_size = itanium ? sizeof (oor_ip) : sizeof (oor_brl);
}
+#define BTYPE_SHIFT 6
+#define Y_SHIFT 26
+#define X6_SHIFT 27
+#define X4_SHIFT 27
+#define X3_SHIFT 33
+#define X2_SHIFT 31
+#define X_SHIFT 33
+#define OPCODE_SHIFT 37
+
+#define OPCODE_BITS (0xfLL << OPCODE_SHIFT)
+#define X6_BITS (0x3fLL << X6_SHIFT)
+#define X4_BITS (0xfLL << X4_SHIFT)
+#define X3_BITS (0x7LL << X3_SHIFT)
+#define X2_BITS (0x3LL << X2_SHIFT)
+#define X_BITS (0x1LL << X_SHIFT)
+#define Y_BITS (0x1LL << Y_SHIFT)
+#define BTYPE_BITS (0x7LL << BTYPE_SHIFT)
+#define PREDICATE_BITS (0x3fLL)
+
+#define IS_NOP_B(i) \
+ (((i) & (OPCODE_BITS | X6_BITS)) == (2LL << OPCODE_SHIFT))
+#define IS_NOP_F(i) \
+ (((i) & (OPCODE_BITS | X_BITS | X6_BITS | Y_BITS)) \
+ == (0x1LL << X6_SHIFT))
+#define IS_NOP_I(i) \
+ (((i) & (OPCODE_BITS | X3_BITS | X6_BITS | Y_BITS)) \
+ == (0x1LL << X6_SHIFT))
+#define IS_NOP_M(i) \
+ (((i) & (OPCODE_BITS | X3_BITS | X2_BITS | X4_BITS | Y_BITS)) \
+ == (0x1LL << X4_SHIFT))
+#define IS_BR_COND(i) \
+ (((i) & (OPCODE_BITS | BTYPE_BITS)) == (0x4LL << OPCODE_SHIFT))
+#define IS_BR_CALL(i) \
+ (((i) & OPCODE_BITS) == (0x5LL << OPCODE_SHIFT))
+
+static bfd_boolean
+elfNN_ia64_relax_br (bfd_byte *contents, bfd_vma off)
+{
+ unsigned int template, mlx;
+ bfd_vma t0, t1, s0, s1, s2, br_code;
+ long br_slot;
+ bfd_byte *hit_addr;
+
+ hit_addr = (bfd_byte *) (contents + off);
+ br_slot = (long) hit_addr & 0x3;
+ hit_addr -= br_slot;
+ t0 = bfd_getl64 (hit_addr + 0);
+ t1 = bfd_getl64 (hit_addr + 8);
+
+ /* Check if we can turn br into brl. A label is always at the start
+ of the bundle. Even if there are predicates on NOPs, we still
+ perform this optimization. */
+ template = t0 & 0x1e;
+ s0 = (t0 >> 5) & 0x1ffffffffffLL;
+ s1 = ((t0 >> 46) | (t1 << 18)) & 0x1ffffffffffLL;
+ s2 = (t1 >> 23) & 0x1ffffffffffLL;
+ switch (br_slot)
+ {
+ case 0:
+ /* Check if slot 1 and slot 2 are NOPs. Possible template is
+ BBB. We only need to check nop.b. */
+ if (!(IS_NOP_B (s1) && IS_NOP_B (s2)))
+ return FALSE;
+ br_code = s0;
+ break;
+ case 1:
+ /* Check if slot 2 is NOP. Possible templates are MBB and BBB.
+ For BBB, slot 0 also has to be nop.b. */
+ if (!((template == 0x12 /* MBB */
+ && IS_NOP_B (s2))
+ || (template == 0x16 /* BBB */
+ && IS_NOP_B (s0)
+ && IS_NOP_B (s2))))
+ return FALSE;
+ br_code = s1;
+ break;
+ case 2:
+ /* Check if slot 1 is NOP. Possible templates are MIB, MBB, BBB,
+ MMB and MFB. For BBB, slot 0 also has to be nop.b. */
+ if (!((template == 0x10 /* MIB */
+ && IS_NOP_I (s1))
+ || (template == 0x12 /* MBB */
+ && IS_NOP_B (s1))
+ || (template == 0x16 /* BBB */
+ && IS_NOP_B (s0)
+ && IS_NOP_B (s1))
+ || (template == 0x18 /* MMB */
+ && IS_NOP_M (s1))
+ || (template == 0x1c /* MFB */
+ && IS_NOP_F (s1))))
+ return FALSE;
+ br_code = s2;
+ break;
+ default:
+ /* It should never happen. */
+ abort ();
+ }
+
+ /* We can turn br.cond/br.call into brl.cond/brl.call. */
+ if (!(IS_BR_COND (br_code) || IS_BR_CALL (br_code)))
+ return FALSE;
+
+ /* Turn br into brl by setting bit 40. */
+ br_code |= 0x1LL << 40;
+
+ /* Turn the old bundle into a MLX bundle with the same stop-bit
+ variety. */
+ if (t0 & 0x1)
+ mlx = 0x5;
+ else
+ mlx = 0x4;
+
+ if (template == 0x16)
+ {
+ /* For BBB, we need to put nop.m in slot 0. We keep the original
+ predicate only if slot 0 isn't br. */
+ if (br_slot == 0)
+ t0 = 0LL;
+ else
+ t0 &= PREDICATE_BITS << 5;
+ t0 |= 0x1LL << (X4_SHIFT + 5);
+ }
+ else
+ {
+ /* Keep the original instruction in slot 0. */
+ t0 &= 0x1ffffffffffLL << 5;
+ }
+
+ t0 |= mlx;
+
+ /* Put brl in slot 1. */
+ t1 = br_code << 23;
+
+ bfd_putl64 (t0, hit_addr);
+ bfd_putl64 (t1, hit_addr + 8);
+ return TRUE;
+}
+
static void
-elfNN_ia64_relax_brl (bfd *abfd, bfd_byte *contents, bfd_vma off)
+elfNN_ia64_relax_brl (bfd_byte *contents, bfd_vma off)
{
int template;
bfd_byte *hit_addr;
@@ -682,8 +841,8 @@ elfNN_ia64_relax_brl (bfd *abfd, bfd_byte *contents, bfd_vma off)
hit_addr = (bfd_byte *) (contents + off);
hit_addr -= (long) hit_addr & 0x3;
- t0 = bfd_get_64 (abfd, hit_addr);
- t1 = bfd_get_64 (abfd, hit_addr + 8);
+ t0 = bfd_getl64 (hit_addr);
+ t1 = bfd_getl64 (hit_addr + 8);
/* Keep the instruction in slot 0. */
i0 = (t0 >> 5) & 0x1ffffffffffLL;
@@ -694,15 +853,22 @@ elfNN_ia64_relax_brl (bfd *abfd, bfd_byte *contents, bfd_vma off)
/* Turn a MLX bundle into a MBB bundle with the same stop-bit
variety. */
- template = 0x12;
- if ((t0 & 0x1fLL) == 5)
- template += 1;
+ if (t0 & 0x1)
+ template = 0x13;
+ else
+ template = 0x12;
t0 = (i1 << 46) | (i0 << 5) | template;
t1 = (i2 << 23) | (i1 >> 18);
- bfd_put_64 (abfd, t0, hit_addr);
- bfd_put_64 (abfd, t1, hit_addr + 8);
+ bfd_putl64 (t0, hit_addr);
+ bfd_putl64 (t1, hit_addr + 8);
}
+
+/* Rename some of the generic section flags to better document how they
+ are used here. */
+#define skip_relax_pass_0 need_finalize_relax
+#define skip_relax_pass_1 has_gp_reloc
+
/* These functions do relaxation for IA-64 ELF. */
@@ -731,6 +897,8 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
bfd_boolean changed_contents = FALSE;
bfd_boolean changed_relocs = FALSE;
bfd_boolean changed_got = FALSE;
+ bfd_boolean skip_relax_pass_0 = TRUE;
+ bfd_boolean skip_relax_pass_1 = TRUE;
bfd_vma gp = 0;
/* Assume we're not going to change any sizes, and we'll only need
@@ -742,18 +910,13 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
return FALSE;
/* Nothing to do if there are no relocations or there is no need for
- the relax finalize pass. */
+ the current pass. */
if ((sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
- || (!link_info->need_relax_finalize
- && sec->need_finalize_relax == 0))
+ || (link_info->relax_pass == 0 && sec->skip_relax_pass_0)
+ || (link_info->relax_pass == 1 && sec->skip_relax_pass_1))
return TRUE;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Load the relocations for this section. */
@@ -771,12 +934,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
contents = elf_section_data (sec)->this_hdr.contents;
else
{
- contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto error_return;
}
@@ -789,6 +947,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
bfd_size_type amt;
bfd_boolean is_branch;
struct elfNN_ia64_dyn_sym_info *dyn_i;
+ char symtype;
switch (r_type)
{
@@ -796,20 +955,19 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
case R_IA64_PCREL21BI:
case R_IA64_PCREL21M:
case R_IA64_PCREL21F:
- /* In the finalize pass, all br relaxations are done. We can
- skip it. */
- if (!link_info->need_relax_finalize)
+ /* In pass 1, all br relaxations are done. We can skip it. */
+ if (link_info->relax_pass == 1)
continue;
+ skip_relax_pass_0 = FALSE;
is_branch = TRUE;
break;
case R_IA64_PCREL60B:
- /* We can't optimize brl to br before the finalize pass since
- br relaxations will increase the code size. Defer it to
- the finalize pass. */
- if (link_info->need_relax_finalize)
+ /* We can't optimize brl to br in pass 0 since br relaxations
+ will increase the code size. Defer it to pass 1. */
+ if (link_info->relax_pass == 0)
{
- sec->need_finalize_relax = 1;
+ skip_relax_pass_1 = FALSE;
continue;
}
is_branch = TRUE;
@@ -817,12 +975,11 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
case R_IA64_LTOFF22X:
case R_IA64_LDXMOV:
- /* We can't relax ldx/mov before the finalize pass since
- br relaxations will increase the code size. Defer it to
- the finalize pass. */
- if (link_info->need_relax_finalize)
+ /* We can't relax ldx/mov in pass 0 since br relaxations will
+ increase the code size. Defer it to pass 1. */
+ if (link_info->relax_pass == 0)
{
- sec->need_finalize_relax = 1;
+ skip_relax_pass_1 = FALSE;
continue;
}
is_branch = FALSE;
@@ -864,6 +1021,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
toff = isym->st_value;
dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, FALSE);
+ symtype = ELF_ST_TYPE (isym->st_info);
}
else
{
@@ -908,13 +1066,38 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
tsec = h->root.u.def.section;
toff = h->root.u.def.value;
}
+
+ symtype = h->type;
}
if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
- toff = _bfd_merged_section_offset (abfd, &tsec,
- elf_section_data (tsec)->sec_info,
- toff + irel->r_addend,
- (bfd_vma) 0);
+ {
+ /* At this stage in linking, no SEC_MERGE symbol has been
+ adjusted, so all references to such symbols need to be
+ passed through _bfd_merged_section_offset. (Later, in
+ relocate_section, all SEC_MERGE symbols *except* for
+ section symbols have been adjusted.)
+
+ gas may reduce relocations against symbols in SEC_MERGE
+ sections to a relocation against the section symbol when
+ the original addend was zero. When the reloc is against
+ a section symbol we should include the addend in the
+ offset passed to _bfd_merged_section_offset, since the
+ location of interest is the original symbol. On the
+ other hand, an access to "sym+addend" where "sym" is not
+ a section symbol should not include the addend; Such an
+ access is presumed to be an offset from "sym"; The
+ location of interest is just "sym". */
+ if (symtype == STT_SECTION)
+ toff += irel->r_addend;
+
+ toff = _bfd_merged_section_offset (abfd, &tsec,
+ elf_section_data (tsec)->sec_info,
+ toff);
+
+ if (symtype != STT_SECTION)
+ toff += irel->r_addend;
+ }
else
toff += irel->r_addend;
@@ -937,10 +1120,10 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
/* If the 60-bit branch is in 21-bit range, optimize it. */
if (r_type == R_IA64_PCREL60B)
{
- elfNN_ia64_relax_brl (abfd, contents, roff);
+ elfNN_ia64_relax_brl (contents, roff);
irel->r_info
- = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ = ELFNN_R_INFO (ELFNN_R_SYM (irel->r_info),
R_IA64_PCREL21B);
/* If the original relocation offset points to slot
@@ -953,11 +1136,34 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
else if (r_type == R_IA64_PCREL60B)
continue;
+ else if (elfNN_ia64_relax_br (contents, roff))
+ {
+ irel->r_info
+ = ELFNN_R_INFO (ELFNN_R_SYM (irel->r_info),
+ R_IA64_PCREL60B);
+
+ /* Make the relocation offset point to slot 1. */
+ irel->r_offset = (irel->r_offset & ~((bfd_vma) 0x3)) + 1;
+ continue;
+ }
+
+ /* We can't put a trampoline in a .init/.fini section. Issue
+ an error. */
+ if (strcmp (sec->output_section->name, ".init") == 0
+ || strcmp (sec->output_section->name, ".fini") == 0)
+ {
+ (*_bfd_error_handler)
+ (_("%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."),
+ sec->owner, sec, (unsigned long) roff);
+ bfd_set_error (bfd_error_bad_value);
+ goto error_return;
+ }
/* If the branch and target are in the same section, you've
- got one honking big section and we can't help you. You'll
- get an error message later. */
- if (tsec == sec)
+ got one honking big section and we can't help you unless
+ you are branching backwards. You'll get an error message
+ later. */
+ if (tsec == sec && toff > roff)
continue;
/* Look for an existing fixup to this address. */
@@ -979,7 +1185,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
size = oor_branch_size;
/* Resize the current section to make room for the new branch. */
- trampoff = (sec->_cooked_size + 15) & (bfd_vma) -16;
+ trampoff = (sec->size + 15) & (bfd_vma) -16;
/* If trampoline is out of range, there is nothing we
can do. */
@@ -991,7 +1197,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
contents = (bfd_byte *) bfd_realloc (contents, amt);
if (contents == NULL)
goto error_return;
- sec->_cooked_size = amt;
+ sec->size = amt;
if (tsec == ia64_info->plt_sec)
{
@@ -1044,8 +1250,8 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
/* Fix up the existing branch to hit the trampoline. */
- if (elfNN_ia64_install_value (abfd, contents + roff, offset,
- r_type) != bfd_reloc_ok)
+ if (elfNN_ia64_install_value (contents + roff, offset, r_type)
+ != bfd_reloc_ok)
goto error_return;
changed_contents = TRUE;
@@ -1084,7 +1290,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
else
{
- elfNN_ia64_relax_ldxmov (abfd, contents, roff);
+ elfNN_ia64_relax_ldxmov (contents, roff);
irel->r_info = ELFNN_R_INFO (0, R_IA64_NONE);
changed_contents = TRUE;
changed_relocs = TRUE;
@@ -1096,7 +1302,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
enough that the data segment moves, which will change the GP.
Reset the GP so that we re-calculate next round. We need to
do this at the _beginning_ of the next round; now will not do. */
-
+
/* Clean up and go home. */
while (fixups)
{
@@ -1147,14 +1353,28 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_data_got, &data);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_fptr_got, &data);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_local_got, &data);
- ia64_info->got_sec->_raw_size = data.ofs;
- ia64_info->got_sec->_cooked_size = data.ofs;
+ ia64_info->got_sec->size = data.ofs;
- /* ??? Resize .rela.got too. */
+ if (ia64_info->root.dynamic_sections_created
+ && ia64_info->rel_got_sec != NULL)
+ {
+ /* Resize .rela.got. */
+ ia64_info->rel_got_sec->size = 0;
+ if (link_info->shared
+ && ia64_info->self_dtpmod_offset != (bfd_vma) -1)
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
+ data.only_got = TRUE;
+ elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries,
+ &data);
+ }
}
- if (!link_info->need_relax_finalize)
- sec->need_finalize_relax = 0;
+ if (link_info->relax_pass == 0)
+ {
+ /* Pass 0 is only needed to relax br. */
+ sec->skip_relax_pass_0 = skip_relax_pass_0;
+ sec->skip_relax_pass_1 = skip_relax_pass_1;
+ }
*again = changed_contents || changed_relocs;
return TRUE;
@@ -1170,10 +1390,11 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
free (internal_relocs);
return FALSE;
}
+#undef skip_relax_pass_0
+#undef skip_relax_pass_1
static void
-elfNN_ia64_relax_ldxmov (abfd, contents, off)
- bfd *abfd;
+elfNN_ia64_relax_ldxmov (contents, off)
bfd_byte *contents;
bfd_vma off;
{
@@ -1189,7 +1410,7 @@ elfNN_ia64_relax_ldxmov (abfd, contents, off)
abort ();
}
- dword = bfd_get_64 (abfd, contents + off);
+ dword = bfd_getl64 (contents + off);
insn = (dword >> shift) & 0x1ffffffffffLL;
r1 = (insn >> 6) & 127;
@@ -1201,7 +1422,7 @@ elfNN_ia64_relax_ldxmov (abfd, contents, off)
dword &= ~(0x1ffffffffffLL << shift);
dword |= (insn << shift);
- bfd_put_64 (abfd, dword, contents + off);
+ bfd_putl64 (dword, contents + off);
}
/* Return TRUE if NAME is an unwind table section name. */
@@ -1226,13 +1447,14 @@ is_unwind_section_name (abfd, name)
}
/* Handle an IA-64 specific section when reading an object file. This
- is called when elfcode.h finds a section with an unknown type. */
+ is called when bfd_section_from_shdr finds a section with an unknown
+ type. */
static bfd_boolean
-elfNN_ia64_section_from_shdr (abfd, hdr, name)
- bfd *abfd;
- Elf_Internal_Shdr *hdr;
- const char *name;
+elfNN_ia64_section_from_shdr (bfd *abfd,
+ Elf_Internal_Shdr *hdr,
+ const char *name,
+ int shindex)
{
asection *newsect;
@@ -1256,7 +1478,7 @@ elfNN_ia64_section_from_shdr (abfd, hdr, name)
return FALSE;
}
- if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
newsect = hdr->bfd_section;
@@ -1271,7 +1493,7 @@ elfNN_ia64_section_from_shdr (abfd, hdr, name)
static bfd_boolean
elfNN_ia64_section_flags (flags, hdr)
flagword *flags;
- Elf_Internal_Shdr *hdr;
+ const Elf_Internal_Shdr *hdr;
{
if (hdr->sh_flags & SHF_IA_64_SHORT)
*flags |= SEC_SMALL_DATA;
@@ -1325,6 +1547,11 @@ elfNN_ia64_fake_sections (abfd, hdr, sec)
if (sec->flags & SEC_SMALL_DATA)
hdr->sh_flags |= SHF_IA_64_SHORT;
+ /* Some HP linkers look for the SHF_IA_64_HP_TLS flag instead of SHF_TLS. */
+
+ if (elfNN_ia64_hpux_vec (abfd->xvec) && (sec->flags & SHF_TLS))
+ hdr->sh_flags |= SHF_IA_64_HP_TLS;
+
return TRUE;
}
@@ -1337,9 +1564,7 @@ elfNN_ia64_final_write_processing (abfd, linker)
bfd_boolean linker ATTRIBUTE_UNUSED;
{
Elf_Internal_Shdr *hdr;
- const char *sname;
- asection *text_sect, *s;
- size_t len;
+ asection *s;
for (s = abfd->sections; s; s = s->next)
{
@@ -1347,64 +1572,11 @@ elfNN_ia64_final_write_processing (abfd, linker)
switch (hdr->sh_type)
{
case SHT_IA_64_UNWIND:
- /* See comments in gas/config/tc-ia64.c:dot_endp on why we
- have to do this. */
- sname = bfd_get_section_name (abfd, s);
- len = sizeof (ELF_STRING_ia64_unwind) - 1;
- if (sname && strncmp (sname, ELF_STRING_ia64_unwind, len) == 0)
- {
- sname += len;
-
- if (sname[0] == '\0')
- /* .IA_64.unwind -> .text */
- text_sect = bfd_get_section_by_name (abfd, ".text");
- else
- /* .IA_64.unwindFOO -> FOO */
- text_sect = bfd_get_section_by_name (abfd, sname);
- }
- else if (sname
- && (len = sizeof (ELF_STRING_ia64_unwind_once) - 1,
- strncmp (sname, ELF_STRING_ia64_unwind_once, len)) == 0)
- {
- /* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.t.FOO */
- size_t len2 = sizeof (".gnu.linkonce.t.") - 1;
- char *once_name = bfd_malloc (len2 + strlen (sname + len) + 1);
-
- if (once_name != NULL)
- {
- memcpy (once_name, ".gnu.linkonce.t.", len2);
- strcpy (once_name + len2, sname + len);
- text_sect = bfd_get_section_by_name (abfd, once_name);
- free (once_name);
- }
- else
- /* Should only happen if we run out of memory, in
- which case we're probably toast anyway. Try to
- cope by finding the section the slow way. */
- for (text_sect = abfd->sections;
- text_sect != NULL;
- text_sect = text_sect->next)
- {
- if (strncmp (bfd_section_name (abfd, text_sect),
- ".gnu.linkonce.t.", len2) == 0
- && strcmp (bfd_section_name (abfd, text_sect) + len2,
- sname + len) == 0)
- break;
- }
- }
- else
- /* last resort: fall back on .text */
- text_sect = bfd_get_section_by_name (abfd, ".text");
-
- if (text_sect)
- {
- /* The IA-64 processor-specific ABI requires setting
- sh_link to the unwind section, whereas HP-UX requires
- sh_info to do so. For maximum compatibility, we'll
- set both for now... */
- hdr->sh_link = elf_section_data (text_sect)->this_idx;
- hdr->sh_info = elf_section_data (text_sect)->this_idx;
- }
+ /* The IA-64 processor-specific ABI requires setting sh_link
+ to the unwind section, whereas HP-UX requires sh_info to
+ do so. For maximum compatibility, we'll set both for
+ now... */
+ hdr->sh_info = hdr->sh_link;
break;
}
}
@@ -1447,11 +1619,11 @@ elfNN_ia64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (scomm == NULL)
{
- scomm = bfd_make_section (abfd, ".scommon");
- if (scomm == NULL
- || !bfd_set_section_flags (abfd, scomm, (SEC_ALLOC
- | SEC_IS_COMMON
- | SEC_LINKER_CREATED)))
+ scomm = bfd_make_section_with_flags (abfd, ".scommon",
+ (SEC_ALLOC
+ | SEC_IS_COMMON
+ | SEC_LINKER_CREATED));
+ if (scomm == NULL)
return FALSE;
}
@@ -1579,7 +1751,7 @@ elfNN_ia64_modify_segment_map (abfd, info)
int i;
for (i = m->count - 1; i >= 0; --i)
{
- struct bfd_link_order *order = m->sections[i]->link_order_head;
+ struct bfd_link_order *order = m->sections[i]->map_head.link_order;
while (order)
{
if (order->type == bfd_indirect_link_order)
@@ -1644,21 +1816,21 @@ elfNN_ia64_new_elf_hash_entry (entry, table, string)
if (!ret)
return 0;
- /* Initialize our local data. All zeros, and definitely easier
- than setting a handful of bit fields. */
- memset (ret, 0, sizeof (*ret));
-
/* Call the allocation method of the superclass. */
ret = ((struct elfNN_ia64_link_hash_entry *)
_bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
table, string));
+ ret->info = NULL;
+ ret->count = 0;
+ ret->sorted_count = 0;
+ ret->size = 0;
return (struct bfd_hash_entry *) ret;
}
static void
-elfNN_ia64_hash_copy_indirect (bed, xdir, xind)
- const struct elf_backend_data *bed ATTRIBUTE_UNUSED;
+elfNN_ia64_hash_copy_indirect (info, xdir, xind)
+ struct bfd_link_info *info;
struct elf_link_hash_entry *xdir, *xind;
{
struct elfNN_ia64_link_hash_entry *dir, *ind;
@@ -1669,12 +1841,10 @@ elfNN_ia64_hash_copy_indirect (bed, xdir, xind)
/* Copy down any references that we may have already seen to the
symbol which just became indirect. */
- dir->root.elf_link_hash_flags |=
- (ind->root.elf_link_hash_flags
- & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_HASH_NEEDS_PLT));
+ dir->root.ref_dynamic |= ind->root.ref_dynamic;
+ dir->root.ref_regular |= ind->root.ref_regular;
+ dir->root.ref_regular_nonweak |= ind->root.ref_regular_nonweak;
+ dir->root.needs_plt |= ind->root.needs_plt;
if (ind->root.root.type != bfd_link_hash_indirect)
return;
@@ -1682,29 +1852,43 @@ elfNN_ia64_hash_copy_indirect (bed, xdir, xind)
/* Copy over the got and plt data. This would have been done
by check_relocs. */
- if (dir->info == NULL)
+ if (ind->info != NULL)
{
struct elfNN_ia64_dyn_sym_info *dyn_i;
+ unsigned int count;
+
+ if (dir->info)
+ free (dir->info);
+
+ dir->info = ind->info;
+ dir->count = ind->count;
+ dir->sorted_count = ind->sorted_count;
+ dir->size = ind->size;
- dir->info = dyn_i = ind->info;
ind->info = NULL;
+ ind->count = 0;
+ ind->sorted_count = 0;
+ ind->size = 0;
/* Fix up the dyn_sym_info pointers to the global symbol. */
- for (; dyn_i; dyn_i = dyn_i->next)
+ for (count = dir->count, dyn_i = dir->info;
+ count != 0;
+ count--, dyn_i++)
dyn_i->h = &dir->root;
}
- BFD_ASSERT (ind->info == NULL);
/* Copy over the dynindx. */
- if (dir->root.dynindx == -1)
+ if (ind->root.dynindx != -1)
{
+ if (dir->root.dynindx != -1)
+ _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
+ dir->root.dynstr_index);
dir->root.dynindx = ind->root.dynindx;
dir->root.dynstr_index = ind->root.dynstr_index;
ind->root.dynindx = -1;
ind->root.dynstr_index = 0;
}
- BFD_ASSERT (ind->root.dynindx == -1);
}
static void
@@ -1715,12 +1899,15 @@ elfNN_ia64_hash_hide_symbol (info, xh, force_local)
{
struct elfNN_ia64_link_hash_entry *h;
struct elfNN_ia64_dyn_sym_info *dyn_i;
+ unsigned int count;
h = (struct elfNN_ia64_link_hash_entry *)xh;
_bfd_elf_link_hash_hide_symbol (info, &h->root, force_local);
- for (dyn_i = h->info; dyn_i; dyn_i = dyn_i->next)
+ for (count = h->count, dyn_i = h->info;
+ count != 0;
+ count--, dyn_i++)
{
dyn_i->want_plt2 = 0;
dyn_i->want_plt = 0;
@@ -1769,7 +1956,8 @@ elfNN_ia64_hash_table_create (abfd)
return 0;
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
- elfNN_ia64_new_elf_hash_entry))
+ elfNN_ia64_new_elf_hash_entry,
+ sizeof (struct elfNN_ia64_link_hash_entry)))
{
free (ret);
return 0;
@@ -1787,6 +1975,51 @@ elfNN_ia64_hash_table_create (abfd)
return &ret->root.root;
}
+/* Free the global elfNN_ia64_dyn_sym_info array. */
+
+static bfd_boolean
+elfNN_ia64_global_dyn_info_free (void **xentry,
+ PTR unused ATTRIBUTE_UNUSED)
+{
+ struct elfNN_ia64_link_hash_entry *entry
+ = (struct elfNN_ia64_link_hash_entry *) xentry;
+
+ if (entry->root.root.type == bfd_link_hash_warning)
+ entry = (struct elfNN_ia64_link_hash_entry *) entry->root.root.u.i.link;
+
+ if (entry->info)
+ {
+ free (entry->info);
+ entry->info = NULL;
+ entry->count = 0;
+ entry->sorted_count = 0;
+ entry->size = 0;
+ }
+
+ return TRUE;
+}
+
+/* Free the local elfNN_ia64_dyn_sym_info array. */
+
+static bfd_boolean
+elfNN_ia64_local_dyn_info_free (void **slot,
+ PTR unused ATTRIBUTE_UNUSED)
+{
+ struct elfNN_ia64_local_hash_entry *entry
+ = (struct elfNN_ia64_local_hash_entry *) *slot;
+
+ if (entry->info)
+ {
+ free (entry->info);
+ entry->info = NULL;
+ entry->count = 0;
+ entry->sorted_count = 0;
+ entry->size = 0;
+ }
+
+ return TRUE;
+}
+
/* Destroy IA-64 linker hash table. */
static void
@@ -1796,9 +2029,15 @@ elfNN_ia64_hash_table_free (hash)
struct elfNN_ia64_link_hash_table *ia64_info
= (struct elfNN_ia64_link_hash_table *) hash;
if (ia64_info->loc_hash_table)
- htab_delete (ia64_info->loc_hash_table);
+ {
+ htab_traverse (ia64_info->loc_hash_table,
+ elfNN_ia64_local_dyn_info_free, NULL);
+ htab_delete (ia64_info->loc_hash_table);
+ }
if (ia64_info->loc_hash_memory)
objalloc_free ((struct objalloc *) ia64_info->loc_hash_memory);
+ elf_link_hash_traverse (&ia64_info->root,
+ elfNN_ia64_global_dyn_info_free, NULL);
_bfd_generic_link_hash_table_free (hash);
}
@@ -1820,11 +2059,14 @@ elfNN_ia64_global_dyn_sym_thunk (xentry, xdata)
struct elfNN_ia64_dyn_sym_traverse_data *data
= (struct elfNN_ia64_dyn_sym_traverse_data *) xdata;
struct elfNN_ia64_dyn_sym_info *dyn_i;
+ unsigned int count;
if (entry->root.root.type == bfd_link_hash_warning)
entry = (struct elfNN_ia64_link_hash_entry *) entry->root.root.u.i.link;
- for (dyn_i = entry->info; dyn_i; dyn_i = dyn_i->next)
+ for (count = entry->count, dyn_i = entry->info;
+ count != 0;
+ count--, dyn_i++)
if (! (*data->func) (dyn_i, data->data))
return FALSE;
return TRUE;
@@ -1840,11 +2082,14 @@ elfNN_ia64_local_dyn_sym_thunk (slot, xdata)
struct elfNN_ia64_dyn_sym_traverse_data *data
= (struct elfNN_ia64_dyn_sym_traverse_data *) xdata;
struct elfNN_ia64_dyn_sym_info *dyn_i;
+ unsigned int count;
- for (dyn_i = entry->info; dyn_i; dyn_i = dyn_i->next)
+ for (count = entry->count, dyn_i = entry->info;
+ count != 0;
+ count--, dyn_i++)
if (! (*data->func) (dyn_i, data->data))
- return 0;
- return 1;
+ return FALSE;
+ return TRUE;
}
static void
@@ -1890,25 +2135,25 @@ elfNN_ia64_create_dynamic_sections (abfd, info)
if (!get_pltoff (abfd, info, ia64_info))
return FALSE;
- s = bfd_make_section(abfd, ".rela.IA_64.pltoff");
+ s = bfd_make_section_with_flags (abfd, ".rela.IA_64.pltoff",
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (s == NULL
- || !bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
- || !bfd_set_section_alignment (abfd, s, 3))
+ || !bfd_set_section_alignment (abfd, s, LOG_SECTION_ALIGN))
return FALSE;
ia64_info->rel_pltoff_sec = s;
- s = bfd_make_section(abfd, ".rela.got");
+ s = bfd_make_section_with_flags (abfd, ".rela.got",
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (s == NULL
- || !bfd_set_section_flags (abfd, s, (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
- || !bfd_set_section_alignment (abfd, s, 3))
+ || !bfd_set_section_alignment (abfd, s, LOG_SECTION_ALIGN))
return FALSE;
ia64_info->rel_got_sec = s;
@@ -1953,8 +2198,129 @@ get_local_sym_hash (ia64_info, abfd, rel, create)
return ret;
}
+/* Used to sort elfNN_ia64_dyn_sym_info array. */
+
+static int
+addend_compare (const void *xp, const void *yp)
+{
+ const struct elfNN_ia64_dyn_sym_info *x
+ = (const struct elfNN_ia64_dyn_sym_info *) xp;
+ const struct elfNN_ia64_dyn_sym_info *y
+ = (const struct elfNN_ia64_dyn_sym_info *) yp;
+
+ return x->addend - y->addend;
+}
+
+/* Sort elfNN_ia64_dyn_sym_info array and remove duplicates. */
+
+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;
+
+ qsort (info, count, sizeof (*info), addend_compare);
+
+ /* Find the first duplicate. */
+ prev = info [0].addend;
+ for (i = 1; i < count; i++)
+ {
+ curr = info [i].addend;
+ if (curr == prev)
+ break;
+ prev = curr;
+ }
+
+ /* Remove duplicates. */
+ if (i < count)
+ {
+ /* We need to move a block of elements to here. */
+ dest = i++;
+ while (i < count)
+ {
+ curr = info [i].addend;
+
+ /* 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;
+ }
+ else
+ src = i;
+
+ if (src >= count)
+ break;
+
+ /* Find the next duplicate. */
+ prev = info [src].addend;
+ for (dup = src + 1; dup < count; dup++)
+ {
+ curr = info [dup].addend;
+ if (curr == prev)
+ break;
+ prev = curr;
+ }
+
+ /* How much to move. */
+ len = dup - src;
+ i = dup + 1;
+
+ if (len == 1 && dup < count)
+ {
+ /* If we only move 1 element, we combine it with the next
+ one. Find the next different one. */
+ for (diff = dup + 1, src++; diff < count; diff++, src++)
+ if (info [diff].addend != curr)
+ break;
+
+ if (diff < count)
+ {
+ /* Find the next duplicate. */
+ prev = info [diff].addend;
+ for (dup = diff + 1; dup < count; dup++)
+ {
+ curr = info [dup].addend;
+ if (curr == prev)
+ break;
+ prev = curr;
+ diff++;
+ }
+
+ len = diff - src + 1;
+ i = diff + 1;
+ }
+ }
+
+ memmove (&info [dest], &info [src], len * sizeof (*info));
+
+ dest += len;
+ }
+
+ count = dest;
+ }
+
+ return count;
+}
+
/* Find and/or create a descriptor for dynamic symbol info. This will
- vary based on global or local symbol, and the addend to the reloc. */
+ vary based on global or local symbol, and the addend to the reloc.
+
+ We don't sort when inserting. Also, we sort and eliminate
+ duplicates if there is an unsorted section. Typically, this will
+ only happen once, because we do all insertions before lookups. We
+ then use bsearch to do a lookup. This also allows lookups to be
+ fast. So we have fast insertion (O(log N) due to duplicate check),
+ fast lookup (O(log N)) and one sort (O(N log N) expected time).
+ Previously, all lookups were O(N) because of the use of the linked
+ list and also all insertions were O(N) because of the check for
+ duplicates. There are some complications here because the array
+ size grows occasionally, which may add an O(N) factor, but this
+ should be rare. Also, we free the excess array allocation, which
+ requires a copy which is O(N), but this only happens once. */
static struct elfNN_ia64_dyn_sym_info *
get_dyn_sym_info (ia64_info, h, abfd, rel, create)
@@ -1964,12 +2330,22 @@ get_dyn_sym_info (ia64_info, h, abfd, rel, create)
const Elf_Internal_Rela *rel;
bfd_boolean create;
{
- struct elfNN_ia64_dyn_sym_info **pp;
- struct elfNN_ia64_dyn_sym_info *dyn_i;
+ struct elfNN_ia64_dyn_sym_info **info_p, *info, *dyn_i, key;
+ unsigned int *count_p, *sorted_count_p, *size_p;
+ unsigned int count, sorted_count, size;
bfd_vma addend = rel ? rel->r_addend : 0;
+ bfd_size_type amt;
if (h)
- pp = &((struct elfNN_ia64_link_hash_entry *)h)->info;
+ {
+ struct elfNN_ia64_link_hash_entry *global_h;
+
+ global_h = (struct elfNN_ia64_link_hash_entry *) h;
+ info_p = &global_h->info;
+ count_p = &global_h->count;
+ sorted_count_p = &global_h->sorted_count;
+ size_p = &global_h->size;
+ }
else
{
struct elfNN_ia64_local_hash_entry *loc_h;
@@ -1981,18 +2357,107 @@ get_dyn_sym_info (ia64_info, h, abfd, rel, create)
return NULL;
}
- pp = &loc_h->info;
+ info_p = &loc_h->info;
+ count_p = &loc_h->count;
+ sorted_count_p = &loc_h->sorted_count;
+ size_p = &loc_h->size;
}
- for (dyn_i = *pp; dyn_i && dyn_i->addend != addend; dyn_i = *pp)
- pp = &dyn_i->next;
-
- if (dyn_i == NULL && create)
+ count = *count_p;
+ sorted_count = *sorted_count_p;
+ size = *size_p;
+ info = *info_p;
+ if (create)
{
- dyn_i = ((struct elfNN_ia64_dyn_sym_info *)
- bfd_zalloc (abfd, (bfd_size_type) sizeof *dyn_i));
- *pp = dyn_i;
+ /* When we create the array, we don't check for duplicates,
+ except in the previously sorted section if one exists, and
+ against the last inserted entry. This allows insertions to
+ be fast. */
+ if (info)
+ {
+ if (sorted_count)
+ {
+ /* Try bsearch first on the sorted section. */
+ key.addend = addend;
+ dyn_i = bsearch (&key, info, sorted_count,
+ sizeof (*info), addend_compare);
+
+ if (dyn_i)
+ {
+ return dyn_i;
+ }
+ }
+
+ /* Do a quick check for the last inserted entry. */
+ dyn_i = info + count - 1;
+ if (dyn_i->addend == addend)
+ {
+ return dyn_i;
+ }
+ }
+
+ if (size == 0)
+ {
+ /* It is the very first element. We create the array of size
+ 1. */
+ size = 1;
+ amt = size * sizeof (*info);
+ info = bfd_malloc (amt);
+ }
+ else if (size <= count)
+ {
+ /* We double the array size every time when we reach the
+ size limit. */
+ size += size;
+ amt = size * sizeof (*info);
+ info = bfd_realloc (info, amt);
+ }
+ else
+ goto has_space;
+
+ if (info == NULL)
+ return NULL;
+ *size_p = size;
+ *info_p = info;
+
+has_space:
+ /* Append the new one to the array. */
+ dyn_i = info + count;
+ memset (dyn_i, 0, sizeof (*dyn_i));
dyn_i->addend = addend;
+
+ /* We increment count only since the new ones are unsorted and
+ may have duplicate. */
+ (*count_p)++;
+ }
+ else
+ {
+ /* It is a lookup without insertion. Sort array if part of the
+ array isn't sorted. */
+ if (count != sorted_count)
+ {
+ count = sort_dyn_sym_info (info, count);
+ *count_p = count;
+ *sorted_count_p = count;
+ }
+
+ /* Free unused memory. */
+ if (size != count)
+ {
+ amt = count * sizeof (*info);
+ info = bfd_malloc (amt);
+ if (info != NULL)
+ {
+ memcpy (info, *info_p, amt);
+ free (*info_p);
+ *size_p = count;
+ *info_p = info;
+ }
+ }
+
+ key.addend = addend;
+ dyn_i = bsearch (&key, info, count,
+ sizeof (*info), addend_compare);
}
return dyn_i;
@@ -2054,15 +2519,14 @@ get_fptr (abfd, info, ia64_info)
if (!dynobj)
ia64_info->root.dynobj = dynobj = abfd;
- fptr = bfd_make_section (dynobj, ".opd");
+ fptr = bfd_make_section_with_flags (dynobj, ".opd",
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | (info->pie ? 0 : SEC_READONLY)
+ | SEC_LINKER_CREATED));
if (!fptr
- || !bfd_set_section_flags (dynobj, fptr,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | (info->pie ? 0 : SEC_READONLY)
- | SEC_LINKER_CREATED))
|| !bfd_set_section_alignment (abfd, fptr, 4))
{
BFD_ASSERT (0);
@@ -2074,15 +2538,15 @@ get_fptr (abfd, info, ia64_info)
if (info->pie)
{
asection *fptr_rel;
- fptr_rel = bfd_make_section(dynobj, ".rela.opd");
+ fptr_rel = bfd_make_section_with_flags (dynobj, ".rela.opd",
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (fptr_rel == NULL
- || !bfd_set_section_flags (dynobj, fptr_rel,
- (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
- || !bfd_set_section_alignment (abfd, fptr_rel, 3))
+ || !bfd_set_section_alignment (abfd, fptr_rel,
+ LOG_SECTION_ALIGN))
{
BFD_ASSERT (0);
return NULL;
@@ -2111,15 +2575,15 @@ get_pltoff (abfd, info, ia64_info)
if (!dynobj)
ia64_info->root.dynobj = dynobj = abfd;
- pltoff = bfd_make_section (dynobj, ELF_STRING_ia64_pltoff);
+ pltoff = bfd_make_section_with_flags (dynobj,
+ ELF_STRING_ia64_pltoff,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_SMALL_DATA
+ | SEC_LINKER_CREATED));
if (!pltoff
- || !bfd_set_section_flags (dynobj, pltoff,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_SMALL_DATA
- | SEC_LINKER_CREATED))
|| !bfd_set_section_alignment (abfd, pltoff, 4))
{
BFD_ASSERT (0);
@@ -2163,16 +2627,15 @@ get_reloc_section (abfd, ia64_info, sec, create)
srel = bfd_get_section_by_name (dynobj, srel_name);
if (srel == NULL && create)
{
- srel = bfd_make_section (dynobj, srel_name);
+ srel = bfd_make_section_with_flags (dynobj, srel_name,
+ (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
if (srel == NULL
- || !bfd_set_section_flags (dynobj, srel,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
- || !bfd_set_section_alignment (dynobj, srel, 3))
+ || !bfd_set_section_alignment (dynobj, srel,
+ LOG_SECTION_ALIGN))
return NULL;
}
@@ -2219,7 +2682,24 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *relend;
Elf_Internal_Shdr *symtab_hdr;
const Elf_Internal_Rela *rel;
- asection *got, *fptr, *srel;
+ asection *got, *fptr, *srel, *pltoff;
+ enum {
+ NEED_GOT = 1,
+ NEED_GOTX = 2,
+ NEED_FPTR = 4,
+ NEED_PLTOFF = 8,
+ NEED_MIN_PLT = 16,
+ NEED_FULL_PLT = 32,
+ NEED_DYNREL = 64,
+ NEED_LTOFF_FPTR = 128,
+ NEED_TPREL = 256,
+ NEED_DTPMOD = 512,
+ NEED_DTPREL = 1024
+ };
+ int need_entry;
+ struct elf_link_hash_entry *h;
+ unsigned long r_symndx;
+ bfd_boolean maybe_dynamic;
if (info->relocatable)
return TRUE;
@@ -2227,55 +2707,36 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
ia64_info = elfNN_ia64_hash_table (info);
- got = fptr = srel = NULL;
+ got = fptr = srel = pltoff = NULL;
relend = relocs + sec->reloc_count;
+
+ /* We scan relocations first to create dynamic relocation arrays. We
+ modified get_dyn_sym_info to allow fast insertion and support fast
+ lookup in the next loop. */
for (rel = relocs; rel < relend; ++rel)
{
- enum {
- NEED_GOT = 1,
- NEED_GOTX = 2,
- NEED_FPTR = 4,
- NEED_PLTOFF = 8,
- NEED_MIN_PLT = 16,
- NEED_FULL_PLT = 32,
- NEED_DYNREL = 64,
- NEED_LTOFF_FPTR = 128,
- NEED_TPREL = 256,
- NEED_DTPMOD = 512,
- NEED_DTPREL = 1024
- };
-
- struct elf_link_hash_entry *h = NULL;
- unsigned long r_symndx = ELFNN_R_SYM (rel->r_info);
- struct elfNN_ia64_dyn_sym_info *dyn_i;
- int need_entry;
- bfd_boolean maybe_dynamic;
- int dynrel_type = R_IA64_NONE;
-
+ r_symndx = ELFNN_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
- /* We're dealing with a global symbol -- find its hash entry
- and mark it as being referenced. */
long indx = r_symndx - symtab_hdr->sh_info;
h = elf_sym_hashes (abfd)[indx];
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- h->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
}
+ else
+ h = NULL;
/* We can only get preliminary data on whether a symbol is
locally or externally defined, as not all of the input files
have yet been processed. Do something with what we know, as
this may help reduce memory usage and processing time later. */
- maybe_dynamic = FALSE;
- if (h && ((!info->executable
- && (!info->symbolic || info->unresolved_syms_in_shared_libs == RM_IGNORE))
- || ! (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
- || h->root.type == bfd_link_hash_defweak))
- maybe_dynamic = TRUE;
+ maybe_dynamic = (h && ((!info->executable
+ && (!info->symbolic
+ || info->unresolved_syms_in_shared_libs == RM_IGNORE))
+ || !h->def_regular
+ || h->root.type == bfd_link_hash_defweak));
need_entry = 0;
switch (ELFNN_R_TYPE (rel->r_info))
@@ -2284,9 +2745,6 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
case R_IA64_TPREL64LSB:
if (info->shared || maybe_dynamic)
need_entry = NEED_DYNREL;
- dynrel_type = R_IA64_TPREL64LSB;
- if (info->shared)
- info->flags |= DF_STATIC_TLS;
break;
case R_IA64_LTOFF_TPREL22:
@@ -2295,11 +2753,12 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
info->flags |= DF_STATIC_TLS;
break;
+ case R_IA64_DTPREL32MSB:
+ case R_IA64_DTPREL32LSB:
case R_IA64_DTPREL64MSB:
case R_IA64_DTPREL64LSB:
if (info->shared || maybe_dynamic)
need_entry = NEED_DYNREL;
- dynrel_type = R_IA64_DTPREL64LSB;
break;
case R_IA64_LTOFF_DTPREL22:
@@ -2310,7 +2769,6 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
case R_IA64_DTPMOD64LSB:
if (info->shared || maybe_dynamic)
need_entry = NEED_DYNREL;
- dynrel_type = R_IA64_DTPMOD64LSB;
break;
case R_IA64_LTOFF_DTPMOD22:
@@ -2335,7 +2793,6 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
need_entry = NEED_FPTR | NEED_DYNREL;
else
need_entry = NEED_FPTR;
- dynrel_type = R_IA64_FPTR64LSB;
break;
case R_IA64_LTOFF22:
@@ -2385,7 +2842,6 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
/* Shared objects will always need at least a REL relocation. */
if (info->shared || maybe_dynamic)
need_entry = NEED_DYNREL;
- dynrel_type = R_IA64_DIR64LSB;
break;
case R_IA64_IPLTMSB:
@@ -2393,7 +2849,6 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
/* Shared objects will always need at least a REL relocation. */
if (info->shared || maybe_dynamic)
need_entry = NEED_DYNREL;
- dynrel_type = R_IA64_IPLTLSB;
break;
case R_IA64_PCREL22:
@@ -2404,7 +2859,6 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
case R_IA64_PCREL64LSB:
if (maybe_dynamic)
need_entry = NEED_DYNREL;
- dynrel_type = R_IA64_PCREL64LSB;
break;
}
@@ -2419,7 +2873,174 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
abfd, 0, (bfd_vma) 0);
}
- dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, TRUE);
+ if (get_dyn_sym_info (ia64_info, h, abfd, rel, TRUE) == NULL)
+ return FALSE;
+ }
+
+ /* Now, we only do lookup without insertion, which is very fast
+ with the modified get_dyn_sym_info. */
+ for (rel = relocs; rel < relend; ++rel)
+ {
+ struct elfNN_ia64_dyn_sym_info *dyn_i;
+ int dynrel_type = R_IA64_NONE;
+
+ r_symndx = ELFNN_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ /* We're dealing with a global symbol -- find its hash entry
+ and mark it as being referenced. */
+ long indx = r_symndx - symtab_hdr->sh_info;
+ h = elf_sym_hashes (abfd)[indx];
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ h->ref_regular = 1;
+ }
+ else
+ h = NULL;
+
+ /* We can only get preliminary data on whether a symbol is
+ locally or externally defined, as not all of the input files
+ 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
+ || info->unresolved_syms_in_shared_libs == RM_IGNORE))
+ || !h->def_regular
+ || h->root.type == bfd_link_hash_defweak));
+
+ need_entry = 0;
+ switch (ELFNN_R_TYPE (rel->r_info))
+ {
+ case R_IA64_TPREL64MSB:
+ case R_IA64_TPREL64LSB:
+ if (info->shared || maybe_dynamic)
+ need_entry = NEED_DYNREL;
+ dynrel_type = R_IA64_TPREL64LSB;
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ break;
+
+ case R_IA64_LTOFF_TPREL22:
+ need_entry = NEED_TPREL;
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ break;
+
+ case R_IA64_DTPREL32MSB:
+ case R_IA64_DTPREL32LSB:
+ case R_IA64_DTPREL64MSB:
+ case R_IA64_DTPREL64LSB:
+ if (info->shared || maybe_dynamic)
+ need_entry = NEED_DYNREL;
+ dynrel_type = R_IA64_DTPRELNNLSB;
+ break;
+
+ case R_IA64_LTOFF_DTPREL22:
+ need_entry = NEED_DTPREL;
+ break;
+
+ case R_IA64_DTPMOD64MSB:
+ case R_IA64_DTPMOD64LSB:
+ if (info->shared || maybe_dynamic)
+ need_entry = NEED_DYNREL;
+ dynrel_type = R_IA64_DTPMOD64LSB;
+ break;
+
+ case R_IA64_LTOFF_DTPMOD22:
+ need_entry = NEED_DTPMOD;
+ break;
+
+ case R_IA64_LTOFF_FPTR22:
+ case R_IA64_LTOFF_FPTR64I:
+ case R_IA64_LTOFF_FPTR32MSB:
+ case R_IA64_LTOFF_FPTR32LSB:
+ case R_IA64_LTOFF_FPTR64MSB:
+ case R_IA64_LTOFF_FPTR64LSB:
+ need_entry = NEED_FPTR | NEED_GOT | NEED_LTOFF_FPTR;
+ break;
+
+ case R_IA64_FPTR64I:
+ case R_IA64_FPTR32MSB:
+ case R_IA64_FPTR32LSB:
+ case R_IA64_FPTR64MSB:
+ case R_IA64_FPTR64LSB:
+ if (info->shared || h)
+ need_entry = NEED_FPTR | NEED_DYNREL;
+ else
+ need_entry = NEED_FPTR;
+ dynrel_type = R_IA64_FPTRNNLSB;
+ break;
+
+ case R_IA64_LTOFF22:
+ case R_IA64_LTOFF64I:
+ need_entry = NEED_GOT;
+ break;
+
+ case R_IA64_LTOFF22X:
+ need_entry = NEED_GOTX;
+ break;
+
+ case R_IA64_PLTOFF22:
+ case R_IA64_PLTOFF64I:
+ case R_IA64_PLTOFF64MSB:
+ case R_IA64_PLTOFF64LSB:
+ need_entry = NEED_PLTOFF;
+ if (h)
+ {
+ if (maybe_dynamic)
+ need_entry |= NEED_MIN_PLT;
+ }
+ break;
+
+ case R_IA64_PCREL21B:
+ case R_IA64_PCREL60B:
+ /* Depending on where this symbol is defined, we may or may not
+ need a full plt entry. Only skip if we know we'll not need
+ the entry -- static or symbolic, and the symbol definition
+ has already been seen. */
+ if (maybe_dynamic && rel->r_addend == 0)
+ need_entry = NEED_FULL_PLT;
+ break;
+
+ case R_IA64_IMM14:
+ case R_IA64_IMM22:
+ case R_IA64_IMM64:
+ case R_IA64_DIR32MSB:
+ case R_IA64_DIR32LSB:
+ case R_IA64_DIR64MSB:
+ case R_IA64_DIR64LSB:
+ /* Shared objects will always need at least a REL relocation. */
+ if (info->shared || maybe_dynamic)
+ need_entry = NEED_DYNREL;
+ dynrel_type = R_IA64_DIRNNLSB;
+ break;
+
+ case R_IA64_IPLTMSB:
+ case R_IA64_IPLTLSB:
+ /* Shared objects will always need at least a REL relocation. */
+ if (info->shared || maybe_dynamic)
+ need_entry = NEED_DYNREL;
+ dynrel_type = R_IA64_IPLTLSB;
+ break;
+
+ case R_IA64_PCREL22:
+ case R_IA64_PCREL64I:
+ case R_IA64_PCREL32MSB:
+ case R_IA64_PCREL32LSB:
+ case R_IA64_PCREL64MSB:
+ case R_IA64_PCREL64LSB:
+ if (maybe_dynamic)
+ need_entry = NEED_DYNREL;
+ dynrel_type = R_IA64_PCRELNNLSB;
+ break;
+ }
+
+ if (!need_entry)
+ continue;
+
+ dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, FALSE);
/* Record whether or not this is a local symbol. */
dyn_i->h = h;
@@ -2472,13 +3093,24 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
{
if (!ia64_info->root.dynobj)
ia64_info->root.dynobj = abfd;
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 1;
dyn_i->want_plt = 1;
}
if (need_entry & NEED_FULL_PLT)
dyn_i->want_plt2 = 1;
if (need_entry & NEED_PLTOFF)
- dyn_i->want_pltoff = 1;
+ {
+ /* This is needed here, in case @pltoff is used in a non-shared
+ link. */
+ if (!pltoff)
+ {
+ pltoff = get_pltoff (abfd, info, ia64_info);
+ if (!pltoff)
+ return FALSE;
+ }
+
+ dyn_i->want_pltoff = 1;
+ }
if ((need_entry & NEED_DYNREL) && (sec->flags & SEC_ALLOC))
{
if (!srel)
@@ -2557,7 +3189,7 @@ allocate_global_fptr_got (dyn_i, data)
if (dyn_i->want_got
&& dyn_i->want_fptr
- && elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, R_IA64_FPTR64LSB))
+ && elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, R_IA64_FPTRNNLSB))
{
dyn_i->got_offset = x->ofs;
x->ofs += 8;
@@ -2624,7 +3256,8 @@ allocate_fptr (dyn_i, data)
if (!x->info->executable
&& (!h
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak))
+ || (h->root.type != bfd_link_hash_undefweak
+ && h->root.type != bfd_link_hash_undefined)))
{
if (h && h->dynindx == -1)
{
@@ -2668,7 +3301,7 @@ allocate_plt_entries (dyn_i, data)
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- /* ??? Versioned symbols seem to lose ELF_LINK_HASH_NEEDS_PLT. */
+ /* ??? Versioned symbols seem to lose NEEDS_PLT. */
if (elfNN_ia64_dynamic_symbol_p (h, x->info, 0))
{
bfd_size_type offset = x->ofs;
@@ -2756,6 +3389,52 @@ allocate_dynrel_entries (dyn_i, data)
&& ELF_ST_VISIBILITY (dyn_i->h->other)
&& dyn_i->h->root.type == bfd_link_hash_undefweak);
+ /* Take care of the GOT and PLT relocations. */
+
+ if ((!resolved_zero
+ && (dynamic_symbol || shared)
+ && (dyn_i->want_got || dyn_i->want_gotx))
+ || (dyn_i->want_ltoff_fptr
+ && dyn_i->h
+ && dyn_i->h->dynindx != -1))
+ {
+ if (!dyn_i->want_ltoff_fptr
+ || !x->info->pie
+ || dyn_i->h == NULL
+ || dyn_i->h->root.type != bfd_link_hash_undefweak)
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
+ }
+ if ((dynamic_symbol || shared) && dyn_i->want_tprel)
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
+ if (dynamic_symbol && dyn_i->want_dtpmod)
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
+ if (dynamic_symbol && dyn_i->want_dtprel)
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
+
+ if (x->only_got)
+ return TRUE;
+
+ if (ia64_info->rel_fptr_sec && dyn_i->want_fptr)
+ {
+ if (dyn_i->h == NULL || dyn_i->h->root.type != bfd_link_hash_undefweak)
+ ia64_info->rel_fptr_sec->size += sizeof (ElfNN_External_Rela);
+ }
+
+ if (!resolved_zero && dyn_i->want_pltoff)
+ {
+ bfd_size_type t = 0;
+
+ /* Dynamic symbols get one IPLT relocation. Local symbols in
+ shared libraries get two REL relocations. Local symbols in
+ main applications get nothing. */
+ if (dynamic_symbol)
+ t = sizeof (ElfNN_External_Rela);
+ else if (shared)
+ t = 2 * sizeof (ElfNN_External_Rela);
+
+ ia64_info->rel_pltoff_sec->size += t;
+ }
+
/* Take care of the normal data relocations. */
for (rent = dyn_i->reloc_entries; rent; rent = rent->next)
@@ -2764,6 +3443,7 @@ allocate_dynrel_entries (dyn_i, data)
switch (rent->type)
{
+ case R_IA64_FPTR32LSB:
case R_IA64_FPTR64LSB:
/* Allocate one iff !want_fptr and not PIE, which by this point
will be true only if we're actually allocating one statically
@@ -2772,10 +3452,12 @@ allocate_dynrel_entries (dyn_i, data)
if (dyn_i->want_fptr && !x->info->pie)
continue;
break;
+ case R_IA64_PCREL32LSB:
case R_IA64_PCREL64LSB:
if (!dynamic_symbol)
continue;
break;
+ case R_IA64_DIR32LSB:
case R_IA64_DIR64LSB:
if (!dynamic_symbol && !shared)
continue;
@@ -2788,6 +3470,7 @@ allocate_dynrel_entries (dyn_i, data)
if (!dynamic_symbol)
count *= 2;
break;
+ case R_IA64_DTPREL32LSB:
case R_IA64_TPREL64LSB:
case R_IA64_DTPREL64LSB:
case R_IA64_DTPMOD64LSB:
@@ -2797,49 +3480,7 @@ allocate_dynrel_entries (dyn_i, data)
}
if (rent->reltext)
ia64_info->reltext = 1;
- rent->srel->_raw_size += sizeof (ElfNN_External_Rela) * count;
- }
-
- /* Take care of the GOT and PLT relocations. */
-
- if ((!resolved_zero
- && (dynamic_symbol || shared)
- && (dyn_i->want_got || dyn_i->want_gotx))
- || (dyn_i->want_ltoff_fptr
- && dyn_i->h
- && dyn_i->h->dynindx != -1))
- {
- if (!dyn_i->want_ltoff_fptr
- || !x->info->pie
- || dyn_i->h == NULL
- || dyn_i->h->root.type != bfd_link_hash_undefweak)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
- }
- if ((dynamic_symbol || shared) && dyn_i->want_tprel)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
- if (dynamic_symbol && dyn_i->want_dtpmod)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
- if (dynamic_symbol && dyn_i->want_dtprel)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
- if (ia64_info->rel_fptr_sec && dyn_i->want_fptr)
- {
- if (dyn_i->h == NULL || dyn_i->h->root.type != bfd_link_hash_undefweak)
- ia64_info->rel_fptr_sec->_raw_size += sizeof (ElfNN_External_Rela);
- }
-
- if (!resolved_zero && dyn_i->want_pltoff)
- {
- bfd_size_type t = 0;
-
- /* Dynamic symbols get one IPLT relocation. Local symbols in
- shared libraries get two REL relocations. Local symbols in
- main applications get nothing. */
- if (dynamic_symbol)
- t = sizeof (ElfNN_External_Rela);
- else if (shared)
- t = 2 * sizeof (ElfNN_External_Rela);
-
- ia64_info->rel_pltoff_sec->_raw_size += t;
+ rent->srel->size += sizeof (ElfNN_External_Rela) * count;
}
return TRUE;
@@ -2856,12 +3497,12 @@ elfNN_ia64_adjust_dynamic_symbol (info, h)
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
+ if (h->u.weakdef != NULL)
{
- BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
+ 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;
}
@@ -2899,7 +3540,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
sec = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (sec != NULL);
sec->contents = (bfd_byte *) ELF_DYNAMIC_INTERPRETER;
- sec->_raw_size = strlen (ELF_DYNAMIC_INTERPRETER) + 1;
+ sec->size = strlen (ELF_DYNAMIC_INTERPRETER) + 1;
}
/* Allocate the GOT entries. */
@@ -2910,7 +3551,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_data_got, &data);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_fptr_got, &data);
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_local_got, &data);
- ia64_info->got_sec->_raw_size = data.ofs;
+ ia64_info->got_sec->size = data.ofs;
}
/* Allocate the FPTR entries. */
@@ -2919,7 +3560,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
{
data.ofs = 0;
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_fptr, &data);
- ia64_info->fptr_sec->_raw_size = data.ofs;
+ ia64_info->fptr_sec->size = data.ofs;
}
/* Now that we've seen all of the input files, we can decide which
@@ -2949,12 +3590,12 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
BFD_ASSERT (ia64_info->root.dynamic_sections_created);
- ia64_info->plt_sec->_raw_size = data.ofs;
+ ia64_info->plt_sec->size = data.ofs;
/* If we've got a .plt, we need some extra memory for the dynamic
linker. We stuff these in .got.plt. */
sec = bfd_get_section_by_name (dynobj, ".got.plt");
- sec->_raw_size = 8 * PLT_RESERVED_WORDS;
+ sec->size = 8 * PLT_RESERVED_WORDS;
}
/* Allocate the PLTOFF entries. */
@@ -2963,7 +3604,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
{
data.ofs = 0;
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_pltoff_entries, &data);
- ia64_info->pltoff_sec->_raw_size = data.ofs;
+ ia64_info->pltoff_sec->size = data.ofs;
}
if (ia64_info->root.dynamic_sections_created)
@@ -2972,7 +3613,8 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
required. */
if (info->shared && ia64_info->self_dtpmod_offset != (bfd_vma) -1)
- ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
+ ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela);
+ data.only_got = FALSE;
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries, &data);
}
@@ -2993,7 +3635,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
function which decides whether anything needs to go into
these sections. */
- strip = (sec->_raw_size == 0);
+ strip = (sec->size == 0);
if (sec == ia64_info->got_sec)
strip = FALSE;
@@ -3066,12 +3708,12 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
}
if (strip)
- _bfd_strip_section_from_output (info, sec);
+ sec->flags |= SEC_EXCLUDE;
else
{
/* Allocate memory for the section contents. */
- sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->_raw_size);
- if (sec->contents == NULL && sec->_raw_size != 0)
+ sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->size);
+ if (sec->contents == NULL && sec->size != 0)
return FALSE;
}
}
@@ -3125,15 +3767,15 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
}
static bfd_reloc_status_type
-elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
- bfd *abfd;
+elfNN_ia64_install_value (hit_addr, v, r_type)
bfd_byte *hit_addr;
bfd_vma v;
unsigned int r_type;
{
const struct ia64_operand *op;
int bigendian = 0, shift = 0;
- bfd_vma t0, t1, insn, dword;
+ bfd_vma t0, t1, dword;
+ ia64_insn insn;
enum ia64_opnd opnd;
const char *err;
size_t size = 8;
@@ -3258,8 +3900,8 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
{
case IA64_OPND_IMMU64:
hit_addr -= (long) hit_addr & 0x3;
- t0 = bfd_get_64 (abfd, hit_addr);
- t1 = bfd_get_64 (abfd, hit_addr + 8);
+ t0 = bfd_getl64 (hit_addr);
+ t1 = bfd_getl64 (hit_addr + 8);
/* tmpl/s: bits 0.. 5 in t0
slot 0: bits 5..45 in t0
@@ -3281,14 +3923,14 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
| (((val >> 21) & 0x001) << 21) /* ic */
| (((val >> 63) & 0x001) << 36)) << 23; /* i */
- bfd_put_64 (abfd, t0, hit_addr);
- bfd_put_64 (abfd, t1, hit_addr + 8);
+ bfd_putl64 (t0, hit_addr);
+ bfd_putl64 (t1, hit_addr + 8);
break;
case IA64_OPND_TGT64:
hit_addr -= (long) hit_addr & 0x3;
- t0 = bfd_get_64 (abfd, hit_addr);
- t1 = bfd_get_64 (abfd, hit_addr + 8);
+ t0 = bfd_getl64 (hit_addr);
+ t1 = bfd_getl64 (hit_addr + 8);
/* tmpl/s: bits 0.. 5 in t0
slot 0: bits 5..45 in t0
@@ -3306,8 +3948,8 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
t1 |= ((((val >> 0) & 0xfffffLL) << 13) /* imm20b */
| (((val >> 59) & 0x1LL) << 36)) << 23; /* i */
- bfd_put_64 (abfd, t0, hit_addr);
- bfd_put_64 (abfd, t1, hit_addr + 8);
+ bfd_putl64 (t0, hit_addr);
+ bfd_putl64 (t1, hit_addr + 8);
break;
default:
@@ -3318,17 +3960,17 @@ elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
case 2: shift = 23; hit_addr += 6; break;
case 3: return bfd_reloc_notsupported; /* shouldn't happen... */
}
- dword = bfd_get_64 (abfd, hit_addr);
+ dword = bfd_getl64 (hit_addr);
insn = (dword >> shift) & 0x1ffffffffffLL;
op = elf64_ia64_operands + opnd;
- err = (*op->insert) (op, val, (ia64_insn *)& insn);
+ err = (*op->insert) (op, val, &insn);
if (err)
return bfd_reloc_overflow;
dword &= ~(0x1ffffffffffLL << shift);
dword |= (insn << shift);
- bfd_put_64 (abfd, dword, hit_addr);
+ bfd_putl64 (dword, hit_addr);
break;
case IA64_OPND_NIL:
@@ -3382,8 +4024,7 @@ elfNN_ia64_install_dyn_reloc (abfd, info, sec, srel, offset, type,
loc = srel->contents;
loc += srel->reloc_count++ * sizeof (ElfNN_External_Rela);
bfd_elfNN_swap_reloca_out (abfd, &outrel, loc);
- BFD_ASSERT (sizeof (ElfNN_External_Rela) * srel->reloc_count
- <= srel->_cooked_size);
+ BFD_ASSERT (sizeof (ElfNN_External_Rela) * srel->reloc_count <= srel->size);
}
/* Store an entry for target address TARGET_ADDR in the linkage table
@@ -3428,6 +4069,7 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type)
}
got_offset = dyn_i->dtpmod_offset;
break;
+ case R_IA64_DTPREL32LSB:
case R_IA64_DTPREL64LSB:
done = dyn_i->dtprel_done;
dyn_i->dtprel_done = TRUE;
@@ -3452,9 +4094,12 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type)
&& (!dyn_i->h
|| ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
|| dyn_i->h->root.type != bfd_link_hash_undefweak)
+ && dyn_r_type != R_IA64_DTPREL32LSB
&& dyn_r_type != R_IA64_DTPREL64LSB)
|| elfNN_ia64_dynamic_symbol_p (dyn_i->h, info, dyn_r_type)
- || (dynindx != -1 && dyn_r_type == R_IA64_FPTR64LSB))
+ || (dynindx != -1
+ && (dyn_r_type == R_IA64_FPTR32LSB
+ || dyn_r_type == R_IA64_FPTR64LSB)))
&& (!dyn_i->want_ltoff_fptr
|| !info->pie
|| !dyn_i->h
@@ -3463,9 +4108,10 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type)
if (dynindx == -1
&& dyn_r_type != R_IA64_TPREL64LSB
&& dyn_r_type != R_IA64_DTPMOD64LSB
+ && dyn_r_type != R_IA64_DTPREL32LSB
&& dyn_r_type != R_IA64_DTPREL64LSB)
{
- dyn_r_type = R_IA64_REL64LSB;
+ dyn_r_type = R_IA64_RELNNLSB;
dynindx = 0;
addend = value;
}
@@ -3474,6 +4120,18 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type)
{
switch (dyn_r_type)
{
+ case R_IA64_REL32LSB:
+ dyn_r_type = R_IA64_REL32MSB;
+ break;
+ case R_IA64_DIR32LSB:
+ dyn_r_type = R_IA64_DIR32MSB;
+ break;
+ case R_IA64_FPTR32LSB:
+ dyn_r_type = R_IA64_FPTR32MSB;
+ break;
+ case R_IA64_DTPREL32LSB:
+ dyn_r_type = R_IA64_DTPREL32MSB;
+ break;
case R_IA64_REL64LSB:
dyn_r_type = R_IA64_REL64MSB;
break;
@@ -3603,9 +4261,9 @@ set_pltoff_entry (abfd, info, dyn_i, value, is_plt)
unsigned int dyn_r_type;
if (bfd_big_endian (abfd))
- dyn_r_type = R_IA64_REL64MSB;
+ dyn_r_type = R_IA64_RELNNMSB;
else
- dyn_r_type = R_IA64_REL64LSB;
+ dyn_r_type = R_IA64_RELNNLSB;
elfNN_ia64_install_dyn_reloc (abfd, NULL, pltoff_sec,
ia64_info->rel_pltoff_sec,
@@ -3613,7 +4271,7 @@ set_pltoff_entry (abfd, info, dyn_i, value, is_plt)
dyn_r_type, 0, value);
elfNN_ia64_install_dyn_reloc (abfd, NULL, pltoff_sec,
ia64_info->rel_pltoff_sec,
- dyn_i->pltoff_offset + 8,
+ dyn_i->pltoff_offset + ARCH_SIZE / 8,
dyn_r_type, 0, gp);
}
@@ -3631,7 +4289,7 @@ set_pltoff_entry (abfd, info, dyn_i, value, is_plt)
/* Return the base VMA address which should be subtracted from real addresses
when resolving @tprel() relocation.
Main program TLS (whose template starts at PT_TLS p_vaddr)
- is assigned offset round(16, PT_TLS p_align). */
+ is assigned offset round(2 * size of pointer, PT_TLS p_align). */
static bfd_vma
elfNN_ia64_tprel_base (info)
@@ -3640,7 +4298,8 @@ elfNN_ia64_tprel_base (info)
asection *tls_sec = elf_hash_table (info)->tls_sec;
BFD_ASSERT (tls_sec != NULL);
- return tls_sec->vma - align_power ((bfd_vma) 16, tls_sec->alignment_power);
+ return tls_sec->vma - align_power ((bfd_vma) ARCH_SIZE / 4,
+ tls_sec->alignment_power);
}
/* Return the base VMA address which should be subtracted from real addresses
@@ -3699,7 +4358,7 @@ elfNN_ia64_choose_gp (abfd, info)
continue;
lo = os->vma;
- hi = os->vma + os->_raw_size;
+ hi = os->vma + os->size;
if (hi < lo)
hi = (bfd_vma) -1;
@@ -3740,14 +4399,16 @@ elfNN_ia64_choose_gp (abfd, info)
gp_val = got_sec->output_section->vma;
else if (max_short_vma != 0)
gp_val = min_short_vma;
- else
+ else if (max_vma - min_vma < 0x200000)
gp_val = min_vma;
+ else
+ gp_val = max_vma - 0x200000 + 8;
/* If it is possible to address the entire image, but we
don't with the choice above, adjust. */
if (max_vma - min_vma < 0x400000
- && max_vma - gp_val <= 0x200000
- && gp_val - min_vma > 0x200000)
+ && (max_vma - gp_val >= 0x200000
+ || gp_val - min_vma > 0x200000))
gp_val = min_vma + 0x200000;
else if (max_short_vma != 0)
{
@@ -3804,15 +4465,15 @@ elfNN_ia64_final_link (abfd, info)
/* Make sure we've got ourselves a nice fat __gp value. */
if (!info->relocatable)
{
- bfd_vma gp_val = _bfd_get_gp_value (abfd);
+ bfd_vma gp_val;
struct elf_link_hash_entry *gp;
- if (gp_val == 0)
- {
- if (! elfNN_ia64_choose_gp (abfd, info))
- return FALSE;
- gp_val = _bfd_get_gp_value (abfd);
- }
+ /* We assume after gp is set, section size will only decrease. We
+ need to adjust gp for it. */
+ _bfd_set_gp_value (abfd, 0);
+ if (! elfNN_ia64_choose_gp (abfd, info))
+ return FALSE;
+ gp_val = _bfd_get_gp_value (abfd);
gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE,
FALSE, FALSE);
@@ -3835,7 +4496,7 @@ elfNN_ia64_final_link (abfd, info)
{
unwind_output_sec = s->output_section;
unwind_output_sec->contents
- = bfd_malloc (unwind_output_sec->_raw_size);
+ = bfd_malloc (unwind_output_sec->size);
if (unwind_output_sec->contents == NULL)
return FALSE;
}
@@ -3849,13 +4510,13 @@ elfNN_ia64_final_link (abfd, info)
{
elfNN_ia64_unwind_entry_compare_bfd = abfd;
qsort (unwind_output_sec->contents,
- (size_t) (unwind_output_sec->_raw_size / 24),
+ (size_t) (unwind_output_sec->size / 24),
24,
elfNN_ia64_unwind_entry_compare);
if (! bfd_set_section_contents (abfd, unwind_output_sec,
unwind_output_sec->contents, (bfd_vma) 0,
- unwind_output_sec->_raw_size))
+ unwind_output_sec->size))
return FALSE;
}
@@ -3922,8 +4583,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_type > R_IA64_MAX_RELOC_CODE)
{
(*_bfd_error_handler)
- (_("%s: unknown relocation type %d"),
- bfd_archive_filename (input_bfd), (int)r_type);
+ (_("%B: unknown relocation type %d"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
@@ -3954,8 +4615,11 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (loc_h && ! loc_h->sec_merge_done)
{
struct elfNN_ia64_dyn_sym_info *dynent;
+ unsigned int count;
- for (dynent = loc_h->info; dynent; dynent = dynent->next)
+ for (count = loc_h->count, dynent = loc_h->info;
+ count != 0;
+ count--, dynent++)
{
msec = sym_sec;
dynent->addend =
@@ -3963,14 +4627,17 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
elf_section_data (msec)->
sec_info,
sym->st_value
- + dynent->addend,
- (bfd_vma) 0);
+ + dynent->addend);
dynent->addend -= sym->st_value;
dynent->addend += msec->output_section->vma
+ msec->output_offset
- sym_sec->output_section->vma
- sym_sec->output_offset;
}
+
+ qsort (loc_h->info, loc_h->count,
+ sizeof (*loc_h->info), addend_compare);
+
loc_h->sec_merge_done = 1;
}
}
@@ -4028,9 +4695,11 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
/* ??? People shouldn't be doing non-pic code in
shared libraries nor dynamic executables. */
(*_bfd_error_handler)
- (_("%s: non-pic code with imm relocation against dynamic symbol `%s'"),
- bfd_archive_filename (input_bfd),
- h->root.root.string);
+ (_("%B: non-pic code with imm relocation against dynamic symbol `%s'"),
+ input_bfd,
+ h ? h->root.root.string
+ : bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
+ sym_sec));
ret_val = FALSE;
continue;
@@ -4081,7 +4750,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_LTV32LSB:
case R_IA64_LTV64MSB:
case R_IA64_LTV64LSB:
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_GPREL22:
@@ -4093,13 +4762,16 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
- (_("%s: @gprel relocation against dynamic symbol %s"),
- bfd_archive_filename (input_bfd), h->root.root.string);
+ (_("%B: @gprel relocation against dynamic symbol %s"),
+ input_bfd,
+ h ? h->root.root.string
+ : bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
+ sym_sec));
ret_val = FALSE;
continue;
}
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_LTOFF22:
@@ -4107,9 +4779,9 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_LTOFF64I:
dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
value = set_got_entry (input_bfd, info, dyn_i, (h ? h->dynindx : -1),
- rel->r_addend, value, R_IA64_DIR64LSB);
+ rel->r_addend, value, R_IA64_DIRNNLSB);
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_PLTOFF22:
@@ -4119,7 +4791,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
value = set_pltoff_entry (output_bfd, info, dyn_i, value, FALSE);
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_FPTR64I:
@@ -4153,14 +4825,14 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
/* ??? People shouldn't be doing non-pic code in
shared libraries. Hork. */
(*_bfd_error_handler)
- (_("%s: linking non-pic code in a position independent executable"),
- bfd_archive_filename (input_bfd));
+ (_("%B: linking non-pic code in a position independent executable"),
+ input_bfd);
ret_val = FALSE;
continue;
}
dynindx = 0;
addend = value;
- dyn_r_type = r_type + R_IA64_REL64LSB - R_IA64_FPTR64LSB;
+ dyn_r_type = r_type + R_IA64_RELNNLSB - R_IA64_FPTRNNLSB;
}
else if (h)
{
@@ -4184,7 +4856,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
dynindx, addend);
}
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_LTOFF_FPTR22:
@@ -4199,7 +4871,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
if (dyn_i->want_fptr)
{
- BFD_ASSERT (h == NULL || h->dynindx == -1)
+ BFD_ASSERT (h == NULL || h->dynindx == -1);
if (!undef_weak_ref)
value = set_fptr_entry (output_bfd, info, dyn_i, value);
dynindx = -1;
@@ -4224,9 +4896,9 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
}
value = set_got_entry (output_bfd, info, dyn_i, dynindx,
- rel->r_addend, value, R_IA64_FPTR64LSB);
+ rel->r_addend, value, R_IA64_FPTRNNLSB);
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
}
break;
@@ -4283,20 +4955,24 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_PCREL64I:
/* The PCREL21BI reloc is specifically not intended for use with
dynamic relocs. PCREL21F and PCREL21M are used for speculation
- fixup code, and thus probably ought not be dynamic. The
+ fixup code, and thus probably ought not be dynamic. The
PCREL22 and PCREL64I relocs aren't emitted as dynamic relocs. */
if (dynamic_symbol_p)
{
const char *msg;
if (r_type == R_IA64_PCREL21BI)
- msg = _("%s: @internal branch to dynamic symbol %s");
+ msg = _("%B: @internal branch to dynamic symbol %s");
else if (r_type == R_IA64_PCREL21F || r_type == R_IA64_PCREL21M)
- msg = _("%s: speculation fixup to dynamic symbol %s");
+ msg = _("%B: speculation fixup to dynamic symbol %s");
else
- msg = _("%s: @pcrel relocation against dynamic symbol %s");
- (*_bfd_error_handler) (msg, bfd_archive_filename (input_bfd),
- h->root.root.string);
+ msg = _("%B: @pcrel relocation against dynamic symbol %s");
+ (*_bfd_error_handler) (msg, input_bfd,
+ h ? h->root.root.string
+ : bfd_elf_sym_name (input_bfd,
+ symtab_hdr,
+ sym,
+ sym_sec));
ret_val = FALSE;
continue;
}
@@ -4307,7 +4983,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
value -= (input_section->output_section->vma
+ input_section->output_offset
+ rel->r_offset) & ~ (bfd_vma) 0x3;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_SEGREL32MSB:
@@ -4351,8 +5027,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
value -= p->p_vaddr;
else
value = 0;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value,
- r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
}
break;
}
@@ -4361,12 +5036,11 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_SECREL32LSB:
case R_IA64_SECREL64MSB:
case R_IA64_SECREL64LSB:
- /* Make output-section relative. */
- if (value > input_section->output_section->vma)
- value -= input_section->output_section->vma;
- else
- value = 0;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ /* Make output-section relative to section where the symbol
+ is defined. PR 475 */
+ if (sym_sec)
+ value -= sym_sec->output_section->vma;
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_IPLTMSB:
@@ -4407,25 +5081,26 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
r_type = R_IA64_DIR64MSB;
else
r_type = R_IA64_DIR64LSB;
- elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
- r = elfNN_ia64_install_value (output_bfd, hit_addr + 8, gp_val,
- r_type);
+ elfNN_ia64_install_value (hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr + 8, gp_val, r_type);
break;
case R_IA64_TPREL14:
case R_IA64_TPREL22:
case R_IA64_TPREL64I:
value -= elfNN_ia64_tprel_base (info);
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_DTPREL14:
case R_IA64_DTPREL22:
case R_IA64_DTPREL64I:
+ case R_IA64_DTPREL32LSB:
+ case R_IA64_DTPREL32MSB:
case R_IA64_DTPREL64LSB:
case R_IA64_DTPREL64MSB:
value -= elfNN_ia64_dtprel_base (info);
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
break;
case R_IA64_LTOFF_TPREL22:
@@ -4460,15 +5135,14 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_LTOFF_DTPREL22:
if (!dynamic_symbol_p)
value -= elfNN_ia64_dtprel_base (info);
- got_r_type = R_IA64_DTPREL64LSB;
+ got_r_type = R_IA64_DTPRELNNLSB;
break;
}
dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
value = set_got_entry (input_bfd, info, dyn_i, dynindx, r_addend,
value, got_r_type);
value -= gp_val;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value,
- r_type);
+ r = elfNN_ia64_install_value (hit_addr, value, r_type);
}
break;
@@ -4497,15 +5171,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (h)
name = h->root.root.string;
else
- {
- name = bfd_elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
- if (name == NULL)
- return FALSE;
- if (*name == '\0')
- name = bfd_section_name (input_bfd, input_section);
- }
+ name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
+ sym_sec);
if (!(*info->callbacks->warning) (info, _("unsupported reloc"),
name, input_bfd,
input_section, rel->r_offset))
@@ -4524,22 +5191,39 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (h)
name = h->root.root.string;
else
+ name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
+ sym_sec);
+
+ switch (r_type)
{
- name = bfd_elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
- if (name == NULL)
+ case R_IA64_PCREL21B:
+ case R_IA64_PCREL21BI:
+ case R_IA64_PCREL21M:
+ case R_IA64_PCREL21F:
+ if (is_elf_hash_table (info->hash))
+ {
+ /* Relaxtion is always performed for ELF output.
+ Overflow failures for those relocations mean
+ that the section is too big to relax. */
+ (*_bfd_error_handler)
+ (_("%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)."),
+ input_bfd, input_section, howto->name, name,
+ rel->r_offset, input_section->size);
+ break;
+ }
+ default:
+ if (!(*info->callbacks->reloc_overflow) (info,
+ &h->root,
+ name,
+ howto->name,
+ (bfd_vma) 0,
+ input_bfd,
+ input_section,
+ rel->r_offset))
return FALSE;
- if (*name == '\0')
- name = bfd_section_name (input_bfd, input_section);
+ break;
}
- if (!(*info->callbacks->reloc_overflow) (info, name,
- howto->name,
- (bfd_vma) 0,
- input_bfd,
- input_section,
- rel->r_offset))
- return FALSE;
+
ret_val = FALSE;
}
break;
@@ -4579,9 +5263,8 @@ elfNN_ia64_finish_dynamic_symbol (output_bfd, info, h, sym)
loc = plt_sec->contents + dyn_i->plt_offset;
memcpy (loc, plt_min_entry, PLT_MIN_ENTRY_SIZE);
- elfNN_ia64_install_value (output_bfd, loc, index, R_IA64_IMM22);
- elfNN_ia64_install_value (output_bfd, loc+2, -dyn_i->plt_offset,
- R_IA64_PCREL21B);
+ elfNN_ia64_install_value (loc, index, R_IA64_IMM22);
+ elfNN_ia64_install_value (loc+2, -dyn_i->plt_offset, R_IA64_PCREL21B);
plt_addr = (plt_sec->output_section->vma
+ plt_sec->output_offset
@@ -4594,14 +5277,13 @@ elfNN_ia64_finish_dynamic_symbol (output_bfd, info, h, sym)
loc = plt_sec->contents + dyn_i->plt2_offset;
memcpy (loc, plt_full_entry, PLT_FULL_ENTRY_SIZE);
- elfNN_ia64_install_value (output_bfd, loc, pltoff_addr - gp_val,
- R_IA64_IMM22);
+ elfNN_ia64_install_value (loc, pltoff_addr - gp_val, R_IA64_IMM22);
/* Mark the symbol as undefined, rather than as defined in the
plt section. Leave the value alone. */
/* ??? We didn't redefine it in adjust_dynamic_symbol in the
first place. But perhaps elflink.c did some for us. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
sym->st_shndx = SHN_UNDEF;
}
@@ -4633,8 +5315,8 @@ elfNN_ia64_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Mark some specially defined symbols as absolute. */
if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
- || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
+ || h == ia64_info->root.hgot
+ || h == ia64_info->root.hplt)
sym->st_shndx = SHN_ABS;
return TRUE;
@@ -4661,7 +5343,7 @@ elfNN_ia64_finish_dynamic_sections (abfd, info)
sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (sdyn != NULL);
dyncon = (ElfNN_External_Dyn *) sdyn->contents;
- dynconend = (ElfNN_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ dynconend = (ElfNN_External_Dyn *) (sdyn->contents + sdyn->size);
gp_val = _bfd_get_gp_value (abfd);
@@ -4718,7 +5400,7 @@ elfNN_ia64_finish_dynamic_sections (abfd, info)
+ sgotplt->output_offset
- gp_val);
- elfNN_ia64_install_value (abfd, loc+1, pltres, R_IA64_GPREL22);
+ elfNN_ia64_install_value (loc+1, pltres, R_IA64_GPREL22);
}
}
@@ -4785,8 +5467,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_IA_64_TRAPNIL) != (out_flags & EF_IA_64_TRAPNIL))
{
(*_bfd_error_handler)
- (_("%s: linking trap-on-NULL-dereference with non-trapping files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking trap-on-NULL-dereference with non-trapping files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -4794,8 +5476,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_IA_64_BE) != (out_flags & EF_IA_64_BE))
{
(*_bfd_error_handler)
- (_("%s: linking big-endian files with little-endian files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking big-endian files with little-endian files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -4803,8 +5485,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_IA_64_ABI64) != (out_flags & EF_IA_64_ABI64))
{
(*_bfd_error_handler)
- (_("%s: linking 64-bit files with 32-bit files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking 64-bit files with 32-bit files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -4812,8 +5494,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_IA_64_CONS_GP) != (out_flags & EF_IA_64_CONS_GP))
{
(*_bfd_error_handler)
- (_("%s: linking constant-gp files with non-constant-gp files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking constant-gp files with non-constant-gp files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -4822,8 +5504,8 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
!= (out_flags & EF_IA_64_NOFUNCDESC_CONS_GP))
{
(*_bfd_error_handler)
- (_("%s: linking auto-pic files with non-auto-pic files"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking auto-pic files with non-auto-pic files"),
+ ibfd);
bfd_set_error (bfd_error_bad_value);
ok = FALSE;
@@ -4877,14 +5559,107 @@ elfNN_ia64_reloc_type_class (rela)
}
}
-static struct bfd_elf_special_section const elfNN_ia64_special_sections[]=
+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 }
+ { NULL, 0, 0, 0, 0 }
};
static bfd_boolean
+elfNN_ia64_object_p (bfd *abfd)
+{
+ asection *sec;
+ asection *group, *unwi, *unw;
+ flagword flags;
+ const char *name;
+ char *unwi_name, *unw_name;
+ bfd_size_type amt;
+
+ if (abfd->flags & DYNAMIC)
+ return TRUE;
+
+ /* Flags for fake group section. */
+ flags = (SEC_LINKER_CREATED | SEC_GROUP | SEC_LINK_ONCE
+ | SEC_EXCLUDE);
+
+ /* We add a fake section group for each .gnu.linkonce.t.* section,
+ which isn't in a section group, and its unwind sections. */
+ for (sec = abfd->sections; sec != NULL; sec = sec->next)
+ {
+ 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)
+ {
+ name = sec->name + 16;
+
+ amt = strlen (name) + sizeof (".gnu.linkonce.ia64unwi.");
+ unwi_name = bfd_alloc (abfd, amt);
+ if (!unwi_name)
+ return FALSE;
+
+ strcpy (stpcpy (unwi_name, ".gnu.linkonce.ia64unwi."), name);
+ unwi = bfd_get_section_by_name (abfd, unwi_name);
+
+ amt = strlen (name) + sizeof (".gnu.linkonce.ia64unw.");
+ unw_name = bfd_alloc (abfd, amt);
+ if (!unw_name)
+ return FALSE;
+
+ strcpy (stpcpy (unw_name, ".gnu.linkonce.ia64unw."), name);
+ unw = bfd_get_section_by_name (abfd, unw_name);
+
+ /* We need to create a fake group section for it and its
+ unwind sections. */
+ group = bfd_make_section_anyway_with_flags (abfd, name,
+ flags);
+ if (group == NULL)
+ return FALSE;
+
+ /* Move the fake group section to the beginning. */
+ bfd_section_list_remove (abfd, group);
+ bfd_section_list_prepend (abfd, group);
+
+ elf_next_in_group (group) = sec;
+
+ elf_group_name (sec) = name;
+ elf_next_in_group (sec) = sec;
+ elf_sec_group (sec) = group;
+
+ if (unwi)
+ {
+ elf_group_name (unwi) = name;
+ elf_next_in_group (unwi) = sec;
+ elf_next_in_group (sec) = unwi;
+ elf_sec_group (unwi) = group;
+ }
+
+ if (unw)
+ {
+ elf_group_name (unw) = name;
+ if (unwi)
+ {
+ elf_next_in_group (unw) = elf_next_in_group (unwi);
+ elf_next_in_group (unwi) = unw;
+ }
+ else
+ {
+ elf_next_in_group (unw) = sec;
+ elf_next_in_group (sec) = unw;
+ }
+ elf_sec_group (unw) = group;
+ }
+
+ /* Fake SHT_GROUP section header. */
+ elf_section_data (group)->this_hdr.bfd_section = group;
+ elf_section_data (group)->this_hdr.sh_type = SHT_GROUP;
+ }
+ }
+ return TRUE;
+}
+
+static bfd_boolean
elfNN_ia64_hpux_vec (const bfd_target *vec)
{
extern const bfd_target bfd_elfNN_ia64_hpux_big_vec;
@@ -4920,7 +5695,7 @@ static void
elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
asymbol *asym)
{
- elf_symbol_type *elfsym = (elf_symbol_type *) asym;;
+ elf_symbol_type *elfsym = (elf_symbol_type *) asym;
switch (elfsym->internal_elf_sym.st_shndx)
{
@@ -4967,6 +5742,9 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
#define bfd_elfNN_bfd_relax_section \
elfNN_ia64_relax_section
+#define elf_backend_object_p \
+ elfNN_ia64_object_p
+
/* Stuff for the BFD linker: */
#define bfd_elfNN_bfd_link_hash_table_create \
elfNN_ia64_hash_table_create
@@ -5007,10 +5785,18 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
#define elf_backend_want_dynbss 0
#define elf_backend_copy_indirect_symbol elfNN_ia64_hash_copy_indirect
#define elf_backend_hide_symbol elfNN_ia64_hash_hide_symbol
+#define elf_backend_fixup_symbol _bfd_elf_link_hash_fixup_symbol
#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
+/* 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.
+ We don't want to flood users with so many error messages. We turn
+ off the warning for now. It will be turned on later when the Intel
+ compiler is fixed. */
+#define elf_backend_link_order_error_handler NULL
+
#include "elfNN-target.h"
/* HPUX-specific vectors. */
diff --git a/contrib/binutils/bfd/elfxx-mips.c b/contrib/binutils/bfd/elfxx-mips.c
index 0a7495ad5e27..a9aea661f442 100644
--- a/contrib/binutils/bfd/elfxx-mips.c
+++ b/contrib/binutils/bfd/elfxx-mips.c
@@ -34,6 +34,7 @@
#include "elf-bfd.h"
#include "elfxx-mips.h"
#include "elf/mips.h"
+#include "elf-vxworks.h"
/* Get the ECOFF swapping routines. */
#include "coff/sym.h"
@@ -43,8 +44,39 @@
#include "hashtab.h"
-/* This structure is used to hold .got entries while estimating got
- sizes. */
+/* This structure is used to hold information about one GOT entry.
+ There are three types of entry:
+
+ (1) absolute addresses
+ (abfd == NULL)
+ (2) SYMBOL + OFFSET addresses, where SYMBOL is local to an input bfd
+ (abfd != NULL, symndx >= 0)
+ (3) global and forced-local symbols
+ (abfd != NULL, symndx == -1)
+
+ Type (3) entries are treated differently for different types of GOT.
+ In the "master" GOT -- i.e. the one that describes every GOT
+ reference needed in the link -- the mips_got_entry is keyed on both
+ the symbol and the input bfd that references it. If it turns out
+ that we need multiple GOTs, we can then use this information to
+ create separate GOTs for each input bfd.
+
+ However, we want each of these separate GOTs to have at most one
+ entry for a given symbol, so their type (3) entries are keyed only
+ on the symbol. The input bfd given by the "abfd" field is somewhat
+ arbitrary in this case.
+
+ This means that when there are multiple GOTs, each GOT has a unique
+ mips_got_entry for every symbol within it. We can therefore use the
+ mips_got_entry fields (tls_type and gotidx) to track the symbol's
+ GOT index.
+
+ However, if it turns out that we need only a single GOT, we continue
+ to use the master GOT to describe it. There may therefore be several
+ mips_got_entries for the same symbol, each with a different input bfd.
+ We want to make sure that each symbol gets a unique GOT entry, so when
+ there's a single GOT, we use the symbol's hash entry, not the
+ mips_got_entry fields, to track a symbol's GOT index. */
struct mips_got_entry
{
/* The input bfd in which the symbol is defined. */
@@ -64,6 +96,14 @@ struct mips_got_entry
h->forced_local). */
struct mips_elf_link_hash_entry *h;
} d;
+
+ /* The TLS types included in this GOT entry (specifically, GD and
+ IE). The GD and IE flags can be added as we encounter new
+ relocations. LDM can also be set; it will always be alone, not
+ combined with any GD or IE flags. An LDM GOT entry will be
+ a local symbol entry with r_symndx == 0. */
+ unsigned char tls_type;
+
/* 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. */
@@ -79,6 +119,11 @@ struct mips_got_info
struct elf_link_hash_entry *global_gotsym;
/* The number of global .got entries. */
unsigned int global_gotno;
+ /* The number of .got slots used for TLS. */
+ unsigned int tls_gotno;
+ /* The first unused TLS .got entry. Used only during
+ mips_elf_initialize_tls_index. */
+ unsigned int tls_assigned_gotno;
/* The number of local .got entries. */
unsigned int local_gotno;
/* The number of local .got entries we have used. */
@@ -91,6 +136,11 @@ struct mips_got_info
/* In multi-got links, a pointer to the next got (err, rather, most
of the time, it points to the previous got). */
struct mips_got_info *next;
+ /* This is the GOT index of the TLS LDM entry for the GOT, MINUS_ONE
+ for none, or MINUS_TWO for not yet assigned. This is needed
+ because a single-GOT link may have multiple hash table entries
+ for the LDM. It does not get initialized in multi-GOT mode. */
+ bfd_vma tls_ldm_offset;
};
/* Map an input bfd to a got in a multi-got link. */
@@ -125,6 +175,11 @@ struct mips_elf_got_per_bfd_arg
unsigned int primary_count;
/* The number of local and global entries in the current got. */
unsigned int current_count;
+ /* The total number of global entries which will live in the
+ primary got and be automatically relocated. This includes
+ those not referenced by the primary GOT but included in
+ the "master" GOT. */
+ unsigned int global_count;
};
/* Another structure used to pass arguments for got entries traversal. */
@@ -137,6 +192,15 @@ struct mips_elf_set_global_got_offset_arg
struct bfd_link_info *info;
};
+/* A structure used to count TLS relocations or GOT entries, for GOT
+ entry or ELF symbol table traversal. */
+
+struct mips_elf_count_tls_arg
+{
+ struct bfd_link_info *info;
+ unsigned int needed;
+};
+
struct _mips_elf_section_data
{
struct bfd_elf_section_data elf;
@@ -158,8 +222,8 @@ struct mips_elf_hash_sort_data
/* The symbol in the global GOT with the lowest dynamic symbol table
index. */
struct elf_link_hash_entry *low;
- /* The least dynamic symbol table index corresponding to a symbol
- with a GOT entry. */
+ /* The least dynamic symbol table index corresponding to a non-TLS
+ 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
@@ -210,8 +274,30 @@ struct mips_elf_link_hash_entry
being called returns a floating point value. */
asection *call_fp_stub;
- /* Are we forced local? .*/
+ /* 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;
+
+ /* Are we referenced by some kind of relocation? */
+ bfd_boolean is_relocation_target;
+
+ /* Are we referenced by branch relocations? */
+ bfd_boolean is_branch_target;
+
+#define GOT_NORMAL 0
+#define GOT_TLS_GD 1
+#define GOT_TLS_LDM 2
+#define GOT_TLS_IE 4
+#define GOT_TLS_OFFSET_DONE 0x40
+#define GOT_TLS_DONE 0x80
+ unsigned char tls_type;
+ /* This is only used in single-GOT mode; in multi-GOT mode there
+ is one mips_got_entry per GOT entry, so the offset is stored
+ there. In single-GOT mode there may be many mips_got_entry
+ structures all referring to the same GOT slot. It might be
+ possible to use root.got.offset instead, but that field is
+ overloaded already. */
+ bfd_vma tls_got_offset;
};
/* MIPS ELF linker hash table. */
@@ -235,8 +321,39 @@ struct mips_elf_link_hash_table
bfd_vma rld_value;
/* This is set if we see any mips16 stub sections. */
bfd_boolean mips16_stubs_seen;
+ /* True if we're generating code for VxWorks. */
+ bfd_boolean is_vxworks;
+ /* Shortcuts to some dynamic sections, or NULL if they are not
+ being used. */
+ asection *srelbss;
+ asection *sdynbss;
+ asection *srelplt;
+ asection *srelplt2;
+ asection *sgotplt;
+ asection *splt;
+ /* The size of the PLT header in bytes (VxWorks only). */
+ bfd_vma plt_header_size;
+ /* The size of a PLT entry in bytes (VxWorks only). */
+ bfd_vma plt_entry_size;
+ /* The size of a function stub entry in bytes. */
+ bfd_vma function_stub_size;
};
+#define TLS_RELOC_P(r_type) \
+ (r_type == R_MIPS_TLS_DTPMOD32 \
+ || r_type == R_MIPS_TLS_DTPMOD64 \
+ || r_type == R_MIPS_TLS_DTPREL32 \
+ || r_type == R_MIPS_TLS_DTPREL64 \
+ || r_type == R_MIPS_TLS_GD \
+ || r_type == R_MIPS_TLS_LDM \
+ || r_type == R_MIPS_TLS_DTPREL_HI16 \
+ || r_type == R_MIPS_TLS_DTPREL_LO16 \
+ || r_type == R_MIPS_TLS_GOTTPREL \
+ || r_type == R_MIPS_TLS_TPREL32 \
+ || r_type == R_MIPS_TLS_TPREL64 \
+ || r_type == R_MIPS_TLS_TPREL_HI16 \
+ || r_type == R_MIPS_TLS_TPREL_LO16)
+
/* Structure used to pass information to mips_elf_output_extsym. */
struct extsym_info
@@ -369,134 +486,21 @@ typedef struct runtime_pdr {
#define cbRPDR sizeof (RPDR)
#define rpdNil ((pRPDR) 0)
-static struct bfd_hash_entry *mips_elf_link_hash_newfunc
- (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-static void ecoff_swap_rpdr_out
- (bfd *, const RPDR *, struct rpdr_ext *);
-static bfd_boolean mips_elf_create_procedure_table
- (void *, bfd *, struct bfd_link_info *, asection *,
- struct ecoff_debug_info *);
-static bfd_boolean mips_elf_check_mips16_stubs
- (struct mips_elf_link_hash_entry *, void *);
-static void bfd_mips_elf32_swap_gptab_in
- (bfd *, const Elf32_External_gptab *, Elf32_gptab *);
-static void bfd_mips_elf32_swap_gptab_out
- (bfd *, const Elf32_gptab *, Elf32_External_gptab *);
-static void bfd_elf32_swap_compact_rel_out
- (bfd *, const Elf32_compact_rel *, Elf32_External_compact_rel *);
-static void bfd_elf32_swap_crinfo_out
- (bfd *, const Elf32_crinfo *, Elf32_External_crinfo *);
-static int sort_dynamic_relocs
- (const void *, const void *);
-static int sort_dynamic_relocs_64
- (const void *, const void *);
-static bfd_boolean mips_elf_output_extsym
- (struct mips_elf_link_hash_entry *, void *);
-static int gptab_compare
- (const void *, const void *);
-static asection *mips_elf_rel_dyn_section
- (bfd *, bfd_boolean);
-static asection *mips_elf_got_section
- (bfd *, bfd_boolean);
-static struct mips_got_info *mips_elf_got_info
- (bfd *, asection **);
-static long mips_elf_get_global_gotsym_index
- (bfd *abfd);
-static bfd_vma mips_elf_local_got_index
- (bfd *, bfd *, struct bfd_link_info *, bfd_vma);
-static bfd_vma mips_elf_global_got_index
- (bfd *, bfd *, struct elf_link_hash_entry *);
-static bfd_vma mips_elf_got_page
- (bfd *, bfd *, struct bfd_link_info *, bfd_vma, bfd_vma *);
-static bfd_vma mips_elf_got16_entry
- (bfd *, bfd *, struct bfd_link_info *, bfd_vma, bfd_boolean);
-static bfd_vma mips_elf_got_offset_from_index
- (bfd *, bfd *, bfd *, bfd_vma);
static struct mips_got_entry *mips_elf_create_local_got_entry
- (bfd *, bfd *, struct mips_got_info *, asection *, bfd_vma);
-static bfd_boolean mips_elf_sort_hash_table
- (struct bfd_link_info *, unsigned long);
+ (bfd *, struct bfd_link_info *, bfd *, struct mips_got_info *, asection *,
+ asection *, 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_boolean mips_elf_record_local_got_symbol
- (bfd *, long, bfd_vma, struct mips_got_info *);
-static bfd_boolean mips_elf_record_global_got_symbol
- (struct elf_link_hash_entry *, bfd *, struct bfd_link_info *,
- struct mips_got_info *);
-static const Elf_Internal_Rela *mips_elf_next_relocation
- (bfd *, unsigned int, const Elf_Internal_Rela *, const Elf_Internal_Rela *);
-static bfd_boolean mips_elf_local_relocation_p
- (bfd *, const Elf_Internal_Rela *, asection **, bfd_boolean);
-static bfd_boolean mips_elf_overflow_p
- (bfd_vma, int);
static bfd_vma mips_elf_high
(bfd_vma);
-static bfd_vma mips_elf_higher
- (bfd_vma);
-static bfd_vma mips_elf_highest
- (bfd_vma);
-static bfd_boolean mips_elf_create_compact_rel_section
- (bfd *, struct bfd_link_info *);
-static bfd_boolean mips_elf_create_got_section
- (bfd *, struct bfd_link_info *, bfd_boolean);
-static bfd_reloc_status_type mips_elf_calculate_relocation
- (bfd *, bfd *, asection *, struct bfd_link_info *,
- const Elf_Internal_Rela *, bfd_vma, reloc_howto_type *,
- Elf_Internal_Sym *, asection **, bfd_vma *, const char **,
- bfd_boolean *, bfd_boolean);
-static bfd_vma mips_elf_obtain_contents
- (reloc_howto_type *, const Elf_Internal_Rela *, bfd *, bfd_byte *);
-static bfd_boolean mips_elf_perform_relocation
- (struct bfd_link_info *, reloc_howto_type *, const Elf_Internal_Rela *,
- bfd_vma, bfd *, asection *, bfd_byte *, bfd_boolean);
static bfd_boolean mips_elf_stub_section_p
(bfd *, asection *);
-static void mips_elf_allocate_dynamic_relocations
- (bfd *, unsigned int);
static bfd_boolean mips_elf_create_dynamic_relocation
(bfd *, struct bfd_link_info *, const Elf_Internal_Rela *,
struct mips_elf_link_hash_entry *, asection *, bfd_vma,
bfd_vma *, asection *);
-static void mips_set_isa_flags
- (bfd *);
-static INLINE char *elf_mips_abi_name
- (bfd *);
-static void mips_elf_irix6_finish_dynamic_symbol
- (bfd *, const char *, Elf_Internal_Sym *);
-static bfd_boolean mips_mach_extends_p
- (unsigned long, unsigned long);
-static bfd_boolean mips_32bit_flags_p
- (flagword);
-static INLINE hashval_t mips_elf_hash_bfd_vma
- (bfd_vma);
static hashval_t mips_elf_got_entry_hash
(const void *);
-static int mips_elf_got_entry_eq
- (const void *, const void *);
-
-static bfd_boolean mips_elf_multi_got
- (bfd *, struct bfd_link_info *, struct mips_got_info *,
- asection *, bfd_size_type);
-static hashval_t mips_elf_multi_got_entry_hash
- (const void *);
-static int mips_elf_multi_got_entry_eq
- (const void *, const void *);
-static hashval_t mips_elf_bfd2got_entry_hash
- (const void *);
-static int mips_elf_bfd2got_entry_eq
- (const void *, const void *);
-static int mips_elf_make_got_per_bfd
- (void **, void *);
-static int mips_elf_merge_gots
- (void **, void *);
-static int mips_elf_set_global_got_offset
- (void **, void *);
-static int mips_elf_set_no_stub
- (void **, void *);
-static int mips_elf_resolve_final_got_entry
- (void **, void *);
-static void mips_elf_resolve_final_got_entries
- (struct mips_got_info *);
static bfd_vma mips_elf_adjust_gp
(bfd *, struct mips_got_info *, bfd *);
static struct mips_got_info *mips_elf_got_for_ibfd
@@ -506,7 +510,6 @@ static struct mips_got_info *mips_elf_got_for_ibfd
static bfd *reldyn_sorting_bfd;
/* Nonzero if ABFD is using the N32 ABI. */
-
#define ABI_N32_P(abfd) \
((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI2) != 0)
@@ -529,6 +532,16 @@ static bfd *reldyn_sorting_bfd;
#define MIPS_ELF_OPTIONS_SECTION_NAME(abfd) \
(NEWABI_P (abfd) ? ".MIPS.options" : ".options")
+/* True if NAME is the recognized name of any SHT_MIPS_OPTIONS section.
+ Some IRIX system files do not use MIPS_ELF_OPTIONS_SECTION_NAME. */
+#define MIPS_ELF_OPTIONS_SECTION_NAME_P(NAME) \
+ (strcmp (NAME, ".MIPS.options") == 0 || strcmp (NAME, ".options") == 0)
+
+/* Whether the section is readonly. */
+#define MIPS_ELF_READONLY_SECTION(sec) \
+ ((sec->flags & (SEC_ALLOC | SEC_LOAD | SEC_READONLY)) \
+ == (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
+
/* The name of the stub section. */
#define MIPS_ELF_STUB_SECTION_NAME(abfd) ".MIPS.stubs"
@@ -536,6 +549,10 @@ static bfd *reldyn_sorting_bfd;
#define MIPS_ELF_REL_SIZE(abfd) \
(get_elf_backend_data (abfd)->s->sizeof_rel)
+/* The size of an external RELA relocation. */
+#define MIPS_ELF_RELA_SIZE(abfd) \
+ (get_elf_backend_data (abfd)->s->sizeof_rela)
+
/* The size of an external dynamic table entry. */
#define MIPS_ELF_DYN_SIZE(abfd) \
(get_elf_backend_data (abfd)->s->sizeof_dyn)
@@ -586,35 +603,47 @@ static bfd *reldyn_sorting_bfd;
== (ABI_64_P (abfd) ? sizeof (Elf64_External_Rela) \
: sizeof (Elf32_External_Rela))))
+/* The name of the dynamic relocation section. */
+#define MIPS_ELF_REL_DYN_NAME(INFO) \
+ (mips_elf_hash_table (INFO)->is_vxworks ? ".rela.dyn" : ".rel.dyn")
+
/* 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)
/* The number of local .got entries we reserve. */
-#define MIPS_RESERVED_GOTNO (2)
+#define MIPS_RESERVED_GOTNO(INFO) \
+ (mips_elf_hash_table (INFO)->is_vxworks ? 3 : 2)
/* The offset of $gp from the beginning of the .got section. */
-#define ELF_MIPS_GP_OFFSET(abfd) (0x7ff0)
+#define ELF_MIPS_GP_OFFSET(INFO) \
+ (mips_elf_hash_table (INFO)->is_vxworks ? 0x0 : 0x7ff0)
/* The maximum size of the GOT for it to be addressable using 16-bit
offsets from $gp. */
-#define MIPS_ELF_GOT_MAX_SIZE(abfd) (ELF_MIPS_GP_OFFSET(abfd) + 0x7fff)
+#define MIPS_ELF_GOT_MAX_SIZE(INFO) (ELF_MIPS_GP_OFFSET (INFO) + 0x7fff)
/* Instructions which appear in a stub. */
-#define STUB_LW(abfd) \
- ((ABI_64_P (abfd) \
- ? 0xdf998010 /* ld t9,0x8010(gp) */ \
- : 0x8f998010)) /* lw t9,0x8010(gp) */
-#define STUB_MOVE(abfd) \
- ((ABI_64_P (abfd) \
- ? 0x03e0782d /* daddu t7,ra */ \
- : 0x03e07821)) /* addu t7,ra */
-#define STUB_JALR 0x0320f809 /* jalr t9,ra */
-#define STUB_LI16(abfd) \
- ((ABI_64_P (abfd) \
- ? 0x64180000 /* daddiu t8,zero,0 */ \
- : 0x24180000)) /* addiu t8,zero,0 */
-#define MIPS_FUNCTION_STUB_SIZE (16)
+#define STUB_LW(abfd) \
+ ((ABI_64_P (abfd) \
+ ? 0xdf998010 /* ld t9,0x8010(gp) */ \
+ : 0x8f998010)) /* lw t9,0x8010(gp) */
+#define STUB_MOVE(abfd) \
+ ((ABI_64_P (abfd) \
+ ? 0x03e0782d /* daddu t7,ra */ \
+ : 0x03e07821)) /* addu t7,ra */
+#define STUB_LUI(VAL) (0x3c180000 + (VAL)) /* lui t8,VAL */
+#define STUB_JALR 0x0320f809 /* jalr t9,ra */
+#define STUB_ORI(VAL) (0x37180000 + (VAL)) /* ori t8,t8,VAL */
+#define STUB_LI16U(VAL) (0x34180000 + (VAL)) /* ori t8,zero,VAL unsigned */
+#define STUB_LI16S(abfd, VAL) \
+ ((ABI_64_P (abfd) \
+ ? (0x64180000 + (VAL)) /* daddiu t8,zero,VAL sign extended */ \
+ : (0x24180000 + (VAL)))) /* addiu t8,zero,VAL sign extended */
+
+#define MIPS_FUNCTION_STUB_NORMAL_SIZE 16
+#define MIPS_FUNCTION_STUB_BIG_SIZE 20
/* The name of the dynamic interpreter. This is put in the .interp
section. */
@@ -681,6 +710,44 @@ static bfd *reldyn_sorting_bfd;
#define CALL_STUB ".mips16.call."
#define CALL_FP_STUB ".mips16.call.fp."
+/* The format of the first PLT entry in a VxWorks executable. */
+static const bfd_vma mips_vxworks_exec_plt0_entry[] = {
+ 0x3c190000, /* lui t9, %hi(_GLOBAL_OFFSET_TABLE_) */
+ 0x27390000, /* addiu t9, t9, %lo(_GLOBAL_OFFSET_TABLE_) */
+ 0x8f390008, /* lw t9, 8(t9) */
+ 0x00000000, /* nop */
+ 0x03200008, /* jr t9 */
+ 0x00000000 /* nop */
+};
+
+/* The format of subsequent PLT entries. */
+static const bfd_vma mips_vxworks_exec_plt_entry[] = {
+ 0x10000000, /* b .PLT_resolver */
+ 0x24180000, /* li t8, <pltindex> */
+ 0x3c190000, /* lui t9, %hi(<.got.plt slot>) */
+ 0x27390000, /* addiu t9, t9, %lo(<.got.plt slot>) */
+ 0x8f390000, /* lw t9, 0(t9) */
+ 0x00000000, /* nop */
+ 0x03200008, /* jr t9 */
+ 0x00000000 /* nop */
+};
+
+/* The format of the first PLT entry in a VxWorks shared object. */
+static const bfd_vma mips_vxworks_shared_plt0_entry[] = {
+ 0x8f990008, /* lw t9, 8(gp) */
+ 0x00000000, /* nop */
+ 0x03200008, /* jr t9 */
+ 0x00000000, /* nop */
+ 0x00000000, /* nop */
+ 0x00000000 /* nop */
+};
+
+/* The format of subsequent PLT entries. */
+static const bfd_vma mips_vxworks_shared_plt_entry[] = {
+ 0x10000000, /* b .PLT_resolver */
+ 0x24180000 /* li t8, <pltindex> */
+};
+
/* Look up an entry in a MIPS ELF linker hash table. */
#define mips_elf_link_hash_lookup(table, string, create, copy, follow) \
@@ -701,6 +768,30 @@ static bfd *reldyn_sorting_bfd;
#define mips_elf_hash_table(p) \
((struct mips_elf_link_hash_table *) ((p)->hash))
+/* Find the base offsets for thread-local storage in this object,
+ for GD/LD and IE/LE respectively. */
+
+#define TP_OFFSET 0x7000
+#define DTP_OFFSET 0x8000
+
+static bfd_vma
+dtprel_base (struct bfd_link_info *info)
+{
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
+ return 0;
+ return elf_hash_table (info)->tls_sec->vma + DTP_OFFSET;
+}
+
+static bfd_vma
+tprel_base (struct bfd_link_info *info)
+{
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
+ return 0;
+ return elf_hash_table (info)->tls_sec->vma + TP_OFFSET;
+}
+
/* Create an entry in a MIPS ELF linker hash table. */
static struct bfd_hash_entry *
@@ -736,6 +827,9 @@ mips_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
ret->call_stub = NULL;
ret->call_fp_stub = NULL;
ret->forced_local = FALSE;
+ ret->is_branch_target = FALSE;
+ ret->is_relocation_target = FALSE;
+ ret->tls_type = GOT_NORMAL;
}
return (struct bfd_hash_entry *) ret;
@@ -811,7 +905,6 @@ _bfd_mips_elf_read_ecoff_info (bfd *abfd, asection *section,
#undef READ
debug->fdr = NULL;
- debug->adjust = NULL;
return TRUE;
@@ -859,9 +952,6 @@ ecoff_swap_rpdr_out (bfd *abfd, const RPDR *in, struct rpdr_ext *ex)
H_PUT_16 (abfd, in->pcreg, ex->p_pcreg);
H_PUT_32 (abfd, in->irpss, ex->p_irpss);
-#if 0 /* FIXME */
- H_PUT_S32 (abfd, in->exception_info, ex->p_exception_info);
-#endif
}
/* Create a runtime procedure table from the .mdebug section. */
@@ -932,7 +1022,7 @@ mips_elf_create_procedure_table (void *handle, bfd *abfd,
ss = bfd_malloc (count);
if (ss == NULL)
goto error_return;
- if (! _bfd_ecoff_get_accumulated_ss (handle, ss))
+ if (! _bfd_ecoff_get_accumulated_ss (handle, (bfd_byte *) ss))
goto error_return;
count = hdr->ipdMax;
@@ -980,12 +1070,12 @@ mips_elf_create_procedure_table (void *handle, bfd *abfd,
H_PUT_S32 (abfd, -1, (erp + count)->p_adr);
/* Set the size and contents of .rtproc section. */
- s->_raw_size = size;
+ s->size = size;
s->contents = rtproc;
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
- s->link_order_head = NULL;
+ s->map_head.link_order = NULL;
if (epdr != NULL)
free (epdr);
@@ -1030,8 +1120,7 @@ mips_elf_check_mips16_stubs (struct mips_elf_link_hash_entry *h,
/* We don't need the fn_stub; the only references to this symbol
are 16 bit calls. Clobber the size to 0 to prevent it from
being included in the link. */
- h->fn_stub->_raw_size = 0;
- h->fn_stub->_cooked_size = 0;
+ h->fn_stub->size = 0;
h->fn_stub->flags &= ~SEC_RELOC;
h->fn_stub->reloc_count = 0;
h->fn_stub->flags |= SEC_EXCLUDE;
@@ -1043,8 +1132,7 @@ mips_elf_check_mips16_stubs (struct mips_elf_link_hash_entry *h,
/* We don't need the call_stub; this is a 16 bit function, so
calls from other 16 bit functions are OK. Clobber the size
to 0 to prevent it from being included in the link. */
- h->call_stub->_raw_size = 0;
- h->call_stub->_cooked_size = 0;
+ h->call_stub->size = 0;
h->call_stub->flags &= ~SEC_RELOC;
h->call_stub->reloc_count = 0;
h->call_stub->flags |= SEC_EXCLUDE;
@@ -1056,8 +1144,7 @@ mips_elf_check_mips16_stubs (struct mips_elf_link_hash_entry *h,
/* We don't need the call_stub; this is a 16 bit function, so
calls from other 16 bit functions are OK. Clobber the size
to 0 to prevent it from being included in the link. */
- h->call_fp_stub->_raw_size = 0;
- h->call_fp_stub->_cooked_size = 0;
+ h->call_fp_stub->size = 0;
h->call_fp_stub->flags &= ~SEC_RELOC;
h->call_fp_stub->reloc_count = 0;
h->call_fp_stub->flags |= SEC_EXCLUDE;
@@ -1066,6 +1153,152 @@ mips_elf_check_mips16_stubs (struct mips_elf_link_hash_entry *h,
return TRUE;
}
+/* R_MIPS16_26 is used for the mips16 jal and jalx instructions.
+ Most mips16 instructions are 16 bits, but these instructions
+ are 32 bits.
+
+ The format of these instructions is:
+
+ +--------------+--------------------------------+
+ | JALX | X| Imm 20:16 | Imm 25:21 |
+ +--------------+--------------------------------+
+ | Immediate 15:0 |
+ +-----------------------------------------------+
+
+ JALX is the 5-bit value 00011. X is 0 for jal, 1 for jalx.
+ Note that the immediate value in the first word is swapped.
+
+ When producing a relocatable object file, R_MIPS16_26 is
+ handled mostly like R_MIPS_26. In particular, the addend is
+ stored as a straight 26-bit value in a 32-bit instruction.
+ (gas makes life simpler for itself by never adjusting a
+ R_MIPS16_26 reloc to be against a section, so the addend is
+ always zero). However, the 32 bit instruction is stored as 2
+ 16-bit values, rather than a single 32-bit value. In a
+ big-endian file, the result is the same; in a little-endian
+ file, the two 16-bit halves of the 32 bit value are swapped.
+ This is so that a disassembler can recognize the jal
+ instruction.
+
+ When doing a final link, R_MIPS16_26 is treated as a 32 bit
+ instruction stored as two 16-bit values. The addend A is the
+ contents of the targ26 field. The calculation is the same as
+ R_MIPS_26. When storing the calculated value, reorder the
+ immediate value as shown above, and don't forget to store the
+ value as two 16-bit values.
+
+ To put it in MIPS ABI terms, the relocation field is T-targ26-16,
+ defined as
+
+ big-endian:
+ +--------+----------------------+
+ | | |
+ | | targ26-16 |
+ |31 26|25 0|
+ +--------+----------------------+
+
+ little-endian:
+ +----------+------+-------------+
+ | | | |
+ | sub1 | | sub2 |
+ |0 9|10 15|16 31|
+ +----------+--------------------+
+ where targ26-16 is sub1 followed by sub2 (i.e., the addend field A is
+ ((sub1 << 16) | sub2)).
+
+ When producing a relocatable object file, the calculation is
+ (((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2)
+ When producing a fully linked file, the calculation is
+ let R = (((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2)
+ ((R & 0x1f0000) << 5) | ((R & 0x3e00000) >> 5) | (R & 0xffff)
+
+ R_MIPS16_GPREL is used for GP-relative addressing in mips16
+ mode. A typical instruction will have a format like this:
+
+ +--------------+--------------------------------+
+ | EXTEND | Imm 10:5 | Imm 15:11 |
+ +--------------+--------------------------------+
+ | Major | rx | ry | Imm 4:0 |
+ +--------------+--------------------------------+
+
+ EXTEND is the five bit value 11110. Major is the instruction
+ opcode.
+
+ This is handled exactly like R_MIPS_GPREL16, except that the
+ addend is retrieved and stored as shown in this diagram; that
+ is, the Imm fields above replace the V-rel16 field.
+
+ All we need to do here is shuffle the bits appropriately. As
+ above, the two 16-bit halves must be swapped on a
+ little-endian system.
+
+ R_MIPS16_HI16 and R_MIPS16_LO16 are used in mips16 mode to
+ access data when neither GP-relative nor PC-relative addressing
+ can be used. They are handled like R_MIPS_HI16 and R_MIPS_LO16,
+ except that the addend is retrieved and stored as shown above
+ for R_MIPS16_GPREL.
+ */
+void
+_bfd_mips16_elf_reloc_unshuffle (bfd *abfd, int r_type,
+ bfd_boolean jal_shuffle, bfd_byte *data)
+{
+ bfd_vma extend, insn, val;
+
+ if (r_type != R_MIPS16_26 && r_type != R_MIPS16_GPREL
+ && r_type != R_MIPS16_HI16 && r_type != R_MIPS16_LO16)
+ return;
+
+ /* Pick up the mips16 extend instruction and the real instruction. */
+ extend = bfd_get_16 (abfd, data);
+ insn = bfd_get_16 (abfd, data + 2);
+ if (r_type == R_MIPS16_26)
+ {
+ if (jal_shuffle)
+ val = ((extend & 0xfc00) << 16) | ((extend & 0x3e0) << 11)
+ | ((extend & 0x1f) << 21) | insn;
+ else
+ val = extend << 16 | insn;
+ }
+ else
+ val = ((extend & 0xf800) << 16) | ((insn & 0xffe0) << 11)
+ | ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
+ bfd_put_32 (abfd, val, data);
+}
+
+void
+_bfd_mips16_elf_reloc_shuffle (bfd *abfd, int r_type,
+ bfd_boolean jal_shuffle, bfd_byte *data)
+{
+ bfd_vma extend, insn, val;
+
+ if (r_type != R_MIPS16_26 && r_type != R_MIPS16_GPREL
+ && r_type != R_MIPS16_HI16 && r_type != R_MIPS16_LO16)
+ return;
+
+ val = bfd_get_32 (abfd, data);
+ if (r_type == R_MIPS16_26)
+ {
+ if (jal_shuffle)
+ {
+ insn = val & 0xffff;
+ extend = ((val >> 16) & 0xfc00) | ((val >> 11) & 0x3e0)
+ | ((val >> 21) & 0x1f);
+ }
+ else
+ {
+ insn = val & 0xffff;
+ extend = val >> 16;
+ }
+ }
+ else
+ {
+ insn = ((val >> 11) & 0xffe0) | (val & 0x1f);
+ extend = ((val >> 16) & 0xf800) | ((val >> 11) & 0x1f) | (val & 0x7e0);
+ }
+ bfd_put_16 (abfd, insn, data + 2);
+ bfd_put_16 (abfd, extend, data);
+}
+
bfd_reloc_status_type
_bfd_mips_elf_gprel16_with_gp (bfd *abfd, asymbol *symbol,
arelent *reloc_entry, asection *input_section,
@@ -1083,7 +1316,7 @@ _bfd_mips_elf_gprel16_with_gp (bfd *abfd, asymbol *symbol,
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
- if (reloc_entry->address > input_section->_cooked_size)
+ 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. */
@@ -1149,7 +1382,7 @@ _bfd_mips_elf_hi16_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
{
struct mips_hi16 *n;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
n = bfd_malloc (sizeof *n);
@@ -1199,11 +1432,17 @@ _bfd_mips_elf_lo16_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
bfd *output_bfd, char **error_message)
{
bfd_vma vallo;
+ bfd_byte *location = (bfd_byte *) data + reloc_entry->address;
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
- vallo = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ _bfd_mips16_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
+ location);
+ vallo = bfd_get_32 (abfd, location);
+ _bfd_mips16_elf_reloc_shuffle (abfd, reloc_entry->howto->type, FALSE,
+ location);
+
while (mips_hi16_list != NULL)
{
bfd_reloc_status_type ret;
@@ -1223,13 +1462,6 @@ _bfd_mips_elf_lo16_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
carry or borrow will induce a change of +1 or -1 in the high part. */
hi->rel.addend += (vallo + 0x8000) & 0xffff;
- /* R_MIPS_GNU_REL_HI16 relocations are relative to the address of the
- lo16 relocation, not their own address. If we're calculating the
- final value, and hence subtracting the "PC", subtract the offset
- of the lo16 relocation from here. */
- if (output_bfd == NULL && hi->rel.howto->type == R_MIPS_GNU_REL_HI16)
- hi->rel.addend -= reloc_entry->address - hi->rel.address;
-
ret = _bfd_mips_elf_generic_reloc (abfd, &hi->rel, symbol, hi->data,
hi->input_section, output_bfd,
error_message);
@@ -1261,7 +1493,7 @@ _bfd_mips_elf_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
relocatable = (output_bfd != NULL);
- if (reloc_entry->address > input_section->_cooked_size)
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Build up the field adjustment in VAL. */
@@ -1296,13 +1528,19 @@ _bfd_mips_elf_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
reloc_entry->addend += val;
else
{
+ bfd_byte *location = (bfd_byte *) data + reloc_entry->address;
+
/* Add in the separate addend, if any. */
val += reloc_entry->addend;
/* Add VAL to the relocation field. */
+ _bfd_mips16_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE,
+ location);
status = _bfd_relocate_contents (reloc_entry->howto, abfd, val,
- (bfd_byte *) data
- + reloc_entry->address);
+ location);
+ _bfd_mips16_elf_reloc_shuffle (abfd, reloc_entry->howto->type, FALSE,
+ location);
+
if (status != bfd_reloc_ok)
return status;
}
@@ -1461,8 +1699,10 @@ sort_dynamic_relocs (const void *arg1, const void *arg2)
/* Like sort_dynamic_relocs, but used for elf64 relocations. */
static int
-sort_dynamic_relocs_64 (const void *arg1, const void *arg2)
+sort_dynamic_relocs_64 (const void *arg1 ATTRIBUTE_UNUSED,
+ const void *arg2 ATTRIBUTE_UNUSED)
{
+#ifdef BFD64
Elf_Internal_Rela int_reloc1[3];
Elf_Internal_Rela int_reloc2[3];
@@ -1473,6 +1713,9 @@ sort_dynamic_relocs_64 (const void *arg1, const void *arg2)
return (ELF64_R_SYM (int_reloc1[0].r_info)
- ELF64_R_SYM (int_reloc2[0].r_info));
+#else
+ abort ();
+#endif
}
@@ -1502,10 +1745,11 @@ mips_elf_output_extsym (struct mips_elf_link_hash_entry *h, void *data)
if (h->root.indx == -2)
strip = FALSE;
- else if (((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- || (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0)
- && (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- && (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
+ else if ((h->root.def_dynamic
+ || h->root.ref_dynamic
+ || h->root.type == bfd_link_hash_new)
+ && !h->root.def_regular
+ && !h->root.ref_regular)
strip = TRUE;
else if (einfo->info->strip == strip_all
|| (einfo->info->strip == strip_some
@@ -1623,7 +1867,7 @@ mips_elf_output_extsym (struct mips_elf_link_hash_entry *h, void *data)
else
h->esym.asym.value = 0;
}
- else if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ else if (h->root.needs_plt)
{
struct mips_elf_link_hash_entry *hd = h;
bfd_boolean no_fn_stub = h->no_fn_stub;
@@ -1651,9 +1895,6 @@ mips_elf_output_extsym (struct mips_elf_link_hash_entry *h, void *data)
else
h->esym.asym.value = 0;
}
-#if 0 /* FIXME? */
- h->esym.ifd = 0;
-#endif
}
}
@@ -1704,6 +1945,7 @@ mips_elf_got_entry_hash (const void *entry_)
const struct mips_got_entry *entry = (struct mips_got_entry *)entry_;
return entry->symndx
+ + ((entry->tls_type & GOT_TLS_LDM) << 17)
+ (! entry->abfd ? mips_elf_hash_bfd_vma (entry->d.address)
: entry->abfd->id
+ (entry->symndx >= 0 ? mips_elf_hash_bfd_vma (entry->d.addend)
@@ -1716,6 +1958,10 @@ mips_elf_got_entry_eq (const void *entry1, const void *entry2)
const struct mips_got_entry *e1 = (struct mips_got_entry *)entry1;
const struct mips_got_entry *e2 = (struct mips_got_entry *)entry2;
+ /* An LDM entry can only match another LDM entry. */
+ if ((e1->tls_type ^ e2->tls_type) & GOT_TLS_LDM)
+ return 0;
+
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
@@ -1736,8 +1982,10 @@ mips_elf_multi_got_entry_hash (const void *entry_)
+ (! entry->abfd
? mips_elf_hash_bfd_vma (entry->d.address)
: entry->symndx >= 0
- ? (entry->abfd->id
- + mips_elf_hash_bfd_vma (entry->d.addend))
+ ? ((entry->tls_type & GOT_TLS_LDM)
+ ? (GOT_TLS_LDM << 17)
+ : (entry->abfd->id
+ + mips_elf_hash_bfd_vma (entry->d.addend)))
: entry->d.h->root.root.root.hash);
}
@@ -1747,6 +1995,14 @@ mips_elf_multi_got_entry_eq (const void *entry1, const void *entry2)
const struct mips_got_entry *e1 = (struct mips_got_entry *)entry1;
const struct mips_got_entry *e2 = (struct mips_got_entry *)entry2;
+ /* Any two LDM entries match. */
+ if (e1->tls_type & e2->tls_type & GOT_TLS_LDM)
+ return 1;
+
+ /* Nothing else matches an LDM entry. */
+ if ((e1->tls_type ^ e2->tls_type) & GOT_TLS_LDM)
+ return 0;
+
return e1->symndx == e2->symndx
&& (e1->symndx >= 0 ? e1->abfd == e2->abfd && e1->d.addend == e2->d.addend
: e1->abfd == NULL || e2->abfd == NULL
@@ -1754,26 +2010,30 @@ mips_elf_multi_got_entry_eq (const void *entry1, const void *entry2)
: e1->d.h == e2->d.h);
}
-/* Returns the dynamic relocation section for DYNOBJ. */
+/* Return the dynamic relocation section. If it doesn't exist, try to
+ create a new it if CREATE_P, otherwise return NULL. Also return NULL
+ if creation fails. */
static asection *
-mips_elf_rel_dyn_section (bfd *dynobj, bfd_boolean create_p)
+mips_elf_rel_dyn_section (struct bfd_link_info *info, bfd_boolean create_p)
{
- static const char dname[] = ".rel.dyn";
+ const char *dname;
asection *sreloc;
+ bfd *dynobj;
+ dname = MIPS_ELF_REL_DYN_NAME (info);
+ dynobj = elf_hash_table (info)->dynobj;
sreloc = bfd_get_section_by_name (dynobj, dname);
if (sreloc == NULL && create_p)
{
- sreloc = bfd_make_section (dynobj, dname);
+ 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_flags (dynobj, sreloc,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, sreloc,
MIPS_ELF_LOG_FILE_ALIGN (dynobj)))
return NULL;
@@ -1815,35 +2075,331 @@ mips_elf_got_info (bfd *abfd, asection **sgotp)
return g;
}
-/* Obtain the lowest dynamic index of a symbol that was assigned a
- global GOT entry. */
-static long
-mips_elf_get_global_gotsym_index (bfd *abfd)
+/* Count the number of relocations needed for a TLS GOT entry, with
+ access types from TLS_TYPE, and symbol H (or a local symbol if H
+ is NULL). */
+
+static int
+mips_tls_got_relocs (struct bfd_link_info *info, unsigned char tls_type,
+ struct elf_link_hash_entry *h)
+{
+ int indx = 0;
+ int ret = 0;
+ bfd_boolean need_relocs = FALSE;
+ bfd_boolean dyn = elf_hash_table (info)->dynamic_sections_created;
+
+ if (h && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ && (!info->shared || !SYMBOL_REFERENCES_LOCAL (info, h)))
+ indx = h->dynindx;
+
+ if ((info->shared || indx != 0)
+ && (h == NULL
+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak))
+ need_relocs = TRUE;
+
+ if (!need_relocs)
+ return FALSE;
+
+ if (tls_type & GOT_TLS_GD)
+ {
+ ret++;
+ if (indx != 0)
+ ret++;
+ }
+
+ if (tls_type & GOT_TLS_IE)
+ ret++;
+
+ if ((tls_type & GOT_TLS_LDM) && info->shared)
+ ret++;
+
+ return ret;
+}
+
+/* Count the number of TLS relocations required for the GOT entry in
+ ARG1, if it describes a local symbol. */
+
+static int
+mips_elf_count_local_tls_relocs (void **arg1, void *arg2)
{
- asection *sgot;
- struct mips_got_info *g;
+ struct mips_got_entry *entry = * (struct mips_got_entry **) arg1;
+ struct mips_elf_count_tls_arg *arg = arg2;
- if (abfd == NULL)
- return 0;
+ if (entry->abfd != NULL && entry->symndx != -1)
+ arg->needed += mips_tls_got_relocs (arg->info, entry->tls_type, NULL);
- sgot = mips_elf_got_section (abfd, TRUE);
- if (sgot == NULL || mips_elf_section_data (sgot) == NULL)
- return 0;
+ return 1;
+}
- g = mips_elf_section_data (sgot)->u.got_info;
- if (g == NULL || g->global_gotsym == NULL)
- return 0;
+/* Count the number of TLS GOT entries required for the global (or
+ forced-local) symbol in ARG1. */
+
+static int
+mips_elf_count_global_tls_entries (void *arg1, void *arg2)
+{
+ struct mips_elf_link_hash_entry *hm
+ = (struct mips_elf_link_hash_entry *) arg1;
+ struct mips_elf_count_tls_arg *arg = arg2;
+
+ if (hm->tls_type & GOT_TLS_GD)
+ arg->needed += 2;
+ if (hm->tls_type & GOT_TLS_IE)
+ arg->needed += 1;
+
+ return 1;
+}
+
+/* Count the number of TLS relocations required for the global (or
+ forced-local) symbol in ARG1. */
+
+static int
+mips_elf_count_global_tls_relocs (void *arg1, void *arg2)
+{
+ struct mips_elf_link_hash_entry *hm
+ = (struct mips_elf_link_hash_entry *) arg1;
+ struct mips_elf_count_tls_arg *arg = arg2;
+
+ arg->needed += mips_tls_got_relocs (arg->info, hm->tls_type, &hm->root);
+
+ return 1;
+}
+
+/* Output a simple dynamic relocation into SRELOC. */
+
+static void
+mips_elf_output_dynamic_relocation (bfd *output_bfd,
+ asection *sreloc,
+ unsigned long indx,
+ int r_type,
+ bfd_vma offset)
+{
+ Elf_Internal_Rela rel[3];
+
+ memset (rel, 0, sizeof (rel));
+
+ rel[0].r_info = ELF_R_INFO (output_bfd, indx, r_type);
+ rel[0].r_offset = rel[1].r_offset = rel[2].r_offset = offset;
- return g->global_gotsym->dynindx;
+ if (ABI_64_P (output_bfd))
+ {
+ (*get_elf_backend_data (output_bfd)->s->swap_reloc_out)
+ (output_bfd, &rel[0],
+ (sreloc->contents
+ + sreloc->reloc_count * sizeof (Elf64_Mips_External_Rel)));
+ }
+ else
+ bfd_elf32_swap_reloc_out
+ (output_bfd, &rel[0],
+ (sreloc->contents
+ + sreloc->reloc_count * sizeof (Elf32_External_Rel)));
+ ++sreloc->reloc_count;
}
-/* 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. */
+/* Initialize a set of TLS GOT entries for one symbol. */
+
+static void
+mips_elf_initialize_tls_slots (bfd *abfd, bfd_vma got_offset,
+ unsigned char *tls_type_p,
+ struct bfd_link_info *info,
+ struct mips_elf_link_hash_entry *h,
+ bfd_vma value)
+{
+ int indx;
+ asection *sreloc, *sgot;
+ bfd_vma offset, offset2;
+ bfd *dynobj;
+ bfd_boolean need_relocs = FALSE;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ sgot = mips_elf_got_section (dynobj, FALSE);
+
+ indx = 0;
+ if (h != NULL)
+ {
+ bfd_boolean dyn = elf_hash_table (info)->dynamic_sections_created;
+
+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, &h->root)
+ && (!info->shared || !SYMBOL_REFERENCES_LOCAL (info, &h->root)))
+ indx = h->root.dynindx;
+ }
+
+ if (*tls_type_p & GOT_TLS_DONE)
+ return;
+
+ if ((info->shared || indx != 0)
+ && (h == NULL
+ || ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak))
+ need_relocs = TRUE;
+
+ /* MINUS_ONE means the symbol is not defined in this object. It may not
+ be defined at all; assume that the value doesn't matter in that
+ case. Otherwise complain if we would use the value. */
+ BFD_ASSERT (value != MINUS_ONE || (indx != 0 && need_relocs)
+ || h->root.root.type == bfd_link_hash_undefweak);
+
+ /* Emit necessary relocations. */
+ sreloc = mips_elf_rel_dyn_section (info, FALSE);
+
+ /* General Dynamic. */
+ if (*tls_type_p & GOT_TLS_GD)
+ {
+ offset = got_offset;
+ offset2 = offset + MIPS_ELF_GOT_SIZE (abfd);
+
+ if (need_relocs)
+ {
+ mips_elf_output_dynamic_relocation
+ (abfd, sreloc, indx,
+ ABI_64_P (abfd) ? R_MIPS_TLS_DTPMOD64 : R_MIPS_TLS_DTPMOD32,
+ sgot->output_offset + sgot->output_section->vma + offset);
+
+ if (indx)
+ mips_elf_output_dynamic_relocation
+ (abfd, sreloc, indx,
+ ABI_64_P (abfd) ? R_MIPS_TLS_DTPREL64 : R_MIPS_TLS_DTPREL32,
+ sgot->output_offset + sgot->output_section->vma + offset2);
+ else
+ MIPS_ELF_PUT_WORD (abfd, value - dtprel_base (info),
+ sgot->contents + offset2);
+ }
+ else
+ {
+ MIPS_ELF_PUT_WORD (abfd, 1,
+ sgot->contents + offset);
+ MIPS_ELF_PUT_WORD (abfd, value - dtprel_base (info),
+ sgot->contents + offset2);
+ }
+
+ got_offset += 2 * MIPS_ELF_GOT_SIZE (abfd);
+ }
+
+ /* Initial Exec model. */
+ if (*tls_type_p & GOT_TLS_IE)
+ {
+ offset = got_offset;
+
+ if (need_relocs)
+ {
+ if (indx == 0)
+ MIPS_ELF_PUT_WORD (abfd, value - elf_hash_table (info)->tls_sec->vma,
+ sgot->contents + offset);
+ else
+ MIPS_ELF_PUT_WORD (abfd, 0,
+ sgot->contents + offset);
+
+ mips_elf_output_dynamic_relocation
+ (abfd, sreloc, indx,
+ ABI_64_P (abfd) ? R_MIPS_TLS_TPREL64 : R_MIPS_TLS_TPREL32,
+ sgot->output_offset + sgot->output_section->vma + offset);
+ }
+ else
+ MIPS_ELF_PUT_WORD (abfd, value - tprel_base (info),
+ sgot->contents + offset);
+ }
+
+ if (*tls_type_p & GOT_TLS_LDM)
+ {
+ /* The initial offset is zero, and the LD offsets will include the
+ bias by DTP_OFFSET. */
+ MIPS_ELF_PUT_WORD (abfd, 0,
+ sgot->contents + got_offset
+ + MIPS_ELF_GOT_SIZE (abfd));
+
+ if (!info->shared)
+ MIPS_ELF_PUT_WORD (abfd, 1,
+ sgot->contents + got_offset);
+ else
+ mips_elf_output_dynamic_relocation
+ (abfd, sreloc, indx,
+ ABI_64_P (abfd) ? R_MIPS_TLS_DTPMOD64 : R_MIPS_TLS_DTPMOD32,
+ sgot->output_offset + sgot->output_section->vma + got_offset);
+ }
+
+ *tls_type_p |= GOT_TLS_DONE;
+}
+
+/* Return the GOT index to use for a relocation of type R_TYPE against
+ a symbol accessed using TLS_TYPE models. The GOT entries for this
+ symbol in this GOT start at GOT_INDEX. This function initializes the
+ GOT entries and corresponding relocations. */
+
+static bfd_vma
+mips_tls_got_index (bfd *abfd, bfd_vma got_index, unsigned char *tls_type,
+ int r_type, struct bfd_link_info *info,
+ struct mips_elf_link_hash_entry *h, bfd_vma symbol)
+{
+ BFD_ASSERT (r_type == R_MIPS_TLS_GOTTPREL || r_type == R_MIPS_TLS_GD
+ || r_type == R_MIPS_TLS_LDM);
+
+ mips_elf_initialize_tls_slots (abfd, got_index, tls_type, info, h, symbol);
+
+ if (r_type == R_MIPS_TLS_GOTTPREL)
+ {
+ BFD_ASSERT (*tls_type & GOT_TLS_IE);
+ if (*tls_type & GOT_TLS_GD)
+ return got_index + 2 * MIPS_ELF_GOT_SIZE (abfd);
+ else
+ return got_index;
+ }
+
+ if (r_type == R_MIPS_TLS_GD)
+ {
+ BFD_ASSERT (*tls_type & GOT_TLS_GD);
+ return got_index;
+ }
+
+ if (r_type == R_MIPS_TLS_LDM)
+ {
+ BFD_ASSERT (*tls_type & GOT_TLS_LDM);
+ return got_index;
+ }
+
+ return got_index;
+}
+
+/* Return the offset from _GLOBAL_OFFSET_TABLE_ of the .got.plt entry
+ for global symbol H. .got.plt comes before the GOT, so the offset
+ will be negative. */
+
+static bfd_vma
+mips_elf_gotplt_index (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
+{
+ bfd_vma plt_index, got_address, got_value;
+ struct mips_elf_link_hash_table *htab;
+
+ htab = mips_elf_hash_table (info);
+ BFD_ASSERT (h->plt.offset != (bfd_vma) -1);
+
+ /* Calculate the index of the symbol's PLT entry. */
+ plt_index = (h->plt.offset - htab->plt_header_size) / htab->plt_entry_size;
+
+ /* Calculate the address of the associated .got.plt entry. */
+ got_address = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + plt_index * 4);
+
+ /* Calculate the value of _GLOBAL_OFFSET_TABLE_. */
+ got_value = (htab->root.hgot->root.u.def.section->output_section->vma
+ + htab->root.hgot->root.u.def.section->output_offset
+ + htab->root.hgot->root.u.def.value);
+
+ 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
+ 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,
- bfd_vma value)
+ asection *input_section, bfd_vma value,
+ unsigned long r_symndx,
+ struct mips_elf_link_hash_entry *h, int r_type)
{
asection *sgot;
struct mips_got_info *g;
@@ -1851,17 +2407,32 @@ 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, ibfd, g, sgot, value);
- if (entry)
- return entry->gotidx;
- else
+ entry = mips_elf_create_local_got_entry (abfd, info, ibfd, g, sgot,
+ input_section, value,
+ r_symndx, h, r_type);
+ if (!entry)
return MINUS_ONE;
+
+ if (TLS_RELOC_P (r_type))
+ {
+ if (entry->symndx == -1 && g->next == NULL)
+ /* A type (3) entry in the single-GOT case. We use the symbol's
+ hash table entry to track the index. */
+ return mips_tls_got_index (abfd, h->tls_got_offset, &h->tls_type,
+ r_type, info, h, value);
+ else
+ return mips_tls_got_index (abfd, entry->gotidx, &entry->tls_type,
+ r_type, info, h, value);
+ }
+ else
+ return entry->gotidx;
}
/* Returns the GOT index for the global symbol indicated by H. */
static bfd_vma
-mips_elf_global_got_index (bfd *abfd, bfd *ibfd, struct elf_link_hash_entry *h)
+mips_elf_global_got_index (bfd *abfd, bfd *ibfd, struct elf_link_hash_entry *h,
+ int r_type, struct bfd_link_info *info)
{
bfd_vma index;
asection *sgot;
@@ -1876,54 +2447,91 @@ mips_elf_global_got_index (bfd *abfd, bfd *ibfd, struct elf_link_hash_entry *h)
BFD_ASSERT (h->dynindx >= 0);
g = mips_elf_got_for_ibfd (g, ibfd);
- if (g->next != gg)
+ if (g->next != gg || TLS_RELOC_P (r_type))
{
e.abfd = ibfd;
e.symndx = -1;
e.d.h = (struct mips_elf_link_hash_entry *)h;
+ e.tls_type = 0;
p = htab_find (g->got_entries, &e);
BFD_ASSERT (p->gotidx > 0);
- return p->gotidx;
+
+ if (TLS_RELOC_P (r_type))
+ {
+ bfd_vma value = MINUS_ONE;
+ if ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->root.u.def.section->output_section)
+ value = (h->root.u.def.value
+ + h->root.u.def.section->output_offset
+ + h->root.u.def.section->output_section->vma);
+
+ return mips_tls_got_index (abfd, p->gotidx, &p->tls_type, r_type,
+ info, e.d.h, value);
+ }
+ else
+ return p->gotidx;
}
}
if (gg->global_gotsym != NULL)
global_got_dynindx = gg->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)
- * MIPS_ELF_GOT_SIZE (abfd));
- BFD_ASSERT (index < sgot->_raw_size);
+ if (TLS_RELOC_P (r_type))
+ {
+ struct mips_elf_link_hash_entry *hm
+ = (struct mips_elf_link_hash_entry *) h;
+ bfd_vma value = MINUS_ONE;
+
+ if ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->root.u.def.section->output_section)
+ value = (h->root.u.def.value
+ + h->root.u.def.section->output_offset
+ + h->root.u.def.section->output_section->vma);
+
+ index = mips_tls_got_index (abfd, hm->tls_got_offset, &hm->tls_type,
+ r_type, info, hm, value);
+ }
+ else
+ {
+ /* 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)
+ * MIPS_ELF_GOT_SIZE (abfd));
+ }
+ BFD_ASSERT (index < sgot->size);
return index;
}
-/* Find a GOT entry that is within 32KB of the VALUE. These entries
- are supposed to be placed at small offsets in the GOT, i.e.,
- within 32KB of GP. Return the index into the GOT for this page,
- and store the offset from this entry to the desired address in
- OFFSETP, if it is non-NULL. */
+/* 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
+ offset of the GOT entry from VALUE. */
static bfd_vma
mips_elf_got_page (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
- bfd_vma value, bfd_vma *offsetp)
+ asection *input_section, bfd_vma value, bfd_vma *offsetp)
{
asection *sgot;
struct mips_got_info *g;
- bfd_vma index;
+ bfd_vma page, index;
struct mips_got_entry *entry;
g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
- entry = mips_elf_create_local_got_entry (abfd, ibfd, g, sgot,
- (value + 0x8000)
- & (~(bfd_vma)0xffff));
+ 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);
if (!entry)
return MINUS_ONE;
@@ -1936,29 +2544,32 @@ mips_elf_got_page (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
return index;
}
-/* 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. */
+/* Find a local GOT entry for an R_MIPS_GOT16 relocation against VALUE,
+ which was calculated from a symbol belonging to INPUT_SECTION.
+ 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,
- bfd_vma value, bfd_boolean external)
+ asection *input_section, bfd_vma value,
+ bfd_boolean external)
{
asection *sgot;
struct mips_got_info *g;
struct mips_got_entry *entry;
+ /* GOT16 relocations against local symbols are followed by a LO16
+ relocation; those against global symbols are not. Thus if the
+ symbol was originally local, the GOT16 relocation should load the
+ equivalent of %hi(VALUE), otherwise it should load VALUE itself. */
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 = mips_elf_high (value) << 16;
- }
+ value = mips_elf_high (value) << 16;
g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
- entry = mips_elf_create_local_got_entry (abfd, ibfd, g, sgot, value);
+ entry = mips_elf_create_local_got_entry (abfd, info, ibfd, g, sgot,
+ input_section, value, 0,
+ NULL, R_MIPS_GOT16);
if (entry)
return entry->gotidx;
else
@@ -1983,20 +2594,29 @@ mips_elf_got_offset_from_index (bfd *dynobj, bfd *output_bfd,
return sgot->output_section->vma + sgot->output_offset + index - gp;
}
-/* Create a local GOT entry for VALUE. Return the index of the entry,
- or -1 if it could not be created. */
+/* Create and return a local GOT entry for VALUE, which was calculated
+ from a symbol belonging to INPUT_SECTON. Return NULL if it could not
+ be created. If R_SYMNDX refers to a TLS symbol, create a TLS entry
+ instead. */
static struct mips_got_entry *
-mips_elf_create_local_got_entry (bfd *abfd, bfd *ibfd,
- struct mips_got_info *gg,
- asection *sgot, bfd_vma value)
+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,
+ struct mips_elf_link_hash_entry *h,
+ int r_type)
{
struct mips_got_entry entry, **loc;
struct mips_got_info *g;
+ struct mips_elf_link_hash_table *htab;
+
+ htab = mips_elf_hash_table (info);
entry.abfd = NULL;
entry.symndx = -1;
entry.d.address = value;
+ entry.tls_type = 0;
g = mips_elf_got_for_ibfd (gg, ibfd);
if (g == NULL)
@@ -2005,12 +2625,44 @@ mips_elf_create_local_got_entry (bfd *abfd, bfd *ibfd,
BFD_ASSERT (g != NULL);
}
+ /* We might have a symbol, H, if it has been forced local. Use the
+ global entry then. It doesn't matter whether an entry is local
+ or global for TLS, since the dynamic linker does not
+ automatically relocate TLS GOT entries. */
+ BFD_ASSERT (h == NULL || h->root.forced_local);
+ if (TLS_RELOC_P (r_type))
+ {
+ struct mips_got_entry *p;
+
+ entry.abfd = ibfd;
+ if (r_type == R_MIPS_TLS_LDM)
+ {
+ entry.tls_type = GOT_TLS_LDM;
+ entry.symndx = 0;
+ entry.d.addend = 0;
+ }
+ else if (h == NULL)
+ {
+ entry.symndx = r_symndx;
+ entry.d.addend = 0;
+ }
+ else
+ entry.d.h = h;
+
+ p = (struct mips_got_entry *)
+ htab_find (g->got_entries, &entry);
+
+ BFD_ASSERT (p);
+ return p;
+ }
+
loc = (struct mips_got_entry **) htab_find_slot (g->got_entries, &entry,
INSERT);
if (*loc)
return *loc;
entry.gotidx = MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno++;
+ entry.tls_type = 0;
*loc = (struct mips_got_entry *)bfd_alloc (abfd, sizeof entry);
@@ -2032,6 +2684,33 @@ mips_elf_create_local_got_entry (bfd *abfd, bfd *ibfd,
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. */
+ if (htab->is_vxworks)
+ {
+ Elf_Internal_Rela outrel;
+ asection *s, *output_section;
+ 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;
+ bfd_elf32_swap_reloca_out (abfd, &outrel, loc);
+ }
+
return *loc;
}
@@ -2106,6 +2785,8 @@ mips_elf_sort_hash_table_f (struct mips_elf_link_hash_entry *h, void *data)
-1. */
if (h->root.got.offset == 2)
{
+ BFD_ASSERT (h->tls_type == GOT_NORMAL);
+
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++;
@@ -2114,6 +2795,8 @@ mips_elf_sort_hash_table_f (struct mips_elf_link_hash_entry *h, void *data)
h->root.dynindx = hsd->max_non_got_dynindx++;
else
{
+ BFD_ASSERT (h->tls_type == GOT_NORMAL);
+
h->root.dynindx = --hsd->min_got_dynindx;
hsd->low = (struct elf_link_hash_entry *) h;
}
@@ -2128,7 +2811,8 @@ mips_elf_sort_hash_table_f (struct mips_elf_link_hash_entry *h, void *data)
static bfd_boolean
mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h,
bfd *abfd, struct bfd_link_info *info,
- struct mips_got_info *g)
+ struct mips_got_info *g,
+ unsigned char tls_flag)
{
struct mips_got_entry entry, **loc;
@@ -2147,9 +2831,13 @@ mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h,
return FALSE;
}
+ /* Make sure we have a GOT to put this entry into. */
+ BFD_ASSERT (g != NULL);
+
entry.abfd = abfd;
entry.symndx = -1;
entry.d.h = (struct mips_elf_link_hash_entry *) h;
+ entry.tls_type = 0;
loc = (struct mips_got_entry **) htab_find_slot (g->got_entries, &entry,
INSERT);
@@ -2157,7 +2845,10 @@ mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h,
/* If we've already marked this entry as needing GOT space, we don't
need to do it again. */
if (*loc)
- return TRUE;
+ {
+ (*loc)->tls_type |= tls_flag;
+ return TRUE;
+ }
*loc = (struct mips_got_entry *)bfd_alloc (abfd, sizeof entry);
@@ -2165,6 +2856,8 @@ mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h,
return FALSE;
entry.gotidx = -1;
+ entry.tls_type = tls_flag;
+
memcpy (*loc, &entry, sizeof entry);
if (h->got.offset != MINUS_ONE)
@@ -2173,7 +2866,8 @@ mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h,
/* 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;
+ if (tls_flag == 0)
+ h->got.offset = 1;
return TRUE;
}
@@ -2183,20 +2877,52 @@ mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h,
static bfd_boolean
mips_elf_record_local_got_symbol (bfd *abfd, long symndx, bfd_vma addend,
- struct mips_got_info *g)
+ struct mips_got_info *g,
+ unsigned char tls_flag)
{
struct mips_got_entry entry, **loc;
entry.abfd = abfd;
entry.symndx = symndx;
entry.d.addend = addend;
+ entry.tls_type = tls_flag;
loc = (struct mips_got_entry **)
htab_find_slot (g->got_entries, &entry, INSERT);
if (*loc)
- return TRUE;
+ {
+ if (tls_flag == GOT_TLS_GD && !((*loc)->tls_type & GOT_TLS_GD))
+ {
+ g->tls_gotno += 2;
+ (*loc)->tls_type |= tls_flag;
+ }
+ else if (tls_flag == GOT_TLS_IE && !((*loc)->tls_type & GOT_TLS_IE))
+ {
+ g->tls_gotno += 1;
+ (*loc)->tls_type |= tls_flag;
+ }
+ return TRUE;
+ }
- entry.gotidx = g->local_gotno++;
+ if (tls_flag != 0)
+ {
+ entry.gotidx = -1;
+ entry.tls_type = tls_flag;
+ if (tls_flag == GOT_TLS_IE)
+ g->tls_gotno += 1;
+ else if (tls_flag == GOT_TLS_GD)
+ g->tls_gotno += 2;
+ else if (g->tls_ldm_offset == MINUS_ONE)
+ {
+ g->tls_ldm_offset = MINUS_TWO;
+ g->tls_gotno += 2;
+ }
+ }
+ else
+ {
+ entry.gotidx = g->local_gotno++;
+ entry.tls_type = 0;
+ }
*loc = (struct mips_got_entry *)bfd_alloc (abfd, sizeof entry);
@@ -2232,7 +2958,7 @@ mips_elf_bfd2got_entry_eq (const void *entry1, const void *entry2)
return e1->bfd == e2->bfd;
}
-/* In a multi-got link, determine the GOT to be used for IBDF. G must
+/* In a multi-got link, determine the GOT to be used for IBFD. G must
be the master GOT data. */
static struct mips_got_info *
@@ -2296,6 +3022,9 @@ mips_elf_make_got_per_bfd (void **entryp, void *p)
g->global_gotno = 0;
g->local_gotno = 0;
g->assigned_gotno = -1;
+ g->tls_gotno = 0;
+ g->tls_assigned_gotno = 0;
+ g->tls_ldm_offset = MINUS_ONE;
g->got_entries = htab_try_create (1, mips_elf_multi_got_entry_hash,
mips_elf_multi_got_entry_eq, NULL);
if (g->got_entries == NULL)
@@ -2315,7 +3044,14 @@ mips_elf_make_got_per_bfd (void **entryp, void *p)
*entryp = entry;
- if (entry->symndx >= 0 || entry->d.h->forced_local)
+ if (entry->tls_type)
+ {
+ if (entry->tls_type & (GOT_TLS_GD | GOT_TLS_LDM))
+ g->tls_gotno += 2;
+ if (entry->tls_type & GOT_TLS_IE)
+ g->tls_gotno += 1;
+ }
+ else if (entry->symndx >= 0 || entry->d.h->forced_local)
++g->local_gotno;
else
++g->global_gotno;
@@ -2338,11 +3074,26 @@ mips_elf_merge_gots (void **bfd2got_, void *p)
struct mips_elf_got_per_bfd_arg *arg = (struct mips_elf_got_per_bfd_arg *)p;
unsigned int lcount = bfd2got->g->local_gotno;
unsigned int gcount = bfd2got->g->global_gotno;
+ unsigned int tcount = bfd2got->g->tls_gotno;
unsigned int maxcnt = arg->max_count;
+ bfd_boolean too_many_for_tls = FALSE;
+
+ /* We place TLS GOT entries after both locals and globals. The globals
+ for the primary GOT may overflow the normal GOT size limit, so be
+ sure not to merge a GOT which requires TLS with the primary GOT in that
+ case. This doesn't affect non-primary GOTs. */
+ 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))
+ too_many_for_tls = TRUE;
+ }
/* If we don't have a primary GOT and this is not too big, use it as
a starting point for the primary GOT. */
- if (! arg->primary && lcount + gcount <= maxcnt)
+ if (! arg->primary && lcount + gcount + tcount <= maxcnt
+ && ! too_many_for_tls)
{
arg->primary = bfd2got->g;
arg->primary_count = lcount + gcount;
@@ -2350,12 +3101,13 @@ mips_elf_merge_gots (void **bfd2got_, void *p)
/* If it looks like we can merge this bfd's entries with those of
the primary, merge them. The heuristics is conservative, but we
don't have to squeeze it too hard. */
- else if (arg->primary
- && (arg->primary_count + lcount + gcount) <= maxcnt)
+ else if (arg->primary && ! too_many_for_tls
+ && (arg->primary_count + lcount + gcount + tcount) <= maxcnt)
{
struct mips_got_info *g = bfd2got->g;
int old_lcount = arg->primary->local_gotno;
int old_gcount = arg->primary->global_gotno;
+ int old_tcount = arg->primary->tls_gotno;
bfd2got->g = arg->primary;
@@ -2372,17 +3124,19 @@ mips_elf_merge_gots (void **bfd2got_, void *p)
BFD_ASSERT (old_lcount + lcount >= arg->primary->local_gotno);
BFD_ASSERT (old_gcount + gcount >= arg->primary->global_gotno);
+ BFD_ASSERT (old_tcount + tcount >= arg->primary->tls_gotno);
arg->primary_count = arg->primary->local_gotno
- + arg->primary->global_gotno;
+ + arg->primary->global_gotno + arg->primary->tls_gotno;
}
/* If we can merge with the last-created got, do it. */
else if (arg->current
- && arg->current_count + lcount + gcount <= maxcnt)
+ && arg->current_count + lcount + gcount + tcount <= maxcnt)
{
struct mips_got_info *g = bfd2got->g;
int old_lcount = arg->current->local_gotno;
int old_gcount = arg->current->global_gotno;
+ int old_tcount = arg->current->tls_gotno;
bfd2got->g = arg->current;
@@ -2396,9 +3150,10 @@ mips_elf_merge_gots (void **bfd2got_, void *p)
BFD_ASSERT (old_lcount + lcount >= arg->current->local_gotno);
BFD_ASSERT (old_gcount + gcount >= arg->current->global_gotno);
+ BFD_ASSERT (old_tcount + tcount >= arg->current->tls_gotno);
arg->current_count = arg->current->local_gotno
- + arg->current->global_gotno;
+ + arg->current->global_gotno + arg->current->tls_gotno;
}
/* Well, we couldn't merge, so create a new GOT. Don't check if it
fits; if it turns out that it doesn't, we'll get relocation
@@ -2408,12 +3163,63 @@ mips_elf_merge_gots (void **bfd2got_, void *p)
bfd2got->g->next = arg->current;
arg->current = bfd2got->g;
- arg->current_count = lcount + gcount;
+ arg->current_count = lcount + gcount + 2 * tcount;
}
return 1;
}
+/* Set the TLS GOT index for the GOT entry in ENTRYP. ENTRYP's NEXT field
+ is null iff there is just a single GOT. */
+
+static int
+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;
+
+ /* We're only interested in TLS symbols. */
+ if (entry->tls_type == 0)
+ return 1;
+
+ next_index = MIPS_ELF_GOT_SIZE (entry->abfd) * (long) g->tls_assigned_gotno;
+
+ if (entry->symndx == -1 && g->next == NULL)
+ {
+ /* A type (3) got entry in the single-GOT case. We use the symbol's
+ hash table entry to track its index. */
+ if (entry->d.h->tls_type & GOT_TLS_OFFSET_DONE)
+ return 1;
+ entry->d.h->tls_type |= GOT_TLS_OFFSET_DONE;
+ entry->d.h->tls_got_offset = next_index;
+ }
+ else
+ {
+ if (entry->tls_type & GOT_TLS_LDM)
+ {
+ /* There are separate mips_got_entry objects for each input bfd
+ that requires an LDM entry. Make sure that all LDM entries in
+ a GOT resolve to the same index. */
+ if (g->tls_ldm_offset != MINUS_TWO && g->tls_ldm_offset != MINUS_ONE)
+ {
+ entry->gotidx = g->tls_ldm_offset;
+ return 1;
+ }
+ g->tls_ldm_offset = next_index;
+ }
+ entry->gotidx = next_index;
+ }
+
+ /* Account for the entries we've just allocated. */
+ if (entry->tls_type & (GOT_TLS_GD | GOT_TLS_LDM))
+ g->tls_assigned_gotno += 2;
+ if (entry->tls_type & GOT_TLS_IE)
+ g->tls_assigned_gotno += 1;
+
+ return 1;
+}
+
/* If passed a NULL mips_got_info in the argument, set the marker used
to tell whether a global symbol needs a got entry (in the primary
got) to the given VALUE.
@@ -2435,8 +3241,14 @@ mips_elf_set_global_got_offset (void **entryp, void *p)
= (struct mips_elf_set_global_got_offset_arg *)p;
struct mips_got_info *g = arg->g;
+ if (g && entry->tls_type != GOT_NORMAL)
+ arg->needed_relocs +=
+ mips_tls_got_relocs (arg->info, entry->tls_type,
+ entry->symndx == -1 ? &entry->d.h->root : NULL);
+
if (entry->abfd != NULL && entry->symndx == -1
- && entry->d.h->root.dynindx != -1)
+ && entry->d.h->root.dynindx != -1
+ && entry->d.h->tls_type == GOT_NORMAL)
{
if (g)
{
@@ -2445,10 +3257,8 @@ mips_elf_set_global_got_offset (void **entryp, void *p)
entry->gotidx = arg->value * (long) g->assigned_gotno++;
if (arg->info->shared
|| (elf_hash_table (arg->info)->dynamic_sections_created
- && ((entry->d.h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
- && ((entry->d.h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ && entry->d.h->root.def_dynamic
+ && !entry->d.h->root.def_regular))
++arg->needed_relocs;
}
else
@@ -2553,7 +3363,8 @@ mips_elf_adjust_gp (bfd *abfd, struct mips_got_info *g, bfd *ibfd)
g = g->next;
- return (g->local_gotno + g->global_gotno) * MIPS_ELF_GOT_SIZE (abfd);
+ return (g->local_gotno + g->global_gotno + g->tls_gotno)
+ * MIPS_ELF_GOT_SIZE (abfd);
}
/* Turn a single GOT that is too big for 16-bit addressing into
@@ -2580,7 +3391,6 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
/* Count how many GOT entries each input bfd requires, creating a
map from bfd to got info while at that. */
- mips_elf_resolve_final_got_entries (g);
htab_traverse (g->got_entries, mips_elf_make_got_per_bfd, &got_per_bfd_arg);
if (got_per_bfd_arg.obfd == NULL)
return FALSE;
@@ -2590,9 +3400,13 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
/* Taking out PAGES entries is a worst-case estimate. We could
compute the maximum number of pages that each separate input bfd
uses, but it's probably not worth it. */
- got_per_bfd_arg.max_count = ((MIPS_ELF_GOT_MAX_SIZE (abfd)
+ got_per_bfd_arg.max_count = ((MIPS_ELF_GOT_MAX_SIZE (info)
/ MIPS_ELF_GOT_SIZE (abfd))
- - MIPS_RESERVED_GOTNO - pages);
+ - MIPS_RESERVED_GOTNO (info) - pages);
+ /* The number of globals that will be included in the primary GOT.
+ See the calls to mips_elf_set_global_got_offset below for more
+ information. */
+ got_per_bfd_arg.global_count = g->global_gotno;
/* Try to merge the GOTs of input bfds together, as long as they
don't seem to exceed the maximum GOT size, choosing one of them
@@ -2601,7 +3415,7 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
if (got_per_bfd_arg.obfd == NULL)
return FALSE;
- /* If we find any suitable primary GOT, create an empty one. */
+ /* If we do not find any suitable primary GOT, create an empty one. */
if (got_per_bfd_arg.primary == NULL)
{
g->next = (struct mips_got_info *)
@@ -2612,7 +3426,10 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
g->next->global_gotsym = NULL;
g->next->global_gotno = 0;
g->next->local_gotno = 0;
+ g->next->tls_gotno = 0;
g->next->assigned_gotno = 0;
+ g->next->tls_assigned_gotno = 0;
+ g->next->tls_ldm_offset = MINUS_ONE;
g->next->got_entries = htab_try_create (1, mips_elf_multi_got_entry_hash,
mips_elf_multi_got_entry_eq,
NULL);
@@ -2712,6 +3529,7 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
points back to the master GOT. */
gg->local_gotno = -g->global_gotno;
gg->global_gotno = g->global_gotno;
+ gg->tls_gotno = 0;
assign = 0;
gg->next = gg;
@@ -2719,16 +3537,24 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
{
struct mips_got_info *gn;
- assign += MIPS_RESERVED_GOTNO;
+ assign += MIPS_RESERVED_GOTNO (info);
g->assigned_gotno = assign;
g->local_gotno += assign + pages;
- assign = g->local_gotno + g->global_gotno;
+ assign = g->local_gotno + g->global_gotno + g->tls_gotno;
/* Take g out of the direct list, and push it onto the reversed
- list that gg points to. */
+ list that gg points to. g->next is guaranteed to be nonnull after
+ this operation, as required by mips_elf_initialize_tls_index. */
gn = g->next;
g->next = gg->next;
gg->next = g;
+
+ /* Set up any TLS entries. We always place the TLS entries after
+ all non-TLS entries. */
+ g->tls_assigned_gotno = g->local_gotno + g->global_gotno;
+ htab_traverse (g->got_entries, mips_elf_initialize_tls_index, g);
+
+ /* Move onto the next GOT. It will be a secondary GOT if nonull. */
g = gn;
/* Mark global symbols in every non-primary GOT as ineligible for
@@ -2738,8 +3564,9 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
}
while (g);
- got->_raw_size = (gg->next->local_gotno
- + gg->next->global_gotno) * MIPS_ELF_GOT_SIZE (abfd);
+ got->size = (gg->next->local_gotno
+ + gg->next->global_gotno
+ + gg->next->tls_gotno) * MIPS_ELF_GOT_SIZE (abfd);
return TRUE;
}
@@ -2753,12 +3580,6 @@ mips_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type,
const Elf_Internal_Rela *relocation,
const Elf_Internal_Rela *relend)
{
- /* According to the MIPS ELF ABI, the R_MIPS_LO16 relocation must be
- immediately following. However, for the IRIX6 ABI, the next
- relocation may be a composed relocation consisting of several
- relocations for the same address. In that case, the R_MIPS_LO16
- relocation may occur as one of these. We permit a similar
- extension in general, as that is useful for GCC. */
while (relocation < relend)
{
if (ELF_R_TYPE (abfd, relocation->r_info) == r_type)
@@ -2804,7 +3625,7 @@ mips_elf_local_relocation_p (bfd *input_bfd,
while (h->root.root.type == bfd_link_hash_indirect
|| h->root.root.type == bfd_link_hash_warning)
h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
- if ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ if (h->root.forced_local)
return TRUE;
}
@@ -2860,7 +3681,7 @@ mips_elf_higher (bfd_vma value ATTRIBUTE_UNUSED)
return ((value + (bfd_vma) 0x80008000) >> 32) & 0xffff;
#else
abort ();
- return (bfd_vma) -1;
+ return MINUS_ONE;
#endif
}
@@ -2873,7 +3694,7 @@ mips_elf_highest (bfd_vma value ATTRIBUTE_UNUSED)
return ((value + (((bfd_vma) 0x8000 << 32) | 0x80008000)) >> 48) & 0xffff;
#else
abort ();
- return (bfd_vma) -1;
+ return MINUS_ONE;
#endif
}
@@ -2891,14 +3712,13 @@ mips_elf_create_compact_rel_section
flags = (SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED
| SEC_READONLY);
- s = bfd_make_section (abfd, ".compact_rel");
+ s = bfd_make_section_with_flags (abfd, ".compact_rel", flags);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s,
MIPS_ELF_LOG_FILE_ALIGN (abfd)))
return FALSE;
- s->_raw_size = sizeof (Elf32_External_compact_rel);
+ s->size = sizeof (Elf32_External_compact_rel);
}
return TRUE;
@@ -2916,6 +3736,9 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info,
struct bfd_link_hash_entry *bh;
struct mips_got_info *g;
bfd_size_type amt;
+ struct mips_elf_link_hash_table *htab;
+
+ htab = mips_elf_hash_table (info);
/* This function may be called more than once. */
s = mips_elf_got_section (abfd, TRUE);
@@ -2934,9 +3757,8 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info,
/* 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 (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, 4))
return FALSE;
@@ -2950,9 +3772,10 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info,
return FALSE;
h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->non_elf = 0;
+ h->def_regular = 1;
h->type = STT_OBJECT;
+ elf_hash_table (info)->hgot = h;
if (info->shared
&& ! bfd_elf_link_record_dynamic_symbol (info, h))
@@ -2964,10 +3787,12 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info,
return FALSE;
g->global_gotsym = NULL;
g->global_gotno = 0;
- g->local_gotno = MIPS_RESERVED_GOTNO;
- g->assigned_gotno = MIPS_RESERVED_GOTNO;
+ g->tls_gotno = 0;
+ g->local_gotno = MIPS_RESERVED_GOTNO (info);
+ g->assigned_gotno = MIPS_RESERVED_GOTNO (info);
g->bfd2got = NULL;
g->next = NULL;
+ g->tls_ldm_offset = MINUS_ONE;
g->got_entries = htab_try_create (1, mips_elf_got_entry_hash,
mips_elf_got_entry_eq, NULL);
if (g->got_entries == NULL)
@@ -2976,9 +3801,33 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info,
mips_elf_section_data (s)->elf.this_hdr.sh_flags
|= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
+ /* VxWorks also needs a .got.plt section. */
+ if (htab->is_vxworks)
+ {
+ s = bfd_make_section_with_flags (abfd, ".got.plt",
+ SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ if (s == NULL || !bfd_set_section_alignment (abfd, s, 4))
+ return FALSE;
+
+ htab->sgotplt = s;
+ }
return TRUE;
}
+/* Return true if H refers to the special VxWorks __GOTT_BASE__ or
+ __GOTT_INDEX__ symbols. These symbols are only special for
+ shared objects; they are not used in executables. */
+
+static bfd_boolean
+is_gott_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h)
+{
+ return (mips_elf_hash_table (info)->is_vxworks
+ && info->shared
+ && (strcmp (h->root.root.string, "__GOTT_BASE__") == 0
+ || strcmp (h->root.root.string, "__GOTT_INDEX__") == 0));
+}
+
/* Calculate the value produced by the RELOCATION (which comes from
the INPUT_BFD). The ADDEND is the addend to use for this
RELOCATION; RELOCATION->R_ADDEND is ignored.
@@ -3029,6 +3878,9 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
bfd_boolean local_p, was_local_p;
/* TRUE if the symbol referred to by this relocation is "_gp_disp". */
bfd_boolean gp_disp_p = FALSE;
+ /* TRUE if the symbol referred to by this relocation is
+ "__gnu_local_gp". */
+ bfd_boolean gnu_local_gp_p = FALSE;
Elf_Internal_Shdr *symtab_hdr;
size_t extsymoff;
unsigned long r_symndx;
@@ -3038,6 +3890,11 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
bfd_boolean overflowed_p;
/* TRUE if this relocation refers to a MIPS16 function. */
bfd_boolean target_is_16_bit_code_p = FALSE;
+ struct mips_elf_link_hash_table *htab;
+ bfd *dynobj;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ htab = mips_elf_hash_table (info);
/* Parse the relocation. */
r_symndx = ELF_R_SYM (input_bfd, relocation->r_info);
@@ -3119,11 +3976,18 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
{
/* Relocations against _gp_disp are permitted only with
R_MIPS_HI16 and R_MIPS_LO16 relocations. */
- if (r_type != R_MIPS_HI16 && r_type != R_MIPS_LO16)
+ if (r_type != R_MIPS_HI16 && r_type != R_MIPS_LO16
+ && r_type != R_MIPS16_HI16 && r_type != R_MIPS16_LO16)
return bfd_reloc_notsupported;
gp_disp_p = TRUE;
}
+ /* See if this is the special _gp symbol. Note that such a
+ symbol must always be a global symbol. */
+ else if (strcmp (*namep, "__gnu_local_gp") == 0)
+ gnu_local_gp_p = TRUE;
+
+
/* If this symbol is defined, calculate its address. Note that
_gp_disp is a magic symbol, always implicitly defined by the
linker, so it's inappropriate to check to see whether or not
@@ -3149,8 +4013,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
else if (info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
symbol = 0;
- else if (strcmp (*namep, "_DYNAMIC_LINK") == 0 ||
- strcmp (*namep, "_DYNAMIC_LINKING") == 0)
+ else if (strcmp (*namep, SGI_COMPAT (input_bfd)
+ ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING") == 0)
{
/* If this is a dynamic link, we should have created a
_DYNAMIC_LINK symbol or _DYNAMIC_LINKING(for normal mips) symbol
@@ -3162,6 +4026,17 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
BFD_ASSERT (bfd_get_section_by_name (abfd, ".dynamic") == NULL);
symbol = 0;
}
+ else if (ELF_MIPS_IS_OPTIONAL (h->root.other))
+ {
+ /* This is an optional symbol - an Irix specific extension to the
+ ELF spec. Ignore it for now.
+ XXX - FIXME - there is more to the spec for OPTIONAL symbols
+ than simply ignoring them, but we do not handle this for now.
+ For information see the "64-bit ELF Object File Specification"
+ which is available from here:
+ http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf */
+ symbol = 0;
+ }
else
{
if (! ((*info->callbacks->undefined_symbol)
@@ -3230,7 +4105,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
else
sec = h->call_fp_stub;
- BFD_ASSERT (sec->_raw_size > 0);
+ BFD_ASSERT (sec->size > 0);
symbol = sec->output_section->vma + sec->output_offset;
}
@@ -3263,59 +4138,81 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
case R_MIPS_CALL_HI16:
case R_MIPS_GOT_LO16:
case R_MIPS_CALL_LO16:
+ case R_MIPS_TLS_GD:
+ case R_MIPS_TLS_GOTTPREL:
+ case R_MIPS_TLS_LDM:
/* Find the index into the GOT where this value is located. */
- if (!local_p)
- {
- /* GOT_PAGE may take a non-zero addend, that is ignored in a
- GOT_PAGE relocation that decays to GOT_DISP because the
- symbol turns out to be global. The addend is then added
- as GOT_OFST. */
- BFD_ASSERT (addend == 0 || r_type == R_MIPS_GOT_PAGE);
- g = mips_elf_global_got_index (elf_hash_table (info)->dynobj,
- input_bfd,
- (struct elf_link_hash_entry *) h);
- if (! elf_hash_table(info)->dynamic_sections_created
- || (info->shared
- && (info->symbolic || h->root.dynindx == -1)
- && (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ if (r_type == R_MIPS_TLS_LDM)
+ {
+ g = mips_elf_local_got_index (abfd, input_bfd, info,
+ sec, 0, 0, NULL, r_type);
+ if (g == MINUS_ONE)
+ return bfd_reloc_outofrange;
+ }
+ else if (!local_p)
+ {
+ /* On VxWorks, CALL relocations should refer to the .got.plt
+ entry, which is initialized to point at the PLT stub. */
+ if (htab->is_vxworks
+ && (r_type == R_MIPS_CALL_HI16
+ || r_type == R_MIPS_CALL_LO16
+ || r_type == R_MIPS_CALL16))
+ {
+ BFD_ASSERT (addend == 0);
+ BFD_ASSERT (h->root.needs_plt);
+ g = mips_elf_gotplt_index (info, &h->root);
+ }
+ else
{
- /* 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 = mips_elf_got_section (tmpbfd, FALSE);
- MIPS_ELF_PUT_WORD (tmpbfd, symbol, sgot->contents + g);
+ /* GOT_PAGE may take a non-zero addend, that is ignored in a
+ GOT_PAGE relocation that decays to GOT_DISP because the
+ symbol turns out to be global. The addend is then added
+ as GOT_OFST. */
+ BFD_ASSERT (addend == 0 || r_type == R_MIPS_GOT_PAGE);
+ g = mips_elf_global_got_index (dynobj, input_bfd,
+ &h->root, r_type, info);
+ if (h->tls_type == GOT_NORMAL
+ && (! elf_hash_table(info)->dynamic_sections_created
+ || (info->shared
+ && (info->symbolic || h->root.forced_local)
+ && 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. */
+ asection *sgot = mips_elf_got_section (dynobj, FALSE);
+ MIPS_ELF_PUT_WORD (dynobj, symbol, sgot->contents + g);
+ }
}
}
- else if (r_type == R_MIPS_GOT16 || r_type == R_MIPS_CALL16)
- /* There's no need to create a local GOT entry here; the
- calculation for a local GOT16 entry does not involve G. */
+ else if (!htab->is_vxworks
+ && (r_type == R_MIPS_CALL16 || (r_type == R_MIPS_GOT16)))
+ /* The calculation below does not involve "g". */
break;
else
{
- g = mips_elf_local_got_index (abfd, input_bfd,
- info, symbol + addend);
+ g = mips_elf_local_got_index (abfd, input_bfd, info, sec,
+ symbol + addend, r_symndx, h, r_type);
if (g == MINUS_ONE)
return bfd_reloc_outofrange;
}
/* Convert GOT indices to actual offsets. */
- g = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
- abfd, input_bfd, g);
+ g = mips_elf_got_offset_from_index (dynobj, abfd, input_bfd, g);
break;
case R_MIPS_HI16:
case R_MIPS_LO16:
- case R_MIPS16_GPREL:
case R_MIPS_GPREL16:
case R_MIPS_GPREL32:
case R_MIPS_LITERAL:
+ case R_MIPS16_HI16:
+ case R_MIPS16_LO16:
+ case R_MIPS16_GPREL:
gp0 = _bfd_get_gp_value (input_bfd);
gp = _bfd_get_gp_value (abfd);
- if (elf_hash_table (info)->dynobj)
- gp += mips_elf_adjust_gp (abfd,
- mips_elf_got_info
- (elf_hash_table (info)->dynobj, NULL),
+ if (dynobj)
+ gp += mips_elf_adjust_gp (abfd, mips_elf_got_info (dynobj, NULL),
input_bfd);
break;
@@ -3323,6 +4220,30 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
break;
}
+ if (gnu_local_gp_p)
+ symbol = gp;
+
+ /* Relocations against the VxWorks __GOTT_BASE__ and __GOTT_INDEX__
+ symbols are resolved by the loader. Add them to .rela.dyn. */
+ if (h != NULL && is_gott_symbol (info, &h->root))
+ {
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+ asection *s;
+
+ s = mips_elf_rel_dyn_section (info, FALSE);
+ loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela);
+
+ outrel.r_offset = (input_section->output_section->vma
+ + input_section->output_offset
+ + relocation->r_offset);
+ outrel.r_info = ELF32_R_INFO (h->root.dynindx, r_type);
+ outrel.r_addend = addend;
+ bfd_elf32_swap_reloca_out (abfd, &outrel, loc);
+ *valuep = 0;
+ return bfd_reloc_ok;
+ }
+
/* Figure out what kind of relocation is being performed. */
switch (r_type)
{
@@ -3338,12 +4259,11 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
case R_MIPS_REL32:
case R_MIPS_64:
if ((info->shared
- || (elf_hash_table (info)->dynamic_sections_created
+ || (!htab->is_vxworks
+ && htab->root.dynamic_sections_created
&& h != NULL
- && ((h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
- && ((h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ && h->root.def_dynamic
+ && !h->root.def_regular))
&& r_symndx != 0
&& (input_section->flags & SEC_ALLOC) != 0)
{
@@ -3351,7 +4271,11 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
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. */
+ linker.
+
+ In VxWorks executables, references to external symbols
+ are handled using copy relocs or PLT stubs, so there's
+ no need to add a dynamic relocation here. */
value = addend;
if (!mips_elf_create_dynamic_relocation (abfd,
info,
@@ -3374,28 +4298,10 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
break;
case R_MIPS_PC32:
- case R_MIPS_PC64:
- case R_MIPS_GNU_REL_LO16:
value = symbol + addend - p;
value &= howto->dst_mask;
break;
- 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;
- break;
-
- case R_MIPS_GNU_REL_HI16:
- /* Instead of subtracting 'p' here, we should be subtracting the
- equivalent value for the LO part of the reloc, since the value
- here is relative to that address. Because that's not easy to do,
- we adjust 'addend' in _bfd_mips_elf_relocate_section(). See also
- the comment there for more information. */
- value = mips_elf_high (addend + symbol - p);
- value &= howto->dst_mask;
- break;
-
case R_MIPS16_26:
/* The calculation for R_MIPS16_26 is just the same as for an
R_MIPS_26. It's only the storage of the relocated field into
@@ -3406,11 +4312,34 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
if (local_p)
value = ((addend | ((p + 4) & 0xf0000000)) + symbol) >> 2;
else
- value = (_bfd_mips_elf_sign_extend (addend, 28) + symbol) >> 2;
+ {
+ value = (_bfd_mips_elf_sign_extend (addend, 28) + symbol) >> 2;
+ if (h->root.root.type != bfd_link_hash_undefweak)
+ overflowed_p = (value >> 26) != ((p + 4) >> 28);
+ }
value &= howto->dst_mask;
break;
+ case R_MIPS_TLS_DTPREL_HI16:
+ value = (mips_elf_high (addend + symbol - dtprel_base (info))
+ & howto->dst_mask);
+ break;
+
+ case R_MIPS_TLS_DTPREL_LO16:
+ value = (symbol + addend - dtprel_base (info)) & howto->dst_mask;
+ break;
+
+ case R_MIPS_TLS_TPREL_HI16:
+ value = (mips_elf_high (addend + symbol - tprel_base (info))
+ & howto->dst_mask);
+ break;
+
+ case R_MIPS_TLS_TPREL_LO16:
+ value = (symbol + addend - tprel_base (info)) & howto->dst_mask;
+ break;
+
case R_MIPS_HI16:
+ case R_MIPS16_HI16:
if (!gp_disp_p)
{
value = mips_elf_high (addend + symbol);
@@ -3418,17 +4347,35 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
}
else
{
- value = mips_elf_high (addend + gp - p);
+ /* For MIPS16 ABI code we generate this sequence
+ 0: li $v0,%hi(_gp_disp)
+ 4: addiupc $v1,%lo(_gp_disp)
+ 8: sll $v0,16
+ 12: addu $v0,$v1
+ 14: move $gp,$v0
+ So the offsets of hi and lo relocs are the same, but the
+ $pc is four higher than $t9 would be, so reduce
+ both reloc addends by 4. */
+ if (r_type == R_MIPS16_HI16)
+ value = mips_elf_high (addend + gp - p - 4);
+ else
+ value = mips_elf_high (addend + gp - p);
overflowed_p = mips_elf_overflow_p (value, 16);
}
break;
case R_MIPS_LO16:
+ case R_MIPS16_LO16:
if (!gp_disp_p)
value = (symbol + addend) & howto->dst_mask;
else
{
- value = addend + gp - p + 4;
+ /* See the comment for R_MIPS16_HI16 above for the reason
+ for this conditional. */
+ if (r_type == R_MIPS16_LO16)
+ value = addend + gp - p;
+ else
+ value = addend + gp - p + 4;
/* The MIPS ABI requires checking the R_MIPS_LO16 relocation
for overflow. But, on, say, IRIX5, relocations against
_gp_disp are normally generated from the .cpload
@@ -3480,28 +4427,29 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
case R_MIPS_GOT16:
case R_MIPS_CALL16:
- if (local_p)
+ /* VxWorks does not have separate local and global semantics for
+ R_MIPS_GOT16; every relocation evaluates to "G". */
+ if (!htab->is_vxworks && 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_MIPS_LO16 relocation
- follows. */
forced = ! mips_elf_local_relocation_p (input_bfd, relocation,
local_sections, FALSE);
- value = mips_elf_got16_entry (abfd, input_bfd, info,
+ value = mips_elf_got16_entry (abfd, input_bfd, info, sec,
symbol + addend, forced);
if (value == MINUS_ONE)
return bfd_reloc_outofrange;
value
- = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
- abfd, input_bfd, value);
+ = mips_elf_got_offset_from_index (dynobj, abfd, input_bfd, value);
overflowed_p = mips_elf_overflow_p (value, 16);
break;
}
/* Fall through. */
+ case R_MIPS_TLS_GD:
+ case R_MIPS_TLS_GOTTPREL:
+ case R_MIPS_TLS_LDM:
case R_MIPS_GOT_DISP:
got_disp:
value = g;
@@ -3515,8 +4463,10 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
break;
case R_MIPS_PC16:
- value = _bfd_mips_elf_sign_extend (addend, 16) + symbol - p;
- overflowed_p = mips_elf_overflow_p (value, 16);
+ 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;
break;
case R_MIPS_GOT_HI16:
@@ -3540,17 +4490,18 @@ 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, symbol + addend, NULL);
+ value = mips_elf_got_page (abfd, input_bfd, info, sec,
+ symbol + addend, NULL);
if (value == MINUS_ONE)
return bfd_reloc_outofrange;
- value = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
- abfd, input_bfd, value);
+ value = mips_elf_got_offset_from_index (dynobj, abfd, input_bfd, value);
overflowed_p = mips_elf_overflow_p (value, 16);
break;
case R_MIPS_GOT_OFST:
if (local_p)
- mips_elf_got_page (abfd, input_bfd, info, symbol + addend, &value);
+ mips_elf_got_page (abfd, input_bfd, info, sec,
+ symbol + addend, &value);
else
value = addend;
overflowed_p = mips_elf_overflow_p (value, 16);
@@ -3576,12 +4527,16 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
value &= howto->dst_mask;
break;
- case R_MIPS_PJUMP:
case R_MIPS_JALR:
- /* Both of these may be ignored. R_MIPS_JALR is an optimization
- hint; we could improve performance by honoring that hint. */
- return bfd_reloc_continue;
+ /* This relocation is only a hint. In some cases, we optimize
+ it into a bal instruction. But we don't try to optimize
+ branches to the PLT; that will wind up wasting time. */
+ if (h != NULL && h->root.plt.offset != (bfd_vma) -1)
+ return bfd_reloc_continue;
+ value = symbol + addend;
+ break;
+ case R_MIPS_PJUMP:
case R_MIPS_GNU_VTINHERIT:
case R_MIPS_GNU_VTENTRY:
/* We don't do anything with these at present. */
@@ -3610,13 +4565,6 @@ mips_elf_obtain_contents (reloc_howto_type *howto,
/* Obtain the bytes. */
x = bfd_get ((8 * bfd_get_reloc_size (howto)), input_bfd, location);
- if ((ELF_R_TYPE (input_bfd, relocation->r_info) == R_MIPS16_26
- || ELF_R_TYPE (input_bfd, relocation->r_info) == R_MIPS16_GPREL)
- && bfd_little_endian (input_bfd))
- /* The two 16-bit words will be reversed on a little-endian system.
- See mips_elf_perform_relocation for more details. */
- x = (((x & 0xffff) << 16) | ((x & 0xffff0000) >> 16));
-
return x;
}
@@ -3644,107 +4592,14 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
/* Figure out where the relocation is occurring. */
location = contents + relocation->r_offset;
+ _bfd_mips16_elf_reloc_unshuffle (input_bfd, r_type, FALSE, location);
+
/* Obtain the current value. */
x = mips_elf_obtain_contents (howto, relocation, input_bfd, contents);
/* Clear the field we are setting. */
x &= ~howto->dst_mask;
- /* If this is the R_MIPS16_26 relocation, we must store the
- value in a funny way. */
- if (r_type == R_MIPS16_26)
- {
- /* R_MIPS16_26 is used for the mips16 jal and jalx instructions.
- Most mips16 instructions are 16 bits, but these instructions
- are 32 bits.
-
- The format of these instructions is:
-
- +--------------+--------------------------------+
- ! JALX ! X! Imm 20:16 ! Imm 25:21 !
- +--------------+--------------------------------+
- ! Immediate 15:0 !
- +-----------------------------------------------+
-
- JALX is the 5-bit value 00011. X is 0 for jal, 1 for jalx.
- Note that the immediate value in the first word is swapped.
-
- When producing a relocatable object file, R_MIPS16_26 is
- handled mostly like R_MIPS_26. In particular, the addend is
- stored as a straight 26-bit value in a 32-bit instruction.
- (gas makes life simpler for itself by never adjusting a
- R_MIPS16_26 reloc to be against a section, so the addend is
- always zero). However, the 32 bit instruction is stored as 2
- 16-bit values, rather than a single 32-bit value. In a
- big-endian file, the result is the same; in a little-endian
- file, the two 16-bit halves of the 32 bit value are swapped.
- This is so that a disassembler can recognize the jal
- instruction.
-
- When doing a final link, R_MIPS16_26 is treated as a 32 bit
- instruction stored as two 16-bit values. The addend A is the
- contents of the targ26 field. The calculation is the same as
- R_MIPS_26. When storing the calculated value, reorder the
- immediate value as shown above, and don't forget to store the
- value as two 16-bit values.
-
- To put it in MIPS ABI terms, the relocation field is T-targ26-16,
- defined as
-
- big-endian:
- +--------+----------------------+
- | | |
- | | targ26-16 |
- |31 26|25 0|
- +--------+----------------------+
-
- little-endian:
- +----------+------+-------------+
- | | | |
- | sub1 | | sub2 |
- |0 9|10 15|16 31|
- +----------+--------------------+
- where targ26-16 is sub1 followed by sub2 (i.e., the addend field A is
- ((sub1 << 16) | sub2)).
-
- When producing a relocatable object file, the calculation is
- (((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2)
- When producing a fully linked file, the calculation is
- let R = (((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2)
- ((R & 0x1f0000) << 5) | ((R & 0x3e00000) >> 5) | (R & 0xffff) */
-
- if (!info->relocatable)
- /* Shuffle the bits according to the formula above. */
- value = (((value & 0x1f0000) << 5)
- | ((value & 0x3e00000) >> 5)
- | (value & 0xffff));
- }
- else if (r_type == R_MIPS16_GPREL)
- {
- /* R_MIPS16_GPREL is used for GP-relative addressing in mips16
- mode. A typical instruction will have a format like this:
-
- +--------------+--------------------------------+
- ! EXTEND ! Imm 10:5 ! Imm 15:11 !
- +--------------+--------------------------------+
- ! Major ! rx ! ry ! Imm 4:0 !
- +--------------+--------------------------------+
-
- EXTEND is the five bit value 11110. Major is the instruction
- opcode.
-
- This is handled exactly like R_MIPS_GPREL16, except that the
- addend is retrieved and stored as shown in this diagram; that
- is, the Imm fields above replace the V-rel16 field.
-
- All we need to do here is shuffle the bits appropriately. As
- above, the two 16-bit halves must be swapped on a
- little-endian system. */
- value = (((value & 0x7e0) << 16)
- | ((value & 0xf800) << 5)
- | (value & 0x1f));
- }
-
/* Set the field. */
x |= (value & howto->dst_mask);
@@ -3771,9 +4626,9 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
if (!ok)
{
(*_bfd_error_handler)
- (_("%s: %s+0x%lx: jump to stub routine which is not jal"),
- bfd_archive_filename (input_bfd),
- input_section->name,
+ (_("%B: %A+0x%lx: jump to stub routine which is not jal"),
+ input_bfd,
+ input_section,
(unsigned long) relocation->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -3783,14 +4638,39 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
x = (x & ~(0x3f << 26)) | (jalx_opcode << 26);
}
- /* Swap the high- and low-order 16 bits on little-endian systems
- when doing a MIPS16 relocation. */
- if ((r_type == R_MIPS16_GPREL || r_type == R_MIPS16_26)
- && bfd_little_endian (input_bfd))
- x = (((x & 0xffff) << 16) | ((x & 0xffff0000) >> 16));
+ /* On the RM9000, bal is faster than jal, because bal uses branch
+ prediction hardware. If we are linking for the RM9000, and we
+ see jal, and bal fits, use it instead. Note that this
+ transformation should be safe for all architectures. */
+ if (bfd_get_mach (input_bfd) == bfd_mach_mips9000
+ && !info->relocatable
+ && !require_jalx
+ && ((r_type == R_MIPS_26 && (x >> 26) == 0x3) /* jal addr */
+ || (r_type == R_MIPS_JALR && x == 0x0320f809))) /* jalr t9 */
+ {
+ bfd_vma addr;
+ bfd_vma dest;
+ bfd_signed_vma off;
+
+ addr = (input_section->output_section->vma
+ + input_section->output_offset
+ + relocation->r_offset
+ + 4);
+ if (r_type == R_MIPS_26)
+ dest = (value << 2) | ((addr >> 28) << 28);
+ else
+ dest = value;
+ off = dest - addr;
+ if (off <= 0x1ffff && off >= -0x20000)
+ x = 0x04110000 | (((bfd_vma) off >> 2) & 0xffff); /* bal addr */
+ }
/* Put the value into the output. */
bfd_put (8 * bfd_get_reloc_size (howto), input_bfd, x, location);
+
+ _bfd_mips16_elf_reloc_shuffle(input_bfd, r_type, !info->relocatable,
+ location);
+
return TRUE;
}
@@ -3806,23 +4686,31 @@ mips_elf_stub_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *section)
|| strncmp (name, CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0);
}
-/* Add room for N relocations to the .rel.dyn section in ABFD. */
+/* Add room for N relocations to the .rel(a).dyn section in ABFD. */
static void
-mips_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n)
+mips_elf_allocate_dynamic_relocations (bfd *abfd, struct bfd_link_info *info,
+ unsigned int n)
{
asection *s;
+ struct mips_elf_link_hash_table *htab;
- s = mips_elf_rel_dyn_section (abfd, FALSE);
+ htab = mips_elf_hash_table (info);
+ s = mips_elf_rel_dyn_section (info, FALSE);
BFD_ASSERT (s != NULL);
- if (s->_raw_size == 0)
+ if (htab->is_vxworks)
+ s->size += n * MIPS_ELF_RELA_SIZE (abfd);
+ else
{
- /* Make room for a null element. */
- s->_raw_size += MIPS_ELF_REL_SIZE (abfd);
- ++s->reloc_count;
+ if (s->size == 0)
+ {
+ /* Make room for a null element. */
+ s->size += MIPS_ELF_REL_SIZE (abfd);
+ ++s->reloc_count;
+ }
+ s->size += n * MIPS_ELF_REL_SIZE (abfd);
}
- s->_raw_size += n * MIPS_ELF_REL_SIZE (abfd);
}
/* Create a rel.dyn relocation for the dynamic linker to resolve. REL
@@ -3839,20 +4727,22 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
bfd_vma *addendp, asection *input_section)
{
Elf_Internal_Rela outrel[3];
- bfd_boolean skip;
asection *sreloc;
bfd *dynobj;
int r_type;
+ long indx;
+ bfd_boolean defined_p;
+ struct mips_elf_link_hash_table *htab;
+ htab = mips_elf_hash_table (info);
r_type = ELF_R_TYPE (output_bfd, rel->r_info);
dynobj = elf_hash_table (info)->dynobj;
- sreloc = mips_elf_rel_dyn_section (dynobj, FALSE);
+ sreloc = mips_elf_rel_dyn_section (info, FALSE);
BFD_ASSERT (sreloc != NULL);
BFD_ASSERT (sreloc->contents != NULL);
BFD_ASSERT (sreloc->reloc_count * MIPS_ELF_REL_SIZE (output_bfd)
- < sreloc->_raw_size);
+ < sreloc->size);
- skip = FALSE;
outrel[0].r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section, rel[0].r_offset);
outrel[1].r_offset =
@@ -3860,146 +4750,113 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
outrel[2].r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section, rel[2].r_offset);
-#if 0
- /* We begin by assuming that the offset for the dynamic relocation
- is the same as for the original relocation. We'll adjust this
- later to reflect the correct output offsets. */
- if (input_section->sec_info_type != ELF_INFO_TYPE_STABS)
- {
- outrel[1].r_offset = rel[1].r_offset;
- outrel[2].r_offset = rel[2].r_offset;
- }
- else
- {
- /* Except that in a stab section things are more complex.
- Because we compress stab information, the offset given in the
- relocation may not be the one we want; we must let the stabs
- machinery tell us the offset. */
- outrel[1].r_offset = outrel[0].r_offset;
- outrel[2].r_offset = outrel[0].r_offset;
- /* If we didn't need the relocation at all, this value will be
- -1. */
- if (outrel[0].r_offset == (bfd_vma) -1)
- skip = TRUE;
- }
-#endif
-
- if (outrel[0].r_offset == (bfd_vma) -1)
+ if (outrel[0].r_offset == MINUS_ONE)
/* The relocation field has been deleted. */
- skip = TRUE;
- else if (outrel[0].r_offset == (bfd_vma) -2)
+ 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. */
- skip = TRUE;
*addendp += symbol;
+ return TRUE;
}
- /* If we've decided to skip this relocation, just output an empty
- record. Note that R_MIPS_NONE == 0, so that this call to memset
- is a way of setting R_TYPE to R_MIPS_NONE. */
- if (skip)
- memset (outrel, 0, sizeof (Elf_Internal_Rela) * 3);
+ /* We must now calculate the dynamic symbol table index to use
+ in the relocation. */
+ if (h != NULL
+ && (!h->root.def_regular
+ || (info->shared && !info->symbolic && !h->root.forced_local)))
+ {
+ indx = h->root.dynindx;
+ if (SGI_COMPAT (output_bfd))
+ defined_p = h->root.def_regular;
+ else
+ /* ??? 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
{
- long indx;
- bfd_boolean defined_p;
-
- /* We must now calculate the dynamic symbol table index to use
- in the relocation. */
- if (h != NULL
- && (! info->symbolic || (h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
- /* h->root.dynindx may be -1 if this symbol was marked to
- become local. */
- && h->root.dynindx != -1)
- {
- indx = h->root.dynindx;
- if (SGI_COMPAT (output_bfd))
- defined_p = ((h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) != 0);
- else
- /* ??? 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;
+ if (sec != NULL && bfd_is_abs_section (sec))
+ indx = 0;
+ else if (sec == NULL || sec->owner == NULL)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
else
{
- if (sec != NULL && bfd_is_abs_section (sec))
- indx = 0;
- else if (sec == NULL || sec->owner == NULL)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
- else
- {
- indx = elf_section_data (sec->output_section)->dynindx;
- if (indx == 0)
- abort ();
- }
+ indx = elf_section_data (sec->output_section)->dynindx;
+ if (indx == 0)
+ abort ();
+ }
- /* Instead of generating a relocation using the section
- symbol, we may as well make it a fully relative
- relocation. We want to avoid generating relocations to
- local symbols because we used to generate them
- incorrectly, without adding the original symbol value,
- which is mandated by the ABI for section symbols. In
- order to give dynamic loaders and applications time to
- phase out the incorrect use, we refrain from emitting
- section-relative relocations. It's not like they're
- useful, after all. This should be a bit more efficient
- as well. */
- /* ??? Although this behavior is compatible with glibc's ld.so,
- the ABI says that relocations against STN_UNDEF should have
- a symbol value of 0. Irix rld honors this, so relocations
- against STN_UNDEF have no effect. */
- if (!SGI_COMPAT (output_bfd))
- 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_MIPS_REL32)
- *addendp += symbol;
-
- /* The relocation is always an REL32 relocation because we don't
- know where the shared library will wind up at load-time. */
- outrel[0].r_info = ELF_R_INFO (output_bfd, (unsigned long) indx,
- R_MIPS_REL32);
- /* For strict adherence to the ABI specification, we should
- generate a R_MIPS_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 MIPS dynamic
- loaders seems to care, we don't waste space with these
- artificial relocations. If this turns out to not be true,
- mips_elf_allocate_dynamic_relocation() 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_MIPS_64 by itself for a
- NULL symbol before this relocation record. */
- outrel[1].r_info = ELF_R_INFO (output_bfd, 0,
- ABI_64_P (output_bfd)
- ? R_MIPS_64
- : R_MIPS_NONE);
- outrel[2].r_info = ELF_R_INFO (output_bfd, 0, R_MIPS_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);
- }
+ /* Instead of generating a relocation using the section
+ symbol, we may as well make it a fully relative
+ relocation. We want to avoid generating relocations to
+ local symbols because we used to generate them
+ incorrectly, without adding the original symbol value,
+ which is mandated by the ABI for section symbols. In
+ order to give dynamic loaders and applications time to
+ phase out the incorrect use, we refrain from emitting
+ section-relative relocations. It's not like they're
+ useful, after all. This should be a bit more efficient
+ as well. */
+ /* ??? Although this behavior is compatible with glibc's ld.so,
+ the ABI says that relocations against STN_UNDEF should have
+ a symbol value of 0. Irix rld honors this, so relocations
+ against STN_UNDEF have no effect. */
+ if (!SGI_COMPAT (output_bfd))
+ 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_MIPS_REL32)
+ *addendp += symbol;
+
+ if (htab->is_vxworks)
+ /* VxWorks uses non-relative relocations for this. */
+ outrel[0].r_info = ELF32_R_INFO (indx, R_MIPS_32);
+ else
+ /* 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 = ELF_R_INFO (output_bfd, (unsigned long) indx,
+ R_MIPS_REL32);
+
+ /* For strict adherence to the ABI specification, we should
+ generate a R_MIPS_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 MIPS dynamic
+ loaders seems to care, we don't waste space with these
+ artificial relocations. If this turns out to not be true,
+ mips_elf_allocate_dynamic_relocation() 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_MIPS_64 by itself for a
+ NULL symbol before this relocation record. */
+ outrel[1].r_info = ELF_R_INFO (output_bfd, 0,
+ ABI_64_P (output_bfd)
+ ? R_MIPS_64
+ : R_MIPS_NONE);
+ outrel[2].r_info = ELF_R_INFO (output_bfd, 0, R_MIPS_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
@@ -4011,6 +4868,15 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
(sreloc->contents
+ sreloc->reloc_count * sizeof (Elf64_Mips_External_Rel)));
}
+ else if (htab->is_vxworks)
+ {
+ /* VxWorks uses RELA rather than REL dynamic relocations. */
+ outrel[0].r_addend = *addendp;
+ bfd_elf32_swap_reloca_out
+ (output_bfd, &outrel[0],
+ (sreloc->contents
+ + sreloc->reloc_count * sizeof (Elf32_External_Rela)));
+ }
else
bfd_elf32_swap_reloc_out
(output_bfd, &outrel[0],
@@ -4025,7 +4891,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
|= SHF_WRITE;
/* On IRIX5, make an entry of compact relocation info. */
- if (! skip && IRIX_COMPAT (output_bfd) == ict_irix5)
+ if (IRIX_COMPAT (output_bfd) == ict_irix5)
{
asection *scpt = bfd_get_section_by_name (dynobj, ".compact_rel");
bfd_byte *cr;
@@ -4047,6 +4913,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
cr = (scpt->contents
+ sizeof (Elf32_External_compact_rel));
+ mips_elf_set_cr_relvaddr (cptrel, 0);
bfd_elf32_swap_crinfo_out (output_bfd, &cptrel,
((Elf32_External_crinfo *) cr
+ scpt->reloc_count));
@@ -4054,6 +4921,12 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
}
}
+ /* 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;
+
return TRUE;
}
@@ -4250,18 +5123,106 @@ _bfd_mips_elf_symbol_processing (bfd *abfd, asymbol *asym)
asym->section = bfd_und_section_ptr;
break;
-#if 0 /* for SGI_COMPAT */
case SHN_MIPS_TEXT:
- asym->section = mips_elf_text_section_ptr;
+ {
+ asection *section = bfd_get_section_by_name (abfd, ".text");
+
+ BFD_ASSERT (SGI_COMPAT (abfd));
+ if (section != NULL)
+ {
+ asym->section = section;
+ /* MIPS_TEXT is a bit special, the address is not an offset
+ to the base of the .text section. So substract the section
+ base address to make it an offset. */
+ asym->value -= section->vma;
+ }
+ }
break;
case SHN_MIPS_DATA:
- asym->section = mips_elf_data_section_ptr;
+ {
+ asection *section = bfd_get_section_by_name (abfd, ".data");
+
+ BFD_ASSERT (SGI_COMPAT (abfd));
+ if (section != NULL)
+ {
+ asym->section = section;
+ /* MIPS_DATA is a bit special, the address is not an offset
+ to the base of the .data section. So substract the section
+ base address to make it an offset. */
+ asym->value -= section->vma;
+ }
+ }
break;
-#endif
}
}
+/* Implement elf_backend_eh_frame_address_size. This differs from
+ the default in the way it handles EABI64.
+
+ EABI64 was originally specified as an LP64 ABI, and that is what
+ -mabi=eabi normally gives on a 64-bit target. However, gcc has
+ historically accepted the combination of -mabi=eabi and -mlong32,
+ and this ILP32 variation has become semi-official over time.
+ Both forms use elf32 and have pointer-sized FDE addresses.
+
+ If an EABI object was generated by GCC 4.0 or above, it will have
+ an empty .gcc_compiled_longXX section, where XX is the size of longs
+ in bits. Unfortunately, ILP32 objects generated by earlier compilers
+ have no special marking to distinguish them from LP64 objects.
+
+ We don't want users of the official LP64 ABI to be punished for the
+ existence of the ILP32 variant, but at the same time, we don't want
+ to mistakenly interpret pre-4.0 ILP32 objects as being LP64 objects.
+ We therefore take the following approach:
+
+ - If ABFD contains a .gcc_compiled_longXX section, use it to
+ determine the pointer size.
+
+ - Otherwise check the type of the first relocation. Assume that
+ the LP64 ABI is being used if the relocation is of type R_MIPS_64.
+
+ - Otherwise punt.
+
+ The second check is enough to detect LP64 objects generated by pre-4.0
+ compilers because, in the kind of output generated by those compilers,
+ the first relocation will be associated with either a CIE personality
+ routine or an FDE start address. Furthermore, the compilers never
+ used a special (non-pointer) encoding for this ABI.
+
+ Checking the relocation type should also be safe because there is no
+ reason to use R_MIPS_64 in an ILP32 object. Pre-4.0 compilers never
+ did so. */
+
+unsigned int
+_bfd_mips_elf_eh_frame_address_size (bfd *abfd, asection *sec)
+{
+ if (elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64)
+ return 8;
+ if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI64)
+ {
+ bfd_boolean long32_p, long64_p;
+
+ long32_p = bfd_get_section_by_name (abfd, ".gcc_compiled_long32") != 0;
+ long64_p = bfd_get_section_by_name (abfd, ".gcc_compiled_long64") != 0;
+ if (long32_p && long64_p)
+ return 0;
+ if (long32_p)
+ return 4;
+ if (long64_p)
+ return 8;
+
+ if (sec->reloc_count > 0
+ && elf_section_data (sec)->relocs != NULL
+ && (ELF32_R_TYPE (elf_section_data (sec)->relocs[0].r_info)
+ == R_MIPS_64))
+ return 8;
+
+ return 0;
+ }
+ return 4;
+}
+
/* There appears to be a bug in the MIPSpro linker that causes GOT_DISP
relocations against two unnamed section symbols to resolve to the
same address. For example, if we have code like:
@@ -4330,6 +5291,13 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr)
bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l,
&intopt);
+ if (intopt.size < sizeof (Elf_External_Options))
+ {
+ (*_bfd_error_handler)
+ (_("%B: Warning: bad `%s' option size %u smaller than its header"),
+ abfd, MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size);
+ break;
+ }
if (ABI_64_P (abfd) && intopt.kind == ODK_REGINFO)
{
bfd_byte buf[8];
@@ -4414,8 +5382,10 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr)
how to. */
bfd_boolean
-_bfd_mips_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr,
- const char *name)
+_bfd_mips_elf_section_from_shdr (bfd *abfd,
+ Elf_Internal_Shdr *hdr,
+ const char *name,
+ int shindex)
{
flagword flags = 0;
@@ -4466,7 +5436,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr,
return FALSE;
break;
case SHT_MIPS_OPTIONS:
- if (strcmp (name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) != 0)
+ if (!MIPS_ELF_OPTIONS_SECTION_NAME_P (name))
return FALSE;
break;
case SHT_MIPS_DWARF:
@@ -4484,10 +5454,10 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr,
return FALSE;
break;
default:
- return FALSE;
+ break;
}
- if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
if (flags)
@@ -4542,6 +5512,13 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr,
bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l,
&intopt);
+ if (intopt.size < sizeof (Elf_External_Options))
+ {
+ (*_bfd_error_handler)
+ (_("%B: Warning: bad `%s' option size %u smaller than its header"),
+ abfd, MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size);
+ break;
+ }
if (ABI_64_P (abfd) && intopt.kind == ODK_REGINFO)
{
Elf64_Internal_RegInfo intreg;
@@ -4580,13 +5557,15 @@ 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;
if (strcmp (name, ".liblist") == 0)
{
hdr->sh_type = SHT_MIPS_LIBLIST;
- hdr->sh_info = sec->_raw_size / sizeof (Elf32_Lib);
+ hdr->sh_info = sec->size / sizeof (Elf32_Lib);
/* The sh_link field is set in final_write_processing. */
}
else if (strcmp (name, ".conflict") == 0)
@@ -4654,7 +5633,7 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
/* The sh_info field is set in final_write_processing. */
}
- else if (strcmp (name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) == 0)
+ else if (MIPS_ELF_OPTIONS_SECTION_NAME_P (name))
{
hdr->sh_type = SHT_MIPS_OPTIONS;
hdr->sh_entsize = 1;
@@ -4683,6 +5662,12 @@ _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
@@ -4733,6 +5718,20 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
return TRUE;
}
+ /* Shared objects may have a dynamic symbol '_gp_disp' defined as
+ a SECTION *ABS*. This causes ld to think it can resolve _gp_disp
+ by setting a DT_NEEDED for the shared object. Since _gp_disp is
+ a magic symbol resolved by the linker, we ignore this bogus definition
+ of _gp_disp. New ABI objects do not suffer from this problem so this
+ is not done for them. */
+ if (!NEWABI_P(abfd)
+ && (sym->st_shndx == SHN_ABS)
+ && (strcmp (*namep, "_gp_disp") == 0))
+ {
+ *namep = NULL;
+ return TRUE;
+ }
+
switch (sym->st_shndx)
{
case SHN_COMMON:
@@ -4849,8 +5848,8 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
return FALSE;
h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->non_elf = 0;
+ h->def_regular = 1;
h->type = STT_OBJECT;
if (! bfd_elf_link_record_dynamic_symbol (info, h))
@@ -4885,9 +5884,8 @@ _bfd_mips_elf_link_output_symbol_hook
&& strcmp (input_sec->name, ".scommon") == 0)
sym->st_shndx = SHN_MIPS_SCOMMON;
- if (sym->st_other == STO_MIPS16
- && (sym->st_value & 1) != 0)
- --sym->st_value;
+ if (sym->st_other == STO_MIPS16)
+ sym->st_value &= ~1;
return TRUE;
}
@@ -4904,32 +5902,39 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
flagword flags;
register asection *s;
const char * const *namep;
+ struct mips_elf_link_hash_table *htab;
+ htab = mips_elf_hash_table (info);
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
| SEC_LINKER_CREATED | SEC_READONLY);
- /* Mips ABI requests the .dynamic section to be read only. */
- s = bfd_get_section_by_name (abfd, ".dynamic");
- if (s != NULL)
+ /* The psABI requires a read-only .dynamic section, but the VxWorks
+ EABI doesn't. */
+ if (!htab->is_vxworks)
{
- if (! bfd_set_section_flags (abfd, s, flags))
- return FALSE;
+ 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 (! mips_elf_create_got_section (abfd, info, FALSE))
return FALSE;
- if (! mips_elf_rel_dyn_section (elf_hash_table (info)->dynobj, TRUE))
+ if (! mips_elf_rel_dyn_section (info, TRUE))
return FALSE;
/* Create .stub section. */
if (bfd_get_section_by_name (abfd,
MIPS_ELF_STUB_SECTION_NAME (abfd)) == NULL)
{
- s = bfd_make_section (abfd, MIPS_ELF_STUB_SECTION_NAME (abfd));
+ s = bfd_make_section_with_flags (abfd,
+ MIPS_ELF_STUB_SECTION_NAME (abfd),
+ flags | SEC_CODE);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_CODE)
|| ! bfd_set_section_alignment (abfd, s,
MIPS_ELF_LOG_FILE_ALIGN (abfd)))
return FALSE;
@@ -4939,9 +5944,9 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
&& !info->shared
&& bfd_get_section_by_name (abfd, ".rld_map") == NULL)
{
- s = bfd_make_section (abfd, ".rld_map");
+ s = bfd_make_section_with_flags (abfd, ".rld_map",
+ flags &~ (flagword) SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags &~ (flagword) SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s,
MIPS_ELF_LOG_FILE_ALIGN (abfd)))
return FALSE;
@@ -4962,8 +5967,8 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
return FALSE;
h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->non_elf = 0;
+ h->def_regular = 1;
h->type = STT_SECTION;
if (! bfd_elf_link_record_dynamic_symbol (info, h))
@@ -5007,8 +6012,8 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
return FALSE;
h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->non_elf = 0;
+ h->def_regular = 1;
h->type = STT_SECTION;
if (! bfd_elf_link_record_dynamic_symbol (info, h))
@@ -5031,8 +6036,8 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
return FALSE;
h = (struct elf_link_hash_entry *) bh;
- h->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->non_elf = 0;
+ h->def_regular = 1;
h->type = STT_OBJECT;
if (! bfd_elf_link_record_dynamic_symbol (info, h))
@@ -5040,6 +6045,45 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
}
}
+ if (htab->is_vxworks)
+ {
+ /* Create the .plt, .rela.plt, .dynbss and .rela.bss sections.
+ Also create the _PROCEDURE_LINKAGE_TABLE symbol. */
+ if (!_bfd_elf_create_dynamic_sections (abfd, info))
+ return FALSE;
+
+ /* Cache the sections created above. */
+ htab->sdynbss = bfd_get_section_by_name (abfd, ".dynbss");
+ htab->srelbss = bfd_get_section_by_name (abfd, ".rela.bss");
+ htab->srelplt = bfd_get_section_by_name (abfd, ".rela.plt");
+ htab->splt = bfd_get_section_by_name (abfd, ".plt");
+ if (!htab->sdynbss
+ || (!htab->srelbss && !info->shared)
+ || !htab->srelplt
+ || !htab->splt)
+ abort ();
+
+ /* Do the usual VxWorks handling. */
+ if (!elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2))
+ return FALSE;
+
+ /* Work out the PLT sizes. */
+ if (info->shared)
+ {
+ htab->plt_header_size
+ = 4 * ARRAY_SIZE (mips_vxworks_shared_plt0_entry);
+ htab->plt_entry_size
+ = 4 * ARRAY_SIZE (mips_vxworks_shared_plt_entry);
+ }
+ else
+ {
+ htab->plt_header_size
+ = 4 * ARRAY_SIZE (mips_vxworks_exec_plt0_entry);
+ htab->plt_entry_size
+ = 4 * ARRAY_SIZE (mips_vxworks_exec_plt_entry);
+ }
+ }
+
return TRUE;
}
@@ -5061,10 +6105,12 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
asection *sgot;
asection *sreloc;
const struct elf_backend_data *bed;
+ struct mips_elf_link_hash_table *htab;
if (info->relocatable)
return TRUE;
+ htab = mips_elf_hash_table (info);
dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
@@ -5169,6 +6215,10 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
h = ((struct mips_elf_link_hash_entry *)
sym_hashes[r_symndx - extsymoff]);
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
+
/* H is the symbol this stub is for. */
h->fn_stub = sec;
@@ -5263,8 +6313,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
{
(*_bfd_error_handler)
- (_("%s: Malformed reloc detected for section %s"),
- bfd_archive_filename (abfd), name);
+ (_("%B: Malformed reloc detected for section %s"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5294,18 +6344,32 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_MIPS_GOT_PAGE:
case R_MIPS_GOT_OFST:
case R_MIPS_GOT_DISP:
+ case R_MIPS_TLS_GOTTPREL:
+ case R_MIPS_TLS_GD:
+ case R_MIPS_TLS_LDM:
if (dynobj == NULL)
elf_hash_table (info)->dynobj = dynobj = abfd;
if (! mips_elf_create_got_section (dynobj, info, FALSE))
return FALSE;
g = mips_elf_got_info (dynobj, &sgot);
+ if (htab->is_vxworks && !info->shared)
+ {
+ (*_bfd_error_handler)
+ (_("%B: GOT reloc at 0x%lx not expected in executables"),
+ abfd, (unsigned long) rel->r_offset);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
break;
case R_MIPS_32:
case R_MIPS_REL32:
case R_MIPS_64:
+ /* In VxWorks executables, references to external symbols
+ are handled using copy relocs or PLT stubs, so there's
+ no need to add a dynamic relocation here. */
if (dynobj == NULL
- && (info->shared || h != NULL)
+ && (info->shared || (h != NULL && !htab->is_vxworks))
&& (sec->flags & SEC_ALLOC) != 0)
elf_hash_table (info)->dynobj = dynobj = abfd;
break;
@@ -5315,19 +6379,39 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
}
}
- if (!h && (r_type == R_MIPS_CALL_LO16
- || r_type == R_MIPS_GOT_LO16
- || r_type == R_MIPS_GOT_DISP))
+ if (h)
+ {
+ ((struct mips_elf_link_hash_entry *) h)->is_relocation_target = TRUE;
+
+ /* Relocations against the special VxWorks __GOTT_BASE__ and
+ __GOTT_INDEX__ symbols must be left to the loader. Allocate
+ room for them in .rela.dyn. */
+ if (is_gott_symbol (info, h))
+ {
+ if (sreloc == NULL)
+ {
+ sreloc = mips_elf_rel_dyn_section (info, TRUE);
+ if (sreloc == NULL)
+ return FALSE;
+ }
+ mips_elf_allocate_dynamic_relocations (dynobj, info, 1);
+ }
+ }
+ else if (r_type == R_MIPS_CALL_LO16
+ || r_type == R_MIPS_GOT_LO16
+ || r_type == R_MIPS_GOT_DISP
+ || (r_type == R_MIPS_GOT16 && htab->is_vxworks))
{
/* We may need a local GOT entry for this relocation. We
don't count R_MIPS_GOT_PAGE because we can estimate the
maximum number of pages needed by looking at the size of
the segment. Similar comments apply to R_MIPS_GOT16 and
- R_MIPS_CALL16. We don't count R_MIPS_GOT_HI16, or
+ R_MIPS_CALL16, except on VxWorks, where GOT relocations
+ always evaluate to "G". We don't count R_MIPS_GOT_HI16, or
R_MIPS_CALL_HI16 because these are always followed by an
R_MIPS_GOT_LO16 or R_MIPS_CALL_LO16. */
if (! mips_elf_record_local_got_symbol (abfd, r_symndx,
- rel->r_addend, g))
+ rel->r_addend, g, 0))
return FALSE;
}
@@ -5337,8 +6421,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (h == NULL)
{
(*_bfd_error_handler)
- (_("%s: CALL16 reloc at 0x%lx not against global symbol"),
- bfd_archive_filename (abfd), (unsigned long) rel->r_offset);
+ (_("%B: CALL16 reloc at 0x%lx not against global symbol"),
+ abfd, (unsigned long) rel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -5348,14 +6432,17 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_MIPS_CALL_LO16:
if (h != NULL)
{
- /* This symbol requires a global offset table entry. */
- if (! mips_elf_record_global_got_symbol (h, abfd, info, g))
+ /* VxWorks call relocations point the function's .got.plt
+ entry, which will be allocated by adjust_dynamic_symbol.
+ Otherwise, this symbol requires a global GOT entry. */
+ if (!htab->is_vxworks
+ && !mips_elf_record_global_got_symbol (h, abfd, info, g, 0))
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->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 1;
h->type = STT_FUNC;
}
break;
@@ -5375,10 +6462,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
hmips = (struct mips_elf_link_hash_entry *)
hmips->root.root.u.i.link;
- if ((hmips->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
+ if (hmips->root.def_regular
&& ! (info->shared && ! info->symbolic
- && ! (hmips->root.elf_link_hash_flags
- & ELF_LINK_FORCED_LOCAL)))
+ && ! hmips->root.forced_local))
break;
}
/* Fall through. */
@@ -5387,33 +6473,74 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_MIPS_GOT_HI16:
case R_MIPS_GOT_LO16:
case R_MIPS_GOT_DISP:
- /* This symbol requires a global offset table entry. */
- if (h && ! mips_elf_record_global_got_symbol (h, abfd, info, g))
+ if (h && ! mips_elf_record_global_got_symbol (h, abfd, info, g, 0))
return FALSE;
break;
+ case R_MIPS_TLS_GOTTPREL:
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ /* Fall through */
+
+ case R_MIPS_TLS_LDM:
+ if (r_type == R_MIPS_TLS_LDM)
+ {
+ r_symndx = 0;
+ h = NULL;
+ }
+ /* Fall through */
+
+ case R_MIPS_TLS_GD:
+ /* This symbol requires a global offset table entry, or two
+ for TLS GD relocations. */
+ {
+ unsigned char flag = (r_type == R_MIPS_TLS_GD
+ ? GOT_TLS_GD
+ : r_type == R_MIPS_TLS_LDM
+ ? GOT_TLS_LDM
+ : GOT_TLS_IE);
+ if (h != NULL)
+ {
+ struct mips_elf_link_hash_entry *hmips =
+ (struct mips_elf_link_hash_entry *) h;
+ hmips->tls_type |= flag;
+
+ if (h && ! mips_elf_record_global_got_symbol (h, abfd, info, g, flag))
+ return FALSE;
+ }
+ else
+ {
+ BFD_ASSERT (flag == GOT_TLS_LDM || r_symndx != 0);
+
+ if (! mips_elf_record_local_got_symbol (abfd, r_symndx,
+ rel->r_addend, g, flag))
+ return FALSE;
+ }
+ }
+ break;
+
case R_MIPS_32:
case R_MIPS_REL32:
case R_MIPS_64:
- if ((info->shared || h != NULL)
+ /* In VxWorks executables, references to external symbols
+ are handled using copy relocs or PLT stubs, so there's
+ no need to add a .rela.dyn entry for this relocation. */
+ if ((info->shared || (h != NULL && !htab->is_vxworks))
&& (sec->flags & SEC_ALLOC) != 0)
{
if (sreloc == NULL)
{
- sreloc = mips_elf_rel_dyn_section (dynobj, TRUE);
+ sreloc = mips_elf_rel_dyn_section (info, TRUE);
if (sreloc == NULL)
return FALSE;
}
-#define MIPS_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_MIPS_REL32
- relocs. We make room for this reloc in the
- .rel.dyn reloc section. */
- mips_elf_allocate_dynamic_relocations (dynobj, 1);
- if ((sec->flags & MIPS_READONLY_SECTION)
- == MIPS_READONLY_SECTION)
+ relocs. Make room for this reloc in .rel(a).dyn. */
+ 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;
@@ -5426,8 +6553,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
defined in a dynamic object. */
hmips = (struct mips_elf_link_hash_entry *) h;
++hmips->possibly_dynamic_relocs;
- if ((sec->flags & MIPS_READONLY_SECTION)
- == MIPS_READONLY_SECTION)
+ if (MIPS_ELF_READONLY_SECTION (sec))
/* We need it to tell the dynamic linker if there
are relocations against the text segment. */
hmips->readonly_reloc = TRUE;
@@ -5436,15 +6562,17 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* Even though we don't directly need a GOT entry for
this symbol, a symbol must have a dynamic symbol
table index greater that DT_MIPS_GOTSYM if there are
- dynamic relocations against it. */
- if (h != NULL)
+ dynamic relocations against it. This does not apply
+ to VxWorks, which does not have the usual coupling
+ between global GOT entries and .dynsym entries. */
+ if (h != NULL && !htab->is_vxworks)
{
if (dynobj == NULL)
elf_hash_table (info)->dynobj = dynobj = abfd;
if (! mips_elf_create_got_section (dynobj, info, TRUE))
return FALSE;
g = mips_elf_got_info (dynobj, &sgot);
- if (! mips_elf_record_global_got_symbol (h, abfd, info, g))
+ if (! mips_elf_record_global_got_symbol (h, abfd, info, g, 0))
return FALSE;
}
}
@@ -5454,7 +6582,16 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
sizeof (Elf32_External_crinfo);
break;
+ case R_MIPS_PC16:
+ if (h)
+ ((struct mips_elf_link_hash_entry *) h)->is_branch_target = TRUE;
+ break;
+
case R_MIPS_26:
+ if (h)
+ ((struct mips_elf_link_hash_entry *) h)->is_branch_target = TRUE;
+ /* Fall through. */
+
case R_MIPS_GPREL16:
case R_MIPS_LITERAL:
case R_MIPS_GPREL32:
@@ -5482,24 +6619,21 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
}
/* 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 mips_elf_link_hash_entry *mh;
-
- mh = (struct mips_elf_link_hash_entry *) h;
- mh->no_fn_stub = TRUE;
- }
- break;
- case R_MIPS_CALL16:
- case R_MIPS_CALL_HI16:
- case R_MIPS_CALL_LO16:
- case R_MIPS_JALR:
- break;
- }
+ related to taking the function's address. This doesn't apply to
+ VxWorks, where CALL relocs refer to a .got.plt entry instead of
+ a normal .got entry. */
+ if (!htab->is_vxworks && h != NULL)
+ switch (r_type)
+ {
+ default:
+ ((struct mips_elf_link_hash_entry *) h)->no_fn_stub = TRUE;
+ break;
+ case R_MIPS_CALL16:
+ case R_MIPS_CALL_HI16:
+ case R_MIPS_CALL_LO16:
+ case R_MIPS_JALR:
+ break;
+ }
/* If this reloc is not a 16 bit call, and it has a global
symbol, then we will need the fn_stub if there is one.
@@ -5532,7 +6666,6 @@ _bfd_mips_relax_section (bfd *abfd, asection *sec,
Elf_Internal_Rela *irel, *irelend;
Elf_Internal_Shdr *symtab_hdr;
bfd_byte *contents = NULL;
- bfd_byte *free_contents = NULL;
size_t extsymoff;
bfd_boolean changed_contents = FALSE;
bfd_vma sec_start = sec->output_section->vma + sec->output_offset;
@@ -5588,7 +6721,7 @@ _bfd_mips_relax_section (bfd *abfd, asection *sec,
|| h->root.root.type == bfd_link_hash_defweak)
&& h->root.root.u.def.section)
|| (link_info->shared && ! link_info->symbolic
- && ! (h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)))
+ && !h->root.forced_local))
continue;
sym_sec = h->root.root.u.def.section;
@@ -5653,13 +6786,7 @@ _bfd_mips_relax_section (bfd *abfd, asection *sec,
contents = elf_section_data (sec)->this_hdr.contents;
else
{
- contents = bfd_malloc (sec->_raw_size);
- if (contents == NULL)
- goto relax_return;
-
- free_contents = contents;
- if (! bfd_get_section_contents (abfd, sec, contents,
- 0, sec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, sec, &contents))
goto relax_return;
}
}
@@ -5694,8 +6821,9 @@ _bfd_mips_relax_section (bfd *abfd, asection *sec,
return TRUE;
relax_return:
- if (free_contents != NULL)
- free (free_contents);
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
return FALSE;
}
@@ -5712,19 +6840,18 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
bfd *dynobj;
struct mips_elf_link_hash_entry *hmips;
asection *s;
+ struct mips_elf_link_hash_table *htab;
+ htab = mips_elf_hash_table (info);
dynobj = elf_hash_table (info)->dynobj;
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL
- && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
- || h->weakdef != NULL
- || ((h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_REF_REGULAR) != 0
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)));
+ && (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_MIPS_32 or R_MIPS_REL32 relocs against it into the output
@@ -5733,11 +6860,10 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
if (! info->relocatable
&& hmips->possibly_dynamic_relocs != 0
&& (h->root.type == bfd_link_hash_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || !h->def_regular))
{
- mips_elf_allocate_dynamic_relocations (dynobj,
- hmips->possibly_dynamic_relocs);
+ mips_elf_allocate_dynamic_relocations
+ (dynobj, info, hmips->possibly_dynamic_relocs);
if (hmips->readonly_reloc)
/* We tell the dynamic linker that there are relocations
against the text segment. */
@@ -5746,7 +6872,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* For a function, create a stub, if allowed. */
if (! hmips->no_fn_stub
- && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ && h->needs_plt)
{
if (! elf_hash_table (info)->dynamic_sections_created)
return TRUE;
@@ -5755,7 +6881,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
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->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (!h->def_regular)
{
/* We need .stub section. */
s = bfd_get_section_by_name (dynobj,
@@ -5763,13 +6889,13 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
BFD_ASSERT (s != NULL);
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = s->size;
/* XXX Write this stub address somewhere. */
- h->plt.offset = s->_raw_size;
+ h->plt.offset = s->size;
/* Make room for this stub code. */
- s->_raw_size += MIPS_FUNCTION_STUB_SIZE;
+ s->size += htab->function_stub_size;
/* The last half word of the stub will be filled with the index
of this symbol in .dynsym section. */
@@ -5777,7 +6903,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
}
}
else if ((h->type == STT_FUNC)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0)
+ && !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. */
@@ -5788,21 +6914,201 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->weakdef != NULL)
+ 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;
+}
+
+/* Likewise, for VxWorks. */
+
+bfd_boolean
+_bfd_mips_vxworks_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
+{
+ 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;
+ hmips = (struct mips_elf_link_hash_entry *) h;
+
+ /* Make sure we know what is going on here. */
+ BFD_ASSERT (dynobj != NULL
+ && (h->needs_plt
+ || h->needs_copy
+ || h->u.weakdef != NULL
+ || (h->def_dynamic
+ && h->ref_regular
+ && !h->def_regular)));
+
+ /* If the symbol is defined by a dynamic object, we need a PLT stub if
+ either (a) we want to branch to the symbol or (b) we're linking an
+ executable that needs a canonical function address. In the latter
+ case, the canonical address will be the address of the executable's
+ load stub. */
+ if ((hmips->is_branch_target
+ || (!info->shared
+ && h->type == STT_FUNC
+ && hmips->is_relocation_target))
+ && h->def_dynamic
+ && h->ref_regular
+ && !h->def_regular
+ && !h->forced_local)
+ h->needs_plt = 1;
+
+ /* Locally-binding symbols do not need a PLT stub; we can refer to
+ the functions directly. */
+ else if (h->needs_plt
+ && (SYMBOL_CALLS_LOCAL (info, h)
+ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ && h->root.type == bfd_link_hash_undefweak)))
+ {
+ h->needs_plt = 0;
+ return TRUE;
+ }
+
+ if (h->needs_plt)
+ {
+ /* If this is the first symbol to need a PLT entry, allocate room
+ for the header, and for the header's .rela.plt.unloaded entries. */
+ if (htab->splt->size == 0)
+ {
+ htab->splt->size += htab->plt_header_size;
+ if (!info->shared)
+ htab->srelplt2->size += 2 * sizeof (Elf32_External_Rela);
+ }
+
+ /* Assign the next .plt entry to this symbol. */
+ h->plt.offset = htab->splt->size;
+ htab->splt->size += htab->plt_entry_size;
+
+ /* If the output file has no definition of the symbol, set the
+ symbol's value to the address of the stub. For executables,
+ point at the PLT load stub rather than the lazy resolution stub;
+ this stub will become the canonical function address. */
+ if (!h->def_regular)
+ {
+ h->root.u.def.section = htab->splt;
+ h->root.u.def.value = h->plt.offset;
+ if (!info->shared)
+ h->root.u.def.value += 8;
+ }
+
+ /* Make room for the .got.plt entry and the R_JUMP_SLOT relocation. */
+ htab->sgotplt->size += 4;
+ htab->srelplt->size += sizeof (Elf32_External_Rela);
+
+ /* Make room for the .rela.plt.unloaded relocations. */
+ if (!info->shared)
+ htab->srelplt2->size += 3 * sizeof (Elf32_External_Rela);
+
+ return TRUE;
+ }
+
+ /* If a function symbol is defined by a dynamic object, and we do not
+ need a PLT stub for it, the symbol's value should be zero. */
+ if (h->type == STT_FUNC
+ && h->def_dynamic
+ && h->ref_regular
+ && !h->def_regular)
+ {
+ 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->weakdef->root.type == bfd_link_hash_defined
- || h->weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->weakdef->root.u.def.section;
- h->root.u.def.value = h->weakdef->root.u.def.value;
+ 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. */
+ if (info->shared)
+ return TRUE;
+
+ /* We must allocate the symbol in our .dynbss section, which will
+ become part of the .bss section of the executable. There will be
+ an entry for this symbol in the .dynsym section. The dynamic
+ object will contain position independent code, so all references
+ from the dynamic object to this symbol will go through the global
+ offset table. The dynamic linker will use the .dynsym entry to
+ determine the address it must put in the global offset table, so
+ both the dynamic object and the regular object will refer to the
+ same memory location for the variable. */
+
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ {
+ htab->srelbss->size += sizeof (Elf32_External_Rela);
+ 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 the number of dynamic section symbols required by OUTPUT_BFD.
+ The number might be exact or a worst-case estimate, depending on how
+ much information is available to elf_backend_omit_section_dynsym at
+ the current linking stage. */
+
+static bfd_size_type
+count_section_dynsyms (bfd *output_bfd, struct bfd_link_info *info)
+{
+ bfd_size_type count;
+
+ count = 0;
+ if (info->shared)
+ {
+ asection *p;
+ const struct elf_backend_data *bed;
+
+ 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))
+ ++count;
+ }
+ return count;
+}
+
/* This function is called after all the input files have been read,
and the input sections have been assigned to output sections. We
check for any mips16 stub sections that we can discard. */
@@ -5819,7 +7125,12 @@ _bfd_mips_elf_always_size_sections (bfd *output_bfd,
int i;
bfd_size_type loadable_size = 0;
bfd_size_type local_gotno;
+ bfd_size_type dynsymcount;
bfd *sub;
+ struct mips_elf_count_tls_arg count_tls_arg;
+ struct mips_elf_link_hash_table *htab;
+
+ htab = mips_elf_hash_table (info);
/* The .reginfo section has a fixed size. */
ri = bfd_get_section_by_name (output_bfd, ".reginfo");
@@ -5853,7 +7164,7 @@ _bfd_mips_elf_always_size_sections (bfd *output_bfd,
{
if ((subsection->flags & SEC_ALLOC) == 0)
continue;
- loadable_size += ((subsection->_raw_size + 0xf)
+ loadable_size += ((subsection->size + 0xf)
&~ (bfd_size_type) 0xf);
}
}
@@ -5873,24 +7184,66 @@ _bfd_mips_elf_always_size_sections (bfd *output_bfd,
relocations, then GLOBAL_GOTSYM will be NULL. */
i = 0;
+ /* Get a worst-case estimate of the number of dynamic symbols needed.
+ At this point, dynsymcount does not account for section symbols
+ and count_section_dynsyms may overestimate the number that will
+ be needed. */
+ dynsymcount = (elf_hash_table (info)->dynsymcount
+ + count_section_dynsyms (output_bfd, info));
+
+ /* Determine the size of one stub entry. */
+ htab->function_stub_size = (dynsymcount > 0x10000
+ ? MIPS_FUNCTION_STUB_BIG_SIZE
+ : MIPS_FUNCTION_STUB_NORMAL_SIZE);
+
/* In the worst case, we'll get one stub per dynamic symbol, plus
one to account for the dummy entry at the end required by IRIX
rld. */
- loadable_size += MIPS_FUNCTION_STUB_SIZE * (i + 1);
+ loadable_size += htab->function_stub_size * (i + 1);
- /* Assume there are two loadable segments consisting of
- contiguous sections. Is 5 enough? */
- local_gotno = (loadable_size >> 16) + 5;
+ if (htab->is_vxworks)
+ /* There's no need to allocate page entries for VxWorks; R_MIPS_GOT16
+ relocations against local symbols evaluate to "G", and the EABI does
+ not include R_MIPS_GOT_PAGE. */
+ local_gotno = 0;
+ else
+ /* 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->_raw_size += g->local_gotno * MIPS_ELF_GOT_SIZE (output_bfd);
+ s->size += g->local_gotno * MIPS_ELF_GOT_SIZE (output_bfd);
g->global_gotno = i;
- s->_raw_size += i * MIPS_ELF_GOT_SIZE (output_bfd);
+ s->size += i * MIPS_ELF_GOT_SIZE (output_bfd);
+
+ /* We need to calculate tls_gotno for global symbols at this point
+ instead of building it up earlier, to avoid doublecounting
+ entries for one global symbol from multiple input files. */
+ count_tls_arg.info = info;
+ count_tls_arg.needed = 0;
+ elf_link_hash_traverse (elf_hash_table (info),
+ mips_elf_count_global_tls_entries,
+ &count_tls_arg);
+ g->tls_gotno += count_tls_arg.needed;
+ s->size += g->tls_gotno * MIPS_ELF_GOT_SIZE (output_bfd);
- if (s->_raw_size > MIPS_ELF_GOT_MAX_SIZE (output_bfd)
- && ! mips_elf_multi_got (output_bfd, info, g, s, local_gotno))
- return FALSE;
+ mips_elf_resolve_final_got_entries (g);
+
+ /* VxWorks does not support multiple GOTs. It initializes $gp to
+ __GOTT_BASE__[__GOTT_INDEX__], the value of which is set by the
+ dynamic loader. */
+ if (!htab->is_vxworks && s->size > MIPS_ELF_GOT_MAX_SIZE (info))
+ {
+ if (! mips_elf_multi_got (output_bfd, info, g, s, local_gotno))
+ return FALSE;
+ }
+ else
+ {
+ /* Set up TLS entries for the first GOT. */
+ g->tls_assigned_gotno = g->global_gotno + g->local_gotno;
+ htab_traverse (g->got_entries, mips_elf_initialize_tls_index, g);
+ }
return TRUE;
}
@@ -5902,9 +7255,11 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
struct bfd_link_info *info)
{
bfd *dynobj;
- asection *s;
+ asection *s, *sreldyn;
bfd_boolean reltext;
+ struct mips_elf_link_hash_table *htab;
+ htab = mips_elf_hash_table (info);
dynobj = elf_hash_table (info)->dynobj;
BFD_ASSERT (dynobj != NULL);
@@ -5915,7 +7270,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
- s->_raw_size
+ s->size
= strlen (ELF_DYNAMIC_INTERPRETER (output_bfd)) + 1;
s->contents
= (bfd_byte *) ELF_DYNAMIC_INTERPRETER (output_bfd);
@@ -5926,10 +7281,10 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
determined the sizes of the various dynamic sections. Allocate
memory for them. */
reltext = FALSE;
+ sreldyn = NULL;
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
- bfd_boolean strip;
/* It's OK to base decisions on the section name, because none
of the dynobj section names depend upon the input files. */
@@ -5938,31 +7293,16 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
- strip = FALSE;
-
if (strncmp (name, ".rel", 4) == 0)
{
- if (s->_raw_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)
- strip = TRUE;
- }
- else
+ if (s->size != 0)
{
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
+ If the relocation section is .rel(a).dyn, we always
assert a DT_TEXTREL entry rather than testing whether
there exists a relocation to a read only section or
not. */
@@ -5972,12 +7312,12 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
if ((target != NULL
&& (target->flags & SEC_READONLY) != 0
&& (target->flags & SEC_ALLOC) != 0)
- || strcmp (outname, ".rel.dyn") == 0)
+ || strcmp (outname, MIPS_ELF_REL_DYN_NAME (info)) == 0)
reltext = TRUE;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
- if (strcmp (name, ".rel.dyn") != 0)
+ if (strcmp (name, MIPS_ELF_REL_DYN_NAME (info)) != 0)
s->reloc_count = 0;
/* If combreloc is enabled, elf_link_sort_relocs() will
@@ -5989,7 +7329,23 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
info->combreloc = 0;
}
}
- else if (strncmp (name, ".got", 4) == 0)
+ else if (htab->is_vxworks && strcmp (name, ".got") == 0)
+ {
+ /* Executables do not need a GOT. */
+ if (info->shared)
+ {
+ /* Allocate relocations for all but the reserved entries. */
+ struct mips_got_info *g;
+ unsigned int count;
+
+ g = mips_elf_got_info (dynobj, NULL);
+ count = (g->global_gotno
+ + g->local_gotno
+ - MIPS_RESERVED_GOTNO (info));
+ mips_elf_allocate_dynamic_relocations (dynobj, info, count);
+ }
+ }
+ else if (!htab->is_vxworks && strncmp (name, ".got", 4) == 0)
{
/* _bfd_mips_elf_always_size_sections() has already done
most of the work, but some symbols may have been mapped
@@ -6005,6 +7361,9 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
set_got_offset_arg.value = MIPS_ELF_GOT_SIZE (output_bfd);
set_got_offset_arg.info = info;
+ /* NOTE 2005-02-03: How can this call, or the next, ever
+ find any indirect entries to resolve? They were all
+ resolved in mips_elf_multi_got. */
mips_elf_resolve_final_got_entries (gg);
for (g = gg->next; g && g->next != gg; g = g->next)
{
@@ -6030,46 +7389,86 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
needed_relocs += g->local_gotno - g->assigned_gotno;
BFD_ASSERT (g->assigned_gotno == g->next->local_gotno
+ g->next->global_gotno
- + MIPS_RESERVED_GOTNO);
+ + g->next->tls_gotno
+ + MIPS_RESERVED_GOTNO (info));
}
}
+ }
+ else
+ {
+ struct mips_elf_count_tls_arg arg;
+ arg.info = info;
+ arg.needed = 0;
+
+ htab_traverse (gg->got_entries, mips_elf_count_local_tls_relocs,
+ &arg);
+ elf_link_hash_traverse (elf_hash_table (info),
+ mips_elf_count_global_tls_relocs,
+ &arg);
- if (needed_relocs)
- mips_elf_allocate_dynamic_relocations (dynobj, needed_relocs);
+ needed_relocs += arg.needed;
}
+
+ if (needed_relocs)
+ mips_elf_allocate_dynamic_relocations (dynobj, info,
+ needed_relocs);
}
else if (strcmp (name, MIPS_ELF_STUB_SECTION_NAME (output_bfd)) == 0)
{
/* IRIX rld assumes that the function stub isn't at the end
- of .text section. So put a dummy. XXX */
- s->_raw_size += MIPS_FUNCTION_STUB_SIZE;
+ of .text section. So put a dummy. XXX */
+ s->size += htab->function_stub_size;
}
else if (! info->shared
&& ! mips_elf_hash_table (info)->use_rld_obj_head
&& strncmp (name, ".rld_map", 8) == 0)
{
- /* We add a room for __rld_map. It will be filled in by the
+ /* 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->_raw_size += 4;
+ s->size += 4;
}
else if (SGI_COMPAT (output_bfd)
&& strncmp (name, ".compact_rel", 12) == 0)
- s->_raw_size += mips_elf_hash_table (info)->compact_rel_size;
- else if (strncmp (name, ".init", 5) != 0)
+ s->size += mips_elf_hash_table (info)->compact_rel_size;
+ else if (strncmp (name, ".init", 5) != 0
+ && s != htab->sgotplt
+ && s != htab->splt)
{
/* It's not one of our sections, so don't allocate space. */
continue;
}
- if (strip)
+ if (s->size == 0)
+ {
+ s->flags |= SEC_EXCLUDE;
+ continue;
+ }
+
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
+ /* Allocate memory for this section last, since we may increase its
+ size above. */
+ if (strcmp (name, MIPS_ELF_REL_DYN_NAME (info)) == 0)
{
- _bfd_strip_section_from_output (info, s);
+ sreldyn = s;
continue;
}
/* Allocate memory for the section contents. */
- s->contents = bfd_zalloc (dynobj, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
+ s->contents = bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return FALSE;
+ }
+ }
+
+ /* Allocate memory for the .rel(a).dyn section. */
+ if (sreldyn != NULL)
+ {
+ sreldyn->contents = bfd_zalloc (dynobj, sreldyn->size);
+ if (sreldyn->contents == NULL)
{
bfd_set_error (bfd_error_no_memory);
return FALSE;
@@ -6105,81 +7504,143 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
}
}
- if (reltext && SGI_COMPAT (output_bfd))
+ if (reltext && (SGI_COMPAT (output_bfd) || htab->is_vxworks))
info->flags |= DF_TEXTREL;
if ((info->flags & DF_TEXTREL) != 0)
{
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0))
return FALSE;
+
+ /* Clear the DF_TEXTREL flag. It will be set again if we
+ write out an actual text relocation; we may not, because
+ at this point we do not know whether e.g. any .eh_frame
+ absolute relocations have been converted to PC-relative. */
+ info->flags &= ~DF_TEXTREL;
}
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0))
return FALSE;
- if (mips_elf_rel_dyn_section (dynobj, FALSE))
+ if (htab->is_vxworks)
{
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0))
- return FALSE;
+ /* VxWorks uses .rela.dyn instead of .rel.dyn. It does not
+ use any of the DT_MIPS_* tags. */
+ if (mips_elf_rel_dyn_section (info, FALSE))
+ {
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELA, 0))
+ return FALSE;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0))
- return FALSE;
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELASZ, 0))
+ return FALSE;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0))
- return FALSE;
- }
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELAENT, 0))
+ return FALSE;
+ }
+ if (htab->splt->size > 0)
+ {
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTREL, 0))
+ return FALSE;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_VERSION, 0))
- return FALSE;
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_JMPREL, 0))
+ return FALSE;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_FLAGS, 0))
- return FALSE;
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTRELSZ, 0))
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (mips_elf_rel_dyn_section (info, FALSE))
+ {
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0))
+ return FALSE;
-#if 0
- /* Time stamps in executable files are a bad idea. */
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_TIME_STAMP, 0))
- return FALSE;
-#endif
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0))
+ return FALSE;
-#if 0 /* FIXME */
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_ICHECKSUM, 0))
- return FALSE;
-#endif
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0))
+ return FALSE;
+ }
-#if 0 /* FIXME */
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_IVERSION, 0))
- return FALSE;
-#endif
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_VERSION, 0))
+ return FALSE;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_BASE_ADDRESS, 0))
- return FALSE;
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_FLAGS, 0))
+ return FALSE;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LOCAL_GOTNO, 0))
- return FALSE;
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_BASE_ADDRESS, 0))
+ return FALSE;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_SYMTABNO, 0))
- return FALSE;
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LOCAL_GOTNO, 0))
+ return FALSE;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_UNREFEXTNO, 0))
- return FALSE;
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_SYMTABNO, 0))
+ return FALSE;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_GOTSYM, 0))
- return FALSE;
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_UNREFEXTNO, 0))
+ return FALSE;
- if (IRIX_COMPAT (dynobj) == ict_irix5
- && ! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_HIPAGENO, 0))
- return FALSE;
+ if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_GOTSYM, 0))
+ return FALSE;
- if (IRIX_COMPAT (dynobj) == ict_irix6
- && (bfd_get_section_by_name
- (dynobj, MIPS_ELF_OPTIONS_SECTION_NAME (dynobj)))
- && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0))
- return FALSE;
+ if (IRIX_COMPAT (dynobj) == ict_irix5
+ && ! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_HIPAGENO, 0))
+ return FALSE;
+
+ if (IRIX_COMPAT (dynobj) == ict_irix6
+ && (bfd_get_section_by_name
+ (dynobj, MIPS_ELF_OPTIONS_SECTION_NAME (dynobj)))
+ && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0))
+ return FALSE;
+ }
}
return TRUE;
}
+/* REL is a relocation in INPUT_BFD that is being copied to OUTPUT_BFD.
+ Adjust its R_ADDEND field so that it is correct for the output file.
+ LOCAL_SYMS and LOCAL_SECTIONS are arrays of INPUT_BFD's local symbols
+ and sections respectively; both use symbol indexes. */
+
+static void
+mips_elf_adjust_addend (bfd *output_bfd, struct bfd_link_info *info,
+ bfd *input_bfd, Elf_Internal_Sym *local_syms,
+ asection **local_sections, Elf_Internal_Rela *rel)
+{
+ unsigned int r_type, r_symndx;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+
+ if (mips_elf_local_relocation_p (input_bfd, rel, local_sections, FALSE))
+ {
+ r_type = ELF_R_TYPE (output_bfd, rel->r_info);
+ if (r_type == R_MIPS16_GPREL
+ || r_type == R_MIPS_GPREL16
+ || r_type == R_MIPS_GPREL32
+ || r_type == R_MIPS_LITERAL)
+ {
+ rel->r_addend += _bfd_get_gp_value (input_bfd);
+ rel->r_addend -= _bfd_get_gp_value (output_bfd);
+ }
+
+ r_symndx = ELF_R_SYM (output_bfd, rel->r_info);
+ sym = local_syms + r_symndx;
+
+ /* Adjust REL's addend to account for section merging. */
+ if (!info->relocatable)
+ {
+ sec = local_sections[r_symndx];
+ _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
+ }
+
+ /* This would normally be done by the rela_normal code in elflink.c. */
+ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ rel->r_addend += local_sections[r_symndx]->output_offset;
+ }
+}
+
/* Relocate a MIPS ELF section. */
bfd_boolean
@@ -6200,7 +7661,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
for (rel = relocs; rel < relend; ++rel)
{
const char *name;
- bfd_vma value;
+ bfd_vma value = 0;
reloc_howto_type *howto;
bfd_boolean require_jalx;
/* TRUE if the relocation is a RELA relocation, rather than a
@@ -6249,19 +7710,25 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
rel_hdr = elf_section_data (input_section)->rel_hdr2;
if (rel_hdr->sh_entsize == MIPS_ELF_REL_SIZE (input_bfd))
{
+ bfd_byte *location = contents + rel->r_offset;
+
/* Note that this is a REL relocation. */
rela_relocation_p = FALSE;
/* Get the addend, which is stored in the input file. */
+ _bfd_mips16_elf_reloc_unshuffle (input_bfd, r_type, FALSE,
+ location);
addend = mips_elf_obtain_contents (howto, rel, input_bfd,
contents);
+ _bfd_mips16_elf_reloc_shuffle(input_bfd, r_type, FALSE,
+ location);
+
addend &= howto->src_mask;
/* For some kinds of relocations, the ADDEND is a
combination of the addend stored in two different
relocations. */
- if (r_type == R_MIPS_HI16
- || r_type == R_MIPS_GNU_REL_HI16
+ if (r_type == R_MIPS_HI16 || r_type == R_MIPS16_HI16
|| (r_type == R_MIPS_GOT16
&& mips_elf_local_relocation_p (input_bfd, rel,
local_sections, FALSE)))
@@ -6269,7 +7736,13 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd_vma l;
const Elf_Internal_Rela *lo16_relocation;
reloc_howto_type *lo16_howto;
- unsigned int lo;
+ bfd_byte *lo16_location;
+ int lo16_type;
+
+ if (r_type == R_MIPS16_HI16)
+ lo16_type = R_MIPS16_LO16;
+ else
+ lo16_type = R_MIPS_LO16;
/* The combined value is the sum of the HI16 addend,
left-shifted by sixteen bits, and the LO16
@@ -6277,20 +7750,33 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
a `lui' of the HI16 value, and then an `addiu' of
the LO16 value.)
- Scan ahead to find a matching LO16 relocation. */
- if (r_type == R_MIPS_GNU_REL_HI16)
- lo = R_MIPS_GNU_REL_LO16;
- else
- lo = R_MIPS_LO16;
- lo16_relocation = mips_elf_next_relocation (input_bfd, lo,
+ Scan ahead to find a matching LO16 relocation.
+
+ According to the MIPS ELF ABI, the R_MIPS_LO16
+ relocation must be immediately following.
+ However, for the IRIX6 ABI, the next relocation
+ may be a composed relocation consisting of
+ several relocations for the same address. In
+ that case, the R_MIPS_LO16 relocation may occur
+ as one of these. We permit a similar extension
+ in general, as that is useful for GCC. */
+ 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, lo, FALSE);
+ 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);
@@ -6299,75 +7785,27 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* Compute the combined addend. */
addend += l;
-
- /* If PC-relative, subtract the difference between the
- address of the LO part of the reloc and the address of
- the HI part. The relocation is relative to the LO
- part, but mips_elf_calculate_relocation() doesn't
- know its address or the difference from the HI part, so
- we subtract that difference here. See also the
- comment in mips_elf_calculate_relocation(). */
- if (r_type == R_MIPS_GNU_REL_HI16)
- addend -= (lo16_relocation->r_offset - rel->r_offset);
- }
- else if (r_type == R_MIPS16_GPREL)
- {
- /* The addend is scrambled in the object file. See
- mips_elf_perform_relocation for details on the
- format. */
- addend = (((addend & 0x1f0000) >> 5)
- | ((addend & 0x7e00000) >> 16)
- | (addend & 0x1f));
}
else
addend <<= howto->rightshift;
}
else
addend = rel->r_addend;
+ mips_elf_adjust_addend (output_bfd, info, input_bfd,
+ local_syms, local_sections, rel);
}
if (info->relocatable)
{
- Elf_Internal_Sym *sym;
- unsigned long r_symndx;
-
if (r_type == R_MIPS_64 && ! NEWABI_P (output_bfd)
&& bfd_big_endian (input_bfd))
rel->r_offset -= 4;
- /* Since we're just relocating, all we need to do is copy
- the relocations back out to the object file, unless
- they're against a section symbol, in which case we need
- to adjust by the section offset, or unless they're GP
- relative in which case we need to adjust by the amount
- that we're adjusting GP in this relocatable object. */
-
- if (! mips_elf_local_relocation_p (input_bfd, rel, local_sections,
- FALSE))
- /* There's nothing to do for non-local relocations. */
- continue;
-
- if (r_type == R_MIPS16_GPREL
- || r_type == R_MIPS_GPREL16
- || r_type == R_MIPS_GPREL32
- || r_type == R_MIPS_LITERAL)
- addend -= (_bfd_get_gp_value (output_bfd)
- - _bfd_get_gp_value (input_bfd));
-
- r_symndx = ELF_R_SYM (output_bfd, rel->r_info);
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- /* Adjust the addend appropriately. */
- addend += local_sections[r_symndx]->output_offset;
-
- if (rela_relocation_p)
- /* If this is a RELA relocation, just update the addend. */
- rel->r_addend = addend;
- else
+ if (!rela_relocation_p && rel->r_addend)
{
+ addend += rel->r_addend;
if (r_type == R_MIPS_HI16
- || r_type == R_MIPS_GOT16
- || r_type == R_MIPS_GNU_REL_HI16)
+ || r_type == R_MIPS_GOT16)
addend = mips_elf_high (addend);
else if (r_type == R_MIPS_HIGHER)
addend = mips_elf_higher (addend);
@@ -6476,7 +7914,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
BFD_ASSERT (name != NULL);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, 0,
+ (info, NULL, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset)))
return FALSE;
}
@@ -6613,18 +8051,19 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
Elf_Internal_Sym *sym)
{
bfd *dynobj;
- bfd_vma gval;
asection *sgot;
struct mips_got_info *g, *gg;
const char *name;
+ int idx;
+ struct mips_elf_link_hash_table *htab;
+ htab = mips_elf_hash_table (info);
dynobj = elf_hash_table (info)->dynobj;
- gval = sym->st_value;
- if (h->plt.offset != (bfd_vma) -1)
+ if (h->plt.offset != MINUS_ONE)
{
asection *s;
- bfd_byte stub[MIPS_FUNCTION_STUB_SIZE];
+ bfd_byte stub[MIPS_FUNCTION_STUB_BIG_SIZE];
/* This symbol has a stub. Set it up. */
@@ -6634,18 +8073,42 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
MIPS_ELF_STUB_SECTION_NAME (dynobj));
BFD_ASSERT (s != NULL);
- /* FIXME: Can h->dynindex be more than 64K? */
- if (h->dynindx & 0xffff0000)
+ BFD_ASSERT ((htab->function_stub_size == MIPS_FUNCTION_STUB_BIG_SIZE)
+ || (h->dynindx <= 0xffff));
+
+ /* Values up to 2^31 - 1 are allowed. Larger values would cause
+ sign extension at runtime in the stub, resulting in a negative
+ index value. */
+ if (h->dynindx & ~0x7fffffff)
return FALSE;
/* Fill the stub. */
- bfd_put_32 (output_bfd, STUB_LW (output_bfd), stub);
- bfd_put_32 (output_bfd, STUB_MOVE (output_bfd), stub + 4);
- bfd_put_32 (output_bfd, STUB_JALR, stub + 8);
- bfd_put_32 (output_bfd, STUB_LI16 (output_bfd) + h->dynindx, stub + 12);
+ idx = 0;
+ bfd_put_32 (output_bfd, STUB_LW (output_bfd), stub + idx);
+ idx += 4;
+ bfd_put_32 (output_bfd, STUB_MOVE (output_bfd), stub + idx);
+ idx += 4;
+ if (htab->function_stub_size == MIPS_FUNCTION_STUB_BIG_SIZE)
+ {
+ bfd_put_32 (output_bfd, STUB_LUI ((h->dynindx >> 16) & 0x7fff),
+ stub + idx);
+ idx += 4;
+ }
+ bfd_put_32 (output_bfd, STUB_JALR, stub + idx);
+ idx += 4;
+
+ /* If a large stub is not required and sign extension is not a
+ problem, then use legacy code in the stub. */
+ if (htab->function_stub_size == MIPS_FUNCTION_STUB_BIG_SIZE)
+ bfd_put_32 (output_bfd, STUB_ORI (h->dynindx & 0xffff), stub + idx);
+ else if (h->dynindx & ~0x7fff)
+ bfd_put_32 (output_bfd, STUB_LI16U (h->dynindx & 0xffff), stub + idx);
+ else
+ bfd_put_32 (output_bfd, STUB_LI16S (output_bfd, h->dynindx),
+ stub + idx);
- BFD_ASSERT (h->plt.offset <= s->_raw_size);
- memcpy (s->contents + h->plt.offset, stub, MIPS_FUNCTION_STUB_SIZE);
+ BFD_ASSERT (h->plt.offset <= s->size);
+ memcpy (s->contents + h->plt.offset, stub, htab->function_stub_size);
/* Mark the symbol as undefined. plt.offset != -1 occurs
only for the referenced symbol. */
@@ -6654,12 +8117,12 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
/* The run-time linker uses the st_value field of the symbol
to reset the global offset table entry for this external
to its stub address when unlinking a shared object. */
- gval = s->output_section->vma + s->output_offset + h->plt.offset;
- sym->st_value = gval;
+ sym->st_value = (s->output_section->vma + s->output_offset
+ + h->plt.offset);
}
BFD_ASSERT (h->dynindx != -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0);
+ || h->forced_local);
sgot = mips_elf_got_section (dynobj, FALSE);
BFD_ASSERT (sgot != NULL);
@@ -6676,11 +8139,11 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
bfd_vma value;
value = sym->st_value;
- offset = mips_elf_global_got_index (dynobj, output_bfd, h);
+ offset = mips_elf_global_got_index (dynobj, output_bfd, h, R_MIPS_GOT16, info);
MIPS_ELF_PUT_WORD (output_bfd, value, sgot->contents + offset);
}
- if (g->next && h->dynindx != -1)
+ if (g->next && h->dynindx != -1 && h->type != STT_TLS)
{
struct mips_got_entry e, *p;
bfd_vma entry;
@@ -6691,6 +8154,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
e.abfd = output_bfd;
e.symndx = -1;
e.d.h = (struct mips_elf_link_hash_entry *)h;
+ e.tls_type = 0;
for (g = g->next; g->next != gg; g = g->next)
{
@@ -6702,10 +8166,8 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
if (info->shared
|| (elf_hash_table (info)->dynamic_sections_created
&& p->d.h != NULL
- && ((p->d.h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
- && ((p->d.h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ && p->d.h->root.def_dynamic
+ && !p->d.h->root.def_regular))
{
/* Create an R_MIPS_REL32 relocation for this entry. Due to
the various compatibility problems, it's easier to mock
@@ -6737,7 +8199,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
/* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
name = h->root.root.string;
if (strcmp (name, "_DYNAMIC") == 0
- || strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
+ || h == elf_hash_table (info)->hgot)
sym->st_shndx = SHN_ABS;
else if (strcmp (name, "_DYNAMIC_LINK") == 0
|| strcmp (name, "_DYNAMIC_LINKING") == 0)
@@ -6808,13 +8270,274 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
}
/* If this is a mips16 symbol, force the value to be even. */
- if (sym->st_other == STO_MIPS16
- && (sym->st_value & 1) != 0)
- --sym->st_value;
+ if (sym->st_other == STO_MIPS16)
+ sym->st_value &= ~1;
return TRUE;
}
+/* Likewise, for VxWorks. */
+
+bfd_boolean
+_bfd_mips_vxworks_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 mips_got_info *g;
+ struct mips_elf_link_hash_table *htab;
+
+ htab = mips_elf_hash_table (info);
+ dynobj = elf_hash_table (info)->dynobj;
+
+ if (h->plt.offset != (bfd_vma) -1)
+ {
+ bfd_byte *loc;
+ bfd_vma plt_address, plt_index, got_address, got_offset, branch_offset;
+ Elf_Internal_Rela rel;
+ static const bfd_vma *plt_entry;
+
+ BFD_ASSERT (h->dynindx != -1);
+ BFD_ASSERT (htab->splt != NULL);
+ BFD_ASSERT (h->plt.offset <= htab->splt->size);
+
+ /* Calculate the address of the .plt entry. */
+ plt_address = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + h->plt.offset);
+
+ /* Calculate the index of the entry. */
+ plt_index = ((h->plt.offset - htab->plt_header_size)
+ / htab->plt_entry_size);
+
+ /* Calculate the address of the .got.plt entry. */
+ got_address = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + plt_index * 4);
+
+ /* Calculate the offset of the .got.plt entry from
+ _GLOBAL_OFFSET_TABLE_. */
+ got_offset = mips_elf_gotplt_index (info, h);
+
+ /* Calculate the offset for the branch at the start of the PLT
+ entry. The branch jumps to the beginning of .plt. */
+ branch_offset = -(h->plt.offset / 4 + 1) & 0xffff;
+
+ /* Fill in the initial value of the .got.plt entry. */
+ bfd_put_32 (output_bfd, plt_address,
+ htab->sgotplt->contents + plt_index * 4);
+
+ /* Find out where the .plt entry should go. */
+ loc = htab->splt->contents + h->plt.offset;
+
+ if (info->shared)
+ {
+ plt_entry = mips_vxworks_shared_plt_entry;
+ bfd_put_32 (output_bfd, plt_entry[0] | branch_offset, loc);
+ bfd_put_32 (output_bfd, plt_entry[1] | plt_index, loc + 4);
+ }
+ else
+ {
+ bfd_vma got_address_high, got_address_low;
+
+ plt_entry = mips_vxworks_exec_plt_entry;
+ got_address_high = ((got_address + 0x8000) >> 16) & 0xffff;
+ got_address_low = got_address & 0xffff;
+
+ bfd_put_32 (output_bfd, plt_entry[0] | branch_offset, loc);
+ bfd_put_32 (output_bfd, plt_entry[1] | plt_index, loc + 4);
+ bfd_put_32 (output_bfd, plt_entry[2] | got_address_high, loc + 8);
+ bfd_put_32 (output_bfd, plt_entry[3] | got_address_low, loc + 12);
+ bfd_put_32 (output_bfd, plt_entry[4], loc + 16);
+ bfd_put_32 (output_bfd, plt_entry[5], loc + 20);
+ bfd_put_32 (output_bfd, plt_entry[6], loc + 24);
+ bfd_put_32 (output_bfd, plt_entry[7], loc + 28);
+
+ loc = (htab->srelplt2->contents
+ + (plt_index * 3 + 2) * sizeof (Elf32_External_Rela));
+
+ /* Emit a relocation for the .got.plt entry. */
+ rel.r_offset = got_address;
+ rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_MIPS_32);
+ rel.r_addend = h->plt.offset;
+ bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+
+ /* Emit a relocation for the lui of %hi(<.got.plt slot>). */
+ loc += sizeof (Elf32_External_Rela);
+ rel.r_offset = plt_address + 8;
+ rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_HI16);
+ rel.r_addend = got_offset;
+ bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+
+ /* Emit a relocation for the addiu of %lo(<.got.plt slot>). */
+ loc += sizeof (Elf32_External_Rela);
+ rel.r_offset += 4;
+ rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_LO16);
+ bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+ }
+
+ /* Emit an R_MIPS_JUMP_SLOT relocation against the .got.plt entry. */
+ loc = htab->srelplt->contents + plt_index * sizeof (Elf32_External_Rela);
+ rel.r_offset = got_address;
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_MIPS_JUMP_SLOT);
+ rel.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+
+ if (!h->def_regular)
+ sym->st_shndx = SHN_UNDEF;
+ }
+
+ BFD_ASSERT (h->dynindx != -1 || h->forced_local);
+
+ sgot = mips_elf_got_section (dynobj, FALSE);
+ BFD_ASSERT (sgot != NULL);
+ BFD_ASSERT (mips_elf_section_data (sgot) != NULL);
+ g = mips_elf_section_data (sgot)->u.got_info;
+ BFD_ASSERT (g != NULL);
+
+ /* See if this symbol has an entry in the GOT. */
+ if (g->global_gotsym != NULL
+ && h->dynindx >= g->global_gotsym->dynindx)
+ {
+ bfd_vma offset;
+ Elf_Internal_Rela outrel;
+ bfd_byte *loc;
+ asection *s;
+
+ /* Install the symbol value in the GOT. */
+ offset = mips_elf_global_got_index (dynobj, output_bfd, h,
+ R_MIPS_GOT16, info);
+ MIPS_ELF_PUT_WORD (output_bfd, sym->st_value, sgot->contents + offset);
+
+ /* Add a dynamic relocation for it. */
+ s = mips_elf_rel_dyn_section (info, FALSE);
+ loc = s->contents + (s->reloc_count++ * sizeof (Elf32_External_Rela));
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + offset);
+ outrel.r_info = ELF32_R_INFO (h->dynindx, R_MIPS_32);
+ outrel.r_addend = 0;
+ bfd_elf32_swap_reloca_out (dynobj, &outrel, loc);
+ }
+
+ /* Emit a copy reloc, if needed. */
+ if (h->needs_copy)
+ {
+ Elf_Internal_Rela rel;
+
+ BFD_ASSERT (h->dynindx != -1);
+
+ rel.r_offset = (h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset
+ + h->root.u.def.value);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_MIPS_COPY);
+ rel.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &rel,
+ htab->srelbss->contents
+ + (htab->srelbss->reloc_count
+ * sizeof (Elf32_External_Rela)));
+ ++htab->srelbss->reloc_count;
+ }
+
+ /* If this is a mips16 symbol, force the value to be even. */
+ if (sym->st_other == STO_MIPS16)
+ sym->st_value &= ~1;
+
+ return TRUE;
+}
+
+/* Install the PLT header for a VxWorks executable and finalize the
+ contents of .rela.plt.unloaded. */
+
+static void
+mips_vxworks_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info)
+{
+ Elf_Internal_Rela rela;
+ bfd_byte *loc;
+ bfd_vma got_value, got_value_high, got_value_low, plt_address;
+ static const bfd_vma *plt_entry;
+ struct mips_elf_link_hash_table *htab;
+
+ htab = mips_elf_hash_table (info);
+ plt_entry = mips_vxworks_exec_plt0_entry;
+
+ /* Calculate the value of _GLOBAL_OFFSET_TABLE_. */
+ got_value = (htab->root.hgot->root.u.def.section->output_section->vma
+ + htab->root.hgot->root.u.def.section->output_offset
+ + htab->root.hgot->root.u.def.value);
+
+ got_value_high = ((got_value + 0x8000) >> 16) & 0xffff;
+ got_value_low = got_value & 0xffff;
+
+ /* Calculate the address of the PLT header. */
+ plt_address = htab->splt->output_section->vma + htab->splt->output_offset;
+
+ /* Install the PLT header. */
+ loc = htab->splt->contents;
+ bfd_put_32 (output_bfd, plt_entry[0] | got_value_high, loc);
+ bfd_put_32 (output_bfd, plt_entry[1] | got_value_low, loc + 4);
+ bfd_put_32 (output_bfd, plt_entry[2], loc + 8);
+ bfd_put_32 (output_bfd, plt_entry[3], loc + 12);
+ bfd_put_32 (output_bfd, plt_entry[4], loc + 16);
+ bfd_put_32 (output_bfd, plt_entry[5], loc + 20);
+
+ /* Output the relocation for the lui of %hi(_GLOBAL_OFFSET_TABLE_). */
+ loc = htab->srelplt2->contents;
+ rela.r_offset = plt_address;
+ rela.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_HI16);
+ rela.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Output the relocation for the following addiu of
+ %lo(_GLOBAL_OFFSET_TABLE_). */
+ rela.r_offset += 4;
+ rela.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_LO16);
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Fix up the remaining relocations. They may have the wrong
+ symbol index for _G_O_T_ or _P_L_T_ depending on the order
+ in which symbols were output. */
+ while (loc < htab->srelplt2->contents + htab->srelplt2->size)
+ {
+ Elf_Internal_Rela rel;
+
+ bfd_elf32_swap_reloca_in (output_bfd, loc, &rel);
+ rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_MIPS_32);
+ bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ bfd_elf32_swap_reloca_in (output_bfd, loc, &rel);
+ rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_HI16);
+ bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ bfd_elf32_swap_reloca_in (output_bfd, loc, &rel);
+ rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_LO16);
+ bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
+ loc += sizeof (Elf32_External_Rela);
+ }
+}
+
+/* Install the PLT header for a VxWorks shared library. */
+
+static void
+mips_vxworks_finish_shared_plt (bfd *output_bfd, struct bfd_link_info *info)
+{
+ unsigned int i;
+ struct mips_elf_link_hash_table *htab;
+
+ htab = mips_elf_hash_table (info);
+
+ /* We just need to copy the entry byte-by-byte. */
+ for (i = 0; i < ARRAY_SIZE (mips_vxworks_shared_plt0_entry); i++)
+ bfd_put_32 (output_bfd, mips_vxworks_shared_plt0_entry[i],
+ htab->splt->contents + i * 4);
+}
+
/* Finish up the dynamic sections. */
bfd_boolean
@@ -6825,7 +8548,9 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
asection *sdyn;
asection *sgot;
struct mips_got_info *gg, *g;
+ struct mips_elf_link_hash_table *htab;
+ htab = mips_elf_hash_table (info);
dynobj = elf_hash_table (info)->dynobj;
sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
@@ -6845,12 +8570,13 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
if (elf_hash_table (info)->dynamic_sections_created)
{
bfd_byte *b;
+ int dyn_to_skip = 0, dyn_skipped = 0;
BFD_ASSERT (sdyn != NULL);
BFD_ASSERT (g != NULL);
for (b = sdyn->contents;
- b < sdyn->contents + sdyn->_raw_size;
+ b < sdyn->contents + sdyn->size;
b += MIPS_ELF_DYN_SIZE (dynobj))
{
Elf_Internal_Dyn dyn;
@@ -6868,11 +8594,14 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
switch (dyn.d_tag)
{
case DT_RELENT:
- s = mips_elf_rel_dyn_section (dynobj, FALSE);
- BFD_ASSERT (s != NULL);
dyn.d_un.d_val = MIPS_ELF_REL_SIZE (dynobj);
break;
+ case DT_RELAENT:
+ BFD_ASSERT (htab->is_vxworks);
+ dyn.d_un.d_val = MIPS_ELF_RELA_SIZE (dynobj);
+ break;
+
case DT_STRSZ:
/* Rewrite DT_STRSZ. */
dyn.d_un.d_val =
@@ -6881,9 +8610,20 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
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;
+ if (htab->is_vxworks)
+ {
+ /* _GLOBAL_OFFSET_TABLE_ is defined to be the beginning
+ of the ".got" section in DYNOBJ. */
+ s = bfd_get_section_by_name (dynobj, name);
+ BFD_ASSERT (s != NULL);
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+ }
+ else
+ {
+ s = bfd_get_section_by_name (output_bfd, name);
+ BFD_ASSERT (s != NULL);
+ dyn.d_un.d_ptr = s->vma;
+ }
break;
case DT_MIPS_RLD_VERSION:
@@ -6895,7 +8635,11 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
break;
case DT_MIPS_TIME_STAMP:
- time ((time_t *) &dyn.d_un.d_val);
+ {
+ time_t t;
+ time (&t);
+ dyn.d_un.d_val = t;
+ }
break;
case DT_MIPS_ICHECKSUM:
@@ -6941,14 +8685,11 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
s = bfd_get_section_by_name (output_bfd, name);
BFD_ASSERT (s != NULL);
- if (s->_cooked_size != 0)
- dyn.d_un.d_val = s->_cooked_size / elemsize;
- else
- dyn.d_un.d_val = s->_raw_size / elemsize;
+ dyn.d_un.d_val = s->size / elemsize;
break;
case DT_MIPS_HIPAGENO:
- dyn.d_un.d_val = g->local_gotno - MIPS_RESERVED_GOTNO;
+ dyn.d_un.d_val = g->local_gotno - MIPS_RESERVED_GOTNO (info);
break;
case DT_MIPS_RLD_MAP:
@@ -6961,16 +8702,46 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
dyn.d_un.d_ptr = s->vma;
break;
- case DT_RELSZ:
- /* Reduce DT_RELSZ to account for any relocations we
- decided not to make. This is for the n64 irix rld,
- which doesn't seem to apply any relocations if there
- are trailing null entries. */
- s = mips_elf_rel_dyn_section (dynobj, FALSE);
- dyn.d_un.d_val = (s->reloc_count
- * (ABI_64_P (output_bfd)
- ? sizeof (Elf64_Mips_External_Rel)
- : sizeof (Elf32_External_Rel)));
+ case DT_RELASZ:
+ BFD_ASSERT (htab->is_vxworks);
+ /* The count does not include the JUMP_SLOT relocations. */
+ if (htab->srelplt)
+ dyn.d_un.d_val -= htab->srelplt->size;
+ break;
+
+ case DT_PLTREL:
+ BFD_ASSERT (htab->is_vxworks);
+ dyn.d_un.d_val = DT_RELA;
+ break;
+
+ case DT_PLTRELSZ:
+ BFD_ASSERT (htab->is_vxworks);
+ dyn.d_un.d_val = htab->srelplt->size;
+ break;
+
+ case DT_JMPREL:
+ BFD_ASSERT (htab->is_vxworks);
+ dyn.d_un.d_val = (htab->srelplt->output_section->vma
+ + htab->srelplt->output_offset);
+ break;
+
+ case DT_TEXTREL:
+ /* If we didn't need any text relocations after all, delete
+ the dynamic tag. */
+ if (!(info->flags & DF_TEXTREL))
+ {
+ dyn_to_skip = MIPS_ELF_DYN_SIZE (dynobj);
+ swap_out_p = FALSE;
+ }
+ break;
+
+ case DT_FLAGS:
+ /* If we didn't need any text relocations after all, clear
+ DF_TEXTREL from DT_FLAGS. */
+ if (!(info->flags & DF_TEXTREL))
+ dyn.d_un.d_val &= ~DF_TEXTREL;
+ else
+ swap_out_p = FALSE;
break;
default:
@@ -6978,20 +8749,49 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
break;
}
- if (swap_out_p)
+ if (swap_out_p || dyn_skipped)
(*get_elf_backend_data (dynobj)->s->swap_dyn_out)
- (dynobj, &dyn, b);
+ (dynobj, &dyn, b - dyn_skipped);
+
+ if (dyn_to_skip)
+ {
+ dyn_skipped += dyn_to_skip;
+ dyn_to_skip = 0;
+ }
}
+
+ /* Wipe out any trailing entries if we shifted down a dynamic tag. */
+ if (dyn_skipped > 0)
+ memset (b - dyn_skipped, 0, dyn_skipped);
}
- /* 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->_raw_size > 0)
+ if (sgot != NULL && sgot->size > 0)
{
- MIPS_ELF_PUT_WORD (output_bfd, 0, sgot->contents);
- MIPS_ELF_PUT_WORD (output_bfd, 0x80000000,
- sgot->contents + MIPS_ELF_GOT_SIZE (output_bfd));
+ if (htab->is_vxworks)
+ {
+ /* The first entry of the global offset table points to the
+ ".dynamic" section. The second is initialized by the
+ loader and contains the shared library identifier.
+ The third is also initialized by the loader and points
+ to the lazy resolution stub. */
+ MIPS_ELF_PUT_WORD (output_bfd,
+ sdyn->output_offset + sdyn->output_section->vma,
+ sgot->contents);
+ MIPS_ELF_PUT_WORD (output_bfd, 0,
+ sgot->contents + MIPS_ELF_GOT_SIZE (output_bfd));
+ MIPS_ELF_PUT_WORD (output_bfd, 0,
+ sgot->contents
+ + 2 * MIPS_ELF_GOT_SIZE (output_bfd));
+ }
+ else
+ {
+ /* 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. */
+ MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0, sgot->contents);
+ MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0x80000000,
+ sgot->contents + MIPS_ELF_GOT_SIZE (output_bfd));
+ }
}
if (sgot != NULL)
@@ -7009,7 +8809,8 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
for (g = gg->next; g->next != gg; g = g->next)
{
- bfd_vma index = g->next->local_gotno + g->next->global_gotno;
+ bfd_vma index = g->next->local_gotno + g->next->global_gotno
+ + g->next->tls_gotno;
MIPS_ELF_PUT_WORD (output_bfd, 0, sgot->contents
+ index++ * MIPS_ELF_GOT_SIZE (output_bfd));
@@ -7033,6 +8834,55 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
}
}
+ /* The generation of dynamic relocations for the non-primary gots
+ adds more dynamic relocations. We cannot count them until
+ here. */
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ bfd_byte *b;
+ bfd_boolean swap_out_p;
+
+ BFD_ASSERT (sdyn != NULL);
+
+ for (b = sdyn->contents;
+ b < sdyn->contents + sdyn->size;
+ b += MIPS_ELF_DYN_SIZE (dynobj))
+ {
+ Elf_Internal_Dyn dyn;
+ asection *s;
+
+ /* 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_RELSZ:
+ /* Reduce DT_RELSZ to account for any relocations we
+ decided not to make. This is for the n64 irix rld,
+ which doesn't seem to apply any relocations if there
+ are trailing null entries. */
+ s = mips_elf_rel_dyn_section (info, FALSE);
+ dyn.d_un.d_val = (s->reloc_count
+ * (ABI_64_P (output_bfd)
+ ? sizeof (Elf64_Mips_External_Rel)
+ : sizeof (Elf32_External_Rel)));
+ break;
+
+ default:
+ swap_out_p = FALSE;
+ break;
+ }
+
+ if (swap_out_p)
+ (*get_elf_backend_data (dynobj)->s->swap_dyn_out)
+ (dynobj, &dyn, b);
+ }
+ }
+
{
asection *s;
Elf32_compact_rel cpt;
@@ -7061,32 +8911,45 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
{
file_ptr dummy_offset;
- BFD_ASSERT (s->_raw_size >= MIPS_FUNCTION_STUB_SIZE);
- dummy_offset = s->_raw_size - MIPS_FUNCTION_STUB_SIZE;
+ BFD_ASSERT (s->size >= htab->function_stub_size);
+ dummy_offset = s->size - htab->function_stub_size;
memset (s->contents + dummy_offset, 0,
- MIPS_FUNCTION_STUB_SIZE);
+ htab->function_stub_size);
}
}
}
- /* We need to sort the entries of the dynamic relocation section. */
-
- s = mips_elf_rel_dyn_section (dynobj, FALSE);
-
- if (s != NULL
- && s->_raw_size > (bfd_vma)2 * MIPS_ELF_REL_SIZE (output_bfd))
+ /* The psABI says that the dynamic relocations must be sorted in
+ increasing order of r_symndx. The VxWorks EABI doesn't require
+ this, and because the code below handles REL rather than RELA
+ relocations, using it for VxWorks would be outright harmful. */
+ if (!htab->is_vxworks)
{
- reldyn_sorting_bfd = output_bfd;
-
- if (ABI_64_P (output_bfd))
- qsort ((Elf64_External_Rel *) s->contents + 1, s->reloc_count - 1,
- sizeof (Elf64_Mips_External_Rel), sort_dynamic_relocs_64);
- else
- qsort ((Elf32_External_Rel *) s->contents + 1, s->reloc_count - 1,
- sizeof (Elf32_External_Rel), sort_dynamic_relocs);
+ s = mips_elf_rel_dyn_section (info, FALSE);
+ if (s != NULL
+ && s->size > (bfd_vma)2 * MIPS_ELF_REL_SIZE (output_bfd))
+ {
+ reldyn_sorting_bfd = output_bfd;
+
+ if (ABI_64_P (output_bfd))
+ qsort ((Elf64_External_Rel *) s->contents + 1,
+ s->reloc_count - 1, sizeof (Elf64_Mips_External_Rel),
+ sort_dynamic_relocs_64);
+ else
+ qsort ((Elf32_External_Rel *) s->contents + 1,
+ s->reloc_count - 1, sizeof (Elf32_External_Rel),
+ sort_dynamic_relocs);
+ }
}
}
+ if (htab->is_vxworks && htab->splt->size > 0)
+ {
+ if (info->shared)
+ mips_vxworks_finish_shared_plt (output_bfd, info);
+ else
+ mips_vxworks_finish_exec_plt (output_bfd, info);
+ }
return TRUE;
}
@@ -7477,9 +9340,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
if (low > s->vma)
low = s->vma;
- sz = s->_cooked_size;
- if (sz == 0)
- sz = s->_raw_size;
+ sz = s->size;
if (high < s->vma + sz)
high = s->vma + sz;
}
@@ -7489,9 +9350,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
for (s = abfd->sections; s != NULL; s = s->next)
if ((s->flags & SEC_LOAD) != 0
&& s->vma >= low
- && ((s->vma
- + (s->_cooked_size !=
- 0 ? s->_cooked_size : s->_raw_size)) <= high))
+ && s->vma + s->size <= high)
++c;
amt = sizeof *n + (bfd_size_type) (c - 1) * sizeof (asection *);
@@ -7506,9 +9365,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
{
if ((s->flags & SEC_LOAD) != 0
&& s->vma >= low
- && ((s->vma
- + (s->_cooked_size != 0 ?
- s->_cooked_size : s->_raw_size)) <= high))
+ && s->vma + s->size <= high)
{
n->sections[i] = s;
++i;
@@ -7615,13 +9472,13 @@ _bfd_mips_elf_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
_bfd_elf_link_hash_copy_indirect copy the flags for us. */
void
-_bfd_mips_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
+_bfd_mips_elf_copy_indirect_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
struct mips_elf_link_hash_entry *dirmips, *indmips;
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+ _bfd_elf_link_hash_copy_indirect (info, dir, ind);
if (ind->root.type != bfd_link_hash_indirect)
return;
@@ -7633,6 +9490,9 @@ _bfd_mips_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
dirmips->readonly_reloc = TRUE;
if (indmips->no_fn_stub)
dirmips->no_fn_stub = TRUE;
+
+ if (dirmips->tls_type == 0)
+ dirmips->tls_type = indmips->tls_type;
}
void
@@ -7651,11 +9511,10 @@ _bfd_mips_elf_hide_symbol (struct bfd_link_info *info,
h->forced_local = force_local;
dynobj = elf_hash_table (info)->dynobj;
- if (dynobj != NULL && force_local)
+ if (dynobj != NULL && force_local && h->root.type != STT_TLS
+ && (got = mips_elf_got_section (dynobj, FALSE)) != NULL
+ && (g = mips_elf_section_data (got)->u.got_info) != NULL)
{
- got = mips_elf_got_section (dynobj, FALSE);
- g = mips_elf_section_data (got)->u.got_info;
-
if (g->next)
{
struct mips_got_entry e;
@@ -7669,6 +9528,7 @@ _bfd_mips_elf_hide_symbol (struct bfd_link_info *info,
e.abfd = dynobj;
e.symndx = -1;
e.d.h = h;
+ e.tls_type = 0;
for (g = g->next; g != gg; g = g->next)
if (htab_find (g->got_entries, &e))
@@ -7721,15 +9581,15 @@ _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
o = bfd_get_section_by_name (abfd, ".pdr");
if (! o)
return FALSE;
- if (o->_raw_size == 0)
+ if (o->size == 0)
return FALSE;
- if (o->_raw_size % PDR_SIZE != 0)
+ if (o->size % PDR_SIZE != 0)
return FALSE;
if (o->output_section != NULL
&& bfd_is_abs_section (o->output_section))
return FALSE;
- tdata = bfd_zmalloc (o->_raw_size / PDR_SIZE);
+ tdata = bfd_zmalloc (o->size / PDR_SIZE);
if (! tdata)
return FALSE;
@@ -7744,7 +9604,7 @@ _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
cookie->rel = cookie->rels;
cookie->relend = cookie->rels + o->reloc_count;
- for (i = 0, skip = 0; i < o->_raw_size / PDR_SIZE; i ++)
+ for (i = 0, skip = 0; i < o->size / PDR_SIZE; i ++)
{
if (bfd_elf_reloc_symbol_deleted_p (i * PDR_SIZE, cookie))
{
@@ -7756,7 +9616,7 @@ _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
if (skip != 0)
{
mips_elf_section_data (o)->u.tdata = tdata;
- o->_cooked_size = o->_raw_size - skip * PDR_SIZE;
+ o->size -= skip * PDR_SIZE;
ret = TRUE;
}
else
@@ -7790,7 +9650,7 @@ _bfd_mips_elf_write_section (bfd *output_bfd, asection *sec,
return FALSE;
to = contents;
- end = contents + sec->_raw_size;
+ end = contents + sec->size;
for (from = contents, i = 0;
from < end;
from += PDR_SIZE, i++)
@@ -7802,7 +9662,7 @@ _bfd_mips_elf_write_section (bfd *output_bfd, asection *sec,
to += PDR_SIZE;
}
bfd_set_section_contents (output_bfd, sec->output_section, contents,
- sec->output_offset, sec->_cooked_size);
+ sec->output_offset, sec->size);
return TRUE;
}
@@ -7915,6 +9775,20 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asection *section,
filename_ptr, functionname_ptr,
line_ptr);
}
+
+bfd_boolean
+_bfd_mips_elf_find_inliner_info (bfd *abfd,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
+{
+ bfd_boolean found;
+ found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr,
+ functionname_ptr, line_ptr,
+ & elf_tdata (abfd)->dwarf2_find_line_info);
+ return found;
+}
+
/* When are writing out the .options or .MIPS.options section,
remember the bytes we are writing out, so that we can install the
@@ -7925,7 +9799,7 @@ _bfd_mips_elf_set_section_contents (bfd *abfd, sec_ptr section,
const void *location,
file_ptr offset, bfd_size_type count)
{
- if (strcmp (section->name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) == 0)
+ if (MIPS_ELF_OPTIONS_SECTION_NAME_P (section->name))
{
bfd_byte *c;
@@ -7939,13 +9813,7 @@ _bfd_mips_elf_set_section_contents (bfd *abfd, sec_ptr section,
c = mips_elf_section_data (section)->u.tdata;
if (c == NULL)
{
- bfd_size_type size;
-
- if (section->_cooked_size != 0)
- size = section->_cooked_size;
- else
- size = section->_raw_size;
- c = bfd_zalloc (abfd, size);
+ c = bfd_zalloc (abfd, section->size);
if (c == NULL)
return FALSE;
mips_elf_section_data (section)->u.tdata = c;
@@ -7973,6 +9841,7 @@ _bfd_elf_mips_get_relocated_section_contents
/* Get enough memory to hold the stuff */
bfd *input_bfd = link_order->u.indirect.section->owner;
asection *input_section = link_order->u.indirect.section;
+ bfd_size_type sz;
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
@@ -7986,14 +9855,10 @@ _bfd_elf_mips_get_relocated_section_contents
goto error_return;
/* read in the section */
- if (!bfd_get_section_contents (input_bfd, input_section, data, 0,
- input_section->_raw_size))
+ sz = input_section->rawsize ? input_section->rawsize : input_section->size;
+ if (!bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
goto error_return;
- /* We're not relaxing the section, so just copy the size info */
- input_section->_cooked_size = input_section->_raw_size;
- input_section->reloc_done = TRUE;
-
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
reloc_vector,
@@ -8057,30 +9922,21 @@ _bfd_elf_mips_get_relocated_section_contents
/* Specific to MIPS: Deal with relocation types that require
knowing the gp of the output bfd. */
asymbol *sym = *(*parent)->sym_ptr_ptr;
- if (bfd_is_abs_section (sym->section) && abfd)
- {
- /* The special_function wouldn't get called anyway. */
- }
- else if (!gp_found)
- {
- /* The gp isn't there; let the special function code
- fall over on its own. */
- }
- else if ((*parent)->howto->special_function
- == _bfd_mips_elf32_gprel16_reloc)
- {
- /* bypass special_function call */
- r = _bfd_mips_elf_gprel16_with_gp (input_bfd, sym, *parent,
- input_section, relocatable,
- data, gp);
- goto skip_bfd_perform_relocation;
- }
- /* end mips specific stuff */
- r = bfd_perform_relocation (input_bfd, *parent, data, input_section,
- relocatable ? abfd : NULL,
- &error_message);
- skip_bfd_perform_relocation:
+ /* If we've managed to find the gp and have a special
+ function for the relocation then go ahead, else default
+ to the generic handling. */
+ if (gp_found
+ && (*parent)->howto->special_function
+ == _bfd_mips_elf32_gprel16_reloc)
+ r = _bfd_mips_elf_gprel16_with_gp (input_bfd, sym, *parent,
+ input_section, relocatable,
+ data, gp);
+ else
+ r = bfd_perform_relocation (input_bfd, *parent, data,
+ input_section,
+ relocatable ? abfd : NULL,
+ &error_message);
if (relocatable)
{
@@ -8098,8 +9954,7 @@ _bfd_elf_mips_get_relocated_section_contents
case bfd_reloc_undefined:
if (!((*link_info->callbacks->undefined_symbol)
(link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
- input_bfd, input_section, (*parent)->address,
- TRUE)))
+ input_bfd, input_section, (*parent)->address, TRUE)))
goto error_return;
break;
case bfd_reloc_dangerous:
@@ -8111,7 +9966,8 @@ _bfd_elf_mips_get_relocated_section_contents
break;
case bfd_reloc_overflow:
if (!((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
(*parent)->howto->name, (*parent)->addend,
input_bfd, input_section, (*parent)->address)))
goto error_return;
@@ -8147,8 +10003,9 @@ _bfd_mips_elf_link_hash_table_create (bfd *abfd)
if (ret == NULL)
return NULL;
- if (! _bfd_elf_link_hash_table_init (&ret->root, abfd,
- mips_elf_link_hash_newfunc))
+ if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
+ mips_elf_link_hash_newfunc,
+ sizeof (struct mips_elf_link_hash_entry)))
{
free (ret);
return NULL;
@@ -8164,9 +10021,37 @@ _bfd_mips_elf_link_hash_table_create (bfd *abfd)
ret->use_rld_obj_head = FALSE;
ret->rld_value = 0;
ret->mips16_stubs_seen = FALSE;
+ ret->is_vxworks = FALSE;
+ ret->srelbss = NULL;
+ ret->sdynbss = NULL;
+ ret->srelplt = NULL;
+ ret->srelplt2 = NULL;
+ ret->sgotplt = NULL;
+ ret->splt = NULL;
+ ret->plt_header_size = 0;
+ ret->plt_entry_size = 0;
+ ret->function_stub_size = 0;
return &ret->root.root;
}
+
+/* Likewise, but indicate that the target is VxWorks. */
+
+struct bfd_link_hash_table *
+_bfd_mips_vxworks_link_hash_table_create (bfd *abfd)
+{
+ struct bfd_link_hash_table *ret;
+
+ ret = _bfd_mips_elf_link_hash_table_create (abfd);
+ if (ret)
+ {
+ struct mips_elf_link_hash_table *htab;
+
+ htab = (struct mips_elf_link_hash_table *) ret;
+ htab->is_vxworks = 1;
+ }
+ return ret;
+}
/* We need to use a special link routine to handle the .reginfo and
the .mdebug sections. We need to merge all instances of these
@@ -8175,21 +10060,21 @@ _bfd_mips_elf_link_hash_table_create (bfd *abfd)
bfd_boolean
_bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
- asection **secpp;
asection *o;
struct bfd_link_order *p;
asection *reginfo_sec, *mdebug_sec, *gptab_data_sec, *gptab_bss_sec;
asection *rtproc_sec;
Elf32_RegInfo reginfo;
struct ecoff_debug_info debug;
- const struct ecoff_debug_swap *swap
- = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap;
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct ecoff_debug_swap *swap = bed->elf_backend_ecoff_debug_swap;
HDRR *symhdr = &debug.symbolic_header;
void *mdebug_handle = NULL;
asection *s;
EXTR esym;
unsigned int i;
bfd_size_type amt;
+ struct mips_elf_link_hash_table *htab;
static const char * const secname[] =
{
@@ -8206,11 +10091,13 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
generic size_dynamic_sections renumbered them out from under us.
Rather than trying somehow to prevent the renumbering, just do
the sort again. */
+ htab = mips_elf_hash_table (info);
if (elf_hash_table (info)->dynamic_sections_created)
{
bfd *dynobj;
asection *got;
struct mips_got_info *g;
+ bfd_size_type dynsecsymcount;
/* When we resort, we must tell mips_elf_sort_hash_table what
the lowest index it may use is. That's the number of section
@@ -8218,9 +10105,9 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
adds these symbols when building a shared object. Note that
we count the sections after (possibly) removing the .options
section above. */
- if (! mips_elf_sort_hash_table (info, (info->shared
- ? bfd_count_sections (abfd) + 1
- : 1)))
+
+ dynsecsymcount = count_section_dynsyms (abfd, info);
+ if (! mips_elf_sort_hash_table (info, dynsecsymcount + 1))
return FALSE;
/* Make sure we didn't grow the global .got region. */
@@ -8234,47 +10121,6 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
<= g->global_gotno);
}
-#if 0
- /* We want to set the GP value for ld -r. */
- /* On IRIX5, we omit the .options section. On IRIX6, however, we
- include it, even though we don't process it quite right. (Some
- entries are supposed to be merged.) Empirically, we seem to be
- better off including it then not. */
- if (IRIX_COMPAT (abfd) == ict_irix5 || IRIX_COMPAT (abfd) == ict_none)
- for (secpp = &abfd->sections; *secpp != NULL; secpp = &(*secpp)->next)
- {
- if (strcmp ((*secpp)->name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) == 0)
- {
- for (p = (*secpp)->link_order_head; p != NULL; p = p->next)
- if (p->type == bfd_indirect_link_order)
- p->u.indirect.section->flags &= ~SEC_HAS_CONTENTS;
- (*secpp)->link_order_head = NULL;
- bfd_section_list_remove (abfd, secpp);
- --abfd->section_count;
-
- break;
- }
- }
-
- /* We include .MIPS.options, even though we don't process it quite right.
- (Some entries are supposed to be merged.) At IRIX6 empirically we seem
- to be better off including it than not. */
- for (secpp = &abfd->sections; *secpp != NULL; secpp = &(*secpp)->next)
- {
- if (strcmp ((*secpp)->name, ".MIPS.options") == 0)
- {
- for (p = (*secpp)->link_order_head; p != NULL; p = p->next)
- if (p->type == bfd_indirect_link_order)
- p->u.indirect.section->flags &=~ SEC_HAS_CONTENTS;
- (*secpp)->link_order_head = NULL;
- bfd_section_list_remove (abfd, secpp);
- --abfd->section_count;
-
- break;
- }
- }
-#endif
-
/* Get a value for the GP register. */
if (elf_gp (abfd) == 0)
{
@@ -8285,6 +10131,14 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
elf_gp (abfd) = (h->u.def.value
+ h->u.def.section->output_section->vma
+ h->u.def.section->output_offset);
+ else if (htab->is_vxworks
+ && (h = bfd_link_hash_lookup (info->hash,
+ "_GLOBAL_OFFSET_TABLE_",
+ FALSE, FALSE, TRUE))
+ && h->type == bfd_link_hash_defined)
+ elf_gp (abfd) = (h->u.def.section->output_section->vma
+ + h->u.def.section->output_offset
+ + h->u.def.value);
else if (info->relocatable)
{
bfd_vma lo = MINUS_ONE;
@@ -8296,7 +10150,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
lo = o->vma;
/* And calculate GP relative to that. */
- elf_gp (abfd) = lo + ELF_MIPS_GP_OFFSET (abfd);
+ elf_gp (abfd) = lo + ELF_MIPS_GP_OFFSET (info);
}
else
{
@@ -8321,7 +10175,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
/* We have found the .reginfo section in the output file.
Look through all the link_orders comprising it and merge
the information together. */
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
asection *input_section;
bfd *input_bfd;
@@ -8338,11 +10192,6 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
input_section = p->u.indirect.section;
input_bfd = input_section->owner;
- /* The linker emulation code has probably clobbered the
- size to be zero bytes. */
- if (input_section->_raw_size == 0)
- input_section->_raw_size = sizeof (Elf32_External_RegInfo);
-
if (! bfd_get_section_contents (input_bfd, input_section,
&ext, 0, sizeof ext))
return FALSE;
@@ -8365,11 +10214,11 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
}
/* Size has been set in _bfd_mips_elf_always_size_sections. */
- BFD_ASSERT(o->_raw_size == sizeof (Elf32_External_RegInfo));
+ BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
- o->link_order_head = NULL;
+ o->map_head.link_order = NULL;
reginfo_sec = o;
}
@@ -8433,7 +10282,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (s != NULL)
{
esym.asym.value = s->vma;
- last = s->vma + s->_raw_size;
+ last = s->vma + s->size;
}
else
esym.asym.value = last;
@@ -8442,7 +10291,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
return FALSE;
}
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
asection *input_section;
bfd *input_bfd;
@@ -8474,7 +10323,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
input_swap = (get_elf_backend_data (input_bfd)
->elf_backend_ecoff_debug_swap);
- BFD_ASSERT (p->size == input_section->_raw_size);
+ BFD_ASSERT (p->size == input_section->size);
/* The ECOFF linking code expects that we have already
read in the debugging information and set up an
@@ -8553,9 +10402,10 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
flagword flags = (SEC_HAS_CONTENTS | SEC_IN_MEMORY
| SEC_LINKER_CREATED | SEC_READONLY);
- rtproc_sec = bfd_make_section (abfd, ".rtproc");
+ rtproc_sec = bfd_make_section_with_flags (abfd,
+ ".rtproc",
+ flags);
if (rtproc_sec == NULL
- || ! bfd_set_section_flags (abfd, rtproc_sec, flags)
|| ! bfd_set_section_alignment (abfd, rtproc_sec, 4))
return FALSE;
}
@@ -8578,11 +10428,11 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
return FALSE;
/* Set the size of the .mdebug section. */
- o->_raw_size = bfd_ecoff_debug_size (abfd, &debug, swap);
+ o->size = bfd_ecoff_debug_size (abfd, &debug, swap);
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
- o->link_order_head = NULL;
+ o->map_head.link_order = NULL;
mdebug_sec = o;
}
@@ -8601,7 +10451,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
not used in executables files. */
if (! info->relocatable)
{
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
asection *input_section;
@@ -8621,14 +10471,10 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
/* Skip this section later on (I don't think this
currently matters, but someday it might). */
- o->link_order_head = NULL;
+ o->map_head.link_order = NULL;
/* Really remove the section. */
- for (secpp = &abfd->sections;
- *secpp != o;
- secpp = &(*secpp)->next)
- ;
- bfd_section_list_remove (abfd, secpp);
+ bfd_section_list_remove (abfd, o);
--abfd->section_count;
continue;
@@ -8675,7 +10521,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
tab[0].gt_header.gt_unused = 0;
/* Combine the input sections. */
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
asection *input_section;
bfd *input_bfd;
@@ -8696,7 +10542,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
/* Combine the gptab entries for this input section one
by one. We know that the input gptab entries are
sorted by ascending -G value. */
- size = bfd_section_size (input_bfd, input_section);
+ size = input_section->size;
last = 0;
for (gpentry = sizeof (Elf32_External_gptab);
gpentry < size;
@@ -8793,12 +10639,12 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
bfd_mips_elf32_swap_gptab_out (abfd, tab + j, ext_tab + j);
free (tab);
- o->_raw_size = c * sizeof (Elf32_External_gptab);
+ o->size = c * sizeof (Elf32_External_gptab);
o->contents = (bfd_byte *) ext_tab;
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
- o->link_order_head = NULL;
+ o->map_head.link_order = NULL;
}
}
@@ -8832,7 +10678,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
if (! bfd_set_section_contents (abfd, gptab_data_sec,
gptab_data_sec->contents,
- 0, gptab_data_sec->_raw_size))
+ 0, gptab_data_sec->size))
return FALSE;
}
@@ -8840,7 +10686,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
if (! bfd_set_section_contents (abfd, gptab_bss_sec,
gptab_bss_sec->contents,
- 0, gptab_bss_sec->_raw_size))
+ 0, gptab_bss_sec->size))
return FALSE;
}
@@ -8851,7 +10697,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
if (! bfd_set_section_contents (abfd, rtproc_sec,
rtproc_sec->contents,
- 0, rtproc_sec->_raw_size))
+ 0, rtproc_sec->size))
return FALSE;
}
}
@@ -8985,8 +10831,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (! _bfd_generic_verify_endian_match (ibfd, obfd))
{
(*_bfd_error_handler)
- (_("%s: endianness incompatible with that of the selected emulation"),
- bfd_archive_filename (ibfd));
+ (_("%B: endianness incompatible with that of the selected emulation"),
+ ibfd);
return FALSE;
}
@@ -8997,8 +10843,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (strcmp (bfd_get_target (ibfd), bfd_get_target (obfd)) != 0)
{
(*_bfd_error_handler)
- (_("%s: ABI is incompatible with that of the selected emulation"),
- bfd_archive_filename (ibfd));
+ (_("%B: ABI is incompatible with that of the selected emulation"),
+ ibfd);
return FALSE;
}
@@ -9039,6 +10885,12 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
new_flags &= ~EF_MIPS_UCODE;
old_flags &= ~EF_MIPS_UCODE;
+ /* Don't care about the PIC flags from dynamic objects; they are
+ PIC by design. */
+ if ((new_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0
+ && (ibfd->flags & DYNAMIC) != 0)
+ new_flags &= ~ (EF_MIPS_PIC | EF_MIPS_CPIC);
+
if (new_flags == old_flags)
return TRUE;
@@ -9051,7 +10903,7 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
which are automatically generated by gas. */
if (strcmp (sec->name, ".reginfo")
&& strcmp (sec->name, ".mdebug")
- && (sec->_raw_size != 0
+ && (sec->size != 0
|| (strcmp (sec->name, ".text")
&& strcmp (sec->name, ".data")
&& strcmp (sec->name, ".bss"))))
@@ -9069,8 +10921,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
!= ((old_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0))
{
(*_bfd_error_handler)
- (_("%s: warning: linking PIC files with non-PIC files"),
- bfd_archive_filename (ibfd));
+ (_("%B: warning: linking PIC files with non-PIC files"),
+ ibfd);
ok = TRUE;
}
@@ -9086,8 +10938,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (mips_32bit_flags_p (old_flags) != mips_32bit_flags_p (new_flags))
{
(*_bfd_error_handler)
- (_("%s: linking 32-bit code with 64-bit code"),
- bfd_archive_filename (ibfd));
+ (_("%B: linking 32-bit code with 64-bit code"),
+ ibfd);
ok = FALSE;
}
else if (!mips_mach_extends_p (bfd_get_mach (ibfd), bfd_get_mach (obfd)))
@@ -9114,8 +10966,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
/* The ISAs aren't compatible. */
(*_bfd_error_handler)
- (_("%s: linking %s module with previous %s modules"),
- bfd_archive_filename (ibfd),
+ (_("%B: linking %s module with previous %s modules"),
+ ibfd,
bfd_printable_name (ibfd),
bfd_printable_name (obfd));
ok = FALSE;
@@ -9137,8 +10989,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
!= elf_elfheader (obfd)->e_ident[EI_CLASS]))
{
(*_bfd_error_handler)
- (_("%s: ABI mismatch: linking %s module with previous %s modules"),
- bfd_archive_filename (ibfd),
+ (_("%B: ABI mismatch: linking %s module with previous %s modules"),
+ ibfd,
elf_mips_abi_name (ibfd),
elf_mips_abi_name (obfd));
ok = FALSE;
@@ -9160,8 +11012,8 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (new_flags != old_flags)
{
(*_bfd_error_handler)
- (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_archive_filename (ibfd), (unsigned long) new_flags,
+ (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+ ibfd, (unsigned long) new_flags,
(unsigned long) old_flags);
ok = FALSE;
}
@@ -9255,13 +11107,34 @@ _bfd_mips_elf_print_private_bfd_data (bfd *abfd, void *ptr)
return TRUE;
}
-struct bfd_elf_special_section const _bfd_mips_elf_special_sections[]=
+const struct bfd_elf_special_section _bfd_mips_elf_special_sections[] =
{
- { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
{ ".lit4", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
{ ".lit8", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".ucode", 6, 0, SHT_MIPS_UCODE, 0 },
{ ".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 }
};
+
+/* Ensure that the STO_OPTIONAL flag is copied into h->other,
+ even if this is not a defintion 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
+ && ELF_MIPS_IS_OPTIONAL (isym->st_other))
+ h->other |= STO_OPTIONAL;
+}
+
+/* Decide whether an undefined symbol is special and can be ignored.
+ This is the case for OPTIONAL symbols on IRIX. */
+bfd_boolean
+_bfd_mips_elf_ignore_undef_symbol (struct elf_link_hash_entry *h)
+{
+ return ELF_MIPS_IS_OPTIONAL (h->other) ? TRUE : FALSE;
+}
diff --git a/contrib/binutils/bfd/elfxx-mips.h b/contrib/binutils/bfd/elfxx-mips.h
index 0a684d908678..6c3c9a30f6e5 100644
--- a/contrib/binutils/bfd/elfxx-mips.h
+++ b/contrib/binutils/bfd/elfxx-mips.h
@@ -1,5 +1,5 @@
/* MIPS ELF specific backend routines.
- Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "elf/common.h"
#include "elf/internal.h"
@@ -24,12 +24,14 @@ extern bfd_boolean _bfd_mips_elf_new_section_hook
(bfd *, asection *);
extern void _bfd_mips_elf_symbol_processing
(bfd *, asymbol *);
+extern unsigned int _bfd_mips_elf_eh_frame_address_size
+ (bfd *, asection *);
extern bfd_boolean _bfd_mips_elf_name_local_section_symbols
(bfd *);
extern bfd_boolean _bfd_mips_elf_section_processing
(bfd *, Elf_Internal_Shdr *);
extern bfd_boolean _bfd_mips_elf_section_from_shdr
- (bfd *, Elf_Internal_Shdr *, const char *);
+ (bfd *, Elf_Internal_Shdr *, const char *, int);
extern bfd_boolean _bfd_mips_elf_fake_sections
(bfd *, Elf_Internal_Shdr *, asection *);
extern bfd_boolean _bfd_mips_elf_section_from_bfd_section
@@ -46,6 +48,8 @@ extern bfd_boolean _bfd_mips_elf_check_relocs
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
extern bfd_boolean _bfd_mips_elf_adjust_dynamic_symbol
(struct bfd_link_info *, struct elf_link_hash_entry *);
+extern bfd_boolean _bfd_mips_vxworks_adjust_dynamic_symbol
+ (struct bfd_link_info *, struct elf_link_hash_entry *);
extern bfd_boolean _bfd_mips_elf_always_size_sections
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mips_elf_size_dynamic_sections
@@ -56,6 +60,9 @@ extern bfd_boolean _bfd_mips_elf_relocate_section
extern bfd_boolean _bfd_mips_elf_finish_dynamic_symbol
(bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
Elf_Internal_Sym *);
+extern bfd_boolean _bfd_mips_vxworks_finish_dynamic_symbol
+ (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *);
extern bfd_boolean _bfd_mips_elf_finish_dynamic_sections
(bfd *, struct bfd_link_info *);
extern void _bfd_mips_elf_final_write_processing
@@ -70,7 +77,7 @@ extern asection * _bfd_mips_elf_gc_mark_hook
extern bfd_boolean _bfd_mips_elf_gc_sweep_hook
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
extern void _bfd_mips_elf_copy_indirect_symbol
- (const struct elf_backend_data *, struct elf_link_hash_entry *,
+ (struct bfd_link_info *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *);
extern void _bfd_mips_elf_hide_symbol
(struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean);
@@ -79,6 +86,8 @@ extern bfd_boolean _bfd_mips_elf_ignore_discarded_relocs
extern bfd_boolean _bfd_mips_elf_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *);
+extern bfd_boolean _bfd_mips_elf_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
extern bfd_boolean _bfd_mips_elf_set_section_contents
(bfd *, asection *, const void *, file_ptr, bfd_size_type);
extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents
@@ -86,6 +95,8 @@ extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents
bfd_byte *, bfd_boolean, asymbol **);
extern struct bfd_link_hash_table *_bfd_mips_elf_link_hash_table_create
(bfd *);
+extern struct bfd_link_hash_table *_bfd_mips_vxworks_link_hash_table_create
+ (bfd *);
extern bfd_boolean _bfd_mips_elf_final_link
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mips_elf_merge_private_bfd_data
@@ -101,6 +112,10 @@ extern bfd_boolean _bfd_mips_elf_write_section
extern bfd_boolean _bfd_mips_elf_read_ecoff_info
(bfd *, asection *, struct ecoff_debug_info *);
+extern void _bfd_mips16_elf_reloc_unshuffle
+ (bfd *, int, bfd_boolean, bfd_byte *);
+extern void _bfd_mips16_elf_reloc_shuffle
+ (bfd *, int, bfd_boolean, bfd_byte *);
extern bfd_reloc_status_type _bfd_mips_elf_gprel16_with_gp
(bfd *, asymbol *, arelent *, asection *, bfd_boolean, void *, bfd_vma);
extern bfd_reloc_status_type _bfd_mips_elf32_gprel16_reloc
@@ -119,8 +134,16 @@ extern bfd_boolean _bfd_mips_relax_section
(bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
extern bfd_vma _bfd_mips_elf_sign_extend
(bfd_vma, int);
+extern void _bfd_mips_elf_merge_symbol_attribute
+ (struct elf_link_hash_entry *, const Elf_Internal_Sym *, bfd_boolean, bfd_boolean);
+extern bfd_boolean _bfd_mips_elf_ignore_undef_symbol
+ (struct elf_link_hash_entry *);
+
+extern const struct bfd_elf_special_section _bfd_mips_elf_special_sections [];
-extern struct bfd_elf_special_section const _bfd_mips_elf_special_sections[];
#define elf_backend_name_local_section_symbols \
_bfd_mips_elf_name_local_section_symbols
#define elf_backend_special_sections _bfd_mips_elf_special_sections
+#define elf_backend_eh_frame_address_size _bfd_mips_elf_eh_frame_address_size
+#define elf_backend_merge_symbol_attribute _bfd_mips_elf_merge_symbol_attribute
+#define elf_backend_ignore_undef_symbol _bfd_mips_elf_ignore_undef_symbol
diff --git a/contrib/binutils/bfd/elfxx-sparc.c b/contrib/binutils/bfd/elfxx-sparc.c
new file mode 100644
index 000000000000..ef7ff482d2ed
--- /dev/null
+++ b/contrib/binutils/bfd/elfxx-sparc.c
@@ -0,0 +1,4165 @@
+/* SPARC-specific support for ELF
+ Copyright 2005, 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. */
+
+/* This file handles functionality common to the different SPARC ABI's. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "libbfd.h"
+#include "libiberty.h"
+#include "elf-bfd.h"
+#include "elf/sparc.h"
+#include "opcode/sparc.h"
+#include "elfxx-sparc.h"
+#include "elf-vxworks.h"
+
+/* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */
+#define MINUS_ONE (~ (bfd_vma) 0)
+
+#define ABI_64_P(abfd) \
+ (get_elf_backend_data (abfd)->s->elfclass == ELFCLASS64)
+
+/* The relocation "howto" table. */
+
+/* Utility for performing the standard initial work of an instruction
+ relocation.
+ *PRELOCATION will contain the relocated item.
+ *PINSN will contain the instruction from the input stream.
+ If the result is `bfd_reloc_other' the caller can continue with
+ performing the relocation. Otherwise it must stop and return the
+ value to its caller. */
+
+static bfd_reloc_status_type
+init_insn_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ PTR data, asection *input_section, bfd *output_bfd,
+ bfd_vma *prelocation, bfd_vma *pinsn)
+{
+ bfd_vma relocation;
+ reloc_howto_type *howto = reloc_entry->howto;
+
+ if (output_bfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (! howto->partial_inplace
+ || reloc_entry->addend == 0))
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ /* This works because partial_inplace is FALSE. */
+ if (output_bfd != NULL)
+ return bfd_reloc_continue;
+
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
+ return bfd_reloc_outofrange;
+
+ relocation = (symbol->value
+ + symbol->section->output_section->vma
+ + symbol->section->output_offset);
+ relocation += reloc_entry->addend;
+ if (howto->pc_relative)
+ {
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset);
+ relocation -= reloc_entry->address;
+ }
+
+ *prelocation = relocation;
+ *pinsn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ return bfd_reloc_other;
+}
+
+/* For unsupported relocs. */
+
+static bfd_reloc_status_type
+sparc_elf_notsup_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ PTR data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ return bfd_reloc_notsupported;
+}
+
+/* Handle the WDISP16 reloc. */
+
+static bfd_reloc_status_type
+sparc_elf_wdisp16_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ PTR data, asection *input_section, bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ bfd_vma relocation;
+ bfd_vma insn;
+ bfd_reloc_status_type status;
+
+ status = init_insn_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, &relocation, &insn);
+ if (status != bfd_reloc_other)
+ return status;
+
+ insn &= ~ (bfd_vma) 0x303fff;
+ insn |= (((relocation >> 2) & 0xc000) << 6) | ((relocation >> 2) & 0x3fff);
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+
+ if ((bfd_signed_vma) relocation < - 0x40000
+ || (bfd_signed_vma) relocation > 0x3ffff)
+ return bfd_reloc_overflow;
+ else
+ return bfd_reloc_ok;
+}
+
+/* Handle the HIX22 reloc. */
+
+static bfd_reloc_status_type
+sparc_elf_hix22_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ PTR data, asection *input_section, bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ bfd_vma relocation;
+ bfd_vma insn;
+ bfd_reloc_status_type status;
+
+ status = init_insn_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, &relocation, &insn);
+ if (status != bfd_reloc_other)
+ return status;
+
+ relocation ^= MINUS_ONE;
+ insn = (insn &~ (bfd_vma) 0x3fffff) | ((relocation >> 10) & 0x3fffff);
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+
+ if ((relocation & ~ (bfd_vma) 0xffffffff) != 0)
+ return bfd_reloc_overflow;
+ else
+ return bfd_reloc_ok;
+}
+
+/* Handle the LOX10 reloc. */
+
+static bfd_reloc_status_type
+sparc_elf_lox10_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ PTR data, asection *input_section, bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ bfd_vma relocation;
+ bfd_vma insn;
+ bfd_reloc_status_type status;
+
+ status = init_insn_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, &relocation, &insn);
+ if (status != bfd_reloc_other)
+ return status;
+
+ insn = (insn &~ (bfd_vma) 0x1fff) | 0x1c00 | (relocation & 0x3ff);
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+
+ return bfd_reloc_ok;
+}
+
+static reloc_howto_type _bfd_sparc_elf_howto_table[] =
+{
+ HOWTO(R_SPARC_NONE, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_8", FALSE,0,0x000000ff,TRUE),
+ HOWTO(R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_16", FALSE,0,0x0000ffff,TRUE),
+ HOWTO(R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_32", FALSE,0,0xffffffff,TRUE),
+ HOWTO(R_SPARC_DISP8, 0,0, 8,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP8", FALSE,0,0x000000ff,TRUE),
+ HOWTO(R_SPARC_DISP16, 0,1,16,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP16", FALSE,0,0x0000ffff,TRUE),
+ HOWTO(R_SPARC_DISP32, 0,2,32,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP32", FALSE,0,0xffffffff,TRUE),
+ HOWTO(R_SPARC_WDISP30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP30", FALSE,0,0x3fffffff,TRUE),
+ HOWTO(R_SPARC_WDISP22, 2,2,22,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP22", FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_HI22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HI22", FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_22, 0,2,22,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_22", FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_13, 0,2,13,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_13", FALSE,0,0x00001fff,TRUE),
+ HOWTO(R_SPARC_LO10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_LO10", FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_GOT10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT10", FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_GOT13, 0,2,13,FALSE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_GOT13", FALSE,0,0x00001fff,TRUE),
+ HOWTO(R_SPARC_GOT22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT22", FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_PC10, 0,2,10,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC10", FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_PC22, 10,2,22,TRUE, 0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PC22", FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_WPLT30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WPLT30", FALSE,0,0x3fffffff,TRUE),
+ HOWTO(R_SPARC_COPY, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_COPY", FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_GLOB_DAT, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GLOB_DAT",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_JMP_SLOT, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_RELATIVE, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_UA32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", FALSE,0,0xffffffff,TRUE),
+ HOWTO(R_SPARC_PLT32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT32", FALSE,0,0xffffffff,TRUE),
+ HOWTO(R_SPARC_HIPLT22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_HIPLT22", FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_LOPLT10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_LOPLT10", FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_PCPLT32, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT32", FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_PCPLT22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT22", FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_PCPLT10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT10", FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_10, 0,2,10,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_10", FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_11, 0,2,11,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_11", FALSE,0,0x000007ff,TRUE),
+ HOWTO(R_SPARC_64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_64", FALSE,0,MINUS_ONE, TRUE),
+ HOWTO(R_SPARC_OLO10, 0,2,13,FALSE,0,complain_overflow_signed, sparc_elf_notsup_reloc, "R_SPARC_OLO10", FALSE,0,0x00001fff,TRUE),
+ HOWTO(R_SPARC_HH22, 42,2,22,FALSE,0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_HH22", FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_HM10, 32,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HM10", FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_LM22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_LM22", FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_PC_HH22, 42,2,22,TRUE, 0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_PC_HH22", FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_PC_HM10, 32,2,10,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC_HM10", FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_PC_LM22, 10,2,22,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC_LM22", FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_WDISP16, 2,2,16,TRUE, 0,complain_overflow_signed, sparc_elf_wdisp16_reloc,"R_SPARC_WDISP16", FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_WDISP19, 2,2,19,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP19", FALSE,0,0x0007ffff,TRUE),
+ HOWTO(R_SPARC_UNUSED_42, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UNUSED_42",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_7, 0,2, 7,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_7", FALSE,0,0x0000007f,TRUE),
+ HOWTO(R_SPARC_5, 0,2, 5,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_5", FALSE,0,0x0000001f,TRUE),
+ HOWTO(R_SPARC_6, 0,2, 6,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_6", FALSE,0,0x0000003f,TRUE),
+ HOWTO(R_SPARC_DISP64, 0,4,64,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP64", FALSE,0,MINUS_ONE, TRUE),
+ HOWTO(R_SPARC_PLT64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT64", FALSE,0,MINUS_ONE, TRUE),
+ HOWTO(R_SPARC_HIX22, 0,4, 0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_HIX22", FALSE,0,MINUS_ONE, FALSE),
+ HOWTO(R_SPARC_LOX10, 0,4, 0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_LOX10", FALSE,0,MINUS_ONE, FALSE),
+ HOWTO(R_SPARC_H44, 22,2,22,FALSE,0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_H44", FALSE,0,0x003fffff,FALSE),
+ HOWTO(R_SPARC_M44, 12,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_M44", FALSE,0,0x000003ff,FALSE),
+ HOWTO(R_SPARC_L44, 0,2,13,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_L44", FALSE,0,0x00000fff,FALSE),
+ HOWTO(R_SPARC_REGISTER, 0,4, 0,FALSE,0,complain_overflow_bitfield,sparc_elf_notsup_reloc, "R_SPARC_REGISTER",FALSE,0,MINUS_ONE, FALSE),
+ HOWTO(R_SPARC_UA64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", FALSE,0,MINUS_ONE, TRUE),
+ HOWTO(R_SPARC_UA16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", FALSE,0,0x0000ffff,TRUE),
+ HOWTO(R_SPARC_TLS_GD_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_HI22",FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_TLS_GD_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_LO10",FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_TLS_GD_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_GD_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_CALL",FALSE,0,0x3fffffff,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_HI22",FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_LO10",FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_LDM_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_CALL",FALSE,0,0x3fffffff,TRUE),
+ HOWTO(R_SPARC_TLS_LDO_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_TLS_LDO_HIX22",FALSE,0,0x003fffff, FALSE),
+ HOWTO(R_SPARC_TLS_LDO_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LDO_LOX10",FALSE,0,0x000003ff, FALSE),
+ HOWTO(R_SPARC_TLS_LDO_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDO_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_IE_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_HI22",FALSE,0,0x003fffff,TRUE),
+ HOWTO(R_SPARC_TLS_IE_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LO10",FALSE,0,0x000003ff,TRUE),
+ HOWTO(R_SPARC_TLS_IE_LD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_IE_LDX,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LDX",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_IE_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_ADD",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_LE_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_TLS_LE_HIX22",FALSE,0,0x003fffff, FALSE),
+ HOWTO(R_SPARC_TLS_LE_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LE_LOX10",FALSE,0,0x000003ff, FALSE),
+ HOWTO(R_SPARC_TLS_DTPMOD32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD32",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_DTPMOD64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD64",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_DTPOFF32,0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF32",FALSE,0,0xffffffff,TRUE),
+ HOWTO(R_SPARC_TLS_DTPOFF64,0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF64",FALSE,0,MINUS_ONE,TRUE),
+ HOWTO(R_SPARC_TLS_TPOFF32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF32",FALSE,0,0x00000000,TRUE),
+ HOWTO(R_SPARC_TLS_TPOFF64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF64",FALSE,0,0x00000000,TRUE)
+};
+static reloc_howto_type sparc_vtinherit_howto =
+ HOWTO (R_SPARC_GNU_VTINHERIT, 0,2,0,FALSE,0,complain_overflow_dont, NULL, "R_SPARC_GNU_VTINHERIT", FALSE,0, 0, FALSE);
+static reloc_howto_type sparc_vtentry_howto =
+ HOWTO (R_SPARC_GNU_VTENTRY, 0,2,0,FALSE,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_SPARC_GNU_VTENTRY", FALSE,0,0, FALSE);
+static reloc_howto_type sparc_rev32_howto =
+ HOWTO(R_SPARC_REV32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", FALSE,0,0xffffffff,TRUE);
+
+struct elf_reloc_map {
+ bfd_reloc_code_real_type bfd_reloc_val;
+ unsigned char elf_reloc_val;
+};
+
+static const struct elf_reloc_map sparc_reloc_map[] =
+{
+ { BFD_RELOC_NONE, R_SPARC_NONE, },
+ { BFD_RELOC_16, R_SPARC_16, },
+ { BFD_RELOC_16_PCREL, R_SPARC_DISP16 },
+ { BFD_RELOC_8, R_SPARC_8 },
+ { BFD_RELOC_8_PCREL, R_SPARC_DISP8 },
+ { BFD_RELOC_CTOR, R_SPARC_64 },
+ { BFD_RELOC_32, R_SPARC_32 },
+ { BFD_RELOC_32_PCREL, R_SPARC_DISP32 },
+ { BFD_RELOC_HI22, R_SPARC_HI22 },
+ { BFD_RELOC_LO10, R_SPARC_LO10, },
+ { BFD_RELOC_32_PCREL_S2, R_SPARC_WDISP30 },
+ { BFD_RELOC_64_PCREL, R_SPARC_DISP64 },
+ { BFD_RELOC_SPARC22, R_SPARC_22 },
+ { BFD_RELOC_SPARC13, R_SPARC_13 },
+ { BFD_RELOC_SPARC_GOT10, R_SPARC_GOT10 },
+ { BFD_RELOC_SPARC_GOT13, R_SPARC_GOT13 },
+ { BFD_RELOC_SPARC_GOT22, R_SPARC_GOT22 },
+ { BFD_RELOC_SPARC_PC10, R_SPARC_PC10 },
+ { BFD_RELOC_SPARC_PC22, R_SPARC_PC22 },
+ { BFD_RELOC_SPARC_WPLT30, R_SPARC_WPLT30 },
+ { BFD_RELOC_SPARC_COPY, R_SPARC_COPY },
+ { BFD_RELOC_SPARC_GLOB_DAT, R_SPARC_GLOB_DAT },
+ { BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT },
+ { BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE },
+ { BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 },
+ { BFD_RELOC_SPARC_UA16, R_SPARC_UA16 },
+ { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 },
+ { BFD_RELOC_SPARC_UA64, R_SPARC_UA64 },
+ { BFD_RELOC_SPARC_10, R_SPARC_10 },
+ { BFD_RELOC_SPARC_11, R_SPARC_11 },
+ { BFD_RELOC_SPARC_64, R_SPARC_64 },
+ { BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10 },
+ { BFD_RELOC_SPARC_HH22, R_SPARC_HH22 },
+ { BFD_RELOC_SPARC_HM10, R_SPARC_HM10 },
+ { BFD_RELOC_SPARC_LM22, R_SPARC_LM22 },
+ { BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22 },
+ { BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10 },
+ { BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22 },
+ { BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16 },
+ { BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19 },
+ { BFD_RELOC_SPARC_7, R_SPARC_7 },
+ { BFD_RELOC_SPARC_5, R_SPARC_5 },
+ { BFD_RELOC_SPARC_6, R_SPARC_6 },
+ { BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64 },
+ { BFD_RELOC_SPARC_TLS_GD_HI22, R_SPARC_TLS_GD_HI22 },
+ { BFD_RELOC_SPARC_TLS_GD_LO10, R_SPARC_TLS_GD_LO10 },
+ { BFD_RELOC_SPARC_TLS_GD_ADD, R_SPARC_TLS_GD_ADD },
+ { BFD_RELOC_SPARC_TLS_GD_CALL, R_SPARC_TLS_GD_CALL },
+ { BFD_RELOC_SPARC_TLS_LDM_HI22, R_SPARC_TLS_LDM_HI22 },
+ { BFD_RELOC_SPARC_TLS_LDM_LO10, R_SPARC_TLS_LDM_LO10 },
+ { BFD_RELOC_SPARC_TLS_LDM_ADD, R_SPARC_TLS_LDM_ADD },
+ { BFD_RELOC_SPARC_TLS_LDM_CALL, R_SPARC_TLS_LDM_CALL },
+ { BFD_RELOC_SPARC_TLS_LDO_HIX22, R_SPARC_TLS_LDO_HIX22 },
+ { BFD_RELOC_SPARC_TLS_LDO_LOX10, R_SPARC_TLS_LDO_LOX10 },
+ { BFD_RELOC_SPARC_TLS_LDO_ADD, R_SPARC_TLS_LDO_ADD },
+ { BFD_RELOC_SPARC_TLS_IE_HI22, R_SPARC_TLS_IE_HI22 },
+ { BFD_RELOC_SPARC_TLS_IE_LO10, R_SPARC_TLS_IE_LO10 },
+ { BFD_RELOC_SPARC_TLS_IE_LD, R_SPARC_TLS_IE_LD },
+ { BFD_RELOC_SPARC_TLS_IE_LDX, R_SPARC_TLS_IE_LDX },
+ { BFD_RELOC_SPARC_TLS_IE_ADD, R_SPARC_TLS_IE_ADD },
+ { BFD_RELOC_SPARC_TLS_LE_HIX22, R_SPARC_TLS_LE_HIX22 },
+ { BFD_RELOC_SPARC_TLS_LE_LOX10, R_SPARC_TLS_LE_LOX10 },
+ { BFD_RELOC_SPARC_TLS_DTPMOD32, R_SPARC_TLS_DTPMOD32 },
+ { BFD_RELOC_SPARC_TLS_DTPMOD64, R_SPARC_TLS_DTPMOD64 },
+ { BFD_RELOC_SPARC_TLS_DTPOFF32, R_SPARC_TLS_DTPOFF32 },
+ { BFD_RELOC_SPARC_TLS_DTPOFF64, R_SPARC_TLS_DTPOFF64 },
+ { BFD_RELOC_SPARC_TLS_TPOFF32, R_SPARC_TLS_TPOFF32 },
+ { BFD_RELOC_SPARC_TLS_TPOFF64, R_SPARC_TLS_TPOFF64 },
+ { BFD_RELOC_SPARC_PLT32, R_SPARC_PLT32 },
+ { BFD_RELOC_SPARC_PLT64, R_SPARC_PLT64 },
+ { BFD_RELOC_SPARC_HIX22, R_SPARC_HIX22 },
+ { BFD_RELOC_SPARC_LOX10, R_SPARC_LOX10 },
+ { BFD_RELOC_SPARC_H44, R_SPARC_H44 },
+ { BFD_RELOC_SPARC_M44, R_SPARC_M44 },
+ { BFD_RELOC_SPARC_L44, R_SPARC_L44 },
+ { BFD_RELOC_SPARC_REGISTER, R_SPARC_REGISTER },
+ { BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT },
+ { BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY },
+ { BFD_RELOC_SPARC_REV32, R_SPARC_REV32 },
+};
+
+reloc_howto_type *
+_bfd_sparc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
+{
+ unsigned int i;
+
+ switch (code)
+ {
+ case BFD_RELOC_VTABLE_INHERIT:
+ return &sparc_vtinherit_howto;
+
+ case BFD_RELOC_VTABLE_ENTRY:
+ return &sparc_vtentry_howto;
+
+ case BFD_RELOC_SPARC_REV32:
+ return &sparc_rev32_howto;
+
+ default:
+ for (i = 0;
+ i < sizeof (sparc_reloc_map) / sizeof (struct elf_reloc_map);
+ i++)
+ {
+ if (sparc_reloc_map[i].bfd_reloc_val == code)
+ return (_bfd_sparc_elf_howto_table
+ + (int) sparc_reloc_map[i].elf_reloc_val);
+ }
+ }
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
+}
+
+reloc_howto_type *
+_bfd_sparc_elf_info_to_howto_ptr (unsigned int r_type)
+{
+ switch (r_type)
+ {
+ case R_SPARC_GNU_VTINHERIT:
+ return &sparc_vtinherit_howto;
+
+ case R_SPARC_GNU_VTENTRY:
+ return &sparc_vtentry_howto;
+
+ case R_SPARC_REV32:
+ return &sparc_rev32_howto;
+
+ default:
+ if (r_type >= (unsigned int) R_SPARC_max_std)
+ {
+ (*_bfd_error_handler) (_("invalid relocation type %d"),
+ (int) r_type);
+ r_type = R_SPARC_NONE;
+ }
+ return &_bfd_sparc_elf_howto_table[r_type];
+ }
+}
+
+/* Both 32-bit and 64-bit sparc encode this in an identical manner,
+ so just take advantage of that. */
+#define SPARC_ELF_R_TYPE(r_info) \
+ ((r_info) & 0xff)
+
+void
+_bfd_sparc_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
+{
+ unsigned int r_type = SPARC_ELF_R_TYPE (dst->r_info);
+
+ cache_ptr->howto = _bfd_sparc_elf_info_to_howto_ptr (r_type);
+}
+
+
+/* The nop opcode we use. */
+#define SPARC_NOP 0x01000000
+
+#define SPARC_INSN_BYTES 4
+
+/* The SPARC linker needs to keep track of the number of relocs that it
+ decides to copy as dynamic relocs in check_relocs for each symbol.
+ This is so that it can later discard them if they are found to be
+ unnecessary. We store the information in a field extending the
+ regular ELF linker hash table. */
+
+struct _bfd_sparc_elf_dyn_relocs
+{
+ struct _bfd_sparc_elf_dyn_relocs *next;
+
+ /* The input section of the reloc. */
+ asection *sec;
+
+ /* Total number of relocs copied for the input section. */
+ bfd_size_type count;
+
+ /* Number of pc-relative relocs copied for the input section. */
+ bfd_size_type pc_count;
+};
+
+/* SPARC ELF linker hash entry. */
+
+struct _bfd_sparc_elf_link_hash_entry
+{
+ struct elf_link_hash_entry elf;
+
+ /* Track dynamic relocs copied for this symbol. */
+ struct _bfd_sparc_elf_dyn_relocs *dyn_relocs;
+
+#define GOT_UNKNOWN 0
+#define GOT_NORMAL 1
+#define GOT_TLS_GD 2
+#define GOT_TLS_IE 3
+ unsigned char tls_type;
+};
+
+#define _bfd_sparc_elf_hash_entry(ent) ((struct _bfd_sparc_elf_link_hash_entry *)(ent))
+
+struct _bfd_sparc_elf_obj_tdata
+{
+ struct elf_obj_tdata root;
+
+ /* tls_type for each local got entry. */
+ char *local_got_tls_type;
+
+ /* TRUE if TLS GD relocs has been seen for this object. */
+ bfd_boolean has_tlsgd;
+};
+
+#define _bfd_sparc_elf_tdata(abfd) \
+ ((struct _bfd_sparc_elf_obj_tdata *) (abfd)->tdata.any)
+
+#define _bfd_sparc_elf_local_got_tls_type(abfd) \
+ (_bfd_sparc_elf_tdata (abfd)->local_got_tls_type)
+
+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;
+}
+
+static void
+sparc_put_word_32 (bfd *bfd, bfd_vma val, void *ptr)
+{
+ bfd_put_32 (bfd, val, ptr);
+}
+
+static void
+sparc_put_word_64 (bfd *bfd, bfd_vma val, void *ptr)
+{
+ bfd_put_64 (bfd, val, ptr);
+}
+
+static void
+sparc_elf_append_rela_64 (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *s ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel ATTRIBUTE_UNUSED)
+{
+#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;
+
+ loc32 = (Elf32_External_Rela *) s->contents;
+ loc32 += s->reloc_count++;
+ bfd_elf32_swap_reloca_out (abfd, rel, (bfd_byte *) loc32);
+}
+
+static bfd_vma
+sparc_elf_r_info_64 (Elf_Internal_Rela *in_rel ATTRIBUTE_UNUSED,
+ bfd_vma index ATTRIBUTE_UNUSED,
+ bfd_vma type ATTRIBUTE_UNUSED)
+{
+ return ELF64_R_INFO (index,
+ (in_rel ?
+ ELF64_R_TYPE_INFO (ELF64_R_TYPE_DATA (in_rel->r_info),
+ type) : type));
+}
+
+static bfd_vma
+sparc_elf_r_info_32 (Elf_Internal_Rela *in_rel ATTRIBUTE_UNUSED,
+ bfd_vma index, bfd_vma type)
+{
+ return ELF32_R_INFO (index, type);
+}
+
+static bfd_vma
+sparc_elf_r_symndx_64 (bfd_vma r_info)
+{
+ bfd_vma r_symndx = ELF32_R_SYM (r_info);
+ return (r_symndx >> 24);
+}
+
+static bfd_vma
+sparc_elf_r_symndx_32 (bfd_vma r_info)
+{
+ return ELF32_R_SYM (r_info);
+}
+
+/* PLT/GOT stuff */
+
+#define PLT32_ENTRY_SIZE 12
+#define PLT32_HEADER_SIZE (4 * PLT32_ENTRY_SIZE)
+
+/* The first four entries in a 32-bit procedure linkage table are reserved,
+ and the initial contents are unimportant (we zero them out).
+ Subsequent entries look like this. See the SVR4 ABI SPARC
+ supplement to see how this works. */
+
+/* sethi %hi(.-.plt0),%g1. We fill in the address later. */
+#define PLT32_ENTRY_WORD0 0x03000000
+/* b,a .plt0. We fill in the offset later. */
+#define PLT32_ENTRY_WORD1 0x30800000
+/* nop. */
+#define PLT32_ENTRY_WORD2 SPARC_NOP
+
+static int
+sparc32_plt_entry_build (bfd *output_bfd, asection *splt, bfd_vma offset,
+ bfd_vma max ATTRIBUTE_UNUSED,
+ bfd_vma *r_offset)
+{
+ bfd_put_32 (output_bfd,
+ PLT32_ENTRY_WORD0 + offset,
+ splt->contents + offset);
+ bfd_put_32 (output_bfd,
+ (PLT32_ENTRY_WORD1
+ + (((- (offset + 4)) >> 2) & 0x3fffff)),
+ splt->contents + offset + 4);
+ bfd_put_32 (output_bfd, (bfd_vma) PLT32_ENTRY_WORD2,
+ splt->contents + offset + 8);
+
+ *r_offset = offset;
+
+ return offset / PLT32_ENTRY_SIZE - 4;
+}
+
+/* Both the headers and the entries are icache aligned. */
+#define PLT64_ENTRY_SIZE 32
+#define PLT64_HEADER_SIZE (4 * PLT64_ENTRY_SIZE)
+#define PLT64_LARGE_THRESHOLD 32768
+
+static int
+sparc64_plt_entry_build (bfd *output_bfd, asection *splt, bfd_vma offset,
+ bfd_vma max, bfd_vma *r_offset)
+{
+ unsigned char *entry = splt->contents + offset;
+ const unsigned int nop = SPARC_NOP;
+ int index;
+
+ if (offset < (PLT64_LARGE_THRESHOLD * PLT64_ENTRY_SIZE))
+ {
+ unsigned int sethi, ba;
+
+ *r_offset = offset;
+
+ index = (offset / PLT64_ENTRY_SIZE);
+
+ sethi = 0x03000000 | (index * PLT64_ENTRY_SIZE);
+ ba = 0x30680000
+ | (((splt->contents + PLT64_ENTRY_SIZE) - (entry + 4)) / 4 & 0x7ffff);
+
+ bfd_put_32 (output_bfd, (bfd_vma) sethi, entry);
+ bfd_put_32 (output_bfd, (bfd_vma) ba, entry + 4);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 8);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 12);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 16);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 20);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 24);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 28);
+ }
+ else
+ {
+ unsigned char *ptr;
+ unsigned int ldx;
+ int block, last_block, ofs, last_ofs, chunks_this_block;
+ const int insn_chunk_size = (6 * 4);
+ const int ptr_chunk_size = (1 * 8);
+ const int entries_per_block = 160;
+ const int block_size = entries_per_block * (insn_chunk_size
+ + ptr_chunk_size);
+
+ /* Entries 32768 and higher are grouped into blocks of 160.
+ The blocks are further subdivided into 160 sequences of
+ 6 instructions and 160 pointers. If a block does not require
+ the full 160 entries, let's say it requires N, then there
+ will be N sequences of 6 instructions and N pointers. */
+
+ offset -= (PLT64_LARGE_THRESHOLD * PLT64_ENTRY_SIZE);
+ max -= (PLT64_LARGE_THRESHOLD * PLT64_ENTRY_SIZE);
+
+ block = offset / block_size;
+ last_block = max / block_size;
+ if (block != last_block)
+ {
+ chunks_this_block = 160;
+ }
+ else
+ {
+ last_ofs = max % block_size;
+ chunks_this_block = last_ofs / (insn_chunk_size + ptr_chunk_size);
+ }
+
+ ofs = offset % block_size;
+
+ index = (PLT64_LARGE_THRESHOLD +
+ (block * 160) +
+ (ofs / insn_chunk_size));
+
+ ptr = splt->contents
+ + (PLT64_LARGE_THRESHOLD * PLT64_ENTRY_SIZE)
+ + (block * block_size)
+ + (chunks_this_block * insn_chunk_size)
+ + (ofs / insn_chunk_size) * ptr_chunk_size;
+
+ *r_offset = (bfd_vma) (ptr - splt->contents);
+
+ ldx = 0xc25be000 | ((ptr - (entry+4)) & 0x1fff);
+
+ /* mov %o7,%g5
+ call .+8
+ nop
+ ldx [%o7+P],%g1
+ jmpl %o7+%g1,%g1
+ mov %g5,%o7 */
+ bfd_put_32 (output_bfd, (bfd_vma) 0x8a10000f, entry);
+ bfd_put_32 (output_bfd, (bfd_vma) 0x40000002, entry + 4);
+ bfd_put_32 (output_bfd, (bfd_vma) SPARC_NOP, entry + 8);
+ bfd_put_32 (output_bfd, (bfd_vma) ldx, entry + 12);
+ bfd_put_32 (output_bfd, (bfd_vma) 0x83c3c001, entry + 16);
+ bfd_put_32 (output_bfd, (bfd_vma) 0x9e100005, entry + 20);
+
+ bfd_put_64 (output_bfd, (bfd_vma) (splt->contents - (entry + 4)), ptr);
+ }
+
+ return index - 4;
+}
+
+/* The format of the first PLT entry in a VxWorks executable. */
+static const bfd_vma sparc_vxworks_exec_plt0_entry[] =
+ {
+ 0x05000000, /* sethi %hi(_GLOBAL_OFFSET_TABLE_+8), %g2 */
+ 0x8410a000, /* or %g2, %lo(_GLOBAL_OFFSET_TABLE_+8), %g2 */
+ 0xc4008000, /* ld [ %g2 ], %g2 */
+ 0x81c08000, /* jmp %g2 */
+ 0x01000000 /* nop */
+ };
+
+/* The format of subsequent PLT entries. */
+static const bfd_vma sparc_vxworks_exec_plt_entry[] =
+ {
+ 0x03000000, /* sethi %hi(_GLOBAL_OFFSET_TABLE_+f@got), %g1 */
+ 0x82106000, /* or %g1, %lo(_GLOBAL_OFFSET_TABLE_+f@got), %g1 */
+ 0xc2004000, /* ld [ %g1 ], %g1 */
+ 0x81c04000, /* jmp %g1 */
+ 0x01000000, /* nop */
+ 0x03000000, /* sethi %hi(f@pltindex), %g1 */
+ 0x10800000, /* b _PLT_resolve */
+ 0x82106000 /* or %g1, %lo(f@pltindex), %g1 */
+ };
+
+/* The format of the first PLT entry in a VxWorks shared object. */
+static const bfd_vma sparc_vxworks_shared_plt0_entry[] =
+ {
+ 0xc405e008, /* ld [ %l7 + 8 ], %g2 */
+ 0x81c08000, /* jmp %g2 */
+ 0x01000000 /* nop */
+ };
+
+/* The format of subsequent PLT entries. */
+static const bfd_vma sparc_vxworks_shared_plt_entry[] =
+ {
+ 0x03000000, /* sethi %hi(f@got), %g1 */
+ 0x82106000, /* or %g1, %lo(f@got), %g1 */
+ 0xc205c001, /* ld [ %l7 + %g1 ], %g1 */
+ 0x81c04000, /* jmp %g1 */
+ 0x01000000, /* nop */
+ 0x03000000, /* sethi %hi(f@pltindex), %g1 */
+ 0x10800000, /* b _PLT_resolve */
+ 0x82106000 /* or %g1, %lo(f@pltindex), %g1 */
+ };
+
+#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)
+
+#define SPARC_ELF_R_SYMNDX(htab, r_info) \
+ htab->r_symndx(r_info)
+
+#define SPARC_ELF_WORD_BYTES(htab) \
+ htab->bytes_per_word
+
+#define SPARC_ELF_RELA_BYTES(htab) \
+ htab->bytes_per_rela
+
+#define SPARC_ELF_DTPOFF_RELOC(htab) \
+ htab->dtpoff_reloc
+
+#define SPARC_ELF_DTPMOD_RELOC(htab) \
+ htab->dtpmod_reloc
+
+#define SPARC_ELF_TPOFF_RELOC(htab) \
+ htab->tpoff_reloc
+
+#define SPARC_ELF_BUILD_PLT_ENTRY(htab, obfd, splt, off, max, r_off) \
+ htab->build_plt_entry (obfd, splt, off, max, r_off)
+
+/* Create an entry in an SPARC ELF linker hash table. */
+
+static struct bfd_hash_entry *
+link_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 _bfd_sparc_elf_link_hash_entry));
+ if (entry == NULL)
+ return entry;
+ }
+
+ /* Call the allocation method of the superclass. */
+ entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+ if (entry != NULL)
+ {
+ struct _bfd_sparc_elf_link_hash_entry *eh;
+
+ eh = (struct _bfd_sparc_elf_link_hash_entry *) entry;
+ eh->dyn_relocs = NULL;
+ eh->tls_type = GOT_UNKNOWN;
+ }
+
+ return entry;
+}
+
+/* The name of the dynamic interpreter. This is put in the .interp
+ section. */
+
+#define ELF32_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF64_DYNAMIC_INTERPRETER "/usr/lib/sparcv9/ld.so.1"
+
+/* Create a SPARC ELF linker hash table. */
+
+struct bfd_link_hash_table *
+_bfd_sparc_elf_link_hash_table_create (bfd *abfd)
+{
+ struct _bfd_sparc_elf_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct _bfd_sparc_elf_link_hash_table);
+
+ ret = (struct _bfd_sparc_elf_link_hash_table *) bfd_zmalloc (amt);
+ if (ret == NULL)
+ return NULL;
+
+ 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;
+ ret->dtpmod_reloc = R_SPARC_TLS_DTPMOD64;
+ ret->tpoff_reloc = R_SPARC_TLS_TPOFF64;
+ ret->word_align_power = 3;
+ ret->align_power_max = 4;
+ ret->bytes_per_word = 8;
+ ret->bytes_per_rela = sizeof (Elf64_External_Rela);
+ ret->dynamic_interpreter = ELF64_DYNAMIC_INTERPRETER;
+ ret->dynamic_interpreter_size = sizeof ELF64_DYNAMIC_INTERPRETER;
+ }
+ 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;
+ ret->dtpmod_reloc = R_SPARC_TLS_DTPMOD32;
+ ret->tpoff_reloc = R_SPARC_TLS_TPOFF32;
+ ret->word_align_power = 2;
+ ret->align_power_max = 3;
+ ret->bytes_per_word = 4;
+ ret->bytes_per_rela = sizeof (Elf32_External_Rela);
+ ret->dynamic_interpreter = ELF32_DYNAMIC_INTERPRETER;
+ ret->dynamic_interpreter_size = sizeof ELF32_DYNAMIC_INTERPRETER;
+ }
+
+ if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
+ sizeof (struct _bfd_sparc_elf_link_hash_entry)))
+ {
+ free (ret);
+ return NULL;
+ }
+
+ return &ret->elf.root;
+}
+
+/* Create .got and .rela.got sections in DYNOBJ, and set up
+ shortcuts to them in our hash table. */
+
+static bfd_boolean
+create_got_section (bfd *dynobj, struct bfd_link_info *info)
+{
+ struct _bfd_sparc_elf_link_hash_table *htab;
+
+ if (! _bfd_elf_create_got_section (dynobj, info))
+ return FALSE;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ htab->sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (htab->sgot != NULL);
+
+ htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got",
+ SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY);
+ if (htab->srelgot == NULL
+ || ! bfd_set_section_alignment (dynobj, htab->srelgot,
+ htab->word_align_power))
+ return FALSE;
+
+ if (htab->is_vxworks)
+ {
+ htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
+ if (!htab->sgotplt)
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/* Create .plt, .rela.plt, .got, .rela.got, .dynbss, and
+ .rela.bss sections in DYNOBJ, and set up shortcuts to them in our
+ hash table. */
+
+bfd_boolean
+_bfd_sparc_elf_create_dynamic_sections (bfd *dynobj,
+ struct bfd_link_info *info)
+{
+ struct _bfd_sparc_elf_link_hash_table *htab;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ if (!htab->sgot && !create_got_section (dynobj, info))
+ return FALSE;
+
+ if (!_bfd_elf_create_dynamic_sections (dynobj, info))
+ return FALSE;
+
+ htab->splt = bfd_get_section_by_name (dynobj, ".plt");
+ htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt");
+ htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+ if (!info->shared)
+ htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
+
+ if (htab->is_vxworks)
+ {
+ if (!elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2))
+ return FALSE;
+ if (info->shared)
+ {
+ htab->plt_header_size
+ = 4 * ARRAY_SIZE (sparc_vxworks_shared_plt0_entry);
+ htab->plt_entry_size
+ = 4 * ARRAY_SIZE (sparc_vxworks_shared_plt_entry);
+ }
+ else
+ {
+ htab->plt_header_size
+ = 4 * ARRAY_SIZE (sparc_vxworks_exec_plt0_entry);
+ htab->plt_entry_size
+ = 4 * ARRAY_SIZE (sparc_vxworks_exec_plt_entry);
+ }
+ }
+ else
+ {
+ if (ABI_64_P (dynobj))
+ {
+ htab->build_plt_entry = sparc64_plt_entry_build;
+ htab->plt_header_size = PLT64_HEADER_SIZE;
+ htab->plt_entry_size = PLT64_ENTRY_SIZE;
+ }
+ else
+ {
+ htab->build_plt_entry = sparc32_plt_entry_build;
+ htab->plt_header_size = PLT32_HEADER_SIZE;
+ htab->plt_entry_size = PLT32_ENTRY_SIZE;
+ }
+ }
+
+ if (!htab->splt || !htab->srelplt || !htab->sdynbss
+ || (!info->shared && !htab->srelbss))
+ abort ();
+
+ return TRUE;
+}
+
+/* Copy the extra info we tack onto an elf_link_hash_entry. */
+
+void
+_bfd_sparc_elf_copy_indirect_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
+{
+ struct _bfd_sparc_elf_link_hash_entry *edir, *eind;
+
+ edir = (struct _bfd_sparc_elf_link_hash_entry *) dir;
+ eind = (struct _bfd_sparc_elf_link_hash_entry *) ind;
+
+ if (eind->dyn_relocs != NULL)
+ {
+ if (edir->dyn_relocs != NULL)
+ {
+ struct _bfd_sparc_elf_dyn_relocs **pp;
+ struct _bfd_sparc_elf_dyn_relocs *p;
+
+ /* Add reloc counts against the indirect sym to the direct sym
+ list. Merge any entries against the same section. */
+ for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
+ {
+ struct _bfd_sparc_elf_dyn_relocs *q;
+
+ for (q = edir->dyn_relocs; q != NULL; q = q->next)
+ if (q->sec == p->sec)
+ {
+ q->pc_count += p->pc_count;
+ q->count += p->count;
+ *pp = p->next;
+ break;
+ }
+ if (q == NULL)
+ pp = &p->next;
+ }
+ *pp = edir->dyn_relocs;
+ }
+
+ edir->dyn_relocs = eind->dyn_relocs;
+ eind->dyn_relocs = NULL;
+ }
+
+ if (ind->root.type == bfd_link_hash_indirect
+ && dir->got.refcount <= 0)
+ {
+ edir->tls_type = eind->tls_type;
+ eind->tls_type = GOT_UNKNOWN;
+ }
+ _bfd_elf_link_hash_copy_indirect (info, dir, ind);
+}
+
+static int
+sparc_elf_tls_transition (struct bfd_link_info *info, bfd *abfd,
+ int r_type, int is_local)
+{
+ if (! ABI_64_P (abfd)
+ && r_type == R_SPARC_TLS_GD_HI22
+ && ! _bfd_sparc_elf_tdata (abfd)->has_tlsgd)
+ r_type = R_SPARC_REV32;
+
+ if (info->shared)
+ return r_type;
+
+ switch (r_type)
+ {
+ case R_SPARC_TLS_GD_HI22:
+ if (is_local)
+ return R_SPARC_TLS_LE_HIX22;
+ return R_SPARC_TLS_IE_HI22;
+ case R_SPARC_TLS_GD_LO10:
+ if (is_local)
+ return R_SPARC_TLS_LE_LOX10;
+ return R_SPARC_TLS_IE_LO10;
+ case R_SPARC_TLS_IE_HI22:
+ if (is_local)
+ return R_SPARC_TLS_LE_HIX22;
+ return r_type;
+ case R_SPARC_TLS_IE_LO10:
+ if (is_local)
+ return R_SPARC_TLS_LE_LOX10;
+ return r_type;
+ case R_SPARC_TLS_LDM_HI22:
+ return R_SPARC_TLS_LE_HIX22;
+ case R_SPARC_TLS_LDM_LO10:
+ return R_SPARC_TLS_LE_LOX10;
+ }
+
+ return r_type;
+}
+
+/* Look through the relocs for a section during the first phase, and
+ allocate space in the global offset table or procedure linkage
+ table. */
+
+bfd_boolean
+_bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs)
+{
+ struct _bfd_sparc_elf_link_hash_table *htab;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ bfd_vma *local_got_offsets;
+ const Elf_Internal_Rela *rel;
+ const Elf_Internal_Rela *rel_end;
+ asection *sreloc;
+ int num_relocs;
+ bfd_boolean checked_tlsgd = FALSE;
+
+ if (info->relocatable)
+ return TRUE;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_offsets = elf_local_got_offsets (abfd);
+
+ sreloc = NULL;
+
+ if (ABI_64_P (abfd))
+ num_relocs = NUM_SHDR_ENTRIES (& elf_section_data (sec)->rel_hdr);
+ else
+ num_relocs = sec->reloc_count;
+ rel_end = relocs + num_relocs;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ unsigned int r_type;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+
+ r_symndx = SPARC_ELF_R_SYMNDX (htab, rel->r_info);
+ r_type = SPARC_ELF_R_TYPE (rel->r_info);
+
+ if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
+ {
+ (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
+ abfd, r_symndx);
+ return FALSE;
+ }
+
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ }
+
+ /* Compatibility with old R_SPARC_REV32 reloc conflicting
+ with R_SPARC_TLS_GD_HI22. */
+ if (! ABI_64_P (abfd) && ! checked_tlsgd)
+ switch (r_type)
+ {
+ case R_SPARC_TLS_GD_HI22:
+ {
+ const Elf_Internal_Rela *relt;
+
+ for (relt = rel + 1; relt < rel_end; relt++)
+ if (ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_LO10
+ || ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_ADD
+ || ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_CALL)
+ break;
+ checked_tlsgd = TRUE;
+ _bfd_sparc_elf_tdata (abfd)->has_tlsgd = relt < rel_end;
+ }
+ break;
+ case R_SPARC_TLS_GD_LO10:
+ case R_SPARC_TLS_GD_ADD:
+ case R_SPARC_TLS_GD_CALL:
+ checked_tlsgd = TRUE;
+ _bfd_sparc_elf_tdata (abfd)->has_tlsgd = TRUE;
+ break;
+ }
+
+ r_type = sparc_elf_tls_transition (info, abfd, r_type, h == NULL);
+ switch (r_type)
+ {
+ case R_SPARC_TLS_LDM_HI22:
+ case R_SPARC_TLS_LDM_LO10:
+ htab->tls_ldm_got.refcount += 1;
+ break;
+
+ case R_SPARC_TLS_LE_HIX22:
+ case R_SPARC_TLS_LE_LOX10:
+ if (info->shared)
+ goto r_sparc_plt32;
+ break;
+
+ case R_SPARC_TLS_IE_HI22:
+ case R_SPARC_TLS_IE_LO10:
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ /* Fall through */
+
+ case R_SPARC_GOT10:
+ case R_SPARC_GOT13:
+ case R_SPARC_GOT22:
+ case R_SPARC_TLS_GD_HI22:
+ case R_SPARC_TLS_GD_LO10:
+ /* This symbol requires a global offset table entry. */
+ {
+ int tls_type, old_tls_type;
+
+ switch (r_type)
+ {
+ default:
+ case R_SPARC_GOT10:
+ case R_SPARC_GOT13:
+ case R_SPARC_GOT22:
+ tls_type = GOT_NORMAL;
+ break;
+ case R_SPARC_TLS_GD_HI22:
+ case R_SPARC_TLS_GD_LO10:
+ tls_type = GOT_TLS_GD;
+ break;
+ case R_SPARC_TLS_IE_HI22:
+ case R_SPARC_TLS_IE_LO10:
+ tls_type = GOT_TLS_IE;
+ break;
+ }
+
+ if (h != NULL)
+ {
+ h->got.refcount += 1;
+ old_tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
+ }
+ else
+ {
+ bfd_signed_vma *local_got_refcounts;
+
+ /* This is a global offset table entry for a local symbol. */
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+ if (local_got_refcounts == NULL)
+ {
+ bfd_size_type size;
+
+ size = symtab_hdr->sh_info;
+ size *= (sizeof (bfd_signed_vma) + sizeof(char));
+ local_got_refcounts = ((bfd_signed_vma *)
+ bfd_zalloc (abfd, size));
+ if (local_got_refcounts == NULL)
+ return FALSE;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
+ _bfd_sparc_elf_local_got_tls_type (abfd)
+ = (char *) (local_got_refcounts + symtab_hdr->sh_info);
+ }
+ local_got_refcounts[r_symndx] += 1;
+ old_tls_type = _bfd_sparc_elf_local_got_tls_type (abfd) [r_symndx];
+ }
+
+ /* If a TLS symbol is accessed using IE at least once,
+ there is no point to use dynamic model for it. */
+ if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN
+ && (old_tls_type != GOT_TLS_GD
+ || tls_type != GOT_TLS_IE))
+ {
+ if (old_tls_type == GOT_TLS_IE && tls_type == GOT_TLS_GD)
+ tls_type = old_tls_type;
+ else
+ {
+ (*_bfd_error_handler)
+ (_("%B: `%s' accessed both as normal and thread local symbol"),
+ abfd, h ? h->root.root.string : "<local>");
+ return FALSE;
+ }
+ }
+
+ if (old_tls_type != tls_type)
+ {
+ if (h != NULL)
+ _bfd_sparc_elf_hash_entry (h)->tls_type = tls_type;
+ else
+ _bfd_sparc_elf_local_got_tls_type (abfd) [r_symndx] = tls_type;
+ }
+ }
+
+ if (htab->sgot == NULL)
+ {
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+ if (!create_got_section (htab->elf.dynobj, info))
+ return FALSE;
+ }
+ break;
+
+ case R_SPARC_TLS_GD_CALL:
+ case R_SPARC_TLS_LDM_CALL:
+ if (info->shared)
+ {
+ /* These are basically R_SPARC_TLS_WPLT30 relocs against
+ __tls_get_addr. */
+ struct bfd_link_hash_entry *bh = NULL;
+ if (! _bfd_generic_link_add_one_symbol (info, abfd,
+ "__tls_get_addr", 0,
+ bfd_und_section_ptr, 0,
+ NULL, FALSE, FALSE,
+ &bh))
+ return FALSE;
+ h = (struct elf_link_hash_entry *) bh;
+ }
+ else
+ break;
+ /* Fall through */
+
+ case R_SPARC_PLT32:
+ case R_SPARC_WPLT30:
+ case R_SPARC_HIPLT22:
+ case R_SPARC_LOPLT10:
+ case R_SPARC_PCPLT32:
+ case R_SPARC_PCPLT22:
+ case R_SPARC_PCPLT10:
+ case R_SPARC_PLT64:
+ /* This symbol requires a procedure linkage table entry. We
+ actually build the entry in adjust_dynamic_symbol,
+ because this might be a case of linking PIC code without
+ linking in any dynamic objects, in which case we don't
+ need to generate a procedure linkage table after all. */
+
+ if (h == NULL)
+ {
+ if (! ABI_64_P (abfd))
+ {
+ /* The Solaris native assembler will generate a WPLT30
+ reloc for a local symbol if you assemble a call from
+ one section to another when using -K pic. We treat
+ it as WDISP30. */
+ if (ELF32_R_TYPE (rel->r_info) == R_SPARC_PLT32)
+ goto r_sparc_plt32;
+ break;
+ }
+
+ /* It does not make sense to have a procedure linkage
+ table entry for a local symbol. */
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ h->needs_plt = 1;
+
+ {
+ int this_r_type;
+
+ this_r_type = SPARC_ELF_R_TYPE (rel->r_info);
+ if (this_r_type == R_SPARC_PLT32
+ || this_r_type == R_SPARC_PLT64)
+ goto r_sparc_plt32;
+ }
+ h->plt.refcount += 1;
+ break;
+
+ case R_SPARC_PC10:
+ case R_SPARC_PC22:
+ case R_SPARC_PC_HH22:
+ case R_SPARC_PC_HM10:
+ case R_SPARC_PC_LM22:
+ if (h != NULL)
+ h->non_got_ref = 1;
+
+ if (h != NULL
+ && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ break;
+ /* Fall through. */
+
+ case R_SPARC_DISP8:
+ case R_SPARC_DISP16:
+ case R_SPARC_DISP32:
+ case R_SPARC_DISP64:
+ case R_SPARC_WDISP30:
+ case R_SPARC_WDISP22:
+ case R_SPARC_WDISP19:
+ case R_SPARC_WDISP16:
+ case R_SPARC_8:
+ case R_SPARC_16:
+ case R_SPARC_32:
+ case R_SPARC_HI22:
+ case R_SPARC_22:
+ case R_SPARC_13:
+ case R_SPARC_LO10:
+ case R_SPARC_UA16:
+ case R_SPARC_UA32:
+ case R_SPARC_10:
+ case R_SPARC_11:
+ case R_SPARC_64:
+ case R_SPARC_OLO10:
+ case R_SPARC_HH22:
+ case R_SPARC_HM10:
+ case R_SPARC_LM22:
+ case R_SPARC_7:
+ case R_SPARC_5:
+ case R_SPARC_6:
+ case R_SPARC_HIX22:
+ case R_SPARC_LOX10:
+ case R_SPARC_H44:
+ case R_SPARC_M44:
+ case R_SPARC_L44:
+ case R_SPARC_UA64:
+ if (h != NULL)
+ h->non_got_ref = 1;
+
+ r_sparc_plt32:
+ if (h != NULL && !info->shared)
+ {
+ /* We may need a .plt entry if the function this reloc
+ refers to is in a shared lib. */
+ h->plt.refcount += 1;
+ }
+
+ /* If we are creating a shared library, and this is a reloc
+ against a global symbol, or a non PC relative reloc
+ against a local symbol, then we need to copy the reloc
+ into the shared library. However, if we are linking with
+ -Bsymbolic, we do not need to copy a reloc against a
+ global symbol which is defined in an object we are
+ including in the link (i.e., DEF_REGULAR is set). At
+ this point we have not seen all the input files, so it is
+ possible that DEF_REGULAR is not set now but will be set
+ later (it is never cleared). In case of a weak definition,
+ DEF_REGULAR may be cleared later by a strong definition in
+ a shared library. We account for that possibility below by
+ storing information in the relocs_copied field of the hash
+ table entry. A similar situation occurs when creating
+ shared libraries and symbol visibility changes render the
+ symbol local.
+
+ If on the other hand, we are creating an executable, we
+ may need to keep relocations for symbols satisfied by a
+ dynamic library if we manage to avoid copy relocs for the
+ symbol. */
+ if ((info->shared
+ && (sec->flags & SEC_ALLOC) != 0
+ && (! _bfd_sparc_elf_howto_table[r_type].pc_relative
+ || (h != NULL
+ && (! info->symbolic
+ || h->root.type == bfd_link_hash_defweak
+ || !h->def_regular))))
+ || (!info->shared
+ && (sec->flags & SEC_ALLOC) != 0
+ && h != NULL
+ && (h->root.type == bfd_link_hash_defweak
+ || !h->def_regular)))
+ {
+ struct _bfd_sparc_elf_dyn_relocs *p;
+ struct _bfd_sparc_elf_dyn_relocs **head;
+
+ /* When creating a shared object, we must copy these
+ relocs into the output file. We create a reloc
+ section in dynobj and make room for the reloc. */
+ if (sreloc == NULL)
+ {
+ const char *name;
+ bfd *dynobj;
+
+ name = (bfd_elf_string_from_elf_section
+ (abfd,
+ elf_elfheader (abfd)->e_shstrndx,
+ elf_section_data (sec)->rel_hdr.sh_name));
+ if (name == NULL)
+ return FALSE;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (abfd, sec),
+ name + 5) == 0);
+
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+ dynobj = htab->elf.dynobj;
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ if (sreloc == NULL)
+ {
+ flagword flags;
+
+ flags = (SEC_HAS_CONTENTS | SEC_READONLY
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ if ((sec->flags & SEC_ALLOC) != 0)
+ flags |= SEC_ALLOC | SEC_LOAD;
+ sreloc = bfd_make_section_with_flags (dynobj,
+ name,
+ flags);
+ if (sreloc == NULL
+ || ! bfd_set_section_alignment (dynobj, sreloc,
+ htab->word_align_power))
+ return FALSE;
+ }
+ elf_section_data (sec)->sreloc = sreloc;
+ }
+
+ /* If this is a global symbol, we count the number of
+ relocations we need for this symbol. */
+ if (h != NULL)
+ head = &((struct _bfd_sparc_elf_link_hash_entry *) h)->dyn_relocs;
+ else
+ {
+ /* Track dynamic relocs needed for local syms too.
+ We really need local syms available to do this
+ easily. Oh well. */
+
+ asection *s;
+ void *vpp;
+
+ s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
+ sec, r_symndx);
+ if (s == NULL)
+ return FALSE;
+
+ vpp = &elf_section_data (s)->local_dynrel;
+ head = (struct _bfd_sparc_elf_dyn_relocs **) vpp;
+ }
+
+ p = *head;
+ if (p == NULL || p->sec != sec)
+ {
+ bfd_size_type amt = sizeof *p;
+ p = ((struct _bfd_sparc_elf_dyn_relocs *)
+ bfd_alloc (htab->elf.dynobj, amt));
+ if (p == NULL)
+ return FALSE;
+ p->next = *head;
+ *head = p;
+ p->sec = sec;
+ p->count = 0;
+ p->pc_count = 0;
+ }
+
+ p->count += 1;
+ if (_bfd_sparc_elf_howto_table[r_type].pc_relative)
+ p->pc_count += 1;
+ }
+
+ break;
+
+ case R_SPARC_GNU_VTINHERIT:
+ if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+ return FALSE;
+ break;
+
+ case R_SPARC_GNU_VTENTRY:
+ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ return FALSE;
+ break;
+
+ case R_SPARC_REGISTER:
+ /* Nothing to do. */
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return TRUE;
+}
+
+asection *
+_bfd_sparc_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)
+ {
+ struct _bfd_sparc_elf_link_hash_table *htab;
+
+ htab = _bfd_sparc_elf_hash_table (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;
+ }
+ }
+ }
+ 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. */
+bfd_boolean
+_bfd_sparc_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs)
+{
+ struct _bfd_sparc_elf_link_hash_table *htab;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ bfd_signed_vma *local_got_refcounts;
+ const Elf_Internal_Rela *rel, *relend;
+
+ elf_section_data (sec)->local_dynrel = NULL;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ {
+ unsigned long r_symndx;
+ unsigned int r_type;
+ struct elf_link_hash_entry *h = NULL;
+
+ r_symndx = SPARC_ELF_R_SYMNDX (htab, rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ struct _bfd_sparc_elf_link_hash_entry *eh;
+ struct _bfd_sparc_elf_dyn_relocs **pp;
+ struct _bfd_sparc_elf_dyn_relocs *p;
+
+ 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;
+ eh = (struct _bfd_sparc_elf_link_hash_entry *) h;
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ if (p->sec == sec)
+ {
+ /* Everything must go for SEC. */
+ *pp = p->next;
+ break;
+ }
+ }
+
+ r_type = SPARC_ELF_R_TYPE (rel->r_info);
+ r_type = sparc_elf_tls_transition (info, abfd, r_type, h != NULL);
+ switch (r_type)
+ {
+ case R_SPARC_TLS_LDM_HI22:
+ case R_SPARC_TLS_LDM_LO10:
+ if (_bfd_sparc_elf_hash_table (info)->tls_ldm_got.refcount > 0)
+ _bfd_sparc_elf_hash_table (info)->tls_ldm_got.refcount -= 1;
+ break;
+
+ case R_SPARC_TLS_GD_HI22:
+ case R_SPARC_TLS_GD_LO10:
+ case R_SPARC_TLS_IE_HI22:
+ case R_SPARC_TLS_IE_LO10:
+ case R_SPARC_GOT10:
+ case R_SPARC_GOT13:
+ case R_SPARC_GOT22:
+ if (h != NULL)
+ {
+ if (h->got.refcount > 0)
+ h->got.refcount--;
+ }
+ else
+ {
+ if (local_got_refcounts[r_symndx] > 0)
+ local_got_refcounts[r_symndx]--;
+ }
+ break;
+
+ case R_SPARC_PC10:
+ case R_SPARC_PC22:
+ case R_SPARC_PC_HH22:
+ case R_SPARC_PC_HM10:
+ case R_SPARC_PC_LM22:
+ if (h != NULL
+ && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ break;
+ /* Fall through. */
+
+ case R_SPARC_DISP8:
+ case R_SPARC_DISP16:
+ case R_SPARC_DISP32:
+ case R_SPARC_DISP64:
+ case R_SPARC_WDISP30:
+ case R_SPARC_WDISP22:
+ case R_SPARC_WDISP19:
+ case R_SPARC_WDISP16:
+ case R_SPARC_8:
+ case R_SPARC_16:
+ case R_SPARC_32:
+ case R_SPARC_HI22:
+ case R_SPARC_22:
+ case R_SPARC_13:
+ case R_SPARC_LO10:
+ case R_SPARC_UA16:
+ case R_SPARC_UA32:
+ case R_SPARC_PLT32:
+ case R_SPARC_10:
+ case R_SPARC_11:
+ case R_SPARC_64:
+ case R_SPARC_OLO10:
+ case R_SPARC_HH22:
+ case R_SPARC_HM10:
+ case R_SPARC_LM22:
+ case R_SPARC_7:
+ case R_SPARC_5:
+ case R_SPARC_6:
+ case R_SPARC_HIX22:
+ case R_SPARC_LOX10:
+ case R_SPARC_H44:
+ case R_SPARC_M44:
+ case R_SPARC_L44:
+ case R_SPARC_UA64:
+ if (info->shared)
+ break;
+ /* Fall through. */
+
+ case R_SPARC_WPLT30:
+ if (h != NULL)
+ {
+ if (h->plt.refcount > 0)
+ h->plt.refcount--;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return TRUE;
+}
+
+/* Adjust a symbol defined by a dynamic object and referenced by a
+ regular object. The current definition is in some section of the
+ dynamic object, but we're not including those sections. We have to
+ change the definition to something the rest of the link can
+ understand. */
+
+bfd_boolean
+_bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
+{
+ struct _bfd_sparc_elf_link_hash_table *htab;
+ 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);
+
+ /* Make sure we know what is going on here. */
+ BFD_ASSERT (htab->elf.dynobj != NULL
+ && (h->needs_plt
+ || h->u.weakdef != NULL
+ || (h->def_dynamic
+ && h->ref_regular
+ && !h->def_regular)));
+
+ /* If this is a function, put it in the procedure linkage table. We
+ will fill in the contents of the procedure linkage table later
+ (although we could actually do it here). The STT_NOTYPE
+ condition is a hack specifically for the Oracle libraries
+ delivered for Solaris; for some inexplicable reason, they define
+ some of their functions as STT_NOTYPE when they really should be
+ STT_FUNC. */
+ if (h->type == STT_FUNC
+ || h->needs_plt
+ || (h->type == STT_NOTYPE
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && (h->root.u.def.section->flags & SEC_CODE) != 0))
+ {
+ if (h->plt.refcount <= 0
+ || (! info->shared
+ && !h->def_dynamic
+ && !h->ref_dynamic
+ && h->root.type != bfd_link_hash_undefweak
+ && h->root.type != bfd_link_hash_undefined))
+ {
+ /* This case can occur if we saw a WPLT30 reloc in an input
+ file, but the symbol was never referred to by a dynamic
+ object, or if all references were garbage collected. In
+ such a case, we don't actually need to build a procedure
+ linkage table, and we can just do a WDISP30 reloc instead. */
+ h->plt.offset = (bfd_vma) -1;
+ h->needs_plt = 0;
+ }
+
+ return TRUE;
+ }
+ else
+ h->plt.offset = (bfd_vma) -1;
+
+ /* If this is a weak symbol, and there is a real definition, the
+ processor independent code will have arranged for us to see the
+ real definition first, and we can just use the same value. */
+ if (h->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. */
+
+ /* If we are creating a shared library, we must presume that the
+ only references to the symbol are via the global offset table.
+ For such cases we need not do anything here; the relocations will
+ be handled correctly by relocate_section. */
+ if (info->shared)
+ return TRUE;
+
+ /* If there are no references to this symbol that do not use the
+ GOT, we don't need to generate a copy reloc. */
+ if (!h->non_got_ref)
+ return TRUE;
+
+ eh = (struct _bfd_sparc_elf_link_hash_entry *) h;
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ s = p->sec->output_section;
+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
+ break;
+ }
+
+ /* If we didn't find any dynamic relocs in read-only sections, then
+ we'll be keeping the dynamic relocs and avoiding the copy reloc. */
+ if (p == NULL)
+ {
+ h->non_got_ref = 0;
+ return TRUE;
+ }
+
+ if (h->size == 0)
+ {
+ (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+ h->root.root.string);
+ return TRUE;
+ }
+
+ /* We must allocate the symbol in our .dynbss section, which will
+ become part of the .bss section of the executable. There will be
+ an entry for this symbol in the .dynsym section. The dynamic
+ object will contain position independent code, so all references
+ from the dynamic object to this symbol will go through the global
+ offset table. The dynamic linker will use the .dynsym entry to
+ determine the address it must put in the global offset table, so
+ both the dynamic object and the regular object will refer to the
+ same memory location for the variable. */
+
+ /* We must generate a R_SPARC_COPY reloc to tell the dynamic linker
+ to copy the initial value out of the dynamic object and into the
+ runtime process image. We need to remember the offset into the
+ .rel.bss section we are going to use. */
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ {
+ htab->srelbss->size += SPARC_ELF_RELA_BYTES (htab);
+ 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;
+}
+
+/* Allocate space in .plt, .got and associated reloc sections for
+ dynamic relocs. */
+
+static bfd_boolean
+allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
+{
+ struct bfd_link_info *info;
+ struct _bfd_sparc_elf_link_hash_table *htab;
+ struct _bfd_sparc_elf_link_hash_entry *eh;
+ struct _bfd_sparc_elf_dyn_relocs *p;
+
+ if (h->root.type == bfd_link_hash_indirect)
+ return TRUE;
+
+ 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;
+
+ info = (struct bfd_link_info *) inf;
+ htab = _bfd_sparc_elf_hash_table (info);
+
+ if (htab->elf.dynamic_sections_created
+ && h->plt.refcount > 0)
+ {
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h))
+ {
+ asection *s = htab->splt;
+
+ /* Allocate room for the header. */
+ if (s->size == 0)
+ {
+ s->size = htab->plt_header_size;
+
+ /* Allocate space for the .rela.plt.unloaded relocations. */
+ if (htab->is_vxworks && !info->shared)
+ htab->srelplt2->size = sizeof (Elf32_External_Rela) * 2;
+ }
+
+ /* The procedure linkage table size is bounded by the magnitude
+ of the offset we can describe in the entry. */
+ if (s->size >= (SPARC_ELF_WORD_BYTES(htab) == 8 ?
+ (((bfd_vma)1 << 31) << 1) : 0x400000))
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ if (SPARC_ELF_WORD_BYTES(htab) == 8
+ && s->size >= PLT64_LARGE_THRESHOLD * PLT64_ENTRY_SIZE)
+ {
+ bfd_vma off = s->size - PLT64_LARGE_THRESHOLD * PLT64_ENTRY_SIZE;
+
+
+ off = (off % (160 * PLT64_ENTRY_SIZE)) / PLT64_ENTRY_SIZE;
+
+ h->plt.offset = (s->size - (off * 8));
+ }
+ else
+ h->plt.offset = s->size;
+
+ /* If this symbol is not defined in a regular file, and we are
+ not generating a shared library, then set the symbol to this
+ location in the .plt. This is required to make function
+ pointers compare as equal between the normal executable and
+ the shared library. */
+ if (! info->shared
+ && !h->def_regular)
+ {
+ h->root.u.def.section = s;
+ h->root.u.def.value = h->plt.offset;
+ }
+
+ /* Make room for this entry. */
+ s->size += htab->plt_entry_size;
+
+ /* We also need to make an entry in the .rela.plt section. */
+ htab->srelplt->size += SPARC_ELF_RELA_BYTES (htab);
+
+ if (htab->is_vxworks)
+ {
+ /* Allocate space for the .got.plt entry. */
+ htab->sgotplt->size += 4;
+
+ /* ...and for the .rela.plt.unloaded relocations. */
+ if (!info->shared)
+ htab->srelplt2->size += sizeof (Elf32_External_Rela) * 3;
+ }
+ }
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->needs_plt = 0;
+ }
+ }
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->needs_plt = 0;
+ }
+
+ /* If R_SPARC_TLS_IE_{HI22,LO10} symbol is now local to the binary,
+ make it a R_SPARC_TLS_LE_{HI22,LO10} requiring no TLS entry. */
+ if (h->got.refcount > 0
+ && !info->shared
+ && h->dynindx == -1
+ && _bfd_sparc_elf_hash_entry(h)->tls_type == GOT_TLS_IE)
+ h->got.offset = (bfd_vma) -1;
+ else if (h->got.refcount > 0)
+ {
+ asection *s;
+ bfd_boolean dyn;
+ int tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
+
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ s = htab->sgot;
+ h->got.offset = s->size;
+ s->size += SPARC_ELF_WORD_BYTES (htab);
+ /* R_SPARC_TLS_GD_HI{22,LO10} needs 2 consecutive GOT slots. */
+ if (tls_type == GOT_TLS_GD)
+ s->size += SPARC_ELF_WORD_BYTES (htab);
+ dyn = htab->elf.dynamic_sections_created;
+ /* R_SPARC_TLS_IE_{HI22,LO10} needs one dynamic relocation,
+ R_SPARC_TLS_GD_{HI22,LO10} needs one if local symbol and two if
+ global. */
+ if ((tls_type == GOT_TLS_GD && h->dynindx == -1)
+ || tls_type == GOT_TLS_IE)
+ htab->srelgot->size += SPARC_ELF_RELA_BYTES (htab);
+ else if (tls_type == GOT_TLS_GD)
+ htab->srelgot->size += 2 * SPARC_ELF_RELA_BYTES (htab);
+ else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h))
+ htab->srelgot->size += SPARC_ELF_RELA_BYTES (htab);
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+
+ eh = (struct _bfd_sparc_elf_link_hash_entry *) h;
+ if (eh->dyn_relocs == NULL)
+ return TRUE;
+
+ /* In the shared -Bsymbolic case, discard space allocated for
+ dynamic pc-relative relocs against symbols which turn out to be
+ defined in regular objects. For the normal shared case, discard
+ space for pc-relative relocs that have become local due to symbol
+ visibility changes. */
+
+ if (info->shared)
+ {
+ if (h->def_regular
+ && (h->forced_local
+ || info->symbolic))
+ {
+ struct _bfd_sparc_elf_dyn_relocs **pp;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+ {
+ p->count -= p->pc_count;
+ p->pc_count = 0;
+ if (p->count == 0)
+ *pp = p->next;
+ else
+ pp = &p->next;
+ }
+ }
+
+ /* Also discard relocs on undefined weak syms with non-default
+ visibility. */
+ if (eh->dyn_relocs != NULL
+ && h->root.type == bfd_link_hash_undefweak)
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->dyn_relocs = NULL;
+
+ /* Make sure undefined weak symbols are output as a dynamic
+ symbol in PIEs. */
+ else if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+ }
+ }
+ else
+ {
+ /* For the non-shared case, discard space for relocs against
+ symbols which turn out to need copy relocs or are not
+ dynamic. */
+
+ if (!h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
+ || (htab->elf.dynamic_sections_created
+ && (h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined))))
+ {
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && !h->forced_local)
+ {
+ if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ /* If that succeeded, we know we'll be keeping all the
+ relocs. */
+ if (h->dynindx != -1)
+ goto keep;
+ }
+
+ eh->dyn_relocs = NULL;
+
+ keep: ;
+ }
+
+ /* Finally, allocate space. */
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *sreloc = elf_section_data (p->sec)->sreloc;
+ sreloc->size += p->count * SPARC_ELF_RELA_BYTES (htab);
+ }
+
+ return TRUE;
+}
+
+/* Find any dynamic relocs that apply to read-only sections. */
+
+static bfd_boolean
+readonly_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
+{
+ struct _bfd_sparc_elf_link_hash_entry *eh;
+ struct _bfd_sparc_elf_dyn_relocs *p;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ eh = (struct _bfd_sparc_elf_link_hash_entry *) h;
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *s = p->sec->output_section;
+
+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
+ {
+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+ info->flags |= DF_TEXTREL;
+
+ /* Not an error, just cut short the traversal. */
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+/* Return true if the dynamic symbol for a given section should be
+ omitted when creating a shared library. */
+
+bfd_boolean
+_bfd_sparc_elf_omit_section_dynsym (bfd *output_bfd,
+ struct bfd_link_info *info,
+ asection *p)
+{
+ /* We keep the .got section symbol so that explicit relocations
+ against the _GLOBAL_OFFSET_TABLE_ symbol emitted in PIC mode
+ can be turned into relocations against the .got symbol. */
+ if (strcmp (p->name, ".got") == 0)
+ return FALSE;
+
+ return _bfd_elf_link_omit_section_dynsym (output_bfd, info, p);
+}
+
+/* Set the sizes of the dynamic sections. */
+
+bfd_boolean
+_bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
+{
+ struct _bfd_sparc_elf_link_hash_table *htab;
+ bfd *dynobj;
+ asection *s;
+ bfd *ibfd;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ dynobj = htab->elf.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->executable)
+ {
+ s = bfd_get_section_by_name (dynobj, ".interp");
+ BFD_ASSERT (s != NULL);
+ s->size = htab->dynamic_interpreter_size;
+ s->contents = (unsigned char *) htab->dynamic_interpreter;
+ }
+ }
+
+ /* Set up .got offsets for local syms, and space for local dynamic
+ relocs. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ bfd_signed_vma *local_got;
+ bfd_signed_vma *end_local_got;
+ char *local_tls_type;
+ bfd_size_type locsymcount;
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *srel;
+
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
+ continue;
+
+ for (s = ibfd->sections; s != NULL; s = s->next)
+ {
+ struct _bfd_sparc_elf_dyn_relocs *p;
+
+ for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
+ {
+ if (!bfd_is_abs_section (p->sec)
+ && bfd_is_abs_section (p->sec->output_section))
+ {
+ /* Input section has been discarded, either because
+ it is a copy of a linkonce section or due to
+ linker script /DISCARD/, so we'll be discarding
+ the relocs too. */
+ }
+ else if (p->count != 0)
+ {
+ srel = elf_section_data (p->sec)->sreloc;
+ srel->size += p->count * SPARC_ELF_RELA_BYTES (htab);
+ if ((p->sec->output_section->flags & SEC_READONLY) != 0)
+ info->flags |= DF_TEXTREL;
+ }
+ }
+ }
+
+ local_got = elf_local_got_refcounts (ibfd);
+ if (!local_got)
+ continue;
+
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ locsymcount = symtab_hdr->sh_info;
+ end_local_got = local_got + locsymcount;
+ local_tls_type = _bfd_sparc_elf_local_got_tls_type (ibfd);
+ s = htab->sgot;
+ srel = htab->srelgot;
+ for (; local_got < end_local_got; ++local_got, ++local_tls_type)
+ {
+ if (*local_got > 0)
+ {
+ *local_got = s->size;
+ s->size += SPARC_ELF_WORD_BYTES (htab);
+ if (*local_tls_type == GOT_TLS_GD)
+ s->size += SPARC_ELF_WORD_BYTES (htab);
+ if (info->shared
+ || *local_tls_type == GOT_TLS_GD
+ || *local_tls_type == GOT_TLS_IE)
+ srel->size += SPARC_ELF_RELA_BYTES (htab);
+ }
+ else
+ *local_got = (bfd_vma) -1;
+ }
+ }
+
+ if (htab->tls_ldm_got.refcount > 0)
+ {
+ /* Allocate 2 got entries and 1 dynamic reloc for
+ R_SPARC_TLS_LDM_{HI22,LO10} relocs. */
+ htab->tls_ldm_got.offset = htab->sgot->size;
+ htab->sgot->size += (2 * SPARC_ELF_WORD_BYTES (htab));
+ htab->srelgot->size += SPARC_ELF_RELA_BYTES (htab);
+ }
+ else
+ htab->tls_ldm_got.offset = -1;
+
+ /* Allocate global sym .plt and .got entries, and space for global
+ sym dynamic relocs. */
+ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
+
+ if (! ABI_64_P (output_bfd)
+ && !htab->is_vxworks
+ && elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Make space for the trailing nop in .plt. */
+ if (htab->splt->size > 0)
+ htab->splt->size += 1 * SPARC_INSN_BYTES;
+
+ /* If the .got section is more than 0x1000 bytes, we add
+ 0x1000 to the value of _GLOBAL_OFFSET_TABLE_, so that 13
+ bit relocations have a greater chance of working.
+
+ FIXME: Make this optimization work for 64-bit too. */
+ if (htab->sgot->size >= 0x1000
+ && elf_hash_table (info)->hgot->root.u.def.value == 0)
+ elf_hash_table (info)->hgot->root.u.def.value = 0x1000;
+ }
+
+ /* The check_relocs and adjust_dynamic_symbol entry points have
+ determined the sizes of the various dynamic sections. Allocate
+ memory for them. */
+ for (s = dynobj->sections; s != NULL; s = s->next)
+ {
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ continue;
+
+ if (s == htab->splt
+ || s == htab->sgot
+ || s == htab->sdynbss
+ || s == htab->sgotplt)
+ {
+ /* Strip this section if we don't need it; see the
+ comment below. */
+ }
+ else if (strncmp (s->name, ".rela", 5) == 0)
+ {
+ if (s->size != 0)
+ {
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ s->reloc_count = 0;
+ }
+ }
+ else
+ {
+ /* It's not one of our sections. */
+ continue;
+ }
+
+ if (s->size == 0)
+ {
+ /* If we don't need this section, strip it from the
+ output file. This is mostly to handle .rela.bss and
+ .rela.plt. We must create both sections in
+ create_dynamic_sections, because they must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
+ s->flags |= SEC_EXCLUDE;
+ continue;
+ }
+
+ if ((s->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
+ /* Allocate memory for the section contents. Zero the memory
+ for the benefit of .rela.plt, which has 4 unused entries
+ at the beginning, and we don't want garbage. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL)
+ 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_sparc_elf_finish_dynamic_sections, but we
+ must add the entries now so that we get the correct size for
+ the .dynamic section. The DT_DEBUG entry is filled in by the
+ dynamic linker and used by the debugger. */
+#define add_dynamic_entry(TAG, VAL) \
+ _bfd_elf_add_dynamic_entry (info, TAG, VAL)
+
+ if (info->executable)
+ {
+ if (!add_dynamic_entry (DT_DEBUG, 0))
+ return FALSE;
+ }
+
+ if (htab->srelplt->size != 0)
+ {
+ if (!add_dynamic_entry (DT_PLTGOT, 0)
+ || !add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+ || !add_dynamic_entry (DT_JMPREL, 0))
+ return FALSE;
+ }
+
+ if (!add_dynamic_entry (DT_RELA, 0)
+ || !add_dynamic_entry (DT_RELASZ, 0)
+ || !add_dynamic_entry (DT_RELAENT,
+ SPARC_ELF_RELA_BYTES (htab)))
+ return FALSE;
+
+ /* If any dynamic relocs apply to a read-only section,
+ then we need a DT_TEXTREL entry. */
+ if ((info->flags & DF_TEXTREL) == 0)
+ elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
+ (PTR) info);
+
+ if (info->flags & DF_TEXTREL)
+ {
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
+ return FALSE;
+ }
+
+ if (ABI_64_P (output_bfd))
+ {
+ int reg;
+ struct _bfd_sparc_elf_app_reg * app_regs;
+ struct elf_strtab_hash *dynstr;
+ struct elf_link_hash_table *eht = elf_hash_table (info);
+
+ /* Add dynamic STT_REGISTER symbols and corresponding DT_SPARC_REGISTER
+ entries if needed. */
+ app_regs = _bfd_sparc_elf_hash_table (info)->app_regs;
+ dynstr = eht->dynstr;
+
+ for (reg = 0; reg < 4; reg++)
+ if (app_regs [reg].name != NULL)
+ {
+ struct elf_link_local_dynamic_entry *entry, *e;
+
+ if (!add_dynamic_entry (DT_SPARC_REGISTER, 0))
+ return FALSE;
+
+ entry = (struct elf_link_local_dynamic_entry *)
+ bfd_hash_allocate (&info->hash->table, sizeof (*entry));
+ if (entry == NULL)
+ return FALSE;
+
+ /* We cheat here a little bit: the symbol will not be local, so we
+ put it at the end of the dynlocal linked list. We will fix it
+ later on, as we have to fix other fields anyway. */
+ entry->isym.st_value = reg < 2 ? reg + 2 : reg + 4;
+ entry->isym.st_size = 0;
+ if (*app_regs [reg].name != '\0')
+ entry->isym.st_name
+ = _bfd_elf_strtab_add (dynstr, app_regs[reg].name, FALSE);
+ else
+ entry->isym.st_name = 0;
+ entry->isym.st_other = 0;
+ entry->isym.st_info = ELF_ST_INFO (app_regs [reg].bind,
+ STT_REGISTER);
+ entry->isym.st_shndx = app_regs [reg].shndx;
+ entry->next = NULL;
+ entry->input_bfd = output_bfd;
+ entry->input_indx = -1;
+
+ if (eht->dynlocal == NULL)
+ eht->dynlocal = entry;
+ else
+ {
+ for (e = eht->dynlocal; e->next; e = e->next)
+ ;
+ e->next = entry;
+ }
+ eht->dynsymcount++;
+ }
+ }
+ }
+#undef add_dynamic_entry
+
+ return TRUE;
+}
+
+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);
+
+ sdata = (struct _bfd_sparc_elf_section_data *) bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = (PTR) sdata;
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
+
+bfd_boolean
+_bfd_sparc_elf_relax_section (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_section *section,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ bfd_boolean *again)
+{
+ *again = FALSE;
+ sec_do_relax (section) = 1;
+ return TRUE;
+}
+
+/* Return the base VMA address which should be subtracted from real addresses
+ when resolving @dtpoff relocation.
+ This is PT_TLS segment p_vaddr. */
+
+static bfd_vma
+dtpoff_base (struct bfd_link_info *info)
+{
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
+ return 0;
+ return elf_hash_table (info)->tls_sec->vma;
+}
+
+/* Return the relocation value for @tpoff relocation
+ if STT_TLS virtual address is ADDRESS. */
+
+static bfd_vma
+tpoff (struct bfd_link_info *info, bfd_vma address)
+{
+ struct elf_link_hash_table *htab = elf_hash_table (info);
+
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (htab->tls_sec == NULL)
+ return 0;
+ return address - htab->tls_size - htab->tls_sec->vma;
+}
+
+/* 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)
+{
+ struct _bfd_sparc_elf_link_hash_table *htab;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ bfd_vma *local_got_offsets;
+ bfd_vma got_base;
+ asection *sreloc;
+ Elf_Internal_Rela *rel;
+ 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);
+ local_got_offsets = elf_local_got_offsets (input_bfd);
+
+ if (elf_hash_table (info)->hgot == NULL)
+ got_base = 0;
+ else
+ got_base = elf_hash_table (info)->hgot->root.u.def.value;
+
+ sreloc = elf_section_data (input_section)->sreloc;
+
+ rel = relocs;
+ if (ABI_64_P (output_bfd))
+ num_relocs = NUM_SHDR_ENTRIES (& elf_section_data (input_section)->rel_hdr);
+ else
+ num_relocs = input_section->reloc_count;
+ relend = relocs + num_relocs;
+ for (; rel < relend; rel++)
+ {
+ int r_type, tls_type;
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ bfd_vma relocation, off;
+ bfd_reloc_status_type r;
+ bfd_boolean is_plt = FALSE;
+ bfd_boolean unresolved_reloc;
+
+ r_type = SPARC_ELF_R_TYPE (rel->r_info);
+ if (r_type == R_SPARC_GNU_VTINHERIT
+ || r_type == R_SPARC_GNU_VTENTRY)
+ continue;
+
+ if (r_type < 0 || r_type >= (int) R_SPARC_max_std)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ 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;
+ sec = NULL;
+ unresolved_reloc = FALSE;
+ 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 warned;
+
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
+ if (warned)
+ {
+ /* To avoid generating warning messages about truncated
+ relocations, set the relocation's address to be the same as
+ the start of this section. */
+ if (input_section->output_section != NULL)
+ relocation = input_section->output_section->vma;
+ else
+ relocation = 0;
+ }
+ }
+
+ switch (r_type)
+ {
+ case R_SPARC_GOT10:
+ case R_SPARC_GOT13:
+ case R_SPARC_GOT22:
+ /* Relocation is to the entry for this symbol in the global
+ offset table. */
+ if (htab->sgot == NULL)
+ abort ();
+
+ if (h != NULL)
+ {
+ bfd_boolean dyn;
+
+ off = h->got.offset;
+ BFD_ASSERT (off != (bfd_vma) -1);
+ dyn = elf_hash_table (info)->dynamic_sections_created;
+
+ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ || (info->shared
+ && (info->symbolic
+ || h->dynindx == -1
+ || h->forced_local)
+ && h->def_regular))
+ {
+ /* This is actually a static link, or it is a
+ -Bsymbolic link and the symbol is defined
+ locally, or the symbol was forced to be local
+ because of a version file. We must initialize
+ this entry in the global offset table. Since the
+ offset must always be a multiple of 8 for 64-bit
+ and 4 for 32-bit, we use the least significant bit
+ to record whether we have initialized it already.
+
+ When doing a dynamic link, we create a .rela.got
+ relocation entry to initialize the value. This
+ is done in the finish_dynamic_symbol routine. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ SPARC_ELF_PUT_WORD (htab, output_bfd, relocation,
+ htab->sgot->contents + off);
+ h->got.offset |= 1;
+ }
+ }
+ else
+ unresolved_reloc = FALSE;
+ }
+ else
+ {
+ BFD_ASSERT (local_got_offsets != NULL
+ && local_got_offsets[r_symndx] != (bfd_vma) -1);
+
+ off = local_got_offsets[r_symndx];
+
+ /* The offset must always be a multiple of 8 on 64-bit and
+ 4 on 32-bit. We use the least significant bit to record
+ whether we have already processed this entry. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+
+ if (info->shared)
+ {
+ asection *s;
+ Elf_Internal_Rela outrel;
+
+ /* We need to generate a R_SPARC_RELATIVE reloc
+ for the dynamic linker. */
+ s = htab->srelgot;
+ BFD_ASSERT (s != NULL);
+
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset
+ + off);
+ outrel.r_info = SPARC_ELF_R_INFO (htab, NULL,
+ 0, R_SPARC_RELATIVE);
+ outrel.r_addend = relocation;
+ relocation = 0;
+ SPARC_ELF_APPEND_RELA (htab, output_bfd, s, &outrel);
+ }
+
+ SPARC_ELF_PUT_WORD (htab, output_bfd, relocation,
+ htab->sgot->contents + off);
+ local_got_offsets[r_symndx] |= 1;
+ }
+ }
+ relocation = htab->sgot->output_offset + off - got_base;
+ break;
+
+ case R_SPARC_PLT32:
+ case R_SPARC_PLT64:
+ if (h == NULL || h->plt.offset == (bfd_vma) -1)
+ {
+ r_type = (r_type == R_SPARC_PLT32) ? R_SPARC_32 : R_SPARC_64;
+ goto r_sparc_plt32;
+ }
+ /* Fall through. */
+
+ case R_SPARC_WPLT30:
+ case R_SPARC_HIPLT22:
+ case R_SPARC_LOPLT10:
+ case R_SPARC_PCPLT32:
+ case R_SPARC_PCPLT22:
+ case R_SPARC_PCPLT10:
+ r_sparc_wplt30:
+ /* Relocation is to the entry for this symbol in the
+ procedure linkage table. */
+
+ if (! ABI_64_P (output_bfd))
+ {
+ /* The Solaris native assembler will generate a WPLT30 reloc
+ for a local symbol if you assemble a call from one
+ section to another when using -K pic. We treat it as
+ WDISP30. */
+ if (h == NULL)
+ break;
+ }
+ else
+ {
+ BFD_ASSERT (h != NULL);
+ }
+
+ if (h->plt.offset == (bfd_vma) -1 || htab->splt == NULL)
+ {
+ /* We didn't make a PLT entry for this symbol. This
+ happens when statically linking PIC code, or when
+ using -Bsymbolic. */
+ break;
+ }
+
+ relocation = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + h->plt.offset);
+ unresolved_reloc = FALSE;
+ if (r_type == R_SPARC_PLT32 || r_type == R_SPARC_PLT64)
+ {
+ r_type = r_type == R_SPARC_PLT32 ? R_SPARC_32 : R_SPARC_64;
+ is_plt = TRUE;
+ goto r_sparc_plt32;
+ }
+ break;
+
+ case R_SPARC_PC10:
+ case R_SPARC_PC22:
+ case R_SPARC_PC_HH22:
+ case R_SPARC_PC_HM10:
+ case R_SPARC_PC_LM22:
+ if (h != NULL
+ && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+ break;
+ /* Fall through. */
+ case R_SPARC_DISP8:
+ case R_SPARC_DISP16:
+ case R_SPARC_DISP32:
+ case R_SPARC_DISP64:
+ case R_SPARC_WDISP30:
+ case R_SPARC_WDISP22:
+ case R_SPARC_WDISP19:
+ case R_SPARC_WDISP16:
+ case R_SPARC_8:
+ case R_SPARC_16:
+ case R_SPARC_32:
+ case R_SPARC_HI22:
+ case R_SPARC_22:
+ case R_SPARC_13:
+ case R_SPARC_LO10:
+ case R_SPARC_UA16:
+ case R_SPARC_UA32:
+ case R_SPARC_10:
+ case R_SPARC_11:
+ case R_SPARC_64:
+ case R_SPARC_OLO10:
+ case R_SPARC_HH22:
+ case R_SPARC_HM10:
+ case R_SPARC_LM22:
+ case R_SPARC_7:
+ case R_SPARC_5:
+ case R_SPARC_6:
+ case R_SPARC_HIX22:
+ case R_SPARC_LOX10:
+ case R_SPARC_H44:
+ case R_SPARC_M44:
+ 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)
+ break;
+
+ if ((info->shared
+ && (h == NULL
+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak)
+ && (! howto->pc_relative
+ || (h != NULL
+ && h->dynindx != -1
+ && (! info->symbolic
+ || !h->def_regular))))
+ || (!info->shared
+ && h != NULL
+ && h->dynindx != -1
+ && !h->non_got_ref
+ && ((h->def_dynamic
+ && !h->def_regular)
+ || h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined)))
+ {
+ Elf_Internal_Rela outrel;
+ bfd_boolean skip, relocate = FALSE;
+
+ /* When generating a shared object, these relocations
+ are copied into the output file to be resolved at run
+ time. */
+
+ BFD_ASSERT (sreloc != NULL);
+
+ skip = FALSE;
+
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = TRUE;
+ else if (outrel.r_offset == (bfd_vma) -2)
+ skip = TRUE, relocate = TRUE;
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+
+ /* Optimize unaligned reloc usage now that we know where
+ it finally resides. */
+ switch (r_type)
+ {
+ case R_SPARC_16:
+ if (outrel.r_offset & 1)
+ r_type = R_SPARC_UA16;
+ break;
+ case R_SPARC_UA16:
+ if (!(outrel.r_offset & 1))
+ r_type = R_SPARC_16;
+ break;
+ case R_SPARC_32:
+ if (outrel.r_offset & 3)
+ r_type = R_SPARC_UA32;
+ break;
+ case R_SPARC_UA32:
+ if (!(outrel.r_offset & 3))
+ r_type = R_SPARC_32;
+ break;
+ case R_SPARC_64:
+ if (outrel.r_offset & 7)
+ r_type = R_SPARC_UA64;
+ break;
+ case R_SPARC_UA64:
+ if (!(outrel.r_offset & 7))
+ r_type = R_SPARC_64;
+ break;
+ case R_SPARC_DISP8:
+ case R_SPARC_DISP16:
+ case R_SPARC_DISP32:
+ case R_SPARC_DISP64:
+ /* If the symbol is not dynamic, we should not keep
+ a dynamic relocation. But an .rela.* slot has been
+ allocated for it, output R_SPARC_NONE.
+ FIXME: Add code tracking needed dynamic relocs as
+ e.g. i386 has. */
+ if (h->dynindx == -1)
+ skip = TRUE, relocate = TRUE;
+ break;
+ }
+
+ if (skip)
+ memset (&outrel, 0, sizeof outrel);
+ /* h->dynindx may be -1 if the symbol was marked to
+ become local. */
+ else if (h != NULL && ! is_plt
+ && ((! info->symbolic && h->dynindx != -1)
+ || !h->def_regular))
+ {
+ BFD_ASSERT (h->dynindx != -1);
+ outrel.r_info = SPARC_ELF_R_INFO (htab, rel, h->dynindx, r_type);
+ outrel.r_addend = rel->r_addend;
+ }
+ else
+ {
+ if (r_type == R_SPARC_32 || r_type == R_SPARC_64)
+ {
+ outrel.r_info = SPARC_ELF_R_INFO (htab, NULL,
+ 0, R_SPARC_RELATIVE);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ else
+ {
+ long indx;
+
+ if (is_plt)
+ sec = htab->splt;
+
+ if (bfd_is_abs_section (sec))
+ indx = 0;
+ else if (sec == NULL || sec->owner == NULL)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ else
+ {
+ asection *osec;
+
+ osec = sec->output_section;
+ indx = elf_section_data (osec)->dynindx;
+
+ /* FIXME: we really should be able to link non-pic
+ shared libraries. */
+ if (indx == 0)
+ {
+ BFD_FAIL ();
+ (*_bfd_error_handler)
+ (_("%B: probably compiled without -fPIC?"),
+ input_bfd);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ }
+
+ outrel.r_info = SPARC_ELF_R_INFO (htab, rel, indx, r_type);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ }
+
+ SPARC_ELF_APPEND_RELA (htab, output_bfd, sreloc, &outrel);
+
+ /* This reloc will be computed at runtime, so there's no
+ need to do anything now. */
+ if (! relocate)
+ continue;
+ }
+ break;
+
+ case R_SPARC_TLS_GD_HI22:
+ if (! ABI_64_P (input_bfd)
+ && ! _bfd_sparc_elf_tdata (input_bfd)->has_tlsgd)
+ {
+ /* R_SPARC_REV32 used the same reloc number as
+ R_SPARC_TLS_GD_HI22. */
+ r_type = R_SPARC_REV32;
+ break;
+ }
+ /* Fall through */
+
+ case R_SPARC_TLS_GD_LO10:
+ case R_SPARC_TLS_IE_HI22:
+ case R_SPARC_TLS_IE_LO10:
+ r_type = sparc_elf_tls_transition (info, input_bfd, r_type, h == NULL);
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = _bfd_sparc_elf_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ {
+ tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
+ if (!info->shared && h->dynindx == -1 && tls_type == GOT_TLS_IE)
+ switch (SPARC_ELF_R_TYPE (rel->r_info))
+ {
+ case R_SPARC_TLS_GD_HI22:
+ case R_SPARC_TLS_IE_HI22:
+ r_type = R_SPARC_TLS_LE_HIX22;
+ break;
+ default:
+ r_type = R_SPARC_TLS_LE_LOX10;
+ break;
+ }
+ }
+ if (tls_type == GOT_TLS_IE)
+ switch (r_type)
+ {
+ case R_SPARC_TLS_GD_HI22:
+ r_type = R_SPARC_TLS_IE_HI22;
+ break;
+ case R_SPARC_TLS_GD_LO10:
+ r_type = R_SPARC_TLS_IE_LO10;
+ break;
+ }
+
+ if (r_type == R_SPARC_TLS_LE_HIX22)
+ {
+ relocation = tpoff (info, relocation);
+ break;
+ }
+ if (r_type == R_SPARC_TLS_LE_LOX10)
+ {
+ /* Change add into xor. */
+ relocation = tpoff (info, relocation);
+ bfd_put_32 (output_bfd, (bfd_get_32 (input_bfd,
+ contents + rel->r_offset)
+ | 0x80182000), contents + rel->r_offset);
+ break;
+ }
+
+ if (h != NULL)
+ {
+ off = h->got.offset;
+ h->got.offset |= 1;
+ }
+ else
+ {
+ BFD_ASSERT (local_got_offsets != NULL);
+ off = local_got_offsets[r_symndx];
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ r_sparc_tlsldm:
+ if (htab->sgot == NULL)
+ abort ();
+
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ Elf_Internal_Rela outrel;
+ int dr_type, indx;
+
+ if (htab->srelgot == NULL)
+ abort ();
+
+ SPARC_ELF_PUT_WORD (htab, output_bfd, 0, htab->sgot->contents + off);
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset + off);
+ indx = h && h->dynindx != -1 ? h->dynindx : 0;
+ if (r_type == R_SPARC_TLS_IE_HI22
+ || r_type == R_SPARC_TLS_IE_LO10)
+ dr_type = SPARC_ELF_TPOFF_RELOC (htab);
+ else
+ dr_type = SPARC_ELF_DTPMOD_RELOC (htab);
+ if (dr_type == SPARC_ELF_TPOFF_RELOC (htab) && indx == 0)
+ outrel.r_addend = relocation - dtpoff_base (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);
+
+ if (r_type == R_SPARC_TLS_GD_HI22
+ || r_type == R_SPARC_TLS_GD_LO10)
+ {
+ if (indx == 0)
+ {
+ BFD_ASSERT (! unresolved_reloc);
+ SPARC_ELF_PUT_WORD (htab, output_bfd,
+ relocation - dtpoff_base (info),
+ (htab->sgot->contents + off
+ + SPARC_ELF_WORD_BYTES (htab)));
+ }
+ else
+ {
+ SPARC_ELF_PUT_WORD (htab, output_bfd, 0,
+ (htab->sgot->contents + off
+ + SPARC_ELF_WORD_BYTES (htab)));
+ 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);
+ }
+ }
+ else if (dr_type == SPARC_ELF_DTPMOD_RELOC (htab))
+ {
+ SPARC_ELF_PUT_WORD (htab, output_bfd, 0,
+ (htab->sgot->contents + off
+ + SPARC_ELF_WORD_BYTES (htab)));
+ }
+ }
+
+ if (off >= (bfd_vma) -2)
+ abort ();
+
+ relocation = htab->sgot->output_offset + off - got_base;
+ unresolved_reloc = FALSE;
+ howto = _bfd_sparc_elf_howto_table + r_type;
+ break;
+
+ case R_SPARC_TLS_LDM_HI22:
+ case R_SPARC_TLS_LDM_LO10:
+ if (! info->shared)
+ {
+ bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
+ continue;
+ }
+ off = htab->tls_ldm_got.offset;
+ htab->tls_ldm_got.offset |= 1;
+ goto r_sparc_tlsldm;
+
+ case R_SPARC_TLS_LDO_HIX22:
+ case R_SPARC_TLS_LDO_LOX10:
+ if (info->shared)
+ {
+ relocation -= dtpoff_base (info);
+ break;
+ }
+
+ r_type = (r_type == R_SPARC_TLS_LDO_HIX22
+ ? R_SPARC_TLS_LE_HIX22 : R_SPARC_TLS_LE_LOX10);
+ /* Fall through. */
+
+ case R_SPARC_TLS_LE_HIX22:
+ case R_SPARC_TLS_LE_LOX10:
+ if (info->shared)
+ {
+ Elf_Internal_Rela outrel;
+ bfd_boolean skip, relocate = FALSE;
+
+ BFD_ASSERT (sreloc != NULL);
+ skip = FALSE;
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = TRUE;
+ else if (outrel.r_offset == (bfd_vma) -2)
+ skip = TRUE, relocate = TRUE;
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+ if (skip)
+ memset (&outrel, 0, sizeof outrel);
+ else
+ {
+ outrel.r_info = SPARC_ELF_R_INFO (htab, NULL, 0, r_type);
+ outrel.r_addend = relocation - dtpoff_base (info)
+ + rel->r_addend;
+ }
+
+ SPARC_ELF_APPEND_RELA (htab, output_bfd, sreloc, &outrel);
+ continue;
+ }
+ relocation = tpoff (info, relocation);
+ break;
+
+ case R_SPARC_TLS_LDM_CALL:
+ if (! info->shared)
+ {
+ /* mov %g0, %o0 */
+ bfd_put_32 (output_bfd, 0x90100000, contents + rel->r_offset);
+ continue;
+ }
+ /* Fall through */
+
+ case R_SPARC_TLS_GD_CALL:
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = _bfd_sparc_elf_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
+ if (! info->shared
+ || (r_type == R_SPARC_TLS_GD_CALL && tls_type == GOT_TLS_IE))
+ {
+ bfd_vma insn;
+
+ if (!info->shared && (h == NULL || h->dynindx == -1))
+ {
+ /* GD -> LE */
+ bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
+ continue;
+ }
+
+ /* GD -> IE */
+ if (rel + 1 < relend
+ && SPARC_ELF_R_TYPE (rel[1].r_info) == R_SPARC_TLS_GD_ADD
+ && rel[1].r_offset == rel->r_offset + 4
+ && SPARC_ELF_R_SYMNDX (htab, rel[1].r_info) == r_symndx
+ && (((insn = bfd_get_32 (input_bfd,
+ contents + rel[1].r_offset))
+ >> 25) & 0x1f) == 8)
+ {
+ /* We have
+ call __tls_get_addr, %tgd_call(foo)
+ add %reg1, %reg2, %o0, %tgd_add(foo)
+ and change it into IE:
+ {ld,ldx} [%reg1 + %reg2], %o0, %tie_ldx(foo)
+ add %g7, %o0, %o0, %tie_add(foo).
+ add is 0x80000000 | (rd << 25) | (rs1 << 14) | rs2,
+ ld is 0xc0000000 | (rd << 25) | (rs1 << 14) | rs2,
+ ldx is 0xc0580000 | (rd << 25) | (rs1 << 14) | rs2. */
+ bfd_put_32 (output_bfd, insn | (ABI_64_P (output_bfd) ? 0xc0580000 : 0xc0000000),
+ contents + rel->r_offset);
+ bfd_put_32 (output_bfd, 0x9001c008,
+ contents + rel->r_offset + 4);
+ rel++;
+ continue;
+ }
+
+ bfd_put_32 (output_bfd, 0x9001c008, contents + rel->r_offset);
+ continue;
+ }
+
+ h = (struct elf_link_hash_entry *)
+ bfd_link_hash_lookup (info->hash, "__tls_get_addr", FALSE,
+ FALSE, TRUE);
+ BFD_ASSERT (h != NULL);
+ r_type = R_SPARC_WPLT30;
+ howto = _bfd_sparc_elf_howto_table + r_type;
+ goto r_sparc_wplt30;
+
+ case R_SPARC_TLS_GD_ADD:
+ tls_type = GOT_UNKNOWN;
+ if (h == NULL && local_got_offsets)
+ tls_type = _bfd_sparc_elf_local_got_tls_type (input_bfd) [r_symndx];
+ else if (h != NULL)
+ tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
+ if (! info->shared || tls_type == GOT_TLS_IE)
+ {
+ /* add %reg1, %reg2, %reg3, %tgd_add(foo)
+ changed into IE:
+ {ld,ldx} [%reg1 + %reg2], %reg3, %tie_ldx(foo)
+ or LE:
+ add %g7, %reg2, %reg3. */
+ bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ if ((h != NULL && h->dynindx != -1) || info->shared)
+ relocation = insn | (ABI_64_P (output_bfd) ? 0xc0580000 : 0xc0000000);
+ else
+ relocation = (insn & ~0x7c000) | 0x1c000;
+ bfd_put_32 (output_bfd, relocation, contents + rel->r_offset);
+ }
+ continue;
+
+ case R_SPARC_TLS_LDM_ADD:
+ if (! info->shared)
+ bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
+ continue;
+
+ case R_SPARC_TLS_LDO_ADD:
+ if (! info->shared)
+ {
+ /* Change rs1 into %g7. */
+ bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ insn = (insn & ~0x7c000) | 0x1c000;
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
+ }
+ continue;
+
+ case R_SPARC_TLS_IE_LD:
+ case R_SPARC_TLS_IE_LDX:
+ if (! info->shared && (h == NULL || h->dynindx == -1))
+ {
+ bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ int rs2 = insn & 0x1f;
+ int rd = (insn >> 25) & 0x1f;
+
+ if (rs2 == rd)
+ relocation = SPARC_NOP;
+ else
+ relocation = 0x80100000 | (insn & 0x3e00001f);
+ bfd_put_32 (output_bfd, relocation, contents + rel->r_offset);
+ }
+ continue;
+
+ case R_SPARC_TLS_IE_ADD:
+ /* Totally useless relocation. */
+ continue;
+
+ case R_SPARC_TLS_DTPOFF32:
+ case R_SPARC_TLS_DTPOFF64:
+ relocation -= dtpoff_base (info);
+ break;
+
+ default:
+ break;
+ }
+
+ /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+ because such sections are not SEC_ALLOC and thus ld.so will
+ not process them. */
+ if (unresolved_reloc
+ && !((input_section->flags & SEC_DEBUGGING) != 0
+ && h->def_dynamic))
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
+ (long) rel->r_offset,
+ howto->name,
+ h->root.root.string);
+
+ r = bfd_reloc_continue;
+ if (r_type == R_SPARC_OLO10)
+ {
+ bfd_vma x;
+
+ if (! ABI_64_P (output_bfd))
+ abort ();
+
+ relocation += rel->r_addend;
+ relocation = (relocation & 0x3ff) + ELF64_R_TYPE_DATA (rel->r_info);
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x = (x & ~(bfd_vma) 0x1fff) | (relocation & 0x1fff);
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+
+ r = bfd_check_overflow (howto->complain_on_overflow,
+ howto->bitsize, howto->rightshift,
+ bfd_arch_bits_per_address (input_bfd),
+ relocation);
+ }
+ else if (r_type == R_SPARC_WDISP16)
+ {
+ bfd_vma x;
+
+ relocation += rel->r_addend;
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset);
+ relocation -= rel->r_offset;
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x |= ((((relocation >> 2) & 0xc000) << 6)
+ | ((relocation >> 2) & 0x3fff));
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+
+ r = bfd_check_overflow (howto->complain_on_overflow,
+ howto->bitsize, howto->rightshift,
+ bfd_arch_bits_per_address (input_bfd),
+ relocation);
+ }
+ else if (r_type == R_SPARC_REV32)
+ {
+ bfd_vma x;
+
+ relocation = relocation + rel->r_addend;
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x = x + relocation;
+ bfd_putl32 (/*input_bfd,*/ x, contents + rel->r_offset);
+ r = bfd_reloc_ok;
+ }
+ else if (r_type == R_SPARC_TLS_LDO_HIX22
+ || r_type == R_SPARC_TLS_LE_HIX22)
+ {
+ bfd_vma x;
+
+ relocation += rel->r_addend;
+ if (r_type == R_SPARC_TLS_LE_HIX22)
+ relocation ^= MINUS_ONE;
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x = (x & ~(bfd_vma) 0x3fffff) | ((relocation >> 10) & 0x3fffff);
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+ r = bfd_reloc_ok;
+ }
+ else if (r_type == R_SPARC_TLS_LDO_LOX10
+ || r_type == R_SPARC_TLS_LE_LOX10)
+ {
+ bfd_vma x;
+
+ relocation += rel->r_addend;
+ relocation &= 0x3ff;
+ if (r_type == R_SPARC_TLS_LE_LOX10)
+ relocation |= 0x1c00;
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x = (x & ~(bfd_vma) 0x1fff) | relocation;
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+
+ r = bfd_reloc_ok;
+ }
+ else if (r_type == R_SPARC_HIX22)
+ {
+ bfd_vma x;
+
+ relocation += rel->r_addend;
+ relocation = relocation ^ MINUS_ONE;
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x = (x & ~(bfd_vma) 0x3fffff) | ((relocation >> 10) & 0x3fffff);
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+
+ r = bfd_check_overflow (howto->complain_on_overflow,
+ howto->bitsize, howto->rightshift,
+ bfd_arch_bits_per_address (input_bfd),
+ relocation);
+ }
+ else if (r_type == R_SPARC_LOX10)
+ {
+ bfd_vma x;
+
+ relocation += rel->r_addend;
+ relocation = (relocation & 0x3ff) | 0x1c00;
+
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ x = (x & ~(bfd_vma) 0x1fff) | relocation;
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+
+ r = bfd_reloc_ok;
+ }
+ else if ((r_type == R_SPARC_WDISP30 || r_type == R_SPARC_WPLT30)
+ && sec_do_relax (input_section)
+ && rel->r_offset + 4 < input_section->size)
+ {
+#define G0 0
+#define O7 15
+#define XCC (2 << 20)
+#define COND(x) (((x)&0xf)<<25)
+#define CONDA COND(0x8)
+#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC)
+#define INSN_BA (F2(0,2) | CONDA)
+#define INSN_OR F3(2, 0x2, 0)
+#define INSN_NOP F2(0,4)
+
+ bfd_vma x, y;
+
+ /* If the instruction is a call with either:
+ restore
+ arithmetic instruction with rd == %o7
+ where rs1 != %o7 and rs2 if it is register != %o7
+ then we can optimize if the call destination is near
+ by changing the call into a branch always. */
+ x = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ y = bfd_get_32 (input_bfd, contents + rel->r_offset + 4);
+ if ((x & OP(~0)) == OP(1) && (y & OP(~0)) == OP(2))
+ {
+ if (((y & OP3(~0)) == OP3(0x3d) /* restore */
+ || ((y & OP3(0x28)) == 0 /* arithmetic */
+ && (y & RD(~0)) == RD(O7)))
+ && (y & RS1(~0)) != RS1(O7)
+ && ((y & F3I(~0))
+ || (y & RS2(~0)) != RS2(O7)))
+ {
+ bfd_vma reloc;
+
+ reloc = relocation + rel->r_addend - rel->r_offset;
+ reloc -= (input_section->output_section->vma
+ + input_section->output_offset);
+
+ /* Ensure the branch fits into simm22. */
+ if ((reloc & 3) == 0
+ && ((reloc & ~(bfd_vma)0x7fffff) == 0
+ || ((reloc | 0x7fffff) == ~(bfd_vma)0)))
+ {
+ reloc >>= 2;
+
+ /* Check whether it fits into simm19. */
+ if (((reloc & 0x3c0000) == 0
+ || (reloc & 0x3c0000) == 0x3c0000)
+ && (ABI_64_P (output_bfd)
+ || elf_elfheader (output_bfd)->e_flags & EF_SPARC_32PLUS))
+ x = INSN_BPA | (reloc & 0x7ffff); /* ba,pt %xcc */
+ else
+ x = INSN_BA | (reloc & 0x3fffff); /* ba */
+ bfd_put_32 (input_bfd, x, contents + rel->r_offset);
+ r = bfd_reloc_ok;
+ if (rel->r_offset >= 4
+ && (y & (0xffffffff ^ RS1(~0)))
+ == (INSN_OR | RD(O7) | RS2(G0)))
+ {
+ bfd_vma z;
+ unsigned int reg;
+
+ z = bfd_get_32 (input_bfd,
+ contents + rel->r_offset - 4);
+ if ((z & (0xffffffff ^ RD(~0)))
+ != (INSN_OR | RS1(O7) | RS2(G0)))
+ break;
+
+ /* The sequence was
+ or %o7, %g0, %rN
+ call foo
+ or %rN, %g0, %o7
+
+ If call foo was replaced with ba, replace
+ or %rN, %g0, %o7 with nop. */
+
+ reg = (y & RS1(~0)) >> 14;
+ if (reg != ((z & RD(~0)) >> 25)
+ || reg == G0 || reg == O7)
+ break;
+
+ bfd_put_32 (input_bfd, (bfd_vma) INSN_NOP,
+ contents + rel->r_offset + 4);
+ }
+
+ }
+ }
+ }
+ }
+
+ if (r == bfd_reloc_continue)
+ r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend);
+
+ if (r != bfd_reloc_ok)
+ {
+ switch (r)
+ {
+ default:
+ case bfd_reloc_outofrange:
+ abort ();
+ case bfd_reloc_overflow:
+ {
+ const char *name;
+
+ /* The Solaris native linker silently disregards overflows.
+ We don't, but this breaks stabs debugging info, whose
+ relocations are only 32-bits wide. Ignore overflows in
+ this case and also for discarded entries. */
+ if ((r_type == R_SPARC_32 || r_type == R_SPARC_DISP32)
+ && (((input_section->flags & SEC_DEBUGGING) != 0
+ && strcmp (bfd_section_name (input_bfd,
+ input_section),
+ ".stab") == 0)
+ || _bfd_elf_section_offset (output_bfd, info,
+ input_section,
+ rel->r_offset)
+ == (bfd_vma)-1))
+ break;
+
+ if (h != NULL)
+ {
+ /* Assume this is a call protected by other code that
+ detect the symbol is undefined. If this is the case,
+ we can safely ignore the overflow. If not, the
+ program is hosed anyway, and a little warning isn't
+ going to help. */
+ if (h->root.type == bfd_link_hash_undefweak
+ && howto->pc_relative)
+ break;
+
+ name = NULL;
+ }
+ else
+ {
+ name = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
+ if (name == NULL)
+ return FALSE;
+ if (*name == '\0')
+ name = bfd_section_name (input_bfd, sec);
+ }
+ if (! ((*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
+ return FALSE;
+ }
+ break;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+/* Build a VxWorks PLT entry. PLT_INDEX is the index of the PLT entry
+ and PLT_OFFSET is the byte offset from the start of .plt. GOT_OFFSET
+ is the offset of the associated .got.plt entry from
+ _GLOBAL_OFFSET_TABLE_. */
+
+static void
+sparc_vxworks_build_plt_entry (bfd *output_bfd, struct bfd_link_info *info,
+ bfd_vma plt_offset, bfd_vma plt_index,
+ bfd_vma got_offset)
+{
+ bfd_vma got_base;
+ const bfd_vma *plt_entry;
+ struct _bfd_sparc_elf_link_hash_table *htab;
+ bfd_byte *loc;
+ Elf_Internal_Rela rela;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ if (info->shared)
+ {
+ plt_entry = sparc_vxworks_shared_plt_entry;
+ got_base = 0;
+ }
+ else
+ {
+ plt_entry = sparc_vxworks_exec_plt_entry;
+ got_base = (htab->elf.hgot->root.u.def.value
+ + htab->elf.hgot->root.u.def.section->output_offset
+ + htab->elf.hgot->root.u.def.section->output_section->vma);
+ }
+
+ /* Fill in the entry in the procedure linkage table. */
+ bfd_put_32 (output_bfd, plt_entry[0] + ((got_base + got_offset) >> 10),
+ htab->splt->contents + plt_offset);
+ bfd_put_32 (output_bfd, plt_entry[1] + ((got_base + got_offset) & 0x3ff),
+ htab->splt->contents + plt_offset + 4);
+ bfd_put_32 (output_bfd, plt_entry[2],
+ htab->splt->contents + plt_offset + 8);
+ bfd_put_32 (output_bfd, plt_entry[3],
+ htab->splt->contents + plt_offset + 12);
+ bfd_put_32 (output_bfd, plt_entry[4],
+ htab->splt->contents + plt_offset + 16);
+ bfd_put_32 (output_bfd, plt_entry[5] + (plt_index >> 10),
+ htab->splt->contents + plt_offset + 20);
+ /* PC-relative displacement for a branch to the start of
+ the PLT section. */
+ bfd_put_32 (output_bfd, plt_entry[6] + (((-plt_offset - 24) >> 2)
+ & 0x003fffff),
+ htab->splt->contents + plt_offset + 24);
+ bfd_put_32 (output_bfd, plt_entry[7] + (plt_index & 0x3ff),
+ htab->splt->contents + plt_offset + 28);
+
+ /* Fill in the .got.plt entry, pointing initially at the
+ second half of the PLT entry. */
+ BFD_ASSERT (htab->sgotplt != NULL);
+ bfd_put_32 (output_bfd,
+ htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + plt_offset + 20,
+ htab->sgotplt->contents + got_offset);
+
+ /* Add relocations to .rela.plt.unloaded. */
+ if (!info->shared)
+ {
+ loc = (htab->srelplt2->contents
+ + (2 + 3 * plt_index) * sizeof (Elf32_External_Rela));
+
+ /* Relocate the initial sethi. */
+ rela.r_offset = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + plt_offset);
+ rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_SPARC_HI22);
+ rela.r_addend = got_offset;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Likewise the following or. */
+ rela.r_offset += 4;
+ rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_SPARC_LO10);
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Relocate the .got.plt entry. */
+ rela.r_offset = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + got_offset);
+ rela.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_SPARC_32);
+ rela.r_addend = plt_offset + 20;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ }
+}
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
+
+bfd_boolean
+_bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ bfd *dynobj;
+ struct _bfd_sparc_elf_link_hash_table *htab;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ dynobj = htab->elf.dynobj;
+
+ if (h->plt.offset != (bfd_vma) -1)
+ {
+ asection *splt;
+ asection *srela;
+ Elf_Internal_Rela rela;
+ bfd_byte *loc;
+ bfd_vma r_offset, got_offset;
+ int rela_index;
+
+ /* This symbol has an entry in the PLT. Set it up. */
+
+ BFD_ASSERT (h->dynindx != -1);
+
+ splt = htab->splt;
+ srela = htab->srelplt;
+ BFD_ASSERT (splt != NULL && srela != NULL);
+
+ /* Fill in the entry in the .rela.plt section. */
+ if (htab->is_vxworks)
+ {
+ /* Work out the index of this PLT entry. */
+ rela_index = ((h->plt.offset - htab->plt_header_size)
+ / htab->plt_entry_size);
+
+ /* Calculate the offset of the associated .got.plt entry.
+ The first three entries are reserved. */
+ got_offset = (rela_index + 3) * 4;
+
+ sparc_vxworks_build_plt_entry (output_bfd, info, h->plt.offset,
+ rela_index, got_offset);
+
+
+ /* On VxWorks, the relocation points to the .got.plt entry,
+ not the .plt entry. */
+ rela.r_offset = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset
+ + got_offset);
+ rela.r_addend = 0;
+ }
+ else
+ {
+ /* Fill in the entry in the procedure linkage table. */
+ rela_index = SPARC_ELF_BUILD_PLT_ENTRY (htab, output_bfd, splt,
+ h->plt.offset, splt->size,
+ &r_offset);
+
+ rela.r_offset = r_offset
+ + (splt->output_section->vma + splt->output_offset);
+ if (! ABI_64_P (output_bfd)
+ || h->plt.offset < (PLT64_LARGE_THRESHOLD * PLT64_ENTRY_SIZE))
+ {
+ rela.r_addend = 0;
+ }
+ else
+ {
+ rela.r_addend = (-(h->plt.offset + 4)
+ - splt->output_section->vma
+ - splt->output_offset);
+ }
+ }
+ rela.r_info = SPARC_ELF_R_INFO (htab, NULL, h->dynindx, R_SPARC_JMP_SLOT);
+
+ /* Adjust for the first 4 reserved elements in the .plt section
+ when setting the offset in the .rela.plt section.
+ Sun forgot to read their own ABI and copied elf32-sparc behaviour,
+ thus .plt[4] has corresponding .rela.plt[0] and so on. */
+
+ 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);
+ }
+
+ if (!h->def_regular)
+ {
+ /* Mark the symbol as undefined, rather than as defined in
+ the .plt section. Leave the value alone. */
+ sym->st_shndx = SHN_UNDEF;
+ /* If the symbol is weak, we do need to clear the value.
+ Otherwise, the PLT entry would provide a definition for
+ the symbol even if the symbol wasn't defined anywhere,
+ and so the symbol would never be NULL. */
+ if (!h->ref_regular_nonweak)
+ sym->st_value = 0;
+ }
+ }
+
+ if (h->got.offset != (bfd_vma) -1
+ && _bfd_sparc_elf_hash_entry(h)->tls_type != GOT_TLS_GD
+ && _bfd_sparc_elf_hash_entry(h)->tls_type != GOT_TLS_IE)
+ {
+ asection *sgot;
+ asection *srela;
+ Elf_Internal_Rela rela;
+
+ /* This symbol has an entry in the GOT. Set it up. */
+
+ sgot = htab->sgot;
+ srela = htab->srelgot;
+ BFD_ASSERT (sgot != NULL && srela != NULL);
+
+ rela.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + (h->got.offset &~ (bfd_vma) 1));
+
+ /* If this is a -Bsymbolic link, and the symbol is defined
+ locally, we just want to emit a RELATIVE reloc. Likewise if
+ the symbol was forced to be local because of a version file.
+ The entry in the global offset table will already have been
+ initialized in the relocate_section function. */
+ if (info->shared
+ && (info->symbolic || h->dynindx == -1)
+ && h->def_regular)
+ {
+ asection *sec = h->root.u.def.section;
+ rela.r_info = SPARC_ELF_R_INFO (htab, NULL, 0, R_SPARC_RELATIVE);
+ rela.r_addend = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ }
+ else
+ {
+ rela.r_info = SPARC_ELF_R_INFO (htab, NULL, h->dynindx, R_SPARC_GLOB_DAT);
+ rela.r_addend = 0;
+ }
+
+ 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);
+ }
+
+ if (h->needs_copy)
+ {
+ asection *s;
+ Elf_Internal_Rela rela;
+
+ /* This symbols needs a copy reloc. Set it up. */
+ BFD_ASSERT (h->dynindx != -1);
+
+ s = bfd_get_section_by_name (h->root.u.def.section->owner,
+ ".rela.bss");
+ BFD_ASSERT (s != NULL);
+
+ rela.r_offset = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ rela.r_info = SPARC_ELF_R_INFO (htab, NULL, h->dynindx, R_SPARC_COPY);
+ rela.r_addend = 0;
+ SPARC_ELF_APPEND_RELA (htab, output_bfd, s, &rela);
+ }
+
+ /* Mark some specially defined symbols as absolute. On VxWorks,
+ _GLOBAL_OFFSET_TABLE_ is not absolute: it is relative to the
+ ".got" section. Likewise _PROCEDURE_LINKAGE_TABLE_ and ".plt". */
+ if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ || (!htab->is_vxworks
+ && (h == htab->elf.hgot || h == htab->elf.hplt)))
+ sym->st_shndx = SHN_ABS;
+
+ return TRUE;
+}
+
+/* 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)
+{
+ 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;
+
+ 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++)
+ {
+ Elf_Internal_Dyn dyn;
+ const char *name;
+ bfd_boolean size;
+
+ bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+
+ if (htab->is_vxworks && dyn.d_tag == DT_RELASZ)
+ {
+ /* On VxWorks, DT_RELASZ should not include the relocations
+ in .rela.plt. */
+ if (htab->srelplt)
+ {
+ dyn.d_un.d_val -= htab->srelplt->size;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
+ }
+ else if (htab->is_vxworks && dyn.d_tag == DT_PLTGOT)
+ {
+ /* On VxWorks, DT_PLTGOT should point to the start of the GOT,
+ not to the start of the PLT. */
+ if (htab->sgotplt)
+ {
+ dyn.d_un.d_val = (htab->sgotplt->output_section->vma
+ + htab->sgotplt->output_offset);
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
+ }
+ else
+ {
+ switch (dyn.d_tag)
+ {
+ case DT_PLTGOT: name = ".plt"; size = FALSE; break;
+ case DT_PLTRELSZ: name = ".rela.plt"; size = TRUE; break;
+ case DT_JMPREL: name = ".rela.plt"; size = FALSE; break;
+ default: name = NULL; size = FALSE; break;
+ }
+
+ if (name != NULL)
+ {
+ asection *s;
+
+ s = bfd_get_section_by_name (output_bfd, name);
+ if (s == NULL)
+ dyn.d_un.d_val = 0;
+ else
+ {
+ if (! size)
+ dyn.d_un.d_ptr = s->vma;
+ else
+ dyn.d_un.d_val = s->size;
+ }
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
+ }
+ }
+ return TRUE;
+}
+
+/* Install the first PLT entry in a VxWorks executable and make sure that
+ .rela.plt.unloaded relocations have the correct symbol indexes. */
+
+static void
+sparc_vxworks_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info)
+{
+ struct _bfd_sparc_elf_link_hash_table *htab;
+ Elf_Internal_Rela rela;
+ bfd_vma got_base;
+ bfd_byte *loc;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+
+ /* Calculate the absolute value of _GLOBAL_OFFSET_TABLE_. */
+ got_base = (htab->elf.hgot->root.u.def.section->output_section->vma
+ + htab->elf.hgot->root.u.def.section->output_offset
+ + htab->elf.hgot->root.u.def.value);
+
+ /* Install the initial PLT entry. */
+ bfd_put_32 (output_bfd,
+ sparc_vxworks_exec_plt0_entry[0] + ((got_base + 8) >> 10),
+ htab->splt->contents);
+ bfd_put_32 (output_bfd,
+ sparc_vxworks_exec_plt0_entry[1] + ((got_base + 8) & 0x3ff),
+ htab->splt->contents + 4);
+ bfd_put_32 (output_bfd,
+ sparc_vxworks_exec_plt0_entry[2],
+ htab->splt->contents + 8);
+ bfd_put_32 (output_bfd,
+ sparc_vxworks_exec_plt0_entry[3],
+ htab->splt->contents + 12);
+ bfd_put_32 (output_bfd,
+ sparc_vxworks_exec_plt0_entry[4],
+ htab->splt->contents + 16);
+
+ loc = htab->srelplt2->contents;
+
+ /* Add an unloaded relocation for the initial entry's "sethi". */
+ rela.r_offset = (htab->splt->output_section->vma
+ + htab->splt->output_offset);
+ rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_SPARC_HI22);
+ rela.r_addend = 8;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Likewise the following "or". */
+ rela.r_offset += 4;
+ rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_SPARC_LO10);
+ bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* Fix up the remaining .rela.plt.unloaded relocations. They may have
+ the wrong symbol index for _G_O_T_ or _P_L_T_ depending on the order
+ in which symbols were output. */
+ while (loc < htab->srelplt2->contents + htab->srelplt2->size)
+ {
+ Elf_Internal_Rela rel;
+
+ /* The entry's initial "sethi" (against _G_O_T_). */
+ bfd_elf32_swap_reloc_in (output_bfd, loc, &rel);
+ rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_SPARC_HI22);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* The following "or" (also against _G_O_T_). */
+ bfd_elf32_swap_reloc_in (output_bfd, loc, &rel);
+ rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_SPARC_LO10);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
+ loc += sizeof (Elf32_External_Rela);
+
+ /* The .got.plt entry (against _P_L_T_). */
+ bfd_elf32_swap_reloc_in (output_bfd, loc, &rel);
+ rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_SPARC_32);
+ bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
+ loc += sizeof (Elf32_External_Rela);
+ }
+}
+
+/* Install the first PLT entry in a VxWorks shared object. */
+
+static void
+sparc_vxworks_finish_shared_plt (bfd *output_bfd, struct bfd_link_info *info)
+{
+ struct _bfd_sparc_elf_link_hash_table *htab;
+ unsigned int i;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ for (i = 0; i < ARRAY_SIZE (sparc_vxworks_shared_plt0_entry); i++)
+ bfd_put_32 (output_bfd, sparc_vxworks_shared_plt0_entry[i],
+ htab->splt->contents + i * 4);
+}
+
+bfd_boolean
+_bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
+{
+ bfd *dynobj;
+ asection *sdyn;
+ struct _bfd_sparc_elf_link_hash_table *htab;
+
+ htab = _bfd_sparc_elf_hash_table (info);
+ dynobj = htab->elf.dynobj;
+
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ 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;
+
+ /* Initialize the contents of the .plt section. */
+ if (splt->size > 0)
+ {
+ if (htab->is_vxworks)
+ {
+ if (info->shared)
+ sparc_vxworks_finish_shared_plt (output_bfd, info);
+ else
+ sparc_vxworks_finish_exec_plt (output_bfd, info);
+ }
+ else
+ {
+ memset (splt->contents, 0, htab->plt_header_size);
+ if (!ABI_64_P (output_bfd))
+ bfd_put_32 (output_bfd, (bfd_vma) SPARC_NOP,
+ splt->contents + splt->size - 4);
+ }
+ }
+
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize
+ = htab->plt_entry_size;
+ }
+
+ /* Set the first entry in the global offset table to the address of
+ the dynamic section. */
+ if (htab->sgot && htab->sgot->size > 0)
+ {
+ bfd_vma val = (sdyn ?
+ sdyn->output_section->vma + sdyn->output_offset :
+ 0);
+
+ SPARC_ELF_PUT_WORD (htab, output_bfd, val, htab->sgot->contents);
+ }
+
+ if (htab->sgot)
+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize =
+ SPARC_ELF_WORD_BYTES (htab);
+
+ return TRUE;
+}
+
+
+/* Set the right machine number for a SPARC ELF file. */
+
+bfd_boolean
+_bfd_sparc_elf_object_p (bfd *abfd)
+{
+ if (ABI_64_P (abfd))
+ {
+ unsigned long mach = bfd_mach_sparc_v9;
+
+ if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
+ mach = bfd_mach_sparc_v9b;
+ else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
+ mach = bfd_mach_sparc_v9a;
+ return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, mach);
+ }
+ else
+ {
+ if (elf_elfheader (abfd)->e_machine == EM_SPARC32PLUS)
+ {
+ if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
+ return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+ bfd_mach_sparc_v8plusb);
+ else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1)
+ return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+ bfd_mach_sparc_v8plusa);
+ else if (elf_elfheader (abfd)->e_flags & EF_SPARC_32PLUS)
+ return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+ bfd_mach_sparc_v8plus);
+ else
+ return FALSE;
+ }
+ else if (elf_elfheader (abfd)->e_flags & EF_SPARC_LEDATA)
+ return bfd_default_set_arch_mach (abfd, bfd_arch_sparc,
+ bfd_mach_sparc_sparclite_le);
+ else
+ return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc);
+ }
+}
+
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+bfd_vma
+_bfd_sparc_elf_plt_sym_val (bfd_vma i, const asection *plt, const arelent *rel)
+{
+ if (ABI_64_P (plt->owner))
+ {
+ bfd_vma j;
+
+ i += PLT64_HEADER_SIZE / PLT64_ENTRY_SIZE;
+ if (i < PLT64_LARGE_THRESHOLD)
+ return plt->vma + i * PLT64_ENTRY_SIZE;
+
+ j = (i - PLT64_LARGE_THRESHOLD) % 160;
+ i -= j;
+ return plt->vma + i * PLT64_ENTRY_SIZE + j * 4 * 6;
+ }
+ else
+ return rel->address;
+}
diff --git a/contrib/binutils/bfd/elfxx-sparc.h b/contrib/binutils/bfd/elfxx-sparc.h
new file mode 100644
index 000000000000..0a5a88b6fe36
--- /dev/null
+++ b/contrib/binutils/bfd/elfxx-sparc.h
@@ -0,0 +1,145 @@
+/* SPARC ELF specific backend routines.
+ Copyright 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "elf/common.h"
+#include "elf/internal.h"
+
+struct _bfd_sparc_elf_section_data
+{
+ struct bfd_elf_section_data elf;
+ unsigned int do_relax, reloc_count;
+};
+
+#define sec_do_relax(sec) \
+ ((struct _bfd_sparc_elf_section_data *) elf_section_data (sec))->do_relax
+#define canon_reloc_count(sec) \
+ ((struct _bfd_sparc_elf_section_data *) elf_section_data (sec))->reloc_count
+
+struct _bfd_sparc_elf_app_reg
+{
+ unsigned char bind;
+ unsigned short shndx;
+ bfd *abfd;
+ char *name;
+};
+
+/* Sparc ELF linker hash table. */
+
+struct _bfd_sparc_elf_link_hash_table
+{
+ struct elf_link_hash_table elf;
+
+ /* Short-cuts to get to dynamic linker sections. */
+ asection *sgot;
+ asection *srelgot;
+ asection *splt;
+ asection *srelplt;
+ asection *sdynbss;
+ asection *srelbss;
+
+ union {
+ bfd_signed_vma refcount;
+ bfd_vma offset;
+ } tls_ldm_got;
+
+ /* Small local sym to section mapping cache. */
+ struct sym_sec_cache sym_sec;
+
+ /* True if the target system is VxWorks. */
+ int is_vxworks;
+
+ /* The (unloaded but important) .rela.plt.unloaded section, for VxWorks. */
+ asection *srelplt2;
+
+ /* .got.plt is only used on VxWorks. */
+ 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 *);
+ const char *dynamic_interpreter;
+ int dynamic_interpreter_size;
+ unsigned int word_align_power;
+ unsigned int align_power_max;
+ unsigned int plt_header_size;
+ unsigned int plt_entry_size;
+ int bytes_per_word;
+ int bytes_per_rela;
+ int dtpoff_reloc;
+ int dtpmod_reloc;
+ int tpoff_reloc;
+
+ struct _bfd_sparc_elf_app_reg app_regs [4];
+};
+
+/* Get the SPARC ELF linker hash table from a link_info structure. */
+
+#define _bfd_sparc_elf_hash_table(p) \
+ ((struct _bfd_sparc_elf_link_hash_table *) ((p)->hash))
+
+extern reloc_howto_type *_bfd_sparc_elf_reloc_type_lookup
+ (bfd *, bfd_reloc_code_real_type);
+extern void _bfd_sparc_elf_info_to_howto
+ (bfd *, arelent *, Elf_Internal_Rela *);
+extern reloc_howto_type *_bfd_sparc_elf_info_to_howto_ptr
+ (unsigned int);
+extern bfd_boolean _bfd_sparc_elf_mkobject
+ (bfd *);
+extern struct bfd_link_hash_table *_bfd_sparc_elf_link_hash_table_create
+ (bfd *);
+extern bfd_boolean _bfd_sparc_elf_create_dynamic_sections
+ (bfd *, struct bfd_link_info *);
+extern void _bfd_sparc_elf_copy_indirect_symbol
+ (struct bfd_link_info *,
+ struct elf_link_hash_entry *,
+ struct elf_link_hash_entry *);
+extern bfd_boolean _bfd_sparc_elf_check_relocs
+ (bfd *, struct bfd_link_info *,
+ asection *, const Elf_Internal_Rela *);
+extern asection *_bfd_sparc_elf_gc_mark_hook
+ (asection *, struct bfd_link_info *,
+ Elf_Internal_Rela *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *);
+extern bfd_boolean _bfd_sparc_elf_gc_sweep_hook
+ (bfd *, struct bfd_link_info *,
+ asection *, const Elf_Internal_Rela *);
+extern bfd_boolean _bfd_sparc_elf_adjust_dynamic_symbol
+ (struct bfd_link_info *, struct elf_link_hash_entry *);
+extern bfd_boolean _bfd_sparc_elf_omit_section_dynsym
+ (bfd *, struct bfd_link_info *, asection *);
+extern bfd_boolean _bfd_sparc_elf_size_dynamic_sections
+ (bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_sparc_elf_new_section_hook
+ (bfd *, asection *);
+extern bfd_boolean _bfd_sparc_elf_relax_section
+ (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
+extern bfd_boolean _bfd_sparc_elf_relocate_section
+ (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
+extern bfd_boolean _bfd_sparc_elf_finish_dynamic_symbol
+ (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *sym);
+extern bfd_boolean _bfd_sparc_elf_finish_dynamic_sections
+ (bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_sparc_elf_object_p
+ (bfd *);
+extern bfd_vma _bfd_sparc_elf_plt_sym_val
+ (bfd_vma, const asection *, const arelent *);
diff --git a/contrib/binutils/bfd/elfxx-target.h b/contrib/binutils/bfd/elfxx-target.h
index e250a97da7a1..503726d2b866 100644
--- a/contrib/binutils/bfd/elfxx-target.h
+++ b/contrib/binutils/bfd/elfxx-target.h
@@ -1,6 +1,6 @@
/* Target definitions for NN-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This structure contains everything that BFD knows about a target.
It includes things like its byte order, name, what routines to call
@@ -26,7 +26,9 @@
There are two such structures here: one for big-endian machines and
one for little-endian machines. */
+#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_get_section_contents
#define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents
@@ -34,12 +36,19 @@
#define bfd_elfNN_canonicalize_dynamic_symtab \
_bfd_elf_canonicalize_dynamic_symtab
+#ifndef bfd_elfNN_get_synthetic_symtab
+#define bfd_elfNN_get_synthetic_symtab \
+ _bfd_elf_get_synthetic_symtab
+#endif
#ifndef bfd_elfNN_canonicalize_reloc
#define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc
#endif
#ifndef bfd_elfNN_find_nearest_line
#define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line
#endif
+#ifndef bfd_elfNN_find_inliner_info
+#define bfd_elfNN_find_inliner_info _bfd_elf_find_inliner_info
+#endif
#define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols
#define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol
#define bfd_elfNN_get_dynamic_symtab_upper_bound \
@@ -68,9 +77,6 @@
#define bfd_elfNN_get_section_contents_in_window \
_bfd_generic_get_section_contents_in_window
-#ifndef elf_backend_got_symbol_offset
-#define elf_backend_got_symbol_offset (bfd_vma) 0
-#endif
#ifndef elf_backend_can_refcount
#define elf_backend_can_refcount 0
#endif
@@ -119,6 +125,9 @@
#ifndef elf_backend_want_got_sym
#define elf_backend_want_got_sym 1
#endif
+#ifndef elf_backend_gc_mark_dynamic_ref
+#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
#endif
@@ -134,8 +143,17 @@
_bfd_elf_merge_sections
#endif
+#ifndef bfd_elfNN_bfd_is_group_section
+#define bfd_elfNN_bfd_is_group_section bfd_elf_is_group_section
+#endif
+
#ifndef bfd_elfNN_bfd_discard_group
-#define bfd_elfNN_bfd_discard_group bfd_elf_discard_group
+#define bfd_elfNN_bfd_discard_group bfd_generic_discard_group
+#endif
+
+#ifndef bfd_elfNN_section_already_linked
+#define bfd_elfNN_section_already_linked \
+ _bfd_elf_section_already_linked
#endif
#ifndef bfd_elfNN_bfd_make_debug_symbol
@@ -152,6 +170,10 @@
#define bfd_elfNN_bfd_copy_private_section_data \
_bfd_elf_copy_private_section_data
#endif
+#ifndef bfd_elfNN_bfd_copy_private_header_data
+#define bfd_elfNN_bfd_copy_private_header_data \
+ _bfd_elf_copy_private_header_data
+#endif
#ifndef bfd_elfNN_bfd_copy_private_bfd_data
#define bfd_elfNN_bfd_copy_private_bfd_data \
_bfd_elf_copy_private_bfd_data
@@ -171,6 +193,10 @@
#ifndef bfd_elfNN_bfd_is_local_label_name
#define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name
#endif
+#ifndef bfd_elfNN_bfd_is_target_special_symbol
+#define bfd_elfNN_bfd_is_target_special_symbol \
+ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
+#endif
#ifndef bfd_elfNN_get_dynamic_reloc_upper_bound
#define bfd_elfNN_get_dynamic_reloc_upper_bound \
@@ -262,6 +288,17 @@
#define ELF_MAXPAGESIZE 1
#endif
+#ifndef ELF_MINPAGESIZE
+#define ELF_MINPAGESIZE 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 \
+ (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS \
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED)
+#endif
+
#ifndef elf_backend_collect
#define elf_backend_collect FALSE
#endif
@@ -284,6 +321,9 @@
#ifndef elf_backend_get_symbol_type
#define elf_backend_get_symbol_type 0
#endif
+#ifndef elf_backend_archive_symbol_lookup
+#define elf_backend_archive_symbol_lookup _bfd_elf_archive_symbol_lookup
+#endif
#ifndef elf_backend_name_local_section_symbols
#define elf_backend_name_local_section_symbols 0
#endif
@@ -291,13 +331,16 @@
#define elf_backend_section_processing 0
#endif
#ifndef elf_backend_section_from_shdr
-#define elf_backend_section_from_shdr 0
+#define elf_backend_section_from_shdr _bfd_elf_make_section_from_shdr
#endif
#ifndef elf_backend_section_flags
#define elf_backend_section_flags 0
#endif
+#ifndef elf_backend_get_sec_type_attr
+#define elf_backend_get_sec_type_attr _bfd_elf_get_sec_type_attr
+#endif
#ifndef elf_backend_section_from_phdr
-#define elf_backend_section_from_phdr 0
+#define elf_backend_section_from_phdr _bfd_elf_make_section_from_phdr
#endif
#ifndef elf_backend_fake_sections
#define elf_backend_fake_sections 0
@@ -314,9 +357,15 @@
#ifndef elf_backend_create_dynamic_sections
#define elf_backend_create_dynamic_sections 0
#endif
+#ifndef elf_backend_omit_section_dynsym
+#define elf_backend_omit_section_dynsym _bfd_elf_link_omit_section_dynsym
+#endif
#ifndef elf_backend_check_relocs
#define elf_backend_check_relocs 0
#endif
+#ifndef elf_backend_check_directives
+#define elf_backend_check_directives 0
+#endif
#ifndef elf_backend_adjust_dynamic_symbol
#define elf_backend_adjust_dynamic_symbol 0
#endif
@@ -371,11 +420,17 @@
#ifndef elf_backend_hide_symbol
#define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol
#endif
+#ifndef elf_backend_fixup_symbol
+#define elf_backend_fixup_symbol NULL
+#endif
#ifndef elf_backend_merge_symbol_attribute
#define elf_backend_merge_symbol_attribute NULL
#endif
+#ifndef elf_backend_ignore_undef_symbol
+#define elf_backend_ignore_undef_symbol NULL
+#endif
#ifndef elf_backend_emit_relocs
-#define elf_backend_emit_relocs NULL
+#define elf_backend_emit_relocs _bfd_elf_link_output_relocs
#endif
#ifndef elf_backend_count_relocs
#define elf_backend_count_relocs NULL
@@ -401,6 +456,12 @@
#ifndef elf_backend_ignore_discarded_relocs
#define elf_backend_ignore_discarded_relocs NULL
#endif
+#ifndef elf_backend_action_discarded
+#define elf_backend_action_discarded _bfd_elf_default_action_discarded
+#endif
+#ifndef elf_backend_eh_frame_address_size
+#define elf_backend_eh_frame_address_size _bfd_elf_eh_frame_address_size
+#endif
#ifndef elf_backend_can_make_relative_eh_frame
#define elf_backend_can_make_relative_eh_frame _bfd_elf_can_make_relative
#endif
@@ -443,6 +504,13 @@
#define elf_backend_rela_normal 0
#endif
+#ifndef elf_backend_plt_sym_val
+#define elf_backend_plt_sym_val NULL
+#endif
+#ifndef elf_backend_relplt_name
+#define elf_backend_relplt_name NULL
+#endif
+
#ifndef ELF_MACHINE_ALT1
#define ELF_MACHINE_ALT1 0
#endif
@@ -463,6 +531,26 @@
#define elf_backend_sign_extend_vma 0
#endif
+#ifndef elf_backend_link_order_error_handler
+#define elf_backend_link_order_error_handler _bfd_default_error_handler
+#endif
+
+#ifndef elf_backend_common_definition
+#define elf_backend_common_definition _bfd_elf_common_definition
+#endif
+
+#ifndef elf_backend_common_section_index
+#define elf_backend_common_section_index _bfd_elf_common_section_index
+#endif
+
+#ifndef elf_backend_common_section
+#define elf_backend_common_section _bfd_elf_common_section
+#endif
+
+#ifndef elf_backend_merge_symbol
+#define elf_backend_merge_symbol NULL
+#endif
+
extern const struct elf_size_info _bfd_elfNN_size_info;
#ifndef INCLUDED_TARGET_FILE
@@ -471,6 +559,8 @@ static const struct elf_backend_data elfNN_bed =
ELF_ARCH, /* arch */
ELF_MACHINE_CODE, /* elf_machine_code */
ELF_MAXPAGESIZE, /* maxpagesize */
+ ELF_MINPAGESIZE, /* minpagesize */
+ ELF_DYNAMIC_SEC_FLAGS, /* dynamic_sec_flags */
elf_info_to_howto,
elf_info_to_howto_rel,
elf_backend_sym_is_global,
@@ -478,17 +568,21 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_symbol_processing,
elf_backend_symbol_table_processing,
elf_backend_get_symbol_type,
+ elf_backend_archive_symbol_lookup,
elf_backend_name_local_section_symbols,
elf_backend_section_processing,
elf_backend_section_from_shdr,
elf_backend_section_flags,
+ elf_backend_get_sec_type_attr,
elf_backend_section_from_phdr,
elf_backend_fake_sections,
elf_backend_section_from_bfd_section,
elf_backend_add_symbol_hook,
elf_backend_link_output_symbol_hook,
elf_backend_create_dynamic_sections,
+ elf_backend_omit_section_dynsym,
elf_backend_check_relocs,
+ elf_backend_check_directives,
elf_backend_adjust_dynamic_symbol,
elf_backend_always_size_sections,
elf_backend_size_dynamic_sections,
@@ -499,6 +593,7 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_final_write_processing,
elf_backend_additional_program_headers,
elf_backend_modify_segment_map,
+ elf_backend_gc_mark_dynamic_ref,
elf_backend_gc_mark_hook,
elf_backend_gc_sweep_hook,
elf_backend_post_process_headers,
@@ -506,7 +601,9 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_output_arch_syms,
elf_backend_copy_indirect_symbol,
elf_backend_hide_symbol,
+ elf_backend_fixup_symbol,
elf_backend_merge_symbol_attribute,
+ elf_backend_ignore_undef_symbol,
elf_backend_emit_relocs,
elf_backend_count_relocs,
elf_backend_grok_prstatus,
@@ -516,6 +613,8 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_reloc_type_class,
elf_backend_discard_info,
elf_backend_ignore_discarded_relocs,
+ elf_backend_action_discarded,
+ elf_backend_eh_frame_address_size,
elf_backend_can_make_relative_eh_frame,
elf_backend_can_make_lsda_relative_eh_frame,
elf_backend_encode_eh_address,
@@ -524,11 +623,17 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_mips_rtype_to_howto,
elf_backend_ecoff_debug_swap,
elf_backend_bfd_from_remote_memory,
+ elf_backend_plt_sym_val,
+ elf_backend_common_definition,
+ elf_backend_common_section_index,
+ elf_backend_common_section,
+ elf_backend_merge_symbol,
+ elf_backend_link_order_error_handler,
+ elf_backend_relplt_name,
ELF_MACHINE_ALT1,
ELF_MACHINE_ALT2,
&elf_backend_size_info,
elf_backend_special_sections,
- elf_backend_got_symbol_offset,
elf_backend_got_header_size,
elf_backend_collect,
elf_backend_type_change_ok,
@@ -577,7 +682,7 @@ const bfd_target TARGET_BIG_SYM =
/* section_flags: mask of all section flags */
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
| SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
- | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
+ | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
/* leading_symbol_char: is the first char of a user symbol
predictable, and if so what is it */
@@ -673,7 +778,7 @@ const bfd_target TARGET_LITTLE_SYM =
/* section_flags: mask of all section flags */
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
| SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
- | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
+ | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
/* leading_symbol_char: is the first char of a user symbol
predictable, and if so what is it */
diff --git a/contrib/binutils/bfd/format.c b/contrib/binutils/bfd/format.c
index 9d9ee86bac40..6a34dd2bea48 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
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
+ 2003, 2005 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
SECTION
@@ -38,6 +38,8 @@ SECTION
The BFD contains the result of an executable core dump.
+SUBSECTION
+ File format functions
*/
#include "bfd.h"
@@ -173,6 +175,14 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
if (matching)
free (matching_vector);
+ /* If the file was opened for update, then `output_has_begun'
+ some time ago when the file was created. Do not recompute
+ sections sizes or alignments in _bfd_set_section_contents.
+ We can not set this flag until after checking the format,
+ because it will interfere with creation of BFD sections. */
+ if (abfd->direction == both_direction)
+ abfd->output_has_begun = TRUE;
+
return TRUE; /* File position has moved, BTW. */
}
@@ -207,7 +217,9 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
const bfd_target *temp;
bfd_error_type err;
- if (*target == &binary_vec)
+ /* Don't check the default target twice. */
+ if (*target == &binary_vec
+ || (!abfd->target_defaulted && *target == save_targ))
continue;
abfd->xvec = *target; /* Change BFD's target temporarily. */
@@ -245,16 +257,6 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
matching_vector[match_count] = temp;
match_count++;
-
-#ifdef GNU960
- /* Big- and little-endian b.out archives look the same, but it
- doesn't matter: there is no difference in their headers, and
- member file byte orders will (I hope) be handled appropriately
- by bfd. Ditto for big and little coff archives. And the 4
- coff/b.out object formats are unambiguous. So accept the
- first match we find. */
- break;
-#endif
}
else if ((err = bfd_get_error ()) == bfd_error_wrong_object_format
|| err == bfd_error_file_ambiguously_recognized)
@@ -329,6 +331,14 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
if (matching)
free (matching_vector);
+ /* If the file was opened for update, then `output_has_begun'
+ some time ago when the file was created. Do not recompute
+ sections sizes or alignments in _bfd_set_section_contents.
+ We can not set this flag until after checking the format,
+ because it will interfere with creation of BFD sections. */
+ if (abfd->direction == both_direction)
+ abfd->output_has_begun = TRUE;
+
return TRUE; /* File position has moved, BTW. */
}
diff --git a/contrib/binutils/bfd/freebsd.h b/contrib/binutils/bfd/freebsd.h
index 5b0ede1acb56..5bc5bbcaa90f 100644
--- a/contrib/binutils/bfd/freebsd.h
+++ b/contrib/binutils/bfd/freebsd.h
@@ -1,23 +1,23 @@
/* BFD back-end definitions used by all FreeBSD targets.
- Copyright 1990, 1991, 1992, 1996, 1997, 2000, 2001, 2002
+ Copyright 1990, 1991, 1992, 1996, 1997, 2000, 2001, 2002, 2005
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
+ USA. */
/* $FreeBSD$ */
@@ -55,7 +55,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
| (((flags) & 0x3f) << 26))
#define N_SET_MACHTYPE(exec, machtype) \
((exec).a_info = \
- ((exec).a_info & 0xfb00ffff) | ((((int)(machtype))&0x3ff) << 16))
+ ((exec).a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
#define N_SET_FLAGS(exec, flags) \
((exec).a_info = \
((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
@@ -67,19 +67,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define SWAP_MAGIC(ext) (freebsd_swap_magic(ext))
-#define MY_bfd_final_link MY(bfd_final_link)
-#define MY_write_object_contents MY(write_object_contents)
-
-static bfd_boolean MY(bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean MY(write_object_contents) PARAMS ((bfd *abfd));
-static long freebsd_swap_magic PARAMS ((void *ext));
+#define MY_bfd_final_link MY (bfd_final_link)
+#define MY_write_object_contents MY (write_object_contents)
+static bfd_boolean MY (bfd_final_link) (bfd *, struct bfd_link_info *);
+static bfd_boolean MY (write_object_contents) (bfd *);
+static long freebsd_swap_magic (void *);
#include "aout-target.h"
static bfd_boolean
-MY(bfd_final_link) (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+MY (bfd_final_link) (bfd *abfd, struct bfd_link_info *info)
{
obj_aout_subformat (abfd) = q_magic_format;
return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
@@ -88,8 +85,7 @@ MY(bfd_final_link) (abfd, info)
/* Swap a magic number. We accept either endian, whichever looks valid. */
static long
-freebsd_swap_magic (ext)
- void *ext;
+freebsd_swap_magic (void *ext)
{
long linfo = bfd_getl32(ext);
long binfo = bfd_getb32(ext);
@@ -108,8 +104,7 @@ freebsd_swap_magic (ext)
file header, symbols, and relocation. */
static bfd_boolean
-MY(write_object_contents) (abfd)
- bfd *abfd;
+MY (write_object_contents) (bfd *abfd)
{
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
@@ -117,26 +112,27 @@ MY(write_object_contents) (abfd)
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
/* Magic number, maestro, please! */
- switch (bfd_get_arch(abfd)) {
- case bfd_arch_m68k:
- if (strcmp (abfd->xvec->name, "a.out-m68k4k-netbsd") == 0)
- N_SET_MACHTYPE(*execp, M_68K4K_NETBSD);
- else
- N_SET_MACHTYPE(*execp, M_68K_NETBSD);
- break;
- case bfd_arch_sparc:
- N_SET_MACHTYPE(*execp, M_SPARC_NETBSD);
- break;
- case bfd_arch_i386:
- N_SET_MACHTYPE(*execp, M_386_NETBSD);
- break;
- case bfd_arch_ns32k:
- N_SET_MACHTYPE(*execp, M_532_NETBSD);
- break;
- default:
- N_SET_MACHTYPE(*execp, M_UNKNOWN);
- break;
- }
+ switch (bfd_get_arch(abfd))
+ {
+ case bfd_arch_m68k:
+ if (strcmp (abfd->xvec->name, "a.out-m68k4k-netbsd") == 0)
+ N_SET_MACHTYPE (*execp, M_68K4K_NETBSD);
+ else
+ N_SET_MACHTYPE (*execp, M_68K_NETBSD);
+ break;
+ case bfd_arch_sparc:
+ N_SET_MACHTYPE (*execp, M_SPARC_NETBSD);
+ break;
+ case bfd_arch_i386:
+ N_SET_MACHTYPE (*execp, M_386_NETBSD);
+ break;
+ case bfd_arch_ns32k:
+ N_SET_MACHTYPE (*execp, M_532_NETBSD);
+ break;
+ default:
+ N_SET_MACHTYPE (*execp, M_UNKNOWN);
+ break;
+ }
WRITE_HEADERS(abfd, execp);
diff --git a/contrib/binutils/bfd/gen-aout.c b/contrib/binutils/bfd/gen-aout.c
index ea207db6e963..c81d3d0027b5 100644
--- a/contrib/binutils/bfd/gen-aout.c
+++ b/contrib/binutils/bfd/gen-aout.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "/usr/include/a.out.h"
#include <stdio.h>
diff --git a/contrib/binutils/bfd/genlink.h b/contrib/binutils/bfd/genlink.h
index bcdc34b15684..175bee6877a0 100644
--- a/contrib/binutils/bfd/genlink.h
+++ b/contrib/binutils/bfd/genlink.h
@@ -1,22 +1,22 @@
/* genlink.h -- interface to the BFD generic linker
- Copyright 1993, 1994, 1996, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996, 2002, 2005 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef GENLINK_H
#define GENLINK_H
@@ -65,7 +65,7 @@ struct generic_link_hash_table
#define _bfd_generic_link_hash_traverse(table, func, info) \
(bfd_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \
(info)))
/* Get the generic link hash table from the info structure. This is
@@ -77,14 +77,13 @@ struct generic_link_hash_table
/* The generic linker reads in the asymbol structures for an input BFD
and keeps them in the outsymbol and symcount fields. */
-#define _bfd_generic_link_get_symbols(abfd) ((abfd)->outsymbols)
+#define _bfd_generic_link_get_symbols(abfd) ((abfd)->outsymbols)
#define _bfd_generic_link_get_symcount(abfd) ((abfd)->symcount)
/* Add the symbols of input_bfd to the symbols being built for
output_bfd. */
extern bfd_boolean _bfd_generic_link_output_symbols
- PARAMS ((bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *,
- size_t *psymalloc));
+ (bfd *, bfd *, struct bfd_link_info *, size_t *);
/* This structure is used to pass information to
_bfd_generic_link_write_global_symbol, which may be called via
@@ -101,11 +100,10 @@ struct generic_write_global_symbol_info
via _bfd_generic_link_hash_traverse. The second argument must
actually be a struct generic_write_global_symbol_info *. */
extern bfd_boolean _bfd_generic_link_write_global_symbol
- PARAMS ((struct generic_link_hash_entry *, PTR));
+ (struct generic_link_hash_entry *, void *);
/* Generic link hash table entry creation routine. */
struct bfd_hash_entry *_bfd_generic_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
- const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
#endif
diff --git a/contrib/binutils/bfd/hash.c b/contrib/binutils/bfd/hash.c
index 58fa5327beef..ce9ba5c6297f 100644
--- a/contrib/binutils/bfd/hash.c
+++ b/contrib/binutils/bfd/hash.c
@@ -1,28 +1,29 @@
/* hash.c -- hash table routines for BFD
- Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002, 2003, 2004, 2005,
+ 2006 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "objalloc.h"
+#include "libiberty.h"
/*
SECTION
@@ -87,6 +88,10 @@ SUBSECTION
been allocated for a hash table. This will not free up the
<<struct bfd_hash_table>> itself, which you must provide.
+@findex bfd_hash_set_default_size
+ Use <<bfd_hash_set_default_size>> to set the default size of
+ hash table to use.
+
INODE
Looking Up or Entering a String, Traversing a Hash Table, Creating and Freeing a Hash Table, Hash Tables
SUBSECTION
@@ -225,20 +230,18 @@ SUBSUBSECTION
EXAMPLE
.struct bfd_hash_entry *
-.@var{function_name} (entry, table, string)
-. struct bfd_hash_entry *entry;
-. struct bfd_hash_table *table;
-. const char *string;
+.@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 == (@var{entry_type} *) NULL)
+. if (ret == NULL)
. {
-. ret = ((@var{entry_type} *)
-. bfd_hash_allocate (table, sizeof (@var{entry_type})));
-. if (ret == (@var{entry_type} *) NULL)
+. ret = bfd_hash_allocate (table, sizeof (* ret));
+. if (ret == NULL)
. return NULL;
. }
.
@@ -295,37 +298,38 @@ SUBSUBSECTION
*/
/* The default number of entries to use when creating a hash table. */
-#define DEFAULT_SIZE (4051)
+#define DEFAULT_SIZE 4051
+static size_t bfd_default_hash_table_size = DEFAULT_SIZE;
/* Create a new hash table, given a number of entries. */
bfd_boolean
-bfd_hash_table_init_n (table, newfunc, size)
- struct bfd_hash_table *table;
- struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *));
- unsigned int size;
+bfd_hash_table_init_n (struct bfd_hash_table *table,
+ struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *),
+ unsigned int entsize,
+ unsigned int size)
{
unsigned int alloc;
alloc = size * sizeof (struct bfd_hash_entry *);
- table->memory = (PTR) objalloc_create ();
+ table->memory = (void *) objalloc_create ();
if (table->memory == NULL)
{
bfd_set_error (bfd_error_no_memory);
return FALSE;
}
- table->table = ((struct bfd_hash_entry **)
- objalloc_alloc ((struct objalloc *) table->memory, alloc));
+ table->table = objalloc_alloc ((struct objalloc *) table->memory, alloc);
if (table->table == NULL)
{
bfd_set_error (bfd_error_no_memory);
return FALSE;
}
- memset ((PTR) table->table, 0, alloc);
+ memset ((void *) table->table, 0, alloc);
table->size = size;
+ table->entsize = entsize;
table->newfunc = newfunc;
return TRUE;
}
@@ -333,37 +337,36 @@ bfd_hash_table_init_n (table, newfunc, size)
/* Create a new hash table with the default number of entries. */
bfd_boolean
-bfd_hash_table_init (table, newfunc)
- struct bfd_hash_table *table;
- struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *));
+bfd_hash_table_init (struct bfd_hash_table *table,
+ struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *),
+ unsigned int entsize)
{
- return bfd_hash_table_init_n (table, newfunc, DEFAULT_SIZE);
+ return bfd_hash_table_init_n (table, newfunc, entsize,
+ bfd_default_hash_table_size);
}
/* Free a hash table. */
void
-bfd_hash_table_free (table)
- struct bfd_hash_table *table;
+bfd_hash_table_free (struct bfd_hash_table *table)
{
- objalloc_free ((struct objalloc *) table->memory);
+ objalloc_free (table->memory);
table->memory = NULL;
}
/* Look up a string in a hash table. */
struct bfd_hash_entry *
-bfd_hash_lookup (table, string, create, copy)
- struct bfd_hash_table *table;
- const char *string;
- bfd_boolean create;
- bfd_boolean copy;
+bfd_hash_lookup (struct bfd_hash_table *table,
+ const char *string,
+ bfd_boolean create,
+ bfd_boolean copy)
{
- register const unsigned char *s;
- register unsigned long hash;
- register unsigned int c;
+ const unsigned char *s;
+ unsigned long hash;
+ unsigned int c;
struct bfd_hash_entry *hashp;
unsigned int len;
unsigned int index;
@@ -382,7 +385,7 @@ bfd_hash_lookup (table, string, create, copy)
index = hash % table->size;
for (hashp = table->table[index];
- hashp != (struct bfd_hash_entry *) NULL;
+ hashp != NULL;
hashp = hashp->next)
{
if (hashp->hash == hash
@@ -391,21 +394,20 @@ bfd_hash_lookup (table, string, create, copy)
}
if (! create)
- return (struct bfd_hash_entry *) NULL;
+ return NULL;
- hashp = (*table->newfunc) ((struct bfd_hash_entry *) NULL, table, string);
- if (hashp == (struct bfd_hash_entry *) NULL)
- return (struct bfd_hash_entry *) NULL;
+ hashp = (*table->newfunc) (NULL, table, string);
+ if (hashp == NULL)
+ return NULL;
if (copy)
{
char *new;
- new = (char *) objalloc_alloc ((struct objalloc *) table->memory,
- len + 1);
+ new = objalloc_alloc ((struct objalloc *) table->memory, len + 1);
if (!new)
{
bfd_set_error (bfd_error_no_memory);
- return (struct bfd_hash_entry *) NULL;
+ return NULL;
}
memcpy (new, string, len + 1);
string = new;
@@ -421,17 +423,16 @@ bfd_hash_lookup (table, string, create, copy)
/* Replace an entry in a hash table. */
void
-bfd_hash_replace (table, old, nw)
- struct bfd_hash_table *table;
- struct bfd_hash_entry *old;
- struct bfd_hash_entry *nw;
+bfd_hash_replace (struct bfd_hash_table *table,
+ struct bfd_hash_entry *old,
+ struct bfd_hash_entry *nw)
{
unsigned int index;
struct bfd_hash_entry **pph;
index = old->hash % table->size;
for (pph = &table->table[index];
- (*pph) != (struct bfd_hash_entry *) NULL;
+ (*pph) != NULL;
pph = &(*pph)->next)
{
if (*pph == old)
@@ -444,28 +445,13 @@ bfd_hash_replace (table, old, nw)
abort ();
}
-/* Base method for creating a new hash table entry. */
-
-struct bfd_hash_entry *
-bfd_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string ATTRIBUTE_UNUSED;
-{
- if (entry == (struct bfd_hash_entry *) NULL)
- entry = ((struct bfd_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct bfd_hash_entry)));
- return entry;
-}
-
/* Allocate space in a hash table. */
-PTR
-bfd_hash_allocate (table, size)
- struct bfd_hash_table *table;
- unsigned int size;
+void *
+bfd_hash_allocate (struct bfd_hash_table *table,
+ unsigned int size)
{
- PTR ret;
+ void * ret;
ret = objalloc_alloc ((struct objalloc *) table->memory, size);
if (ret == NULL && size != 0)
@@ -473,13 +459,24 @@ bfd_hash_allocate (table, size)
return ret;
}
+/* Base method for creating a new hash table entry. */
+
+struct bfd_hash_entry *
+bfd_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string ATTRIBUTE_UNUSED)
+{
+ if (entry == NULL)
+ entry = bfd_hash_allocate (table, sizeof (* entry));
+ return entry;
+}
+
/* Traverse a hash table. */
void
-bfd_hash_traverse (table, func, info)
- struct bfd_hash_table *table;
- bfd_boolean (*func) PARAMS ((struct bfd_hash_entry *, PTR));
- PTR info;
+bfd_hash_traverse (struct bfd_hash_table *table,
+ bfd_boolean (*func) (struct bfd_hash_entry *, void *),
+ void * info)
{
unsigned int i;
@@ -488,13 +485,29 @@ bfd_hash_traverse (table, func, info)
struct bfd_hash_entry *p;
for (p = table->table[i]; p != NULL; p = p->next)
- {
- if (! (*func) (p, info))
- return;
- }
+ if (! (*func) (p, info))
+ return;
}
}
+void
+bfd_hash_set_default_size (bfd_size_type hash_size)
+{
+ /* Extend this prime list if you want more granularity of hash table size. */
+ static const bfd_size_type hash_size_primes[] =
+ {
+ 251, 509, 1021, 2039, 4051, 8599, 16699, 32749
+ };
+ size_t index;
+
+ /* Work out best prime number near the hash_size. */
+ for (index = 0; index < ARRAY_SIZE (hash_size_primes) - 1; ++index)
+ if (hash_size <= hash_size_primes[index])
+ break;
+
+ bfd_default_hash_table_size = hash_size_primes[index];
+}
+
/* A few different object file formats (a.out, COFF, ELF) use a string
table. These functions support adding strings to a string table,
returning the byte offset, and writing out the table.
@@ -534,30 +547,25 @@ struct bfd_strtab_hash
bfd_boolean xcoff;
};
-static struct bfd_hash_entry *strtab_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-
/* Routine to create an entry in a strtab. */
static struct bfd_hash_entry *
-strtab_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+strtab_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct strtab_hash_entry *ret = (struct strtab_hash_entry *) entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct strtab_hash_entry *) NULL)
- ret = ((struct strtab_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct strtab_hash_entry)));
- if (ret == (struct strtab_hash_entry *) NULL)
+ if (ret == NULL)
+ ret = bfd_hash_allocate (table, sizeof (* ret));
+ if (ret == NULL)
return NULL;
/* Call the allocation method of the superclass. */
- ret = ((struct strtab_hash_entry *)
- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
+ ret = (struct strtab_hash_entry *)
+ bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string);
if (ret)
{
@@ -578,16 +586,17 @@ strtab_hash_newfunc (entry, table, string)
/* Create a new strtab. */
struct bfd_strtab_hash *
-_bfd_stringtab_init ()
+_bfd_stringtab_init (void)
{
struct bfd_strtab_hash *table;
- bfd_size_type amt = sizeof (struct bfd_strtab_hash);
+ bfd_size_type amt = sizeof (* table);
- table = (struct bfd_strtab_hash *) bfd_malloc (amt);
+ table = bfd_malloc (amt);
if (table == NULL)
return NULL;
- if (! bfd_hash_table_init (&table->table, strtab_hash_newfunc))
+ if (!bfd_hash_table_init (&table->table, strtab_hash_newfunc,
+ sizeof (struct strtab_hash_entry)))
{
free (table);
return NULL;
@@ -606,7 +615,7 @@ _bfd_stringtab_init ()
string. */
struct bfd_strtab_hash *
-_bfd_xcoff_stringtab_init ()
+_bfd_xcoff_stringtab_init (void)
{
struct bfd_strtab_hash *ret;
@@ -619,8 +628,7 @@ _bfd_xcoff_stringtab_init ()
/* Free a strtab. */
void
-_bfd_stringtab_free (table)
- struct bfd_strtab_hash *table;
+_bfd_stringtab_free (struct bfd_strtab_hash *table)
{
bfd_hash_table_free (&table->table);
free (table);
@@ -631,13 +639,12 @@ _bfd_stringtab_free (table)
table, and we don't eliminate duplicate strings. */
bfd_size_type
-_bfd_stringtab_add (tab, str, hash, copy)
- struct bfd_strtab_hash *tab;
- const char *str;
- bfd_boolean hash;
- bfd_boolean copy;
+_bfd_stringtab_add (struct bfd_strtab_hash *tab,
+ const char *str,
+ bfd_boolean hash,
+ bfd_boolean copy)
{
- register struct strtab_hash_entry *entry;
+ struct strtab_hash_entry *entry;
if (hash)
{
@@ -647,9 +654,7 @@ _bfd_stringtab_add (tab, str, hash, copy)
}
else
{
- entry = ((struct strtab_hash_entry *)
- bfd_hash_allocate (&tab->table,
- sizeof (struct strtab_hash_entry)));
+ entry = bfd_hash_allocate (&tab->table, sizeof (* entry));
if (entry == NULL)
return (bfd_size_type) -1;
if (! copy)
@@ -658,7 +663,7 @@ _bfd_stringtab_add (tab, str, hash, copy)
{
char *n;
- n = (char *) bfd_hash_allocate (&tab->table, strlen (str) + 1);
+ n = bfd_hash_allocate (&tab->table, strlen (str) + 1);
if (n == NULL)
return (bfd_size_type) -1;
entry->root.string = n;
@@ -689,8 +694,7 @@ _bfd_stringtab_add (tab, str, hash, copy)
/* Get the number of bytes in a strtab. */
bfd_size_type
-_bfd_stringtab_size (tab)
- struct bfd_strtab_hash *tab;
+_bfd_stringtab_size (struct bfd_strtab_hash *tab)
{
return tab->size;
}
@@ -699,12 +703,10 @@ _bfd_stringtab_size (tab)
the file. */
bfd_boolean
-_bfd_stringtab_emit (abfd, tab)
- register bfd *abfd;
- struct bfd_strtab_hash *tab;
+_bfd_stringtab_emit (bfd *abfd, struct bfd_strtab_hash *tab)
{
- register bfd_boolean xcoff;
- register struct strtab_hash_entry *entry;
+ bfd_boolean xcoff;
+ struct strtab_hash_entry *entry;
xcoff = tab->xcoff;
@@ -722,11 +724,11 @@ _bfd_stringtab_emit (abfd, tab)
/* The output length includes the null byte. */
bfd_put_16 (abfd, (bfd_vma) len, buf);
- if (bfd_bwrite ((PTR) buf, (bfd_size_type) 2, abfd) != 2)
+ if (bfd_bwrite ((void *) buf, (bfd_size_type) 2, abfd) != 2)
return FALSE;
}
- if (bfd_bwrite ((PTR) str, (bfd_size_type) len, abfd) != len)
+ if (bfd_bwrite ((void *) str, (bfd_size_type) len, abfd) != len)
return FALSE;
}
diff --git a/contrib/binutils/bfd/host-aout.c b/contrib/binutils/bfd/host-aout.c
index 5cbb5df763bb..902a0206696c 100644
--- a/contrib/binutils/bfd/host-aout.c
+++ b/contrib/binutils/bfd/host-aout.c
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/i386aout.c b/contrib/binutils/bfd/i386aout.c
index 6b2948ef4cc8..128e9d20dc04 100644
--- a/contrib/binutils/bfd/i386aout.c
+++ b/contrib/binutils/bfd/i386aout.c
@@ -1,23 +1,22 @@
/* BFD back-end for i386 a.out binaries.
- Copyright 1990, 1991, 1992, 1994, 1996, 1997, 2001, 2002, 2003
+ Copyright 1990, 1991, 1992, 1994, 1996, 1997, 2001, 2002, 2003, 2005
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.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ This 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. */
/* The only 386 aout system we have here is GO32 from DJ.
These numbers make BFD work with that. If your aout 386 system
@@ -25,20 +24,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
files. Send me (sac@cygnus.com) the runes to make it work on your
system, and I'll stick it in for the next release. */
-#define N_HEADER_IN_TEXT(x) 0
-
-#define N_TXTOFF(x) 0x20
-#define N_TXTADDR(x) (N_MAGIC(x)==ZMAGIC ? 0x1020 : 0)
-
-#define N_TXTSIZE(x) ((x).a_text)
-#if 0
-#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+(x).a_text) : (SEGMENT_SIZE + ((0x1020+(x).a_text-1) & ~(SEGMENT_SIZE-1))))
-#define NOSUBEXECB
-
-#endif
-#define TARGET_PAGE_SIZE 4096
-#define SEGMENT_SIZE 0x400000
-#define DEFAULT_ARCH bfd_arch_i386
+#define N_HEADER_IN_TEXT(x) 0
+#define N_TXTOFF(x) 0x20
+#define N_TXTADDR(x) (N_MAGIC (x) == ZMAGIC ? 0x1020 : 0)
+#define N_TXTSIZE(x) ((x).a_text)
+#define TARGET_PAGE_SIZE 4096
+#define SEGMENT_SIZE 0x400000
+#define DEFAULT_ARCH bfd_arch_i386
/* Do not "beautify" the CONCAT* macro args. Traditional C will not
remove whitespace added here, and thus will fail to concatenate
@@ -53,14 +45,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "aout/aout64.h"
#include "libaout.h"
-static bfd_boolean i386aout_write_object_contents PARAMS ((bfd *));
-static bfd_boolean MY (set_sizes) PARAMS ((bfd *));
-
/* Set the machine type correctly. */
static bfd_boolean
-i386aout_write_object_contents (abfd)
- bfd *abfd;
+i386aout_write_object_contents (bfd *abfd)
{
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
@@ -74,23 +62,26 @@ i386aout_write_object_contents (abfd)
return TRUE;
}
-#define MY_write_object_contents i386aout_write_object_contents
-
-#define MY_backend_data &MY(backend_data)
-static const struct aout_backend_data MY(backend_data) = {
- 0, /* zmagic contiguous */
- 1, /* text incl header */
- 0, /* entry is text address */
- 0, /* exec_hdr_flags */
- 0, /* text vma? */
- MY(set_sizes),
- 1, /* exec header not counted */
- 0, /* add_dynamic_symbols */
- 0, /* add_one_symbol */
- 0, /* link_dynamic_object */
- 0, /* write_dynamic_symbol */
- 0, /* check_dynamic_reloc */
- 0 /* finish_dynamic_link */
-};
+#define MY_write_object_contents i386aout_write_object_contents
+#define MY_backend_data & MY (backend_data)
+
+static const struct aout_backend_data MY (backend_data);
#include "aout-target.h"
+
+static const struct aout_backend_data MY (backend_data) =
+{
+ 0, /* Zmagic contiguous. */
+ 1, /* Text incl header. */
+ 0, /* Entry is text address. */
+ 0, /* Exec_hdr_flags. */
+ 0, /* Text vma? */
+ MY (set_sizes),
+ 1, /* Exec header not counted. */
+ 0, /* Add_dynamic_symbols. */
+ 0, /* Add_one_symbol. */
+ 0, /* Link_dynamic_object. */
+ 0, /* Write_dynamic_symbol. */
+ 0, /* Check_dynamic_reloc. */
+ 0 /* Finish_dynamic_link. */
+};
diff --git a/contrib/binutils/bfd/i386bsd.c b/contrib/binutils/bfd/i386bsd.c
index e21a9ca93410..3f98ee4025cb 100644
--- a/contrib/binutils/bfd/i386bsd.c
+++ b/contrib/binutils/bfd/i386bsd.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This data should be correct for the format used under all the various
BSD ports for 386 machines. */
diff --git a/contrib/binutils/bfd/i386freebsd.c b/contrib/binutils/bfd/i386freebsd.c
index 73fa0ca6014a..57b38a7cac34 100644
--- a/contrib/binutils/bfd/i386freebsd.c
+++ b/contrib/binutils/bfd/i386freebsd.c
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define BYTES_IN_WORD 4
#undef TARGET_IS_BIG_ENDIAN_P
diff --git a/contrib/binutils/bfd/i386linux.c b/contrib/binutils/bfd/i386linux.c
index da36e75c7843..17c618006ff3 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, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003,
+ 2004, 2006 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_PAGE_SIZE 4096
#define ZMAGIC_DISK_BLOCK_SIZE 1024
@@ -231,8 +231,9 @@ linux_link_hash_table_create (abfd)
ret = (struct linux_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == (struct linux_link_hash_table *) NULL)
return (struct bfd_link_hash_table *) NULL;
- if (! NAME(aout,link_hash_table_init) (&ret->root, abfd,
- linux_link_hash_newfunc))
+ if (!NAME(aout,link_hash_table_init) (&ret->root, abfd,
+ linux_link_hash_newfunc,
+ sizeof (struct linux_link_hash_entry)))
{
free (ret);
return (struct bfd_link_hash_table *) NULL;
@@ -316,7 +317,7 @@ linux_link_create_dynamic_sections (abfd, info)
|| ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
- s->_raw_size = 0;
+ s->size = 0;
s->contents = 0;
return TRUE;
@@ -594,9 +595,9 @@ bfd_i386linux_size_dynamic_sections (output_bfd, info)
".linux-dynamic");
if (s != NULL)
{
- s->_raw_size = linux_hash_table (info)->fixup_count + 1;
- s->_raw_size *= 8;
- s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
+ s->size = linux_hash_table (info)->fixup_count + 1;
+ s->size *= 8;
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -761,7 +762,7 @@ linux_finish_dynamic_link (output_bfd, info)
SEEK_SET) != 0)
return FALSE;
- if (bfd_bwrite ((PTR) s->contents, s->_raw_size, output_bfd) != s->_raw_size)
+ if (bfd_bwrite ((PTR) s->contents, s->size, output_bfd) != s->size)
return FALSE;
return TRUE;
diff --git a/contrib/binutils/bfd/i386netbsd.c b/contrib/binutils/bfd/i386netbsd.c
index 26fa30e9e8aa..d0116703f90f 100644
--- a/contrib/binutils/bfd/i386netbsd.c
+++ b/contrib/binutils/bfd/i386netbsd.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define BYTES_IN_WORD 4
#undef TARGET_IS_BIG_ENDIAN_P
diff --git a/contrib/binutils/bfd/ieee.c b/contrib/binutils/bfd/ieee.c
index 8a0802840d49..be8455c617f8 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
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define KEEPMINUSPCININST 0
@@ -40,181 +40,47 @@ struct output_buffer_struct
int buffer;
};
-static bfd_boolean ieee_write_byte
- PARAMS ((bfd *, int));
-static bfd_boolean ieee_write_2bytes
- PARAMS ((bfd *, int));
-static bfd_boolean ieee_write_int
- PARAMS ((bfd *, bfd_vma));
-static bfd_boolean ieee_write_id
- PARAMS ((bfd *, const char *));
-static unsigned short read_2bytes
- PARAMS ((common_header_type *));
-static void bfd_get_string
- PARAMS ((common_header_type *, char *, size_t));
-static char *read_id
- PARAMS ((common_header_type *));
-static bfd_boolean ieee_write_expression
- PARAMS ((bfd *, bfd_vma, asymbol *, bfd_boolean, unsigned int));
-static void ieee_write_int5
- PARAMS ((bfd_byte *, bfd_vma));
-static bfd_boolean ieee_write_int5_out
- PARAMS ((bfd *, bfd_vma));
-static bfd_boolean parse_int
- PARAMS ((common_header_type *, bfd_vma *));
-static int parse_i
- PARAMS ((common_header_type *, bfd_boolean *));
-static bfd_vma must_parse_int
- PARAMS ((common_header_type *));
-static void parse_expression
- PARAMS ((ieee_data_type *, bfd_vma *, ieee_symbol_index_type *,
- bfd_boolean *, unsigned int *, asection **));
-static file_ptr ieee_part_after
- PARAMS ((ieee_data_type *, file_ptr));
-static ieee_symbol_type *get_symbol
- PARAMS ((bfd *, ieee_data_type *, ieee_symbol_type *, unsigned int *,
- ieee_symbol_type ***, unsigned int *, int));
-static bfd_boolean ieee_slurp_external_symbols
- PARAMS ((bfd *));
-static bfd_boolean ieee_slurp_symbol_table
- PARAMS ((bfd *));
-static long ieee_get_symtab_upper_bound
- PARAMS ((bfd *));
-static long ieee_canonicalize_symtab
- PARAMS ((bfd *, asymbol **));
-static asection *get_section_entry
- PARAMS ((bfd *, ieee_data_type *i, unsigned int));
-static void ieee_slurp_sections
- PARAMS ((bfd *));
-static bfd_boolean ieee_slurp_debug
- PARAMS ((bfd *));
-const bfd_target *ieee_archive_p
- PARAMS ((bfd *));
-const bfd_target *ieee_object_p
- PARAMS ((bfd *));
-static void ieee_get_symbol_info
- PARAMS ((bfd *, asymbol *, symbol_info *));
-static void ieee_print_symbol
- PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
-static bfd_boolean do_one
- PARAMS ((ieee_data_type *, ieee_per_section_type *, unsigned char *,
- asection *, int));
-static bfd_boolean ieee_slurp_section_data
- PARAMS ((bfd *));
-static bfd_boolean ieee_new_section_hook
- PARAMS ((bfd *, asection *));
-static long ieee_get_reloc_upper_bound
- PARAMS ((bfd *, sec_ptr));
-static bfd_boolean ieee_get_section_contents
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
-static long ieee_canonicalize_reloc
- PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
-static int comp
- PARAMS ((const PTR, const PTR));
-static bfd_boolean ieee_write_section_part
- PARAMS ((bfd *));
-static bfd_boolean do_with_relocs
- PARAMS ((bfd *, asection *));
-static bfd_boolean do_as_repeat
- PARAMS ((bfd *, asection *));
-static bfd_boolean do_without_relocs
- PARAMS ((bfd *, asection *));
-static bfd_boolean ieee_mkobject
- PARAMS ((bfd *));
-static void fill
- PARAMS ((void));
-static void flush
- PARAMS ((void));
-static void write_int
- PARAMS ((int));
-static void copy_id
- PARAMS ((void));
-static void copy_expression
- PARAMS ((void));
-static void fill_int
- PARAMS ((struct output_buffer_struct *));
-static void drop_int
- PARAMS ((struct output_buffer_struct *));
-static void copy_int
- PARAMS ((void));
-static void f1_record
- PARAMS ((void));
-static void f0_record
- PARAMS ((void));
-static void copy_till_end
- PARAMS ((void));
-static void f2_record
- PARAMS ((void));
-static void f8_record
- PARAMS ((void));
-static void e2_record
- PARAMS ((void));
-static void block
- PARAMS ((void));
-static void relocate_debug
- PARAMS ((bfd *, bfd *));
-static bfd_boolean ieee_write_debug_part
- PARAMS ((bfd *));
-static bfd_boolean ieee_write_data_part
- PARAMS ((bfd *));
-static bfd_boolean init_for_output
- PARAMS ((bfd *));
-static bfd_boolean ieee_set_section_contents
- PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
-static bfd_boolean ieee_write_external_part
- PARAMS ((bfd *));
-static bfd_boolean ieee_write_me_part
- PARAMS ((bfd *));
-static bfd_boolean ieee_write_processor
- PARAMS ((bfd *));
-static bfd_boolean ieee_write_object_contents
- PARAMS ((bfd *));
-static asymbol *ieee_make_empty_symbol
- PARAMS ((bfd *));
-static bfd *ieee_openr_next_archived_file
- PARAMS ((bfd *, bfd *));
-static bfd_boolean ieee_find_nearest_line
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
-static int ieee_generic_stat_arch_elt
- PARAMS ((bfd *, struct stat *));
-static int ieee_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+static unsigned char *output_ptr_start;
+static unsigned char *output_ptr;
+static unsigned char *output_ptr_end;
+static unsigned char *input_ptr_start;
+static unsigned char *input_ptr;
+static unsigned char *input_ptr_end;
+static bfd *input_bfd;
+static bfd *output_bfd;
+static int output_buffer;
+
+
+static void block (void);
/* Functions for writing to ieee files in the strange way that the
- standard requires. */
+ standard requires. */
static bfd_boolean
-ieee_write_byte (abfd, barg)
- bfd *abfd;
- int barg;
+ieee_write_byte (bfd *abfd, int barg)
{
bfd_byte byte;
byte = barg;
- if (bfd_bwrite ((PTR) &byte, (bfd_size_type) 1, abfd) != 1)
+ if (bfd_bwrite ((void *) &byte, (bfd_size_type) 1, abfd) != 1)
return FALSE;
return TRUE;
}
static bfd_boolean
-ieee_write_2bytes (abfd, bytes)
- bfd *abfd;
- int bytes;
+ieee_write_2bytes (bfd *abfd, int bytes)
{
bfd_byte buffer[2];
buffer[0] = bytes >> 8;
buffer[1] = bytes & 0xff;
- if (bfd_bwrite ((PTR) buffer, (bfd_size_type) 2, abfd) != 2)
+ if (bfd_bwrite ((void *) buffer, (bfd_size_type) 2, abfd) != 2)
return FALSE;
return TRUE;
}
static bfd_boolean
-ieee_write_int (abfd, value)
- bfd *abfd;
- bfd_vma value;
+ieee_write_int (bfd *abfd, bfd_vma value)
{
if (value <= 127)
{
@@ -264,9 +130,7 @@ ieee_write_int (abfd, value)
}
static bfd_boolean
-ieee_write_id (abfd, id)
- bfd *abfd;
- const char *id;
+ieee_write_id (bfd *abfd, const char *id)
{
size_t length = strlen (id);
@@ -296,7 +160,7 @@ ieee_write_id (abfd, id)
return FALSE;
}
- if (bfd_bwrite ((PTR) id, (bfd_size_type) length, abfd) != length)
+ if (bfd_bwrite ((void *) id, (bfd_size_type) length, abfd) != length)
return FALSE;
return TRUE;
}
@@ -304,13 +168,12 @@ ieee_write_id (abfd, id)
/* Functions for reading from ieee files in the strange way that the
standard requires. */
-#define this_byte(ieee) *((ieee)->input_p)
-#define next_byte(ieee) ((ieee)->input_p++)
+#define this_byte(ieee) *((ieee)->input_p)
+#define next_byte(ieee) ((ieee)->input_p++)
#define this_byte_and_next(ieee) (*((ieee)->input_p++))
static unsigned short
-read_2bytes (ieee)
- common_header_type *ieee;
+read_2bytes (common_header_type *ieee)
{
unsigned char c1 = this_byte_and_next (ieee);
unsigned char c2 = this_byte_and_next (ieee);
@@ -319,10 +182,7 @@ read_2bytes (ieee)
}
static void
-bfd_get_string (ieee, string, length)
- common_header_type *ieee;
- char *string;
- size_t length;
+bfd_get_string (common_header_type *ieee, char *string, size_t length)
{
size_t i;
@@ -331,22 +191,20 @@ bfd_get_string (ieee, string, length)
}
static char *
-read_id (ieee)
- common_header_type *ieee;
+read_id (common_header_type *ieee)
{
size_t length;
char *string;
length = this_byte_and_next (ieee);
if (length <= 0x7f)
- {
- /* Simple string of length 0 to 127. */
- }
+ /* Simple string of length 0 to 127. */
+ ;
+
else if (length == 0xde)
- {
- /* Length is next byte, allowing 0..255. */
- length = this_byte_and_next (ieee);
- }
+ /* Length is next byte, allowing 0..255. */
+ length = this_byte_and_next (ieee);
+
else if (length == 0xdf)
{
/* Length is next two bytes, allowing 0..65535. */
@@ -364,12 +222,11 @@ read_id (ieee)
}
static bfd_boolean
-ieee_write_expression (abfd, value, symbol, pcrel, index)
- bfd *abfd;
- bfd_vma value;
- asymbol *symbol;
- bfd_boolean pcrel;
- unsigned int index;
+ieee_write_expression (bfd *abfd,
+ bfd_vma value,
+ asymbol *symbol,
+ bfd_boolean pcrel,
+ unsigned int index)
{
unsigned int term_count = 0;
@@ -396,7 +253,6 @@ ieee_write_expression (abfd, value, symbol, pcrel, index)
else if (! bfd_is_abs_section (symbol->section))
{
/* Ref to defined symbol - */
-
if (symbol->flags & BSF_GLOBAL)
{
if (! ieee_write_byte (abfd, ieee_variable_I_enum)
@@ -462,9 +318,7 @@ ieee_write_expression (abfd, value, symbol, pcrel, index)
/* Writes any integer into the buffer supplied and always takes 5 bytes. */
static void
-ieee_write_int5 (buffer, value)
- bfd_byte *buffer;
- bfd_vma value;
+ieee_write_int5 (bfd_byte *buffer, bfd_vma value)
{
buffer[0] = (bfd_byte) ieee_number_repeat_4_enum;
buffer[1] = (value >> 24) & 0xff;
@@ -474,22 +328,18 @@ ieee_write_int5 (buffer, value)
}
static bfd_boolean
-ieee_write_int5_out (abfd, value)
- bfd *abfd;
- bfd_vma value;
+ieee_write_int5_out (bfd *abfd, bfd_vma value)
{
bfd_byte b[5];
ieee_write_int5 (b, value);
- if (bfd_bwrite ((PTR) b, (bfd_size_type) 5, abfd) != 5)
+ if (bfd_bwrite ((void *) b, (bfd_size_type) 5, abfd) != 5)
return FALSE;
return TRUE;
}
static bfd_boolean
-parse_int (ieee, value_ptr)
- common_header_type *ieee;
- bfd_vma *value_ptr;
+parse_int (common_header_type *ieee, bfd_vma *value_ptr)
{
int value = this_byte (ieee);
int result;
@@ -518,9 +368,7 @@ parse_int (ieee, value_ptr)
}
static int
-parse_i (ieee, ok)
- common_header_type *ieee;
- bfd_boolean *ok;
+parse_i (common_header_type *ieee, bfd_boolean *ok)
{
bfd_vma x;
*ok = parse_int (ieee, &x);
@@ -528,8 +376,7 @@ parse_i (ieee, ok)
}
static bfd_vma
-must_parse_int (ieee)
- common_header_type *ieee;
+must_parse_int (common_header_type *ieee)
{
bfd_vma result;
BFD_ASSERT (parse_int (ieee, &result));
@@ -649,29 +496,28 @@ static reloc_howto_type rel8_howto =
static ieee_symbol_index_type NOSYMBOL = {0, 0};
static void
-parse_expression (ieee, value, symbol, pcrel, extra, section)
- ieee_data_type *ieee;
- bfd_vma *value;
- ieee_symbol_index_type *symbol;
- bfd_boolean *pcrel;
- unsigned int *extra;
- asection **section;
+parse_expression (ieee_data_type *ieee,
+ bfd_vma *value,
+ ieee_symbol_index_type *symbol,
+ bfd_boolean *pcrel,
+ unsigned int *extra,
+ asection **section)
{
+ bfd_boolean loop = TRUE;
+ ieee_value_type stack[10];
+ ieee_value_type *sp = stack;
+ asection *dummy;
+
#define POS sp[1]
#define TOS sp[0]
#define NOS sp[-1]
#define INC sp++;
#define DEC sp--;
- bfd_boolean loop = TRUE;
- ieee_value_type stack[10];
-
/* The stack pointer always points to the next unused location. */
-#define PUSH(x,y,z) TOS.symbol=x;TOS.section=y;TOS.value=z;INC;
-#define POP(x,y,z) DEC;x=TOS.symbol;y=TOS.section;z=TOS.value;
- ieee_value_type *sp = stack;
- asection *dummy;
+#define PUSH(x,y,z) TOS.symbol = x; TOS.section = y; TOS.value = z; INC;
+#define POP(x,y,z) DEC; x = TOS.symbol; y = TOS.section; z = TOS.value;
while (loop && ieee->h.input_p < ieee->h.last_byte)
{
@@ -704,12 +550,13 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
next_byte (&(ieee->h));
PUSH (NOSYMBOL,
0,
- ieee->section_table[must_parse_int (&(ieee->h))]->_raw_size);
+ ieee->section_table[must_parse_int (&(ieee->h))]->size);
break;
case ieee_variable_I_enum:
/* Push the address of variable n. */
{
ieee_symbol_index_type sy;
+
next_byte (&(ieee->h));
sy.index = (int) must_parse_int (&(ieee->h));
sy.letter = 'I';
@@ -721,6 +568,7 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
/* Push the address of external variable n. */
{
ieee_symbol_index_type sy;
+
next_byte (&(ieee->h));
sy.index = (int) (must_parse_int (&(ieee->h)));
sy.letter = 'X';
@@ -733,6 +581,7 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
bfd_vma value1, value2;
asection *section1, *section_dummy;
ieee_symbol_index_type sy;
+
next_byte (&(ieee->h));
POP (sy, section1, value1);
@@ -747,6 +596,7 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
asection *section2;
ieee_symbol_index_type sy1;
ieee_symbol_index_type sy2;
+
next_byte (&(ieee->h));
POP (sy1, section1, value1);
@@ -759,6 +609,7 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
default:
{
bfd_vma va;
+
BFD_ASSERT (this_byte (&(ieee->h)) < (int) ieee_variable_A_enum
|| this_byte (&(ieee->h)) > (int) ieee_variable_Z_enum);
if (parse_int (&(ieee->h), &va))
@@ -766,10 +617,8 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
PUSH (NOSYMBOL, bfd_abs_section_ptr, va);
}
else
- {
- /* Thats all that we can understand. */
- loop = FALSE;
- }
+ /* Thats all that we can understand. */
+ loop = FALSE;
}
}
}
@@ -784,6 +633,7 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
{
asection *section1;
ieee_symbol_index_type sy1;
+
POP (sy1, section1, *extra);
}
@@ -808,9 +658,7 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
/* Find the first part of the ieee file after HERE. */
static file_ptr
-ieee_part_after (ieee, here)
- ieee_data_type *ieee;
- file_ptr here;
+ieee_part_after (ieee_data_type *ieee, file_ptr here)
{
int part;
file_ptr after = ieee->w.r.me_record;
@@ -828,14 +676,13 @@ static unsigned int last_index;
static char last_type; /* Is the index for an X or a D. */
static ieee_symbol_type *
-get_symbol (abfd, ieee, last_symbol, symbol_count, pptr, max_index, this_type)
- bfd *abfd ATTRIBUTE_UNUSED;
- ieee_data_type *ieee;
- ieee_symbol_type *last_symbol;
- unsigned int *symbol_count;
- ieee_symbol_type ***pptr;
- unsigned int *max_index;
- int this_type;
+get_symbol (bfd *abfd ATTRIBUTE_UNUSED,
+ ieee_data_type *ieee,
+ ieee_symbol_type *last_symbol,
+ unsigned int *symbol_count,
+ ieee_symbol_type ***pptr,
+ unsigned int *max_index,
+ int this_type)
{
/* Need a new symbol. */
unsigned int new_index = must_parse_int (&(ieee->h));
@@ -845,7 +692,7 @@ get_symbol (abfd, ieee, last_symbol, symbol_count, pptr, max_index, this_type)
ieee_symbol_type *new_symbol;
bfd_size_type amt = sizeof (ieee_symbol_type);
- new_symbol = (ieee_symbol_type *) bfd_alloc (ieee->h.abfd, amt);
+ new_symbol = bfd_alloc (ieee->h.abfd, amt);
if (!new_symbol)
return NULL;
@@ -865,17 +712,17 @@ get_symbol (abfd, ieee, last_symbol, symbol_count, pptr, max_index, this_type)
}
static bfd_boolean
-ieee_slurp_external_symbols (abfd)
- bfd *abfd;
+ieee_slurp_external_symbols (bfd *abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
file_ptr offset = ieee->w.r.external_part;
ieee_symbol_type **prev_symbols_ptr = &ieee->external_symbols;
ieee_symbol_type **prev_reference_ptr = &ieee->external_reference;
- ieee_symbol_type *symbol = (ieee_symbol_type *) NULL;
+ ieee_symbol_type *symbol = NULL;
unsigned int symbol_count = 0;
bfd_boolean loop = TRUE;
+
last_index = 0xffffff;
ieee->symbol_table_full = TRUE;
@@ -889,14 +736,14 @@ ieee_slurp_external_symbols (abfd)
next_byte (&(ieee->h));
symbol = get_symbol (abfd, ieee, symbol, &symbol_count,
- &prev_symbols_ptr,
- &ieee->external_symbol_max_index, 'I');
+ & prev_symbols_ptr,
+ & ieee->external_symbol_max_index, 'I');
if (symbol == NULL)
return FALSE;
symbol->symbol.the_bfd = abfd;
symbol->symbol.name = read_id (&(ieee->h));
- symbol->symbol.udata.p = (PTR) NULL;
+ symbol->symbol.udata.p = NULL;
symbol->symbol.flags = BSF_NO_FLAGS;
break;
case ieee_external_symbol_enum:
@@ -912,7 +759,7 @@ ieee_slurp_external_symbols (abfd)
symbol->symbol.the_bfd = abfd;
symbol->symbol.name = read_id (&(ieee->h));
- symbol->symbol.udata.p = (PTR) NULL;
+ symbol->symbol.udata.p = NULL;
symbol->symbol.flags = BSF_NO_FLAGS;
break;
case ieee_attribute_record_enum >> 8:
@@ -921,6 +768,7 @@ ieee_slurp_external_symbols (abfd)
unsigned int symbol_type_index;
unsigned int symbol_attribute_def;
bfd_vma value;
+
switch (read_2bytes (&ieee->h))
{
case ieee_attribute_record_enum:
@@ -935,9 +783,8 @@ ieee_slurp_external_symbols (abfd)
break;
default:
(*_bfd_error_handler)
- (_("%s: unimplemented ATI record %u for symbol %u"),
- bfd_archive_filename (abfd), symbol_attribute_def,
- symbol_name_index);
+ (_("%B: unimplemented ATI record %u for symbol %u"),
+ abfd, symbol_attribute_def, symbol_name_index);
bfd_set_error (bfd_error_bad_value);
return FALSE;
break;
@@ -960,8 +807,8 @@ ieee_slurp_external_symbols (abfd)
if (value != 0x3f)
{
(*_bfd_error_handler)
- (_("%s: unexpected ATN type %d in external part"),
- bfd_archive_filename (abfd), (int) value);
+ (_("%B: unexpected ATN type %d in external part"),
+ abfd, (int) value);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -982,8 +829,7 @@ ieee_slurp_external_symbols (abfd)
default:
(*_bfd_error_handler)
- (_("%s: unexpected type after ATN"),
- bfd_archive_filename (abfd));
+ (_("%B: unexpected type after ATN"), abfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -997,6 +843,7 @@ ieee_slurp_external_symbols (abfd)
ieee_symbol_index_type symbol_ignore;
bfd_boolean pcrel_ignore;
unsigned int extra;
+
next_byte (&(ieee->h));
next_byte (&(ieee->h));
@@ -1021,7 +868,7 @@ ieee_slurp_external_symbols (abfd)
val = symbol->symbol.value;
for (s = abfd->sections; s != NULL; s = s->next)
{
- if (val >= s->vma && val < s->vma + s->_raw_size)
+ if (val >= s->vma && val < s->vma + s->size)
{
symbol->symbol.section = s;
symbol->symbol.value -= s->vma;
@@ -1038,6 +885,7 @@ ieee_slurp_external_symbols (abfd)
{
bfd_vma size;
bfd_vma value;
+
next_byte (&(ieee->h));
/* Throw away the external reference index. */
(void) must_parse_int (&(ieee->h));
@@ -1045,9 +893,7 @@ ieee_slurp_external_symbols (abfd)
size = must_parse_int (&(ieee->h));
/* Fetch the default value if available. */
if (! parse_int (&(ieee->h), &value))
- {
- value = 0;
- }
+ value = 0;
/* This turns into a common. */
symbol->symbol.section = bfd_com_section_ptr;
symbol->symbol.value = size;
@@ -1065,7 +911,7 @@ ieee_slurp_external_symbols (abfd)
symbol->symbol.the_bfd = abfd;
symbol->symbol.name = read_id (&(ieee->h));
- symbol->symbol.udata.p = (PTR) NULL;
+ symbol->symbol.udata.p = NULL;
symbol->symbol.section = bfd_und_section_ptr;
symbol->symbol.value = (bfd_vma) 0;
symbol->symbol.flags = 0;
@@ -1085,9 +931,7 @@ ieee_slurp_external_symbols (abfd)
ieee->external_symbol_min_index + 1;
}
else
- {
- ieee->external_symbol_count = 0;
- }
+ ieee->external_symbol_count = 0;
if (ieee->external_reference_max_index != 0)
{
@@ -1096,28 +940,23 @@ ieee_slurp_external_symbols (abfd)
ieee->external_reference_min_index + 1;
}
else
- {
- ieee->external_reference_count = 0;
- }
+ ieee->external_reference_count = 0;
abfd->symcount =
ieee->external_reference_count + ieee->external_symbol_count;
if (symbol_count != abfd->symcount)
- {
- /* There are gaps in the table -- */
- ieee->symbol_table_full = FALSE;
- }
+ /* There are gaps in the table -- */
+ ieee->symbol_table_full = FALSE;
- *prev_symbols_ptr = (ieee_symbol_type *) NULL;
- *prev_reference_ptr = (ieee_symbol_type *) NULL;
+ *prev_symbols_ptr = NULL;
+ *prev_reference_ptr = NULL;
return TRUE;
}
static bfd_boolean
-ieee_slurp_symbol_table (abfd)
- bfd *abfd;
+ieee_slurp_symbol_table (bfd *abfd)
{
if (! IEEE_DATA (abfd)->read_symbols)
{
@@ -1129,8 +968,7 @@ ieee_slurp_symbol_table (abfd)
}
static long
-ieee_get_symtab_upper_bound (abfd)
- bfd *abfd;
+ieee_get_symtab_upper_bound (bfd *abfd)
{
if (! ieee_slurp_symbol_table (abfd))
return -1;
@@ -1145,9 +983,7 @@ ieee_get_symtab_upper_bound (abfd)
extern const bfd_target ieee_vec;
static long
-ieee_canonicalize_symtab (abfd, location)
- bfd *abfd;
- asymbol **location;
+ieee_canonicalize_symtab (bfd *abfd, asymbol **location)
{
ieee_symbol_type *symp;
static bfd dummy_bfd;
@@ -1167,6 +1003,7 @@ ieee_canonicalize_symtab (abfd, location)
if (abfd->symcount)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
+
dummy_bfd.xvec = &ieee_vec;
if (! ieee_slurp_symbol_table (abfd))
return -1;
@@ -1206,10 +1043,7 @@ ieee_canonicalize_symtab (abfd, location)
}
static asection *
-get_section_entry (abfd, ieee, index)
- bfd *abfd;
- ieee_data_type *ieee;
- unsigned int index;
+get_section_entry (bfd *abfd, ieee_data_type *ieee, unsigned int index)
{
if (index >= ieee->section_table_size)
{
@@ -1225,7 +1059,7 @@ get_section_entry (abfd, ieee, index)
amt = c;
amt *= sizeof (asection *);
- n = (asection **) bfd_realloc (ieee->section_table, amt);
+ n = bfd_realloc (ieee->section_table, amt);
if (n == NULL)
return NULL;
@@ -1254,8 +1088,7 @@ get_section_entry (abfd, ieee, index)
}
static void
-ieee_slurp_sections (abfd)
- bfd *abfd;
+ieee_slurp_sections (bfd *abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
file_ptr offset = ieee->w.r.section_part;
@@ -1264,6 +1097,7 @@ ieee_slurp_sections (abfd)
if (offset != 0)
{
bfd_byte section_type[3];
+
ieee_seek (ieee, offset);
while (TRUE)
{
@@ -1273,6 +1107,7 @@ ieee_slurp_sections (abfd)
{
asection *section;
unsigned int section_index;
+
next_byte (&(ieee->h));
section_index = must_parse_int (&(ieee->h));
@@ -1290,7 +1125,8 @@ ieee_slurp_sections (abfd)
section->flags = SEC_ALLOC;
switch (section_type[1])
{
- case 0xD3: /* AS Absolute section attributes. */
+ /* AS Absolute section attributes. */
+ case 0xD3:
next_byte (&(ieee->h));
section_type[2] = this_byte (&(ieee->h));
switch (section_type[2])
@@ -1315,7 +1151,9 @@ ieee_slurp_sections (abfd)
}
}
break;
- case 0xC3: /* Named relocatable sections (type C). */
+
+ /* Named relocatable sections (type C). */
+ case 0xC3:
section_type[1] = this_byte (&(ieee->h));
section->flags = SEC_ALLOC;
switch (section_type[1])
@@ -1345,6 +1183,7 @@ ieee_slurp_sections (abfd)
/* Skip these fields, which we don't care about. */
{
bfd_vma parent, brother, context;
+
parse_int (&(ieee->h), &parent);
parse_int (&(ieee->h), &brother);
parse_int (&(ieee->h), &context);
@@ -1356,13 +1195,13 @@ ieee_slurp_sections (abfd)
unsigned int section_index;
bfd_vma value;
asection *section;
+
next_byte (&(ieee->h));
section_index = must_parse_int (&ieee->h);
section = get_section_entry (abfd, ieee, section_index);
if (section_index > ieee->section_count)
- {
- ieee->section_count = section_index;
- }
+ ieee->section_count = section_index;
+
section->alignment_power =
bfd_log2 (must_parse_int (&ieee->h));
(void) parse_int (&(ieee->h), &value);
@@ -1378,11 +1217,11 @@ ieee_slurp_sections (abfd)
{
case ieee_section_size_enum:
section = ieee->section_table[must_parse_int (&(ieee->h))];
- section->_raw_size = must_parse_int (&(ieee->h));
+ section->size = must_parse_int (&(ieee->h));
break;
case ieee_physical_region_size_enum:
section = ieee->section_table[must_parse_int (&(ieee->h))];
- section->_raw_size = must_parse_int (&(ieee->h));
+ section->size = must_parse_int (&(ieee->h));
break;
case ieee_region_base_address_enum:
section = ieee->section_table[must_parse_int (&(ieee->h))];
@@ -1424,8 +1263,7 @@ ieee_slurp_sections (abfd)
out. */
static bfd_boolean
-ieee_slurp_debug (abfd)
- bfd *abfd;
+ieee_slurp_debug (bfd *abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
asection *sec;
@@ -1441,16 +1279,15 @@ ieee_slurp_debug (abfd)
sec->filepos = ieee->w.r.debug_information_part;
debug_end = ieee_part_after (ieee, ieee->w.r.debug_information_part);
- sec->_raw_size = debug_end - ieee->w.r.debug_information_part;
+ sec->size = debug_end - ieee->w.r.debug_information_part;
return TRUE;
}
/* Archive stuff. */
-const bfd_target *
-ieee_archive_p (abfd)
- bfd *abfd;
+static const bfd_target *
+ieee_archive_p (bfd *abfd)
{
char *library;
unsigned int i;
@@ -1462,14 +1299,14 @@ ieee_archive_p (abfd)
ieee_ar_obstack_type *elts = NULL;
bfd_size_type amt = sizeof (ieee_ar_data_type);
- abfd->tdata.ieee_ar_data = (ieee_ar_data_type *) bfd_alloc (abfd, amt);
+ abfd->tdata.ieee_ar_data = bfd_alloc (abfd, amt);
if (!abfd->tdata.ieee_ar_data)
goto error_ret_restore;
ieee = IEEE_AR_DATA (abfd);
/* Ignore the return value here. It doesn't matter if we don't read
the entire buffer. We might have a very small ieee file. */
- bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
+ bfd_bread ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd);
ieee->h.first_byte = buffer;
ieee->h.input_p = buffer;
@@ -1495,7 +1332,7 @@ ieee_archive_p (abfd)
must_parse_int (&(ieee->h));
alc_elts = 10;
- elts = (ieee_ar_obstack_type *) bfd_malloc (alc_elts * sizeof *elts);
+ elts = bfd_malloc (alc_elts * sizeof *elts);
if (elts == NULL)
goto error_return;
@@ -1514,8 +1351,7 @@ ieee_archive_p (abfd)
ieee_ar_obstack_type *n;
alc_elts *= 2;
- n = ((ieee_ar_obstack_type *)
- bfd_realloc (elts, alc_elts * sizeof *elts));
+ n = bfd_realloc (elts, alc_elts * sizeof (* elts));
if (n == NULL)
goto error_return;
elts = n;
@@ -1537,7 +1373,7 @@ ieee_archive_p (abfd)
goto error_return;
/* Again ignore return value of bfd_bread. */
- bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
+ bfd_bread ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd);
ieee->h.first_byte = buffer;
ieee->h.input_p = buffer;
}
@@ -1545,7 +1381,7 @@ ieee_archive_p (abfd)
amt = ieee->element_count;
amt *= sizeof *ieee->elements;
- ieee->elements = (ieee_ar_obstack_type *) bfd_alloc (abfd, amt);
+ ieee->elements = bfd_alloc (abfd, amt);
if (ieee->elements == NULL)
goto error_return;
@@ -1560,7 +1396,7 @@ ieee_archive_p (abfd)
goto error_return;
/* Again ignore return value of bfd_bread. */
- bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
+ bfd_bread ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd);
ieee->h.first_byte = buffer;
ieee->h.input_p = buffer;
@@ -1591,257 +1427,31 @@ ieee_archive_p (abfd)
return NULL;
}
-const bfd_target *
-ieee_object_p (abfd)
- bfd *abfd;
+static bfd_boolean
+ieee_mkobject (bfd *abfd)
{
- char *processor;
- unsigned int part;
- ieee_data_type *ieee;
- unsigned char buffer[300];
- ieee_data_type *save = IEEE_DATA (abfd);
bfd_size_type amt;
- abfd->tdata.ieee_data = 0;
- ieee_mkobject (abfd);
-
- ieee = IEEE_DATA (abfd);
- if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
- goto fail;
- /* Read the first few bytes in to see if it makes sense. Ignore
- bfd_bread return value; The file might be very small. */
- bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
-
- ieee->h.input_p = buffer;
- if (this_byte_and_next (&(ieee->h)) != Module_Beginning)
- goto got_wrong_format;
-
- ieee->read_symbols = FALSE;
- ieee->read_data = FALSE;
- ieee->section_count = 0;
- ieee->external_symbol_max_index = 0;
- ieee->external_symbol_min_index = IEEE_PUBLIC_BASE;
- ieee->external_reference_min_index = IEEE_REFERENCE_BASE;
- ieee->external_reference_max_index = 0;
- ieee->h.abfd = abfd;
- ieee->section_table = NULL;
- ieee->section_table_size = 0;
-
- processor = ieee->mb.processor = read_id (&(ieee->h));
- if (strcmp (processor, "LIBRARY") == 0)
- goto got_wrong_format;
- ieee->mb.module_name = read_id (&(ieee->h));
- if (abfd->filename == (const char *) NULL)
- abfd->filename = ieee->mb.module_name;
-
- /* Determine the architecture and machine type of the object file. */
- {
- const bfd_arch_info_type *arch;
- char family[10];
-
- /* IEEE does not specify the format of the processor identification
- string, so the compiler is free to put in it whatever it wants.
- We try here to recognize different processors belonging to the
- m68k family. Code for other processors can be added here. */
- if ((processor[0] == '6') && (processor[1] == '8'))
- {
- if (processor[2] == '3') /* 683xx integrated processors */
- {
- switch (processor[3])
- {
- case '0': /* 68302, 68306, 68307 */
- case '2': /* 68322, 68328 */
- case '5': /* 68356 */
- strcpy (family, "68000"); /* MC68000-based controllers */
- break;
-
- case '3': /* 68330, 68331, 68332, 68333,
- 68334, 68335, 68336, 68338 */
- case '6': /* 68360 */
- case '7': /* 68376 */
- strcpy (family, "68332"); /* CPU32 and CPU32+ */
- break;
-
- case '4':
- if (processor[4] == '9') /* 68349 */
- strcpy (family, "68030"); /* CPU030 */
- else /* 68340, 68341 */
- strcpy (family, "68332"); /* CPU32 and CPU32+ */
- break;
-
- default: /* Does not exist yet */
- strcpy (family, "68332"); /* Guess it will be CPU32 */
- }
- }
- else if (TOUPPER (processor[3]) == 'F') /* 68F333 */
- strcpy (family, "68332"); /* CPU32 */
- else if ((TOUPPER (processor[3]) == 'C') /* Embedded controllers. */
- && ((TOUPPER (processor[2]) == 'E')
- || (TOUPPER (processor[2]) == 'H')
- || (TOUPPER (processor[2]) == 'L')))
- {
- strcpy (family, "68");
- strncat (family, processor + 4, 7);
- family[9] = '\0';
- }
- else /* "Regular" processors. */
- {
- strncpy (family, processor, 9);
- family[9] = '\0';
- }
- }
- else if ((strncmp (processor, "cpu32", 5) == 0) /* CPU32 and CPU32+ */
- || (strncmp (processor, "CPU32", 5) == 0))
- strcpy (family, "68332");
- else
- {
- strncpy (family, processor, 9);
- family[9] = '\0';
- }
-
- arch = bfd_scan_arch (family);
- if (arch == 0)
- goto got_wrong_format;
- abfd->arch_info = arch;
- }
-
- if (this_byte (&(ieee->h)) != (int) ieee_address_descriptor_enum)
- goto fail;
-
- next_byte (&(ieee->h));
-
- if (! parse_int (&(ieee->h), &ieee->ad.number_of_bits_mau))
- goto fail;
-
- if (! parse_int (&(ieee->h), &ieee->ad.number_of_maus_in_address))
- goto fail;
-
- /* If there is a byte order info, take it. */
- if (this_byte (&(ieee->h)) == (int) ieee_variable_L_enum
- || this_byte (&(ieee->h)) == (int) ieee_variable_M_enum)
- next_byte (&(ieee->h));
-
- for (part = 0; part < N_W_VARIABLES; part++)
- {
- bfd_boolean ok;
-
- if (read_2bytes (&(ieee->h)) != (int) ieee_assign_value_to_variable_enum)
- goto fail;
-
- if (this_byte_and_next (&(ieee->h)) != part)
- goto fail;
-
- ieee->w.offset[part] = parse_i (&(ieee->h), &ok);
- if (! ok)
- goto fail;
- }
-
- if (ieee->w.r.external_part != 0)
- abfd->flags = HAS_SYMS;
-
- /* By now we know that this is a real IEEE file, we're going to read
- the whole thing into memory so that we can run up and down it
- quickly. We can work out how big the file is from the trailer
- record. */
-
- amt = ieee->w.r.me_record + 1;
- IEEE_DATA (abfd)->h.first_byte =
- (unsigned char *) bfd_alloc (ieee->h.abfd, amt);
- if (!IEEE_DATA (abfd)->h.first_byte)
- goto fail;
- if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
- goto fail;
- /* FIXME: Check return value. I'm not sure whether it needs to read
- the entire buffer or not. */
- bfd_bread ((PTR) (IEEE_DATA (abfd)->h.first_byte),
- (bfd_size_type) ieee->w.r.me_record + 1, abfd);
-
- ieee_slurp_sections (abfd);
-
- if (! ieee_slurp_debug (abfd))
- goto fail;
-
- /* Parse section data to activate file and section flags implied by
- section contents. */
- if (! ieee_slurp_section_data (abfd))
- goto fail;
-
- return abfd->xvec;
-got_wrong_format:
- bfd_set_error (bfd_error_wrong_format);
-fail:
- bfd_release (abfd, ieee);
- abfd->tdata.ieee_data = save;
- return (const bfd_target *) NULL;
-}
-
-static void
-ieee_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- asymbol *symbol;
- symbol_info *ret;
-{
- bfd_symbol_info (symbol, ret);
- if (symbol->name[0] == ' ')
- ret->name = "* empty table entry ";
- if (!symbol->section)
- ret->type = (symbol->flags & BSF_LOCAL) ? 'a' : 'A';
-}
-
-static void
-ieee_print_symbol (abfd, afile, symbol, how)
- bfd *abfd;
- PTR afile;
- asymbol *symbol;
- bfd_print_symbol_type how;
-{
- FILE *file = (FILE *) afile;
-
- switch (how)
- {
- case bfd_print_symbol_name:
- fprintf (file, "%s", symbol->name);
- break;
- case bfd_print_symbol_more:
-#if 0
- fprintf (file, "%4x %2x", aout_symbol (symbol)->desc & 0xffff,
- aout_symbol (symbol)->other & 0xff);
-#endif
- BFD_FAIL ();
- break;
- case bfd_print_symbol_all:
- {
- const char *section_name =
- (symbol->section == (asection *) NULL
- ? "*abs"
- : symbol->section->name);
-
- if (symbol->name[0] == ' ')
- {
- fprintf (file, "* empty table entry ");
- }
- else
- {
- bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
-
- fprintf (file, " %-5s %04x %02x %s",
- section_name,
- (unsigned) ieee_symbol (symbol)->index,
- (unsigned) 0,
- symbol->name);
- }
- }
- break;
- }
+ output_ptr_start = NULL;
+ output_ptr = NULL;
+ output_ptr_end = NULL;
+ input_ptr_start = NULL;
+ input_ptr = NULL;
+ input_ptr_end = NULL;
+ input_bfd = NULL;
+ output_bfd = NULL;
+ output_buffer = 0;
+ amt = sizeof (ieee_data_type);
+ abfd->tdata.ieee_data = bfd_zalloc (abfd, amt);
+ return abfd->tdata.ieee_data != NULL;
}
static bfd_boolean
-do_one (ieee, current_map, location_ptr, s, iterations)
- ieee_data_type *ieee;
- ieee_per_section_type *current_map;
- unsigned char *location_ptr;
- asection *s;
- int iterations;
+do_one (ieee_data_type *ieee,
+ ieee_per_section_type *current_map,
+ unsigned char *location_ptr,
+ asection *s,
+ int iterations)
{
switch (this_byte (&(ieee->h)))
{
@@ -1880,9 +1490,8 @@ do_one (ieee, current_map, location_ptr, s, iterations)
bfd_boolean pcrel = FALSE;
asection *section;
ieee_reloc_type *r;
- bfd_size_type amt = sizeof (ieee_reloc_type);
- r = (ieee_reloc_type *) bfd_alloc (ieee->h.abfd, amt);
+ r = bfd_alloc (ieee->h.abfd, sizeof (* r));
if (!r)
return FALSE;
@@ -2010,9 +1619,11 @@ do_one (ieee, current_map, location_ptr, s, iterations)
default:
{
bfd_vma this_size;
+
if (parse_int (&(ieee->h), &this_size))
{
unsigned int i;
+
for (i = 0; i < this_size; i++)
{
location_ptr[current_map->pc++] = this_byte (&(ieee->h));
@@ -2020,14 +1631,12 @@ do_one (ieee, current_map, location_ptr, s, iterations)
}
}
else
- {
- loop = FALSE;
- }
+ loop = FALSE;
}
}
/* Prevent more than the first load-item of an LR record
- from being repeated (MRI convention). */
+ from being repeated (MRI convention). */
if (iterations != 1)
loop = FALSE;
}
@@ -2039,15 +1648,14 @@ do_one (ieee, current_map, location_ptr, s, iterations)
/* Read in all the section data and relocation stuff too. */
static bfd_boolean
-ieee_slurp_section_data (abfd)
- bfd *abfd;
+ieee_slurp_section_data (bfd *abfd)
{
bfd_byte *location_ptr = (bfd_byte *) NULL;
ieee_data_type *ieee = IEEE_DATA (abfd);
unsigned int section_number;
-
- ieee_per_section_type *current_map = (ieee_per_section_type *) NULL;
+ ieee_per_section_type *current_map = NULL;
asection *s;
+
/* Seek to the start of the data area. */
if (ieee->read_data)
return TRUE;
@@ -2058,13 +1666,15 @@ ieee_slurp_section_data (abfd)
for (s = abfd->sections; s != (asection *) NULL; s = s->next)
{
ieee_per_section_type *per = ieee_per_section (s);
+ arelent **relpp;
+
if ((s->flags & SEC_DEBUGGING) != 0)
continue;
- per->data = (bfd_byte *) bfd_alloc (ieee->h.abfd, s->_raw_size);
+ per->data = bfd_alloc (ieee->h.abfd, s->size);
if (!per->data)
return FALSE;
- per->reloc_tail_ptr =
- (ieee_reloc_type **) & (s->relocation);
+ relpp = &s->relocation;
+ per->reloc_tail_ptr = (ieee_reloc_type **) relpp;
}
while (TRUE)
@@ -2106,7 +1716,7 @@ ieee_slurp_section_data (abfd)
&pcrel, &extra,
0);
current_map->pc = value;
- BFD_ASSERT ((unsigned) (value - s->vma) <= s->_raw_size);
+ BFD_ASSERT ((unsigned) (value - s->vma) <= s->size);
}
break;
@@ -2167,24 +1777,253 @@ ieee_slurp_section_data (abfd)
}
}
+static const bfd_target *
+ieee_object_p (bfd *abfd)
+{
+ char *processor;
+ unsigned int part;
+ ieee_data_type *ieee;
+ unsigned char buffer[300];
+ ieee_data_type *save = IEEE_DATA (abfd);
+ bfd_size_type amt;
+
+ abfd->tdata.ieee_data = 0;
+ ieee_mkobject (abfd);
+
+ ieee = IEEE_DATA (abfd);
+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
+ goto fail;
+ /* Read the first few bytes in to see if it makes sense. Ignore
+ bfd_bread return value; The file might be very small. */
+ bfd_bread ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd);
+
+ ieee->h.input_p = buffer;
+ if (this_byte_and_next (&(ieee->h)) != Module_Beginning)
+ goto got_wrong_format;
+
+ ieee->read_symbols = FALSE;
+ ieee->read_data = FALSE;
+ ieee->section_count = 0;
+ ieee->external_symbol_max_index = 0;
+ ieee->external_symbol_min_index = IEEE_PUBLIC_BASE;
+ ieee->external_reference_min_index = IEEE_REFERENCE_BASE;
+ ieee->external_reference_max_index = 0;
+ ieee->h.abfd = abfd;
+ ieee->section_table = NULL;
+ ieee->section_table_size = 0;
+
+ processor = ieee->mb.processor = read_id (&(ieee->h));
+ if (strcmp (processor, "LIBRARY") == 0)
+ goto got_wrong_format;
+ ieee->mb.module_name = read_id (&(ieee->h));
+ if (abfd->filename == (const char *) NULL)
+ abfd->filename = ieee->mb.module_name;
+
+ /* Determine the architecture and machine type of the object file. */
+ {
+ const bfd_arch_info_type *arch;
+ char family[10];
+
+ /* IEEE does not specify the format of the processor identification
+ string, so the compiler is free to put in it whatever it wants.
+ We try here to recognize different processors belonging to the
+ m68k family. Code for other processors can be added here. */
+ if ((processor[0] == '6') && (processor[1] == '8'))
+ {
+ if (processor[2] == '3') /* 683xx integrated processors. */
+ {
+ switch (processor[3])
+ {
+ case '0': /* 68302, 68306, 68307 */
+ case '2': /* 68322, 68328 */
+ case '5': /* 68356 */
+ strcpy (family, "68000"); /* MC68000-based controllers. */
+ break;
+
+ case '3': /* 68330, 68331, 68332, 68333,
+ 68334, 68335, 68336, 68338 */
+ case '6': /* 68360 */
+ case '7': /* 68376 */
+ strcpy (family, "68332"); /* CPU32 and CPU32+ */
+ break;
+
+ case '4':
+ if (processor[4] == '9') /* 68349 */
+ strcpy (family, "68030"); /* CPU030 */
+ else /* 68340, 68341 */
+ strcpy (family, "68332"); /* CPU32 and CPU32+ */
+ break;
+
+ default: /* Does not exist yet. */
+ strcpy (family, "68332"); /* Guess it will be CPU32 */
+ }
+ }
+ else if (TOUPPER (processor[3]) == 'F') /* 68F333 */
+ strcpy (family, "68332"); /* CPU32 */
+ else if ((TOUPPER (processor[3]) == 'C') /* Embedded controllers. */
+ && ((TOUPPER (processor[2]) == 'E')
+ || (TOUPPER (processor[2]) == 'H')
+ || (TOUPPER (processor[2]) == 'L')))
+ {
+ strcpy (family, "68");
+ strncat (family, processor + 4, 7);
+ family[9] = '\0';
+ }
+ else /* "Regular" processors. */
+ {
+ strncpy (family, processor, 9);
+ family[9] = '\0';
+ }
+ }
+ else if ((strncmp (processor, "cpu32", 5) == 0) /* CPU32 and CPU32+ */
+ || (strncmp (processor, "CPU32", 5) == 0))
+ strcpy (family, "68332");
+ else
+ {
+ strncpy (family, processor, 9);
+ family[9] = '\0';
+ }
+
+ arch = bfd_scan_arch (family);
+ if (arch == 0)
+ goto got_wrong_format;
+ abfd->arch_info = arch;
+ }
+
+ if (this_byte (&(ieee->h)) != (int) ieee_address_descriptor_enum)
+ goto fail;
+
+ next_byte (&(ieee->h));
+
+ if (! parse_int (&(ieee->h), &ieee->ad.number_of_bits_mau))
+ goto fail;
+
+ if (! parse_int (&(ieee->h), &ieee->ad.number_of_maus_in_address))
+ goto fail;
+
+ /* If there is a byte order info, take it. */
+ if (this_byte (&(ieee->h)) == (int) ieee_variable_L_enum
+ || this_byte (&(ieee->h)) == (int) ieee_variable_M_enum)
+ next_byte (&(ieee->h));
+
+ for (part = 0; part < N_W_VARIABLES; part++)
+ {
+ bfd_boolean ok;
+
+ if (read_2bytes (&(ieee->h)) != (int) ieee_assign_value_to_variable_enum)
+ goto fail;
+
+ if (this_byte_and_next (&(ieee->h)) != part)
+ goto fail;
+
+ ieee->w.offset[part] = parse_i (&(ieee->h), &ok);
+ if (! ok)
+ goto fail;
+ }
+
+ if (ieee->w.r.external_part != 0)
+ abfd->flags = HAS_SYMS;
+
+ /* By now we know that this is a real IEEE file, we're going to read
+ the whole thing into memory so that we can run up and down it
+ quickly. We can work out how big the file is from the trailer
+ record. */
+
+ amt = ieee->w.r.me_record + 1;
+ IEEE_DATA (abfd)->h.first_byte = bfd_alloc (ieee->h.abfd, amt);
+ if (!IEEE_DATA (abfd)->h.first_byte)
+ goto fail;
+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
+ goto fail;
+ /* FIXME: Check return value. I'm not sure whether it needs to read
+ the entire buffer or not. */
+ bfd_bread ((void *) (IEEE_DATA (abfd)->h.first_byte),
+ (bfd_size_type) ieee->w.r.me_record + 1, abfd);
+
+ ieee_slurp_sections (abfd);
+
+ if (! ieee_slurp_debug (abfd))
+ goto fail;
+
+ /* Parse section data to activate file and section flags implied by
+ section contents. */
+ if (! ieee_slurp_section_data (abfd))
+ goto fail;
+
+ return abfd->xvec;
+got_wrong_format:
+ bfd_set_error (bfd_error_wrong_format);
+fail:
+ bfd_release (abfd, ieee);
+ abfd->tdata.ieee_data = save;
+ return (const bfd_target *) NULL;
+}
+
+static void
+ieee_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
+ asymbol *symbol,
+ symbol_info *ret)
+{
+ bfd_symbol_info (symbol, ret);
+ if (symbol->name[0] == ' ')
+ ret->name = "* empty table entry ";
+ if (!symbol->section)
+ ret->type = (symbol->flags & BSF_LOCAL) ? 'a' : 'A';
+}
+
+static void
+ieee_print_symbol (bfd *abfd,
+ void * afile,
+ asymbol *symbol,
+ bfd_print_symbol_type how)
+{
+ FILE *file = (FILE *) afile;
+
+ switch (how)
+ {
+ case bfd_print_symbol_name:
+ fprintf (file, "%s", symbol->name);
+ break;
+ case bfd_print_symbol_more:
+ BFD_FAIL ();
+ break;
+ case bfd_print_symbol_all:
+ {
+ const char *section_name =
+ (symbol->section == (asection *) NULL
+ ? "*abs"
+ : symbol->section->name);
+
+ if (symbol->name[0] == ' ')
+ fprintf (file, "* empty table entry ");
+ else
+ {
+ bfd_print_symbol_vandf (abfd, (void *) file, symbol);
+
+ fprintf (file, " %-5s %04x %02x %s",
+ section_name,
+ (unsigned) ieee_symbol (symbol)->index,
+ (unsigned) 0,
+ symbol->name);
+ }
+ }
+ break;
+ }
+}
+
static bfd_boolean
-ieee_new_section_hook (abfd, newsect)
- bfd *abfd;
- asection *newsect;
+ieee_new_section_hook (bfd *abfd, asection *newsect)
{
- newsect->used_by_bfd
- = (PTR) bfd_alloc (abfd, (bfd_size_type) sizeof (ieee_per_section_type));
+ newsect->used_by_bfd = bfd_alloc (abfd, (bfd_size_type) sizeof (ieee_per_section_type));
if (!newsect->used_by_bfd)
return FALSE;
- ieee_per_section (newsect)->data = (bfd_byte *) NULL;
+ ieee_per_section (newsect)->data = NULL;
ieee_per_section (newsect)->section = newsect;
return TRUE;
}
static long
-ieee_get_reloc_upper_bound (abfd, asect)
- bfd *abfd;
- sec_ptr asect;
+ieee_get_reloc_upper_bound (bfd *abfd, sec_ptr asect)
{
if ((asect->flags & SEC_DEBUGGING) != 0)
return 0;
@@ -2194,28 +2033,26 @@ ieee_get_reloc_upper_bound (abfd, asect)
}
static bfd_boolean
-ieee_get_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- sec_ptr section;
- PTR location;
- file_ptr offset;
- bfd_size_type count;
+ieee_get_section_contents (bfd *abfd,
+ sec_ptr section,
+ void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
ieee_per_section_type *p = ieee_per_section (section);
if ((section->flags & SEC_DEBUGGING) != 0)
return _bfd_generic_get_section_contents (abfd, section, location,
offset, count);
ieee_slurp_section_data (abfd);
- (void) memcpy ((PTR) location, (PTR) (p->data + offset), (unsigned) count);
+ (void) memcpy ((void *) location, (void *) (p->data + offset), (unsigned) count);
return TRUE;
}
static long
-ieee_canonicalize_reloc (abfd, section, relptr, symbols)
- bfd *abfd;
- sec_ptr section;
- arelent **relptr;
- asymbol **symbols;
+ieee_canonicalize_reloc (bfd *abfd,
+ sec_ptr section,
+ arelent **relptr,
+ asymbol **symbols)
{
ieee_reloc_type *src = (ieee_reloc_type *) (section->relocation);
ieee_data_type *ieee = IEEE_DATA (abfd);
@@ -2248,14 +2085,12 @@ ieee_canonicalize_reloc (abfd, section, relptr, symbols)
*relptr++ = &src->relent;
src = src->next;
}
- *relptr = (arelent *) NULL;
+ *relptr = NULL;
return section->reloc_count;
}
static int
-comp (ap, bp)
- const PTR ap;
- const PTR bp;
+comp (const void * ap, const void * bp)
{
arelent *a = *((arelent **) ap);
arelent *b = *((arelent **) bp);
@@ -2265,11 +2100,11 @@ comp (ap, bp)
/* Write the section headers. */
static bfd_boolean
-ieee_write_section_part (abfd)
- bfd *abfd;
+ieee_write_section_part (bfd *abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
asection *s;
+
ieee->w.r.section_part = bfd_tell (abfd);
for (s = abfd->sections; s != (asection *) NULL; s = s->next)
{
@@ -2318,11 +2153,6 @@ ieee_write_section_part (abfd)
if (! ieee_write_id (abfd, s->name))
return FALSE;
-#if 0
- ieee_write_int (abfd, 0); /* Parent */
- ieee_write_int (abfd, 0); /* Brother */
- ieee_write_int (abfd, 0); /* Context */
-#endif
/* Alignment. */
if (! ieee_write_byte (abfd, ieee_section_alignment_enum)
|| ! ieee_write_byte (abfd,
@@ -2336,7 +2166,7 @@ ieee_write_section_part (abfd)
|| ! ieee_write_byte (abfd,
(bfd_byte) (s->index
+ IEEE_SECTION_NUMBER_BASE))
- || ! ieee_write_int (abfd, s->_raw_size))
+ || ! ieee_write_int (abfd, s->size))
return FALSE;
if (abfd->flags & EXEC_P)
{
@@ -2356,11 +2186,8 @@ ieee_write_section_part (abfd)
return TRUE;
}
-
static bfd_boolean
-do_with_relocs (abfd, s)
- bfd *abfd;
- asection *s;
+do_with_relocs (bfd *abfd, asection *s)
{
unsigned int number_of_maus_in_address =
bfd_arch_bits_per_address (abfd) / bfd_arch_bits_per_byte (abfd);
@@ -2398,14 +2225,14 @@ do_with_relocs (abfd, s)
{
/* If there aren't any relocations then output the load constant
byte opcode rather than the load with relocation opcode. */
- while (current_byte_index < s->_raw_size)
+ while (current_byte_index < s->size)
{
bfd_size_type run;
unsigned int MAXRUN = 127;
run = MAXRUN;
- if (run > s->_raw_size - current_byte_index)
- run = s->_raw_size - current_byte_index;
+ if (run > s->size - current_byte_index)
+ run = s->size - current_byte_index;
if (run != 0)
{
@@ -2414,7 +2241,7 @@ do_with_relocs (abfd, s)
/* Output a stream of bytes. */
if (! ieee_write_int (abfd, run))
return FALSE;
- if (bfd_bwrite ((PTR) (stream + current_byte_index), run, abfd)
+ if (bfd_bwrite ((void *) (stream + current_byte_index), run, abfd)
!= run)
return FALSE;
current_byte_index += run;
@@ -2429,15 +2256,14 @@ do_with_relocs (abfd, s)
/* Output the data stream as the longest sequence of bytes
possible, allowing for the a reasonable packet size and
relocation stuffs. */
-
- if ((PTR) stream == (PTR) NULL)
+ if (stream == NULL)
{
/* Outputting a section without data, fill it up. */
- stream = (unsigned char *) bfd_zalloc (abfd, s->_raw_size);
+ stream = bfd_zalloc (abfd, s->size);
if (!stream)
return FALSE;
}
- while (current_byte_index < s->_raw_size)
+ while (current_byte_index < s->size)
{
bfd_size_type run;
unsigned int MAXRUN = 127;
@@ -2451,15 +2277,15 @@ do_with_relocs (abfd, s)
else
run = MAXRUN;
- if (run > s->_raw_size - current_byte_index)
- run = s->_raw_size - current_byte_index;
+ if (run > s->size - current_byte_index)
+ run = s->size - current_byte_index;
if (run != 0)
{
/* Output a stream of bytes. */
if (! ieee_write_int (abfd, run))
return FALSE;
- if (bfd_bwrite ((PTR) (stream + current_byte_index), run, abfd)
+ if (bfd_bwrite ((void *) (stream + current_byte_index), run, abfd)
!= run)
return FALSE;
current_byte_index += run;
@@ -2473,14 +2299,9 @@ do_with_relocs (abfd, s)
{
arelent *r = *p;
bfd_signed_vma ov;
-#if 0
- if (r->howto->pc_relative)
- r->addend += current_byte_index;
-#endif
switch (r->howto->size)
{
case 2:
-
ov = bfd_get_signed_32 (abfd,
stream + current_byte_index);
current_byte_index += 4;
@@ -2511,8 +2332,6 @@ do_with_relocs (abfd, s)
ieee_function_either_open_b_enum))
return FALSE;
-/* abort();*/
-
if (r->sym_ptr_ptr != (asymbol **) NULL)
{
if (! ieee_write_expression (abfd, r->addend + ov,
@@ -2557,11 +2376,9 @@ do_with_relocs (abfd, s)
bytes. */
static bfd_boolean
-do_as_repeat (abfd, s)
- bfd *abfd;
- asection *s;
+do_as_repeat (bfd *abfd, asection *s)
{
- if (s->_raw_size)
+ if (s->size)
{
if (! ieee_write_byte (abfd, ieee_set_current_section_enum)
|| ! ieee_write_byte (abfd,
@@ -2586,7 +2403,7 @@ do_as_repeat (abfd, s)
}
if (! ieee_write_byte (abfd, ieee_repeat_data_enum)
- || ! ieee_write_int (abfd, s->_raw_size)
+ || ! ieee_write_int (abfd, s->size)
|| ! ieee_write_byte (abfd, ieee_load_constant_bytes_enum)
|| ! ieee_write_byte (abfd, 1)
|| ! ieee_write_byte (abfd, 0))
@@ -2597,9 +2414,7 @@ do_as_repeat (abfd, s)
}
static bfd_boolean
-do_without_relocs (abfd, s)
- bfd *abfd;
- asection *s;
+do_without_relocs (bfd *abfd, asection *s)
{
bfd_byte *stream = ieee_per_section (s)->data;
@@ -2612,7 +2427,7 @@ do_without_relocs (abfd, s)
{
unsigned int i;
- for (i = 0; i < s->_raw_size; i++)
+ for (i = 0; i < s->size; i++)
{
if (stream[i] != 0)
{
@@ -2628,65 +2443,33 @@ do_without_relocs (abfd, s)
return TRUE;
}
-
-static unsigned char *output_ptr_start;
-static unsigned char *output_ptr;
-static unsigned char *output_ptr_end;
-static unsigned char *input_ptr_start;
-static unsigned char *input_ptr;
-static unsigned char *input_ptr_end;
-static bfd *input_bfd;
-static bfd *output_bfd;
-static int output_buffer;
-
-static bfd_boolean
-ieee_mkobject (abfd)
- bfd *abfd;
-{
- bfd_size_type amt;
-
- output_ptr_start = NULL;
- output_ptr = NULL;
- output_ptr_end = NULL;
- input_ptr_start = NULL;
- input_ptr = NULL;
- input_ptr_end = NULL;
- input_bfd = NULL;
- output_bfd = NULL;
- output_buffer = 0;
- amt = sizeof (ieee_data_type);
- abfd->tdata.ieee_data = (ieee_data_type *) bfd_zalloc (abfd, amt);
- return abfd->tdata.ieee_data != NULL;
-}
-
static void
-fill ()
+fill (void)
{
bfd_size_type amt = input_ptr_end - input_ptr_start;
/* FIXME: Check return value. I'm not sure whether it needs to read
the entire buffer or not. */
- bfd_bread ((PTR) input_ptr_start, amt, input_bfd);
+ bfd_bread ((void *) input_ptr_start, amt, input_bfd);
input_ptr = input_ptr_start;
}
static void
-flush ()
+flush (void)
{
bfd_size_type amt = output_ptr - output_ptr_start;
- if (bfd_bwrite ((PTR) (output_ptr_start), amt, output_bfd) != amt)
+ if (bfd_bwrite ((void *) (output_ptr_start), amt, output_bfd) != amt)
abort ();
output_ptr = output_ptr_start;
output_buffer++;
}
#define THIS() ( *input_ptr )
-#define NEXT() { input_ptr++; if (input_ptr == input_ptr_end) fill(); }
-#define OUT(x) { *output_ptr++ = (x); if(output_ptr == output_ptr_end) flush(); }
+#define NEXT() { input_ptr++; if (input_ptr == input_ptr_end) fill (); }
+#define OUT(x) { *output_ptr++ = (x); if (output_ptr == output_ptr_end) flush (); }
static void
-write_int (value)
- int value;
+write_int (int value)
{
if (value >= 0 && value <= 127)
{
@@ -2695,6 +2478,7 @@ write_int (value)
else
{
unsigned int length;
+
/* How many significant bytes ? */
/* FIXME FOR LONGER INTS. */
if (value & 0xff000000)
@@ -2722,7 +2506,7 @@ write_int (value)
}
static void
-copy_id ()
+copy_id (void)
{
int length = THIS ();
char ch;
@@ -2739,7 +2523,7 @@ copy_id ()
#define VAR(x) ((x | 0x80))
static void
-copy_expression ()
+copy_expression (void)
{
int stack[10];
int *tos = stack;
@@ -2837,11 +2621,10 @@ copy_expression ()
}
/* Drop the int in the buffer, and copy a null into the gap, which we
- will overwrite later */
+ will overwrite later. */
static void
-fill_int (buf)
- struct output_buffer_struct *buf;
+fill_int (struct output_buffer_struct *buf)
{
if (buf->buffer == output_buffer)
{
@@ -2855,8 +2638,7 @@ fill_int (buf)
}
static void
-drop_int (buf)
- struct output_buffer_struct *buf;
+drop_int (struct output_buffer_struct *buf)
{
int type = THIS ();
int ch;
@@ -2892,7 +2674,7 @@ drop_int (buf)
}
static void
-copy_int ()
+copy_int (void)
{
int type = THIS ();
int ch;
@@ -2924,14 +2706,53 @@ copy_int ()
}
}
-#define ID copy_id()
-#define INT copy_int()
-#define EXP copy_expression()
-#define INTn(q) copy_int()
-#define EXPn(q) copy_expression()
+#define ID copy_id ()
+#define INT copy_int ()
+#define EXP copy_expression ()
+#define INTn(q) copy_int ()
+#define EXPn(q) copy_expression ()
+
+static void
+copy_till_end (void)
+{
+ int ch = THIS ();
+
+ while (1)
+ {
+ while (ch <= 0x80)
+ {
+ OUT (ch);
+ NEXT ();
+ ch = THIS ();
+ }
+ switch (ch)
+ {
+ case 0x84:
+ OUT (THIS ());
+ NEXT ();
+ case 0x83:
+ OUT (THIS ());
+ NEXT ();
+ case 0x82:
+ OUT (THIS ());
+ NEXT ();
+ case 0x81:
+ OUT (THIS ());
+ NEXT ();
+ OUT (THIS ());
+ NEXT ();
+
+ ch = THIS ();
+ break;
+ default:
+ return;
+ }
+ }
+
+}
static void
-f1_record ()
+f1_record (void)
{
int ch;
@@ -3032,7 +2853,7 @@ f1_record ()
}
static void
-f0_record ()
+f0_record (void)
{
/* Attribute record. */
NEXT ();
@@ -3042,46 +2863,7 @@ f0_record ()
}
static void
-copy_till_end ()
-{
- int ch = THIS ();
-
- while (1)
- {
- while (ch <= 0x80)
- {
- OUT (ch);
- NEXT ();
- ch = THIS ();
- }
- switch (ch)
- {
- case 0x84:
- OUT (THIS ());
- NEXT ();
- case 0x83:
- OUT (THIS ());
- NEXT ();
- case 0x82:
- OUT (THIS ());
- NEXT ();
- case 0x81:
- OUT (THIS ());
- NEXT ();
- OUT (THIS ());
- NEXT ();
-
- ch = THIS ();
- break;
- default:
- return;
- }
- }
-
-}
-
-static void
-f2_record ()
+f2_record (void)
{
NEXT ();
OUT (0xf2);
@@ -3092,9 +2874,8 @@ f2_record ()
copy_till_end ();
}
-
static void
-f8_record ()
+f8_record (void)
{
int ch;
NEXT ();
@@ -3243,7 +3024,7 @@ f8_record ()
}
static void
-e2_record ()
+e2_record (void)
{
OUT (0xe2);
NEXT ();
@@ -3254,7 +3035,7 @@ e2_record ()
}
static void
-block ()
+block (void)
{
int ch;
@@ -3288,14 +3069,12 @@ block ()
}
}
-
/* Moves all the debug information from the source bfd to the output
bfd, and relocates any expressions it finds. */
static void
-relocate_debug (output, input)
- bfd *output ATTRIBUTE_UNUSED;
- bfd *input;
+relocate_debug (bfd *output ATTRIBUTE_UNUSED,
+ bfd *input)
{
#define IBS 400
#define OBS 400
@@ -3306,7 +3085,7 @@ relocate_debug (output, input)
input_bfd = input;
/* FIXME: Check return value. I'm not sure whether it needs to read
the entire buffer or not. */
- bfd_bread ((PTR) input_ptr_start, (bfd_size_type) IBS, input);
+ bfd_bread ((void *) input_ptr_start, (bfd_size_type) IBS, input);
block ();
}
@@ -3314,8 +3093,7 @@ relocate_debug (output, input)
one place, relocating it and emitting it as we go. */
static bfd_boolean
-ieee_write_debug_part (abfd)
- bfd *abfd;
+ieee_write_debug_part (bfd *abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
bfd_chain_type *chain = ieee->chain_root;
@@ -3342,7 +3120,7 @@ ieee_write_debug_part (abfd)
}
ieee->w.r.debug_information_part = here;
- if (bfd_bwrite (s->contents, s->_raw_size, abfd) != s->_raw_size)
+ if (bfd_bwrite (s->contents, s->size, abfd) != s->size)
return FALSE;
}
else
@@ -3377,8 +3155,7 @@ ieee_write_debug_part (abfd)
/* Write the data in an ieee way. */
static bfd_boolean
-ieee_write_data_part (abfd)
- bfd *abfd;
+ieee_write_data_part (bfd *abfd)
{
asection *s;
@@ -3393,7 +3170,7 @@ ieee_write_data_part (abfd)
continue;
/* Sort the reloc records so we can insert them in the correct
- places */
+ places. */
if (s->reloc_count != 0)
{
if (! do_with_relocs (abfd, s))
@@ -3409,10 +3186,8 @@ ieee_write_data_part (abfd)
return TRUE;
}
-
static bfd_boolean
-init_for_output (abfd)
- bfd *abfd;
+init_for_output (bfd *abfd)
{
asection *s;
@@ -3420,10 +3195,10 @@ init_for_output (abfd)
{
if ((s->flags & SEC_DEBUGGING) != 0)
continue;
- if (s->_raw_size != 0)
+ if (s->size != 0)
{
- bfd_size_type size = s->_raw_size;
- ieee_per_section (s)->data = (bfd_byte *) (bfd_alloc (abfd, size));
+ bfd_size_type size = s->size;
+ ieee_per_section (s)->data = bfd_alloc (abfd, size);
if (!ieee_per_section (s)->data)
return FALSE;
}
@@ -3437,19 +3212,18 @@ init_for_output (abfd)
not a byte image, but a record stream. */
static bfd_boolean
-ieee_set_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- sec_ptr section;
- const PTR location;
- file_ptr offset;
- bfd_size_type count;
+ieee_set_section_contents (bfd *abfd,
+ sec_ptr section,
+ const void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
if ((section->flags & SEC_DEBUGGING) != 0)
{
if (section->contents == NULL)
{
- bfd_size_type size = section->_raw_size;
- section->contents = (unsigned char *) bfd_alloc (abfd, size);
+ bfd_size_type size = section->size;
+ section->contents = bfd_alloc (abfd, size);
if (section->contents == NULL)
return FALSE;
}
@@ -3464,8 +3238,8 @@ ieee_set_section_contents (abfd, section, location, offset, count)
if (!init_for_output (abfd))
return FALSE;
}
- memcpy ((PTR) (ieee_per_section (section)->data + offset),
- (PTR) location,
+ memcpy ((void *) (ieee_per_section (section)->data + offset),
+ (void *) location,
(unsigned int) count);
return TRUE;
}
@@ -3476,8 +3250,7 @@ ieee_set_section_contents (abfd, section, location, offset, count)
symbol values into indexes from the right base. */
static bfd_boolean
-ieee_write_external_part (abfd)
- bfd *abfd;
+ieee_write_external_part (bfd *abfd)
{
asymbol **q;
ieee_data_type *ieee = IEEE_DATA (abfd);
@@ -3527,9 +3300,9 @@ ieee_write_external_part (abfd)
|| ! ieee_write_id (abfd, p->name)
|| ! ieee_write_2bytes (abfd, ieee_attribute_record_enum)
|| ! ieee_write_int (abfd, (bfd_vma) public_index)
- || ! ieee_write_byte (abfd, 15) /* instruction address */
- || ! ieee_write_byte (abfd, 19) /* static symbol */
- || ! ieee_write_byte (abfd, 1)) /* one of them */
+ || ! ieee_write_byte (abfd, 15) /* Instruction address. */
+ || ! ieee_write_byte (abfd, 19) /* Static symbol. */
+ || ! ieee_write_byte (abfd, 1)) /* One of them. */
return FALSE;
/* Write out the value. */
@@ -3600,15 +3373,14 @@ static const unsigned char envi[] =
/* 0xf1, 0xce, 0x21, 00, 50, 0x82, 0x07, 0xc7, 0x09, 0x11, 0x11,
0x19, 0x2c,
*/
- 0xf1, 0xce, 0x21, 00, 52, 0x00, /* exec ok */
+ 0xf1, 0xce, 0x21, 00, 52, 0x00, /* exec ok. */
- 0xf1, 0xce, 0x21, 0, 53, 0x03,/* host unix */
+ 0xf1, 0xce, 0x21, 0, 53, 0x03,/* host unix. */
/* 0xf1, 0xce, 0x21, 0, 54, 2,1,1 tool & version # */
};
static bfd_boolean
-ieee_write_me_part (abfd)
- bfd *abfd;
+ieee_write_me_part (bfd *abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
ieee->w.r.trailer_part = bfd_tell (abfd);
@@ -3629,8 +3401,7 @@ ieee_write_me_part (abfd)
/* Write out the IEEE processor ID. */
static bfd_boolean
-ieee_write_processor (abfd)
- bfd *abfd;
+ieee_write_processor (bfd *abfd)
{
const bfd_arch_info_type *arch;
@@ -3642,11 +3413,6 @@ ieee_write_processor (abfd)
return FALSE;
break;
- case bfd_arch_a29k:
- if (! ieee_write_id (abfd, "29000"))
- return FALSE;
- break;
-
case bfd_arch_h8300:
if (! ieee_write_id (abfd, "H8/300"))
return FALSE;
@@ -3700,11 +3466,22 @@ ieee_write_processor (abfd)
case bfd_mach_m68040: id = "68040"; break;
case bfd_mach_m68060: id = "68060"; break;
case bfd_mach_cpu32: id = "cpu32"; break;
- case bfd_mach_mcf5200:id = "5200"; break;
- case bfd_mach_mcf5206e:id = "5206e"; break;
- case bfd_mach_mcf5307:id = "5307"; break;
- case bfd_mach_mcf5407:id = "5407"; break;
- case bfd_mach_mcf528x:id = "5282"; break;
+ case bfd_mach_mcf_isa_a_nodiv: id = "isa-a:nodiv"; break;
+ case bfd_mach_mcf_isa_a: id = "isa-a"; break;
+ case bfd_mach_mcf_isa_a_mac: id = "isa-a:mac"; break;
+ case bfd_mach_mcf_isa_a_emac: id = "isa-a:emac"; break;
+ case bfd_mach_mcf_isa_aplus: id = "isa-aplus"; break;
+ case bfd_mach_mcf_isa_aplus_mac: id = "isa-aplus:mac"; break;
+ case bfd_mach_mcf_isa_aplus_emac: id = "isa-aplus:mac"; break;
+ case bfd_mach_mcf_isa_b_nousp: id = "isa-b:nousp"; break;
+ case bfd_mach_mcf_isa_b_nousp_mac: id = "isa-b:nousp:mac"; break;
+ case bfd_mach_mcf_isa_b_nousp_emac: id = "isa-b:nousp:emac"; break;
+ case bfd_mach_mcf_isa_b: id = "isa-b"; break;
+ case bfd_mach_mcf_isa_b_mac: id = "isa-b:mac"; break;
+ case bfd_mach_mcf_isa_b_emac: id = "isa-b:emac"; break;
+ case bfd_mach_mcf_isa_b_float: id = "isa-b:float"; break;
+ case bfd_mach_mcf_isa_b_float_mac: id = "isa-b:float:mac"; break;
+ case bfd_mach_mcf_isa_b_float_emac: id = "isa-b:float:emac"; break;
}
if (! ieee_write_id (abfd, id))
@@ -3717,8 +3494,7 @@ ieee_write_processor (abfd)
}
static bfd_boolean
-ieee_write_object_contents (abfd)
- bfd *abfd;
+ieee_write_object_contents (bfd *abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
unsigned int i;
@@ -3756,12 +3532,12 @@ ieee_write_object_contents (abfd)
return FALSE;
if (abfd->flags & EXEC_P)
{
- if (! ieee_write_byte (abfd, 0x1)) /* Absolute */
+ if (! ieee_write_byte (abfd, 0x1)) /* Absolute. */
return FALSE;
}
else
{
- if (! ieee_write_byte (abfd, 0x2)) /* Relocateable */
+ if (! ieee_write_byte (abfd, 0x2)) /* Relocateable. */
return FALSE;
}
@@ -3830,18 +3606,17 @@ ieee_write_object_contents (abfd)
return TRUE;
}
-/* Native-level interface to symbols. */
+/* Native-level interface to symbols. */
/* We read the symbols into a buffer, which is discarded when this
function exits. We read the strings into a buffer large enough to
hold them all plus all the cached symbol entries. */
static asymbol *
-ieee_make_empty_symbol (abfd)
- bfd *abfd;
+ieee_make_empty_symbol (bfd *abfd)
{
bfd_size_type amt = sizeof (ieee_symbol_type);
- ieee_symbol_type *new = (ieee_symbol_type *) bfd_zalloc (abfd, amt);
+ ieee_symbol_type *new = bfd_zalloc (abfd, amt);
if (!new)
return NULL;
@@ -3850,9 +3625,7 @@ ieee_make_empty_symbol (abfd)
}
static bfd *
-ieee_openr_next_archived_file (arch, prev)
- bfd *arch;
- bfd *prev;
+ieee_openr_next_archived_file (bfd *arch, bfd *prev)
{
ieee_ar_data_type *ar = IEEE_AR_DATA (arch);
@@ -3881,29 +3654,34 @@ ieee_openr_next_archived_file (arch, prev)
else
{
bfd_set_error (bfd_error_no_more_archived_files);
- return (bfd *) NULL;
+ return NULL;
}
}
}
static bfd_boolean
-ieee_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
- functionname_ptr, line_ptr)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *section ATTRIBUTE_UNUSED;
- asymbol **symbols ATTRIBUTE_UNUSED;
- bfd_vma offset ATTRIBUTE_UNUSED;
- const char **filename_ptr ATTRIBUTE_UNUSED;
- const char **functionname_ptr ATTRIBUTE_UNUSED;
- unsigned int *line_ptr ATTRIBUTE_UNUSED;
+ieee_find_nearest_line (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *section ATTRIBUTE_UNUSED,
+ asymbol **symbols ATTRIBUTE_UNUSED,
+ bfd_vma offset ATTRIBUTE_UNUSED,
+ const char **filename_ptr ATTRIBUTE_UNUSED,
+ const char **functionname_ptr ATTRIBUTE_UNUSED,
+ unsigned int *line_ptr ATTRIBUTE_UNUSED)
+{
+ return FALSE;
+}
+
+static bfd_boolean
+ieee_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
+ const char **filename_ptr ATTRIBUTE_UNUSED,
+ const char **functionname_ptr ATTRIBUTE_UNUSED,
+ unsigned int *line_ptr ATTRIBUTE_UNUSED)
{
return FALSE;
}
static int
-ieee_generic_stat_arch_elt (abfd, buf)
- bfd *abfd;
- struct stat *buf;
+ieee_generic_stat_arch_elt (bfd *abfd, struct stat *buf)
{
ieee_ar_data_type *ar = (ieee_ar_data_type *) NULL;
ieee_data_type *ieee;
@@ -3933,75 +3711,12 @@ ieee_generic_stat_arch_elt (abfd, buf)
}
static int
-ieee_sizeof_headers (abfd, x)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_boolean x ATTRIBUTE_UNUSED;
+ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_boolean x ATTRIBUTE_UNUSED)
{
return 0;
}
-
-/* The debug info routines are never used. */
-#if 0
-
-static void
-ieee_bfd_debug_info_start (abfd)
- bfd *abfd;
-{
-
-}
-
-static void
-ieee_bfd_debug_info_end (abfd)
- bfd *abfd;
-{
-
-}
-
-
-/* Add this section to the list of sections we have debug info for, to
- be ready to output it at close time. */
-static void
-ieee_bfd_debug_info_accumulate (abfd, section)
- bfd *abfd;
- asection *section;
-{
- ieee_data_type *ieee = IEEE_DATA (section->owner);
- ieee_data_type *output_ieee = IEEE_DATA (abfd);
-
- /* Can only accumulate data from other ieee bfds. */
- if (section->owner->xvec != abfd->xvec)
- return;
- /* Only bother once per bfd. */
- if (ieee->done_debug)
- return;
- ieee->done_debug = TRUE;
-
- /* Don't bother if there is no debug info. */
- if (ieee->w.r.debug_information_part == 0)
- return;
-
- /* Add to chain. */
- {
- bfd_size_type amt = sizeof (bfd_chain_type);
- bfd_chain_type *n = (bfd_chain_type *) bfd_alloc (abfd, amt);
-
- if (!n)
- abort (); /* FIXME */
- n->this = section->owner;
- n->next = (bfd_chain_type *) NULL;
-
- if (output_ieee->chain_head)
- output_ieee->chain_head->next = n;
- else
- output_ieee->chain_root = n;
-
- output_ieee->chain_head = n;
- }
-}
-
-#endif
-
#define ieee_close_and_cleanup _bfd_generic_close_and_cleanup
#define ieee_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
@@ -4009,17 +3724,19 @@ ieee_bfd_debug_info_accumulate (abfd, section)
#define ieee_slurp_extended_name_table bfd_true
#define ieee_construct_extended_name_table \
((bfd_boolean (*) \
- PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
+ (bfd *, char **, bfd_size_type *, const char **)) \
bfd_true)
#define ieee_truncate_arname bfd_dont_truncate_arname
#define ieee_write_armap \
((bfd_boolean (*) \
- PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int))) \
+ (bfd *, unsigned int, struct orl *, unsigned int, int)) \
bfd_true)
#define ieee_read_ar_hdr bfd_nullvoidptr
#define ieee_update_armap_timestamp bfd_true
#define ieee_get_elt_at_index _bfd_generic_get_elt_at_index
+#define ieee_bfd_is_target_special_symbol \
+ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define ieee_bfd_is_local_label_name bfd_generic_is_local_label_name
#define ieee_get_lineno _bfd_nosymbols_get_lineno
#define ieee_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
@@ -4037,7 +3754,10 @@ ieee_bfd_debug_info_accumulate (abfd, section)
#define ieee_bfd_relax_section bfd_generic_relax_section
#define ieee_bfd_gc_sections bfd_generic_gc_sections
#define ieee_bfd_merge_sections bfd_generic_merge_sections
+#define ieee_bfd_is_group_section bfd_generic_is_group_section
#define ieee_bfd_discard_group bfd_generic_discard_group
+#define ieee_section_already_linked \
+ _bfd_generic_section_already_linked
#define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
@@ -4047,27 +3767,27 @@ ieee_bfd_debug_info_accumulate (abfd, section)
const bfd_target ieee_vec =
{
- "ieee", /* name */
+ "ieee", /* Name. */
bfd_target_ieee_flavour,
- BFD_ENDIAN_UNKNOWN, /* target byte order */
- BFD_ENDIAN_UNKNOWN, /* target headers byte order */
- (HAS_RELOC | EXEC_P | /* object flags */
+ BFD_ENDIAN_UNKNOWN, /* Target byte order. */
+ BFD_ENDIAN_UNKNOWN, /* Target headers byte order. */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_CODE | SEC_DATA | SEC_ROM | SEC_HAS_CONTENTS
- | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- '_', /* leading underscore */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
+ | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ '_', /* Leading underscore. */
+ ' ', /* AR_pad_char. */
+ 16, /* AR_max_namelen. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
{_bfd_dummy_target,
- ieee_object_p, /* bfd_check_format */
+ ieee_object_p, /* bfd_check_format. */
ieee_archive_p,
_bfd_dummy_target,
},
@@ -4085,7 +3805,7 @@ const bfd_target ieee_vec =
},
/* ieee_close_and_cleanup, ieee_bfd_free_cached_info, ieee_new_section_hook,
- ieee_get_section_contents, ieee_get_section_contents_in_window */
+ ieee_get_section_contents, ieee_get_section_contents_in_window. */
BFD_JUMP_TABLE_GENERIC (ieee),
BFD_JUMP_TABLE_COPY (_bfd_generic),
@@ -4095,21 +3815,21 @@ const bfd_target ieee_vec =
ieee_construct_extended_name_table, ieee_truncate_arname,
ieee_write_armap, ieee_read_ar_hdr, ieee_openr_next_archived_file,
ieee_get_elt_at_index, ieee_generic_stat_arch_elt,
- ieee_update_armap_timestamp */
+ ieee_update_armap_timestamp. */
BFD_JUMP_TABLE_ARCHIVE (ieee),
/* ieee_get_symtab_upper_bound, ieee_canonicalize_symtab,
ieee_make_empty_symbol, ieee_print_symbol, ieee_get_symbol_info,
ieee_bfd_is_local_label_name, ieee_get_lineno,
ieee_find_nearest_line, ieee_bfd_make_debug_symbol,
- ieee_read_minisymbols, ieee_minisymbol_to_symbol */
+ ieee_read_minisymbols, ieee_minisymbol_to_symbol. */
BFD_JUMP_TABLE_SYMBOLS (ieee),
/* ieee_get_reloc_upper_bound, ieee_canonicalize_reloc,
- ieee_bfd_reloc_type_lookup */
+ ieee_bfd_reloc_type_lookup. */
BFD_JUMP_TABLE_RELOCS (ieee),
- /* ieee_set_arch_mach, ieee_set_section_contents */
+ /* ieee_set_arch_mach, ieee_set_section_contents. */
BFD_JUMP_TABLE_WRITE (ieee),
/* ieee_sizeof_headers, ieee_bfd_get_relocated_section_contents,
@@ -4117,12 +3837,12 @@ const bfd_target ieee_vec =
_bfd_generic_link_hash_table_free,
ieee_bfd_link_add_symbols, ieee_bfd_final_link,
ieee_bfd_link_split_section, ieee_bfd_gc_sections,
- ieee_bfd_merge_sections */
+ ieee_bfd_merge_sections. */
BFD_JUMP_TABLE_LINK (ieee),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
- (PTR) 0
+ NULL
};
diff --git a/contrib/binutils/bfd/ihex.c b/contrib/binutils/bfd/ihex.c
index 5d2d47fbcb7a..fb2ab96c99ed 100644
--- a/contrib/binutils/bfd/ihex.c
+++ b/contrib/binutils/bfd/ihex.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel Hex objects.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This is what Intel Hex files look like:
@@ -116,8 +116,7 @@ The MRI compiler uses this, which is a repeat of type 5:
10..13 Upper 16 bits of start address
14..17 Lower 16 bits of start address
18..19 Checksum in hex notation
- 20..21 Carriage return, line feed
-*/
+ 20..21 Carriage return, line feed. */
#include "bfd.h"
#include "sysdep.h"
@@ -125,33 +124,6 @@ The MRI compiler uses this, which is a repeat of type 5:
#include "libiberty.h"
#include "safe-ctype.h"
-static void ihex_init
- PARAMS ((void));
-static bfd_boolean ihex_mkobject
- PARAMS ((bfd *));
-static INLINE int ihex_get_byte
- PARAMS ((bfd *, bfd_boolean *));
-static void ihex_bad_byte
- PARAMS ((bfd *, unsigned int, int, bfd_boolean));
-static bfd_boolean ihex_scan
- PARAMS ((bfd *));
-static const bfd_target *ihex_object_p
- PARAMS ((bfd *));
-static bfd_boolean ihex_read_section
- PARAMS ((bfd *, asection *, bfd_byte *));
-static bfd_boolean ihex_get_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
-static bfd_boolean ihex_set_section_contents
- PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
-static bfd_boolean ihex_write_record
- PARAMS ((bfd *, size_t, unsigned int, unsigned int, bfd_byte *));
-static bfd_boolean ihex_write_object_contents
- PARAMS ((bfd *));
-static bfd_boolean ihex_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long));
-static int ihex_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
-
/* The number of bytes we put on one line during output. */
#define CHUNK 16
@@ -185,7 +157,7 @@ struct ihex_data_struct
/* Initialize by filling in the hex conversion array. */
static void
-ihex_init ()
+ihex_init (void)
{
static bfd_boolean inited;
@@ -199,13 +171,11 @@ ihex_init ()
/* Create an ihex object. */
static bfd_boolean
-ihex_mkobject (abfd)
- bfd *abfd;
+ihex_mkobject (bfd *abfd)
{
struct ihex_data_struct *tdata;
- bfd_size_type amt = sizeof (struct ihex_data_struct);
- tdata = (struct ihex_data_struct *) bfd_alloc (abfd, amt);
+ tdata = bfd_alloc (abfd, sizeof (* tdata));
if (tdata == NULL)
return FALSE;
@@ -219,9 +189,7 @@ ihex_mkobject (abfd)
Return EOF on error or end of file. */
static INLINE int
-ihex_get_byte (abfd, errorptr)
- bfd *abfd;
- bfd_boolean *errorptr;
+ihex_get_byte (bfd *abfd, bfd_boolean *errorptr)
{
bfd_byte c;
@@ -238,11 +206,7 @@ ihex_get_byte (abfd, errorptr)
/* Report a problem in an Intel Hex file. */
static void
-ihex_bad_byte (abfd, lineno, c, error)
- bfd *abfd;
- unsigned int lineno;
- int c;
- bfd_boolean error;
+ihex_bad_byte (bfd *abfd, unsigned int lineno, int c, bfd_boolean error)
{
if (c == EOF)
{
@@ -261,8 +225,8 @@ ihex_bad_byte (abfd, lineno, c, error)
buf[1] = '\0';
}
(*_bfd_error_handler)
- (_("%s:%d: unexpected character `%s' in Intel Hex file\n"),
- bfd_archive_filename (abfd), lineno, buf);
+ (_("%B:%d: unexpected character `%s' in Intel Hex file"),
+ abfd, lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
}
@@ -271,8 +235,7 @@ ihex_bad_byte (abfd, lineno, c, error)
section for each contiguous set of bytes. */
static bfd_boolean
-ihex_scan (abfd)
- bfd *abfd;
+ihex_scan (bfd *abfd)
{
bfd_vma segbase;
bfd_vma extbase;
@@ -344,7 +307,7 @@ ihex_scan (abfd)
chars = len * 2 + 2;
if (chars >= bufsize)
{
- buf = (bfd_byte *) bfd_realloc (buf, (bfd_size_type) chars);
+ buf = bfd_realloc (buf, (bfd_size_type) chars);
if (buf == NULL)
goto error_return;
bufsize = chars;
@@ -369,8 +332,8 @@ ihex_scan (abfd)
if (((- chksum) & 0xff) != (unsigned int) HEX2 (buf + 2 * i))
{
(*_bfd_error_handler)
- (_("%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"),
- bfd_archive_filename (abfd), lineno,
+ (_("%B:%u: bad checksum in Intel Hex file (expected %u, found %u)"),
+ abfd, lineno,
(- chksum) & 0xff, (unsigned int) HEX2 (buf + 2 * i));
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -381,11 +344,11 @@ ihex_scan (abfd)
case 0:
/* This is a data record. */
if (sec != NULL
- && sec->vma + sec->_raw_size == extbase + segbase + addr)
+ && sec->vma + sec->size == extbase + segbase + addr)
{
/* This data goes at the end of the section we are
currently building. */
- sec->_raw_size += len;
+ sec->size += len;
}
else if (len > 0)
{
@@ -395,7 +358,7 @@ ihex_scan (abfd)
sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1);
amt = strlen (secbuf) + 1;
- secname = (char *) bfd_alloc (abfd, amt);
+ secname = bfd_alloc (abfd, amt);
if (secname == NULL)
goto error_return;
strcpy (secname, secbuf);
@@ -405,7 +368,7 @@ ihex_scan (abfd)
sec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
sec->vma = extbase + segbase + addr;
sec->lma = extbase + segbase + addr;
- sec->_raw_size = len;
+ sec->size = len;
sec->filepos = pos;
}
break;
@@ -423,8 +386,8 @@ ihex_scan (abfd)
if (len != 2)
{
(*_bfd_error_handler)
- (_("%s:%u: bad extended address record length in Intel Hex file"),
- bfd_archive_filename (abfd), lineno);
+ (_("%B:%u: bad extended address record length in Intel Hex file"),
+ abfd, lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -440,8 +403,8 @@ ihex_scan (abfd)
if (len != 4)
{
(*_bfd_error_handler)
- (_("%s:%u: bad extended start address length in Intel Hex file"),
- bfd_archive_filename (abfd), lineno);
+ (_("%B:%u: bad extended start address length in Intel Hex file"),
+ abfd, lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -457,8 +420,8 @@ ihex_scan (abfd)
if (len != 2)
{
(*_bfd_error_handler)
- (_("%s:%u: bad extended linear address record length in Intel Hex file"),
- bfd_archive_filename (abfd), lineno);
+ (_("%B:%u: bad extended linear address record length in Intel Hex file"),
+ abfd, lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -474,8 +437,8 @@ ihex_scan (abfd)
if (len != 2 && len != 4)
{
(*_bfd_error_handler)
- (_("%s:%u: bad extended linear start address length in Intel Hex file"),
- bfd_archive_filename (abfd), lineno);
+ (_("%B:%u: bad extended linear start address length in Intel Hex file"),
+ abfd, lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -491,8 +454,8 @@ ihex_scan (abfd)
default:
(*_bfd_error_handler)
- (_("%s:%u: unrecognized ihex type %u in Intel Hex file\n"),
- bfd_archive_filename (abfd), lineno, type);
+ (_("%B:%u: unrecognized ihex type %u in Intel Hex file"),
+ abfd, lineno, type);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -516,10 +479,9 @@ ihex_scan (abfd)
/* Try to recognize an Intel Hex file. */
static const bfd_target *
-ihex_object_p (abfd)
- bfd *abfd;
+ihex_object_p (bfd *abfd)
{
- PTR tdata_save;
+ void * tdata_save;
bfd_byte b[9];
unsigned int i;
unsigned int type;
@@ -573,10 +535,7 @@ ihex_object_p (abfd)
/* Read the contents of a section in an Intel Hex file. */
static bfd_boolean
-ihex_read_section (abfd, section, contents)
- bfd *abfd;
- asection *section;
- bfd_byte *contents;
+ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents)
{
int c;
bfd_byte *p;
@@ -616,15 +575,14 @@ ihex_read_section (abfd, section, contents)
if (type != 0)
{
(*_bfd_error_handler)
- (_("%s: internal error in ihex_read_section"),
- bfd_archive_filename (abfd));
+ (_("%B: internal error in ihex_read_section"), abfd);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
if (len * 2 > bufsize)
{
- buf = (bfd_byte *) bfd_realloc (buf, (bfd_size_type) len * 2);
+ buf = bfd_realloc (buf, (bfd_size_type) len * 2);
if (buf == NULL)
goto error_return;
bufsize = len * 2;
@@ -635,7 +593,7 @@ ihex_read_section (abfd, section, contents)
for (i = 0; i < len; i++)
*p++ = HEX2 (buf + 2 * i);
- if ((bfd_size_type) (p - contents) >= section->_raw_size)
+ if ((bfd_size_type) (p - contents) >= section->size)
{
/* We've read everything in the section. */
if (buf != NULL)
@@ -648,11 +606,10 @@ ihex_read_section (abfd, section, contents)
goto error_return;
}
- if ((bfd_size_type) (p - contents) < section->_raw_size)
+ if ((bfd_size_type) (p - contents) < section->size)
{
(*_bfd_error_handler)
- (_("%s: bad section length in ihex_read_section"),
- bfd_archive_filename (abfd));
+ (_("%B: bad section length in ihex_read_section"), abfd);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -671,16 +628,15 @@ ihex_read_section (abfd, section, contents)
/* Get the contents of a section in an Intel Hex file. */
static bfd_boolean
-ihex_get_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- asection *section;
- PTR location;
- file_ptr offset;
- bfd_size_type count;
+ihex_get_section_contents (bfd *abfd,
+ asection *section,
+ void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
if (section->used_by_bfd == NULL)
{
- section->used_by_bfd = bfd_alloc (abfd, section->_raw_size);
+ section->used_by_bfd = bfd_alloc (abfd, section->size);
if (section->used_by_bfd == NULL)
return FALSE;
if (! ihex_read_section (abfd, section, section->used_by_bfd))
@@ -696,29 +652,26 @@ ihex_get_section_contents (abfd, section, location, offset, count)
/* Set the contents of a section in an Intel Hex file. */
static bfd_boolean
-ihex_set_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- asection *section;
- const PTR location;
- file_ptr offset;
- bfd_size_type count;
+ihex_set_section_contents (bfd *abfd,
+ asection *section,
+ const void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
struct ihex_data_list *n;
bfd_byte *data;
struct ihex_data_struct *tdata;
- bfd_size_type amt;
if (count == 0
|| (section->flags & SEC_ALLOC) == 0
|| (section->flags & SEC_LOAD) == 0)
return TRUE;
- amt = sizeof (struct ihex_data_list);
- n = (struct ihex_data_list *) bfd_alloc (abfd, amt);
+ n = bfd_alloc (abfd, sizeof (* n));
if (n == NULL)
return FALSE;
- data = (bfd_byte *) bfd_alloc (abfd, count);
+ data = bfd_alloc (abfd, count);
if (data == NULL)
return FALSE;
memcpy (data, location, (size_t) count);
@@ -739,7 +692,7 @@ ihex_set_section_contents (abfd, section, location, offset, count)
}
else
{
- register struct ihex_data_list **pp;
+ struct ihex_data_list **pp;
for (pp = &tdata->head;
*pp != NULL && (*pp)->where < n->where;
@@ -757,12 +710,11 @@ ihex_set_section_contents (abfd, section, location, offset, count)
/* Write a record out to an Intel Hex file. */
static bfd_boolean
-ihex_write_record (abfd, count, addr, type, data)
- bfd *abfd;
- size_t count;
- unsigned int addr;
- unsigned int type;
- bfd_byte *data;
+ihex_write_record (bfd *abfd,
+ size_t count,
+ unsigned int addr,
+ unsigned int type,
+ bfd_byte *data)
{
static const char digs[] = "0123456789ABCDEF";
char buf[9 + CHUNK * 2 + 4];
@@ -802,8 +754,7 @@ ihex_write_record (abfd, count, addr, type, data)
/* Write out an Intel Hex file. */
static bfd_boolean
-ihex_write_object_contents (abfd)
- bfd *abfd;
+ihex_write_object_contents (bfd *abfd)
{
bfd_vma segbase;
bfd_vma extbase;
@@ -820,6 +771,7 @@ ihex_write_object_contents (abfd)
where = l->where;
p = l->data;
count = l->size;
+
while (count > 0)
{
size_t now;
@@ -933,10 +885,9 @@ ihex_write_object_contents (abfd)
irrelevant, so we ignore errors about unknown architectures. */
static bfd_boolean
-ihex_set_arch_mach (abfd, arch, mach)
- bfd *abfd;
- enum bfd_architecture arch;
- unsigned long mach;
+ihex_set_arch_mach (bfd *abfd,
+ enum bfd_architecture arch,
+ unsigned long mach)
{
if (! bfd_default_set_arch_mach (abfd, arch, mach))
{
@@ -949,76 +900,70 @@ ihex_set_arch_mach (abfd, arch, mach)
/* Get the size of the headers, for the linker. */
static int
-ihex_sizeof_headers (abfd, exec)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_boolean exec ATTRIBUTE_UNUSED;
+ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean exec ATTRIBUTE_UNUSED)
{
return 0;
}
/* Some random definitions for the target vector. */
-#define ihex_close_and_cleanup _bfd_generic_close_and_cleanup
-#define ihex_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
-#define ihex_new_section_hook _bfd_generic_new_section_hook
-#define ihex_get_section_contents_in_window \
- _bfd_generic_get_section_contents_in_window
-
-#define ihex_get_symtab_upper_bound bfd_0l
-#define ihex_canonicalize_symtab \
- ((long (*) PARAMS ((bfd *, asymbol **))) bfd_0l)
-#define ihex_make_empty_symbol _bfd_generic_make_empty_symbol
-#define ihex_print_symbol _bfd_nosymbols_print_symbol
-#define ihex_get_symbol_info _bfd_nosymbols_get_symbol_info
-#define ihex_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
-#define ihex_get_lineno _bfd_nosymbols_get_lineno
-#define ihex_find_nearest_line _bfd_nosymbols_find_nearest_line
-#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 (*) PARAMS ((bfd *, asection *))) bfd_0l)
-#define ihex_canonicalize_reloc \
- ((long (*) PARAMS ((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
-#define ihex_bfd_merge_sections bfd_generic_merge_sections
-#define ihex_bfd_discard_group bfd_generic_discard_group
-#define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
-#define ihex_bfd_link_just_syms _bfd_generic_link_just_syms
-#define ihex_bfd_final_link _bfd_generic_final_link
-#define ihex_bfd_link_split_section _bfd_generic_link_split_section
+#define ihex_close_and_cleanup _bfd_generic_close_and_cleanup
+#define ihex_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
+#define ihex_new_section_hook _bfd_generic_new_section_hook
+#define ihex_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
+#define ihex_get_symtab_upper_bound bfd_0l
+#define ihex_canonicalize_symtab ((long (*) (bfd *, asymbol **)) bfd_0l)
+#define ihex_make_empty_symbol _bfd_generic_make_empty_symbol
+#define ihex_print_symbol _bfd_nosymbols_print_symbol
+#define ihex_get_symbol_info _bfd_nosymbols_get_symbol_info
+#define ihex_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
+#define ihex_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
+#define ihex_get_lineno _bfd_nosymbols_get_lineno
+#define ihex_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define ihex_find_inliner_info _bfd_nosymbols_find_inliner_info
+#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
+#define ihex_bfd_merge_sections bfd_generic_merge_sections
+#define ihex_bfd_is_group_section bfd_generic_is_group_section
+#define ihex_bfd_discard_group bfd_generic_discard_group
+#define ihex_section_already_linked _bfd_generic_section_already_linked
+#define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
+#define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
+#define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define ihex_bfd_link_just_syms _bfd_generic_link_just_syms
+#define ihex_bfd_final_link _bfd_generic_final_link
+#define ihex_bfd_link_split_section _bfd_generic_link_split_section
/* The Intel Hex target vector. */
const bfd_target ihex_vec =
{
- "ihex", /* name */
+ "ihex", /* Name. */
bfd_target_ihex_flavour,
- BFD_ENDIAN_UNKNOWN, /* target byte order */
- BFD_ENDIAN_UNKNOWN, /* target headers byte order */
- 0, /* object flags */
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD), /* section flags */
- 0, /* leading underscore */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
+ BFD_ENDIAN_UNKNOWN, /* Target byte order. */
+ BFD_ENDIAN_UNKNOWN, /* Target headers byte order. */
+ 0, /* Object flags. */
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD), /* Section flags. */
+ 0, /* Leading underscore. */
+ ' ', /* AR_pad_char. */
+ 16, /* AR_max_namelen. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
{
_bfd_dummy_target,
- ihex_object_p, /* bfd_check_format */
+ ihex_object_p, /* bfd_check_format. */
_bfd_dummy_target,
_bfd_dummy_target,
},
@@ -1028,7 +973,7 @@ const bfd_target ihex_vec =
_bfd_generic_mkarchive,
bfd_false,
},
- { /* bfd_write_contents */
+ { /* bfd_write_contents. */
bfd_false,
ihex_write_object_contents,
_bfd_write_archive_contents,
@@ -1047,5 +992,5 @@ const bfd_target ihex_vec =
NULL,
- (PTR) 0
+ NULL
};
diff --git a/contrib/binutils/bfd/init.c b/contrib/binutils/bfd/init.c
index 07401eb94780..a34acbf9faf5 100644
--- a/contrib/binutils/bfd/init.c
+++ b/contrib/binutils/bfd/init.c
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -27,6 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
SECTION
Initialization
+SUBSECTION
+ Initialization functions
+
These are the functions that handle initializing a BFD.
*/
diff --git a/contrib/binutils/bfd/libaout.h b/contrib/binutils/bfd/libaout.h
index 67054e378273..bb3ee8082674 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
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef LIBAOUT_H
#define LIBAOUT_H
@@ -31,22 +31,22 @@
/* Macros for accessing components in an aout header. */
-#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_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_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
+#define H_GET_S8 bfd_h_get_signed_8
/* Parameterize the a.out code based on whether it is being built
for a 32-bit architecture or a 64-bit architecture. */
@@ -54,10 +54,10 @@
remove whitespace added here, and thus will fail to concatenate
the tokens. */
#if ARCH_SIZE==64
-#define GET_WORD H_GET_64
+#define GET_WORD H_GET_64
#define GET_SWORD H_GET_S64
#define GET_MAGIC H_GET_32
-#define PUT_WORD H_PUT_64
+#define PUT_WORD H_PUT_64
#define PUT_MAGIC H_PUT_32
#ifndef NAME
#define NAME(x,y) CONCAT3 (x,_64_,y)
@@ -66,10 +66,10 @@
#define BYTES_IN_WORD 8
#else
#if ARCH_SIZE==16
-#define GET_WORD H_GET_16
+#define GET_WORD H_GET_16
#define GET_SWORD H_GET_S16
#define GET_MAGIC H_GET_16
-#define PUT_WORD H_PUT_16
+#define PUT_WORD H_PUT_16
#define PUT_MAGIC H_PUT_16
#ifndef NAME
#define NAME(x,y) CONCAT3 (x,_16_,y)
@@ -77,10 +77,10 @@
#define JNAME(x) CONCAT2 (x,_16)
#define BYTES_IN_WORD 2
#else /* ARCH_SIZE == 32 */
-#define GET_WORD H_GET_32
+#define GET_WORD H_GET_32
#define GET_SWORD H_GET_S32
#define GET_MAGIC H_GET_32
-#define PUT_WORD H_PUT_32
+#define PUT_WORD H_PUT_32
#define PUT_MAGIC H_PUT_32
#ifndef NAME
#define NAME(x,y) CONCAT3 (x,_32_,y)
@@ -126,7 +126,7 @@ struct aout_link_hash_table
#define aout_link_hash_traverse(table, func, info) \
(bfd_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \
(info)))
/* Get the a.out link hash table from the info structure. This is
@@ -165,8 +165,7 @@ struct aout_backend_data
/* Callback for setting the page and segment sizes, if they can't be
trivially determined from the architecture. */
- bfd_boolean (*set_sizes)
- PARAMS ((bfd *));
+ bfd_boolean (*set_sizes) (bfd *);
/* zmagic files only. For go32, the length of the exec header contributes
to the size of the text section in the file for alignment purposes but
@@ -176,39 +175,38 @@ struct aout_backend_data
/* Callback from the add symbols phase of the linker code to handle
a dynamic object. */
bfd_boolean (*add_dynamic_symbols)
- PARAMS ((bfd *, struct bfd_link_info *, struct external_nlist **,
- bfd_size_type *, char **));
+ (bfd *, struct bfd_link_info *, struct external_nlist **,
+ bfd_size_type *, char **);
/* Callback from the add symbols phase of the linker code to handle
adding a single symbol to the global linker hash table. */
bfd_boolean (*add_one_symbol)
- PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
- asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
- struct bfd_link_hash_entry **));
+ (struct bfd_link_info *, bfd *, const char *, flagword,
+ asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
+ struct bfd_link_hash_entry **);
/* Called to handle linking a dynamic object. */
bfd_boolean (*link_dynamic_object)
- PARAMS ((struct bfd_link_info *, bfd *));
+ (struct bfd_link_info *, bfd *);
/* Called for each global symbol being written out by the linker.
This should write out the dynamic symbol information. */
bfd_boolean (*write_dynamic_symbol)
- PARAMS ((bfd *, struct bfd_link_info *, struct aout_link_hash_entry *));
+ (bfd *, struct bfd_link_info *, struct aout_link_hash_entry *);
/* If this callback is not NULL, the linker calls it for each reloc.
RELOC is a pointer to the unswapped reloc. If *SKIP is set to
TRUE, the reloc will be skipped. *RELOCATION may be changed to
change the effects of the relocation. */
bfd_boolean (*check_dynamic_reloc)
- PARAMS ((struct bfd_link_info *info, bfd *input_bfd,
- asection *input_section, struct aout_link_hash_entry *h,
- PTR reloc, bfd_byte *contents, bfd_boolean *skip,
- bfd_vma *relocation));
+ (struct bfd_link_info *info, bfd *input_bfd,
+ asection *input_section, struct aout_link_hash_entry *h,
+ void * reloc, bfd_byte *contents, bfd_boolean *skip,
+ bfd_vma *relocation);
/* Called at the end of a link to finish up any dynamic linking
information. */
- bfd_boolean (*finish_dynamic_link)
- PARAMS ((bfd *, struct bfd_link_info *));
+ bfd_boolean (*finish_dynamic_link) (bfd *, struct bfd_link_info *);
};
#define aout_backend_info(abfd) \
((const struct aout_backend_data *)((abfd)->xvec->backend_data))
@@ -221,73 +219,77 @@ struct aout_backend_data
struct internal_exec
{
- long a_info; /* Magic number and flags, packed */
- bfd_vma a_text; /* length of text, in bytes */
- bfd_vma a_data; /* length of data, in bytes */
- bfd_vma a_bss; /* length of uninitialized data area in mem */
- bfd_vma a_syms; /* length of symbol table data in file */
- bfd_vma a_entry; /* start address */
- bfd_vma a_trsize; /* length of text's relocation info, in bytes */
- bfd_vma a_drsize; /* length of data's relocation info, in bytes */
- /* Added for i960 */
- bfd_vma a_tload; /* Text runtime load address */
- bfd_vma a_dload; /* Data runtime load address */
- unsigned char a_talign; /* Alignment of text segment */
- unsigned char a_dalign; /* Alignment of data segment */
- unsigned char a_balign; /* Alignment of bss segment */
- char a_relaxable; /* Enough info for linker relax */
+ long a_info; /* Magic number and flags, packed. */
+ bfd_vma a_text; /* Length of text, in bytes. */
+ bfd_vma a_data; /* Length of data, in bytes. */
+ bfd_vma a_bss; /* Length of uninitialized data area in mem. */
+ bfd_vma a_syms; /* Length of symbol table data in file. */
+ bfd_vma a_entry; /* Start address. */
+ bfd_vma a_trsize; /* Length of text's relocation info, in bytes. */
+ bfd_vma a_drsize; /* Length of data's relocation info, in bytes. */
+ /* Added for i960 */
+ bfd_vma a_tload; /* Text runtime load address. */
+ bfd_vma a_dload; /* Data runtime load address. */
+ unsigned char a_talign; /* Alignment of text segment. */
+ unsigned char a_dalign; /* Alignment of data segment. */
+ unsigned char a_balign; /* Alignment of bss segment. */
+ char a_relaxable; /* Enough info for linker relax. */
};
/* Magic number is written
-< MSB >
-3130292827262524232221201918171615141312111009080706050403020100
-< FLAGS >< MACHINE TYPE >< MAGIC NUMBER >
-*/
+ < MSB >
+ 3130292827262524232221201918171615141312111009080706050403020100
+ < FLAGS >< MACHINE TYPE >< MAGIC NUMBER > */
+
/* Magic number for NetBSD is
-<MSB >
-3130292827262524232221201918171615141312111009080706050403020100
-< FLAGS >< MACHINE TYPE >< MAGIC NUMBER >
-*/
+ <MSB >
+ 3130292827262524232221201918171615141312111009080706050403020100
+ < FLAGS >< MACHINE TYPE >< MAGIC NUMBER > */
-enum machine_type {
+enum machine_type
+{
M_UNKNOWN = 0,
M_68010 = 1,
M_68020 = 2,
M_SPARC = 3,
/* Skip a bunch so we don't run into any of SUN's numbers. */
/* Make these up for the ns32k. */
- M_NS32032 = (64), /* ns32032 running ? */
- M_NS32532 = (64 + 5), /* ns32532 running mach */
-
+ M_NS32032 = (64), /* NS32032 running ? */
+ M_NS32532 = (64 + 5), /* NS32532 running mach. */
M_386 = 100,
- M_29K = 101, /* AMD 29000 */
- M_386_DYNIX = 102, /* Sequent running dynix */
- M_ARM = 103, /* Advanced Risc Machines ARM */
- M_SPARCLET = 131, /* SPARClet = M_SPARC + 128 */
- M_386_NETBSD = 134, /* NetBSD/i386 binary */
- M_68K_NETBSD = 135, /* NetBSD/m68k binary */
- M_68K4K_NETBSD = 136, /* NetBSD/m68k4k binary */
- M_532_NETBSD = 137, /* NetBSD/ns32k binary */
- M_SPARC_NETBSD = 138, /* NetBSD/sparc binary */
- M_PMAX_NETBSD = 139, /* NetBSD/pmax (MIPS little-endian) binary */
- M_VAX_NETBSD = 140, /* NetBSD/vax binary */
- M_ALPHA_NETBSD = 141, /* NetBSD/alpha binary */
- M_ARM6_NETBSD = 143, /* NetBSD/arm32 binary */
- M_SPARCLET_1 = 147, /* 0x93, reserved */
- M_VAX4K_NETBSD = 150, /* NetBSD/vax 4K pages binary */
- M_MIPS1 = 151, /* MIPS R2000/R3000 binary */
- M_MIPS2 = 152, /* MIPS R4000/R6000 binary */
- M_SPARCLET_2 = 163, /* 0xa3, reserved */
- M_SPARCLET_3 = 179, /* 0xb3, reserved */
- M_SPARCLET_4 = 195, /* 0xc3, reserved */
- M_HP200 = 200, /* HP 200 (68010) BSD binary */
- M_HP300 = (300 % 256), /* HP 300 (68020+68881) BSD binary */
- M_HPUX = (0x20c % 256), /* HP 200/300 HPUX binary */
- M_SPARCLET_5 = 211, /* 0xd3, reserved */
- M_SPARCLET_6 = 227, /* 0xe3, reserved */
- /* M_SPARCLET_7 = 243 / * 0xf3, reserved */
+ M_29K = 101, /* AMD 29000. */
+ M_386_DYNIX = 102, /* Sequent running dynix. */
+ M_ARM = 103, /* Advanced Risc Machines ARM. */
+ M_SPARCLET = 131, /* SPARClet = M_SPARC + 128. */
+ M_386_NETBSD = 134, /* NetBSD/i386 binary. */
+ M_68K_NETBSD = 135, /* NetBSD/m68k binary. */
+ M_68K4K_NETBSD = 136, /* NetBSD/m68k4k binary. */
+ M_532_NETBSD = 137, /* NetBSD/ns32k binary. */
+ M_SPARC_NETBSD = 138, /* NetBSD/sparc binary. */
+ M_PMAX_NETBSD = 139, /* NetBSD/pmax (MIPS little-endian) binary. */
+ M_VAX_NETBSD = 140, /* NetBSD/vax binary. */
+ M_ALPHA_NETBSD = 141, /* NetBSD/alpha binary. */
+ M_ARM6_NETBSD = 143, /* NetBSD/arm32 binary. */
+ M_SPARCLET_1 = 147, /* 0x93, reserved. */
+ M_POWERPC_NETBSD = 149, /* NetBSD/powerpc (big-endian) binary. */
+ M_VAX4K_NETBSD = 150, /* NetBSD/vax 4K pages binary. */
+ M_MIPS1 = 151, /* MIPS R2000/R3000 binary. */
+ M_MIPS2 = 152, /* MIPS R4000/R6000 binary. */
+ M_88K_OPENBSD = 153, /* OpenBSD/m88k binary. */
+ M_HPPA_OPENBSD = 154, /* OpenBSD/hppa binary. */
+ M_SPARC64_NETBSD = 156, /* NetBSD/sparc64 binary. */
+ M_X86_64_NETBSD = 157, /* NetBSD/amd64 binary. */
+ M_SPARCLET_2 = 163, /* 0xa3, reserved. */
+ M_SPARCLET_3 = 179, /* 0xb3, reserved. */
+ M_SPARCLET_4 = 195, /* 0xc3, reserved. */
+ M_HP200 = 200, /* HP 200 (68010) BSD binary. */
+ M_HP300 = (300 % 256), /* HP 300 (68020+68881) BSD binary. */
+ M_HPUX = (0x20c % 256), /* HP 200/300 HPUX binary. */
+ M_SPARCLET_5 = 211, /* 0xd3, reserved. */
+ M_SPARCLET_6 = 227, /* 0xe3, reserved. */
+/*M_SPARCLET_7 = 243 / * 0xf3, reserved. */
M_SPARCLITE_LE = 243,
- M_CRIS = 255 /* Axis CRIS binary. */
+ M_CRIS = 255 /* Axis CRIS binary. */
};
#define N_DYNAMIC(exec) ((exec).a_info & 0x80000000)
@@ -334,7 +336,8 @@ enum machine_type {
((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
#endif
-typedef struct aout_symbol {
+typedef struct aout_symbol
+{
asymbol symbol;
short desc;
char other;
@@ -345,9 +348,10 @@ typedef struct aout_symbol {
Various things depend on this struct being around any time an a.out
file is being handled. An example is dbxread.c in GDB. */
-struct aoutdata {
- struct internal_exec *hdr; /* exec file header */
- aout_symbol_type *symbols; /* symtab for input bfd */
+struct aoutdata
+{
+ struct internal_exec *hdr; /* Exec file header. */
+ aout_symbol_type *symbols; /* Symtab for input bfd. */
/* For ease, we do this. */
asection *textsec;
@@ -409,7 +413,7 @@ struct aoutdata {
struct aout_link_hash_entry **sym_hashes;
/* A pointer for shared library information. */
- PTR dynamic_info;
+ void * dynamic_info;
/* A mapping from local symbols to offsets into the global offset
table, used when linking on SunOS. This is indexed by the symbol
@@ -417,30 +421,31 @@ struct aoutdata {
bfd_vma *local_got_offsets;
};
-struct aout_data_struct {
- struct aoutdata a;
- struct internal_exec e;
+struct aout_data_struct
+{
+ struct aoutdata a;
+ struct internal_exec e;
};
-#define adata(bfd) ((bfd)->tdata.aout_data->a)
-#define exec_hdr(bfd) (adata(bfd).hdr)
-#define obj_aout_symbols(bfd) (adata(bfd).symbols)
-#define obj_textsec(bfd) (adata(bfd).textsec)
-#define obj_datasec(bfd) (adata(bfd).datasec)
-#define obj_bsssec(bfd) (adata(bfd).bsssec)
-#define obj_sym_filepos(bfd) (adata(bfd).sym_filepos)
-#define obj_str_filepos(bfd) (adata(bfd).str_filepos)
-#define obj_reloc_entry_size(bfd) (adata(bfd).reloc_entry_size)
-#define obj_symbol_entry_size(bfd) (adata(bfd).symbol_entry_size)
-#define obj_aout_subformat(bfd) (adata(bfd).subformat)
-#define obj_aout_external_syms(bfd) (adata(bfd).external_syms)
-#define obj_aout_external_sym_count(bfd) (adata(bfd).external_sym_count)
-#define obj_aout_sym_window(bfd) (adata(bfd).sym_window)
-#define obj_aout_external_strings(bfd) (adata(bfd).external_strings)
-#define obj_aout_external_string_size(bfd) (adata(bfd).external_string_size)
-#define obj_aout_string_window(bfd) (adata(bfd).string_window)
-#define obj_aout_sym_hashes(bfd) (adata(bfd).sym_hashes)
-#define obj_aout_dynamic_info(bfd) (adata(bfd).dynamic_info)
+#define adata(bfd) ((bfd)->tdata.aout_data->a)
+#define exec_hdr(bfd) (adata (bfd).hdr)
+#define obj_aout_symbols(bfd) (adata (bfd).symbols)
+#define obj_textsec(bfd) (adata (bfd).textsec)
+#define obj_datasec(bfd) (adata (bfd).datasec)
+#define obj_bsssec(bfd) (adata (bfd).bsssec)
+#define obj_sym_filepos(bfd) (adata (bfd).sym_filepos)
+#define obj_str_filepos(bfd) (adata (bfd).str_filepos)
+#define obj_reloc_entry_size(bfd) (adata (bfd).reloc_entry_size)
+#define obj_symbol_entry_size(bfd) (adata (bfd).symbol_entry_size)
+#define obj_aout_subformat(bfd) (adata (bfd).subformat)
+#define obj_aout_external_syms(bfd) (adata (bfd).external_syms)
+#define obj_aout_external_sym_count(bfd) (adata (bfd).external_sym_count)
+#define obj_aout_sym_window(bfd) (adata (bfd).sym_window)
+#define obj_aout_external_strings(bfd) (adata (bfd).external_strings)
+#define obj_aout_external_string_size(bfd) (adata (bfd).external_string_size)
+#define obj_aout_string_window(bfd) (adata (bfd).string_window)
+#define obj_aout_sym_hashes(bfd) (adata (bfd).sym_hashes)
+#define obj_aout_dynamic_info(bfd) (adata (bfd).dynamic_info)
/* We take the address of the first element of an asymbol to ensure that the
macro is only ever applied to an asymbol. */
@@ -452,137 +457,145 @@ struct aout_data_struct {
struct aout_section_data_struct
{
/* The unswapped relocation entries for this section. */
- PTR relocs;
+ void * relocs;
};
#define aout_section_data(s) \
((struct aout_section_data_struct *) (s)->used_by_bfd)
#define set_aout_section_data(s,v) \
- ((s)->used_by_bfd = (PTR)&(v)->relocs)
+ ((s)->used_by_bfd = (void *)&(v)->relocs)
/* Prototype declarations for functions defined in aoutx.h. */
-extern bfd_boolean NAME(aout,squirt_out_relocs)
- PARAMS ((bfd *, asection *));
+extern bfd_boolean NAME (aout, squirt_out_relocs)
+ (bfd *, asection *);
-extern bfd_boolean NAME(aout,make_sections)
- PARAMS ((bfd *));
+extern bfd_boolean NAME (aout, make_sections)
+ (bfd *);
-extern const bfd_target * NAME(aout,some_aout_object_p)
- PARAMS ((bfd *, struct internal_exec *, const bfd_target *(*) (bfd *)));
+extern const bfd_target * NAME (aout, some_aout_object_p)
+ (bfd *, struct internal_exec *, const bfd_target *(*) (bfd *));
-extern bfd_boolean NAME(aout,mkobject)
- PARAMS ((bfd *));
+extern bfd_boolean NAME (aout, mkobject)
+ (bfd *);
-extern enum machine_type NAME(aout,machine_type)
- PARAMS ((enum bfd_architecture, unsigned long, bfd_boolean *));
+extern enum machine_type NAME (aout, machine_type)
+ (enum bfd_architecture, unsigned long, bfd_boolean *);
-extern bfd_boolean NAME(aout,set_arch_mach)
- PARAMS ((bfd *, enum bfd_architecture, unsigned long));
+extern bfd_boolean NAME (aout, set_arch_mach)
+ (bfd *, enum bfd_architecture, unsigned long);
-extern bfd_boolean NAME(aout,new_section_hook)
- PARAMS ((bfd *, asection *));
+extern bfd_boolean NAME (aout, new_section_hook)
+ (bfd *, asection *);
-extern bfd_boolean NAME(aout,set_section_contents)
- PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
+extern bfd_boolean NAME (aout, set_section_contents)
+ (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
-extern asymbol * NAME(aout,make_empty_symbol)
- PARAMS ((bfd *));
+extern asymbol * NAME (aout, make_empty_symbol)
+ (bfd *);
-extern bfd_boolean NAME(aout,translate_symbol_table)
- PARAMS ((bfd *, aout_symbol_type *, struct external_nlist *, bfd_size_type,
- char *, bfd_size_type, bfd_boolean));
+extern bfd_boolean NAME (aout, translate_symbol_table)
+ (bfd *, aout_symbol_type *, struct external_nlist *, bfd_size_type,
+ char *, bfd_size_type, bfd_boolean);
-extern bfd_boolean NAME(aout,slurp_symbol_table)
- PARAMS ((bfd *));
+extern bfd_boolean NAME (aout, slurp_symbol_table)
+ (bfd *);
-extern bfd_boolean NAME(aout,write_syms)
- PARAMS ((bfd *));
+extern bfd_boolean NAME (aout, write_syms)
+ (bfd *);
-extern void NAME(aout,reclaim_symbol_table)
- PARAMS ((bfd *));
+extern void NAME (aout, reclaim_symbol_table)
+ (bfd *);
-extern long NAME(aout,get_symtab_upper_bound)
- PARAMS ((bfd *));
+extern long NAME (aout, get_symtab_upper_bound)
+ (bfd *);
-extern long NAME(aout,canonicalize_symtab)
- PARAMS ((bfd *, asymbol **));
+extern long NAME (aout, canonicalize_symtab)
+ (bfd *, asymbol **);
-extern void NAME(aout,swap_ext_reloc_in)
- PARAMS ((bfd *, struct reloc_ext_external *, arelent *, asymbol **,
- bfd_size_type));
-extern void NAME(aout,swap_std_reloc_in)
- PARAMS ((bfd *, struct reloc_std_external *, arelent *, asymbol **,
- bfd_size_type));
+extern void NAME (aout, swap_ext_reloc_in)
+ (bfd *, struct reloc_ext_external *, arelent *, asymbol **,
+ bfd_size_type);
-extern reloc_howto_type * NAME(aout,reloc_type_lookup)
- PARAMS ((bfd *, bfd_reloc_code_real_type));
+extern void NAME (aout, swap_std_reloc_in)
+ (bfd *, struct reloc_std_external *, arelent *, asymbol **,
+ bfd_size_type);
-extern bfd_boolean NAME(aout,slurp_reloc_table)
- PARAMS ((bfd *, sec_ptr, asymbol **));
+extern reloc_howto_type * NAME (aout, reloc_type_lookup)
+ (bfd *, bfd_reloc_code_real_type);
-extern long NAME(aout,canonicalize_reloc)
- PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
+extern bfd_boolean NAME (aout, slurp_reloc_table)
+ (bfd *, sec_ptr, asymbol **);
-extern long NAME(aout,get_reloc_upper_bound)
- PARAMS ((bfd *, sec_ptr));
+extern long NAME (aout, canonicalize_reloc)
+ (bfd *, sec_ptr, arelent **, asymbol **);
-extern void NAME(aout,reclaim_reloc)
- PARAMS ((bfd *, sec_ptr));
+extern long NAME (aout, get_reloc_upper_bound)
+ (bfd *, sec_ptr);
-extern alent * NAME(aout,get_lineno)
- PARAMS ((bfd *, asymbol *));
+extern void NAME (aout, reclaim_reloc)
+ (bfd *, sec_ptr);
-extern void NAME(aout,print_symbol)
- PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
+extern alent * NAME (aout, get_lineno)
+ (bfd *, asymbol *);
-extern void NAME(aout,get_symbol_info)
- PARAMS ((bfd *, asymbol *, symbol_info *));
+extern void NAME (aout, print_symbol)
+ (bfd *, void *, asymbol *, bfd_print_symbol_type);
-extern bfd_boolean NAME(aout,find_nearest_line)
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
+extern void NAME (aout, get_symbol_info)
+ (bfd *, asymbol *, symbol_info *);
-extern long NAME(aout,read_minisymbols)
- PARAMS ((bfd *, bfd_boolean, PTR *, unsigned int *));
+extern bfd_boolean NAME (aout, find_nearest_line)
+ (bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *);
-extern asymbol * NAME(aout,minisymbol_to_symbol)
- PARAMS ((bfd *, bfd_boolean, const PTR, asymbol *));
+extern long NAME (aout, read_minisymbols)
+ (bfd *, bfd_boolean, void * *, unsigned int *);
-extern int NAME(aout,sizeof_headers)
- PARAMS ((bfd *, bfd_boolean));
+extern asymbol * NAME (aout, minisymbol_to_symbol)
+ (bfd *, bfd_boolean, const void *, asymbol *);
-extern bfd_boolean NAME(aout,adjust_sizes_and_vmas)
- PARAMS ((bfd *, bfd_size_type *, file_ptr *));
+extern int NAME (aout, sizeof_headers)
+ (bfd *, bfd_boolean);
-extern void NAME(aout,swap_exec_header_in)
- PARAMS ((bfd *, struct external_exec *, struct internal_exec *));
+extern bfd_boolean NAME (aout, adjust_sizes_and_vmas)
+ (bfd *, bfd_size_type *, file_ptr *);
-extern void NAME(aout,swap_exec_header_out)
- PARAMS ((bfd *, struct internal_exec *, struct external_exec *));
+extern void NAME (aout, swap_exec_header_in)
+ (bfd *, struct external_exec *, struct internal_exec *);
-extern struct bfd_hash_entry * NAME(aout,link_hash_newfunc)
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+extern void NAME (aout, swap_exec_header_out)
+ (bfd *, struct internal_exec *, struct external_exec *);
-extern bfd_boolean NAME(aout,link_hash_table_init)
- PARAMS ((struct aout_link_hash_table *, bfd *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *)));
+extern struct bfd_hash_entry * NAME (aout, link_hash_newfunc)
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-extern struct bfd_link_hash_table * NAME(aout,link_hash_table_create)
- PARAMS ((bfd *));
+extern bfd_boolean NAME (aout, link_hash_table_init)
+ (struct aout_link_hash_table *, bfd *,
+ struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *),
+ unsigned int);
-extern bfd_boolean NAME(aout,link_add_symbols)
- PARAMS ((bfd *, struct bfd_link_info *));
+extern struct bfd_link_hash_table * NAME (aout, link_hash_table_create)
+ (bfd *);
-extern bfd_boolean NAME(aout,final_link)
- PARAMS ((bfd *, struct bfd_link_info *,
- void (*) (bfd *, file_ptr *, file_ptr *, file_ptr *)));
+extern bfd_boolean NAME (aout, link_add_symbols)
+ (bfd *, struct bfd_link_info *);
-extern bfd_boolean NAME(aout,bfd_free_cached_info)
- PARAMS ((bfd *));
+extern bfd_boolean NAME (aout, final_link)
+ (bfd *, struct bfd_link_info *,
+ void (*) (bfd *, file_ptr *, file_ptr *, file_ptr *));
+
+extern bfd_boolean NAME (aout, bfd_free_cached_info)
+ (bfd *);
+
+#define aout_32_find_inliner_info _bfd_nosymbols_find_inliner_info
+#if 0 /* Are these needed? */
+#define aout_16_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define aout_64_find_inliner_info _bfd_nosymbols_find_inliner_info
+#endif
/* A.out uses the generic versions of these routines... */
@@ -599,13 +612,19 @@ extern bfd_boolean NAME(aout,bfd_free_cached_info)
#define aout_32_bfd_is_local_label_name bfd_generic_is_local_label_name
#endif
+#ifndef aout_32_bfd_is_target_special_symbol
+#define aout_32_bfd_is_target_special_symbol \
+ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
+#endif
+
#ifndef WRITE_HEADERS
#define WRITE_HEADERS(abfd, execp) \
{ \
- bfd_size_type text_size; /* dummy vars */ \
+ bfd_size_type text_size; /* Dummy vars. */ \
file_ptr text_end; \
+ \
if (adata(abfd).magic == undecided_magic) \
- NAME(aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end); \
+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end); \
\
execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE; \
execp->a_entry = bfd_get_start_address (abfd); \
@@ -614,32 +633,32 @@ extern bfd_boolean NAME(aout,bfd_free_cached_info)
obj_reloc_entry_size (abfd)); \
execp->a_drsize = ((obj_datasec (abfd)->reloc_count) * \
obj_reloc_entry_size (abfd)); \
- NAME(aout,swap_exec_header_out) (abfd, execp, &exec_bytes); \
+ NAME (aout, swap_exec_header_out) (abfd, execp, & exec_bytes); \
\
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 \
- || bfd_bwrite ((PTR) &exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, \
+ || bfd_bwrite (& exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, \
abfd) != EXEC_BYTES_SIZE) \
return FALSE; \
/* Now write out reloc info, followed by syms and strings. */ \
\
- if (bfd_get_outsymbols (abfd) != (asymbol **) NULL \
+ if (bfd_get_outsymbols (abfd) != NULL \
&& bfd_get_symcount (abfd) != 0) \
{ \
if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)\
return FALSE; \
\
- if (! NAME(aout,write_syms) (abfd)) \
+ if (! NAME (aout, write_syms) (abfd)) \
return FALSE; \
} \
\
- if (bfd_seek (abfd, (file_ptr) (N_TRELOFF(*execp)), SEEK_SET) != 0) \
+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0) \
return FALSE; \
- if (!NAME(aout,squirt_out_relocs) (abfd, obj_textsec (abfd))) \
+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd))) \
return FALSE; \
\
- if (bfd_seek (abfd, (file_ptr) (N_DRELOFF(*execp)), SEEK_SET) != 0) \
+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0) \
return FALSE; \
- if (!NAME(aout,squirt_out_relocs) (abfd, obj_datasec (abfd))) \
+ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd))) \
return FALSE; \
}
#endif
@@ -659,8 +678,8 @@ extern bfd_boolean NAME(aout,bfd_free_cached_info)
&& obj_textsec (abfd) != NULL \
&& obj_datasec (abfd) != NULL \
&& (sec)->vma >= (obj_textsec (abfd)->vma + \
- obj_textsec (abfd)->_cooked_size) \
- && ((sec)->vma + (sec)->_cooked_size) <= obj_datasec (abfd)->vma \
+ obj_textsec (abfd)->size) \
+ && ((sec)->vma + (sec)->size) <= obj_datasec (abfd)->vma \
&& ((abfd)->flags & D_PAGED) != 0)
#endif /* ! defined (LIBAOUT_H) */
diff --git a/contrib/binutils/bfd/libbfd-in.h b/contrib/binutils/bfd/libbfd-in.h
index 10cafefd6edd..ee2484f25c12 100644
--- a/contrib/binutils/bfd/libbfd-in.h
+++ b/contrib/binutils/bfd/libbfd-in.h
@@ -2,7 +2,8 @@
(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 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -20,7 +21,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "hashtab.h"
/* Align an address upward to a boundary, expressed as a number of bytes.
E.g. align to an 8-byte boundary with argument of 8. Take care never
@@ -50,17 +53,24 @@ struct bfd_in_memory
bfd_byte *buffer;
};
+struct section_hash_entry
+{
+ struct bfd_hash_entry root;
+ asection section;
+};
+
/* tdata for an archive. For an input archive, cache
needs to be free()'d. For an output archive, symdefs do. */
struct artdata {
file_ptr first_file_filepos;
/* Speed up searching the armap */
- struct ar_cache *cache;
+ htab_t cache;
bfd *archive_head; /* Only interesting in output routines */
carsym *symdefs; /* the symdef entries */
symindex symdef_count; /* how many there are */
char *extended_names; /* clever intel extension */
+ bfd_size_type extended_names_size; /* Size of extended names */
/* when more compilers are standard C, this can be a time_t */
long armap_timestamp; /* Timestamp value written into armap.
This is used for BSD archives to check
@@ -90,7 +100,14 @@ extern void *bfd_realloc
(void *, bfd_size_type);
extern void *bfd_zmalloc
(bfd_size_type);
-
+extern void *bfd_malloc2
+ (bfd_size_type, bfd_size_type);
+extern void *bfd_realloc2
+ (void *, bfd_size_type, bfd_size_type);
+extern void *bfd_zmalloc2
+ (bfd_size_type, bfd_size_type);
+
+extern void _bfd_default_error_handler (const char *s, ...);
extern bfd_error_handler_type _bfd_error_handler;
/* These routines allocate and free things on the BFD's objalloc. */
@@ -99,6 +116,10 @@ extern void *bfd_alloc
(bfd *, bfd_size_type);
extern void *bfd_zalloc
(bfd *, bfd_size_type);
+extern void *bfd_alloc2
+ (bfd *, bfd_size_type, bfd_size_type);
+extern void *bfd_zalloc2
+ (bfd *, bfd_size_type, bfd_size_type);
extern void bfd_release
(bfd *, void *);
@@ -174,6 +195,8 @@ bfd_boolean coff_write_armap
extern void *_bfd_generic_read_ar_hdr
(bfd *);
+extern void _bfd_ar_spacepad
+ (char *, size_t, const char *, long);
extern void *_bfd_generic_read_ar_hdr_mag
(bfd *, const char *);
@@ -212,9 +235,14 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true)
#define _bfd_generic_bfd_copy_private_symbol_data \
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true)
+#define _bfd_generic_bfd_copy_private_header_data \
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
#define _bfd_generic_bfd_print_private_bfd_data \
((bfd_boolean (*) (bfd *, void *)) bfd_true)
+extern bfd_boolean _bfd_generic_init_private_section_data
+ (bfd *, asection *, bfd *, asection *, struct bfd_link_info *);
+
/* Routines to use for BFD_JUMP_TABLE_CORE when there is no core file
support. Use BFD_JUMP_TABLE_CORE (_bfd_nocore). */
@@ -296,12 +324,17 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
((void (*) (bfd *, asymbol *, symbol_info *)) bfd_void)
#define _bfd_nosymbols_bfd_is_local_label_name \
((bfd_boolean (*) (bfd *, const char *)) bfd_false)
+#define _bfd_nosymbols_bfd_is_target_special_symbol \
+ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define _bfd_nosymbols_get_lineno \
((alent *(*) (bfd *, asymbol *)) bfd_nullvoidptr)
#define _bfd_nosymbols_find_nearest_line \
((bfd_boolean (*) (bfd *, asection *, asymbol **, bfd_vma, const char **, \
const char **, unsigned int *)) \
bfd_false)
+#define _bfd_nosymbols_find_inliner_info \
+ ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \
+ bfd_false)
#define _bfd_nosymbols_bfd_make_debug_symbol \
((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
#define _bfd_nosymbols_read_minisymbols \
@@ -355,6 +388,9 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_merge_sections \
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
bfd_false)
+#define _bfd_nolink_bfd_is_group_section \
+ ((bfd_boolean (*) (bfd *, const struct bfd_section *)) \
+ bfd_false)
#define _bfd_nolink_bfd_discard_group \
((bfd_boolean (*) (bfd *, struct bfd_section *)) \
bfd_false)
@@ -370,6 +406,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
#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)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -378,6 +416,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_symtab \
((long (*) (bfd *, asymbol **)) _bfd_n1)
+#define _bfd_nodynamic_get_synthetic_symtab \
+ ((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) _bfd_n1)
#define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_reloc \
((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1)
@@ -398,7 +438,7 @@ extern bfd_boolean _bfd_stab_section_find_nearest_line
(bfd *, asymbol **, asection *, bfd_vma, bfd_boolean *,
const char **, const char **, unsigned int *, void **);
-/* Find the neaderst line using DWARF 1 debugging information. */
+/* Find the nearest line using DWARF 1 debugging information. */
extern bfd_boolean _bfd_dwarf1_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *);
@@ -408,6 +448,18 @@ extern bfd_boolean _bfd_dwarf2_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
unsigned int *, unsigned int, void **);
+/* Find the line using DWARF 2 debugging information. */
+extern bfd_boolean _bfd_dwarf2_find_line
+ (bfd *, asymbol **, asymbol *, const char **,
+ unsigned int *, unsigned int, void **);
+
+bfd_boolean _bfd_generic_find_line
+ (bfd *, asymbol **, asymbol *, const char **, unsigned int *);
+
+/* Find inliner info after calling bfd_find_nearest_line. */
+extern bfd_boolean _bfd_dwarf2_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *, void **);
+
/* Create a new section entry. */
extern struct bfd_hash_entry *bfd_section_hash_newfunc
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
@@ -422,7 +474,8 @@ extern bfd_boolean _bfd_link_hash_table_init
(struct bfd_link_hash_table *, bfd *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *));
+ const char *),
+ unsigned int);
/* Generic link hash table creation routine. */
extern struct bfd_link_hash_table *_bfd_generic_link_hash_table_create
@@ -467,6 +520,9 @@ extern bfd_boolean _bfd_generic_final_link
extern bfd_boolean _bfd_generic_link_split_section
(bfd *, struct bfd_section *);
+extern void _bfd_generic_section_already_linked
+ (bfd *, struct bfd_section *);
+
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
(bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
@@ -491,7 +547,8 @@ extern bfd_reloc_status_type _bfd_relocate_contents
/* Link stabs in sections in the first pass. */
extern bfd_boolean _bfd_link_section_stabs
- (bfd *, void **, asection *, asection *, void **, bfd_size_type *);
+ (bfd *, struct stab_info *, asection *, asection *, void **,
+ bfd_size_type *);
/* Eliminate stabs for discarded functions and symbols. */
extern bfd_boolean _bfd_discard_section_stabs
@@ -500,28 +557,28 @@ extern bfd_boolean _bfd_discard_section_stabs
/* Write out the .stab section when linking stabs in sections. */
extern bfd_boolean _bfd_write_section_stabs
- (bfd *, void **, asection *, void **, bfd_byte *);
+ (bfd *, struct stab_info *, asection *, void **, bfd_byte *);
/* Write out the .stabstr string table when linking stabs in sections. */
extern bfd_boolean _bfd_write_stab_strings
- (bfd *, void **);
+ (bfd *, struct stab_info *);
/* Find an offset within a .stab section when linking stabs in
sections. */
extern bfd_vma _bfd_stab_section_offset
- (bfd *, void **, asection *, void **, bfd_vma);
+ (asection *, void *, bfd_vma);
-/* Attempt to merge a SEC_MERGE section. */
+/* Register a SEC_MERGE section as a candidate for merging. */
-extern bfd_boolean _bfd_merge_section
+extern bfd_boolean _bfd_add_merge_section
(bfd *, void **, asection *, void **);
/* Attempt to merge SEC_MERGE sections. */
extern bfd_boolean _bfd_merge_sections
- (bfd *, void *, void (*) (bfd *, asection *));
+ (bfd *, struct bfd_link_info *, void *, void (*) (bfd *, asection *));
/* Write out a merged section. */
@@ -531,7 +588,7 @@ extern bfd_boolean _bfd_write_merged_section
/* Find an offset within a modified SEC_MERGE section. */
extern bfd_vma _bfd_merged_section_offset
- (bfd *, asection **, void *, bfd_vma, bfd_vma);
+ (bfd *, asection **, void *, bfd_vma);
/* Create a string table. */
extern struct bfd_strtab_hash *_bfd_stringtab_init
@@ -579,10 +636,10 @@ void bfd_assert
(const char*,int);
#define BFD_ASSERT(x) \
- { if (!(x)) bfd_assert(__FILE__,__LINE__); }
+ do { if (!(x)) bfd_assert(__FILE__,__LINE__); } while (0)
#define BFD_FAIL() \
- { bfd_assert(__FILE__,__LINE__); }
+ do { bfd_assert(__FILE__,__LINE__); } while (0)
extern void _bfd_abort
(const char *, int, const char *) ATTRIBUTE_NORETURN;
@@ -599,11 +656,7 @@ extern void _bfd_abort
the system "off_t" or "off64_t", as the offset. */
extern file_ptr real_ftell (FILE *file);
extern int real_fseek (FILE *file, file_ptr offset, int whence);
-
-FILE * bfd_cache_lookup_worker
- (bfd *);
-
-extern bfd *bfd_last_cache;
+extern FILE *real_fopen (const char *filename, const char *modes);
/* List of supported target vectors, and the default vector (if
bfd_default_vector[0] is NULL, there is no default). */
@@ -645,3 +698,31 @@ extern bfd_boolean _bfd_sh_align_load_span
bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma),
void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *);
#endif
+
+/* This is the shape of the elements inside the already_linked hash
+ table. It maps a name onto a list of already_linked elements with
+ the same name. */
+
+struct bfd_section_already_linked_hash_entry
+{
+ struct bfd_hash_entry root;
+ struct bfd_section_already_linked *entry;
+};
+
+struct bfd_section_already_linked
+{
+ struct bfd_section_already_linked *next;
+ asection *sec;
+};
+
+extern struct bfd_section_already_linked_hash_entry *
+ bfd_section_already_linked_table_lookup (const char *);
+extern void bfd_section_already_linked_table_insert
+ (struct bfd_section_already_linked_hash_entry *, asection *);
+extern void bfd_section_already_linked_table_traverse
+ (bfd_boolean (*) (struct bfd_section_already_linked_hash_entry *,
+ void *), void *);
+
+extern bfd_vma read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *);
+extern bfd_signed_vma read_signed_leb128 (bfd *, bfd_byte *, unsigned int *);
+
diff --git a/contrib/binutils/bfd/libbfd.c b/contrib/binutils/bfd/libbfd.c
index be090e9b0698..57cfabcd460e 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
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -30,6 +30,9 @@
/*
SECTION
+ Implementation details
+
+SUBSECTION
Internal functions
DESCRIPTION
@@ -156,6 +159,36 @@ bfd_malloc (bfd_size_type size)
return ptr;
}
+/* Allocate memory using malloc, nmemb * size with overflow checking. */
+
+void *
+bfd_malloc2 (bfd_size_type nmemb, bfd_size_type size)
+{
+ void *ptr;
+
+ if ((nmemb | size) >= HALF_BFD_SIZE_TYPE
+ && size != 0
+ && nmemb > ~(bfd_size_type) 0 / size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ size *= nmemb;
+
+ if (size != (size_t) size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ ptr = malloc ((size_t) size);
+ if (ptr == NULL && (size_t) size != 0)
+ bfd_set_error (bfd_error_no_memory);
+
+ return ptr;
+}
+
/* Reallocate memory using realloc. */
void *
@@ -180,6 +213,40 @@ bfd_realloc (void *ptr, bfd_size_type size)
return ret;
}
+/* Reallocate memory using realloc, nmemb * size with overflow checking. */
+
+void *
+bfd_realloc2 (void *ptr, bfd_size_type nmemb, bfd_size_type size)
+{
+ void *ret;
+
+ if ((nmemb | size) >= HALF_BFD_SIZE_TYPE
+ && size != 0
+ && nmemb > ~(bfd_size_type) 0 / size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ size *= nmemb;
+
+ if (size != (size_t) size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ if (ptr == NULL)
+ ret = malloc ((size_t) size);
+ else
+ ret = realloc (ptr, (size_t) size);
+
+ if (ret == NULL && (size_t) size != 0)
+ bfd_set_error (bfd_error_no_memory);
+
+ return ret;
+}
+
/* Allocate memory using malloc and clear it. */
void *
@@ -205,6 +272,44 @@ bfd_zmalloc (bfd_size_type size)
return ptr;
}
+
+/* Allocate memory using malloc (nmemb * size) with overflow checking
+ and clear it. */
+
+void *
+bfd_zmalloc2 (bfd_size_type nmemb, bfd_size_type size)
+{
+ void *ptr;
+
+ if ((nmemb | size) >= HALF_BFD_SIZE_TYPE
+ && size != 0
+ && nmemb > ~(bfd_size_type) 0 / size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ size *= nmemb;
+
+ if (size != (size_t) size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ ptr = malloc ((size_t) size);
+
+ if ((size_t) size != 0)
+ {
+ if (ptr == NULL)
+ bfd_set_error (bfd_error_no_memory);
+ else
+ memset (ptr, 0, (size_t) size);
+ }
+
+ return ptr;
+}
+
/*
INTERNAL_FUNCTION
bfd_write_bigendian_4byte_int
@@ -692,10 +797,12 @@ _bfd_generic_get_section_contents (bfd *abfd,
file_ptr offset,
bfd_size_type count)
{
+ bfd_size_type sz;
if (count == 0)
return TRUE;
- if (offset + count > section->_raw_size)
+ sz = section->rawsize ? section->rawsize : section->size;
+ if (offset + count > sz)
{
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
@@ -717,6 +824,8 @@ _bfd_generic_get_section_contents_in_window
bfd_size_type count ATTRIBUTE_UNUSED)
{
#ifdef USE_MMAP
+ bfd_size_type sz;
+
if (count == 0)
return TRUE;
if (abfd->xvec->_bfd_get_section_contents
@@ -744,7 +853,8 @@ _bfd_generic_get_section_contents_in_window
w->data = w->i->data;
return bfd_get_section_contents (abfd, section, w->data, offset, count);
}
- if (offset + count > section->_raw_size
+ sz = section->rawsize ? section->rawsize : section->size;
+ if (offset + count > sz
|| ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
TRUE))
return FALSE;
@@ -818,11 +928,11 @@ _bfd_generic_verify_endian_match (bfd *ibfd, bfd *obfd)
const char *msg;
if (bfd_big_endian (ibfd))
- msg = _("%s: compiled for a big endian system and target is little endian");
+ msg = _("%B: compiled for a big endian system and target is little endian");
else
- msg = _("%s: compiled for a little endian system and target is big endian");
+ msg = _("%B: compiled for a little endian system and target is big endian");
- (*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
+ (*_bfd_error_handler) (msg, ibfd);
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -855,3 +965,81 @@ warn_deprecated (const char *what,
mask |= ~(size_t) func;
}
}
+
+/* Helper function for reading uleb128 encoded data. */
+
+bfd_vma
+read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_byte *buf,
+ unsigned int *bytes_read_ptr)
+{
+ bfd_vma result;
+ unsigned int num_read;
+ unsigned int shift;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ num_read = 0;
+ do
+ {
+ byte = bfd_get_8 (abfd, buf);
+ buf++;
+ num_read++;
+ result |= (((bfd_vma) byte & 0x7f) << shift);
+ shift += 7;
+ }
+ while (byte & 0x80);
+ *bytes_read_ptr = num_read;
+ return result;
+}
+
+/* Helper function for reading sleb128 encoded data. */
+
+bfd_signed_vma
+read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_byte *buf,
+ unsigned int *bytes_read_ptr)
+{
+ bfd_vma result;
+ unsigned int shift;
+ unsigned int num_read;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ num_read = 0;
+ do
+ {
+ byte = bfd_get_8 (abfd, buf);
+ buf ++;
+ num_read ++;
+ result |= (((bfd_vma) byte & 0x7f) << shift);
+ shift += 7;
+ }
+ while (byte & 0x80);
+ if (shift < 8 * sizeof (result) && (byte & 0x40))
+ result |= (((bfd_vma) -1) << shift);
+ *bytes_read_ptr = num_read;
+ return result;
+}
+
+bfd_boolean
+_bfd_generic_find_line (bfd *abfd ATTRIBUTE_UNUSED,
+ asymbol **symbols ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ const char **filename_ptr ATTRIBUTE_UNUSED,
+ unsigned int *linenumber_ptr ATTRIBUTE_UNUSED)
+{
+ return FALSE;
+}
+
+bfd_boolean
+_bfd_generic_init_private_section_data (bfd *ibfd ATTRIBUTE_UNUSED,
+ asection *isec ATTRIBUTE_UNUSED,
+ bfd *obfd ATTRIBUTE_UNUSED,
+ asection *osec ATTRIBUTE_UNUSED,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
diff --git a/contrib/binutils/bfd/libbfd.h b/contrib/binutils/bfd/libbfd.h
index 62043f3860ab..2a590a395a51 100644
--- a/contrib/binutils/bfd/libbfd.h
+++ b/contrib/binutils/bfd/libbfd.h
@@ -7,7 +7,8 @@
(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 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -25,7 +26,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "hashtab.h"
/* Align an address upward to a boundary, expressed as a number of bytes.
E.g. align to an 8-byte boundary with argument of 8. Take care never
@@ -55,17 +58,24 @@ struct bfd_in_memory
bfd_byte *buffer;
};
+struct section_hash_entry
+{
+ struct bfd_hash_entry root;
+ asection section;
+};
+
/* tdata for an archive. For an input archive, cache
needs to be free()'d. For an output archive, symdefs do. */
struct artdata {
file_ptr first_file_filepos;
/* Speed up searching the armap */
- struct ar_cache *cache;
+ htab_t cache;
bfd *archive_head; /* Only interesting in output routines */
carsym *symdefs; /* the symdef entries */
symindex symdef_count; /* how many there are */
char *extended_names; /* clever intel extension */
+ bfd_size_type extended_names_size; /* Size of extended names */
/* when more compilers are standard C, this can be a time_t */
long armap_timestamp; /* Timestamp value written into armap.
This is used for BSD archives to check
@@ -95,7 +105,14 @@ extern void *bfd_realloc
(void *, bfd_size_type);
extern void *bfd_zmalloc
(bfd_size_type);
-
+extern void *bfd_malloc2
+ (bfd_size_type, bfd_size_type);
+extern void *bfd_realloc2
+ (void *, bfd_size_type, bfd_size_type);
+extern void *bfd_zmalloc2
+ (bfd_size_type, bfd_size_type);
+
+extern void _bfd_default_error_handler (const char *s, ...);
extern bfd_error_handler_type _bfd_error_handler;
/* These routines allocate and free things on the BFD's objalloc. */
@@ -104,6 +121,10 @@ extern void *bfd_alloc
(bfd *, bfd_size_type);
extern void *bfd_zalloc
(bfd *, bfd_size_type);
+extern void *bfd_alloc2
+ (bfd *, bfd_size_type, bfd_size_type);
+extern void *bfd_zalloc2
+ (bfd *, bfd_size_type, bfd_size_type);
extern void bfd_release
(bfd *, void *);
@@ -179,6 +200,8 @@ bfd_boolean coff_write_armap
extern void *_bfd_generic_read_ar_hdr
(bfd *);
+extern void _bfd_ar_spacepad
+ (char *, size_t, const char *, long);
extern void *_bfd_generic_read_ar_hdr_mag
(bfd *, const char *);
@@ -217,9 +240,14 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true)
#define _bfd_generic_bfd_copy_private_symbol_data \
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true)
+#define _bfd_generic_bfd_copy_private_header_data \
+ ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
#define _bfd_generic_bfd_print_private_bfd_data \
((bfd_boolean (*) (bfd *, void *)) bfd_true)
+extern bfd_boolean _bfd_generic_init_private_section_data
+ (bfd *, asection *, bfd *, asection *, struct bfd_link_info *);
+
/* Routines to use for BFD_JUMP_TABLE_CORE when there is no core file
support. Use BFD_JUMP_TABLE_CORE (_bfd_nocore). */
@@ -301,12 +329,17 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
((void (*) (bfd *, asymbol *, symbol_info *)) bfd_void)
#define _bfd_nosymbols_bfd_is_local_label_name \
((bfd_boolean (*) (bfd *, const char *)) bfd_false)
+#define _bfd_nosymbols_bfd_is_target_special_symbol \
+ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define _bfd_nosymbols_get_lineno \
((alent *(*) (bfd *, asymbol *)) bfd_nullvoidptr)
#define _bfd_nosymbols_find_nearest_line \
((bfd_boolean (*) (bfd *, asection *, asymbol **, bfd_vma, const char **, \
const char **, unsigned int *)) \
bfd_false)
+#define _bfd_nosymbols_find_inliner_info \
+ ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \
+ bfd_false)
#define _bfd_nosymbols_bfd_make_debug_symbol \
((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
#define _bfd_nosymbols_read_minisymbols \
@@ -360,6 +393,9 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_merge_sections \
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
bfd_false)
+#define _bfd_nolink_bfd_is_group_section \
+ ((bfd_boolean (*) (bfd *, const struct bfd_section *)) \
+ bfd_false)
#define _bfd_nolink_bfd_discard_group \
((bfd_boolean (*) (bfd *, struct bfd_section *)) \
bfd_false)
@@ -375,6 +411,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
#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)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -383,6 +421,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_symtab \
((long (*) (bfd *, asymbol **)) _bfd_n1)
+#define _bfd_nodynamic_get_synthetic_symtab \
+ ((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) _bfd_n1)
#define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_reloc \
((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1)
@@ -403,7 +443,7 @@ extern bfd_boolean _bfd_stab_section_find_nearest_line
(bfd *, asymbol **, asection *, bfd_vma, bfd_boolean *,
const char **, const char **, unsigned int *, void **);
-/* Find the neaderst line using DWARF 1 debugging information. */
+/* Find the nearest line using DWARF 1 debugging information. */
extern bfd_boolean _bfd_dwarf1_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *);
@@ -413,6 +453,18 @@ extern bfd_boolean _bfd_dwarf2_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
unsigned int *, unsigned int, void **);
+/* Find the line using DWARF 2 debugging information. */
+extern bfd_boolean _bfd_dwarf2_find_line
+ (bfd *, asymbol **, asymbol *, const char **,
+ unsigned int *, unsigned int, void **);
+
+bfd_boolean _bfd_generic_find_line
+ (bfd *, asymbol **, asymbol *, const char **, unsigned int *);
+
+/* Find inliner info after calling bfd_find_nearest_line. */
+extern bfd_boolean _bfd_dwarf2_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *, void **);
+
/* Create a new section entry. */
extern struct bfd_hash_entry *bfd_section_hash_newfunc
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
@@ -427,7 +479,8 @@ extern bfd_boolean _bfd_link_hash_table_init
(struct bfd_link_hash_table *, bfd *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *));
+ const char *),
+ unsigned int);
/* Generic link hash table creation routine. */
extern struct bfd_link_hash_table *_bfd_generic_link_hash_table_create
@@ -472,6 +525,9 @@ extern bfd_boolean _bfd_generic_final_link
extern bfd_boolean _bfd_generic_link_split_section
(bfd *, struct bfd_section *);
+extern void _bfd_generic_section_already_linked
+ (bfd *, struct bfd_section *);
+
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
(bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
@@ -496,7 +552,8 @@ extern bfd_reloc_status_type _bfd_relocate_contents
/* Link stabs in sections in the first pass. */
extern bfd_boolean _bfd_link_section_stabs
- (bfd *, void **, asection *, asection *, void **, bfd_size_type *);
+ (bfd *, struct stab_info *, asection *, asection *, void **,
+ bfd_size_type *);
/* Eliminate stabs for discarded functions and symbols. */
extern bfd_boolean _bfd_discard_section_stabs
@@ -505,28 +562,28 @@ extern bfd_boolean _bfd_discard_section_stabs
/* Write out the .stab section when linking stabs in sections. */
extern bfd_boolean _bfd_write_section_stabs
- (bfd *, void **, asection *, void **, bfd_byte *);
+ (bfd *, struct stab_info *, asection *, void **, bfd_byte *);
/* Write out the .stabstr string table when linking stabs in sections. */
extern bfd_boolean _bfd_write_stab_strings
- (bfd *, void **);
+ (bfd *, struct stab_info *);
/* Find an offset within a .stab section when linking stabs in
sections. */
extern bfd_vma _bfd_stab_section_offset
- (bfd *, void **, asection *, void **, bfd_vma);
+ (asection *, void *, bfd_vma);
-/* Attempt to merge a SEC_MERGE section. */
+/* Register a SEC_MERGE section as a candidate for merging. */
-extern bfd_boolean _bfd_merge_section
+extern bfd_boolean _bfd_add_merge_section
(bfd *, void **, asection *, void **);
/* Attempt to merge SEC_MERGE sections. */
extern bfd_boolean _bfd_merge_sections
- (bfd *, void *, void (*) (bfd *, asection *));
+ (bfd *, struct bfd_link_info *, void *, void (*) (bfd *, asection *));
/* Write out a merged section. */
@@ -536,7 +593,7 @@ extern bfd_boolean _bfd_write_merged_section
/* Find an offset within a modified SEC_MERGE section. */
extern bfd_vma _bfd_merged_section_offset
- (bfd *, asection **, void *, bfd_vma, bfd_vma);
+ (bfd *, asection **, void *, bfd_vma);
/* Create a string table. */
extern struct bfd_strtab_hash *_bfd_stringtab_init
@@ -584,10 +641,10 @@ void bfd_assert
(const char*,int);
#define BFD_ASSERT(x) \
- { if (!(x)) bfd_assert(__FILE__,__LINE__); }
+ do { if (!(x)) bfd_assert(__FILE__,__LINE__); } while (0)
#define BFD_FAIL() \
- { bfd_assert(__FILE__,__LINE__); }
+ do { bfd_assert(__FILE__,__LINE__); } while (0)
extern void _bfd_abort
(const char *, int, const char *) ATTRIBUTE_NORETURN;
@@ -604,11 +661,7 @@ extern void _bfd_abort
the system "off_t" or "off64_t", as the offset. */
extern file_ptr real_ftell (FILE *file);
extern int real_fseek (FILE *file, file_ptr offset, int whence);
-
-FILE * bfd_cache_lookup_worker
- (bfd *);
-
-extern bfd *bfd_last_cache;
+extern FILE *real_fopen (const char *filename, const char *modes);
/* List of supported target vectors, and the default vector (if
bfd_default_vector[0] is NULL, there is no default). */
@@ -650,6 +703,34 @@ extern bfd_boolean _bfd_sh_align_load_span
bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma),
void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *);
#endif
+
+/* This is the shape of the elements inside the already_linked hash
+ table. It maps a name onto a list of already_linked elements with
+ the same name. */
+
+struct bfd_section_already_linked_hash_entry
+{
+ struct bfd_hash_entry root;
+ struct bfd_section_already_linked *entry;
+};
+
+struct bfd_section_already_linked
+{
+ struct bfd_section_already_linked *next;
+ asection *sec;
+};
+
+extern struct bfd_section_already_linked_hash_entry *
+ bfd_section_already_linked_table_lookup (const char *);
+extern void bfd_section_already_linked_table_insert
+ (struct bfd_section_already_linked_hash_entry *, asection *);
+extern void bfd_section_already_linked_table_traverse
+ (bfd_boolean (*) (struct bfd_section_already_linked_hash_entry *,
+ void *), void *);
+
+extern bfd_vma read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *);
+extern bfd_signed_vma read_signed_leb128 (bfd *, bfd_byte *, unsigned int *);
+
/* Extracted from init.c. */
/* Extracted from libbfd.c. */
bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
@@ -657,6 +738,27 @@ bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
unsigned int bfd_log2 (bfd_vma x);
/* Extracted from bfdio.c. */
+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 <<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 <<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 <<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);
+};
/* Extracted from bfdwin.c. */
struct _bfd_window_internal {
struct _bfd_window_internal *next;
@@ -666,21 +768,12 @@ struct _bfd_window_internal {
unsigned mapped : 1; /* 1 = mmap, 0 = malloc */
};
/* Extracted from cache.c. */
-#define BFD_CACHE_MAX_OPEN 10
-extern bfd *bfd_last_cache;
-
-#define bfd_cache_lookup(x) \
- ((x)==bfd_last_cache? \
- (FILE*) (bfd_last_cache->iostream): \
- bfd_cache_lookup_worker(x))
bfd_boolean bfd_cache_init (bfd *abfd);
bfd_boolean bfd_cache_close (bfd *abfd);
FILE* bfd_open_file (bfd *abfd);
-FILE *bfd_cache_lookup_worker (bfd *abfd);
-
/* Extracted from reloc.c. */
#ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real
@@ -699,6 +792,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_16_PCREL",
"BFD_RELOC_12_PCREL",
"BFD_RELOC_8_PCREL",
+ "BFD_RELOC_32_SECREL",
"BFD_RELOC_32_GOT_PCREL",
"BFD_RELOC_16_GOT_PCREL",
"BFD_RELOC_8_GOT_PCREL",
@@ -836,8 +930,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_HI16",
"BFD_RELOC_HI16_S",
"BFD_RELOC_LO16",
- "BFD_RELOC_PCREL_HI16_S",
- "BFD_RELOC_PCREL_LO16",
+ "BFD_RELOC_HI16_PCREL",
+ "BFD_RELOC_HI16_S_PCREL",
+ "BFD_RELOC_LO16_PCREL",
+ "BFD_RELOC_MIPS16_HI16",
+ "BFD_RELOC_MIPS16_HI16_S",
+ "BFD_RELOC_MIPS16_LO16",
"BFD_RELOC_MIPS_LITERAL",
"BFD_RELOC_MIPS_GOT16",
"BFD_RELOC_MIPS_CALL16",
@@ -860,6 +958,22 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MIPS_REL16",
"BFD_RELOC_MIPS_RELGOT",
"BFD_RELOC_MIPS_JALR",
+ "BFD_RELOC_MIPS_TLS_DTPMOD32",
+ "BFD_RELOC_MIPS_TLS_DTPREL32",
+ "BFD_RELOC_MIPS_TLS_DTPMOD64",
+ "BFD_RELOC_MIPS_TLS_DTPREL64",
+ "BFD_RELOC_MIPS_TLS_GD",
+ "BFD_RELOC_MIPS_TLS_LDM",
+ "BFD_RELOC_MIPS_TLS_DTPREL_HI16",
+ "BFD_RELOC_MIPS_TLS_DTPREL_LO16",
+ "BFD_RELOC_MIPS_TLS_GOTTPREL",
+ "BFD_RELOC_MIPS_TLS_TPREL32",
+ "BFD_RELOC_MIPS_TLS_TPREL64",
+ "BFD_RELOC_MIPS_TLS_TPREL_HI16",
+ "BFD_RELOC_MIPS_TLS_TPREL_LO16",
+
+ "BFD_RELOC_MIPS_COPY",
+ "BFD_RELOC_MIPS_JUMP_SLOT",
"BFD_RELOC_FRV_LABEL16",
"BFD_RELOC_FRV_LABEL24",
@@ -884,6 +998,22 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_FRV_GOTOFF12",
"BFD_RELOC_FRV_GOTOFFHI",
"BFD_RELOC_FRV_GOTOFFLO",
+ "BFD_RELOC_FRV_GETTLSOFF",
+ "BFD_RELOC_FRV_TLSDESC_VALUE",
+ "BFD_RELOC_FRV_GOTTLSDESC12",
+ "BFD_RELOC_FRV_GOTTLSDESCHI",
+ "BFD_RELOC_FRV_GOTTLSDESCLO",
+ "BFD_RELOC_FRV_TLSMOFF12",
+ "BFD_RELOC_FRV_TLSMOFFHI",
+ "BFD_RELOC_FRV_TLSMOFFLO",
+ "BFD_RELOC_FRV_GOTTLSOFF12",
+ "BFD_RELOC_FRV_GOTTLSOFFHI",
+ "BFD_RELOC_FRV_GOTTLSOFFLO",
+ "BFD_RELOC_FRV_TLSOFF",
+ "BFD_RELOC_FRV_TLSDESC_RELAX",
+ "BFD_RELOC_FRV_GETTLSOFF_RELAX",
+ "BFD_RELOC_FRV_TLSOFF_RELAX",
+ "BFD_RELOC_FRV_TLSMOFF",
"BFD_RELOC_MN10300_GOTOFF24",
"BFD_RELOC_MN10300_GOT32",
@@ -914,6 +1044,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_386_TLS_DTPMOD32",
"BFD_RELOC_386_TLS_DTPOFF32",
"BFD_RELOC_386_TLS_TPOFF32",
+ "BFD_RELOC_386_TLS_GOTDESC",
+ "BFD_RELOC_386_TLS_DESC_CALL",
+ "BFD_RELOC_386_TLS_DESC",
"BFD_RELOC_X86_64_GOT32",
"BFD_RELOC_X86_64_PLT32",
"BFD_RELOC_X86_64_COPY",
@@ -930,6 +1063,16 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_X86_64_DTPOFF32",
"BFD_RELOC_X86_64_GOTTPOFF",
"BFD_RELOC_X86_64_TPOFF32",
+ "BFD_RELOC_X86_64_GOTOFF64",
+ "BFD_RELOC_X86_64_GOTPC32",
+ "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_RELOC_X86_64_GOTPC32_TLSDESC",
+ "BFD_RELOC_X86_64_TLSDESC_CALL",
+ "BFD_RELOC_X86_64_TLSDESC",
"BFD_RELOC_NS32K_IMM_8",
"BFD_RELOC_NS32K_IMM_16",
"BFD_RELOC_NS32K_IMM_32",
@@ -1048,35 +1191,70 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_PCREL_BRANCH",
"BFD_RELOC_ARM_PCREL_BLX",
"BFD_RELOC_THUMB_PCREL_BLX",
+ "BFD_RELOC_ARM_PCREL_CALL",
+ "BFD_RELOC_ARM_PCREL_JUMP",
+ "BFD_RELOC_THUMB_PCREL_BRANCH7",
+ "BFD_RELOC_THUMB_PCREL_BRANCH9",
+ "BFD_RELOC_THUMB_PCREL_BRANCH12",
+ "BFD_RELOC_THUMB_PCREL_BRANCH20",
+ "BFD_RELOC_THUMB_PCREL_BRANCH23",
+ "BFD_RELOC_THUMB_PCREL_BRANCH25",
+ "BFD_RELOC_ARM_OFFSET_IMM",
+ "BFD_RELOC_ARM_THUMB_OFFSET",
+ "BFD_RELOC_ARM_TARGET1",
+ "BFD_RELOC_ARM_ROSEGREL32",
+ "BFD_RELOC_ARM_SBREL32",
+ "BFD_RELOC_ARM_TARGET2",
+ "BFD_RELOC_ARM_PREL31",
+ "BFD_RELOC_ARM_JUMP_SLOT",
+ "BFD_RELOC_ARM_GLOB_DAT",
+ "BFD_RELOC_ARM_GOT32",
+ "BFD_RELOC_ARM_PLT32",
+ "BFD_RELOC_ARM_RELATIVE",
+ "BFD_RELOC_ARM_GOTOFF",
+ "BFD_RELOC_ARM_GOTPC",
+ "BFD_RELOC_ARM_TLS_GD32",
+ "BFD_RELOC_ARM_TLS_LDO32",
+ "BFD_RELOC_ARM_TLS_LDM32",
+ "BFD_RELOC_ARM_TLS_DTPOFF32",
+ "BFD_RELOC_ARM_TLS_DTPMOD32",
+ "BFD_RELOC_ARM_TLS_TPOFF32",
+ "BFD_RELOC_ARM_TLS_IE32",
+ "BFD_RELOC_ARM_TLS_LE32",
"BFD_RELOC_ARM_IMMEDIATE",
"BFD_RELOC_ARM_ADRL_IMMEDIATE",
- "BFD_RELOC_ARM_OFFSET_IMM",
+ "BFD_RELOC_ARM_T32_IMMEDIATE",
+ "BFD_RELOC_ARM_T32_IMM12",
+ "BFD_RELOC_ARM_T32_ADD_PC12",
"BFD_RELOC_ARM_SHIFT_IMM",
+ "BFD_RELOC_ARM_SMC",
"BFD_RELOC_ARM_SWI",
"BFD_RELOC_ARM_MULTI",
"BFD_RELOC_ARM_CP_OFF_IMM",
"BFD_RELOC_ARM_CP_OFF_IMM_S2",
+ "BFD_RELOC_ARM_T32_CP_OFF_IMM",
+ "BFD_RELOC_ARM_T32_CP_OFF_IMM_S2",
"BFD_RELOC_ARM_ADR_IMM",
"BFD_RELOC_ARM_LDR_IMM",
"BFD_RELOC_ARM_LITERAL",
"BFD_RELOC_ARM_IN_POOL",
"BFD_RELOC_ARM_OFFSET_IMM8",
+ "BFD_RELOC_ARM_T32_OFFSET_U8",
+ "BFD_RELOC_ARM_T32_OFFSET_IMM",
"BFD_RELOC_ARM_HWLITERAL",
"BFD_RELOC_ARM_THUMB_ADD",
"BFD_RELOC_ARM_THUMB_IMM",
"BFD_RELOC_ARM_THUMB_SHIFT",
- "BFD_RELOC_ARM_THUMB_OFFSET",
- "BFD_RELOC_ARM_GOT12",
- "BFD_RELOC_ARM_GOT32",
- "BFD_RELOC_ARM_JUMP_SLOT",
- "BFD_RELOC_ARM_COPY",
- "BFD_RELOC_ARM_GLOB_DAT",
- "BFD_RELOC_ARM_PLT32",
- "BFD_RELOC_ARM_RELATIVE",
- "BFD_RELOC_ARM_GOTOFF",
- "BFD_RELOC_ARM_GOTPC",
"BFD_RELOC_SH_PCDISP8BY2",
"BFD_RELOC_SH_PCDISP12BY2",
+ "BFD_RELOC_SH_IMM3",
+ "BFD_RELOC_SH_IMM3U",
+ "BFD_RELOC_SH_DISP12",
+ "BFD_RELOC_SH_DISP12BY2",
+ "BFD_RELOC_SH_DISP12BY4",
+ "BFD_RELOC_SH_DISP12BY8",
+ "BFD_RELOC_SH_DISP20",
+ "BFD_RELOC_SH_DISP20BY8",
"BFD_RELOC_SH_IMM4",
"BFD_RELOC_SH_IMM4BY2",
"BFD_RELOC_SH_IMM4BY4",
@@ -1157,11 +1335,55 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SH_TLS_DTPMOD32",
"BFD_RELOC_SH_TLS_DTPOFF32",
"BFD_RELOC_SH_TLS_TPOFF32",
- "BFD_RELOC_THUMB_PCREL_BRANCH9",
- "BFD_RELOC_THUMB_PCREL_BRANCH12",
- "BFD_RELOC_THUMB_PCREL_BRANCH23",
"BFD_RELOC_ARC_B22_PCREL",
"BFD_RELOC_ARC_B26",
+ "BFD_RELOC_BFIN_16_IMM",
+ "BFD_RELOC_BFIN_16_HIGH",
+ "BFD_RELOC_BFIN_4_PCREL",
+ "BFD_RELOC_BFIN_5_PCREL",
+ "BFD_RELOC_BFIN_16_LOW",
+ "BFD_RELOC_BFIN_10_PCREL",
+ "BFD_RELOC_BFIN_11_PCREL",
+ "BFD_RELOC_BFIN_12_PCREL_JUMP",
+ "BFD_RELOC_BFIN_12_PCREL_JUMP_S",
+ "BFD_RELOC_BFIN_24_PCREL_CALL_X",
+ "BFD_RELOC_BFIN_24_PCREL_JUMP_L",
+ "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_GOTOFF17M4",
+ "BFD_RELOC_BFIN_GOTOFFHI",
+ "BFD_RELOC_BFIN_GOTOFFLO",
+ "BFD_RELOC_BFIN_GOT",
+ "BFD_RELOC_BFIN_PLTPC",
+ "BFD_ARELOC_BFIN_PUSH",
+ "BFD_ARELOC_BFIN_CONST",
+ "BFD_ARELOC_BFIN_ADD",
+ "BFD_ARELOC_BFIN_SUB",
+ "BFD_ARELOC_BFIN_MULT",
+ "BFD_ARELOC_BFIN_DIV",
+ "BFD_ARELOC_BFIN_MOD",
+ "BFD_ARELOC_BFIN_LSHIFT",
+ "BFD_ARELOC_BFIN_RSHIFT",
+ "BFD_ARELOC_BFIN_AND",
+ "BFD_ARELOC_BFIN_OR",
+ "BFD_ARELOC_BFIN_XOR",
+ "BFD_ARELOC_BFIN_LAND",
+ "BFD_ARELOC_BFIN_LOR",
+ "BFD_ARELOC_BFIN_LEN",
+ "BFD_ARELOC_BFIN_NEG",
+ "BFD_ARELOC_BFIN_COMP",
+ "BFD_ARELOC_BFIN_PAGE",
+ "BFD_ARELOC_BFIN_HWPAGE",
+ "BFD_ARELOC_BFIN_ADDR",
"BFD_RELOC_D10V_10_PCREL_R",
"BFD_RELOC_D10V_10_PCREL_L",
"BFD_RELOC_D10V_18",
@@ -1180,6 +1402,10 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_DLX_HI16_S",
"BFD_RELOC_DLX_LO16",
"BFD_RELOC_DLX_JMP26",
+ "BFD_RELOC_M32C_HI8",
+ "BFD_RELOC_M32C_RL_JUMP",
+ "BFD_RELOC_M32C_RL_1ADDR",
+ "BFD_RELOC_M32C_RL_2ADDR",
"BFD_RELOC_M32R_24",
"BFD_RELOC_M32R_10_PCREL",
"BFD_RELOC_M32R_18_PCREL",
@@ -1195,6 +1421,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_M32R_JMP_SLOT",
"BFD_RELOC_M32R_RELATIVE",
"BFD_RELOC_M32R_GOTOFF",
+ "BFD_RELOC_M32R_GOTOFF_HI_ULO",
+ "BFD_RELOC_M32R_GOTOFF_HI_SLO",
+ "BFD_RELOC_M32R_GOTOFF_LO",
"BFD_RELOC_M32R_GOTPC24",
"BFD_RELOC_M32R_GOT16_HI_ULO",
"BFD_RELOC_M32R_GOT16_HI_SLO",
@@ -1221,6 +1450,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_V850_LONGCALL",
"BFD_RELOC_V850_LONGJUMP",
"BFD_RELOC_V850_ALIGN",
+ "BFD_RELOC_V850_LO16_SPLIT_OFFSET",
"BFD_RELOC_MN10300_32_PCREL",
"BFD_RELOC_MN10300_16_PCREL",
"BFD_RELOC_TIC30_LDP",
@@ -1273,9 +1503,11 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_AVR_LO8_LDI",
"BFD_RELOC_AVR_HI8_LDI",
"BFD_RELOC_AVR_HH8_LDI",
+ "BFD_RELOC_AVR_MS8_LDI",
"BFD_RELOC_AVR_LO8_LDI_NEG",
"BFD_RELOC_AVR_HI8_LDI_NEG",
"BFD_RELOC_AVR_HH8_LDI_NEG",
+ "BFD_RELOC_AVR_MS8_LDI_NEG",
"BFD_RELOC_AVR_LO8_LDI_PM",
"BFD_RELOC_AVR_HI8_LDI_PM",
"BFD_RELOC_AVR_HH8_LDI_PM",
@@ -1283,6 +1515,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_AVR_HI8_LDI_PM_NEG",
"BFD_RELOC_AVR_HH8_LDI_PM_NEG",
"BFD_RELOC_AVR_CALL",
+ "BFD_RELOC_AVR_LDI",
+ "BFD_RELOC_AVR_6",
+ "BFD_RELOC_AVR_6_ADIW",
"BFD_RELOC_390_12",
"BFD_RELOC_390_GOT12",
"BFD_RELOC_390_PLT32",
@@ -1437,10 +1672,75 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_M68HC11_PAGE",
"BFD_RELOC_M68HC11_24",
"BFD_RELOC_M68HC12_5B",
+ "BFD_RELOC_16C_NUM08",
+ "BFD_RELOC_16C_NUM08_C",
+ "BFD_RELOC_16C_NUM16",
+ "BFD_RELOC_16C_NUM16_C",
+ "BFD_RELOC_16C_NUM32",
+ "BFD_RELOC_16C_NUM32_C",
+ "BFD_RELOC_16C_DISP04",
+ "BFD_RELOC_16C_DISP04_C",
+ "BFD_RELOC_16C_DISP08",
+ "BFD_RELOC_16C_DISP08_C",
+ "BFD_RELOC_16C_DISP16",
+ "BFD_RELOC_16C_DISP16_C",
+ "BFD_RELOC_16C_DISP24",
+ "BFD_RELOC_16C_DISP24_C",
+ "BFD_RELOC_16C_DISP24a",
+ "BFD_RELOC_16C_DISP24a_C",
+ "BFD_RELOC_16C_REG04",
+ "BFD_RELOC_16C_REG04_C",
+ "BFD_RELOC_16C_REG04a",
+ "BFD_RELOC_16C_REG04a_C",
+ "BFD_RELOC_16C_REG14",
+ "BFD_RELOC_16C_REG14_C",
+ "BFD_RELOC_16C_REG16",
+ "BFD_RELOC_16C_REG16_C",
+ "BFD_RELOC_16C_REG20",
+ "BFD_RELOC_16C_REG20_C",
+ "BFD_RELOC_16C_ABS20",
+ "BFD_RELOC_16C_ABS20_C",
+ "BFD_RELOC_16C_ABS24",
+ "BFD_RELOC_16C_ABS24_C",
+ "BFD_RELOC_16C_IMM04",
+ "BFD_RELOC_16C_IMM04_C",
+ "BFD_RELOC_16C_IMM16",
+ "BFD_RELOC_16C_IMM16_C",
+ "BFD_RELOC_16C_IMM20",
+ "BFD_RELOC_16C_IMM20_C",
+ "BFD_RELOC_16C_IMM24",
+ "BFD_RELOC_16C_IMM24_C",
+ "BFD_RELOC_16C_IMM32",
+ "BFD_RELOC_16C_IMM32_C",
+ "BFD_RELOC_CRX_REL4",
+ "BFD_RELOC_CRX_REL8",
+ "BFD_RELOC_CRX_REL8_CMP",
+ "BFD_RELOC_CRX_REL16",
+ "BFD_RELOC_CRX_REL24",
+ "BFD_RELOC_CRX_REL32",
+ "BFD_RELOC_CRX_REGREL12",
+ "BFD_RELOC_CRX_REGREL22",
+ "BFD_RELOC_CRX_REGREL28",
+ "BFD_RELOC_CRX_REGREL32",
+ "BFD_RELOC_CRX_ABS16",
+ "BFD_RELOC_CRX_ABS32",
+ "BFD_RELOC_CRX_NUM8",
+ "BFD_RELOC_CRX_NUM16",
+ "BFD_RELOC_CRX_NUM32",
+ "BFD_RELOC_CRX_IMM16",
+ "BFD_RELOC_CRX_IMM32",
+ "BFD_RELOC_CRX_SWITCH8",
+ "BFD_RELOC_CRX_SWITCH16",
+ "BFD_RELOC_CRX_SWITCH32",
"BFD_RELOC_CRIS_BDISP8",
"BFD_RELOC_CRIS_UNSIGNED_5",
"BFD_RELOC_CRIS_SIGNED_6",
"BFD_RELOC_CRIS_UNSIGNED_6",
+ "BFD_RELOC_CRIS_SIGNED_8",
+ "BFD_RELOC_CRIS_UNSIGNED_8",
+ "BFD_RELOC_CRIS_SIGNED_16",
+ "BFD_RELOC_CRIS_UNSIGNED_16",
+ "BFD_RELOC_CRIS_LAPCQ_OFFSET",
"BFD_RELOC_CRIS_UNSIGNED_4",
"BFD_RELOC_CRIS_COPY",
"BFD_RELOC_CRIS_GLOB_DAT",
@@ -1496,14 +1796,26 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_XSTORMY16_12",
"BFD_RELOC_XSTORMY16_24",
"BFD_RELOC_XSTORMY16_FPTR16",
+ "BFD_RELOC_XC16X_PAG",
+ "BFD_RELOC_XC16X_POF",
+ "BFD_RELOC_XC16X_SEG",
+ "BFD_RELOC_XC16X_SOF",
"BFD_RELOC_VAX_GLOB_DAT",
"BFD_RELOC_VAX_JMP_SLOT",
"BFD_RELOC_VAX_RELATIVE",
+ "BFD_RELOC_MT_PC16",
+ "BFD_RELOC_MT_HI16",
+ "BFD_RELOC_MT_LO16",
+ "BFD_RELOC_MT_GNU_VTINHERIT",
+ "BFD_RELOC_MT_GNU_VTENTRY",
+ "BFD_RELOC_MT_PCINSN8",
"BFD_RELOC_MSP430_10_PCREL",
"BFD_RELOC_MSP430_16_PCREL",
"BFD_RELOC_MSP430_16",
"BFD_RELOC_MSP430_16_PCREL_BYTE",
"BFD_RELOC_MSP430_16_BYTE",
+ "BFD_RELOC_MSP430_2X_PCREL",
+ "BFD_RELOC_MSP430_RL_PCREL",
"BFD_RELOC_IQ2000_OFFSET_16",
"BFD_RELOC_IQ2000_OFFSET_21",
"BFD_RELOC_IQ2000_UHI16",
@@ -1512,11 +1824,48 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_XTENSA_JMP_SLOT",
"BFD_RELOC_XTENSA_RELATIVE",
"BFD_RELOC_XTENSA_PLT",
+ "BFD_RELOC_XTENSA_DIFF8",
+ "BFD_RELOC_XTENSA_DIFF16",
+ "BFD_RELOC_XTENSA_DIFF32",
+ "BFD_RELOC_XTENSA_SLOT0_OP",
+ "BFD_RELOC_XTENSA_SLOT1_OP",
+ "BFD_RELOC_XTENSA_SLOT2_OP",
+ "BFD_RELOC_XTENSA_SLOT3_OP",
+ "BFD_RELOC_XTENSA_SLOT4_OP",
+ "BFD_RELOC_XTENSA_SLOT5_OP",
+ "BFD_RELOC_XTENSA_SLOT6_OP",
+ "BFD_RELOC_XTENSA_SLOT7_OP",
+ "BFD_RELOC_XTENSA_SLOT8_OP",
+ "BFD_RELOC_XTENSA_SLOT9_OP",
+ "BFD_RELOC_XTENSA_SLOT10_OP",
+ "BFD_RELOC_XTENSA_SLOT11_OP",
+ "BFD_RELOC_XTENSA_SLOT12_OP",
+ "BFD_RELOC_XTENSA_SLOT13_OP",
+ "BFD_RELOC_XTENSA_SLOT14_OP",
+ "BFD_RELOC_XTENSA_SLOT0_ALT",
+ "BFD_RELOC_XTENSA_SLOT1_ALT",
+ "BFD_RELOC_XTENSA_SLOT2_ALT",
+ "BFD_RELOC_XTENSA_SLOT3_ALT",
+ "BFD_RELOC_XTENSA_SLOT4_ALT",
+ "BFD_RELOC_XTENSA_SLOT5_ALT",
+ "BFD_RELOC_XTENSA_SLOT6_ALT",
+ "BFD_RELOC_XTENSA_SLOT7_ALT",
+ "BFD_RELOC_XTENSA_SLOT8_ALT",
+ "BFD_RELOC_XTENSA_SLOT9_ALT",
+ "BFD_RELOC_XTENSA_SLOT10_ALT",
+ "BFD_RELOC_XTENSA_SLOT11_ALT",
+ "BFD_RELOC_XTENSA_SLOT12_ALT",
+ "BFD_RELOC_XTENSA_SLOT13_ALT",
+ "BFD_RELOC_XTENSA_SLOT14_ALT",
"BFD_RELOC_XTENSA_OP0",
"BFD_RELOC_XTENSA_OP1",
"BFD_RELOC_XTENSA_OP2",
"BFD_RELOC_XTENSA_ASM_EXPAND",
"BFD_RELOC_XTENSA_ASM_SIMPLIFY",
+ "BFD_RELOC_Z80_DISP8",
+ "BFD_RELOC_Z8K_DISP7",
+ "BFD_RELOC_Z8K_CALLR",
+ "BFD_RELOC_Z8K_IMM4L",
"@@overflow: BFD_RELOC_UNUSED@@",
};
#endif
diff --git a/contrib/binutils/bfd/libcoff-in.h b/contrib/binutils/bfd/libcoff-in.h
index 6b5947c49146..f2bc264b3b9f 100644
--- a/contrib/binutils/bfd/libcoff-in.h
+++ b/contrib/binutils/bfd/libcoff-in.h
@@ -1,55 +1,52 @@
/* BFD COFF object file private structure.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfdlink.h"
-/* Object file tdata; access macros */
-
-#define coff_data(bfd) ((bfd)->tdata.coff_obj_data)
-#define exec_hdr(bfd) (coff_data(bfd)->hdr)
-#define obj_pe(bfd) (coff_data(bfd)->pe)
-#define obj_symbols(bfd) (coff_data(bfd)->symbols)
-#define obj_sym_filepos(bfd) (coff_data(bfd)->sym_filepos)
-
-#define obj_relocbase(bfd) (coff_data(bfd)->relocbase)
-#define obj_raw_syments(bfd) (coff_data(bfd)->raw_syments)
-#define obj_raw_syment_count(bfd) (coff_data(bfd)->raw_syment_count)
-#define obj_convert(bfd) (coff_data(bfd)->conversion_table)
-#define obj_conv_table_size(bfd) (coff_data(bfd)->conv_table_size)
-
-#define obj_coff_external_syms(bfd) (coff_data (bfd)->external_syms)
-#define obj_coff_keep_syms(bfd) (coff_data (bfd)->keep_syms)
-#define obj_coff_strings(bfd) (coff_data (bfd)->strings)
-#define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings)
-#define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes)
+/* Object file tdata; access macros. */
+
+#define coff_data(bfd) ((bfd)->tdata.coff_obj_data)
+#define exec_hdr(bfd) (coff_data (bfd)->hdr)
+#define obj_pe(bfd) (coff_data (bfd)->pe)
+#define obj_symbols(bfd) (coff_data (bfd)->symbols)
+#define obj_sym_filepos(bfd) (coff_data (bfd)->sym_filepos)
+#define obj_relocbase(bfd) (coff_data (bfd)->relocbase)
+#define obj_raw_syments(bfd) (coff_data (bfd)->raw_syments)
+#define obj_raw_syment_count(bfd) (coff_data (bfd)->raw_syment_count)
+#define obj_convert(bfd) (coff_data (bfd)->conversion_table)
+#define obj_conv_table_size(bfd) (coff_data (bfd)->conv_table_size)
+#define obj_coff_external_syms(bfd) (coff_data (bfd)->external_syms)
+#define obj_coff_keep_syms(bfd) (coff_data (bfd)->keep_syms)
+#define obj_coff_strings(bfd) (coff_data (bfd)->strings)
+#define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings)
+#define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes)
#define obj_coff_strings_written(bfd) (coff_data (bfd)->strings_written)
-
-#define obj_coff_local_toc_table(bfd) (coff_data(bfd)->local_toc_sym_map)
+#define obj_coff_local_toc_table(bfd) (coff_data (bfd)->local_toc_sym_map)
/* `Tdata' information kept for COFF files. */
typedef struct coff_tdata
{
- struct coff_symbol_struct *symbols; /* symtab for input bfd */
+ struct coff_symbol_struct *symbols; /* Symtab for input bfd. */
unsigned int *conversion_table;
int conv_table_size;
file_ptr sym_filepos;
@@ -57,7 +54,7 @@ typedef struct coff_tdata
struct coff_ptr_struct *raw_syments;
unsigned long raw_syment_count;
- /* These are only valid once writing has begun */
+ /* These are only valid once writing has begun. */
long int relocbase;
/* These members communicate important constants about the symbol table
@@ -73,7 +70,7 @@ typedef struct coff_tdata
/* The unswapped external symbols. May be NULL. Read by
_bfd_coff_get_external_symbols. */
- PTR external_syms;
+ void * external_syms;
/* If this is TRUE, the external_syms may not be freed. */
bfd_boolean keep_syms;
@@ -85,21 +82,21 @@ typedef struct coff_tdata
/* If this is TRUE, the strings have been written out already. */
bfd_boolean strings_written;
- /* is this a PE format coff file */
+ /* Is this a PE format coff file? */
int pe;
/* Used by the COFF backend linker. */
struct coff_link_hash_entry **sym_hashes;
- /* used by the pe linker for PowerPC */
+ /* Used by the pe linker for PowerPC. */
int *local_toc_sym_map;
struct bfd_link_info *link_info;
/* Used by coff_find_nearest_line. */
- PTR line_info;
+ void * line_info;
- /* A place to stash dwarf2 info for this bfd. */
- PTR dwarf2_find_line_info;
+ /* A place to stash dwarf2 info for this bfd. */
+ void * dwarf2_find_line_info;
/* The timestamp from the COFF file header. */
long timestamp;
@@ -110,14 +107,14 @@ typedef struct coff_tdata
} coff_data_type;
-/* Tdata for pe image files. */
+/* Tdata for pe image files. */
typedef struct pe_tdata
{
coff_data_type coff;
struct internal_extra_pe_aouthdr pe_opthdr;
int dll;
int has_reloc_section;
- bfd_boolean (*in_reloc_p) PARAMS((bfd *, reloc_howto_type *));
+ bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
flagword real_flags;
int target_subsystem;
bfd_boolean force_minimum_alignment;
@@ -174,7 +171,7 @@ struct xcoff_tdata
#define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
/* We take the address of the first element of an asymbol to ensure that the
- * macro is only ever applied to an asymbol. */
+ macro is only ever applied to an asymbol. */
#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
/* The used_by_bfd field of a section may be set to a pointer to this
@@ -194,11 +191,13 @@ struct coff_section_tdata
bfd_vma offset;
unsigned int i;
const char *function;
+ /* Optional information about a COMDAT entry; NULL if not COMDAT. */
+ struct coff_comdat_info *comdat;
int line_base;
/* A pointer used for .stab linking optimizations. */
- PTR stab_info;
+ void * stab_info;
/* Available for individual backends. */
- PTR tdata;
+ void * tdata;
};
/* An accessor macro for the coff_section_tdata structure. */
@@ -276,7 +275,7 @@ struct coff_link_hash_table
{
struct bfd_link_hash_table root;
/* A pointer to information used to link stabs in sections. */
- PTR stab_info;
+ struct stab_info stab_info;
};
/* Look up an entry in a COFF linker hash table. */
@@ -291,7 +290,7 @@ struct coff_link_hash_table
#define coff_link_hash_traverse(table, func, info) \
(bfd_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \
(info)))
/* Get the COFF linker hash table from a link_info structure. */
@@ -300,67 +299,69 @@ struct coff_link_hash_table
/* Functions in coffgen.c. */
extern const bfd_target *coff_object_p
- PARAMS ((bfd *));
+ (bfd *);
extern struct bfd_section *coff_section_from_bfd_index
- PARAMS ((bfd *, int));
+ (bfd *, int);
extern long coff_get_symtab_upper_bound
- PARAMS ((bfd *));
+ (bfd *);
extern long coff_canonicalize_symtab
- PARAMS ((bfd *, asymbol **));
+ (bfd *, asymbol **);
extern int coff_count_linenumbers
- PARAMS ((bfd *));
+ (bfd *);
extern struct coff_symbol_struct *coff_symbol_from
- PARAMS ((bfd *, asymbol *));
+ (bfd *, asymbol *);
extern bfd_boolean coff_renumber_symbols
- PARAMS ((bfd *, int *));
+ (bfd *, int *);
extern void coff_mangle_symbols
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean coff_write_symbols
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean coff_write_linenumbers
- PARAMS ((bfd *));
+ (bfd *);
extern alent *coff_get_lineno
- PARAMS ((bfd *, asymbol *));
+ (bfd *, asymbol *);
extern asymbol *coff_section_symbol
- PARAMS ((bfd *, char *));
+ (bfd *, char *);
extern bfd_boolean _bfd_coff_get_external_symbols
- PARAMS ((bfd *));
+ (bfd *);
extern const char *_bfd_coff_read_string_table
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean _bfd_coff_free_symbols
- PARAMS ((bfd *));
+ (bfd *);
extern struct coff_ptr_struct *coff_get_normalized_symtab
- PARAMS ((bfd *));
+ (bfd *);
extern long coff_get_reloc_upper_bound
- PARAMS ((bfd *, sec_ptr));
+ (bfd *, sec_ptr);
extern asymbol *coff_make_empty_symbol
- PARAMS ((bfd *));
+ (bfd *);
extern void coff_print_symbol
- PARAMS ((bfd *, PTR filep, asymbol *, bfd_print_symbol_type));
+ (bfd *, void * filep, asymbol *, bfd_print_symbol_type);
extern void coff_get_symbol_info
- PARAMS ((bfd *, asymbol *, symbol_info *ret));
+ (bfd *, asymbol *, symbol_info *ret);
extern bfd_boolean _bfd_coff_is_local_label_name
- PARAMS ((bfd *, const char *));
+ (bfd *, const char *);
extern asymbol *coff_bfd_make_debug_symbol
- PARAMS ((bfd *, PTR, unsigned long));
+ (bfd *, void *, unsigned long);
extern bfd_boolean coff_find_nearest_line
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
+ (bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *);
+extern bfd_boolean coff_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
extern int coff_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+ (bfd *, bfd_boolean);
extern bfd_boolean bfd_coff_reloc16_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+ (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, bfd_boolean, asymbol **));
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ bfd_byte *, bfd_boolean, asymbol **);
extern bfd_vma bfd_coff_reloc16_get_value
- PARAMS ((arelent *, struct bfd_link_info *, asection *));
+ (arelent *, struct bfd_link_info *, asection *);
extern void bfd_perform_slip
- PARAMS ((bfd *, unsigned int, asection *, bfd_vma));
+ (bfd *, unsigned int, asection *, bfd_vma);
/* Functions and types in cofflink.c. */
-#define STRING_SIZE_SIZE (4)
+#define STRING_SIZE_SIZE 4
/* We use a hash table to merge identical enum, struct, and union
definitions in the linker. */
@@ -420,7 +421,8 @@ struct coff_debug_merge_hash_table
/* Initialize a COFF debug merge hash table. */
#define coff_debug_merge_hash_table_init(table) \
- (bfd_hash_table_init (&(table)->root, _bfd_coff_debug_merge_hash_newfunc))
+ (bfd_hash_table_init (&(table)->root, _bfd_coff_debug_merge_hash_newfunc, \
+ sizeof (struct coff_debug_merge_hash_entry)))
/* Free a COFF debug merge hash table. */
@@ -531,38 +533,38 @@ struct coff_section_alignment_entry
};
extern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
extern bfd_boolean _bfd_coff_link_hash_table_init
- PARAMS ((struct coff_link_hash_table *, bfd *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *)));
+ (struct coff_link_hash_table *, bfd *,
+ struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *),
+ unsigned int);
extern struct bfd_link_hash_table *_bfd_coff_link_hash_table_create
- PARAMS ((bfd *));
+ (bfd *);
extern const char *_bfd_coff_internal_syment_name
- PARAMS ((bfd *, const struct internal_syment *, char *));
+ (bfd *, const struct internal_syment *, char *);
extern bfd_boolean _bfd_coff_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_coff_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern struct internal_reloc *_bfd_coff_read_internal_relocs
- PARAMS ((bfd *, asection *, bfd_boolean, bfd_byte *, bfd_boolean,
- struct internal_reloc *));
+ (bfd *, asection *, bfd_boolean, bfd_byte *, bfd_boolean,
+ struct internal_reloc *);
extern bfd_boolean _bfd_coff_generic_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-
+ (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **);
extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
extern bfd_boolean _bfd_coff_write_global_sym
- PARAMS ((struct coff_link_hash_entry *, PTR));
+ (struct coff_link_hash_entry *, void *);
extern bfd_boolean _bfd_coff_write_task_globals
- PARAMS ((struct coff_link_hash_entry *, PTR));
+ (struct coff_link_hash_entry *, void *);
extern bfd_boolean _bfd_coff_link_input_bfd
- PARAMS ((struct coff_final_link_info *, bfd *));
+ (struct coff_final_link_info *, bfd *);
extern bfd_boolean _bfd_coff_reloc_link_order
- PARAMS ((bfd *, struct coff_final_link_info *, asection *,
- struct bfd_link_order *));
+ (bfd *, struct coff_final_link_info *, asection *,
+ struct bfd_link_order *);
#define coff_get_section_contents_in_window \
@@ -571,30 +573,30 @@ extern bfd_boolean _bfd_coff_reloc_link_order
/* Functions in xcofflink.c. */
extern long _bfd_xcoff_get_dynamic_symtab_upper_bound
- PARAMS ((bfd *));
+ (bfd *);
extern long _bfd_xcoff_canonicalize_dynamic_symtab
- PARAMS ((bfd *, asymbol **));
+ (bfd *, asymbol **);
extern long _bfd_xcoff_get_dynamic_reloc_upper_bound
- PARAMS ((bfd *));
+ (bfd *);
extern long _bfd_xcoff_canonicalize_dynamic_reloc
- PARAMS ((bfd *, arelent **, asymbol **));
+ (bfd *, arelent **, asymbol **);
extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create
- PARAMS ((bfd *));
+ (bfd *);
extern void _bfd_xcoff_bfd_link_hash_table_free
- PARAMS ((struct bfd_link_hash_table *));
+ (struct bfd_link_hash_table *);
extern bfd_boolean _bfd_xcoff_bfd_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_xcoff_bfd_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_ppc_xcoff_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
+ (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **);
/* Functions in coff-ppc.c. FIXME: These are called be pe.em in the
linker, and so should start with bfd and be declared in bfd.h. */
extern bfd_boolean ppc_allocate_toc_section
- PARAMS ((struct bfd_link_info *));
+ (struct bfd_link_info *);
extern bfd_boolean ppc_process_before_allocation
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
diff --git a/contrib/binutils/bfd/libcoff.h b/contrib/binutils/bfd/libcoff.h
index 577113283522..f756f30b1bf6 100644
--- a/contrib/binutils/bfd/libcoff.h
+++ b/contrib/binutils/bfd/libcoff.h
@@ -4,56 +4,53 @@
/* BFD COFF object file private structure.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfdlink.h"
-/* Object file tdata; access macros */
-
-#define coff_data(bfd) ((bfd)->tdata.coff_obj_data)
-#define exec_hdr(bfd) (coff_data(bfd)->hdr)
-#define obj_pe(bfd) (coff_data(bfd)->pe)
-#define obj_symbols(bfd) (coff_data(bfd)->symbols)
-#define obj_sym_filepos(bfd) (coff_data(bfd)->sym_filepos)
-
-#define obj_relocbase(bfd) (coff_data(bfd)->relocbase)
-#define obj_raw_syments(bfd) (coff_data(bfd)->raw_syments)
-#define obj_raw_syment_count(bfd) (coff_data(bfd)->raw_syment_count)
-#define obj_convert(bfd) (coff_data(bfd)->conversion_table)
-#define obj_conv_table_size(bfd) (coff_data(bfd)->conv_table_size)
-
-#define obj_coff_external_syms(bfd) (coff_data (bfd)->external_syms)
-#define obj_coff_keep_syms(bfd) (coff_data (bfd)->keep_syms)
-#define obj_coff_strings(bfd) (coff_data (bfd)->strings)
-#define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings)
-#define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes)
+/* Object file tdata; access macros. */
+
+#define coff_data(bfd) ((bfd)->tdata.coff_obj_data)
+#define exec_hdr(bfd) (coff_data (bfd)->hdr)
+#define obj_pe(bfd) (coff_data (bfd)->pe)
+#define obj_symbols(bfd) (coff_data (bfd)->symbols)
+#define obj_sym_filepos(bfd) (coff_data (bfd)->sym_filepos)
+#define obj_relocbase(bfd) (coff_data (bfd)->relocbase)
+#define obj_raw_syments(bfd) (coff_data (bfd)->raw_syments)
+#define obj_raw_syment_count(bfd) (coff_data (bfd)->raw_syment_count)
+#define obj_convert(bfd) (coff_data (bfd)->conversion_table)
+#define obj_conv_table_size(bfd) (coff_data (bfd)->conv_table_size)
+#define obj_coff_external_syms(bfd) (coff_data (bfd)->external_syms)
+#define obj_coff_keep_syms(bfd) (coff_data (bfd)->keep_syms)
+#define obj_coff_strings(bfd) (coff_data (bfd)->strings)
+#define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings)
+#define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes)
#define obj_coff_strings_written(bfd) (coff_data (bfd)->strings_written)
-
-#define obj_coff_local_toc_table(bfd) (coff_data(bfd)->local_toc_sym_map)
+#define obj_coff_local_toc_table(bfd) (coff_data (bfd)->local_toc_sym_map)
/* `Tdata' information kept for COFF files. */
typedef struct coff_tdata
{
- struct coff_symbol_struct *symbols; /* symtab for input bfd */
+ struct coff_symbol_struct *symbols; /* Symtab for input bfd. */
unsigned int *conversion_table;
int conv_table_size;
file_ptr sym_filepos;
@@ -61,7 +58,7 @@ typedef struct coff_tdata
struct coff_ptr_struct *raw_syments;
unsigned long raw_syment_count;
- /* These are only valid once writing has begun */
+ /* These are only valid once writing has begun. */
long int relocbase;
/* These members communicate important constants about the symbol table
@@ -77,7 +74,7 @@ typedef struct coff_tdata
/* The unswapped external symbols. May be NULL. Read by
_bfd_coff_get_external_symbols. */
- PTR external_syms;
+ void * external_syms;
/* If this is TRUE, the external_syms may not be freed. */
bfd_boolean keep_syms;
@@ -89,21 +86,21 @@ typedef struct coff_tdata
/* If this is TRUE, the strings have been written out already. */
bfd_boolean strings_written;
- /* is this a PE format coff file */
+ /* Is this a PE format coff file? */
int pe;
/* Used by the COFF backend linker. */
struct coff_link_hash_entry **sym_hashes;
- /* used by the pe linker for PowerPC */
+ /* Used by the pe linker for PowerPC. */
int *local_toc_sym_map;
struct bfd_link_info *link_info;
/* Used by coff_find_nearest_line. */
- PTR line_info;
+ void * line_info;
- /* A place to stash dwarf2 info for this bfd. */
- PTR dwarf2_find_line_info;
+ /* A place to stash dwarf2 info for this bfd. */
+ void * dwarf2_find_line_info;
/* The timestamp from the COFF file header. */
long timestamp;
@@ -114,14 +111,14 @@ typedef struct coff_tdata
} coff_data_type;
-/* Tdata for pe image files. */
+/* Tdata for pe image files. */
typedef struct pe_tdata
{
coff_data_type coff;
struct internal_extra_pe_aouthdr pe_opthdr;
int dll;
int has_reloc_section;
- bfd_boolean (*in_reloc_p) PARAMS((bfd *, reloc_howto_type *));
+ bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
flagword real_flags;
int target_subsystem;
bfd_boolean force_minimum_alignment;
@@ -178,7 +175,7 @@ struct xcoff_tdata
#define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
/* We take the address of the first element of an asymbol to ensure that the
- * macro is only ever applied to an asymbol. */
+ macro is only ever applied to an asymbol. */
#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
/* The used_by_bfd field of a section may be set to a pointer to this
@@ -198,11 +195,13 @@ struct coff_section_tdata
bfd_vma offset;
unsigned int i;
const char *function;
+ /* Optional information about a COMDAT entry; NULL if not COMDAT. */
+ struct coff_comdat_info *comdat;
int line_base;
/* A pointer used for .stab linking optimizations. */
- PTR stab_info;
+ void * stab_info;
/* Available for individual backends. */
- PTR tdata;
+ void * tdata;
};
/* An accessor macro for the coff_section_tdata structure. */
@@ -280,7 +279,7 @@ struct coff_link_hash_table
{
struct bfd_link_hash_table root;
/* A pointer to information used to link stabs in sections. */
- PTR stab_info;
+ struct stab_info stab_info;
};
/* Look up an entry in a COFF linker hash table. */
@@ -295,7 +294,7 @@ struct coff_link_hash_table
#define coff_link_hash_traverse(table, func, info) \
(bfd_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \
(info)))
/* Get the COFF linker hash table from a link_info structure. */
@@ -304,67 +303,69 @@ struct coff_link_hash_table
/* Functions in coffgen.c. */
extern const bfd_target *coff_object_p
- PARAMS ((bfd *));
+ (bfd *);
extern struct bfd_section *coff_section_from_bfd_index
- PARAMS ((bfd *, int));
+ (bfd *, int);
extern long coff_get_symtab_upper_bound
- PARAMS ((bfd *));
+ (bfd *);
extern long coff_canonicalize_symtab
- PARAMS ((bfd *, asymbol **));
+ (bfd *, asymbol **);
extern int coff_count_linenumbers
- PARAMS ((bfd *));
+ (bfd *);
extern struct coff_symbol_struct *coff_symbol_from
- PARAMS ((bfd *, asymbol *));
+ (bfd *, asymbol *);
extern bfd_boolean coff_renumber_symbols
- PARAMS ((bfd *, int *));
+ (bfd *, int *);
extern void coff_mangle_symbols
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean coff_write_symbols
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean coff_write_linenumbers
- PARAMS ((bfd *));
+ (bfd *);
extern alent *coff_get_lineno
- PARAMS ((bfd *, asymbol *));
+ (bfd *, asymbol *);
extern asymbol *coff_section_symbol
- PARAMS ((bfd *, char *));
+ (bfd *, char *);
extern bfd_boolean _bfd_coff_get_external_symbols
- PARAMS ((bfd *));
+ (bfd *);
extern const char *_bfd_coff_read_string_table
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean _bfd_coff_free_symbols
- PARAMS ((bfd *));
+ (bfd *);
extern struct coff_ptr_struct *coff_get_normalized_symtab
- PARAMS ((bfd *));
+ (bfd *);
extern long coff_get_reloc_upper_bound
- PARAMS ((bfd *, sec_ptr));
+ (bfd *, sec_ptr);
extern asymbol *coff_make_empty_symbol
- PARAMS ((bfd *));
+ (bfd *);
extern void coff_print_symbol
- PARAMS ((bfd *, PTR filep, asymbol *, bfd_print_symbol_type));
+ (bfd *, void * filep, asymbol *, bfd_print_symbol_type);
extern void coff_get_symbol_info
- PARAMS ((bfd *, asymbol *, symbol_info *ret));
+ (bfd *, asymbol *, symbol_info *ret);
extern bfd_boolean _bfd_coff_is_local_label_name
- PARAMS ((bfd *, const char *));
+ (bfd *, const char *);
extern asymbol *coff_bfd_make_debug_symbol
- PARAMS ((bfd *, PTR, unsigned long));
+ (bfd *, void *, unsigned long);
extern bfd_boolean coff_find_nearest_line
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
+ (bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *);
+extern bfd_boolean coff_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
extern int coff_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+ (bfd *, bfd_boolean);
extern bfd_boolean bfd_coff_reloc16_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+ (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, bfd_boolean, asymbol **));
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ bfd_byte *, bfd_boolean, asymbol **);
extern bfd_vma bfd_coff_reloc16_get_value
- PARAMS ((arelent *, struct bfd_link_info *, asection *));
+ (arelent *, struct bfd_link_info *, asection *);
extern void bfd_perform_slip
- PARAMS ((bfd *, unsigned int, asection *, bfd_vma));
+ (bfd *, unsigned int, asection *, bfd_vma);
/* Functions and types in cofflink.c. */
-#define STRING_SIZE_SIZE (4)
+#define STRING_SIZE_SIZE 4
/* We use a hash table to merge identical enum, struct, and union
definitions in the linker. */
@@ -424,7 +425,8 @@ struct coff_debug_merge_hash_table
/* Initialize a COFF debug merge hash table. */
#define coff_debug_merge_hash_table_init(table) \
- (bfd_hash_table_init (&(table)->root, _bfd_coff_debug_merge_hash_newfunc))
+ (bfd_hash_table_init (&(table)->root, _bfd_coff_debug_merge_hash_newfunc, \
+ sizeof (struct coff_debug_merge_hash_entry)))
/* Free a COFF debug merge hash table. */
@@ -535,38 +537,38 @@ struct coff_section_alignment_entry
};
extern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
extern bfd_boolean _bfd_coff_link_hash_table_init
- PARAMS ((struct coff_link_hash_table *, bfd *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *)));
+ (struct coff_link_hash_table *, bfd *,
+ struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *),
+ unsigned int);
extern struct bfd_link_hash_table *_bfd_coff_link_hash_table_create
- PARAMS ((bfd *));
+ (bfd *);
extern const char *_bfd_coff_internal_syment_name
- PARAMS ((bfd *, const struct internal_syment *, char *));
+ (bfd *, const struct internal_syment *, char *);
extern bfd_boolean _bfd_coff_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_coff_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern struct internal_reloc *_bfd_coff_read_internal_relocs
- PARAMS ((bfd *, asection *, bfd_boolean, bfd_byte *, bfd_boolean,
- struct internal_reloc *));
+ (bfd *, asection *, bfd_boolean, bfd_byte *, bfd_boolean,
+ struct internal_reloc *);
extern bfd_boolean _bfd_coff_generic_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-
+ (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **);
extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
extern bfd_boolean _bfd_coff_write_global_sym
- PARAMS ((struct coff_link_hash_entry *, PTR));
+ (struct coff_link_hash_entry *, void *);
extern bfd_boolean _bfd_coff_write_task_globals
- PARAMS ((struct coff_link_hash_entry *, PTR));
+ (struct coff_link_hash_entry *, void *);
extern bfd_boolean _bfd_coff_link_input_bfd
- PARAMS ((struct coff_final_link_info *, bfd *));
+ (struct coff_final_link_info *, bfd *);
extern bfd_boolean _bfd_coff_reloc_link_order
- PARAMS ((bfd *, struct coff_final_link_info *, asection *,
- struct bfd_link_order *));
+ (bfd *, struct coff_final_link_info *, asection *,
+ struct bfd_link_order *);
#define coff_get_section_contents_in_window \
@@ -575,32 +577,32 @@ extern bfd_boolean _bfd_coff_reloc_link_order
/* Functions in xcofflink.c. */
extern long _bfd_xcoff_get_dynamic_symtab_upper_bound
- PARAMS ((bfd *));
+ (bfd *);
extern long _bfd_xcoff_canonicalize_dynamic_symtab
- PARAMS ((bfd *, asymbol **));
+ (bfd *, asymbol **);
extern long _bfd_xcoff_get_dynamic_reloc_upper_bound
- PARAMS ((bfd *));
+ (bfd *);
extern long _bfd_xcoff_canonicalize_dynamic_reloc
- PARAMS ((bfd *, arelent **, asymbol **));
+ (bfd *, arelent **, asymbol **);
extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create
- PARAMS ((bfd *));
+ (bfd *);
extern void _bfd_xcoff_bfd_link_hash_table_free
- PARAMS ((struct bfd_link_hash_table *));
+ (struct bfd_link_hash_table *);
extern bfd_boolean _bfd_xcoff_bfd_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_xcoff_bfd_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_ppc_xcoff_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
+ (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **);
/* Functions in coff-ppc.c. FIXME: These are called be pe.em in the
linker, and so should start with bfd and be declared in bfd.h. */
extern bfd_boolean ppc_allocate_toc_section
- PARAMS ((struct bfd_link_info *));
+ (struct bfd_link_info *);
extern bfd_boolean ppc_process_before_allocation
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
/* Extracted from coffcode.h. */
typedef struct coff_ptr_struct
@@ -674,34 +676,34 @@ enum coff_symbol_classification
typedef struct
{
void (*_bfd_coff_swap_aux_in)
- PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+ (bfd *, void *, int, int, int, int, void *);
void (*_bfd_coff_swap_sym_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
void (*_bfd_coff_swap_lineno_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_aux_out)
- PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+ (bfd *, void *, int, int, int, int, void *);
unsigned int (*_bfd_coff_swap_sym_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_lineno_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_reloc_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_filehdr_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_aouthdr_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int (*_bfd_coff_swap_scnhdr_out)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
unsigned int _bfd_filhsz;
unsigned int _bfd_aoutsz;
@@ -718,86 +720,86 @@ typedef struct
unsigned int _bfd_coff_debug_string_prefix_length;
void (*_bfd_coff_swap_filehdr_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
void (*_bfd_coff_swap_aouthdr_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
void (*_bfd_coff_swap_scnhdr_in)
- PARAMS ((bfd *, PTR, PTR));
+ (bfd *, void *, void *);
void (*_bfd_coff_swap_reloc_in)
- PARAMS ((bfd *abfd, PTR, PTR));
+ (bfd *abfd, void *, void *);
bfd_boolean (*_bfd_coff_bad_format_hook)
- PARAMS ((bfd *, PTR));
+ (bfd *, void *);
bfd_boolean (*_bfd_coff_set_arch_mach_hook)
- PARAMS ((bfd *, PTR));
+ (bfd *, void *);
- PTR (*_bfd_coff_mkobject_hook)
- PARAMS ((bfd *, PTR, PTR));
+ void * (*_bfd_coff_mkobject_hook)
+ (bfd *, void *, void *);
bfd_boolean (*_bfd_styp_to_sec_flags_hook)
- PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
+ (bfd *, void *, const char *, asection *, flagword *);
void (*_bfd_set_alignment_hook)
- PARAMS ((bfd *, asection *, PTR));
+ (bfd *, asection *, void *);
bfd_boolean (*_bfd_coff_slurp_symbol_table)
- PARAMS ((bfd *));
+ (bfd *);
bfd_boolean (*_bfd_coff_symname_in_debug)
- PARAMS ((bfd *, struct internal_syment *));
+ (bfd *, struct internal_syment *);
bfd_boolean (*_bfd_coff_pointerize_aux_hook)
- PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
- unsigned int, combined_entry_type *));
+ (bfd *, combined_entry_type *, combined_entry_type *,
+ unsigned int, combined_entry_type *);
bfd_boolean (*_bfd_coff_print_aux)
- PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
- combined_entry_type *, unsigned int));
+ (bfd *, FILE *, combined_entry_type *, combined_entry_type *,
+ combined_entry_type *, unsigned int);
void (*_bfd_coff_reloc16_extra_cases)
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
- bfd_byte *, unsigned int *, unsigned int *));
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+ bfd_byte *, unsigned int *, unsigned int *);
int (*_bfd_coff_reloc16_estimate)
- PARAMS ((bfd *, asection *, arelent *, unsigned int,
- struct bfd_link_info *));
+ (bfd *, asection *, arelent *, unsigned int,
+ struct bfd_link_info *);
enum coff_symbol_classification (*_bfd_coff_classify_symbol)
- PARAMS ((bfd *, struct internal_syment *));
+ (bfd *, struct internal_syment *);
bfd_boolean (*_bfd_coff_compute_section_file_positions)
- PARAMS ((bfd *));
+ (bfd *);
bfd_boolean (*_bfd_coff_start_final_link)
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
bfd_boolean (*_bfd_coff_relocate_section)
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
+ (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **);
reloc_howto_type *(*_bfd_coff_rtype_to_howto)
- PARAMS ((bfd *, asection *, struct internal_reloc *,
+ (bfd *, asection *, struct internal_reloc *,
struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
+ bfd_vma *);
bfd_boolean (*_bfd_coff_adjust_symndx)
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- struct internal_reloc *, bfd_boolean *));
+ (bfd *, struct bfd_link_info *, bfd *, asection *,
+ struct internal_reloc *, bfd_boolean *);
bfd_boolean (*_bfd_coff_link_add_one_symbol)
- PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
+ (struct bfd_link_info *, bfd *, const char *, flagword,
asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
- struct bfd_link_hash_entry **));
+ struct bfd_link_hash_entry **);
bfd_boolean (*_bfd_coff_link_output_has_begun)
- PARAMS ((bfd *, struct coff_final_link_info *));
+ (bfd *, struct coff_final_link_info *);
bfd_boolean (*_bfd_coff_final_link_postscript)
- PARAMS ((bfd *, struct coff_final_link_info *));
+ (bfd *, struct coff_final_link_info *);
} bfd_coff_backend_data;
@@ -927,7 +929,7 @@ typedef struct
(info, abfd, name, flags, section, value, string, cp, coll, hashp))
#define bfd_coff_link_output_has_begun(a,p) \
- ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
+ ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a, p))
#define bfd_coff_final_link_postscript(a,p) \
- ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
+ ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p))
diff --git a/contrib/binutils/bfd/libecoff.h b/contrib/binutils/bfd/libecoff.h
index 161f06c727c8..8c5e218ee58d 100644
--- a/contrib/binutils/bfd/libecoff.h
+++ b/contrib/binutils/bfd/libecoff.h
@@ -1,23 +1,23 @@
/* BFD ECOFF object file private structure.
- Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfdlink.h"
@@ -57,24 +57,22 @@ struct ecoff_backend_data
/* External reloc size. */
bfd_size_type external_reloc_size;
/* Reloc swapping functions. */
- void (*swap_reloc_in) PARAMS ((bfd *, PTR, struct internal_reloc *));
- void (*swap_reloc_out) PARAMS ((bfd *, const struct internal_reloc *, PTR));
+ void (*swap_reloc_in) (bfd *, void *, struct internal_reloc *);
+ void (*swap_reloc_out) (bfd *, const struct internal_reloc *, void *);
/* Backend reloc tweaking. */
void (*adjust_reloc_in)
- PARAMS ((bfd *, const struct internal_reloc *, arelent *));
+ (bfd *, const struct internal_reloc *, arelent *);
void (*adjust_reloc_out)
- PARAMS ((bfd *, const arelent *, struct internal_reloc *));
+ (bfd *, const arelent *, struct internal_reloc *);
/* Relocate section contents while linking. */
bfd_boolean (*relocate_section)
- PARAMS ((bfd *output_bfd, struct bfd_link_info *, bfd *input_bfd,
- asection *input_section, bfd_byte *contents,
- PTR external_relocs));
+ (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, void *);
/* Do final adjustments to filehdr and aouthdr. */
bfd_boolean (*adjust_headers)
- PARAMS ((bfd *, struct internal_filehdr *, struct internal_aouthdr *));
+ (bfd *, struct internal_filehdr *, struct internal_aouthdr *);
/* Read an element from an archive at a given file position. This
is needed because OSF/1 3.2 uses a weird archive format. */
- bfd *(*get_elt_at_filepos) PARAMS ((bfd *, file_ptr));
+ bfd *(*get_elt_at_filepos) (bfd *, file_ptr);
};
/* This is the target specific information kept for ECOFF files. */
@@ -115,7 +113,7 @@ typedef struct ecoff_tdata
struct ecoff_debug_info debug_info;
/* The unswapped ECOFF symbolic information. */
- PTR raw_syments;
+ void * raw_syments;
/* The canonical BFD symbols. */
struct ecoff_symbol_struct *canonical_symbols;
@@ -163,7 +161,7 @@ typedef struct ecoff_symbol_struct
/* A pointer to the unswapped hidden information for this symbol.
This is either a struct sym_ext or a struct ext_ext, depending on
the value of the local field above. */
- PTR native;
+ void * native;
} ecoff_symbol_type;
/* We take the address of the first element of an asymbol to ensure that the
@@ -176,41 +174,13 @@ typedef struct ecoff_symbol_struct
#define ecoff_get_sym_index(symbol) ((symbol)->udata.i)
#define ecoff_set_sym_index(symbol, idx) ((symbol)->udata.i = (idx))
-/* When generating MIPS embedded PIC code, the linker relaxes the code
- to turn PC relative branches into longer code sequences when the PC
- relative branch is out of range. This involves reading the relocs
- in bfd_relax_section as well as in bfd_final_link, and requires the
- code to keep track of which relocs have been expanded. A pointer
- to this structure is put in the used_by_bfd pointer of a section to
- keep track of this information. The user_by_bfd pointer will be
- NULL if the information was not needed. */
+/* A pointer to this structure is put in the used_by_bfd pointer of
+ a section to keep track of any per-section data.
+ The user_by_bfd pointer will be NULL if the information was not
+ needed. */
struct ecoff_section_tdata
{
- /* The unswapped relocs for this section. These are stored in
- memory so the input file does not have to be read twice. */
- PTR external_relocs;
-
- /* The contents of the section. These bytes may or may not be saved
- in memory, but if it is this is a pointer to them. */
- bfd_byte *contents;
-
- /* Offset adjustments for PC relative branches. A number other than
- 1 is an addend for a PC relative branch, or a switch table entry
- which is the difference of two .text locations; this addend
- arises because the branch or difference crosses one or more
- branches which were expanded into a larger code sequence. A 1
- means that this branch was itself expanded into a larger code
- sequence. 1 is not a possible offset, since all offsets must be
- multiples of the instruction size, which is 4; also, the only
- relocs with non-zero offsets will be PC relative branches or
- switch table entries within the same object file. If this field
- is NULL, no branches were expanded and no offsets are required.
- Otherwise there are as many entries as there are relocs in the
- section, and the entry for any reloc that is not PC relative is
- zero. */
- long *offsets;
-
/* When producing an executable (i.e., final, non-relocatable link)
on the Alpha, we may need to use multiple global pointer values
to span the entire .lita section. In essence, we allow each
@@ -249,34 +219,37 @@ struct ecoff_link_hash_table
};
/* Make an ECOFF object. */
-extern bfd_boolean _bfd_ecoff_mkobject PARAMS ((bfd *));
+extern bfd_boolean _bfd_ecoff_mkobject (bfd *);
/* Read in the ECOFF symbolic debugging information. */
extern bfd_boolean _bfd_ecoff_slurp_symbolic_info
- PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
+ (bfd *, asection *, struct ecoff_debug_info *);
/* Generic ECOFF BFD backend vectors. */
-extern bfd_boolean _bfd_ecoff_write_object_contents PARAMS ((bfd *abfd));
-extern const bfd_target *_bfd_ecoff_archive_p PARAMS ((bfd *abfd));
+extern bfd_boolean _bfd_ecoff_write_object_contents (bfd *);
+extern const bfd_target *_bfd_ecoff_archive_p (bfd *);
#define _bfd_ecoff_close_and_cleanup _bfd_generic_close_and_cleanup
#define _bfd_ecoff_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
extern bfd_boolean _bfd_ecoff_new_section_hook
- PARAMS ((bfd *, asection *));
+ (bfd *, asection *);
extern bfd_boolean _bfd_ecoff_get_section_contents
- PARAMS ((bfd *, asection *, PTR location, file_ptr, bfd_size_type));
+ (bfd *, asection *, void * location, file_ptr, bfd_size_type);
#define _bfd_ecoff_bfd_link_split_section _bfd_generic_link_split_section
extern bfd_boolean _bfd_ecoff_bfd_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
#define _bfd_ecoff_bfd_copy_private_section_data \
_bfd_generic_bfd_copy_private_section_data
#define _bfd_ecoff_bfd_copy_private_symbol_data \
_bfd_generic_bfd_copy_private_symbol_data
+#define _bfd_ecoff_bfd_copy_private_header_data \
+ _bfd_generic_bfd_copy_private_header_data
+
#define _bfd_ecoff_bfd_print_private_bfd_data \
_bfd_generic_bfd_print_private_bfd_data
@@ -284,79 +257,81 @@ extern bfd_boolean _bfd_ecoff_bfd_copy_private_bfd_data
_bfd_generic_bfd_merge_private_bfd_data
#define _bfd_ecoff_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
-extern bfd_boolean _bfd_ecoff_slurp_armap PARAMS ((bfd *abfd));
+extern bfd_boolean _bfd_ecoff_slurp_armap (bfd *);
#define _bfd_ecoff_slurp_extended_name_table _bfd_slurp_extended_name_table
#define _bfd_ecoff_construct_extended_name_table \
_bfd_archive_bsd_construct_extended_name_table
#define _bfd_ecoff_truncate_arname bfd_dont_truncate_arname
extern bfd_boolean _bfd_ecoff_write_armap
- PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+ (bfd *, unsigned int, struct orl *, unsigned int, int);
#define _bfd_ecoff_read_ar_hdr _bfd_generic_read_ar_hdr
#define _bfd_ecoff_openr_next_archived_file \
bfd_generic_openr_next_archived_file
#define _bfd_ecoff_get_elt_at_index _bfd_generic_get_elt_at_index
#define _bfd_ecoff_generic_stat_arch_elt bfd_generic_stat_arch_elt
#define _bfd_ecoff_update_armap_timestamp bfd_true
+#define _bfd_ecoff_bfd_is_target_special_symbol \
+ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
-extern long _bfd_ecoff_get_symtab_upper_bound PARAMS ((bfd *abfd));
-extern long _bfd_ecoff_canonicalize_symtab PARAMS ((bfd *abfd, asymbol **alocation));
-extern asymbol *_bfd_ecoff_make_empty_symbol PARAMS ((bfd *abfd));
+extern long _bfd_ecoff_get_symtab_upper_bound (bfd *);
+extern long _bfd_ecoff_canonicalize_symtab (bfd *, asymbol **);
+extern asymbol *_bfd_ecoff_make_empty_symbol (bfd *);
extern void _bfd_ecoff_print_symbol
- PARAMS ((bfd *, PTR filep, asymbol *, bfd_print_symbol_type));
+ (bfd *, void *, asymbol *, bfd_print_symbol_type);
extern void _bfd_ecoff_get_symbol_info
- PARAMS ((bfd *, asymbol *, symbol_info *));
+ (bfd *, asymbol *, symbol_info *);
extern bfd_boolean _bfd_ecoff_bfd_is_local_label_name
- PARAMS ((bfd *, const char *));
+ (bfd *, const char *);
#define _bfd_ecoff_get_lineno _bfd_nosymbols_get_lineno
extern bfd_boolean _bfd_ecoff_find_nearest_line
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma offset,
- const char **filename_ptr, const char **fnname_ptr,
- unsigned int *retline_ptr));
+ (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
+ unsigned int *);
#define _bfd_ecoff_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define _bfd_ecoff_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_ecoff_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
+#define _bfd_ecoff_find_inliner_info _bfd_nosymbols_find_inliner_info
#define _bfd_ecoff_get_reloc_upper_bound coff_get_reloc_upper_bound
extern long _bfd_ecoff_canonicalize_reloc
- PARAMS ((bfd *, asection *, arelent **, asymbol **symbols));
+ (bfd *, asection *, arelent **, asymbol **symbols);
/* ecoff_bfd_reloc_type_lookup defined by backend. */
extern bfd_boolean _bfd_ecoff_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long));
+ (bfd *, enum bfd_architecture, unsigned long);
extern bfd_boolean _bfd_ecoff_set_section_contents
- PARAMS ((bfd *, asection *, const PTR location, file_ptr, bfd_size_type));
+ (bfd *, asection *, const void * location, file_ptr, bfd_size_type);
-extern int _bfd_ecoff_sizeof_headers PARAMS ((bfd *abfd, bfd_boolean reloc));
+extern int _bfd_ecoff_sizeof_headers (bfd *, bfd_boolean);
/* 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
- PARAMS ((bfd *));
+ (bfd *);
#define _bfd_ecoff_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
extern bfd_boolean _bfd_ecoff_bfd_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
#define _bfd_ecoff_bfd_link_just_syms _bfd_generic_link_just_syms
extern bfd_boolean _bfd_ecoff_bfd_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
/* Hook functions for the generic COFF section reading code. */
-extern PTR _bfd_ecoff_mkobject_hook PARAMS ((bfd *, PTR filehdr, PTR aouthdr));
+extern void * _bfd_ecoff_mkobject_hook (bfd *, void *, void *);
#define _bfd_ecoff_set_alignment_hook \
- ((void (*) PARAMS ((bfd *, asection *, PTR))) bfd_void)
+ ((void (*) (bfd *, asection *, void *)) bfd_void)
extern bfd_boolean _bfd_ecoff_set_arch_mach_hook
- PARAMS ((bfd *abfd, PTR filehdr));
+ (bfd *, void *);
extern bfd_boolean _bfd_ecoff_styp_to_sec_flags
- PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
-extern bfd_boolean _bfd_ecoff_slurp_symbol_table PARAMS ((bfd *abfd));
+ (bfd *, void *, const char *, asection *, flagword *);
+extern bfd_boolean _bfd_ecoff_slurp_symbol_table (bfd *);
/* ECOFF auxiliary information swapping routines. These are the same
for all ECOFF targets, so they are defined in ecofflink.c. */
extern void _bfd_ecoff_swap_tir_in
- PARAMS ((int, const struct tir_ext *, TIR *));
+ (int, const struct tir_ext *, TIR *);
extern void _bfd_ecoff_swap_tir_out
- PARAMS ((int, const TIR *, struct tir_ext *));
+ (int, const TIR *, struct tir_ext *);
extern void _bfd_ecoff_swap_rndx_in
- PARAMS ((int, const struct rndx_ext *, RNDXR *));
+ (int, const struct rndx_ext *, RNDXR *);
extern void _bfd_ecoff_swap_rndx_out
- PARAMS ((int, const RNDXR *, struct rndx_ext *));
+ (int, const RNDXR *, struct rndx_ext *);
diff --git a/contrib/binutils/bfd/libieee.h b/contrib/binutils/bfd/libieee.h
index 56c7ce1a20c4..ab06251f91ce 100644
--- a/contrib/binutils/bfd/libieee.h
+++ b/contrib/binutils/bfd/libieee.h
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
typedef struct {
unsigned int index:24;
diff --git a/contrib/binutils/bfd/libpei.h b/contrib/binutils/bfd/libpei.h
index 9ed9c1224e76..f0f6580fe4ba 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
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
Written by Cygnus Solutions.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Most of this hacked by Steve Chamberlain,
sac@cygnus.com
@@ -270,6 +270,11 @@
#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)
+
/* These functions are architecture dependent, and are in peicode.h:
coff_swap_reloc_in
int coff_swap_reloc_out
@@ -282,56 +287,39 @@
implementations architecture types, and actually appear in
peigen.c. */
-void _bfd_XXi_swap_sym_in PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_sym_in _bfd_XXi_swap_sym_in
-
-unsigned int _bfd_XXi_swap_sym_out PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_sym_out _bfd_XXi_swap_sym_out
-
-void _bfd_XXi_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-#define coff_swap_aux_in _bfd_XXi_swap_aux_in
-
-unsigned int _bfd_XXi_swap_aux_out \
- PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-#define coff_swap_aux_out _bfd_XXi_swap_aux_out
-
-void _bfd_XXi_swap_lineno_in PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_lineno_in _bfd_XXi_swap_lineno_in
-
-unsigned int _bfd_XXi_swap_lineno_out PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_lineno_out _bfd_XXi_swap_lineno_out
-
-void _bfd_XXi_swap_aouthdr_in PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_aouthdr_in _bfd_XXi_swap_aouthdr_in
-
-unsigned int _bfd_XXi_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR));
+#define coff_swap_sym_in _bfd_XXi_swap_sym_in
+#define coff_swap_sym_out _bfd_XXi_swap_sym_out
+#define coff_swap_aux_in _bfd_XXi_swap_aux_in
+#define coff_swap_aux_out _bfd_XXi_swap_aux_out
+#define coff_swap_lineno_in _bfd_XXi_swap_lineno_in
+#define coff_swap_lineno_out _bfd_XXi_swap_lineno_out
+#define coff_swap_aouthdr_in _bfd_XXi_swap_aouthdr_in
#define coff_swap_aouthdr_out _bfd_XXi_swap_aouthdr_out
-
-unsigned int _bfd_XXi_swap_scnhdr_out PARAMS ((bfd *, PTR, PTR));
-#define coff_swap_scnhdr_out _bfd_XXi_swap_scnhdr_out
-
-bfd_boolean _bfd_XX_print_private_bfd_data_common PARAMS ((bfd *, PTR));
-
-bfd_boolean _bfd_XX_bfd_copy_private_bfd_data_common PARAMS ((bfd *, bfd *));
-
-void _bfd_XX_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
-
-bfd_boolean _bfd_XXi_final_link_postscript
- PARAMS ((bfd *, struct coff_final_link_info *));
+#define coff_swap_scnhdr_out _bfd_XXi_swap_scnhdr_out
#ifndef coff_final_link_postscript
#define coff_final_link_postscript _bfd_XXi_final_link_postscript
#endif
+
+void _bfd_XXi_swap_sym_in (bfd *, void *, void *);
+unsigned _bfd_XXi_swap_sym_out (bfd *, void *, void *);
+void _bfd_XXi_swap_aux_in (bfd *, void *, int, int, int, int, void *);
+unsigned _bfd_XXi_swap_aux_out (bfd *, void *, int, int, int, int, void *);
+void _bfd_XXi_swap_lineno_in (bfd *, void *, void *);
+unsigned _bfd_XXi_swap_lineno_out (bfd *, void *, void *);
+void _bfd_XXi_swap_aouthdr_in (bfd *, void *, void *);
+unsigned _bfd_XXi_swap_aouthdr_out (bfd *, void *, void *);
+unsigned _bfd_XXi_swap_scnhdr_out (bfd *, void *, void *);
+bfd_boolean _bfd_XX_print_private_bfd_data_common (bfd *, void *);
+bfd_boolean _bfd_XX_bfd_copy_private_bfd_data_common (bfd *, bfd *);
+void _bfd_XX_get_symbol_info (bfd *, asymbol *, symbol_info *);
+bfd_boolean _bfd_XXi_final_link_postscript (bfd *, struct coff_final_link_info *);
+
/* The following are needed only for ONE of pe or pei, but don't
otherwise vary; peicode.h fixes up ifdefs but we provide the
prototype. */
-unsigned int _bfd_XX_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR));
-unsigned int _bfd_XXi_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR));
-bfd_boolean _bfd_XX_bfd_copy_private_section_data
- PARAMS ((bfd *, asection *, bfd *, asection *));
+unsigned _bfd_XX_only_swap_filehdr_out (bfd *, void *, void *);
+unsigned _bfd_XXi_only_swap_filehdr_out (bfd *, void *, void *);
+bfd_boolean _bfd_XX_bfd_copy_private_section_data (bfd *, asection *, bfd *, asection *);
-/* 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)
diff --git a/contrib/binutils/bfd/libxcoff.h b/contrib/binutils/bfd/libxcoff.h
index 8537617fcf15..78b5f5f8d003 100644
--- a/contrib/binutils/bfd/libxcoff.h
+++ b/contrib/binutils/bfd/libxcoff.h
@@ -1,5 +1,5 @@
/* BFD XCOFF object file private structure.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2005 Free Software Foundation, Inc.
Written by Tom Rix, Redhat.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef LIBXCOFF_H
#define LIBXCOFF_H
@@ -39,18 +39,12 @@ struct xcoff_backend_data_rec
long _xcoff_machine;
/* Function pointers to xcoff specific swap routines. */
- void (* _xcoff_swap_ldhdr_in)
- PARAMS ((bfd *, const PTR, struct internal_ldhdr *));
- void (* _xcoff_swap_ldhdr_out)
- PARAMS ((bfd *, const struct internal_ldhdr *, PTR));
- void (* _xcoff_swap_ldsym_in)
- PARAMS ((bfd *, const PTR, struct internal_ldsym *));
- void (* _xcoff_swap_ldsym_out)
- PARAMS ((bfd *, const struct internal_ldsym *, PTR));
- void (* _xcoff_swap_ldrel_in)
- PARAMS ((bfd *, const PTR, struct internal_ldrel *));
- void (* _xcoff_swap_ldrel_out)
- PARAMS ((bfd *, const struct internal_ldrel *, PTR));
+ void (* _xcoff_swap_ldhdr_in) (bfd *, const void *, struct internal_ldhdr *);
+ void (* _xcoff_swap_ldhdr_out)(bfd *, const struct internal_ldhdr *, void *);
+ void (* _xcoff_swap_ldsym_in) (bfd *, const void *, struct internal_ldsym *);
+ void (* _xcoff_swap_ldsym_out)(bfd *, const struct internal_ldsym *, void *);
+ void (* _xcoff_swap_ldrel_in) (bfd *, const void *, struct internal_ldrel *);
+ void (* _xcoff_swap_ldrel_out)(bfd *, const struct internal_ldrel *, void *);
/* Size of the external struct. */
unsigned int _xcoff_ldhdrsz;
@@ -69,33 +63,29 @@ struct xcoff_backend_data_rec
unsigned long _xcoff_ldhdr_version;
bfd_boolean (* _xcoff_put_symbol_name)
- PARAMS ((bfd *, struct bfd_strtab_hash *, struct internal_syment *,
- const char *));
+ (bfd *, struct bfd_strtab_hash *, struct internal_syment *,
+ const char *);
bfd_boolean (* _xcoff_put_ldsymbol_name)
- PARAMS ((bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
- const char *));
+ (bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
+ const char *);
reloc_howto_type *_xcoff_dynamic_reloc;
asection * (* _xcoff_create_csect_from_smclas)
- PARAMS ((bfd *, union internal_auxent *, const char *));
+ (bfd *, union internal_auxent *, const char *);
/* Line number and relocation overflow.
XCOFF32 overflows to another section when the line number or the
relocation count exceeds 0xffff. XCOFF64 does not overflow. */
- bfd_boolean (*_xcoff_is_lineno_count_overflow)
- PARAMS ((bfd *, bfd_vma));
- bfd_boolean (*_xcoff_is_reloc_count_overflow)
- PARAMS ((bfd *, bfd_vma));
+ bfd_boolean (*_xcoff_is_lineno_count_overflow) (bfd *, bfd_vma);
+ bfd_boolean (*_xcoff_is_reloc_count_overflow) (bfd *, bfd_vma);
/* Loader section symbol and relocation table offset
XCOFF32 is after the .loader header
XCOFF64 is offset in .loader header. */
- bfd_vma (*_xcoff_loader_symbol_offset)
- PARAMS ((bfd *, struct internal_ldhdr *));
- bfd_vma (*_xcoff_loader_reloc_offset)
- PARAMS ((bfd *, struct internal_ldhdr *));
+ bfd_vma (*_xcoff_loader_symbol_offset) (bfd *, struct internal_ldhdr *);
+ bfd_vma (*_xcoff_loader_reloc_offset) (bfd *, struct internal_ldhdr *);
/* Global linkage. The first word of global linkage code must be be
modified by filling in the correct TOC offset. */
@@ -107,7 +97,7 @@ struct xcoff_backend_data_rec
/* rtinit. */
unsigned int _xcoff_rtinit_size;
bfd_boolean (*_xcoff_generate_rtinit)
- PARAMS ((bfd *, const char *, const char *, bfd_boolean));
+ (bfd *, const char *, const char *, bfd_boolean);
};
/* Look up an entry in an XCOFF link hash table. */
@@ -120,7 +110,7 @@ struct xcoff_backend_data_rec
#define xcoff_link_hash_traverse(table, func, info) \
(bfd_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \
(info)))
/* Get the XCOFF link hash table from the info structure. This is
@@ -131,80 +121,80 @@ struct xcoff_backend_data_rec
#define xcoff_backend(abfd) \
((struct xcoff_backend_data_rec *) (abfd)->xvec->backend_data)
-#define bfd_xcoff_magic_number(a) ((xcoff_backend(a)->_xcoff_magic_number))
-#define bfd_xcoff_architecture(a) ((xcoff_backend(a)->_xcoff_architecture))
-#define bfd_xcoff_machine(a) ((xcoff_backend(a)->_xcoff_machine))
+#define bfd_xcoff_magic_number(a) ((xcoff_backend (a)->_xcoff_magic_number))
+#define bfd_xcoff_architecture(a) ((xcoff_backend (a)->_xcoff_architecture))
+#define bfd_xcoff_machine(a) ((xcoff_backend (a)->_xcoff_machine))
#define bfd_xcoff_swap_ldhdr_in(a, b, c) \
- ((xcoff_backend(a)->_xcoff_swap_ldhdr_in) ((a), (b), (c)))
+ ((xcoff_backend (a)->_xcoff_swap_ldhdr_in) ((a), (b), (c)))
#define bfd_xcoff_swap_ldhdr_out(a, b, c) \
- ((xcoff_backend(a)->_xcoff_swap_ldhdr_out) ((a), (b), (c)))
+ ((xcoff_backend (a)->_xcoff_swap_ldhdr_out) ((a), (b), (c)))
#define bfd_xcoff_swap_ldsym_in(a, b, c) \
- ((xcoff_backend(a)->_xcoff_swap_ldsym_in) ((a), (b), (c)))
+ ((xcoff_backend (a)->_xcoff_swap_ldsym_in) ((a), (b), (c)))
#define bfd_xcoff_swap_ldsym_out(a, b, c) \
- ((xcoff_backend(a)->_xcoff_swap_ldsym_out) ((a), (b), (c)))
+ ((xcoff_backend (a)->_xcoff_swap_ldsym_out) ((a), (b), (c)))
#define bfd_xcoff_swap_ldrel_in(a, b, c) \
- ((xcoff_backend(a)->_xcoff_swap_ldrel_in) ((a), (b), (c)))
+ ((xcoff_backend (a)->_xcoff_swap_ldrel_in) ((a), (b), (c)))
#define bfd_xcoff_swap_ldrel_out(a, b, c) \
- ((xcoff_backend(a)->_xcoff_swap_ldrel_out) ((a), (b), (c)))
+ ((xcoff_backend (a)->_xcoff_swap_ldrel_out) ((a), (b), (c)))
-#define bfd_xcoff_ldhdrsz(a) ((xcoff_backend(a)->_xcoff_ldhdrsz))
-#define bfd_xcoff_ldsymsz(a) ((xcoff_backend(a)->_xcoff_ldsymsz))
-#define bfd_xcoff_ldrelsz(a) ((xcoff_backend(a)->_xcoff_ldrelsz))
+#define bfd_xcoff_ldhdrsz(a) ((xcoff_backend (a)->_xcoff_ldhdrsz))
+#define bfd_xcoff_ldsymsz(a) ((xcoff_backend (a)->_xcoff_ldsymsz))
+#define bfd_xcoff_ldrelsz(a) ((xcoff_backend (a)->_xcoff_ldrelsz))
#define bfd_xcoff_function_descriptor_size(a) \
- ((xcoff_backend(a)->_xcoff_function_descriptor_size))
+ ((xcoff_backend (a)->_xcoff_function_descriptor_size))
#define bfd_xcoff_small_aout_header_size(a) \
- ((xcoff_backend(a)->_xcoff_small_aout_header_size))
+ ((xcoff_backend (a)->_xcoff_small_aout_header_size))
-#define bfd_xcoff_ldhdr_version(a) ((xcoff_backend(a)->_xcoff_ldhdr_version))
+#define bfd_xcoff_ldhdr_version(a) ((xcoff_backend (a)->_xcoff_ldhdr_version))
#define bfd_xcoff_put_symbol_name(a, b, c, d) \
- ((xcoff_backend(a)->_xcoff_put_symbol_name) ((a), (b), (c), (d)))
+ ((xcoff_backend (a)->_xcoff_put_symbol_name) ((a), (b), (c), (d)))
#define bfd_xcoff_put_ldsymbol_name(a, b, c, d) \
- ((xcoff_backend(a)->_xcoff_put_ldsymbol_name) ((a), (b), (c), (d)))
+ ((xcoff_backend (a)->_xcoff_put_ldsymbol_name) ((a), (b), (c), (d)))
/* Get the XCOFF hash table entries for a BFD. */
#define obj_xcoff_sym_hashes(bfd) \
((struct xcoff_link_hash_entry **) obj_coff_sym_hashes (bfd))
#define bfd_xcoff_dynamic_reloc_howto(a) \
- ((xcoff_backend(a)->_xcoff_dynamic_reloc))
+ ((xcoff_backend (a)->_xcoff_dynamic_reloc))
#define bfd_xcoff_create_csect_from_smclas(a, b, c) \
- ((xcoff_backend(a)->_xcoff_create_csect_from_smclas((a), (b), (c))))
+ ((xcoff_backend (a)->_xcoff_create_csect_from_smclas((a), (b), (c))))
#define bfd_xcoff_is_lineno_count_overflow(a, b) \
- ((xcoff_backend(a)->_xcoff_is_lineno_count_overflow((a), (b))))
+ ((xcoff_backend (a)->_xcoff_is_lineno_count_overflow((a), (b))))
#define bfd_xcoff_is_reloc_count_overflow(a, b) \
- ((xcoff_backend(a)->_xcoff_is_reloc_count_overflow((a), (b))))
+ ((xcoff_backend (a)->_xcoff_is_reloc_count_overflow((a), (b))))
#define bfd_xcoff_loader_symbol_offset(a, b) \
- ((xcoff_backend(a)->_xcoff_loader_symbol_offset((a), (b))))
+ ((xcoff_backend (a)->_xcoff_loader_symbol_offset((a), (b))))
#define bfd_xcoff_loader_reloc_offset(a, b) \
- ((xcoff_backend(a)->_xcoff_loader_reloc_offset((a), (b))))
+ ((xcoff_backend (a)->_xcoff_loader_reloc_offset((a), (b))))
-#define bfd_xcoff_glink_code(a, b) ((xcoff_backend(a)->_xcoff_glink_code[(b)]))
-#define bfd_xcoff_glink_code_size(a) ((xcoff_backend(a)->_xcoff_glink_size))
+#define bfd_xcoff_glink_code(a, b) ((xcoff_backend (a)->_xcoff_glink_code[(b)]))
+#define bfd_xcoff_glink_code_size(a) ((xcoff_backend (a)->_xcoff_glink_size))
/* Check for the magic number U803XTOCMAGIC or U64_TOCMAGIC for 64 bit
targets. */
#define bfd_xcoff_is_xcoff64(a) \
- ( (0x01EF == (bfd_xcoff_magic_number(a))) \
- || (0x01F7 == (bfd_xcoff_magic_number(a))))
+ ( (0x01EF == (bfd_xcoff_magic_number (a))) \
+ || (0x01F7 == (bfd_xcoff_magic_number (a))))
/* Check for the magic number U802TOMAGIC for 32 bit targets. */
-#define bfd_xcoff_is_xcoff32(a) (0x01DF == (bfd_xcoff_magic_number(a)))
+#define bfd_xcoff_is_xcoff32(a) (0x01DF == (bfd_xcoff_magic_number (a)))
-#define bfd_xcoff_rtinit_size(a) ((xcoff_backend(a)->_xcoff_rtinit_size))
-#define bfd_xcoff_generate_rtinit(a, b, c, d) ((xcoff_backend(a)->_xcoff_generate_rtinit ((a), (b), (c), (d))))
+#define bfd_xcoff_rtinit_size(a) ((xcoff_backend (a)->_xcoff_rtinit_size))
+#define bfd_xcoff_generate_rtinit(a, b, c, d) ((xcoff_backend (a)->_xcoff_generate_rtinit ((a), (b), (c), (d))))
/* Accessor macros for tdata. */
#define bfd_xcoff_text_align_power(a) ((xcoff_data (a)->text_align_power))
@@ -228,18 +218,18 @@ struct xcoff_backend_data_rec
bfd *, bfd_vma, bfd_vma, struct reloc_howto_struct *howto
extern bfd_boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
- PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
+ (XCOFF_RELOC_FUNCTION_ARGS);
extern bfd_boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW])
- PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
+ (XCOFF_COMPLAIN_FUNCTION_ARGS);
/* Relocation functions */
-bfd_boolean xcoff_reloc_type_noop PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
-bfd_boolean xcoff_reloc_type_fail PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
-bfd_boolean xcoff_reloc_type_pos PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
-bfd_boolean xcoff_reloc_type_neg PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
-bfd_boolean xcoff_reloc_type_rel PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
-bfd_boolean xcoff_reloc_type_toc PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
-bfd_boolean xcoff_reloc_type_ba PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
-bfd_boolean xcoff_reloc_type_crel PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
+bfd_boolean xcoff_reloc_type_noop (XCOFF_RELOC_FUNCTION_ARGS);
+bfd_boolean xcoff_reloc_type_fail (XCOFF_RELOC_FUNCTION_ARGS);
+bfd_boolean xcoff_reloc_type_pos (XCOFF_RELOC_FUNCTION_ARGS);
+bfd_boolean xcoff_reloc_type_neg (XCOFF_RELOC_FUNCTION_ARGS);
+bfd_boolean xcoff_reloc_type_rel (XCOFF_RELOC_FUNCTION_ARGS);
+bfd_boolean xcoff_reloc_type_toc (XCOFF_RELOC_FUNCTION_ARGS);
+bfd_boolean xcoff_reloc_type_ba (XCOFF_RELOC_FUNCTION_ARGS);
+bfd_boolean xcoff_reloc_type_crel (XCOFF_RELOC_FUNCTION_ARGS);
#endif /* LIBXCOFF_H */
diff --git a/contrib/binutils/bfd/linker.c b/contrib/binutils/bfd/linker.c
index 58befc3632e6..14eeae4df0c8 100644
--- a/contrib/binutils/bfd/linker.c
+++ b/contrib/binutils/bfd/linker.c
@@ -1,6 +1,6 @@
/* linker.c -- BFD linker routines
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006 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.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -309,7 +309,7 @@ SUBSUBSECTION
of the <<bfd>> structure.
Each section in the output file will have a list of
- <<link_order>> structures attached to the <<link_order_head>>
+ <<link_order>> structures attached to the <<map_head.link_order>>
field (the <<link_order>> structure is defined in
<<bfdlink.h>>). These structures describe how to create the
contents of the output section in terms of the contents of
@@ -455,7 +455,9 @@ _bfd_link_hash_newfunc (struct bfd_hash_entry *entry,
/* Initialize the local fields. */
h->type = bfd_link_hash_new;
- h->und_next = NULL;
+ memset (&h->u.undef.next, 0,
+ (sizeof (struct bfd_link_hash_entry)
+ - offsetof (struct bfd_link_hash_entry, u.undef.next)));
}
return entry;
@@ -470,14 +472,15 @@ _bfd_link_hash_table_init
bfd *abfd,
struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *))
+ const char *),
+ unsigned int entsize)
{
table->creator = abfd->xvec;
table->undefs = NULL;
table->undefs_tail = NULL;
table->type = bfd_link_generic_hash_table;
- return bfd_hash_table_init (&table->table, newfunc);
+ return bfd_hash_table_init (&table->table, newfunc, entsize);
}
/* Look up a symbol in a link hash table. If follow is TRUE, we
@@ -616,13 +619,52 @@ void
bfd_link_add_undef (struct bfd_link_hash_table *table,
struct bfd_link_hash_entry *h)
{
- BFD_ASSERT (h->und_next == NULL);
+ BFD_ASSERT (h->u.undef.next == NULL);
if (table->undefs_tail != NULL)
- table->undefs_tail->und_next = h;
+ table->undefs_tail->u.undef.next = h;
if (table->undefs == NULL)
table->undefs = h;
table->undefs_tail = h;
}
+
+/* The undefs list was designed so that in normal use we don't need to
+ remove entries. However, if symbols on the list are changed from
+ bfd_link_hash_undefined to either bfd_link_hash_undefweak or
+ bfd_link_hash_new for some reason, then they must be removed from the
+ list. Failure to do so might result in the linker attempting to add
+ the symbol to the list again at a later stage. */
+
+void
+bfd_link_repair_undef_list (struct bfd_link_hash_table *table)
+{
+ struct bfd_link_hash_entry **pun;
+
+ pun = &table->undefs;
+ while (*pun != NULL)
+ {
+ struct bfd_link_hash_entry *h = *pun;
+
+ if (h->type == bfd_link_hash_new
+ || h->type == bfd_link_hash_undefweak)
+ {
+ *pun = h->u.undef.next;
+ h->u.undef.next = NULL;
+ if (h == table->undefs_tail)
+ {
+ if (pun == &table->undefs)
+ table->undefs_tail = NULL;
+ else
+ /* pun points at an u.undef.next field. Go back to
+ the start of the link_hash_entry. */
+ table->undefs_tail = (struct bfd_link_hash_entry *)
+ ((char *) pun - ((char *) &h->u.undef.next - (char *) h));
+ break;
+ }
+ }
+ else
+ pun = &h->u.undef.next;
+ }
+}
/* Routine to create an entry in a generic link hash table. */
@@ -668,7 +710,8 @@ _bfd_generic_link_hash_table_create (bfd *abfd)
if (ret == NULL)
return NULL;
if (! _bfd_link_hash_table_init (&ret->root, abfd,
- _bfd_generic_link_hash_newfunc))
+ _bfd_generic_link_hash_newfunc,
+ sizeof (struct generic_link_hash_entry)))
{
free (ret);
return NULL;
@@ -860,9 +903,10 @@ archive_hash_table_init
(struct archive_hash_table *table,
struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *))
+ const char *),
+ unsigned int entsize)
{
- return bfd_hash_table_init (&table->table, newfunc);
+ return bfd_hash_table_init (&table->table, newfunc, entsize);
}
/* Look up an entry in an archive hash table. */
@@ -940,7 +984,8 @@ _bfd_generic_link_add_archive_symbols
/* In order to quickly determine whether an symbol is defined in
this archive, we build a hash table of the symbols. */
- if (! archive_hash_table_init (&arsym_hash, archive_hash_newfunc))
+ if (! archive_hash_table_init (&arsym_hash, archive_hash_newfunc,
+ sizeof (struct archive_hash_entry)))
return FALSE;
for (arsym = arsyms, indx = 0; arsym < arsym_end; arsym++, indx++)
{
@@ -990,9 +1035,9 @@ _bfd_generic_link_add_archive_symbols
us to lose track of whether the symbol has been
referenced). */
if (*pundef != info->hash->undefs_tail)
- *pundef = (*pundef)->und_next;
+ *pundef = (*pundef)->u.undef.next;
else
- pundef = &(*pundef)->und_next;
+ pundef = &(*pundef)->u.undef.next;
continue;
}
@@ -1015,7 +1060,7 @@ _bfd_generic_link_add_archive_symbols
}
if (arh == NULL)
{
- pundef = &(*pundef)->und_next;
+ pundef = &(*pundef)->u.undef.next;
continue;
}
}
@@ -1064,7 +1109,7 @@ _bfd_generic_link_add_archive_symbols
}
}
- pundef = &(*pundef)->und_next;
+ pundef = &(*pundef)->u.undef.next;
}
archive_hash_table_free (&arsym_hash);
@@ -1565,6 +1610,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
/* Make a new weak undefined symbol. */
h->type = bfd_link_hash_undefweak;
h->u.undef.abfd = abfd;
+ h->u.undef.weak = abfd;
break;
case CDEF:
@@ -1694,8 +1740,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
case REF:
/* A reference to a defined symbol. */
- if (h->und_next == NULL && info->hash->undefs_tail != h)
- h->und_next = h;
+ if (h->u.undef.next == NULL && info->hash->undefs_tail != h)
+ h->u.undef.next = h;
break;
case BIG:
@@ -1828,8 +1874,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
&& inh->u.i.link == h)
{
(*_bfd_error_handler)
- (_("%s: indirect symbol `%s' to `%s' is a loop"),
- bfd_archive_filename (abfd), name, string);
+ (_("%B: indirect symbol `%s' to `%s' is a loop"),
+ abfd, name, string);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
@@ -1881,8 +1927,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
case REFC:
/* A reference to an indirect symbol. */
- if (h->und_next == NULL && info->hash->undefs_tail != h)
- h->und_next = h;
+ if (h->u.undef.next == NULL && info->hash->undefs_tail != h)
+ h->u.undef.next = h;
h = h->u.i.link;
cycle = TRUE;
break;
@@ -1897,10 +1943,10 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
case CWARN:
/* Warn if this symbol has been referenced already,
otherwise add a warning. A symbol has been referenced if
- the und_next field is not NULL, or it is the tail of the
+ the u.undef.next field is not NULL, or it is the tail of the
undefined symbol list. The REF case above helps to
ensure this. */
- if (h->und_next != NULL || info->hash->undefs_tail == h)
+ if (h->u.undef.next != NULL || info->hash->undefs_tail == h)
{
if (! (*info->callbacks->warning) (info, string, h->root.string,
hash_entry_bfd (h), NULL, 0))
@@ -1967,7 +2013,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info)
/* Mark all sections which will be included in the output file. */
for (o = abfd->sections; o != NULL; o = o->next)
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
if (p->type == bfd_indirect_link_order)
p->u.indirect.section->linker_mark = TRUE;
@@ -1996,7 +2042,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info)
for (o = abfd->sections; o != NULL; o = o->next)
{
o->reloc_count = 0;
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
if (p->type == bfd_section_reloc_link_order
|| p->type == bfd_symbol_reloc_link_order)
@@ -2052,7 +2098,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info)
/* Handle all the link order information for the sections. */
for (o = abfd->sections; o != NULL; o = o->next)
{
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
{
switch (p->type)
{
@@ -2321,12 +2367,11 @@ _bfd_generic_link_output_symbols (bfd *output_bfd,
abort ();
/* If this symbol is in a section which is not being included
- in the output file, then we don't want to output the symbol.
-
- Gross. .bss and similar sections won't have the linker_mark
- field set. */
- if ((sym->section->flags & SEC_HAS_CONTENTS) != 0
- && ! sym->section->linker_mark)
+ in the output file, then we don't want to output the
+ symbol. */
+ if (!bfd_is_abs_section (sym->section)
+ && bfd_section_removed_from_list (output_bfd,
+ sym->section->output_section))
output = FALSE;
if (output)
@@ -2529,7 +2574,7 @@ _bfd_generic_reloc_link_order (bfd *abfd,
abort ();
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info,
+ (info, NULL,
(link_order->type == bfd_section_reloc_link_order
? bfd_section_name (abfd, link_order->u.reloc.p->u.section)
: link_order->u.reloc.p->u.name),
@@ -2570,11 +2615,11 @@ bfd_new_link_order (bfd *abfd, asection *section)
new->type = bfd_undefined_link_order;
- if (section->link_order_tail != NULL)
- section->link_order_tail->next = new;
+ if (section->map_tail.link_order != NULL)
+ section->map_tail.link_order->next = new;
else
- section->link_order_head = new;
- section->link_order_tail = new;
+ section->map_head.link_order = new;
+ section->map_tail.link_order = new;
return new;
}
@@ -2676,15 +2721,14 @@ default_indirect_link_order (bfd *output_bfd,
BFD_ASSERT ((output_section->flags & SEC_HAS_CONTENTS) != 0);
- if (link_order->size == 0)
- return TRUE;
-
input_section = link_order->u.indirect.section;
input_bfd = input_section->owner;
+ if (input_section->size == 0)
+ return TRUE;
BFD_ASSERT (input_section->output_section == output_section);
BFD_ASSERT (input_section->output_offset == link_order->offset);
- BFD_ASSERT (input_section->_cooked_size == link_order->size);
+ BFD_ASSERT (input_section->size == link_order->size);
if (info->relocatable
&& input_section->reloc_count > 0
@@ -2756,7 +2800,9 @@ default_indirect_link_order (bfd *output_bfd,
}
/* Get and relocate the section contents. */
- sec_size = bfd_section_size (input_bfd, input_section);
+ sec_size = (input_section->rawsize > input_section->size
+ ? input_section->rawsize
+ : input_section->size);
contents = bfd_malloc (sec_size);
if (contents == NULL && sec_size != 0)
goto error_return;
@@ -2767,9 +2813,9 @@ default_indirect_link_order (bfd *output_bfd,
goto error_return;
/* Output the section contents. */
- loc = link_order->offset * bfd_octets_per_byte (output_bfd);
+ loc = input_section->output_offset * bfd_octets_per_byte (output_bfd);
if (! bfd_set_section_contents (output_bfd, output_section,
- new_contents, loc, link_order->size))
+ new_contents, loc, input_section->size))
goto error_return;
if (contents != NULL)
@@ -2825,3 +2871,238 @@ _bfd_generic_link_split_section (bfd *abfd ATTRIBUTE_UNUSED,
{
return FALSE;
}
+
+/*
+FUNCTION
+ bfd_section_already_linked
+
+SYNOPSIS
+ void bfd_section_already_linked (bfd *abfd, asection *sec);
+
+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))
+.
+
+*/
+
+/* Sections marked with the SEC_LINK_ONCE flag should only be linked
+ once into the output. This routine checks each section, and
+ arrange to discard it if a section of the same name has already
+ been linked. This code assumes that all relevant sections have the
+ SEC_LINK_ONCE flag set; that is, it does not depend solely upon the
+ section name. bfd_section_already_linked is called via
+ bfd_map_over_sections. */
+
+/* The hash table. */
+
+static struct bfd_hash_table _bfd_section_already_linked_table;
+
+/* Support routines for the hash table used by section_already_linked,
+ initialize the table, traverse, lookup, fill in an entry and remove
+ the table. */
+
+void
+bfd_section_already_linked_table_traverse
+ (bfd_boolean (*func) (struct bfd_section_already_linked_hash_entry *,
+ void *), void *info)
+{
+ bfd_hash_traverse (&_bfd_section_already_linked_table,
+ (bfd_boolean (*) (struct bfd_hash_entry *,
+ void *)) func,
+ info);
+}
+
+struct bfd_section_already_linked_hash_entry *
+bfd_section_already_linked_table_lookup (const char *name)
+{
+ return ((struct bfd_section_already_linked_hash_entry *)
+ bfd_hash_lookup (&_bfd_section_already_linked_table, name,
+ TRUE, FALSE));
+}
+
+void
+bfd_section_already_linked_table_insert
+ (struct bfd_section_already_linked_hash_entry *already_linked_list,
+ asection *sec)
+{
+ struct bfd_section_already_linked *l;
+
+ /* Allocate the memory from the same obstack as the hash table is
+ kept in. */
+ l = bfd_hash_allocate (&_bfd_section_already_linked_table, sizeof *l);
+ l->sec = sec;
+ l->next = already_linked_list->entry;
+ already_linked_list->entry = l;
+}
+
+static struct bfd_hash_entry *
+already_linked_newfunc (struct bfd_hash_entry *entry ATTRIBUTE_UNUSED,
+ struct bfd_hash_table *table,
+ const char *string ATTRIBUTE_UNUSED)
+{
+ struct bfd_section_already_linked_hash_entry *ret =
+ bfd_hash_allocate (table, sizeof *ret);
+
+ ret->entry = NULL;
+
+ return &ret->root;
+}
+
+bfd_boolean
+bfd_section_already_linked_table_init (void)
+{
+ return bfd_hash_table_init_n (&_bfd_section_already_linked_table,
+ already_linked_newfunc,
+ sizeof (struct bfd_section_already_linked_hash_entry),
+ 42);
+}
+
+void
+bfd_section_already_linked_table_free (void)
+{
+ bfd_hash_table_free (&_bfd_section_already_linked_table);
+}
+
+/* This is used on non-ELF inputs. */
+
+void
+_bfd_generic_section_already_linked (bfd *abfd, asection *sec)
+{
+ flagword flags;
+ const char *name;
+ struct bfd_section_already_linked *l;
+ struct bfd_section_already_linked_hash_entry *already_linked_list;
+
+ flags = sec->flags;
+ if ((flags & SEC_LINK_ONCE) == 0)
+ return;
+
+ /* FIXME: When doing a relocatable link, we may have trouble
+ copying relocations in other sections that refer to local symbols
+ in the section being discarded. Those relocations will have to
+ be converted somehow; as of this writing I'm not sure that any of
+ the backends handle that correctly.
+
+ It is tempting to instead not discard link once sections when
+ doing a relocatable link (technically, they should be discarded
+ whenever we are building constructors). However, that fails,
+ because the linker winds up combining all the link once sections
+ into a single large link once section, which defeats the purpose
+ of having link once sections in the first place. */
+
+ name = bfd_get_section_name (abfd, sec);
+
+ already_linked_list = bfd_section_already_linked_table_lookup (name);
+
+ for (l = already_linked_list->entry; l != NULL; l = l->next)
+ {
+ bfd_boolean skip = FALSE;
+ struct coff_comdat_info *s_comdat
+ = bfd_coff_get_comdat_section (abfd, sec);
+ struct coff_comdat_info *l_comdat
+ = bfd_coff_get_comdat_section (l->sec->owner, l->sec);
+
+ /* We may have 3 different sections on the list: group section,
+ comdat section and linkonce section. SEC may be a linkonce or
+ comdat section. We always ignore group section. For non-COFF
+ inputs, we also ignore comdat section.
+
+ FIXME: Is that safe to match a linkonce section with a comdat
+ section for COFF inputs? */
+ if ((l->sec->flags & SEC_GROUP) != 0)
+ skip = TRUE;
+ else if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
+ {
+ if (s_comdat != NULL
+ && l_comdat != NULL
+ && strcmp (s_comdat->name, l_comdat->name) != 0)
+ skip = TRUE;
+ }
+ else if (l_comdat != NULL)
+ skip = TRUE;
+
+ if (!skip)
+ {
+ /* The section has already been linked. See if we should
+ issue a warning. */
+ switch (flags & SEC_LINK_DUPLICATES)
+ {
+ default:
+ abort ();
+
+ case SEC_LINK_DUPLICATES_DISCARD:
+ break;
+
+ case SEC_LINK_DUPLICATES_ONE_ONLY:
+ (*_bfd_error_handler)
+ (_("%B: warning: ignoring duplicate section `%A'\n"),
+ abfd, sec);
+ break;
+
+ case SEC_LINK_DUPLICATES_SAME_CONTENTS:
+ /* FIXME: We should really dig out the contents of both
+ sections and memcmp them. The COFF/PE spec says that
+ the Microsoft linker does not implement this
+ correctly, so I'm not going to bother doing it
+ either. */
+ /* Fall through. */
+ case SEC_LINK_DUPLICATES_SAME_SIZE:
+ if (sec->size != l->sec->size)
+ (*_bfd_error_handler)
+ (_("%B: warning: duplicate section `%A' has different size\n"),
+ abfd, sec);
+ break;
+ }
+
+ /* Set the output_section field so that lang_add_section
+ does not create a lang_input_section structure for this
+ section. Since there might be a symbol in the section
+ being discarded, we must retain a pointer to the section
+ which we are really going to use. */
+ sec->output_section = bfd_abs_section_ptr;
+ sec->kept_section = l->sec;
+
+ return;
+ }
+ }
+
+ /* This is the first section with this name. Record it. */
+ bfd_section_already_linked_table_insert (already_linked_list, sec);
+}
+
+/* Convert symbols in excluded output sections to absolute. */
+
+static bfd_boolean
+fix_syms (struct bfd_link_hash_entry *h, void *data)
+{
+ bfd *obfd = (bfd *) data;
+
+ if (h->type == bfd_link_hash_warning)
+ h = h->u.i.link;
+
+ if (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak)
+ {
+ asection *s = h->u.def.section;
+ if (s != NULL
+ && s->output_section != NULL
+ && (s->output_section->flags & SEC_EXCLUDE) != 0
+ && bfd_section_removed_from_list (obfd, s->output_section))
+ {
+ h->u.def.value += s->output_offset + s->output_section->vma;
+ h->u.def.section = bfd_abs_section_ptr;
+ }
+ }
+
+ return TRUE;
+}
+
+void
+_bfd_fix_excluded_sec_syms (bfd *obfd, struct bfd_link_info *info)
+{
+ bfd_link_hash_traverse (info->hash, fix_syms, obfd);
+}
diff --git a/contrib/binutils/bfd/merge.c b/contrib/binutils/bfd/merge.c
index 89f45cd521a2..c1795d29112f 100644
--- a/contrib/binutils/bfd/merge.c
+++ b/contrib/binutils/bfd/merge.c
@@ -1,5 +1,6 @@
/* SEC_MERGE support.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file contains support for merging duplicate entities within sections,
as used in ELF SHF_MERGE. */
@@ -90,7 +91,7 @@ struct sec_merge_sec_info
/* A hash table used to hold section content. */
struct sec_merge_hash *htab;
/* First string in this section. */
- struct sec_merge_hash_entry *first;
+ struct sec_merge_hash_entry *first_str;
/* Original section content. */
unsigned char contents[1];
};
@@ -102,30 +103,28 @@ static struct bfd_hash_entry *
sec_merge_hash_newfunc (struct bfd_hash_entry *entry,
struct bfd_hash_table *table, const char *string)
{
- struct sec_merge_hash_entry *ret = (struct sec_merge_hash_entry *) entry;
-
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct sec_merge_hash_entry *) NULL)
- ret = ((struct sec_merge_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct sec_merge_hash_entry)));
- if (ret == (struct sec_merge_hash_entry *) NULL)
+ if (entry == NULL)
+ entry = bfd_hash_allocate (table, sizeof (struct sec_merge_hash_entry));
+ if (entry == NULL)
return NULL;
/* Call the allocation method of the superclass. */
- ret = ((struct sec_merge_hash_entry *)
- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
+ entry = bfd_hash_newfunc (entry, table, string);
- if (ret)
+ if (entry != NULL)
{
/* Initialize the local fields. */
+ struct sec_merge_hash_entry *ret = (struct sec_merge_hash_entry *) entry;
+
ret->u.suffix = NULL;
ret->alignment = 0;
ret->secinfo = NULL;
ret->next = NULL;
}
- return (struct bfd_hash_entry *) ret;
+ return entry;
}
/* Look up an entry in a section merge hash table. */
@@ -192,7 +191,7 @@ sec_merge_hash_lookup (struct sec_merge_hash *table, const char *string,
index = hash % table->table.size;
for (hashp = (struct sec_merge_hash_entry *) table->table.table[index];
- hashp != (struct sec_merge_hash_entry *) NULL;
+ hashp != NULL;
hashp = (struct sec_merge_hash_entry *) hashp->root.next)
{
if (hashp->root.hash == hash
@@ -216,13 +215,12 @@ sec_merge_hash_lookup (struct sec_merge_hash *table, const char *string,
}
if (! create)
- return (struct sec_merge_hash_entry *) NULL;
+ return NULL;
- hashp = (struct sec_merge_hash_entry *)
- sec_merge_hash_newfunc ((struct bfd_hash_entry *) NULL,
- (struct bfd_hash_table *) table, string);
- if (hashp == (struct sec_merge_hash_entry *) NULL)
- return (struct sec_merge_hash_entry *) NULL;
+ hashp = ((struct sec_merge_hash_entry *)
+ sec_merge_hash_newfunc (NULL, &table->table, string));
+ if (hashp == NULL)
+ return NULL;
hashp->root.string = string;
hashp->root.hash = hash;
hashp->len = len;
@@ -239,13 +237,13 @@ static struct sec_merge_hash *
sec_merge_init (unsigned int entsize, bfd_boolean strings)
{
struct sec_merge_hash *table;
- bfd_size_type amt = sizeof (struct sec_merge_hash);
- table = (struct sec_merge_hash *) bfd_malloc (amt);
+ table = bfd_malloc (sizeof (struct sec_merge_hash));
if (table == NULL)
return NULL;
- if (! bfd_hash_table_init (&table->table, sec_merge_hash_newfunc))
+ if (! bfd_hash_table_init_n (&table->table, sec_merge_hash_newfunc,
+ sizeof (struct sec_merge_hash_entry), 16699))
{
free (table);
return NULL;
@@ -292,56 +290,73 @@ sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry)
{
struct sec_merge_sec_info *secinfo = entry->secinfo;
asection *sec = secinfo->sec;
- char *pad = "";
+ char *pad = NULL;
bfd_size_type off = 0;
- int alignment_power = bfd_get_section_alignment (abfd, sec->output_section);
+ int alignment_power = sec->output_section->alignment_power;
if (alignment_power)
- pad = bfd_zmalloc ((bfd_size_type) 1 << alignment_power);
+ {
+ pad = bfd_zmalloc ((bfd_size_type) 1 << alignment_power);
+ if (pad == NULL)
+ return FALSE;
+ }
for (; entry != NULL && entry->secinfo == secinfo; entry = entry->next)
{
- register const char *str;
- register size_t len;
+ const char *str;
+ bfd_size_type len;
- len = off & (entry->alignment - 1);
- if (len)
+ len = -off & (entry->alignment - 1);
+ if (len != 0)
{
- len = entry->alignment - len;
- if (bfd_bwrite (pad, (bfd_size_type) len, abfd) != len)
- break;
+ if (bfd_bwrite (pad, len, abfd) != len)
+ goto err;
off += len;
}
str = entry->root.string;
len = entry->len;
- if (bfd_bwrite (str, (bfd_size_type) len, abfd) != len)
- break;
+ if (bfd_bwrite (str, len, abfd) != len)
+ goto err;
off += len;
}
- if (alignment_power)
+ /* Trailing alignment needed? */
+ off = sec->size - off;
+ if (off != 0
+ && bfd_bwrite (pad, off, abfd) != off)
+ goto err;
+
+ if (pad != NULL)
free (pad);
+ return TRUE;
- return entry == NULL || entry->secinfo != secinfo;
+ err:
+ if (pad != NULL)
+ free (pad);
+ return FALSE;
}
-/* This function is called for each input file from the add_symbols
- pass of the linker. */
+/* Register a SEC_MERGE section as a candidate for merging.
+ This function is called for all non-dynamic SEC_MERGE input sections. */
bfd_boolean
-_bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
+_bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec,
+ void **psecinfo)
{
struct sec_merge_info *sinfo;
struct sec_merge_sec_info *secinfo;
unsigned int align;
bfd_size_type amt;
- if (sec->_raw_size == 0
- || (sec->flags & SEC_EXCLUDE)
- || (sec->flags & SEC_MERGE) == 0
+ if ((abfd->flags & DYNAMIC) != 0
+ || (sec->flags & SEC_MERGE) == 0)
+ abort ();
+
+ if (sec->size == 0
+ || (sec->flags & SEC_EXCLUDE) != 0
|| sec->entsize == 0)
return TRUE;
@@ -351,12 +366,12 @@ _bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
return TRUE;
}
- align = bfd_get_section_alignment (sec->owner, sec);
- if ((sec->entsize < (unsigned int)(1 << align)
+ align = sec->alignment_power;
+ if ((sec->entsize < (unsigned) 1 << align
&& ((sec->entsize & (sec->entsize - 1))
|| !(sec->flags & SEC_STRINGS)))
- || (sec->entsize > (unsigned int)(1 << align)
- && (sec->entsize & ((1 << align) - 1))))
+ || (sec->entsize > (unsigned) 1 << align
+ && (sec->entsize & (((unsigned) 1 << align) - 1))))
{
/* Sanity check. If string character size is smaller than
alignment, then we require character size to be a power
@@ -371,14 +386,14 @@ _bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
if ((secinfo = sinfo->chain)
&& ! ((secinfo->sec->flags ^ sec->flags) & (SEC_MERGE | SEC_STRINGS))
&& secinfo->sec->entsize == sec->entsize
- && ! strcmp (secinfo->sec->name, sec->name))
+ && secinfo->sec->alignment_power == sec->alignment_power
+ && secinfo->sec->output_section == sec->output_section)
break;
if (sinfo == NULL)
{
/* Initialize the information we need to keep track of. */
- amt = sizeof (struct sec_merge_info);
- sinfo = (struct sec_merge_info *) bfd_alloc (abfd, amt);
+ sinfo = bfd_alloc (abfd, sizeof (struct sec_merge_info));
if (sinfo == NULL)
goto error_return;
sinfo->next = (struct sec_merge_info *) *psinfo;
@@ -391,12 +406,12 @@ _bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
/* Read the section from abfd. */
- amt = sizeof (struct sec_merge_sec_info) + sec->_raw_size - 1;
+ amt = sizeof (struct sec_merge_sec_info) + sec->size - 1;
*psecinfo = bfd_alloc (abfd, amt);
if (*psecinfo == NULL)
goto error_return;
- secinfo = (struct sec_merge_sec_info *)*psecinfo;
+ secinfo = (struct sec_merge_sec_info *) *psecinfo;
if (sinfo->chain)
{
secinfo->next = sinfo->chain->next;
@@ -408,10 +423,11 @@ _bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
secinfo->sec = sec;
secinfo->psecinfo = psecinfo;
secinfo->htab = sinfo->htab;
- secinfo->first = NULL;
+ secinfo->first_str = NULL;
+ sec->rawsize = sec->size;
if (! bfd_get_section_contents (sec->owner, sec, secinfo->contents,
- (bfd_vma) 0, sec->_raw_size))
+ 0, sec->size))
goto error_return;
return TRUE;
@@ -433,8 +449,8 @@ record_section (struct sec_merge_info *sinfo,
bfd_vma mask, eltalign;
unsigned int align, i;
- align = bfd_get_section_alignment (sec->owner, sec);
- end = secinfo->contents + sec->_raw_size;
+ align = sec->alignment_power;
+ end = secinfo->contents + sec->size;
nul = FALSE;
mask = ((bfd_vma) 1 << align) - 1;
if (sec->flags & SEC_STRINGS)
@@ -445,7 +461,8 @@ record_section (struct sec_merge_info *sinfo,
eltalign = ((eltalign ^ (eltalign - 1)) + 1) >> 1;
if (!eltalign || eltalign > mask)
eltalign = mask + 1;
- entry = sec_merge_add (sinfo->htab, p, (unsigned) eltalign, secinfo);
+ entry = sec_merge_add (sinfo->htab, (char *) p, (unsigned) eltalign,
+ secinfo);
if (! entry)
goto error_return;
p += entry->len;
@@ -476,7 +493,7 @@ record_section (struct sec_merge_info *sinfo,
if (!nul && !((p - secinfo->contents) & mask))
{
nul = TRUE;
- entry = sec_merge_add (sinfo->htab, p,
+ entry = sec_merge_add (sinfo->htab, (char *) p,
(unsigned) mask + 1, secinfo);
if (! entry)
goto error_return;
@@ -490,7 +507,7 @@ record_section (struct sec_merge_info *sinfo,
{
for (p = secinfo->contents; p < end; p += sec->entsize)
{
- entry = sec_merge_add (sinfo->htab, p, 1, secinfo);
+ entry = sec_merge_add (sinfo->htab, (char *) p, 1, secinfo);
if (! entry)
goto error_return;
}
@@ -511,8 +528,8 @@ strrevcmp (const void *a, const void *b)
struct sec_merge_hash_entry *B = *(struct sec_merge_hash_entry **) b;
unsigned int lenA = A->len;
unsigned int lenB = B->len;
- const unsigned char *s = A->root.string + lenA - 1;
- const unsigned char *t = B->root.string + lenB - 1;
+ const unsigned char *s = (const unsigned char *) A->root.string + lenA - 1;
+ const unsigned char *t = (const unsigned char *) B->root.string + lenB - 1;
int l = lenA < lenB ? lenA : lenB;
while (l)
@@ -536,8 +553,8 @@ strrevcmp_align (const void *a, const void *b)
struct sec_merge_hash_entry *B = *(struct sec_merge_hash_entry **) b;
unsigned int lenA = A->len;
unsigned int lenB = B->len;
- const unsigned char *s = A->root.string + lenA - 1;
- const unsigned char *t = B->root.string + lenB - 1;
+ const unsigned char *s = (const unsigned char *) A->root.string + lenA - 1;
+ const unsigned char *t = (const unsigned char *) B->root.string + lenB - 1;
int l = lenA < lenB ? lenA : lenB;
int tail_align = (lenA & (A->alignment - 1)) - (lenB & (A->alignment - 1));
@@ -580,7 +597,7 @@ merge_strings (struct sec_merge_info *sinfo)
/* Now sort the strings */
amt = sinfo->htab->size * sizeof (struct sec_merge_hash_entry *);
- array = (struct sec_merge_hash_entry **) bfd_malloc (amt);
+ array = bfd_malloc (amt);
if (array == NULL)
goto alloc_failure;
@@ -638,14 +655,14 @@ alloc_failure:
{
if (e->secinfo != secinfo)
{
- secinfo->sec->_cooked_size = size;
+ secinfo->sec->size = size;
secinfo = e->secinfo;
}
if (e->alignment)
{
- if (e->secinfo->first == NULL)
+ if (e->secinfo->first_str == NULL)
{
- e->secinfo->first = e;
+ e->secinfo->first_str = e;
size = 0;
}
size = (size + e->alignment - 1) & ~((bfd_vma) e->alignment - 1);
@@ -653,7 +670,12 @@ alloc_failure:
size += e->len;
}
}
- secinfo->sec->_cooked_size = size;
+ secinfo->sec->size = size;
+ if (secinfo->sec->alignment_power != 0)
+ {
+ bfd_size_type align = (bfd_size_type) 1 << secinfo->sec->alignment_power;
+ secinfo->sec->size = (secinfo->sec->size + align - 1) & -align;
+ }
/* And now adjust the rest, removing them from the chain (but not hashtable)
at the same time. */
@@ -676,7 +698,9 @@ alloc_failure:
with _bfd_merge_section. */
bfd_boolean
-_bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, void *xsinfo,
+_bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ void *xsinfo,
void (*remove_hook) (bfd *, asection *))
{
struct sec_merge_info *sinfo;
@@ -722,11 +746,11 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, void *xsinfo,
secinfo = NULL;
for (e = sinfo->htab->first; e; e = e->next)
{
- if (e->secinfo->first == NULL)
+ if (e->secinfo->first_str == NULL)
{
if (secinfo)
- secinfo->sec->_cooked_size = size;
- e->secinfo->first = e;
+ secinfo->sec->size = size;
+ e->secinfo->first_str = e;
size = 0;
}
size = (size + e->alignment - 1)
@@ -735,17 +759,14 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, void *xsinfo,
size += e->len;
secinfo = e->secinfo;
}
- secinfo->sec->_cooked_size = size;
+ secinfo->sec->size = size;
}
/* Finally remove all input sections which have not made it into
the hash table at all. */
for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
- if (secinfo->first == NULL)
- {
- secinfo->sec->_cooked_size = 0;
- secinfo->sec->flags |= SEC_EXCLUDE;
- }
+ if (secinfo->first_str == NULL)
+ secinfo->sec->flags |= SEC_EXCLUDE;
}
return TRUE;
@@ -761,14 +782,14 @@ _bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo)
secinfo = (struct sec_merge_sec_info *) psecinfo;
- if (!secinfo->first)
+ if (secinfo->first_str == NULL)
return TRUE;
pos = sec->output_section->filepos + sec->output_offset;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0)
return FALSE;
- if (! sec_merge_emit (output_bfd, secinfo->first))
+ if (! sec_merge_emit (output_bfd, secinfo->first_str))
return FALSE;
return TRUE;
@@ -780,7 +801,7 @@ _bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo)
bfd_vma
_bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
- void *psecinfo, bfd_vma offset, bfd_vma addend)
+ void *psecinfo, bfd_vma offset)
{
struct sec_merge_sec_info *secinfo;
struct sec_merge_hash_entry *entry;
@@ -789,30 +810,29 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
secinfo = (struct sec_merge_sec_info *) psecinfo;
- if (offset + addend >= sec->_raw_size)
+ if (offset >= sec->rawsize)
{
- if (offset + addend > sec->_raw_size)
+ if (offset > sec->rawsize)
{
(*_bfd_error_handler)
- (_("%s: access beyond end of merged section (%ld + %ld)"),
- bfd_get_filename (sec->owner), (long) offset, (long) addend);
+ (_("%s: access beyond end of merged section (%ld)"),
+ bfd_get_filename (sec->owner), (long) offset);
}
- return (secinfo->first ? sec->_cooked_size : 0);
+ return secinfo->first_str ? sec->size : 0;
}
if (secinfo->htab->strings)
{
if (sec->entsize == 1)
{
- p = secinfo->contents + offset + addend - 1;
+ p = secinfo->contents + offset - 1;
while (p >= secinfo->contents && *p)
--p;
++p;
}
else
{
- p = secinfo->contents
- + ((offset + addend) / sec->entsize) * sec->entsize;
+ p = secinfo->contents + (offset / sec->entsize) * sec->entsize;
p -= sec->entsize;
while (p >= secinfo->contents)
{
@@ -830,10 +850,9 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
}
else
{
- p = secinfo->contents
- + ((offset + addend) / sec->entsize) * sec->entsize;
+ p = secinfo->contents + (offset / sec->entsize) * sec->entsize;
}
- entry = sec_merge_hash_lookup (secinfo->htab, p, 0, FALSE);
+ entry = sec_merge_hash_lookup (secinfo->htab, (char *) p, 0, FALSE);
if (!entry)
{
if (! secinfo->htab->strings)
@@ -845,9 +864,8 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
if (! secinfo->htab->first)
abort ();
entry = secinfo->htab->first;
- p = secinfo->contents
- + ((offset + addend) / sec->entsize + 1) * sec->entsize
- - entry->len;
+ p = (secinfo->contents + (offset / sec->entsize + 1) * sec->entsize
+ - entry->len);
}
*psec = entry->secinfo->sec;
diff --git a/contrib/binutils/bfd/mipsbsd.c b/contrib/binutils/bfd/mipsbsd.c
index cb2050f557f4..b8621e486ae1 100644
--- a/contrib/binutils/bfd/mipsbsd.c
+++ b/contrib/binutils/bfd/mipsbsd.c
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* #define ENTRY_CAN_BE_ZERO */
#define N_HEADER_IN_TEXT(x) 1
@@ -115,7 +115,6 @@ MY (choose_reloc_size) (abfd)
switch (bfd_get_arch (abfd))
{
case bfd_arch_sparc:
- case bfd_arch_a29k:
case bfd_arch_mips:
obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
break;
@@ -157,9 +156,6 @@ MY (write_object_contents) (abfd)
case bfd_arch_i386:
N_SET_MACHTYPE (*execp, M_386);
break;
- case bfd_arch_a29k:
- N_SET_MACHTYPE (*execp, M_29K);
- break;
case bfd_arch_mips:
switch (bfd_get_mach (abfd))
{
diff --git a/contrib/binutils/bfd/netbsd-core.c b/contrib/binutils/bfd/netbsd-core.c
index 84f2ad7eb5b2..e9111a985010 100644
--- a/contrib/binutils/bfd/netbsd-core.c
+++ b/contrib/binutils/bfd/netbsd-core.c
@@ -1,78 +1,71 @@
/* BFD back end for NetBSD style core files
Copyright 1988, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004
+ 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Paul Kranenburg, EUR
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
-#include "libaout.h" /* BFD a.out internal data structures */
+#include "libaout.h" /* BFD a.out internal data structures. */
#include <sys/param.h>
#include <sys/dir.h>
#include <signal.h>
#include <sys/core.h>
-/*
- * FIXME: On NetBSD/sparc CORE_FPU_OFFSET should be (sizeof (struct trapframe))
- */
+/* The machine ID for OpenBSD/sparc64 and older versions of
+ NetBSD/sparc64 overlaps with M_MIPS1. */
+#define M_SPARC64_OPENBSD M_MIPS1
/* Offset of StackGhost cookie within `struct md_coredump' on
OpenBSD/sparc. */
-#define CORE_WCOOKIE_OFFSET 344
+#define SPARC_WCOOKIE_OFFSET 344
-struct netbsd_core_struct {
- struct core core;
-} *rawptr;
+/* Offset of StackGhost cookie within `struct md_coredump' on
+ OpenBSD/sparc64. */
+#define SPARC64_WCOOKIE_OFFSET 832
-/* forward declarations */
+#define netbsd_core_file_matches_executable_p generic_core_file_matches_executable_p
-static const bfd_target *netbsd_core_file_p
- PARAMS ((bfd *abfd));
-static char *netbsd_core_file_failing_command
- PARAMS ((bfd *abfd));
-static int netbsd_core_file_failing_signal
- PARAMS ((bfd *abfd));
-static bfd_boolean netbsd_core_file_matches_executable_p
- PARAMS ((bfd *core_bfd, bfd *exec_bfd));
-static void swap_abort
- PARAMS ((void));
+struct netbsd_core_struct
+{
+ struct core core;
+} *rawptr;
/* Handle NetBSD-style core dump file. */
static const bfd_target *
-netbsd_core_file_p (abfd)
- bfd *abfd;
-
+netbsd_core_file_p (bfd *abfd)
{
- int i, val;
+ int val;
+ unsigned i;
file_ptr offset;
- asection *asect, *asect2;
+ asection *asect;
struct core core;
struct coreseg coreseg;
bfd_size_type amt = sizeof core;
- val = bfd_bread ((void *) &core, amt, abfd);
+ val = bfd_bread (&core, amt, abfd);
if (val != sizeof core)
{
- /* Too small to be a core file */
+ /* Too small to be a core file. */
bfd_set_error (bfd_error_wrong_format);
return 0;
}
@@ -100,7 +93,7 @@ netbsd_core_file_p (abfd)
if (bfd_seek (abfd, offset, SEEK_SET) != 0)
goto punt;
- val = bfd_bread ((void *) &coreseg, (bfd_size_type) sizeof coreseg, abfd);
+ val = bfd_bread (&coreseg, sizeof coreseg, abfd);
if (val != sizeof coreseg)
{
bfd_set_error (bfd_error_file_truncated);
@@ -138,49 +131,98 @@ netbsd_core_file_p (abfd)
goto punt;
asect->flags = flags;
- asect->_raw_size = coreseg.c_size;
+ asect->size = coreseg.c_size;
asect->vma = coreseg.c_addr;
asect->filepos = offset;
asect->alignment_power = 2;
- if (CORE_GETMID (core) == M_SPARC_NETBSD
- && CORE_GETFLAG (coreseg) == CORE_CPU
- && coreseg.c_size > CORE_WCOOKIE_OFFSET)
+ if (CORE_GETFLAG (coreseg) == CORE_CPU)
{
- /* Truncate the .reg section. */
- asect->_raw_size = CORE_WCOOKIE_OFFSET;
-
- /* And create the .wcookie section. */
- asect = bfd_make_section_anyway (abfd, ".wcookie");
- if (asect == NULL)
- goto punt;
-
- asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
- asect->_raw_size = 4;
- asect->vma = 0;
- asect->filepos = offset + CORE_WCOOKIE_OFFSET;
- asect->alignment_power = 2;
+ bfd_size_type wcookie_offset;
+
+ switch (CORE_GETMID (core))
+ {
+ case M_SPARC_NETBSD:
+ wcookie_offset = SPARC_WCOOKIE_OFFSET;
+ break;
+ case M_SPARC64_OPENBSD:
+ wcookie_offset = SPARC64_WCOOKIE_OFFSET;
+ break;
+ default:
+ wcookie_offset = 0;
+ break;
+ }
+
+ if (wcookie_offset > 0 && coreseg.c_size > wcookie_offset)
+ {
+ /* Truncate the .reg section. */
+ asect->size = wcookie_offset;
+
+ /* And create the .wcookie section. */
+ asect = bfd_make_section_anyway (abfd, ".wcookie");
+ 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;
+ asect->alignment_power = 2;
+ }
}
offset += coreseg.c_size;
+ }
-#ifdef CORE_FPU_OFFSET
- switch (CORE_GETFLAG (coreseg))
- {
- case CORE_CPU:
- /* Hackish... */
- asect->_raw_size = CORE_FPU_OFFSET;
- asect2 = bfd_make_section_anyway (abfd, ".reg2");
- if (asect2 == NULL)
- goto punt;
- asect2->_raw_size = coreseg.c_size - CORE_FPU_OFFSET;
- asect2->vma = 0;
- asect2->filepos = asect->filepos + CORE_FPU_OFFSET;
- asect2->alignment_power = 2;
- asect2->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
- break;
- }
-#endif
+ /* Set architecture from machine ID. */
+ switch (CORE_GETMID (core))
+ {
+ case M_ALPHA_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_alpha, 0);
+ break;
+
+ case M_ARM6_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_arm, bfd_mach_arm_3);
+ break;
+
+ case M_X86_64_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x86_64);
+ break;
+
+ case M_386_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_i386_i386);
+ break;
+
+ case M_68K_NETBSD:
+ case M_68K4K_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_m68k, 0);
+ break;
+
+ case M_88K_OPENBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_m88k, 0);
+ break;
+
+ case M_HPPA_OPENBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_hppa, bfd_mach_hppa11);
+ break;
+
+ case M_POWERPC_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_powerpc, bfd_mach_ppc);
+ break;
+
+ case M_SPARC_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc);
+ break;
+
+ case M_SPARC64_NETBSD:
+ case M_SPARC64_OPENBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc_v9);
+ break;
+
+ case M_VAX_NETBSD:
+ case M_VAX4K_NETBSD:
+ bfd_default_set_arch_mach (abfd, bfd_arch_vax, 0);
+ break;
}
/* OK, we believe you. You're a core file (sure, sure). */
@@ -194,34 +236,26 @@ netbsd_core_file_p (abfd)
}
static char*
-netbsd_core_file_failing_command (abfd)
- bfd *abfd;
+netbsd_core_file_failing_command (bfd *abfd)
{
- /*return core_command (abfd);*/
+ /*return core_command (abfd);*/
return abfd->tdata.netbsd_core_data->core.c_name;
}
static int
-netbsd_core_file_failing_signal (abfd)
- bfd *abfd;
+netbsd_core_file_failing_signal (bfd *abfd)
{
/*return core_signal (abfd);*/
return abfd->tdata.netbsd_core_data->core.c_signo;
}
-
-static bfd_boolean
-netbsd_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd ATTRIBUTE_UNUSED;
- bfd *exec_bfd ATTRIBUTE_UNUSED;
-{
- return TRUE; /* FIXME, We have no way of telling at this point */
-}
/* If somebody calls any byte-swapping routines, shoot them. */
+
static void
-swap_abort ()
+swap_abort (void)
{
- abort (); /* This way doesn't require any declaration for ANSI to fuck up */
+ /* This way doesn't require any declaration for ANSI to fuck up. */
+ abort ();
}
#define NO_GET ((bfd_vma (*) (const void *)) swap_abort)
@@ -235,15 +269,16 @@ const bfd_target netbsd_core_vec =
{
"netbsd-core",
bfd_target_unknown_flavour,
- BFD_ENDIAN_UNKNOWN, /* target byte order */
- BFD_ENDIAN_UNKNOWN, /* target headers byte order */
- (HAS_RELOC | EXEC_P | /* object flags */
+ BFD_ENDIAN_UNKNOWN, /* Target byte order. */
+ BFD_ENDIAN_UNKNOWN, /* Target headers byte order. */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* symbol prefix */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
+ (SEC_HAS_CONTENTS | /* Section flags. */
+ SEC_ALLOC | SEC_LOAD | SEC_RELOC),
+ 0, /* Symbol prefix. */
+ ' ', /* ar_pad_char. */
+ 16, /* ar_max_namelen. */
NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data. */
NO_GET, NO_GETS, NO_PUT, /* 32 bit data. */
NO_GET, NO_GETS, NO_PUT, /* 16 bit data. */
@@ -251,17 +286,17 @@ const bfd_target netbsd_core_vec =
NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs. */
NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs. */
- { /* bfd_check_format */
- _bfd_dummy_target, /* unknown format */
- _bfd_dummy_target, /* object file */
- _bfd_dummy_target, /* archive */
- netbsd_core_file_p /* a core file */
+ { /* bfd_check_format. */
+ _bfd_dummy_target, /* Unknown format. */
+ _bfd_dummy_target, /* Object file. */
+ _bfd_dummy_target, /* Archive. */
+ netbsd_core_file_p /* A core file. */
},
- { /* bfd_set_format */
+ { /* bfd_set_format. */
bfd_false, bfd_false,
bfd_false, bfd_false
},
- { /* bfd_write_contents */
+ { /* bfd_write_contents. */
bfd_false, bfd_false,
bfd_false, bfd_false
},
@@ -278,5 +313,5 @@ const bfd_target netbsd_core_vec =
NULL,
- (PTR) 0 /* backend_data */
+ (PTR) 0 /* Backend_data. */
};
diff --git a/contrib/binutils/bfd/netbsd.h b/contrib/binutils/bfd/netbsd.h
index 04a4eabfdfd9..92f6a7d2fd19 100644
--- a/contrib/binutils/bfd/netbsd.h
+++ b/contrib/binutils/bfd/netbsd.h
@@ -1,23 +1,23 @@
/* BFD back-end definitions used by all NetBSD targets.
- Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2002
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2005
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
+ USA. */
/* Check for our machine type (part of magic number). */
#ifndef MACHTYPE_OK
@@ -31,7 +31,7 @@ USA. */
#define N_HEADER_IN_TEXT(x) 1
/* Determine if this is a shared library using the flags. */
-#define N_SHARED_LIB(x) (N_DYNAMIC(x))
+#define N_SHARED_LIB(x) (N_DYNAMIC (x))
/* We have 6 bits of flags and 10 bits of machine ID. */
#define N_MACHTYPE(exec) \
@@ -45,7 +45,7 @@ USA. */
| (((flags) & 0x3f) << 24))
#define N_SET_MACHTYPE(exec, machtype) \
((exec).a_info = \
- ((exec).a_info & 0xfb00ffff) | ((((int) (machtype))&0x3ff) << 16))
+ ((exec).a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
#define N_SET_FLAGS(exec, flags) \
((exec).a_info = \
((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
@@ -63,8 +63,9 @@ USA. */
section. */
#define MY_entry_is_text_address 1
-#define MY_write_object_contents MY(write_object_contents)
-static bfd_boolean MY(write_object_contents) PARAMS ((bfd *abfd));
+#define MY_write_object_contents MY (write_object_contents)
+static bfd_boolean MY (write_object_contents) (bfd *);
+
#define MY_text_includes_header 1
#include "aout-target.h"
@@ -74,8 +75,7 @@ static bfd_boolean MY(write_object_contents) PARAMS ((bfd *abfd));
file header, symbols, and relocation. */
static bfd_boolean
-MY(write_object_contents) (abfd)
- bfd *abfd;
+MY (write_object_contents) (bfd *abfd)
{
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
@@ -88,20 +88,21 @@ MY(write_object_contents) (abfd)
bfd_size_type text_size;
file_ptr text_end;
- NAME(aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
+ NAME (aout, adjust_sizes_and_vmas) (abfd, & text_size, & text_end);
}
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
/* Magic number, maestro, please! */
- switch (bfd_get_arch(abfd)) {
- case DEFAULT_ARCH:
- N_SET_MACHTYPE(*execp, DEFAULT_MID);
- break;
- default:
- N_SET_MACHTYPE(*execp, M_UNKNOWN);
- break;
- }
+ switch (bfd_get_arch(abfd))
+ {
+ case DEFAULT_ARCH:
+ N_SET_MACHTYPE(*execp, DEFAULT_MID);
+ break;
+ default:
+ N_SET_MACHTYPE(*execp, M_UNKNOWN);
+ break;
+ }
/* The NetBSD magic number is always big-endian */
#ifndef TARGET_IS_BIG_ENDIAN_P
@@ -112,7 +113,7 @@ MY(write_object_contents) (abfd)
| (execp->a_info & 0xff0000) >> 8 | (execp->a_info & 0xff000000) >> 24;
#endif
- WRITE_HEADERS(abfd, execp);
+ WRITE_HEADERS (abfd, execp);
return TRUE;
}
diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c
index 6abd40509ca2..b02b137889a1 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
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -71,13 +71,13 @@ _bfd_new_bfd (void)
nbfd->iostream = NULL;
nbfd->where = 0;
if (!bfd_hash_table_init_n (& nbfd->section_htab, bfd_section_hash_newfunc,
- 251))
+ sizeof (struct section_hash_entry), 251))
{
free (nbfd);
return NULL;
}
nbfd->sections = NULL;
- nbfd->section_tail = &nbfd->sections;
+ nbfd->section_last = NULL;
nbfd->format = bfd_unknown;
nbfd->my_archive = NULL;
nbfd->origin = 0;
@@ -103,6 +103,7 @@ _bfd_new_bfd_contained_in (bfd *obfd)
if (nbfd == NULL)
return NULL;
nbfd->xvec = obfd->xvec;
+ nbfd->iovec = obfd->iovec;
nbfd->my_archive = obfd;
nbfd->direction = read_direction;
nbfd->target_defaulted = obfd->target_defaulted;
@@ -123,29 +124,37 @@ _bfd_delete_bfd (bfd *abfd)
SECTION
Opening and closing BFDs
+SUBSECTION
+ Functions for opening and closing
*/
/*
FUNCTION
- bfd_openr
+ bfd_fopen
SYNOPSIS
- bfd *bfd_openr (const char *filename, const char *target);
+ bfd *bfd_fopen (const char *filename, const char *target,
+ const char *mode, int fd);
DESCRIPTION
- Open the file @var{filename} (using <<fopen>>) with the target
- @var{target}. Return a pointer to the created BFD.
+ Open the file @var{filename} with the target @var{target}.
+ Return a pointer to the created BFD. If @var{fd} is not -1,
+ then <<fdopen>> is used to open the file; otherwise, <<fopen>>
+ is used. @var{mode} is passed directly to <<fopen>> or
+ <<fdopen>>.
Calls <<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 <<NULL>> is returned then an error has occured. Possible errors
are <<bfd_error_no_memory>>, <<bfd_error_invalid_target>> or
<<system_call>> error.
*/
bfd *
-bfd_openr (const char *filename, const char *target)
+bfd_fopen (const char *filename, const char *target, const char *mode, int fd)
{
bfd *nbfd;
const bfd_target *target_vec;
@@ -160,21 +169,74 @@ bfd_openr (const char *filename, const char *target)
_bfd_delete_bfd (nbfd);
return NULL;
}
+
+#ifdef HAVE_FDOPEN
+ if (fd != -1)
+ nbfd->iostream = fdopen (fd, mode);
+ else
+#endif
+ nbfd->iostream = real_fopen (filename, mode);
+ if (nbfd->iostream == NULL)
+ {
+ bfd_set_error (bfd_error_system_call);
+ _bfd_delete_bfd (nbfd);
+ return NULL;
+ }
+ /* OK, put everything where it belongs. */
nbfd->filename = filename;
- nbfd->direction = read_direction;
- if (bfd_open_file (nbfd) == NULL)
+ /* Figure out whether the user is opening the file for reading,
+ writing, or both, by looking at the MODE argument. */
+ if ((mode[0] == 'r' || mode[0] == 'w' || mode[0] == 'a')
+ && mode[1] == '+')
+ nbfd->direction = both_direction;
+ else if (mode[0] == 'r')
+ nbfd->direction = read_direction;
+ else
+ nbfd->direction = write_direction;
+
+ if (! bfd_cache_init (nbfd))
{
- /* File didn't exist, or some such. */
- bfd_set_error (bfd_error_system_call);
_bfd_delete_bfd (nbfd);
return NULL;
}
+ nbfd->opened_once = TRUE;
+ /* If we opened the file by name, mark it cacheable; we can close it
+ and reopen it later. However, if a file descriptor was provided,
+ then it may have been opened with special flags that make it
+ unsafe to close and reopen the file. */
+ if (fd == -1)
+ bfd_set_cacheable (nbfd, TRUE);
return nbfd;
}
+/*
+FUNCTION
+ bfd_openr
+
+SYNOPSIS
+ bfd *bfd_openr (const char *filename, const char *target);
+
+DESCRIPTION
+ Open the file @var{filename} (using <<fopen>>) with the target
+ @var{target}. Return a pointer to the created BFD.
+
+ Calls <<bfd_find_target>>, so @var{target} is interpreted as by
+ that function.
+
+ If <<NULL>> is returned then an error has occured. Possible errors
+ are <<bfd_error_no_memory>>, <<bfd_error_invalid_target>> or
+ <<system_call>> error.
+*/
+
+bfd *
+bfd_openr (const char *filename, const char *target)
+{
+ return bfd_fopen (filename, target, FOPEN_RB, -1);
+}
+
/* Don't try to `optimize' this function:
o - We lock using stack space so that interrupting the locking
@@ -211,93 +273,222 @@ DESCRIPTION
bfd *
bfd_fdopenr (const char *filename, const char *target, int fd)
{
- bfd *nbfd;
- const bfd_target *target_vec;
+ const char *mode;
+#if defined(HAVE_FCNTL) && defined(F_GETFL)
int fdflags;
+#endif
- bfd_set_error (bfd_error_system_call);
#if ! defined(HAVE_FCNTL) || ! defined(F_GETFL)
- fdflags = O_RDWR; /* Assume full access. */
+ mode = FOPEN_RUB; /* Assume full access. */
#else
fdflags = fcntl (fd, F_GETFL, NULL);
-#endif
if (fdflags == -1)
- return NULL;
-
- nbfd = _bfd_new_bfd ();
- if (nbfd == NULL)
- return NULL;
-
- target_vec = bfd_find_target (target, nbfd);
- if (target_vec == NULL)
{
- _bfd_delete_bfd (nbfd);
+ bfd_set_error (bfd_error_system_call);
return NULL;
}
-#ifndef HAVE_FDOPEN
- nbfd->iostream = fopen (filename, FOPEN_RB);
-#else
/* (O_ACCMODE) parens are to avoid Ultrix header file bug. */
switch (fdflags & (O_ACCMODE))
{
- case O_RDONLY: nbfd->iostream = fdopen (fd, FOPEN_RB); break;
- case O_WRONLY: nbfd->iostream = fdopen (fd, FOPEN_RUB); break;
- case O_RDWR: nbfd->iostream = fdopen (fd, FOPEN_RUB); break;
+ case O_RDONLY: mode = FOPEN_RB; break;
+ case O_WRONLY: mode = FOPEN_RUB; break;
+ case O_RDWR: mode = FOPEN_RUB; break;
default: abort ();
}
#endif
- if (nbfd->iostream == NULL)
+ return bfd_fopen (filename, target, mode, fd);
+}
+
+/*
+FUNCTION
+ bfd_openstreamr
+
+SYNOPSIS
+ bfd *bfd_openstreamr (const char *, const char *, void *);
+
+DESCRIPTION
+
+ Open a BFD for read access on an existing stdio stream. When
+ the BFD is passed to <<bfd_close>>, the stream will be closed.
+*/
+
+bfd *
+bfd_openstreamr (const char *filename, const char *target, void *streamarg)
+{
+ FILE *stream = streamarg;
+ bfd *nbfd;
+ const bfd_target *target_vec;
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
+ return NULL;
+
+ target_vec = bfd_find_target (target, nbfd);
+ if (target_vec == NULL)
{
_bfd_delete_bfd (nbfd);
return NULL;
}
- /* OK, put everything where it belongs. */
+ nbfd->iostream = stream;
nbfd->filename = filename;
-
- /* As a special case we allow a FD open for read/write to
- be written through, although doing so requires that we end
- the previous clause with a preposition. */
- /* (O_ACCMODE) parens are to avoid Ultrix header file bug. */
- switch (fdflags & (O_ACCMODE))
- {
- case O_RDONLY: nbfd->direction = read_direction; break;
- case O_WRONLY: nbfd->direction = write_direction; break;
- case O_RDWR: nbfd->direction = both_direction; break;
- default: abort ();
- }
+ nbfd->direction = read_direction;
if (! bfd_cache_init (nbfd))
{
_bfd_delete_bfd (nbfd);
return NULL;
}
- nbfd->opened_once = TRUE;
return nbfd;
}
/*
FUNCTION
- bfd_openstreamr
+ bfd_openr_iovec
SYNOPSIS
- bfd *bfd_openstreamr (const char *, const char *, void *);
+ 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));
DESCRIPTION
- Open a BFD for read access on an existing stdio stream. When
- the BFD is passed to <<bfd_close>>, the stream will be closed.
+ 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 <<bfd_find_target>>, so @var{target} is interpreted as by
+ that function.
+
+ Calls @var{open} (which can call <<bfd_zalloc>> and
+ <<bfd_get_filename>>) to obtain the read-only stream backing
+ the BFD. @var{open} either succeeds returning the
+ non-<<NULL>> @var{stream}, or fails returning <<NULL>>
+ (setting <<bfd_error>>).
+
+ Calls @var{pread} to request @var{nbytes} of data from
+ @var{stream} starting at @var{offset} (e.g., via a call to
+ <<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 <<bfd_error>>).
+
+ Calls @var{close} when the BFD is later closed using
+ <<bfd_close>>. @var{close} either succeeds returning 0, or
+ fails returning -1 (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>>.
+
*/
+struct opncls
+{
+ void *stream;
+ file_ptr (*pread) (struct bfd *abfd, void *stream, void *buf,
+ file_ptr nbytes, file_ptr offset);
+ int (*close) (struct bfd *abfd, void *stream);
+ file_ptr where;
+};
+
+static file_ptr
+opncls_btell (struct bfd *abfd)
+{
+ struct opncls *vec = abfd->iostream;
+ return vec->where;
+}
+
+static int
+opncls_bseek (struct bfd *abfd, file_ptr offset, int whence)
+{
+ struct opncls *vec = abfd->iostream;
+ switch (whence)
+ {
+ case SEEK_SET: vec->where = offset; break;
+ case SEEK_CUR: vec->where += offset; break;
+ case SEEK_END: return -1;
+ }
+ return 0;
+}
+
+static file_ptr
+opncls_bread (struct bfd *abfd, void *buf, file_ptr nbytes)
+{
+ struct opncls *vec = abfd->iostream;
+ file_ptr nread = (vec->pread) (abfd, vec->stream, buf, nbytes, vec->where);
+ if (nread < 0)
+ return nread;
+ vec->where += nread;
+ return nread;
+}
+
+static file_ptr
+opncls_bwrite (struct bfd *abfd ATTRIBUTE_UNUSED,
+ const void *where ATTRIBUTE_UNUSED,
+ file_ptr nbytes ATTRIBUTE_UNUSED)
+{
+ return -1;
+}
+
+static int
+opncls_bclose (struct bfd *abfd)
+{
+ struct opncls *vec = abfd->iostream;
+ /* Since the VEC's memory is bound to the bfd deleting the bfd will
+ free it. */
+ int status = 0;
+ if (vec->close != NULL)
+ status = (vec->close) (abfd, vec->stream);
+ abfd->iostream = NULL;
+ return status;
+}
+
+static int
+opncls_bflush (struct bfd *abfd ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+static int
+opncls_bstat (struct bfd *abfd ATTRIBUTE_UNUSED, struct stat *sb)
+{
+ memset (sb, 0, sizeof (*sb));
+ return 0;
+}
+
+static const struct bfd_iovec opncls_iovec = {
+ &opncls_bread, &opncls_bwrite, &opncls_btell, &opncls_bseek,
+ &opncls_bclose, &opncls_bflush, &opncls_bstat
+};
+
bfd *
-bfd_openstreamr (const char *filename, const char *target, void *streamarg)
+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 *abfd,
+ void *stream,
+ void *buf,
+ file_ptr nbytes,
+ file_ptr offset),
+ int (*close) (struct bfd *nbfd,
+ void *stream))
{
- FILE *stream = streamarg;
bfd *nbfd;
const bfd_target *target_vec;
+ struct opncls *vec;
+ void *stream;
nbfd = _bfd_new_bfd ();
if (nbfd == NULL)
@@ -310,16 +501,24 @@ bfd_openstreamr (const char *filename, const char *target, void *streamarg)
return NULL;
}
- nbfd->iostream = stream;
nbfd->filename = filename;
nbfd->direction = read_direction;
- if (! bfd_cache_init (nbfd))
+ stream = open (nbfd, open_closure);
+ if (stream == NULL)
{
_bfd_delete_bfd (nbfd);
return NULL;
}
+ vec = bfd_zalloc (nbfd, sizeof (struct opncls));
+ vec->stream = stream;
+ vec->pread = pread;
+ vec->close = close;
+
+ nbfd->iovec = &opncls_iovec;
+ nbfd->iostream = vec;
+
return nbfd;
}
@@ -415,7 +614,12 @@ bfd_close (bfd *abfd)
if (! BFD_SEND (abfd, _close_and_cleanup, (abfd)))
return FALSE;
- ret = bfd_cache_close (abfd);
+ /* FIXME: cagney/2004-02-15: Need to implement a BFD_IN_MEMORY io
+ vector. */
+ if (!(abfd->flags & BFD_IN_MEMORY))
+ ret = abfd->iovec->bclose (abfd);
+ else
+ ret = TRUE;
/* If the file was open for writing and is now executable,
make it so. */
@@ -630,14 +834,13 @@ INTERNAL_FUNCTION
bfd_alloc
SYNOPSIS
- void *bfd_alloc (bfd *abfd, size_t wanted);
+ void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
DESCRIPTION
Allocate a block of @var{wanted} bytes of memory attached to
<<abfd>> and return a pointer to it.
*/
-
void *
bfd_alloc (bfd *abfd, bfd_size_type size)
{
@@ -655,6 +858,57 @@ bfd_alloc (bfd *abfd, bfd_size_type size)
return ret;
}
+/*
+INTERNAL_FUNCTION
+ bfd_alloc2
+
+SYNOPSIS
+ void *bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
+
+DESCRIPTION
+ Allocate a block of @var{nmemb} elements of @var{size} bytes each
+ of memory attached to <<abfd>> and return a pointer to it.
+*/
+
+void *
+bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size)
+{
+ void *ret;
+
+ if ((nmemb | size) >= HALF_BFD_SIZE_TYPE
+ && size != 0
+ && nmemb > ~(bfd_size_type) 0 / size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ size *= nmemb;
+
+ if (size != (unsigned long) size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ ret = objalloc_alloc (abfd->memory, (unsigned long) size);
+ if (ret == NULL)
+ bfd_set_error (bfd_error_no_memory);
+ return ret;
+}
+
+/*
+INTERNAL_FUNCTION
+ bfd_zalloc
+
+SYNOPSIS
+ void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
+
+DESCRIPTION
+ Allocate a block of @var{wanted} bytes of zeroed memory
+ attached to <<abfd>> and return a pointer to it.
+*/
+
void *
bfd_zalloc (bfd *abfd, bfd_size_type size)
{
@@ -666,6 +920,39 @@ bfd_zalloc (bfd *abfd, bfd_size_type size)
return res;
}
+/*
+INTERNAL_FUNCTION
+ bfd_zalloc2
+
+SYNOPSIS
+ void *bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
+
+DESCRIPTION
+ Allocate a block of @var{nmemb} elements of @var{size} bytes each
+ of zeroed memory attached to <<abfd>> and return a pointer to it.
+*/
+
+void *
+bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size)
+{
+ void *res;
+
+ if ((nmemb | size) >= HALF_BFD_SIZE_TYPE
+ && size != 0
+ && nmemb > ~(bfd_size_type) 0 / size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ size *= nmemb;
+
+ res = bfd_alloc (abfd, size);
+ if (res)
+ memset (res, 0, (size_t) size);
+ return res;
+}
+
/* Free a block allocated for a BFD.
Note: Also frees all more recently allocated blocks! */
@@ -676,9 +963,9 @@ bfd_release (bfd *abfd, void *block)
}
-/*
- GNU Extension: separate debug-info files
-
+/*
+ GNU Extension: separate debug-info files
+
The idea here is that a special section called .gnu_debuglink might be
embedded in a binary file, which indicates that some *other* file
contains the real debugging information. This special section contains a
@@ -706,7 +993,7 @@ DESCRIPTION
RETURNS
Return the updated CRC32 value.
-*/
+*/
unsigned long
bfd_calc_gnu_debuglink_crc32 (unsigned long crc,
@@ -793,12 +1080,11 @@ DESCRIPTION
static char *
get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
{
- asection * sect;
- bfd_size_type debuglink_size;
+ asection *sect;
unsigned long crc32;
- char * contents;
+ bfd_byte *contents;
int crc_offset;
- bfd_boolean ret;
+ char *name;
BFD_ASSERT (abfd);
BFD_ASSERT (crc32_out);
@@ -808,27 +1094,22 @@ get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
if (sect == NULL)
return NULL;
- debuglink_size = bfd_section_size (abfd, sect);
-
- contents = malloc (debuglink_size);
- if (contents == NULL)
- return NULL;
-
- ret = bfd_get_section_contents (abfd, sect, contents, 0, debuglink_size);
- if (! ret)
+ if (!bfd_malloc_and_get_section (abfd, sect, &contents))
{
- free (contents);
+ if (contents != NULL)
+ free (contents);
return NULL;
}
/* Crc value is stored after the filename, aligned up to 4 bytes. */
- crc_offset = strlen (contents) + 1;
+ name = (char *) contents;
+ crc_offset = strlen (name) + 1;
crc_offset = (crc_offset + 3) & ~3;
crc32 = bfd_get_32 (abfd, contents + crc_offset);
*crc32_out = crc32;
- return contents;
+ return name;
}
/*
@@ -847,7 +1128,7 @@ DESCRIPTION
static bfd_boolean
separate_debug_file_exists (const char *name, const unsigned long crc)
{
- static char buffer [8 * 1024];
+ static unsigned char buffer [8 * 1024];
unsigned long file_crc = 0;
int fd;
bfd_size_type count;
@@ -917,19 +1198,19 @@ find_separate_debug_file (bfd *abfd, const char *debug_file_directory)
return NULL;
}
BFD_ASSERT (strlen (dir) != 0);
-
+
/* Strip off filename part. */
for (i = strlen (dir) - 1; i >= 0; i--)
if (IS_DIR_SEPARATOR (dir[i]))
break;
dir[i + 1] = '\0';
- BFD_ASSERT (dir[i] == '/' || dir[0] == '\0')
+ BFD_ASSERT (dir[i] == '/' || dir[0] == '\0');
debugfile = malloc (strlen (debug_file_directory) + 1
+ strlen (dir)
+ strlen (".debug/")
- + strlen (basename)
+ + strlen (basename)
+ 1);
if (debugfile == NULL)
{
@@ -1014,10 +1295,6 @@ RETURNS
char *
bfd_follow_gnu_debuglink (bfd *abfd, const char *dir)
{
-#if 0 /* Disabled until DEBUGDIR can be defined by configure.in. */
- if (dir == NULL)
- dir = DEBUGDIR;
-#endif
return find_separate_debug_file (abfd, dir);
}
@@ -1036,7 +1313,7 @@ DESCRIPTION
RETURNS
A pointer to the new section is returned if all is ok. Otherwise <<NULL>> is
- returned and bfd_error is set.
+ returned and bfd_error is set.
*/
asection *
@@ -1053,7 +1330,7 @@ bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename)
/* Strip off any path components in filename. */
filename = lbasename (filename);
-
+
sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK);
if (sect)
{
@@ -1071,7 +1348,7 @@ bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename)
/* XXX Should we delete the section from the bfd ? */
return NULL;
-
+
debuglink_size = strlen (filename) + 1;
debuglink_size += 3;
debuglink_size &= ~3;
@@ -1080,7 +1357,7 @@ bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename)
if (! bfd_set_section_size (abfd, sect, debuglink_size))
/* XXX Should we delete the section from the bfd ? */
return NULL;
-
+
return sect;
}
@@ -1102,7 +1379,7 @@ DESCRIPTION
RETURNS
<<TRUE>> is returned if all is ok. Otherwise <<FALSE>> is returned
- and bfd_error is set.
+ and bfd_error is set.
*/
bfd_boolean
@@ -1115,7 +1392,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd,
char * contents;
bfd_size_type crc_offset;
FILE * handle;
- static char buffer[8 * 1024];
+ static unsigned char buffer[8 * 1024];
size_t count;
if (abfd == NULL || sect == NULL || filename == NULL)
@@ -1130,7 +1407,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd,
.gnu_debuglink section, we insist upon the user providing us with a
correct-for-section-creation-time path, but this need not conform to
the gdb location algorithm. */
- handle = fopen (filename, FOPEN_RB);
+ handle = real_fopen (filename, FOPEN_RB);
if (handle == NULL)
{
bfd_set_error (bfd_error_system_call);
@@ -1145,7 +1422,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd,
/* Strip off any path components in filename,
now that we no longer need them. */
filename = lbasename (filename);
-
+
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 8273504e59ac..cc6c4dccd002 100644
--- a/contrib/binutils/bfd/osf-core.c
+++ b/contrib/binutils/bfd/osf-core.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 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. */
@@ -26,7 +26,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libbfd.h"
#include <sys/user.h>
+#ifdef OSF_CORE
#include <sys/core.h>
+#endif
/* forward declarations */
@@ -38,8 +40,7 @@ static char *osf_core_core_file_failing_command
PARAMS ((bfd *));
static int osf_core_core_file_failing_signal
PARAMS ((bfd *));
-static bfd_boolean osf_core_core_file_matches_executable_p
- PARAMS ((bfd *, bfd *));
+#define osf_core_core_file_matches_executable_p generic_core_file_matches_executable_p
static void swap_abort
PARAMS ((void));
@@ -56,11 +57,11 @@ struct osf_core_struct
#define core_command(bfd) (core_hdr(bfd)->cmd)
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
+make_bfd_asection (abfd, name, flags, size, vma, filepos)
bfd *abfd;
const char *name;
flagword flags;
- bfd_size_type _raw_size;
+ bfd_size_type size;
bfd_vma vma;
file_ptr filepos;
{
@@ -71,7 +72,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
asect->alignment_power = 8;
@@ -170,14 +171,6 @@ osf_core_core_file_failing_signal (abfd)
{
return core_signal (abfd);
}
-
-static bfd_boolean
-osf_core_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd ATTRIBUTE_UNUSED;
- bfd *exec_bfd ATTRIBUTE_UNUSED;
-{
- return TRUE; /* FIXME, We have no way of telling at this point */
-}
/* If somebody calls any byte-swapping routines, shoot them. */
static void
diff --git a/contrib/binutils/bfd/pe-arm.c b/contrib/binutils/bfd/pe-arm.c
index 8b5d1c7e1015..dba9c1b40e48 100644
--- a/contrib/binutils/bfd/pe-arm.c
+++ b/contrib/binutils/bfd/pe-arm.c
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/pe-i386.c b/contrib/binutils/bfd/pe-i386.c
index a912cffd9986..7c102b42de84 100644
--- a/contrib/binutils/bfd/pe-i386.c
+++ b/contrib/binutils/bfd/pe-i386.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel 386 PECOFF files.
- Copyright 1995, 1996, 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,17 +15,18 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
-#define TARGET_SYM i386pe_vec
-#define TARGET_NAME "pe-i386"
+#define TARGET_SYM i386pe_vec
+#define TARGET_NAME "pe-i386"
#define COFF_WITH_PE
-#define PCRELOFFSET TRUE
-#define TARGET_UNDERSCORE '_'
+#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 \
@@ -33,11 +34,17 @@
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_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-i386.c"
diff --git a/contrib/binutils/bfd/pe-mips.c b/contrib/binutils/bfd/pe-mips.c
index 3066aaa442b4..03d6beca981c 100644
--- a/contrib/binutils/bfd/pe-mips.c
+++ b/contrib/binutils/bfd/pe-mips.c
@@ -1,23 +1,23 @@
/* BFD back-end for MIPS PE COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Modified from coff-i386.c by DJ Delorie, dj@cygnus.com
-This file is part of BFD, the Binary File Descriptor library.
+ This 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define COFF_WITH_PE
#define COFF_LONG_SECTION_NAMES
@@ -26,45 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
-
#include "coff/mipspe.h"
-
#include "coff/internal.h"
-
#include "coff/pe.h"
-
#include "libcoff.h"
-static bfd_reloc_status_type coff_mips_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static reloc_howto_type *coff_mips_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
-#if 0
-static void mips_ecoff_swap_reloc_in
- PARAMS ((bfd *, PTR, struct internal_reloc *));
-static void mips_ecoff_swap_reloc_out
- PARAMS ((bfd *, const struct internal_reloc *, PTR));
-static void mips_adjust_reloc_in
- PARAMS ((bfd *, const struct internal_reloc *, arelent *));
-static void mips_adjust_reloc_out
- PARAMS ((bfd *, const arelent *, struct internal_reloc *));
-#endif
-
-static bfd_boolean in_reloc_p
- PARAMS ((bfd *, reloc_howto_type *));
-static reloc_howto_type * coff_mips_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void mips_swap_reloc_in
- PARAMS ((bfd *, PTR, PTR));
-static unsigned int mips_swap_reloc_out
- PARAMS ((bfd *, PTR, PTR));
-static bfd_boolean coff_pe_mips_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-
-#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER 2
/* The page size is a guess based on ELF. */
#define COFF_PAGE_SIZE 0x1000
@@ -79,19 +46,17 @@ static bfd_boolean coff_pe_mips_relocate_section
reloc type to make any required adjustments. */
static bfd_reloc_status_type
-coff_mips_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+coff_mips_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
symvalue diff;
- if (output_bfd == (bfd *) NULL)
+ if (output_bfd == NULL)
return bfd_reloc_continue;
if (bfd_is_com_section (symbol->section))
@@ -115,22 +80,11 @@ coff_mips_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
#endif
}
else
- {
- /* For some reason bfd_perform_relocation always effectively
- ignores the addend for a COFF target when producing
- relocatable output. This seems to be always wrong for 386
- COFF, so we handle the addend here instead. */
- diff = reloc_entry->addend;
- }
-
-#ifdef COFF_WITH_PE
-#if 0
- /* dj - handle it like any other reloc? */
- /* FIXME: How should this case be handled? */
- if (reloc_entry->howto->type == MIPS_R_RVA && diff != 0)
- abort ();
-#endif
-#endif
+ /* For some reason bfd_perform_relocation always effectively
+ ignores the addend for a COFF target when producing
+ relocatable output. This seems to be always wrong for 386
+ COFF, so we handle the addend here instead. */
+ diff = reloc_entry->addend;
#define DOIT(x) \
x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + (diff >> howto->rightshift)) & howto->dst_mask))
@@ -145,6 +99,7 @@ coff_mips_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
case 0:
{
char x = bfd_get_8 (abfd, addr);
+
DOIT (x);
bfd_put_8 (abfd, x, addr);
}
@@ -153,6 +108,7 @@ coff_mips_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
case 1:
{
short x = bfd_get_16 (abfd, addr);
+
DOIT (x);
bfd_put_16 (abfd, (bfd_vma) x, addr);
}
@@ -161,6 +117,7 @@ coff_mips_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
case 2:
{
long x = bfd_get_32 (abfd, addr);
+
DOIT (x);
bfd_put_32 (abfd, (bfd_vma) x, addr);
}
@@ -180,9 +137,7 @@ coff_mips_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
appear in the output .reloc section. */
static bfd_boolean
-in_reloc_p (abfd, howto)
- bfd * abfd ATTRIBUTE_UNUSED;
- reloc_howto_type *howto;
+in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto)
{
return ! howto->pc_relative && howto->type != MIPS_R_RVA;
}
@@ -197,130 +152,130 @@ static reloc_howto_type howto_table[] =
/* Reloc type 0 is ignored. The reloc reading code ensures that
this is a reference to the .abs section, which will cause
bfd_perform_relocation to do nothing. */
- HOWTO (MIPS_R_ABSOLUTE, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- 0, /* special_function */
- "IGNORE", /* name */
- FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (MIPS_R_ABSOLUTE, /* Type. */
+ 0, /* Rightshift. */
+ 0, /* Size (0 = byte, 1 = short, 2 = long). */
+ 8, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_dont, /* Complain_on_overflow. */
+ 0, /* Special_function. */
+ "IGNORE", /* Name. */
+ FALSE, /* Partial_inplace. */
+ 0, /* Src_mask. */
+ 0, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
/* A 16 bit reference to a symbol, normally from a data section. */
- HOWTO (MIPS_R_REFHALF, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_mips_reloc, /* special_function */
- "REFHALF", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (MIPS_R_REFHALF, /* Type. */
+ 0, /* Rightshift. */
+ 1, /* Size (0 = byte, 1 = short, 2 = long). */
+ 16, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_bitfield, /* Complain_on_overflow. */
+ coff_mips_reloc, /* Special_function. */
+ "REFHALF", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0xffff, /* Src_mask. */
+ 0xffff, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
/* A 32 bit reference to a symbol, normally from a data section. */
- HOWTO (MIPS_R_REFWORD, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_mips_reloc, /* special_function */
- "REFWORD", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (MIPS_R_REFWORD, /* Type. */
+ 0, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 32, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_bitfield, /* Complain_on_overflow. */
+ coff_mips_reloc, /* Special_function. */
+ "REFWORD", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0xffffffff, /* Src_mask. */
+ 0xffffffff, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
/* A 26 bit absolute jump address. */
- HOWTO (MIPS_R_JMPADDR, /* type */
- 2, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
+ HOWTO (MIPS_R_JMPADDR, /* Type. */
+ 2, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 26, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_dont, /* Complain_on_overflow. */
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- coff_mips_reloc, /* special_function */
- "JMPADDR", /* name */
- TRUE, /* partial_inplace */
- 0x3ffffff, /* src_mask */
- 0x3ffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ coff_mips_reloc, /* Special_function. */
+ "JMPADDR", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0x3ffffff, /* Src_mask. */
+ 0x3ffffff, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
/* The high 16 bits of a symbol value. Handled by the function
mips_refhi_reloc. */
- HOWTO (MIPS_R_REFHI, /* type */
- 16, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_mips_reloc, /* special_function */
- "REFHI", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (MIPS_R_REFHI, /* Type. */
+ 16, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 16, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_bitfield, /* Complain_on_overflow. */
+ coff_mips_reloc, /* Special_function. */
+ "REFHI", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0xffff, /* Src_mask. */
+ 0xffff, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
/* The low 16 bits of a symbol value. */
- HOWTO (MIPS_R_REFLO, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- coff_mips_reloc, /* special_function */
- "REFLO", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (MIPS_R_REFLO, /* Type. */
+ 0, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 16, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_dont, /* Complain_on_overflow. */
+ coff_mips_reloc, /* Special_function. */
+ "REFLO", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0xffff, /* Src_mask. */
+ 0xffff, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
/* A reference to an offset from the gp register. Handled by the
function mips_gprel_reloc. */
- HOWTO (MIPS_R_GPREL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_mips_reloc, /* special_function */
- "GPREL", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (MIPS_R_GPREL, /* Type. */
+ 0, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 16, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_signed, /* Complain_on_overflow. */
+ coff_mips_reloc, /* Special_function. */
+ "GPREL", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0xffff, /* Src_mask. */
+ 0xffff, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
/* A reference to a literal using an offset from the gp register.
Handled by the function mips_gprel_reloc. */
- HOWTO (MIPS_R_LITERAL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- coff_mips_reloc, /* special_function */
- "LITERAL", /* name */
- TRUE, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (MIPS_R_LITERAL, /* Type. */
+ 0, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 16, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_signed, /* Complain_on_overflow. */
+ coff_mips_reloc, /* Special_function. */
+ "LITERAL", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0xffff, /* Src_mask. */
+ 0xffff, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
EMPTY_HOWTO (8),
EMPTY_HOWTO (9),
@@ -348,41 +303,43 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (31),
EMPTY_HOWTO (32),
EMPTY_HOWTO (33),
- HOWTO (MIPS_R_RVA, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_mips_reloc, /* special_function */
- "rva32", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (MIPS_R_RVA, /* Type. */
+ 0, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 32, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_bitfield, /* Complain_on_overflow. */
+ coff_mips_reloc, /* Special_function. */
+ "rva32", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0xffffffff, /* Src_mask. */
+ 0xffffffff, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
EMPTY_HOWTO (35),
EMPTY_HOWTO (36),
- HOWTO (MIPS_R_PAIR, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- FALSE, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- coff_mips_reloc, /* special_function */
- "PAIR", /* name */
- TRUE, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ HOWTO (MIPS_R_PAIR, /* Type. */
+ 0, /* Rightshift. */
+ 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 32, /* Bitsize. */
+ FALSE, /* PC_relative. */
+ 0, /* Bitpos. */
+ complain_overflow_bitfield, /* Complain_on_overflow. */
+ coff_mips_reloc, /* Special_function. */
+ "PAIR", /* Name. */
+ TRUE, /* Partial_inplace. */
+ 0xffffffff, /* Src_mask. */
+ 0xffffffff, /* Dst_mask. */
+ FALSE), /* Pcrel_offset. */
};
-/* Turn a howto into a reloc nunmber */
+/* Turn a howto into a reloc nunmber. */
+
+#define SELECT_RELOC(x, howto) { x.r_type = howto->type; }
+#define BADMAG(x) MIPSBADMAG (x)
-#define SELECT_RELOC(x,howto) { x.r_type = howto->type; }
-#define BADMAG(x) MIPSBADMAG(x)
-#define MIPS 1 /* Customize coffcode.h */
+/* Customize coffcode.h. */
+#define MIPS 1
#define RTYPE2HOWTO(cache_ptr, dst) \
(cache_ptr)->howto = howto_table + (dst)->r_type;
@@ -402,17 +359,17 @@ static reloc_howto_type howto_table[] =
#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
{ \
- coff_symbol_type *coffsym = (coff_symbol_type *) NULL; \
+ coff_symbol_type *coffsym = NULL; \
if (ptr && bfd_asymbol_bfd (ptr) != abfd) \
coffsym = (obj_symbols (abfd) \
+ (cache_ptr->sym_ptr_ptr - symbols)); \
else if (ptr) \
coffsym = coff_symbol_from (abfd, ptr); \
- if (coffsym != (coff_symbol_type *) NULL \
+ if (coffsym != NULL \
&& coffsym->native->u.syment.n_scnum == 0) \
cache_ptr->addend = - coffsym->native->u.syment.n_value; \
else if (ptr && bfd_asymbol_bfd (ptr) == abfd \
- && ptr->section != (asection *) NULL) \
+ && ptr->section != NULL) \
cache_ptr->addend = - (ptr->section->vma + ptr->value); \
else \
cache_ptr->addend = 0; \
@@ -423,13 +380,12 @@ static reloc_howto_type howto_table[] =
/* Convert an rtype to howto for the COFF backend linker. */
static reloc_howto_type *
-coff_mips_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- struct internal_reloc *rel;
- struct coff_link_hash_entry *h;
- struct internal_syment *sym;
- bfd_vma *addendp;
+coff_mips_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h,
+ struct internal_syment *sym,
+ bfd_vma *addendp)
{
reloc_howto_type *howto;
@@ -489,24 +445,20 @@ coff_mips_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
}
if (rel->r_type == MIPS_R_RVA)
- {
- *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
- }
+ *addendp -= pe_data (sec->output_section->owner)->pe_opthdr.ImageBase;
#endif
return howto;
}
-#define coff_rtype_to_howto coff_mips_rtype_to_howto
-
-#define coff_bfd_reloc_type_lookup coff_mips_reloc_type_lookup
+#define coff_rtype_to_howto coff_mips_rtype_to_howto
+#define coff_bfd_reloc_type_lookup coff_mips_reloc_type_lookup
/* Get the howto structure for a generic reloc type. */
static reloc_howto_type *
-coff_mips_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+coff_mips_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
int mips_type;
@@ -534,35 +486,18 @@ coff_mips_reloc_type_lookup (abfd, code)
case BFD_RELOC_MIPS_LITERAL:
mips_type = MIPS_R_LITERAL;
break;
-/* FIXME?
- case BFD_RELOC_16_PCREL_S2:
- mips_type = MIPS_R_PCREL16;
- break;
- case BFD_RELOC_PCREL_HI16_S:
- mips_type = MIPS_R_RELHI;
- break;
- case BFD_RELOC_PCREL_LO16:
- mips_type = MIPS_R_RELLO;
- break;
- case BFD_RELOC_GPREL32:
- mips_type = MIPS_R_SWITCH;
- break;
-*/
case BFD_RELOC_RVA:
mips_type = MIPS_R_RVA;
break;
default:
- return (reloc_howto_type *) NULL;
+ return NULL;
}
- return &howto_table[mips_type];
+ return & howto_table [mips_type];
}
static void
-mips_swap_reloc_in (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+mips_swap_reloc_in (bfd * abfd, void * src, void * dst)
{
static struct internal_reloc pair_prev;
RELOC *reloc_src = (RELOC *) src;
@@ -584,17 +519,13 @@ mips_swap_reloc_in (abfd, src, dst)
reloc_dst->r_offset = reloc_dst->r_symndx;
if (reloc_dst->r_offset & 0x8000)
reloc_dst->r_offset -= 0x10000;
- /*printf ("dj: pair offset is %08x\n", reloc_dst->r_offset);*/
reloc_dst->r_symndx = pair_prev.r_symndx;
break;
}
}
static unsigned int
-mips_swap_reloc_out (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+mips_swap_reloc_out (bfd * abfd, void * src, void * dst)
{
static int prev_offset = 1;
static bfd_vma prev_addr = 0;
@@ -629,22 +560,19 @@ mips_swap_reloc_out (abfd, src, dst)
return RELSZ;
}
-#define coff_swap_reloc_in mips_swap_reloc_in
-#define coff_swap_reloc_out mips_swap_reloc_out
+#define coff_swap_reloc_in mips_swap_reloc_in
+#define coff_swap_reloc_out mips_swap_reloc_out
#define NO_COFF_RELOCS
static bfd_boolean
-coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
- input_section, contents, relocs, syms,
- sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- struct internal_reloc *relocs;
- struct internal_syment *syms;
- asection **sections;
+coff_pe_mips_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ struct internal_reloc *relocs,
+ struct internal_syment *syms,
+ asection **sections)
{
bfd_vma gp;
bfd_boolean gp_undefined;
@@ -655,35 +583,23 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
bfd_boolean got_lo;
if (info->relocatable)
- {
- (*_bfd_error_handler) (_("\
-%s: `ld -r' not supported with PE MIPS objects\n"),
- bfd_archive_filename (input_bfd));
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
+ {
+ (*_bfd_error_handler)
+ (_("%B: `ld -r' not supported with PE MIPS objects\n"), input_bfd);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
BFD_ASSERT (input_bfd->xvec->byteorder
== output_bfd->xvec->byteorder);
-#if 0
- printf ("dj: relocate %s(%s) %08x\n",
- input_bfd->filename, input_section->name,
- input_section->output_section->vma + input_section->output_offset);
-#endif
-
gp = _bfd_get_gp_value (output_bfd);
- if (gp == 0)
- gp_undefined = TRUE;
- else
- gp_undefined = FALSE;
-
+ gp_undefined = (gp == 0) ? TRUE : FALSE;
got_lo = FALSE;
-
adjust = 0;
-
rel = relocs;
rel_end = rel + input_section->reloc_count;
+
for (i = 0; rel < rel_end; rel++, i++)
{
long symndx;
@@ -779,57 +695,49 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
src = rel->r_vaddr + input_section->output_section->vma
+ input_section->output_offset;
-#if 0
- printf ("dj: reloc %02x %-8s a=%08x/%08x(%08x) v=%08x+%08x %s\n",
- rel->r_type, howto_table[rel->r_type].name,
- src, rel->r_vaddr, *(unsigned long *)mem, val, rel->r_offset,
- h?h->root.root.string:"(none)");
-#endif
/* OK, at this point the following variables are set up:
src = VMA of the memory we're fixing up
mem = pointer to memory we're fixing up
- val = VMA of what we need to refer to
- */
+ val = VMA of what we need to refer to. */
-#define UI(x) (*_bfd_error_handler) (_("%s: unimplemented %s\n"), \
- bfd_archive_filename (input_bfd), x); \
+#define UI(x) (*_bfd_error_handler) (_("%B: unimplemented %s\n"), \
+ input_bfd, x); \
bfd_set_error (bfd_error_bad_value);
switch (rel->r_type)
{
case MIPS_R_ABSOLUTE:
- /* ignore these */
+ /* Ignore these. */
break;
case MIPS_R_REFHALF:
- UI("refhalf");
+ UI ("refhalf");
break;
case MIPS_R_REFWORD:
- tmp = bfd_get_32(input_bfd, mem);
+ tmp = bfd_get_32 (input_bfd, mem);
/* printf ("refword: src=%08x targ=%08x+%08x\n", src, tmp, val); */
tmp += val;
- bfd_put_32(input_bfd, tmp, mem);
+ bfd_put_32 (input_bfd, tmp, mem);
break;
case MIPS_R_JMPADDR:
- tmp = bfd_get_32(input_bfd, mem);
- targ = val + (tmp&0x03ffffff)*4;
+ tmp = bfd_get_32 (input_bfd, mem);
+ targ = val + (tmp & 0x03ffffff) * 4;
if ((src & 0xf0000000) != (targ & 0xf0000000))
{
- (*_bfd_error_handler) (_("%s: jump too far away\n"),
- bfd_archive_filename (input_bfd));
+ (*_bfd_error_handler) (_("%B: jump too far away\n"), input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
tmp &= 0xfc000000;
- tmp |= (targ/4) & 0x3ffffff;
- bfd_put_32(input_bfd, tmp, mem);
+ tmp |= (targ / 4) & 0x3ffffff;
+ bfd_put_32 (input_bfd, tmp, mem);
break;
case MIPS_R_REFHI:
- tmp = bfd_get_32(input_bfd, mem);
+ tmp = bfd_get_32 (input_bfd, mem);
switch (rel[1].r_type)
{
case MIPS_R_PAIR:
@@ -838,51 +746,51 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
break;
case MIPS_R_REFLO:
/* GNU COFF object */
- low = bfd_get_32(input_bfd, contents + rel[1].r_vaddr);
+ low = bfd_get_32 (input_bfd, contents + rel[1].r_vaddr);
low &= 0xffff;
if (low & 0x8000)
low -= 0x10000;
targ = val + low + ((tmp & 0xffff) << 16);
break;
default:
- (*_bfd_error_handler) (_("%s: bad pair/reflo after refhi\n"),
- bfd_archive_filename (input_bfd));
+ (*_bfd_error_handler) (_("%B: bad pair/reflo after refhi\n"),
+ input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
tmp &= 0xffff0000;
tmp |= (targ >> 16) & 0xffff;
- bfd_put_32(input_bfd, tmp, mem);
+ bfd_put_32 (input_bfd, tmp, mem);
break;
case MIPS_R_REFLO:
- tmp = bfd_get_32(input_bfd, mem);
+ tmp = bfd_get_32 (input_bfd, mem);
targ = val + (tmp & 0xffff);
/* printf ("refword: src=%08x targ=%08x\n", src, targ); */
tmp &= 0xffff0000;
tmp |= targ & 0xffff;
- bfd_put_32(input_bfd, tmp, mem);
+ bfd_put_32 (input_bfd, tmp, mem);
break;
case MIPS_R_GPREL:
case MIPS_R_LITERAL:
- UI("gprel");
+ UI ("gprel");
break;
case MIPS_R_SECTION:
- UI("section");
+ UI ("section");
break;
case MIPS_R_SECREL:
- UI("secrel");
+ UI ("secrel");
break;
case MIPS_R_SECRELLO:
- UI("secrello");
+ UI ("secrello");
break;
case MIPS_R_SECRELHI:
- UI("secrelhi");
+ UI ("secrelhi");
break;
case MIPS_R_RVA:
@@ -910,13 +818,8 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
a leading dot for local labels, so if TARGET_UNDERSCORE is defined
we treat all symbols starting with L as local. */
-static bfd_boolean coff_mips_is_local_label_name
- PARAMS ((bfd *, const char *));
-
static bfd_boolean
-coff_mips_is_local_label_name (abfd, name)
- bfd *abfd;
- const char *name;
+coff_mips_is_local_label_name (bfd *abfd, const char *name)
{
if (name[0] == 'L')
return TRUE;
@@ -942,57 +845,57 @@ const bfd_target
#ifdef TARGET_NAME
TARGET_NAME,
#else
- "pe-mips", /* name */
+ "pe-mips", /* Name. */
#endif
bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* data byte order is little */
- BFD_ENDIAN_LITTLE, /* header byte order is little */
+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */
+ BFD_ENDIAN_LITTLE, /* Header byte order is little. */
- (HAS_RELOC | EXEC_P | /* object flags */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
#ifndef COFF_WITH_PE
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags. */
| SEC_CODE | SEC_DATA),
#else
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags. */
| SEC_CODE | SEC_DATA
| SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
#endif
#ifdef TARGET_UNDERSCORE
- TARGET_UNDERSCORE, /* leading underscore */
+ TARGET_UNDERSCORE, /* Leading underscore. */
#else
0, /* leading underscore */
#endif
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
+ '/', /* AR_pad_char. */
+ 15, /* AR_max_namelen. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-
-/* Note that we allow an object file to be treated as a core file as well. */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, coff_object_p},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
+
+ /* Note that we allow an object file to be treated as a core file as well. */
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format. */
+ bfd_generic_archive_p, coff_object_p},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format. */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents. */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
diff --git a/contrib/binutils/bfd/pe-ppc.c b/contrib/binutils/bfd/pe-ppc.c
index adbf3176e691..93cf6367c6e7 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, 2001 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,8 +15,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/peXXigen.c b/contrib/binutils/bfd/peXXigen.c
index 598aa7cfa03b..71300219d303 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
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Most of this hacked by Steve Chamberlain <sac@cygnus.com>.
@@ -88,20 +88,9 @@
the code is in peigen.c. PowerPC NT is said to be dead. If
anybody wants to revive the code, you will have to figure out how
to handle those issues. */
-
-static void add_data_entry
- PARAMS ((bfd *, struct internal_extra_pe_aouthdr *, int, char *, bfd_vma));
-static bfd_boolean pe_print_pdata PARAMS ((bfd *, PTR));
-static bfd_boolean pe_print_reloc PARAMS ((bfd *, PTR));
-static bfd_boolean pe_print_idata PARAMS ((bfd *, PTR));
-static bfd_boolean pe_print_edata PARAMS ((bfd *, PTR));
-
void
-_bfd_XXi_swap_sym_in (abfd, ext1, in1)
- bfd *abfd;
- PTR ext1;
- PTR in1;
+_bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1)
{
SYMENT *ext = (SYMENT *) ext1;
struct internal_syment *in = (struct internal_syment *) in1;
@@ -138,24 +127,6 @@ _bfd_XXi_swap_sym_in (abfd, ext1, in1)
{
in->n_value = 0x0;
-#if 0
- /* FIXME: This is clearly wrong. The problem seems to be that
- undefined C_SECTION symbols appear in the first object of a
- MS generated .lib file, and the symbols are not defined
- anywhere. */
- in->n_scnum = 1;
-
- /* I have tried setting the class to 3 and using the following
- to set the section number. This will put the address of the
- pointer to the string kernel32.dll at addresses 0 and 0x10
- off start of idata section which is not correct. */
-#if 0
- if (strcmp (in->_n._n_name, ".idata$4") == 0)
- in->n_scnum = 3;
- else
- in->n_scnum = 2;
-#endif
-#else
/* Create synthetic empty sections as needed. DJ */
if (in->n_scnum == 0)
{
@@ -189,16 +160,14 @@ _bfd_XXi_swap_sym_in (abfd, ext1, in1)
sec->vma = 0;
sec->lma = 0;
- sec->_cooked_size = 0;
- sec->_raw_size = 0;
+ sec->size = 0;
sec->filepos = 0;
sec->rel_filepos = 0;
sec->reloc_count = 0;
sec->line_filepos = 0;
sec->lineno_count = 0;
sec->userdata = NULL;
- sec->next = (asection *) NULL;
- sec->flags = 0;
+ sec->next = NULL;
sec->alignment_power = 2;
sec->flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_DATA | SEC_LOAD;
@@ -207,7 +176,6 @@ _bfd_XXi_swap_sym_in (abfd, ext1, in1)
in->n_scnum = unused_section_number;
}
in->n_sclass = C_STAT;
-#endif
}
#endif
@@ -219,10 +187,7 @@ _bfd_XXi_swap_sym_in (abfd, ext1, in1)
}
unsigned int
-_bfd_XXi_swap_sym_out (abfd, inp, extp)
- bfd *abfd;
- PTR inp;
- PTR extp;
+_bfd_XXi_swap_sym_out (bfd * abfd, void * inp, void * extp)
{
struct internal_syment *in = (struct internal_syment *) inp;
SYMENT *ext = (SYMENT *) extp;
@@ -250,14 +215,13 @@ _bfd_XXi_swap_sym_out (abfd, inp, extp)
}
void
-_bfd_XXi_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
- bfd *abfd;
- PTR ext1;
- int type;
- int class;
- int indx ATTRIBUTE_UNUSED;
- int numaux ATTRIBUTE_UNUSED;
- PTR in1;
+_bfd_XXi_swap_aux_in (bfd * abfd,
+ void * ext1,
+ int type,
+ int class,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void * in1)
{
AUXENT *ext = (AUXENT *) ext1;
union internal_auxent *in = (union internal_auxent *) in1;
@@ -322,19 +286,19 @@ _bfd_XXi_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
}
unsigned int
-_bfd_XXi_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
- bfd *abfd;
- PTR inp;
- int type;
- int class;
- int indx ATTRIBUTE_UNUSED;
- int numaux ATTRIBUTE_UNUSED;
- PTR extp;
+_bfd_XXi_swap_aux_out (bfd * abfd,
+ void * inp,
+ int type,
+ int class,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void * extp)
{
union internal_auxent *in = (union internal_auxent *) inp;
AUXENT *ext = (AUXENT *) extp;
- memset ((PTR) ext, 0, AUXESZ);
+ memset (ext, 0, AUXESZ);
+
switch (class)
{
case C_FILE:
@@ -396,10 +360,7 @@ _bfd_XXi_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
}
void
-_bfd_XXi_swap_lineno_in (abfd, ext1, in1)
- bfd *abfd;
- PTR ext1;
- PTR in1;
+_bfd_XXi_swap_lineno_in (bfd * abfd, void * ext1, void * in1)
{
LINENO *ext = (LINENO *) ext1;
struct internal_lineno *in = (struct internal_lineno *) in1;
@@ -409,10 +370,7 @@ _bfd_XXi_swap_lineno_in (abfd, ext1, in1)
}
unsigned int
-_bfd_XXi_swap_lineno_out (abfd, inp, outp)
- bfd *abfd;
- PTR inp;
- PTR outp;
+_bfd_XXi_swap_lineno_out (bfd * abfd, void * inp, void * outp)
{
struct internal_lineno *in = (struct internal_lineno *) inp;
struct external_lineno *ext = (struct external_lineno *) outp;
@@ -423,14 +381,13 @@ _bfd_XXi_swap_lineno_out (abfd, inp, outp)
}
void
-_bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
- bfd *abfd;
- PTR aouthdr_ext1;
- PTR aouthdr_int1;
+_bfd_XXi_swap_aouthdr_in (bfd * abfd,
+ void * aouthdr_ext1,
+ void * aouthdr_int1)
{
struct internal_extra_pe_aouthdr *a;
- PEAOUTHDR *src = (PEAOUTHDR *) (aouthdr_ext1);
- AOUTHDR *aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
+ PEAOUTHDR * src = (PEAOUTHDR *) (aouthdr_ext1);
+ AOUTHDR * aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
struct internal_aouthdr *aouthdr_int = (struct internal_aouthdr *)aouthdr_int1;
aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
@@ -442,7 +399,7 @@ _bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
aouthdr_int->text_start =
GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
#ifndef COFF_WITH_pep
- /* PE32+ does not have data_start member! */
+ /* PE32+ does not have data_start member! */
aouthdr_int->data_start =
GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
#endif
@@ -511,7 +468,7 @@ _bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
}
#ifndef COFF_WITH_pep
- /* PE32+ does not have data_start member! */
+ /* PE32+ does not have data_start member! */
if (aouthdr_int->dsize)
{
aouthdr_int->data_start += a->ImageBase;
@@ -532,12 +489,11 @@ _bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
/* A support function for below. */
static void
-add_data_entry (abfd, aout, idx, name, base)
- bfd *abfd;
- struct internal_extra_pe_aouthdr *aout;
- int idx;
- char *name;
- bfd_vma base;
+add_data_entry (bfd * abfd,
+ struct internal_extra_pe_aouthdr *aout,
+ int idx,
+ char *name,
+ bfd_vma base)
{
asection *sec = bfd_get_section_by_name (abfd, name);
@@ -560,10 +516,7 @@ add_data_entry (abfd, aout, idx, name, base)
}
unsigned int
-_bfd_XXi_swap_aouthdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+_bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
{
struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
pe_data_type *pe = pe_data (abfd);
@@ -658,14 +611,19 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
{
asection *sec;
+ bfd_vma hsize = 0;
bfd_vma dsize = 0;
- bfd_vma isize = SA(abfd->sections->filepos);
+ bfd_vma isize = 0;
bfd_vma tsize = 0;
for (sec = abfd->sections; sec; sec = sec->next)
{
- int rounded = FA(sec->_raw_size);
+ int rounded = FA (sec->size);
+ /* The first non-zero section filepos is the header size.
+ Sections without contents will have a filepos of 0. */
+ if (hsize == 0)
+ hsize = sec->filepos;
if (sec->flags & SEC_DATA)
dsize += rounded;
if (sec->flags & SEC_CODE)
@@ -682,10 +640,10 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
aouthdr_in->dsize = dsize;
aouthdr_in->tsize = tsize;
- extra->SizeOfImage = isize;
+ extra->SizeOfHeaders = hsize;
+ extra->SizeOfImage = SA (hsize) + isize;
}
- extra->SizeOfHeaders = abfd->sections->filepos;
H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->standard.magic);
#define LINKER_VERSION 256 /* That is, 2.56 */
@@ -754,10 +712,7 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
}
unsigned int
-_bfd_XXi_only_swap_filehdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+_bfd_XXi_only_swap_filehdr_out (bfd * abfd, void * in, void * out)
{
int idx;
struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
@@ -865,10 +820,7 @@ _bfd_XXi_only_swap_filehdr_out (abfd, in, out)
}
unsigned int
-_bfd_XX_only_swap_filehdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+_bfd_XX_only_swap_filehdr_out (bfd * abfd, void * in, void * out)
{
struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
FILHDR *filehdr_out = (FILHDR *) out;
@@ -885,10 +837,7 @@ _bfd_XX_only_swap_filehdr_out (abfd, in, out)
}
unsigned int
-_bfd_XXi_swap_scnhdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+_bfd_XXi_swap_scnhdr_out (bfd * abfd, void * in, void * out)
{
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
SCNHDR *scnhdr_ext = (SCNHDR *) out;
@@ -983,7 +932,6 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
};
pe_required_section_flags * p;
- int flags = scnhdr_int->s_flags;
/* We have defaulted to adding the IMAGE_SCN_MEM_WRITE flag, but now
we know exactly what this specific section wants so we remove it
@@ -998,12 +946,12 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
{
if (strcmp (scnhdr_int->s_name, ".text")
|| (bfd_get_file_flags (abfd) & WP_TEXT))
- flags &= ~IMAGE_SCN_MEM_WRITE;
- flags |= p->must_have;
+ scnhdr_int->s_flags &= ~IMAGE_SCN_MEM_WRITE;
+ scnhdr_int->s_flags |= p->must_have;
break;
}
- H_PUT_32 (abfd, flags, scnhdr_ext->s_flags);
+ H_PUT_32 (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
}
if (coff_data (abfd)->link_info
@@ -1048,38 +996,30 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nreloc);
scnhdr_int->s_flags |= IMAGE_SCN_LNK_NRELOC_OVFL;
H_PUT_32 (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
-#if 0
- (*_bfd_error_handler) (_("%s: reloc overflow 1: 0x%lx > 0xffff"),
- bfd_get_filename (abfd),
- scnhdr_int->s_nreloc);
- bfd_set_error (bfd_error_file_truncated);
- H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nreloc);
- ret = 0;
-#endif
}
}
return ret;
}
static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] =
- {
- N_("Export Directory [.edata (or where ever we found it)]"),
- N_("Import Directory [parts of .idata]"),
- N_("Resource Directory [.rsrc]"),
- N_("Exception Directory [.pdata]"),
- N_("Security Directory"),
- N_("Base Relocation Directory [.reloc]"),
- N_("Debug Directory"),
- N_("Description Directory"),
- N_("Special Directory"),
- N_("Thread Storage Directory [.tls]"),
- N_("Load Configuration Directory"),
- N_("Bound Import Directory"),
- N_("Import Address Table Directory"),
- N_("Delay Import Directory"),
- N_("Reserved"),
- N_("Reserved")
- };
+{
+ N_("Export Directory [.edata (or where ever we found it)]"),
+ N_("Import Directory [parts of .idata]"),
+ N_("Resource Directory [.rsrc]"),
+ N_("Exception Directory [.pdata]"),
+ N_("Security Directory"),
+ N_("Base Relocation Directory [.reloc]"),
+ N_("Debug Directory"),
+ N_("Description Directory"),
+ N_("Special Directory"),
+ N_("Thread Storage Directory [.tls]"),
+ N_("Load Configuration Directory"),
+ N_("Bound Import Directory"),
+ N_("Import Address Table Directory"),
+ N_("Delay Import Directory"),
+ N_("Reserved"),
+ N_("Reserved")
+};
#ifdef POWERPC_LE_PE
/* The code for the PPC really falls in the "architecture dependent"
@@ -1090,9 +1030,7 @@ static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] =
#endif
static bfd_boolean
-pe_print_idata (abfd, vfile)
- bfd *abfd;
- PTR vfile;
+pe_print_idata (bfd * abfd, void * vfile)
{
FILE *file = (FILE *) vfile;
bfd_byte *data;
@@ -1106,7 +1044,6 @@ pe_print_idata (abfd, vfile)
bfd_size_type datasize = 0;
bfd_size_type dataoff;
bfd_size_type i;
- bfd_size_type amt;
int onaline = 20;
pe_data_type *pe = pe_data (abfd);
@@ -1124,7 +1061,7 @@ pe_print_idata (abfd, vfile)
return TRUE;
addr = section->vma;
- datasize = bfd_section_size (abfd, section);
+ datasize = section->size;
if (datasize == 0)
return TRUE;
}
@@ -1133,7 +1070,7 @@ pe_print_idata (abfd, vfile)
addr += extra->ImageBase;
for (section = abfd->sections; section != NULL; section = section->next)
{
- datasize = bfd_section_size (abfd, section);
+ datasize = section->size;
if (addr >= section->vma && addr < section->vma + datasize)
break;
}
@@ -1153,7 +1090,7 @@ pe_print_idata (abfd, vfile)
datasize -= dataoff;
#ifdef POWERPC_LE_PE
- if (rel_section != 0 && bfd_section_size (abfd, rel_section) != 0)
+ if (rel_section != 0 && rel_section->size != 0)
{
/* The toc address can be found by taking the starting address,
which on the PPC locates a function descriptor. The
@@ -1165,19 +1102,25 @@ pe_print_idata (abfd, vfile)
bfd_vma loadable_toc_address;
bfd_vma toc_address;
bfd_vma start_address;
- bfd_byte *data = 0;
- int offset;
+ bfd_byte *data;
+ bfd_vma offset;
- amt = bfd_section_size (abfd, rel_section);
- data = (bfd_byte *) bfd_malloc (amt);
- if (data == NULL && amt != 0)
- return FALSE;
-
- bfd_get_section_contents (abfd, rel_section, (PTR) data, (bfd_vma) 0,
- amt);
+ if (!bfd_malloc_and_get_section (abfd, rel_section, &data))
+ {
+ if (data != NULL)
+ free (data);
+ return FALSE;
+ }
offset = abfd->start_address - rel_section->vma;
+ if (offset >= rel_section->size || offset + 8 > rel_section->size)
+ {
+ if (data != NULL)
+ free (data);
+ return FALSE;
+ }
+
start_address = bfd_get_32 (abfd, data + offset);
loadable_toc_address = bfd_get_32 (abfd, data + offset + 4);
toc_address = loadable_toc_address - 32768;
@@ -1188,6 +1131,8 @@ pe_print_idata (abfd, vfile)
fprintf (file,
_("\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"),
start_address, loadable_toc_address, toc_address);
+ if (data != NULL)
+ free (data);
}
else
{
@@ -1204,14 +1149,13 @@ pe_print_idata (abfd, vfile)
vma: Hint Time Forward DLL First\n\
Table Stamp Chain Name Thunk\n"));
- amt = dataoff + datasize;
- data = (bfd_byte *) bfd_malloc (amt);
- if (data == NULL)
- return FALSE;
-
/* Read the whole section. Some of the fields might be before dataoff. */
- if (! bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0, amt))
- return FALSE;
+ if (!bfd_malloc_and_get_section (abfd, section, &data))
+ {
+ if (data != NULL)
+ free (data);
+ return FALSE;
+ }
adj = section->vma - extra->ImageBase;
@@ -1229,11 +1173,6 @@ pe_print_idata (abfd, vfile)
/* Print (i + extra->DataDirectory[1].VirtualAddress). */
fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff));
-#if 0
- if (i + 20 > datasize)
- /* Check stuff. */
- ;
-#endif
hint_addr = bfd_get_32 (abfd, data + i + dataoff);
time_stamp = bfd_get_32 (abfd, data + i + 4 + dataoff);
forward_chain = bfd_get_32 (abfd, data + i + 8 + dataoff);
@@ -1250,6 +1189,9 @@ pe_print_idata (abfd, vfile)
if (hint_addr == 0 && first_thunk == 0)
break;
+ if (dll_name - adj >= section->size)
+ break;
+
dll = (char *) data + dll_name - adj;
fprintf (file, _("\n\tDLL Name: %s\n"), dll);
@@ -1278,7 +1220,7 @@ pe_print_idata (abfd, vfile)
ft_section != NULL;
ft_section = ft_section->next)
{
- ft_datasize = bfd_section_size (abfd, ft_section);
+ ft_datasize = ft_section->size;
if (ft_addr >= ft_section->vma
&& ft_addr < ft_section->vma + ft_datasize)
break;
@@ -1301,15 +1243,13 @@ pe_print_idata (abfd, vfile)
else
{
ft_idx = first_thunk - (ft_section->vma - extra->ImageBase);
- ft_data = (bfd_byte *) bfd_malloc (datasize);
+ ft_data = bfd_malloc (datasize);
if (ft_data == NULL)
continue;
/* Read datasize bfd_bytes starting at offset ft_idx. */
- if (! bfd_get_section_contents (abfd, ft_section,
- (PTR) ft_data,
- (bfd_vma) ft_idx,
- datasize))
+ if (! bfd_get_section_contents
+ (abfd, ft_section, ft_data, (bfd_vma) ft_idx, datasize))
{
free (ft_data);
continue;
@@ -1367,9 +1307,7 @@ pe_print_idata (abfd, vfile)
}
static bfd_boolean
-pe_print_edata (abfd, vfile)
- bfd *abfd;
- PTR vfile;
+pe_print_edata (bfd * abfd, void * vfile)
{
FILE *file = (FILE *) vfile;
bfd_byte *data;
@@ -1380,17 +1318,17 @@ pe_print_edata (abfd, vfile)
bfd_signed_vma adj;
struct EDT_type
{
- long export_flags; /* reserved - should be zero */
+ long export_flags; /* Reserved - should be zero. */
long time_stamp;
short major_ver;
short minor_ver;
- bfd_vma name; /* rva - relative to image base */
- long base; /* ordinal base */
- unsigned long num_functions;/* Number in the export address table */
- unsigned long num_names; /* Number in the name pointer table */
- bfd_vma eat_addr; /* rva to the export address table */
- bfd_vma npt_addr; /* rva to the Export Name Pointer Table */
- bfd_vma ot_addr; /* rva to the Ordinal Table */
+ bfd_vma name; /* RVA - relative to image base. */
+ long base; /* Ordinal base. */
+ unsigned long num_functions;/* Number in the export address table. */
+ unsigned long num_names; /* Number in the name pointer table. */
+ bfd_vma eat_addr; /* RVA to the export address table. */
+ bfd_vma npt_addr; /* RVA to the Export Name Pointer Table. */
+ bfd_vma ot_addr; /* RVA to the Ordinal Table. */
} edt;
pe_data_type *pe = pe_data (abfd);
@@ -1408,7 +1346,8 @@ pe_print_edata (abfd, vfile)
return TRUE;
addr = section->vma;
- datasize = bfd_section_size (abfd, section);
+ dataoff = 0;
+ datasize = section->size;
if (datasize == 0)
return TRUE;
}
@@ -1417,12 +1356,8 @@ pe_print_edata (abfd, vfile)
addr += extra->ImageBase;
for (section = abfd->sections; section != NULL; section = section->next)
- {
- datasize = bfd_section_size (abfd, section);
-
- if (addr >= section->vma && addr < section->vma + datasize)
- break;
- }
+ if (addr >= section->vma && addr < section->vma + section->size)
+ break;
if (section == NULL)
{
@@ -1430,19 +1365,26 @@ pe_print_edata (abfd, vfile)
_("\nThere is an export table, but the section containing it could not be found\n"));
return TRUE;
}
+
+ dataoff = addr - section->vma;
+ datasize = extra->DataDirectory[0].Size;
+ if (datasize > section->size - dataoff)
+ {
+ fprintf (file,
+ _("\nThere is an export table in %s, but it does not fit into that section\n"),
+ section->name);
+ return TRUE;
+ }
}
fprintf (file, _("\nThere is an export table in %s at 0x%lx\n"),
section->name, (unsigned long) addr);
- dataoff = addr - section->vma;
- datasize -= dataoff;
-
- data = (bfd_byte *) bfd_malloc (datasize);
+ data = bfd_malloc (datasize);
if (data == NULL)
return FALSE;
- if (! bfd_get_section_contents (abfd, section, (PTR) data,
+ if (! bfd_get_section_contents (abfd, section, data,
(file_ptr) dataoff, datasize))
return FALSE;
@@ -1519,8 +1461,7 @@ pe_print_edata (abfd, vfile)
{
long export_rva;
long forwarder_rva;
- } export_address_table_entry;
- */
+ } export_address_table_entry; */
fprintf (file,
_("\nExport Address Table -- Ordinal Base %ld\n"),
@@ -1590,9 +1531,7 @@ pe_print_edata (abfd, vfile)
covers and the address of the corresponding unwind info data. */
static bfd_boolean
-pe_print_pdata (abfd, vfile)
- bfd *abfd;
- PTR vfile;
+pe_print_pdata (bfd * abfd, void * vfile)
{
#ifdef COFF_WITH_pep
# define PDATA_ROW_SIZE (3*8)
@@ -1629,16 +1568,16 @@ pe_print_pdata (abfd, vfile)
\t\tAddress Address Handler Data Address Mask\n"));
#endif
- datasize = bfd_section_size (abfd, section);
+ datasize = section->size;
if (datasize == 0)
return TRUE;
- data = (bfd_byte *) bfd_malloc (datasize);
- if (data == NULL && datasize != 0)
- return FALSE;
-
- bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0,
- datasize);
+ if (! bfd_malloc_and_get_section (abfd, section, &data))
+ {
+ if (data != NULL)
+ free (data);
+ return FALSE;
+ }
start = 0;
@@ -1685,12 +1624,12 @@ pe_print_pdata (abfd, vfile)
if (eh_handler == 0 && eh_data != 0)
{
/* Special bits here, although the meaning may be a little
- mysterious. The only one I know for sure is 0x03. */
- /* Code Significance */
- /* 0x00 None */
- /* 0x01 Register Save Millicode */
- /* 0x02 Register Restore Millicode */
- /* 0x03 Glue Code Sequence */
+ mysterious. The only one I know for sure is 0x03
+ Code Significance
+ 0x00 None
+ 0x01 Register Save Millicode
+ 0x02 Register Restore Millicode
+ 0x03 Glue Code Sequence. */
switch (eh_data)
{
case 0x01:
@@ -1717,26 +1656,24 @@ pe_print_pdata (abfd, vfile)
#define IMAGE_REL_BASED_HIGHADJ 4
static const char * const tbl[] =
- {
- "ABSOLUTE",
- "HIGH",
- "LOW",
- "HIGHLOW",
- "HIGHADJ",
- "MIPS_JMPADDR",
- "SECTION",
- "REL32",
- "RESERVED1",
- "MIPS_JMPADDR16",
- "DIR64",
- "HIGH3ADJ"
- "UNKNOWN", /* MUST be last */
- };
+{
+ "ABSOLUTE",
+ "HIGH",
+ "LOW",
+ "HIGHLOW",
+ "HIGHADJ",
+ "MIPS_JMPADDR",
+ "SECTION",
+ "REL32",
+ "RESERVED1",
+ "MIPS_JMPADDR16",
+ "DIR64",
+ "HIGH3ADJ",
+ "UNKNOWN", /* MUST be last. */
+};
static bfd_boolean
-pe_print_reloc (abfd, vfile)
- bfd *abfd;
- PTR vfile;
+pe_print_reloc (bfd * abfd, void * vfile)
{
FILE *file = (FILE *) vfile;
bfd_byte *data = 0;
@@ -1748,23 +1685,23 @@ pe_print_reloc (abfd, vfile)
if (section == NULL)
return TRUE;
- if (bfd_section_size (abfd, section) == 0)
+ if (section->size == 0)
return TRUE;
fprintf (file,
_("\n\nPE File Base Relocations (interpreted .reloc section contents)\n"));
- datasize = bfd_section_size (abfd, section);
- data = (bfd_byte *) bfd_malloc (datasize);
- if (data == NULL && datasize != 0)
- return FALSE;
-
- bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0,
- datasize);
+ datasize = section->size;
+ if (! bfd_malloc_and_get_section (abfd, section, &data))
+ {
+ if (data != NULL)
+ free (data);
+ return FALSE;
+ }
start = 0;
- stop = bfd_section_size (abfd, section);
+ stop = section->size;
for (i = start; i < stop;)
{
@@ -1822,9 +1759,7 @@ pe_print_reloc (abfd, vfile)
/* Print out the program headers. */
bfd_boolean
-_bfd_XX_print_private_bfd_data_common (abfd, vfile)
- bfd *abfd;
- PTR vfile;
+_bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile)
{
FILE *file = (FILE *) vfile;
int j;
@@ -1838,16 +1773,17 @@ _bfd_XX_print_private_bfd_data_common (abfd, vfile)
fprintf (file, _("\nCharacteristics 0x%x\n"), pe->real_flags);
#undef PF
#define PF(x, y) if (pe->real_flags & x) { fprintf (file, "\t%s\n", y); }
- PF (F_RELFLG, "relocations stripped");
- PF (F_EXEC, "executable");
- PF (F_LNNO, "line numbers stripped");
- PF (F_LSYMS, "symbols stripped");
- PF (0x80, "little endian");
- PF (F_AR32WR, "32 bit words");
- PF (0x200, "debugging information removed");
- PF (0x1000, "system file");
- PF (F_DLL, "DLL");
- PF (0x8000, "big endian");
+ PF (IMAGE_FILE_RELOCS_STRIPPED, "relocations stripped");
+ PF (IMAGE_FILE_EXECUTABLE_IMAGE, "executable");
+ PF (IMAGE_FILE_LINE_NUMS_STRIPPED, "line numbers stripped");
+ PF (IMAGE_FILE_LOCAL_SYMS_STRIPPED, "symbols stripped");
+ PF (IMAGE_FILE_LARGE_ADDRESS_AWARE, "large address aware");
+ PF (IMAGE_FILE_BYTES_REVERSED_LO, "little endian");
+ PF (IMAGE_FILE_32BIT_MACHINE, "32 bit words");
+ PF (IMAGE_FILE_DEBUG_STRIPPED, "debugging information removed");
+ PF (IMAGE_FILE_SYSTEM, "system file");
+ PF (IMAGE_FILE_DLL, "DLL");
+ PF (IMAGE_FILE_BYTES_REVERSED_HI, "big endian");
#undef PF
/* ctime implies '\n'. */
@@ -1939,8 +1875,7 @@ _bfd_XX_print_private_bfd_data_common (abfd, vfile)
to the output bfd. */
bfd_boolean
-_bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd)
- bfd *ibfd, *obfd;
+_bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd)
{
/* One day we may try to grok other private data. */
if (ibfd->xvec->flavour != bfd_target_coff_flavour
@@ -1963,11 +1898,10 @@ _bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd)
/* Copy private section data. */
bfd_boolean
-_bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
- bfd *ibfd;
- asection *isec;
- bfd *obfd;
- asection *osec;
+_bfd_XX_bfd_copy_private_section_data (bfd *ibfd,
+ asection *isec,
+ bfd *obfd,
+ asection *osec)
{
if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour
|| bfd_get_flavour (obfd) != bfd_target_coff_flavour)
@@ -1979,7 +1913,7 @@ _bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
if (coff_section_data (obfd, osec) == NULL)
{
bfd_size_type amt = sizeof (struct coff_section_tdata);
- osec->used_by_bfd = (PTR) bfd_zalloc (obfd, amt);
+ osec->used_by_bfd = bfd_zalloc (obfd, amt);
if (osec->used_by_bfd == NULL)
return FALSE;
}
@@ -1987,7 +1921,7 @@ _bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
if (pei_section_data (obfd, osec) == NULL)
{
bfd_size_type amt = sizeof (struct pei_section_tdata);
- coff_section_data (obfd, osec)->tdata = (PTR) bfd_zalloc (obfd, amt);
+ coff_section_data (obfd, osec)->tdata = bfd_zalloc (obfd, amt);
if (coff_section_data (obfd, osec)->tdata == NULL)
return FALSE;
}
@@ -2002,29 +1936,16 @@ _bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
}
void
-_bfd_XX_get_symbol_info (abfd, symbol, ret)
- bfd *abfd;
- asymbol *symbol;
- symbol_info *ret;
+_bfd_XX_get_symbol_info (bfd * abfd, asymbol *symbol, symbol_info *ret)
{
coff_get_symbol_info (abfd, symbol, ret);
-#if 0 /* This code no longer appears to be necessary.
- ImageBase has already been added in by coff_swap_scnhdr_in. */
- if (pe_data (abfd) != NULL
- && ((symbol->flags & BSF_DEBUGGING) == 0
- || (symbol->flags & BSF_DEBUGGING_RELOC) != 0)
- && ! bfd_is_abs_section (symbol->section))
- ret->value += pe_data (abfd)->pe_opthdr.ImageBase;
-#endif
}
/* Handle the .idata section and other things that need symbol table
access. */
bfd_boolean
-_bfd_XXi_final_link_postscript (abfd, pfinfo)
- bfd *abfd;
- struct coff_final_link_info *pfinfo;
+_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;
diff --git a/contrib/binutils/bfd/pei-mips.c b/contrib/binutils/bfd/pei-mips.c
index 976b2f995e0b..0c9b962f2b6d 100644
--- a/contrib/binutils/bfd/pei-mips.c
+++ b/contrib/binutils/bfd/pei-mips.c
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
diff --git a/contrib/binutils/bfd/peicode.h b/contrib/binutils/bfd/peicode.h
index 41445e592c3f..2061f415af61 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
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Most of this hacked by Steve Chamberlain,
sac@cygnus.com
@@ -55,8 +55,7 @@
#include "libpei.h"
-static bfd_boolean (*pe_saved_coff_bfd_print_private_bfd_data)
- PARAMS ((bfd *, PTR)) =
+static bfd_boolean (*pe_saved_coff_bfd_print_private_bfd_data) (bfd *, void *) =
#ifndef coff_bfd_print_private_bfd_data
NULL;
#else
@@ -64,11 +63,10 @@ static bfd_boolean (*pe_saved_coff_bfd_print_private_bfd_data)
#undef coff_bfd_print_private_bfd_data
#endif
-static bfd_boolean pe_print_private_bfd_data PARAMS ((bfd *, PTR));
+static bfd_boolean pe_print_private_bfd_data (bfd *, void *);
#define coff_bfd_print_private_bfd_data pe_print_private_bfd_data
-static bfd_boolean (*pe_saved_coff_bfd_copy_private_bfd_data)
- PARAMS ((bfd *, bfd *)) =
+static bfd_boolean (*pe_saved_coff_bfd_copy_private_bfd_data) (bfd *, bfd *) =
#ifndef coff_bfd_copy_private_bfd_data
NULL;
#else
@@ -76,21 +74,12 @@ static bfd_boolean (*pe_saved_coff_bfd_copy_private_bfd_data)
#undef coff_bfd_copy_private_bfd_data
#endif
-static bfd_boolean pe_bfd_copy_private_bfd_data PARAMS ((bfd *, bfd *));
+static bfd_boolean pe_bfd_copy_private_bfd_data (bfd *, bfd *);
#define coff_bfd_copy_private_bfd_data pe_bfd_copy_private_bfd_data
#define coff_mkobject pe_mkobject
#define coff_mkobject_hook pe_mkobject_hook
-#ifndef NO_COFF_RELOCS
-static void coff_swap_reloc_in PARAMS ((bfd *, PTR, PTR));
-static unsigned int coff_swap_reloc_out PARAMS ((bfd *, PTR, PTR));
-#endif
-static void coff_swap_filehdr_in PARAMS ((bfd *, PTR, PTR));
-static void coff_swap_scnhdr_in PARAMS ((bfd *, PTR, PTR));
-static bfd_boolean pe_mkobject PARAMS ((bfd *));
-static PTR pe_mkobject_hook PARAMS ((bfd *, PTR, PTR));
-
#ifdef COFF_IMAGE_WITH_PE
/* This structure contains static variables used by the ILF code. */
typedef asection * asection_ptr;
@@ -130,76 +119,54 @@ typedef struct
struct internal_reloc * int_reltab;
}
pe_ILF_vars;
-
-static asection_ptr pe_ILF_make_a_section PARAMS ((pe_ILF_vars *, const char *, unsigned int, flagword));
-static void pe_ILF_make_a_reloc PARAMS ((pe_ILF_vars *, bfd_vma, bfd_reloc_code_real_type, asection_ptr));
-static void pe_ILF_make_a_symbol PARAMS ((pe_ILF_vars *, const char *, const char *, asection_ptr, flagword));
-static void pe_ILF_save_relocs PARAMS ((pe_ILF_vars *, asection_ptr));
-static void pe_ILF_make_a_symbol_reloc PARAMS ((pe_ILF_vars *, bfd_vma, bfd_reloc_code_real_type, struct bfd_symbol **, unsigned int));
-static bfd_boolean pe_ILF_build_a_bfd PARAMS ((bfd *, unsigned int, bfd_byte *, bfd_byte *, unsigned int, unsigned int));
-static const bfd_target * pe_ILF_object_p PARAMS ((bfd *));
-static const bfd_target * pe_bfd_object_p PARAMS ((bfd *));
#endif /* COFF_IMAGE_WITH_PE */
-
-/**********************************************************************/
-
+
#ifndef NO_COFF_RELOCS
static void
-coff_swap_reloc_in (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+coff_swap_reloc_in (bfd * abfd, void * src, void * dst)
{
RELOC *reloc_src = (RELOC *) src;
struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
- reloc_dst->r_vaddr = H_GET_32 (abfd, reloc_src->r_vaddr);
+ reloc_dst->r_vaddr = H_GET_32 (abfd, reloc_src->r_vaddr);
reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
-
- reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type);
-
+ reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type);
#ifdef SWAP_IN_RELOC_OFFSET
reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
#endif
}
static unsigned int
-coff_swap_reloc_out (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
{
- struct internal_reloc *reloc_src = (struct internal_reloc *)src;
- struct external_reloc *reloc_dst = (struct external_reloc *)dst;
+ struct internal_reloc *reloc_src = (struct internal_reloc *) src;
+ struct external_reloc *reloc_dst = (struct external_reloc *) dst;
+
H_PUT_32 (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
-
H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
-#ifdef SWAP_OUT_RELOC_OFFSET
+#ifdef SWAP_OUT_RELOC_OFFSET
SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
#endif
#ifdef SWAP_OUT_RELOC_EXTRA
- SWAP_OUT_RELOC_EXTRA(abfd, reloc_src, reloc_dst);
+ SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
#endif
return RELSZ;
}
#endif /* not NO_COFF_RELOCS */
static void
-coff_swap_filehdr_in (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
{
FILHDR *filehdr_src = (FILHDR *) src;
struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
- filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic);
- filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src-> f_nscns);
- filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src-> f_timdat);
- filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src-> f_nsyms);
- filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src-> f_flags);
+ filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic);
+ filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns);
+ filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
+ filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms);
+ filehdr_dst->f_flags = H_GET_16 (abfd, filehdr_src->f_flags);
filehdr_dst->f_symptr = H_GET_32 (abfd, filehdr_src->f_symptr);
/* Other people's tools sometimes generate headers with an nsyms but
@@ -220,22 +187,20 @@ coff_swap_filehdr_in (abfd, src, dst)
#endif
static void
-coff_swap_scnhdr_in (abfd, ext, in)
- bfd *abfd;
- PTR ext;
- PTR in;
+coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
{
SCNHDR *scnhdr_ext = (SCNHDR *) ext;
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
- memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
- scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
- scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
- scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
- scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
- scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
+ memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
+
+ scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
+ scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
+ scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
+ scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
+ scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
- scnhdr_int->s_flags = H_GET_32 (abfd, scnhdr_ext->s_flags);
+ scnhdr_int->s_flags = H_GET_32 (abfd, scnhdr_ext->s_flags);
/* MS handles overflow of line numbers by carrying into the reloc
field (it appears). Since it's supposed to be zero for PE
@@ -264,20 +229,16 @@ coff_swap_scnhdr_in (abfd, ext, in)
&& (((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0
&& (! bfd_pe_executable_p (abfd) || scnhdr_int->s_size == 0))
|| (bfd_pe_executable_p (abfd) && scnhdr_int->s_size > scnhdr_int->s_paddr)))
- {
- scnhdr_int->s_size = scnhdr_int->s_paddr;
-
- /* This code used to set scnhdr_int->s_paddr to 0. However,
- coff_set_alignment_hook stores s_paddr in virt_size, which
- only works if it correctly holds the virtual size of the
- section. */
- }
+ /* This code used to set scnhdr_int->s_paddr to 0. However,
+ coff_set_alignment_hook stores s_paddr in virt_size, which
+ only works if it correctly holds the virtual size of the
+ section. */
+ scnhdr_int->s_size = scnhdr_int->s_paddr;
#endif
}
static bfd_boolean
-pe_mkobject (abfd)
- bfd * abfd;
+pe_mkobject (bfd * abfd)
{
pe_data_type *pe;
bfd_size_type amt = sizeof (pe_data_type);
@@ -305,11 +266,11 @@ pe_mkobject (abfd)
}
/* Create the COFF backend specific information. */
-static PTR
-pe_mkobject_hook (abfd, filehdr, aouthdr)
- bfd * abfd;
- PTR filehdr;
- PTR aouthdr ATTRIBUTE_UNUSED;
+
+static void *
+pe_mkobject_hook (bfd * abfd,
+ void * filehdr,
+ void * aouthdr ATTRIBUTE_UNUSED)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
pe_data_type *pe;
@@ -346,7 +307,7 @@ pe_mkobject_hook (abfd, filehdr, aouthdr)
#ifdef COFF_IMAGE_WITH_PE
if (aouthdr)
- pe->pe_opthdr = ((struct internal_aouthdr *)aouthdr)->pe;
+ pe->pe_opthdr = ((struct internal_aouthdr *) aouthdr)->pe;
#endif
#ifdef ARM
@@ -354,36 +315,39 @@ pe_mkobject_hook (abfd, filehdr, aouthdr)
coff_data (abfd) ->flags = 0;
#endif
- return (PTR) pe;
+ return (void *) pe;
}
static bfd_boolean
-pe_print_private_bfd_data (abfd, vfile)
- bfd *abfd;
- PTR vfile;
+pe_print_private_bfd_data (bfd *abfd, void * vfile)
{
FILE *file = (FILE *) vfile;
if (!_bfd_XX_print_private_bfd_data_common (abfd, vfile))
return FALSE;
- if (pe_saved_coff_bfd_print_private_bfd_data != NULL)
- {
- fputc ('\n', file);
+ if (pe_saved_coff_bfd_print_private_bfd_data == NULL)
+ return TRUE;
- return pe_saved_coff_bfd_print_private_bfd_data (abfd, vfile);
- }
+ fputc ('\n', file);
- return TRUE;
+ return pe_saved_coff_bfd_print_private_bfd_data (abfd, vfile);
}
/* Copy any private info we understand from the input bfd
to the output bfd. */
static bfd_boolean
-pe_bfd_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd, *obfd;
+pe_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
{
+ /* PR binutils/716: Copy the large address aware flag.
+ XXX: Should we be copying other flags or other fields in the pe_data()
+ structure ? */
+ if (pe_data (obfd) != NULL
+ && pe_data (ibfd) != NULL
+ && pe_data (ibfd)->real_flags & IMAGE_FILE_LARGE_ADDRESS_AWARE)
+ pe_data (obfd)->real_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
+
if (!_bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd))
return FALSE;
@@ -429,14 +393,14 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd)
#define NUM_ILF_SECTIONS 6
#define NUM_ILF_SYMS (2 + NUM_ILF_SECTIONS)
-#define SIZEOF_ILF_SYMS (NUM_ILF_SYMS * sizeof (* vars.sym_cache))
-#define SIZEOF_ILF_SYM_TABLE (NUM_ILF_SYMS * sizeof (* vars.sym_table))
-#define SIZEOF_ILF_NATIVE_SYMS (NUM_ILF_SYMS * sizeof (* vars.native_syms))
+#define SIZEOF_ILF_SYMS (NUM_ILF_SYMS * sizeof (* vars.sym_cache))
+#define SIZEOF_ILF_SYM_TABLE (NUM_ILF_SYMS * sizeof (* vars.sym_table))
+#define SIZEOF_ILF_NATIVE_SYMS (NUM_ILF_SYMS * sizeof (* vars.native_syms))
#define SIZEOF_ILF_SYM_PTR_TABLE (NUM_ILF_SYMS * sizeof (* vars.sym_ptr_table))
-#define SIZEOF_ILF_EXT_SYMS (NUM_ILF_SYMS * sizeof (* vars.esym_table))
-#define SIZEOF_ILF_RELOCS (NUM_ILF_RELOCS * sizeof (* vars.reltab))
-#define SIZEOF_ILF_INT_RELOCS (NUM_ILF_RELOCS * sizeof (* vars.int_reltab))
-#define SIZEOF_ILF_STRINGS (strlen (symbol_name) * 2 + 8 \
+#define SIZEOF_ILF_EXT_SYMS (NUM_ILF_SYMS * sizeof (* vars.esym_table))
+#define SIZEOF_ILF_RELOCS (NUM_ILF_RELOCS * sizeof (* vars.reltab))
+#define SIZEOF_ILF_INT_RELOCS (NUM_ILF_RELOCS * sizeof (* vars.int_reltab))
+#define SIZEOF_ILF_STRINGS (strlen (symbol_name) * 2 + 8 \
+ 21 + strlen (source_dll) \
+ NUM_ILF_SECTIONS * 9 \
+ STRING_SIZE_SIZE)
@@ -466,12 +430,13 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd)
+ MAX_TEXT_SECTION_SIZE
/* Create an empty relocation against the given symbol. */
+
static void
-pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars,
- bfd_vma address,
- bfd_reloc_code_real_type reloc,
- struct bfd_symbol ** sym,
- unsigned int sym_index)
+pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars,
+ bfd_vma address,
+ bfd_reloc_code_real_type reloc,
+ struct bfd_symbol ** sym,
+ unsigned int sym_index)
{
arelent * entry;
struct internal_reloc * internal;
@@ -487,11 +452,6 @@ pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars,
internal->r_vaddr = address;
internal->r_symndx = sym_index;
internal->r_type = entry->howto->type;
-#if 0 /* These fields do not need to be initialised. */
- internal->r_size = 0;
- internal->r_extern = 0;
- internal->r_offset = 0;
-#endif
vars->relcount ++;
@@ -499,6 +459,7 @@ pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars,
}
/* Create an empty relocation against the given section. */
+
static void
pe_ILF_make_a_reloc (pe_ILF_vars * vars,
bfd_vma address,
@@ -510,6 +471,7 @@ pe_ILF_make_a_reloc (pe_ILF_vars * vars,
}
/* Move the queued relocs into the given section. */
+
static void
pe_ILF_save_relocs (pe_ILF_vars * vars,
asection_ptr sec)
@@ -534,6 +496,7 @@ pe_ILF_save_relocs (pe_ILF_vars * vars,
}
/* Create a global symbol and add it to the relevant tables. */
+
static void
pe_ILF_make_a_symbol (pe_ILF_vars * vars,
const char * prefix,
@@ -583,39 +546,18 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars,
/* The following initialisations are unnecessary - the memory is
zero initialised. They are just kept here as reminders. */
-#if 0
- esym->e.e.e_zeroes = 0;
- esym->e_value = 0;
- esym->e_type = T_NULL;
- esym->e_numaux = 0;
-#endif
/* Initialise the internal symbol structure. */
ent->u.syment.n_sclass = sclass;
ent->u.syment.n_scnum = section->target_index;
ent->u.syment._n._n_n._n_offset = (long) sym;
-#if 0 /* See comment above. */
- ent->u.syment.n_value = 0;
- ent->u.syment.n_flags = 0;
- ent->u.syment.n_type = T_NULL;
- ent->u.syment.n_numaux = 0;
- ent->fix_value = 0;
-#endif
-
sym->symbol.the_bfd = vars->abfd;
sym->symbol.name = vars->string_ptr;
sym->symbol.flags = BSF_EXPORT | BSF_GLOBAL | extra_flags;
sym->symbol.section = section;
sym->native = ent;
-#if 0 /* See comment above. */
- sym->symbol.value = 0;
- sym->symbol.udata.i = 0;
- sym->done_lineno = FALSE;
- sym->lineno = NULL;
-#endif
-
* vars->table_ptr = vars->sym_index;
* vars->sym_ptr_ptr = sym;
@@ -632,6 +574,7 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars,
}
/* Create a section. */
+
static asection_ptr
pe_ILF_make_a_section (pe_ILF_vars * vars,
const char * name,
@@ -755,11 +698,12 @@ static jump_table jtab[] =
#endif
/* Build a full BFD from the information supplied in a ILF object. */
+
static bfd_boolean
pe_ILF_build_a_bfd (bfd * abfd,
unsigned int magic,
- bfd_byte * symbol_name,
- bfd_byte * source_dll,
+ char * symbol_name,
+ char * source_dll,
unsigned int ordinal,
unsigned int types)
{
@@ -784,13 +728,13 @@ pe_ILF_build_a_bfd (bfd * abfd,
case IMPORT_CONST:
/* XXX code yet to be written. */
- _bfd_error_handler (_("%s: Unhandled import type; %x"),
- bfd_archive_filename (abfd), import_type);
+ _bfd_error_handler (_("%B: Unhandled import type; %x"),
+ abfd, import_type);
return FALSE;
default:
- _bfd_error_handler (_("%s: Unrecognised import type; %x"),
- bfd_archive_filename (abfd), import_type);
+ _bfd_error_handler (_("%B: Unrecognised import type; %x"),
+ abfd, import_type);
return FALSE;
}
@@ -803,8 +747,8 @@ pe_ILF_build_a_bfd (bfd * abfd,
break;
default:
- _bfd_error_handler (_("%s: Unrecognised import name type; %x"),
- bfd_archive_filename (abfd), import_name_type);
+ _bfd_error_handler (_("%B: Unrecognised import name type; %x"),
+ abfd, import_name_type);
return FALSE;
}
@@ -855,10 +799,10 @@ pe_ILF_build_a_bfd (bfd * abfd,
vars.int_reltab = (struct internal_reloc *) ptr;
ptr += SIZEOF_ILF_INT_RELOCS;
- vars.string_table = ptr;
- vars.string_ptr = ptr + STRING_SIZE_SIZE;
+ vars.string_table = (char *) ptr;
+ vars.string_ptr = (char *) ptr + STRING_SIZE_SIZE;
ptr += SIZEOF_ILF_STRINGS;
- vars.end_string_ptr = ptr;
+ vars.end_string_ptr = (char *) ptr;
/* The remaining space in bim->buffer is used
by the pe_ILF_make_a_section() function. */
@@ -892,6 +836,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
else
{
char * symbol;
+ unsigned int len;
/* Create .idata$6 - the Hint Name Table. */
id6 = pe_ILF_make_a_section (& vars, ".idata$6", SIZEOF_IDATA6, 0);
@@ -901,54 +846,35 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* If necessary, trim the import symbol name. */
symbol = symbol_name;
+ /* As used by MS compiler, '_', '@', and '?' are alternative
+ forms of USER_LABEL_PREFIX, with '?' for c++ mangled names,
+ '@' used for fastcall (in C), '_' everywhere else. Only one
+ of these is used for a symbol. We strip this leading char for
+ IMPORT_NAME_NOPREFIX and IMPORT_NAME_UNDECORATE as per the
+ PE COFF 6.0 spec (section 8.3, Import Name Type). */
+
if (import_name_type != IMPORT_NAME)
{
- bfd_boolean skipped_leading_underscore = FALSE;
- bfd_boolean skipped_leading_at = FALSE;
- bfd_boolean skipped_leading_question_mark = FALSE;
- bfd_boolean check_again;
-
- /* Skip any prefix in symbol_name. */
- -- symbol;
- do
- {
- check_again = FALSE;
- ++ symbol;
-
- switch (*symbol)
- {
- case '@':
- if (! skipped_leading_at)
- check_again = skipped_leading_at = TRUE;
- break;
- case '?':
- if (! skipped_leading_question_mark)
- check_again = skipped_leading_question_mark = TRUE;
- break;
- case '_':
- if (! skipped_leading_underscore)
- check_again = skipped_leading_underscore = TRUE;
- break;
- default:
- break;
- }
- }
- while (check_again);
+ char c = symbol[0];
+ if (c == '_' || c == '@' || c == '?')
+ symbol++;
}
+ len = strlen (symbol);
if (import_name_type == IMPORT_NAME_UNDECORATE)
{
- /* Truncate at the first '@' */
- while (* symbol != 0 && * symbol != '@')
- symbol ++;
+ /* Truncate at the first '@'. */
+ char *at = strchr (symbol, '@');
- * symbol = 0;
+ if (at != NULL)
+ len = at - symbol;
}
id6->contents[0] = ordinal & 0xff;
id6->contents[1] = ordinal >> 8;
- strcpy (id6->contents + 2, symbol);
+ memcpy ((char *) id6->contents + 2, symbol, len);
+ id6->contents[len + 2] = '\0';
}
if (import_name_type != IMPORT_ORDINAL)
@@ -1033,7 +959,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
|| ! bfd_coff_set_arch_mach_hook (abfd, & internal_f))
return FALSE;
- if (bfd_coff_mkobject_hook (abfd, (PTR) & internal_f, NULL) == NULL)
+ if (bfd_coff_mkobject_hook (abfd, (void *) & internal_f, NULL) == NULL)
return FALSE;
coff_data (abfd)->pe = 1;
@@ -1046,7 +972,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* Switch from file contents to memory contents. */
bfd_cache_close (abfd);
- abfd->iostream = (PTR) vars.bim;
+ abfd->iostream = (void *) vars.bim;
abfd->flags |= BFD_IN_MEMORY /* | HAS_LOCALS */;
abfd->where = 0;
obj_sym_filepos (abfd) = 0;
@@ -1060,7 +986,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* Create an import symbol for the DLL, without the
.dll suffix. */
- ptr = strrchr (source_dll, '.');
+ ptr = (bfd_byte *) strrchr (source_dll, '.');
if (ptr)
* ptr = 0;
pe_ILF_make_a_symbol (& vars, "__IMPORT_DESCRIPTOR_", source_dll, NULL, 0);
@@ -1084,7 +1010,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
obj_raw_syments (abfd) = vars.native_syms;
obj_raw_syment_count (abfd) = vars.sym_index;
- obj_coff_external_syms (abfd) = (PTR) vars.esym_table;
+ obj_coff_external_syms (abfd) = (void *) vars.esym_table;
obj_coff_keep_syms (abfd) = TRUE;
obj_convert (abfd) = vars.sym_table;
@@ -1100,13 +1026,14 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* We have detected a Image Library Format archive element.
Decode the element and return the appropriate target. */
+
static const bfd_target *
pe_ILF_object_p (bfd * abfd)
{
bfd_byte buffer[16];
bfd_byte * ptr;
- bfd_byte * symbol_name;
- bfd_byte * source_dll;
+ char * symbol_name;
+ char * source_dll;
unsigned int machine;
bfd_size_type size;
unsigned int ordinal;
@@ -1190,9 +1117,9 @@ pe_ILF_object_p (bfd * abfd)
/* We no longer support PowerPC. */
default:
_bfd_error_handler
- (
-_("%s: Unrecognised machine type (0x%x) in Import Library Format archive"),
- bfd_archive_filename (abfd), machine);
+ (_("%B: Unrecognised machine type (0x%x)"
+ " in Import Library Format archive"),
+ abfd, machine);
bfd_set_error (bfd_error_malformed_archive);
return NULL;
@@ -1202,9 +1129,9 @@ _("%s: Unrecognised machine type (0x%x) in Import Library Format archive"),
if (magic == 0)
{
_bfd_error_handler
- (
-_("%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"),
- bfd_archive_filename (abfd), machine);
+ (_("%B: Recognised but unhandled machine type (0x%x)"
+ " in Import Library Format archive"),
+ abfd, machine);
bfd_set_error (bfd_error_wrong_format);
return NULL;
@@ -1220,8 +1147,7 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
if (size == 0)
{
_bfd_error_handler
- (_("%s: size field is zero in Import Library Format header"),
- bfd_archive_filename (abfd));
+ (_("%B: size field is zero in Import Library Format header"), abfd);
bfd_set_error (bfd_error_malformed_archive);
return NULL;
@@ -1244,15 +1170,15 @@ _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format arc
return NULL;
}
- symbol_name = ptr;
- source_dll = ptr + strlen (ptr) + 1;
+ symbol_name = (char *) ptr;
+ source_dll = symbol_name + strlen (symbol_name) + 1;
/* Verify that the strings are null terminated. */
- if (ptr[size - 1] != 0 || ((unsigned long) (source_dll - ptr) >= size))
+ if (ptr[size - 1] != 0
+ || (bfd_size_type) ((bfd_byte *) source_dll - ptr) >= size)
{
_bfd_error_handler
- (_("%s: string not null terminated in ILF object file."),
- bfd_archive_filename (abfd));
+ (_("%B: string not null terminated in ILF object file."), abfd);
bfd_set_error (bfd_error_malformed_archive);
bfd_release (abfd, ptr);
return NULL;
diff --git a/contrib/binutils/bfd/po/Make-in b/contrib/binutils/bfd/po/Make-in
index 1608b2d6272a..f11ccb41cef0 100644
--- a/contrib/binutils/bfd/po/Make-in
+++ b/contrib/binutils/bfd/po/Make-in
@@ -1,7 +1,8 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright 2001, 2003, 2006 Free Software Foundation, Inc.
#
-# This file file be copied and used freely without restrictions. It can
+# This file may be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
@@ -122,6 +123,7 @@ $(srcdir)/stamp-cat-id: $(PACKAGE).pot
install: install-exec install-data
install-exec:
install-info:
+install-html:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
@@ -197,7 +199,7 @@ check: all
cat-id-tbl.o: ../intl/libgettext.h
-dvi info tags TAGS ID:
+html dvi pdf ps info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
diff --git a/contrib/binutils/bfd/po/SRC-POTFILES.in b/contrib/binutils/bfd/po/SRC-POTFILES.in
index d29593d795b9..8bcf979a5bfb 100644
--- a/contrib/binutils/bfd/po/SRC-POTFILES.in
+++ b/contrib/binutils/bfd/po/SRC-POTFILES.in
@@ -23,11 +23,9 @@ binary.c
bout.c
cache.c
cf-i386lynx.c
-cf-m68klynx.c
cf-sparclynx.c
cisco-core.c
coff64-rs6000.c
-coff-a29k.c
coff-alpha.c
coff-apollo.c
coff-arm.c
@@ -43,6 +41,7 @@ coff-i960.c
cofflink.c
coff-m68k.c
coff-m88k.c
+coff-maxq.c
coff-mips.c
coff-or32.c
coff-rs6000.c
@@ -58,14 +57,17 @@ coff-tic80.c
coff-u68k.c
coff-w65.c
coff-we32k.c
+coff-z80.c
coff-z8k.c
corefile.c
-cpu-a29k.c
cpu-alpha.c
cpu-arc.c
cpu-arm.c
cpu-avr.c
+cpu-bfin.c
+cpu-cr16c.c
cpu-cris.c
+cpu-crx.c
cpu-d10v.c
cpu-d30v.c
cpu-dlx.c
@@ -83,15 +85,18 @@ cpu-ip2k.c
cpu-iq2000.c
cpu-m10200.c
cpu-m10300.c
+cpu-m32c.c
cpu-m32r.c
cpu-m68hc11.c
cpu-m68hc12.c
cpu-m68k.c
cpu-m88k.c
+cpu-maxq.c
cpu-mcore.c
cpu-mips.c
cpu-mmix.c
cpu-msp430.c
+cpu-mt.c
cpu-ns32k.c
cpu-openrisc.c
cpu-or32.c
@@ -110,8 +115,10 @@ cpu-v850.c
cpu-vax.c
cpu-w65.c
cpu-we32k.c
+cpu-xc16x.c
cpu-xstormy16.c
cpu-xtensa.c
+cpu-z80.c
cpu-z8k.c
demo64.c
dwarf1.c
@@ -123,10 +130,13 @@ efi-app-ia32.c
efi-app-ia64.c
elf32-am33lin.c
elf32-arc.c
-elf32-arm.h
+elf32-arm.c
elf32-avr.c
+elf32-bfin.c
elf32.c
+elf32-cr16c.c
elf32-cris.c
+elf32-crx.c
elf32-d10v.c
elf32-d30v.c
elf32-dlx.c
@@ -142,6 +152,7 @@ elf32-i860.c
elf32-i960.c
elf32-ip2k.c
elf32-iq2000.c
+elf32-m32c.c
elf32-m32r.c
elf32-m68hc11.c
elf32-m68hc12.c
@@ -151,6 +162,7 @@ elf32-m88k.c
elf32-mcore.c
elf32-mips.c
elf32-msp430.c
+elf32-mt.c
elf32-openrisc.c
elf32-or32.c
elf32-pj.c
@@ -159,9 +171,11 @@ elf32-s390.c
elf32-sh64.c
elf32-sh64-com.c
elf32-sh.c
+elf32-sh-symbian.c
elf32-sparc.c
elf32-v850.c
elf32-vax.c
+elf32-xc16x.c
elf32-xstormy16.c
elf32-xtensa.c
elf64-alpha.c
@@ -176,8 +190,6 @@ elf64-s390.c
elf64-sh64.c
elf64-sparc.c
elf64-x86-64.c
-elfarm-nabi.c
-elfarm-oabi.c
elf-bfd.h
elf.c
elfcode.h
@@ -189,7 +201,9 @@ elf-m10200.c
elf-m10300.c
elfn32-mips.c
elf-strtab.c
+elf-vxworks.c
elfxx-mips.c
+elfxx-sparc.c
epoc-pe-arm.c
epoc-pei-arm.c
format.c
@@ -229,9 +243,9 @@ linker.c
lynx-core.c
m68k4knetbsd.c
m68klinux.c
-m68klynx.c
m68knetbsd.c
m88kmach3.c
+m88kopenbsd.c
mach-o.c
mach-o.h
merge.c
diff --git a/contrib/binutils/bfd/po/bfd.pot b/contrib/binutils/bfd/po/bfd.pot
index 5d4f2349a028..37c57290aeeb 100644
--- a/contrib/binutils/bfd/po/bfd.pot
+++ b/contrib/binutils/bfd/po/bfd.pot
@@ -1,12 +1,14 @@
# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-07-17 14:52+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-10-25 22:24+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"
@@ -14,154 +16,151 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: aout-adobe.c:204
-#, c-format
-msgid "%s: Unknown section type in a.out.adobe file: %x\n"
+#: aout-adobe.c:127
+msgid "%B: Unknown section type in a.out.adobe file: %x\n"
msgstr ""
-#: aout-cris.c:207
+#: aout-cris.c:202
#, c-format
msgid "%s: Invalid relocation type exported: %d"
msgstr ""
-#: aout-cris.c:251
-#, c-format
-msgid "%s: Invalid relocation type imported: %d"
+#: aout-cris.c:245
+msgid "%B: Invalid relocation type imported: %d"
msgstr ""
-#: aout-cris.c:262
-#, c-format
-msgid "%s: Bad relocation record imported: %d"
+#: aout-cris.c:256
+msgid "%B: Bad relocation record imported: %d"
msgstr ""
-#: aoutx.h:1295 aoutx.h:1716
+#: aoutx.h:1244 aoutx.h:1578
#, c-format
msgid "%s: can not represent section `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1682
+#: aoutx.h:1544
#, c-format
msgid ""
"%s: can not represent section for symbol `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1684
+#: aoutx.h:1546
msgid "*unknown*"
msgstr ""
-#: aoutx.h:3776
+#: aoutx.h:5281
#, c-format
msgid "%s: relocatable link from %s to %s not supported"
msgstr ""
-#: archive.c:1751
+#: archive.c:1760
msgid "Warning: writing archive was slow: rewriting timestamp\n"
msgstr ""
-#: archive.c:2014
+#: archive.c:2019
msgid "Reading archive file mod timestamp"
msgstr ""
-#: archive.c:2040
+#: archive.c:2043
msgid "Writing updated armap timestamp"
msgstr ""
-#: bfd.c:280
+#: bfd.c:279
msgid "No error"
msgstr ""
-#: bfd.c:281
+#: bfd.c:280
msgid "System call error"
msgstr ""
-#: bfd.c:282
+#: bfd.c:281
msgid "Invalid bfd target"
msgstr ""
-#: bfd.c:283
+#: bfd.c:282
msgid "File in wrong format"
msgstr ""
-#: bfd.c:284
+#: bfd.c:283
msgid "Archive object file in wrong format"
msgstr ""
-#: bfd.c:285
+#: bfd.c:284
msgid "Invalid operation"
msgstr ""
-#: bfd.c:286
+#: bfd.c:285
msgid "Memory exhausted"
msgstr ""
-#: bfd.c:287
+#: bfd.c:286
msgid "No symbols"
msgstr ""
-#: bfd.c:288
+#: bfd.c:287
msgid "Archive has no index; run ranlib to add one"
msgstr ""
-#: bfd.c:289
+#: bfd.c:288
msgid "No more archived files"
msgstr ""
-#: bfd.c:290
+#: bfd.c:289
msgid "Malformed archive"
msgstr ""
-#: bfd.c:291
+#: bfd.c:290
msgid "File format not recognized"
msgstr ""
-#: bfd.c:292
+#: bfd.c:291
msgid "File format is ambiguous"
msgstr ""
-#: bfd.c:293
+#: bfd.c:292
msgid "Section has no contents"
msgstr ""
-#: bfd.c:294
+#: bfd.c:293
msgid "Nonrepresentable section on output"
msgstr ""
-#: bfd.c:295
+#: bfd.c:294
msgid "Symbol needs debug section which does not exist"
msgstr ""
-#: bfd.c:296
+#: bfd.c:295
msgid "Bad value"
msgstr ""
-#: bfd.c:297
+#: bfd.c:296
msgid "File truncated"
msgstr ""
-#: bfd.c:298
+#: bfd.c:297
msgid "File too big"
msgstr ""
-#: bfd.c:299
+#: bfd.c:298
msgid "#<Invalid error code>"
msgstr ""
-#: bfd.c:687
+#: bfd.c:771
#, c-format
msgid "BFD %s assertion fail %s:%d"
msgstr ""
-#: bfd.c:703
+#: bfd.c:787
#, c-format
msgid "BFD %s internal error, aborting at %s line %d in %s\n"
msgstr ""
-#: bfd.c:707
+#: bfd.c:791
#, c-format
msgid "BFD %s internal error, aborting at %s line %d\n"
msgstr ""
-#: bfd.c:709
+#: bfd.c:793
msgid "Please report this bug.\n"
msgstr ""
@@ -171,1323 +170,1634 @@ msgid "not mapping: data=%lx mapped=%d\n"
msgstr ""
#: bfdwin.c:205
+#, c-format
msgid "not mapping: env var not set\n"
msgstr ""
-#: binary.c:306
+#: binary.c:285
#, c-format
msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
msgstr ""
-#: coff-rs6000.c:3616 coff64-rs6000.c:2109
-#, c-format
-msgid "%s: symbol `%s' has unrecognized smclas %d"
-msgstr ""
-
-#: coff-a29k.c:120
-msgid "Missing IHCONST"
+#: coff64-rs6000.c:2109 coff-rs6000.c:3610
+msgid "%B: symbol `%s' has unrecognized smclas %d"
msgstr ""
-#: coff-a29k.c:181
-msgid "Missing IHIHALF"
+#: coff-alpha.c:489
+msgid ""
+"%B: Cannot handle compressed Alpha binaries.\n"
+" Use compiler flags, or objZ, to generate uncompressed binaries."
msgstr ""
-#: coff-a29k.c:213 coff-or32.c:236
-msgid "Unrecognized reloc"
+#: coff-alpha.c:646
+msgid "%B: unknown/unsupported relocation type %d"
msgstr ""
-#: coff-a29k.c:409
-msgid "missing IHCONST reloc"
+#: coff-alpha.c:898 coff-alpha.c:935 coff-alpha.c:2007 coff-mips.c:985
+msgid "GP relative relocation used when GP not defined"
msgstr ""
-#: coff-a29k.c:499
-msgid "missing IHIHALF reloc"
+#: coff-alpha.c:1484
+msgid "using multiple gp values"
msgstr ""
-#: coff-alpha.c:884 coff-alpha.c:921 coff-alpha.c:1992 coff-mips.c:1397
-msgid "GP relative relocation used when GP not defined"
+#: coff-alpha.c:1543
+msgid "%B: unsupported relocation: ALPHA_R_GPRELHIGH"
msgstr ""
-#: coff-alpha.c:1488
-msgid "using multiple gp values"
+#: coff-alpha.c:1550
+msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW"
msgstr ""
-#: coff-arm.c:1066 elf32-arm.h:294
-#, c-format
-msgid "%s: unable to find THUMB glue '%s' for `%s'"
+#: coff-alpha.c:1557 elf32-m32r.c:2471 elf64-alpha.c:3912 elf64-alpha.c:4038
+#: elf32-ia64.c:4108 elf64-ia64.c:4108
+msgid "%B: unknown relocation type %d"
msgstr ""
-#: coff-arm.c:1096 elf32-arm.h:329
+#: coff-arm.c:990 elf32-arm.c:1926
#, c-format
-msgid "%s: unable to find ARM glue '%s' for `%s'"
+msgid "%B: unable to find THUMB glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1394 coff-arm.c:1489 elf32-arm.h:892 elf32-arm.h:999
+#: coff-arm.c:1019 elf32-arm.c:1960
#, c-format
-msgid "%s(%s): warning: interworking not enabled."
+msgid "%B: unable to find ARM glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1398 elf32-arm.h:1002
+#: coff-arm.c:1319 elf32-arm.c:2683
#, c-format
-msgid " first occurrence: %s: arm call to thumb"
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+" first occurrence: %B: arm call to thumb"
msgstr ""
-#: coff-arm.c:1493 elf32-arm.h:895
+#: coff-arm.c:1409
#, c-format
-msgid " first occurrence: %s: thumb call to arm"
-msgstr ""
-
-#: coff-arm.c:1496
-msgid " consider relinking with --support-old-code enabled"
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+" first occurrence: %B: thumb call to arm\n"
+" consider relinking with --support-old-code enabled"
msgstr ""
-#: coff-arm.c:1788 coff-tic80.c:687 cofflink.c:3038
-#, c-format
-msgid "%s: bad reloc address 0x%lx in section `%s'"
+#: coff-arm.c:1702 cofflink.c:3015 coff-tic80.c:695
+msgid "%B: bad reloc address 0x%lx in section `%A'"
msgstr ""
-#: coff-arm.c:2132
-#, c-format
-msgid "%s: illegal symbol index in reloc: %d"
+#: coff-arm.c:2028
+msgid "%B: illegal symbol index in reloc: %d"
msgstr ""
-#: coff-arm.c:2265
+#: coff-arm.c:2158
#, c-format
-msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgid "ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"
msgstr ""
-#: coff-arm.c:2280 elf32-arm.h:2328
+#: coff-arm.c:2174 elf32-arm.c:5093
#, c-format
msgid ""
-"ERROR: %s passes floats in float registers, whereas %s passes them in "
+"ERROR: %B passes floats in float registers, whereas %B passes them in "
"integer registers"
msgstr ""
-#: coff-arm.c:2283 elf32-arm.h:2333
+#: coff-arm.c:2177 elf32-arm.c:5097
#, c-format
msgid ""
-"ERROR: %s passes floats in integer registers, whereas %s passes them in "
+"ERROR: %B passes floats in integer registers, whereas %B passes them in "
"float registers"
msgstr ""
-#: coff-arm.c:2298
+#: coff-arm.c:2191
#, c-format
msgid ""
-"ERROR: %s is compiled as position independent code, whereas target %s is "
+"ERROR: %B is compiled as position independent code, whereas target %B is "
"absolute position"
msgstr ""
-#: coff-arm.c:2301
+#: coff-arm.c:2194
#, c-format
msgid ""
-"ERROR: %s is compiled as absolute position code, whereas target %s is "
+"ERROR: %B is compiled as absolute position code, whereas target %B is "
"position independent"
msgstr ""
-#: coff-arm.c:2330 elf32-arm.h:2405
+#: coff-arm.c:2222 elf32-arm.c:5162
#, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
+msgid "Warning: %B supports interworking, whereas %B does not"
msgstr ""
-#: coff-arm.c:2333 elf32-arm.h:2412
+#: coff-arm.c:2225 elf32-arm.c:5168
#, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
+msgid "Warning: %B does not support interworking, whereas %B does"
msgstr ""
-#: coff-arm.c:2360
+#: coff-arm.c:2249
#, c-format
msgid "private flags = %x:"
msgstr ""
-#: coff-arm.c:2368 elf32-arm.h:2467
+#: coff-arm.c:2257 elf32-arm.c:5219
+#, c-format
msgid " [floats passed in float registers]"
msgstr ""
-#: coff-arm.c:2370
+#: coff-arm.c:2259
+#, c-format
msgid " [floats passed in integer registers]"
msgstr ""
-#: coff-arm.c:2373 elf32-arm.h:2470
+#: coff-arm.c:2262 elf32-arm.c:5222
+#, c-format
msgid " [position independent]"
msgstr ""
-#: coff-arm.c:2375
+#: coff-arm.c:2264
+#, c-format
msgid " [absolute position]"
msgstr ""
-#: coff-arm.c:2379
+#: coff-arm.c:2268
+#, c-format
msgid " [interworking flag not initialised]"
msgstr ""
-#: coff-arm.c:2381
+#: coff-arm.c:2270
+#, c-format
msgid " [interworking supported]"
msgstr ""
-#: coff-arm.c:2383
+#: coff-arm.c:2272
+#, c-format
msgid " [interworking not supported]"
msgstr ""
-#: coff-arm.c:2431 elf32-arm.h:2150
+#: coff-arm.c:2318 elf32-arm.c:4571
#, c-format
msgid ""
-"Warning: Not setting interworking flag of %s since it has already been "
+"Warning: Not setting interworking flag of %B since it has already been "
"specified as non-interworking"
msgstr ""
-#: coff-arm.c:2435 elf32-arm.h:2154
+#: coff-arm.c:2322 elf32-arm.c:4575
#, c-format
-msgid "Warning: Clearing the interworking flag of %s due to outside request"
+msgid "Warning: Clearing the interworking flag of %B due to outside request"
msgstr ""
-#: coffcode.h:1108
-#, c-format
-msgid "%s (%s): Section flag %s (0x%x) ignored"
+#: coffcode.h:849
+msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'"
+msgstr ""
+
+#. Generate a warning message rather using the 'unhandled'
+#. variable as this will allow some .sys files generate by
+#. other toolchains to be processed. See bugzilla issue 196.
+#: coffcode.h:1061
+msgid ""
+"%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s"
+msgstr ""
+
+#: coffcode.h:1116
+msgid "%B (%s): Section flag %s (0x%x) ignored"
msgstr ""
-#: coffcode.h:2214
+#: coffcode.h:2204
#, c-format
msgid "Unrecognized TI COFF target id '0x%x'"
msgstr ""
-#: coffcode.h:4439
-#, c-format
-msgid "%s: warning: illegal symbol index %ld in line numbers"
+#: coffcode.h:4211
+msgid "%B: warning: line number table read failed"
msgstr ""
-#: coffcode.h:4453
-#, c-format
-msgid "%s: warning: duplicate line number information for `%s'"
+#: coffcode.h:4243
+msgid "%B: warning: illegal symbol index %ld in line numbers"
msgstr ""
-#: coffcode.h:4807
-#, c-format
-msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
+#: coffcode.h:4257
+msgid "%B: warning: duplicate line number information for `%s'"
msgstr ""
-#: coffcode.h:4940
-#, c-format
-msgid "warning: %s: local symbol `%s' has no section"
+#: coffcode.h:4597
+msgid "%B: Unrecognized storage class %d for %s symbol `%s'"
msgstr ""
-#: coff-tic4x.c:218 coff-tic54x.c:373 coffcode.h:5047
-#, c-format
-msgid "%s: warning: illegal symbol index %ld in relocs"
+#: coffcode.h:4723
+msgid "warning: %B: local symbol `%s' has no section"
msgstr ""
-#: coffcode.h:5085
-#, c-format
-msgid "%s: illegal relocation type %d at address 0x%lx"
+#: coffcode.h:4827 coff-i860.c:586 coff-tic54x.c:376
+msgid "%B: warning: illegal symbol index %ld in relocs"
msgstr ""
-#: coffgen.c:1666
-#, c-format
-msgid "%s: bad string table size %lu"
+#: coffcode.h:4865
+msgid "%B: illegal relocation type %d at address 0x%lx"
+msgstr ""
+
+#: coffgen.c:1511
+msgid "%B: bad string table size %lu"
msgstr ""
-#: coff-h8300.c:1047
+#: coff-h8300.c:1126
#, c-format
msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
msgstr ""
+#: coff-i860.c:142
+#, c-format
+msgid "Relocation `%s' not yet implemented\n"
+msgstr ""
+
#: coff-i960.c:137 coff-i960.c:486
msgid "uncertain calling convention for non-COFF symbol"
msgstr ""
-#: cofflink.c:538 elflink.h:1276
-#, c-format
-msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
+#: cofflink.c:507 elflink.c:3948
+msgid "Warning: type of symbol `%s' changed from %d to %d in %B"
msgstr ""
-#: cofflink.c:2328
-#, c-format
-msgid "%s: relocs in section `%s', but it has no contents"
+#: cofflink.c:2293
+msgid "%B: relocs in section `%A', but it has no contents"
msgstr ""
-#: cofflink.c:2671 coffswap.h:890
+#: cofflink.c:2624 coffswap.h:823
#, c-format
msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
msgstr ""
-#: cofflink.c:2680 coffswap.h:876
+#: cofflink.c:2633 coffswap.h:809
#, c-format
msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
msgstr ""
-#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1783
+#: coff-m68k.c:482 elf32-bfin.c:2722 elf32-m68k.c:2193
msgid "unsupported reloc type"
msgstr ""
-#: coff-mips.c:839 elf32-mips.c:1088 elf64-mips.c:1590 elfn32-mips.c:1554
-msgid "GP relative relocation when _gp not defined"
+#: coff-maxq.c:128
+msgid "Can't Make it a Short Jump"
+msgstr ""
+
+#: coff-maxq.c:193
+msgid "Exceeds Long Jump Range"
msgstr ""
-#. No other sections should appear in -membedded-pic
-#. code.
-#: coff-mips.c:2431
-msgid "reloc against unsupported section"
+#: coff-maxq.c:204 coff-maxq.c:278
+msgid "Absolute address Exceeds 16 bit Range"
msgstr ""
-#: coff-mips.c:2439
-msgid "reloc not properly aligned"
+#: coff-maxq.c:242
+msgid "Absolute address Exceeds 8 bit Range"
+msgstr ""
+
+#: coff-maxq.c:335
+msgid "Unrecognized Reloc Type"
+msgstr ""
+
+#: coff-mips.c:686 elf32-mips.c:940 elf64-mips.c:1864 elfn32-mips.c:1718
+msgid "GP relative relocation when _gp not defined"
+msgstr ""
+
+#: coff-or32.c:227
+msgid "Unrecognized reloc"
msgstr ""
-#: coff-rs6000.c:2790
+#: coff-rs6000.c:2785
#, c-format
msgid "%s: unsupported relocation type 0x%02x"
msgstr ""
-#: coff-rs6000.c:2883
+#: coff-rs6000.c:2878
#, c-format
msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
msgstr ""
-#: coff-tic4x.c:170 coff-tic54x.c:288 coff-tic80.c:450
+#: coff-tic4x.c:174 coff-tic54x.c:282 coff-tic80.c:458
#, c-format
msgid "Unrecognized reloc type 0x%x"
msgstr ""
-#: coff-w65.c:364
+#: coff-tic4x.c:219
#, c-format
-msgid "ignoring reloc %s\n"
+msgid "%s: warning: illegal symbol index %ld in relocs"
msgstr ""
-#: cpu-arm.c:196 cpu-arm.c:206
+#: coff-w65.c:366
#, c-format
-msgid "ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"
+msgid "ignoring reloc %s\n"
msgstr ""
-#: cpu-arm.c:344
+#: cpu-arm.c:184 cpu-arm.c:193
+msgid "ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"
+msgstr ""
+
+#: cpu-arm.c:324
#, c-format
msgid "warning: unable to update contents of %s section in %s"
msgstr ""
-#: dwarf2.c:380
+#: dwarf2.c:315
msgid "Dwarf Error: Can't find .debug_str section."
msgstr ""
-#: dwarf2.c:397
+#: dwarf2.c:333
#, c-format
msgid ""
"Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str "
"size (%lu)."
msgstr ""
-#: dwarf2.c:541
+#: dwarf2.c:426
msgid "Dwarf Error: Can't find .debug_abbrev section."
msgstr ""
-#: dwarf2.c:556
+#: dwarf2.c:441
#, c-format
msgid ""
"Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size "
"(%lu)."
msgstr ""
-#: dwarf2.c:756
+#: dwarf2.c:656
#, c-format
msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
msgstr ""
-#: dwarf2.c:933
+#: dwarf2.c:856
msgid "Dwarf Error: mangled line number section (bad file number)."
msgstr ""
-#: dwarf2.c:1032
+#: dwarf2.c:947
msgid "Dwarf Error: Can't find .debug_line section."
msgstr ""
-#: dwarf2.c:1049
+#: dwarf2.c:964
#, c-format
msgid ""
"Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%"
"lu)."
msgstr ""
-#: dwarf2.c:1255
+#: dwarf2.c:1192
msgid "Dwarf Error: mangled line number section."
msgstr ""
-#: dwarf2.c:1470 dwarf2.c:1620
+#: dwarf2.c:1382
+msgid "Dwarf Error: Can't find .debug_ranges section."
+msgstr ""
+
+#: dwarf2.c:1544 dwarf2.c:1660 dwarf2.c:1930
#, c-format
msgid "Dwarf Error: Could not find abbrev number %u."
msgstr ""
-#: dwarf2.c:1581
+#: dwarf2.c:1891
#, c-format
msgid ""
"Dwarf Error: found dwarf version '%u', this reader only handles version 2 "
"information."
msgstr ""
-#: dwarf2.c:1588
+#: dwarf2.c:1898
#, c-format
msgid ""
"Dwarf Error: found address size '%u', this reader can not handle sizes "
"greater than '%u'."
msgstr ""
-#: dwarf2.c:1611
+#: dwarf2.c:1921
#, c-format
msgid "Dwarf Error: Bad abbrev number: %u."
msgstr ""
-#: ecoff.c:1339
+#: ecoff.c:1227
#, c-format
msgid "Unknown basic type %d"
msgstr ""
-#: ecoff.c:1599
+#: ecoff.c:1484
#, c-format
msgid ""
"\n"
" End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1606 ecoff.c:1609
+#: ecoff.c:1491 ecoff.c:1494
#, c-format
msgid ""
"\n"
" First symbol: %ld"
msgstr ""
-#: ecoff.c:1621
+#: ecoff.c:1506
#, c-format
msgid ""
"\n"
" End+1 symbol: %-7ld Type: %s"
msgstr ""
-#: ecoff.c:1628
+#: ecoff.c:1513
#, c-format
msgid ""
"\n"
" Local symbol: %ld"
msgstr ""
-#: ecoff.c:1636
+#: ecoff.c:1521
#, c-format
msgid ""
"\n"
" struct; End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1641
+#: ecoff.c:1526
#, c-format
msgid ""
"\n"
" union; End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1646
+#: ecoff.c:1531
#, c-format
msgid ""
"\n"
" enum; End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1652
+#: ecoff.c:1537
#, c-format
msgid ""
"\n"
" Type: %s"
msgstr ""
-#: elf32-arm.h:1228
-#, c-format
-msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
+#: elf32-arm.c:2315
+msgid "%B: BE8 images only valid in big-endian mode."
msgstr ""
-#: elf32-arm.h:1424
+#: elf32-arm.c:2471
#, c-format
-msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
+msgid "Invalid TARGET2 relocation type '%s'."
msgstr ""
-#: elf32-arm.h:1918 elf32-sh.c:4706 elf64-sh64.c:1613
-#, c-format
-msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
+#: elf32-arm.c:2578
+msgid ""
+"%B(%s): warning: interworking not enabled.\n"
+" first occurrence: %B: thumb call to arm"
msgstr ""
-#: elf32-arm.h:2012
-#, c-format
-msgid ""
-"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
+#: elf32-arm.c:3044
+msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'."
+msgstr ""
+
+#: elf32-arm.c:3227
+msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'."
+msgstr ""
+
+#: elf32-arm.c:3889
+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
+msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section"
+msgstr ""
+
+#: elf32-arm.c:4351 elf64-ppc.c:9672
+msgid "%B(%A+0x%lx): %s used with TLS symbol %s"
+msgstr ""
+
+#: elf32-arm.c:4352 elf64-ppc.c:9673
+msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s"
msgstr ""
-#: elf-m10200.c:442 elf-m10300.c:1695 elf32-arm.h:2088 elf32-avr.c:812
-#: elf32-cris.c:1390 elf32-d10v.c:482 elf32-fr30.c:634 elf32-frv.c:815
-#: elf32-h8300.c:509 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
-#: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510
-#: elf32-openrisc.c:436 elf32-v850.c:1777 elf32-xstormy16.c:976
-#: elf64-mmix.c:1332
+#: 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
+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"
msgstr ""
-#: elf-m10200.c:446 elf-m10300.c:1699 elf32-arm.h:2092 elf32-avr.c:816
-#: elf32-cris.c:1394 elf32-d10v.c:486 elf32-fr30.c:638 elf32-frv.c:819
-#: elf32-h8300.c:513 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
-#: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440
-#: elf32-v850.c:1781 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6452
+#: 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"
msgstr ""
-#: elf-m10200.c:450 elf-m10300.c:1703 elf32-arm.h:2096 elf32-d10v.c:490
-#: elf32-h8300.c:517 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
+#: 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"
msgstr ""
-#: elf-m10200.c:454 elf-m10300.c:1707 elf32-arm.h:2100 elf32-avr.c:824
-#: elf32-cris.c:1402 elf32-d10v.c:494 elf32-fr30.c:646 elf32-frv.c:827
-#: elf32-h8300.c:521 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
-#: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522
-#: elf32-openrisc.c:448 elf32-v850.c:1801 elf32-xstormy16.c:988
-#: elf64-mmix.c:1344
+#: 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.h:2202
-#, c-format
+#: elf32-arm.c:4664
msgid ""
-"Warning: Clearing the interworking flag of %s because non-interworking code "
-"in %s has been linked with it"
+"Warning: Clearing the interworking flag of %B because non-interworking code "
+"in %B has been linked with it"
msgstr ""
-#: elf32-arm.h:2302
-#, c-format
+#: elf32-arm.c:4751
+msgid "ERROR: %B uses VFP register arguments, %B does not"
+msgstr ""
+
+#: elf32-arm.c:4798
+msgid "ERROR: %B: Conflicting architecture profiles %c/%c"
+msgstr ""
+
+#: elf32-arm.c:4813
+msgid "Warning: %B: Conflicting platform configuration"
+msgstr ""
+
+#: elf32-arm.c:4821
+msgid "ERROR: %B: Conflicting use of R9"
+msgstr ""
+
+#: elf32-arm.c:4833
+msgid "ERROR: %B: SB relative addressing conflicts with use of R9"
+msgstr ""
+
+#: elf32-arm.c:4855
+msgid "ERROR: %B: Conflicting definitions of wchar_t"
+msgstr ""
+
+#: elf32-arm.c:4881
+msgid "ERROR: %B: Conflicting enum sizes"
+msgstr ""
+
+#: elf32-arm.c:4892
+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
+msgid "Warning: %B: Unknown EABI object attribute %d"
+msgstr ""
+
+#: elf32-arm.c:5069
msgid ""
-"ERROR: %s is compiled for EABI version %d, whereas %s is compiled for "
-"version %d"
+"ERROR: Source object %B has EABI version %d, but target %B has EABI version %"
+"d"
msgstr ""
-#: elf32-arm.h:2316
-#, c-format
-msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
+#: elf32-arm.c:5082
+msgid "ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"
msgstr ""
-#: elf32-arm.h:2344
-#, c-format
-msgid "ERROR: %s uses VFP instructions, whereas %s does not"
+#: elf32-arm.c:5107
+msgid "ERROR: %B uses VFP instructions, whereas %B does not"
msgstr ""
-#: elf32-arm.h:2349
-#, c-format
-msgid "ERROR: %s uses FPA instructions, whereas %s does not"
+#: elf32-arm.c:5111
+msgid "ERROR: %B uses FPA instructions, whereas %B does not"
msgstr ""
-#: elf32-arm.h:2360 elf32-arm.h:2365
-#, c-format
-msgid "ERROR: %s uses Maverick instructions, whereas %s does not"
+#: elf32-arm.c:5121
+msgid "ERROR: %B uses Maverick instructions, whereas %B does not"
msgstr ""
-#: elf32-arm.h:2385
-#, c-format
-msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
+#: elf32-arm.c:5125
+msgid "ERROR: %B does not use Maverick instructions, whereas %B does"
msgstr ""
-#: elf32-arm.h:2390
-#, c-format
-msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
+#: elf32-arm.c:5144
+msgid "ERROR: %B uses software FP, whereas %B uses hardware FP"
+msgstr ""
+
+#: elf32-arm.c:5148
+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.
-#: elf32-arm.h:2443 elf32-cris.c:2975 elf32-m68hc1x.c:1459 elf32-m68k.c:397
-#: elf32-vax.c:546 elfxx-mips.c:9240
+#. 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
#, c-format
msgid "private flags = %lx:"
msgstr ""
-#: elf32-arm.h:2452
+#: elf32-arm.c:5204
+#, c-format
msgid " [interworking enabled]"
msgstr ""
-#: elf32-arm.h:2460
+#: elf32-arm.c:5212
+#, c-format
msgid " [VFP float format]"
msgstr ""
-#: elf32-arm.h:2462
+#: elf32-arm.c:5214
+#, c-format
msgid " [Maverick float format]"
msgstr ""
-#: elf32-arm.h:2464
+#: elf32-arm.c:5216
+#, c-format
msgid " [FPA float format]"
msgstr ""
-#: elf32-arm.h:2473
+#: elf32-arm.c:5225
+#, c-format
msgid " [new ABI]"
msgstr ""
-#: elf32-arm.h:2476
+#: elf32-arm.c:5228
+#, c-format
msgid " [old ABI]"
msgstr ""
-#: elf32-arm.h:2479
+#: elf32-arm.c:5231
+#, c-format
msgid " [software FP]"
msgstr ""
-#: elf32-arm.h:2488
+#: elf32-arm.c:5240
+#, c-format
msgid " [Version1 EABI]"
msgstr ""
-#: elf32-arm.h:2491 elf32-arm.h:2502
+#: elf32-arm.c:5243 elf32-arm.c:5254
+#, c-format
msgid " [sorted symbol table]"
msgstr ""
-#: elf32-arm.h:2493 elf32-arm.h:2504
+#: elf32-arm.c:5245 elf32-arm.c:5256
+#, c-format
msgid " [unsorted symbol table]"
msgstr ""
-#: elf32-arm.h:2499
+#: elf32-arm.c:5251
+#, c-format
msgid " [Version2 EABI]"
msgstr ""
-#: elf32-arm.h:2507
+#: elf32-arm.c:5259
+#, c-format
msgid " [dynamic symbols use segment index]"
msgstr ""
-#: elf32-arm.h:2510
+#: elf32-arm.c:5262
+#, c-format
msgid " [mapping symbols precede others]"
msgstr ""
-#: elf32-arm.h:2517
+#: elf32-arm.c:5269
+#, c-format
+msgid " [Version3 EABI]"
+msgstr ""
+
+#: elf32-arm.c:5273
+#, c-format
+msgid " [Version4 EABI]"
+msgstr ""
+
+#: elf32-arm.c:5276
+#, c-format
+msgid " [BE8]"
+msgstr ""
+
+#: elf32-arm.c:5279
+#, c-format
+msgid " [LE8]"
+msgstr ""
+
+#: elf32-arm.c:5285
+#, c-format
msgid " <EABI version unrecognised>"
msgstr ""
-#: elf32-arm.h:2524
+#: elf32-arm.c:5292
+#, c-format
msgid " [relocatable executable]"
msgstr ""
-#: elf32-arm.h:2527
+#: elf32-arm.c:5295
+#, c-format
msgid " [has entry point]"
msgstr ""
-#: elf32-arm.h:2532
+#: elf32-arm.c:5300
+#, c-format
msgid "<Unrecognised flag bits set>"
msgstr ""
-#: elf32-avr.c:820 elf32-cris.c:1398 elf32-fr30.c:642 elf32-frv.c:823
-#: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518
-#: elf32-openrisc.c:444 elf32-v850.c:1785 elf32-xstormy16.c:984
-#: elf64-mmix.c:1340
-msgid "internal error: dangerous relocation"
+#: 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
+msgid "%B: bad symbol index: %d"
msgstr ""
-#: elf32-cris.c:931
+#: 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
#, c-format
-msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
+msgid "dynamic variable `%s' is zero size"
msgstr ""
-#: elf32-cris.c:993
-#, c-format
-msgid ""
-"%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
+#: 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
+msgid "internal error: dangerous relocation"
+msgstr ""
+
+#: elf32-bfin.c:96
+msgid "Division by zero. "
msgstr ""
-#: elf32-cris.c:996 elf32-cris.c:1122
+#: elf32-bfin.c:1958
+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
+msgid "%B(%A+0x%lx): reloc against `%s': error %d"
+msgstr ""
+
+#: elf32-cris.c:1050
+msgid "%B, section %A: unresolvable relocation %s against symbol `%s'"
+msgstr ""
+
+#: elf32-cris.c:1105
+msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'"
+msgstr ""
+
+#: elf32-cris.c:1107
+msgid "%B, section %A: No PLT for relocation %s against symbol `%s'"
+msgstr ""
+
+#: elf32-cris.c:1113 elf32-cris.c:1245
msgid "[whose name is lost]"
msgstr ""
-#: elf32-cris.c:1111
-#, c-format
+#: elf32-cris.c:1231
msgid ""
-"%s: relocation %s with non-zero addend %d against local symbol from %s "
-"section"
+"%B, section %A: relocation %s with non-zero addend %d against local symbol"
msgstr ""
-#: elf32-cris.c:1118
-#, c-format
+#: elf32-cris.c:1239
msgid ""
-"%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
+"%B, section %A: relocation %s with non-zero addend %d against symbol `%s'"
msgstr ""
-#: elf32-cris.c:1143
-#, c-format
-msgid ""
-"%s: relocation %s is not allowed for global symbol: `%s' from %s section"
+#: elf32-cris.c:1265
+msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'"
msgstr ""
-#: elf32-cris.c:1158
-#, c-format
-msgid "%s: relocation %s in section %s with no GOT created"
+#: elf32-cris.c:1281
+msgid "%B, section %A: relocation %s with no GOT created"
msgstr ""
-#: elf32-cris.c:1277
-#, c-format
-msgid "%s: Internal inconsistency; no relocation section %s"
+#: elf32-cris.c:1399
+msgid "%B: Internal inconsistency; no relocation section %s"
msgstr ""
-#: elf32-cris.c:2500
-#, c-format
+#: elf32-cris.c:2520
msgid ""
-"%s, section %s:\n"
+"%B, section %A:\n"
+" v10/v32 compatible object %s must not contain a PIC relocation"
+msgstr ""
+
+#: elf32-cris.c:2707 elf32-cris.c:2775
+msgid ""
+"%B, section %A:\n"
" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
-#: elf32-cris.c:2978
+#: elf32-cris.c:3192
+msgid "Unexpected machine number"
+msgstr ""
+
+#: elf32-cris.c:3246
+#, c-format
msgid " [symbols have a _ prefix]"
msgstr ""
-#: elf32-cris.c:3017
+#: elf32-cris.c:3249
#, c-format
-msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
+msgid " [v10 and v32]"
msgstr ""
-#: elf32-cris.c:3018
+#: elf32-cris.c:3252
#, c-format
-msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
+msgid " [v32]"
+msgstr ""
+
+#: elf32-cris.c:3297
+msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols"
+msgstr ""
+
+#: elf32-cris.c:3298
+msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"
+msgstr ""
+
+#: elf32-cris.c:3317
+msgid "%B contains CRIS v32 code, incompatible with previous objects"
+msgstr ""
+
+#: elf32-cris.c:3319
+msgid "%B contains non-CRIS-v32 code, incompatible with previous objects"
+msgstr ""
+
+#: elf32-frv.c:1522 elf32-frv.c:1671
+msgid "relocation requires zero addend"
+msgstr ""
+
+#: elf32-frv.c:2901
+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
+msgid "R_FRV_GETTLSOFF not applied to a call instruction"
+msgstr ""
+
+#: elf32-frv.c:3032
+msgid "R_FRV_GOTTLSDESC12 not applied to an lddi instruction"
+msgstr ""
+
+#: elf32-frv.c:3103
+msgid "R_FRV_GOTTLSDESCHI not applied to a sethi instruction"
+msgstr ""
+
+#: elf32-frv.c:3140
+msgid "R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction"
+msgstr ""
+
+#: elf32-frv.c:3188
+msgid "R_FRV_TLSDESC_RELAX not applied to an ldd instruction"
+msgstr ""
+
+#: elf32-frv.c:3272
+msgid "R_FRV_GETTLSOFF_RELAX not applied to a calll instruction"
+msgstr ""
+
+#: elf32-frv.c:3327
+msgid "R_FRV_GOTTLSOFF12 not applied to an ldi instruction"
+msgstr ""
+
+#: elf32-frv.c:3357
+msgid "R_FRV_GOTTLSOFFHI not applied to a sethi instruction"
+msgstr ""
+
+#: elf32-frv.c:3386
+msgid "R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction"
+msgstr ""
+
+#: elf32-frv.c:3417
+msgid "R_FRV_TLSOFF_RELAX not applied to an ld instruction"
+msgstr ""
+
+#: elf32-frv.c:3462
+msgid "R_FRV_TLSMOFFHI not applied to a sethi instruction"
+msgstr ""
+
+#: elf32-frv.c:3489
+msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction"
+msgstr ""
+
+#: elf32-frv.c:3610
+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
+msgid "R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend"
+msgstr ""
+
+#: elf32-frv.c:3970 elf32-frv.c:4126
+msgid "%B(%A+0x%lx): reloc against `%s': %s"
msgstr ""
-#: elf32-frv.c:1223
+#: elf32-frv.c:3972 elf32-frv.c:3976
+msgid "relocation references a different segment"
+msgstr ""
+
+#: elf32-frv.c:6324
+msgid "%B: unsupported relocation type %i"
+msgstr ""
+
+#: elf32-frv.c:6642
#, c-format
msgid ""
"%s: compiled with %s and linked with modules that use non-pic relocations"
msgstr ""
-#: elf32-frv.c:1273 elf32-iq2000.c:895
+#: elf32-frv.c:6695 elf32-iq2000.c:801 elf32-m32c.c:785
#, c-format
msgid "%s: compiled with %s and linked with modules compiled with %s"
msgstr ""
-#: elf32-frv.c:1285
+#: elf32-frv.c:6707
#, c-format
msgid ""
"%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%"
"lx)"
msgstr ""
-#: elf32-frv.c:1321 elf32-iq2000.c:933
+#: elf32-frv.c:6728
#, c-format
-msgid "private flags = 0x%lx:"
+msgid "%s: cannot link non-fdpic object file into fdpic executable"
msgstr ""
-#: elf32-gen.c:83 elf64-gen.c:82
+#: elf32-frv.c:6732
#, c-format
-msgid "%s: Relocations in generic ELF (EM: %d)"
+msgid "%s: cannot link fdpic object file into non-fdpic executable"
msgstr ""
-#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3118
+#: elf32-frv.c:6757 elf32-iq2000.c:838 elf32-m32c.c:821 elf32-ms1.c:596
#, c-format
-msgid "%s: cannot create stub entry %s"
+msgid "private flags = 0x%lx:"
msgstr ""
-#: elf32-hppa.c:957 elf32-hppa.c:3538
-#, c-format
-msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
+#: elf32-gen.c:68 elf64-gen.c:68
+msgid "%B: Relocations in generic ELF (EM: %d)"
msgstr ""
-#: elf32-hppa.c:1340 elf64-x86-64.c:672 elf64-x86-64.c:797
-#, c-format
-msgid ""
-"%s: relocation %s can not be used when making a shared object; recompile "
-"with -fPIC"
+#: elf32-hppa.c:569 elf32-m68hc1x.c:161 elf64-ppc.c:3660
+msgid "%B: cannot create stub entry %s"
msgstr ""
-#: elf32-hppa.c:1360
-#, c-format
+#: elf32-hppa.c:822 elf32-hppa.c:3411
+msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"
+msgstr ""
+
+#: elf32-hppa.c:1212
msgid ""
-"%s: relocation %s should not be used when making a shared object; recompile "
+"%B: relocation %s can not be used when making a shared object; recompile "
"with -fPIC"
msgstr ""
-#: elf32-hppa.c:1553
+#: elf32-hppa.c:1405
#, c-format
msgid "Could not find relocation section for %s"
msgstr ""
-#: elf32-hppa.c:2828
-#, c-format
-msgid "%s: duplicate export stub %s"
+#: elf32-hppa.c:2677
+msgid "%B: duplicate export stub %s"
msgstr ""
-#: elf32-hppa.c:3416
-#, c-format
-msgid "%s(%s+0x%lx): fixing %s"
+#: elf32-hppa.c:3266
+msgid ""
+"%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"
msgstr ""
-#: elf32-hppa.c:4039
-#, c-format
-msgid "%s(%s+0x%lx): cannot handle %s for %s"
+#: elf32-hppa.c:3895
+msgid "%B(%A+0x%lx): cannot handle %s for %s"
msgstr ""
-#: elf32-hppa.c:4357
+#: elf32-hppa.c:4189
msgid ".got section not immediately after .plt section"
msgstr ""
-#: elf32-i386.c:326
-#, c-format
-msgid "%s: invalid relocation type %d"
+#: elf32-i386.c:327 elf32-s390.c:368 elf64-ppc.c:2124 elf64-s390.c:390
+#: elf64-x86-64.c:204
+msgid "%B: invalid relocation type %d"
msgstr ""
-#: elf32-i386.c:841 elf32-s390.c:990 elf32-sparc.c:887 elf32-xtensa.c:637
-#: elf64-s390.c:943 elf64-x86-64.c:650
-#, c-format
-msgid "%s: bad symbol index: %d"
+#: elf32-i386.c:1015 elf32-s390.c:1171 elf32-sh.c:6389 elf64-s390.c:1133
+#: elfxx-sparc.c:1144
+msgid "%B: `%s' accessed both as normal and thread local symbol"
msgstr ""
-#: elf32-i386.c:949 elf32-s390.c:1168 elf32-sh.c:6426 elf32-sparc.c:1011
-#: elf64-s390.c:1129
-#, c-format
-msgid "%s: `%s' accessed both as normal and thread local symbol"
-msgstr ""
-
-#: elf32-i386.c:1064 elf32-s390.c:1279 elf64-ppc.c:3929 elf64-s390.c:1243
-#: elf64-x86-64.c:886
-#, c-format
-msgid "%s: bad relocation section name `%s'"
+#: elf32-i386.c:1130 elf32-s390.c:1280 elf64-ppc.c:4731 elf64-s390.c:1245
+#: elf64-x86-64.c:910
+msgid "%B: bad relocation section name `%s'"
msgstr ""
-#: elf32-i386.c:2908 elf32-m68k.c:1757 elf32-s390.c:3022 elf32-sparc.c:2879
-#: elf32-xtensa.c:2193 elf64-s390.c:3018 elf64-sparc.c:2664
-#: elf64-x86-64.c:2452
-#, c-format
-msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
+#: elf32-i386.c:2149
+msgid "%B: unrecognized relocation (0x%x) in section `%A'"
msgstr ""
-#: elf32-i386.c:2947 elf32-m68k.c:1796 elf32-s390.c:3072 elf64-s390.c:3068
-#: elf64-x86-64.c:2490
-#, c-format
-msgid "%s(%s+0x%lx): reloc against `%s': error %d"
+#: elf32-i386.c:2409
+msgid ""
+"%B: relocation R_386_GOTOFF against protected function `%s' can not be used "
+"when making a shared object"
msgstr ""
-#: elf32-ip2k.c:565 elf32-ip2k.c:571 elf32-ip2k.c:734 elf32-ip2k.c:740
+#: elf32-ip2k.c:853 elf32-ip2k.c:859 elf32-ip2k.c:926 elf32-ip2k.c:932
msgid ""
"ip2k relaxer: switch table without complete matching relocation information."
msgstr ""
-#: elf32-ip2k.c:588 elf32-ip2k.c:767
+#: elf32-ip2k.c:876 elf32-ip2k.c:959
msgid "ip2k relaxer: switch table header corrupt."
msgstr ""
-#: elf32-ip2k.c:1395
+#: elf32-ip2k.c:1301
#, c-format
msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
msgstr ""
-#: elf32-ip2k.c:1409
+#: elf32-ip2k.c:1317
#, 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:1593
+#: elf32-ip2k.c:1481
msgid "unsupported relocation between data/insn address spaces"
msgstr ""
-#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2175 elf64-sparc.c:3072
-#: elfxx-mips.c:9197
+#: elf32-iq2000.c:814 elf32-m32c.c:797
#, c-format
msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr ""
-#: elf32-m32r.c:930
+#: elf32-m32r.c:1436
msgid "SDA relocation when _SDA_BASE_ not defined"
msgstr ""
-#: elf32-ia64.c:3817 elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407
-#: elf64-ia64.c:3817
-#, c-format
-msgid "%s: unknown relocation type %d"
+#: elf32-m32r.c:3048
+msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)"
msgstr ""
-#: elf32-m32r.c:1226
-#, c-format
-msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
+#: elf32-m32r.c:3576
+msgid "%B: Instruction set mismatch with previous modules"
msgstr ""
-#: elf32-m32r.c:1952
-#, c-format
-msgid "%s: Instruction set mismatch with previous modules"
-msgstr ""
-
-#: elf32-m32r.c:1975
+#: elf32-m32r.c:3597
#, c-format
msgid "private flags = %lx"
msgstr ""
-#: elf32-m32r.c:1980
+#: elf32-m32r.c:3602
+#, c-format
msgid ": m32r instructions"
msgstr ""
-#: elf32-m32r.c:1981
+#: elf32-m32r.c:3603
+#, c-format
msgid ": m32rx instructions"
msgstr ""
-#: elf32-m68hc1x.c:1217
+#: elf32-m32r.c:3604
+#, c-format
+msgid ": m32r2 instructions"
+msgstr ""
+
+#: elf32-m68hc1x.c:1106
#, c-format
msgid ""
"Reference to the far symbol `%s' using a wrong relocation may result in "
"incorrect execution"
msgstr ""
-#: elf32-m68hc1x.c:1240
+#: elf32-m68hc1x.c:1129
#, 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:1259
+#: elf32-m68hc1x.c:1148
#, c-format
msgid ""
"reference to a banked address [%lx:%04lx] in the normal address space at %"
"04lx"
msgstr ""
-#: elf32-m68hc1x.c:1396
-#, c-format
+#: elf32-m68hc1x.c:1281
msgid ""
-"%s: linking files compiled for 16-bit integers (-mshort) and others for 32-"
+"%B: linking files compiled for 16-bit integers (-mshort) and others for 32-"
"bit integers"
msgstr ""
-#: elf32-m68hc1x.c:1404
-#, c-format
+#: elf32-m68hc1x.c:1288
msgid ""
-"%s: linking files compiled for 32-bit double (-fshort-double) and others for "
+"%B: linking files compiled for 32-bit double (-fshort-double) and others for "
"64-bit double"
msgstr ""
-#: elf32-m68hc1x.c:1414
-#, c-format
-msgid "%s: linking files compiled for HCS12 with others compiled for HC12"
+#: elf32-m68hc1x.c:1297
+msgid "%B: linking files compiled for HCS12 with others compiled for HC12"
msgstr ""
-#: elf32-m68hc1x.c:1462
+#: elf32-m68hc1x.c:1313 elf32-ppc.c:3576 elf64-sparc.c:696 elfxx-mips.c:9894
+msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr ""
+
+#: elf32-m68hc1x.c:1341
+#, c-format
msgid "[abi=32-bit int, "
msgstr ""
-#: elf32-m68hc1x.c:1464
+#: elf32-m68hc1x.c:1343
+#, c-format
msgid "[abi=16-bit int, "
msgstr ""
-#: elf32-m68hc1x.c:1467
+#: elf32-m68hc1x.c:1346
+#, c-format
msgid "64-bit double, "
msgstr ""
-#: elf32-m68hc1x.c:1469
+#: elf32-m68hc1x.c:1348
+#, c-format
msgid "32-bit double, "
msgstr ""
-#: elf32-m68hc1x.c:1472
+#: elf32-m68hc1x.c:1351
+#, c-format
msgid "cpu=HC11]"
msgstr ""
-#: elf32-m68hc1x.c:1474
+#: elf32-m68hc1x.c:1353
+#, c-format
msgid "cpu=HCS12]"
msgstr ""
-#: elf32-m68hc1x.c:1476
+#: elf32-m68hc1x.c:1355
+#, c-format
msgid "cpu=HC12]"
msgstr ""
-#: elf32-m68hc1x.c:1479
+#: elf32-m68hc1x.c:1358
+#, c-format
msgid " [memory=bank-model]"
msgstr ""
-#: elf32-m68hc1x.c:1481
+#: elf32-m68hc1x.c:1360
+#, c-format
msgid " [memory=flat]"
msgstr ""
-#: elf32-m68k.c:400
+#: elf32-m68k.c:431
+#, c-format
msgid " [cpu32]"
msgstr ""
-#: elf32-m68k.c:403
+#: elf32-m68k.c:434
+#, c-format
msgid " [m68000]"
msgstr ""
-#: elf32-mcore.c:353 elf32-mcore.c:456
-#, c-format
-msgid "%s: Relocation %s (%d) is not currently supported.\n"
+#: elf32-mcore.c:98 elf32-mcore.c:428
+msgid "%B: Relocation %s (%d) is not currently supported.\n"
msgstr ""
-#: elf32-mcore.c:441
-#, c-format
-msgid "%s: Unknown relocation type %d\n"
+#: elf32-mcore.c:414
+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"
msgstr ""
-#: elf32-mips.c:1170 elf64-mips.c:1717 elfn32-mips.c:1664
+#: elf32-mips.c:1011 elf64-mips.c:1972 elfn32-mips.c:1815
msgid "32bits gp relative relocation occurs for an external symbol"
msgstr ""
-#: elf32-mips.c:1314 elf64-mips.c:1830 elfn32-mips.c:1783
+#: elf32-mips.c:1134 elf64-mips.c:2066 elfn32-mips.c:1915
#, c-format
msgid "Linking mips16 objects into %s format is not supported"
msgstr ""
-#: elf32-ppc.c:2056
+#: elf32-ppc.c:1652
#, c-format
msgid "generic linker can't handle %s"
msgstr ""
-#: elf32-ppc.c:2138
-#, c-format
-msgid ""
-"%s: compiled with -mrelocatable and linked with modules compiled normally"
+#: elf32-ppc.c:2080
+msgid "corrupt or empty %s section in %B"
msgstr ""
-#: elf32-ppc.c:2147
-#, c-format
-msgid ""
-"%s: compiled normally and linked with modules compiled with -mrelocatable"
+#: elf32-ppc.c:2087
+msgid "unable to read in %s section from %B"
msgstr ""
-#: elf32-ppc.c:3413
-#, c-format
-msgid "%s: relocation %s cannot be used when making a shared object"
+#: elf32-ppc.c:2093
+msgid "corrupt %s section in %B"
msgstr ""
-#. It does not make sense to have a procedure linkage
-#. table entry for a local symbol.
-#: elf32-ppc.c:3619
-#, c-format
-msgid "%s(%s+0x%lx): %s reloc against local symbol"
+#: elf32-ppc.c:2136
+msgid "warning: unable to set size of %s section in %B"
msgstr ""
-#: elf32-ppc.c:4862 elf64-ppc.c:7789
-#, c-format
-msgid "%s: unknown relocation type %d for symbol %s"
+#: elf32-ppc.c:2183
+msgid "failed to allocate space for new APUinfo section."
msgstr ""
-#: elf32-ppc.c:5113
-#, c-format
-msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"
+#: elf32-ppc.c:2202
+msgid "failed to compute new APUinfo section."
msgstr ""
-#: elf32-ppc.c:5399 elf32-ppc.c:5425 elf32-ppc.c:5484
-#, c-format
-msgid ""
-"%s: the target (%s) of a %s relocation is in the wrong output section (%s)"
+#: elf32-ppc.c:2205
+msgid "failed to install new APUinfo section."
msgstr ""
-#: elf32-ppc.c:5539
-#, c-format
-msgid "%s: relocation %s is not yet supported for symbol %s."
+#: elf32-ppc.c:2941
+msgid "%B: relocation %s cannot be used when making a shared object"
msgstr ""
-#: elf32-ppc.c:5594 elf64-ppc.c:8461
-#, c-format
-msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
+#. It does not make sense to have a procedure linkage
+#. table entry for a local symbol.
+#: elf32-ppc.c:3211
+msgid "%B(%A+0x%lx): %s reloc against local symbol"
msgstr ""
-#: elf32-ppc.c:5644 elf64-ppc.c:8507
-#, c-format
-msgid "%s(%s+0x%lx): %s reloc against `%s': error %d"
+#: elf32-ppc.c:3541
+msgid ""
+"%B: compiled with -mrelocatable and linked with modules compiled normally"
msgstr ""
-#: elf32-ppc.c:5888
-#, c-format
-msgid "corrupt or empty %s section in %s"
+#: elf32-ppc.c:3549
+msgid ""
+"%B: compiled normally and linked with modules compiled with -mrelocatable"
msgstr ""
-#: elf32-ppc.c:5895
-#, c-format
-msgid "unable to read in %s section from %s"
+#: elf32-ppc.c:5768 elf64-ppc.c:10186
+msgid "%B: unknown relocation type %d for symbol %s"
msgstr ""
-#: elf32-ppc.c:5901
-#, c-format
-msgid "corrupt %s section in %s"
+#: elf32-ppc.c:6018
+msgid "%B(%A+0x%lx): non-zero addend on %s reloc against `%s'"
msgstr ""
-#: elf32-ppc.c:5944
-#, c-format
-msgid "warning: unable to set size of %s section in %s"
+#: elf32-ppc.c:6365 elf32-ppc.c:6391 elf32-ppc.c:6450
+msgid ""
+"%B: the target (%s) of a %s relocation is in the wrong output section (%s)"
msgstr ""
-#: elf32-ppc.c:5994
-msgid "failed to allocate space for new APUinfo section."
+#: elf32-ppc.c:6505
+msgid "%B: relocation %s is not yet supported for symbol %s."
msgstr ""
-#: elf32-ppc.c:6013
-msgid "failed to compute new APUinfo section."
+#: elf32-ppc.c:6610 elf64-ppc.c:10872
+msgid "%B(%A+0x%lx): %s reloc against `%s': error %d"
msgstr ""
-#: elf32-ppc.c:6016
-msgid "failed to install new APUinfo section."
+#: elf32-s390.c:2253 elf64-s390.c:2225
+msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s"
msgstr ""
-#: elf32-s390.c:2256 elf64-s390.c:2226
-#, c-format
-msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s"
-msgstr ""
-
-#: elf32-sh64.c:221 elf64-sh64.c:2407
+#: elf32-sh64.c:218 elf64-sh64.c:2322
#, c-format
msgid "%s: compiled as 32-bit object and %s is 64-bit"
msgstr ""
-#: elf32-sh64.c:224 elf64-sh64.c:2410
+#: elf32-sh64.c:221 elf64-sh64.c:2325
#, c-format
msgid "%s: compiled as 64-bit object and %s is 32-bit"
msgstr ""
-#: elf32-sh64.c:226 elf64-sh64.c:2412
+#: elf32-sh64.c:223 elf64-sh64.c:2327
#, c-format
msgid "%s: object size does not match that of target %s"
msgstr ""
-#: elf32-sh64.c:461 elf64-sh64.c:2990
+#: elf32-sh64.c:446 elf64-sh64.c:2899
#, c-format
msgid "%s: encountered datalabel symbol in input"
msgstr ""
-#: elf32-sh64.c:544
+#: elf32-sh64.c:523
msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
msgstr ""
-#: elf32-sh64.c:547
+#: elf32-sh64.c:526
msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
msgstr ""
-#: elf32-sh64.c:565
+#: elf32-sh64.c:544
#, c-format
msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
msgstr ""
-#: elf32-sh64.c:614 elf64-sh64.c:1748
-#, c-format
-msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+#: elf32-sh64.c:593
+msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n"
msgstr ""
-#: elf32-sh64.c:698
+#: elf32-sh64.c:669
#, c-format
msgid "%s: could not write out added .cranges entries"
msgstr ""
-#: elf32-sh64.c:760
+#: elf32-sh64.c:729
#, c-format
msgid "%s: could not write out sorted .cranges entries"
msgstr ""
-#: elf32-sh.c:2103
-#, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
+#: elf32-sh.c:2176
+msgid "%B: 0x%lx: warning: bad R_SH_USES offset"
msgstr ""
-#: elf32-sh.c:2115
-#, c-format
-msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
+#: elf32-sh.c:2188
+msgid "%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
msgstr ""
-#: elf32-sh.c:2132
-#, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
+#: elf32-sh.c:2205
+msgid "%B: 0x%lx: warning: bad R_SH_USES load offset"
msgstr ""
-#: elf32-sh.c:2147
-#, c-format
-msgid "%s: 0x%lx: warning: could not find expected reloc"
+#: elf32-sh.c:2220
+msgid "%B: 0x%lx: warning: could not find expected reloc"
msgstr ""
-#: elf32-sh.c:2175
-#, c-format
-msgid "%s: 0x%lx: warning: symbol in unexpected section"
+#: elf32-sh.c:2248
+msgid "%B: 0x%lx: warning: symbol in unexpected section"
msgstr ""
-#: elf32-sh.c:2300
-#, c-format
-msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
+#: elf32-sh.c:2361
+msgid "%B: 0x%lx: warning: could not find expected COUNT reloc"
msgstr ""
-#: elf32-sh.c:2309
-#, c-format
-msgid "%s: 0x%lx: warning: bad count"
+#: elf32-sh.c:2370
+msgid "%B: 0x%lx: warning: bad count"
msgstr ""
-#: elf32-sh.c:2712 elf32-sh.c:3088
-#, c-format
-msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
+#: elf32-sh.c:2765 elf32-sh.c:3135
+msgid "%B: 0x%lx: fatal: reloc overflow while relaxing"
msgstr ""
-#: elf32-sh.c:4654 elf64-sh64.c:1585
+#: elf32-sh.c:4566 elf64-sh64.c:1509
msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
msgstr ""
-#: elf32-sh.c:4809
-#, c-format
-msgid "%s: unresolvable relocation against symbol `%s' from %s section"
+#: elf32-sh.c:4791
+msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"
msgstr ""
-#: elf32-sh.c:4881
-#, c-format
-msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
+#: elf32-sh.c:4824 elf32-sh.c:4839
+msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"
msgstr ""
-#: elf32-sh.c:6627 elf64-alpha.c:4848
-#, c-format
-msgid "%s: TLS local exec code cannot be linked into shared objects"
+#: elf32-sh.c:4853
+msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"
msgstr ""
-#: elf32-sparc.c:2521 elf64-sparc.c:2314
-#, c-format
-msgid "%s: probably compiled without -fPIC?"
+#: elf32-sh.c:4867
+msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"
msgstr ""
-#: elf32-sparc.c:3348
-#, c-format
-msgid "%s: compiled for a 64 bit system and target is 32 bit"
+#: elf32-sh.c:6601 elf64-alpha.c:4466
+msgid "%B: TLS local exec code cannot be linked into shared objects"
msgstr ""
-#: elf32-sparc.c:3362
-#, c-format
-msgid "%s: linking little endian files with big endian files"
+#: elf32-sh-symbian.c:128
+msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS"
+msgstr ""
+
+#: elf32-sh-symbian.c:381
+msgid "%B: Unrecognised .directive command: %s"
+msgstr ""
+
+#: elf32-sh-symbian.c:502
+msgid "%B: Failed to add renamed symbol %s"
+msgstr ""
+
+#: elf32-sparc.c:87
+msgid "%B: compiled for a 64 bit system and target is 32 bit"
+msgstr ""
+
+#: elf32-sparc.c:100
+msgid "%B: linking little endian files with big endian files"
msgstr ""
-#: elf32-v850.c:753
+#: elf32-v850.c:160
#, c-format
msgid "Variable `%s' cannot occupy in multiple small data regions"
msgstr ""
-#: elf32-v850.c:756
+#: elf32-v850.c:163
#, c-format
msgid ""
"Variable `%s' can only be in one of the small, zero, and tiny data regions"
msgstr ""
-#: elf32-v850.c:759
+#: elf32-v850.c:166
#, c-format
msgid ""
"Variable `%s' cannot be in both small and zero data regions simultaneously"
msgstr ""
-#: elf32-v850.c:762
+#: elf32-v850.c:169
#, c-format
msgid ""
"Variable `%s' cannot be in both small and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:765
+#: elf32-v850.c:172
#, c-format
msgid ""
"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:1144
+#: elf32-v850.c:475
+#, c-format
msgid "FAILED to find previous HI16 reloc\n"
msgstr ""
-#: elf32-v850.c:1789
+#: elf32-v850.c:1684
msgid "could not locate special linker symbol __gp"
msgstr ""
-#: elf32-v850.c:1793
+#: elf32-v850.c:1688
msgid "could not locate special linker symbol __ep"
msgstr ""
-#: elf32-v850.c:1797
+#: elf32-v850.c:1692
msgid "could not locate special linker symbol __ctbp"
msgstr ""
-#: elf32-v850.c:1963
-#, c-format
-msgid "%s: Architecture mismatch with previous modules"
+#: elf32-v850.c:1870
+msgid "%B: Architecture mismatch with previous modules"
msgstr ""
-#: elf32-v850.c:1983
+#: elf32-v850.c:1889
#, c-format
msgid "private flags = %lx: "
msgstr ""
-#: elf32-v850.c:1988
+#: elf32-v850.c:1894
+#, c-format
msgid "v850 architecture"
msgstr ""
-#: elf32-v850.c:1989
+#: elf32-v850.c:1895
+#, c-format
msgid "v850e architecture"
msgstr ""
-#: elf32-vax.c:549
+#: elf32-v850.c:1896
+#, c-format
+msgid "v850e1 architecture"
+msgstr ""
+
+#: elf32-vax.c:531
+#, c-format
msgid " [nonpic]"
msgstr ""
-#: elf32-vax.c:552
+#: elf32-vax.c:534
+#, c-format
msgid " [d-float]"
msgstr ""
-#: elf32-vax.c:555
+#: elf32-vax.c:537
+#, c-format
msgid " [g-float]"
msgstr ""
-#: elf32-vax.c:663
+#: elf32-vax.c:647
#, c-format
msgid ""
"%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of "
"%ld"
msgstr ""
-#: elf32-vax.c:1667
+#: elf32-vax.c:1604
#, c-format
msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
msgstr ""
-#: elf32-vax.c:1802
+#: elf32-vax.c:1728
#, c-format
msgid "%s: warning: %s relocation against symbol `%s' from %s section"
msgstr ""
-#: elf32-vax.c:1808
+#: elf32-vax.c:1734
#, c-format
msgid "%s: warning: %s relocation to 0x%x from %s section"
msgstr ""
-#: elf32-ia64.c:2326 elf32-xstormy16.c:462 elf64-ia64.c:2326
+#: elf32-xstormy16.c:425 elf32-ia64.c:2563 elf64-ia64.c:2563
msgid "non-zero addend in @fptr reloc"
msgstr ""
-#: elf64-alpha.c:1108
+#: elf32-xtensa.c:705
+msgid "%B(%A): invalid property table"
+msgstr ""
+
+#: elf32-xtensa.c:2199
+msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)"
+msgstr ""
+
+#: elf32-xtensa.c:2256
+msgid "dynamic relocation in read-only section"
+msgstr ""
+
+#: elf32-xtensa.c:2421
+msgid "internal inconsistency in size of .got.loc section"
+msgstr ""
+
+#: elf32-xtensa.c:2735
+msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x"
+msgstr ""
+
+#: elf32-xtensa.c:3881 elf32-xtensa.c:3889
+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
+msgid ""
+"%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"
+msgstr ""
+
+#: elf32-xtensa.c:6369 elf32-xtensa.c:6532
+msgid ""
+"%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY "
+"relocation; possible configuration mismatch"
+msgstr ""
+
+#: elf32-xtensa.c:7855
+msgid "invalid relocation address"
+msgstr ""
+
+#: elf32-xtensa.c:7904
+msgid "overflow after relaxation"
+msgstr ""
+
+#: elf32-xtensa.c:9032
+msgid "%B(%A+0x%lx): unexpected fix for %s relocation"
+msgstr ""
+
+#: elf64-alpha.c:443
msgid "GPDISP relocation did not find ldah and lda instructions"
msgstr ""
-#: elf64-alpha.c:3731
-#, c-format
-msgid "%s: .got subsegment exceeds 64K (size %d)"
+#: elf64-alpha.c:2363
+msgid "%B: .got subsegment exceeds 64K (size %d)"
msgstr ""
-#: elf64-alpha.c:4602 elf64-alpha.c:4614
-#, c-format
-msgid "%s: gp-relative relocation against dynamic symbol %s"
+#: elf64-alpha.c:4210 elf64-alpha.c:4222
+msgid "%B: gp-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-alpha.c:4640 elf64-alpha.c:4773
-#, c-format
-msgid "%s: pc-relative relocation against dynamic symbol %s"
+#: elf64-alpha.c:4248 elf64-alpha.c:4383
+msgid "%B: pc-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-alpha.c:4668
-#, c-format
-msgid "%s: change in gp: BRSGP %s"
+#: elf64-alpha.c:4276
+msgid "%B: change in gp: BRSGP %s"
msgstr ""
-#: elf64-alpha.c:4693
+#: elf64-alpha.c:4301
msgid "<unknown>"
msgstr ""
-#: elf64-alpha.c:4698
-#, c-format
-msgid "%s: !samegp reloc against symbol without .prologue: %s"
+#: elf64-alpha.c:4306
+msgid "%B: !samegp reloc against symbol without .prologue: %s"
msgstr ""
-#: elf64-alpha.c:4749
-#, c-format
-msgid "%s: unhandled dynamic relocation against %s"
+#: elf64-alpha.c:4358
+msgid "%B: unhandled dynamic relocation against %s"
msgstr ""
-#: elf64-alpha.c:4832
-#, c-format
-msgid "%s: dtp-relative relocation against dynamic symbol %s"
+#: elf64-alpha.c:4390
+msgid "%B: pc-relative relocation against undefined weak symbol %s"
msgstr ""
-#: elf64-alpha.c:4855
-#, c-format
-msgid "%s: tp-relative relocation against dynamic symbol %s"
+#: elf64-alpha.c:4450
+msgid "%B: dtp-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-hppa.c:2086
+#: elf64-alpha.c:4473
+msgid "%B: tp-relative relocation against dynamic symbol %s"
+msgstr ""
+
+#: elf64-hppa.c:2046
#, c-format
msgid "stub entry for %s cannot load .plt, dp offset = %ld"
msgstr ""
-#: elf64-mmix.c:1032
+#: elf64-mmix.c:1163
#, c-format
msgid ""
"%s: Internal inconsistency error for value for\n"
@@ -1495,109 +1805,129 @@ msgid ""
"08lx\n"
msgstr ""
-#: elf64-mmix.c:1416
+#: elf64-mmix.c:1602
#, c-format
msgid ""
"%s: base-plus-offset relocation against register symbol: (unknown) in %s"
msgstr ""
-#: elf64-mmix.c:1421
+#: elf64-mmix.c:1607
#, c-format
msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
msgstr ""
-#: elf64-mmix.c:1465
+#: elf64-mmix.c:1651
#, c-format
msgid "%s: register relocation against non-register symbol: (unknown) in %s"
msgstr ""
-#: elf64-mmix.c:1470
+#: elf64-mmix.c:1656
#, c-format
msgid "%s: register relocation against non-register symbol: %s in %s"
msgstr ""
-#: elf64-mmix.c:1507
+#: elf64-mmix.c:1693
#, c-format
msgid "%s: directive LOCAL valid only with a register or absolute value"
msgstr ""
-#: elf64-mmix.c:1535
+#: elf64-mmix.c:1721
#, c-format
msgid ""
"%s: LOCAL directive: Register $%ld is not a local register. First global "
"register is $%ld."
msgstr ""
-#: elf64-mmix.c:1994
+#: elf64-mmix.c:2207
#, c-format
msgid ""
"%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
"linked file\n"
msgstr ""
-#: elf64-mmix.c:2053
+#: elf64-mmix.c:2265
msgid "Register section has contents\n"
msgstr ""
-#: elf64-mmix.c:2216
+#: elf64-mmix.c:2457
#, c-format
msgid ""
"Internal inconsistency: remaining %u != max %u.\n"
" Please report this bug."
msgstr ""
-#: elf64-ppc.c:2388 libbfd.c:831
-#, c-format
-msgid "%s: compiled for a big endian system and target is little endian"
+#: elf64-ppc.c:2500 libbfd.c:931
+msgid "%B: compiled for a big endian system and target is little endian"
msgstr ""
-#: elf64-ppc.c:2391 libbfd.c:833
-#, c-format
-msgid "%s: compiled for a little endian system and target is big endian"
+#: elf64-ppc.c:2503 libbfd.c:933
+msgid "%B: compiled for a little endian system and target is big endian"
msgstr ""
-#: elf64-ppc.c:4857
+#: elf64-ppc.c:5707
#, c-format
-msgid "%s: unexpected reloc type %u in .opd section"
+msgid ""
+"copy reloc against `%s' requires lazy plt linking; avoid setting "
+"LD_BIND_NOW=1 or upgrade gcc"
+msgstr ""
+
+#: elf64-ppc.c:6155
+msgid "dynreloc miscount for %B, section %A"
+msgstr ""
+
+#: elf64-ppc.c:6257
+msgid "%B: .opd is not a regular array of opd entries"
+msgstr ""
+
+#: elf64-ppc.c:6266
+msgid "%B: unexpected reloc type %u in .opd section"
+msgstr ""
+
+#: elf64-ppc.c:6287
+msgid "%B: undefined sym `%s' in .opd section"
msgstr ""
-#: elf64-ppc.c:4877
+#: elf64-ppc.c:6939 elf64-ppc.c:7318
#, c-format
-msgid "%s: .opd is not a regular array of opd entries"
+msgid "%s defined in removed toc entry"
msgstr ""
-#: elf64-ppc.c:4897
+#: elf64-ppc.c:8041
#, c-format
-msgid "%s: undefined sym `%s' in .opd section"
+msgid "long branch stub `%s' offset overflow"
msgstr ""
-#: elf64-ppc.c:6136
+#: elf64-ppc.c:8116
#, c-format
msgid "can't find branch stub `%s'"
msgstr ""
-#: elf64-ppc.c:6175 elf64-ppc.c:6250
+#: elf64-ppc.c:8155 elf64-ppc.c:8231
#, c-format
msgid "linkage table error against `%s'"
msgstr ""
-#: elf64-ppc.c:6340
+#: elf64-ppc.c:8360
#, c-format
msgid "can't build branch stub `%s'"
msgstr ""
-#: elf64-ppc.c:7047
+#: elf64-ppc.c:8784
+msgid "%B section %A exceeds stub group size"
+msgstr ""
+
+#: elf64-ppc.c:9295
msgid ".glink and .plt too far apart"
msgstr ""
-#: elf64-ppc.c:7135
+#: elf64-ppc.c:9408
msgid "stubs don't match calculated size"
msgstr ""
-#: elf64-ppc.c:7147
+#: elf64-ppc.c:9420
#, c-format
msgid ""
-"linker stubs in %u groups\n"
+"linker stubs in %u group%s\n"
" branch %lu\n"
" toc adjust %lu\n"
" long branch %lu\n"
@@ -1605,399 +1935,500 @@ msgid ""
" plt call %lu"
msgstr ""
-#: elf64-ppc.c:7723
-#, c-format
+#: elf64-ppc.c:10075
msgid ""
-"%s(%s+0x%lx): automatic multiple TOCs not supported using your crt files; "
+"%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; "
"recompile with -mminimal-toc or upgrade gcc"
msgstr ""
-#: elf64-ppc.c:7731
-#, c-format
+#: elf64-ppc.c:10083
msgid ""
-"%s(%s+0x%lx): sibling call optimization to `%s' does not allow automatic "
+"%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:8329
-#, c-format
-msgid "%s: relocation %s is not supported for symbol %s."
+#: elf64-ppc.c:10727
+msgid "%B: relocation %s is not supported for symbol %s."
msgstr ""
-#: elf64-ppc.c:8408
-#, c-format
-msgid "%s: error: relocation %s not a multiple of %d"
+#: elf64-ppc.c:10806
+msgid "%B: error: relocation %s not a multiple of %d"
msgstr ""
-#: elf-hppa.h:1458 elf-hppa.h:1491 elf-m10300.c:1628 elf64-sh64.c:1704
+#: elf64-sh64.c:1676
#, c-format
-msgid ""
-"%s: warning: unresolvable relocation against symbol `%s' from %s section"
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
msgstr ""
-#: elf64-sparc.c:1370
-#, c-format
-msgid "%s: check_relocs: unhandled reloc type %d"
+#: elf64-sparc.c:438
+msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER"
msgstr ""
-#: elf64-sparc.c:1407
-#, c-format
-msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
+#: elf64-sparc.c:458
+msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B"
msgstr ""
-#: elf64-sparc.c:1427
-#, c-format
-msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
+#: elf64-sparc.c:481
+msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"
msgstr ""
-#: elf64-sparc.c:1450
-#, c-format
-msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
+#: elf64-sparc.c:526
+msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"
msgstr ""
-#: elf64-sparc.c:1496
-#, c-format
-msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
+#: elf64-sparc.c:677
+msgid "%B: linking UltraSPARC specific with HAL specific code"
msgstr ""
-#: elf64-sparc.c:3053
-#, c-format
-msgid "%s: linking UltraSPARC specific with HAL specific code"
+#: elf64-x86-64.c:692 elf64-x86-64.c:818 elf64-x86-64.c:2069
+msgid ""
+"%B: relocation %s against `%s' can not be used when making a shared object; "
+"recompile with -fPIC"
msgstr ""
-#: elf64-x86-64.c:739
-#, c-format
-msgid "%s: %s' accessed both as normal and thread local symbol"
+#: elf64-x86-64.c:760
+msgid "%B: %s' accessed both as normal and thread local symbol"
msgstr ""
-#: elf.c:372
-#, c-format
-msgid "%s: invalid string offset %u >= %lu for section `%s'"
+#: elf64-x86-64.c:2000
+msgid ""
+"%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be "
+"used when making a shared object"
msgstr ""
-#: elf.c:624
-#, c-format
-msgid "%s: invalid SHT_GROUP entry"
+#: elf64-x86-64.c:2065
+msgid ""
+"%B: relocation R_X86_64_PC32 against protected function `%s' can not be used "
+"when making a shared object"
msgstr ""
-#: elf.c:695
-#, c-format
-msgid "%s: no group info for section %s"
+#: elf.c:288
+msgid "%B: invalid string offset %u >= %lu for section `%s'"
+msgstr ""
+
+#: elf.c:552
+msgid "%B: invalid SHT_GROUP entry"
+msgstr ""
+
+#: elf.c:622
+msgid "%B: no group info for section %A"
msgstr ""
-#: elf.c:1055
+#: elf.c:652 elf.c:3091 elflink.c:7588
+msgid "%B: warning: sh_link not set for section `%A'"
+msgstr ""
+
+#: elf.c:688
+msgid "%B: unknown [%d] section `%s' in group [%s]"
+msgstr ""
+
+#: elf.c:1071
+#, c-format
msgid ""
"\n"
"Program Header:\n"
msgstr ""
-#: elf.c:1106
+#: elf.c:1123
+#, c-format
msgid ""
"\n"
"Dynamic Section:\n"
msgstr ""
-#: elf.c:1235
+#: elf.c:1248
+#, c-format
msgid ""
"\n"
"Version definitions:\n"
msgstr ""
-#: elf.c:1258
+#: elf.c:1273
+#, c-format
msgid ""
"\n"
"Version References:\n"
msgstr ""
-#: elf.c:1263
+#: elf.c:1278
#, c-format
msgid " required from %s:\n"
msgstr ""
-#: elf.c:1944
-#, c-format
-msgid "%s: invalid link %lu for reloc section %s (index %u)"
+#: elf.c:1985
+msgid "%B: invalid link %lu for reloc section %s (index %u)"
msgstr ""
-#: elf.c:3686
-#, c-format
-msgid "%s: Not enough room for program headers (allocated %u, need %u)"
+#: elf.c:3062
+msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'"
msgstr ""
-#: elf.c:3791
-#, c-format
-msgid "%s: Not enough room for program headers, try linking with -N"
+#: elf.c:4070
+msgid "%B: Not enough room for program headers (allocated %u, need %u)"
msgstr ""
-#: elf.c:3922
-#, c-format
+#: elf.c:4173
msgid ""
-"Error: First section in segment (%s) starts at 0x%x whereas the segment "
-"starts at 0x%x"
+"%B: The first section in the PT_DYNAMIC segment is not the .dynamic section"
msgstr ""
-#: elf.c:4242
-#, c-format
-msgid "%s: warning: allocated section `%s' not in segment"
+#: elf.c:4217
+msgid "%B: Not enough room for program headers, try linking with -N"
msgstr ""
-#: elf.c:4566
-#, c-format
-msgid "%s: symbol `%s' required but not present"
+#: elf.c:4308
+msgid "%B: section %A lma 0x%lx overlaps previous sections"
msgstr ""
-#: elf.c:4854
-#, c-format
-msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+#: elf.c:4709
+msgid "%B: warning: allocated section `%s' not in segment"
msgstr ""
-#: elf.c:5485
+#: elf.c:5002
+msgid "%B: symbol `%s' required but not present"
+msgstr ""
+
+#: elf.c:5299
+msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr ""
+
+#: elf.c:5961
#, c-format
msgid ""
"Unable to find equivalent output section for symbol '%s' from section '%s'"
msgstr ""
-#: elf.c:6298
-#, c-format
-msgid "%s: unsupported relocation type %s"
+#: elf.c:6917
+msgid "%B: unsupported relocation type %s"
msgstr ""
-#: elfcode.h:1113
+#: elfcode.h:1110
#, c-format
msgid "%s: version count (%ld) does not match symbol count (%ld)"
msgstr ""
-#: elfcode.h:1342
+#: elfcode.h:1337
#, c-format
msgid "%s(%s): relocation %d has invalid symbol index %ld"
msgstr ""
-#: elflink.c:1456
-#, c-format
-msgid "%s: warning: unexpected redefinition of indirect versioned symbol `%s'"
+#: elf-hppa.h:1443 elf-hppa.h:1458
+msgid "%B(%A): warning: unresolvable relocation against symbol `%s'"
+msgstr ""
+
+#: elflink.c:907
+msgid ""
+"%s: TLS definition in %B section %A mismatches non-TLS definition in %B "
+"section %A"
+msgstr ""
+
+#: elflink.c:911
+msgid "%s: TLS reference in %B mismatches non-TLS reference in %B"
+msgstr ""
+
+#: elflink.c:915
+msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B"
+msgstr ""
+
+#: elflink.c:919
+msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A"
+msgstr ""
+
+#: elflink.c:1491
+msgid "%B: unexpected redefinition of indirect versioned symbol `%s'"
msgstr ""
#: elflink.c:1807
-#, c-format
-msgid "%s: undefined versioned symbol name %s"
+msgid "%B: undefined versioned symbol name %s"
msgstr ""
-#: elflink.c:2142
-#, c-format
-msgid "%s: relocation size mismatch in %s section %s"
+#: elflink.c:1955
+msgid ""
+"%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'"
+msgstr ""
+
+#: elflink.c:2147
+msgid "%B: relocation size mismatch in %B section %A"
msgstr ""
-#: elflink.c:2434
+#: elflink.c:2437
#, c-format
msgid "warning: type and size of dynamic symbol `%s' are not defined"
msgstr ""
-#: elflink.h:1022
-#, c-format
-msgid "%s: %s: invalid version %u (max %d)"
+#: elflink.c:2761
+msgid "warning: creating a DT_TEXTREL in a shared object."
msgstr ""
-#: elflink.h:1063
-#, c-format
-msgid "%s: %s: invalid needed version %d"
+#: elflink.c:3696
+msgid "%B: %s: invalid version %u (max %d)"
msgstr ""
-#: elflink.h:1238
-#, c-format
-msgid "Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"
+#: elflink.c:3732
+msgid "%B: %s: invalid needed version %d"
+msgstr ""
+
+#: elflink.c:3912
+msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B"
msgstr ""
-#: elflink.h:1252
+#: elflink.c:3924
+msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B"
+msgstr ""
+
+#: elflink.c:4091
#, c-format
-msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"
+msgid "%s: invalid DSO for symbol `%s' definition"
msgstr ""
-#: elflink.h:2160
+#: elflink.c:5152
#, c-format
msgid "%s: undefined version: %s"
msgstr ""
-#: elflink.h:2226
-#, c-format
-msgid "%s: .preinit_array section is not allowed in DSO"
+#: elflink.c:5219
+msgid "%B: .preinit_array section is not allowed in DSO"
msgstr ""
-#: elflink.h:3078
+#: elflink.c:5978
msgid "Not enough memory to sort relocations"
msgstr ""
-#: elflink.h:3958 elflink.h:4001
+#: elflink.c:6369
+msgid "%B: %s symbol `%s' in %B is referenced by DSO"
+msgstr ""
+
+#: elflink.c:6452
+msgid "%B: could not find output section %A for input section %A"
+msgstr ""
+
+#: elflink.c:6549
+msgid "%B: %s symbol `%s' isn't defined"
+msgstr ""
+
+#: elflink.c:7024
+msgid ""
+"error: %B contains a reloc (0x%s) for section %A that references a non-"
+"existent global symbol"
+msgstr ""
+
+#: elflink.c:7058
+msgid ""
+"%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' "
+"of %B\n"
+msgstr ""
+
+#: elflink.c:7665
+msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"
+msgstr ""
+
+#: elflink.c:7670
#, c-format
-msgid "%s: could not find output section %s"
+msgid "%A has both ordered and unordered sections"
+msgstr ""
+
+#: elflink.c:8487 elflink.c:8528
+msgid "%B: could not find output section %s"
msgstr ""
-#: elflink.h:3964
+#: elflink.c:8492
#, c-format
msgid "warning: %s section has zero size"
msgstr ""
-#: elflink.h:4483
-#, c-format
-msgid "%s: %s symbol `%s' in %s is referenced by DSO"
+#: elflink.c:9087
+msgid "Warning: gc-sections option ignored"
msgstr ""
-#: elflink.h:4564
-#, c-format
-msgid "%s: could not find output section %s for input section %s"
+#: elflink.c:9704
+msgid "%B: ignoring duplicate section `%A'"
msgstr ""
-#: elflink.h:4666
-#, c-format
-msgid "%s: %s symbol `%s' isn't defined"
+#: elflink.c:9711 elflink.c:9718
+msgid "%B: duplicate section `%A' has different size"
+msgstr ""
+
+#: elflink.c:9726 elflink.c:9731
+msgid "%B: warning: could not read contents of section `%A'"
msgstr ""
-#: elflink.h:5053 elflink.h:5095
-msgid "%T: discarded in section `%s' from %s\n"
+#: elflink.c:9735
+msgid "%B: warning: duplicate section `%A' has different contents"
msgstr ""
-#: elfxx-mips.c:887
+#: elfxx-mips.c:866
msgid "static procedure (no name)"
msgstr ""
-#: elfxx-mips.c:1897
+#: elfxx-mips.c:2513
msgid "not enough GOT space for local GOT entries"
msgstr ""
-#: elfxx-mips.c:3691
-#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+#: elfxx-mips.c:4356
+msgid "%B: %A+0x%lx: jump to stub routine which is not jal"
msgstr ""
-#: elfxx-mips.c:5192
-#, c-format
-msgid "%s: Malformed reloc detected for section %s"
+#: elfxx-mips.c:4993 elfxx-mips.c:5214
+msgid "%B: Warning: bad `%s' option size %u smaller than its header"
msgstr ""
-#: elfxx-mips.c:5266
-#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+#: elfxx-mips.c:5965
+msgid "%B: Malformed reloc detected for section %s"
+msgstr ""
+
+#: elfxx-mips.c:6041
+msgid "%B: CALL16 reloc at 0x%lx not against global symbol"
msgstr ""
-#: elfxx-mips.c:8693
+#: elfxx-mips.c:9380
#, c-format
msgid "%s: illegal section name `%s'"
msgstr ""
-#: elfxx-mips.c:9027
-#, c-format
-msgid "%s: endianness incompatible with that of the selected emulation"
+#: elfxx-mips.c:9719
+msgid "%B: endianness incompatible with that of the selected emulation"
msgstr ""
-#: elfxx-mips.c:9039
-#, c-format
-msgid "%s: ABI is incompatible with that of the selected emulation"
+#: elfxx-mips.c:9731
+msgid "%B: ABI is incompatible with that of the selected emulation"
msgstr ""
-#: elfxx-mips.c:9106
-#, c-format
-msgid "%s: warning: linking PIC files with non-PIC files"
+#: elfxx-mips.c:9803
+msgid "%B: warning: linking PIC files with non-PIC files"
msgstr ""
-#: elfxx-mips.c:9123
-#, c-format
-msgid "%s: linking 32-bit code with 64-bit code"
+#: elfxx-mips.c:9820
+msgid "%B: linking 32-bit code with 64-bit code"
msgstr ""
-#: elfxx-mips.c:9151
-#, c-format
-msgid "%s: linking %s module with previous %s modules"
+#: elfxx-mips.c:9848
+msgid "%B: linking %s module with previous %s modules"
msgstr ""
-#: elfxx-mips.c:9174
-#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+#: elfxx-mips.c:9871
+msgid "%B: ABI mismatch: linking %s module with previous %s modules"
msgstr ""
-#: elfxx-mips.c:9243
+#: elfxx-mips.c:9936
+#, c-format
msgid " [abi=O32]"
msgstr ""
-#: elfxx-mips.c:9245
+#: elfxx-mips.c:9938
+#, c-format
msgid " [abi=O64]"
msgstr ""
-#: elfxx-mips.c:9247
+#: elfxx-mips.c:9940
+#, c-format
msgid " [abi=EABI32]"
msgstr ""
-#: elfxx-mips.c:9249
+#: elfxx-mips.c:9942
+#, c-format
msgid " [abi=EABI64]"
msgstr ""
-#: elfxx-mips.c:9251
+#: elfxx-mips.c:9944
+#, c-format
msgid " [abi unknown]"
msgstr ""
-#: elfxx-mips.c:9253
+#: elfxx-mips.c:9946
+#, c-format
msgid " [abi=N32]"
msgstr ""
-#: elfxx-mips.c:9255
+#: elfxx-mips.c:9948
+#, c-format
msgid " [abi=64]"
msgstr ""
-#: elfxx-mips.c:9257
+#: elfxx-mips.c:9950
+#, c-format
msgid " [no abi set]"
msgstr ""
-#: elfxx-mips.c:9260
+#: elfxx-mips.c:9953
+#, c-format
msgid " [mips1]"
msgstr ""
-#: elfxx-mips.c:9262
+#: elfxx-mips.c:9955
+#, c-format
msgid " [mips2]"
msgstr ""
-#: elfxx-mips.c:9264
+#: elfxx-mips.c:9957
+#, c-format
msgid " [mips3]"
msgstr ""
-#: elfxx-mips.c:9266
+#: elfxx-mips.c:9959
+#, c-format
msgid " [mips4]"
msgstr ""
-#: elfxx-mips.c:9268
+#: elfxx-mips.c:9961
+#, c-format
msgid " [mips5]"
msgstr ""
-#: elfxx-mips.c:9270
+#: elfxx-mips.c:9963
+#, c-format
msgid " [mips32]"
msgstr ""
-#: elfxx-mips.c:9272
+#: elfxx-mips.c:9965
+#, c-format
msgid " [mips64]"
msgstr ""
-#: elfxx-mips.c:9274
+#: elfxx-mips.c:9967
+#, c-format
msgid " [mips32r2]"
msgstr ""
-#: elfxx-mips.c:9276
+#: elfxx-mips.c:9969
+#, c-format
+msgid " [mips64r2]"
+msgstr ""
+
+#: elfxx-mips.c:9971
+#, c-format
msgid " [unknown ISA]"
msgstr ""
-#: elfxx-mips.c:9279
+#: elfxx-mips.c:9974
+#, c-format
msgid " [mdmx]"
msgstr ""
-#: elfxx-mips.c:9282
+#: elfxx-mips.c:9977
+#, c-format
msgid " [mips16]"
msgstr ""
-#: elfxx-mips.c:9285
+#: elfxx-mips.c:9980
+#, c-format
msgid " [32bitmode]"
msgstr ""
-#: elfxx-mips.c:9287
+#: elfxx-mips.c:9982
+#, c-format
msgid " [not 32bitmode]"
msgstr ""
+#: elfxx-sparc.c:402
+#, c-format
+msgid "invalid relocation type %d"
+msgstr ""
+
+#: elfxx-sparc.c:2783
+msgid "%B: probably compiled without -fPIC?"
+msgstr ""
+
#: i386linux.c:457 m68klinux.c:461 sparclinux.c:458
#, c-format
msgid "Output file requires shared library `%s'\n"
@@ -2018,249 +2449,244 @@ msgstr ""
msgid "Warning: fixup count mismatch\n"
msgstr ""
-#: ieee.c:293
+#: ieee.c:157
#, c-format
msgid "%s: string too long (%d chars, max 65535)"
msgstr ""
-#: ieee.c:428
+#: ieee.c:284
#, c-format
msgid "%s: unrecognized symbol `%s' flags 0x%x"
msgstr ""
-#: ieee.c:938
-#, c-format
-msgid "%s: unimplemented ATI record %u for symbol %u"
+#: ieee.c:786
+msgid "%B: unimplemented ATI record %u for symbol %u"
msgstr ""
-#: ieee.c:963
-#, c-format
-msgid "%s: unexpected ATN type %d in external part"
+#: ieee.c:810
+msgid "%B: unexpected ATN type %d in external part"
msgstr ""
-#: ieee.c:985
-#, c-format
-msgid "%s: unexpected type after ATN"
+#: ieee.c:832
+msgid "%B: unexpected type after ATN"
msgstr ""
-#: ihex.c:264
-#, c-format
-msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
+#: ihex.c:228
+msgid "%B:%d: unexpected character `%s' in Intel Hex file"
msgstr ""
-#: ihex.c:372
-#, c-format
-msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
+#: ihex.c:335
+msgid "%B:%u: bad checksum in Intel Hex file (expected %u, found %u)"
msgstr ""
-#: ihex.c:426
-#, c-format
-msgid "%s:%u: bad extended address record length in Intel Hex file"
+#: ihex.c:389
+msgid "%B:%u: bad extended address record length in Intel Hex file"
msgstr ""
-#: ihex.c:443
-#, c-format
-msgid "%s:%u: bad extended start address length in Intel Hex file"
+#: ihex.c:406
+msgid "%B:%u: bad extended start address length in Intel Hex file"
msgstr ""
-#: ihex.c:460
-#, c-format
-msgid "%s:%u: bad extended linear address record length in Intel Hex file"
+#: ihex.c:423
+msgid "%B:%u: bad extended linear address record length in Intel Hex file"
msgstr ""
-#: ihex.c:477
-#, c-format
-msgid "%s:%u: bad extended linear start address length in Intel Hex file"
+#: ihex.c:440
+msgid "%B:%u: bad extended linear start address length in Intel Hex file"
msgstr ""
-#: ihex.c:494
-#, c-format
-msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
+#: ihex.c:457
+msgid "%B:%u: unrecognized ihex type %u in Intel Hex file"
msgstr ""
-#: ihex.c:619
-#, c-format
-msgid "%s: internal error in ihex_read_section"
+#: ihex.c:578
+msgid "%B: internal error in ihex_read_section"
msgstr ""
-#: ihex.c:654
-#, c-format
-msgid "%s: bad section length in ihex_read_section"
+#: ihex.c:612
+msgid "%B: bad section length in ihex_read_section"
msgstr ""
-#: ihex.c:872
+#: ihex.c:824
#, c-format
msgid "%s: address 0x%s out of range for Intel Hex file"
msgstr ""
-#: libbfd.c:861
+#: libbfd.c:961
#, c-format
msgid "Deprecated %s called at %s line %d in %s\n"
msgstr ""
-#: libbfd.c:864
+#: libbfd.c:964
#, c-format
msgid "Deprecated %s called\n"
msgstr ""
-#: linker.c:1829
-#, c-format
-msgid "%s: indirect symbol `%s' to `%s' is a loop"
+#: linker.c:1873
+msgid "%B: indirect symbol `%s' to `%s' is a loop"
msgstr ""
-#: linker.c:2697
+#: linker.c:2740
#, c-format
msgid "Attempt to do relocatable link with %s input and %s output"
msgstr ""
-#: merge.c:896
+#: linker.c:3037
+msgid "%B: warning: ignoring duplicate section `%A'\n"
+msgstr ""
+
+#: linker.c:3051
+msgid "%B: warning: duplicate section `%A' has different size\n"
+msgstr ""
+
+#: merge.c:817
#, c-format
-msgid "%s: access beyond end of merged section (%ld + %ld)"
+msgid "%s: access beyond end of merged section (%ld)"
msgstr ""
-#: mmo.c:503
+#: mmo.c:456
#, c-format
msgid "%s: No core to allocate section name %s\n"
msgstr ""
-#: mmo.c:579
+#: mmo.c:531
#, c-format
msgid "%s: No core to allocate a symbol %d bytes long\n"
msgstr ""
-#: mmo.c:1287
+#: mmo.c:1187
#, c-format
msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
msgstr ""
-#: mmo.c:1433
+#: mmo.c:1332
#, c-format
msgid ""
"%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
"starting with `%s'\n"
msgstr ""
-#: mmo.c:1674
+#: mmo.c:1566
#, c-format
msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
msgstr ""
-#: mmo.c:1684
+#: mmo.c:1576
#, c-format
msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
msgstr ""
-#: mmo.c:1720
+#: mmo.c:1612
#, c-format
msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
msgstr ""
-#: mmo.c:1766
+#: mmo.c:1658
#, c-format
msgid ""
"%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
msgstr ""
-#: mmo.c:1805
+#: mmo.c:1697
#, c-format
msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
msgstr ""
-#: mmo.c:1814
+#: mmo.c:1706
#, c-format
msgid ""
"%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
msgstr ""
-#: mmo.c:1837
+#: mmo.c:1729
#, 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:1860
+#: mmo.c:1752
#, c-format
msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
msgstr ""
-#: mmo.c:1880
+#: mmo.c:1772
#, c-format
msgid ""
"%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
msgstr ""
-#: mmo.c:1893
+#: mmo.c:1785
#, c-format
msgid ""
"%s: invalid mmo file: file name for number %d was not specified before use\n"
msgstr ""
-#: mmo.c:1999
+#: mmo.c:1892
#, c-format
msgid ""
"%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
msgstr ""
-#: mmo.c:2035
+#: mmo.c:1928
#, c-format
msgid "%s: invalid mmo file: lop_end not last item in file\n"
msgstr ""
-#: mmo.c:2048
+#: mmo.c:1941
#, c-format
msgid ""
"%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
"to the preceding lop_stab (%ld)\n"
msgstr ""
-#: mmo.c:2698
+#: mmo.c:2649
#, c-format
msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
msgstr ""
-#: mmo.c:2949
+#: mmo.c:2892
#, c-format
msgid ""
"%s: Bad symbol definition: `Main' set to %s rather than the start address %"
"s\n"
msgstr ""
-#: mmo.c:3039
+#: mmo.c:2984
#, c-format
msgid ""
"%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: "
"%d. Only `Main' will be emitted.\n"
msgstr ""
-#: mmo.c:3084
+#: mmo.c:3029
#, c-format
msgid "%s: internal error, symbol table changed size from %d to %d words\n"
msgstr ""
-#: mmo.c:3139
+#: mmo.c:3081
#, c-format
msgid "%s: internal error, internal register section %s had contents\n"
msgstr ""
-#: mmo.c:3191
+#: mmo.c:3132
#, c-format
msgid "%s: no initialized registers; section length 0\n"
msgstr ""
-#: mmo.c:3197
+#: mmo.c:3138
#, c-format
msgid "%s: too many initialized registers; section length %ld\n"
msgstr ""
-#: mmo.c:3202
+#: mmo.c:3143
#, c-format
msgid ""
"%s: invalid start address for initialized registers of length %ld: 0x%lx%"
"08lx\n"
msgstr ""
-#: oasys.c:1052
+#: oasys.c:876
#, c-format
msgid "%s: can not represent section `%s' in oasys"
msgstr ""
@@ -2271,246 +2697,240 @@ msgid "Unhandled OSF/1 core file section type %d\n"
msgstr ""
#. XXX code yet to be written.
-#: peicode.h:787
-#, c-format
-msgid "%s: Unhandled import type; %x"
+#: peicode.h:731
+msgid "%B: Unhandled import type; %x"
msgstr ""
-#: peicode.h:792
-#, c-format
-msgid "%s: Unrecognised import type; %x"
+#: peicode.h:736
+msgid "%B: Unrecognised import type; %x"
msgstr ""
-#: peicode.h:806
-#, c-format
-msgid "%s: Unrecognised import name type; %x"
+#: peicode.h:750
+msgid "%B: Unrecognised import name type; %x"
msgstr ""
-#: peicode.h:1164
-#, c-format
-msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
+#: peicode.h:1120
+msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive"
msgstr ""
-#: peicode.h:1176
-#, c-format
+#: peicode.h:1132
msgid ""
-"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
+"%B: Recognised but unhandled machine type (0x%x) in Import Library Format "
"archive"
msgstr ""
-#: peicode.h:1193
-#, c-format
-msgid "%s: size field is zero in Import Library Format header"
+#: peicode.h:1150
+msgid "%B: size field is zero in Import Library Format header"
msgstr ""
-#: peicode.h:1224
-#, c-format
-msgid "%s: string not null terminated in ILF object file."
+#: peicode.h:1181
+msgid "%B: string not null terminated in ILF object file."
msgstr ""
-#: pe-mips.c:659
-#, c-format
-msgid "%s: `ld -r' not supported with PE MIPS objects\n"
+#: pe-mips.c:588
+msgid "%B: `ld -r' not supported with PE MIPS objects\n"
msgstr ""
#. OK, at this point the following variables are set up:
#. src = VMA of the memory we're fixing up
#. mem = pointer to memory we're fixing up
-#. val = VMA of what we need to refer to
-#.
-#: pe-mips.c:795
-#, c-format
-msgid "%s: unimplemented %s\n"
+#. val = VMA of what we need to refer to.
+#: pe-mips.c:704
+msgid "%B: unimplemented %s\n"
msgstr ""
-#: pe-mips.c:821
-#, c-format
-msgid "%s: jump too far away\n"
+#: pe-mips.c:730
+msgid "%B: jump too far away\n"
msgstr ""
-#: pe-mips.c:848
-#, c-format
-msgid "%s: bad pair/reflo after refhi\n"
+#: pe-mips.c:756
+msgid "%B: bad pair/reflo after refhi\n"
msgstr ""
-#: ppcboot.c:416
+#: ppcboot.c:419
+#, c-format
msgid ""
"\n"
"ppcboot header:\n"
msgstr ""
-#: ppcboot.c:417
+#: ppcboot.c:420
#, c-format
msgid "Entry offset = 0x%.8lx (%ld)\n"
msgstr ""
-#: ppcboot.c:418
+#: ppcboot.c:421
#, c-format
msgid "Length = 0x%.8lx (%ld)\n"
msgstr ""
-#: ppcboot.c:421
+#: ppcboot.c:424
#, c-format
msgid "Flag field = 0x%.2x\n"
msgstr ""
-#: ppcboot.c:427
+#: ppcboot.c:430
#, c-format
msgid "Partition name = \"%s\"\n"
msgstr ""
-#: ppcboot.c:446
+#: ppcboot.c:449
#, c-format
msgid ""
"\n"
"Partition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
msgstr ""
-#: ppcboot.c:452
+#: ppcboot.c:455
#, c-format
msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
msgstr ""
-#: ppcboot.c:458
+#: ppcboot.c:461
#, c-format
msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
msgstr ""
-#: ppcboot.c:459
+#: ppcboot.c:462
#, c-format
msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
msgstr ""
-#: som.c:5422
+#: som.c:5069
+#, c-format
+msgid ""
+"\n"
+"Exec Auxiliary Header\n"
+msgstr ""
+
+#: som.c:5330
msgid "som_sizeof_headers unimplemented"
msgstr ""
-#: srec.c:302
-#, c-format
-msgid "%s:%d: Unexpected character `%s' in S-record file\n"
+#: srec.c:259
+msgid "%B:%d: Unexpected character `%s' in S-record file\n"
msgstr ""
-#: stabs.c:319
-#, c-format
-msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+#: stabs.c:276
+msgid "%B(%A+0x%lx): Stabs entry has invalid string index."
msgstr ""
-#: syms.c:1019
+#: syms.c:1048
msgid "Unsupported .stab relocation"
msgstr ""
-#: vms-gsd.c:356
+#: vms-gsd.c:337
#, c-format
msgid "bfd_make_section (%s) failed"
msgstr ""
-#: vms-gsd.c:371
+#: vms-gsd.c:352
#, c-format
msgid "bfd_set_section_flags (%s, %x) failed"
msgstr ""
-#: vms-gsd.c:407
+#: vms-gsd.c:387
#, c-format
msgid "Size mismatch section %s=%lx, %s=%lx"
msgstr ""
-#: vms-gsd.c:704
+#: vms-gsd.c:678
#, c-format
msgid "unknown gsd/egsd subtype %d"
msgstr ""
-#: vms-hdr.c:408
+#: vms-hdr.c:327
msgid "Object module NOT error-free !\n"
msgstr ""
-#: vms-misc.c:541
+#: vms-misc.c:473
#, c-format
msgid "Stack overflow (%d) in _bfd_vms_push"
msgstr ""
-#: vms-misc.c:559
+#: vms-misc.c:488
msgid "Stack underflow in _bfd_vms_pop"
msgstr ""
-#: vms-misc.c:918
+#: vms-misc.c:802
msgid "_bfd_vms_output_counted called with zero bytes"
msgstr ""
-#: vms-misc.c:923
+#: vms-misc.c:807
msgid "_bfd_vms_output_counted called with too many bytes"
msgstr ""
-#: vms-misc.c:1054
+#: vms-misc.c:925
#, c-format
msgid "Symbol %s replaced by %s\n"
msgstr ""
-#: vms-misc.c:1117
+#: vms-misc.c:984
#, c-format
msgid "failed to enter %s"
msgstr ""
-#: vms-tir.c:102
+#: vms-tir.c:55
msgid "No Mem !"
msgstr ""
-#: vms-tir.c:383
+#: vms-tir.c:298
#, c-format
msgid "bad section index in %s"
msgstr ""
-#: vms-tir.c:396
+#: vms-tir.c:311
#, c-format
msgid "unsupported STA cmd %s"
msgstr ""
-#: vms-tir.c:401 vms-tir.c:1261
+#: vms-tir.c:316 vms-tir.c:1118
#, c-format
msgid "reserved STA cmd %d"
msgstr ""
-#: vms-tir.c:512 vms-tir.c:535
+#: vms-tir.c:408 vms-tir.c:430
#, c-format
msgid "%s: no symbol \"%s\""
msgstr ""
-#. unsigned shift
-#. rotate
+#. Unsigned shift.
+#. Rotate.
#. Redefine symbol to current location.
#. Define a literal.
-#: vms-tir.c:602 vms-tir.c:714 vms-tir.c:824 vms-tir.c:842 vms-tir.c:850
-#: vms-tir.c:859 vms-tir.c:1584
+#: vms-tir.c:495 vms-tir.c:604 vms-tir.c:702 vms-tir.c:719 vms-tir.c:726
+#: vms-tir.c:734 vms-tir.c:1438
#, c-format
msgid "%s: not supported"
msgstr ""
-#: vms-tir.c:607 vms-tir.c:1439
+#: vms-tir.c:500 vms-tir.c:1295
#, c-format
msgid "%s: not implemented"
msgstr ""
-#: vms-tir.c:611 vms-tir.c:1443
+#: vms-tir.c:504 vms-tir.c:1299
#, c-format
msgid "reserved STO cmd %d"
msgstr ""
-#: vms-tir.c:729 vms-tir.c:1589
+#: vms-tir.c:619 vms-tir.c:1443
#, c-format
msgid "reserved OPR cmd %d"
msgstr ""
-#: vms-tir.c:797 vms-tir.c:1653
+#: vms-tir.c:679 vms-tir.c:1507
#, c-format
msgid "reserved CTL cmd %d"
msgstr ""
#. stack byte from image
#. arg: none.
-#: vms-tir.c:1169
+#: vms-tir.c:1026
msgid "stack-from-image not implemented"
msgstr ""
-#: vms-tir.c:1187
+#: vms-tir.c:1044
msgid "stack-entry-mask not fully implemented"
msgstr ""
@@ -2521,345 +2941,353 @@ msgstr ""
#.
#. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
#. and stack TRUE (args match) or FALSE (args dont match) value.
-#: vms-tir.c:1201
+#: vms-tir.c:1058
msgid "PASSMECH not fully implemented"
msgstr ""
-#: vms-tir.c:1220
+#: vms-tir.c:1077
msgid "stack-local-symbol not fully implemented"
msgstr ""
-#: vms-tir.c:1233
+#: vms-tir.c:1090
msgid "stack-literal not fully implemented"
msgstr ""
-#: vms-tir.c:1254
+#: vms-tir.c:1111
msgid "stack-local-symbol-entry-point-mask not fully implemented"
msgstr ""
-#: vms-tir.c:1531 vms-tir.c:1543 vms-tir.c:1555 vms-tir.c:1567 vms-tir.c:1632
-#: vms-tir.c:1640 vms-tir.c:1648
+#: vms-tir.c:1385 vms-tir.c:1397 vms-tir.c:1409 vms-tir.c:1421 vms-tir.c:1486
+#: vms-tir.c:1494 vms-tir.c:1502
#, c-format
msgid "%s: not fully implemented"
msgstr ""
-#: vms-tir.c:1705
+#: vms-tir.c:1560
#, c-format
msgid "obj code %d not found"
msgstr ""
-#: vms-tir.c:2043
+#: vms-tir.c:1868
#, c-format
msgid "SEC_RELOC with no relocs in section %s"
msgstr ""
-#: vms-tir.c:2331
+#: vms-tir.c:2150
#, c-format
msgid "Unhandled relocation %s"
msgstr ""
-#: xcofflink.c:1244
+#: xcofflink.c:564
#, c-format
-msgid "%s: `%s' has line numbers but no enclosing section"
+msgid "%s: XCOFF shared object when not producing XCOFF output"
msgstr ""
-#: xcofflink.c:1297
+#: xcofflink.c:585
#, c-format
-msgid "%s: class %d symbol `%s' has no aux entries"
+msgid "%s: dynamic object with no .loader section"
msgstr ""
-#: xcofflink.c:1320
-#, c-format
-msgid "%s: symbol `%s' has unrecognized csect type %d"
+#: xcofflink.c:1148
+msgid "%B: `%s' has line numbers but no enclosing section"
msgstr ""
-#: xcofflink.c:1332
-#, c-format
-msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
+#: xcofflink.c:1200
+msgid "%B: class %d symbol `%s' has no aux entries"
msgstr ""
-#: xcofflink.c:1368
-#, c-format
-msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
+#: xcofflink.c:1223
+msgid "%B: symbol `%s' has unrecognized csect type %d"
msgstr ""
-#: xcofflink.c:1520
-#, c-format
-msgid "%s: csect `%s' not in enclosing section"
+#: xcofflink.c:1235
+msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
msgstr ""
-#: xcofflink.c:1627
-#, c-format
-msgid "%s: misplaced XTY_LD `%s'"
+#: xcofflink.c:1271
+msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d"
msgstr ""
-#: xcofflink.c:1958
-#, c-format
-msgid "%s: reloc %s:%d not in csect"
+#: xcofflink.c:1417
+msgid "%B: csect `%s' not in enclosing section"
msgstr ""
-#: xcofflink.c:2095
-#, c-format
-msgid "%s: XCOFF shared object when not producing XCOFF output"
+#: xcofflink.c:1524
+msgid "%B: misplaced XTY_LD `%s'"
msgstr ""
-#: xcofflink.c:2116
-#, c-format
-msgid "%s: dynamic object with no .loader section"
+#: xcofflink.c:1839
+msgid "%B: reloc %s:%d not in csect"
msgstr ""
-#: xcofflink.c:2761
+#: xcofflink.c:2637
#, c-format
msgid "%s: no such symbol"
msgstr ""
-#: xcofflink.c:2894
-msgid "error: undefined symbol __rtinit"
-msgstr ""
-
-#: xcofflink.c:3455
+#: xcofflink.c:2866
#, c-format
msgid "warning: attempt to export undefined symbol `%s'"
msgstr ""
-#: xcofflink.c:4448
+#: xcofflink.c:3033
+msgid "error: undefined symbol __rtinit"
+msgstr ""
+
+#: xcofflink.c:3653
#, c-format
msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
msgstr ""
-#: xcofflink.c:5288 xcofflink.c:5755 xcofflink.c:5817 xcofflink.c:6119
+#: xcofflink.c:4489
+msgid "%B: loader reloc in unrecognized section `%A'"
+msgstr ""
+
+#: xcofflink.c:4510
+msgid "%B: `%s' in loader reloc but not loader sym"
+msgstr ""
+
+#: xcofflink.c:4525
+msgid "%B: loader reloc in read-only section %A"
+msgstr ""
+
+#: xcofflink.c:4934 xcofflink.c:4996 xcofflink.c:5291
#, c-format
msgid "%s: loader reloc in unrecognized section `%s'"
msgstr ""
-#: xcofflink.c:5310 xcofflink.c:6130
+#: xcofflink.c:5302
#, c-format
msgid "%s: `%s' in loader reloc but not loader sym"
msgstr ""
-#: xcofflink.c:5325
-#, c-format
-msgid "%s: loader reloc in read-only section %s"
+#: elf32-ia64.c:1139 elf64-ia64.c:1139
+msgid ""
+"%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect "
+"branch."
msgstr ""
-#: elf32-ia64.c:2271 elf64-ia64.c:2271
+#: elf32-ia64.c:2508 elf64-ia64.c:2508
msgid "@pltoff reloc against local symbol"
msgstr ""
-#: elf32-ia64.c:3663 elf64-ia64.c:3663
+#: elf32-ia64.c:3955 elf64-ia64.c:3955
#, c-format
msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
msgstr ""
-#: elf32-ia64.c:3674 elf64-ia64.c:3674
+#: elf32-ia64.c:3966 elf64-ia64.c:3966
#, c-format
msgid "%s: __gp does not cover short data segment"
msgstr ""
-#: elf32-ia64.c:3986 elf64-ia64.c:3986
-#, c-format
-msgid "%s: linking non-pic code in a shared library"
+#: elf32-ia64.c:4213 elf64-ia64.c:4213
+msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'"
msgstr ""
-#: elf32-ia64.c:4017 elf64-ia64.c:4017
-#, c-format
-msgid "%s: @gprel relocation against dynamic symbol %s"
+#: elf32-ia64.c:4280 elf64-ia64.c:4280
+msgid "%B: @gprel relocation against dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4077 elf64-ia64.c:4077
-#, c-format
-msgid "%s: linking non-pic code in a position independent executable"
+#: elf32-ia64.c:4343 elf64-ia64.c:4343
+msgid "%B: linking non-pic code in a position independent executable"
msgstr ""
-#: elf32-ia64.c:4214 elf64-ia64.c:4214
-#, c-format
-msgid "%s: @internal branch to dynamic symbol %s"
+#: elf32-ia64.c:4480 elf64-ia64.c:4480
+msgid "%B: @internal branch to dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4216 elf64-ia64.c:4216
-#, c-format
-msgid "%s: speculation fixup to dynamic symbol %s"
+#: elf32-ia64.c:4482 elf64-ia64.c:4482
+msgid "%B: speculation fixup to dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4218 elf64-ia64.c:4218
-#, c-format
-msgid "%s: @pcrel relocation against dynamic symbol %s"
+#: elf32-ia64.c:4484 elf64-ia64.c:4484
+msgid "%B: @pcrel relocation against dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4430 elf64-ia64.c:4430
+#: elf32-ia64.c:4691 elf64-ia64.c:4691
msgid "unsupported reloc"
msgstr ""
-#: elf32-ia64.c:4709 elf64-ia64.c:4709
-#, c-format
-msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
+#: elf32-ia64.c:4724 elf64-ia64.c:4724
+msgid ""
+"%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> "
+"0x1000000)."
msgstr ""
-#: elf32-ia64.c:4718 elf64-ia64.c:4718
-#, c-format
-msgid "%s: linking big-endian files with little-endian files"
+#: elf32-ia64.c:4985 elf64-ia64.c:4985
+msgid "%B: linking trap-on-NULL-dereference with non-trapping files"
msgstr ""
-#: elf32-ia64.c:4727 elf64-ia64.c:4727
-#, c-format
-msgid "%s: linking 64-bit files with 32-bit files"
+#: elf32-ia64.c:4994 elf64-ia64.c:4994
+msgid "%B: linking big-endian files with little-endian files"
msgstr ""
-#: elf32-ia64.c:4736 elf64-ia64.c:4736
-#, c-format
-msgid "%s: linking constant-gp files with non-constant-gp files"
+#: elf32-ia64.c:5003 elf64-ia64.c:5003
+msgid "%B: linking 64-bit files with 32-bit files"
msgstr ""
-#: elf32-ia64.c:4746 elf64-ia64.c:4746
-#, c-format
-msgid "%s: linking auto-pic files with non-auto-pic files"
+#: elf32-ia64.c:5012 elf64-ia64.c:5012
+msgid "%B: linking constant-gp files with non-constant-gp files"
msgstr ""
-#: peigen.c:985 pepigen.c:985
-#, c-format
-msgid "%s: line number overflow: 0x%lx > 0xffff"
+#: elf32-ia64.c:5022 elf64-ia64.c:5022
+msgid "%B: linking auto-pic files with non-auto-pic files"
msgstr ""
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:979 pepigen.c:979
#, c-format
-msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
+msgid "%s: line number overflow: 0x%lx > 0xffff"
msgstr ""
-#: peigen.c:1016 pepigen.c:1016
+#: peigen.c:1006 pepigen.c:1006
msgid "Export Directory [.edata (or where ever we found it)]"
msgstr ""
-#: peigen.c:1017 pepigen.c:1017
+#: peigen.c:1007 pepigen.c:1007
msgid "Import Directory [parts of .idata]"
msgstr ""
-#: peigen.c:1018 pepigen.c:1018
+#: peigen.c:1008 pepigen.c:1008
msgid "Resource Directory [.rsrc]"
msgstr ""
-#: peigen.c:1019 pepigen.c:1019
+#: peigen.c:1009 pepigen.c:1009
msgid "Exception Directory [.pdata]"
msgstr ""
-#: peigen.c:1020 pepigen.c:1020
+#: peigen.c:1010 pepigen.c:1010
msgid "Security Directory"
msgstr ""
-#: peigen.c:1021 pepigen.c:1021
+#: peigen.c:1011 pepigen.c:1011
msgid "Base Relocation Directory [.reloc]"
msgstr ""
-#: peigen.c:1022 pepigen.c:1022
+#: peigen.c:1012 pepigen.c:1012
msgid "Debug Directory"
msgstr ""
-#: peigen.c:1023 pepigen.c:1023
+#: peigen.c:1013 pepigen.c:1013
msgid "Description Directory"
msgstr ""
-#: peigen.c:1024 pepigen.c:1024
+#: peigen.c:1014 pepigen.c:1014
msgid "Special Directory"
msgstr ""
-#: peigen.c:1025 pepigen.c:1025
+#: peigen.c:1015 pepigen.c:1015
msgid "Thread Storage Directory [.tls]"
msgstr ""
-#: peigen.c:1026 pepigen.c:1026
+#: peigen.c:1016 pepigen.c:1016
msgid "Load Configuration Directory"
msgstr ""
-#: peigen.c:1027 pepigen.c:1027
+#: peigen.c:1017 pepigen.c:1017
msgid "Bound Import Directory"
msgstr ""
-#: peigen.c:1028 pepigen.c:1028
+#: peigen.c:1018 pepigen.c:1018
msgid "Import Address Table Directory"
msgstr ""
-#: peigen.c:1029 pepigen.c:1029
+#: peigen.c:1019 pepigen.c:1019
msgid "Delay Import Directory"
msgstr ""
-#: peigen.c:1030 peigen.c:1031 pepigen.c:1030 pepigen.c:1031
+#: peigen.c:1020 peigen.c:1021 pepigen.c:1020 pepigen.c:1021
msgid "Reserved"
msgstr ""
-#: peigen.c:1094 pepigen.c:1094
+#: peigen.c:1081 pepigen.c:1081
+#, c-format
msgid ""
"\n"
"There is an import table, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1099 pepigen.c:1099
+#: peigen.c:1086 pepigen.c:1086
#, c-format
msgid ""
"\n"
"There is an import table in %s at 0x%lx\n"
msgstr ""
-#: peigen.c:1136 pepigen.c:1136
+#: peigen.c:1129 pepigen.c:1129
#, c-format
msgid ""
"\n"
"Function descriptor located at the start address: %04lx\n"
msgstr ""
-#: peigen.c:1139 pepigen.c:1139
+#: peigen.c:1132 pepigen.c:1132
#, c-format
msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
msgstr ""
-#: peigen.c:1145 pepigen.c:1145
+#: peigen.c:1140 pepigen.c:1140
+#, c-format
msgid ""
"\n"
"No reldata section! Function descriptor not decoded.\n"
msgstr ""
-#: peigen.c:1150 pepigen.c:1150
+#: peigen.c:1145 pepigen.c:1145
#, c-format
msgid ""
"\n"
"The Import Tables (interpreted %s section contents)\n"
msgstr ""
-#: peigen.c:1153 pepigen.c:1153
+#: peigen.c:1148 pepigen.c:1148
+#, c-format
msgid ""
" vma: Hint Time Forward DLL First\n"
" Table Stamp Chain Name Thunk\n"
msgstr ""
-#: peigen.c:1204 pepigen.c:1204
+#: peigen.c:1196 pepigen.c:1196
#, c-format
msgid ""
"\n"
"\tDLL Name: %s\n"
msgstr ""
-#: peigen.c:1215 pepigen.c:1215
+#: peigen.c:1207 pepigen.c:1207
+#, c-format
msgid "\tvma: Hint/Ord Member-Name Bound-To\n"
msgstr ""
-#: peigen.c:1240 pepigen.c:1240
+#: peigen.c:1232 pepigen.c:1232
+#, c-format
msgid ""
"\n"
"There is a first thunk, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1380 pepigen.c:1380
+#: peigen.c:1365 pepigen.c:1365
+#, c-format
msgid ""
"\n"
"There is an export table, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1385 pepigen.c:1385
+#: peigen.c:1374 pepigen.c:1374
+#, 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
#, c-format
msgid ""
"\n"
"There is an export table in %s at 0x%lx\n"
msgstr ""
-#: peigen.c:1416 pepigen.c:1416
+#: peigen.c:1408 pepigen.c:1408
#, c-format
msgid ""
"\n"
@@ -2867,129 +3295,143 @@ msgid ""
"\n"
msgstr ""
-#: peigen.c:1420 pepigen.c:1420
+#: peigen.c:1412 pepigen.c:1412
#, c-format
msgid "Export Flags \t\t\t%lx\n"
msgstr ""
-#: peigen.c:1423 pepigen.c:1423
+#: peigen.c:1415 pepigen.c:1415
#, c-format
msgid "Time/Date stamp \t\t%lx\n"
msgstr ""
-#: peigen.c:1426 pepigen.c:1426
+#: peigen.c:1418 pepigen.c:1418
#, c-format
msgid "Major/Minor \t\t\t%d/%d\n"
msgstr ""
-#: peigen.c:1429 pepigen.c:1429
+#: peigen.c:1421 pepigen.c:1421
+#, c-format
msgid "Name \t\t\t\t"
msgstr ""
-#: peigen.c:1435 pepigen.c:1435
+#: peigen.c:1427 pepigen.c:1427
#, c-format
msgid "Ordinal Base \t\t\t%ld\n"
msgstr ""
-#: peigen.c:1438 pepigen.c:1438
+#: peigen.c:1430 pepigen.c:1430
+#, c-format
msgid "Number in:\n"
msgstr ""
-#: peigen.c:1441 pepigen.c:1441
+#: peigen.c:1433 pepigen.c:1433
#, c-format
msgid "\tExport Address Table \t\t%08lx\n"
msgstr ""
-#: peigen.c:1445 pepigen.c:1445
+#: peigen.c:1437 pepigen.c:1437
#, c-format
msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
msgstr ""
-#: peigen.c:1448 pepigen.c:1448
+#: peigen.c:1440 pepigen.c:1440
+#, c-format
msgid "Table Addresses\n"
msgstr ""
-#: peigen.c:1451 pepigen.c:1451
+#: peigen.c:1443 pepigen.c:1443
+#, c-format
msgid "\tExport Address Table \t\t"
msgstr ""
-#: peigen.c:1456 pepigen.c:1456
+#: peigen.c:1448 pepigen.c:1448
+#, c-format
msgid "\tName Pointer Table \t\t"
msgstr ""
-#: peigen.c:1461 pepigen.c:1461
+#: peigen.c:1453 pepigen.c:1453
+#, c-format
msgid "\tOrdinal Table \t\t\t"
msgstr ""
-#: peigen.c:1476 pepigen.c:1476
+#: peigen.c:1467 pepigen.c:1467
#, c-format
msgid ""
"\n"
"Export Address Table -- Ordinal Base %ld\n"
msgstr ""
-#: peigen.c:1495 pepigen.c:1495
+#: peigen.c:1486 pepigen.c:1486
msgid "Forwarder RVA"
msgstr ""
-#: peigen.c:1506 pepigen.c:1506
+#: peigen.c:1497 pepigen.c:1497
msgid "Export RVA"
msgstr ""
-#: peigen.c:1513 pepigen.c:1513
+#: peigen.c:1504 pepigen.c:1504
+#, c-format
msgid ""
"\n"
"[Ordinal/Name Pointer] Table\n"
msgstr ""
-#: peigen.c:1568 pepigen.c:1568
+#: peigen.c:1557 pepigen.c:1557
#, c-format
msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
msgstr ""
-#: peigen.c:1572 pepigen.c:1572
+#: peigen.c:1561 pepigen.c:1561
+#, c-format
msgid ""
"\n"
"The Function Table (interpreted .pdata section contents)\n"
msgstr ""
-#: peigen.c:1575 pepigen.c:1575
+#: peigen.c:1564 pepigen.c:1564
+#, c-format
msgid " vma:\t\t\tBegin Address End Address Unwind Info\n"
msgstr ""
-#: peigen.c:1577 pepigen.c:1577
+#: peigen.c:1566 pepigen.c:1566
+#, c-format
msgid ""
" vma:\t\tBegin End EH EH PrologEnd Exception\n"
" \t\tAddress Address Handler Data Address Mask\n"
msgstr ""
-#: peigen.c:1647 pepigen.c:1647
+#: peigen.c:1636 pepigen.c:1636
+#, c-format
msgid " Register save millicode"
msgstr ""
-#: peigen.c:1650 pepigen.c:1650
+#: peigen.c:1639 pepigen.c:1639
+#, c-format
msgid " Register restore millicode"
msgstr ""
-#: peigen.c:1653 pepigen.c:1653
+#: peigen.c:1642 pepigen.c:1642
+#, c-format
msgid " Glue code sequence"
msgstr ""
-#: peigen.c:1705 pepigen.c:1705
+#: peigen.c:1692 pepigen.c:1692
+#, c-format
msgid ""
"\n"
"\n"
"PE File Base Relocations (interpreted .reloc section contents)\n"
msgstr ""
-#: peigen.c:1735 pepigen.c:1735
+#: peigen.c:1722 pepigen.c:1722
#, c-format
msgid ""
"\n"
"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
msgstr ""
-#: peigen.c:1748 pepigen.c:1748
+#: peigen.c:1735 pepigen.c:1735
#, c-format
msgid "\treloc %4d offset %4x [%4lx] %s"
msgstr ""
@@ -2997,7 +3439,7 @@ 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:1788 pepigen.c:1788
+#: peigen.c:1773 pepigen.c:1773
#, c-format
msgid ""
"\n"
diff --git a/contrib/binutils/bfd/ppcboot.c b/contrib/binutils/bfd/ppcboot.c
index 05fb7de74295..7c8a4190bac2 100644
--- a/contrib/binutils/bfd/ppcboot.c
+++ b/contrib/binutils/bfd/ppcboot.c
@@ -1,5 +1,5 @@
/* BFD back-end for PPCbug boot records.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This is a BFD backend which may be used to write PowerPCBug boot objects.
It may only be used for output, not input. The intention is that this may
@@ -210,7 +210,7 @@ ppcboot_object_p (abfd)
return NULL;
sec->flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_CODE | SEC_HAS_CONTENTS;
sec->vma = 0;
- sec->_raw_size = statbuf.st_size - sizeof (ppcboot_hdr_t);
+ sec->size = statbuf.st_size - sizeof (ppcboot_hdr_t);
sec->filepos = sizeof (ppcboot_hdr_t);
ppcboot_mkobject (abfd);
@@ -311,7 +311,7 @@ ppcboot_canonicalize_symtab (abfd, alocation)
/* End symbol. */
syms[1].the_bfd = abfd;
syms[1].name = mangle_name (abfd, "end");
- syms[1].value = sec->_raw_size;
+ syms[1].value = sec->size;
syms[1].flags = BSF_GLOBAL;
syms[1].section = sec;
syms[1].udata.p = NULL;
@@ -319,7 +319,7 @@ ppcboot_canonicalize_symtab (abfd, alocation)
/* Size symbol. */
syms[2].the_bfd = abfd;
syms[2].name = mangle_name (abfd, "size");
- syms[2].value = sec->_raw_size;
+ syms[2].value = sec->size;
syms[2].flags = BSF_GLOBAL;
syms[2].section = bfd_abs_section_ptr;
syms[2].udata.p = NULL;
@@ -345,9 +345,12 @@ ppcboot_get_symbol_info (ignore_abfd, symbol, ret)
bfd_symbol_info (symbol, ret);
}
+#define ppcboot_bfd_is_target_special_symbol \
+ ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define ppcboot_bfd_is_local_label_name bfd_generic_is_local_label_name
#define ppcboot_get_lineno _bfd_nosymbols_get_lineno
#define ppcboot_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define ppcboot_find_inliner_info _bfd_nosymbols_find_inliner_info
#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
@@ -469,7 +472,10 @@ ppcboot_bfd_print_private_bfd_data (abfd, farg)
#define ppcboot_bfd_relax_section bfd_generic_relax_section
#define ppcboot_bfd_gc_sections bfd_generic_gc_sections
#define ppcboot_bfd_merge_sections bfd_generic_merge_sections
+#define ppcboot_bfd_is_group_section bfd_generic_is_group_section
#define ppcboot_bfd_discard_group bfd_generic_discard_group
+#define ppcboot_section_already_linked \
+ _bfd_generic_section_already_linked
#define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols
@@ -483,6 +489,7 @@ ppcboot_bfd_print_private_bfd_data (abfd, farg)
#define ppcboot_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
#define ppcboot_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
#define ppcboot_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
+#define ppcboot_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
#define ppcboot_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#define ppcboot_bfd_print_private_bfd_dat ppcboot_bfd_print_private_bfd_data
diff --git a/contrib/binutils/bfd/ptrace-core.c b/contrib/binutils/bfd/ptrace-core.c
index 15b6777e121f..4ac28aa1dece 100644
--- a/contrib/binutils/bfd/ptrace-core.c
+++ b/contrib/binutils/bfd/ptrace-core.c
@@ -20,7 +20,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef PTRACE_CORE
@@ -51,8 +51,7 @@ struct trad_core_struct
const bfd_target *ptrace_unix_core_file_p PARAMS ((bfd *abfd));
char * ptrace_unix_core_file_failing_command PARAMS ((bfd *abfd));
int ptrace_unix_core_file_failing_signal PARAMS ((bfd *abfd));
-bfd_boolean ptrace_unix_core_file_matches_executable_p
- PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+#define ptrace_unix_core_file_matches_executable_p generic_core_file_matches_executable_p
static void swap_abort PARAMS ((void));
const bfd_target *
@@ -108,9 +107,9 @@ ptrace_unix_core_file_p (abfd)
core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
- core_datasec (abfd)->_raw_size = u.pt_dsize;
- core_stacksec (abfd)->_raw_size = u.pt_ssize;
- core_regsec (abfd)->_raw_size = sizeof (u);
+ core_datasec (abfd)->size = u.pt_dsize;
+ core_stacksec (abfd)->size = u.pt_ssize;
+ core_regsec (abfd)->size = sizeof (u);
core_datasec (abfd)->vma = u.pt_o_data_start;
core_stacksec (abfd)->vma = USRSTACK - u.pt_ssize;
@@ -151,15 +150,6 @@ ptrace_unix_core_file_failing_signal (abfd)
{
return abfd->tdata.trad_core_data->u.pt_sigframe.sig_num;
}
-
-bfd_boolean
-ptrace_unix_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd, *exec_bfd;
-{
- /* FIXME: Use pt_timdat field of the ptrace_user structure to match
- the date of the executable */
- return TRUE;
-}
/* If somebody calls any byte-swapping routines, shoot them. */
static void
diff --git a/contrib/binutils/bfd/reloc.c b/contrib/binutils/bfd/reloc.c
index 9bffaa365885..f1d09a5ab073 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
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
SECTION
@@ -255,11 +255,12 @@ CODE_FRAGMENT
. {* Do not complain on overflow. *}
. complain_overflow_dont,
.
-. {* Complain if the bitfield overflows, whether it is considered
-. as signed or unsigned. *}
+. {* 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 signed
+. {* Complain if the value overflows when considered as a signed
. number. *}
. complain_overflow_signed,
.
@@ -496,14 +497,14 @@ bfd_check_overflow (enum complain_overflow how,
bfd_vma fieldmask, addrmask, signmask, ss, a;
bfd_reloc_status_type flag = bfd_reloc_ok;
- a = relocation;
-
/* Note: BITSIZE should always be <= ADDRSIZE, but in case it's not,
we'll be permissive: extra bits in the field mask will
automatically extend the address mask for purposes of the
overflow check. */
fieldmask = N_ONES (bitsize);
+ signmask = ~fieldmask;
addrmask = N_ONES (addrsize) | fieldmask;
+ a = (relocation & addrmask) >> rightshift;;
switch (how)
{
@@ -513,19 +514,8 @@ bfd_check_overflow (enum complain_overflow how,
case complain_overflow_signed:
/* If any sign bits are set, all sign bits must be set. That
is, A must be a valid negative address after shifting. */
- a = (a & addrmask) >> rightshift;
signmask = ~ (fieldmask >> 1);
- ss = a & signmask;
- if (ss != 0 && ss != ((addrmask >> rightshift) & signmask))
- flag = bfd_reloc_overflow;
- break;
-
- case complain_overflow_unsigned:
- /* We have an overflow if the address does not fit in the field. */
- a = (a & addrmask) >> rightshift;
- if ((a & ~ fieldmask) != 0)
- flag = bfd_reloc_overflow;
- break;
+ /* Fall thru */
case complain_overflow_bitfield:
/* Bitfields are sometimes signed, sometimes unsigned. We
@@ -533,9 +523,14 @@ bfd_check_overflow (enum complain_overflow how,
of n bits is allowed to store -2**n to 2**n-1. Thus overflow
if the value has some, but not all, bits set outside the
field. */
- a >>= rightshift;
- ss = a & ~ fieldmask;
- if (ss != 0 && ss != (((bfd_vma) -1 >> rightshift) & ~ fieldmask))
+ ss = a & signmask;
+ if (ss != 0 && ss != ((addrmask >> rightshift) & signmask))
+ flag = bfd_reloc_overflow;
+ break;
+
+ case complain_overflow_unsigned:
+ /* We have an overflow if the address does not fit in the field. */
+ if ((a & signmask) != 0)
flag = bfd_reloc_overflow;
break;
@@ -623,8 +618,7 @@ bfd_perform_relocation (bfd *abfd,
}
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > (input_section->_cooked_size
- / bfd_octets_per_byte (abfd)))
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@@ -716,7 +710,6 @@ bfd_perform_relocation (bfd *abfd,
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
{
-#if 1
/* For m68k-coff, the addend was being subtracted twice during
relocation with -r. Removing the line below this comment
fixes that problem; see PR 2953.
@@ -787,7 +780,6 @@ space consuming. For each target:
right
*/
relocation -= reloc_entry->addend;
-#endif
reloc_entry->addend = 0;
}
else
@@ -1013,8 +1005,7 @@ bfd_install_relocation (bfd *abfd,
}
/* Is the address of the relocation really within the section? */
- if (reloc_entry->address > (input_section->_cooked_size
- / bfd_octets_per_byte (abfd)))
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@@ -1102,10 +1093,10 @@ bfd_install_relocation (bfd *abfd,
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
{
-#if 1
-/* For m68k-coff, the addend was being subtracted twice during
- relocation with -r. Removing the line below this comment
- fixes that problem; see PR 2953.
+
+ /* For m68k-coff, the addend was being subtracted twice during
+ relocation with -r. Removing the line below this comment
+ fixes that problem; see PR 2953.
However, Ian wrote the following, regarding removing the line below,
which explains why it is still enabled: --djm
@@ -1172,8 +1163,9 @@ space consuming. For each target:
7) if they are different you have to figure out which version is
right. */
relocation -= reloc_entry->addend;
-#endif
- reloc_entry->addend = 0;
+ /* FIXME: There should be no target specific code here... */
+ if (strcmp (abfd->xvec->name, "coff-z8k") != 0)
+ reloc_entry->addend = 0;
}
else
{
@@ -1350,7 +1342,7 @@ _bfd_final_link_relocate (reloc_howto_type *howto,
bfd_vma relocation;
/* Sanity check the address. */
- if (address > input_section->_raw_size)
+ if (address > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
/* This function assumes that we are dealing with a basic relocation
@@ -1440,19 +1432,26 @@ _bfd_relocate_contents (reloc_howto_type *howto,
the size of an address. For bitfields, all the bits matter.
See also bfd_check_overflow. */
fieldmask = N_ONES (howto->bitsize);
+ signmask = ~fieldmask;
addrmask = N_ONES (bfd_arch_bits_per_address (input_bfd)) | fieldmask;
- a = relocation;
- b = x & howto->src_mask;
+ a = (relocation & addrmask) >> rightshift;
+ b = (x & howto->src_mask & addrmask) >> bitpos;
switch (howto->complain_on_overflow)
{
case complain_overflow_signed:
- a = (a & addrmask) >> rightshift;
-
/* If any sign bits are set, all sign bits must be set.
That is, A must be a valid negative address after
shifting. */
- signmask = ~ (fieldmask >> 1);
+ signmask = ~(fieldmask >> 1);
+ /* Fall thru */
+
+ case complain_overflow_bitfield:
+ /* Much like the signed check, but for a field one bit
+ wider. We allow a bitfield to represent numbers in the
+ range -2**n to 2**n-1, where n is the number of bits in the
+ field. Note that when bfd_vma is 32 bits, a 32-bit reloc
+ can't overflow, which is exactly what we want. */
ss = a & signmask;
if (ss != 0 && ss != ((addrmask >> rightshift) & signmask))
flag = bfd_reloc_overflow;
@@ -1463,12 +1462,11 @@ _bfd_relocate_contents (reloc_howto_type *howto,
SRC_MASK has more bits than BITSIZE, we can get into
trouble; we would need to verify that B is in range, as
we do for A above. */
- signmask = ((~ howto->src_mask) >> 1) & howto->src_mask;
+ ss = ((~howto->src_mask) >> 1) & howto->src_mask;
+ ss >>= bitpos;
/* Set all the bits above the sign bit. */
- b = (b ^ signmask) - signmask;
-
- b = (b & addrmask) >> bitpos;
+ b = (b ^ ss) - ss;
/* Now we can do the addition. */
sum = a + b;
@@ -1480,11 +1478,14 @@ _bfd_relocate_contents (reloc_howto_type *howto,
positive inputs. The test below looks only at the sign
bits, and it really just
SIGN (A) == SIGN (B) && SIGN (A) != SIGN (SUM)
- */
- signmask = (fieldmask >> 1) + 1;
- if (((~ (a ^ b)) & (a ^ sum)) & signmask)
- flag = bfd_reloc_overflow;
+ We mask with addrmask here to explicitly allow an address
+ wrap-around. The Linux kernel relies on it, and it is
+ the only way to write assembler code which can run when
+ loaded at a location 0x80000000 away from the location at
+ which it is linked. */
+ if (((~(a ^ b)) & (a ^ sum)) & signmask & addrmask)
+ flag = bfd_reloc_overflow;
break;
case complain_overflow_unsigned:
@@ -1499,44 +1500,9 @@ _bfd_relocate_contents (reloc_howto_type *howto,
separate test, we can check for this by or-ing in the
operands when testing for the sum overflowing its final
field. */
- a = (a & addrmask) >> rightshift;
- b = (b & addrmask) >> bitpos;
sum = (a + b) & addrmask;
- if ((a | b | sum) & ~ fieldmask)
+ if ((a | b | sum) & signmask)
flag = bfd_reloc_overflow;
-
- break;
-
- case complain_overflow_bitfield:
- /* Much like the signed check, but for a field one bit
- wider, and no trimming inputs with addrmask. We allow a
- bitfield to represent numbers in the range -2**n to
- 2**n-1, where n is the number of bits in the field.
- Note that when bfd_vma is 32 bits, a 32-bit reloc can't
- overflow, which is exactly what we want. */
- a >>= rightshift;
-
- signmask = ~ fieldmask;
- ss = a & signmask;
- if (ss != 0 && ss != (((bfd_vma) -1 >> rightshift) & signmask))
- flag = bfd_reloc_overflow;
-
- signmask = ((~ howto->src_mask) >> 1) & howto->src_mask;
- b = (b ^ signmask) - signmask;
-
- b >>= bitpos;
-
- sum = a + b;
-
- /* We mask with addrmask here to explicitly allow an address
- wrap-around. The Linux kernel relies on it, and it is
- the only way to write assembler code which can run when
- loaded at a location 0x80000000 away from the location at
- which it is linked. */
- signmask = fieldmask + 1;
- if (((~ (a ^ b)) & (a ^ sum)) & signmask & addrmask)
- flag = bfd_reloc_overflow;
-
break;
default:
@@ -1584,7 +1550,7 @@ DOCDD
INODE
howto manager, , typedef arelent, Relocations
-SECTION
+SUBSECTION
The howto manager
When an application wants to create a relocation, but doesn't
@@ -1647,6 +1613,11 @@ the section containing the relocation. It depends on the specific target.
The 24-bit relocation is used in some Intel 960 configurations.
ENUM
+ BFD_RELOC_32_SECREL
+ENUMDOC
+ Section relative relocations. Some targets need this for DWARF2.
+
+ENUM
BFD_RELOC_32_GOT_PCREL
ENUMX
BFD_RELOC_16_GOT_PCREL
@@ -2061,14 +2032,35 @@ ENUM
BFD_RELOC_LO16
ENUMDOC
Low 16 bits.
+
ENUM
- BFD_RELOC_PCREL_HI16_S
+ BFD_RELOC_HI16_PCREL
ENUMDOC
- Like BFD_RELOC_HI16_S, but PC relative.
+ High 16 bits of 32-bit pc-relative value
ENUM
- BFD_RELOC_PCREL_LO16
+ BFD_RELOC_HI16_S_PCREL
ENUMDOC
- Like BFD_RELOC_LO16, but PC relative.
+ High 16 bits of 32-bit pc-relative value, adjusted
+ENUM
+ BFD_RELOC_LO16_PCREL
+ENUMDOC
+ Low 16 bits of pc-relative value
+
+ENUM
+ BFD_RELOC_MIPS16_HI16
+ENUMDOC
+ MIPS16 high 16 bits of 32-bit value.
+ENUM
+ BFD_RELOC_MIPS16_HI16_S
+ENUMDOC
+ 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.
+ENUM
+ BFD_RELOC_MIPS16_LO16
+ENUMDOC
+ MIPS16 low 16 bits.
ENUM
BFD_RELOC_MIPS_LITERAL
@@ -2117,11 +2109,45 @@ ENUMX
BFD_RELOC_MIPS_RELGOT
ENUMX
BFD_RELOC_MIPS_JALR
+ENUMX
+ BFD_RELOC_MIPS_TLS_DTPMOD32
+ENUMX
+ BFD_RELOC_MIPS_TLS_DTPREL32
+ENUMX
+ BFD_RELOC_MIPS_TLS_DTPMOD64
+ENUMX
+ BFD_RELOC_MIPS_TLS_DTPREL64
+ENUMX
+ BFD_RELOC_MIPS_TLS_GD
+ENUMX
+ BFD_RELOC_MIPS_TLS_LDM
+ENUMX
+ BFD_RELOC_MIPS_TLS_DTPREL_HI16
+ENUMX
+ BFD_RELOC_MIPS_TLS_DTPREL_LO16
+ENUMX
+ BFD_RELOC_MIPS_TLS_GOTTPREL
+ENUMX
+ BFD_RELOC_MIPS_TLS_TPREL32
+ENUMX
+ BFD_RELOC_MIPS_TLS_TPREL64
+ENUMX
+ BFD_RELOC_MIPS_TLS_TPREL_HI16
+ENUMX
+ BFD_RELOC_MIPS_TLS_TPREL_LO16
ENUMDOC
MIPS ELF relocations.
COMMENT
ENUM
+ BFD_RELOC_MIPS_COPY
+ENUMX
+ BFD_RELOC_MIPS_JUMP_SLOT
+ENUMDOC
+ MIPS ELF relocations (VxWorks extensions).
+COMMENT
+
+ENUM
BFD_RELOC_FRV_LABEL16
ENUMX
BFD_RELOC_FRV_LABEL24
@@ -2167,6 +2193,38 @@ ENUMX
BFD_RELOC_FRV_GOTOFFHI
ENUMX
BFD_RELOC_FRV_GOTOFFLO
+ENUMX
+ BFD_RELOC_FRV_GETTLSOFF
+ENUMX
+ BFD_RELOC_FRV_TLSDESC_VALUE
+ENUMX
+ BFD_RELOC_FRV_GOTTLSDESC12
+ENUMX
+ BFD_RELOC_FRV_GOTTLSDESCHI
+ENUMX
+ BFD_RELOC_FRV_GOTTLSDESCLO
+ENUMX
+ BFD_RELOC_FRV_TLSMOFF12
+ENUMX
+ BFD_RELOC_FRV_TLSMOFFHI
+ENUMX
+ BFD_RELOC_FRV_TLSMOFFLO
+ENUMX
+ BFD_RELOC_FRV_GOTTLSOFF12
+ENUMX
+ BFD_RELOC_FRV_GOTTLSOFFHI
+ENUMX
+ BFD_RELOC_FRV_GOTTLSOFFLO
+ENUMX
+ BFD_RELOC_FRV_TLSOFF
+ENUMX
+ BFD_RELOC_FRV_TLSDESC_RELAX
+ENUMX
+ BFD_RELOC_FRV_GETTLSOFF_RELAX
+ENUMX
+ BFD_RELOC_FRV_TLSOFF_RELAX
+ENUMX
+ BFD_RELOC_FRV_TLSMOFF
ENUMDOC
Fujitsu Frv Relocations.
COMMENT
@@ -2248,6 +2306,12 @@ ENUMX
BFD_RELOC_386_TLS_DTPOFF32
ENUMX
BFD_RELOC_386_TLS_TPOFF32
+ENUMX
+ BFD_RELOC_386_TLS_GOTDESC
+ENUMX
+ BFD_RELOC_386_TLS_DESC_CALL
+ENUMX
+ BFD_RELOC_386_TLS_DESC
ENUMDOC
i386/elf relocations
@@ -2283,6 +2347,26 @@ ENUMX
BFD_RELOC_X86_64_GOTTPOFF
ENUMX
BFD_RELOC_X86_64_TPOFF32
+ENUMX
+ BFD_RELOC_X86_64_GOTOFF64
+ENUMX
+ BFD_RELOC_X86_64_GOTPC32
+ENUMX
+ BFD_RELOC_X86_64_GOT64
+ENUMX
+ BFD_RELOC_X86_64_GOTPCREL64
+ENUMX
+ BFD_RELOC_X86_64_GOTPC64
+ENUMX
+ BFD_RELOC_X86_64_GOTPLT64
+ENUMX
+ BFD_RELOC_X86_64_PLTOFF64
+ENUMX
+ BFD_RELOC_X86_64_GOTPC32_TLSDESC
+ENUMX
+ BFD_RELOC_X86_64_TLSDESC_CALL
+ENUMX
+ BFD_RELOC_X86_64_TLSDESC
ENUMDOC
x86-64/elf relocations
@@ -2557,14 +2641,118 @@ ENUMDOC
not stored in the instruction. The 2nd lowest bit comes from a 1 bit
field in the instruction.
ENUM
+ BFD_RELOC_ARM_PCREL_CALL
+ENUMDOC
+ ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction.
+ENUM
+ BFD_RELOC_ARM_PCREL_JUMP
+ENUMDOC
+ ARM 26-bit pc-relative branch for B or conditional BL instruction.
+
+ENUM
+ BFD_RELOC_THUMB_PCREL_BRANCH7
+ENUMX
+ BFD_RELOC_THUMB_PCREL_BRANCH9
+ENUMX
+ BFD_RELOC_THUMB_PCREL_BRANCH12
+ENUMX
+ BFD_RELOC_THUMB_PCREL_BRANCH20
+ENUMX
+ BFD_RELOC_THUMB_PCREL_BRANCH23
+ENUMX
+ BFD_RELOC_THUMB_PCREL_BRANCH25
+ENUMDOC
+ 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.
+
+ENUM
+ BFD_RELOC_ARM_OFFSET_IMM
+ENUMDOC
+ 12-bit immediate offset, used in ARM-format ldr and str instructions.
+
+ENUM
+ BFD_RELOC_ARM_THUMB_OFFSET
+ENUMDOC
+ 5-bit immediate offset, used in Thumb-format ldr and str instructions.
+
+ENUM
+ BFD_RELOC_ARM_TARGET1
+ENUMDOC
+ Pc-relative or absolute relocation depending on target. Used for
+ entries in .init_array sections.
+ENUM
+ BFD_RELOC_ARM_ROSEGREL32
+ENUMDOC
+ Read-only segment base relative address.
+ENUM
+ BFD_RELOC_ARM_SBREL32
+ENUMDOC
+ Data segment base relative address.
+ENUM
+ BFD_RELOC_ARM_TARGET2
+ENUMDOC
+ 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.
+ENUM
+ BFD_RELOC_ARM_PREL31
+ENUMDOC
+ 31-bit PC relative address.
+
+ENUM
+ BFD_RELOC_ARM_JUMP_SLOT
+ENUMX
+ BFD_RELOC_ARM_GLOB_DAT
+ENUMX
+ BFD_RELOC_ARM_GOT32
+ENUMX
+ BFD_RELOC_ARM_PLT32
+ENUMX
+ BFD_RELOC_ARM_RELATIVE
+ENUMX
+ BFD_RELOC_ARM_GOTOFF
+ENUMX
+ BFD_RELOC_ARM_GOTPC
+ENUMDOC
+ Relocations for setting up GOTs and PLTs for shared libraries.
+
+ENUM
+ BFD_RELOC_ARM_TLS_GD32
+ENUMX
+ BFD_RELOC_ARM_TLS_LDO32
+ENUMX
+ BFD_RELOC_ARM_TLS_LDM32
+ENUMX
+ BFD_RELOC_ARM_TLS_DTPOFF32
+ENUMX
+ BFD_RELOC_ARM_TLS_DTPMOD32
+ENUMX
+ BFD_RELOC_ARM_TLS_TPOFF32
+ENUMX
+ BFD_RELOC_ARM_TLS_IE32
+ENUMX
+ BFD_RELOC_ARM_TLS_LE32
+ENUMDOC
+ ARM thread-local storage relocations.
+
+ENUM
BFD_RELOC_ARM_IMMEDIATE
ENUMX
BFD_RELOC_ARM_ADRL_IMMEDIATE
ENUMX
- BFD_RELOC_ARM_OFFSET_IMM
+ BFD_RELOC_ARM_T32_IMMEDIATE
+ENUMX
+ BFD_RELOC_ARM_T32_IMM12
+ENUMX
+ BFD_RELOC_ARM_T32_ADD_PC12
ENUMX
BFD_RELOC_ARM_SHIFT_IMM
ENUMX
+ BFD_RELOC_ARM_SMC
+ENUMX
BFD_RELOC_ARM_SWI
ENUMX
BFD_RELOC_ARM_MULTI
@@ -2573,6 +2761,10 @@ ENUMX
ENUMX
BFD_RELOC_ARM_CP_OFF_IMM_S2
ENUMX
+ BFD_RELOC_ARM_T32_CP_OFF_IMM
+ENUMX
+ BFD_RELOC_ARM_T32_CP_OFF_IMM_S2
+ENUMX
BFD_RELOC_ARM_ADR_IMM
ENUMX
BFD_RELOC_ARM_LDR_IMM
@@ -2583,6 +2775,10 @@ ENUMX
ENUMX
BFD_RELOC_ARM_OFFSET_IMM8
ENUMX
+ BFD_RELOC_ARM_T32_OFFSET_U8
+ENUMX
+ BFD_RELOC_ARM_T32_OFFSET_IMM
+ENUMX
BFD_RELOC_ARM_HWLITERAL
ENUMX
BFD_RELOC_ARM_THUMB_ADD
@@ -2590,34 +2786,30 @@ ENUMX
BFD_RELOC_ARM_THUMB_IMM
ENUMX
BFD_RELOC_ARM_THUMB_SHIFT
+ENUMDOC
+ These relocs are only used within the ARM assembler. They are not
+ (at present) written to any object files.
+
+ENUM
+ BFD_RELOC_SH_PCDISP8BY2
ENUMX
- BFD_RELOC_ARM_THUMB_OFFSET
+ BFD_RELOC_SH_PCDISP12BY2
ENUMX
- BFD_RELOC_ARM_GOT12
+ BFD_RELOC_SH_IMM3
ENUMX
- BFD_RELOC_ARM_GOT32
+ BFD_RELOC_SH_IMM3U
ENUMX
- BFD_RELOC_ARM_JUMP_SLOT
+ BFD_RELOC_SH_DISP12
ENUMX
- BFD_RELOC_ARM_COPY
+ BFD_RELOC_SH_DISP12BY2
ENUMX
- BFD_RELOC_ARM_GLOB_DAT
+ BFD_RELOC_SH_DISP12BY4
ENUMX
- BFD_RELOC_ARM_PLT32
+ BFD_RELOC_SH_DISP12BY8
ENUMX
- BFD_RELOC_ARM_RELATIVE
+ BFD_RELOC_SH_DISP20
ENUMX
- BFD_RELOC_ARM_GOTOFF
-ENUMX
- BFD_RELOC_ARM_GOTPC
-ENUMDOC
- These relocs are only used within the ARM assembler. They are not
- (at present) written to any object files.
-
-ENUM
- BFD_RELOC_SH_PCDISP8BY2
-ENUMX
- BFD_RELOC_SH_PCDISP12BY2
+ BFD_RELOC_SH_DISP20BY8
ENUMX
BFD_RELOC_SH_IMM4
ENUMX
@@ -2782,16 +2974,6 @@ ENUMDOC
Renesas / SuperH SH relocs. Not all of these appear in object files.
ENUM
- BFD_RELOC_THUMB_PCREL_BRANCH9
-ENUMX
- BFD_RELOC_THUMB_PCREL_BRANCH12
-ENUMX
- BFD_RELOC_THUMB_PCREL_BRANCH23
-ENUMDOC
- Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
- be zero and is not stored in the instruction.
-
-ENUM
BFD_RELOC_ARC_B22_PCREL
ENUMDOC
ARC Cores relocs.
@@ -2806,6 +2988,169 @@ ENUMDOC
through 0.
ENUM
+ BFD_RELOC_BFIN_16_IMM
+ENUMDOC
+ ADI Blackfin 16 bit immediate absolute reloc.
+ENUM
+ BFD_RELOC_BFIN_16_HIGH
+ENUMDOC
+ ADI Blackfin 16 bit immediate absolute reloc higher 16 bits.
+ENUM
+ BFD_RELOC_BFIN_4_PCREL
+ENUMDOC
+ ADI Blackfin 'a' part of LSETUP.
+ENUM
+ BFD_RELOC_BFIN_5_PCREL
+ENUMDOC
+ ADI Blackfin.
+ENUM
+ BFD_RELOC_BFIN_16_LOW
+ENUMDOC
+ ADI Blackfin 16 bit immediate absolute reloc lower 16 bits.
+ENUM
+ BFD_RELOC_BFIN_10_PCREL
+ENUMDOC
+ ADI Blackfin.
+ENUM
+ BFD_RELOC_BFIN_11_PCREL
+ENUMDOC
+ ADI Blackfin 'b' part of LSETUP.
+ENUM
+ BFD_RELOC_BFIN_12_PCREL_JUMP
+ENUMDOC
+ ADI Blackfin.
+ENUM
+ BFD_RELOC_BFIN_12_PCREL_JUMP_S
+ENUMDOC
+ ADI Blackfin Short jump, pcrel.
+ENUM
+ BFD_RELOC_BFIN_24_PCREL_CALL_X
+ENUMDOC
+ ADI Blackfin Call.x not implemented.
+ENUM
+ BFD_RELOC_BFIN_24_PCREL_JUMP_L
+ENUMDOC
+ ADI Blackfin Long Jump pcrel.
+ENUM
+ BFD_RELOC_BFIN_GOT17M4
+ENUMX
+ BFD_RELOC_BFIN_GOTHI
+ENUMX
+ BFD_RELOC_BFIN_GOTLO
+ENUMX
+ BFD_RELOC_BFIN_FUNCDESC
+ENUMX
+ BFD_RELOC_BFIN_FUNCDESC_GOT17M4
+ENUMX
+ BFD_RELOC_BFIN_FUNCDESC_GOTHI
+ENUMX
+ BFD_RELOC_BFIN_FUNCDESC_GOTLO
+ENUMX
+ BFD_RELOC_BFIN_FUNCDESC_VALUE
+ENUMX
+ BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4
+ENUMX
+ BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI
+ENUMX
+ BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO
+ENUMX
+ BFD_RELOC_BFIN_GOTOFF17M4
+ENUMX
+ BFD_RELOC_BFIN_GOTOFFHI
+ENUMX
+ BFD_RELOC_BFIN_GOTOFFLO
+ENUMDOC
+ ADI Blackfin FD-PIC relocations.
+ENUM
+ BFD_RELOC_BFIN_GOT
+ENUMDOC
+ ADI Blackfin GOT relocation.
+ENUM
+ BFD_RELOC_BFIN_PLTPC
+ENUMDOC
+ ADI Blackfin PLTPC relocation.
+ENUM
+ BFD_ARELOC_BFIN_PUSH
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_CONST
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_ADD
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_SUB
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_MULT
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_DIV
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_MOD
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_LSHIFT
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_RSHIFT
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_AND
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_OR
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_XOR
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_LAND
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_LOR
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_LEN
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_NEG
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_COMP
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_PAGE
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_HWPAGE
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+ENUM
+ BFD_ARELOC_BFIN_ADDR
+ENUMDOC
+ ADI Blackfin arithmetic relocation.
+
+ENUM
BFD_RELOC_D10V_10_PCREL_R
ENUMDOC
Mitsubishi D10V relocs.
@@ -2904,6 +3249,17 @@ ENUMDOC
DLX relocs
ENUM
+ BFD_RELOC_M32C_HI8
+ENUMX
+ BFD_RELOC_M32C_RL_JUMP
+ENUMX
+ BFD_RELOC_M32C_RL_1ADDR
+ENUMX
+ BFD_RELOC_M32C_RL_2ADDR
+ENUMDOC
+ Renesas M16C/M32C Relocations.
+
+ENUM
BFD_RELOC_M32R_24
ENUMDOC
Renesas M32R (formerly Mitsubishi M32R) relocs.
@@ -2954,6 +3310,12 @@ ENUMX
ENUMX
BFD_RELOC_M32R_GOTOFF
ENUMX
+ BFD_RELOC_M32R_GOTOFF_HI_ULO
+ENUMX
+ BFD_RELOC_M32R_GOTOFF_HI_SLO
+ENUMX
+ BFD_RELOC_M32R_GOTOFF_LO
+ENUMX
BFD_RELOC_M32R_GOTPC24
ENUMX
BFD_RELOC_M32R_GOT16_HI_ULO
@@ -3057,6 +3419,11 @@ ENUM
ENUMDOC
Used to maintain alignment whilst relaxing.
ENUM
+ BFD_RELOC_V850_LO16_SPLIT_OFFSET
+ENUMDOC
+ This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
+ instructions.
+ENUM
BFD_RELOC_MN10300_32_PCREL
ENUMDOC
This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
@@ -3267,6 +3634,11 @@ ENUMDOC
This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
of program memory address) into 8 bit immediate value of LDI insn.
ENUM
+ BFD_RELOC_AVR_MS8_LDI
+ENUMDOC
+ 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.
+ENUM
BFD_RELOC_AVR_LO8_LDI_NEG
ENUMDOC
This is a 16 bit reloc for the AVR that stores negated 8 bit value
@@ -3284,6 +3656,11 @@ ENUMDOC
(most high 8 bit of program memory address) into 8 bit immediate value
of LDI or SUBI insn.
ENUM
+ BFD_RELOC_AVR_MS8_LDI_NEG
+ENUMDOC
+ 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.
+ENUM
BFD_RELOC_AVR_LO8_LDI_PM
ENUMDOC
This is a 16 bit reloc for the AVR that stores 8 bit value (usually
@@ -3320,6 +3697,21 @@ ENUM
ENUMDOC
This is a 32 bit reloc for the AVR that stores 23 bit value
into 22 bits.
+ENUM
+ BFD_RELOC_AVR_LDI
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores all needed bits
+ for absolute addressing with ldi with overflow check to linktime
+ENUM
+ BFD_RELOC_AVR_6
+ENUMDOC
+ This is a 6 bit reloc for the AVR that stores offset for ldd/std
+ instructions
+ENUM
+ BFD_RELOC_AVR_6_ADIW
+ENUMDOC
+ This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
+ instructions
ENUM
BFD_RELOC_390_12
@@ -3771,6 +4163,132 @@ ENUMDOC
This is the 5 bits of a value.
ENUM
+ BFD_RELOC_16C_NUM08
+ENUMX
+ BFD_RELOC_16C_NUM08_C
+ENUMX
+ BFD_RELOC_16C_NUM16
+ENUMX
+ BFD_RELOC_16C_NUM16_C
+ENUMX
+ BFD_RELOC_16C_NUM32
+ENUMX
+ BFD_RELOC_16C_NUM32_C
+ENUMX
+ BFD_RELOC_16C_DISP04
+ENUMX
+ BFD_RELOC_16C_DISP04_C
+ENUMX
+ BFD_RELOC_16C_DISP08
+ENUMX
+ BFD_RELOC_16C_DISP08_C
+ENUMX
+ BFD_RELOC_16C_DISP16
+ENUMX
+ BFD_RELOC_16C_DISP16_C
+ENUMX
+ BFD_RELOC_16C_DISP24
+ENUMX
+ BFD_RELOC_16C_DISP24_C
+ENUMX
+ BFD_RELOC_16C_DISP24a
+ENUMX
+ BFD_RELOC_16C_DISP24a_C
+ENUMX
+ BFD_RELOC_16C_REG04
+ENUMX
+ BFD_RELOC_16C_REG04_C
+ENUMX
+ BFD_RELOC_16C_REG04a
+ENUMX
+ BFD_RELOC_16C_REG04a_C
+ENUMX
+ BFD_RELOC_16C_REG14
+ENUMX
+ BFD_RELOC_16C_REG14_C
+ENUMX
+ BFD_RELOC_16C_REG16
+ENUMX
+ BFD_RELOC_16C_REG16_C
+ENUMX
+ BFD_RELOC_16C_REG20
+ENUMX
+ BFD_RELOC_16C_REG20_C
+ENUMX
+ BFD_RELOC_16C_ABS20
+ENUMX
+ BFD_RELOC_16C_ABS20_C
+ENUMX
+ BFD_RELOC_16C_ABS24
+ENUMX
+ BFD_RELOC_16C_ABS24_C
+ENUMX
+ BFD_RELOC_16C_IMM04
+ENUMX
+ BFD_RELOC_16C_IMM04_C
+ENUMX
+ BFD_RELOC_16C_IMM16
+ENUMX
+ BFD_RELOC_16C_IMM16_C
+ENUMX
+ BFD_RELOC_16C_IMM20
+ENUMX
+ BFD_RELOC_16C_IMM20_C
+ENUMX
+ BFD_RELOC_16C_IMM24
+ENUMX
+ BFD_RELOC_16C_IMM24_C
+ENUMX
+ BFD_RELOC_16C_IMM32
+ENUMX
+ BFD_RELOC_16C_IMM32_C
+ENUMDOC
+ NS CR16C Relocations.
+
+ENUM
+ BFD_RELOC_CRX_REL4
+ENUMX
+ BFD_RELOC_CRX_REL8
+ENUMX
+ BFD_RELOC_CRX_REL8_CMP
+ENUMX
+ BFD_RELOC_CRX_REL16
+ENUMX
+ BFD_RELOC_CRX_REL24
+ENUMX
+ BFD_RELOC_CRX_REL32
+ENUMX
+ BFD_RELOC_CRX_REGREL12
+ENUMX
+ BFD_RELOC_CRX_REGREL22
+ENUMX
+ BFD_RELOC_CRX_REGREL28
+ENUMX
+ BFD_RELOC_CRX_REGREL32
+ENUMX
+ BFD_RELOC_CRX_ABS16
+ENUMX
+ BFD_RELOC_CRX_ABS32
+ENUMX
+ BFD_RELOC_CRX_NUM8
+ENUMX
+ BFD_RELOC_CRX_NUM16
+ENUMX
+ BFD_RELOC_CRX_NUM32
+ENUMX
+ BFD_RELOC_CRX_IMM16
+ENUMX
+ BFD_RELOC_CRX_IMM32
+ENUMX
+ BFD_RELOC_CRX_SWITCH8
+ENUMX
+ BFD_RELOC_CRX_SWITCH16
+ENUMX
+ BFD_RELOC_CRX_SWITCH32
+ENUMDOC
+ NS CRX Relocations.
+
+ENUM
BFD_RELOC_CRIS_BDISP8
ENUMX
BFD_RELOC_CRIS_UNSIGNED_5
@@ -3779,6 +4297,16 @@ ENUMX
ENUMX
BFD_RELOC_CRIS_UNSIGNED_6
ENUMX
+ BFD_RELOC_CRIS_SIGNED_8
+ENUMX
+ BFD_RELOC_CRIS_UNSIGNED_8
+ENUMX
+ BFD_RELOC_CRIS_SIGNED_16
+ENUMX
+ BFD_RELOC_CRIS_UNSIGNED_16
+ENUMX
+ BFD_RELOC_CRIS_LAPCQ_OFFSET
+ENUMX
BFD_RELOC_CRIS_UNSIGNED_4
ENUMDOC
These relocs are only used within the CRIS assembler. They are not
@@ -3921,6 +4449,17 @@ ENUMDOC
Sony Xstormy16 Relocations.
ENUM
+ BFD_RELOC_XC16X_PAG
+ENUMX
+ BFD_RELOC_XC16X_POF
+ENUMX
+ BFD_RELOC_XC16X_SEG
+ENUMX
+ BFD_RELOC_XC16X_SOF
+ENUMDOC
+ Infineon Relocations.
+
+ENUM
BFD_RELOC_VAX_GLOB_DAT
ENUMX
BFD_RELOC_VAX_JMP_SLOT
@@ -3928,7 +4467,32 @@ ENUMX
BFD_RELOC_VAX_RELATIVE
ENUMDOC
Relocations used by VAX ELF.
-
+
+ENUM
+ BFD_RELOC_MT_PC16
+ENUMDOC
+ Morpho MT - 16 bit immediate relocation.
+ENUM
+ BFD_RELOC_MT_HI16
+ENUMDOC
+ Morpho MT - Hi 16 bits of an address.
+ENUM
+ BFD_RELOC_MT_LO16
+ENUMDOC
+ Morpho MT - Low 16 bits of an address.
+ENUM
+ BFD_RELOC_MT_GNU_VTINHERIT
+ENUMDOC
+ Morpho MT - Used to tell the linker which vtable entries are used.
+ENUM
+ BFD_RELOC_MT_GNU_VTENTRY
+ENUMDOC
+ Morpho MT - Used to tell the linker which vtable entries are used.
+ENUM
+ BFD_RELOC_MT_PCINSN8
+ENUMDOC
+ Morpho MT - 8 bit immediate relocation.
+
ENUM
BFD_RELOC_MSP430_10_PCREL
ENUMX
@@ -3939,6 +4503,10 @@ ENUMX
BFD_RELOC_MSP430_16_PCREL_BYTE
ENUMX
BFD_RELOC_MSP430_16_BYTE
+ENUMX
+ BFD_RELOC_MSP430_2X_PCREL
+ENUMX
+ BFD_RELOC_MSP430_RL_PCREL
ENUMDOC
msp430 specific relocation codes
@@ -3971,29 +4539,127 @@ ENUMDOC
Xtensa relocation used in ELF object files for symbols that may require
PLT entries. Otherwise, this is just a generic 32-bit relocation.
ENUM
+ BFD_RELOC_XTENSA_DIFF8
+ENUMX
+ BFD_RELOC_XTENSA_DIFF16
+ENUMX
+ BFD_RELOC_XTENSA_DIFF32
+ENUMDOC
+ 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.
+ENUM
+ BFD_RELOC_XTENSA_SLOT0_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT1_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT2_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT3_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT4_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT5_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT6_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT7_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT8_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT9_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT10_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT11_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT12_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT13_OP
+ENUMX
+ BFD_RELOC_XTENSA_SLOT14_OP
+ENUMDOC
+ 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.
+ENUM
+ BFD_RELOC_XTENSA_SLOT0_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT1_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT2_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT3_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT4_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT5_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT6_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT7_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT8_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT9_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT10_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT11_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT12_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT13_ALT
+ENUMX
+ BFD_RELOC_XTENSA_SLOT14_ALT
+ENUMDOC
+ Alternate Xtensa relocations. Only the slot is encoded in the
+ relocation. The meaning of these relocations is opcode-specific.
+ENUM
BFD_RELOC_XTENSA_OP0
ENUMX
BFD_RELOC_XTENSA_OP1
ENUMX
BFD_RELOC_XTENSA_OP2
ENUMDOC
- Generic Xtensa relocations. Only the operand number is encoded
- in the relocation. The details are determined by extracting the
- instruction opcode.
+ Xtensa relocations for backward compatibility. These have all been
+ replaced by BFD_RELOC_XTENSA_SLOT0_OP.
ENUM
BFD_RELOC_XTENSA_ASM_EXPAND
ENUMDOC
- Xtensa relocation to mark that the assembler expanded the
+ Xtensa relocation to mark that the assembler expanded the
instructions from an original target. The expansion size is
encoded in the reloc size.
ENUM
BFD_RELOC_XTENSA_ASM_SIMPLIFY
ENUMDOC
- Xtensa relocation to mark that the linker should simplify
- assembler-expanded instructions. This is commonly used
- internally by the linker after analysis of a
+ 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.
+ENUM
+ BFD_RELOC_Z80_DISP8
+ENUMDOC
+ 8 bit signed offset in (ix+d) or (iy+d).
+
+ENUM
+ BFD_RELOC_Z8K_DISP7
+ENUMDOC
+ DJNZ offset.
+ENUM
+ BFD_RELOC_Z8K_CALLR
+ENUMDOC
+ CALR offset.
+ENUM
+ BFD_RELOC_Z8K_IMM4L
+ENUMDOC
+ 4 bit value.
+
ENDSENUM
BFD_RELOC_UNUSED
CODE_FRAGMENT
@@ -4023,7 +4689,7 @@ bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
}
static reloc_howto_type bfd_howto_32 =
-HOWTO (0, 00, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "VRT32", FALSE, 0xffffffff, 0xffffffff, TRUE);
+HOWTO (0, 00, 2, 32, FALSE, 0, complain_overflow_dont, 0, "VRT32", FALSE, 0xffffffff, 0xffffffff, TRUE);
/*
INTERNAL_FUNCTION
@@ -4096,8 +4762,7 @@ SYNOPSIS
DESCRIPTION
Provides default handling for relaxing for back ends which
- don't do relaxing -- i.e., does nothing except make sure that the
- final size of the section is set.
+ don't do relaxing.
*/
bfd_boolean
@@ -4106,11 +4771,6 @@ bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED,
struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
bfd_boolean *again)
{
- /* We're not relaxing the section, so just copy the size info if it's
- zero. Someone else, like bfd_merge_sections, might have set it, so
- don't overwrite a non-zero value. */
- if (section->_cooked_size == 0)
- section->_cooked_size = section->_raw_size;
*again = FALSE;
return TRUE;
}
@@ -4130,7 +4790,7 @@ DESCRIPTION
bfd_boolean
bfd_generic_gc_sections (bfd *abfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -4189,6 +4849,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
long reloc_count;
+ bfd_size_type sz;
if (reloc_size < 0)
goto error_return;
@@ -4198,22 +4859,10 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
goto error_return;
/* Read in the section. */
- if (!bfd_get_section_contents (input_bfd,
- input_section,
- data,
- 0,
- input_section->_raw_size))
+ sz = input_section->rawsize ? input_section->rawsize : input_section->size;
+ if (!bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
goto error_return;
- /* Don't set input_section->_cooked_size here. The caller has set
- _cooked_size or called bfd_relax_section, which sets _cooked_size.
- Despite using this generic relocation function, some targets perform
- target-specific relaxation or string merging, which happens before
- this function is called. We do not want to clobber the _cooked_size
- they computed. */
-
- input_section->reloc_done = TRUE;
-
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
reloc_vector,
@@ -4264,7 +4913,8 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
break;
case bfd_reloc_overflow:
if (!((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
(*parent)->howto->name, (*parent)->addend,
input_bfd, input_section, (*parent)->address)))
goto error_return;
diff --git a/contrib/binutils/bfd/reloc16.c b/contrib/binutils/bfd/reloc16.c
index 720e2d6abc2d..3adbbc75cd1a 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 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Most of this hacked by Steve Chamberlain <sac@cygnus.com>. */
@@ -230,7 +230,8 @@ bfd_coff_reloc16_relax_section (abfd, input_section, link_info, again)
free ((char *) shrinks);
}
- input_section->_cooked_size -= shrink;
+ input_section->rawsize = input_section->size;
+ input_section->size -= shrink;
free ((char *) reloc_vector);
return TRUE;
}
@@ -255,6 +256,7 @@ bfd_coff_reloc16_get_relocated_section_contents (in_abfd,
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector;
long reloc_count;
+ bfd_size_type sz;
if (reloc_size < 0)
return NULL;
@@ -267,11 +269,8 @@ bfd_coff_reloc16_get_relocated_section_contents (in_abfd,
symbols);
/* Read in the section. */
- if (!bfd_get_section_contents (input_bfd,
- input_section,
- data,
- (bfd_vma) 0,
- input_section->_raw_size))
+ sz = input_section->rawsize ? input_section->rawsize : input_section->size;
+ if (!bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
return NULL;
reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
diff --git a/contrib/binutils/bfd/rs6000-core.c b/contrib/binutils/bfd/rs6000-core.c
index 3fa0975dc31b..280a020a754e 100644
--- a/contrib/binutils/bfd/rs6000-core.c
+++ b/contrib/binutils/bfd/rs6000-core.c
@@ -1,6 +1,6 @@
/* IBM RS/6000 "XCOFF" back-end for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002
+ 2001, 2002, 2004
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
@@ -25,7 +25,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This port currently only handles reading object files, except when
compiled on an RS/6000 host. -- no archive support, no core files.
@@ -71,6 +71,9 @@
#include <sys/core.h>
#include <sys/systemcfg.h>
+/* Borrowed from <sys/inttypes.h> on recent AIX versions. */
+typedef unsigned long ptr_to_uint;
+
#define core_hdr(bfd) ((CoreHdr *) bfd->tdata.any)
/* AIX 4.1 changed the names and locations of a few items in the core file.
@@ -250,6 +253,15 @@ typedef union {
#define CORE_COMMONSZ ((int) &((struct core_dump *) 0)->c_entries \
+ sizeof (((struct core_dump *) 0)->c_entries))
+/* Define prototypes for certain functions, to avoid a compiler warning
+ saying that they are missing. */
+
+const bfd_target * rs6000coff_core_p (bfd *abfd);
+bfd_boolean rs6000coff_core_file_matches_executable_p (bfd *core_bfd,
+ bfd *exec_bfd);
+char * rs6000coff_core_file_failing_command (bfd *abfd);
+int rs6000coff_core_file_failing_signal (bfd *abfd);
+
/* Try to read into CORE the header from the core file associated with ABFD.
Return success. */
@@ -277,13 +289,8 @@ read_hdr (bfd *abfd, CoreHdr *core)
}
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
- bfd *abfd;
- const char *name;
- flagword flags;
- bfd_size_type _raw_size;
- bfd_vma vma;
- file_ptr filepos;
+make_bfd_asection (bfd *abfd, const char *name, flagword flags,
+ bfd_size_type size, bfd_vma vma, file_ptr filepos)
{
asection *asect;
@@ -292,7 +299,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
asect->alignment_power = 8;
@@ -304,8 +311,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
magic number or anything like, in rs6000coff. */
const bfd_target *
-rs6000coff_core_p (abfd)
- bfd *abfd;
+rs6000coff_core_p (bfd *abfd)
{
CoreHdr core;
struct stat statbuf;
@@ -341,11 +347,11 @@ rs6000coff_core_p (abfd)
else
{
c_flag = core.old.c_flag;
- c_stack = (file_ptr) core.old.c_stack;
+ c_stack = (file_ptr) (ptr_to_uint) core.old.c_stack;
c_size = core.old.c_size;
c_stackend = COLD_STACKEND;
c_lsize = 0x7ffffff;
- c_loader = (file_ptr) COLD_LOADER (core.old);
+ c_loader = (file_ptr) (ptr_to_uint) COLD_LOADER (core.old);
proc64 = 0;
}
@@ -523,9 +529,9 @@ rs6000coff_core_p (abfd)
else
{
c_datasize = core.old.c_datasize;
- c_data = (file_ptr) core.old.c_data;
+ c_data = (file_ptr) (ptr_to_uint) core.old.c_data;
c_vmregions = core.old.c_vmregions;
- c_vmm = (file_ptr) core.old.c_vmm;
+ c_vmm = (file_ptr) (ptr_to_uint) core.old.c_vmm;
}
/* .data section from executable. */
@@ -633,9 +639,7 @@ rs6000coff_core_p (abfd)
/* Return `TRUE' if given core is from the given executable. */
bfd_boolean
-rs6000coff_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd;
- bfd *exec_bfd;
+rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
{
CoreHdr core;
bfd_size_type size;
@@ -651,7 +655,7 @@ rs6000coff_core_file_matches_executable_p (core_bfd, exec_bfd)
if (CORE_NEW (core))
c_loader = CNEW_LOADER (core.new);
else
- c_loader = (file_ptr) COLD_LOADER (core.old);
+ c_loader = (file_ptr) (ptr_to_uint) COLD_LOADER (core.old);
if (CORE_NEW (core) && CNEW_PROC64 (core.new))
size = (int) ((LdInfo *) 0)->l64.ldinfo_filename;
@@ -711,8 +715,7 @@ rs6000coff_core_file_matches_executable_p (core_bfd, exec_bfd)
}
char *
-rs6000coff_core_file_failing_command (abfd)
- bfd *abfd;
+rs6000coff_core_file_failing_command (bfd *abfd)
{
CoreHdr *core = core_hdr (abfd);
char *com = CORE_NEW (*core) ?
@@ -725,8 +728,7 @@ rs6000coff_core_file_failing_command (abfd)
}
int
-rs6000coff_core_file_failing_signal (abfd)
- bfd *abfd;
+rs6000coff_core_file_failing_signal (bfd *abfd)
{
CoreHdr *core = core_hdr (abfd);
return CORE_NEW (*core) ? core->new.c_signo : core->old.c_signo;
diff --git a/contrib/binutils/bfd/sco5-core.c b/contrib/binutils/bfd/sco5-core.c
index 5c34ff1b5562..9a06b8839f54 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
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Jouke Numan <jnuman@hiscom.nl>
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -31,8 +31,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <signal.h>
#include <sys/user.h> /* After a.out.h */
+#ifdef SCO5_CORE
#include <sys/paccess.h>
#include <sys/region.h>
+#endif
struct sco5_core_struct
{
@@ -47,16 +49,15 @@ static struct user *read_uarea PARAMS ((bfd *, int));
const bfd_target *sco5_core_file_p PARAMS ((bfd *abfd));
char *sco5_core_file_failing_command PARAMS ((bfd *abfd));
int sco5_core_file_failing_signal PARAMS ((bfd *abfd));
-bfd_boolean sco5_core_file_matches_executable_p
- PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+#define sco5_core_file_matches_executable_p generic_core_file_matches_executable_p
static void swap_abort PARAMS ((void));
static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
+make_bfd_asection (abfd, name, flags, size, vma, filepos)
bfd *abfd;
const char *name;
flagword flags;
- bfd_size_type _raw_size;
+ bfd_size_type size;
bfd_vma vma;
file_ptr filepos;
{
@@ -66,7 +67,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
if (!asect)
return NULL;
asect->flags = flags;
- asect->_raw_size = _raw_size;
+ asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
asect->alignment_power = 2;
@@ -123,18 +124,14 @@ sco5_core_file_p (abfd)
char *secname;
flagword flags;
- /* Read coreoffsets region at end of core (see core(FP)) */
+ /* Read coreoffsets region at end of core (see core(FP)). */
{
- FILE *stream = bfd_cache_lookup (abfd);
struct stat statbuf;
- if (stream == NULL)
+
+ if (bfd_stat (abfd, &statbuf) < 0)
return NULL;
- if (fstat (fileno (stream), &statbuf) < 0)
- {
- bfd_set_error (bfd_error_system_call);
- return NULL;
- }
+
coresize = statbuf.st_size;
}
/* Last long in core is sizeof struct coreoffsets, read it */
@@ -347,14 +344,6 @@ sco5_core_file_failing_signal (ignore_abfd)
: -1);
}
-bfd_boolean
-sco5_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd ATTRIBUTE_UNUSED;
- bfd *exec_bfd ATTRIBUTE_UNUSED;
-{
- return TRUE; /* FIXME, We have no way of telling at this point */
-}
-
/* If somebody calls any byte-swapping routines, shoot them. */
static void
swap_abort ()
diff --git a/contrib/binutils/bfd/section.c b/contrib/binutils/bfd/section.c
index fce8e1eab3d1..f870e6bfc08a 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
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
SECTION
@@ -149,23 +149,6 @@ SUBSECTION
CODE_FRAGMENT
.
-.{* This structure is used for a comdat section, as in PE. A comdat
-. section is associated with a particular symbol. When the linker
-. sees a comdat section, it keeps only one of the sections with a
-. given name and associated with a given symbol. *}
-.
-.struct bfd_comdat_info
-.{
-. {* The name of the symbol associated with a comdat section. *}
-. const char *name;
-.
-. {* The local symbol table index of the symbol associated with a
-. comdat section. This is only meaningful to the object file format
-. specific code; it is not an index into the list returned by
-. bfd_canonicalize_symtab. *}
-. long symbol;
-.};
-.
.typedef struct bfd_section
.{
. {* The name of the section; the name isn't a copy, the pointer is
@@ -181,6 +164,9 @@ CODE_FRAGMENT
. {* 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. *}
@@ -200,23 +186,17 @@ CODE_FRAGMENT
. some relocation information too. *}
.#define SEC_RELOC 0x004
.
-. {* ELF reserves 4 processor specific bits and 8 operating system
-. specific bits in sh_flags; at present we can get away with just
-. one in communicating between the assembler and BFD, but this
-. isn't a good long-term solution. *}
-.#define SEC_ARCH_BIT_0 0x008
-.
. {* A signal to the OS that the section contains read only data. *}
-.#define SEC_READONLY 0x010
+.#define SEC_READONLY 0x008
.
. {* The section contains code only. *}
-.#define SEC_CODE 0x020
+.#define SEC_CODE 0x010
.
. {* The section contains data only. *}
-.#define SEC_DATA 0x040
+.#define SEC_DATA 0x020
.
. {* The section will reside in ROM. *}
-.#define SEC_ROM 0x080
+.#define SEC_ROM 0x040
.
. {* The section contains constructor information. This section
. type is used by the linker to create lists of constructors and
@@ -228,30 +208,19 @@ CODE_FRAGMENT
. sections called <<__CTOR_LIST__>> and relocate the data
. contained within - exactly the operations it would peform on
. standard data. *}
-.#define SEC_CONSTRUCTOR 0x100
+.#define SEC_CONSTRUCTOR 0x080
.
. {* The section has contents - a data section could be
. <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
. <<SEC_HAS_CONTENTS>> *}
-.#define SEC_HAS_CONTENTS 0x200
+.#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 0x400
-.
-. {* The section is a COFF shared library section. This flag is
-. only for the linker. If this type of section appears in
-. the input file, the linker must copy it to the output file
-. without changing the vma or size. FIXME: Although this
-. was originally intended to be general, it really is COFF
-. specific (and the flag was renamed to indicate this). It
-. might be cleaner to have some more general mechanism to
-. allow the back end to control what the linker does with
-. sections. *}
-.#define SEC_COFF_SHARED_LIBRARY 0x800
+.#define SEC_NEVER_LOAD 0x200
.
. {* The section contains thread local data. *}
-.#define SEC_THREAD_LOCAL 0x1000
+.#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.
@@ -259,46 +228,46 @@ CODE_FRAGMENT
. in this section, which indicate to the linker that the section
. contains PIC code, and must be handled specially when doing a
. static link. *}
-.#define SEC_HAS_GOT_REF 0x4000
+.#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 0x8000
+.#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 0x10000
+.#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 0x20000
+.#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 0x40000
+.#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 0x80000
+.#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 0x100000
+.#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 0x600000
+.#define SEC_LINK_DUPLICATES 0x40000
.
. {* This value for SEC_LINK_DUPLICATES means that duplicate
. sections with the same name should simply be discarded. *}
@@ -307,55 +276,69 @@ CODE_FRAGMENT
. {* This value for SEC_LINK_DUPLICATES means that the linker
. should warn if there are any duplicate sections, although
. it should still only link one copy. *}
-.#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
+.#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 0x400000
+.#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 0x600000
+.#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 0x800000
+.#define SEC_LINKER_CREATED 0x200000
.
. {* This section should not be subject to garbage collection. *}
-.#define SEC_KEEP 0x1000000
+.#define SEC_KEEP 0x400000
.
. {* This section contains "short" data, and should be placed
. "near" the GP. *}
-.#define SEC_SMALL_DATA 0x2000000
-.
-. {* This section contains data which may be shared with other
-. executables or shared objects. *}
-.#define SEC_SHARED 0x4000000
-.
-. {* When a section with this flag is being linked, then if the size of
-. the input section is less than a page, it should not cross a page
-. boundary. If the size of the input section is one page or more, it
-. should be aligned on a page boundary. *}
-.#define SEC_BLOCK 0x8000000
-.
-. {* Conditionally link this section; do not link if there are no
-. references found to any symbol in the section. *}
-.#define SEC_CLINK 0x10000000
+.#define SEC_SMALL_DATA 0x800000
.
. {* Attempt to merge identical entities in the section.
. Entity size is given in the entsize field. *}
-.#define SEC_MERGE 0x20000000
+.#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 0x40000000
+.#define SEC_STRINGS 0x2000000
.
. {* This section contains data about section groups. *}
-.#define SEC_GROUP 0x80000000
+.#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. *}
.
@@ -364,9 +347,6 @@ CODE_FRAGMENT
. {* See the vma field. *}
. unsigned int user_set_vma : 1;
.
-. {* Whether relocations have been processed. *}
-. unsigned int reloc_done : 1;
-.
. {* A mark flag used by some of the linker backends. *}
. unsigned int linker_mark : 1;
.
@@ -374,8 +354,9 @@ CODE_FRAGMENT
. output sections that have an input section. *}
. unsigned int linker_has_input : 1;
.
-. {* A mark flag used by some linker backends for garbage collection. *}
+. {* 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. *}
.
@@ -393,22 +374,20 @@ CODE_FRAGMENT
. {* Nonzero if this section uses RELA relocations, rather than REL. *}
. unsigned int use_rela_p:1;
.
-. {* Bits used by various backends. *}
-. unsigned int has_tls_reloc:1;
+. {* Bits used by various backends. The generic code doesn't touch
+. these fields. *}
.
-. {* Nonzero if this section needs the relax finalize pass. *}
-. unsigned int need_finalize_relax:1;
+. {* 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;
.
-. {* Unused bits. *}
-. unsigned int flag13:1;
-. unsigned int flag14:1;
-. unsigned int flag15:1;
-. unsigned int flag16:4;
-. unsigned int flag20:4;
-. unsigned int flag24:8;
+. {* 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. *}
.
@@ -427,13 +406,18 @@ CODE_FRAGMENT
.
. {* The size of the section in octets, as it will be output.
. Contains a value even if the section has no contents (e.g., the
-. size of <<.bss>>). This will be filled in after relocation. *}
-. bfd_size_type _cooked_size;
-.
-. {* The original size on disk of the section, in octets. Normally this
-. value is the same as the size, but if some relaxing has
-. been done, then this value will be bigger. *}
-. bfd_size_type _raw_size;
+. size of <<.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
@@ -490,9 +474,6 @@ CODE_FRAGMENT
. {* Entity size for merging purposes. *}
. unsigned int entsize;
.
-. {* Optional information about a COMDAT entry; NULL if not COMDAT. *}
-. struct bfd_comdat_info *comdat;
-.
. {* Points to the kept section if this section is a link-once section,
. and is discarded. *}
. struct bfd_section *kept_section;
@@ -517,8 +498,14 @@ CODE_FRAGMENT
. struct bfd_symbol *symbol;
. struct bfd_symbol **symbol_ptr_ptr;
.
-. struct bfd_link_order *link_order_head;
-. struct bfd_link_order *link_order_tail;
+. {* 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
@@ -557,36 +544,137 @@ CODE_FRAGMENT
.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;
-.#define bfd_get_section_size_before_reloc(section) \
-. ((section)->_raw_size)
-.#define bfd_get_section_size_after_reloc(section) \
-. ((section)->reloc_done ? (section)->_cooked_size \
-. : (abort (), (bfd_size_type) 1))
.
.{* Macros to handle insertion and deletion of a bfd's sections. These
. only handle the list pointers, ie. do not adjust section_count,
. target_index etc. *}
-.#define bfd_section_list_remove(ABFD, PS) \
+.#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 **_ps = PS; \
-. asection *_s = *_ps; \
-. *_ps = _s->next; \
-. if (_s->next == NULL) \
-. (ABFD)->section_tail = _ps; \
+. 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_insert(ABFD, PS, S) \
+.#define bfd_section_list_prepend(ABFD, S) \
. do \
. { \
-. asection **_ps = PS; \
. asection *_s = S; \
-. _s->next = *_ps; \
-. *_ps = _s; \
-. if (_s->next == NULL) \
-. (ABFD)->section_tail = &_s->next; \
+. 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 } \
+. }
.
*/
@@ -615,49 +703,8 @@ static const asymbol global_syms[] =
#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
- asection SEC = \
- /* name, id, index, next, flags, user_set_vma, reloc_done, */ \
- { NAME, IDX, 0, NULL, FLAGS, 0, 0, \
- \
- /* linker_mark, linker_has_input, gc_mark, segment_mark, */ \
- 0, 0, 1, 0, \
- \
- /* sec_info_type, use_rela_p, has_tls_reloc, */ \
- 0, 0, 0, \
- \
- /* need_finalize_relax, has_gp_reloc, */ \
- 0, 0, \
- \
- /* flag13, flag14, flag15, flag16, flag20, flag24, */ \
- 0, 0, 0, 0, 0, 0, \
- \
- /* vma, lma, _cooked_size, _raw_size, */ \
- 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, comdat, kept_section, moving_line_filepos, */ \
- 0, NULL, NULL, 0, \
- \
- /* target_index, used_by_bfd, constructor_chain, owner, */ \
- 0, NULL, NULL, NULL, \
- \
- /* symbol, */ \
- (struct bfd_symbol *) &global_syms[IDX], \
- \
- /* symbol_ptr_ptr, */ \
- (struct bfd_symbol **) &SYM, \
- \
- /* link_order_head, link_order_tail */ \
- NULL, NULL \
- }
+ asection SEC = BFD_FAKE_SECTION(SEC, FLAGS, &global_syms[IDX], &SYM, \
+ NAME, IDX)
STD_SECTION (bfd_com_section, SEC_IS_COMMON, bfd_com_symbol,
BFD_COM_SECTION_NAME, 0);
@@ -666,12 +713,6 @@ STD_SECTION (bfd_abs_section, 0, bfd_abs_symbol, BFD_ABS_SECTION_NAME, 2);
STD_SECTION (bfd_ind_section, 0, bfd_ind_symbol, BFD_IND_SECTION_NAME, 3);
#undef STD_SECTION
-struct section_hash_entry
-{
- struct bfd_hash_entry root;
- asection section;
-};
-
/* Initialize an entry in the section hash table. */
struct bfd_hash_entry *
@@ -732,8 +773,7 @@ bfd_section_init (bfd *abfd, asection *newsect)
section_id++;
abfd->section_count++;
- *abfd->section_tail = newsect;
- abfd->section_tail = &newsect->next;
+ bfd_section_list_append (abfd, newsect);
return newsect;
}
@@ -763,7 +803,7 @@ void
bfd_section_list_clear (bfd *abfd)
{
abfd->sections = NULL;
- abfd->section_tail = &abfd->sections;
+ abfd->section_last = NULL;
abfd->section_count = 0;
memset (abfd->section_htab.table, 0,
abfd->section_htab.size * sizeof (struct bfd_hash_entry *));
@@ -801,6 +841,57 @@ bfd_get_section_by_name (bfd *abfd, const char *name)
/*
FUNCTION
+ bfd_get_section_by_name_if
+
+SYNOPSIS
+ asection *bfd_get_section_by_name_if
+ (bfd *abfd,
+ const char *name,
+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
+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
+
+| func (abfd, the_section, obj);
+
+ It returns the first section for which @var{func} returns true,
+ otherwise <<NULL>>.
+
+*/
+
+asection *
+bfd_get_section_by_name_if (bfd *abfd, const char *name,
+ bfd_boolean (*operation) (bfd *,
+ asection *,
+ void *),
+ void *user_storage)
+{
+ struct section_hash_entry *sh;
+ unsigned long hash;
+
+ sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE);
+ if (sh == NULL)
+ return NULL;
+
+ hash = sh->root.hash;
+ do
+ {
+ if ((*operation) (abfd, &sh->section, user_storage))
+ return &sh->section;
+ sh = (struct section_hash_entry *) sh->root.next;
+ }
+ while (sh != NULL && sh->root.hash == hash
+ && strcmp (sh->root.string, name) == 0);
+
+ return NULL;
+}
+
+/*
+FUNCTION
bfd_get_unique_section_name
SYNOPSIS
@@ -911,15 +1002,17 @@ bfd_make_section_old_way (bfd *abfd, const char *name)
/*
FUNCTION
- bfd_make_section_anyway
+ bfd_make_section_anyway_with_flags
SYNOPSIS
- asection *bfd_make_section_anyway (bfd *abfd, const char *name);
+ asection *bfd_make_section_anyway_with_flags
+ (bfd *abfd, const char *name, flagword flags);
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.
+ is already a section with that name. Also set the attributes of the
+ new section to the value @var{flags}.
Return <<NULL>> and set <<bfd_error>> on error; possible errors are:
o <<bfd_error_invalid_operation>> - If output has already started for @var{abfd}.
@@ -927,7 +1020,8 @@ DESCRIPTION
*/
sec_ptr
-bfd_make_section_anyway (bfd *abfd, const char *name)
+bfd_make_section_anyway_with_flags (bfd *abfd, const char *name,
+ flagword flags)
{
struct section_hash_entry *sh;
asection *newsect;
@@ -945,35 +1039,68 @@ bfd_make_section_anyway (bfd *abfd, const char *name)
newsect = &sh->section;
if (newsect->name != NULL)
{
- /* We are making a section of the same name. It can't go in
- section_htab without generating a unique section name and
- that would be pointless; We don't need to traverse the
- hash table. */
- newsect = bfd_zalloc (abfd, sizeof (asection));
- if (newsect == NULL)
+ /* We are making a section of the same name. Put it in the
+ section hash table. Even though we can't find it directly by a
+ hash lookup, we'll be able to find the section by traversing
+ sh->root.next quicker than looking at all the bfd sections. */
+ struct section_hash_entry *new_sh;
+ new_sh = (struct section_hash_entry *)
+ bfd_section_hash_newfunc (NULL, &abfd->section_htab, name);
+ if (new_sh == NULL)
return NULL;
+
+ new_sh->root = sh->root;
+ sh->root.next = &new_sh->root;
+ newsect = &new_sh->section;
}
+ newsect->flags = flags;
newsect->name = name;
return bfd_section_init (abfd, newsect);
}
/*
FUNCTION
- bfd_make_section
+ bfd_make_section_anyway
SYNOPSIS
- asection *bfd_make_section (bfd *, const char *name);
+ asection *bfd_make_section_anyway (bfd *abfd, const char *name);
+
+DESCRIPTION
+ Create a new empty section called @var{name} and attach it to the end of
+ the chain of sections for @var{abfd}. Create a new section even if there
+ is already a section with that name.
+
+ Return <<NULL>> and set <<bfd_error>> on error; possible errors are:
+ o <<bfd_error_invalid_operation>> - If output has already started for @var{abfd}.
+ o <<bfd_error_no_memory>> - If memory allocation fails.
+*/
+
+sec_ptr
+bfd_make_section_anyway (bfd *abfd, const char *name)
+{
+ return bfd_make_section_anyway_with_flags (abfd, name, 0);
+}
+
+/*
+FUNCTION
+ bfd_make_section_with_flags
+
+SYNOPSIS
+ asection *bfd_make_section_with_flags
+ (bfd *, const char *name, flagword flags);
DESCRIPTION
Like <<bfd_make_section_anyway>>, but return <<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 <<NULL>> and set
+ section named @var{name}. Also set the attributes of the new section to
+ the value @var{flags}. If there is an error, return <<NULL>> and set
<<bfd_error>>.
*/
asection *
-bfd_make_section (bfd *abfd, const char *name)
+bfd_make_section_with_flags (bfd *abfd, const char *name,
+ flagword flags)
{
struct section_hash_entry *sh;
asection *newsect;
@@ -1002,11 +1129,32 @@ bfd_make_section (bfd *abfd, const char *name)
}
newsect->name = name;
+ newsect->flags = flags;
return bfd_section_init (abfd, newsect);
}
/*
FUNCTION
+ bfd_make_section
+
+SYNOPSIS
+ asection *bfd_make_section (bfd *, const char *name);
+
+DESCRIPTION
+ Like <<bfd_make_section_anyway>>, but return <<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 <<NULL>> and set
+ <<bfd_error>>.
+*/
+
+asection *
+bfd_make_section (bfd *abfd, const char *name)
+{
+ return bfd_make_section_with_flags (abfd, name, 0);
+}
+
+/*
+FUNCTION
bfd_set_section_flags
SYNOPSIS
@@ -1030,19 +1178,6 @@ bfd_set_section_flags (bfd *abfd ATTRIBUTE_UNUSED,
sec_ptr section,
flagword flags)
{
-#if 0
- /* If you try to copy a text section from an input file (where it
- has the SEC_CODE flag set) to an output file, this loses big if
- the bfd_applicable_section_flags (abfd) doesn't have the SEC_CODE
- set - which it doesn't, at least not for a.out. FIXME */
-
- if ((flags & bfd_applicable_section_flags (abfd)) != flags)
- {
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
- }
-#endif
-
section->flags = flags;
return TRUE;
}
@@ -1090,6 +1225,41 @@ bfd_map_over_sections (bfd *abfd,
/*
FUNCTION
+ bfd_sections_find_if
+
+SYNOPSIS
+ asection *bfd_sections_find_if
+ (bfd *abfd,
+ bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
+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
+
+| operation (abfd, the_section, obj);
+
+ It returns the first section for which @var{operation} returns true.
+
+*/
+
+asection *
+bfd_sections_find_if (bfd *abfd,
+ bfd_boolean (*operation) (bfd *, asection *, void *),
+ void *user_storage)
+{
+ asection *sect;
+
+ for (sect = abfd->sections; sect != NULL; sect = sect->next)
+ if ((*operation) (abfd, sect, user_storage))
+ break;
+
+ return sect;
+}
+
+/*
+FUNCTION
bfd_set_section_size
SYNOPSIS
@@ -1118,9 +1288,7 @@ bfd_set_section_size (bfd *abfd, sec_ptr ptr, bfd_size_type val)
return FALSE;
}
- ptr->_cooked_size = val;
- ptr->_raw_size = val;
-
+ ptr->size = val;
return TRUE;
}
@@ -1151,11 +1319,6 @@ DESCRIPTION
*/
-#define bfd_get_section_size_now(abfd, sec) \
- (sec->reloc_done \
- ? bfd_get_section_size_after_reloc (sec) \
- : bfd_get_section_size_before_reloc (sec))
-
bfd_boolean
bfd_set_section_contents (bfd *abfd,
sec_ptr section,
@@ -1171,7 +1334,7 @@ bfd_set_section_contents (bfd *abfd,
return FALSE;
}
- sz = bfd_get_section_size_now (abfd, section);
+ sz = section->size;
if ((bfd_size_type) offset > sz
|| count > sz
|| offset + count > sz
@@ -1181,22 +1344,10 @@ bfd_set_section_contents (bfd *abfd,
return FALSE;
}
- switch (abfd->direction)
+ if (!bfd_write_p (abfd))
{
- case read_direction:
- case no_direction:
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
-
- case write_direction:
- break;
-
- case both_direction:
- /* File is opened for update. `output_has_begun' some time ago when
- the file was created. Do not recompute sections sizes or alignments
- in _bfd_set_section_content. */
- abfd->output_has_begun = TRUE;
- break;
}
/* Record a copy of the data in memory if desired. */
@@ -1251,9 +1402,7 @@ bfd_get_section_contents (bfd *abfd,
return TRUE;
}
- /* Even if reloc_done is TRUE, this function reads unrelocated
- contents, so we want the raw size. */
- sz = section->_raw_size;
+ sz = section->rawsize ? section->rawsize : section->size;
if ((bfd_size_type) offset > sz
|| count > sz
|| offset + count > sz
@@ -1285,6 +1434,36 @@ bfd_get_section_contents (bfd *abfd,
/*
FUNCTION
+ bfd_malloc_and_get_section
+
+SYNOPSIS
+ bfd_boolean bfd_malloc_and_get_section
+ (bfd *abfd, asection *section, bfd_byte **buf);
+
+DESCRIPTION
+ Read all data from @var{section} in BFD @var{abfd}
+ into a buffer, *@var{buf}, malloc'd by this function.
+*/
+
+bfd_boolean
+bfd_malloc_and_get_section (bfd *abfd, sec_ptr sec, bfd_byte **buf)
+{
+ bfd_size_type sz = sec->rawsize ? sec->rawsize : sec->size;
+ bfd_byte *p = NULL;
+
+ *buf = p;
+ if (sz == 0)
+ return TRUE;
+
+ p = bfd_malloc (sec->rawsize > sec->size ? sec->rawsize : sec->size);
+ if (p == NULL)
+ return FALSE;
+ *buf = p;
+
+ return bfd_get_section_contents (abfd, sec, p, 0, sz);
+}
+/*
+FUNCTION
bfd_copy_private_section_data
SYNOPSIS
@@ -1307,46 +1486,20 @@ DESCRIPTION
/*
FUNCTION
- _bfd_strip_section_from_output
+ bfd_generic_is_group_section
SYNOPSIS
- void _bfd_strip_section_from_output
- (struct bfd_link_info *info, asection *section);
+ bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
DESCRIPTION
- Remove @var{section} from the output. If the output section
- becomes empty, remove it from the output bfd.
-
- This function won't actually do anything except twiddle flags
- if called too late in the linking process, when it's not safe
- to remove sections.
+ Returns TRUE if @var{sec} is a member of a group.
*/
-void
-_bfd_strip_section_from_output (struct bfd_link_info *info, asection *s)
+
+bfd_boolean
+bfd_generic_is_group_section (bfd *abfd ATTRIBUTE_UNUSED,
+ const asection *sec ATTRIBUTE_UNUSED)
{
- asection *os;
- asection *is;
- bfd *abfd;
-
- s->flags |= SEC_EXCLUDE;
-
- /* If the section wasn't assigned to an output section, or the
- section has been discarded by the linker script, there's nothing
- more to do. */
- os = s->output_section;
- if (os == NULL || os->owner == NULL)
- return;
-
- /* If the output section has other (non-excluded) input sections, we
- can't remove it. */
- for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
- for (is = abfd->sections; is != NULL; is = is->next)
- if (is->output_section == os && (is->flags & SEC_EXCLUDE) == 0)
- return;
-
- /* If the output section is empty, flag it for removal too.
- See ldlang.c:strip_excluded_output_sections for the action. */
- os->flags |= SEC_EXCLUDE;
+ return FALSE;
}
/*
diff --git a/contrib/binutils/bfd/simple.c b/contrib/binutils/bfd/simple.c
index fc2472eefd21..d06ce2a96e11 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
+ Copyright 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by MontaVista Software, Inc.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -48,6 +48,7 @@ simple_dummy_undefined_symbol (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
static bfd_boolean
simple_dummy_reloc_overflow (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ struct bfd_link_hash_entry *entry ATTRIBUTE_UNUSED,
const char *name ATTRIBUTE_UNUSED,
const char *reloc_name ATTRIBUTE_UNUSED,
bfd_vma addend ATTRIBUTE_UNUSED,
@@ -78,6 +79,24 @@ simple_dummy_unattached_reloc (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
return TRUE;
}
+static bfd_boolean
+simple_dummy_multiple_definition (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED,
+ bfd *obfd ATTRIBUTE_UNUSED,
+ asection *osec ATTRIBUTE_UNUSED,
+ bfd_vma oval ATTRIBUTE_UNUSED,
+ bfd *nbfd ATTRIBUTE_UNUSED,
+ asection *nsec ATTRIBUTE_UNUSED,
+ bfd_vma nval ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+static void
+simple_dummy_einfo (const char *fmt ATTRIBUTE_UNUSED, ...)
+{
+}
+
struct saved_output_info
{
bfd_vma offset;
@@ -92,8 +111,12 @@ simple_save_output_info (bfd *abfd ATTRIBUTE_UNUSED,
struct saved_output_info *output_info = ptr;
output_info[section->index].offset = section->output_offset;
output_info[section->index].section = section->output_section;
- section->output_offset = 0;
- section->output_section = section;
+ if ((section->flags & SEC_DEBUGGING) != 0
+ || section->output_section == NULL)
+ {
+ section->output_offset = 0;
+ section->output_section = section;
+ }
}
static void
@@ -117,13 +140,10 @@ SYNOPSIS
DESCRIPTION
Returns the relocated contents of section @var{sec}. The symbols in
@var{symbol_table} will be used, or the symbols from @var{abfd} if
- @var{symbol_table} is NULL. The output offsets for all sections will
+ @var{symbol_table} is NULL. The output offsets for debug sections will
be temporarily reset to 0. The result will be stored at @var{outbuf}
or allocated with @code{bfd_malloc} if @var{outbuf} is @code{NULL}.
- Generally all sections in @var{abfd} should have their
- @code{output_section} pointing back to the original section.
-
Returns @code{NULL} on a fatal error; ignores errors applying
particular relocations.
*/
@@ -140,14 +160,14 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
bfd_byte *contents, *data;
int storage_needed;
void *saved_offsets;
- bfd_size_type old_cooked_size;
if (! (sec->flags & SEC_RELOC))
{
- bfd_size_type size = bfd_section_size (abfd, sec);
+ bfd_size_type amt = sec->rawsize > sec->size ? sec->rawsize : sec->size;
+ bfd_size_type size = sec->rawsize ? sec->rawsize : sec->size;
if (outbuf == NULL)
- contents = bfd_malloc (size);
+ contents = bfd_malloc (amt);
else
contents = outbuf;
@@ -171,18 +191,20 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
callbacks.reloc_overflow = simple_dummy_reloc_overflow;
callbacks.reloc_dangerous = simple_dummy_reloc_dangerous;
callbacks.unattached_reloc = simple_dummy_unattached_reloc;
+ callbacks.multiple_definition = simple_dummy_multiple_definition;
+ callbacks.einfo = simple_dummy_einfo;
memset (&link_order, 0, sizeof (link_order));
link_order.next = NULL;
link_order.type = bfd_indirect_link_order;
link_order.offset = 0;
- link_order.size = bfd_section_size (abfd, sec);
+ link_order.size = sec->size;
link_order.u.indirect.section = sec;
data = NULL;
if (outbuf == NULL)
{
- data = bfd_malloc (bfd_section_size (abfd, sec));
+ data = bfd_malloc (sec->size);
if (data == NULL)
return NULL;
outbuf = data;
@@ -218,12 +240,6 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
else
storage_needed = 0;
- /* This function might be called before _cooked_size has been set, and
- bfd_perform_relocation needs _cooked_size to be valid. */
- old_cooked_size = sec->_cooked_size;
- if (old_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
-
contents = bfd_get_relocated_section_contents (abfd,
&link_info,
&link_order,
@@ -233,25 +249,9 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
if (contents == NULL && data != NULL)
free (data);
-#if 0
- /* NOTE: cagney/2003-04-05: This free, which was introduced on
- 2003-03-31 to stop a memory leak, caused a memory corruption
- between GDB and BFD. The problem, which is stabs specific, can
- be identified by a bunch of failures in relocate.exp vis:
-
- gdb.base/relocate.exp: get address of static_bar
-
- Details of the problem can be found on the binutils@ mailing
- list, see the discussion thread: "gdb.mi/mi-cli.exp failures". */
- if (storage_needed != 0)
- free (symbol_table);
-#endif
-
- sec->_cooked_size = old_cooked_size;
bfd_map_over_sections (abfd, simple_restore_output_info, saved_offsets);
free (saved_offsets);
_bfd_generic_link_hash_table_free (link_info.hash);
-
return contents;
}
diff --git a/contrib/binutils/bfd/sparclinux.c b/contrib/binutils/bfd/sparclinux.c
index ecaaa0f9bf35..d8659eec16ba 100644
--- a/contrib/binutils/bfd/sparclinux.c
+++ b/contrib/binutils/bfd/sparclinux.c
@@ -1,6 +1,6 @@
/* BFD back-end for linux flavored sparc a.out binaries.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
USA. */
#define TARGET_PAGE_SIZE 4096
@@ -232,8 +232,9 @@ linux_link_hash_table_create (abfd)
ret = (struct linux_link_hash_table *) bfd_malloc (amt);
if (ret == (struct linux_link_hash_table *) NULL)
return (struct bfd_link_hash_table *) NULL;
- if (! NAME(aout,link_hash_table_init) (&ret->root, abfd,
- linux_link_hash_newfunc))
+ if (!NAME(aout,link_hash_table_init) (&ret->root, abfd,
+ linux_link_hash_newfunc,
+ sizeof (struct linux_link_hash_entry)))
{
free (ret);
return (struct bfd_link_hash_table *) NULL;
@@ -317,7 +318,7 @@ linux_link_create_dynamic_sections (abfd, info)
|| ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
- s->_raw_size = 0;
+ s->size = 0;
s->contents = 0;
return TRUE;
@@ -596,9 +597,9 @@ bfd_sparclinux_size_dynamic_sections (output_bfd, info)
".linux-dynamic");
if (s != NULL)
{
- s->_raw_size = linux_hash_table (info)->fixup_count + 1;
- s->_raw_size *= 8;
- s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
+ s->size = linux_hash_table (info)->fixup_count + 1;
+ s->size *= 8;
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -763,7 +764,7 @@ linux_finish_dynamic_link (output_bfd, info)
SEEK_SET) != 0)
return FALSE;
- if (bfd_bwrite ((PTR) s->contents, s->_raw_size, output_bfd) != s->_raw_size)
+ if (bfd_bwrite ((PTR) s->contents, s->size, output_bfd) != s->size)
return FALSE;
return TRUE;
diff --git a/contrib/binutils/bfd/sparcnetbsd.c b/contrib/binutils/bfd/sparcnetbsd.c
index be8e53634905..ac000181bf8c 100644
--- a/contrib/binutils/bfd/sparcnetbsd.c
+++ b/contrib/binutils/bfd/sparcnetbsd.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_BIG_ENDIAN_P
diff --git a/contrib/binutils/bfd/srec.c b/contrib/binutils/bfd/srec.c
index c0a3d585b437..2b24f46ffb64 100644
--- a/contrib/binutils/bfd/srec.c
+++ b/contrib/binutils/bfd/srec.c
@@ -1,30 +1,29 @@
/* BFD back-end for s-record objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004, 2005
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.
+ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-/*
-SUBSECTION
+/* SUBSECTION
S-Record handling
-DESCRIPTION
+ DESCRIPTION
Ordinary S-Records cannot hold anything but addresses and
data, so that's all that we implement.
@@ -44,10 +43,10 @@ DESCRIPTION
An s record looks like:
-EXAMPLE
+ EXAMPLE
S<type><length><address><data><checksum>
-DESCRIPTION
+ DESCRIPTION
Where
o length
is the number of bytes following upto the checksum. Note that
@@ -72,10 +71,10 @@ DESCRIPTION
is the sum of all the raw byte data in the record, from the length
upwards, modulo 256 and subtracted from 255.
-SUBSECTION
+ SUBSECTION
Symbol S-Record handling
-DESCRIPTION
+ DESCRIPTION
Some ICE equipment understands an addition to the standard
S-Record format; symbols and their addresses can be sent
before the data.
@@ -87,7 +86,7 @@ DESCRIPTION
so a short symbol table could look like:
-EXAMPLE
+ EXAMPLE
$$ flash.x
$$ flash.c
_port6 $0
@@ -98,11 +97,9 @@ EXAMPLE
_end $8036
$$
-DESCRIPTION
+ DESCRIPTION
We allow symbols to be anywhere in the data stream - the module names
- are always ignored.
-
-*/
+ are always ignored. */
#include "bfd.h"
#include "sysdep.h"
@@ -110,61 +107,18 @@ DESCRIPTION
#include "libiberty.h"
#include "safe-ctype.h"
-static void srec_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
-static void srec_print_symbol
- PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
-static void srec_init PARAMS ((void));
-static bfd_boolean srec_mkobject PARAMS ((bfd *));
-static int srec_get_byte PARAMS ((bfd *, bfd_boolean *));
-static void srec_bad_byte PARAMS ((bfd *, unsigned int, int, bfd_boolean));
-static bfd_boolean srec_scan PARAMS ((bfd *));
-static const bfd_target *srec_object_p PARAMS ((bfd *));
-static const bfd_target *symbolsrec_object_p PARAMS ((bfd *));
-static bfd_boolean srec_read_section PARAMS ((bfd *, asection *, bfd_byte *));
-
-static bfd_boolean srec_write_record
- PARAMS ((bfd *, unsigned int, bfd_vma, const bfd_byte *, const bfd_byte *));
-static bfd_boolean srec_write_header PARAMS ((bfd *));
-static bfd_boolean srec_write_symbols PARAMS ((bfd *));
-static bfd_boolean srec_new_symbol PARAMS ((bfd *, const char *, bfd_vma));
-static bfd_boolean srec_get_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
-static bfd_boolean srec_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long));
-static bfd_boolean srec_set_section_contents
- PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
-static bfd_boolean internal_srec_write_object_contents PARAMS ((bfd *, int));
-static bfd_boolean srec_write_object_contents PARAMS ((bfd *));
-static bfd_boolean symbolsrec_write_object_contents PARAMS ((bfd *));
-static int srec_sizeof_headers PARAMS ((bfd *, bfd_boolean));
-static long srec_get_symtab_upper_bound PARAMS ((bfd *));
-static long srec_canonicalize_symtab PARAMS ((bfd *, asymbol **));
/* Macros for converting between hex and binary. */
static const char digs[] = "0123456789ABCDEF";
-#define NIBBLE(x) hex_value(x)
-#define HEX(buffer) ((NIBBLE((buffer)[0])<<4) + NIBBLE((buffer)[1]))
+#define NIBBLE(x) hex_value(x)
+#define HEX(buffer) ((NIBBLE ((buffer)[0])<<4) + NIBBLE ((buffer)[1]))
#define TOHEX(d, x, ch) \
d[1] = digs[(x) & 0xf]; \
d[0] = digs[((x)>>4)&0xf]; \
ch += ((x) & 0xff);
-#define ISHEX(x) hex_p(x)
-
-/* Initialize by filling in the hex conversion array. */
-
-static void
-srec_init ()
-{
- static bfd_boolean inited = FALSE;
-
- if (! inited)
- {
- inited = TRUE;
- hex_init ();
- }
-}
+#define ISHEX(x) hex_p(x)
/* The maximum number of address+data+crc bytes on a line is FF. */
#define MAXCHUNK 0xff
@@ -219,24 +173,30 @@ typedef struct srec_data_struct
}
tdata_type;
-static bfd_boolean srec_write_section
- PARAMS ((bfd *, tdata_type *, srec_data_list_type *));
-static bfd_boolean srec_write_terminator
- PARAMS ((bfd *, tdata_type *));
+/* Initialize by filling in the hex conversion array. */
+
+static void
+srec_init (void)
+{
+ static bfd_boolean inited = FALSE;
+
+ if (! inited)
+ {
+ inited = TRUE;
+ hex_init ();
+ }
+}
/* Set up the S-record tdata information. */
static bfd_boolean
-srec_mkobject (abfd)
- bfd *abfd;
+srec_mkobject (bfd *abfd)
{
- bfd_size_type amt;
tdata_type *tdata;
srec_init ();
- amt = sizeof (tdata_type);
- tdata = (tdata_type *) bfd_alloc (abfd, amt);
+ tdata = bfd_alloc (abfd, sizeof (tdata_type));
if (tdata == NULL)
return FALSE;
@@ -255,9 +215,7 @@ srec_mkobject (abfd)
occurred. Return EOF on error or end of file. */
static int
-srec_get_byte (abfd, errorptr)
- bfd *abfd;
- bfd_boolean *errorptr;
+srec_get_byte (bfd *abfd, bfd_boolean *errorptr)
{
bfd_byte c;
@@ -276,11 +234,10 @@ srec_get_byte (abfd, errorptr)
error messages. */
static void
-srec_bad_byte (abfd, lineno, c, error)
- bfd *abfd;
- unsigned int lineno;
- int c;
- bfd_boolean error;
+srec_bad_byte (bfd *abfd,
+ unsigned int lineno,
+ int c,
+ bfd_boolean error)
{
if (c == EOF)
{
@@ -299,8 +256,8 @@ srec_bad_byte (abfd, lineno, c, error)
buf[1] = '\0';
}
(*_bfd_error_handler)
- (_("%s:%d: Unexpected character `%s' in S-record file\n"),
- bfd_archive_filename (abfd), lineno, buf);
+ (_("%B:%d: Unexpected character `%s' in S-record file\n"),
+ abfd, lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
}
@@ -308,15 +265,11 @@ srec_bad_byte (abfd, lineno, c, error)
/* Add a new symbol found in an S-record file. */
static bfd_boolean
-srec_new_symbol (abfd, name, val)
- bfd *abfd;
- const char *name;
- bfd_vma val;
+srec_new_symbol (bfd *abfd, const char *name, bfd_vma val)
{
struct srec_symbol *n;
- bfd_size_type amt = sizeof (struct srec_symbol);
- n = (struct srec_symbol *) bfd_alloc (abfd, amt);
+ n = bfd_alloc (abfd, sizeof (* n));
if (n == NULL)
return FALSE;
@@ -339,8 +292,7 @@ srec_new_symbol (abfd, name, val)
section for each contiguous set of bytes. */
static bfd_boolean
-srec_scan (abfd)
- bfd *abfd;
+srec_scan (bfd *abfd)
{
int c;
unsigned int lineno = 1;
@@ -385,7 +337,6 @@ srec_scan (abfd)
}
++lineno;
-
break;
case ' ':
@@ -410,7 +361,7 @@ srec_scan (abfd)
}
alc = 10;
- symbuf = (char *) bfd_malloc (alc + 1);
+ symbuf = bfd_malloc (alc + 1);
if (symbuf == NULL)
goto error_return;
@@ -425,7 +376,7 @@ srec_scan (abfd)
char *n;
alc *= 2;
- n = (char *) bfd_realloc (symbuf, alc + 1);
+ n = bfd_realloc (symbuf, alc + 1);
if (n == NULL)
goto error_return;
p = n + (p - symbuf);
@@ -523,7 +474,7 @@ srec_scan (abfd)
{
if (buf != NULL)
free (buf);
- buf = (bfd_byte *) bfd_malloc ((bfd_size_type) bytes * 2);
+ buf = bfd_malloc ((bfd_size_type) bytes * 2);
if (buf == NULL)
goto error_return;
bufsize = bytes * 2;
@@ -564,11 +515,11 @@ srec_scan (abfd)
bytes -= 2;
if (sec != NULL
- && sec->vma + sec->_raw_size == address)
+ && sec->vma + sec->size == address)
{
/* This data goes at the end of the section we are
currently building. */
- sec->_raw_size += bytes;
+ sec->size += bytes;
}
else
{
@@ -578,7 +529,7 @@ srec_scan (abfd)
sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1);
amt = strlen (secbuf) + 1;
- secname = (char *) bfd_alloc (abfd, amt);
+ secname = bfd_alloc (abfd, amt);
strcpy (secname, secbuf);
sec = bfd_make_section (abfd, secname);
if (sec == NULL)
@@ -586,10 +537,9 @@ srec_scan (abfd)
sec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
sec->vma = address;
sec->lma = address;
- sec->_raw_size = bytes;
+ sec->size = bytes;
sec->filepos = pos;
}
-
break;
case '7':
@@ -638,10 +588,9 @@ srec_scan (abfd)
/* Check whether an existing file is an S-record file. */
static const bfd_target *
-srec_object_p (abfd)
- bfd *abfd;
+srec_object_p (bfd *abfd)
{
- PTR tdata_save;
+ void * tdata_save;
bfd_byte b[4];
srec_init ();
@@ -674,10 +623,9 @@ srec_object_p (abfd)
/* Check whether an existing file is an S-record file with symbols. */
static const bfd_target *
-symbolsrec_object_p (abfd)
- bfd *abfd;
+symbolsrec_object_p (bfd *abfd)
{
- PTR tdata_save;
+ void * tdata_save;
char b[2];
srec_init ();
@@ -710,10 +658,7 @@ symbolsrec_object_p (abfd)
/* Read in the contents of a section in an S-record file. */
static bfd_boolean
-srec_read_section (abfd, section, contents)
- bfd *abfd;
- asection *section;
- bfd_byte *contents;
+srec_read_section (bfd *abfd, asection *section, bfd_byte *contents)
{
int c;
bfd_size_type sofar = 0;
@@ -749,7 +694,7 @@ srec_read_section (abfd, section, contents)
{
if (buf != NULL)
free (buf);
- buf = (bfd_byte *) bfd_malloc ((bfd_size_type) bytes * 2);
+ buf = bfd_malloc ((bfd_size_type) bytes * 2);
if (buf == NULL)
goto error_return;
bufsize = bytes * 2;
@@ -763,7 +708,7 @@ srec_read_section (abfd, section, contents)
switch (hdr[0])
{
default:
- BFD_ASSERT (sofar == section->_raw_size);
+ BFD_ASSERT (sofar == section->size);
if (buf != NULL)
free (buf);
return TRUE;
@@ -788,7 +733,7 @@ srec_read_section (abfd, section, contents)
if (address != section->vma + sofar)
{
/* We've come to the end of this section. */
- BFD_ASSERT (sofar == section->_raw_size);
+ BFD_ASSERT (sofar == section->size);
if (buf != NULL)
free (buf);
return TRUE;
@@ -811,7 +756,7 @@ srec_read_section (abfd, section, contents)
if (error)
goto error_return;
- BFD_ASSERT (sofar == section->_raw_size);
+ BFD_ASSERT (sofar == section->size);
if (buf != NULL)
free (buf);
@@ -827,17 +772,16 @@ srec_read_section (abfd, section, contents)
/* Get the contents of a section in an S-record file. */
static bfd_boolean
-srec_get_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- asection *section;
- PTR location;
- file_ptr offset;
- bfd_size_type count;
+srec_get_section_contents (bfd *abfd,
+ asection *section,
+ void * location,
+ file_ptr offset,
+ bfd_size_type count)
{
if (section->used_by_bfd == NULL)
{
- section->used_by_bfd = bfd_alloc (abfd, section->_raw_size);
- if (section->used_by_bfd == NULL && section->_raw_size != 0)
+ section->used_by_bfd = bfd_alloc (abfd, section->size);
+ if (section->used_by_bfd == NULL && section->size != 0)
return FALSE;
if (! srec_read_section (abfd, section, section->used_by_bfd))
@@ -853,34 +797,28 @@ srec_get_section_contents (abfd, section, location, offset, count)
/* Set the architecture. We accept an unknown architecture here. */
static bfd_boolean
-srec_set_arch_mach (abfd, arch, mach)
- bfd *abfd;
- enum bfd_architecture arch;
- unsigned long mach;
+srec_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long mach)
{
- if (arch == bfd_arch_unknown)
- {
- abfd->arch_info = &bfd_default_arch_struct;
- return TRUE;
- }
- return bfd_default_set_arch_mach (abfd, arch, mach);
+ if (arch != bfd_arch_unknown)
+ return bfd_default_set_arch_mach (abfd, arch, mach);
+
+ abfd->arch_info = & bfd_default_arch_struct;
+ return TRUE;
}
/* We have to save up all the Srecords for a splurge before output. */
static bfd_boolean
-srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
- bfd *abfd;
- sec_ptr section;
- const PTR location;
- file_ptr offset;
- bfd_size_type bytes_to_do;
+srec_set_section_contents (bfd *abfd,
+ sec_ptr section,
+ const void * location,
+ file_ptr offset,
+ bfd_size_type bytes_to_do)
{
tdata_type *tdata = abfd->tdata.srec_data;
- register srec_data_list_type *entry;
+ srec_data_list_type *entry;
- entry = ((srec_data_list_type *)
- bfd_alloc (abfd, (bfd_size_type) sizeof (srec_data_list_type)));
+ entry = bfd_alloc (abfd, sizeof (* entry));
if (entry == NULL)
return FALSE;
@@ -890,10 +828,10 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
{
bfd_byte *data;
- data = (bfd_byte *) bfd_alloc (abfd, bytes_to_do);
+ data = bfd_alloc (abfd, bytes_to_do);
if (data == NULL)
return FALSE;
- memcpy ((PTR) data, location, (size_t) bytes_to_do);
+ memcpy ((void *) data, location, (size_t) bytes_to_do);
/* Ff S3Forced is TRUE then always select S3 records,
regardless of the siez of the addresses. */
@@ -922,7 +860,7 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
}
else
{
- register srec_data_list_type **look;
+ srec_data_list_type **look;
for (look = &tdata->head;
*look != NULL && (*look)->where < entry->where;
@@ -942,12 +880,11 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
here. */
static bfd_boolean
-srec_write_record (abfd, type, address, data, end)
- bfd *abfd;
- unsigned int type;
- bfd_vma address;
- const bfd_byte *data;
- const bfd_byte *end;
+srec_write_record (bfd *abfd,
+ unsigned int type,
+ bfd_vma address,
+ const bfd_byte *data,
+ const bfd_byte *end)
{
char buffer[2 * MAXCHUNK + 6];
unsigned int check_sum = 0;
@@ -998,14 +935,12 @@ srec_write_record (abfd, type, address, data, end)
*dst++ = '\r';
*dst++ = '\n';
wrlen = dst - buffer;
- if (bfd_bwrite ((PTR) buffer, wrlen, abfd) != wrlen)
- return FALSE;
- return TRUE;
+
+ return bfd_bwrite ((void *) buffer, wrlen, abfd) == wrlen;
}
static bfd_boolean
-srec_write_header (abfd)
- bfd *abfd;
+srec_write_header (bfd *abfd)
{
unsigned int len = strlen (abfd->filename);
@@ -1014,14 +949,14 @@ srec_write_header (abfd)
len = 40;
return srec_write_record (abfd, 0, (bfd_vma) 0,
- abfd->filename, abfd->filename + len);
+ (bfd_byte *) abfd->filename,
+ (bfd_byte *) abfd->filename + len);
}
static bfd_boolean
-srec_write_section (abfd, tdata, list)
- bfd *abfd;
- tdata_type *tdata;
- srec_data_list_type *list;
+srec_write_section (bfd *abfd,
+ tdata_type *tdata,
+ srec_data_list_type *list)
{
unsigned int octets_written = 0;
bfd_byte *location = list->data;
@@ -1062,17 +997,14 @@ srec_write_section (abfd, tdata, list)
}
static bfd_boolean
-srec_write_terminator (abfd, tdata)
- bfd *abfd;
- tdata_type *tdata;
+srec_write_terminator (bfd *abfd, tdata_type *tdata)
{
return srec_write_record (abfd, 10 - tdata->type,
abfd->start_address, NULL, NULL);
}
static bfd_boolean
-srec_write_symbols (abfd)
- bfd *abfd;
+srec_write_symbols (bfd *abfd)
{
/* Dump out the symbols of a bfd. */
int i;
@@ -1082,6 +1014,7 @@ srec_write_symbols (abfd)
{
bfd_size_type len;
asymbol **table = bfd_get_outsymbols (abfd);
+
len = strlen (abfd->filename);
if (bfd_bwrite ("$$ ", (bfd_size_type) 3, abfd) != 3
|| bfd_bwrite (abfd->filename, len, abfd) != len
@@ -1126,9 +1059,7 @@ srec_write_symbols (abfd)
}
static bfd_boolean
-internal_srec_write_object_contents (abfd, symbols)
- bfd *abfd;
- int symbols;
+internal_srec_write_object_contents (bfd *abfd, int symbols)
{
tdata_type *tdata = abfd->tdata.srec_data;
srec_data_list_type *list;
@@ -1155,23 +1086,20 @@ internal_srec_write_object_contents (abfd, symbols)
}
static bfd_boolean
-srec_write_object_contents (abfd)
- bfd *abfd;
+srec_write_object_contents (bfd *abfd)
{
return internal_srec_write_object_contents (abfd, 0);
}
static bfd_boolean
-symbolsrec_write_object_contents (abfd)
- bfd *abfd;
+symbolsrec_write_object_contents (bfd *abfd)
{
return internal_srec_write_object_contents (abfd, 1);
}
static int
-srec_sizeof_headers (abfd, exec)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_boolean exec ATTRIBUTE_UNUSED;
+srec_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_boolean exec ATTRIBUTE_UNUSED)
{
return 0;
}
@@ -1179,8 +1107,7 @@ srec_sizeof_headers (abfd, exec)
/* Return the amount of memory needed to read the symbol table. */
static long
-srec_get_symtab_upper_bound (abfd)
- bfd *abfd;
+srec_get_symtab_upper_bound (bfd *abfd)
{
return (bfd_get_symcount (abfd) + 1) * sizeof (asymbol *);
}
@@ -1188,9 +1115,7 @@ srec_get_symtab_upper_bound (abfd)
/* Return the symbol table. */
static long
-srec_canonicalize_symtab (abfd, alocation)
- bfd *abfd;
- asymbol **alocation;
+srec_canonicalize_symtab (bfd *abfd, asymbol **alocation)
{
bfd_size_type symcount = bfd_get_symcount (abfd);
asymbol *csymbols;
@@ -1202,7 +1127,7 @@ srec_canonicalize_symtab (abfd, alocation)
asymbol *c;
struct srec_symbol *s;
- csymbols = (asymbol *) bfd_alloc (abfd, symcount * sizeof (asymbol));
+ csymbols = bfd_alloc (abfd, symcount * sizeof (asymbol));
if (csymbols == NULL && symcount != 0)
return 0;
abfd->tdata.srec_data->csymbols = csymbols;
@@ -1228,94 +1153,88 @@ srec_canonicalize_symtab (abfd, alocation)
}
static void
-srec_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- asymbol *symbol;
- symbol_info *ret;
+srec_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
+ asymbol *symbol,
+ symbol_info *ret)
{
bfd_symbol_info (symbol, ret);
}
static void
-srec_print_symbol (abfd, afile, symbol, how)
- bfd *abfd;
- PTR afile;
- asymbol *symbol;
- bfd_print_symbol_type how;
+srec_print_symbol (bfd *abfd,
+ void * afile,
+ asymbol *symbol,
+ bfd_print_symbol_type how)
{
FILE *file = (FILE *) afile;
+
switch (how)
{
case bfd_print_symbol_name:
fprintf (file, "%s", symbol->name);
break;
default:
- bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
+ bfd_print_symbol_vandf (abfd, (void *) file, symbol);
fprintf (file, " %-5s %s",
symbol->section->name,
symbol->name);
-
}
}
-#define srec_close_and_cleanup _bfd_generic_close_and_cleanup
-#define srec_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
-#define srec_new_section_hook _bfd_generic_new_section_hook
-
-#define srec_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define srec_get_lineno _bfd_nosymbols_get_lineno
-#define srec_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define srec_make_empty_symbol _bfd_generic_make_empty_symbol
-#define srec_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define srec_read_minisymbols _bfd_generic_read_minisymbols
-#define srec_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
-
-#define srec_get_reloc_upper_bound \
- ((long (*) PARAMS ((bfd *, asection *))) bfd_0l)
-#define srec_canonicalize_reloc \
- ((long (*) PARAMS ((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
-#define srec_bfd_gc_sections bfd_generic_gc_sections
-#define srec_bfd_merge_sections bfd_generic_merge_sections
-#define srec_bfd_discard_group bfd_generic_discard_group
-#define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
-#define srec_bfd_link_just_syms _bfd_generic_link_just_syms
-#define srec_bfd_final_link _bfd_generic_final_link
-#define srec_bfd_link_split_section _bfd_generic_link_split_section
+#define srec_close_and_cleanup _bfd_generic_close_and_cleanup
+#define srec_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
+#define srec_new_section_hook _bfd_generic_new_section_hook
+#define srec_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
+#define srec_bfd_is_local_label_name bfd_generic_is_local_label_name
+#define srec_get_lineno _bfd_nosymbols_get_lineno
+#define srec_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define srec_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define srec_make_empty_symbol _bfd_generic_make_empty_symbol
+#define srec_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
+#define srec_read_minisymbols _bfd_generic_read_minisymbols
+#define srec_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
+#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
+#define srec_bfd_gc_sections bfd_generic_gc_sections
+#define srec_bfd_merge_sections bfd_generic_merge_sections
+#define srec_bfd_is_group_section bfd_generic_is_group_section
+#define srec_bfd_discard_group bfd_generic_discard_group
+#define srec_section_already_linked _bfd_generic_section_already_linked
+#define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
+#define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
+#define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define srec_bfd_link_just_syms _bfd_generic_link_just_syms
+#define srec_bfd_final_link _bfd_generic_final_link
+#define srec_bfd_link_split_section _bfd_generic_link_split_section
const bfd_target srec_vec =
{
- "srec", /* name */
+ "srec", /* Name. */
bfd_target_srec_flavour,
- BFD_ENDIAN_UNKNOWN, /* target byte order */
- BFD_ENDIAN_UNKNOWN, /* target headers byte order */
- (HAS_RELOC | EXEC_P | /* object flags */
+ BFD_ENDIAN_UNKNOWN, /* Target byte order. */
+ BFD_ENDIAN_UNKNOWN, /* Target headers byte order. */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_CODE | SEC_DATA | SEC_ROM | SEC_HAS_CONTENTS
- | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading underscore */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
+ | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ 0, /* Leading underscore. */
+ ' ', /* AR_pad_char. */
+ 16, /* AR_max_namelen. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Hdrs. */
{
_bfd_dummy_target,
- srec_object_p, /* bfd_check_format */
+ srec_object_p, /* bfd_check_format. */
_bfd_dummy_target,
_bfd_dummy_target,
},
@@ -1325,7 +1244,7 @@ const bfd_target srec_vec =
_bfd_generic_mkarchive,
bfd_false,
},
- { /* bfd_write_contents */
+ { /* bfd_write_contents. */
bfd_false,
srec_write_object_contents,
_bfd_write_archive_contents,
@@ -1344,33 +1263,33 @@ const bfd_target srec_vec =
NULL,
- (PTR) 0
+ NULL
};
const bfd_target symbolsrec_vec =
{
- "symbolsrec", /* name */
+ "symbolsrec", /* Name. */
bfd_target_srec_flavour,
- BFD_ENDIAN_UNKNOWN, /* target byte order */
- BFD_ENDIAN_UNKNOWN, /* target headers byte order */
- (HAS_RELOC | EXEC_P | /* object flags */
+ BFD_ENDIAN_UNKNOWN, /* Target byte order. */
+ BFD_ENDIAN_UNKNOWN, /* Target headers byte order. */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_CODE | SEC_DATA | SEC_ROM | SEC_HAS_CONTENTS
- | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading underscore */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
+ | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ 0, /* Leading underscore. */
+ ' ', /* AR_pad_char. */
+ 16, /* AR_max_namelen. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
{
_bfd_dummy_target,
- symbolsrec_object_p, /* bfd_check_format */
+ symbolsrec_object_p, /* bfd_check_format. */
_bfd_dummy_target,
_bfd_dummy_target,
},
@@ -1380,7 +1299,7 @@ const bfd_target symbolsrec_vec =
_bfd_generic_mkarchive,
bfd_false,
},
- { /* bfd_write_contents */
+ { /* bfd_write_contents. */
bfd_false,
symbolsrec_write_object_contents,
_bfd_write_archive_contents,
@@ -1399,5 +1318,5 @@ const bfd_target symbolsrec_vec =
NULL,
- (PTR) 0
+ NULL
};
diff --git a/contrib/binutils/bfd/stab-syms.c b/contrib/binutils/bfd/stab-syms.c
index a685e31eb818..c577e1f4178f 100644
--- a/contrib/binutils/bfd/stab-syms.c
+++ b/contrib/binutils/bfd/stab-syms.c
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
diff --git a/contrib/binutils/bfd/stabs.c b/contrib/binutils/bfd/stabs.c
index 04b91f680045..ba3f93446193 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
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file contains support for linking stabs in sections, as used
on COFF and ELF. */
@@ -41,19 +41,12 @@
the string table for this unit, and the desc field is the number of
stabs symbols for this unit. */
-#define STRDXOFF (0)
-#define TYPEOFF (4)
-#define OTHEROFF (5)
-#define DESCOFF (6)
-#define VALOFF (8)
-#define STABSIZE (12)
-
-/* A hash table used for header files with N_BINCL entries. */
-
-struct stab_link_includes_table
-{
- struct bfd_hash_table root;
-};
+#define STRDXOFF 0
+#define TYPEOFF 4
+#define OTHEROFF 5
+#define DESCOFF 6
+#define VALOFF 8
+#define STABSIZE 12
/* A linked list of totals that we have found for a particular header
file. A total is a unique identifier for a particular BINCL...EINCL
@@ -80,12 +73,6 @@ struct stab_link_includes_entry
struct stab_link_includes_totals *totals;
};
-/* Look up an entry in an the header file hash table. */
-
-#define stab_link_includes_lookup(table, string, create, copy) \
- ((struct stab_link_includes_entry *) \
- bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
-
/* This structure is used to hold a list of N_BINCL symbols, some of
which might be converted into N_EXCL symbols. */
@@ -124,50 +111,31 @@ struct stab_section_info
bfd_size_type stridxs[1];
};
-/* This structure is used to keep track of stabs in sections
- information while linking. */
-
-struct stab_info
-{
- /* A hash table used to hold stabs strings. */
- struct bfd_strtab_hash *strings;
- /* The header file hash table. */
- struct stab_link_includes_table includes;
- /* The first .stabstr section. */
- asection *stabstr;
-};
-
-static struct bfd_hash_entry *stab_link_includes_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
/* The function to create a new entry in the header file hash table. */
static struct bfd_hash_entry *
-stab_link_includes_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+stab_link_includes_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct stab_link_includes_entry *ret =
(struct stab_link_includes_entry *) entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct stab_link_includes_entry *) NULL)
- ret = ((struct stab_link_includes_entry *)
- bfd_hash_allocate (table,
- sizeof (struct stab_link_includes_entry)));
- if (ret == (struct stab_link_includes_entry *) NULL)
- return (struct bfd_hash_entry *) ret;
+ if (ret == NULL)
+ ret = bfd_hash_allocate (table,
+ sizeof (struct stab_link_includes_entry));
+ if (ret == NULL)
+ return NULL;
/* Call the allocation method of the superclass. */
ret = ((struct stab_link_includes_entry *)
bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
if (ret)
- {
- /* Set local fields. */
- ret->totals = NULL;
- }
+ /* Set local fields. */
+ ret->totals = NULL;
return (struct bfd_hash_entry *) ret;
}
@@ -176,16 +144,14 @@ stab_link_includes_newfunc (entry, table, string)
pass of the linker. */
bfd_boolean
-_bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_offset)
- bfd *abfd;
- PTR *psinfo;
- asection *stabsec;
- asection *stabstrsec;
- PTR *psecinfo;
- bfd_size_type *pstring_offset;
+_bfd_link_section_stabs (bfd *abfd,
+ struct stab_info *sinfo,
+ asection *stabsec,
+ asection *stabstrsec,
+ void * *psecinfo,
+ bfd_size_type *pstring_offset)
{
bfd_boolean first;
- struct stab_info *sinfo;
bfd_size_type count, amt;
struct stab_section_info *secinfo;
bfd_byte *stabbuf = NULL;
@@ -194,67 +160,54 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
bfd_size_type stroff, next_stroff, skip;
bfd_size_type *pstridx;
- if (stabsec->_raw_size == 0
- || stabstrsec->_raw_size == 0)
- {
- /* This file does not contain stabs debugging information. */
- return TRUE;
- }
+ if (stabsec->size == 0
+ || stabstrsec->size == 0)
+ /* This file does not contain stabs debugging information. */
+ return TRUE;
- if (stabsec->_raw_size % STABSIZE != 0)
- {
- /* Something is wrong with the format of these stab symbols.
- Don't try to optimize them. */
- return TRUE;
- }
+ if (stabsec->size % STABSIZE != 0)
+ /* Something is wrong with the format of these stab symbols.
+ Don't try to optimize them. */
+ return TRUE;
if ((stabstrsec->flags & SEC_RELOC) != 0)
- {
- /* We shouldn't see relocations in the strings, and we aren't
- prepared to handle them. */
- return TRUE;
- }
+ /* We shouldn't see relocations in the strings, and we aren't
+ 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)))
- {
- /* At least one of the sections is being discarded from the
- link, so we should just ignore them. */
- return TRUE;
- }
+ /* At least one of the sections is being discarded from the
+ link, so we should just ignore them. */
+ return TRUE;
first = FALSE;
- if (*psinfo == NULL)
+ if (sinfo->stabstr == NULL)
{
/* Initialize the stabs information we need to keep track of. */
first = TRUE;
- amt = sizeof (struct stab_info);
- *psinfo = (PTR) bfd_alloc (abfd, amt);
- if (*psinfo == NULL)
- goto error_return;
- sinfo = (struct stab_info *) *psinfo;
sinfo->strings = _bfd_stringtab_init ();
if (sinfo->strings == NULL)
goto error_return;
/* Make sure the first byte is zero. */
(void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
- if (! bfd_hash_table_init_n (&sinfo->includes.root,
- stab_link_includes_newfunc,
- 251))
+ if (! bfd_hash_table_init (&sinfo->includes,
+ stab_link_includes_newfunc,
+ sizeof (struct stab_link_includes_entry)))
goto error_return;
sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
- sinfo->stabstr->flags |= SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING;
+ if (sinfo->stabstr == NULL)
+ goto error_return;
+ sinfo->stabstr->flags |= (SEC_HAS_CONTENTS | SEC_READONLY
+ | SEC_DEBUGGING | SEC_LINKER_CREATED);
}
- sinfo = (struct stab_info *) *psinfo;
-
/* Initialize the information we are going to store for this .stab
section. */
-
- count = stabsec->_raw_size / STABSIZE;
+ count = stabsec->size / STABSIZE;
amt = sizeof (struct stab_section_info);
amt += (count - 1) * sizeof (bfd_size_type);
@@ -264,25 +217,17 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
secinfo = (struct stab_section_info *) *psecinfo;
secinfo->excls = NULL;
+ stabsec->rawsize = stabsec->size;
secinfo->cumulative_skips = NULL;
memset (secinfo->stridxs, 0, (size_t) count * sizeof (bfd_size_type));
/* Read the stabs information from abfd. */
-
- stabbuf = (bfd_byte *) bfd_malloc (stabsec->_raw_size);
- stabstrbuf = (bfd_byte *) bfd_malloc (stabstrsec->_raw_size);
- if (stabbuf == NULL || stabstrbuf == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, stabsec, stabbuf, (bfd_vma) 0,
- stabsec->_raw_size)
- || ! bfd_get_section_contents (abfd, stabstrsec, stabstrbuf, (bfd_vma) 0,
- stabstrsec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, stabsec, &stabbuf)
+ || !bfd_malloc_and_get_section (abfd, stabstrsec, &stabstrbuf))
goto error_return;
/* Look through the stabs symbols, work out the new string indices,
and identify N_BINCL symbols which can be eliminated. */
-
stroff = 0;
/* The stabs sections can be split when
-split-by-reloc/-split-by-file is used. We must keep track of
@@ -291,7 +236,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
next_stroff = pstring_offset ? *pstring_offset : 0;
skip = 0;
- symend = stabbuf + stabsec->_raw_size;
+ symend = stabbuf + stabsec->size;
for (sym = stabbuf, pstridx = secinfo->stridxs;
sym < symend;
sym += STABSIZE, ++pstridx)
@@ -301,10 +246,8 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
const char *string;
if (*pstridx != 0)
- {
- /* This symbol has already been handled by an N_BINCL pass. */
- continue;
- }
+ /* This symbol has already been handled by an N_BINCL pass. */
+ continue;
type = sym[TYPEOFF];
@@ -327,13 +270,11 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
/* Store the string in the hash table, and record the index. */
symstroff = stroff + bfd_get_32 (abfd, sym + STRDXOFF);
- if (symstroff >= stabstrsec->_raw_size)
+ if (symstroff >= stabstrsec->size)
{
(*_bfd_error_handler)
- (_("%s(%s+0x%lx): Stabs entry has invalid string index."),
- bfd_archive_filename (abfd),
- bfd_get_section_name (abfd, stabsec),
- (long) (sym - stabbuf));
+ (_("%B(%A+0x%lx): Stabs entry has invalid string index."),
+ abfd, stabsec, (long) (sym - stabbuf));
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -417,8 +358,8 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
/* If we have already included a header file with the same
value, then replaced this one with an N_EXCL symbol. */
- incl_entry = stab_link_includes_lookup (&sinfo->includes, string,
- TRUE, TRUE);
+ incl_entry = (struct stab_link_includes_entry * )
+ bfd_hash_lookup (&sinfo->includes, string, TRUE, TRUE);
if (incl_entry == NULL)
goto error_return;
@@ -431,7 +372,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
/* Record this symbol, so that we can set the value
correctly. */
amt = sizeof *ne;
- ne = (struct stab_excl_list *) bfd_alloc (abfd, amt);
+ ne = bfd_alloc (abfd, amt);
if (ne == NULL)
goto error_return;
ne->offset = sym - stabbuf;
@@ -444,8 +385,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
{
/* This is the first time we have seen this header file
with this set of stabs strings. */
- t = ((struct stab_link_includes_totals *)
- bfd_hash_allocate (&sinfo->includes.root, sizeof *t));
+ t = bfd_hash_allocate (&sinfo->includes, sizeof *t);
if (t == NULL)
goto error_return;
t->sum_chars = sum_chars;
@@ -513,11 +453,11 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
from the link. We record the size of the strtab in the first
.stabstr section we saw, and make sure we don't set SEC_EXCLUDE
for that section. */
- stabsec->_cooked_size = (count - skip) * STABSIZE;
- if (stabsec->_cooked_size == 0)
+ stabsec->size = (count - skip) * STABSIZE;
+ if (stabsec->size == 0)
stabsec->flags |= SEC_EXCLUDE;
stabstrsec->flags |= SEC_EXCLUDE;
- sinfo->stabstr->_cooked_size = _bfd_stringtab_size (sinfo->strings);
+ sinfo->stabstr->size = _bfd_stringtab_size (sinfo->strings);
/* Calculate the `cumulative_skips' array now that stabs have been
deleted for this section. */
@@ -528,7 +468,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
bfd_size_type *pskips;
amt = count * sizeof (bfd_size_type);
- secinfo->cumulative_skips = (bfd_size_type *) bfd_alloc (abfd, amt);
+ secinfo->cumulative_skips = bfd_alloc (abfd, amt);
if (secinfo->cumulative_skips == NULL)
goto error_return;
@@ -555,7 +495,6 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
free (stabstrbuf);
return FALSE;
}
-
/* This function is called for each input file before the stab
section is relocated. It discards stab entries for discarded
@@ -564,13 +503,11 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_of
*/
bfd_boolean
-_bfd_discard_section_stabs (abfd, stabsec, psecinfo,
- reloc_symbol_deleted_p, cookie)
- bfd *abfd;
- asection *stabsec;
- PTR psecinfo;
- bfd_boolean (*reloc_symbol_deleted_p) PARAMS ((bfd_vma, PTR));
- PTR cookie;
+_bfd_discard_section_stabs (bfd *abfd,
+ asection *stabsec,
+ void * psecinfo,
+ bfd_boolean (*reloc_symbol_deleted_p) (bfd_vma, void *),
+ void * cookie)
{
bfd_size_type count, amt;
struct stab_section_info *secinfo;
@@ -580,26 +517,20 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
bfd_size_type *pstridx;
int deleting;
- if (stabsec->_raw_size == 0)
- {
- /* This file does not contain stabs debugging information. */
- return FALSE;
- }
+ if (stabsec->size == 0)
+ /* This file does not contain stabs debugging information. */
+ return FALSE;
- if (stabsec->_raw_size % STABSIZE != 0)
- {
- /* Something is wrong with the format of these stab symbols.
- Don't try to optimize them. */
- return FALSE;
- }
+ if (stabsec->size % STABSIZE != 0)
+ /* Something is wrong with the format of these stab symbols.
+ Don't try to optimize them. */
+ return FALSE;
if ((stabsec->output_section != NULL
&& bfd_is_abs_section (stabsec->output_section)))
- {
- /* At least one of the sections is being discarded from the
- link, so we should just ignore them. */
- return FALSE;
- }
+ /* At least one of the sections is being discarded from the
+ link, so we should just ignore them. */
+ return FALSE;
/* We should have initialized our data in _bfd_link_stab_sections.
If there was some bizarre error reading the string sections, though,
@@ -607,26 +538,19 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
if (psecinfo == NULL)
return FALSE;
- count = stabsec->_raw_size / STABSIZE;
+ count = stabsec->rawsize / STABSIZE;
secinfo = (struct stab_section_info *) psecinfo;
/* Read the stabs information from abfd. */
-
- stabbuf = (bfd_byte *) bfd_malloc (stabsec->_raw_size);
- if (stabbuf == NULL)
- goto error_return;
-
- if (! bfd_get_section_contents (abfd, stabsec, stabbuf, (bfd_vma) 0,
- stabsec->_raw_size))
+ if (!bfd_malloc_and_get_section (abfd, stabsec, &stabbuf))
goto error_return;
/* Look through the stabs symbols and discard any information for
discarded functions. */
-
skip = 0;
deleting = -1;
- symend = stabbuf + stabsec->_raw_size;
+ symend = stabbuf + stabsec->rawsize;
for (sym = stabbuf, pstridx = secinfo->stridxs;
sym < symend;
sym += STABSIZE, ++pstridx)
@@ -634,10 +558,8 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
int type;
if (*pstridx == (bfd_size_type) -1)
- {
- /* This stab was deleted in a previous pass. */
- continue;
- }
+ /* This stab was deleted in a previous pass. */
+ continue;
type = sym[TYPEOFF];
@@ -684,8 +606,8 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
stabbuf = NULL;
/* Shrink the stabsec as needed. */
- stabsec->_cooked_size -= skip * STABSIZE;
- if (stabsec->_cooked_size == 0)
+ stabsec->size -= skip * STABSIZE;
+ if (stabsec->size == 0)
stabsec->flags |= SEC_EXCLUDE;
/* Recalculate the `cumulative_skips' array now that stabs have been
@@ -699,7 +621,7 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
if (secinfo->cumulative_skips == NULL)
{
amt = count * sizeof (bfd_size_type);
- secinfo->cumulative_skips = (bfd_size_type *) bfd_alloc (abfd, amt);
+ secinfo->cumulative_skips = bfd_alloc (abfd, amt);
if (secinfo->cumulative_skips == NULL)
goto error_return;
}
@@ -730,34 +652,30 @@ _bfd_discard_section_stabs (abfd, stabsec, psecinfo,
contents. */
bfd_boolean
-_bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
- bfd *output_bfd;
- PTR *psinfo;
- asection *stabsec;
- PTR *psecinfo;
- bfd_byte *contents;
+_bfd_write_section_stabs (bfd *output_bfd,
+ struct stab_info *sinfo,
+ asection *stabsec,
+ void * *psecinfo,
+ bfd_byte *contents)
{
- struct stab_info *sinfo;
struct stab_section_info *secinfo;
struct stab_excl_list *e;
bfd_byte *sym, *tosym, *symend;
bfd_size_type *pstridx;
- sinfo = (struct stab_info *) *psinfo;
secinfo = (struct stab_section_info *) *psecinfo;
if (secinfo == NULL)
return bfd_set_section_contents (output_bfd, stabsec->output_section,
- contents,
- (file_ptr) stabsec->output_offset,
- stabsec->_raw_size);
+ contents, stabsec->output_offset,
+ stabsec->size);
/* Handle each N_BINCL entry. */
for (e = secinfo->excls; e != NULL; e = e->next)
{
bfd_byte *excl_sym;
- BFD_ASSERT (e->offset < stabsec->_raw_size);
+ BFD_ASSERT (e->offset < stabsec->rawsize);
excl_sym = contents + e->offset;
bfd_put_32 (output_bfd, e->val, excl_sym + VALOFF);
excl_sym[TYPEOFF] = e->type;
@@ -766,7 +684,7 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
/* Copy over all the stabs symbols, omitting the ones we don't want,
and correcting the string indices for those we do want. */
tosym = contents;
- symend = contents + stabsec->_raw_size;
+ symend = contents + stabsec->rawsize;
for (sym = contents, pstridx = secinfo->stridxs;
sym < symend;
sym += STABSIZE, ++pstridx)
@@ -787,7 +705,7 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
bfd_put_32 (output_bfd, _bfd_stringtab_size (sinfo->strings),
tosym + VALOFF);
bfd_put_16 (output_bfd,
- stabsec->output_section->_raw_size / STABSIZE - 1,
+ stabsec->output_section->size / STABSIZE - 1,
tosym + DESCOFF);
}
@@ -795,36 +713,25 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
}
}
- BFD_ASSERT ((bfd_size_type) (tosym - contents) == stabsec->_cooked_size);
+ BFD_ASSERT ((bfd_size_type) (tosym - contents) == stabsec->size);
return bfd_set_section_contents (output_bfd, stabsec->output_section,
contents, (file_ptr) stabsec->output_offset,
- stabsec->_cooked_size);
+ stabsec->size);
}
/* Write out the .stabstr section. */
bfd_boolean
-_bfd_write_stab_strings (output_bfd, psinfo)
- bfd *output_bfd;
- PTR *psinfo;
+_bfd_write_stab_strings (bfd *output_bfd, struct stab_info *sinfo)
{
- struct stab_info *sinfo;
-
- sinfo = (struct stab_info *) *psinfo;
-
- if (sinfo == NULL)
- return TRUE;
-
if (bfd_is_abs_section (sinfo->stabstr->output_section))
- {
- /* The section was discarded from the link. */
- return TRUE;
- }
+ /* The section was discarded from the link. */
+ return TRUE;
BFD_ASSERT ((sinfo->stabstr->output_offset
+ _bfd_stringtab_size (sinfo->strings))
- <= sinfo->stabstr->output_section->_raw_size);
+ <= sinfo->stabstr->output_section->size);
if (bfd_seek (output_bfd,
(file_ptr) (sinfo->stabstr->output_section->filepos
@@ -837,7 +744,7 @@ _bfd_write_stab_strings (output_bfd, psinfo)
/* We no longer need the stabs information. */
_bfd_stringtab_free (sinfo->strings);
- bfd_hash_table_free (&sinfo->includes.root);
+ bfd_hash_table_free (&sinfo->includes);
return TRUE;
}
@@ -847,22 +754,19 @@ _bfd_write_stab_strings (output_bfd, psinfo)
or -1 if the address refers to a stab which has been removed. */
bfd_vma
-_bfd_stab_section_offset (output_bfd, psinfo, stabsec, psecinfo, offset)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- PTR *psinfo ATTRIBUTE_UNUSED;
- asection *stabsec;
- PTR *psecinfo;
- bfd_vma offset;
+_bfd_stab_section_offset (asection *stabsec,
+ void * psecinfo,
+ bfd_vma offset)
{
struct stab_section_info *secinfo;
- secinfo = (struct stab_section_info *) *psecinfo;
+ secinfo = (struct stab_section_info *) psecinfo;
if (secinfo == NULL)
return offset;
- if (offset >= stabsec->_raw_size)
- return offset - (stabsec->_cooked_size - stabsec->_raw_size);
+ if (offset >= stabsec->rawsize)
+ return offset - stabsec->rawsize + stabsec->size;
if (secinfo->cumulative_skips)
{
diff --git a/contrib/binutils/bfd/sunos.c b/contrib/binutils/bfd/sunos.c
index 5b1b18b9d760..024320fbfa18 100644
--- a/contrib/binutils/bfd/sunos.c
+++ b/contrib/binutils/bfd/sunos.c
@@ -1,23 +1,23 @@
/* BFD backend for SunOS binaries.
- Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGETNAME "a.out-sunos-big"
@@ -30,59 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
#include "libaout.h"
-/* Static routines defined in this file. */
-
-static bfd_boolean sunos_read_dynamic_info PARAMS ((bfd *));
-static long sunos_get_dynamic_symtab_upper_bound PARAMS ((bfd *));
-static bfd_boolean sunos_slurp_dynamic_symtab PARAMS ((bfd *));
-static long sunos_canonicalize_dynamic_symtab PARAMS ((bfd *, asymbol **));
-static long sunos_get_dynamic_reloc_upper_bound PARAMS ((bfd *));
-static long sunos_canonicalize_dynamic_reloc
- PARAMS ((bfd *, arelent **, asymbol **));
-static struct bfd_hash_entry *sunos_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_link_hash_table *sunos_link_hash_table_create
- PARAMS ((bfd *));
-static bfd_boolean sunos_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean));
-static bfd_boolean sunos_add_dynamic_symbols
- PARAMS ((bfd *, struct bfd_link_info *, struct external_nlist **,
- bfd_size_type *, char **));
-static bfd_boolean sunos_add_one_symbol
- PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword, asection *,
- bfd_vma, const char *, bfd_boolean, bfd_boolean,
- struct bfd_link_hash_entry **));
-static bfd_boolean sunos_scan_relocs
- PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_size_type));
-static bfd_boolean sunos_scan_std_relocs
- PARAMS ((struct bfd_link_info *, bfd *, asection *,
- const struct reloc_std_external *, bfd_size_type));
-static bfd_boolean sunos_scan_ext_relocs
- PARAMS ((struct bfd_link_info *, bfd *, asection *,
- const struct reloc_ext_external *, bfd_size_type));
-static bfd_boolean sunos_link_dynamic_object
- PARAMS ((struct bfd_link_info *, bfd *));
-static bfd_boolean sunos_write_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct aout_link_hash_entry *));
-static bfd_boolean sunos_check_dynamic_reloc
- PARAMS ((struct bfd_link_info *, bfd *, asection *,
- struct aout_link_hash_entry *, PTR, bfd_byte *, bfd_boolean *,
- bfd_vma *));
-static bfd_boolean sunos_finish_dynamic_link
- PARAMS ((bfd *, struct bfd_link_info *));
-
-#define MY_get_dynamic_symtab_upper_bound sunos_get_dynamic_symtab_upper_bound
-#define MY_canonicalize_dynamic_symtab sunos_canonicalize_dynamic_symtab
-#define MY_get_dynamic_reloc_upper_bound sunos_get_dynamic_reloc_upper_bound
-#define MY_canonicalize_dynamic_reloc sunos_canonicalize_dynamic_reloc
-#define MY_bfd_link_hash_table_create sunos_link_hash_table_create
-#define MY_add_dynamic_symbols sunos_add_dynamic_symbols
-#define MY_add_one_symbol sunos_add_one_symbol
-#define MY_link_dynamic_object sunos_link_dynamic_object
-#define MY_write_dynamic_symbol sunos_write_dynamic_symbol
-#define MY_check_dynamic_reloc sunos_check_dynamic_reloc
-#define MY_finish_dynamic_link sunos_finish_dynamic_link
-
/* ??? Where should this go? */
#define MACHTYPE_OK(mtype) \
(((mtype) == M_SPARC && bfd_lookup_arch (bfd_arch_sparc, 0) != NULL) \
@@ -93,6 +40,31 @@ static bfd_boolean sunos_finish_dynamic_link
|| (((mtype) == M_UNKNOWN || (mtype) == M_68010 || (mtype) == M_68020) \
&& bfd_lookup_arch (bfd_arch_m68k, 0) != NULL))
+#define MY_get_dynamic_symtab_upper_bound sunos_get_dynamic_symtab_upper_bound
+#define MY_canonicalize_dynamic_symtab sunos_canonicalize_dynamic_symtab
+#define MY_get_synthetic_symtab _bfd_nodynamic_get_synthetic_symtab
+#define MY_get_dynamic_reloc_upper_bound sunos_get_dynamic_reloc_upper_bound
+#define MY_canonicalize_dynamic_reloc sunos_canonicalize_dynamic_reloc
+#define MY_bfd_link_hash_table_create sunos_link_hash_table_create
+#define MY_add_dynamic_symbols sunos_add_dynamic_symbols
+#define MY_add_one_symbol sunos_add_one_symbol
+#define MY_link_dynamic_object sunos_link_dynamic_object
+#define MY_write_dynamic_symbol sunos_write_dynamic_symbol
+#define MY_check_dynamic_reloc sunos_check_dynamic_reloc
+#define MY_finish_dynamic_link sunos_finish_dynamic_link
+
+static bfd_boolean sunos_add_dynamic_symbols (bfd *, struct bfd_link_info *, struct external_nlist **, bfd_size_type *, char **);
+static bfd_boolean sunos_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 **);
+static bfd_boolean sunos_link_dynamic_object (struct bfd_link_info *, bfd *);
+static bfd_boolean sunos_write_dynamic_symbol (bfd *, struct bfd_link_info *, struct aout_link_hash_entry *);
+static bfd_boolean sunos_check_dynamic_reloc (struct bfd_link_info *, bfd *, asection *, struct aout_link_hash_entry *, void *, bfd_byte *, bfd_boolean *, bfd_vma *);
+static bfd_boolean sunos_finish_dynamic_link (bfd *, struct bfd_link_info *);
+static struct bfd_link_hash_table *sunos_link_hash_table_create (bfd *);
+static long sunos_get_dynamic_symtab_upper_bound (bfd *);
+static long sunos_canonicalize_dynamic_symtab (bfd *, asymbol **);
+static long sunos_get_dynamic_reloc_upper_bound (bfd *);
+static long sunos_canonicalize_dynamic_reloc (bfd *, arelent **, asymbol **);
+
/* Include the usual a.out support. */
#include "aoutf1.h"
@@ -120,7 +92,7 @@ struct sunos_dynamic_info
unsigned long dynrel_count;
/* Read in dynamic relocs. This may be reloc_std_external or
reloc_ext_external. */
- PTR dynrel;
+ void * dynrel;
/* arelent structures for dynamic relocs. */
arelent *canonical_dynrel;
};
@@ -137,8 +109,7 @@ struct sunos_dynamic_info
structure to FALSE to avoid doing this work again. */
static bfd_boolean
-sunos_read_dynamic_info (abfd)
- bfd *abfd;
+sunos_read_dynamic_info (bfd *abfd)
{
struct sunos_dynamic_info *info;
asection *dynsec;
@@ -148,7 +119,7 @@ sunos_read_dynamic_info (abfd)
struct external_sun4_dynamic_link linkinfo;
bfd_size_type amt;
- if (obj_aout_dynamic_info (abfd) != (PTR) NULL)
+ if (obj_aout_dynamic_info (abfd) != NULL)
return TRUE;
if ((abfd->flags & DYNAMIC) == 0)
@@ -158,7 +129,7 @@ sunos_read_dynamic_info (abfd)
}
amt = sizeof (struct sunos_dynamic_info);
- info = (struct sunos_dynamic_info *) bfd_zalloc (abfd, amt);
+ info = bfd_zalloc (abfd, amt);
if (!info)
return FALSE;
info->valid = FALSE;
@@ -167,7 +138,7 @@ sunos_read_dynamic_info (abfd)
info->canonical_dynsym = NULL;
info->dynrel = NULL;
info->canonical_dynrel = NULL;
- obj_aout_dynamic_info (abfd) = (PTR) info;
+ obj_aout_dynamic_info (abfd) = (void *) info;
/* This code used to look for the __DYNAMIC symbol to locate the dynamic
linking information.
@@ -178,7 +149,7 @@ sunos_read_dynamic_info (abfd)
symbols for the __DYNAMIC symbol. */
if ((abfd->flags & DYNAMIC) == 0)
return TRUE;
- if (! bfd_get_section_contents (abfd, obj_datasec (abfd), (PTR) &dyninfo,
+ if (! bfd_get_section_contents (abfd, obj_datasec (abfd), (void *) &dyninfo,
(file_ptr) 0,
(bfd_size_type) sizeof dyninfo))
return TRUE;
@@ -196,12 +167,12 @@ sunos_read_dynamic_info (abfd)
else
dynsec = obj_datasec (abfd);
dynoff -= bfd_get_section_vma (abfd, dynsec);
- if (dynoff > bfd_section_size (abfd, dynsec))
+ if (dynoff > dynsec->size)
return TRUE;
/* This executable appears to be dynamically linked in a way that we
can understand. */
- if (! bfd_get_section_contents (abfd, dynsec, (PTR) &linkinfo,
+ if (! bfd_get_section_contents (abfd, dynsec, (void *) &linkinfo,
(file_ptr) dynoff,
(bfd_size_type) sizeof linkinfo))
return TRUE;
@@ -259,8 +230,7 @@ sunos_read_dynamic_info (abfd)
/* Return the amount of memory required for the dynamic symbols. */
static long
-sunos_get_dynamic_symtab_upper_bound (abfd)
- bfd *abfd;
+sunos_get_dynamic_symtab_upper_bound (bfd *abfd)
{
struct sunos_dynamic_info *info;
@@ -280,8 +250,7 @@ sunos_get_dynamic_symtab_upper_bound (abfd)
/* Read the external dynamic symbols. */
static bfd_boolean
-sunos_slurp_dynamic_symtab (abfd)
- bfd *abfd;
+sunos_slurp_dynamic_symtab (bfd *abfd)
{
struct sunos_dynamic_info *info;
bfd_size_type amt;
@@ -301,14 +270,14 @@ sunos_slurp_dynamic_symtab (abfd)
}
/* Get the dynamic nlist structures. */
- if (info->dynsym == (struct external_nlist *) NULL)
+ if (info->dynsym == NULL)
{
amt = (bfd_size_type) info->dynsym_count * EXTERNAL_NLIST_SIZE;
- info->dynsym = (struct external_nlist *) bfd_alloc (abfd, amt);
+ info->dynsym = bfd_alloc (abfd, amt);
if (info->dynsym == NULL && info->dynsym_count != 0)
return FALSE;
if (bfd_seek (abfd, (file_ptr) info->dyninfo.ld_stab, SEEK_SET) != 0
- || bfd_bread ((PTR) info->dynsym, amt, abfd) != amt)
+ || bfd_bread ((void *) info->dynsym, amt, abfd) != amt)
{
if (info->dynsym != NULL)
{
@@ -320,14 +289,14 @@ sunos_slurp_dynamic_symtab (abfd)
}
/* Get the dynamic strings. */
- if (info->dynstr == (char *) NULL)
+ if (info->dynstr == NULL)
{
amt = info->dyninfo.ld_symb_size;
- info->dynstr = (char *) bfd_alloc (abfd, amt);
+ info->dynstr = bfd_alloc (abfd, amt);
if (info->dynstr == NULL && info->dyninfo.ld_symb_size != 0)
return FALSE;
if (bfd_seek (abfd, (file_ptr) info->dyninfo.ld_symbols, SEEK_SET) != 0
- || bfd_bread ((PTR) info->dynstr, amt, abfd) != amt)
+ || bfd_bread ((void *) info->dynstr, amt, abfd) != amt)
{
if (info->dynstr != NULL)
{
@@ -344,9 +313,7 @@ sunos_slurp_dynamic_symtab (abfd)
/* Read in the dynamic symbols. */
static long
-sunos_canonicalize_dynamic_symtab (abfd, storage)
- bfd *abfd;
- asymbol **storage;
+sunos_canonicalize_dynamic_symtab (bfd *abfd, asymbol **storage)
{
struct sunos_dynamic_info *info;
unsigned long i;
@@ -367,11 +334,11 @@ sunos_canonicalize_dynamic_symtab (abfd, storage)
if (info->dyninfo.ld_buckets > info->dynsym_count)
abort ();
table_size = info->dyninfo.ld_stab - info->dyninfo.ld_hash;
- table = (bfd_byte *) bfd_malloc (table_size);
+ table = bfd_malloc (table_size);
if (table == NULL && table_size != 0)
abort ();
if (bfd_seek (abfd, (file_ptr) info->dyninfo.ld_hash, SEEK_SET) != 0
- || bfd_bread ((PTR) table, table_size, abfd) != table_size)
+ || bfd_bread ((void *) table, table_size, abfd) != table_size)
abort ();
for (i = 0; i < info->dynsym_count; i++)
{
@@ -399,13 +366,13 @@ sunos_canonicalize_dynamic_symtab (abfd, storage)
/* Get the asymbol structures corresponding to the dynamic nlist
structures. */
- if (info->canonical_dynsym == (aout_symbol_type *) NULL)
+ if (info->canonical_dynsym == NULL)
{
bfd_size_type size;
bfd_size_type strsize = info->dyninfo.ld_symb_size;
size = (bfd_size_type) info->dynsym_count * sizeof (aout_symbol_type);
- info->canonical_dynsym = (aout_symbol_type *) bfd_alloc (abfd, size);
+ info->canonical_dynsym = bfd_alloc (abfd, size);
if (info->canonical_dynsym == NULL && info->dynsym_count != 0)
return -1;
@@ -434,8 +401,7 @@ sunos_canonicalize_dynamic_symtab (abfd, storage)
/* Return the amount of memory required for the dynamic relocs. */
static long
-sunos_get_dynamic_reloc_upper_bound (abfd)
- bfd *abfd;
+sunos_get_dynamic_reloc_upper_bound (bfd *abfd)
{
struct sunos_dynamic_info *info;
@@ -455,17 +421,14 @@ sunos_get_dynamic_reloc_upper_bound (abfd)
/* Read in the dynamic relocs. */
static long
-sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
- bfd *abfd;
- arelent **storage;
- asymbol **syms;
+sunos_canonicalize_dynamic_reloc (bfd *abfd, arelent **storage, asymbol **syms)
{
struct sunos_dynamic_info *info;
unsigned long i;
bfd_size_type size;
/* Get the general dynamic information. */
- if (obj_aout_dynamic_info (abfd) == (PTR) NULL)
+ if (obj_aout_dynamic_info (abfd) == NULL)
{
if (! sunos_read_dynamic_info (abfd))
return -1;
@@ -482,11 +445,11 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
if (info->dynrel == NULL)
{
size = (bfd_size_type) info->dynrel_count * obj_reloc_entry_size (abfd);
- info->dynrel = (PTR) bfd_alloc (abfd, size);
+ info->dynrel = bfd_alloc (abfd, size);
if (info->dynrel == NULL && size != 0)
return -1;
if (bfd_seek (abfd, (file_ptr) info->dyninfo.ld_rel, SEEK_SET) != 0
- || bfd_bread ((PTR) info->dynrel, size, abfd) != size)
+ || bfd_bread ((void *) info->dynrel, size, abfd) != size)
{
if (info->dynrel != NULL)
{
@@ -499,12 +462,12 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
/* Get the arelent structures corresponding to the dynamic reloc
information. */
- if (info->canonical_dynrel == (arelent *) NULL)
+ if (info->canonical_dynrel == NULL)
{
arelent *to;
size = (bfd_size_type) info->dynrel_count * sizeof (arelent);
- info->canonical_dynrel = (arelent *) bfd_alloc (abfd, size);
+ info->canonical_dynrel = bfd_alloc (abfd, size);
if (info->canonical_dynrel == NULL && info->dynrel_count != 0)
return -1;
@@ -512,25 +475,25 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
if (obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE)
{
- register struct reloc_ext_external *p;
+ struct reloc_ext_external *p;
struct reloc_ext_external *pend;
p = (struct reloc_ext_external *) info->dynrel;
pend = p + info->dynrel_count;
for (; p < pend; p++, to++)
- NAME(aout,swap_ext_reloc_in) (abfd, p, to, syms,
- (bfd_size_type) info->dynsym_count);
+ NAME (aout, swap_ext_reloc_in) (abfd, p, to, syms,
+ (bfd_size_type) info->dynsym_count);
}
else
{
- register struct reloc_std_external *p;
+ struct reloc_std_external *p;
struct reloc_std_external *pend;
p = (struct reloc_std_external *) info->dynrel;
pend = p + info->dynrel_count;
for (; p < pend; p++, to++)
- NAME(aout,swap_std_reloc_in) (abfd, p, to, syms,
- (bfd_size_type) info->dynsym_count);
+ NAME (aout, swap_std_reloc_in) (abfd, p, to, syms,
+ (bfd_size_type) info->dynsym_count);
}
}
@@ -675,25 +638,23 @@ struct sunos_link_hash_table
/* Routine to create an entry in an SunOS link hash table. */
static struct bfd_hash_entry *
-sunos_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+sunos_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct sunos_link_hash_entry *ret = (struct sunos_link_hash_entry *) entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct sunos_link_hash_entry *) NULL)
- ret = ((struct sunos_link_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct sunos_link_hash_entry)));
- if (ret == (struct sunos_link_hash_entry *) NULL)
- return (struct bfd_hash_entry *) ret;
+ if (ret == NULL)
+ ret = bfd_hash_allocate (table, sizeof (* ret));
+ if (ret == NULL)
+ return NULL;
/* Call the allocation method of the superclass. */
ret = ((struct sunos_link_hash_entry *)
- NAME(aout,link_hash_newfunc) ((struct bfd_hash_entry *) ret,
- table, string));
+ NAME (aout, link_hash_newfunc) ((struct bfd_hash_entry *) ret,
+ table, string));
if (ret != NULL)
{
/* Set local fields. */
@@ -710,20 +671,20 @@ sunos_link_hash_newfunc (entry, table, string)
/* Create a SunOS link hash table. */
static struct bfd_link_hash_table *
-sunos_link_hash_table_create (abfd)
- bfd *abfd;
+sunos_link_hash_table_create (bfd *abfd)
{
struct sunos_link_hash_table *ret;
bfd_size_type amt = sizeof (struct sunos_link_hash_table);
- ret = (struct sunos_link_hash_table *) bfd_malloc (amt);
- if (ret == (struct sunos_link_hash_table *) NULL)
- return (struct bfd_link_hash_table *) NULL;
- if (! NAME(aout,link_hash_table_init) (&ret->root, abfd,
- sunos_link_hash_newfunc))
+ ret = bfd_malloc (amt);
+ if (ret == NULL)
+ return NULL;
+ if (!NAME (aout, link_hash_table_init) (&ret->root, abfd,
+ sunos_link_hash_newfunc,
+ sizeof (struct sunos_link_hash_entry)))
{
free (ret);
- return (struct bfd_link_hash_table *) NULL;
+ return NULL;
}
ret->dynobj = NULL;
@@ -750,7 +711,7 @@ sunos_link_hash_table_create (abfd)
#define sunos_link_hash_traverse(table, func, info) \
(aout_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct aout_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct aout_link_hash_entry *, void *)) (func), \
(info)))
/* Get the SunOS link hash table from the info structure. This is
@@ -758,9 +719,6 @@ sunos_link_hash_table_create (abfd)
#define sunos_hash_table(p) ((struct sunos_link_hash_table *) ((p)->hash))
-static bfd_boolean sunos_scan_dynamic_symbol
- PARAMS ((struct sunos_link_hash_entry *, PTR));
-
/* Create the dynamic sections needed if we are linking against a
dynamic object, or if we are linking PIC compiled code. ABFD is a
bfd we can attach the dynamic sections to. The linker script will
@@ -769,10 +727,9 @@ static bfd_boolean sunos_scan_dynamic_symbol
of the dynamic linking information. */
static bfd_boolean
-sunos_create_dynamic_sections (abfd, info, needed)
- bfd *abfd;
- struct bfd_link_info *info;
- bfd_boolean needed;
+sunos_create_dynamic_sections (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean needed)
{
asection *s;
@@ -853,8 +810,8 @@ sunos_create_dynamic_sections (abfd, info, needed)
dynobj = sunos_hash_table (info)->dynobj;
s = bfd_get_section_by_name (dynobj, ".got");
- if (s->_raw_size == 0)
- s->_raw_size = BYTES_IN_WORD;
+ if (s->size == 0)
+ s->size = BYTES_IN_WORD;
sunos_hash_table (info)->dynamic_sections_needed = TRUE;
sunos_hash_table (info)->got_needed = TRUE;
@@ -867,17 +824,15 @@ sunos_create_dynamic_sections (abfd, info, needed)
backend linker for each object it encounters. */
static bfd_boolean
-sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
- bfd *abfd;
- struct bfd_link_info *info;
- struct external_nlist **symsp;
- bfd_size_type *sym_countp;
- char **stringsp;
+sunos_add_dynamic_symbols (bfd *abfd,
+ struct bfd_link_info *info,
+ struct external_nlist **symsp,
+ bfd_size_type *sym_countp,
+ char **stringsp)
{
bfd *dynobj;
struct sunos_dynamic_info *dinfo;
unsigned long need;
- asection **ps;
/* Make sure we have all the required sections. */
if (info->hash->creator == abfd->xvec)
@@ -901,12 +856,17 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
want, because that one still implies that the section takes up
space in the output file. If this is the first object we have
seen, we must preserve the dynamic sections we just created. */
- for (ps = &abfd->sections; *ps != NULL; )
+ if (abfd != dynobj)
+ abfd->sections = NULL;
+ else
{
- if (abfd != dynobj || ((*ps)->flags & SEC_LINKER_CREATED) == 0)
- bfd_section_list_remove (abfd, ps);
- else
- ps = &(*ps)->next;
+ asection *s;
+
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ bfd_section_list_remove (abfd, s);
+ }
}
/* The native linker seems to just ignore dynamic objects when -r is
@@ -987,7 +947,6 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
/* For the format of an ld_need entry, see aout/sun4.h. We
should probably define structs for this manipulation. */
-
name = bfd_get_32 (abfd, buf);
flags = bfd_get_32 (abfd, buf + 4);
major_vno = (unsigned short) bfd_get_16 (abfd, buf + 8);
@@ -995,14 +954,14 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
need = bfd_get_32 (abfd, buf + 12);
alc = sizeof (struct bfd_link_needed_list);
- needed = (struct bfd_link_needed_list *) bfd_alloc (abfd, alc);
+ needed = bfd_alloc (abfd, alc);
if (needed == NULL)
return FALSE;
needed->by = abfd;
/* We return the name as [-l]name[.maj][.min]. */
alc = 30;
- namebuf = (char *) bfd_malloc (alc + 1);
+ namebuf = bfd_malloc (alc + 1);
if (namebuf == NULL)
return FALSE;
p = namebuf;
@@ -1031,7 +990,7 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
char *n;
alc *= 2;
- n = (char *) bfd_realloc (namebuf, alc + 1);
+ n = bfd_realloc (namebuf, alc + 1);
if (n == NULL)
{
free (namebuf);
@@ -1063,7 +1022,7 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
char *n;
alc = (p - namebuf) + strlen (majbuf) + strlen (minbuf);
- n = (char *) bfd_realloc (namebuf, alc + 1);
+ n = bfd_realloc (namebuf, alc + 1);
if (n == NULL)
{
free (namebuf);
@@ -1104,18 +1063,16 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
tweaking needed for dynamic linking support. */
static bfd_boolean
-sunos_add_one_symbol (info, abfd, name, flags, section, value, string,
- copy, collect, hashp)
- struct bfd_link_info *info;
- bfd *abfd;
- const char *name;
- flagword flags;
- asection *section;
- bfd_vma value;
- const char *string;
- bfd_boolean copy;
- bfd_boolean collect;
- struct bfd_link_hash_entry **hashp;
+sunos_add_one_symbol (struct bfd_link_info *info,
+ bfd *abfd,
+ const char *name,
+ flagword flags,
+ asection *section,
+ bfd_vma value,
+ const char *string,
+ bfd_boolean copy,
+ bfd_boolean collect,
+ struct bfd_link_hash_entry **hashp)
{
struct sunos_link_hash_entry *h;
int new_flag;
@@ -1180,25 +1137,21 @@ sunos_add_one_symbol (info, abfd, name, flags, section, value, string,
if ((abfd->flags & DYNAMIC) != 0
&& abfd->xvec == info->hash->creator
&& (h->flags & SUNOS_CONSTRUCTOR) != 0)
- {
- /* The existing symbol is a constructor symbol, and this symbol
- is from a dynamic object. A constructor symbol is actually a
- definition, although the type will be bfd_link_hash_undefined
- at this point. We want to ignore the definition from the
- dynamic object. */
- section = bfd_und_section_ptr;
- }
+ /* The existing symbol is a constructor symbol, and this symbol
+ is from a dynamic object. A constructor symbol is actually a
+ definition, although the type will be bfd_link_hash_undefined
+ at this point. We want to ignore the definition from the
+ dynamic object. */
+ section = bfd_und_section_ptr;
else if ((flags & BSF_CONSTRUCTOR) != 0
&& (abfd->flags & DYNAMIC) == 0
&& h->root.root.type == bfd_link_hash_defined
&& h->root.root.u.def.section->owner != NULL
&& (h->root.root.u.def.section->owner->flags & DYNAMIC) != 0)
- {
- /* The existing symbol is defined by a dynamic object, and this
- is a constructor symbol. As above, we want to force the use
- of the constructor symbol from the regular object. */
- h->root.root.type = bfd_link_hash_new;
- }
+ /* The existing symbol is defined by a dynamic object, and this
+ is a constructor symbol. As above, we want to force the use
+ of the constructor symbol from the regular object. */
+ h->root.root.type = bfd_link_hash_new;
/* Do the usual procedure for adding a symbol. */
if (! _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section,
@@ -1244,14 +1197,15 @@ sunos_add_one_symbol (info, abfd, name, flags, section, value, string,
return TRUE;
}
+extern const bfd_target MY (vec);
+
/* Return the list of objects needed by BFD. */
struct bfd_link_needed_list *
-bfd_sunos_get_needed_list (abfd, info)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+bfd_sunos_get_needed_list (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
- if (info->hash->creator != &MY(vec))
+ if (info->hash->creator != &MY (vec))
return NULL;
return sunos_hash_table (info)->needed;
}
@@ -1260,10 +1214,9 @@ bfd_sunos_get_needed_list (abfd, info)
this in case some dynamic object refers to this symbol. */
bfd_boolean
-bfd_sunos_record_link_assignment (output_bfd, info, name)
- bfd *output_bfd;
- struct bfd_link_info *info;
- const char *name;
+bfd_sunos_record_link_assignment (bfd *output_bfd,
+ struct bfd_link_info *info,
+ const char *name)
{
struct sunos_link_hash_entry *h;
@@ -1294,295 +1247,6 @@ bfd_sunos_record_link_assignment (output_bfd, info, name)
return TRUE;
}
-/* Set up the sizes and contents of the dynamic sections created in
- sunos_add_dynamic_symbols. This is called by the SunOS linker
- emulation before_allocation routine. We must set the sizes of the
- sections before the linker sets the addresses of the various
- sections. This unfortunately requires reading all the relocs so
- that we can work out which ones need to become dynamic relocs. If
- info->keep_memory is TRUE, we keep the relocs in memory; otherwise,
- we discard them, and will read them again later. */
-
-bfd_boolean
-bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
- srulesptr)
- bfd *output_bfd;
- struct bfd_link_info *info;
- asection **sdynptr;
- asection **sneedptr;
- asection **srulesptr;
-{
- bfd *dynobj;
- bfd_size_type dynsymcount;
- struct sunos_link_hash_entry *h;
- asection *s;
- size_t bucketcount;
- bfd_size_type hashalloc;
- size_t i;
- bfd *sub;
-
- *sdynptr = NULL;
- *sneedptr = NULL;
- *srulesptr = NULL;
-
- if (info->relocatable)
- return TRUE;
-
- if (output_bfd->xvec != &MY(vec))
- return TRUE;
-
- /* Look through all the input BFD's and read their relocs. It would
- be better if we didn't have to do this, but there is no other way
- to determine the number of dynamic relocs we need, and, more
- importantly, there is no other way to know which symbols should
- get an entry in the procedure linkage table. */
- for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
- {
- if ((sub->flags & DYNAMIC) == 0
- && sub->xvec == output_bfd->xvec)
- {
- if (! sunos_scan_relocs (info, sub, obj_textsec (sub),
- exec_hdr (sub)->a_trsize)
- || ! sunos_scan_relocs (info, sub, obj_datasec (sub),
- exec_hdr (sub)->a_drsize))
- return FALSE;
- }
- }
-
- dynobj = sunos_hash_table (info)->dynobj;
- dynsymcount = sunos_hash_table (info)->dynsymcount;
-
- /* If there were no dynamic objects in the link, and we don't need
- to build a global offset table, there is nothing to do here. */
- if (! sunos_hash_table (info)->dynamic_sections_needed
- && ! sunos_hash_table (info)->got_needed)
- return TRUE;
-
- /* If __GLOBAL_OFFSET_TABLE_ was mentioned, define it. */
- h = sunos_link_hash_lookup (sunos_hash_table (info),
- "__GLOBAL_OFFSET_TABLE_", FALSE, FALSE, FALSE);
- if (h != NULL && (h->flags & SUNOS_REF_REGULAR) != 0)
- {
- h->flags |= SUNOS_DEF_REGULAR;
- if (h->dynindx == -1)
- {
- ++sunos_hash_table (info)->dynsymcount;
- h->dynindx = -2;
- }
- h->root.root.type = bfd_link_hash_defined;
- h->root.root.u.def.section = bfd_get_section_by_name (dynobj, ".got");
-
- /* If the .got section is more than 0x1000 bytes, we set
- __GLOBAL_OFFSET_TABLE_ to be 0x1000 bytes into the section,
- so that 13 bit relocations have a greater chance of working. */
- s = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (s != NULL);
- if (s->_raw_size >= 0x1000)
- h->root.root.u.def.value = 0x1000;
- else
- h->root.root.u.def.value = 0;
-
- sunos_hash_table (info)->got_base = h->root.root.u.def.value;
- }
-
- /* If there are any shared objects in the link, then we need to set
- up the dynamic linking information. */
- if (sunos_hash_table (info)->dynamic_sections_needed)
- {
- *sdynptr = bfd_get_section_by_name (dynobj, ".dynamic");
-
- /* The .dynamic section is always the same size. */
- s = *sdynptr;
- BFD_ASSERT (s != NULL);
- s->_raw_size = (sizeof (struct external_sun4_dynamic)
- + EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE
- + sizeof (struct external_sun4_dynamic_link));
-
- /* Set the size of the .dynsym and .hash sections. We counted
- the number of dynamic symbols as we read the input files. We
- will build the dynamic symbol table (.dynsym) and the hash
- table (.hash) when we build the final symbol table, because
- until then we do not know the correct value to give the
- symbols. We build the dynamic symbol string table (.dynstr)
- in a traversal of the symbol table using
- sunos_scan_dynamic_symbol. */
- s = bfd_get_section_by_name (dynobj, ".dynsym");
- BFD_ASSERT (s != NULL);
- s->_raw_size = dynsymcount * sizeof (struct external_nlist);
- s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
- if (s->contents == NULL && s->_raw_size != 0)
- return FALSE;
-
- /* The number of buckets is just the number of symbols divided
- by four. To compute the final size of the hash table, we
- must actually compute the hash table. Normally we need
- exactly as many entries in the hash table as there are
- dynamic symbols, but if some of the buckets are not used we
- will need additional entries. In the worst case, every
- symbol will hash to the same bucket, and we will need
- BUCKETCOUNT - 1 extra entries. */
- if (dynsymcount >= 4)
- bucketcount = dynsymcount / 4;
- else if (dynsymcount > 0)
- bucketcount = dynsymcount;
- else
- bucketcount = 1;
- s = bfd_get_section_by_name (dynobj, ".hash");
- BFD_ASSERT (s != NULL);
- hashalloc = (dynsymcount + bucketcount - 1) * HASH_ENTRY_SIZE;
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, hashalloc);
- if (s->contents == NULL && dynsymcount > 0)
- return FALSE;
- for (i = 0; i < bucketcount; i++)
- PUT_WORD (output_bfd, (bfd_vma) -1, s->contents + i * HASH_ENTRY_SIZE);
- s->_raw_size = bucketcount * HASH_ENTRY_SIZE;
-
- sunos_hash_table (info)->bucketcount = bucketcount;
-
- /* Scan all the symbols, place them in the dynamic symbol table,
- and build the dynamic hash table. We reuse dynsymcount as a
- counter for the number of symbols we have added so far. */
- sunos_hash_table (info)->dynsymcount = 0;
- sunos_link_hash_traverse (sunos_hash_table (info),
- sunos_scan_dynamic_symbol,
- (PTR) info);
- BFD_ASSERT (sunos_hash_table (info)->dynsymcount == dynsymcount);
-
- /* The SunOS native linker seems to align the total size of the
- symbol strings to a multiple of 8. I don't know if this is
- important, but it can't hurt much. */
- s = bfd_get_section_by_name (dynobj, ".dynstr");
- BFD_ASSERT (s != NULL);
- if ((s->_raw_size & 7) != 0)
- {
- bfd_size_type add;
- bfd_byte *contents;
-
- add = 8 - (s->_raw_size & 7);
- contents = (bfd_byte *) bfd_realloc (s->contents,
- s->_raw_size + add);
- if (contents == NULL)
- return FALSE;
- memset (contents + s->_raw_size, 0, (size_t) add);
- s->contents = contents;
- s->_raw_size += add;
- }
- }
-
- /* Now that we have worked out the sizes of the procedure linkage
- table and the dynamic relocs, allocate storage for them. */
- s = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (s != NULL);
- if (s->_raw_size != 0)
- {
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
- if (s->contents == NULL)
- return FALSE;
-
- /* Fill in the first entry in the table. */
- switch (bfd_get_arch (dynobj))
- {
- case bfd_arch_sparc:
- memcpy (s->contents, sparc_plt_first_entry, SPARC_PLT_ENTRY_SIZE);
- break;
-
- case bfd_arch_m68k:
- memcpy (s->contents, m68k_plt_first_entry, M68K_PLT_ENTRY_SIZE);
- break;
-
- default:
- abort ();
- }
- }
-
- s = bfd_get_section_by_name (dynobj, ".dynrel");
- if (s->_raw_size != 0)
- {
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
- if (s->contents == NULL)
- return FALSE;
- }
- /* We use the reloc_count field to keep track of how many of the
- relocs we have output so far. */
- s->reloc_count = 0;
-
- /* Make space for the global offset table. */
- s = bfd_get_section_by_name (dynobj, ".got");
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
- if (s->contents == NULL)
- return FALSE;
-
- *sneedptr = bfd_get_section_by_name (dynobj, ".need");
- *srulesptr = bfd_get_section_by_name (dynobj, ".rules");
-
- return TRUE;
-}
-
-/* Scan the relocs for an input section. */
-
-static bfd_boolean
-sunos_scan_relocs (info, abfd, sec, rel_size)
- struct bfd_link_info *info;
- bfd *abfd;
- asection *sec;
- bfd_size_type rel_size;
-{
- PTR relocs;
- PTR free_relocs = NULL;
-
- if (rel_size == 0)
- return TRUE;
-
- if (! info->keep_memory)
- relocs = free_relocs = bfd_malloc (rel_size);
- else
- {
- struct aout_section_data_struct *n;
- bfd_size_type amt = sizeof (struct aout_section_data_struct);
-
- n = (struct aout_section_data_struct *) bfd_alloc (abfd, amt);
- if (n == NULL)
- relocs = NULL;
- else
- {
- set_aout_section_data (sec, n);
- relocs = bfd_malloc (rel_size);
- aout_section_data (sec)->relocs = relocs;
- }
- }
- if (relocs == NULL)
- return FALSE;
-
- if (bfd_seek (abfd, sec->rel_filepos, SEEK_SET) != 0
- || bfd_bread (relocs, rel_size, abfd) != rel_size)
- goto error_return;
-
- if (obj_reloc_entry_size (abfd) == RELOC_STD_SIZE)
- {
- if (! sunos_scan_std_relocs (info, abfd, sec,
- (struct reloc_std_external *) relocs,
- rel_size))
- goto error_return;
- }
- else
- {
- if (! sunos_scan_ext_relocs (info, abfd, sec,
- (struct reloc_ext_external *) relocs,
- rel_size))
- goto error_return;
- }
-
- if (free_relocs != NULL)
- free (free_relocs);
-
- return TRUE;
-
- error_return:
- if (free_relocs != NULL)
- free (free_relocs);
- return FALSE;
-}
-
/* Scan the relocs for an input section using standard relocs. We
need to figure out what to do for each reloc against a dynamic
symbol. If the symbol is in the .text section, an entry is made in
@@ -1594,12 +1258,11 @@ sunos_scan_relocs (info, abfd, sec, rel_size)
building global offset table entries. */
static bfd_boolean
-sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
- struct bfd_link_info *info;
- bfd *abfd;
- asection *sec ATTRIBUTE_UNUSED;
- const struct reloc_std_external *relocs;
- bfd_size_type rel_size;
+sunos_scan_std_relocs (struct bfd_link_info *info,
+ bfd *abfd,
+ asection *sec ATTRIBUTE_UNUSED,
+ const struct reloc_std_external *relocs,
+ bfd_size_type rel_size)
{
bfd *dynobj;
asection *splt = NULL;
@@ -1649,11 +1312,9 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
/* Get the hash table entry. */
h = sym_hashes[r_index];
if (h == NULL)
- {
- /* This should not normally happen, but it will in any case
- be caught in the relocation phase. */
- continue;
- }
+ /* This should not normally happen, but it will in any case
+ be caught in the relocation phase. */
+ continue;
/* At this point common symbols have already been allocated, so
we don't have to worry about them. We need to consider that
@@ -1682,8 +1343,8 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
sgot = bfd_get_section_by_name (dynobj, ".got");
BFD_ASSERT (sgot != NULL);
- if (sgot->_raw_size == 0)
- sgot->_raw_size = BYTES_IN_WORD;
+ if (sgot->size == 0)
+ sgot->size = BYTES_IN_WORD;
sunos_hash_table (info)->got_needed = TRUE;
}
@@ -1697,13 +1358,10 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
/* This reloc is against a symbol defined only by a dynamic
object. */
-
if (h->root.root.type == bfd_link_hash_undefined)
- {
- /* Presumably this symbol was marked as being undefined by
- an earlier reloc. */
- srel->_raw_size += RELOC_STD_SIZE;
- }
+ /* Presumably this symbol was marked as being undefined by
+ an earlier reloc. */
+ srel->size += RELOC_STD_SIZE;
else if ((h->root.root.u.def.section->flags & SEC_CODE) == 0)
{
bfd *sub;
@@ -1711,7 +1369,7 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
/* This reloc is not in the .text section. It must be
copied into the dynamic relocs. We mark the symbol as
being undefined. */
- srel->_raw_size += RELOC_STD_SIZE;
+ srel->size += RELOC_STD_SIZE;
sub = h->root.root.u.def.section->owner;
h->root.root.type = bfd_link_hash_undefined;
h->root.root.u.undef.abfd = sub;
@@ -1725,21 +1383,21 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
be handled correctly. */
if (h->plt_offset == 0)
{
- if (splt->_raw_size == 0)
- splt->_raw_size = M68K_PLT_ENTRY_SIZE;
- h->plt_offset = splt->_raw_size;
+ if (splt->size == 0)
+ splt->size = M68K_PLT_ENTRY_SIZE;
+ h->plt_offset = splt->size;
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
{
h->root.root.u.def.section = splt;
- h->root.root.u.def.value = splt->_raw_size;
+ h->root.root.u.def.value = splt->size;
}
- splt->_raw_size += M68K_PLT_ENTRY_SIZE;
+ splt->size += M68K_PLT_ENTRY_SIZE;
/* We may also need a dynamic reloc entry. */
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
- srel->_raw_size += RELOC_STD_SIZE;
+ srel->size += RELOC_STD_SIZE;
}
}
}
@@ -1754,12 +1412,11 @@ sunos_scan_std_relocs (info, abfd, sec, relocs, rel_size)
Otherwise, we must preserve the reloc as a dynamic reloc. */
static bfd_boolean
-sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
- struct bfd_link_info *info;
- bfd *abfd;
- asection *sec ATTRIBUTE_UNUSED;
- const struct reloc_ext_external *relocs;
- bfd_size_type rel_size;
+sunos_scan_ext_relocs (struct bfd_link_info *info,
+ bfd *abfd,
+ asection *sec ATTRIBUTE_UNUSED,
+ const struct reloc_ext_external *relocs,
+ bfd_size_type rel_size)
{
bfd *dynobj;
struct sunos_link_hash_entry **sym_hashes;
@@ -1836,8 +1493,8 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
/* Make sure we have an initial entry in the .got table. */
- if (sgot->_raw_size == 0)
- sgot->_raw_size = BYTES_IN_WORD;
+ if (sgot->size == 0)
+ sgot->size = BYTES_IN_WORD;
sunos_hash_table (info)->got_needed = TRUE;
}
@@ -1846,23 +1503,20 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
if (h->got_offset != 0)
continue;
- h->got_offset = sgot->_raw_size;
+ h->got_offset = sgot->size;
}
else
{
if (r_index >= bfd_get_symcount (abfd))
- {
- /* This is abnormal, but should be caught in the
- relocation phase. */
- continue;
- }
+ /* This is abnormal, but should be caught in the
+ relocation phase. */
+ continue;
if (adata (abfd).local_got_offsets == NULL)
{
amt = bfd_get_symcount (abfd);
amt *= sizeof (bfd_vma);
- adata (abfd).local_got_offsets =
- (bfd_vma *) bfd_zalloc (abfd, amt);
+ adata (abfd).local_got_offsets = bfd_zalloc (abfd, amt);
if (adata (abfd).local_got_offsets == NULL)
return FALSE;
}
@@ -1870,10 +1524,10 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
if (adata (abfd).local_got_offsets[r_index] != 0)
continue;
- adata (abfd).local_got_offsets[r_index] = sgot->_raw_size;
+ adata (abfd).local_got_offsets[r_index] = sgot->size;
}
- sgot->_raw_size += BYTES_IN_WORD;
+ sgot->size += BYTES_IN_WORD;
/* If we are making a shared library, or if the symbol is
defined by a dynamic object, we will need a dynamic reloc
@@ -1882,7 +1536,7 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
|| (h != NULL
&& (h->flags & SUNOS_DEF_DYNAMIC) != 0
&& (h->flags & SUNOS_DEF_REGULAR) == 0))
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
continue;
}
@@ -1907,7 +1561,7 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
}
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
}
continue;
@@ -1954,8 +1608,8 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
/* Make sure we have an initial entry in the .got table. */
- if (sgot->_raw_size == 0)
- sgot->_raw_size = BYTES_IN_WORD;
+ if (sgot->size == 0)
+ sgot->size = BYTES_IN_WORD;
sunos_hash_table (info)->got_needed = TRUE;
}
@@ -1976,11 +1630,10 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
if (r_type != RELOC_JMP_TBL
&& h->root.root.type == bfd_link_hash_undefined)
- {
- /* Presumably this symbol was marked as being undefined by
- an earlier reloc. */
- srel->_raw_size += RELOC_EXT_SIZE;
- }
+ /* Presumably this symbol was marked as being undefined by
+ an earlier reloc. */
+ srel->size += RELOC_EXT_SIZE;
+
else if (r_type != RELOC_JMP_TBL
&& (h->root.root.u.def.section->flags & SEC_CODE) == 0)
{
@@ -1989,7 +1642,7 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
/* This reloc is not in the .text section. It must be
copied into the dynamic relocs. We mark the symbol as
being undefined. */
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
{
sub = h->root.root.u.def.section->owner;
@@ -2006,44 +1659,106 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
be handled correctly. */
if (h->plt_offset == 0)
{
- if (splt->_raw_size == 0)
- splt->_raw_size = SPARC_PLT_ENTRY_SIZE;
- h->plt_offset = splt->_raw_size;
+ if (splt->size == 0)
+ splt->size = SPARC_PLT_ENTRY_SIZE;
+ h->plt_offset = splt->size;
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
{
if (h->root.root.type == bfd_link_hash_undefined)
h->root.root.type = bfd_link_hash_defined;
h->root.root.u.def.section = splt;
- h->root.root.u.def.value = splt->_raw_size;
+ h->root.root.u.def.value = splt->size;
}
- splt->_raw_size += SPARC_PLT_ENTRY_SIZE;
+ splt->size += SPARC_PLT_ENTRY_SIZE;
/* We will also need a dynamic reloc entry, unless this
is a JMP_TBL reloc produced by linking PIC compiled
code, and we are not making a shared library. */
if (info->shared || (h->flags & SUNOS_DEF_REGULAR) == 0)
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
}
/* If we are creating a shared library, we need to copy over
any reloc other than a jump table reloc. */
if (info->shared && r_type != RELOC_JMP_TBL)
- srel->_raw_size += RELOC_EXT_SIZE;
+ srel->size += RELOC_EXT_SIZE;
+ }
+ }
+
+ return TRUE;
+}
+
+/* Scan the relocs for an input section. */
+
+static bfd_boolean
+sunos_scan_relocs (struct bfd_link_info *info,
+ bfd *abfd,
+ asection *sec,
+ bfd_size_type rel_size)
+{
+ void * relocs;
+ void * free_relocs = NULL;
+
+ if (rel_size == 0)
+ return TRUE;
+
+ if (! info->keep_memory)
+ relocs = free_relocs = bfd_malloc (rel_size);
+ else
+ {
+ struct aout_section_data_struct *n;
+ bfd_size_type amt = sizeof (struct aout_section_data_struct);
+
+ n = bfd_alloc (abfd, amt);
+ if (n == NULL)
+ relocs = NULL;
+ else
+ {
+ set_aout_section_data (sec, n);
+ relocs = bfd_malloc (rel_size);
+ aout_section_data (sec)->relocs = relocs;
}
}
+ if (relocs == NULL)
+ return FALSE;
+
+ if (bfd_seek (abfd, sec->rel_filepos, SEEK_SET) != 0
+ || bfd_bread (relocs, rel_size, abfd) != rel_size)
+ goto error_return;
+
+ if (obj_reloc_entry_size (abfd) == RELOC_STD_SIZE)
+ {
+ if (! sunos_scan_std_relocs (info, abfd, sec,
+ (struct reloc_std_external *) relocs,
+ rel_size))
+ goto error_return;
+ }
+ else
+ {
+ if (! sunos_scan_ext_relocs (info, abfd, sec,
+ (struct reloc_ext_external *) relocs,
+ rel_size))
+ goto error_return;
+ }
+
+ if (free_relocs != NULL)
+ free (free_relocs);
return TRUE;
+
+ error_return:
+ if (free_relocs != NULL)
+ free (free_relocs);
+ return FALSE;
}
/* Build the hash table of dynamic symbols, and to mark as written all
symbols from dynamic objects which we do not plan to write out. */
static bfd_boolean
-sunos_scan_dynamic_symbol (h, data)
- struct sunos_link_hash_entry *h;
- PTR data;
+sunos_scan_dynamic_symbol (struct sunos_link_hash_entry *h, void * data)
{
struct bfd_link_info *info = (struct bfd_link_info *) data;
@@ -2067,7 +1782,6 @@ sunos_scan_dynamic_symbol (h, data)
/* If this symbol is defined by a dynamic object and referenced by a
regular object, see whether we gave it a reasonable value while
scanning the relocs. */
-
if ((h->flags & SUNOS_DEF_REGULAR) == 0
&& (h->flags & SUNOS_DEF_DYNAMIC) != 0
&& (h->flags & SUNOS_REF_REGULAR) != 0)
@@ -2118,15 +1832,14 @@ sunos_scan_dynamic_symbol (h, data)
There are no debugging symbols in the dynamic symbols. */
s = bfd_get_section_by_name (dynobj, ".dynstr");
BFD_ASSERT (s != NULL);
- contents = (bfd_byte *) bfd_realloc (s->contents,
- s->_raw_size + len + 1);
+ contents = bfd_realloc (s->contents, s->size + len + 1);
if (contents == NULL)
return FALSE;
s->contents = contents;
- h->dynstr_index = s->_raw_size;
- strcpy ((char *) contents + s->_raw_size, h->root.root.root.string);
- s->_raw_size += len + 1;
+ h->dynstr_index = s->size;
+ strcpy ((char *) contents + s->size, h->root.root.root.string);
+ s->size += len + 1;
/* Add it to the dynamic hash table. */
name = (unsigned char *) h->root.root.root.string;
@@ -2149,14 +1862,235 @@ sunos_scan_dynamic_symbol (h, data)
(s->contents
+ hash * HASH_ENTRY_SIZE
+ BYTES_IN_WORD));
- PUT_WORD (dynobj, s->_raw_size / HASH_ENTRY_SIZE,
+ PUT_WORD (dynobj, s->size / HASH_ENTRY_SIZE,
s->contents + hash * HASH_ENTRY_SIZE + BYTES_IN_WORD);
- PUT_WORD (dynobj, h->dynindx, s->contents + s->_raw_size);
- PUT_WORD (dynobj, next, s->contents + s->_raw_size + BYTES_IN_WORD);
- s->_raw_size += HASH_ENTRY_SIZE;
+ PUT_WORD (dynobj, h->dynindx, s->contents + s->size);
+ PUT_WORD (dynobj, next, s->contents + s->size + BYTES_IN_WORD);
+ s->size += HASH_ENTRY_SIZE;
+ }
+ }
+
+ return TRUE;
+}
+
+/* Set up the sizes and contents of the dynamic sections created in
+ sunos_add_dynamic_symbols. This is called by the SunOS linker
+ emulation before_allocation routine. We must set the sizes of the
+ sections before the linker sets the addresses of the various
+ sections. This unfortunately requires reading all the relocs so
+ that we can work out which ones need to become dynamic relocs. If
+ info->keep_memory is TRUE, we keep the relocs in memory; otherwise,
+ we discard them, and will read them again later. */
+
+bfd_boolean
+bfd_sunos_size_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info,
+ asection **sdynptr,
+ asection **sneedptr,
+ asection **srulesptr)
+{
+ bfd *dynobj;
+ bfd_size_type dynsymcount;
+ struct sunos_link_hash_entry *h;
+ asection *s;
+ size_t bucketcount;
+ bfd_size_type hashalloc;
+ size_t i;
+ bfd *sub;
+
+ *sdynptr = NULL;
+ *sneedptr = NULL;
+ *srulesptr = NULL;
+
+ if (info->relocatable)
+ return TRUE;
+
+ if (output_bfd->xvec != &MY(vec))
+ return TRUE;
+
+ /* Look through all the input BFD's and read their relocs. It would
+ be better if we didn't have to do this, but there is no other way
+ to determine the number of dynamic relocs we need, and, more
+ importantly, there is no other way to know which symbols should
+ get an entry in the procedure linkage table. */
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ {
+ if ((sub->flags & DYNAMIC) == 0
+ && sub->xvec == output_bfd->xvec)
+ {
+ if (! sunos_scan_relocs (info, sub, obj_textsec (sub),
+ exec_hdr (sub)->a_trsize)
+ || ! sunos_scan_relocs (info, sub, obj_datasec (sub),
+ exec_hdr (sub)->a_drsize))
+ return FALSE;
}
}
+ dynobj = sunos_hash_table (info)->dynobj;
+ dynsymcount = sunos_hash_table (info)->dynsymcount;
+
+ /* If there were no dynamic objects in the link, and we don't need
+ to build a global offset table, there is nothing to do here. */
+ if (! sunos_hash_table (info)->dynamic_sections_needed
+ && ! sunos_hash_table (info)->got_needed)
+ return TRUE;
+
+ /* If __GLOBAL_OFFSET_TABLE_ was mentioned, define it. */
+ h = sunos_link_hash_lookup (sunos_hash_table (info),
+ "__GLOBAL_OFFSET_TABLE_", FALSE, FALSE, FALSE);
+ if (h != NULL && (h->flags & SUNOS_REF_REGULAR) != 0)
+ {
+ h->flags |= SUNOS_DEF_REGULAR;
+ if (h->dynindx == -1)
+ {
+ ++sunos_hash_table (info)->dynsymcount;
+ h->dynindx = -2;
+ }
+ h->root.root.type = bfd_link_hash_defined;
+ h->root.root.u.def.section = bfd_get_section_by_name (dynobj, ".got");
+
+ /* If the .got section is more than 0x1000 bytes, we set
+ __GLOBAL_OFFSET_TABLE_ to be 0x1000 bytes into the section,
+ so that 13 bit relocations have a greater chance of working. */
+ s = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (s != NULL);
+ if (s->size >= 0x1000)
+ h->root.root.u.def.value = 0x1000;
+ else
+ h->root.root.u.def.value = 0;
+
+ sunos_hash_table (info)->got_base = h->root.root.u.def.value;
+ }
+
+ /* If there are any shared objects in the link, then we need to set
+ up the dynamic linking information. */
+ if (sunos_hash_table (info)->dynamic_sections_needed)
+ {
+ *sdynptr = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ /* The .dynamic section is always the same size. */
+ s = *sdynptr;
+ BFD_ASSERT (s != NULL);
+ s->size = (sizeof (struct external_sun4_dynamic)
+ + EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE
+ + sizeof (struct external_sun4_dynamic_link));
+
+ /* Set the size of the .dynsym and .hash sections. We counted
+ the number of dynamic symbols as we read the input files. We
+ will build the dynamic symbol table (.dynsym) and the hash
+ table (.hash) when we build the final symbol table, because
+ until then we do not know the correct value to give the
+ symbols. We build the dynamic symbol string table (.dynstr)
+ in a traversal of the symbol table using
+ sunos_scan_dynamic_symbol. */
+ s = bfd_get_section_by_name (dynobj, ".dynsym");
+ BFD_ASSERT (s != NULL);
+ s->size = dynsymcount * sizeof (struct external_nlist);
+ s->contents = bfd_alloc (output_bfd, s->size);
+ if (s->contents == NULL && s->size != 0)
+ return FALSE;
+
+ /* The number of buckets is just the number of symbols divided
+ by four. To compute the final size of the hash table, we
+ must actually compute the hash table. Normally we need
+ exactly as many entries in the hash table as there are
+ dynamic symbols, but if some of the buckets are not used we
+ will need additional entries. In the worst case, every
+ symbol will hash to the same bucket, and we will need
+ BUCKETCOUNT - 1 extra entries. */
+ if (dynsymcount >= 4)
+ bucketcount = dynsymcount / 4;
+ else if (dynsymcount > 0)
+ bucketcount = dynsymcount;
+ else
+ bucketcount = 1;
+ s = bfd_get_section_by_name (dynobj, ".hash");
+ BFD_ASSERT (s != NULL);
+ hashalloc = (dynsymcount + bucketcount - 1) * HASH_ENTRY_SIZE;
+ s->contents = bfd_zalloc (dynobj, hashalloc);
+ if (s->contents == NULL && dynsymcount > 0)
+ return FALSE;
+ for (i = 0; i < bucketcount; i++)
+ PUT_WORD (output_bfd, (bfd_vma) -1, s->contents + i * HASH_ENTRY_SIZE);
+ s->size = bucketcount * HASH_ENTRY_SIZE;
+
+ sunos_hash_table (info)->bucketcount = bucketcount;
+
+ /* Scan all the symbols, place them in the dynamic symbol table,
+ and build the dynamic hash table. We reuse dynsymcount as a
+ counter for the number of symbols we have added so far. */
+ sunos_hash_table (info)->dynsymcount = 0;
+ sunos_link_hash_traverse (sunos_hash_table (info),
+ sunos_scan_dynamic_symbol,
+ (void *) info);
+ BFD_ASSERT (sunos_hash_table (info)->dynsymcount == dynsymcount);
+
+ /* The SunOS native linker seems to align the total size of the
+ symbol strings to a multiple of 8. I don't know if this is
+ important, but it can't hurt much. */
+ s = bfd_get_section_by_name (dynobj, ".dynstr");
+ BFD_ASSERT (s != NULL);
+ if ((s->size & 7) != 0)
+ {
+ bfd_size_type add;
+ bfd_byte *contents;
+
+ add = 8 - (s->size & 7);
+ contents = bfd_realloc (s->contents, s->size + add);
+ if (contents == NULL)
+ return FALSE;
+ memset (contents + s->size, 0, (size_t) add);
+ s->contents = contents;
+ s->size += add;
+ }
+ }
+
+ /* Now that we have worked out the sizes of the procedure linkage
+ table and the dynamic relocs, allocate storage for them. */
+ s = bfd_get_section_by_name (dynobj, ".plt");
+ BFD_ASSERT (s != NULL);
+ if (s->size != 0)
+ {
+ s->contents = bfd_alloc (dynobj, s->size);
+ if (s->contents == NULL)
+ return FALSE;
+
+ /* Fill in the first entry in the table. */
+ switch (bfd_get_arch (dynobj))
+ {
+ case bfd_arch_sparc:
+ memcpy (s->contents, sparc_plt_first_entry, SPARC_PLT_ENTRY_SIZE);
+ break;
+
+ case bfd_arch_m68k:
+ memcpy (s->contents, m68k_plt_first_entry, M68K_PLT_ENTRY_SIZE);
+ break;
+
+ default:
+ abort ();
+ }
+ }
+
+ s = bfd_get_section_by_name (dynobj, ".dynrel");
+ if (s->size != 0)
+ {
+ s->contents = bfd_alloc (dynobj, s->size);
+ if (s->contents == NULL)
+ return FALSE;
+ }
+ /* We use the reloc_count field to keep track of how many of the
+ relocs we have output so far. */
+ s->reloc_count = 0;
+
+ /* Make space for the global offset table. */
+ s = bfd_get_section_by_name (dynobj, ".got");
+ s->contents = bfd_alloc (dynobj, s->size);
+ if (s->contents == NULL)
+ return FALSE;
+
+ *sneedptr = bfd_get_section_by_name (dynobj, ".need");
+ *srulesptr = bfd_get_section_by_name (dynobj, ".rules");
+
return TRUE;
}
@@ -2165,9 +2099,8 @@ sunos_scan_dynamic_symbol (h, data)
code from doing anything with the object. */
static bfd_boolean
-sunos_link_dynamic_object (info, abfd)
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- bfd *abfd ATTRIBUTE_UNUSED;
+sunos_link_dynamic_object (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ bfd *abfd ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -2176,10 +2109,9 @@ sunos_link_dynamic_object (info, abfd)
over the symbol table. */
static bfd_boolean
-sunos_write_dynamic_symbol (output_bfd, info, harg)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct aout_link_hash_entry *harg;
+sunos_write_dynamic_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct aout_link_hash_entry *harg)
{
struct sunos_link_hash_entry *h = (struct sunos_link_hash_entry *) harg;
int type;
@@ -2254,7 +2186,7 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
{
BFD_ASSERT (h->dynindx >= 0);
BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj)
- < s->_raw_size);
+ < s->size);
p = s->contents + s->reloc_count * obj_reloc_entry_size (output_bfd);
if (obj_reloc_entry_size (output_bfd) == RELOC_STD_SIZE)
{
@@ -2409,16 +2341,14 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
reloc. */
static bfd_boolean
-sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
- contents, skip, relocationp)
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- struct aout_link_hash_entry *harg;
- PTR reloc;
- bfd_byte *contents ATTRIBUTE_UNUSED;
- bfd_boolean *skip;
- bfd_vma *relocationp;
+sunos_check_dynamic_reloc (struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ struct aout_link_hash_entry *harg,
+ void * reloc,
+ bfd_byte *contents ATTRIBUTE_UNUSED,
+ bfd_boolean *skip,
+ bfd_vma *relocationp)
{
struct sunos_link_hash_entry *h = (struct sunos_link_hash_entry *) harg;
bfd *dynobj;
@@ -2561,7 +2491,7 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
s = bfd_get_section_by_name (dynobj, ".dynrel");
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj)
- < s->_raw_size);
+ < s->size);
p = (s->contents
+ s->reloc_count * obj_reloc_entry_size (dynobj));
@@ -2690,7 +2620,7 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
s = bfd_get_section_by_name (dynobj, ".dynrel");
BFD_ASSERT (s != NULL);
- BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj) < s->_raw_size);
+ BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj) < s->size);
p = s->contents + s->reloc_count * obj_reloc_entry_size (dynobj);
@@ -2773,9 +2703,7 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
/* Finish up the dynamic linking information. */
static bfd_boolean
-sunos_finish_dynamic_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+sunos_finish_dynamic_link (bfd *abfd, struct bfd_link_info *info)
{
bfd *dynobj;
asection *o;
@@ -2796,7 +2724,7 @@ sunos_finish_dynamic_link (abfd, info)
real addresses. Now that we know the section location, we can
fill in the final values. */
s = bfd_get_section_by_name (dynobj, ".need");
- if (s != NULL && s->_raw_size != 0)
+ if (s != NULL && s->size != 0)
{
file_ptr filepos;
bfd_byte *p;
@@ -2820,7 +2748,7 @@ sunos_finish_dynamic_link (abfd, info)
dynamic information, unless this is a shared library. */
s = bfd_get_section_by_name (dynobj, ".got");
BFD_ASSERT (s != NULL);
- if (info->shared || sdyn->_raw_size == 0)
+ if (info->shared || sdyn->size == 0)
PUT_WORD (dynobj, 0, s->contents);
else
PUT_WORD (dynobj, sdyn->output_section->vma + sdyn->output_offset,
@@ -2836,12 +2764,12 @@ sunos_finish_dynamic_link (abfd, info)
if (! bfd_set_section_contents (abfd, o->output_section,
o->contents,
(file_ptr) o->output_offset,
- o->_raw_size))
+ o->size))
return FALSE;
}
}
- if (sdyn->_raw_size > 0)
+ if (sdyn->size > 0)
{
struct external_sun4_dynamic esd;
struct external_sun4_dynamic_link esdl;
@@ -2867,14 +2795,14 @@ sunos_finish_dynamic_link (abfd, info)
PUT_WORD (dynobj, (bfd_vma) 0, esdl.ld_loaded);
s = bfd_get_section_by_name (dynobj, ".need");
- if (s == NULL || s->_raw_size == 0)
+ if (s == NULL || s->size == 0)
PUT_WORD (dynobj, (bfd_vma) 0, esdl.ld_need);
else
PUT_WORD (dynobj, s->output_section->filepos + s->output_offset,
esdl.ld_need);
s = bfd_get_section_by_name (dynobj, ".rules");
- if (s == NULL || s->_raw_size == 0)
+ if (s == NULL || s->size == 0)
PUT_WORD (dynobj, (bfd_vma) 0, esdl.ld_rules);
else
PUT_WORD (dynobj, s->output_section->filepos + s->output_offset,
@@ -2889,12 +2817,12 @@ sunos_finish_dynamic_link (abfd, info)
BFD_ASSERT (s != NULL);
PUT_WORD (dynobj, s->output_section->vma + s->output_offset,
esdl.ld_plt);
- PUT_WORD (dynobj, s->_raw_size, esdl.ld_plt_sz);
+ PUT_WORD (dynobj, s->size, esdl.ld_plt_sz);
s = bfd_get_section_by_name (dynobj, ".dynrel");
BFD_ASSERT (s != NULL);
BFD_ASSERT (s->reloc_count * obj_reloc_entry_size (dynobj)
- == s->_raw_size);
+ == s->size);
PUT_WORD (dynobj, s->output_section->filepos + s->output_offset,
esdl.ld_rel);
@@ -2917,13 +2845,13 @@ sunos_finish_dynamic_link (abfd, info)
BFD_ASSERT (s != NULL);
PUT_WORD (dynobj, s->output_section->filepos + s->output_offset,
esdl.ld_symbols);
- PUT_WORD (dynobj, s->_raw_size, esdl.ld_symb_size);
+ PUT_WORD (dynobj, s->size, esdl.ld_symb_size);
/* The size of the text area is the size of the .text section
rounded up to a page boundary. FIXME: Should the page size be
conditional on something? */
PUT_WORD (dynobj,
- BFD_ALIGN (obj_textsec (abfd)->_raw_size, 0x2000),
+ BFD_ALIGN (obj_textsec (abfd)->size, 0x2000),
esdl.ld_text);
pos = sdyn->output_offset;
diff --git a/contrib/binutils/bfd/syms.c b/contrib/binutils/bfd/syms.c
index c07f48b4a9a6..0ff94164ed5e 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
+ 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
SECTION
@@ -355,7 +355,7 @@ bfd_is_local_label (bfd *abfd, asymbol *sym)
/* The BSF_SECTION_SYM check is needed for IA-64, where every label that
starts with '.' is local. This would accidentally catch section names
if we didn't reject them here. */
- if ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_SECTION_SYM)) != 0)
+ if ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_FILE | BSF_SECTION_SYM)) != 0)
return FALSE;
if (sym->name == NULL)
return FALSE;
@@ -382,6 +382,23 @@ DESCRIPTION
/*
FUNCTION
+ bfd_is_target_special_symbol
+
+SYNOPSIS
+ bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
+
+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.
+
+.#define bfd_is_target_special_symbol(abfd, sym) \
+. BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
+.
+*/
+
+/*
+FUNCTION
bfd_canonicalize_symtab
DESCRIPTION
@@ -934,8 +951,12 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
return TRUE;
}
- stabsize = info->stabsec->_raw_size;
- strsize = info->strsec->_raw_size;
+ stabsize = (info->stabsec->rawsize
+ ? info->stabsec->rawsize
+ : info->stabsec->size);
+ strsize = (info->strsec->rawsize
+ ? info->strsec->rawsize
+ : info->strsec->size);
}
else
{
@@ -965,8 +986,12 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
return TRUE;
}
- stabsize = info->stabsec->_raw_size;
- strsize = info->strsec->_raw_size;
+ stabsize = (info->stabsec->rawsize
+ ? info->stabsec->rawsize
+ : info->stabsec->size);
+ strsize = (info->strsec->rawsize
+ ? info->strsec->rawsize
+ : info->strsec->size);
info->stabs = bfd_alloc (abfd, stabsize);
info->strs = bfd_alloc (abfd, strsize);
@@ -974,9 +999,9 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
return FALSE;
if (! bfd_get_section_contents (abfd, info->stabsec, info->stabs,
- (bfd_vma) 0, stabsize)
+ 0, stabsize)
|| ! bfd_get_section_contents (abfd, info->strsec, info->strs,
- (bfd_vma) 0, strsize))
+ 0, strsize))
return FALSE;
/* If this is a relocatable object file, we have to relocate
@@ -1008,6 +1033,10 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
asymbol *sym;
r = *pr;
+ /* Ignore R_*_NONE relocs. */
+ if (r->howto->dst_mask == 0)
+ continue;
+
if (r->howto->rightshift != 0
|| r->howto->size != 2
|| r->howto->bitsize != 32
diff --git a/contrib/binutils/bfd/sysdep.h b/contrib/binutils/bfd/sysdep.h
index 195447056a32..f6313d3905ce 100644
--- a/contrib/binutils/bfd/sysdep.h
+++ b/contrib/binutils/bfd/sysdep.h
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef BFD_SYSDEP_H
#define BFD_SYSDEP_H
@@ -39,6 +39,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern int errno;
#endif
+#ifdef STRING_WITH_STRINGS
+#include <string.h>
+#include <strings.h>
+#else
#ifdef HAVE_STRING_H
#include <string.h>
#else
@@ -49,6 +53,7 @@ extern char *strchr ();
extern char *strrchr ();
#endif
#endif
+#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
@@ -105,24 +110,56 @@ extern char *strrchr ();
#include "filenames.h"
-#ifdef NEED_DECLARATION_STRSTR
-extern char *strstr ();
+#if !HAVE_DECL_FFS
+extern int ffs (int);
#endif
-#ifdef NEED_DECLARATION_MALLOC
+#if !HAVE_DECL_FREE
+extern void free ();
+#endif
+
+#if !HAVE_DECL_GETENV
+extern char *getenv ();
+#endif
+
+#if !HAVE_DECL_MALLOC
extern PTR malloc ();
#endif
-#ifdef NEED_DECLARATION_REALLOC
+#if !HAVE_DECL_REALLOC
extern PTR realloc ();
#endif
-#ifdef NEED_DECLARATION_FREE
-extern void free ();
+#if !HAVE_DECL_STPCPY
+extern char *stpcpy (char *__dest, const char *__src);
#endif
-#ifdef NEED_DECLARATION_GETENV
-extern char *getenv ();
+#if !HAVE_DECL_STRSTR
+extern char *strstr ();
+#endif
+
+#ifdef HAVE_FTELLO
+#if !HAVE_DECL_FTELLO
+extern off_t ftello (FILE *stream);
+#endif
+#endif
+
+#ifdef HAVE_FTELLO64
+#if !HAVE_DECL_FTELLO64
+extern off64_t ftello64 (FILE *stream);
+#endif
+#endif
+
+#ifdef HAVE_FSEEKO
+#if !HAVE_DECL_FSEEKO
+extern int fseeko (FILE *stream, off_t offset, int whence);
+#endif
+#endif
+
+#ifdef HAVE_FSEEKO64
+#if !HAVE_DECL_FSEEKO64
+extern int fseeko64 (FILE *stream, off64_t offset, int whence);
+#endif
#endif
/* Define offsetof for those systems which lack it */
diff --git a/contrib/binutils/bfd/targets.c b/contrib/binutils/bfd/targets.c
index 0c1c1ddde742..3b04f60a4bf5 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
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -26,6 +26,14 @@
#include "fnmatch.h"
/*
+ It's okay to see some:
+#if 0
+ directives in this source file, as targets.c uses them to exclude
+ certain BFD vectors. This comment is specially formatted to catch
+ users who grep for ^#if 0, so please keep it this way!
+*/
+
+/*
SECTION
Targets
@@ -201,7 +209,7 @@ DESCRIPTION
. 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 asthe first argument.
+. 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 *);
@@ -263,8 +271,10 @@ BFD_JUMP_TABLE macros.
.#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
.
@@ -274,6 +284,12 @@ BFD_JUMP_TABLE macros.
. {* 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)
@@ -282,6 +298,10 @@ BFD_JUMP_TABLE macros.
. 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);
.
@@ -333,8 +353,11 @@ BFD_JUMP_TABLE macros.
. 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
@@ -351,11 +374,16 @@ BFD_JUMP_TABLE macros.
. (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. *}
@@ -406,7 +434,9 @@ BFD_JUMP_TABLE macros.
. NAME##_bfd_link_split_section, \
. NAME##_bfd_gc_sections, \
. NAME##_bfd_merge_sections, \
-. NAME##_bfd_discard_group
+. 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)
@@ -443,13 +473,21 @@ BFD_JUMP_TABLE macros.
. {* 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
.
@@ -458,6 +496,10 @@ BFD_JUMP_TABLE macros.
. {* 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. *}
@@ -487,7 +529,6 @@ to find an alternative output format that is suitable.
Alphabetized for easy reference.
They are listed a second time below, since
we can't intermix extern's and initializers. */
-extern const bfd_target a29kcoff_big_vec;
extern const bfd_target a_out_adobe_vec;
extern const bfd_target aix5coff64_vec;
extern const bfd_target aout0_big_vec;
@@ -513,12 +554,18 @@ extern const bfd_target bfd_efi_app_ia32_vec;
extern const bfd_target bfd_efi_app_x86_64_vec;
extern const bfd_target bfd_efi_app_ia64_vec;
extern const bfd_target bfd_elf32_avr_vec;
+extern const bfd_target bfd_elf32_bfin_vec;
+extern const bfd_target bfd_elf32_bfinfdpic_vec;
extern const bfd_target bfd_elf32_big_generic_vec;
extern const bfd_target bfd_elf32_bigarc_vec;
-extern const bfd_target bfd_elf32_bigarm_oabi_vec;
extern const bfd_target bfd_elf32_bigarm_vec;
+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_cr16c_vec;
extern const bfd_target bfd_elf32_cris_vec;
+extern const bfd_target bfd_elf32_crx_vec;
extern const bfd_target bfd_elf32_d10v_vec;
extern const bfd_target bfd_elf32_d30v_vec;
extern const bfd_target bfd_elf32_dlx_big_vec;
@@ -531,6 +578,7 @@ extern const bfd_target bfd_elf32_hppa_nbsd_vec;
extern const bfd_target bfd_elf32_hppa_vec;
extern const bfd_target bfd_elf32_i370_vec;
extern const bfd_target bfd_elf32_i386_freebsd_vec;
+extern const bfd_target bfd_elf32_i386_vxworks_vec;
extern const bfd_target bfd_elf32_i386_vec;
extern const bfd_target bfd_elf32_i860_little_vec;
extern const bfd_target bfd_elf32_i860_vec;
@@ -541,9 +589,12 @@ extern const bfd_target bfd_elf32_ip2k_vec;
extern const bfd_target bfd_elf32_iq2000_vec;
extern const bfd_target bfd_elf32_little_generic_vec;
extern const bfd_target bfd_elf32_littlearc_vec;
-extern const bfd_target bfd_elf32_littlearm_oabi_vec;
extern const bfd_target bfd_elf32_littlearm_vec;
+extern const bfd_target bfd_elf32_littlearm_symbian_vec;
+extern const bfd_target bfd_elf32_littlearm_vxworks_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
+extern const bfd_target bfd_elf32_littlemips_vxworks_vec;
+extern const bfd_target bfd_elf32_m32c_vec;
extern const bfd_target bfd_elf32_m32r_vec;
extern const bfd_target bfd_elf32_m32rle_vec;
extern const bfd_target bfd_elf32_m32rlin_vec;
@@ -556,6 +607,7 @@ extern const bfd_target bfd_elf32_mcore_big_vec;
extern const bfd_target bfd_elf32_mcore_little_vec;
extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
+extern const bfd_target bfd_elf32_mt_vec;
extern const bfd_target bfd_elf32_msp430_vec;
extern const bfd_target bfd_elf32_nbigmips_vec;
extern const bfd_target bfd_elf32_nlittlemips_vec;
@@ -567,6 +619,7 @@ extern const bfd_target bfd_elf32_pj_vec;
extern const bfd_target bfd_elf32_pjl_vec;
extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
+extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
extern const bfd_target bfd_elf32_s390_vec;
extern const bfd_target bfd_elf32_sh64_vec;
extern const bfd_target bfd_elf32_sh64l_vec;
@@ -577,15 +630,18 @@ extern const bfd_target bfd_elf32_sh64nbsd_vec;
extern const bfd_target bfd_elf32_sh_vec;
extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
+extern const bfd_target bfd_elf32_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_shnbsd_vec;
extern const bfd_target bfd_elf32_sparc_vec;
+extern const bfd_target bfd_elf32_sparc_vxworks_vec;
extern const bfd_target bfd_elf32_tradbigmips_vec;
extern const bfd_target bfd_elf32_tradlittlemips_vec;
extern const bfd_target bfd_elf32_us_cris_vec;
extern const bfd_target bfd_elf32_v850_vec;
extern const bfd_target bfd_elf32_vax_vec;
+extern const bfd_target bfd_elf32_xc16x_vec;
extern const bfd_target bfd_elf32_xstormy16_vec;
extern const bfd_target bfd_elf32_xtensa_be_vec;
extern const bfd_target bfd_elf32_xtensa_le_vec;
@@ -655,15 +711,15 @@ extern const bfd_target m68kaux_coff_vec;
extern const bfd_target m68kcoff_vec;
extern const bfd_target m68kcoffun_vec;
extern const bfd_target m68klinux_vec;
-extern const bfd_target m68klynx_aout_vec;
-extern const bfd_target m68klynx_coff_vec;
extern const bfd_target m68knetbsd_vec;
extern const bfd_target m68ksysvcoff_vec;
extern const bfd_target m88kbcs_vec;
extern const bfd_target m88kmach3_vec;
+extern const bfd_target m88kopenbsd_vec;
extern const bfd_target mach_o_be_vec;
extern const bfd_target mach_o_le_vec;
extern const bfd_target mach_o_fat_vec;
+extern const bfd_target maxqcoff_vec;
extern const bfd_target mcore_pe_big_vec;
extern const bfd_target mcore_pe_little_vec;
extern const bfd_target mcore_pei_big_vec;
@@ -725,6 +781,7 @@ 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 z80coff_vec;
extern const bfd_target z8kcoff_vec;
/* These are always included. */
@@ -765,7 +822,6 @@ static const bfd_target * const _bfd_target_vector[] = {
Vectors that don't compile on all systems, or aren't finished,
should have an entry here with #if 0 around it, to show that
it wasn't omitted by mistake. */
- &a29kcoff_big_vec,
&a_out_adobe_vec,
#ifdef BFD64
&aix5coff64_vec,
@@ -801,6 +857,8 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_efi_app_ia64_vec,
#endif
&bfd_elf32_avr_vec,
+ &bfd_elf32_bfin_vec,
+ &bfd_elf32_bfinfdpic_vec,
/* This, and other vectors, may not be used in any *.mt configuration.
But that does not mean they are unnecessary. If configured with
@@ -808,10 +866,14 @@ static const bfd_target * const _bfd_target_vector[] = {
the file even if we don't recognize the machine type. */
&bfd_elf32_big_generic_vec,
&bfd_elf32_bigarc_vec,
- &bfd_elf32_bigarm_oabi_vec,
&bfd_elf32_bigarm_vec,
+ &bfd_elf32_bigarm_symbian_vec,
+ &bfd_elf32_bigarm_vxworks_vec,
&bfd_elf32_bigmips_vec,
+ &bfd_elf32_bigmips_vxworks_vec,
+ &bfd_elf32_cr16c_vec,
&bfd_elf32_cris_vec,
+ &bfd_elf32_crx_vec,
&bfd_elf32_d10v_vec,
&bfd_elf32_d30v_vec,
&bfd_elf32_dlx_big_vec,
@@ -824,6 +886,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_hppa_vec,
&bfd_elf32_i370_vec,
&bfd_elf32_i386_freebsd_vec,
+ &bfd_elf32_i386_vxworks_vec,
&bfd_elf32_i386_vec,
&bfd_elf32_i860_little_vec,
&bfd_elf32_i860_vec,
@@ -831,14 +894,19 @@ static const bfd_target * const _bfd_target_vector[] = {
#if 0
&bfd_elf32_ia64_big_vec,
#endif
+#ifdef BFD64
&bfd_elf32_ia64_hpux_big_vec,
+#endif
&bfd_elf32_ip2k_vec,
&bfd_elf32_iq2000_vec,
&bfd_elf32_little_generic_vec,
&bfd_elf32_littlearc_vec,
- &bfd_elf32_littlearm_oabi_vec,
&bfd_elf32_littlearm_vec,
+ &bfd_elf32_littlearm_symbian_vec,
+ &bfd_elf32_littlearm_vxworks_vec,
&bfd_elf32_littlemips_vec,
+ &bfd_elf32_littlemips_vxworks_vec,
+ &bfd_elf32_m32c_vec,
&bfd_elf32_m32r_vec,
&bfd_elf32_m32rle_vec,
&bfd_elf32_m32rlin_vec,
@@ -851,6 +919,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_mcore_little_vec,
&bfd_elf32_mn10200_vec,
&bfd_elf32_mn10300_vec,
+ &bfd_elf32_mt_vec,
&bfd_elf32_msp430_vec,
#ifdef BFD64
&bfd_elf32_nbigmips_vec,
@@ -863,11 +932,13 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_pj_vec,
&bfd_elf32_pjl_vec,
&bfd_elf32_powerpc_vec,
+ &bfd_elf32_powerpc_vxworks_vec,
&bfd_elf32_powerpcle_vec,
&bfd_elf32_s390_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_shnbsd_vec,
@@ -880,11 +951,13 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_sh64blin_vec,
#endif
&bfd_elf32_sparc_vec,
+ &bfd_elf32_sparc_vxworks_vec,
&bfd_elf32_tradbigmips_vec,
&bfd_elf32_tradlittlemips_vec,
&bfd_elf32_us_cris_vec,
&bfd_elf32_v850_vec,
&bfd_elf32_vax_vec,
+ &bfd_elf32_xc16x_vec,
&bfd_elf32_xstormy16_vec,
&bfd_elf32_xtensa_be_vec,
&bfd_elf32_xtensa_le_vec,
@@ -914,7 +987,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf64_tradbigmips_vec,
&bfd_elf64_tradlittlemips_vec,
&bfd_elf64_x86_64_vec,
- &bfd_mmo_vec,
+ &bfd_mmo_vec,
#endif
&bfd_powerpc_pe_vec,
&bfd_powerpc_pei_vec,
@@ -980,15 +1053,15 @@ static const bfd_target * const _bfd_target_vector[] = {
which kind of a.out file it is. */
&m68klinux_vec,
#endif
- &m68klynx_aout_vec,
- &m68klynx_coff_vec,
&m68knetbsd_vec,
&m68ksysvcoff_vec,
&m88kbcs_vec,
&m88kmach3_vec,
+ &m88kopenbsd_vec,
&mach_o_be_vec,
&mach_o_le_vec,
&mach_o_fat_vec,
+ &maxqcoff_vec,
&mcore_pe_big_vec,
&mcore_pe_little_vec,
&mcore_pei_big_vec,
@@ -1067,6 +1140,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&vms_vax_vec,
&w65_vec,
&we32kcoff_vec,
+ &z80coff_vec,
&z8kcoff_vec,
&bfd_elf32_am33lin_vec,
#endif /* not SELECT_VECS */
diff --git a/contrib/binutils/bfd/tekhex.c b/contrib/binutils/bfd/tekhex.c
index f828fe7393c1..afe42cc948a9 100644
--- a/contrib/binutils/bfd/tekhex.c
+++ b/contrib/binutils/bfd/tekhex.c
@@ -1,29 +1,28 @@
/* BFD backend for Extended Tektronix Hex Format objects.
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004 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.
+ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-/*
-SUBSECTION
+/* SUBSECTION
Tektronix Hex Format handling
-DESCRIPTION
+ DESCRIPTION
Tek Hex records can hold symbols and data, but not
relocations. Their main application is communication with
@@ -50,10 +49,10 @@ DESCRIPTION
up and output them when it's time to close the bfd.
A TekHex record looks like:
-EXAMPLE
+ EXAMPLE
%<block length><type><checksum><stuff><cr>
-DESCRIPTION
+ DESCRIPTION
Where
o length
is the number of bytes in the record not including the % sign.
@@ -63,9 +62,8 @@ DESCRIPTION
6) data record
8) termination record
-The data can come out of order, and may be discontigous. This is a
-serial protocol, so big files are unlikely, so we keep a list of 8k chunks
-*/
+ 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"
@@ -73,170 +71,136 @@ serial protocol, so big files are unlikely, so we keep a list of 8k chunks
#include "libiberty.h"
typedef struct
- {
- bfd_vma low;
- bfd_vma high;
- } addr_range_type;
+{
+ bfd_vma low;
+ bfd_vma high;
+} addr_range_type;
typedef struct tekhex_symbol_struct
- {
-
- asymbol symbol;
- struct tekhex_symbol_struct *prev;
-
- } tekhex_symbol_type;
+{
+ asymbol symbol;
+ struct tekhex_symbol_struct *prev;
+} tekhex_symbol_type;
static const char digs[] = "0123456789ABCDEF";
static char sum_block[256];
-#define NOT_HEX 20
-#define NIBBLE(x) hex_value(x)
-#define HEX(buffer) ((NIBBLE((buffer)[0])<<4) + NIBBLE((buffer)[1]))
-#define TOHEX(d,x) \
-(d)[1] = digs[(x) & 0xf]; \
-(d)[0] = digs[((x)>>4)&0xf];
-#define ISHEX(x) hex_p(x)
-
-static void tekhex_init PARAMS ((void));
-static bfd_vma getvalue PARAMS ((char **));
-static void tekhex_print_symbol
- PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
-static void tekhex_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
-static asymbol *tekhex_make_empty_symbol PARAMS ((bfd *));
-static int tekhex_sizeof_headers PARAMS ((bfd *, bfd_boolean));
-static bfd_boolean tekhex_write_object_contents PARAMS ((bfd *));
-static void out PARAMS ((bfd *, int, char *, char *));
-static void writesym PARAMS ((char **, const char *));
-static void writevalue PARAMS ((char **, bfd_vma));
-static bfd_boolean tekhex_set_section_contents
- PARAMS ((bfd*, sec_ptr, const PTR, file_ptr, bfd_size_type));
-static bfd_boolean tekhex_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long));
-static bfd_boolean tekhex_get_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
-static void move_section_contents
- PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type, bfd_boolean));
-static const bfd_target *tekhex_object_p PARAMS ((bfd *));
-static bfd_boolean tekhex_mkobject PARAMS ((bfd *));
-static long tekhex_get_symtab_upper_bound PARAMS ((bfd *));
-static long tekhex_canonicalize_symtab PARAMS ((bfd *, asymbol **));
-static void pass_over PARAMS ((bfd *, void (*) (bfd*, int, char *)));
-static void first_phase PARAMS ((bfd *, int, char *));
-static void insert_byte PARAMS ((bfd *, int, bfd_vma));
-static struct data_struct *find_chunk PARAMS ((bfd *, bfd_vma));
-static unsigned int getsym PARAMS ((char *, char **));
-
-/*
-Here's an example
-%3A6C6480004E56FFFC4E717063B0AEFFFC6D0652AEFFFC60F24E5E4E75
-%1B3709T_SEGMENT1108FFFFFFFF
-%2B3AB9T_SEGMENT7Dgcc_compiled$1087hello$c10
-%373829T_SEGMENT80int$t1$r1$$214741080char$t2$r2$0$12710
-%373769T_SEGMENT80long$int$t3$r1$$1080unsigned$int$t4$10
-%373CA9T_SEGMENT80long$unsigned$in1080short$int$t6$r1$10
-%373049T_SEGMENT80long$long$int$t71080short$unsigned$i10
-%373A29T_SEGMENT80long$long$unsign1080signed$char$t10$10
-%373D69T_SEGMENT80unsigned$char$t11080float$t12$r1$4$010
-%373D19T_SEGMENT80double$t13$r1$8$1080long$double$t14$10
-%2734D9T_SEGMENT8Bvoid$t15$151035_main10
-%2F3CA9T_SEGMENT81$1081$1681$1E81$21487main$F110
-%2832F9T_SEGMENT83i$18FFFFFFFC81$1481$214
-%07 8 10 10
-
-explanation:
-%3A6C6480004E56FFFC4E717063B0AEFFFC6D0652AEFFFC60F24E5E4E75
- ^ ^^ ^ ^-data
- | || +------ 4 char integer 0x8000
- | |+-------- checksum
- | +--------- type 6 (data record)
- +----------- length 3a chars
- <---------------------- 3a (58 chars) ------------------->
-
-%1B3709T_SEGMENT1108FFFFFFFF
- ^ ^^ ^- 8 character integer 0xffffffff
- | |+- 1 character integer 0
- | +-- type 1 symbol (section definition)
- +------------ 9 char symbol T_SEGMENT
-
-%2B3AB9T_SEGMENT7Dgcc_compiled$1087hello$c10
-%373829T_SEGMENT80int$t1$r1$$214741080char$t2$r2$0$12710
-%373769T_SEGMENT80long$int$t3$r1$$1080unsigned$int$t4$10
-%373CA9T_SEGMENT80long$unsigned$in1080short$int$t6$r1$10
-%373049T_SEGMENT80long$long$int$t71080short$unsigned$i10
-%373A29T_SEGMENT80long$long$unsign1080signed$char$t10$10
-%373D69T_SEGMENT80unsigned$char$t11080float$t12$r1$4$010
-%373D19T_SEGMENT80double$t13$r1$8$1080long$double$t14$10
-%2734D9T_SEGMENT8Bvoid$t15$151035_main10
-%2F3CA9T_SEGMENT81$1081$1681$1E81$21487main$F110
-%2832F9T_SEGMENT83i$18FFFFFFFC81$1481$214
-%0781010
-
-Turns into
-sac@thepub$ ./objdump -dx -m m68k f
-
-f: file format tekhex
------x--- 9/55728 -134219416 Sep 29 15:13 1995 f
-architecture: UNKNOWN!, flags 0x00000010:
-HAS_SYMS
-start address 0x00000000
-SECTION 0 [D00000000] : size 00020000 vma 00000000 align 2**0
- ALLOC, LOAD
-SECTION 1 [D00008000] : size 00002001 vma 00008000 align 2**0
-
-SECTION 2 [T_SEGMENT] : size ffffffff vma 00000000 align 2**0
-
-SYMBOL TABLE:
-00000000 g T_SEGMENT gcc_compiled$
-00000000 g T_SEGMENT hello$c
-00000000 g T_SEGMENT int$t1$r1$$21474
-00000000 g T_SEGMENT char$t2$r2$0$127
-00000000 g T_SEGMENT long$int$t3$r1$$
-00000000 g T_SEGMENT unsigned$int$t4$
-00000000 g T_SEGMENT long$unsigned$in
-00000000 g T_SEGMENT short$int$t6$r1$
-00000000 g T_SEGMENT long$long$int$t7
-00000000 g T_SEGMENT short$unsigned$i
-00000000 g T_SEGMENT long$long$unsign
-00000000 g T_SEGMENT signed$char$t10$
-00000000 g T_SEGMENT unsigned$char$t1
-00000000 g T_SEGMENT float$t12$r1$4$0
-00000000 g T_SEGMENT double$t13$r1$8$
-00000000 g T_SEGMENT long$double$t14$
-00000000 g T_SEGMENT void$t15$15
-00000000 g T_SEGMENT _main
-00000000 g T_SEGMENT $
-00000000 g T_SEGMENT $
-00000000 g T_SEGMENT $
-00000010 g T_SEGMENT $
-00000000 g T_SEGMENT main$F1
-fcffffff g T_SEGMENT i$1
-00000000 g T_SEGMENT $
-00000010 g T_SEGMENT $
-
-RELOCATION RECORDS FOR [D00000000]: (none)
-
-RELOCATION RECORDS FOR [D00008000]: (none)
-
-RELOCATION RECORDS FOR [T_SEGMENT]: (none)
-
-Disassembly of section D00000000:
-...
-00008000 ($+)7ff0 linkw fp,#-4
-00008004 ($+)7ff4 nop
-00008006 ($+)7ff6 movel #99,d0
-00008008 ($+)7ff8 cmpl fp@(-4),d0
-0000800c ($+)7ffc blts 00008014 ($+)8004
-0000800e ($+)7ffe addql #1,fp@(-4)
-00008012 ($+)8002 bras 00008006 ($+)7ff6
-00008014 ($+)8004 unlk fp
-00008016 ($+)8006 rts
-...
-
-*/
+#define NOT_HEX 20
+#define NIBBLE(x) hex_value(x)
+#define HEX(buffer) ((NIBBLE ((buffer)[0]) << 4) + NIBBLE ((buffer)[1]))
+#define ISHEX(x) hex_p(x)
+#define TOHEX(d, x) \
+ (d)[1] = digs[(x) & 0xf]; \
+ (d)[0] = digs[((x)>>4)&0xf];
+
+/* Here's an example
+ %3A6C6480004E56FFFC4E717063B0AEFFFC6D0652AEFFFC60F24E5E4E75
+ %1B3709T_SEGMENT1108FFFFFFFF
+ %2B3AB9T_SEGMENT7Dgcc_compiled$1087hello$c10
+ %373829T_SEGMENT80int$t1$r1$$214741080char$t2$r2$0$12710
+ %373769T_SEGMENT80long$int$t3$r1$$1080unsigned$int$t4$10
+ %373CA9T_SEGMENT80long$unsigned$in1080short$int$t6$r1$10
+ %373049T_SEGMENT80long$long$int$t71080short$unsigned$i10
+ %373A29T_SEGMENT80long$long$unsign1080signed$char$t10$10
+ %373D69T_SEGMENT80unsigned$char$t11080float$t12$r1$4$010
+ %373D19T_SEGMENT80double$t13$r1$8$1080long$double$t14$10
+ %2734D9T_SEGMENT8Bvoid$t15$151035_main10
+ %2F3CA9T_SEGMENT81$1081$1681$1E81$21487main$F110
+ %2832F9T_SEGMENT83i$18FFFFFFFC81$1481$214
+ %07 8 10 10
+
+ explanation:
+ %3A6C6480004E56FFFC4E717063B0AEFFFC6D0652AEFFFC60F24E5E4E75
+ ^ ^^ ^ ^-data
+ | || +------ 4 char integer 0x8000
+ | |+-------- checksum
+ | +--------- type 6 (data record)
+ +----------- length 3a chars
+ <---------------------- 3a (58 chars) ------------------->
+
+ %1B3709T_SEGMENT1108FFFFFFFF
+ ^ ^^ ^- 8 character integer 0xffffffff
+ | |+- 1 character integer 0
+ | +-- type 1 symbol (section definition)
+ +------------ 9 char symbol T_SEGMENT
+
+ %2B3AB9T_SEGMENT7Dgcc_compiled$1087hello$c10
+ %373829T_SEGMENT80int$t1$r1$$214741080char$t2$r2$0$12710
+ %373769T_SEGMENT80long$int$t3$r1$$1080unsigned$int$t4$10
+ %373CA9T_SEGMENT80long$unsigned$in1080short$int$t6$r1$10
+ %373049T_SEGMENT80long$long$int$t71080short$unsigned$i10
+ %373A29T_SEGMENT80long$long$unsign1080signed$char$t10$10
+ %373D69T_SEGMENT80unsigned$char$t11080float$t12$r1$4$010
+ %373D19T_SEGMENT80double$t13$r1$8$1080long$double$t14$10
+ %2734D9T_SEGMENT8Bvoid$t15$151035_main10
+ %2F3CA9T_SEGMENT81$1081$1681$1E81$21487main$F110
+ %2832F9T_SEGMENT83i$18FFFFFFFC81$1481$214
+ %0781010
+
+ Turns into
+ sac@thepub$ ./objdump -dx -m m68k f
+
+ f: file format tekhex
+ -----x--- 9/55728 -134219416 Sep 29 15:13 1995 f
+ architecture: UNKNOWN!, flags 0x00000010:
+ HAS_SYMS
+ start address 0x00000000
+ SECTION 0 [D00000000] : size 00020000 vma 00000000 align 2**0
+ ALLOC, LOAD
+ SECTION 1 [D00008000] : size 00002001 vma 00008000 align 2**0
+
+ SECTION 2 [T_SEGMENT] : size ffffffff vma 00000000 align 2**0
+
+ SYMBOL TABLE:
+ 00000000 g T_SEGMENT gcc_compiled$
+ 00000000 g T_SEGMENT hello$c
+ 00000000 g T_SEGMENT int$t1$r1$$21474
+ 00000000 g T_SEGMENT char$t2$r2$0$127
+ 00000000 g T_SEGMENT long$int$t3$r1$$
+ 00000000 g T_SEGMENT unsigned$int$t4$
+ 00000000 g T_SEGMENT long$unsigned$in
+ 00000000 g T_SEGMENT short$int$t6$r1$
+ 00000000 g T_SEGMENT long$long$int$t7
+ 00000000 g T_SEGMENT short$unsigned$i
+ 00000000 g T_SEGMENT long$long$unsign
+ 00000000 g T_SEGMENT signed$char$t10$
+ 00000000 g T_SEGMENT unsigned$char$t1
+ 00000000 g T_SEGMENT float$t12$r1$4$0
+ 00000000 g T_SEGMENT double$t13$r1$8$
+ 00000000 g T_SEGMENT long$double$t14$
+ 00000000 g T_SEGMENT void$t15$15
+ 00000000 g T_SEGMENT _main
+ 00000000 g T_SEGMENT $
+ 00000000 g T_SEGMENT $
+ 00000000 g T_SEGMENT $
+ 00000010 g T_SEGMENT $
+ 00000000 g T_SEGMENT main$F1
+ fcffffff g T_SEGMENT i$1
+ 00000000 g T_SEGMENT $
+ 00000010 g T_SEGMENT $
+
+ RELOCATION RECORDS FOR [D00000000]: (none)
+
+ RELOCATION RECORDS FOR [D00008000]: (none)
+
+ RELOCATION RECORDS FOR [T_SEGMENT]: (none)
+
+ Disassembly of section D00000000:
+ ...
+ 00008000 ($+)7ff0 linkw fp,#-4
+ 00008004 ($+)7ff4 nop
+ 00008006 ($+)7ff6 movel #99,d0
+ 00008008 ($+)7ff8 cmpl fp@(-4),d0
+ 0000800c ($+)7ffc blts 00008014 ($+)8004
+ 0000800e ($+)7ffe addql #1,fp@(-4)
+ 00008012 ($+)8002 bras 00008006 ($+)7ff6
+ 00008014 ($+)8004 unlk fp
+ 00008016 ($+)8006 rts
+ ... */
static void
-tekhex_init ()
+tekhex_init (void)
{
unsigned int i;
static bfd_boolean inited = FALSE;
@@ -248,27 +212,23 @@ tekhex_init ()
hex_init ();
val = 0;
for (i = 0; i < 10; i++)
- {
- sum_block[i + '0'] = val++;
- }
+ sum_block[i + '0'] = val++;
+
for (i = 'A'; i <= 'Z'; i++)
- {
- sum_block[i] = val++;
- }
+ sum_block[i] = val++;
+
sum_block['$'] = val++;
sum_block['%'] = val++;
sum_block['.'] = val++;
sum_block['_'] = val++;
for (i = 'a'; i <= 'z'; i++)
- {
- sum_block[i] = val++;
- }
+ sum_block[i] = val++;
}
}
-/* The maximum number of bytes on a line is FF */
+/* The maximum number of bytes on a line is FF. */
#define MAXCHUNK 0xff
-/* The number of bytes we fit onto a line on output */
+/* The number of bytes we fit onto a line on output. */
#define CHUNK 21
/* We cannot output our tekhexords as we see them, we have to glue them
@@ -287,12 +247,12 @@ typedef struct tekhex_data_list_struct tekhex_data_list_type;
#define CHUNK_MASK 0x1fff
struct data_struct
- {
- char chunk_data[CHUNK_MASK + 1];
- char chunk_init[CHUNK_MASK + 1];
- bfd_vma vma;
- struct data_struct *next;
- };
+{
+ char chunk_data[CHUNK_MASK + 1];
+ char chunk_init[CHUNK_MASK + 1];
+ bfd_vma vma;
+ struct data_struct *next;
+};
typedef struct tekhex_data_struct
{
@@ -304,59 +264,65 @@ typedef struct tekhex_data_struct
#define enda(x) (x->vma + x->size)
-static bfd_vma
-getvalue (srcp)
- char **srcp;
+static bfd_boolean
+getvalue (char **srcp, bfd_vma *valuep)
{
char *src = *srcp;
bfd_vma value = 0;
- unsigned int len = hex_value(*src++);
+ unsigned int len;
+
+ if (!ISHEX (*src))
+ return FALSE;
+ len = hex_value (*src++);
if (len == 0)
len = 16;
while (len--)
{
- value = value << 4 | hex_value(*src++);
+ if (!ISHEX (*src))
+ return FALSE;
+ value = value << 4 | hex_value (*src++);
}
+
*srcp = src;
- return value;
+ *valuep = value;
+ return TRUE;
}
-static unsigned int
-getsym (dstp, srcp)
- char *dstp;
- char **srcp;
+static bfd_boolean
+getsym (char *dstp, char **srcp, unsigned int *lenp)
{
char *src = *srcp;
unsigned int i;
- unsigned int len = hex_value(*src++);
+ unsigned int len;
+
+ if (!ISHEX (*src))
+ return FALSE;
+ len = hex_value (*src++);
if (len == 0)
len = 16;
for (i = 0; i < len; i++)
dstp[i] = src[i];
dstp[i] = 0;
*srcp = src + i;
- return len;
+ *lenp = len;
+ return TRUE;
}
static struct data_struct *
-find_chunk (abfd, vma)
- bfd *abfd;
- bfd_vma vma;
+find_chunk (bfd *abfd, bfd_vma vma)
{
struct data_struct *d = abfd->tdata.tekhex_data->data;
vma &= ~CHUNK_MASK;
while (d && (d->vma) != vma)
- {
- d = d->next;
- }
+ d = d->next;
+
if (!d)
{
- /* No chunk for this address, so make one up */
- d = ((struct data_struct *)
- bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct)));
+ /* No chunk for this address, so make one up. */
+ d = bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct));
if (!d)
return NULL;
@@ -369,12 +335,9 @@ find_chunk (abfd, vma)
}
static void
-insert_byte (abfd, value, addr)
- bfd *abfd;
- int value;
- bfd_vma addr;
+insert_byte (bfd *abfd, int value, bfd_vma addr)
{
- /* Find the chunk that this byte needs and put it in */
+ /* Find the chunk that this byte needs and put it in. */
struct data_struct *d = find_chunk (abfd, addr);
d->chunk_data[addr & CHUNK_MASK] = value;
@@ -382,23 +345,25 @@ insert_byte (abfd, value, addr)
}
/* The first pass is to find the names of all the sections, and see
- how big the data is */
-static void
-first_phase (abfd, type, src)
- bfd *abfd;
- int type;
- char *src;
+ how big the data is. */
+
+static bfd_boolean
+first_phase (bfd *abfd, int type, char *src)
{
asection *section = bfd_abs_section_ptr;
unsigned int len;
- char sym[17]; /* A symbol can only be 16chars long */
+ bfd_vma val;
+ char sym[17]; /* A symbol can only be 16chars long. */
switch (type)
{
case '6':
- /* Data record - read it and store it */
+ /* Data record - read it and store it. */
{
- bfd_vma addr = getvalue (&src);
+ bfd_vma addr;
+
+ if (!getvalue (&src, &addr))
+ return FALSE;
while (*src)
{
@@ -408,17 +373,18 @@ first_phase (abfd, type, src)
}
}
- return;
+ return TRUE;
case '3':
- /* Symbol record, read the segment */
- len = getsym (sym, &src);
+ /* Symbol record, read the segment. */
+ if (!getsym (sym, &src, &len))
+ return FALSE;
section = bfd_get_section_by_name (abfd, sym);
- if (section == (asection *) NULL)
+ if (section == NULL)
{
char *n = bfd_alloc (abfd, (bfd_size_type) len + 1);
if (!n)
- abort (); /* FIXME */
+ return FALSE;
memcpy (n, sym, len + 1);
section = bfd_make_section (abfd, n);
}
@@ -426,10 +392,13 @@ first_phase (abfd, type, src)
{
switch (*src)
{
- case '1': /* section range */
+ case '1': /* Section range. */
src++;
- section->vma = getvalue (&src);
- section->_raw_size = getvalue (&src) - section->vma;
+ if (!getvalue (&src, &section->vma))
+ return FALSE;
+ if (!getvalue (&src, &val))
+ return FALSE;
+ section->size = val - section->vma;
section->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
break;
case '0':
@@ -439,50 +408,54 @@ first_phase (abfd, type, src)
case '6':
case '7':
case '8':
- /* Symbols, add to section */
+ /* Symbols, add to section. */
{
bfd_size_type amt = sizeof (tekhex_symbol_type);
- tekhex_symbol_type *new =
- (tekhex_symbol_type *) bfd_alloc (abfd, amt);
+ tekhex_symbol_type *new = bfd_alloc (abfd, amt);
char stype = (*src);
if (!new)
- abort (); /* FIXME */
+ return FALSE;
new->symbol.the_bfd = abfd;
src++;
abfd->symcount++;
abfd->flags |= HAS_SYMS;
new->prev = abfd->tdata.tekhex_data->symbols;
abfd->tdata.tekhex_data->symbols = new;
- len = getsym (sym, &src);
+ if (!getsym (sym, &src, &len))
+ return FALSE;
new->symbol.name = bfd_alloc (abfd, (bfd_size_type) len + 1);
if (!new->symbol.name)
- abort (); /* FIXME */
+ return FALSE;
memcpy ((char *) (new->symbol.name), sym, len + 1);
new->symbol.section = section;
if (stype <= '4')
new->symbol.flags = (BSF_GLOBAL | BSF_EXPORT);
else
new->symbol.flags = BSF_LOCAL;
- new->symbol.value = getvalue (&src) - section->vma;
+ if (!getvalue (&src, &val))
+ return FALSE;
+ new->symbol.value = val - section->vma;
}
+ default:
+ return FALSE;
}
}
}
+
+ return TRUE;
}
/* Pass over a tekhex, calling one of the above functions on each
record. */
-static void
-pass_over (abfd, func)
- bfd *abfd;
- void (*func) PARAMS ((bfd *, int, char *));
+static bfd_boolean
+pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *))
{
unsigned int chars_on_line;
bfd_boolean eof = FALSE;
- /* To the front of the file */
+ /* To the front of the file. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
abort ();
while (! eof)
@@ -491,40 +464,42 @@ pass_over (abfd, func)
char *src = buffer;
char type;
- /* Find first '%' */
+ /* Find first '%'. */
eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
while (*src != '%' && !eof)
- {
- eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
- }
+ eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
+
if (eof)
break;
src++;
- /* Fetch the type and the length and the checksum */
+ /* Fetch the type and the length and the checksum. */
if (bfd_bread (src, (bfd_size_type) 5, abfd) != 5)
- abort (); /* FIXME */
+ abort (); /* FIXME. */
type = src[2];
if (!ISHEX (src[0]) || !ISHEX (src[1]))
break;
- chars_on_line = HEX (src) - 5; /* Already read five char */
+ /* Already read five char. */
+ chars_on_line = HEX (src) - 5;
if (bfd_bread (src, (bfd_size_type) chars_on_line, abfd) != chars_on_line)
- abort (); /* FIXME */
- src[chars_on_line] = 0; /* put a null at the end */
+ abort (); /* FIXME. */
+
+ /* Put a null at the end. */
+ src[chars_on_line] = 0;
- func (abfd, type, src);
+ if (!func (abfd, type, src))
+ return FALSE;
}
+ return TRUE;
}
static long
-tekhex_canonicalize_symtab (abfd, table)
- bfd *abfd;
- asymbol **table;
+tekhex_canonicalize_symtab (bfd *abfd, asymbol **table)
{
tekhex_symbol_type *p = abfd->tdata.tekhex_data->symbols;
unsigned int c = bfd_get_symcount (abfd);
@@ -540,37 +515,33 @@ tekhex_canonicalize_symtab (abfd, table)
}
static long
-tekhex_get_symtab_upper_bound (abfd)
- bfd *abfd;
+tekhex_get_symtab_upper_bound (bfd *abfd)
{
return (abfd->symcount + 1) * (sizeof (struct tekhex_asymbol_struct *));
}
static bfd_boolean
-tekhex_mkobject (abfd)
- bfd *abfd;
+tekhex_mkobject (bfd *abfd)
{
tdata_type *tdata;
- tdata = (tdata_type *) bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type));
+ tdata = bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type));
if (!tdata)
return FALSE;
abfd->tdata.tekhex_data = tdata;
tdata->type = 1;
- tdata->head = (tekhex_data_list_type *) NULL;
- tdata->symbols = (struct tekhex_symbol_struct *) NULL;
- tdata->data = (struct data_struct *) NULL;
+ tdata->head = NULL;
+ tdata->symbols = NULL;
+ tdata->data = NULL;
return TRUE;
}
-/*
- Return TRUE if the file looks like it's in TekHex format. Just look
- for a percent sign and some hex digits */
+/* Return TRUE if the file looks like it's in TekHex format. Just look
+ for a percent sign and some hex digits. */
static const bfd_target *
-tekhex_object_p (abfd)
- bfd *abfd;
+tekhex_object_p (bfd *abfd)
{
char b[4];
@@ -581,27 +552,28 @@ tekhex_object_p (abfd)
return NULL;
if (b[0] != '%' || !ISHEX (b[1]) || !ISHEX (b[2]) || !ISHEX (b[3]))
- return (const bfd_target *) NULL;
+ return NULL;
tekhex_mkobject (abfd);
- pass_over (abfd, first_phase);
+ if (!pass_over (abfd, first_phase))
+ return NULL;
+
return abfd->xvec;
}
static void
-move_section_contents (abfd, section, locationp, offset, count, get)
- bfd *abfd;
- asection *section;
- const PTR locationp;
- file_ptr offset;
- bfd_size_type count;
- bfd_boolean get;
+move_section_contents (bfd *abfd,
+ asection *section,
+ const void * locationp,
+ file_ptr offset,
+ bfd_size_type count,
+ bfd_boolean get)
{
bfd_vma addr;
char *location = (char *) locationp;
- bfd_vma prev_number = 1; /* Nothing can have this as a high bit*/
- struct data_struct *d = (struct data_struct *) NULL;
+ bfd_vma prev_number = 1; /* Nothing can have this as a high bit. */
+ struct data_struct *d = NULL;
BFD_ASSERT (offset == 0);
for (addr = section->vma; count != 0; count--, addr++)
@@ -611,21 +583,15 @@ move_section_contents (abfd, section, locationp, offset, count, get)
bfd_vma low_bits = addr & CHUNK_MASK;
if (chunk_number != prev_number)
- {
- /* Different chunk, so move pointer */
- d = find_chunk (abfd, chunk_number);
- }
+ /* Different chunk, so move pointer. */
+ d = find_chunk (abfd, chunk_number);
if (get)
{
if (d->chunk_init[low_bits])
- {
- *location = d->chunk_data[low_bits];
- }
+ *location = d->chunk_data[low_bits];
else
- {
- *location = 0;
- }
+ *location = 0;
}
else
{
@@ -634,52 +600,45 @@ move_section_contents (abfd, section, locationp, offset, count, get)
}
location++;
-
}
-
}
static bfd_boolean
-tekhex_get_section_contents (abfd, section, locationp, offset, count)
- bfd *abfd;
- asection *section;
- PTR locationp;
- file_ptr offset;
- bfd_size_type count;
+tekhex_get_section_contents (bfd *abfd,
+ asection *section,
+ void * locationp,
+ file_ptr offset,
+ bfd_size_type count)
{
if (section->flags & (SEC_LOAD | SEC_ALLOC))
{
move_section_contents (abfd, section, locationp, offset, count, TRUE);
return TRUE;
}
- else
- return FALSE;
+
+ return FALSE;
}
static bfd_boolean
-tekhex_set_arch_mach (abfd, arch, machine)
- bfd *abfd;
- enum bfd_architecture arch;
- unsigned long machine;
+tekhex_set_arch_mach (bfd *abfd,
+ enum bfd_architecture arch,
+ unsigned long machine)
{
return bfd_default_set_arch_mach (abfd, arch, machine);
}
-/* we have to save up all the Tekhexords for a splurge before output,
- */
+/* We have to save up all the Tekhexords for a splurge before output. */
static bfd_boolean
-tekhex_set_section_contents (abfd, section, locationp, offset, bytes_to_do)
- bfd *abfd;
- sec_ptr section;
- const PTR locationp;
- file_ptr offset;
- bfd_size_type bytes_to_do;
+tekhex_set_section_contents (bfd *abfd,
+ sec_ptr section,
+ const void * locationp,
+ file_ptr offset,
+ bfd_size_type bytes_to_do)
{
-
if (! abfd->output_has_begun)
{
- /* The first time around, allocate enough sections to hold all the chunks */
+ /* The first time around, allocate enough sections to hold all the chunks. */
asection *s = abfd->sections;
bfd_vma vma;
@@ -688,28 +647,25 @@ tekhex_set_section_contents (abfd, section, locationp, offset, bytes_to_do)
if (s->flags & SEC_LOAD)
{
for (vma = s->vma & ~(bfd_vma) CHUNK_MASK;
- vma < s->vma + s->_raw_size;
+ vma < s->vma + s->size;
vma += CHUNK_MASK)
find_chunk (abfd, vma);
}
}
-
}
+
if (section->flags & (SEC_LOAD | SEC_ALLOC))
{
move_section_contents (abfd, section, locationp, offset, bytes_to_do,
FALSE);
return TRUE;
}
- else
- return FALSE;
+ return FALSE;
}
static void
-writevalue (dst, value)
- char **dst;
- bfd_vma value;
+writevalue (char **dst, bfd_vma value)
{
char *p = *dst;
int len;
@@ -737,9 +693,7 @@ writevalue (dst, value)
}
static void
-writesym (dst, sym)
- char **dst;
- const char *sym;
+writesym (char **dst, const char *sym)
{
char *p = *dst;
int len = (sym ? strlen (sym) : 0);
@@ -749,7 +703,6 @@ writesym (dst, sym)
*p++ = '0';
len = 16;
}
-
else
{
if (len == 0)
@@ -759,24 +712,17 @@ writesym (dst, sym)
len = 1;
}
else
- {
- *p++ = digs[len];
- }
+ *p++ = digs[len];
}
while (len--)
- {
- *p++ = *sym++;
- }
+ *p++ = *sym++;
+
*dst = p;
}
static void
-out (abfd, type, start, end)
- bfd *abfd;
- int type;
- char *start;
- char *end;
+out (bfd *abfd, int type, char *start, char *end)
{
int sum = 0;
char *s;
@@ -788,13 +734,11 @@ out (abfd, type, start, end)
front[3] = type;
for (s = start; s < end; s++)
- {
- sum += sum_block[(unsigned char) *s];
- }
+ sum += sum_block[(unsigned char) *s];
- sum += sum_block[(unsigned char) front[1]]; /* length */
+ sum += sum_block[(unsigned char) front[1]]; /* Length. */
sum += sum_block[(unsigned char) front[2]];
- sum += sum_block[(unsigned char) front[3]]; /* type */
+ sum += sum_block[(unsigned char) front[3]]; /* Type. */
TOHEX (front + 4, sum);
if (bfd_bwrite (front, (bfd_size_type) 6, abfd) != 6)
abort ();
@@ -805,8 +749,7 @@ out (abfd, type, start, end)
}
static bfd_boolean
-tekhex_write_object_contents (abfd)
- bfd *abfd;
+tekhex_write_object_contents (bfd *abfd)
{
int bytes_written;
char buffer[100];
@@ -818,9 +761,9 @@ tekhex_write_object_contents (abfd)
bytes_written = 0;
- /* And the raw data */
+ /* And the raw data. */
for (d = abfd->tdata.tekhex_data->data;
- d != (struct data_struct *) NULL;
+ d != NULL;
d = d->next)
{
int low;
@@ -828,18 +771,16 @@ tekhex_write_object_contents (abfd)
const int span = 32;
int addr;
- /* Write it in blocks of 32 bytes */
-
+ /* Write it in blocks of 32 bytes. */
for (addr = 0; addr < CHUNK_MASK + 1; addr += span)
{
int need = 0;
- /* Check to see if necessary */
+ /* Check to see if necessary. */
for (low = 0; !need && low < span; low++)
- {
- if (d->chunk_init[addr + low])
- need = 1;
- }
+ if (d->chunk_init[addr + low])
+ need = 1;
+
if (need)
{
char *dst = buffer;
@@ -854,19 +795,20 @@ tekhex_write_object_contents (abfd)
}
}
}
- /* write all the section headers for the sections */
- for (s = abfd->sections; s != (asection *) NULL; s = s->next)
+
+ /* Write all the section headers for the sections. */
+ for (s = abfd->sections; s != NULL; s = s->next)
{
char *dst = buffer;
writesym (&dst, s->name);
*dst++ = '1';
writevalue (&dst, s->vma);
- writevalue (&dst, s->vma + s->_raw_size);
+ writevalue (&dst, s->vma + s->size);
out (abfd, '3', buffer, dst);
}
- /* And the symbols */
+ /* And the symbols. */
if (abfd->outsymbols)
{
for (p = abfd->outsymbols; *p; p++)
@@ -874,7 +816,8 @@ tekhex_write_object_contents (abfd)
int section_code = bfd_decode_symclass (*p);
if (section_code != '?')
- { /* do not include debug symbols */
+ {
+ /* Do not include debug symbols. */
asymbol *sym = *p;
char *dst = buffer;
@@ -917,50 +860,45 @@ tekhex_write_object_contents (abfd)
}
}
- /* And the terminator */
+ /* And the terminator. */
if (bfd_bwrite ("%0781010\n", (bfd_size_type) 9, abfd) != 9)
abort ();
return TRUE;
}
static int
-tekhex_sizeof_headers (abfd, exec)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_boolean exec ATTRIBUTE_UNUSED;
-
+tekhex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_boolean exec ATTRIBUTE_UNUSED)
{
return 0;
}
static asymbol *
-tekhex_make_empty_symbol (abfd)
- bfd *abfd;
+tekhex_make_empty_symbol (bfd *abfd)
{
bfd_size_type amt = sizeof (struct tekhex_symbol_struct);
- tekhex_symbol_type *new = (tekhex_symbol_type *) bfd_zalloc (abfd, amt);
+ tekhex_symbol_type *new = bfd_zalloc (abfd, amt);
if (!new)
return NULL;
new->symbol.the_bfd = abfd;
- new->prev = (struct tekhex_symbol_struct *) NULL;
+ new->prev = NULL;
return &(new->symbol);
}
static void
-tekhex_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
- asymbol *symbol;
- symbol_info *ret;
+tekhex_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED,
+ asymbol *symbol,
+ symbol_info *ret)
{
bfd_symbol_info (symbol, ret);
}
static void
-tekhex_print_symbol (abfd, filep, symbol, how)
- bfd *abfd;
- PTR filep;
- asymbol *symbol;
- bfd_print_symbol_type how;
+tekhex_print_symbol (bfd *abfd,
+ void * filep,
+ asymbol *symbol,
+ bfd_print_symbol_type how)
{
FILE *file = (FILE *) filep;
@@ -976,66 +914,64 @@ tekhex_print_symbol (abfd, filep, symbol, how)
{
const char *section_name = symbol->section->name;
- bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
+ bfd_print_symbol_vandf (abfd, (void *) file, symbol);
fprintf (file, " %-5s %s",
- section_name,
- symbol->name);
+ section_name, symbol->name);
}
}
}
-#define tekhex_close_and_cleanup _bfd_generic_close_and_cleanup
-#define tekhex_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
-#define tekhex_new_section_hook _bfd_generic_new_section_hook
-
-#define tekhex_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define tekhex_get_lineno _bfd_nosymbols_get_lineno
-#define tekhex_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define tekhex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define tekhex_read_minisymbols _bfd_generic_read_minisymbols
-#define tekhex_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
-
-#define tekhex_bfd_get_relocated_section_contents \
- bfd_generic_get_relocated_section_contents
-#define tekhex_bfd_relax_section bfd_generic_relax_section
-#define tekhex_bfd_gc_sections bfd_generic_gc_sections
-#define tekhex_bfd_merge_sections bfd_generic_merge_sections
-#define tekhex_bfd_discard_group bfd_generic_discard_group
-#define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
-#define tekhex_bfd_link_just_syms _bfd_generic_link_just_syms
-#define tekhex_bfd_final_link _bfd_generic_final_link
-#define tekhex_bfd_link_split_section _bfd_generic_link_split_section
-
-#define tekhex_get_section_contents_in_window \
- _bfd_generic_get_section_contents_in_window
+#define tekhex_close_and_cleanup _bfd_generic_close_and_cleanup
+#define tekhex_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
+#define tekhex_new_section_hook _bfd_generic_new_section_hook
+#define tekhex_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
+#define tekhex_bfd_is_local_label_name bfd_generic_is_local_label_name
+#define tekhex_get_lineno _bfd_nosymbols_get_lineno
+#define tekhex_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define tekhex_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define tekhex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
+#define tekhex_read_minisymbols _bfd_generic_read_minisymbols
+#define tekhex_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
+#define tekhex_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
+#define tekhex_bfd_relax_section bfd_generic_relax_section
+#define tekhex_bfd_gc_sections bfd_generic_gc_sections
+#define tekhex_bfd_merge_sections bfd_generic_merge_sections
+#define tekhex_bfd_is_group_section bfd_generic_is_group_section
+#define tekhex_bfd_discard_group bfd_generic_discard_group
+#define tekhex_section_already_linked _bfd_generic_section_already_linked
+#define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
+#define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
+#define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define tekhex_bfd_link_just_syms _bfd_generic_link_just_syms
+#define tekhex_bfd_final_link _bfd_generic_final_link
+#define tekhex_bfd_link_split_section _bfd_generic_link_split_section
+#define tekhex_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
const bfd_target tekhex_vec =
{
- "tekhex", /* name */
+ "tekhex", /* Name. */
bfd_target_tekhex_flavour,
- BFD_ENDIAN_UNKNOWN, /* target byte order */
- BFD_ENDIAN_UNKNOWN, /* target headers byte order */
- (EXEC_P | /* object flags */
- HAS_SYMS | HAS_LINENO | HAS_DEBUG | HAS_RELOC | HAS_LOCALS |
- WP_TEXT | D_PAGED),
+ BFD_ENDIAN_UNKNOWN, /* Target byte order. */
+ BFD_ENDIAN_UNKNOWN, /* Target headers byte order. */
+ (EXEC_P | /* Object flags. */
+ HAS_SYMS | HAS_LINENO | HAS_DEBUG |
+ HAS_RELOC | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_CODE | SEC_DATA | SEC_ROM | SEC_HAS_CONTENTS
- | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading underscore */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
+ | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ 0, /* Leading underscore. */
+ ' ', /* AR_pad_char. */
+ 16, /* AR_max_namelen. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
{
_bfd_dummy_target,
- tekhex_object_p, /* bfd_check_format */
+ tekhex_object_p, /* bfd_check_format. */
_bfd_dummy_target,
_bfd_dummy_target,
},
@@ -1045,7 +981,7 @@ const bfd_target tekhex_vec =
_bfd_generic_mkarchive,
bfd_false,
},
- { /* bfd_write_contents */
+ { /* bfd_write_contents. */
bfd_false,
tekhex_write_object_contents,
_bfd_write_archive_contents,
@@ -1064,5 +1000,5 @@ const bfd_target tekhex_vec =
NULL,
- (PTR) 0
+ NULL
};
diff --git a/contrib/binutils/bfd/trad-core.c b/contrib/binutils/bfd/trad-core.c
index f8c03d739a8f..cb4111fb9418 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
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by John Gilmore of Cygnus Support.
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -65,8 +65,7 @@ struct trad_core_struct
const bfd_target *trad_unix_core_file_p PARAMS ((bfd *abfd));
char * trad_unix_core_file_failing_command PARAMS ((bfd *abfd));
int trad_unix_core_file_failing_signal PARAMS ((bfd *abfd));
-bfd_boolean trad_unix_core_file_matches_executable_p
- PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+#define trad_unix_core_file_matches_executable_p generic_core_file_matches_executable_p
static void swap_abort PARAMS ((void));
/* Handle 4.2-style (and perhaps also sysV-style) core dump file. */
@@ -109,15 +108,11 @@ trad_unix_core_file_p (abfd)
/* Check that the size claimed is no greater than the file size. */
{
- FILE *stream = bfd_cache_lookup (abfd);
struct stat statbuf;
- if (stream == NULL)
+
+ if (bfd_stat (abfd, &statbuf) < 0)
return 0;
- if (fstat (fileno (stream), &statbuf) < 0)
- {
- bfd_set_error (bfd_error_system_call);
- return 0;
- }
+
if ((unsigned long) (NBPG * (UPAGES + u.u_dsize
#ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
- u.u_tsize
@@ -174,13 +169,13 @@ trad_unix_core_file_p (abfd)
core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
- core_datasec (abfd)->_raw_size = NBPG * u.u_dsize
+ core_datasec (abfd)->size = NBPG * u.u_dsize
#ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
- NBPG * u.u_tsize
#endif
;
- core_stacksec (abfd)->_raw_size = NBPG * u.u_ssize;
- core_regsec (abfd)->_raw_size = NBPG * UPAGES; /* Larger than sizeof struct u */
+ core_stacksec (abfd)->size = NBPG * u.u_ssize;
+ core_regsec (abfd)->size = NBPG * UPAGES; /* Larger than sizeof struct u */
/* What a hack... we'd like to steal it from the exec file,
since the upage does not seem to provide it. FIXME. */
@@ -257,14 +252,6 @@ trad_unix_core_file_failing_signal (ignore_abfd)
return -1; /* FIXME, where is it? */
#endif
}
-
-bfd_boolean
-trad_unix_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd ATTRIBUTE_UNUSED;
- bfd *exec_bfd ATTRIBUTE_UNUSED;
-{
- return TRUE; /* FIXME, We have no way of telling at this point */
-}
/* If somebody calls any byte-swapping routines, shoot them. */
static void
diff --git a/contrib/binutils/bfd/version.h b/contrib/binutils/bfd/version.h
index 25b0e07442e4..f0ad1a889092 100644
--- a/contrib/binutils/bfd/version.h
+++ b/contrib/binutils/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20050317
+#define BFD_VERSION_DATE 20070807
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/contrib/binutils/bfd/xcoff-target.h b/contrib/binutils/bfd/xcoff-target.h
index 7bf3de72fa49..7e73cf26a59d 100644
--- a/contrib/binutils/bfd/xcoff-target.h
+++ b/contrib/binutils/bfd/xcoff-target.h
@@ -1,23 +1,23 @@
/* Common definitions for backends based on IBM RS/6000 "XCOFF64" files.
- Copyright 2000, 2001, 2002
+ Copyright 2000, 2001, 2002, 2004, 2005
Free Software Foundation, Inc.
Contributed by Cygnus Support.
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Internalcoff.h and coffcode.h modify themselves based on this flag. */
#define RS6000COFF_C 1
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
| (howto->bitsize - 1)); \
}
-#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER 3
#define COFF_LONG_FILENAMES
@@ -40,74 +40,71 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define RTYPE2HOWTO(cache_ptr, dst) _bfd_xcoff_rtype2howto (cache_ptr, dst)
-#define coff_mkobject _bfd_xcoff_mkobject
-#define coff_bfd_copy_private_bfd_data _bfd_xcoff_copy_private_bfd_data
-#define coff_bfd_is_local_label_name _bfd_xcoff_is_local_label_name
-#define coff_bfd_reloc_type_lookup _bfd_xcoff_reloc_type_lookup
-#define coff_relocate_section _bfd_ppc_xcoff_relocate_section
+#define coff_mkobject _bfd_xcoff_mkobject
+#define coff_bfd_copy_private_bfd_data _bfd_xcoff_copy_private_bfd_data
+#define coff_bfd_is_local_label_name _bfd_xcoff_is_local_label_name
+#define coff_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
+#define coff_bfd_reloc_type_lookup _bfd_xcoff_reloc_type_lookup
+#define coff_relocate_section _bfd_ppc_xcoff_relocate_section
+#define coff_core_file_failing_command _bfd_nocore_core_file_failing_command
+#define coff_core_file_failing_signal _bfd_nocore_core_file_failing_signal
+#define coff_core_file_matches_executable_p _bfd_nocore_core_file_matches_executable_p
+#define _bfd_xcoff_bfd_get_relocated_section_contents coff_bfd_get_relocated_section_contents
+#define _bfd_xcoff_bfd_relax_section coff_bfd_relax_section
+#define _bfd_xcoff_bfd_gc_sections coff_bfd_gc_sections
+#define _bfd_xcoff_bfd_merge_sections coff_bfd_merge_sections
+#define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group
+#define _bfd_xcoff_section_already_linked _bfd_generic_section_already_linked
+#define _bfd_xcoff_bfd_link_split_section coff_bfd_link_split_section
#define CORE_FILE_P _bfd_dummy_target
-#define coff_core_file_failing_command _bfd_nocore_core_file_failing_command
-#define coff_core_file_failing_signal _bfd_nocore_core_file_failing_signal
-#define coff_core_file_matches_executable_p \
- _bfd_nocore_core_file_matches_executable_p
-
#ifdef AIX_CORE
-#undef CORE_FILE_P
+
+#undef CORE_FILE_P
#define CORE_FILE_P rs6000coff_core_p
-extern const bfd_target * rs6000coff_core_p ();
-extern bfd_boolean rs6000coff_core_file_matches_executable_p ();
+extern const bfd_target * rs6000coff_core_p (bfd *);
+extern bfd_boolean rs6000coff_core_file_matches_executable_p (bfd *, bfd*);
#undef coff_core_file_matches_executable_p
#define coff_core_file_matches_executable_p \
rs6000coff_core_file_matches_executable_p
-extern char *rs6000coff_core_file_failing_command PARAMS ((bfd *abfd));
-#undef coff_core_file_failing_command
+extern char *rs6000coff_core_file_failing_command (bfd *);
+#undef coff_core_file_failing_command
#define coff_core_file_failing_command rs6000coff_core_file_failing_command
-extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd));
-#undef coff_core_file_failing_signal
+extern int rs6000coff_core_file_failing_signal (bfd *);
+#undef coff_core_file_failing_signal
#define coff_core_file_failing_signal rs6000coff_core_file_failing_signal
#endif /* AIX_CORE */
#ifdef LYNX_CORE
-#undef CORE_FILE_P
+#undef CORE_FILE_P
#define CORE_FILE_P lynx_core_file_p
-extern const bfd_target *lynx_core_file_p PARAMS ((bfd *abfd));
+extern const bfd_target *lynx_core_file_p (bfd *);
-extern bfd_boolean lynx_core_file_matches_executable_p
- PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+extern bfd_boolean lynx_core_file_matches_executable_p (bfd *, bfd *);
#undef coff_core_file_matches_executable_p
#define coff_core_file_matches_executable_p lynx_core_file_matches_executable_p
-extern char *lynx_core_file_failing_command PARAMS ((bfd *abfd));
-#undef coff_core_file_failing_command
+extern char *lynx_core_file_failing_command (bfd *);
+#undef coff_core_file_failing_command
#define coff_core_file_failing_command lynx_core_file_failing_command
-extern int lynx_core_file_failing_signal PARAMS ((bfd *abfd));
-#undef coff_core_file_failing_signal
+extern int lynx_core_file_failing_signal (bfd *);
+#undef coff_core_file_failing_signal
#define coff_core_file_failing_signal lynx_core_file_failing_signal
#endif /* LYNX_CORE */
-#define _bfd_xcoff_bfd_get_relocated_section_contents \
- coff_bfd_get_relocated_section_contents
-#define _bfd_xcoff_bfd_relax_section coff_bfd_relax_section
-#define _bfd_xcoff_bfd_gc_sections coff_bfd_gc_sections
-#define _bfd_xcoff_bfd_merge_sections coff_bfd_merge_sections
-#define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group
-#define _bfd_xcoff_bfd_link_split_section coff_bfd_link_split_section
-
/* XCOFF archives do not have anything which corresponds to an
extended name table. */
#define _bfd_xcoff_slurp_extended_name_table bfd_false
#define _bfd_xcoff_construct_extended_name_table \
- ((bfd_boolean (*) PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
- bfd_false)
+ ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false)
#define _bfd_xcoff_truncate_arname bfd_dont_truncate_arname
/* We can use the standard get_elt_at_index routine. */
@@ -118,31 +115,28 @@ extern int lynx_core_file_failing_signal PARAMS ((bfd *abfd));
#define _bfd_xcoff_update_armap_timestamp bfd_true
-extern bfd_boolean _bfd_xcoff_mkobject PARAMS ((bfd *));
-extern bfd_boolean _bfd_xcoff_copy_private_bfd_data PARAMS ((bfd *, bfd *));
-extern bfd_boolean _bfd_xcoff_is_local_label_name PARAMS ((bfd *, const char *));
-extern void _bfd_xcoff_rtype2howto
- PARAMS ((arelent *, struct internal_reloc *));
-extern reloc_howto_type *_bfd_xcoff_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-extern bfd_boolean _bfd_xcoff_slurp_armap PARAMS ((bfd *));
-extern const bfd_target *_bfd_xcoff_archive_p PARAMS ((bfd *));
-extern PTR _bfd_xcoff_read_ar_hdr PARAMS ((bfd *));
-extern bfd *_bfd_xcoff_openr_next_archived_file PARAMS ((bfd *, bfd *));
-extern int _bfd_xcoff_generic_stat_arch_elt PARAMS ((bfd *, struct stat *));
-extern bfd_boolean _bfd_xcoff_write_armap
- PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
-extern bfd_boolean _bfd_xcoff_write_archive_contents PARAMS ((bfd *));
-extern int _bfd_xcoff_sizeof_headers PARAMS ((bfd *, bfd_boolean));
-extern void _bfd_xcoff_swap_sym_in PARAMS ((bfd *, PTR, PTR));
-extern unsigned int _bfd_xcoff_swap_sym_out PARAMS ((bfd *, PTR, PTR));
-extern void _bfd_xcoff_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-extern unsigned int _bfd_xcoff_swap_aux_out PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+extern bfd_boolean _bfd_xcoff_mkobject (bfd *);
+extern bfd_boolean _bfd_xcoff_copy_private_bfd_data (bfd *, bfd *);
+extern bfd_boolean _bfd_xcoff_is_local_label_name (bfd *, const char *);
+extern void _bfd_xcoff_rtype2howto (arelent *, struct internal_reloc *);
+extern bfd_boolean _bfd_xcoff_slurp_armap (bfd *);
+extern void * _bfd_xcoff_read_ar_hdr (bfd *);
+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 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 *);
+extern unsigned int _bfd_xcoff_swap_aux_out (bfd *, void *, int, int, int, int, void *);
+extern reloc_howto_type * _bfd_xcoff_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
+extern const bfd_target * _bfd_xcoff_archive_p (bfd *);
#ifndef coff_SWAP_sym_in
-#define coff_SWAP_sym_in _bfd_xcoff_swap_sym_in
+#define coff_SWAP_sym_in _bfd_xcoff_swap_sym_in
#define coff_SWAP_sym_out _bfd_xcoff_swap_sym_out
-#define coff_SWAP_aux_in _bfd_xcoff_swap_aux_in
+#define coff_SWAP_aux_in _bfd_xcoff_swap_aux_in
#define coff_SWAP_aux_out _bfd_xcoff_swap_aux_out
#endif
@@ -154,30 +148,30 @@ const bfd_target TARGET_SYM =
{
TARGET_NAME,
bfd_target_xcoff_flavour,
- BFD_ENDIAN_BIG, /* data byte order is big */
- BFD_ENDIAN_BIG, /* header byte order is big */
+ BFD_ENDIAN_BIG, /* Data byte order is big. */
+ BFD_ENDIAN_BIG, /* Header byte order is big. */
- (HAS_RELOC | EXEC_P | /* object flags */
+ (HAS_RELOC | EXEC_P | /* Object flags. */
HAS_LINENO | HAS_DEBUG | DYNAMIC |
HAS_SYMS | HAS_LOCALS | WP_TEXT),
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading char */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen??? FIXMEmgo */
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ 0, /* Leading char. */
+ '/', /* AR_pad_char. */
+ 15, /* AR_max_namelen??? FIXME. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16,/* Data. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16,/* Headers. */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format. */
_bfd_xcoff_archive_p, CORE_FILE_P},
- {bfd_false, coff_mkobject, /* bfd_set_format */
+ {bfd_false, coff_mkobject, /* bfd_set_format. */
_bfd_generic_mkarchive, bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents. */
_bfd_xcoff_write_archive_contents, bfd_false},
BFD_JUMP_TABLE_GENERIC (coff),
diff --git a/contrib/binutils/bfd/xcofflink.c b/contrib/binutils/bfd/xcofflink.c
index ccd82befdac0..47c330b6c15f 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
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006 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.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -30,7 +30,8 @@
/* This file holds the XCOFF linker code. */
-#define STRING_SIZE_SIZE (4)
+#undef STRING_SIZE_SIZE
+#define STRING_SIZE_SIZE 4
/* We reuse the SEC_ROM flag as a mark flag for garbage collection.
This flag will only be used on input sections. */
@@ -65,7 +66,8 @@ struct xcoff_link_section_info
index of the TOC symbol is not known when the reloc was handled,
an entry is added to this linked list. This is not an array,
like rel_hashes, because this case is quite uncommon. */
- struct xcoff_toc_rel_hash {
+ struct xcoff_toc_rel_hash
+ {
struct xcoff_toc_rel_hash *next;
struct xcoff_link_hash_entry *h;
struct internal_reloc *rel;
@@ -113,40 +115,8 @@ struct xcoff_final_link_info
bfd_byte *external_relocs;
};
-static struct bfd_hash_entry *xcoff_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static bfd_boolean xcoff_get_section_contents PARAMS ((bfd *, asection *));
-static struct internal_reloc *xcoff_read_internal_relocs
- PARAMS ((bfd *, asection *, bfd_boolean, bfd_byte *, bfd_boolean,
- struct internal_reloc *));
-static bfd_boolean xcoff_link_add_object_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean xcoff_link_check_archive_element
- PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean xcoff_link_check_ar_symbols
- PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean xcoff_link_check_dynamic_ar_symbols
- PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *));
-static bfd_size_type xcoff_find_reloc
- PARAMS ((struct internal_reloc *, bfd_size_type, bfd_vma));
-static bfd_boolean xcoff_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean xcoff_link_add_dynamic_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean xcoff_mark_symbol
- PARAMS ((struct bfd_link_info *, struct xcoff_link_hash_entry *));
-static bfd_boolean xcoff_mark PARAMS ((struct bfd_link_info *, asection *));
-static void xcoff_sweep PARAMS ((struct bfd_link_info *));
-static bfd_boolean xcoff_build_ldsyms
- PARAMS ((struct xcoff_link_hash_entry *, PTR));
-static bfd_boolean xcoff_link_input_bfd
- PARAMS ((struct xcoff_final_link_info *, bfd *));
-static bfd_boolean xcoff_write_global_symbol
- PARAMS ((struct xcoff_link_hash_entry *, PTR));
-static bfd_boolean xcoff_reloc_link_order
- PARAMS ((bfd *, struct xcoff_final_link_info *, asection *,
- struct bfd_link_order *));
-static int xcoff_sort_relocs PARAMS ((const PTR, const PTR));
+static bfd_boolean xcoff_mark (struct bfd_link_info *, asection *);
+
/* Routines to read XCOFF dynamic information. This don't really
@@ -156,14 +126,12 @@ static int xcoff_sort_relocs PARAMS ((const PTR, const PTR));
/* Read the contents of a section. */
static bfd_boolean
-xcoff_get_section_contents (abfd, sec)
- bfd *abfd;
- asection *sec;
+xcoff_get_section_contents (bfd *abfd, asection *sec)
{
-
if (coff_section_data (abfd, sec) == NULL)
{
bfd_size_type amt = sizeof (struct coff_section_tdata);
+
sec->used_by_bfd = bfd_zalloc (abfd, amt);
if (sec->used_by_bfd == NULL)
return FALSE;
@@ -171,15 +139,15 @@ xcoff_get_section_contents (abfd, sec)
if (coff_section_data (abfd, sec)->contents == NULL)
{
- coff_section_data (abfd, sec)->contents = ((bfd_byte *)
- bfd_malloc (sec->_raw_size));
- if (coff_section_data (abfd, sec)->contents == NULL)
- return FALSE;
+ bfd_byte *contents;
- if (! bfd_get_section_contents (abfd, sec,
- coff_section_data (abfd, sec)->contents,
- (file_ptr) 0, sec->_raw_size))
- return FALSE;
+ if (! bfd_malloc_and_get_section (abfd, sec, &contents))
+ {
+ if (contents != NULL)
+ free (contents);
+ return FALSE;
+ }
+ coff_section_data (abfd, sec)->contents = contents;
}
return TRUE;
@@ -188,8 +156,7 @@ xcoff_get_section_contents (abfd, sec)
/* Get the size required to hold the dynamic symbols. */
long
-_bfd_xcoff_get_dynamic_symtab_upper_bound (abfd)
- bfd *abfd;
+_bfd_xcoff_get_dynamic_symtab_upper_bound (bfd *abfd)
{
asection *lsec;
bfd_byte *contents;
@@ -212,7 +179,7 @@ _bfd_xcoff_get_dynamic_symtab_upper_bound (abfd)
return -1;
contents = coff_section_data (abfd, lsec)->contents;
- bfd_xcoff_swap_ldhdr_in (abfd, (PTR) contents, &ldhdr);
+ bfd_xcoff_swap_ldhdr_in (abfd, (void *) contents, &ldhdr);
return (ldhdr.l_nsyms + 1) * sizeof (asymbol *);
}
@@ -220,9 +187,7 @@ _bfd_xcoff_get_dynamic_symtab_upper_bound (abfd)
/* Get the dynamic symbols. */
long
-_bfd_xcoff_canonicalize_dynamic_symtab (abfd, psyms)
- bfd *abfd;
- asymbol **psyms;
+_bfd_xcoff_canonicalize_dynamic_symtab (bfd *abfd, asymbol **psyms)
{
asection *lsec;
bfd_byte *contents;
@@ -254,8 +219,7 @@ _bfd_xcoff_canonicalize_dynamic_symtab (abfd, psyms)
strings = (char *) contents + ldhdr.l_stoff;
- symbuf = ((coff_symbol_type *)
- bfd_zalloc (abfd, ldhdr.l_nsyms * sizeof (coff_symbol_type)));
+ symbuf = bfd_zalloc (abfd, ldhdr.l_nsyms * sizeof (* symbuf));
if (symbuf == NULL)
return -1;
@@ -297,7 +261,6 @@ _bfd_xcoff_canonicalize_dynamic_symtab (abfd, psyms)
/* FIXME: We have no way to record the other information stored
with the loader symbol. */
-
*psyms = (asymbol *) symbuf;
}
@@ -309,8 +272,7 @@ _bfd_xcoff_canonicalize_dynamic_symtab (abfd, psyms)
/* Get the size required to hold the dynamic relocs. */
long
-_bfd_xcoff_get_dynamic_reloc_upper_bound (abfd)
- bfd *abfd;
+_bfd_xcoff_get_dynamic_reloc_upper_bound (bfd *abfd)
{
asection *lsec;
bfd_byte *contents;
@@ -341,10 +303,9 @@ _bfd_xcoff_get_dynamic_reloc_upper_bound (abfd)
/* Get the dynamic relocs. */
long
-_bfd_xcoff_canonicalize_dynamic_reloc (abfd, prelocs, syms)
- bfd *abfd;
- arelent **prelocs;
- asymbol **syms;
+_bfd_xcoff_canonicalize_dynamic_reloc (bfd *abfd,
+ arelent **prelocs,
+ asymbol **syms)
{
asection *lsec;
bfd_byte *contents;
@@ -371,7 +332,7 @@ _bfd_xcoff_canonicalize_dynamic_reloc (abfd, prelocs, syms)
bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr);
- relbuf = (arelent *) bfd_alloc (abfd, ldhdr.l_nreloc * sizeof (arelent));
+ relbuf = bfd_alloc (abfd, ldhdr.l_nreloc * sizeof (arelent));
if (relbuf == NULL)
return -1;
@@ -439,20 +400,18 @@ _bfd_xcoff_canonicalize_dynamic_reloc (abfd, prelocs, syms)
/* Routine to create an entry in an XCOFF link hash table. */
static struct bfd_hash_entry *
-xcoff_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+xcoff_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct xcoff_link_hash_entry *ret = (struct xcoff_link_hash_entry *) entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct xcoff_link_hash_entry *) NULL)
- ret = ((struct xcoff_link_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct xcoff_link_hash_entry)));
- if (ret == (struct xcoff_link_hash_entry *) NULL)
- return (struct bfd_hash_entry *) ret;
+ if (ret == NULL)
+ ret = bfd_hash_allocate (table, sizeof (* ret));
+ if (ret == NULL)
+ return NULL;
/* Call the allocation method of the superclass. */
ret = ((struct xcoff_link_hash_entry *)
@@ -477,19 +436,19 @@ xcoff_link_hash_newfunc (entry, table, string)
/* Create a XCOFF link hash table. */
struct bfd_link_hash_table *
-_bfd_xcoff_bfd_link_hash_table_create (abfd)
- bfd *abfd;
+_bfd_xcoff_bfd_link_hash_table_create (bfd *abfd)
{
struct xcoff_link_hash_table *ret;
- bfd_size_type amt = sizeof (struct xcoff_link_hash_table);
+ bfd_size_type amt = sizeof (* ret);
- ret = (struct xcoff_link_hash_table *) bfd_malloc (amt);
- if (ret == (struct xcoff_link_hash_table *) NULL)
- return (struct bfd_link_hash_table *) NULL;
- if (! _bfd_link_hash_table_init (&ret->root, abfd, xcoff_link_hash_newfunc))
+ ret = bfd_malloc (amt);
+ if (ret == NULL)
+ return NULL;
+ if (!_bfd_link_hash_table_init (&ret->root, abfd, xcoff_link_hash_newfunc,
+ sizeof (struct xcoff_link_hash_entry)))
{
free (ret);
- return (struct bfd_link_hash_table *) NULL;
+ return NULL;
}
ret->debug_strtab = _bfd_xcoff_stringtab_init ();
@@ -517,8 +476,7 @@ _bfd_xcoff_bfd_link_hash_table_create (abfd)
/* Free a XCOFF link hash table. */
void
-_bfd_xcoff_bfd_link_hash_table_free (hash)
- struct bfd_link_hash_table *hash;
+_bfd_xcoff_bfd_link_hash_table_free (struct bfd_link_hash_table *hash)
{
struct xcoff_link_hash_table *ret = (struct xcoff_link_hash_table *) hash;
@@ -532,16 +490,13 @@ _bfd_xcoff_bfd_link_hash_table_free (hash)
relocs which may have been cached for the enclosing section. */
static struct internal_reloc *
-xcoff_read_internal_relocs (abfd, sec, cache, external_relocs,
- require_internal, internal_relocs)
- bfd *abfd;
- asection *sec;
- bfd_boolean cache;
- bfd_byte *external_relocs;
- bfd_boolean require_internal;
- struct internal_reloc *internal_relocs;
+xcoff_read_internal_relocs (bfd *abfd,
+ asection *sec,
+ bfd_boolean cache,
+ bfd_byte *external_relocs,
+ bfd_boolean require_internal,
+ struct internal_reloc *internal_relocs)
{
-
if (coff_section_data (abfd, sec) != NULL
&& coff_section_data (abfd, sec)->relocs == NULL
&& xcoff_section_data (abfd, sec) != NULL)
@@ -557,8 +512,7 @@ xcoff_read_internal_relocs (abfd, sec, cache, external_relocs,
&& enclosing->reloc_count > 0)
{
if (_bfd_coff_read_internal_relocs (abfd, enclosing, TRUE,
- external_relocs, FALSE,
- (struct internal_reloc *) NULL)
+ external_relocs, FALSE, NULL)
== NULL)
return NULL;
}
@@ -585,215 +539,64 @@ xcoff_read_internal_relocs (abfd, sec, cache, external_relocs,
require_internal, internal_relocs);
}
-/* Given an XCOFF BFD, add symbols to the global hash table as
- appropriate. */
-
-bfd_boolean
-_bfd_xcoff_bfd_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
-
- switch (bfd_get_format (abfd))
- {
- case bfd_object:
- return xcoff_link_add_object_symbols (abfd, info);
-
- case bfd_archive:
- /* If the archive has a map, do the usual search. We then need
- to check the archive for dynamic objects, because they may not
- appear in the archive map even though they should, perhaps, be
- included. If the archive has no map, we just consider each object
- file in turn, since that apparently is what the AIX native linker
- does. */
- if (bfd_has_map (abfd))
- {
- if (! (_bfd_generic_link_add_archive_symbols
- (abfd, info, xcoff_link_check_archive_element)))
- return FALSE;
- }
-
- {
- bfd *member;
-
- member = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
- while (member != NULL)
- {
- if (bfd_check_format (member, bfd_object)
- && (info->hash->creator == member->xvec)
- && (! bfd_has_map (abfd) || (member->flags & DYNAMIC) != 0))
- {
- bfd_boolean needed;
-
- if (! xcoff_link_check_archive_element (member, info,
- &needed))
- return FALSE;
- if (needed)
- member->archive_pass = -1;
- }
- member = bfd_openr_next_archived_file (abfd, member);
- }
- }
-
- return TRUE;
-
- default:
- bfd_set_error (bfd_error_wrong_format);
- return FALSE;
- }
-}
-
-/* Add symbols from an XCOFF object file. */
-
-static bfd_boolean
-xcoff_link_add_object_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
-
- if (! _bfd_coff_get_external_symbols (abfd))
- return FALSE;
- if (! xcoff_link_add_symbols (abfd, info))
- return FALSE;
- if (! info->keep_memory)
- {
- if (! _bfd_coff_free_symbols (abfd))
- return FALSE;
- }
- return TRUE;
-}
-
-/* Check a single archive element to see if we need to include it in
- the link. *PNEEDED is set according to whether this element is
- needed in the link or not. This is called via
- _bfd_generic_link_add_archive_symbols. */
-
-static bfd_boolean
-xcoff_link_check_archive_element (abfd, info, pneeded)
- bfd *abfd;
- struct bfd_link_info *info;
- bfd_boolean *pneeded;
-{
-
- if (! _bfd_coff_get_external_symbols (abfd))
- return FALSE;
-
- if (! xcoff_link_check_ar_symbols (abfd, info, pneeded))
- return FALSE;
-
- if (*pneeded)
- {
- if (! xcoff_link_add_symbols (abfd, info))
- return FALSE;
- }
-
- if (! info->keep_memory || ! *pneeded)
- {
- if (! _bfd_coff_free_symbols (abfd))
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* Look through the symbols to see if this object file should be
- included in the link. */
-
-static bfd_boolean
-xcoff_link_check_ar_symbols (abfd, info, pneeded)
- bfd *abfd;
- struct bfd_link_info *info;
- bfd_boolean *pneeded;
-{
- bfd_size_type symesz;
- bfd_byte *esym;
- bfd_byte *esym_end;
-
- *pneeded = FALSE;
-
- if ((abfd->flags & DYNAMIC) != 0
- && ! info->static_link
- && info->hash->creator == abfd->xvec)
- return xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded);
-
- symesz = bfd_coff_symesz (abfd);
- esym = (bfd_byte *) obj_coff_external_syms (abfd);
- esym_end = esym + obj_raw_syment_count (abfd) * symesz;
- while (esym < esym_end)
- {
- struct internal_syment sym;
-
- bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
-
- if (sym.n_sclass == C_EXT && sym.n_scnum != N_UNDEF)
- {
- const char *name;
- char buf[SYMNMLEN + 1];
- struct bfd_link_hash_entry *h;
-
- /* This symbol is externally visible, and is defined by this
- object file. */
-
- name = _bfd_coff_internal_syment_name (abfd, &sym, buf);
-
- if (name == NULL)
- return FALSE;
- h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
-
- /* We are only interested in symbols that are currently
- undefined. If a symbol is currently known to be common,
- XCOFF linkers do not bring in an object file which
- defines it. We also don't bring in symbols to satisfy
- undefined references in shared objects. */
- if (h != (struct bfd_link_hash_entry *) NULL
- && h->type == bfd_link_hash_undefined
- && (info->hash->creator != abfd->xvec
- || (((struct xcoff_link_hash_entry *) h)->flags
- & XCOFF_DEF_DYNAMIC) == 0))
- {
- if (! (*info->callbacks->add_archive_element) (info, abfd, name))
- return FALSE;
- *pneeded = TRUE;
- return TRUE;
- }
- }
-
- esym += (sym.n_numaux + 1) * symesz;
- }
-
- /* We do not need this object file. */
- return TRUE;
-}
-
-/* Look through the loader symbols to see if this dynamic object
- should be included in the link. The native linker uses the loader
- symbols, not the normal symbol table, so we do too. */
+/* This function is used to add symbols from a dynamic object to the
+ global symbol table. */
static bfd_boolean
-xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded)
- bfd *abfd;
- struct bfd_link_info *info;
- bfd_boolean *pneeded;
+xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info)
{
asection *lsec;
bfd_byte *contents;
struct internal_ldhdr ldhdr;
const char *strings;
bfd_byte *elsym, *elsymend;
+ struct xcoff_import_file *n;
+ const char *bname;
+ const char *mname;
+ const char *s;
+ unsigned int c;
+ struct xcoff_import_file **pp;
- *pneeded = FALSE;
+ /* We can only handle a dynamic object if we are generating an XCOFF
+ output file. */
+ if (info->hash->creator != abfd->xvec)
+ {
+ (*_bfd_error_handler)
+ (_("%s: XCOFF shared object when not producing XCOFF output"),
+ bfd_get_filename (abfd));
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
+ }
+ /* The symbols we use from a dynamic object are not the symbols in
+ the normal symbol table, but, rather, the symbols in the export
+ table. If there is a global symbol in a dynamic object which is
+ not in the export table, the loader will not be able to find it,
+ so we don't want to find it either. Also, on AIX 4.1.3, shr.o in
+ libc.a has symbols in the export table which are not in the
+ symbol table. */
+
+ /* Read in the .loader section. FIXME: We should really use the
+ o_snloader field in the a.out header, rather than grabbing the
+ section by name. */
lsec = bfd_get_section_by_name (abfd, ".loader");
if (lsec == NULL)
{
- /* There are no symbols, so don't try to include it. */
- return TRUE;
+ (*_bfd_error_handler)
+ (_("%s: dynamic object with no .loader section"),
+ bfd_get_filename (abfd));
+ bfd_set_error (bfd_error_no_symbols);
+ return FALSE;
}
if (! xcoff_get_section_contents (abfd, lsec))
return FALSE;
contents = coff_section_data (abfd, lsec)->contents;
+ /* Remove the sections from this object, so that they do not get
+ included in the link. */
+ bfd_section_list_clear (abfd);
+
bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr);
strings = (char *) contents + ldhdr.l_stoff;
@@ -801,12 +604,13 @@ xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded)
elsym = contents + bfd_xcoff_loader_symbol_offset(abfd, &ldhdr);
elsymend = elsym + ldhdr.l_nsyms * bfd_xcoff_ldsymsz(abfd);
+
for (; elsym < elsymend; elsym += bfd_xcoff_ldsymsz(abfd))
{
struct internal_ldsym ldsym;
char nambuf[SYMNMLEN + 1];
const char *name;
- struct bfd_link_hash_entry *h;
+ struct xcoff_link_hash_entry *h;
bfd_xcoff_swap_ldsym_in (abfd, elsym, &ldsym);
@@ -823,24 +627,109 @@ xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded)
name = nambuf;
}
- h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
-
- /* We are only interested in symbols that are currently
- undefined. At this point we know that we are using an XCOFF
+ /* Normally we could not call xcoff_link_hash_lookup in an add
+ symbols routine, since we might not be using an XCOFF hash
+ table. However, we verified above that we are using an XCOFF
hash table. */
- if (h != NULL
- && h->type == bfd_link_hash_undefined
- && (((struct xcoff_link_hash_entry *) h)->flags
- & XCOFF_DEF_DYNAMIC) == 0)
+
+ h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, TRUE,
+ TRUE, TRUE);
+ if (h == NULL)
+ return FALSE;
+
+ h->flags |= XCOFF_DEF_DYNAMIC;
+
+ /* If the symbol is undefined, and the BFD it was found in is
+ not a dynamic object, change the BFD to this dynamic object,
+ so that we can get the correct import file ID. */
+ if ((h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak)
+ && (h->root.u.undef.abfd == NULL
+ || (h->root.u.undef.abfd->flags & DYNAMIC) == 0))
+ h->root.u.undef.abfd = abfd;
+
+ if (h->root.type == bfd_link_hash_new)
{
- if (! (*info->callbacks->add_archive_element) (info, abfd, name))
- return FALSE;
- *pneeded = TRUE;
- return TRUE;
+ h->root.type = bfd_link_hash_undefined;
+ h->root.u.undef.abfd = abfd;
+ /* We do not want to add this to the undefined symbol list. */
}
- }
- /* We do not need this shared object. */
+ if (h->smclas == XMC_UA
+ || h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak)
+ h->smclas = ldsym.l_smclas;
+
+ /* Unless this is an XMC_XO symbol, we don't bother to actually
+ define it, since we don't have a section to put it in anyhow.
+ Instead, the relocation routines handle the DEF_DYNAMIC flag
+ correctly. */
+
+ if (h->smclas == XMC_XO
+ && (h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak))
+ {
+ /* This symbol has an absolute value. */
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = bfd_abs_section_ptr;
+ h->root.u.def.value = ldsym.l_value;
+ }
+
+ /* If this symbol defines a function descriptor, then it
+ implicitly defines the function code as well. */
+ if (h->smclas == XMC_DS
+ || (h->smclas == XMC_XO && name[0] != '.'))
+ h->flags |= XCOFF_DESCRIPTOR;
+ if ((h->flags & XCOFF_DESCRIPTOR) != 0)
+ {
+ struct xcoff_link_hash_entry *hds;
+
+ hds = h->descriptor;
+ if (hds == NULL)
+ {
+ char *dsnm;
+
+ dsnm = bfd_malloc ((bfd_size_type) strlen (name) + 2);
+ if (dsnm == NULL)
+ return FALSE;
+ dsnm[0] = '.';
+ strcpy (dsnm + 1, name);
+ hds = xcoff_link_hash_lookup (xcoff_hash_table (info), dsnm,
+ TRUE, TRUE, TRUE);
+ free (dsnm);
+ if (hds == NULL)
+ return FALSE;
+
+ if (hds->root.type == bfd_link_hash_new)
+ {
+ hds->root.type = bfd_link_hash_undefined;
+ hds->root.u.undef.abfd = abfd;
+ /* We do not want to add this to the undefined
+ symbol list. */
+ }
+
+ hds->descriptor = h;
+ h->descriptor = hds;
+ }
+
+ hds->flags |= XCOFF_DEF_DYNAMIC;
+ if (hds->smclas == XMC_UA)
+ hds->smclas = XMC_PR;
+
+ /* An absolute symbol appears to actually define code, not a
+ function descriptor. This is how some math functions are
+ implemented on AIX 4.1. */
+ if (h->smclas == XMC_XO
+ && (hds->root.type == bfd_link_hash_undefined
+ || hds->root.type == bfd_link_hash_undefweak))
+ {
+ hds->smclas = XMC_XO;
+ hds->root.type = bfd_link_hash_defined;
+ hds->root.u.def.section = bfd_abs_section_ptr;
+ hds->root.u.def.value = ldsym.l_value;
+ }
+ }
+ }
if (contents != NULL && ! coff_section_data (abfd, lsec)->keep_contents)
{
@@ -848,73 +737,56 @@ xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded)
coff_section_data (abfd, lsec)->contents = NULL;
}
- return TRUE;
-}
-
-/* Returns the index of reloc in RELOCS with the least address greater
- than or equal to ADDRESS. The relocs are sorted by address. */
-
-static bfd_size_type
-xcoff_find_reloc (relocs, count, address)
- struct internal_reloc *relocs;
- bfd_size_type count;
- bfd_vma address;
-{
- bfd_size_type min, max, this;
+ /* Record this file in the import files. */
+ n = bfd_alloc (abfd, (bfd_size_type) sizeof (struct xcoff_import_file));
+ if (n == NULL)
+ return FALSE;
+ n->next = NULL;
- if (count < 2)
+ /* For some reason, the path entry in the import file list for a
+ shared object appears to always be empty. The file name is the
+ base name. */
+ n->path = "";
+ if (abfd->my_archive == NULL)
{
- if (count == 1 && relocs[0].r_vaddr < address)
- return 1;
- else
- return 0;
+ bname = bfd_get_filename (abfd);
+ mname = "";
}
-
- min = 0;
- max = count;
-
- /* Do a binary search over (min,max]. */
- while (min + 1 < max)
+ else
{
- bfd_vma raddr;
-
- this = (max + min) / 2;
- raddr = relocs[this].r_vaddr;
- if (raddr > address)
- max = this;
- else if (raddr < address)
- min = this;
- else
- {
- min = this;
- break;
- }
+ bname = bfd_get_filename (abfd->my_archive);
+ mname = bfd_get_filename (abfd);
}
+ s = strrchr (bname, '/');
+ if (s != NULL)
+ bname = s + 1;
+ n->file = bname;
+ n->member = mname;
- if (relocs[min].r_vaddr < address)
- return min + 1;
+ /* We start c at 1 because the first import file number is reserved
+ for LIBPATH. */
+ for (pp = &xcoff_hash_table (info)->imports, c = 1;
+ *pp != NULL;
+ pp = &(*pp)->next, ++c)
+ ;
+ *pp = n;
- while (min > 0
- && relocs[min - 1].r_vaddr == address)
- --min;
+ xcoff_data (abfd)->import_file_id = c;
- return min;
+ return TRUE;
}
-
/* xcoff_link_create_extra_sections
Takes care of creating the .loader, .gl, .ds, .debug and sections. */
static bfd_boolean
-xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
+xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info)
{
-
bfd_boolean return_value = FALSE;
if (info->hash->creator == abfd->xvec)
{
-
/* We need to build a .loader section, so we do it here. This
won't work if we're producing an XCOFF output file with no
XCOFF input files. FIXME. */
@@ -925,9 +797,8 @@ xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
lsec = bfd_make_section_anyway (abfd, ".loader");
if (lsec == NULL)
- {
- goto end_return;
- }
+ goto end_return;
+
xcoff_hash_table (info)->loader_section = lsec;
lsec->flags |= SEC_HAS_CONTENTS | SEC_IN_MEMORY;
}
@@ -939,9 +810,7 @@ xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
lsec = bfd_make_section_anyway (abfd, ".gl");
if (lsec == NULL)
- {
- goto end_return;
- }
+ goto end_return;
xcoff_hash_table (info)->linkage_section = lsec;
lsec->flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
@@ -956,9 +825,7 @@ xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
tsec = bfd_make_section_anyway (abfd, ".tc");
if (tsec == NULL)
- {
- goto end_return;
- }
+ goto end_return;
xcoff_hash_table (info)->toc_section = tsec;
tsec->flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
@@ -973,9 +840,7 @@ xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
dsec = bfd_make_section_anyway (abfd, ".ds");
if (dsec == NULL)
- {
- goto end_return;
- }
+ goto end_return;
xcoff_hash_table (info)->descriptor_section = dsec;
dsec->flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
@@ -991,9 +856,8 @@ xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
dsec = bfd_make_section_anyway (abfd, ".debug");
if (dsec == NULL)
- {
- goto end_return;
- }
+ goto end_return;
+
xcoff_hash_table (info)->debug_section = dsec;
dsec->flags |= SEC_HAS_CONTENTS | SEC_IN_MEMORY;
}
@@ -1006,6 +870,55 @@ xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
return return_value;
}
+/* Returns the index of reloc in RELOCS with the least address greater
+ than or equal to ADDRESS. The relocs are sorted by address. */
+
+static bfd_size_type
+xcoff_find_reloc (struct internal_reloc *relocs,
+ bfd_size_type count,
+ bfd_vma address)
+{
+ bfd_size_type min, max, this;
+
+ if (count < 2)
+ {
+ if (count == 1 && relocs[0].r_vaddr < address)
+ return 1;
+ else
+ return 0;
+ }
+
+ min = 0;
+ max = count;
+
+ /* Do a binary search over (min,max]. */
+ while (min + 1 < max)
+ {
+ bfd_vma raddr;
+
+ this = (max + min) / 2;
+ raddr = relocs[this].r_vaddr;
+ if (raddr > address)
+ max = this;
+ else if (raddr < address)
+ min = this;
+ else
+ {
+ min = this;
+ break;
+ }
+ }
+
+ if (relocs[min].r_vaddr < address)
+ return min + 1;
+
+ while (min > 0
+ && relocs[min - 1].r_vaddr == address)
+ --min;
+
+ return min;
+}
+
/* Add all the symbols from an object file to the hash table.
XCOFF is a weird format. A normal XCOFF .o files will have three
@@ -1025,9 +938,7 @@ xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
csect they belong to is to examine the address. */
static bfd_boolean
-xcoff_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
unsigned int n_tmask;
unsigned int n_btshft;
@@ -1062,7 +973,7 @@ xcoff_link_add_symbols (abfd, info)
return FALSE;
}
- /* create the loader, toc, gl, ds and debug sections, if needed */
+ /* Create the loader, toc, gl, ds and debug sections, if needed. */
if (! xcoff_link_create_extra_sections (abfd, info))
goto error_return;
@@ -1087,7 +998,7 @@ xcoff_link_add_symbols (abfd, info)
/* We keep a list of the linker hash table entries that correspond
to each external symbol. */
amt = symcount * sizeof (struct xcoff_link_hash_entry *);
- sym_hash = (struct xcoff_link_hash_entry **) bfd_zalloc (abfd, amt);
+ sym_hash = bfd_zalloc (abfd, amt);
if (sym_hash == NULL && symcount != 0)
goto error_return;
coff_data (abfd)->sym_hashes = (struct coff_link_hash_entry **) sym_hash;
@@ -1096,7 +1007,7 @@ xcoff_link_add_symbols (abfd, info)
not easily determine which section a symbol is in, so we store
the information in the tdata for the input file. */
amt = symcount * sizeof (asection *);
- csect_cache = (asection **) bfd_zalloc (abfd, amt);
+ csect_cache = bfd_zalloc (abfd, amt);
if (csect_cache == NULL && symcount != 0)
goto error_return;
xcoff_data (abfd)->csects = csect_cache;
@@ -1108,7 +1019,7 @@ xcoff_link_add_symbols (abfd, info)
into reloc_info using the section target_index. */
amt = abfd->section_count + 1;
amt *= sizeof (struct reloc_info_struct);
- reloc_info = (struct reloc_info_struct *) bfd_zmalloc (amt);
+ reloc_info = bfd_zmalloc (amt);
if (reloc_info == NULL)
goto error_return;
@@ -1117,17 +1028,15 @@ xcoff_link_add_symbols (abfd, info)
last_real = NULL;
for (o = abfd->sections; o != NULL; o = o->next)
{
-
last_real = o;
+
if ((o->flags & SEC_RELOC) != 0)
{
-
reloc_info[o->target_index].relocs =
- xcoff_read_internal_relocs (abfd, o, TRUE, (bfd_byte *) NULL,
- FALSE, (struct internal_reloc *) NULL);
+ xcoff_read_internal_relocs (abfd, o, TRUE, NULL, FALSE, NULL);
amt = o->reloc_count;
amt *= sizeof (asection *);
- reloc_info[o->target_index].csects = (asection **) bfd_zmalloc (amt);
+ reloc_info[o->target_index].csects = bfd_zmalloc (amt);
if (reloc_info[o->target_index].csects == NULL)
goto error_return;
}
@@ -1135,18 +1044,16 @@ xcoff_link_add_symbols (abfd, info)
if ((info->strip == strip_none || info->strip == strip_some)
&& o->lineno_count > 0)
{
-
bfd_byte *linenos;
amt = linesz * o->lineno_count;
- linenos = (bfd_byte *) bfd_malloc (amt);
+ linenos = bfd_malloc (amt);
if (linenos == NULL)
goto error_return;
reloc_info[o->target_index].linenos = linenos;
if (bfd_seek (abfd, o->line_filepos, SEEK_SET) != 0
|| bfd_bread (linenos, amt, abfd) != amt)
goto error_return;
-
}
}
@@ -1174,13 +1081,12 @@ xcoff_link_add_symbols (abfd, info)
bfd_vma value;
struct xcoff_link_hash_entry *set_toc;
- bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
+ bfd_coff_swap_sym_in (abfd, (void *) esym, (void *) &sym);
/* In this pass we are only interested in symbols with csect
information. */
if (sym.n_sclass != C_EXT && sym.n_sclass != C_HIDEXT)
{
-
/* Set csect_cache,
Normally csect is a .pr, .rw etc. created in the loop
If C_FILE or first time, handle special
@@ -1225,12 +1131,11 @@ xcoff_link_add_symbols (abfd, info)
&& csect != NULL
&& ISFCN (sym.n_type))
{
-
union internal_auxent auxlin;
- bfd_coff_swap_aux_in (abfd, (PTR) (esym + symesz),
+ bfd_coff_swap_aux_in (abfd, (void *) (esym + symesz),
sym.n_type, sym.n_sclass,
- 0, sym.n_numaux, (PTR) &auxlin);
+ 0, sym.n_numaux, (void *) &auxlin);
if (auxlin.x_sym.x_fcnary.x_fcn.x_lnnoptr != 0)
{
@@ -1241,14 +1146,14 @@ xcoff_link_add_symbols (abfd, info)
if (enclosing == NULL)
{
(*_bfd_error_handler)
- (_("%s: `%s' has line numbers but no enclosing section"),
- bfd_archive_filename (abfd), name);
+ (_("%B: `%s' has line numbers but no enclosing section"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
linoff = (auxlin.x_sym.x_fcnary.x_fcn.x_lnnoptr
- enclosing->line_filepos);
- /* explicit cast to bfd_signed_vma for compiler */
+ /* Explicit cast to bfd_signed_vma for compiler. */
if (linoff < (bfd_signed_vma) (enclosing->lineno_count * linesz))
{
struct internal_lineno lin;
@@ -1256,7 +1161,7 @@ xcoff_link_add_symbols (abfd, info)
linpstart = (reloc_info[enclosing->target_index].linenos
+ linoff);
- bfd_coff_swap_lineno_in (abfd, (PTR) linpstart, (PTR) &lin);
+ bfd_coff_swap_lineno_in (abfd, (void *) linpstart, (void *) &lin);
if (lin.l_lnno == 0
&& ((bfd_size_type) lin.l_addr.l_symndx
== ((esym
@@ -1271,8 +1176,8 @@ xcoff_link_add_symbols (abfd, info)
linp < linpend;
linp += linesz)
{
- bfd_coff_swap_lineno_in (abfd, (PTR) linp,
- (PTR) &lin);
+ bfd_coff_swap_lineno_in (abfd, (void *) linp,
+ (void *) &lin);
if (lin.l_lnno == 0)
break;
}
@@ -1290,21 +1195,20 @@ xcoff_link_add_symbols (abfd, info)
}
/* Pick up the csect auxiliary information. */
-
if (sym.n_numaux == 0)
{
(*_bfd_error_handler)
- (_("%s: class %d symbol `%s' has no aux entries"),
- bfd_archive_filename (abfd), sym.n_sclass, name);
+ (_("%B: class %d symbol `%s' has no aux entries"),
+ abfd, sym.n_sclass, name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
bfd_coff_swap_aux_in (abfd,
- (PTR) (esym + symesz * sym.n_numaux),
+ (void *) (esym + symesz * sym.n_numaux),
sym.n_type, sym.n_sclass,
sym.n_numaux - 1, sym.n_numaux,
- (PTR) &aux);
+ (void *) &aux);
smtyp = SMTYP_SMTYP (aux.x_csect.x_smtyp);
@@ -1317,8 +1221,8 @@ xcoff_link_add_symbols (abfd, info)
{
default:
(*_bfd_error_handler)
- (_("%s: symbol `%s' has unrecognized csect type %d"),
- bfd_archive_filename (abfd), name, smtyp);
+ (_("%B: symbol `%s' has unrecognized csect type %d"),
+ abfd, name, smtyp);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1329,8 +1233,8 @@ xcoff_link_add_symbols (abfd, info)
|| aux.x_csect.x_scnlen.l != 0)
{
(*_bfd_error_handler)
- (_("%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"),
- bfd_archive_filename (abfd), name, sym.n_sclass, sym.n_scnum,
+ (_("%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"),
+ abfd, name, sym.n_sclass, sym.n_scnum,
aux.x_csect.x_scnlen.l);
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -1365,9 +1269,8 @@ xcoff_link_add_symbols (abfd, info)
|| aux.x_csect.x_scnlen.l != 0)
{
(*_bfd_error_handler)
- (_("%s: XMC_TC0 symbol `%s' is class %d scnlen %d"),
- bfd_archive_filename (abfd), name, sym.n_sclass,
- aux.x_csect.x_scnlen.l);
+ (_("%B: XMC_TC0 symbol `%s' is class %d scnlen %d"),
+ abfd, name, sym.n_sclass, aux.x_csect.x_scnlen.l);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1426,7 +1329,7 @@ xcoff_link_add_symbols (abfd, info)
erelsym = ((bfd_byte *) obj_coff_external_syms (abfd)
+ rel->r_symndx * symesz);
- bfd_coff_swap_sym_in (abfd, (PTR) erelsym, (PTR) &relsym);
+ bfd_coff_swap_sym_in (abfd, (void *) erelsym, (void *) &relsym);
if (relsym.n_sclass == C_EXT)
{
const char *relname;
@@ -1436,7 +1339,6 @@ xcoff_link_add_symbols (abfd, info)
/* At this point we know that the TOC entry is
for an externally visible symbol. */
-
relname = _bfd_coff_internal_syment_name (abfd, &relsym,
relbuf);
if (relname == NULL)
@@ -1447,7 +1349,6 @@ xcoff_link_add_symbols (abfd, info)
the normal case, but not common cases like
SYM.P4 which gcc generates to store SYM + 4
in the TOC. FIXME. */
-
if (strcmp (name, relname) == 0)
{
copy = (! info->keep_memory
@@ -1486,13 +1387,12 @@ xcoff_link_add_symbols (abfd, info)
/* We are about to create a TOC entry for
this symbol. */
set_toc = h;
- } /* merge toc reloc */
- } /* c_ext */
- } /* reloc */
- } /* merge toc */
+ }
+ }
+ }
+ }
{
-
asection *enclosing;
/* We need to create a new section. We get the name from
@@ -1501,9 +1401,7 @@ xcoff_link_add_symbols (abfd, info)
csect = bfd_xcoff_create_csect_from_smclas(abfd, &aux, name);
if (NULL == csect)
- {
- goto error_return;
- }
+ goto error_return;
/* The enclosing section is the main section : .data, .text
or .bss that the csect is coming from. */
@@ -1514,11 +1412,11 @@ xcoff_link_add_symbols (abfd, info)
if (! bfd_is_abs_section (enclosing)
&& ((bfd_vma) sym.n_value < enclosing->vma
|| ((bfd_vma) sym.n_value + aux.x_csect.x_scnlen.l
- > enclosing->vma + enclosing->_raw_size)))
+ > enclosing->vma + enclosing->size)))
{
(*_bfd_error_handler)
- (_("%s: csect `%s' not in enclosing section"),
- bfd_archive_filename (abfd), name);
+ (_("%B: csect `%s' not in enclosing section"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1526,14 +1424,14 @@ xcoff_link_add_symbols (abfd, info)
csect->filepos = (enclosing->filepos
+ sym.n_value
- enclosing->vma);
- csect->_raw_size = aux.x_csect.x_scnlen.l;
+ csect->size = aux.x_csect.x_scnlen.l;
csect->flags |= SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
csect->alignment_power = SMTYP_ALIGN (aux.x_csect.x_smtyp);
/* Record the enclosing section in the tdata for this new
section. */
amt = sizeof (struct coff_section_tdata);
- csect->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+ csect->used_by_bfd = bfd_zalloc (abfd, amt);
if (csect->used_by_bfd == NULL)
goto error_return;
amt = sizeof (struct xcoff_section_tdata);
@@ -1563,7 +1461,7 @@ xcoff_link_add_symbols (abfd, info)
+ relindx * bfd_coff_relsz (abfd));
while (relindx < enclosing->reloc_count
&& *rel_csect == NULL
- && rel->r_vaddr < csect->vma + csect->_raw_size)
+ && rel->r_vaddr < csect->vma + csect->size)
{
*rel_csect = csect;
@@ -1624,8 +1522,8 @@ xcoff_link_add_symbols (abfd, info)
if (bad)
{
(*_bfd_error_handler)
- (_("%s: misplaced XTY_LD `%s'"),
- bfd_archive_filename (abfd), name);
+ (_("%B: misplaced XTY_LD `%s'"),
+ abfd, name);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -1655,16 +1553,14 @@ xcoff_link_add_symbols (abfd, info)
/* The linker script puts the .td section in the data
section after the .tc section. */
csect = bfd_make_section_anyway (abfd, ".td");
-
}
else
- {
- csect = bfd_make_section_anyway (abfd, ".bss");
- }
+ csect = bfd_make_section_anyway (abfd, ".bss");
+
if (csect == NULL)
goto error_return;
csect->vma = sym.n_value;
- csect->_raw_size = aux.x_csect.x_scnlen.l;
+ 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
@@ -1675,7 +1571,7 @@ xcoff_link_add_symbols (abfd, info)
/ symesz);
amt = sizeof (struct coff_section_tdata);
- csect->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+ csect->used_by_bfd = bfd_zalloc (abfd, amt);
if (csect->used_by_bfd == NULL)
goto error_return;
amt = sizeof (struct xcoff_section_tdata);
@@ -1690,7 +1586,7 @@ xcoff_link_add_symbols (abfd, info)
if (sym.n_sclass == C_EXT)
{
csect->flags |= SEC_IS_COMMON;
- csect->_raw_size = 0;
+ csect->size = 0;
section = csect;
value = aux.x_csect.x_scnlen.l;
}
@@ -1703,7 +1599,6 @@ xcoff_link_add_symbols (abfd, info)
&& aux.x_csect.x_smclas != XMC_TC
&& aux.x_csect.x_smclas != XMC_TD)
{
-
int i = -1;
if (name[0] == '_')
@@ -1720,14 +1615,10 @@ xcoff_link_add_symbols (abfd, info)
i = XCOFF_SPECIAL_SECTION_END;
}
else if (name[0] == 'e' && strcmp (name, "end") == 0)
- {
- i = XCOFF_SPECIAL_SECTION_END2;
- }
+ i = XCOFF_SPECIAL_SECTION_END2;
if (i != -1)
- {
- xcoff_hash_table (info)->special_sections[i] = csect;
- }
+ xcoff_hash_table (info)->special_sections[i] = csect;
}
/* Now we have enough information to add the symbol to the
@@ -1774,19 +1665,15 @@ xcoff_link_add_symbols (abfd, info)
if (info->hash->creator == abfd->xvec)
{
if (! bfd_is_und_section (section))
- {
- *sym_hash = xcoff_link_hash_lookup (xcoff_hash_table (info),
- name, TRUE, copy, FALSE);
- }
+ *sym_hash = xcoff_link_hash_lookup (xcoff_hash_table (info),
+ name, TRUE, copy, FALSE);
else
- {
- /* Make a copy of the symbol name to prevent problems with
- merging symbols. */
- *sym_hash = ((struct xcoff_link_hash_entry *)
- bfd_wrapped_link_hash_lookup (abfd, info, name,
- TRUE, TRUE,
- FALSE));
- }
+ /* Make a copy of the symbol name to prevent problems with
+ merging symbols. */
+ *sym_hash = ((struct xcoff_link_hash_entry *)
+ bfd_wrapped_link_hash_lookup (abfd, info, name,
+ TRUE, TRUE, FALSE));
+
if (*sym_hash == NULL)
goto error_return;
if (((*sym_hash)->root.type == bfd_link_hash_defined
@@ -1827,7 +1714,7 @@ xcoff_link_add_symbols (abfd, info)
section = bfd_und_section_ptr;
value = 0;
}
- else if ((*sym_hash)->root.und_next != NULL
+ else if ((*sym_hash)->root.u.undef.next != NULL
|| info->hash->undefs_tail == &(*sym_hash)->root)
{
/* This symbol has been referenced. In this
@@ -1860,7 +1747,7 @@ xcoff_link_add_symbols (abfd, info)
not an error. */
if (! ((*info->callbacks->multiple_definition)
(info, (*sym_hash)->root.root.string,
- (bfd *) NULL, (asection *) NULL, (bfd_vma) 0,
+ NULL, NULL, (bfd_vma) 0,
(*sym_hash)->root.u.def.section->owner,
(*sym_hash)->root.u.def.section,
(*sym_hash)->root.u.def.value)))
@@ -1884,7 +1771,7 @@ xcoff_link_add_symbols (abfd, info)
last_real->next = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name, flags, section, value,
- (const char *) NULL, copy, TRUE,
+ NULL, copy, TRUE,
(struct bfd_link_hash_entry **) sym_hash)))
goto error_return;
last_real->next = first_csect;
@@ -1893,15 +1780,11 @@ xcoff_link_add_symbols (abfd, info)
{
if ((*sym_hash)->root.type != bfd_link_hash_common
|| (*sym_hash)->root.u.c.p->section != csect)
- {
- /* We don't need the common csect we just created. */
- csect->_raw_size = 0;
- }
+ /* We don't need the common csect we just created. */
+ csect->size = 0;
else
- {
- (*sym_hash)->root.u.c.p->alignment_power
- = csect->alignment_power;
- }
+ (*sym_hash)->root.u.c.p->alignment_power
+ = csect->alignment_power;
}
if (info->hash->creator == abfd->xvec)
@@ -1937,7 +1820,7 @@ xcoff_link_add_symbols (abfd, info)
the .debug section, since we need to read it below in
bfd_xcoff_size_dynamic_sections. */
if (strcmp (bfd_get_section_name (abfd, o), ".debug") != 0)
- o->_raw_size = 0;
+ o->size = 0;
o->lineno_count = 0;
if ((o->flags & SEC_RELOC) != 0)
@@ -1951,12 +1834,11 @@ xcoff_link_add_symbols (abfd, info)
for (i = 0; i < o->reloc_count; i++, rel++, rel_csect++)
{
-
if (*rel_csect == NULL)
{
(*_bfd_error_handler)
- (_("%s: reloc %s:%d not in csect"),
- bfd_archive_filename (abfd), o->name, i);
+ (_("%B: reloc %s:%d not in csect"),
+ abfd, o->name, i);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -2000,7 +1882,7 @@ xcoff_link_add_symbols (abfd, info)
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, hds->root.root.string,
(flagword) 0, bfd_und_section_ptr,
- (bfd_vma) 0, (const char *) NULL, FALSE,
+ (bfd_vma) 0, NULL, FALSE,
TRUE, &bh)))
goto error_return;
hds = (struct xcoff_link_hash_entry *) bh;
@@ -2067,81 +1949,62 @@ xcoff_link_add_symbols (abfd, info)
#undef N_TMASK
#undef N_BTSHFT
-/* This function is used to add symbols from a dynamic object to the
- global symbol table. */
+/* Add symbols from an XCOFF object file. */
+
+static bfd_boolean
+xcoff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
+{
+ if (! _bfd_coff_get_external_symbols (abfd))
+ return FALSE;
+ if (! xcoff_link_add_symbols (abfd, info))
+ return FALSE;
+ if (! info->keep_memory)
+ {
+ if (! _bfd_coff_free_symbols (abfd))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/* Look through the loader symbols to see if this dynamic object
+ should be included in the link. The native linker uses the loader
+ symbols, not the normal symbol table, so we do too. */
static bfd_boolean
-xcoff_link_add_dynamic_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+xcoff_link_check_dynamic_ar_symbols (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean *pneeded)
{
asection *lsec;
bfd_byte *contents;
struct internal_ldhdr ldhdr;
const char *strings;
bfd_byte *elsym, *elsymend;
- struct xcoff_import_file *n;
- const char *bname;
- const char *mname;
- const char *s;
- unsigned int c;
- struct xcoff_import_file **pp;
- /* We can only handle a dynamic object if we are generating an XCOFF
- output file. */
- if (info->hash->creator != abfd->xvec)
- {
- (*_bfd_error_handler)
- (_("%s: XCOFF shared object when not producing XCOFF output"),
- bfd_get_filename (abfd));
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
- }
-
- /* The symbols we use from a dynamic object are not the symbols in
- the normal symbol table, but, rather, the symbols in the export
- table. If there is a global symbol in a dynamic object which is
- not in the export table, the loader will not be able to find it,
- so we don't want to find it either. Also, on AIX 4.1.3, shr.o in
- libc.a has symbols in the export table which are not in the
- symbol table. */
+ *pneeded = FALSE;
- /* Read in the .loader section. FIXME: We should really use the
- o_snloader field in the a.out header, rather than grabbing the
- section by name. */
lsec = bfd_get_section_by_name (abfd, ".loader");
if (lsec == NULL)
- {
- (*_bfd_error_handler)
- (_("%s: dynamic object with no .loader section"),
- bfd_get_filename (abfd));
- bfd_set_error (bfd_error_no_symbols);
- return FALSE;
- }
-
+ /* There are no symbols, so don't try to include it. */
+ return TRUE;
if (! xcoff_get_section_contents (abfd, lsec))
return FALSE;
contents = coff_section_data (abfd, lsec)->contents;
- /* Remove the sections from this object, so that they do not get
- included in the link. */
- bfd_section_list_clear (abfd);
-
bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr);
strings = (char *) contents + ldhdr.l_stoff;
- elsym = contents + bfd_xcoff_loader_symbol_offset(abfd, &ldhdr);
-
- elsymend = elsym + ldhdr.l_nsyms * bfd_xcoff_ldsymsz(abfd);
+ elsym = contents + bfd_xcoff_loader_symbol_offset (abfd, &ldhdr);
- for (; elsym < elsymend; elsym += bfd_xcoff_ldsymsz(abfd))
+ elsymend = elsym + ldhdr.l_nsyms * bfd_xcoff_ldsymsz (abfd);
+ for (; elsym < elsymend; elsym += bfd_xcoff_ldsymsz (abfd))
{
struct internal_ldsym ldsym;
char nambuf[SYMNMLEN + 1];
const char *name;
- struct xcoff_link_hash_entry *h;
+ struct bfd_link_hash_entry *h;
bfd_xcoff_swap_ldsym_in (abfd, elsym, &ldsym);
@@ -2158,169 +2021,192 @@ xcoff_link_add_dynamic_symbols (abfd, info)
name = nambuf;
}
- /* Normally we could not call xcoff_link_hash_lookup in an add
- symbols routine, since we might not be using an XCOFF hash
- table. However, we verified above that we are using an XCOFF
- hash table. */
-
- h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, TRUE,
- TRUE, TRUE);
- if (h == NULL)
- return FALSE;
-
- h->flags |= XCOFF_DEF_DYNAMIC;
-
- /* If the symbol is undefined, and the BFD it was found in is
- not a dynamic object, change the BFD to this dynamic object,
- so that we can get the correct import file ID. */
- if ((h->root.type == bfd_link_hash_undefined
- || h->root.type == bfd_link_hash_undefweak)
- && (h->root.u.undef.abfd == NULL
- || (h->root.u.undef.abfd->flags & DYNAMIC) == 0))
- h->root.u.undef.abfd = abfd;
+ h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
- if (h->root.type == bfd_link_hash_new)
+ /* We are only interested in symbols that are currently
+ undefined. At this point we know that we are using an XCOFF
+ hash table. */
+ if (h != NULL
+ && h->type == bfd_link_hash_undefined
+ && (((struct xcoff_link_hash_entry *) h)->flags
+ & XCOFF_DEF_DYNAMIC) == 0)
{
- h->root.type = bfd_link_hash_undefined;
- h->root.u.undef.abfd = abfd;
- /* We do not want to add this to the undefined symbol list. */
+ if (! (*info->callbacks->add_archive_element) (info, abfd, name))
+ return FALSE;
+ *pneeded = TRUE;
+ return TRUE;
}
+ }
- if (h->smclas == XMC_UA
- || h->root.type == bfd_link_hash_undefined
- || h->root.type == bfd_link_hash_undefweak)
- h->smclas = ldsym.l_smclas;
+ /* We do not need this shared object. */
+ if (contents != NULL && ! coff_section_data (abfd, lsec)->keep_contents)
+ {
+ free (coff_section_data (abfd, lsec)->contents);
+ coff_section_data (abfd, lsec)->contents = NULL;
+ }
- /* Unless this is an XMC_XO symbol, we don't bother to actually
- define it, since we don't have a section to put it in anyhow.
- Instead, the relocation routines handle the DEF_DYNAMIC flag
- correctly. */
+ return TRUE;
+}
- if (h->smclas == XMC_XO
- && (h->root.type == bfd_link_hash_undefined
- || h->root.type == bfd_link_hash_undefweak))
- {
- /* This symbol has an absolute value. */
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = bfd_abs_section_ptr;
- h->root.u.def.value = ldsym.l_value;
- }
+/* Look through the symbols to see if this object file should be
+ included in the link. */
- /* If this symbol defines a function descriptor, then it
- implicitly defines the function code as well. */
- if (h->smclas == XMC_DS
- || (h->smclas == XMC_XO && name[0] != '.'))
- h->flags |= XCOFF_DESCRIPTOR;
- if ((h->flags & XCOFF_DESCRIPTOR) != 0)
- {
- struct xcoff_link_hash_entry *hds;
+static bfd_boolean
+xcoff_link_check_ar_symbols (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean *pneeded)
+{
+ bfd_size_type symesz;
+ bfd_byte *esym;
+ bfd_byte *esym_end;
- hds = h->descriptor;
- if (hds == NULL)
- {
- char *dsnm;
+ *pneeded = FALSE;
- dsnm = bfd_malloc ((bfd_size_type) strlen (name) + 2);
- if (dsnm == NULL)
- return FALSE;
- dsnm[0] = '.';
- strcpy (dsnm + 1, name);
- hds = xcoff_link_hash_lookup (xcoff_hash_table (info), dsnm,
- TRUE, TRUE, TRUE);
- free (dsnm);
- if (hds == NULL)
- return FALSE;
+ if ((abfd->flags & DYNAMIC) != 0
+ && ! info->static_link
+ && info->hash->creator == abfd->xvec)
+ return xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded);
- if (hds->root.type == bfd_link_hash_new)
- {
- hds->root.type = bfd_link_hash_undefined;
- hds->root.u.undef.abfd = abfd;
- /* We do not want to add this to the undefined
- symbol list. */
- }
+ symesz = bfd_coff_symesz (abfd);
+ esym = (bfd_byte *) obj_coff_external_syms (abfd);
+ esym_end = esym + obj_raw_syment_count (abfd) * symesz;
+ while (esym < esym_end)
+ {
+ struct internal_syment sym;
- hds->descriptor = h;
- h->descriptor = hds;
- }
+ bfd_coff_swap_sym_in (abfd, (void *) esym, (void *) &sym);
- hds->flags |= XCOFF_DEF_DYNAMIC;
- if (hds->smclas == XMC_UA)
- hds->smclas = XMC_PR;
+ if (sym.n_sclass == C_EXT && sym.n_scnum != N_UNDEF)
+ {
+ const char *name;
+ char buf[SYMNMLEN + 1];
+ struct bfd_link_hash_entry *h;
- /* An absolute symbol appears to actually define code, not a
- function descriptor. This is how some math functions are
- implemented on AIX 4.1. */
- if (h->smclas == XMC_XO
- && (hds->root.type == bfd_link_hash_undefined
- || hds->root.type == bfd_link_hash_undefweak))
+ /* This symbol is externally visible, and is defined by this
+ object file. */
+ name = _bfd_coff_internal_syment_name (abfd, &sym, buf);
+
+ if (name == NULL)
+ return FALSE;
+ h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
+
+ /* We are only interested in symbols that are currently
+ undefined. If a symbol is currently known to be common,
+ XCOFF linkers do not bring in an object file which
+ defines it. We also don't bring in symbols to satisfy
+ undefined references in shared objects. */
+ if (h != NULL
+ && h->type == bfd_link_hash_undefined
+ && (info->hash->creator != abfd->xvec
+ || (((struct xcoff_link_hash_entry *) h)->flags
+ & XCOFF_DEF_DYNAMIC) == 0))
{
- hds->smclas = XMC_XO;
- hds->root.type = bfd_link_hash_defined;
- hds->root.u.def.section = bfd_abs_section_ptr;
- hds->root.u.def.value = ldsym.l_value;
+ if (! (*info->callbacks->add_archive_element) (info, abfd, name))
+ return FALSE;
+ *pneeded = TRUE;
+ return TRUE;
}
}
- }
- if (contents != NULL && ! coff_section_data (abfd, lsec)->keep_contents)
- {
- free (coff_section_data (abfd, lsec)->contents);
- coff_section_data (abfd, lsec)->contents = NULL;
+ esym += (sym.n_numaux + 1) * symesz;
}
- /* Record this file in the import files. */
+ /* We do not need this object file. */
+ return TRUE;
+}
- n = ((struct xcoff_import_file *)
- bfd_alloc (abfd, (bfd_size_type) sizeof (struct xcoff_import_file)));
- if (n == NULL)
+/* Check a single archive element to see if we need to include it in
+ the link. *PNEEDED is set according to whether this element is
+ needed in the link or not. This is called via
+ _bfd_generic_link_add_archive_symbols. */
+
+static bfd_boolean
+xcoff_link_check_archive_element (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean *pneeded)
+{
+ if (! _bfd_coff_get_external_symbols (abfd))
return FALSE;
- n->next = NULL;
- /* For some reason, the path entry in the import file list for a
- shared object appears to always be empty. The file name is the
- base name. */
- n->path = "";
- if (abfd->my_archive == NULL)
+ if (! xcoff_link_check_ar_symbols (abfd, info, pneeded))
+ return FALSE;
+
+ if (*pneeded)
{
- bname = bfd_get_filename (abfd);
- mname = "";
+ if (! xcoff_link_add_symbols (abfd, info))
+ return FALSE;
}
- else
+
+ if (! info->keep_memory || ! *pneeded)
{
- bname = bfd_get_filename (abfd->my_archive);
- mname = bfd_get_filename (abfd);
+ if (! _bfd_coff_free_symbols (abfd))
+ return FALSE;
}
- s = strrchr (bname, '/');
- if (s != NULL)
- bname = s + 1;
- n->file = bname;
- n->member = mname;
- /* We start c at 1 because the first import file number is reserved
- for LIBPATH. */
- for (pp = &xcoff_hash_table (info)->imports, c = 1;
- *pp != NULL;
- pp = &(*pp)->next, ++c)
- ;
- *pp = n;
+ return TRUE;
+}
- xcoff_data (abfd)->import_file_id = c;
+/* Given an XCOFF BFD, add symbols to the global hash table as
+ appropriate. */
- return TRUE;
+bfd_boolean
+_bfd_xcoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
+{
+ switch (bfd_get_format (abfd))
+ {
+ case bfd_object:
+ return xcoff_link_add_object_symbols (abfd, info);
+
+ case bfd_archive:
+ /* If the archive has a map, do the usual search. We then need
+ to check the archive for dynamic objects, because they may not
+ appear in the archive map even though they should, perhaps, be
+ included. If the archive has no map, we just consider each object
+ file in turn, since that apparently is what the AIX native linker
+ does. */
+ if (bfd_has_map (abfd))
+ {
+ if (! (_bfd_generic_link_add_archive_symbols
+ (abfd, info, xcoff_link_check_archive_element)))
+ return FALSE;
+ }
+
+ {
+ bfd *member;
+
+ member = bfd_openr_next_archived_file (abfd, NULL);
+ while (member != NULL)
+ {
+ if (bfd_check_format (member, bfd_object)
+ && (info->hash->creator == member->xvec)
+ && (! bfd_has_map (abfd) || (member->flags & DYNAMIC) != 0))
+ {
+ bfd_boolean needed;
+
+ if (! xcoff_link_check_archive_element (member, info,
+ &needed))
+ return FALSE;
+ if (needed)
+ member->archive_pass = -1;
+ }
+ member = bfd_openr_next_archived_file (abfd, member);
+ }
+ }
+
+ return TRUE;
+
+ default:
+ bfd_set_error (bfd_error_wrong_format);
+ return FALSE;
+ }
}
-/* Routines that are called after all the input files have been
- handled, but before the sections are laid out in memory. */
-
/* Mark a symbol as not being garbage, including the section in which
it is defined. */
-static INLINE bfd_boolean
-xcoff_mark_symbol (info, h)
- struct bfd_link_info *info;
- struct xcoff_link_hash_entry *h;
+static inline bfd_boolean
+xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h)
{
-
if ((h->flags & XCOFF_MARK) != 0)
return TRUE;
@@ -2356,9 +2242,7 @@ xcoff_mark_symbol (info, h)
section. */
static bfd_boolean
-xcoff_mark (info, sec)
- struct bfd_link_info *info;
- asection *sec;
+xcoff_mark (struct bfd_link_info *info, asection *sec)
{
if (bfd_is_abs_section (sec)
|| (sec->flags & SEC_MARK) != 0)
@@ -2370,18 +2254,17 @@ xcoff_mark (info, sec)
&& coff_section_data (sec->owner, sec) != NULL
&& xcoff_section_data (sec->owner, sec) != NULL)
{
- register struct xcoff_link_hash_entry **hp, **hpend;
+ struct xcoff_link_hash_entry **hp, **hpend;
struct internal_reloc *rel, *relend;
/* Mark all the symbols in this section. */
-
hp = (obj_xcoff_sym_hashes (sec->owner)
+ xcoff_section_data (sec->owner, sec)->first_symndx);
hpend = (obj_xcoff_sym_hashes (sec->owner)
+ xcoff_section_data (sec->owner, sec)->last_symndx);
for (; hp < hpend; hp++)
{
- register struct xcoff_link_hash_entry *h;
+ struct xcoff_link_hash_entry *h;
h = *hp;
if (h != NULL
@@ -2393,13 +2276,11 @@ xcoff_mark (info, sec)
}
/* Look through the section relocs. */
-
if ((sec->flags & SEC_RELOC) != 0
&& sec->reloc_count > 0)
{
rel = xcoff_read_internal_relocs (sec->owner, sec, TRUE,
- (bfd_byte *) NULL, FALSE,
- (struct internal_reloc *) NULL);
+ NULL, FALSE, NULL);
if (rel == NULL)
return FALSE;
relend = rel + sec->reloc_count;
@@ -2481,12 +2362,14 @@ xcoff_mark (info, sec)
return TRUE;
}
+/* Routines that are called after all the input files have been
+ handled, but before the sections are laid out in memory. */
+
/* The sweep phase of garbage collection. Remove all garbage
sections. */
static void
-xcoff_sweep (info)
- struct bfd_link_info *info;
+xcoff_sweep (struct bfd_link_info *info)
{
bfd *sub;
@@ -2511,7 +2394,7 @@ xcoff_sweep (info)
o->flags |= SEC_MARK;
else
{
- o->_raw_size = 0;
+ o->size = 0;
o->reloc_count = 0;
o->lineno_count = 0;
}
@@ -2524,11 +2407,10 @@ xcoff_sweep (info)
correct csect length. */
bfd_boolean
-bfd_xcoff_link_record_set (output_bfd, info, harg, size)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct bfd_link_hash_entry *harg;
- bfd_size_type size;
+bfd_xcoff_link_record_set (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct bfd_link_hash_entry *harg,
+ bfd_size_type size)
{
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
struct xcoff_link_size_list *n;
@@ -2540,9 +2422,8 @@ bfd_xcoff_link_record_set (output_bfd, info, harg, size)
/* This will hardly ever be called. I don't want to burn four bytes
per global symbol, so instead the size is kept on a linked list
attached to the hash table. */
-
- amt = sizeof (struct xcoff_link_size_list);
- n = (struct xcoff_link_size_list *) bfd_alloc (output_bfd, amt);
+ amt = sizeof (* n);
+ n = bfd_alloc (output_bfd, amt);
if (n == NULL)
return FALSE;
n->next = xcoff_hash_table (info)->size_list;
@@ -2558,16 +2439,14 @@ bfd_xcoff_link_record_set (output_bfd, info, harg, size)
/* Import a symbol. */
bfd_boolean
-bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
- impmember, syscall_flag)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct bfd_link_hash_entry *harg;
- bfd_vma val;
- const char *imppath;
- const char *impfile;
- const char *impmember;
- unsigned int syscall_flag;
+bfd_xcoff_import_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct bfd_link_hash_entry *harg,
+ bfd_vma val,
+ const char *imppath,
+ const char *impfile,
+ const char *impmember,
+ unsigned int syscall_flag)
{
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
@@ -2656,9 +2535,9 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
if (*pp == NULL)
{
struct xcoff_import_file *n;
- bfd_size_type amt = sizeof (struct xcoff_import_file);
+ bfd_size_type amt = sizeof (* n);
- n = (struct xcoff_import_file *) bfd_alloc (output_bfd, amt);
+ n = bfd_alloc (output_bfd, amt);
if (n == NULL)
return FALSE;
n->next = NULL;
@@ -2677,10 +2556,9 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
/* Export a symbol. */
bfd_boolean
-bfd_xcoff_export_symbol (output_bfd, info, harg)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct bfd_link_hash_entry *harg;
+bfd_xcoff_export_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct bfd_link_hash_entry *harg)
{
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
@@ -2701,7 +2579,7 @@ bfd_xcoff_export_symbol (output_bfd, info, harg)
struct xcoff_link_hash_entry *hfn;
bfd_size_type amt = strlen (h->root.root.string) + 2;
- fnname = (char *) bfd_malloc (amt);
+ fnname = bfd_malloc (amt);
if (fnname == NULL)
return FALSE;
fnname[0] = '.';
@@ -2743,10 +2621,9 @@ bfd_xcoff_export_symbol (output_bfd, info, harg)
and destructors. */
bfd_boolean
-bfd_xcoff_link_count_reloc (output_bfd, info, name)
- bfd *output_bfd;
- struct bfd_link_info *info;
- const char *name;
+bfd_xcoff_link_count_reloc (bfd *output_bfd,
+ struct bfd_link_info *info,
+ const char *name)
{
struct xcoff_link_hash_entry *h;
@@ -2777,10 +2654,9 @@ bfd_xcoff_link_count_reloc (output_bfd, info, name)
assigns a value. */
bfd_boolean
-bfd_xcoff_record_link_assignment (output_bfd, info, name)
- bfd *output_bfd;
- struct bfd_link_info *info;
- const char *name;
+bfd_xcoff_record_link_assignment (bfd *output_bfd,
+ struct bfd_link_info *info,
+ const char *name)
{
struct xcoff_link_hash_entry *h;
@@ -2797,6 +2673,274 @@ bfd_xcoff_record_link_assignment (output_bfd, info, name)
return TRUE;
}
+/* Add a symbol to the .loader symbols, if necessary. */
+
+static bfd_boolean
+xcoff_build_ldsyms (struct xcoff_link_hash_entry *h, void * p)
+{
+ struct xcoff_loader_info *ldinfo = (struct xcoff_loader_info *) p;
+ bfd_size_type amt;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct xcoff_link_hash_entry *) h->root.u.i.link;
+
+ /* __rtinit, this symbol has special handling. */
+ if (h->flags & XCOFF_RTINIT)
+ return TRUE;
+
+ /* If this is a final link, and the symbol was defined as a common
+ symbol in a regular object file, and there was no definition in
+ any dynamic object, then the linker will have allocated space for
+ the symbol in a common section but the XCOFF_DEF_REGULAR flag
+ will not have been set. */
+ if (h->root.type == bfd_link_hash_defined
+ && (h->flags & XCOFF_DEF_REGULAR) == 0
+ && (h->flags & XCOFF_REF_REGULAR) != 0
+ && (h->flags & XCOFF_DEF_DYNAMIC) == 0
+ && (bfd_is_abs_section (h->root.u.def.section)
+ || (h->root.u.def.section->owner->flags & DYNAMIC) == 0))
+ h->flags |= XCOFF_DEF_REGULAR;
+
+ /* If all defined symbols should be exported, mark them now. We
+ don't want to export the actual functions, just the function
+ descriptors. */
+ if (ldinfo->export_defineds
+ && (h->flags & XCOFF_DEF_REGULAR) != 0
+ && h->root.root.string[0] != '.')
+ {
+ bfd_boolean export;
+
+ /* We don't export a symbol which is being defined by an object
+ included from an archive which contains a shared object. The
+ rationale is that if an archive contains both an unshared and
+ a shared object, then there must be some reason that the
+ unshared object is unshared, and we don't want to start
+ providing a shared version of it. In particular, this solves
+ a bug involving the _savefNN set of functions. gcc will call
+ those functions without providing a slot to restore the TOC,
+ so it is essential that these functions be linked in directly
+ and not from a shared object, which means that a shared
+ object which also happens to link them in must not export
+ them. This is confusing, but I haven't been able to think of
+ a different approach. Note that the symbols can, of course,
+ be exported explicitly. */
+ export = TRUE;
+ if ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->root.u.def.section->owner != NULL
+ && h->root.u.def.section->owner->my_archive != NULL)
+ {
+ bfd *arbfd, *member;
+
+ arbfd = h->root.u.def.section->owner->my_archive;
+ member = bfd_openr_next_archived_file (arbfd, NULL);
+ while (member != NULL)
+ {
+ if ((member->flags & DYNAMIC) != 0)
+ {
+ export = FALSE;
+ break;
+ }
+ member = bfd_openr_next_archived_file (arbfd, member);
+ }
+ }
+
+ if (export)
+ h->flags |= XCOFF_EXPORT;
+ }
+
+ /* We don't want to garbage collect symbols which are not defined in
+ XCOFF files. This is a convenient place to mark them. */
+ if (xcoff_hash_table (ldinfo->info)->gc
+ && (h->flags & XCOFF_MARK) == 0
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && (h->root.u.def.section->owner == NULL
+ || (h->root.u.def.section->owner->xvec
+ != ldinfo->info->hash->creator)))
+ h->flags |= XCOFF_MARK;
+
+ /* If this symbol is called and defined in a dynamic object, or it
+ is imported, then we need to set up global linkage code for it.
+ (Unless we did garbage collection and we didn't need this
+ symbol.) */
+ if ((h->flags & XCOFF_CALLED) != 0
+ && (h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak)
+ && h->root.root.string[0] == '.'
+ && h->descriptor != NULL
+ && ((h->descriptor->flags & XCOFF_DEF_DYNAMIC) != 0
+ || ((h->descriptor->flags & XCOFF_IMPORT) != 0
+ && (h->descriptor->flags & XCOFF_DEF_REGULAR) == 0))
+ && (! xcoff_hash_table (ldinfo->info)->gc
+ || (h->flags & XCOFF_MARK) != 0))
+ {
+ asection *sec;
+ struct xcoff_link_hash_entry *hds;
+
+ sec = xcoff_hash_table (ldinfo->info)->linkage_section;
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = sec;
+ h->root.u.def.value = sec->size;
+ h->smclas = XMC_GL;
+ h->flags |= XCOFF_DEF_REGULAR;
+ sec->size += bfd_xcoff_glink_code_size(ldinfo->output_bfd);
+
+ /* The global linkage code requires a TOC entry for the
+ descriptor. */
+ hds = h->descriptor;
+ BFD_ASSERT ((hds->root.type == bfd_link_hash_undefined
+ || hds->root.type == bfd_link_hash_undefweak)
+ && (hds->flags & XCOFF_DEF_REGULAR) == 0);
+ hds->flags |= XCOFF_MARK;
+ if (hds->toc_section == NULL)
+ {
+ int byte_size;
+
+ /* 32 vs 64
+ xcoff32 uses 4 bytes in the toc.
+ xcoff64 uses 8 bytes in the toc. */
+ if (bfd_xcoff_is_xcoff64 (ldinfo->output_bfd))
+ byte_size = 8;
+ else if (bfd_xcoff_is_xcoff32 (ldinfo->output_bfd))
+ byte_size = 4;
+ else
+ return FALSE;
+
+ hds->toc_section = xcoff_hash_table (ldinfo->info)->toc_section;
+ hds->u.toc_offset = hds->toc_section->size;
+ hds->toc_section->size += byte_size;
+ ++xcoff_hash_table (ldinfo->info)->ldrel_count;
+ ++hds->toc_section->reloc_count;
+ hds->indx = -2;
+ hds->flags |= XCOFF_SET_TOC | XCOFF_LDREL;
+
+ /* We need to call xcoff_build_ldsyms recursively here,
+ because we may already have passed hds on the traversal. */
+ xcoff_build_ldsyms (hds, p);
+ }
+ }
+
+ /* If this symbol is exported, but not defined, we need to try to
+ define it. */
+ if ((h->flags & XCOFF_EXPORT) != 0
+ && (h->flags & XCOFF_IMPORT) == 0
+ && (h->flags & XCOFF_DEF_REGULAR) == 0
+ && (h->flags & XCOFF_DEF_DYNAMIC) == 0
+ && (h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak))
+ {
+ if ((h->flags & XCOFF_DESCRIPTOR) != 0
+ && (h->descriptor->root.type == bfd_link_hash_defined
+ || h->descriptor->root.type == bfd_link_hash_defweak))
+ {
+ asection *sec;
+
+ /* This is an undefined function descriptor associated with
+ a defined entry point. We can build up a function
+ descriptor ourselves. Believe it or not, the AIX linker
+ actually does this, and there are cases where we need to
+ do it as well. */
+ sec = xcoff_hash_table (ldinfo->info)->descriptor_section;
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = sec;
+ h->root.u.def.value = sec->size;
+ h->smclas = XMC_DS;
+ h->flags |= XCOFF_DEF_REGULAR;
+
+ /* The size of the function descriptor depends if this is an
+ xcoff32 (12) or xcoff64 (24). */
+ sec->size +=
+ bfd_xcoff_function_descriptor_size(ldinfo->output_bfd);
+
+ /* A function descriptor uses two relocs: one for the
+ associated code, and one for the TOC address. */
+ xcoff_hash_table (ldinfo->info)->ldrel_count += 2;
+ sec->reloc_count += 2;
+
+ /* We handle writing out the contents of the descriptor in
+ xcoff_write_global_symbol. */
+ }
+ else
+ {
+ (*_bfd_error_handler)
+ (_("warning: attempt to export undefined symbol `%s'"),
+ h->root.root.string);
+ h->ldsym = NULL;
+ return TRUE;
+ }
+ }
+
+ /* If this is still a common symbol, and it wasn't garbage
+ collected, we need to actually allocate space for it in the .bss
+ section. */
+ if (h->root.type == bfd_link_hash_common
+ && (! xcoff_hash_table (ldinfo->info)->gc
+ || (h->flags & XCOFF_MARK) != 0)
+ && h->root.u.c.p->section->size == 0)
+ {
+ BFD_ASSERT (bfd_is_com_section (h->root.u.c.p->section));
+ h->root.u.c.p->section->size = h->root.u.c.size;
+ }
+
+ /* We need to add a symbol to the .loader section if it is mentioned
+ in a reloc which we are copying to the .loader section and it was
+ not defined or common, or if it is the entry point, or if it is
+ being exported. */
+
+ if (((h->flags & XCOFF_LDREL) == 0
+ || h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak
+ || h->root.type == bfd_link_hash_common)
+ && (h->flags & XCOFF_ENTRY) == 0
+ && (h->flags & XCOFF_EXPORT) == 0)
+ {
+ h->ldsym = NULL;
+ return TRUE;
+ }
+
+ /* We don't need to add this symbol if we did garbage collection and
+ we did not mark this symbol. */
+ if (xcoff_hash_table (ldinfo->info)->gc
+ && (h->flags & XCOFF_MARK) == 0)
+ {
+ h->ldsym = NULL;
+ return TRUE;
+ }
+
+ /* We may have already processed this symbol due to the recursive
+ call above. */
+ if ((h->flags & XCOFF_BUILT_LDSYM) != 0)
+ return TRUE;
+
+ /* We need to add this symbol to the .loader symbols. */
+
+ BFD_ASSERT (h->ldsym == NULL);
+ amt = sizeof (struct internal_ldsym);
+ h->ldsym = bfd_zalloc (ldinfo->output_bfd, amt);
+ if (h->ldsym == NULL)
+ {
+ ldinfo->failed = TRUE;
+ return FALSE;
+ }
+
+ if ((h->flags & XCOFF_IMPORT) != 0)
+ h->ldsym->l_ifile = h->ldindx;
+
+ /* The first 3 symbol table indices are reserved to indicate the
+ data, text and bss sections. */
+ h->ldindx = ldinfo->ldsym_count + 3;
+
+ ++ldinfo->ldsym_count;
+
+ if (! bfd_xcoff_put_ldsymbol_name (ldinfo->output_bfd, ldinfo,
+ h->ldsym, h->root.root.string))
+ return FALSE;
+
+ h->flags |= XCOFF_BUILT_LDSYM;
+
+ return TRUE;
+}
/* Build the .loader section. This is called by the XCOFF linker
emulation before_allocation routine. We must set the size of the
.loader section before the linker lays out the output file.
@@ -2815,23 +2959,19 @@ bfd_xcoff_record_link_assignment (output_bfd, info, name)
magic names like _end. */
bfd_boolean
-bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
- file_align, maxstack, maxdata, gc,
- modtype, textro, export_defineds,
- special_sections, rtld)
- bfd *output_bfd;
- struct bfd_link_info *info;
- const char *libpath;
- const char *entry;
- unsigned long file_align;
- unsigned long maxstack;
- unsigned long maxdata;
- bfd_boolean gc;
- int modtype;
- bfd_boolean textro;
- bfd_boolean export_defineds;
- asection **special_sections;
- bfd_boolean rtld;
+bfd_xcoff_size_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info,
+ const char *libpath,
+ const char *entry,
+ unsigned long file_align,
+ unsigned long maxstack,
+ unsigned long maxdata,
+ bfd_boolean gc,
+ int modtype,
+ bfd_boolean textro,
+ bfd_boolean export_defineds,
+ asection **special_sections,
+ bfd_boolean rtld)
{
struct xcoff_link_hash_entry *hentry;
asection *lsec;
@@ -2841,7 +2981,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
struct xcoff_import_file *fl;
struct internal_ldhdr *ldhdr;
bfd_size_type stoff;
- register char *out;
+ char *out;
asection *sec;
bfd *sub;
struct bfd_strtab_hash *debug_strtab;
@@ -2898,16 +3038,16 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
xcoff_mark_symbol (info, hsym);
hsym->flags |= (XCOFF_DEF_REGULAR | XCOFF_RTINIT);
- /* __rtinit initialized */
- amt = sizeof (struct internal_ldsym);
- ldsym = (struct internal_ldsym *) bfd_malloc (amt);
+ /* __rtinit initialized. */
+ amt = sizeof (* ldsym);
+ ldsym = bfd_malloc (amt);
- ldsym->l_value = 0; /* will be filled in later */
- ldsym->l_scnum = 2; /* data section */
- ldsym->l_smtype = XTY_SD; /* csect section definition */
- ldsym->l_smclas = 5; /* .rw */
- ldsym->l_ifile = 0; /* special system loader symbol */
- ldsym->l_parm = 0; /* NA */
+ ldsym->l_value = 0; /* Will be filled in later. */
+ ldsym->l_scnum = 2; /* Data section. */
+ ldsym->l_smtype = XTY_SD; /* Csect section definition. */
+ ldsym->l_smclas = 5; /* .rw. */
+ ldsym->l_ifile = 0; /* Special system loader symbol. */
+ ldsym->l_parm = 0; /* NA. */
/* Force __rtinit to be the first symbol in the loader symbol table
See xcoff_build_ldsyms
@@ -2973,20 +3113,17 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
if (sec != NULL
&& gc
&& (sec->flags & SEC_MARK) == 0)
- {
- sec = NULL;
- }
+ sec = NULL;
+
special_sections[i] = sec;
}
if (info->input_bfds == NULL)
- {
- /* I'm not sure what to do in this bizarre case. */
- return TRUE;
- }
+ /* I'm not sure what to do in this bizarre case. */
+ return TRUE;
xcoff_link_hash_traverse (xcoff_hash_table (info), xcoff_build_ldsyms,
- (PTR) &ldinfo);
+ (void *) &ldinfo);
if (ldinfo.failed)
goto error_return;
@@ -3035,8 +3172,8 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
/* We now know the final size of the .loader section. Allocate
space for it. */
lsec = xcoff_hash_table (info)->loader_section;
- lsec->_raw_size = stoff + ldhdr->l_stlen;
- lsec->contents = (bfd_byte *) bfd_zalloc (output_bfd, lsec->_raw_size);
+ lsec->size = stoff + ldhdr->l_stlen;
+ lsec->contents = bfd_zalloc (output_bfd, lsec->size);
if (lsec->contents == NULL)
goto error_return;
@@ -3051,7 +3188,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
*out++ = '\0';
for (fl = xcoff_hash_table (info)->imports; fl != NULL; fl = fl->next)
{
- register const char *s;
+ const char *s;
s = fl->path;
while ((*out++ = *s++) != '\0')
@@ -3080,28 +3217,27 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
symbols are written out in xcoff_link_input_bfd or
xcoff_write_global_symbol. The .loader relocs are written out
when the corresponding normal relocs are handled in
- xcoff_link_input_bfd.
- */
+ xcoff_link_input_bfd. */
/* Allocate space for the magic sections. */
sec = xcoff_hash_table (info)->linkage_section;
- if (sec->_raw_size > 0)
+ if (sec->size > 0)
{
- sec->contents = (bfd_byte *) bfd_zalloc (output_bfd, sec->_raw_size);
+ sec->contents = bfd_zalloc (output_bfd, sec->size);
if (sec->contents == NULL)
goto error_return;
}
sec = xcoff_hash_table (info)->toc_section;
- if (sec->_raw_size > 0)
+ if (sec->size > 0)
{
- sec->contents = (bfd_byte *) bfd_zalloc (output_bfd, sec->_raw_size);
+ sec->contents = bfd_zalloc (output_bfd, sec->size);
if (sec->contents == NULL)
goto error_return;
}
sec = xcoff_hash_table (info)->descriptor_section;
- if (sec->_raw_size > 0)
+ if (sec->size > 0)
{
- sec->contents = (bfd_byte *) bfd_zalloc (output_bfd, sec->_raw_size);
+ sec->contents = bfd_zalloc (output_bfd, sec->size);
if (sec->contents == NULL)
goto error_return;
}
@@ -3122,14 +3258,14 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
if (sub->xvec != info->hash->creator)
continue;
subdeb = bfd_get_section_by_name (sub, ".debug");
- if (subdeb == NULL || subdeb->_raw_size == 0)
+ if (subdeb == NULL || subdeb->size == 0)
continue;
if (info->strip == strip_all
|| info->strip == strip_debugger
|| info->discard == discard_all)
{
- subdeb->_raw_size = 0;
+ subdeb->size = 0;
continue;
}
@@ -3137,8 +3273,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
goto error_return;
symcount = obj_raw_syment_count (sub);
- debug_index = ((unsigned long *)
- bfd_zalloc (sub, symcount * sizeof (unsigned long)));
+ debug_index = bfd_zalloc (sub, symcount * sizeof (unsigned long));
if (debug_index == NULL)
goto error_return;
xcoff_data (sub)->debug_indices = debug_index;
@@ -3148,11 +3283,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
bfd_alloc, because I expect that, when linking many files
together, many of the strings will be the same. Storing the
strings in the hash table should save space in this case. */
- debug_contents = (bfd_byte *) bfd_malloc (subdeb->_raw_size);
- if (debug_contents == NULL)
- goto error_return;
- if (! bfd_get_section_contents (sub, subdeb, (PTR) debug_contents,
- (file_ptr) 0, subdeb->_raw_size))
+ if (! bfd_malloc_and_get_section (sub, subdeb, &debug_contents))
goto error_return;
csectpp = xcoff_data (sub)->csects;
@@ -3168,7 +3299,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
{
struct internal_syment sym;
- bfd_coff_swap_sym_in (sub, (PTR) esym, (PTR) &sym);
+ bfd_coff_swap_sym_in (sub, (void *) esym, (void *) &sym);
*debug_index = (unsigned long) -1;
@@ -3200,7 +3331,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
/* Clear the size of subdeb, so that it is not included directly
in the output file. */
- subdeb->_raw_size = 0;
+ subdeb->size = 0;
if (! info->keep_memory)
{
@@ -3210,7 +3341,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
}
if (info->strip != strip_all)
- xcoff_hash_table (info)->debug_section->_raw_size =
+ xcoff_hash_table (info)->debug_section->size =
_bfd_stringtab_size (debug_strtab);
return TRUE;
@@ -3224,16 +3355,14 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
}
bfd_boolean
-bfd_xcoff_link_generate_rtinit (abfd, init, fini, rtld)
- bfd *abfd;
- const char *init;
- const char *fini;
- bfd_boolean rtld;
+bfd_xcoff_link_generate_rtinit (bfd *abfd,
+ const char *init,
+ const char *fini,
+ bfd_boolean rtld)
{
struct bfd_in_memory *bim;
- bim = ((struct bfd_in_memory *)
- bfd_malloc ((bfd_size_type) sizeof (struct bfd_in_memory)));
+ bim = bfd_malloc ((bfd_size_type) sizeof (* bim));
if (bim == NULL)
return FALSE;
@@ -3242,7 +3371,7 @@ bfd_xcoff_link_generate_rtinit (abfd, init, fini, rtld)
abfd->link_next = 0;
abfd->format = bfd_object;
- abfd->iostream = (PTR) bim;
+ abfd->iostream = (void *) bim;
abfd->flags = BFD_IN_MEMORY;
abfd->direction = write_direction;
abfd->where = 0;
@@ -3257,934 +3386,13 @@ bfd_xcoff_link_generate_rtinit (abfd, init, fini, rtld)
return TRUE;
}
-
-
-/* Add a symbol to the .loader symbols, if necessary. */
-
-static bfd_boolean
-xcoff_build_ldsyms (h, p)
- struct xcoff_link_hash_entry *h;
- PTR p;
-{
- struct xcoff_loader_info *ldinfo = (struct xcoff_loader_info *) p;
- bfd_size_type amt;
-
- if (h->root.type == bfd_link_hash_warning)
- h = (struct xcoff_link_hash_entry *) h->root.u.i.link;
-
- /* __rtinit, this symbol has special handling. */
- if (h->flags & XCOFF_RTINIT)
- return TRUE;
-
- /* If this is a final link, and the symbol was defined as a common
- symbol in a regular object file, and there was no definition in
- any dynamic object, then the linker will have allocated space for
- the symbol in a common section but the XCOFF_DEF_REGULAR flag
- will not have been set. */
- if (h->root.type == bfd_link_hash_defined
- && (h->flags & XCOFF_DEF_REGULAR) == 0
- && (h->flags & XCOFF_REF_REGULAR) != 0
- && (h->flags & XCOFF_DEF_DYNAMIC) == 0
- && (bfd_is_abs_section (h->root.u.def.section)
- || (h->root.u.def.section->owner->flags & DYNAMIC) == 0))
- h->flags |= XCOFF_DEF_REGULAR;
-
- /* If all defined symbols should be exported, mark them now. We
- don't want to export the actual functions, just the function
- descriptors. */
- if (ldinfo->export_defineds
- && (h->flags & XCOFF_DEF_REGULAR) != 0
- && h->root.root.string[0] != '.')
- {
- bfd_boolean export;
-
- /* We don't export a symbol which is being defined by an object
- included from an archive which contains a shared object. The
- rationale is that if an archive contains both an unshared and
- a shared object, then there must be some reason that the
- unshared object is unshared, and we don't want to start
- providing a shared version of it. In particular, this solves
- a bug involving the _savefNN set of functions. gcc will call
- those functions without providing a slot to restore the TOC,
- so it is essential that these functions be linked in directly
- and not from a shared object, which means that a shared
- object which also happens to link them in must not export
- them. This is confusing, but I haven't been able to think of
- a different approach. Note that the symbols can, of course,
- be exported explicitly. */
- export = TRUE;
- if ((h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && h->root.u.def.section->owner != NULL
- && h->root.u.def.section->owner->my_archive != NULL)
- {
- bfd *arbfd, *member;
-
- arbfd = h->root.u.def.section->owner->my_archive;
- member = bfd_openr_next_archived_file (arbfd, (bfd *) NULL);
- while (member != NULL)
- {
- if ((member->flags & DYNAMIC) != 0)
- {
- export = FALSE;
- break;
- }
- member = bfd_openr_next_archived_file (arbfd, member);
- }
- }
-
- if (export)
- h->flags |= XCOFF_EXPORT;
- }
-
- /* We don't want to garbage collect symbols which are not defined in
- XCOFF files. This is a convenient place to mark them. */
- if (xcoff_hash_table (ldinfo->info)->gc
- && (h->flags & XCOFF_MARK) == 0
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && (h->root.u.def.section->owner == NULL
- || (h->root.u.def.section->owner->xvec
- != ldinfo->info->hash->creator)))
- h->flags |= XCOFF_MARK;
-
- /* If this symbol is called and defined in a dynamic object, or it
- is imported, then we need to set up global linkage code for it.
- (Unless we did garbage collection and we didn't need this
- symbol.) */
- if ((h->flags & XCOFF_CALLED) != 0
- && (h->root.type == bfd_link_hash_undefined
- || h->root.type == bfd_link_hash_undefweak)
- && h->root.root.string[0] == '.'
- && h->descriptor != NULL
- && ((h->descriptor->flags & XCOFF_DEF_DYNAMIC) != 0
- || ((h->descriptor->flags & XCOFF_IMPORT) != 0
- && (h->descriptor->flags & XCOFF_DEF_REGULAR) == 0))
- && (! xcoff_hash_table (ldinfo->info)->gc
- || (h->flags & XCOFF_MARK) != 0))
- {
- asection *sec;
- struct xcoff_link_hash_entry *hds;
-
- sec = xcoff_hash_table (ldinfo->info)->linkage_section;
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = sec;
- h->root.u.def.value = sec->_raw_size;
- h->smclas = XMC_GL;
- h->flags |= XCOFF_DEF_REGULAR;
- sec->_raw_size += bfd_xcoff_glink_code_size(ldinfo->output_bfd);
-
- /* The global linkage code requires a TOC entry for the
- descriptor. */
- hds = h->descriptor;
- BFD_ASSERT ((hds->root.type == bfd_link_hash_undefined
- || hds->root.type == bfd_link_hash_undefweak)
- && (hds->flags & XCOFF_DEF_REGULAR) == 0);
- hds->flags |= XCOFF_MARK;
- if (hds->toc_section == NULL)
- {
- int byte_size;
-
- /* 32 vs 64
- xcoff32 uses 4 bytes in the toc.
- xcoff64 uses 8 bytes in the toc. */
- if (bfd_xcoff_is_xcoff64 (ldinfo->output_bfd))
- byte_size = 8;
- else if (bfd_xcoff_is_xcoff32 (ldinfo->output_bfd))
- byte_size = 4;
- else
- return FALSE;
-
- hds->toc_section = xcoff_hash_table (ldinfo->info)->toc_section;
- hds->u.toc_offset = hds->toc_section->_raw_size;
- hds->toc_section->_raw_size += byte_size;
- ++xcoff_hash_table (ldinfo->info)->ldrel_count;
- ++hds->toc_section->reloc_count;
- hds->indx = -2;
- hds->flags |= XCOFF_SET_TOC | XCOFF_LDREL;
-
- /* We need to call xcoff_build_ldsyms recursively here,
- because we may already have passed hds on the traversal. */
- xcoff_build_ldsyms (hds, p);
- }
- }
-
- /* If this symbol is exported, but not defined, we need to try to
- define it. */
- if ((h->flags & XCOFF_EXPORT) != 0
- && (h->flags & XCOFF_IMPORT) == 0
- && (h->flags & XCOFF_DEF_REGULAR) == 0
- && (h->flags & XCOFF_DEF_DYNAMIC) == 0
- && (h->root.type == bfd_link_hash_undefined
- || h->root.type == bfd_link_hash_undefweak))
- {
- if ((h->flags & XCOFF_DESCRIPTOR) != 0
- && (h->descriptor->root.type == bfd_link_hash_defined
- || h->descriptor->root.type == bfd_link_hash_defweak))
- {
- asection *sec;
-
- /* This is an undefined function descriptor associated with
- a defined entry point. We can build up a function
- descriptor ourselves. Believe it or not, the AIX linker
- actually does this, and there are cases where we need to
- do it as well. */
- sec = xcoff_hash_table (ldinfo->info)->descriptor_section;
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = sec;
- h->root.u.def.value = sec->_raw_size;
- h->smclas = XMC_DS;
- h->flags |= XCOFF_DEF_REGULAR;
-
- /* The size of the function descriptor depends if this is an
- xcoff32 (12) or xcoff64 (24). */
- sec->_raw_size +=
- bfd_xcoff_function_descriptor_size(ldinfo->output_bfd);
-
- /* A function descriptor uses two relocs: one for the
- associated code, and one for the TOC address. */
- xcoff_hash_table (ldinfo->info)->ldrel_count += 2;
- sec->reloc_count += 2;
-
- /* We handle writing out the contents of the descriptor in
- xcoff_write_global_symbol. */
- }
- else
- {
- (*_bfd_error_handler)
- (_("warning: attempt to export undefined symbol `%s'"),
- h->root.root.string);
- h->ldsym = NULL;
- return TRUE;
- }
- }
-
- /* If this is still a common symbol, and it wasn't garbage
- collected, we need to actually allocate space for it in the .bss
- section. */
- if (h->root.type == bfd_link_hash_common
- && (! xcoff_hash_table (ldinfo->info)->gc
- || (h->flags & XCOFF_MARK) != 0)
- && h->root.u.c.p->section->_raw_size == 0)
- {
- BFD_ASSERT (bfd_is_com_section (h->root.u.c.p->section));
- h->root.u.c.p->section->_raw_size = h->root.u.c.size;
- }
-
- /* We need to add a symbol to the .loader section if it is mentioned
- in a reloc which we are copying to the .loader section and it was
- not defined or common, or if it is the entry point, or if it is
- being exported. */
-
- if (((h->flags & XCOFF_LDREL) == 0
- || h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak
- || h->root.type == bfd_link_hash_common)
- && (h->flags & XCOFF_ENTRY) == 0
- && (h->flags & XCOFF_EXPORT) == 0)
- {
- h->ldsym = NULL;
- return TRUE;
- }
-
- /* We don't need to add this symbol if we did garbage collection and
- we did not mark this symbol. */
- if (xcoff_hash_table (ldinfo->info)->gc
- && (h->flags & XCOFF_MARK) == 0)
- {
- h->ldsym = NULL;
- return TRUE;
- }
-
- /* We may have already processed this symbol due to the recursive
- call above. */
- if ((h->flags & XCOFF_BUILT_LDSYM) != 0)
- return TRUE;
-
- /* We need to add this symbol to the .loader symbols. */
-
- BFD_ASSERT (h->ldsym == NULL);
- amt = sizeof (struct internal_ldsym);
- h->ldsym = (struct internal_ldsym *) bfd_zalloc (ldinfo->output_bfd, amt);
- if (h->ldsym == NULL)
- {
- ldinfo->failed = TRUE;
- return FALSE;
- }
-
- if ((h->flags & XCOFF_IMPORT) != 0)
- h->ldsym->l_ifile = h->ldindx;
-
- /* The first 3 symbol table indices are reserved to indicate the
- data, text and bss sections. */
- h->ldindx = ldinfo->ldsym_count + 3;
-
- ++ldinfo->ldsym_count;
-
- if (! bfd_xcoff_put_ldsymbol_name (ldinfo->output_bfd, ldinfo,
- h->ldsym, h->root.root.string))
- {
- return FALSE;
- }
-
- h->flags |= XCOFF_BUILT_LDSYM;
-
- return TRUE;
-}
-/* Do the final link step. */
-
-bfd_boolean
-_bfd_xcoff_bfd_final_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
- bfd_size_type symesz;
- struct xcoff_final_link_info finfo;
- asection *o;
- struct bfd_link_order *p;
- bfd_size_type max_contents_size;
- bfd_size_type max_sym_count;
- bfd_size_type max_lineno_count;
- bfd_size_type max_reloc_count;
- bfd_size_type max_output_reloc_count;
- file_ptr rel_filepos;
- unsigned int relsz;
- file_ptr line_filepos;
- unsigned int linesz;
- bfd *sub;
- bfd_byte *external_relocs = NULL;
- char strbuf[STRING_SIZE_SIZE];
- file_ptr pos;
- bfd_size_type amt;
-
- if (info->shared)
- abfd->flags |= DYNAMIC;
-
- symesz = bfd_coff_symesz (abfd);
-
- finfo.info = info;
- finfo.output_bfd = abfd;
- finfo.strtab = NULL;
- finfo.section_info = NULL;
- finfo.last_file_index = -1;
- finfo.toc_symindx = -1;
- finfo.internal_syms = NULL;
- finfo.sym_indices = NULL;
- finfo.outsyms = NULL;
- finfo.linenos = NULL;
- finfo.contents = NULL;
- finfo.external_relocs = NULL;
-
- finfo.ldsym = (xcoff_hash_table (info)->loader_section->contents
- + bfd_xcoff_ldhdrsz (abfd));
- finfo.ldrel = (xcoff_hash_table (info)->loader_section->contents
- + bfd_xcoff_ldhdrsz(abfd)
- + (xcoff_hash_table (info)->ldhdr.l_nsyms
- * bfd_xcoff_ldsymsz(abfd)));
-
- xcoff_data (abfd)->coff.link_info = info;
-
- finfo.strtab = _bfd_stringtab_init ();
- if (finfo.strtab == NULL)
- goto error_return;
-
- /* Count the line number and relocation entries required for the
- output file. Determine a few maximum sizes. */
- max_contents_size = 0;
- max_lineno_count = 0;
- max_reloc_count = 0;
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- o->reloc_count = 0;
- o->lineno_count = 0;
- for (p = o->link_order_head; p != NULL; p = p->next)
- {
- if (p->type == bfd_indirect_link_order)
- {
- asection *sec;
-
- sec = p->u.indirect.section;
-
- /* Mark all sections which are to be included in the
- link. This will normally be every section. We need
- to do this so that we can identify any sections which
- the linker has decided to not include. */
- sec->linker_mark = TRUE;
-
- if (info->strip == strip_none
- || info->strip == strip_some)
- o->lineno_count += sec->lineno_count;
-
- o->reloc_count += sec->reloc_count;
-
- if (sec->_raw_size > max_contents_size)
- max_contents_size = sec->_raw_size;
- if (sec->lineno_count > max_lineno_count)
- max_lineno_count = sec->lineno_count;
- if (coff_section_data (sec->owner, sec) != NULL
- && xcoff_section_data (sec->owner, sec) != NULL
- && (xcoff_section_data (sec->owner, sec)->lineno_count
- > max_lineno_count))
- max_lineno_count =
- xcoff_section_data (sec->owner, sec)->lineno_count;
- if (sec->reloc_count > max_reloc_count)
- max_reloc_count = sec->reloc_count;
- }
- else if (p->type == bfd_section_reloc_link_order
- || p->type == bfd_symbol_reloc_link_order)
- ++o->reloc_count;
- }
- }
-
- /* Compute the file positions for all the sections. */
- if (abfd->output_has_begun)
- {
- if (xcoff_hash_table (info)->file_align != 0)
- abort ();
- }
- else
- {
- bfd_vma file_align;
-
- file_align = xcoff_hash_table (info)->file_align;
- if (file_align != 0)
- {
- bfd_boolean saw_contents;
- int indx;
- asection **op;
- file_ptr sofar;
-
- /* Insert .pad sections before every section which has
- contents and is loaded, if it is preceded by some other
- section which has contents and is loaded. */
- saw_contents = TRUE;
- for (op = &abfd->sections; *op != NULL; op = &(*op)->next)
- {
- if (strcmp ((*op)->name, ".pad") == 0)
- saw_contents = FALSE;
- else if (((*op)->flags & SEC_HAS_CONTENTS) != 0
- && ((*op)->flags & SEC_LOAD) != 0)
- {
- if (! saw_contents)
- saw_contents = TRUE;
- else
- {
- asection *n, **st;
-
- /* Create a pad section and place it before the section
- that needs padding. This requires unlinking and
- relinking the bfd's section list. */
-
- st = abfd->section_tail;
- n = bfd_make_section_anyway (abfd, ".pad");
- n->flags = SEC_HAS_CONTENTS;
- n->alignment_power = 0;
-
- BFD_ASSERT (*st == n);
- bfd_section_list_remove (abfd, st);
- bfd_section_list_insert (abfd, op, n);
-
- op = &n->next;
- saw_contents = FALSE;
- }
- }
- }
-
- /* Reset the section indices after inserting the new
- sections. */
- indx = 0;
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- ++indx;
- o->target_index = indx;
- }
- BFD_ASSERT ((unsigned int) indx == abfd->section_count);
-
- /* Work out appropriate sizes for the .pad sections to force
- each section to land on a page boundary. This bit of
- code knows what compute_section_file_positions is going
- to do. */
- sofar = bfd_coff_filhsz (abfd);
- sofar += bfd_coff_aoutsz (abfd);
- sofar += abfd->section_count * bfd_coff_scnhsz (abfd);
- for (o = abfd->sections; o != NULL; o = o->next)
- if ((bfd_xcoff_is_reloc_count_overflow
- (abfd, (bfd_vma) o->reloc_count))
- || (bfd_xcoff_is_lineno_count_overflow
- (abfd, (bfd_vma) o->lineno_count)))
- /* 64 does not overflow, need to check if 32 does */
- sofar += bfd_coff_scnhsz (abfd);
-
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- if (strcmp (o->name, ".pad") == 0)
- {
- bfd_vma pageoff;
-
- BFD_ASSERT (o->_raw_size == 0);
- pageoff = sofar & (file_align - 1);
- if (pageoff != 0)
- {
- o->_raw_size = file_align - pageoff;
- sofar += file_align - pageoff;
- o->flags |= SEC_HAS_CONTENTS;
- }
- }
- else
- {
- if ((o->flags & SEC_HAS_CONTENTS) != 0)
- sofar += BFD_ALIGN (o->_raw_size,
- 1 << o->alignment_power);
- }
- }
- }
-
- if (! bfd_coff_compute_section_file_positions (abfd))
- goto error_return;
- }
-
- /* Allocate space for the pointers we need to keep for the relocs. */
- {
- unsigned int i;
-
- /* We use section_count + 1, rather than section_count, because
- the target_index fields are 1 based. */
- amt = abfd->section_count + 1;
- amt *= sizeof (struct xcoff_link_section_info);
- finfo.section_info = (struct xcoff_link_section_info *) bfd_malloc (amt);
- if (finfo.section_info == NULL)
- goto error_return;
- for (i = 0; i <= abfd->section_count; i++)
- {
- finfo.section_info[i].relocs = NULL;
- finfo.section_info[i].rel_hashes = NULL;
- finfo.section_info[i].toc_rel_hashes = NULL;
- }
- }
-
- /* Set the file positions for the relocs. */
- rel_filepos = obj_relocbase (abfd);
- relsz = bfd_coff_relsz (abfd);
- max_output_reloc_count = 0;
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- if (o->reloc_count == 0)
- o->rel_filepos = 0;
- else
- {
- /* A stripped file has no relocs. However, we still
- allocate the buffers, so that later code doesn't have to
- worry about whether we are stripping or not. */
- if (info->strip == strip_all)
- o->rel_filepos = 0;
- else
- {
- o->flags |= SEC_RELOC;
- o->rel_filepos = rel_filepos;
- rel_filepos += o->reloc_count * relsz;
- }
-
- /* We don't know the indices of global symbols until we have
- written out all the local symbols. For each section in
- the output file, we keep an array of pointers to hash
- table entries. Each entry in the array corresponds to a
- reloc. When we find a reloc against a global symbol, we
- set the corresponding entry in this array so that we can
- fix up the symbol index after we have written out all the
- local symbols.
-
- Because of this problem, we also keep the relocs in
- memory until the end of the link. This wastes memory.
- We could backpatch the file later, I suppose, although it
- would be slow. */
- amt = o->reloc_count;
- amt *= sizeof (struct internal_reloc);
- finfo.section_info[o->target_index].relocs =
- (struct internal_reloc *) bfd_malloc (amt);
-
- amt = o->reloc_count;
- amt *= sizeof (struct xcoff_link_hash_entry *);
- finfo.section_info[o->target_index].rel_hashes =
- (struct xcoff_link_hash_entry **) bfd_malloc (amt);
-
- if (finfo.section_info[o->target_index].relocs == NULL
- || finfo.section_info[o->target_index].rel_hashes == NULL)
- goto error_return;
-
- if (o->reloc_count > max_output_reloc_count)
- max_output_reloc_count = o->reloc_count;
- }
- }
-
- /* We now know the size of the relocs, so we can determine the file
- positions of the line numbers. */
- line_filepos = rel_filepos;
- finfo.line_filepos = line_filepos;
- linesz = bfd_coff_linesz (abfd);
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- if (o->lineno_count == 0)
- o->line_filepos = 0;
- else
- {
- o->line_filepos = line_filepos;
- line_filepos += o->lineno_count * linesz;
- }
-
- /* Reset the reloc and lineno counts, so that we can use them to
- count the number of entries we have output so far. */
- o->reloc_count = 0;
- o->lineno_count = 0;
- }
-
- obj_sym_filepos (abfd) = line_filepos;
-
- /* Figure out the largest number of symbols in an input BFD. Take
- the opportunity to clear the output_has_begun fields of all the
- input BFD's. We want at least 6 symbols, since that is the
- number which xcoff_write_global_symbol may need. */
- max_sym_count = 6;
- for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
- {
- bfd_size_type sz;
-
- sub->output_has_begun = FALSE;
- sz = obj_raw_syment_count (sub);
- if (sz > max_sym_count)
- max_sym_count = sz;
- }
-
- /* Allocate some buffers used while linking. */
- amt = max_sym_count * sizeof (struct internal_syment);
- finfo.internal_syms = (struct internal_syment *) bfd_malloc (amt);
-
- amt = max_sym_count * sizeof (long);
- finfo.sym_indices = (long *) bfd_malloc (amt);
-
- amt = (max_sym_count + 1) * symesz;
- finfo.outsyms = (bfd_byte *) bfd_malloc (amt);
-
- amt = max_lineno_count * bfd_coff_linesz (abfd);
- finfo.linenos = (bfd_byte *) bfd_malloc (amt);
-
- amt = max_contents_size;
- finfo.contents = (bfd_byte *) bfd_malloc (amt);
-
- amt = max_reloc_count * relsz;
- finfo.external_relocs = (bfd_byte *) bfd_malloc (amt);
-
- if ((finfo.internal_syms == NULL && max_sym_count > 0)
- || (finfo.sym_indices == NULL && max_sym_count > 0)
- || finfo.outsyms == NULL
- || (finfo.linenos == NULL && max_lineno_count > 0)
- || (finfo.contents == NULL && max_contents_size > 0)
- || (finfo.external_relocs == NULL && max_reloc_count > 0))
- goto error_return;
-
- obj_raw_syment_count (abfd) = 0;
- xcoff_data (abfd)->toc = (bfd_vma) -1;
-
- /* We now know the position of everything in the file, except that
- we don't know the size of the symbol table and therefore we don't
- know where the string table starts. We just build the string
- table in memory as we go along. We process all the relocations
- for a single input file at once. */
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- for (p = o->link_order_head; p != NULL; p = p->next)
- {
- if (p->type == bfd_indirect_link_order
- && p->u.indirect.section->owner->xvec == abfd->xvec)
- {
- sub = p->u.indirect.section->owner;
- if (! sub->output_has_begun)
- {
- if (! xcoff_link_input_bfd (&finfo, sub))
- goto error_return;
- sub->output_has_begun = TRUE;
- }
- }
- else if (p->type == bfd_section_reloc_link_order
- || p->type == bfd_symbol_reloc_link_order)
- {
- if (! xcoff_reloc_link_order (abfd, &finfo, o, p))
- goto error_return;
- }
- else
- {
- if (! _bfd_default_link_order (abfd, info, o, p))
- goto error_return;
- }
- }
- }
-
-
- /* Free up the buffers used by xcoff_link_input_bfd. */
-
- if (finfo.internal_syms != NULL)
- {
- free (finfo.internal_syms);
- finfo.internal_syms = NULL;
- }
- if (finfo.sym_indices != NULL)
- {
- free (finfo.sym_indices);
- finfo.sym_indices = NULL;
- }
- if (finfo.linenos != NULL)
- {
- free (finfo.linenos);
- finfo.linenos = NULL;
- }
- if (finfo.contents != NULL)
- {
- free (finfo.contents);
- finfo.contents = NULL;
- }
- if (finfo.external_relocs != NULL)
- {
- free (finfo.external_relocs);
- finfo.external_relocs = NULL;
- }
-
- /* The value of the last C_FILE symbol is supposed to be -1. Write
- it out again. */
- if (finfo.last_file_index != -1)
- {
- finfo.last_file.n_value = -(bfd_vma) 1;
- bfd_coff_swap_sym_out (abfd, (PTR) &finfo.last_file,
- (PTR) finfo.outsyms);
- pos = obj_sym_filepos (abfd) + finfo.last_file_index * symesz;
- if (bfd_seek (abfd, pos, SEEK_SET) != 0
- || bfd_bwrite (finfo.outsyms, symesz, abfd) != symesz)
- goto error_return;
- }
-
- /* Write out all the global symbols which do not come from XCOFF
- input files. */
- xcoff_link_hash_traverse (xcoff_hash_table (info),
- xcoff_write_global_symbol,
- (PTR) &finfo);
-
- if (finfo.outsyms != NULL)
- {
- free (finfo.outsyms);
- finfo.outsyms = NULL;
- }
-
- /* Now that we have written out all the global symbols, we know the
- symbol indices to use for relocs against them, and we can finally
- write out the relocs. */
- amt = max_output_reloc_count * relsz;
- external_relocs = (bfd_byte *) bfd_malloc (amt);
- if (external_relocs == NULL && max_output_reloc_count != 0)
- goto error_return;
-
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- struct internal_reloc *irel;
- struct internal_reloc *irelend;
- struct xcoff_link_hash_entry **rel_hash;
- struct xcoff_toc_rel_hash *toc_rel_hash;
- bfd_byte *erel;
- bfd_size_type rel_size;
-
- /* A stripped file has no relocs. */
- if (info->strip == strip_all)
- {
- o->reloc_count = 0;
- continue;
- }
-
- if (o->reloc_count == 0)
- continue;
-
- irel = finfo.section_info[o->target_index].relocs;
- irelend = irel + o->reloc_count;
- rel_hash = finfo.section_info[o->target_index].rel_hashes;
- for (; irel < irelend; irel++, rel_hash++, erel += relsz)
- {
- if (*rel_hash != NULL)
- {
- if ((*rel_hash)->indx < 0)
- {
- if (! ((*info->callbacks->unattached_reloc)
- (info, (*rel_hash)->root.root.string,
- (bfd *) NULL, o, irel->r_vaddr)))
- goto error_return;
- (*rel_hash)->indx = 0;
- }
- irel->r_symndx = (*rel_hash)->indx;
- }
- }
-
- for (toc_rel_hash = finfo.section_info[o->target_index].toc_rel_hashes;
- toc_rel_hash != NULL;
- toc_rel_hash = toc_rel_hash->next)
- {
- if (toc_rel_hash->h->u.toc_indx < 0)
- {
- if (! ((*info->callbacks->unattached_reloc)
- (info, toc_rel_hash->h->root.root.string,
- (bfd *) NULL, o, toc_rel_hash->rel->r_vaddr)))
- goto error_return;
- toc_rel_hash->h->u.toc_indx = 0;
- }
- toc_rel_hash->rel->r_symndx = toc_rel_hash->h->u.toc_indx;
- }
-
- /* XCOFF requires that the relocs be sorted by address. We tend
- to produce them in the order in which their containing csects
- appear in the symbol table, which is not necessarily by
- address. So we sort them here. There may be a better way to
- do this. */
- qsort ((PTR) finfo.section_info[o->target_index].relocs,
- o->reloc_count, sizeof (struct internal_reloc),
- xcoff_sort_relocs);
-
- irel = finfo.section_info[o->target_index].relocs;
- irelend = irel + o->reloc_count;
- erel = external_relocs;
- for (; irel < irelend; irel++, rel_hash++, erel += relsz)
- bfd_coff_swap_reloc_out (abfd, (PTR) irel, (PTR) erel);
-
- rel_size = relsz * o->reloc_count;
- if (bfd_seek (abfd, o->rel_filepos, SEEK_SET) != 0
- || bfd_bwrite ((PTR) external_relocs, rel_size, abfd) != rel_size)
- goto error_return;
- }
-
- if (external_relocs != NULL)
- {
- free (external_relocs);
- external_relocs = NULL;
- }
-
- /* Free up the section information. */
- if (finfo.section_info != NULL)
- {
- unsigned int i;
-
- for (i = 0; i < abfd->section_count; i++)
- {
- if (finfo.section_info[i].relocs != NULL)
- free (finfo.section_info[i].relocs);
- if (finfo.section_info[i].rel_hashes != NULL)
- free (finfo.section_info[i].rel_hashes);
- }
- free (finfo.section_info);
- finfo.section_info = NULL;
- }
-
- /* Write out the loader section contents. */
- BFD_ASSERT ((bfd_byte *) finfo.ldrel
- == (xcoff_hash_table (info)->loader_section->contents
- + xcoff_hash_table (info)->ldhdr.l_impoff));
- o = xcoff_hash_table (info)->loader_section;
- if (! bfd_set_section_contents (abfd, o->output_section, o->contents,
- (file_ptr) o->output_offset, o->_raw_size))
- goto error_return;
-
- /* Write out the magic sections. */
- o = xcoff_hash_table (info)->linkage_section;
- if (o->_raw_size > 0
- && ! bfd_set_section_contents (abfd, o->output_section, o->contents,
- (file_ptr) o->output_offset,
- o->_raw_size))
- goto error_return;
- o = xcoff_hash_table (info)->toc_section;
- if (o->_raw_size > 0
- && ! bfd_set_section_contents (abfd, o->output_section, o->contents,
- (file_ptr) o->output_offset,
- o->_raw_size))
- goto error_return;
- o = xcoff_hash_table (info)->descriptor_section;
- if (o->_raw_size > 0
- && ! bfd_set_section_contents (abfd, o->output_section, o->contents,
- (file_ptr) o->output_offset,
- o->_raw_size))
- goto error_return;
-
- /* Write out the string table. */
- pos = obj_sym_filepos (abfd) + obj_raw_syment_count (abfd) * symesz;
- if (bfd_seek (abfd, pos, SEEK_SET) != 0)
- goto error_return;
- H_PUT_32 (abfd,
- _bfd_stringtab_size (finfo.strtab) + STRING_SIZE_SIZE,
- strbuf);
- amt = STRING_SIZE_SIZE;
- if (bfd_bwrite (strbuf, amt, abfd) != amt)
- goto error_return;
- if (! _bfd_stringtab_emit (abfd, finfo.strtab))
- goto error_return;
-
- _bfd_stringtab_free (finfo.strtab);
-
- /* Write out the debugging string table. */
- o = xcoff_hash_table (info)->debug_section;
- if (o != NULL)
- {
- struct bfd_strtab_hash *debug_strtab;
-
- debug_strtab = xcoff_hash_table (info)->debug_strtab;
- BFD_ASSERT (o->output_section->_raw_size - o->output_offset
- >= _bfd_stringtab_size (debug_strtab));
- pos = o->output_section->filepos + o->output_offset;
- if (bfd_seek (abfd, pos, SEEK_SET) != 0)
- goto error_return;
- if (! _bfd_stringtab_emit (abfd, debug_strtab))
- goto error_return;
- }
-
- /* Setting bfd_get_symcount to 0 will cause write_object_contents to
- not try to write out the symbols. */
- bfd_get_symcount (abfd) = 0;
-
- return TRUE;
-
- error_return:
- if (finfo.strtab != NULL)
- _bfd_stringtab_free (finfo.strtab);
-
- if (finfo.section_info != NULL)
- {
- unsigned int i;
-
- for (i = 0; i < abfd->section_count; i++)
- {
- if (finfo.section_info[i].relocs != NULL)
- free (finfo.section_info[i].relocs);
- if (finfo.section_info[i].rel_hashes != NULL)
- free (finfo.section_info[i].rel_hashes);
- }
- free (finfo.section_info);
- }
-
- if (finfo.internal_syms != NULL)
- free (finfo.internal_syms);
- if (finfo.sym_indices != NULL)
- free (finfo.sym_indices);
- if (finfo.outsyms != NULL)
- free (finfo.outsyms);
- if (finfo.linenos != NULL)
- free (finfo.linenos);
- if (finfo.contents != NULL)
- free (finfo.contents);
- if (finfo.external_relocs != NULL)
- free (finfo.external_relocs);
- if (external_relocs != NULL)
- free (external_relocs);
- return FALSE;
-}
-
/* Link an input file into the linker output file. This function
handles all the sections and relocations of the input file at once. */
static bfd_boolean
-xcoff_link_input_bfd (finfo, input_bfd)
- struct xcoff_final_link_info *finfo;
- bfd *input_bfd;
+xcoff_link_input_bfd (struct xcoff_final_link_info *finfo,
+ bfd *input_bfd)
{
bfd *output_bfd;
const char *strings;
@@ -4215,7 +3423,6 @@ xcoff_link_input_bfd (finfo, input_bfd)
return TRUE;
/* Move all the symbols to the output file. */
-
output_bfd = finfo->output_bfd;
strings = NULL;
syment_base = obj_raw_syment_count (output_bfd);
@@ -4255,7 +3462,6 @@ xcoff_link_input_bfd (finfo, input_bfd)
while (esym < esym_end)
{
-
struct internal_syment isym;
union internal_auxent aux;
int smtyp = 0;
@@ -4263,7 +3469,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_boolean require;
int add;
- bfd_coff_swap_sym_in (input_bfd, (PTR) esym, (PTR) isymp);
+ bfd_coff_swap_sym_in (input_bfd, (void *) esym, (void *) isymp);
/* If this is a C_EXT or C_HIDEXT symbol, we need the csect
information. */
@@ -4271,10 +3477,10 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
BFD_ASSERT (isymp->n_numaux > 0);
bfd_coff_swap_aux_in (input_bfd,
- (PTR) (esym + isymesz * isymp->n_numaux),
+ (void *) (esym + isymesz * isymp->n_numaux),
isymp->n_type, isymp->n_sclass,
isymp->n_numaux - 1, isymp->n_numaux,
- (PTR) &aux);
+ (void *) &aux);
smtyp = SMTYP_SMTYP (aux.x_csect.x_smtyp);
}
@@ -4423,7 +3629,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
output section, as it does in the default linker
script. */
tocend = ((*csectpp)->output_section->vma
- + (*csectpp)->output_section->_raw_size);
+ + (*csectpp)->output_section->size);
for (inp = finfo->info->input_bfds;
inp != NULL;
inp = inp->link_next)
@@ -4435,7 +3641,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_vma new_toc_end;
new_toc_end = (o->output_section->vma
+ o->output_offset
- + o->_cooked_size);
+ + o->size);
if (new_toc_end > tocend)
tocend = new_toc_end;
}
@@ -4560,8 +3766,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
const char *name;
bfd_size_type indx;
- name = _bfd_coff_internal_syment_name (input_bfd, &isym,
- (char *) NULL);
+ name = _bfd_coff_internal_syment_name (input_bfd, &isym, NULL);
if (name == NULL)
return FALSE;
@@ -4599,8 +3804,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
/* The last C_FILE symbol is in this input file. */
bfd_coff_swap_sym_out (output_bfd,
- (PTR) &finfo->last_file,
- (PTR) (finfo->outsyms
+ (void *) &finfo->last_file,
+ (void *) (finfo->outsyms
+ ((finfo->last_file_index
- syment_base)
* osymesz)));
@@ -4613,8 +3818,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
file_ptr pos;
bfd_coff_swap_sym_out (output_bfd,
- (PTR) &finfo->last_file,
- (PTR) outsym);
+ (void *) &finfo->last_file,
+ (void *) outsym);
pos = obj_sym_filepos (output_bfd);
pos += finfo->last_file_index * osymesz;
@@ -4641,7 +3846,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
/* Output the symbol. */
- bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) outsym);
+ bfd_coff_swap_sym_out (output_bfd, (void *) &isym, (void *) outsym);
*indexp = output_index;
@@ -4715,7 +3920,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
/* The value of a C_BSTAT symbol is the symbol table
index of the containing csect. */
- bfd_coff_swap_sym_in (output_bfd, (PTR) outsym, (PTR) &isym);
+ bfd_coff_swap_sym_in (output_bfd, (void *) outsym, (void *) &isym);
indx = isym.n_value;
if (indx < obj_raw_syment_count (input_bfd))
{
@@ -4726,8 +3931,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
isym.n_value = 0;
else
isym.n_value = symindx;
- bfd_coff_swap_sym_out (output_bfd, (PTR) &isym,
- (PTR) outsym);
+ bfd_coff_swap_sym_out (output_bfd, (void *) &isym,
+ (void *) outsym);
}
}
@@ -4738,9 +3943,9 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
union internal_auxent aux;
- bfd_coff_swap_aux_in (input_bfd, (PTR) esym, isymp->n_type,
+ bfd_coff_swap_aux_in (input_bfd, (void *) esym, isymp->n_type,
isymp->n_sclass, i, isymp->n_numaux,
- (PTR) &aux);
+ (void *) &aux);
if (isymp->n_sclass == C_FILE)
{
@@ -4884,8 +4089,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
- enclosing->line_filepos);
bfd_coff_swap_lineno_in (input_bfd,
- (PTR) (finfo->linenos + linoff),
- (PTR) &lin);
+ (void *) (finfo->linenos + linoff),
+ (void *) &lin);
if (lin.l_lnno != 0
|| ((bfd_size_type) lin.l_addr.l_symndx
!= ((esym
@@ -4901,8 +4106,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_size_type count;
lin.l_addr.l_symndx = *indexp;
- bfd_coff_swap_lineno_out (output_bfd, (PTR) &lin,
- (PTR) (finfo->linenos
+ bfd_coff_swap_lineno_out (output_bfd, (void *) &lin,
+ (void *) (finfo->linenos
+ linoff));
linpend = (finfo->linenos
@@ -4914,14 +4119,14 @@ xcoff_link_input_bfd (finfo, input_bfd)
linp < linpend;
linp += linesz)
{
- bfd_coff_swap_lineno_in (input_bfd, (PTR) linp,
- (PTR) &lin);
+ bfd_coff_swap_lineno_in (input_bfd, (void *) linp,
+ (void *) &lin);
if (lin.l_lnno == 0)
break;
lin.l_addr.l_paddr += offset;
bfd_coff_swap_lineno_out (output_bfd,
- (PTR) &lin,
- (PTR) linp);
+ (void *) &lin,
+ (void *) linp);
}
count = (linp - (finfo->linenos + linoff)) / linesz;
@@ -4969,16 +4174,16 @@ xcoff_link_input_bfd (finfo, input_bfd)
struct internal_syment iis;
bfd_coff_swap_sym_in (output_bfd,
- (PTR) oos,
- (PTR) &iis);
+ (void *) oos,
+ (void *) &iis);
iis.n_value =
(iisp->n_value
- enclosing->line_filepos
- linoff
+ aux.x_sym.x_fcnary.x_fcn.x_lnnoptr);
bfd_coff_swap_sym_out (output_bfd,
- (PTR) &iis,
- (PTR) oos);
+ (void *) &iis,
+ (void *) oos);
--incls;
}
@@ -4993,9 +4198,9 @@ xcoff_link_input_bfd (finfo, input_bfd)
}
}
- bfd_coff_swap_aux_out (output_bfd, (PTR) &aux, isymp->n_type,
+ bfd_coff_swap_aux_out (output_bfd, (void *) &aux, isymp->n_type,
isymp->n_sclass, i, isymp->n_numaux,
- (PTR) outsym);
+ (void *) outsym);
outsym += osymesz;
esym += isymesz;
}
@@ -5014,8 +4219,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
&& (bfd_size_type) finfo->last_file_index >= syment_base)
{
finfo->last_file.n_value = output_index;
- bfd_coff_swap_sym_out (output_bfd, (PTR) &finfo->last_file,
- (PTR) (finfo->outsyms
+ bfd_coff_swap_sym_out (output_bfd, (void *) &finfo->last_file,
+ (void *) (finfo->outsyms
+ ((finfo->last_file_index - syment_base)
* osymesz)));
}
@@ -5043,17 +4248,14 @@ xcoff_link_input_bfd (finfo, input_bfd)
/* Relocate the contents of each section. */
for (o = input_bfd->sections; o != NULL; o = o->next)
{
-
bfd_byte *contents;
if (! o->linker_mark)
- {
- /* This section was omitted from the link. */
- continue;
- }
+ /* This section was omitted from the link. */
+ continue;
if ((o->flags & SEC_HAS_CONTENTS) == 0
- || o->_raw_size == 0
+ || o->size == 0
|| (o->flags & SEC_IN_MEMORY) != 0)
continue;
@@ -5062,12 +4264,13 @@ xcoff_link_input_bfd (finfo, input_bfd)
if (coff_section_data (input_bfd, o) != NULL
&& coff_section_data (input_bfd, o)->contents != NULL)
contents = coff_section_data (input_bfd, o)->contents;
- else {
- if (! bfd_get_section_contents (input_bfd, o, finfo->contents,
- (file_ptr) 0, o->_raw_size))
- return FALSE;
- contents = finfo->contents;
- }
+ else
+ {
+ bfd_size_type sz = o->rawsize ? o->rawsize : o->size;
+ if (!bfd_get_section_contents (input_bfd, o, finfo->contents, 0, sz))
+ return FALSE;
+ contents = finfo->contents;
+ }
if ((o->flags & SEC_RELOC) != 0)
{
@@ -5148,9 +4351,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
struct xcoff_link_section_info *si;
bfd_size_type amt;
- amt = sizeof (struct xcoff_toc_rel_hash);
- n = ((struct xcoff_toc_rel_hash *)
- bfd_alloc (finfo->output_bfd, amt));
+ amt = sizeof (* n);
+ n = bfd_alloc (finfo->output_bfd, amt);
if (n == NULL)
return FALSE;
si = finfo->section_info + target_index;
@@ -5194,10 +4396,10 @@ xcoff_link_input_bfd (finfo, input_bfd)
if (is->n_sclass == C_HIDEXT
&& is->n_numaux > 0)
{
- PTR auxptr;
+ void * auxptr;
union internal_auxent aux;
- auxptr = ((PTR)
+ auxptr = ((void *)
(((bfd_byte *)
obj_coff_external_syms (input_bfd))
+ ((r_symndx + is->n_numaux)
@@ -5206,7 +4408,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
is->n_type, is->n_sclass,
is->n_numaux - 1,
is->n_numaux,
- (PTR) &aux);
+ (void *) &aux);
if (SMTYP_SMTYP (aux.x_csect.x_smtyp) == XTY_SD
&& aux.x_csect.x_smclas == XMC_TC0)
indx = finfo->toc_symindx;
@@ -5285,9 +4487,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
else
{
(*_bfd_error_handler)
- (_("%s: loader reloc in unrecognized section `%s'"),
- bfd_archive_filename (input_bfd),
- sec->name);
+ (_("%B: loader reloc in unrecognized section `%A'"),
+ input_bfd, sec);
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
@@ -5307,8 +4508,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
if (h->ldindx < 0 && ! quiet)
{
(*_bfd_error_handler)
- (_("%s: `%s' in loader reloc but not loader sym"),
- bfd_archive_filename (input_bfd),
+ (_("%B: `%s' in loader reloc but not loader sym"),
+ input_bfd,
h->root.root.string);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@@ -5322,10 +4523,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
&& ! quiet)
{
(*_bfd_error_handler)
- (_("%s: loader reloc in read-only section %s"),
- bfd_archive_filename (input_bfd),
- bfd_get_section_name (finfo->output_bfd,
- o->output_section));
+ (_("%B: loader reloc in read-only section %A"),
+ input_bfd, o->output_section);
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
@@ -5352,9 +4551,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
/* Write out the modified section contents. */
if (! bfd_set_section_contents (output_bfd, o->output_section,
contents, (file_ptr) o->output_offset,
- (o->_cooked_size != 0
- ? o->_cooked_size
- : o->_raw_size)))
+ o->size))
return FALSE;
}
@@ -5372,13 +4569,26 @@ xcoff_link_input_bfd (finfo, input_bfd)
#undef N_TMASK
#undef N_BTSHFT
-/* Write out a non-XCOFF global symbol. */
+/* Sort relocs by VMA. This is called via qsort. */
+
+static int
+xcoff_sort_relocs (const void * p1, const void * p2)
+{
+ const struct internal_reloc *r1 = (const struct internal_reloc *) p1;
+ const struct internal_reloc *r2 = (const struct internal_reloc *) p2;
+ if (r1->r_vaddr > r2->r_vaddr)
+ return 1;
+ else if (r1->r_vaddr < r2->r_vaddr)
+ return -1;
+ else
+ return 0;
+}
+
+/* Write out a non-XCOFF global symbol. */
static bfd_boolean
-xcoff_write_global_symbol (h, inf)
- struct xcoff_link_hash_entry *h;
- PTR inf;
+xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf)
{
struct xcoff_final_link_info *finfo = (struct xcoff_final_link_info *) inf;
bfd *output_bfd;
@@ -5425,7 +4635,6 @@ xcoff_write_global_symbol (h, inf)
else if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
-
asection *sec;
sec = h->root.u.def.section;
@@ -5443,30 +4652,22 @@ xcoff_write_global_symbol (h, inf)
if (((h->flags & XCOFF_DEF_REGULAR) == 0
&& (h->flags & XCOFF_DEF_DYNAMIC) != 0)
|| (h->flags & XCOFF_IMPORT) != 0)
- {
- /* Clear l_smtype
- Import symbols are defined so the check above will make
- the l_smtype XTY_SD. But this is not correct, it should
- be cleared. */
- ldsym->l_smtype |= L_IMPORT;
- }
+ /* Clear l_smtype
+ Import symbols are defined so the check above will make
+ the l_smtype XTY_SD. But this is not correct, it should
+ be cleared. */
+ ldsym->l_smtype |= L_IMPORT;
if (((h->flags & XCOFF_DEF_REGULAR) != 0
&& (h->flags & XCOFF_DEF_DYNAMIC) != 0)
|| (h->flags & XCOFF_EXPORT) != 0)
- {
- ldsym->l_smtype |= L_EXPORT;
- }
+ ldsym->l_smtype |= L_EXPORT;
if ((h->flags & XCOFF_ENTRY) != 0)
- {
- ldsym->l_smtype |= L_ENTRY;
- }
+ ldsym->l_smtype |= L_ENTRY;
if ((h->flags & XCOFF_RTINIT) != 0)
- {
- ldsym->l_smtype = XTY_SD;
- }
+ ldsym->l_smtype = XTY_SD;
ldsym->l_smclas = h->smclas;
@@ -5475,22 +4676,17 @@ xcoff_write_global_symbol (h, inf)
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
&& (h->root.u.def.value != 0))
- {
- ldsym->l_smclas = XMC_XO;
- }
+ ldsym->l_smclas = XMC_XO;
+
else if ((h->flags & (XCOFF_SYSCALL32 | XCOFF_SYSCALL64)) ==
(XCOFF_SYSCALL32 | XCOFF_SYSCALL64))
- {
- ldsym->l_smclas = XMC_SV3264;
- }
+ ldsym->l_smclas = XMC_SV3264;
+
else if (h->flags & XCOFF_SYSCALL32)
- {
- ldsym->l_smclas = XMC_SV;
- }
+ ldsym->l_smclas = XMC_SV;
+
else if (h->flags & XCOFF_SYSCALL64)
- {
- ldsym->l_smclas = XMC_SV64;
- }
+ ldsym->l_smclas = XMC_SV64;
}
if (ldsym->l_ifile == -(bfd_size_type) 1)
@@ -5500,13 +4696,9 @@ xcoff_write_global_symbol (h, inf)
else if (ldsym->l_ifile == 0)
{
if ((ldsym->l_smtype & L_IMPORT) == 0)
- {
- ldsym->l_ifile = 0;
- }
+ ldsym->l_ifile = 0;
else if (impbfd == NULL)
- {
- ldsym->l_ifile = 0;
- }
+ ldsym->l_ifile = 0;
else
{
BFD_ASSERT (impbfd->xvec == output_bfd->xvec);
@@ -5543,10 +4735,7 @@ xcoff_write_global_symbol (h, inf)
- xcoff_data (output_bfd)->toc);
if ((h->descriptor->flags & XCOFF_SET_TOC) != 0)
- {
- tocoff += h->descriptor->u.toc_offset;
- }
-
+ tocoff += h->descriptor->u.toc_offset;
/* The first instruction in the glink code needs to be
cooked to to hold the correct offset in the toc. The
@@ -5558,11 +4747,9 @@ xcoff_write_global_symbol (h, inf)
The /4 is because the glink code is in bytes and we are going
4 at a pop. */
for (i = 1; i < bfd_xcoff_glink_code_size(output_bfd) / 4; i++)
- {
- bfd_put_32 (output_bfd,
- (bfd_vma) bfd_xcoff_glink_code(output_bfd, i),
- &p[4 * i]);
- }
+ bfd_put_32 (output_bfd,
+ (bfd_vma) bfd_xcoff_glink_code(output_bfd, i),
+ &p[4 * i]);
}
/* If we created a TOC entry for this symbol, write out the required
@@ -5585,11 +4772,8 @@ xcoff_write_global_symbol (h, inf)
+ tocsec->output_offset
+ h->u.toc_offset);
-
if (h->indx >= 0)
- {
- irel->r_symndx = h->indx;
- }
+ irel->r_symndx = h->indx;
else
{
h->indx = -2;
@@ -5603,7 +4787,7 @@ xcoff_write_global_symbol (h, inf)
whether the output is 32 or 64 bit. */
memset (&iraux, 0, sizeof iraux);
iraux.x_csect.x_smtyp = XTY_SD;
- /* iraux.x_csect.x_scnlen.l = 4 or 8, see below */
+ /* iraux.x_csect.x_scnlen.l = 4 or 8, see below. */
iraux.x_csect.x_smclas = XMC_TC;
/* 32 bit uses a 32 bit R_POS to do the relocations
@@ -5623,9 +4807,8 @@ xcoff_write_global_symbol (h, inf)
iraux.x_csect.x_scnlen.l = 4;
}
else
- {
- return FALSE;
- }
+ return FALSE;
+
irel->r_type = R_POS;
finfo->section_info[oindx].rel_hashes[osec->reloc_count] = NULL;
++osec->reloc_count;
@@ -5641,7 +4824,6 @@ xcoff_write_global_symbol (h, inf)
the reloc. */
if (finfo->info->strip != strip_all)
{
-
result = bfd_xcoff_put_symbol_name (output_bfd, finfo->strtab,
&irsym, h->root.root.string);
if (!result)
@@ -5653,12 +4835,12 @@ xcoff_write_global_symbol (h, inf)
irsym.n_type = T_NULL;
irsym.n_numaux = 1;
- bfd_coff_swap_sym_out (output_bfd, (PTR) &irsym, (PTR) outsym);
+ bfd_coff_swap_sym_out (output_bfd, (void *) &irsym, (void *) outsym);
outsym += bfd_coff_symesz (output_bfd);
- /* note : iraux is initialized above */
- bfd_coff_swap_aux_out (output_bfd, (PTR) &iraux, T_NULL, C_HIDEXT,
- 0, 1, (PTR) outsym);
+ /* Note : iraux is initialized above. */
+ bfd_coff_swap_aux_out (output_bfd, (void *) &iraux, T_NULL, C_HIDEXT,
+ 0, 1, (void *) outsym);
outsym += bfd_coff_auxesz (output_bfd);
if (h->indx >= 0)
@@ -5717,9 +4899,7 @@ xcoff_write_global_symbol (h, inf)
byte_size = 4;
}
else
- {
- return FALSE;
- }
+ return FALSE;
sec = h->root.u.def.section;
osec = sec->output_section;
@@ -5920,12 +5100,12 @@ xcoff_write_global_symbol (h, inf)
isym.n_type = T_NULL;
isym.n_numaux = 1;
- bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) outsym);
+ bfd_coff_swap_sym_out (output_bfd, (void *) &isym, (void *) outsym);
outsym += bfd_coff_symesz (output_bfd);
aux.x_csect.x_smclas = h->smclas;
- bfd_coff_swap_aux_out (output_bfd, (PTR) &aux, T_NULL, isym.n_sclass, 0, 1,
- (PTR) outsym);
+ bfd_coff_swap_aux_out (output_bfd, (void *) &aux, T_NULL, isym.n_sclass, 0, 1,
+ (void *) outsym);
outsym += bfd_coff_auxesz (output_bfd);
if ((h->root.type == bfd_link_hash_defined
@@ -5933,17 +5113,16 @@ xcoff_write_global_symbol (h, inf)
&& h->smclas != XMC_XO)
{
/* We just output an SD symbol. Now output an LD symbol. */
-
h->indx += 2;
isym.n_sclass = C_EXT;
- bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) outsym);
+ bfd_coff_swap_sym_out (output_bfd, (void *) &isym, (void *) outsym);
outsym += bfd_coff_symesz (output_bfd);
aux.x_csect.x_smtyp = XTY_LD;
aux.x_csect.x_scnlen.l = obj_raw_syment_count (output_bfd);
- bfd_coff_swap_aux_out (output_bfd, (PTR) &aux, T_NULL, C_EXT, 0, 1,
- (PTR) outsym);
+ bfd_coff_swap_aux_out (output_bfd, (void *) &aux, T_NULL, C_EXT, 0, 1,
+ (void *) outsym);
outsym += bfd_coff_auxesz (output_bfd);
}
@@ -5962,11 +5141,10 @@ xcoff_write_global_symbol (h, inf)
/* Handle a link order which is supposed to generate a reloc. */
static bfd_boolean
-xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
- bfd *output_bfd;
- struct xcoff_final_link_info *finfo;
- asection *output_section;
- struct bfd_link_order *link_order;
+xcoff_reloc_link_order (bfd *output_bfd,
+ struct xcoff_final_link_info *finfo,
+ asection *output_section,
+ struct bfd_link_order *link_order)
{
reloc_howto_type *howto;
struct xcoff_link_hash_entry *h;
@@ -5978,13 +5156,11 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
struct internal_ldrel ldrel;
if (link_order->type == bfd_section_reloc_link_order)
- {
- /* We need to somehow locate a symbol in the right section. The
- symbol must either have a value of zero, or we must adjust
- the addend by the value of the symbol. FIXME: Write this
- when we need it. The old linker couldn't handle this anyhow. */
- abort ();
- }
+ /* We need to somehow locate a symbol in the right section. The
+ symbol must either have a value of zero, or we must adjust
+ the addend by the value of the symbol. FIXME: Write this
+ when we need it. The old linker couldn't handle this anyhow. */
+ abort ();
howto = bfd_reloc_type_lookup (output_bfd, link_order->u.reloc.p->reloc);
if (howto == NULL)
@@ -6000,8 +5176,7 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
if (h == NULL)
{
if (! ((*finfo->info->callbacks->unattached_reloc)
- (finfo->info, link_order->u.reloc.p->u.name, (bfd *) NULL,
- (asection *) NULL, (bfd_vma) 0)))
+ (finfo->info, link_order->u.reloc.p->u.name, NULL, NULL, (bfd_vma) 0)))
return FALSE;
return TRUE;
}
@@ -6037,7 +5212,7 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
bfd_boolean ok;
size = bfd_get_reloc_size (howto);
- buf = (bfd_byte *) bfd_zmalloc (size);
+ buf = bfd_zmalloc (size);
if (buf == NULL)
return FALSE;
@@ -6051,16 +5226,15 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
abort ();
case bfd_reloc_overflow:
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, link_order->u.reloc.p->u.name,
- howto->name, addend, (bfd *) NULL, (asection *) NULL,
- (bfd_vma) 0)))
+ (finfo->info, NULL, link_order->u.reloc.p->u.name,
+ howto->name, addend, NULL, NULL, (bfd_vma) 0)))
{
free (buf);
return FALSE;
}
break;
}
- ok = bfd_set_section_contents (output_bfd, output_section, (PTR) buf,
+ ok = bfd_set_section_contents (output_bfd, output_section, (void *) buf,
(file_ptr) link_order->offset, size);
free (buf);
if (! ok)
@@ -6069,7 +5243,6 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
/* Store the reloc information in the right place. It will get
swapped and written out at the end of the final_link routine. */
-
irel = (finfo->section_info[output_section->target_index].relocs
+ output_section->reloc_count);
rel_hash_ptr = (finfo->section_info[output_section->target_index].rel_hashes
@@ -6144,24 +5317,639 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
return TRUE;
}
-/* Sort relocs by VMA. This is called via qsort. */
+/* Do the final link step. */
-static int
-xcoff_sort_relocs (p1, p2)
- const PTR p1;
- const PTR p2;
+bfd_boolean
+_bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
{
- const struct internal_reloc *r1 = (const struct internal_reloc *) p1;
- const struct internal_reloc *r2 = (const struct internal_reloc *) p2;
+ bfd_size_type symesz;
+ struct xcoff_final_link_info finfo;
+ asection *o;
+ struct bfd_link_order *p;
+ bfd_size_type max_contents_size;
+ bfd_size_type max_sym_count;
+ bfd_size_type max_lineno_count;
+ bfd_size_type max_reloc_count;
+ bfd_size_type max_output_reloc_count;
+ file_ptr rel_filepos;
+ unsigned int relsz;
+ file_ptr line_filepos;
+ unsigned int linesz;
+ bfd *sub;
+ bfd_byte *external_relocs = NULL;
+ char strbuf[STRING_SIZE_SIZE];
+ file_ptr pos;
+ bfd_size_type amt;
- if (r1->r_vaddr > r2->r_vaddr)
- return 1;
- else if (r1->r_vaddr < r2->r_vaddr)
- return -1;
+ if (info->shared)
+ abfd->flags |= DYNAMIC;
+
+ symesz = bfd_coff_symesz (abfd);
+
+ finfo.info = info;
+ finfo.output_bfd = abfd;
+ finfo.strtab = NULL;
+ finfo.section_info = NULL;
+ finfo.last_file_index = -1;
+ finfo.toc_symindx = -1;
+ finfo.internal_syms = NULL;
+ finfo.sym_indices = NULL;
+ finfo.outsyms = NULL;
+ finfo.linenos = NULL;
+ finfo.contents = NULL;
+ finfo.external_relocs = NULL;
+
+ finfo.ldsym = (xcoff_hash_table (info)->loader_section->contents
+ + bfd_xcoff_ldhdrsz (abfd));
+ finfo.ldrel = (xcoff_hash_table (info)->loader_section->contents
+ + bfd_xcoff_ldhdrsz(abfd)
+ + (xcoff_hash_table (info)->ldhdr.l_nsyms
+ * bfd_xcoff_ldsymsz(abfd)));
+
+ xcoff_data (abfd)->coff.link_info = info;
+
+ finfo.strtab = _bfd_stringtab_init ();
+ if (finfo.strtab == NULL)
+ goto error_return;
+
+ /* Count the line number and relocation entries required for the
+ output file. Determine a few maximum sizes. */
+ max_contents_size = 0;
+ max_lineno_count = 0;
+ max_reloc_count = 0;
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ o->reloc_count = 0;
+ o->lineno_count = 0;
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
+ {
+ if (p->type == bfd_indirect_link_order)
+ {
+ asection *sec;
+
+ sec = p->u.indirect.section;
+
+ /* Mark all sections which are to be included in the
+ link. This will normally be every section. We need
+ to do this so that we can identify any sections which
+ the linker has decided to not include. */
+ sec->linker_mark = TRUE;
+
+ if (info->strip == strip_none
+ || info->strip == strip_some)
+ o->lineno_count += sec->lineno_count;
+
+ o->reloc_count += sec->reloc_count;
+
+ if (sec->rawsize > max_contents_size)
+ max_contents_size = sec->rawsize;
+ if (sec->size > max_contents_size)
+ max_contents_size = sec->size;
+ if (sec->lineno_count > max_lineno_count)
+ max_lineno_count = sec->lineno_count;
+ if (coff_section_data (sec->owner, sec) != NULL
+ && xcoff_section_data (sec->owner, sec) != NULL
+ && (xcoff_section_data (sec->owner, sec)->lineno_count
+ > max_lineno_count))
+ max_lineno_count =
+ xcoff_section_data (sec->owner, sec)->lineno_count;
+ if (sec->reloc_count > max_reloc_count)
+ max_reloc_count = sec->reloc_count;
+ }
+ else if (p->type == bfd_section_reloc_link_order
+ || p->type == bfd_symbol_reloc_link_order)
+ ++o->reloc_count;
+ }
+ }
+
+ /* Compute the file positions for all the sections. */
+ if (abfd->output_has_begun)
+ {
+ if (xcoff_hash_table (info)->file_align != 0)
+ abort ();
+ }
else
- return 0;
-}
+ {
+ bfd_vma file_align;
+
+ file_align = xcoff_hash_table (info)->file_align;
+ if (file_align != 0)
+ {
+ bfd_boolean saw_contents;
+ int indx;
+ file_ptr sofar;
+
+ /* Insert .pad sections before every section which has
+ contents and is loaded, if it is preceded by some other
+ section which has contents and is loaded. */
+ saw_contents = TRUE;
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ if (strcmp (o->name, ".pad") == 0)
+ saw_contents = FALSE;
+ else if ((o->flags & SEC_HAS_CONTENTS) != 0
+ && (o->flags & SEC_LOAD) != 0)
+ {
+ if (! saw_contents)
+ saw_contents = TRUE;
+ else
+ {
+ asection *n;
+ /* Create a pad section and place it before the section
+ 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->alignment_power = 0;
+ bfd_section_list_remove (abfd, n);
+ bfd_section_list_insert_before (abfd, o, n);
+ saw_contents = FALSE;
+ }
+ }
+ }
+ /* Reset the section indices after inserting the new
+ sections. */
+ indx = 0;
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ ++indx;
+ o->target_index = indx;
+ }
+ BFD_ASSERT ((unsigned int) indx == abfd->section_count);
+
+ /* Work out appropriate sizes for the .pad sections to force
+ each section to land on a page boundary. This bit of
+ code knows what compute_section_file_positions is going
+ to do. */
+ sofar = bfd_coff_filhsz (abfd);
+ sofar += bfd_coff_aoutsz (abfd);
+ sofar += abfd->section_count * bfd_coff_scnhsz (abfd);
+ for (o = abfd->sections; o != NULL; o = o->next)
+ if ((bfd_xcoff_is_reloc_count_overflow
+ (abfd, (bfd_vma) o->reloc_count))
+ || (bfd_xcoff_is_lineno_count_overflow
+ (abfd, (bfd_vma) o->lineno_count)))
+ /* 64 does not overflow, need to check if 32 does */
+ sofar += bfd_coff_scnhsz (abfd);
+
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ if (strcmp (o->name, ".pad") == 0)
+ {
+ bfd_vma pageoff;
+
+ BFD_ASSERT (o->size == 0);
+ pageoff = sofar & (file_align - 1);
+ if (pageoff != 0)
+ {
+ o->size = file_align - pageoff;
+ sofar += file_align - pageoff;
+ o->flags |= SEC_HAS_CONTENTS;
+ }
+ }
+ else
+ {
+ if ((o->flags & SEC_HAS_CONTENTS) != 0)
+ sofar += BFD_ALIGN (o->size,
+ 1 << o->alignment_power);
+ }
+ }
+ }
+
+ if (! bfd_coff_compute_section_file_positions (abfd))
+ goto error_return;
+ }
+
+ /* Allocate space for the pointers we need to keep for the relocs. */
+ {
+ unsigned int i;
+
+ /* We use section_count + 1, rather than section_count, because
+ the target_index fields are 1 based. */
+ amt = abfd->section_count + 1;
+ amt *= sizeof (struct xcoff_link_section_info);
+ finfo.section_info = bfd_malloc (amt);
+ if (finfo.section_info == NULL)
+ goto error_return;
+ for (i = 0; i <= abfd->section_count; i++)
+ {
+ finfo.section_info[i].relocs = NULL;
+ finfo.section_info[i].rel_hashes = NULL;
+ finfo.section_info[i].toc_rel_hashes = NULL;
+ }
+ }
+
+ /* Set the file positions for the relocs. */
+ rel_filepos = obj_relocbase (abfd);
+ relsz = bfd_coff_relsz (abfd);
+ max_output_reloc_count = 0;
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ if (o->reloc_count == 0)
+ o->rel_filepos = 0;
+ else
+ {
+ /* A stripped file has no relocs. However, we still
+ allocate the buffers, so that later code doesn't have to
+ worry about whether we are stripping or not. */
+ if (info->strip == strip_all)
+ o->rel_filepos = 0;
+ else
+ {
+ o->flags |= SEC_RELOC;
+ o->rel_filepos = rel_filepos;
+ rel_filepos += o->reloc_count * relsz;
+ }
+
+ /* We don't know the indices of global symbols until we have
+ written out all the local symbols. For each section in
+ the output file, we keep an array of pointers to hash
+ table entries. Each entry in the array corresponds to a
+ reloc. When we find a reloc against a global symbol, we
+ set the corresponding entry in this array so that we can
+ fix up the symbol index after we have written out all the
+ local symbols.
+
+ Because of this problem, we also keep the relocs in
+ memory until the end of the link. This wastes memory.
+ We could backpatch the file later, I suppose, although it
+ would be slow. */
+ amt = o->reloc_count;
+ amt *= sizeof (struct internal_reloc);
+ finfo.section_info[o->target_index].relocs = bfd_malloc (amt);
+
+ amt = o->reloc_count;
+ amt *= sizeof (struct xcoff_link_hash_entry *);
+ finfo.section_info[o->target_index].rel_hashes = bfd_malloc (amt);
+
+ if (finfo.section_info[o->target_index].relocs == NULL
+ || finfo.section_info[o->target_index].rel_hashes == NULL)
+ goto error_return;
+
+ if (o->reloc_count > max_output_reloc_count)
+ max_output_reloc_count = o->reloc_count;
+ }
+ }
+
+ /* We now know the size of the relocs, so we can determine the file
+ positions of the line numbers. */
+ line_filepos = rel_filepos;
+ finfo.line_filepos = line_filepos;
+ linesz = bfd_coff_linesz (abfd);
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ if (o->lineno_count == 0)
+ o->line_filepos = 0;
+ else
+ {
+ o->line_filepos = line_filepos;
+ line_filepos += o->lineno_count * linesz;
+ }
+
+ /* Reset the reloc and lineno counts, so that we can use them to
+ count the number of entries we have output so far. */
+ o->reloc_count = 0;
+ o->lineno_count = 0;
+ }
+
+ obj_sym_filepos (abfd) = line_filepos;
+
+ /* Figure out the largest number of symbols in an input BFD. Take
+ the opportunity to clear the output_has_begun fields of all the
+ input BFD's. We want at least 6 symbols, since that is the
+ number which xcoff_write_global_symbol may need. */
+ max_sym_count = 6;
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ {
+ bfd_size_type sz;
+
+ sub->output_has_begun = FALSE;
+ sz = obj_raw_syment_count (sub);
+ if (sz > max_sym_count)
+ max_sym_count = sz;
+ }
+
+ /* Allocate some buffers used while linking. */
+ amt = max_sym_count * sizeof (struct internal_syment);
+ finfo.internal_syms = bfd_malloc (amt);
+
+ amt = max_sym_count * sizeof (long);
+ finfo.sym_indices = bfd_malloc (amt);
+
+ amt = (max_sym_count + 1) * symesz;
+ finfo.outsyms = bfd_malloc (amt);
+
+ amt = max_lineno_count * bfd_coff_linesz (abfd);
+ finfo.linenos = bfd_malloc (amt);
+
+ amt = max_contents_size;
+ finfo.contents = bfd_malloc (amt);
+
+ amt = max_reloc_count * relsz;
+ finfo.external_relocs = bfd_malloc (amt);
+
+ if ((finfo.internal_syms == NULL && max_sym_count > 0)
+ || (finfo.sym_indices == NULL && max_sym_count > 0)
+ || finfo.outsyms == NULL
+ || (finfo.linenos == NULL && max_lineno_count > 0)
+ || (finfo.contents == NULL && max_contents_size > 0)
+ || (finfo.external_relocs == NULL && max_reloc_count > 0))
+ goto error_return;
+
+ obj_raw_syment_count (abfd) = 0;
+ xcoff_data (abfd)->toc = (bfd_vma) -1;
+
+ /* We now know the position of everything in the file, except that
+ we don't know the size of the symbol table and therefore we don't
+ know where the string table starts. We just build the string
+ table in memory as we go along. We process all the relocations
+ for a single input file at once. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
+ {
+ if (p->type == bfd_indirect_link_order
+ && p->u.indirect.section->owner->xvec == abfd->xvec)
+ {
+ sub = p->u.indirect.section->owner;
+ if (! sub->output_has_begun)
+ {
+ if (! xcoff_link_input_bfd (&finfo, sub))
+ goto error_return;
+ sub->output_has_begun = TRUE;
+ }
+ }
+ else if (p->type == bfd_section_reloc_link_order
+ || p->type == bfd_symbol_reloc_link_order)
+ {
+ if (! xcoff_reloc_link_order (abfd, &finfo, o, p))
+ goto error_return;
+ }
+ else
+ {
+ if (! _bfd_default_link_order (abfd, info, o, p))
+ goto error_return;
+ }
+ }
+ }
+
+ /* Free up the buffers used by xcoff_link_input_bfd. */
+ if (finfo.internal_syms != NULL)
+ {
+ free (finfo.internal_syms);
+ finfo.internal_syms = NULL;
+ }
+ if (finfo.sym_indices != NULL)
+ {
+ free (finfo.sym_indices);
+ finfo.sym_indices = NULL;
+ }
+ if (finfo.linenos != NULL)
+ {
+ free (finfo.linenos);
+ finfo.linenos = NULL;
+ }
+ if (finfo.contents != NULL)
+ {
+ free (finfo.contents);
+ finfo.contents = NULL;
+ }
+ if (finfo.external_relocs != NULL)
+ {
+ free (finfo.external_relocs);
+ finfo.external_relocs = NULL;
+ }
+
+ /* The value of the last C_FILE symbol is supposed to be -1. Write
+ it out again. */
+ if (finfo.last_file_index != -1)
+ {
+ finfo.last_file.n_value = -(bfd_vma) 1;
+ bfd_coff_swap_sym_out (abfd, (void *) &finfo.last_file,
+ (void *) finfo.outsyms);
+ pos = obj_sym_filepos (abfd) + finfo.last_file_index * symesz;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (finfo.outsyms, symesz, abfd) != symesz)
+ goto error_return;
+ }
+
+ /* Write out all the global symbols which do not come from XCOFF
+ input files. */
+ xcoff_link_hash_traverse (xcoff_hash_table (info),
+ xcoff_write_global_symbol,
+ (void *) &finfo);
+
+ if (finfo.outsyms != NULL)
+ {
+ free (finfo.outsyms);
+ finfo.outsyms = NULL;
+ }
+
+ /* Now that we have written out all the global symbols, we know the
+ symbol indices to use for relocs against them, and we can finally
+ write out the relocs. */
+ amt = max_output_reloc_count * relsz;
+ external_relocs = bfd_malloc (amt);
+ if (external_relocs == NULL && max_output_reloc_count != 0)
+ goto error_return;
+
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ struct internal_reloc *irel;
+ struct internal_reloc *irelend;
+ struct xcoff_link_hash_entry **rel_hash;
+ struct xcoff_toc_rel_hash *toc_rel_hash;
+ bfd_byte *erel;
+ bfd_size_type rel_size;
+
+ /* A stripped file has no relocs. */
+ if (info->strip == strip_all)
+ {
+ o->reloc_count = 0;
+ continue;
+ }
+
+ if (o->reloc_count == 0)
+ continue;
+
+ irel = finfo.section_info[o->target_index].relocs;
+ irelend = irel + o->reloc_count;
+ rel_hash = finfo.section_info[o->target_index].rel_hashes;
+ for (; irel < irelend; irel++, rel_hash++, erel += relsz)
+ {
+ if (*rel_hash != NULL)
+ {
+ if ((*rel_hash)->indx < 0)
+ {
+ if (! ((*info->callbacks->unattached_reloc)
+ (info, (*rel_hash)->root.root.string,
+ NULL, o, irel->r_vaddr)))
+ goto error_return;
+ (*rel_hash)->indx = 0;
+ }
+ irel->r_symndx = (*rel_hash)->indx;
+ }
+ }
+
+ for (toc_rel_hash = finfo.section_info[o->target_index].toc_rel_hashes;
+ toc_rel_hash != NULL;
+ toc_rel_hash = toc_rel_hash->next)
+ {
+ if (toc_rel_hash->h->u.toc_indx < 0)
+ {
+ if (! ((*info->callbacks->unattached_reloc)
+ (info, toc_rel_hash->h->root.root.string,
+ NULL, o, toc_rel_hash->rel->r_vaddr)))
+ goto error_return;
+ toc_rel_hash->h->u.toc_indx = 0;
+ }
+ toc_rel_hash->rel->r_symndx = toc_rel_hash->h->u.toc_indx;
+ }
+
+ /* XCOFF requires that the relocs be sorted by address. We tend
+ to produce them in the order in which their containing csects
+ appear in the symbol table, which is not necessarily by
+ address. So we sort them here. There may be a better way to
+ do this. */
+ qsort ((void *) finfo.section_info[o->target_index].relocs,
+ o->reloc_count, sizeof (struct internal_reloc),
+ xcoff_sort_relocs);
+
+ irel = finfo.section_info[o->target_index].relocs;
+ irelend = irel + o->reloc_count;
+ erel = external_relocs;
+ for (; irel < irelend; irel++, rel_hash++, erel += relsz)
+ bfd_coff_swap_reloc_out (abfd, (void *) irel, (void *) erel);
+
+ rel_size = relsz * o->reloc_count;
+ if (bfd_seek (abfd, o->rel_filepos, SEEK_SET) != 0
+ || bfd_bwrite ((void *) external_relocs, rel_size, abfd) != rel_size)
+ goto error_return;
+ }
+
+ if (external_relocs != NULL)
+ {
+ free (external_relocs);
+ external_relocs = NULL;
+ }
+
+ /* Free up the section information. */
+ if (finfo.section_info != NULL)
+ {
+ unsigned int i;
+
+ for (i = 0; i < abfd->section_count; i++)
+ {
+ if (finfo.section_info[i].relocs != NULL)
+ free (finfo.section_info[i].relocs);
+ if (finfo.section_info[i].rel_hashes != NULL)
+ free (finfo.section_info[i].rel_hashes);
+ }
+ free (finfo.section_info);
+ finfo.section_info = NULL;
+ }
+
+ /* Write out the loader section contents. */
+ BFD_ASSERT ((bfd_byte *) finfo.ldrel
+ == (xcoff_hash_table (info)->loader_section->contents
+ + xcoff_hash_table (info)->ldhdr.l_impoff));
+ o = xcoff_hash_table (info)->loader_section;
+ if (! bfd_set_section_contents (abfd, o->output_section, o->contents,
+ (file_ptr) o->output_offset, o->size))
+ goto error_return;
+
+ /* Write out the magic sections. */
+ o = xcoff_hash_table (info)->linkage_section;
+ if (o->size > 0
+ && ! bfd_set_section_contents (abfd, o->output_section, o->contents,
+ (file_ptr) o->output_offset,
+ o->size))
+ goto error_return;
+ o = xcoff_hash_table (info)->toc_section;
+ if (o->size > 0
+ && ! bfd_set_section_contents (abfd, o->output_section, o->contents,
+ (file_ptr) o->output_offset,
+ o->size))
+ goto error_return;
+ o = xcoff_hash_table (info)->descriptor_section;
+ if (o->size > 0
+ && ! bfd_set_section_contents (abfd, o->output_section, o->contents,
+ (file_ptr) o->output_offset,
+ o->size))
+ goto error_return;
+
+ /* Write out the string table. */
+ pos = obj_sym_filepos (abfd) + obj_raw_syment_count (abfd) * symesz;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0)
+ goto error_return;
+ H_PUT_32 (abfd,
+ _bfd_stringtab_size (finfo.strtab) + STRING_SIZE_SIZE,
+ strbuf);
+ amt = STRING_SIZE_SIZE;
+ if (bfd_bwrite (strbuf, amt, abfd) != amt)
+ goto error_return;
+ if (! _bfd_stringtab_emit (abfd, finfo.strtab))
+ goto error_return;
+
+ _bfd_stringtab_free (finfo.strtab);
+
+ /* Write out the debugging string table. */
+ o = xcoff_hash_table (info)->debug_section;
+ if (o != NULL)
+ {
+ struct bfd_strtab_hash *debug_strtab;
+
+ debug_strtab = xcoff_hash_table (info)->debug_strtab;
+ BFD_ASSERT (o->output_section->size - o->output_offset
+ >= _bfd_stringtab_size (debug_strtab));
+ pos = o->output_section->filepos + o->output_offset;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0)
+ goto error_return;
+ if (! _bfd_stringtab_emit (abfd, debug_strtab))
+ goto error_return;
+ }
+
+ /* Setting bfd_get_symcount to 0 will cause write_object_contents to
+ not try to write out the symbols. */
+ bfd_get_symcount (abfd) = 0;
+
+ return TRUE;
+
+ error_return:
+ if (finfo.strtab != NULL)
+ _bfd_stringtab_free (finfo.strtab);
+
+ if (finfo.section_info != NULL)
+ {
+ unsigned int i;
+
+ for (i = 0; i < abfd->section_count; i++)
+ {
+ if (finfo.section_info[i].relocs != NULL)
+ free (finfo.section_info[i].relocs);
+ if (finfo.section_info[i].rel_hashes != NULL)
+ free (finfo.section_info[i].rel_hashes);
+ }
+ free (finfo.section_info);
+ }
+
+ if (finfo.internal_syms != NULL)
+ free (finfo.internal_syms);
+ if (finfo.sym_indices != NULL)
+ free (finfo.sym_indices);
+ if (finfo.outsyms != NULL)
+ free (finfo.outsyms);
+ if (finfo.linenos != NULL)
+ free (finfo.linenos);
+ if (finfo.contents != NULL)
+ free (finfo.contents);
+ if (finfo.external_relocs != NULL)
+ free (finfo.external_relocs);
+ if (external_relocs != NULL)
+ free (external_relocs);
+ return FALSE;
+}
diff --git a/contrib/binutils/binutils/ChangeLog b/contrib/binutils/binutils/ChangeLog
index 185b21b94928..2f6520f44207 100644
--- a/contrib/binutils/binutils/ChangeLog
+++ b/contrib/binutils/binutils/ChangeLog
@@ -1,132 +1,267 @@
-2004-05-13 Nick Clifton <nickc@redhat.com>
+2006-08-15 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/3039
+ * wrstabs.c (stab_tag_type): Initialize 'size'.
+
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+
+ * po/Make-in (pdf, ps): New dummy targets.
+
+2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
+
+ * doc/Makefile.am (TEXI2DVI): Define.
+ * doc/Makefile.in: Regenerate.
+
+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.
+
+2006-05-30 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2006-05-24 Nick Clifton <nickc@redhat.com>
* po/fr.po: Updated French translation.
-2004-04-09 Daniel Jacobowitz <drow@mvista.com>
+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-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-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.
- Merge from mainline:
- 2004-04-07 Benjamin Monate <benjamin.monate@cea.fr>
- PR 86
- * arsup.c (ar_save): Use smart_rename.
+2006-03-20 Nathan Sidwell <nathan@codesourcery.com>
- 2004-04-01 Dean Luick <luick@cray.com>
- * readelf.c (display_debug_pubnames): Align offset and data
- columns.
- (read_and_display_attr_value): Add missing break;
- (debug_displays): Enable the display of the .debug_pubtypes
- section.
+ * BRANCHES: Remove binutils-csl-arm-2006q1-branch. Document
+ binutils-csl-2_17-branch instead.
- 2004-03-21 Richard Henderson <rth@redhat.com>
- * readelf.c (display_debug_frames): Don't crash for mismatched
- DW_CFA_restore_state.
+2006-03-20 Paul Brook <paul@codesourcery.com>
- 2004-03-10 Ben Elliston <bje@gnu.org>
- * MAINTAINERS: Update my mail address.
+ * BRANCHES: Mention binutils-csl-arm-2006q1-branch.
- 2004-03-08 Danny Smith <dannysmith@users.sourceforge.net>
- * deflex.l: Handle "PRIVATE" string.
- * defparse.y (%token): Add PRIVATE.
- (%type): Add opt_PRIVATE.
- (expline): Pass opt_PRIVATE to def_exports.
- (opt_PRIVATE): Handle PRIVATE token.
- * dlltool.h (def_exports): Add 7th param for private flag to
- declaration.
- * dlltool.c: Add PRIVATE to comment on EXPORTS syntax.
- (struct export): Add 'private' field.
- (def_exports): Set 'private' field of struct exports.
- (scan_drectve_symbols): Adjust calls to def_exports.
- (scan_filtered_symbols): Likewise.
- (dump_def_info): Print 'private' field.
- (gen_def_file): Likewise.
- (gen_lib_file): Skip generation of lib object if private.
- Delete tmp object files in same order as they were generated.
- Don't delete non-existent private object files.
+2006-03-16 Alan Modra <amodra@bigpond.net.au>
- 2004-02-27 Andreas Schwab <schwab@suse.de>
- * ar.c (main): Support POSIX-compatible argument parsing.
+ PR 2434
+ * ieee.c (write_ieee_debugging_info): Adjust bfd_hash_table_init calls.
+ * wrstabs.c (write_stabs_in_sections_debugging_info): Likewise.
- 2004-02-23 Daniel Lucq <daniel@lucq.org>
- * readelf.c (process_mips_specific): Print conflictsno as an
- unsigned long.
+2006-03-13 Ben Elliston <bje@au.ibm.com>
- 2004-02-21 Dmitry Timoshkov <dmitry@baikal.ru>
- * dlltool.c (gen_exp_file): Always output names for forwarded symbols.
+ * 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.
- 2004-02-19 Jakub Jelinek <jakub@redhat.com>
- * objcopy.c (copy_section): Avoid warnings.
+2006-03-10 Paul Brook <paul@codesourcery.com>
-2004-02-14 Andrew Cagney <cagney@redhat.com>
+ * readelf.c (decode_ARM_machine_flags): Handle EABIv5.
- * ar.c (remove_output): Use bfd_cache_close.
- * arsup.c (ar_end): Ditto.
+2006-03-10 Alan Modra <amodra@bigpond.net.au>
-2004-01-21 Roland McGrath <roland@redhat.com>
+ * 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.
- * readelf.c (get_note_type): Match NT_AUXV.
+2006-03-09 Danny Smith <dannysmith@users.sourceforge.net>
-2004-01-20 Nick Clifton <nickc@redhat.com>
+ * dlltool.c: Update copyright year.
+ * doc/binutils.texi: Likewise.
- * version.c (print_version): Update copyright year to 2004.
+2006-03-09 Danny Smith <dannysmith@users.sourceforge.net>
-2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * 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.
- * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
- throughout.
- * aclocal.m4: Regenerate.
+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.
-2004-01-12 Jakub Jelinek <jakub@redhat.com>
+2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
- * objcopy.c: Include elf-bfd.h.
- (is_strip_section): Don't strip debugging sections if
- STRIP_NONDEBUG.
- (setup_section): If STRIP_NONDEBUG make SEC_ALLOC sections
- ~(SEC_LOAD | SEC_HAS_CONTENTS) and on ELF targets also SHT_NOBITS.
+ * readelf.c (get_machine_flags): Add logic for EF_M68K flags.
- * objcopy.c (copy_section): Free relpp if relcount == 0.
+2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
-2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
+ * readelf.c (process_program_headers): Undo the last change.
- * stabs.c (parse_stab_argtypes): Handle g++ ABI version 3 names.
- (stab_demangle_argtypes): Likewise.
- (stab_demangle_v3_argtypes): New static function.
- (stab_demangle_v3_arg): New static function.
+2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
-2004-01-12 Nick Clifton <nickc@redhat.com>
+ * readelf.c (process_program_headers): Undo the change made on
+ 2004-09-22. Match PT_DYNAMIC segment only with SHT_DYNAMIC
+ sections.
- * objcopy.c (copy_object): Make the function boolean, returning
- FALSE upon failure.
- (copy_archive): Handle the return value from copy_object.
- (copy_file): Likewise.
+2006-01-30 Nick Clifton <nickc@redhat.com>
-2004-01-07 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.
- * readelf.c (find_section): New function. Locates a named
- section.
- (get_debug_line_pointer_sizes): New function: Initialises the
- debug_line_pointer_sizes array.
- (display_debug_lines): Call get_debug_line_pointer_sizes.
- (display_debug_loc): Likewise.
- (load_debug_loc): Use find_section.
- (load_debug_str): Likewise.
- (display_debug_info): Likewise.
- (prescan_debug_info): Delete.
- (debug_displays): Remove prescan field.
- (process_section_contents): Do not perform prescans.
+2006-01-18 Alexandre Oliva <aoliva@redhat.com>
-2004-01-03 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.
- * objcopy.c (filter_bytes): Delete. Move code to..
- (copy_section): ..here. Simplify size adjustment. Divide
- section lma by interleave.
+2006-01-18 Nick Clifton <nickc@redhat.com>
-2004-01-02 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.
- * po/ru.po: New file: Russian translation.
- * configure.in (ALL_LINGUAS): Add ru
+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-0203
+For older changes see ChangeLog-2005
Local Variables:
mode: change-log
diff --git a/contrib/binutils/binutils/MAINTAINERS b/contrib/binutils/binutils/MAINTAINERS
index 28c9144e1cc8..f5beb0343b48 100644
--- a/contrib/binutils/binutils/MAINTAINERS
+++ b/contrib/binutils/binutils/MAINTAINERS
@@ -22,8 +22,8 @@ top level config.guess and config.sub scripts should be sent to:
config-patches@gnu.org
and not to the binutils lists. Patches to the other top level
-configure files (configure, configure.in, config-if, config-ml.in)
-should be sent to the binutils lists, and copied to the gcc and gdb
+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).
@@ -34,12 +34,13 @@ repository without obtaining approval first:
Nick Clifton <nickc@redhat.com> (head maintainer)
Richard Henderson <rth@redhat.com>
- Ian Taylor <ian@wasabisystems.com>
+ Ian Lance Taylor <ian@airs.com>
Jeff Law <law@redhat.com>
Jim Wilson <wilson@specifixinc.com>
DJ Delorie <dj@redhat.com>
Alan Modra <amodra@bigpond.net.au>
Michael Meissner <gnu@the-meissners.org>
+ Daniel Jacobowitz <dan@debian.org>
--------- Maintainers ---------
@@ -57,14 +58,22 @@ 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 (Symbian) Mark Mitchell <mark@codesourcery.com>
AVR Denis Chertykov <denisc@overta.ru>
AVR Marek Michalkiewicz <marekm@amelek.gda.pl>
+ BFIN Jie Zhang <jie.zhang@analog.com>
+ BFIN Bernd Schmidt <bernd.schmidt@analog.com>
BUILD SYSTEM Ben Elliston <bje@gnu.org>
BUILD SYSTEM Daniel Jacobowitz <dan@debian.org>
CRIS Hans-Peter Nilsson <hp@axis.com>
+ CRX Tomer Levi <Tomer.Levi@nsc.com>
+ DLX Nikolaos Kavvadias <nkavv@physics.auth.gr>
DWARF2 Jason Merrill <jason@redhat.com>
FR30 Dave Brolley <brolley@redhat.com>
FRV Dave Brolley <brolley@redhat.com>
+ FRV Alexandre Oliva <aoliva@redhat.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]
@@ -75,14 +84,17 @@ responsibility among the other maintainers.
ix86 PE Christopher Faylor <cgf@redhat.com>
ix86 COFF DJ Delorie <dj@redhat.com>
ix86 H.J.Lu <hjl@gnu.org>
- ix86 INTEL MODE Diego Novillo <dnovillo@redhat.com>
+ ix86 INTEL MODE Jan Beulich <jbeulich@novell.com>
M68HC11 M68HC12 Stephane Carrez <stcarrez@nerim.fr>
M68k Ben Elliston <bje@gnu.org>
- MIPS Eric Christopher <echristo@redhat.com>
- MIPS Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ M88k Mark Kettenis <kettenis@gnu.org>
+ MAXQ Inderpreet Singh <inderpreetb@noida.hcltech.com>
+ MIPS Eric Christopher <echristo@apple.com>
+ MIPS Thiemo Seufer <ths@networkno.de>
MMIX Hans-Peter Nilsson <hp@bitrange.com>
- MN10300 Eric Christopher <echristo@redhat.com>
+ MN10300 Eric Christopher <echristo@apple.com>
MN10300 Alexandre Oliva <aoliva@redhat.com>
+ MSP430 Dmitry Diky <diwil@spec.ru>
PPC Geoff Keating <geoffk@geoffk.org>
PPC vector ext Aldy Hernandez <aldyh@redhat.com>
s390, s390x Martin Schwidefsky <schwidefsky@de.ibm.com>
@@ -91,12 +103,15 @@ responsibility among the other maintainers.
SH Kaz Kojima <kkojima@rr.iij4u.or.jp>
SPARC Jakub Jelinek <jakub@redhat.com>
TESTSUITES Ben Elliston <bje@gnu.org>
- TIC4X Svein Seldal <svein.seldal@solidas.com>
+ TIC4X Svein Seldal <svein@dev.seldal.com>
TIC54X Timothy Wall <twall@alum.mit.edu>
- VAX Jason R Thorpe <thorpej@wasabisystems.com>
+ VAX Jason R Thorpe <thorpej@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>
Xtensa Bob Wilson <bob.wilson@acm.org>
+ z80 Arnold Metselaar <arnold.metselaar@planet.nl>
z8k Christian Groessler <chris@groessler.org>
@@ -114,7 +129,7 @@ If you have CGEN related problems you can send email to;
The current CGEN maintainers are:
- Doug Evans, Ben Elliston, Frank Eigler
+ Doug Evans, Frank Eigler
--------- Write After Approval ---------
@@ -166,3 +181,71 @@ by the binutils group. Instead they should be submitted to the config
maintainer at:
config-patches@gnu.org
+
+ --------- Creating Branches ---------
+
+Anyone with at least write-after-approval access may create a branch
+to use for their own development purposes. In keeping with FSF
+policies, all patches applied to such a branch must come from people
+with appropriate copyright assignments on file. All legal
+requirements that would apply to any other contribution apply equally
+to contributions on a branch.
+
+Before creating the branch, you should select a name for the branch of
+the form:
+
+ 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
+by The GNUDist Company, "tgc" would be an appropriate choice for
+"org". It's up to each organization to select an appropriate choice
+for "name"; some organizations may use more structure than others, so
+"name" may contain additional hyphens.
+
+Suppose that The GNUDist Company was creating a branch to develop a
+port of Binutils to the FullMonty processor. Then, an appropriate
+choice of branch name would be:
+
+ binutils-tgc-fm
+
+A data stamp is not required as part of the name field, but some
+organizations like to have one. If you do include the date, you
+should follow these rules:
+
+1. The date should be the date that the branch was created.
+
+2. The date should be numerical and in the form YYYYMMDD.
+
+For example:
+
+ binutils-tgc-fm_20050101
+
+would be appropriate if the branch was created on January 1st, 2005.
+
+Having selected the branch name, create the branch as follows:
+
+1. Check out binutils, so that you have a CVS checkout corresponding
+ to the initial state of your branch.
+
+2. Create a tag:
+
+ cvs tag binutils-<org>-<name>-branchpoint
+
+ That tag will allow you, and others, to easily determine what's
+ changed on the branch relative to the initial state.
+
+3. Create the branch:
+
+ cvs rtag -b -r binutils-<org>-<name>-branchpoint \
+ binutils-<org>-<name>-branch
+
+4. Document the branch:
+
+ Add a description of the branch to binutils/BRANCHES, and check
+ that file in. All branch descriptions should be added to the
+ HEAD revision of the file; it doesn't help to modify
+ binutils/BRANCHES on a branch!
+
+Please do not commit any patches to a branch you did not create
+without the explicit permission of the person who created the branch.
diff --git a/contrib/binutils/binutils/Makefile.am b/contrib/binutils/binutils/Makefile.am
index 324c0ea06453..1b4e85adb8a7 100644
--- a/contrib/binutils/binutils/Makefile.am
+++ b/contrib/binutils/binutils/Makefile.am
@@ -20,6 +20,7 @@ YFLAGS = -d
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)
# these two are almost the same program
@@ -63,7 +64,7 @@ noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG)
# Stuff that goes in tooldir/ if appropriate.
-TOOL_PROGS = nm-new strip-new ar ranlib dlltool
+TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
@@ -75,7 +76,7 @@ INCLUDES = -D_GNU_SOURCE \
-I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
@HDEFINES@ \
-I$(srcdir)/../intl -I../intl \
- -DLOCALEDIR="\"$(prefix)/share/locale\"" \
+ -DLOCALEDIR="\"$(datadir)/locale\"" \
-Dbin_dummy_emulation=$(EMULATION_VECTOR)
HFILES = \
@@ -87,7 +88,8 @@ GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
CFILES = \
addr2line.c ar.c arsup.c binemul.c bucomm.c budemang.c \
- coffdump.c coffgrok.c cxxfilt.c debug.c dlltool.c dllwrap.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 \
@@ -113,17 +115,42 @@ OPCODES = ../opcodes/libopcodes.la
LIBIBERTY = ../libiberty/libiberty.a
+.PHONY: install-html install-html-am install-html-recursive
+
+install-html: install-html-recursive
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
po/POTFILES.in: @MAINT@ Makefile
for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
-EXPECT = `if [ -f $$r/../expect/expect ] ; then \
- echo $$r/../expect/expect ; \
- else echo expect ; fi`
-RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
- echo ${srcdir}/../dejagnu/runtest ; \
- else echo runtest ; fi`
+EXPECT = expect
+RUNTEST = runtest
CC_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
@@ -144,10 +171,6 @@ check-DEJAGNU: site.exp
srcdir=`cd $(srcdir) && pwd`; export srcdir; \
r=`pwd`; export r; \
EXPECT=$(EXPECT); export EXPECT; \
- if [ -f $(top_builddir)/../expect/expect ]; then \
- TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
- export TCL_LIBRARY; \
- fi; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
CC_FOR_TARGET="$(CC_FOR_TARGET)" CFLAGS_FOR_TARGET="$(CFLAGS)" \
@@ -167,14 +190,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
+readelf_SOURCES = readelf.c version.c unwind-ia64.c dwarf.c
readelf_LDADD = $(INTLLIBS) $(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 budemang.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
+objdump_SOURCES = objdump.c dwarf.c budemang.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
objdump.o:objdump.c
@@ -219,20 +242,20 @@ sysroff.h: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h
sysinfo$(EXEEXT_FOR_BUILD): sysinfo.o syslex.o
- $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o
+ $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o
-syslex.o: syslex.c sysinfo.h
+syslex.o:
if [ -r syslex.c ]; then \
- $(CC_FOR_BUILD) -c -I. $(CFLAGS) syslex.c ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS) syslex.c -Wno-error ; \
else \
- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(CFLAGS) $(srcdir)/syslex.c ;\
+ $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS) $(srcdir)/syslex.c -Wno-error ;\
fi
-sysinfo.o: sysinfo.c
+sysinfo.o:
if [ -r sysinfo.c ]; then \
- $(CC_FOR_BUILD) -c -I. $(CFLAGS) sysinfo.c ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS) sysinfo.c -Wno-error ; \
else \
- $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS) $(srcdir)/sysinfo.c -Wno-error ; \
fi
# We need these for parallel make.
@@ -242,15 +265,34 @@ nlmheader.h: nlmheader.c
rcparse.h: rcparse.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.
+arparse.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+arlex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+sysroff.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+defparse.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+deflex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+nlmheader.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+rcparse.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+rclex.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.o:dlltool.c
+dlltool.o:
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
-rescoff.o:rescoff.c
+rescoff.o:
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/rescoff.c
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
@@ -277,12 +319,11 @@ EXTRA_DIST = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
diststuff: $(EXTRA_DIST) info
+all: info
DISTCLEANFILES = sysinfo sysroff.c sysroff.h \
site.exp site.bak
-Makefile: $(BFDDIR)/configure.in
-
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
@@ -363,15 +404,15 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+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 config.h $(INCDIR)/bin-bugs.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 arsup.h $(INCDIR)/filenames.h \
- binemul.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 \
@@ -382,7 +423,7 @@ binemul.o: binemul.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.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)/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
@@ -396,6 +437,10 @@ coffgrok.o: coffgrok.c ../bfd/bfd.h $(INCDIR)/ansidecl.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
@@ -440,13 +485,15 @@ 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 \
- budbg.h $(INCDIR)/filenames.h $(INCDIR)/fnmatch.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 \
- budemang.h $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h \
- $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
- budbg.h $(INCDIR)/aout/aout64.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 \
@@ -460,24 +507,25 @@ 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 ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/alpha.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/cris.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/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/msp430.h \
+ $(INCDIR)/elf/avr.h $(INCDIR)/elf/bfin.h $(INCDIR)/elf/cris.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/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/iq2000.h \
- $(INCDIR)/elf/xtensa.h $(INCDIR)/aout/ar.h bucomm.h \
- config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.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 \
@@ -523,11 +571,10 @@ sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
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 ../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 $(INCDIR)/obstack.h windres.h \
- winduni.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
@@ -543,7 +590,7 @@ arlex.o: arlex.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
arparse.h
sysroff.o: sysroff.c
sysinfo.o: sysinfo.c
-syslex.o: syslex.c sysinfo.h
+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
diff --git a/contrib/binutils/binutils/Makefile.in b/contrib/binutils/binutils/Makefile.in
index 46eeac8068ef..8b5ab820548f 100644
--- a/contrib/binutils/binutils/Makefile.in
+++ b/contrib/binutils/binutils/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,61 +12,230 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
-SHELL = @SHELL@
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+bin_PROGRAMS = $(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \
+ $(am__EXEEXT_8) $(am__EXEEXT_9) $(am__EXEEXT_10) \
+ @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)
+EXTRA_PROGRAMS = $(am__EXEEXT_1) srconv$(EXEEXT) sysdump$(EXEEXT) \
+ coffdump$(EXEEXT) $(am__EXEEXT_2) $(am__EXEEXT_3) \
+ $(am__EXEEXT_4)
+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 \
+ $(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__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = config.h
+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__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+am__EXEEXT_13 = nm-new$(EXEEXT)
+am__EXEEXT_14 = strip-new$(EXEEXT)
+am__EXEEXT_15 = cxxfilt$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am__objects_1 = bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
+am_addr2line_OBJECTS = addr2line.$(OBJEXT) budemang.$(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)
+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)
+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)
+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_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) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
+LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+YLWRAP = $(top_srcdir)/../ylwrap
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
+ $(AM_YFLAGS)
+SOURCES = $(addr2line_SOURCES) $(ar_SOURCES) $(coffdump_SOURCES) \
+ $(cxxfilt_SOURCES) $(dlltool_SOURCES) $(dllwrap_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)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+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@
-AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
BUILD_DLLTOOL = @BUILD_DLLTOOL@
BUILD_DLLWRAP = @BUILD_DLLWRAP@
BUILD_MISC = @BUILD_MISC@
@@ -74,64 +245,127 @@ BUILD_WINDRES = @BUILD_WINDRES@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
+CCDEPMODE = @CCDEPMODE@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
DEMANGLER_NAME = @DEMANGLER_NAME@
-DLLTOOL = @DLLTOOL@
+DEPDIR = @DEPDIR@
DLLTOOL_DEFS = @DLLTOOL_DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EMULATION = @EMULATION@
EMULATION_VECTOR = @EMULATION_VECTOR@
EXEEXT = @EXEEXT@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
+EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+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@
+LDFLAGS = @LDFLAGS@
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
NLMCONV_DEFS = @NLMCONV_DEFS@
-OBJDUMP = @OBJDUMP@
+NO_WERROR = @NO_WERROR@
OBJDUMP_DEFS = @OBJDUMP_DEFS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
-bfdincludedir = @bfdincludedir@
-bfdlibdir = @bfdlibdir@
+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_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
l = @l@
-
-INTLLIBS = @INTLLIBS@
-
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
AUTOMAKE_OPTIONS = cygnus dejagnu
-
SUBDIRS = doc po
-
tooldir = $(exec_prefix)/$(target_alias)
-
-CC_FOR_BUILD = @CC_FOR_BUILD@
-EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-
-YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
YFLAGS = -d
-LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
-
-WARN_CFLAGS = @WARN_CFLAGS@
AM_CFLAGS = $(WARN_CFLAGS)
# these two are almost the same program
@@ -141,9 +375,7 @@ RANLIB_PROG = ranlib
# objcopy and strip should be the same program
OBJCOPY_PROG = objcopy
STRIP_PROG = strip-new
-
STRINGS_PROG = strings
-
READELF_PROG = readelf
# These should all be the same program too.
@@ -154,52 +386,37 @@ OBJDUMP_PROG = objdump
# This is the demangler, as a standalone program.
# Note: This one is used as the installed name too, unlike the above.
DEMANGLER_PROG = cxxfilt
-
ADDR2LINE_PROG = addr2line
-
NLMCONV_PROG = nlmconv
DLLTOOL_PROG = dlltool
WINDRES_PROG = windres
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@
-bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
-
-noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
-
-EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG)
-
# Stuff that goes in tooldir/ if appropriate.
-TOOL_PROGS = nm-new strip-new ar ranlib dlltool
-
+TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
-
MKDEP = gcc -MM
-
INCLUDES = -D_GNU_SOURCE \
-I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
@HDEFINES@ \
-I$(srcdir)/../intl -I../intl \
- -DLOCALEDIR="\"$(prefix)/share/locale\"" \
+ -DLOCALEDIR="\"$(datadir)/locale\"" \
-Dbin_dummy_emulation=$(EMULATION_VECTOR)
-
HFILES = \
arsup.h binemul.h bucomm.h budbg.h budemang.h \
coffgrok.h debug.h dlltool.h nlmconv.h \
windres.h winduni.h
-
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
-
CFILES = \
addr2line.c ar.c arsup.c binemul.c bucomm.c budemang.c \
- coffdump.c coffgrok.c cxxfilt.c debug.c dlltool.c dllwrap.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 \
@@ -209,35 +426,21 @@ CFILES = \
size.c srconv.c stabs.c strings.c sysdump.c version.c \
windres.c winduni.c wrstabs.c
-
GENERATED_CFILES = \
arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
defparse.c deflex.c nlmheader.c rcparse.c rclex.c
-
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
# Code shared by all the binutils.
BULIBS = bucomm.c version.c filemode.c
-
BFDLIB = ../bfd/libbfd.la
-
OPCODES = ../opcodes/libopcodes.la
-
LIBIBERTY = ../libiberty/libiberty.a
-
POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
-
-EXPECT = `if [ -f $$r/../expect/expect ] ; then \
- echo $$r/../expect/expect ; \
- else echo expect ; fi`
-
-RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
- echo ${srcdir}/../dejagnu/runtest ; \
- else echo runtest ; fi`
-
-
+EXPECT = expect
+RUNTEST = runtest
CC_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
if [ -f $$r/../newlib/Makefile ] ; then \
@@ -253,404 +456,225 @@ CC_FOR_TARGET = ` \
fi; \
fi`
-
LDADD = $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
-
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
+readelf_SOURCES = readelf.c version.c unwind-ia64.c dwarf.c
readelf_LDADD = $(INTLLIBS) $(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 budemang.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
+objdump_SOURCES = objdump.c dwarf.c budemang.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
-
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)
-
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)
-
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
-
dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
-
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 \
winduni.c resres.c $(BULIBS)
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
-
dllwrap_SOURCES = dllwrap.c version.c
dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
-
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
###
-
MOSTLYCLEANFILES = sysinfo binutils.log binutils.sum abcdefgh*
-
CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-bin_PROGRAMS = size$(EXEEXT) objdump$(EXEEXT) ar$(EXEEXT) \
-strings$(EXEEXT) ranlib$(EXEEXT) objcopy$(EXEEXT) @BUILD_NLMCONV@ \
-@BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ addr2line$(EXEEXT) \
-readelf$(EXEEXT) @BUILD_DLLWRAP@ @BUILD_MISC@
-noinst_PROGRAMS = nm-new$(EXEEXT) strip-new$(EXEEXT) cxxfilt$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-nlmconv_OBJECTS = nlmconv.$(OBJEXT) nlmheader.$(OBJEXT) \
-bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-nlmconv_LDADD = $(LDADD)
-nlmconv_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-nlmconv_LDFLAGS =
-srconv_OBJECTS = srconv.$(OBJEXT) coffgrok.$(OBJEXT) bucomm.$(OBJEXT) \
-version.$(OBJEXT) filemode.$(OBJEXT)
-srconv_LDADD = $(LDADD)
-srconv_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-srconv_LDFLAGS =
-sysdump_OBJECTS = sysdump.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
-sysdump_LDADD = $(LDADD)
-sysdump_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-sysdump_LDFLAGS =
-coffdump_OBJECTS = coffdump.$(OBJEXT) coffgrok.$(OBJEXT) \
-bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-coffdump_LDADD = $(LDADD)
-coffdump_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-coffdump_LDFLAGS =
-dlltool_OBJECTS = dlltool.$(OBJEXT) defparse.$(OBJEXT) deflex.$(OBJEXT) \
-bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-dlltool_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-dlltool_LDFLAGS =
-windres_OBJECTS = windres.$(OBJEXT) resrc.$(OBJEXT) rescoff.$(OBJEXT) \
-resbin.$(OBJEXT) rcparse.$(OBJEXT) rclex.$(OBJEXT) winduni.$(OBJEXT) \
-resres.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-windres_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-windres_LDFLAGS =
-dllwrap_OBJECTS = dllwrap.$(OBJEXT) version.$(OBJEXT)
-dllwrap_DEPENDENCIES = ../libiberty/libiberty.a
-dllwrap_LDFLAGS =
-size_OBJECTS = size.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
-size_LDADD = $(LDADD)
-size_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-size_LDFLAGS =
-objdump_OBJECTS = objdump.$(OBJEXT) budemang.$(OBJEXT) prdbg.$(OBJEXT) \
-rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) ieee.$(OBJEXT) \
-rdcoff.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-objdump_DEPENDENCIES = ../opcodes/libopcodes.la ../bfd/libbfd.la \
-../libiberty/libiberty.a
-objdump_LDFLAGS =
-ar_OBJECTS = arparse.$(OBJEXT) arlex.$(OBJEXT) ar.$(OBJEXT) \
-not-ranlib.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) binemul.$(OBJEXT) \
-emul_$(EMULATION).$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
-ar_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-ar_LDFLAGS =
-strings_OBJECTS = strings.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
-strings_LDADD = $(LDADD)
-strings_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-strings_LDFLAGS =
-ranlib_OBJECTS = ar.$(OBJEXT) is-ranlib.$(OBJEXT) arparse.$(OBJEXT) \
-arlex.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) binemul.$(OBJEXT) \
-emul_$(EMULATION).$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
-ranlib_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-ranlib_LDFLAGS =
-objcopy_OBJECTS = objcopy.$(OBJEXT) not-strip.$(OBJEXT) \
-rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
-ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrstabs.$(OBJEXT) bucomm.$(OBJEXT) \
-version.$(OBJEXT) filemode.$(OBJEXT)
-objcopy_LDADD = $(LDADD)
-objcopy_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-objcopy_LDFLAGS =
-addr2line_OBJECTS = addr2line.$(OBJEXT) budemang.$(OBJEXT) \
-bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-addr2line_LDADD = $(LDADD)
-addr2line_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-addr2line_LDFLAGS =
-readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) \
-unwind-ia64.$(OBJEXT)
-readelf_DEPENDENCIES = ../libiberty/libiberty.a
-readelf_LDFLAGS =
-nm_new_OBJECTS = nm.$(OBJEXT) budemang.$(OBJEXT) bucomm.$(OBJEXT) \
-version.$(OBJEXT) filemode.$(OBJEXT)
-nm_new_LDADD = $(LDADD)
-nm_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-nm_new_LDFLAGS =
-strip_new_OBJECTS = objcopy.$(OBJEXT) is-strip.$(OBJEXT) \
-rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
-ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrstabs.$(OBJEXT) bucomm.$(OBJEXT) \
-version.$(OBJEXT) filemode.$(OBJEXT)
-strip_new_LDADD = $(LDADD)
-strip_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-strip_new_LDFLAGS =
-cxxfilt_OBJECTS = cxxfilt.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \
-filemode.$(OBJEXT)
-cxxfilt_LDADD = $(LDADD)
-cxxfilt_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
-cxxfilt_LDFLAGS =
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LEXLIB = @LEXLIB@
-YLWRAP = $(top_srcdir)/../ylwrap
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-NEWS acinclude.m4 aclocal.m4 arlex.c arparse.c config.in configure \
-configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-SOURCES = $(nlmconv_SOURCES) $(srconv_SOURCES) $(sysdump_SOURCES) $(coffdump_SOURCES) $(dlltool_SOURCES) $(windres_SOURCES) $(dllwrap_SOURCES) $(size_SOURCES) $(objdump_SOURCES) $(ar_SOURCES) $(strings_SOURCES) $(ranlib_SOURCES) $(objcopy_SOURCES) $(addr2line_SOURCES) $(readelf_SOURCES) $(nm_new_SOURCES) $(strip_new_SOURCES) $(cxxfilt_SOURCES)
-OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJECTS) $(dlltool_OBJECTS) $(windres_OBJECTS) $(dllwrap_OBJECTS) $(size_OBJECTS) $(objdump_OBJECTS) $(ar_OBJECTS) $(strings_OBJECTS) $(ranlib_OBJECTS) $(objcopy_OBJECTS) $(addr2line_OBJECTS) $(readelf_OBJECTS) $(nm_new_OBJECTS) $(strip_new_OBJECTS) $(cxxfilt_OBJECTS)
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
-all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .l .lo .o .obj .s .y
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+.SUFFIXES: .c .l .lo .o .obj .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 \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-config.h: stamp-h
- @if test ! -f $@; then \
- rm -f stamp-h; \
- $(MAKE) stamp-h; \
- else :; fi
-stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
- $(SHELL) ./config.status
- @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+config.h: stamp-h1
@if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-
-mostlyclean-hdr:
-clean-hdr:
+stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
distclean-hdr:
- -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-binPROGRAMS:
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-distclean-binPROGRAMS:
-
-maintainer-clean-binPROGRAMS:
-
+ -rm -f config.h stamp-h1
+po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
- list='$(bin_PROGRAMS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
-mostlyclean-noinstPROGRAMS:
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
-
-maintainer-clean-noinstPROGRAMS:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-nlmconv$(EXEEXT): $(nlmconv_OBJECTS) $(nlmconv_DEPENDENCIES)
- @rm -f nlmconv$(EXEEXT)
- $(LINK) $(nlmconv_LDFLAGS) $(nlmconv_OBJECTS) $(nlmconv_LDADD) $(LIBS)
-
-srconv$(EXEEXT): $(srconv_OBJECTS) $(srconv_DEPENDENCIES)
- @rm -f srconv$(EXEEXT)
- $(LINK) $(srconv_LDFLAGS) $(srconv_OBJECTS) $(srconv_LDADD) $(LIBS)
-
-sysdump$(EXEEXT): $(sysdump_OBJECTS) $(sysdump_DEPENDENCIES)
- @rm -f sysdump$(EXEEXT)
- $(LINK) $(sysdump_LDFLAGS) $(sysdump_OBJECTS) $(sysdump_LDADD) $(LIBS)
-
-coffdump$(EXEEXT): $(coffdump_OBJECTS) $(coffdump_DEPENDENCIES)
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+addr2line$(EXEEXT): $(addr2line_OBJECTS) $(addr2line_DEPENDENCIES)
+ @rm -f addr2line$(EXEEXT)
+ $(LINK) $(addr2line_LDFLAGS) $(addr2line_OBJECTS) $(addr2line_LDADD) $(LIBS)
+ar$(EXEEXT): $(ar_OBJECTS) $(ar_DEPENDENCIES)
+ @rm -f ar$(EXEEXT)
+ $(LINK) $(ar_LDFLAGS) $(ar_OBJECTS) $(ar_LDADD) $(LIBS)
+coffdump$(EXEEXT): $(coffdump_OBJECTS) $(coffdump_DEPENDENCIES)
@rm -f coffdump$(EXEEXT)
$(LINK) $(coffdump_LDFLAGS) $(coffdump_OBJECTS) $(coffdump_LDADD) $(LIBS)
-
-dlltool$(EXEEXT): $(dlltool_OBJECTS) $(dlltool_DEPENDENCIES)
+cxxfilt$(EXEEXT): $(cxxfilt_OBJECTS) $(cxxfilt_DEPENDENCIES)
+ @rm -f cxxfilt$(EXEEXT)
+ $(LINK) $(cxxfilt_LDFLAGS) $(cxxfilt_OBJECTS) $(cxxfilt_LDADD) $(LIBS)
+dlltool$(EXEEXT): $(dlltool_OBJECTS) $(dlltool_DEPENDENCIES)
@rm -f dlltool$(EXEEXT)
$(LINK) $(dlltool_LDFLAGS) $(dlltool_OBJECTS) $(dlltool_LDADD) $(LIBS)
-
-windres$(EXEEXT): $(windres_OBJECTS) $(windres_DEPENDENCIES)
- @rm -f windres$(EXEEXT)
- $(LINK) $(windres_LDFLAGS) $(windres_OBJECTS) $(windres_LDADD) $(LIBS)
-
-dllwrap$(EXEEXT): $(dllwrap_OBJECTS) $(dllwrap_DEPENDENCIES)
+dllwrap$(EXEEXT): $(dllwrap_OBJECTS) $(dllwrap_DEPENDENCIES)
@rm -f dllwrap$(EXEEXT)
$(LINK) $(dllwrap_LDFLAGS) $(dllwrap_OBJECTS) $(dllwrap_LDADD) $(LIBS)
-
-size$(EXEEXT): $(size_OBJECTS) $(size_DEPENDENCIES)
- @rm -f size$(EXEEXT)
- $(LINK) $(size_LDFLAGS) $(size_OBJECTS) $(size_LDADD) $(LIBS)
-
-objdump$(EXEEXT): $(objdump_OBJECTS) $(objdump_DEPENDENCIES)
+nlmconv$(EXEEXT): $(nlmconv_OBJECTS) $(nlmconv_DEPENDENCIES)
+ @rm -f nlmconv$(EXEEXT)
+ $(LINK) $(nlmconv_LDFLAGS) $(nlmconv_OBJECTS) $(nlmconv_LDADD) $(LIBS)
+nm-new$(EXEEXT): $(nm_new_OBJECTS) $(nm_new_DEPENDENCIES)
+ @rm -f nm-new$(EXEEXT)
+ $(LINK) $(nm_new_LDFLAGS) $(nm_new_OBJECTS) $(nm_new_LDADD) $(LIBS)
+objcopy$(EXEEXT): $(objcopy_OBJECTS) $(objcopy_DEPENDENCIES)
+ @rm -f objcopy$(EXEEXT)
+ $(LINK) $(objcopy_LDFLAGS) $(objcopy_OBJECTS) $(objcopy_LDADD) $(LIBS)
+objdump$(EXEEXT): $(objdump_OBJECTS) $(objdump_DEPENDENCIES)
@rm -f objdump$(EXEEXT)
$(LINK) $(objdump_LDFLAGS) $(objdump_OBJECTS) $(objdump_LDADD) $(LIBS)
-
-ar$(EXEEXT): $(ar_OBJECTS) $(ar_DEPENDENCIES)
- @rm -f ar$(EXEEXT)
- $(LINK) $(ar_LDFLAGS) $(ar_OBJECTS) $(ar_LDADD) $(LIBS)
-
-strings$(EXEEXT): $(strings_OBJECTS) $(strings_DEPENDENCIES)
- @rm -f strings$(EXEEXT)
- $(LINK) $(strings_LDFLAGS) $(strings_OBJECTS) $(strings_LDADD) $(LIBS)
-
-ranlib$(EXEEXT): $(ranlib_OBJECTS) $(ranlib_DEPENDENCIES)
+ranlib$(EXEEXT): $(ranlib_OBJECTS) $(ranlib_DEPENDENCIES)
@rm -f ranlib$(EXEEXT)
$(LINK) $(ranlib_LDFLAGS) $(ranlib_OBJECTS) $(ranlib_LDADD) $(LIBS)
+readelf$(EXEEXT): $(readelf_OBJECTS) $(readelf_DEPENDENCIES)
+ @rm -f readelf$(EXEEXT)
+ $(LINK) $(readelf_LDFLAGS) $(readelf_OBJECTS) $(readelf_LDADD) $(LIBS)
+size$(EXEEXT): $(size_OBJECTS) $(size_DEPENDENCIES)
+ @rm -f size$(EXEEXT)
+ $(LINK) $(size_LDFLAGS) $(size_OBJECTS) $(size_LDADD) $(LIBS)
+srconv$(EXEEXT): $(srconv_OBJECTS) $(srconv_DEPENDENCIES)
+ @rm -f srconv$(EXEEXT)
+ $(LINK) $(srconv_LDFLAGS) $(srconv_OBJECTS) $(srconv_LDADD) $(LIBS)
+strings$(EXEEXT): $(strings_OBJECTS) $(strings_DEPENDENCIES)
+ @rm -f strings$(EXEEXT)
+ $(LINK) $(strings_LDFLAGS) $(strings_OBJECTS) $(strings_LDADD) $(LIBS)
+strip-new$(EXEEXT): $(strip_new_OBJECTS) $(strip_new_DEPENDENCIES)
+ @rm -f strip-new$(EXEEXT)
+ $(LINK) $(strip_new_LDFLAGS) $(strip_new_OBJECTS) $(strip_new_LDADD) $(LIBS)
+sysdump$(EXEEXT): $(sysdump_OBJECTS) $(sysdump_DEPENDENCIES)
+ @rm -f sysdump$(EXEEXT)
+ $(LINK) $(sysdump_LDFLAGS) $(sysdump_OBJECTS) $(sysdump_LDADD) $(LIBS)
+windres$(EXEEXT): $(windres_OBJECTS) $(windres_DEPENDENCIES)
+ @rm -f windres$(EXEEXT)
+ $(LINK) $(windres_LDFLAGS) $(windres_OBJECTS) $(windres_LDADD) $(LIBS)
-objcopy$(EXEEXT): $(objcopy_OBJECTS) $(objcopy_DEPENDENCIES)
- @rm -f objcopy$(EXEEXT)
- $(LINK) $(objcopy_LDFLAGS) $(objcopy_OBJECTS) $(objcopy_LDADD) $(LIBS)
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
-addr2line$(EXEEXT): $(addr2line_OBJECTS) $(addr2line_DEPENDENCIES)
- @rm -f addr2line$(EXEEXT)
- $(LINK) $(addr2line_LDFLAGS) $(addr2line_OBJECTS) $(addr2line_LDADD) $(LIBS)
+distclean-compile:
+ -rm -f *.tab.c
-readelf$(EXEEXT): $(readelf_OBJECTS) $(readelf_DEPENDENCIES)
- @rm -f readelf$(EXEEXT)
- $(LINK) $(readelf_LDFLAGS) $(readelf_OBJECTS) $(readelf_LDADD) $(LIBS)
+.c.o:
+ $(COMPILE) -c $<
-nm-new$(EXEEXT): $(nm_new_OBJECTS) $(nm_new_DEPENDENCIES)
- @rm -f nm-new$(EXEEXT)
- $(LINK) $(nm_new_LDFLAGS) $(nm_new_OBJECTS) $(nm_new_LDADD) $(LIBS)
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-strip-new$(EXEEXT): $(strip_new_OBJECTS) $(strip_new_DEPENDENCIES)
- @rm -f strip-new$(EXEEXT)
- $(LINK) $(strip_new_LDFLAGS) $(strip_new_OBJECTS) $(strip_new_LDADD) $(LIBS)
+.c.lo:
+ $(LTCOMPILE) -c -o $@ $<
-cxxfilt$(EXEEXT): $(cxxfilt_OBJECTS) $(cxxfilt_DEPENDENCIES)
- @rm -f cxxfilt$(EXEEXT)
- $(LINK) $(cxxfilt_LDFLAGS) $(cxxfilt_OBJECTS) $(cxxfilt_LDADD) $(LIBS)
.l.c:
- $(SHELL) $(YLWRAP) "$(LEX)" $< $(LEX_OUTPUT_ROOT).c $@ -- $(AM_LFLAGS) $(LFLAGS)
+ $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
+
.y.c:
- $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
-arparse.h: arparse.c
-defparse.h: defparse.c
-nlmheader.h: nlmheader.c
-rcparse.h: rcparse.c
+ $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -658,13 +682,14 @@ rcparse.h: rcparse.c
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -676,7 +701,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -684,13 +709,24 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
+ rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
@@ -700,164 +736,123 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique
+tags: TAGS
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-clean-tags:
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-
-RUNTESTFLAGS =
-
-DEJATOOL = $(PACKAGE)
-
-RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
site.exp: Makefile
@echo 'Making a new site.exp file...'
- @test ! -f site.bak || rm -f site.bak
- @echo '## these variables are automatically generated by make ##' > $@-t
- @echo '# Do not edit here. If you wish to override these values' >> $@-t
- @echo '# edit the last section' >> $@-t
- @echo 'set tool $(DEJATOOL)' >> $@-t
- @echo 'set srcdir $(srcdir)' >> $@-t
- @echo 'set objdir' `pwd` >> $@-t
- @echo 'set host_alias $(host_alias)' >> $@-t
- @echo 'set host_triplet $(host_triplet)' >> $@-t
- @echo 'set target_alias $(target_alias)' >> $@-t
- @echo 'set target_triplet $(target_triplet)' >> $@-t
- @echo 'set build_alias $(build_alias)' >> $@-t
- @echo 'set build_triplet $(build_triplet)' >> $@-t
- @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
- @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
+ @echo '## these variables are automatically generated by make ##' >site.tmp
+ @echo '# Do not edit here. If you wish to override these values' >>site.tmp
+ @echo '# edit the last section' >>site.tmp
+ @echo 'set srcdir $(srcdir)' >>site.tmp
+ @echo "set objdir `pwd`" >>site.tmp
+ @echo 'set build_alias "$(build_alias)"' >>site.tmp
+ @echo 'set build_triplet $(build_triplet)' >>site.tmp
+ @echo 'set host_alias "$(host_alias)"' >>site.tmp
+ @echo 'set host_triplet $(host_triplet)' >>site.tmp
+ @echo 'set target_alias "$(target_alias)"' >>site.tmp
+ @echo 'set target_triplet $(target_triplet)' >>site.tmp
+ @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+ @test ! -f site.exp || \
+ sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+ @-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
- @mv $@-t site.exp
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
+ @mv site.tmp site.exp
+
+distclean-DEJAGNU:
+ -rm -f site.exp site.bak
+ -l='$(DEJATOOL)'; for tool in $$l; do \
+ rm -f $$tool.sum $$tool.log; \
+ done
check-am:
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-all-recursive-am: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-install-exec-am: install-binPROGRAMS install-exec-local
+all-am: Makefile $(PROGRAMS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
install-exec: install-exec-recursive
-
-install-data-am:
install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-binPROGRAMS
-uninstall: uninstall-recursive
-all-am: Makefile $(PROGRAMS) config.h
-all-redirect: all-recursive-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
-
-
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@@ -865,66 +860,123 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "arlex.cdeflex.crclex.carparse.harparse.cdefparse.hdefparse.cnlmheader.hnlmheader.crcparse.hrcparse.c" || rm -f arlex.c deflex.c rclex.c arparse.h arparse.c defparse.h defparse.c nlmheader.h nlmheader.c rcparse.h rcparse.c
-mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \
- mostlyclean-noinstPROGRAMS mostlyclean-compile \
- mostlyclean-libtool mostlyclean-tags \
- mostlyclean-generic mostlyclean-local
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f arlex.c
+ -rm -f arparse.c
+ -rm -f arparse.h
+ -rm -f deflex.c
+ -rm -f defparse.c
+ -rm -f defparse.h
+ -rm -f nlmheader.c
+ -rm -f nlmheader.h
+ -rm -f rclex.c
+ -rm -f rcparse.c
+ -rm -f rcparse.h
+clean: clean-recursive
-mostlyclean: mostlyclean-recursive
+clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS mostlyclean-am
-clean-am: clean-hdr clean-binPROGRAMS clean-noinstPROGRAMS \
- clean-compile clean-libtool clean-tags clean-generic \
- mostlyclean-am
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-DEJAGNU distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-tags
-clean: clean-recursive
+dvi: dvi-recursive
-distclean-am: distclean-hdr distclean-binPROGRAMS \
- distclean-noinstPROGRAMS distclean-compile \
- distclean-libtool distclean-tags distclean-generic \
- clean-am
- -rm -f libtool
+dvi-am:
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \
- maintainer-clean-noinstPROGRAMS \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS install-exec-local
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
-maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
-mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
-clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
-info-am info dvi-am dvi check check-am installcheck-am installcheck \
-install-info-am install-info all-recursive-am install-exec-local \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs-am \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am:
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-DEJAGNU check-am clean clean-binPROGRAMS clean-generic \
+ clean-libtool clean-noinstPROGRAMS clean-recursive ctags \
+ ctags-recursive distclean distclean-DEJAGNU distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-recursive distclean-tags dvi dvi-am html html-am \
+ info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-exec install-exec-am \
+ install-exec-local install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
+
+
+.PHONY: install-html install-html-am install-html-recursive
+
+install-html: install-html-recursive
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
po/POTFILES.in: @MAINT@ Makefile
for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
@@ -933,10 +985,6 @@ check-DEJAGNU: site.exp
srcdir=`cd $(srcdir) && pwd`; export srcdir; \
r=`pwd`; export r; \
EXPECT=$(EXPECT); export EXPECT; \
- if [ -f $(top_builddir)/../expect/expect ]; then \
- TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
- export TCL_LIBRARY; \
- fi; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
CC_FOR_TARGET="$(CC_FOR_TARGET)" CFLAGS_FOR_TARGET="$(CFLAGS)" \
@@ -978,20 +1026,20 @@ sysroff.h: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h
sysinfo$(EXEEXT_FOR_BUILD): sysinfo.o syslex.o
- $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o
+ $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o
-syslex.o: syslex.c sysinfo.h
+syslex.o:
if [ -r syslex.c ]; then \
- $(CC_FOR_BUILD) -c -I. $(CFLAGS) syslex.c ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS) syslex.c -Wno-error ; \
else \
- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(CFLAGS) $(srcdir)/syslex.c ;\
+ $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS) $(srcdir)/syslex.c -Wno-error ;\
fi
-sysinfo.o: sysinfo.c
+sysinfo.o:
if [ -r sysinfo.c ]; then \
- $(CC_FOR_BUILD) -c -I. $(CFLAGS) sysinfo.c ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS) sysinfo.c -Wno-error ; \
else \
- $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS) $(srcdir)/sysinfo.c -Wno-error ; \
fi
# We need these for parallel make.
@@ -1001,10 +1049,29 @@ nlmheader.h: nlmheader.c
rcparse.h: rcparse.c
sysinfo.h: sysinfo.c
-dlltool.o:dlltool.c
+# Disable -Werror, if it has been enabled, since old versions of bison/
+# yacc will produce working code which contain compile time warnings.
+arparse.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+arlex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+sysroff.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+defparse.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+deflex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+nlmheader.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+rcparse.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+rclex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+
+dlltool.o:
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
-rescoff.o:rescoff.c
+rescoff.o:
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/rescoff.c
# coff/sym.h and coff/ecoff.h won't be found by the automatic dependency
@@ -1014,8 +1081,7 @@ nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
$(COMPILE) -c -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(srcdir)/nlmconv.c
diststuff: $(EXTRA_DIST) info
-
-Makefile: $(BFDDIR)/configure.in
+all: info
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
@@ -1091,15 +1157,15 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+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 config.h $(INCDIR)/bin-bugs.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 arsup.h $(INCDIR)/filenames.h \
- binemul.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 \
@@ -1110,7 +1176,7 @@ binemul.o: binemul.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.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)/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
@@ -1124,6 +1190,10 @@ coffgrok.o: coffgrok.c ../bfd/bfd.h $(INCDIR)/ansidecl.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
@@ -1168,13 +1238,15 @@ 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 \
- budbg.h $(INCDIR)/filenames.h $(INCDIR)/fnmatch.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 \
- budemang.h $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h \
- $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
- budbg.h $(INCDIR)/aout/aout64.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 \
@@ -1188,24 +1260,25 @@ 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 ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/alpha.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/cris.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/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/msp430.h \
+ $(INCDIR)/elf/avr.h $(INCDIR)/elf/bfin.h $(INCDIR)/elf/cris.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/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/iq2000.h \
- $(INCDIR)/elf/xtensa.h $(INCDIR)/aout/ar.h bucomm.h \
- config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.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 \
@@ -1251,11 +1324,10 @@ sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
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 ../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 $(INCDIR)/obstack.h windres.h \
- winduni.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
@@ -1271,7 +1343,7 @@ arlex.o: arlex.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
arparse.h
sysroff.o: sysroff.c
sysinfo.o: sysinfo.c
-syslex.o: syslex.c sysinfo.h
+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
@@ -1290,7 +1362,6 @@ rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
windres.h winduni.h rcparse.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/binutils/binutils/NEWS b/contrib/binutils/binutils/NEWS
index a72826ef8734..d12450e38925 100644
--- a/contrib/binutils/binutils/NEWS
+++ b/contrib/binutils/binutils/NEWS
@@ -1,5 +1,66 @@
-*- text -*-
+* Add "-x NAME" to readelf in addition to "-x NUMBER".
+
+* Add -i and -t switches to cxxfilt. -i disables the display of implementation
+ specific extra demangling information (if any) and -t disables the demangling
+ of types.
+
+* Add support for the "@<file>" syntax to the command lines of all tools, so
+ that extra switches can be read from <file>.
+
+* Add "-W/--dwarf" to objdump to display the contents of the DWARF
+ debug sections.
+
+* Add "-t/--section-details" to readelf to display section details.
+ "-N/--full-section-name" is deprecated.
+
+* powerpc-linux ld now supports a variant form of PLT and GOT for the security
+ conscious. This form will automatically be chosen when ld detects that all
+ code in regular object files was generated by gcc -msecure-plt. The old PLT
+ and GOT may be forced by a new ld option, --bss-plt.
+
+* Add "-i/--inlines" to addr2line to print enclosing scope information
+ for inlined function chains, back to first non-inlined function.
+
+* Add "-N/--full-section-name" to readelf to display full section name.
+
+* Add "-M entry:<addr>" switch to objdump to specify a function entry address
+ when disassembling VAX binaries.
+
+* Add "--globalize-symbol <name>" and "--globalize-symbols <filename>" switches
+ to objcopy to convert local symbols into global symbols.
+
+Changes in 2.16:
+
+* Add "-g/--section-groups" to readelf to display section groups.
+
+* objcopy recognizes two new options --strip-unneeded-symbol and
+ --strip-unneeded-symbols, namely for use together with the wildcard
+ matching the original --strip-symbol/--strip-symbols provided, but
+ retaining any symbols matching but needed by relocations.
+
+* readelf can now display address ranges from .debug_range sections. This
+ happens automatically when a DW_AT_range attribute is encountered. The
+ command line switch --debug-dump=Ranges (or -wR) can also be used to display
+ the contents of the .debug_range section.
+
+* nm and objdump now have a switch "--special-syms" to enable the displaying of
+ symbols which the target considers to be special. By default these symbols
+ are no longer displayed. Currently the only special symbols are the Mapping
+ symbols used by the ARM port to mark transitions between text and data and
+ between ARM and THUMB code.
+
+* dlltool has a switch "--ext-prefix-alias <prefix>" to generate additional
+ import and export symbols with <preifx> prepended to them.
+
+Changes in 2.15:
+
+* objcopy for MIPS targets now accepts "-M no-aliases" as an option to the
+ disassembler to print the "raw" mips instruction mnemonic instead of some
+ pseudo instruction name. I.E. print "daddu" or "or" instead of "move",
+ "sll" instead of "nop", etc.
+
* objcopy and strip can now take wildcard patterns in symbol names specified on
the command line provided that the --wildcard switch is used to enable them.
diff --git a/contrib/binutils/binutils/acinclude.m4 b/contrib/binutils/binutils/acinclude.m4
index c5ae4d468592..71b09b9f6ac7 100644
--- a/contrib/binutils/binutils/acinclude.m4
+++ b/contrib/binutils/binutils/acinclude.m4
@@ -1,32 +1 @@
sinclude(../bfd/acinclude.m4)
-
-dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_SUBST(LIBTOOL)
-])
-
-dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
-])
-
-## Replacement for AC_PROG_LEX and AC_DECL_YYTEXT
-## by Alexandre Oliva <oliva@dcc.unicamp.br>
-
-## We need to override the installed aclocal/lex.m4 because of a bug in
-## this definition in the recommended automake snapshot of 000227:
-## There were double-quotes around ``$missing_dir/missing flex'' which was
-## bad since aclocal wraps it in double-quotes.
-
-dnl AM_PROG_LEX
-dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
-AC_DEFUN([AM_PROG_LEX],
-[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
-AC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex])
-AC_PROG_LEX
-AC_DECL_YYTEXT])
diff --git a/contrib/binutils/binutils/aclocal.m4 b/contrib/binutils/binutils/aclocal.m4
index d1f4a36bbf40..cd4267338b72 100644
--- a/contrib/binutils/binutils/aclocal.m4
+++ b/contrib/binutils/binutils/aclocal.m4
@@ -1,115 +1,771 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p5
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-sinclude(../bfd/acinclude.m4)
-
-dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_SUBST(LIBTOOL)
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Copyright (C) 2002, 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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# 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.6])])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 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 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
-dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
])
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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.
-dnl AM_PROG_LEX
-dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
-AC_DEFUN(AM_PROG_LEX,
-[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
-AC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex])
-AC_PROG_LEX
-AC_DECL_YYTEXT])
+#serial 3
-#serial 1
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-undefine([AC_ISC_POSIX])
-AC_DEFUN([AC_ISC_POSIX],
- [
- dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- ]
-)
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
+# Copyright (C) 1996, 1997, 2000, 2001, 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 1
+# serial 8
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 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 12
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+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.
#
-# Check to make sure that the build environment is sane.
+# 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 5
+
+# AM_PROG_LEX
+# -----------
+# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
+# "missing" invocation, for better error output.
+AC_DEFUN([AM_PROG_LEX],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
+AC_REQUIRE([AC_PROG_LEX])dnl
+if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+fi])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 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 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 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 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 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 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 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 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 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 4
+
+# AM_SANITY_CHECK
+# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
@@ -119,7 +775,7 @@ if (
alias in your environment])
fi
- test "[$]2" = conftestfile
+ test "$[2]" = conftest.file
)
then
# Ok.
@@ -128,78 +784,130 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-rm -f conftest*
AC_MSG_RESULT(yes)])
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
+# Copyright (C) 2001, 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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
fi
-AC_SUBST($1)])
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- ;;
- esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
+# Check how to create a tarball. -*- Autoconf -*-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
+# Copyright (C) 2004, 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 1
+# serial 2
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
-# Define a conditional.
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+m4_include([acinclude.m4])
diff --git a/contrib/binutils/binutils/addr2line.c b/contrib/binutils/binutils/addr2line.c
index 354153eadb13..7cd67bc0a1b0 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
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006
Free Software Foundation, Inc.
Contributed by Ulrich Lauther <Ulrich.Lauther@mchp.siemens.de>
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Derived from objdump.c and nm.c by Ulrich.Lauther@mchp.siemens.de
@@ -29,6 +29,7 @@
both forms write results to stdout, the second form reads addresses
to be converted from stdin. */
+#include "config.h"
#include <string.h>
#include "bfd.h"
@@ -38,6 +39,7 @@
#include "bucomm.h"
#include "budemang.h"
+static bfd_boolean unwind_inlines; /* -i, unwind inlined functions. */
static bfd_boolean with_functions; /* -f, show function names. */
static bfd_boolean do_demangle; /* -C, demangle names. */
static bfd_boolean base_names; /* -s, strip directory names. */
@@ -53,6 +55,8 @@ static struct option long_options[] =
{"demangle", optional_argument, NULL, 'C'},
{"exe", required_argument, NULL, 'e'},
{"functions", no_argument, NULL, 'f'},
+ {"inlines", no_argument, NULL, 'i'},
+ {"section", required_argument, NULL, 'j'},
{"target", required_argument, NULL, 'b'},
{"help", no_argument, NULL, 'H'},
{"version", no_argument, NULL, 'V'},
@@ -62,8 +66,9 @@ static struct option long_options[] =
static void usage (FILE *, int);
static void slurp_symtab (bfd *);
static void find_address_in_section (bfd *, asection *, void *);
-static void translate_addresses (bfd *);
-static void process_file (const char *, const char *);
+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. */
@@ -74,8 +79,11 @@ usage (FILE *stream, int status)
fprintf (stream, _(" Convert addresses into line number/file name pairs.\n"));
fprintf (stream, _(" If no addresses are specified on the command line, they will be read from stdin\n"));
fprintf (stream, _(" The options are:\n\
+ @<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 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\
@@ -137,7 +145,7 @@ find_address_in_section (bfd *abfd, asection *section,
if (pc < vma)
return;
- size = bfd_get_section_size_before_reloc (section);
+ size = bfd_get_section_size (section);
if (pc >= vma + size)
return;
@@ -145,11 +153,32 @@ find_address_in_section (bfd *abfd, asection *section,
&filename, &functionname, &line);
}
+/* Look for an offset in a section. This is directly called. */
+
+static void
+find_offset_in_section (bfd *abfd, asection *section)
+{
+ bfd_size_type size;
+
+ if (found)
+ return;
+
+ if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0)
+ return;
+
+ size = bfd_get_section_size (section);
+ if (pc >= size)
+ return;
+
+ found = bfd_find_nearest_line (abfd, section, syms, pc,
+ &filename, &functionname, &line);
+}
+
/* Read hexadecimal addresses from stdin, translate into
file_name:line_number and optionally function name. */
static void
-translate_addresses (bfd *abfd)
+translate_addresses (bfd *abfd, asection *section)
{
int read_stdin = (naddr == 0);
@@ -172,7 +201,10 @@ translate_addresses (bfd *abfd)
}
found = FALSE;
- bfd_map_over_sections (abfd, find_address_in_section, NULL);
+ if (section)
+ find_offset_in_section (abfd, section);
+ else
+ bfd_map_over_sections (abfd, find_address_in_section, NULL);
if (! found)
{
@@ -182,36 +214,43 @@ translate_addresses (bfd *abfd)
}
else
{
- if (with_functions)
- {
- const char *name;
- char *alloc = NULL;
-
- name = functionname;
- if (name == NULL || *name == '\0')
- name = "??";
- else if (do_demangle)
- {
- alloc = demangle (abfd, name);
- name = alloc;
- }
-
- printf ("%s\n", name);
-
- if (alloc != NULL)
- free (alloc);
- }
-
- if (base_names && filename != NULL)
- {
- char *h;
-
- h = strrchr (filename, '/');
- if (h != NULL)
- filename = h + 1;
- }
+ do {
+ if (with_functions)
+ {
+ const char *name;
+ char *alloc = NULL;
+
+ name = functionname;
+ if (name == NULL || *name == '\0')
+ name = "??";
+ else if (do_demangle)
+ {
+ alloc = demangle (abfd, name);
+ name = alloc;
+ }
+
+ printf ("%s\n", name);
+
+ if (alloc != NULL)
+ free (alloc);
+ }
+
+ if (base_names && filename != NULL)
+ {
+ char *h;
+
+ h = strrchr (filename, '/');
+ if (h != NULL)
+ filename = h + 1;
+ }
+
+ printf ("%s:%u\n", filename ? filename : "??", line);
+ if (!unwind_inlines)
+ found = FALSE;
+ else
+ found = bfd_find_inliner_info (abfd, &filename, &functionname, &line);
+ } while (found);
- printf ("%s:%u\n", filename ? filename : "??", line);
}
/* fflush() is essential for using this command as a server
@@ -225,9 +264,11 @@ translate_addresses (bfd *abfd)
/* Process a file. */
static void
-process_file (const char *file_name, const char *target)
+process_file (const char *file_name, const char *section_name,
+ const char *target)
{
bfd *abfd;
+ asection *section;
char **matching;
if (get_file_size (file_name) < 1)
@@ -238,7 +279,7 @@ process_file (const char *file_name, const char *target)
bfd_fatal (file_name);
if (bfd_check_format (abfd, bfd_archive))
- fatal (_("%s: can not get addresses from archive"), file_name);
+ fatal (_("%s: cannot get addresses from archive"), file_name);
if (! bfd_check_format_matches (abfd, bfd_object, &matching))
{
@@ -251,9 +292,18 @@ process_file (const char *file_name, const char *target)
xexit (1);
}
+ if (section_name != NULL)
+ {
+ section = bfd_get_section_by_name (abfd, section_name);
+ if (section == NULL)
+ fatal (_("%s: cannot find section %s"), file_name, section_name);
+ }
+ else
+ section = NULL;
+
slurp_symtab (abfd);
- translate_addresses (abfd);
+ translate_addresses (abfd, section);
if (syms != NULL)
{
@@ -264,12 +314,11 @@ process_file (const char *file_name, const char *target)
bfd_close (abfd);
}
-int main (int, char **);
-
int
main (int argc, char **argv)
{
const char *file_name;
+ const char *section_name;
char *target;
int c;
@@ -285,12 +334,15 @@ main (int argc, char **argv)
program_name = *argv;
xmalloc_set_program_name (program_name);
+ expandargv (&argc, &argv);
+
bfd_init ();
set_default_bfd_target ();
file_name = NULL;
+ section_name = NULL;
target = NULL;
- while ((c = getopt_long (argc, argv, "b:Ce:sfHhVv", long_options, (int *) 0))
+ while ((c = getopt_long (argc, argv, "b:Ce:sfHhij:Vv", long_options, (int *) 0))
!= EOF)
{
switch (c)
@@ -331,6 +383,12 @@ main (int argc, char **argv)
case 'H':
usage (stdout, 0);
break;
+ case 'i':
+ unwind_inlines = TRUE;
+ break;
+ case 'j':
+ section_name = optarg;
+ break;
default:
usage (stderr, 1);
break;
@@ -343,7 +401,7 @@ main (int argc, char **argv)
addr = argv + optind;
naddr = argc - optind;
- process_file (file_name, target);
+ process_file (file_name, section_name, target);
return 0;
}
diff --git a/contrib/binutils/binutils/ar.c b/contrib/binutils/binutils/ar.c
index ec0657d638c2..fe1c6402222d 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
+ 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
Bugs: should use getopt the way tar does (complete w/optional -) and
@@ -49,8 +49,6 @@
#define O_BINARY 0
#endif
-#define BUFSIZE 8192
-
/* Kludge declaration from BFD! This is ugly! FIXME! XXX */
struct ar_hdr *
@@ -65,11 +63,6 @@ static void map_over_members (bfd *, void (*)(bfd *), char **, int);
static void print_contents (bfd * member);
static void delete_members (bfd *, char **files_to_delete);
-#if 0
-static void do_quick_append
- (const char *archive_filename, char **files_to_append);
-#endif
-
static void move_members (bfd *, char **files_to_move);
static void replace_members
(bfd *, char **files_to_replace, bfd_boolean quick);
@@ -81,7 +74,7 @@ static void usage (int);
/** Globals and flags */
-int mri_mode;
+static int mri_mode;
/* This flag distinguishes between ar and ranlib:
1 means this is 'ranlib'; 0 means this is 'ar'.
@@ -249,7 +242,8 @@ usage (int help)
fprintf (s, _(" [S] - do not build a symbol table\n"));
fprintf (s, _(" [v] - be verbose\n"));
fprintf (s, _(" [V] - display the version number\n"));
-
+ fprintf (s, _(" @<file> - read options from <file>\n"));
+
ar_emul_usage (s);
}
else
@@ -258,6 +252,7 @@ usage (int help)
fprintf (s, _("Usage: %s [options] archive\n"), program_name);
fprintf (s, _(" Generate an index to speed access to archives\n"));
fprintf (s, _(" The options are:\n\
+ @<file> Read options from <file>\n\
-h --help Print this help message\n\
-V --version Print version information\n"));
}
@@ -328,7 +323,7 @@ remove_output (void)
bfd_cache_close (output_bfd);
if (output_file != NULL)
fclose (output_file);
- unlink (output_filename);
+ unlink_if_ordinary (output_filename);
}
}
@@ -367,6 +362,8 @@ main (int argc, char **argv)
program_name = argv[0];
xmalloc_set_program_name (program_name);
+ expandargv (&argc, &argv);
+
if (is_ranlib < 0)
{
char *temp;
@@ -589,6 +586,10 @@ main (int argc, char **argv)
{
bfd *arch;
+ /* We don't use do_quick_append any more. Too many systems
+ expect ar to always rebuild the symbol table even when q is
+ used. */
+
/* We can't write an armap when using ar q, so just do ar r
instead. */
if (operation == quick_append && write_armap)
@@ -624,39 +625,6 @@ main (int argc, char **argv)
files = arg_index < argc ? argv + arg_index : NULL;
file_count = argc - arg_index;
-#if 0
- /* We don't use do_quick_append any more. Too many systems
- expect ar to always rebuild the symbol table even when q is
- used. */
-
- /* We can't do a quick append if we need to construct an
- extended name table, because do_quick_append won't be able to
- rebuild the name table. Unfortunately, at this point we
- don't actually know the maximum name length permitted by this
- object file format. So, we guess. FIXME. */
- if (operation == quick_append && ! ar_truncate)
- {
- char **chk;
-
- for (chk = files; chk != NULL && *chk != '\0'; chk++)
- {
- if (strlen (normalize (*chk, (bfd *) NULL)) > 14)
- {
- operation = replace;
- break;
- }
- }
- }
-
- if (operation == quick_append)
- {
- /* Note that quick appending to a non-existent archive creates it,
- even if there are no files to append. */
- do_quick_append (inarch_filename, files);
- xexit (0);
- }
-#endif
-
arch = open_inarch (inarch_filename,
files == NULL ? (char *) NULL : files[0]);
@@ -935,130 +903,16 @@ extract_file (bfd *abfd)
chmod (bfd_get_filename (abfd), buf.st_mode);
if (preserve_dates)
- set_times (bfd_get_filename (abfd), &buf);
-
- free (cbuf);
-}
-
-#if 0
-
-/* We don't use this anymore. Too many systems expect ar to rebuild
- the symbol table even when q is used. */
-
-/* Just do it quickly; don't worry about dups, armap, or anything like that */
-
-static void
-do_quick_append (const char *archive_filename, char **files_to_append)
-{
- FILE *ofile, *ifile;
- char *buf = xmalloc (BUFSIZE);
- long tocopy, thistime;
- bfd *temp;
- struct stat sbuf;
- bfd_boolean newfile = FALSE;
- bfd_set_error (bfd_error_no_error);
-
- if (stat (archive_filename, &sbuf) != 0)
{
-
-#if !defined(__GO32__) || defined(__DJGPP__)
-
- /* FIXME: I don't understand why this fragment was ifndef'ed
- away for __GO32__; perhaps it was in the days of DJGPP v1.x.
- stat() works just fine in v2.x, so I think this should be
- removed. For now, I enable it for DJGPP v2.
-
- (And yes, I know this is all unused, but somebody, someday,
- might wish to resurrect this again... -- EZ. */
-
-/* KLUDGE ALERT! Temporary fix until I figger why
- stat() is wrong ... think it's buried in GO32's IDT - Jax */
-
- if (errno != ENOENT)
- bfd_fatal (archive_filename);
-#endif
-
- newfile = TRUE;
- }
-
- ofile = fopen (archive_filename, FOPEN_AUB);
- if (ofile == NULL)
- {
- perror (program_name);
- xexit (1);
- }
-
- temp = bfd_openr (archive_filename, NULL);
- if (temp == NULL)
- {
- bfd_fatal (archive_filename);
- }
- if (!newfile)
- {
- if (!bfd_check_format (temp, bfd_archive))
- /* xgettext:c-format */
- fatal (_("%s is not an archive"), archive_filename);
- }
- else
- {
- fwrite (ARMAG, 1, SARMAG, ofile);
- if (!silent_create)
- /* xgettext:c-format */
- non_fatal (_("creating %s"), archive_filename);
+ /* Set access time to modification time. Only st_mtime is
+ initialized by bfd_stat_arch_elt. */
+ buf.st_atime = buf.st_mtime;
+ set_times (bfd_get_filename (abfd), &buf);
}
- if (ar_truncate)
- temp->flags |= BFD_TRADITIONAL_FORMAT;
-
- /* assume it's an archive, go straight to the end, sans $200 */
- fseek (ofile, 0, 2);
-
- for (; files_to_append && *files_to_append; ++files_to_append)
- {
- struct ar_hdr *hdr = bfd_special_undocumented_glue (temp, *files_to_append);
- if (hdr == NULL)
- {
- bfd_fatal (*files_to_append);
- }
-
- BFD_SEND (temp, _bfd_truncate_arname, (temp, *files_to_append, (char *) hdr));
-
- ifile = fopen (*files_to_append, FOPEN_RB);
- if (ifile == NULL)
- {
- bfd_nonfatal (*files_to_append);
- }
-
- if (stat (*files_to_append, &sbuf) != 0)
- {
- bfd_nonfatal (*files_to_append);
- }
-
- tocopy = sbuf.st_size;
-
- /* XXX should do error-checking! */
- fwrite (hdr, 1, sizeof (struct ar_hdr), ofile);
-
- while (tocopy > 0)
- {
- thistime = tocopy;
- if (thistime > BUFSIZE)
- thistime = BUFSIZE;
- fread (buf, 1, thistime, ifile);
- fwrite (buf, 1, thistime, ofile);
- tocopy -= thistime;
- }
- fclose (ifile);
- if ((sbuf.st_size % 2) == 1)
- putc ('\012', ofile);
- }
- fclose (ofile);
- bfd_close (temp);
- free (buf);
+ free (cbuf);
}
-#endif /* 0 */
-
static void
write_archive (bfd *iarch)
{
@@ -1268,7 +1122,7 @@ static void
replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
{
bfd_boolean changed = FALSE;
- bfd **after_bfd; /* New entries go after this one */
+ bfd **after_bfd; /* New entries go after this one. */
bfd *current;
bfd **current_ptr;
@@ -1325,8 +1179,7 @@ replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
/* Add to the end of the archive. */
after_bfd = get_pos_bfd (&arch->next, pos_end, NULL);
- if (get_file_size (* files_to_move) > 0
- && ar_emul_append (after_bfd, *files_to_move, verbose))
+ if (ar_emul_append (after_bfd, *files_to_move, verbose))
changed = TRUE;
next_file:;
diff --git a/contrib/binutils/binutils/arlex.l b/contrib/binutils/binutils/arlex.l
index ab1ff164e190..1560294327f2 100644
--- a/contrib/binutils/binutils/arlex.l
+++ b/contrib/binutils/binutils/arlex.l
@@ -1,7 +1,8 @@
%{
/* arlex.l - Strange script language lexer */
-/* Copyright 1992, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright 1992, 1997, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -17,13 +18,11 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-/* Contributed by Steve Chamberlain
- sac@cygnus.com
+/* Contributed by Steve Chamberlain <sac@cygnus.com>. */
-*/
#define DONTDECLARE_MALLOC
#include "ansidecl.h"
#include "libiberty.h"
diff --git a/contrib/binutils/binutils/arparse.y b/contrib/binutils/binutils/arparse.y
index d54de24d1c5b..a7ea0157f411 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, 2003
+/* Copyright 1992, 1993, 1995, 1997, 1999, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Contributed by Steve Chamberlain
diff --git a/contrib/binutils/binutils/arsup.c b/contrib/binutils/binutils/arsup.c
index 5160dc47b57b..189490b307b6 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, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Contributed by Steve Chamberlain
@@ -38,6 +38,10 @@ static void ar_addlib_doer (bfd *, bfd *);
extern int verbose;
+static bfd *obfd;
+static char *real_name;
+static FILE *outfile;
+
static void
map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
{
@@ -86,7 +90,6 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
}
-FILE *outfile;
static void
ar_directory_doer (bfd *abfd, bfd *ignore ATTRIBUTE_UNUSED)
@@ -141,9 +144,6 @@ maybequit (void)
}
-bfd *obfd;
-char *real_name;
-
void
ar_open (char *name, int t)
{
diff --git a/contrib/binutils/binutils/arsup.h b/contrib/binutils/binutils/arsup.h
index e3a1807919b2..136efcf3c9b5 100644
--- a/contrib/binutils/binutils/arsup.h
+++ b/contrib/binutils/binutils/arsup.h
@@ -1,5 +1,6 @@
/* arsup.h - archive support header file
- Copyright 1992, 1993, 1994, 1996, 2003 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1996, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -15,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
struct list {
char *name;
diff --git a/contrib/binutils/binutils/binemul.c b/contrib/binutils/binutils/binemul.c
index 3f6ed6573d6c..7dac32dd1153 100644
--- a/contrib/binutils/binutils/binemul.c
+++ b/contrib/binutils/binutils/binemul.c
@@ -1,6 +1,6 @@
/* Binutils emulation layer.
Copyright 2002, 2003 Free Software Foundation, Inc.
- Written by Tom Rix, Redhat.
+ Written by Tom Rix, Red Hat Inc.
This file is part of GNU Binutils.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "binemul.h"
@@ -90,47 +90,6 @@ ar_emul_default_replace (bfd **after_bfd, char *file_name,
}
bfd_boolean
-ar_emul_create (bfd **abfd_out, char *archive_file_name, char *file_name)
-{
- if (bin_dummy_emulation.ar_create)
- return bin_dummy_emulation.ar_create (abfd_out, archive_file_name,
- file_name);
-
- return FALSE;
-}
-
-bfd_boolean
-ar_emul_default_create (bfd **abfd_out, char *archive_file_name,
- char *file_name)
-{
- char *target = NULL;
-
- /* Try to figure out the target to use for the archive from the
- first object on the list. */
- if (file_name != NULL)
- {
- bfd *obj;
-
- obj = bfd_openr (file_name, NULL);
- if (obj != NULL)
- {
- if (bfd_check_format (obj, bfd_object))
- target = bfd_get_target (obj);
- (void) bfd_close (obj);
- }
- }
-
- /* Create an empty archive. */
- *abfd_out = bfd_openw (archive_file_name, target);
- if (*abfd_out == NULL
- || ! bfd_set_format (*abfd_out, bfd_archive)
- || ! bfd_close (*abfd_out))
- bfd_fatal (archive_file_name);
-
- return TRUE;
-}
-
-bfd_boolean
ar_emul_parse_arg (char *arg)
{
if (bin_dummy_emulation.ar_parse_arg)
diff --git a/contrib/binutils/binutils/binemul.h b/contrib/binutils/binutils/binemul.h
index 59dc2bde20d8..53bbbd2de204 100644
--- a/contrib/binutils/binutils/binemul.h
+++ b/contrib/binutils/binutils/binemul.h
@@ -1,6 +1,6 @@
/* Binutils emulation layer.
Copyright 2002, 2003 Free Software Foundation, Inc.
- Written by Tom Rix, Redhat.
+ Written by Tom Rix, Red Hat Inc.
This file is part of GNU Binutils.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef BINEMUL_H
#define BINEMUL_H
@@ -30,8 +30,6 @@ extern bfd_boolean ar_emul_append (bfd **, char *, bfd_boolean);
extern bfd_boolean ar_emul_default_append (bfd **, char *, bfd_boolean);
extern bfd_boolean ar_emul_replace (bfd **, char *, bfd_boolean);
extern bfd_boolean ar_emul_default_replace (bfd **, char *, bfd_boolean);
-extern bfd_boolean ar_emul_create (bfd **, char *, char *);
-extern bfd_boolean ar_emul_default_create (bfd **, char *, char *);
extern bfd_boolean ar_emul_parse_arg (char *);
extern bfd_boolean ar_emul_default_parse_arg (char *);
@@ -42,7 +40,7 @@ extern bfd_boolean ar_emul_default_parse_arg (char *);
fprintf (fp, _(" emulation options: \n"))
#define AR_EMUL_ELEMENT_CHECK(abfd, file_name) \
- do { if ((abfd) == (bfd *) NULL) bfd_fatal (file_name); } while (0)
+ do { if ((abfd) == NULL) bfd_fatal (file_name); } while (0)
#define AR_EMUL_APPEND_PRINT_VERBOSE(verbose, file_name) \
do { if (verbose) printf ("a - %s\n", file_name); } while (0)
@@ -56,7 +54,6 @@ typedef struct bin_emulation_xfer_struct
void (* ar_usage) (FILE *fp);
bfd_boolean (* ar_append) (bfd **, char *, bfd_boolean);
bfd_boolean (* ar_replace) (bfd **, char *, bfd_boolean);
- bfd_boolean (* ar_create) (bfd **, char *, char *);
bfd_boolean (* ar_parse_arg) (char *);
}
bin_emulation_xfer_type;
diff --git a/contrib/binutils/binutils/bucomm.c b/contrib/binutils/binutils/bucomm.c
index 6573e2d9c7fa..03a4d2873e2a 100644
--- a/contrib/binutils/binutils/bucomm.c
+++ b/contrib/binutils/binutils/bucomm.c
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* We might put this in a library someday so it could be dynamically
loaded, but for now it's not necessary. */
@@ -31,6 +31,7 @@
#include <sys/stat.h>
#include <time.h> /* ctime, maybe time_t */
+#include <assert.h>
#ifndef HAVE_TIME_T_IN_TIME_H
#ifndef HAVE_TIME_T_IN_TYPES_H
@@ -188,7 +189,7 @@ display_target_list (void)
{
const bfd_target *p = bfd_target_vector[t];
bfd *abfd = bfd_openw (dummy_name, p->name);
- int a;
+ enum bfd_architecture a;
printf ("%s\n (header %s, data %s)\n", p->name,
endian_string (p->header_byteorder),
@@ -212,7 +213,7 @@ display_target_list (void)
continue;
}
- for (a = (int) bfd_arch_obscure + 1; a < (int) bfd_arch_last; a++)
+ for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
if (bfd_set_arch_mach (abfd, (enum bfd_architecture) a, 0))
printf (" %s\n",
bfd_printable_arch_mach ((enum bfd_architecture) a, 0));
@@ -232,9 +233,9 @@ static int
display_info_table (int first, int last)
{
int t;
- int a;
int ret = 1;
char *dummy_name;
+ enum bfd_architecture a;
/* Print heading of target names. */
printf ("\n%*s", (int) LONGEST_ARCH, " ");
@@ -243,7 +244,7 @@ display_info_table (int first, int last)
putchar ('\n');
dummy_name = make_temp_file (NULL);
- for (a = (int) bfd_arch_obscure + 1; a < (int) bfd_arch_last; a++)
+ for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
if (strcmp (bfd_printable_arch_mach (a, 0), "UNKNOWN!") != 0)
{
printf ("%*s ", (int) LONGEST_ARCH - 1,
@@ -475,3 +476,38 @@ get_file_size (const char * file_name)
return 0;
}
+
+/* Return the filename in a static buffer. */
+
+const char *
+bfd_get_archive_filename (bfd *abfd)
+{
+ static size_t curr = 0;
+ static char *buf;
+ size_t needed;
+
+ assert (abfd != NULL);
+
+ if (!abfd->my_archive)
+ return bfd_get_filename (abfd);
+
+ needed = (strlen (bfd_get_filename (abfd->my_archive))
+ + strlen (bfd_get_filename (abfd)) + 3);
+ if (needed > curr)
+ {
+ if (curr)
+ free (buf);
+ curr = needed + (needed >> 1);
+ buf = bfd_malloc (curr);
+ /* If we can't malloc, fail safe by returning just the file name.
+ This function is only used when building error messages. */
+ if (!buf)
+ {
+ curr = 0;
+ return bfd_get_filename (abfd);
+ }
+ }
+ sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
+ bfd_get_filename (abfd));
+ return buf;
+}
diff --git a/contrib/binutils/binutils/bucomm.h b/contrib/binutils/binutils/bucomm.h
index f604053cec80..9f914adeb58c 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,
- 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _BUCOMM_H
#define _BUCOMM_H
@@ -28,11 +28,7 @@
#include "config.h"
#include "bin-bugs.h"
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef USE_BINARY_FOPEN
#include "fopen-bin.h"
@@ -72,24 +68,40 @@ extern char *strrchr ();
#endif
#endif
-#ifdef NEED_DECLARATION_STRSTR
+#if !HAVE_DECL_STPCPY
+extern char *stpcpy (char *, const char *);
+#endif
+
+#if !HAVE_DECL_STRSTR
extern char *strstr ();
#endif
#ifdef HAVE_SBRK
-#ifdef NEED_DECLARATION_SBRK
+#if !HAVE_DECL_SBRK
extern char *sbrk ();
#endif
#endif
-#ifdef NEED_DECLARATION_GETENV
+#if !HAVE_DECL_GETENV
extern char *getenv ();
#endif
-#ifdef NEED_DECLARATION_ENVIRON
+#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
@@ -125,7 +137,17 @@ void *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
@@ -147,12 +169,19 @@ void *alloca ();
# 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 *);
+
void bfd_nonfatal (const char *);
void bfd_fatal (const char *) ATTRIBUTE_NORETURN;
-void report (const char *, va_list);
+void report (const char *, va_list) ATTRIBUTE_PRINTF(1,0);
void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
diff --git a/contrib/binutils/binutils/budbg.h b/contrib/binutils/binutils/budbg.h
index f5c03bd23a2f..3524190a1806 100644
--- a/contrib/binutils/binutils/budbg.h
+++ b/contrib/binutils/binutils/budbg.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef BUDBG_H
#define BUDBG_H
diff --git a/contrib/binutils/binutils/budemang.c b/contrib/binutils/binutils/budemang.c
index 525a1c898cf3..55f10b785daf 100644
--- a/contrib/binutils/binutils/budemang.c
+++ b/contrib/binutils/binutils/budemang.c
@@ -1,5 +1,5 @@
/* demangle.c -- A wrapper calling libiberty cplus_demangle
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "config.h"
#include <stdlib.h>
@@ -38,8 +38,9 @@
char *
demangle (bfd *abfd, const char *name)
{
- char *res;
- const char *p;
+ char *res, *alloc;
+ const char *pre, *suf;
+ size_t pre_len;
if (abfd != NULL && bfd_get_symbol_leading_char (abfd) == name[0])
++name;
@@ -48,28 +49,52 @@ demangle (bfd *abfd, const char *name)
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;
+ pre = name;
+ while (*name == '.')
+ ++name;
+ pre_len = name - pre;
- res = cplus_demangle (p, DMGL_ANSI | DMGL_PARAMS);
- if (res)
+ alloc = NULL;
+ suf = strchr (name, '@');
+ if (suf != NULL)
{
- size_t dots = p - name;
+ alloc = xmalloc (suf - name + 1);
+ memcpy (alloc, name, suf - name);
+ alloc[suf - name] = '\0';
+ name = alloc;
+ }
- /* Now put back any stripped dots. */
- if (dots != 0)
+ 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 = strlen (res) + 1;
- char *add_dots = xmalloc (len + dots);
+ size_t len;
+ size_t suf_len;
+ char *final;
+
+ if (alloc != NULL)
+ free (alloc);
- memcpy (add_dots, name, dots);
- memcpy (add_dots + dots, res, len);
+ 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 = add_dots;
+ res = final;
}
+
return res;
}
- return xstrdup (name);
+ if (alloc != NULL)
+ free (alloc);
+
+ return xstrdup (pre);
}
diff --git a/contrib/binutils/binutils/budemang.h b/contrib/binutils/binutils/budemang.h
index b837d718d122..17df9f55ea7a 100644
--- a/contrib/binutils/binutils/budemang.h
+++ b/contrib/binutils/binutils/budemang.h
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef BUDEMANG_H
#define BUDEMANG_H
diff --git a/contrib/binutils/binutils/coffdump.c b/contrib/binutils/binutils/coffdump.c
index 039b95536219..5ec23b43f62d 100644
--- a/contrib/binutils/binutils/coffdump.c
+++ b/contrib/binutils/binutils/coffdump.c
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Steve Chamberlain <sac@cygnus.com>
@@ -38,11 +38,9 @@ static void dump_coff_lines (struct coff_line *);
static void dump_coff_type (struct coff_type *);
static void dump_coff_where (struct coff_where *);
static void dump_coff_visible (struct coff_visible *);
-extern void dump_coff_symbol (struct coff_symbol *);
static void dump_coff_scope (struct coff_scope *);
static void dump_coff_sfile (struct coff_sfile *);
static void dump_coff_section (struct coff_section *);
-extern void coff_dump (struct coff_ofile *);
static void show_usage (FILE *, int);
extern int main (int, char **);
@@ -325,7 +323,7 @@ dump_coff_visible (struct coff_visible *p)
tab (-1);
}
-void
+static void
dump_coff_symbol (struct coff_symbol *p)
{
tab (1);
@@ -436,7 +434,7 @@ dump_coff_section (struct coff_section *ptr)
tab (-1);
}
-void
+static void
coff_dump (struct coff_ofile *ptr)
{
int i;
@@ -459,6 +457,7 @@ show_usage (FILE *file, int status)
fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name);
fprintf (file, _(" Print a human readable interpretation of a SYSROFF object file\n"));
fprintf (file, _(" The options are:\n\
+ @<file> Read options from <file>\n\
-h --help Display this information\n\
-v --version Display the program's version\n\
\n"));
@@ -496,6 +495,8 @@ main (int ac, char **av)
program_name = av[0];
xmalloc_set_program_name (program_name);
+ expandargv (&ac, &av);
+
while ((opt = getopt_long (ac, av, "HhVv", long_options,
(int *) NULL))
!= EOF)
diff --git a/contrib/binutils/binutils/coffgrok.c b/contrib/binutils/binutils/coffgrok.c
index b2ec98c4bd8a..a6c05b14d2ab 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
+ Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Steve Chamberlain (sac@cygnus.com)
@@ -33,16 +33,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/internal.h"
#include "../bfd/libcoff.h"
#include "coffgrok.h"
-int lofile = 1;
+static int lofile = 1;
static struct coff_scope *top_scope;
static struct coff_scope *file_scope;
static struct coff_ofile *ofile;
-struct coff_symbol *last_function_symbol;
-struct coff_type *last_function_type;
-struct coff_type *last_struct;
-struct coff_type *last_enum;
-struct coff_sfile *cur_sfile;
+static struct coff_symbol *last_function_symbol;
+static struct coff_type *last_function_type;
+static struct coff_type *last_struct;
+static struct coff_type *last_enum;
+static struct coff_sfile *cur_sfile;
static struct coff_symbol **tindex;
@@ -156,7 +156,7 @@ do_sections_p1 (struct coff_ofile *head)
if (strcmp (section->name, ".bss") == 0)
head->sections[i].data = 1;
head->sections[i].address = section->lma;
- head->sections[i].size = section->_raw_size;
+ head->sections[i].size = bfd_get_section_size (section);
head->sections[i].number = idx;
head->sections[i].nrelocs = section->reloc_count;
head->sections[i].relocs =
diff --git a/contrib/binutils/binutils/coffgrok.h b/contrib/binutils/binutils/coffgrok.h
index c063f1dc77aa..e6d0077ad3f5 100644
--- a/contrib/binutils/binutils/coffgrok.h
+++ b/contrib/binutils/binutils/coffgrok.h
@@ -1,5 +1,5 @@
/* coffgrok.h
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define T_NULL 0
#define T_VOID 1 /* function argument (only used by compiler) */
diff --git a/contrib/binutils/binutils/config.in b/contrib/binutils/binutils/config.in
index f2bd04955892..93d8e9528379 100644
--- a/contrib/binutils/binutils/config.in
+++ b/contrib/binutils/binutils/config.in
@@ -1,204 +1,267 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
-/* Define to empty if the keyword does not work. */
-#undef const
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
+/* Suffix used for executables, if any. */
+#undef EXECUTABLE_SUFFIX
-/* Define if you have alloca, as a function or macro. */
+/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
#undef HAVE_ALLOCA_H
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Define to 1 if you have the declaration of `environ', and to 0 if you
+ don't. */
+#undef HAVE_DECL_ENVIRON
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define to 1 if you have the declaration of `fprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_FPRINTF
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+ don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
-/* 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 declaration of `getenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_GETENV
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Is the prototype for getopt in <unistd.h> in the expected format? */
+#undef HAVE_DECL_GETOPT
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#undef YYTEXT_POINTER
+/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
+ */
+#undef HAVE_DECL_SBRK
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_SNPRINTF
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
+ */
+#undef HAVE_DECL_STPCPY
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
+ */
+#undef HAVE_DECL_STRSTR
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_VSNPRINTF
-/* Define if you have the getc_unlocked function. */
-#undef HAVE_GETC_UNLOCKED
+/* Does the platform use an executable suffix? */
+#undef HAVE_EXECUTABLE_SUFFIX
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
-/* Define if you have the getcwd function. */
+/* Is fopen64 available? */
+#undef HAVE_FOPEN64
+
+/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD
-/* Define if you have the getpagesize function. */
+/* 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 if you have the munmap function. */
+/* 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 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 if you have the putenv function. */
+/* 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 if you have the sbrk function. */
+/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
-/* Define if you have the setenv function. */
+/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
-/* Define if you have the setlocale function. */
+/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
-/* Define if you have the setmode function. */
+/* Define to 1 if you have the `setmode' function. */
#undef HAVE_SETMODE
-/* Define if you have the stpcpy function. */
+/* Is stat64 available? */
+#undef HAVE_STAT64
+
+/* 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 if you have the strcasecmp function. */
+/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
-/* Define if you have the strchr function. */
+/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
-/* Define if you have the strcoll function. */
+/* Define to 1 if you have the `strcoll' function. */
#undef HAVE_STRCOLL
-/* Define if you have the utimes function. */
-#undef HAVE_UTIMES
-
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
-/* Define if you have the <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_H
+/* Is the type time_t defined in <time.h>? */
+#undef HAVE_TIME_T_IN_TIME_H
-/* Define if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
+/* Is the type time_t defined in <sys/types.h>? */
+#undef HAVE_TIME_T_IN_TYPES_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <values.h> header file. */
+/* 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
-/* Name of package */
-#undef PACKAGE
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
-/* Version number of package */
-#undef VERSION
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Name of package */
+#undef PACKAGE
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/* Does the platform use an executable suffix? */
-#undef HAVE_EXECUTABLE_SUFFIX
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
-/* Suffix used for executables, if any. */
-#undef EXECUTABLE_SUFFIX
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
-/* Is fopen64 available? */
-#undef HAVE_FOPEN64
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
-/* Enable LFS */
-#undef _LARGEFILE64_SOURCE
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
-/* Is the type time_t defined in <time.h>? */
-#undef HAVE_TIME_T_IN_TIME_H
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
-/* Is the type time_t defined in <sys/types.h>? */
-#undef HAVE_TIME_T_IN_TYPES_H
+/* Configured target name. */
+#undef TARGET
-/* Does <utime.h> define struct utimbuf? */
-#undef HAVE_GOOD_UTIME_H
+/* Define to 1 if user symbol names have a leading underscore, 0 if not. */
+#undef TARGET_PREPENDS_UNDERSCORE
-/* Define if fprintf is not declared in system header files. */
-#undef NEED_DECLARATION_FPRINTF
+/* Use b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
-/* Define if strstr is not declared in system header files. */
-#undef NEED_DECLARATION_STRSTR
+/* Version number of package */
+#undef VERSION
-/* Define if sbrk is not declared in system header files. */
-#undef NEED_DECLARATION_SBRK
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#undef YYTEXT_POINTER
-/* Define if getenv is not declared in system header files. */
-#undef NEED_DECLARATION_GETENV
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
-/* Define if environ is not declared in system header files. */
-#undef NEED_DECLARATION_ENVIRON
+/* Enable LFS */
+#undef _LARGEFILE64_SOURCE
-/* Use b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
-/* Configured target name. */
-#undef TARGET
+/* 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 1 if user symbol names have a leading underscore, 0 if not. */
-#undef TARGET_PREPENDS_UNDERSCORE
+/* 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 8210910ac900..2d8e0cb970cd 100755
--- a/contrib/binutils/binutils/configure
+++ b/contrib/binutils/binutils/configure
@@ -1,51 +1,325 @@
#! /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
+}
+
-# Defaults:
-ac_help=
+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
+
+
+# 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-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-ac_help="$ac_help
- --enable-targets alternative target configurations"
-ac_help="$ac_help
- --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
-ac_help="$ac_help
- --enable-build-warnings Enable build-time compiler warnings if gcc is used"
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
+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="ar.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# 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_files=''
# 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
@@ -53,12 +327,16 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
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'
@@ -72,17 +350,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"
@@ -90,59 +360,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- \
@@ -151,96 +421,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
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$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 \
@@ -249,19 +470,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 \
@@ -275,26 +496,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 \
@@ -311,7 +532,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)
@@ -321,7 +542,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 \
@@ -332,63 +553,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-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
+ 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.
@@ -399,99 +614,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
+
+# 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
-# 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
+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=ar.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ 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=..
@@ -501,123 +727,596 @@ 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; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(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_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+#
+# 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]
+ --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
+ --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
+ --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
+
+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
+
+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>
+ CPP C preprocessor
+
+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
+
+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
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ 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
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- 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
+
+
+
+
+
+
+
+
+
+
+
+
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:561: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 566 "configure"
-#include "confdefs.h"
-int main() {
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:594: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 599 "configure"
-#include "confdefs.h"
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
ac_aux_dir=
@@ -630,149 +1329,1163 @@ 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/'`
+
+
+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
+ 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/'`
-# 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; } ;;
-esac
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+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
-# 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
+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
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:671: checking host system type" >&5
+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
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
-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:692: 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
+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
-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:710: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+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
-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
+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
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+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
- echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:734: checking for strerror in -lcposix" >&5
-ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
- ac_save_LIBS="$LIBS"
-LIBS="-lcposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 742 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror();
+ 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
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+if 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ 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); }
+
+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
+ 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 "$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 -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+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
+ 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.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
+ 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
+
+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
+ 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
+
+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*
-LIBS="$ac_save_LIBS"
+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
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lcposix"
+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
+
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ 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_search_strerror="none required"
+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 "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ 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_search_strerror="-l$ac_lib"
+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_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
+fi
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
+am__api_version="1.9"
# 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:
@@ -780,233 +2493,585 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# 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:789: 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
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ 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 build environment is sane""... $ac_c" 1>&6
-echo "configure:842: checking whether build environment is sane" >&5
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
fi
- test "$2" = conftestfile
+ test "$2" = conftest.file
)
then
# Ok.
:
else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
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
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+for ac_prog in gawk mawk nawk awk
+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_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:899: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
else
- cat > conftestmake <<\EOF
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
-rm -f conftestmake
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
+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
+
+DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
-PACKAGE=binutils
-VERSION=${BFD_VERSION}
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
fi
-cat >> confdefs.h <<EOF
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=binutils
+ VERSION=${BFD_VERSION}
+
+
+cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
-EOF
+_ACEOF
+
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
-EOF
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:945: checking for working aclocal" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
- echo "$ac_t""found" 1>&6
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ 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
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$ac_t""missing" 1>&6
+ 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
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:958: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
+ 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
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:971: checking for working automake" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
- echo "$ac_t""found" 1>&6
+ STRIP=$ac_ct_STRIP
else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$ac_t""missing" 1>&6
+ STRIP="$ac_cv_prog_STRIP"
fi
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:984: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
fi
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:997: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
fi
+
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
@@ -1028,8 +3093,7 @@ no) enable_shared=no ;;
esac
else
enable_shared=yes
-fi
-
+fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
enableval="$enable_static"
@@ -1051,8 +3115,7 @@ no) enable_static=no ;;
esac
else
enable_static=yes
-fi
-
+fi;
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
@@ -1074,229 +3137,7 @@ no) enable_fast_install=no ;;
esac
else
enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1083: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1113: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1164: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1207 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1243: 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:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1271: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
+fi;
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
@@ -1304,13 +3145,12 @@ if test "${with_gnu_ld+set}" = set; then
test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi
-
+fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1314: checking for ld used by GCC" >&5
+ 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
@@ -1339,14 +3179,14 @@ echo "configure:1314: checking for ld used by GCC" >&5
;;
esac
elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1344: checking for GNU ld" >&5
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1347: checking for non-GNU ld" >&5
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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-:}"
@@ -1372,15 +3212,19 @@ fi
LD="$lt_cv_path_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
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1382: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
@@ -1389,27 +3233,27 @@ else
lt_cv_prog_gnu_ld=no
fi
fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+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 $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1399: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+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 $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1411: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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.
@@ -1442,33 +3286,24 @@ fi
fi
NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
+echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1449: 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
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1470: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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=
@@ -1505,6 +3340,7 @@ cygwin* | mingw* |pw32*)
;;
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
@@ -1515,9 +3351,10 @@ darwin* | rhapsody*)
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -1575,17 +3412,10 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case $host_cpu in
- alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+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
@@ -1633,84 +3463,85 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+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
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1643: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1669: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
+# 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
+ ;;
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
+ 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;
+ ;;
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
+ 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
- ac_tool_prefix=
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
fi
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1712: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
/*)
@@ -1762,17 +3593,19 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1774: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
/*)
@@ -1824,9 +3657,11 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
else
@@ -1838,138 +3673,164 @@ fi
;;
esac
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1845: 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="${ac_tool_prefix}ranlib"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1877: 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_ac_ct_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.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1912: 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="${ac_tool_prefix}strip"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1944: 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_ac_ct_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.
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+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
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ STRIP=$ac_ct_STRIP
else
- STRIP=":"
-fi
+ STRIP="$ac_cv_prog_STRIP"
fi
@@ -1985,20 +3846,19 @@ 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
+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
-
+fi;
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
@@ -2007,8 +3867,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2011 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ 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*)
@@ -2041,7 +3905,11 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ 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"
@@ -2054,51 +3922,124 @@ ia64-*-hpux*)
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 $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2063: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
-# 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_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 <<EOF
-#line 2076 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
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_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 "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+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"
@@ -2110,54 +4051,61 @@ esac
# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
+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
-
# 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" \
@@ -2167,15 +4115,26 @@ 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 "configure: error: libtool configure failed" 1>&2; exit 1; }
+|| { { 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
- 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
@@ -2189,274 +4148,554 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# 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 "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ 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.
+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 "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
+ *) { { 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
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
+fi;
+
+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 "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
+ { { 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 "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
+ { { 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
-# Extract the first word of "gcc", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2256: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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:2286: 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:2337: 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
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2369: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2380 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:2411: 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
+ test -n "$ac_ct_CC" && break
+done
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2416: 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;
+ 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
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+ ;
+ 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. */
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
+int
+main ()
+{
-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:2444: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ;
+ 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"
@@ -2470,371 +4709,997 @@ 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;
+}
-
-for ac_prog in 'bison -y' byacc
+/* 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
-# 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:2481: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$YACC"; then
- ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- 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"
-fi
-fi
-YACC="$ac_cv_prog_YACC"
-if test -n "$YACC"; then
- echo "$ac_t""$YACC" 1>&6
+ 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 "$ac_t""no" 1>&6
-fi
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-test -n "$YACC" && break
+fi
+rm -f conftest.err conftest.$ac_objext
done
-test -n "$YACC" || YACC="yacc"
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2512: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 2527 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 2544 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 2561 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2567: \"$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
+
+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 "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
fi
-rm -f conftest*
+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*
- ac_cv_prog_CPP="$CPP"
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
fi
- CPP="$ac_cv_prog_CPP"
+
else
- ac_cv_prog_CPP="$CPP"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-echo "$ac_t""$CPP" 1>&6
+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
-missing_dir=`cd $ac_aux_dir && pwd`
-for ac_prog in flex lex
+
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+
+
+for ac_prog in 'bison -y' byacc
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:2597: 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_YACC+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 "$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_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_YACC="$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"
-if test -n "$LEX"; then
- echo "$ac_t""$LEX" 1>&6
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+ 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 "$LEX" && break
+ test -n "$YACC" && break
done
-test -n "$LEX" || LEX="$missing_dir/missing flex"
+test -n "$YACC" || YACC="yacc"
-# Extract the first word of "flex", so it can be a program name with args.
-set dummy flex; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2630: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
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="flex"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
+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
+done
+test -n "$LEX" || LEX=":"
+
if test -z "$LEXLIB"
then
- case "$LEX" in
- flex*) ac_lib=fl ;;
- *) ac_lib=l ;;
- esac
- echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:2664: checking for yywrap in -l$ac_lib" >&5
-ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-l$ac_lib $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2672 "configure"
-#include "confdefs.h"
+ 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="-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; }
-EOF
-if { (eval echo configure:2683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LEXLIB="-l$ac_lib"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
+ 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_fl_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+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_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
+ 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. */
-echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:2706: checking lex output file root" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+/* 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
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+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: $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
+
+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
+ 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.
-echo '%%
-%%' | $LEX
+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 "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
+ { { 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
fi
-
-echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
+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
-echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:2727: checking whether yytext is a pointer" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
# 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"
+ac_save_LIBS=$LIBS
LIBS="$LIBS $LEXLIB"
-cat > conftest.$ac_ext <<EOF
-#line 2739 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
`cat $LEX_OUTPUT_ROOT.c`
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+_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
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+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 "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define YYTEXT_POINTER 1
-EOF
+_ACEOF
fi
+fi
+if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+fi
-ALL_LINGUAS="fr tr ja es sv da zh_CN ru"
-# 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:2772: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
+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="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+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"
+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 "$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
+
+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
- echo "$ac_t""no" 1>&6
+ 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
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2800: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ # 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
- cat > conftest.$ac_ext <<EOF
-#line 2805 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2813: \"$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*
+
+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 "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest*
+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 <<EOF
-#line 2830 "configure"
-#include "confdefs.h"
+ 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>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2843,16 +5708,19 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2848 "configure"
-#include "confdefs.h"
+ 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>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2861,269 +5729,530 @@ 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
+ if test "$cross_compiling" = yes; then
:
else
- cat > conftest.$ac_ext <<EOF
-#line 2869 "configure"
-#include "confdefs.h"
+ 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>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#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
-EOF
-if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
+ 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 -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2904: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2909 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
+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. */
-; return 0; }
-EOF
-if { (eval echo configure:2958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+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 <<\EOF
-#define const
-EOF
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
fi
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2979: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 2986 "configure"
-#include "confdefs.h"
+ 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
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+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
+
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
+ *)
+ 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
+_ACEOF
+ ;;
esac
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3019: checking for off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+# 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 <<EOF
-#line 3024 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ 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
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
+ 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 "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3052: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3057 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ 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
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
+ 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 "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3087: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3092 "configure"
-#include "confdefs.h"
+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 = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:3099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3120: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3125 "configure"
-#include "confdefs.h"
-
+ 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
@@ -3145,137 +6274,217 @@ char *alloca ();
# endif
#endif
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
fi
-rm -f conftest*
+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
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
-if test $ac_cv_func_alloca_works = no; then
+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 <<\EOF
+# 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
-EOF
+_ACEOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3185: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3190 "configure"
-#include "confdefs.h"
+ 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
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
- rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+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
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3215: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3220 "configure"
-#include "confdefs.h"
+ 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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
+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
-EOF
+_ACEOF
- break
-else
- echo "$ac_t""no" 1>&6
+ break
fi
-done
+ done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3270: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3278 "configure"
-#include "confdefs.h"
+ 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;
@@ -3288,138 +6497,316 @@ find_stack_direction ()
else
return (&dummy > addr) ? 1 : -1;
}
+
+int
main ()
{
- exit (find_stack_direction() < 0);
+ exit (find_stack_direction () < 0);
}
-EOF
-if { (eval echo configure:3297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ 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 -fr conftest*
+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
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
fi
-for ac_hdr in unistd.h
+
+
+for ac_header in stdlib.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3322: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3327 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3332: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3361: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3366 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3414: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3422 "configure"
-#include "confdefs.h"
+ 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:
@@ -3433,34 +6820,34 @@ else
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
+ 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
- propogated back to all the places they're supposed to be.
+ 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 <sys/types.h>
+
#include <fcntl.h>
#include <sys/mman.h>
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+#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. */
-# ifndef 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 */
-# ifdef HAVE_SYS_PARAM_H
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
@@ -3487,469 +6874,910 @@ else
#endif /* no HAVE_GETPAGESIZE */
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
-main()
+main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
+ 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);
}
-
-EOF
-if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ 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 -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
fi
+rm -f conftest.mmap
+
+
+
+
+
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+
+
+
+
+
+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
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3590: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3595 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3600: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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 \
+
+
+
+
+
+
+
+
+
+
+for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3630: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3635 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
if test "${ac_cv_func_stpcpy+set}" != "set"; then
- for ac_func in stpcpy
+
+for ac_func in stpcpy
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3687: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3692 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STPCPY 1
-EOF
+_ACEOF
fi
if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3749: checking for LC_MESSAGES" >&5
-if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3754 "configure"
-#include "confdefs.h"
+ 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() {
+int
+main ()
+{
return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LC_MESSAGES 1
-EOF
+_ACEOF
fi
fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3782: 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.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
USE_NLS=$enableval
else
USE_NLS=yes
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
- echo "$ac_t""$USE_NLS" 1>&6
-
USE_INCLUDED_LIBINTL=no
if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
+ echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
+echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3802: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
+# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
nls_cv_force_use_gnu_gettext=$withval
else
nls_cv_force_use_gnu_gettext=no
-fi
-
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+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=NONE
-
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3821: checking for libintl.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3826 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3831: \"$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"
+_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
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3848: checking for gettext in libc" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3853 "configure"
-#include "confdefs.h"
+ 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() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libc=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+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 $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3876: checking for bindtextdomain in -lintl" >&5
-ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3884 "configure"
-#include "confdefs.h"
+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; }
-EOF
-if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3911: checking for gettext in libintl" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3916 "configure"
-#include "confdefs.h"
+ 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
+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() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libintl=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
- echo "$ac_t""no" 1>&6
+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
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GETTEXT 1
-EOF
+_ACEOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3951: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+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_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -3973,108 +7801,161 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
+
+for ac_func in dcgettext
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3985: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3990 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4040: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+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_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ 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"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4076: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+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_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4098,44 +7979,75 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- cat > conftest.$ac_ext <<EOF
-#line 4108 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:4116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CATOBJEXT=.mo
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CATOBJEXT=.mo
DATADIRNAME=lib
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
INSTOBJEXT=.mo
fi
fi
-
-else
- echo "$ac_t""no" 1>&6
+
fi
-
- if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
+
+
+ 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
@@ -4143,10 +8055,10 @@ fi
INTLOBJS="\$(GETTOBJS)"
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4148: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+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_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -4170,53 +8082,59 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4182: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+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_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ 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"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4218: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+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_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4240,12 +8158,14 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
@@ -4261,7 +8181,8 @@ fi
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
- echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
@@ -4286,25 +8207,32 @@ fi
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 $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4308: checking for catalogs to be installed" >&5
+ 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
@@ -4312,7 +8240,8 @@ echo "configure:4308: checking for catalogs to be installed" >&5
esac
done
LINGUAS=$NEW_LINGUAS
- echo "$ac_t""$LINGUAS" 1>&6
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
fi
if test -n "$LINGUAS"; then
@@ -4326,45 +8255,155 @@ echo "configure:4308: checking for catalogs to be installed" >&5
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
-
+
if test -f $srcdir/po2tbl.sed.in; then
if test "$CATOBJEXT" = ".cat"; then
- ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4336: checking for linux/version.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4341 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4346: \"$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"
+_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=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+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: 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
- echo "$ac_t""no" 1>&6
-msgformat=xopen
+ msgformat=xopen
fi
+
sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
fi
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
@@ -4378,14 +8417,14 @@ fi
GT_NO=
GT_YES="#YES#"
fi
-
-
+
+
MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
+
l=
-
+
if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
@@ -4402,20 +8441,20 @@ fi
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
fi
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4409: 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
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
@@ -4424,51 +8463,22 @@ else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
+
MAINT=$MAINTAINER_MODE_TRUE
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4434: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
if test -n "$EXEEXT"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_EXECUTABLE_SUFFIX 1
-EOF
+_ACEOF
fi
-cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define EXECUTABLE_SUFFIX "${EXEEXT}"
-EOF
+_ACEOF
# host-specific stuff:
@@ -4480,34 +8490,84 @@ HDEFINES=
AR=${AR-ar}
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4487: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+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"
+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 "$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
- echo "$ac_t""no" 1>&6
+ 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
# Find a good install program. We prefer a C program (faster),
@@ -4517,60 +8577,75 @@ fi
# 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:4526: 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
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ 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'
@@ -4588,10 +8663,10 @@ fi
if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
- echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4593: checking for build system executable suffix" >&5
-if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for build system executable suffix" >&5
+echo $ECHO_N "checking for build system executable suffix... $ECHO_C" >&6
+if test "${bfd_cv_build_exeext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.c
@@ -4606,8 +8681,8 @@ else
rm -f conftest*
test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
fi
-
-echo "$ac_t""$bfd_cv_build_exeext" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_build_exeext" >&5
+echo "${ECHO_T}$bfd_cv_build_exeext" >&6
EXEEXT_FOR_BUILD=""
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
@@ -4620,132 +8695,307 @@ case "${host}" in
esac
-for ac_hdr 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
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4628: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4633 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4638: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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
-echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:4665: checking for sys/wait.h that is POSIX.1 compatible" >&5
-if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4670 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_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 <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
-#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
-#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
-int main() {
-int s;
-wait (&s);
-s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-; return 0; }
-EOF
-if { (eval echo configure:4686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+
+int
+main ()
+{
+ int s;
+ wait (&s);
+ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+ ;
+ 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_sys_wait_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_sys_wait_h=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_sys_wait_h=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
if test $ac_cv_header_sys_wait_h = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_WAIT_H 1
-EOF
+_ACEOF
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:4709: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4714 "configure"
-#include "confdefs.h"
+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 = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:4721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:4742: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 4747 "configure"
-#include "confdefs.h"
-
+ 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
@@ -4767,137 +9017,217 @@ char *alloca ();
# endif
#endif
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
fi
-rm -f conftest*
+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
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
-if test $ac_cv_func_alloca_works = no; then
+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 <<\EOF
+# 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
-EOF
+_ACEOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4807: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 4812 "configure"
-#include "confdefs.h"
+ 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
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
- rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+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
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4837: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4842 "configure"
-#include "confdefs.h"
+ 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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
+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
-EOF
+_ACEOF
- break
-else
- echo "$ac_t""no" 1>&6
+ break
fi
-done
+ done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4892: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 4900 "configure"
-#include "confdefs.h"
+ 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;
@@ -4910,560 +9240,1407 @@ find_stack_direction ()
else
return (&dummy > addr) ? 1 : -1;
}
+
+int
main ()
{
- exit (find_stack_direction() < 0);
+ exit (find_stack_direction () < 0);
}
-EOF
-if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ 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 -fr conftest*
+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
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
fi
+
+
+
+
+
for ac_func in sbrk utimes setmode getc_unlocked strcoll
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4943: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4948 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
# needs to be defined for it
-echo $ac_n "checking for fopen64""... $ac_c" 1>&6
-echo "configure:4999: checking for fopen64" >&5
-if eval "test \"`echo '$''{'bu_cv_have_fopen64'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5004 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for fopen64" >&5
+echo $ECHO_N "checking for fopen64... $ECHO_C" >&6
+if test "${bu_cv_have_fopen64+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 <stdio.h>
-int main() {
+int
+main ()
+{
FILE *f = fopen64 ("/tmp/foo","r");
-; return 0; }
-EOF
-if { (eval echo configure:5011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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
bu_cv_have_fopen64=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- saved_CPPFLAGS=$CPPFLAGS
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+saved_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
- cat > conftest.$ac_ext <<EOF
-#line 5021 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
-int main() {
+int
+main ()
+{
FILE *f = fopen64 ("/tmp/foo","r");
-; return 0; }
-EOF
-if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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
bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bu_cv_have_fopen64=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bu_cv_have_fopen64=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CPPFLAGS=$saved_CPPFLAGS
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-echo "$ac_t""$bu_cv_have_fopen64" 1>&6
+echo "$as_me:$LINENO: result: $bu_cv_have_fopen64" >&5
+echo "${ECHO_T}$bu_cv_have_fopen64" >&6
if test "$bu_cv_have_fopen64" != no; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_FOPEN64 1
-EOF
+_ACEOF
+
+fi
+echo "$as_me:$LINENO: checking for stat64" >&5
+echo $ECHO_N "checking for stat64... $ECHO_C" >&6
+if test "${bu_cv_have_stat64+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/stat.h>
+int
+main ()
+{
+struct stat64 st; stat64 ("/tmp/foo", &st);
+ ;
+ 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
+ bu_cv_have_stat64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+saved_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 st; stat64 ("/tmp/foo", &st);
+ ;
+ 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
+ bu_cv_have_stat64="need -D_LARGEFILE64_SOURCE"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bu_cv_have_stat64=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CPPFLAGS=$saved_CPPFLAGS
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
- if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE"; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:$LINENO: result: $bu_cv_have_stat64" >&5
+echo "${ECHO_T}$bu_cv_have_stat64" >&6
+if test "$bu_cv_have_stat64" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STAT64 1
+_ACEOF
+
+fi
+if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE" \
+ || test "$bu_cv_have_stat64" = "need -D_LARGEFILE64_SOURCE"; then
+
+cat >>confdefs.h <<\_ACEOF
#define _LARGEFILE64_SOURCE 1
-EOF
+_ACEOF
- fi
+ CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
fi
# Some systems have frexp only in -lm, not in -lc.
+echo "$as_me:$LINENO: checking for library containing frexp" >&5
+echo $ECHO_N "checking for library containing frexp... $ECHO_C" >&6
+if test "${ac_cv_search_frexp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_frexp=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
-echo "configure:5060: checking for library containing frexp" >&5
-if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_frexp="no"
-cat > conftest.$ac_ext <<EOF
-#line 5067 "configure"
-#include "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 frexp();
-
-int main() {
-frexp()
-; return 0; }
-EOF
-if { (eval echo configure:5078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ builtin and then its argument prototype would still apply. */
+char frexp ();
+int
+main ()
+{
+frexp ();
+ ;
+ 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_search_frexp="none required"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-test "$ac_cv_search_frexp" = "no" && for i in m; do
-LIBS="-l$i $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5089 "configure"
-#include "confdefs.h"
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_frexp" = no; then
+ for ac_lib in m; do
+ LIBS="-l$ac_lib $ac_func_search_save_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 frexp();
-
-int main() {
-frexp()
-; return 0; }
-EOF
-if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_frexp="-l$i"
+ builtin and then its argument prototype would still apply. */
+char frexp ();
+int
+main ()
+{
+frexp ();
+ ;
+ 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_search_frexp="-l$ac_lib"
break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
fi
-
-echo "$ac_t""$ac_cv_search_frexp" 1>&6
-if test "$ac_cv_search_frexp" != "no"; then
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_frexp" >&5
+echo "${ECHO_T}$ac_cv_search_frexp" >&6
+if test "$ac_cv_search_frexp" != no; then
test "$ac_cv_search_frexp" = "none required" || LIBS="$ac_cv_search_frexp $LIBS"
-
-else :
-
+
fi
-echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
-echo "configure:5122: checking for time_t in time.h" >&5
-if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for time_t in time.h" >&5
+echo $ECHO_N "checking for time_t in time.h... $ECHO_C" >&6
+if test "${bu_cv_decl_time_t_time_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5127 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <time.h>
-int main() {
+int
+main ()
+{
time_t i;
-; return 0; }
-EOF
-if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bu_cv_decl_time_t_time_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bu_cv_decl_time_t_time_h=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bu_cv_decl_time_t_time_h=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
+echo "$as_me:$LINENO: result: $bu_cv_decl_time_t_time_h" >&5
+echo "${ECHO_T}$bu_cv_decl_time_t_time_h" >&6
if test $bu_cv_decl_time_t_time_h = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_TIME_T_IN_TIME_H 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5155: checking for time_t in sys/types.h" >&5
-if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for time_t in sys/types.h" >&5
+echo $ECHO_N "checking for time_t in sys/types.h... $ECHO_C" >&6
+if test "${bu_cv_decl_time_t_types_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5160 "configure"
-#include "confdefs.h"
+ 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>
-int main() {
+int
+main ()
+{
time_t i;
-; return 0; }
-EOF
-if { (eval echo configure:5167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bu_cv_decl_time_t_types_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bu_cv_decl_time_t_types_h=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bu_cv_decl_time_t_types_h=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
+echo "$as_me:$LINENO: result: $bu_cv_decl_time_t_types_h" >&5
+echo "${ECHO_T}$bu_cv_decl_time_t_types_h" >&6
if test $bu_cv_decl_time_t_types_h = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_TIME_T_IN_TYPES_H 1
-EOF
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for a known getopt prototype in unistd.h" >&5
+echo $ECHO_N "checking for a known getopt prototype in unistd.h... $ECHO_C" >&6
+if test "${bu_cv_decl_getopt_unistd_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 <unistd.h>
+int
+main ()
+{
+extern int getopt (int, char *const*, const char *);
+ ;
+ 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
+ bu_cv_decl_getopt_unistd_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bu_cv_decl_getopt_unistd_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: result: $bu_cv_decl_getopt_unistd_h" >&5
+echo "${ECHO_T}$bu_cv_decl_getopt_unistd_h" >&6
+if test $bu_cv_decl_getopt_unistd_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DECL_GETOPT 1
+_ACEOF
fi
# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
# by default.
-echo $ac_n "checking for utime.h""... $ac_c" 1>&6
-echo "configure:5190: checking for utime.h" >&5
-if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5195 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking for utime.h" >&5
+echo $ECHO_N "checking for utime.h... $ECHO_C" >&6
+if test "${bu_cv_header_utime_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 <sys/types.h>
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include <utime.h>
-int main() {
+int
+main ()
+{
struct utimbuf s;
-; return 0; }
-EOF
-if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
bu_cv_header_utime_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bu_cv_header_utime_h=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bu_cv_header_utime_h=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$bu_cv_header_utime_h" 1>&6
+echo "$as_me:$LINENO: result: $bu_cv_header_utime_h" >&5
+echo "${ECHO_T}$bu_cv_header_utime_h" >&6
if test $bu_cv_header_utime_h = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GOOD_UTIME_H 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
-echo "configure:5227: checking whether fprintf must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether fprintf is declared" >&5
+echo $ECHO_N "checking whether fprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fprintf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5232 "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+ 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 ()
+{
+#ifndef fprintf
+ char *p = (char *) fprintf;
#endif
-int main() {
-char *(*pfn) = (char *(*)) fprintf
-; return 0; }
-EOF
-if { (eval echo configure:5253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_fprintf=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_fprintf=yes
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
-if test $bfd_cv_decl_needed_fprintf = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_FPRINTF 1
-EOF
-
-fi
-
-echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:5274: checking whether strstr must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5279 "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+ ;
+ 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_have_decl_fprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fprintf" >&6
+if test $ac_cv_have_decl_fprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPRINTF 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether stpcpy is declared" >&5
+echo $ECHO_N "checking whether stpcpy is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_stpcpy+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 ()
+{
+#ifndef stpcpy
+ char *p = (char *) stpcpy;
#endif
-int main() {
-char *(*pfn) = (char *(*)) strstr
-; return 0; }
-EOF
-if { (eval echo configure:5300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_strstr=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_strstr=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
-if test $bfd_cv_decl_needed_strstr = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRSTR 1
-EOF
-
-fi
-echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:5321: checking whether sbrk must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5326 "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
+ ac_cv_have_decl_stpcpy=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_stpcpy=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_stpcpy" >&5
+echo "${ECHO_T}$ac_cv_have_decl_stpcpy" >&6
+if test $ac_cv_have_decl_stpcpy = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STPCPY 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STPCPY 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether strstr is declared" >&5
+echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strstr+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 ()
+{
+#ifndef strstr
+ char *p = (char *) strstr;
+#endif
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.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
+ ac_cv_have_decl_strstr=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_strstr=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
+if test $ac_cv_have_decl_strstr = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether sbrk is declared" >&5
+echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_sbrk+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 ()
+{
+#ifndef sbrk
+ char *p = (char *) sbrk;
#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_have_decl_sbrk=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_sbrk=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5
+echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6
+if test $ac_cv_have_decl_sbrk = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether getenv is declared" >&5
+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getenv+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 ()
+{
+#ifndef getenv
+ char *p = (char *) getenv;
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.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
+ ac_cv_have_decl_getenv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getenv=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
+if test $ac_cv_have_decl_getenv = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether environ is declared" >&5
+echo $ECHO_N "checking whether environ is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_environ+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 ()
+{
+#ifndef environ
+ char *p = (char *) environ;
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.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
+ ac_cv_have_decl_environ=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_environ=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_environ" >&5
+echo "${ECHO_T}$ac_cv_have_decl_environ" >&6
+if test $ac_cv_have_decl_environ = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ENVIRON 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ENVIRON 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
+echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getc_unlocked+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 ()
+{
+#ifndef getc_unlocked
+ char *p = (char *) getc_unlocked;
#endif
-int main() {
-char *(*pfn) = (char *(*)) sbrk
-; return 0; }
-EOF
-if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_sbrk=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_sbrk=yes
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
-if test $bfd_cv_decl_needed_sbrk = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_SBRK 1
-EOF
+ ;
+ 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_have_decl_getc_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getc_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
+if test $ac_cv_have_decl_getc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
+echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_snprintf+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 ()
+{
+#ifndef snprintf
+ char *p = (char *) snprintf;
+#endif
-fi
+ ;
+ 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_have_decl_snprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_snprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
+if test $ac_cv_have_decl_snprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
+echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_vsnprintf+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 ()
+{
+#ifndef vsnprintf
+ char *p = (char *) vsnprintf;
+#endif
-echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5368: checking whether getenv must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ ;
+ 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_have_decl_vsnprintf=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 5373 "configure"
-#include "confdefs.h"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *(*pfn) = (char *(*)) getenv
-; return 0; }
-EOF
-if { (eval echo configure:5394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_getenv=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_getenv=yes
+ac_cv_have_decl_vsnprintf=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
+if test $ac_cv_have_decl_vsnprintf = yes; then
-echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
-if test $bfd_cv_decl_needed_getenv = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_GETENV 1
-EOF
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 1
+_ACEOF
-fi
-echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:5415: checking whether environ must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5420 "configure"
-#include "confdefs.h"
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 0
+_ACEOF
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *(*pfn) = (char *(*)) environ
-; return 0; }
-EOF
-if { (eval echo configure:5441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_environ=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_environ=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
-if test $bfd_cv_decl_needed_environ = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_ENVIRON 1
-EOF
fi
+
case "${host}" in
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_BINARY_FOPEN 1
-EOF
+_ACEOF
;;
esac
@@ -5503,7 +10680,7 @@ do
NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
else
case $targ in
- i[3-7]86*-*-netware*)
+ i[3-7]86*-*-netware*)
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
;;
@@ -5539,9 +10716,6 @@ do
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- arm*-* | xscale-* | strongarm-* | d10v-*)
- OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS"
- ;;
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)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
@@ -5581,12 +10755,6 @@ do
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
;;
- c4x-*-* | tic4x-*-*)
- OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=32"
- ;;
- ia64-*-*)
- OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=16"
- ;;
esac
fi
done
@@ -5605,9 +10773,10 @@ fi
-cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define TARGET "${target}"
-EOF
+_ACEOF
targ=$target
@@ -5617,12 +10786,13 @@ if test "x$targ_underscore" = "xyes"; then
else
UNDERSCORE=0
fi
-cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define TARGET_PREPENDS_UNDERSCORE $UNDERSCORE
-EOF
+_ACEOF
-# Emulation
+# Emulation
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
# Canonicalize the secondary target names.
@@ -5636,446 +10806,1490 @@ do
. ${srcdir}/configure.tgt
EMULATION=$targ_emul
- EMULATION_VECTOR=$targ_emul_vector
+ EMULATION_VECTOR=$targ_emul_vector
done
-trap '' 1 2 15
-cat > confcache <<\EOF
+# Required for html and install-html
+
+
+
+
+ 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
-# 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
-
DEFS=-DHAVE_CONFIG_H
-# 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
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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
+
+: ${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
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ 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
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile doc/Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+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%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@LN_S@%$LN_S%g
-s%@OBJEXT@%$OBJEXT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@RANLIB@%$RANLIB%g
-s%@STRIP@%$STRIP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@YACC@%$YACC%g
-s%@LEX@%$LEX%g
-s%@LEXLIB@%$LEXLIB%g
-s%@CPP@%$CPP%g
-s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@HDEFINES@%$HDEFINES%g
-s%@AR@%$AR%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
-s%@DEMANGLER_NAME@%$DEMANGLER_NAME%g
-s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
-s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
-s%@BUILD_SRCONV@%$BUILD_SRCONV%g
-s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
-s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
-s%@BUILD_WINDRES@%$BUILD_WINDRES%g
-s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g
-s%@BUILD_MISC@%$BUILD_MISC%g
-s%@OBJDUMP_DEFS@%$OBJDUMP_DEFS%g
-s%@EMULATION@%$EMULATION%g
-s%@EMULATION_VECTOR@%$EMULATION_VECTOR%g
-CEOF
-EOF
+# 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'`
+
-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
+# 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
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ 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
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ 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
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ 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
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+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)
+ 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
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_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
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile po/Makefile.in:po/Make-in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # 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" ;;
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_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" ;;
+ "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" ;;
+ "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;}
+ { (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
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+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
+}
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# Create a (secure) tmp directory for tmp files.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+{
+ 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,@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,@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,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+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,@LN_S@,$LN_S,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LIBTOOL@,$LIBTOOL,;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,@XGETTEXT@,$XGETTEXT,;t t
+s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;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,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@l@,$l,;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,@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,@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_DLLWRAP@,$BUILD_DLLWRAP,;t t
+s,@BUILD_MISC@,$BUILD_MISC,;t t
+s,@OBJDUMP_DEFS@,$OBJDUMP_DEFS,;t t
+s,@EMULATION@,$EMULATION,;t t
+s,@EMULATION_VECTOR@,$EMULATION_VECTOR,;t t
+s,@datarootdir@,$datarootdir,;t t
+s,@docdir@,$docdir,;t t
+s,@htmldir@,$htmldir,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_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
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ 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
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_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
+ - | *:- | *:-:* ) # 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
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # 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
+ 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=.
+
+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.
+ 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
+
- 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
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; 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
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # 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; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ 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; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # 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
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ 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
+ 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; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
fi
-fi; done
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`(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'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ 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
+ 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=.
+
+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.
+ 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
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$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 $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ 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 $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ default )
case "x$CONFIG_FILES" in
*) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
esac
+ ;;
+ esac
+done
+_ACEOF
-exit 0
-EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (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/binutils/configure.in b/contrib/binutils/binutils/configure.in
index 888908439833..10afc5374411 100644
--- a/contrib/binutils/binutils/configure.in
+++ b/contrib/binutils/binutils/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.13)
+AC_PREREQ(2.57)
AC_INIT(ar.c)
AC_CANONICAL_SYSTEM
@@ -29,27 +29,8 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-AC_ARG_ENABLE(build-warnings,
-[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
-[case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi])dnl
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
-fi
-AC_SUBST(WARN_CFLAGS)
-
+AM_BINUTILS_WARNINGS
+
AM_CONFIG_HEADER(config.h:config.in)
if test -z "$target" ; then
@@ -60,11 +41,12 @@ if test -z "$host" ; then
fi
AC_PROG_CC
+AC_GNU_SOURCE
AC_PROG_YACC
AM_PROG_LEX
-ALL_LINGUAS="fr tr ja es sv da zh_CN ru"
+ALL_LINGUAS="fr tr ja es sv da zh_CN ru ro rw zh_TW fi vi"
CY_GNU_GETTEXT
AM_MAINTAINER_MODE
@@ -118,10 +100,27 @@ AC_MSG_RESULT($bu_cv_have_fopen64)
if test "$bu_cv_have_fopen64" != no; then
AC_DEFINE([HAVE_FOPEN64], 1,
[Is fopen64 available?])
- if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE"; then
- AC_DEFINE([_LARGEFILE64_SOURCE], 1,
- [Enable LFS])
- fi
+fi
+AC_MSG_CHECKING([for stat64])
+AC_CACHE_VAL(bu_cv_have_stat64,
+[AC_TRY_LINK([#include <sys/stat.h>], [struct stat64 st; stat64 ("/tmp/foo", &st);],
+bu_cv_have_stat64=yes,
+[saved_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
+ AC_TRY_LINK([#include <sys/stat.h>], [struct stat64 st; stat64 ("/tmp/foo", &st);],
+bu_cv_have_stat64="need -D_LARGEFILE64_SOURCE",
+bu_cv_have_stat64=no)
+ CPPFLAGS=$saved_CPPFLAGS])])
+AC_MSG_RESULT($bu_cv_have_stat64)
+if test "$bu_cv_have_stat64" != no; then
+ AC_DEFINE([HAVE_STAT64], 1,
+ [Is stat64 available?])
+fi
+if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE" \
+ || test "$bu_cv_have_stat64" = "need -D_LARGEFILE64_SOURCE"; then
+ AC_DEFINE([_LARGEFILE64_SOURCE], 1,
+ [Enable LFS])
+ CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
fi
# Some systems have frexp only in -lm, not in -lc.
@@ -147,6 +146,16 @@ if test $bu_cv_decl_time_t_types_h = yes; then
[Is the type time_t defined in <sys/types.h>?])
fi
+AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
+AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h,
+[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
+bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)])
+AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h)
+if test $bu_cv_decl_getopt_unistd_h = yes; then
+ AC_DEFINE([HAVE_DECL_GETOPT], 1,
+ [Is the prototype for getopt in <unistd.h> in the expected format?])
+fi
+
# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
# by default.
AC_MSG_CHECKING([for utime.h])
@@ -163,11 +172,8 @@ if test $bu_cv_header_utime_h = yes; then
AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?])
fi
-BFD_NEED_DECLARATION(fprintf)
-BFD_NEED_DECLARATION(strstr)
-BFD_NEED_DECLARATION(sbrk)
-BFD_NEED_DECLARATION(getenv)
-BFD_NEED_DECLARATION(environ)
+AC_CHECK_DECLS([fprintf, stpcpy, strstr, sbrk, getenv, environ, getc_unlocked,
+ snprintf, vsnprintf])
BFD_BINARY_FOPEN
@@ -245,9 +251,6 @@ changequote([,])dnl
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
;;
- arm*-* | xscale-* | strongarm-* | d10v-*)
- OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS"
- ;;
changequote(,)dnl
i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
changequote([,])dnl
@@ -293,12 +296,6 @@ changequote([,])dnl
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
;;
- c4x-*-* | tic4x-*-*)
- OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=32"
- ;;
- ia64-*-*)
- OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=16"
- ;;
esac
fi
done
@@ -349,6 +346,11 @@ done
AC_SUBST(EMULATION)
AC_SUBST(EMULATION_VECTOR)
+# Required for html and install-html
+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
diff --git a/contrib/binutils/binutils/cxxfilt.c b/contrib/binutils/binutils/cxxfilt.c
index 1b297fd9da37..a8ec43ba1180 100644
--- a/contrib/binutils/binutils/cxxfilt.c
+++ b/contrib/binutils/binutils/cxxfilt.c
@@ -1,26 +1,26 @@
/* Demangler for GNU C++ - main program
Copyright 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.uucp)
Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
Modified by Satish Pai (pai@apollo.hp.com) for HP demangling
-This file is part of GCC.
+ This file is part of GCC.
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2, or (at your option) any later
+ version.
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "config.h"
#include "bfd.h"
@@ -31,25 +31,44 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "safe-ctype.h"
static int flags = DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE;
+static int strip_underscore = TARGET_PREPENDS_UNDERSCORE;
-static void demangle_it (char *);
-static void usage (FILE *, int) ATTRIBUTE_NORETURN;
-static void print_demangler_list (FILE *);
+static const struct option long_options[] =
+{
+ {"strip-underscore", no_argument, NULL, '_'},
+ {"format", required_argument, NULL, 's'},
+ {"help", no_argument, NULL, 'h'},
+ {"no-params", no_argument, NULL, 'p'},
+ {"no-strip-underscores", no_argument, NULL, 'n'},
+ {"no-verbose", no_argument, NULL, 'i'},
+ {"types", no_argument, NULL, 't'},
+ {"version", no_argument, NULL, 'v'},
+ {NULL, no_argument, NULL, 0}
+};
static void
demangle_it (char *mangled_name)
{
char *result;
+ unsigned int skip_first = 0;
+
+ /* _ and $ are sometimes found at the start of function names
+ in assembler sources in order to distinguish them from other
+ names (eg register names). So skip them here. */
+ if (mangled_name[0] == '.' || mangled_name[0] == '$')
+ ++skip_first;
+ if (strip_underscore && mangled_name[skip_first] == '_')
+ ++skip_first;
+
+ result = cplus_demangle (mangled_name + skip_first, flags);
- /* For command line args, also try to demangle type encodings. */
- result = cplus_demangle (mangled_name, flags | DMGL_TYPES);
if (result == NULL)
- {
- printf ("%s\n", mangled_name);
- }
+ printf (mangled_name);
else
{
- printf ("%s\n", result);
+ if (mangled_name[0] == '.')
+ putchar ('.');
+ printf (result);
free (result);
}
}
@@ -73,44 +92,32 @@ static void
usage (FILE *stream, int status)
{
fprintf (stream, "\
-Usage: %s [-_] [-n] [--strip-underscores] [--no-strip-underscores]\n\
- [-p] [--no-params]\n",
- program_name);
-
+Usage: %s [options] [mangled names]\n", program_name);
fprintf (stream, "\
- [-s ");
- print_demangler_list (stream);
- fprintf (stream, "]\n");
-
+Options are:\n\
+ [-_|--strip-underscore] Ignore first leading underscore%s\n",
+ TARGET_PREPENDS_UNDERSCORE ? " (default)" : "");
+ fprintf (stream, "\
+ [-n|--no-strip-underscore] Do not ignore a leading underscore%s\n",
+ TARGET_PREPENDS_UNDERSCORE ? "" : " (default)");
fprintf (stream, "\
- [--format ");
+ [-p|--no-params] Do not display function arguments\n\
+ [-i|--no-verbose] Do not show implementation details (if any)\n\
+ [-t|--types] Also attempt to demangle type encodings\n\
+ [-s|--format ");
print_demangler_list (stream);
fprintf (stream, "]\n");
fprintf (stream, "\
- [--help] [--version] [arg...]\n");
+ [@<file>] Read extra options from <file>\n\
+ [-h|--help] Display this information\n\
+ [-v|--version] Show the version information\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");
exit (status);
}
-#define MBUF_SIZE 32767
-char mbuffer[MBUF_SIZE];
-
-int strip_underscore = 0;
-
-static const struct option long_options[] = {
- {"strip-underscores", no_argument, 0, '_'},
- {"format", required_argument, 0, 's'},
- {"help", no_argument, 0, 'h'},
- {"no-params", no_argument, 0, 'p'},
- {"no-strip-underscores", no_argument, 0, 'n'},
- {"version", no_argument, 0, 'v'},
- {0, no_argument, 0, 0}
-};
-
-static const char *standard_symbol_characters (void);
-
-static const char *hp_symbol_characters (void);
-
/* Return the string of non-alnum characters that may occur
as a valid symbol component, in the standard assembler symbol
syntax. */
@@ -121,7 +128,6 @@ standard_symbol_characters (void)
return "_$.";
}
-
/* Return the string of non-alnum characters that may occur
as a valid symbol name component in an HP object file.
@@ -163,7 +169,6 @@ extern int main (int, char **);
int
main (int argc, char **argv)
{
- char *result;
int c;
const char *valid_symbols;
enum demangling_styles style = auto_demangling;
@@ -171,9 +176,9 @@ main (int argc, char **argv)
program_name = argv[0];
xmalloc_set_program_name (program_name);
- strip_underscore = TARGET_PREPENDS_UNDERSCORE;
+ expandargv (&argc, &argv);
- while ((c = getopt_long (argc, argv, "_nps:", long_options, (int *) 0)) != EOF)
+ while ((c = getopt_long (argc, argv, "_hinps:tv", long_options, (int *) 0)) != EOF)
{
switch (c)
{
@@ -188,24 +193,27 @@ main (int argc, char **argv)
case 'p':
flags &= ~ DMGL_PARAMS;
break;
+ case 't':
+ flags |= DMGL_TYPES;
+ break;
+ case 'i':
+ flags &= ~ DMGL_VERBOSE;
+ break;
case 'v':
print_version ("c++filt");
- return (0);
+ return 0;
case '_':
strip_underscore = 1;
break;
case 's':
- {
- style = cplus_demangle_name_to_style (optarg);
- if (style == unknown_demangling)
- {
- fprintf (stderr, "%s: unknown demangling style `%s'\n",
- program_name, optarg);
- return (1);
- }
- else
- cplus_demangle_set_style (style);
- }
+ style = cplus_demangle_name_to_style (optarg);
+ if (style == unknown_demangling)
+ {
+ fprintf (stderr, "%s: unknown demangling style `%s'\n",
+ program_name, optarg);
+ return 1;
+ }
+ cplus_demangle_set_style (style);
break;
}
}
@@ -215,77 +223,65 @@ main (int argc, char **argv)
for ( ; optind < argc; optind++)
{
demangle_it (argv[optind]);
+ putchar ('\n');
}
+
+ return 0;
}
- else
+
+ switch (current_demangling_style)
{
- switch (current_demangling_style)
+ case gnu_demangling:
+ case lucid_demangling:
+ case arm_demangling:
+ case java_demangling:
+ case edg_demangling:
+ case gnat_demangling:
+ case gnu_v3_demangling:
+ case auto_demangling:
+ valid_symbols = standard_symbol_characters ();
+ break;
+ case hp_demangling:
+ valid_symbols = hp_symbol_characters ();
+ break;
+ default:
+ /* Folks should explicitly indicate the appropriate alphabet for
+ each demangling. Providing a default would allow the
+ question to go unconsidered. */
+ fatal ("Internal error: no symbol alphabet for current style");
+ }
+
+ for (;;)
+ {
+ static char mbuffer[32767];
+ unsigned i = 0;
+
+ c = getchar ();
+ /* Try to read a mangled name. */
+ while (c != EOF && (ISALNUM (c) || strchr (valid_symbols, c)))
{
- case gnu_demangling:
- case lucid_demangling:
- case arm_demangling:
- case java_demangling:
- case edg_demangling:
- case gnat_demangling:
- case gnu_v3_demangling:
- case auto_demangling:
- valid_symbols = standard_symbol_characters ();
- break;
- case hp_demangling:
- valid_symbols = hp_symbol_characters ();
- break;
- default:
- /* Folks should explicitly indicate the appropriate alphabet for
- each demangling. Providing a default would allow the
- question to go unconsidered. */
- fatal ("Internal error: no symbol alphabet for current style");
+ if (i >= sizeof (mbuffer) - 1)
+ break;
+ mbuffer[i++] = c;
+ c = getchar ();
}
- for (;;)
+ if (i > 0)
{
- int i = 0;
- c = getchar ();
- /* Try to read a label. */
- while (c != EOF && (ISALNUM (c) || strchr (valid_symbols, c)))
- {
- if (i >= MBUF_SIZE-1)
- break;
- mbuffer[i++] = c;
- c = getchar ();
- }
- if (i > 0)
- {
- int skip_first = 0;
-
- mbuffer[i] = 0;
- if (mbuffer[0] == '.' || mbuffer[0] == '$')
- ++skip_first;
- if (strip_underscore && mbuffer[skip_first] == '_')
- ++skip_first;
-
- if (skip_first > i)
- skip_first = i;
-
- flags |= (int) style;
- result = cplus_demangle (mbuffer + skip_first, flags);
- if (result)
- {
- if (mbuffer[0] == '.')
- putc ('.', stdout);
- fputs (result, stdout);
- free (result);
- }
- else
- fputs (mbuffer, stdout);
-
- fflush (stdout);
- }
- if (c == EOF)
- break;
- putchar (c);
- fflush (stdout);
+ mbuffer[i] = 0;
+ demangle_it (mbuffer);
}
+
+ if (c == EOF)
+ break;
+
+ /* Echo the whitespace characters so that the output looks
+ like the input, only with the mangled names demangled. */
+ putchar (c);
+ if (c == '\n')
+ fflush (stdout);
}
- return (0);
+ fflush (stdout);
+ return 0;
}
diff --git a/contrib/binutils/binutils/debug.c b/contrib/binutils/binutils/debug.c
index 5d46b7810802..07d38acfe402 100644
--- a/contrib/binutils/binutils/debug.c
+++ b/contrib/binutils/binutils/debug.c
@@ -1,5 +1,6 @@
/* debug.c -- Handle generic debugging information.
- Copyright 1995, 1996, 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -16,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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file implements a generic debugging format. We may eventually
have readers which convert different formats into this generic
diff --git a/contrib/binutils/binutils/debug.h b/contrib/binutils/binutils/debug.h
index 3331e0b9b292..c18ba54a6635 100644
--- a/contrib/binutils/binutils/debug.h
+++ b/contrib/binutils/binutils/debug.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef DEBUG_H
#define DEBUG_H
diff --git a/contrib/binutils/binutils/deflex.l b/contrib/binutils/binutils/deflex.l
index bdf15d3a12ef..c6d45c85a431 100644
--- a/contrib/binutils/binutils/deflex.l
+++ b/contrib/binutils/binutils/deflex.l
@@ -1,6 +1,6 @@
%{/* deflex.l - Lexer for .def files */
-/* Copyright 1995, 1997, 1998, 1999, 2002, 2003, 2004
+/* Copyright 1995, 1997, 1998, 1999, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Contributed by Steve Chamberlain: sac@cygnus.com */
@@ -27,6 +27,8 @@
#include "defparse.h"
#include "dlltool.h"
+#define YY_NO_UNPUT
+
int linenumber;
%}
@@ -81,6 +83,7 @@ int linenumber;
";".* { }
" " { }
"\t" { }
+"\r" { }
"\n" { linenumber ++ ;}
"=" { return '=';}
"." { return '.';}
diff --git a/contrib/binutils/binutils/defparse.c b/contrib/binutils/binutils/defparse.c
index 7cd3a253139a..de34ae0cfc1f 100644
--- a/contrib/binutils/binutils/defparse.c
+++ b/contrib/binutils/binutils/defparse.c
@@ -1,41 +1,129 @@
-/* A Bison parser, made from defparse.y
- by GNU bison 1.35. */
-
-#define YYBISON 1 /* Identify Bison output. */
-
-# define NAME 257
-# define LIBRARY 258
-# define DESCRIPTION 259
-# define STACKSIZE 260
-# define HEAPSIZE 261
-# define CODE 262
-# define DATA 263
-# define SECTIONS 264
-# define EXPORTS 265
-# define IMPORTS 266
-# define VERSIONK 267
-# define BASE 268
-# define CONSTANT 269
-# define READ 270
-# define WRITE 271
-# define EXECUTE 272
-# define SHARED 273
-# define NONSHARED 274
-# define NONAME 275
-# define PRIVATE 276
-# define SINGLE 277
-# define MULTIPLE 278
-# define INITINSTANCE 279
-# define INITGLOBAL 280
-# define TERMINSTANCE 281
-# define TERMGLOBAL 282
-# define ID 283
-# define NUMBER 284
+/* 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, 2004
+/* Copyright 1995, 1997, 1998, 1999, 2001, 2004
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -52,36 +140,221 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 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"
-#ifndef YYSTYPE
-typedef union {
+typedef union YYSTYPE {
char *id;
int number;
-} yystype;
-# define YYSTYPE yystype
+} 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
-#ifndef YYDEBUG
-# define YYDEBUG 0
+
+
+
+/* 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)
-#define YYFINAL 98
-#define YYFLAG -32768
-#define YYNTBASE 35
+#endif
-/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
-#define YYTRANSLATE(x) ((unsigned)(x) <= 284 ? yytranslate[x] : 57)
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short int yysigned_char;
+#endif
-/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
-static const char yytranslate[] =
+/* 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,
@@ -108,172 +381,191 @@ static const char yytranslate[] =
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, 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
+ 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
-static const short yyprhs[] =
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned char yyprhs[] =
{
- 0, 0, 3, 5, 9, 14, 17, 20, 24, 28,
- 31, 34, 37, 40, 43, 48, 49, 52, 60, 63,
- 65, 73, 81, 87, 93, 99, 105, 109, 113, 116,
- 118, 121, 125, 127, 129, 130, 133, 134, 136, 138,
- 140, 142, 144, 146, 148, 150, 151, 153, 154, 156,
- 157, 159, 160, 162, 166, 167, 170, 171, 174, 179,
- 180, 184, 185, 186, 190, 192, 194, 196
+ 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
};
-static const short yyrhs[] =
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
{
- 35, 36, 0, 36, 0, 3, 51, 54, 0, 4,
- 51, 54, 55, 0, 11, 37, 0, 5, 29, 0,
- 6, 30, 45, 0, 7, 30, 45, 0, 8, 43,
- 0, 9, 43, 0, 10, 41, 0, 12, 39, 0,
- 13, 30, 0, 13, 30, 31, 30, 0, 0, 37,
- 38, 0, 29, 53, 52, 48, 47, 49, 50, 0,
- 39, 40, 0, 40, 0, 29, 32, 29, 31, 29,
- 31, 29, 0, 29, 32, 29, 31, 29, 31, 30,
- 0, 29, 32, 29, 31, 29, 0, 29, 32, 29,
- 31, 30, 0, 29, 31, 29, 31, 29, 0, 29,
- 31, 29, 31, 30, 0, 29, 31, 29, 0, 29,
- 31, 30, 0, 41, 42, 0, 42, 0, 29, 43,
- 0, 43, 44, 46, 0, 46, 0, 33, 0, 0,
- 33, 30, 0, 0, 16, 0, 17, 0, 18, 0,
- 19, 0, 20, 0, 23, 0, 24, 0, 15, 0,
- 0, 21, 0, 0, 9, 0, 0, 22, 0, 0,
- 29, 0, 29, 31, 29, 0, 0, 34, 30, 0,
- 0, 32, 29, 0, 32, 29, 31, 29, 0, 0,
- 14, 32, 30, 0, 0, 0, 55, 44, 56, 0,
- 25, 0, 26, 0, 27, 0, 28, 0
+ 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
};
-#endif
-
-#if YYDEBUG
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const short yyrline[] =
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned char yyrline[] =
{
- 0, 44, 45, 48, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 64, 66, 69, 73, 75,
- 78, 80, 81, 82, 83, 84, 85, 86, 89, 91,
- 94, 98, 100, 103, 105, 107, 108, 111, 113, 114,
- 115, 116, 117, 118, 121, 123, 126, 128, 131, 133,
- 136, 138, 141, 142, 148, 151, 153, 156, 158, 164,
- 167, 168, 171, 173, 176, 178, 179, 180
+ 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) || defined YYERROR_VERBOSE
-
-/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
+#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[] =
{
- "$", "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", "'.'", "'='", "','", "'@'", "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
+ "$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
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const short yyr1[] =
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short int yytoknum[] =
{
- 0, 35, 35, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 37, 37, 38, 39, 39,
- 40, 40, 40, 40, 40, 40, 40, 40, 41, 41,
- 42, 43, 43, 44, 44, 45, 45, 46, 46, 46,
- 46, 46, 46, 46, 47, 47, 48, 48, 49, 49,
- 50, 50, 51, 51, 51, 52, 52, 53, 53, 53,
- 54, 54, 55, 55, 56, 56, 56, 56
+ 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
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const short yyr2[] =
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
{
- 0, 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
+ 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
};
-/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
- doesn't specify something else to do. Zero means the default is an
- error. */
-static const short yydefact[] =
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
{
- 0, 54, 54, 0, 0, 0, 0, 0, 0, 15,
- 0, 0, 0, 2, 52, 61, 61, 6, 36, 36,
- 37, 38, 39, 40, 41, 42, 43, 9, 32, 10,
- 0, 11, 29, 5, 0, 12, 19, 13, 1, 0,
- 0, 3, 62, 0, 7, 8, 33, 0, 30, 28,
- 59, 16, 0, 0, 18, 0, 53, 0, 4, 35,
- 31, 0, 56, 26, 27, 0, 14, 60, 0, 57,
- 0, 47, 0, 0, 64, 65, 66, 67, 63, 0,
- 55, 46, 45, 24, 25, 22, 23, 58, 44, 49,
- 0, 48, 51, 20, 21, 50, 17, 0, 0
+ 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
};
-static const short yydefgoto[] =
+/* 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[] =
{
- 12, 13, 33, 51, 35, 36, 31, 32, 27, 47,
- 44, 28, 89, 82, 92, 96, 15, 71, 62, 41,
- 58, 78
+ 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
};
-static const short yypact[] =
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yysigned_char yydefgoto[] =
{
- 32, -12, -12, 17, -8, 33, -4, -4, 35,-32768,
- 36, 37, 21,-32768, 38, 48, 48,-32768, 39, 39,
- -32768,-32768,-32768,-32768,-32768,-32768,-32768, -15,-32768, -15,
- -4, 35,-32768, 41, -25, 36,-32768, 40,-32768, 44,
- 34,-32768,-32768, 45,-32768,-32768,-32768, -4, -15,-32768,
- 42,-32768, -19, 47,-32768, 49,-32768, 50, 22,-32768,
- -32768, 52, 43, 51,-32768, 53,-32768,-32768, 26, 54,
- 56, 57, 27, 29,-32768,-32768,-32768,-32768,-32768, 58,
- -32768,-32768, 68,-32768,-32768, 59,-32768,-32768,-32768, 79,
- 31,-32768, 46,-32768,-32768,-32768,-32768, 89,-32768
+ -1, 12, 13, 33, 52, 35, 36, 31, 32, 27,
+ 48, 45, 28, 90, 83, 93, 97, 15, 72, 63,
+ 42, 59, 79
};
-static const short yypgoto[] =
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -26
+static const yysigned_char yypact[] =
{
- -32768, 80,-32768,-32768,-32768, 60,-32768, 62, -7, 55,
- 72, 61,-32768,-32768,-32768,-32768, 92,-32768,-32768, 81,
- -32768,-32768
+ 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
+};
-#define YYLAST 113
-
-
-static const short yytable[] =
+/* 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, -34, -34, -34, -34, -34, 52, 53, -34, -34,
- 63, 64, 20, 21, 22, 23, 24, 14, 46, 25,
- 26, 97, 18, 48, 1, 2, 3, 4, 5, 6,
+ 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, -34, -34, -34,
- -34, 74, 75, 76, 77, 46, 83, 84, 85, 86,
- 93, 94, 40, 19, 30, 34, 57, 37, 95, 39,
- 50, 55, 43, 56, 61, 59, 65, 70, 81, 66,
- 67, 69, 72, 88, 73, 79, 80, 87, 91, 98,
- 90, 45, 38, 49, 16, 54, 0, 42, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 60, 0,
- 0, 0, 0, 68
+ 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 short yycheck[] =
+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,
@@ -283,233 +575,118 @@ static const short yycheck[] =
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, 0,
- 31, 19, 12, 31, 2, 35, -1, 16, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 47, -1,
- -1, -1, -1, 58
+ 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
};
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/share/bison-1.35/bison.simple"
-
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
- Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* 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. */
-
-/* This is the parser code that is written into each bison parser when
- the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-/* 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. */
-
-#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
-# else
-# ifndef YYSTACK_USE_ALLOCA
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
-# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-# define YYSTACK_ALLOC malloc
-# define YYSTACK_FREE free
-# endif
-#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
-
-
-#if (! defined (yyoverflow) \
- && (! defined (__cplusplus) \
- || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
{
- short yyss;
- YYSTYPE yyvs;
-# if YYLSP_NEEDED
- YYLTYPE yyls;
-# endif
+ 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
};
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# if YYLSP_NEEDED
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
- + 2 * YYSTACK_GAP_MAX)
-# else
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAX)
-# endif
-
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- register 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_MAX; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (0)
-
-#endif
-
-
-#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)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
+#define YYEMPTY (-2)
#define YYEOF 0
+
#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
+#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); \
- yychar1 = YYTRANSLATE (yychar); \
+ yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up"); \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
+
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run).
-
- When YYLLOC_DEFAULT is run, CURRENT is set the location of the
- first token. By default, to implement support for ranges, extend
- its range to the last symbol. */
+/* 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) \
- Current.last_line = Rhs[N].last_line; \
- Current.last_column = Rhs[N].last_column;
+# 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
-/* YYLEX -- calling `yylex' with the right arguments. */
+/* 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. */
-#if YYPURE
-# if YYLSP_NEEDED
-# ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
-# else
-# define YYLEX yylex (&yylval, &yylloc)
-# endif
-# else /* !YYLSP_NEEDED */
-# ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, YYLEX_PARAM)
-# else
-# define YYLEX yylex (&yylval)
-# endif
-# endif /* !YYLSP_NEEDED */
-#else /* !YYPURE */
-# define YYLEX yylex ()
-#endif /* !YYPURE */
+#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
@@ -523,13 +700,86 @@ 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
@@ -539,18 +789,16 @@ int yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
+
-#ifdef YYERROR_VERBOSE
+
+#if YYERROR_VERBOSE
# ifndef yystrlen
# if defined (__GLIBC__) && defined (_STRING_H)
@@ -565,7 +813,7 @@ yystrlen (yystr)
const char *yystr;
# endif
{
- register const char *yys = yystr;
+ const char *yys = yystr;
while (*yys++ != '\0')
continue;
@@ -590,8 +838,8 @@ yystpcpy (yydest, yysrc)
const char *yysrc;
# endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -600,86 +848,187 @@ yystpcpy (yydest, yysrc)
}
# endif
# 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 */
+
-#line 315 "/usr/share/bison-1.35/bison.simple"
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
+#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)
-# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-# define YYPARSE_PARAM_DECL
+int yyparse (void *YYPARSE_PARAM);
# else
-# define YYPARSE_PARAM_ARG YYPARSE_PARAM
-# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+int yyparse ();
# endif
-#else /* !YYPARSE_PARAM */
-# define YYPARSE_PARAM_ARG
-# define YYPARSE_PARAM_DECL
-#endif /* !YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-# ifdef YYPARSE_PARAM
-int yyparse (void *);
-# else
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
-# endif
+#else
+int yyparse ();
#endif
+#endif /* ! YYPARSE_PARAM */
-/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
- variables are global, or local to YYPARSE. */
-
-#define YY_DECL_NON_LSP_VARIABLES \
-/* The lookahead symbol. */ \
-int yychar; \
- \
-/* The semantic value of the lookahead symbol. */ \
-YYSTYPE yylval; \
- \
-/* Number of parse errors so far. */ \
-int yynerrs;
-#if YYLSP_NEEDED
-# define YY_DECL_VARIABLES \
-YY_DECL_NON_LSP_VARIABLES \
- \
-/* Location data for the lookahead symbol. */ \
-YYLTYPE yylloc;
-#else
-# define YY_DECL_VARIABLES \
-YY_DECL_NON_LSP_VARIABLES
-#endif
+
+/* The look-ahead symbol. */
+int yychar;
+
+/* The semantic value of the look-ahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
-/* If nonreentrant, generate the variables here. */
-#if !YYPURE
-YY_DECL_VARIABLES
-#endif /* !YYPURE */
+/*----------.
+| 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 (YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
+yyparse (void)
+#else
+int
+yyparse ()
+ ;
+#endif
+#endif
{
- /* If reentrant, generate the variables here. */
-#if YYPURE
- YY_DECL_VARIABLES
-#endif /* !YYPURE */
-
- register int yystate;
- register int yyn;
+
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Lookahead token as an internal (translated) token number. */
- int yychar1 = 0;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
/* Three stacks and their tools:
`yyss': related to states,
@@ -689,41 +1038,29 @@ yyparse (YYPARSE_PARAM_ARG)
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
- /* The state stack. */
- short yyssa[YYINITDEPTH];
- short *yyss = yyssa;
- register short *yyssp;
+ /* The state stack. */
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
-#if YYLSP_NEEDED
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-#endif
-#if YYLSP_NEEDED
-# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-#else
-# define YYPOPSTACK (yyvsp--, yyssp--)
-#endif
- YYSIZE_T yystacksize = YYINITDEPTH;
+#define YYPOPSTACK (yyvsp--, yyssp--)
+ YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
-#if YYLSP_NEEDED
- YYLTYPE yyloc;
-#endif
+
/* When reducing, the number of symbols on the RHS of the reduced
- rule. */
+ rule. */
int yylen;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -740,9 +1077,7 @@ yyparse (YYPARSE_PARAM_ARG)
yyssp = yyss;
yyvsp = yyvs;
-#if YYLSP_NEEDED
- yylsp = yyls;
-#endif
+
goto yysetstate;
/*------------------------------------------------------------.
@@ -757,7 +1092,7 @@ yyparse (YYPARSE_PARAM_ARG)
yysetstate:
*yyssp = yystate;
- if (yyssp >= yyss + yystacksize - 1)
+ if (yyss + yystacksize - 1 <= yyssp)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
@@ -768,52 +1103,43 @@ yyparse (YYPARSE_PARAM_ARG)
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
+
/* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. */
-# if YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yyls1, yysize * sizeof (*yylsp),
- &yystacksize);
- yyls = yyls1;
-# else
- yyoverflow ("parser stack overflow",
+ 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);
-# endif
+
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- goto yyoverflowlab;
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
+ if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
-# if YYLSP_NEEDED
- YYSTACK_RELOCATE (yyls);
-# endif
-# undef YYSTACK_RELOCATE
+
+# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
@@ -822,14 +1148,12 @@ yyparse (YYPARSE_PARAM_ARG)
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
-#if YYLSP_NEEDED
- yylsp = yyls + yysize - 1;
-#endif
+
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
- if (yyssp >= yyss + yystacksize - 1)
+ if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
@@ -837,101 +1161,67 @@ yyparse (YYPARSE_PARAM_ARG)
goto yybackup;
-
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
+/* 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 lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
- if (yyn == YYFLAG)
+ if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
+ /* 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;
}
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
+ if (yychar <= YYEOF)
{
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
+ yychar = yytoken = YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
- yychar1 = YYTRANSLATE (yychar);
-
-#if YYDEBUG
- /* We have to keep this `#if YYDEBUG', since we use variables
- which are defined only if `YYDEBUG' is set. */
- if (yydebug)
- {
- YYFPRINTF (stderr, "Next token is %d (%s",
- yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise
- meaning of a token, for further debugging info. */
-# ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-# endif
- YYFPRINTF (stderr, ")\n");
- }
-#endif
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ /* 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];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
+ if (yyn <= 0)
{
- if (yyn == YYFLAG)
+ if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- else if (yyn == 0)
- goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %d (%s), ",
- yychar, yytname[yychar1]));
+ /* 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;
-#if YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
+
/* Count tokens shifted since error; after three, turn off error
status. */
@@ -962,257 +1252,270 @@ yyreduce:
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
- Otherwise, the following line sets YYVAL to the semantic value of
- the lookahead token. This behavior is undocumented and Bison
+ 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];
-#if YYLSP_NEEDED
- /* Similarly for the default location. Let the user run additional
- commands if for instance locations are ranges. */
- yyloc = yylsp[1-yylen];
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
-#endif
-#if YYDEBUG
- /* We have to keep this `#if YYDEBUG', since we use variables which
- are defined only if `YYDEBUG' is set. */
- if (yydebug)
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
{
- int yyi;
-
- YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
- YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
- YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
-
- switch (yyn) {
-
-case 3:
+ case 4:
#line 49 "defparse.y"
-{ def_name (yyvsp[-1].id, yyvsp[0].number); }
+ { def_name ((yyvsp[-1].id), (yyvsp[0].number)); }
break;
-case 4:
+
+ case 5:
#line 50 "defparse.y"
-{ def_library (yyvsp[-2].id, yyvsp[-1].number); }
+ { def_library ((yyvsp[-2].id), (yyvsp[-1].number)); }
break;
-case 6:
+
+ case 7:
#line 52 "defparse.y"
-{ def_description (yyvsp[0].id);}
+ { def_description ((yyvsp[0].id));}
break;
-case 7:
+
+ case 8:
#line 53 "defparse.y"
-{ def_stacksize (yyvsp[-1].number, yyvsp[0].number);}
+ { def_stacksize ((yyvsp[-1].number), (yyvsp[0].number));}
break;
-case 8:
+
+ case 9:
#line 54 "defparse.y"
-{ def_heapsize (yyvsp[-1].number, yyvsp[0].number);}
+ { def_heapsize ((yyvsp[-1].number), (yyvsp[0].number));}
break;
-case 9:
+
+ case 10:
#line 55 "defparse.y"
-{ def_code (yyvsp[0].number);}
+ { def_code ((yyvsp[0].number));}
break;
-case 10:
+
+ case 11:
#line 56 "defparse.y"
-{ def_data (yyvsp[0].number);}
+ { def_data ((yyvsp[0].number));}
break;
-case 13:
+
+ case 14:
#line 59 "defparse.y"
-{ def_version (yyvsp[0].number,0);}
+ { def_version ((yyvsp[0].number),0);}
break;
-case 14:
+
+ case 15:
#line 60 "defparse.y"
-{ def_version (yyvsp[-2].number,yyvsp[0].number);}
+ { def_version ((yyvsp[-2].number),(yyvsp[0].number));}
break;
-case 17:
+
+ 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);}
+ { 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 20:
+
+ case 21:
#line 79 "defparse.y"
-{ def_import (yyvsp[-6].id,yyvsp[-4].id,yyvsp[-2].id,yyvsp[0].id, 0); }
+ { def_import ((yyvsp[-6].id),(yyvsp[-4].id),(yyvsp[-2].id),(yyvsp[0].id), 0); }
break;
-case 21:
+
+ case 22:
#line 80 "defparse.y"
-{ def_import (yyvsp[-6].id,yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].number); }
+ { def_import ((yyvsp[-6].id),(yyvsp[-4].id),(yyvsp[-2].id), 0,(yyvsp[0].number)); }
break;
-case 22:
+
+ case 23:
#line 81 "defparse.y"
-{ def_import (yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].id, 0); }
+ { def_import ((yyvsp[-4].id),(yyvsp[-2].id), 0,(yyvsp[0].id), 0); }
break;
-case 23:
+
+ case 24:
#line 82 "defparse.y"
-{ def_import (yyvsp[-4].id,yyvsp[-2].id, 0, 0,yyvsp[0].number); }
+ { def_import ((yyvsp[-4].id),(yyvsp[-2].id), 0, 0,(yyvsp[0].number)); }
break;
-case 24:
+
+ case 25:
#line 83 "defparse.y"
-{ def_import ( 0,yyvsp[-4].id,yyvsp[-2].id,yyvsp[0].id, 0); }
+ { def_import ( 0,(yyvsp[-4].id),(yyvsp[-2].id),(yyvsp[0].id), 0); }
break;
-case 25:
+
+ case 26:
#line 84 "defparse.y"
-{ def_import ( 0,yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].number); }
+ { def_import ( 0,(yyvsp[-4].id),(yyvsp[-2].id), 0,(yyvsp[0].number)); }
break;
-case 26:
+
+ case 27:
#line 85 "defparse.y"
-{ def_import ( 0,yyvsp[-2].id, 0,yyvsp[0].id, 0); }
+ { def_import ( 0,(yyvsp[-2].id), 0,(yyvsp[0].id), 0); }
break;
-case 27:
+
+ case 28:
#line 86 "defparse.y"
-{ def_import ( 0,yyvsp[-2].id, 0, 0,yyvsp[0].number); }
+ { def_import ( 0,(yyvsp[-2].id), 0, 0,(yyvsp[0].number)); }
break;
-case 30:
+
+ case 31:
#line 95 "defparse.y"
-{ def_section (yyvsp[-1].id,yyvsp[0].number);}
+ { def_section ((yyvsp[-1].id),(yyvsp[0].number));}
break;
-case 35:
+
+ case 36:
#line 107 "defparse.y"
-{ yyval.number=yyvsp[0].number;}
+ { (yyval.number)=(yyvsp[0].number);}
break;
-case 36:
+
+ case 37:
#line 108 "defparse.y"
-{ yyval.number=-1;}
+ { (yyval.number)=-1;}
break;
-case 37:
+
+ case 38:
#line 112 "defparse.y"
-{ yyval.number = 1; }
+ { (yyval.number) = 1; }
break;
-case 38:
+
+ case 39:
#line 113 "defparse.y"
-{ yyval.number = 2; }
+ { (yyval.number) = 2; }
break;
-case 39:
+
+ case 40:
#line 114 "defparse.y"
-{ yyval.number = 4; }
+ { (yyval.number) = 4; }
break;
-case 40:
+
+ case 41:
#line 115 "defparse.y"
-{ yyval.number = 8; }
+ { (yyval.number) = 8; }
break;
-case 41:
+
+ case 42:
#line 116 "defparse.y"
-{ yyval.number = 0; }
+ { (yyval.number) = 0; }
break;
-case 42:
+
+ case 43:
#line 117 "defparse.y"
-{ yyval.number = 0; }
+ { (yyval.number) = 0; }
break;
-case 43:
+
+ case 44:
#line 118 "defparse.y"
-{ yyval.number = 0; }
+ { (yyval.number) = 0; }
break;
-case 44:
+
+ case 45:
#line 122 "defparse.y"
-{yyval.number=1;}
+ {(yyval.number)=1;}
break;
-case 45:
+
+ case 46:
#line 123 "defparse.y"
-{yyval.number=0;}
+ {(yyval.number)=0;}
break;
-case 46:
+
+ case 47:
#line 127 "defparse.y"
-{yyval.number=1;}
+ {(yyval.number)=1;}
break;
-case 47:
+
+ case 48:
#line 128 "defparse.y"
-{yyval.number=0;}
+ {(yyval.number)=0;}
break;
-case 48:
+
+ case 49:
#line 132 "defparse.y"
-{ yyval.number = 1; }
+ { (yyval.number) = 1; }
break;
-case 49:
+
+ case 50:
#line 133 "defparse.y"
-{ yyval.number = 0; }
+ { (yyval.number) = 0; }
break;
-case 50:
+
+ case 51:
#line 137 "defparse.y"
-{ yyval.number = 1; }
+ { (yyval.number) = 1; }
break;
-case 51:
+
+ case 52:
#line 138 "defparse.y"
-{ yyval.number = 0; }
+ { (yyval.number) = 0; }
break;
-case 52:
+
+ case 53:
#line 141 "defparse.y"
-{ yyval.id =yyvsp[0].id; }
+ { (yyval.id) =(yyvsp[0].id); }
break;
-case 53:
+
+ 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;
+ {
+ 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 54:
+
+ case 55:
#line 148 "defparse.y"
-{ yyval.id=""; }
+ { (yyval.id)=""; }
break;
-case 55:
+
+ case 56:
#line 152 "defparse.y"
-{ yyval.number=yyvsp[0].number;}
+ { (yyval.number)=(yyvsp[0].number);}
break;
-case 56:
+
+ case 57:
#line 153 "defparse.y"
-{ yyval.number=-1;}
+ { (yyval.number)=-1;}
break;
-case 57:
+
+ case 58:
#line 157 "defparse.y"
-{ yyval.id = yyvsp[0].id; }
+ { (yyval.id) = (yyvsp[0].id); }
break;
-case 58:
+
+ 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;
+ {
+ 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 59:
+
+ case 60:
#line 164 "defparse.y"
-{ yyval.id = 0; }
+ { (yyval.id) = 0; }
break;
-case 60:
+
+ case 61:
#line 167 "defparse.y"
-{ yyval.number= yyvsp[0].number;}
+ { (yyval.number)= (yyvsp[0].number);}
break;
-case 61:
+
+ case 62:
#line 168 "defparse.y"
-{ yyval.number=-1;}
+ { (yyval.number)=-1;}
break;
-}
-#line 705 "/usr/share/bison-1.35/bison.simple"
+ default: break;
+ }
+
+/* Line 1126 of yacc.c. */
+#line 1510 "defparse.c"
yyvsp -= yylen;
yyssp -= yylen;
-#if YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-#if YYDEBUG
- if (yydebug)
- {
- short *yyssp1 = yyss - 1;
- YYFPRINTF (stderr, "state stack now");
- while (yyssp1 != yyssp)
- YYFPRINTF (stderr, " %d", *++yyssp1);
- YYFPRINTF (stderr, "\n");
- }
-#endif
+
+ YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
-#if YYLSP_NEEDED
- *++yylsp = yyloc;
-#endif
+
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
@@ -1220,11 +1523,11 @@ case 61:
yyn = yyr1[yyn];
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
- yystate = yydefgoto[yyn - YYNTBASE];
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
@@ -1237,155 +1540,193 @@ yyerrlab:
if (!yyerrstatus)
{
++yynerrs;
-
-#ifdef YYERROR_VERBOSE
+#if YYERROR_VERBOSE
yyn = yypact[yystate];
- if (yyn > YYFLAG && yyn < YYLAST)
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
{
- YYSIZE_T yysize = 0;
- char *yymsg;
- int yyx, yycount;
+ 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;
- yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
- if (yycheck[yyx + yyn] == yyx)
- yysize += yystrlen (yytname[yyx]) + 15, yycount++;
- yysize += yystrlen ("parse error, unexpected ") + 1;
- yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
+ 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)
{
- char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
- yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
-
- if (yycount < 5)
+ /* 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))
{
- yycount = 0;
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *));
- yyx++)
- if (yycheck[yyx + yyn] == yyx)
- {
- const char *yyq = ! yycount ? ", expecting " : " or ";
- yyp = yystpcpy (yyp, yyq);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yycount++;
- }
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
- yyerror ("parse error; also virtual memory exhausted");
+ {
+ yyerror (YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
}
else
-#endif /* defined (YYERROR_VERBOSE) */
- yyerror ("parse error");
+#endif /* YYERROR_VERBOSE */
+ yyerror (YY_("syntax error"));
}
- goto yyerrlab1;
-/*--------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action |
-`--------------------------------------------------*/
-yyerrlab1:
+
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
- YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
- yychar, yytname[yychar1]));
- yychar = YYEMPTY;
+ 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 lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
+ goto yyerrlab1;
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
-/*-------------------------------------------------------------------.
-| yyerrdefault -- current state does not do anything special for the |
-| error token. |
-`-------------------------------------------------------------------*/
-yyerrdefault:
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
+ /* 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;
- /* If its default is to accept any token, ok. Otherwise pop it. */
- yyn = yydefact[yystate];
- if (yyn)
- goto yydefault;
-#endif
+yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
-/*---------------------------------------------------------------.
-| yyerrpop -- pop the current state because it cannot handle the |
-| error token |
-`---------------------------------------------------------------*/
-yyerrpop:
- if (yyssp == yyss)
- YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#if YYLSP_NEEDED
- yylsp--;
-#endif
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
-#if YYDEBUG
- if (yydebug)
+ for (;;)
{
- short *yyssp1 = yyss - 1;
- YYFPRINTF (stderr, "Error: state stack now");
- while (yyssp1 != yyssp)
- YYFPRINTF (stderr, " %d", *++yyssp1);
- YYFPRINTF (stderr, "\n");
- }
-#endif
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
-/*--------------.
-| yyerrhandle. |
-`--------------*/
-yyerrhandle:
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
}
- else if (yyn == 0)
- goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((stderr, "Shifting error token, "));
-
*++yyvsp = yylval;
-#if YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
@@ -1405,19 +1746,32 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-/*---------------------------------------------.
-| yyoverflowab -- parser overflow comes here. |
-`---------------------------------------------*/
-yyoverflowlab:
- yyerror ("parser stack overflow");
+#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;
}
-#line 182 "defparse.y"
+
+
+
diff --git a/contrib/binutils/binutils/defparse.h b/contrib/binutils/binutils/defparse.h
index 71a82752954b..0eea9b9dcf48 100644
--- a/contrib/binutils/binutils/defparse.h
+++ b/contrib/binutils/binutils/defparse.h
@@ -1,44 +1,111 @@
-#ifndef BISON_Y_TAB_H
-# define BISON_Y_TAB_H
+/* A Bison parser, made by GNU Bison 2.1. */
-#ifndef YYSTYPE
-typedef union {
+/* 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;
-# define YYSTYPE yystype
+} 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
-# define NAME 257
-# define LIBRARY 258
-# define DESCRIPTION 259
-# define STACKSIZE 260
-# define HEAPSIZE 261
-# define CODE 262
-# define DATA 263
-# define SECTIONS 264
-# define EXPORTS 265
-# define IMPORTS 266
-# define VERSIONK 267
-# define BASE 268
-# define CONSTANT 269
-# define READ 270
-# define WRITE 271
-# define EXECUTE 272
-# define SHARED 273
-# define NONSHARED 274
-# define NONAME 275
-# define PRIVATE 276
-# define SINGLE 277
-# define MULTIPLE 278
-# define INITINSTANCE 279
-# define INITGLOBAL 280
-# define TERMINSTANCE 281
-# define TERMGLOBAL 282
-# define ID 283
-# define NUMBER 284
-
extern YYSTYPE yylval;
-#endif /* not BISON_Y_TAB_H */
+
+
diff --git a/contrib/binutils/binutils/defparse.y b/contrib/binutils/binutils/defparse.y
index b58aaee7146d..81b4c61ce903 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, 2004
+/* Copyright 1995, 1997, 1998, 1999, 2001, 2004
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "bucomm.h"
@@ -29,8 +29,8 @@
int number;
};
-%token NAME, LIBRARY, DESCRIPTION, STACKSIZE, HEAPSIZE, CODE, DATA
-%token SECTIONS, EXPORTS, IMPORTS, VERSIONK, BASE, CONSTANT
+%token NAME LIBRARY DESCRIPTION STACKSIZE HEAPSIZE CODE DATA
+%token SECTIONS EXPORTS IMPORTS VERSIONK BASE CONSTANT
%token READ WRITE EXECUTE SHARED NONSHARED NONAME PRIVATE
%token SINGLE MULTIPLE INITINSTANCE INITGLOBAL TERMINSTANCE TERMGLOBAL
%token <id> ID
diff --git a/contrib/binutils/binutils/dep-in.sed b/contrib/binutils/binutils/dep-in.sed
index aeb22a1acc78..c30c39693ff8 100644
--- a/contrib/binutils/binutils/dep-in.sed
+++ b/contrib/binutils/binutils/dep-in.sed
@@ -2,6 +2,7 @@
/\\$/N
/\\$/b loop
+s! \./! !g
s!@INCDIR@!$(INCDIR)!g
s!@TOPDIR@/include!$(INCDIR)!g
s!@BFDDIR@!$(BFDDIR)!g
diff --git a/contrib/binutils/binutils/dlltool.c b/contrib/binutils/binutils/dlltool.c
index 5f921ae0954b..6c231f69a449 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
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This program allows you to build the files necessary to create
@@ -57,7 +57,7 @@
IMPORTS ( ( <internal-name> = <module-name> . <integer> )
| ( [ <internal-name> = ] <module-name> . <external-name> )) *
- Declares that <external-name> or the exported function whoes ordinal number
+ Declares that <external-name> or the exported function whose ordinal number
is <integer> is to be imported from the file <module-name>. If
<internal-name> is specified then this is the name that the imported
function will be refereed to in the body of the DLL.
@@ -254,12 +254,8 @@
#include <time.h>
#include <sys/stat.h>
-
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
+#include <assert.h>
#ifdef DLLTOOL_ARM
#include "coff/arm.h"
@@ -358,6 +354,7 @@ static char *dll_name;
static int add_indirect = 0;
static int add_underscore = 0;
+static int add_stdcall_underscore = 0;
static int dontdeltemps = 0;
/* TRUE if we should export all symbols. Otherwise, we only export
@@ -382,6 +379,7 @@ extern char * program_name;
static int machine;
static int killat;
static int add_stdcall_alias;
+static const char *ext_prefix_alias;
static int verbose;
static FILE *output_def;
static FILE *base_file;
@@ -427,7 +425,11 @@ static char * mcore_elf_linker_flags = NULL;
#define DRECTVE_SECTION_NAME ".drectve"
#endif
-#define PATHMAX 250 /* What's the right name for this ? */
+/* What's the right name for this ? */
+#define PATHMAX 250
+
+/* External name alias numbering starts here. */
+#define PREFIX_ALIAS_BASE 20000
char *tmp_asm_buf;
char *tmp_head_s_buf;
@@ -641,6 +643,7 @@ typedef struct export
{
const char *name;
const char *internal_name;
+ const char *import_name;
int ordinal;
int constant;
int noname; /* Don't put name in image file. */
@@ -664,7 +667,7 @@ static struct string_list *excludes;
static const char *rvaafter (int);
static const char *rvabefore (int);
-static const char *asm_prefix (int);
+static const char *asm_prefix (int, const char *);
static void process_def_file (const char *);
static void new_directive (char *);
static void append_import (const char *, const char *, int);
@@ -686,9 +689,6 @@ static void generate_idata_ofile (FILE *);
static void assemble_file (const char *, const char *);
static void gen_exp_file (void);
static const char *xlate (const char *);
-#if 0
-static void dump_iat (FILE *, export_type *);
-#endif
static char *make_label (const char *, const char *);
static char *make_imp_label (const char *, const char *);
static bfd *make_one_lib_file (export_type *, int);
@@ -698,13 +698,12 @@ static void gen_lib_file (void);
static int pfunc (const void *, const void *);
static int nfunc (const void *, const void *);
static void remove_null_names (export_type **);
-static void dtab (export_type **);
static void process_duplicates (export_type **);
static void fill_ordinals (export_type **);
-static int alphafunc (const void *, const void *);
static void mangle_defs (void);
static void usage (FILE *, int);
-static void inform (const char *, ...);
+static void inform (const char *, ...) ATTRIBUTE_PRINTF_1;
+static void set_dll_name_from_def (const char *);
static char *
prefix_encode (char *start, unsigned code)
@@ -795,7 +794,7 @@ rvabefore (int machine)
}
static const char *
-asm_prefix (int machine)
+asm_prefix (int machine, const char *name)
{
switch (machine)
{
@@ -810,7 +809,11 @@ asm_prefix (int machine)
case MARM_EPOC:
break;
case M386:
- return "_";
+ /* Symbol names starting with ? do not have a leading underscore. */
+ if (name && *name == '?')
+ break;
+ else
+ return "_";
default:
/* xgettext:c-format */
fatal (_("Internal error: Unknown machine type: %d"), machine);
@@ -819,26 +822,26 @@ asm_prefix (int machine)
return "";
}
-#define ASM_BYTE mtable[machine].how_byte
-#define ASM_SHORT mtable[machine].how_short
-#define ASM_LONG mtable[machine].how_long
-#define ASM_TEXT mtable[machine].how_asciz
-#define ASM_C mtable[machine].how_comment
-#define ASM_JUMP mtable[machine].how_jump
-#define ASM_GLOBAL mtable[machine].how_global
-#define ASM_SPACE mtable[machine].how_space
-#define ASM_ALIGN_SHORT mtable[machine].how_align_short
-#define ASM_RVA_BEFORE rvabefore(machine)
-#define ASM_RVA_AFTER rvaafter(machine)
-#define ASM_PREFIX asm_prefix(machine)
-#define ASM_ALIGN_LONG mtable[machine].how_align_long
-#define HOW_BFD_READ_TARGET 0 /* always default*/
-#define HOW_BFD_WRITE_TARGET mtable[machine].how_bfd_target
-#define HOW_BFD_ARCH mtable[machine].how_bfd_arch
-#define HOW_JTAB mtable[machine].how_jtab
-#define HOW_JTAB_SIZE mtable[machine].how_jtab_size
-#define HOW_JTAB_ROFF mtable[machine].how_jtab_roff
-#define ASM_SWITCHES mtable[machine].how_default_as_switches
+#define ASM_BYTE mtable[machine].how_byte
+#define ASM_SHORT mtable[machine].how_short
+#define ASM_LONG mtable[machine].how_long
+#define ASM_TEXT mtable[machine].how_asciz
+#define ASM_C mtable[machine].how_comment
+#define ASM_JUMP mtable[machine].how_jump
+#define ASM_GLOBAL mtable[machine].how_global
+#define ASM_SPACE mtable[machine].how_space
+#define ASM_ALIGN_SHORT mtable[machine].how_align_short
+#define ASM_RVA_BEFORE rvabefore (machine)
+#define ASM_RVA_AFTER rvaafter (machine)
+#define ASM_PREFIX(NAME) asm_prefix (machine, (NAME))
+#define ASM_ALIGN_LONG mtable[machine].how_align_long
+#define HOW_BFD_READ_TARGET 0 /* Always default. */
+#define HOW_BFD_WRITE_TARGET mtable[machine].how_bfd_target
+#define HOW_BFD_ARCH mtable[machine].how_bfd_arch
+#define HOW_JTAB mtable[machine].how_jtab
+#define HOW_JTAB_SIZE mtable[machine].how_jtab_size
+#define HOW_JTAB_ROFF mtable[machine].how_jtab_roff
+#define ASM_SWITCHES mtable[machine].how_default_as_switches
static char **oav;
@@ -865,7 +868,6 @@ process_def_file (const char *name)
/* Communications with the parser. */
-static const char *d_name; /* Arg to NAME or LIBRARY. */
static int d_nfuncs; /* Number of functions exported. */
static int d_named_nfuncs; /* Number of named functions exported. */
static int d_low_ord; /* Lowest ordinal index. */
@@ -896,6 +898,7 @@ def_exports (const char *name, const char *internal_name, int ordinal,
p->name = name;
p->internal_name = internal_name ? internal_name : name;
+ p->import_name = name;
p->ordinal = ordinal;
p->constant = constant;
p->noname = noname;
@@ -912,6 +915,16 @@ def_exports (const char *name, const char *internal_name, int ordinal,
p->forward = 0; /* no forward */
}
+static void
+set_dll_name_from_def (const char * name)
+{
+ const char* image_basename = lbasename (name);
+ if (image_basename != name)
+ non_fatal (_("%s: Path components stripped from image name, '%s'."),
+ def_file, name);
+ dll_name = xstrdup (image_basename);
+}
+
void
def_name (const char *name, int base)
{
@@ -921,11 +934,10 @@ def_name (const char *name, int base)
if (d_is_dll)
non_fatal (_("Can't have LIBRARY and NAME"));
- d_name = name;
/* If --dllname not provided, use the one in the DEF file.
FIXME: Is this appropriate for executables? */
if (! dll_name)
- dll_name = xstrdup (name);
+ set_dll_name_from_def (name);
d_is_exe = 1;
}
@@ -938,10 +950,9 @@ def_library (const char *name, int base)
if (d_is_exe)
non_fatal (_("Can't have LIBRARY and NAME"));
- d_name = name;
/* If --dllname not provided, use the one in the DEF file. */
if (! dll_name)
- dll_name = xstrdup (name);
+ set_dll_name_from_def (name);
d_is_dll = 1;
}
@@ -1206,7 +1217,7 @@ scan_drectve_symbols (bfd *abfd)
if (s == NULL)
return;
- size = bfd_get_section_size_before_reloc (s);
+ size = bfd_get_section_size (s);
buf = xmalloc (size);
bfd_get_section_contents (abfd, s, buf, 0, size);
@@ -1794,14 +1805,6 @@ gen_exp_file (void)
{
if (exp->ordinal != i)
{
-#if 0
- fprintf (f, "\t%s\t%d\t%s %d..%d missing\n",
- ASM_SPACE,
- (exp->ordinal - i) * 4,
- ASM_C,
- i, exp->ordinal - 1);
- i = exp->ordinal;
-#endif
while (i < exp->ordinal)
{
fprintf(f,"\t%s\t0\n", ASM_LONG);
@@ -1816,7 +1819,7 @@ gen_exp_file (void)
exp->internal_name, ASM_RVA_AFTER, ASM_C, exp->ordinal);
else
fprintf (f, "\t%s%s%s%s\t%s %d\n", ASM_RVA_BEFORE,
- ASM_PREFIX,
+ ASM_PREFIX (exp->internal_name),
exp->internal_name, ASM_RVA_AFTER, ASM_C, exp->ordinal);
}
else
@@ -1992,7 +1995,9 @@ xlate (const char *name)
{
int lead_at = (*name == '@');
- if (add_underscore && !lead_at)
+ if (!lead_at && (add_underscore
+ || (add_stdcall_underscore
+ && strchr (name, '@'))))
{
char *copy = xmalloc (strlen (name) + 2);
@@ -2013,29 +2018,6 @@ xlate (const char *name)
return name;
}
-/**********************************************************************/
-
-#if 0
-
-static void
-dump_iat (FILE *f, export_type *exp)
-{
- if (exp->noname && !show_allnames )
- {
- fprintf (f, "\t%s\t0x%08x\n",
- ASM_LONG,
- exp->ordinal | 0x80000000); /* hint or orindal ?? */
- }
- else
- {
- fprintf (f, "\t%sID%d%s\n", ASM_RVA_BEFORE,
- exp->ordinal,
- ASM_RVA_AFTER);
- }
-}
-
-#endif
-
typedef struct
{
int id;
@@ -2150,10 +2132,10 @@ ID2: .short 2
static char *
make_label (const char *prefix, const char *name)
{
- int len = strlen (ASM_PREFIX) + strlen (prefix) + strlen (name);
- char *copy = xmalloc (len +1 );
+ int len = strlen (ASM_PREFIX (name)) + strlen (prefix) + strlen (name);
+ char *copy = xmalloc (len + 1);
- strcpy (copy, ASM_PREFIX);
+ strcpy (copy, ASM_PREFIX (name));
strcat (copy, prefix);
strcat (copy, name);
return copy;
@@ -2174,10 +2156,10 @@ make_imp_label (const char *prefix, const char *name)
}
else
{
- len = strlen (ASM_PREFIX) + strlen (prefix) + strlen (name);
+ len = strlen (ASM_PREFIX (name)) + strlen (prefix) + strlen (name);
copy = xmalloc (len + 1);
strcpy (copy, prefix);
- strcat (copy, ASM_PREFIX);
+ strcat (copy, ASM_PREFIX (name));
strcat (copy, name);
}
return copy;
@@ -2186,466 +2168,409 @@ make_imp_label (const char *prefix, const char *name)
static bfd *
make_one_lib_file (export_type *exp, int i)
{
-#if 0
- {
- char *name;
- FILE *f;
- const char *prefix = "d";
- char *dest;
-
- name = (char *) alloca (strlen (prefix) + 10);
- sprintf (name, "%ss%05d.s", prefix, i);
- f = fopen (name, FOPEN_WT);
- fprintf (f, "\t.text\n");
- fprintf (f, "\t%s\t%s%s\n", ASM_GLOBAL, ASM_PREFIX, exp->name);
- if (create_compat_implib)
- fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name);
- fprintf (f, "\t%s\t_imp__%s\n", ASM_GLOBAL, exp->name);
- if (create_compat_implib)
- fprintf (f, "%s%s:\n\t%s\t__imp_%s\n", ASM_PREFIX,
- exp->name, ASM_JUMP, exp->name);
-
- fprintf (f, "\t.section\t.idata$7\t%s To force loading of head\n", ASM_C);
- fprintf (f, "\t%s\t%s\n", ASM_LONG, head_label);
-
-
- fprintf (f,"%s Import Address Table\n", ASM_C);
-
- fprintf (f, "\t.section .idata$5\n");
- if (create_compat_implib)
- fprintf (f, "__imp_%s:\n", exp->name);
- fprintf (f, "_imp__%s:\n", exp->name);
-
- dump_iat (f, exp);
-
- fprintf (f, "\n%s Import Lookup Table\n", ASM_C);
- fprintf (f, "\t.section .idata$4\n");
-
- dump_iat (f, exp);
-
- if(!exp->noname || show_allnames)
- {
- fprintf (f, "%s Hint/Name table\n", ASM_C);
- fprintf (f, "\t.section .idata$6\n");
- fprintf (f, "ID%d:\t%s\t%d\n", exp->ordinal, ASM_SHORT, exp->hint);
- fprintf (f, "\t%s\t\"%s\"\n", ASM_TEXT, xlate (exp->name));
- }
-
- fclose (f);
-
- dest = (char *) alloca (strlen (prefix) + 10);
- sprintf (dest, "%ss%05d.o", prefix, i);
- assemble_file (name, dest);
- }
-#else /* if 0 */
- {
- bfd * abfd;
- asymbol * exp_label;
- asymbol * iname = 0;
- asymbol * iname2;
- asymbol * iname_lab;
- asymbol ** iname_lab_pp;
- asymbol ** iname_pp;
+ bfd * abfd;
+ asymbol * exp_label;
+ asymbol * iname = 0;
+ asymbol * iname2;
+ asymbol * iname_lab;
+ asymbol ** iname_lab_pp;
+ asymbol ** iname_pp;
#ifdef DLLTOOL_PPC
- asymbol ** fn_pp;
- asymbol ** toc_pp;
+ asymbol ** fn_pp;
+ asymbol ** toc_pp;
#define EXTRA 2
#endif
#ifndef EXTRA
#define EXTRA 0
#endif
- asymbol * ptrs[NSECS + 4 + EXTRA + 1];
- flagword applicable;
-
- char * outname = xmalloc (strlen (TMP_STUB) + 10);
- int oidx = 0;
+ asymbol * ptrs[NSECS + 4 + EXTRA + 1];
+ flagword applicable;
+ char * outname = xmalloc (strlen (TMP_STUB) + 10);
+ int oidx = 0;
- sprintf (outname, "%s%05d.o", TMP_STUB, i);
+ sprintf (outname, "%s%05d.o", TMP_STUB, i);
- abfd = bfd_openw (outname, HOW_BFD_WRITE_TARGET);
+ abfd = bfd_openw (outname, HOW_BFD_WRITE_TARGET);
- if (!abfd)
- /* xgettext:c-format */
- fatal (_("bfd_open failed open stub file: %s"), outname);
+ if (!abfd)
+ /* xgettext:c-format */
+ fatal (_("bfd_open failed open stub file: %s"), outname);
- /* xgettext:c-format */
- inform (_("Creating stub file: %s"), outname);
+ /* xgettext:c-format */
+ inform (_("Creating stub file: %s"), outname);
- bfd_set_format (abfd, bfd_object);
- bfd_set_arch_mach (abfd, HOW_BFD_ARCH, 0);
+ bfd_set_format (abfd, bfd_object);
+ bfd_set_arch_mach (abfd, HOW_BFD_ARCH, 0);
#ifdef DLLTOOL_ARM
- if (machine == MARM_INTERWORK || machine == MTHUMB)
- bfd_set_private_flags (abfd, F_INTERWORK);
+ if (machine == MARM_INTERWORK || machine == MTHUMB)
+ bfd_set_private_flags (abfd, F_INTERWORK);
#endif
- applicable = bfd_applicable_section_flags (abfd);
+ applicable = bfd_applicable_section_flags (abfd);
- /* First make symbols for the sections. */
- for (i = 0; i < NSECS; i++)
- {
- sinfo *si = secdata + i;
- if (si->id != i)
- abort();
- si->sec = bfd_make_section_old_way (abfd, si->name);
- bfd_set_section_flags (abfd,
- si->sec,
- si->flags & applicable);
-
- bfd_set_section_alignment(abfd, si->sec, si->align);
- si->sec->output_section = si->sec;
- si->sym = bfd_make_empty_symbol(abfd);
- si->sym->name = si->sec->name;
- si->sym->section = si->sec;
- si->sym->flags = BSF_LOCAL;
- si->sym->value = 0;
- ptrs[oidx] = si->sym;
- si->sympp = ptrs + oidx;
- si->size = 0;
- si->data = NULL;
-
- oidx++;
- }
+ /* First make symbols for the sections. */
+ for (i = 0; i < NSECS; i++)
+ {
+ sinfo *si = secdata + i;
- if (! exp->data)
- {
- exp_label = bfd_make_empty_symbol (abfd);
- exp_label->name = make_imp_label ("", exp->name);
+ if (si->id != i)
+ abort();
+ si->sec = bfd_make_section_old_way (abfd, si->name);
+ bfd_set_section_flags (abfd,
+ si->sec,
+ si->flags & applicable);
- /* On PowerPC, the function name points to a descriptor in
- the rdata section, the first element of which is a
- pointer to the code (..function_name), and the second
- points to the .toc. */
+ bfd_set_section_alignment(abfd, si->sec, si->align);
+ si->sec->output_section = si->sec;
+ si->sym = bfd_make_empty_symbol(abfd);
+ si->sym->name = si->sec->name;
+ si->sym->section = si->sec;
+ si->sym->flags = BSF_LOCAL;
+ si->sym->value = 0;
+ ptrs[oidx] = si->sym;
+ si->sympp = ptrs + oidx;
+ si->size = 0;
+ si->data = NULL;
+
+ oidx++;
+ }
+
+ if (! exp->data)
+ {
+ exp_label = bfd_make_empty_symbol (abfd);
+ exp_label->name = make_imp_label ("", exp->name);
+
+ /* On PowerPC, the function name points to a descriptor in
+ the rdata section, the first element of which is a
+ pointer to the code (..function_name), and the second
+ points to the .toc. */
#ifdef DLLTOOL_PPC
- if (machine == MPPC)
- exp_label->section = secdata[RDATA].sec;
- else
+ if (machine == MPPC)
+ exp_label->section = secdata[RDATA].sec;
+ else
#endif
- exp_label->section = secdata[TEXT].sec;
+ exp_label->section = secdata[TEXT].sec;
- exp_label->flags = BSF_GLOBAL;
- exp_label->value = 0;
+ exp_label->flags = BSF_GLOBAL;
+ exp_label->value = 0;
#ifdef DLLTOOL_ARM
- if (machine == MTHUMB)
- bfd_coff_set_symbol_class (abfd, exp_label, C_THUMBEXTFUNC);
+ if (machine == MTHUMB)
+ bfd_coff_set_symbol_class (abfd, exp_label, C_THUMBEXTFUNC);
#endif
- ptrs[oidx++] = exp_label;
- }
+ ptrs[oidx++] = exp_label;
+ }
- /* Generate imp symbols with one underscore for Microsoft
- compatibility, and with two underscores for backward
- compatibility with old versions of cygwin. */
- if (create_compat_implib)
- {
- iname = bfd_make_empty_symbol (abfd);
- iname->name = make_imp_label ("___imp", exp->name);
- iname->section = secdata[IDATA5].sec;
- iname->flags = BSF_GLOBAL;
- iname->value = 0;
- }
+ /* Generate imp symbols with one underscore for Microsoft
+ compatibility, and with two underscores for backward
+ compatibility with old versions of cygwin. */
+ if (create_compat_implib)
+ {
+ iname = bfd_make_empty_symbol (abfd);
+ iname->name = make_imp_label ("___imp", exp->name);
+ iname->section = secdata[IDATA5].sec;
+ iname->flags = BSF_GLOBAL;
+ iname->value = 0;
+ }
- iname2 = bfd_make_empty_symbol (abfd);
- iname2->name = make_imp_label ("__imp_", exp->name);
- iname2->section = secdata[IDATA5].sec;
- iname2->flags = BSF_GLOBAL;
- iname2->value = 0;
+ iname2 = bfd_make_empty_symbol (abfd);
+ iname2->name = make_imp_label ("__imp_", exp->name);
+ iname2->section = secdata[IDATA5].sec;
+ iname2->flags = BSF_GLOBAL;
+ iname2->value = 0;
- iname_lab = bfd_make_empty_symbol(abfd);
+ iname_lab = bfd_make_empty_symbol (abfd);
- iname_lab->name = head_label;
- iname_lab->section = (asection *)&bfd_und_section;
- iname_lab->flags = 0;
- iname_lab->value = 0;
+ iname_lab->name = head_label;
+ iname_lab->section = (asection *) &bfd_und_section;
+ iname_lab->flags = 0;
+ iname_lab->value = 0;
- iname_pp = ptrs + oidx;
- if (create_compat_implib)
- ptrs[oidx++] = iname;
- ptrs[oidx++] = iname2;
+ iname_pp = ptrs + oidx;
+ if (create_compat_implib)
+ ptrs[oidx++] = iname;
+ ptrs[oidx++] = iname2;
- iname_lab_pp = ptrs + oidx;
- ptrs[oidx++] = iname_lab;
+ iname_lab_pp = ptrs + oidx;
+ ptrs[oidx++] = iname_lab;
#ifdef DLLTOOL_PPC
- /* The symbol referring to the code (.text). */
- {
- asymbol *function_name;
+ /* The symbol referring to the code (.text). */
+ {
+ asymbol *function_name;
- function_name = bfd_make_empty_symbol(abfd);
- function_name->name = make_label ("..", exp->name);
- function_name->section = secdata[TEXT].sec;
- function_name->flags = BSF_GLOBAL;
- function_name->value = 0;
+ function_name = bfd_make_empty_symbol(abfd);
+ function_name->name = make_label ("..", exp->name);
+ function_name->section = secdata[TEXT].sec;
+ function_name->flags = BSF_GLOBAL;
+ function_name->value = 0;
- fn_pp = ptrs + oidx;
- ptrs[oidx++] = function_name;
- }
+ fn_pp = ptrs + oidx;
+ ptrs[oidx++] = function_name;
+ }
- /* The .toc symbol. */
- {
- asymbol *toc_symbol;
+ /* The .toc symbol. */
+ {
+ asymbol *toc_symbol;
- toc_symbol = bfd_make_empty_symbol (abfd);
- toc_symbol->name = make_label (".", "toc");
- toc_symbol->section = (asection *)&bfd_und_section;
- toc_symbol->flags = BSF_GLOBAL;
- toc_symbol->value = 0;
+ toc_symbol = bfd_make_empty_symbol (abfd);
+ toc_symbol->name = make_label (".", "toc");
+ toc_symbol->section = (asection *)&bfd_und_section;
+ toc_symbol->flags = BSF_GLOBAL;
+ toc_symbol->value = 0;
- toc_pp = ptrs + oidx;
- ptrs[oidx++] = toc_symbol;
- }
+ toc_pp = ptrs + oidx;
+ ptrs[oidx++] = toc_symbol;
+ }
#endif
- ptrs[oidx] = 0;
+ ptrs[oidx] = 0;
- for (i = 0; i < NSECS; i++)
- {
- sinfo *si = secdata + i;
- asection *sec = si->sec;
- arelent *rel;
- arelent **rpp;
+ for (i = 0; i < NSECS; i++)
+ {
+ sinfo *si = secdata + i;
+ asection *sec = si->sec;
+ arelent *rel;
+ arelent **rpp;
- switch (i)
+ switch (i)
+ {
+ case TEXT:
+ if (! exp->data)
{
- case TEXT:
- if (! exp->data)
- {
- si->size = HOW_JTAB_SIZE;
- si->data = xmalloc (HOW_JTAB_SIZE);
- memcpy (si->data, HOW_JTAB, HOW_JTAB_SIZE);
-
- /* add the reloc into idata$5 */
- rel = xmalloc (sizeof (arelent));
+ si->size = HOW_JTAB_SIZE;
+ si->data = xmalloc (HOW_JTAB_SIZE);
+ memcpy (si->data, HOW_JTAB, HOW_JTAB_SIZE);
- rpp = xmalloc (sizeof (arelent *) * 2);
- rpp[0] = rel;
- rpp[1] = 0;
-
- rel->address = HOW_JTAB_ROFF;
- rel->addend = 0;
+ /* add the reloc into idata$5 */
+ rel = xmalloc (sizeof (arelent));
- if (machine == MPPC)
- {
- rel->howto = bfd_reloc_type_lookup (abfd,
- BFD_RELOC_16_GOTOFF);
- rel->sym_ptr_ptr = iname_pp;
- }
- else
- {
- rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
- rel->sym_ptr_ptr = secdata[IDATA5].sympp;
- }
- sec->orelocation = rpp;
- sec->reloc_count = 1;
- }
- break;
- case IDATA4:
- case IDATA5:
- /* An idata$4 or idata$5 is one word long, and has an
- rva to idata$6. */
+ rpp = xmalloc (sizeof (arelent *) * 2);
+ rpp[0] = rel;
+ rpp[1] = 0;
- si->data = xmalloc (4);
- si->size = 4;
+ rel->address = HOW_JTAB_ROFF;
+ rel->addend = 0;
- if (exp->noname)
+ if (machine == MPPC)
{
- si->data[0] = exp->ordinal ;
- si->data[1] = exp->ordinal >> 8;
- si->data[2] = exp->ordinal >> 16;
- si->data[3] = 0x80;
+ rel->howto = bfd_reloc_type_lookup (abfd,
+ BFD_RELOC_16_GOTOFF);
+ rel->sym_ptr_ptr = iname_pp;
}
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;
+ rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
+ rel->sym_ptr_ptr = secdata[IDATA5].sympp;
}
+ sec->orelocation = rpp;
+ sec->reloc_count = 1;
+ }
+ break;
+ case IDATA4:
+ case IDATA5:
+ /* An idata$4 or idata$5 is one word long, and has an
+ rva to idata$6. */
- break;
+ si->data = xmalloc (4);
+ si->size = 4;
- case IDATA6:
- if (!exp->noname)
- {
- /* This used to add 1 to exp->hint. I don't know
- why it did that, and it does not match what I see
- in programs compiled with the MS tools. */
- int idx = exp->hint;
- si->size = strlen (xlate (exp->name)) + 3;
- si->data = xmalloc (si->size);
- si->data[0] = idx & 0xff;
- si->data[1] = idx >> 8;
- strcpy (si->data + 2, xlate (exp->name));
- }
- break;
- case IDATA7:
- si->size = 4;
- si->data =xmalloc (4);
+ if (exp->noname)
+ {
+ si->data[0] = exp->ordinal ;
+ si->data[1] = exp->ordinal >> 8;
+ si->data[2] = exp->ordinal >> 16;
+ si->data[3] = 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 = iname_lab_pp;
+ rel->sym_ptr_ptr = secdata[IDATA6].sympp;
sec->orelocation = rpp;
- sec->reloc_count = 1;
- break;
-
-#ifdef DLLTOOL_PPC
- case PDATA:
- {
- /* The .pdata section is 5 words long.
- Think of it as:
- struct
- {
- bfd_vma BeginAddress, [0x00]
- EndAddress, [0x04]
- ExceptionHandler, [0x08]
- HandlerData, [0x0c]
- PrologEndAddress; [0x10]
- }; */
-
- /* So this pdata section setups up this as a glue linkage to
- a dll routine. There are a number of house keeping things
- we need to do:
-
- 1. In the name of glue trickery, the ADDR32 relocs for 0,
- 4, and 0x10 are set to point to the same place:
- "..function_name".
- 2. There is one more reloc needed in the pdata section.
- The actual glue instruction to restore the toc on
- return is saved as the offset in an IMGLUE reloc.
- So we need a total of four relocs for this section.
-
- 3. Lastly, the HandlerData field is set to 0x03, to indicate
- that this is a glue routine. */
- arelent *imglue, *ba_rel, *ea_rel, *pea_rel;
-
- /* Alignment must be set to 2**2 or you get extra stuff. */
- bfd_set_section_alignment(abfd, sec, 2);
-
- si->size = 4 * 5;
- si->data = xmalloc (si->size);
- memset (si->data, 0, si->size);
- rpp = xmalloc (sizeof (arelent *) * 5);
- rpp[0] = imglue = xmalloc (sizeof (arelent));
- rpp[1] = ba_rel = xmalloc (sizeof (arelent));
- rpp[2] = ea_rel = xmalloc (sizeof (arelent));
- rpp[3] = pea_rel = xmalloc (sizeof (arelent));
- rpp[4] = 0;
-
- /* Stick the toc reload instruction in the glue reloc. */
- bfd_put_32(abfd, ppc_glue_insn, (char *) &imglue->address);
-
- imglue->addend = 0;
- imglue->howto = bfd_reloc_type_lookup (abfd,
- BFD_RELOC_32_GOTOFF);
- imglue->sym_ptr_ptr = fn_pp;
-
- ba_rel->address = 0;
- ba_rel->addend = 0;
- ba_rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
- ba_rel->sym_ptr_ptr = fn_pp;
-
- bfd_put_32 (abfd, 0x18, si->data + 0x04);
- ea_rel->address = 4;
- ea_rel->addend = 0;
- ea_rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
- ea_rel->sym_ptr_ptr = fn_pp;
-
- /* Mark it as glue. */
- bfd_put_32 (abfd, 0x03, si->data + 0x0c);
-
- /* Mark the prolog end address. */
- bfd_put_32 (abfd, 0x0D, si->data + 0x10);
- pea_rel->address = 0x10;
- pea_rel->addend = 0;
- pea_rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
- pea_rel->sym_ptr_ptr = fn_pp;
-
- sec->orelocation = rpp;
- sec->reloc_count = 4;
- break;
- }
- case RDATA:
- /* Each external function in a PowerPC PE file has a two word
- descriptor consisting of:
- 1. The address of the code.
- 2. The address of the appropriate .toc
- We use relocs to build this. */
- si->size = 8;
- si->data = xmalloc (8);
- memset (si->data, 0, si->size);
-
- rpp = xmalloc (sizeof (arelent *) * 3);
- rpp[0] = rel = xmalloc (sizeof (arelent));
- rpp[1] = xmalloc (sizeof (arelent));
- rpp[2] = 0;
-
- rel->address = 0;
- rel->addend = 0;
- rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
- rel->sym_ptr_ptr = fn_pp;
+ }
- rel = rpp[1];
+ break;
- rel->address = 4;
- rel->addend = 0;
- rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
- rel->sym_ptr_ptr = toc_pp;
+ case IDATA6:
+ if (!exp->noname)
+ {
+ /* This used to add 1 to exp->hint. I don't know
+ why it did that, and it does not match what I see
+ in programs compiled with the MS tools. */
+ int idx = exp->hint;
+ si->size = strlen (xlate (exp->import_name)) + 3;
+ si->data = xmalloc (si->size);
+ si->data[0] = idx & 0xff;
+ si->data[1] = idx >> 8;
+ strcpy ((char *) si->data + 2, xlate (exp->import_name));
+ }
+ break;
+ case IDATA7:
+ si->size = 4;
+ si->data = xmalloc (4);
+ memset (si->data, 0, si->size);
+ rel = xmalloc (sizeof (arelent));
+ rpp = xmalloc (sizeof (arelent *) * 2);
+ rpp[0] = rel;
+ rel->address = 0;
+ rel->addend = 0;
+ rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_RVA);
+ rel->sym_ptr_ptr = iname_lab_pp;
+ sec->orelocation = rpp;
+ sec->reloc_count = 1;
+ break;
- sec->orelocation = rpp;
- sec->reloc_count = 2;
- break;
+#ifdef DLLTOOL_PPC
+ case PDATA:
+ {
+ /* The .pdata section is 5 words long.
+ Think of it as:
+ struct
+ {
+ bfd_vma BeginAddress, [0x00]
+ EndAddress, [0x04]
+ ExceptionHandler, [0x08]
+ HandlerData, [0x0c]
+ PrologEndAddress; [0x10]
+ }; */
+
+ /* So this pdata section setups up this as a glue linkage to
+ a dll routine. There are a number of house keeping things
+ we need to do:
+
+ 1. In the name of glue trickery, the ADDR32 relocs for 0,
+ 4, and 0x10 are set to point to the same place:
+ "..function_name".
+ 2. There is one more reloc needed in the pdata section.
+ The actual glue instruction to restore the toc on
+ return is saved as the offset in an IMGLUE reloc.
+ So we need a total of four relocs for this section.
+
+ 3. Lastly, the HandlerData field is set to 0x03, to indicate
+ that this is a glue routine. */
+ arelent *imglue, *ba_rel, *ea_rel, *pea_rel;
+
+ /* Alignment must be set to 2**2 or you get extra stuff. */
+ bfd_set_section_alignment(abfd, sec, 2);
+
+ si->size = 4 * 5;
+ si->data = xmalloc (si->size);
+ memset (si->data, 0, si->size);
+ rpp = xmalloc (sizeof (arelent *) * 5);
+ rpp[0] = imglue = xmalloc (sizeof (arelent));
+ rpp[1] = ba_rel = xmalloc (sizeof (arelent));
+ rpp[2] = ea_rel = xmalloc (sizeof (arelent));
+ rpp[3] = pea_rel = xmalloc (sizeof (arelent));
+ rpp[4] = 0;
+
+ /* Stick the toc reload instruction in the glue reloc. */
+ bfd_put_32(abfd, ppc_glue_insn, (char *) &imglue->address);
+
+ imglue->addend = 0;
+ imglue->howto = bfd_reloc_type_lookup (abfd,
+ BFD_RELOC_32_GOTOFF);
+ imglue->sym_ptr_ptr = fn_pp;
+
+ ba_rel->address = 0;
+ ba_rel->addend = 0;
+ ba_rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
+ ba_rel->sym_ptr_ptr = fn_pp;
+
+ bfd_put_32 (abfd, 0x18, si->data + 0x04);
+ ea_rel->address = 4;
+ ea_rel->addend = 0;
+ ea_rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
+ ea_rel->sym_ptr_ptr = fn_pp;
+
+ /* Mark it as glue. */
+ bfd_put_32 (abfd, 0x03, si->data + 0x0c);
+
+ /* Mark the prolog end address. */
+ bfd_put_32 (abfd, 0x0D, si->data + 0x10);
+ pea_rel->address = 0x10;
+ pea_rel->addend = 0;
+ pea_rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
+ pea_rel->sym_ptr_ptr = fn_pp;
+
+ sec->orelocation = rpp;
+ sec->reloc_count = 4;
+ break;
+ }
+ case RDATA:
+ /* Each external function in a PowerPC PE file has a two word
+ descriptor consisting of:
+ 1. The address of the code.
+ 2. The address of the appropriate .toc
+ We use relocs to build this. */
+ si->size = 8;
+ si->data = xmalloc (8);
+ memset (si->data, 0, si->size);
+
+ rpp = xmalloc (sizeof (arelent *) * 3);
+ rpp[0] = rel = xmalloc (sizeof (arelent));
+ rpp[1] = xmalloc (sizeof (arelent));
+ rpp[2] = 0;
+
+ rel->address = 0;
+ rel->addend = 0;
+ rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
+ rel->sym_ptr_ptr = fn_pp;
+
+ rel = rpp[1];
+
+ rel->address = 4;
+ rel->addend = 0;
+ rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
+ rel->sym_ptr_ptr = toc_pp;
+
+ sec->orelocation = rpp;
+ sec->reloc_count = 2;
+ break;
#endif /* DLLTOOL_PPC */
- }
}
+ }
+ {
+ bfd_vma vma = 0;
+ /* Size up all the sections. */
+ for (i = 0; i < NSECS; i++)
{
- bfd_vma vma = 0;
- /* Size up all the sections. */
- for (i = 0; i < NSECS; i++)
- {
- sinfo *si = secdata + i;
+ sinfo *si = secdata + i;
- bfd_set_section_size (abfd, si->sec, si->size);
- bfd_set_section_vma (abfd, si->sec, vma);
-
-/* vma += si->size;*/
- }
+ bfd_set_section_size (abfd, si->sec, si->size);
+ bfd_set_section_vma (abfd, si->sec, vma);
}
- /* Write them out. */
- for (i = 0; i < NSECS; i++)
- {
- sinfo *si = secdata + i;
-
- if (i == IDATA5 && no_idata5)
- continue;
+ }
+ /* Write them out. */
+ for (i = 0; i < NSECS; i++)
+ {
+ sinfo *si = secdata + i;
- if (i == IDATA4 && no_idata4)
- continue;
+ if (i == IDATA5 && no_idata5)
+ continue;
- bfd_set_section_contents (abfd, si->sec,
- si->data, 0,
- si->size);
- }
+ if (i == IDATA4 && no_idata4)
+ continue;
- bfd_set_symtab (abfd, ptrs, oidx);
- bfd_close (abfd);
- abfd = bfd_openr (outname, HOW_BFD_READ_TARGET);
- return abfd;
+ bfd_set_section_contents (abfd, si->sec,
+ si->data, 0,
+ si->size);
}
-#endif
+
+ bfd_set_symtab (abfd, ptrs, oidx);
+ bfd_close (abfd);
+ abfd = bfd_openr (outname, HOW_BFD_READ_TARGET);
+ return abfd;
}
static bfd *
@@ -2805,6 +2730,26 @@ gen_lib_file (void)
n = make_one_lib_file (exp, i);
n->next = head;
head = n;
+ if (ext_prefix_alias)
+ {
+ export_type alias_exp;
+
+ assert (i < PREFIX_ALIAS_BASE);
+ alias_exp.name = make_imp_label (ext_prefix_alias, exp->name);
+ alias_exp.internal_name = exp->internal_name;
+ alias_exp.import_name = exp->name;
+ alias_exp.ordinal = exp->ordinal;
+ alias_exp.constant = exp->constant;
+ alias_exp.noname = exp->noname;
+ alias_exp.private = exp->private;
+ alias_exp.data = exp->data;
+ alias_exp.hint = exp->hint;
+ alias_exp.forward = exp->forward;
+ alias_exp.next = exp->next;
+ n = make_one_lib_file (&alias_exp, i + PREFIX_ALIAS_BASE);
+ n->next = head;
+ head = n;
+ }
}
/* Now stick them all into the archive. */
@@ -2848,6 +2793,13 @@ gen_lib_file (void)
if (unlink (name) < 0)
/* xgettext:c-format */
non_fatal (_("cannot delete %s: %s"), name, strerror (errno));
+ if (ext_prefix_alias)
+ {
+ sprintf (name, "%s%05d.o", TMP_STUB, i + PREFIX_ALIAS_BASE);
+ if (unlink (name) < 0)
+ /* xgettext:c-format */
+ non_fatal (_("cannot delete %s: %s"), name, strerror (errno));
+ }
}
}
@@ -2878,8 +2830,16 @@ nfunc (const void *a, const void *b)
{
export_type *ap = *(export_type **) a;
export_type *bp = *(export_type **) b;
+ const char *an = ap->name;
+ const char *bn = bp->name;
+
+ if (killat)
+ {
+ an = (an[0] == '@') ? an + 1 : an;
+ bn = (bn[0] == '@') ? bn + 1 : bn;
+ }
- return (strcmp (ap->name, bp->name));
+ return (strcmp (an, bn));
}
static void
@@ -2900,27 +2860,6 @@ remove_null_names (export_type **ptr)
}
static void
-dtab (export_type **ptr ATTRIBUTE_UNUSED)
-{
-#ifdef SACDEBUG
- int i;
- for (i = 0; i < d_nfuncs; i++)
- {
- if (ptr[i])
- {
- printf ("%d %s @ %d %s%s%s\n",
- i, ptr[i]->name, ptr[i]->ordinal,
- ptr[i]->noname ? "NONAME " : "",
- ptr[i]->constant ? "CONSTANT" : "",
- ptr[i]->data ? "DATA" : "");
- }
- else
- printf ("empty\n");
- }
-#endif
-}
-
-static void
process_duplicates (export_type **d_export_vec)
{
int more = 1;
@@ -2932,7 +2871,6 @@ process_duplicates (export_type **d_export_vec)
/* Remove duplicates. */
qsort (d_export_vec, d_nfuncs, sizeof (export_type *), nfunc);
- dtab (d_export_vec);
for (i = 0; i < d_nfuncs - 1; i++)
{
if (strcmp (d_export_vec[i]->name,
@@ -2961,9 +2899,7 @@ process_duplicates (export_type **d_export_vec)
d_export_vec[i] = 0;
}
- dtab (d_export_vec);
remove_null_names (d_export_vec);
- dtab (d_export_vec);
}
}
@@ -3047,15 +2983,6 @@ fill_ordinals (export_type **d_export_vec)
}
}
-static int
-alphafunc (const void *av, const void *bv)
-{
- const export_type **a = (const export_type **) av;
- const export_type **b = (const export_type **) bv;
-
- return strcmp ((*a)->name, (*b)->name);
-}
-
static void
mangle_defs (void)
{
@@ -3091,7 +3018,7 @@ mangle_defs (void)
d_exports_lexically[i] = 0;
- qsort (d_exports_lexically, i, sizeof (export_type *), alphafunc);
+ qsort (d_exports_lexically, i, sizeof (export_type *), nfunc);
/* Fill exp entries with their hint values. */
for (i = 0; i < d_nfuncs; i++)
@@ -3122,9 +3049,11 @@ usage (FILE *file, int status)
fprintf (file, _(" -b --base-file <basefile> Read linker generated base file.\n"));
fprintf (file, _(" -x --no-idata4 Don't generate idata$4 section.\n"));
fprintf (file, _(" -c --no-idata5 Don't generate idata$5 section.\n"));
- fprintf (file, _(" -U --add-underscore Add underscores to symbols in interface library.\n"));
+ fprintf (file, _(" -U --add-underscore Add underscores to all symbols in interface library.\n"));
+ fprintf (file, _(" --add-stdcall-underscore Add underscores to stdcall symbols in interface library.\n"));
fprintf (file, _(" -k --kill-at Kill @<n> from exported names.\n"));
fprintf (file, _(" -A --add-stdcall-alias Add aliases without @<n>.\n"));
+ fprintf (file, _(" -p --ext-prefix-alias <prefix> Add aliases with <prefix>.\n"));
fprintf (file, _(" -S --as <name> Use <name> for assembler.\n"));
fprintf (file, _(" -f --as-flags <flags> Pass <flags> to the assembler.\n"));
fprintf (file, _(" -C --compat-implib Create backward compatible import library.\n"));
@@ -3133,6 +3062,7 @@ usage (FILE *file, int status)
fprintf (file, _(" -v --verbose Be verbose.\n"));
fprintf (file, _(" -V --version Display the program version.\n"));
fprintf (file, _(" -h --help Display this information.\n"));
+ fprintf (file, _(" @<file> Read options from <file>.\n"));
#ifdef DLLTOOL_MCORE_ELF
fprintf (file, _(" -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n"));
fprintf (file, _(" -L --linker <name> Use <name> as the linker.\n"));
@@ -3145,6 +3075,7 @@ usage (FILE *file, int status)
#define OPTION_NO_EXPORT_ALL_SYMS (OPTION_EXPORT_ALL_SYMS + 1)
#define OPTION_EXCLUDE_SYMS (OPTION_NO_EXPORT_ALL_SYMS + 1)
#define OPTION_NO_DEFAULT_EXCLUDES (OPTION_EXCLUDE_SYMS + 1)
+#define OPTION_ADD_STDCALL_UNDERSCORE (OPTION_NO_DEFAULT_EXCLUDES + 1)
static const struct option long_options[] =
{
@@ -3162,8 +3093,10 @@ static const struct option long_options[] =
{"def", required_argument, NULL, 'd'}, /* for compatibility with older versions */
{"input-def", required_argument, NULL, 'd'},
{"add-underscore", no_argument, NULL, 'U'},
+ {"add-stdcall-underscore", no_argument, NULL, OPTION_ADD_STDCALL_UNDERSCORE},
{"kill-at", no_argument, NULL, 'k'},
{"add-stdcall-alias", no_argument, NULL, 'A'},
+ {"ext-prefix-alias", required_argument, NULL, 'p'},
{"verbose", no_argument, NULL, 'v'},
{"version", no_argument, NULL, 'V'},
{"help", no_argument, NULL, 'h'},
@@ -3198,11 +3131,13 @@ main (int ac, char **av)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ expandargv (&ac, &av);
+
while ((c = getopt_long (ac, av,
#ifdef DLLTOOL_MCORE_ELF
- "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVHhM:L:F:",
+ "m:e:l:aD:d:z:b:xp:cCuUkAS:f:nvVHhM:L:F:",
#else
- "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVHh",
+ "m:e:l:aD:d:z:b:xp:cCuUkAS:f:nvVHh",
#endif
long_options, 0))
!= EOF)
@@ -3221,6 +3156,9 @@ main (int ac, char **av)
case OPTION_NO_DEFAULT_EXCLUDES:
do_default_excludes = FALSE;
break;
+ case OPTION_ADD_STDCALL_UNDERSCORE:
+ add_stdcall_underscore = 1;
+ break;
case 'x':
no_idata4 = 1;
break;
@@ -3247,7 +3185,10 @@ main (int ac, char **av)
output_def = fopen (optarg, FOPEN_WT);
break;
case 'D':
- dll_name = optarg;
+ dll_name = (char*) lbasename (optarg);
+ if (dll_name != optarg)
+ non_fatal (_("Path components stripped from dllname, '%s'."),
+ optarg);
break;
case 'l':
imp_name = optarg;
@@ -3277,6 +3218,9 @@ main (int ac, char **av)
case 'A':
add_stdcall_alias = 1;
break;
+ case 'p':
+ ext_prefix_alias = optarg;
+ break;
case 'd':
def_file = optarg;
break;
@@ -3326,9 +3270,13 @@ main (int ac, char **av)
if (!dll_name && exp_name)
{
- int len = strlen (exp_name) + 5;
+ /* If we are inferring dll_name from exp_name,
+ strip off any path components, without emitting
+ a warning. */
+ const char* exp_basename = lbasename (exp_name);
+ const int len = strlen (exp_basename) + 5;
dll_name = xmalloc (len);
- strcpy (dll_name, exp_name);
+ strcpy (dll_name, exp_basename);
strcat (dll_name, ".dll");
}
diff --git a/contrib/binutils/binutils/dlltool.h b/contrib/binutils/binutils/dlltool.h
index f488d96c02da..e2634ea258a2 100644
--- a/contrib/binutils/binutils/dlltool.h
+++ b/contrib/binutils/binutils/dlltool.h
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "ansidecl.h"
#include <stdio.h>
diff --git a/contrib/binutils/binutils/dllwrap.c b/contrib/binutils/binutils/dllwrap.c
index e4db7bae5387..f93c75d6fb3f 100644
--- a/contrib/binutils/binutils/dllwrap.c
+++ b/contrib/binutils/binutils/dllwrap.c
@@ -1,5 +1,5 @@
/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Mumit Khan (khan@xraylith.wisc.edu).
This file is part of GNU Binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
@@ -38,12 +38,7 @@
#include <time.h>
#include <sys/stat.h>
-
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
@@ -101,7 +96,7 @@ static target_type which_target = UNKNOWN_TARGET;
static int dontdeltemps = 0;
static int dry_run = 0;
-static char *program_name;
+static char *prog_name;
static int verbose = 0;
@@ -118,9 +113,9 @@ static int run (const char *, char *);
static char *mybasename (const char *);
static int strhash (const char *);
static void usage (FILE *, int);
-static void display (const char *, va_list);
-static void inform (const char *, ...);
-static void warn (const char *, ...);
+static void display (const char *, va_list) ATTRIBUTE_PRINTF(1,0);
+static void inform (const char *, ...) ATTRIBUTE_PRINTF_1;
+static void warn (const char *, ...) ATTRIBUTE_PRINTF_1;
static char *look_for_prog (const char *, const char *, int);
static char *deduce_name (const char *);
static void delete_temp_files (void);
@@ -139,8 +134,8 @@ static void cleanup_and_exit (int);
static void
display (const char * message, va_list args)
{
- if (program_name != NULL)
- fprintf (stderr, "%s: ", program_name);
+ if (prog_name != NULL)
+ fprintf (stderr, "%s: ", prog_name);
vfprintf (stderr, message, args);
fputc ('\n', stderr);
@@ -244,17 +239,20 @@ look_for_prog (const char *prog_name, const char *prefix, int end_prefix)
Returns a dynamically allocated string. */
static char *
-deduce_name (const char *prog_name)
+deduce_name (const char * name)
{
char *cmd;
- char *dash, *slash, *cp;
+ const char *dash;
+ const char *slash;
+ const char *cp;
dash = NULL;
slash = NULL;
- for (cp = program_name; *cp != '\0'; ++cp)
+ for (cp = prog_name; *cp != '\0'; ++cp)
{
if (*cp == '-')
dash = cp;
+
if (
#if defined(__DJGPP__) || defined (__CYGWIN__) || defined(__WIN32__)
*cp == ':' || *cp == '\\' ||
@@ -269,24 +267,18 @@ deduce_name (const char *prog_name)
cmd = NULL;
if (dash != NULL)
- {
- /* First, try looking for a prefixed PROG_NAME in the
- PROGRAM_NAME directory, with the same prefix as PROGRAM_NAME. */
- cmd = look_for_prog (prog_name, program_name, dash - program_name + 1);
- }
+ /* First, try looking for a prefixed NAME in the
+ PROG_NAME directory, with the same prefix as PROG_NAME. */
+ cmd = look_for_prog (name, prog_name, dash - prog_name + 1);
if (slash != NULL && cmd == NULL)
- {
- /* Next, try looking for a PROG_NAME in the same directory as
- that of this program. */
- cmd = look_for_prog (prog_name, program_name, slash - program_name + 1);
- }
+ /* Next, try looking for a NAME in the same directory as
+ that of this program. */
+ cmd = look_for_prog (name, prog_name, slash - prog_name + 1);
if (cmd == NULL)
- {
- /* Just return PROG_NAME as is. */
- cmd = xstrdup (prog_name);
- }
+ /* Just return NAME as is. */
+ cmd = xstrdup (name);
return cmd;
}
@@ -396,14 +388,14 @@ run (const char *what, char *args)
if (dry_run)
return 0;
- pid = pexecute (argv[0], (char * const *) argv, program_name, temp_base,
+ pid = pexecute (argv[0], (char * const *) argv, prog_name, temp_base,
&errmsg_fmt, &errmsg_arg, PEXECUTE_ONE | PEXECUTE_SEARCH);
if (pid == -1)
{
int errno_val = errno;
- fprintf (stderr, "%s: ", program_name);
+ fprintf (stderr, "%s: ", prog_name);
fprintf (stderr, errmsg_fmt, errmsg_arg);
fprintf (stderr, ": %s\n", strerror (errno_val));
return 1;
@@ -479,13 +471,14 @@ strhash (const char *str)
static void
usage (FILE *file, int status)
{
- fprintf (file, _("Usage %s <option(s)> <object-file(s)>\n"), program_name);
+ fprintf (file, _("Usage %s <option(s)> <object-file(s)>\n"), prog_name);
fprintf (file, _(" Generic options:\n"));
+ fprintf (file, _(" @<file> Read options from <file>\n"));
fprintf (file, _(" --quiet, -q Work quietly\n"));
fprintf (file, _(" --verbose, -v Verbose\n"));
fprintf (file, _(" --version Print dllwrap version\n"));
fprintf (file, _(" --implib <outname> Synonym for --output-lib\n"));
- fprintf (file, _(" Options for %s:\n"), program_name);
+ fprintf (file, _(" Options for %s:\n"), prog_name);
fprintf (file, _(" --driver-name <driver> Defaults to \"gcc\"\n"));
fprintf (file, _(" --driver-flags <flags> Override default ld flags\n"));
fprintf (file, _(" --dlltool-name <dlltool> Defaults to \"dlltool\"\n"));
@@ -624,7 +617,7 @@ main (int argc, char **argv)
char *image_base_str = 0;
- program_name = argv[0];
+ prog_name = argv[0];
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
@@ -635,6 +628,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ expandargv (&argc, &argv);
+
saved_argv = (char **) xmalloc (argc * sizeof (char*));
dlltool_arg_indices = (int *) xmalloc (argc * sizeof (int));
driver_arg_indices = (int *) xmalloc (argc * sizeof (int));
@@ -688,7 +683,7 @@ main (int argc, char **argv)
verbose = 1;
break;
case OPTION_VERSION:
- print_version (program_name);
+ print_version (prog_name);
break;
case 'e':
entry_point = optarg;
@@ -781,7 +776,7 @@ main (int argc, char **argv)
}
}
- /* sanity checks. */
+ /* Sanity checks. */
if (! dll_name && ! dll_file_name)
{
warn (_("Must provide at least one of -o or --dllname options"));
@@ -806,6 +801,7 @@ main (int argc, char **argv)
if (! def_file_seen)
{
char *fileprefix = choose_temp_base ();
+
def_file_name = (char *) xmalloc (strlen (fileprefix) + 5);
sprintf (def_file_name, "%s.def",
(dontdeltemps) ? mybasename (fileprefix) : fileprefix);
@@ -816,7 +812,7 @@ main (int argc, char **argv)
Creating one, but that may not be what you want"));
}
- /* set the target platform. */
+ /* Set the target platform. */
if (strstr (target, "cygwin"))
which_target = CYGWIN_TARGET;
else if (strstr (target, "mingw"))
@@ -824,12 +820,11 @@ Creating one, but that may not be what you want"));
else
which_target = UNKNOWN_TARGET;
- /* re-create the command lines as a string, taking care to quote stuff. */
+ /* Re-create the command lines as a string, taking care to quote stuff. */
dlltool_cmdline = dyn_string_new (cmdline_len);
if (verbose)
- {
- dyn_string_append_cstr (dlltool_cmdline, " -v");
- }
+ dyn_string_append_cstr (dlltool_cmdline, " -v");
+
dyn_string_append_cstr (dlltool_cmdline, " --dllname ");
dyn_string_append_cstr (dlltool_cmdline, dll_name);
@@ -922,10 +917,8 @@ Creating one, but that may not be what you want"));
}
}
- /*
- * Step pre-1. If no --def <EXPORT_DEF> is specified, then create it
- * and then pass it on.
- */
+ /* Step pre-1. If no --def <EXPORT_DEF> is specified,
+ then create it and then pass it on. */
if (! def_file_seen)
{
@@ -980,16 +973,13 @@ Creating one, but that may not be what you want"));
fprintf (stderr, _("DRIVER options : %s\n"), driver_cmdline->s);
}
- /*
- * Step 1. Call GCC/LD to create base relocation file. If using GCC, the
- * driver command line will look like the following:
- *
- * % gcc -Wl,--dll --Wl,--base-file,foo.base [rest of command line]
- *
- * If the user does not specify a base name, create temporary one that
- * is deleted at exit.
- *
- */
+ /* Step 1. Call GCC/LD to create base relocation file. If using GCC, the
+ driver command line will look like the following:
+
+ % gcc -Wl,--dll --Wl,--base-file,foo.base [rest of command line]
+
+ If the user does not specify a base name, create temporary one that
+ is deleted at exit. */
if (! base_file_name)
{
@@ -1027,23 +1017,19 @@ Creating one, but that may not be what you want"));
dyn_string_delete (step1);
}
-
-
- /*
- * Step 2. generate the exp file by running dlltool.
- * dlltool command line will look like the following:
- *
- * % dlltool -Wl,--dll --Wl,--base-file,foo.base [rest of command line]
- *
- * If the user does not specify a base name, create temporary one that
- * is deleted at exit.
- *
- */
+ /* Step 2. generate the exp file by running dlltool.
+ dlltool command line will look like the following:
+
+ % dlltool -Wl,--dll --Wl,--base-file,foo.base [rest of command line]
+
+ If the user does not specify a base name, create temporary one that
+ is deleted at exit. */
if (! exp_file_name)
{
char *p = strrchr (dll_name, '.');
- size_t prefix_len = (p) ? p - dll_name : strlen (dll_name);
+ size_t prefix_len = (p) ? (size_t) (p - dll_name) : strlen (dll_name);
+
exp_file_name = (char *) xmalloc (prefix_len + 4 + 1);
strncpy (exp_file_name, dll_name, prefix_len);
exp_file_name[prefix_len] = '\0';
@@ -1053,6 +1039,7 @@ Creating one, but that may not be what you want"));
{
int quote;
+
dyn_string_t step2 = dyn_string_new (dlltool_cmdline->length
+ strlen (base_file_name)
+ strlen (exp_file_name)
diff --git a/contrib/binutils/binutils/doc/Makefile.am b/contrib/binutils/binutils/doc/Makefile.am
index 851f205636f2..1d043e7d3f8b 100644
--- a/contrib/binutils/binutils/doc/Makefile.am
+++ b/contrib/binutils/binutils/doc/Makefile.am
@@ -8,7 +8,7 @@ CONFIG=all
# Options to extract the man page from as.texinfo
MANCONF = -Dman
-TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
+TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
--release="binutils-$(VERSION)" --section=1
@@ -31,110 +31,111 @@ man_MANS = \
$(DEMANGLER_NAME).1
info_TEXINFOS = binutils.texi
-
-config.texi: Makefile
- rm -f config.texi
- echo '@set VERSION $(VERSION)' > config.texi
-
+binutils_TEXINFOS = config.texi
binutils_TEXI = $(srcdir)/binutils.texi
-binutils.dvi: $(binutils_TEXI) config.texi
+AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
+TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
-binutils.info: $(binutils_TEXI) config.texi
+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)
+addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f addr2line.pod
-ar.1: $(binutils_TEXI)
+ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f ar.pod
-dlltool.1: $(binutils_TEXI)
+dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f dlltool.pod
-nlmconv.1: $(binutils_TEXI)
+nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f nlmconv.pod
-nm.1: $(binutils_TEXI)
+nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f nm.pod
-objcopy.1: $(binutils_TEXI)
+objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f objcopy.pod
-objdump.1: $(binutils_TEXI)
+objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f objdump.pod
-ranlib.1: $(binutils_TEXI)
+ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f ranlib.pod
-readelf.1: $(binutils_TEXI)
+readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f readelf.pod
-size.1: $(binutils_TEXI)
+size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f size.pod
-strings.1: $(binutils_TEXI)
+strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f strings.pod
-strip.1: $(binutils_TEXI)
+strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f strip.pod
-windres.1: $(binutils_TEXI)
+windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f windres.pod
-cxxfilt.man: $(binutils_TEXI)
+cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -142,7 +143,6 @@ cxxfilt.man: $(binutils_TEXI)
rm -f $(DEMANGLER_NAME).pod
MAINTAINERCLEANFILES = config.texi
-DISTCLEANFILES = config.texi
MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
$(DEMANGLER_NAME).1: cxxfilt.man Makefile
@@ -157,9 +157,30 @@ $(DEMANGLER_NAME).1: cxxfilt.man Makefile
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
-install: install-info
+install-data-local: install-info
+
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
# Maintenance
# We need it for the taz target in ../../Makefile.in.
-info: $(MANS)
+info-local: $(MANS)
diff --git a/contrib/binutils/binutils/doc/Makefile.in b/contrib/binutils/binutils/doc/Makefile.in
index e05f5bee1e46..ef28ceff8dfb 100644
--- a/contrib/binutils/binutils/doc/Makefile.in
+++ b/contrib/binutils/binutils/doc/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,61 +12,73 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
-SHELL = @SHELL@
-
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(binutils_TEXINFOS)
+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__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+depcomp =
+am__depfiles_maybe =
+SOURCES =
+INFO_DEPS = $(srcdir)/binutils.info
+TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
+DVIS = binutils.dvi
+PDFS = binutils.pdf
+PSS = binutils.ps
+HTMLS = binutils.html
+TEXINFOS = binutils.texi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
+DVIPS = dvips
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)"
+NROFF = nroff
+MANS = $(man_MANS)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
AR = @AR@
-AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
BUILD_DLLTOOL = @BUILD_DLLTOOL@
BUILD_DLLWRAP = @BUILD_DLLWRAP@
BUILD_MISC = @BUILD_MISC@
@@ -74,54 +88,123 @@ BUILD_WINDRES = @BUILD_WINDRES@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
DEMANGLER_NAME = @DEMANGLER_NAME@
-DLLTOOL = @DLLTOOL@
+DEPDIR = @DEPDIR@
DLLTOOL_DEFS = @DLLTOOL_DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EMULATION = @EMULATION@
EMULATION_VECTOR = @EMULATION_VECTOR@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+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@
+LDFLAGS = @LDFLAGS@
LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
NLMCONV_DEFS = @NLMCONV_DEFS@
-OBJDUMP = @OBJDUMP@
+NO_WERROR = @NO_WERROR@
OBJDUMP_DEFS = @OBJDUMP_DEFS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+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@
-bfdincludedir = @bfdincludedir@
-bfdlibdir = @bfdlibdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
l = @l@
-
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
AUTOMAKE_OPTIONS = cygnus
# What version of the manual you want; "all" includes everything
@@ -129,9 +212,7 @@ CONFIG = all
# Options to extract the man page from as.texinfo
MANCONF = -Dman
-
-TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
-
+TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
--release="binutils-$(VERSION)" --section=1
@@ -153,161 +234,168 @@ man_MANS = \
windres.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
-DISTCLEANFILES = config.texi
MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
-TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
-INFO_DEPS = binutils.info
-DVIS = binutils.dvi
-TEXINFOS = binutils.texi
-man1dir = $(mandir)/man1
-MANS = $(man_MANS)
-
-NROFF = nroff
-DIST_COMMON = Makefile.am Makefile.in
-
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+all: all-am
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-all: all-redirect
.SUFFIXES:
-.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-binutils.info: binutils.texi
-binutils.dvi: binutils.texi
-
-
-DVIPS = dvips
+.SUFFIXES: .dvi .html .info .pdf .ps .texi
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
.texi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ 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 $@ $<; \
+ then \
+ rc=0; \
+ cd $(srcdir); \
+ else \
+ rc=$$?; \
+ cd $(srcdir) && \
+ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+ fi; \
+ rm -rf $$backupdir; exit $$rc
.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.texi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.txi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2DVI) $<
+
+.texi.pdf:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2PDF) $<
+
+.texi.html:
+ rm -rf $(@:.html=.htp)
+ if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $(@:.html=.htp) $<; \
+ then \
+ rm -rf $@; \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+ else \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ 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:
- $(DVIPS) $< -o $@
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) -o $@ $<
-install-info-am: $(INFO_DEPS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(infodir)
- @list='$(INFO_DEPS)'; \
- for file in $$list; do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
- if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
- else : ; fi; \
- done; \
- done
- @$(POST_INSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+uninstall-info-am:
+ @$(PRE_UNINSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
- echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
- install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
+ install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
done; \
- else : ; fi
-
-uninstall-info:
- $(PRE_UNINSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- ii=yes; \
- else ii=; fi; \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- test -z "$$ii" \
- || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
- done
+ else :; fi
@$(NORMAL_UNINSTALL)
- list='$(INFO_DEPS)'; \
+ @list='$(INFO_DEPS)'; \
for file in $$list; do \
- (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+ (if cd "$(DESTDIR)$(infodir)"; then \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+ else :; fi); \
done
dist-info: $(INFO_DEPS)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for base in $$list; do \
+ case $$base in \
+ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in `cd $$d && eval echo $$base*`; do \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ for file in $$d/$$base*; do \
+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+ test -f $(distdir)/$$relfile || \
+ cp -p $$file $(distdir)/$$relfile; \
done; \
done
mostlyclean-aminfo:
- -rm -f binutils.aux binutils.cp binutils.cps binutils.dvi binutils.fn \
- binutils.fns binutils.ky binutils.kys binutils.ps \
- binutils.log binutils.pg binutils.toc binutils.tp \
- binutils.tps binutils.vr binutils.vrs binutils.op binutils.tr \
- binutils.cv binutils.cn
-
-clean-aminfo:
-
-distclean-aminfo:
+ -rm -rf binutils.aux binutils.cp binutils.cps binutils.fn binutils.fns \
+ binutils.ky binutils.log binutils.pg binutils.pgs \
+ binutils.tmp binutils.toc binutils.tp binutils.tps \
+ binutils.vr binutils.vrs binutils.dvi binutils.pdf \
+ binutils.ps binutils.html
maintainer-clean-aminfo:
- for i in $(INFO_DEPS); do \
- rm -f $$i; \
- if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
- rm -f $$i-[0-9]*; \
- fi; \
+ @list='$(INFO_DEPS)'; for i in $$list; do \
+ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
-clean-info: mostlyclean-aminfo
-install-man1:
- $(mkinstalldirs) $(DESTDIR)$(man1dir)
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
+clean-info: mostlyclean-aminfo
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
@@ -316,224 +404,270 @@ install-man1:
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
done
-
uninstall-man1:
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
- rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
+ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
done
-install-man: $(MANS)
- @$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-man1
-uninstall-man:
- @$(NORMAL_UNINSTALL)
- $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
tags: TAGS
TAGS:
+ctags: CTAGS
+CTAGS:
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = doc
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-info-am: $(INFO_DEPS)
-info: info-am
-dvi-am: $(DVIS)
-dvi: dvi-am
check-am:
check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
+all-am: Makefile $(MANS)
+installdirs:
+ for dir in "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
install-exec: install-exec-am
-
-install-data-am: install-man
install-data: install-data-am
+uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-man
-uninstall: uninstall-am
-all-am: Makefile $(MANS)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
-
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
+clean: clean-am
-mostlyclean: mostlyclean-am
+clean-am: clean-generic clean-libtool mostlyclean-am
-clean-am: clean-aminfo clean-generic mostlyclean-am
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
-clean: clean-am
+dvi: dvi-am
-distclean-am: distclean-aminfo distclean-generic clean-am
- -rm -f libtool
+dvi-am: $(DVIS)
-distclean: distclean-am
+html: html-am
-maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+html-am: $(HTMLS)
+
+info: info-am
+
+info-am: $(INFO_DEPS) info-local
+
+install-data-am: install-data-local install-man
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+ if test -f $$ifile; then \
+ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
+ $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
+ done; \
+ else : ; fi
+install-man: install-man1
+
+installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+ maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
-.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
-distclean-aminfo clean-aminfo maintainer-clean-aminfo install-man1 \
-uninstall-man1 install-man uninstall-man tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info install-exec-am install-exec install-data-am install-data \
-install-am install uninstall-am uninstall all-redirect all-am all \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
+ mostlyclean-libtool
+pdf: pdf-am
-config.texi: Makefile
- rm -f config.texi
- echo '@set VERSION $(VERSION)' > config.texi
+pdf-am: $(PDFS)
+
+ps: ps-am
-binutils.dvi: $(binutils_TEXI) config.texi
+ps-am: $(PSS)
+
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1
+
+.PHONY: all all-am check check-am clean clean-generic clean-info \
+ clean-libtool dist-info distclean distclean-generic \
+ distclean-libtool dvi dvi-am html html-am info info-am \
+ info-local install install-am install-data install-data-am \
+ install-data-local install-exec install-exec-am install-info \
+ install-info-am install-man install-man1 install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
+ mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
+ uninstall-man uninstall-man1
-binutils.info: $(binutils_TEXI) config.texi
+
+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)
+addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f addr2line.pod
-ar.1: $(binutils_TEXI)
+ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f ar.pod
-dlltool.1: $(binutils_TEXI)
+dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f dlltool.pod
-nlmconv.1: $(binutils_TEXI)
+nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f nlmconv.pod
-nm.1: $(binutils_TEXI)
+nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f nm.pod
-objcopy.1: $(binutils_TEXI)
+objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f objcopy.pod
-objdump.1: $(binutils_TEXI)
+objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f objdump.pod
-ranlib.1: $(binutils_TEXI)
+ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f ranlib.pod
-readelf.1: $(binutils_TEXI)
+readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f readelf.pod
-size.1: $(binutils_TEXI)
+size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f size.pod
-strings.1: $(binutils_TEXI)
+strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f strings.pod
-strip.1: $(binutils_TEXI)
+strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f strip.pod
-windres.1: $(binutils_TEXI)
+windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f windres.pod
-cxxfilt.man: $(binutils_TEXI)
+cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -552,13 +686,31 @@ $(DEMANGLER_NAME).1: cxxfilt.man Makefile
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
-install: install-info
+install-data-local: install-info
+
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
# Maintenance
# We need it for the taz target in ../../Makefile.in.
-info: $(MANS)
-
+info-local: $(MANS)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/binutils/binutils/doc/addr2line.1 b/contrib/binutils/binutils/doc/addr2line.1
index 5808d6588f0e..71d1ea76398d 100644
--- a/contrib/binutils/binutils/doc/addr2line.1
+++ b/contrib/binutils/binutils/doc/addr2line.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "ADDR2LINE 1"
-.TH ADDR2LINE 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.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"
@@ -137,17 +137,20 @@ 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 program addresses into file names and line
-numbers. Given an address and an executable, it uses the debugging
-information in the executable to figure out which file name and line
-number are associated with a given address.
+\&\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 to use is specified with the \fB\-e\fR option. The
-default is the file \fIa.out\fR.
+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
@@ -214,17 +217,49 @@ Display function names as well as file and line number information.
.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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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
index 6708cf43bc7c..5985ca15e448 100644
--- a/contrib/binutils/binutils/doc/ar.1
+++ b/contrib/binutils/binutils/doc/ar.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "AR 1"
-.TH AR 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.TH AR 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
.SH "NAME"
ar \- create, modify, and extract from archives
.SH "SYNOPSIS"
@@ -172,7 +172,7 @@ table. If an archive lacks the table, another form of \fBar\fR called
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 ``librarian''
+with a script supplied via standard input, like the \s-1MRI\s0 \*(L"librarian\*(R"
program.
.SH "OPTIONS"
.IX Header "OPTIONS"
@@ -361,17 +361,30 @@ 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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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 2e787202985c..be571d2a7cc9 100644
--- a/contrib/binutils/binutils/doc/binutils.texi
+++ b/contrib/binutils/binutils/doc/binutils.texi
@@ -1,8 +1,10 @@
\input texinfo @c -*- Texinfo -*-
@setfilename binutils.info
-@c Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+@c Copyright 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@c man begin INCLUDE
@include config.texi
+@c man end
@ifinfo
@format
@@ -29,8 +31,8 @@ END-INFO-DIR-ENTRY
@ifinfo
@c man begin COPYRIGHT
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 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
@@ -54,8 +56,8 @@ notice identical to this one except for the removal of this paragraph
@c This file documents the GNU binary utilities "ar", "ld", "objcopy",
@c "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib".
@c
-@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001,
-@c 2002, 2003 Free Software Foundation, Inc.
+@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 This text may be freely distributed under the terms of the GNU
@c Free Documentation License.
@@ -68,7 +70,7 @@ notice identical to this one except for the removal of this paragraph
@title The @sc{gnu} Binary Utilities
@subtitle Version @value{VERSION}
@sp 1
-@subtitle May 1993
+@subtitle @value{UPDATED}
@author Roland H. Pesch
@author Jeffrey M. Osier
@author Cygnus Support
@@ -80,8 +82,8 @@ notice identical to this one except for the removal of this paragraph
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998, 2000, 2001,
-2002, 2003 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+2000, 2001, 2002, 2003, 2004, 2005, 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
@@ -166,6 +168,7 @@ section entitled "GNU Free Documentation License".
* nlmconv:: Converts object code into an NLM
* windres:: Manipulate Windows 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
@@ -663,7 +666,7 @@ The @sc{gnu} linker @command{ld} is now described in a separate manual.
nm [@option{-a}|@option{--debug-syms}] [@option{-g}|@option{--extern-only}]
[@option{-B}] [@option{-C}|@option{--demangle}[=@var{style}]] [@option{-D}|@option{--dynamic}]
[@option{-S}|@option{--print-size}] [@option{-s}|@option{--print-armap}]
- [@option{-A}|@option{-o}|@option{--print-file-name}]
+ [@option{-A}|@option{-o}|@option{--print-file-name}][@option{--special-syms}]
[@option{-n}|@option{-v}|@option{--numeric-sort}] [@option{-p}|@option{--no-sort}]
[@option{-r}|@option{--reverse-sort}] [@option{--size-sort}] [@option{-u}|@option{--undefined-only}]
[@option{-t} @var{radix}|@option{--radix=}@var{radix}] [@option{-P}|@option{--portability}]
@@ -748,7 +751,10 @@ The symbol is a weak symbol that has not been specifically tagged as a
weak object symbol. When a weak defined symbol is linked with a normal
defined symbol, the normal defined symbol is used with no error.
When a weak undefined symbol is linked and the symbol is not defined,
-the value of the weak symbol becomes zero with no error.
+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.
+
@item -
The symbol is a stabs symbol in an a.out object file. In this case, the
@@ -878,6 +884,14 @@ 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
+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
+data.
+
@item -t @var{radix}
@itemx --radix=@var{radix}
Use @var{radix} as the radix for printing the symbol values. It must be
@@ -936,8 +950,10 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{-g}|@option{--strip-debug}]
[@option{-K} @var{symbolname}|@option{--keep-symbol=}@var{symbolname}]
[@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{-L} @var{symbolname}|@option{--localize-symbol=}@var{symbolname}]
+ [@option{--globalize-symbol=}@var{symbolname}]
[@option{-W} @var{symbolname}|@option{--weaken-symbol=}@var{symbolname}]
[@option{-w}|@option{--wildcard}]
[@option{-x}|@option{--discard-all}]
@@ -967,14 +983,17 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{--weaken}]
[@option{--keep-symbols=}@var{filename}]
[@option{--strip-symbols=}@var{filename}]
+ [@option{--strip-unneeded-symbols=}@var{filename}]
[@option{--keep-global-symbols=}@var{filename}]
[@option{--localize-symbols=}@var{filename}]
+ [@option{--globalize-symbols=}@var{filename}]
[@option{--weaken-symbols=}@var{filename}]
[@option{--alt-machine-code=}@var{index}]
[@option{--prefix-symbols=}@var{string}]
[@option{--prefix-sections=}@var{string}]
[@option{--prefix-alloc-sections=}@var{string}]
[@option{--add-gnu-debuglink=}@var{path-to-file}]
+ [@option{--keep-file-symbols}]
[@option{--only-keep-debug}]
[@option{--writable-text}]
[@option{--readonly-text}]
@@ -1087,14 +1106,18 @@ Strip all symbols that are not needed for relocation processing.
@item -K @var{symbolname}
@itemx --keep-symbol=@var{symbolname}
-Copy only symbol @var{symbolname} from the source file. This option may
-be given more than once.
+When stripping symbols, keep symbol @var{symbolname} even if it would
+normally be stripped. This option may be given more than once.
@item -N @var{symbolname}
@itemx --strip-symbol=@var{symbolname}
Do not copy symbol @var{symbolname} from the source file. This option
may be given more than once.
+@item --strip-unneeded-symbol=@var{symbolname}
+Do not copy symbol @var{symbolname} from the source file unless it is needed
+by a relocation. This option may be given more than once.
+
@item -G @var{symbolname}
@itemx --keep-global-symbol=@var{symbolname}
Keep only symbol @var{symbolname} global. Make all other symbols local
@@ -1110,6 +1133,11 @@ visible externally. This option may be given more than once.
@itemx --weaken-symbol=@var{symbolname}
Make symbol @var{symbolname} weak. This option may be given more than once.
+@item --globalize-symbol=@var{symbolname}
+Give symbol @var{symbolname} global scoping so that it is visible
+outside of the file in which it is defined. This option may be given
+more than once.
+
@item -w
@itemx --wildcard
Permit regular expressions in @var{symbolname}s used in other command
@@ -1336,6 +1364,12 @@ Apply @option{--strip-symbol} option to each symbol listed in the file
name per line. Line comments may be introduced by the hash character.
This option may be given more than once.
+@item --strip-unneeded-symbols=@var{filename}
+Apply @option{--strip-unneeded-symbol} option to each symbol listed in
+the file @var{filename}. @var{filename} is simply a flat file, with one
+symbol name per line. Line comments may be introduced by the hash
+character. This option may be given more than once.
+
@item --keep-global-symbols=@var{filename}
Apply @option{--keep-global-symbol} option to each symbol listed in the
file @var{filename}. @var{filename} is simply a flat file, with one
@@ -1348,6 +1382,12 @@ Apply @option{--localize-symbol} option to each symbol listed in the file
name per line. Line comments may be introduced by the hash character.
This option may be given more than once.
+@item --globalize-symbols=@var{filename}
+Apply @option{--globalize-symbol} option to each symbol listed in the file
+@var{filename}. @var{filename} is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+
@item --weaken-symbols=@var{filename}
Apply @option{--weaken-symbol} option to each symbol listed in the file
@var{filename}. @var{filename} is simply a flat file, with one symbol
@@ -1359,7 +1399,9 @@ If the output architecture has alternate machine codes, use the
@var{index}th code instead of the default one. This is useful in case
a machine is assigned an official code and the tool-chain adopts the
new code, but other applications still depend on the original code
-being used.
+being used. For ELF based architectures if the @var{index}
+alternative does not exist then the value is treated as an absolute
+number to be stored in the e_machine field of the ELF header.
@item --writable-text
Mark the output text as writable. This option isn't meaningful for all
@@ -1391,9 +1433,15 @@ Prefix all the names of all allocated sections in the output file with
Creates a .gnu_debuglink section which contains a reference to @var{path-to-file}
and adds it to the output file.
+@item --keep-file-symbols
+When stripping a file, perhaps with @option{--strip-debug} or
+@option{--strip-unneeded}, retain any symbols specifying source file names,
+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.
The intention is that this option will be used in conjunction with
@option{--add-gnu-debuglink} to create a two part executable. One a
@@ -1424,7 +1472,7 @@ optional. You could instead do this:
@item Run @code{objcopy --add-gnu-debuglink=foo.full foo}
@end enumerate
-ie 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.
@@ -1484,6 +1532,7 @@ objdump [@option{-a}|@option{--archive-headers}]
[@option{-r}|@option{--reloc}]
[@option{-R}|@option{--dynamic-reloc}]
[@option{-s}|@option{--full-contents}]
+ [@option{-W}|@option{--dwarf}]
[@option{-G}|@option{--stabs}]
[@option{-t}|@option{--syms}]
[@option{-T}|@option{--dynamic-syms}]
@@ -1494,6 +1543,7 @@ objdump [@option{-a}|@option{--archive-headers}]
[@option{--prefix-addresses}]
[@option{--[no-]show-raw-insn}]
[@option{--adjust-vma=}@var{offset}]
+ [@option{--special-syms}]
[@option{-V}|@option{--version}]
[@option{-H}|@option{--help}]
@var{objfile}@dots{}
@@ -1674,7 +1724,7 @@ can be placed together into a comma separated list.
If the target is an ARM architecture then this switch can be used to
select which register name set is used during disassembler. Specifying
-@option{-M reg-name-std} (the default) will select the register names as
+@option{-M reg-names-std} (the default) will select the register names as
used in ARM's instruction set documentation, but with register 13 called
'sp', register 14 called 'lr' and register 15 called 'pc'. Specifying
@option{-M reg-names-apcs} will select the name set used by the ARM
@@ -1707,14 +1757,20 @@ 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.
+PowerPC and PowerPC64 disassembly, respectively. @option{e300} selects
+disassembly for the e300 family.
-For MIPS, this option controls the printing of register names in
-disassembled instructions. Multiple selections from the
-following may be specified as a comma separated string, and invalid
-options are ignored:
+For MIPS, 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:
@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',
+'sll' instead of 'nop', etc.
+
@item gpr-names=@var{ABI}
Print GPR (general-purpose register) names as appropriate
for the specified ABI. By default, GPR names are selected according to
@@ -1751,6 +1807,13 @@ rather than names, for the selected types of registers.
You can list the available values of @var{ABI} and @var{ARCH} using
the @option{--help} option.
+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
+of the function being wrongly disassembled.
+
@item -p
@itemx --private-headers
Print information that is specific to the object file format. The exact
@@ -1794,6 +1857,13 @@ in symbolic form. This is the default except when
When disassembling instructions, do not print the instruction bytes.
This is the default when @option{--prefix-addresses} is used.
+@item -W
+@itemx --dwarf
+@cindex DWARF
+@cindex debug symbols
+Displays the contents of the DWARF debug sections in the file, if any
+are present.
+
@item -G
@itemx --stabs
@cindex stab
@@ -1836,6 +1906,11 @@ meaningful for dynamic objects, such as certain types of shared
libraries. This is similar to the information provided by the @samp{nm}
program when given the @option{-D} (@option{--dynamic}) option.
+@item --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.
+
@item -V
@itemx --version
Print the version number of @command{objdump} and exit.
@@ -1846,7 +1921,7 @@ Print the version number of @command{objdump} and exit.
@cindex header information, all
Display all available header information, including the symbol table and
relocation entries. Using @option{-x} is equivalent to specifying all of
-@option{-a -f -h -r -t}.
+@option{-a -f -h -p -r -t}.
@item -w
@itemx --wide
@@ -2158,6 +2233,7 @@ strip [@option{-F} @var{bfdname} |@option{--target=}@var{bfdname}]
[@option{-x}|@option{--discard-all}] [@option{-X} |@option{--discard-locals}]
[@option{-R} @var{sectionname} |@option{--remove-section=}@var{sectionname}]
[@option{-o} @var{file}] [@option{-p}|@option{--preserve-dates}]
+ [@option{--keep-file-symbols}]
[@option{--only-keep-debug}]
[@option{-v} |@option{--verbose}] [@option{-V}|@option{--version}]
[@option{--help}] [@option{--info}]
@@ -2223,8 +2299,8 @@ Remove all symbols that are not needed for relocation processing.
@item -K @var{symbolname}
@itemx --keep-symbol=@var{symbolname}
-Keep only symbol @var{symbolname} from the source file. This option may
-be given more than once.
+When stripping symbols, keep symbol @var{symbolname} even if it would
+normally be stripped. This option may be given more than once.
@item -N @var{symbolname}
@itemx --strip-symbol=@var{symbolname}
@@ -2266,6 +2342,11 @@ Remove non-global symbols.
Remove compiler-generated local symbols.
(These usually start with @samp{L} or @samp{.}.)
+@item --keep-file-symbols
+When stripping a file, perhaps with @option{--strip-debug} or
+@option{--strip-unneeded}, retain any symbols specifying source file names,
+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.
@@ -2332,9 +2413,10 @@ the Info entries for @file{binutils}.
@smallexample
@c man begin SYNOPSIS cxxfilt
c++filt [@option{-_}|@option{--strip-underscores}]
- [@option{-j}|@option{--java}]
[@option{-n}|@option{--no-strip-underscores}]
[@option{-p}|@option{--no-params}]
+ [@option{-t}|@option{--types}]
+ [@option{-i}|@option{--no-verbose}]
[@option{-s} @var{format}|@option{--format=}@var{format}]
[@option{--help}] [@option{--version}] [@var{symbol}@dots{}]
@c man end
@@ -2343,31 +2425,67 @@ c++filt [@option{-_}|@option{--strip-underscores}]
@c man begin DESCRIPTION cxxfilt
@kindex cxxfilt
-The C++ and Java languages provides function overloading, which means
-that you can write many functions with the same name (providing each
-takes parameters of different types). All C++ and Java function names
-are encoded into a low-level assembly label (this process is known as
-@dfn{mangling}). The @command{c++filt}
-@footnote{MS-DOS does not allow @kbd{+} characters in file names, so on
-MS-DOS this program is named @command{cxxfilt}.}
+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 @dfn{mangling}. The
+@command{c++filt}
+@footnote{MS-DOS does not allow @kbd{+} characters in file names, so on
+MS-DOS this program is named @command{CXXFILT}.}
program does the inverse mapping: it decodes (@dfn{demangles}) low-level
-names into user-level names so that the linker can keep these overloaded
-functions from clashing.
+names into user-level names so that they can be read.
Every alphanumeric word (consisting of letters, digits, underscores,
-dollars, or periods) seen in the input is a potential label. If the
-label decodes into a C++ name, the C++ name replaces the low-level
-name in the output.
+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 @command{c++filt} and see the same source file
+containing demangled names.
-You can use @command{c++filt} to decipher individual symbols:
+You can also use @command{c++filt} to decipher individual symbols by
+passing them on the command line:
@example
c++filt @var{symbol}
@end example
If no @var{symbol} arguments are given, @command{c++filt} reads symbol
-names from the standard input and writes the demangled names to the
-standard output. All results are printed on the standard output.
+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:
+
+@smallexample
+c++filt -n _Z1fv
+@end smallexample
+
+will work and demangle the name to ``f()'' whereas:
+
+@smallexample
+c++filt -n _Z1fv,
+@end smallexample
+
+will not work. (Note the extra comma at the end of the mangled
+name which makes it invalid). This command however will work:
+
+@smallexample
+echo _Z1fv, | c++filt -n
+@end smallexample
+
+and will display ``f(),'' 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:
+
+@smallexample
+ .type _Z1fv, @@function
+@end smallexample
@c man end
@@ -2395,6 +2513,19 @@ Do not remove the initial underscore.
When demangling the name of a function, do not display the types of
the function's parameters.
+@item -t
+@itemx --types
+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 ``a'' treated as a mangled type name would be
+demangled to ``signed char''.
+
+@item -i
+@itemx --no-verbose
+Do not include implementation details (if any) in the demangled
+output.
+
@item -s @var{format}
@itemx --format=@var{format}
@command{c++filt} can decode various methods of mangling, used by
@@ -2469,6 +2600,8 @@ addr2line [@option{-b} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{-C}|@option{--demangle}[=@var{style}]]
[@option{-e} @var{filename}|@option{--exe=}@var{filename}]
[@option{-f}|@option{--functions}] [@option{-s}|@option{--basename}]
+ [@option{-i}|@option{--inlines}]
+ [@option{-j}|@option{--section=}@var{name}]
[@option{-H}|@option{--help}] [@option{-V}|@option{--version}]
[addr addr @dots{}]
@c man end
@@ -2476,13 +2609,14 @@ addr2line [@option{-b} @var{bfdname}|@option{--target=}@var{bfdname}]
@c man begin DESCRIPTION addr2line
-@command{addr2line} translates program addresses into file names and line
-numbers. Given an address and an executable, it uses the debugging
-information in the executable to figure out which file name and line
-number are associated with a given address.
+@command{addr2line} 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.
-The executable to use is specified with the @option{-e} option. The
-default is the file @file{a.out}.
+The executable or relocatable object to use is specified with the @option{-e}
+option. The default is the file @file{a.out}. The section in the relocatable
+object to use is specified with the @option{-j} option.
@command{addr2line} has two modes of operation.
@@ -2541,6 +2675,19 @@ Display function names as well as file and line number information.
@item -s
@itemx --basenames
Display only the base of each file name.
+
+@item -i
+@itemx --inlines
+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 @code{main} inlines
+@code{callee1} which inlines @code{callee2}, and address is from
+@code{callee2}, the source information for @code{callee1} and @code{main}
+will also be printed.
+
+@item -j
+@itemx --section
+Read offsets relative to the specified section instead of absolute addresses.
@end table
@c man end
@@ -2837,16 +2984,25 @@ the Info entries for @file{binutils}.
@end ignore
@node dlltool
-@chapter Create files needed to build and use DLLs
+@chapter dlltool
@cindex DLL
@kindex dlltool
-@command{dlltool} may be used to create the files needed to build and use
-dynamic link libraries (DLLs).
+@command{dlltool} is used to create the files needed to create dynamic
+link libraries (DLLs) on systems which understand PE format image
+files such as Windows. A DLL contains an export table which contains
+information that the runtime loader needs to resolve references from a
+referencing program.
+
+The export table is generated by this program by reading in a
+@file{.def} file or scanning the @file{.a} and @file{.o} files which
+will be in the DLL. A @file{.o} file can contain information in
+special @samp{.drectve} sections with export information.
@quotation
-@emph{Warning:} @command{dlltool} is not always built as part of the binary
-utilities, since it is only useful for those targets which support DLLs.
+@emph{Note:} @command{dlltool} is not always built as part of the
+binary utilities, since it is only useful for those targets which
+support DLLs.
@end quotation
@c man title dlltool Create files needed to build and use DLLs.
@@ -2863,8 +3019,10 @@ dlltool [@option{-d}|@option{--input-def} @var{def-file-name}]
[@option{--no-default-excludes}]
[@option{-S}|@option{--as} @var{path-to-assembler}] [@option{-f}|@option{--as-flags} @var{options}]
[@option{-D}|@option{--dllname} @var{name}] [@option{-m}|@option{--machine} @var{machine}]
- [@option{-a}|@option{--add-indirect}] [@option{-U}|@option{--add-underscore}] [@option{-k}|@option{--kill-at}]
- [@option{-A}|@option{--add-stdcall-alias}]
+ [@option{-a}|@option{--add-indirect}]
+ [@option{-U}|@option{--add-underscore}] [@option{--add-stdcall-underscore}]
+ [@option{-k}|@option{--kill-at}] [@option{-A}|@option{--add-stdcall-alias}]
+ [@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}]
@@ -2888,13 +3046,13 @@ When creating a DLL, along with the source for the DLL, it is necessary
to have three other files. @command{dlltool} can help with the creation of
these files.
-The first file is a @samp{.def} file which specifies which functions are
+The first file is a @file{.def} file which specifies which functions are
exported from the DLL, which functions the DLL imports, and so on. This
is a text file and can be created by hand, or @command{dlltool} can be used
to create it using the @option{-z} option. In this case @command{dlltool}
will scan the object files specified on its command line looking for
those functions which have been specially marked as being exported and
-put entries for them in the .def file it creates.
+put entries for them in the @file{.def} file it creates.
In order to mark a function as being exported from a DLL, it needs to
have an @option{-export:<name_of_function>} entry in the @samp{.drectve}
@@ -2912,12 +3070,12 @@ The second file needed for DLL creation is an exports file. This file
is linked with the object files that make up the body of the DLL and it
handles the interface between the DLL and the outside world. This is a
binary file and it can be created by giving the @option{-e} option to
-@command{dlltool} when it is creating or reading in a .def file.
+@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
can be created by giving the @option{-l} option to dlltool when it
-is creating or reading in a .def file.
+is creating or reading in a @file{.def} file.
@command{dlltool} builds the library file by hand, but it builds the
exports file by creating temporary files containing assembler statements
@@ -2951,7 +3109,7 @@ The command line options have the following meanings:
@item -d @var{filename}
@itemx --input-def @var{filename}
@cindex input .def file
-Specifies the name of a .def file to be read in and processed.
+Specifies the name of a @file{.def} file to be read in and processed.
@item -b @var{filename}
@itemx --base-file @var{filename}
@@ -2966,7 +3124,7 @@ Specifies the name of the export file to be created by dlltool.
@item -z @var{filename}
@itemx --output-def @var{filename}
-Specifies the name of the .def file to be created by dlltool.
+Specifies the name of the @file{.def} file to be created by dlltool.
@item -l @var{filename}
@itemx --output-lib @var{filename}
@@ -2980,7 +3138,7 @@ option. You may add to the list of symbols to not export by using the
@option{--exclude-symbols} option.
@item --no-export-all-symbols
-Only export symbols explicitly listed in an input .def file or in
+Only export symbols explicitly listed in an input @file{.def} file or in
@samp{.drectve} sections in the input object files. This is the default
behaviour. The @samp{.drectve} sections are created by @samp{dllexport}
attributes in the source code.
@@ -3016,10 +3174,10 @@ double quotes.
@item -D @var{name}
@itemx --dll-name @var{name}
-Specifies the name to be stored in the .def file as the name of the DLL
-when the @option{-e} option is used. If this option is not present, then
-the filename given to the @option{-e} option will be used as the name of
-the DLL.
+Specifies the name to be stored in the @file{.def} file as the name of
+the DLL when the @option{-e} option is used. If this option is not
+present, then the filename given to the @option{-e} option will be
+used as the name of the DLL.
@item -m @var{machine}
@itemx -machine @var{machine}
@@ -3039,7 +3197,14 @@ means!
@item -U
@itemx --add-underscore
Specifies that when @command{dlltool} is creating the exports file it
-should prepend an underscore to the names of the exported functions.
+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
+should prepend an underscore to the names of exported @emph{stdcall}
+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.
@item -k
@itemx --kill-at
@@ -3054,6 +3219,12 @@ Specifies that when @command{dlltool} is creating the exports file it
should add aliases for stdcall symbols without @samp{@@ <number>}
in addition to the symbols with @samp{@@ <number>}.
+@item -p
+@itemx --ext-prefix-alias @var{prefix}
+Causes @command{dlltool} to create external aliases for all DLL
+imports with the specified prefix. The aliases are created for both
+external and import symbols with no leading underscore.
+
@item -x
@itemx --no-idata4
Specifies that when @command{dlltool} is creating the exports and library
@@ -3101,9 +3272,60 @@ Displays dlltool's version number and then exits.
@c man end
+@menu
+* def file format:: The format of the dlltool @file{.def} file
+@end menu
+
+@node def file format
+@section The format of the @command{dlltool} @file{.def} file
+
+A @file{.def} file contains any number of the following commands:
+
+@table @asis
+
+@item @code{NAME} @var{name} @code{[ ,} @var{base} @code{]}
+The result is going to be named @var{name}@code{.exe}.
+
+@item @code{LIBRARY} @var{name} @code{[ ,} @var{base} @code{]}
+The result is going to be named @var{name}@code{.dll}.
+
+@item @code{EXPORTS ( ( (} @var{name1} @code{[ = } @var{name2} @code{] ) | ( } @var{name1} @code{=} @var{module-name} @code{.} @var{external-name} @code{) )}
+@item @code{[} @var{integer} @code{] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *}
+Declares @var{name1} as an exported symbol from the DLL, with optional
+ordinal number @var{integer}, or declares @var{name1} as an alias
+(forward) of the function @var{external-name} in the DLL
+@var{module-name}.
+
+@item @code{IMPORTS ( (} @var{internal-name} @code{=} @var{module-name} @code{.} @var{integer} @code{) | [} @var{internal-name} @code{= ]} @var{module-name} @code{.} @var{external-name} @code{) ) *}
+Declares that @var{external-name} or the exported function whose
+ordinal number is @var{integer} is to be imported from the file
+@var{module-name}. If @var{internal-name} is specified then this is
+the name that the imported function will be referred to in the body of
+the DLL.
+
+@item @code{DESCRIPTION} @var{string}
+Puts @var{string} into the output @file{.exp} file in the
+@code{.rdata} section.
+
+@item @code{STACKSIZE} @var{number-reserve} @code{[, } @var{number-commit} @code{]}
+@item @code{HEAPSIZE} @var{number-reserve} @code{[, } @var{number-commit} @code{]}
+Generates @code{--stack} or @code{--heap}
+@var{number-reserve},@var{number-commit} in the output @code{.drectve}
+section. The linker will see this and act upon it.
+
+@item @code{CODE} @var{attr} @code{+}
+@item @code{DATA} @var{attr} @code{+}
+@item @code{SECTIONS (} @var{section-name} @var{attr}@code{ + ) *}
+Generates @code{--attr} @var{section-name} @var{attr} in the output
+@code{.drectve} section, where @var{attr} is one of @code{READ},
+@code{WRITE}, @code{EXECUTE} or @code{SHARED}. The linker will see
+this and act upon it.
+
+@end table
+
@ignore
@c man begin SEEALSO dlltool
-the Info entries for @file{binutils}.
+The Info pages for @file{binutils}.
@c man end
@end ignore
@@ -3121,6 +3343,8 @@ readelf [@option{-a}|@option{--all}]
[@option{-h}|@option{--file-header}]
[@option{-l}|@option{--program-headers}|@option{--segments}]
[@option{-S}|@option{--section-headers}|@option{--sections}]
+ [@option{-g}|@option{--section-groups}]
+ [@option{-t}|@option{--section-details}]
[@option{-e}|@option{--headers}]
[@option{-s}|@option{--syms}|@option{--symbols}]
[@option{-n}|@option{--notes}]
@@ -3130,9 +3354,9 @@ readelf [@option{-a}|@option{--all}]
[@option{-V}|@option{--version-info}]
[@option{-A}|@option{--arch-specific}]
[@option{-D}|@option{--use-dynamic}]
- [@option{-x} <number>|@option{--hex-dump=}<number>]
- [@option{-w[liaprmfFso]}|
- @option{--debug-dump}[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames-interp,=str,=loc]]
+ [@option{-x} <number or name>|@option{--hex-dump=}<number or name>]
+ [@option{-w[liaprmfFsoR]}|
+ @option{--debug-dump}[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]]
[@option{-I}|@option{-histogram}]
[@option{-v}|@option{--version}]
[@option{-W}|@option{--wide}]
@@ -3191,6 +3415,17 @@ has any.
Displays the information contained in the file's section headers, if it
has any.
+@item -g
+@itemx --section-groups
+@cindex ELF section group information
+Displays the information contained in the file's section groups, if it
+has any.
+
+@item -t
+@itemx --section-details
+@cindex ELF section information
+Displays the detailed section information. Implies @option{-S}.
+
@item -s
@itemx --symbols
@itemx --syms
@@ -3203,8 +3438,8 @@ Display all the headers in the file. Equivalent to @option{-h -l -S}.
@item -n
@itemx --notes
-@cindex ELF core notes
-Displays the contents of the NOTE segment, if it exists.
+@cindex ELF notes
+Displays the contents of the NOTE segments and/or sections, if any.
@item -r
@itemx --relocs
@@ -3217,12 +3452,6 @@ Displays the contents of the file's relocation section, if it has one.
Displays the contents of the file's unwind section, if it has one. Only
the unwind sections for IA64 ELF files are currently supported.
-@item -u
-@itemx --unwind
-@cindex unwind information
-Displays the contents of the file's unwind section, if it has one. Only
-the unwind sections for IA64 ELF files are currently supported.
-
@item -d
@itemx --dynamic
@cindex ELF dynamic section information
@@ -3245,12 +3474,14 @@ When displaying symbols, this option makes @command{readelf} use the
symbol table in the file's dynamic section, rather than the one in the
symbols section.
-@item -x <number>
-@itemx --hex-dump=<number>
+@item -x <number or name>
+@itemx --hex-dump=<number or name>
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.
-@item -w[liaprmfFso]
-@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames-interp,=str,=loc]
+@item -w[liaprmfFsoR]
+@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]
Displays the contents of the debug sections in the file, if any are
present. If one of the optional letters or words follows the switch
then only data found in those specific sections will be dumped.
@@ -3286,6 +3517,27 @@ objdump(1), and the Info entries for @file{binutils}.
@c man end
@end ignore
+@node Common Options
+@chapter Common Options
+
+The following command-line options are supported by all of the
+programs described in this manual.
+
+@c man begin OPTIONS
+@table @env
+@include at-file.texi
+@c man end
+
+@item --help
+Display the command-line options supported by the program.
+
+@item --version
+Display the version number of the program.
+
+@c man begin OPTIONS
+@end table
+@c man end
+
@node Selecting The Target System
@chapter Selecting the Target System
diff --git a/contrib/binutils/binutils/doc/cxxfilt.man b/contrib/binutils/binutils/doc/cxxfilt.man
index 8cc8eb246c2f..08e77f18ed9d 100644
--- a/contrib/binutils/binutils/doc/cxxfilt.man
+++ b/contrib/binutils/binutils/doc/cxxfilt.man
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,43 +128,80 @@
.\" ========================================================================
.\"
.IX Title "C++FILT 1"
-.TH C++FILT 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.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\-j\fR|\fB\-\-java\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 provides function overloading, which means
-that you can write many functions with the same name (providing each
-takes parameters of different types). All \*(C+ and Java function names
-are encoded into a low-level assembly label (this process is known as
-\&\fImangling\fR). The \fBc++filt\fR
+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 the linker can keep these overloaded
-functions from clashing.
+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 label. If the
-label decodes into a \*(C+ name, the \*(C+ name replaces the low-level
-name in the output.
+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 use \fBc++filt\fR to decipher individual symbols:
+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 and writes the demangled names to the
-standard output. All results are printed on the standard output.
+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
@@ -200,6 +237,25 @@ Do not remove the initial underscore.
.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
@@ -255,22 +311,35 @@ 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 \fBcxxfilt\fR.
+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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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
index c1e4642f9db3..44c5a4e01ddc 100644
--- a/contrib/binutils/binutils/doc/dlltool.1
+++ b/contrib/binutils/binutils/doc/dlltool.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "DLLTOOL 1"
-.TH DLLTOOL 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.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"
@@ -143,8 +143,10 @@ dlltool [\fB\-d\fR|\fB\-\-input\-def\fR \fIdef-file-name\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\-k\fR|\fB\-\-kill\-at\fR]
- [\fB\-A\fR|\fB\-\-add\-stdcall\-alias\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]
@@ -165,13 +167,13 @@ When creating a \s-1DLL\s0, along with the source for the \s-1DLL\s0, it is nece
to have three other files. \fBdlltool\fR can help with the creation of
these files.
.PP
-The first file is a \fB.def\fR file which specifies which functions are
+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 .def file it creates.
+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
@@ -180,7 +182,7 @@ section of the object file. This can be done in C by using the
.PP
.Vb 2
\& asm (".section .drectve");
-\& asm (".ascii \e"-export:my_func\e"");
+\& asm (".ascii \e"\-export:my_func\e"");
.Ve
.PP
.Vb 1
@@ -191,12 +193,12 @@ 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 .def file.
+\&\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 .def file.
+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
@@ -213,10 +215,10 @@ 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
+\& 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"
@@ -227,7 +229,7 @@ The command line options have the following meanings:
.IP "\fB\-\-input\-def\fR \fIfilename\fR" 4
.IX Item "--input-def filename"
.PD
-Specifies the name of a .def file to be read in and processed.
+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
@@ -250,7 +252,7 @@ Specifies the name of the export file to be created by dlltool.
.IP "\fB\-\-output\-def\fR \fIfilename\fR" 4
.IX Item "--output-def filename"
.PD
-Specifies the name of the .def file to be created by dlltool.
+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
@@ -267,7 +269,7 @@ 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 .def file or in
+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.
@@ -312,10 +314,10 @@ double quotes.
.IP "\fB\-\-dll\-name\fR \fIname\fR" 4
.IX Item "--dll-name name"
.PD
-Specifies the name to be stored in the .def 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.
+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
@@ -344,7 +346,14 @@ means!
.IX Item "--add-underscore"
.PD
Specifies that when \fBdlltool\fR is creating the exports file it
-should prepend an underscore to the names of the exported functions.
+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
@@ -364,6 +373,15 @@ function in a \s-1DLL\s0, other than by name.
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
@@ -431,17 +449,30 @@ Displays a list of command line options and then exits.
.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 entries for \fIbinutils\fR.
+The Info pages for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/fdl.texi b/contrib/binutils/binutils/doc/fdl.texi
index f4726b9b149d..cb9b4ae97249 100644
--- a/contrib/binutils/binutils/doc/fdl.texi
+++ b/contrib/binutils/binutils/doc/fdl.texi
@@ -5,8 +5,8 @@
@center Version 1.1, March 2000
@display
-Copyright (C) 2000 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/contrib/binutils/binutils/doc/nm.1 b/contrib/binutils/binutils/doc/nm.1
index c4727752a27f..9f2271c7cbd4 100644
--- a/contrib/binutils/binutils/doc/nm.1
+++ b/contrib/binutils/binutils/doc/nm.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "NM 1"
-.TH NM 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.TH NM 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
.SH "NAME"
nm \- list symbols from object files
.SH "SYNOPSIS"
@@ -136,7 +136,7 @@ nm \- list symbols from object files
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\-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]
@@ -223,7 +223,9 @@ The symbol is a weak symbol that has not been specifically tagged as a
weak object symbol. When a weak defined symbol is linked with a normal
defined symbol, the normal defined symbol is used with no error.
When a weak undefined symbol is linked and the symbol is not defined,
-the value of the weak symbol becomes zero with no error.
+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 "-"
@@ -373,6 +375,14 @@ 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
@@ -410,17 +420,30 @@ 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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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
index 43871d6687b6..828cddef56ec 100644
--- a/contrib/binutils/binutils/doc/objcopy.1
+++ b/contrib/binutils/binutils/doc/objcopy.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "OBJCOPY 1"
-.TH OBJCOPY 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.TH OBJCOPY 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
.SH "NAME"
objcopy \- copy and translate object files
.SH "SYNOPSIS"
@@ -141,8 +141,10 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\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]
@@ -172,14 +174,17 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\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]
@@ -316,8 +321,8 @@ Strip all symbols that are not needed for relocation processing.
.IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4
.IX Item "--keep-symbol=symbolname"
.PD
-Copy only symbol \fIsymbolname\fR from the source file. This option may
-be given more than once.
+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
@@ -326,6 +331,10 @@ be given more than once.
.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
@@ -350,6 +359,11 @@ visible externally. This option may be given more than once.
.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
@@ -364,11 +378,11 @@ point (!) then the sense of the switch is reversed for that symbol.
For example:
.Sp
.Vb 1
-\& -w -W !foo -W fo*
+\& \-w \-W !foo \-W fo*
.Ve
.Sp
-would cause objcopy to weaken all symbols that start with ``fo''
-except for the symbol ``foo''.
+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
@@ -540,8 +554,8 @@ 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
+\& 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
@@ -603,6 +617,12 @@ 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
@@ -615,6 +635,12 @@ 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
@@ -627,7 +653,9 @@ 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.
+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
@@ -658,10 +686,16 @@ Prefix all the names of all allocated sections in the output file with
.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 any sections that would be stripped by
-\&\fB\-\-strip\-debug\fR and leaving the debugging sections.
+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
@@ -707,7 +741,7 @@ optional. You could instead do this:
.RS 4
.PD
.Sp
-ie the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
+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
@@ -732,17 +766,30 @@ 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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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
index 1e9baf570c83..a27423c21ba2 100644
--- a/contrib/binutils/binutils/doc/objdump.1
+++ b/contrib/binutils/binutils/doc/objdump.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "OBJDUMP 1"
-.TH OBJDUMP 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.TH OBJDUMP 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
.SH "NAME"
objdump \- display information from object files.
.SH "SYNOPSIS"
@@ -155,6 +155,7 @@ objdump [\fB\-a\fR|\fB\-\-archive\-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]
@@ -165,6 +166,7 @@ objdump [\fB\-a\fR|\fB\-\-archive\-headers\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...
@@ -214,7 +216,7 @@ automatically recognize many formats.
For example,
.Sp
.Vb 1
-\& objdump -b oasys -m vax -h fu.o
+\& objdump \-b oasys \-m vax \-h fu.o
.Ve
.Sp
displays summary information from the section headers (\fB\-h\fR) of
@@ -368,7 +370,7 @@ 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-name-std\fR (the default) will select the register names as
+\&\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
@@ -401,13 +403,20 @@ 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.
+PowerPC and PowerPC64 disassembly, respectively. \fBe300\fR selects
+disassembly for the e300 family.
.Sp
-For \s-1MIPS\s0, this option controls the printing of register names in
-disassembled instructions. Multiple selections from the
-following may be specified as a comma separated string, and invalid
-options are ignored:
+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"
@@ -451,6 +460,13 @@ For any of the options listed above, \fI\s-1ABI\s0\fR or
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"
@@ -504,6 +520,14 @@ in symbolic form. This is the default except when
.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
@@ -543,6 +567,11 @@ 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
@@ -558,7 +587,7 @@ Print the version number of \fBobjdump\fR and exit.
.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 \-r \-t\fR.
+\&\fB\-a \-f \-h \-p \-r \-t\fR.
.IP "\fB\-w\fR" 4
.IX Item "-w"
.PD 0
@@ -576,17 +605,30 @@ Also do not truncate symbol names when they are displayed.
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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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
index 0d8e4ac548ae..fd03dd02c726 100644
--- a/contrib/binutils/binutils/doc/ranlib.1
+++ b/contrib/binutils/binutils/doc/ranlib.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "RANLIB 1"
-.TH RANLIB 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.TH RANLIB 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
.SH "NAME"
ranlib \- generate index to archive.
.SH "SYNOPSIS"
@@ -159,17 +159,30 @@ The \s-1GNU\s0 \fBranlib\fR program is another form of \s-1GNU\s0 \fBar\fR; runn
.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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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
index 38b5042dc225..14480c7938ea 100644
--- a/contrib/binutils/binutils/doc/readelf.1
+++ b/contrib/binutils/binutils/doc/readelf.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "READELF 1"
-.TH READELF 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.TH READELF 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
.SH "NAME"
readelf \- Displays information about ELF files.
.SH "SYNOPSIS"
@@ -137,6 +137,8 @@ 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]
@@ -146,9 +148,9 @@ readelf [\fB\-a\fR|\fB\-\-all\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>|\fB\-\-hex\-dump=\fR<number>]
- [\fB\-w[liaprmfFso]\fR|
- \fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames\-interp,=str,=loc]]
+ [\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]
@@ -209,6 +211,21 @@ has any.
.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
@@ -231,7 +248,7 @@ Display all the headers in the file. Equivalent to \fB\-h \-l \-S\fR.
.IP "\fB\-\-notes\fR" 4
.IX Item "--notes"
.PD
-Displays the contents of the \s-1NOTE\s0 segment, if it exists.
+Displays the contents of the \s-1NOTE\s0 segments and/or sections, if any.
.IP "\fB\-r\fR" 4
.IX Item "-r"
.PD 0
@@ -279,18 +296,20 @@ is any.
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>\fR" 4
-.IX Item "-x <number>"
+.IP "\fB\-x <number or name>\fR" 4
+.IX Item "-x <number or name>"
.PD 0
-.IP "\fB\-\-hex\-dump=<number>\fR" 4
-.IX Item "--hex-dump=<number>"
+.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.
-.IP "\fB\-w[liaprmfFso]\fR" 4
-.IX Item "-w[liaprmfFso]"
+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,=ranges,=macro,=frames,=frames\-interp,=str,=loc]\fR" 4
-.IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames-interp,=str,=loc]"
+.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
@@ -328,17 +347,30 @@ single line, which is far more readable on terminals wider than 80 columns.
.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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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
index 4bf051258e03..1cf72ac7fe26 100644
--- a/contrib/binutils/binutils/doc/size.1
+++ b/contrib/binutils/binutils/doc/size.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "SIZE 1"
-.TH SIZE 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.TH SIZE 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
.SH "NAME"
size \- list section sizes and total size.
.SH "SYNOPSIS"
@@ -169,7 +169,7 @@ Here is an example of the Berkeley (default) format of output from
\&\fBsize\fR:
.Sp
.Vb 4
-\& $ size --format=Berkeley ranlib size
+\& $ size \-\-format=Berkeley ranlib size
\& text data bss dec hex filename
\& 294880 81920 11592 388392 5ed28 ranlib
\& 294880 81920 11888 388688 5ee50 size
@@ -178,7 +178,7 @@ Here is an example of the Berkeley (default) format of output from
This is the same data, but displayed closer to System V conventions:
.Sp
.Vb 7
-\& $ size --format=SysV ranlib size
+\& $ size \-\-format=SysV ranlib size
\& ranlib :
\& section size addr
\& .text 294880 8192
@@ -234,17 +234,30 @@ automatically recognize many formats.
.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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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
index f3b9be0f2d4a..5cffee121bf4 100644
--- a/contrib/binutils/binutils/doc/strings.1
+++ b/contrib/binutils/binutils/doc/strings.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "STRINGS 1"
-.TH STRINGS 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.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"
@@ -219,18 +219,31 @@ Specify an object code format other than your system's default format.
.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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+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
index 2073020819b4..982255ef754e 100644
--- a/contrib/binutils/binutils/doc/strip.1
+++ b/contrib/binutils/binutils/doc/strip.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "STRIP 1"
-.TH STRIP 1 "2004-04-09" "binutils-2.14.91" "GNU Development Tools"
+.TH STRIP 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
.SH "NAME"
strip \- Discard symbols from object files.
.SH "SYNOPSIS"
@@ -144,6 +144,7 @@ strip [\fB\-F\fR \fIbfdname\fR |\fB\-\-target=\fR\fIbfdname\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]
@@ -223,8 +224,8 @@ Remove all symbols that are not needed for relocation processing.
.IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4
.IX Item "--keep-symbol=symbolname"
.PD
-Keep only symbol \fIsymbolname\fR from the source file. This option may
-be given more than once.
+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
@@ -260,11 +261,11 @@ point (!) then the sense of the switch is reversed for that symbol.
For example:
.Sp
.Vb 1
-\& -w -K !foo -K fo*
+\& \-w \-K !foo \-K fo*
.Ve
.Sp
would cause strip to only keep symbols that start with the letters
-``fo'', but to discard the symbol ``foo''.
+\&\*(L"fo\*(R", but to discard the symbol \*(L"foo\*(R".
.IP "\fB\-x\fR" 4
.IX Item "-x"
.PD 0
@@ -280,6 +281,11 @@ Remove non-global symbols.
.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
@@ -348,17 +354,30 @@ Show the version number for \fBstrip\fR.
.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, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003 Free Software Foundation, Inc.
+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 ``\s-1GNU\s0 Free Documentation License''.
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/dwarf.c b/contrib/binutils/binutils/dwarf.c
new file mode 100644
index 000000000000..c69cab224b28
--- /dev/null
+++ b/contrib/binutils/binutils/dwarf.c
@@ -0,0 +1,3732 @@
+/* dwarf.c -- display DWARF contents of a BFD binary file
+ Copyright 2005, 2006
+ 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 <stdio.h>
+
+#include "dwarf.h"
+
+#include "bucomm.h"
+#include "libiberty.h"
+
+static int have_frame_base;
+static int need_base_address;
+
+static unsigned int last_pointer_size = 0;
+static int warned_about_missing_comp_units = FALSE;
+
+static unsigned int num_debug_info_entries = 0;
+static debug_info *debug_information = NULL;
+
+dwarf_vma eh_addr_size;
+int is_relocatable;
+
+int do_debug_info;
+int do_debug_abbrevs;
+int do_debug_lines;
+int do_debug_pubnames;
+int do_debug_aranges;
+int do_debug_ranges;
+int do_debug_frames;
+int do_debug_frames_interp;
+int do_debug_macinfo;
+int do_debug_str;
+int do_debug_loc;
+
+dwarf_vma (*byte_get) (unsigned char *, int);
+
+dwarf_vma
+byte_get_little_endian (unsigned char *field, int size)
+{
+ switch (size)
+ {
+ case 1:
+ return *field;
+
+ case 2:
+ return ((unsigned int) (field[0]))
+ | (((unsigned int) (field[1])) << 8);
+
+ case 4:
+ return ((unsigned long) (field[0]))
+ | (((unsigned long) (field[1])) << 8)
+ | (((unsigned long) (field[2])) << 16)
+ | (((unsigned long) (field[3])) << 24);
+
+ case 8:
+ if (sizeof (dwarf_vma) == 8)
+ return ((dwarf_vma) (field[0]))
+ | (((dwarf_vma) (field[1])) << 8)
+ | (((dwarf_vma) (field[2])) << 16)
+ | (((dwarf_vma) (field[3])) << 24)
+ | (((dwarf_vma) (field[4])) << 32)
+ | (((dwarf_vma) (field[5])) << 40)
+ | (((dwarf_vma) (field[6])) << 48)
+ | (((dwarf_vma) (field[7])) << 56);
+ else if (sizeof (dwarf_vma) == 4)
+ /* We want to extract data from an 8 byte wide field and
+ place it into a 4 byte wide field. Since this is a little
+ endian source we can just use the 4 byte extraction code. */
+ return ((unsigned long) (field[0]))
+ | (((unsigned long) (field[1])) << 8)
+ | (((unsigned long) (field[2])) << 16)
+ | (((unsigned long) (field[3])) << 24);
+
+ default:
+ error (_("Unhandled data length: %d\n"), size);
+ abort ();
+ }
+}
+
+dwarf_vma
+byte_get_big_endian (unsigned char *field, int size)
+{
+ switch (size)
+ {
+ case 1:
+ return *field;
+
+ case 2:
+ return ((unsigned int) (field[1])) | (((int) (field[0])) << 8);
+
+ case 4:
+ return ((unsigned long) (field[3]))
+ | (((unsigned long) (field[2])) << 8)
+ | (((unsigned long) (field[1])) << 16)
+ | (((unsigned long) (field[0])) << 24);
+
+ case 8:
+ if (sizeof (dwarf_vma) == 8)
+ return ((dwarf_vma) (field[7]))
+ | (((dwarf_vma) (field[6])) << 8)
+ | (((dwarf_vma) (field[5])) << 16)
+ | (((dwarf_vma) (field[4])) << 24)
+ | (((dwarf_vma) (field[3])) << 32)
+ | (((dwarf_vma) (field[2])) << 40)
+ | (((dwarf_vma) (field[1])) << 48)
+ | (((dwarf_vma) (field[0])) << 56);
+ else if (sizeof (dwarf_vma) == 4)
+ {
+ /* Although we are extracing data from an 8 byte wide field,
+ we are returning only 4 bytes of data. */
+ field += 4;
+ return ((unsigned long) (field[3]))
+ | (((unsigned long) (field[2])) << 8)
+ | (((unsigned long) (field[1])) << 16)
+ | (((unsigned long) (field[0])) << 24);
+ }
+
+ default:
+ error (_("Unhandled data length: %d\n"), size);
+ abort ();
+ }
+}
+
+static dwarf_vma
+byte_get_signed (unsigned char *field, int size)
+{
+ dwarf_vma x = byte_get (field, size);
+
+ switch (size)
+ {
+ case 1:
+ return (x ^ 0x80) - 0x80;
+ case 2:
+ return (x ^ 0x8000) - 0x8000;
+ case 4:
+ return (x ^ 0x80000000) - 0x80000000;
+ case 8:
+ return x;
+ default:
+ abort ();
+ }
+}
+
+static unsigned long int
+read_leb128 (unsigned char *data, unsigned int *length_return, int sign)
+{
+ unsigned long int result = 0;
+ unsigned int num_read = 0;
+ unsigned int shift = 0;
+ unsigned char byte;
+
+ do
+ {
+ byte = *data++;
+ num_read++;
+
+ result |= ((unsigned long int) (byte & 0x7f)) << shift;
+
+ shift += 7;
+
+ }
+ while (byte & 0x80);
+
+ if (length_return != NULL)
+ *length_return = num_read;
+
+ if (sign && (shift < 8 * sizeof (result)) && (byte & 0x40))
+ result |= -1L << shift;
+
+ return result;
+}
+
+typedef struct State_Machine_Registers
+{
+ unsigned long address;
+ unsigned int file;
+ unsigned int line;
+ unsigned int column;
+ int is_stmt;
+ int basic_block;
+ int end_sequence;
+/* This variable hold the number of the last entry seen
+ in the File Table. */
+ unsigned int last_file_entry;
+} SMR;
+
+static SMR state_machine_regs;
+
+static void
+reset_state_machine (int is_stmt)
+{
+ state_machine_regs.address = 0;
+ state_machine_regs.file = 1;
+ state_machine_regs.line = 1;
+ state_machine_regs.column = 0;
+ state_machine_regs.is_stmt = is_stmt;
+ state_machine_regs.basic_block = 0;
+ state_machine_regs.end_sequence = 0;
+ state_machine_regs.last_file_entry = 0;
+}
+
+/* Handled an extend line op.
+ Returns the number of bytes read. */
+
+static int
+process_extended_line_op (unsigned char *data, int is_stmt)
+{
+ unsigned char op_code;
+ unsigned int bytes_read;
+ unsigned int len;
+ unsigned char *name;
+ unsigned long adr;
+
+ len = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+
+ if (len == 0)
+ {
+ warn (_("badly formed extended line op encountered!\n"));
+ return bytes_read;
+ }
+
+ len += bytes_read;
+ op_code = *data++;
+
+ printf (_(" Extended opcode %d: "), op_code);
+
+ switch (op_code)
+ {
+ case DW_LNE_end_sequence:
+ printf (_("End of Sequence\n\n"));
+ reset_state_machine (is_stmt);
+ break;
+
+ case DW_LNE_set_address:
+ adr = byte_get (data, len - bytes_read - 1);
+ printf (_("set Address to 0x%lx\n"), adr);
+ state_machine_regs.address = adr;
+ break;
+
+ case DW_LNE_define_file:
+ printf (_(" define new File Table entry\n"));
+ printf (_(" Entry\tDir\tTime\tSize\tName\n"));
+
+ printf (_(" %d\t"), ++state_machine_regs.last_file_entry);
+ name = data;
+ data += strlen ((char *) data) + 1;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ printf (_("%s\n\n"), name);
+ break;
+
+ default:
+ printf (_("UNKNOWN: length %d\n"), len - bytes_read);
+ break;
+ }
+
+ return len;
+}
+
+static const char *
+fetch_indirect_string (unsigned long offset)
+{
+ struct dwarf_section *section = &debug_displays [str].section;
+
+ if (section->start == NULL)
+ return _("<no .debug_str section>");
+
+ /* DWARF sections under Mach-O have non-zero addresses. */
+ offset -= section->address;
+ if (offset > section->size)
+ {
+ warn (_("DW_FORM_strp offset too big: %lx\n"), offset);
+ return _("<offset is too big>");
+ }
+
+ return (const char *) section->start + offset;
+}
+
+/* FIXME: There are better and more efficient ways to handle
+ these structures. For now though, I just want something that
+ is simple to implement. */
+typedef struct abbrev_attr
+{
+ unsigned long attribute;
+ unsigned long form;
+ struct abbrev_attr *next;
+}
+abbrev_attr;
+
+typedef struct abbrev_entry
+{
+ unsigned long entry;
+ unsigned long tag;
+ int children;
+ struct abbrev_attr *first_attr;
+ struct abbrev_attr *last_attr;
+ struct abbrev_entry *next;
+}
+abbrev_entry;
+
+static abbrev_entry *first_abbrev = NULL;
+static abbrev_entry *last_abbrev = NULL;
+
+static void
+free_abbrevs (void)
+{
+ abbrev_entry *abbrev;
+
+ for (abbrev = first_abbrev; abbrev;)
+ {
+ abbrev_entry *next = abbrev->next;
+ abbrev_attr *attr;
+
+ for (attr = abbrev->first_attr; attr;)
+ {
+ abbrev_attr *next = attr->next;
+
+ free (attr);
+ attr = next;
+ }
+
+ free (abbrev);
+ abbrev = next;
+ }
+
+ last_abbrev = first_abbrev = NULL;
+}
+
+static void
+add_abbrev (unsigned long number, unsigned long tag, int children)
+{
+ abbrev_entry *entry;
+
+ entry = malloc (sizeof (*entry));
+
+ if (entry == NULL)
+ /* ugg */
+ return;
+
+ entry->entry = number;
+ entry->tag = tag;
+ entry->children = children;
+ entry->first_attr = NULL;
+ entry->last_attr = NULL;
+ entry->next = NULL;
+
+ if (first_abbrev == NULL)
+ first_abbrev = entry;
+ else
+ last_abbrev->next = entry;
+
+ last_abbrev = entry;
+}
+
+static void
+add_abbrev_attr (unsigned long attribute, unsigned long form)
+{
+ abbrev_attr *attr;
+
+ attr = malloc (sizeof (*attr));
+
+ if (attr == NULL)
+ /* ugg */
+ return;
+
+ attr->attribute = attribute;
+ attr->form = form;
+ attr->next = NULL;
+
+ if (last_abbrev->first_attr == NULL)
+ last_abbrev->first_attr = attr;
+ else
+ last_abbrev->last_attr->next = attr;
+
+ last_abbrev->last_attr = attr;
+}
+
+/* Processes the (partial) contents of a .debug_abbrev section.
+ Returns NULL if the end of the section was encountered.
+ Returns the address after the last byte read if the end of
+ an abbreviation set was found. */
+
+static unsigned char *
+process_abbrev_section (unsigned char *start, unsigned char *end)
+{
+ if (first_abbrev != NULL)
+ return NULL;
+
+ while (start < end)
+ {
+ unsigned int bytes_read;
+ unsigned long entry;
+ unsigned long tag;
+ unsigned long attribute;
+ int children;
+
+ entry = read_leb128 (start, & bytes_read, 0);
+ start += bytes_read;
+
+ /* A single zero is supposed to end the section according
+ to the standard. If there's more, then signal that to
+ the caller. */
+ if (entry == 0)
+ return start == end ? NULL : start;
+
+ tag = read_leb128 (start, & bytes_read, 0);
+ start += bytes_read;
+
+ children = *start++;
+
+ add_abbrev (entry, tag, children);
+
+ do
+ {
+ unsigned long form;
+
+ attribute = read_leb128 (start, & bytes_read, 0);
+ start += bytes_read;
+
+ form = read_leb128 (start, & bytes_read, 0);
+ start += bytes_read;
+
+ if (attribute != 0)
+ add_abbrev_attr (attribute, form);
+ }
+ while (attribute != 0);
+ }
+
+ return NULL;
+}
+
+static char *
+get_TAG_name (unsigned long tag)
+{
+ switch (tag)
+ {
+ case DW_TAG_padding: return "DW_TAG_padding";
+ case DW_TAG_array_type: return "DW_TAG_array_type";
+ case DW_TAG_class_type: return "DW_TAG_class_type";
+ case DW_TAG_entry_point: return "DW_TAG_entry_point";
+ case DW_TAG_enumeration_type: return "DW_TAG_enumeration_type";
+ case DW_TAG_formal_parameter: return "DW_TAG_formal_parameter";
+ case DW_TAG_imported_declaration: return "DW_TAG_imported_declaration";
+ case DW_TAG_label: return "DW_TAG_label";
+ case DW_TAG_lexical_block: return "DW_TAG_lexical_block";
+ case DW_TAG_member: return "DW_TAG_member";
+ case DW_TAG_pointer_type: return "DW_TAG_pointer_type";
+ case DW_TAG_reference_type: return "DW_TAG_reference_type";
+ case DW_TAG_compile_unit: return "DW_TAG_compile_unit";
+ case DW_TAG_string_type: return "DW_TAG_string_type";
+ case DW_TAG_structure_type: return "DW_TAG_structure_type";
+ case DW_TAG_subroutine_type: return "DW_TAG_subroutine_type";
+ case DW_TAG_typedef: return "DW_TAG_typedef";
+ case DW_TAG_union_type: return "DW_TAG_union_type";
+ case DW_TAG_unspecified_parameters: return "DW_TAG_unspecified_parameters";
+ case DW_TAG_variant: return "DW_TAG_variant";
+ case DW_TAG_common_block: return "DW_TAG_common_block";
+ case DW_TAG_common_inclusion: return "DW_TAG_common_inclusion";
+ case DW_TAG_inheritance: return "DW_TAG_inheritance";
+ case DW_TAG_inlined_subroutine: return "DW_TAG_inlined_subroutine";
+ case DW_TAG_module: return "DW_TAG_module";
+ case DW_TAG_ptr_to_member_type: return "DW_TAG_ptr_to_member_type";
+ case DW_TAG_set_type: return "DW_TAG_set_type";
+ case DW_TAG_subrange_type: return "DW_TAG_subrange_type";
+ case DW_TAG_with_stmt: return "DW_TAG_with_stmt";
+ case DW_TAG_access_declaration: return "DW_TAG_access_declaration";
+ case DW_TAG_base_type: return "DW_TAG_base_type";
+ case DW_TAG_catch_block: return "DW_TAG_catch_block";
+ case DW_TAG_const_type: return "DW_TAG_const_type";
+ case DW_TAG_constant: return "DW_TAG_constant";
+ case DW_TAG_enumerator: return "DW_TAG_enumerator";
+ case DW_TAG_file_type: return "DW_TAG_file_type";
+ case DW_TAG_friend: return "DW_TAG_friend";
+ case DW_TAG_namelist: return "DW_TAG_namelist";
+ case DW_TAG_namelist_item: return "DW_TAG_namelist_item";
+ case DW_TAG_packed_type: return "DW_TAG_packed_type";
+ case DW_TAG_subprogram: return "DW_TAG_subprogram";
+ case DW_TAG_template_type_param: return "DW_TAG_template_type_param";
+ case DW_TAG_template_value_param: return "DW_TAG_template_value_param";
+ case DW_TAG_thrown_type: return "DW_TAG_thrown_type";
+ case DW_TAG_try_block: return "DW_TAG_try_block";
+ case DW_TAG_variant_part: return "DW_TAG_variant_part";
+ case DW_TAG_variable: return "DW_TAG_variable";
+ case DW_TAG_volatile_type: return "DW_TAG_volatile_type";
+ case DW_TAG_MIPS_loop: return "DW_TAG_MIPS_loop";
+ case DW_TAG_format_label: return "DW_TAG_format_label";
+ case DW_TAG_function_template: return "DW_TAG_function_template";
+ case DW_TAG_class_template: return "DW_TAG_class_template";
+ /* DWARF 2.1 values. */
+ case DW_TAG_dwarf_procedure: return "DW_TAG_dwarf_procedure";
+ case DW_TAG_restrict_type: return "DW_TAG_restrict_type";
+ case DW_TAG_interface_type: return "DW_TAG_interface_type";
+ case DW_TAG_namespace: return "DW_TAG_namespace";
+ case DW_TAG_imported_module: return "DW_TAG_imported_module";
+ case DW_TAG_unspecified_type: return "DW_TAG_unspecified_type";
+ case DW_TAG_partial_unit: return "DW_TAG_partial_unit";
+ case DW_TAG_imported_unit: return "DW_TAG_imported_unit";
+ /* UPC values. */
+ case DW_TAG_upc_shared_type: return "DW_TAG_upc_shared_type";
+ case DW_TAG_upc_strict_type: return "DW_TAG_upc_strict_type";
+ case DW_TAG_upc_relaxed_type: return "DW_TAG_upc_relaxed_type";
+ default:
+ {
+ static char buffer[100];
+
+ snprintf (buffer, sizeof (buffer), _("Unknown TAG value: %lx"), tag);
+ return buffer;
+ }
+ }
+}
+
+static char *
+get_FORM_name (unsigned long form)
+{
+ switch (form)
+ {
+ case DW_FORM_addr: return "DW_FORM_addr";
+ case DW_FORM_block2: return "DW_FORM_block2";
+ case DW_FORM_block4: return "DW_FORM_block4";
+ case DW_FORM_data2: return "DW_FORM_data2";
+ case DW_FORM_data4: return "DW_FORM_data4";
+ case DW_FORM_data8: return "DW_FORM_data8";
+ case DW_FORM_string: return "DW_FORM_string";
+ case DW_FORM_block: return "DW_FORM_block";
+ case DW_FORM_block1: return "DW_FORM_block1";
+ case DW_FORM_data1: return "DW_FORM_data1";
+ case DW_FORM_flag: return "DW_FORM_flag";
+ case DW_FORM_sdata: return "DW_FORM_sdata";
+ case DW_FORM_strp: return "DW_FORM_strp";
+ case DW_FORM_udata: return "DW_FORM_udata";
+ case DW_FORM_ref_addr: return "DW_FORM_ref_addr";
+ case DW_FORM_ref1: return "DW_FORM_ref1";
+ case DW_FORM_ref2: return "DW_FORM_ref2";
+ case DW_FORM_ref4: return "DW_FORM_ref4";
+ case DW_FORM_ref8: return "DW_FORM_ref8";
+ case DW_FORM_ref_udata: return "DW_FORM_ref_udata";
+ case DW_FORM_indirect: return "DW_FORM_indirect";
+ default:
+ {
+ static char buffer[100];
+
+ snprintf (buffer, sizeof (buffer), _("Unknown FORM value: %lx"), form);
+ return buffer;
+ }
+ }
+}
+
+static unsigned char *
+display_block (unsigned char *data, unsigned long length)
+{
+ printf (_(" %lu byte block: "), length);
+
+ while (length --)
+ printf ("%lx ", (unsigned long) byte_get (data++, 1));
+
+ return data;
+}
+
+static int
+decode_location_expression (unsigned char * data,
+ unsigned int pointer_size,
+ unsigned long length,
+ unsigned long cu_offset)
+{
+ unsigned op;
+ unsigned int bytes_read;
+ unsigned long uvalue;
+ unsigned char *end = data + length;
+ int need_frame_base = 0;
+
+ while (data < end)
+ {
+ op = *data++;
+
+ switch (op)
+ {
+ case DW_OP_addr:
+ printf ("DW_OP_addr: %lx",
+ (unsigned long) byte_get (data, pointer_size));
+ data += pointer_size;
+ break;
+ case DW_OP_deref:
+ printf ("DW_OP_deref");
+ break;
+ case DW_OP_const1u:
+ printf ("DW_OP_const1u: %lu", (unsigned long) byte_get (data++, 1));
+ break;
+ case DW_OP_const1s:
+ printf ("DW_OP_const1s: %ld", (long) byte_get_signed (data++, 1));
+ break;
+ case DW_OP_const2u:
+ printf ("DW_OP_const2u: %lu", (unsigned long) byte_get (data, 2));
+ data += 2;
+ break;
+ case DW_OP_const2s:
+ printf ("DW_OP_const2s: %ld", (long) byte_get_signed (data, 2));
+ data += 2;
+ break;
+ case DW_OP_const4u:
+ printf ("DW_OP_const4u: %lu", (unsigned long) byte_get (data, 4));
+ data += 4;
+ break;
+ case DW_OP_const4s:
+ printf ("DW_OP_const4s: %ld", (long) byte_get_signed (data, 4));
+ data += 4;
+ break;
+ case DW_OP_const8u:
+ printf ("DW_OP_const8u: %lu %lu", (unsigned long) byte_get (data, 4),
+ (unsigned long) byte_get (data + 4, 4));
+ data += 8;
+ break;
+ case DW_OP_const8s:
+ printf ("DW_OP_const8s: %ld %ld", (long) byte_get (data, 4),
+ (long) byte_get (data + 4, 4));
+ data += 8;
+ break;
+ case DW_OP_constu:
+ printf ("DW_OP_constu: %lu", read_leb128 (data, &bytes_read, 0));
+ data += bytes_read;
+ break;
+ case DW_OP_consts:
+ printf ("DW_OP_consts: %ld", read_leb128 (data, &bytes_read, 1));
+ data += bytes_read;
+ break;
+ case DW_OP_dup:
+ printf ("DW_OP_dup");
+ break;
+ case DW_OP_drop:
+ printf ("DW_OP_drop");
+ break;
+ case DW_OP_over:
+ printf ("DW_OP_over");
+ break;
+ case DW_OP_pick:
+ printf ("DW_OP_pick: %ld", (unsigned long) byte_get (data++, 1));
+ break;
+ case DW_OP_swap:
+ printf ("DW_OP_swap");
+ break;
+ case DW_OP_rot:
+ printf ("DW_OP_rot");
+ break;
+ case DW_OP_xderef:
+ printf ("DW_OP_xderef");
+ break;
+ case DW_OP_abs:
+ printf ("DW_OP_abs");
+ break;
+ case DW_OP_and:
+ printf ("DW_OP_and");
+ break;
+ case DW_OP_div:
+ printf ("DW_OP_div");
+ break;
+ case DW_OP_minus:
+ printf ("DW_OP_minus");
+ break;
+ case DW_OP_mod:
+ printf ("DW_OP_mod");
+ break;
+ case DW_OP_mul:
+ printf ("DW_OP_mul");
+ break;
+ case DW_OP_neg:
+ printf ("DW_OP_neg");
+ break;
+ case DW_OP_not:
+ printf ("DW_OP_not");
+ break;
+ case DW_OP_or:
+ printf ("DW_OP_or");
+ break;
+ case DW_OP_plus:
+ printf ("DW_OP_plus");
+ break;
+ case DW_OP_plus_uconst:
+ printf ("DW_OP_plus_uconst: %lu",
+ read_leb128 (data, &bytes_read, 0));
+ data += bytes_read;
+ break;
+ case DW_OP_shl:
+ printf ("DW_OP_shl");
+ break;
+ case DW_OP_shr:
+ printf ("DW_OP_shr");
+ break;
+ case DW_OP_shra:
+ printf ("DW_OP_shra");
+ break;
+ case DW_OP_xor:
+ printf ("DW_OP_xor");
+ break;
+ case DW_OP_bra:
+ printf ("DW_OP_bra: %ld", (long) byte_get_signed (data, 2));
+ data += 2;
+ break;
+ case DW_OP_eq:
+ printf ("DW_OP_eq");
+ break;
+ case DW_OP_ge:
+ printf ("DW_OP_ge");
+ break;
+ case DW_OP_gt:
+ printf ("DW_OP_gt");
+ break;
+ case DW_OP_le:
+ printf ("DW_OP_le");
+ break;
+ case DW_OP_lt:
+ printf ("DW_OP_lt");
+ break;
+ case DW_OP_ne:
+ printf ("DW_OP_ne");
+ break;
+ case DW_OP_skip:
+ printf ("DW_OP_skip: %ld", (long) byte_get_signed (data, 2));
+ data += 2;
+ break;
+
+ case DW_OP_lit0:
+ case DW_OP_lit1:
+ case DW_OP_lit2:
+ case DW_OP_lit3:
+ case DW_OP_lit4:
+ case DW_OP_lit5:
+ case DW_OP_lit6:
+ case DW_OP_lit7:
+ case DW_OP_lit8:
+ case DW_OP_lit9:
+ case DW_OP_lit10:
+ case DW_OP_lit11:
+ case DW_OP_lit12:
+ case DW_OP_lit13:
+ case DW_OP_lit14:
+ case DW_OP_lit15:
+ case DW_OP_lit16:
+ case DW_OP_lit17:
+ case DW_OP_lit18:
+ case DW_OP_lit19:
+ case DW_OP_lit20:
+ case DW_OP_lit21:
+ case DW_OP_lit22:
+ case DW_OP_lit23:
+ case DW_OP_lit24:
+ case DW_OP_lit25:
+ case DW_OP_lit26:
+ case DW_OP_lit27:
+ case DW_OP_lit28:
+ case DW_OP_lit29:
+ case DW_OP_lit30:
+ case DW_OP_lit31:
+ printf ("DW_OP_lit%d", op - DW_OP_lit0);
+ break;
+
+ case DW_OP_reg0:
+ case DW_OP_reg1:
+ case DW_OP_reg2:
+ case DW_OP_reg3:
+ case DW_OP_reg4:
+ case DW_OP_reg5:
+ case DW_OP_reg6:
+ case DW_OP_reg7:
+ case DW_OP_reg8:
+ case DW_OP_reg9:
+ case DW_OP_reg10:
+ case DW_OP_reg11:
+ case DW_OP_reg12:
+ case DW_OP_reg13:
+ case DW_OP_reg14:
+ case DW_OP_reg15:
+ case DW_OP_reg16:
+ case DW_OP_reg17:
+ case DW_OP_reg18:
+ case DW_OP_reg19:
+ case DW_OP_reg20:
+ case DW_OP_reg21:
+ case DW_OP_reg22:
+ case DW_OP_reg23:
+ case DW_OP_reg24:
+ case DW_OP_reg25:
+ case DW_OP_reg26:
+ case DW_OP_reg27:
+ case DW_OP_reg28:
+ case DW_OP_reg29:
+ case DW_OP_reg30:
+ case DW_OP_reg31:
+ printf ("DW_OP_reg%d", op - DW_OP_reg0);
+ break;
+
+ case DW_OP_breg0:
+ case DW_OP_breg1:
+ case DW_OP_breg2:
+ case DW_OP_breg3:
+ case DW_OP_breg4:
+ case DW_OP_breg5:
+ case DW_OP_breg6:
+ case DW_OP_breg7:
+ case DW_OP_breg8:
+ case DW_OP_breg9:
+ case DW_OP_breg10:
+ case DW_OP_breg11:
+ case DW_OP_breg12:
+ case DW_OP_breg13:
+ case DW_OP_breg14:
+ case DW_OP_breg15:
+ case DW_OP_breg16:
+ case DW_OP_breg17:
+ case DW_OP_breg18:
+ case DW_OP_breg19:
+ case DW_OP_breg20:
+ case DW_OP_breg21:
+ case DW_OP_breg22:
+ case DW_OP_breg23:
+ case DW_OP_breg24:
+ case DW_OP_breg25:
+ case DW_OP_breg26:
+ case DW_OP_breg27:
+ case DW_OP_breg28:
+ case DW_OP_breg29:
+ case DW_OP_breg30:
+ case DW_OP_breg31:
+ printf ("DW_OP_breg%d: %ld", op - DW_OP_breg0,
+ read_leb128 (data, &bytes_read, 1));
+ data += bytes_read;
+ break;
+
+ case DW_OP_regx:
+ printf ("DW_OP_regx: %lu", read_leb128 (data, &bytes_read, 0));
+ data += bytes_read;
+ break;
+ case DW_OP_fbreg:
+ need_frame_base = 1;
+ printf ("DW_OP_fbreg: %ld", read_leb128 (data, &bytes_read, 1));
+ data += bytes_read;
+ break;
+ case DW_OP_bregx:
+ uvalue = read_leb128 (data, &bytes_read, 0);
+ data += bytes_read;
+ printf ("DW_OP_bregx: %lu %ld", uvalue,
+ read_leb128 (data, &bytes_read, 1));
+ data += bytes_read;
+ break;
+ case DW_OP_piece:
+ printf ("DW_OP_piece: %lu", read_leb128 (data, &bytes_read, 0));
+ data += bytes_read;
+ break;
+ case DW_OP_deref_size:
+ printf ("DW_OP_deref_size: %ld", (long) byte_get (data++, 1));
+ break;
+ case DW_OP_xderef_size:
+ printf ("DW_OP_xderef_size: %ld", (long) byte_get (data++, 1));
+ break;
+ case DW_OP_nop:
+ printf ("DW_OP_nop");
+ break;
+
+ /* DWARF 3 extensions. */
+ case DW_OP_push_object_address:
+ printf ("DW_OP_push_object_address");
+ break;
+ case DW_OP_call2:
+ /* XXX: Strictly speaking for 64-bit DWARF3 files
+ this ought to be an 8-byte wide computation. */
+ printf ("DW_OP_call2: <%lx>", (long) byte_get (data, 2) + cu_offset);
+ data += 2;
+ break;
+ case DW_OP_call4:
+ /* XXX: Strictly speaking for 64-bit DWARF3 files
+ this ought to be an 8-byte wide computation. */
+ printf ("DW_OP_call4: <%lx>", (long) byte_get (data, 4) + cu_offset);
+ data += 4;
+ break;
+ case DW_OP_call_ref:
+ printf ("DW_OP_call_ref");
+ break;
+
+ /* GNU extensions. */
+ case DW_OP_GNU_push_tls_address:
+ printf ("DW_OP_GNU_push_tls_address");
+ break;
+
+ default:
+ if (op >= DW_OP_lo_user
+ && op <= DW_OP_hi_user)
+ printf (_("(User defined location op)"));
+ else
+ printf (_("(Unknown location op)"));
+ /* No way to tell where the next op is, so just bail. */
+ return need_frame_base;
+ }
+
+ /* Separate the ops. */
+ if (data < end)
+ printf ("; ");
+ }
+
+ return need_frame_base;
+}
+
+static unsigned char *
+read_and_display_attr_value (unsigned long attribute,
+ unsigned long form,
+ unsigned char *data,
+ unsigned long cu_offset,
+ unsigned long pointer_size,
+ unsigned long offset_size,
+ int dwarf_version,
+ debug_info *debug_info_p,
+ int do_loc)
+{
+ unsigned long uvalue = 0;
+ unsigned char *block_start = NULL;
+ unsigned int bytes_read;
+
+ switch (form)
+ {
+ default:
+ break;
+
+ case DW_FORM_ref_addr:
+ if (dwarf_version == 2)
+ {
+ uvalue = byte_get (data, pointer_size);
+ data += pointer_size;
+ }
+ else if (dwarf_version == 3)
+ {
+ uvalue = byte_get (data, offset_size);
+ data += offset_size;
+ }
+ else
+ {
+ error (_("Internal error: DWARF version is not 2 or 3.\n"));
+ }
+ break;
+
+ case DW_FORM_addr:
+ uvalue = byte_get (data, pointer_size);
+ data += pointer_size;
+ break;
+
+ case DW_FORM_strp:
+ uvalue = byte_get (data, offset_size);
+ data += offset_size;
+ break;
+
+ case DW_FORM_ref1:
+ case DW_FORM_flag:
+ case DW_FORM_data1:
+ uvalue = byte_get (data++, 1);
+ break;
+
+ case DW_FORM_ref2:
+ case DW_FORM_data2:
+ uvalue = byte_get (data, 2);
+ data += 2;
+ break;
+
+ case DW_FORM_ref4:
+ case DW_FORM_data4:
+ uvalue = byte_get (data, 4);
+ data += 4;
+ break;
+
+ case DW_FORM_sdata:
+ uvalue = read_leb128 (data, & bytes_read, 1);
+ data += bytes_read;
+ break;
+
+ case DW_FORM_ref_udata:
+ case DW_FORM_udata:
+ uvalue = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ break;
+
+ case DW_FORM_indirect:
+ form = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ if (!do_loc)
+ printf (" %s", get_FORM_name (form));
+ return read_and_display_attr_value (attribute, form, data,
+ cu_offset, pointer_size,
+ offset_size, dwarf_version,
+ debug_info_p, do_loc);
+ }
+
+ switch (form)
+ {
+ case DW_FORM_ref_addr:
+ if (!do_loc)
+ printf (" <#%lx>", uvalue);
+ break;
+
+ case DW_FORM_ref1:
+ case DW_FORM_ref2:
+ case DW_FORM_ref4:
+ case DW_FORM_ref_udata:
+ if (!do_loc)
+ printf (" <%lx>", uvalue + cu_offset);
+ break;
+
+ case DW_FORM_data4:
+ case DW_FORM_addr:
+ if (!do_loc)
+ printf (" %#lx", uvalue);
+ break;
+
+ case DW_FORM_flag:
+ case DW_FORM_data1:
+ case DW_FORM_data2:
+ case DW_FORM_sdata:
+ case DW_FORM_udata:
+ if (!do_loc)
+ printf (" %ld", uvalue);
+ break;
+
+ case DW_FORM_ref8:
+ case DW_FORM_data8:
+ if (!do_loc)
+ {
+ uvalue = byte_get (data, 4);
+ printf (" %lx", uvalue);
+ printf (" %lx", (unsigned long) byte_get (data + 4, 4));
+ }
+ if ((do_loc || do_debug_loc || do_debug_ranges)
+ && num_debug_info_entries == 0)
+ {
+ if (sizeof (uvalue) == 8)
+ uvalue = byte_get (data, 8);
+ else
+ error (_("DW_FORM_data8 is unsupported when sizeof (unsigned long) != 8\n"));
+ }
+ data += 8;
+ break;
+
+ case DW_FORM_string:
+ if (!do_loc)
+ printf (" %s", data);
+ data += strlen ((char *) data) + 1;
+ break;
+
+ case DW_FORM_block:
+ uvalue = read_leb128 (data, & bytes_read, 0);
+ block_start = data + bytes_read;
+ if (do_loc)
+ data = block_start + uvalue;
+ else
+ data = display_block (block_start, uvalue);
+ break;
+
+ case DW_FORM_block1:
+ uvalue = byte_get (data, 1);
+ block_start = data + 1;
+ if (do_loc)
+ data = block_start + uvalue;
+ else
+ data = display_block (block_start, uvalue);
+ break;
+
+ case DW_FORM_block2:
+ uvalue = byte_get (data, 2);
+ block_start = data + 2;
+ if (do_loc)
+ data = block_start + uvalue;
+ else
+ data = display_block (block_start, uvalue);
+ break;
+
+ case DW_FORM_block4:
+ uvalue = byte_get (data, 4);
+ block_start = data + 4;
+ if (do_loc)
+ data = block_start + uvalue;
+ else
+ data = display_block (block_start, uvalue);
+ break;
+
+ case DW_FORM_strp:
+ if (!do_loc)
+ printf (_(" (indirect string, offset: 0x%lx): %s"),
+ uvalue, fetch_indirect_string (uvalue));
+ break;
+
+ case DW_FORM_indirect:
+ /* Handled above. */
+ break;
+
+ default:
+ warn (_("Unrecognized form: %lu\n"), form);
+ break;
+ }
+
+ /* For some attributes we can display further information. */
+ if ((do_loc || do_debug_loc || do_debug_ranges)
+ && num_debug_info_entries == 0)
+ {
+ switch (attribute)
+ {
+ case DW_AT_frame_base:
+ have_frame_base = 1;
+ case DW_AT_location:
+ case DW_AT_data_member_location:
+ case DW_AT_vtable_elem_location:
+ case DW_AT_allocated:
+ case DW_AT_associated:
+ case DW_AT_data_location:
+ case DW_AT_stride:
+ case DW_AT_upper_bound:
+ case DW_AT_lower_bound:
+ if (form == DW_FORM_data4 || form == DW_FORM_data8)
+ {
+ /* Process location list. */
+ unsigned int max = debug_info_p->max_loc_offsets;
+ unsigned int num = debug_info_p->num_loc_offsets;
+
+ if (max == 0 || num >= max)
+ {
+ max += 1024;
+ debug_info_p->loc_offsets
+ = xcrealloc (debug_info_p->loc_offsets,
+ max, sizeof (*debug_info_p->loc_offsets));
+ debug_info_p->have_frame_base
+ = xcrealloc (debug_info_p->have_frame_base,
+ max, sizeof (*debug_info_p->have_frame_base));
+ debug_info_p->max_loc_offsets = max;
+ }
+ debug_info_p->loc_offsets [num] = uvalue;
+ debug_info_p->have_frame_base [num] = have_frame_base;
+ debug_info_p->num_loc_offsets++;
+ }
+ break;
+
+ case DW_AT_low_pc:
+ if (need_base_address)
+ debug_info_p->base_address = uvalue;
+ break;
+
+ case DW_AT_ranges:
+ if (form == DW_FORM_data4 || form == DW_FORM_data8)
+ {
+ /* Process range list. */
+ unsigned int max = debug_info_p->max_range_lists;
+ unsigned int num = debug_info_p->num_range_lists;
+
+ if (max == 0 || num >= max)
+ {
+ max += 1024;
+ debug_info_p->range_lists
+ = xcrealloc (debug_info_p->range_lists,
+ max, sizeof (*debug_info_p->range_lists));
+ debug_info_p->max_range_lists = max;
+ }
+ debug_info_p->range_lists [num] = uvalue;
+ debug_info_p->num_range_lists++;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if (do_loc)
+ return data;
+
+ printf ("\t");
+
+ switch (attribute)
+ {
+ case DW_AT_inline:
+ switch (uvalue)
+ {
+ case DW_INL_not_inlined:
+ printf (_("(not inlined)"));
+ break;
+ case DW_INL_inlined:
+ printf (_("(inlined)"));
+ break;
+ case DW_INL_declared_not_inlined:
+ printf (_("(declared as inline but ignored)"));
+ break;
+ case DW_INL_declared_inlined:
+ printf (_("(declared as inline and inlined)"));
+ break;
+ default:
+ printf (_(" (Unknown inline attribute value: %lx)"), uvalue);
+ break;
+ }
+ break;
+
+ case DW_AT_language:
+ switch (uvalue)
+ {
+ case DW_LANG_C: printf ("(non-ANSI C)"); break;
+ case DW_LANG_C89: printf ("(ANSI C)"); break;
+ case DW_LANG_C_plus_plus: printf ("(C++)"); break;
+ case DW_LANG_Fortran77: printf ("(FORTRAN 77)"); break;
+ case DW_LANG_Fortran90: printf ("(Fortran 90)"); break;
+ case DW_LANG_Modula2: printf ("(Modula 2)"); break;
+ case DW_LANG_Pascal83: printf ("(ANSI Pascal)"); break;
+ case DW_LANG_Ada83: printf ("(Ada)"); break;
+ case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
+ case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
+ /* DWARF 2.1 values. */
+ case DW_LANG_C99: printf ("(ANSI C99)"); break;
+ case DW_LANG_Ada95: printf ("(ADA 95)"); break;
+ case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
+ /* MIPS extension. */
+ case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
+ /* UPC extension. */
+ case DW_LANG_Upc: printf ("(Unified Parallel C)"); break;
+ default:
+ printf ("(Unknown: %lx)", uvalue);
+ break;
+ }
+ break;
+
+ case DW_AT_encoding:
+ switch (uvalue)
+ {
+ case DW_ATE_void: printf ("(void)"); break;
+ case DW_ATE_address: printf ("(machine address)"); break;
+ case DW_ATE_boolean: printf ("(boolean)"); break;
+ case DW_ATE_complex_float: printf ("(complex float)"); break;
+ case DW_ATE_float: printf ("(float)"); break;
+ case DW_ATE_signed: printf ("(signed)"); break;
+ case DW_ATE_signed_char: printf ("(signed char)"); break;
+ case DW_ATE_unsigned: printf ("(unsigned)"); break;
+ case DW_ATE_unsigned_char: printf ("(unsigned char)"); break;
+ /* DWARF 2.1 value. */
+ case DW_ATE_imaginary_float: printf ("(imaginary float)"); break;
+ case DW_ATE_decimal_float: printf ("(decimal float)"); break;
+ default:
+ if (uvalue >= DW_ATE_lo_user
+ && uvalue <= DW_ATE_hi_user)
+ printf ("(user defined type)");
+ else
+ printf ("(unknown type)");
+ break;
+ }
+ break;
+
+ case DW_AT_accessibility:
+ switch (uvalue)
+ {
+ case DW_ACCESS_public: printf ("(public)"); break;
+ case DW_ACCESS_protected: printf ("(protected)"); break;
+ case DW_ACCESS_private: printf ("(private)"); break;
+ default:
+ printf ("(unknown accessibility)");
+ break;
+ }
+ break;
+
+ case DW_AT_visibility:
+ switch (uvalue)
+ {
+ case DW_VIS_local: printf ("(local)"); break;
+ case DW_VIS_exported: printf ("(exported)"); break;
+ case DW_VIS_qualified: printf ("(qualified)"); break;
+ default: printf ("(unknown visibility)"); break;
+ }
+ break;
+
+ case DW_AT_virtuality:
+ switch (uvalue)
+ {
+ case DW_VIRTUALITY_none: printf ("(none)"); break;
+ case DW_VIRTUALITY_virtual: printf ("(virtual)"); break;
+ case DW_VIRTUALITY_pure_virtual:printf ("(pure_virtual)"); break;
+ default: printf ("(unknown virtuality)"); break;
+ }
+ break;
+
+ case DW_AT_identifier_case:
+ switch (uvalue)
+ {
+ case DW_ID_case_sensitive: printf ("(case_sensitive)"); break;
+ case DW_ID_up_case: printf ("(up_case)"); break;
+ case DW_ID_down_case: printf ("(down_case)"); break;
+ case DW_ID_case_insensitive: printf ("(case_insensitive)"); break;
+ default: printf ("(unknown case)"); break;
+ }
+ break;
+
+ case DW_AT_calling_convention:
+ switch (uvalue)
+ {
+ case DW_CC_normal: printf ("(normal)"); break;
+ case DW_CC_program: printf ("(program)"); break;
+ case DW_CC_nocall: printf ("(nocall)"); break;
+ default:
+ if (uvalue >= DW_CC_lo_user
+ && uvalue <= DW_CC_hi_user)
+ printf ("(user defined)");
+ else
+ printf ("(unknown convention)");
+ }
+ break;
+
+ case DW_AT_ordering:
+ switch (uvalue)
+ {
+ case -1: printf ("(undefined)"); break;
+ case 0: printf ("(row major)"); break;
+ case 1: printf ("(column major)"); break;
+ }
+ break;
+
+ case DW_AT_frame_base:
+ have_frame_base = 1;
+ case DW_AT_location:
+ case DW_AT_data_member_location:
+ case DW_AT_vtable_elem_location:
+ case DW_AT_allocated:
+ case DW_AT_associated:
+ case DW_AT_data_location:
+ case DW_AT_stride:
+ case DW_AT_upper_bound:
+ case DW_AT_lower_bound:
+ if (block_start)
+ {
+ int need_frame_base;
+
+ printf ("(");
+ need_frame_base = decode_location_expression (block_start,
+ pointer_size,
+ uvalue,
+ cu_offset);
+ printf (")");
+ if (need_frame_base && !have_frame_base)
+ printf (_(" [without DW_AT_frame_base]"));
+ }
+ else if (form == DW_FORM_data4 || form == DW_FORM_data8)
+ printf (_("(location list)"));
+
+ break;
+
+ default:
+ break;
+ }
+
+ return data;
+}
+
+static char *
+get_AT_name (unsigned long attribute)
+{
+ switch (attribute)
+ {
+ case DW_AT_sibling: return "DW_AT_sibling";
+ case DW_AT_location: return "DW_AT_location";
+ case DW_AT_name: return "DW_AT_name";
+ case DW_AT_ordering: return "DW_AT_ordering";
+ case DW_AT_subscr_data: return "DW_AT_subscr_data";
+ case DW_AT_byte_size: return "DW_AT_byte_size";
+ case DW_AT_bit_offset: return "DW_AT_bit_offset";
+ case DW_AT_bit_size: return "DW_AT_bit_size";
+ case DW_AT_element_list: return "DW_AT_element_list";
+ case DW_AT_stmt_list: return "DW_AT_stmt_list";
+ case DW_AT_low_pc: return "DW_AT_low_pc";
+ case DW_AT_high_pc: return "DW_AT_high_pc";
+ case DW_AT_language: return "DW_AT_language";
+ case DW_AT_member: return "DW_AT_member";
+ case DW_AT_discr: return "DW_AT_discr";
+ case DW_AT_discr_value: return "DW_AT_discr_value";
+ case DW_AT_visibility: return "DW_AT_visibility";
+ case DW_AT_import: return "DW_AT_import";
+ case DW_AT_string_length: return "DW_AT_string_length";
+ case DW_AT_common_reference: return "DW_AT_common_reference";
+ case DW_AT_comp_dir: return "DW_AT_comp_dir";
+ case DW_AT_const_value: return "DW_AT_const_value";
+ case DW_AT_containing_type: return "DW_AT_containing_type";
+ case DW_AT_default_value: return "DW_AT_default_value";
+ case DW_AT_inline: return "DW_AT_inline";
+ case DW_AT_is_optional: return "DW_AT_is_optional";
+ case DW_AT_lower_bound: return "DW_AT_lower_bound";
+ case DW_AT_producer: return "DW_AT_producer";
+ case DW_AT_prototyped: return "DW_AT_prototyped";
+ case DW_AT_return_addr: return "DW_AT_return_addr";
+ case DW_AT_start_scope: return "DW_AT_start_scope";
+ case DW_AT_stride_size: return "DW_AT_stride_size";
+ case DW_AT_upper_bound: return "DW_AT_upper_bound";
+ case DW_AT_abstract_origin: return "DW_AT_abstract_origin";
+ case DW_AT_accessibility: return "DW_AT_accessibility";
+ case DW_AT_address_class: return "DW_AT_address_class";
+ case DW_AT_artificial: return "DW_AT_artificial";
+ case DW_AT_base_types: return "DW_AT_base_types";
+ case DW_AT_calling_convention: return "DW_AT_calling_convention";
+ case DW_AT_count: return "DW_AT_count";
+ case DW_AT_data_member_location: return "DW_AT_data_member_location";
+ case DW_AT_decl_column: return "DW_AT_decl_column";
+ case DW_AT_decl_file: return "DW_AT_decl_file";
+ case DW_AT_decl_line: return "DW_AT_decl_line";
+ case DW_AT_declaration: return "DW_AT_declaration";
+ case DW_AT_discr_list: return "DW_AT_discr_list";
+ case DW_AT_encoding: return "DW_AT_encoding";
+ case DW_AT_external: return "DW_AT_external";
+ case DW_AT_frame_base: return "DW_AT_frame_base";
+ case DW_AT_friend: return "DW_AT_friend";
+ case DW_AT_identifier_case: return "DW_AT_identifier_case";
+ case DW_AT_macro_info: return "DW_AT_macro_info";
+ case DW_AT_namelist_items: return "DW_AT_namelist_items";
+ case DW_AT_priority: return "DW_AT_priority";
+ case DW_AT_segment: return "DW_AT_segment";
+ case DW_AT_specification: return "DW_AT_specification";
+ case DW_AT_static_link: return "DW_AT_static_link";
+ case DW_AT_type: return "DW_AT_type";
+ case DW_AT_use_location: return "DW_AT_use_location";
+ case DW_AT_variable_parameter: return "DW_AT_variable_parameter";
+ case DW_AT_virtuality: return "DW_AT_virtuality";
+ case DW_AT_vtable_elem_location: return "DW_AT_vtable_elem_location";
+ /* DWARF 2.1 values. */
+ case DW_AT_allocated: return "DW_AT_allocated";
+ case DW_AT_associated: return "DW_AT_associated";
+ case DW_AT_data_location: return "DW_AT_data_location";
+ case DW_AT_stride: return "DW_AT_stride";
+ case DW_AT_entry_pc: return "DW_AT_entry_pc";
+ case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
+ case DW_AT_extension: return "DW_AT_extension";
+ case DW_AT_ranges: return "DW_AT_ranges";
+ case DW_AT_trampoline: return "DW_AT_trampoline";
+ case DW_AT_call_column: return "DW_AT_call_column";
+ case DW_AT_call_file: return "DW_AT_call_file";
+ case DW_AT_call_line: return "DW_AT_call_line";
+ /* SGI/MIPS extensions. */
+ case DW_AT_MIPS_fde: return "DW_AT_MIPS_fde";
+ case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";
+ case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";
+ case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin";
+ case DW_AT_MIPS_loop_unroll_factor: return "DW_AT_MIPS_loop_unroll_factor";
+ case DW_AT_MIPS_software_pipeline_depth:
+ return "DW_AT_MIPS_software_pipeline_depth";
+ case DW_AT_MIPS_linkage_name: return "DW_AT_MIPS_linkage_name";
+ case DW_AT_MIPS_stride: return "DW_AT_MIPS_stride";
+ case DW_AT_MIPS_abstract_name: return "DW_AT_MIPS_abstract_name";
+ case DW_AT_MIPS_clone_origin: return "DW_AT_MIPS_clone_origin";
+ case DW_AT_MIPS_has_inlines: return "DW_AT_MIPS_has_inlines";
+ /* GNU extensions. */
+ case DW_AT_sf_names: return "DW_AT_sf_names";
+ case DW_AT_src_info: return "DW_AT_src_info";
+ case DW_AT_mac_info: return "DW_AT_mac_info";
+ case DW_AT_src_coords: return "DW_AT_src_coords";
+ case DW_AT_body_begin: return "DW_AT_body_begin";
+ case DW_AT_body_end: return "DW_AT_body_end";
+ case DW_AT_GNU_vector: return "DW_AT_GNU_vector";
+ /* UPC extension. */
+ case DW_AT_upc_threads_scaled: return "DW_AT_upc_threads_scaled";
+ default:
+ {
+ static char buffer[100];
+
+ snprintf (buffer, sizeof (buffer), _("Unknown AT value: %lx"),
+ attribute);
+ return buffer;
+ }
+ }
+}
+
+static unsigned char *
+read_and_display_attr (unsigned long attribute,
+ unsigned long form,
+ unsigned char *data,
+ unsigned long cu_offset,
+ unsigned long pointer_size,
+ unsigned long offset_size,
+ int dwarf_version,
+ debug_info *debug_info_p,
+ int do_loc)
+{
+ if (!do_loc)
+ printf (" %-18s:", get_AT_name (attribute));
+ data = read_and_display_attr_value (attribute, form, data, cu_offset,
+ pointer_size, offset_size,
+ dwarf_version, debug_info_p,
+ do_loc);
+ if (!do_loc)
+ printf ("\n");
+ return data;
+}
+
+
+/* Process the contents of a .debug_info section. If do_loc is non-zero
+ then we are scanning for location lists and we do not want to display
+ anything to the user. */
+
+static int
+process_debug_info (struct dwarf_section *section, void *file,
+ int do_loc)
+{
+ unsigned char *start = section->start;
+ unsigned char *end = start + section->size;
+ unsigned char *section_begin;
+ unsigned int unit;
+ unsigned int num_units = 0;
+
+ if ((do_loc || do_debug_loc || do_debug_ranges)
+ && num_debug_info_entries == 0)
+ {
+ unsigned long length;
+
+ /* First scan the section to get the number of comp units. */
+ for (section_begin = start, num_units = 0; section_begin < end;
+ num_units ++)
+ {
+ /* Read the first 4 bytes. For a 32-bit DWARF section, this
+ will be the length. For a 64-bit DWARF section, it'll be
+ the escape code 0xffffffff followed by an 8 byte length. */
+ length = byte_get (section_begin, 4);
+
+ if (length == 0xffffffff)
+ {
+ length = byte_get (section_begin + 4, 8);
+ section_begin += length + 12;
+ }
+ else
+ section_begin += length + 4;
+ }
+
+ if (num_units == 0)
+ {
+ error (_("No comp units in %s section ?"), section->name);
+ return 0;
+ }
+
+ /* Then allocate an array to hold the information. */
+ debug_information = cmalloc (num_units,
+ sizeof (* debug_information));
+ if (debug_information == NULL)
+ {
+ error (_("Not enough memory for a debug info array of %u entries"),
+ num_units);
+ return 0;
+ }
+ }
+
+ if (!do_loc)
+ {
+ printf (_("The section %s contains:\n\n"), section->name);
+
+ load_debug_section (str, file);
+ }
+
+ load_debug_section (abbrev, file);
+ if (debug_displays [abbrev].section.start == NULL)
+ {
+ warn (_("Unable to locate %s section!\n"),
+ debug_displays [abbrev].section.name);
+ return 0;
+ }
+
+ for (section_begin = start, unit = 0; start < end; unit++)
+ {
+ DWARF2_Internal_CompUnit compunit;
+ unsigned char *hdrptr;
+ unsigned char *cu_abbrev_offset_ptr;
+ unsigned char *tags;
+ int level;
+ unsigned long cu_offset;
+ int offset_size;
+ int initial_length_size;
+
+ hdrptr = start;
+
+ compunit.cu_length = byte_get (hdrptr, 4);
+ hdrptr += 4;
+
+ if (compunit.cu_length == 0xffffffff)
+ {
+ compunit.cu_length = byte_get (hdrptr, 8);
+ hdrptr += 8;
+ offset_size = 8;
+ initial_length_size = 12;
+ }
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
+ }
+
+ compunit.cu_version = byte_get (hdrptr, 2);
+ 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);
+ hdrptr += offset_size;
+
+ compunit.cu_pointer_size = byte_get (hdrptr, 1);
+ hdrptr += 1;
+ if ((do_loc || do_debug_loc || do_debug_ranges)
+ && num_debug_info_entries == 0)
+ {
+ debug_information [unit].cu_offset = cu_offset;
+ debug_information [unit].pointer_size
+ = compunit.cu_pointer_size;
+ debug_information [unit].base_address = 0;
+ debug_information [unit].loc_offsets = NULL;
+ debug_information [unit].have_frame_base = NULL;
+ debug_information [unit].max_loc_offsets = 0;
+ debug_information [unit].num_loc_offsets = 0;
+ debug_information [unit].range_lists = NULL;
+ debug_information [unit].max_range_lists= 0;
+ debug_information [unit].num_range_lists = 0;
+ }
+
+ tags = hdrptr;
+
+ if (!do_loc)
+ {
+ printf (_(" Compilation Unit @ offset 0x%lx:\n"), cu_offset);
+ printf (_(" Length: %ld\n"), compunit.cu_length);
+ printf (_(" Version: %d\n"), compunit.cu_version);
+ printf (_(" Abbrev Offset: %ld\n"), compunit.cu_abbrev_offset);
+ printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size);
+ }
+
+ if (compunit.cu_version != 2 && compunit.cu_version != 3)
+ {
+ warn (_("Only version 2 and 3 DWARF debug information is currently supported.\n"));
+ continue;
+ }
+
+ free_abbrevs ();
+
+ /* 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);
+
+ level = 0;
+ while (tags < start)
+ {
+ unsigned int bytes_read;
+ unsigned long abbrev_number;
+ abbrev_entry *entry;
+ abbrev_attr *attr;
+
+ abbrev_number = read_leb128 (tags, & bytes_read, 0);
+ tags += bytes_read;
+
+ /* A null DIE marks the end of a list of children. */
+ if (abbrev_number == 0)
+ {
+ --level;
+ continue;
+ }
+
+ /* Scan through the abbreviation list until we reach the
+ correct entry. */
+ for (entry = first_abbrev;
+ entry && entry->entry != abbrev_number;
+ entry = entry->next)
+ continue;
+
+ if (entry == NULL)
+ {
+ warn (_("Unable to locate entry %lu in the abbreviation table\n"),
+ abbrev_number);
+ return 0;
+ }
+
+ 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));
+
+ switch (entry->tag)
+ {
+ default:
+ need_base_address = 0;
+ break;
+ case DW_TAG_compile_unit:
+ 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. */
+ have_frame_base = 0;
+ break;
+ }
+
+ 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 (entry->children)
+ ++level;
+ }
+ }
+
+ /* Set num_debug_info_entries here so that it can be used to check if
+ we need to process .debug_loc and .debug_ranges sections. */
+ if ((do_loc || do_debug_loc || do_debug_ranges)
+ && num_debug_info_entries == 0)
+ num_debug_info_entries = num_units;
+
+ if (!do_loc)
+ {
+ printf ("\n");
+ }
+
+ return 1;
+}
+
+/* Locate and scan the .debug_info section in the file and record the pointer
+ sizes and offsets for the compilation units in it. Usually an executable
+ will have just one pointer size, but this is not guaranteed, and so we try
+ not to make any assumptions. Returns zero upon failure, or the number of
+ compilation units upon success. */
+
+static unsigned int
+load_debug_info (void * file)
+{
+ /* Reset the last pointer size so that we can issue correct error
+ messages if we are displaying the contents of more than one section. */
+ last_pointer_size = 0;
+ warned_about_missing_comp_units = FALSE;
+
+ /* If we already have the information there is nothing else to do. */
+ if (num_debug_info_entries > 0)
+ return num_debug_info_entries;
+
+ if (load_debug_section (info, file)
+ && process_debug_info (&debug_displays [info].section, file, 1))
+ return num_debug_info_entries;
+ else
+ return 0;
+}
+
+static int
+display_debug_lines (struct dwarf_section *section, void *file)
+{
+ unsigned char *start = section->start;
+ unsigned char *data = start;
+ unsigned char *end = start + section->size;
+
+ printf (_("\nDump of debug contents of section %s:\n\n"),
+ section->name);
+
+ load_debug_info (file);
+
+ while (data < end)
+ {
+ DWARF2_Internal_LineInfo info;
+ unsigned char *standard_opcodes;
+ unsigned char *end_of_sequence;
+ unsigned char *hdrptr;
+ int initial_length_size;
+ int offset_size;
+ int i;
+
+ hdrptr = data;
+
+ /* Check the length of the block. */
+ info.li_length = byte_get (hdrptr, 4);
+ hdrptr += 4;
+
+ if (info.li_length == 0xffffffff)
+ {
+ /* This section is 64-bit DWARF 3. */
+ info.li_length = byte_get (hdrptr, 8);
+ hdrptr += 8;
+ offset_size = 8;
+ initial_length_size = 12;
+ }
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
+ }
+
+ if (info.li_length + initial_length_size > section->size)
+ {
+ warn
+ (_("The line info appears to be corrupt - the section is too small\n"));
+ return 0;
+ }
+
+ /* Check its version number. */
+ info.li_version = byte_get (hdrptr, 2);
+ hdrptr += 2;
+ if (info.li_version != 2 && info.li_version != 3)
+ {
+ warn (_("Only DWARF version 2 and 3 line info is currently supported.\n"));
+ return 0;
+ }
+
+ info.li_prologue_length = byte_get (hdrptr, offset_size);
+ hdrptr += offset_size;
+ info.li_min_insn_length = byte_get (hdrptr, 1);
+ hdrptr++;
+ info.li_default_is_stmt = byte_get (hdrptr, 1);
+ hdrptr++;
+ info.li_line_base = byte_get (hdrptr, 1);
+ hdrptr++;
+ info.li_line_range = byte_get (hdrptr, 1);
+ hdrptr++;
+ info.li_opcode_base = byte_get (hdrptr, 1);
+ hdrptr++;
+
+ /* Sign extend the line base field. */
+ info.li_line_base <<= 24;
+ info.li_line_base >>= 24;
+
+ printf (_(" Length: %ld\n"), info.li_length);
+ printf (_(" DWARF Version: %d\n"), info.li_version);
+ printf (_(" Prologue Length: %d\n"), info.li_prologue_length);
+ printf (_(" Minimum Instruction Length: %d\n"), info.li_min_insn_length);
+ printf (_(" Initial value of 'is_stmt': %d\n"), info.li_default_is_stmt);
+ printf (_(" Line Base: %d\n"), info.li_line_base);
+ printf (_(" Line Range: %d\n"), info.li_line_range);
+ printf (_(" Opcode Base: %d\n"), info.li_opcode_base);
+
+ end_of_sequence = data + info.li_length + initial_length_size;
+
+ reset_state_machine (info.li_default_is_stmt);
+
+ /* Display the contents of the Opcodes table. */
+ standard_opcodes = hdrptr;
+
+ printf (_("\n Opcodes:\n"));
+
+ for (i = 1; i < info.li_opcode_base; i++)
+ printf (_(" Opcode %d has %d args\n"), i, standard_opcodes[i - 1]);
+
+ /* Display the contents of the Directory table. */
+ data = standard_opcodes + info.li_opcode_base - 1;
+
+ if (*data == 0)
+ printf (_("\n The Directory Table is empty.\n"));
+ else
+ {
+ printf (_("\n The Directory Table:\n"));
+
+ while (*data != 0)
+ {
+ printf (_(" %s\n"), data);
+
+ data += strlen ((char *) data) + 1;
+ }
+ }
+
+ /* Skip the NUL at the end of the table. */
+ data++;
+
+ /* Display the contents of the File Name table. */
+ if (*data == 0)
+ printf (_("\n The File Name Table is empty.\n"));
+ else
+ {
+ printf (_("\n The File Name Table:\n"));
+ printf (_(" Entry\tDir\tTime\tSize\tName\n"));
+
+ while (*data != 0)
+ {
+ unsigned char *name;
+ unsigned int bytes_read;
+
+ printf (_(" %d\t"), ++state_machine_regs.last_file_entry);
+ name = data;
+
+ data += strlen ((char *) data) + 1;
+
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
+ data += bytes_read;
+ printf (_("%s\n"), name);
+ }
+ }
+
+ /* Skip the NUL at the end of the table. */
+ data++;
+
+ /* Now display the statements. */
+ printf (_("\n Line Number Statements:\n"));
+
+ while (data < end_of_sequence)
+ {
+ unsigned char op_code;
+ int adv;
+ unsigned long int uladv;
+ unsigned int bytes_read;
+
+ op_code = *data++;
+
+ if (op_code >= info.li_opcode_base)
+ {
+ op_code -= info.li_opcode_base;
+ uladv = (op_code / info.li_line_range) * info.li_min_insn_length;
+ state_machine_regs.address += uladv;
+ printf (_(" Special opcode %d: advance Address by %lu to 0x%lx"),
+ op_code, uladv, state_machine_regs.address);
+ adv = (op_code % info.li_line_range) + info.li_line_base;
+ state_machine_regs.line += adv;
+ printf (_(" and Line by %d to %d\n"),
+ adv, state_machine_regs.line);
+ }
+ else switch (op_code)
+ {
+ case DW_LNS_extended_op:
+ data += process_extended_line_op (data, info.li_default_is_stmt);
+ break;
+
+ case DW_LNS_copy:
+ printf (_(" Copy\n"));
+ break;
+
+ case DW_LNS_advance_pc:
+ uladv = read_leb128 (data, & bytes_read, 0);
+ uladv *= info.li_min_insn_length;
+ data += bytes_read;
+ state_machine_regs.address += uladv;
+ printf (_(" Advance PC by %lu to 0x%lx\n"), uladv,
+ state_machine_regs.address);
+ break;
+
+ case DW_LNS_advance_line:
+ adv = read_leb128 (data, & bytes_read, 1);
+ data += bytes_read;
+ state_machine_regs.line += adv;
+ printf (_(" Advance Line by %d to %d\n"), adv,
+ state_machine_regs.line);
+ break;
+
+ case DW_LNS_set_file:
+ adv = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ printf (_(" Set File Name to entry %d in the File Name Table\n"),
+ adv);
+ state_machine_regs.file = adv;
+ break;
+
+ case DW_LNS_set_column:
+ uladv = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ printf (_(" Set column to %lu\n"), uladv);
+ state_machine_regs.column = uladv;
+ break;
+
+ case DW_LNS_negate_stmt:
+ adv = state_machine_regs.is_stmt;
+ adv = ! adv;
+ printf (_(" Set is_stmt to %d\n"), adv);
+ state_machine_regs.is_stmt = adv;
+ break;
+
+ case DW_LNS_set_basic_block:
+ printf (_(" Set basic block\n"));
+ state_machine_regs.basic_block = 1;
+ break;
+
+ case DW_LNS_const_add_pc:
+ uladv = (((255 - info.li_opcode_base) / info.li_line_range)
+ * info.li_min_insn_length);
+ state_machine_regs.address += uladv;
+ printf (_(" Advance PC by constant %lu to 0x%lx\n"), uladv,
+ state_machine_regs.address);
+ break;
+
+ case DW_LNS_fixed_advance_pc:
+ uladv = byte_get (data, 2);
+ data += 2;
+ state_machine_regs.address += uladv;
+ printf (_(" Advance PC by fixed size amount %lu to 0x%lx\n"),
+ uladv, state_machine_regs.address);
+ break;
+
+ case DW_LNS_set_prologue_end:
+ printf (_(" Set prologue_end to true\n"));
+ break;
+
+ case DW_LNS_set_epilogue_begin:
+ printf (_(" Set epilogue_begin to true\n"));
+ break;
+
+ case DW_LNS_set_isa:
+ uladv = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ printf (_(" Set ISA to %lu\n"), uladv);
+ break;
+
+ default:
+ printf (_(" Unknown opcode %d with operands: "), op_code);
+
+ for (i = standard_opcodes[op_code - 1]; i > 0 ; --i)
+ {
+ printf ("0x%lx%s", read_leb128 (data, &bytes_read, 0),
+ i == 1 ? "" : ", ");
+ data += bytes_read;
+ }
+ putchar ('\n');
+ break;
+ }
+ }
+ putchar ('\n');
+ }
+
+ return 1;
+}
+
+static int
+display_debug_pubnames (struct dwarf_section *section,
+ void *file ATTRIBUTE_UNUSED)
+{
+ DWARF2_Internal_PubNames pubnames;
+ unsigned char *start = section->start;
+ unsigned char *end = start + section->size;
+
+ printf (_("Contents of the %s section:\n\n"), section->name);
+
+ while (start < end)
+ {
+ unsigned char *data;
+ unsigned long offset;
+ int offset_size, initial_length_size;
+
+ data = start;
+
+ pubnames.pn_length = byte_get (data, 4);
+ data += 4;
+ if (pubnames.pn_length == 0xffffffff)
+ {
+ pubnames.pn_length = byte_get (data, 8);
+ data += 8;
+ offset_size = 8;
+ initial_length_size = 12;
+ }
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
+ }
+
+ pubnames.pn_version = byte_get (data, 2);
+ data += 2;
+ pubnames.pn_offset = byte_get (data, offset_size);
+ data += offset_size;
+ pubnames.pn_size = byte_get (data, offset_size);
+ data += offset_size;
+
+ start += pubnames.pn_length + initial_length_size;
+
+ if (pubnames.pn_version != 2 && pubnames.pn_version != 3)
+ {
+ static int warned = 0;
+
+ if (! warned)
+ {
+ warn (_("Only DWARF 2 and 3 pubnames are currently supported\n"));
+ warned = 1;
+ }
+
+ continue;
+ }
+
+ printf (_(" Length: %ld\n"),
+ pubnames.pn_length);
+ printf (_(" Version: %d\n"),
+ pubnames.pn_version);
+ printf (_(" Offset into .debug_info section: %ld\n"),
+ pubnames.pn_offset);
+ printf (_(" Size of area in .debug_info section: %ld\n"),
+ pubnames.pn_size);
+
+ printf (_("\n Offset\tName\n"));
+
+ do
+ {
+ offset = byte_get (data, offset_size);
+
+ if (offset != 0)
+ {
+ data += offset_size;
+ printf (" %-6ld\t\t%s\n", offset, data);
+ data += strlen ((char *) data) + 1;
+ }
+ }
+ while (offset != 0);
+ }
+
+ printf ("\n");
+ return 1;
+}
+
+static int
+display_debug_macinfo (struct dwarf_section *section,
+ void *file ATTRIBUTE_UNUSED)
+{
+ unsigned char *start = section->start;
+ unsigned char *end = start + section->size;
+ unsigned char *curr = start;
+ unsigned int bytes_read;
+ enum dwarf_macinfo_record_type op;
+
+ printf (_("Contents of the %s section:\n\n"), section->name);
+
+ while (curr < end)
+ {
+ unsigned int lineno;
+ const char *string;
+
+ op = *curr;
+ curr++;
+
+ switch (op)
+ {
+ case DW_MACINFO_start_file:
+ {
+ unsigned int filenum;
+
+ lineno = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+ filenum = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+
+ printf (_(" DW_MACINFO_start_file - lineno: %d filenum: %d\n"),
+ lineno, filenum);
+ }
+ break;
+
+ case DW_MACINFO_end_file:
+ printf (_(" DW_MACINFO_end_file\n"));
+ break;
+
+ case DW_MACINFO_define:
+ lineno = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+ string = (char *) curr;
+ curr += strlen (string) + 1;
+ printf (_(" DW_MACINFO_define - lineno : %d macro : %s\n"),
+ lineno, string);
+ break;
+
+ case DW_MACINFO_undef:
+ lineno = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+ string = (char *) curr;
+ curr += strlen (string) + 1;
+ printf (_(" DW_MACINFO_undef - lineno : %d macro : %s\n"),
+ lineno, string);
+ break;
+
+ case DW_MACINFO_vendor_ext:
+ {
+ unsigned int constant;
+
+ constant = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+ string = (char *) curr;
+ curr += strlen (string) + 1;
+ printf (_(" DW_MACINFO_vendor_ext - constant : %d string : %s\n"),
+ constant, string);
+ }
+ break;
+ }
+ }
+
+ return 1;
+}
+
+static int
+display_debug_abbrev (struct dwarf_section *section,
+ void *file ATTRIBUTE_UNUSED)
+{
+ abbrev_entry *entry;
+ unsigned char *start = section->start;
+ unsigned char *end = start + section->size;
+
+ printf (_("Contents of the %s section:\n\n"), section->name);
+
+ do
+ {
+ free_abbrevs ();
+
+ start = process_abbrev_section (start, end);
+
+ if (first_abbrev == NULL)
+ continue;
+
+ printf (_(" Number TAG\n"));
+
+ for (entry = first_abbrev; entry; entry = entry->next)
+ {
+ abbrev_attr *attr;
+
+ printf (_(" %ld %s [%s]\n"),
+ entry->entry,
+ get_TAG_name (entry->tag),
+ entry->children ? _("has children") : _("no children"));
+
+ for (attr = entry->first_attr; attr; attr = attr->next)
+ printf (_(" %-18s %s\n"),
+ get_AT_name (attr->attribute),
+ get_FORM_name (attr->form));
+ }
+ }
+ while (start);
+
+ printf ("\n");
+
+ return 1;
+}
+
+static int
+display_debug_loc (struct dwarf_section *section, void *file)
+{
+ unsigned char *start = section->start;
+ unsigned char *section_end;
+ unsigned long bytes;
+ unsigned char *section_begin = start;
+ unsigned int num_loc_list = 0;
+ unsigned long last_offset = 0;
+ unsigned int first = 0;
+ unsigned int i;
+ unsigned int j;
+ int seen_first_offset = 0;
+ int use_debug_info = 1;
+ unsigned char *next;
+
+ bytes = section->size;
+ section_end = start + bytes;
+
+ if (bytes == 0)
+ {
+ printf (_("\nThe %s section is empty.\n"), section->name);
+ return 0;
+ }
+
+ load_debug_info (file);
+
+ /* Check the order of location list in .debug_info section. If
+ offsets of location lists are in the ascending order, we can
+ use `debug_information' directly. */
+ for (i = 0; i < num_debug_info_entries; i++)
+ {
+ unsigned int num;
+
+ num = debug_information [i].num_loc_offsets;
+ num_loc_list += num;
+
+ /* Check if we can use `debug_information' directly. */
+ if (use_debug_info && num != 0)
+ {
+ if (!seen_first_offset)
+ {
+ /* This is the first location list. */
+ last_offset = debug_information [i].loc_offsets [0];
+ first = i;
+ seen_first_offset = 1;
+ j = 1;
+ }
+ else
+ j = 0;
+
+ for (; j < num; j++)
+ {
+ if (last_offset >
+ debug_information [i].loc_offsets [j])
+ {
+ use_debug_info = 0;
+ break;
+ }
+ last_offset = debug_information [i].loc_offsets [j];
+ }
+ }
+ }
+
+ if (!use_debug_info)
+ /* FIXME: Should we handle this case? */
+ error (_("Location lists in .debug_info section aren't in ascending order!\n"));
+
+ if (!seen_first_offset)
+ 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)
+ warn (_("Location lists in %s section start at 0x%lx\n"),
+ section->name, debug_information [first].loc_offsets [0]);
+
+ printf (_("Contents of the %s section:\n\n"), section->name);
+ printf (_(" Offset Begin End Expression\n"));
+
+ seen_first_offset = 0;
+ for (i = first; i < num_debug_info_entries; i++)
+ {
+ unsigned long begin;
+ unsigned long end;
+ unsigned short length;
+ unsigned long offset;
+ unsigned int pointer_size;
+ unsigned long cu_offset;
+ unsigned long base_address;
+ int need_frame_base;
+ int has_frame_base;
+
+ pointer_size = debug_information [i].pointer_size;
+ cu_offset = debug_information [i].cu_offset;
+
+ for (j = 0; j < debug_information [i].num_loc_offsets; j++)
+ {
+ has_frame_base = debug_information [i].have_frame_base [j];
+ /* DWARF sections under Mach-O have non-zero addresses. */
+ offset = debug_information [i].loc_offsets [j] - section->address;
+ next = section_begin + offset;
+ base_address = debug_information [i].base_address;
+
+ if (!seen_first_offset)
+ seen_first_offset = 1;
+ else
+ {
+ if (start < next)
+ warn (_("There is a hole [0x%lx - 0x%lx] in .debug_loc section.\n"),
+ (long)(start - section_begin), (long)(next - section_begin));
+ else if (start > next)
+ warn (_("There is an overlap [0x%lx - 0x%lx] in .debug_loc section.\n"),
+ (long)(start - section_begin), (long)(next - section_begin));
+ }
+ start = next;
+
+ if (offset >= bytes)
+ {
+ warn (_("Offset 0x%lx is bigger than .debug_loc section size.\n"),
+ offset);
+ continue;
+ }
+
+ while (1)
+ {
+ if (start + 2 * pointer_size > section_end)
+ {
+ warn (_("Location list starting at offset 0x%lx is not terminated.\n"),
+ offset);
+ break;
+ }
+
+ begin = byte_get (start, pointer_size);
+ start += pointer_size;
+ end = byte_get (start, pointer_size);
+ start += pointer_size;
+
+ if (begin == 0 && end == 0)
+ {
+ printf (_(" %8.8lx <End of list>\n"), offset);
+ break;
+ }
+
+ /* Check base address specifiers. */
+ if (begin == -1UL && end != -1UL)
+ {
+ base_address = end;
+ printf (_(" %8.8lx %8.8lx %8.8lx (base address)\n"),
+ offset, begin, end);
+ continue;
+ }
+
+ if (start + 2 > section_end)
+ {
+ warn (_("Location list starting at offset 0x%lx is not terminated.\n"),
+ offset);
+ break;
+ }
+
+ length = byte_get (start, 2);
+ start += 2;
+
+ if (start + length > section_end)
+ {
+ warn (_("Location list starting at offset 0x%lx is not terminated.\n"),
+ offset);
+ break;
+ }
+
+ printf (" %8.8lx %8.8lx %8.8lx (",
+ offset, begin + base_address, end + base_address);
+ need_frame_base = decode_location_expression (start,
+ pointer_size,
+ length,
+ cu_offset);
+ putchar (')');
+
+ if (need_frame_base && !has_frame_base)
+ printf (_(" [without DW_AT_frame_base]"));
+
+ if (begin == end)
+ fputs (_(" (start == end)"), stdout);
+ else if (begin > end)
+ fputs (_(" (start > end)"), stdout);
+
+ putchar ('\n');
+
+ start += length;
+ }
+ }
+ }
+ return 1;
+}
+
+static int
+display_debug_str (struct dwarf_section *section,
+ void *file ATTRIBUTE_UNUSED)
+{
+ unsigned char *start = section->start;
+ unsigned long bytes = section->size;
+ dwarf_vma addr = section->address;
+
+ if (bytes == 0)
+ {
+ printf (_("\nThe %s section is empty.\n"), section->name);
+ return 0;
+ }
+
+ printf (_("Contents of the %s section:\n\n"), section->name);
+
+ while (bytes)
+ {
+ int j;
+ int k;
+ int lbytes;
+
+ lbytes = (bytes > 16 ? 16 : bytes);
+
+ printf (" 0x%8.8lx ", (unsigned long) addr);
+
+ for (j = 0; j < 16; j++)
+ {
+ if (j < lbytes)
+ printf ("%2.2x", start[j]);
+ else
+ printf (" ");
+
+ if ((j & 3) == 3)
+ printf (" ");
+ }
+
+ for (j = 0; j < lbytes; j++)
+ {
+ k = start[j];
+ if (k >= ' ' && k < 0x80)
+ printf ("%c", k);
+ else
+ printf (".");
+ }
+
+ putchar ('\n');
+
+ start += lbytes;
+ addr += lbytes;
+ bytes -= lbytes;
+ }
+
+ putchar ('\n');
+
+ return 1;
+}
+
+
+static int
+display_debug_info (struct dwarf_section *section, void *file)
+{
+ return process_debug_info (section, file, 0);
+}
+
+
+static int
+display_debug_aranges (struct dwarf_section *section,
+ void *file ATTRIBUTE_UNUSED)
+{
+ unsigned char *start = section->start;
+ unsigned char *end = start + section->size;
+
+ printf (_("The section %s contains:\n\n"), section->name);
+
+ while (start < end)
+ {
+ unsigned char *hdrptr;
+ DWARF2_Internal_ARange arange;
+ unsigned char *ranges;
+ unsigned long length;
+ unsigned long address;
+ int excess;
+ int offset_size;
+ int initial_length_size;
+
+ hdrptr = start;
+
+ arange.ar_length = byte_get (hdrptr, 4);
+ hdrptr += 4;
+
+ if (arange.ar_length == 0xffffffff)
+ {
+ arange.ar_length = byte_get (hdrptr, 8);
+ hdrptr += 8;
+ offset_size = 8;
+ initial_length_size = 12;
+ }
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
+ }
+
+ arange.ar_version = byte_get (hdrptr, 2);
+ hdrptr += 2;
+
+ arange.ar_info_offset = byte_get (hdrptr, offset_size);
+ hdrptr += offset_size;
+
+ arange.ar_pointer_size = byte_get (hdrptr, 1);
+ hdrptr += 1;
+
+ arange.ar_segment_size = byte_get (hdrptr, 1);
+ hdrptr += 1;
+
+ if (arange.ar_version != 2 && arange.ar_version != 3)
+ {
+ warn (_("Only DWARF 2 and 3 aranges are currently supported.\n"));
+ break;
+ }
+
+ printf (_(" Length: %ld\n"), arange.ar_length);
+ printf (_(" Version: %d\n"), arange.ar_version);
+ printf (_(" Offset into .debug_info: %lx\n"), arange.ar_info_offset);
+ printf (_(" Pointer Size: %d\n"), arange.ar_pointer_size);
+ printf (_(" Segment Size: %d\n"), arange.ar_segment_size);
+
+ printf (_("\n Address Length\n"));
+
+ ranges = hdrptr;
+
+ /* Must pad to an alignment boundary that is twice the pointer size. */
+ excess = (hdrptr - start) % (2 * arange.ar_pointer_size);
+ if (excess)
+ ranges += (2 * arange.ar_pointer_size) - excess;
+
+ start += arange.ar_length + initial_length_size;
+
+ while (ranges + 2 * arange.ar_pointer_size <= start)
+ {
+ address = byte_get (ranges, arange.ar_pointer_size);
+
+ ranges += arange.ar_pointer_size;
+
+ length = byte_get (ranges, arange.ar_pointer_size);
+
+ ranges += arange.ar_pointer_size;
+
+ printf (" %8.8lx %lu\n", address, length);
+ }
+ }
+
+ printf ("\n");
+
+ return 1;
+}
+
+static int
+display_debug_ranges (struct dwarf_section *section,
+ void *file ATTRIBUTE_UNUSED)
+{
+ unsigned char *start = section->start;
+ unsigned char *section_end;
+ unsigned long bytes;
+ unsigned char *section_begin = start;
+ unsigned int num_range_list = 0;
+ unsigned long last_offset = 0;
+ unsigned int first = 0;
+ unsigned int i;
+ unsigned int j;
+ int seen_first_offset = 0;
+ int use_debug_info = 1;
+ unsigned char *next;
+
+ bytes = section->size;
+ section_end = start + bytes;
+
+ if (bytes == 0)
+ {
+ printf (_("\nThe %s section is empty.\n"), section->name);
+ return 0;
+ }
+
+ load_debug_info (file);
+
+ /* Check the order of range list in .debug_info section. If
+ offsets of range lists are in the ascending order, we can
+ use `debug_information' directly. */
+ for (i = 0; i < num_debug_info_entries; i++)
+ {
+ unsigned int num;
+
+ num = debug_information [i].num_range_lists;
+ num_range_list += num;
+
+ /* Check if we can use `debug_information' directly. */
+ if (use_debug_info && num != 0)
+ {
+ if (!seen_first_offset)
+ {
+ /* This is the first range list. */
+ last_offset = debug_information [i].range_lists [0];
+ first = i;
+ seen_first_offset = 1;
+ j = 1;
+ }
+ else
+ j = 0;
+
+ for (; j < num; j++)
+ {
+ if (last_offset >
+ debug_information [i].range_lists [j])
+ {
+ use_debug_info = 0;
+ break;
+ }
+ last_offset = debug_information [i].range_lists [j];
+ }
+ }
+ }
+
+ if (!use_debug_info)
+ /* FIXME: Should we handle this case? */
+ error (_("Range lists in .debug_info section aren't in ascending order!\n"));
+
+ if (!seen_first_offset)
+ 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)
+ warn (_("Range lists in %s section start at 0x%lx\n"),
+ section->name, debug_information [first].range_lists [0]);
+
+ printf (_("Contents of the %s section:\n\n"), section->name);
+ printf (_(" Offset Begin End\n"));
+
+ seen_first_offset = 0;
+ for (i = first; i < num_debug_info_entries; i++)
+ {
+ unsigned long begin;
+ unsigned long end;
+ unsigned long offset;
+ unsigned int pointer_size;
+ unsigned long base_address;
+
+ pointer_size = debug_information [i].pointer_size;
+
+ for (j = 0; j < debug_information [i].num_range_lists; j++)
+ {
+ /* DWARF sections under Mach-O have non-zero addresses. */
+ offset = debug_information [i].range_lists [j] - section->address;
+ next = section_begin + offset;
+ base_address = debug_information [i].base_address;
+
+ if (!seen_first_offset)
+ seen_first_offset = 1;
+ else
+ {
+ if (start < next)
+ warn (_("There is a hole [0x%lx - 0x%lx] in %s section.\n"),
+ (long)(start - section_begin),
+ (long)(next - section_begin), section->name);
+ else if (start > next)
+ warn (_("There is an overlap [0x%lx - 0x%lx] in %s section.\n"),
+ (long)(start - section_begin),
+ (long)(next - section_begin), section->name);
+ }
+ start = next;
+
+ while (1)
+ {
+ begin = byte_get (start, pointer_size);
+ start += pointer_size;
+ end = byte_get (start, pointer_size);
+ start += pointer_size;
+
+ if (begin == 0 && end == 0)
+ {
+ printf (_(" %8.8lx <End of list>\n"), offset);
+ break;
+ }
+
+ /* Check base address specifiers. */
+ if (begin == -1UL && end != -1UL)
+ {
+ base_address = end;
+ printf (" %8.8lx %8.8lx %8.8lx (base address)\n",
+ offset, begin, end);
+ continue;
+ }
+
+ printf (" %8.8lx %8.8lx %8.8lx",
+ offset, begin + base_address, end + base_address);
+
+ if (begin == end)
+ fputs (_(" (start == end)"), stdout);
+ else if (begin > end)
+ fputs (_(" (start > end)"), stdout);
+
+ putchar ('\n');
+ }
+ }
+ }
+ putchar ('\n');
+ return 1;
+}
+
+typedef struct Frame_Chunk
+{
+ struct Frame_Chunk *next;
+ unsigned char *chunk_start;
+ int ncols;
+ /* DW_CFA_{undefined,same_value,offset,register,unreferenced} */
+ short int *col_type;
+ int *col_offset;
+ char *augmentation;
+ unsigned int code_factor;
+ int data_factor;
+ unsigned long pc_begin;
+ unsigned long pc_range;
+ int cfa_reg;
+ int cfa_offset;
+ int ra;
+ unsigned char fde_encoding;
+ unsigned char cfa_exp;
+}
+Frame_Chunk;
+
+/* A marker for a col_type that means this column was never referenced
+ in the frame info. */
+#define DW_CFA_unreferenced (-1)
+
+static void
+frame_need_space (Frame_Chunk *fc, int reg)
+{
+ int prev = fc->ncols;
+
+ if (reg < fc->ncols)
+ return;
+
+ fc->ncols = reg + 1;
+ fc->col_type = xcrealloc (fc->col_type, fc->ncols, sizeof (short int));
+ fc->col_offset = xcrealloc (fc->col_offset, fc->ncols, sizeof (int));
+
+ while (prev < fc->ncols)
+ {
+ fc->col_type[prev] = DW_CFA_unreferenced;
+ fc->col_offset[prev] = 0;
+ prev++;
+ }
+}
+
+static void
+frame_display_row (Frame_Chunk *fc, int *need_col_headers, int *max_regs)
+{
+ int r;
+ char tmp[100];
+
+ if (*max_regs < fc->ncols)
+ *max_regs = fc->ncols;
+
+ if (*need_col_headers)
+ {
+ *need_col_headers = 0;
+
+ printf (" LOC CFA ");
+
+ for (r = 0; r < *max_regs; r++)
+ if (fc->col_type[r] != DW_CFA_unreferenced)
+ {
+ if (r == fc->ra)
+ printf ("ra ");
+ else
+ printf ("r%-4d", r);
+ }
+
+ printf ("\n");
+ }
+
+ printf ("%08lx ", fc->pc_begin);
+ if (fc->cfa_exp)
+ strcpy (tmp, "exp");
+ else
+ sprintf (tmp, "r%d%+d", fc->cfa_reg, fc->cfa_offset);
+ printf ("%-8s ", tmp);
+
+ for (r = 0; r < fc->ncols; r++)
+ {
+ if (fc->col_type[r] != DW_CFA_unreferenced)
+ {
+ switch (fc->col_type[r])
+ {
+ case DW_CFA_undefined:
+ strcpy (tmp, "u");
+ break;
+ case DW_CFA_same_value:
+ strcpy (tmp, "s");
+ break;
+ case DW_CFA_offset:
+ sprintf (tmp, "c%+d", fc->col_offset[r]);
+ break;
+ case DW_CFA_val_offset:
+ sprintf (tmp, "v%+d", fc->col_offset[r]);
+ break;
+ case DW_CFA_register:
+ sprintf (tmp, "r%d", fc->col_offset[r]);
+ break;
+ case DW_CFA_expression:
+ strcpy (tmp, "exp");
+ break;
+ case DW_CFA_val_expression:
+ strcpy (tmp, "vexp");
+ break;
+ default:
+ strcpy (tmp, "n/a");
+ break;
+ }
+ printf ("%-5s", tmp);
+ }
+ }
+ printf ("\n");
+}
+
+static int
+size_of_encoded_value (int encoding)
+{
+ switch (encoding & 0x7)
+ {
+ default: /* ??? */
+ case 0: return eh_addr_size;
+ case 2: return 2;
+ case 3: return 4;
+ case 4: return 8;
+ }
+}
+
+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
+ return byte_get (data, size);
+}
+
+#define GET(N) byte_get (start, N); start += N
+#define LEB() read_leb128 (start, & length_return, 0); start += length_return
+#define SLEB() read_leb128 (start, & length_return, 1); start += length_return
+
+static int
+display_debug_frames (struct dwarf_section *section,
+ void *file ATTRIBUTE_UNUSED)
+{
+ unsigned char *start = section->start;
+ unsigned char *end = start + section->size;
+ unsigned char *section_start = start;
+ Frame_Chunk *chunks = 0;
+ Frame_Chunk *remembered_state = 0;
+ Frame_Chunk *rs;
+ int is_eh = strcmp (section->name, ".eh_frame") == 0;
+ unsigned int length_return;
+ int max_regs = 0;
+
+ printf (_("The section %s contains:\n"), section->name);
+
+ while (start < end)
+ {
+ unsigned char *saved_start;
+ unsigned char *block_end;
+ unsigned long length;
+ unsigned long cie_id;
+ Frame_Chunk *fc;
+ Frame_Chunk *cie;
+ int need_col_headers = 1;
+ unsigned char *augmentation_data = NULL;
+ unsigned long augmentation_data_len = 0;
+ int encoded_ptr_size = eh_addr_size;
+ int offset_size;
+ int initial_length_size;
+
+ saved_start = start;
+ length = byte_get (start, 4); start += 4;
+
+ if (length == 0)
+ {
+ printf ("\n%08lx ZERO terminator\n\n",
+ (unsigned long)(saved_start - section_start));
+ return 1;
+ }
+
+ if (length == 0xffffffff)
+ {
+ length = byte_get (start, 8);
+ start += 8;
+ offset_size = 8;
+ initial_length_size = 12;
+ }
+ else
+ {
+ offset_size = 4;
+ initial_length_size = 4;
+ }
+
+ block_end = saved_start + length + initial_length_size;
+ cie_id = byte_get (start, offset_size); start += offset_size;
+
+ if (is_eh ? (cie_id == 0) : (cie_id == DW_CIE_ID))
+ {
+ int version;
+
+ fc = xmalloc (sizeof (Frame_Chunk));
+ memset (fc, 0, sizeof (Frame_Chunk));
+
+ fc->next = chunks;
+ chunks = fc;
+ fc->chunk_start = saved_start;
+ fc->ncols = 0;
+ fc->col_type = xmalloc (sizeof (short int));
+ fc->col_offset = xmalloc (sizeof (int));
+ frame_need_space (fc, max_regs-1);
+
+ version = *start++;
+
+ fc->augmentation = (char *) start;
+ start = (unsigned char *) strchr ((char *) start, '\0') + 1;
+
+ if (fc->augmentation[0] == 'z')
+ {
+ fc->code_factor = LEB ();
+ fc->data_factor = SLEB ();
+ if (version == 1)
+ {
+ fc->ra = GET (1);
+ }
+ else
+ {
+ fc->ra = LEB ();
+ }
+ augmentation_data_len = LEB ();
+ augmentation_data = start;
+ start += augmentation_data_len;
+ }
+ else if (strcmp (fc->augmentation, "eh") == 0)
+ {
+ start += eh_addr_size;
+ fc->code_factor = LEB ();
+ fc->data_factor = SLEB ();
+ if (version == 1)
+ {
+ fc->ra = GET (1);
+ }
+ else
+ {
+ fc->ra = LEB ();
+ }
+ }
+ else
+ {
+ fc->code_factor = LEB ();
+ fc->data_factor = SLEB ();
+ if (version == 1)
+ {
+ fc->ra = GET (1);
+ }
+ else
+ {
+ fc->ra = LEB ();
+ }
+ }
+ cie = fc;
+
+ if (do_debug_frames_interp)
+ printf ("\n%08lx %08lx %08lx CIE \"%s\" cf=%d df=%d ra=%d\n",
+ (unsigned long)(saved_start - section_start), length, cie_id,
+ fc->augmentation, fc->code_factor, fc->data_factor,
+ fc->ra);
+ else
+ {
+ printf ("\n%08lx %08lx %08lx CIE\n",
+ (unsigned long)(saved_start - section_start), length, cie_id);
+ printf (" Version: %d\n", version);
+ printf (" Augmentation: \"%s\"\n", fc->augmentation);
+ printf (" Code alignment factor: %u\n", fc->code_factor);
+ printf (" Data alignment factor: %d\n", fc->data_factor);
+ printf (" Return address column: %d\n", fc->ra);
+
+ if (augmentation_data_len)
+ {
+ unsigned long i;
+ printf (" Augmentation data: ");
+ for (i = 0; i < augmentation_data_len; ++i)
+ printf (" %02x", augmentation_data[i]);
+ putchar ('\n');
+ }
+ putchar ('\n');
+ }
+
+ if (augmentation_data_len)
+ {
+ unsigned char *p, *q;
+ p = (unsigned char *) fc->augmentation + 1;
+ q = augmentation_data;
+
+ while (1)
+ {
+ if (*p == 'L')
+ q++;
+ else if (*p == 'P')
+ q += 1 + size_of_encoded_value (*q);
+ else if (*p == 'R')
+ fc->fde_encoding = *q++;
+ else
+ break;
+ p++;
+ }
+
+ if (fc->fde_encoding)
+ encoded_ptr_size = size_of_encoded_value (fc->fde_encoding);
+ }
+
+ frame_need_space (fc, fc->ra);
+ }
+ else
+ {
+ unsigned char *look_for;
+ static Frame_Chunk fde_fc;
+
+ fc = & fde_fc;
+ memset (fc, 0, sizeof (Frame_Chunk));
+
+ look_for = is_eh ? start - 4 - cie_id : section_start + cie_id;
+
+ for (cie = chunks; cie ; cie = cie->next)
+ if (cie->chunk_start == look_for)
+ break;
+
+ if (!cie)
+ {
+ 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));
+ frame_need_space (fc, max_regs - 1);
+ cie = fc;
+ fc->augmentation = "";
+ fc->fde_encoding = 0;
+ }
+ else
+ {
+ fc->ncols = cie->ncols;
+ fc->col_type = xcmalloc (fc->ncols, sizeof (short int));
+ fc->col_offset = xcmalloc (fc->ncols, sizeof (int));
+ memcpy (fc->col_type, cie->col_type, fc->ncols * sizeof (short int));
+ memcpy (fc->col_offset, cie->col_offset, fc->ncols * sizeof (int));
+ fc->augmentation = cie->augmentation;
+ fc->code_factor = cie->code_factor;
+ fc->data_factor = cie->data_factor;
+ fc->cfa_reg = cie->cfa_reg;
+ fc->cfa_offset = cie->cfa_offset;
+ fc->ra = cie->ra;
+ frame_need_space (fc, max_regs-1);
+ fc->fde_encoding = cie->fde_encoding;
+ }
+
+ if (fc->fde_encoding)
+ encoded_ptr_size = size_of_encoded_value (fc->fde_encoding);
+
+ fc->pc_begin = get_encoded_value (start, fc->fde_encoding);
+ if ((fc->fde_encoding & 0x70) == DW_EH_PE_pcrel
+ /* Don't adjust for relocatable file since there's
+ invariably a pcrel reloc here, which we haven't
+ applied. */
+ && !is_relocatable)
+ fc->pc_begin += section->address + (start - section_start);
+ start += encoded_ptr_size;
+ fc->pc_range = byte_get (start, encoded_ptr_size);
+ start += encoded_ptr_size;
+
+ if (cie->augmentation[0] == 'z')
+ {
+ augmentation_data_len = LEB ();
+ augmentation_data = start;
+ start += augmentation_data_len;
+ }
+
+ printf ("\n%08lx %08lx %08lx FDE cie=%08lx pc=%08lx..%08lx\n",
+ (unsigned long)(saved_start - section_start), length, cie_id,
+ (unsigned long)(cie->chunk_start - section_start),
+ fc->pc_begin, fc->pc_begin + fc->pc_range);
+ if (! do_debug_frames_interp && augmentation_data_len)
+ {
+ unsigned long i;
+
+ printf (" Augmentation data: ");
+ for (i = 0; i < augmentation_data_len; ++i)
+ printf (" %02x", augmentation_data[i]);
+ putchar ('\n');
+ putchar ('\n');
+ }
+ }
+
+ /* At this point, fc is the current chunk, cie (if any) is set, and
+ we're about to interpret instructions for the chunk. */
+ /* ??? At present we need to do this always, since this sizes the
+ fc->col_type and fc->col_offset arrays, which we write into always.
+ We should probably split the interpreted and non-interpreted bits
+ into two different routines, since there's so much that doesn't
+ really overlap between them. */
+ if (1 || do_debug_frames_interp)
+ {
+ /* Start by making a pass over the chunk, allocating storage
+ and taking note of what registers are used. */
+ unsigned char *tmp = start;
+
+ while (start < block_end)
+ {
+ unsigned op, opa;
+ unsigned long reg, tmp;
+
+ op = *start++;
+ opa = op & 0x3f;
+ if (op & 0xc0)
+ op &= 0xc0;
+
+ /* Warning: if you add any more cases to this switch, be
+ sure to add them to the corresponding switch below. */
+ switch (op)
+ {
+ case DW_CFA_advance_loc:
+ break;
+ case DW_CFA_offset:
+ LEB ();
+ frame_need_space (fc, opa);
+ fc->col_type[opa] = DW_CFA_undefined;
+ break;
+ case DW_CFA_restore:
+ frame_need_space (fc, opa);
+ fc->col_type[opa] = DW_CFA_undefined;
+ break;
+ case DW_CFA_set_loc:
+ start += encoded_ptr_size;
+ break;
+ case DW_CFA_advance_loc1:
+ start += 1;
+ break;
+ case DW_CFA_advance_loc2:
+ start += 2;
+ break;
+ case DW_CFA_advance_loc4:
+ start += 4;
+ break;
+ case DW_CFA_offset_extended:
+ case DW_CFA_val_offset:
+ reg = LEB (); LEB ();
+ frame_need_space (fc, reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+ break;
+ case DW_CFA_restore_extended:
+ reg = LEB ();
+ frame_need_space (fc, reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+ break;
+ case DW_CFA_undefined:
+ reg = LEB ();
+ frame_need_space (fc, reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+ break;
+ case DW_CFA_same_value:
+ reg = LEB ();
+ frame_need_space (fc, reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+ break;
+ case DW_CFA_register:
+ reg = LEB (); LEB ();
+ frame_need_space (fc, reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+ break;
+ case DW_CFA_def_cfa:
+ LEB (); LEB ();
+ break;
+ case DW_CFA_def_cfa_register:
+ LEB ();
+ break;
+ case DW_CFA_def_cfa_offset:
+ LEB ();
+ break;
+ case DW_CFA_def_cfa_expression:
+ tmp = LEB ();
+ start += tmp;
+ break;
+ case DW_CFA_expression:
+ case DW_CFA_val_expression:
+ reg = LEB ();
+ tmp = LEB ();
+ start += tmp;
+ frame_need_space (fc, reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+ break;
+ case DW_CFA_offset_extended_sf:
+ case DW_CFA_val_offset_sf:
+ reg = LEB (); SLEB ();
+ frame_need_space (fc, reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+ break;
+ case DW_CFA_def_cfa_sf:
+ LEB (); SLEB ();
+ break;
+ case DW_CFA_def_cfa_offset_sf:
+ SLEB ();
+ break;
+ case DW_CFA_MIPS_advance_loc8:
+ start += 8;
+ break;
+ case DW_CFA_GNU_args_size:
+ LEB ();
+ break;
+ case DW_CFA_GNU_negative_offset_extended:
+ reg = LEB (); LEB ();
+ frame_need_space (fc, reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+
+ default:
+ break;
+ }
+ }
+ start = tmp;
+ }
+
+ /* Now we know what registers are used, make a second pass over
+ the chunk, this time actually printing out the info. */
+
+ while (start < block_end)
+ {
+ unsigned op, opa;
+ unsigned long ul, reg, roffs;
+ long l, ofs;
+ dwarf_vma vma;
+
+ op = *start++;
+ opa = op & 0x3f;
+ if (op & 0xc0)
+ op &= 0xc0;
+
+ /* Warning: if you add any more cases to this switch, be
+ sure to add them to the corresponding switch above. */
+ switch (op)
+ {
+ case DW_CFA_advance_loc:
+ if (do_debug_frames_interp)
+ frame_display_row (fc, &need_col_headers, &max_regs);
+ else
+ printf (" DW_CFA_advance_loc: %d to %08lx\n",
+ opa * fc->code_factor,
+ fc->pc_begin + opa * fc->code_factor);
+ fc->pc_begin += opa * fc->code_factor;
+ break;
+
+ case DW_CFA_offset:
+ roffs = LEB ();
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_offset: r%d at cfa%+ld\n",
+ opa, roffs * fc->data_factor);
+ fc->col_type[opa] = DW_CFA_offset;
+ fc->col_offset[opa] = roffs * fc->data_factor;
+ break;
+
+ case DW_CFA_restore:
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_restore: r%d\n", opa);
+ fc->col_type[opa] = cie->col_type[opa];
+ fc->col_offset[opa] = cie->col_offset[opa];
+ break;
+
+ case DW_CFA_set_loc:
+ vma = get_encoded_value (start, fc->fde_encoding);
+ if ((fc->fde_encoding & 0x70) == DW_EH_PE_pcrel
+ && !is_relocatable)
+ vma += section->address + (start - section_start);
+ start += encoded_ptr_size;
+ if (do_debug_frames_interp)
+ frame_display_row (fc, &need_col_headers, &max_regs);
+ else
+ printf (" DW_CFA_set_loc: %08lx\n", (unsigned long)vma);
+ fc->pc_begin = vma;
+ break;
+
+ case DW_CFA_advance_loc1:
+ ofs = byte_get (start, 1); start += 1;
+ if (do_debug_frames_interp)
+ frame_display_row (fc, &need_col_headers, &max_regs);
+ else
+ printf (" DW_CFA_advance_loc1: %ld to %08lx\n",
+ ofs * fc->code_factor,
+ fc->pc_begin + ofs * fc->code_factor);
+ fc->pc_begin += ofs * fc->code_factor;
+ break;
+
+ case DW_CFA_advance_loc2:
+ ofs = byte_get (start, 2); start += 2;
+ if (do_debug_frames_interp)
+ frame_display_row (fc, &need_col_headers, &max_regs);
+ else
+ printf (" DW_CFA_advance_loc2: %ld to %08lx\n",
+ ofs * fc->code_factor,
+ fc->pc_begin + ofs * fc->code_factor);
+ fc->pc_begin += ofs * fc->code_factor;
+ break;
+
+ case DW_CFA_advance_loc4:
+ ofs = byte_get (start, 4); start += 4;
+ if (do_debug_frames_interp)
+ frame_display_row (fc, &need_col_headers, &max_regs);
+ else
+ printf (" DW_CFA_advance_loc4: %ld to %08lx\n",
+ ofs * fc->code_factor,
+ fc->pc_begin + ofs * fc->code_factor);
+ fc->pc_begin += ofs * fc->code_factor;
+ break;
+
+ case DW_CFA_offset_extended:
+ reg = LEB ();
+ roffs = LEB ();
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_offset_extended: r%ld at cfa%+ld\n",
+ reg, roffs * fc->data_factor);
+ fc->col_type[reg] = DW_CFA_offset;
+ fc->col_offset[reg] = roffs * fc->data_factor;
+ break;
+
+ case DW_CFA_val_offset:
+ reg = LEB ();
+ roffs = LEB ();
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_val_offset: r%ld at cfa%+ld\n",
+ reg, roffs * fc->data_factor);
+ fc->col_type[reg] = DW_CFA_val_offset;
+ fc->col_offset[reg] = roffs * fc->data_factor;
+ break;
+
+ case DW_CFA_restore_extended:
+ reg = LEB ();
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_restore_extended: r%ld\n", reg);
+ fc->col_type[reg] = cie->col_type[reg];
+ fc->col_offset[reg] = cie->col_offset[reg];
+ break;
+
+ case DW_CFA_undefined:
+ reg = LEB ();
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_undefined: r%ld\n", reg);
+ fc->col_type[reg] = DW_CFA_undefined;
+ fc->col_offset[reg] = 0;
+ break;
+
+ case DW_CFA_same_value:
+ reg = LEB ();
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_same_value: r%ld\n", reg);
+ fc->col_type[reg] = DW_CFA_same_value;
+ fc->col_offset[reg] = 0;
+ break;
+
+ case DW_CFA_register:
+ reg = LEB ();
+ roffs = LEB ();
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_register: r%ld in r%ld\n", reg, roffs);
+ fc->col_type[reg] = DW_CFA_register;
+ fc->col_offset[reg] = roffs;
+ break;
+
+ case DW_CFA_remember_state:
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_remember_state\n");
+ rs = xmalloc (sizeof (Frame_Chunk));
+ rs->ncols = fc->ncols;
+ rs->col_type = xcmalloc (rs->ncols, sizeof (short int));
+ rs->col_offset = xcmalloc (rs->ncols, sizeof (int));
+ memcpy (rs->col_type, fc->col_type, rs->ncols);
+ memcpy (rs->col_offset, fc->col_offset, rs->ncols * sizeof (int));
+ rs->next = remembered_state;
+ remembered_state = rs;
+ break;
+
+ case DW_CFA_restore_state:
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_restore_state\n");
+ rs = remembered_state;
+ if (rs)
+ {
+ remembered_state = rs->next;
+ frame_need_space (fc, rs->ncols-1);
+ memcpy (fc->col_type, rs->col_type, rs->ncols);
+ memcpy (fc->col_offset, rs->col_offset,
+ rs->ncols * sizeof (int));
+ free (rs->col_type);
+ free (rs->col_offset);
+ free (rs);
+ }
+ else if (do_debug_frames_interp)
+ printf ("Mismatched DW_CFA_restore_state\n");
+ break;
+
+ case DW_CFA_def_cfa:
+ fc->cfa_reg = LEB ();
+ fc->cfa_offset = LEB ();
+ fc->cfa_exp = 0;
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_def_cfa: r%d ofs %d\n",
+ fc->cfa_reg, fc->cfa_offset);
+ break;
+
+ case DW_CFA_def_cfa_register:
+ fc->cfa_reg = LEB ();
+ fc->cfa_exp = 0;
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_def_cfa_reg: r%d\n", fc->cfa_reg);
+ break;
+
+ case DW_CFA_def_cfa_offset:
+ fc->cfa_offset = LEB ();
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset);
+ break;
+
+ case DW_CFA_nop:
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_nop\n");
+ break;
+
+ case DW_CFA_def_cfa_expression:
+ ul = LEB ();
+ if (! do_debug_frames_interp)
+ {
+ printf (" DW_CFA_def_cfa_expression (");
+ decode_location_expression (start, eh_addr_size, ul, 0);
+ printf (")\n");
+ }
+ fc->cfa_exp = 1;
+ start += ul;
+ break;
+
+ case DW_CFA_expression:
+ reg = LEB ();
+ ul = LEB ();
+ if (! do_debug_frames_interp)
+ {
+ printf (" DW_CFA_expression: r%ld (", reg);
+ decode_location_expression (start, eh_addr_size, ul, 0);
+ printf (")\n");
+ }
+ fc->col_type[reg] = DW_CFA_expression;
+ start += ul;
+ break;
+
+ case DW_CFA_val_expression:
+ reg = LEB ();
+ ul = LEB ();
+ if (! do_debug_frames_interp)
+ {
+ printf (" DW_CFA_val_expression: r%ld (", reg);
+ decode_location_expression (start, eh_addr_size, ul, 0);
+ printf (")\n");
+ }
+ fc->col_type[reg] = DW_CFA_val_expression;
+ start += ul;
+ break;
+
+ case DW_CFA_offset_extended_sf:
+ reg = LEB ();
+ l = SLEB ();
+ frame_need_space (fc, reg);
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_offset_extended_sf: r%ld at cfa%+ld\n",
+ reg, l * fc->data_factor);
+ fc->col_type[reg] = DW_CFA_offset;
+ fc->col_offset[reg] = l * fc->data_factor;
+ break;
+
+ case DW_CFA_val_offset_sf:
+ reg = LEB ();
+ l = SLEB ();
+ frame_need_space (fc, reg);
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_val_offset_sf: r%ld at cfa%+ld\n",
+ reg, l * fc->data_factor);
+ fc->col_type[reg] = DW_CFA_val_offset;
+ fc->col_offset[reg] = l * fc->data_factor;
+ break;
+
+ case DW_CFA_def_cfa_sf:
+ fc->cfa_reg = LEB ();
+ fc->cfa_offset = SLEB ();
+ fc->cfa_offset = fc->cfa_offset * fc->data_factor;
+ fc->cfa_exp = 0;
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_def_cfa_sf: r%d ofs %d\n",
+ fc->cfa_reg, fc->cfa_offset);
+ break;
+
+ case DW_CFA_def_cfa_offset_sf:
+ fc->cfa_offset = SLEB ();
+ fc->cfa_offset = fc->cfa_offset * fc->data_factor;
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_def_cfa_offset_sf: %d\n", fc->cfa_offset);
+ break;
+
+ case DW_CFA_MIPS_advance_loc8:
+ ofs = byte_get (start, 8); start += 8;
+ if (do_debug_frames_interp)
+ frame_display_row (fc, &need_col_headers, &max_regs);
+ else
+ printf (" DW_CFA_MIPS_advance_loc8: %ld to %08lx\n",
+ ofs * fc->code_factor,
+ fc->pc_begin + ofs * fc->code_factor);
+ fc->pc_begin += ofs * fc->code_factor;
+ break;
+
+ case DW_CFA_GNU_window_save:
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_GNU_window_save\n");
+ break;
+
+ case DW_CFA_GNU_args_size:
+ ul = LEB ();
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_GNU_args_size: %ld\n", ul);
+ break;
+
+ case DW_CFA_GNU_negative_offset_extended:
+ reg = LEB ();
+ l = - LEB ();
+ frame_need_space (fc, reg);
+ if (! do_debug_frames_interp)
+ printf (" DW_CFA_GNU_negative_offset_extended: r%ld at cfa%+ld\n",
+ reg, l * fc->data_factor);
+ fc->col_type[reg] = DW_CFA_offset;
+ fc->col_offset[reg] = l * fc->data_factor;
+ break;
+
+ default:
+ warn (_("unsupported or unknown DW_CFA_%d\n"), op);
+ start = block_end;
+ }
+ }
+
+ if (do_debug_frames_interp)
+ frame_display_row (fc, &need_col_headers, &max_regs);
+
+ start = block_end;
+ }
+
+ printf ("\n");
+
+ return 1;
+}
+
+#undef GET
+#undef LEB
+#undef SLEB
+
+static int
+display_debug_not_supported (struct dwarf_section *section,
+ void *file ATTRIBUTE_UNUSED)
+{
+ printf (_("Displaying the debug contents of section %s is not yet supported.\n"),
+ section->name);
+
+ return 1;
+}
+
+void *
+cmalloc (size_t nmemb, size_t size)
+{
+ /* Check for overflow. */
+ if (nmemb >= ~(size_t) 0 / size)
+ return NULL;
+ else
+ return malloc (nmemb * size);
+}
+
+void *
+xcmalloc (size_t nmemb, size_t size)
+{
+ /* Check for overflow. */
+ if (nmemb >= ~(size_t) 0 / size)
+ return NULL;
+ else
+ return xmalloc (nmemb * size);
+}
+
+void *
+xcrealloc (void *ptr, size_t nmemb, size_t size)
+{
+ /* Check for overflow. */
+ if (nmemb >= ~(size_t) 0 / size)
+ return NULL;
+ else
+ return xrealloc (ptr, nmemb * size);
+}
+
+void
+error (const char *message, ...)
+{
+ va_list args;
+
+ va_start (args, message);
+ fprintf (stderr, _("%s: Error: "), program_name);
+ vfprintf (stderr, message, args);
+ va_end (args);
+}
+
+void
+warn (const char *message, ...)
+{
+ va_list args;
+
+ va_start (args, message);
+ fprintf (stderr, _("%s: Warning: "), program_name);
+ vfprintf (stderr, message, args);
+ va_end (args);
+}
+
+void
+free_debug_memory (void)
+{
+ enum dwarf_section_display_enum i;
+
+ free_abbrevs ();
+
+ for (i = 0; i < max; i++)
+ free_debug_section (i);
+
+ if (debug_information)
+ {
+ for (i = 0; i < num_debug_info_entries; i++)
+ {
+ if (!debug_information [i].max_loc_offsets)
+ {
+ free (debug_information [i].loc_offsets);
+ free (debug_information [i].have_frame_base);
+ }
+ if (!debug_information [i].max_range_lists)
+ free (debug_information [i].range_lists);
+ }
+ free (debug_information);
+ debug_information = NULL;
+ num_debug_info_entries = 0;
+ }
+
+}
+
+struct dwarf_section_display debug_displays[] =
+{
+ { { ".debug_abbrev", NULL, 0, 0 },
+ display_debug_abbrev, 0, 0 },
+ { { ".debug_aranges", NULL, 0, 0 },
+ display_debug_aranges, 0, 0 },
+ { { ".debug_frame", NULL, 0, 0 },
+ display_debug_frames, 1, 0 },
+ { { ".debug_info", NULL, 0, 0 },
+ display_debug_info, 1, 0 },
+ { { ".debug_line", NULL, 0, 0 },
+ display_debug_lines, 0, 0 },
+ { { ".debug_pubnames", NULL, 0, 0 },
+ display_debug_pubnames, 0, 0 },
+ { { ".eh_frame", NULL, 0, 0 },
+ display_debug_frames, 1, 1 },
+ { { ".debug_macinfo", NULL, 0, 0 },
+ display_debug_macinfo, 0, 0 },
+ { { ".debug_str", NULL, 0, 0 },
+ display_debug_str, 0, 0 },
+ { { ".debug_loc", NULL, 0, 0 },
+ display_debug_loc, 0, 0 },
+ { { ".debug_pubtypes", NULL, 0, 0 },
+ display_debug_pubnames, 0, 0 },
+ { { ".debug_ranges", NULL, 0, 0 },
+ display_debug_ranges, 0, 0 },
+ { { ".debug_static_func", NULL, 0, 0 },
+ display_debug_not_supported, 0, 0 },
+ { { ".debug_static_vars", NULL, 0, 0 },
+ display_debug_not_supported, 0, 0 },
+ { { ".debug_types", NULL, 0, 0 },
+ display_debug_not_supported, 0, 0 },
+ { { ".debug_weaknames", NULL, 0, 0 },
+ display_debug_not_supported, 0, 0 }
+};
diff --git a/contrib/binutils/binutils/dwarf.h b/contrib/binutils/binutils/dwarf.h
new file mode 100644
index 000000000000..907ac93ef717
--- /dev/null
+++ b/contrib/binutils/binutils/dwarf.h
@@ -0,0 +1,122 @@
+/* dwwrf.h - DWARF support header file
+ Copyright 2005
+ 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 "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. */
+typedef unsigned long long dwarf_vma;
+typedef unsigned long long dwarf_size_type;
+#else
+typedef unsigned long dwarf_vma;
+typedef unsigned long dwarf_size_type;
+#endif
+
+struct dwarf_section
+{
+ const char *name;
+ unsigned char *start;
+ dwarf_vma address;
+ dwarf_size_type size;
+};
+
+/* A structure containing the name of a debug section
+ and a pointer to a function that can decode it. */
+struct dwarf_section_display
+{
+ struct dwarf_section section;
+ int (*display) (struct dwarf_section *, void *);
+ unsigned int relocate : 1;
+ unsigned int eh_frame : 1;
+};
+
+enum dwarf_section_display_enum {
+ abbrev = 0,
+ aranges,
+ frame,
+ info,
+ line,
+ pubnames,
+ eh_frame,
+ macinfo,
+ str,
+ loc,
+ pubtypes,
+ ranges,
+ static_func,
+ static_vars,
+ types,
+ weaknames,
+ max
+};
+
+extern struct dwarf_section_display debug_displays [];
+
+/* This structure records the information that
+ we extract from the.debug_info section. */
+typedef struct
+{
+ unsigned int pointer_size;
+ unsigned long cu_offset;
+ unsigned long base_address;
+ /* This is an array of offsets to the location list table. */
+ unsigned long *loc_offsets;
+ int *have_frame_base;
+ unsigned int num_loc_offsets;
+ unsigned int max_loc_offsets;
+ unsigned long *range_lists;
+ unsigned int num_range_lists;
+ unsigned int max_range_lists;
+}
+debug_info;
+
+extern dwarf_vma (*byte_get) (unsigned char *, int);
+extern dwarf_vma byte_get_little_endian (unsigned char *, int);
+extern dwarf_vma byte_get_big_endian (unsigned char *, int);
+
+extern dwarf_vma eh_addr_size;
+extern int is_relocatable;
+
+extern int do_debug_info;
+extern int do_debug_abbrevs;
+extern int do_debug_lines;
+extern int do_debug_pubnames;
+extern int do_debug_aranges;
+extern int do_debug_ranges;
+extern int do_debug_frames;
+extern int do_debug_frames_interp;
+extern int do_debug_macinfo;
+extern int do_debug_str;
+extern int do_debug_loc;
+
+extern int load_debug_section (enum dwarf_section_display_enum,
+ void *);
+extern void free_debug_section (enum dwarf_section_display_enum);
+
+extern void free_debug_memory (void);
+
+void *cmalloc (size_t, size_t);
+void *xcmalloc (size_t, size_t);
+void *xcrealloc (void *, size_t, size_t);
+
+void error (const char *, ...) ATTRIBUTE_PRINTF_1;
+void warn (const char *, ...) ATTRIBUTE_PRINTF_1;
diff --git a/contrib/binutils/binutils/emul_vanilla.c b/contrib/binutils/binutils/emul_vanilla.c
index d6cfebda98da..2f34f9d5c2f8 100644
--- a/contrib/binutils/binutils/emul_vanilla.c
+++ b/contrib/binutils/binutils/emul_vanilla.c
@@ -1,6 +1,6 @@
/* Binutils emulation layer.
Copyright (C) 2002 Free Software Foundation, Inc.
- Written by Tom Rix, Redhat.
+ Written by Tom Rix, Red Hat Inc.
This file is part of GNU Binutils.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "binemul.h"
@@ -25,6 +25,5 @@ struct bin_emulation_xfer_struct bin_vanilla_emulation =
ar_emul_default_usage,
ar_emul_default_append,
ar_emul_default_replace,
- ar_emul_default_create,
ar_emul_default_parse_arg,
};
diff --git a/contrib/binutils/binutils/filemode.c b/contrib/binutils/binutils/filemode.c
index 8b438a9a50d3..78578c88241c 100644
--- a/contrib/binutils/binutils/filemode.c
+++ b/contrib/binutils/binutils/filemode.c
@@ -1,5 +1,5 @@
/* filemode.c -- make a string describing file modes
- Copyright 1985, 1990, 1991, 1994, 1995, 1997, 2003
+ Copyright 1985, 1990, 1991, 1994, 1995, 1997, 1999, 2002, 2003, 2005
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "bucomm.h"
@@ -59,18 +59,6 @@ static void setst (unsigned long, char *);
otherwise.
'T' if the file is sticky but not executable. */
-#if 0
-
-/* This is not used; only mode_string is used. */
-
-void
-filemodestring (struct stat *statp, char *str)
-{
- mode_string ((unsigned long) statp->st_mode, str);
-}
-
-#endif
-
/* Get definitions for the file permission bits. */
#ifndef S_IRWXU
diff --git a/contrib/binutils/binutils/ieee.c b/contrib/binutils/binutils/ieee.c
index 1ced603680d9..98ec30de9efd 100644
--- a/contrib/binutils/binutils/ieee.c
+++ b/contrib/binutils/binutils/ieee.c
@@ -1,5 +1,6 @@
/* ieee.c -- Read and write IEEE-695 debugging information.
- Copyright 1996, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2006
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -16,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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file reads and writes IEEE-695 debugging information. */
@@ -4593,8 +4594,10 @@ write_ieee_debugging_info (bfd *abfd, void *dhandle)
info.type_indx = 256;
info.name_indx = 32;
- if (! bfd_hash_table_init (&info.typedefs.root, ieee_name_type_newfunc)
- || ! bfd_hash_table_init (&info.tags.root, ieee_name_type_newfunc))
+ if (!bfd_hash_table_init (&info.typedefs.root, ieee_name_type_newfunc,
+ sizeof (struct ieee_name_type_hash_entry))
+ || !bfd_hash_table_init (&info.tags.root, ieee_name_type_newfunc,
+ sizeof (struct ieee_name_type_hash_entry)))
return FALSE;
if (! ieee_init_buffer (&info, &info.global_types)
diff --git a/contrib/binutils/binutils/nm.c b/contrib/binutils/binutils/nm.c
index bac7d388ce29..c1fb4d803e84 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
+ 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "progress.h"
@@ -68,31 +68,6 @@ struct extended_symbol_info
#define SYM_SIZE(sym) \
(sym->elfinfo ? sym->elfinfo->internal_elf_sym.st_size: sym->ssize)
-static void usage (FILE *, int);
-static void set_print_radix (char *);
-static void set_output_format (char *);
-static void display_archive (bfd *);
-static bfd_boolean display_file (char *);
-static void display_rel_file (bfd *, bfd *);
-static long filter_symbols (bfd *, bfd_boolean, void *, long, unsigned int);
-static long sort_symbols_by_size
- (bfd *, bfd_boolean, void *, long, unsigned int, struct size_sym **);
-static void print_symbols
- (bfd *, bfd_boolean, void *, long, unsigned int, bfd *);
-static void print_size_symbols
- (bfd *, bfd_boolean, struct size_sym *, long, bfd *);
-static void print_symname (const char *, const char *, bfd *);
-static void print_symbol (bfd *, asymbol *, bfd_vma ssize, bfd *);
-static void print_symdef_entry (bfd *);
-
-/* The sorting functions. */
-static int numeric_forward (const void *, const void *);
-static int numeric_reverse (const void *, const void *);
-static int non_numeric_forward (const void *, const void *);
-static int non_numeric_reverse (const void *, const void *);
-static int size_forward1 (const void *, const void *);
-static int size_forward2 (const void *, const void *);
-
/* The output formatting functions. */
static void print_object_filename_bsd (char *);
static void print_object_filename_sysv (char *);
@@ -110,8 +85,6 @@ static void print_value (bfd *, bfd_vma);
static void print_symbol_info_bsd (struct extended_symbol_info *, bfd *);
static void print_symbol_info_sysv (struct extended_symbol_info *, bfd *);
static void print_symbol_info_posix (struct extended_symbol_info *, bfd *);
-static void get_relocs (bfd *, asection *, void *);
-static const char * get_symbol_type (unsigned int);
/* Support for different output formats. */
struct output_fns
@@ -177,7 +150,9 @@ static int undefined_only = 0; /* Print undefined symbols only. */
static int dynamic = 0; /* Print dynamic symbols. */
static int show_version = 0; /* Show the version number. */
static int show_stats = 0; /* Show statistics. */
+static int show_synthetic = 0; /* Display synthesized symbols too. */
static int line_numbers = 0; /* Print line numbers for symbols. */
+static int allow_special_symbols = 0; /* Allow special symbols. */
/* When to print the names of files. Not mutually exclusive in SYSV format. */
static int filename_per_file = 0; /* Once per file, on its own line. */
@@ -231,7 +206,9 @@ static struct option long_options[] =
{"radix", required_argument, 0, 't'},
{"reverse-sort", no_argument, &reverse_sort, 1},
{"size-sort", no_argument, &sort_by_size, 1},
+ {"special-syms", no_argument, &allow_special_symbols, 1},
{"stats", no_argument, &show_stats, 1},
+ {"synthetic", no_argument, &show_synthetic, 1},
{"target", required_argument, 0, OPTION_TARGET},
{"defined-only", no_argument, &defined_only, 1},
{"undefined-only", no_argument, &undefined_only, 1},
@@ -271,10 +248,13 @@ usage (FILE *stream, int status)
-S, --print-size Print size of defined symbols\n\
-s, --print-armap Include index for symbols from archive members\n\
--size-sort Sort symbols by size\n\
+ --special-syms Include special symbols in the output\n\
+ --synthetic Display synthetic symbols as well\n\
-t, --radix=RADIX Use RADIX for printing symbol values\n\
--target=BFDNAME Specify the target object format as BFDNAME\n\
-u, --undefined-only Display only undefined symbols\n\
-X 32_64 (ignored)\n\
+ @FILE Read options from FILE\n\
-h, --help Display this information\n\
-V, --version Display this program's version number\n\
\n"));
@@ -341,173 +321,6 @@ set_output_format (char *f)
format = &formats[i];
}
-int main (int, char **);
-
-int
-main (int argc, char **argv)
-{
- int c;
- int retval;
-
-#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
- setlocale (LC_MESSAGES, "");
-#endif
-#if defined (HAVE_SETLOCALE)
- setlocale (LC_CTYPE, "");
- setlocale (LC_COLLATE, "");
-#endif
- bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
-
- program_name = *argv;
- xmalloc_set_program_name (program_name);
-
- START_PROGRESS (program_name, 0);
-
- bfd_init ();
- set_default_bfd_target ();
-
- while ((c = getopt_long (argc, argv, "aABCDef:gHhlnopPrSst:uvVvX:",
- long_options, (int *) 0)) != EOF)
- {
- switch (c)
- {
- case 'a':
- print_debug_syms = 1;
- break;
- case 'A':
- case 'o':
- filename_per_symbol = 1;
- break;
- case 'B': /* For MIPS compatibility. */
- set_output_format ("bsd");
- break;
- case 'C':
- do_demangle = 1;
- if (optarg != NULL)
- {
- enum demangling_styles style;
-
- style = cplus_demangle_name_to_style (optarg);
- if (style == unknown_demangling)
- fatal (_("unknown demangling style `%s'"),
- optarg);
-
- cplus_demangle_set_style (style);
- }
- break;
- case 'D':
- dynamic = 1;
- break;
- case 'e':
- /* Ignored for HP/UX compatibility. */
- break;
- case 'f':
- set_output_format (optarg);
- break;
- case 'g':
- external_only = 1;
- break;
- case 'H':
- case 'h':
- usage (stdout, 0);
- case 'l':
- line_numbers = 1;
- break;
- case 'n':
- case 'v':
- sort_numerically = 1;
- break;
- case 'p':
- no_sort = 1;
- break;
- case 'P':
- set_output_format ("posix");
- break;
- case 'r':
- reverse_sort = 1;
- break;
- case 's':
- print_armap = 1;
- break;
- case 'S':
- print_size = 1;
- break;
- case 't':
- set_print_radix (optarg);
- break;
- case 'u':
- undefined_only = 1;
- break;
- case 'V':
- show_version = 1;
- break;
- case 'X':
- /* Ignored for (partial) AIX compatibility. On AIX, the
- argument has values 32, 64, or 32_64, and specifies that
- only 32-bit, only 64-bit, or both kinds of objects should
- be examined. The default is 32. So plain AIX nm on a
- library archive with both kinds of objects will ignore
- the 64-bit ones. For GNU nm, the default is and always
- has been -X 32_64, and other options are not supported. */
- if (strcmp (optarg, "32_64") != 0)
- fatal (_("Only -X 32_64 is supported"));
- break;
-
- case OPTION_TARGET: /* --target */
- target = optarg;
- break;
-
- case 0: /* A long option that just sets a flag. */
- break;
-
- default:
- usage (stderr, 1);
- }
- }
-
- if (show_version)
- print_version ("nm");
-
- if (sort_by_size && undefined_only)
- {
- non_fatal (_("Using the --size-sort and --undefined-only options together"));
- non_fatal (_("will produce no output, since undefined symbols have no size."));
- return 0;
- }
-
- /* OK, all options now parsed. If no filename specified, do a.out. */
- if (optind == argc)
- return !display_file ("a.out");
-
- retval = 0;
-
- if (argc - optind > 1)
- filename_per_file = 1;
-
- /* We were given several filenames to do. */
- while (optind < argc)
- {
- PROGRESS (1);
- if (!display_file (argv[optind++]))
- retval++;
- }
-
- END_PROGRESS (program_name);
-
-#ifdef HAVE_SBRK
- if (show_stats)
- {
- char *lim = (char *) sbrk (0);
-
- non_fatal (_("data size %ld"), (long) (lim - (char *) &environ));
- }
-#endif
-
- exit (retval);
- return retval;
-}
-
static const char *
get_symbol_type (unsigned int type)
{
@@ -532,117 +345,124 @@ get_symbol_type (unsigned int type)
return buff;
}
}
+
+/* Print symbol name NAME, read from ABFD, with printf format FORMAT,
+ demangling it if requested. */
static void
-display_archive (bfd *file)
+print_symname (const char *format, const char *name, bfd *abfd)
{
- bfd *arfile = NULL;
- bfd *last_arfile = NULL;
- char **matching;
-
- (*format->print_archive_filename) (bfd_get_filename (file));
-
- if (print_armap)
- print_symdef_entry (file);
-
- for (;;)
+ if (do_demangle && *name)
{
- PROGRESS (1);
+ char *res = demangle (abfd, name);
- arfile = bfd_openr_next_archived_file (file, arfile);
+ printf (format, res);
+ free (res);
+ return;
+ }
- if (arfile == NULL)
- {
- if (bfd_get_error () != bfd_error_no_more_archived_files)
- bfd_fatal (bfd_get_filename (file));
- break;
- }
+ printf (format, name);
+}
- if (bfd_check_format_matches (arfile, bfd_object, &matching))
- {
- char buf[30];
+static void
+print_symdef_entry (bfd *abfd)
+{
+ symindex idx = BFD_NO_MORE_SYMBOLS;
+ carsym *thesym;
+ bfd_boolean everprinted = FALSE;
- bfd_sprintf_vma (arfile, buf, (bfd_vma) -1);
- print_width = strlen (buf);
- (*format->print_archive_member) (bfd_get_filename (file),
- bfd_get_filename (arfile));
- display_rel_file (arfile, file);
- }
- else
+ for (idx = bfd_get_next_mapent (abfd, idx, &thesym);
+ idx != BFD_NO_MORE_SYMBOLS;
+ idx = bfd_get_next_mapent (abfd, idx, &thesym))
+ {
+ bfd *elt;
+ if (!everprinted)
{
- bfd_nonfatal (bfd_get_filename (arfile));
- if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
- {
- list_matching_formats (matching);
- free (matching);
- }
+ printf (_("\nArchive index:\n"));
+ everprinted = TRUE;
}
-
- if (last_arfile != NULL)
+ elt = bfd_get_elt_at_index (abfd, idx);
+ if (elt == NULL)
+ bfd_fatal ("bfd_get_elt_at_index");
+ if (thesym->name != (char *) NULL)
{
- bfd_close (last_arfile);
- lineno_cache_bfd = NULL;
- lineno_cache_rel_bfd = NULL;
+ print_symname ("%s", thesym->name, abfd);
+ printf (" in %s\n", bfd_get_filename (elt));
}
- last_arfile = arfile;
- }
-
- if (last_arfile != NULL)
- {
- bfd_close (last_arfile);
- lineno_cache_bfd = NULL;
- lineno_cache_rel_bfd = NULL;
}
}
+
+/* Choose which symbol entries to print;
+ compact them downward to get rid of the rest.
+ Return the number of symbols to be printed. */
-static bfd_boolean
-display_file (char *filename)
+static long
+filter_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms,
+ long symcount, unsigned int size)
{
- bfd_boolean retval = TRUE;
- bfd *file;
- char **matching;
+ bfd_byte *from, *fromend, *to;
+ asymbol *store;
- if (get_file_size (filename) < 1)
- return FALSE;
+ store = bfd_make_empty_symbol (abfd);
+ if (store == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
- file = bfd_openr (filename, target);
- if (file == NULL)
- {
- bfd_nonfatal (filename);
- return FALSE;
- }
+ from = (bfd_byte *) minisyms;
+ fromend = from + symcount * size;
+ to = (bfd_byte *) minisyms;
- if (bfd_check_format (file, bfd_archive))
- {
- display_archive (file);
- }
- else if (bfd_check_format_matches (file, bfd_object, &matching))
+ for (; from < fromend; from += size)
{
- char buf[30];
+ int keep = 0;
+ asymbol *sym;
- bfd_sprintf_vma (file, buf, (bfd_vma) -1);
- print_width = strlen (buf);
- (*format->print_object_filename) (filename);
- display_rel_file (file, NULL);
- }
- else
- {
- bfd_nonfatal (filename);
- if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
+ PROGRESS (1);
+
+ sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const void *) from, store);
+ if (sym == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ if (undefined_only)
+ keep = bfd_is_und_section (sym->section);
+ else if (external_only)
+ keep = ((sym->flags & BSF_GLOBAL) != 0
+ || (sym->flags & BSF_WEAK) != 0
+ || bfd_is_und_section (sym->section)
+ || bfd_is_com_section (sym->section));
+ else
+ keep = 1;
+
+ if (keep
+ && ! print_debug_syms
+ && (sym->flags & BSF_DEBUGGING) != 0)
+ keep = 0;
+
+ if (keep
+ && sort_by_size
+ && (bfd_is_abs_section (sym->section)
+ || bfd_is_und_section (sym->section)))
+ keep = 0;
+
+ if (keep
+ && defined_only)
{
- list_matching_formats (matching);
- free (matching);
+ if (bfd_is_und_section (sym->section))
+ keep = 0;
}
- retval = FALSE;
- }
- if (!bfd_close (file))
- bfd_fatal (filename);
+ if (keep
+ && bfd_is_target_special_symbol (abfd, sym)
+ && ! allow_special_symbols)
+ keep = 0;
- lineno_cache_bfd = NULL;
- lineno_cache_rel_bfd = NULL;
+ if (keep)
+ {
+ memcpy (to, from, size);
+ to += size;
+ }
+ }
- return retval;
+ return (to - (bfd_byte *) minisyms) / size;
}
/* These globals are used to pass information into the sorting
@@ -660,39 +480,6 @@ static asymbol *sort_y;
specially -- i.e., their sizes are used as their "values". */
static int
-numeric_forward (const void *P_x, const void *P_y)
-{
- asymbol *x, *y;
- asection *xs, *ys;
-
- x = bfd_minisymbol_to_symbol (sort_bfd, sort_dynamic, P_x, sort_x);
- y = bfd_minisymbol_to_symbol (sort_bfd, sort_dynamic, P_y, sort_y);
- if (x == NULL || y == NULL)
- bfd_fatal (bfd_get_filename (sort_bfd));
-
- xs = bfd_get_section (x);
- ys = bfd_get_section (y);
-
- if (bfd_is_und_section (xs))
- {
- if (! bfd_is_und_section (ys))
- return -1;
- }
- else if (bfd_is_und_section (ys))
- return 1;
- else if (valueof (x) != valueof (y))
- return valueof (x) < valueof (y) ? -1 : 1;
-
- return non_numeric_forward (P_x, P_y);
-}
-
-static int
-numeric_reverse (const void *x, const void *y)
-{
- return - numeric_forward (x, y);
-}
-
-static int
non_numeric_forward (const void *P_x, const void *P_y)
{
asymbol *x, *y;
@@ -731,6 +518,39 @@ non_numeric_reverse (const void *x, const void *y)
return - non_numeric_forward (x, y);
}
+static int
+numeric_forward (const void *P_x, const void *P_y)
+{
+ asymbol *x, *y;
+ asection *xs, *ys;
+
+ x = bfd_minisymbol_to_symbol (sort_bfd, sort_dynamic, P_x, sort_x);
+ y = bfd_minisymbol_to_symbol (sort_bfd, sort_dynamic, P_y, sort_y);
+ if (x == NULL || y == NULL)
+ bfd_fatal (bfd_get_filename (sort_bfd));
+
+ xs = bfd_get_section (x);
+ ys = bfd_get_section (y);
+
+ if (bfd_is_und_section (xs))
+ {
+ if (! bfd_is_und_section (ys))
+ return -1;
+ }
+ else if (bfd_is_und_section (ys))
+ return 1;
+ else if (valueof (x) != valueof (y))
+ return valueof (x) < valueof (y) ? -1 : 1;
+
+ return non_numeric_forward (P_x, P_y);
+}
+
+static int
+numeric_reverse (const void *x, const void *y)
+{
+ return - numeric_forward (x, y);
+}
+
static int (*(sorters[2][2])) (const void *, const void *) =
{
{ non_numeric_forward, non_numeric_reverse },
@@ -851,7 +671,7 @@ sort_symbols_by_size (bfd *abfd, bfd_boolean dynamic, void *minisyms,
/* We are going to return a special set of symbols and sizes to
print. */
- symsizes = (struct size_sym *) xmalloc (symcount * sizeof (struct size_sym));
+ symsizes = xmalloc (symcount * sizeof (struct size_sym));
*symsizesp = symsizes;
/* Note that filter_symbols has already removed all absolute and
@@ -928,215 +748,40 @@ sort_symbols_by_size (bfd *abfd, bfd_boolean dynamic, void *minisyms,
return symcount;
}
-
-/* If ARCHIVE_BFD is non-NULL, it is the archive containing ABFD. */
+
+/* This function is used to get the relocs for a particular section.
+ It is called via bfd_map_over_sections. */
static void
-display_rel_file (bfd *abfd, bfd *archive_bfd)
+get_relocs (bfd *abfd, asection *sec, void *dataarg)
{
- long symcount;
- void *minisyms;
- unsigned int size;
- struct size_sym *symsizes;
-
- if (! dynamic)
- {
- if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
- {
- non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
- return;
- }
- }
-
- symcount = bfd_read_minisymbols (abfd, dynamic, &minisyms, &size);
- if (symcount < 0)
- bfd_fatal (bfd_get_filename (abfd));
-
- if (symcount == 0)
- {
- non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
- return;
- }
-
- /* Discard the symbols we don't want to print.
- It's OK to do this in place; we'll free the storage anyway
- (after printing). */
+ struct get_relocs_info *data = (struct get_relocs_info *) dataarg;
- symcount = filter_symbols (abfd, dynamic, minisyms, symcount, size);
+ *data->secs = sec;
- symsizes = NULL;
- if (! no_sort)
+ if ((sec->flags & SEC_RELOC) == 0)
{
- sort_bfd = abfd;
- sort_dynamic = dynamic;
- sort_x = bfd_make_empty_symbol (abfd);
- sort_y = bfd_make_empty_symbol (abfd);
- if (sort_x == NULL || sort_y == NULL)
- bfd_fatal (bfd_get_filename (abfd));
-
- if (! sort_by_size)
- qsort (minisyms, symcount, size,
- sorters[sort_numerically][reverse_sort]);
- else
- symcount = sort_symbols_by_size (abfd, dynamic, minisyms, symcount,
- size, &symsizes);
+ *data->relocs = NULL;
+ *data->relcount = 0;
}
-
- if (! sort_by_size)
- print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd);
else
- print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd);
-
- free (minisyms);
-}
-
-/* Choose which symbol entries to print;
- compact them downward to get rid of the rest.
- Return the number of symbols to be printed. */
-
-static long
-filter_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms,
- long symcount, unsigned int size)
-{
- bfd_byte *from, *fromend, *to;
- asymbol *store;
-
- store = bfd_make_empty_symbol (abfd);
- if (store == NULL)
- bfd_fatal (bfd_get_filename (abfd));
-
- from = (bfd_byte *) minisyms;
- fromend = from + symcount * size;
- to = (bfd_byte *) minisyms;
-
- for (; from < fromend; from += size)
{
- int keep = 0;
- asymbol *sym;
-
- PROGRESS (1);
+ long relsize;
- sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const void *) from, store);
- if (sym == NULL)
+ relsize = bfd_get_reloc_upper_bound (abfd, sec);
+ if (relsize < 0)
bfd_fatal (bfd_get_filename (abfd));
- if (undefined_only)
- keep = bfd_is_und_section (sym->section);
- else if (external_only)
- keep = ((sym->flags & BSF_GLOBAL) != 0
- || (sym->flags & BSF_WEAK) != 0
- || bfd_is_und_section (sym->section)
- || bfd_is_com_section (sym->section));
- else
- keep = 1;
-
- if (keep
- && ! print_debug_syms
- && (sym->flags & BSF_DEBUGGING) != 0)
- keep = 0;
-
- if (keep
- && sort_by_size
- && (bfd_is_abs_section (sym->section)
- || bfd_is_und_section (sym->section)))
- keep = 0;
-
- if (keep
- && defined_only)
- {
- if (bfd_is_und_section (sym->section))
- keep = 0;
- }
-
- if (keep)
- {
- memcpy (to, from, size);
- to += size;
- }
- }
-
- return (to - (bfd_byte *) minisyms) / size;
-}
-
-/* Print symbol name NAME, read from ABFD, with printf format FORMAT,
- demangling it if requested. */
-
-static void
-print_symname (const char *format, const char *name, bfd *abfd)
-{
- if (do_demangle && *name)
- {
- char *res = demangle (abfd, name);
-
- printf (format, res);
- free (res);
- return;
- }
-
- printf (format, name);
-}
-
-/* Print the symbols. If ARCHIVE_BFD is non-NULL, it is the archive
- containing ABFD. */
-
-static void
-print_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms, long symcount,
- unsigned int size, bfd *archive_bfd)
-{
- asymbol *store;
- bfd_byte *from, *fromend;
-
- store = bfd_make_empty_symbol (abfd);
- if (store == NULL)
- bfd_fatal (bfd_get_filename (abfd));
-
- from = (bfd_byte *) minisyms;
- fromend = from + symcount * size;
- for (; from < fromend; from += size)
- {
- asymbol *sym;
-
- sym = bfd_minisymbol_to_symbol (abfd, dynamic, from, store);
- if (sym == NULL)
+ *data->relocs = xmalloc (relsize);
+ *data->relcount = bfd_canonicalize_reloc (abfd, sec, *data->relocs,
+ data->syms);
+ if (*data->relcount < 0)
bfd_fatal (bfd_get_filename (abfd));
-
- print_symbol (abfd, sym, (bfd_vma) 0, archive_bfd);
}
-}
-
-/* Print the symbols when sorting by size. */
-
-static void
-print_size_symbols (bfd *abfd, bfd_boolean dynamic,
- struct size_sym *symsizes, long symcount,
- bfd *archive_bfd)
-{
- asymbol *store;
- struct size_sym *from, *fromend;
-
- store = bfd_make_empty_symbol (abfd);
- if (store == NULL)
- bfd_fatal (bfd_get_filename (abfd));
-
- from = symsizes;
- fromend = from + symcount;
- for (; from < fromend; from++)
- {
- asymbol *sym;
- bfd_vma ssize;
- sym = bfd_minisymbol_to_symbol (abfd, dynamic, from->minisym, store);
- if (sym == NULL)
- bfd_fatal (bfd_get_filename (abfd));
-
- /* For elf we have already computed the correct symbol size. */
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
- ssize = from->size;
- else
- ssize = from->size - bfd_section_vma (abfd, bfd_get_section (sym));
-
- print_symbol (abfd, sym, ssize, archive_bfd);
- }
+ ++data->secs;
+ ++data->relocs;
+ ++data->relcount;
}
/* Print a single symbol. */
@@ -1149,7 +794,7 @@ print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd)
PROGRESS (1);
- (*format->print_symbol_filename) (archive_bfd, abfd);
+ format->print_symbol_filename (archive_bfd, abfd);
bfd_get_symbol_info (abfd, sym, &syminfo);
info.sinfo = &syminfo;
@@ -1158,7 +803,7 @@ print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd)
info.elfinfo = (elf_symbol_type *) sym;
else
info.elfinfo = NULL;
- (*format->print_symbol_info) (&info, abfd);
+ format->print_symbol_info (&info, abfd);
if (line_numbers)
{
@@ -1182,7 +827,7 @@ print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd)
symsize = bfd_get_symtab_upper_bound (abfd);
if (symsize < 0)
bfd_fatal (bfd_get_filename (abfd));
- syms = (asymbol **) xmalloc (symsize);
+ syms = xmalloc (symsize);
symcount = bfd_canonicalize_symtab (abfd, syms);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
@@ -1219,9 +864,9 @@ print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd)
seccount = bfd_count_sections (abfd);
- secs = (asection **) xmalloc (seccount * sizeof *secs);
- relocs = (arelent ***) xmalloc (seccount * sizeof *relocs);
- relcount = (long *) xmalloc (seccount * sizeof *relcount);
+ secs = xmalloc (seccount * sizeof *secs);
+ relocs = xmalloc (seccount * sizeof *relocs);
+ relcount = xmalloc (seccount * sizeof *relcount);
info.secs = secs;
info.relocs = relocs;
@@ -1261,18 +906,303 @@ print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd)
}
else if (bfd_get_section (sym)->owner == abfd)
{
- if (bfd_find_nearest_line (abfd, bfd_get_section (sym), syms,
- sym->value, &filename, &functionname,
- &lineno)
+ if ((bfd_find_line (abfd, syms, sym, &filename, &lineno)
+ || bfd_find_nearest_line (abfd, bfd_get_section (sym),
+ syms, sym->value, &filename,
+ &functionname, &lineno))
&& filename != NULL
&& lineno != 0)
+ printf ("\t%s:%u", filename, lineno);
+ }
+ }
+
+ putchar ('\n');
+}
+
+/* Print the symbols when sorting by size. */
+
+static void
+print_size_symbols (bfd *abfd, bfd_boolean dynamic,
+ struct size_sym *symsizes, long symcount,
+ bfd *archive_bfd)
+{
+ asymbol *store;
+ struct size_sym *from, *fromend;
+
+ store = bfd_make_empty_symbol (abfd);
+ if (store == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ from = symsizes;
+ fromend = from + symcount;
+ for (; from < fromend; from++)
+ {
+ asymbol *sym;
+ bfd_vma ssize;
+
+ sym = bfd_minisymbol_to_symbol (abfd, dynamic, from->minisym, store);
+ if (sym == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ /* For elf we have already computed the correct symbol size. */
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ ssize = from->size;
+ else
+ ssize = from->size - bfd_section_vma (abfd, bfd_get_section (sym));
+
+ print_symbol (abfd, sym, ssize, archive_bfd);
+ }
+}
+
+
+/* Print the symbols. If ARCHIVE_BFD is non-NULL, it is the archive
+ containing ABFD. */
+
+static void
+print_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms, long symcount,
+ unsigned int size, bfd *archive_bfd)
+{
+ asymbol *store;
+ bfd_byte *from, *fromend;
+
+ store = bfd_make_empty_symbol (abfd);
+ if (store == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ from = (bfd_byte *) minisyms;
+ fromend = from + symcount * size;
+ for (; from < fromend; from += size)
+ {
+ asymbol *sym;
+
+ sym = bfd_minisymbol_to_symbol (abfd, dynamic, from, store);
+ if (sym == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ print_symbol (abfd, sym, (bfd_vma) 0, archive_bfd);
+ }
+}
+
+/* If ARCHIVE_BFD is non-NULL, it is the archive containing ABFD. */
+
+static void
+display_rel_file (bfd *abfd, bfd *archive_bfd)
+{
+ long symcount;
+ void *minisyms;
+ unsigned int size;
+ struct size_sym *symsizes;
+
+ if (! dynamic)
+ {
+ if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
+ {
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
+ return;
+ }
+ }
+
+ symcount = bfd_read_minisymbols (abfd, dynamic, &minisyms, &size);
+ if (symcount < 0)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ if (symcount == 0)
+ {
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
+ return;
+ }
+
+ if (show_synthetic && size == sizeof (asymbol *))
+ {
+ asymbol *synthsyms;
+ long synth_count;
+ asymbol **static_syms = NULL;
+ asymbol **dyn_syms = NULL;
+ long static_count = 0;
+ long dyn_count = 0;
+
+ if (dynamic)
+ {
+ dyn_count = symcount;
+ dyn_syms = minisyms;
+ }
+ else
+ {
+ long storage = bfd_get_dynamic_symtab_upper_bound (abfd);
+
+ static_count = symcount;
+ static_syms = minisyms;
+
+ if (storage > 0)
{
- printf ("\t%s:%u", filename, lineno);
+ dyn_syms = xmalloc (storage);
+ dyn_count = bfd_canonicalize_dynamic_symtab (abfd, dyn_syms);
+ if (dyn_count < 0)
+ bfd_fatal (bfd_get_filename (abfd));
}
}
+ synth_count = bfd_get_synthetic_symtab (abfd, static_count, static_syms,
+ dyn_count, dyn_syms, &synthsyms);
+ if (synth_count > 0)
+ {
+ asymbol **symp;
+ void *new_mini;
+ long i;
+
+ new_mini = xmalloc ((symcount + synth_count + 1) * sizeof (*symp));
+ symp = new_mini;
+ memcpy (symp, minisyms, symcount * sizeof (*symp));
+ symp += symcount;
+ for (i = 0; i < synth_count; i++)
+ *symp++ = synthsyms + i;
+ *symp = 0;
+ minisyms = new_mini;
+ symcount += synth_count;
+ }
}
- putchar ('\n');
+ /* Discard the symbols we don't want to print.
+ It's OK to do this in place; we'll free the storage anyway
+ (after printing). */
+
+ symcount = filter_symbols (abfd, dynamic, minisyms, symcount, size);
+
+ symsizes = NULL;
+ if (! no_sort)
+ {
+ sort_bfd = abfd;
+ sort_dynamic = dynamic;
+ sort_x = bfd_make_empty_symbol (abfd);
+ sort_y = bfd_make_empty_symbol (abfd);
+ if (sort_x == NULL || sort_y == NULL)
+ bfd_fatal (bfd_get_filename (abfd));
+
+ if (! sort_by_size)
+ qsort (minisyms, symcount, size,
+ sorters[sort_numerically][reverse_sort]);
+ else
+ symcount = sort_symbols_by_size (abfd, dynamic, minisyms, symcount,
+ size, &symsizes);
+ }
+
+ if (! sort_by_size)
+ print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd);
+ else
+ print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd);
+
+ free (minisyms);
+}
+
+static void
+display_archive (bfd *file)
+{
+ bfd *arfile = NULL;
+ bfd *last_arfile = NULL;
+ char **matching;
+
+ format->print_archive_filename (bfd_get_filename (file));
+
+ if (print_armap)
+ print_symdef_entry (file);
+
+ for (;;)
+ {
+ PROGRESS (1);
+
+ arfile = bfd_openr_next_archived_file (file, arfile);
+
+ if (arfile == NULL)
+ {
+ if (bfd_get_error () != bfd_error_no_more_archived_files)
+ bfd_fatal (bfd_get_filename (file));
+ break;
+ }
+
+ if (bfd_check_format_matches (arfile, bfd_object, &matching))
+ {
+ char buf[30];
+
+ bfd_sprintf_vma (arfile, buf, (bfd_vma) -1);
+ print_width = strlen (buf);
+ format->print_archive_member (bfd_get_filename (file),
+ bfd_get_filename (arfile));
+ display_rel_file (arfile, file);
+ }
+ else
+ {
+ bfd_nonfatal (bfd_get_filename (arfile));
+ if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
+ {
+ list_matching_formats (matching);
+ free (matching);
+ }
+ }
+
+ if (last_arfile != NULL)
+ {
+ bfd_close (last_arfile);
+ lineno_cache_bfd = NULL;
+ lineno_cache_rel_bfd = NULL;
+ }
+ last_arfile = arfile;
+ }
+
+ if (last_arfile != NULL)
+ {
+ bfd_close (last_arfile);
+ lineno_cache_bfd = NULL;
+ lineno_cache_rel_bfd = NULL;
+ }
+}
+
+static bfd_boolean
+display_file (char *filename)
+{
+ bfd_boolean retval = TRUE;
+ bfd *file;
+ char **matching;
+
+ if (get_file_size (filename) < 1)
+ return FALSE;
+
+ file = bfd_openr (filename, target);
+ if (file == NULL)
+ {
+ bfd_nonfatal (filename);
+ return FALSE;
+ }
+
+ if (bfd_check_format (file, bfd_archive))
+ {
+ display_archive (file);
+ }
+ 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);
+ format->print_object_filename (filename);
+ display_rel_file (file, NULL);
+ }
+ else
+ {
+ bfd_nonfatal (filename);
+ if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
+ {
+ list_matching_formats (matching);
+ free (matching);
+ }
+ retval = FALSE;
+ }
+
+ if (!bfd_close (file))
+ bfd_fatal (filename);
+
+ lineno_cache_bfd = NULL;
+ lineno_cache_rel_bfd = NULL;
+
+ return retval;
}
/* The following 3 groups of functions are called unconditionally,
@@ -1541,65 +1471,169 @@ print_symbol_info_posix (struct extended_symbol_info *info, bfd *abfd)
}
}
-static void
-print_symdef_entry (bfd *abfd)
+int
+main (int argc, char **argv)
{
- symindex idx = BFD_NO_MORE_SYMBOLS;
- carsym *thesym;
- bfd_boolean everprinted = FALSE;
+ int c;
+ int retval;
- for (idx = bfd_get_next_mapent (abfd, idx, &thesym);
- idx != BFD_NO_MORE_SYMBOLS;
- idx = bfd_get_next_mapent (abfd, idx, &thesym))
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+ setlocale (LC_COLLATE, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ program_name = *argv;
+ xmalloc_set_program_name (program_name);
+
+ START_PROGRESS (program_name, 0);
+
+ expandargv (&argc, &argv);
+
+ bfd_init ();
+ set_default_bfd_target ();
+
+ while ((c = getopt_long (argc, argv, "aABCDef:gHhlnopPrSst:uvVvX:",
+ long_options, (int *) 0)) != EOF)
{
- bfd *elt;
- if (!everprinted)
- {
- printf (_("\nArchive index:\n"));
- everprinted = TRUE;
- }
- elt = bfd_get_elt_at_index (abfd, idx);
- if (elt == NULL)
- bfd_fatal ("bfd_get_elt_at_index");
- if (thesym->name != (char *) NULL)
+ switch (c)
{
- print_symname ("%s", thesym->name, abfd);
- printf (" in %s\n", bfd_get_filename (elt));
+ case 'a':
+ print_debug_syms = 1;
+ break;
+ case 'A':
+ case 'o':
+ filename_per_symbol = 1;
+ break;
+ case 'B': /* For MIPS compatibility. */
+ set_output_format ("bsd");
+ break;
+ case 'C':
+ do_demangle = 1;
+ if (optarg != NULL)
+ {
+ enum demangling_styles style;
+
+ style = cplus_demangle_name_to_style (optarg);
+ if (style == unknown_demangling)
+ fatal (_("unknown demangling style `%s'"),
+ optarg);
+
+ cplus_demangle_set_style (style);
+ }
+ break;
+ case 'D':
+ dynamic = 1;
+ break;
+ case 'e':
+ /* Ignored for HP/UX compatibility. */
+ break;
+ case 'f':
+ set_output_format (optarg);
+ break;
+ case 'g':
+ external_only = 1;
+ break;
+ case 'H':
+ case 'h':
+ usage (stdout, 0);
+ case 'l':
+ line_numbers = 1;
+ break;
+ case 'n':
+ case 'v':
+ sort_numerically = 1;
+ break;
+ case 'p':
+ no_sort = 1;
+ break;
+ case 'P':
+ set_output_format ("posix");
+ break;
+ case 'r':
+ reverse_sort = 1;
+ break;
+ case 's':
+ print_armap = 1;
+ break;
+ case 'S':
+ print_size = 1;
+ break;
+ case 't':
+ set_print_radix (optarg);
+ break;
+ case 'u':
+ undefined_only = 1;
+ break;
+ case 'V':
+ show_version = 1;
+ break;
+ case 'X':
+ /* Ignored for (partial) AIX compatibility. On AIX, the
+ argument has values 32, 64, or 32_64, and specifies that
+ only 32-bit, only 64-bit, or both kinds of objects should
+ be examined. The default is 32. So plain AIX nm on a
+ library archive with both kinds of objects will ignore
+ the 64-bit ones. For GNU nm, the default is and always
+ has been -X 32_64, and other options are not supported. */
+ if (strcmp (optarg, "32_64") != 0)
+ fatal (_("Only -X 32_64 is supported"));
+ break;
+
+ case OPTION_TARGET: /* --target */
+ target = optarg;
+ break;
+
+ case 0: /* A long option that just sets a flag. */
+ break;
+
+ default:
+ usage (stderr, 1);
}
}
-}
-
-/* This function is used to get the relocs for a particular section.
- It is called via bfd_map_over_sections. */
-static void
-get_relocs (bfd *abfd, asection *sec, void *dataarg)
-{
- struct get_relocs_info *data = (struct get_relocs_info *) dataarg;
-
- *data->secs = sec;
+ if (show_version)
+ print_version ("nm");
- if ((sec->flags & SEC_RELOC) == 0)
+ if (sort_by_size && undefined_only)
{
- *data->relocs = NULL;
- *data->relcount = 0;
+ non_fatal (_("Using the --size-sort and --undefined-only options together"));
+ non_fatal (_("will produce no output, since undefined symbols have no size."));
+ return 0;
}
- else
+
+ /* OK, all options now parsed. If no filename specified, do a.out. */
+ if (optind == argc)
+ return !display_file ("a.out");
+
+ retval = 0;
+
+ if (argc - optind > 1)
+ filename_per_file = 1;
+
+ /* We were given several filenames to do. */
+ while (optind < argc)
{
- long relsize;
+ PROGRESS (1);
+ if (!display_file (argv[optind++]))
+ retval++;
+ }
- relsize = bfd_get_reloc_upper_bound (abfd, sec);
- if (relsize < 0)
- bfd_fatal (bfd_get_filename (abfd));
+ END_PROGRESS (program_name);
- *data->relocs = (arelent **) xmalloc (relsize);
- *data->relcount = bfd_canonicalize_reloc (abfd, sec, *data->relocs,
- data->syms);
- if (*data->relcount < 0)
- bfd_fatal (bfd_get_filename (abfd));
+#ifdef HAVE_SBRK
+ if (show_stats)
+ {
+ char *lim = (char *) sbrk (0);
+
+ non_fatal (_("data size %ld"), (long) (lim - (char *) &environ));
}
+#endif
- ++data->secs;
- ++data->relocs;
- ++data->relcount;
+ exit (retval);
+ return retval;
}
diff --git a/contrib/binutils/binutils/objcopy.c b/contrib/binutils/binutils/objcopy.c
index 96233986c3e0..0e0cfaaccf5e 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
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "progress.h"
@@ -30,6 +30,7 @@
#include "fnmatch.h"
#include "elf-bfd.h"
#include <sys/stat.h>
+#include "libbfd.h"
/* A list of symbols to explicitly strip out, or to keep. A linked
list is good enough for a small number from the command line, but
@@ -146,8 +147,8 @@ static bfd_byte gap_fill = 0;
static bfd_boolean pad_to_set = FALSE;
static bfd_vma pad_to;
-/* Use alternate machine code? */
-static int use_alt_mach_code = 0;
+/* Use alternative machine code? */
+static unsigned long use_alt_mach_code = 0;
/* Output BFD flags user wants to set or clear */
static flagword bfd_flags_to_set;
@@ -192,8 +193,10 @@ static bfd_boolean wildcard = FALSE;
/* List of symbols to strip, keep, localize, keep-global, weaken,
or redefine. */
static struct symlist *strip_specific_list = NULL;
+static struct symlist *strip_unneeded_list = NULL;
static struct symlist *keep_specific_list = NULL;
static struct symlist *localize_specific_list = NULL;
+static struct symlist *globalize_specific_list = NULL;
static struct symlist *keepglobal_specific_list = NULL;
static struct symlist *weaken_specific_list = NULL;
static struct redefine_node *redefine_sym_list = NULL;
@@ -201,6 +204,9 @@ static struct redefine_node *redefine_sym_list = NULL;
/* If this is TRUE, we weaken global symbols (set BSF_WEAK). */
static bfd_boolean weaken = FALSE;
+/* If this is TRUE, we retain BSF_FILE symbols. */
+static bfd_boolean keep_file_symbols = FALSE;
+
/* Prefix symbols/sections. */
static char *prefix_symbols_string = 0;
static char *prefix_sections_string = 0;
@@ -231,8 +237,12 @@ enum command_line_switch
OPTION_SREC_LEN,
OPTION_SREC_FORCES3,
OPTION_STRIP_SYMBOLS,
+ OPTION_STRIP_UNNEEDED_SYMBOL,
+ OPTION_STRIP_UNNEEDED_SYMBOLS,
OPTION_KEEP_SYMBOLS,
OPTION_LOCALIZE_SYMBOLS,
+ OPTION_GLOBALIZE_SYMBOL,
+ OPTION_GLOBALIZE_SYMBOLS,
OPTION_KEEPGLOBAL_SYMBOLS,
OPTION_WEAKEN_SYMBOLS,
OPTION_RENAME_SECTION,
@@ -243,6 +253,7 @@ enum command_line_switch
OPTION_FORMATS_INFO,
OPTION_ADD_GNU_DEBUGLINK,
OPTION_ONLY_KEEP_DEBUG,
+ OPTION_KEEP_FILE_SYMBOLS,
OPTION_READONLY_TEXT,
OPTION_WRITABLE_TEXT,
OPTION_PURE,
@@ -260,6 +271,7 @@ static struct option strip_options[] =
{"info", no_argument, 0, OPTION_FORMATS_INFO},
{"input-format", required_argument, 0, 'I'}, /* Obsolete */
{"input-target", required_argument, 0, 'I'},
+ {"keep-file-symbols", no_argument, 0, OPTION_KEEP_FILE_SYMBOLS},
{"keep-symbol", required_argument, 0, 'K'},
{"only-keep-debug", no_argument, 0, OPTION_ONLY_KEEP_DEBUG},
{"output-format", required_argument, 0, 'O'}, /* Obsolete */
@@ -303,12 +315,15 @@ static struct option copy_options[] =
{"discard-locals", no_argument, 0, 'X'},
{"format", required_argument, 0, 'F'}, /* Obsolete */
{"gap-fill", required_argument, 0, OPTION_GAP_FILL},
+ {"globalize-symbol", required_argument, 0, OPTION_GLOBALIZE_SYMBOL},
+ {"globalize-symbols", required_argument, 0, OPTION_GLOBALIZE_SYMBOLS},
{"help", no_argument, 0, 'h'},
{"impure", no_argument, 0, OPTION_IMPURE},
{"info", no_argument, 0, OPTION_FORMATS_INFO},
{"input-format", required_argument, 0, 'I'}, /* Obsolete */
{"input-target", required_argument, 0, 'I'},
{"interleave", required_argument, 0, 'i'},
+ {"keep-file-symbols", no_argument, 0, OPTION_KEEP_FILE_SYMBOLS},
{"keep-global-symbol", required_argument, 0, 'G'},
{"keep-global-symbols", required_argument, 0, OPTION_KEEPGLOBAL_SYMBOLS},
{"keep-symbol", required_argument, 0, 'K'},
@@ -340,6 +355,8 @@ static struct option copy_options[] =
{"strip-all", no_argument, 0, 'S'},
{"strip-debug", no_argument, 0, 'g'},
{"strip-unneeded", no_argument, 0, OPTION_STRIP_UNNEEDED},
+ {"strip-unneeded-symbol", required_argument, 0, OPTION_STRIP_UNNEEDED_SYMBOL},
+ {"strip-unneeded-symbols", required_argument, 0, OPTION_STRIP_UNNEEDED_SYMBOLS},
{"strip-symbol", required_argument, 0, 'N'},
{"strip-symbols", required_argument, 0, OPTION_STRIP_SYMBOLS},
{"target", required_argument, 0, 'F'},
@@ -377,6 +394,7 @@ extern unsigned long bfd_external_machine;
/* Forward declarations. */
static void setup_section (bfd *, asection *, void *);
+static void setup_bfd_headers (bfd *, bfd *);
static void copy_section (bfd *, asection *, void *);
static void get_sections (bfd *, asection *, void *);
static int compare_section_lma (const void *, const void *);
@@ -404,13 +422,18 @@ copy_usage (FILE *stream, int exit_status)
-g --strip-debug Remove all debugging symbols & sections\n\
--strip-unneeded Remove all symbols not needed by relocations\n\
-N --strip-symbol <name> Do not copy symbol <name>\n\
+ --strip-unneeded-symbol <name>\n\
+ Do not copy symbol <name> unless needed by\n\
+ relocations\n\
--only-keep-debug Strip everything but the debug information\n\
- -K --keep-symbol <name> Only copy symbol <name>\n\
+ -K --keep-symbol <name> Do not strip symbol <name>\n\
+ --keep-file-symbols Do not strip file symbol(s)\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\
-W --weaken-symbol <name> Force symbol <name> to be marked as a weak\n\
--weaken Force all global symbols to be marked as weak\n\
- -w --wildcard Permit wildcard in symbol comparasion\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\
-i --interleave <number> Only copy one out of every <number> bytes\n\
@@ -442,11 +465,15 @@ copy_usage (FILE *stream, int exit_status)
--srec-len <number> Restrict the length of generated Srecords\n\
--srec-forceS3 Restrict the type of generated Srecords to S3\n\
--strip-symbols <file> -N for all symbols listed in <file>\n\
+ --strip-unneeded-symbols <file>\n\
+ --strip-unneeded-symbol for all symbols listed\n\
+ in <file>\n\
--keep-symbols <file> -K for all symbols listed in <file>\n\
--localize-symbols <file> -L for all symbols listed in <file>\n\
+ --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\
@@ -457,6 +484,7 @@ copy_usage (FILE *stream, int exit_status)
Add <prefix> to start of every allocatable\n\
section name\n\
-v --verbose List all object files modified\n\
+ @<file> Read options from <file>\n\
-V --version Display this program's version number\n\
-h --help Display this output\n\
--info List object formats & architectures supported\n\
@@ -484,8 +512,9 @@ strip_usage (FILE *stream, int exit_status)
--strip-unneeded Remove all symbols not needed by relocations\n\
--only-keep-debug Strip everything but the debug information\n\
-N --strip-symbol=<name> Do not copy symbol <name>\n\
- -K --keep-symbol=<name> Only copy symbol <name>\n\
- -w --wildcard Permit wildcard in symbol comparasion\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\
-v --verbose List all object files modified\n\
@@ -535,7 +564,7 @@ parse_flags (const char *s)
PARSE_FLAG ("code", SEC_CODE);
PARSE_FLAG ("data", SEC_DATA);
PARSE_FLAG ("rom", SEC_ROM);
- PARSE_FLAG ("share", SEC_SHARED);
+ PARSE_FLAG ("share", SEC_COFF_SHARED);
PARSE_FLAG ("contents", SEC_HAS_CONTENTS);
#undef PARSE_FLAG
else
@@ -699,8 +728,8 @@ add_specific_symbols (const char *filename, struct symlist **list)
;
if (! IS_LINE_TERMINATOR (* extra))
- non_fatal (_("Ignoring rubbish found on line %d of %s"),
- line_count, filename);
+ non_fatal (_("%s:%d: Ignoring rubbish found on this line"),
+ filename, line_count);
}
* name_end = '\0';
@@ -890,7 +919,7 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
keep = (strip_symbols != STRIP_DEBUG
&& strip_symbols != STRIP_UNNEEDED
&& ! convert_debugging);
- else if (bfd_get_section (sym)->comdat)
+ 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;
@@ -902,28 +931,46 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
if (keep && is_specified_symbol (name, strip_specific_list))
keep = 0;
- if (!keep && is_specified_symbol (name, keep_specific_list))
+ if (keep
+ && !(flags & BSF_KEEP)
+ && is_specified_symbol (name, strip_unneeded_list))
+ keep = 0;
+ if (!keep
+ && ((keep_file_symbols && (flags & BSF_FILE))
+ || is_specified_symbol (name, keep_specific_list)))
keep = 1;
if (keep && is_strip_section (abfd, bfd_get_section (sym)))
keep = 0;
- if (keep && (flags & BSF_GLOBAL) != 0
- && (weaken || is_specified_symbol (name, weaken_specific_list)))
- {
- sym->flags &=~ BSF_GLOBAL;
- sym->flags |= BSF_WEAK;
- }
- if (keep && !undefined && (flags & (BSF_GLOBAL | BSF_WEAK))
- && (is_specified_symbol (name, localize_specific_list)
- || (keepglobal_specific_list != NULL
- && ! is_specified_symbol (name, keepglobal_specific_list))))
+ if (keep)
{
- sym->flags &= ~(BSF_GLOBAL | BSF_WEAK);
- sym->flags |= BSF_LOCAL;
- }
+ if ((flags & BSF_GLOBAL) != 0
+ && (weaken || is_specified_symbol (name, weaken_specific_list)))
+ {
+ sym->flags &= ~ BSF_GLOBAL;
+ sym->flags |= BSF_WEAK;
+ }
- if (keep)
- to[dst_count++] = sym;
+ if (!undefined
+ && (flags & (BSF_GLOBAL | BSF_WEAK))
+ && (is_specified_symbol (name, localize_specific_list)
+ || (keepglobal_specific_list != NULL
+ && ! is_specified_symbol (name, keepglobal_specific_list))))
+ {
+ sym->flags &= ~ (BSF_GLOBAL | BSF_WEAK);
+ sym->flags |= BSF_LOCAL;
+ }
+
+ if (!undefined
+ && (flags & BSF_LOCAL)
+ && is_specified_symbol (name, globalize_specific_list))
+ {
+ sym->flags &= ~ BSF_LOCAL;
+ sym->flags |= BSF_GLOBAL;
+ }
+
+ to[dst_count++] = sym;
+ }
}
to[dst_count] = NULL;
@@ -1067,10 +1114,10 @@ add_redefine_syms_file (const char *filename)
continue;
}
else
- fatal (_("%s: garbage at end of line %d"), filename, lineno);
+ fatal (_("%s:%d: garbage found at end of line"), filename, lineno);
comment:
if (len != 0 && (outsym_off == 0 || outsym_off == len))
- fatal (_("%s: missing new symbol name at line %d"), filename, lineno);
+ fatal (_("%s:%d: missing new symbol name"), filename, lineno);
buf[len++] = '\0';
/* Eat the rest of the line and finish it. */
@@ -1080,11 +1127,79 @@ add_redefine_syms_file (const char *filename)
}
if (len != 0)
- fatal (_("%s: premature end of file at line %d"), filename, lineno);
+ fatal (_("%s:%d: premature end of file"), filename, lineno);
free (buf);
}
+/* Copy unkown object file IBFD onto OBFD.
+ Returns TRUE upon success, FALSE otherwise. */
+
+static bfd_boolean
+copy_unknown_object (bfd *ibfd, bfd *obfd)
+{
+ char *cbuf;
+ int tocopy;
+ long ncopied;
+ long size;
+ struct stat buf;
+
+ if (bfd_stat_arch_elt (ibfd, &buf) != 0)
+ {
+ bfd_nonfatal (bfd_get_archive_filename (ibfd));
+ return FALSE;
+ }
+
+ size = buf.st_size;
+ if (size < 0)
+ {
+ non_fatal (_("stat returns negative size for `%s'"),
+ bfd_get_archive_filename (ibfd));
+ return FALSE;
+ }
+
+ if (bfd_seek (ibfd, (file_ptr) 0, SEEK_SET) != 0)
+ {
+ bfd_nonfatal (bfd_get_archive_filename (ibfd));
+ return FALSE;
+ }
+
+ if (verbose)
+ printf (_("copy from `%s' [unknown] to `%s' [unknown]\n"),
+ bfd_get_archive_filename (ibfd), bfd_get_filename (obfd));
+
+ cbuf = xmalloc (BUFSIZE);
+ ncopied = 0;
+ while (ncopied < size)
+ {
+ tocopy = size - ncopied;
+ if (tocopy > BUFSIZE)
+ tocopy = BUFSIZE;
+
+ if (bfd_bread (cbuf, (bfd_size_type) tocopy, ibfd)
+ != (bfd_size_type) tocopy)
+ {
+ bfd_nonfatal (bfd_get_archive_filename (ibfd));
+ free (cbuf);
+ return FALSE;
+ }
+
+ if (bfd_bwrite (cbuf, (bfd_size_type) tocopy, obfd)
+ != (bfd_size_type) tocopy)
+ {
+ bfd_nonfatal (bfd_get_filename (obfd));
+ free (cbuf);
+ return FALSE;
+ }
+
+ ncopied += tocopy;
+ }
+
+ chmod (bfd_get_filename (obfd), buf.st_mode);
+ free (cbuf);
+ return TRUE;
+}
+
/* Copy object file IBFD onto OBFD.
Returns TRUE upon success, FALSE otherwise. */
@@ -1114,8 +1229,8 @@ copy_object (bfd *ibfd, bfd *obfd)
}
if (verbose)
- printf (_("copy from %s(%s) to %s(%s)\n"),
- bfd_get_filename (ibfd), bfd_get_target (ibfd),
+ printf (_("copy from `%s' [%s] to `%s' [%s]\n"),
+ bfd_get_archive_filename (ibfd), bfd_get_target (ibfd),
bfd_get_filename (obfd), bfd_get_target (obfd));
if (set_start_set)
@@ -1138,7 +1253,7 @@ copy_object (bfd *ibfd, bfd *obfd)
if (!bfd_set_start_address (obfd, start)
|| !bfd_set_file_flags (obfd, flags))
{
- bfd_nonfatal (bfd_get_filename (ibfd));
+ bfd_nonfatal (bfd_get_archive_filename (ibfd));
return FALSE;
}
}
@@ -1151,20 +1266,18 @@ copy_object (bfd *ibfd, bfd *obfd)
|| bfd_get_arch (ibfd) != bfd_get_arch (obfd)))
{
if (bfd_get_arch (ibfd) == bfd_arch_unknown)
- fatal (_("Unable to recognise the format of the input file %s"),
- bfd_get_filename (ibfd));
+ non_fatal (_("Unable to recognise the format of the input file `%s'"),
+ bfd_get_archive_filename (ibfd));
else
- {
- non_fatal (_("Warning: Output file cannot represent architecture %s"),
- bfd_printable_arch_mach (bfd_get_arch (ibfd),
- bfd_get_mach (ibfd)));
- return FALSE;
- }
+ non_fatal (_("Warning: Output file cannot represent architecture `%s'"),
+ bfd_printable_arch_mach (bfd_get_arch (ibfd),
+ bfd_get_mach (ibfd)));
+ return FALSE;
}
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
{
- bfd_nonfatal (bfd_get_filename (ibfd));
+ bfd_nonfatal (bfd_get_archive_filename (ibfd));
return FALSE;
}
@@ -1174,10 +1287,15 @@ copy_object (bfd *ibfd, bfd *obfd)
if (osympp != isympp)
free (osympp);
+ isympp = NULL;
+ osympp = NULL;
+
/* 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);
+ setup_bfd_headers (ibfd, obfd);
+
if (add_sections != NULL)
{
struct section_add *padd;
@@ -1187,30 +1305,33 @@ copy_object (bfd *ibfd, bfd *obfd)
{
flagword flags;
- padd->section = bfd_make_section (obfd, padd->name);
- if (padd->section == NULL)
- {
- non_fatal (_("can't create section `%s': %s"),
- padd->name, bfd_errmsg (bfd_get_error ()));
- return FALSE;
- }
-
- if (! bfd_set_section_size (obfd, padd->section, padd->size))
- {
- bfd_nonfatal (bfd_get_filename (obfd));
- return FALSE;
- }
-
pset = find_section_list (padd->name, FALSE);
if (pset != NULL)
pset->used = TRUE;
+ flags = SEC_HAS_CONTENTS | SEC_READONLY | SEC_DATA;
if (pset != NULL && pset->set_flags)
flags = pset->flags | SEC_HAS_CONTENTS;
+
+ /* bfd_make_section_with_flags() does not return very helpful
+ error codes, so check for the most likely user error first. */
+ if (bfd_get_section_by_name (obfd, padd->name))
+ {
+ non_fatal (_("can't add section '%s' - it already exists!"), padd->name);
+ return FALSE;
+ }
else
- flags = SEC_HAS_CONTENTS | SEC_READONLY | SEC_DATA;
+ {
+ padd->section = bfd_make_section_with_flags (obfd, padd->name, flags);
+ if (padd->section == NULL)
+ {
+ non_fatal (_("can't create section `%s': %s"),
+ padd->name, bfd_errmsg (bfd_get_error ()));
+ return FALSE;
+ }
+ }
- if (! bfd_set_section_flags (obfd, padd->section, flags))
+ if (! bfd_set_section_size (obfd, padd->section, padd->size))
{
bfd_nonfatal (bfd_get_filename (obfd));
return FALSE;
@@ -1252,6 +1373,49 @@ copy_object (bfd *ibfd, bfd *obfd)
bfd_nonfatal (gnu_debuglink_filename);
return FALSE;
}
+
+ /* Special processing for PE format files. We
+ have no way to distinguish PE from COFF here. */
+ if (bfd_get_flavour (obfd) == bfd_target_coff_flavour)
+ {
+ bfd_vma debuglink_vma;
+ asection * highest_section;
+ asection * sec;
+
+ /* The PE spec requires that all sections be adjacent and sorted
+ in ascending order of VMA. It also specifies that debug
+ sections should be last. This is despite the fact that debug
+ sections are not loaded into memory and so in theory have no
+ use for a VMA.
+
+ This means that the debuglink section must be given a non-zero
+ VMA which makes it contiguous with other debug sections. So
+ walk the current section list, find the section with the
+ highest VMA and start the debuglink section after that one. */
+ for (sec = obfd->sections, highest_section = NULL;
+ sec != NULL;
+ sec = sec->next)
+ if (sec->vma > 0
+ && (highest_section == NULL
+ || sec->vma > highest_section->vma))
+ highest_section = sec;
+
+ if (highest_section)
+ debuglink_vma = BFD_ALIGN (highest_section->vma
+ + highest_section->size,
+ /* FIXME: We ought to be using
+ COFF_PAGE_SIZE here or maybe
+ bfd_get_section_alignment() (if it
+ was set) but since this is for PE
+ and we know the required alignment
+ it is easier just to hard code it. */
+ 0x1000);
+ else
+ /* Umm, not sure what to do in this case. */
+ debuglink_vma = 0x1000;
+
+ bfd_set_section_vma (obfd, gnu_debuglink_section, debuglink_vma);
+ }
}
if (bfd_count_sections (obfd) == 0)
@@ -1348,7 +1512,7 @@ copy_object (bfd *ibfd, bfd *obfd)
symsize = bfd_get_symtab_upper_bound (ibfd);
if (symsize < 0)
{
- bfd_nonfatal (bfd_get_filename (ibfd));
+ bfd_nonfatal (bfd_get_archive_filename (ibfd));
return FALSE;
}
@@ -1371,6 +1535,7 @@ copy_object (bfd *ibfd, bfd *obfd)
|| strip_specific_list != NULL
|| keep_specific_list != NULL
|| localize_specific_list != NULL
+ || globalize_specific_list != NULL
|| keepglobal_specific_list != NULL
|| weaken_specific_list != NULL
|| prefix_symbols_string
@@ -1502,9 +1667,21 @@ copy_object (bfd *ibfd, bfd *obfd)
/* Switch to the alternate machine code. We have to do this at the
very end, because we only initialize the header when we create
the first section. */
- if (use_alt_mach_code != 0
- && ! bfd_alt_mach_code (obfd, use_alt_mach_code))
- non_fatal (_("unknown alternate machine code, ignored"));
+ if (use_alt_mach_code != 0)
+ {
+ if (! bfd_alt_mach_code (obfd, use_alt_mach_code))
+ {
+ non_fatal (_("this target does not support %lu alternative machine codes"),
+ use_alt_mach_code);
+ if (bfd_get_flavour (obfd) == bfd_target_elf_flavour)
+ {
+ non_fatal (_("treating that number as an absolute e_machine value instead"));
+ elf_elfheader (obfd)->e_machine = use_alt_mach_code;
+ }
+ else
+ non_fatal (_("ignoring the alternative value"));
+ }
+ }
return TRUE;
}
@@ -1589,19 +1766,42 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target)
l = xmalloc (sizeof (struct name_list));
l->name = output_name;
l->next = list;
+ l->obfd = NULL;
list = l;
if (output_bfd == NULL)
RETURN_NONFATAL (output_name);
if (bfd_check_format (this_element, bfd_object))
- delete = ! copy_object (this_element, output_bfd);
+ {
+ delete = ! copy_object (this_element, output_bfd);
- if (!bfd_close (output_bfd))
+ if (! delete
+ || bfd_get_arch (this_element) != bfd_arch_unknown)
+ {
+ if (!bfd_close (output_bfd))
+ {
+ bfd_nonfatal (bfd_get_filename (output_bfd));
+ /* Error in new object file. Don't change archive. */
+ status = 1;
+ }
+ }
+ else
+ goto copy_unknown_element;
+ }
+ else
{
- bfd_nonfatal (bfd_get_filename (output_bfd));
- /* Error in new object file. Don't change archive. */
- status = 1;
+ non_fatal (_("Unable to recognise the format of the input file `%s'"),
+ bfd_get_archive_filename (this_element));
+
+copy_unknown_element:
+ delete = !copy_unknown_object (this_element, output_bfd);
+ if (!bfd_close_all_done (output_bfd))
+ {
+ bfd_nonfatal (bfd_get_filename (output_bfd));
+ /* Error in new object file. Don't change archive. */
+ status = 1;
+ }
}
if (delete)
@@ -1663,6 +1863,7 @@ 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;
}
@@ -1691,7 +1892,6 @@ copy_file (const char *input_filename, const char *output_filename,
else if (bfd_check_format_matches (ibfd, bfd_object, &obj_matching))
{
bfd *obfd;
- bfd_boolean delete;
do_copy:
/* bfd_get_target does not return the correct value until
@@ -1703,7 +1903,8 @@ copy_file (const char *input_filename, const char *output_filename,
if (obfd == NULL)
RETURN_NONFATAL (output_filename);
- delete = ! copy_object (ibfd, obfd);
+ if (! copy_object (ibfd, obfd))
+ status = 1;
if (!bfd_close (obfd))
RETURN_NONFATAL (output_filename);
@@ -1711,11 +1912,6 @@ copy_file (const char *input_filename, const char *output_filename,
if (!bfd_close (ibfd))
RETURN_NONFATAL (input_filename);
- if (delete)
- {
- unlink (output_filename);
- status = 1;
- }
}
else
{
@@ -1808,6 +2004,32 @@ find_section_rename (bfd * ibfd ATTRIBUTE_UNUSED, sec_ptr isection,
return old_name;
}
+/* Once each of the sections is copied, we may still need to do some
+ finalization work for private section headers. Do that here. */
+
+static void
+setup_bfd_headers (bfd *ibfd, bfd *obfd)
+{
+ const char *err;
+
+ /* Allow the BFD backend to copy any private data it understands
+ from the input section to the output section. */
+ if (! bfd_copy_private_header_data (ibfd, obfd))
+ {
+ err = _("private header data");
+ goto loser;
+ }
+
+ /* All went well. */
+ return;
+
+loser:
+ non_fatal (_("%s: error in %s: %s"),
+ bfd_get_filename (ibfd),
+ err, bfd_errmsg (bfd_get_error ()));
+ status = 1;
+}
+
/* Create a section in OBFD with the same
name and attributes as ISECTION in IBFD. */
@@ -1852,7 +2074,12 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
name = n;
}
- osection = bfd_make_section_anyway (obfd, name);
+ 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)
+ flags &= ~(SEC_HAS_CONTENTS | SEC_LOAD);
+
+ osection = bfd_make_section_anyway_with_flags (obfd, name, flags);
if (osection == NULL)
{
@@ -1860,6 +2087,12 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
goto loser;
}
+ if (strip_symbols == STRIP_NONDEBUG
+ && obfd->xvec->flavour == bfd_target_elf_flavour
+ && (flags & SEC_ALLOC) != 0
+ && (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;
@@ -1908,21 +2141,6 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
goto loser;
}
- 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)
- {
- flags &= ~(SEC_HAS_CONTENTS | SEC_LOAD);
- if (obfd->xvec->flavour == bfd_target_elf_flavour)
- elf_section_type (osection) = SHT_NOBITS;
- }
-
- if (!bfd_set_section_flags (obfd, osection, flags))
- {
- err = _("flags");
- goto loser;
- }
-
/* Copy merge entity size. */
osection->entsize = isection->entsize;
@@ -1985,7 +2203,7 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
return;
osection = isection->output_section;
- size = bfd_get_section_size_before_reloc (isection);
+ size = bfd_get_section_size (isection);
if (size == 0 || osection == 0)
return;
@@ -2041,9 +2259,6 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
free (relpp);
}
- isection->_cooked_size = isection->_raw_size;
- isection->reloc_done = TRUE;
-
if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS
&& bfd_get_section_flags (obfd, osection) & SEC_HAS_CONTENTS)
{
@@ -2135,9 +2350,9 @@ compare_section_lma (const void *arg1, const void *arg2)
return -1;
/* Sort sections with the same LMA by size. */
- if ((*sec1)->_raw_size > (*sec2)->_raw_size)
+ if (bfd_get_section_size (*sec1) > bfd_get_section_size (*sec2))
return 1;
- else if ((*sec1)->_raw_size < (*sec2)->_raw_size)
+ else if (bfd_get_section_size (*sec1) < bfd_get_section_size (*sec2))
return -1;
return 0;
@@ -2207,28 +2422,22 @@ write_debugging_info (bfd *obfd, void *dhandle,
bfd_byte *syms, *strings;
bfd_size_type symsize, stringsize;
asection *stabsec, *stabstrsec;
+ flagword flags;
if (! write_stabs_in_sections_debugging_info (obfd, dhandle, &syms,
&symsize, &strings,
&stringsize))
return FALSE;
- stabsec = bfd_make_section (obfd, ".stab");
- stabstrsec = bfd_make_section (obfd, ".stabstr");
+ flags = SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING;
+ stabsec = bfd_make_section_with_flags (obfd, ".stab", flags);
+ stabstrsec = bfd_make_section_with_flags (obfd, ".stabstr", flags);
if (stabsec == NULL
|| stabstrsec == NULL
|| ! bfd_set_section_size (obfd, stabsec, symsize)
|| ! bfd_set_section_size (obfd, stabstrsec, stringsize)
|| ! bfd_set_section_alignment (obfd, stabsec, 2)
- || ! bfd_set_section_alignment (obfd, stabstrsec, 0)
- || ! bfd_set_section_flags (obfd, stabsec,
- (SEC_HAS_CONTENTS
- | SEC_READONLY
- | SEC_DEBUGGING))
- || ! bfd_set_section_flags (obfd, stabstrsec,
- (SEC_HAS_CONTENTS
- | SEC_READONLY
- | SEC_DEBUGGING)))
+ || ! bfd_set_section_alignment (obfd, stabstrsec, 0))
{
non_fatal (_("%s: can't create debugging section: %s"),
bfd_get_filename (obfd),
@@ -2330,6 +2539,9 @@ strip_main (int argc, char *argv[])
case OPTION_ONLY_KEEP_DEBUG:
strip_symbols = STRIP_NONDEBUG;
break;
+ case OPTION_KEEP_FILE_SYMBOLS:
+ keep_file_symbols = 1;
+ break;
case 0:
/* We've been given a long option. */
break;
@@ -2397,7 +2609,7 @@ strip_main (int argc, char *argv[])
status = hold_status;
}
else
- unlink (tmpname);
+ unlink_if_ordinary (tmpname);
if (output_file == NULL)
free (tmpname);
}
@@ -2487,6 +2699,10 @@ copy_main (int argc, char *argv[])
strip_symbols = STRIP_NONDEBUG;
break;
+ case OPTION_KEEP_FILE_SYMBOLS:
+ keep_file_symbols = 1;
+ break;
+
case OPTION_ADD_GNU_DEBUGLINK:
gnu_debuglink_filename = optarg;
break;
@@ -2499,10 +2715,18 @@ copy_main (int argc, char *argv[])
add_specific_symbol (optarg, &strip_specific_list);
break;
+ case OPTION_STRIP_UNNEEDED_SYMBOL:
+ add_specific_symbol (optarg, &strip_unneeded_list);
+ break;
+
case 'L':
add_specific_symbol (optarg, &localize_specific_list);
break;
+ case OPTION_GLOBALIZE_SYMBOL:
+ add_specific_symbol (optarg, &globalize_specific_list);
+ break;
+
case 'G':
add_specific_symbol (optarg, &keepglobal_specific_list);
break;
@@ -2832,6 +3056,10 @@ copy_main (int argc, char *argv[])
add_specific_symbols (optarg, &strip_specific_list);
break;
+ case OPTION_STRIP_UNNEEDED_SYMBOLS:
+ add_specific_symbols (optarg, &strip_unneeded_list);
+ break;
+
case OPTION_KEEP_SYMBOLS:
add_specific_symbols (optarg, &keep_specific_list);
break;
@@ -2840,6 +3068,10 @@ copy_main (int argc, char *argv[])
add_specific_symbols (optarg, &localize_specific_list);
break;
+ case OPTION_GLOBALIZE_SYMBOLS:
+ add_specific_symbols (optarg, &globalize_specific_list);
+ break;
+
case OPTION_KEEPGLOBAL_SYMBOLS:
add_specific_symbols (optarg, &keepglobal_specific_list);
break;
@@ -2849,9 +3081,9 @@ copy_main (int argc, char *argv[])
break;
case OPTION_ALT_MACH_CODE:
- use_alt_mach_code = atoi (optarg);
- if (use_alt_mach_code <= 0)
- fatal (_("alternate machine code index must be positive"));
+ use_alt_mach_code = strtoul (optarg, NULL, 0);
+ if (use_alt_mach_code == 0)
+ fatal (_("unable to parse alternative machine code"));
break;
case OPTION_PREFIX_SYMBOLS:
@@ -2975,6 +3207,8 @@ copy_main (int argc, char *argv[])
if (status == 0 && preserve_dates)
set_times (output_filename, &statbuf);
+ else if (status != 0)
+ unlink_if_ordinary (output_filename);
}
if (change_warn)
@@ -3034,6 +3268,8 @@ main (int argc, char *argv[])
START_PROGRESS (program_name, 0);
+ expandargv (&argc, &argv);
+
strip_symbols = STRIP_UNDEF;
discard_locals = LOCALS_UNDEF;
diff --git a/contrib/binutils/binutils/objdump.c b/contrib/binutils/binutils/objdump.c
index f67aacb8881b..6e5eab56da24 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
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Objdump overview.
@@ -52,6 +52,7 @@
#include "bfdver.h"
#include "progress.h"
#include "bucomm.h"
+#include "dwarf.h"
#include "budemang.h"
#include "getopt.h"
#include "safe-ctype.h"
@@ -65,11 +66,6 @@
#define BYTES_IN_WORD 32
#include "aout/aout64.h"
-#ifdef NEED_DECLARATION_FPRINTF
-/* This is needed by init_disassemble_info(). */
-extern int fprintf (FILE *, const char *, ...);
-#endif
-
/* Exit status. */
static int exit_status = 0;
@@ -91,6 +87,7 @@ static int prefix_addresses; /* --prefix-addresses */
static int with_line_numbers; /* -l */
static bfd_boolean with_source_code; /* -S */
static int show_raw_insn; /* --show-raw-insn */
+static int dump_dwarf_section_info; /* --dwarf */
static int dump_stab_section_info; /* --stabs */
static int do_demangle; /* -C, --demangle */
static bfd_boolean disassemble; /* -d */
@@ -102,6 +99,7 @@ static bfd_vma start_address = (bfd_vma) -1; /* --start-address */
static bfd_vma stop_address = (bfd_vma) -1; /* --stop-address */
static int dump_debugging; /* --debugging */
static int dump_debugging_tags; /* --debugging-tags */
+static int dump_special_syms = 0; /* --special-syms */
static bfd_vma adjust_section_vma = 0; /* --adjust-vma */
static int file_start_context = 0; /* --file-start-context */
@@ -127,6 +125,7 @@ struct objdump_disasm_info
arelent ** dynrelbuf;
long dynrelcount;
disassembler_ftype disassemble_fn;
+ arelent * reloc;
};
/* Architecture to disassemble for, or default if NULL. */
@@ -153,6 +152,10 @@ static long sorted_symcount = 0;
/* The dynamic symbol table. */
static asymbol **dynsyms;
+/* The synthetic symbol table. */
+static asymbol *synthsyms;
+static long synthcount = 0;
+
/* Number of symbols in `dynsyms'. */
static long dynsymcount = 0;
@@ -181,10 +184,12 @@ usage (FILE *stream, int status)
-g, --debugging Display debug information in object file\n\
-e, --debugging-tags Display debug information using ctags style\n\
-G, --stabs Display (in raw form) any STABS info in the file\n\
+ -W, --dwarf Display DWARF info in the file\n\
-t, --syms Display the contents of the symbol table(s)\n\
-T, --dynamic-syms Display the contents of the dynamic symbol table\n\
-r, --reloc Display the relocation entries in the file\n\
-R, --dynamic-reloc Display the dynamic relocation entries in the file\n\
+ @<file> Read options from <file>\n\
-v, --version Display this program's version number\n\
-i, --info List object formats and architectures supported\n\
-H, --help Display this information\n\
@@ -213,6 +218,7 @@ usage (FILE *stream, int status)
--prefix-addresses Print complete address alongside disassembly\n\
--[no-]show-raw-insn Display hex alongside symbolic disassembly\n\
--adjust-vma=OFFSET Add OFFSET to all displayed section addresses\n\
+ --special-syms Include special symbols in symbol dumps\n\
\n"));
list_supported_targets (program_name, stream);
list_supported_architectures (program_name, stream);
@@ -264,7 +270,9 @@ static struct option long_options[]=
{"section-headers", no_argument, NULL, 'h'},
{"show-raw-insn", no_argument, &show_raw_insn, 1},
{"source", no_argument, NULL, 'S'},
+ {"special-syms", no_argument, &dump_special_syms, 1},
{"include", required_argument, NULL, 'I'},
+ {"dwarf", no_argument, NULL, 'W'},
{"stabs", no_argument, NULL, 'G'},
{"start-address", required_argument, NULL, OPTION_START_ADDRESS},
{"stop-address", required_argument, NULL, OPTION_STOP_ADDRESS},
@@ -283,12 +291,17 @@ nonfatal (const char *msg)
}
static void
-dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, asection *section,
+dump_section_header (bfd *abfd, asection *section,
void *ignored ATTRIBUTE_UNUSED)
{
char *comma = "";
unsigned int opb = bfd_octets_per_byte (abfd);
+ /* Ignore linker created section. See elfNN_ia64_object_p in
+ bfd/elfxx-ia64.c. */
+ if (section->flags & SEC_LINKER_CREATED)
+ return;
+
printf ("%3d %-13s %08lx ", section->index,
bfd_get_section_name (abfd, section),
(unsigned long) bfd_section_size (abfd, section) / opb);
@@ -317,16 +330,21 @@ dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, asection *section,
PF (SEC_NEVER_LOAD, "NEVER_LOAD");
PF (SEC_EXCLUDE, "EXCLUDE");
PF (SEC_SORT_ENTRIES, "SORT_ENTRIES");
- PF (SEC_BLOCK, "BLOCK");
- PF (SEC_CLINK, "CLINK");
+ if (bfd_get_arch (abfd) == bfd_arch_tic54x)
+ {
+ PF (SEC_TIC54X_BLOCK, "BLOCK");
+ PF (SEC_TIC54X_CLINK, "CLINK");
+ }
PF (SEC_SMALL_DATA, "SMALL_DATA");
- PF (SEC_SHARED, "SHARED");
- PF (SEC_ARCH_BIT_0, "ARCH_BIT_0");
+ if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
+ PF (SEC_COFF_SHARED, "SHARED");
PF (SEC_THREAD_LOCAL, "THREAD_LOCAL");
+ PF (SEC_GROUP, "GROUP");
if ((section->flags & SEC_LINK_ONCE) != 0)
{
const char *ls;
+ struct coff_comdat_info *comdat;
switch (section->flags & SEC_LINK_DUPLICATES)
{
@@ -347,9 +365,9 @@ dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, asection *section,
}
printf ("%s%s", comma, ls);
- if (section->comdat != NULL)
- printf (" (COMDAT %s %ld)", section->comdat->name,
- section->comdat->symbol);
+ comdat = bfd_coff_get_comdat_section (abfd, section);
+ if (comdat != NULL)
+ printf (" (COMDAT %s %ld)", comdat->name, comdat->symbol);
comma = ", ";
}
@@ -450,7 +468,7 @@ remove_useless_symbols (asymbol **symbols, long count)
if (sym->name == NULL || sym->name[0] == '\0')
continue;
- if (sym->flags & (BSF_DEBUGGING))
+ if (sym->flags & (BSF_DEBUGGING | BSF_SECTION_SYM))
continue;
if (bfd_is_und_section (sym->section)
|| bfd_is_com_section (sym->section))
@@ -840,7 +858,8 @@ objdump_print_addr (bfd_vma vma,
bfd_boolean skip_zeroes)
{
struct objdump_disasm_info *aux;
- asymbol *sym;
+ asymbol *sym = NULL; /* Initialize to avoid compiler warning. */
+ bfd_boolean skip_find = FALSE;
if (sorted_symcount < 1)
{
@@ -850,7 +869,23 @@ objdump_print_addr (bfd_vma vma,
}
aux = (struct objdump_disasm_info *) info->application_data;
- sym = find_symbol_for_address (vma, info, NULL);
+
+ if (aux->reloc != NULL
+ && aux->reloc->sym_ptr_ptr != NULL
+ && * aux->reloc->sym_ptr_ptr != NULL)
+ {
+ sym = * aux->reloc->sym_ptr_ptr;
+
+ /* Adjust the vma to the reloc. */
+ vma += bfd_asymbol_value (sym);
+
+ if (bfd_is_und_section (bfd_get_section (sym)))
+ skip_find = TRUE;
+ }
+
+ if (!skip_find)
+ sym = find_symbol_for_address (vma, info, NULL);
+
objdump_print_addr_with_sym (aux->abfd, aux->sec, sym, vma, info,
skip_zeroes);
}
@@ -864,7 +899,7 @@ objdump_print_address (bfd_vma vma, struct disassemble_info *info)
objdump_print_addr (vma, info, ! prefix_addresses);
}
-/* Determine of the given address has a symbol associated with it. */
+/* Determine if the given address has a symbol associated with it. */
static int
objdump_symbol_at_address (bfd_vma vma, struct disassemble_info * info)
@@ -1142,48 +1177,34 @@ show_line (bfd *abfd, asection *section, bfd_vma addr_offset)
typedef struct
{
char *buffer;
- size_t size;
- char *current;
+ size_t pos;
+ size_t alloc;
} SFILE;
/* sprintf to a "stream". */
-static int
+static int ATTRIBUTE_PRINTF_2
objdump_sprintf (SFILE *f, const char *format, ...)
{
- char *buf;
size_t n;
va_list args;
- va_start (args, format);
-
- vasprintf (&buf, format, args);
-
- if (buf == NULL)
+ while (1)
{
+ size_t space = f->alloc - f->pos;
+
+ va_start (args, format);
+ n = vsnprintf (f->buffer + f->pos, space, format, args);
va_end (args);
- fatal (_("Out of virtual memory"));
- }
- n = strlen (buf);
-
- while ((size_t) ((f->buffer + f->size) - f->current) < n + 1)
- {
- size_t curroff;
-
- curroff = f->current - f->buffer;
- f->size *= 2;
- f->buffer = xrealloc (f->buffer, f->size);
- f->current = f->buffer + curroff;
+ if (space > n)
+ break;
+
+ f->alloc = (f->alloc + n) * 2;
+ f->buffer = xrealloc (f->buffer, f->alloc);
}
-
- memcpy (f->current, buf, n);
- f->current += n;
- f->current[0] = '\0';
-
- free (buf);
-
- va_end (args);
+ f->pos += n;
+
return n;
}
@@ -1208,9 +1229,7 @@ process_section_p (asection * section)
/* The number of zeroes we want to see before we start skipping them.
The number is arbitrarily chosen. */
-#ifndef SKIP_ZEROES
-#define SKIP_ZEROES (8)
-#endif
+#define DEFAULT_SKIP_ZEROES 8
/* The number of zeroes to skip at the end of a section. If the
number of zeroes at the end is between SKIP_ZEROES_AT_END and
@@ -1219,9 +1238,7 @@ process_section_p (asection * section)
attempt to avoid disassembling zeroes inserted by section
alignment. */
-#ifndef SKIP_ZEROES_AT_END
-#define SKIP_ZEROES_AT_END (3)
-#endif
+#define DEFAULT_SKIP_ZEROES_AT_END 3
/* Disassemble some data in memory between given values. */
@@ -1242,11 +1259,19 @@ disassemble_bytes (struct disassemble_info * info,
bfd_boolean done_dot;
int skip_addr_chars;
bfd_vma addr_offset;
- int opb = info->octets_per_byte;
+ unsigned int opb = info->octets_per_byte;
+ unsigned int skip_zeroes = info->skip_zeroes;
+ unsigned int skip_zeroes_at_end = info->skip_zeroes_at_end;
+ int octets = opb;
+ SFILE sfile;
aux = (struct objdump_disasm_info *) info->application_data;
section = aux->sec;
+ sfile.alloc = 120;
+ sfile.buffer = xmalloc (sfile.alloc);
+ sfile.pos = 0;
+
if (insns)
octets_per_line = 4;
else
@@ -1282,8 +1307,12 @@ disassemble_bytes (struct disassemble_info * info,
while (addr_offset < stop_offset)
{
bfd_vma z;
- int octets = 0;
bfd_boolean need_nl = FALSE;
+ int previous_octets;
+
+ /* Remember the length of the previous instruction. */
+ previous_octets = octets;
+ octets = 0;
/* If we see more than SKIP_ZEROES octets of zeroes, we just
print `...'. */
@@ -1293,9 +1322,9 @@ disassemble_bytes (struct disassemble_info * info,
if (! disassemble_zeroes
&& (info->insn_info_valid == 0
|| info->branch_delay_insns == 0)
- && (z - addr_offset * opb >= SKIP_ZEROES
+ && (z - addr_offset * opb >= skip_zeroes
|| (z == stop_offset * opb &&
- z - addr_offset * opb < SKIP_ZEROES_AT_END)))
+ z - addr_offset * opb < skip_zeroes_at_end)))
{
printf ("\t...\n");
@@ -1311,17 +1340,13 @@ disassemble_bytes (struct disassemble_info * info,
else
{
char buf[50];
- SFILE sfile;
int bpc = 0;
int pb = 0;
done_dot = FALSE;
if (with_line_numbers || with_source_code)
- /* The line number tables will refer to unadjusted
- section VMAs, so we must undo any VMA modifications
- when calling show_line. */
- show_line (aux->abfd, section, addr_offset - adjust_section_vma);
+ show_line (aux->abfd, section, addr_offset);
if (! prefix_addresses)
{
@@ -1344,25 +1369,44 @@ disassemble_bytes (struct disassemble_info * info,
if (insns)
{
- sfile.size = 120;
- sfile.buffer = xmalloc (sfile.size);
- sfile.current = sfile.buffer;
+ sfile.pos = 0;
info->fprintf_func = (fprintf_ftype) objdump_sprintf;
- info->stream = (FILE *) &sfile;
+ info->stream = &sfile;
info->bytes_per_line = 0;
info->bytes_per_chunk = 0;
+ info->flags = 0;
-#ifdef DISASSEMBLER_NEEDS_RELOCS
- /* FIXME: This is wrong. It tests the number of octets
- in the last instruction, not the current one. */
- if (*relppp < relppend
- && (**relppp)->address >= rel_offset + addr_offset
- && ((**relppp)->address
- < rel_offset + addr_offset + octets / opb))
- info->flags = INSN_HAS_RELOC;
- else
-#endif
- info->flags = 0;
+ if (info->disassembler_needs_relocs
+ && *relppp < relppend)
+ {
+ bfd_signed_vma distance_to_rel;
+
+ distance_to_rel = (**relppp)->address
+ - (rel_offset + addr_offset);
+
+ /* Check to see if the current reloc is associated with
+ the instruction that we are about to disassemble. */
+ if (distance_to_rel == 0
+ /* FIXME: This is wrong. We are trying to catch
+ relocs that are addressed part way through the
+ current instruction, as might happen with a packed
+ VLIW instruction. Unfortunately we do not know the
+ length of the current instruction since we have not
+ disassembled it yet. Instead we take a guess based
+ upon the length of the previous instruction. The
+ proper solution is to have a new target-specific
+ disassembler function which just returns the length
+ of an instruction at a given address without trying
+ to display its disassembly. */
+ || (distance_to_rel > 0
+ && distance_to_rel < (bfd_signed_vma) (previous_octets/ opb)))
+ {
+ info->flags = INSN_HAS_RELOC;
+ aux->reloc = **relppp;
+ }
+ else
+ aux->reloc = NULL;
+ }
octets = (*disassemble_fn) (section->vma + addr_offset, info);
info->fprintf_func = (fprintf_ftype) fprintf;
@@ -1371,9 +1415,8 @@ disassemble_bytes (struct disassemble_info * info,
octets_per_line = info->bytes_per_line;
if (octets < 0)
{
- if (sfile.current != sfile.buffer)
+ if (sfile.pos)
printf ("%s\n", sfile.buffer);
- free (sfile.buffer);
break;
}
}
@@ -1415,6 +1458,7 @@ disassemble_bytes (struct disassemble_info * info,
for (j = addr_offset * opb; j < addr_offset * opb + pb; j += bpc)
{
int k;
+
if (bpc > 1 && info->display_endian == BFD_ENDIAN_LITTLE)
{
for (k = bpc - 1; k >= 0; k--)
@@ -1447,11 +1491,8 @@ disassemble_bytes (struct disassemble_info * info,
if (! insns)
printf ("%s", buf);
- else
- {
- printf ("%s", sfile.buffer);
- free (sfile.buffer);
- }
+ else if (sfile.pos)
+ printf ("%s", sfile.buffer);
if (prefix_addresses
? show_raw_insn > 0
@@ -1518,7 +1559,12 @@ disassemble_bytes (struct disassemble_info * info,
objdump_print_value (section->vma - rel_offset + q->address,
info, TRUE);
- printf (": %s\t", q->howto->name);
+ if (q->howto == NULL)
+ printf (": *unknown*\t");
+ else if (q->howto->name)
+ printf (": %s\t", q->howto->name);
+ else
+ printf (": %d\t", q->howto->type);
if (q->sym_ptr_ptr == NULL || *q->sym_ptr_ptr == NULL)
printf ("*unknown*");
@@ -1558,6 +1604,8 @@ disassemble_bytes (struct disassemble_info * info,
addr_offset += octets / opb;
}
+
+ free (sfile.buffer);
}
static void
@@ -1582,13 +1630,14 @@ disassemble_section (bfd *abfd, asection *section, void *info)
code are not normally disassembled. */
if (! disassemble_all
&& only == NULL
- && (section->flags & SEC_CODE) == 0)
+ && ((section->flags & (SEC_CODE | SEC_HAS_CONTENTS))
+ != (SEC_CODE | SEC_HAS_CONTENTS)))
return;
if (! process_section_p (section))
return;
- datasize = bfd_get_section_size_before_reloc (section);
+ datasize = bfd_get_section_size (section);
if (datasize == 0)
return;
@@ -1610,10 +1659,7 @@ disassemble_section (bfd *abfd, asection *section, void *info)
rel_offset = 0;
if ((section->flags & SEC_RELOC) != 0
-#ifndef DISASSEMBLER_NEEDS_RELOCS
- && dump_reloc_info
-#endif
- )
+ && (dump_reloc_info || pinfo->disassembler_needs_relocs))
{
long relsize;
@@ -1789,6 +1835,7 @@ disassemble_data (bfd *abfd)
{
struct disassemble_info disasm_info;
struct objdump_disasm_info aux;
+ long i;
print_files = NULL;
prev_functionname = NULL;
@@ -1796,10 +1843,18 @@ disassemble_data (bfd *abfd)
/* We make a copy of syms to sort. We don't want to sort syms
because that will screw up the relocs. */
- sorted_syms = xmalloc (symcount * sizeof (asymbol *));
- memcpy (sorted_syms, syms, symcount * sizeof (asymbol *));
+ sorted_symcount = symcount ? symcount : dynsymcount;
+ sorted_syms = xmalloc ((sorted_symcount + synthcount) * sizeof (asymbol *));
+ memcpy (sorted_syms, symcount ? syms : dynsyms,
+ sorted_symcount * sizeof (asymbol *));
- sorted_symcount = remove_useless_symbols (sorted_syms, symcount);
+ sorted_symcount = remove_useless_symbols (sorted_syms, sorted_symcount);
+
+ for (i = 0; i < synthcount; ++i)
+ {
+ sorted_syms[sorted_symcount] = synthsyms + i;
+ ++sorted_symcount;
+ }
/* Sort the symbols into section and symbol order. */
qsort (sorted_syms, sorted_symcount, sizeof (asymbol *), compare_symbols);
@@ -1811,6 +1866,7 @@ disassemble_data (bfd *abfd)
aux.require_sec = FALSE;
aux.dynrelbuf = NULL;
aux.dynrelcount = 0;
+ aux.reloc = NULL;
disasm_info.print_address_func = objdump_print_address;
disasm_info.symbol_at_address_func = objdump_symbol_at_address;
@@ -1850,6 +1906,9 @@ disassemble_data (bfd *abfd)
disasm_info.mach = bfd_get_mach (abfd);
disasm_info.disassembler_options = disassembler_options;
disasm_info.octets_per_byte = bfd_octets_per_byte (abfd);
+ disasm_info.skip_zeroes = DEFAULT_SKIP_ZEROES;
+ disasm_info.skip_zeroes_at_end = DEFAULT_SKIP_ZEROES_AT_END;
+ disasm_info.disassembler_needs_relocs = FALSE;
if (bfd_big_endian (abfd))
disasm_info.display_endian = disasm_info.endian = BFD_ENDIAN_BIG;
@@ -1894,6 +1953,163 @@ disassemble_data (bfd *abfd)
free (sorted_syms);
}
+int
+load_debug_section (enum dwarf_section_display_enum debug, void *file)
+{
+ struct dwarf_section *section = &debug_displays [debug].section;
+ bfd *abfd = file;
+ asection *sec;
+ bfd_boolean ret;
+
+ /* If it is already loaded, do nothing. */
+ if (section->start != NULL)
+ return 1;
+
+ /* Locate the debug section. */
+ sec = bfd_get_section_by_name (abfd, section->name);
+ if (sec == NULL)
+ return 0;
+
+ section->address = bfd_get_section_vma (abfd, sec);
+ section->size = bfd_get_section_size (sec);
+ section->start = xmalloc (section->size);
+
+ if (is_relocatable && debug_displays [debug].relocate)
+ ret = bfd_simple_get_relocated_section_contents (abfd,
+ sec,
+ section->start,
+ syms) != NULL;
+ else
+ ret = bfd_get_section_contents (abfd, sec, section->start, 0,
+ section->size);
+
+ if (!ret)
+ {
+ free_debug_section (debug);
+ printf (_("\nCan't get contents for section '%s'.\n"),
+ section->name);
+ }
+
+ return ret;
+}
+
+void
+free_debug_section (enum dwarf_section_display_enum debug)
+{
+ struct dwarf_section *section = &debug_displays [debug].section;
+
+ if (section->start == NULL)
+ return;
+
+ free ((char *) section->start);
+ section->start = NULL;
+ section->address = 0;
+ section->size = 0;
+}
+
+static void
+dump_dwarf_section (bfd *abfd, asection *section,
+ void *arg ATTRIBUTE_UNUSED)
+{
+ const char *name = bfd_get_section_name (abfd, section);
+ const char *match;
+ enum dwarf_section_display_enum i;
+
+ if (strncmp (name, ".gnu.linkonce.wi.", 17) == 0)
+ match = ".debug_info";
+ else
+ match = name;
+
+ for (i = 0; i < max; i++)
+ if (strcmp (debug_displays[i].section.name, match) == 0)
+ {
+ if (!debug_displays[i].eh_frame)
+ {
+ struct dwarf_section *sec = &debug_displays [i].section;
+
+ if (load_debug_section (i, abfd))
+ {
+ debug_displays[i].display (sec, abfd);
+
+ if (i != info && i != abbrev)
+ free_debug_section (i);
+ }
+ }
+ break;
+ }
+}
+
+static const char *mach_o_dwarf_sections [] = {
+ "LC_SEGMENT.__DWARFA.__debug_abbrev", /* .debug_abbrev */
+ "LC_SEGMENT.__DWARFA.__debug_aranges", /* .debug_aranges */
+ "LC_SEGMENT.__DWARFA.__debug_frame", /* .debug_frame */
+ "LC_SEGMENT.__DWARFA.__debug_info", /* .debug_info */
+ "LC_SEGMENT.__DWARFA.__debug_line", /* .debug_line */
+ "LC_SEGMENT.__DWARFA.__debug_pubnames", /* .debug_pubnames */
+ ".eh_frame", /* .eh_frame */
+ "LC_SEGMENT.__DWARFA.__debug_macinfo", /* .debug_macinfo */
+ "LC_SEGMENT.__DWARFA.__debug_str", /* .debug_str */
+ "LC_SEGMENT.__DWARFA.__debug_loc", /* .debug_loc */
+ "LC_SEGMENT.__DWARFA.__debug_pubtypes", /* .debug_pubtypes */
+ "LC_SEGMENT.__DWARFA.__debug_ranges", /* .debug_ranges */
+ "LC_SEGMENT.__DWARFA.__debug_static_func", /* .debug_static_func */
+ "LC_SEGMENT.__DWARFA.__debug_static_vars", /* .debug_static_vars */
+ "LC_SEGMENT.__DWARFA.__debug_types", /* .debug_types */
+ "LC_SEGMENT.__DWARFA.__debug_weaknames" /* .debug_weaknames */
+};
+
+static const char *generic_dwarf_sections [max];
+
+static void
+check_mach_o_dwarf (bfd *abfd)
+{
+ static enum bfd_flavour old_flavour = bfd_target_unknown_flavour;
+ enum bfd_flavour current_flavour = bfd_get_flavour (abfd);
+ enum dwarf_section_display_enum i;
+
+ if (generic_dwarf_sections [0] == NULL)
+ for (i = 0; i < max; i++)
+ generic_dwarf_sections [i] = debug_displays[i].section.name;
+
+ if (old_flavour != current_flavour)
+ {
+ if (current_flavour == bfd_target_mach_o_flavour)
+ for (i = 0; i < max; i++)
+ debug_displays[i].section.name = mach_o_dwarf_sections [i];
+ else if (old_flavour == bfd_target_mach_o_flavour)
+ for (i = 0; i < max; i++)
+ debug_displays[i].section.name = generic_dwarf_sections [i];
+
+ old_flavour = current_flavour;
+ }
+}
+
+/* Dump the dwarf debugging information. */
+
+static void
+dump_dwarf (bfd *abfd)
+{
+ is_relocatable = ((abfd->flags & (HAS_RELOC | EXEC_P | DYNAMIC))
+ == HAS_RELOC);
+
+ /* FIXME: bfd_get_arch_size may return -1. We assume that 64bit
+ targets will return 64. */
+ eh_addr_size = bfd_get_arch_size (abfd) == 64 ? 8 : 4;
+
+ if (bfd_big_endian (abfd))
+ byte_get = byte_get_big_endian;
+ else if (bfd_little_endian (abfd))
+ byte_get = byte_get_little_endian;
+ else
+ abort ();
+
+ check_mach_o_dwarf (abfd);
+
+ bfd_map_over_sections (abfd, dump_dwarf_section, NULL);
+
+ free_debug_memory ();
+}
+
/* Read ABFD's stabs section STABSECT_NAME, and return a pointer to
it. Return NULL on failure. */
@@ -2048,7 +2264,8 @@ find_stabs_section (bfd *abfd, asection *section, void *names)
if (strtab)
{
- stabs = read_section_stabs (abfd, section->name, &stab_size);
+ stabs = (bfd_byte *) read_section_stabs (abfd, section->name,
+ &stab_size);
if (stabs)
print_section_stabs (abfd, section->name, &sought->string_offset);
}
@@ -2275,13 +2492,15 @@ dump_symbols (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean dynamic)
bfd *cur_bfd;
if (*current == NULL)
- printf (_("no information for the %ld'th symbol"), count);
+ printf (_("no information for symbol number %ld\n"), count);
else if ((cur_bfd = bfd_asymbol_bfd (*current)) == NULL)
- printf (_("could not determine the type of the %ld'th symbol"),
+ printf (_("could not determine the type of symbol number %ld\n"),
count);
- else
+ else if (process_section_p ((* current)->section)
+ && (dump_special_syms
+ || !bfd_is_target_special_symbol (cur_bfd, *current)))
{
const char *name = (*current)->name;
@@ -2302,9 +2521,9 @@ dump_symbols (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean dynamic)
else
bfd_print_symbol (cur_bfd, stdout, *current,
bfd_print_symbol_all);
+ printf ("\n");
}
- printf ("\n");
current++;
}
printf ("\n\n");
@@ -2393,23 +2612,20 @@ dump_reloc_set (bfd *abfd, asection *sec, arelent **relpp, long relcount)
section_name = NULL;
}
+ bfd_printf_vma (abfd, q->address);
+ if (q->howto == NULL)
+ printf (" *unknown* ");
+ else if (q->howto->name)
+ printf (" %-16s ", q->howto->name);
+ else
+ printf (" %-16d ", q->howto->type);
if (sym_name)
- {
- bfd_printf_vma (abfd, q->address);
- if (q->howto->name)
- printf (" %-16s ", q->howto->name);
- else
- printf (" %-16d ", q->howto->type);
- objdump_print_symname (abfd, NULL, *q->sym_ptr_ptr);
- }
+ objdump_print_symname (abfd, NULL, *q->sym_ptr_ptr);
else
{
if (section_name == NULL)
section_name = "*unknown*";
- bfd_printf_vma (abfd, q->address);
- printf (" %-16s [%s]",
- q->howto->name,
- section_name);
+ printf ("[%s]", section_name);
}
if (q->addend)
@@ -2526,10 +2742,15 @@ add_include_path (const char *path)
static void
adjust_addresses (bfd *abfd ATTRIBUTE_UNUSED,
asection *section,
- void *dummy ATTRIBUTE_UNUSED)
+ void *arg)
{
- section->vma += adjust_section_vma;
- section->lma += adjust_section_vma;
+ if ((section->flags & SEC_DEBUGGING) == 0)
+ {
+ bfd_boolean *has_reloc_p = (bfd_boolean *) arg;
+ section->vma += adjust_section_vma;
+ if (*has_reloc_p)
+ section->lma += adjust_section_vma;
+ }
}
/* Dump selected contents of ABFD. */
@@ -2541,7 +2762,10 @@ dump_bfd (bfd *abfd)
the BFD information is a hack. However, we must do it, or
bfd_find_nearest_line will not do the right thing. */
if (adjust_section_vma != 0)
- bfd_map_over_sections (abfd, adjust_addresses, NULL);
+ {
+ bfd_boolean has_reloc = (abfd->flags & HAS_RELOC);
+ bfd_map_over_sections (abfd, adjust_addresses, &has_reloc);
+ }
if (! dump_debugging_tags)
printf (_("\n%s: file format %s\n"), bfd_get_filename (abfd),
@@ -2557,15 +2781,29 @@ dump_bfd (bfd *abfd)
if (dump_section_headers)
dump_headers (abfd);
- if (dump_symtab || dump_reloc_info || disassemble || dump_debugging)
+ if (dump_symtab
+ || dump_reloc_info
+ || disassemble
+ || dump_debugging
+ || dump_dwarf_section_info)
syms = slurp_symtab (abfd);
- if (dump_dynamic_symtab || dump_dynamic_reloc_info)
+ if (dump_dynamic_symtab || dump_dynamic_reloc_info
+ || (disassemble && bfd_get_dynamic_symtab_upper_bound (abfd) > 0))
dynsyms = slurp_dynamic_symtab (abfd);
+ if (disassemble)
+ {
+ synthcount = bfd_get_synthetic_symtab (abfd, symcount, syms,
+ dynsymcount, dynsyms, &synthsyms);
+ if (synthcount < 0)
+ synthcount = 0;
+ }
if (dump_symtab)
dump_symbols (abfd, FALSE);
if (dump_dynamic_symtab)
dump_symbols (abfd, TRUE);
+ if (dump_dwarf_section_info)
+ dump_dwarf (abfd);
if (dump_stab_section_info)
dump_stabs (abfd);
if (dump_reloc_info && ! disassemble)
@@ -2605,6 +2843,16 @@ dump_bfd (bfd *abfd)
free (dynsyms);
dynsyms = NULL;
}
+
+ if (synthsyms)
+ {
+ free (synthsyms);
+ synthsyms = NULL;
+ }
+
+ symcount = 0;
+ dynsymcount = 0;
+ synthcount = 0;
}
static void
@@ -2719,10 +2967,12 @@ main (int argc, char **argv)
START_PROGRESS (program_name, 0);
+ expandargv (&argc, &argv);
+
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "pib:m:M:VvCdDlfaHhrRtTxsSI:j:wE:zgeG",
+ while ((c = getopt_long (argc, argv, "pib:m:M:VvCdDlfaHhrRtTxsSI:j:wE:zgeGW",
long_options, (int *) 0))
!= EOF)
{
@@ -2863,6 +3113,20 @@ main (int argc, char **argv)
do_demangle = TRUE;
seenflag = TRUE;
break;
+ case 'W':
+ dump_dwarf_section_info = TRUE;
+ seenflag = TRUE;
+ do_debug_info = 1;
+ do_debug_abbrevs = 1;
+ do_debug_lines = 1;
+ do_debug_pubnames = 1;
+ do_debug_aranges = 1;
+ do_debug_ranges = 1;
+ do_debug_frames = 1;
+ do_debug_macinfo = 1;
+ do_debug_str = 1;
+ do_debug_loc = 1;
+ break;
case 'G':
dump_stab_section_info = TRUE;
seenflag = TRUE;
diff --git a/contrib/binutils/binutils/po/Make-in b/contrib/binutils/binutils/po/Make-in
index 6176dbf78c3c..be09b4cd788b 100644
--- a/contrib/binutils/binutils/po/Make-in
+++ b/contrib/binutils/binutils/po/Make-in
@@ -1,7 +1,8 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright 2003, 2006 Free Software Foundation, Inc.
#
-# This file file be copied and used freely without restrictions. It can
+# This file may be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
@@ -109,6 +110,7 @@ $(srcdir)/stamp-cat-id: $(PACKAGE).pot
install: install-exec install-data
install-exec:
install-info:
+install-html:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
@@ -184,7 +186,7 @@ check: all
cat-id-tbl.o: ../intl/libgettext.h
-dvi info tags TAGS ID:
+html dvi pdf ps info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
diff --git a/contrib/binutils/binutils/po/POTFILES.in b/contrib/binutils/binutils/po/POTFILES.in
index 9e9e6a59677f..d3f6cb3fa7c7 100644
--- a/contrib/binutils/binutils/po/POTFILES.in
+++ b/contrib/binutils/binutils/po/POTFILES.in
@@ -19,6 +19,7 @@ debug.h
dlltool.c
dlltool.h
dllwrap.c
+dwarf.c
emul_aix.c
emul_vanilla.c
filemode.c
diff --git a/contrib/binutils/binutils/po/binutils.pot b/contrib/binutils/binutils/po/binutils.pot
index 73c60b3e0e22..5e5a4dc7f22a 100644
--- a/contrib/binutils/binutils/po/binutils.pot
+++ b/contrib/binutils/binutils/po/binutils.pot
@@ -7,7 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-07-11 13:56+0930\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-10-25 09:14+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"
@@ -15,26 +16,31 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: addr2line.c:74
+#: addr2line.c:76
#, c-format
msgid "Usage: %s [option(s)] [addr(s)]\n"
msgstr ""
-#: addr2line.c:75
+#: addr2line.c:77
+#, c-format
msgid " Convert addresses into line number/file name pairs.\n"
msgstr ""
-#: addr2line.c:76
+#: addr2line.c:78
+#, c-format
msgid ""
" If no addresses are specified on the command line, they will be read from "
"stdin\n"
msgstr ""
-#: addr2line.c:77
+#: addr2line.c:79
+#, 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"
" -s --basenames Strip directory names\n"
" -f --functions Show function names\n"
" -C --demangle[=style] Demangle function names\n"
@@ -43,1341 +49,2161 @@ msgid ""
"\n"
msgstr ""
-#: addr2line.c:89 ar.c:297 coffdump.c:479 nlmconv.c:1121 objcopy.c:484
-#: objcopy.c:518 readelf.c:2649 size.c:104 srconv.c:1962 strings.c:673
-#: sysdump.c:774 windres.c:702
+#: 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
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: addr2line.c:245
+#: addr2line.c:253
#, c-format
msgid "%s: can not get addresses from archive"
msgstr ""
-#: addr2line.c:317 nm.c:433 objdump.c:2693
+#: addr2line.c:325 nm.c:1523 objdump.c:3033
#, c-format
msgid "unknown demangling style `%s'"
msgstr ""
-#: ar.c:238
+#: ar.c:203
#, c-format
msgid "no entry %s in archive\n"
msgstr ""
-#: ar.c:255
+#: ar.c:219
#, c-format
msgid ""
"Usage: %s [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] "
"[count] archive-file file...\n"
msgstr ""
-#: ar.c:258
+#: ar.c:222
#, c-format
msgid " %s -M [<mri-script]\n"
msgstr ""
-#: ar.c:259
+#: ar.c:223
+#, c-format
msgid " commands:\n"
msgstr ""
-#: ar.c:260
+#: ar.c:224
+#, c-format
msgid " d - delete file(s) from the archive\n"
msgstr ""
-#: ar.c:261
+#: ar.c:225
+#, c-format
msgid " m[ab] - move file(s) in the archive\n"
msgstr ""
-#: ar.c:262
+#: ar.c:226
+#, c-format
msgid " p - print file(s) found in the archive\n"
msgstr ""
-#: ar.c:263
+#: ar.c:227
+#, c-format
msgid " q[f] - quick append file(s) to the archive\n"
msgstr ""
-#: ar.c:264
+#: ar.c:228
+#, c-format
msgid ""
" r[ab][f][u] - replace existing or insert new file(s) into the archive\n"
msgstr ""
-#: ar.c:265
+#: ar.c:229
+#, c-format
msgid " t - display contents of archive\n"
msgstr ""
-#: ar.c:266
+#: ar.c:230
+#, c-format
msgid " x[o] - extract file(s) from the archive\n"
msgstr ""
-#: ar.c:267
+#: ar.c:231
+#, c-format
msgid " command specific modifiers:\n"
msgstr ""
-#: ar.c:268
+#: ar.c:232
+#, c-format
msgid " [a] - put file(s) after [member-name]\n"
msgstr ""
-#: ar.c:269
+#: ar.c:233
+#, c-format
msgid " [b] - put file(s) before [member-name] (same as [i])\n"
msgstr ""
-#: ar.c:270
+#: ar.c:234
+#, c-format
msgid " [N] - use instance [count] of name\n"
msgstr ""
-#: ar.c:271
+#: ar.c:235
+#, c-format
msgid " [f] - truncate inserted file names\n"
msgstr ""
-#: ar.c:272
+#: ar.c:236
+#, c-format
msgid " [P] - use full path names when matching\n"
msgstr ""
-#: ar.c:273
+#: ar.c:237
+#, c-format
msgid " [o] - preserve original dates\n"
msgstr ""
-#: ar.c:274
+#: ar.c:238
+#, c-format
msgid ""
" [u] - only replace files that are newer than current archive "
"contents\n"
msgstr ""
-#: ar.c:275
+#: ar.c:239
+#, c-format
msgid " generic modifiers:\n"
msgstr ""
-#: ar.c:276
+#: ar.c:240
+#, c-format
msgid " [c] - do not warn if the library had to be created\n"
msgstr ""
-#: ar.c:277
+#: ar.c:241
+#, c-format
msgid " [s] - create an archive index (cf. ranlib)\n"
msgstr ""
-#: ar.c:278
+#: ar.c:242
+#, c-format
msgid " [S] - do not build a symbol table\n"
msgstr ""
-#: ar.c:279
+#: ar.c:243
+#, c-format
msgid " [v] - be verbose\n"
msgstr ""
-#: ar.c:280
+#: ar.c:244
+#, c-format
msgid " [V] - display the version number\n"
msgstr ""
-#: ar.c:287
+#: ar.c:245
+#, c-format
+msgid " @<file> - read options from <file>\n"
+msgstr ""
+
+#: ar.c:252
#, c-format
msgid "Usage: %s [options] archive\n"
msgstr ""
-#: ar.c:288
+#: ar.c:253
+#, c-format
msgid " Generate an index to speed access to archives\n"
msgstr ""
-#: ar.c:289
+#: ar.c:254
+#, c-format
msgid ""
" The options are:\n"
+" @<file> Read options from <file>\n"
" -h --help Print this help message\n"
" -V --version Print version information\n"
msgstr ""
-#: ar.c:512
+#: ar.c:485
msgid "two different operation options specified"
msgstr ""
-#: ar.c:587
+#: ar.c:560
#, c-format
msgid "illegal option -- %c"
msgstr ""
-#: ar.c:619
+#: ar.c:606
msgid "no operation specified"
msgstr ""
-#: ar.c:622
+#: ar.c:609
msgid "`u' is only meaningful with the `r' option."
msgstr ""
-#: ar.c:632
+#: ar.c:617
msgid "`N' is only meaningful with the `x' and `d' options."
msgstr ""
-#: ar.c:635
+#: ar.c:620
msgid "Value for `N' must be positive."
msgstr ""
-#: ar.c:718
+#: ar.c:670
#, c-format
msgid "internal error -- this option not implemented"
msgstr ""
-#: ar.c:837 ar.c:888 ar.c:1333 objcopy.c:1579
+#: ar.c:739
+#, c-format
+msgid "creating %s"
+msgstr ""
+
+#: ar.c:788 ar.c:838 ar.c:1156 objcopy.c:1683
#, c-format
msgid "internal stat error on %s"
msgstr ""
-#: ar.c:841
+#: ar.c:792
#, c-format
msgid ""
"\n"
-"<member %s>\n"
+"<%s>\n"
"\n"
msgstr ""
-#: ar.c:857 ar.c:925
+#: ar.c:808 ar.c:875
#, c-format
msgid "%s is not a valid archive"
msgstr ""
-#: ar.c:893
+#: ar.c:843
#, c-format
msgid "stat returns negative size for %s"
msgstr ""
-#: ar.c:1020
-#, c-format
-msgid "%s is not an archive"
-msgstr ""
-
-#: ar.c:1027
-#, c-format
-msgid "creating %s"
-msgstr ""
-
-#: ar.c:1233
+#: ar.c:1061
#, c-format
msgid "No member named `%s'\n"
msgstr ""
-#: ar.c:1285
+#: ar.c:1111
#, c-format
msgid "no entry %s in archive %s!"
msgstr ""
-#: ar.c:1422
+#: ar.c:1248
#, c-format
msgid "%s: no archive map to update"
msgstr ""
-#: arsup.c:86
+#: arsup.c:87
#, c-format
msgid "No entry %s in archive.\n"
msgstr ""
-#: arsup.c:117
+#: arsup.c:112
#, c-format
msgid "Can't open file %s\n"
msgstr ""
-#: arsup.c:172
+#: arsup.c:162
#, c-format
msgid "%s: Can't open output archive %s\n"
msgstr ""
-#: arsup.c:189
+#: arsup.c:179
#, c-format
msgid "%s: Can't open input archive %s\n"
msgstr ""
-#: arsup.c:198
+#: arsup.c:188
#, c-format
msgid "%s: file %s is not an archive\n"
msgstr ""
-#: arsup.c:241
+#: arsup.c:227
#, c-format
msgid "%s: no output archive specified yet\n"
msgstr ""
-#: arsup.c:262 arsup.c:301 arsup.c:343 arsup.c:364 arsup.c:430
+#: arsup.c:247 arsup.c:285 arsup.c:327 arsup.c:347 arsup.c:413
#, c-format
msgid "%s: no open output archive\n"
msgstr ""
-#: arsup.c:273 arsup.c:385 arsup.c:411
+#: arsup.c:258 arsup.c:368 arsup.c:394
#, c-format
msgid "%s: can't open file %s\n"
msgstr ""
-#: arsup.c:328 arsup.c:407 arsup.c:489
+#: arsup.c:312 arsup.c:390 arsup.c:471
#, c-format
msgid "%s: can't find module file %s\n"
msgstr ""
-#: arsup.c:439
+#: arsup.c:422
#, c-format
msgid "Current open archive is %s\n"
msgstr ""
-#: arsup.c:464
+#: arsup.c:446
#, c-format
msgid "%s: no open archive\n"
msgstr ""
-#: binemul.c:39
+#: binemul.c:37
#, c-format
msgid " No emulation specific options\n"
msgstr ""
#. Macros for common output.
-#: binemul.h:52
+#: binemul.h:40
#, c-format
msgid " emulation options: \n"
msgstr ""
-#: bucomm.c:113
+#: bucomm.c:110
#, c-format
msgid "can't set BFD default target to `%s': %s"
msgstr ""
-#: bucomm.c:125
+#: bucomm.c:121
#, c-format
msgid "%s: Matching formats:"
msgstr ""
-#: bucomm.c:142
+#: bucomm.c:136
+#, c-format
msgid "Supported targets:"
msgstr ""
-#: bucomm.c:144
+#: bucomm.c:138
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: bucomm.c:162
+#: bucomm.c:154
+#, c-format
msgid "Supported architectures:"
msgstr ""
-#: bucomm.c:164
+#: bucomm.c:156
#, c-format
msgid "%s: supported architectures:"
msgstr ""
-#: bucomm.c:360
+#: bucomm.c:349
#, c-format
msgid "BFD header file version %s\n"
msgstr ""
-#: bucomm.c:467
+#: bucomm.c:450
#, c-format
msgid "%s: bad number: %s"
msgstr ""
-#: coffdump.c:107
+#: bucomm.c:467 strings.c:438
+#, c-format
+msgid "'%s': No such file"
+msgstr ""
+
+#: bucomm.c:469 strings.c:440
+#, c-format
+msgid "Warning: could not locate '%s'. reason: %s"
+msgstr ""
+
+#: bucomm.c:473
+#, c-format
+msgid "Warning: '%s' is not an ordinary file"
+msgstr ""
+
+#: coffdump.c:103
#, c-format
msgid "#lines %d "
msgstr ""
-#: coffdump.c:471 sysdump.c:767
+#: coffdump.c:457 sysdump.c:641
#, c-format
msgid "Usage: %s [option(s)] in-file\n"
msgstr ""
-#: coffdump.c:472
+#: coffdump.c:458
+#, c-format
msgid " Print a human readable interpretation of a SYSROFF object file\n"
msgstr ""
-#: coffdump.c:473
+#: coffdump.c:459
+#, c-format
msgid ""
" The options are:\n"
+" @<file> Read options from <file>\n"
" -h --help Display this information\n"
" -v --version Display the program's version\n"
"\n"
msgstr ""
-#: coffdump.c:541 srconv.c:2052 sysdump.c:831
+#: coffdump.c:528 srconv.c:1822 sysdump.c:705
msgid "no input file specified"
msgstr ""
-#: debug.c:654
+#: debug.c:648
msgid "debug_add_to_current_namespace: no current file"
msgstr ""
-#: debug.c:737
+#: debug.c:727
msgid "debug_start_source: no debug_set_filename call"
msgstr ""
-#: debug.c:796
+#: debug.c:783
msgid "debug_record_function: no debug_set_filename call"
msgstr ""
-#: debug.c:852
+#: debug.c:835
msgid "debug_record_parameter: no current function"
msgstr ""
-#: debug.c:886
+#: debug.c:867
msgid "debug_end_function: no current function"
msgstr ""
-#: debug.c:892
+#: debug.c:873
msgid "debug_end_function: some blocks were not closed"
msgstr ""
-#: debug.c:922
+#: debug.c:901
msgid "debug_start_block: no current block"
msgstr ""
-#: debug.c:960
+#: debug.c:937
msgid "debug_end_block: no current block"
msgstr ""
-#: debug.c:967
+#: debug.c:944
msgid "debug_end_block: attempt to close top level block"
msgstr ""
-#: debug.c:993
+#: debug.c:967
msgid "debug_record_line: no current unit"
msgstr ""
#. FIXME
-#: debug.c:1047
+#: debug.c:1020
msgid "debug_start_common_block: not implemented"
msgstr ""
#. FIXME
-#: debug.c:1059
+#: debug.c:1031
msgid "debug_end_common_block: not implemented"
msgstr ""
#. FIXME.
-#: debug.c:1153
+#: debug.c:1115
msgid "debug_record_label: not implemented"
msgstr ""
-#: debug.c:1179
+#: debug.c:1137
msgid "debug_record_variable: no current file"
msgstr ""
-#: debug.c:1762
+#: debug.c:1665
msgid "debug_make_undefined_type: unsupported kind"
msgstr ""
-#: debug.c:1963
+#: debug.c:1842
msgid "debug_name_type: no current file"
msgstr ""
-#: debug.c:2011
+#: debug.c:1887
msgid "debug_tag_type: no current file"
msgstr ""
-#: debug.c:2019
+#: debug.c:1895
msgid "debug_tag_type: extra tag attempted"
msgstr ""
-#: debug.c:2058
+#: debug.c:1932
#, c-format
msgid "Warning: changing type size from %d to %d\n"
msgstr ""
-#: debug.c:2082
+#: debug.c:1954
msgid "debug_find_named_type: no current compilation unit"
msgstr ""
-#: debug.c:2189
+#: debug.c:2057
#, c-format
msgid "debug_get_real_type: circular debug information for %s\n"
msgstr ""
-#: debug.c:2650
+#: debug.c:2484
msgid "debug_write_type: illegal type encountered"
msgstr ""
-#: dlltool.c:812 dlltool.c:837 dlltool.c:863
+#: dlltool.c:765 dlltool.c:789 dlltool.c:818
#, c-format
msgid "Internal error: Unknown machine type: %d"
msgstr ""
-#: dlltool.c:900
+#: dlltool.c:854
#, c-format
msgid "Can't open def file: %s"
msgstr ""
-#: dlltool.c:905
+#: dlltool.c:859
#, c-format
msgid "Processing def file: %s"
msgstr ""
-#: dlltool.c:909
+#: dlltool.c:863
msgid "Processed def file"
msgstr ""
-#: dlltool.c:935
+#: dlltool.c:887
#, c-format
msgid "Syntax error in def file %s:%d"
msgstr ""
-#: dlltool.c:974
+#: dlltool.c:922
+#, c-format
+msgid "%s: Path components stripped from image name, '%s'."
+msgstr ""
+
+#: dlltool.c:931
#, c-format
msgid "NAME: %s base: %x"
msgstr ""
-#: dlltool.c:977 dlltool.c:996
+#: dlltool.c:934 dlltool.c:950
msgid "Can't have LIBRARY and NAME"
msgstr ""
-#: dlltool.c:993
+#: dlltool.c:947
#, c-format
msgid "LIBRARY: %s base: %x"
msgstr ""
-#: dlltool.c:1251 resrc.c:271
+#: dlltool.c:1183 resrc.c:269
#, c-format
msgid "wait: %s"
msgstr ""
-#: dlltool.c:1256 dllwrap.c:430 resrc.c:276
+#: dlltool.c:1188 dllwrap.c:413 resrc.c:274
#, c-format
msgid "subprocess got fatal signal %d"
msgstr ""
-#: dlltool.c:1262 dllwrap.c:437 resrc.c:283
+#: dlltool.c:1194 dllwrap.c:420 resrc.c:281
#, c-format
msgid "%s exited with status %d"
msgstr ""
-#: dlltool.c:1294
+#: dlltool.c:1225
#, c-format
msgid "Sucking in info from %s section in %s"
msgstr ""
-#: dlltool.c:1423
+#: dlltool.c:1350
#, c-format
msgid "Excluding symbol: %s"
msgstr ""
-#: dlltool.c:1518 dlltool.c:1529 nm.c:1004 nm.c:1015
+#: dlltool.c:1439 dlltool.c:1450 nm.c:1000 nm.c:1011
#, c-format
msgid "%s: no symbols"
msgstr ""
#. FIXME: we ought to read in and block out the base relocations.
-#: dlltool.c:1556
+#: dlltool.c:1476
#, c-format
msgid "Done reading %s"
msgstr ""
-#: dlltool.c:1567
+#: dlltool.c:1486
#, c-format
msgid "Unable to open object file: %s"
msgstr ""
-#: dlltool.c:1570
+#: dlltool.c:1489
#, c-format
msgid "Scanning object file %s"
msgstr ""
-#: dlltool.c:1585
+#: dlltool.c:1504
#, c-format
msgid "Cannot produce mcore-elf dll from archive file: %s"
msgstr ""
-#: dlltool.c:1677
+#: dlltool.c:1590
msgid "Adding exports to output file"
msgstr ""
-#: dlltool.c:1724
+#: dlltool.c:1638
msgid "Added exports to output file"
msgstr ""
-#: dlltool.c:1848
+#: dlltool.c:1759
#, c-format
msgid "Generating export file: %s"
msgstr ""
-#: dlltool.c:1853
+#: dlltool.c:1764
#, c-format
msgid "Unable to open temporary assembler file: %s"
msgstr ""
-#: dlltool.c:1856
+#: dlltool.c:1767
#, c-format
msgid "Opened temporary file: %s"
msgstr ""
-#: dlltool.c:2086
+#: dlltool.c:1989
msgid "Generated exports file"
msgstr ""
-#: dlltool.c:2378
+#: dlltool.c:2195
#, c-format
msgid "bfd_open failed open stub file: %s"
msgstr ""
-#: dlltool.c:2381
+#: dlltool.c:2198
#, c-format
msgid "Creating stub file: %s"
msgstr ""
-#: dlltool.c:2766
+#: dlltool.c:2580
#, c-format
msgid "failed to open temporary head file: %s"
msgstr ""
-#: dlltool.c:2825
+#: dlltool.c:2639
#, c-format
msgid "failed to open temporary tail file: %s"
msgstr ""
-#: dlltool.c:2892
+#: dlltool.c:2706
#, c-format
msgid "Can't open .lib file: %s"
msgstr ""
-#: dlltool.c:2895
+#: dlltool.c:2709
#, c-format
msgid "Creating library file: %s"
msgstr ""
-#: dlltool.c:2951
+#: dlltool.c:2792 dlltool.c:2798
#, c-format
msgid "cannot delete %s: %s"
msgstr ""
-#: dlltool.c:2955
+#: dlltool.c:2803
msgid "Created lib file"
msgstr ""
-#: dlltool.c:3062
+#: dlltool.c:2882
#, c-format
msgid "Warning, ignoring duplicate EXPORT %s %d,%d"
msgstr ""
-#: dlltool.c:3068
+#: dlltool.c:2888
#, c-format
msgid "Error, duplicate EXPORT with oridinals: %s"
msgstr ""
-#: dlltool.c:3191
+#: dlltool.c:2993
msgid "Processing definitions"
msgstr ""
-#: dlltool.c:3223
+#: dlltool.c:3025
msgid "Processed definitions"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:3234 dllwrap.c:495
+#: dlltool.c:3032 dllwrap.c:474
#, c-format
msgid "Usage %s <option(s)> <object-file(s)>\n"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:3236
+#: dlltool.c:3034
#, c-format
msgid ""
" -m --machine <machine> Create as DLL for <machine>. [default: %s]\n"
msgstr ""
-#: dlltool.c:3237
+#: dlltool.c:3035
+#, c-format
msgid ""
" possible <machine>: arm[_interwork], i386, mcore[-elf]{-le|-be}, "
"ppc, thumb\n"
msgstr ""
-#: dlltool.c:3238
+#: dlltool.c:3036
+#, c-format
msgid " -e --output-exp <outname> Generate an export file.\n"
msgstr ""
-#: dlltool.c:3239
+#: dlltool.c:3037
+#, c-format
msgid " -l --output-lib <outname> Generate an interface library.\n"
msgstr ""
-#: dlltool.c:3240
+#: dlltool.c:3038
+#, c-format
msgid " -a --add-indirect Add dll indirects to export file.\n"
msgstr ""
-#: dlltool.c:3241
+#: dlltool.c:3039
+#, c-format
msgid ""
" -D --dllname <name> Name of input dll to put into interface lib.\n"
msgstr ""
-#: dlltool.c:3242
+#: dlltool.c:3040
+#, c-format
msgid " -d --input-def <deffile> Name of .def file to be read in.\n"
msgstr ""
-#: dlltool.c:3243
+#: dlltool.c:3041
+#, c-format
msgid " -z --output-def <deffile> Name of .def file to be created.\n"
msgstr ""
-#: dlltool.c:3244
+#: dlltool.c:3042
+#, c-format
msgid " --export-all-symbols Export all symbols to .def\n"
msgstr ""
-#: dlltool.c:3245
+#: dlltool.c:3043
+#, c-format
msgid " --no-export-all-symbols Only export listed symbols\n"
msgstr ""
-#: dlltool.c:3246
+#: dlltool.c:3044
+#, c-format
msgid " --exclude-symbols <list> Don't export <list>\n"
msgstr ""
-#: dlltool.c:3247
+#: dlltool.c:3045
+#, c-format
msgid " --no-default-excludes Clear default exclude symbols\n"
msgstr ""
-#: dlltool.c:3248
+#: dlltool.c:3046
+#, c-format
msgid " -b --base-file <basefile> Read linker generated base file.\n"
msgstr ""
-#: dlltool.c:3249
+#: dlltool.c:3047
+#, c-format
msgid " -x --no-idata4 Don't generate idata$4 section.\n"
msgstr ""
-#: dlltool.c:3250
+#: dlltool.c:3048
+#, c-format
msgid " -c --no-idata5 Don't generate idata$5 section.\n"
msgstr ""
-#: dlltool.c:3251
+#: dlltool.c:3049
+#, c-format
msgid ""
" -U --add-underscore Add underscores to symbols in interface "
"library.\n"
msgstr ""
-#: dlltool.c:3252
+#: dlltool.c:3050
+#, c-format
msgid " -k --kill-at Kill @<n> from exported names.\n"
msgstr ""
-#: dlltool.c:3253
+#: dlltool.c:3051
+#, c-format
msgid " -A --add-stdcall-alias Add aliases without @<n>.\n"
msgstr ""
-#: dlltool.c:3254
+#: dlltool.c:3052
+#, c-format
+msgid " -p --ext-prefix-alias <prefix> Add aliases with <prefix>.\n"
+msgstr ""
+
+#: dlltool.c:3053
+#, c-format
msgid " -S --as <name> Use <name> for assembler.\n"
msgstr ""
-#: dlltool.c:3255
+#: dlltool.c:3054
+#, c-format
msgid " -f --as-flags <flags> Pass <flags> to the assembler.\n"
msgstr ""
-#: dlltool.c:3256
+#: dlltool.c:3055
+#, c-format
msgid ""
" -C --compat-implib Create backward compatible import library.\n"
msgstr ""
-#: dlltool.c:3257
+#: dlltool.c:3056
+#, c-format
msgid ""
" -n --no-delete Keep temp files (repeat for extra "
"preservation).\n"
msgstr ""
-#: dlltool.c:3258
+#: dlltool.c:3057
+#, c-format
+msgid ""
+" -t --temp-prefix <prefix> Use <prefix> to construct temp file names.\n"
+msgstr ""
+
+#: dlltool.c:3058
+#, c-format
msgid " -v --verbose Be verbose.\n"
msgstr ""
-#: dlltool.c:3259
+#: dlltool.c:3059
+#, c-format
msgid " -V --version Display the program version.\n"
msgstr ""
-#: dlltool.c:3260
+#: dlltool.c:3060
+#, c-format
msgid " -h --help Display this information.\n"
msgstr ""
-#: dlltool.c:3262
+#: dlltool.c:3061
+#, c-format
+msgid " @<file> Read options from <file>.\n"
+msgstr ""
+
+#: dlltool.c:3063
+#, c-format
msgid ""
" -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n"
msgstr ""
-#: dlltool.c:3263
+#: dlltool.c:3064
+#, c-format
msgid " -L --linker <name> Use <name> as the linker.\n"
msgstr ""
-#: dlltool.c:3264
+#: dlltool.c:3065
+#, c-format
msgid " -F --linker-flags <flags> Pass <flags> to the linker.\n"
msgstr ""
-#: dlltool.c:3418
+#: dlltool.c:3181
+#, c-format
+msgid "Path components stripped from dllname, '%s'."
+msgstr ""
+
+#: dlltool.c:3226
#, c-format
msgid "Unable to open base-file: %s"
msgstr ""
-#: dlltool.c:3450
+#: dlltool.c:3258
#, c-format
msgid "Machine '%s' not supported"
msgstr ""
-#: dlltool.c:3553 dllwrap.c:214
+#: dlltool.c:3362 dllwrap.c:204
#, c-format
msgid "Tried file: %s"
msgstr ""
-#: dlltool.c:3560 dllwrap.c:221
+#: dlltool.c:3369 dllwrap.c:211
#, c-format
msgid "Using file: %s"
msgstr ""
-#: dllwrap.c:308
+#: dllwrap.c:294
#, c-format
msgid "Keeping temporary base file %s"
msgstr ""
-#: dllwrap.c:310
+#: dllwrap.c:296
#, c-format
msgid "Deleting temporary base file %s"
msgstr ""
-#: dllwrap.c:324
+#: dllwrap.c:310
#, c-format
msgid "Keeping temporary exp file %s"
msgstr ""
-#: dllwrap.c:326
+#: dllwrap.c:312
#, c-format
msgid "Deleting temporary exp file %s"
msgstr ""
-#: dllwrap.c:339
+#: dllwrap.c:325
#, c-format
msgid "Keeping temporary def file %s"
msgstr ""
-#: dllwrap.c:341
+#: dllwrap.c:327
#, c-format
msgid "Deleting temporary def file %s"
msgstr ""
-#: dllwrap.c:496
+#: dllwrap.c:475
+#, c-format
msgid " Generic options:\n"
msgstr ""
-#: dllwrap.c:497
+#: dllwrap.c:476
+#, c-format
+msgid " @<file> Read options from <file>\n"
+msgstr ""
+
+#: dllwrap.c:477
+#, c-format
msgid " --quiet, -q Work quietly\n"
msgstr ""
-#: dllwrap.c:498
+#: dllwrap.c:478
+#, c-format
msgid " --verbose, -v Verbose\n"
msgstr ""
-#: dllwrap.c:499
+#: dllwrap.c:479
+#, c-format
msgid " --version Print dllwrap version\n"
msgstr ""
-#: dllwrap.c:500
+#: dllwrap.c:480
+#, c-format
msgid " --implib <outname> Synonym for --output-lib\n"
msgstr ""
-#: dllwrap.c:501
+#: dllwrap.c:481
#, c-format
msgid " Options for %s:\n"
msgstr ""
-#: dllwrap.c:502
+#: dllwrap.c:482
+#, c-format
msgid " --driver-name <driver> Defaults to \"gcc\"\n"
msgstr ""
-#: dllwrap.c:503
+#: dllwrap.c:483
+#, c-format
msgid " --driver-flags <flags> Override default ld flags\n"
msgstr ""
-#: dllwrap.c:504
+#: dllwrap.c:484
+#, c-format
msgid " --dlltool-name <dlltool> Defaults to \"dlltool\"\n"
msgstr ""
-#: dllwrap.c:505
+#: dllwrap.c:485
+#, c-format
msgid " --entry <entry> Specify alternate DLL entry point\n"
msgstr ""
-#: dllwrap.c:506
+#: dllwrap.c:486
+#, c-format
msgid " --image-base <base> Specify image base address\n"
msgstr ""
-#: dllwrap.c:507
+#: dllwrap.c:487
+#, c-format
msgid " --target <machine> i386-cygwin32 or i386-mingw32\n"
msgstr ""
-#: dllwrap.c:508
+#: dllwrap.c:488
+#, c-format
msgid " --dry-run Show what needs to be run\n"
msgstr ""
-#: dllwrap.c:509
+#: dllwrap.c:489
+#, c-format
msgid " --mno-cygwin Create Mingw DLL\n"
msgstr ""
-#: dllwrap.c:510
+#: dllwrap.c:490
+#, c-format
msgid " Options passed to DLLTOOL:\n"
msgstr ""
-#: dllwrap.c:511
+#: dllwrap.c:491
+#, c-format
msgid " --machine <machine>\n"
msgstr ""
-#: dllwrap.c:512
+#: dllwrap.c:492
+#, c-format
msgid " --output-exp <outname> Generate export file.\n"
msgstr ""
-#: dllwrap.c:513
+#: dllwrap.c:493
+#, c-format
msgid " --output-lib <outname> Generate input library.\n"
msgstr ""
-#: dllwrap.c:514
+#: dllwrap.c:494
+#, c-format
msgid " --add-indirect Add dll indirects to export file.\n"
msgstr ""
-#: dllwrap.c:515
+#: dllwrap.c:495
+#, c-format
msgid " --dllname <name> Name of input dll to put into output lib.\n"
msgstr ""
-#: dllwrap.c:516
+#: dllwrap.c:496
+#, c-format
msgid " --def <deffile> Name input .def file\n"
msgstr ""
-#: dllwrap.c:517
+#: dllwrap.c:497
+#, c-format
msgid " --output-def <deffile> Name output .def file\n"
msgstr ""
-#: dllwrap.c:518
+#: dllwrap.c:498
+#, c-format
msgid " --export-all-symbols Export all symbols to .def\n"
msgstr ""
-#: dllwrap.c:519
+#: dllwrap.c:499
+#, c-format
msgid " --no-export-all-symbols Only export .drectve symbols\n"
msgstr ""
-#: dllwrap.c:520
+#: dllwrap.c:500
+#, c-format
msgid " --exclude-symbols <list> Exclude <list> from .def\n"
msgstr ""
-#: dllwrap.c:521
+#: dllwrap.c:501
+#, c-format
msgid " --no-default-excludes Zap default exclude symbols\n"
msgstr ""
-#: dllwrap.c:522
+#: dllwrap.c:502
+#, c-format
msgid " --base-file <basefile> Read linker generated base file\n"
msgstr ""
-#: dllwrap.c:523
+#: dllwrap.c:503
+#, c-format
msgid " --no-idata4 Don't generate idata$4 section\n"
msgstr ""
-#: dllwrap.c:524
+#: dllwrap.c:504
+#, c-format
msgid " --no-idata5 Don't generate idata$5 section\n"
msgstr ""
-#: dllwrap.c:525
+#: dllwrap.c:505
+#, c-format
msgid " -U Add underscores to .lib\n"
msgstr ""
-#: dllwrap.c:526
+#: dllwrap.c:506
+#, c-format
msgid " -k Kill @<n> from exported names\n"
msgstr ""
-#: dllwrap.c:527
+#: dllwrap.c:507
+#, c-format
msgid " --add-stdcall-alias Add aliases without @<n>\n"
msgstr ""
-#: dllwrap.c:528
+#: dllwrap.c:508
+#, c-format
msgid " --as <name> Use <name> for assembler\n"
msgstr ""
-#: dllwrap.c:529
+#: dllwrap.c:509
+#, c-format
msgid " --nodelete Keep temp files.\n"
msgstr ""
-#: dllwrap.c:530
+#: dllwrap.c:510
+#, c-format
msgid " Rest are passed unmodified to the language driver\n"
msgstr ""
-#: dllwrap.c:802
+#: dllwrap.c:782
msgid "Must provide at least one of -o or --dllname options"
msgstr ""
-#: dllwrap.c:830
+#: dllwrap.c:811
msgid ""
"no export definition file provided.\n"
"Creating one, but that may not be what you want"
msgstr ""
-#: dllwrap.c:992
+#: dllwrap.c:970
#, c-format
msgid "DLLTOOL name : %s\n"
msgstr ""
-#: dllwrap.c:993
+#: dllwrap.c:971
#, c-format
msgid "DLLTOOL options : %s\n"
msgstr ""
-#: dllwrap.c:994
+#: dllwrap.c:972
#, c-format
msgid "DRIVER name : %s\n"
msgstr ""
-#: dllwrap.c:995
+#: dllwrap.c:973
#, c-format
msgid "DRIVER options : %s\n"
msgstr ""
-#: emul_aix.c:58
+#: dwarf.c:93 dwarf.c:137 readelf.c:322 readelf.c:515
+#, c-format
+msgid "Unhandled data length: %d\n"
+msgstr ""
+
+#: dwarf.c:237
+msgid "badly formed extended line op encountered!\n"
+msgstr ""
+
+#: dwarf.c:244
+#, c-format
+msgid " Extended opcode %d: "
+msgstr ""
+
+#: dwarf.c:249
+#, c-format
+msgid ""
+"End of Sequence\n"
+"\n"
+msgstr ""
+
+#: dwarf.c:255
+#, c-format
+msgid "set Address to 0x%lx\n"
+msgstr ""
+
+#: dwarf.c:260
+#, c-format
+msgid " define new File Table entry\n"
+msgstr ""
+
+#: dwarf.c:261 dwarf.c:1944
+#, c-format
+msgid " Entry\tDir\tTime\tSize\tName\n"
+msgstr ""
+
+#: dwarf.c:263
+#, c-format
+msgid " %d\t"
+msgstr ""
+
+#: dwarf.c:266 dwarf.c:268 dwarf.c:270 dwarf.c:1956 dwarf.c:1958 dwarf.c:1960
+#, c-format
+msgid "%lu\t"
+msgstr ""
+
+#: dwarf.c:271
+#, c-format
+msgid ""
+"%s\n"
+"\n"
+msgstr ""
+
+#: dwarf.c:275
+#, c-format
+msgid "UNKNOWN: length %d\n"
+msgstr ""
+
+#: dwarf.c:288
+msgid "<no .debug_str section>"
+msgstr ""
+
+#: dwarf.c:294
+#, c-format
+msgid "DW_FORM_strp offset too big: %lx\n"
+msgstr ""
+
+#: dwarf.c:295
+msgid "<offset is too big>"
+msgstr ""
+
+#: dwarf.c:528
+#, c-format
+msgid "Unknown TAG value: %lx"
+msgstr ""
+
+#: dwarf.c:564
+#, c-format
+msgid "Unknown FORM value: %lx"
+msgstr ""
+
+#: dwarf.c:573
+#, c-format
+msgid " %lu byte block: "
+msgstr ""
+
+#: dwarf.c:907
+#, c-format
+msgid "(User defined location op)"
+msgstr ""
+
+#: dwarf.c:909
+#, c-format
+msgid "(Unknown location op)"
+msgstr ""
+
+#: dwarf.c:955
+msgid "Internal error: DWARF version is not 2 or 3.\n"
+msgstr ""
+
+#: dwarf.c:1053
+msgid "DW_FORM_data8 is unsupported when sizeof (unsigned long) != 8\n"
+msgstr ""
+
+#: dwarf.c:1102
+#, c-format
+msgid " (indirect string, offset: 0x%lx): %s"
+msgstr ""
+
+#: dwarf.c:1111
+#, c-format
+msgid "Unrecognized form: %lu\n"
+msgstr ""
+
+#: dwarf.c:1196
+#, c-format
+msgid "(not inlined)"
+msgstr ""
+
+#: dwarf.c:1199
+#, c-format
+msgid "(inlined)"
+msgstr ""
+
+#: dwarf.c:1202
+#, c-format
+msgid "(declared as inline but ignored)"
+msgstr ""
+
+#: dwarf.c:1205
+#, c-format
+msgid "(declared as inline and inlined)"
+msgstr ""
+
+#: dwarf.c:1208
+#, c-format
+msgid " (Unknown inline attribute value: %lx)"
+msgstr ""
+
+#: dwarf.c:1354 dwarf.c:2484
+#, c-format
+msgid " [without DW_AT_frame_base]"
+msgstr ""
+
+#: dwarf.c:1357
+#, c-format
+msgid "(location list)"
+msgstr ""
+
+#: dwarf.c:1475
+#, c-format
+msgid "Unknown AT value: %lx"
+msgstr ""
+
+#: dwarf.c:1544
+#, c-format
+msgid "No comp units in %s section ?"
+msgstr ""
+
+#: dwarf.c:1553
+#, c-format
+msgid "Not enough memory for a debug info array of %u entries"
+msgstr ""
+
+#: dwarf.c:1561 dwarf.c:2573
+#, c-format
+msgid ""
+"The section %s contains:\n"
+"\n"
+msgstr ""
+
+#: dwarf.c:1569
+#, c-format
+msgid "Unable to locate %s section!\n"
+msgstr ""
+
+#: dwarf.c:1635
+#, c-format
+msgid " Compilation Unit @ offset 0x%lx:\n"
+msgstr ""
+
+#: dwarf.c:1636
+#, c-format
+msgid " Length: %ld\n"
+msgstr ""
+
+#: dwarf.c:1637
+#, c-format
+msgid " Version: %d\n"
+msgstr ""
+
+#: dwarf.c:1638
+#, c-format
+msgid " Abbrev Offset: %ld\n"
+msgstr ""
+
+#: dwarf.c:1639
+#, c-format
+msgid " Pointer Size: %d\n"
+msgstr ""
+
+#: dwarf.c:1644
+msgid "Only version 2 and 3 DWARF debug information is currently supported.\n"
+msgstr ""
+
+#: dwarf.c:1685
+#, c-format
+msgid "Unable to locate entry %lu in the abbreviation table\n"
+msgstr ""
+
+#: dwarf.c:1691
+#, c-format
+msgid " <%d><%lx>: Abbrev Number: %lu (%s)\n"
+msgstr ""
+
+#: dwarf.c:1785
+#, c-format
+msgid "%s section needs a populated .debug_info section\n"
+msgstr ""
+
+#: dwarf.c:1792
+#, c-format
+msgid "%s section has more comp units than .debug_info section\n"
+msgstr ""
+
+#: dwarf.c:1794
+#, c-format
+msgid ""
+"assuming that the pointer size is %d, from the last comp unit in ."
+"debug_info\n"
+"\n"
+msgstr ""
+
+#: dwarf.c:1819
+#, c-format
+msgid ""
+"\n"
+"Dump of debug contents of section %s:\n"
+"\n"
+msgstr ""
+
+#: dwarf.c:1858
+msgid "The line info appears to be corrupt - the section is too small\n"
+msgstr ""
+
+#: dwarf.c:1867
+msgid "Only DWARF version 2 and 3 line info is currently supported.\n"
+msgstr ""
+
+#: dwarf.c:1894
+#, c-format
+msgid " Length: %ld\n"
+msgstr ""
+
+#: dwarf.c:1895
+#, c-format
+msgid " DWARF Version: %d\n"
+msgstr ""
+
+#: dwarf.c:1896
+#, c-format
+msgid " Prologue Length: %d\n"
+msgstr ""
+
+#: dwarf.c:1897
+#, c-format
+msgid " Minimum Instruction Length: %d\n"
+msgstr ""
+
+#: dwarf.c:1898
+#, c-format
+msgid " Initial value of 'is_stmt': %d\n"
+msgstr ""
+
+#: dwarf.c:1899
+#, c-format
+msgid " Line Base: %d\n"
+msgstr ""
+
+#: dwarf.c:1900
+#, c-format
+msgid " Line Range: %d\n"
+msgstr ""
+
+#: dwarf.c:1901
+#, c-format
+msgid " Opcode Base: %d\n"
+msgstr ""
+
+#: dwarf.c:1902
+#, c-format
+msgid " (Pointer size: %u)%s\n"
+msgstr ""
+
+#: dwarf.c:1913
+#, c-format
+msgid ""
+"\n"
+" Opcodes:\n"
+msgstr ""
+
+#: dwarf.c:1916
+#, c-format
+msgid " Opcode %d has %d args\n"
+msgstr ""
+
+#: dwarf.c:1922
+#, c-format
+msgid ""
+"\n"
+" The Directory Table is empty.\n"
+msgstr ""
+
+#: dwarf.c:1925
+#, c-format
+msgid ""
+"\n"
+" The Directory Table:\n"
+msgstr ""
+
+#: dwarf.c:1929
+#, c-format
+msgid " %s\n"
+msgstr ""
+
+#: dwarf.c:1940
+#, c-format
+msgid ""
+"\n"
+" The File Name Table is empty.\n"
+msgstr ""
+
+#: dwarf.c:1943
+#, c-format
+msgid ""
+"\n"
+" The File Name Table:\n"
+msgstr ""
+
+#: dwarf.c:1951
+#, c-format
+msgid " %d\t"
+msgstr ""
+
+#: dwarf.c:1962
+#, c-format
+msgid "%s\n"
+msgstr ""
+
+#. Now display the statements.
+#: dwarf.c:1970
+#, c-format
+msgid ""
+"\n"
+" Line Number Statements:\n"
+msgstr ""
+
+#: dwarf.c:1986
+#, c-format
+msgid " Special opcode %d: advance Address by %lu to 0x%lx"
+msgstr ""
+
+#: dwarf.c:1990
+#, 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
+#, c-format
+msgid " Copy\n"
+msgstr ""
+
+#: dwarf.c:2015
+#, c-format
+msgid " Advance PC by %lu to 0x%lx\n"
+msgstr ""
+
+#: dwarf.c:2023
+#, c-format
+msgid " Advance Line by %d to %d\n"
+msgstr ""
+
+#: dwarf.c:2030
+#, c-format
+msgid " Set File Name to entry %d in the File Name Table\n"
+msgstr ""
+
+#: dwarf.c:2038
+#, c-format
+msgid " Set column to %lu\n"
+msgstr ""
+
+#: dwarf.c:2045
+#, c-format
+msgid " Set is_stmt to %d\n"
+msgstr ""
+
+#: dwarf.c:2050
+#, c-format
+msgid " Set basic block\n"
+msgstr ""
+
+#: dwarf.c:2058
+#, c-format
+msgid " Advance PC by constant %lu to 0x%lx\n"
+msgstr ""
+
+#: dwarf.c:2066
+#, c-format
+msgid " Advance PC by fixed size amount %lu to 0x%lx\n"
+msgstr ""
+
+#: dwarf.c:2071
+#, c-format
+msgid " Set prologue_end to true\n"
+msgstr ""
+
+#: dwarf.c:2075
+#, c-format
+msgid " Set epilogue_begin to true\n"
+msgstr ""
+
+#: dwarf.c:2081
+#, c-format
+msgid " Set ISA to %lu\n"
+msgstr ""
+
+#: dwarf.c:2085
+#, 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
+#, c-format
+msgid ""
+"Contents of the %s section:\n"
+"\n"
+msgstr ""
+
+#: dwarf.c:2151
+msgid "Only DWARF 2 and 3 pubnames are currently supported\n"
+msgstr ""
+
+#: dwarf.c:2158
+#, c-format
+msgid " Length: %ld\n"
+msgstr ""
+
+#: dwarf.c:2160
+#, c-format
+msgid " Version: %d\n"
+msgstr ""
+
+#: dwarf.c:2162
+#, c-format
+msgid " Offset into .debug_info section: %ld\n"
+msgstr ""
+
+#: dwarf.c:2164
+#, c-format
+msgid " Size of area in .debug_info section: %ld\n"
+msgstr ""
+
+#: dwarf.c:2167
+#, c-format
+msgid ""
+"\n"
+" Offset\tName\n"
+msgstr ""
+
+#: dwarf.c:2218
+#, c-format
+msgid " DW_MACINFO_start_file - lineno: %d filenum: %d\n"
+msgstr ""
+
+#: dwarf.c:2224
+#, c-format
+msgid " DW_MACINFO_end_file\n"
+msgstr ""
+
+#: dwarf.c:2232
+#, c-format
+msgid " DW_MACINFO_define - lineno : %d macro : %s\n"
+msgstr ""
+
+#: dwarf.c:2241
+#, c-format
+msgid " DW_MACINFO_undef - lineno : %d macro : %s\n"
+msgstr ""
+
+#: dwarf.c:2253
+#, c-format
+msgid " DW_MACINFO_vendor_ext - constant : %d string : %s\n"
+msgstr ""
+
+#: dwarf.c:2282
+#, c-format
+msgid " Number TAG\n"
+msgstr ""
+
+#: dwarf.c:2288
+#, c-format
+msgid " %ld %s [%s]\n"
+msgstr ""
+
+#: dwarf.c:2291
+msgid "has children"
+msgstr ""
+
+#: dwarf.c:2291
+msgid "no children"
+msgstr ""
+
+#: dwarf.c:2294
+#, c-format
+msgid " %-18s %s\n"
+msgstr ""
+
+#: dwarf.c:2327 dwarf.c:2510 dwarf.c:2684
+#, c-format
+msgid ""
+"\n"
+"The %s section is empty.\n"
+msgstr ""
+
+#. FIXME: Should we handle this case?
+#: dwarf.c:2372
+msgid "Location lists in .debug_info section aren't in ascending order!\n"
+msgstr ""
+
+#: dwarf.c:2375
+msgid "No location lists in .debug_info section!\n"
+msgstr ""
+
+#: dwarf.c:2379
+#, c-format
+msgid "Location lists in %s section start at 0x%lx\n"
+msgstr ""
+
+#: dwarf.c:2383
+#, c-format
+msgid " Offset Begin End Expression\n"
+msgstr ""
+
+#: dwarf.c:2414
+#, c-format
+msgid "There is a hole [0x%lx - 0x%lx] in .debug_loc section.\n"
+msgstr ""
+
+#: dwarf.c:2417
+#, c-format
+msgid "There is an overlap [0x%lx - 0x%lx] in .debug_loc section.\n"
+msgstr ""
+
+#: dwarf.c:2424
+#, c-format
+msgid "Offset 0x%lx is bigger than .debug_loc section size.\n"
+msgstr ""
+
+#: dwarf.c:2433 dwarf.c:2460 dwarf.c:2470
+#, c-format
+msgid "Location list starting at offset 0x%lx is not terminated.\n"
+msgstr ""
+
+#: dwarf.c:2445 dwarf.c:2784
+#, c-format
+msgid " %8.8lx <End of list>\n"
+msgstr ""
+
+#: dwarf.c:2453
+#, c-format
+msgid " %8.8lx %8.8lx %8.8lx (base address)\n"
+msgstr ""
+
+#: dwarf.c:2487 dwarf.c:2801
+msgid " (start == end)"
+msgstr ""
+
+#: dwarf.c:2489 dwarf.c:2803
+msgid " (start > end)"
+msgstr ""
+
+#: dwarf.c:2618
+msgid "Only DWARF 2 and 3 aranges are currently supported.\n"
+msgstr ""
+
+#: dwarf.c:2622
+#, c-format
+msgid " Length: %ld\n"
+msgstr ""
+
+#: dwarf.c:2623
+#, c-format
+msgid " Version: %d\n"
+msgstr ""
+
+#: dwarf.c:2624
+#, c-format
+msgid " Offset into .debug_info: %lx\n"
+msgstr ""
+
+#: dwarf.c:2625
+#, c-format
+msgid " Pointer Size: %d\n"
+msgstr ""
+
+#: dwarf.c:2626
+#, c-format
+msgid " Segment Size: %d\n"
+msgstr ""
+
+#: dwarf.c:2628
+#, c-format
+msgid ""
+"\n"
+" Address Length\n"
+msgstr ""
+
+#. FIXME: Should we handle this case?
+#: dwarf.c:2729
+msgid "Range lists in .debug_info section aren't in ascending order!\n"
+msgstr ""
+
+#: dwarf.c:2732
+msgid "No range lists in .debug_info section!\n"
+msgstr ""
+
+#: dwarf.c:2736
+#, c-format
+msgid "Range lists in %s section start at 0x%lx\n"
+msgstr ""
+
+#: dwarf.c:2740
+#, c-format
+msgid " Offset Begin End\n"
+msgstr ""
+
+#: dwarf.c:2765
+#, c-format
+msgid "There is a hole [0x%lx - 0x%lx] in %s section.\n"
+msgstr ""
+
+#: dwarf.c:2769
+#, c-format
+msgid "There is an overlap [0x%lx - 0x%lx] in %s section.\n"
+msgstr ""
+
+#: dwarf.c:2964
+#, c-format
+msgid "The section %s contains:\n"
+msgstr ""
+
+#: dwarf.c:3608
+#, c-format
+msgid "unsupported or unknown DW_CFA_%d\n"
+msgstr ""
+
+#: dwarf.c:3632
+#, c-format
+msgid "Displaying the debug contents of section %s is not yet supported.\n"
+msgstr ""
+
+#: dwarf.c:3674
+#, c-format
+msgid "%s: Error: "
+msgstr ""
+
+#: dwarf.c:3685
+#, c-format
+msgid "%s: Warning: "
+msgstr ""
+
+#: emul_aix.c:51
#, c-format
msgid " [-g] - 32 bit small archive\n"
msgstr ""
-#: emul_aix.c:59
+#: emul_aix.c:52
+#, c-format
msgid " [-X32] - ignores 64 bit objects\n"
msgstr ""
-#: emul_aix.c:60
+#: emul_aix.c:53
+#, c-format
msgid " [-X64] - ignores 32 bit objects\n"
msgstr ""
-#: emul_aix.c:61
+#: emul_aix.c:54
+#, c-format
msgid " [-X32_64] - accepts 32 and 64 bit objects\n"
msgstr ""
-#: ieee.c:326
+#: ieee.c:311
msgid "unexpected end of debugging information"
msgstr ""
-#: ieee.c:421
+#: ieee.c:398
msgid "invalid number"
msgstr ""
-#: ieee.c:480
+#: ieee.c:451
msgid "invalid string length"
msgstr ""
-#: ieee.c:537 ieee.c:578
+#: ieee.c:506 ieee.c:547
msgid "expression stack overflow"
msgstr ""
-#: ieee.c:557
+#: ieee.c:526
msgid "unsupported IEEE expression operator"
msgstr ""
-#: ieee.c:572
+#: ieee.c:541
msgid "unknown section"
msgstr ""
-#: ieee.c:593
+#: ieee.c:562
msgid "expression stack underflow"
msgstr ""
-#: ieee.c:607
+#: ieee.c:576
msgid "expression stack mismatch"
msgstr ""
-#: ieee.c:646
+#: ieee.c:613
msgid "unknown builtin type"
msgstr ""
-#: ieee.c:791
+#: ieee.c:758
msgid "BCD float type not supported"
msgstr ""
-#: ieee.c:937
+#: ieee.c:895
msgid "unexpected number"
msgstr ""
-#: ieee.c:944
+#: ieee.c:902
msgid "unexpected record type"
msgstr ""
-#: ieee.c:977
+#: ieee.c:935
msgid "blocks left on stack at end"
msgstr ""
-#: ieee.c:1242
+#: ieee.c:1198
msgid "unknown BB type"
msgstr ""
-#: ieee.c:1251
+#: ieee.c:1207
msgid "stack overflow"
msgstr ""
-#: ieee.c:1276
+#: ieee.c:1230
msgid "stack underflow"
msgstr ""
-#: ieee.c:1390 ieee.c:1462 ieee.c:2161
+#: ieee.c:1342 ieee.c:1412 ieee.c:2109
msgid "illegal variable index"
msgstr ""
-#: ieee.c:1440
+#: ieee.c:1390
msgid "illegal type index"
msgstr ""
-#: ieee.c:1450 ieee.c:1487
+#: ieee.c:1400 ieee.c:1437
msgid "unknown TY code"
msgstr ""
-#: ieee.c:1469
+#: ieee.c:1419
msgid "undefined variable in TY"
msgstr ""
#. Pascal file name. FIXME.
-#: ieee.c:1880
+#: ieee.c:1830
msgid "Pascal file name not supported"
msgstr ""
-#: ieee.c:1928
+#: ieee.c:1878
msgid "unsupported qualifier"
msgstr ""
-#: ieee.c:2199
+#: ieee.c:2147
msgid "undefined variable in ATN"
msgstr ""
-#: ieee.c:2242
+#: ieee.c:2190
msgid "unknown ATN type"
msgstr ""
#. Reserved for FORTRAN common.
-#: ieee.c:2364
+#: ieee.c:2312
msgid "unsupported ATN11"
msgstr ""
#. We have no way to record this information. FIXME.
-#: ieee.c:2391
+#: ieee.c:2339
msgid "unsupported ATN12"
msgstr ""
-#: ieee.c:2451
+#: ieee.c:2399
msgid "unexpected string in C++ misc"
msgstr ""
-#: ieee.c:2464
+#: ieee.c:2412
msgid "bad misc record"
msgstr ""
-#: ieee.c:2507
+#: ieee.c:2453
msgid "unrecognized C++ misc record"
msgstr ""
-#: ieee.c:2624
+#: ieee.c:2568
msgid "undefined C++ object"
msgstr ""
-#: ieee.c:2658
+#: ieee.c:2602
msgid "unrecognized C++ object spec"
msgstr ""
-#: ieee.c:2694
+#: ieee.c:2638
msgid "unsupported C++ object type"
msgstr ""
-#: ieee.c:2704
+#: ieee.c:2648
msgid "C++ base class not defined"
msgstr ""
-#: ieee.c:2716 ieee.c:2821
+#: ieee.c:2660 ieee.c:2765
msgid "C++ object has no fields"
msgstr ""
-#: ieee.c:2735
+#: ieee.c:2679
msgid "C++ base class not found in container"
msgstr ""
-#: ieee.c:2842
+#: ieee.c:2786
msgid "C++ data member not found in container"
msgstr ""
-#: ieee.c:2883 ieee.c:3033
+#: ieee.c:2827 ieee.c:2977
msgid "unknown C++ visibility"
msgstr ""
-#: ieee.c:2917
+#: ieee.c:2861
msgid "bad C++ field bit pos or size"
msgstr ""
-#: ieee.c:3009
+#: ieee.c:2953
msgid "bad type for C++ method function"
msgstr ""
-#: ieee.c:3019
+#: ieee.c:2963
msgid "no type information for C++ method function"
msgstr ""
-#: ieee.c:3058
+#: ieee.c:3002
msgid "C++ static virtual method"
msgstr ""
-#: ieee.c:3153
+#: ieee.c:3097
msgid "unrecognized C++ object overhead spec"
msgstr ""
-#: ieee.c:3192
+#: ieee.c:3136
msgid "undefined C++ vtable"
msgstr ""
-#: ieee.c:3263
+#: ieee.c:3205
msgid "C++ default values not in a function"
msgstr ""
-#: ieee.c:3303
+#: ieee.c:3245
msgid "unrecognized C++ default type"
msgstr ""
-#: ieee.c:3334
+#: ieee.c:3276
msgid "reference parameter is not a pointer"
msgstr ""
-#: ieee.c:3419
+#: ieee.c:3359
msgid "unrecognized C++ reference type"
msgstr ""
-#: ieee.c:3501
+#: ieee.c:3441
msgid "C++ reference not found"
msgstr ""
-#: ieee.c:3509
+#: ieee.c:3449
msgid "C++ reference is not pointer"
msgstr ""
-#: ieee.c:3538 ieee.c:3546
+#: ieee.c:3475 ieee.c:3483
msgid "missing required ASN"
msgstr ""
-#: ieee.c:3576 ieee.c:3584
+#: ieee.c:3510 ieee.c:3518
msgid "missing required ATN65"
msgstr ""
-#: ieee.c:3598
+#: ieee.c:3532
msgid "bad ATN65 record"
msgstr ""
-#: ieee.c:4286
+#: ieee.c:4160
+#, c-format
msgid "IEEE numeric overflow: 0x"
msgstr ""
-#: ieee.c:4332
+#: ieee.c:4204
#, c-format
msgid "IEEE string length overflow: %u\n"
msgstr ""
-#: ieee.c:5382
+#: ieee.c:5203
#, c-format
msgid "IEEE unsupported integer type size %u\n"
msgstr ""
-#: ieee.c:5418
+#: ieee.c:5237
#, c-format
msgid "IEEE unsupported float type size %u\n"
msgstr ""
-#: ieee.c:5454
+#: ieee.c:5271
#, c-format
msgid "IEEE unsupported complex type size %u\n"
msgstr ""
-#: nlmconv.c:282 srconv.c:2043
+#: nlmconv.c:269 srconv.c:1813
msgid "input and output files must be different"
msgstr ""
-#: nlmconv.c:329
+#: nlmconv.c:316
msgid "input file named both on command line and with INPUT"
msgstr ""
-#: nlmconv.c:338
+#: nlmconv.c:325
msgid "no input file"
msgstr ""
-#: nlmconv.c:368
+#: nlmconv.c:355
msgid "no name for output file"
msgstr ""
-#: nlmconv.c:382
+#: nlmconv.c:369
msgid "warning: input and output formats are not compatible"
msgstr ""
-#: nlmconv.c:411
+#: nlmconv.c:398
msgid "make .bss section"
msgstr ""
-#: nlmconv.c:420
+#: nlmconv.c:407
msgid "make .nlmsections section"
msgstr ""
-#: nlmconv.c:422
+#: nlmconv.c:409
msgid "set .nlmsections flags"
msgstr ""
-#: nlmconv.c:450
+#: nlmconv.c:437
msgid "set .bss vma"
msgstr ""
-#: nlmconv.c:457
+#: nlmconv.c:444
msgid "set .data size"
msgstr ""
-#: nlmconv.c:637
+#: nlmconv.c:624
#, c-format
msgid "warning: symbol %s imported but not in import list"
msgstr ""
-#: nlmconv.c:657
+#: nlmconv.c:644
msgid "set start address"
msgstr ""
-#: nlmconv.c:706
+#: nlmconv.c:693
#, c-format
msgid "warning: START procedure %s not defined"
msgstr ""
-#: nlmconv.c:708
+#: nlmconv.c:695
#, c-format
msgid "warning: EXIT procedure %s not defined"
msgstr ""
-#: nlmconv.c:710
+#: nlmconv.c:697
#, c-format
msgid "warning: CHECK procedure %s not defined"
msgstr ""
-#: nlmconv.c:731 nlmconv.c:920
+#: nlmconv.c:718 nlmconv.c:907
msgid "custom section"
msgstr ""
-#: nlmconv.c:752 nlmconv.c:949
+#: nlmconv.c:739 nlmconv.c:936
msgid "help section"
msgstr ""
-#: nlmconv.c:774 nlmconv.c:967
+#: nlmconv.c:761 nlmconv.c:954
msgid "message section"
msgstr ""
-#: nlmconv.c:790 nlmconv.c:1000
+#: nlmconv.c:777 nlmconv.c:987
msgid "module section"
msgstr ""
-#: nlmconv.c:810 nlmconv.c:1016
+#: nlmconv.c:797 nlmconv.c:1003
msgid "rpc section"
msgstr ""
#. There is no place to record this information.
-#: nlmconv.c:846
+#: nlmconv.c:833
#, c-format
msgid "%s: warning: shared libraries can not have uninitialized data"
msgstr ""
-#: nlmconv.c:867 nlmconv.c:1035
+#: nlmconv.c:854 nlmconv.c:1022
msgid "shared section"
msgstr ""
-#: nlmconv.c:875
+#: nlmconv.c:862
msgid "warning: No version number given"
msgstr ""
-#: nlmconv.c:915 nlmconv.c:944 nlmconv.c:962 nlmconv.c:1011 nlmconv.c:1030
+#: nlmconv.c:902 nlmconv.c:931 nlmconv.c:949 nlmconv.c:998 nlmconv.c:1017
#, c-format
msgid "%s: read: %s"
msgstr ""
-#: nlmconv.c:937
-msgid "warning: MAP and FULLMAP are not supported; try ld -M"
+#: nlmconv.c:924
+msgid "warning: FULLMAP is not supported; try ld -M"
msgstr ""
-#: nlmconv.c:1109
+#: nlmconv.c:1100
#, c-format
msgid "Usage: %s [option(s)] [in-file [out-file]]\n"
msgstr ""
-#: nlmconv.c:1110
+#: nlmconv.c:1101
+#, c-format
msgid " Convert an object file into a NetWare Loadable Module\n"
msgstr ""
-#: nlmconv.c:1111
+#: nlmconv.c:1102
+#, c-format
msgid ""
" The options are:\n"
" -I --input-target=<bfdname> Set the input binary file format\n"
@@ -1385,77 +2211,80 @@ msgid ""
" -T --header-file=<file> Read <file> for NLM header information\n"
" -l --linker=<linker> Use <linker> for any linking\n"
" -d --debug Display on stderr the linker command line\n"
+" @<file> Read options from <file>.\n"
" -h --help Display this information\n"
" -v --version Display the program's version\n"
msgstr ""
-#: nlmconv.c:1153
+#: nlmconv.c:1143
#, c-format
msgid "support not compiled in for %s"
msgstr ""
-#: nlmconv.c:1193
+#: nlmconv.c:1180
msgid "make section"
msgstr ""
-#: nlmconv.c:1207
+#: nlmconv.c:1194
msgid "set section size"
msgstr ""
-#: nlmconv.c:1213
+#: nlmconv.c:1200
msgid "set section alignment"
msgstr ""
-#: nlmconv.c:1217
+#: nlmconv.c:1204
msgid "set section flags"
msgstr ""
-#: nlmconv.c:1228
+#: nlmconv.c:1215
msgid "set .nlmsections size"
msgstr ""
-#: nlmconv.c:1316 nlmconv.c:1324 nlmconv.c:1333 nlmconv.c:1338
+#: nlmconv.c:1296 nlmconv.c:1304 nlmconv.c:1313 nlmconv.c:1318
msgid "set .nlmsection contents"
msgstr ""
-#: nlmconv.c:1839
+#: nlmconv.c:1797
msgid "stub section sizes"
msgstr ""
-#: nlmconv.c:1888
+#: nlmconv.c:1844
msgid "writing stub"
msgstr ""
-#: nlmconv.c:1977
+#: nlmconv.c:1928
#, c-format
msgid "unresolved PC relative reloc against %s"
msgstr ""
-#: nlmconv.c:2041
+#: nlmconv.c:1992
#, c-format
msgid "overflow when adjusting relocation against %s"
msgstr ""
-#: nlmconv.c:2158
+#: nlmconv.c:2119
#, c-format
msgid "%s: execution of %s failed: "
msgstr ""
-#: nlmconv.c:2173
+#: nlmconv.c:2134
#, c-format
msgid "Execution of %s failed"
msgstr ""
-#: nm.c:283 size.c:85 strings.c:657
+#: nm.c:224 size.c:82 strings.c:708
#, c-format
msgid "Usage: %s [option(s)] [file(s)]\n"
msgstr ""
-#: nm.c:284
+#: nm.c:225
+#, c-format
msgid " List symbols in [file(s)] (a.out by default).\n"
msgstr ""
-#: nm.c:285
+#: nm.c:226
+#, c-format
msgid ""
" The options are:\n"
" -a, --debug-syms Display debugger-only symbols\n"
@@ -1486,63 +2315,56 @@ msgid ""
" -S, --print-size Print size of defined symbols\n"
" -s, --print-armap Include index for symbols from archive members\n"
" --size-sort Sort symbols by size\n"
+" --special-syms Include special symbols in the output\n"
+" --synthetic Display synthetic symbols as well\n"
" -t, --radix=RADIX Use RADIX for printing symbol values\n"
" --target=BFDNAME Specify the target object format as BFDNAME\n"
" -u, --undefined-only Display only undefined symbols\n"
" -X 32_64 (ignored)\n"
+" @FILE Read options from FILE\n"
" -h, --help Display this information\n"
" -V, --version Display this program's version number\n"
"\n"
msgstr ""
-#: nm.c:319 objdump.c:250
+#: nm.c:263 objdump.c:236
#, c-format
msgid "Report bugs to %s.\n"
msgstr ""
-#: nm.c:352
+#: nm.c:295
#, c-format
msgid "%s: invalid radix"
msgstr ""
-#: nm.c:377
+#: nm.c:319
#, c-format
msgid "%s: invalid output format"
msgstr ""
-#: nm.c:494
-msgid "Only -X 32_64 is supported"
-msgstr ""
-
-#: nm.c:514
-msgid "Using the --size-sort and --undefined-only options together"
-msgstr ""
-
-#: nm.c:515
-msgid "will produce no output, since undefined symbols have no size."
-msgstr ""
-
-#: nm.c:543
-#, c-format
-msgid "data size %ld"
-msgstr ""
-
-#: nm.c:568 readelf.c:5809 readelf.c:5845
+#: nm.c:340 readelf.c:6623 readelf.c:6659
#, c-format
msgid "<processor specific>: %d"
msgstr ""
-#: nm.c:570 readelf.c:5811 readelf.c:5857
+#: nm.c:342 readelf.c:6626 readelf.c:6671
#, c-format
msgid "<OS specific>: %d"
msgstr ""
-#: nm.c:572 readelf.c:5813 readelf.c:5860
+#: nm.c:344 readelf.c:6628 readelf.c:6674
#, c-format
msgid "<unknown>: %d"
msgstr ""
-#: nm.c:1376
+#: nm.c:381
+#, c-format
+msgid ""
+"\n"
+"Archive index:\n"
+msgstr ""
+
+#: nm.c:1227
#, c-format
msgid ""
"\n"
@@ -1551,7 +2373,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1378
+#: nm.c:1229
#, c-format
msgid ""
"\n"
@@ -1560,21 +2382,23 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1380 nm.c:1438
+#: nm.c:1231 nm.c:1282
+#, c-format
msgid ""
"Name Value Class Type Size Line "
"Section\n"
"\n"
msgstr ""
-#: nm.c:1383 nm.c:1441
+#: nm.c:1234 nm.c:1285
+#, c-format
msgid ""
"Name Value Class Type "
"Size Line Section\n"
"\n"
msgstr ""
-#: nm.c:1434
+#: nm.c:1278
#, c-format
msgid ""
"\n"
@@ -1583,7 +2407,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1436
+#: nm.c:1280
#, c-format
msgid ""
"\n"
@@ -1592,26 +2416,40 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1658
-msgid ""
-"\n"
-"Archive index:\n"
+#: nm.c:1584
+msgid "Only -X 32_64 is supported"
+msgstr ""
+
+#: nm.c:1604
+msgid "Using the --size-sort and --undefined-only options together"
+msgstr ""
+
+#: nm.c:1605
+msgid "will produce no output, since undefined symbols have no size."
+msgstr ""
+
+#: nm.c:1633
+#, c-format
+msgid "data size %ld"
msgstr ""
-#: objcopy.c:414 srconv.c:1952
+#: objcopy.c:401 srconv.c:1721
#, c-format
msgid "Usage: %s [option(s)] in-file [out-file]\n"
msgstr ""
-#: objcopy.c:415
+#: objcopy.c:402
+#, c-format
msgid " Copies a binary file, possibly transforming it in the process\n"
msgstr ""
-#: objcopy.c:416 objcopy.c:495
+#: objcopy.c:403 objcopy.c:495
+#, c-format
msgid " The options are:\n"
msgstr ""
-#: objcopy.c:417
+#: objcopy.c:404
+#, c-format
msgid ""
" -I --input-target <bfdname> Assume input file is in format <bfdname>\n"
" -O --output-target <bfdname> Create an output file in format "
@@ -1634,14 +2472,23 @@ msgid ""
" --strip-unneeded Remove all symbols not needed by "
"relocations\n"
" -N --strip-symbol <name> Do not copy symbol <name>\n"
-" -K --keep-symbol <name> Only copy symbol <name>\n"
+" --strip-unneeded-symbol <name>\n"
+" Do not copy symbol <name> unless needed "
+"by\n"
+" relocations\n"
+" --only-keep-debug Strip everything but the debug "
+"information\n"
+" -K --keep-symbol <name> Do not strip symbol <name>\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"
" -W --weaken-symbol <name> Force symbol <name> to be marked as a "
"weak\n"
" --weaken Force all global symbols to be marked as "
"weak\n"
+" -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"
" -i --interleave <number> Only copy one out of every <number> "
@@ -1686,11 +2533,20 @@ msgid ""
" --srec-forceS3 Restrict the type of generated Srecords "
"to S3\n"
" --strip-symbols <file> -N for all symbols listed in <file>\n"
+" --strip-unneeded-symbols <file>\n"
+" --strip-unneeded-symbol for all symbols "
+"listed\n"
+" in <file>\n"
" --keep-symbols <file> -K for all symbols listed in <file>\n"
" --localize-symbols <file> -L for all symbols listed in <file>\n"
+" --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"
+" --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"
+" --impure Mark the output file as impure\n"
" --prefix-symbols <prefix> Add <prefix> to start of every symbol "
"name\n"
" --prefix-sections <prefix> Add <prefix> to start of every section "
@@ -1700,6 +2556,7 @@ msgid ""
"allocatable\n"
" section name\n"
" -v --verbose List all object files modified\n"
+" @<file> Read options from <file>\n"
" -V --version Display this program's version number\n"
" -h --help Display this output\n"
" --info List object formats & architectures "
@@ -1712,10 +2569,12 @@ msgid "Usage: %s <option(s)> in-file(s)\n"
msgstr ""
#: objcopy.c:494
+#, c-format
msgid " Removes symbols and sections from files\n"
msgstr ""
#: objcopy.c:496
+#, c-format
msgid ""
" -I --input-target=<bfdname> Assume input file is in format <bfdname>\n"
" -O --output-target=<bfdname> Create an output file in format "
@@ -1730,8 +2589,11 @@ msgid ""
" -g -S -d --strip-debug Remove all debugging symbols & sections\n"
" --strip-unneeded Remove all symbols not needed by "
"relocations\n"
+" --only-keep-debug Strip everything but the debug "
+"information\n"
" -N --strip-symbol=<name> Do not copy symbol <name>\n"
-" -K --keep-symbol=<name> Only copy symbol <name>\n"
+" -K --keep-symbol=<name> Do not strip symbol <name>\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"
" -v --verbose List all object files modified\n"
@@ -1742,234 +2604,261 @@ msgid ""
" -o <file> Place stripped output into <file>\n"
msgstr ""
-#: objcopy.c:567
+#: objcopy.c:568
#, c-format
msgid "unrecognized section flag `%s'"
msgstr ""
-#: objcopy.c:568
+#: objcopy.c:569
#, c-format
msgid "supported flags: %s"
msgstr ""
-#: objcopy.c:645 objcopy.c:2526
-#, c-format
-msgid "cannot stat: %s: %s"
-msgstr ""
-
-#: objcopy.c:652 objcopy.c:2544
+#: objcopy.c:646
#, c-format
-msgid "cannot open: %s: %s"
+msgid "cannot open '%s': %s"
msgstr ""
-#: objcopy.c:655 objcopy.c:2548
+#: objcopy.c:649 objcopy.c:2722
#, c-format
msgid "%s: fread failed"
msgstr ""
-#: objcopy.c:728
+#: objcopy.c:722
#, c-format
-msgid "Ignoring rubbish found on line %d of %s"
+msgid "%s:%d: Ignoring rubbish found on this line"
msgstr ""
-#: objcopy.c:979
+#: objcopy.c:996
#, c-format
msgid "%s: Multiple redefinition of symbol \"%s\""
msgstr ""
-#: objcopy.c:983
+#: objcopy.c:1000
#, c-format
msgid "%s: Symbol \"%s\" is target of more than one redefinition"
msgstr ""
-#: objcopy.c:1010
+#: objcopy.c:1028
#, c-format
msgid "couldn't open symbol redefinition file %s (error: %s)"
msgstr ""
-#: objcopy.c:1088
+#: objcopy.c:1106
+#, c-format
+msgid "%s:%d: garbage found at end of line"
+msgstr ""
+
+#: objcopy.c:1109
#, c-format
-msgid "%s: garbage at end of line %d"
+msgid "%s:%d: missing new symbol name"
msgstr ""
-#: objcopy.c:1091
+#: objcopy.c:1119
#, c-format
-msgid "%s: missing new symbol name at line %d"
+msgid "%s:%d: premature end of file"
msgstr ""
-#: objcopy.c:1101
+#: objcopy.c:1145
#, c-format
-msgid "%s: premature end of file at line %d"
+msgid "stat returns negative size for `%s'"
msgstr ""
-#: objcopy.c:1147
+#: objcopy.c:1157
+#, c-format
+msgid "copy from `%s' [unknown] to `%s' [unknown]\n"
+msgstr ""
+
+#: objcopy.c:1212
msgid "Unable to change endianness of input file(s)"
msgstr ""
-#: objcopy.c:1155
+#: objcopy.c:1221
+#, c-format
+msgid "copy from `%s' [%s] to `%s' [%s]\n"
+msgstr ""
+
+#: objcopy.c:1258 objcopy.c:1715
#, c-format
-msgid "copy from %s(%s) to %s(%s)\n"
+msgid "Unable to recognise the format of the input file `%s'"
msgstr ""
-#: objcopy.c:1182
+#: objcopy.c:1261
#, c-format
-msgid "Warning: Output file cannot represent architecture %s"
+msgid "Warning: Output file cannot represent architecture `%s'"
msgstr ""
-#: objcopy.c:1211
+#: objcopy.c:1305
#, c-format
msgid "can't create section `%s': %s"
msgstr ""
-#: objcopy.c:1304
+#: objcopy.c:1356
+msgid "there are no sections to be copied!"
+msgstr ""
+
+#: objcopy.c:1402
#, c-format
msgid "Can't fill gap after %s: %s"
msgstr ""
-#: objcopy.c:1329
+#: objcopy.c:1427
#, c-format
msgid "Can't add padding to %s: %s"
msgstr ""
-#: objcopy.c:1485
+#: objcopy.c:1594
#, c-format
msgid "%s: error copying private BFD data: %s"
msgstr ""
-#: objcopy.c:1498
+#: objcopy.c:1605
msgid "unknown alternate machine code, ignored"
msgstr ""
-#: objcopy.c:1531 objcopy.c:1561
+#: objcopy.c:1635 objcopy.c:1665
#, c-format
msgid "cannot mkdir %s for archive copying (error: %s)"
msgstr ""
-#: objcopy.c:1749
+#: objcopy.c:1787
+#, c-format
+msgid "error: the input file '%s' is empty"
+msgstr ""
+
+#: objcopy.c:1889
#, c-format
msgid "Multiple renames of section %s"
msgstr ""
-#: objcopy.c:1840
+#: objcopy.c:1940
+msgid "private header data"
+msgstr ""
+
+#: objcopy.c:1948
+#, c-format
+msgid "%s: error in %s: %s"
+msgstr ""
+
+#: objcopy.c:2007
msgid "making"
msgstr ""
-#: objcopy.c:1849
+#: objcopy.c:2022
msgid "size"
msgstr ""
-#: objcopy.c:1863
+#: objcopy.c:2036
msgid "vma"
msgstr ""
-#: objcopy.c:1888
+#: objcopy.c:2061
msgid "alignment"
msgstr ""
-#: objcopy.c:1896
-msgid "flags"
-msgstr ""
-
-#: objcopy.c:1918
+#: objcopy.c:2083
msgid "private data"
msgstr ""
-#: objcopy.c:1926
+#: objcopy.c:2091
#, c-format
msgid "%s: section `%s': error in %s: %s"
msgstr ""
-#: objcopy.c:2199
+#: objcopy.c:2363
#, c-format
msgid "%s: can't create debugging section: %s"
msgstr ""
-#: objcopy.c:2214
+#: objcopy.c:2377
#, c-format
msgid "%s: can't set debugging section contents: %s"
msgstr ""
-#: objcopy.c:2223
+#: objcopy.c:2386
#, c-format
msgid "%s: don't know how to write debugging information for %s"
msgstr ""
-#: objcopy.c:2346
-#, c-format
-msgid "%s: cannot stat: %s"
-msgstr ""
-
-#: objcopy.c:2400
+#: objcopy.c:2561
msgid "byte number must be non-negative"
msgstr ""
-#: objcopy.c:2410
+#: objcopy.c:2571
msgid "interleave must be positive"
msgstr ""
-#: objcopy.c:2430 objcopy.c:2438
+#: objcopy.c:2591 objcopy.c:2599
#, c-format
msgid "%s both copied and removed"
msgstr ""
-#: objcopy.c:2523 objcopy.c:2593 objcopy.c:2693 objcopy.c:2724 objcopy.c:2748
-#: objcopy.c:2752 objcopy.c:2772
+#: objcopy.c:2696 objcopy.c:2767 objcopy.c:2867 objcopy.c:2898 objcopy.c:2922
+#: objcopy.c:2926 objcopy.c:2946
#, c-format
msgid "bad format for %s"
msgstr ""
-#: objcopy.c:2662
+#: objcopy.c:2717
+#, c-format
+msgid "cannot open: %s: %s"
+msgstr ""
+
+#: objcopy.c:2836
#, c-format
msgid "Warning: truncating gap-fill from 0x%s to 0x%x"
msgstr ""
-#: objcopy.c:2818
+#: objcopy.c:3000
msgid "alternate machine code index must be positive"
msgstr ""
-#: objcopy.c:2856
+#: objcopy.c:3058
msgid "byte number must be less than interleave"
msgstr ""
-#: objcopy.c:2883
+#: objcopy.c:3088
#, c-format
msgid "architecture %s unknown"
msgstr ""
-#: objcopy.c:2887
+#: objcopy.c:3092
msgid ""
"Warning: input target 'binary' required for binary architecture parameter."
msgstr ""
-#: objcopy.c:2888
+#: objcopy.c:3093
#, c-format
msgid " Argument %s ignored"
msgstr ""
-#: objcopy.c:2894
+#: objcopy.c:3099
#, c-format
-msgid "Cannot stat: %s: %s"
+msgid "warning: could not locate '%s'. System error message: %s"
msgstr ""
-#: objcopy.c:2934 objcopy.c:2948
+#: objcopy.c:3141 objcopy.c:3155
#, c-format
msgid "%s %s%c0x%s never used"
msgstr ""
-#: objdump.c:197
+#: objdump.c:178
#, c-format
msgid "Usage: %s <option(s)> <file(s)>\n"
msgstr ""
-#: objdump.c:198
+#: objdump.c:179
+#, c-format
msgid " Display information from object <file(s)>.\n"
msgstr ""
-#: objdump.c:199
+#: objdump.c:180
+#, c-format
msgid " At least one of the following switches must be given:\n"
msgstr ""
-#: objdump.c:200
+#: objdump.c:181
+#, c-format
msgid ""
" -a, --archive-headers Display archive header information\n"
" -f, --file-headers Display the contents of the overall file header\n"
@@ -1984,24 +2873,29 @@ msgid ""
" -s, --full-contents Display the full contents of all sections "
"requested\n"
" -g, --debugging Display debug information in object file\n"
+" -e, --debugging-tags Display debug information using ctags style\n"
" -G, --stabs Display (in raw form) any STABS info in the file\n"
+" -W, --dwarf Display DWARF info in the file\n"
" -t, --syms Display the contents of the symbol table(s)\n"
" -T, --dynamic-syms Display the contents of the dynamic symbol table\n"
" -r, --reloc Display the relocation entries in the file\n"
" -R, --dynamic-reloc Display the dynamic relocation entries in the "
"file\n"
+" @<file> Read options from <file>\n"
" -v, --version Display this program's version number\n"
" -i, --info List object formats and architectures supported\n"
" -H, --help Display this information\n"
msgstr ""
-#: objdump.c:222
+#: objdump.c:206
+#, c-format
msgid ""
"\n"
" The following switches are optional:\n"
msgstr ""
-#: objdump.c:223
+#: objdump.c:207
+#, c-format
msgid ""
" -b, --target=BFDNAME Specify the target object format as "
"BFDNAME\n"
@@ -2014,6 +2908,7 @@ msgid ""
"disassembling\n"
" --file-start-context Include context from start of file (with -"
"S)\n"
+" -I, --include=DIR Add DIR to search list for source files\n"
" -l, --line-numbers Include line numbers and filenames in "
"output\n"
" -C, --demangle[=STYLE] Decode mangled/processed symbol names\n"
@@ -2032,325 +2927,352 @@ msgid ""
" --[no-]show-raw-insn Display hex alongside symbolic disassembly\n"
" --adjust-vma=OFFSET Add OFFSET to all displayed section "
"addresses\n"
+" --special-syms Include special symbols in symbol dumps\n"
"\n"
msgstr ""
-#: objdump.c:391
+#: objdump.c:389
+#, c-format
msgid "Sections:\n"
msgstr ""
-#: objdump.c:394 objdump.c:398
+#: objdump.c:392 objdump.c:396
+#, c-format
msgid "Idx Name Size VMA LMA File off Algn"
msgstr ""
-#: objdump.c:400
+#: objdump.c:398
+#, c-format
msgid ""
"Idx Name Size VMA LMA File off "
"Algn"
msgstr ""
-#: objdump.c:404
+#: objdump.c:402
+#, c-format
msgid " Flags"
msgstr ""
-#: objdump.c:406
+#: objdump.c:404
+#, c-format
msgid " Pg"
msgstr ""
-#: objdump.c:451
+#: objdump.c:447
#, c-format
msgid "%s: not a dynamic object"
msgstr ""
-#: objdump.c:1144
-msgid "Out of virtual memory"
+#: objdump.c:1735
+#, c-format
+msgid "Disassembly of section %s:\n"
msgstr ""
-#: objdump.c:1574
+#: objdump.c:1897
#, c-format
msgid "Can't use supplied machine %s"
msgstr ""
-#: objdump.c:1592
+#: objdump.c:1916
#, c-format
msgid "Can't disassemble for architecture %s\n"
msgstr ""
-#: objdump.c:1682
+#: objdump.c:2006
#, c-format
-msgid "Disassembly of section %s:\n"
+msgid ""
+"\n"
+"Can't get contents for section '%s'.\n"
msgstr ""
-#: objdump.c:1847
+#: objdump.c:2143
#, c-format
msgid ""
"No %s section present\n"
"\n"
msgstr ""
-#: objdump.c:1854
-#, c-format
-msgid "%s has no %s section"
-msgstr ""
-
-#: objdump.c:1868
+#: objdump.c:2152
#, c-format
msgid "Reading %s section of %s failed: %s"
msgstr ""
-#: objdump.c:1880
-#, c-format
-msgid "Reading %s section of %s failed: %s\n"
-msgstr ""
-
-#: objdump.c:1923
+#: objdump.c:2196
#, c-format
msgid ""
"Contents of %s section:\n"
"\n"
msgstr ""
-#: objdump.c:2021
+#: objdump.c:2323
#, c-format
msgid "architecture: %s, "
msgstr ""
-#: objdump.c:2024
+#: objdump.c:2326
#, c-format
msgid "flags 0x%08x:\n"
msgstr ""
-#: objdump.c:2038
+#: objdump.c:2340
+#, c-format
msgid ""
"\n"
"start address 0x"
msgstr ""
-#: objdump.c:2071
+#: objdump.c:2380
#, c-format
-msgid ""
-"\n"
-"%s: file format %s\n"
+msgid "Contents of section %s:\n"
msgstr ""
-#: objdump.c:2111
+#: objdump.c:2505
#, c-format
-msgid "%s: printing debugging information failed"
+msgid "no symbols\n"
msgstr ""
-#: objdump.c:2190
+#: objdump.c:2512
#, c-format
-msgid "In archive %s:\n"
+msgid "no information for symbol number %ld\n"
msgstr ""
-#: objdump.c:2249
+#: objdump.c:2515
#, c-format
-msgid "Contents of section %s:\n"
+msgid "could not determine the type of symbol number %ld\n"
msgstr ""
-#: objdump.c:2369
-msgid "no symbols\n"
+#: objdump.c:2788
+#, c-format
+msgid ""
+"\n"
+"%s: file format %s\n"
+msgstr ""
+
+#: objdump.c:2845
+#, c-format
+msgid "%s: printing debugging information failed"
+msgstr ""
+
+#: objdump.c:2936
+#, c-format
+msgid "In archive %s:\n"
msgstr ""
-#: objdump.c:2718
+#: objdump.c:3058
msgid "unrecognized -E option"
msgstr ""
-#: objdump.c:2729
+#: objdump.c:3069
#, c-format
msgid "unrecognized --endian type `%s'"
msgstr ""
-#: rdcoff.c:206
+#: rdcoff.c:196
#, c-format
msgid "parse_coff_type: Bad type code 0x%x"
msgstr ""
-#: rdcoff.c:424 rdcoff.c:532 rdcoff.c:731
+#: rdcoff.c:404 rdcoff.c:509 rdcoff.c:697
#, c-format
msgid "bfd_coff_get_syment failed: %s"
msgstr ""
-#: rdcoff.c:440 rdcoff.c:751
+#: rdcoff.c:420 rdcoff.c:717
#, c-format
msgid "bfd_coff_get_auxent failed: %s"
msgstr ""
-#: rdcoff.c:818
+#: rdcoff.c:784
#, c-format
msgid "%ld: .bf without preceding function"
msgstr ""
-#: rdcoff.c:868
+#: rdcoff.c:834
#, c-format
msgid "%ld: unexpected .ef\n"
msgstr ""
-#: rddbg.c:91
+#: rddbg.c:85
#, c-format
msgid "%s: no recognized debugging information"
msgstr ""
-#: rddbg.c:415
-msgid "Last stabs entries before error:\n"
-msgstr ""
-
-#: readelf.c:455
-#, c-format
-msgid "%s: Error: "
-msgstr ""
-
-#: readelf.c:466
-#, c-format
-msgid "%s: Warning: "
-msgstr ""
-
-#: readelf.c:488
+#: rddbg.c:394
#, c-format
-msgid "Unable to seek to 0x%x for %s\n"
+msgid "Last stabs entries before error:\n"
msgstr ""
-#: readelf.c:499
+#: readelf.c:264
#, c-format
-msgid "Out of memory allocating 0x%x bytes for %s\n"
+msgid "Unable to seek to 0x%lx for %s\n"
msgstr ""
-#: readelf.c:507
+#: readelf.c:279
#, c-format
-msgid "Unable to read in 0x%x bytes of %s\n"
+msgid "Out of memory allocating 0x%lx bytes for %s\n"
msgstr ""
-#: readelf.c:560 readelf.c:614 readelf.c:798 readelf.c:833
+#: readelf.c:289
#, c-format
-msgid "Unhandled data length: %d\n"
+msgid "Unable to read in 0x%lx bytes of %s\n"
msgstr ""
-#: readelf.c:924
+#: readelf.c:623
msgid "Don't know about relocations on this machine architecture\n"
msgstr ""
-#: readelf.c:946 readelf.c:975 readelf.c:1021 readelf.c:1049
+#: readelf.c:643 readelf.c:671 readelf.c:715 readelf.c:743
msgid "relocs"
msgstr ""
-#: readelf.c:957 readelf.c:986 readelf.c:1031 readelf.c:1059
+#: readelf.c:654 readelf.c:682 readelf.c:726 readelf.c:754
msgid "out of memory parsing relocs"
msgstr ""
-#: readelf.c:1112
+#: readelf.c:808
+#, c-format
msgid ""
" Offset Info Type Sym. Value Symbol's Name + Addend\n"
msgstr ""
-#: readelf.c:1114
+#: readelf.c:810
+#, c-format
msgid " Offset Info Type Sym.Value Sym. Name + Addend\n"
msgstr ""
-#: readelf.c:1119
+#: readelf.c:815
+#, c-format
msgid " Offset Info Type Sym. Value Symbol's Name\n"
msgstr ""
-#: readelf.c:1121
+#: readelf.c:817
+#, c-format
msgid " Offset Info Type Sym.Value Sym. Name\n"
msgstr ""
-#: readelf.c:1129
+#: readelf.c:825
+#, c-format
msgid ""
" Offset Info Type Symbol's Value "
"Symbol's Name + Addend\n"
msgstr ""
-#: readelf.c:1131
+#: readelf.c:827
+#, c-format
msgid ""
" Offset Info Type Sym. Value Sym. Name + "
"Addend\n"
msgstr ""
-#: readelf.c:1136
+#: readelf.c:832
+#, c-format
msgid ""
" Offset Info Type Symbol's Value "
"Symbol's Name\n"
msgstr ""
-#: readelf.c:1138
+#: readelf.c:834
+#, c-format
msgid ""
" Offset Info Type Sym. Value Sym. Name\n"
msgstr ""
-#: readelf.c:1414 readelf.c:1416 readelf.c:1492 readelf.c:1494 readelf.c:1503
-#: readelf.c:1505
+#: readelf.c:1127 readelf.c:1129 readelf.c:1238 readelf.c:1240 readelf.c:1249
+#: readelf.c:1251
#, c-format
msgid "unrecognized: %-7lx"
msgstr ""
-#: readelf.c:1466
+#: readelf.c:1154
#, c-format
-msgid "<string table index %3ld>"
+msgid "<unknown addend: %lx>"
msgstr ""
-#: readelf.c:1743
+#: readelf.c:1210
+#, c-format
+msgid "<string table index: %3ld>"
+msgstr ""
+
+#: readelf.c:1212
+#, c-format
+msgid "<corrupt string table index: %3ld>"
+msgstr ""
+
+#: readelf.c:1522
#, c-format
msgid "Processor Specific: %lx"
msgstr ""
-#: readelf.c:1762
+#: readelf.c:1543
#, c-format
msgid "Operating System specific: %lx"
msgstr ""
-#: readelf.c:1765 readelf.c:2417
+#: readelf.c:1547 readelf.c:2349
#, c-format
msgid "<unknown>: %lx"
msgstr ""
-#: readelf.c:1779
+#: readelf.c:1560
msgid "NONE (None)"
msgstr ""
-#: readelf.c:1780
+#: readelf.c:1561
msgid "REL (Relocatable file)"
msgstr ""
-#: readelf.c:1781
+#: readelf.c:1562
msgid "EXEC (Executable file)"
msgstr ""
-#: readelf.c:1782
+#: readelf.c:1563
msgid "DYN (Shared object file)"
msgstr ""
-#: readelf.c:1783
+#: readelf.c:1564
msgid "CORE (Core file)"
msgstr ""
-#: readelf.c:1787
+#: readelf.c:1568
#, c-format
msgid "Processor Specific: (%x)"
msgstr ""
-#: readelf.c:1789
+#: readelf.c:1570
#, c-format
msgid "OS Specific: (%x)"
msgstr ""
-#: readelf.c:1791 readelf.c:1898 readelf.c:2574
+#: readelf.c:1572 readelf.c:1681 readelf.c:2541
#, c-format
msgid "<unknown>: %x"
msgstr ""
-#: readelf.c:1804
+#: readelf.c:1584
msgid "None"
msgstr ""
-#: readelf.c:2616
+#: readelf.c:2186
+msgid "Standalone App"
+msgstr ""
+
+#: readelf.c:2189 readelf.c:2948 readelf.c:2964
+#, c-format
+msgid "<unknown: %x>"
+msgstr ""
+
+#: readelf.c:2586
+#, c-format
msgid "Usage: readelf <option(s)> elf-file(s)\n"
msgstr ""
-#: readelf.c:2617
+#: readelf.c:2587
+#, c-format
msgid " Display information about the contents of ELF format files\n"
msgstr ""
-#: readelf.c:2618
+#: readelf.c:2588
+#, c-format
msgid ""
" Options are:\n"
" -a --all Equivalent to: -h -l -S -s -r -d -V -A -I\n"
@@ -2359,354 +3281,421 @@ msgid ""
" --segments An alias for --program-headers\n"
" -S --section-headers Display the sections' header\n"
" --sections An alias for --section-headers\n"
+" -g --section-groups Display the section groups\n"
+" -t --section-details Display the section details\n"
" -e --headers Equivalent to: -h -l -S\n"
" -s --syms Display the symbol table\n"
" --symbols An alias for --syms\n"
" -n --notes Display the core notes (if present)\n"
" -r --relocs Display the relocations (if present)\n"
" -u --unwind Display the unwind info (if present)\n"
-" -d --dynamic Display the dynamic segment (if present)\n"
+" -d --dynamic Display the dynamic section (if present)\n"
" -V --version-info Display the version sections (if present)\n"
" -A --arch-specific Display architecture specific information (if "
"any).\n"
" -D --use-dynamic Use the dynamic section info when displaying "
"symbols\n"
" -x --hex-dump=<number> Dump the contents of section <number>\n"
-" -w[liaprmfFso] or\n"
-" --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,"
-"=loc]\n"
+" -w[liaprmfFsoR] or\n"
+" --debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=str,"
+"=loc,=Ranges]\n"
" Display the contents of DWARF2 debug sections\n"
msgstr ""
-#: readelf.c:2640
+#: readelf.c:2612
+#, c-format
msgid ""
" -i --instruction-dump=<number>\n"
" Disassemble the contents of section <number>\n"
msgstr ""
-#: readelf.c:2644
+#: readelf.c:2616
+#, c-format
msgid ""
" -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"
msgstr ""
-#: readelf.c:2666 readelf.c:10765
+#: readelf.c:2642 readelf.c:9180
msgid "Out of memory allocating dump request table."
msgstr ""
-#: readelf.c:2830 readelf.c:2906
+#: readelf.c:2816 readelf.c:2884
#, c-format
msgid "Unrecognized debug option '%s'\n"
msgstr ""
-#: readelf.c:2940
+#: readelf.c:2918
#, c-format
msgid "Invalid option '-%c'\n"
msgstr ""
-#: readelf.c:2953
+#: readelf.c:2932
msgid "Nothing to do.\n"
msgstr ""
-#: readelf.c:2966 readelf.c:2983 readelf.c:5366
+#: readelf.c:2944 readelf.c:2960 readelf.c:6169
msgid "none"
msgstr ""
-#: readelf.c:2970 readelf.c:2987 readelf.c:3018
-#, c-format
-msgid "<unknown: %x>"
-msgstr ""
-
-#: readelf.c:2984
+#: readelf.c:2961
msgid "2's complement, little endian"
msgstr ""
-#: readelf.c:2985
+#: readelf.c:2962
msgid "2's complement, big endian"
msgstr ""
-#: readelf.c:3015
-msgid "Standalone App"
-msgstr ""
-
-#: readelf.c:3034
+#: readelf.c:2980
msgid "Not an ELF file - it has the wrong magic bytes at the start\n"
msgstr ""
-#: readelf.c:3042
+#: readelf.c:2988
+#, c-format
msgid "ELF Header:\n"
msgstr ""
-#: readelf.c:3043
+#: readelf.c:2989
+#, c-format
msgid " Magic: "
msgstr ""
-#: readelf.c:3047
+#: readelf.c:2993
#, c-format
msgid " Class: %s\n"
msgstr ""
-#: readelf.c:3049
+#: readelf.c:2995
#, c-format
msgid " Data: %s\n"
msgstr ""
-#: readelf.c:3051
+#: readelf.c:2997
#, c-format
msgid " Version: %d %s\n"
msgstr ""
-#: readelf.c:3058
+#: readelf.c:3004
#, c-format
msgid " OS/ABI: %s\n"
msgstr ""
-#: readelf.c:3060
+#: readelf.c:3006
#, c-format
msgid " ABI Version: %d\n"
msgstr ""
-#: readelf.c:3062
+#: readelf.c:3008
#, c-format
msgid " Type: %s\n"
msgstr ""
-#: readelf.c:3064
+#: readelf.c:3010
#, c-format
msgid " Machine: %s\n"
msgstr ""
-#: readelf.c:3066
+#: readelf.c:3012
#, c-format
msgid " Version: 0x%lx\n"
msgstr ""
-#: readelf.c:3069
+#: readelf.c:3015
+#, c-format
msgid " Entry point address: "
msgstr ""
-#: readelf.c:3071
+#: readelf.c:3017
+#, c-format
msgid ""
"\n"
" Start of program headers: "
msgstr ""
-#: readelf.c:3073
+#: readelf.c:3019
+#, c-format
msgid ""
" (bytes into file)\n"
" Start of section headers: "
msgstr ""
-#: readelf.c:3075
+#: readelf.c:3021
+#, c-format
msgid " (bytes into file)\n"
msgstr ""
-#: readelf.c:3077
+#: readelf.c:3023
#, c-format
msgid " Flags: 0x%lx%s\n"
msgstr ""
-#: readelf.c:3080
+#: readelf.c:3026
#, c-format
msgid " Size of this header: %ld (bytes)\n"
msgstr ""
-#: readelf.c:3082
+#: readelf.c:3028
#, c-format
msgid " Size of program headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:3084
+#: readelf.c:3030
#, c-format
msgid " Number of program headers: %ld\n"
msgstr ""
-#: readelf.c:3086
+#: readelf.c:3032
#, c-format
msgid " Size of section headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:3088
+#: readelf.c:3034
#, c-format
msgid " Number of section headers: %ld"
msgstr ""
-#: readelf.c:3093
+#: readelf.c:3039
#, c-format
msgid " Section header string table index: %ld"
msgstr ""
-#: readelf.c:3127 readelf.c:3163
+#: readelf.c:3070 readelf.c:3103
msgid "program headers"
msgstr ""
-#: readelf.c:3203 readelf.c:3480 readelf.c:3526 readelf.c:3589 readelf.c:3656
-#: readelf.c:4715 readelf.c:4758 readelf.c:4948 readelf.c:5917 readelf.c:5931
-#: readelf.c:10411
+#: 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
msgid "Out of memory\n"
msgstr ""
-#: readelf.c:3231
+#: readelf.c:3168
+#, c-format
msgid ""
"\n"
"There are no program headers in this file.\n"
msgstr ""
-#: readelf.c:3237
+#: readelf.c:3174
#, c-format
msgid ""
"\n"
"Elf file type is %s\n"
msgstr ""
-#: readelf.c:3238
+#: readelf.c:3175
+#, c-format
msgid "Entry point "
msgstr ""
-#: readelf.c:3240
+#: readelf.c:3177
#, c-format
msgid ""
"\n"
"There are %d program headers, starting at offset "
msgstr ""
-#: readelf.c:3252 readelf.c:3254
+#: readelf.c:3189 readelf.c:3191
+#, c-format
msgid ""
"\n"
"Program Headers:\n"
msgstr ""
-#: readelf.c:3258
+#: readelf.c:3195
+#, c-format
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n"
msgstr ""
-#: readelf.c:3261
+#: readelf.c:3198
+#, c-format
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz "
"MemSiz Flg Align\n"
msgstr ""
-#: readelf.c:3265
+#: readelf.c:3202
+#, c-format
msgid " Type Offset VirtAddr PhysAddr\n"
msgstr ""
-#: readelf.c:3267
+#: readelf.c:3204
+#, c-format
msgid " FileSiz MemSiz Flags Align\n"
msgstr ""
-#: readelf.c:3360
+#: readelf.c:3297
msgid "more than one dynamic segment\n"
msgstr ""
-#: readelf.c:3368
+#: readelf.c:3308
+msgid "no .dynamic section in the dynamic segment"
+msgstr ""
+
+#: readelf.c:3317
+msgid "the .dynamic section is not contained within the dynamic segment"
+msgstr ""
+
+#: readelf.c:3319
+msgid "the .dynamic section is not the first section in the dynamic segment."
+msgstr ""
+
+#: readelf.c:3333
msgid "Unable to find program interpreter name\n"
msgstr ""
-#: readelf.c:3375
+#: readelf.c:3340
#, c-format
msgid ""
"\n"
" [Requesting program interpreter: %s]"
msgstr ""
-#: readelf.c:3387
+#: readelf.c:3352
+#, c-format
msgid ""
"\n"
" Section to Segment mapping:\n"
msgstr ""
-#: readelf.c:3388
+#: readelf.c:3353
+#, c-format
msgid " Segment Sections...\n"
msgstr ""
-#: readelf.c:3437
+#: readelf.c:3402
msgid "Cannot interpret virtual addresses without program headers.\n"
msgstr ""
-#: readelf.c:3453
+#: readelf.c:3418
#, c-format
msgid "Virtual address 0x%lx not located in any PT_LOAD segment.\n"
msgstr ""
-#: readelf.c:3471 readelf.c:3517
+#: readelf.c:3432 readelf.c:3473
msgid "section headers"
msgstr ""
-#: readelf.c:3565 readelf.c:3632
+#: readelf.c:3517 readelf.c:3580
msgid "symbols"
msgstr ""
-#: readelf.c:3576 readelf.c:3643
+#: readelf.c:3527 readelf.c:3590
msgid "symtab shndx"
msgstr ""
-#: readelf.c:3745
+#: readelf.c:3817 readelf.c:4192
+#, c-format
msgid ""
"\n"
"There are no sections in this file.\n"
msgstr ""
-#: readelf.c:3751
+#: readelf.c:3823
#, c-format
msgid "There are %d section headers, starting at offset 0x%lx:\n"
msgstr ""
-#: readelf.c:3768 readelf.c:4098 readelf.c:4433 readelf.c:6070
+#: readelf.c:3842 readelf.c:4309 readelf.c:4544 readelf.c:4852 readelf.c:5267
+#: readelf.c:6906
msgid "string table"
msgstr ""
-#: readelf.c:3793
+#: readelf.c:3881
+#, c-format
+msgid "Section %d has invalid sh_entsize %lx (expected %lx)\n"
+msgstr ""
+
+#: readelf.c:3901
msgid "File contains multiple dynamic symbol tables\n"
msgstr ""
-#: readelf.c:3805
+#: readelf.c:3914
msgid "File contains multiple dynamic string tables\n"
msgstr ""
-#: readelf.c:3811
+#: readelf.c:3919
msgid "dynamic strings"
msgstr ""
-#: readelf.c:3817
+#: readelf.c:3926
msgid "File contains multiple symtab shndx tables\n"
msgstr ""
-#: readelf.c:3855
+#: readelf.c:3973
+#, c-format
msgid ""
"\n"
"Section Headers:\n"
msgstr ""
-#: readelf.c:3857
+#: readelf.c:3975
+#, c-format
msgid ""
"\n"
"Section Header:\n"
msgstr ""
-#: readelf.c:3861
+#: readelf.c:3981 readelf.c:3992 readelf.c:4003
+#, c-format
+msgid " [Nr] Name\n"
+msgstr ""
+
+#: readelf.c:3982
+#, c-format
+msgid " Type Addr Off Size ES Lk Inf Al\n"
+msgstr ""
+
+#: readelf.c:3986
+#, c-format
msgid ""
" [Nr] Name Type Addr Off Size ES Flg Lk "
"Inf Al\n"
msgstr ""
-#: readelf.c:3864
+#: readelf.c:3993
+#, c-format
+msgid " Type Address Off Size ES Lk Inf Al\n"
+msgstr ""
+
+#: readelf.c:3997
+#, c-format
msgid ""
" [Nr] Name Type Address Off Size ES "
"Flg Lk Inf Al\n"
msgstr ""
-#: readelf.c:3867
+#: readelf.c:4004
+#, c-format
+msgid " Type Address Offset Link\n"
+msgstr ""
+
+#: readelf.c:4005
+#, c-format
+msgid " Size EntSize Info Align\n"
+msgstr ""
+
+#: readelf.c:4009
+#, c-format
msgid " [Nr] Name Type Address Offset\n"
msgstr ""
-#: readelf.c:3868
+#: readelf.c:4010
+#, c-format
msgid " Size EntSize Flags Link Info Align\n"
msgstr ""
-#: readelf.c:3963
+#: readelf.c:4015
+#, c-format
+msgid " Flags\n"
+msgstr ""
+
+#: readelf.c:4150
+#, c-format
msgid ""
"Key to Flags:\n"
" W (write), A (alloc), X (execute), M (merge), S (strings)\n"
@@ -2714,1554 +3703,1204 @@ msgid ""
" O (extra OS processing required) o (OS specific), p (processor specific)\n"
msgstr ""
-#: readelf.c:4031
+#: readelf.c:4168
+#, c-format
+msgid "[<unknown>: 0x%x]"
+msgstr ""
+
+#: readelf.c:4199
+msgid "Section headers are not available!\n"
+msgstr ""
+
+#: readelf.c:4223
+#, c-format
+msgid ""
+"\n"
+"There are no section groups in this file.\n"
+msgstr ""
+
+#: readelf.c:4259
+#, c-format
+msgid "Bad sh_link in group section `%s'\n"
+msgstr ""
+
+#: readelf.c:4278
+#, c-format
+msgid "Bad sh_info in group section `%s'\n"
+msgstr ""
+
+#: readelf.c:4317 readelf.c:7243
+msgid "section data"
+msgstr ""
+
+#: readelf.c:4329
+#, c-format
+msgid " [Index] Name\n"
+msgstr ""
+
+#: readelf.c:4343
+#, c-format
+msgid "section [%5u] in group section [%5u] > maximum section [%5u]\n"
+msgstr ""
+
+#: readelf.c:4349
+#, c-format
+msgid "invalid section [%5u] in group section [%5u]\n"
+msgstr ""
+
+#: readelf.c:4359
+#, c-format
+msgid "section [%5u] in group section [%5u] already in group section [%5u]\n"
+msgstr ""
+
+#: readelf.c:4372
+#, c-format
+msgid "section 0 in group section [%5u]\n"
+msgstr ""
+
+#: readelf.c:4468
#, c-format
msgid ""
"\n"
"'%s' relocation section at offset 0x%lx contains %ld bytes:\n"
msgstr ""
-#: readelf.c:4043
+#: readelf.c:4480
+#, c-format
msgid ""
"\n"
"There are no dynamic relocations in this file.\n"
msgstr ""
-#: readelf.c:4070
+#: readelf.c:4504
+#, c-format
msgid ""
"\n"
"Relocation section "
msgstr ""
-#: readelf.c:4075 readelf.c:4496 readelf.c:4510
+#: readelf.c:4509 readelf.c:4928 readelf.c:4942 readelf.c:5282
#, c-format
msgid "'%s'"
msgstr ""
-#: readelf.c:4077 readelf.c:4512
+#: readelf.c:4511 readelf.c:4944 readelf.c:5284
#, c-format
msgid " at offset 0x%lx contains %lu entries:\n"
msgstr ""
-#: readelf.c:4115
+#: readelf.c:4563
+#, c-format
msgid ""
"\n"
"There are no relocations in this file.\n"
msgstr ""
-#: readelf.c:4299
+#: readelf.c:4742 readelf.c:5124
msgid "unwind table"
msgstr ""
-#: readelf.c:4350 readelf.c:4362 readelf.c:8499 readelf.c:8511
-#, c-format
-msgid "Skipping unexpected symbol type %u\n"
-msgstr ""
-
-#: readelf.c:4370
+#: readelf.c:4801 readelf.c:5214
#, c-format
msgid "Skipping unexpected relocation type %s\n"
msgstr ""
-#: readelf.c:4415 readelf.c:4440
+#: readelf.c:4860 readelf.c:5275 readelf.c:5326
+#, c-format
msgid ""
"\n"
"There are no unwind sections in this file.\n"
msgstr ""
-#: readelf.c:4491
+#: readelf.c:4923
+#, c-format
msgid ""
"\n"
"Could not find unwind info section for "
msgstr ""
-#: readelf.c:4503
+#: readelf.c:4935
msgid "unwind info"
msgstr ""
-#: readelf.c:4505
+#: readelf.c:4937 readelf.c:5281
+#, c-format
msgid ""
"\n"
"Unwind section "
msgstr ""
-#: readelf.c:4699 readelf.c:4742
-msgid "dynamic segment"
+#: readelf.c:5491 readelf.c:5535
+msgid "dynamic section"
msgstr ""
-#: readelf.c:4820
+#: readelf.c:5612
+#, c-format
msgid ""
"\n"
-"There is no dynamic segment in this file.\n"
+"There is no dynamic section in this file.\n"
msgstr ""
-#: readelf.c:4854
+#: readelf.c:5650
msgid "Unable to seek to end of file!"
msgstr ""
-#: readelf.c:4865
+#: readelf.c:5663
msgid "Unable to determine the number of symbols to load\n"
msgstr ""
-#: readelf.c:4895
+#: readelf.c:5698
msgid "Unable to seek to end of file\n"
msgstr ""
-#: readelf.c:4901
+#: readelf.c:5705
msgid "Unable to determine the length of the dynamic string table\n"
msgstr ""
-#: readelf.c:4906
+#: readelf.c:5710
msgid "dynamic string table"
msgstr ""
-#: readelf.c:4941
+#: readelf.c:5745
msgid "symbol information"
msgstr ""
-#: readelf.c:4965
+#: readelf.c:5770
#, c-format
msgid ""
"\n"
-"Dynamic segment at offset 0x%lx contains %ld entries:\n"
+"Dynamic section at offset 0x%lx contains %u entries:\n"
msgstr ""
-#: readelf.c:4968
+#: readelf.c:5773
+#, c-format
msgid " Tag Type Name/Value\n"
msgstr ""
-#: readelf.c:5004
+#: readelf.c:5809
+#, c-format
msgid "Auxiliary library"
msgstr ""
-#: readelf.c:5008
+#: readelf.c:5813
+#, c-format
msgid "Filter library"
msgstr ""
-#: readelf.c:5012
+#: readelf.c:5817
+#, c-format
msgid "Configuration file"
msgstr ""
-#: readelf.c:5016
+#: readelf.c:5821
+#, c-format
msgid "Dependency audit library"
msgstr ""
-#: readelf.c:5020
+#: readelf.c:5825
+#, c-format
msgid "Audit library"
msgstr ""
-#: readelf.c:5038 readelf.c:5066 readelf.c:5094
+#: readelf.c:5843 readelf.c:5871 readelf.c:5899
+#, c-format
msgid "Flags:"
msgstr ""
-#: readelf.c:5041 readelf.c:5069 readelf.c:5096
+#: readelf.c:5846 readelf.c:5874 readelf.c:5901
+#, c-format
msgid " None\n"
msgstr ""
-#: readelf.c:5217
+#: readelf.c:6022
#, c-format
msgid "Shared library: [%s]"
msgstr ""
-#: readelf.c:5220
+#: readelf.c:6025
+#, c-format
msgid " program interpreter"
msgstr ""
-#: readelf.c:5224
+#: readelf.c:6029
#, c-format
msgid "Library soname: [%s]"
msgstr ""
-#: readelf.c:5228
+#: readelf.c:6033
#, c-format
msgid "Library rpath: [%s]"
msgstr ""
-#: readelf.c:5232
+#: readelf.c:6037
#, c-format
msgid "Library runpath: [%s]"
msgstr ""
-#: readelf.c:5296
+#: readelf.c:6100
#, c-format
msgid "Not needed object: [%s]\n"
msgstr ""
-#: readelf.c:5412
+#: readelf.c:6214
#, c-format
msgid ""
"\n"
"Version definition section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:5415
+#: readelf.c:6217
+#, c-format
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:5417 readelf.c:5612
+#: readelf.c:6219 readelf.c:6426
#, c-format
msgid " Offset: %#08lx Link: %lx (%s)\n"
msgstr ""
-#: readelf.c:5424
+#: readelf.c:6228
msgid "version definition section"
msgstr ""
-#: readelf.c:5450
+#: readelf.c:6254
#, c-format
msgid " %#06x: Rev: %d Flags: %s"
msgstr ""
-#: readelf.c:5453
+#: readelf.c:6257
#, c-format
msgid " Index: %d Cnt: %d "
msgstr ""
-#: readelf.c:5464
+#: readelf.c:6268
#, c-format
msgid "Name: %s\n"
msgstr ""
-#: readelf.c:5466
+#: readelf.c:6270
#, c-format
msgid "Name index: %ld\n"
msgstr ""
-#: readelf.c:5481
+#: readelf.c:6285
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr ""
-#: readelf.c:5484
+#: readelf.c:6288
#, c-format
msgid " %#06x: Parent %d, name index: %ld\n"
msgstr ""
-#: readelf.c:5503
+#: readelf.c:6307
#, c-format
msgid ""
"\n"
"Version needs section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:5506
+#: readelf.c:6310
+#, c-format
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:5508
+#: readelf.c:6312
#, c-format
msgid " Offset: %#08lx Link to section: %ld (%s)\n"
msgstr ""
-#: readelf.c:5514
+#: readelf.c:6321
msgid "version need section"
msgstr ""
-#: readelf.c:5536
+#: readelf.c:6343
#, c-format
msgid " %#06x: Version: %d"
msgstr ""
-#: readelf.c:5539
+#: readelf.c:6346
#, c-format
msgid " File: %s"
msgstr ""
-#: readelf.c:5541
+#: readelf.c:6348
#, c-format
msgid " File: %lx"
msgstr ""
-#: readelf.c:5543
+#: readelf.c:6350
#, c-format
msgid " Cnt: %d\n"
msgstr ""
-#: readelf.c:5561
+#: readelf.c:6368
#, c-format
-msgid " %#06x: Name: %s"
+msgid " %#06x: Name: %s"
msgstr ""
-#: readelf.c:5564
+#: readelf.c:6371
#, c-format
-msgid " %#06x: Name index: %lx"
+msgid " %#06x: Name index: %lx"
msgstr ""
-#: readelf.c:5567
+#: readelf.c:6374
#, c-format
msgid " Flags: %s Version: %d\n"
msgstr ""
-#: readelf.c:5603
+#: readelf.c:6417
msgid "version string table"
msgstr ""
-#: readelf.c:5607
+#: readelf.c:6421
#, c-format
msgid ""
"\n"
"Version symbols section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:5610
+#: readelf.c:6424
+#, c-format
msgid " Addr: "
msgstr ""
-#: readelf.c:5622
+#: readelf.c:6434
msgid "version symbol data"
msgstr ""
-#: readelf.c:5649
+#: readelf.c:6461
msgid " 0 (*local*) "
msgstr ""
-#: readelf.c:5653
+#: readelf.c:6465
msgid " 1 (*global*) "
msgstr ""
-#: readelf.c:5689 readelf.c:6129
+#: readelf.c:6503 readelf.c:6969
msgid "version need"
msgstr ""
-#: readelf.c:5699
+#: readelf.c:6513
msgid "version need aux (2)"
msgstr ""
-#: readelf.c:5741 readelf.c:6192
+#: readelf.c:6555 readelf.c:7034
msgid "version def"
msgstr ""
-#: readelf.c:5760 readelf.c:6207
+#: readelf.c:6575 readelf.c:7049
msgid "version def aux"
msgstr ""
-#: readelf.c:5791
+#: readelf.c:6606
+#, c-format
msgid ""
"\n"
"No version information found in this file.\n"
msgstr ""
-#: readelf.c:5923
+#: readelf.c:6740
msgid "Unable to read in dynamic data\n"
msgstr ""
-#: readelf.c:5967
+#: readelf.c:6793
msgid "Unable to seek to start of dynamic information"
msgstr ""
-#: readelf.c:5973
+#: readelf.c:6799
msgid "Failed to read in number of buckets\n"
msgstr ""
-#: readelf.c:5979
+#: readelf.c:6805
msgid "Failed to read in number of chains\n"
msgstr ""
-#: readelf.c:5999
+#: readelf.c:6825
+#, c-format
msgid ""
"\n"
"Symbol table for image:\n"
msgstr ""
-#: readelf.c:6001
+#: readelf.c:6827
+#, c-format
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:6003
+#: readelf.c:6829
+#, c-format
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:6048
+#: readelf.c:6882
#, c-format
msgid ""
"\n"
"Symbol table '%s' contains %lu entries:\n"
msgstr ""
-#: readelf.c:6052
+#: readelf.c:6886
+#, c-format
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:6054
+#: readelf.c:6888
+#, c-format
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:6101
+#: readelf.c:6939
msgid "version data"
msgstr ""
-#: readelf.c:6142
+#: readelf.c:6982
msgid "version need aux (3)"
msgstr ""
-#: readelf.c:6167
+#: readelf.c:7009
msgid "bad dynamic symbol"
msgstr ""
-#: readelf.c:6230
+#: readelf.c:7073
+#, c-format
msgid ""
"\n"
"Dynamic symbol information is not available for displaying symbols.\n"
msgstr ""
-#: readelf.c:6242
+#: readelf.c:7085
#, c-format
msgid ""
"\n"
-"Histogram for bucket list length (total of %d buckets):\n"
+"Histogram for bucket list length (total of %lu buckets):\n"
msgstr ""
-#: readelf.c:6244
+#: readelf.c:7087
#, c-format
msgid " Length Number %% of total Coverage\n"
msgstr ""
-#: readelf.c:6249 readelf.c:6268 readelf.c:9898 readelf.c:10090
+#: readelf.c:7092 readelf.c:7108 readelf.c:8031 readelf.c:8223
msgid "Out of memory"
msgstr ""
-#: readelf.c:6317
+#: readelf.c:7157
#, c-format
msgid ""
"\n"
"Dynamic info segment at offset 0x%lx contains %d entries:\n"
msgstr ""
-#: readelf.c:6320
+#: readelf.c:7160
+#, c-format
msgid " Num: Name BoundTo Flags\n"
msgstr ""
-#: readelf.c:6373
+#: readelf.c:7212
#, c-format
msgid ""
"\n"
"Assembly dump of section %s\n"
msgstr ""
-#: readelf.c:6396
+#: readelf.c:7233
#, c-format
msgid ""
"\n"
"Section '%s' has no data to dump.\n"
msgstr ""
-#: readelf.c:6401
+#: readelf.c:7238
#, c-format
msgid ""
"\n"
"Hex dump of section '%s':\n"
msgstr ""
-#: readelf.c:6406
-msgid "section data"
-msgstr ""
-
-#: readelf.c:6555
-msgid "badly formed extended line op encountered!\n"
-msgstr ""
-
-#: readelf.c:6562
+#: readelf.c:7359
#, c-format
-msgid " Extended opcode %d: "
+msgid "skipping invalid relocation offset 0x%lx in section %s\n"
msgstr ""
-#: readelf.c:6567
-msgid ""
-"End of Sequence\n"
-"\n"
-msgstr ""
-
-#: readelf.c:6573
+#: readelf.c:7376
#, c-format
-msgid "set Address to 0x%lx\n"
+msgid "skipping unexpected symbol type %s in relocation in section .rela%s\n"
msgstr ""
-#: readelf.c:6578
-msgid " define new File Table entry\n"
-msgstr ""
-
-#: readelf.c:6579 readelf.c:6726
-msgid " Entry\tDir\tTime\tSize\tName\n"
-msgstr ""
-
-#: readelf.c:6581
+#: readelf.c:7402
#, c-format
-msgid " %d\t"
+msgid "skipping unexpected symbol type %s in relocation in section .rela.%s\n"
msgstr ""
-#: readelf.c:6584 readelf.c:6586 readelf.c:6588 readelf.c:6738 readelf.c:6740
-#: readelf.c:6742
+#: readelf.c:7435
#, c-format
-msgid "%lu\t"
+msgid "%s section data"
msgstr ""
-#: readelf.c:6589
+#: readelf.c:7472
#, c-format
msgid ""
-"%s\n"
"\n"
+"Section '%s' has no debugging data.\n"
msgstr ""
-#: readelf.c:6593
-#, c-format
-msgid "UNKNOWN: length %d\n"
-msgstr ""
-
-#: readelf.c:6621
-#, c-format
-msgid ""
-"\n"
-"Dump of debug contents of section %s:\n"
-"\n"
-msgstr ""
-
-#: readelf.c:6649
-msgid "The line info appears to be corrupt - the section is too small\n"
-msgstr ""
-
-#: readelf.c:6658
-msgid "Only DWARF version 2 and 3 line info is currently supported.\n"
-msgstr ""
-
-#: readelf.c:6679
-#, c-format
-msgid " Length: %ld\n"
-msgstr ""
-
-#: readelf.c:6680
-#, c-format
-msgid " DWARF Version: %d\n"
-msgstr ""
-
-#: readelf.c:6681
-#, c-format
-msgid " Prologue Length: %d\n"
-msgstr ""
-
-#: readelf.c:6682
+#: readelf.c:7498
#, c-format
-msgid " Minimum Instruction Length: %d\n"
+msgid "Unrecognized debug section: %s\n"
msgstr ""
-#: readelf.c:6683
+#: readelf.c:7533
#, c-format
-msgid " Initial value of 'is_stmt': %d\n"
+msgid "Section %d was not dumped because it does not exist!\n"
msgstr ""
-#: readelf.c:6684
-#, c-format
-msgid " Line Base: %d\n"
+#: readelf.c:7791
+msgid "attributes"
msgstr ""
-#: readelf.c:6685
+#: readelf.c:7809
#, c-format
-msgid " Line Range: %d\n"
+msgid "ERROR: Bad section length (%d > %d)\n"
msgstr ""
-#: readelf.c:6686
+#: readelf.c:7830
#, c-format
-msgid " Opcode Base: %d\n"
-msgstr ""
-
-#: readelf.c:6695
-msgid ""
-"\n"
-" Opcodes:\n"
+msgid "ERROR: Bad subsection length (%d > %d)\n"
msgstr ""
-#: readelf.c:6698
+#: readelf.c:7880
#, c-format
-msgid " Opcode %d has %d args\n"
+msgid "Unknown format '%c'\n"
msgstr ""
-#: readelf.c:6704
-msgid ""
-"\n"
-" The Directory Table is empty.\n"
+#: readelf.c:7936 readelf.c:8304
+msgid "liblist"
msgstr ""
-#: readelf.c:6707
-msgid ""
-"\n"
-" The Directory Table:\n"
+#: readelf.c:8025
+msgid "options"
msgstr ""
-#: readelf.c:6711
+#: readelf.c:8055
#, c-format
-msgid " %s\n"
-msgstr ""
-
-#: readelf.c:6722
msgid ""
"\n"
-" The File Name Table is empty.\n"
+"Section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:6725
-msgid ""
-"\n"
-" The File Name Table:\n"
+#: readelf.c:8216
+msgid "conflict list found without a dynamic symbol table"
msgstr ""
-#: readelf.c:6733
-#, c-format
-msgid " %d\t"
+#: readelf.c:8232 readelf.c:8246
+msgid "conflict"
msgstr ""
-#: readelf.c:6744
+#: readelf.c:8256
#, c-format
-msgid "%s\n"
-msgstr ""
-
-#. Now display the statements.
-#: readelf.c:6752
msgid ""
"\n"
-" Line Number Statements:\n"
+"Section '.conflict' contains %lu entries:\n"
msgstr ""
-#: readelf.c:6768
-#, c-format
-msgid " Special opcode %d: advance Address by %d to 0x%lx"
-msgstr ""
-
-#: readelf.c:6772
-#, c-format
-msgid " and Line by %d to %d\n"
-msgstr ""
-
-#: readelf.c:6783
-msgid " Copy\n"
-msgstr ""
-
-#: readelf.c:6790
-#, c-format
-msgid " Advance PC by %d to %lx\n"
-msgstr ""
-
-#: readelf.c:6798
-#, c-format
-msgid " Advance Line by %d to %d\n"
-msgstr ""
-
-#: readelf.c:6805
-#, c-format
-msgid " Set File Name to entry %d in the File Name Table\n"
-msgstr ""
-
-#: readelf.c:6813
-#, c-format
-msgid " Set column to %d\n"
-msgstr ""
-
-#: readelf.c:6820
-#, c-format
-msgid " Set is_stmt to %d\n"
-msgstr ""
-
-#: readelf.c:6825
-msgid " Set basic block\n"
-msgstr ""
-
-#: readelf.c:6833
-#, c-format
-msgid " Advance PC by constant %d to 0x%lx\n"
-msgstr ""
-
-#: readelf.c:6841
-#, c-format
-msgid " Advance PC by fixed size amount %d to 0x%lx\n"
-msgstr ""
-
-#: readelf.c:6846
-msgid " Set prologue_end to true\n"
-msgstr ""
-
-#: readelf.c:6850
-msgid " Set epilogue_begin to true\n"
-msgstr ""
-
-#: readelf.c:6856
-#, c-format
-msgid " Set ISA to %d\n"
+#: readelf.c:8258
+msgid " Num: Index Value Name"
msgstr ""
-#: readelf.c:6860
-#, c-format
-msgid " Unknown opcode %d with operands: "
+#: readelf.c:8311
+msgid "liblist string table"
msgstr ""
-#: readelf.c:6891 readelf.c:7371 readelf.c:7443
+#: readelf.c:8321
#, c-format
msgid ""
-"Contents of the %s section:\n"
"\n"
+"Library list section '%s' contains %lu entries:\n"
msgstr ""
-#: readelf.c:6931
-msgid "Only DWARF 2 and 3 pubnames are currently supported\n"
-msgstr ""
-
-#: readelf.c:6938
-#, c-format
-msgid " Length: %ld\n"
-msgstr ""
-
-#: readelf.c:6940
-#, c-format
-msgid " Version: %d\n"
-msgstr ""
-
-#: readelf.c:6942
-#, c-format
-msgid " Offset into .debug_info section: %ld\n"
-msgstr ""
-
-#: readelf.c:6944
-#, c-format
-msgid " Size of area in .debug_info section: %ld\n"
-msgstr ""
-
-#: readelf.c:6947
-msgid ""
-"\n"
-" Offset\tName\n"
+#: readelf.c:8374
+msgid "NT_AUXV (auxiliary vector)"
msgstr ""
-#: readelf.c:7042
-#, c-format
-msgid "Unknown TAG value: %lx"
+#: readelf.c:8376
+msgid "NT_PRSTATUS (prstatus structure)"
msgstr ""
-#: readelf.c:7156
-#, c-format
-msgid "Unknown AT value: %lx"
+#: readelf.c:8378
+msgid "NT_FPREGSET (floating point registers)"
msgstr ""
-#: readelf.c:7193
-#, c-format
-msgid "Unknown FORM value: %lx"
+#: readelf.c:8380
+msgid "NT_PRPSINFO (prpsinfo structure)"
msgstr ""
-#: readelf.c:7392
-#, c-format
-msgid " DW_MACINFO_start_file - lineno: %d filenum: %d\n"
+#: readelf.c:8382
+msgid "NT_TASKSTRUCT (task structure)"
msgstr ""
-#: readelf.c:7397
-msgid " DW_MACINFO_end_file\n"
+#: readelf.c:8384
+msgid "NT_PRXFPREG (user_xfpregs structure)"
msgstr ""
-#: readelf.c:7405
-#, c-format
-msgid " DW_MACINFO_define - lineno : %d macro : %s\n"
+#: readelf.c:8386
+msgid "NT_PSTATUS (pstatus structure)"
msgstr ""
-#: readelf.c:7413
-#, c-format
-msgid " DW_MACINFO_undef - lineno : %d macro : %s\n"
+#: readelf.c:8388
+msgid "NT_FPREGS (floating point registers)"
msgstr ""
-#: readelf.c:7424
-#, c-format
-msgid " DW_MACINFO_vendor_ext - constant : %d string : %s\n"
+#: readelf.c:8390
+msgid "NT_PSINFO (psinfo structure)"
msgstr ""
-#: readelf.c:7452
-msgid " Number TAG\n"
+#: readelf.c:8392
+msgid "NT_LWPSTATUS (lwpstatus_t structure)"
msgstr ""
-#: readelf.c:7458
-#, c-format
-msgid " %ld %s [%s]\n"
+#: readelf.c:8394
+msgid "NT_LWPSINFO (lwpsinfo_t structure)"
msgstr ""
-#: readelf.c:7461
-msgid "has children"
+#: readelf.c:8396
+msgid "NT_WIN32PSTATUS (win32_pstatus structure)"
msgstr ""
-#: readelf.c:7461
-msgid "no children"
+#: readelf.c:8404
+msgid "NT_VERSION (version)"
msgstr ""
-#: readelf.c:7465
-#, c-format
-msgid " %-18s %s\n"
+#: readelf.c:8406
+msgid "NT_ARCH (architecture)"
msgstr ""
-#: readelf.c:7486
+#: readelf.c:8411 readelf.c:8433
#, c-format
-msgid " %lu byte block: "
-msgstr ""
-
-#: readelf.c:7814
-msgid "(User defined location op)"
-msgstr ""
-
-#: readelf.c:7816
-msgid "(Unknown location op)"
-msgstr ""
-
-#: readelf.c:7855
-msgid "debug_loc section data"
-msgstr ""
-
-#: readelf.c:7887
-msgid ""
-"\n"
-"The .debug_loc section is empty.\n"
-msgstr ""
-
-#: readelf.c:7891
-msgid ""
-"Contents of the .debug_loc section:\n"
-"\n"
-msgstr ""
-
-#: readelf.c:7892
-msgid ""
-"\n"
-" Offset Begin End Expression\n"
-msgstr ""
-
-#: readelf.c:7968
-msgid "debug_str section data"
-msgstr ""
-
-#: readelf.c:7987
-msgid "<no .debug_str section>"
-msgstr ""
-
-#: readelf.c:7990
-msgid "<offset is too big>"
-msgstr ""
-
-#: readelf.c:8009
-msgid ""
-"\n"
-"The .debug_str section is empty.\n"
+msgid "Unknown note type: (0x%08x)"
msgstr ""
-#: readelf.c:8013
-msgid ""
-"Contents of the .debug_str section:\n"
-"\n"
+#. NetBSD core "procinfo" structure.
+#: readelf.c:8423
+msgid "NetBSD procinfo structure"
msgstr ""
-#: readelf.c:8088
-msgid "Internal error: DWARF version is not 2 or 3.\n"
+#: readelf.c:8450 readelf.c:8464
+msgid "PT_GETREGS (reg structure)"
msgstr ""
-#: readelf.c:8203
-#, c-format
-msgid " (indirect string, offset: 0x%lx): %s"
+#: readelf.c:8452 readelf.c:8466
+msgid "PT_GETFPREGS (fpreg structure)"
msgstr ""
-#: readelf.c:8212
+#: readelf.c:8472
#, c-format
-msgid "Unrecognized form: %d\n"
-msgstr ""
-
-#: readelf.c:8226
-msgid "(not inlined)"
-msgstr ""
-
-#: readelf.c:8229
-msgid "(inlined)"
-msgstr ""
-
-#: readelf.c:8232
-msgid "(declared as inline but ignored)"
-msgstr ""
-
-#: readelf.c:8235
-msgid "(declared as inline and inlined)"
+msgid "PT_FIRSTMACH+%d"
msgstr ""
-#: readelf.c:8238
-#, c-format
-msgid " (Unknown inline attribute value: %lx)"
+#: readelf.c:8518
+msgid "notes"
msgstr ""
-#: readelf.c:8419 readelf.c:8646
+#: readelf.c:8524
#, c-format
msgid ""
-"The section %s contains:\n"
"\n"
+"Notes at offset 0x%08lx with length 0x%08lx:\n"
msgstr ""
-#: readelf.c:8535
-#, c-format
-msgid " Compilation Unit @ %lx:\n"
-msgstr ""
-
-#: readelf.c:8536
-#, c-format
-msgid " Length: %ld\n"
-msgstr ""
-
-#: readelf.c:8537
-#, c-format
-msgid " Version: %d\n"
-msgstr ""
-
-#: readelf.c:8538
-#, c-format
-msgid " Abbrev Offset: %ld\n"
-msgstr ""
-
-#: readelf.c:8539
-#, c-format
-msgid " Pointer Size: %d\n"
-msgstr ""
-
-#: readelf.c:8543
-msgid "Only version 2 and 3 DWARF debug information is currently supported.\n"
-msgstr ""
-
-#: readelf.c:8563
-msgid "Unable to locate .debug_abbrev section!\n"
-msgstr ""
-
-#: readelf.c:8569
-msgid "debug_abbrev section data"
-msgstr ""
-
-#: readelf.c:8606
-#, c-format
-msgid "Unable to locate entry %lu in the abbreviation table\n"
-msgstr ""
-
-#: readelf.c:8611
-#, c-format
-msgid " <%d><%lx>: Abbrev Number: %lu (%s)\n"
-msgstr ""
-
-#: readelf.c:8691
-msgid "Only DWARF 2 and 3 aranges are currently supported.\n"
-msgstr ""
-
-#: readelf.c:8695
-#, c-format
-msgid " Length: %ld\n"
-msgstr ""
-
-#: readelf.c:8696
+#: readelf.c:8526
#, c-format
-msgid " Version: %d\n"
+msgid " Owner\t\tData size\tDescription\n"
msgstr ""
-#: readelf.c:8697
+#: readelf.c:8545
#, c-format
-msgid " Offset into .debug_info: %lx\n"
+msgid "corrupt note found at offset %lx into core notes\n"
msgstr ""
-#: readelf.c:8698
+#: readelf.c:8547
#, c-format
-msgid " Pointer Size: %d\n"
+msgid " type: %lx, namesize: %08lx, descsize: %08lx\n"
msgstr ""
-#: readelf.c:8699
+#: readelf.c:8645
#, c-format
-msgid " Segment Size: %d\n"
+msgid "No note segments present in the core file.\n"
msgstr ""
-#: readelf.c:8701
+#: readelf.c:8726
msgid ""
-"\n"
-" Address Length\n"
-msgstr ""
-
-#: readelf.c:8903
-#, c-format
-msgid "The section %s contains:\n"
+"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:9538
+#: readelf.c:8775 readelf.c:9119
#, c-format
-msgid "Displaying the debug contents of section %s is not yet supported.\n"
+msgid "%s: Failed to read file header\n"
msgstr ""
-#: readelf.c:9634
+#: readelf.c:8788
#, c-format
msgid ""
"\n"
-"Section '%s' has no debugging data.\n"
-msgstr ""
-
-#: readelf.c:9639 readelf.c:9701
-msgid "debug section data"
+"File: %s\n"
msgstr ""
-#: readelf.c:9655
+#: readelf.c:8936 readelf.c:8957 readelf.c:8994 readelf.c:9074
#, c-format
-msgid "Unrecognized debug section: %s\n"
-msgstr ""
-
-#: readelf.c:9729
-msgid "Some sections were not dumped because they do not exist!\n"
-msgstr ""
-
-#: readelf.c:9806 readelf.c:10170
-msgid "liblist"
-msgstr ""
-
-#: readelf.c:9891
-msgid "options"
+msgid "%s: failed to read archive header\n"
msgstr ""
-#: readelf.c:9922
+#: readelf.c:8947
#, c-format
-msgid ""
-"\n"
-"Section '%s' contains %d entries:\n"
-msgstr ""
-
-#: readelf.c:10083
-msgid "conflict list found without a dynamic symbol table"
+msgid "%s: failed to skip archive symbol table\n"
msgstr ""
-#: readelf.c:10101 readelf.c:10117
-msgid "conflict"
-msgstr ""
-
-#: readelf.c:10127
+#: readelf.c:8979
#, c-format
-msgid ""
-"\n"
-"Section '.conflict' contains %ld entries:\n"
+msgid "%s: failed to read string table\n"
msgstr ""
-#: readelf.c:10129
-msgid " Num: Index Value Name"
-msgstr ""
-
-#: readelf.c:10178
-msgid "liblist string table"
-msgstr ""
-
-#: readelf.c:10187
+#: readelf.c:9015
#, c-format
-msgid ""
-"\n"
-"Library list section '%s' contains %lu entries:\n"
-msgstr ""
-
-#: readelf.c:10236
-msgid "NT_PRSTATUS (prstatus structure)"
+msgid "%s: invalid archive string table offset %lu\n"
msgstr ""
-#: readelf.c:10237
-msgid "NT_FPREGSET (floating point registers)"
-msgstr ""
-
-#: readelf.c:10238
-msgid "NT_PRPSINFO (prpsinfo structure)"
-msgstr ""
-
-#: readelf.c:10239
-msgid "NT_TASKSTRUCT (task structure)"
-msgstr ""
-
-#: readelf.c:10240
-msgid "NT_PRXFPREG (user_xfpregs structure)"
-msgstr ""
-
-#: readelf.c:10241
-msgid "NT_PSTATUS (pstatus structure)"
-msgstr ""
-
-#: readelf.c:10242
-msgid "NT_FPREGS (floating point registers)"
-msgstr ""
-
-#: readelf.c:10243
-msgid "NT_PSINFO (psinfo structure)"
-msgstr ""
-
-#: readelf.c:10244
-msgid "NT_LWPSTATUS (lwpstatus_t structure)"
-msgstr ""
-
-#: readelf.c:10245
-msgid "NT_LWPSINFO (lwpsinfo_t structure)"
-msgstr ""
-
-#: readelf.c:10246
-msgid "NT_WIN32PSTATUS (win32_pstatus structure)"
-msgstr ""
-
-#: readelf.c:10248 readelf.c:10272
+#: readelf.c:9031
#, c-format
-msgid "Unknown note type: (0x%08x)"
-msgstr ""
-
-#. NetBSD core "procinfo" structure.
-#: readelf.c:10262
-msgid "NetBSD procinfo structure"
+msgid "%s: bad archive file name\n"
msgstr ""
-#: readelf.c:10289 readelf.c:10303
-msgid "PT_GETREGS (reg structure)"
-msgstr ""
-
-#: readelf.c:10291 readelf.c:10305
-msgid "PT_GETFPREGS (fpreg structure)"
-msgstr ""
-
-#: readelf.c:10311
+#: readelf.c:9063
#, c-format
-msgid "PT_FIRSTMACH+%d"
-msgstr ""
-
-#: readelf.c:10365
-msgid "notes"
+msgid "%s: failed to seek to next archive header\n"
msgstr ""
-#: readelf.c:10371
+#: readelf.c:9097
#, c-format
-msgid ""
-"\n"
-"Notes at offset 0x%08lx with length 0x%08lx:\n"
-msgstr ""
-
-#: readelf.c:10373
-msgid " Owner\t\tData size\tDescription\n"
+msgid "'%s': No such file\n"
msgstr ""
-#: readelf.c:10392
+#: readelf.c:9099
#, c-format
-msgid "corrupt note found at offset %x into core notes\n"
+msgid "Could not locate '%s'. System error message: %s\n"
msgstr ""
-#: readelf.c:10394
+#: readelf.c:9106
#, c-format
-msgid " type: %x, namesize: %08lx, descsize: %08lx\n"
+msgid "'%s' is not an ordinary file\n"
msgstr ""
-#: readelf.c:10476
-msgid "No note segments present in the core file.\n"
-msgstr ""
-
-#: readelf.c:10560
-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:10606
-#, c-format
-msgid "Cannot stat input file %s.\n"
-msgstr ""
-
-#: readelf.c:10613
-#, c-format
-msgid "Input file %s not found.\n"
-msgstr ""
-
-#: readelf.c:10619
-#, c-format
-msgid "%s: Failed to read file header\n"
-msgstr ""
-
-#: readelf.c:10633
+#: readelf.c:9113
#, c-format
-msgid ""
-"\n"
-"File: %s\n"
+msgid "Input file '%s' is not readable.\n"
msgstr ""
-#: rename.c:132
+#: rename.c:129
#, c-format
msgid "%s: cannot set time: %s"
msgstr ""
#. We have to clean up here.
-#: rename.c:171 rename.c:204
+#: rename.c:164 rename.c:202
#, c-format
-msgid "%s: rename: %s"
+msgid "unable to rename '%s' reason: %s"
msgstr ""
-#: rename.c:212
+#: rename.c:210
#, c-format
-msgid "%s: simple_copy: %s"
+msgid "unable to copy file '%s' reason: %s"
msgstr ""
-#: resbin.c:134
+#: resbin.c:132
#, c-format
msgid "%s: not enough binary data"
msgstr ""
-#: resbin.c:153
+#: resbin.c:148
msgid "null terminated unicode string"
msgstr ""
-#: resbin.c:183 resbin.c:189
+#: resbin.c:175 resbin.c:181
msgid "resource ID"
msgstr ""
-#: resbin.c:233
+#: resbin.c:221
msgid "cursor"
msgstr ""
-#: resbin.c:267 resbin.c:274
+#: resbin.c:253 resbin.c:260
msgid "menu header"
msgstr ""
-#: resbin.c:284
+#: resbin.c:270
msgid "menuex header"
msgstr ""
-#: resbin.c:288
+#: resbin.c:274
msgid "menuex offset"
msgstr ""
-#: resbin.c:295
+#: resbin.c:281
#, c-format
msgid "unsupported menu version %d"
msgstr ""
-#: resbin.c:323 resbin.c:338 resbin.c:404
+#: resbin.c:306 resbin.c:321 resbin.c:384
msgid "menuitem header"
msgstr ""
-#: resbin.c:434
+#: resbin.c:414
msgid "menuitem"
msgstr ""
-#: resbin.c:475 resbin.c:503
+#: resbin.c:453 resbin.c:481
msgid "dialog header"
msgstr ""
-#: resbin.c:493
+#: resbin.c:471
#, c-format
msgid "unexpected DIALOGEX version %d"
msgstr ""
-#: resbin.c:538
+#: resbin.c:516
msgid "dialog font point size"
msgstr ""
-#: resbin.c:546
+#: resbin.c:524
msgid "dialogex font information"
msgstr ""
-#: resbin.c:572 resbin.c:590
+#: resbin.c:550 resbin.c:568
msgid "dialog control"
msgstr ""
-#: resbin.c:582
+#: resbin.c:560
msgid "dialogex control"
msgstr ""
-#: resbin.c:611
+#: resbin.c:589
msgid "dialog control end"
msgstr ""
-#: resbin.c:623
+#: resbin.c:601
msgid "dialog control data"
msgstr ""
-#: resbin.c:666
+#: resbin.c:642
msgid "stringtable string length"
msgstr ""
-#: resbin.c:676
+#: resbin.c:652
msgid "stringtable string"
msgstr ""
-#: resbin.c:709
+#: resbin.c:683
msgid "fontdir header"
msgstr ""
-#: resbin.c:722
+#: resbin.c:696
msgid "fontdir"
msgstr ""
-#: resbin.c:738
+#: resbin.c:712
msgid "fontdir device name"
msgstr ""
-#: resbin.c:744
+#: resbin.c:718
msgid "fontdir face name"
msgstr ""
-#: resbin.c:787
+#: resbin.c:759
msgid "accelerator"
msgstr ""
-#: resbin.c:851
+#: resbin.c:819
msgid "group cursor header"
msgstr ""
-#: resbin.c:855
+#: resbin.c:823
#, c-format
msgid "unexpected group cursor type %d"
msgstr ""
-#: resbin.c:870
+#: resbin.c:838
msgid "group cursor"
msgstr ""
-#: resbin.c:909
+#: resbin.c:875
msgid "group icon header"
msgstr ""
-#: resbin.c:913
+#: resbin.c:879
#, c-format
msgid "unexpected group icon type %d"
msgstr ""
-#: resbin.c:928
+#: resbin.c:894
msgid "group icon"
msgstr ""
-#: resbin.c:999 resbin.c:1218
+#: resbin.c:957 resbin.c:1174
msgid "unexpected version string"
msgstr ""
-#: resbin.c:1033
+#: resbin.c:989
#, c-format
msgid "version length %d does not match resource length %lu"
msgstr ""
-#: resbin.c:1037
+#: resbin.c:993
#, c-format
msgid "unexpected version type %d"
msgstr ""
-#: resbin.c:1049
+#: resbin.c:1005
#, c-format
msgid "unexpected fixed version information length %d"
msgstr ""
-#: resbin.c:1052
+#: resbin.c:1008
msgid "fixed version info"
msgstr ""
-#: resbin.c:1056
+#: resbin.c:1012
#, c-format
msgid "unexpected fixed version signature %lu"
msgstr ""
-#: resbin.c:1060
+#: resbin.c:1016
#, c-format
msgid "unexpected fixed version info version %lu"
msgstr ""
-#: resbin.c:1089
+#: resbin.c:1045
msgid "version var info"
msgstr ""
-#: resbin.c:1106
+#: resbin.c:1062
#, c-format
msgid "unexpected stringfileinfo value length %d"
msgstr ""
-#: resbin.c:1116
+#: resbin.c:1072
#, c-format
msgid "unexpected version stringtable value length %d"
msgstr ""
-#: resbin.c:1150
+#: resbin.c:1106
#, c-format
msgid "unexpected version string length %d != %d + %d"
msgstr ""
-#: resbin.c:1161
+#: resbin.c:1117
#, c-format
msgid "unexpected version string length %d < %d"
msgstr ""
-#: resbin.c:1178
+#: resbin.c:1134
#, c-format
msgid "unexpected varfileinfo value length %d"
msgstr ""
-#: resbin.c:1197
+#: resbin.c:1153
msgid "version varfileinfo"
msgstr ""
-#: resbin.c:1212
+#: resbin.c:1168
#, c-format
msgid "unexpected version value length %d"
msgstr ""
-#: rescoff.c:128
+#: rescoff.c:126
msgid "filename required for COFF input"
msgstr ""
-#: rescoff.c:145
+#: rescoff.c:143
#, c-format
msgid "%s: no resource section"
msgstr ""
-#: rescoff.c:152
+#: rescoff.c:150
msgid "can't read resource section"
msgstr ""
-#: rescoff.c:178
+#: rescoff.c:174
#, c-format
msgid "%s: %s: address out of bounds"
msgstr ""
-#: rescoff.c:197
+#: rescoff.c:190
msgid "directory"
msgstr ""
-#: rescoff.c:225
+#: rescoff.c:218
msgid "named directory entry"
msgstr ""
-#: rescoff.c:234
+#: rescoff.c:227
msgid "directory entry name"
msgstr ""
-#: rescoff.c:254
+#: rescoff.c:247
msgid "named subdirectory"
msgstr ""
-#: rescoff.c:262
+#: rescoff.c:255
msgid "named resource"
msgstr ""
-#: rescoff.c:277
+#: rescoff.c:270
msgid "ID directory entry"
msgstr ""
-#: rescoff.c:294
+#: rescoff.c:287
msgid "ID subdirectory"
msgstr ""
-#: rescoff.c:302
+#: rescoff.c:295
msgid "ID resource"
msgstr ""
-#: rescoff.c:328
+#: rescoff.c:318
msgid "resource type unknown"
msgstr ""
-#: rescoff.c:331
+#: rescoff.c:321
msgid "data entry"
msgstr ""
-#: rescoff.c:339
+#: rescoff.c:329
msgid "resource data"
msgstr ""
-#: rescoff.c:344
+#: rescoff.c:334
msgid "resource data size"
msgstr ""
-#: rescoff.c:439
+#: rescoff.c:427
msgid "filename required for COFF output"
msgstr ""
-#: rescoff.c:738
+#: rescoff.c:719
msgid "can't get BFD_RELOC_RVA relocation type"
msgstr ""
-#: resrc.c:240 resrc.c:312
+#: resrc.c:238 resrc.c:309
#, c-format
msgid "can't open temporary file `%s': %s"
msgstr ""
-#: resrc.c:246
+#: resrc.c:244
#, c-format
msgid "can't redirect stdout: `%s': %s"
msgstr ""
-#: resrc.c:262
+#: resrc.c:260
#, c-format
msgid "%s %s: %s"
msgstr ""
-#: resrc.c:308
+#: resrc.c:305
#, c-format
msgid "can't execute `%s': %s"
msgstr ""
-#: resrc.c:317
+#: resrc.c:314
#, c-format
msgid "Using temporary file `%s' to read preprocessor output\n"
msgstr ""
-#: resrc.c:324
+#: resrc.c:321
#, c-format
msgid "can't popen `%s': %s"
msgstr ""
-#: resrc.c:326
+#: resrc.c:323
+#, c-format
msgid "Using popen to read preprocessor output\n"
msgstr ""
-#: resrc.c:369
+#: resrc.c:362
#, c-format
msgid "Tried `%s'\n"
msgstr ""
-#: resrc.c:380
+#: resrc.c:373
#, c-format
msgid "Using `%s'\n"
msgstr ""
-#: resrc.c:542
+#: resrc.c:529
#, c-format
msgid "%s:%d: %s\n"
msgstr ""
-#: resrc.c:551
+#: resrc.c:537
#, c-format
msgid "%s: unexpected EOF"
msgstr ""
-#: resrc.c:608
+#: resrc.c:586
#, c-format
msgid "%s: read of %lu returned %lu"
msgstr ""
-#: resrc.c:650 resrc.c:905 resrc.c:1178 resrc.c:1332
+#: resrc.c:624 resrc.c:1134
#, c-format
msgid "stat failed on bitmap file `%s': %s"
msgstr ""
-#: resrc.c:703
+#: resrc.c:675
#, c-format
msgid "cursor file `%s' does not contain cursor data"
msgstr ""
-#: resrc.c:735 resrc.c:1049
+#: resrc.c:707 resrc.c:1003
#, c-format
msgid "%s: fseek to %lu failed: %s"
msgstr ""
-#: resrc.c:873
+#: resrc.c:831
msgid "help ID requires DIALOGEX"
msgstr ""
-#: resrc.c:875
+#: resrc.c:833
msgid "control data requires DIALOGEX"
msgstr ""
-#: resrc.c:1018
+#: resrc.c:861
+#, c-format
+msgid "stat failed on font file `%s': %s"
+msgstr ""
+
+#: resrc.c:972
#, c-format
msgid "icon file `%s' does not contain icon data"
msgstr ""
-#: resrc.c:1537
+#: resrc.c:1273 resrc.c:1308
+#, c-format
+msgid "stat failed on file `%s': %s"
+msgstr ""
+
+#: resrc.c:1494
#, c-format
msgid "can't open `%s' for output: %s"
msgstr ""
-#: size.c:86
+#: size.c:83
+#, c-format
msgid " Displays the sizes of sections inside binary files\n"
msgstr ""
-#: size.c:87
+#: size.c:84
+#, c-format
msgid " If no input file(s) are specified, a.out is assumed\n"
msgstr ""
-#: size.c:88
+#: size.c:85
#, c-format
msgid ""
" The options are:\n"
@@ -4271,150 +4910,194 @@ msgid ""
" -t --totals Display the total sizes (Berkeley "
"only)\n"
" --target=<bfdname> Set the binary file format\n"
+" @<file> Read options from <file>\n"
" -h --help Display this information\n"
" -v --version Display the program's version\n"
"\n"
msgstr ""
-#: size.c:160
+#: size.c:158
#, c-format
msgid "invalid argument to --format: %s"
msgstr ""
-#: size.c:187
+#: size.c:185
#, c-format
msgid "Invalid radix: %s\n"
msgstr ""
-#: srconv.c:1953
+#: srconv.c:1722
+#, c-format
msgid "Convert a COFF object file into a SYSROFF object file\n"
msgstr ""
-#: srconv.c:1954
+#: srconv.c:1723
+#, c-format
msgid ""
" The options are:\n"
-" -q --quick (Obsolete - ignoerd)\n"
+" -q --quick (Obsolete - ignored)\n"
" -n --noprescan Do not perform a scan to convert commons into defs\n"
" -d --debug Display information about what is being done\n"
+" @<file> Read options from <file>\n"
" -h --help Display this information\n"
" -v --version Print the program's version number\n"
msgstr ""
-#: srconv.c:2099
+#: srconv.c:1869
#, c-format
msgid "unable to open output file %s"
msgstr ""
-#: stabs.c:346 stabs.c:1755
+#: stabs.c:330 stabs.c:1708
msgid "numeric overflow"
msgstr ""
-#: stabs.c:357
+#: stabs.c:340
#, c-format
msgid "Bad stab: %s\n"
msgstr ""
-#: stabs.c:367
+#: stabs.c:348
#, c-format
msgid "Warning: %s: %s\n"
msgstr ""
-#: stabs.c:488
+#: stabs.c:458
+#, c-format
msgid "N_LBRAC not within function\n"
msgstr ""
-#: stabs.c:527
+#: stabs.c:497
+#, c-format
msgid "Too many N_RBRACs\n"
msgstr ""
-#: stabs.c:773
+#: stabs.c:738
msgid "unknown C++ encoded name"
msgstr ""
#. Complain and keep going, so compilers can invent new
#. cross-reference types.
-#: stabs.c:1293
+#: stabs.c:1253
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:1847
+#: stabs.c:1800
msgid "missing index type"
msgstr ""
-#: stabs.c:2174
+#: stabs.c:2114
msgid "unknown virtual character for baseclass"
msgstr ""
-#: stabs.c:2192
+#: stabs.c:2132
msgid "unknown visibility character for baseclass"
msgstr ""
-#: stabs.c:2384
+#: stabs.c:2318
msgid "unnamed $vb type"
msgstr ""
-#: stabs.c:2390
+#: stabs.c:2324
msgid "unrecognized C++ abbreviation"
msgstr ""
-#: stabs.c:2470
+#: stabs.c:2400
msgid "unknown visibility character for field"
msgstr ""
-#: stabs.c:2726
+#: stabs.c:2652
msgid "const/volatile indicator missing"
msgstr ""
-#: stabs.c:2967
+#: stabs.c:2888
#, c-format
msgid "No mangling for \"%s\"\n"
msgstr ""
-#: stabs.c:3281
+#: stabs.c:3188
msgid "Undefined N_EXCL"
msgstr ""
-#: stabs.c:3369
+#: stabs.c:3268
#, c-format
msgid "Type file number %d out of range\n"
msgstr ""
-#: stabs.c:3374
+#: stabs.c:3273
#, c-format
msgid "Type index number %d out of range\n"
msgstr ""
-#: stabs.c:3461
+#: stabs.c:3352
#, c-format
msgid "Unrecognized XCOFF type %d\n"
msgstr ""
-#: stabs.c:3762
+#: stabs.c:3644
#, c-format
msgid "bad mangled name `%s'\n"
msgstr ""
-#: stabs.c:3859
+#: stabs.c:3739
+#, c-format
msgid "no argument types in mangled string\n"
msgstr ""
-#: strings.c:208
+#: stabs.c:5093
+#, c-format
+msgid "Demangled name is not a function\n"
+msgstr ""
+
+#: stabs.c:5135
+#, c-format
+msgid "Unexpected type in v3 arglist demangling\n"
+msgstr ""
+
+#: stabs.c:5202
+#, c-format
+msgid "Unrecognized demangle component %d\n"
+msgstr ""
+
+#: stabs.c:5254
+#, c-format
+msgid "Failed to print demangled template\n"
+msgstr ""
+
+#: stabs.c:5334
+#, c-format
+msgid "Couldn't get demangled builtin type\n"
+msgstr ""
+
+#: stabs.c:5383
+#, c-format
+msgid "Unexpected demangled varargs\n"
+msgstr ""
+
+#: stabs.c:5390
+#, c-format
+msgid "Unrecognized demangled builtin type\n"
+msgstr ""
+
+#: strings.c:218
#, c-format
msgid "invalid number %s"
msgstr ""
-#: strings.c:647
+#: strings.c:700
#, c-format
msgid "invalid integer argument %s"
msgstr ""
-#: strings.c:658
+#: strings.c:709
+#, c-format
msgid " Display printable strings in [file(s)] (stdin by default)\n"
msgstr ""
-#: strings.c:659
+#: strings.c:710
+#, c-format
msgid ""
" The options are:\n"
" -a - --all Scan the entire file, not just the data section\n"
@@ -4422,87 +5105,96 @@ msgid ""
" -n --bytes=[number] Locate & print any NUL-terminated sequence of "
"at\n"
" -<number> least [number] characters (default 4).\n"
-" -t --radix={o,x,d} Print the location of the string in base 8, 10 "
+" -t --radix={o,d,x} Print the location of the string in base 8, 10 "
"or 16\n"
" -o An alias for --radix=o\n"
" -T --target=<BFDNAME> Specify the binary file format\n"
" -e --encoding={s,S,b,l,B,L} Select character size and endianness:\n"
" s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} = 32-"
"bit\n"
+" @<file> Read options from <file>\n"
" -h --help Display this information\n"
" -v --version Print the program's version number\n"
msgstr ""
-#: sysdump.c:768
+#: sysdump.c:642
+#, c-format
msgid "Print a human readable interpretation of a SYSROFF object file\n"
msgstr ""
-#: sysdump.c:769
+#: sysdump.c:643
+#, c-format
msgid ""
" The options are:\n"
" -h --help Display this information\n"
" -v --version Print the program's version number\n"
msgstr ""
-#: sysdump.c:836
+#: sysdump.c:710
#, c-format
msgid "cannot open input file %s"
msgstr ""
-#: version.c:36
-msgid "Copyright 2002 Free Software Foundation, Inc.\n"
+#: version.c:35
+#, c-format
+msgid "Copyright 2005 Free Software Foundation, Inc.\n"
msgstr ""
-#: version.c:37
+#: version.c:36
+#, 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:205
+#: windres.c:204
#, c-format
msgid "can't open %s `%s': %s"
msgstr ""
-#: windres.c:384
+#: windres.c:370
+#, c-format
msgid ": expected to be a directory\n"
msgstr ""
-#: windres.c:396
+#: windres.c:382
+#, c-format
msgid ": expected to be a leaf\n"
msgstr ""
-#: windres.c:405
+#: windres.c:391
#, c-format
msgid "%s: warning: "
msgstr ""
-#: windres.c:407
+#: windres.c:393
+#, c-format
msgid ": duplicate value\n"
msgstr ""
-#: windres.c:569
+#: windres.c:543
#, c-format
msgid "unknown format type `%s'"
msgstr ""
-#: windres.c:570
+#: windres.c:544
#, c-format
msgid "%s: supported formats:"
msgstr ""
#. Otherwise, we give up.
-#: windres.c:655
+#: windres.c:627
#, c-format
-msgid "can not determine type of file `%s'; use the -I option"
+msgid "can not determine type of file `%s'; use the -J option"
msgstr ""
-#: windres.c:669
+#: windres.c:639
#, c-format
msgid "Usage: %s [option(s)] [input-file] [output-file]\n"
msgstr ""
-#: windres.c:671
+#: windres.c:641
+#, c-format
msgid ""
" The options are:\n"
" -i --input=<file> Name input file\n"
@@ -4522,53 +5214,58 @@ msgid ""
" --no-use-temp-file Use popen (default)\n"
msgstr ""
-#: windres.c:687
+#: windres.c:657
+#, c-format
msgid " --yydebug Turn on parser debugging\n"
msgstr ""
-#: windres.c:690
+#: windres.c:660
+#, c-format
msgid ""
" -r Ignored for compatibility with rc\n"
+" @<file> Read options from <file>\n"
" -h --help Print this help message\n"
" -V --version Print version information\n"
msgstr ""
-#: windres.c:694
+#: windres.c:665
+#, c-format
msgid ""
"FORMAT is one of rc, res, or coff, and is deduced from the file name\n"
"extension if not specified. A single file name is an input file.\n"
"No input-file is stdin, default rc. No output-file is stdout, default rc.\n"
msgstr ""
-#: windres.c:833
+#: windres.c:803
msgid "invalid option -f\n"
msgstr ""
-#: windres.c:838
+#: windres.c:808
msgid "No filename following the -fo option.\n"
msgstr ""
-#: windres.c:896
+#: windres.c:866
+#, c-format
msgid ""
"Option -I is deprecated for setting the input format, please use -J "
"instead.\n"
msgstr ""
-#: windres.c:1014
+#: windres.c:984
msgid "no resources"
msgstr ""
-#: wrstabs.c:395 wrstabs.c:2055
+#: wrstabs.c:354 wrstabs.c:1915
#, c-format
msgid "string_hash_lookup failed: %s"
msgstr ""
-#: wrstabs.c:695
+#: wrstabs.c:635
#, c-format
msgid "stab_int_type: bad size %u"
msgstr ""
-#: wrstabs.c:1495
+#: wrstabs.c:1393
#, 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 5b6b0479a8e7..87a49341b016 100644
--- a/contrib/binutils/binutils/prdbg.c
+++ b/contrib/binutils/binutils/prdbg.c
@@ -1,5 +1,6 @@
/* prdbg.c -- Print out generic debugging information.
- Copyright 1995, 1996, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
Tags style generation written by Salvador E. Tropea <set@computer.org>.
@@ -17,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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file prints out the generic debugging information, by
supplying a set of routines to debug_write. */
@@ -1904,7 +1905,7 @@ find_address_in_section (bfd *abfd, asection *section, void *data)
if (pc < vma)
return;
- size = bfd_get_section_size_before_reloc (section);
+ size = bfd_get_section_size (section);
if (pc >= vma + size)
return;
diff --git a/contrib/binutils/binutils/ranlib.sh b/contrib/binutils/binutils/ranlib.sh
index 2b6fbc479c64..9a2248f1430d 100755
--- a/contrib/binutils/binutils/ranlib.sh
+++ b/contrib/binutils/binutils/ranlib.sh
@@ -1,3 +1,3 @@
#!/bin/sh
# A simple ranlib script, to use less disk space than a ranlib program.
-ar s $1
+ar s "$1"
diff --git a/contrib/binutils/binutils/rclex.c b/contrib/binutils/binutils/rclex.c
index ff20f2ae871d..b546335b1abc 100644
--- a/contrib/binutils/binutils/rclex.c
+++ b/contrib/binutils/binutils/rclex.c
@@ -1,7 +1,7 @@
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /cvs/src/src/binutils/rclex.c,v 1.1.12.1 2004/04/09 19:32:15 drow Exp $
+ * $Header: /cvs/src/src/binutils/rclex.c,v 1.1.16.1 2006/04/16 18:36:40 drow Exp $
*/
#define FLEX_SCANNER
@@ -638,7 +638,8 @@ char *yytext;
#line 1 "rclex.l"
#define INITIAL 0
#line 2 "rclex.l"
-/* Copyright 1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* 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.
@@ -655,8 +656,8 @@ char *yytext;
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 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
@@ -671,6 +672,8 @@ char *yytext;
#include <assert.h>
+#define YY_NO_UNPUT
+
/* Whether we are in rcdata mode, in which we returns the lengths of
strings. */
@@ -709,7 +712,7 @@ static void cpp_line (const char *);
static char *handle_quotes (const char *, unsigned long *);
static char *get_string (int);
-#line 713 "lex.yy.c"
+#line 716 "rclex.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -871,10 +874,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 75 "rclex.l"
+#line 78 "rclex.l"
-#line 878 "lex.yy.c"
+#line 881 "rclex.c"
if ( yy_init )
{
@@ -959,387 +962,387 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 77 "rclex.l"
+#line 80 "rclex.l"
{ MAYBE_RETURN (BEG); }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 78 "rclex.l"
+#line 81 "rclex.l"
{ MAYBE_RETURN (BEG); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 79 "rclex.l"
+#line 82 "rclex.l"
{ MAYBE_RETURN (END); }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 80 "rclex.l"
+#line 83 "rclex.l"
{ MAYBE_RETURN (END); }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 81 "rclex.l"
+#line 84 "rclex.l"
{ MAYBE_RETURN (ACCELERATORS); }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 82 "rclex.l"
+#line 85 "rclex.l"
{ MAYBE_RETURN (VIRTKEY); }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 83 "rclex.l"
+#line 86 "rclex.l"
{ MAYBE_RETURN (ASCII); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 84 "rclex.l"
+#line 87 "rclex.l"
{ MAYBE_RETURN (NOINVERT); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 85 "rclex.l"
+#line 88 "rclex.l"
{ MAYBE_RETURN (SHIFT); }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 86 "rclex.l"
+#line 89 "rclex.l"
{ MAYBE_RETURN (CONTROL); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 87 "rclex.l"
+#line 90 "rclex.l"
{ MAYBE_RETURN (ALT); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 88 "rclex.l"
+#line 91 "rclex.l"
{ MAYBE_RETURN (BITMAP); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 89 "rclex.l"
+#line 92 "rclex.l"
{ MAYBE_RETURN (CURSOR); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 90 "rclex.l"
+#line 93 "rclex.l"
{ MAYBE_RETURN (DIALOG); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 91 "rclex.l"
+#line 94 "rclex.l"
{ MAYBE_RETURN (DIALOGEX); }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 92 "rclex.l"
+#line 95 "rclex.l"
{ MAYBE_RETURN (EXSTYLE); }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 93 "rclex.l"
+#line 96 "rclex.l"
{ MAYBE_RETURN (CAPTION); }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 94 "rclex.l"
+#line 97 "rclex.l"
{ MAYBE_RETURN (CLASS); }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 95 "rclex.l"
+#line 98 "rclex.l"
{ MAYBE_RETURN (STYLE); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 96 "rclex.l"
+#line 99 "rclex.l"
{ MAYBE_RETURN (AUTO3STATE); }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 97 "rclex.l"
+#line 100 "rclex.l"
{ MAYBE_RETURN (AUTOCHECKBOX); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 98 "rclex.l"
+#line 101 "rclex.l"
{ MAYBE_RETURN (AUTORADIOBUTTON); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 99 "rclex.l"
+#line 102 "rclex.l"
{ MAYBE_RETURN (CHECKBOX); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 100 "rclex.l"
+#line 103 "rclex.l"
{ MAYBE_RETURN (COMBOBOX); }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 101 "rclex.l"
+#line 104 "rclex.l"
{ MAYBE_RETURN (CTEXT); }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 102 "rclex.l"
+#line 105 "rclex.l"
{ MAYBE_RETURN (DEFPUSHBUTTON); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 103 "rclex.l"
+#line 106 "rclex.l"
{ MAYBE_RETURN (EDITTEXT); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 104 "rclex.l"
+#line 107 "rclex.l"
{ MAYBE_RETURN (GROUPBOX); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 105 "rclex.l"
+#line 108 "rclex.l"
{ MAYBE_RETURN (LISTBOX); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 106 "rclex.l"
+#line 109 "rclex.l"
{ MAYBE_RETURN (LTEXT); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 107 "rclex.l"
+#line 110 "rclex.l"
{ MAYBE_RETURN (PUSHBOX); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 108 "rclex.l"
+#line 111 "rclex.l"
{ MAYBE_RETURN (PUSHBUTTON); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 109 "rclex.l"
+#line 112 "rclex.l"
{ MAYBE_RETURN (RADIOBUTTON); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 110 "rclex.l"
+#line 113 "rclex.l"
{ MAYBE_RETURN (RTEXT); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 111 "rclex.l"
+#line 114 "rclex.l"
{ MAYBE_RETURN (SCROLLBAR); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 112 "rclex.l"
+#line 115 "rclex.l"
{ MAYBE_RETURN (STATE3); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 113 "rclex.l"
+#line 116 "rclex.l"
{ MAYBE_RETURN (USERBUTTON); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 114 "rclex.l"
+#line 117 "rclex.l"
{ MAYBE_RETURN (BEDIT); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 115 "rclex.l"
+#line 118 "rclex.l"
{ MAYBE_RETURN (HEDIT); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 116 "rclex.l"
+#line 119 "rclex.l"
{ MAYBE_RETURN (IEDIT); }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 117 "rclex.l"
+#line 120 "rclex.l"
{ MAYBE_RETURN (FONT); }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 118 "rclex.l"
+#line 121 "rclex.l"
{ MAYBE_RETURN (ICON); }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 119 "rclex.l"
+#line 122 "rclex.l"
{ MAYBE_RETURN (LANGUAGE); }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 120 "rclex.l"
+#line 123 "rclex.l"
{ MAYBE_RETURN (CHARACTERISTICS); }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 121 "rclex.l"
+#line 124 "rclex.l"
{ MAYBE_RETURN (VERSIONK); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 122 "rclex.l"
+#line 125 "rclex.l"
{ MAYBE_RETURN (MENU); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 123 "rclex.l"
+#line 126 "rclex.l"
{ MAYBE_RETURN (MENUEX); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 124 "rclex.l"
+#line 127 "rclex.l"
{ MAYBE_RETURN (MENUITEM); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 125 "rclex.l"
+#line 128 "rclex.l"
{ MAYBE_RETURN (SEPARATOR); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 126 "rclex.l"
+#line 129 "rclex.l"
{ MAYBE_RETURN (POPUP); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 127 "rclex.l"
+#line 130 "rclex.l"
{ MAYBE_RETURN (CHECKED); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 128 "rclex.l"
+#line 131 "rclex.l"
{ MAYBE_RETURN (GRAYED); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 129 "rclex.l"
+#line 132 "rclex.l"
{ MAYBE_RETURN (HELP); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 130 "rclex.l"
+#line 133 "rclex.l"
{ MAYBE_RETURN (INACTIVE); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 131 "rclex.l"
+#line 134 "rclex.l"
{ MAYBE_RETURN (MENUBARBREAK); }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 132 "rclex.l"
+#line 135 "rclex.l"
{ MAYBE_RETURN (MENUBREAK); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 133 "rclex.l"
+#line 136 "rclex.l"
{ MAYBE_RETURN (MESSAGETABLE); }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 134 "rclex.l"
+#line 137 "rclex.l"
{ MAYBE_RETURN (RCDATA); }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 135 "rclex.l"
+#line 138 "rclex.l"
{ MAYBE_RETURN (STRINGTABLE); }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 136 "rclex.l"
+#line 139 "rclex.l"
{ MAYBE_RETURN (VERSIONINFO); }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 137 "rclex.l"
+#line 140 "rclex.l"
{ MAYBE_RETURN (FILEVERSION); }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 138 "rclex.l"
+#line 141 "rclex.l"
{ MAYBE_RETURN (PRODUCTVERSION); }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 139 "rclex.l"
+#line 142 "rclex.l"
{ MAYBE_RETURN (FILEFLAGSMASK); }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 140 "rclex.l"
+#line 143 "rclex.l"
{ MAYBE_RETURN (FILEFLAGS); }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 141 "rclex.l"
+#line 144 "rclex.l"
{ MAYBE_RETURN (FILEOS); }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 142 "rclex.l"
+#line 145 "rclex.l"
{ MAYBE_RETURN (FILETYPE); }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 143 "rclex.l"
+#line 146 "rclex.l"
{ MAYBE_RETURN (FILESUBTYPE); }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 144 "rclex.l"
+#line 147 "rclex.l"
{ MAYBE_RETURN (VALUE); }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 145 "rclex.l"
+#line 148 "rclex.l"
{ MAYBE_RETURN (MOVEABLE); }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 146 "rclex.l"
+#line 149 "rclex.l"
{ MAYBE_RETURN (FIXED); }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 147 "rclex.l"
+#line 150 "rclex.l"
{ MAYBE_RETURN (PURE); }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 148 "rclex.l"
+#line 151 "rclex.l"
{ MAYBE_RETURN (IMPURE); }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 149 "rclex.l"
+#line 152 "rclex.l"
{ MAYBE_RETURN (PRELOAD); }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 150 "rclex.l"
+#line 153 "rclex.l"
{ MAYBE_RETURN (LOADONCALL); }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 151 "rclex.l"
+#line 154 "rclex.l"
{ MAYBE_RETURN (DISCARDABLE); }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 152 "rclex.l"
+#line 155 "rclex.l"
{ MAYBE_RETURN (NOT); }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 154 "rclex.l"
+#line 157 "rclex.l"
{
char *s, *send;
@@ -1371,14 +1374,14 @@ YY_RULE_SETUP
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 183 "rclex.l"
+#line 186 "rclex.l"
{
cpp_line (yytext);
}
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 187 "rclex.l"
+#line 190 "rclex.l"
{
yylval.i.val = strtoul (yytext, 0, 0);
yylval.i.dword = 1;
@@ -1387,7 +1390,7 @@ YY_RULE_SETUP
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 193 "rclex.l"
+#line 196 "rclex.l"
{
yylval.i.val = strtoul (yytext, 0, 0);
yylval.i.dword = 0;
@@ -1396,7 +1399,7 @@ YY_RULE_SETUP
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 199 "rclex.l"
+#line 202 "rclex.l"
{
char *s;
unsigned long length;
@@ -1417,7 +1420,7 @@ YY_RULE_SETUP
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 217 "rclex.l"
+#line 220 "rclex.l"
{
char *s;
@@ -1435,25 +1438,25 @@ YY_RULE_SETUP
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 232 "rclex.l"
+#line 235 "rclex.l"
{ ++rc_lineno; }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 233 "rclex.l"
+#line 236 "rclex.l"
{ /* ignore whitespace */ }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 234 "rclex.l"
+#line 237 "rclex.l"
{ MAYBE_RETURN (*yytext); }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 236 "rclex.l"
+#line 239 "rclex.l"
ECHO;
YY_BREAK
-#line 1457 "lex.yy.c"
+#line 1460 "rclex.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -2343,7 +2346,7 @@ int main()
return 0;
}
#endif
-#line 236 "rclex.l"
+#line 239 "rclex.l"
#ifndef yywrap
/* This is needed for some versions of lex. */
@@ -2416,6 +2419,7 @@ 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);
@@ -2497,7 +2501,11 @@ handle_quotes (const char *input, unsigned long *len)
case 'x':
++t;
ch = 0;
- while (1)
+ /* 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');
diff --git a/contrib/binutils/binutils/rclex.l b/contrib/binutils/binutils/rclex.l
index 2735cc18aca2..92b1ec738526 100644
--- a/contrib/binutils/binutils/rclex.l
+++ b/contrib/binutils/binutils/rclex.l
@@ -1,5 +1,6 @@
%{ /* rclex.l -- lexer for Windows rc files parser */
-/* Copyright 1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* 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.
@@ -16,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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 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
@@ -32,6 +33,8 @@
#include <assert.h>
+#define YY_NO_UNPUT
+
/* Whether we are in rcdata mode, in which we returns the lengths of
strings. */
@@ -305,6 +308,7 @@ 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);
@@ -386,7 +390,11 @@ handle_quotes (const char *input, unsigned long *len)
case 'x':
++t;
ch = 0;
- while (1)
+ /* 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');
diff --git a/contrib/binutils/binutils/rcparse.y b/contrib/binutils/binutils/rcparse.y
index 7aacaaa06732..fbc5bef6f8ae 100644
--- a/contrib/binutils/binutils/rcparse.y
+++ b/contrib/binutils/binutils/rcparse.y
@@ -1,5 +1,6 @@
%{ /* rcparse.y -- parser for Windows rc files
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -16,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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 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>. */
@@ -53,10 +54,11 @@ static unsigned long base_style;
static unsigned long default_style;
static unsigned long class;
static struct 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, L""}}};
+static const struct res_id res_null_text = { 1, {{0, &null_unichar}}};
%}
@@ -1152,6 +1154,13 @@ rcdata:
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
diff --git a/contrib/binutils/binutils/rdcoff.c b/contrib/binutils/binutils/rdcoff.c
index 84788e0e10e9..1eda3af195d1 100644
--- a/contrib/binutils/binutils/rdcoff.c
+++ b/contrib/binutils/binutils/rdcoff.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse COFF debugging information
- Copyright 1996, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1996, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file contains code which parses COFF debugging information. */
diff --git a/contrib/binutils/binutils/rddbg.c b/contrib/binutils/binutils/rddbg.c
index 75ddab54488d..e977d8b5ef14 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
+ Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2005
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file reads debugging information into a generic form. This
file knows how to dig the debugging information out of an object
@@ -100,8 +100,13 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
{
const char *secname;
const char *strsecname;
- } names[] = { { ".stab", ".stabstr" },
- { "LC_SYMTAB.stabs", "LC_SYMTAB.stabstr" } };
+ }
+ names[] =
+ {
+ { ".stab", ".stabstr" },
+ { "LC_SYMTAB.stabs", "LC_SYMTAB.stabstr" },
+ { "$GDB_SYMBOLS$", "$GDB_STRINGS$" }
+ };
unsigned int i;
void *shandle;
diff --git a/contrib/binutils/binutils/readelf.c b/contrib/binutils/binutils/readelf.c
index e95a501dabba..d8bd54f440f3 100644
--- a/contrib/binutils/binutils/readelf.c
+++ b/contrib/binutils/binutils/readelf.c
@@ -1,5 +1,6 @@
/* readelf.c -- display contents of an ELF format file
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Originally developed by Eric Youngdale <eric@andante.jic.com>
Modifications by Nick Clifton <nickc@redhat.com>
@@ -18,12 +19,12 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* The difference between readelf and objdump:
- Both programs are capabale of displaying the contents of ELF format files,
+ Both programs are capable of displaying the contents of ELF format files,
so why does the binutils project have two file dumpers ?
The reason is that objdump sees an ELF file through a BFD filter of the
@@ -54,12 +55,11 @@
#define BFD64
#endif
-#include "bfd.h"
+#include "dwarf.h"
#include "elf/common.h"
#include "elf/external.h"
#include "elf/internal.h"
-#include "elf/dwarf2.h"
/* The following headers use the elf/reloc-macros.h file to
automatically generate relocation recognition functions
@@ -71,6 +71,7 @@
#include "elf/arc.h"
#include "elf/arm.h"
#include "elf/avr.h"
+#include "elf/bfin.h"
#include "elf/cris.h"
#include "elf/d10v.h"
#include "elf/d30v.h"
@@ -85,6 +86,7 @@
#include "elf/i960.h"
#include "elf/ia64.h"
#include "elf/ip2k.h"
+#include "elf/m32c.h"
#include "elf/m32r.h"
#include "elf/m68k.h"
#include "elf/m68hc11.h"
@@ -93,6 +95,7 @@
#include "elf/mmix.h"
#include "elf/mn10200.h"
#include "elf/mn10300.h"
+#include "elf/mt.h"
#include "elf/msp430.h"
#include "elf/or32.h"
#include "elf/pj.h"
@@ -105,6 +108,7 @@
#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"
@@ -115,55 +119,85 @@
#include "libiberty.h"
char *program_name = "readelf";
-long archive_file_offset;
-unsigned long archive_file_size;
-unsigned long dynamic_addr;
-bfd_size_type dynamic_size;
-char *dynamic_strings;
-char *string_table;
-unsigned long string_table_length;
-unsigned long num_dynamic_syms;
-Elf_Internal_Sym *dynamic_symbols;
-Elf_Internal_Syminfo *dynamic_syminfo;
-unsigned long dynamic_syminfo_offset;
-unsigned int dynamic_syminfo_nent;
-char program_interpreter[64];
-bfd_vma dynamic_info[DT_JMPREL + 1];
-bfd_vma version_info[16];
-Elf_Internal_Ehdr elf_header;
-Elf_Internal_Shdr *section_headers;
-Elf_Internal_Phdr *program_headers;
-Elf_Internal_Dyn *dynamic_segment;
-Elf_Internal_Shdr *symtab_shndx_hdr;
-int show_name;
-int do_dynamic;
-int do_syms;
-int do_reloc;
-int do_sections;
-int do_segments;
-int do_unwind;
-int do_using_dynamic;
-int do_header;
-int do_dump;
-int do_version;
-int do_wide;
-int do_histogram;
-int do_debugging;
-int do_debug_info;
-int do_debug_abbrevs;
-int do_debug_lines;
-int do_debug_pubnames;
-int do_debug_aranges;
-int do_debug_frames;
-int do_debug_frames_interp;
-int do_debug_macinfo;
-int do_debug_str;
-int do_debug_loc;
-int do_arch;
-int do_notes;
-int is_32bit_elf;
-
-/* A dynamic array of flags indicating which sections require dumping. */
+static long archive_file_offset;
+static unsigned long archive_file_size;
+static unsigned long dynamic_addr;
+static bfd_size_type dynamic_size;
+static unsigned int dynamic_nent;
+static char *dynamic_strings;
+static unsigned long dynamic_strings_length;
+static char *string_table;
+static unsigned long string_table_length;
+static unsigned long num_dynamic_syms;
+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 bfd_vma dynamic_info[DT_JMPREL + 1];
+static bfd_vma version_info[16];
+static Elf_Internal_Ehdr elf_header;
+static Elf_Internal_Shdr *section_headers;
+static Elf_Internal_Phdr *program_headers;
+static Elf_Internal_Dyn *dynamic_section;
+static Elf_Internal_Shdr *symtab_shndx_hdr;
+static int show_name;
+static int do_dynamic;
+static int do_syms;
+static int do_reloc;
+static int do_sections;
+static int do_section_groups;
+static int do_section_details;
+static int do_segments;
+static int do_unwind;
+static int do_using_dynamic;
+static int do_header;
+static int do_dump;
+static int do_version;
+static int do_wide;
+static int do_histogram;
+static int do_debugging;
+static int do_arch;
+static int do_notes;
+static int is_32bit_elf;
+
+struct group_list
+{
+ struct group_list *next;
+ unsigned int section_index;
+};
+
+struct group
+{
+ struct group_list *root;
+ unsigned int group_index;
+};
+
+static size_t group_count;
+static struct group *section_groups;
+static struct group **section_headers_groups;
+
+/* A linked list of the section names for which dumps were requested
+ by name. */
+struct dump_list_entry
+{
+ char *name;
+ int type;
+ struct dump_list_entry *next;
+};
+static struct dump_list_entry *dump_sects_byname;
+
+/* A dynamic array of flags indicating for which sections a hex dump
+ has been requested (via the -x switch) and/or a disassembly dump
+ (via the -i switch). */
+char *cmdline_dump_sects = NULL;
+unsigned num_cmdline_dump_sects = 0;
+
+/* A dynamic array of flags indicating for which sections a dump of
+ some kind has been requested. It is reset on a per-object file
+ basis and then initialised from the cmdline_dump_sects array,
+ the results of interpreting the -w switch, and the
+ dump_sects_byname list. */
char *dump_sects = NULL;
unsigned int num_dump_sects = 0;
@@ -171,7 +205,7 @@ unsigned int num_dump_sects = 0;
#define DISASS_DUMP (1 << 1)
#define DEBUG_DUMP (1 << 2)
-/* How to rpint a vma value. */
+/* How to print a vma value. */
typedef enum print_mode
{
HEX,
@@ -184,16 +218,13 @@ typedef enum print_mode
}
print_mode;
-static bfd_vma (*byte_get) (unsigned char *, int);
static void (*byte_put) (unsigned char *, bfd_vma, int);
-typedef int Elf32_Word;
-
#define UNKNOWN -1
#define SECTION_NAME(X) ((X) == NULL ? "<none>" : \
- ((X)->sh_name >= string_table_length \
- ? "<corrupt>" : string_table + (X)->sh_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) \
@@ -215,60 +246,33 @@ typedef int Elf32_Word;
#define BYTE_GET(field) byte_get (field, sizeof (field))
-/* If we can support a 64 bit data type then BFD64 should be defined
- and sizeof (bfd_vma) == 8. In this case when translating from an
- external 8 byte field to an internal field, we can assume that the
- internal field is also 8 bytes wide and so we can extract all the data.
- If, however, BFD64 is not defined, then we must assume that the
- internal data structure only has 4 byte wide fields that are the
- equivalent of the 8 byte wide external counterparts, and so we must
- truncate the data. */
-#ifdef BFD64
-#define BYTE_GET8(field) byte_get (field, -8)
-#else
-#define BYTE_GET8(field) byte_get (field, 8)
-#endif
-
#define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0]))
#define GET_ELF_SYMBOLS(file, section) \
(is_32bit_elf ? get_32bit_elf_symbols (file, section) \
: get_64bit_elf_symbols (file, section))
+#define VALID_DYNAMIC_NAME(offset) ((dynamic_strings != NULL) && (offset < dynamic_strings_length))
+/* GET_DYNAMIC_NAME asssumes that VALID_DYNAMIC_NAME has
+ already been called and verified that the string exists. */
+#define GET_DYNAMIC_NAME(offset) (dynamic_strings + offset)
-static void
-error (const char *message, ...)
-{
- va_list args;
-
- va_start (args, message);
- fprintf (stderr, _("%s: Error: "), program_name);
- vfprintf (stderr, message, args);
- va_end (args);
-}
-
-static void
-warn (const char *message, ...)
-{
- va_list args;
-
- va_start (args, message);
- fprintf (stderr, _("%s: Warning: "), program_name);
- vfprintf (stderr, message, args);
- va_end (args);
-}
-
+/* 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)
+
static void *
-get_data (void *var, FILE *file, long offset, size_t size, const char *reason)
+get_data (void *var, FILE *file, long offset, size_t size, size_t nmemb,
+ const char *reason)
{
void *mvar;
- if (size == 0)
+ if (size == 0 || nmemb == 0)
return NULL;
if (fseek (file, archive_file_offset + offset, SEEK_SET))
{
- error (_("Unable to seek to 0x%x for %s\n"),
+ error (_("Unable to seek to 0x%lx for %s\n"),
archive_file_offset + offset, reason);
return NULL;
}
@@ -276,19 +280,25 @@ get_data (void *var, FILE *file, long offset, size_t size, const char *reason)
mvar = var;
if (mvar == NULL)
{
- mvar = malloc (size);
+ /* Check for overflow. */
+ if (nmemb < (~(size_t) 0 - 1) / size)
+ /* + 1 so that we can '\0' terminate invalid string table sections. */
+ mvar = malloc (size * nmemb + 1);
if (mvar == NULL)
{
- error (_("Out of memory allocating 0x%x bytes for %s\n"),
- size, reason);
+ error (_("Out of memory allocating 0x%lx bytes for %s\n"),
+ (unsigned long)(size * nmemb), reason);
return NULL;
}
+
+ ((char *) mvar)[size * nmemb] = '\0';
}
- if (fread (mvar, size, 1, file) != 1)
+ if (fread (mvar, size, nmemb, file) != nmemb)
{
- error (_("Unable to read in 0x%x bytes of %s\n"), size, reason);
+ error (_("Unable to read in 0x%lx bytes of %s\n"),
+ (unsigned long)(size * nmemb), reason);
if (mvar != var)
free (mvar);
return NULL;
@@ -297,74 +307,6 @@ get_data (void *var, FILE *file, long offset, size_t size, const char *reason)
return mvar;
}
-static bfd_vma
-byte_get_little_endian (unsigned char *field, int size)
-{
- switch (size)
- {
- case 1:
- return *field;
-
- case 2:
- return ((unsigned int) (field[0]))
- | (((unsigned int) (field[1])) << 8);
-
-#ifndef BFD64
- case 8:
- /* We want to extract data from an 8 byte wide field and
- place it into a 4 byte wide field. Since this is a little
- endian source we can just use the 4 byte extraction code. */
- /* Fall through. */
-#endif
- case 4:
- return ((unsigned long) (field[0]))
- | (((unsigned long) (field[1])) << 8)
- | (((unsigned long) (field[2])) << 16)
- | (((unsigned long) (field[3])) << 24);
-
-#ifdef BFD64
- case 8:
- case -8:
- /* This is a special case, generated by the BYTE_GET8 macro.
- It means that we are loading an 8 byte value from a field
- in an external structure into an 8 byte value in a field
- in an internal structure. */
- return ((bfd_vma) (field[0]))
- | (((bfd_vma) (field[1])) << 8)
- | (((bfd_vma) (field[2])) << 16)
- | (((bfd_vma) (field[3])) << 24)
- | (((bfd_vma) (field[4])) << 32)
- | (((bfd_vma) (field[5])) << 40)
- | (((bfd_vma) (field[6])) << 48)
- | (((bfd_vma) (field[7])) << 56);
-#endif
- default:
- error (_("Unhandled data length: %d\n"), size);
- abort ();
- }
-}
-
-static bfd_vma
-byte_get_signed (unsigned char *field, int size)
-{
- bfd_vma x = byte_get (field, size);
-
- switch (size)
- {
- case 1:
- return (x ^ 0x80) - 0x80;
- case 2:
- return (x ^ 0x8000) - 0x8000;
- case 4:
- return (x ^ 0x80000000) - 0x80000000;
- case 8:
- case -8:
- return x;
- default:
- abort ();
- }
-}
-
static void
byte_put_little_endian (unsigned char *field, bfd_vma value, int size)
{
@@ -393,8 +335,60 @@ byte_put_little_endian (unsigned char *field, bfd_vma value, int size)
}
}
+#if defined BFD64 && !BFD_HOST_64BIT_LONG
+static int
+print_dec_vma (bfd_vma vma, int is_signed)
+{
+ char buf[40];
+ char *bufp = buf;
+ int nc = 0;
+
+ if (is_signed && (bfd_signed_vma) vma < 0)
+ {
+ vma = -vma;
+ putchar ('-');
+ nc = 1;
+ }
+
+ do
+ {
+ *bufp++ = '0' + vma % 10;
+ vma /= 10;
+ }
+ while (vma != 0);
+ nc += bufp - buf;
+
+ while (bufp > buf)
+ putchar (*--bufp);
+ return nc;
+}
+
+static int
+print_hex_vma (bfd_vma vma)
+{
+ char buf[32];
+ char *bufp = buf;
+ int nc;
+
+ do
+ {
+ char digit = '0' + (vma & 0x0f);
+ if (digit > '9')
+ digit += 'a' - '0' - 10;
+ *bufp++ = digit;
+ vma >>= 4;
+ }
+ while (vma != 0);
+ nc = bufp - buf;
+
+ while (bufp > buf)
+ putchar (*--bufp);
+ return nc;
+}
+#endif
+
/* Print a VMA value. */
-static void
+static int
print_vma (bfd_vma vma, print_mode mode)
{
#ifdef BFD64
@@ -404,106 +398,85 @@ print_vma (bfd_vma vma, print_mode mode)
switch (mode)
{
case FULL_HEX:
- printf ("0x");
- /* Drop through. */
+ return printf ("0x%8.8lx", (unsigned long) vma);
+
case LONG_HEX:
- printf ("%8.8lx", (unsigned long) vma);
- break;
+ return printf ("%8.8lx", (unsigned long) vma);
case DEC_5:
if (vma <= 99999)
- {
- printf ("%5ld", (long) vma);
- break;
- }
+ return printf ("%5ld", (long) vma);
/* Drop through. */
+
case PREFIX_HEX:
- printf ("0x");
- /* Drop through. */
+ return printf ("0x%lx", (unsigned long) vma);
+
case HEX:
- printf ("%lx", (unsigned long) vma);
- break;
+ return printf ("%lx", (unsigned long) vma);
case DEC:
- printf ("%ld", (unsigned long) vma);
- break;
+ return printf ("%ld", (unsigned long) vma);
case UNSIGNED:
- printf ("%lu", (unsigned long) vma);
- break;
+ return printf ("%lu", (unsigned long) vma);
}
}
#ifdef BFD64
else
{
+ int nc = 0;
+
switch (mode)
{
case FULL_HEX:
- printf ("0x");
+ nc = printf ("0x");
/* Drop through. */
case LONG_HEX:
printf_vma (vma);
- break;
+ return nc + 16;
case PREFIX_HEX:
- printf ("0x");
+ nc = printf ("0x");
/* Drop through. */
case HEX:
#if BFD_HOST_64BIT_LONG
- printf ("%lx", vma);
+ return nc + printf ("%lx", vma);
#else
- if (_bfd_int64_high (vma))
- printf ("%lx%8.8lx", _bfd_int64_high (vma), _bfd_int64_low (vma));
- else
- printf ("%lx", _bfd_int64_low (vma));
+ return nc + print_hex_vma (vma);
#endif
- break;
case DEC:
#if BFD_HOST_64BIT_LONG
- printf ("%ld", vma);
+ return printf ("%ld", vma);
#else
- if (_bfd_int64_high (vma))
- /* ugg */
- printf ("++%ld", _bfd_int64_low (vma));
- else
- printf ("%ld", _bfd_int64_low (vma));
+ return print_dec_vma (vma, 1);
#endif
- break;
case DEC_5:
#if BFD_HOST_64BIT_LONG
if (vma <= 99999)
- printf ("%5ld", vma);
+ return printf ("%5ld", vma);
else
- printf ("%#lx", vma);
+ return printf ("%#lx", vma);
#else
- if (_bfd_int64_high (vma))
- /* ugg */
- printf ("++%ld", _bfd_int64_low (vma));
- else if (vma <= 99999)
- printf ("%5ld", _bfd_int64_low (vma));
+ if (vma <= 99999)
+ return printf ("%5ld", _bfd_int64_low (vma));
else
- printf ("%#lx", _bfd_int64_low (vma));
+ return print_hex_vma (vma);
#endif
- break;
case UNSIGNED:
#if BFD_HOST_64BIT_LONG
- printf ("%lu", vma);
+ return printf ("%lu", vma);
#else
- if (_bfd_int64_high (vma))
- /* ugg */
- printf ("++%lu", _bfd_int64_low (vma));
- else
- printf ("%lu", _bfd_int64_low (vma));
+ return print_dec_vma (vma, 0);
#endif
- break;
}
}
#endif
+ return 0;
}
/* Display a symbol on stdout. If do_wide is not true then
@@ -523,54 +496,6 @@ print_symbol (int width, const char *symbol)
printf ("%-.*s", width, symbol);
}
-static bfd_vma
-byte_get_big_endian (unsigned char *field, int size)
-{
- switch (size)
- {
- case 1:
- return *field;
-
- case 2:
- return ((unsigned int) (field[1])) | (((int) (field[0])) << 8);
-
- case 4:
- return ((unsigned long) (field[3]))
- | (((unsigned long) (field[2])) << 8)
- | (((unsigned long) (field[1])) << 16)
- | (((unsigned long) (field[0])) << 24);
-
-#ifndef BFD64
- case 8:
- /* Although we are extracing data from an 8 byte wide field, we
- are returning only 4 bytes of data. */
- return ((unsigned long) (field[7]))
- | (((unsigned long) (field[6])) << 8)
- | (((unsigned long) (field[5])) << 16)
- | (((unsigned long) (field[4])) << 24);
-#else
- case 8:
- case -8:
- /* This is a special case, generated by the BYTE_GET8 macro.
- It means that we are loading an 8 byte value from a field
- in an external structure into an 8 byte value in a field
- in an internal structure. */
- return ((bfd_vma) (field[7]))
- | (((bfd_vma) (field[6])) << 8)
- | (((bfd_vma) (field[5])) << 16)
- | (((bfd_vma) (field[4])) << 24)
- | (((bfd_vma) (field[3])) << 32)
- | (((bfd_vma) (field[2])) << 40)
- | (((bfd_vma) (field[1])) << 48)
- | (((bfd_vma) (field[0])) << 56);
-#endif
-
- default:
- error (_("Unhandled data length: %d\n"), size);
- abort ();
- }
-}
-
static void
byte_put_big_endian (unsigned char *field, bfd_vma value, int size)
{
@@ -603,6 +528,20 @@ byte_put_big_endian (unsigned char *field, bfd_vma value, int size)
}
}
+/* Return a pointer to section NAME, or NULL if no such section exists. */
+
+static Elf_Internal_Shdr *
+find_section (const char *name)
+{
+ unsigned int i;
+
+ for (i = 0; i < elf_header.e_shnum; i++)
+ if (streq (SECTION_NAME (section_headers + i), name))
+ return section_headers + i;
+
+ return NULL;
+}
+
/* Guess the relocation size commonly used by the specific machines. */
static int
@@ -661,6 +600,7 @@ guess_is_rela (unsigned long e_machine)
case EM_MSP430:
case EM_MSP430_OLD:
case EM_XSTORMY16:
+ case EM_CRX:
case EM_VAX:
case EM_IP2K:
case EM_IP2K_OLD:
@@ -668,6 +608,11 @@ guess_is_rela (unsigned long e_machine)
case EM_XTENSA:
case EM_XTENSA_OLD:
case EM_M32R:
+ case EM_M32C:
+ case EM_MT:
+ case EM_BLACKFIN:
+ case EM_NIOS32:
+ case EM_ALTERA_NIOS2:
return TRUE;
case EM_MMA:
@@ -708,17 +653,18 @@ slurp_rela_relocs (FILE *file,
{
Elf32_External_Rela *erelas;
- erelas = get_data (NULL, file, rel_offset, rel_size, _("relocs"));
+ erelas = get_data (NULL, file, rel_offset, 1, rel_size, _("relocs"));
if (!erelas)
return 0;
nrelas = rel_size / sizeof (Elf32_External_Rela);
- relas = malloc (nrelas * sizeof (Elf_Internal_Rela));
+ relas = cmalloc (nrelas, sizeof (Elf_Internal_Rela));
if (relas == NULL)
{
- error(_("out of memory parsing relocs"));
+ free (erelas);
+ error (_("out of memory parsing relocs"));
return 0;
}
@@ -735,25 +681,26 @@ slurp_rela_relocs (FILE *file,
{
Elf64_External_Rela *erelas;
- erelas = get_data (NULL, file, rel_offset, rel_size, _("relocs"));
+ erelas = get_data (NULL, file, rel_offset, 1, rel_size, _("relocs"));
if (!erelas)
return 0;
nrelas = rel_size / sizeof (Elf64_External_Rela);
- relas = malloc (nrelas * sizeof (Elf_Internal_Rela));
+ relas = cmalloc (nrelas, sizeof (Elf_Internal_Rela));
if (relas == NULL)
{
- error(_("out of memory parsing relocs"));
+ free (erelas);
+ error (_("out of memory parsing relocs"));
return 0;
}
for (i = 0; i < nrelas; i++)
{
- relas[i].r_offset = BYTE_GET8 (erelas[i].r_offset);
- relas[i].r_info = BYTE_GET8 (erelas[i].r_info);
- relas[i].r_addend = BYTE_GET8 (erelas[i].r_addend);
+ relas[i].r_offset = BYTE_GET (erelas[i].r_offset);
+ relas[i].r_info = BYTE_GET (erelas[i].r_info);
+ relas[i].r_addend = BYTE_GET (erelas[i].r_addend);
}
free (erelas);
@@ -778,17 +725,18 @@ slurp_rel_relocs (FILE *file,
{
Elf32_External_Rel *erels;
- erels = get_data (NULL, file, rel_offset, rel_size, _("relocs"));
+ erels = get_data (NULL, file, rel_offset, 1, rel_size, _("relocs"));
if (!erels)
return 0;
nrels = rel_size / sizeof (Elf32_External_Rel);
- rels = malloc (nrels * sizeof (Elf_Internal_Rela));
+ rels = cmalloc (nrels, sizeof (Elf_Internal_Rela));
if (rels == NULL)
{
- error(_("out of memory parsing relocs"));
+ free (erels);
+ error (_("out of memory parsing relocs"));
return 0;
}
@@ -805,24 +753,25 @@ slurp_rel_relocs (FILE *file,
{
Elf64_External_Rel *erels;
- erels = get_data (NULL, file, rel_offset, rel_size, _("relocs"));
+ erels = get_data (NULL, file, rel_offset, 1, rel_size, _("relocs"));
if (!erels)
return 0;
nrels = rel_size / sizeof (Elf64_External_Rel);
- rels = malloc (nrels * sizeof (Elf_Internal_Rela));
+ rels = cmalloc (nrels, sizeof (Elf_Internal_Rela));
if (rels == NULL)
{
- error(_("out of memory parsing relocs"));
+ free (erels);
+ error (_("out of memory parsing relocs"));
return 0;
}
for (i = 0; i < nrels; i++)
{
- rels[i].r_offset = BYTE_GET8 (erels[i].r_offset);
- rels[i].r_info = BYTE_GET8 (erels[i].r_info);
+ rels[i].r_offset = BYTE_GET (erels[i].r_offset);
+ rels[i].r_info = BYTE_GET (erels[i].r_info);
rels[i].r_addend = 0;
}
@@ -843,6 +792,7 @@ dump_relocations (FILE *file,
Elf_Internal_Sym *symtab,
unsigned long nsyms,
char *strtab,
+ unsigned long strtablen,
int is_rela)
{
unsigned int i;
@@ -991,10 +941,10 @@ dump_relocations (FILE *file,
rtype = elf_i386_reloc_type (type);
break;
- case EM_68HC11:
- case EM_68HC12:
- rtype = elf_m68hc11_reloc_type (type);
- break;
+ case EM_68HC11:
+ case EM_68HC12:
+ rtype = elf_m68hc11_reloc_type (type);
+ break;
case EM_68K:
rtype = elf_m68k_reloc_type (type);
@@ -1054,9 +1004,9 @@ dump_relocations (FILE *file,
rtype = elf_fr30_reloc_type (type);
break;
- case EM_CYGNUS_FRV:
- rtype = elf_frv_reloc_type (type);
- break;
+ case EM_CYGNUS_FRV:
+ rtype = elf_frv_reloc_type (type);
+ break;
case EM_MCORE:
rtype = elf_mcore_reloc_type (type);
@@ -1149,6 +1099,10 @@ dump_relocations (FILE *file,
rtype = elf_xstormy16_reloc_type (type);
break;
+ case EM_CRX:
+ rtype = elf_crx_reloc_type (type);
+ break;
+
case EM_VAX:
rtype = elf_vax_reloc_type (type);
break;
@@ -1166,6 +1120,19 @@ dump_relocations (FILE *file,
case EM_XTENSA:
rtype = elf_xtensa_reloc_type (type);
break;
+
+ case EM_M32C:
+ rtype = elf_m32c_reloc_type (type);
+ break;
+
+ case EM_MT:
+ rtype = elf_mt_reloc_type (type);
+ break;
+
+ case EM_BLACKFIN:
+ rtype = elf_bfin_reloc_type (type);
+ break;
+
}
if (rtype == NULL)
@@ -1177,7 +1144,31 @@ dump_relocations (FILE *file,
else
printf (do_wide ? "%-22.22s" : "%-17.17s", rtype);
- if (symtab_index)
+ if (elf_header.e_machine == EM_ALPHA
+ && streq (rtype, "R_ALPHA_LITUSE")
+ && is_rela)
+ {
+ switch (rels[i].r_addend)
+ {
+ case LITUSE_ALPHA_ADDR: rtype = "ADDR"; break;
+ case LITUSE_ALPHA_BASE: rtype = "BASE"; break;
+ case LITUSE_ALPHA_BYTOFF: rtype = "BYTOFF"; break;
+ case LITUSE_ALPHA_JSR: rtype = "JSR"; break;
+ case LITUSE_ALPHA_TLSGD: rtype = "TLSGD"; break;
+ case LITUSE_ALPHA_TLSLDM: rtype = "TLSLDM"; break;
+ case LITUSE_ALPHA_JSRDIRECT: rtype = "JSRDIRECT"; break;
+ default: rtype = NULL;
+ }
+ if (rtype)
+ printf (" (%s)", rtype);
+ else
+ {
+ putchar (' ');
+ printf (_("<unknown addend: %lx>"),
+ (unsigned long) rels[i].r_addend);
+ }
+ }
+ else if (symtab_index)
{
if (symtab == NULL || symtab_index >= nsyms)
printf (" bad symbol index: %08lx", (unsigned long) symtab_index);
@@ -1202,7 +1193,7 @@ dump_relocations (FILE *file,
if (psym->st_shndx < SHN_LORESERVE)
sec_index = psym->st_shndx;
- else if (psym->st_shndx > SHN_LORESERVE)
+ else if (psym->st_shndx > SHN_HIRESERVE)
sec_index = psym->st_shndx - (SHN_HIRESERVE + 1
- SHN_LORESERVE);
@@ -1212,6 +1203,9 @@ dump_relocations (FILE *file,
sec_name = "ABS";
else if (psym->st_shndx == SHN_COMMON)
sec_name = "COMMON";
+ else if (elf_header.e_machine == EM_X86_64
+ && psym->st_shndx == SHN_X86_64_LCOMMON)
+ sec_name = "LARGE_COMMON";
else if (elf_header.e_machine == EM_IA_64
&& elf_header.e_ident[EI_OSABI] == ELFOSABI_HPUX
&& psym->st_shndx == SHN_IA_64_ANSI_COMMON)
@@ -1226,7 +1220,9 @@ dump_relocations (FILE *file,
print_symbol (22, sec_name);
}
else if (strtab == NULL)
- printf (_("<string table index %3ld>"), psym->st_name);
+ printf (_("<string table index: %3ld>"), psym->st_name);
+ else if (psym->st_name >= strtablen)
+ printf (_("<corrupt string table index: %3ld>"), psym->st_name);
else
print_symbol (22, strtab + psym->st_name);
@@ -1236,12 +1232,12 @@ dump_relocations (FILE *file,
}
else if (is_rela)
{
- printf ("%*c", is_32bit_elf ? (do_wide ? 34 : 28) : (do_wide ? 26 : 20), ' ');
+ printf ("%*c", is_32bit_elf ?
+ (do_wide ? 34 : 28) : (do_wide ? 26 : 20), ' ');
print_vma (rels[i].r_addend, LONG_HEX);
}
- if (elf_header.e_machine == EM_SPARCV9
- && !strcmp (rtype, "R_SPARC_OLO10"))
+ if (elf_header.e_machine == EM_SPARCV9 && streq (rtype, "R_SPARC_OLO10"))
printf (" + %lx", (unsigned long) ELF64_R_TYPE_DATA (info));
putchar ('\n');
@@ -1259,7 +1255,7 @@ dump_relocations (FILE *file,
else
printf ("%-17.17s", rtype2);
- printf("\n Type3: ");
+ printf ("\n Type3: ");
if (rtype3 == NULL)
#ifdef _bfd_int64_low
@@ -1344,6 +1340,17 @@ get_sparc64_dynamic_type (unsigned long type)
}
static const char *
+get_ppc_dynamic_type (unsigned long type)
+{
+ switch (type)
+ {
+ case DT_PPC_GOT: return "PPC_GOT";
+ default:
+ return NULL;
+ }
+}
+
+static const char *
get_ppc64_dynamic_type (unsigned long type)
{
switch (type)
@@ -1374,6 +1381,17 @@ get_parisc_dynamic_type (unsigned long type)
case DT_HP_GST_SIZE: return "HP_GST_SIZE";
case DT_HP_GST_VERSION: return "HP_GST_VERSION";
case DT_HP_GST_HASHVAL: return "HP_GST_HASHVAL";
+ case DT_HP_EPLTREL: return "HP_GST_EPLTREL";
+ case DT_HP_EPLTRELSZ: return "HP_GST_EPLTRELSZ";
+ case DT_HP_FILTERED: return "HP_FILTERED";
+ case DT_HP_FILTER_TLS: return "HP_FILTER_TLS";
+ case DT_HP_COMPAT_FILTERED: return "HP_COMPAT_FILTERED";
+ case DT_HP_LAZYLOAD: return "HP_LAZYLOAD";
+ case DT_HP_BIND_NOW_COUNT: return "HP_BIND_NOW_COUNT";
+ case DT_PLT: return "PLT";
+ case DT_PLT_SIZE: return "PLT_SIZE";
+ case DT_DLT: return "DLT";
+ case DT_DLT_SIZE: return "DLT_SIZE";
default:
return NULL;
}
@@ -1391,9 +1409,20 @@ get_ia64_dynamic_type (unsigned long type)
}
static const char *
+get_alpha_dynamic_type (unsigned long type)
+{
+ switch (type)
+ {
+ case DT_ALPHA_PLTRO: return "ALPHA_PLTRO";
+ default:
+ return NULL;
+ }
+}
+
+static const char *
get_dynamic_type (unsigned long type)
{
- static char buff[32];
+ static char buff[64];
switch (type)
{
@@ -1451,6 +1480,8 @@ get_dynamic_type (unsigned long type)
case DT_VERSYM: return "VERSYM";
+ case DT_TLSDESC_GOT: return "TLSDESC_GOT";
+ case DT_TLSDESC_PLT: return "TLSDESC_PLT";
case DT_RELACOUNT: return "RELACOUNT";
case DT_RELCOUNT: return "RELCOUNT";
case DT_FLAGS_1: return "FLAGS_1";
@@ -1483,12 +1514,18 @@ get_dynamic_type (unsigned long type)
case EM_SPARCV9:
result = get_sparc64_dynamic_type (type);
break;
+ case EM_PPC:
+ result = get_ppc_dynamic_type (type);
+ break;
case EM_PPC64:
result = get_ppc64_dynamic_type (type);
break;
case EM_IA_64:
result = get_ia64_dynamic_type (type);
break;
+ case EM_ALPHA:
+ result = get_alpha_dynamic_type (type);
+ break;
default:
result = NULL;
break;
@@ -1497,9 +1534,11 @@ get_dynamic_type (unsigned long type)
if (result != NULL)
return result;
- sprintf (buff, _("Processor Specific: %lx"), type);
+ snprintf (buff, sizeof (buff), _("Processor Specific: %lx"), type);
}
- else if ((type >= DT_LOOS) && (type <= DT_HIOS))
+ else if (((type >= DT_LOOS) && (type <= DT_HIOS))
+ || (elf_header.e_machine == EM_PARISC
+ && (type >= OLD_DT_LOOS) && (type <= OLD_DT_HIOS)))
{
const char *result;
@@ -1516,10 +1555,11 @@ get_dynamic_type (unsigned long type)
if (result != NULL)
return result;
- sprintf (buff, _("Operating System specific: %lx"), type);
+ snprintf (buff, sizeof (buff), _("Operating System specific: %lx"),
+ type);
}
else
- sprintf (buff, _("<unknown>: %lx"), type);
+ snprintf (buff, sizeof (buff), _("<unknown>: %lx"), type);
return buff;
}
@@ -1534,17 +1574,17 @@ get_file_type (unsigned e_type)
{
case ET_NONE: return _("NONE (None)");
case ET_REL: return _("REL (Relocatable file)");
- case ET_EXEC: return _("EXEC (Executable file)");
- case ET_DYN: return _("DYN (Shared object file)");
- case ET_CORE: return _("CORE (Core file)");
+ case ET_EXEC: return _("EXEC (Executable file)");
+ case ET_DYN: return _("DYN (Shared object file)");
+ case ET_CORE: return _("CORE (Core file)");
default:
if ((e_type >= ET_LOPROC) && (e_type <= ET_HIPROC))
- sprintf (buff, _("Processor Specific: (%x)"), e_type);
+ snprintf (buff, sizeof (buff), _("Processor Specific: (%x)"), e_type);
else if ((e_type >= ET_LOOS) && (e_type <= ET_HIOS))
- sprintf (buff, _("OS Specific: (%x)"), e_type);
+ snprintf (buff, sizeof (buff), _("OS Specific: (%x)"), e_type);
else
- sprintf (buff, _("<unknown>: %x"), e_type);
+ snprintf (buff, sizeof (buff), _("<unknown>: %x"), e_type);
return buff;
}
}
@@ -1643,14 +1683,21 @@ get_machine_name (unsigned e_machine)
case EM_XSTORMY16: return "Sanyo Xstormy16 CPU core";
case EM_OPENRISC:
case EM_OR32: return "OpenRISC";
+ case EM_CRX: return "National Semiconductor CRX microprocessor";
case EM_DLX: return "OpenDLX";
case EM_IP2K_OLD:
case EM_IP2K: return "Ubicom IP2xxx 8-bit microcontrollers";
case EM_IQ2000: return "Vitesse IQ2000";
case EM_XTENSA_OLD:
case EM_XTENSA: return "Tensilica Xtensa Processor";
+ case EM_M32C: return "Renesas M32c";
+ case EM_MT: return "Morpho Techologies MT processor";
+ case EM_BLACKFIN: return "Analog Devices Blackfin";
+ case EM_NIOS32: return "Altera Nios";
+ case EM_ALTERA_NIOS2: return "Altera Nios II";
+ case EM_XC16X: return "Infineon Technologies xc16x";
default:
- sprintf (buff, _("<unknown>: %x"), e_machine);
+ snprintf (buff, sizeof (buff), _("<unknown>: %x"), e_machine);
return buff;
}
}
@@ -1740,6 +1787,42 @@ decode_ARM_machine_flags (unsigned e_flags, char buf[])
}
break;
+ case EF_ARM_EABI_VER3:
+ strcat (buf, ", Version3 EABI");
+ break;
+
+ case EF_ARM_EABI_VER4:
+ strcat (buf, ", Version4 EABI");
+ goto eabi;
+
+ case EF_ARM_EABI_VER5:
+ strcat (buf, ", Version5 EABI");
+ eabi:
+ while (e_flags)
+ {
+ unsigned flag;
+
+ /* Process flags one bit at a time. */
+ flag = e_flags & - e_flags;
+ e_flags &= ~ flag;
+
+ switch (flag)
+ {
+ case EF_ARM_BE8:
+ strcat (buf, ", BE8");
+ break;
+
+ case EF_ARM_LE8:
+ strcat (buf, ", LE8");
+ break;
+
+ default:
+ unknown = 1;
+ break;
+ }
+ }
+ break;
+
case EF_ARM_EABI_UNKNOWN:
strcat (buf, ", GNU EABI");
while (e_flags)
@@ -1784,6 +1867,10 @@ decode_ARM_machine_flags (unsigned e_flags, char buf[])
strcat (buf, ", software FP");
break;
+ case EF_ARM_VFP_FLOAT:
+ strcat (buf, ", VFP");
+ break;
+
case EF_ARM_MAVERICK_FLOAT:
strcat (buf, ", Maverick FP");
break;
@@ -1817,11 +1904,102 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
decode_ARM_machine_flags (e_flags, buf);
break;
+ case EM_CYGNUS_FRV:
+ switch (e_flags & EF_FRV_CPU_MASK)
+ {
+ case EF_FRV_CPU_GENERIC:
+ break;
+
+ default:
+ strcat (buf, ", fr???");
+ break;
+
+ case EF_FRV_CPU_FR300:
+ strcat (buf, ", fr300");
+ break;
+
+ case EF_FRV_CPU_FR400:
+ strcat (buf, ", fr400");
+ break;
+ case EF_FRV_CPU_FR405:
+ strcat (buf, ", fr405");
+ break;
+
+ case EF_FRV_CPU_FR450:
+ strcat (buf, ", fr450");
+ break;
+
+ case EF_FRV_CPU_FR500:
+ strcat (buf, ", fr500");
+ break;
+ case EF_FRV_CPU_FR550:
+ strcat (buf, ", fr550");
+ break;
+
+ case EF_FRV_CPU_SIMPLE:
+ strcat (buf, ", simple");
+ break;
+ case EF_FRV_CPU_TOMCAT:
+ strcat (buf, ", tomcat");
+ break;
+ }
+ break;
+
case EM_68K:
- if (e_flags & EF_CPU32)
+ if (e_flags & EF_M68K_CPU32)
strcat (buf, ", cpu32");
- if (e_flags & EF_M68000)
+ if (e_flags & EF_M68K_M68000)
strcat (buf, ", m68000");
+ if (e_flags & EF_M68K_ISA_MASK)
+ {
+ char const *isa = _("unknown");
+ char const *mac = _("unknown mac");
+ char const *additional = NULL;
+
+ switch (e_flags & EF_M68K_ISA_MASK)
+ {
+ case EF_M68K_ISA_A_NODIV:
+ isa = "A";
+ additional = ", nodiv";
+ break;
+ case EF_M68K_ISA_A:
+ isa = "A";
+ break;
+ case EF_M68K_ISA_A_PLUS:
+ isa = "A+";
+ break;
+ case EF_M68K_ISA_B_NOUSP:
+ isa = "B";
+ additional = ", nousp";
+ break;
+ case EF_M68K_ISA_B:
+ isa = "B";
+ break;
+ }
+ strcat (buf, ", cf, isa ");
+ strcat (buf, isa);
+ if (additional)
+ strcat (buf, additional);
+ if (e_flags & EF_M68K_FLOAT)
+ strcat (buf, ", float");
+ switch (e_flags & EF_M68K_MAC_MASK)
+ {
+ case 0:
+ mac = NULL;
+ break;
+ case EF_M68K_MAC:
+ mac = "mac";
+ break;
+ case EF_M68K_EMAC:
+ mac = "emac";
+ break;
+ }
+ if (mac)
+ {
+ strcat (buf, ", ");
+ strcat (buf, mac);
+ }
+ }
break;
case EM_PPC:
@@ -1895,6 +2073,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
case E_MIPS_MACH_5400: strcat (buf, ", 5400"); break;
case E_MIPS_MACH_5500: strcat (buf, ", 5500"); break;
case E_MIPS_MACH_SB1: strcat (buf, ", sb1"); break;
+ case E_MIPS_MACH_9000: strcat (buf, ", 9000"); break;
case 0:
/* We simply ignore the field in this case to avoid confusion:
MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
@@ -1940,6 +2119,35 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
break;
+ case EM_SH:
+ switch ((e_flags & EF_SH_MACH_MASK))
+ {
+ case EF_SH1: strcat (buf, ", sh1"); break;
+ case EF_SH2: strcat (buf, ", sh2"); break;
+ case EF_SH3: strcat (buf, ", sh3"); break;
+ case EF_SH_DSP: strcat (buf, ", sh-dsp"); break;
+ case EF_SH3_DSP: strcat (buf, ", sh3-dsp"); break;
+ case EF_SH4AL_DSP: strcat (buf, ", sh4al-dsp"); break;
+ case EF_SH3E: strcat (buf, ", sh3e"); break;
+ case EF_SH4: strcat (buf, ", sh4"); break;
+ case EF_SH5: strcat (buf, ", sh5"); break;
+ case EF_SH2E: strcat (buf, ", sh2e"); break;
+ case EF_SH4A: strcat (buf, ", sh4a"); break;
+ case EF_SH2A: strcat (buf, ", sh2a"); break;
+ case EF_SH4_NOFPU: strcat (buf, ", sh4-nofpu"); break;
+ case EF_SH4A_NOFPU: strcat (buf, ", sh4a-nofpu"); break;
+ case EF_SH2A_NOFPU: strcat (buf, ", sh2a-nofpu"); break;
+ case EF_SH3_NOMMU: strcat (buf, ", sh3-nommu"); break;
+ case EF_SH4_NOMMU_NOFPU: strcat (buf, ", sh4-nommu-nofpu"); break;
+ case EF_SH2A_SH4_NOFPU: strcat (buf, ", sh2a-nofpu-or-sh4-nommu-nofpu"); break;
+ case EF_SH2A_SH3_NOFPU: strcat (buf, ", sh2a-nofpu-or-sh3-nommu"); break;
+ case EF_SH2A_SH4: strcat (buf, ", sh2a-or-sh4"); break;
+ case EF_SH2A_SH3E: strcat (buf, ", sh2a-or-sh3e"); break;
+ default: strcat (buf, ", unknown ISA"); break;
+ }
+
+ break;
+
case EM_SPARCV9:
if (e_flags & EF_SPARC_32PLUS)
strcat (buf, ", v8+");
@@ -2058,12 +2266,26 @@ get_osabi_name (unsigned int osabi)
case ELFOSABI_STANDALONE: return _("Standalone App");
case ELFOSABI_ARM: return "ARM";
default:
- sprintf (buff, _("<unknown: %x>"), osabi);
+ snprintf (buff, sizeof (buff), _("<unknown: %x>"), osabi);
return buff;
}
}
static const char *
+get_arm_segment_type (unsigned long type)
+{
+ switch (type)
+ {
+ case PT_ARM_EXIDX:
+ return "EXIDX";
+ default:
+ break;
+ }
+
+ return NULL;
+}
+
+static const char *
get_mips_segment_type (unsigned long type)
{
switch (type)
@@ -2098,8 +2320,13 @@ get_parisc_segment_type (unsigned long type)
case PT_HP_CORE_MMF: return "HP_CORE_MMF";
case PT_HP_PARALLEL: return "HP_PARALLEL";
case PT_HP_FASTBIND: return "HP_FASTBIND";
+ case PT_HP_OPT_ANNOT: return "HP_OPT_ANNOT";
+ case PT_HP_HSL_ANNOT: return "HP_HSL_ANNOT";
+ case PT_HP_STACK: return "HP_STACK";
+ case PT_HP_CORE_UTSNAME: return "HP_CORE_UTSNAME";
case PT_PARISC_ARCHEXT: return "PARISC_ARCHEXT";
case PT_PARISC_UNWIND: return "PARISC_UNWIND";
+ case PT_PARISC_WEAKORDER: return "PARISC_WEAKORDER";
default:
break;
}
@@ -2143,7 +2370,8 @@ get_segment_type (unsigned long p_type)
case PT_GNU_EH_FRAME:
return "GNU_EH_FRAME";
- case PT_GNU_STACK: return "STACK";
+ case PT_GNU_STACK: return "GNU_STACK";
+ case PT_GNU_RELRO: return "GNU_RELRO";
default:
if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
@@ -2152,6 +2380,9 @@ get_segment_type (unsigned long p_type)
switch (elf_header.e_machine)
{
+ case EM_ARM:
+ result = get_arm_segment_type (p_type);
+ break;
case EM_MIPS:
case EM_MIPS_RS3_LE:
result = get_mips_segment_type (p_type);
@@ -2195,7 +2426,7 @@ get_segment_type (unsigned long p_type)
sprintf (buff, "LOOS+%lx", p_type - PT_LOOS);
}
else
- sprintf (buff, _("<unknown>: %lx"), p_type);
+ snprintf (buff, sizeof (buff), _("<unknown>: %lx"), p_type);
return buff;
}
@@ -2259,6 +2490,10 @@ get_parisc_section_type_name (unsigned int sh_type)
case SHT_PARISC_EXT: return "PARISC_EXT";
case SHT_PARISC_UNWIND: return "PARISC_UNWIND";
case SHT_PARISC_DOC: return "PARISC_DOC";
+ case SHT_PARISC_ANNOT: return "PARISC_ANNOT";
+ case SHT_PARISC_SYMEXTN: return "PARISC_SYMEXTN";
+ case SHT_PARISC_STUBS: return "PARISC_STUBS";
+ case SHT_PARISC_DLKM: return "PARISC_DLKM";
default:
break;
}
@@ -2268,7 +2503,7 @@ get_parisc_section_type_name (unsigned int sh_type)
static const char *
get_ia64_section_type_name (unsigned int sh_type)
{
- /* If the top 8 bits are 0x78 the next 8 are the os/abi ID. */
+ /* If the top 8 bits are 0x78 the next 8 are the os/abi ID. */
if ((sh_type & 0xFF000000) == SHT_IA_64_LOPSREG)
return get_osabi_name ((sh_type & 0x00FF0000) >> 16);
@@ -2284,6 +2519,35 @@ get_ia64_section_type_name (unsigned int sh_type)
}
static const char *
+get_x86_64_section_type_name (unsigned int sh_type)
+{
+ switch (sh_type)
+ {
+ case SHT_X86_64_UNWIND: return "X86_64_UNWIND";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+static const char *
+get_arm_section_type_name (unsigned int sh_type)
+{
+ switch (sh_type)
+ {
+ case SHT_ARM_EXIDX:
+ return "ARM_EXIDX";
+ case SHT_ARM_PREEMPTMAP:
+ return "ARM_PREEMPTMAP";
+ case SHT_ARM_ATTRIBUTES:
+ return "ARM_ATTRIBUTES";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+static const char *
get_section_type_name (unsigned int sh_type)
{
static char buff[32];
@@ -2333,6 +2597,12 @@ get_section_type_name (unsigned int sh_type)
case EM_IA_64:
result = get_ia64_section_type_name (sh_type);
break;
+ case EM_X86_64:
+ result = get_x86_64_section_type_name (sh_type);
+ break;
+ case EM_ARM:
+ result = get_arm_section_type_name (sh_type);
+ break;
default:
result = NULL;
break;
@@ -2348,7 +2618,7 @@ get_section_type_name (unsigned int sh_type)
else if ((sh_type >= SHT_LOUSER) && (sh_type <= SHT_HIUSER))
sprintf (buff, "LOUSER+%x", sh_type - SHT_LOUSER);
else
- sprintf (buff, _("<unknown>: %x"), sh_type);
+ snprintf (buff, sizeof (buff), _("<unknown>: %x"), sh_type);
return buff;
}
@@ -2356,7 +2626,7 @@ get_section_type_name (unsigned int sh_type)
#define OPTION_DEBUG_DUMP 512
-struct option options[] =
+static struct option options[] =
{
{"all", no_argument, 0, 'a'},
{"file-header", no_argument, 0, 'h'},
@@ -2366,6 +2636,9 @@ struct option options[] =
{"segments", no_argument, 0, 'l'},
{"sections", no_argument, 0, 'S'},
{"section-headers", no_argument, 0, 'S'},
+ {"section-groups", no_argument, 0, 'g'},
+ {"section-details", no_argument, 0, 't'},
+ {"full-section-name",no_argument, 0, 'N'},
{"symbols", no_argument, 0, 's'},
{"syms", no_argument, 0, 's'},
{"relocs", no_argument, 0, 'r'},
@@ -2399,19 +2672,21 @@ usage (void)
--segments An alias for --program-headers\n\
-S --section-headers Display the sections' header\n\
--sections An alias for --section-headers\n\
+ -g --section-groups Display the section groups\n\
+ -t --section-details Display the section details\n\
-e --headers Equivalent to: -h -l -S\n\
-s --syms Display the symbol table\n\
--symbols An alias for --syms\n\
-n --notes Display the core notes (if present)\n\
-r --relocs Display the relocations (if present)\n\
-u --unwind Display the unwind info (if present)\n\
- -d --dynamic Display the dynamic segment (if present)\n\
+ -d --dynamic Display the dynamic section (if present)\n\
-V --version-info Display the version sections (if present)\n\
-A --arch-specific Display architecture specific information (if any).\n\
-D --use-dynamic Use the dynamic section info when displaying symbols\n\
-x --hex-dump=<number> Dump the contents of section <number>\n\
- -w[liaprmfFso] or\n\
- --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str,=loc]\n\
+ -w[liaprmfFsoR] or\n\
+ --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, _("\
@@ -2421,6 +2696,7 @@ usage (void)
fprintf (stdout, _("\
-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);
@@ -2428,6 +2704,11 @@ usage (void)
exit (0);
}
+/* Record the fact that the user wants the contents of section number
+ SECTION to be displayed using the method(s) encoded as flags bits
+ in TYPE. Note, TYPE can be zero if we are creating the array for
+ the first time. */
+
static void
request_dump (unsigned int section, int type)
{
@@ -2457,6 +2738,27 @@ request_dump (unsigned int section, int type)
return;
}
+/* Request a dump by section name. */
+
+static void
+request_dump_byname (const char *section, int type)
+{
+ struct dump_list_entry *new_request;
+
+ new_request = malloc (sizeof (struct dump_list_entry));
+ if (!new_request)
+ error (_("Out of memory allocating dump request table."));
+
+ new_request->name = strdup (section);
+ if (!new_request->name)
+ error (_("Out of memory allocating dump request table."));
+
+ new_request->type = type;
+
+ new_request->next = dump_sects_byname;
+ dump_sects_byname = new_request;
+}
+
static void
parse_args (int argc, char **argv)
{
@@ -2466,7 +2768,7 @@ parse_args (int argc, char **argv)
usage ();
while ((c = getopt_long
- (argc, argv, "ersuahnldSDAIw::x:i:vVWH", options, NULL)) != EOF)
+ (argc, argv, "ersuahnldSDAINtgw::x:i:vVWH", options, NULL)) != EOF)
{
char *cp;
int section;
@@ -2487,12 +2789,21 @@ parse_args (int argc, char **argv)
do_dynamic++;
do_header++;
do_sections++;
+ do_section_groups++;
do_segments++;
do_version++;
do_histogram++;
do_arch++;
do_notes++;
break;
+ case 'g':
+ do_section_groups++;
+ break;
+ case 't':
+ case 'N':
+ do_sections++;
+ do_section_details++;
+ break;
case 'e':
do_header++;
do_sections++;
@@ -2535,11 +2846,10 @@ parse_args (int argc, char **argv)
do_dump++;
section = strtoul (optarg, & cp, 0);
if (! *cp && section >= 0)
- {
- request_dump (section, HEX_DUMP);
- break;
- }
- goto oops;
+ request_dump (section, HEX_DUMP);
+ else
+ request_dump_byname (optarg, HEX_DUMP);
+ break;
case 'w':
do_dump++;
if (optarg == 0)
@@ -2574,10 +2884,13 @@ parse_args (int argc, char **argv)
break;
case 'r':
- case 'R':
do_debug_aranges = 1;
break;
+ case 'R':
+ do_debug_ranges = 1;
+ break;
+
case 'F':
do_debug_frames_interp = 1;
case 'f':
@@ -2611,10 +2924,33 @@ parse_args (int argc, char **argv)
do_debugging = 1;
else
{
- static const char *debug_dump_opt[]
- = { "line", "info", "abbrev", "pubnames", "ranges",
- "macro", "frames", "frames-interp", "str", "loc", NULL };
- unsigned int index;
+ typedef struct
+ {
+ const char * option;
+ int * variable;
+ }
+ debug_dump_long_opts;
+
+ debug_dump_long_opts opts_table [] =
+ {
+ /* Please keep this table alpha- sorted. */
+ { "Ranges", & do_debug_ranges },
+ { "abbrev", & do_debug_abbrevs },
+ { "aranges", & do_debug_aranges },
+ { "frames", & do_debug_frames },
+ { "frames-interp", & do_debug_frames_interp },
+ { "info", & do_debug_info },
+ { "line", & do_debug_lines },
+ { "loc", & do_debug_loc },
+ { "macro", & do_debug_macinfo },
+ { "pubnames", & do_debug_pubnames },
+ /* This entry is for compatability
+ with earlier versions of readelf. */
+ { "ranges", & do_debug_aranges },
+ { "str", & do_debug_str },
+ { NULL, NULL }
+ };
+
const char *p;
do_debugging = 0;
@@ -2622,59 +2958,28 @@ parse_args (int argc, char **argv)
p = optarg;
while (*p)
{
- for (index = 0; debug_dump_opt[index]; index++)
+ debug_dump_long_opts * entry;
+
+ for (entry = opts_table; entry->option; entry++)
{
- size_t len = strlen (debug_dump_opt[index]);
+ size_t len = strlen (entry->option);
- if (strncmp (p, debug_dump_opt[index], len) == 0
+ if (strneq (p, entry->option, len)
&& (p[len] == ',' || p[len] == '\0'))
{
- switch (p[0])
- {
- case 'i':
- do_debug_info = 1;
- break;
-
- case 'a':
- do_debug_abbrevs = 1;
- break;
-
- case 'l':
- if (p[1] == 'i')
- do_debug_lines = 1;
- else
- do_debug_loc = 1;
- break;
-
- case 'p':
- do_debug_pubnames = 1;
- break;
-
- case 'r':
- do_debug_aranges = 1;
- break;
-
- case 'f':
- if (len > 6)
- do_debug_frames_interp = 1;
- do_debug_frames = 1;
- break;
-
- case 'm':
- do_debug_macinfo = 1;
- break;
-
- case 's':
- do_debug_str = 1;
- break;
- }
+ * entry->variable = 1;
+
+ /* The --debug-dump=frames-interp option also
+ enables the --debug-dump=frames option. */
+ if (do_debug_frames_interp)
+ do_debug_frames = 1;
p += len;
break;
}
}
- if (debug_dump_opt[index] == NULL)
+ if (entry->option == NULL)
{
warn (_("Unrecognized debug option '%s'\n"), p);
p = strchr (p, ',');
@@ -2708,7 +3013,9 @@ parse_args (int argc, char **argv)
do_wide++;
break;
default:
+#ifdef SUPPORT_DISASSEMBLY
oops:
+#endif
/* xgettext:c-format */
error (_("Invalid option '-%c'\n"), c);
/* Drop through. */
@@ -2719,12 +3026,13 @@ parse_args (int argc, char **argv)
if (!do_dynamic && !do_syms && !do_reloc && !do_unwind && !do_sections
&& !do_segments && !do_header && !do_dump && !do_version
- && !do_histogram && !do_debugging && !do_arch && !do_notes)
+ && !do_histogram && !do_debugging && !do_arch && !do_notes
+ && !do_section_groups)
usage ();
else if (argc < 3)
{
warn (_("Nothing to do.\n"));
- usage();
+ usage ();
}
}
@@ -2739,7 +3047,7 @@ get_elf_class (unsigned int elf_class)
case ELFCLASS32: return "ELF32";
case ELFCLASS64: return "ELF64";
default:
- sprintf (buff, _("<unknown: %x>"), elf_class);
+ snprintf (buff, sizeof (buff), _("<unknown: %x>"), elf_class);
return buff;
}
}
@@ -2755,7 +3063,7 @@ get_data_encoding (unsigned int encoding)
case ELFDATA2LSB: return _("2's complement, little endian");
case ELFDATA2MSB: return _("2's complement, big endian");
default:
- sprintf (buff, _("<unknown: %x>"), encoding);
+ snprintf (buff, sizeof (buff), _("<unknown: %x>"), encoding);
return buff;
}
}
@@ -2860,7 +3168,7 @@ get_32bit_program_headers (FILE *file, Elf_Internal_Phdr *program_headers)
unsigned int i;
phdrs = get_data (NULL, file, elf_header.e_phoff,
- elf_header.e_phentsize * elf_header.e_phnum,
+ elf_header.e_phentsize, elf_header.e_phnum,
_("program headers"));
if (!phdrs)
return 0;
@@ -2893,7 +3201,7 @@ get_64bit_program_headers (FILE *file, Elf_Internal_Phdr *program_headers)
unsigned int i;
phdrs = get_data (NULL, file, elf_header.e_phoff,
- elf_header.e_phentsize * elf_header.e_phnum,
+ elf_header.e_phentsize, elf_header.e_phnum,
_("program headers"));
if (!phdrs)
return 0;
@@ -2904,12 +3212,12 @@ get_64bit_program_headers (FILE *file, Elf_Internal_Phdr *program_headers)
{
internal->p_type = BYTE_GET (external->p_type);
internal->p_flags = BYTE_GET (external->p_flags);
- internal->p_offset = BYTE_GET8 (external->p_offset);
- internal->p_vaddr = BYTE_GET8 (external->p_vaddr);
- internal->p_paddr = BYTE_GET8 (external->p_paddr);
- internal->p_filesz = BYTE_GET8 (external->p_filesz);
- internal->p_memsz = BYTE_GET8 (external->p_memsz);
- internal->p_align = BYTE_GET8 (external->p_align);
+ internal->p_offset = BYTE_GET (external->p_offset);
+ internal->p_vaddr = BYTE_GET (external->p_vaddr);
+ internal->p_paddr = BYTE_GET (external->p_paddr);
+ internal->p_filesz = BYTE_GET (external->p_filesz);
+ internal->p_memsz = BYTE_GET (external->p_memsz);
+ internal->p_align = BYTE_GET (external->p_align);
}
free (phdrs);
@@ -2928,7 +3236,7 @@ get_program_headers (FILE *file)
if (program_headers != NULL)
return 1;
- phdrs = malloc (elf_header.e_phnum * sizeof (Elf_Internal_Phdr));
+ phdrs = cmalloc (elf_header.e_phnum, sizeof (Elf_Internal_Phdr));
if (phdrs == NULL)
{
@@ -3090,8 +3398,35 @@ process_program_headers (FILE *file)
if (dynamic_addr)
error (_("more than one dynamic segment\n"));
- dynamic_addr = segment->p_offset;
- dynamic_size = segment->p_filesz;
+ /* Try to locate the .dynamic section. If there is
+ a section header table, we can easily locate it. */
+ if (section_headers != NULL)
+ {
+ Elf_Internal_Shdr *sec;
+
+ sec = find_section (".dynamic");
+ if (sec == NULL || sec->sh_size == 0)
+ {
+ error (_("no .dynamic section in the dynamic segment"));
+ 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"));
+ else if (dynamic_addr > segment->p_offset)
+ warn (_("the .dynamic section is not the first section in the dynamic segment."));
+ }
+ else
+ {
+ /* Otherwise, we can only assume that the .dynamic
+ section is the first section in the DYNAMIC segment. */
+ dynamic_addr = segment->p_offset;
+ dynamic_size = segment->p_filesz;
+ }
break;
case PT_INTERP:
@@ -3114,13 +3449,11 @@ process_program_headers (FILE *file)
putc ('\n', stdout);
}
- if (do_segments && section_headers != NULL)
+ if (do_segments && section_headers != NULL && string_table != NULL)
{
printf (_("\n Section to Segment mapping:\n"));
printf (_(" Segment Sections...\n"));
- assert (string_table != NULL);
-
for (i = 0; i < elf_header.e_phnum; i++)
{
unsigned int j;
@@ -3133,16 +3466,7 @@ process_program_headers (FILE *file)
for (j = 1; j < elf_header.e_shnum; j++, section++)
{
- if (section->sh_size > 0
- /* Compare allocated sections by VMA, unallocated
- sections by file offset. */
- && (section->sh_flags & SHF_ALLOC
- ? (section->sh_addr >= segment->p_vaddr
- && section->sh_addr + section->sh_size
- <= segment->p_vaddr + segment->p_memsz)
- : ((bfd_vma) section->sh_offset >= segment->p_offset
- && (section->sh_offset + section->sh_size
- <= segment->p_offset + segment->p_filesz))))
+ if (ELF_IS_SECTION_IN_SEGMENT_MEMORY(section, segment))
printf ("%s ", SECTION_NAME (section));
}
@@ -3193,11 +3517,11 @@ get_32bit_section_headers (FILE *file, unsigned int num)
unsigned int i;
shdrs = get_data (NULL, file, elf_header.e_shoff,
- elf_header.e_shentsize * num, _("section headers"));
+ elf_header.e_shentsize, num, _("section headers"));
if (!shdrs)
return 0;
- section_headers = malloc (num * sizeof (Elf_Internal_Shdr));
+ section_headers = cmalloc (num, sizeof (Elf_Internal_Shdr));
if (section_headers == NULL)
{
@@ -3234,11 +3558,11 @@ get_64bit_section_headers (FILE *file, unsigned int num)
unsigned int i;
shdrs = get_data (NULL, file, elf_header.e_shoff,
- elf_header.e_shentsize * num, _("section headers"));
+ elf_header.e_shentsize, num, _("section headers"));
if (!shdrs)
return 0;
- section_headers = malloc (num * sizeof (Elf_Internal_Shdr));
+ section_headers = cmalloc (num, sizeof (Elf_Internal_Shdr));
if (section_headers == NULL)
{
@@ -3252,10 +3576,10 @@ get_64bit_section_headers (FILE *file, unsigned int num)
{
internal->sh_name = BYTE_GET (shdrs[i].sh_name);
internal->sh_type = BYTE_GET (shdrs[i].sh_type);
- internal->sh_flags = BYTE_GET8 (shdrs[i].sh_flags);
- internal->sh_addr = BYTE_GET8 (shdrs[i].sh_addr);
- internal->sh_size = BYTE_GET8 (shdrs[i].sh_size);
- internal->sh_entsize = BYTE_GET8 (shdrs[i].sh_entsize);
+ internal->sh_flags = BYTE_GET (shdrs[i].sh_flags);
+ internal->sh_addr = BYTE_GET (shdrs[i].sh_addr);
+ internal->sh_size = BYTE_GET (shdrs[i].sh_size);
+ internal->sh_entsize = BYTE_GET (shdrs[i].sh_entsize);
internal->sh_link = BYTE_GET (shdrs[i].sh_link);
internal->sh_info = BYTE_GET (shdrs[i].sh_info);
internal->sh_offset = BYTE_GET (shdrs[i].sh_offset);
@@ -3277,7 +3601,7 @@ get_32bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
Elf_Internal_Sym *psym;
unsigned int j;
- esyms = get_data (NULL, file, section->sh_offset, section->sh_size,
+ esyms = get_data (NULL, file, section->sh_offset, 1, section->sh_size,
_("symbols"));
if (!esyms)
return NULL;
@@ -3288,7 +3612,7 @@ get_32bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
== (unsigned long) SECTION_HEADER_NUM (section - section_headers)))
{
shndx = get_data (NULL, file, symtab_shndx_hdr->sh_offset,
- symtab_shndx_hdr->sh_size, _("symtab shndx"));
+ 1, symtab_shndx_hdr->sh_size, _("symtab shndx"));
if (!shndx)
{
free (esyms);
@@ -3297,7 +3621,7 @@ get_32bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
}
number = section->sh_size / section->sh_entsize;
- isyms = malloc (number * sizeof (Elf_Internal_Sym));
+ isyms = cmalloc (number, sizeof (Elf_Internal_Sym));
if (isyms == NULL)
{
@@ -3340,7 +3664,7 @@ get_64bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
Elf_Internal_Sym *psym;
unsigned int j;
- esyms = get_data (NULL, file, section->sh_offset, section->sh_size,
+ esyms = get_data (NULL, file, section->sh_offset, 1, section->sh_size,
_("symbols"));
if (!esyms)
return NULL;
@@ -3351,7 +3675,7 @@ get_64bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
== (unsigned long) SECTION_HEADER_NUM (section - section_headers)))
{
shndx = get_data (NULL, file, symtab_shndx_hdr->sh_offset,
- symtab_shndx_hdr->sh_size, _("symtab shndx"));
+ 1, symtab_shndx_hdr->sh_size, _("symtab shndx"));
if (!shndx)
{
free (esyms);
@@ -3360,7 +3684,7 @@ get_64bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
}
number = section->sh_size / section->sh_entsize;
- isyms = malloc (number * sizeof (Elf_Internal_Sym));
+ isyms = cmalloc (number, sizeof (Elf_Internal_Sym));
if (isyms == NULL)
{
@@ -3382,8 +3706,8 @@ get_64bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
if (psym->st_shndx == SHN_XINDEX && shndx != NULL)
psym->st_shndx
= byte_get ((unsigned char *) &shndx[j], sizeof (shndx[j]));
- psym->st_value = BYTE_GET8 (esyms[j].st_value);
- psym->st_size = BYTE_GET8 (esyms[j].st_size);
+ psym->st_value = BYTE_GET (esyms[j].st_value);
+ psym->st_size = BYTE_GET (esyms[j].st_size);
}
if (shndx)
@@ -3396,9 +3720,38 @@ get_64bit_elf_symbols (FILE *file, Elf_Internal_Shdr *section)
static const char *
get_elf_section_flags (bfd_vma sh_flags)
{
- static char buff[32];
+ static char buff[1024];
+ char *p = buff;
+ int field_size = is_32bit_elf ? 8 : 16;
+ int index, size = sizeof (buff) - (field_size + 4 + 1);
+ bfd_vma os_flags = 0;
+ bfd_vma proc_flags = 0;
+ bfd_vma unknown_flags = 0;
+ const struct
+ {
+ const char *str;
+ int len;
+ }
+ flags [] =
+ {
+ { "WRITE", 5 },
+ { "ALLOC", 5 },
+ { "EXEC", 4 },
+ { "MERGE", 5 },
+ { "STRINGS", 7 },
+ { "INFO LINK", 9 },
+ { "LINK ORDER", 10 },
+ { "OS NONCONF", 10 },
+ { "GROUP", 5 },
+ { "TLS", 3 }
+ };
- *buff = 0;
+ if (do_section_details)
+ {
+ sprintf (buff, "[%*.*lx]: ",
+ field_size, field_size, (unsigned long) sh_flags);
+ p += field_size + 4;
+ }
while (sh_flags)
{
@@ -3407,36 +3760,134 @@ get_elf_section_flags (bfd_vma sh_flags)
flag = sh_flags & - sh_flags;
sh_flags &= ~ flag;
- switch (flag)
+ if (do_section_details)
{
- case SHF_WRITE: strcat (buff, "W"); break;
- case SHF_ALLOC: strcat (buff, "A"); break;
- case SHF_EXECINSTR: strcat (buff, "X"); break;
- case SHF_MERGE: strcat (buff, "M"); break;
- case SHF_STRINGS: strcat (buff, "S"); break;
- case SHF_INFO_LINK: strcat (buff, "I"); break;
- case SHF_LINK_ORDER: strcat (buff, "L"); break;
- case SHF_OS_NONCONFORMING: strcat (buff, "O"); break;
- case SHF_GROUP: strcat (buff, "G"); break;
- case SHF_TLS: strcat (buff, "T"); break;
+ switch (flag)
+ {
+ case SHF_WRITE: index = 0; break;
+ case SHF_ALLOC: index = 1; break;
+ case SHF_EXECINSTR: index = 2; break;
+ case SHF_MERGE: index = 3; break;
+ case SHF_STRINGS: index = 4; break;
+ case SHF_INFO_LINK: index = 5; break;
+ case SHF_LINK_ORDER: index = 6; break;
+ case SHF_OS_NONCONFORMING: index = 7; break;
+ case SHF_GROUP: index = 8; break;
+ case SHF_TLS: index = 9; break;
- default:
- if (flag & SHF_MASKOS)
+ default:
+ index = -1;
+ break;
+ }
+
+ if (index != -1)
{
- strcat (buff, "o");
- sh_flags &= ~ SHF_MASKOS;
+ if (p != buff + field_size + 4)
+ {
+ if (size < (10 + 2))
+ abort ();
+ size -= 2;
+ *p++ = ',';
+ *p++ = ' ';
+ }
+
+ size -= flags [index].len;
+ p = stpcpy (p, flags [index].str);
}
+ else if (flag & SHF_MASKOS)
+ os_flags |= flag;
else if (flag & SHF_MASKPROC)
+ proc_flags |= flag;
+ else
+ unknown_flags |= flag;
+ }
+ else
+ {
+ switch (flag)
+ {
+ case SHF_WRITE: *p = 'W'; break;
+ case SHF_ALLOC: *p = 'A'; break;
+ case SHF_EXECINSTR: *p = 'X'; break;
+ case SHF_MERGE: *p = 'M'; break;
+ case SHF_STRINGS: *p = 'S'; break;
+ case SHF_INFO_LINK: *p = 'I'; break;
+ case SHF_LINK_ORDER: *p = 'L'; break;
+ case SHF_OS_NONCONFORMING: *p = 'O'; break;
+ case SHF_GROUP: *p = 'G'; break;
+ case SHF_TLS: *p = 'T'; break;
+
+ default:
+ if (elf_header.e_machine == EM_X86_64
+ && flag == SHF_X86_64_LARGE)
+ *p = 'l';
+ else if (flag & SHF_MASKOS)
+ {
+ *p = 'o';
+ sh_flags &= ~ SHF_MASKOS;
+ }
+ else if (flag & SHF_MASKPROC)
+ {
+ *p = 'p';
+ sh_flags &= ~ SHF_MASKPROC;
+ }
+ else
+ *p = 'x';
+ break;
+ }
+ p++;
+ }
+ }
+
+ if (do_section_details)
+ {
+ if (os_flags)
+ {
+ size -= 5 + field_size;
+ if (p != buff + field_size + 4)
{
- strcat (buff, "p");
- sh_flags &= ~ SHF_MASKPROC;
+ if (size < (2 + 1))
+ abort ();
+ size -= 2;
+ *p++ = ',';
+ *p++ = ' ';
}
- else
- strcat (buff, "x");
- break;
+ sprintf (p, "OS (%*.*lx)", field_size, field_size,
+ (unsigned long) os_flags);
+ p += 5 + field_size;
+ }
+ if (proc_flags)
+ {
+ size -= 7 + field_size;
+ if (p != buff + field_size + 4)
+ {
+ if (size < (2 + 1))
+ abort ();
+ size -= 2;
+ *p++ = ',';
+ *p++ = ' ';
+ }
+ sprintf (p, "PROC (%*.*lx)", field_size, field_size,
+ (unsigned long) proc_flags);
+ p += 7 + field_size;
+ }
+ if (unknown_flags)
+ {
+ size -= 10 + field_size;
+ if (p != buff + field_size + 4)
+ {
+ if (size < (2 + 1))
+ abort ();
+ size -= 2;
+ *p++ = ',';
+ *p++ = ' ';
+ }
+ sprintf (p, "UNKNOWN (%*.*lx)", field_size, field_size,
+ (unsigned long) unknown_flags);
+ p += 10 + field_size;
}
}
+ *p = '\0';
return buff;
}
@@ -3469,17 +3920,17 @@ process_section_headers (FILE *file)
return 0;
/* Read in the string table, so that we have names to display. */
- section = SECTION_HEADER (elf_header.e_shstrndx);
-
- if (section->sh_size != 0)
+ if (SECTION_HEADER_INDEX (elf_header.e_shstrndx) < elf_header.e_shnum)
{
- string_table = get_data (NULL, file, section->sh_offset,
- section->sh_size, _("string table"));
+ section = SECTION_HEADER (elf_header.e_shstrndx);
- if (string_table == NULL)
- return 0;
+ if (section->sh_size != 0)
+ {
+ string_table = get_data (NULL, file, section->sh_offset,
+ 1, section->sh_size, _("string table"));
- string_table_length = section->sh_size;
+ string_table_length = string_table != NULL ? section->sh_size : 0;
+ }
}
/* Scan the sections for the dynamic symbol table
@@ -3489,6 +3940,42 @@ process_section_headers (FILE *file)
dynamic_syminfo = NULL;
symtab_shndx_hdr = NULL;
+ eh_addr_size = is_32bit_elf ? 4 : 8;
+ switch (elf_header.e_machine)
+ {
+ case EM_MIPS:
+ case EM_MIPS_RS3_LE:
+ /* The 64-bit MIPS EABI uses a combination of 32-bit ELF and 64-bit
+ FDE addresses. However, the ABI also has a semi-official ILP32
+ variant for which the normal FDE address size rules apply.
+
+ GCC 4.0 marks EABI64 objects with a dummy .gcc_compiled_longXX
+ section, where XX is the size of longs in bits. Unfortunately,
+ earlier compilers provided no way of distinguishing ILP32 objects
+ from LP64 objects, so if there's any doubt, we should assume that
+ the official LP64 form is being used. */
+ if ((elf_header.e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI64
+ && find_section (".gcc_compiled_long32") == NULL)
+ eh_addr_size = 8;
+ break;
+ }
+
+#define CHECK_ENTSIZE_VALUES(section, i, size32, size64) \
+ do \
+ { \
+ size_t expected_entsize \
+ = is_32bit_elf ? size32 : size64; \
+ if (section->sh_entsize != expected_entsize) \
+ error (_("Section %d has invalid sh_entsize %lx (expected %lx)\n"), \
+ i, (unsigned long int) section->sh_entsize, \
+ (unsigned long int) expected_entsize); \
+ section->sh_entsize = expected_entsize; \
+ } \
+ while (0)
+#define CHECK_ENTSIZE(section, i, type) \
+ CHECK_ENTSIZE_VALUES (section, i, sizeof (Elf32_External_##type), \
+ sizeof (Elf64_External_##type))
+
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
i++, section++)
@@ -3503,11 +3990,12 @@ process_section_headers (FILE *file)
continue;
}
+ CHECK_ENTSIZE (section, i, Sym);
num_dynamic_syms = section->sh_size / section->sh_entsize;
dynamic_symbols = GET_ELF_SYMBOLS (file, section);
}
else if (section->sh_type == SHT_STRTAB
- && strcmp (name, ".dynstr") == 0)
+ && streq (name, ".dynstr"))
{
if (dynamic_strings != NULL)
{
@@ -3516,7 +4004,8 @@ process_section_headers (FILE *file)
}
dynamic_strings = get_data (NULL, file, section->sh_offset,
- section->sh_size, _("dynamic strings"));
+ 1, section->sh_size, _("dynamic strings"));
+ dynamic_strings_length = section->sh_size;
}
else if (section->sh_type == SHT_SYMTAB_SHNDX)
{
@@ -3527,32 +4016,41 @@ process_section_headers (FILE *file)
}
symtab_shndx_hdr = section;
}
+ else if (section->sh_type == SHT_SYMTAB)
+ CHECK_ENTSIZE (section, i, Sym);
+ else if (section->sh_type == SHT_GROUP)
+ CHECK_ENTSIZE_VALUES (section, i, GRP_ENTRY_SIZE, GRP_ENTRY_SIZE);
+ else if (section->sh_type == SHT_REL)
+ CHECK_ENTSIZE (section, i, Rel);
+ else if (section->sh_type == SHT_RELA)
+ CHECK_ENTSIZE (section, i, Rela);
else if ((do_debugging || do_debug_info || do_debug_abbrevs
|| do_debug_lines || do_debug_pubnames || do_debug_aranges
|| do_debug_frames || do_debug_macinfo || do_debug_str
- || do_debug_loc)
- && strncmp (name, ".debug_", 7) == 0)
+ || do_debug_loc || do_debug_ranges)
+ && strneq (name, ".debug_", 7))
{
name += 7;
if (do_debugging
- || (do_debug_info && (strcmp (name, "info") == 0))
- || (do_debug_abbrevs && (strcmp (name, "abbrev") == 0))
- || (do_debug_lines && (strcmp (name, "line") == 0))
- || (do_debug_pubnames && (strcmp (name, "pubnames") == 0))
- || (do_debug_aranges && (strcmp (name, "aranges") == 0))
- || (do_debug_frames && (strcmp (name, "frame") == 0))
- || (do_debug_macinfo && (strcmp (name, "macinfo") == 0))
- || (do_debug_str && (strcmp (name, "str") == 0))
- || (do_debug_loc && (strcmp (name, "loc") == 0))
+ || (do_debug_info && streq (name, "info"))
+ || (do_debug_abbrevs && streq (name, "abbrev"))
+ || (do_debug_lines && streq (name, "line"))
+ || (do_debug_pubnames && streq (name, "pubnames"))
+ || (do_debug_aranges && streq (name, "aranges"))
+ || (do_debug_ranges && streq (name, "ranges"))
+ || (do_debug_frames && streq (name, "frame"))
+ || (do_debug_macinfo && streq (name, "macinfo"))
+ || (do_debug_str && streq (name, "str"))
+ || (do_debug_loc && streq (name, "loc"))
)
request_dump (i, DEBUG_DUMP);
}
/* linkonce section to be combined with .debug_info at link time. */
else if ((do_debugging || do_debug_info)
- && strncmp (name, ".gnu.linkonce.wi.", 17) == 0)
+ && strneq (name, ".gnu.linkonce.wi.", 17))
request_dump (i, DEBUG_DUMP);
- else if (do_debug_frames && strcmp (name, ".eh_frame") == 0)
+ else if (do_debug_frames && streq (name, ".eh_frame"))
request_dump (i, DEBUG_DUMP);
}
@@ -3565,25 +4063,63 @@ process_section_headers (FILE *file)
printf (_("\nSection Header:\n"));
if (is_32bit_elf)
- printf
- (_(" [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n"));
+ {
+ if (do_section_details)
+ {
+ printf (_(" [Nr] Name\n"));
+ printf (_(" Type Addr Off Size ES Lk Inf Al\n"));
+ }
+ else
+ printf
+ (_(" [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n"));
+ }
else if (do_wide)
- printf
- (_(" [Nr] Name Type Address Off Size ES Flg Lk Inf Al\n"));
+ {
+ if (do_section_details)
+ {
+ printf (_(" [Nr] Name\n"));
+ printf (_(" Type Address Off Size ES Lk Inf Al\n"));
+ }
+ else
+ printf
+ (_(" [Nr] Name Type Address Off Size ES Flg Lk Inf Al\n"));
+ }
else
{
- printf (_(" [Nr] Name Type Address Offset\n"));
- printf (_(" Size EntSize Flags Link Info Align\n"));
+ if (do_section_details)
+ {
+ printf (_(" [Nr] Name\n"));
+ printf (_(" Type Address Offset Link\n"));
+ printf (_(" Size EntSize Info Align\n"));
+ }
+ else
+ {
+ printf (_(" [Nr] Name Type Address Offset\n"));
+ printf (_(" Size EntSize Flags Link Info Align\n"));
+ }
}
+ if (do_section_details)
+ printf (_(" Flags\n"));
+
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
i++, section++)
{
- printf (" [%2u] %-17.17s %-15.15s ",
- SECTION_HEADER_NUM (i),
- SECTION_NAME (section),
- get_section_type_name (section->sh_type));
+ if (do_section_details)
+ {
+ printf (" [%2u] %s\n",
+ SECTION_HEADER_NUM (i),
+ SECTION_NAME (section));
+ if (is_32bit_elf || do_wide)
+ printf (" %-15.15s ",
+ get_section_type_name (section->sh_type));
+ }
+ else
+ printf (" [%2u] %-17.17s %-15.15s ",
+ SECTION_HEADER_NUM (i),
+ SECTION_NAME (section),
+ get_section_type_name (section->sh_type));
if (is_32bit_elf)
{
@@ -3594,9 +4130,12 @@ process_section_headers (FILE *file)
(unsigned long) section->sh_size,
(unsigned long) section->sh_entsize);
- printf (" %3s ", get_elf_section_flags (section->sh_flags));
+ if (do_section_details)
+ fputs (" ", stdout);
+ else
+ printf (" %3s ", get_elf_section_flags (section->sh_flags));
- printf ("%2ld %3lx %2ld\n",
+ printf ("%2ld %3lu %2ld\n",
(unsigned long) section->sh_link,
(unsigned long) section->sh_info,
(unsigned long) section->sh_addralign);
@@ -3629,9 +4168,12 @@ process_section_headers (FILE *file)
print_vma (section->sh_entsize, LONG_HEX);
}
- printf (" %3s ", get_elf_section_flags (section->sh_flags));
+ if (do_section_details)
+ fputs (" ", stdout);
+ else
+ printf (" %3s ", get_elf_section_flags (section->sh_flags));
- printf ("%2ld %3lx ",
+ printf ("%2ld %3lu ",
(unsigned long) section->sh_link,
(unsigned long) section->sh_info);
@@ -3643,6 +4185,27 @@ process_section_headers (FILE *file)
putchar ('\n');
}
}
+ else if (do_section_details)
+ {
+ printf (" %-15.15s ",
+ get_section_type_name (section->sh_type));
+ print_vma (section->sh_addr, LONG_HEX);
+ if ((long) section->sh_offset == section->sh_offset)
+ printf (" %16.16lx", (unsigned long) section->sh_offset);
+ else
+ {
+ printf (" ");
+ print_vma (section->sh_offset, LONG_HEX);
+ }
+ printf (" %ld\n ", (unsigned long) section->sh_link);
+ print_vma (section->sh_size, LONG_HEX);
+ putchar (' ');
+ print_vma (section->sh_entsize, LONG_HEX);
+
+ printf (" %-16lu %ld\n",
+ (unsigned long) section->sh_info,
+ (unsigned long) section->sh_addralign);
+ }
else
{
putchar (' ');
@@ -3661,14 +4224,18 @@ process_section_headers (FILE *file)
printf (" %3s ", get_elf_section_flags (section->sh_flags));
- printf (" %2ld %3lx %ld\n",
+ printf (" %2ld %3lu %ld\n",
(unsigned long) section->sh_link,
(unsigned long) section->sh_info,
(unsigned long) section->sh_addralign);
}
+
+ if (do_section_details)
+ printf (" %s\n", get_elf_section_flags (section->sh_flags));
}
- printf (_("Key to Flags:\n\
+ if (!do_section_details)
+ printf (_("Key to Flags:\n\
W (write), A (alloc), X (execute), M (merge), S (strings)\n\
I (info), L (link order), G (group), x (unknown)\n\
O (extra OS processing required) o (OS specific), p (processor specific)\n"));
@@ -3676,7 +4243,257 @@ process_section_headers (FILE *file)
return 1;
}
-struct
+static const char *
+get_group_flags (unsigned int flags)
+{
+ static char buff[32];
+ switch (flags)
+ {
+ case GRP_COMDAT:
+ return "COMDAT";
+
+ default:
+ snprintf (buff, sizeof (buff), _("[<unknown>: 0x%x]"), flags);
+ break;
+ }
+ return buff;
+}
+
+static int
+process_section_groups (FILE *file)
+{
+ Elf_Internal_Shdr *section;
+ unsigned int i;
+ struct group *group;
+ Elf_Internal_Shdr *symtab_sec, *strtab_sec;
+ Elf_Internal_Sym *symtab;
+ char *strtab;
+ size_t strtab_size;
+
+ /* Don't process section groups unless needed. */
+ if (!do_unwind && !do_section_groups)
+ return 1;
+
+ if (elf_header.e_shnum == 0)
+ {
+ if (do_section_groups)
+ printf (_("\nThere are no sections in this file.\n"));
+
+ return 1;
+ }
+
+ if (section_headers == NULL)
+ {
+ error (_("Section headers are not available!\n"));
+ abort ();
+ }
+
+ section_headers_groups = calloc (elf_header.e_shnum,
+ sizeof (struct group *));
+
+ if (section_headers_groups == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ /* Scan the sections for the group section. */
+ group_count = 0;
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum;
+ i++, section++)
+ if (section->sh_type == SHT_GROUP)
+ group_count++;
+
+ if (group_count == 0)
+ {
+ if (do_section_groups)
+ printf (_("\nThere are no section groups in this file.\n"));
+
+ return 1;
+ }
+
+ section_groups = calloc (group_count, sizeof (struct group));
+
+ if (section_groups == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ symtab_sec = NULL;
+ strtab_sec = NULL;
+ symtab = NULL;
+ strtab = NULL;
+ strtab_size = 0;
+ for (i = 0, section = section_headers, group = section_groups;
+ i < elf_header.e_shnum;
+ i++, section++)
+ {
+ if (section->sh_type == SHT_GROUP)
+ {
+ char *name = SECTION_NAME (section);
+ char *group_name;
+ unsigned char *start, *indices;
+ unsigned int entry, j, size;
+ Elf_Internal_Shdr *sec;
+ Elf_Internal_Sym *sym;
+
+ /* Get the symbol table. */
+ if (SECTION_HEADER_INDEX (section->sh_link) >= elf_header.e_shnum
+ || ((sec = SECTION_HEADER (section->sh_link))->sh_type
+ != SHT_SYMTAB))
+ {
+ error (_("Bad sh_link in group section `%s'\n"), name);
+ continue;
+ }
+
+ if (symtab_sec != sec)
+ {
+ symtab_sec = sec;
+ if (symtab)
+ free (symtab);
+ symtab = GET_ELF_SYMBOLS (file, symtab_sec);
+ }
+
+ sym = symtab + section->sh_info;
+
+ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ bfd_vma sec_index = SECTION_HEADER_INDEX (sym->st_shndx);
+ if (sec_index == 0)
+ {
+ error (_("Bad sh_info in group section `%s'\n"), name);
+ continue;
+ }
+
+ group_name = SECTION_NAME (section_headers + sec_index);
+ strtab_sec = NULL;
+ if (strtab)
+ free (strtab);
+ strtab = NULL;
+ strtab_size = 0;
+ }
+ else
+ {
+ /* Get the string table. */
+ if (SECTION_HEADER_INDEX (symtab_sec->sh_link)
+ >= elf_header.e_shnum)
+ {
+ strtab_sec = NULL;
+ if (strtab)
+ free (strtab);
+ strtab = NULL;
+ strtab_size = 0;
+ }
+ else if (strtab_sec
+ != (sec = SECTION_HEADER (symtab_sec->sh_link)))
+ {
+ strtab_sec = sec;
+ if (strtab)
+ free (strtab);
+ strtab = get_data (NULL, file, strtab_sec->sh_offset,
+ 1, strtab_sec->sh_size,
+ _("string table"));
+ strtab_size = strtab != NULL ? strtab_sec->sh_size : 0;
+ }
+ group_name = sym->st_name < strtab_size
+ ? strtab + sym->st_name : "<corrupt>";
+ }
+
+ start = get_data (NULL, file, section->sh_offset,
+ 1, section->sh_size, _("section data"));
+
+ indices = start;
+ size = (section->sh_size / section->sh_entsize) - 1;
+ entry = byte_get (indices, 4);
+ indices += 4;
+
+ if (do_section_groups)
+ {
+ printf ("\n%s group section [%5u] `%s' [%s] contains %u sections:\n",
+ get_group_flags (entry), i, name, group_name, size);
+
+ printf (_(" [Index] Name\n"));
+ }
+
+ group->group_index = i;
+
+ for (j = 0; j < size; j++)
+ {
+ struct group_list *g;
+
+ entry = byte_get (indices, 4);
+ indices += 4;
+
+ if (SECTION_HEADER_INDEX (entry) >= elf_header.e_shnum)
+ {
+ error (_("section [%5u] in group section [%5u] > maximum section [%5u]\n"),
+ entry, i, elf_header.e_shnum - 1);
+ continue;
+ }
+ else if (entry >= SHN_LORESERVE && entry <= SHN_HIRESERVE)
+ {
+ error (_("invalid section [%5u] in group section [%5u]\n"),
+ entry, i);
+ continue;
+ }
+
+ if (section_headers_groups [SECTION_HEADER_INDEX (entry)]
+ != NULL)
+ {
+ if (entry)
+ {
+ error (_("section [%5u] in group section [%5u] already in group section [%5u]\n"),
+ entry, i,
+ section_headers_groups [SECTION_HEADER_INDEX (entry)]->group_index);
+ continue;
+ }
+ else
+ {
+ /* Intel C/C++ compiler may put section 0 in a
+ section group. We just warn it the first time
+ and ignore it afterwards. */
+ static int warned = 0;
+ if (!warned)
+ {
+ error (_("section 0 in group section [%5u]\n"),
+ section_headers_groups [SECTION_HEADER_INDEX (entry)]->group_index);
+ warned++;
+ }
+ }
+ }
+
+ section_headers_groups [SECTION_HEADER_INDEX (entry)]
+ = group;
+
+ if (do_section_groups)
+ {
+ sec = SECTION_HEADER (entry);
+ printf (" [%5u] %s\n", entry, SECTION_NAME (sec));
+ }
+
+ g = xmalloc (sizeof (struct group_list));
+ g->section_index = entry;
+ g->next = group->root;
+ group->root = g;
+ }
+
+ if (start)
+ free (start);
+
+ group++;
+ }
+ }
+
+ if (symtab)
+ free (symtab);
+ if (strtab)
+ free (strtab);
+ return 1;
+}
+
+static struct
{
const char *name;
int reloc;
@@ -3690,6 +4507,7 @@ struct
};
/* Process the reloc section. */
+
static int
process_relocs (FILE *file)
{
@@ -3742,7 +4560,7 @@ process_relocs (FILE *file)
offset_from_vma (file, rel_offset, rel_size),
rel_size,
dynamic_symbols, num_dynamic_syms,
- dynamic_strings, is_rela);
+ dynamic_strings, dynamic_strings_length, is_rela);
}
}
@@ -3769,10 +4587,7 @@ process_relocs (FILE *file)
if (rel_size)
{
Elf_Internal_Shdr *strsec;
- Elf_Internal_Sym *symtab;
- char *strtab;
int is_rela;
- unsigned long nsyms;
printf (_("\nRelocation section "));
@@ -3784,34 +4599,49 @@ process_relocs (FILE *file)
printf (_(" at offset 0x%lx contains %lu entries:\n"),
rel_offset, (unsigned long) (rel_size / section->sh_entsize));
- symtab = NULL;
- strtab = NULL;
- nsyms = 0;
- if (section->sh_link)
+ is_rela = section->sh_type == SHT_RELA;
+
+ if (section->sh_link
+ && SECTION_HEADER_INDEX (section->sh_link)
+ < elf_header.e_shnum)
{
Elf_Internal_Shdr *symsec;
+ Elf_Internal_Sym *symtab;
+ unsigned long nsyms;
+ unsigned long strtablen = 0;
+ char *strtab = NULL;
symsec = SECTION_HEADER (section->sh_link);
+ if (symsec->sh_type != SHT_SYMTAB
+ && symsec->sh_type != SHT_DYNSYM)
+ continue;
+
nsyms = symsec->sh_size / symsec->sh_entsize;
symtab = GET_ELF_SYMBOLS (file, symsec);
if (symtab == NULL)
continue;
- strsec = SECTION_HEADER (symsec->sh_link);
-
- strtab = get_data (NULL, file, strsec->sh_offset,
- strsec->sh_size, _("string table"));
- }
- is_rela = section->sh_type == SHT_RELA;
+ if (SECTION_HEADER_INDEX (symsec->sh_link)
+ < elf_header.e_shnum)
+ {
+ strsec = SECTION_HEADER (symsec->sh_link);
- dump_relocations (file, rel_offset, rel_size,
- symtab, nsyms, strtab, is_rela);
+ strtab = get_data (NULL, file, strsec->sh_offset,
+ 1, strsec->sh_size,
+ _("string table"));
+ strtablen = strtab == NULL ? 0 : strsec->sh_size;
+ }
- if (strtab)
- free (strtab);
- if (symtab)
- free (symtab);
+ dump_relocations (file, rel_offset, rel_size,
+ symtab, nsyms, strtab, strtablen, is_rela);
+ if (strtab)
+ free (strtab);
+ free (symtab);
+ }
+ else
+ dump_relocations (file, rel_offset, rel_size,
+ NULL, 0, NULL, 0, is_rela);
found = 1;
}
@@ -3824,6 +4654,8 @@ process_relocs (FILE *file)
return 1;
}
+/* Process the unwind section. */
+
#include "unwind-ia64.h"
/* An absolute address consists of a section and an offset. If the
@@ -3836,9 +4668,14 @@ struct absaddr
bfd_vma offset;
};
-struct unw_aux_info
+#define ABSADDR(a) \
+ ((a).section \
+ ? section_headers [(a).section].sh_addr + (a).offset \
+ : (a).offset)
+
+struct ia64_unw_aux_info
{
- struct unw_table_entry
+ struct ia64_unw_table_entry
{
struct absaddr start;
struct absaddr end;
@@ -3857,7 +4694,10 @@ struct unw_aux_info
};
static void
-find_symbol_for_address (struct unw_aux_info *aux,
+find_symbol_for_address (Elf_Internal_Sym *symtab,
+ unsigned long nsyms,
+ const char *strtab,
+ unsigned long strtab_size,
struct absaddr addr,
const char **symname,
bfd_vma *offset)
@@ -3866,7 +4706,7 @@ find_symbol_for_address (struct unw_aux_info *aux,
Elf_Internal_Sym *sym, *best = NULL;
unsigned long i;
- for (i = 0, sym = aux->symtab; i < aux->nsyms; ++i, ++sym)
+ for (i = 0, sym = symtab; i < nsyms; ++i, ++sym)
{
if (ELF_ST_TYPE (sym->st_info) == STT_FUNC
&& sym->st_name != 0
@@ -3882,8 +4722,8 @@ find_symbol_for_address (struct unw_aux_info *aux,
}
if (best)
{
- *symname = (best->st_name >= aux->strtab_size
- ? "<corrupt>" : aux->strtab + best->st_name);
+ *symname = (best->st_name >= strtab_size
+ ? "<corrupt>" : strtab + best->st_name);
*offset = dist;
return;
}
@@ -3892,14 +4732,11 @@ find_symbol_for_address (struct unw_aux_info *aux,
}
static void
-dump_ia64_unwind (struct unw_aux_info *aux)
+dump_ia64_unwind (struct ia64_unw_aux_info *aux)
{
- bfd_vma addr_size;
- struct unw_table_entry *tp;
+ struct ia64_unw_table_entry *tp;
int in_body;
- addr_size = is_32bit_elf ? 4 : 8;
-
for (tp = aux->table; tp < aux->table + aux->table_len; ++tp)
{
bfd_vma stamp;
@@ -3908,7 +4745,8 @@ dump_ia64_unwind (struct unw_aux_info *aux)
const unsigned char *head;
const char *procname;
- find_symbol_for_address (aux, tp->start, &procname, &offset);
+ find_symbol_for_address (aux->symtab, aux->nsyms, aux->strtab,
+ aux->strtab_size, tp->start, &procname, &offset);
fputs ("\n<", stdout);
@@ -3927,15 +4765,15 @@ dump_ia64_unwind (struct unw_aux_info *aux)
printf ("], info at +0x%lx\n",
(unsigned long) (tp->info.offset - aux->seg_base));
- head = aux->info + (tp->info.offset - aux->info_addr);
- stamp = BYTE_GET8 ((unsigned char *) head);
+ head = aux->info + (ABSADDR (tp->info) - aux->info_addr);
+ stamp = byte_get ((unsigned char *) head, sizeof (stamp));
printf (" v%u, flags=0x%lx (%s%s), len=%lu bytes\n",
(unsigned) UNW_VER (stamp),
(unsigned long) ((stamp & UNW_FLAG_MASK) >> 32),
UNW_FLAG_EHANDLER (stamp) ? " ehandler" : "",
UNW_FLAG_UHANDLER (stamp) ? " uhandler" : "",
- (unsigned long) (addr_size * UNW_LENGTH (stamp)));
+ (unsigned long) (eh_addr_size * UNW_LENGTH (stamp)));
if (UNW_VER (stamp) != 1)
{
@@ -3944,27 +4782,25 @@ dump_ia64_unwind (struct unw_aux_info *aux)
}
in_body = 0;
- for (dp = head + 8; dp < head + 8 + addr_size * UNW_LENGTH (stamp);)
+ for (dp = head + 8; dp < head + 8 + eh_addr_size * UNW_LENGTH (stamp);)
dp = unw_decode (dp, in_body, & in_body);
}
}
static int
slurp_ia64_unwind_table (FILE *file,
- struct unw_aux_info *aux,
+ struct ia64_unw_aux_info *aux,
Elf_Internal_Shdr *sec)
{
- unsigned long size, addr_size, nrelas, i;
+ unsigned long size, nrelas, i;
Elf_Internal_Phdr *seg;
- struct unw_table_entry *tep;
+ struct ia64_unw_table_entry *tep;
Elf_Internal_Shdr *relsec;
Elf_Internal_Rela *rela, *rp;
unsigned char *table, *tp;
Elf_Internal_Sym *sym;
const char *relname;
- addr_size = is_32bit_elf ? 4 : 8;
-
/* First, find the starting address of the segment that includes
this section: */
@@ -3991,12 +4827,13 @@ slurp_ia64_unwind_table (FILE *file,
/* Second, build the unwind table from the contents of the unwind section: */
size = sec->sh_size;
- table = get_data (NULL, file, sec->sh_offset, size, _("unwind table"));
+ table = get_data (NULL, file, sec->sh_offset, 1, size, _("unwind table"));
if (!table)
return 0;
- tep = aux->table = xmalloc (size / (3 * addr_size) * sizeof (aux->table[0]));
- for (tp = table; tp < table + size; tp += 3 * addr_size, ++tep)
+ aux->table = xcmalloc (size / (3 * eh_addr_size), sizeof (aux->table[0]));
+ tep = aux->table;
+ for (tp = table; tp < table + size; tp += 3 * eh_addr_size, ++tep)
{
tep->start.section = SHN_UNDEF;
tep->end.section = SHN_UNDEF;
@@ -4009,9 +4846,9 @@ slurp_ia64_unwind_table (FILE *file,
}
else
{
- tep->start.offset = BYTE_GET8 ((unsigned char *) tp + 0);
- tep->end.offset = BYTE_GET8 ((unsigned char *) tp + 8);
- tep->info.offset = BYTE_GET8 ((unsigned char *) tp + 16);
+ tep->start.offset = BYTE_GET ((unsigned char *) tp + 0);
+ tep->end.offset = BYTE_GET ((unsigned char *) tp + 8);
+ tep->info.offset = BYTE_GET ((unsigned char *) tp + 16);
}
tep->start.offset += aux->seg_base;
tep->end.offset += aux->seg_base;
@@ -4026,6 +4863,7 @@ slurp_ia64_unwind_table (FILE *file,
++relsec)
{
if (relsec->sh_type != SHT_RELA
+ || SECTION_HEADER_INDEX (relsec->sh_info) >= elf_header.e_shnum
|| SECTION_HEADER (relsec->sh_info) != sec)
continue;
@@ -4039,48 +4877,34 @@ slurp_ia64_unwind_table (FILE *file,
{
relname = elf_ia64_reloc_type (ELF32_R_TYPE (rp->r_info));
sym = aux->symtab + ELF32_R_SYM (rp->r_info);
-
- if (ELF32_ST_TYPE (sym->st_info) != STT_SECTION)
- {
- warn (_("Skipping unexpected symbol type %u\n"),
- ELF32_ST_TYPE (sym->st_info));
- continue;
- }
}
else
{
relname = elf_ia64_reloc_type (ELF64_R_TYPE (rp->r_info));
sym = aux->symtab + ELF64_R_SYM (rp->r_info);
-
- if (ELF64_ST_TYPE (sym->st_info) != STT_SECTION)
- {
- warn (_("Skipping unexpected symbol type %u\n"),
- ELF64_ST_TYPE (sym->st_info));
- continue;
- }
}
- if (strncmp (relname, "R_IA64_SEGREL", 13) != 0)
+ if (! strneq (relname, "R_IA64_SEGREL", 13))
{
warn (_("Skipping unexpected relocation type %s\n"), relname);
continue;
}
- i = rp->r_offset / (3 * addr_size);
+ i = rp->r_offset / (3 * eh_addr_size);
- switch (rp->r_offset/addr_size % 3)
+ switch (rp->r_offset/eh_addr_size % 3)
{
case 0:
aux->table[i].start.section = sym->st_shndx;
- aux->table[i].start.offset += rp->r_addend;
+ aux->table[i].start.offset += rp->r_addend + sym->st_value;
break;
case 1:
aux->table[i].end.section = sym->st_shndx;
- aux->table[i].end.offset += rp->r_addend;
+ aux->table[i].end.offset += rp->r_addend + sym->st_value;
break;
case 2:
aux->table[i].info.section = sym->st_shndx;
- aux->table[i].info.offset += rp->r_addend;
+ aux->table[i].info.offset += rp->r_addend + sym->st_value;
break;
default:
break;
@@ -4090,41 +4914,31 @@ slurp_ia64_unwind_table (FILE *file,
free (rela);
}
- aux->table_len = size / (3 * addr_size);
+ aux->table_len = size / (3 * eh_addr_size);
return 1;
}
static int
-process_unwind (FILE *file)
+ia64_process_unwind (FILE *file)
{
Elf_Internal_Shdr *sec, *unwsec = NULL, *strsec;
- unsigned long i, addr_size, unwcount = 0, unwstart = 0;
- struct unw_aux_info aux;
-
- if (!do_unwind)
- return 1;
-
- if (elf_header.e_machine != EM_IA_64)
- {
- printf (_("\nThere are no unwind sections in this file.\n"));
- return 1;
- }
+ unsigned long i, unwcount = 0, unwstart = 0;
+ struct ia64_unw_aux_info aux;
memset (& aux, 0, sizeof (aux));
- addr_size = is_32bit_elf ? 4 : 8;
-
for (i = 0, sec = section_headers; i < elf_header.e_shnum; ++i, ++sec)
{
- if (sec->sh_type == SHT_SYMTAB)
+ if (sec->sh_type == SHT_SYMTAB
+ && SECTION_HEADER_INDEX (sec->sh_link) < elf_header.e_shnum)
{
aux.nsyms = sec->sh_size / sec->sh_entsize;
aux.symtab = GET_ELF_SYMBOLS (file, sec);
strsec = SECTION_HEADER (sec->sh_link);
- aux.strtab_size = strsec->sh_size;
aux.strtab = get_data (NULL, file, strsec->sh_offset,
- aux.strtab_size, _("string table"));
+ 1, strsec->sh_size, _("string table"));
+ aux.strtab_size = aux.strtab != NULL ? strsec->sh_size : 0;
}
else if (sec->sh_type == SHT_IA_64_UNWIND)
unwcount++;
@@ -4149,34 +4963,46 @@ process_unwind (FILE *file)
unwstart = i + 1;
len = sizeof (ELF_STRING_ia64_unwind_once) - 1;
- if (strncmp (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind_once,
- len) == 0)
+ if ((unwsec->sh_flags & SHF_GROUP) != 0)
+ {
+ /* We need to find which section group it is in. */
+ struct group_list *g = section_headers_groups [i]->root;
+
+ for (; g != NULL; g = g->next)
+ {
+ sec = SECTION_HEADER (g->section_index);
+
+ if (streq (SECTION_NAME (sec), ELF_STRING_ia64_unwind_info))
+ break;
+ }
+
+ if (g == NULL)
+ i = elf_header.e_shnum;
+ }
+ else if (strneq (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind_once, len))
{
- /* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.ia64unwi.FOO */
+ /* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.ia64unwi.FOO. */
len2 = sizeof (ELF_STRING_ia64_unwind_info_once) - 1;
suffix = SECTION_NAME (unwsec) + len;
for (i = 0, sec = section_headers; i < elf_header.e_shnum;
++i, ++sec)
- if (strncmp (SECTION_NAME (sec),
- ELF_STRING_ia64_unwind_info_once, len2) == 0
- && strcmp (SECTION_NAME (sec) + len2, suffix) == 0)
+ if (strneq (SECTION_NAME (sec), ELF_STRING_ia64_unwind_info_once, len2)
+ && streq (SECTION_NAME (sec) + len2, suffix))
break;
}
else
{
/* .IA_64.unwindFOO -> .IA_64.unwind_infoFOO
- .IA_64.unwind or BAR -> .IA_64.unwind_info */
+ .IA_64.unwind or BAR -> .IA_64.unwind_info. */
len = sizeof (ELF_STRING_ia64_unwind) - 1;
len2 = sizeof (ELF_STRING_ia64_unwind_info) - 1;
suffix = "";
- if (strncmp (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind,
- len) == 0)
+ if (strneq (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind, len))
suffix = SECTION_NAME (unwsec) + len;
for (i = 0, sec = section_headers; i < elf_header.e_shnum;
++i, ++sec)
- if (strncmp (SECTION_NAME (sec),
- ELF_STRING_ia64_unwind_info, len2) == 0
- && strcmp (SECTION_NAME (sec) + len2, suffix) == 0)
+ if (strneq (SECTION_NAME (sec), ELF_STRING_ia64_unwind_info, len2)
+ && streq (SECTION_NAME (sec) + len2, suffix))
break;
}
@@ -4193,7 +5019,7 @@ process_unwind (FILE *file)
{
aux.info_size = sec->sh_size;
aux.info_addr = sec->sh_addr;
- aux.info = get_data (NULL, file, sec->sh_offset, aux.info_size,
+ aux.info = get_data (NULL, file, sec->sh_offset, 1, aux.info_size,
_("unwind info"));
printf (_("\nUnwind section "));
@@ -4205,7 +5031,7 @@ process_unwind (FILE *file)
printf (_(" at offset 0x%lx contains %lu entries:\n"),
(unsigned long) unwsec->sh_offset,
- (unsigned long) (unwsec->sh_size / (3 * addr_size)));
+ (unsigned long) (unwsec->sh_size / (3 * eh_addr_size)));
(void) slurp_ia64_unwind_table (file, & aux, unwsec);
@@ -4229,8 +5055,368 @@ process_unwind (FILE *file)
return 1;
}
+struct hppa_unw_aux_info
+ {
+ struct hppa_unw_table_entry
+ {
+ struct absaddr start;
+ struct absaddr end;
+ unsigned int Cannot_unwind:1; /* 0 */
+ unsigned int Millicode:1; /* 1 */
+ unsigned int Millicode_save_sr0:1; /* 2 */
+ unsigned int Region_description:2; /* 3..4 */
+ unsigned int reserved1:1; /* 5 */
+ unsigned int Entry_SR:1; /* 6 */
+ unsigned int Entry_FR:4; /* number saved */ /* 7..10 */
+ unsigned int Entry_GR:5; /* number saved */ /* 11..15 */
+ unsigned int Args_stored:1; /* 16 */
+ unsigned int Variable_Frame:1; /* 17 */
+ unsigned int Separate_Package_Body:1; /* 18 */
+ unsigned int Frame_Extension_Millicode:1; /* 19 */
+ unsigned int Stack_Overflow_Check:1; /* 20 */
+ unsigned int Two_Instruction_SP_Increment:1; /* 21 */
+ unsigned int Ada_Region:1; /* 22 */
+ unsigned int cxx_info:1; /* 23 */
+ unsigned int cxx_try_catch:1; /* 24 */
+ unsigned int sched_entry_seq:1; /* 25 */
+ unsigned int reserved2:1; /* 26 */
+ unsigned int Save_SP:1; /* 27 */
+ unsigned int Save_RP:1; /* 28 */
+ unsigned int Save_MRP_in_frame:1; /* 29 */
+ unsigned int extn_ptr_defined:1; /* 30 */
+ unsigned int Cleanup_defined:1; /* 31 */
+
+ unsigned int MPE_XL_interrupt_marker:1; /* 0 */
+ unsigned int HP_UX_interrupt_marker:1; /* 1 */
+ unsigned int Large_frame:1; /* 2 */
+ unsigned int Pseudo_SP_Set:1; /* 3 */
+ unsigned int reserved4:1; /* 4 */
+ unsigned int Total_frame_size:27; /* 5..31 */
+ }
+ *table; /* Unwind table. */
+ unsigned long table_len; /* Length of unwind table. */
+ bfd_vma seg_base; /* Starting address of segment. */
+ Elf_Internal_Sym *symtab; /* The symbol table. */
+ unsigned long nsyms; /* Number of symbols. */
+ char *strtab; /* The string table. */
+ unsigned long strtab_size; /* Size of string table. */
+ };
+
+static void
+dump_hppa_unwind (struct hppa_unw_aux_info *aux)
+{
+ struct hppa_unw_table_entry *tp;
+
+ for (tp = aux->table; tp < aux->table + aux->table_len; ++tp)
+ {
+ bfd_vma offset;
+ const char *procname;
+
+ find_symbol_for_address (aux->symtab, aux->nsyms, aux->strtab,
+ aux->strtab_size, tp->start, &procname,
+ &offset);
+
+ fputs ("\n<", stdout);
+
+ if (procname)
+ {
+ fputs (procname, stdout);
+
+ if (offset)
+ printf ("+%lx", (unsigned long) offset);
+ }
+
+ fputs (">: [", stdout);
+ print_vma (tp->start.offset, PREFIX_HEX);
+ fputc ('-', stdout);
+ print_vma (tp->end.offset, PREFIX_HEX);
+ printf ("]\n\t");
+
+#define PF(_m) if (tp->_m) printf (#_m " ");
+#define PV(_m) if (tp->_m) printf (#_m "=%d ", tp->_m);
+ PF(Cannot_unwind);
+ PF(Millicode);
+ PF(Millicode_save_sr0);
+ /* PV(Region_description); */
+ PF(Entry_SR);
+ PV(Entry_FR);
+ PV(Entry_GR);
+ PF(Args_stored);
+ PF(Variable_Frame);
+ PF(Separate_Package_Body);
+ PF(Frame_Extension_Millicode);
+ PF(Stack_Overflow_Check);
+ PF(Two_Instruction_SP_Increment);
+ PF(Ada_Region);
+ PF(cxx_info);
+ PF(cxx_try_catch);
+ PF(sched_entry_seq);
+ PF(Save_SP);
+ PF(Save_RP);
+ PF(Save_MRP_in_frame);
+ PF(extn_ptr_defined);
+ PF(Cleanup_defined);
+ PF(MPE_XL_interrupt_marker);
+ PF(HP_UX_interrupt_marker);
+ PF(Large_frame);
+ PF(Pseudo_SP_Set);
+ PV(Total_frame_size);
+#undef PF
+#undef PV
+ }
+
+ printf ("\n");
+}
+
+static int
+slurp_hppa_unwind_table (FILE *file,
+ struct hppa_unw_aux_info *aux,
+ Elf_Internal_Shdr *sec)
+{
+ unsigned long size, unw_ent_size, nentries, nrelas, i;
+ Elf_Internal_Phdr *seg;
+ struct hppa_unw_table_entry *tep;
+ Elf_Internal_Shdr *relsec;
+ Elf_Internal_Rela *rela, *rp;
+ unsigned char *table, *tp;
+ Elf_Internal_Sym *sym;
+ const char *relname;
+
+ /* First, find the starting address of the segment that includes
+ this section. */
+
+ if (elf_header.e_phnum)
+ {
+ if (! get_program_headers (file))
+ return 0;
+
+ for (seg = program_headers;
+ seg < program_headers + elf_header.e_phnum;
+ ++seg)
+ {
+ if (seg->p_type != PT_LOAD)
+ continue;
+
+ if (sec->sh_addr >= seg->p_vaddr
+ && (sec->sh_addr + sec->sh_size <= seg->p_vaddr + seg->p_memsz))
+ {
+ aux->seg_base = seg->p_vaddr;
+ break;
+ }
+ }
+ }
+
+ /* Second, build the unwind table from the contents of the unwind
+ section. */
+ size = sec->sh_size;
+ table = get_data (NULL, file, sec->sh_offset, 1, size, _("unwind table"));
+ if (!table)
+ return 0;
+
+ unw_ent_size = 16;
+ nentries = size / unw_ent_size;
+ size = unw_ent_size * nentries;
+
+ tep = aux->table = xcmalloc (nentries, sizeof (aux->table[0]));
+
+ for (tp = table; tp < table + size; tp += unw_ent_size, ++tep)
+ {
+ unsigned int tmp1, tmp2;
+
+ tep->start.section = SHN_UNDEF;
+ tep->end.section = SHN_UNDEF;
+
+ tep->start.offset = byte_get ((unsigned char *) tp + 0, 4);
+ tep->end.offset = byte_get ((unsigned char *) tp + 4, 4);
+ tmp1 = byte_get ((unsigned char *) tp + 8, 4);
+ tmp2 = byte_get ((unsigned char *) tp + 12, 4);
+
+ tep->start.offset += aux->seg_base;
+ tep->end.offset += aux->seg_base;
+
+ tep->Cannot_unwind = (tmp1 >> 31) & 0x1;
+ tep->Millicode = (tmp1 >> 30) & 0x1;
+ tep->Millicode_save_sr0 = (tmp1 >> 29) & 0x1;
+ tep->Region_description = (tmp1 >> 27) & 0x3;
+ tep->reserved1 = (tmp1 >> 26) & 0x1;
+ tep->Entry_SR = (tmp1 >> 25) & 0x1;
+ tep->Entry_FR = (tmp1 >> 21) & 0xf;
+ tep->Entry_GR = (tmp1 >> 16) & 0x1f;
+ tep->Args_stored = (tmp1 >> 15) & 0x1;
+ tep->Variable_Frame = (tmp1 >> 14) & 0x1;
+ tep->Separate_Package_Body = (tmp1 >> 13) & 0x1;
+ tep->Frame_Extension_Millicode = (tmp1 >> 12) & 0x1;
+ tep->Stack_Overflow_Check = (tmp1 >> 11) & 0x1;
+ tep->Two_Instruction_SP_Increment = (tmp1 >> 10) & 0x1;
+ tep->Ada_Region = (tmp1 >> 9) & 0x1;
+ tep->cxx_info = (tmp1 >> 8) & 0x1;
+ tep->cxx_try_catch = (tmp1 >> 7) & 0x1;
+ tep->sched_entry_seq = (tmp1 >> 6) & 0x1;
+ tep->reserved2 = (tmp1 >> 5) & 0x1;
+ tep->Save_SP = (tmp1 >> 4) & 0x1;
+ tep->Save_RP = (tmp1 >> 3) & 0x1;
+ tep->Save_MRP_in_frame = (tmp1 >> 2) & 0x1;
+ tep->extn_ptr_defined = (tmp1 >> 1) & 0x1;
+ tep->Cleanup_defined = tmp1 & 0x1;
+
+ tep->MPE_XL_interrupt_marker = (tmp2 >> 31) & 0x1;
+ tep->HP_UX_interrupt_marker = (tmp2 >> 30) & 0x1;
+ tep->Large_frame = (tmp2 >> 29) & 0x1;
+ tep->Pseudo_SP_Set = (tmp2 >> 28) & 0x1;
+ tep->reserved4 = (tmp2 >> 27) & 0x1;
+ tep->Total_frame_size = tmp2 & 0x7ffffff;
+ }
+ free (table);
+
+ /* Third, apply any relocations to the unwind table. */
+
+ for (relsec = section_headers;
+ relsec < section_headers + elf_header.e_shnum;
+ ++relsec)
+ {
+ if (relsec->sh_type != SHT_RELA
+ || SECTION_HEADER_INDEX (relsec->sh_info) >= elf_header.e_shnum
+ || SECTION_HEADER (relsec->sh_info) != sec)
+ continue;
+
+ if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size,
+ & rela, & nrelas))
+ return 0;
+
+ for (rp = rela; rp < rela + nrelas; ++rp)
+ {
+ if (is_32bit_elf)
+ {
+ relname = elf_hppa_reloc_type (ELF32_R_TYPE (rp->r_info));
+ sym = aux->symtab + ELF32_R_SYM (rp->r_info);
+ }
+ else
+ {
+ relname = elf_hppa_reloc_type (ELF64_R_TYPE (rp->r_info));
+ sym = aux->symtab + ELF64_R_SYM (rp->r_info);
+ }
+
+ /* R_PARISC_SEGREL32 or R_PARISC_SEGREL64. */
+ if (strncmp (relname, "R_PARISC_SEGREL", 15) != 0)
+ {
+ warn (_("Skipping unexpected relocation type %s\n"), relname);
+ continue;
+ }
+
+ i = rp->r_offset / unw_ent_size;
+
+ switch ((rp->r_offset % unw_ent_size) / eh_addr_size)
+ {
+ case 0:
+ aux->table[i].start.section = sym->st_shndx;
+ aux->table[i].start.offset += sym->st_value + rp->r_addend;
+ break;
+ case 1:
+ aux->table[i].end.section = sym->st_shndx;
+ aux->table[i].end.offset += sym->st_value + rp->r_addend;
+ break;
+ default:
+ break;
+ }
+ }
+
+ free (rela);
+ }
+
+ aux->table_len = nentries;
+
+ return 1;
+}
+
+static int
+hppa_process_unwind (FILE *file)
+{
+ struct hppa_unw_aux_info aux;
+ Elf_Internal_Shdr *unwsec = NULL;
+ Elf_Internal_Shdr *strsec;
+ Elf_Internal_Shdr *sec;
+ unsigned long i;
+
+ memset (& aux, 0, sizeof (aux));
+
+ if (string_table == NULL)
+ return 1;
+
+ for (i = 0, sec = section_headers; i < elf_header.e_shnum; ++i, ++sec)
+ {
+ if (sec->sh_type == SHT_SYMTAB
+ && SECTION_HEADER_INDEX (sec->sh_link) < elf_header.e_shnum)
+ {
+ aux.nsyms = sec->sh_size / sec->sh_entsize;
+ aux.symtab = GET_ELF_SYMBOLS (file, sec);
+
+ strsec = SECTION_HEADER (sec->sh_link);
+ aux.strtab = get_data (NULL, file, strsec->sh_offset,
+ 1, strsec->sh_size, _("string table"));
+ aux.strtab_size = aux.strtab != NULL ? strsec->sh_size : 0;
+ }
+ else if (streq (SECTION_NAME (sec), ".PARISC.unwind"))
+ unwsec = sec;
+ }
+
+ if (!unwsec)
+ printf (_("\nThere are no unwind sections in this file.\n"));
+
+ for (i = 0, sec = section_headers; i < elf_header.e_shnum; ++i, ++sec)
+ {
+ if (streq (SECTION_NAME (sec), ".PARISC.unwind"))
+ {
+ printf (_("\nUnwind section "));
+ printf (_("'%s'"), SECTION_NAME (sec));
+
+ printf (_(" at offset 0x%lx contains %lu entries:\n"),
+ (unsigned long) sec->sh_offset,
+ (unsigned long) (sec->sh_size / (2 * eh_addr_size + 8)));
+
+ slurp_hppa_unwind_table (file, &aux, sec);
+ if (aux.table_len > 0)
+ dump_hppa_unwind (&aux);
+
+ if (aux.table)
+ free ((char *) aux.table);
+ aux.table = NULL;
+ }
+ }
+
+ if (aux.symtab)
+ free (aux.symtab);
+ if (aux.strtab)
+ free ((char *) aux.strtab);
+
+ return 1;
+}
+
+static int
+process_unwind (FILE *file)
+{
+ struct unwind_handler {
+ int machtype;
+ int (*handler)(FILE *file);
+ } handlers[] = {
+ { EM_IA_64, ia64_process_unwind },
+ { EM_PARISC, hppa_process_unwind },
+ { 0, 0 }
+ };
+ int i;
+
+ if (!do_unwind)
+ return 1;
+
+ for (i = 0; handlers[i].handler != NULL; i++)
+ if (elf_header.e_machine == handlers[i].machtype)
+ return handlers[i].handler (file);
+
+ printf (_("\nThere are no unwind sections in this file.\n"));
+ return 1;
+}
+
static void
-dynamic_segment_mips_val (Elf_Internal_Dyn *entry)
+dynamic_section_mips_val (Elf_Internal_Dyn *entry)
{
switch (entry->d_tag)
{
@@ -4260,11 +5446,10 @@ dynamic_segment_mips_val (Elf_Internal_Dyn *entry)
break;
case DT_MIPS_IVERSION:
- if (dynamic_strings != NULL)
- printf ("Interface Version: %s\n",
- dynamic_strings + entry->d_un.d_val);
+ if (VALID_DYNAMIC_NAME (entry->d_un.d_val))
+ printf ("Interface Version: %s\n", GET_DYNAMIC_NAME (entry->d_un.d_val));
else
- printf ("%ld\n", (long) entry->d_un.d_ptr);
+ printf ("<corrupt: %ld>\n", (long) entry->d_un.d_ptr);
break;
case DT_MIPS_TIME_STAMP:
@@ -4274,9 +5459,9 @@ dynamic_segment_mips_val (Elf_Internal_Dyn *entry)
time_t time = entry->d_un.d_val;
tmp = gmtime (&time);
- sprintf (timebuf, "%04u-%02u-%02uT%02u:%02u:%02u",
- tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
- tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+ snprintf (timebuf, sizeof (timebuf), "%04u-%02u-%02uT%02u:%02u:%02u",
+ tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
+ tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
printf ("Time Stamp: %s\n", timebuf);
}
break;
@@ -4304,7 +5489,7 @@ dynamic_segment_mips_val (Elf_Internal_Dyn *entry)
static void
-dynamic_segment_parisc_val (Elf_Internal_Dyn *entry)
+dynamic_section_parisc_val (Elf_Internal_Dyn *entry)
{
switch (entry->d_tag)
{
@@ -4327,7 +5512,13 @@ dynamic_segment_parisc_val (Elf_Internal_Dyn *entry)
{ DT_HP_BIND_RESTRICTED, "HP_BIND_RESTRICTED" },
{ DT_HP_BIND_SYMBOLIC, "HP_BIND_SYMBOLIC" },
{ DT_HP_RPATH_FIRST, "HP_RPATH_FIRST" },
- { DT_HP_BIND_DEPTH_FIRST, "HP_BIND_DEPTH_FIRST" }
+ { DT_HP_BIND_DEPTH_FIRST, "HP_BIND_DEPTH_FIRST" },
+ { DT_HP_GST, "HP_GST" },
+ { DT_HP_SHLIB_FIXED, "HP_SHLIB_FIXED" },
+ { DT_HP_MERGE_SHLIB_SEG, "HP_MERGE_SHLIB_SEG" },
+ { DT_HP_NODELETE, "HP_NODELETE" },
+ { DT_HP_GROUP, "HP_GROUP" },
+ { DT_HP_PROTECT_LINKAGE_TABLE, "HP_PROTECT_LINKAGE_TABLE" }
};
int first = 1;
size_t cnt;
@@ -4360,7 +5551,7 @@ dynamic_segment_parisc_val (Elf_Internal_Dyn *entry)
}
static void
-dynamic_segment_ia64_val (Elf_Internal_Dyn *entry)
+dynamic_section_ia64_val (Elf_Internal_Dyn *entry)
{
switch (entry->d_tag)
{
@@ -4379,39 +5570,42 @@ dynamic_segment_ia64_val (Elf_Internal_Dyn *entry)
}
static int
-get_32bit_dynamic_segment (FILE *file)
+get_32bit_dynamic_section (FILE *file)
{
- Elf32_External_Dyn *edyn;
+ Elf32_External_Dyn *edyn, *ext;
Elf_Internal_Dyn *entry;
- bfd_size_type i;
- edyn = get_data (NULL, file, dynamic_addr, dynamic_size,
- _("dynamic segment"));
+ edyn = get_data (NULL, file, dynamic_addr, 1, dynamic_size,
+ _("dynamic section"));
if (!edyn)
return 0;
- /* SGI's ELF has more than one section in the DYNAMIC segment. Determine
- how large this .dynamic is now. We can do this even before the byte
- swapping since the DT_NULL tag is recognizable. */
- dynamic_size = 0;
- while (*(Elf32_Word *) edyn[dynamic_size++].d_tag != DT_NULL)
- ;
-
- dynamic_segment = malloc (dynamic_size * sizeof (Elf_Internal_Dyn));
+/* SGI's ELF has more than one section in the DYNAMIC segment, and we
+ might not have the luxury of section headers. Look for the DT_NULL
+ terminator to determine the number of entries. */
+ for (ext = edyn, dynamic_nent = 0;
+ (char *) ext < (char *) edyn + dynamic_size;
+ ext++)
+ {
+ dynamic_nent++;
+ if (BYTE_GET (ext->d_tag) == DT_NULL)
+ break;
+ }
- if (dynamic_segment == NULL)
+ dynamic_section = cmalloc (dynamic_nent, sizeof (*entry));
+ if (dynamic_section == NULL)
{
error (_("Out of memory\n"));
free (edyn);
return 0;
}
- for (i = 0, entry = dynamic_segment;
- i < dynamic_size;
- i++, entry++)
+ for (ext = edyn, entry = dynamic_section;
+ entry < dynamic_section + dynamic_nent;
+ ext++, entry++)
{
- entry->d_tag = BYTE_GET (edyn[i].d_tag);
- entry->d_un.d_val = BYTE_GET (edyn[i].d_un.d_val);
+ entry->d_tag = BYTE_GET (ext->d_tag);
+ entry->d_un.d_val = BYTE_GET (ext->d_un.d_val);
}
free (edyn);
@@ -4420,39 +5614,42 @@ get_32bit_dynamic_segment (FILE *file)
}
static int
-get_64bit_dynamic_segment (FILE *file)
+get_64bit_dynamic_section (FILE *file)
{
- Elf64_External_Dyn *edyn;
+ Elf64_External_Dyn *edyn, *ext;
Elf_Internal_Dyn *entry;
- bfd_size_type i;
- edyn = get_data (NULL, file, dynamic_addr, dynamic_size,
- _("dynamic segment"));
+ edyn = get_data (NULL, file, dynamic_addr, 1, dynamic_size,
+ _("dynamic section"));
if (!edyn)
return 0;
- /* SGI's ELF has more than one section in the DYNAMIC segment. Determine
- how large this .dynamic is now. We can do this even before the byte
- swapping since the DT_NULL tag is recognizable. */
- dynamic_size = 0;
- while (*(bfd_vma *) edyn[dynamic_size++].d_tag != DT_NULL)
- ;
-
- dynamic_segment = malloc (dynamic_size * sizeof (Elf_Internal_Dyn));
+/* SGI's ELF has more than one section in the DYNAMIC segment, and we
+ might not have the luxury of section headers. Look for the DT_NULL
+ terminator to determine the number of entries. */
+ for (ext = edyn, dynamic_nent = 0;
+ (char *) ext < (char *) edyn + dynamic_size;
+ ext++)
+ {
+ dynamic_nent++;
+ if (BYTE_GET (ext->d_tag) == DT_NULL)
+ break;
+ }
- if (dynamic_segment == NULL)
+ dynamic_section = cmalloc (dynamic_nent, sizeof (*entry));
+ if (dynamic_section == NULL)
{
error (_("Out of memory\n"));
free (edyn);
return 0;
}
- for (i = 0, entry = dynamic_segment;
- i < dynamic_size;
- i++, entry++)
+ for (ext = edyn, entry = dynamic_section;
+ entry < dynamic_section + dynamic_nent;
+ ext++, entry++)
{
- entry->d_tag = BYTE_GET8 (edyn[i].d_tag);
- entry->d_un.d_val = BYTE_GET8 (edyn[i].d_un.d_val);
+ entry->d_tag = BYTE_GET (ext->d_tag);
+ entry->d_un.d_val = BYTE_GET (ext->d_un.d_val);
}
free (edyn);
@@ -4460,13 +5657,11 @@ get_64bit_dynamic_segment (FILE *file)
return 1;
}
-static const char *
-get_dynamic_flags (bfd_vma flags)
+static void
+print_dynamic_flags (bfd_vma flags)
{
- static char buff[128];
- char *p = buff;
+ int first = 1;
- *p = '\0';
while (flags)
{
bfd_vma flag;
@@ -4474,53 +5669,53 @@ get_dynamic_flags (bfd_vma flags)
flag = flags & - flags;
flags &= ~ flag;
- if (p != buff)
- *p++ = ' ';
+ if (first)
+ first = 0;
+ else
+ putc (' ', stdout);
switch (flag)
{
- case DF_ORIGIN: strcpy (p, "ORIGIN"); break;
- case DF_SYMBOLIC: strcpy (p, "SYMBOLIC"); break;
- case DF_TEXTREL: strcpy (p, "TEXTREL"); break;
- case DF_BIND_NOW: strcpy (p, "BIND_NOW"); break;
- case DF_STATIC_TLS: strcpy (p, "STATIC_TLS"); break;
- default: strcpy (p, "unknown"); break;
+ case DF_ORIGIN: fputs ("ORIGIN", stdout); break;
+ case DF_SYMBOLIC: fputs ("SYMBOLIC", stdout); break;
+ case DF_TEXTREL: fputs ("TEXTREL", stdout); break;
+ case DF_BIND_NOW: fputs ("BIND_NOW", stdout); break;
+ case DF_STATIC_TLS: fputs ("STATIC_TLS", stdout); break;
+ default: fputs ("unknown", stdout); break;
}
-
- p = strchr (p, '\0');
}
- return buff;
+ puts ("");
}
-/* Parse and display the contents of the dynamic segment. */
+/* Parse and display the contents of the dynamic section. */
+
static int
-process_dynamic_segment (FILE *file)
+process_dynamic_section (FILE *file)
{
Elf_Internal_Dyn *entry;
- bfd_size_type i;
if (dynamic_size == 0)
{
if (do_dynamic)
- printf (_("\nThere is no dynamic segment in this file.\n"));
+ printf (_("\nThere is no dynamic section in this file.\n"));
return 1;
}
if (is_32bit_elf)
{
- if (! get_32bit_dynamic_segment (file))
+ if (! get_32bit_dynamic_section (file))
return 0;
}
- else if (! get_64bit_dynamic_segment (file))
+ else if (! get_64bit_dynamic_section (file))
return 0;
/* Find the appropriate symbol table. */
if (dynamic_symbols == NULL)
{
- for (i = 0, entry = dynamic_segment;
- i < dynamic_size;
- ++i, ++entry)
+ for (entry = dynamic_section;
+ entry < dynamic_section + dynamic_nent;
+ ++entry)
{
Elf_Internal_Shdr section;
@@ -4564,9 +5759,9 @@ process_dynamic_segment (FILE *file)
/* Similarly find a string table. */
if (dynamic_strings == NULL)
{
- for (i = 0, entry = dynamic_segment;
- i < dynamic_size;
- ++i, ++entry)
+ for (entry = dynamic_section;
+ entry < dynamic_section + dynamic_nent;
+ ++entry)
{
unsigned long offset;
long str_tab_len;
@@ -4599,8 +5794,9 @@ process_dynamic_segment (FILE *file)
continue;
}
- dynamic_strings = get_data (NULL, file, offset, str_tab_len,
+ dynamic_strings = get_data (NULL, file, offset, 1, str_tab_len,
_("dynamic string table"));
+ dynamic_strings_length = str_tab_len;
break;
}
}
@@ -4610,9 +5806,9 @@ process_dynamic_segment (FILE *file)
{
unsigned long syminsz = 0;
- for (i = 0, entry = dynamic_segment;
- i < dynamic_size;
- ++i, ++entry)
+ for (entry = dynamic_section;
+ entry < dynamic_section + dynamic_nent;
+ ++entry)
{
if (entry->d_tag == DT_SYMINENT)
{
@@ -4629,12 +5825,12 @@ process_dynamic_segment (FILE *file)
if (dynamic_syminfo_offset != 0 && syminsz != 0)
{
- Elf_External_Syminfo *extsyminfo;
+ Elf_External_Syminfo *extsyminfo, *extsym;
Elf_Internal_Syminfo *syminfo;
/* There is a syminfo section. Read the data. */
- extsyminfo = get_data (NULL, file, dynamic_syminfo_offset, syminsz,
- _("symbol information"));
+ extsyminfo = get_data (NULL, file, dynamic_syminfo_offset, 1,
+ syminsz, _("symbol information"));
if (!extsyminfo)
return 0;
@@ -4646,11 +5842,12 @@ process_dynamic_segment (FILE *file)
}
dynamic_syminfo_nent = syminsz / sizeof (Elf_External_Syminfo);
- for (i = 0, syminfo = dynamic_syminfo; i < dynamic_syminfo_nent;
- ++i, ++syminfo)
+ for (syminfo = dynamic_syminfo, extsym = extsyminfo;
+ syminfo < dynamic_syminfo + dynamic_syminfo_nent;
+ ++syminfo, ++extsym)
{
- syminfo->si_boundto = BYTE_GET (extsyminfo[i].si_boundto);
- syminfo->si_flags = BYTE_GET (extsyminfo[i].si_flags);
+ syminfo->si_boundto = BYTE_GET (extsym->si_boundto);
+ syminfo->si_flags = BYTE_GET (extsym->si_flags);
}
free (extsyminfo);
@@ -4658,14 +5855,14 @@ process_dynamic_segment (FILE *file)
}
if (do_dynamic && dynamic_addr)
- printf (_("\nDynamic segment at offset 0x%lx contains %ld entries:\n"),
- dynamic_addr, (long) dynamic_size);
+ printf (_("\nDynamic section at offset 0x%lx contains %u entries:\n"),
+ dynamic_addr, dynamic_nent);
if (do_dynamic)
printf (_(" Tag Type Name/Value\n"));
- for (i = 0, entry = dynamic_segment;
- i < dynamic_size;
- i++, entry++)
+ for (entry = dynamic_section;
+ entry < dynamic_section + dynamic_nent;
+ entry++)
{
if (do_dynamic)
{
@@ -4684,7 +5881,7 @@ process_dynamic_segment (FILE *file)
{
case DT_FLAGS:
if (do_dynamic)
- puts (get_dynamic_flags (entry->d_un.d_val));
+ print_dynamic_flags (entry->d_un.d_val);
break;
case DT_AUXILIARY:
@@ -4717,8 +5914,8 @@ process_dynamic_segment (FILE *file)
break;
}
- if (dynamic_strings)
- printf (": [%s]\n", dynamic_strings + entry->d_un.d_val);
+ if (VALID_DYNAMIC_NAME (entry->d_un.d_val))
+ printf (": [%s]\n", GET_DYNAMIC_NAME (entry->d_un.d_val));
else
{
printf (": ");
@@ -4900,10 +6097,10 @@ process_dynamic_segment (FILE *file)
{
char *name;
- if (dynamic_strings == NULL)
- name = NULL;
+ if (VALID_DYNAMIC_NAME (entry->d_un.d_val))
+ name = GET_DYNAMIC_NAME (entry->d_un.d_val);
else
- name = dynamic_strings + entry->d_un.d_val;
+ name = NULL;
if (name)
{
@@ -4912,7 +6109,7 @@ process_dynamic_segment (FILE *file)
case DT_NEEDED:
printf (_("Shared library: [%s]"), name);
- if (strcmp (name, program_interpreter) == 0)
+ if (streq (name, program_interpreter))
printf (_(" program interpreter"));
break;
@@ -4981,11 +6178,10 @@ process_dynamic_segment (FILE *file)
case DT_FINI_ARRAY:
if (do_dynamic)
{
- if (dynamic_strings != NULL && entry->d_tag == DT_USED)
+ if (entry->d_tag == DT_USED
+ && VALID_DYNAMIC_NAME (entry->d_un.d_val))
{
- char *name;
-
- name = dynamic_strings + entry->d_un.d_val;
+ char *name = GET_DYNAMIC_NAME (entry->d_un.d_val);
if (*name)
{
@@ -5030,13 +6226,13 @@ process_dynamic_segment (FILE *file)
{
case EM_MIPS:
case EM_MIPS_RS3_LE:
- dynamic_segment_mips_val (entry);
+ dynamic_section_mips_val (entry);
break;
case EM_PARISC:
- dynamic_segment_parisc_val (entry);
+ dynamic_section_parisc_val (entry);
break;
case EM_IA_64:
- dynamic_segment_ia64_val (entry);
+ dynamic_section_ia64_val (entry);
break;
default:
print_vma (entry->d_un.d_val, PREFIX_HEX);
@@ -5110,9 +6306,13 @@ process_version_sections (FILE *file)
printf_vma (section->sh_addr);
printf (_(" Offset: %#08lx Link: %lx (%s)\n"),
(unsigned long) section->sh_offset, section->sh_link,
- SECTION_NAME (SECTION_HEADER (section->sh_link)));
+ SECTION_HEADER_INDEX (section->sh_link)
+ < elf_header.e_shnum
+ ? SECTION_NAME (SECTION_HEADER (section->sh_link))
+ : "<corrupt>");
- edefs = get_data (NULL, file, section->sh_offset, section->sh_size,
+ edefs = get_data (NULL, file, section->sh_offset, 1,
+ section->sh_size,
_("version definition section"));
if (!edefs)
break;
@@ -5152,8 +6352,8 @@ process_version_sections (FILE *file)
aux.vda_name = BYTE_GET (eaux->vda_name);
aux.vda_next = BYTE_GET (eaux->vda_next);
- if (dynamic_strings)
- printf (_("Name: %s\n"), dynamic_strings + aux.vda_name);
+ if (VALID_DYNAMIC_NAME (aux.vda_name))
+ printf (_("Name: %s\n"), GET_DYNAMIC_NAME (aux.vda_name));
else
printf (_("Name index: %ld\n"), aux.vda_name);
@@ -5169,9 +6369,9 @@ process_version_sections (FILE *file)
aux.vda_name = BYTE_GET (eaux->vda_name);
aux.vda_next = BYTE_GET (eaux->vda_next);
- if (dynamic_strings)
+ if (VALID_DYNAMIC_NAME (aux.vda_name))
printf (_(" %#06x: Parent %d: %s\n"),
- isum, j, dynamic_strings + aux.vda_name);
+ isum, j, GET_DYNAMIC_NAME (aux.vda_name));
else
printf (_(" %#06x: Parent %d, name index: %ld\n"),
isum, j, aux.vda_name);
@@ -5199,9 +6399,13 @@ process_version_sections (FILE *file)
printf_vma (section->sh_addr);
printf (_(" Offset: %#08lx Link to section: %ld (%s)\n"),
(unsigned long) section->sh_offset, section->sh_link,
- SECTION_NAME (SECTION_HEADER (section->sh_link)));
+ SECTION_HEADER_INDEX (section->sh_link)
+ < elf_header.e_shnum
+ ? SECTION_NAME (SECTION_HEADER (section->sh_link))
+ : "<corrupt>");
- eneed = get_data (NULL, file, section->sh_offset, section->sh_size,
+ eneed = get_data (NULL, file, section->sh_offset, 1,
+ section->sh_size,
_("version need section"));
if (!eneed)
break;
@@ -5226,8 +6430,8 @@ process_version_sections (FILE *file)
printf (_(" %#06x: Version: %d"), idx, ent.vn_version);
- if (dynamic_strings)
- printf (_(" File: %s"), dynamic_strings + ent.vn_file);
+ if (VALID_DYNAMIC_NAME (ent.vn_file))
+ printf (_(" File: %s"), GET_DYNAMIC_NAME (ent.vn_file));
else
printf (_(" File: %lx"), ent.vn_file);
@@ -5248,9 +6452,9 @@ process_version_sections (FILE *file)
aux.vna_name = BYTE_GET (eaux->vna_name);
aux.vna_next = BYTE_GET (eaux->vna_next);
- if (dynamic_strings)
+ if (VALID_DYNAMIC_NAME (aux.vna_name))
printf (_(" %#06x: Name: %s"),
- isum, dynamic_strings + aux.vna_name);
+ isum, GET_DYNAMIC_NAME (aux.vna_name));
else
printf (_(" %#06x: Name index: %lx"),
isum, aux.vna_name);
@@ -5281,8 +6485,15 @@ process_version_sections (FILE *file)
Elf_Internal_Shdr *string_sec;
long off;
+ if (SECTION_HEADER_INDEX (section->sh_link) >= elf_header.e_shnum)
+ break;
+
link_section = SECTION_HEADER (section->sh_link);
- total = section->sh_size / section->sh_entsize;
+ total = section->sh_size / sizeof (Elf_External_Versym);
+
+ if (SECTION_HEADER_INDEX (link_section->sh_link)
+ >= elf_header.e_shnum)
+ break;
found = 1;
@@ -5290,7 +6501,7 @@ process_version_sections (FILE *file)
string_sec = SECTION_HEADER (link_section->sh_link);
- strtab = get_data (NULL, file, string_sec->sh_offset,
+ strtab = get_data (NULL, file, string_sec->sh_offset, 1,
string_sec->sh_size, _("version string table"));
if (!strtab)
break;
@@ -5307,7 +6518,7 @@ process_version_sections (FILE *file)
off = offset_from_vma (file,
version_info[DT_VERSIONTAGIDX (DT_VERSYM)],
total * sizeof (short));
- edata = get_data (NULL, file, off, total * sizeof (short),
+ edata = get_data (NULL, file, off, total, sizeof (short),
_("version symbol data"));
if (!edata)
{
@@ -5315,7 +6526,7 @@ process_version_sections (FILE *file)
break;
}
- data = malloc (total * sizeof (short));
+ data = cmalloc (total, sizeof (short));
for (cnt = total; cnt --;)
data[cnt] = byte_get (edata + cnt * sizeof (short),
@@ -5348,8 +6559,10 @@ process_version_sections (FILE *file)
check_def = 1;
check_need = 1;
- if (SECTION_HEADER (symbols[cnt + j].st_shndx)->sh_type
- != SHT_NOBITS)
+ if (SECTION_HEADER_INDEX (symbols[cnt + j].st_shndx)
+ >= elf_header.e_shnum
+ || SECTION_HEADER (symbols[cnt + j].st_shndx)->sh_type
+ != SHT_NOBITS)
{
if (symbols[cnt + j].st_shndx == SHN_UNDEF)
check_def = 0;
@@ -5374,7 +6587,7 @@ process_version_sections (FILE *file)
Elf_External_Vernaux evna;
unsigned long a_off;
- get_data (&evn, file, offset, sizeof (evn),
+ get_data (&evn, file, offset, sizeof (evn), 1,
_("version need"));
ivn.vn_aux = BYTE_GET (evn.vn_aux);
@@ -5385,7 +6598,7 @@ process_version_sections (FILE *file)
do
{
get_data (&evna, file, a_off, sizeof (evna),
- _("version need aux (2)"));
+ 1, _("version need aux (2)"));
ivna.vna_next = BYTE_GET (evna.vna_next);
ivna.vna_other = BYTE_GET (evna.vna_other);
@@ -5426,7 +6639,7 @@ process_version_sections (FILE *file)
do
{
- get_data (&evd, file, offset, sizeof (evd),
+ get_data (&evd, file, offset, sizeof (evd), 1,
_("version def"));
ivd.vd_next = BYTE_GET (evd.vd_next);
@@ -5446,7 +6659,8 @@ process_version_sections (FILE *file)
get_data (&evda, file,
offset - ivd.vd_next + ivd.vd_aux,
- sizeof (evda), _("version def aux"));
+ sizeof (evda), 1,
+ _("version def aux"));
ivda.vda_name = BYTE_GET (evda.vda_name);
@@ -5494,11 +6708,12 @@ get_symbol_binding (unsigned int binding)
case STB_WEAK: return "WEAK";
default:
if (binding >= STB_LOPROC && binding <= STB_HIPROC)
- sprintf (buff, _("<processor specific>: %d"), binding);
+ snprintf (buff, sizeof (buff), _("<processor specific>: %d"),
+ binding);
else if (binding >= STB_LOOS && binding <= STB_HIOS)
- sprintf (buff, _("<OS specific>: %d"), binding);
+ snprintf (buff, sizeof (buff), _("<OS specific>: %d"), binding);
else
- sprintf (buff, _("<unknown>: %d"), binding);
+ snprintf (buff, sizeof (buff), _("<unknown>: %d"), binding);
return buff;
}
}
@@ -5529,7 +6744,7 @@ get_symbol_type (unsigned int type)
if (elf_header.e_machine == EM_PARISC && type == STT_PARISC_MILLI)
return "PARISC_MILLI";
- sprintf (buff, _("<processor specific>: %d"), type);
+ snprintf (buff, sizeof (buff), _("<processor specific>: %d"), type);
}
else if (type >= STT_LOOS && type <= STT_HIOS)
{
@@ -5541,10 +6756,10 @@ get_symbol_type (unsigned int type)
return "HP_STUB";
}
- sprintf (buff, _("<OS specific>: %d"), type);
+ snprintf (buff, sizeof (buff), _("<OS specific>: %d"), type);
}
else
- sprintf (buff, _("<unknown>: %d"), type);
+ snprintf (buff, sizeof (buff), _("<unknown>: %d"), type);
return buff;
}
}
@@ -5563,6 +6778,41 @@ get_symbol_visibility (unsigned int visibility)
}
static const char *
+get_mips_symbol_other (unsigned int other)
+{
+ switch (other)
+ {
+ case STO_OPTIONAL: return "OPTIONAL";
+ case STO_MIPS16: return "MIPS16";
+ default: return NULL;
+ }
+}
+
+static const char *
+get_symbol_other (unsigned int other)
+{
+ const char * result = NULL;
+ static char buff [32];
+
+ if (other == 0)
+ return "";
+
+ switch (elf_header.e_machine)
+ {
+ case EM_MIPS:
+ result = get_mips_symbol_other (other);
+ default:
+ break;
+ }
+
+ if (result)
+ return result;
+
+ snprintf (buff, sizeof buff, _("<other>: %x"), other);
+ return buff;
+}
+
+static const char *
get_symbol_index_type (unsigned int type)
{
static char buff[32];
@@ -5577,6 +6827,9 @@ get_symbol_index_type (unsigned int type)
&& elf_header.e_machine == EM_IA_64
&& elf_header.e_ident[EI_OSABI] == ELFOSABI_HPUX)
return "ANSI_COM";
+ else if (elf_header.e_machine == EM_X86_64
+ && type == SHN_X86_64_LCOMMON)
+ return "LARGE_COM";
else if (type >= SHN_LOPROC && type <= SHN_HIPROC)
sprintf (buff, "PRC[0x%04x]", type);
else if (type >= SHN_LOOS && type <= SHN_HIOS)
@@ -5591,13 +6844,13 @@ get_symbol_index_type (unsigned int type)
return buff;
}
-static int *
-get_dynamic_data (FILE *file, unsigned int number)
+static bfd_vma *
+get_dynamic_data (FILE *file, unsigned int number, unsigned int ent_size)
{
unsigned char *e_data;
- int *i_data;
+ bfd_vma *i_data;
- e_data = malloc (number * 4);
+ e_data = cmalloc (number, ent_size);
if (e_data == NULL)
{
@@ -5605,13 +6858,13 @@ get_dynamic_data (FILE *file, unsigned int number)
return NULL;
}
- if (fread (e_data, 4, number, file) != number)
+ if (fread (e_data, ent_size, number, file) != number)
{
error (_("Unable to read in dynamic data\n"));
return NULL;
}
- i_data = malloc (number * sizeof (*i_data));
+ i_data = cmalloc (number, sizeof (*i_data));
if (i_data == NULL)
{
@@ -5621,7 +6874,7 @@ get_dynamic_data (FILE *file, unsigned int number)
}
while (number--)
- i_data[number] = byte_get (e_data + number * 4, 4);
+ i_data[number] = byte_get (e_data + number * ent_size, ent_size);
free (e_data);
@@ -5633,12 +6886,10 @@ static int
process_symbol_table (FILE *file)
{
Elf_Internal_Shdr *section;
- unsigned char nb[4];
- unsigned char nc[4];
- int nbuckets = 0;
- int nchains = 0;
- int *buckets = NULL;
- int *chains = NULL;
+ bfd_vma nbuckets = 0;
+ bfd_vma nchains = 0;
+ bfd_vma *buckets = NULL;
+ bfd_vma *chains = NULL;
if (! do_syms && !do_histogram)
return 1;
@@ -5646,6 +6897,16 @@ process_symbol_table (FILE *file)
if (dynamic_info[DT_HASH] && ((do_using_dynamic && dynamic_strings != NULL)
|| do_histogram))
{
+ unsigned char nb[8];
+ unsigned char nc[8];
+ int hash_ent_size = 4;
+
+ if ((elf_header.e_machine == EM_ALPHA
+ || elf_header.e_machine == EM_S390
+ || elf_header.e_machine == EM_S390_OLD)
+ && elf_header.e_ident[EI_CLASS] == ELFCLASS64)
+ hash_ent_size = 8;
+
if (fseek (file,
(archive_file_offset
+ offset_from_vma (file, dynamic_info[DT_HASH],
@@ -5656,23 +6917,23 @@ process_symbol_table (FILE *file)
return 0;
}
- if (fread (nb, sizeof (nb), 1, file) != 1)
+ if (fread (nb, hash_ent_size, 1, file) != 1)
{
error (_("Failed to read in number of buckets\n"));
return 0;
}
- if (fread (nc, sizeof (nc), 1, file) != 1)
+ if (fread (nc, hash_ent_size, 1, file) != 1)
{
error (_("Failed to read in number of chains\n"));
return 0;
}
- nbuckets = byte_get (nb, 4);
- nchains = byte_get (nc, 4);
+ nbuckets = byte_get (nb, hash_ent_size);
+ nchains = byte_get (nc, hash_ent_size);
- buckets = get_dynamic_data (file, nbuckets);
- chains = get_dynamic_data (file, nchains);
+ buckets = get_dynamic_data (file, nbuckets, hash_ent_size);
+ chains = get_dynamic_data (file, nchains, hash_ent_size);
if (buckets == NULL || chains == NULL)
return 0;
@@ -5681,8 +6942,8 @@ process_symbol_table (FILE *file)
if (do_syms
&& dynamic_info[DT_HASH] && do_using_dynamic && dynamic_strings != NULL)
{
- int hn;
- int si;
+ unsigned long hn;
+ bfd_vma si;
printf (_("\nSymbol table for image:\n"));
if (is_32bit_elf)
@@ -5698,19 +6959,31 @@ process_symbol_table (FILE *file)
for (si = buckets[hn]; si < nchains && si > 0; si = chains[si])
{
Elf_Internal_Sym *psym;
+ int n;
psym = dynamic_symbols + si;
- printf (" %3d %3d: ", si, hn);
+ n = print_vma (si, DEC_5);
+ if (n < 5)
+ fputs (" " + n, stdout);
+ printf (" %3lu: ", hn);
print_vma (psym->st_value, LONG_HEX);
- putchar (' ' );
+ putchar (' ');
print_vma (psym->st_size, DEC_5);
printf (" %6s", get_symbol_type (ELF_ST_TYPE (psym->st_info)));
printf (" %6s", get_symbol_binding (ELF_ST_BIND (psym->st_info)));
printf (" %3s", get_symbol_visibility (ELF_ST_VISIBILITY (psym->st_other)));
+ /* Check to see if any other bits in the st_other field are set.
+ Note - displaying this information disrupts the layout of the
+ table being generated, but for the moment this case is very rare. */
+ if (psym->st_other ^ ELF_ST_VISIBILITY (psym->st_other))
+ printf (" [%s] ", get_symbol_other (psym->st_other ^ ELF_ST_VISIBILITY (psym->st_other)));
printf (" %3.3s ", get_symbol_index_type (psym->st_shndx));
- print_symbol (25, dynamic_strings + psym->st_name);
+ if (VALID_DYNAMIC_NAME (psym->st_name))
+ print_symbol (25, GET_DYNAMIC_NAME (psym->st_name));
+ else
+ printf (" <corrupt: %14ld>", psym->st_name);
putchar ('\n');
}
}
@@ -5724,7 +6997,8 @@ process_symbol_table (FILE *file)
i++, section++)
{
unsigned int si;
- char *strtab;
+ char *strtab = NULL;
+ unsigned long int strtab_size = 0;
Elf_Internal_Sym *symtab;
Elf_Internal_Sym *psym;
@@ -5746,15 +7020,19 @@ process_symbol_table (FILE *file)
continue;
if (section->sh_link == elf_header.e_shstrndx)
- strtab = string_table;
- else
+ {
+ strtab = string_table;
+ strtab_size = string_table_length;
+ }
+ else if (SECTION_HEADER_INDEX (section->sh_link) < elf_header.e_shnum)
{
Elf_Internal_Shdr *string_sec;
string_sec = SECTION_HEADER (section->sh_link);
strtab = get_data (NULL, file, string_sec->sh_offset,
- string_sec->sh_size, _("string table"));
+ 1, string_sec->sh_size, _("string table"));
+ strtab_size = strtab != NULL ? string_sec->sh_size : 0;
}
for (si = 0, psym = symtab;
@@ -5768,8 +7046,14 @@ process_symbol_table (FILE *file)
printf (" %-7s", get_symbol_type (ELF_ST_TYPE (psym->st_info)));
printf (" %-6s", get_symbol_binding (ELF_ST_BIND (psym->st_info)));
printf (" %-3s", get_symbol_visibility (ELF_ST_VISIBILITY (psym->st_other)));
+ /* Check to see if any other bits in the st_other field are set.
+ Note - displaying this information disrupts the layout of the
+ table being generated, but for the moment this case is very rare. */
+ if (psym->st_other ^ ELF_ST_VISIBILITY (psym->st_other))
+ printf (" [%s] ", get_symbol_other (psym->st_other ^ ELF_ST_VISIBILITY (psym->st_other)));
printf (" %4s ", get_symbol_index_type (psym->st_shndx));
- print_symbol (25, strtab + psym->st_name);
+ print_symbol (25, psym->st_name < strtab_size
+ ? strtab + psym->st_name : "<corrupt>");
if (section->sh_type == SHT_DYNSYM &&
version_info[DT_VERSIONTAGIDX (DT_VERSYM)] != 0)
@@ -5785,12 +7069,14 @@ process_symbol_table (FILE *file)
sizeof data + si * sizeof (vers_data));
get_data (&data, file, offset + si * sizeof (vers_data),
- sizeof (data), _("version data"));
+ sizeof (data), 1, _("version data"));
vers_data = byte_get (data, 2);
- is_nobits = (SECTION_HEADER (psym->st_shndx)->sh_type
- == SHT_NOBITS);
+ is_nobits = (SECTION_HEADER_INDEX (psym->st_shndx)
+ < elf_header.e_shnum
+ && SECTION_HEADER (psym->st_shndx)->sh_type
+ == SHT_NOBITS);
check_def = (psym->st_shndx != SHN_UNDEF);
@@ -5812,7 +7098,7 @@ process_symbol_table (FILE *file)
{
unsigned long vna_off;
- get_data (&evn, file, offset, sizeof (evn),
+ get_data (&evn, file, offset, sizeof (evn), 1,
_("version need"));
ivn.vn_aux = BYTE_GET (evn.vn_aux);
@@ -5825,7 +7111,7 @@ process_symbol_table (FILE *file)
Elf_External_Vernaux evna;
get_data (&evna, file, vna_off,
- sizeof (evna),
+ sizeof (evna), 1,
_("version need aux (3)"));
ivna.vna_other = BYTE_GET (evna.vna_other);
@@ -5847,7 +7133,9 @@ process_symbol_table (FILE *file)
if (ivna.vna_other == vers_data)
{
printf ("@%s (%d)",
- strtab + ivna.vna_name, ivna.vna_other);
+ ivna.vna_name < strtab_size
+ ? strtab + ivna.vna_name : "<corrupt>",
+ ivna.vna_other);
check_def = 0;
}
else if (! is_nobits)
@@ -5876,7 +7164,7 @@ process_symbol_table (FILE *file)
Elf_External_Verdef evd;
get_data (&evd, file, offset, sizeof (evd),
- _("version def"));
+ 1, _("version def"));
ivd.vd_ndx = BYTE_GET (evd.vd_ndx);
ivd.vd_aux = BYTE_GET (evd.vd_aux);
@@ -5891,14 +7179,15 @@ process_symbol_table (FILE *file)
offset += ivd.vd_aux;
get_data (&evda, file, offset, sizeof (evda),
- _("version def aux"));
+ 1, _("version def aux"));
ivda.vda_name = BYTE_GET (evda.vda_name);
if (psym->st_name != ivda.vda_name)
printf ((vers_data & 0x8000)
? "@%s" : "@@%s",
- strtab + ivda.vda_name);
+ ivda.vda_name < strtab_size
+ ? strtab + ivda.vda_name : "<corrupt>");
}
}
}
@@ -5918,19 +7207,19 @@ process_symbol_table (FILE *file)
if (do_histogram && buckets != NULL)
{
- int *lengths;
- int *counts;
- int hn;
- int si;
- int maxlength = 0;
- int nzero_counts = 0;
- int nsyms = 0;
+ unsigned long *lengths;
+ unsigned long *counts;
+ unsigned long hn;
+ bfd_vma si;
+ unsigned long maxlength = 0;
+ unsigned long nzero_counts = 0;
+ unsigned long nsyms = 0;
- printf (_("\nHistogram for bucket list length (total of %d buckets):\n"),
- nbuckets);
+ printf (_("\nHistogram for bucket list length (total of %lu buckets):\n"),
+ (unsigned long) nbuckets);
printf (_(" Length Number %% of total Coverage\n"));
- lengths = calloc (nbuckets, sizeof (int));
+ lengths = calloc (nbuckets, sizeof (*lengths));
if (lengths == NULL)
{
error (_("Out of memory"));
@@ -5938,9 +7227,6 @@ process_symbol_table (FILE *file)
}
for (hn = 0; hn < nbuckets; ++hn)
{
- if (! buckets[hn])
- continue;
-
for (si = buckets[hn]; si > 0 && si < nchains; si = chains[si])
{
++nsyms;
@@ -5949,7 +7235,7 @@ process_symbol_table (FILE *file)
}
}
- counts = calloc (maxlength + 1, sizeof (int));
+ counts = calloc (maxlength + 1, sizeof (*counts));
if (counts == NULL)
{
error (_("Out of memory"));
@@ -5961,13 +7247,14 @@ process_symbol_table (FILE *file)
if (nbuckets > 0)
{
- printf (" 0 %-10d (%5.1f%%)\n",
+ unsigned long i;
+ printf (" 0 %-10lu (%5.1f%%)\n",
counts[0], (counts[0] * 100.0) / nbuckets);
- for (si = 1; si <= maxlength; ++si)
+ for (i = 1; i <= maxlength; ++i)
{
- nzero_counts += counts[si] * si;
- printf ("%7d %-10d (%5.1f%%) %5.1f%%\n",
- si, counts[si], (counts[si] * 100.0) / nbuckets,
+ nzero_counts += counts[i] * i;
+ printf ("%7lu %-10lu (%5.1f%%) %5.1f%%\n",
+ i, counts[i], (counts[i] * 100.0) / nbuckets,
(nzero_counts * 100.0) / nsyms);
}
}
@@ -6009,7 +7296,10 @@ process_syminfo (FILE *file ATTRIBUTE_UNUSED)
unsigned short int flags = dynamic_syminfo[i].si_flags;
printf ("%4d: ", i);
- print_symbol (30, dynamic_strings + dynamic_symbols[i].st_name);
+ if (VALID_DYNAMIC_NAME (dynamic_symbols[i].st_name))
+ print_symbol (30, GET_DYNAMIC_NAME (dynamic_symbols[i].st_name));
+ else
+ printf ("<corrupt: %19ld>", dynamic_symbols[i].st_name);
putchar (' ');
switch (dynamic_syminfo[i].si_boundto)
@@ -6022,12 +7312,10 @@ process_syminfo (FILE *file ATTRIBUTE_UNUSED)
break;
default:
if (dynamic_syminfo[i].si_boundto > 0
- && dynamic_syminfo[i].si_boundto < dynamic_size)
+ && dynamic_syminfo[i].si_boundto < dynamic_nent
+ && VALID_DYNAMIC_NAME (dynamic_section[dynamic_syminfo[i].si_boundto].d_un.d_val))
{
- print_symbol (10,
- dynamic_strings
- + (dynamic_segment
- [dynamic_syminfo[i].si_boundto].d_un.d_val));
+ print_symbol (10, GET_DYNAMIC_NAME (dynamic_section[dynamic_syminfo[i].si_boundto].d_un.d_val));
putchar (' ' );
}
else
@@ -6051,7 +7339,7 @@ process_syminfo (FILE *file ATTRIBUTE_UNUSED)
}
#ifdef SUPPORT_DISASSEMBLY
-static void
+static int
disassemble_section (Elf_Internal_Shdr *section, FILE *file)
{
printf (_("\nAssembly dump of section %s\n"),
@@ -6084,7 +7372,8 @@ dump_section (Elf_Internal_Shdr *section, FILE *file)
addr = section->sh_addr;
- start = get_data (NULL, file, section->sh_offset, bytes, _("section data"));
+ start = get_data (NULL, file, section->sh_offset, 1, bytes,
+ _("section data"));
if (!start)
return 0;
@@ -6151,3285 +7440,612 @@ dump_section (Elf_Internal_Shdr *section, FILE *file)
return 1;
}
-
-static unsigned long int
-read_leb128 (unsigned char *data, int *length_return, int sign)
-{
- unsigned long int result = 0;
- unsigned int num_read = 0;
- int shift = 0;
- unsigned char byte;
-
- do
- {
- byte = *data++;
- num_read++;
-
- result |= (byte & 0x7f) << shift;
-
- shift += 7;
-
- }
- while (byte & 0x80);
-
- if (length_return != NULL)
- *length_return = num_read;
-
- if (sign && (shift < 32) && (byte & 0x40))
- result |= -1 << shift;
-
- return result;
-}
-
-typedef struct State_Machine_Registers
-{
- unsigned long address;
- unsigned int file;
- unsigned int line;
- unsigned int column;
- int is_stmt;
- int basic_block;
- int end_sequence;
-/* This variable hold the number of the last entry seen
- in the File Table. */
- unsigned int last_file_entry;
-} SMR;
-
-static SMR state_machine_regs;
-
-static void
-reset_state_machine (int is_stmt)
-{
- state_machine_regs.address = 0;
- state_machine_regs.file = 1;
- state_machine_regs.line = 1;
- state_machine_regs.column = 0;
- state_machine_regs.is_stmt = is_stmt;
- state_machine_regs.basic_block = 0;
- state_machine_regs.end_sequence = 0;
- state_machine_regs.last_file_entry = 0;
-}
-
-/* Handled an extend line op. Returns true if this is the end
- of sequence. */
-static int
-process_extended_line_op (unsigned char *data, int is_stmt, int pointer_size)
-{
- unsigned char op_code;
- int bytes_read;
- unsigned int len;
- unsigned char *name;
- unsigned long adr;
-
- len = read_leb128 (data, & bytes_read, 0);
- data += bytes_read;
-
- if (len == 0)
- {
- warn (_("badly formed extended line op encountered!\n"));
- return bytes_read;
- }
-
- len += bytes_read;
- op_code = *data++;
-
- printf (_(" Extended opcode %d: "), op_code);
-
- switch (op_code)
- {
- case DW_LNE_end_sequence:
- printf (_("End of Sequence\n\n"));
- reset_state_machine (is_stmt);
- break;
-
- case DW_LNE_set_address:
- adr = byte_get (data, pointer_size);
- printf (_("set Address to 0x%lx\n"), adr);
- state_machine_regs.address = adr;
- break;
-
- case DW_LNE_define_file:
- printf (_(" define new File Table entry\n"));
- printf (_(" Entry\tDir\tTime\tSize\tName\n"));
-
- printf (_(" %d\t"), ++state_machine_regs.last_file_entry);
- name = data;
- data += strlen ((char *) data) + 1;
- printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
- data += bytes_read;
- printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
- data += bytes_read;
- printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
- printf (_("%s\n\n"), name);
- break;
-
- default:
- printf (_("UNKNOWN: length %d\n"), len - bytes_read);
- break;
- }
-
- return len;
-}
-
-/* Finds section NAME inside FILE and returns a
- pointer to it, or NULL upon failure. */
-
-static Elf_Internal_Shdr *
-find_section (const char * name)
-{
- Elf_Internal_Shdr *sec;
- unsigned int i;
-
- for (i = elf_header.e_shnum, sec = section_headers + i - 1;
- i; --i, --sec)
- if (strcmp (SECTION_NAME (sec), name) == 0)
- break;
-
- if (i && sec && sec->sh_size != 0)
- return sec;
-
- return NULL;
-}
-
-/* Size of pointers in the .debug_line section. This information is not
- really present in that section. It's obtained before dumping the debug
- sections by doing some pre-scan of the .debug_info section. */
-static unsigned int * debug_line_pointer_sizes = NULL;
-static unsigned int num_debug_line_pointer_sizes = 0;
-
-/* Locate and scan the .debug_info section in the file and record the pointer
- sizes for the compilation units in it. Usually an executable will have
- just one pointer size, but this is not guaranteed, and so we try not to
- make any assumptions. Returns zero upon failure, or the number of
- compilation units upon success. */
-
-static unsigned int
-get_debug_line_pointer_sizes (FILE * file)
-{
- Elf_Internal_Shdr * section;
- unsigned char * start;
- unsigned char * end;
- unsigned char * begin;
- unsigned long length;
- unsigned int num_units;
- unsigned int unit;
-
- section = find_section (".debug_info");
- if (section == NULL)
- return 0;
-
- length = section->sh_size;
- start = get_data (NULL, file, section->sh_offset, section->sh_size,
- _("extracting pointer sizes from .debug_info section"));
- if (start == NULL)
- return 0;
-
- end = start + section->sh_size;
- /* First scan the section to get the number of comp units. */
- for (begin = start, num_units = 0; begin < end; num_units++)
- {
- /* Read the first 4 bytes. For a 32-bit DWARF section, this will
- be the length. For a 64-bit DWARF section, it'll be the escape
- code 0xffffffff followed by an 8 byte length. */
- length = byte_get (begin, 4);
-
- if (length == 0xffffffff)
- {
- length = byte_get (begin + 4, 8);
- begin += length + 12;
- }
- else
- begin += length + 4;
- }
-
- if (num_units == 0)
- {
- error (_("No comp units in .debug_info section ?"));
- free (start);
- return 0;
- }
-
- /* Then allocate an array to hold the pointer sizes. */
- debug_line_pointer_sizes = malloc (num_units * sizeof * debug_line_pointer_sizes);
- if (debug_line_pointer_sizes == NULL)
- {
- error (_("Not enough memory for a pointer size array of %u entries"),
- num_units);
- free (start);
- return 0;
- }
-
- /* Populate the array. */
- for (begin = start, unit = 0; begin < end; unit++)
- {
- length = byte_get (begin, 4);
- if (length == 0xffffffff)
- {
- /* For 64-bit DWARF, the 1-byte address_size field is 22 bytes
- from the start of the section. This is computed as follows:
-
- unit_length: 12 bytes
- version: 2 bytes
- debug_abbrev_offset: 8 bytes
- -----------------------------
- Total: 22 bytes */
-
- debug_line_pointer_sizes [unit] = byte_get (begin + 22, 1);
- length = byte_get (begin + 4, 8);
- begin += length + 12;
- }
- else
- {
- /* For 32-bit DWARF, the 1-byte address_size field is 10 bytes from
- the start of the section:
-
- unit_length: 4 bytes
- version: 2 bytes
- debug_abbrev_offset: 4 bytes
- -----------------------------
- Total: 10 bytes */
-
- debug_line_pointer_sizes [unit] = byte_get (begin + 10, 1);
- begin += length + 4;
- }
- }
-
- free (start);
- num_debug_line_pointer_sizes = num_units;
- return num_units;
-}
+/* Apply addends of RELA relocations. */
static int
-display_debug_lines (Elf_Internal_Shdr *section,
- unsigned char *start, FILE *file)
+debug_apply_rela_addends (void *file,
+ Elf_Internal_Shdr *section,
+ unsigned char *start)
{
- unsigned char *hdrptr;
- DWARF2_Internal_LineInfo info;
- unsigned char *standard_opcodes;
- unsigned char *data = start;
+ Elf_Internal_Shdr *relsec;
unsigned char *end = start + section->sh_size;
- unsigned char *end_of_sequence;
- int i;
- int offset_size;
- int initial_length_size;
- unsigned int comp_unit = 0;
+ /* FIXME: The relocation field size is relocation type dependent. */
+ unsigned int reloc_size = 4;
- printf (_("\nDump of debug contents of section %s:\n\n"),
- SECTION_NAME (section));
+ if (!is_relocatable)
+ return 1;
- if (num_debug_line_pointer_sizes == 0)
- get_debug_line_pointer_sizes (file);
+ if (section->sh_size < reloc_size)
+ return 1;
- while (data < end)
+ for (relsec = section_headers;
+ relsec < section_headers + elf_header.e_shnum;
+ ++relsec)
{
- unsigned int pointer_size;
-
- hdrptr = data;
+ unsigned long nrelas;
+ Elf_Internal_Rela *rela, *rp;
+ Elf_Internal_Shdr *symsec;
+ Elf_Internal_Sym *symtab;
+ Elf_Internal_Sym *sym;
- /* Check the length of the block. */
- info.li_length = byte_get (hdrptr, 4);
- hdrptr += 4;
-
- if (info.li_length == 0xffffffff)
- {
- /* This section is 64-bit DWARF 3. */
- info.li_length = byte_get (hdrptr, 8);
- hdrptr += 8;
- offset_size = 8;
- initial_length_size = 12;
- }
- else
- {
- offset_size = 4;
- initial_length_size = 4;
- }
-
- if (info.li_length + initial_length_size > section->sh_size)
- {
- warn
- (_("The line info appears to be corrupt - the section is too small\n"));
- return 0;
- }
-
- /* Check its version number. */
- info.li_version = byte_get (hdrptr, 2);
- hdrptr += 2;
- if (info.li_version != 2 && info.li_version != 3)
- {
- warn (_("Only DWARF version 2 and 3 line info is currently supported.\n"));
- return 0;
- }
-
- info.li_prologue_length = byte_get (hdrptr, offset_size);
- hdrptr += offset_size;
- info.li_min_insn_length = byte_get (hdrptr, 1);
- hdrptr++;
- info.li_default_is_stmt = byte_get (hdrptr, 1);
- hdrptr++;
- info.li_line_base = byte_get (hdrptr, 1);
- hdrptr++;
- info.li_line_range = byte_get (hdrptr, 1);
- hdrptr++;
- info.li_opcode_base = byte_get (hdrptr, 1);
- hdrptr++;
-
- /* Sign extend the line base field. */
- info.li_line_base <<= 24;
- info.li_line_base >>= 24;
-
- /* Get the pointer size from the comp unit associated
- with this block of line number information. */
- if (comp_unit >= num_debug_line_pointer_sizes)
- {
- error (_("Not enough comp units for .debug_lines section\n"));
- return 0;
- }
- else
- {
- pointer_size = debug_line_pointer_sizes [comp_unit];
- comp_unit ++;
- }
-
- printf (_(" Length: %ld\n"), info.li_length);
- printf (_(" DWARF Version: %d\n"), info.li_version);
- printf (_(" Prologue Length: %d\n"), info.li_prologue_length);
- printf (_(" Minimum Instruction Length: %d\n"), info.li_min_insn_length);
- printf (_(" Initial value of 'is_stmt': %d\n"), info.li_default_is_stmt);
- printf (_(" Line Base: %d\n"), info.li_line_base);
- printf (_(" Line Range: %d\n"), info.li_line_range);
- printf (_(" Opcode Base: %d\n"), info.li_opcode_base);
- printf (_(" (Pointer size: %u)\n"), pointer_size);
-
- end_of_sequence = data + info.li_length + initial_length_size;
-
- reset_state_machine (info.li_default_is_stmt);
-
- /* Display the contents of the Opcodes table. */
- standard_opcodes = hdrptr;
-
- printf (_("\n Opcodes:\n"));
-
- for (i = 1; i < info.li_opcode_base; i++)
- printf (_(" Opcode %d has %d args\n"), i, standard_opcodes[i - 1]);
-
- /* Display the contents of the Directory table. */
- data = standard_opcodes + info.li_opcode_base - 1;
-
- if (*data == 0)
- printf (_("\n The Directory Table is empty.\n"));
- else
- {
- printf (_("\n The Directory Table:\n"));
-
- while (*data != 0)
- {
- printf (_(" %s\n"), data);
+ if (relsec->sh_type != SHT_RELA
+ || 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;
- data += strlen ((char *) data) + 1;
- }
- }
+ if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size,
+ &rela, &nrelas))
+ return 0;
- /* Skip the NUL at the end of the table. */
- data++;
+ symsec = SECTION_HEADER (relsec->sh_link);
+ symtab = GET_ELF_SYMBOLS (file, symsec);
- /* Display the contents of the File Name table. */
- if (*data == 0)
- printf (_("\n The File Name Table is empty.\n"));
- else
+ for (rp = rela; rp < rela + nrelas; ++rp)
{
- printf (_("\n The File Name Table:\n"));
- printf (_(" Entry\tDir\tTime\tSize\tName\n"));
+ unsigned char *loc;
- while (*data != 0)
+ loc = start + rp->r_offset;
+ if ((loc + reloc_size) > end)
{
- unsigned char *name;
- int bytes_read;
-
- printf (_(" %d\t"), ++state_machine_regs.last_file_entry);
- name = data;
-
- data += strlen ((char *) data) + 1;
-
- printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
- data += bytes_read;
- printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
- data += bytes_read;
- printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
- data += bytes_read;
- printf (_("%s\n"), name);
+ warn (_("skipping invalid relocation offset 0x%lx in section %s\n"),
+ (unsigned long) rp->r_offset,
+ SECTION_NAME (section));
+ continue;
}
- }
-
- /* Skip the NUL at the end of the table. */
- data++;
-
- /* Now display the statements. */
- printf (_("\n Line Number Statements:\n"));
-
-
- while (data < end_of_sequence)
- {
- unsigned char op_code;
- int adv;
- int bytes_read;
-
- op_code = *data++;
- if (op_code >= info.li_opcode_base)
- {
- op_code -= info.li_opcode_base;
- adv = (op_code / info.li_line_range) * info.li_min_insn_length;
- state_machine_regs.address += adv;
- printf (_(" Special opcode %d: advance Address by %d to 0x%lx"),
- op_code, adv, state_machine_regs.address);
- adv = (op_code % info.li_line_range) + info.li_line_base;
- state_machine_regs.line += adv;
- printf (_(" and Line by %d to %d\n"),
- adv, state_machine_regs.line);
- }
- else switch (op_code)
+ if (is_32bit_elf)
{
- case DW_LNS_extended_op:
- data += process_extended_line_op (data, info.li_default_is_stmt,
- pointer_size);
- break;
-
- case DW_LNS_copy:
- printf (_(" Copy\n"));
- break;
-
- case DW_LNS_advance_pc:
- adv = info.li_min_insn_length * read_leb128 (data, & bytes_read, 0);
- data += bytes_read;
- state_machine_regs.address += adv;
- printf (_(" Advance PC by %d to %lx\n"), adv,
- state_machine_regs.address);
- break;
-
- case DW_LNS_advance_line:
- adv = read_leb128 (data, & bytes_read, 1);
- data += bytes_read;
- state_machine_regs.line += adv;
- printf (_(" Advance Line by %d to %d\n"), adv,
- state_machine_regs.line);
- break;
-
- case DW_LNS_set_file:
- adv = read_leb128 (data, & bytes_read, 0);
- data += bytes_read;
- printf (_(" Set File Name to entry %d in the File Name Table\n"),
- adv);
- state_machine_regs.file = adv;
- break;
-
- case DW_LNS_set_column:
- adv = read_leb128 (data, & bytes_read, 0);
- data += bytes_read;
- printf (_(" Set column to %d\n"), adv);
- state_machine_regs.column = adv;
- break;
-
- case DW_LNS_negate_stmt:
- adv = state_machine_regs.is_stmt;
- adv = ! adv;
- printf (_(" Set is_stmt to %d\n"), adv);
- state_machine_regs.is_stmt = adv;
- break;
-
- case DW_LNS_set_basic_block:
- printf (_(" Set basic block\n"));
- state_machine_regs.basic_block = 1;
- break;
-
- case DW_LNS_const_add_pc:
- adv = (((255 - info.li_opcode_base) / info.li_line_range)
- * info.li_min_insn_length);
- state_machine_regs.address += adv;
- printf (_(" Advance PC by constant %d to 0x%lx\n"), adv,
- state_machine_regs.address);
- break;
-
- case DW_LNS_fixed_advance_pc:
- adv = byte_get (data, 2);
- data += 2;
- state_machine_regs.address += adv;
- printf (_(" Advance PC by fixed size amount %d to 0x%lx\n"),
- adv, state_machine_regs.address);
- break;
-
- case DW_LNS_set_prologue_end:
- printf (_(" Set prologue_end to true\n"));
- break;
-
- case DW_LNS_set_epilogue_begin:
- printf (_(" Set epilogue_begin to true\n"));
- break;
-
- case DW_LNS_set_isa:
- adv = read_leb128 (data, & bytes_read, 0);
- data += bytes_read;
- printf (_(" Set ISA to %d\n"), adv);
- break;
-
- default:
- printf (_(" Unknown opcode %d with operands: "), op_code);
- {
- int i;
- for (i = standard_opcodes[op_code - 1]; i > 0 ; --i)
- {
- printf ("0x%lx%s", read_leb128 (data, &bytes_read, 0),
- i == 1 ? "" : ", ");
- data += bytes_read;
- }
- putchar ('\n');
- }
- break;
+ sym = symtab + ELF32_R_SYM (rp->r_info);
+
+ if (ELF32_R_SYM (rp->r_info) != 0
+ && ELF32_ST_TYPE (sym->st_info) != STT_SECTION
+ /* 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. */
+ && ELF32_ST_TYPE (sym->st_info) != STT_OBJECT)
+ {
+ warn (_("skipping unexpected symbol type %s in relocation in section .rela%s\n"),
+ get_symbol_type (ELF32_ST_TYPE (sym->st_info)),
+ SECTION_NAME (section));
+ continue;
+ }
}
- }
- putchar ('\n');
- }
-
- return 1;
-}
-
-static int
-display_debug_pubnames (Elf_Internal_Shdr *section,
- unsigned char *start,
- FILE *file ATTRIBUTE_UNUSED)
-{
- DWARF2_Internal_PubNames pubnames;
- unsigned char *end;
-
- end = start + section->sh_size;
-
- printf (_("Contents of the %s section:\n\n"), SECTION_NAME (section));
-
- while (start < end)
- {
- unsigned char *data;
- unsigned long offset;
- int offset_size, initial_length_size;
-
- data = start;
-
- pubnames.pn_length = byte_get (data, 4);
- data += 4;
- if (pubnames.pn_length == 0xffffffff)
- {
- pubnames.pn_length = byte_get (data, 8);
- data += 8;
- offset_size = 8;
- initial_length_size = 12;
- }
- else
- {
- offset_size = 4;
- initial_length_size = 4;
- }
-
- pubnames.pn_version = byte_get (data, 2);
- data += 2;
- pubnames.pn_offset = byte_get (data, offset_size);
- data += offset_size;
- pubnames.pn_size = byte_get (data, offset_size);
- data += offset_size;
-
- start += pubnames.pn_length + initial_length_size;
-
- if (pubnames.pn_version != 2 && pubnames.pn_version != 3)
- {
- static int warned = 0;
-
- if (! warned)
+ else
{
- warn (_("Only DWARF 2 and 3 pubnames are currently supported\n"));
- warned = 1;
+ /* In MIPS little-endian objects, r_info isn't really a
+ 64-bit little-endian value: it has a 32-bit little-endian
+ symbol index followed by four individual byte fields.
+ Reorder INFO accordingly. */
+ if (elf_header.e_machine == EM_MIPS
+ && elf_header.e_ident[EI_DATA] != ELFDATA2MSB)
+ rp->r_info = (((rp->r_info & 0xffffffff) << 32)
+ | ((rp->r_info >> 56) & 0xff)
+ | ((rp->r_info >> 40) & 0xff00)
+ | ((rp->r_info >> 24) & 0xff0000)
+ | ((rp->r_info >> 8) & 0xff000000));
+
+ sym = symtab + ELF64_R_SYM (rp->r_info);
+
+ if (ELF64_R_SYM (rp->r_info) != 0
+ && ELF64_ST_TYPE (sym->st_info) != STT_SECTION
+ && ELF64_ST_TYPE (sym->st_info) != STT_OBJECT)
+ {
+ warn (_("skipping unexpected symbol type %s in relocation in section .rela.%s\n"),
+ get_symbol_type (ELF64_ST_TYPE (sym->st_info)),
+ SECTION_NAME (section));
+ continue;
+ }
}
- continue;
+ byte_put (loc, rp->r_addend, reloc_size);
}
- printf (_(" Length: %ld\n"),
- pubnames.pn_length);
- printf (_(" Version: %d\n"),
- pubnames.pn_version);
- printf (_(" Offset into .debug_info section: %ld\n"),
- pubnames.pn_offset);
- printf (_(" Size of area in .debug_info section: %ld\n"),
- pubnames.pn_size);
-
- printf (_("\n Offset\tName\n"));
-
- do
- {
- offset = byte_get (data, offset_size);
-
- if (offset != 0)
- {
- data += offset_size;
- printf (" %-6ld\t\t%s\n", offset, data);
- data += strlen ((char *) data) + 1;
- }
- }
- while (offset != 0);
+ free (symtab);
+ free (rela);
+ break;
}
-
- printf ("\n");
return 1;
}
-static char *
-get_TAG_name (unsigned long tag)
-{
- switch (tag)
- {
- case DW_TAG_padding: return "DW_TAG_padding";
- case DW_TAG_array_type: return "DW_TAG_array_type";
- case DW_TAG_class_type: return "DW_TAG_class_type";
- case DW_TAG_entry_point: return "DW_TAG_entry_point";
- case DW_TAG_enumeration_type: return "DW_TAG_enumeration_type";
- case DW_TAG_formal_parameter: return "DW_TAG_formal_parameter";
- case DW_TAG_imported_declaration: return "DW_TAG_imported_declaration";
- case DW_TAG_label: return "DW_TAG_label";
- case DW_TAG_lexical_block: return "DW_TAG_lexical_block";
- case DW_TAG_member: return "DW_TAG_member";
- case DW_TAG_pointer_type: return "DW_TAG_pointer_type";
- case DW_TAG_reference_type: return "DW_TAG_reference_type";
- case DW_TAG_compile_unit: return "DW_TAG_compile_unit";
- case DW_TAG_string_type: return "DW_TAG_string_type";
- case DW_TAG_structure_type: return "DW_TAG_structure_type";
- case DW_TAG_subroutine_type: return "DW_TAG_subroutine_type";
- case DW_TAG_typedef: return "DW_TAG_typedef";
- case DW_TAG_union_type: return "DW_TAG_union_type";
- case DW_TAG_unspecified_parameters: return "DW_TAG_unspecified_parameters";
- case DW_TAG_variant: return "DW_TAG_variant";
- case DW_TAG_common_block: return "DW_TAG_common_block";
- case DW_TAG_common_inclusion: return "DW_TAG_common_inclusion";
- case DW_TAG_inheritance: return "DW_TAG_inheritance";
- case DW_TAG_inlined_subroutine: return "DW_TAG_inlined_subroutine";
- case DW_TAG_module: return "DW_TAG_module";
- case DW_TAG_ptr_to_member_type: return "DW_TAG_ptr_to_member_type";
- case DW_TAG_set_type: return "DW_TAG_set_type";
- case DW_TAG_subrange_type: return "DW_TAG_subrange_type";
- case DW_TAG_with_stmt: return "DW_TAG_with_stmt";
- case DW_TAG_access_declaration: return "DW_TAG_access_declaration";
- case DW_TAG_base_type: return "DW_TAG_base_type";
- case DW_TAG_catch_block: return "DW_TAG_catch_block";
- case DW_TAG_const_type: return "DW_TAG_const_type";
- case DW_TAG_constant: return "DW_TAG_constant";
- case DW_TAG_enumerator: return "DW_TAG_enumerator";
- case DW_TAG_file_type: return "DW_TAG_file_type";
- case DW_TAG_friend: return "DW_TAG_friend";
- case DW_TAG_namelist: return "DW_TAG_namelist";
- case DW_TAG_namelist_item: return "DW_TAG_namelist_item";
- case DW_TAG_packed_type: return "DW_TAG_packed_type";
- case DW_TAG_subprogram: return "DW_TAG_subprogram";
- case DW_TAG_template_type_param: return "DW_TAG_template_type_param";
- case DW_TAG_template_value_param: return "DW_TAG_template_value_param";
- case DW_TAG_thrown_type: return "DW_TAG_thrown_type";
- case DW_TAG_try_block: return "DW_TAG_try_block";
- case DW_TAG_variant_part: return "DW_TAG_variant_part";
- case DW_TAG_variable: return "DW_TAG_variable";
- case DW_TAG_volatile_type: return "DW_TAG_volatile_type";
- case DW_TAG_MIPS_loop: return "DW_TAG_MIPS_loop";
- case DW_TAG_format_label: return "DW_TAG_format_label";
- case DW_TAG_function_template: return "DW_TAG_function_template";
- case DW_TAG_class_template: return "DW_TAG_class_template";
- /* DWARF 2.1 values. */
- case DW_TAG_dwarf_procedure: return "DW_TAG_dwarf_procedure";
- case DW_TAG_restrict_type: return "DW_TAG_restrict_type";
- case DW_TAG_interface_type: return "DW_TAG_interface_type";
- case DW_TAG_namespace: return "DW_TAG_namespace";
- case DW_TAG_imported_module: return "DW_TAG_imported_module";
- case DW_TAG_unspecified_type: return "DW_TAG_unspecified_type";
- case DW_TAG_partial_unit: return "DW_TAG_partial_unit";
- case DW_TAG_imported_unit: return "DW_TAG_imported_unit";
- /* UPC values. */
- case DW_TAG_upc_shared_type: return "DW_TAG_upc_shared_type";
- case DW_TAG_upc_strict_type: return "DW_TAG_upc_strict_type";
- case DW_TAG_upc_relaxed_type: return "DW_TAG_upc_relaxed_type";
- default:
- {
- static char buffer[100];
-
- sprintf (buffer, _("Unknown TAG value: %lx"), tag);
- return buffer;
- }
- }
-}
-
-static char *
-get_AT_name (unsigned long attribute)
-{
- switch (attribute)
- {
- case DW_AT_sibling: return "DW_AT_sibling";
- case DW_AT_location: return "DW_AT_location";
- case DW_AT_name: return "DW_AT_name";
- case DW_AT_ordering: return "DW_AT_ordering";
- case DW_AT_subscr_data: return "DW_AT_subscr_data";
- case DW_AT_byte_size: return "DW_AT_byte_size";
- case DW_AT_bit_offset: return "DW_AT_bit_offset";
- case DW_AT_bit_size: return "DW_AT_bit_size";
- case DW_AT_element_list: return "DW_AT_element_list";
- case DW_AT_stmt_list: return "DW_AT_stmt_list";
- case DW_AT_low_pc: return "DW_AT_low_pc";
- case DW_AT_high_pc: return "DW_AT_high_pc";
- case DW_AT_language: return "DW_AT_language";
- case DW_AT_member: return "DW_AT_member";
- case DW_AT_discr: return "DW_AT_discr";
- case DW_AT_discr_value: return "DW_AT_discr_value";
- case DW_AT_visibility: return "DW_AT_visibility";
- case DW_AT_import: return "DW_AT_import";
- case DW_AT_string_length: return "DW_AT_string_length";
- case DW_AT_common_reference: return "DW_AT_common_reference";
- case DW_AT_comp_dir: return "DW_AT_comp_dir";
- case DW_AT_const_value: return "DW_AT_const_value";
- case DW_AT_containing_type: return "DW_AT_containing_type";
- case DW_AT_default_value: return "DW_AT_default_value";
- case DW_AT_inline: return "DW_AT_inline";
- case DW_AT_is_optional: return "DW_AT_is_optional";
- case DW_AT_lower_bound: return "DW_AT_lower_bound";
- case DW_AT_producer: return "DW_AT_producer";
- case DW_AT_prototyped: return "DW_AT_prototyped";
- case DW_AT_return_addr: return "DW_AT_return_addr";
- case DW_AT_start_scope: return "DW_AT_start_scope";
- case DW_AT_stride_size: return "DW_AT_stride_size";
- case DW_AT_upper_bound: return "DW_AT_upper_bound";
- case DW_AT_abstract_origin: return "DW_AT_abstract_origin";
- case DW_AT_accessibility: return "DW_AT_accessibility";
- case DW_AT_address_class: return "DW_AT_address_class";
- case DW_AT_artificial: return "DW_AT_artificial";
- case DW_AT_base_types: return "DW_AT_base_types";
- case DW_AT_calling_convention: return "DW_AT_calling_convention";
- case DW_AT_count: return "DW_AT_count";
- case DW_AT_data_member_location: return "DW_AT_data_member_location";
- case DW_AT_decl_column: return "DW_AT_decl_column";
- case DW_AT_decl_file: return "DW_AT_decl_file";
- case DW_AT_decl_line: return "DW_AT_decl_line";
- case DW_AT_declaration: return "DW_AT_declaration";
- case DW_AT_discr_list: return "DW_AT_discr_list";
- case DW_AT_encoding: return "DW_AT_encoding";
- case DW_AT_external: return "DW_AT_external";
- case DW_AT_frame_base: return "DW_AT_frame_base";
- case DW_AT_friend: return "DW_AT_friend";
- case DW_AT_identifier_case: return "DW_AT_identifier_case";
- case DW_AT_macro_info: return "DW_AT_macro_info";
- case DW_AT_namelist_items: return "DW_AT_namelist_items";
- case DW_AT_priority: return "DW_AT_priority";
- case DW_AT_segment: return "DW_AT_segment";
- case DW_AT_specification: return "DW_AT_specification";
- case DW_AT_static_link: return "DW_AT_static_link";
- case DW_AT_type: return "DW_AT_type";
- case DW_AT_use_location: return "DW_AT_use_location";
- case DW_AT_variable_parameter: return "DW_AT_variable_parameter";
- case DW_AT_virtuality: return "DW_AT_virtuality";
- case DW_AT_vtable_elem_location: return "DW_AT_vtable_elem_location";
- /* DWARF 2.1 values. */
- case DW_AT_allocated: return "DW_AT_allocated";
- case DW_AT_associated: return "DW_AT_associated";
- case DW_AT_data_location: return "DW_AT_data_location";
- case DW_AT_stride: return "DW_AT_stride";
- case DW_AT_entry_pc: return "DW_AT_entry_pc";
- case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
- case DW_AT_extension: return "DW_AT_extension";
- case DW_AT_ranges: return "DW_AT_ranges";
- case DW_AT_trampoline: return "DW_AT_trampoline";
- case DW_AT_call_column: return "DW_AT_call_column";
- case DW_AT_call_file: return "DW_AT_call_file";
- case DW_AT_call_line: return "DW_AT_call_line";
- /* SGI/MIPS extensions. */
- case DW_AT_MIPS_fde: return "DW_AT_MIPS_fde";
- case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";
- case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";
- case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin";
- case DW_AT_MIPS_loop_unroll_factor: return "DW_AT_MIPS_loop_unroll_factor";
- case DW_AT_MIPS_software_pipeline_depth:
- return "DW_AT_MIPS_software_pipeline_depth";
- case DW_AT_MIPS_linkage_name: return "DW_AT_MIPS_linkage_name";
- case DW_AT_MIPS_stride: return "DW_AT_MIPS_stride";
- case DW_AT_MIPS_abstract_name: return "DW_AT_MIPS_abstract_name";
- case DW_AT_MIPS_clone_origin: return "DW_AT_MIPS_clone_origin";
- case DW_AT_MIPS_has_inlines: return "DW_AT_MIPS_has_inlines";
- /* GNU extensions. */
- case DW_AT_sf_names: return "DW_AT_sf_names";
- case DW_AT_src_info: return "DW_AT_src_info";
- case DW_AT_mac_info: return "DW_AT_mac_info";
- case DW_AT_src_coords: return "DW_AT_src_coords";
- case DW_AT_body_begin: return "DW_AT_body_begin";
- case DW_AT_body_end: return "DW_AT_body_end";
- case DW_AT_GNU_vector: return "DW_AT_GNU_vector";
- /* UPC extension. */
- case DW_AT_upc_threads_scaled: return "DW_AT_upc_threads_scaled";
- default:
- {
- static char buffer[100];
-
- sprintf (buffer, _("Unknown AT value: %lx"), attribute);
- return buffer;
- }
- }
-}
-
-static char *
-get_FORM_name (unsigned long form)
-{
- switch (form)
- {
- case DW_FORM_addr: return "DW_FORM_addr";
- case DW_FORM_block2: return "DW_FORM_block2";
- case DW_FORM_block4: return "DW_FORM_block4";
- case DW_FORM_data2: return "DW_FORM_data2";
- case DW_FORM_data4: return "DW_FORM_data4";
- case DW_FORM_data8: return "DW_FORM_data8";
- case DW_FORM_string: return "DW_FORM_string";
- case DW_FORM_block: return "DW_FORM_block";
- case DW_FORM_block1: return "DW_FORM_block1";
- case DW_FORM_data1: return "DW_FORM_data1";
- case DW_FORM_flag: return "DW_FORM_flag";
- case DW_FORM_sdata: return "DW_FORM_sdata";
- case DW_FORM_strp: return "DW_FORM_strp";
- case DW_FORM_udata: return "DW_FORM_udata";
- case DW_FORM_ref_addr: return "DW_FORM_ref_addr";
- case DW_FORM_ref1: return "DW_FORM_ref1";
- case DW_FORM_ref2: return "DW_FORM_ref2";
- case DW_FORM_ref4: return "DW_FORM_ref4";
- case DW_FORM_ref8: return "DW_FORM_ref8";
- case DW_FORM_ref_udata: return "DW_FORM_ref_udata";
- case DW_FORM_indirect: return "DW_FORM_indirect";
- default:
- {
- static char buffer[100];
-
- sprintf (buffer, _("Unknown FORM value: %lx"), form);
- return buffer;
- }
- }
-}
-
-/* FIXME: There are better and more efficient ways to handle
- these structures. For now though, I just want something that
- is simple to implement. */
-typedef struct abbrev_attr
-{
- unsigned long attribute;
- unsigned long form;
- struct abbrev_attr *next;
-}
-abbrev_attr;
-
-typedef struct abbrev_entry
-{
- unsigned long entry;
- unsigned long tag;
- int children;
- struct abbrev_attr *first_attr;
- struct abbrev_attr *last_attr;
- struct abbrev_entry *next;
-}
-abbrev_entry;
-
-static abbrev_entry *first_abbrev = NULL;
-static abbrev_entry *last_abbrev = NULL;
-
-static void
-free_abbrevs (void)
-{
- abbrev_entry *abbrev;
-
- for (abbrev = first_abbrev; abbrev;)
- {
- abbrev_entry *next = abbrev->next;
- abbrev_attr *attr;
-
- for (attr = abbrev->first_attr; attr;)
- {
- abbrev_attr *next = attr->next;
-
- free (attr);
- attr = next;
- }
-
- free (abbrev);
- abbrev = next;
- }
-
- last_abbrev = first_abbrev = NULL;
-}
-
-static void
-add_abbrev (unsigned long number, unsigned long tag, int children)
+int
+load_debug_section (enum dwarf_section_display_enum debug, void *file)
{
- abbrev_entry *entry;
+ struct dwarf_section *section = &debug_displays [debug].section;
+ Elf_Internal_Shdr *sec;
+ char buf [64];
- entry = malloc (sizeof (*entry));
+ /* If it is already loaded, do nothing. */
+ if (section->start != NULL)
+ return 1;
- if (entry == NULL)
- /* ugg */
- return;
+ /* Locate the debug section. */
+ sec = find_section (section->name);
+ if (sec == NULL)
+ return 0;
- entry->entry = number;
- entry->tag = tag;
- entry->children = children;
- entry->first_attr = NULL;
- entry->last_attr = NULL;
- entry->next = NULL;
+ snprintf (buf, sizeof (buf), _("%s section data"), section->name);
+ section->address = sec->sh_addr;
+ section->size = sec->sh_size;
+ section->start = get_data (NULL, file, sec->sh_offset, 1,
+ sec->sh_size, buf);
- if (first_abbrev == NULL)
- first_abbrev = entry;
- else
- last_abbrev->next = entry;
+ if (debug_displays [debug].relocate)
+ debug_apply_rela_addends (file, sec, section->start);
- last_abbrev = entry;
+ return section->start != NULL;
}
-static void
-add_abbrev_attr (unsigned long attribute, unsigned long form)
+void
+free_debug_section (enum dwarf_section_display_enum debug)
{
- abbrev_attr *attr;
-
- attr = malloc (sizeof (*attr));
+ struct dwarf_section *section = &debug_displays [debug].section;
- if (attr == NULL)
- /* ugg */
+ if (section->start == NULL)
return;
- attr->attribute = attribute;
- attr->form = form;
- attr->next = NULL;
-
- if (last_abbrev->first_attr == NULL)
- last_abbrev->first_attr = attr;
- else
- last_abbrev->last_attr->next = attr;
-
- last_abbrev->last_attr = attr;
-}
-
-/* Processes the (partial) contents of a .debug_abbrev section.
- Returns NULL if the end of the section was encountered.
- Returns the address after the last byte read if the end of
- an abbreviation set was found. */
-
-static unsigned char *
-process_abbrev_section (unsigned char *start, unsigned char *end)
-{
- if (first_abbrev != NULL)
- return NULL;
-
- while (start < end)
- {
- int bytes_read;
- unsigned long entry;
- unsigned long tag;
- unsigned long attribute;
- int children;
-
- entry = read_leb128 (start, & bytes_read, 0);
- start += bytes_read;
-
- /* A single zero is supposed to end the section according
- to the standard. If there's more, then signal that to
- the caller. */
- if (entry == 0)
- return start == end ? NULL : start;
-
- tag = read_leb128 (start, & bytes_read, 0);
- start += bytes_read;
-
- children = *start++;
-
- add_abbrev (entry, tag, children);
-
- do
- {
- unsigned long form;
-
- attribute = read_leb128 (start, & bytes_read, 0);
- start += bytes_read;
-
- form = read_leb128 (start, & bytes_read, 0);
- start += bytes_read;
-
- if (attribute != 0)
- add_abbrev_attr (attribute, form);
- }
- while (attribute != 0);
- }
-
- return NULL;
+ free ((char *) section->start);
+ section->start = NULL;
+ section->address = 0;
+ section->size = 0;
}
-
static int
-display_debug_macinfo (Elf_Internal_Shdr *section,
- unsigned char *start,
- FILE *file ATTRIBUTE_UNUSED)
+display_debug_section (Elf_Internal_Shdr *section, FILE *file)
{
- unsigned char *end = start + section->sh_size;
- unsigned char *curr = start;
- unsigned int bytes_read;
- enum dwarf_macinfo_record_type op;
-
- printf (_("Contents of the %s section:\n\n"), SECTION_NAME (section));
+ char *name = SECTION_NAME (section);
+ bfd_size_type length;
+ int result = 1;
+ enum dwarf_section_display_enum i;
- while (curr < end)
+ length = section->sh_size;
+ if (length == 0)
{
- unsigned int lineno;
- const char *string;
-
- op = *curr;
- curr++;
-
- switch (op)
- {
- case DW_MACINFO_start_file:
- {
- unsigned int filenum;
-
- lineno = read_leb128 (curr, & bytes_read, 0);
- curr += bytes_read;
- filenum = read_leb128 (curr, & bytes_read, 0);
- curr += bytes_read;
-
- printf (_(" DW_MACINFO_start_file - lineno: %d filenum: %d\n"), lineno, filenum);
- }
- break;
-
- case DW_MACINFO_end_file:
- printf (_(" DW_MACINFO_end_file\n"));
- break;
+ printf (_("\nSection '%s' has no debugging data.\n"), name);
+ return 0;
+ }
- case DW_MACINFO_define:
- lineno = read_leb128 (curr, & bytes_read, 0);
- curr += bytes_read;
- string = curr;
- curr += strlen (string) + 1;
- printf (_(" DW_MACINFO_define - lineno : %d macro : %s\n"), lineno, string);
- break;
+ if (strneq (name, ".gnu.linkonce.wi.", 17))
+ name = ".debug_info";
- case DW_MACINFO_undef:
- lineno = read_leb128 (curr, & bytes_read, 0);
- curr += bytes_read;
- string = curr;
- curr += strlen (string) + 1;
- printf (_(" DW_MACINFO_undef - lineno : %d macro : %s\n"), lineno, string);
- break;
+ /* See if we know how to display the contents of this section. */
+ for (i = 0; i < max; i++)
+ if (streq (debug_displays[i].section.name, name))
+ {
+ struct dwarf_section *sec = &debug_displays [i].section;
- case DW_MACINFO_vendor_ext:
+ if (load_debug_section (i, file))
{
- unsigned int constant;
+ result &= debug_displays[i].display (sec, file);
- constant = read_leb128 (curr, & bytes_read, 0);
- curr += bytes_read;
- string = curr;
- curr += strlen (string) + 1;
- printf (_(" DW_MACINFO_vendor_ext - constant : %d string : %s\n"), constant, string);
+ if (i != info && i != abbrev)
+ free_debug_section (i);
}
- break;
- }
- }
- return 1;
-}
-
-
-static int
-display_debug_abbrev (Elf_Internal_Shdr *section,
- unsigned char *start,
- FILE *file ATTRIBUTE_UNUSED)
-{
- abbrev_entry *entry;
- unsigned char *end = start + section->sh_size;
-
- printf (_("Contents of the %s section:\n\n"), SECTION_NAME (section));
+ break;
+ }
- do
+ if (i == max)
{
- start = process_abbrev_section (start, end);
-
- if (first_abbrev == NULL)
- continue;
-
- printf (_(" Number TAG\n"));
-
- for (entry = first_abbrev; entry; entry = entry->next)
- {
- abbrev_attr *attr;
-
- printf (_(" %ld %s [%s]\n"),
- entry->entry,
- get_TAG_name (entry->tag),
- entry->children ? _("has children") : _("no children"));
-
- for (attr = entry->first_attr; attr; attr = attr->next)
- {
- printf (_(" %-18s %s\n"),
- get_AT_name (attr->attribute),
- get_FORM_name (attr->form));
- }
- }
-
- free_abbrevs ();
+ printf (_("Unrecognized debug section: %s\n"), name);
+ result = 0;
}
- while (start);
-
- printf ("\n");
- return 1;
+ return result;
}
-
-static unsigned char *
-display_block (unsigned char *data, unsigned long length)
-{
- printf (_(" %lu byte block: "), length);
-
- while (length --)
- printf ("%lx ", (unsigned long) byte_get (data++, 1));
-
- return data;
-}
+/* Set DUMP_SECTS for all sections where dumps were requested
+ based on section name. */
static void
-decode_location_expression (unsigned char * data,
- unsigned int pointer_size,
- unsigned long length)
+initialise_dumps_byname (void)
{
- unsigned op;
- int bytes_read;
- unsigned long uvalue;
- unsigned char *end = data + length;
+ struct dump_list_entry *cur;
- while (data < end)
+ for (cur = dump_sects_byname; cur; cur = cur->next)
{
- op = *data++;
-
- switch (op)
- {
- case DW_OP_addr:
- printf ("DW_OP_addr: %lx",
- (unsigned long) byte_get (data, pointer_size));
- data += pointer_size;
- break;
- case DW_OP_deref:
- printf ("DW_OP_deref");
- break;
- case DW_OP_const1u:
- printf ("DW_OP_const1u: %lu", (unsigned long) byte_get (data++, 1));
- break;
- case DW_OP_const1s:
- printf ("DW_OP_const1s: %ld", (long) byte_get (data++, 1));
- break;
- case DW_OP_const2u:
- printf ("DW_OP_const2u: %lu", (unsigned long) byte_get (data, 2));
- data += 2;
- break;
- case DW_OP_const2s:
- printf ("DW_OP_const2s: %ld", (long) byte_get (data, 2));
- data += 2;
- break;
- case DW_OP_const4u:
- printf ("DW_OP_const4u: %lu", (unsigned long) byte_get (data, 4));
- data += 4;
- break;
- case DW_OP_const4s:
- printf ("DW_OP_const4s: %ld", (long) byte_get (data, 4));
- data += 4;
- break;
- case DW_OP_const8u:
- printf ("DW_OP_const8u: %lu %lu", (unsigned long) byte_get (data, 4),
- (unsigned long) byte_get (data + 4, 4));
- data += 8;
- break;
- case DW_OP_const8s:
- printf ("DW_OP_const8s: %ld %ld", (long) byte_get (data, 4),
- (long) byte_get (data + 4, 4));
- data += 8;
- break;
- case DW_OP_constu:
- printf ("DW_OP_constu: %lu", read_leb128 (data, &bytes_read, 0));
- data += bytes_read;
- break;
- case DW_OP_consts:
- printf ("DW_OP_consts: %ld", read_leb128 (data, &bytes_read, 1));
- data += bytes_read;
- break;
- case DW_OP_dup:
- printf ("DW_OP_dup");
- break;
- case DW_OP_drop:
- printf ("DW_OP_drop");
- break;
- case DW_OP_over:
- printf ("DW_OP_over");
- break;
- case DW_OP_pick:
- printf ("DW_OP_pick: %ld", (unsigned long) byte_get (data++, 1));
- break;
- case DW_OP_swap:
- printf ("DW_OP_swap");
- break;
- case DW_OP_rot:
- printf ("DW_OP_rot");
- break;
- case DW_OP_xderef:
- printf ("DW_OP_xderef");
- break;
- case DW_OP_abs:
- printf ("DW_OP_abs");
- break;
- case DW_OP_and:
- printf ("DW_OP_and");
- break;
- case DW_OP_div:
- printf ("DW_OP_div");
- break;
- case DW_OP_minus:
- printf ("DW_OP_minus");
- break;
- case DW_OP_mod:
- printf ("DW_OP_mod");
- break;
- case DW_OP_mul:
- printf ("DW_OP_mul");
- break;
- case DW_OP_neg:
- printf ("DW_OP_neg");
- break;
- case DW_OP_not:
- printf ("DW_OP_not");
- break;
- case DW_OP_or:
- printf ("DW_OP_or");
- break;
- case DW_OP_plus:
- printf ("DW_OP_plus");
- break;
- case DW_OP_plus_uconst:
- printf ("DW_OP_plus_uconst: %lu",
- read_leb128 (data, &bytes_read, 0));
- data += bytes_read;
- break;
- case DW_OP_shl:
- printf ("DW_OP_shl");
- break;
- case DW_OP_shr:
- printf ("DW_OP_shr");
- break;
- case DW_OP_shra:
- printf ("DW_OP_shra");
- break;
- case DW_OP_xor:
- printf ("DW_OP_xor");
- break;
- case DW_OP_bra:
- printf ("DW_OP_bra: %ld", (long) byte_get (data, 2));
- data += 2;
- break;
- case DW_OP_eq:
- printf ("DW_OP_eq");
- break;
- case DW_OP_ge:
- printf ("DW_OP_ge");
- break;
- case DW_OP_gt:
- printf ("DW_OP_gt");
- break;
- case DW_OP_le:
- printf ("DW_OP_le");
- break;
- case DW_OP_lt:
- printf ("DW_OP_lt");
- break;
- case DW_OP_ne:
- printf ("DW_OP_ne");
- break;
- case DW_OP_skip:
- printf ("DW_OP_skip: %ld", (long) byte_get (data, 2));
- data += 2;
- break;
-
- case DW_OP_lit0:
- case DW_OP_lit1:
- case DW_OP_lit2:
- case DW_OP_lit3:
- case DW_OP_lit4:
- case DW_OP_lit5:
- case DW_OP_lit6:
- case DW_OP_lit7:
- case DW_OP_lit8:
- case DW_OP_lit9:
- case DW_OP_lit10:
- case DW_OP_lit11:
- case DW_OP_lit12:
- case DW_OP_lit13:
- case DW_OP_lit14:
- case DW_OP_lit15:
- case DW_OP_lit16:
- case DW_OP_lit17:
- case DW_OP_lit18:
- case DW_OP_lit19:
- case DW_OP_lit20:
- case DW_OP_lit21:
- case DW_OP_lit22:
- case DW_OP_lit23:
- case DW_OP_lit24:
- case DW_OP_lit25:
- case DW_OP_lit26:
- case DW_OP_lit27:
- case DW_OP_lit28:
- case DW_OP_lit29:
- case DW_OP_lit30:
- case DW_OP_lit31:
- printf ("DW_OP_lit%d", op - DW_OP_lit0);
- break;
-
- case DW_OP_reg0:
- case DW_OP_reg1:
- case DW_OP_reg2:
- case DW_OP_reg3:
- case DW_OP_reg4:
- case DW_OP_reg5:
- case DW_OP_reg6:
- case DW_OP_reg7:
- case DW_OP_reg8:
- case DW_OP_reg9:
- case DW_OP_reg10:
- case DW_OP_reg11:
- case DW_OP_reg12:
- case DW_OP_reg13:
- case DW_OP_reg14:
- case DW_OP_reg15:
- case DW_OP_reg16:
- case DW_OP_reg17:
- case DW_OP_reg18:
- case DW_OP_reg19:
- case DW_OP_reg20:
- case DW_OP_reg21:
- case DW_OP_reg22:
- case DW_OP_reg23:
- case DW_OP_reg24:
- case DW_OP_reg25:
- case DW_OP_reg26:
- case DW_OP_reg27:
- case DW_OP_reg28:
- case DW_OP_reg29:
- case DW_OP_reg30:
- case DW_OP_reg31:
- printf ("DW_OP_reg%d", op - DW_OP_reg0);
- break;
-
- case DW_OP_breg0:
- case DW_OP_breg1:
- case DW_OP_breg2:
- case DW_OP_breg3:
- case DW_OP_breg4:
- case DW_OP_breg5:
- case DW_OP_breg6:
- case DW_OP_breg7:
- case DW_OP_breg8:
- case DW_OP_breg9:
- case DW_OP_breg10:
- case DW_OP_breg11:
- case DW_OP_breg12:
- case DW_OP_breg13:
- case DW_OP_breg14:
- case DW_OP_breg15:
- case DW_OP_breg16:
- case DW_OP_breg17:
- case DW_OP_breg18:
- case DW_OP_breg19:
- case DW_OP_breg20:
- case DW_OP_breg21:
- case DW_OP_breg22:
- case DW_OP_breg23:
- case DW_OP_breg24:
- case DW_OP_breg25:
- case DW_OP_breg26:
- case DW_OP_breg27:
- case DW_OP_breg28:
- case DW_OP_breg29:
- case DW_OP_breg30:
- case DW_OP_breg31:
- printf ("DW_OP_breg%d: %ld", op - DW_OP_breg0,
- read_leb128 (data, &bytes_read, 1));
- data += bytes_read;
- break;
-
- case DW_OP_regx:
- printf ("DW_OP_regx: %lu", read_leb128 (data, &bytes_read, 0));
- data += bytes_read;
- break;
- case DW_OP_fbreg:
- printf ("DW_OP_fbreg: %ld", read_leb128 (data, &bytes_read, 1));
- data += bytes_read;
- break;
- case DW_OP_bregx:
- uvalue = read_leb128 (data, &bytes_read, 0);
- data += bytes_read;
- printf ("DW_OP_bregx: %lu %ld", uvalue,
- read_leb128 (data, &bytes_read, 1));
- data += bytes_read;
- break;
- case DW_OP_piece:
- printf ("DW_OP_piece: %lu", read_leb128 (data, &bytes_read, 0));
- data += bytes_read;
- break;
- case DW_OP_deref_size:
- printf ("DW_OP_deref_size: %ld", (long) byte_get (data++, 1));
- break;
- case DW_OP_xderef_size:
- printf ("DW_OP_xderef_size: %ld", (long) byte_get (data++, 1));
- break;
- case DW_OP_nop:
- printf ("DW_OP_nop");
- break;
-
- /* DWARF 3 extensions. */
- case DW_OP_push_object_address:
- printf ("DW_OP_push_object_address");
- break;
- case DW_OP_call2:
- printf ("DW_OP_call2: <%lx>", (long) byte_get (data, 2));
- data += 2;
- break;
- case DW_OP_call4:
- printf ("DW_OP_call4: <%lx>", (long) byte_get (data, 4));
- data += 4;
- break;
- case DW_OP_call_ref:
- printf ("DW_OP_call_ref");
- break;
-
- /* GNU extensions. */
- case DW_OP_GNU_push_tls_address:
- printf ("DW_OP_GNU_push_tls_address");
- break;
+ unsigned int i;
+ int any;
- default:
- if (op >= DW_OP_lo_user
- && op <= DW_OP_hi_user)
- printf (_("(User defined location op)"));
- else
- printf (_("(Unknown location op)"));
- /* No way to tell where the next op is, so just bail. */
- return;
- }
+ for (i = 0, any = 0; i < elf_header.e_shnum; i++)
+ if (streq (SECTION_NAME (section_headers + i), cur->name))
+ {
+ request_dump (i, cur->type);
+ any = 1;
+ }
- /* Separate the ops. */
- if (data < end)
- printf ("; ");
+ if (!any)
+ warn (_("Section '%s' was not dumped because it does not exist!\n"),
+ cur->name);
}
}
-static const char *debug_loc_contents;
-static bfd_vma debug_loc_size;
-
static void
-load_debug_loc (FILE *file)
+process_section_contents (FILE *file)
{
- Elf_Internal_Shdr *sec;
-
- /* If it is already loaded, do nothing. */
- if (debug_loc_contents != NULL)
- return;
-
- /* Locate the .debug_loc section. */
- sec = find_section (".debug_loc");
- if (sec == NULL)
- return;
-
- debug_loc_size = sec->sh_size;
-
- debug_loc_contents = get_data (NULL, file, sec->sh_offset, sec->sh_size,
- _("debug_loc section data"));
-}
+ Elf_Internal_Shdr *section;
+ unsigned int i;
-static void
-free_debug_loc (void)
-{
- if (debug_loc_contents == NULL)
+ if (! do_dump)
return;
- free ((char *) debug_loc_contents);
- debug_loc_contents = NULL;
- debug_loc_size = 0;
-}
-
-
-static int
-display_debug_loc (Elf_Internal_Shdr *section,
- unsigned char *start, FILE *file)
-{
- unsigned char *section_end;
- unsigned long bytes;
- unsigned char *section_begin = start;
- bfd_vma addr;
- unsigned int comp_unit = 0;
-
- addr = section->sh_addr;
- bytes = section->sh_size;
- section_end = start + bytes;
-
- if (bytes == 0)
- {
- printf (_("\nThe .debug_loc section is empty.\n"));
- return 0;
- }
-
- if (num_debug_line_pointer_sizes == 0)
- get_debug_line_pointer_sizes (file);
-
- printf (_("Contents of the .debug_loc section:\n\n"));
- printf (_("\n Offset Begin End Expression\n"));
+ initialise_dumps_byname ();
- while (start < section_end)
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum && i < num_dump_sects;
+ i++, section++)
{
- unsigned long begin;
- unsigned long end;
- unsigned short length;
- unsigned long offset;
- unsigned int pointer_size;
-
- offset = start - section_begin;
-
- /* Get the pointer size from the comp unit associated
- with this block of location information. */
- if (comp_unit >= num_debug_line_pointer_sizes)
- {
- error (_("Not enough comp units for .debug_loc section\n"));
- return 0;
- }
- else
- {
- pointer_size = debug_line_pointer_sizes [comp_unit];
- comp_unit ++;
- }
-
- while (1)
- {
- begin = byte_get (start, pointer_size);
- start += pointer_size;
- end = byte_get (start, pointer_size);
- start += pointer_size;
-
- if (begin == 0 && end == 0)
- break;
-
- /* For now, skip any base address specifiers. */
- if (begin == 0xffffffff)
- continue;
-
- begin += addr;
- end += addr;
-
- length = byte_get (start, 2);
- start += 2;
-
- printf (" %8.8lx %8.8lx %8.8lx (", offset, begin, end);
- decode_location_expression (start, pointer_size, length);
- printf (")\n");
+#ifdef SUPPORT_DISASSEMBLY
+ if (dump_sects[i] & DISASS_DUMP)
+ disassemble_section (section, file);
+#endif
+ if (dump_sects[i] & HEX_DUMP)
+ dump_section (section, file);
- start += length;
- }
- printf ("\n");
+ if (dump_sects[i] & DEBUG_DUMP)
+ display_debug_section (section, file);
}
- return 1;
-}
-
-static const char *debug_str_contents;
-static bfd_vma debug_str_size;
-static void
-load_debug_str (FILE *file)
-{
- Elf_Internal_Shdr *sec;
-
- /* If it is already loaded, do nothing. */
- if (debug_str_contents != NULL)
- return;
-
- /* Locate the .debug_str section. */
- sec = find_section (".debug_str");
- if (sec == NULL)
- return;
-
- debug_str_size = sec->sh_size;
-
- debug_str_contents = get_data (NULL, file, sec->sh_offset, sec->sh_size,
- _("debug_str section data"));
+ /* Check to see if the user requested a
+ dump of a section that does not exist. */
+ while (i++ < num_dump_sects)
+ if (dump_sects[i])
+ warn (_("Section %d was not dumped because it does not exist!\n"), i);
}
static void
-free_debug_str (void)
+process_mips_fpe_exception (int mask)
{
- if (debug_str_contents == NULL)
- return;
-
- free ((char *) debug_str_contents);
- debug_str_contents = NULL;
- debug_str_size = 0;
+ if (mask)
+ {
+ int first = 1;
+ if (mask & OEX_FPU_INEX)
+ fputs ("INEX", stdout), first = 0;
+ if (mask & OEX_FPU_UFLO)
+ printf ("%sUFLO", first ? "" : "|"), first = 0;
+ if (mask & OEX_FPU_OFLO)
+ printf ("%sOFLO", first ? "" : "|"), first = 0;
+ if (mask & OEX_FPU_DIV0)
+ printf ("%sDIV0", first ? "" : "|"), first = 0;
+ if (mask & OEX_FPU_INVAL)
+ printf ("%sINVAL", first ? "" : "|");
+ }
+ else
+ fputs ("0", stdout);
}
-static const char *
-fetch_indirect_string (unsigned long offset)
+/* ARM EABI attributes section. */
+typedef struct
{
- if (debug_str_contents == NULL)
- return _("<no .debug_str section>");
-
- if (offset > debug_str_size)
- return _("<offset is too big>");
-
- return debug_str_contents + offset;
-}
+ int tag;
+ const char *name;
+ /* 0 = special, 1 = string, 2 = uleb123, > 0x80 == table lookup. */
+ int type;
+ const char **table;
+} arm_attr_public_tag;
+
+static const char *arm_attr_tag_CPU_arch[] =
+ {"Pre-v4", "v4", "v4T", "v5T", "v5TE", "v5TEJ", "v6", "v6KZ", "v6T2",
+ "v6K", "v7"};
+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"};
+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[] =
+ {"None", "Bare platform", "Linux application", "Linux DSO", "PalmOS 2004",
+ "PalmOS (reserved)", "SymbianOS 2004", "SymbianOS (reserved)"};
+static const char *arm_attr_tag_ABI_PCS_R9_use[] =
+ {"V6", "SB", "TLS", "Unused"};
+static const char *arm_attr_tag_ABI_PCS_RW_data[] =
+ {"Absolute", "PC-relative", "SB-relative", "None"};
+static const char *arm_attr_tag_ABI_PCS_RO_DATA[] =
+ {"Absolute", "PC-relative", "None"};
+static const char *arm_attr_tag_ABI_PCS_GOT_use[] =
+ {"None", "direct", "GOT-indirect"};
+static const char *arm_attr_tag_ABI_PCS_wchar_t[] =
+ {"None", "??? 1", "2", "??? 3", "4"};
+static const char *arm_attr_tag_ABI_FP_rounding[] = {"Unused", "Needed"};
+static const char *arm_attr_tag_ABI_FP_denormal[] = {"Unused", "Needed"};
+static const char *arm_attr_tag_ABI_FP_exceptions[] = {"Unused", "Needed"};
+static const char *arm_attr_tag_ABI_FP_user_exceptions[] = {"Unused", "Needed"};
+static const char *arm_attr_tag_ABI_FP_number_model[] =
+ {"Unused", "Finite", "RTABI", "IEEE 754"};
+static const char *arm_attr_tag_ABI_align8_needed[] = {"No", "Yes", "4-byte"};
+static const char *arm_attr_tag_ABI_align8_preserved[] =
+ {"No", "Yes, except leaf SP", "Yes"};
+static const char *arm_attr_tag_ABI_enum_size[] =
+ {"Unused", "small", "int", "forced to int"};
+static const char *arm_attr_tag_ABI_HardFP_use[] =
+ {"As Tag_VFP_arch", "SP only", "DP only", "SP and DP"};
+static const char *arm_attr_tag_ABI_VFP_args[] =
+ {"AAPCS", "VFP registers", "custom"};
+static const char *arm_attr_tag_ABI_WMMX_args[] =
+ {"AAPCS", "WMMX registers", "custom"};
+static const char *arm_attr_tag_ABI_optimization_goals[] =
+ {"None", "Prefer Speed", "Aggressive Speed", "Prefer Size",
+ "Aggressive Size", "Prefer Debug", "Aggressive Debug"};
+static const char *arm_attr_tag_ABI_FP_optimization_goals[] =
+ {"None", "Prefer Speed", "Aggressive Speed", "Prefer Size",
+ "Aggressive Size", "Prefer Accuracy", "Aggressive Accuracy"};
+
+#define LOOKUP(id, name) \
+ {id, #name, 0x80 | ARRAY_SIZE(arm_attr_tag_##name), arm_attr_tag_##name}
+static arm_attr_public_tag arm_attr_public_tags[] =
+{
+ {4, "CPU_raw_name", 1, NULL},
+ {5, "CPU_name", 1, NULL},
+ LOOKUP(6, CPU_arch),
+ {7, "CPU_arch_profile", 0, NULL},
+ LOOKUP(8, ARM_ISA_use),
+ LOOKUP(9, THUMB_ISA_use),
+ LOOKUP(10, VFP_arch),
+ LOOKUP(11, WMMX_arch),
+ LOOKUP(12, NEON_arch),
+ LOOKUP(13, ABI_PCS_config),
+ LOOKUP(14, ABI_PCS_R9_use),
+ LOOKUP(15, ABI_PCS_RW_data),
+ LOOKUP(16, ABI_PCS_RO_DATA),
+ LOOKUP(17, ABI_PCS_GOT_use),
+ LOOKUP(18, ABI_PCS_wchar_t),
+ LOOKUP(19, ABI_FP_rounding),
+ LOOKUP(20, ABI_FP_denormal),
+ LOOKUP(21, ABI_FP_exceptions),
+ LOOKUP(22, ABI_FP_user_exceptions),
+ LOOKUP(23, ABI_FP_number_model),
+ LOOKUP(24, ABI_align8_needed),
+ LOOKUP(25, ABI_align8_preserved),
+ LOOKUP(26, ABI_enum_size),
+ LOOKUP(27, ABI_HardFP_use),
+ LOOKUP(28, ABI_VFP_args),
+ LOOKUP(29, ABI_WMMX_args),
+ LOOKUP(30, ABI_optimization_goals),
+ LOOKUP(31, ABI_FP_optimization_goals),
+ {32, "compatibility", 0, NULL}
+};
+#undef LOOKUP
-static int
-display_debug_str (Elf_Internal_Shdr *section,
- unsigned char *start,
- FILE *file ATTRIBUTE_UNUSED)
+/* Read an unsigned LEB128 encoded value from p. Set *PLEN to the number of
+ bytes read. */
+static unsigned int
+read_uleb128 (unsigned char *p, unsigned int *plen)
{
- unsigned long bytes;
- bfd_vma addr;
-
- addr = section->sh_addr;
- bytes = section->sh_size;
+ unsigned char c;
+ unsigned int val;
+ int shift;
+ int len;
- if (bytes == 0)
- {
- printf (_("\nThe .debug_str section is empty.\n"));
- return 0;
- }
-
- printf (_("Contents of the .debug_str section:\n\n"));
-
- while (bytes)
+ val = 0;
+ shift = 0;
+ len = 0;
+ do
{
- int j;
- int k;
- int lbytes;
-
- lbytes = (bytes > 16 ? 16 : bytes);
-
- printf (" 0x%8.8lx ", (unsigned long) addr);
-
- for (j = 0; j < 16; j++)
- {
- if (j < lbytes)
- printf ("%2.2x", start[j]);
- else
- printf (" ");
-
- if ((j & 3) == 3)
- printf (" ");
- }
-
- for (j = 0; j < lbytes; j++)
- {
- k = start[j];
- if (k >= ' ' && k < 0x80)
- printf ("%c", k);
- else
- printf (".");
- }
-
- putchar ('\n');
-
- start += lbytes;
- addr += lbytes;
- bytes -= lbytes;
+ c = *(p++);
+ len++;
+ val |= ((unsigned int)c & 0x7f) << shift;
+ shift += 7;
}
+ while (c & 0x80);
- return 1;
+ *plen = len;
+ return val;
}
static unsigned char *
-read_and_display_attr_value (unsigned long attribute,
- unsigned long form,
- unsigned char *data,
- unsigned long cu_offset,
- unsigned long pointer_size,
- unsigned long offset_size,
- int dwarf_version)
+display_arm_attribute (unsigned char *p)
{
- unsigned long uvalue = 0;
- unsigned char *block_start = NULL;
- int bytes_read;
-
- switch (form)
- {
- default:
- break;
-
- case DW_FORM_ref_addr:
- if (dwarf_version == 2)
- {
- uvalue = byte_get (data, pointer_size);
- data += pointer_size;
- }
- else if (dwarf_version == 3)
- {
- uvalue = byte_get (data, offset_size);
- data += offset_size;
- }
- else
- {
- error (_("Internal error: DWARF version is not 2 or 3.\n"));
- }
- break;
-
- case DW_FORM_addr:
- uvalue = byte_get (data, pointer_size);
- data += pointer_size;
- break;
-
- case DW_FORM_strp:
- uvalue = byte_get (data, offset_size);
- data += offset_size;
- break;
-
- case DW_FORM_ref1:
- case DW_FORM_flag:
- case DW_FORM_data1:
- uvalue = byte_get (data++, 1);
- break;
-
- case DW_FORM_ref2:
- case DW_FORM_data2:
- uvalue = byte_get (data, 2);
- data += 2;
- break;
-
- case DW_FORM_ref4:
- case DW_FORM_data4:
- uvalue = byte_get (data, 4);
- data += 4;
- break;
-
- case DW_FORM_sdata:
- uvalue = read_leb128 (data, & bytes_read, 1);
- data += bytes_read;
- break;
-
- case DW_FORM_ref_udata:
- case DW_FORM_udata:
- uvalue = read_leb128 (data, & bytes_read, 0);
- data += bytes_read;
- break;
-
- case DW_FORM_indirect:
- form = read_leb128 (data, & bytes_read, 0);
- data += bytes_read;
- printf (" %s", get_FORM_name (form));
- return read_and_display_attr_value (attribute, form, data, cu_offset,
- pointer_size, offset_size,
- dwarf_version);
- }
-
- switch (form)
- {
- case DW_FORM_ref_addr:
- printf (" <#%lx>", uvalue);
- break;
-
- case DW_FORM_ref1:
- case DW_FORM_ref2:
- case DW_FORM_ref4:
- case DW_FORM_ref_udata:
- printf (" <%lx>", uvalue + cu_offset);
- break;
-
- case DW_FORM_addr:
- printf (" %#lx", uvalue);
- break;
-
- case DW_FORM_flag:
- case DW_FORM_data1:
- case DW_FORM_data2:
- case DW_FORM_data4:
- case DW_FORM_sdata:
- case DW_FORM_udata:
- printf (" %ld", uvalue);
- break;
-
- case DW_FORM_ref8:
- case DW_FORM_data8:
- uvalue = byte_get (data, 4);
- printf (" %lx", uvalue);
- printf (" %lx", (unsigned long) byte_get (data + 4, 4));
- data += 8;
- break;
-
- case DW_FORM_string:
- printf (" %s", data);
- data += strlen ((char *) data) + 1;
- break;
-
- case DW_FORM_block:
- uvalue = read_leb128 (data, & bytes_read, 0);
- block_start = data + bytes_read;
- data = display_block (block_start, uvalue);
- break;
-
- case DW_FORM_block1:
- uvalue = byte_get (data, 1);
- block_start = data + 1;
- data = display_block (block_start, uvalue);
- break;
-
- case DW_FORM_block2:
- uvalue = byte_get (data, 2);
- block_start = data + 2;
- data = display_block (block_start, uvalue);
- break;
-
- case DW_FORM_block4:
- uvalue = byte_get (data, 4);
- block_start = data + 4;
- data = display_block (block_start, uvalue);
- break;
-
- case DW_FORM_strp:
- printf (_(" (indirect string, offset: 0x%lx): %s"),
- uvalue, fetch_indirect_string (uvalue));
- break;
-
- case DW_FORM_indirect:
- /* Handled above. */
- break;
-
- default:
- warn (_("Unrecognized form: %d\n"), form);
- break;
- }
-
- /* For some attributes we can display further information. */
-
- printf ("\t");
+ int tag;
+ unsigned int len;
+ int val;
+ arm_attr_public_tag *attr;
+ unsigned i;
+ int type;
- switch (attribute)
+ tag = read_uleb128 (p, &len);
+ p += len;
+ attr = NULL;
+ for (i = 0; i < ARRAY_SIZE(arm_attr_public_tags); i++)
{
- case DW_AT_inline:
- switch (uvalue)
+ if (arm_attr_public_tags[i].tag == tag)
{
- case DW_INL_not_inlined:
- printf (_("(not inlined)"));
- break;
- case DW_INL_inlined:
- printf (_("(inlined)"));
- break;
- case DW_INL_declared_not_inlined:
- printf (_("(declared as inline but ignored)"));
- break;
- case DW_INL_declared_inlined:
- printf (_("(declared as inline and inlined)"));
+ attr = &arm_attr_public_tags[i];
break;
- default:
- printf (_(" (Unknown inline attribute value: %lx)"), uvalue);
- break;
- }
- break;
-
- case DW_AT_language:
- switch (uvalue)
- {
- case DW_LANG_C: printf ("(non-ANSI C)"); break;
- case DW_LANG_C89: printf ("(ANSI C)"); break;
- case DW_LANG_C_plus_plus: printf ("(C++)"); break;
- case DW_LANG_Fortran77: printf ("(FORTRAN 77)"); break;
- case DW_LANG_Fortran90: printf ("(Fortran 90)"); break;
- case DW_LANG_Modula2: printf ("(Modula 2)"); break;
- case DW_LANG_Pascal83: printf ("(ANSI Pascal)"); break;
- case DW_LANG_Ada83: printf ("(Ada)"); break;
- case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
- case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
- /* DWARF 2.1 values. */
- case DW_LANG_C99: printf ("(ANSI C99)"); break;
- case DW_LANG_Ada95: printf ("(ADA 95)"); break;
- case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
- /* MIPS extension. */
- case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
- /* UPC extension. */
- case DW_LANG_Upc: printf ("(Unified Parallel C)"); break;
- default:
- printf ("(Unknown: %lx)", uvalue);
- break;
- }
- break;
-
- case DW_AT_encoding:
- switch (uvalue)
- {
- case DW_ATE_void: printf ("(void)"); break;
- case DW_ATE_address: printf ("(machine address)"); break;
- case DW_ATE_boolean: printf ("(boolean)"); break;
- case DW_ATE_complex_float: printf ("(complex float)"); break;
- case DW_ATE_float: printf ("(float)"); break;
- case DW_ATE_signed: printf ("(signed)"); break;
- case DW_ATE_signed_char: printf ("(signed char)"); break;
- case DW_ATE_unsigned: printf ("(unsigned)"); break;
- case DW_ATE_unsigned_char: printf ("(unsigned char)"); break;
- /* DWARF 2.1 value. */
- case DW_ATE_imaginary_float: printf ("(imaginary float)"); break;
- default:
- if (uvalue >= DW_ATE_lo_user
- && uvalue <= DW_ATE_hi_user)
- printf ("(user defined type)");
- else
- printf ("(unknown type)");
- break;
- }
- break;
-
- case DW_AT_accessibility:
- switch (uvalue)
- {
- case DW_ACCESS_public: printf ("(public)"); break;
- case DW_ACCESS_protected: printf ("(protected)"); break;
- case DW_ACCESS_private: printf ("(private)"); break;
- default:
- printf ("(unknown accessibility)");
- break;
- }
- break;
-
- case DW_AT_visibility:
- switch (uvalue)
- {
- case DW_VIS_local: printf ("(local)"); break;
- case DW_VIS_exported: printf ("(exported)"); break;
- case DW_VIS_qualified: printf ("(qualified)"); break;
- default: printf ("(unknown visibility)"); break;
- }
- break;
-
- case DW_AT_virtuality:
- switch (uvalue)
- {
- case DW_VIRTUALITY_none: printf ("(none)"); break;
- case DW_VIRTUALITY_virtual: printf ("(virtual)"); break;
- case DW_VIRTUALITY_pure_virtual:printf ("(pure_virtual)"); break;
- default: printf ("(unknown virtuality)"); break;
- }
- break;
-
- case DW_AT_identifier_case:
- switch (uvalue)
- {
- case DW_ID_case_sensitive: printf ("(case_sensitive)"); break;
- case DW_ID_up_case: printf ("(up_case)"); break;
- case DW_ID_down_case: printf ("(down_case)"); break;
- case DW_ID_case_insensitive: printf ("(case_insensitive)"); break;
- default: printf ("(unknown case)"); break;
- }
- break;
-
- case DW_AT_calling_convention:
- switch (uvalue)
- {
- case DW_CC_normal: printf ("(normal)"); break;
- case DW_CC_program: printf ("(program)"); break;
- case DW_CC_nocall: printf ("(nocall)"); break;
- default:
- if (uvalue >= DW_CC_lo_user
- && uvalue <= DW_CC_hi_user)
- printf ("(user defined)");
- else
- printf ("(unknown convention)");
- }
- break;
-
- case DW_AT_ordering:
- switch (uvalue)
- {
- case -1: printf ("(undefined)"); break;
- case 0: printf ("(row major)"); break;
- case 1: printf ("(column major)"); break;
- }
- break;
-
- case DW_AT_frame_base:
- case DW_AT_location:
- case DW_AT_data_member_location:
- case DW_AT_vtable_elem_location:
- case DW_AT_allocated:
- case DW_AT_associated:
- case DW_AT_data_location:
- case DW_AT_stride:
- case DW_AT_upper_bound:
- case DW_AT_lower_bound:
- if (block_start)
- {
- printf ("(");
- decode_location_expression (block_start, pointer_size, uvalue);
- printf (")");
}
- else if (form == DW_FORM_data4 || form == DW_FORM_data8)
- {
- printf ("(");
- printf ("location list");
- printf (")");
- }
- break;
-
- default:
- break;
}
- return data;
-}
-
-static unsigned char *
-read_and_display_attr (unsigned long attribute,
- unsigned long form,
- unsigned char *data,
- unsigned long cu_offset,
- unsigned long pointer_size,
- unsigned long offset_size,
- int dwarf_version)
-{
- printf (" %-18s:", get_AT_name (attribute));
- data = read_and_display_attr_value (attribute, form, data, cu_offset,
- pointer_size, offset_size, dwarf_version);
- printf ("\n");
- return data;
-}
-
-static int
-display_debug_info (Elf_Internal_Shdr *section,
- unsigned char *start,
- FILE *file)
-{
- unsigned char *end = start + section->sh_size;
- unsigned char *section_begin = start;
-
- printf (_("The section %s contains:\n\n"), SECTION_NAME (section));
-
- load_debug_str (file);
- load_debug_loc (file);
-
- while (start < end)
+ if (attr)
{
- DWARF2_Internal_CompUnit compunit;
- Elf_Internal_Shdr *relsec;
- unsigned char *hdrptr;
- unsigned char *cu_abbrev_offset_ptr;
- unsigned char *tags;
- int level;
- unsigned long cu_offset;
- int offset_size;
- int initial_length_size;
-
- hdrptr = start;
-
- compunit.cu_length = byte_get (hdrptr, 4);
- hdrptr += 4;
-
- if (compunit.cu_length == 0xffffffff)
- {
- compunit.cu_length = byte_get (hdrptr, 8);
- hdrptr += 8;
- offset_size = 8;
- initial_length_size = 12;
- }
- else
+ printf (" Tag_%s: ", attr->name);
+ switch (attr->type)
{
- offset_size = 4;
- initial_length_size = 4;
- }
-
- compunit.cu_version = byte_get (hdrptr, 2);
- hdrptr += 2;
-
- /* Apply addends of RELA relocations. */
- for (relsec = section_headers;
- relsec < section_headers + elf_header.e_shnum;
- ++relsec)
- {
- unsigned long nrelas;
- Elf_Internal_Rela *rela, *rp;
- Elf_Internal_Shdr *symsec;
- Elf_Internal_Sym *symtab;
- Elf_Internal_Sym *sym;
-
- if (relsec->sh_type != SHT_RELA
- || SECTION_HEADER (relsec->sh_info) != section
- || relsec->sh_size == 0)
- continue;
-
- if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size,
- & rela, & nrelas))
- return 0;
-
- symsec = SECTION_HEADER (relsec->sh_link);
- symtab = GET_ELF_SYMBOLS (file, symsec);
-
- for (rp = rela; rp < rela + nrelas; ++rp)
+ case 0:
+ switch (tag)
{
- unsigned char *loc;
-
- if (rp->r_offset >= (bfd_vma) (hdrptr - section_begin)
- && section->sh_size > (bfd_vma) offset_size
- && rp->r_offset <= section->sh_size - offset_size)
- loc = section_begin + rp->r_offset;
- else
- continue;
-
- if (is_32bit_elf)
+ case 7: /* Tag_CPU_arch_profile. */
+ val = read_uleb128 (p, &len);
+ p += len;
+ switch (val)
{
- sym = symtab + ELF32_R_SYM (rp->r_info);
-
- if (ELF32_R_SYM (rp->r_info) != 0
- && ELF32_ST_TYPE (sym->st_info) != STT_SECTION)
- {
- warn (_("Skipping unexpected symbol type %u\n"),
- ELF32_ST_TYPE (sym->st_info));
- continue;
- }
+ case 0: printf ("None\n"); break;
+ case 'A': printf ("Application\n"); break;
+ case 'R': printf ("Realtime\n"); break;
+ case 'M': printf ("Microcontroller\n"); break;
+ default: printf ("??? (%d)\n", val); break;
}
- else
- {
- sym = symtab + ELF64_R_SYM (rp->r_info);
+ break;
- if (ELF64_R_SYM (rp->r_info) != 0
- && ELF64_ST_TYPE (sym->st_info) != STT_SECTION)
- {
- warn (_("Skipping unexpected symbol type %u\n"),
- ELF64_ST_TYPE (sym->st_info));
- continue;
- }
- }
+ case 32: /* Tag_compatibility. */
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf ("flag = %d, vendor = %s\n", val, p);
+ p += strlen((char *)p) + 1;
+ break;
- byte_put (loc, rp->r_addend, offset_size);
+ default:
+ abort();
}
+ return p;
- free (rela);
+ case 1:
+ case 2:
+ type = attr->type;
break;
- }
-
- cu_abbrev_offset_ptr = hdrptr;
- compunit.cu_abbrev_offset = byte_get (hdrptr, offset_size);
- hdrptr += offset_size;
-
- compunit.cu_pointer_size = byte_get (hdrptr, 1);
- hdrptr += 1;
-
- tags = hdrptr;
- cu_offset = start - section_begin;
- start += compunit.cu_length + initial_length_size;
-
- printf (_(" Compilation Unit @ %lx:\n"), cu_offset);
- printf (_(" Length: %ld\n"), compunit.cu_length);
- printf (_(" Version: %d\n"), compunit.cu_version);
- printf (_(" Abbrev Offset: %ld\n"), compunit.cu_abbrev_offset);
- printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size);
- if (compunit.cu_version != 2 && compunit.cu_version != 3)
- {
- warn (_("Only version 2 and 3 DWARF debug information is currently supported.\n"));
- continue;
- }
-
- free_abbrevs ();
-
- /* Read in the abbrevs used by this compilation unit. */
- {
- Elf_Internal_Shdr *sec;
- unsigned char *begin;
-
- /* Locate the .debug_abbrev section and process it. */
- sec = find_section (".debug_abbrev");
- if (sec == NULL)
- {
- warn (_("Unable to locate .debug_abbrev section!\n"));
- return 0;
- }
-
- begin = get_data (NULL, file, sec->sh_offset, sec->sh_size,
- _("debug_abbrev section data"));
- if (!begin)
- return 0;
-
- process_abbrev_section (begin + compunit.cu_abbrev_offset,
- begin + sec->sh_size);
-
- free (begin);
- }
-
- level = 0;
- while (tags < start)
- {
- int bytes_read;
- unsigned long abbrev_number;
- abbrev_entry *entry;
- abbrev_attr *attr;
-
- abbrev_number = read_leb128 (tags, & bytes_read, 0);
- tags += bytes_read;
-
- /* A null DIE marks the end of a list of children. */
- if (abbrev_number == 0)
- {
- --level;
- continue;
- }
-
- /* Scan through the abbreviation list until we reach the
- correct entry. */
- for (entry = first_abbrev;
- entry && entry->entry != abbrev_number;
- entry = entry->next)
- continue;
-
- if (entry == NULL)
- {
- warn (_("Unable to locate entry %lu in the abbreviation table\n"),
- abbrev_number);
- return 0;
- }
-
- printf (_(" <%d><%lx>: Abbrev Number: %lu (%s)\n"),
- level,
- (unsigned long) (tags - section_begin - bytes_read),
- abbrev_number,
- get_TAG_name (entry->tag));
-
- for (attr = entry->first_attr; attr; attr = attr->next)
- tags = read_and_display_attr (attr->attribute,
- attr->form,
- tags, cu_offset,
- compunit.cu_pointer_size,
- offset_size,
- compunit.cu_version);
-
- if (entry->children)
- ++level;
+ default:
+ assert (attr->type & 0x80);
+ val = read_uleb128 (p, &len);
+ p += len;
+ type = attr->type & 0x7f;
+ if (val >= type)
+ printf ("??? (%d)\n", val);
+ else
+ printf ("%s\n", attr->table[val]);
+ return p;
}
}
-
- free_debug_str ();
- free_debug_loc ();
-
- printf ("\n");
-
- return 1;
-}
-
-static int
-display_debug_aranges (Elf_Internal_Shdr *section,
- unsigned char *start,
- FILE *file ATTRIBUTE_UNUSED)
-{
- unsigned char *end = start + section->sh_size;
-
- printf (_("The section %s contains:\n\n"), SECTION_NAME (section));
-
- while (start < end)
+ else
{
- unsigned char *hdrptr;
- DWARF2_Internal_ARange arange;
- unsigned char *ranges;
- unsigned long length;
- unsigned long address;
- int excess;
- int offset_size;
- int initial_length_size;
-
- hdrptr = start;
-
- arange.ar_length = byte_get (hdrptr, 4);
- hdrptr += 4;
-
- if (arange.ar_length == 0xffffffff)
- {
- arange.ar_length = byte_get (hdrptr, 8);
- hdrptr += 8;
- offset_size = 8;
- initial_length_size = 12;
- }
+ if (tag & 1)
+ type = 1; /* String. */
else
- {
- offset_size = 4;
- initial_length_size = 4;
- }
-
- arange.ar_version = byte_get (hdrptr, 2);
- hdrptr += 2;
-
- arange.ar_info_offset = byte_get (hdrptr, offset_size);
- hdrptr += offset_size;
-
- arange.ar_pointer_size = byte_get (hdrptr, 1);
- hdrptr += 1;
-
- arange.ar_segment_size = byte_get (hdrptr, 1);
- hdrptr += 1;
-
- if (arange.ar_version != 2 && arange.ar_version != 3)
- {
- warn (_("Only DWARF 2 and 3 aranges are currently supported.\n"));
- break;
- }
-
- printf (_(" Length: %ld\n"), arange.ar_length);
- printf (_(" Version: %d\n"), arange.ar_version);
- printf (_(" Offset into .debug_info: %lx\n"), arange.ar_info_offset);
- printf (_(" Pointer Size: %d\n"), arange.ar_pointer_size);
- printf (_(" Segment Size: %d\n"), arange.ar_segment_size);
-
- printf (_("\n Address Length\n"));
-
- ranges = hdrptr;
-
- /* Must pad to an alignment boundary that is twice the pointer size. */
- excess = (hdrptr - start) % (2 * arange.ar_pointer_size);
- if (excess)
- ranges += (2 * arange.ar_pointer_size) - excess;
-
- for (;;)
- {
- address = byte_get (ranges, arange.ar_pointer_size);
-
- ranges += arange.ar_pointer_size;
-
- length = byte_get (ranges, arange.ar_pointer_size);
-
- ranges += arange.ar_pointer_size;
-
- /* A pair of zeros marks the end of the list. */
- if (address == 0 && length == 0)
- break;
-
- printf (" %8.8lx %lu\n", address, length);
- }
-
- start += arange.ar_length + initial_length_size;
- }
-
- printf ("\n");
-
- return 1;
-}
-
-typedef struct Frame_Chunk
-{
- struct Frame_Chunk *next;
- unsigned char *chunk_start;
- int ncols;
- /* DW_CFA_{undefined,same_value,offset,register,unreferenced} */
- short int *col_type;
- int *col_offset;
- char *augmentation;
- unsigned int code_factor;
- int data_factor;
- unsigned long pc_begin;
- unsigned long pc_range;
- int cfa_reg;
- int cfa_offset;
- int ra;
- unsigned char fde_encoding;
- unsigned char cfa_exp;
-}
-Frame_Chunk;
-
-/* A marker for a col_type that means this column was never referenced
- in the frame info. */
-#define DW_CFA_unreferenced (-1)
-
-static void
-frame_need_space (Frame_Chunk *fc, int reg)
-{
- int prev = fc->ncols;
-
- if (reg < fc->ncols)
- return;
-
- fc->ncols = reg + 1;
- fc->col_type = xrealloc (fc->col_type, fc->ncols * sizeof (short int));
- fc->col_offset = xrealloc (fc->col_offset, fc->ncols * sizeof (int));
-
- while (prev < fc->ncols)
- {
- fc->col_type[prev] = DW_CFA_unreferenced;
- fc->col_offset[prev] = 0;
- prev++;
+ type = 2; /* uleb128. */
+ printf (" Tag_unknown_%d: ", tag);
}
-}
-static void
-frame_display_row (Frame_Chunk *fc, int *need_col_headers, int *max_regs)
-{
- int r;
- char tmp[100];
-
- if (*max_regs < fc->ncols)
- *max_regs = fc->ncols;
-
- if (*need_col_headers)
+ if (type == 1)
{
- *need_col_headers = 0;
-
- printf (" LOC CFA ");
-
- for (r = 0; r < *max_regs; r++)
- if (fc->col_type[r] != DW_CFA_unreferenced)
- {
- if (r == fc->ra)
- printf ("ra ");
- else
- printf ("r%-4d", r);
- }
-
- printf ("\n");
+ printf ("\"%s\"\n", p);
+ p += strlen((char *)p) + 1;
}
-
- printf ("%08lx ", fc->pc_begin);
- if (fc->cfa_exp)
- strcpy (tmp, "exp");
else
- sprintf (tmp, "r%d%+d", fc->cfa_reg, fc->cfa_offset);
- printf ("%-8s ", tmp);
-
- for (r = 0; r < fc->ncols; r++)
{
- if (fc->col_type[r] != DW_CFA_unreferenced)
- {
- switch (fc->col_type[r])
- {
- case DW_CFA_undefined:
- strcpy (tmp, "u");
- break;
- case DW_CFA_same_value:
- strcpy (tmp, "s");
- break;
- case DW_CFA_offset:
- sprintf (tmp, "c%+d", fc->col_offset[r]);
- break;
- case DW_CFA_register:
- sprintf (tmp, "r%d", fc->col_offset[r]);
- break;
- case DW_CFA_expression:
- strcpy (tmp, "exp");
- break;
- default:
- strcpy (tmp, "n/a");
- break;
- }
- printf ("%-5s", tmp);
- }
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf ("%d (0x%x)\n", val, val);
}
- printf ("\n");
-}
-static int
-size_of_encoded_value (int encoding)
-{
- switch (encoding & 0x7)
- {
- default: /* ??? */
- case 0: return is_32bit_elf ? 4 : 8;
- case 2: return 2;
- case 3: return 4;
- case 4: return 8;
- }
+ return p;
}
-static bfd_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
- return byte_get (data, size);
-}
-
-#define GET(N) byte_get (start, N); start += N
-#define LEB() read_leb128 (start, & length_return, 0); start += length_return
-#define SLEB() read_leb128 (start, & length_return, 1); start += length_return
-
static int
-display_debug_frames (Elf_Internal_Shdr *section,
- unsigned char *start,
- FILE *file ATTRIBUTE_UNUSED)
+process_arm_specific (FILE *file)
{
- unsigned char *end = start + section->sh_size;
- unsigned char *section_start = start;
- Frame_Chunk *chunks = 0;
- Frame_Chunk *remembered_state = 0;
- Frame_Chunk *rs;
- int is_eh = (strcmp (SECTION_NAME (section), ".eh_frame") == 0);
- int length_return;
- int max_regs = 0;
- int addr_size = is_32bit_elf ? 4 : 8;
-
- printf (_("The section %s contains:\n"), SECTION_NAME (section));
-
- while (start < end)
- {
- unsigned char *saved_start;
- unsigned char *block_end;
- unsigned long length;
- unsigned long cie_id;
- Frame_Chunk *fc;
- Frame_Chunk *cie;
- int need_col_headers = 1;
- unsigned char *augmentation_data = NULL;
- unsigned long augmentation_data_len = 0;
- int encoded_ptr_size = addr_size;
- int offset_size;
- int initial_length_size;
-
- saved_start = start;
- length = byte_get (start, 4); start += 4;
-
- if (length == 0)
- {
- printf ("\n%08lx ZERO terminator\n\n",
- (unsigned long)(saved_start - section_start));
- return 1;
- }
+ Elf_Internal_Shdr *sect;
+ unsigned char *contents;
+ unsigned char *p;
+ unsigned char *end;
+ bfd_vma section_len;
+ bfd_vma len;
+ unsigned i;
- if (length == 0xffffffff)
- {
- length = byte_get (start, 8);
- start += 8;
- offset_size = 8;
- initial_length_size = 12;
- }
- else
- {
- offset_size = 4;
- initial_length_size = 4;
- }
+ /* Find the section header so that we get the size. */
+ for (i = 0, sect = section_headers;
+ i < elf_header.e_shnum;
+ i++, sect++)
+ {
+ if (sect->sh_type != SHT_ARM_ATTRIBUTES)
+ continue;
- block_end = saved_start + length + initial_length_size;
- cie_id = byte_get (start, offset_size); start += offset_size;
+ contents = get_data (NULL, file, sect->sh_offset, 1, sect->sh_size,
+ _("attributes"));
- if (is_eh ? (cie_id == 0) : (cie_id == DW_CIE_ID))
+ if (!contents)
+ continue;
+ p = contents;
+ if (*p == 'A')
{
- int version;
-
- fc = xmalloc (sizeof (Frame_Chunk));
- memset (fc, 0, sizeof (Frame_Chunk));
-
- fc->next = chunks;
- chunks = fc;
- fc->chunk_start = saved_start;
- fc->ncols = 0;
- fc->col_type = xmalloc (sizeof (short int));
- fc->col_offset = xmalloc (sizeof (int));
- frame_need_space (fc, max_regs-1);
-
- version = *start++;
-
- fc->augmentation = start;
- start = strchr (start, '\0') + 1;
-
- if (fc->augmentation[0] == 'z')
- {
- fc->code_factor = LEB ();
- fc->data_factor = SLEB ();
- fc->ra = byte_get (start, 1); start += 1;
- augmentation_data_len = LEB ();
- augmentation_data = start;
- start += augmentation_data_len;
- }
- else if (strcmp (fc->augmentation, "eh") == 0)
- {
- start += addr_size;
- fc->code_factor = LEB ();
- fc->data_factor = SLEB ();
- fc->ra = byte_get (start, 1); start += 1;
- }
- else
+ len = sect->sh_size - 1;
+ p++;
+ while (len > 0)
{
- fc->code_factor = LEB ();
- fc->data_factor = SLEB ();
- fc->ra = byte_get (start, 1); start += 1;
- }
- cie = fc;
+ int namelen;
+ bfd_boolean public_section;
- if (do_debug_frames_interp)
- printf ("\n%08lx %08lx %08lx CIE \"%s\" cf=%d df=%d ra=%d\n",
- (unsigned long)(saved_start - section_start), length, cie_id,
- fc->augmentation, fc->code_factor, fc->data_factor,
- fc->ra);
- else
- {
- printf ("\n%08lx %08lx %08lx CIE\n",
- (unsigned long)(saved_start - section_start), length, cie_id);
- printf (" Version: %d\n", version);
- printf (" Augmentation: \"%s\"\n", fc->augmentation);
- printf (" Code alignment factor: %u\n", fc->code_factor);
- printf (" Data alignment factor: %d\n", fc->data_factor);
- printf (" Return address column: %d\n", fc->ra);
-
- if (augmentation_data_len)
+ section_len = byte_get (p, 4);
+ p += 4;
+ if (section_len > len)
{
- unsigned long i;
- printf (" Augmentation data: ");
- for (i = 0; i < augmentation_data_len; ++i)
- printf (" %02x", augmentation_data[i]);
- putchar ('\n');
+ printf (_("ERROR: Bad section length (%d > %d)\n"),
+ (int)section_len, (int)len);
+ section_len = len;
}
- putchar ('\n');
- }
-
- if (augmentation_data_len)
- {
- unsigned char *p, *q;
- p = fc->augmentation + 1;
- q = augmentation_data;
-
- while (1)
+ len -= section_len;
+ printf ("Attribute Section: %s\n", p);
+ if (strcmp ((char *)p, "aeabi") == 0)
+ public_section = TRUE;
+ else
+ public_section = FALSE;
+ namelen = strlen ((char *)p) + 1;
+ p += namelen;
+ section_len -= namelen + 4;
+ while (section_len > 0)
{
- if (*p == 'L')
- q++;
- else if (*p == 'P')
- q += 1 + size_of_encoded_value (*q);
- else if (*p == 'R')
- fc->fde_encoding = *q++;
+ int tag = *(p++);
+ int val;
+ bfd_vma size;
+ size = byte_get (p, 4);
+ if (size > section_len)
+ {
+ printf (_("ERROR: Bad subsection length (%d > %d)\n"),
+ (int)size, (int)section_len);
+ size = section_len;
+ }
+ section_len -= size;
+ end = p + size - 1;
+ p += 4;
+ switch (tag)
+ {
+ case 1:
+ printf ("File Attributes\n");
+ break;
+ case 2:
+ printf ("Section Attributes:");
+ goto do_numlist;
+ case 3:
+ printf ("Symbol Attributes:");
+ do_numlist:
+ for (;;)
+ {
+ unsigned int i;
+ val = read_uleb128 (p, &i);
+ p += i;
+ if (val == 0)
+ break;
+ printf (" %d", val);
+ }
+ printf ("\n");
+ break;
+ default:
+ printf ("Unknown tag: %d\n", tag);
+ public_section = FALSE;
+ break;
+ }
+ if (public_section)
+ {
+ while (p < end)
+ p = display_arm_attribute(p);
+ }
else
- break;
- p++;
+ {
+ /* ??? Do something sensible, like dump hex. */
+ printf (" Unknown section contexts\n");
+ p = end;
+ }
}
-
- if (fc->fde_encoding)
- encoded_ptr_size = size_of_encoded_value (fc->fde_encoding);
}
-
- frame_need_space (fc, fc->ra);
}
else
{
- unsigned char *look_for;
- static Frame_Chunk fde_fc;
-
- fc = & fde_fc;
- memset (fc, 0, sizeof (Frame_Chunk));
-
- look_for = is_eh ? start - 4 - cie_id : section_start + cie_id;
-
- for (cie = chunks; cie ; cie = cie->next)
- if (cie->chunk_start == look_for)
- break;
-
- if (!cie)
- {
- warn ("Invalid CIE pointer %08lx in FDE at %08lx\n",
- cie_id, saved_start);
- start = block_end;
- fc->ncols = 0;
- fc->col_type = xmalloc (sizeof (short int));
- fc->col_offset = xmalloc (sizeof (int));
- frame_need_space (fc, max_regs - 1);
- cie = fc;
- fc->augmentation = "";
- fc->fde_encoding = 0;
- }
- else
- {
- fc->ncols = cie->ncols;
- fc->col_type = xmalloc (fc->ncols * sizeof (short int));
- fc->col_offset = xmalloc (fc->ncols * sizeof (int));
- memcpy (fc->col_type, cie->col_type, fc->ncols * sizeof (short int));
- memcpy (fc->col_offset, cie->col_offset, fc->ncols * sizeof (int));
- fc->augmentation = cie->augmentation;
- fc->code_factor = cie->code_factor;
- fc->data_factor = cie->data_factor;
- fc->cfa_reg = cie->cfa_reg;
- fc->cfa_offset = cie->cfa_offset;
- fc->ra = cie->ra;
- frame_need_space (fc, max_regs-1);
- fc->fde_encoding = cie->fde_encoding;
- }
-
- if (fc->fde_encoding)
- encoded_ptr_size = size_of_encoded_value (fc->fde_encoding);
-
- fc->pc_begin = get_encoded_value (start, fc->fde_encoding);
- if ((fc->fde_encoding & 0x70) == DW_EH_PE_pcrel)
- fc->pc_begin += section->sh_addr + (start - section_start);
- start += encoded_ptr_size;
- fc->pc_range = byte_get (start, encoded_ptr_size);
- start += encoded_ptr_size;
-
- if (cie->augmentation[0] == 'z')
- {
- augmentation_data_len = LEB ();
- augmentation_data = start;
- start += augmentation_data_len;
- }
-
- printf ("\n%08lx %08lx %08lx FDE cie=%08lx pc=%08lx..%08lx\n",
- (unsigned long)(saved_start - section_start), length, cie_id,
- (unsigned long)(cie->chunk_start - section_start),
- fc->pc_begin, fc->pc_begin + fc->pc_range);
- if (! do_debug_frames_interp && augmentation_data_len)
- {
- unsigned long i;
- printf (" Augmentation data: ");
- for (i = 0; i < augmentation_data_len; ++i)
- printf (" %02x", augmentation_data[i]);
- putchar ('\n');
- putchar ('\n');
- }
- }
-
- /* At this point, fc is the current chunk, cie (if any) is set, and we're
- about to interpret instructions for the chunk. */
- /* ??? At present we need to do this always, since this sizes the
- fc->col_type and fc->col_offset arrays, which we write into always.
- We should probably split the interpreted and non-interpreted bits
- into two different routines, since there's so much that doesn't
- really overlap between them. */
- if (1 || do_debug_frames_interp)
- {
- /* Start by making a pass over the chunk, allocating storage
- and taking note of what registers are used. */
- unsigned char *tmp = start;
-
- while (start < block_end)
- {
- unsigned op, opa;
- unsigned long reg, tmp;
-
- op = *start++;
- opa = op & 0x3f;
- if (op & 0xc0)
- op &= 0xc0;
-
- /* Warning: if you add any more cases to this switch, be
- sure to add them to the corresponding switch below. */
- switch (op)
- {
- case DW_CFA_advance_loc:
- break;
- case DW_CFA_offset:
- LEB ();
- frame_need_space (fc, opa);
- fc->col_type[opa] = DW_CFA_undefined;
- break;
- case DW_CFA_restore:
- frame_need_space (fc, opa);
- fc->col_type[opa] = DW_CFA_undefined;
- break;
- case DW_CFA_set_loc:
- start += encoded_ptr_size;
- break;
- case DW_CFA_advance_loc1:
- start += 1;
- break;
- case DW_CFA_advance_loc2:
- start += 2;
- break;
- case DW_CFA_advance_loc4:
- start += 4;
- break;
- case DW_CFA_offset_extended:
- reg = LEB (); LEB ();
- frame_need_space (fc, reg);
- fc->col_type[reg] = DW_CFA_undefined;
- break;
- case DW_CFA_restore_extended:
- reg = LEB ();
- frame_need_space (fc, reg);
- fc->col_type[reg] = DW_CFA_undefined;
- break;
- case DW_CFA_undefined:
- reg = LEB ();
- frame_need_space (fc, reg);
- fc->col_type[reg] = DW_CFA_undefined;
- break;
- case DW_CFA_same_value:
- reg = LEB ();
- frame_need_space (fc, reg);
- fc->col_type[reg] = DW_CFA_undefined;
- break;
- case DW_CFA_register:
- reg = LEB (); LEB ();
- frame_need_space (fc, reg);
- fc->col_type[reg] = DW_CFA_undefined;
- break;
- case DW_CFA_def_cfa:
- LEB (); LEB ();
- break;
- case DW_CFA_def_cfa_register:
- LEB ();
- break;
- case DW_CFA_def_cfa_offset:
- LEB ();
- break;
- case DW_CFA_def_cfa_expression:
- tmp = LEB ();
- start += tmp;
- break;
- case DW_CFA_expression:
- reg = LEB ();
- tmp = LEB ();
- start += tmp;
- frame_need_space (fc, reg);
- fc->col_type[reg] = DW_CFA_undefined;
- break;
- case DW_CFA_offset_extended_sf:
- reg = LEB (); SLEB ();
- frame_need_space (fc, reg);
- fc->col_type[reg] = DW_CFA_undefined;
- break;
- case DW_CFA_def_cfa_sf:
- LEB (); SLEB ();
- break;
- case DW_CFA_def_cfa_offset_sf:
- SLEB ();
- break;
- case DW_CFA_MIPS_advance_loc8:
- start += 8;
- break;
- case DW_CFA_GNU_args_size:
- LEB ();
- break;
- case DW_CFA_GNU_negative_offset_extended:
- reg = LEB (); LEB ();
- frame_need_space (fc, reg);
- fc->col_type[reg] = DW_CFA_undefined;
-
- default:
- break;
- }
- }
- start = tmp;
- }
-
- /* Now we know what registers are used, make a second pass over
- the chunk, this time actually printing out the info. */
-
- while (start < block_end)
- {
- unsigned op, opa;
- unsigned long ul, reg, roffs;
- long l, ofs;
- bfd_vma vma;
-
- op = *start++;
- opa = op & 0x3f;
- if (op & 0xc0)
- op &= 0xc0;
-
- /* Warning: if you add any more cases to this switch, be
- sure to add them to the corresponding switch above. */
- switch (op)
- {
- case DW_CFA_advance_loc:
- if (do_debug_frames_interp)
- frame_display_row (fc, &need_col_headers, &max_regs);
- else
- printf (" DW_CFA_advance_loc: %d to %08lx\n",
- opa * fc->code_factor,
- fc->pc_begin + opa * fc->code_factor);
- fc->pc_begin += opa * fc->code_factor;
- break;
-
- case DW_CFA_offset:
- roffs = LEB ();
- if (! do_debug_frames_interp)
- printf (" DW_CFA_offset: r%d at cfa%+ld\n",
- opa, roffs * fc->data_factor);
- fc->col_type[opa] = DW_CFA_offset;
- fc->col_offset[opa] = roffs * fc->data_factor;
- break;
-
- case DW_CFA_restore:
- if (! do_debug_frames_interp)
- printf (" DW_CFA_restore: r%d\n", opa);
- fc->col_type[opa] = cie->col_type[opa];
- fc->col_offset[opa] = cie->col_offset[opa];
- break;
-
- case DW_CFA_set_loc:
- vma = get_encoded_value (start, fc->fde_encoding);
- if ((fc->fde_encoding & 0x70) == DW_EH_PE_pcrel)
- vma += section->sh_addr + (start - section_start);
- start += encoded_ptr_size;
- if (do_debug_frames_interp)
- frame_display_row (fc, &need_col_headers, &max_regs);
- else
- printf (" DW_CFA_set_loc: %08lx\n", (unsigned long)vma);
- fc->pc_begin = vma;
- break;
-
- case DW_CFA_advance_loc1:
- ofs = byte_get (start, 1); start += 1;
- if (do_debug_frames_interp)
- frame_display_row (fc, &need_col_headers, &max_regs);
- else
- printf (" DW_CFA_advance_loc1: %ld to %08lx\n",
- ofs * fc->code_factor,
- fc->pc_begin + ofs * fc->code_factor);
- fc->pc_begin += ofs * fc->code_factor;
- break;
-
- case DW_CFA_advance_loc2:
- ofs = byte_get (start, 2); start += 2;
- if (do_debug_frames_interp)
- frame_display_row (fc, &need_col_headers, &max_regs);
- else
- printf (" DW_CFA_advance_loc2: %ld to %08lx\n",
- ofs * fc->code_factor,
- fc->pc_begin + ofs * fc->code_factor);
- fc->pc_begin += ofs * fc->code_factor;
- break;
-
- case DW_CFA_advance_loc4:
- ofs = byte_get (start, 4); start += 4;
- if (do_debug_frames_interp)
- frame_display_row (fc, &need_col_headers, &max_regs);
- else
- printf (" DW_CFA_advance_loc4: %ld to %08lx\n",
- ofs * fc->code_factor,
- fc->pc_begin + ofs * fc->code_factor);
- fc->pc_begin += ofs * fc->code_factor;
- break;
-
- case DW_CFA_offset_extended:
- reg = LEB ();
- roffs = LEB ();
- if (! do_debug_frames_interp)
- printf (" DW_CFA_offset_extended: r%ld at cfa%+ld\n",
- reg, roffs * fc->data_factor);
- fc->col_type[reg] = DW_CFA_offset;
- fc->col_offset[reg] = roffs * fc->data_factor;
- break;
-
- case DW_CFA_restore_extended:
- reg = LEB ();
- if (! do_debug_frames_interp)
- printf (" DW_CFA_restore_extended: r%ld\n", reg);
- fc->col_type[reg] = cie->col_type[reg];
- fc->col_offset[reg] = cie->col_offset[reg];
- break;
-
- case DW_CFA_undefined:
- reg = LEB ();
- if (! do_debug_frames_interp)
- printf (" DW_CFA_undefined: r%ld\n", reg);
- fc->col_type[reg] = DW_CFA_undefined;
- fc->col_offset[reg] = 0;
- break;
-
- case DW_CFA_same_value:
- reg = LEB ();
- if (! do_debug_frames_interp)
- printf (" DW_CFA_same_value: r%ld\n", reg);
- fc->col_type[reg] = DW_CFA_same_value;
- fc->col_offset[reg] = 0;
- break;
-
- case DW_CFA_register:
- reg = LEB ();
- roffs = LEB ();
- if (! do_debug_frames_interp)
- printf (" DW_CFA_register: r%ld in r%ld\n", reg, roffs);
- fc->col_type[reg] = DW_CFA_register;
- fc->col_offset[reg] = roffs;
- break;
-
- case DW_CFA_remember_state:
- if (! do_debug_frames_interp)
- printf (" DW_CFA_remember_state\n");
- rs = xmalloc (sizeof (Frame_Chunk));
- rs->ncols = fc->ncols;
- rs->col_type = xmalloc (rs->ncols * sizeof (short int));
- rs->col_offset = xmalloc (rs->ncols * sizeof (int));
- memcpy (rs->col_type, fc->col_type, rs->ncols);
- memcpy (rs->col_offset, fc->col_offset, rs->ncols * sizeof (int));
- rs->next = remembered_state;
- remembered_state = rs;
- break;
-
- case DW_CFA_restore_state:
- if (! do_debug_frames_interp)
- printf (" DW_CFA_restore_state\n");
- rs = remembered_state;
- if (rs)
- {
- remembered_state = rs->next;
- frame_need_space (fc, rs->ncols-1);
- memcpy (fc->col_type, rs->col_type, rs->ncols);
- memcpy (fc->col_offset, rs->col_offset,
- rs->ncols * sizeof (int));
- free (rs->col_type);
- free (rs->col_offset);
- free (rs);
- }
- else if (do_debug_frames_interp)
- printf ("Mismatched DW_CFA_restore_state\n");
- break;
-
- case DW_CFA_def_cfa:
- fc->cfa_reg = LEB ();
- fc->cfa_offset = LEB ();
- fc->cfa_exp = 0;
- if (! do_debug_frames_interp)
- printf (" DW_CFA_def_cfa: r%d ofs %d\n",
- fc->cfa_reg, fc->cfa_offset);
- break;
-
- case DW_CFA_def_cfa_register:
- fc->cfa_reg = LEB ();
- fc->cfa_exp = 0;
- if (! do_debug_frames_interp)
- printf (" DW_CFA_def_cfa_reg: r%d\n", fc->cfa_reg);
- break;
-
- case DW_CFA_def_cfa_offset:
- fc->cfa_offset = LEB ();
- if (! do_debug_frames_interp)
- printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset);
- break;
-
- case DW_CFA_nop:
- if (! do_debug_frames_interp)
- printf (" DW_CFA_nop\n");
- break;
-
- case DW_CFA_def_cfa_expression:
- ul = LEB ();
- if (! do_debug_frames_interp)
- {
- printf (" DW_CFA_def_cfa_expression (");
- decode_location_expression (start, addr_size, ul);
- printf (")\n");
- }
- fc->cfa_exp = 1;
- start += ul;
- break;
-
- case DW_CFA_expression:
- reg = LEB ();
- ul = LEB ();
- if (! do_debug_frames_interp)
- {
- printf (" DW_CFA_expression: r%ld (", reg);
- decode_location_expression (start, addr_size, ul);
- printf (")\n");
- }
- fc->col_type[reg] = DW_CFA_expression;
- start += ul;
- break;
-
- case DW_CFA_offset_extended_sf:
- reg = LEB ();
- l = SLEB ();
- frame_need_space (fc, reg);
- if (! do_debug_frames_interp)
- printf (" DW_CFA_offset_extended_sf: r%ld at cfa%+ld\n",
- reg, l * fc->data_factor);
- fc->col_type[reg] = DW_CFA_offset;
- fc->col_offset[reg] = l * fc->data_factor;
- break;
-
- case DW_CFA_def_cfa_sf:
- fc->cfa_reg = LEB ();
- fc->cfa_offset = SLEB ();
- fc->cfa_exp = 0;
- if (! do_debug_frames_interp)
- printf (" DW_CFA_def_cfa_sf: r%d ofs %d\n",
- fc->cfa_reg, fc->cfa_offset);
- break;
-
- case DW_CFA_def_cfa_offset_sf:
- fc->cfa_offset = SLEB ();
- if (! do_debug_frames_interp)
- printf (" DW_CFA_def_cfa_offset_sf: %d\n", fc->cfa_offset);
- break;
-
- case DW_CFA_MIPS_advance_loc8:
- ofs = byte_get (start, 8); start += 8;
- if (do_debug_frames_interp)
- frame_display_row (fc, &need_col_headers, &max_regs);
- else
- printf (" DW_CFA_MIPS_advance_loc8: %ld to %08lx\n",
- ofs * fc->code_factor,
- fc->pc_begin + ofs * fc->code_factor);
- fc->pc_begin += ofs * fc->code_factor;
- break;
-
- case DW_CFA_GNU_window_save:
- if (! do_debug_frames_interp)
- printf (" DW_CFA_GNU_window_save\n");
- break;
-
- case DW_CFA_GNU_args_size:
- ul = LEB ();
- if (! do_debug_frames_interp)
- printf (" DW_CFA_GNU_args_size: %ld\n", ul);
- break;
-
- case DW_CFA_GNU_negative_offset_extended:
- reg = LEB ();
- l = - LEB ();
- frame_need_space (fc, reg);
- if (! do_debug_frames_interp)
- printf (" DW_CFA_GNU_negative_offset_extended: r%ld at cfa%+ld\n",
- reg, l * fc->data_factor);
- fc->col_type[reg] = DW_CFA_offset;
- fc->col_offset[reg] = l * fc->data_factor;
- break;
-
- default:
- fprintf (stderr, "unsupported or unknown DW_CFA_%d\n", op);
- start = block_end;
- }
+ printf (_("Unknown format '%c'\n"), *p);
}
- if (do_debug_frames_interp)
- frame_display_row (fc, &need_col_headers, &max_regs);
-
- start = block_end;
- }
-
- printf ("\n");
-
- return 1;
-}
-
-#undef GET
-#undef LEB
-#undef SLEB
-
-static int
-display_debug_not_supported (Elf_Internal_Shdr *section,
- unsigned char *start ATTRIBUTE_UNUSED,
- FILE *file ATTRIBUTE_UNUSED)
-{
- printf (_("Displaying the debug contents of section %s is not yet supported.\n"),
- SECTION_NAME (section));
-
- return 1;
-}
-
-/* A structure containing the name of a debug section
- and a pointer to a function that can decode it. */
-struct
-{
- const char *const name;
- int (*display) (Elf_Internal_Shdr *, unsigned char *, FILE *);
-}
-debug_displays[] =
-{
- { ".debug_abbrev", display_debug_abbrev },
- { ".debug_aranges", display_debug_aranges },
- { ".debug_frame", display_debug_frames },
- { ".debug_info", display_debug_info },
- { ".debug_line", display_debug_lines },
- { ".debug_pubnames", display_debug_pubnames },
- { ".eh_frame", display_debug_frames },
- { ".debug_macinfo", display_debug_macinfo },
- { ".debug_str", display_debug_str },
- { ".debug_loc", display_debug_loc },
- { ".debug_pubtypes", display_debug_pubnames },
- { ".debug_ranges", display_debug_not_supported },
- { ".debug_static_func", display_debug_not_supported },
- { ".debug_static_vars", display_debug_not_supported },
- { ".debug_types", display_debug_not_supported },
- { ".debug_weaknames", display_debug_not_supported }
-};
-
-static int
-display_debug_section (Elf_Internal_Shdr *section, FILE *file)
-{
- char *name = SECTION_NAME (section);
- bfd_size_type length;
- unsigned char *start;
- int i;
-
- length = section->sh_size;
- if (length == 0)
- {
- printf (_("\nSection '%s' has no debugging data.\n"), name);
- return 0;
- }
-
- start = get_data (NULL, file, section->sh_offset, length,
- _("debug section data"));
- if (!start)
- return 0;
-
- /* See if we know how to display the contents of this section. */
- if (strncmp (name, ".gnu.linkonce.wi.", 17) == 0)
- name = ".debug_info";
-
- for (i = NUM_ELEM (debug_displays); i--;)
- if (strcmp (debug_displays[i].name, name) == 0)
- {
- debug_displays[i].display (section, start, file);
- break;
- }
-
- if (i == -1)
- printf (_("Unrecognized debug section: %s\n"), name);
-
- free (start);
-
- /* If we loaded in the abbrev section at some point,
- we must release it here. */
- free_abbrevs ();
-
- return 1;
-}
-
-static int
-process_section_contents (FILE *file)
-{
- Elf_Internal_Shdr *section;
- unsigned int i;
-
- if (! do_dump)
- return 1;
-
- for (i = 0, section = section_headers;
- i < elf_header.e_shnum && i < num_dump_sects;
- i++, section++)
- {
-#ifdef SUPPORT_DISASSEMBLY
- if (dump_sects[i] & DISASS_DUMP)
- disassemble_section (section, file);
-#endif
- if (dump_sects[i] & HEX_DUMP)
- dump_section (section, file);
-
- if (dump_sects[i] & DEBUG_DUMP)
- display_debug_section (section, file);
+ free(contents);
}
-
- if (i < num_dump_sects)
- warn (_("Some sections were not dumped because they do not exist!\n"));
-
return 1;
}
-static void
-process_mips_fpe_exception (int mask)
-{
- if (mask)
- {
- int first = 1;
- if (mask & OEX_FPU_INEX)
- fputs ("INEX", stdout), first = 0;
- if (mask & OEX_FPU_UFLO)
- printf ("%sUFLO", first ? "" : "|"), first = 0;
- if (mask & OEX_FPU_OFLO)
- printf ("%sOFLO", first ? "" : "|"), first = 0;
- if (mask & OEX_FPU_DIV0)
- printf ("%sDIV0", first ? "" : "|"), first = 0;
- if (mask & OEX_FPU_INVAL)
- printf ("%sINVAL", first ? "" : "|");
- }
- else
- fputs ("0", stdout);
-}
-
static int
process_mips_specific (FILE *file)
{
@@ -9441,11 +8057,11 @@ process_mips_specific (FILE *file)
size_t conflicts_offset = 0;
/* We have a lot of special sections. Thanks SGI! */
- if (dynamic_segment == NULL)
+ if (dynamic_section == NULL)
/* No information available. */
return 0;
- for (entry = dynamic_segment; entry->d_tag != DT_NULL; ++entry)
+ for (entry = dynamic_section; entry->d_tag != DT_NULL; ++entry)
switch (entry->d_tag)
{
case DT_MIPS_LIBLIST:
@@ -9477,7 +8093,7 @@ process_mips_specific (FILE *file)
size_t cnt;
elib = get_data (NULL, file, liblist_offset,
- liblistno * sizeof (Elf32_External_Lib),
+ liblistno, sizeof (Elf32_External_Lib),
_("liblist"));
if (elib)
{
@@ -9500,12 +8116,16 @@ process_mips_specific (FILE *file)
liblist.l_flags = BYTE_GET (elib[cnt].l_flags);
tmp = gmtime (&time);
- sprintf (timebuf, "%04u-%02u-%02uT%02u:%02u:%02u",
- tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
- tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+ snprintf (timebuf, sizeof (timebuf),
+ "%04u-%02u-%02uT%02u:%02u:%02u",
+ tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
+ tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
printf ("%3lu: ", (unsigned long) cnt);
- print_symbol (20, dynamic_strings + liblist.l_name);
+ if (VALID_DYNAMIC_NAME (liblist.l_name))
+ print_symbol (20, GET_DYNAMIC_NAME (liblist.l_name));
+ else
+ printf ("<corrupt: %9ld>", liblist.l_name);
printf (" %s %#10lx %-7ld", timebuf, liblist.l_checksum,
liblist.l_version);
@@ -9562,11 +8182,11 @@ process_mips_specific (FILE *file)
while (sect->sh_type != SHT_MIPS_OPTIONS)
++sect;
- eopt = get_data (NULL, file, options_offset, sect->sh_size,
+ eopt = get_data (NULL, file, options_offset, 1, sect->sh_size,
_("options"));
if (eopt)
{
- iopt = malloc ((sect->sh_size / sizeof (eopt)) * sizeof (*iopt));
+ iopt = cmalloc ((sect->sh_size / sizeof (eopt)), sizeof (*iopt));
if (iopt == NULL)
{
error (_("Out of memory"));
@@ -9643,7 +8263,7 @@ process_mips_specific (FILE *file)
reginfo.ri_cprmask[1] = BYTE_GET (ereg->ri_cprmask[1]);
reginfo.ri_cprmask[2] = BYTE_GET (ereg->ri_cprmask[2]);
reginfo.ri_cprmask[3] = BYTE_GET (ereg->ri_cprmask[3]);
- reginfo.ri_gp_value = BYTE_GET8 (ereg->ri_gp_value);
+ reginfo.ri_gp_value = BYTE_GET (ereg->ri_gp_value);
printf ("GPR %08lx GP 0x",
reginfo.ri_gprmask);
@@ -9758,7 +8378,7 @@ process_mips_specific (FILE *file)
return 0;
}
- iconf = malloc (conflictsno * sizeof (*iconf));
+ iconf = cmalloc (conflictsno, sizeof (*iconf));
if (iconf == NULL)
{
error (_("Out of memory"));
@@ -9770,7 +8390,7 @@ process_mips_specific (FILE *file)
Elf32_External_Conflict *econf32;
econf32 = get_data (NULL, file, conflicts_offset,
- conflictsno * sizeof (*econf32), _("conflict"));
+ conflictsno, sizeof (*econf32), _("conflict"));
if (!econf32)
return 0;
@@ -9784,7 +8404,7 @@ process_mips_specific (FILE *file)
Elf64_External_Conflict *econf64;
econf64 = get_data (NULL, file, conflicts_offset,
- conflictsno * sizeof (*econf64), _("conflict"));
+ conflictsno, sizeof (*econf64), _("conflict"));
if (!econf64)
return 0;
@@ -9805,7 +8425,10 @@ process_mips_specific (FILE *file)
printf ("%5lu: %8lu ", (unsigned long) cnt, iconf[cnt]);
print_vma (psym->st_value, FULL_HEX);
putchar (' ');
- print_symbol (25, dynamic_strings + psym->st_name);
+ if (VALID_DYNAMIC_NAME (psym->st_name))
+ print_symbol (25, GET_DYNAMIC_NAME (psym->st_name));
+ else
+ printf ("<corrupt: %14ld>", psym->st_name);
putchar ('\n');
}
@@ -9821,6 +8444,7 @@ process_gnu_liblist (FILE *file)
Elf_Internal_Shdr *section, *string_sec;
Elf32_External_Lib *elib;
char *strtab;
+ size_t strtab_size;
size_t cnt;
unsigned i;
@@ -9834,15 +8458,19 @@ process_gnu_liblist (FILE *file)
switch (section->sh_type)
{
case SHT_GNU_LIBLIST:
- elib = get_data (NULL, file, section->sh_offset, section->sh_size,
+ if (SECTION_HEADER_INDEX (section->sh_link) >= elf_header.e_shnum)
+ break;
+
+ elib = get_data (NULL, file, section->sh_offset, 1, section->sh_size,
_("liblist"));
if (elib == NULL)
break;
string_sec = SECTION_HEADER (section->sh_link);
- strtab = get_data (NULL, file, string_sec->sh_offset,
+ strtab = get_data (NULL, file, string_sec->sh_offset, 1,
string_sec->sh_size, _("liblist string table"));
+ strtab_size = string_sec->sh_size;
if (strtab == NULL
|| section->sh_entsize != sizeof (Elf32_External_Lib))
@@ -9872,15 +8500,18 @@ process_gnu_liblist (FILE *file)
liblist.l_flags = BYTE_GET (elib[cnt].l_flags);
tmp = gmtime (&time);
- sprintf (timebuf, "%04u-%02u-%02uT%02u:%02u:%02u",
- tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
- tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+ snprintf (timebuf, sizeof (timebuf),
+ "%04u-%02u-%02uT%02u:%02u:%02u",
+ tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
+ tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
printf ("%3lu: ", (unsigned long) cnt);
if (do_wide)
- printf ("%-20s", strtab + liblist.l_name);
+ printf ("%-20s", liblist.l_name < strtab_size
+ ? strtab + liblist.l_name : "<corrupt>");
else
- printf ("%-20.20s", strtab + liblist.l_name);
+ printf ("%-20.20s", liblist.l_name < strtab_size
+ ? strtab + liblist.l_name : "<corrupt>");
printf (" %s %#010lx %-7ld %-7ld\n", timebuf, liblist.l_checksum,
liblist.l_version, liblist.l_flags);
}
@@ -9897,24 +8528,49 @@ get_note_type (unsigned e_type)
{
static char buff[64];
- switch (e_type)
- {
- case NT_AUXV: return _("NT_AUXV (auxiliary vector)");
- case NT_PRSTATUS: return _("NT_PRSTATUS (prstatus structure)");
- case NT_FPREGSET: return _("NT_FPREGSET (floating point registers)");
- case NT_PRPSINFO: return _("NT_PRPSINFO (prpsinfo structure)");
- case NT_TASKSTRUCT: return _("NT_TASKSTRUCT (task structure)");
- case NT_PRXFPREG: return _("NT_PRXFPREG (user_xfpregs structure)");
- case NT_PSTATUS: return _("NT_PSTATUS (pstatus structure)");
- case NT_FPREGS: return _("NT_FPREGS (floating point registers)");
- case NT_PSINFO: return _("NT_PSINFO (psinfo structure)");
- case NT_LWPSTATUS: return _("NT_LWPSTATUS (lwpstatus_t structure)");
- case NT_LWPSINFO: return _("NT_LWPSINFO (lwpsinfo_t structure)");
- case NT_WIN32PSTATUS: return _("NT_WIN32PSTATUS (win32_pstatus structure)");
- default:
- sprintf (buff, _("Unknown note type: (0x%08x)"), e_type);
- return buff;
- }
+ if (elf_header.e_type == ET_CORE)
+ switch (e_type)
+ {
+ case NT_AUXV:
+ return _("NT_AUXV (auxiliary vector)");
+ case NT_PRSTATUS:
+ return _("NT_PRSTATUS (prstatus structure)");
+ case NT_FPREGSET:
+ return _("NT_FPREGSET (floating point registers)");
+ case NT_PRPSINFO:
+ return _("NT_PRPSINFO (prpsinfo structure)");
+ case NT_TASKSTRUCT:
+ return _("NT_TASKSTRUCT (task structure)");
+ case NT_PRXFPREG:
+ return _("NT_PRXFPREG (user_xfpregs structure)");
+ case NT_PSTATUS:
+ return _("NT_PSTATUS (pstatus structure)");
+ case NT_FPREGS:
+ return _("NT_FPREGS (floating point registers)");
+ case NT_PSINFO:
+ return _("NT_PSINFO (psinfo structure)");
+ case NT_LWPSTATUS:
+ return _("NT_LWPSTATUS (lwpstatus_t structure)");
+ case NT_LWPSINFO:
+ return _("NT_LWPSINFO (lwpsinfo_t structure)");
+ case NT_WIN32PSTATUS:
+ return _("NT_WIN32PSTATUS (win32_pstatus structure)");
+ default:
+ break;
+ }
+ else
+ switch (e_type)
+ {
+ case NT_VERSION:
+ return _("NT_VERSION (version)");
+ case NT_ARCH:
+ return _("NT_ARCH (architecture)");
+ default:
+ break;
+ }
+
+ snprintf (buff, sizeof (buff), _("Unknown note type: (0x%08x)"), e_type);
+ return buff;
}
static const char *
@@ -9935,7 +8591,7 @@ get_netbsd_elfcore_note_type (unsigned e_type)
if (e_type < NT_NETBSDCORE_FIRSTMACH)
{
- sprintf (buff, _("Unknown note type: (0x%08x)"), e_type);
+ snprintf (buff, sizeof (buff), _("Unknown note type: (0x%08x)"), e_type);
return buff;
}
@@ -9974,7 +8630,8 @@ get_netbsd_elfcore_note_type (unsigned e_type)
}
}
- sprintf (buff, _("PT_FIRSTMACH+%d"), e_type - NT_NETBSDCORE_FIRSTMACH);
+ snprintf (buff, sizeof (buff), _("PT_FIRSTMACH+%d"),
+ e_type - NT_NETBSDCORE_FIRSTMACH);
return buff;
}
@@ -9989,22 +8646,18 @@ process_note (Elf_Internal_Note *pnote)
const char *nt;
if (pnote->namesz == 0)
- {
- /* If there is no note name, then use the default set of
- note type strings. */
- nt = get_note_type (pnote->type);
- }
- else if (strncmp (pnote->namedata, "NetBSD-CORE", 11) == 0)
- {
- /* NetBSD-specific core file notes. */
- nt = get_netbsd_elfcore_note_type (pnote->type);
- }
+ /* If there is no note name, then use the default set of
+ note type strings. */
+ nt = get_note_type (pnote->type);
+
+ else if (strneq (pnote->namedata, "NetBSD-CORE", 11))
+ /* NetBSD-specific core file notes. */
+ nt = get_netbsd_elfcore_note_type (pnote->type);
+
else
- {
- /* Don't recognize this note name; just use the default set of
- note type strings. */
+ /* Don't recognize this note name; just use the default set of
+ note type strings. */
nt = get_note_type (pnote->type);
- }
printf (" %s\t\t0x%08lx\t%s\n",
pnote->namesz ? pnote->namedata : "(NONE)",
@@ -10023,7 +8676,7 @@ process_corefile_note_segment (FILE *file, bfd_vma offset, bfd_vma length)
if (length <= 0)
return 0;
- pnotes = get_data (NULL, file, offset, length, _("notes"));
+ pnotes = get_data (NULL, file, offset, 1, length, _("notes"));
if (!pnotes)
return 0;
@@ -10050,9 +8703,9 @@ process_corefile_note_segment (FILE *file, bfd_vma offset, bfd_vma length)
if (((char *) next) > (((char *) pnotes) + length))
{
- warn (_("corrupt note found at offset %x into core notes\n"),
- ((char *) external) - ((char *) pnotes));
- warn (_(" type: %x, namesize: %08lx, descsize: %08lx\n"),
+ warn (_("corrupt note found at offset %lx into core notes\n"),
+ (long)((char *)external - (char *)pnotes));
+ warn (_(" type: %lx, namesize: %08lx, descsize: %08lx\n"),
inote.type, inote.namesz, inote.descsz);
break;
}
@@ -10119,24 +8772,39 @@ process_corefile_note_segments (FILE *file)
}
static int
-process_corefile_contents (FILE *file)
+process_note_sections (FILE *file)
+{
+ Elf_Internal_Shdr *section;
+ unsigned long i;
+ int res = 1;
+
+ for (i = 0, section = section_headers;
+ i < elf_header.e_shnum;
+ i++, section++)
+ if (section->sh_type == SHT_NOTE)
+ res &= process_corefile_note_segment (file,
+ (bfd_vma) section->sh_offset,
+ (bfd_vma) section->sh_size);
+
+ return res;
+}
+
+static int
+process_notes (FILE *file)
{
/* If we have not been asked to display the notes then do nothing. */
if (! do_notes)
return 1;
- /* If file is not a core file then exit. */
if (elf_header.e_type != ET_CORE)
- return 1;
+ return process_note_sections (file);
/* No program headers means no NOTE segment. */
- if (elf_header.e_phnum == 0)
- {
- printf (_("No note segments present in the core file.\n"));
- return 1;
- }
+ if (elf_header.e_phnum > 0)
+ return process_corefile_note_segments (file);
- return process_corefile_note_segments (file);
+ printf (_("No note segments present in the core file.\n"));
+ return 1;
}
static int
@@ -10147,6 +8815,8 @@ process_arch_specific (FILE *file)
switch (elf_header.e_machine)
{
+ case EM_ARM:
+ return process_arm_specific (file);
case EM_MIPS:
case EM_MIPS_RS3_LE:
return process_mips_specific (file);
@@ -10225,9 +8895,9 @@ get_file_header (FILE *file)
elf_header.e_type = BYTE_GET (ehdr64.e_type);
elf_header.e_machine = BYTE_GET (ehdr64.e_machine);
elf_header.e_version = BYTE_GET (ehdr64.e_version);
- elf_header.e_entry = BYTE_GET8 (ehdr64.e_entry);
- elf_header.e_phoff = BYTE_GET8 (ehdr64.e_phoff);
- elf_header.e_shoff = BYTE_GET8 (ehdr64.e_shoff);
+ elf_header.e_entry = BYTE_GET (ehdr64.e_entry);
+ elf_header.e_phoff = BYTE_GET (ehdr64.e_phoff);
+ elf_header.e_shoff = BYTE_GET (ehdr64.e_shoff);
elf_header.e_flags = BYTE_GET (ehdr64.e_flags);
elf_header.e_ehsize = BYTE_GET (ehdr64.e_ehsize);
elf_header.e_phentsize = BYTE_GET (ehdr64.e_phentsize);
@@ -10247,6 +8917,8 @@ get_file_header (FILE *file)
get_64bit_section_headers (file, 1);
}
+ is_relocatable = elf_header.e_type == ET_REL;
+
return 1;
}
@@ -10276,21 +8948,44 @@ process_object (char *file_name, FILE *file)
if (show_name)
printf (_("\nFile: %s\n"), file_name);
+ /* Initialise the dump_sects array from the cmdline_dump_sects array.
+ Note we do this even if cmdline_dump_sects is empty because we
+ must make sure that the dump_sets array is zeroed out before each
+ object file is processed. */
+ if (num_dump_sects > num_cmdline_dump_sects)
+ memset (dump_sects, 0, num_dump_sects);
+
+ if (num_cmdline_dump_sects > 0)
+ {
+ if (num_dump_sects == 0)
+ /* A sneaky way of allocating the dump_sects array. */
+ request_dump (num_cmdline_dump_sects, 0);
+
+ assert (num_dump_sects >= num_cmdline_dump_sects);
+ memcpy (dump_sects, cmdline_dump_sects, num_cmdline_dump_sects);
+ }
+
if (! process_file_header ())
return 1;
if (! process_section_headers (file))
{
- /* Without loaded section headers we
- cannot process lots of things. */
+ /* Without loaded section headers we cannot process lots of
+ things. */
do_unwind = do_version = do_dump = do_arch = 0;
if (! do_using_dynamic)
do_syms = do_reloc = 0;
}
+ if (! process_section_groups (file))
+ {
+ /* Without loaded section groups we cannot process unwind. */
+ do_unwind = 0;
+ }
+
if (process_program_headers (file))
- process_dynamic_segment (file);
+ process_dynamic_section (file);
process_relocs (file);
@@ -10304,7 +8999,7 @@ process_object (char *file_name, FILE *file)
process_section_contents (file);
- process_corefile_contents (file);
+ process_notes (file);
process_gnu_liblist (file);
@@ -10333,6 +9028,7 @@ process_object (char *file_name, FILE *file)
{
free (dynamic_strings);
dynamic_strings = NULL;
+ dynamic_strings_length = 0;
}
if (dynamic_symbols)
@@ -10348,6 +9044,31 @@ process_object (char *file_name, FILE *file)
dynamic_syminfo = NULL;
}
+ if (section_headers_groups)
+ {
+ free (section_headers_groups);
+ section_headers_groups = NULL;
+ }
+
+ if (section_groups)
+ {
+ struct group_list *g, *next;
+
+ for (i = 0; i < group_count; i++)
+ {
+ for (g = section_groups [i].root; g != NULL; g = next)
+ {
+ next = g->next;
+ free (g);
+ }
+ }
+
+ free (section_groups);
+ section_groups = NULL;
+ }
+
+ free_debug_memory ();
+
return 0;
}
@@ -10416,7 +9137,7 @@ process_archive (char *file_name, FILE *file)
if (fread (longnames, longnames_size, 1, file) != 1)
{
free (longnames);
- error(_("%s: failed to read string table\n"), file_name);
+ error (_("%s: failed to read string table\n"), file_name);
return 1;
}
@@ -10452,7 +9173,7 @@ process_archive (char *file_name, FILE *file)
off = strtoul (arhdr.ar_name + 1, NULL, 10);
if (off >= longnames_size)
{
- error (_("%s: invalid archive string table offset %lu\n"), off);
+ error (_("%s: invalid archive string table offset %lu\n"), file_name, off);
ret = 1;
break;
}
@@ -10468,7 +9189,7 @@ process_archive (char *file_name, FILE *file)
if (nameend == NULL)
{
- error (_("%s: bad archive file name\n"));
+ error (_("%s: bad archive file name\n"), file_name);
ret = 1;
break;
}
@@ -10598,8 +9319,6 @@ int
main (int argc, char **argv)
{
int err;
- char *cmdline_dump_sects = NULL;
- unsigned num_cmdline_dump_sects = 0;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
@@ -10610,15 +9329,13 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_args (argc, argv);
+ expandargv (&argc, &argv);
- if (optind < (argc - 1))
- show_name = 1;
+ parse_args (argc, argv);
- /* When processing more than one file remember the dump requests
- issued on command line to reset them after each file. */
- if (optind + 1 < argc && dump_sects != NULL)
+ if (num_dump_sects > 0)
{
+ /* 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."));
@@ -10629,19 +9346,12 @@ main (int argc, char **argv)
}
}
+ if (optind < (argc - 1))
+ show_name = 1;
+
err = 0;
while (optind < argc)
- {
- err |= process_file (argv[optind++]);
-
- /* Reset dump requests. */
- if (optind < argc && dump_sects != NULL)
- {
- num_dump_sects = num_cmdline_dump_sects;
- if (num_cmdline_dump_sects > 0)
- memcpy (dump_sects, cmdline_dump_sects, num_cmdline_dump_sects);
- }
- }
+ err |= process_file (argv[optind++]);
if (dump_sects != NULL)
free (dump_sects);
diff --git a/contrib/binutils/binutils/rename.c b/contrib/binutils/binutils/rename.c
index 398152e05f10..7d21cb34c046 100644
--- a/contrib/binutils/binutils/rename.c
+++ b/contrib/binutils/binutils/rename.c
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "bucomm.h"
@@ -37,6 +37,7 @@
#define O_BINARY 0
#endif
+#if ! defined (_WIN32) || defined (__CYGWIN32__)
static int simple_copy (const char *, const char *);
/* The number of bytes to copy at once. */
@@ -88,6 +89,7 @@ simple_copy (const char *from, const char *to)
}
return 0;
}
+#endif /* __CYGWIN32__ or not _WIN32 */
/* Set the times of the file DESTINATION to be the same as those in
STATBUF. */
@@ -140,7 +142,7 @@ set_times (const char *destination, const struct stat *statbuf)
Return 0 if ok, -1 if error. */
int
-smart_rename (const char *from, const char *to, int preserve_dates)
+smart_rename (const char *from, const char *to, int preserve_dates ATTRIBUTE_UNUSED)
{
bfd_boolean exists;
struct stat s;
diff --git a/contrib/binutils/binutils/resbin.c b/contrib/binutils/binutils/resbin.c
index ad14bdafcbba..80c2596a70b7 100644
--- a/contrib/binutils/binutils/resbin.c
+++ b/contrib/binutils/binutils/resbin.c
@@ -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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file contains functions to convert between the binary resource
format and the internal structures that we want to use. The same
@@ -1331,7 +1331,7 @@ resid_to_bin (struct res_id id, int big_endian)
if (! id.named)
{
d->length = 4;
- d->data = (unsigned char *) reswr_alloc (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);
}
@@ -1408,14 +1408,14 @@ res_to_bin_accelerator (const struct accelerator *accelerators,
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 8;
- d->data = (unsigned char *) reswr_alloc (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 + 8);
+ put_16 (big_endian, 0, d->data + 6);
d->next = NULL;
*pp = d;
@@ -1434,7 +1434,7 @@ res_to_bin_cursor (const struct cursor *c, int big_endian)
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 4;
- d->data = (unsigned char *) reswr_alloc (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);
@@ -1459,7 +1459,7 @@ res_to_bin_group_cursor (const struct group_cursor *group_cursors,
first = (struct bindata *) reswr_alloc (sizeof *first);
first->length = 6;
- first->data = (unsigned char *) reswr_alloc (6);
+ first->data = (unsigned char *) reswr_alloc (first->length);
put_16 (big_endian, 0, first->data);
put_16 (big_endian, 2, first->data + 2);
@@ -1476,7 +1476,7 @@ res_to_bin_group_cursor (const struct group_cursor *group_cursors,
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 14;
- d->data = (unsigned char *) reswr_alloc (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);
@@ -1642,7 +1642,7 @@ res_to_bin_dialog (const struct dialog *dialog, int big_endian)
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 2;
- d->data = (unsigned char *) reswr_alloc (2);
+ d->data = (unsigned char *) reswr_alloc (d->length);
length += 2;
@@ -1687,7 +1687,7 @@ res_to_bin_fontdir (const struct fontdir *fontdirs, int big_endian)
first = (struct bindata *) reswr_alloc (sizeof *first);
first->length = 2;
- first->data = (unsigned char *) reswr_alloc (2);
+ first->data = (unsigned char *) reswr_alloc (first->length);
first->next = NULL;
pp = &first->next;
@@ -1701,7 +1701,7 @@ res_to_bin_fontdir (const struct fontdir *fontdirs, int big_endian)
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 2;
- d->data = (unsigned char *) reswr_alloc (2);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_16 (big_endian, fd->index, d->data);
@@ -1733,7 +1733,7 @@ res_to_bin_group_icon (const struct group_icon *group_icons, int big_endian)
first = (struct bindata *) reswr_alloc (sizeof *first);
first->length = 6;
- first->data = (unsigned char *) reswr_alloc (6);
+ first->data = (unsigned char *) reswr_alloc (first->length);
put_16 (big_endian, 0, first->data);
put_16 (big_endian, 1, first->data + 2);
@@ -1750,7 +1750,7 @@ res_to_bin_group_icon (const struct group_icon *group_icons, int big_endian)
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 14;
- d->data = (unsigned char *) reswr_alloc (14);
+ d->data = (unsigned char *) reswr_alloc (d->length);
d->data[0] = gi->width;
d->data[1] = gi->height;
@@ -1875,7 +1875,7 @@ res_to_bin_menuexitems (const struct menuitem *items, int big_endian)
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 12;
- d->data = (unsigned char *) reswr_alloc (12);
+ d->data = (unsigned char *) reswr_alloc (d->length);
length += 12;
@@ -1903,7 +1903,7 @@ res_to_bin_menuexitems (const struct menuitem *items, int big_endian)
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 4;
- d->data = (unsigned char *) reswr_alloc (4);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_32 (big_endian, mi->help, d->data);
@@ -1948,13 +1948,13 @@ res_to_bin_rcdata (const struct rcdata_item *items, int big_endian)
case RCDATA_WORD:
d->length = 2;
- d->data = (unsigned char *) reswr_alloc (2);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_16 (big_endian, ri->u.word, d->data);
break;
case RCDATA_DWORD:
d->length = 4;
- d->data = (unsigned char *) reswr_alloc (4);
+ d->data = (unsigned char *) reswr_alloc (d->length);
put_32 (big_endian, ri->u.dword, d->data);
break;
@@ -2060,7 +2060,7 @@ res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
first = (struct bindata *) reswr_alloc (sizeof *first);
first->length = 6;
- first->data = (unsigned char *) reswr_alloc (6);
+ first->data = (unsigned char *) reswr_alloc (first->length);
length = 6;
@@ -2086,7 +2086,7 @@ res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
d = (struct bindata *) reswr_alloc (sizeof *d);
d->length = 52;
- d->data = (unsigned char *) reswr_alloc (52);
+ d->data = (unsigned char *) reswr_alloc (d->length);
length += 52;
@@ -2120,7 +2120,7 @@ res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
vid = (struct bindata *) reswr_alloc (sizeof *vid);
vid->length = 6;
- vid->data = (unsigned char *) reswr_alloc (6);
+ vid->data = (unsigned char *) reswr_alloc (vid->length);
length += 6;
vilen = 6;
@@ -2153,7 +2153,7 @@ res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
vsd = (struct bindata *) reswr_alloc (sizeof *vsd);
vsd->length = 6;
- vsd->data = (unsigned char *) reswr_alloc (6);
+ vsd->data = (unsigned char *) reswr_alloc (vsd->length);
length += 6;
vilen += 6;
@@ -2183,7 +2183,7 @@ res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
vssd = (struct bindata *) reswr_alloc (sizeof *vssd);
vssd->length = 6;
- vssd->data = (unsigned char *) reswr_alloc (6);
+ vssd->data = (unsigned char *) reswr_alloc (vssd->length);
length += 6;
vilen += 6;
@@ -2241,7 +2241,7 @@ res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
vvd = (struct bindata *) reswr_alloc (sizeof *vvd);
vvd->length = 6;
- vvd->data = (unsigned char *) reswr_alloc (6);
+ vvd->data = (unsigned char *) reswr_alloc (vvd->length);
length += 6;
vilen += 6;
@@ -2271,7 +2271,7 @@ res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
vvsd = (struct bindata *) reswr_alloc (sizeof *vvsd);
vvsd->length = 4;
- vvsd->data = (unsigned char *) reswr_alloc (4);
+ vvsd->data = (unsigned char *) reswr_alloc (vvsd->length);
length += 4;
vilen += 4;
diff --git a/contrib/binutils/binutils/rescoff.c b/contrib/binutils/binutils/rescoff.c
index 60122ded0f20..fdd9aad9982e 100644
--- a/contrib/binutils/binutils/rescoff.c
+++ b/contrib/binutils/binutils/rescoff.c
@@ -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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file contains function that read and write Windows resources
in COFF files. */
diff --git a/contrib/binutils/binutils/resrc.c b/contrib/binutils/binutils/resrc.c
index c290a9d0c04d..73b482cd04ab 100644
--- a/contrib/binutils/binutils/resrc.c
+++ b/contrib/binutils/binutils/resrc.c
@@ -1,5 +1,6 @@
/* resrc.c -- read and write Windows rc files.
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -16,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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file contains functions that read and write Windows rc files.
These are text files that represent resources. */
@@ -857,7 +858,7 @@ define_font (struct res_id id, const struct res_res_info *resinfo,
e = open_file_search (filename, FOPEN_RB, "font file", &real_filename);
if (stat (real_filename, &s) < 0)
- fatal (_("stat failed on bitmap file `%s': %s"), real_filename,
+ fatal (_("stat failed on font file `%s': %s"), real_filename,
strerror (errno));
data = (unsigned char *) res_alloc (s.st_size);
@@ -1249,12 +1250,45 @@ define_user_data (struct res_id id, struct res_id type,
ids[2].named = 0;
ids[2].u.id = resinfo->language;
- r = define_resource (&resources, 3, ids, 0);
+ r = define_resource (& resources, 3, ids, 0);
r->type = RES_TYPE_USERDATA;
r->u.userdata = data;
r->res_info = *resinfo;
}
+void
+define_rcdata_file (struct res_id id, const struct res_res_info *resinfo,
+ const char *filename)
+{
+ struct rcdata_item *ri;
+ FILE *e;
+ char *real_filename;
+ struct stat s;
+ unsigned char *data;
+
+ e = open_file_search (filename, FOPEN_RB, "file", &real_filename);
+
+
+ if (stat (real_filename, &s) < 0)
+ fatal (_("stat failed on file `%s': %s"), real_filename,
+ strerror (errno));
+
+ data = (unsigned char *) 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->next = NULL;
+ ri->type = RCDATA_BUFFER;
+ ri->u.buffer.length = s.st_size;
+ ri->u.buffer.data = data;
+
+ define_rcdata (id, resinfo, ri);
+}
+
/* Define a user data resource where the data is in a file. */
void
@@ -1268,10 +1302,10 @@ define_user_file (struct res_id id, struct res_id type,
struct res_id ids[3];
struct res_resource *r;
- e = open_file_search (filename, FOPEN_RB, "font file", &real_filename);
+ e = open_file_search (filename, FOPEN_RB, "file", &real_filename);
if (stat (real_filename, &s) < 0)
- fatal (_("stat failed on bitmap file `%s': %s"), real_filename,
+ fatal (_("stat failed on file `%s': %s"), real_filename,
strerror (errno));
data = (unsigned char *) res_alloc (s.st_size);
diff --git a/contrib/binutils/binutils/resres.c b/contrib/binutils/binutils/resres.c
index ed2714db0050..1489d5eeda49 100644
--- a/contrib/binutils/binutils/resres.c
+++ b/contrib/binutils/binutils/resres.c
@@ -1,5 +1,5 @@
/* resres.c: read_res_file and write_res_file implementation for windres.
- Copyright 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
Written by Anders Norlander <anorland@hem2.passagen.se>.
This file is part of GNU Binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* FIXME: This file does not work correctly in a cross configuration.
It assumes that it can use fread and fwrite to read and write
@@ -408,7 +408,7 @@ write_res_data (data, size, count)
size_t size;
int count;
{
- if (fwrite (data, size, count, fres) != (size_t) count)
+ if ((size_t) fwrite (data, size, count, fres) != (size_t) count)
fatal ("%s: could not write to file", filename);
}
diff --git a/contrib/binutils/binutils/size.c b/contrib/binutils/binutils/size.c
index 98754934a98b..b78cba02ba04 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 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Extensions/incompatibilities:
o - BSD output has filenames at the end.
@@ -45,7 +45,9 @@ enum
}
radix = decimal;
-int berkeley_format = BSD_DEFAULT; /* 0 means use AT&T-style output. */
+/* 0 means use AT&T-style output. */
+static int berkeley_format = BSD_DEFAULT;
+
int show_version = 0;
int show_help = 0;
int show_totals = 0;
@@ -66,9 +68,6 @@ static void display_file (char *);
static void display_bfd (bfd *);
static void display_archive (bfd *);
static int size_number (bfd_size_type);
-#if 0
-static void lprint_number (int, bfd_size_type);
-#endif
static void rprint_number (int, bfd_size_type);
static void print_berkeley_format (bfd *);
static void sysv_internal_sizer (bfd *, asection *, void *);
@@ -88,6 +87,7 @@ usage (FILE *stream, int status)
-o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex\n\
-t --totals Display the total sizes (Berkeley only)\n\
--target=<bfdname> Set the binary file format\n\
+ @<file> Read options from <file>\n\
-h --help Display this information\n\
-v --version Display the program's version\n\
\n"),
@@ -103,7 +103,7 @@ usage (FILE *stream, int status)
exit (status);
}
-struct option long_options[] =
+static struct option long_options[] =
{
{"format", required_argument, 0, 200},
{"radix", required_argument, 0, 201},
@@ -134,6 +134,8 @@ main (int argc, char **argv)
program_name = *argv;
xmalloc_set_program_name (program_name);
+ expandargv (&argc, &argv);
+
bfd_init ();
set_default_bfd_target ();
@@ -382,25 +384,6 @@ size_number (bfd_size_type num)
return strlen (buffer);
}
-#if 0
-
-/* This is not used. */
-
-static void
-lprint_number (int width, bfd_size_type num)
-{
- char buffer[40];
-
- sprintf (buffer,
- (radix == decimal ? "%lu" :
- ((radix == octal) ? "0%lo" : "0x%lx")),
- (unsigned long) num);
-
- printf ("%-*s", width, buffer);
-}
-
-#endif
-
static void
rprint_number (int width, bfd_size_type num)
{
@@ -429,7 +412,7 @@ berkeley_sum (bfd *abfd ATTRIBUTE_UNUSED, sec_ptr sec,
if ((flags & SEC_ALLOC) == 0)
return;
- size = bfd_get_section_size_before_reloc (sec);
+ size = bfd_get_section_size (sec);
if ((flags & SEC_CODE) != 0 || (flags & SEC_READONLY) != 0)
textsize += size;
else if ((flags & SEC_HAS_CONTENTS) != 0)
@@ -451,14 +434,8 @@ print_berkeley_format (bfd *abfd)
bfd_map_over_sections (abfd, berkeley_sum, NULL);
if (files_seen++ == 0)
-#if 0
- /* Intel doesn't like bss/stk because they don't have core files. */
- puts ((radix == octal) ? " text\t data\tbss/stk\t oct\t hex\tfilename" :
- " text\t data\tbss/stk\t dec\t hex\tfilename");
-#else
puts ((radix == octal) ? " text\t data\t bss\t oct\t hex\tfilename" :
" text\t data\t bss\t dec\t hex\tfilename");
-#endif
total = textsize + datasize + bsssize;
diff --git a/contrib/binutils/binutils/srconv.c b/contrib/binutils/binutils/srconv.c
index 0ffa0588347c..d1f3efdb9e01 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
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Written by Steve Chamberlain (sac@cygnus.com)
@@ -46,11 +46,11 @@ static int get_member_id (int);
static int get_ordinary_id (int);
static char *section_translate (char *);
static char *strip_suffix (char *);
-static void checksum (FILE *, char *, int, int);
-static void writeINT (int, char *, int *, int, FILE *);
-static void writeBITS (int, char *, int *, int);
-static void writeBARRAY (barray, char *, int *, int, FILE *);
-static void writeCHARS (char *, char *, int *, int, FILE *);
+static void checksum (FILE *, unsigned char *, int, int);
+static void writeINT (int, unsigned char *, int *, int, FILE *);
+static void writeBITS (int, unsigned char *, int *, int);
+static void writeBARRAY (barray, unsigned char *, int *, int, FILE *);
+static void writeCHARS (char *, unsigned char *, int *, int, FILE *);
static void wr_tr (void);
static void wr_un (struct coff_ofile *, struct coff_sfile *, int, int);
static void wr_hd (struct coff_ofile *);
@@ -158,7 +158,7 @@ strip_suffix (char *name)
/* IT LEN stuff CS */
static void
-checksum (FILE *file, char *ptr, int size, int code)
+checksum (FILE *file, unsigned char *ptr, int size, int code)
{
int j;
int last;
@@ -181,7 +181,7 @@ checksum (FILE *file, char *ptr, int size, int code)
static void
-writeINT (int n, char *ptr, int *idx, int size, FILE *file)
+writeINT (int n, unsigned char *ptr, int *idx, int size, FILE *file)
{
int byte = *idx / 8;
@@ -222,7 +222,7 @@ writeINT (int n, char *ptr, int *idx, int size, FILE *file)
}
static void
-writeBITS (int val, char *ptr, int *idx, int size)
+writeBITS (int val, unsigned char *ptr, int *idx, int size)
{
int byte = *idx / 8;
int bit = *idx % 8;
@@ -239,8 +239,8 @@ writeBITS (int val, char *ptr, int *idx, int size)
}
static void
-writeBARRAY (barray data, char *ptr, int *idx, int size ATTRIBUTE_UNUSED,
- FILE *file)
+writeBARRAY (barray data, unsigned char *ptr, int *idx,
+ int size ATTRIBUTE_UNUSED, FILE *file)
{
int i;
@@ -250,7 +250,7 @@ writeBARRAY (barray data, char *ptr, int *idx, int size ATTRIBUTE_UNUSED,
}
static void
-writeCHARS (char *string, char *ptr, int *idx, int size, FILE *file)
+writeCHARS (char *string, unsigned char *ptr, int *idx, int size, FILE *file)
{
int i = *idx / 8;
@@ -317,12 +317,8 @@ wr_un (struct coff_ofile *ptr, struct coff_sfile *sfile, int first,
un.format = FORMAT_OM;
un.spare1 = 0;
-#if 1
- un.nsections = ptr->nsections - 1; /* Don't count the abs section. */
-#else
- /*NEW - only count sections with size. */
- un.nsections = nsecs;
-#endif
+ /* Don't count the abs section. */
+ un.nsections = ptr->nsections - 1;
un.nextdefs = 0;
un.nextrefs = 0;
@@ -456,14 +452,14 @@ wr_ob (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_section *section)
unsigned char stuff[200];
i = 0;
- while (i < section->bfd_section->_raw_size)
+ while (i < bfd_get_section_size (section->bfd_section))
{
struct IT_ob ob;
int todo = 200; /* Copy in 200 byte lumps. */
ob.spare = 0;
- if (i + todo > section->bfd_section->_raw_size)
- todo = section->bfd_section->_raw_size - i;
+ if (i + todo > bfd_get_section_size (section->bfd_section))
+ todo = bfd_get_section_size (section->bfd_section) - i;
if (first)
{
@@ -1208,11 +1204,6 @@ wr_du (struct coff_ofile *p, struct coff_sfile *sfile, int n)
{
struct IT_du du;
int lim;
-#if 0
- struct coff_symbol *symbol;
- static int incit = 0x500000;
- int used = 0;
-#endif
int i;
int j;
unsigned int *lowest = (unsigned *) nints (p->nsections);
@@ -1234,47 +1225,6 @@ wr_du (struct coff_ofile *p, struct coff_sfile *sfile, int n)
highest[i] = 0;
}
- /* Look through all the symbols and try and work out the extents in this
- source file. */
-#if 0
- for (symbol = sfile->scope->vars_head;
- symbol;
- symbol = symbol->next)
- {
- if (symbol->type->type == coff_secdef_type)
- {
- unsigned int low = symbol->where->offset;
- unsigned int high = symbol->where->offset + symbol->type->size - 1;
- struct coff_section *section = symbol->where->section;
-
- int sn = section->number;
- if (low < lowest[sn])
- lowest[sn] = low;
- if (high > highest[sn])
- highest[sn] = high;
- }
- }
-
- for (i = 0; i < du.sections; i++)
- {
- if (highest[i] == 0)
- lowest[i] = highest[i] = incit;
-
- du.san[used] = i;
- du.length[used] = highest[i] - lowest[i];
- du.address[used] = bfd_get_file_flags (abfd) & EXEC_P ? lowest[i] : 0;
-
- if (debug)
- {
- printf (" section %6s 0x%08x..0x%08x\n",
- p->sections[i + 1].name,
- lowest[i],
- highest[i]);
- }
- used++;
- }
-#endif
-
lim = du.sections;
for (j = 0; j < lim; j++)
{
@@ -1328,22 +1278,8 @@ wr_dus (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_sfile *sfile)
dus.spare = nints (dus.ns);
dus.ndir = 0;
/* Find the filenames. */
-#if 0
- i = 0;
-
- for (sfile = p->source_head;
- sfile;
- sfile = sfile->next)
- {
- dus.drb[i] = 0;
- dus.spare[i] = 0;
- dus.fname[i] = sfile->name;
- i++;
- }
-#else
dus.drb[0] = 0;
dus.fname[0] = sfile->name;
-#endif
sysroff_swap_dus_out (file, &dus);
@@ -1362,69 +1298,6 @@ static void
wr_dln (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_sfile *sfile,
int n ATTRIBUTE_UNUSED)
{
-#if 0
- if (n == 0)
- {
- /* Count up all the linenumbers */
- struct coff_symbol *sy;
- int lc = 0;
- struct IT_dln dln;
-
- int idx;
-
- for (sy = p->symbol_list_head;
- sy;
- sy = sy->next_in_ofile_list)
- {
- struct coff_type *t = sy->type;
- if (t->type == coff_function_type)
- {
- struct coff_line *l = t->u.function.lines;
- lc += l->nlines;
- }
- }
-
- dln.sfn = nints (lc);
- dln.sln = nints (lc);
- dln.lln = nints (lc);
- dln.section = nints (lc);
-
- dln.from_address = nints (lc);
- dln.to_address = nints (lc);
-
-
- dln.neg = 0x1001;
-
- dln.nln = lc;
-
- /* Run through once more and fill up the structure */
- idx = 0;
- for (sy = p->symbol_list_head;
- sy;
- sy = sy->next_in_ofile_list)
- {
- if (sy->type->type == coff_function_type)
- {
- int i;
- struct coff_line *l = sy->type->u.function.lines;
- for (i = 0; i < l->nlines; i++)
- {
- dln.section[idx] = sy->where->section->number;
- dln.sfn[idx] = n;
- dln.sln[idx] = l->lines[i];
- dln.from_address[idx] = l->addresses[i];
- if (idx)
- dln.to_address[idx - 1] = dln.from_address[idx];
- idx++;
- }
- }
- n++;
- }
- sysroff_swap_dln_out (file, &dln);
- }
-
-#endif
-#if 1
/* Count up all the linenumbers */
struct coff_symbol *sy;
@@ -1491,7 +1364,6 @@ wr_dln (struct coff_ofile *p ATTRIBUTE_UNUSED, struct coff_sfile *sfile,
}
if (lc)
sysroff_swap_dln_out (file, &dln);
-#endif
}
/* Write the global symbols out to the debug info. */
@@ -1692,16 +1564,9 @@ wr_sc (struct coff_ofile *ptr, struct coff_sfile *sfile)
{
sc.contents = CONTENTS_CODE;
}
-#if 0
- /* NEW */
- if (sc.length)
- {
-#endif
- sysroff_swap_sc_out (file, &sc);
- scount++;
-#if 0
- }
-#endif
+
+ sysroff_swap_sc_out (file, &sc);
+ scount++;
}
return scount;
}
@@ -1856,9 +1721,10 @@ show_usage (FILE *file, int status)
fprintf (file, _("Usage: %s [option(s)] in-file [out-file]\n"), program_name);
fprintf (file, _("Convert a COFF object file into a SYSROFF object file\n"));
fprintf (file, _(" The options are:\n\
- -q --quick (Obsolete - ignoerd)\n\
+ -q --quick (Obsolete - ignored)\n\
-n --noprescan Do not perform a scan to convert commons into defs\n\
-d --debug Display information about what is being done\n\
+ @<file> Read options from <file>\n\
-h --help Display this information\n\
-v --version Print the program's version number\n"));
@@ -1896,6 +1762,8 @@ main (int ac, char **av)
program_name = av[0];
xmalloc_set_program_name (program_name);
+ expandargv (&ac, &av);
+
while ((opt = getopt_long (ac, av, "dHhVvqn", long_options,
(int *) NULL))
!= EOF)
diff --git a/contrib/binutils/binutils/stabs.c b/contrib/binutils/binutils/stabs.c
index 7af10ef54fae..879a3e2c7a70 100644
--- a/contrib/binutils/binutils/stabs.c
+++ b/contrib/binutils/binutils/stabs.c
@@ -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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file contains code which parses stabs debugging information.
The organization of this code is based on the gdb stabs reading
@@ -203,6 +203,8 @@ static debug_type *stab_demangle_argtypes
(void *, struct stab_handle *, const char *, bfd_boolean *, unsigned int);
static debug_type *stab_demangle_v3_argtypes
(void *, struct stab_handle *, const char *, bfd_boolean *);
+static debug_type *stab_demangle_v3_arglist
+ (void *, struct stab_handle *, struct demangle_component *, bfd_boolean *);
static debug_type stab_demangle_v3_arg
(void *, struct stab_handle *, struct demangle_component *, debug_type,
bfd_boolean *);
@@ -4319,7 +4321,8 @@ stab_demangle_template (struct stab_demangle_info *minfo, const char **pp,
{
unsigned int len;
- if (! stab_demangle_get_count (pp, &len))
+ len = stab_demangle_count (pp);
+ if (len == 0)
{
stab_bad_demangle (orig);
return FALSE;
@@ -5073,7 +5076,6 @@ stab_demangle_v3_argtypes (void *dhandle, struct stab_handle *info,
{
struct demangle_component *dc;
void *mem;
- unsigned int alloc, count;
debug_type *pargs;
dc = cplus_demangle_v3_components (physname, DMGL_PARAMS | DMGL_ANSI, &mem);
@@ -5093,13 +5095,35 @@ stab_demangle_v3_argtypes (void *dhandle, struct stab_handle *info,
return NULL;
}
+ pargs = stab_demangle_v3_arglist (dhandle, info,
+ dc->u.s_binary.right->u.s_binary.right,
+ pvarargs);
+
+ free (mem);
+
+ return pargs;
+}
+
+/* Demangle an argument list in a struct demangle_component tree.
+ Returns a DEBUG_TYPE_NULL terminated array of argument types, and
+ sets *PVARARGS to indicate whether this is a varargs function. */
+
+static debug_type *
+stab_demangle_v3_arglist (void *dhandle, struct stab_handle *info,
+ struct demangle_component *arglist,
+ bfd_boolean *pvarargs)
+{
+ struct demangle_component *dc;
+ unsigned int alloc, count;
+ debug_type *pargs;
+
alloc = 10;
pargs = (debug_type *) xmalloc (alloc * sizeof *pargs);
*pvarargs = FALSE;
count = 0;
- for (dc = dc->u.s_binary.right->u.s_binary.right;
+ for (dc = arglist;
dc != NULL;
dc = dc->u.s_binary.right)
{
@@ -5108,8 +5132,8 @@ stab_demangle_v3_argtypes (void *dhandle, struct stab_handle *info,
if (dc->type != DEMANGLE_COMPONENT_ARGLIST)
{
- fprintf (stderr, _("Unexpected type in demangle tree\n"));
- free (mem);
+ fprintf (stderr, _("Unexpected type in v3 arglist demangling\n"));
+ free (pargs);
return NULL;
}
@@ -5122,7 +5146,7 @@ stab_demangle_v3_argtypes (void *dhandle, struct stab_handle *info,
*pvarargs = TRUE;
continue;
}
- free (mem);
+ free (pargs);
return NULL;
}
@@ -5138,8 +5162,6 @@ stab_demangle_v3_argtypes (void *dhandle, struct stab_handle *info,
pargs[count] = DEBUG_TYPE_NULL;
- free (mem);
-
return pargs;
}
@@ -5173,12 +5195,12 @@ stab_demangle_v3_arg (void *dhandle, struct stab_handle *info,
case DEMANGLE_COMPONENT_COMPLEX:
case DEMANGLE_COMPONENT_IMAGINARY:
case DEMANGLE_COMPONENT_VENDOR_TYPE:
- case DEMANGLE_COMPONENT_FUNCTION_TYPE:
case DEMANGLE_COMPONENT_ARRAY_TYPE:
case DEMANGLE_COMPONENT_PTRMEM_TYPE:
case DEMANGLE_COMPONENT_ARGLIST:
default:
- fprintf (stderr, _("Unrecognized demangle component\n"));
+ fprintf (stderr, _("Unrecognized demangle component %d\n"),
+ (int) dc->type);
return NULL;
case DEMANGLE_COMPONENT_NAME:
@@ -5269,6 +5291,34 @@ stab_demangle_v3_arg (void *dhandle, struct stab_handle *info,
return debug_make_reference_type (dhandle, dt);
}
+ case DEMANGLE_COMPONENT_FUNCTION_TYPE:
+ {
+ debug_type *pargs;
+ bfd_boolean varargs;
+
+ if (dc->u.s_binary.left == NULL)
+ {
+ /* In this case the return type is actually unknown.
+ However, I'm not sure this will ever arise in practice;
+ normally an unknown return type would only appear at
+ the top level, which is handled above. */
+ dt = debug_make_void_type (dhandle);
+ }
+ else
+ dt = stab_demangle_v3_arg (dhandle, info, dc->u.s_binary.left, NULL,
+ NULL);
+ if (dt == NULL)
+ return NULL;
+
+ pargs = stab_demangle_v3_arglist (dhandle, info,
+ dc->u.s_binary.right,
+ &varargs);
+ if (pargs == NULL)
+ return NULL;
+
+ return debug_make_function_type (dhandle, dt, pargs, varargs);
+ }
+
case DEMANGLE_COMPONENT_BUILTIN_TYPE:
{
char *p;
diff --git a/contrib/binutils/binutils/strings.c b/contrib/binutils/binutils/strings.c
index 68c244cafbd8..a04cb581eaea 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 Free Software Foundation, Inc.
+ 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
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Usage: strings [options] file...
@@ -67,6 +67,7 @@
#include "bucomm.h"
#include "libiberty.h"
#include "safe-ctype.h"
+#include <sys/stat.h>
/* Some platforms need to put stdin into binary mode, to read
binary files. */
@@ -104,6 +105,13 @@ typedef off64_t file_off;
typedef off_t file_off;
#define file_open(s,m) fopen(s, m)
#endif
+#ifdef HAVE_STAT64
+typedef struct stat64 statbuf;
+#define file_stat(f,s) stat64(f, s)
+#else
+typedef struct stat statbuf;
+#define file_stat(f,s) stat(f, s)
+#endif
/* Radix for printing addresses (must be 8, 10 or 16). */
static int address_radix;
@@ -143,6 +151,15 @@ static struct option long_options[] =
{NULL, 0, NULL, 0}
};
+/* Records the size of a named file so that we
+ do not repeatedly run bfd_stat() on it. */
+
+typedef struct
+{
+ const char * filename;
+ bfd_size_type filesize;
+} filename_and_size_t;
+
static void strings_a_section (bfd *, asection *, void *);
static bfd_boolean strings_object_file (const char *);
static bfd_boolean strings_file (char *file);
@@ -168,6 +185,9 @@ main (int argc, char **argv)
program_name = argv[0];
xmalloc_set_program_name (program_name);
+
+ expandargv (&argc, &argv);
+
string_min = -1;
print_addresses = FALSE;
print_filenames = FALSE;
@@ -306,27 +326,62 @@ main (int argc, char **argv)
return (exit_status);
}
-/* Scan section SECT of the file ABFD, whose printable name is FILE.
- If it contains initialized data,
- set `got_a_section' and print the strings in it. */
+/* Scan section SECT of the file ABFD, whose printable name is in
+ ARG->filename and whose size might be in ARG->filesize. If it
+ contains initialized data set `got_a_section' and print the
+ strings in it.
+
+ FIXME: We ought to be able to return error codes/messages for
+ certain conditions. */
static void
-strings_a_section (bfd *abfd, asection *sect, void *filearg)
+strings_a_section (bfd *abfd, asection *sect, void *arg)
{
- const char *file = (const char *) filearg;
+ filename_and_size_t * filename_and_sizep;
+ bfd_size_type *filesizep;
+ bfd_size_type sectsize;
+ void *mem;
+
+ if ((sect->flags & DATA_FLAGS) != DATA_FLAGS)
+ return;
+
+ sectsize = bfd_get_section_size (sect);
+
+ if (sectsize <= 0)
+ return;
+
+ /* Get the size of the file. This might have been cached for us. */
+ filename_and_sizep = (filename_and_size_t *) arg;
+ filesizep = & filename_and_sizep->filesize;
+
+ if (*filesizep == 0)
+ {
+ struct stat st;
+
+ if (bfd_stat (abfd, &st))
+ return;
+
+ /* Cache the result so that we do not repeatedly stat this file. */
+ *filesizep = st.st_size;
+ }
+
+ /* Compare the size of the section against the size of the file.
+ If the section is bigger then the file must be corrupt and
+ we should not try dumping it. */
+ if (sectsize >= *filesizep)
+ return;
+
+ mem = xmalloc (sectsize);
- if ((sect->flags & DATA_FLAGS) == DATA_FLAGS)
+ if (bfd_get_section_contents (abfd, sect, mem, (file_ptr) 0, sectsize))
{
- bfd_size_type sz = bfd_get_section_size_before_reloc (sect);
- void *mem = xmalloc (sz);
+ got_a_section = TRUE;
- if (bfd_get_section_contents (abfd, sect, mem, (file_ptr) 0, sz))
- {
- got_a_section = TRUE;
- print_strings (file, (FILE *) NULL, sect->filepos, 0, sz, mem);
- }
- free (mem);
+ print_strings (filename_and_sizep->filename, NULL, sect->filepos,
+ 0, sectsize, mem);
}
+
+ free (mem);
}
/* Scan all of the sections in FILE, and print the strings
@@ -338,7 +393,10 @@ strings_a_section (bfd *abfd, asection *sect, void *filearg)
static bfd_boolean
strings_object_file (const char *file)
{
- bfd *abfd = bfd_openr (file, target);
+ filename_and_size_t filename_and_size;
+ bfd *abfd;
+
+ abfd = bfd_openr (file, target);
if (abfd == NULL)
/* Treat the file as a non-object file. */
@@ -354,7 +412,9 @@ strings_object_file (const char *file)
}
got_a_section = FALSE;
- bfd_map_over_sections (abfd, strings_a_section, (void *) file);
+ filename_and_size.filename = file;
+ filename_and_size.filesize = 0;
+ bfd_map_over_sections (abfd, strings_a_section, & filename_and_size);
if (!bfd_close (abfd))
{
@@ -370,8 +430,17 @@ strings_object_file (const char *file)
static bfd_boolean
strings_file (char *file)
{
- if (get_file_size (file) < 1)
- return FALSE;
+ statbuf st;
+
+ if (file_stat (file, &st) < 0)
+ {
+ if (errno == ENOENT)
+ non_fatal (_("'%s': No such file"), file);
+ else
+ non_fatal (_("Warning: could not locate '%s'. reason: %s"),
+ file, strerror (errno));
+ return FALSE;
+ }
/* If we weren't told to scan the whole file,
try to open it as an object file and only look at
@@ -430,7 +499,12 @@ get_char (FILE *stream, file_off *address, int *magiccount, char **magic)
{
if (stream == NULL)
return EOF;
-#ifdef HAVE_GETC_UNLOCKED
+
+ /* Only use getc_unlocked if we found a declaration for it.
+ Otherwise, libc is not thread safe by default, and we
+ should not use it. */
+
+#if defined(HAVE_GETC_UNLOCKED) && HAVE_DECL_GETC_UNLOCKED
c = getc_unlocked (stream);
#else
c = getc (stream);
@@ -512,7 +586,7 @@ print_strings (const char *filename, FILE *stream, file_off address,
}
/* We found a run of `string_min' graphic characters. Print up
- to the next non-graphic character. */
+ to the next non-graphic character. */
if (print_filenames)
printf ("%s: ", filename);
@@ -557,7 +631,8 @@ print_strings (const char *filename, FILE *stream, file_off address,
#else
# if !BFD_HOST_64BIT_LONG
if (start != (unsigned long) start)
- printf ("%lx%8.8lx ", start >> 32, start & 0xffffffff);
+ printf ("%lx%8.8lx ", (unsigned long) (start >> 32),
+ (unsigned long) (start & 0xffffffff));
else
# endif
#endif
@@ -637,11 +712,12 @@ usage (FILE *stream, int status)
-f --print-file-name Print the name of the file before each string\n\
-n --bytes=[number] Locate & print any NUL-terminated sequence of at\n\
-<number> least [number] characters (default 4).\n\
- -t --radix={o,x,d} Print the location of the string in base 8, 10 or 16\n\
+ -t --radix={o,d,x} Print the location of the string in base 8, 10 or 16\n\
-o An alias for --radix=o\n\
-T --target=<BFDNAME> Specify the binary file format\n\
-e --encoding={s,S,b,l,B,L} Select character size and endianness:\n\
s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} = 32-bit\n\
+ @<file> Read options from <file>\n\
-h --help Display this information\n\
-v --version Print the program's version number\n"));
list_supported_targets (program_name, stream);
diff --git a/contrib/binutils/binutils/sysdump.c b/contrib/binutils/binutils/sysdump.c
index a1df1e05b7aa..ec19472558fd 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
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Written by Steve Chamberlain <sac@cygnus.com>.
@@ -54,16 +54,9 @@ static void derived_type (void);
static void module (void);
static void show_usage (FILE *, int);
-extern char *getCHARS (unsigned char *, int *, int, int);
-extern int fillup (char *);
-extern barray getBARRAY (unsigned char *, int *, int, int);
-extern int getINT (unsigned char *, int *, int, int);
-extern int getBITS (char *, int *, int, int);
-extern void sysroff_swap_tr_in (void);
-extern void sysroff_print_tr_out (void);
extern int main (int, char **);
-char *
+static char *
getCHARS (unsigned char *ptr, int *idx, int size, int max)
{
int oc = *idx / 8;
@@ -120,8 +113,8 @@ dh (unsigned char *ptr, int size)
}
}
-int
-fillup (char *ptr)
+static int
+fillup (unsigned char *ptr)
{
int size;
int sum;
@@ -143,7 +136,7 @@ fillup (char *ptr)
return size - 1;
}
-barray
+static barray
getBARRAY (unsigned char *ptr, int *idx, int dsize ATTRIBUTE_UNUSED,
int max ATTRIBUTE_UNUSED)
{
@@ -161,7 +154,7 @@ getBARRAY (unsigned char *ptr, int *idx, int dsize ATTRIBUTE_UNUSED,
return res;
}
-int
+static int
getINT (unsigned char *ptr, int *idx, int size, int max)
{
int n = 0;
@@ -197,8 +190,8 @@ getINT (unsigned char *ptr, int *idx, int size, int max)
return n;
}
-int
-getBITS (char *ptr, int *idx, int size, int max)
+static int
+getBITS (unsigned char *ptr, int *idx, int size, int max)
{
int byte = *idx / 8;
int bit = *idx % 8;
@@ -262,16 +255,16 @@ pbarray (barray *y)
#define IT_tr_CODE 0x7f
-void
+static void
sysroff_swap_tr_in (void)
{
- char raw[255];
+ unsigned char raw[255];
memset (raw, 0, 255);
fillup (raw);
}
-void
+static void
sysroff_print_tr_out (void)
{
itheader ("tr", IT_tr_CODE);
@@ -515,48 +508,6 @@ opt (int x)
return getone (x);
}
-#if 0
-
-/* This is no longer used. */
-
-static void
-unit_info_list (void)
-{
- while (opt (IT_un_CODE))
- {
- getone (IT_us_CODE);
-
- while (getone (IT_sc_CODE))
- getone (IT_ss_CODE);
-
- while (getone (IT_er_CODE))
- ;
-
- while (getone (IT_ed_CODE))
- ;
- }
-}
-
-#endif
-
-#if 0
-
-/* This is no longer used. */
-
-static void
-object_body_list (void)
-{
- while (getone (IT_sh_CODE))
- {
- while (getone (IT_ob_CODE))
- ;
- while (getone (IT_rl_CODE))
- ;
- }
-}
-
-#endif
-
static void
must (int x)
{
@@ -649,45 +600,6 @@ derived_type (void)
tab (-1, "");
}
-#if 0
-
-/* This is no longer used. */
-
-static void
-program_structure (void)
-{
- tab (1, "PROGRAM STRUCTURE");
- while (opt (IT_dps_CODE))
- {
- must (IT_dso_CODE);
- opt (IT_dss_CODE);
- dump_symbol_info ();
- must (IT_dps_CODE);
- }
- tab (-1, "");
-}
-
-#endif
-
-#if 0
-
-/* This is no longer used. */
-
-static void
-debug_list (void)
-{
- tab (1, "DEBUG LIST");
-
- must (IT_du_CODE);
- opt (IT_dus_CODE);
- program_structure ();
- must (IT_dln_CODE);
-
- tab (-1, "");
-}
-
-#endif
-
static void
module (void)
{
@@ -705,17 +617,6 @@ module (void)
}
while (getone (c) && c != IT_tr_CODE);
-#if 0
- must (IT_cs_CODE);
- must (IT_hd_CODE);
- opt (IT_hs_CODE);
-
- unit_info_list ();
- object_body_list ();
- debug_list ();
-
- must (IT_tr_CODE);
-#endif
tab (-1, "");
c = getc (file);
@@ -772,6 +673,8 @@ main (int ac, char **av)
program_name = av[0];
xmalloc_set_program_name (program_name);
+ expandargv (&ac, &av);
+
while ((opt = getopt_long (ac, av, "HhVv", long_options, (int *) NULL)) != EOF)
{
switch (opt)
diff --git a/contrib/binutils/binutils/sysinfo.y b/contrib/binutils/binutils/sysinfo.y
index bf19263c5d17..a7077480bc4a 100644
--- a/contrib/binutils/binutils/sysinfo.y
+++ b/contrib/binutils/binutils/sysinfo.y
@@ -1,4 +1,4 @@
-/* Copyright 2001, 2003 Free Software Foundation, Inc.
+/* Copyright 2001, 2003, 2005 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
This file is part of GNU binutils.
@@ -15,28 +15,24 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
%{
#include <stdio.h>
#include <stdlib.h>
-extern char *word;
-extern char writecode;
-extern int number;
-extern int unit;
-char nice_name[1000];
-char *it;
-int sofar;
-int width;
-int code;
-char * repeat;
-char *oldrepeat;
-char *name;
-int rdepth;
-char *loop [] = {"","n","m","/*BAD*/"};
-char *names[] = {" ","[n]","[n][m]"};
-char *pnames[]= {"","*","**"};
+static char writecode;
+static char *it;
+static int code;
+static char * repeat;
+static char *oldrepeat;
+static char *name;
+static int rdepth;
+static char *names[] = {" ","[n]","[n][m]"};
+static char *pnames[]= {"","*","**"};
+
+static int yyerror (char *s);
+extern int yylex (void);
%}
@@ -117,7 +113,7 @@ it:
printf("void sysroff_swap_%s_in(ptr)\n",$2);
printf("struct IT_%s *ptr;\n", it);
printf("{\n");
- printf("char raw[255];\n");
+ printf("unsigned char raw[255];\n");
printf("\tint idx = 0 ;\n");
printf("\tint size;\n");
printf("memset(raw,0,255);\n");
@@ -129,7 +125,7 @@ it:
printf("FILE * file;\n");
printf("struct IT_%s *ptr;\n", it);
printf("{\n");
- printf("\tchar raw[255];\n");
+ printf("\tunsigned char raw[255];\n");
printf("\tint idx = 16 ;\n");
printf("\tmemset (raw, 0, 255);\n");
printf("\tcode = IT_%s_CODE;\n", it);
@@ -412,7 +408,6 @@ enum_list:
-c write code to print info in human form */
int yydebug;
-char writecode;
int
main (int ac, char **av)
@@ -431,7 +426,7 @@ if (writecode == 'd')
return 0;
}
-int
+static int
yyerror (char *s)
{
fprintf(stderr, "%s\n" , s);
diff --git a/contrib/binutils/binutils/syslex.l b/contrib/binutils/binutils/syslex.l
index ffaf4fad2d6a..3a9306c40b5a 100644
--- a/contrib/binutils/binutils/syslex.l
+++ b/contrib/binutils/binutils/syslex.l
@@ -1,31 +1,40 @@
%{
-/* Copyright 2001, 2003 Free Software Foundation, Inc.
+/* Copyright 2001, 2003, 2005 Free Software Foundation, Inc.
-This file is part of GLD, the Gnu Linker.
+This file is part of GNU Binutils.
-GLD is free software; you can redistribute it and/or modify
+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.
-GLD is distributed in the hope that it will be useful,
+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 GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
+#include "config.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
#include "sysinfo.h"
-char *word;
-int number;
-int unit;
+
+#define YY_NO_UNPUT
#ifndef yywrap
static int yywrap (void) { return 1; }
#endif
+
+extern int yylex (void);
%}
%%
"(" { return '(';}
@@ -37,9 +46,9 @@ static int yywrap (void) { return 1; }
"\t" { ; }
"\n" { ; }
"\""[^\"]*"\"" {
-yylval.s = malloc(strlen (yytext));
-strcpy(yylval.s, yytext+1);
-yylval.s[strlen(yylval.s)-1] = 0;
+ yylval.s = malloc (yyleng - 1);
+ memcpy (yylval.s, yytext + 1, yyleng - 2);
+ yylval.s[yyleng - 2] = '\0';
return NAME;
}
diff --git a/contrib/binutils/binutils/unwind-ia64.c b/contrib/binutils/binutils/unwind-ia64.c
index 2e7e726e4bfb..c104e72bbc19 100644
--- a/contrib/binutils/binutils/unwind-ia64.c
+++ b/contrib/binutils/binutils/unwind-ia64.c
@@ -1,5 +1,5 @@
/* unwind-ia64.c -- utility routines to dump IA-64 unwind info for readelf.
- Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GNU Binutils.
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "unwind-ia64.h"
#include <stdio.h>
@@ -371,7 +371,7 @@ typedef bfd_vma unw_word;
#define UNW_DEC_SPILL_SPREL(fmt, t, abreg, spoff, arg) \
do \
{ \
- char regname[10]; \
+ char regname[20]; \
\
unw_print_abreg (regname, abreg); \
printf ("\t%s:spill_sprel(reg=%s,t=%lu,spoff=0x%lx)\n", \
@@ -382,7 +382,7 @@ typedef bfd_vma unw_word;
#define UNW_DEC_SPILL_PSPREL(fmt, t, abreg, pspoff, arg) \
do \
{ \
- char regname[10]; \
+ char regname[20]; \
\
unw_print_abreg (regname, abreg); \
printf ("\t%s:spill_psprel(reg=%s,t=%lu,pspoff=0x10-0x%lx)\n", \
@@ -393,7 +393,7 @@ typedef bfd_vma unw_word;
#define UNW_DEC_RESTORE(fmt, t, abreg, arg) \
do \
{ \
- char regname[10]; \
+ char regname[20]; \
\
unw_print_abreg (regname, abreg); \
printf ("\t%s:restore(t=%lu,reg=%s)\n", \
@@ -404,7 +404,7 @@ typedef bfd_vma unw_word;
#define UNW_DEC_SPILL_REG(fmt, t, abreg, x, ytreg, arg) \
do \
{ \
- char abregname[10], tregname[10]; \
+ char abregname[20], tregname[20]; \
\
unw_print_abreg (abregname, abreg); \
unw_print_xyreg (tregname, x, ytreg); \
diff --git a/contrib/binutils/binutils/unwind-ia64.h b/contrib/binutils/binutils/unwind-ia64.h
index 3b6ab2256ed7..c2fb9b93943a 100644
--- a/contrib/binutils/binutils/unwind-ia64.h
+++ b/contrib/binutils/binutils/unwind-ia64.h
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "elf/ia64.h"
#include "ansidecl.h"
diff --git a/contrib/binutils/binutils/version.c b/contrib/binutils/binutils/version.c
index f965619d41aa..2843e69f06b1 100644
--- a/contrib/binutils/binutils/version.c
+++ b/contrib/binutils/binutils/version.c
@@ -1,5 +1,5 @@
/* version.c -- binutils version information
- Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include <stdio.h>
#include "bfd.h"
@@ -32,7 +32,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 2004 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2005 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n"));
diff --git a/contrib/binutils/binutils/wrstabs.c b/contrib/binutils/binutils/wrstabs.c
index 0d301f6a2490..13f01dac725c 100644
--- a/contrib/binutils/binutils/wrstabs.c
+++ b/contrib/binutils/binutils/wrstabs.c
@@ -1,5 +1,5 @@
/* wrstabs.c -- Output stabs debugging information
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file contains code which writes out stabs debugging
information. */
@@ -480,8 +480,10 @@ write_stabs_in_sections_debugging_info (bfd *abfd, void *dhandle,
/* Reserve 1 byte for a null byte. */
info.strings_size = 1;
- if (! bfd_hash_table_init (&info.strhash.table, string_hash_newfunc)
- || ! bfd_hash_table_init (&info.typedef_hash.table, string_hash_newfunc))
+ if (!bfd_hash_table_init (&info.strhash.table, string_hash_newfunc,
+ sizeof (struct string_hash_entry))
+ || !bfd_hash_table_init (&info.typedef_hash.table, string_hash_newfunc,
+ sizeof (struct string_hash_entry)))
{
non_fatal ("bfd_hash_table_init_failed: %s",
bfd_errmsg (bfd_get_error ()));
@@ -1867,7 +1869,7 @@ stab_tag_type (void *p, const char *name, unsigned int id,
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
- unsigned int size;
+ unsigned int size = 0;
index = stab_get_struct_index (info, name, id, kind, &size);
if (index < 0)
diff --git a/contrib/binutils/config-ml.in b/contrib/binutils/config-ml.in
index b2e4ea9cf977..937273173c03 100644
--- a/contrib/binutils/config-ml.in
+++ b/contrib/binutils/config-ml.in
@@ -1,7 +1,7 @@
# Configure fragment invoked in the post-target section for subdirs
# wanting multilib support.
#
-# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
@@ -16,8 +16,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# Foundation, Inc., 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
@@ -546,6 +546,9 @@ multi-do:
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(CFLAGS) $${flags}" \
+ FCFLAGS="$(FCFLAGS) $${flags}" \
+ FFLAGS="$(FFLAGS) $${flags}" \
+ ADAFLAGS="$(ADAFLAGS) $${flags}" \
prefix="$(prefix)" \
exec_prefix="$(exec_prefix)" \
GCJFLAGS="$(GCJFLAGS) $${flags}" \
@@ -777,12 +780,14 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
break
fi
done
- ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"'
+ ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"'
if [ "${with_target_subdir}" = "." ]; then
CC_=$CC' '
CXX_=$CXX' '
+ F77_=$F77' '
GCJ_=$GCJ' '
+ GFORTRAN_=$GFORTRAN' '
else
# Create a regular expression that matches any string as long
# as ML_POPDIR.
@@ -811,6 +816,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
esac
done
+ F77_=
+ for arg in ${F77}; do
+ case $arg in
+ -[BIL]"${ML_POPDIR}"/*)
+ F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ "${ML_POPDIR}"/*)
+ F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ *)
+ F77_="${F77_}${arg} " ;;
+ esac
+ done
+
GCJ_=
for arg in ${GCJ}; do
case $arg in
@@ -823,6 +840,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
esac
done
+ GFORTRAN_=
+ for arg in ${GFORTRAN}; do
+ case $arg in
+ -[BIL]"${ML_POPDIR}"/*)
+ GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ "${ML_POPDIR}"/*)
+ GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ *)
+ GFORTRAN_="${GFORTRAN_}${arg} " ;;
+ esac
+ done
+
if test "x${LD_LIBRARY_PATH+set}" = xset; then
LD_LIBRARY_PATH_=
for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
diff --git a/contrib/binutils/config.guess b/contrib/binutils/config.guess
index 00ccf89e18b7..17690aea3429 100755
--- a/contrib/binutils/config.guess
+++ b/contrib/binutils/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-timestamp='2004-02-16'
+timestamp='2006-01-02'
# 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
@@ -17,13 +17,15 @@ timestamp='2004-02-16'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 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.
+
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
@@ -53,7 +55,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -66,11 +68,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -123,7 +125,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -196,68 +198,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
- exit 0 ;;
- amd64:OpenBSD:*:*)
- echo x86_64-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- cats:OpenBSD:*:*)
- echo arm-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pegasos:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
+ case $UNAME_RELEASE in
+ *4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
@@ -295,45 +261,49 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
+ # A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
- Alpha*:OpenVMS:*:*)
- echo alpha-hp-vms
- exit 0 ;;
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
- exit 0 ;;
+ exit ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
- exit 0 ;;
+ exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
- exit 0;;
+ exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
+ exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
- exit 0 ;;
+ exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
- exit 0 ;;
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
- exit 0 ;;
+ exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
- exit 0;;
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
- exit 0;;
+ exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -341,32 +311,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
else
echo pyramid-pyramid-bsd
fi
- exit 0 ;;
+ exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
- exit 0 ;;
+ exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
- exit 0 ;;
- DRS?6000:UNIX_SV:4.2*:7*)
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7 && exit 0 ;;
+ sparc) echo sparc-icl-nx7; exit ;;
esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
@@ -375,10 +345,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit 0 ;;
+ exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -390,10 +360,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
- exit 0 ;;
+ exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -404,40 +374,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
- exit 0 ;;
+ exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -461,32 +431,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c \
- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && exit 0
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
- exit 0 ;;
+ exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
- exit 0 ;;
+ exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
- exit 0 ;;
+ exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
- exit 0 ;;
+ exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -502,29 +473,29 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
- exit 0 ;;
+ exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
- exit 0 ;;
+ exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
- exit 0 ;;
+ exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit 0 ;;
+ exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
- exit 0 ;;
+ exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
@@ -532,7 +503,7 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
@@ -547,14 +518,18 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
- echo rs6000-ibm-aix3.2.5
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
- exit 0 ;;
+ exit ;;
*:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
@@ -568,28 +543,28 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
- exit 0 ;;
+ exit ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
- exit 0 ;;
+ exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
+ exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
- exit 0 ;;
+ exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
- exit 0 ;;
+ exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
- exit 0 ;;
+ exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
- exit 0 ;;
+ exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
@@ -651,9 +626,19 @@ EOF
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
- # avoid double evaluation of $set_cc_for_build
- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
@@ -661,11 +646,11 @@ EOF
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -693,163 +678,171 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
- exit 0 ;;
+ exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
- exit 0 ;;
+ exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
- exit 0 ;;
+ exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
- exit 0 ;;
+ exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
- exit 0 ;;
+ exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
- exit 0 ;;
+ exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
- exit 0 ;;
+ exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
- exit 0 ;;
+ exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
*:UNICOS/mp:*:*)
- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:FreeBSD:*:*)
- # Determine whether the default compiler uses glibc.
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #if __GLIBC__ >= 2
- LIBC=gnu
- #else
- LIBC=
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
- # FreeBSD's kernel, but not the complete OS.
- case ${LIBC} in gnu) kernel_only='k' ;; esac
- echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
- exit 0 ;;
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
- exit 0 ;;
+ exit ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
- exit 0 ;;
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
- x86:Interix*:[34]*)
+ exit ;;
+ x86:Interix*:[345]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit 0 ;;
+ exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
- exit 0 ;;
+ exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i586-pc-interix
- exit 0 ;;
+ exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
- exit 0 ;;
+ exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
+ exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit 0 ;;
+ exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
+ exit ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
- exit 0 ;;
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -866,8 +859,8 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ 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:*:*)
eval $set_cc_for_build
@@ -885,15 +878,18 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ 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:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -907,7 +903,7 @@ EOF
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
+ exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -915,25 +911,28 @@ EOF
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
- exit 0 ;;
+ exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
+ exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
- exit 0 ;;
+ 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
@@ -951,15 +950,15 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
+ exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
+ exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit 0 ;;
+ exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
@@ -976,7 +975,7 @@ EOF
LIBC=gnulibc1
# endif
#else
- #ifdef __INTEL_COMPILER
+ #if defined(__INTEL_COMPILER) || defined(__PGI)
LIBC=gnu
#else
LIBC=gnuaout
@@ -986,16 +985,19 @@ EOF
LIBC=dietlibc
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ 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
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
- exit 0 ;;
+ exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
@@ -1003,27 +1005,27 @@ EOF
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit 0 ;;
+ exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
+ exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
+ exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
- i*86:syllable:*:*)
+ exit ;;
+ i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
- exit 0 ;;
+ exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
+ exit ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -1031,15 +1033,16 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
- exit 0 ;;
- i*86:*:5:[78]*)
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit 0 ;;
+ exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1057,73 +1060,73 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
- exit 0 ;;
+ exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
- exit 0 ;;
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
- exit 0 ;;
+ exit ;;
paragon:*:*:*)
echo i860-intel-osf1
- exit 0 ;;
+ exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
- exit 0 ;;
+ exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
- exit 0 ;;
+ exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
- exit 0 ;;
+ exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
- exit 0 ;;
- M68*:*:R3V[567]*:*)
- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
+ && { echo i486-ncr-sysv4; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
- exit 0 ;;
+ exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1131,68 +1134,72 @@ EOF
else
echo ns32k-sni-sysv
fi
- exit 0 ;;
+ exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
- exit 0 ;;
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
- exit 0 ;;
+ exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
- exit 0 ;;
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
- exit 0 ;;
+ exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
- exit 0 ;;
+ exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
- exit 0 ;;
+ exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
- exit 0 ;;
+ exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
- exit 0 ;;
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Darwin:*:*)
- case `uname -p` in
- *86) UNAME_PROCESSOR=i686 ;;
- powerpc) UNAME_PROCESSOR=powerpc ;;
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1200,22 +1207,25 @@ EOF
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
- exit 0 ;;
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
- exit 0 ;;
+ exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
- exit 0 ;;
+ exit ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
@@ -1226,31 +1236,47 @@ EOF
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
- exit 0 ;;
+ exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
- exit 0 ;;
+ exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
- exit 0 ;;
+ exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
- exit 0 ;;
+ exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
- exit 0 ;;
+ exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
- exit 0 ;;
+ exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
- exit 0 ;;
+ exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit 0 ;;
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1282,7 +1308,7 @@ main ()
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix"); exit (0);
+ printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
@@ -1371,11 +1397,12 @@ main ()
}
EOF
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
@@ -1384,22 +1411,22 @@ then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
c34*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
c38*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
c4*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
esac
fi
@@ -1410,7 +1437,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- ftp://ftp.gnu.org/pub/gnu/config/
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/contrib/binutils/config.if b/contrib/binutils/config.if
deleted file mode 100644
index 2655bc3b56ab..000000000000
--- a/contrib/binutils/config.if
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /dev/null
-# Don't call it directly. This shell script fragment is called to
-# determine:
-#
-# 1. libstcxx_incdir: the interface name for libstdc++.
-#
-
-# Get the top level src dir.
-if [ -z "${topsrcdir}" -a -z "${top_srcdir}" ]
-then
- echo "Undefined top level src dir: topsrcdir and top_srcdir are empty" >&2
- exit 1
-fi
-
-if [ -n "${topsrcdir}" ]
-then
- if_topsrcdir=${topsrcdir}
-else
- if_topsrcdir=${top_srcdir}
-fi
-
-# Set libstdcxx_incdir.
-# This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4.
-if test -z "$gcc_version"; then
- if test -z "${gcc_version_trigger}" \
- && test -f ${if_topsrcdir}/gcc/version.c; then
- gcc_version_trigger=${if_topsrcdir}/gcc/version.c
- fi
- if test -f "${gcc_version_trigger}"; then
- gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
- else
- gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
- fi
- gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
-fi
-libstdcxx_incdir=c++/${gcc_version}
-
diff --git a/contrib/binutils/config.sub b/contrib/binutils/config.sub
index d2e3557ac405..a4e8a94a3351 100755
--- a/contrib/binutils/config.sub
+++ b/contrib/binutils/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-timestamp='2004-02-16'
+timestamp='2006-01-02'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +21,15 @@ timestamp='2004-02-16'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# Foundation, Inc., 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.
+
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@@ -70,7 +71,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -83,11 +84,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -99,7 +100,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
- exit 0;;
+ exit ;;
* )
break ;;
@@ -118,8 +119,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -145,7 +147,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis)
+ -apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
@@ -170,6 +172,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -186,6 +192,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,13 +241,14 @@ case $basic_machine in
| 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 \
+ | bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m68000 | m68k | m88k | mcore \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -246,6 +257,7 @@ case $basic_machine in
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
@@ -254,23 +266,28 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | mt \
| msp430 \
| ns16k | ns32k \
- | openrisc | or32 \
+ | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xstormy16 | xtensa \
+ | x86 | 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
@@ -278,6 +295,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -298,9 +318,9 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
- | bs2000-* \
+ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | cydra-* \
+ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
@@ -308,9 +328,9 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* \
+ | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | mcore-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -319,6 +339,7 @@ case $basic_machine in
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
@@ -326,27 +347,32 @@ case $basic_machine in
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
| msp430-* \
- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
- | xtensa-* \
+ | x86-* | x86_64-* | 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)
@@ -445,6 +471,10 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
@@ -452,9 +482,16 @@ case $basic_machine in
crds | unos)
basic_machine=m68k-crds
;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -477,6 +514,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@@ -655,10 +696,6 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
- mmix*)
- basic_machine=mmix-knuth
- os=-mmixware
- ;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@@ -671,6 +708,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -739,10 +779,6 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
- nv1)
- basic_machine=nv1-cray
- os=-unicosmp
- ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -750,9 +786,8 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
- or32 | or32-*)
+ openrisc | openrisc-*)
basic_machine=or32-unknown
- os=-coff
;;
os400)
basic_machine=powerpc-ibm
@@ -783,6 +818,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -839,6 +880,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -1025,6 +1070,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@@ -1055,6 +1104,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
rs6000)
basic_machine=rs6000-ibm
;;
@@ -1071,13 +1123,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparc | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1150,20 +1199,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1181,7 +1233,7 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
@@ -1290,6 +1342,9 @@ case $os in
-kaos*)
os=-kaos
;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
-none)
;;
*)
@@ -1367,9 +1422,15 @@ case $basic_machine in
*-be)
os=-beos
;;
+ *-haiku)
+ os=-haiku
+ ;;
*-ibm)
os=-aix
;;
+ *-knuth)
+ os=-mmixware
+ ;;
*-wec)
os=-proelf
;;
@@ -1535,7 +1596,7 @@ case $basic_machine in
esac
echo $basic_machine$os
-exit 0
+exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/contrib/binutils/config/ChangeLog b/contrib/binutils/config/ChangeLog
index 85868b4246af..1ddcfd41628d 100644
--- a/contrib/binutils/config/ChangeLog
+++ b/contrib/binutils/config/ChangeLog
@@ -1,3 +1,173 @@
+2006-02-14 Paolo Bonzini <bonzini@gnu.org>
+ Andreas Schwab <schwab@suse.de>
+
+ * 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>
+
+ * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Test $with_build_time_tools.
+ (ACX_PATH_SEP): New.
+ (ACX_TOOL_DIRS): Move here from the gcc directory.
+ (ACX_CHECK_INSTALLED_TARGET_TOOL): New.
+ (GCC_TARGET_TOOL): Do not use a host tool if we found a target tool
+ with a complete path in either $with_build_time_tools or $exec_prefix.
+
+2006-01-02 Paolo Bonzini <bonzini@gnu.org>
+
+ PR target/25259
+ * stdint.m4: New.
+
+2005-12-20 Paolo Bonzini <bonzini@gnu.org>
+
+ Revert Ada-related part of the previous change.
+
+ * mt-ppc-aix: Delete.
+
+2005-12-19 Paolo Bonzini <bonzini@gnu.org>
+
+ * mt-ppc-aix, mh-ppc-aix: New.
+
+2005-12-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4 (GCC_TARGET_TOOL): New.
+
+2005-09-23 Tom Tromey <tromey@redhat.com>
+
+ * enable.m4: New file.
+ * tls.m4: New file.
+
+2005-08-12 Paolo Bonzini <bonzini@gnu.org>
+
+ * config/acx.m4 (NCN_CHECK_TARGET_TOOL, NCN_STRICT_CHECK_TOOL,
+ NCN_STRICT_CHECK_TARGET_TOOL): Remove.
+ (NCN_STRICT_CHECK_TOOLS, NCN_STRICT_CHECK_TARGET_TOOLS): New,
+ based on the deleted macros.
+
+2005-07-27 Mark Mitchell <mark@codesourcery.com>
+
+ * mt-gnu (CXXFLAGS): Include SYSROOT_CFLAGS_FOR_TARGET.
+
+2005-07-16 Kelley Cook <kcook@gcc.gnu.org>
+
+ * all files: Update FSF address.
+
+2005-06-14 Tom Tromey <tromey@redhat.com>
+
+ PR libgcj/19877:
+ * no-executables.m4: Call real AC_FUNC_MMAP when cache variable
+ is set but not 'no'.
+
+2005-06-13 Zack Weinberg <zack@codesourcery.com>
+
+ * depstand.m4, lead-dot.m4: New files.
+
+2005-05-19 Kelley Cook <kcook@gcc.gnu.org>
+
+ * accross.m4: Delete file.
+
+2005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
+
+ PR bootstrap/21230
+ * warnings.m4 (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Add
+ double quotes around GCC variable.
+
+2005-04-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4 (ACX_PROG_GNAT): Remove stray break.
+
+2005-03-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * gcc-lib-path.m4: Remove.
+
+2005-03-21 Zack Weinberg <zack@codesourcery.com>
+
+ * gxx-include-dir.m4: In all substitutions, leave $(gcc_version)
+ to be expanded by the Makefile.
+
+2005-03-15 Zack Weinberg <zack@codesourcery.com>
+
+ * gcc-version.m4: Delete.
+
+2005-02-28 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/17383
+ * acx.m4 (GCC_TOPLEV_SUBDIRS): Set HOST_SUBDIR if an in-src
+ gcc build is going.
+
+2005-01-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * warnings.m4 (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Don't do
+ anything for non-GCC compilers.
+
+2004-12-03 Richard Sandiford <rsandifo@redhat.com>
+
+ * gxx-include-dir.m4: New file.
+
+2004-12-02 Richard Sandiford <rsandifo@redhat.com>
+
+ * gcc-version.m4: New file.
+
+2004-09-24 Zack Weinberg <zack@codesourcery.com>
+
+ * warnings.m4: New file.
+
+2004-09-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR bootstrap/17369
+ * gcc-lib-path.m4: New file.
+
+2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
+
+ * gettext-sister.m4: Renamed from gettext.m4
+ * codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4, po.m4,
+ inttypes.m4, inttypes-pri.m4, inttypes_h.m4, lcmessage.m4, lib-ld.m4,
+ lib-link.m4, lib-prefix.m4, nls.m4, progtest.m4, stdint_h.m4,
+ uintmax_t.m4, ulonglong.m4: Import from gettext-0.12.1 sources.
+
+2004-08-31 Robert Bowdidge <bowdidge@apple.com>
+
+ * mh-ppc-darwin: Add file, and override BOOT_CFLAGS.
+
+2004-08-13 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Add ACX_{TARGET,HOST,BUILD}_NONCANONICAL,
+ which do an automatic AC_SUBST on _GCC_TOPLEV_*_NONCANONICAL.
+ The intention is that we will migrate to these bit by bit.
+
+2004-08-01 Robert Millan <robertmh@gnu.org>
+
+ * mt-linux: Rename to ...
+ * mt-gnu: ... this.
+
+2004-06-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4 (ACX_PROG_LN): From gcc, modified to
+ accept a parameter.
+
+2004-05-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING):
+ From gcc.
+
+2004-04-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * acx.m4 (ACX_PROG_GNAT): Check if ${CC} produces object file for
+ Ada compilation.
+ Fix acx_cv_cc_gcc_supports_ada spelling.
+
+2004-03-08 Paolo Bonzini <bonzini@gnu.org>
+
+ PR ada/14131
+ Move language detection to the top level.
+ * acx.m4 (ACX_PROG_GNAT): New macro, moved here
+ from the gcc subdirectory.
+
+2004-03-09 Hans-Peter Nilsson <hp@axis.com>
+
+ * accross.m4 (AC_C_BIGENDIAN_CROSS): Compile endian probe with
+ "-c". Properly quote parameter for AC_MSG_ERROR.
+
2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* acinclude.m4: Quote names of macros to be defined by AC_DEFUN
diff --git a/contrib/binutils/config/mh-mingw32 b/contrib/binutils/config/mh-mingw32
deleted file mode 100644
index f622c8bec018..000000000000
--- a/contrib/binutils/config/mh-mingw32
+++ /dev/null
@@ -1,7 +0,0 @@
-# We also need to override LIBGCC2_DEBUG_CFLAGS so libgcc2 will be
-# built without debugging information
-
-LIBGCC2_DEBUG_CFLAGS=
-
-# custom installation rules for mingw32 (append .exe to binaries, etc.)
-# INSTALL_DOSREL=install-dosrel
diff --git a/contrib/binutils/config/mt-linux b/contrib/binutils/config/mt-linux
deleted file mode 100644
index 15bf41716033..000000000000
--- a/contrib/binutils/config/mt-linux
+++ /dev/null
@@ -1 +0,0 @@
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
diff --git a/contrib/binutils/configure b/contrib/binutils/configure
index d11c49b15d51..dbcbdfef7d33 100755
--- a/contrib/binutils/configure
+++ b/contrib/binutils/configure
@@ -14,13 +14,41 @@ ac_default_prefix=/usr/local
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."
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -579,7 +607,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:583: checking host system type" >&5
+echo "configure:611: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -600,7 +628,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:604: checking target system type" >&5
+echo "configure:632: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -618,7 +646,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:622: checking build system type" >&5
+echo "configure:650: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -673,7 +701,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:677: checking for a BSD compatible install" >&5
+echo "configure:705: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -725,49 +753,50 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
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
+else
+ rm -f conftestdata_t
+echo >conftestdata_f
+if ln conftestdata_f conftestdata_t 2>/dev/null
+then
+ acx_cv_prog_LN=ln
+else
+ acx_cv_prog_LN=no
+fi
+rm -f conftestdata_f conftestdata_t
-# Autoconf M4 include file defining utility macros for complex Canadian
-# cross builds.
-
-
-
-
-
-
-####
-# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM
-# or AC_INIT.
-# These demand that AC_CANONICAL_SYSTEM be called beforehand.
-
-####
-# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
-# Code is pretty much lifted from autoconf2.53.
-
-
-
-####
-# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
-
-
-
-####
-# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
-
-
-###
-# AC_PROG_CPP_WERROR
-# Used for autoconf 2.5x to force AC_PREPROC_IFELSE to reject code which
-# triggers warnings from the preprocessor. Will be in autoconf 2.58.
-# For now, using this also overrides header checks to use only the
-# preprocessor (matches 2.13 behavior; matching 2.58's behavior is a
-# bit harder from here).
-# Eventually autoconf will default to checking headers with the compiler
-# instead, and we'll have to do this differently.
+fi
+if test $acx_cv_prog_LN = no; then
+ LN="cp"
+ echo "$ac_t""no, using $LN" 1>&6
+else
+ LN="$acx_cv_prog_LN"
+ echo "$ac_t""yes" 1>&6
+fi
-# AC_PROG_CPP_WERROR
+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"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
### we might need to use some other shell than /bin/sh for running subshells
@@ -820,10 +849,17 @@ rm -f conftestsed.out
moveifchange=${srcdir}/move-if-change
+srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
+
+# We pass INSTALL explicitly to sub-makes. Make sure that it is not
+# a relative path.
+if test "$INSTALL" = "${srcdir}/install-sh -c"; then
+ INSTALL="${srcpwd}/install-sh -c"
+fi
+
# Set srcdir to "." if that's what it is.
# This is important for multilib support.
pwd=`${PWDCMD-pwd}`
-srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
if test "${pwd}" = "${srcpwd}" ; then
srcdir=.
fi
@@ -831,26 +867,6 @@ fi
topsrcdir=$srcpwd
extra_host_args=
-# Define the trigger file to make sure configure will re-run whenever
-# the gcc version number changes.
-if test "${with_gcc_version_trigger+set}" = set ; then
- gcc_version_trigger="$with_gcc_version_trigger"
- gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
-else
- # If gcc's sources are available, define the trigger file.
- if test -f ${topsrcdir}/gcc/version.c ; then
- gcc_version_trigger=${topsrcdir}/gcc/version.c
- gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
- case "$ac_configure_args" in
- *--with-gcc-version-trigger=$gcc_version_trigger* )
- ;;
- * )
- # Add to all subconfigure arguments: build, host, and target.
- ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
- ;;
- esac
- fi
-fi
### To add a new directory to the tree, first choose whether it is a target
### or a host dependent tool. Then put it into the appropriate list
@@ -866,16 +882,24 @@ fi
# Double entries in build_configdirs, configdirs, or target_configdirs may
# cause circular dependencies and break everything horribly.
+# these library is used by various programs built for the build
+# environment
+#
+build_libs="build-libiberty"
+
+# these tools are built for the build environment
+build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
+
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
# know that we are building the simulator.
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
-host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar"
+host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
# libgcj represents the runtime libraries only used by gcj.
libgcj="target-libffi \
@@ -891,10 +915,14 @@ target_libraries="target-libiberty \
target-libgloss \
target-newlib \
target-libstdc++-v3 \
- target-libf2c \
+ target-libmudflap \
+ target-libssp \
+ target-libgcc-math \
+ target-libgfortran \
${libgcj} \
target-libobjc \
- target-libada"
+ target-libada \
+ target-libgomp"
# these tools are built using the target libraries, and are intended to
# run only in the target environment
@@ -912,19 +940,9 @@ target_tools="target-examples target-groff target-gperf target-rda"
## is important because configure will choke if they ever get through.
## ${configdirs} is directories we build using the host tools.
## ${target_configdirs} is directories we build using the target tools.
-#
configdirs=`echo ${host_libs} ${host_tools}`
target_configdirs=`echo ${target_libraries} ${target_tools}`
-
-# Only make build modules if build != host.
-# This should be done more generally, but at the moment it doesn't matter.
-if test ${host_alias} != ${build_alias} ; then
- # This is the only build module.
- build_modules=libiberty
-else
- build_modules=
-fi
-
+build_configdirs=`echo ${build_libs} ${build_tools}`
################################################################################
@@ -959,8 +977,13 @@ esac
# Prefix 'build-' so this never conflicts with target_subdir.
build_subdir="build-${build_noncanonical}"
-# Not really a subdirectory, but here for completeness.
-host_subdir=.
+# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
+if ( test $srcdir = . && test -d gcc ) \
+ || test -d $srcdir/../host-${host_noncanonical}; then
+ host_subdir="host-${host_noncanonical}"
+else
+ host_subdir=.
+fi
# No prefix.
target_subdir=${target_noncanonical}
@@ -990,7 +1013,7 @@ fi
case ${with_x} in
yes | "") ;; # the default value for this tree is that X11 is available
no)
- skipdirs="${skipdirs} tk tix itcl libgui"
+ skipdirs="${skipdirs} tk itcl libgui"
# We won't be able to build gdbtk without X.
enable_gdbtk=no
;;
@@ -1012,8 +1035,8 @@ esac
# If both --with-headers and --with-libs are specified, default to
# --without-newlib.
-if test x"${with_headers}" != x && test x"${with_headers} != xno \
- && test x"${with_libs}" != x && test x"${with_libs} != xno ; then
+if test x"${with_headers}" != x && test x"${with_headers}" != xno \
+ && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
if test x"${with_newlib}" = x ; then
with_newlib=no
fi
@@ -1032,6 +1055,10 @@ case "${host}" in
configdirs="$configdirs libtermcap" ;;
esac
+# A target can indicate whether a language isn't supported for some reason.
+# Only spaces may be used in this macro; not newlines or tabs.
+unsupported_languages=
+
# Remove more programs from consideration, based on the host or
# target this usually means that a port of the program doesn't
# exist yet.
@@ -1041,17 +1068,17 @@ case "${host}" in
noconfigdirs="$noconfigdirs byacc"
;;
i[3456789]86-*-vsta)
- noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
+ noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
;;
i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
- noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
+ noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
;;
i[3456789]86-*-mingw32*)
- # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
+ # 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"
;;
i[3456789]86-*-beos*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
+ noconfigdirs="$noconfigdirs tk itcl libgui gdb"
;;
*-*-cygwin*)
noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
@@ -1060,16 +1087,14 @@ case "${host}" in
noconfigdirs="$noconfigdirs rcs"
;;
ppc*-*-pe)
- noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
+ noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
;;
powerpc-*-beos*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
- ;;
- *-*-darwin*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui"
+ noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
;;
esac
+
# Check whether --enable-libada or --disable-libada was given.
if test "${enable_libada+set}" = set; then
enableval="$enable_libada"
@@ -1079,9 +1104,35 @@ else
fi
if test "${ENABLE_LIBADA}" != "yes" ; then
- noconfigdirs="$noconfigdirs target-libada"
+ noconfigdirs="$noconfigdirs gnattools"
+fi
+
+# Check whether --enable-libssp or --disable-libssp was given.
+if test "${enable_libssp+set}" = set; then
+ enableval="$enable_libssp"
+ 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
+
# 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
@@ -1098,24 +1149,77 @@ no)
;;
esac
+
+# Disable libmudflap on some systems.
+if test x$enable_libmudflap = x ; then
+ case "${target}" in
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ # Enable libmudflap by default in GNU and friends.
+ ;;
+ *-*-freebsd*)
+ # Enable libmudflap by default in FreeBSD.
+ ;;
+ *)
+ # Disable it by default everywhere else.
+ noconfigdirs="$noconfigdirs target-libmudflap"
+ ;;
+ esac
+fi
+
+# Disable libgomp on non POSIX hosted systems.
+if test x$enable_libgomp = x ; then
+ # Enable libgomp by default on hosted POSIX systems.
+ case "${target}" in
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ ;;
+ *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
+ ;;
+ *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
+ ;;
+ *-*-darwin* | *-*-aix*)
+ ;;
+ *)
+ noconfigdirs="$noconfigdirs target-libgomp"
+ ;;
+ esac
+fi
+
+
case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
powerpc-*-darwin*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
- noconfigdirs="$noconfigdirs target-libobjc"
+ noconfigdirs="$noconfigdirs sim target-rda"
;;
*-*-darwin*)
- noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
- noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
+ noconfigdirs="$noconfigdirs ld gas gdb gprof"
+ noconfigdirs="$noconfigdirs sim target-rda"
+ noconfigdirs="$noconfigdirs ${libgcj}"
;;
*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
+ *-*-freebsd*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
+ && test -f /usr/local/include/gmp.h; then
+ with_gmp=/usr/local
+ fi
+
+ # Skip some stuff that's unsupported on some FreeBSD configurations.
+ case "${target}" in
+ i*86-*-*) ;;
+ alpha*-*-*) ;;
+ *)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ esac
+ ;;
*-*-kaos*)
# Remove unsupported stuff on all kaOS configurations.
- skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
+ skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
noconfigdirs="$noconfigdirs target-libgloss"
@@ -1133,23 +1237,24 @@ case "${target}" in
;;
esac
;;
- *-*-netware)
- noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
+ *-*-netware*)
+ noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- case ${target} in
- h8300*-*-* | h8500-*-*)
- noconfigdirs="$noconfigdirs target-libf2c"
- ;;
- *) ;;
- esac
+ ;;
+ # The tpf target doesn't support gdb yet.
+ *-*-tpf*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj} target-libmudflap gdb tcl tk libgui itcl"
;;
*-*-uclinux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
;;
*-*-vxworks*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj}"
+ 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.
@@ -1164,9 +1269,6 @@ case "${target}" in
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
- alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
alpha*-*-*)
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
@@ -1181,7 +1283,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs ${libgcj}"
noconfigdirs="$noconfigdirs target-examples"
noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
- noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
+ noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
noconfigdirs="$noconfigdirs expect dejagnu"
# the C++ libraries don't build on top of CE's C libraries
noconfigdirs="$noconfigdirs target-libstdc++-v3"
@@ -1195,16 +1297,22 @@ case "${target}" in
arc-*-*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
+ arm-semi-aof )
+ ;;
arm-*-coff | strongarm-*-coff | xscale-*-coff)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
;;
- arm-*-pe*)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ arm*-*-linux-gnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+ arm*-*-symbianelf*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
;;
- arm-*-oabi*)
+ arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
thumb-*-coff)
@@ -1213,9 +1321,6 @@ case "${target}" in
thumb-*-elf)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
- thumb-*-oabi)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
thumb-*-pe)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
@@ -1225,14 +1330,36 @@ case "${target}" in
avr-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
+ bfin-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss gdb"
+ if test x${is_cross_compiler} != xno ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
c4x-*-* | tic4x-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
c54x*-*-* | tic54x-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
;;
- cris-*-*)
- noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ cris-*-* | crisv32-*-*)
+ unsupported_languages="$unsupported_languages java"
+ case "${target}" in
+ *-*-aout)
+ unsupported_languages="$unsupported_languages fortran"
+ noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
+ *-*-elf)
+ unsupported_languages="$unsupported_languages fortran"
+ noconfigdirs="$noconfigdirs target-boehm-gc";;
+ *-*-linux*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
+ *)
+ unsupported_languages="$unsupported_languages fortran"
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
+ esac
+ ;;
+ crx-*-*)
+ noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
;;
d10v-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
@@ -1247,10 +1374,12 @@ case "${target}" in
noconfigdirs="$noconfigdirs ${libgcj}"
;;
h8300*-*-*)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj} target-libf2c"
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
h8500-*-*)
- noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
+ noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
+ ;;
+ hppa1.1-*-osf* | hppa1.1-*-bsd* )
;;
hppa*64*-*-linux* | parisc*64*-*-linux*)
# In this case, it's because the hppa64-linux target is for
@@ -1258,13 +1387,13 @@ case "${target}" in
# headers, crt*.o, etc., all of which are needed by these.
noconfigdirs="$noconfigdirs target-zlib"
;;
+ parisc*-*-linux* | hppa*-*-linux*)
+ ;;
hppa*-*-*elf* | \
- parisc*-*-linux* | hppa*-*-linux* | \
hppa*-*-lites* | \
hppa*-*-openbsd* | \
hppa*64*-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
- # Do configure ld/binutils/gas for this case.
;;
hppa*-*-*)
# According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
@@ -1276,18 +1405,17 @@ case "${target}" in
;;
ia64*-*-elf*)
# No gdb support yet.
- noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
+ noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
;;
ia64*-**-hpux*)
# No gdb or ld support yet.
- noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
+ noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
+ ;;
+ i370-*-opened*)
;;
i[3456789]86-*-coff | i[3456789]86-*-elf)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
i[3456789]86-*-linux*)
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
# not build java stuff by default.
@@ -1314,23 +1442,30 @@ case "${target}" in
# 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 tix gnuserv"
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
;;
esac
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
- # always build newlib.
- skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
+ # always build newlib if winsup directory is present.
+ if test -d "$srcdir/winsup"; 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."
+ 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 tix libgui gnuserv"
+ *) 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* )
+ ;;
i[3456789]86-*-pe)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
@@ -1351,6 +1486,9 @@ case "${target}" in
i[3456789]86-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
;;
+ i[3456789]86-*-rdos*)
+ noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
+ ;;
m32r-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
@@ -1369,7 +1507,8 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
mmix-*-*)
- noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
+ noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb libgloss"
+ unsupported_languages="$unsupported_languages fortran java"
;;
mn10200-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
@@ -1377,19 +1516,22 @@ case "${target}" in
mn10300-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ mt-*-*)
+ noconfigdirs="$noconfigdirs sim"
+ ;;
powerpc-*-aix*)
# copied from rs6000-*-* entry
- noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
;;
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
target_configdirs="$target_configdirs target-winsup"
- noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
;;
# This is temporary until we can link against shared libraries
powerpcle-*-solaris*)
- noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
@@ -1397,11 +1539,13 @@ case "${target}" in
powerpc-*-eabi)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
+ ;;
rs6000-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
;;
rs6000-*-aix*)
- noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
;;
rs6000-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
@@ -1428,6 +1572,9 @@ case "${target}" in
mipstx39-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
;;
+ mips64*-*-linux*)
+ noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
+ ;;
mips*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
@@ -1437,7 +1584,7 @@ case "${target}" in
romp-*-*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
;;
- sh-*-*)
+ sh-*-* | sh64-*-*)
case "${host}" in
i[3456789]86-*-vsta) ;; # don't add gprof back in
i[3456789]86-*-go32*) ;; # don't add gprof back in
@@ -1446,9 +1593,6 @@ case "${target}" in
esac
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
- sh64-*-*)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
sparc-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
@@ -1466,6 +1610,9 @@ case "${target}" in
use_gnu_ld=no
fi
;;
+ sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
;;
v810-*-*)
@@ -1492,7 +1639,7 @@ case "${target}" in
ip2k-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
- *-*-linux*)
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-lynxos*)
@@ -1510,105 +1657,900 @@ case "${noconfigdirs}" in
*target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
esac
-# Figure out what language subdirectories are present.
-# Look if the user specified --enable-languages="..."; if not, use
-# the environment variable $LANGUAGES if defined. $LANGUAGES might
-# go away some day.
-# NB: embedded tabs in this IF block -- do not untabify
-if test x"${enable_languages+set}" != xset; then
- if test x"${LANGUAGES+set}" = xset; then
- enable_languages="${LANGUAGES}"
- echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
+# Work in distributions that contain no compiler tools, like Autoconf.
+tentative_cc=""
+host_makefile_frag=/dev/null
+if test -d ${srcdir}/config ; then
+case "${host}" in
+ m68k-hp-hpux*)
+ # Avoid "too much defining" errors from HPUX compiler.
+ tentative_cc="cc -Wp,-H256000"
+ # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
+ # If it's HP/UX ar, this should be harmless.
+ RANLIB="ar ts"
+ ;;
+ m68k-apollo-sysv*)
+ tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
+ ;;
+ m68k-apollo-bsd*)
+ #None of the Apollo compilers can compile gas or binutils. The preprocessor
+ # chokes on bfd, the compiler won't let you assign integers to enums, and
+ # other problems. Defining CC to gcc is a questionable way to say "don't use
+ # the apollo compiler" (the preferred version of GCC could be called cc,
+ # or whatever), but I'm not sure leaving CC as cc is any better...
+ #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
+ # Used to have BISON=yacc.
+ tentative_cc=gcc
+ ;;
+ m88k-dg-dgux*)
+ tentative_cc="gcc -Wall -ansi -D__using_DGUX"
+ ;;
+ m88k-harris-cxux*)
+ # Under CX/UX, we want to tell the compiler to use ANSI mode.
+ tentative_cc="cc -Xa"
+ host_makefile_frag="config/mh-cxux"
+ ;;
+ m88k-motorola-sysv*)
+ ;;
+ mips*-dec-ultrix*)
+ tentative_cc="cc -Wf,-XNg1000"
+ host_makefile_frag="config/mh-decstation"
+ ;;
+ mips*-nec-sysv4*)
+ # The C compiler on NEC MIPS SVR4 needs bigger tables.
+ tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
+ host_makefile_frag="config/mh-necv4"
+ ;;
+ mips*-sgi-irix4*)
+ # Tell compiler to use K&R C. We can't compile under the SGI Ansi
+ # environment. Also bump switch table size so that cp-parse will
+ # compile. Bump string length limit so linker builds.
+ tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
+ ;;
+ mips*-*-sysv4*)
+ host_makefile_frag="config/mh-sysv4"
+ ;;
+ mips*-*-sysv*)
+ # This is for a MIPS running RISC/os 4.52C.
+
+ # This is needed for GDB, but needs to be in the top-level make because
+ # if a library is compiled with the bsd headers and gets linked with the
+ # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
+ # a different size).
+ # ptrace(2) apparently has problems in the BSD environment. No workaround is
+ # known except to select the sysv environment. Could we use /proc instead?
+ # These "sysv environments" and "bsd environments" often end up being a pain.
+ #
+ # This is not part of CFLAGS because perhaps not all C compilers have this
+ # option.
+ tentative_cc="cc -systype sysv"
+ ;;
+ i370-ibm-opened*)
+ tentative_cc="c89"
+ ;;
+ i[3456789]86-*-sysv5*)
+ host_makefile_frag="config/mh-sysv5"
+ ;;
+ i[3456789]86-*-dgux*)
+ tentative_cc="gcc -Wall -ansi -D__using_DGUX"
+ host_makefile_frag="config/mh-dgux386"
+ ;;
+ i[3456789]86-ncr-sysv4.3*)
+ # The MetaWare compiler will generate a copyright message unless you
+ # turn it off by adding the -Hnocopyr flag.
+ tentative_cc="cc -Hnocopyr"
+ ;;
+ i[3456789]86-ncr-sysv4*)
+ # for an NCR 3000 (i486/SVR4) system.
+ # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
+ # This compiler not only emits obnoxious copyright messages every time
+ # you run it, but it chokes and dies on a whole bunch of GNU source
+ # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
+ tentative_cc="/usr/ccs/ATT/cc"
+ host_makefile_frag="config/mh-ncr3000"
+ ;;
+ i[3456789]86-*-sco3.2v5*)
+ ;;
+ i[3456789]86-*-sco*)
+ # The native C compiler botches some simple uses of const. Unfortunately,
+ # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
+ tentative_cc="cc -Dconst="
+ host_makefile_frag="config/mh-sco"
+ ;;
+ i[3456789]86-*-udk*)
+ host_makefile_frag="config/mh-sysv5"
+ ;;
+ i[3456789]86-*-solaris2*)
+ host_makefile_frag="config/mh-sysv4"
+ ;;
+ i[3456789]86-*-msdosdjgpp*)
+ host_makefile_frag="config/mh-djgpp"
+ ;;
+ *-cygwin*)
+ host_makefile_frag="config/mh-cygwin"
+ ;;
+ *-mingw32*)
+ ;;
+ *-interix*)
+ host_makefile_frag="config/mh-interix"
+ ;;
+ vax-*-ultrix2*)
+ # The old BSD pcc isn't up to compiling parts of gdb so use gcc
+ tentative_cc=gcc
+ ;;
+ *-*-solaris2*)
+ host_makefile_frag="config/mh-solaris"
+ ;;
+ m68k-sun-sunos*)
+ # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
+ # without overflowing the jump tables (-J says to use a 32 bit table)
+ tentative_cc="cc -J"
+ ;;
+ *-hp-hpux*)
+ tentative_cc="cc -Wp,-H256000"
+ ;;
+ *-*-hiux*)
+ tentative_cc="cc -Wp,-H256000"
+ ;;
+ rs6000-*-lynxos*)
+ # /bin/cc is less than useful for our purposes. Always use GCC
+ tentative_cc="/usr/cygnus/progressive/bin/gcc"
+ host_makefile_frag="config/mh-lynxrs6k"
+ ;;
+ powerpc-*-darwin*)
+ host_makefile_frag="config/mh-ppc-darwin"
+ ;;
+ powerpc-*-aix*)
+ host_makefile_frag="config/mh-ppc-aix"
+ ;;
+ rs6000-*-aix*)
+ host_makefile_frag="config/mh-ppc-aix"
+ ;;
+ *-*-lynxos*)
+ # /bin/cc is less than useful for our purposes. Always use GCC
+ tentative_cc="/bin/gcc"
+ ;;
+ *-*-sysv4*)
+ host_makefile_frag="config/mh-sysv4"
+ ;;
+ # This is placed last to prevent interfering with the cases above.
+ i[3456789]86-*-*)
+ # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
+ host_makefile_frag="config/mh-x86omitfp"
+ ;;
+esac
+fi
+
+# If we aren't going to be using gcc, see if we can extract a definition
+# of CC from the fragment.
+# Actually, use the 'pre-extracted' version above.
+if test -z "${CC}" && test "${build}" = "${host}" ; then
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ found=
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/gcc; then
+ found=yes
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -z "${found}" && test -n "${tentative_cc}" ; then
+ CC=$tentative_cc
+ fi
+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)"
+ # 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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1980: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 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
else
- enable_languages=all
+ ac_cv_prog_cc_cross=yes
fi
else
- if test x"${enable_languages}" = x ||
- test x"${enable_languages}" = xyes;
- then
- echo configure.in: --enable-languages needs at least one language argument 1>&2
- exit 1
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure: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
+
+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
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure: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
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
fi
fi
-enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
-# First scan to see if an enabled language requires some other language.
-# We assume that a given config-lang.in will list all the language
-# front ends it requires, even if some are required indirectly.
-for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
- case ${lang_frag} in
- ..) ;;
- # The odd quoting in the next line works around
- # an apparent bug in bash 1.12 on linux.
- ${srcdir}/gcc/[*]/config-lang.in) ;;
- *)
- # From the config-lang.in, get $language, $lang_requires
- language=
- lang_requires=
- . ${lang_frag}
- for other in ${lang_requires} ; do
- case ,${enable_languages}, in
- *,$other,*) ;;
- *,all,*) ;;
- *,$language,*)
- echo " \`$other' language required by \`$language'; enabling" 1>&2
- enable_languages="${enable_languages},${other}"
- ;;
- esac
- done
- ;;
- esac
-done
-for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
- case ${lang_frag} in
- ..) ;;
- # The odd quoting in the next line works around
- # an apparent bug in bash 1.12 on linux.
- ${srcdir}/gcc/[*]/config-lang.in) ;;
- *)
- # From the config-lang.in, get $language, $target_libs,
- # $lang_dirs, and $build_by_default
- language=
- target_libs=
- lang_dirs=
- build_by_default=
- . ${lang_frag}
- 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,*)
- # 'all' was selected; include 'default' languages.
- case ${build_by_default} in
- no) add_this_lang=no ;;
- *) add_this_lang=yes ;;
- esac
- ;;
- *) add_this_lang=no ;;
+ # 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 ${add_this_lang} in
- no)
- # Remove language-dependent dirs.
- eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
- ;;
+ case $gcc_prog_ld in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ LD="$gcc_prog_ld" ;;
esac
+ fi
+ fi
+
+ CXX=${CXX-"c++"}
+ CFLAGS=${CFLAGS-"-g"}
+ CXXFLAGS=${CXXFLAGS-"-g -O2"}
+fi
+
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+
+
+
+# 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
+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"
+fi
+fi
+GNATBIND="$ac_cv_prog_GNATBIND"
+if test -n "$GNATBIND"; then
+ echo "$ac_t""$GNATBIND" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_GNATBIND"; then
+if test -n "$ac_tool_prefix"; then
+ # 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
+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="gnatbind"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
+fi
+fi
+GNATBIND="$ac_cv_prog_GNATBIND"
+if test -n "$GNATBIND"; then
+ echo "$ac_t""$GNATBIND" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ GNATBIND="no"
+fi
+fi
+
+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
+else
+ cat >conftest.adb <<EOF
+procedure conftest is begin null; end conftest;
+EOF
+acx_cv_cc_gcc_supports_ada=no
+# There is a bug in old released versions of GCC which causes the
+# driver to exit successfully when the appropriate language module
+# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
+# Therefore we must check for the error message as well as an
+# unsuccessful exit.
+# Other compilers, like HP Tru64 UNIX cc, exit successfully when
+# given a .adb file, but produce no object file. So we must check
+# if an object file was really produced to guard against this.
+errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
+if test x"$errors" = x && test -f conftest.$ac_objext; then
+ acx_cv_cc_gcc_supports_ada=yes
+fi
+rm -f conftest.*
+fi
+
+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
+ 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
+else
+ echo abfoo >t1
+ echo cdfoo >t2
+ gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
+ if cmp t1 t2 2 2 > /dev/null 2>&1; then
+ if cmp t1 t2 1 1 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
+ fi
+ fi
+ if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
+ if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
+ fi
+ fi
+ rm t1 t2
+
+fi
+
+echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
+do_compare="$gcc_cv_prog_cmp_skip"
+
+
+
+# Check for GMP and MPFR
+gmplibs=
+gmpinc=
+have_gmp=yes
+# 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
+
+
+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
+
+
+if test "x$with_mpfr" != x; then
+ gmplibs="-L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+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
+
+
+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
+
+
+if test "x$with_gmp" != x; then
+ gmplibs="-L$with_gmp/lib $gmplibs"
+ gmpinc="-I$with_gmp/include $gmpinc"
+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
+
+; 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*
+
+if test x"$have_gmp" = xyes; then
+ echo $ac_n "checking for MPFR""... $ac_c" 1>&6
+echo "configure:2343: checking for MPFR" >&5
+
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $gmplibs"
+ cat > conftest.$ac_ext <<EOF
+#line 2348 "configure"
+#include "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"
+ CFLAGS="$saved_CFLAGS"
+fi
+
+# Flags needed for both GMP and/or MPFR
+
+
+
+# By default, C is the only stage 1 language.
+stage1_languages=c
+
+
+# Figure out what language subdirectories are present.
+# Look if the user specified --enable-languages="..."; if not, use
+# the environment variable $LANGUAGES if defined. $LANGUAGES might
+# go away some day.
+# NB: embedded tabs in this IF block -- do not untabify
+if test -d ${srcdir}/gcc; then
+ if test x"${enable_languages+set}" != xset; then
+ if test x"${LANGUAGES+set}" = xset; then
+ enable_languages="${LANGUAGES}"
+ echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
+ else
+ enable_languages=all
+ fi
+ else
+ if test x"${enable_languages}" = x ||
+ test x"${enable_languages}" = xyes;
+ then
+ echo configure.in: --enable-languages needs at least one language argument 1>&2
+ exit 1
+ fi
+ fi
+ enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
+
+ # 'f95' is the old name for the 'fortran' language. We issue a warning
+ # and make the substitution.
+ case ,${enable_languages}, in
+ *,f95,*)
+ echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
+ enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
;;
esac
+
+ # First scan to see if an enabled language requires some other language.
+ # We assume that a given config-lang.in will list all the language
+ # front ends it requires, even if some are required indirectly.
+ for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
+ case ${lang_frag} in
+ ..) ;;
+ # The odd quoting in the next line works around
+ # an apparent bug in bash 1.12 on linux.
+ ${srcdir}/gcc/[*]/config-lang.in) ;;
+ *)
+ # From the config-lang.in, get $language, $lang_requires
+ language=
+ lang_requires=
+ . ${lang_frag}
+ for other in ${lang_requires} ; do
+ case ,${enable_languages}, in
+ *,$other,*) ;;
+ *,all,*) ;;
+ *,$language,*)
+ echo " \`$other' language required by \`$language'; enabling" 1>&2
+ enable_languages="${enable_languages},${other}"
+ ;;
+ esac
+ done
+ ;;
+ esac
+ done
+
+ new_enable_languages=c
+ missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
+ potential_languages=c
+
+ for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
+ case ${lang_frag} in
+ ..) ;;
+ # The odd quoting in the next line works around
+ # an apparent bug in bash 1.12 on linux.
+ ${srcdir}/gcc/[*]/config-lang.in) ;;
+ *)
+ # 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=
+ . ${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},*:*:*:*)
+ # 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
+ ;;
+ *)
+ 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)
+ # Specifically requested language; tell them.
+ { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
+ ;;
+ *:no:yes)
+ # Silently disable.
+ add_this_lang=no
+ ;;
+ esac
+
+ # Disable a language that is unsupported by the target.
+ case " $unsupported_languages " in
+ *" $language "*)
+ add_this_lang=no
+ ;;
+ esac
+
+ case $add_this_lang in
+ no)
+ # Remove language-dependent dirs.
+ eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
+ ;;
+ *)
+ new_enable_languages="$new_enable_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}"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+
+ missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
+ if test "x$missing_languages" != x; then
+ { echo "configure: error:
+The following requested languages could not be built: ${missing_languages}
+Recognised languages are: ${potential_languages}" 1>&2; exit 1; }
+ fi
+
+ if test "x$new_enable_languages" != "x$enable_languages"; then
+ echo The following languages will be built: ${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"/ `
+fi
+
+# Handle --disable-<component> generically.
+for dir in $configdirs $build_configdirs $target_configdirs ; do
+ dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
+ if eval test x\${enable_${dirname}} "=" xno ; then
+ noconfigdirs="$noconfigdirs $dir"
+ fi
done
-# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
-# $target_configdirs.
+# 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.
notsupp=""
for dir in . $skipdirs $noconfigdirs ; do
- dirname=`echo $dir | sed -e s/target-//g`
+ dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
if test -r $srcdir/$dirname/configure ; then
@@ -1619,6 +2561,16 @@ for dir in . $skipdirs $noconfigdirs ; do
fi
fi
fi
+ if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
+ if test -r $srcdir/$dirname/configure ; then
+ if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ true
+ else
+ notsupp="$notsupp $dir"
+ fi
+ fi
+ fi
if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
if test -r $srcdir/$dirname/configure ; then
@@ -1651,6 +2603,15 @@ fi
# Quietly strip out all directories which aren't configurable in this tree.
# This relies on all configurable subdirectories being autoconfiscated, which
# is now the case.
+build_configdirs_all="$build_configdirs"
+build_configdirs=
+for i in ${build_configdirs_all} ; do
+ j=`echo $i | sed -e s/build-//g`
+ if test -f ${srcdir}/$j/configure ; then
+ build_configdirs="${build_configdirs} $i"
+ fi
+done
+
configdirs_all="$configdirs"
configdirs=
for i in ${configdirs_all} ; do
@@ -1658,6 +2619,7 @@ for i in ${configdirs_all} ; do
configdirs="${configdirs} $i"
fi
done
+
target_configdirs_all="$target_configdirs"
target_configdirs=
for i in ${target_configdirs_all} ; do
@@ -1684,7 +2646,7 @@ if test -n "${notsupp}" && test -z "${norecursion}" ; then
appdirs=""
break
fi
- if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
appdirs=""
break
fi
@@ -1709,6 +2671,18 @@ esac
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"
+ if test x"$withval" != x ; then
+ SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
+ fi
+else
+ SYSROOT_CFLAGS_FOR_TARGET=
+fi
+
+
+
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
@@ -1746,6 +2720,39 @@ if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
fi
fi
+# Set with_gnu_as and with_gnu_ld as appropriate.
+#
+# 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
+# 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
+# want to do that, then you should use the --without-gnu-as and
+# --without-gnu-ld options for the configure script.
+
+if test x${use_gnu_as} = x &&
+ echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
+ with_gnu_as=yes
+ extra_host_args="$extra_host_args --with-gnu-as"
+fi
+
+if test x${use_gnu_ld} = x &&
+ echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
+ with_gnu_ld=yes
+ extra_host_args="$extra_host_args --with-gnu-ld"
+fi
+
+# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
+# can detect this case.
+
+if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
+ with_newlib=yes
+ extra_host_args="$extra_host_args --with-newlib"
+fi
+
# Handle ${copy_dirs}
set fnord ${copy_dirs}
shift
@@ -1777,170 +2784,65 @@ while test $# != 0 ; do
shift; shift
done
-# Work in distributions that contain no compiler tools, like Autoconf.
-tentative_cc=""
-host_makefile_frag=/dev/null
-if test -d ${srcdir}/config ; then
-case "${host}" in
- m68k-hp-hpux*)
- # Avoid "too much defining" errors from HPUX compiler.
- tentative_cc="cc -Wp,-H256000"
- # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
- # If it's HP/UX ar, this should be harmless.
- RANLIB="ar ts"
- ;;
- m68k-apollo-sysv*)
- tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
- ;;
- m68k-apollo-bsd*)
- #None of the Apollo compilers can compile gas or binutils. The preprocessor
- # chokes on bfd, the compiler won't let you assign integers to enums, and
- # other problems. Defining CC to gcc is a questionable way to say "don't use
- # the apollo compiler" (the preferred version of GCC could be called cc,
- # or whatever), but I'm not sure leaving CC as cc is any better...
- #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
- # Used to have BISON=yacc.
- tentative_cc=gcc
- ;;
- m88k-dg-dgux*)
- tentative_cc="gcc -Wall -ansi -D__using_DGUX"
- ;;
- m88k-harris-cxux*)
- # Under CX/UX, we want to tell the compiler to use ANSI mode.
- tentative_cc="cc -Xa"
- host_makefile_frag="config/mh-cxux"
- ;;
- m88k-motorola-sysv*)
- ;;
- mips*-dec-ultrix*)
- tentative_cc="cc -Wf,-XNg1000"
- host_makefile_frag="config/mh-decstation"
+# Determine a target-dependent exec_prefix that the installed
+# gcc will search in. Keep this list sorted by triplet, with
+# the *-*-osname triplets last.
+md_exec_prefix=
+case "${target}" in
+ alpha*-*-*vms*)
+ md_exec_prefix=/gnu/lib/gcc-lib
;;
- mips*-nec-sysv4*)
- # The C compiler on NEC MIPS SVR4 needs bigger tables.
- tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
- host_makefile_frag="config/mh-necv4"
+ i3456786-pc-msdosdjgpp*)
+ md_exec_prefix=/dev/env/DJDIR/bin
;;
- mips*-sgi-irix4*)
- # Tell compiler to use K&R C. We can't compile under the SGI Ansi
- # environment. Also bump switch table size so that cp-parse will
- # compile. Bump string length limit so linker builds.
- tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
- ;;
- mips*-*-sysv4*)
- host_makefile_frag="config/mh-sysv4"
+ i3456786-*-sco3.2v5*)
+ if test $with_gnu_as = yes; then
+ md_exec_prefix=/usr/gnu/bin
+ else
+ md_exec_prefix=/usr/ccs/bin/elf
+ fi
;;
- mips*-*-sysv*)
- # This is for a MIPS running RISC/os 4.52C.
- # This is needed for GDB, but needs to be in the top-level make because
- # if a library is compiled with the bsd headers and gets linked with the
- # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
- # a different size).
- # ptrace(2) apparently has problems in the BSD environment. No workaround is
- # known except to select the sysv environment. Could we use /proc instead?
- # These "sysv environments" and "bsd environments" often end up being a pain.
- #
- # This is not part of CFLAGS because perhaps not all C compilers have this
- # option.
- tentative_cc="cc -systype sysv"
- ;;
- i370-ibm-opened*)
- tentative_cc="c89"
- ;;
- i[3456789]86-*-sysv5*)
- host_makefile_frag="config/mh-sysv5"
- ;;
- i[3456789]86-*-dgux*)
- tentative_cc="gcc -Wall -ansi -D__using_DGUX"
- host_makefile_frag="config/mh-dgux386"
- ;;
- i[3456789]86-ncr-sysv4.3*)
- # The MetaWare compiler will generate a copyright message unless you
- # turn it off by adding the -Hnocopyr flag.
- tentative_cc="cc -Hnocopyr"
- ;;
- i[3456789]86-ncr-sysv4*)
- # for an NCR 3000 (i486/SVR4) system.
- # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
- # This compiler not only emits obnoxious copyright messages every time
- # you run it, but it chokes and dies on a whole bunch of GNU source
- # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
- tentative_cc="/usr/ccs/ATT/cc"
- host_makefile_frag="config/mh-ncr3000"
- ;;
- i[3456789]86-*-sco3.2v5*)
- ;;
- i[3456789]86-*-sco*)
- # The native C compiler botches some simple uses of const. Unfortunately,
- # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
- tentative_cc="cc -Dconst="
- host_makefile_frag="config/mh-sco"
- ;;
- i[3456789]86-*-udk*)
- host_makefile_frag="config/mh-sysv5"
- ;;
- i[3456789]86-*-solaris2*)
- host_makefile_frag="config/mh-sysv4"
- ;;
- i[3456789]86-*-msdosdjgpp*)
- host_makefile_frag="config/mh-djgpp"
+ mn10300-*-* | \
+ powerpc-*-chorusos* | \
+ powerpc*-*-eabi* | \
+ powerpc*-*-sysv* | \
+ powerpc*-*-kaos* | \
+ s390x-ibm-tpf*)
+ md_exec_prefix=/usr/ccs/bin
;;
- *-cygwin*)
- host_makefile_frag="config/mh-cygwin"
- ;;
- *-mingw32*)
- host_makefile_frag="config/mh-mingw32"
- ;;
- *-interix*)
- host_makefile_frag="config/mh-interix"
- ;;
- vax-*-ultrix2*)
- # The old BSD pcc isn't up to compiling parts of gdb so use gcc
- tentative_cc=gcc
- ;;
- *-*-solaris2*)
- host_makefile_frag="config/mh-solaris"
- ;;
- m68k-sun-sunos*)
- # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
- # without overflowing the jump tables (-J says to use a 32 bit table)
- tentative_cc="cc -J"
- ;;
- *-hp-hpux*)
- tentative_cc="cc -Wp,-H256000"
- ;;
- *-*-hiux*)
- tentative_cc="cc -Wp,-H256000"
+ sparc64-*-elf*)
;;
- rs6000-*-lynxos*)
- # /bin/cc is less than useful for our purposes. Always use GCC
- tentative_cc="/usr/cygnus/progressive/bin/gcc"
- host_makefile_frag="config/mh-lynxrs6k"
+ v850*-*-*)
+ md_exec_prefix=/usr/ccs/bin
;;
- *-*-lynxos*)
- # /bin/cc is less than useful for our purposes. Always use GCC
- tentative_cc="/bin/gcc"
+ xtensa-*-elf*)
;;
- *-*-sysv4*)
- host_makefile_frag="config/mh-sysv4"
+
+ *-*-beos* | \
+ *-*-elf* | \
+ *-*-hpux* | \
+ *-*-netware* | \
+ *-*-nto-qnx* | \
+ *-*-rtems* | \
+ *-*-solaris2* | \
+ *-*-sysv45* | \
+ *-*-vxworks* | \
+ *-wrs-windiss)
+ md_exec_prefix=/usr/ccs/bin
;;
esac
-fi
extra_arflags_for_target=
extra_nmflags_for_target=
extra_ranlibflags_for_target=
target_makefile_frag=/dev/null
case "${target}" in
- i[3456789]86-*-netware*)
- target_makefile_frag="config/mt-netware"
- ;;
- powerpc-*-netware*)
+ *-*-netware*)
target_makefile_frag="config/mt-netware"
;;
- *-*-linux*)
- target_makefile_frag="config/mt-linux"
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ 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
@@ -1988,40 +2890,6 @@ case "${enable_target_optspace}:${target}" in
;;
esac
-# Set with_gnu_as and with_gnu_ld as appropriate.
-#
-# 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
-# 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
-# want to do that, then you should use the --without-gnu-as and
-# --without-gnu-ld options for the configure script.
-
-if test x${use_gnu_as} = x &&
- echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
- with_gnu_as=yes
- extra_host_args="$extra_host_args --with-gnu-as"
-fi
-
-if test x${use_gnu_ld} = x &&
- echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
- with_gnu_ld=yes
- extra_host_args="$extra_host_args --with-gnu-ld"
-fi
-
-# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
-# can detect this case.
-
-if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
- with_newlib=yes
- extra_host_args="$extra_host_args --with-newlib"
-fi
-
-
# Default to using --with-stabs for certain targets.
if test x${with_stabs} = x ; then
case "${target}" in
@@ -2042,282 +2910,11 @@ case "${host}" in
;;
esac
-# If we aren't going to be using gcc, see if we can extract a definition
-# of CC from the fragment.
-# Actually, use the 'pre-extracted' version above.
-if test -z "${CC}" && test "${build}" = "${host}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- found=
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/gcc; then
- found=yes
- break
- fi
- done
- IFS="$save_ifs"
- if test -z "${found}" && test -n "${tentative_cc}" ; then
- CC=$tentative_cc
- fi
-fi
-
# 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}
build_tooldir=${tooldir}
-# Generate a default definition for YACC. This is used if the makefile can't
-# locate bison or byacc in objdir.
-
-for prog in 'bison -y' byacc yacc
-do
- set dummy $prog; tmp=$2
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/$tmp; then
- DEFAULT_YACC="$prog"
- break
- fi
- done
- IFS="$save_ifs"
-
- test -n "$DEFAULT_YACC" && break
-done
-
-# Generate a default definition for M4. This is used if the makefile can't
-# locate m4 in objdir.
-
-for prog in gm4 gnum4 m4
-do
- set dummy $prog; tmp=$2
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/$tmp; then
- DEFAULT_M4="$prog"
- break
- fi
- done
- IFS="$save_ifs"
-
- test -n "$DEFAULT_M4" && break
-done
-
-# Generate a default definition for LEX. This is used if the makefile can't
-# locate flex in objdir.
-
-for prog in flex lex
-do
- set dummy $prog; tmp=$2
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/$tmp; then
- DEFAULT_LEX="$prog"
- break
- fi
- done
- IFS="$save_ifs"
-
- test -n "$DEFAULT_LEX" && break
-done
-
-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.
-
- BISON=${BISON-bison}
- 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}
- CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
- CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
- GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
- GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
- BUILD_PREFIX=${build_alias}-
- BUILD_PREFIX_1=${build_alias}-
- MAKEINFO=${MAKEINFO-makeinfo}
-
- if test -z "${YACC}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/bison; then
- YACC="bison -y"
- break
- fi
- if test -f $dir/byacc; then
- YACC=byacc
- break
- fi
- if test -f $dir/yacc; then
- YACC=yacc
- break
- fi
- done
- IFS="$save_ifs"
- if test -z "${YACC}" ; then
- YACC="bison -y"
- fi
- fi
-
- if test -z "${LEX}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/flex; then
- LEX=flex
- break
- fi
- if test -f $dir/lex; then
- LEX=lex
- break
- fi
- done
- IFS="$save_ifs"
- LEX=${LEX-flex}
- fi
-
-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...
-
- BISON="\$(USUAL_BISON)"
- CC_FOR_BUILD="\$(CC)"
- GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
- BUILD_PREFIX=
- BUILD_PREFIX_1=loser-
- MAKEINFO="\$(USUAL_MAKEINFO)"
- LEX="\$(USUAL_LEX)"
- YACC="\$(USUAL_YACC)"
-
- # If CC is still not set, try to get gcc.
- cc_prog_is_gcc=
- if test -z "${CC}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/gcc; then
- CC="gcc"
- cc_prog_is_gcc=yes
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
- else
- CFLAGS=${CFLAGS-"-O2"}
- CXXFLAGS=${CXXFLAGS-"-O2"}
- fi
- rm -f conftest*
- break
- fi
- done
- IFS="$save_ifs"
- CC=${CC-cc}
- else
- # Determine if we are using gcc.
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
- if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
- cc_prog_is_gcc=yes
- fi
- rm -f conftest.c
- if test -z "${CFLAGS}"; then
- # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
- # is set to a version of gcc.
- if test "$cc_prog_is_gcc" = yes; then
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
- else
- CFLAGS=${CFLAGS-"-O2"}
- CXXFLAGS=${CXXFLAGS-"-O2"}
- fi
- rm -f conftest*
- fi
- fi
- 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 "$cc_prog_is_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
-
- CXX=${CXX-"c++"}
- CFLAGS=${CFLAGS-"-g"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
-fi
-
-# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
-# Set up the list of links to be made.
-# ${links} is the list of link names, and ${files} is the list of names to link to.
-
-# Make the links.
-configlinks="${links}"
-if test -r ./config.status ; then
- mv -f ./config.status ./config.back
-fi
-while test -n "${files}" ; do
- # set file to car of files, files to cdr of files
- set ${files}; file=$1; shift; files=$*
- set ${links}; link=$1; shift; links=$*
-
- if test ! -r ${srcdir}/${file} ; then
- if test ! -r ${file} ; then
- echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
- echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
- exit 1
- else
- srcfile=${file}
- fi
- else
- srcfile=${srcdir}/${file}
- fi
-
- ${remove} -f ${link}
- # Make a symlink if possible, otherwise try a hard link
- if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
- true
- else
- # We need to re-remove the file because Lynx leaves a
- # very strange directory there when it fails an NFS symlink.
- ${remove} -r -f ${link}
- ${hard_link} ${srcfile} ${link}
- fi
- if test ! -r ${link} ; then
- echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
- exit 1
- fi
-
- echo "Linked \"${link}\" to \"${srcfile}\"."
-done
-
# Create a .gdbinit file which runs the one in srcdir
# and tells GDB to look there for source files.
@@ -2384,32 +2981,16 @@ case "${host}" in
;;
esac
-# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
-# binutils tools will find libbfd.so.
-case "${enable_shared}" in
- no | "") SET_LIB_PATH= ;;
- *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;;
-esac
-
case "${host}" in
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
+ *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
-
-# This is the final value for target_configdirs. configdirs already
-# has its final value, as does build_modules. It's time to create some
-# lists of valid targets.
-
-all_build_modules=
-configure_build_modules=
-for module in ${build_modules} ; do
- all_build_modules=all-build-${module}
- configure_build_modules=configure-build-${module}
-done
+build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
# Determine whether gdb needs tk/tcl or not.
# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
@@ -2419,7 +3000,7 @@ done
# leave out the maybe dependencies when enable_gdbtk is false. I'm not
# 100% sure that that's safe though.
-gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
+gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
case "$enable_gdbtk" in
no)
GDB_TK="" ;;
@@ -2436,42 +3017,102 @@ case "$enable_gdbtk" in
fi
;;
esac
+CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
+INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
-# Create the 'maybe dependencies'. This uses a temporary file.
+# Strip out unwanted targets.
# While at that, we remove Makefiles if we were started for recursive
# configuration, so that the top-level Makefile reconfigures them,
# like we used to do when configure itself was recursive.
-rm -f maybedep.tmp
-echo '# maybedep.tmp' > maybedep.tmp
-# Make-targets which may need maybe dependencies.
-mts="configure all install check clean distclean dvi info install-info"
-mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
+# Loop over modules. $extrasub must be used with care, limiting as
+# much as possible the usage of range addresses. That's because autoconf
+# splits the sed script to overcome limits in the number of commands,
+# and relying on carefully-timed sed passes may turn out to be very hard
+# to maintain later. In this particular case, you just have to be careful
+# not to nest @if/@endif pairs, because configure will not warn you at all.
+
+# Check whether --enable-bootstrap or --disable-bootstrap was given.
+if test "${enable_bootstrap+set}" = set; then
+ enableval="$enable_bootstrap"
+ :
+else
+ enable_bootstrap=default
+fi
+
+
+# Issue errors and warnings for invalid/strange bootstrap combinations.
+case "$configdirs" in
+ *gcc*) have_compiler=yes ;;
+ *) have_compiler=no ;;
+esac
+
+case "$have_compiler:$host:$target:$enable_bootstrap" in
+ *:*:*:no) ;;
+
+ # Default behavior. Enable bootstrap if we have a compiler
+ # and we are in a native configuration.
+ yes:$build:$build:default)
+ enable_bootstrap=yes ;;
+
+ *:*:*:default)
+ enable_bootstrap=no ;;
+
+ # We have a compiler and we are in a native configuration, bootstrap is ok
+ yes:$build:$build:yes)
+ ;;
+
+ # 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
+ ;;
+
+ # No compiler: if they passed --enable-bootstrap explicitly, fail
+ no:*:*:yes)
+ { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
+
+ # Fail if wrong command line
+ *)
+ { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
+ ;;
+esac
+
+# Adjust the toplevel makefile according to whether bootstrap was selected.
+case "$enable_bootstrap" in
+ yes)
+ bootstrap_suffix=bootstrap ;;
+ no)
+ bootstrap_suffix=no-bootstrap ;;
+esac
-# Loop over modules and make-targets.
-for module in ${build_modules} ; do
+for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \
&& test -f ${build_subdir}/${module}/Makefile; then
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
rm -f ${build_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- case ${mt} in
- install) ;; # No installing build modules.
- *) echo "maybe-${mt}-build-${module}: ${mt}-build-${module}" >> maybedep.tmp ;;
- esac
- done
+ extrasub="$extrasub
+/^@if build-$module\$/d
+/^@endif build-$module\$/d
+/^@if build-$module-$bootstrap_suffix\$/d
+/^@endif build-$module-$bootstrap_suffix\$/d"
done
for module in ${configdirs} ; do
- if test -z "${no_recursion}" \
- && test -f ${module}/Makefile; then
- echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
- rm -f ${module}/Makefile
+ if test -z "${no_recursion}"; then
+ for file in stage*-${module}/Makefile ${module}/Makefile; do
+ if test -f ${file}; then
+ echo 1>&2 "*** removing ${file} to force reconfigure"
+ rm -f ${file}
+ fi
+ done
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-${module}: ${mt}-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if $module\$/d
+/^@endif $module\$/d
+/^@if $module-$bootstrap_suffix\$/d
+/^@endif $module-$bootstrap_suffix\$/d"
done
for module in ${target_configdirs} ; do
if test -z "${no_recursion}" \
@@ -2479,12 +3120,15 @@ for module in ${target_configdirs} ; do
echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
rm -f ${target_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-target-${module}: ${mt}-target-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if target-$module\$/d
+/^@endif target-$module\$/d
+/^@if target-$module-$bootstrap_suffix\$/d
+/^@endif target-$module-$bootstrap_suffix\$/d"
done
-maybe_dependencies=maybedep.tmp
+extrasub="$extrasub
+/^@if /,/^@endif /d"
# Create the serialization dependencies. This uses a temporary file.
@@ -2548,21 +3192,21 @@ serialization_dependencies=serdep.tmp
# at the end of the argument list.
# These will be expanded by make, so quote '$'.
cat <<\EOF_SED > conftestsed
-s/ --no[^ ]* / /
-s/ --c[a-z-]*[= ][^ ]* / /
-s/ --sr[a-z-]*[= ][^ ]* / /
-s/ --ho[a-z-]*[= ][^ ]* / /
-s/ --bu[a-z-]*[= ][^ ]* / /
-s/ --t[a-z-]*[= ][^ ]* / /
-s/ --program-[pst][a-z-]*[= ][^ ]* / /
-s/ -cache-file[= ][^ ]* / /
-s/ -srcdir[= ][^ ]* / /
-s/ -host[= ][^ ]* / /
-s/ -build[= ][^ ]* / /
-s/ -target[= ][^ ]* / /
-s/ -program-prefix[= ][^ ]* / /
-s/ -program-suffix[= ][^ ]* / /
-s/ -program-transform-name[= ][^ ]* / /
+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
@@ -2590,7 +3234,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} ${baseargs}"
+build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
@@ -2637,26 +3281,10 @@ fi
# fixed in future. It's still worthwhile to use a cache file for each
# directory. I think.
-# Pass the appropriate --host, --build, and --cache-file arguments.
-target_configargs="--cache-file=./config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
-
-# provide a proper gxx_include_dir.
-# Note, if you change the default, make sure to fix both here and in
-# the gcc and libstdc++-v3 subdirectories.
-# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
-case "${with_gxx_include_dir}" in
- yes)
- { echo "configure: error: --with-gxx-include-dir=[dir] requires a directory" 1>&2; exit 1; }
- ;;
- no | "")
- case "${enable_version_specific_runtime_libs}" in
- yes) gxx_include_dir='${libsubdir}/include/c++' ;;
- *)
- . ${srcdir}/config.if
- gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
- esac ;;
- *) gxx_include_dir=${with_gxx_include_dir} ;;
-esac
+# 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}"
FLAGS_FOR_TARGET=
case " $target_configdirs " in
@@ -2678,7 +3306,7 @@ case " $target_configdirs " in
# to it. This is right: we don't want to search that directory
# for binaries, but we want the header files in there, so add
# them explicitly.
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
# Someone might think of using the pre-installed headers on
# Canadian crosses, in case the installed compiler is not fully
@@ -2725,82 +3353,17 @@ fi
if test "x${use_gnu_ld}" = x &&
echo " ${configdirs} " | grep " ld " > /dev/null ; then
# Arrange for us to find uninstalled linker scripts.
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
fi
-if test "x${CC_FOR_TARGET+set}" = xset; then
- :
-elif test -d ${srcdir}/gcc; then
- CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
-elif test "$host" = "$target"; then
- CC_FOR_TARGET='$(CC)'
-else
- CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
-fi
-CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-
-if test "x${GCJ_FOR_TARGET+set}" = xset; then
- :
-elif test -d ${srcdir}/gcc; then
- GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
-elif test "$host" = "$target"; then
- GCJ_FOR_TARGET='gcj'
-else
- GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
-fi
-GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-
-# Don't use libstdc++-v3's flags to configure/build itself.
-libstdcxx_flags='`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'
-raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
-
-if test "x${CXX_FOR_TARGET+set}" = xset; then
- if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then
- RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
- fi
-elif test -d ${srcdir}/gcc; then
- # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
- # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
- # default whereas gcc does not.
- # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
- # all other cases.
- CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
- RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
-elif test "$host" = "$target"; then
- CXX_FOR_TARGET='$(CXX)'
- RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
-else
- CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
- RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
-fi
-CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-
-qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
-qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
-
-# We want to defer the evaluation of `cmd`s and shell variables in
-# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
-# bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
-# quotes, but we still have to duplicate `$'s so that shell variables
-# can be expanded by the nested make as shell variables, not as make
-# macros.
-qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
-qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
-
-# Wrap CC_FOR_TARGET and friends, for certain types of builds.
-CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
-GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
-CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
-RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
-CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
-RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
-
# Makefile fragments.
-host_makefile_frag=${srcdir}/${host_makefile_frag}
-target_makefile_frag=${srcdir}/${target_makefile_frag}
-alphaieee_frag=${srcdir}/${alphaieee_frag}
-ospace_frag=${srcdir}/${ospace_frag}
+for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
+do
+ eval fragval=\$$frag
+ if test $fragval != /dev/null; then
+ eval $frag=${srcdir}/$fragval
+ fi
+done
@@ -2814,31 +3377,358 @@ ospace_frag=${srcdir}/${ospace_frag}
+# Build module lists & subconfigure args.
+# Host module lists & subconfigure args.
-# Build module lists & subconfigure args.
+# Target module lists & subconfigure args.
+# Build tools.
-# Host module lists & subconfigure args.
+# Generate default definitions for YACC, M4, LEX and other programs that run
+# on the build machine. These are used if the Makefile can't locate these
+# programs in objdir.
+MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
-# Target module lists & subconfigure args.
+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.
+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
+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"
+fi
+fi
+YACC="$ac_cv_prog_YACC"
+if test -n "$YACC"; then
+ echo "$ac_t""$YACC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="$MISSING bison -y"
+case " $build_configdirs " in
+ *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;;
+ *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;;
+esac
-# Build tools.
+for ac_prog in bison
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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
+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"
+fi
+fi
+BISON="$ac_cv_prog_BISON"
+if test -n "$BISON"; then
+ echo "$ac_t""$BISON" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+test -n "$BISON" && break
+done
+test -n "$BISON" || BISON="$MISSING bison"
+case " $build_configdirs " in
+ *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;;
+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.
+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
+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"
+fi
+fi
+M4="$ac_cv_prog_M4"
+if test -n "$M4"; then
+ echo "$ac_t""$M4" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+test -n "$M4" && break
+done
+test -n "$M4" || M4="$MISSING m4"
+case " $build_configdirs " in
+ *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;;
+esac
+
+for ac_prog in flex lex
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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
+else
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LEX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LEX="$ac_cv_prog_LEX"
+if test -n "$LEX"; then
+ echo "$ac_t""$LEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$LEX" && break
+done
+test -n "$LEX" || LEX="$MISSING flex"
+
+case " $build_configdirs " in
+ *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
+ *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;;
+esac
+
+for ac_prog in flex
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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
+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"
+fi
+fi
+FLEX="$ac_cv_prog_FLEX"
+if test -n "$FLEX"; then
+ echo "$ac_t""$FLEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$FLEX" && break
+done
+test -n "$FLEX" || FLEX="$MISSING flex"
+
+case " $build_configdirs " in
+ *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
+esac
+
+for ac_prog in makeinfo
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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
+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"
+fi
+fi
+MAKEINFO="$ac_cv_prog_MAKEINFO"
+if test -n "$MAKEINFO"; then
+ echo "$ac_t""$MAKEINFO" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$MAKEINFO" && break
+done
+test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
+
+case " $build_configdirs " in
+ *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
+ *)
+
+ # For an installed makeinfo, we require it to be from texinfo 4.4 or
+ # higher, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
+ fi
+ ;;
+
+esac
+
+# FIXME: expect and dejagnu may become build tools?
+
+for ac_prog in expect
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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
+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"
+fi
+fi
+EXPECT="$ac_cv_prog_EXPECT"
+if test -n "$EXPECT"; then
+ echo "$ac_t""$EXPECT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$EXPECT" && break
+done
+test -n "$EXPECT" || EXPECT="expect"
+
+case " $configdirs " in
+ *" expect "*)
+ test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
+ ;;
+esac
+
+for ac_prog in runtest
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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
+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"
+fi
+fi
+RUNTEST="$ac_cv_prog_RUNTEST"
+if test -n "$RUNTEST"; then
+ echo "$ac_t""$RUNTEST" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$RUNTEST" && break
+done
+test -n "$RUNTEST" || RUNTEST="runtest"
+
+case " $configdirs " in
+ *" dejagnu "*)
+ test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
+ ;;
+esac
# Host tools.
@@ -2847,11 +3737,12 @@ test -n "$host_alias" && ncn_tool_prefix=$host_alias-
ncn_target_tool_prefix=
test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
- if test -n "$ncn_tool_prefix"; then
- # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}ar; ac_word=$2
+ 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:2855: checking for $ac_word" >&5
+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
else
@@ -2863,7 +3754,7 @@ else
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}ar"
+ ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
@@ -2877,53 +3768,56 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_AR" ; then
- if test $build = $host ; then
- ncn_cv_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
+ 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:2888: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_AR"; then
- ac_cv_prog_ncn_cv_AR="$ncn_cv_AR" # Let the user override the test.
+ 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_ncn_cv_AR="ar"
+ ac_cv_prog_AR="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_AR" && ac_cv_prog_ncn_cv_AR="ar"
fi
fi
-ncn_cv_AR="$ac_cv_prog_ncn_cv_AR"
-if test -n "$ncn_cv_AR"; then
- echo "$ac_t""$ncn_cv_AR" 1>&6
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+ echo "$ac_t""$AR" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- AR=$ncn_cv_AR
+ fi
+ test -n "$ac_cv_prog_AR" && break
+done
+
+if test -z "$ac_cv_prog_AR" ; then
+ set dummy ar
+ if test $build = $host ; then
+ AR="$2"
else
- AR="${ncn_tool_prefix}ar"
+ AR="${ncn_tool_prefix}$2"
fi
-else
- AR="$ac_cv_prog_AR"
fi
- if test -n "$ncn_tool_prefix"; then
- # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}as; ac_word=$2
+ 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:2927: checking for $ac_word" >&5
+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
else
@@ -2935,7 +3829,7 @@ else
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}as"
+ ac_cv_prog_AS="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
@@ -2949,53 +3843,56 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_AS" ; then
- if test $build = $host ; then
- ncn_cv_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
+ 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:2960: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_AS"; then
- ac_cv_prog_ncn_cv_AS="$ncn_cv_AS" # Let the user override the test.
+ 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_ncn_cv_AS="as"
+ ac_cv_prog_AS="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_AS" && ac_cv_prog_ncn_cv_AS="as"
fi
fi
-ncn_cv_AS="$ac_cv_prog_ncn_cv_AS"
-if test -n "$ncn_cv_AS"; then
- echo "$ac_t""$ncn_cv_AS" 1>&6
+AS="$ac_cv_prog_AS"
+if test -n "$AS"; then
+ echo "$ac_t""$AS" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- AS=$ncn_cv_AS
+ fi
+ test -n "$ac_cv_prog_AS" && break
+done
+
+if test -z "$ac_cv_prog_AS" ; then
+ set dummy as
+ if test $build = $host ; then
+ AS="$2"
else
- AS="${ncn_tool_prefix}as"
+ AS="${ncn_tool_prefix}$2"
fi
-else
- AS="$ac_cv_prog_AS"
fi
- if test -n "$ncn_tool_prefix"; then
- # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
+ 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:2999: checking for $ac_word" >&5
+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
else
@@ -3007,7 +3904,7 @@ else
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}dlltool"
+ ac_cv_prog_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3021,53 +3918,56 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_DLLTOOL" ; then
- if test $build = $host ; then
- ncn_cv_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
+ 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:3032: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_DLLTOOL"; then
- ac_cv_prog_ncn_cv_DLLTOOL="$ncn_cv_DLLTOOL" # Let the user override the test.
+ 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_ncn_cv_DLLTOOL="dlltool"
+ ac_cv_prog_DLLTOOL="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_DLLTOOL" && ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
fi
fi
-ncn_cv_DLLTOOL="$ac_cv_prog_ncn_cv_DLLTOOL"
-if test -n "$ncn_cv_DLLTOOL"; then
- echo "$ac_t""$ncn_cv_DLLTOOL" 1>&6
+DLLTOOL="$ac_cv_prog_DLLTOOL"
+if test -n "$DLLTOOL"; then
+ echo "$ac_t""$DLLTOOL" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- DLLTOOL=$ncn_cv_DLLTOOL
+ fi
+ test -n "$ac_cv_prog_DLLTOOL" && break
+done
+
+if test -z "$ac_cv_prog_DLLTOOL" ; then
+ set dummy dlltool
+ if test $build = $host ; then
+ DLLTOOL="$2"
else
- DLLTOOL="${ncn_tool_prefix}dlltool"
+ DLLTOOL="${ncn_tool_prefix}$2"
fi
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
fi
- if test -n "$ncn_tool_prefix"; then
- # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}ld; ac_word=$2
+ 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:3071: checking for $ac_word" >&5
+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
else
@@ -3079,7 +3979,7 @@ else
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}ld"
+ ac_cv_prog_LD="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3093,53 +3993,131 @@ else
echo "$ac_t""no" 1>&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
+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"
+fi
+fi
+LD="$ac_cv_prog_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
fi
+
+ fi
+ test -n "$ac_cv_prog_LD" && break
+done
+
if test -z "$ac_cv_prog_LD" ; then
+ set dummy ld
if test $build = $host ; then
- ncn_cv_LD=$LD
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
+ LD="$2"
+ else
+ LD="${ncn_tool_prefix}$2"
+ fi
+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
+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"
+fi
+fi
+LIPO="$ac_cv_prog_LIPO"
+if test -n "$LIPO"; then
+ echo "$ac_t""$LIPO" 1>&6
+else
+ echo "$ac_t""no" 1>&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:3104: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_LD"; then
- ac_cv_prog_ncn_cv_LD="$ncn_cv_LD" # Let the user override the test.
+ 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_ncn_cv_LD="ld"
+ ac_cv_prog_LIPO="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_LD" && ac_cv_prog_ncn_cv_LD="ld"
fi
fi
-ncn_cv_LD="$ac_cv_prog_ncn_cv_LD"
-if test -n "$ncn_cv_LD"; then
- echo "$ac_t""$ncn_cv_LD" 1>&6
+LIPO="$ac_cv_prog_LIPO"
+if test -n "$LIPO"; then
+ echo "$ac_t""$LIPO" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- LD=$ncn_cv_LD
+ fi
+ test -n "$ac_cv_prog_LIPO" && break
+done
+
+if test -z "$ac_cv_prog_LIPO" ; then
+ set dummy lipo
+ if test $build = $host ; then
+ LIPO="$2"
else
- LD="${ncn_tool_prefix}ld"
+ LIPO="${ncn_tool_prefix}$2"
fi
-else
- LD="$ac_cv_prog_LD"
fi
- if test -n "$ncn_tool_prefix"; then
- # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}nm; ac_word=$2
+ 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:3143: checking for $ac_word" >&5
+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
else
@@ -3151,7 +4129,7 @@ else
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}nm"
+ ac_cv_prog_NM="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3165,53 +4143,56 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_NM" ; then
- if test $build = $host ; then
- ncn_cv_NM=$NM
- # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
+ 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:3176: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_NM"; then
- ac_cv_prog_ncn_cv_NM="$ncn_cv_NM" # Let the user override the test.
+ 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_ncn_cv_NM="nm"
+ ac_cv_prog_NM="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_NM" && ac_cv_prog_ncn_cv_NM="nm"
fi
fi
-ncn_cv_NM="$ac_cv_prog_ncn_cv_NM"
-if test -n "$ncn_cv_NM"; then
- echo "$ac_t""$ncn_cv_NM" 1>&6
+NM="$ac_cv_prog_NM"
+if test -n "$NM"; then
+ echo "$ac_t""$NM" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- NM=$ncn_cv_NM
+ fi
+ test -n "$ac_cv_prog_NM" && break
+done
+
+if test -z "$ac_cv_prog_NM" ; then
+ set dummy nm
+ if test $build = $host ; then
+ NM="$2"
else
- NM="${ncn_tool_prefix}nm"
+ NM="${ncn_tool_prefix}$2"
fi
-else
- NM="$ac_cv_prog_NM"
fi
- if test -n "$ncn_tool_prefix"; then
- # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
+ 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:3215: checking for $ac_word" >&5
+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
else
@@ -3223,7 +4204,7 @@ else
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}ranlib"
+ ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3237,53 +4218,121 @@ else
echo "$ac_t""no" 1>&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
+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"
+fi
fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ test -n "$ac_cv_prog_RANLIB" && break
+done
+
if test -z "$ac_cv_prog_RANLIB" ; then
- if test $build = $host ; then
- ncn_cv_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
+ RANLIB=":"
+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:3248: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_RANLIB"; then
- ac_cv_prog_ncn_cv_RANLIB="$ncn_cv_RANLIB" # Let the user override the test.
+ 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_ncn_cv_RANLIB="ranlib"
+ ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_RANLIB" && ac_cv_prog_ncn_cv_RANLIB=":"
fi
fi
-ncn_cv_RANLIB="$ac_cv_prog_ncn_cv_RANLIB"
-if test -n "$ncn_cv_RANLIB"; then
- echo "$ac_t""$ncn_cv_RANLIB" 1>&6
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
else
echo "$ac_t""no" 1>&6
fi
-
- RANLIB=$ncn_cv_RANLIB
- else
- RANLIB=":"
+
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
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
- RANLIB="$ac_cv_prog_RANLIB"
+ 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"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+ echo "$ac_t""$STRIP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ test -n "$ac_cv_prog_STRIP" && break
+done
+
+if test -z "$ac_cv_prog_STRIP" ; then
+ STRIP=":"
fi
- if test -n "$ncn_tool_prefix"; then
- # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}windres; ac_word=$2
+ 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:3287: checking for $ac_word" >&5
+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
else
@@ -3295,7 +4344,7 @@ else
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}windres"
+ ac_cv_prog_WINDRES="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3309,53 +4358,56 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_WINDRES" ; then
- if test $build = $host ; then
- ncn_cv_WINDRES=$WINDRES
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
+ 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:3320: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_WINDRES"; then
- ac_cv_prog_ncn_cv_WINDRES="$ncn_cv_WINDRES" # Let the user override the test.
+ 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_ncn_cv_WINDRES="windres"
+ ac_cv_prog_WINDRES="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_WINDRES" && ac_cv_prog_ncn_cv_WINDRES="windres"
fi
fi
-ncn_cv_WINDRES="$ac_cv_prog_ncn_cv_WINDRES"
-if test -n "$ncn_cv_WINDRES"; then
- echo "$ac_t""$ncn_cv_WINDRES" 1>&6
+WINDRES="$ac_cv_prog_WINDRES"
+if test -n "$WINDRES"; then
+ echo "$ac_t""$WINDRES" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- WINDRES=$ncn_cv_WINDRES
+ fi
+ test -n "$ac_cv_prog_WINDRES" && break
+done
+
+if test -z "$ac_cv_prog_WINDRES" ; then
+ set dummy windres
+ if test $build = $host ; then
+ WINDRES="$2"
else
- WINDRES="${ncn_tool_prefix}windres"
+ WINDRES="${ncn_tool_prefix}$2"
fi
-else
- WINDRES="$ac_cv_prog_WINDRES"
fi
- if test -n "$ncn_tool_prefix"; then
- # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
+ 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:3359: checking for $ac_word" >&5
+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
else
@@ -3367,7 +4419,7 @@ else
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}objcopy"
+ ac_cv_prog_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3381,53 +4433,56 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_OBJCOPY" ; then
- if test $build = $host ; then
- ncn_cv_OBJCOPY=$OBJCOPY
- # Extract the first word of "objcopy", so it can be a program name with args.
-set dummy objcopy; ac_word=$2
+ 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:3392: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_OBJCOPY"; then
- ac_cv_prog_ncn_cv_OBJCOPY="$ncn_cv_OBJCOPY" # Let the user override the test.
+ 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_ncn_cv_OBJCOPY="objcopy"
+ ac_cv_prog_OBJCOPY="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_OBJCOPY" && ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
fi
fi
-ncn_cv_OBJCOPY="$ac_cv_prog_ncn_cv_OBJCOPY"
-if test -n "$ncn_cv_OBJCOPY"; then
- echo "$ac_t""$ncn_cv_OBJCOPY" 1>&6
+OBJCOPY="$ac_cv_prog_OBJCOPY"
+if test -n "$OBJCOPY"; then
+ echo "$ac_t""$OBJCOPY" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- OBJCOPY=$ncn_cv_OBJCOPY
+ fi
+ test -n "$ac_cv_prog_OBJCOPY" && break
+done
+
+if test -z "$ac_cv_prog_OBJCOPY" ; then
+ set dummy objcopy
+ if test $build = $host ; then
+ OBJCOPY="$2"
else
- OBJCOPY="${ncn_tool_prefix}objcopy"
+ OBJCOPY="${ncn_tool_prefix}$2"
fi
-else
- OBJCOPY="$ac_cv_prog_OBJCOPY"
fi
- if test -n "$ncn_tool_prefix"; then
- # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}objdump; ac_word=$2
+ 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:3431: checking for $ac_word" >&5
+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
else
@@ -3439,7 +4494,7 @@ else
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}objdump"
+ ac_cv_prog_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3453,63 +4508,662 @@ else
echo "$ac_t""no" 1>&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
+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"
+fi
+fi
+OBJDUMP="$ac_cv_prog_OBJDUMP"
+if test -n "$OBJDUMP"; then
+ echo "$ac_t""$OBJDUMP" 1>&6
+else
+ echo "$ac_t""no" 1>&6
fi
+
+ fi
+ test -n "$ac_cv_prog_OBJDUMP" && break
+done
+
if test -z "$ac_cv_prog_OBJDUMP" ; then
+ set dummy objdump
if test $build = $host ; then
- ncn_cv_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
+ OBJDUMP="$2"
+ else
+ OBJDUMP="${ncn_tool_prefix}$2"
+ fi
+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"
+ case x"$withval" in
+ x/*) ;;
+ *)
+ with_build_time_tools=
+ echo "configure: warning: argument to --with-build-time-tools must be an absolute path" 1>&2
+ ;;
+ esac
+else
+ with_build_time_tools=
+fi
+
+
+ if 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_CC_FOR_TARGET"; then
+ for ncn_progname in cc gcc; do
+ 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
+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"
+fi
+fi
+CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
+if test -n "$CC_FOR_TARGET"; then
+ echo "$ac_t""$CC_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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:3464: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_OBJDUMP"; then
- ac_cv_prog_ncn_cv_OBJDUMP="$ncn_cv_OBJDUMP" # Let the user override the test.
+ 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_ncn_cv_OBJDUMP="objdump"
+ ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_OBJDUMP" && ac_cv_prog_ncn_cv_OBJDUMP="objdump"
fi
fi
-ncn_cv_OBJDUMP="$ac_cv_prog_ncn_cv_OBJDUMP"
-if test -n "$ncn_cv_OBJDUMP"; then
- echo "$ac_t""$ncn_cv_OBJDUMP" 1>&6
+CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
+if test -n "$CC_FOR_TARGET"; then
+ echo "$ac_t""$CC_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- OBJDUMP=$ncn_cv_OBJDUMP
+ 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
+ CC_FOR_TARGET="$2"
else
- OBJDUMP="${ncn_tool_prefix}objdump"
+ CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+fi
+
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_CXX_FOR_TARGET"; then
+ for ncn_progname in c++ g++ cxx gxx; do
+ 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
+else
+ if test -n "$CXX_FOR_TARGET"; then
+ ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
+ 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"
+fi
+fi
+CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
+if test -n "$CXX_FOR_TARGET"; then
+ echo "$ac_t""$CXX_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
+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"
+fi
+fi
+CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
+if test -n "$CXX_FOR_TARGET"; then
+ echo "$ac_t""$CXX_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
+ CXX_FOR_TARGET="$2"
+ else
+ CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+fi
+ if 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+if test -z "$ac_cv_prog_GCC_FOR_TARGET"; then
+ for ncn_progname in gcc; do
+ 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
+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"
+fi
+fi
+GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
+if test -n "$GCC_FOR_TARGET"; then
+ echo "$ac_t""$GCC_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
+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"
+fi
+fi
+GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
+if test -n "$GCC_FOR_TARGET"; then
+ echo "$ac_t""$GCC_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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}"
+fi
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+if test -z "$ac_cv_prog_GCJ_FOR_TARGET"; then
+ for ncn_progname in gcj; do
+ 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
+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"
+fi
+fi
+GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
+if test -n "$GCJ_FOR_TARGET"; then
+ echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
+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"
+fi
+fi
+GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
+if test -n "$GCJ_FOR_TARGET"; then
+ echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
+ GCJ_FOR_TARGET="$2"
+ else
+ GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+fi
+ if 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
+ for ncn_progname in gfortran; do
+ 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
+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"
+fi
+fi
+GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
+if test -n "$GFORTRAN_FOR_TARGET"; then
+ echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
-# Target tools.
- if test -n "$ncn_target_tool_prefix"; then
- # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
+ 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:3513: checking for $ac_word" >&5
+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
+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"
+fi
+fi
+GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
+if test -n "$GFORTRAN_FOR_TARGET"; then
+ echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
+ GFORTRAN_FOR_TARGET="$2"
+ 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"
+fi
+
+
+
+cat > conftest.c << \EOF
+#ifdef __GNUC__
+ gcc_yay;
+#endif
+EOF
+if ($GCC_FOR_TARGET -E conftest.c | grep gcc_yay) > /dev/null 2>&1; then
+ have_gcc_for_target=yes
+else
+ GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc
+ have_gcc_for_target=no
+fi
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
+ fi
+fi
+if test -z "$ac_cv_path_AR_FOR_TARGET" ; 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
+else
+ 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"
+ ;;
+esac
+fi
+AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
+if test -n "$AR_FOR_TARGET"; then
+ echo "$ac_t""$AR_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_AR_FOR_TARGET"; then
+ for ncn_progname in ar; do
+ 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
else
@@ -3521,7 +5175,7 @@ else
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}ar"
+ ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3535,53 +5189,134 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
- if test $build = $target ; then
- ncn_cv_AR_FOR_TARGET=$AR_FOR_TARGET
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
+ 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:3546: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_AR_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_AR_FOR_TARGET="$ncn_cv_AR_FOR_TARGET" # Let the user override the test.
+ 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_ncn_cv_AR_FOR_TARGET="ar"
+ ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_AR_FOR_TARGET" && ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
fi
fi
-ncn_cv_AR_FOR_TARGET="$ac_cv_prog_ncn_cv_AR_FOR_TARGET"
-if test -n "$ncn_cv_AR_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_AR_FOR_TARGET" 1>&6
+AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
+if test -n "$AR_FOR_TARGET"; then
+ echo "$ac_t""$AR_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- AR_FOR_TARGET=$ncn_cv_AR_FOR_TARGET
+ 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
+ AR_FOR_TARGET="$2"
else
- AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
+ AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+fi
+
else
- AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
+ AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
fi
- if test -n "$ncn_target_tool_prefix"; then
- # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}as; ac_word=$2
+
+
+
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
+ fi
+fi
+if test -z "$ac_cv_path_AS_FOR_TARGET" ; 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:3585: checking for $ac_word" >&5
+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
+else
+ 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"
+ ;;
+esac
+fi
+AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
+if test -n "$AS_FOR_TARGET"; then
+ echo "$ac_t""$AS_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
+ if 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_AS_FOR_TARGET"; then
+ for ncn_progname in as; do
+ 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
else
@@ -3593,7 +5328,7 @@ else
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}as"
+ ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3607,53 +5342,134 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
- if test $build = $target ; then
- ncn_cv_AS_FOR_TARGET=$AS_FOR_TARGET
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
+ 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:3618: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_AS_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_AS_FOR_TARGET="$ncn_cv_AS_FOR_TARGET" # Let the user override the test.
+ 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_ncn_cv_AS_FOR_TARGET="as"
+ ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_AS_FOR_TARGET" && ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
fi
fi
-ncn_cv_AS_FOR_TARGET="$ac_cv_prog_ncn_cv_AS_FOR_TARGET"
-if test -n "$ncn_cv_AS_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_AS_FOR_TARGET" 1>&6
+AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
+if test -n "$AS_FOR_TARGET"; then
+ echo "$ac_t""$AS_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- AS_FOR_TARGET=$ncn_cv_AS_FOR_TARGET
+ 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
+ AS_FOR_TARGET="$2"
else
- AS_FOR_TARGET="${ncn_target_tool_prefix}as"
+ AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+fi
+
+else
+ AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
fi
+fi
+if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; 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
+else
+ 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"
+ ;;
+esac
+fi
+DLLTOOL_FOR_TARGET="$ac_cv_path_DLLTOOL_FOR_TARGET"
+if test -n "$DLLTOOL_FOR_TARGET"; then
+ echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
else
- AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
fi
- if test -n "$ncn_target_tool_prefix"; then
- # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
+if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
+ for ncn_progname in dlltool; do
+ 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:3657: checking for $ac_word" >&5
+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
else
@@ -3665,7 +5481,7 @@ else
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}dlltool"
+ ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3679,53 +5495,134 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
- if test $build = $target ; then
- ncn_cv_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
+ 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:3690: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="$ncn_cv_DLLTOOL_FOR_TARGET" # Let the user override the test.
+ 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_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
+ ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET" && ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
fi
fi
-ncn_cv_DLLTOOL_FOR_TARGET="$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET"
-if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_DLLTOOL_FOR_TARGET" 1>&6
+DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
+if test -n "$DLLTOOL_FOR_TARGET"; then
+ echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- DLLTOOL_FOR_TARGET=$ncn_cv_DLLTOOL_FOR_TARGET
+ 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
+ DLLTOOL_FOR_TARGET="$2"
else
- DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
+ DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+fi
+
else
- DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
+ DLLTOOL_FOR_TARGET=$ac_cv_path_DLLTOOL_FOR_TARGET
fi
- if test -n "$ncn_target_tool_prefix"; then
- # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
+
+
+
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
+ fi
+fi
+if test -z "$ac_cv_path_LD_FOR_TARGET" ; 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:3729: checking for $ac_word" >&5
+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
+else
+ 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"
+ ;;
+esac
+fi
+LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
+if test -n "$LD_FOR_TARGET"; then
+ echo "$ac_t""$LD_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_LD_FOR_TARGET"; then
+ for ncn_progname in ld; do
+ 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
else
@@ -3737,7 +5634,7 @@ else
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}ld"
+ ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3751,53 +5648,287 @@ else
echo "$ac_t""no" 1>&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
+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"
+fi
+fi
+LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
+if test -n "$LD_FOR_TARGET"; then
+ echo "$ac_t""$LD_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
- ncn_cv_LD_FOR_TARGET=$LD_FOR_TARGET
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
+ LD_FOR_TARGET="$2"
+ else
+ LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+fi
+
+else
+ LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
+ fi
+fi
+if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; 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:3762: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_LD_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_LD_FOR_TARGET="$ncn_cv_LD_FOR_TARGET" # Let the user override the test.
+ 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"
+ ;;
+esac
+fi
+LIPO_FOR_TARGET="$ac_cv_path_LIPO_FOR_TARGET"
+if test -n "$LIPO_FOR_TARGET"; then
+ echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_LIPO_FOR_TARGET"; then
+ for ncn_progname in lipo; do
+ 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
+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_ncn_cv_LD_FOR_TARGET="ld"
+ ac_cv_prog_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_LD_FOR_TARGET" && ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
fi
fi
-ncn_cv_LD_FOR_TARGET="$ac_cv_prog_ncn_cv_LD_FOR_TARGET"
-if test -n "$ncn_cv_LD_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_LD_FOR_TARGET" 1>&6
+LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
+if test -n "$LIPO_FOR_TARGET"; then
+ echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
+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"
+fi
+fi
+LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
+if test -n "$LIPO_FOR_TARGET"; then
+ echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- LD_FOR_TARGET=$ncn_cv_LD_FOR_TARGET
+ 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
+ LIPO_FOR_TARGET="$2"
else
- LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
+ LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+fi
+
else
- LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
+ LIPO_FOR_TARGET=$ac_cv_path_LIPO_FOR_TARGET
fi
- if test -n "$ncn_target_tool_prefix"; then
- # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
+
+
+
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
+ fi
+fi
+if test -z "$ac_cv_path_NM_FOR_TARGET" ; 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:3801: checking for $ac_word" >&5
+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
+else
+ 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"
+ ;;
+esac
+fi
+NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
+if test -n "$NM_FOR_TARGET"; then
+ echo "$ac_t""$NM_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
+ if 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_NM_FOR_TARGET"; then
+ for ncn_progname in nm; do
+ 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
else
@@ -3809,7 +5940,7 @@ else
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}nm"
+ ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3823,53 +5954,287 @@ else
echo "$ac_t""no" 1>&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
+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"
+fi
fi
+NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
+if test -n "$NM_FOR_TARGET"; then
+ echo "$ac_t""$NM_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
- ncn_cv_NM_FOR_TARGET=$NM_FOR_TARGET
- # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
+ NM_FOR_TARGET="$2"
+ else
+ NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+fi
+
+else
+ NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
+ fi
+fi
+if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; 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:3834: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_NM_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_NM_FOR_TARGET="$ncn_cv_NM_FOR_TARGET" # Let the user override the test.
+ 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"
+ ;;
+esac
+fi
+OBJDUMP_FOR_TARGET="$ac_cv_path_OBJDUMP_FOR_TARGET"
+if test -n "$OBJDUMP_FOR_TARGET"; then
+ echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
+ for ncn_progname in objdump; do
+ 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
+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"
+fi
+fi
+OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
+if test -n "$OBJDUMP_FOR_TARGET"; then
+ echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
+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_ncn_cv_NM_FOR_TARGET="nm"
+ ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_NM_FOR_TARGET" && ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
fi
fi
-ncn_cv_NM_FOR_TARGET="$ac_cv_prog_ncn_cv_NM_FOR_TARGET"
-if test -n "$ncn_cv_NM_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_NM_FOR_TARGET" 1>&6
+OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
+if test -n "$OBJDUMP_FOR_TARGET"; then
+ echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- NM_FOR_TARGET=$ncn_cv_NM_FOR_TARGET
+ 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
+ OBJDUMP_FOR_TARGET="$2"
else
- NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
+ OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+fi
+
+else
+ OBJDUMP_FOR_TARGET=$ac_cv_path_OBJDUMP_FOR_TARGET
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
fi
+fi
+if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; 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
+else
+ 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"
+ ;;
+esac
+fi
+RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
+if test -n "$RANLIB_FOR_TARGET"; then
+ echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
else
- NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
fi
- if test -n "$ncn_target_tool_prefix"; then
- # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
+if test -z "$ac_cv_prog_RANLIB_FOR_TARGET"; then
+ for ncn_progname in ranlib; do
+ 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:3873: checking for $ac_word" >&5
+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
else
@@ -3881,7 +6246,7 @@ else
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}ranlib"
+ ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3895,53 +6260,287 @@ else
echo "$ac_t""no" 1>&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
+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"
fi
+fi
+RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
+if test -n "$RANLIB_FOR_TARGET"; then
+ echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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
- ncn_cv_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
+ RANLIB_FOR_TARGET="$2"
+ else
+ RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+fi
+
+else
+ RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
+ fi
+fi
+if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; 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
+else
+ 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"
+ ;;
+esac
+fi
+STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
+if test -n "$STRIP_FOR_TARGET"; then
+ echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_STRIP_FOR_TARGET"; then
+ for ncn_progname in strip; do
+ 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
+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"
+fi
+fi
+STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
+if test -n "$STRIP_FOR_TARGET"; then
+ echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&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:3906: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="$ncn_cv_RANLIB_FOR_TARGET" # Let the user override the test.
+ 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_ncn_cv_RANLIB_FOR_TARGET="ranlib"
+ ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET" && ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET=":"
fi
fi
-ncn_cv_RANLIB_FOR_TARGET="$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET"
-if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_RANLIB_FOR_TARGET" 1>&6
+STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
+if test -n "$STRIP_FOR_TARGET"; then
+ echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- RANLIB_FOR_TARGET=$ncn_cv_RANLIB_FOR_TARGET
+ 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
+ STRIP_FOR_TARGET="$2"
else
- RANLIB_FOR_TARGET=":"
+ STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+fi
+
else
- RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
+ STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
fi
- if test -n "$ncn_target_tool_prefix"; then
- # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
+
+
+
+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
+ 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
+ else
+ echo "$ac_t""no" 1>&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
+ fi
+fi
+if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; 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:3945: checking for $ac_word" >&5
+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
+else
+ 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"
+ ;;
+esac
+fi
+WINDRES_FOR_TARGET="$ac_cv_path_WINDRES_FOR_TARGET"
+if test -n "$WINDRES_FOR_TARGET"; then
+ echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; 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
+ 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
+ break
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_WINDRES_FOR_TARGET"; then
+ for ncn_progname in windres; do
+ 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
else
@@ -3953,7 +6552,7 @@ else
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}windres"
+ ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
break
fi
done
@@ -3967,81 +6566,618 @@ else
echo "$ac_t""no" 1>&6
fi
-fi
-if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
- if test $build = $target ; then
- ncn_cv_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
+ 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:3978: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
+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
else
- if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
- ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="$ncn_cv_WINDRES_FOR_TARGET" # Let the user override the test.
+ 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_ncn_cv_WINDRES_FOR_TARGET="windres"
+ ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET" && ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
fi
fi
-ncn_cv_WINDRES_FOR_TARGET="$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET"
-if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
- echo "$ac_t""$ncn_cv_WINDRES_FOR_TARGET" 1>&6
+WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
+if test -n "$WINDRES_FOR_TARGET"; then
+ echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- WINDRES_FOR_TARGET=$ncn_cv_WINDRES_FOR_TARGET
+ 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
+ WINDRES_FOR_TARGET="$2"
else
- WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
+ WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
-else
- WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
fi
+else
+ WINDRES_FOR_TARGET=$ac_cv_path_WINDRES_FOR_TARGET
+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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ AR_FOR_TARGET='$(AR)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ AS_FOR_TARGET='$(AS)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ CC_FOR_TARGET='$(CC)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" gcc "*) ;;
+ *) ok=no ;;
+ esac
+ case ,${enable_languages}, in
+ *,c++,*) ;;
+ *) ok=no ;;
+ esac
+ 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ CXX_FOR_TARGET='$(CXX)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" gcc "*) ;;
+ *) ok=no ;;
+ esac
+ case ,${enable_languages}, in
+ *,c++,*) ;;
+ *) ok=no ;;
+ esac
+ 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
+ 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
+ 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
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ DLLTOOL_FOR_TARGET='$(DLLTOOL)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ GCC_FOR_TARGET='$()'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" gcc "*) ;;
+ *) ok=no ;;
+ esac
+ case ,${enable_languages}, in
+ *,java,*) ;;
+ *) ok=no ;;
+ esac
+ 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ GCJ_FOR_TARGET='$(GCJ)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" gcc "*) ;;
+ *) ok=no ;;
+ esac
+ case ,${enable_languages}, in
+ *,fortran,*) ;;
+ *) ok=no ;;
+ esac
+ 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ GFORTRAN_FOR_TARGET='$(GFORTRAN)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ LD_FOR_TARGET='$(LD)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ LIPO_FOR_TARGET='$(LIPO)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ NM_FOR_TARGET='$(NM)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ OBJDUMP_FOR_TARGET='$(OBJDUMP)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ RANLIB_FOR_TARGET='$(RANLIB)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ STRIP_FOR_TARGET='$(STRIP)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&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
+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
+ else
+ # Canadian cross, just use what we found
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" 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
+ 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
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ WINDRES_FOR_TARGET='$(WINDRES)'
+ echo "$ac_t""host tool" 1>&6
+ else
+ # We need a cross tool
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+fi
-
-
-
-# Fix up target tools.
-if test "x${build}" = "x${host}" ; then
- # In this case, the newly built tools can and should be used,
- # so we override the results of the autoconf tests.
- # This should really only happen when the tools are actually being built,
- # but that's a further refinement. The new build scheme, where
- # tools are built into a structure paralleling where they're installed,
- # should also eliminate all of this cleanly.
- AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
- AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
- DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
- LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
- NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
- RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
- WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
-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}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
+# When building target libraries, except in a Canadian cross, we use
+# the same toolchain as the compiler we just built.
+COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
+COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
+COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
+if test $host = $build; then
+ case " $configdirs " in
+ *" gcc "*)
+ COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
+ COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
+ COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target}
+ ;;
+ esac
+fi
+
+
+
+
+
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4045: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:7181: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -4062,6 +7198,76 @@ else
fi
MAINT=$MAINTAINER_MODE_TRUE
+# ---------------------
+# GCC bootstrap support
+# ---------------------
+
+# Stage specific cflags for build.
+stage1_cflags="-g"
+case $build in
+ vax-*-*)
+ case ${GCC} 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
+
+
+# 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
+ enable_werror=yes
+fi
+
+case ${enable_werror} in
+ yes) stage2_werror_flag="--enable-werror-always" ;;
+ *) stage2_werror_flag="" ;;
+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
+
+
+# Check whether --with-docdir or --without-docdir was given.
+if test "${with_docdir+set}" = set; then
+ withval="$with_docdir"
+ docdir="\${prefix}/${withval}"
+else
+ docdir="\${datarootdir}/doc"
+fi
+
+
+# Check whether --with-htmldir or --without-htmldir was given.
+if test "${with_htmldir+set}" = set; then
+ withval="$with_htmldir"
+ htmldir="\${prefix}/${withval}"
+else
+ htmldir="\${docdir}"
+fi
+
+
+
+
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -4128,15 +7334,34 @@ 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.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+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.
@@ -4225,12 +7450,19 @@ 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
-/@maybe_dependencies@/r $maybe_dependencies
-s%@maybe_dependencies@%%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
/@serialization_dependencies@/r $serialization_dependencies
s%@serialization_dependencies@%%g
/@host_makefile_frag@/r $host_makefile_frag
@@ -4241,80 +7473,68 @@ s%@target_makefile_frag@%%g
s%@alphaieee_frag@%%g
/@ospace_frag@/r $ospace_frag
s%@ospace_frag@%%g
-s%@SET_LIB_PATH@%$SET_LIB_PATH%g
s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
-s%@BUILD_PREFIX@%$BUILD_PREFIX%g
-s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
-s%@configlinks@%$configlinks%g
-s%@gcc_version_trigger@%$gcc_version_trigger%g
-s%@gcc_version@%$gcc_version%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%@gxx_include_dir@%$gxx_include_dir%g
-s%@libstdcxx_incdir@%$libstdcxx_incdir%g
+s%@INSTALL_GDB_TK@%$INSTALL_GDB_TK%g
s%@build_configargs@%$build_configargs%g
-s%@configure_build_modules@%$configure_build_modules%g
-s%@all_build_modules@%$all_build_modules%g
+s%@build_configdirs@%$build_configdirs%g
s%@host_configargs@%$host_configargs%g
s%@configdirs@%$configdirs%g
s%@target_configargs@%$target_configargs%g
-s%@target_configdirs@%$target_configdirs%g
-s%@BISON@%$BISON%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%@YACC@%$YACC%g
-s%@config_shell@%$config_shell%g
+s%@EXPECT@%$EXPECT%g
+s%@RUNTEST@%$RUNTEST%g
s%@AR@%$AR%g
-s%@ncn_cv_AR@%$ncn_cv_AR%g
s%@AS@%$AS%g
-s%@ncn_cv_AS@%$ncn_cv_AS%g
s%@DLLTOOL@%$DLLTOOL%g
-s%@ncn_cv_DLLTOOL@%$ncn_cv_DLLTOOL%g
s%@LD@%$LD%g
-s%@ncn_cv_LD@%$ncn_cv_LD%g
+s%@LIPO@%$LIPO%g
s%@NM@%$NM%g
-s%@ncn_cv_NM@%$ncn_cv_NM%g
s%@RANLIB@%$RANLIB%g
-s%@ncn_cv_RANLIB@%$ncn_cv_RANLIB%g
+s%@STRIP@%$STRIP%g
s%@WINDRES@%$WINDRES%g
-s%@ncn_cv_WINDRES@%$ncn_cv_WINDRES%g
s%@OBJCOPY@%$OBJCOPY%g
-s%@ncn_cv_OBJCOPY@%$ncn_cv_OBJCOPY%g
s%@OBJDUMP@%$OBJDUMP%g
-s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g
-s%@CC@%$CC%g
s%@CXX@%$CXX%g
s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
-s%@DEFAULT_YACC@%$DEFAULT_YACC%g
-s%@DEFAULT_LEX@%$DEFAULT_LEX%g
-s%@DEFAULT_M4@%$DEFAULT_M4%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%@ncn_cv_AR_FOR_TARGET@%$ncn_cv_AR_FOR_TARGET%g
s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
-s%@ncn_cv_AS_FOR_TARGET@%$ncn_cv_AS_FOR_TARGET%g
s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
-s%@ncn_cv_DLLTOOL_FOR_TARGET@%$ncn_cv_DLLTOOL_FOR_TARGET%g
s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
-s%@ncn_cv_LD_FOR_TARGET@%$ncn_cv_LD_FOR_TARGET%g
+s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
-s%@ncn_cv_NM_FOR_TARGET@%$ncn_cv_NM_FOR_TARGET%g
+s%@OBJDUMP_FOR_TARGET@%$OBJDUMP_FOR_TARGET%g
s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
-s%@ncn_cv_RANLIB_FOR_TARGET@%$ncn_cv_RANLIB_FOR_TARGET%g
+s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
-s%@ncn_cv_WINDRES_FOR_TARGET@%$ncn_cv_WINDRES_FOR_TARGET%g
-s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
-s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
-s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
-s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
-s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
-s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%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
CEOF
EOF
diff --git a/contrib/binutils/configure.in b/contrib/binutils/configure.in
index 3355f0e34a07..b6ef515e01d1 100644
--- a/contrib/binutils/configure.in
+++ b/contrib/binutils/configure.in
@@ -1,5 +1,5 @@
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 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
@@ -13,11 +13,13 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##############################################################################
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
+sinclude(config/acx.m4)
+
AC_INIT(move-if-change)
AC_PREREQ(2.13)
AC_CANONICAL_SYSTEM
@@ -25,8 +27,8 @@ AC_ARG_PROGRAM
# Get 'install' or 'install-sh' and its variants.
AC_PROG_INSTALL
-
-sinclude(config/acx.m4)
+ACX_PROG_LN
+AC_PROG_LN_S
### we might need to use some other shell than /bin/sh for running subshells
### If we are on Windows, search for the shell. This will permit people
@@ -78,10 +80,17 @@ AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
moveifchange=${srcdir}/move-if-change
+srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
+
+# We pass INSTALL explicitly to sub-makes. Make sure that it is not
+# a relative path.
+if test "$INSTALL" = "${srcdir}/install-sh -c"; then
+ INSTALL="${srcpwd}/install-sh -c"
+fi
+
# Set srcdir to "." if that's what it is.
# This is important for multilib support.
pwd=`${PWDCMD-pwd}`
-srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
if test "${pwd}" = "${srcpwd}" ; then
srcdir=.
fi
@@ -89,26 +98,6 @@ fi
topsrcdir=$srcpwd
extra_host_args=
-# Define the trigger file to make sure configure will re-run whenever
-# the gcc version number changes.
-if test "${with_gcc_version_trigger+set}" = set ; then
- gcc_version_trigger="$with_gcc_version_trigger"
- gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
-else
- # If gcc's sources are available, define the trigger file.
- if test -f ${topsrcdir}/gcc/version.c ; then
- gcc_version_trigger=${topsrcdir}/gcc/version.c
- gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
- case "$ac_configure_args" in
- *--with-gcc-version-trigger=$gcc_version_trigger* )
- ;;
- * )
- # Add to all subconfigure arguments: build, host, and target.
- ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
- ;;
- esac
- fi
-fi
### To add a new directory to the tree, first choose whether it is a target
### or a host dependent tool. Then put it into the appropriate list
@@ -124,16 +113,24 @@ fi
# Double entries in build_configdirs, configdirs, or target_configdirs may
# cause circular dependencies and break everything horribly.
+# these library is used by various programs built for the build
+# environment
+#
+build_libs="build-libiberty"
+
+# these tools are built for the build environment
+build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
+
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
# know that we are building the simulator.
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
-host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar"
+host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
# libgcj represents the runtime libraries only used by gcj.
libgcj="target-libffi \
@@ -149,10 +146,14 @@ target_libraries="target-libiberty \
target-libgloss \
target-newlib \
target-libstdc++-v3 \
- target-libf2c \
+ target-libmudflap \
+ target-libssp \
+ target-libgcc-math \
+ target-libgfortran \
${libgcj} \
target-libobjc \
- target-libada"
+ target-libada \
+ target-libgomp"
# these tools are built using the target libraries, and are intended to
# run only in the target environment
@@ -170,19 +171,9 @@ target_tools="target-examples target-groff target-gperf target-rda"
## is important because configure will choke if they ever get through.
## ${configdirs} is directories we build using the host tools.
## ${target_configdirs} is directories we build using the target tools.
-#
configdirs=`echo ${host_libs} ${host_tools}`
target_configdirs=`echo ${target_libraries} ${target_tools}`
-
-# Only make build modules if build != host.
-# This should be done more generally, but at the moment it doesn't matter.
-if test ${host_alias} != ${build_alias} ; then
- # This is the only build module.
- build_modules=libiberty
-else
- build_modules=
-fi
-
+build_configdirs=`echo ${build_libs} ${build_tools}`
################################################################################
@@ -227,7 +218,7 @@ fi
case ${with_x} in
yes | "") ;; # the default value for this tree is that X11 is available
no)
- skipdirs="${skipdirs} tk tix itcl libgui"
+ skipdirs="${skipdirs} tk itcl libgui"
# We won't be able to build gdbtk without X.
enable_gdbtk=no
;;
@@ -249,8 +240,8 @@ esac
# If both --with-headers and --with-libs are specified, default to
# --without-newlib.
-if test x"${with_headers}" != x && test x"${with_headers} != xno \
- && test x"${with_libs}" != x && test x"${with_libs} != xno ; then
+if test x"${with_headers}" != x && test x"${with_headers}" != xno \
+ && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
if test x"${with_newlib}" = x ; then
with_newlib=no
fi
@@ -269,6 +260,10 @@ case "${host}" in
configdirs="$configdirs libtermcap" ;;
esac
+# A target can indicate whether a language isn't supported for some reason.
+# Only spaces may be used in this macro; not newlines or tabs.
+unsupported_languages=
+
# Remove more programs from consideration, based on the host or
# target this usually means that a port of the program doesn't
# exist yet.
@@ -278,17 +273,17 @@ case "${host}" in
noconfigdirs="$noconfigdirs byacc"
;;
i[[3456789]]86-*-vsta)
- noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
+ noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
;;
i[[3456789]]86-*-go32* | i[[3456789]]86-*-msdosdjgpp*)
- noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
+ noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
;;
i[[3456789]]86-*-mingw32*)
- # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
+ # 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"
;;
i[[3456789]]86-*-beos*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
+ noconfigdirs="$noconfigdirs tk itcl libgui gdb"
;;
*-*-cygwin*)
noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
@@ -297,24 +292,39 @@ case "${host}" in
noconfigdirs="$noconfigdirs rcs"
;;
ppc*-*-pe)
- noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
+ noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
;;
powerpc-*-beos*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
- ;;
- *-*-darwin*)
- noconfigdirs="$noconfigdirs tk itcl tix libgui"
+ noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
;;
esac
+
AC_ARG_ENABLE(libada,
[ --enable-libada Builds libada directory],
ENABLE_LIBADA=$enableval,
ENABLE_LIBADA=yes)
if test "${ENABLE_LIBADA}" != "yes" ; then
- noconfigdirs="$noconfigdirs target-libada"
+ noconfigdirs="$noconfigdirs gnattools"
fi
+AC_ARG_ENABLE(libssp,
+[ --enable-libssp Builds libssp directory],
+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
@@ -331,24 +341,77 @@ no)
;;
esac
+
+# Disable libmudflap on some systems.
+if test x$enable_libmudflap = x ; then
+ case "${target}" in
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ # Enable libmudflap by default in GNU and friends.
+ ;;
+ *-*-freebsd*)
+ # Enable libmudflap by default in FreeBSD.
+ ;;
+ *)
+ # Disable it by default everywhere else.
+ noconfigdirs="$noconfigdirs target-libmudflap"
+ ;;
+ esac
+fi
+
+# Disable libgomp on non POSIX hosted systems.
+if test x$enable_libgomp = x ; then
+ # Enable libgomp by default on hosted POSIX systems.
+ case "${target}" in
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ ;;
+ *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
+ ;;
+ *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
+ ;;
+ *-*-darwin* | *-*-aix*)
+ ;;
+ *)
+ noconfigdirs="$noconfigdirs target-libgomp"
+ ;;
+ esac
+fi
+
+
case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
powerpc-*-darwin*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
- noconfigdirs="$noconfigdirs target-libobjc"
+ noconfigdirs="$noconfigdirs sim target-rda"
;;
*-*-darwin*)
- noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
- noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
+ noconfigdirs="$noconfigdirs ld gas gdb gprof"
+ noconfigdirs="$noconfigdirs sim target-rda"
+ noconfigdirs="$noconfigdirs ${libgcj}"
;;
*-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
+ *-*-freebsd*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
+ && test -f /usr/local/include/gmp.h; then
+ with_gmp=/usr/local
+ fi
+
+ # Skip some stuff that's unsupported on some FreeBSD configurations.
+ case "${target}" in
+ i*86-*-*) ;;
+ alpha*-*-*) ;;
+ *)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ esac
+ ;;
*-*-kaos*)
# Remove unsupported stuff on all kaOS configurations.
- skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
+ skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
noconfigdirs="$noconfigdirs target-libgloss"
@@ -366,23 +429,24 @@ case "${target}" in
;;
esac
;;
- *-*-netware)
- noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
+ *-*-netware*)
+ noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- case ${target} in
- h8300*-*-* | h8500-*-*)
- noconfigdirs="$noconfigdirs target-libf2c"
- ;;
- *) ;;
- esac
+ ;;
+ # The tpf target doesn't support gdb yet.
+ *-*-tpf*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj} target-libmudflap gdb tcl tk libgui itcl"
;;
*-*-uclinux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
;;
*-*-vxworks*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj}"
+ 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.
@@ -397,9 +461,6 @@ case "${target}" in
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
- alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
alpha*-*-*)
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
@@ -414,7 +475,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs ${libgcj}"
noconfigdirs="$noconfigdirs target-examples"
noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
- noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
+ noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
noconfigdirs="$noconfigdirs expect dejagnu"
# the C++ libraries don't build on top of CE's C libraries
noconfigdirs="$noconfigdirs target-libstdc++-v3"
@@ -428,16 +489,22 @@ case "${target}" in
arc-*-*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
+ arm-semi-aof )
+ ;;
arm-*-coff | strongarm-*-coff | xscale-*-coff)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
;;
- arm-*-pe*)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+ arm*-*-linux-gnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
;;
- arm-*-oabi*)
+ arm*-*-symbianelf*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
+ ;;
+ arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
thumb-*-coff)
@@ -446,9 +513,6 @@ case "${target}" in
thumb-*-elf)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
- thumb-*-oabi)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
thumb-*-pe)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
@@ -458,14 +522,36 @@ case "${target}" in
avr-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
+ bfin-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss gdb"
+ if test x${is_cross_compiler} != xno ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
c4x-*-* | tic4x-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
c54x*-*-* | tic54x-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
;;
- cris-*-*)
- noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ cris-*-* | crisv32-*-*)
+ unsupported_languages="$unsupported_languages java"
+ case "${target}" in
+ *-*-aout)
+ unsupported_languages="$unsupported_languages fortran"
+ noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
+ *-*-elf)
+ unsupported_languages="$unsupported_languages fortran"
+ noconfigdirs="$noconfigdirs target-boehm-gc";;
+ *-*-linux*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
+ *)
+ unsupported_languages="$unsupported_languages fortran"
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
+ esac
+ ;;
+ crx-*-*)
+ noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
;;
d10v-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
@@ -480,10 +566,12 @@ case "${target}" in
noconfigdirs="$noconfigdirs ${libgcj}"
;;
h8300*-*-*)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj} target-libf2c"
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
h8500-*-*)
- noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
+ noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
+ ;;
+ hppa1.1-*-osf* | hppa1.1-*-bsd* )
;;
hppa*64*-*-linux* | parisc*64*-*-linux*)
# In this case, it's because the hppa64-linux target is for
@@ -491,13 +579,13 @@ case "${target}" in
# headers, crt*.o, etc., all of which are needed by these.
noconfigdirs="$noconfigdirs target-zlib"
;;
+ parisc*-*-linux* | hppa*-*-linux*)
+ ;;
hppa*-*-*elf* | \
- parisc*-*-linux* | hppa*-*-linux* | \
hppa*-*-lites* | \
hppa*-*-openbsd* | \
hppa*64*-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
- # Do configure ld/binutils/gas for this case.
;;
hppa*-*-*)
# According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
@@ -509,18 +597,17 @@ case "${target}" in
;;
ia64*-*-elf*)
# No gdb support yet.
- noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
+ noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
;;
ia64*-**-hpux*)
# No gdb or ld support yet.
- noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
+ noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
+ ;;
+ i370-*-opened*)
;;
i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
i[[3456789]]86-*-linux*)
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
# not build java stuff by default.
@@ -547,23 +634,30 @@ case "${target}" in
# 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 tix gnuserv"
+ *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
;;
esac
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
- # always build newlib.
- skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
+ # always build newlib if winsup directory is present.
+ if test -d "$srcdir/winsup"; 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."
+ 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 tix libgui gnuserv"
+ *) 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* )
+ ;;
i[[3456789]]86-*-pe)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
@@ -584,6 +678,9 @@ case "${target}" in
i[[3456789]]86-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
;;
+ i[[3456789]]86-*-rdos*)
+ noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
+ ;;
m32r-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
@@ -602,7 +699,8 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
mmix-*-*)
- noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
+ noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb libgloss"
+ unsupported_languages="$unsupported_languages fortran java"
;;
mn10200-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
@@ -610,19 +708,22 @@ case "${target}" in
mn10300-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ mt-*-*)
+ noconfigdirs="$noconfigdirs sim"
+ ;;
powerpc-*-aix*)
# copied from rs6000-*-* entry
- noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
;;
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
target_configdirs="$target_configdirs target-winsup"
- noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
;;
# This is temporary until we can link against shared libraries
powerpcle-*-solaris*)
- noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
+ noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
@@ -630,11 +731,13 @@ case "${target}" in
powerpc-*-eabi)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
+ ;;
rs6000-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
;;
rs6000-*-aix*)
- noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
;;
rs6000-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
@@ -661,6 +764,9 @@ case "${target}" in
mipstx39-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
;;
+ mips64*-*-linux*)
+ noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
+ ;;
mips*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
@@ -670,7 +776,7 @@ case "${target}" in
romp-*-*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
;;
- sh-*-*)
+ sh-*-* | sh64-*-*)
case "${host}" in
i[[3456789]]86-*-vsta) ;; # don't add gprof back in
i[[3456789]]86-*-go32*) ;; # don't add gprof back in
@@ -679,9 +785,6 @@ case "${target}" in
esac
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
- sh64-*-*)
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
sparc-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
@@ -699,6 +802,9 @@ case "${target}" in
use_gnu_ld=no
fi
;;
+ sparc-*-solaris2.[[0-6]] | sparc-*-solaris2.[[0-6]].*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
;;
v810-*-*)
@@ -725,7 +831,7 @@ case "${target}" in
ip2k-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
- *-*-linux*)
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
*-*-lynxos*)
@@ -743,105 +849,490 @@ case "${noconfigdirs}" in
*target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
esac
+# Work in distributions that contain no compiler tools, like Autoconf.
+tentative_cc=""
+host_makefile_frag=/dev/null
+if test -d ${srcdir}/config ; then
+case "${host}" in
+ m68k-hp-hpux*)
+ # Avoid "too much defining" errors from HPUX compiler.
+ tentative_cc="cc -Wp,-H256000"
+ # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
+ # If it's HP/UX ar, this should be harmless.
+ RANLIB="ar ts"
+ ;;
+ m68k-apollo-sysv*)
+ tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
+ ;;
+ m68k-apollo-bsd*)
+ #None of the Apollo compilers can compile gas or binutils. The preprocessor
+ # chokes on bfd, the compiler won't let you assign integers to enums, and
+ # other problems. Defining CC to gcc is a questionable way to say "don't use
+ # the apollo compiler" (the preferred version of GCC could be called cc,
+ # or whatever), but I'm not sure leaving CC as cc is any better...
+ #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
+ # Used to have BISON=yacc.
+ tentative_cc=gcc
+ ;;
+ m88k-dg-dgux*)
+ tentative_cc="gcc -Wall -ansi -D__using_DGUX"
+ ;;
+ m88k-harris-cxux*)
+ # Under CX/UX, we want to tell the compiler to use ANSI mode.
+ tentative_cc="cc -Xa"
+ host_makefile_frag="config/mh-cxux"
+ ;;
+ m88k-motorola-sysv*)
+ ;;
+ mips*-dec-ultrix*)
+ tentative_cc="cc -Wf,-XNg1000"
+ host_makefile_frag="config/mh-decstation"
+ ;;
+ mips*-nec-sysv4*)
+ # The C compiler on NEC MIPS SVR4 needs bigger tables.
+ tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
+ host_makefile_frag="config/mh-necv4"
+ ;;
+ mips*-sgi-irix4*)
+ # Tell compiler to use K&R C. We can't compile under the SGI Ansi
+ # environment. Also bump switch table size so that cp-parse will
+ # compile. Bump string length limit so linker builds.
+ tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
+ ;;
+ mips*-*-sysv4*)
+ host_makefile_frag="config/mh-sysv4"
+ ;;
+ mips*-*-sysv*)
+ # This is for a MIPS running RISC/os 4.52C.
+
+ # This is needed for GDB, but needs to be in the top-level make because
+ # if a library is compiled with the bsd headers and gets linked with the
+ # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
+ # a different size).
+ # ptrace(2) apparently has problems in the BSD environment. No workaround is
+ # known except to select the sysv environment. Could we use /proc instead?
+ # These "sysv environments" and "bsd environments" often end up being a pain.
+ #
+ # This is not part of CFLAGS because perhaps not all C compilers have this
+ # option.
+ tentative_cc="cc -systype sysv"
+ ;;
+ i370-ibm-opened*)
+ tentative_cc="c89"
+ ;;
+ i[[3456789]]86-*-sysv5*)
+ host_makefile_frag="config/mh-sysv5"
+ ;;
+ i[[3456789]]86-*-dgux*)
+ tentative_cc="gcc -Wall -ansi -D__using_DGUX"
+ host_makefile_frag="config/mh-dgux386"
+ ;;
+ i[[3456789]]86-ncr-sysv4.3*)
+ # The MetaWare compiler will generate a copyright message unless you
+ # turn it off by adding the -Hnocopyr flag.
+ tentative_cc="cc -Hnocopyr"
+ ;;
+ i[[3456789]]86-ncr-sysv4*)
+ # for an NCR 3000 (i486/SVR4) system.
+ # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
+ # This compiler not only emits obnoxious copyright messages every time
+ # you run it, but it chokes and dies on a whole bunch of GNU source
+ # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
+ tentative_cc="/usr/ccs/ATT/cc"
+ host_makefile_frag="config/mh-ncr3000"
+ ;;
+ i[[3456789]]86-*-sco3.2v5*)
+ ;;
+ i[[3456789]]86-*-sco*)
+ # The native C compiler botches some simple uses of const. Unfortunately,
+ # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
+ tentative_cc="cc -Dconst="
+ host_makefile_frag="config/mh-sco"
+ ;;
+ i[[3456789]]86-*-udk*)
+ host_makefile_frag="config/mh-sysv5"
+ ;;
+ i[[3456789]]86-*-solaris2*)
+ host_makefile_frag="config/mh-sysv4"
+ ;;
+ i[[3456789]]86-*-msdosdjgpp*)
+ host_makefile_frag="config/mh-djgpp"
+ ;;
+ *-cygwin*)
+ host_makefile_frag="config/mh-cygwin"
+ ;;
+ *-mingw32*)
+ ;;
+ *-interix*)
+ host_makefile_frag="config/mh-interix"
+ ;;
+ vax-*-ultrix2*)
+ # The old BSD pcc isn't up to compiling parts of gdb so use gcc
+ tentative_cc=gcc
+ ;;
+ *-*-solaris2*)
+ host_makefile_frag="config/mh-solaris"
+ ;;
+ m68k-sun-sunos*)
+ # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
+ # without overflowing the jump tables (-J says to use a 32 bit table)
+ tentative_cc="cc -J"
+ ;;
+ *-hp-hpux*)
+ tentative_cc="cc -Wp,-H256000"
+ ;;
+ *-*-hiux*)
+ tentative_cc="cc -Wp,-H256000"
+ ;;
+ rs6000-*-lynxos*)
+ # /bin/cc is less than useful for our purposes. Always use GCC
+ tentative_cc="/usr/cygnus/progressive/bin/gcc"
+ host_makefile_frag="config/mh-lynxrs6k"
+ ;;
+ powerpc-*-darwin*)
+ host_makefile_frag="config/mh-ppc-darwin"
+ ;;
+ powerpc-*-aix*)
+ host_makefile_frag="config/mh-ppc-aix"
+ ;;
+ rs6000-*-aix*)
+ host_makefile_frag="config/mh-ppc-aix"
+ ;;
+ *-*-lynxos*)
+ # /bin/cc is less than useful for our purposes. Always use GCC
+ tentative_cc="/bin/gcc"
+ ;;
+ *-*-sysv4*)
+ host_makefile_frag="config/mh-sysv4"
+ ;;
+ # This is placed last to prevent interfering with the cases above.
+ i[[3456789]]86-*-*)
+ # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
+ host_makefile_frag="config/mh-x86omitfp"
+ ;;
+esac
+fi
+
+# If we aren't going to be using gcc, see if we can extract a definition
+# of CC from the fragment.
+# Actually, use the 'pre-extracted' version above.
+if test -z "${CC}" && test "${build}" = "${host}" ; then
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ found=
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/gcc; then
+ found=yes
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -z "${found}" && test -n "${tentative_cc}" ; then
+ CC=$tentative_cc
+ fi
+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
+
+ CXX=${CXX-"c++"}
+ CFLAGS=${CFLAGS-"-g"}
+ CXXFLAGS=${CXXFLAGS-"-g -O2"}
+fi
+
+ACX_PROG_GNAT
+ACX_PROG_CMP_IGNORE_INITIAL
+
+# Check for GMP and MPFR
+gmplibs=
+gmpinc=
+have_gmp=yes
+# 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])
+
+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])
+
+if test "x$with_mpfr" != x; then
+ gmplibs="-L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+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, [ --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
+
+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"
+ CFLAGS="$saved_CFLAGS"
+fi
+
+# Flags needed for both GMP and/or MPFR
+AC_SUBST(gmplibs)
+AC_SUBST(gmpinc)
+
+# By default, C is the only stage 1 language.
+stage1_languages=c
+AC_SUBST(stage1_languages)
+
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might
# go away some day.
# NB: embedded tabs in this IF block -- do not untabify
-if test x"${enable_languages+set}" != xset; then
- if test x"${LANGUAGES+set}" = xset; then
- enable_languages="${LANGUAGES}"
- echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
+if test -d ${srcdir}/gcc; then
+ if test x"${enable_languages+set}" != xset; then
+ if test x"${LANGUAGES+set}" = xset; then
+ enable_languages="${LANGUAGES}"
+ echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
+ else
+ enable_languages=all
+ fi
else
- enable_languages=all
- fi
-else
- if test x"${enable_languages}" = x ||
- test x"${enable_languages}" = xyes;
- then
- echo configure.in: --enable-languages needs at least one language argument 1>&2
- exit 1
+ if test x"${enable_languages}" = x ||
+ test x"${enable_languages}" = xyes;
+ then
+ echo configure.in: --enable-languages needs at least one language argument 1>&2
+ exit 1
+ fi
fi
-fi
-enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
-
-# First scan to see if an enabled language requires some other language.
-# We assume that a given config-lang.in will list all the language
-# front ends it requires, even if some are required indirectly.
-for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
- case ${lang_frag} in
- ..) ;;
- # The odd quoting in the next line works around
- # an apparent bug in bash 1.12 on linux.
- ${srcdir}/gcc/[[*]]/config-lang.in) ;;
- *)
- # From the config-lang.in, get $language, $lang_requires
- language=
- lang_requires=
- . ${lang_frag}
- for other in ${lang_requires} ; do
- case ,${enable_languages}, in
- *,$other,*) ;;
- *,all,*) ;;
- *,$language,*)
- echo " \`$other' language required by \`$language'; enabling" 1>&2
- enable_languages="${enable_languages},${other}"
- ;;
- esac
- done
+ enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
+
+ # 'f95' is the old name for the 'fortran' language. We issue a warning
+ # and make the substitution.
+ case ,${enable_languages}, in
+ *,f95,*)
+ echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
+ enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
;;
esac
-done
-for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
- case ${lang_frag} in
- ..) ;;
- # The odd quoting in the next line works around
- # an apparent bug in bash 1.12 on linux.
- ${srcdir}/gcc/[[*]]/config-lang.in) ;;
- *)
- # From the config-lang.in, get $language, $target_libs,
- # $lang_dirs, and $build_by_default
- language=
- target_libs=
- lang_dirs=
- build_by_default=
- . ${lang_frag}
- 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,*)
- # 'all' was selected; include 'default' languages.
- case ${build_by_default} in
- no) add_this_lang=no ;;
- *) add_this_lang=yes ;;
- esac
- ;;
- *) add_this_lang=no ;;
- esac
- case ${add_this_lang} in
- no)
- # Remove language-dependent dirs.
- eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
- ;;
- esac
- ;;
- esac
+ # First scan to see if an enabled language requires some other language.
+ # We assume that a given config-lang.in will list all the language
+ # front ends it requires, even if some are required indirectly.
+ for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
+ case ${lang_frag} in
+ ..) ;;
+ # The odd quoting in the next line works around
+ # an apparent bug in bash 1.12 on linux.
+ ${srcdir}/gcc/[[*]]/config-lang.in) ;;
+ *)
+ # From the config-lang.in, get $language, $lang_requires
+ language=
+ lang_requires=
+ . ${lang_frag}
+ for other in ${lang_requires} ; do
+ case ,${enable_languages}, in
+ *,$other,*) ;;
+ *,all,*) ;;
+ *,$language,*)
+ echo " \`$other' language required by \`$language'; enabling" 1>&2
+ enable_languages="${enable_languages},${other}"
+ ;;
+ esac
+ done
+ ;;
+ esac
+ done
+
+ new_enable_languages=c
+ missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
+ potential_languages=c
+
+ for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
+ case ${lang_frag} in
+ ..) ;;
+ # The odd quoting in the next line works around
+ # an apparent bug in bash 1.12 on linux.
+ ${srcdir}/gcc/[[*]]/config-lang.in) ;;
+ *)
+ # 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=
+ . ${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},*:*:*:*)
+ # 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
+ ;;
+ *)
+ 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)
+ # Specifically requested language; tell them.
+ AC_MSG_ERROR([GMP with MPFR support is required to build $language])
+ ;;
+ *:no:yes)
+ # Silently disable.
+ add_this_lang=no
+ ;;
+ esac
+
+ # Disable a language that is unsupported by the target.
+ case " $unsupported_languages " in
+ *" $language "*)
+ add_this_lang=no
+ ;;
+ esac
+
+ case $add_this_lang in
+ no)
+ # Remove language-dependent dirs.
+ eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
+ ;;
+ *)
+ new_enable_languages="$new_enable_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}"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+
+ missing_languages=`echo "$missing_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}])
+ fi
+
+ if test "x$new_enable_languages" != "x$enable_languages"; then
+ echo The following languages will be built: ${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"/ `
+fi
+
+# Handle --disable-<component> generically.
+for dir in $configdirs $build_configdirs $target_configdirs ; do
+ dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
+ if eval test x\${enable_${dirname}} "=" xno ; then
+ noconfigdirs="$noconfigdirs $dir"
+ fi
done
-# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
-# $target_configdirs.
+# 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.
notsupp=""
for dir in . $skipdirs $noconfigdirs ; do
- dirname=`echo $dir | sed -e s/target-//g`
+ dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
if test -r $srcdir/$dirname/configure ; then
@@ -852,6 +1343,16 @@ for dir in . $skipdirs $noconfigdirs ; do
fi
fi
fi
+ if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
+ if test -r $srcdir/$dirname/configure ; then
+ if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ true
+ else
+ notsupp="$notsupp $dir"
+ fi
+ fi
+ fi
if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
if test -r $srcdir/$dirname/configure ; then
@@ -884,6 +1385,15 @@ fi
# Quietly strip out all directories which aren't configurable in this tree.
# This relies on all configurable subdirectories being autoconfiscated, which
# is now the case.
+build_configdirs_all="$build_configdirs"
+build_configdirs=
+for i in ${build_configdirs_all} ; do
+ j=`echo $i | sed -e s/build-//g`
+ if test -f ${srcdir}/$j/configure ; then
+ build_configdirs="${build_configdirs} $i"
+ fi
+done
+
configdirs_all="$configdirs"
configdirs=
for i in ${configdirs_all} ; do
@@ -891,6 +1401,7 @@ for i in ${configdirs_all} ; do
configdirs="${configdirs} $i"
fi
done
+
target_configdirs_all="$target_configdirs"
target_configdirs=
for i in ${target_configdirs_all} ; do
@@ -917,7 +1428,7 @@ if test -n "${notsupp}" && test -z "${norecursion}" ; then
appdirs=""
break
fi
- if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
+ if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
appdirs=""
break
fi
@@ -942,6 +1453,15 @@ esac
copy_dirs=
+AC_ARG_WITH([build-sysroot],
+ [ --with-build-sysroot=sysroot
+ use sysroot as the system root during the build],
+ [if test x"$withval" != x ; then
+ SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
+ fi],
+ [SYSROOT_CFLAGS_FOR_TARGET=])
+AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
+
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
@@ -979,6 +1499,39 @@ if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
fi
fi
+# Set with_gnu_as and with_gnu_ld as appropriate.
+#
+# 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
+# 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
+# want to do that, then you should use the --without-gnu-as and
+# --without-gnu-ld options for the configure script.
+
+if test x${use_gnu_as} = x &&
+ echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
+ with_gnu_as=yes
+ extra_host_args="$extra_host_args --with-gnu-as"
+fi
+
+if test x${use_gnu_ld} = x &&
+ echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
+ with_gnu_ld=yes
+ extra_host_args="$extra_host_args --with-gnu-ld"
+fi
+
+# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
+# can detect this case.
+
+if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
+ with_newlib=yes
+ extra_host_args="$extra_host_args --with-newlib"
+fi
+
# Handle ${copy_dirs}
set fnord ${copy_dirs}
shift
@@ -1010,170 +1563,65 @@ while test $# != 0 ; do
shift; shift
done
-# Work in distributions that contain no compiler tools, like Autoconf.
-tentative_cc=""
-host_makefile_frag=/dev/null
-if test -d ${srcdir}/config ; then
-case "${host}" in
- m68k-hp-hpux*)
- # Avoid "too much defining" errors from HPUX compiler.
- tentative_cc="cc -Wp,-H256000"
- # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
- # If it's HP/UX ar, this should be harmless.
- RANLIB="ar ts"
- ;;
- m68k-apollo-sysv*)
- tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
- ;;
- m68k-apollo-bsd*)
- #None of the Apollo compilers can compile gas or binutils. The preprocessor
- # chokes on bfd, the compiler won't let you assign integers to enums, and
- # other problems. Defining CC to gcc is a questionable way to say "don't use
- # the apollo compiler" (the preferred version of GCC could be called cc,
- # or whatever), but I'm not sure leaving CC as cc is any better...
- #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
- # Used to have BISON=yacc.
- tentative_cc=gcc
- ;;
- m88k-dg-dgux*)
- tentative_cc="gcc -Wall -ansi -D__using_DGUX"
- ;;
- m88k-harris-cxux*)
- # Under CX/UX, we want to tell the compiler to use ANSI mode.
- tentative_cc="cc -Xa"
- host_makefile_frag="config/mh-cxux"
- ;;
- m88k-motorola-sysv*)
- ;;
- mips*-dec-ultrix*)
- tentative_cc="cc -Wf,-XNg1000"
- host_makefile_frag="config/mh-decstation"
- ;;
- mips*-nec-sysv4*)
- # The C compiler on NEC MIPS SVR4 needs bigger tables.
- tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
- host_makefile_frag="config/mh-necv4"
+# Determine a target-dependent exec_prefix that the installed
+# gcc will search in. Keep this list sorted by triplet, with
+# the *-*-osname triplets last.
+md_exec_prefix=
+case "${target}" in
+ alpha*-*-*vms*)
+ md_exec_prefix=/gnu/lib/gcc-lib
;;
- mips*-sgi-irix4*)
- # Tell compiler to use K&R C. We can't compile under the SGI Ansi
- # environment. Also bump switch table size so that cp-parse will
- # compile. Bump string length limit so linker builds.
- tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
+ i[34567]86-pc-msdosdjgpp*)
+ md_exec_prefix=/dev/env/DJDIR/bin
;;
- mips*-*-sysv4*)
- host_makefile_frag="config/mh-sysv4"
+ i[34567]86-*-sco3.2v5*)
+ if test $with_gnu_as = yes; then
+ md_exec_prefix=/usr/gnu/bin
+ else
+ md_exec_prefix=/usr/ccs/bin/elf
+ fi
;;
- mips*-*-sysv*)
- # This is for a MIPS running RISC/os 4.52C.
- # This is needed for GDB, but needs to be in the top-level make because
- # if a library is compiled with the bsd headers and gets linked with the
- # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
- # a different size).
- # ptrace(2) apparently has problems in the BSD environment. No workaround is
- # known except to select the sysv environment. Could we use /proc instead?
- # These "sysv environments" and "bsd environments" often end up being a pain.
- #
- # This is not part of CFLAGS because perhaps not all C compilers have this
- # option.
- tentative_cc="cc -systype sysv"
- ;;
- i370-ibm-opened*)
- tentative_cc="c89"
- ;;
- i[[3456789]]86-*-sysv5*)
- host_makefile_frag="config/mh-sysv5"
- ;;
- i[[3456789]]86-*-dgux*)
- tentative_cc="gcc -Wall -ansi -D__using_DGUX"
- host_makefile_frag="config/mh-dgux386"
- ;;
- i[[3456789]]86-ncr-sysv4.3*)
- # The MetaWare compiler will generate a copyright message unless you
- # turn it off by adding the -Hnocopyr flag.
- tentative_cc="cc -Hnocopyr"
- ;;
- i[[3456789]]86-ncr-sysv4*)
- # for an NCR 3000 (i486/SVR4) system.
- # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
- # This compiler not only emits obnoxious copyright messages every time
- # you run it, but it chokes and dies on a whole bunch of GNU source
- # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
- tentative_cc="/usr/ccs/ATT/cc"
- host_makefile_frag="config/mh-ncr3000"
- ;;
- i[[3456789]]86-*-sco3.2v5*)
+ mn10300-*-* | \
+ powerpc-*-chorusos* | \
+ powerpc*-*-eabi* | \
+ powerpc*-*-sysv* | \
+ powerpc*-*-kaos* | \
+ s390x-ibm-tpf*)
+ md_exec_prefix=/usr/ccs/bin
;;
- i[[3456789]]86-*-sco*)
- # The native C compiler botches some simple uses of const. Unfortunately,
- # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
- tentative_cc="cc -Dconst="
- host_makefile_frag="config/mh-sco"
- ;;
- i[[3456789]]86-*-udk*)
- host_makefile_frag="config/mh-sysv5"
- ;;
- i[[3456789]]86-*-solaris2*)
- host_makefile_frag="config/mh-sysv4"
- ;;
- i[[3456789]]86-*-msdosdjgpp*)
- host_makefile_frag="config/mh-djgpp"
- ;;
- *-cygwin*)
- host_makefile_frag="config/mh-cygwin"
- ;;
- *-mingw32*)
- host_makefile_frag="config/mh-mingw32"
- ;;
- *-interix*)
- host_makefile_frag="config/mh-interix"
- ;;
- vax-*-ultrix2*)
- # The old BSD pcc isn't up to compiling parts of gdb so use gcc
- tentative_cc=gcc
- ;;
- *-*-solaris2*)
- host_makefile_frag="config/mh-solaris"
- ;;
- m68k-sun-sunos*)
- # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
- # without overflowing the jump tables (-J says to use a 32 bit table)
- tentative_cc="cc -J"
- ;;
- *-hp-hpux*)
- tentative_cc="cc -Wp,-H256000"
- ;;
- *-*-hiux*)
- tentative_cc="cc -Wp,-H256000"
+ sparc64-*-elf*)
;;
- rs6000-*-lynxos*)
- # /bin/cc is less than useful for our purposes. Always use GCC
- tentative_cc="/usr/cygnus/progressive/bin/gcc"
- host_makefile_frag="config/mh-lynxrs6k"
+ v850*-*-*)
+ md_exec_prefix=/usr/ccs/bin
;;
- *-*-lynxos*)
- # /bin/cc is less than useful for our purposes. Always use GCC
- tentative_cc="/bin/gcc"
+ xtensa-*-elf*)
;;
- *-*-sysv4*)
- host_makefile_frag="config/mh-sysv4"
+
+ *-*-beos* | \
+ *-*-elf* | \
+ *-*-hpux* | \
+ *-*-netware* | \
+ *-*-nto-qnx* | \
+ *-*-rtems* | \
+ *-*-solaris2* | \
+ *-*-sysv[45]* | \
+ *-*-vxworks* | \
+ *-wrs-windiss)
+ md_exec_prefix=/usr/ccs/bin
;;
esac
-fi
extra_arflags_for_target=
extra_nmflags_for_target=
extra_ranlibflags_for_target=
target_makefile_frag=/dev/null
case "${target}" in
- i[[3456789]]86-*-netware*)
+ *-*-netware*)
target_makefile_frag="config/mt-netware"
;;
- powerpc-*-netware*)
- target_makefile_frag="config/mt-netware"
- ;;
- *-*-linux*)
- target_makefile_frag="config/mt-linux"
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ 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
@@ -1221,40 +1669,6 @@ case "${enable_target_optspace}:${target}" in
;;
esac
-# Set with_gnu_as and with_gnu_ld as appropriate.
-#
-# 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
-# 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
-# want to do that, then you should use the --without-gnu-as and
-# --without-gnu-ld options for the configure script.
-
-if test x${use_gnu_as} = x &&
- echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
- with_gnu_as=yes
- extra_host_args="$extra_host_args --with-gnu-as"
-fi
-
-if test x${use_gnu_ld} = x &&
- echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
- with_gnu_ld=yes
- extra_host_args="$extra_host_args --with-gnu-ld"
-fi
-
-# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
-# can detect this case.
-
-if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
- with_newlib=yes
- extra_host_args="$extra_host_args --with-newlib"
-fi
-
-
# Default to using --with-stabs for certain targets.
if test x${with_stabs} = x ; then
case "${target}" in
@@ -1275,282 +1689,11 @@ case "${host}" in
;;
esac
-# If we aren't going to be using gcc, see if we can extract a definition
-# of CC from the fragment.
-# Actually, use the 'pre-extracted' version above.
-if test -z "${CC}" && test "${build}" = "${host}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- found=
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/gcc; then
- found=yes
- break
- fi
- done
- IFS="$save_ifs"
- if test -z "${found}" && test -n "${tentative_cc}" ; then
- CC=$tentative_cc
- fi
-fi
-
# 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}
build_tooldir=${tooldir}
-# Generate a default definition for YACC. This is used if the makefile can't
-# locate bison or byacc in objdir.
-
-for prog in 'bison -y' byacc yacc
-do
- set dummy $prog; tmp=$2
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/$tmp; then
- DEFAULT_YACC="$prog"
- break
- fi
- done
- IFS="$save_ifs"
-
- test -n "$DEFAULT_YACC" && break
-done
-
-# Generate a default definition for M4. This is used if the makefile can't
-# locate m4 in objdir.
-
-for prog in gm4 gnum4 m4
-do
- set dummy $prog; tmp=$2
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/$tmp; then
- DEFAULT_M4="$prog"
- break
- fi
- done
- IFS="$save_ifs"
-
- test -n "$DEFAULT_M4" && break
-done
-
-# Generate a default definition for LEX. This is used if the makefile can't
-# locate flex in objdir.
-
-for prog in flex lex
-do
- set dummy $prog; tmp=$2
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/$tmp; then
- DEFAULT_LEX="$prog"
- break
- fi
- done
- IFS="$save_ifs"
-
- test -n "$DEFAULT_LEX" && break
-done
-
-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.
-
- BISON=${BISON-bison}
- 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}
- CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
- CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
- GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
- GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
- BUILD_PREFIX=${build_alias}-
- BUILD_PREFIX_1=${build_alias}-
- MAKEINFO=${MAKEINFO-makeinfo}
-
- if test -z "${YACC}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/bison; then
- YACC="bison -y"
- break
- fi
- if test -f $dir/byacc; then
- YACC=byacc
- break
- fi
- if test -f $dir/yacc; then
- YACC=yacc
- break
- fi
- done
- IFS="$save_ifs"
- if test -z "${YACC}" ; then
- YACC="bison -y"
- fi
- fi
-
- if test -z "${LEX}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/flex; then
- LEX=flex
- break
- fi
- if test -f $dir/lex; then
- LEX=lex
- break
- fi
- done
- IFS="$save_ifs"
- LEX=${LEX-flex}
- fi
-
-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...
-
- BISON="\$(USUAL_BISON)"
- CC_FOR_BUILD="\$(CC)"
- GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
- BUILD_PREFIX=
- BUILD_PREFIX_1=loser-
- MAKEINFO="\$(USUAL_MAKEINFO)"
- LEX="\$(USUAL_LEX)"
- YACC="\$(USUAL_YACC)"
-
- # If CC is still not set, try to get gcc.
- cc_prog_is_gcc=
- if test -z "${CC}" ; then
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/gcc; then
- CC="gcc"
- cc_prog_is_gcc=yes
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
- else
- CFLAGS=${CFLAGS-"-O2"}
- CXXFLAGS=${CXXFLAGS-"-O2"}
- fi
- rm -f conftest*
- break
- fi
- done
- IFS="$save_ifs"
- CC=${CC-cc}
- else
- # Determine if we are using gcc.
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
- if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
- cc_prog_is_gcc=yes
- fi
- rm -f conftest.c
- if test -z "${CFLAGS}"; then
- # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
- # is set to a version of gcc.
- if test "$cc_prog_is_gcc" = yes; then
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -g -c conftest.c 2>&1`"; then
- CFLAGS=${CFLAGS-"-g -O2"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
- else
- CFLAGS=${CFLAGS-"-O2"}
- CXXFLAGS=${CXXFLAGS-"-O2"}
- fi
- rm -f conftest*
- fi
- fi
- 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 "$cc_prog_is_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
-
- CXX=${CXX-"c++"}
- CFLAGS=${CFLAGS-"-g"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
-fi
-
-# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
-# Set up the list of links to be made.
-# ${links} is the list of link names, and ${files} is the list of names to link to.
-
-# Make the links.
-configlinks="${links}"
-if test -r ./config.status ; then
- mv -f ./config.status ./config.back
-fi
-while test -n "${files}" ; do
- # set file to car of files, files to cdr of files
- set ${files}; file=$1; shift; files=$*
- set ${links}; link=$1; shift; links=$*
-
- if test ! -r ${srcdir}/${file} ; then
- if test ! -r ${file} ; then
- echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
- echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
- exit 1
- else
- srcfile=${file}
- fi
- else
- srcfile=${srcdir}/${file}
- fi
-
- ${remove} -f ${link}
- # Make a symlink if possible, otherwise try a hard link
- if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
- true
- else
- # We need to re-remove the file because Lynx leaves a
- # very strange directory there when it fails an NFS symlink.
- ${remove} -r -f ${link}
- ${hard_link} ${srcfile} ${link}
- fi
- if test ! -r ${link} ; then
- echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
- exit 1
- fi
-
- echo "Linked \"${link}\" to \"${srcfile}\"."
-done
-
# Create a .gdbinit file which runs the one in srcdir
# and tells GDB to look there for source files.
@@ -1617,32 +1760,16 @@ case "${host}" in
;;
esac
-# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
-# binutils tools will find libbfd.so.
-case "${enable_shared}" in
- no | "") SET_LIB_PATH= ;;
- *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;;
-esac
-
case "${host}" in
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
+ *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
-
-# This is the final value for target_configdirs. configdirs already
-# has its final value, as does build_modules. It's time to create some
-# lists of valid targets.
-
-all_build_modules=
-configure_build_modules=
-for module in ${build_modules} ; do
- all_build_modules=all-build-${module}
- configure_build_modules=configure-build-${module}
-done
+build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
# Determine whether gdb needs tk/tcl or not.
# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
@@ -1652,7 +1779,7 @@ done
# leave out the maybe dependencies when enable_gdbtk is false. I'm not
# 100% sure that that's safe though.
-gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
+gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
case "$enable_gdbtk" in
no)
GDB_TK="" ;;
@@ -1669,42 +1796,97 @@ case "$enable_gdbtk" in
fi
;;
esac
+CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
+INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
-# Create the 'maybe dependencies'. This uses a temporary file.
+# Strip out unwanted targets.
# While at that, we remove Makefiles if we were started for recursive
# configuration, so that the top-level Makefile reconfigures them,
# like we used to do when configure itself was recursive.
-rm -f maybedep.tmp
-echo '# maybedep.tmp' > maybedep.tmp
-# Make-targets which may need maybe dependencies.
-mts="configure all install check clean distclean dvi info install-info"
-mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
+# Loop over modules. $extrasub must be used with care, limiting as
+# much as possible the usage of range addresses. That's because autoconf
+# splits the sed script to overcome limits in the number of commands,
+# and relying on carefully-timed sed passes may turn out to be very hard
+# to maintain later. In this particular case, you just have to be careful
+# not to nest @if/@endif pairs, because configure will not warn you at all.
+
+AC_ARG_ENABLE([bootstrap],
+[ --enable-bootstrap Enable bootstrapping [yes if native build]],,
+enable_bootstrap=default)
+
+# Issue errors and warnings for invalid/strange bootstrap combinations.
+case "$configdirs" in
+ *gcc*) have_compiler=yes ;;
+ *) have_compiler=no ;;
+esac
+
+case "$have_compiler:$host:$target:$enable_bootstrap" in
+ *:*:*:no) ;;
+
+ # Default behavior. Enable bootstrap if we have a compiler
+ # and we are in a native configuration.
+ yes:$build:$build:default)
+ enable_bootstrap=yes ;;
+
+ *:*:*:default)
+ enable_bootstrap=no ;;
+
+ # We have a compiler and we are in a native configuration, bootstrap is ok
+ yes:$build:$build:yes)
+ ;;
+
+ # Other configurations, but we have a compiler. Assume the user knows
+ # what he's doing.
+ yes:*:*:yes)
+ AC_MSG_WARN([trying to bootstrap a cross compiler])
+ ;;
+
+ # No compiler: if they passed --enable-bootstrap explicitly, fail
+ no:*:*:yes)
+ AC_MSG_ERROR([cannot bootstrap without a compiler]) ;;
-# Loop over modules and make-targets.
-for module in ${build_modules} ; do
+ # Fail if wrong command line
+ *)
+ AC_MSG_ERROR([invalid option for --enable-bootstrap])
+ ;;
+esac
+
+# Adjust the toplevel makefile according to whether bootstrap was selected.
+case "$enable_bootstrap" in
+ yes)
+ bootstrap_suffix=bootstrap ;;
+ no)
+ bootstrap_suffix=no-bootstrap ;;
+esac
+
+for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \
&& test -f ${build_subdir}/${module}/Makefile; then
echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
rm -f ${build_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- case ${mt} in
- install) ;; # No installing build modules.
- *) echo "maybe-${mt}-build-${module}: ${mt}-build-${module}" >> maybedep.tmp ;;
- esac
- done
+ extrasub="$extrasub
+/^@if build-$module\$/d
+/^@endif build-$module\$/d
+/^@if build-$module-$bootstrap_suffix\$/d
+/^@endif build-$module-$bootstrap_suffix\$/d"
done
for module in ${configdirs} ; do
- if test -z "${no_recursion}" \
- && test -f ${module}/Makefile; then
- echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
- rm -f ${module}/Makefile
+ if test -z "${no_recursion}"; then
+ for file in stage*-${module}/Makefile ${module}/Makefile; do
+ if test -f ${file}; then
+ echo 1>&2 "*** removing ${file} to force reconfigure"
+ rm -f ${file}
+ fi
+ done
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-${module}: ${mt}-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if $module\$/d
+/^@endif $module\$/d
+/^@if $module-$bootstrap_suffix\$/d
+/^@endif $module-$bootstrap_suffix\$/d"
done
for module in ${target_configdirs} ; do
if test -z "${no_recursion}" \
@@ -1712,12 +1894,15 @@ for module in ${target_configdirs} ; do
echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
rm -f ${target_subdir}/${module}/Makefile
fi
- for mt in ${mts} ; do
- echo "maybe-${mt}-target-${module}: ${mt}-target-${module}" >> maybedep.tmp
- done
+ extrasub="$extrasub
+/^@if target-$module\$/d
+/^@endif target-$module\$/d
+/^@if target-$module-$bootstrap_suffix\$/d
+/^@endif target-$module-$bootstrap_suffix\$/d"
done
-maybe_dependencies=maybedep.tmp
-AC_SUBST_FILE(maybe_dependencies)
+
+extrasub="$extrasub
+/^@if /,/^@endif /d"
# Create the serialization dependencies. This uses a temporary file.
@@ -1780,21 +1965,21 @@ AC_SUBST_FILE(serialization_dependencies)
# at the end of the argument list.
# These will be expanded by make, so quote '$'.
cat <<\EOF_SED > conftestsed
-s/ --no[[^ ]]* / /
-s/ --c[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --sr[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --ho[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --bu[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --t[[a-z-]]*[[= ]][[^ ]]* / /
-s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / /
-s/ -cache-file[[= ]][[^ ]]* / /
-s/ -srcdir[[= ]][[^ ]]* / /
-s/ -host[[= ]][[^ ]]* / /
-s/ -build[[= ]][[^ ]]* / /
-s/ -target[[= ]][[^ ]]* / /
-s/ -program-prefix[[= ]][[^ ]]* / /
-s/ -program-suffix[[= ]][[^ ]]* / /
-s/ -program-transform-name[[= ]][[^ ]]* / /
+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
@@ -1822,7 +2007,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} ${baseargs}"
+build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
@@ -1869,26 +2054,10 @@ fi
# fixed in future. It's still worthwhile to use a cache file for each
# directory. I think.
-# Pass the appropriate --host, --build, and --cache-file arguments.
-target_configargs="--cache-file=./config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
-
-# provide a proper gxx_include_dir.
-# Note, if you change the default, make sure to fix both here and in
-# the gcc and libstdc++-v3 subdirectories.
-# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
-case "${with_gxx_include_dir}" in
- yes)
- AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory])
- ;;
- no | "")
- case "${enable_version_specific_runtime_libs}" in
- yes) gxx_include_dir='${libsubdir}/include/c++' ;;
- *)
- . ${srcdir}/config.if
- gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
- esac ;;
- *) gxx_include_dir=${with_gxx_include_dir} ;;
-esac
+# 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}"
FLAGS_FOR_TARGET=
case " $target_configdirs " in
@@ -1910,7 +2079,7 @@ case " $target_configdirs " in
# to it. This is right: we don't want to search that directory
# for binaries, but we want the header files in there, so add
# them explicitly.
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
# Someone might think of using the pre-installed headers on
# Canadian crosses, in case the installed compiler is not fully
@@ -1957,105 +2126,33 @@ fi
if test "x${use_gnu_ld}" = x &&
echo " ${configdirs} " | grep " ld " > /dev/null ; then
# Arrange for us to find uninstalled linker scripts.
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
fi
-if test "x${CC_FOR_TARGET+set}" = xset; then
- :
-elif test -d ${srcdir}/gcc; then
- CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
-elif test "$host" = "$target"; then
- CC_FOR_TARGET='$(CC)'
-else
- CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
-fi
-CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-
-if test "x${GCJ_FOR_TARGET+set}" = xset; then
- :
-elif test -d ${srcdir}/gcc; then
- GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
-elif test "$host" = "$target"; then
- GCJ_FOR_TARGET='gcj'
-else
- GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
-fi
-GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-
-# Don't use libstdc++-v3's flags to configure/build itself.
-libstdcxx_flags='`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'
-raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
-
-if test "x${CXX_FOR_TARGET+set}" = xset; then
- if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then
- RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
- fi
-elif test -d ${srcdir}/gcc; then
- # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
- # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
- # default whereas gcc does not.
- # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
- # all other cases.
- CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
- RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
-elif test "$host" = "$target"; then
- CXX_FOR_TARGET='$(CXX)'
- RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
-else
- CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
- RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
-fi
-CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-
-qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
-qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
-
-# We want to defer the evaluation of `cmd`s and shell variables in
-# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
-# bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
-# quotes, but we still have to duplicate `$'s so that shell variables
-# can be expanded by the nested make as shell variables, not as make
-# macros.
-qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
-qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
-
-# Wrap CC_FOR_TARGET and friends, for certain types of builds.
-CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
-GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
-CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
-RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
-CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
-RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
-
# Makefile fragments.
-host_makefile_frag=${srcdir}/${host_makefile_frag}
-target_makefile_frag=${srcdir}/${target_makefile_frag}
-alphaieee_frag=${srcdir}/${alphaieee_frag}
-ospace_frag=${srcdir}/${ospace_frag}
+for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
+do
+ eval fragval=\$$frag
+ if test $fragval != /dev/null; then
+ eval $frag=${srcdir}/$fragval
+ fi
+done
AC_SUBST_FILE(host_makefile_frag)
AC_SUBST_FILE(target_makefile_frag)
AC_SUBST_FILE(alphaieee_frag)
AC_SUBST_FILE(ospace_frag)
# Miscellanea: directories, flags, etc.
-AC_SUBST(SET_LIB_PATH)
AC_SUBST(RPATH_ENVVAR)
-AC_SUBST(BUILD_PREFIX)
-AC_SUBST(BUILD_PREFIX_1)
-AC_SUBST(configlinks)
-AC_SUBST(gcc_version_trigger)
-AC_SUBST(gcc_version)
AC_SUBST(tooldir)
AC_SUBST(build_tooldir)
+AC_SUBST(CONFIGURE_GDB_TK)
AC_SUBST(GDB_TK)
-AC_SUBST(gxx_include_dir)
-AC_SUBST(libstdcxx_incdir)
+AC_SUBST(INSTALL_GDB_TK)
# Build module lists & subconfigure args.
AC_SUBST(build_configargs)
-AC_SUBST(configure_build_modules)
-AC_SUBST(all_build_modules)
+AC_SUBST(build_configdirs)
# Host module lists & subconfigure args.
AC_SUBST(host_configargs)
@@ -2063,74 +2160,178 @@ AC_SUBST(configdirs)
# Target module lists & subconfigure args.
AC_SUBST(target_configargs)
-AC_SUBST(target_configdirs)
+
# Build tools.
-AC_SUBST(BISON)
AC_SUBST(CC_FOR_BUILD)
-AC_SUBST(LEX)
-AC_SUBST(MAKEINFO)
-AC_SUBST(YACC)
AC_SUBST(config_shell)
+# Generate default definitions for YACC, M4, LEX and other programs that run
+# on the build machine. These are used if the Makefile can't locate these
+# programs in objdir.
+MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
+
+AC_CHECK_PROGS([YACC], ['bison -y' byacc yacc], [$MISSING bison -y])
+case " $build_configdirs " in
+ *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;;
+ *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;;
+esac
+
+AC_CHECK_PROGS([BISON], [bison], [$MISSING bison])
+case " $build_configdirs " in
+ *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;;
+esac
+
+AC_CHECK_PROGS([M4], [gm4 gnum4 m4], [$MISSING m4])
+case " $build_configdirs " in
+ *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;;
+esac
+
+AC_CHECK_PROGS([LEX], [flex lex], [$MISSING flex])
+case " $build_configdirs " in
+ *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
+ *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;;
+esac
+
+AC_CHECK_PROGS([FLEX], [flex], [$MISSING flex])
+case " $build_configdirs " in
+ *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
+esac
+
+AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo])
+case " $build_configdirs " in
+ *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
+ *)
+changequote(,)
+ # For an installed makeinfo, we require it to be from texinfo 4.4 or
+ # higher, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
+ fi
+ ;;
+changequote([,])
+esac
+
+# FIXME: expect and dejagnu may become build tools?
+
+AC_CHECK_PROGS(EXPECT, expect, expect)
+case " $configdirs " in
+ *" expect "*)
+ test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
+ ;;
+esac
+
+AC_CHECK_PROGS(RUNTEST, runtest, runtest)
+case " $configdirs " in
+ *" dejagnu "*)
+ test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
+ ;;
+esac
+
+
# Host tools.
-NCN_STRICT_CHECK_TOOL(AR, ar)
-NCN_STRICT_CHECK_TOOL(AS, as)
-NCN_STRICT_CHECK_TOOL(DLLTOOL, dlltool)
-NCN_STRICT_CHECK_TOOL(LD, ld)
-NCN_STRICT_CHECK_TOOL(NM, nm)
-NCN_STRICT_CHECK_TOOL(RANLIB, ranlib, :)
-NCN_STRICT_CHECK_TOOL(WINDRES, windres)
-NCN_STRICT_CHECK_TOOL(OBJCOPY, objcopy)
-NCN_STRICT_CHECK_TOOL(OBJDUMP, objdump)
+NCN_STRICT_CHECK_TOOLS(AR, ar)
+NCN_STRICT_CHECK_TOOLS(AS, as)
+NCN_STRICT_CHECK_TOOLS(DLLTOOL, dlltool)
+NCN_STRICT_CHECK_TOOLS(LD, ld)
+NCN_STRICT_CHECK_TOOLS(LIPO, lipo)
+NCN_STRICT_CHECK_TOOLS(NM, nm)
+NCN_STRICT_CHECK_TOOLS(RANLIB, ranlib, :)
+NCN_STRICT_CHECK_TOOLS(STRIP, strip, :)
+NCN_STRICT_CHECK_TOOLS(WINDRES, windres)
+NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy)
+NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump)
AC_SUBST(CC)
AC_SUBST(CXX)
AC_SUBST(CFLAGS)
AC_SUBST(CFLAGS_FOR_BUILD)
AC_SUBST(CXXFLAGS)
-AC_SUBST(DEFAULT_YACC)
-AC_SUBST(DEFAULT_LEX)
-AC_SUBST(DEFAULT_M4)
# Target tools.
-NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar)
-NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as)
-NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
-NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld)
-NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm)
-NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
-NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
-
-AC_SUBST(GCC_FOR_TARGET)
+AC_ARG_WITH([build-time-tools],
+ [ --with-build-time-tools=path
+ use given path to find target tools during the build],
+ [case x"$withval" in
+ x/*) ;;
+ *)
+ with_build_time_tools=
+ AC_MSG_WARN([argument to --with-build-time-tools must be an absolute path])
+ ;;
+ esac],
+ [with_build_time_tools=])
+
+NCN_STRICT_CHECK_TARGET_TOOLS(CC_FOR_TARGET, cc gcc)
+NCN_STRICT_CHECK_TARGET_TOOLS(CXX_FOR_TARGET, c++ g++ cxx gxx)
+NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
+NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj)
+NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
+
+ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
+ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
+ACX_CHECK_INSTALLED_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
+ACX_CHECK_INSTALLED_TARGET_TOOL(LD_FOR_TARGET, ld)
+ACX_CHECK_INSTALLED_TARGET_TOOL(LIPO_FOR_TARGET, lipo)
+ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm)
+ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump)
+ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
+ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip)
+ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
+
+RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
+
+GCC_TARGET_TOOL(ar, AR_FOR_TARGET, AR, [binutils/ar])
+GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new])
+GCC_TARGET_TOOL(cc, CC_FOR_TARGET, CC, [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/])
+GCC_TARGET_TOOL(c++, CXX_FOR_TARGET, CXX,
+ [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],
+ c++)
+GCC_TARGET_TOOL(c++ for libstdc++, RAW_CXX_FOR_TARGET, CXX,
+ [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],
+ c++)
+GCC_TARGET_TOOL(dlltool, DLLTOOL_FOR_TARGET, DLLTOOL, [binutils/dlltool])
+GCC_TARGET_TOOL(gcc, GCC_FOR_TARGET, , [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/])
+GCC_TARGET_TOOL(gcj, GCJ_FOR_TARGET, GCJ,
+ [gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/], java)
+GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN,
+ [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
+GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
+GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
+GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
+GCC_TARGET_TOOL(objdump, OBJDUMP_FOR_TARGET, OBJDUMP, [binutils/objdump])
+GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib])
+GCC_TARGET_TOOL(strip, STRIP_FOR_TARGET, STRIP, [binutils/strip])
+GCC_TARGET_TOOL(windres, WINDRES_FOR_TARGET, WINDRES, [binutils/windres])
+
AC_SUBST(FLAGS_FOR_TARGET)
-AC_SUBST(CC_FOR_TARGET)
-AC_SUBST(GCJ_FOR_TARGET)
-AC_SUBST(CXX_FOR_TARGET)
AC_SUBST(RAW_CXX_FOR_TARGET)
-AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
-AC_SUBST(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
-
-# Fix up target tools.
-if test "x${build}" = "x${host}" ; then
- # In this case, the newly built tools can and should be used,
- # so we override the results of the autoconf tests.
- # This should really only happen when the tools are actually being built,
- # but that's a further refinement. The new build scheme, where
- # tools are built into a structure paralleling where they're installed,
- # should also eliminate all of this cleanly.
- AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
- AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
- DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
- LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
- NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
- RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
- WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
-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}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
+# When building target libraries, except in a Canadian cross, we use
+# the same toolchain as the compiler we just built.
+COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
+COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
+COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
+if test $host = $build; then
+ case " $configdirs " in
+ *" gcc "*)
+ COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
+ COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
+ COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target}
+ ;;
+ esac
+fi
+
+AC_SUBST(COMPILER_AS_FOR_TARGET)
+AC_SUBST(COMPILER_LD_FOR_TARGET)
+AC_SUBST(COMPILER_NM_FOR_TARGET)
+
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
AC_ARG_ENABLE(maintainer-mode,
[ --enable-maintainer-mode enable make rules and dependencies not useful
@@ -2150,4 +2351,57 @@ fi
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
+# ---------------------
+# GCC bootstrap support
+# ---------------------
+
+# Stage specific cflags for build.
+stage1_cflags="-g"
+case $build in
+ vax-*-*)
+ case ${GCC} 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
+AC_SUBST(stage1_cflags)
+
+# 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])
+case ${enable_werror} in
+ yes) stage2_werror_flag="--enable-werror-always" ;;
+ *) stage2_werror_flag="" ;;
+esac
+AC_SUBST(stage2_werror_flag)
+
+# Flags needed to enable html installing and building
+AC_ARG_WITH(datarootdir,
+[ --with-datarootdir Use datarootdir as the data root directory.],
+[datarootdir="\${prefix}/${withval}"],
+[datarootdir="\${prefix}/share"])
+
+AC_ARG_WITH(docdir,
+[ --with-docdir Install documentation in this directory.],
+[docdir="\${prefix}/${withval}"],
+[docdir="\${datarootdir}/doc"])
+
+AC_ARG_WITH(htmldir,
+[ --with-htmldir Install html in this directory.],
+[htmldir="\${prefix}/${withval}"],
+[htmldir="\${docdir}"])
+
+AC_SUBST(datarootdir)
+AC_SUBST(docdir)
+AC_SUBST(htmldir)
+
AC_OUTPUT(Makefile)
diff --git a/contrib/binutils/contrib/ChangeLog b/contrib/binutils/contrib/ChangeLog
deleted file mode 100644
index 4a0de852933a..000000000000
--- a/contrib/binutils/contrib/ChangeLog
+++ /dev/null
@@ -1,7 +0,0 @@
-2002-07-03 Nick Clifton <nickc@cambridge.redhat.com>
-
- * ChangeLog: Newly created.
- * texi2pod.pl: Imported from FSF GCC sources.
-
-
-
diff --git a/contrib/binutils/contrib/texi2pod.pl b/contrib/binutils/contrib/texi2pod.pl
deleted file mode 100755
index e5560f303de2..000000000000
--- a/contrib/binutils/contrib/texi2pod.pl
+++ /dev/null
@@ -1,431 +0,0 @@
-#! /usr/bin/perl -w
-
-# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
-
-# This file is part of GNU CC.
-
-# GNU CC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# GNU CC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with GNU CC; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston MA 02111-1307, USA.
-
-# This does trivial (and I mean _trivial_) conversion of Texinfo
-# markup to Perl POD format. It's intended to be used to extract
-# something suitable for a manpage from a Texinfo document.
-
-$output = 0;
-$skipping = 0;
-%sects = ();
-$section = "";
-@icstack = ();
-@endwstack = ();
-@skstack = ();
-@instack = ();
-$shift = "";
-%defs = ();
-$fnno = 1;
-$inf = "";
-$ibase = "";
-
-while ($_ = shift) {
- if (/^-D(.*)$/) {
- if ($1 ne "") {
- $flag = $1;
- } else {
- $flag = shift;
- }
- $value = "";
- ($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/);
- die "no flag specified for -D\n"
- unless $flag ne "";
- die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
- unless $flag =~ /^[a-zA-Z0-9_-]+$/;
- $defs{$flag} = $value;
- } elsif (/^-/) {
- usage();
- } else {
- $in = $_, next unless defined $in;
- $out = $_, next unless defined $out;
- usage();
- }
-}
-
-if (defined $in) {
- $inf = gensym();
- open($inf, "<$in") or die "opening \"$in\": $!\n";
- $ibase = $1 if $in =~ m|^(.+)/[^/]+$|;
-} else {
- $inf = \*STDIN;
-}
-
-if (defined $out) {
- open(STDOUT, ">$out") or die "opening \"$out\": $!\n";
-}
-
-while(defined $inf) {
-while(<$inf>) {
- # Certain commands are discarded without further processing.
- /^\@(?:
- [a-z]+index # @*index: useful only in complete manual
- |need # @need: useful only in printed manual
- |(?:end\s+)?group # @group .. @end group: ditto
- |page # @page: ditto
- |node # @node: useful only in .info file
- |(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents
- )\b/x and next;
-
- chomp;
-
- # Look for filename and title markers.
- /^\@setfilename\s+([^.]+)/ and $fn = $1, next;
- /^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next;
-
- # Identify a man title but keep only the one we are interested in.
- /^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do {
- if (exists $defs{$1}) {
- $fn = $1;
- $tl = postprocess($2);
- }
- next;
- };
-
- # Look for blocks surrounded by @c man begin SECTION ... @c man end.
- # This really oughta be @ifman ... @end ifman and the like, but such
- # would require rev'ing all other Texinfo translators.
- /^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do {
- $output = 1 if exists $defs{$2};
- $sect = $1;
- next;
- };
- /^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next;
- /^\@c\s+man\s+end/ and do {
- $sects{$sect} = "" unless exists $sects{$sect};
- $sects{$sect} .= postprocess($section);
- $section = "";
- $output = 0;
- next;
- };
-
- # handle variables
- /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do {
- $defs{$1} = $2;
- next;
- };
- /^\@clear\s+([a-zA-Z0-9_-]+)/ and do {
- delete $defs{$1};
- next;
- };
-
- next unless $output;
-
- # Discard comments. (Can't do it above, because then we'd never see
- # @c man lines.)
- /^\@c\b/ and next;
-
- # End-block handler goes up here because it needs to operate even
- # if we are skipping.
- /^\@end\s+([a-z]+)/ and do {
- # Ignore @end foo, where foo is not an operation which may
- # cause us to skip, if we are presently skipping.
- my $ended = $1;
- next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/;
-
- die "\@end $ended without \@$ended at line $.\n" unless defined $endw;
- die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw;
-
- $endw = pop @endwstack;
-
- if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) {
- $skipping = pop @skstack;
- next;
- } elsif ($ended =~ /^(?:example|smallexample|display)$/) {
- $shift = "";
- $_ = ""; # need a paragraph break
- } elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) {
- $_ = "\n=back\n";
- $ic = pop @icstack;
- } else {
- die "unknown command \@end $ended at line $.\n";
- }
- };
-
- # We must handle commands which can cause skipping even while we
- # are skipping, otherwise we will not process nested conditionals
- # correctly.
- /^\@ifset\s+([a-zA-Z0-9_-]+)/ and do {
- push @endwstack, $endw;
- push @skstack, $skipping;
- $endw = "ifset";
- $skipping = 1 unless exists $defs{$1};
- next;
- };
-
- /^\@ifclear\s+([a-zA-Z0-9_-]+)/ and do {
- push @endwstack, $endw;
- push @skstack, $skipping;
- $endw = "ifclear";
- $skipping = 1 if exists $defs{$1};
- next;
- };
-
- /^\@(ignore|menu|iftex)\b/ and do {
- push @endwstack, $endw;
- push @skstack, $skipping;
- $endw = $1;
- $skipping = 1;
- next;
- };
-
- next if $skipping;
-
- # Character entities. First the ones that can be replaced by raw text
- # or discarded outright:
- s/\@copyright\{\}/(c)/g;
- s/\@dots\{\}/.../g;
- s/\@enddots\{\}/..../g;
- s/\@([.!? ])/$1/g;
- s/\@[:-]//g;
- s/\@bullet(?:\{\})?/*/g;
- s/\@TeX\{\}/TeX/g;
- s/\@pounds\{\}/\#/g;
- s/\@minus(?:\{\})?/-/g;
- s/\\,/,/g;
-
- # Now the ones that have to be replaced by special escapes
- # (which will be turned back into text by unmunge())
- s/&/&amp;/g;
- s/\@\{/&lbrace;/g;
- s/\@\}/&rbrace;/g;
- s/\@\@/&at;/g;
-
- # Inside a verbatim block, handle @var specially.
- if ($shift ne "") {
- s/\@var\{([^\}]*)\}/<$1>/g;
- }
-
- # POD doesn't interpret E<> inside a verbatim block.
- if ($shift eq "") {
- s/</&lt;/g;
- s/>/&gt;/g;
- } else {
- s/</&LT;/g;
- s/>/&GT;/g;
- }
-
- # Single line command handlers.
-
- /^\@include\s+(.+)$/ and do {
- push @instack, $inf;
- $inf = gensym();
-
- # Try cwd and $ibase.
- open($inf, "<" . $1)
- or open($inf, "<" . $ibase . "/" . $1)
- or die "cannot open $1 or $ibase/$1: $!\n";
- next;
- };
-
- /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
- and $_ = "\n=head2 $1\n";
- /^\@subsection\s+(.+)$/
- and $_ = "\n=head3 $1\n";
-
- # Block command handlers:
- /^\@itemize\s+(\@[a-z]+|\*|-)/ and do {
- push @endwstack, $endw;
- push @icstack, $ic;
- $ic = $1;
- $_ = "\n=over 4\n";
- $endw = "itemize";
- };
-
- /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do {
- push @endwstack, $endw;
- push @icstack, $ic;
- if (defined $1) {
- $ic = $1 . ".";
- } else {
- $ic = "1.";
- }
- $_ = "\n=over 4\n";
- $endw = "enumerate";
- };
-
- /^\@([fv]?table)\s+(\@[a-z]+)/ and do {
- push @endwstack, $endw;
- push @icstack, $ic;
- $endw = $1;
- $ic = $2;
- $ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/;
- $ic =~ s/\@(?:code|kbd)/C/;
- $ic =~ s/\@(?:dfn|var|emph|cite|i)/I/;
- $ic =~ s/\@(?:file)/F/;
- $_ = "\n=over 4\n";
- };
-
- /^\@((?:small)?example|display)/ and do {
- push @endwstack, $endw;
- $endw = $1;
- $shift = "\t";
- $_ = ""; # need a paragraph break
- };
-
- /^\@itemx?\s*(.+)?$/ and do {
- if (defined $1) {
- # Entity escapes prevent munging by the <> processing below.
- $_ = "\n=item $ic\&LT;$1\&GT;\n";
- } else {
- $_ = "\n=item $ic\n";
- $ic =~ y/A-Ya-y/B-Zb-z/;
- $ic =~ s/(\d+)/$1 + 1/eg;
- }
- };
-
- $section .= $shift.$_."\n";
-}
-# End of current file.
-close($inf);
-$inf = pop @instack;
-}
-
-die "No filename or title\n" unless defined $fn && defined $tl;
-
-$sects{NAME} = "$fn \- $tl\n";
-$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
-
-for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
- BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
- if(exists $sects{$sect}) {
- $head = $sect;
- $head =~ s/SEEALSO/SEE ALSO/;
- print "=head1 $head\n\n";
- print scalar unmunge ($sects{$sect});
- print "\n";
- }
-}
-
-sub usage
-{
- die "usage: $0 [-D toggle...] [infile [outfile]]\n";
-}
-
-sub postprocess
-{
- local $_ = $_[0];
-
- # @value{foo} is replaced by whatever 'foo' is defined as.
- while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) {
- if (! exists $defs{$2}) {
- print STDERR "Option $2 not defined\n";
- s/\Q$1\E//;
- } else {
- $value = $defs{$2};
- s/\Q$1\E/$value/;
- }
- }
-
- # Formatting commands.
- # Temporary escape for @r.
- s/\@r\{([^\}]*)\}/R<$1>/g;
- s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g;
- s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g;
- s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g;
- s/\@sc\{([^\}]*)\}/\U$1/g;
- s/\@file\{([^\}]*)\}/F<$1>/g;
- s/\@w\{([^\}]*)\}/S<$1>/g;
- s/\@(?:dmn|math)\{([^\}]*)\}/$1/g;
-
- # Cross references are thrown away, as are @noindent and @refill.
- # (@noindent is impossible in .pod, and @refill is unnecessary.)
- # @* is also impossible in .pod; we discard it and any newline that
- # follows it. Similarly, our macro @gol must be discarded.
-
- s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
- s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
- s/;\s+\@pxref\{(?:[^\}]*)\}//g;
- s/\@noindent\s*//g;
- s/\@refill//g;
- s/\@gol//g;
- s/\@\*\s*\n?//g;
-
- # @uref can take one, two, or three arguments, with different
- # semantics each time. @url and @email are just like @uref with
- # one argument, for our purposes.
- s/\@(?:uref|url|email)\{([^\},]*)\}/&lt;B<$1>&gt;/g;
- s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g;
- s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g;
-
- # Un-escape <> at this point.
- s/&LT;/</g;
- s/&GT;/>/g;
-
- # Now un-nest all B<>, I<>, R<>. Theoretically we could have
- # indefinitely deep nesting; in practice, one level suffices.
- 1 while s/([BIR])<([^<>]*)([BIR])<([^<>]*)>/$1<$2>$3<$4>$1</g;
-
- # Replace R<...> with bare ...; eliminate empty markup, B<>;
- # shift white space at the ends of [BI]<...> expressions outside
- # the expression.
- s/R<([^<>]*)>/$1/g;
- s/[BI]<>//g;
- s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g;
- s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g;
-
- # Extract footnotes. This has to be done after all other
- # processing because otherwise the regexp will choke on formatting
- # inside @footnote.
- while (/\@footnote/g) {
- s/\@footnote\{([^\}]+)\}/[$fnno]/;
- add_footnote($1, $fnno);
- $fnno++;
- }
-
- return $_;
-}
-
-sub unmunge
-{
- # Replace escaped symbols with their equivalents.
- local $_ = $_[0];
-
- s/&lt;/E<lt>/g;
- s/&gt;/E<gt>/g;
- s/&lbrace;/\{/g;
- s/&rbrace;/\}/g;
- s/&at;/\@/g;
- s/&amp;/&/g;
- return $_;
-}
-
-sub add_footnote
-{
- unless (exists $sects{FOOTNOTES}) {
- $sects{FOOTNOTES} = "\n=over 4\n\n";
- }
-
- $sects{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++;
- $sects{FOOTNOTES} .= $_[0];
- $sects{FOOTNOTES} .= "\n\n";
-}
-
-# stolen from Symbol.pm
-{
- my $genseq = 0;
- sub gensym
- {
- my $name = "GEN" . $genseq++;
- my $ref = \*{$name};
- delete $::{$name};
- return $ref;
- }
-}
diff --git a/contrib/binutils/etc/ChangeLog b/contrib/binutils/etc/ChangeLog
index 6865f2df1859..a5959c70a704 100644
--- a/contrib/binutils/etc/ChangeLog
+++ b/contrib/binutils/etc/ChangeLog
@@ -1,3 +1,39 @@
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * texi2pod.pl: Correct handling of absolute @include.
+
+2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * texi2pod.pl: Handle -I.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.in: Add install-html target. Add htmldir,
+ docdir and datarootdir.
+ * configure.texi: Document install-html target.
+ * configure.in: AC_SUBST datarootdir, docdir, htmldir.
+ * configure: Regenerate.
+
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.in: TEXI2HTML uses makeinfo. Define
+ HTMLFILES. Add html targets.
+ * 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.
+
+2005-10-21 Bob Wilson <bob.wilson@acm.org>
+
+ * texi2pod.pl: Import latest version from GCC.
+
+2005-05-19 Zack Weinberg <zack@codesourcery.com>
+
+ * Makefile.in: Have 'all' depend on 'info'.
+
2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
* configure.texi: Use "i[3-7]86" in example.
@@ -63,7 +99,7 @@
1998-12-03 Nick Clifton <nickc@cygnus.com>
* targetdoc/fr30.texi: New document.
-
+
1998-10-01 Angela Marie Thomas (angela@cygnus.com)
* comp-tools-fix, cross-tools-fix: Replace /usr/include
@@ -128,7 +164,7 @@ Mon May 18 14:27:37 1998 Angela Marie Thomas (angela@cygnus.com)
Thu May 14 14:43:10 1998 Nick Clifton <nickc@cygnus.com>
* targetdoc/arm-interwork.texi: Document dlltool support of
- interworking.
+ interworking.
Thu May 7 16:49:38 1998 Jason Molenda (crash@bugshack.cygnus.com)
@@ -137,7 +173,7 @@ Thu May 7 16:49:38 1998 Jason Molenda (crash@bugshack.cygnus.com)
Wed Apr 1 17:11:44 1998 Nick Clifton <nickc@cygnus.com>
- * targetdoc/arm-interwork.texi: Document ARM/thumb interworking.
+ * targetdoc/arm-interwork.texi: Document ARM/thumb interworking.
Tue Mar 31 15:28:20 1998 Ian Lance Taylor <ian@cygnus.com>
@@ -147,7 +183,7 @@ Tue Mar 31 15:28:20 1998 Ian Lance Taylor <ian@cygnus.com>
Tue Mar 24 16:13:26 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
* configure: Regenerate with autoconf 2.12.1 to fix shell issues
- for NT native builds.
+ for NT native builds.
Mon Mar 9 16:41:04 1998 Doug Evans <devans@canuck.cygnus.com>
@@ -183,7 +219,7 @@ Tue Jun 17 15:50:23 1997 Angela Marie Thomas (angela@cygnus.com)
Thu Jun 12 13:47:00 1997 Angela Marie Thomas (angela@cygnus.com)
- * Install.in (show_exec_prefix_msg): fix quoting
+ * Install.in (show_exec_prefix_msg): fix quoting
Wed Jun 4 15:31:43 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
@@ -231,8 +267,8 @@ Thu Apr 10 23:23:33 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
Mon Apr 7 18:15:00 1997 Brendan Kehoe <brendan@cygnus.com>
- * Fix the version string for OSF1 4.0 to recognize either
- V4.* or X4.*
+ * Fix the version string for OSF1 4.0 to recognize either
+ V4.* or X4.*
Mon Apr 7 15:34:47 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -303,8 +339,8 @@ Mon Aug 28 17:25:49 1995 Jason Molenda (crash@phydeaux.cygnus.com)
Tue Aug 15 21:51:58 1995 Jason Molenda (crash@phydeaux.cygnus.com)
- * Install.in (guess_system): Match OSF/1 v3.x as the same as
- v2.x--v2.x binaries are upward compatible.
+ * Install.in (guess_system): Match OSF/1 v3.x as the same as
+ v2.x--v2.x binaries are upward compatible.
Tue Aug 15 21:46:54 1995 Jason Molenda (crash@phydeaux.cygnus.com)
@@ -319,8 +355,8 @@ Tue Aug 8 13:11:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
Thu Jun 8 00:42:56 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
- * subst-strings: change du commands to $BINDIR/. & $SRCDIR/. just
- in case they are symlinks.
+ * subst-strings: change du commands to $BINDIR/. & $SRCDIR/. just
+ in case they are symlinks.
Tue Apr 18 14:23:10 1995 J.T. Conklin <jtc@rtl.cygnus.com>
@@ -335,7 +371,7 @@ Tue Apr 18 14:23:10 1995 J.T. Conklin <jtc@rtl.cygnus.com>
* Install.in (do_mkdir): New function.
* Install.in: Added support for --with and --without options.
- Changed so that tape commands are not run when extracting
+ Changed so that tape commands are not run when extracting
from a file.
(do_mt): Changed to take only one argument.
@@ -343,7 +379,7 @@ Wed Mar 29 11:16:38 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* Install.in: catch UNAME==alpha-dec-osf2.x and correct entry for
alpha-dec-osf1.x
-
+
Fri Jan 27 12:04:29 1995 J.T. Conklin <jtc@rtl.cygnus.com>
* subst-strings (mips-sgi-irix5): New entry in table.
@@ -388,8 +424,8 @@ Thu Apr 28 14:42:22 1994 David J. Mackenzie (djm@rtl.cygnus.com)
Tue Apr 26 17:18:03 1994 Jason Molenda (crash@sendai.cygnus.com)
- * Install.in: fixincludes output is actually put in fixincludes.log,
- but echo'ed messages claim it is fixinc.log. This is the same
+ * Install.in: fixincludes output is actually put in fixincludes.log,
+ but echo'ed messages claim it is fixinc.log. This is the same
messages as I logged in March 4 1994, but for some reason we found
the change hadn't been done. I'll have to dig through the logs
and find out what I really did do that day. :)
@@ -449,21 +485,21 @@ Wed Mar 23 23:38:24 1994 Jason Molenda (crash@sendai.cygnus.com)
Wed Mar 23 13:42:48 1994 Jason Molenda (crash@sendai.cygnus.com)
- * Install.in: set PATH to $PATH:/bin:/usr/bin so we can pick
- up native tools even if the user doesn't have them in his
- path.
+ * Install.in: set PATH to $PATH:/bin:/usr/bin so we can pick
+ up native tools even if the user doesn't have them in his
+ path.
- * Install.in: ``hppa-1.1-hp-hpux'' -> ``hppa1.1-hp-hpux''.
+ * Install.in: ``hppa-1.1-hp-hpux'' -> ``hppa1.1-hp-hpux''.
Tue Mar 15 22:09:20 1994 Jason Molenda (crash@sendai.cygnus.com)
-
- * Install.in: TAPE_REWIND and TAPE_FORWARD variables for Unixunaware,
- added switch statement to detect if system is Unixunaware.
+
+ * Install.in: TAPE_REWIND and TAPE_FORWARD variables for Unixunaware,
+ added switch statement to detect if system is Unixunaware.
Fri Mar 4 12:10:30 1994 Jason Molenda (crash@sendai.cygnus.com)
- * Install.in: fixincludes output is actually put in fixincludes.log,
- but echo'ed messages claim it is fixinc.log.
+ * Install.in: fixincludes output is actually put in fixincludes.log,
+ but echo'ed messages claim it is fixinc.log.
Wed Nov 3 02:58:02 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com)
@@ -494,9 +530,9 @@ Thu Jun 10 16:01:25 1993 Jeffrey Osier (jeffrey@cygnus.com)
Wed Jun 9 19:23:59 1993 Jeffrey Osier (jeffrey@rtl.cygnus.com)
- * install-texi.in: added conditionals (nearly complete)
- cleaned up
- added support for other releases (not done)
+ * install-texi.in: added conditionals (nearly complete)
+ cleaned up
+ added support for other releases (not done)
Wed Jun 9 15:53:58 1993 Jim Kingdon (kingdon@cygnus.com)
@@ -511,7 +547,7 @@ Fri Jun 4 17:09:56 1993 Jeffrey Osier (jeffrey@cygnus.com)
Thu Jun 3 00:37:01 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
- * Install.in: pull COPYING and COPYING.LIB off of the tape
+ * Install.in: pull COPYING and COPYING.LIB off of the tape
Tue Jun 1 16:52:08 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
diff --git a/contrib/binutils/etc/Makefile.in b/contrib/binutils/etc/Makefile.in
index 63f7738c64ae..7d0607d960c8 100644
--- a/contrib/binutils/etc/Makefile.in
+++ b/contrib/binutils/etc/Makefile.in
@@ -25,7 +25,10 @@ man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
+datarootdir = @datarootdir@
+docdir = @docdir@
infodir = @infodir@
+htmldir = @htmldir@
SHELL = /bin/sh
@@ -39,7 +42,10 @@ MAKEINFO = `if [ -f ../texinfo/makeinfo/makeinfo ]; \
TEXI2DVI = `if [ -f ../texinfo/util/texi2dvi ]; \
then echo ../texinfo/util/texi2dvi; \
else echo texi2dvi; fi`
-TEXI2HTML = texi2html
+TEXI2HTML = `if [ -f ../texinfo/makeinfo/makeinfo ]; \
+ then echo "../texinfo/makeinfo/makeinfo --html"; \
+ else echo "makeinfo --html"; fi`
+
DVIPS = dvips
# Where to find texinfo.tex to format documentation with TeX.
@@ -50,10 +56,9 @@ TEXIDIR = $(srcdir)/../texinfo
INFOFILES = standards.info configure.info
DVIFILES = standards.dvi configure.dvi
+HTMLFILES = standards.html configure.html
-all:
-
-# We want install to imply install-info as per GNU standards.
+all: info
install: install-info
uninstall:
@@ -84,6 +89,32 @@ install-info: info
done; \
fi
+html:
+ for f in $(HTMLFILES); do \
+ if test -f $(srcdir)/`echo $$f | sed -e 's/.html$$/.texi/'`; then \
+ if $(MAKE) "TEXI2HTML=$(TEXI2HTML)" $$f; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
+ done
+
+install-html: html
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(htmldir)
+ if test ! -f standards.html; then cd $(srcdir); fi; \
+ if test -f standards.html; then \
+ for i in standards.html*; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i; \
+ done; \
+ fi
+ if test ! -f configure.html; then cd $(srcdir); fi; \
+ if test -f configure.html; then \
+ for i in configure.html*; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i; \
+ done; \
+ fi
+
dvi:
for f in $(DVIFILES); do \
if test -f $(srcdir)/`echo $$f | sed -e 's/.dvi$$/.texi/'`; then \
@@ -98,6 +129,9 @@ dvi:
standards.info: $(srcdir)/standards.texi $(srcdir)/make-stds.texi
$(MAKEINFO) --no-split -I$(srcdir) -o standards.info $(srcdir)/standards.texi
+standards.html: $(srcdir)/standards.texi $(srcdir)/make-stds.texi
+ $(TEXI2HTML) --no-split -I$(srcdir) -o standards.html $(srcdir)/standards.texi
+
standards.dvi: $(srcdir)/standards.texi
TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/standards.texi
@@ -133,12 +167,15 @@ configure.ps: configure.dvi $(srcdir)/configdev.ein $(srcdir)/configbuild.ein
rm -f configdev.eps configbuild.eps
configure.html: $(srcdir)/configure.texi
- $(TEXI2HTML) -split_chapter $(srcdir)/configure.texi
+ cp $(srcdir)/configdev.jin configdev.jpg
+ cp $(srcdir)/configbuild.jin configbuild.jpg
+ $(TEXI2HTML) --no-split -I$(srcdir) -o configure.html $(srcdir)/configure.texi
clean:
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
- rm -f configdev.txt configbuild.txt configdev.eps configbuild.eps
+ rm -f configdev.txt configbuild.txt
+ rm -f configdev.eps configbuild.eps
rm -f configdev.jpg configbuild.jpg
mostlyclean: clean
@@ -147,6 +184,7 @@ distclean: clean
rm -f Makefile config.status config.cache
maintainer-clean realclean: distclean
+ rm -f *.html*
rm -f *.info*
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog
index 209d3bb95614..1723944a36e8 100644
--- a/contrib/binutils/gas/ChangeLog
+++ b/contrib/binutils/gas/ChangeLog
@@ -1,622 +1,758 @@
-2005-06-08 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+2006-07-19 Mat Hostetter <mat@lcs.mit.edu>
- * config/tc-m32r.c (use_parallel): Change default value from 1 to 0.
+ * symbols.c (report_op_error): Fix pasto. Don't use as_bad_where
+ when file and line unknown.
-2004-08-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
- * config/tc-mips.c (append_insn): Handle delay slots in branch likely
- correctly.
+ * po/Make-in (pdf, ps): New dummy targets.
-2004-07-28 Jason Thorpe <thorpej@wasabisystems.com>
+2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
- * config/tc-hppa.h (TARGET_FORMAT): Set to "elf32-hppa-netbsd"
- for TE_NetBSD.
+ * doc/Makefile.am (TEXI2DVI): Define.
+ * doc/Makefile.in: Regenerate.
+ * doc/c-arc.texi: Fix typo.
-2004-05-23 Alan Modra <amodra@bigpond.net.au>
+2006-05-30 Nick Clifton <nickc@redhat.com>
- * expr.c (operand, operator): Don't reject '++' and '--'.
+ * po/es.po: Updated Spanish translation.
-2004-05-13 Joel Sherrill <joel@oarcorp.com>
+2006-05-25 Nathan Sidwell <nathan@codesourcery.com>
- * configure.in (or32-*-rtems*): Switch to elf.
- * configure: Regenerate.
+ * gas/config/tc-m68k.c (m68k_init_arch): Move checking of
+ cfloat/m68881 to correct architecture before using it.
-2004-05-13 Nick Clifton <nickc@redhat.com>
-
- * po/fr.po: Updated French translation.
-
-2004-05-07 Daniel Jacobowitz <dan@debian.org>
-
- * Makefile.am (DIST_SUBDIRS): Define.
- * aclocal.m4: Regenerate with automake 1.8.4.
- * Makefile.in: Likewise.
- * doc/Makefile.in: Likewise.
-
-2004-05-07 Daniel Jacobowitz <dan@debian.org>
-
- Merge from mainline:
- 2004-05-05 Jakub Jelinek <jakub@redhat.com>
- * tc-s390.h (md_do_align, HANDLE_ALIGN): Remove.
- (NOP_OPCODE): Define.
- (s390_align_code): Remove prototype.
- * tc-s390.c (s390_align_code): Remove.
-
- 2004-04-22 Bruno De Bus <bdebus@elis.ugent.be>
- * config/tc-arm.h (enum mstate): Move here, add MAP_UNDEFINED
- state.
- (TC_SEGMENT_INFO_TYPE): Define to enum mstate.
- * config/tc-arm.c (enum mstate): Delete from here.
- (mapping_state): Remove the static mapstate variable and instead
- store the state in the segment. This allows a per-section mapping
- state. Handle and ignore MAP_UNDEFINED states.
- (arm_elf_change_section): Get the current mapping state from the
- new section.
- (s_ltorg): Set the mapping state to MAP_DATA.
- (arm_cleanup): Use arm_elf_change_section to get the mapping state
- for each pool as it is emitted.
-
- 2004-04-22 Nick Clifton <nickc@redhat.com>
- * config/tc-arm.h: Formatting tidy ups.
-
-2004-05-07 Alexandre Oliva <aoliva@redhat.com>
-
- * config/tc-frv.h (MAX_MEM_FOR_RS_ALIGN_CODE): New.
- (HANDLE_ALIGN): New.
-
-2004-05-05 Alexandre Oliva <aoliva@redhat.com>
-
- * configure.in: Set em=linux for frv-*-*linux*.
- * configure: Rebuilt.
- * config/tc-frv.h (TARGET_FORMAT): Use elf32-frvfdpic if...
- (frv_md_fdpic_enabled): New.
- * config/tc-frv.c (frv_md_fdpic_enabled): New.
- (DEFAULT_FDPIC): New.
- (frv_flags): Use DEFAULT_FDPIC.
- (frv_pic_flag): Likewise.
- (OPTION_NOPIC): New.
- (md_longopts): Add -mnopic.
- (md_parse_option): Handle it.
- (md_show_usage): Add -mfdpic and -mnopic.
+2006-05-16 Nick Clifton <nickc@redhat.com>
+
+ * Import these patches from the mainline:
+
+ 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-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-11 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (append_insn): Don't check the range of j or
+ jal addresses.
+
+2006-05-10 Alan Modra <amodra@bigpond.net.au>
+
+ * dwarf2dbg.c (get_line_subseg): Attach new struct line_seg to end
+ of list rather than beginning.
+
+2006-05-10 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-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 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 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-01 James Lemke <jwlemke@wasabisystems.com>
+
+ * subsegs.c (subseg_set_rest): Always set seginfp->frchainP if NULL.
+
+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-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/POTFILES.in: Regenerated.
+
+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>
-2004-04-20 Chris Demetriou <cgd@broadcom.com>
+ * config/tc-z80.c (z80_optimize_expr): Removed; redundant since 2006-04-04.
+ * config/tc-z80.h (z80_optimize_expr, md_optimize_expr): Removed.
- * NEWS: Note that MIPS -membedded-pic option is deprecated.
+2006-04-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
-2004-04-19 Eric Christopher <echristo@redhat.com>
+ * 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.
- * config/tc-mips.c (mips_dwarf2_addr_size): Revert part
- of previous patch for fix in gcc.
+2006-04-07 Paul Brook <paul@codesourcery.com>
-2004-04-16 Alan Modra <amodra@bigpond.net.au>
+ * config/tc-arm.c (parse_operands): Set default error message.
- * expr.c (operand): Correct checks for ++ and --.
+2006-04-07 Paul Brook <paul@codesourcery.com>
-2004-04-14 Richard Sandiford <rsandifo@redhat.com>
+ * config/tc-arm.c (parse_tb): Set inst.error before returning FAIL.
- * doc/c-mips.texi (-m{no-,}fix-vr4120): Renamed from
- -{no-}mfix-vr4122-bugs.
- * config/tc-mips.c (mips_fix_vr4120): Renamed from mips_fix_4122_bugs.
- (append_insn, mips_emit_delays): Update accordingly.
- (OPTION_FIX_VR4120, OPTION_NO_FIX_VR4120): Renamed from *VR4122.
- (md_longopts): Change -{no-,}mfix-vr4122-bugs to -m{no-,}fix-vr4120.
- (md_parse_option): Update after above changes.
- (md_show_usage): Add -mfix-vr4120.
+2006-04-07 Paul Brook <paul@codesourcery.com>
-2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * config/tc-arm.c (md_apply_fix): Set H bit on blx instruction.
- * Makefile.am: Remove mips from aout targets.
+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: Remove mips-dec-bsd* target.
+ * configure.in: AC_SUBST datarootdir, docdir, htmldir.
* configure: Regenerate.
+ * doc/Makefile.am: Add install-html and install-html-am targets.
+ * doc/Makefile.in: Regenerate.
-2004-04-09 Daniel Jacobowitz <drow@mvista.com>
-
- Merge from mainline:
- 2004-04-07 Alan Modra <amodra@bigpond.net.au>
- PR 96
- * config/tc-ppc.c (ppc_elf_suffix): Add valid32 and valid64 fields
- to struct map_bfd. Adjust MAP macro, and define MAP32, MAP64.
- Update "mapping". Restrict some @ modifiers to 32 bit.
-
- 2004-04-01 Asgari Jinia <asgarij@kpitcummins.com>
- Dhananjay Deshpande <dhananjayd@kpitcummins.com>
-
- * config/tc-sh.c (dont_adjust_reloc_32): New variable.
- (sh_fix_adjustable): Avoid adjusting BFD_RELOC_32 when
- dont_adjust_reloc_32 is set.
- (md_longopts): Add option -renesas.
- (md_parse_option, md_show_usage): Likewise.
- * doc/c-sh.texi: Likewise.
-
- 2004-04-01 Dave Korn <dk@artimi.com>
- * config/tc-dlx.c (md_assemble): set fx_no_overflow flag for
- hi16 and lo16 fixS structs.
- (md_assemble): generate bit_fixS for RELOC_DLX_LO16 in
- exactly the same way as for RELOC_DLX_REL16.
- (machine_ip): properly respect LO flag in the_insn and
- output RELOC_DLX_LO16 rather than RELOC_DLX_16.
- (md_apply_fix3): apply RELOC_DLX_LO16.
-
- 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
- * tc-hppa.c (cons_fix_new_hppa): Check for PC relative base type.
- (pa_comm): Set BSF_OBJECT in symbol flags.
-
- 2004-03-18 Nathan Sidwell <nathan@codesourcery.com>
- * read.c (read_a_source_file): Use demand_empty_rest_of_line.
- (demand_empty_rest_of_line): Issue an error here.
- (ignore_rest_of_line): Silently skip to end.
- (demand_copy_string): Issue an error, not warning.
- (equals): Likewise.
- * config/obj-elf.c (obj_elf_section_name): Likewise.
- (obj_elf_section): Likewise.
- * config/tc-arc.c (arc_extoper): Remove bogus NULL checks.
- (arc_extinst): Likewise.
- * config/tc-ia64.c (dot_saveb): Use demand_empty_rest_of_line.
- (dot_spill): Likewise.
- (dot_unwabi): Likewise.
- (dot_prologue): Likewise.
-
- 2004-03-18 Nathan Sidwell <nathan@codesourcery.com>
- * expr.c (operand): Reject ++ and --.
- (operator): Likewise.
-
- 2004-03-12 Bob Wilson <bob.wilson@acm.org>
- * read.c (s_leb128): Call md_flush_pending_output.
-
- 2004-03-07 Andreas Schwab <schwab@suse.de>
- * doc/c-hppa.texi (HPPA Directives): Fix typo.
-
- 2004-03-07 Richard Henderson <rth@redhat.com>
- * dw2gencfi.c (output_cie): Align length to 4 byte boundary.
- (cfi_finish): Likewise for fde.
-
- 2004-03-05 H.J. Lu <hongjiu.lu@intel.com>
- * config/tc-ia64.c (md_assemble): Properly handle NULL
- align_frag.
- (ia64_handle_align): Don't abort if failed to add a stop bit.
-
- 2004-03-04 H.J. Lu <hongjiu.lu@intel.com>
- * Makefile.in: Regenerated.
- * aclocal.m4: Likewise.
- * configure: Likewise.
- * doc/Makefile.in: Likewise.
-
- 2004-03-03 H.J. Lu <hongjiu.lu@intel.com>
- * config/tc-ia64.c (dot_align): New.
- (ia64_do_align): Make it static.
- (md_pseudo_table): Use "dot_align" for "align".
- (ia64_md_do_align): Don't set align_frag here.
- (ia64_handle_align): Add a stop bit to the previous bundle if
- needed.
-
- * config/tc-ia64.h (ia64_do_align): Removed.
-
- 2004-03-02 H.J. Lu <hongjiu.lu@intel.com>
- * config/tc-ia64.c (align_frag): New.
- (md_assemble): Set the tc_frag_data field in align_frag for
- IA64_OPCODE_FIRST instructions.
- (ia64_md_do_align): Set align_frag.
- (ia64_handle_align): Add a stop bit if needed.
-
- * config/tc-ia64.h (TC_FRAG_TYPE): New.
- (TC_FRAG_INIT): New.
-
- 2004-02-27 Nick Clifton <nickc@redhat.com>
- * config/tc-sh.c (get_operand): Revert previous delta.
- (tc_gen_reloc): Check for an unknown reloc type before processing
- the addend.
-
- 2004-02-27 Hannes Reinecke <hare@suse.de>
- * config/tc-s390.c (s390_insn): Correct range check for opcode in
- .insn pseudo operation.
-
- 2004-02-27 Anil Paranjpe <anilp1@kpitcummins.com>
- * config/tc-sh.c (get_operand): In case of #Imm, check has been
- added for wrong syntax.
-
- 2004-02-26 Andrew Stubbs <andrew.stubbs@superh.com>
- * config/tc-sh.c (build_Mytes): Add REG_N_D and REG_N_B01
- nibble types to assembler.
-
- 2004-02-25 Fred Fish <fnf@redhat.com>
- * config/tc-iq2000.c: Add missing \n\ in multiline string literal.
-
- 2004-02-20 James E Wilson <wilson@specifixinc.com>
- * config/tc-ia64.c (slot_index): New arg before_relax. Use instead of
- finalize_syms.
- (fixup_unw_records): New arg before_relax. Pass to slot_index.
- (ia64_estimate_size_before_relax): New.
- (ia64_convert_frag): Pass 0 to fixup_unw_records. Add comment.
- (generate_unwind_image): Pass 1 to fixup_unw_records.
- * config/tc-ia64.h (ia64_estimate_size_before_relax): Declare.
- (md_estimate_size_before_relax): Call ia64_estimate_size_before_relax.
-
- 2004-02-19 Jakub Jelinek <jakub@redhat.com>
- * stabs.c (generate_asm_file): Avoid warning about use of
- uninitialized variable.
-
- 2004-02-18 David Mosberger <davidm@hpl.hp.com>
- * config/tc-ia64.c (ia64_flush_insns): In addition to prologue,
- body, and endp, allow unwind records which do not have a "t"
- (time/instruction) field.
-
-2004-03-22 Bob Wilson <bob.wilson@acm.org>
-
- * config/tc-xtensa.c (xtensa_post_relax_hook): Create literal
- tables even when use_literal_section flag is not set.
-
-2004-03-22 Hans-Peter Nilsson <hp@axis.com>
-
- * doc/c-cris.texi (CRIS-Opts): Document --no-mul-bug-abort,
- --mul-bug-abort and the default behavior.
- * config/tc-cris.c (cris_insn_kind): New member CRIS_INSN_MUL.
- (err_for_dangerous_mul_placement): New variable.
- (STATE_MUL, OPTION_MULBUG_ABORT_ON, OPTION_MULBUG_ABORT_OFF): New
- macros.
- (md_cris_relax_table): Have placeholder for STATE_MUL.
- (md_longopts): New options --mul-bug-abort and --no-mul-bug-abort.
- (cris_relax_frag) <case ENCODE_RELAX (STATE_MUL, STATE_BYTE)>: New
- case doing nothing.
- (md_estimate_size_before_relax) <case ENCODE_RELAX (STATE_MUL,
- STATE_BYTE)>: Ditto.
- (md_convert_frag) <ENCODE_RELAX (STATE_MUL, STATE_BYTE)>: Check
- alignment and position of this frag, emit error message if
- suspicious.
- (md_assemble): For a multiply insn and when checking it,
- transform the current frag into a special frag for that purpose.
- (md_parse_option) <case OPTION_MULBUG_ABORT_OFF, case
- OPTION_MULBUG_ABORT_ON>: Handle new options.
-
-2004-03-19 Bob Wilson <bob.wilson@acm.org>
-
- * config/tc-xtensa.c (mark_literal_frags): New function.
- (xtensa_move_literals): Call mark_literal_frags for all literal
- segments, including init and fini literal segments.
- (xtensa_post_relax_hook): Swap use of xt_insn_sec and xt_literal_sec.
-
-2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * config/tc-sh.c: Include dw2gencfi.h.
- (sh_cfi_frame_initial_instructions): New function.
- (sh_regname_to_dw2regnum): Likewise.
- * config/tc-sh.h (DWARF2_LINE_MIN_INSN_LENGTH): Move to the end of
- file.
- (TARGET_USE_CFIPOP): Define.
- (tc_cfi_frame_initial_instructions): Likewise.
- (tc_regname_to_dw2regnum): Likewise.
- (DWARF2_DEFAULT_RETURN_COLUMN, DWARF2_CIE_DATA_ALIGNMENT): Likewise.
- * Makefile.am: Update dependencies.
- * 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>
-2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+ * 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.
- * configure.in: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
+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.
-2004-03-12 Bob Wilson <bob.wilson@acm.org>
+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.
- * read.c (s_leb128): Call md_flush_pending_output.
+2006-03-25 Richard Sandiford <richard@codesourcery.com>
-2004-03-12 Michal Ludvig <mludvig@suse.cz>
+ * config/tc-m68k.c (m68k_cpus): Change cpu_cf5208 entries to use
+ mcfemac instead of mcfmac.
- * config/tc-i386.c (output_insn): Handle PadLock instructions.
- * config/tc-i386.h (CpuPadLock): New define.
- (CpuUnknownFlags): Added CpuPadLock.
+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>
-2004-02-26 Eric Christopher <echristo@redhat.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.
- * config/tc-mips.c (mips_dwarf2_addr_size): New.
- * config/tc-mips.h (DWARF2_ADDR_SIZE): Use.
+2006-03-21 Paul Brook <paul@codesourcery.com>
-2004-02-17 Petko Manolov <petkan@nucleusys.com>
+ * config/tc-arm.c (md_apply_fix): Fix typo in offset mask.
- * config/tc-arm.c (do_mav_dspsc_1): Correct offset of CRn.
- (do_mav_dspsc_2): Likewise.
- Fix accumulator registers move opcodes.
+2006-03-21 Sterling Augustine <sterling@tensilica.com>
-2004-02-13 Hannes Reinecke <hare@suse.de>
- Jakub Jelinek <jakub@redhat.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.
- * dwarf2dbg.c (get_filenum): Do not read beyond allocated memory.
+2006-03-21 Paul Brook <paul@codesourcery.com>
-2004-02-10 Steve Ellcey <sje@cup.hp.com>
+ * config/tc-arm.c (insns): Correct opcodes for ldrbt and strbt.
- * config/tc-ia64.h (ia64_frob_symbol): New declaration.
- (tc_frob_symbol): New macro definition.
- * config/tc-ia64.c (ia64_frob_symbol): New routine.
+2006-03-20 Paul Brook <paul@codesourcery.com>
-2004-02-09 Daniel Jacobowitz <drow@mvista.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.
- * config/tc-arm.c (md_begin): Mark .note.gnu.arm.ident as
- read-only.
+2006-03-20 Paul Brook <paul@codesourcery.com>
-2004-02-09 Nathan Sidwell <nathan@codesourcery.com>
+ * config/tc-arm.c (output_relax_insn): Call dwarf2_emit_insn before
+ outputting the insn.
- * read.h (IGNORE_OPCODE_CASE): Do not define. Replace with ...
- (TC_CASE_SENSITIVE): ... this.
- * read.c: Replace IGNORE_OPCODE_CASE with TC_CASE_SENSITIVE.
- * doc/internals.texi (TC_CASE_SENSITIVE): Document.
+2006-03-18 Jan-Benedict Glaw <jbglaw@lug-owl.de>
-2004-02-06 James E Wilson <wilson@specifixinc.com>
+ * config/tc-vax.c: Update copyright year.
+ * config/tc-vax.h: Likewise.
- * config/tc-ia64.c (dot_endp): Delete call to output_endp.
- (generate_unwind_image): Re-add it here.
+2006-03-18 Jan-Benedict Glaw <jbglaw@lug-owl.de>
-2004-02-06 Nathan Sidwell <nathan@codesourcery.com>
+ * 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.
- * dwarf2dbg.c (DWARF2_ADDR_SIZE): Remove trailing ';'
- * read.h (SKIP_WHITESPACE): Turn into an expression.
- * read.c (read_a_source_file): A pseudo is removed by having a
- NULL handler.
+2006-03-17 Paul Brook <paul@codesourcery.com>
-2004-02-05 James E Wilson <wilson@specifixinc.com>
+ * config/tc-arm.c (insns): Add ldm and stm.
- * config/tc-ia64.c (output_endp): New.
- (count_bits): Delete.
- (ia64_flush_insns, process_one_record, optimize_unw_records): Handle
- endp unwind records.
- (fixup_unw_records): Handle endp unwind records. Delete code for
- shortening prologue regions not followed by a body record.
- (dot_endp): Call add_unwind_entry to emit endp unwind record.
- * config/tc-ia64.h (unw_record_type): Add endp.
+2006-03-17 Ben Elliston <bje@au.ibm.com>
-2004-02-03 James E Wilson <wilson@specifixinc.com>
+ PR gas/2446
+ * doc/as.texinfo (Ident): Document this directive more thoroughly.
- * config/tc-ia64.c (ia64_convert_frag): Call md_number_to_chars to
- fill padding bytes with zeroes.
- (emit_one_bundle): New locals last_ptr, end_ptr. Rewrite code that
- sets unwind_record slot_number and slot_frag fields.
+2006-03-16 Paul Brook <paul@codesourcery.com>
-2004-02-02 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * config/tc-arm.c (insns): Add "svc".
- * config/tc-mips.c (add_got_offset_hilo): New function.
- (macro): Use load_register() and add_got_offset_hilo() to load
- constants instead of hardcoding code sequences throughout.
+2006-03-13 Bob Wilson <bob.wilson@acm.org>
-2004-01-28 H.J. Lu <hongjiu.lu@intel.com>
+ * config/tc-xtensa.c (xg_translate_sysreg_op): Remove has_underbar
+ flag and avoid double underscore prefixes.
- * config/tc-ia64.c (emit_one_bundle): Add proper indentation.
+2006-03-10 Paul Brook <paul@codesourcery.com>
-2004-01-26 Bernardo Innocenti <bernie@develer.com>
+ * config/tc-arm.c (md_begin): Handle EABIv5.
+ (arm_eabis): Add EF_ARM_EABI_VER5.
+ * doc/c-arm.texi: Document -meabi=5.
- * config/tc-m68k.h (EXTERN_FORCE_RELOC): Handle m68k-uclinux specially,
- like m68k-elf.
- * config/tc-m68k.c (RELAXABLE_SYMBOL): Use EXTERN_FORCE_RELOC instead
- of hard-coded test for TARGET_OS=elf.
+2006-03-10 Ben Elliston <bje@au.ibm.com>
-2004-01-24 Chris Demetriou <cgd@broadcom.com>
+ * app.c (do_scrub_chars): Simplify string handling.
- * config/tc-mips.c (hilo_interlocks): Change definition
- so that MIPS32, MIPS64 and later ISAs are included, along with
- the already-included machines. Update comments.
+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>
-2004-01-23 Daniel Jacobowitz <drow@mvista.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.
- * config/tc-arm.c (tc_gen_reloc): Improve error message for
- undefined local labels.
+2006-03-06 Bob Wilson <bob.wilson@acm.org>
-2004-01-23 Richard Sandiford <rsandifo@redhat.com>
+ * config/tc-xtensa.c (xtensa_post_relax_hook): Generate literal tables
+ even when using the text-section-literals option.
- * config/tc-mips.c (load_address, macro): Update comments about
- NewABI GP relaxation.
+2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
-2004-01-23 Richard Sandiford <rsandifo@redhat.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.
- * config/tc-mips.c (macro_build): Remove place and counter arguments.
- (mips_build_lui, macro_build_ldst_constoffset): Likewise.
- (mips16_macro_build, macro_build_jalr): Remove counter argument.
- (set_at, load_register, load_address, move_register): Likewise.
- (load_got_offset, add_got_offset): Likewise.
- Update all calls and tidy accordingly.
+2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
-2004-01-23 Richard Sandiford <rsandifo@redhat.com>
+ * 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-mips.c (RELAX_ENCODE): Remove WARN argument.
- (RELAX_FIRST, RELAX_SECOND): Turn into 8-bit quantities.
- (RELAX_USE_SECOND): Bump to 0x10000.
- (RELAX_SECOND_LONGER, RELAX_NOMACRO, RELAX_DELAY_SLOT): New flags.
- (mips_macro_warning): New variable.
- (md_assemble): Wrap macro expansion in macro_start() and macro_end().
- (s_cpload, s_cpsetup, s_cprestore, s_cpreturn): Likewise.
- (relax_close_frag): Set mips_macro_warning.first_frag. Adjust use
- of RELAX_ENCODE.
- (append_insn): Update mips_macro_warning.sizes.
- (macro_start, macro_warning, macro_end): New functions.
- (macro_build): Don't emit warnings here.
- (macro_build_lui, md_estimate_size_before_relax): ...or here.
- (md_convert_frag): Check for cases where one macro alternative
- needs a warning and the other doesn't. Emit a warning if the
- longer sequence was chosen.
-
-2004-01-23 Richard Sandiford <rsandifo@redhat.com>
-
- * config/tc-mips.h (tc_frag_data_type, TC_FRAG_TYPE): Remove.
- * config/tc-mips.c (RELAX_ENCODE): Take three arguments: the size of
- the first sequence, the size of the second sequence, and a flag
- that says whether we should warn.
- (RELAX_OLD, RELAX_NEW, RELAX_RELOC[123]): Delete.
- (RELAX_FIRST, RELAX_SECOND): New.
- (mips_relax): New variable.
- (relax_close_frag, relax_start, relax_switch, relax_end): New fns.
- (append_insn): Remove "place" argument. Use mips_relax.sequence
- rather than "place" to check whether we're expanding the second
- alternative of a relaxable macro. Remove redundant check for
- branch relaxation. If generating a normal insn, and there
- is not enough room in the current frag, call relax_close_frag()
- to close it. Update mips_relax.sizes[]. Emit fixups for the
- second version of a relaxable macro. Record the first relaxable
- fixup in mips_relax. Remove tc_gen_reloc workaround.
- (macro_build): Remove all uses of "place". Use mips_relax.sequence
- in the same way as in append_insn.
- (mips16_macro_build): Remove "place" argument.
- (macro_build_lui): As for macro_build. Don't drop the add_symbol
- when generating the second version of a relaxable macro.
- (load_got_offset, add_got_offset): New functions.
- (load_address, macro): Use new relaxation machinery. Remove
- tc_gen_reloc workarounds.
- (md_estimate_size_before_relax): Set RELAX_USE_SECOND if the second
- version of a relaxable macro is needed. Return -RELAX_SECOND if the
- first version is needed.
- (tc_gen_reloc): Remove relaxation handling.
- (md_convert_frag): Go through the fixups for a relaxable macro and
- mark those that belong to the unneeded alternative as done. If the
- second alternative is needed, adjust the fixup addresses to account
- for the deleted first alternative.
-
-2004-01-23 Richard Sandiford <rsandifo@redhat.com>
-
- * frags.h (frag_room): Declare.
- * frags.c (frag_room): New function.
- * doc/internals.texi: Document it.
-
-2004-01-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * config/tc-mips.c (append_insn): Don't do r3900 interlock
- optimization for -mtune=r3900, as this will break on other CPUs.
-
-2004-01-11 Tom Rix <tcrix@worldnet.att.net>
-
- * config/tc-m68hc11.c (build_indexed_byte): movb and movw cannot
- be relaxed, use fixup.
- (md_apply_fix3): Use 5 bit reloc from movb and movw fixup.
-
-2004-01-19 Jakub Jelinek <jakub@redhat.com>
-
- * config/tc-sparc.c (sparc_ip): Disallow %f32-%f63 for single
- precision operands.
-
-2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-
- * config/tc-mips.c (append_insn): Properly detect variant frags
- that preclude swapping of relaxed branches. Correctly swap
- instructions between frags when dealing with relaxed branches.
-
-2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-
- * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
- throughout.
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
+ * 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.
-2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
+2006-02-28 Jan Beulich <jbeulich@novell.com>
- * config/tc-h8300.c (build_bytes): Apply relaxation to bit
- manipulation insns.
+ * macro.c (get_any_string): Don't insert quotes for <>-quoted input.
-2004-01-12 Richard Sandiford <rsandifo@redhat.com>
+2006-02-28 Jan Beulich <jbeulich@novell.com>
- * config/tc-mips.c (macro_build_jalr): When adding an R_MIPS_JALR
- reloc, reserve space for the delay slot as well as the jalr itself.
+ 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.
-2004-01-09 Paul Brook <paul@codesourcery.com>
+2006-02-28 Mat <mat@csail.mit.edu>
- * config/tc-arm.c (do_vfp_reg2_from_sp2): Rename from do_vfp_sp_reg2.
- (do_vfp_sp2_from_reg2): New function.
- (insns): Use them.
- (do_vfp_dp_from_reg2): Check return values properly.
-
-2004-01-08 Ian Lance Taylor <ian@wasabisystems.com>
-
- * config/tc-mips.c (warn_nops): Remove static variable.
- (macro): Remove test of warn_nops.
- (md_shortops): Remove 'n'.
- (md_parse_option): Remove 'n' case.
- (md_show_usage): Remove -n.
- * doc/as.texinfo (Overview): Remove MIPS -n option.
- * doc/c-mips.texi (MIPS Opts): Remove mention -n.
- * NEWS: Mention removal of MIPS -n option.
-
- * config/tc-mips.c (ISA_HAS_COPROC_DELAYS): Remove.
- (cop_interlocks): Check ISA level.
- (cop_mem_interlocks): Define.
- (reg_needs_delay): Check cop_interlocks rather than
- ISA_HAS_COPROC_DELAYS.
- (append_insn): Likewise. Use cop_mem_interlocks rather than
- directly checking mips_opts.isa.
- (mips_emit_delays): Likewise.
-
-2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/tc-ia64.c (unwind): Move next_slot_number and
- next_slot_frag to ...
- (unw_rec_list): Here.
- (free_list_records): Removed.
- (output_unw_records): Likewise.
- (generate_unwind_image): Make it void.
- (alloc_record): Initialize next_slot_number and next_slot_frag.
- (slot_index): Take .org, .space and .align into account.
- (fixup_unw_records): Don't set slot_number to 0. Use
- list->next_slot_number and list->next_slot_frag instead of
- unwind.next_slot_number and unwind.next_slot_frag.
- (ia64_convert_frag): New.
- (generate_unwind_image): Generate a rs_machine_dependent frag
- for unwind record.
- (emit_one_bundle): Use list->next_slot_number and
- list->next_slot_frag instead of unwind.next_slot_number and
- unwind.next_slot_frag.
-
- * config/tc-ia64.h (md_convert_frag): Defined as
- ia64_convert_frag.
- (md_estimate_size_before_relax): Defined as (f)->fr_var.
-
-2004-01-06 Alexandre Oliva <aoliva@redhat.com>
-
- 2003-12-19 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-frv.h (md_apply_fix3): Don't define.
- * config/tc-frv.c (md_apply_fix3): New. Shift/truncate %hi/%lo
- operands.
- * config/tc-frv.h (TC_FORCE_RELOCATION_SUB_LOCAL): Define.
- 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-frv.c (line_separator_chars): Add `!'.
- 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-frv.c (md_assemble): Clear insn upfront.
- 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-frv.c (OPTION_FDPIC): New macro.
- (md_longopts): Add mfdpic.
- (md_parse_option): Handle it.
- 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-frv.c (md_cgen_lookup_reloc) <FRV_OPERAND_D12,
- FRV_OPERAND_S12>: Use reloc type encoded in fix-up.
- (frv_pic_ptr): Parse funcdesc.
+ * dwarf2dbg.c (get_filenum): Don't inadvertently decrease files_in_use.
-2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+2006-02-27 Jakub Jelinek <jakub@redhat.com>
- * doc/as.texinfo: Let texi2pod parse asconfig.texi and
- gasver.texi. Remove duplicate symbol definitions for texi2pod.
+ * 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.
-2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
- * Makefile.am (Makefile): Move the dependency on
- $(BFDDIR)/configure.in to...
- (CONFIG_STATUS_DEPENDENCIES): ... here.
- (AUTOMAKE_OPTIONS): Require automake 1.8.
- * Makefile.in: Regenerate.
- * doc/Makefile.am (BASEDIR, BFDDIR): Define.
- (CONFIG_STATUS_DEPENDENCIES): Add a dependency on
- $(BFDDIR)/configure.in here as well.
+ * 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.
-2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
- * Makefile.am (install, install-info, RECURSIVE_TARGETS): Remove.
- * Makefile.in: Regenerate.
- * aclocal.m4: Regenerate.
- * doc/Makefile.am (install, install-info): Remove.
- (install-data-local): A new hook for install-info.
- (AUTOMAKE_OPTIONS): Require automake 1.8.
- * doc/Makefile.in: Regenerate.
+ * configure.tgt: set emulation for mips-*-netbsd*
-2004-01-02 Nutan Singh <nutan@kpitcummins.com>
+2006-02-14 Jakub Jelinek <jakub@redhat.com>
- * doc/c-sh.texi: Update description about floating point behavior
- of SH family.
+ * config.in: Rebuilt.
-2004-01-02 Bernardo Innocenti <bernie@develer.com>
+2006-02-13 Bob Wilson <bob.wilson@acm.org>
- * configure.in: Add m68k-uClinux target.
- * configure: Regenerate.
+ * 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>
-For older changes see ChangeLog-0203
+ * 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
diff --git a/contrib/binutils/gas/ChangeLog-0001 b/contrib/binutils/gas/ChangeLog-0001
index 9d8af6fbe897..b1208c4d78c3 100644
--- a/contrib/binutils/gas/ChangeLog-0001
+++ b/contrib/binutils/gas/ChangeLog-0001
@@ -8,8 +8,8 @@
2001-12-31 Jeffrey A Law (law@redhat.com)
- * config/tc-hppa.c (pa_ip): Handle new 'c' mode completers,
- 'X', 'M', and 'A'.
+ * config/tc-hppa.c (pa_ip): Handle new 'c' mode completers,
+ 'X', 'M', and 'A'.
2001-12-21 Jakub Jelinek <jakub@redhat.com>
@@ -7701,3 +7701,10 @@
pseudo ops.
For older changes see ChangeLog-9899
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/gas/ChangeLog-0203 b/contrib/binutils/gas/ChangeLog-0203
index e22a5d5f2d55..63be7bf391f5 100644
--- a/contrib/binutils/gas/ChangeLog-0203
+++ b/contrib/binutils/gas/ChangeLog-0203
@@ -14,7 +14,7 @@
.byte directive generates a pc-relative relocation.
2003-12-19 Nick Clifton <nickc@redhat.com>
- Andreas Schwab <schwab@suse.de>
+ Andreas Schwab <schwab@suse.de>
* messages.c (as_perror): Save errno around library calls.
* input-file.c [BFD_ASSEMBLER]: Set the BFD error to
@@ -29,15 +29,15 @@
2003-12-19 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
- Add m32r-linux and PIC support. Add new ABI that uses RELA.
- * configure.in: Add m32r-linux targets.
+ Add m32r-linux and PIC support. Add new ABI that uses RELA.
+ * configure.in: Add m32r-linux targets.
* configure: Regenerate.
- * config/tc-m32r.c (md_parse_option): Add -KPIC option.
- (tc_gen_reloc): Added.
- (debug_sym, md_estimate_size_before_relax, md_convert_frag,
- md_pcrel_from_section, m32r_fix_adjustable): Changed for PIC.
- * config/tc-m32r.h (tc_gen_reloc, EXTERN_FORCE_RELOC): Undefined.
- (TC_HANDLES_FX_DONE, TC_FIX_ADJUSTABLE, TC_RELOC_RTSYM_LOC_FIXUP):
+ * config/tc-m32r.c (md_parse_option): Add -KPIC option.
+ (tc_gen_reloc): Added.
+ (debug_sym, md_estimate_size_before_relax, md_convert_frag,
+ md_pcrel_from_section, m32r_fix_adjustable): Changed for PIC.
+ * config/tc-m32r.h (tc_gen_reloc, EXTERN_FORCE_RELOC): Undefined.
+ (TC_HANDLES_FX_DONE, TC_FIX_ADJUSTABLE, TC_RELOC_RTSYM_LOC_FIXUP):
Defined.
* doc/c-m32r.texi: Document -KPIC option.
* NEWS: Mention the support m32r Linux and PIC.
@@ -68,17 +68,17 @@
2003-12-17 Nick Clifton <nickc@redhat.com>
* config/tc-m32r.c (error_explicit_parallel_conflicts): Rename
- to 'ignore_parallel_conflicts'.
- (md_longopts): Change option names as well.
- (md_parse_option): Separate the warn_explicit and ignore
- parallel conflicts options.
- (md_show_usage): Update descriptions of these options.
- (first_writes_to_seconds_operands): Do not run this check if
- ignoring parallel conflicts.
- (assemble_two_insns): Remove code that checked
- error_explicit_parallel_conflicts.
- * doc/c-m32r.texi: Update descriptions of the options.
-
+ to 'ignore_parallel_conflicts'.
+ (md_longopts): Change option names as well.
+ (md_parse_option): Separate the warn_explicit and ignore
+ parallel conflicts options.
+ (md_show_usage): Update descriptions of these options.
+ (first_writes_to_seconds_operands): Do not run this check if
+ ignoring parallel conflicts.
+ (assemble_two_insns): Remove code that checked
+ error_explicit_parallel_conflicts.
+ * doc/c-m32r.texi: Update descriptions of the options.
+
2003-12-16 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
* tc-arm.c (do_adr): Do not adjust pc by -8 if TE_WINCE is
diff --git a/contrib/binutils/gas/ChangeLog-9295 b/contrib/binutils/gas/ChangeLog-9295
index 713573301528..f51559689eb2 100644
--- a/contrib/binutils/gas/ChangeLog-9295
+++ b/contrib/binutils/gas/ChangeLog-9295
@@ -248,7 +248,7 @@ Wed Nov 15 03:52:00 1995 Ken Raeburn <raeburn@cygnus.com>
Mon Jul 31 14:53:19 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
* config/tc-i386.h (md_do_align): cast fill and 0x90 to char
- before comparing
+ before comparing
Mon May 1 10:91:49 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
@@ -506,9 +506,9 @@ Mon Oct 23 16:20:04 1995 Ken Raeburn <raeburn@cygnus.com>
Mon Oct 23 11:15:44 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
* config/tc-mips.c: Added mips_4100 control, and support for
- accepting the 4100 as a MIPS architecture variant (md_begin,
- macro_build, mips_ip, md_parse_option). Adding suitable
- command-line OPTIONs, and updating the help text (md_show_usage).
+ accepting the 4100 as a MIPS architecture variant (md_begin,
+ macro_build, mips_ip, md_parse_option). Adding suitable
+ command-line OPTIONs, and updating the help text (md_show_usage).
Wed Oct 18 13:20:32 1995 Ken Raeburn <raeburn@cygnus.com>
@@ -840,11 +840,11 @@ Wed Sep 27 10:29:13 1995 Kim Knuttila <krk@nellie>
(md_assemble): Initial [toc]x(rtoc) support
(ppc_frob_label): Removed some xcoff specific processing from TE_PE
(ppc_frob_symbol): Removed some xcoff specific processing from TE_PE
- Added support for more predefined sections
- (ppc_frob_section): Removed some xcoff specific processing from TE_PE
+ Added support for more predefined sections
+ (ppc_frob_section): Removed some xcoff specific processing from TE_PE
(ppc_fix_adjustable): Removed from TE_PE mainline
(md_apply_fix3): For TE_PE toc entries, we don't need to mess
- with fx_addnumber. Removed for the time being.
+ with fx_addnumber. Removed for the time being.
(lots): Put back missing assignments to ppc_current_csect.
Tue Sep 26 14:57:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
@@ -1066,7 +1066,7 @@ Thu Sep 7 12:33:58 1995 Ian Lance Taylor <ian@cygnus.com>
* expr.c (operand): Handle 08 and 09 in MRI mode.
* macro.c (ISSEP): Remove duplicated `"' character.
- (get_any_string): Copy some characters for which ISSEP is true:
+ (get_any_string): Copy some characters for which ISSEP is true:
';', '>', '(', ')'. Otherwise we can get in an infinite loop.
* read.c (s_space): In MRI mode, the expressions stop at the first
unquoted space.
@@ -1146,7 +1146,7 @@ Fri Sep 1 17:02:15 1995 steve chamberlain <sac@slash.cygnus.com>
Fri Sep 1 08:20:19 1995 James G. Smith <jsmith@beauty.cygnus.com>
- * config/tc-mips.c (md_parse_option, md_begin, md_show_usage):
+ * config/tc-mips.c (md_parse_option, md_begin, md_show_usage):
Add support for "-mcpu=vr4300" as processor identifier.
Thu Aug 31 16:41:06 1995 steve chamberlain <sac@slash.cygnus.com>
@@ -1157,8 +1157,8 @@ Thu Aug 31 16:41:06 1995 steve chamberlain <sac@slash.cygnus.com>
Tue Aug 29 19:42:58 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* config/tc-m68k.c (m68k_ip) [case POST/PRE/BASE]: Fix typo when
- looking at outer displacement. Don't set the postindex bit if the
- index suppress bit is set (for memory indirect addressing mode).
+ looking at outer displacement. Don't set the postindex bit if the
+ index suppress bit is set (for memory indirect addressing mode).
Thu Aug 31 06:49:37 1995 Doug Evans <dje@canuck.cygnus.com>
@@ -1539,7 +1539,7 @@ Fri Aug 11 19:16:08 1995 Ian Lance Taylor <ian@cygnus.com>
* doc/gasp.texi: Document -M/--mri.
* gasp.c: Include ansidecl.h. Make all local functions static.
- Add prototypes for all static functions.
+ Add prototypes for all static functions.
(mri): New global variable.
(sb_add_char): Change parameter c from char to int.
(sb_add_string): Make parameter s into a const pointer.
@@ -1843,7 +1843,7 @@ Mon Aug 7 02:54:20 1995 Jeff Law (law@snake.cs.utah.edu)
Fri Aug 4 12:29:21 1995 Ian Lance Taylor <ian@cygnus.com>
* expr.c (op_encoding): Make non-const. Don't set '"' to
- O_bit_not.
+ O_bit_not.
(expr_begin): Set op_encoding['"'] in MRI mode.
Wed Aug 2 18:39:43 1995 Ian Lance Taylor <ian@cygnus.com>
@@ -2471,7 +2471,7 @@ Wed Jun 21 18:07:59 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
(md_estimate_size_before_relax) [case TAB (FBRANCH, SZ_UNDEF)]:
Turn on long bit.
(m68k_ip) [case 'C']: Don't set set long bit, set it in the opcode
- table.
+ table.
(md_estimate_size_before_relax) [case TAB (PCINDEX, SZ_UNDEF)]:
Variable part increases by four, not six.
* write.c (fixup_segment) [TC_M68K]: Don't do further pcrel
@@ -4143,7 +4143,7 @@ Tue Dec 13 08:04:15 1994 Ian Lance Taylor <ian@cygnus.com>
* config/tc-mips.c (macro_build): Accept BFD_RELOC_PCREL* without
requiring that the X_op_symbol be in the text_section.
- (macro): Change the test for a legel expression difference to
+ (macro): Change the test for a legal expression difference to
correspond to changes in pseudo_set in read.c.
Fri Dec 9 21:04:17 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
@@ -13115,3 +13115,10 @@ Mon Feb 17 07:51:06 1992 K. Richard Pixley (rich at cygnus.com)
* nearly everything. flush ChangeLog, package as gas-1.92.1.
ChangeLog's prior to this are sketchy at best. I have logs.
They just aren't ChangeLogs.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/gas/ChangeLog-9697 b/contrib/binutils/gas/ChangeLog-9697
index 7ffff3e6652b..f39e99554e87 100644
--- a/contrib/binutils/gas/ChangeLog-9697
+++ b/contrib/binutils/gas/ChangeLog-9697
@@ -4,7 +4,7 @@ Wed Dec 31 12:29:47 1997 Jeffrey A Law (law@cygnus.com)
Mon Dec 22 13:06:05 1997 Joel Sherrill <joel@oarcorp.com>
- * configure.in (i386*-go32-rtems*): Fix to be the same as
+ * configure.in (i386*-go32-rtems*): Fix to be the same as
i[3456]86-go32.
* configure: Rebuild.
@@ -96,7 +96,7 @@ Mon Dec 15 15:20:32 1997 Nick Clifton <nickc@cygnus.com>
* doc/as.texinfo: Add documentation of m32r processor.
- * doc/c-m32r.texi: New file, documenting m32r specific features.
+ * doc/c-m32r.texi: New file, documenting m32r specific features.
Mon Dec 15 10:32:28 1997 Jeffrey A Law (law@cygnus.com)
@@ -151,7 +151,7 @@ Sat Nov 22 16:19:22 1997 Richard Henderson <rth@cygnus.com>
Sat Nov 22 14:26:09 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-arm.c: Brought up to date with latest changes on arm
- branch.
+ branch.
Sat Nov 22 15:50:09 1997 Klaus Kaempf <kkaempf@progis.de>
@@ -171,7 +171,7 @@ Thu Nov 20 15:06:08 1997 Richard Earnshaw <rearnsha@arm.com>
Wed Nov 19 17:44:42 1997 Richard Henderson <rth@cygnus.com>
- * config/tc-sh.c (parse_reg): Properly quote for fv4.
+ * config/tc-sh.c (parse_reg): Properly quote for fv4.
Wed Nov 19 23:46:18 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -180,7 +180,7 @@ Wed Nov 19 23:46:18 1997 Ian Lance Taylor <ian@cygnus.com>
Tue Nov 18 18:45:14 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
- * config/tc-d10v.c (parallel_ok, find_opcode):
+ * config/tc-d10v.c (parallel_ok, find_opcode):
Split OPERAND_FLAG into OPERAND_FFLAG and OPERAND_CFLAG.
Sun Nov 16 10:05:07 1997 Fred Fish <fnf@cygnus.com>
@@ -191,9 +191,9 @@ Sun Nov 16 10:05:07 1997 Fred Fish <fnf@cygnus.com>
Thu Nov 13 13:53:10 1997 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (emulations): Make FreeBSD an aout / i386bsd
- variant.
+ variant.
* configure: Re-generate.
-
+
Thu Nov 13 11:07:14 1997 Gavin Koch <gavin@cygnus.com>
* config/tc-mips.c (macro_build): Use the membership field
@@ -255,35 +255,35 @@ Tue Nov 4 16:35:57 1997 Ian Dall <Ian.Dall@dsto.defence.gov.au>
* write.c (print_fixup): Use TC_FIX_DATA_PRINT (if defined) to
print out MD fields of fix.
* frags.c (frag_var, frag_variant): Use TC_FRAG_INIT macro (if
- defined) to initialize MD fields in frag.
+ defined) to initialize MD fields in frag.
* as.h (struct frag, ns32k support): Rename ns32k to fr_ns32k.
Delete pcrel_adjust. Add fr_opcode_fragP, fr_opcode_offset.
* config/tc-ns32k.h: Add comments. Remove obsolete
- BFD_FAST_SECTION_FILL definition, change prototypes for
- fix_new_ns32k and fix_new_ns32k_exp to add new arguments
- opcode_frag and opcode_offset and remove pcrel_adjust.
+ BFD_FAST_SECTION_FILL definition, change prototypes for
+ fix_new_ns32k and fix_new_ns32k_exp to add new arguments
+ opcode_frag and opcode_offset and remove pcrel_adjust.
(TC_FIX_TYPE): add opcode_fragP and opcode_offset fields.
(TC_FIX_DATA_PRINT): new macro to print out TC_FIX_TYPE.
(TC_FRAG_INIT): new macro to initialize machine dependent field in
- frags.
+ frags.
(frag_opcode_frag, frag_opcode_offset, frag_bsr): macros to access
- MD fields in frag structure.
+ MD fields in frag structure.
(fix_im_disp, fix_bit_fixP, fix_opcode_frag, fix_opcode_offset,
- fix_bsr): macros to access MD fields in fix structure.
+ fix_bsr): macros to access MD fields in fix structure.
* config/tc-ns32k.c: Avoid overlength lines. Align comments. Don't
- use struct opcode_location as these fields are now in the frag
+ use struct opcode_location as these fields are now in the frag
structure.
(convert_iif): Call frag_more as it is needed instead
- of trying to allocate for the whole insn. Avoid call of frag_more
- with negative argument.
+ of trying to allocate for the whole insn. Avoid call of frag_more
+ with negative argument.
(md_pcrel_adjust, md_fix_pcrel_adjust, md_apply_fix,
md_estimate_size_before_relax, md_pcrel_from,
tc_aout_fix_to_chars): use accessor macros to get md fields in fix
- and frag structures.
+ and frag structures.
(fix_new_ns32k, fix_new_ns32k_exp): add new arguments opcode_frag and
opcode_offset and remove pcrel_adjust.
(convert_iif, cons_fix_new_ns32k): call fix_new_ns32k,
- fix_new_ns32k_exp with changed arguments.
+ fix_new_ns32k_exp with changed arguments.
Mon Nov 3 13:30:17 1997 Gavin Koch <gavin@cygnus.com>
@@ -429,8 +429,8 @@ Tue Oct 14 19:12:45 1997 Richard Henderson <rth@cygnus.com>
Fri Oct 10 16:09:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tc-d10v.c (parallel_ok): Allow parallel instruction issue
- when second instruction is writing to first instructions inputs.
-
+ when second instruction is writing to first instructions inputs.
+
Mon Oct 13 15:27:17 1997 Richard Henderson <rth@cygnus.com>
* ecoff.c (PAGE_SIZE): Double to 8k as a hack to allow some C++
@@ -439,7 +439,7 @@ Mon Oct 13 15:27:17 1997 Richard Henderson <rth@cygnus.com>
Fri Oct 10 17:48:29 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-v850.c (md_relax_table): Add support for relaxing
- unconditional branches. This patch is courtesy of Jim Wilson.
+ unconditional branches. This patch is courtesy of Jim Wilson.
(md_convert_frag): Fix relaxing of branches. This patch is
courtesy of Jim Wilson.
(md_assemble): Create different fixups for conditional and
@@ -449,7 +449,7 @@ Fri Oct 10 17:48:29 1997 Nick Clifton <nickc@cygnus.com>
branch. This patch is courtesy of Jim Wilson.
(v850_sdata, v850_tdata, v850_zdata, v850_sbss, v850_tbss,
v850_zbss, v850_rosdata, v850_rozdata, v850_bss): Add call to
- obj_elf_section_change_hook().
+ obj_elf_section_change_hook().
(v850_comm): New function.
(md_pseudo_table): Add new pseudo ops .zcomm, .scomm and .tcomm.
(md_begin): Add bss flag to seg_info of bss sections.
@@ -472,7 +472,7 @@ Fri Oct 10 11:22:45 1997 Martin M. Hunt <hunt@cygnus.com>
Fri Oct 10 11:54:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tc-d10v.c (parallel_ok): Flag SP as modified for @-sp
- operand - OPERAND_ATMINUS.
+ operand - OPERAND_ATMINUS.
Fri Oct 10 00:47:44 1997 Michael Meissner <meissner@cygnus.com>
@@ -532,7 +532,7 @@ Wed Oct 8 00:04:05 1997 Gavin Koch <gavin@cygnus.com>
* config/tc-mips.c (md_begin): Replace the TARGET_CPU value
of mipsr3900 with mipstx39.
- * config/tc-mips.c (mips_ip): Don't print the 'opcode requires
+ * config/tc-mips.c (mips_ip): Don't print the 'opcode requires
-mipsXX message' if the insn isn't an ISA insn.
Tue Oct 7 12:48:30 1997 Doug Evans <dje@canuck.cygnus.com>
@@ -580,7 +580,7 @@ Thu Sep 25 13:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
Wed Sep 24 16:54:40 1997 Joel Sherrill <joel@oarcorp.com>
- * configure.in (sh*-*-rtems*): New target, like sh-*-elf*.
+ * configure.in (sh*-*-rtems*): New target, like sh-*-elf*.
* configure: Rebuild.
Wed Sep 24 11:30:25 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -624,7 +624,7 @@ Thu Sep 18 14:11:56 1997 Nick Clifton <nickc@cygnus.com>
(md_assemble): Produce error message when special data area
relocations are used on instructions which do not support them.
(md_assemble): Reset processor mask if defined by command line
- switch.
+ switch.
Thu Sep 18 11:24:01 1997 Doug Evans <dje@canuck.cygnus.com>
@@ -653,13 +653,13 @@ Thu Sep 18 11:24:01 1997 Doug Evans <dje@canuck.cygnus.com>
Wed Sep 17 16:54:20 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-v850.c (v850_reloc_prefix): Recoded to use CHECK_ ()
- macro.
+ macro.
(handle_tdaoff, handle_zdaoff, handle_sdaoff): New functions.
* config/tc-v850.c (md_assemble): Corrected typo.
* config/tc-v850.c Add new sections: call_table_data and
call_table_text.
- (v850_reloc_prefix): Add support for ctoff() relocation prefix.
+ (v850_reloc_prefix): Add support for ctoff() relocation prefix.
(handle_ctoff): New Function.
* doc/c-v850.texi (V850 Opcodes): Document call table relocations.
@@ -679,7 +679,7 @@ Mon Sep 15 18:33:06 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-v850.c (processor_mask): New variable.
(set_machine, md_parse_option): Set processor_mask.
(md_assemble): Check that instruction is available to target
- processor.
+ processor.
* config/tc-v850.h (TARGET_PROCESSOR): New constant.
@@ -768,7 +768,7 @@ Tue Sep 9 10:19:37 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-v850.c (.v850): New pseudo op.
* config/tc-v850.c (.v850e): New pseudo op.
* config/tc-v850.c (.v850ea): New pseudo op.
-
+
Mon Sep 8 23:08:04 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -791,7 +791,7 @@ Mon Sep 8 12:33:40 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-v850.h (TARGET_MACHINE): New constant.
* config/tc-v850.c (v850_insert_operand): Add
- -mwarn_unsigned_overflow.
+ -mwarn_unsigned_overflow.
(md_begin): Set BFD machine number based on machine variable.
(md_parse_option): Add -mv850, -mv850e and -mv850ea options.
@@ -802,15 +802,15 @@ Mon Sep 8 11:20:46 1997 Ian Lance Taylor <ian@cygnus.com>
Sun Sep 7 00:30:19 1997 Richard Henderson <rth@cygnus.com>
- * config/tc-alpha.c (md_parse_option): Move m[] out to top level and
- rename to cpu_types[].
- (s_alpha_arch): New function.
- (md_pseudo_table): Add "arch".
+ * config/tc-alpha.c (md_parse_option): Move m[] out to top level and
+ rename to cpu_types[].
+ (s_alpha_arch): New function.
+ (md_pseudo_table): Add "arch".
- * config/tc-alpha.c (md_begin): Merge the two loops through the
- opcode table.
- (s_alpha_proc): Add initial SKIP_WHITESPACE.
- (s_alpha_set): Likewise. Use get_symbol_end instead local while loop.
+ * config/tc-alpha.c (md_begin): Merge the two loops through the
+ opcode table.
+ (s_alpha_proc): Add initial SKIP_WHITESPACE.
+ (s_alpha_set): Likewise. Use get_symbol_end instead local while loop.
Sat Sep 6 19:38:12 1997 Fred Fish <fnf@cygnus.com>
@@ -827,14 +827,14 @@ Wed Sep 3 11:21:33 1997 Nick Clifton <nickc@cygnus.com>
Tue Sep 2 18:32:30 1997 Jeffrey A Law (law@cygnus.com)
- * config/tc-mn10200.c (md_convert_frag): PC relative instructions arex
+ * config/tc-mn10200.c (md_convert_frag): PC relative instructions arex
relative to the next instruction, not the current instruction.
(md_assemble): Similarly.
Tue Sep 2 15:58:52 1997 Nick Clifton <nickc@cygnus.com>
* doc/c-v850.texi: Explanations of offsets in SDA/ZDA areas
- correcetd.
+ correcetd.
* config/tc-v850.c: Add support for SDA/TDA/ZDA sections.
(v850_reloc_prefix): Duplicate code eliminated. Add code to
@@ -842,12 +842,12 @@ Tue Sep 2 15:58:52 1997 Nick Clifton <nickc@cygnus.com>
(md_assemble): Calculation of the size of a fixups corrected.
* config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Add SDA/TDA/ZDA
- sections.
+ sections.
Tue Sep 2 15:40:56 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tc-v850.c (md_assemble): Use opcode->name instead of
- opcode->opcode as the sentinal. Zero is a valid opcode.
+ opcode->opcode as the sentinal. Zero is a valid opcode.
Tue Aug 26 16:51:14 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -857,7 +857,7 @@ Tue Aug 26 16:51:14 1997 Ian Lance Taylor <ian@cygnus.com>
Tue Aug 26 09:46:22 1997 Nick Clifton <nickc@cygnus.com>
* doc/c-v850.texi (V850 Opcodes): Correct name for tiny data area
- pointer.
+ pointer.
Tue Aug 26 12:23:25 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -898,15 +898,15 @@ Mon Aug 25 14:25:48 1997 Ian Lance Taylor <ian@cygnus.com>
Mon Aug 25 11:21:48 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-v850.c (md_assemble): Restore input_line_pointer upon
- exit.
-
+ exit.
+
* config/tc-v850.c (parse_register_list): Support constant
expressions as register lists.
Mon Aug 25 10:19:34 1997 Nick Clifton <nickc@cygnus.com>
* doc/c-v850.texi: Change the major node to v850 Machine
- Dependencies.
+ Dependencies.
Fri Aug 22 11:16:14 1997 Nick Clifton <nickc@cygnus.com>
@@ -993,8 +993,8 @@ Mon Aug 18 11:26:36 1997 Nick Clifton <nickc@cygnus.com>
Mon Aug 18 11:24:21 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-v850.c: Remove support_v850e flag and command line
- option.
-
+ option.
+
* configure.in (emulations): Add support for v850e target
* configure (emulations): Add support for v850e target
@@ -1002,8 +1002,8 @@ Mon Aug 18 11:24:21 1997 Nick Clifton <nickc@cygnus.com>
Mon Aug 18 11:24:21 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-v850.c: Remove support_v850ea flag and command line
- option.
-
+ option.
+
* configure.in (emulations): Add support for v850ea target
* configure (emulations): Add support for v850ea target
@@ -1045,9 +1045,9 @@ Wed Aug 13 18:58:56 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-v850.c (md_assemble, md_show_usage, md_parse_option):
Add support for v850e instructions.
-
+
* config/tc-v850.c (md_assemble): Fix error recovery to reload
- text of entire opcode.
+ text of entire opcode.
Tue Aug 12 10:27:34 1997 Richard Henderson <rth@cygnus.com>
@@ -1066,7 +1066,7 @@ Mon Aug 11 21:48:00 1997 Richard Henderson <rth@cygnus.com>
functions.
* read.h: Update prototypes.
* symbols.c (resolve_symbol_value): Streamline quite a bit. Return
- the symbol value, add a second FINALIZE argument that prevents
+ the symbol value, add a second FINALIZE argument that prevents
changes from being comitted. Update all callers.
* write.c (cvt_frag_to_fill, relax_segment): Handle rs_leb128.
* doc/as.texinfo: Document the new pseudos.
@@ -1137,9 +1137,9 @@ Mon Aug 4 11:28:35 1997 Ian Lance Taylor <ian@cygnus.com>
has an associated external symbol.
Sun Aug 3 23:23:59 1997 Richard Henderson <rth@cygnus.com>
-
- * config/tc-alpha.c (s_alpha_ucons): New function.
- (md_pseudo_table): Add unaligned data pseudos for DWARF.
+
+ * config/tc-alpha.c (s_alpha_ucons): New function.
+ (md_pseudo_table): Add unaligned data pseudos for DWARF.
Thu Jul 31 15:13:43 1997 Jeffrey A Law (law@cygnus.com)
@@ -1158,10 +1158,10 @@ Tue Jul 29 14:20:43 1997 Jeffrey A Law (law@cygnus.com)
Mon Jul 28 18:41:41 1997 Rob Savoye <rob@chinadoll.cygnus.com>
- * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
- win32 dependencies.
- * configure: Regenerated with autoconf 2.12.
- * Makefile.in: Add $(EXEEXT) to all executables.
+ * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
+ win32 dependencies.
+ * configure: Regenerated with autoconf 2.12.
+ * Makefile.in: Add $(EXEEXT) to all executables.
Fri Jul 25 10:54:43 1997 Jeffrey A Law (law@cygnus.com)
@@ -1182,9 +1182,9 @@ Thu Jul 24 17:51:29 1997 Ian Lance Taylor <ian@cygnus.com>
Thu Jul 24 12:13:19 1997 Fred Fish <fnf@cygnus.com>
* config/tc-tic80.c (build_insn): Remove "extended" and replace with
- "fx" and "fxfrag". Add "ffrag". Change code to initialize and use
+ "fx" and "fxfrag". Add "ffrag". Change code to initialize and use
the right f/ffrag and fx/fxfrag pairs since instruction may be split
- across frags.
+ across frags.
Tue Jul 22 18:38:56 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
@@ -1244,7 +1244,7 @@ Mon Jul 7 22:53:08 1997 Ian Lance Taylor <ian@cygnus.com>
BFD_ASSEMBLER, handle one ELF case for COFF as well, and add a PE
case.
* write.c (fixup_segment): Change special case for i386-coff to
- not apply for i386-pe.
+ not apply for i386-pe.
* config/obj-coff.c (coff_adjust_section_syms): Only count fixups
which were not done.
(coff_frob_file_after_relocs): Rename from coff_frob_file.
@@ -1401,14 +1401,14 @@ Wed May 28 15:45:07 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-arm.c (md_begin): Change call to
coff_arm_bfd_set_private_flags() to a call to
- bfd_set_private_flags().
+ bfd_set_private_flags().
Wed May 28 16:17:34 1997 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in: Rebuild dependencies.
* config/tc-i386.c (tc_gen_reloc): Don't try to convert the type
- of a BFD_RELOC_RVA reloc.
+ of a BFD_RELOC_RVA reloc.
Wed May 28 10:48:14 1997 Jeffrey A Law (law@cygnus.com)
@@ -1456,11 +1456,11 @@ Wed May 14 09:54:53 1997 Nick Clifton <nickc@cygnus.com>
* config/tc-arm.c (global variables): Added 'uses_apcs_26' flag to
hold APCS selection.
- (md_begin): Added code to generate flags to be set into the COFF
+ (md_begin): Added code to generate flags to be set into the COFF
header and the calls to the BFD functions to do this.
- (md_parse_option, md_show_usage): Added new command line
+ (md_parse_option, md_show_usage): Added new command line
options -mapcs-32, -mapcs-26, -marmv2, -marmv2a, -marmv3,
- -marmv3m, -marmv4, -marmv4t.
+ -marmv3m, -marmv4, -marmv4t.
* config/tc-arm.h (LOCAL_LABEL): Removed the definition of this macro
as it is never used.
@@ -1493,7 +1493,7 @@ Thu May 8 11:10:15 1997 Ian Lance Taylor <ian@cygnus.com>
Wed May 7 15:39:48 1997 Ian Lance Taylor <ian@cygnus.com>
* config/obj-coff.c (write_object_file): Just pass NULL to
- md_do_align, not the address of a char holding NOP_OPCODE.
+ md_do_align, not the address of a char holding NOP_OPCODE.
* config/tc-mips.c (macro): Handle constants for M_LI_D and
M_LI_DD.
@@ -1540,7 +1540,7 @@ Tue Apr 29 20:23:10 1997 Jim Wilson <wilson@cygnus.com>
Tue Apr 29 19:54:36 1997 Richard Henderson <rth@tamu.edu>
* config/obj-elf.c (elf_pseudo_table): Add "subsection".
- (obj_elf_subsection): New static function.
+ (obj_elf_subsection): New static function.
Tue Apr 29 19:52:47 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -1606,7 +1606,7 @@ Tue Apr 15 18:11:44 1997 Gavin Koch <gavin@cygnus.com>
Tue Apr 15 13:04:47 1997 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (srcroot): Remove.
- (INSTALL): Set to @INSTALL@.
+ (INSTALL): Set to @INSTALL@.
(INSTALL_XFORM, INSTALL_XFORM1): Remove.
(all, dvi): Don't set srcroot.
(install): Depend upon as.new, gasp.new, and installdirs. Use
@@ -1660,7 +1660,7 @@ Mon Apr 7 14:58:22 1997 Jeffrey A Law (law@cygnus.com)
Mon Apr 7 10:54:59 1997 Doug Evans <dje@canuck.cygnus.com>
* Makefile.in: Regenerate dependencies.
- (TARG_CPU): New variable.
+ (TARG_CPU): New variable.
(cgen.o): Depend on cgen.h, $(TARG_CPU)-opc.h.
(.dep1): Delete creating of cgen-opc.h.
(.tcdep): Put proper contents in cgen-opc.h.
@@ -1761,7 +1761,7 @@ Mon Mar 31 23:53:44 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
Mon Mar 31 16:31:04 1997 Joel Sherrill <joel@oarcorp.com>
- * configure.in (hppa*-*-rtems*): New target, like hppa-*-*elf*.
+ * configure.in (hppa*-*-rtems*): New target, like hppa-*-*elf*.
* configure: Rebuild.
Mon Mar 31 14:15:19 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -1879,7 +1879,7 @@ Mon Mar 24 12:11:18 1997 Ian Lance Taylor <ian@cygnus.com>
(alpha_frob_file_before_adjust): Declare if OBJ_ECOFF.
* config/tc-alpha.c (alpha_debug): New static variable.
(md_parse_option): Set alpha_debug if -g is seen.
- (alpha_frob_file_before_adjust): New function if OBJ_ECOFF.
+ (alpha_frob_file_before_adjust): New function if OBJ_ECOFF.
Sun Mar 23 18:03:31 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
@@ -2030,7 +2030,7 @@ Sat Mar 15 20:27:12 1997 Fred Fish <fnf@cygnus.com>
* NEWS: Note BeOS support.
* configure.in: (ppc-*-beos): New target, use coff as object format.
* configure: Regenerate with autoconf.
-
+
Sat Mar 15 19:14:02 1997 Ian Lance Taylor <ian@cygnus.com>
* config/tc-mips.c (md_apply_fix): Improve error message for out
@@ -2290,23 +2290,23 @@ Mon Feb 24 18:27:43 1997 Eric Youngdale <eric@andante.jic.com>
Mon Feb 24 15:19:57 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
- * config/tc-d10v.c: Change pre_defined_registers to
+ * config/tc-d10v.c: Change pre_defined_registers to
d10v_predefined_registers and reg_name_cnt to d10v_reg_name_cnt.
Mon Feb 24 10:40:45 1997 Fred Fish <fnf@cygnus.com>
* config/obj-coff.c: Fix typo in comment section.
* config/tc-tic80.c (md_pseudo_table): Add entry for bss, which takes
- an additional alignment argument.
+ an additional alignment argument.
(find_opcode): Allow O_symbol relocs for any 32 bit field, not just
- base relative ones.
+ base relative ones.
(build_insn): Handle O_symbol relocs for any 32 bit field, not just
- base relative ones.
+ base relative ones.
Mon Feb 24 02:23:00 1997 Dawn Perchik <dawn@cygnus.com>
* Makefile.in: Remove dependancies on itbl-cpu.h.
- * as.c: Define stubs for itbl_parse and itbl_init if HAVE_ITBL_CPU
+ * as.c: Define stubs for itbl_parse and itbl_init if HAVE_ITBL_CPU
is not defined.
Mon Feb 24 02:03:00 1997 Dawn Perchik <dawn@cygnus.com>
@@ -2354,10 +2354,10 @@ Sat Feb 22 21:25:00 1997 Dawn Perchik <dawn@cygnus.com>
* as.c: Add itbl support.
Add new option "--insttbl" for dynamically extending instruction set.
* as.h: Declare insttbl_file_name;
- the name of file defining extensions to the basic instruction set
- * configure.in, configure: Add itbl-parse.o, itbl-lex.o, and
+ the name of file defining extensions to the basic instruction set
+ * configure.in, configure: Add itbl-parse.o, itbl-lex.o, and
itbl-ops.o to extra_objects for mips configuration.
- Add include file link from itbl-cpu.h to
+ Add include file link from itbl-cpu.h to
config/itbl-${target_cpu_type}.h.
* config/tc-mips.c: Allow copz instructions.
Add notes for future additions to the itbl support.
@@ -2372,18 +2372,18 @@ Sat Feb 22 20:53:01 1997 Fred Fish <fnf@cygnus.com>
* config/tc-tic80.c (find_opcode): Add code to support O_symbol
operands.
(build_insn): Grab a frag early so we can use the address in
- fixups. Take one's complement of BITNUM values before insertion
- in opcode. Add code to support O_symbol operands.
+ fixups. Take one's complement of BITNUM values before insertion
+ in opcode. Add code to support O_symbol operands.
(md_apply_fix): Replace unimplemented warning with implementation.
(md_pcrel_from): Ditto.
(tc_coff_fix2rtype): Ditto.
Fri Feb 21 14:34:31 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
- * config/tc-d30v.c (parallel_ok): New function.
+ * config/tc-d30v.c (parallel_ok): New function.
* config/tc-d30v.h: Define TARGET_BYTES_BIG_ENDIAN.
* config/tc-d10v.c (md_pcrel_from_section): Return 0 if
- relocation is in different section.
+ relocation is in different section.
Fri Feb 21 10:08:25 1997 Jim Wilson <wilson@cygnus.com>
@@ -2397,7 +2397,7 @@ Fri Feb 21 11:55:03 1997 Ian Lance Taylor <ian@cygnus.com>
* app.c (LEX_IS_TWOCHAR_COMMENT_2ND): Don't define.
(do_scrub_begin): Don't set lex['*'].
(do_scrub_chars): When handling LEX_IS_TWOCHAR_COMMENT_1ST, don't
- check for LEX_IS_TWOCHAR_COMMENT_2ND. Instead, just check for
+ check for LEX_IS_TWOCHAR_COMMENT_2ND. Instead, just check for
a literal '*'.
* configure.in: Set em=svr4 for m68k-*-sysv4*.
@@ -2439,24 +2439,24 @@ Tue Feb 18 18:42:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d30v.c, config/tc-d30v.h: New files.
- * configure: Rebuilt.
-
+ * configure: Rebuilt.
+
* configure.in: Add case for d30v.
Sun Feb 16 17:47:29 1997 Fred Fish <fnf@cygnus.com>
* config/tc-alpha.h (md_operand): Define with a null expansion,
like all the other targets.
- * doc/internals.texi (CPU backend): Add missing word in
+ * doc/internals.texi (CPU backend): Add missing word in
md_flush_pending_output description. Fix typo in md_convert_frag
description.
* config/tc-tic80: Minor comment additions/changes.
-
+
Fri Feb 14 18:09:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* config/tc-m68k.c (LOCAL_LABEL): Macro redefined if TE_DELTA.
(tc_canonicalize_symbol_name): Macro defined if TE_DELTA.
- * config/obj-coff.c (obj_coff_def): Use
+ * config/obj-coff.c (obj_coff_def): Use
tc_canonicalize_symbol_name if defined.
(obj_coff_tag, obj_coff_val): Likewise.
* expr.c (operand): Reject '~' as operator if is_name_beginner.
@@ -2503,7 +2503,7 @@ Thu Feb 13 20:02:16 1997 Fred Fish <fnf@cygnus.com>
tc-mn10200.h, tc-mn10300.h, tc-sh.h, tc-vax.h, tc-w65.h}:
Add default definition of zero for TARGET_BYTES_BIG_ENDIAN.
* config/{tc-arm.h, tc-hppa.h, tc-i386.h, tc-mips.h, tc-ns32k.h,
- tc-ppc.h, tc-sparc.h}: Move definition of TARGET_BYTES_BIG_ENDIAN
+ tc-ppc.h, tc-sparc.h}: Move definition of TARGET_BYTES_BIG_ENDIAN
to a location consistent with the rest of the target include files.
* config/tc-i386.c: Remove misleading comment.
* doc/internals.texi (CPU backend): Add description of function
@@ -2513,7 +2513,7 @@ Thu Feb 13 20:02:16 1997 Fred Fish <fnf@cygnus.com>
Remove custom code that use to parse them.
* config/tc-tic80.h: Move definition of TARGET_BYTES_BIG_ENDIAN
to a location consistent with the rest of the target include files.
-
+
Thu Feb 13 21:44:18 1997 Klaus Kaempf <kkaempf@progis.de>
* as.h: GNU c provides unlink() function.
@@ -2541,7 +2541,7 @@ Thu Feb 13 16:29:04 1997 Fred Fish <fnf@cygnus.com>
(DVIPS): Set to dvips.
(ps, as.ps, gasp.ps): New targets.
(internals.info, gasp.dvi, internals.dvi): Set both TEXINPUTS
- and MAKEINFO env variables.
+ and MAKEINFO env variables.
(internals.ps): Use DVIPS macro.
(clean): Remove core and backup files.
(distclean): Remove temporary files from building internals.
@@ -2623,7 +2623,7 @@ Wed Feb 12 14:36:29 1997 Ian Lance Taylor <ian@cygnus.com>
symbol.
* config/tc-mips.c (append_insn): Warn about an attempt to put an
- extended instruction in a delay slot when not reordering.
+ extended instruction in a delay slot when not reordering.
(md_convert_frag): Warn if an extended instruction appears in a
delay slot.
@@ -2659,11 +2659,11 @@ Mon Feb 10 22:06:00 1997 Dawn Perchik (dawn@cygnus.com)
Mon Feb 10 18:09:00 1997 Dawn Perchik (dawn@cygnus.com)
- * itbl-ops.c: New file. Add support for dynamically read
- instruction registers, opcodes and formats. Build internal table
- for new instructions and provide callbacks for assembler and
+ * itbl-ops.c: New file. Add support for dynamically read
+ instruction registers, opcodes and formats. Build internal table
+ for new instructions and provide callbacks for assembler and
disassembler.
- * itbl-lex.l, itbl-parse.y: Lex and yacc parsers for instruction
+ * itbl-lex.l, itbl-parse.y: Lex and yacc parsers for instruction
spec table.
* itbl-ops.h: New file. Header file for itbl support.
* config/itbl-mips.h: New file. Mips specific definitions for
@@ -2736,7 +2736,7 @@ Fri Jan 31 10:46:14 1997 Ian Lance Taylor <ian@cygnus.com>
enforce-aligned-data.
* config/tc-ppc.c (md_pseudo_table): If OBJ_XCOFF, add "long",
- "word", and "short".
+ "word", and "short".
(ppc_xcoff_cons): New static function.
* write.c (relax_segment): Give an error if a .space symbol is
@@ -2816,14 +2816,14 @@ Wed Jan 22 10:39:39 1997 Doug Evans <dje@canuck.cygnus.com>
Mon Jan 20 10:56:47 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* config/tc-m68k.c (m68k_ip): Reject pc-relative addresses for the
- 'p' operand specifier.
+ 'p' operand specifier.
Mon Jan 20 10:39:36 1997 J.T. Conklin <jtc@cygnus.com>
* config/tc-m68k.c (HAVE_LONG_BRANCH): New macro, returns true for
- m68k family cpus which support long branch addressing modes.
+ m68k family cpus which support long branch addressing modes.
(m68k_ip, md_convert_frag_1, md_estimate_size_before_relax,
- md_create_long_jump): Use it.
+ md_create_long_jump): Use it.
Mon Jan 20 12:42:06 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -2981,8 +2981,8 @@ Thu Jan 2 13:37:29 1997 Ian Lance Taylor <ian@cygnus.com>
work if valueT is only 32 bits.
* config/tc-mips.c: Throughout, check target_big_endian rather
- than byte_order.
- (byte_order): Remove.
+ than byte_order.
+ (byte_order): Remove.
(mips_init_after_args): Remove.
* config/tc-mips.h (LITTLE_ENDIAN, BIG_ENDIAN): Don't define.
(mips_init_after_args): Don't declare.
@@ -3008,9 +3008,9 @@ Tue Dec 31 12:56:41 1996 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
* config/tc-sparc.c (md_apply_fix3): Rename from md_apply_fix, and
- add segment argument. If OBJ_ELF, treat a relocation against a
- symbol in a linkonce section like a relocation against an external
- symbol.
+ add segment argument. If OBJ_ELF, treat a relocation against a
+ symbol in a linkonce section like a relocation against an external
+ symbol.
* config/tc-sparc.h (MD_APPLY_FIX3): Define.
Mon Dec 30 11:35:40 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -3023,14 +3023,14 @@ Fri Dec 27 22:51:51 1996 Fred Fish <fnf@cygnus.com>
includes config.h instead of host.h, tc.h instead of tp.h, and
targ-env.h instead of target-environment.h.
Also, obj-format.h includes targ-cpu.h instead of
- target-processor.h.
+ target-processor.h.
* configure.in (case ${generic_target}): Add tic80-*-coff entry.
* configure: Rebuild with autoconf.
* config/obj-coff.h (coff/tic80.h): Include if TC_TIC80 defined.
(TARGET_FORMAT): Define to "coff-tic80".
* config/tc-tic80.c: New file for TIc80 support.
* config/tc-tic80.h: New file for TIc80 support.
-
+
Fri Dec 27 11:42:29 1996 Ian Lance Taylor <ian@cygnus.com>
* doc/as.texinfo (M): Mention explicitly that -M changes macro
@@ -3065,7 +3065,7 @@ Wed Dec 18 10:08:46 1996 Jeffrey A Law (law@cygnus.com)
Tue Dec 17 10:59:32 1996 Ian Lance Taylor <ian@cygnus.com>
* config/tc-mips.c: Undo part of last Friday's alignment changes.
- (md_begin): Always align the text section to a four byte
+ (md_begin): Always align the text section to a four byte
boundary.
(append_insn): Remove call to record_align.
@@ -3233,7 +3233,7 @@ Fri Dec 6 00:55:48 1996 Martin <hunt@cygnus.com>
(d10v_cleanup): No longer uses its argument, so make it void.
* config/tc-d10v.h (d10v_cleanup): Change prototype.
-
+
Thu Dec 5 11:03:31 1996 Ian Lance Taylor <ian@cygnus.com>
* write.c (fixup_segment): Don't discard the symbol for a PC
@@ -3325,7 +3325,7 @@ Tue Nov 26 10:33:16 1996 Ian Lance Taylor <ian@cygnus.com>
Mon Nov 25 18:02:29 1996 J.T. Conklin <jtc@beauty.cygnus.com>
* config/tc-m68k.c (m68k_ip): Implement cases for new <, >, m, n,
- o and p operand specifiers.
+ o and p operand specifiers.
Mon Nov 25 10:45:14 1996 Doug Evans <dje@seba.cygnus.com>
@@ -3359,7 +3359,7 @@ Fri Nov 22 15:42:26 1996 Ian Lance Taylor <ian@cygnus.com>
Thu Nov 21 11:56:11 1996 Jeffrey A Law (law@cygnus.com)
* config/tc-mn10300.h (DIFF_EXPR_OK): Don't define this.
- (tc_fix_adjustable): Don't adjust relocs against weak symbols or
+ (tc_fix_adjustable): Don't adjust relocs against weak symbols or
pc-relative relocs.
* config/tc-mn10300.c (md_begin): Set linkrelax.
(md_assemble): Create fixups as needed.
@@ -3399,7 +3399,7 @@ Fri Nov 8 13:55:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* doc/c-d10v.texi: Add info on @word modifier.
Wed Nov 6 13:46:07 1996 Jeffrey A Law (law@cygnus.com)
-
+
* config/tc-mn10300.c (mn10300_insert_operand): MN10300_OPERAND_SPLIT
operands are assumed to be 32bits. Use "bits" field to hold the
number of bits in the main instruction word for MN10300_OPERAND_SPLIT.
@@ -3556,8 +3556,8 @@ Mon Oct 21 11:38:30 1996 Ian Lance Taylor <ian@cygnus.com>
(tc_gen_reloc): Handle BFD_RELOC_64.
* config/tc-i386.c (md_apply_fix3): Don't increment value for a PC
- relative reloc when BFD_ASSEMBLER and OBJ_AOUT (more ugly gas
- reloc hacking).
+ relative reloc when BFD_ASSEMBLER and OBJ_AOUT (more ugly gas
+ reloc hacking).
* config/obj-aout.h (S_IS_DEFINE): non BFD_ASSEMBLER version:
Don't check S_GET_OTHER.
@@ -3744,7 +3744,7 @@ Tue Oct 1 12:37:48 1996 Ian Lance Taylor <ian@cygnus.com>
register numbers. From Ken Rose <rose@netcom.com>.
* config/tc-alpha.c: Add some static function prototypes.
- (alpha_macros): Move to top of file. Make static.
+ (alpha_macros): Move to top of file. Make static.
(alpha_num_macros): Move to top of file.
Tue Oct 1 09:36:19 1996 Stu Grossman (grossman@critters.cygnus.com)
@@ -3768,7 +3768,7 @@ Tue Sep 24 19:05:08 1996 Ian Lance Taylor <ian@cygnus.com>
Tue Sep 24 12:22:18 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * config/tc-d10v.c (md_operand): Created. Allows operands to
+ * config/tc-d10v.c (md_operand): Created. Allows operands to
start with '#'.
* config/tc-d10v.h (md_operand): Undefined.
@@ -3795,10 +3795,10 @@ Mon Sep 16 11:41:40 1996 Ian Lance Taylor <ian@cygnus.com>
Thu Sep 12 10:25:45 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-arm.c (md_apply_fix3): Update two thumb instruction
- slots when processing BL fixups.
+ slots when processing BL fixups.
* config/tc-arm.c (output_inst): Ensure Thumb BL fixup is marked
- on the first half of the instruction.
+ on the first half of the instruction.
Wed Sep 11 00:09:35 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -3828,11 +3828,11 @@ Mon Sep 9 10:57:42 1996 Ian Lance Taylor <ian@cygnus.com>
Sat Sep 7 13:25:55 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c (COUNT_TOP_ZEROES): Added macro to count
- leading zeroes.
+ leading zeroes.
(load_register): Ensure hi32 bits are not lost during lo32bit
- processing. Fix shift offset that was overflowing into the next
- instruction field. Add code to generate shorter sequences for
- constants with a single contiguous seqeuence of ones.
+ processing. Fix shift offset that was overflowing into the next
+ instruction field. Add code to generate shorter sequences for
+ constants with a single contiguous seqeuence of ones.
Fri Sep 6 17:07:12 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
@@ -3882,8 +3882,8 @@ Wed Sep 4 10:23:20 1996 Ian Lance Taylor <ian@cygnus.com>
Wed Sep 4 11:24:29 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c (load_register): Remove unnecessary code that
- was causing the high 32bits of 64bit constants to be lost.
-
+ was causing the high 32bits of 64bit constants to be lost.
+
Tue Sep 3 13:52:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Added changes to support function
@@ -3916,22 +3916,22 @@ Fri Aug 30 23:50:08 1996 Jeffrey A Law (law@cygnus.com)
Fri Aug 30 18:35:26 1996 J.T. Conklin <jtc@hippo.cygnus.com>
* config/tc-v850.c (reg_name_search): Align calling convention to
- be like identical function found in tc-ppc.c.
+ be like identical function found in tc-ppc.c.
(get_reloc): Removed.
(v850_reloc_prefix): New function, parse lo(), hi() and hi0().
(md_assemble): emit fixups.
(md_pcrel_from): renamed from md_pcrel_from_section, emit proper
- displacement.
+ displacement.
(md_apply_fix3): handle fixups/relocs.
* config/tc-v850.h (MD_PCREL_FROM_SECTION): Removed definition.
-
+
Fri Aug 30 18:12:00 1996 Ian Lance Taylor <ian@cygnus.com>
Add SH ELF support.
* configure.in (sh-*-elf*): New target.
* config/tc-sh.h (TARGET_ARCH): Define.
(WORKING_DOT_WORD): Define.
- (TC_COFF_FIX2RTYPE): Only define if OBJ_COFF.
+ (TC_COFF_FIX2RTYPE): Only define if OBJ_COFF.
(BFD_ARCH, COFF_MAGIC, TC_COUNT_RELOC): Likewise.
(TC_RELOC_MANGLE, tc_coff_symbol_emit_hook): Likewise.
(DO_NOT_STRIP, NEED_FX_R_TYPE, TC_KEEP_FX_OFFSET): Likewise.
@@ -3975,7 +3975,7 @@ Fri Aug 30 18:12:00 1996 Ian Lance Taylor <ian@cygnus.com>
Fri Aug 30 14:47:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * config/tc-d10v.c (find_opcode): Fix problem with calculating
+ * config/tc-d10v.c (find_opcode): Fix problem with calculating
branch sizes in across sections.
Fri Aug 30 00:44:13 1996 Jeffrey A Law (law@cygnus.com)
@@ -4022,7 +4022,7 @@ Mon Aug 26 18:24:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
Mon Aug 26 13:39:27 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * config/tc-d10v.c (parallel_ok): Fix bug in parallel
+ * config/tc-d10v.c (parallel_ok): Fix bug in parallel
checking code.
Mon Aug 26 14:38:22 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -4035,7 +4035,7 @@ Mon Aug 26 14:38:22 1996 Ian Lance Taylor <ian@cygnus.com>
Fri Aug 23 11:40:47 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * doc/c-d10v.texi: Fix typo.
+ * doc/c-d10v.texi: Fix typo.
Fri Aug 23 10:41:32 1996 Jeffrey A Law (law@cygnus.com)
@@ -4060,7 +4060,7 @@ Fri Aug 23 10:41:32 1996 Jeffrey A Law (law@cygnus.com)
(system_register_name): New function.
(SYSREG_NAME_CNT): Define.
(md_assemble): Handle operands which are system registers.
-
+
* config/tc-v850.c (md_assemble): If we find a register, but the
opcode doesn't want a register, then we don't have a match.
(md_assemble): Get size of the instruction from the opcode table.
@@ -4077,16 +4077,16 @@ Thu Aug 22 10:20:30 1996 Ian Lance Taylor <ian@cygnus.com>
Thu Aug 22 10:50:00 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * config/tc-d10v.c: Fix a reloc bug caused by my last change.
+ * config/tc-d10v.c: Fix a reloc bug caused by my last change.
* doc/c-d10v.texi: Cleanup.
-
+
Tue Aug 20 15:15:16 1996 J.T. Conklin <jtc@hippo.cygnus.com>
* config/tc-v850.c: New file.
* config/tc-v850.h: New file.
* configure (v850-*-elf): New target.
* configure.in (v850-*-elf): New target.
-
+
Wed Aug 21 15:50:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* doc/c-d10v.texi: New file.
@@ -4096,7 +4096,7 @@ Wed Aug 21 15:50:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
Tue Aug 20 14:10:02 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: All references to defined symbols should
- now use the optimal instruction. .float and .double now work.
+ now use the optimal instruction. .float and .double now work.
Mon Aug 19 14:41:36 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -4111,13 +4111,13 @@ Thu Aug 15 16:37:59 1996 Stan Shebs <shebs@andros.cygnus.com>
Thu Aug 15 13:24:30 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Add additional information to the opcode
- table to help determinine which instructions can be done
- in parallel.
+ table to help determinine which instructions can be done
+ in parallel.
Thu Aug 15 17:01:31 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-arm.c: Major changes to add Thumb support, with lots
- of change input from <rearnsha@armltd.co.uk>.
+ of change input from <rearnsha@armltd.co.uk>.
Reverted to INSN_SIZE macro, rather than insn_size variable.
(insns): Added ARM "bx" instruction support.
(tinsns): Added Thumb instruction definition structure.
@@ -4128,21 +4128,21 @@ Thu Aug 15 17:01:31 1996 James G. Smith <jsmith@cygnus.co.uk>
(do_ldst): Simpler halfword support.
(do_ldmstm): Improved.
(reg_list, do_bx, thumb_reg, thumb_add_sub, thumb_shift,
- thumb_mov_compare, thumb_load_store, do_t_arit, do_t_add,
- do_t_asr, do_t_branch, do_t_bx, do_t_compare, do_t_ldmstm,
- do_t_ldrb, do_t_ldrh, do_t_lds, do_t_lsl, do_t_lsr, do_t_mov,
- do_t_push_pop, do_t_str, do_t_strb, do_t_strh, do_t_sub, do_t_swi,
- do_t_adr): Added.
+ thumb_mov_compare, thumb_load_store, do_t_arit, do_t_add,
+ do_t_asr, do_t_branch, do_t_bx, do_t_compare, do_t_ldmstm,
+ do_t_ldrb, do_t_ldrh, do_t_lds, do_t_lsl, do_t_lsr, do_t_mov,
+ do_t_push_pop, do_t_str, do_t_strb, do_t_strh, do_t_sub, do_t_swi,
+ do_t_adr): Added.
(md_apply_fix3): Add support for BFD_RELOC_ARM_THUMB_* relocations.
(md_parse_option): Add support for -mthumb.
(md_show_usage): Updated to reflect new command line option.
(arm_data_in_code, arm_canonicalize_symbol_name): Added.
* config/tc-arm.h: Provide TC_FIX_TYPE to allow private ARM
- fragment information to be held.
+ fragment information to be held.
Thu Aug 15 16:12:00 1996 Richard Earnshaw (rearnsha@armltd.co.uk)
- * config/tc-arm.c (md_apply_fix3): Also set fixP->fx_done if fx_addsy is
+ * config/tc-arm.c (md_apply_fix3): Also set fixP->fx_done if fx_addsy is
non-null, but is a constant.
(fix_new_arm): Call make_expr_symbol to make the expression symbol
so that error reporting will work correctly.
@@ -4165,7 +4165,7 @@ Mon Aug 12 16:49:43 1996 Ian Lance Taylor <ian@cygnus.com>
Fri Aug 9 17:48:28 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
- * config/tc-d10v.c: Fix problem with relocs.
+ * config/tc-d10v.c: Fix problem with relocs.
Fri Aug 9 14:16:14 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -4243,7 +4243,7 @@ Fri Aug 2 11:23:31 1996 Ian Lance Taylor <ian@cygnus.com>
Thu Aug 1 23:51:52 1996 Jeffrey A Law (law@cygnus.com)
* config/tc-hppa.c: Revert yesterday's changes.
-
+
Wed Jul 31 14:46:11 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Disable range checking on 16-bit values.
@@ -4260,22 +4260,22 @@ Wed Jul 31 11:45:15 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
Wed Jul 31 15:41:42 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-arm.c: Changed INSN_SIZE to variable insn_size, as
- pre-cursor to adding Thumb support. Also added cpu_variant flag
- information to each of the asm_flg structures.
+ pre-cursor to adding Thumb support. Also added cpu_variant flag
+ information to each of the asm_flg structures.
(md_parse_option): Updated ARM7 parsing to allow 't' for
- thumb/halfword support, aswell as 'm' for long multiply.
+ thumb/halfword support, aswell as 'm' for long multiply.
(md_show_usage): Updated help message.
(md_assemble): Check that instruction flags are applicated to the
- current cpu variant.
+ current cpu variant.
(md_apply_fix3, tc_gen_reloc): Add BFD_RELOC_ARM_OFFSET_IMM8 and
- BFD_RELOC_ARM_HWLITERAL relocation support for new halfword and
- signextension instructions.
+ BFD_RELOC_ARM_HWLITERAL relocation support for new halfword and
+ signextension instructions.
(do_ldst): Generate halfword and signextension variants if
- mnemonic flags match.
+ mnemonic flags match.
(ldst_extend): Do not allow shifts in the offset field of halfword
- or signextension instructions.
+ or signextension instructions.
(validate_offset_imm): Provide check on halfword and signextension
- immediate range.
+ immediate range.
(add_to_lit_pool): Merge identical literal pool values.
Tue Jul 30 14:28:23 1996 Jeffrey A Law (law@cygnus.com)
@@ -4298,7 +4298,7 @@ Fri Jul 26 11:43:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Added lots of error checking. Added hacks
to support accumulator shifts.
-
+
Fri Jul 26 11:56:08 1996 Ian Lance Taylor <ian@cygnus.com>
* symbols.c (S_SET_EXTERNAL): Let .weak override.
@@ -4315,8 +4315,8 @@ Thu Jul 25 12:03:33 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Fix packaging bug. Added range checking.
Added kludge for divs instruction. Fixed minor problem with
multiple text sections.
- * config/tc-d10v.h (d10v_cleanup): Change prototype.
-
+ * config/tc-d10v.h (d10v_cleanup): Change prototype.
+
Tue Jul 23 10:49:36 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (md_apply_fix3): Fix all instruction
@@ -4325,11 +4325,11 @@ Tue Jul 23 10:49:36 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
Mon Jul 22 11:32:36 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Many changes to get relocs working.
- (register_name): No longer creates a symbol for register names.
- (pre_defined_registers): moved to opcodes/d10v-opc.c.
+ (register_name): No longer creates a symbol for register names.
+ (pre_defined_registers): moved to opcodes/d10v-opc.c.
(d10v_insert_operand): Now works correctly for either container.
- * config/tc-d10v.h (d10v_cleanup): Declare.
-
+ * config/tc-d10v.h (d10v_cleanup): Declare.
+
Mon Jul 22 14:01:33 1996 Ian Lance Taylor <ian@cygnus.com>
* config/tc-mips.c (tc_gen_reloc): BFD_RELOC_PCREL_HI16_S and
@@ -4396,7 +4396,7 @@ Wed Jul 17 14:25:13 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.h: New file.
* configure (d10v-*-elf): New target.
* configure.in (d10v-*-elf): New target.
-
+
Fri Jul 12 20:54:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* config/tc-ppc.c (md_parse_option): Recognize -K PIC.
@@ -4423,9 +4423,9 @@ Wed Jul 10 00:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
Mon Jul 8 14:11:49 1996 Ian Lance Taylor <ian@cygnus.com>
* config/tc-mips.c (mips_regmask_frag): Only define if OBJ_ELF or
- OBJ_MAYBE_ELF.
+ OBJ_MAYBE_ELF.
(tc_gen_reloc): If fixup was changed to be PC relative, change
- reloc type accordingly. Use name of reloc in error message.
+ reloc type accordingly. Use name of reloc in error message.
* as.h: Don't define const or volatile.
* flonum.h: Don't define const.
@@ -4442,7 +4442,7 @@ Fri Jul 5 10:32:58 1996 J.T. Conklin <jtc@rtl.cygnus.com>
* doc/as.texinfo: Likewise.
* config/tc-m68k.c (m68k_ip): The coldfire does not support 8x
- scale factor.
+ scale factor.
Fri Jul 5 11:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -4458,14 +4458,14 @@ Thu Jul 4 11:59:46 1996 Ian Lance Taylor <ian@cygnus.com>
Thu Jul 4 10:11:33 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c (mips_ip): Only perform range check when
- dealing with O_constant expressions.
+ dealing with O_constant expressions.
Wed Jul 3 15:02:21 1996 J.T. Conklin <jtc@rtl.cygnus.com>
* m68k-parse.h (m68k_register): Add new coldfile control
registers.
- * config/tc-m68k.c (mcf5200_control_regs): New variable,
+ * config/tc-m68k.c (mcf5200_control_regs): New variable,
array of control registers for the coldfire.
(cpu_of_arch): Added mcf5200.
(archs): Added mcf5200.
@@ -4499,7 +4499,7 @@ Wed Jul 3 16:05:50 1996 Ian Lance Taylor <ian@cygnus.com>
Tue Jul 2 23:02:12 1996 Jeffrey A Law (law@cygnus.com)
- * config/tc-h8300.c (build_bytes): If an operand type is
+ * config/tc-h8300.c (build_bytes): If an operand type is
marked as SRC_IN_DST retrieve it from the "destination" op.
Sat Jun 29 13:38:31 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -4558,7 +4558,7 @@ Wed Jun 26 13:21:34 1996 Ian Lance Taylor <ian@cygnus.com>
Wed Jun 26 16:23:08 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c: Added cop_interlocks, to avoid NOP insertion
- between co-processor comparisons and branches for the VR4300.
+ between co-processor comparisons and branches for the VR4300.
Mon Jun 24 18:02:50 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
@@ -4710,8 +4710,8 @@ Wed Jun 19 11:31:50 1996 Ian Lance Taylor <ian@cygnus.com>
emit relocations against external symbols.
* config/tc-alpha.c (tc_gen_reloc): Output a sensible error
- message if bfd_reloc_type_lookup fails, rather than calling
- assert.
+ message if bfd_reloc_type_lookup fails, rather than calling
+ assert.
* config/tc-alpha.c (alpha_force_relocation): Add
BFD_RELOC_12_PCREL to switch.
@@ -4757,7 +4757,7 @@ Tue Jun 18 13:19:51 1996 Jeffrey A. Law <law@rtl.cygnus.com>
Mon Jun 17 15:50:53 1996 J.T. Conklin <jtc@rtl.cygnus.com>
* doc/as.texinfo: Reorder chapter of machine dependent options so
- that it is sorted by chip name.
+ that it is sorted by chip name.
* doc/as.texinfo: Use consistant spelling of Vax.
* doc/c-vax.texi: Likewise.
@@ -4822,7 +4822,7 @@ Mon Jun 10 11:45:51 1996 Ian Lance Taylor <ian@cygnus.com>
flag for C_MOS, C_MOE, C_MOU, or C_EOS symbols, since they should
have a section of N_ABS rather than N_DEBUG. If we do a merge,
remove the new symbol from the list.
- (obj_coff_endef, both versions): Call tag_insert even if there is
+ (obj_coff_endef, both versions): Call tag_insert even if there is
an old symbol with the same name, if the old symbol does not
happen to be a tag.
(coff_frob_symbol): Check SF_GET_TAG, C_EOF, and C_FILE outside of
@@ -4839,7 +4839,7 @@ Mon Jun 10 11:45:51 1996 Ian Lance Taylor <ian@cygnus.com>
defined.
* app.c (do_scrub_chars): If '/' is LINE_COMMENT_START, check
- whether the next character is '*' before checking whether we are
+ whether the next character is '*' before checking whether we are
at the start of a line. Permit LINE_COMMENT_START to start a
comment in state 1 (seen some whitespace) as well, to match the
documentation.
@@ -4948,7 +4948,7 @@ Thu May 16 15:51:48 1996 Ian Lance Taylor <ian@cygnus.com>
(sh_flush_pending_output): Declare.
(md_flush_pending_output): Define.
* config/tc-sh.c (md_assemble): If relaxing, emit a R_SH_CODE
- reloc before the instruction if necessary.
+ reloc before the instruction if necessary.
(sh_frob_label): New function.
(sh_flush_pending_output): New function.
(sh_coff_frob_file): Ignore ALIGN, CODE, DATA, and LABEL relocs
@@ -4971,7 +4971,7 @@ Wed May 15 12:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
Wed May 15 08:33:37 1996 Jeffrey A Law (law@cygnus.com)
* config/obj-coff.c (count_entries_in_chain): Ignore Fixups with
- fx_done set.
+ fx_done set.
(do_relocs_for): Likewise.
(fixup_segment): Don't just quit if linkrelax is set. Try to
apply non pc-relative sym1-sym2 fixups, even if linkrelax is
@@ -5018,7 +5018,7 @@ Sat May 4 12:49:35 1996 Jeffrey A Law (law@cygnus.com)
Sat May 4 11:26:19 1996 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in: Add subsegs.h to appropriate TARG_CPU_DEP_*
- variables.
+ variables.
Fri May 3 17:58:31 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -5068,7 +5068,7 @@ Thu Apr 25 11:39:51 1996 Ian Lance Taylor <ian@cygnus.com>
Wed Apr 24 11:28:38 1996 Ian Lance Taylor <ian@cygnus.com>
* config/tc-m68k.c (m68k_ip): Prevent attempts to use long offsets
- in 68000 mode.
+ in 68000 mode.
* config/obj-coff.c (obj_coff_section): BFD_ASSEMBLER version:
call demand_empty_rest_of_line. Non BFD_ASSEMBLER version:
@@ -5087,7 +5087,7 @@ Mon Apr 22 18:02:37 1996 Doug Evans <dje@blues.cygnus.com>
Thu Apr 18 18:58:33 1996 Ian Lance Taylor <ian@cygnus.com>
* config/obj-coff.c: BFD_ASSEMBLER:
- (coff_last_bf): New static variable.
+ (coff_last_bf): New static variable.
(coff_frob_symbol): Set endndx of a .bf symbol.
Non BFD_ASSEMBLER:
(obj_coff_endef): Call SF_SET_PROCESS on a .bf symbol.
@@ -5185,7 +5185,7 @@ Fri Apr 5 14:29:23 1996 Ian Lance Taylor <ian@cygnus.com>
Fri Apr 5 18:39:28 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c: Allow non-zero offsets from .sdata symbols to
- be accessed using the $gp register.
+ be accessed using the $gp register.
* config/tc-mips.h (MAX_GPREL_OFFSET): Added.
Wed Apr 3 10:56:14 1996 Doug Evans <dje@canuck.cygnus.com>
@@ -5324,7 +5324,7 @@ Mon Mar 11 09:59:53 1996 Steve Chamberlain <sac@slash.cygnus.com>
(do_relocs_for, w_symbols, obj_coff_add_segment, do_linenos_for,
crawl_symbols, coff_header_append): Loop to SEG_LAST rather than
SEG_E9.
-
+
Thu Mar 7 15:17:39 1996 Doug Evans <dje@charmed.cygnus.com>
* config/tc-sparc.c (sparc_ip): Handle operand char 'O' (neg reg).
@@ -5464,7 +5464,7 @@ Mon Feb 19 02:15:57 1996 Doug Evans <dje@charmed.cygnus.com>
Sun Feb 18 15:03:50 1996 Ian Lance Taylor <ian@cygnus.com>
* configure.in: Check for 'do not mix' from native linker before
- trying to use -rpath.
+ trying to use -rpath.
* configure: Rebuild.
Fri Feb 16 16:53:31 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -5585,7 +5585,7 @@ Mon Feb 12 15:16:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
(NO_RELOC): Define to BFD_RELOC_NONE if BFD_ASSEMBLER, to zero
otherwise.
* config/tc-m68k.c: Delete definition of NO_RELOC.
- (struct m68k_it): Add pic_reloc field.
+ (struct m68k_it): Add pic_reloc field.
(add_fix): Copy over pic_reloc field.
(md_pseudo_table): Interpret .align parameter as byte count.
(mote_pseudo_table): Likewise.
@@ -5599,7 +5599,7 @@ Mon Feb 12 15:16:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
(md_begin): Align .text, .data and .bss on 4 byte boundary by
default.
* write.c (fixup_segment): Don't add symbol value to addend if
- TC_M68K and OBJ_ELF.
+ TC_M68K and OBJ_ELF.
* config/m68k-parse.y (yylex): Handle @PLTPC, etc.
(motorola_operand): Add rule for `(zapc, EXPR)'.
@@ -5809,7 +5809,7 @@ Mon Jan 29 12:21:30 1996 Ian Lance Taylor <ian@cygnus.com>
Fri Jan 26 19:28:52 1996 Kim Knuttila <krk@cygnus.com>
- * config/tc-ppc.c (md_assemble): Ignore overflow on
+ * config/tc-ppc.c (md_assemble): Ignore overflow on
BFD_RELOC_16_GOTOFF and BFD_RELOC_PPC_TOC16.
Fri Jan 26 16:14:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
@@ -5957,3 +5957,10 @@ Tue Jan 2 12:43:23 1996 Jim Wilson <wilson@chestnut.cygnus.com>
not alphanumeric.
For older changes see ChangeLog-9295
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/gas/ChangeLog-9899 b/contrib/binutils/gas/ChangeLog-9899
index c2e4d897aa0a..ae38e5dd9223 100644
--- a/contrib/binutils/gas/ChangeLog-9899
+++ b/contrib/binutils/gas/ChangeLog-9899
@@ -4858,3 +4858,10 @@ Fri Jan 2 16:08:54 1998 Ian Lance Taylor <ian@cygnus.com>
unrecognized characters after an expression.
For older changes see ChangeLog-9697
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am
index 7728434af210..08b9842fc6be 100644
--- a/contrib/binutils/gas/Makefile.am
+++ b/contrib/binutils/gas/Makefile.am
@@ -16,6 +16,7 @@ YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison
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)
MKDEP = gcc -MM
@@ -40,19 +41,19 @@ IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o
# CPU types. This is only used for dependency information.
CPU_TYPES = \
- a29k \
alpha \
arc \
arm \
avr \
+ bfin \
cris \
+ crx \
d10v \
d30v \
dlx \
fr30 \
frv \
h8300 \
- h8500 \
hppa \
ia64 \
i370 \
@@ -60,10 +61,10 @@ CPU_TYPES = \
i860 \
i960 \
ip2k \
+ m32c \
m32r \
m68hc11 \
m68k \
- m88k \
mcore \
mips \
mmix \
@@ -80,16 +81,15 @@ CPU_TYPES = \
sh \
sh64 \
sparc \
- tahoe \
tic30 \
tic4x \
tic54x \
- tic80 \
vax \
- w65 \
v850 \
xstormy16 \
+ xc16x \
xtensa \
+ z80 \
z8k
# Object format types. This is only used for dependency information.
@@ -97,14 +97,11 @@ CPU_TYPES = \
OBJ_FORMATS = \
aout \
- bout \
coff \
ecoff \
elf \
evax \
- hp300 \
- ieee \
- vms
+ ieee
# 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,13 +113,9 @@ CPU_OBJ_VALID = \
case $$o in \
aout) \
case $$c in \
- a29k | arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tahoe | tic30 | vax) \
+ arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tic30 | vax) \
valid=yes ;; \
esac ;; \
- bout) \
- case $$c in \
- i960) valid=yes ;; \
- esac ;; \
coff) valid=yes; \
case $$c in \
cris | i860 | mmix | sh64) \
@@ -137,10 +130,6 @@ CPU_OBJ_VALID = \
case $$c in \
alpha) valid=yes ;; \
esac ;; \
- hp300) \
- case $$c in \
- m68k) valid=yes ;; \
- esac ;; \
vms) \
case $$c in \
vax) valid=yes ;; \
@@ -175,7 +164,6 @@ GAS_CFILES = \
app.c \
as.c \
atof-generic.c \
- bignum-copy.c \
cond.c \
depend.c \
dwarf2dbg.c \
@@ -220,6 +208,7 @@ HFILES = \
frags.h \
hash.h \
input-file.h \
+ itbl-lex.h \
itbl-ops.h \
listing.h \
macro.h \
@@ -236,19 +225,19 @@ HFILES = \
# CPU files in config.
TARGET_CPU_CFILES = \
- config/tc-a29k.c \
config/tc-alpha.c \
config/tc-arc.c \
config/tc-arm.c \
config/tc-avr.c \
+ config/tc-bfin.c \
config/tc-cris.c \
+ config/tc-crx.c \
config/tc-d10v.c \
config/tc-d30v.c \
config/tc-dlx.c \
config/tc-fr30.c \
config/tc-frv.c \
config/tc-h8300.c \
- config/tc-h8500.c \
config/tc-hppa.c \
config/tc-ia64.c \
config/tc-i370.c \
@@ -256,10 +245,10 @@ TARGET_CPU_CFILES = \
config/tc-i860.c \
config/tc-i960.c \
config/tc-ip2k.c \
+ config/tc-m32c.c \
config/tc-m32r.c \
config/tc-m68hc11.c \
config/tc-m68k.c \
- config/tc-m88k.c \
config/tc-mcore.c \
config/tc-mips.c \
config/tc-mmix.c \
@@ -276,31 +265,30 @@ TARGET_CPU_CFILES = \
config/tc-sh.c \
config/tc-sh64.c \
config/tc-sparc.c \
- config/tc-tahoe.c \
config/tc-tic30.c \
config/tc-tic54x.c \
- config/tc-tic80.c \
config/tc-vax.c \
- config/tc-w65.c \
config/tc-v850.c \
config/tc-xstormy16.c \
+ config/tc-xc16x.c \
config/tc-xtensa.c \
+ config/tc-z80.c \
config/tc-z8k.c
TARGET_CPU_HFILES = \
- config/tc-a29k.h \
config/tc-alpha.h \
config/tc-arc.h \
config/tc-arm.h \
config/tc-avr.h \
+ config/tc-bfin.h \
config/tc-cris.h \
+ config/tc-crx.h \
config/tc-d10v.h \
config/tc-d30v.h \
config/tc-dlx.h \
config/tc-fr30.h \
config/tc-frv.h \
config/tc-h8300.h \
- config/tc-h8500.h \
config/tc-hppa.h \
config/tc-ia64.h \
config/tc-i370.h \
@@ -308,10 +296,10 @@ TARGET_CPU_HFILES = \
config/tc-i860.h \
config/tc-i960.h \
config/tc-ip2k.h \
+ config/tc-m32c.h \
config/tc-m32r.h \
config/tc-m68hc11.h \
config/tc-m68k.h \
- config/tc-m88k.h \
config/tc-mcore.h \
config/tc-mips.h \
config/tc-mmix.h \
@@ -328,47 +316,41 @@ TARGET_CPU_HFILES = \
config/tc-sh.h \
config/tc-sh64.h \
config/tc-sparc.h \
- config/tc-tahoe.h \
config/tc-tic30.h \
config/tc-tic54x.h \
- config/tc-tic80.h \
config/tc-vax.h \
- config/tc-w65.h \
config/tc-v850.h \
config/tc-xstormy16.h \
+ config/tc-xc16x.h \
config/tc-xtensa.h \
+ config/tc-z80.h \
config/tc-z8k.h
# OBJ files in config
OBJ_FORMAT_CFILES = \
config/obj-aout.c \
- config/obj-bout.c \
config/obj-coff.c \
config/obj-ecoff.c \
config/obj-elf.c \
config/obj-evax.c \
- config/obj-hp300.c \
config/obj-ieee.c \
- config/obj-som.c \
- config/obj-vms.c
+ config/obj-som.c
OBJ_FORMAT_HFILES = \
config/obj-aout.h \
- config/obj-bout.h \
config/obj-coff.h \
config/obj-ecoff.h \
config/obj-elf.h \
config/obj-evax.h \
- config/obj-hp300.h \
config/obj-ieee.h \
- config/obj-som.h \
- config/obj-vms.h
+ config/obj-som.h
# Emulation header files in config
TARG_ENV_HFILES = \
config/te-386bsd.h \
+ config/te-armlinuxeabi.h \
config/te-aux.h \
config/te-delta.h \
config/te-delt88.h \
@@ -377,7 +359,6 @@ TARG_ENV_HFILES = \
config/te-epoc-pe.h \
config/te-generic.h \
config/te-go32.h \
- config/te-hp300.h \
config/te-hppa.h \
config/te-hppa64.h \
config/te-hppalinux64.h \
@@ -391,15 +372,15 @@ TARG_ENV_HFILES = \
config/te-macos.h \
config/te-nbsd.h \
config/te-nbsd532.h \
+ config/te-netware.h \
config/te-pc532mach.h \
config/te-pe.h \
- config/te-ppcnw.h \
config/te-psos.h \
config/te-riscix.h \
config/te-sparcaout.h \
config/te-sun3.h \
config/te-svr4.h \
- config/te-sysv32.h \
+ config/te-symbian.h \
config/te-tmips.h
# Multi files in config
@@ -423,7 +404,6 @@ GENERIC_OBJS = \
app.o \
as.o \
atof-generic.o \
- bignum-copy.o \
cond.o \
depend.o \
dwarf2dbg.o \
@@ -454,7 +434,7 @@ OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
POTFILES = $(MULTI_CFILES) $(TARGET_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
$(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
- $(HFILES) $(CFILES) $(GAS_CFILES)
+ $(HFILES) $(CFILES)
po/POTFILES.in: @MAINT@ Makefile
for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
@@ -465,14 +445,11 @@ noinst_PROGRAMS = as-new
noinst_SCRIPTS = $(GDBINIT)
EXTRA_SCRIPTS = .gdbinit
-$(srcdir)/make-gas.com: stamp-mk.com
-stamp-mk.com: vmsconf.sh Makefile
- sh $(srcdir)/vmsconf.sh $(GENERIC_OBJS) > new-make.com
- $(SHELL) $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
- touch stamp-mk.com
+EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \
+ bfin-parse.c bfin-parse.h bfin-lex.c
-EXTRA_DIST = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
diststuff: $(EXTRA_DIST) info
+all: info
DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
@@ -487,15 +464,15 @@ 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="\"$(prefix)/share/locale\""
+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\""
# 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="\"$(prefix)/share/locale\""
+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_FLAGS = -DBFD_ASSEMBLER -DOBJ_MAYBE_ELF \
+DEP_FLAGS = -DOBJ_MAYBE_ELF \
-I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES)
# How to link with both our special library facilities
@@ -524,13 +501,8 @@ $(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.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
-EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
- echo $${rootme}/../expect/expect ; \
- else echo expect ; fi`
-
-RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
- echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
- fi`
+EXPECT = expect
+RUNTEST = runtest
RUNTESTFLAGS=
check-DEJAGNU: site.exp
@@ -544,10 +516,6 @@ check-DEJAGNU: site.exp
rootme=`pwd`; export rootme; \
srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
EXPECT=${EXPECT} ; export EXPECT ; \
- if [ -f $(top_builddir)/../expect/expect ]; then \
- TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
- export TCL_LIBRARY; \
- fi; \
runtest=$(RUNTEST); \
cd testsuite; \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
@@ -574,8 +542,6 @@ ecoff.o : ecoff.c ecoff.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
obj-aout.o : $(srcdir)/config/obj-aout.c
$(COMPILE) -c $(srcdir)/config/obj-aout.c
-obj-bout.o : $(srcdir)/config/obj-bout.c
- $(COMPILE) -c $(srcdir)/config/obj-bout.c
obj-coff.o: $(srcdir)/config/obj-coff.c
$(COMPILE) -c $(srcdir)/config/obj-coff.c
obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
@@ -584,16 +550,12 @@ obj-elf.o : $(srcdir)/config/obj-elf.c
$(COMPILE) -c $(srcdir)/config/obj-elf.c
obj-evax.o : $(srcdir)/config/obj-evax.c
$(COMPILE) -c $(srcdir)/config/obj-evax.c
-obj-hp300.o : $(srcdir)/config/obj-hp300.c
- $(COMPILE) -c $(srcdir)/config/obj-hp300.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
$(COMPILE) -c $(srcdir)/config/obj-som.c
-obj-vms.o : $(srcdir)/config/obj-vms.c
- $(COMPILE) -c $(srcdir)/config/obj-vms.c
e-mipself.o : $(srcdir)/config/e-mipself.c
$(COMPILE) -c $(srcdir)/config/e-mipself.c
@@ -615,7 +577,7 @@ xtensa-relax.o: $(srcdir)/config/xtensa-relax.c
# The m68k operand parser.
-EXTRA_as_new_SOURCES = config/m68k-parse.y
+EXTRA_as_new_SOURCES = config/m68k-parse.y config/bfin-parse.y
# If m68k-parse.y is in a different directory, then ylwrap will use an
# absolute path when it invokes yacc, which will cause yacc to put the
@@ -635,27 +597,51 @@ m68k-parse.c: $(srcdir)/config/m68k-parse.y
cp config/m68k-parse.y . >/dev/null 2>/dev/null; \
f=m68k-parse.y; \
else true; fi; \
- $(SHELL) $(YLWRAP) "$(YACC)" $$f y.tab.c m68k-parse.c --; \
+ $(SHELL) $(YLWRAP) $$f y.tab.c m68k-parse.c -- $(YACCCOMPILE); \
if [ $$f = "m68k-parse.y" ]; then \
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.
m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
+ $(COMPILE) -c $< $(NO_WERROR)
# Don't let the .y.h rule clobber m68k-parse.h.
m68k-parse.h: ; @true
$(srcdir)/config/m68k-parse.h: ; @true
+bfin-parse.c: $(srcdir)/config/bfin-parse.y
+ $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ;
+bfin-parse.h: bfin-parse.c
+bfin-parse.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
+
+bfin-defs.h: ; @true
+$(srcdir)/config/bfin-defs.h: ; @true
+
+bfin-lex.c: $(srcdir)/config/bfin-lex.l
+ $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE)
+bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h
+ $(COMPILE) -c $< $(NO_WERROR)
+
# The instruction table specification lexical analyzer and parser.
itbl-lex.c: $(srcdir)/itbl-lex.l
-itbl-lex.o: itbl-lex.c itbl-parse.h
-itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h
+# Disable -Werror, if it has been enabled, since old versions of bison/
+# 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.
+itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h
+ $(COMPILE) -c $< $(NO_WERROR)
itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
- $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- -d
+ $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d
# stand-alone itbl assembler & disassembler
@@ -680,12 +666,41 @@ cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \
# Remake the info files.
-MOSTLYCLEANFILES = $(STAGESTUFF) core stamp-mk.com \
+MOSTLYCLEANFILES = $(STAGESTUFF) core \
testsuite/*.o testsuite/*.out testsuite/gas.log testsuite/gas.sum \
testsuite/site.exp site.bak site.exp stage stage1 stage2
CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2A DEP1 DEPA DEP DEPDIR
+.PHONY: install-html install-html-am install-html-recursive
+
+install-html: install-html-recursive
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
.PHONY: install-exec-local install-data-local
.PHONY: install-exec-bindir install-exec-tooldir
@@ -791,7 +806,7 @@ de-stage3:
DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
$(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES)
-CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
+CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt
# Automatic dependency computation. This is a real pain, because the
# dependencies change based on target_cpu_type and obj_format.
@@ -973,27 +988,16 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
-DEPTC_a29k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
-DEPTC_a29k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/a29k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
-DEPTC_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
DEPTC_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
- $(srcdir)/config/atof-vax.c
+ 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 $(INCDIR)/safe-ctype.h \
- $(srcdir)/config/atof-vax.c
+ 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 \
@@ -1004,8 +1008,8 @@ DEPTC_alpha_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(srcdir)/config/atof-vax.c
DEPTC_alpha_evax = $(INCDIR)/symcat.h $(srcdir)/config/obj-evax.h \
$(srcdir)/config/tc-alpha.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
- $(srcdir)/config/atof-vax.c
+ 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_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 \
@@ -1015,22 +1019,24 @@ DEPTC_arc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_arc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \
- struc-symbol.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/arc.h $(srcdir)/../opcodes/arc-ext.h \
- $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+ 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)/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)/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)/elf/arm.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.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 \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
@@ -1038,8 +1044,24 @@ DEPTC_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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 \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
@@ -1047,8 +1069,18 @@ DEPTC_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
DEPTC_cris_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/cris.h dwarf2dbg.h
+ 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 \
+ $(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 \
@@ -1075,31 +1107,34 @@ DEPTC_dlx_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.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 $(INCDIR)/opcode/dlx.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.h $(srcdir)/../opcodes/fr30-opc.h \
- cgen.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/fr30-opc.h cgen.h
+ 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.h \
- $(srcdir)/../opcodes/frv-opc.h cgen.h $(BFDDIR)/libbfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.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/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.h $(srcdir)/../opcodes/frv-opc.h \
- cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.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 \
@@ -1108,18 +1143,8 @@ DEPTC_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \
- subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/h8300.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h \
- $(INCDIR)/safe-ctype.h
-DEPTC_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h \
- $(INCDIR)/safe-ctype.h
DEPTC_hppa_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
@@ -1148,32 +1173,31 @@ DEPTC_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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
+ 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)/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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.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_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \
- $(srcdir)/config/tc-i960.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/i960.h
DEPTC_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 \
@@ -1181,32 +1205,54 @@ DEPTC_i960_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+ dwarf2dbg.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.h \
- $(srcdir)/../opcodes/ip2k-opc.h cgen.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.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 \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/ip2k-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/ip2k-opc.h \
- cgen.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/libbfd.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)/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 \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
- cgen.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_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/m32r-opc.h cgen.h
+ 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 \
@@ -1216,8 +1262,8 @@ DEPTC_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h $(INCDIR)/elf/m68hc11.h \
+ dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/m68hc11.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 \
@@ -1237,21 +1283,6 @@ DEPTC_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.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_m68k_hp300 = $(INCDIR)/symcat.h $(srcdir)/config/obj-hp300.h \
- $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/obstack.h subsegs.h dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
-DEPTC_m88k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
-DEPTC_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/config/m88k-opcode.h
DEPTC_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
@@ -1260,43 +1291,38 @@ DEPTC_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
+ 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_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
- ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
DEPTC_mips_coff = $(INCDIR)/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 $(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)/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)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
DEPTC_mips_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \
$(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \
$(INCDIR)/coff/ecoff.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/opcode/mips.h itbl-ops.h \
- dwarf2dbg.h $(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
+ 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 \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(INCDIR)/elf/mips.h \
- $(INCDIR)/elf/reloc-macros.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.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 \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
DEPTC_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \
- $(INCDIR)/safe-ctype.h dwarf2dbg.h
+ $(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 \
@@ -1304,7 +1330,7 @@ DEPTC_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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 \
@@ -1314,16 +1340,16 @@ DEPTC_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/mn10300.h dwarf2dbg.h
+ 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
+ $(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 \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/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 \
@@ -1335,18 +1361,19 @@ DEPTC_ns32k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \
- $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
+ 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.h \
- $(srcdir)/../opcodes/openrisc-opc.h cgen.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 \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/openrisc-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/openrisc-opc.h \
- cgen.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 \
@@ -1355,7 +1382,7 @@ DEPTC_or32_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.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 $(INCDIR)/opcode/or32.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 \
@@ -1367,7 +1394,7 @@ DEPTC_pdp11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.h
+ 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 \
@@ -1375,7 +1402,7 @@ DEPTC_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pj.h
+ 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 \
@@ -1384,9 +1411,9 @@ DEPTC_ppc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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 dwarf2dbg.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 \
@@ -1396,27 +1423,30 @@ DEPTC_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
- $(INCDIR)/opcode/s390.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.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)/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/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 \
$(srcdir)/config/tc-sh.c subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/sh-opc.h struc-symbol.h dwarf2dbg.h dw2gencfi.h
+ $(srcdir)/../opcodes/sh-opc.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 \
@@ -1430,21 +1460,9 @@ DEPTC_sparc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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 \
- dwarf2dbg.h
-DEPTC_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
-DEPTC_tahoe_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
-DEPTC_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
+ $(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
@@ -1455,7 +1473,7 @@ DEPTC_tic30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic30.h
+ 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 \
@@ -1464,7 +1482,7 @@ DEPTC_tic4x_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.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 $(INCDIR)/opcode/tic4x.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 \
@@ -1478,42 +1496,21 @@ DEPTC_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
struc-symbol.h $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(BFDDIR)/libcoff.h
-DEPTC_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic80.h
-DEPTC_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic80.h
DEPTC_vax_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \
- $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.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)/opcode/vax.h \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/obstack.h subsegs.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 \
- $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \
- $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/vax.h \
- $(INCDIR)/safe-ctype.h
-DEPTC_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \
- $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \
- $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/vax.h \
- $(INCDIR)/safe-ctype.h
-DEPTC_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
-DEPTC_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
+ dwarf2dbg.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \
+ subsegs.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 \
@@ -1522,27 +1519,43 @@ DEPTC_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \
- dwarf2dbg.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
DEPTC_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/xstormy16-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/xstormy16-opc.h cgen.h
+ $(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 \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/xstormy16-opc.h \
- cgen.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-config.h sb.h $(INCDIR)/safe-ctype.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/xtensa-relax.h \
- $(INCDIR)/xtensa-isa.h $(srcdir)/config/xtensa-istack.h \
+ $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-config.h sb.h \
+ $(INCDIR)/safe-ctype.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 \
@@ -1550,7 +1563,7 @@ DEPTC_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \
- $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h
+ dwarf2dbg.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
@@ -1559,18 +1572,6 @@ DEPTC_i386_multi = $(DEPTC_i386_aout) $(DEPTC_i386_coff) \
DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \
$(DEPTC_mips_elf)
DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf)
-DEPOBJ_a29k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_a29k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/a29k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
DEPOBJ_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1595,8 +1596,8 @@ DEPOBJ_arc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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
@@ -1616,16 +1617,34 @@ DEPOBJ_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1651,8 +1670,8 @@ DEPOBJ_dlx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1660,8 +1679,8 @@ DEPOBJ_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1678,17 +1697,8 @@ DEPOBJ_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1718,8 +1728,8 @@ DEPOBJ_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/reloc-macros.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 \
@@ -1731,15 +1741,14 @@ DEPOBJ_i386_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_i386_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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_i860_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i960_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \
- $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.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 \
@@ -1747,8 +1756,8 @@ DEPOBJ_i960_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1756,8 +1765,17 @@ DEPOBJ_ip2k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
+ $(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 \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1765,8 +1783,8 @@ DEPOBJ_m32r_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1774,8 +1792,8 @@ DEPOBJ_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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
@@ -1788,19 +1806,6 @@ DEPOBJ_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/symcat.h \
- $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_m88k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- 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 \
@@ -1808,11 +1813,8 @@ DEPOBJ_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+ 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 \
@@ -1831,8 +1833,8 @@ DEPOBJ_mips_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
DEPOBJ_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1840,8 +1842,8 @@ DEPOBJ_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1849,8 +1851,8 @@ DEPOBJ_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1858,8 +1860,8 @@ DEPOBJ_msp430_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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
@@ -1870,8 +1872,8 @@ DEPOBJ_ns32k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1879,8 +1881,8 @@ DEPOBJ_openrisc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1888,8 +1890,8 @@ DEPOBJ_or32_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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
@@ -1900,8 +1902,8 @@ DEPOBJ_pdp11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1909,8 +1911,8 @@ DEPOBJ_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1918,8 +1920,8 @@ DEPOBJ_ppc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.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 \
@@ -1928,8 +1930,8 @@ DEPOBJ_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1955,20 +1957,8 @@ DEPOBJ_sparc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_tahoe_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-DEPOBJ_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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
@@ -1979,8 +1969,8 @@ DEPOBJ_tic30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1988,8 +1978,8 @@ DEPOBJ_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1999,15 +1989,6 @@ DEPOBJ_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.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_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- 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
@@ -2018,21 +1999,8 @@ DEPOBJ_vax_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \
- $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h subsegs.h \
- $(INCDIR)/obstack.h
-DEPOBJ_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -2040,9 +2008,9 @@ DEPOBJ_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 $(INCDIR)/safe-ctype.h \
- subsegs.h $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h \
- $(INCDIR)/aout/aout64.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 \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -2050,13 +2018,28 @@ DEPOBJ_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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-config.h $(INCDIR)/safe-ctype.h subsegs.h \
- $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -2064,8 +2047,8 @@ DEPOBJ_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+ dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/aout/aout64.h
DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \
$(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
@@ -2074,14 +2057,6 @@ DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) $(DEPOBJ_i386_coff) \
DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \
$(DEPOBJ_mips_elf)
DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf)
-DEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
-DEP_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_a29k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h
DEP_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
@@ -2096,7 +2071,8 @@ DEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \
+ dwarf2dbg.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 \
@@ -2110,12 +2086,28 @@ DEP_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.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
+ $(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
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
+ $(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
@@ -2133,13 +2125,15 @@ DEP_dlx_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.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
+ $(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
+ $(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
@@ -2151,13 +2145,8 @@ DEP_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
$(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_h8300_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h
-DEP_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_h8500_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h
+ $(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
@@ -2179,7 +2168,8 @@ DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \
+ dwarf2dbg.h
DEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
@@ -2187,35 +2177,47 @@ DEP_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-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
+ $(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
-DEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.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 \
$(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
+ $(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
+ $(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 \
$(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
+ $(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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
+ dwarf2dbg.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 \
@@ -2224,22 +2226,13 @@ DEP_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \
DEP_m68k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h
-DEP_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
-DEP_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_m88k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h
DEP_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h \
$(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_mcore_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h
-DEP_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
+ dwarf2dbg.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
@@ -2250,25 +2243,29 @@ DEP_mips_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(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
+ $(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
+ $(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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h \
+ dwarf2dbg.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 \
@@ -2276,19 +2273,22 @@ DEP_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.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
+ $(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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \
+ dwarf2dbg.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h \
+ dwarf2dbg.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 \
@@ -2296,25 +2296,29 @@ DEP_pdp11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pdp11.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
+ $(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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
+ dwarf2dbg.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
+ $(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)/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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
+ dwarf2dbg.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
@@ -2333,15 +2337,8 @@ DEP_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \
$(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_sparc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h
-DEP_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
-DEP_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-DEP_tahoe_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \
+ dwarf2dbg.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 \
@@ -2349,25 +2346,21 @@ DEP_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \
+ dwarf2dbg.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
+ dwarf2dbg.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
-DEP_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_tic80_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h
DEP_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
@@ -2375,38 +2368,43 @@ DEP_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
$(INCDIR)/bfdlink.h
DEP_vax_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h
-DEP_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
-DEP_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_w65_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h
+ $(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
+ $(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
+ $(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-config.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
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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \
+ dwarf2dbg.h
DEP_hppa_som = $(BFDDIR)/som.h
DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \
$(DEP_i386_elf)
@@ -2420,11 +2418,10 @@ 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
-bignum-copy.o: bignum-copy.c $(INCDIR)/symcat.h
cond.o: cond.c $(INCDIR)/symcat.h macro.h sb.h $(INCDIR)/obstack.h
depend.o: depend.c $(INCDIR)/symcat.h
-dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/symcat.h dwarf2dbg.h \
- $(INCDIR)/filenames.h subsegs.h $(INCDIR)/obstack.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
@@ -2446,13 +2443,14 @@ input-scrub.o: input-scrub.c $(INCDIR)/symcat.h input-file.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)/safe-ctype.h sb.h macro.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
+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
diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in
index 67ed432b303e..4cc485f9683a 100644
--- a/contrib/binutils/gas/Makefile.in
+++ b/contrib/binutils/gas/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.8.4 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,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,8 +15,6 @@
@SET_MAKE@
-SOURCES = $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) $(itbl_test_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -47,14 +45,15 @@ DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub NEWS \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.in $(srcdir)/../mkinstalldirs \
$(srcdir)/gdbinit.in $(srcdir)/gdbinit.in \
- $(top_srcdir)/po/Make-in m68k-parse.c itbl-parse.c itbl-lex.c \
- $(srcdir)/../ylwrap $(srcdir)/../ltmain.sh \
- $(srcdir)/../config.guess $(srcdir)/../config.sub
+ $(top_srcdir)/po/Make-in m68k-parse.c bfin-parse.c \
+ itbl-parse.c itbl-lex.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)/../libtool.m4 $(top_srcdir)/../gettext.m4 \
- $(top_srcdir)/configure.in
+ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
+ $(top_srcdir)/../gettext.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 \
@@ -64,15 +63,15 @@ CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = gdb.ini .gdbinit po/Makefile.in
PROGRAMS = $(noinst_PROGRAMS)
am__objects_1 = app.$(OBJEXT) as.$(OBJEXT) atof-generic.$(OBJEXT) \
- bignum-copy.$(OBJEXT) cond.$(OBJEXT) depend.$(OBJEXT) \
- dwarf2dbg.$(OBJEXT) dw2gencfi.$(OBJEXT) ecoff.$(OBJEXT) \
- ehopt.$(OBJEXT) expr.$(OBJEXT) flonum-copy.$(OBJEXT) \
- flonum-konst.$(OBJEXT) flonum-mult.$(OBJEXT) frags.$(OBJEXT) \
- hash.$(OBJEXT) input-file.$(OBJEXT) input-scrub.$(OBJEXT) \
- listing.$(OBJEXT) literal.$(OBJEXT) macro.$(OBJEXT) \
- messages.$(OBJEXT) output-file.$(OBJEXT) read.$(OBJEXT) \
- sb.$(OBJEXT) stabs.$(OBJEXT) subsegs.$(OBJEXT) \
- symbols.$(OBJEXT) write.$(OBJEXT)
+ cond.$(OBJEXT) depend.$(OBJEXT) dwarf2dbg.$(OBJEXT) \
+ dw2gencfi.$(OBJEXT) ecoff.$(OBJEXT) ehopt.$(OBJEXT) \
+ expr.$(OBJEXT) flonum-copy.$(OBJEXT) flonum-konst.$(OBJEXT) \
+ flonum-mult.$(OBJEXT) frags.$(OBJEXT) hash.$(OBJEXT) \
+ input-file.$(OBJEXT) input-scrub.$(OBJEXT) listing.$(OBJEXT) \
+ literal.$(OBJEXT) macro.$(OBJEXT) messages.$(OBJEXT) \
+ output-file.$(OBJEXT) read.$(OBJEXT) sb.$(OBJEXT) \
+ stabs.$(OBJEXT) subsegs.$(OBJEXT) symbols.$(OBJEXT) \
+ write.$(OBJEXT)
am_as_new_OBJECTS = $(am__objects_1)
as_new_OBJECTS = $(am_as_new_OBJECTS)
am__DEPENDENCIES_1 = tc-@target_cpu_type@.o
@@ -103,8 +102,6 @@ LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
YLWRAP = $(top_srcdir)/../ylwrap
SOURCES = $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) \
$(itbl_test_SOURCES)
-DIST_SOURCES = $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) \
- $(itbl_test_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
@@ -173,6 +170,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
OPCODES_LIB = @OPCODES_LIB@
PACKAGE = @PACKAGE@
@@ -202,6 +200,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
atof = @atof@
bindir = @bindir@
build = @build@
@@ -211,6 +211,8 @@ build_os = @build_os@
build_vendor = @build_vendor@
cgen_cpu_prefix = @cgen_cpu_prefix@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
exec_prefix = @exec_prefix@
extra_objects = @extra_objects@
host = @host@
@@ -218,6 +220,7 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@@ -269,19 +272,19 @@ IT_OBJS = itbl-parse.o itbl-lex.o itbl-ops.o
# CPU types. This is only used for dependency information.
CPU_TYPES = \
- a29k \
alpha \
arc \
arm \
avr \
+ bfin \
cris \
+ crx \
d10v \
d30v \
dlx \
fr30 \
frv \
h8300 \
- h8500 \
hppa \
ia64 \
i370 \
@@ -289,10 +292,10 @@ CPU_TYPES = \
i860 \
i960 \
ip2k \
+ m32c \
m32r \
m68hc11 \
m68k \
- m88k \
mcore \
mips \
mmix \
@@ -309,16 +312,15 @@ CPU_TYPES = \
sh \
sh64 \
sparc \
- tahoe \
tic30 \
tic4x \
tic54x \
- tic80 \
vax \
- w65 \
v850 \
xstormy16 \
+ xc16x \
xtensa \
+ z80 \
z8k
@@ -326,14 +328,11 @@ CPU_TYPES = \
# We deliberately omit SOM, since it does not work as a cross assembler.
OBJ_FORMATS = \
aout \
- bout \
coff \
ecoff \
elf \
evax \
- hp300 \
- ieee \
- vms
+ ieee
# This is an sh case which sets valid according to whether the CPU
@@ -345,13 +344,9 @@ CPU_OBJ_VALID = \
case $$o in \
aout) \
case $$c in \
- a29k | arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tahoe | tic30 | vax) \
+ arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tic30 | vax) \
valid=yes ;; \
esac ;; \
- bout) \
- case $$c in \
- i960) valid=yes ;; \
- esac ;; \
coff) valid=yes; \
case $$c in \
cris | i860 | mmix | sh64) \
@@ -366,10 +361,6 @@ CPU_OBJ_VALID = \
case $$c in \
alpha) valid=yes ;; \
esac ;; \
- hp300) \
- case $$c in \
- m68k) valid=yes ;; \
- esac ;; \
vms) \
case $$c in \
vax) valid=yes ;; \
@@ -403,7 +394,6 @@ GAS_CFILES = \
app.c \
as.c \
atof-generic.c \
- bignum-copy.c \
cond.c \
depend.c \
dwarf2dbg.c \
@@ -447,6 +437,7 @@ HFILES = \
frags.h \
hash.h \
input-file.h \
+ itbl-lex.h \
itbl-ops.h \
listing.h \
macro.h \
@@ -463,19 +454,19 @@ HFILES = \
# CPU files in config.
TARGET_CPU_CFILES = \
- config/tc-a29k.c \
config/tc-alpha.c \
config/tc-arc.c \
config/tc-arm.c \
config/tc-avr.c \
+ config/tc-bfin.c \
config/tc-cris.c \
+ config/tc-crx.c \
config/tc-d10v.c \
config/tc-d30v.c \
config/tc-dlx.c \
config/tc-fr30.c \
config/tc-frv.c \
config/tc-h8300.c \
- config/tc-h8500.c \
config/tc-hppa.c \
config/tc-ia64.c \
config/tc-i370.c \
@@ -483,10 +474,10 @@ TARGET_CPU_CFILES = \
config/tc-i860.c \
config/tc-i960.c \
config/tc-ip2k.c \
+ config/tc-m32c.c \
config/tc-m32r.c \
config/tc-m68hc11.c \
config/tc-m68k.c \
- config/tc-m88k.c \
config/tc-mcore.c \
config/tc-mips.c \
config/tc-mmix.c \
@@ -503,31 +494,30 @@ TARGET_CPU_CFILES = \
config/tc-sh.c \
config/tc-sh64.c \
config/tc-sparc.c \
- config/tc-tahoe.c \
config/tc-tic30.c \
config/tc-tic54x.c \
- config/tc-tic80.c \
config/tc-vax.c \
- config/tc-w65.c \
config/tc-v850.c \
config/tc-xstormy16.c \
+ config/tc-xc16x.c \
config/tc-xtensa.c \
+ config/tc-z80.c \
config/tc-z8k.c
TARGET_CPU_HFILES = \
- config/tc-a29k.h \
config/tc-alpha.h \
config/tc-arc.h \
config/tc-arm.h \
config/tc-avr.h \
+ config/tc-bfin.h \
config/tc-cris.h \
+ config/tc-crx.h \
config/tc-d10v.h \
config/tc-d30v.h \
config/tc-dlx.h \
config/tc-fr30.h \
config/tc-frv.h \
config/tc-h8300.h \
- config/tc-h8500.h \
config/tc-hppa.h \
config/tc-ia64.h \
config/tc-i370.h \
@@ -535,10 +525,10 @@ TARGET_CPU_HFILES = \
config/tc-i860.h \
config/tc-i960.h \
config/tc-ip2k.h \
+ config/tc-m32c.h \
config/tc-m32r.h \
config/tc-m68hc11.h \
config/tc-m68k.h \
- config/tc-m88k.h \
config/tc-mcore.h \
config/tc-mips.h \
config/tc-mmix.h \
@@ -555,47 +545,41 @@ TARGET_CPU_HFILES = \
config/tc-sh.h \
config/tc-sh64.h \
config/tc-sparc.h \
- config/tc-tahoe.h \
config/tc-tic30.h \
config/tc-tic54x.h \
- config/tc-tic80.h \
config/tc-vax.h \
- config/tc-w65.h \
config/tc-v850.h \
config/tc-xstormy16.h \
+ config/tc-xc16x.h \
config/tc-xtensa.h \
+ config/tc-z80.h \
config/tc-z8k.h
# OBJ files in config
OBJ_FORMAT_CFILES = \
config/obj-aout.c \
- config/obj-bout.c \
config/obj-coff.c \
config/obj-ecoff.c \
config/obj-elf.c \
config/obj-evax.c \
- config/obj-hp300.c \
config/obj-ieee.c \
- config/obj-som.c \
- config/obj-vms.c
+ config/obj-som.c
OBJ_FORMAT_HFILES = \
config/obj-aout.h \
- config/obj-bout.h \
config/obj-coff.h \
config/obj-ecoff.h \
config/obj-elf.h \
config/obj-evax.h \
- config/obj-hp300.h \
config/obj-ieee.h \
- config/obj-som.h \
- config/obj-vms.h
+ config/obj-som.h
# Emulation header files in config
TARG_ENV_HFILES = \
config/te-386bsd.h \
+ config/te-armlinuxeabi.h \
config/te-aux.h \
config/te-delta.h \
config/te-delt88.h \
@@ -604,7 +588,6 @@ TARG_ENV_HFILES = \
config/te-epoc-pe.h \
config/te-generic.h \
config/te-go32.h \
- config/te-hp300.h \
config/te-hppa.h \
config/te-hppa64.h \
config/te-hppalinux64.h \
@@ -618,15 +601,15 @@ TARG_ENV_HFILES = \
config/te-macos.h \
config/te-nbsd.h \
config/te-nbsd532.h \
+ config/te-netware.h \
config/te-pc532mach.h \
config/te-pe.h \
- config/te-ppcnw.h \
config/te-psos.h \
config/te-riscix.h \
config/te-sparcaout.h \
config/te-sun3.h \
config/te-svr4.h \
- config/te-sysv32.h \
+ config/te-symbian.h \
config/te-tmips.h
@@ -650,7 +633,6 @@ GENERIC_OBJS = \
app.o \
as.o \
atof-generic.o \
- bignum-copy.o \
cond.o \
depend.o \
dwarf2dbg.o \
@@ -680,11 +662,13 @@ GENERIC_OBJS = \
OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
POTFILES = $(MULTI_CFILES) $(TARGET_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
$(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
- $(HFILES) $(CFILES) $(GAS_CFILES)
+ $(HFILES) $(CFILES)
noinst_SCRIPTS = $(GDBINIT)
EXTRA_SCRIPTS = .gdbinit
-EXTRA_DIST = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
+EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \
+ bfin-parse.c bfin-parse.h bfin-lex.c
+
DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
# Now figure out from those variables how to compile and link.
@@ -697,14 +681,14 @@ 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="\"$(prefix)/share/locale\""
+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\""
# 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="\"$(prefix)/share/locale\""
-DEP_FLAGS = -DBFD_ASSEMBLER -DOBJ_MAYBE_ELF \
+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_FLAGS = -DOBJ_MAYBE_ELF \
-I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES)
@@ -721,18 +705,12 @@ as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
$(extra_objects) $(GASLIBS) $(INTLDEPS)
-EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
- echo $${rootme}/../expect/expect ; \
- else echo expect ; fi`
-
-RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
- echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
- fi`
-
+EXPECT = expect
+RUNTEST = runtest
RUNTESTFLAGS =
# The m68k operand parser.
-EXTRA_as_new_SOURCES = config/m68k-parse.y
+EXTRA_as_new_SOURCES = config/m68k-parse.y config/bfin-parse.y
itbl_test_SOURCES = itbl-parse.y itbl-lex.l
itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
@@ -740,7 +718,7 @@ itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
CGEN_CPU_PREFIX = @cgen_cpu_prefix@
# Remake the info files.
-MOSTLYCLEANFILES = $(STAGESTUFF) core stamp-mk.com \
+MOSTLYCLEANFILES = $(STAGESTUFF) core \
testsuite/*.o testsuite/*.out testsuite/gas.log testsuite/gas.sum \
testsuite/site.exp site.bak site.exp stage stage1 stage2
@@ -749,33 +727,19 @@ against = stage2
DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
$(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES)
-CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
+CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt
AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
-DEPTC_a29k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
-
-DEPTC_a29k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/a29k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
-
-DEPTC_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
-
DEPTC_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
- $(srcdir)/config/atof-vax.c
+ 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 $(INCDIR)/safe-ctype.h \
- $(srcdir)/config/atof-vax.c
+ 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 \
@@ -788,8 +752,8 @@ DEPTC_alpha_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
DEPTC_alpha_evax = $(INCDIR)/symcat.h $(srcdir)/config/obj-evax.h \
$(srcdir)/config/tc-alpha.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
- $(srcdir)/config/atof-vax.c
+ 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_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \
@@ -801,25 +765,27 @@ DEPTC_arc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_arc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \
- struc-symbol.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/arc.h $(srcdir)/../opcodes/arc-ext.h \
- $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+ 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)/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)/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)/elf/arm.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.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 \
@@ -829,9 +795,27 @@ DEPTC_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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 \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
@@ -840,8 +824,20 @@ DEPTC_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
DEPTC_cris_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/cris.h dwarf2dbg.h
+ 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 \
+ $(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 \
@@ -874,35 +870,38 @@ DEPTC_dlx_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.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 $(INCDIR)/opcode/dlx.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.h $(srcdir)/../opcodes/fr30-opc.h \
- cgen.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/fr30-opc.h cgen.h
+ 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.h \
- $(srcdir)/../opcodes/frv-opc.h cgen.h $(BFDDIR)/libbfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.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/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.h $(srcdir)/../opcodes/frv-opc.h \
- cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.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 \
@@ -913,21 +912,9 @@ DEPTC_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \
- subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/h8300.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h \
- $(INCDIR)/safe-ctype.h
-
-DEPTC_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h \
- $(INCDIR)/safe-ctype.h
-
DEPTC_hppa_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
@@ -961,38 +948,36 @@ DEPTC_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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
+ 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)/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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.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_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \
- $(srcdir)/config/tc-i960.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/i960.h
-
DEPTC_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 \
@@ -1001,36 +986,60 @@ DEPTC_i960_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+ dwarf2dbg.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.h \
- $(srcdir)/../opcodes/ip2k-opc.h cgen.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.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 \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/ip2k-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/ip2k-opc.h \
- cgen.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/libbfd.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)/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 \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
- cgen.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_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/m32r-opc.h cgen.h
+ 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 \
@@ -1042,8 +1051,8 @@ DEPTC_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h $(INCDIR)/elf/m68hc11.h \
+ dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/m68hc11.h $(INCDIR)/elf/m68hc11.h \
$(INCDIR)/elf/reloc-macros.h
DEPTC_m68k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
@@ -1067,24 +1076,6 @@ DEPTC_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(srcdir)/config/m68k-parse.h $(INCDIR)/elf/m68k.h \
$(INCDIR)/elf/reloc-macros.h
-DEPTC_m68k_hp300 = $(INCDIR)/symcat.h $(srcdir)/config/obj-hp300.h \
- $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/obstack.h subsegs.h dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
-
-DEPTC_m88k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
-
-DEPTC_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/config/m88k-opcode.h
-
DEPTC_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
@@ -1094,48 +1085,42 @@ DEPTC_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
+ 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_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
- ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-
DEPTC_mips_coff = $(INCDIR)/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 $(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)/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)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
DEPTC_mips_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \
$(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \
$(INCDIR)/coff/ecoff.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/opcode/mips.h itbl-ops.h \
- dwarf2dbg.h $(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
+ 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 \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h $(INCDIR)/elf/mips.h \
- $(INCDIR)/elf/reloc-macros.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.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 \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
DEPTC_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \
- $(INCDIR)/safe-ctype.h dwarf2dbg.h
+ $(INCDIR)/safe-ctype.h
DEPTC_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \
@@ -1145,7 +1130,7 @@ DEPTC_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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 \
@@ -1157,18 +1142,18 @@ DEPTC_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/mn10300.h dwarf2dbg.h
+ 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
+ $(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 \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/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 \
@@ -1183,20 +1168,21 @@ DEPTC_ns32k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \
- $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
+ 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.h \
- $(srcdir)/../opcodes/openrisc-opc.h cgen.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 \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/openrisc-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/openrisc-opc.h \
- cgen.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 \
@@ -1207,7 +1193,7 @@ DEPTC_or32_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.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 $(INCDIR)/opcode/or32.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 \
@@ -1222,7 +1208,7 @@ DEPTC_pdp11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.h
+ 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 \
@@ -1232,7 +1218,7 @@ DEPTC_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pj.h
+ 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 \
@@ -1243,9 +1229,9 @@ DEPTC_ppc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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 dwarf2dbg.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 \
@@ -1257,22 +1243,24 @@ DEPTC_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
- $(INCDIR)/opcode/s390.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.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)/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/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 \
@@ -1280,7 +1268,8 @@ DEPTC_sh64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.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
+ $(srcdir)/../opcodes/sh-opc.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 \
@@ -1297,24 +1286,9 @@ DEPTC_sparc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ 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 \
- dwarf2dbg.h
-
-DEPTC_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
-
-DEPTC_tahoe_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
-
-DEPTC_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
+ $(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 \
@@ -1328,7 +1302,7 @@ DEPTC_tic30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic30.h
+ 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 \
@@ -1339,7 +1313,7 @@ DEPTC_tic4x_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.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 $(INCDIR)/opcode/tic4x.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 \
@@ -1356,49 +1330,23 @@ DEPTC_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(BFDDIR)/libcoff.h
-DEPTC_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic80.h
-
-DEPTC_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic80.h
-
DEPTC_vax_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \
- $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.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)/opcode/vax.h \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/obstack.h subsegs.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 \
- $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \
- $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/vax.h \
- $(INCDIR)/safe-ctype.h
-
-DEPTC_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \
- $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \
- $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/vax.h \
- $(INCDIR)/safe-ctype.h
-
-DEPTC_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
-
-DEPTC_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
+ dwarf2dbg.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \
+ subsegs.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 \
@@ -1409,31 +1357,50 @@ DEPTC_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \
- dwarf2dbg.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
DEPTC_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/xstormy16-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/xstormy16-opc.h cgen.h
+ $(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 \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/xstormy16-opc.h \
- cgen.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-config.h sb.h $(INCDIR)/safe-ctype.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/xtensa-relax.h \
- $(INCDIR)/xtensa-isa.h $(srcdir)/config/xtensa-istack.h \
+ $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-config.h sb.h \
+ $(INCDIR)/safe-ctype.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 \
@@ -1442,7 +1409,7 @@ DEPTC_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPTC_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \
- $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h
+ dwarf2dbg.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 \
@@ -1455,21 +1422,6 @@ DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \
$(DEPTC_mips_elf)
DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf)
-DEPOBJ_a29k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-
-DEPOBJ_a29k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/a29k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-
-DEPOBJ_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-
DEPOBJ_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1499,8 +1451,8 @@ DEPOBJ_arc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1525,8 +1477,19 @@ DEPOBJ_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1535,8 +1498,19 @@ DEPOBJ_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
DEPOBJ_cris_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1568,8 +1542,8 @@ DEPOBJ_dlx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1579,8 +1553,8 @@ DEPOBJ_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1601,19 +1575,8 @@ DEPOBJ_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-
-DEPOBJ_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-
-DEPOBJ_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1649,8 +1612,8 @@ DEPOBJ_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/reloc-macros.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 \
@@ -1665,17 +1628,15 @@ DEPOBJ_i386_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_i386_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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_i860_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-
-DEPOBJ_i960_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \
- $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.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 \
@@ -1685,8 +1646,8 @@ DEPOBJ_i960_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1696,8 +1657,19 @@ DEPOBJ_ip2k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
+ $(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 \
@@ -1707,8 +1679,8 @@ DEPOBJ_m32r_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1718,8 +1690,8 @@ DEPOBJ_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1736,22 +1708,6 @@ DEPOBJ_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/symcat.h \
- $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-
-DEPOBJ_m88k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-
-DEPOBJ_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- 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 \
@@ -1760,12 +1716,8 @@ DEPOBJ_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-
-DEPOBJ_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+ 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 \
@@ -1788,8 +1740,8 @@ DEPOBJ_mips_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
DEPOBJ_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1799,8 +1751,8 @@ DEPOBJ_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1810,8 +1762,8 @@ DEPOBJ_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1821,8 +1773,8 @@ DEPOBJ_msp430_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1836,8 +1788,8 @@ DEPOBJ_ns32k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1847,8 +1799,8 @@ DEPOBJ_openrisc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1858,8 +1810,8 @@ DEPOBJ_or32_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1873,8 +1825,8 @@ DEPOBJ_pdp11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1884,8 +1836,8 @@ DEPOBJ_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1895,8 +1847,8 @@ DEPOBJ_ppc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.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 \
@@ -1907,8 +1859,8 @@ DEPOBJ_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1940,23 +1892,8 @@ DEPOBJ_sparc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-
-DEPOBJ_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-
-DEPOBJ_tahoe_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-
-DEPOBJ_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1970,8 +1907,8 @@ DEPOBJ_tic30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1981,8 +1918,8 @@ DEPOBJ_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -1995,17 +1932,6 @@ DEPOBJ_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-
-DEPOBJ_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- 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
@@ -2018,24 +1944,8 @@ DEPOBJ_vax_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-
-DEPOBJ_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \
- $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h subsegs.h \
- $(INCDIR)/obstack.h
-
-DEPOBJ_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-
-DEPOBJ_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -2045,9 +1955,9 @@ DEPOBJ_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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 $(INCDIR)/safe-ctype.h \
- subsegs.h $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h \
- $(INCDIR)/aout/aout64.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 \
@@ -2057,14 +1967,32 @@ DEPOBJ_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.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-config.h $(INCDIR)/safe-ctype.h subsegs.h \
- $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
@@ -2074,8 +2002,8 @@ DEPOBJ_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
DEPOBJ_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+ dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/aout/aout64.h
DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \
$(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \
@@ -2088,17 +2016,6 @@ DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \
$(DEPOBJ_mips_elf)
DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf)
-DEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
-
-DEP_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-
-DEP_a29k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h
-
DEP_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
@@ -2117,7 +2034,8 @@ DEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
DEP_arc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \
+ dwarf2dbg.h
DEP_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@@ -2136,14 +2054,34 @@ DEP_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
DEP_avr_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h
+ $(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
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
+ $(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 \
@@ -2167,7 +2105,8 @@ DEP_dlx_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.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
+ $(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 \
@@ -2175,7 +2114,8 @@ DEP_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
DEP_fr30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h
+ $(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 \
@@ -2191,15 +2131,8 @@ DEP_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
DEP_h8300_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h
-
-DEP_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-
-DEP_h8500_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h
+ $(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 \
@@ -2227,7 +2160,8 @@ DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
DEP_i370_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \
+ dwarf2dbg.h
DEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@@ -2238,20 +2172,22 @@ DEP_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
DEP_i386_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h
+ $(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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \
+ dwarf2dbg.h
-DEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h
DEP_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \
$(INCDIR)/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
+ $(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 \
@@ -2259,7 +2195,17 @@ DEP_ip2k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ip2k.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
+ $(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 \
@@ -2267,7 +2213,8 @@ DEP_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
DEP_m32r_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h
+ $(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 \
@@ -2275,7 +2222,8 @@ DEP_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
DEP_m68hc11_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
+ dwarf2dbg.h
DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@@ -2288,27 +2236,14 @@ DEP_m68k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h
-DEP_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
-
-DEP_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-
-DEP_m88k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h
-
DEP_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h \
$(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_mcore_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h
-
-DEP_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
+ dwarf2dbg.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 \
@@ -2323,7 +2258,8 @@ DEP_mips_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(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 \
@@ -2331,7 +2267,8 @@ DEP_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
DEP_mn10200_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h
+ $(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 \
@@ -2339,7 +2276,8 @@ DEP_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \
DEP_mn10300_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h
+ $(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 \
@@ -2347,7 +2285,8 @@ DEP_msp430_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-msp430.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h \
+ dwarf2dbg.h
DEP_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@@ -2358,7 +2297,8 @@ DEP_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
DEP_ns32k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h
+ $(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 \
@@ -2366,7 +2306,8 @@ DEP_openrisc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-openrisc.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \
+ dwarf2dbg.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 \
@@ -2374,7 +2315,8 @@ DEP_or32_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h \
+ dwarf2dbg.h
DEP_pdp11_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-pdp11.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@@ -2385,7 +2327,8 @@ DEP_pdp11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pdp11.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
+ $(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 \
@@ -2393,7 +2336,8 @@ DEP_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
DEP_pj_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
+ dwarf2dbg.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 \
@@ -2401,7 +2345,8 @@ DEP_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.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
+ $(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 \
@@ -2409,7 +2354,8 @@ DEP_s390_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-s390.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
+ dwarf2dbg.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 \
@@ -2434,18 +2380,8 @@ DEP_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \
DEP_sparc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h
-
-DEP_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
-
-DEP_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-
-DEP_tahoe_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \
+ dwarf2dbg.h
DEP_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@@ -2456,7 +2392,8 @@ DEP_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \
DEP_tic30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \
+ dwarf2dbg.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 \
@@ -2464,7 +2401,8 @@ DEP_tic4x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
+ dwarf2dbg.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 \
@@ -2474,14 +2412,6 @@ DEP_tic54x_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h
-DEP_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-
-DEP_tic80_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h
-
DEP_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@@ -2491,18 +2421,8 @@ DEP_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
DEP_vax_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h
-
-DEP_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
-
-DEP_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-
-DEP_w65_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
- $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h
+ $(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 \
@@ -2511,7 +2431,7 @@ DEP_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
DEP_v850_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.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 \
@@ -2519,12 +2439,26 @@ DEP_xstormy16_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-xstormy16.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
+ $(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-config.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
DEP_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h \
@@ -2532,7 +2466,8 @@ DEP_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \
+ dwarf2dbg.h
DEP_hppa_som = $(BFDDIR)/som.h
DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \
@@ -2658,7 +2593,13 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @set fnord $$MAKEFLAGS; amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -2670,7 +2611,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -2678,7 +2619,13 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $$MAKEFLAGS; amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -2699,7 +2646,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -2733,7 +2680,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && \
+ test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
@@ -2744,7 +2691,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -z "$$unique" && unique=$$empty_fix; \
+ test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
@@ -2822,15 +2769,16 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f $(CONFIG_CLEAN_FILES)
+ -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"
@echo "it deletes files that may require special tools to rebuild."
- -rm -f m68k-parse.c
+ -rm -f bfin-parse.c
-rm -f itbl-lex.c
-rm -f itbl-parse.c
+ -rm -f m68k-parse.c
clean: clean-recursive
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
@@ -2905,12 +2853,8 @@ po/POTFILES.in: @MAINT@ Makefile
for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
-$(srcdir)/make-gas.com: stamp-mk.com
-stamp-mk.com: vmsconf.sh Makefile
- sh $(srcdir)/vmsconf.sh $(GENERIC_OBJS) > new-make.com
- $(SHELL) $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
- touch stamp-mk.com
diststuff: $(EXTRA_DIST) info
+all: info
$(OBJS): @ALL_OBJ_DEPS@
@@ -2933,10 +2877,6 @@ check-DEJAGNU: site.exp
rootme=`pwd`; export rootme; \
srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
EXPECT=${EXPECT} ; export EXPECT ; \
- if [ -f $(top_builddir)/../expect/expect ]; then \
- TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
- export TCL_LIBRARY; \
- fi; \
runtest=$(RUNTEST); \
cd testsuite; \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
@@ -2963,8 +2903,6 @@ ecoff.o : ecoff.c ecoff.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
obj-aout.o : $(srcdir)/config/obj-aout.c
$(COMPILE) -c $(srcdir)/config/obj-aout.c
-obj-bout.o : $(srcdir)/config/obj-bout.c
- $(COMPILE) -c $(srcdir)/config/obj-bout.c
obj-coff.o: $(srcdir)/config/obj-coff.c
$(COMPILE) -c $(srcdir)/config/obj-coff.c
obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
@@ -2973,16 +2911,12 @@ obj-elf.o : $(srcdir)/config/obj-elf.c
$(COMPILE) -c $(srcdir)/config/obj-elf.c
obj-evax.o : $(srcdir)/config/obj-evax.c
$(COMPILE) -c $(srcdir)/config/obj-evax.c
-obj-hp300.o : $(srcdir)/config/obj-hp300.c
- $(COMPILE) -c $(srcdir)/config/obj-hp300.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
$(COMPILE) -c $(srcdir)/config/obj-som.c
-obj-vms.o : $(srcdir)/config/obj-vms.c
- $(COMPILE) -c $(srcdir)/config/obj-vms.c
e-mipself.o : $(srcdir)/config/e-mipself.c
$(COMPILE) -c $(srcdir)/config/e-mipself.c
@@ -3020,27 +2954,51 @@ m68k-parse.c: $(srcdir)/config/m68k-parse.y
cp config/m68k-parse.y . >/dev/null 2>/dev/null; \
f=m68k-parse.y; \
else true; fi; \
- $(SHELL) $(YLWRAP) "$(YACC)" $$f y.tab.c m68k-parse.c --; \
+ $(SHELL) $(YLWRAP) $$f y.tab.c m68k-parse.c -- $(YACCCOMPILE); \
if [ $$f = "m68k-parse.y" ]; then \
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.
m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
+ $(COMPILE) -c $< $(NO_WERROR)
# Don't let the .y.h rule clobber m68k-parse.h.
m68k-parse.h: ; @true
$(srcdir)/config/m68k-parse.h: ; @true
+bfin-parse.c: $(srcdir)/config/bfin-parse.y
+ $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ;
+bfin-parse.h: bfin-parse.c
+bfin-parse.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
+
+bfin-defs.h: ; @true
+$(srcdir)/config/bfin-defs.h: ; @true
+
+bfin-lex.c: $(srcdir)/config/bfin-lex.l
+ $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE)
+bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h
+ $(COMPILE) -c $< $(NO_WERROR)
+
# The instruction table specification lexical analyzer and parser.
itbl-lex.c: $(srcdir)/itbl-lex.l
-itbl-lex.o: itbl-lex.c itbl-parse.h
-itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h
+# Disable -Werror, if it has been enabled, since old versions of bison/
+# 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.
+itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h
+ $(COMPILE) -c $< $(NO_WERROR)
itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
- $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- -d
+ $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d
itbl-tops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
$(COMPILE) -o itbl-tops.o -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
@@ -3053,6 +3011,35 @@ cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \
$(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-desc.h \
$(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-opc.h
+.PHONY: install-html install-html-am install-html-recursive
+
+install-html: install-html-recursive
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
.PHONY: install-exec-local install-data-local
.PHONY: install-exec-bindir install-exec-tooldir
@@ -3337,11 +3324,10 @@ 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
-bignum-copy.o: bignum-copy.c $(INCDIR)/symcat.h
cond.o: cond.c $(INCDIR)/symcat.h macro.h sb.h $(INCDIR)/obstack.h
depend.o: depend.c $(INCDIR)/symcat.h
-dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/symcat.h dwarf2dbg.h \
- $(INCDIR)/filenames.h subsegs.h $(INCDIR)/obstack.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
@@ -3363,13 +3349,14 @@ input-scrub.o: input-scrub.c $(INCDIR)/symcat.h input-file.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)/safe-ctype.h sb.h macro.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
+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
diff --git a/contrib/binutils/gas/NEWS b/contrib/binutils/gas/NEWS
index 1a31e79f560d..4b4d029685ab 100644
--- a/contrib/binutils/gas/NEWS
+++ b/contrib/binutils/gas/NEWS
@@ -1,5 +1,75 @@
-*- text -*-
+* Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
+
+* Support for ms2 architecture has been added.
+
+* Support for the Z80 processor family has been added.
+
+* Add support for the "@<file>" syntax to the command line, so that extra
+ switches can be read from <file>.
+
+* The SH target supports a new command line switch --enable-reg-prefix which,
+ if enabled, will allow register names to be optionally prefixed with a $
+ character. This allows register names to be distinguished from label names.
+
+* Macros with a variable number of arguments are now supported. See the
+ documentation for how this works.
+
+* Added --reduce-memory-overheads switch to reduce the size of the hash
+ tables used, at the expense of longer assembly times, and
+ --hash-size=<NUMBER> to set the size of the hash tables used by gas.
+
+* Macro names and macro parameter names can now be any identifier that would
+ also be legal as a symbol elsewhere. For macro parameter names, this is
+ known to cause problems in certain sources when the respective target uses
+ characters inconsistently, and thus macro parameter references may no longer
+ be recognized as such (see the documentation for details).
+
+* Support the .f_floating, .d_floating, .g_floating and .h_floating directives
+ for the VAX target in order to be more compatible with the VAX MACRO
+ assembler.
+
+* New command line option -mtune=[itanium1|itanium2] for IA64 targets.
+
+Changes in 2.16:
+
+* Redefinition of macros now results in an error.
+
+* New command line option -mhint.b=[ok|warning|error] for IA64 targets.
+
+* New command line option -munwind-check=[warning|error] for IA64
+ targets.
+
+* The IA64 port now uses automatic dependency violation removal as its default
+ mode.
+
+* Port to MAXQ processor contributed by HCL Tech.
+
+* Added support for generating unwind tables for ARM ELF targets.
+
+* Add a -g command line option to generate debug information in the target's
+ preferred debug format.
+
+* Support for the crx-elf target added.
+
+* Support for the sh-symbianelf target added.
+
+* Added a pseudo-op (.secrel32) to generate 32 bit section relative relocations
+ on pe[i]-i386; required for this target's DWARF 2 support.
+
+* Support for Motorola MCF521x/5249/547x/548x added.
+
+* Support for ColdFire EMAC instructions added and Motorola syntax for MAC/EMAC
+ instrucitons.
+
+* New command line option -mno-shared for MIPS ELF targets.
+
+* New command line option --alternate and pseudo-ops .altmacro and .noaltmacro
+ added to enter (and leave) alternate macro syntax mode.
+
+Changes in 2.15:
+
* The MIPS -membedded-pic option (Embedded-PIC code generation) is
deprecated and will be removed in a future release.
diff --git a/contrib/binutils/gas/README b/contrib/binutils/gas/README
index 790539582b2c..c249fd97fd32 100644
--- a/contrib/binutils/gas/README
+++ b/contrib/binutils/gas/README
@@ -57,14 +57,6 @@ facility to list all supported host and target names or aliases.
abbreviations to full names; you can read the script, if you wish, or
you can use it to test your guesses on abbreviations--for example:
- % sh config.sub sun4
- sparc-sun-sunos411
- % sh config.sub sun3
- m68k-sun-sunos411
- % sh config.sub decstation
- mips-dec-ultrix42
- % sh config.sub hp300bsd
- m68k-hp-bsd
% sh config.sub i386v
i386-unknown-sysv
% sh config.sub i786v
@@ -139,75 +131,6 @@ The `--enable' options recognized by software in the gas distribution are:
been done, it's already the default. So generally you won't need to use
this option.
-Supported platforms
-===================
-
-At this point I believe gas to be ANSI only code for most target cpu's. That
-is, there should be relatively few, if any host system dependencies. So
-porting (as a cross-assembler) to hosts not yet supported should be fairly
-easy. Porting to a new target shouldn't be too tough if it's a variant of one
-already supported.
-
-Native assembling should work on:
-
- sun3
- sun4
- 386bsd
- bsd/386
- delta (m68k-sysv from Motorola)
- delta88 (m88k-sysv from Motorola)
- GNU/linux
- m68k hpux 8.0 (hpux 7.0 may be a problem)
- vax bsd, ultrix, vms
- hp9000s300
- decstation
- irix 4
- irix 5
- miniframe (m68k-sysv from Convergent Technologies)
- i386-aix (ps/2)
- hppa (hpux 4.3bsd, osf1)
- AIX
- unixware
- sco 3.2v4.2
- sco openserver 5.0 (a.k.a. 3.2v5.0 )
- sparc solaris
- ns32k (netbsd, lites)
-
-I believe that gas as a cross-assembler can currently be targeted for
-most of the above hosts, plus
-
- arm
- decstation-bsd (a.out format, to be used in BSD 4.4)
- ebmon29k
- go32 (DOS on i386, with DJGPP -- old a.out version)
- H8/300, H8/500 (Hitachi)
- i386-aix (ps/2)
- i960-coff
- mips ecoff (decstation-ultrix, iris, mips magnum, mips-idt-ecoff)
- Mitsubishi d10v and d30v
- nindy960
- powerpc EABI
- SH (Hitachi)
- sco386
- TI tic30 and tic80
- vax bsd or ultrix?
- vms
- vxworks68k
- vxworks960
- z8000 (Zilog)
-
-MIPS ECOFF support has been added, but GAS will not run a C-style
-preprocessor. If you want that, rename your file to have a ".S" suffix, and
-run gcc on it. Or run "gcc -xassembler-with-cpp foo.s".
-
-Support for ELF should work now for sparc, hppa, i386, alpha, m68k,
-MIPS, powerpc.
-
-Support for sequent (ns32k), tahoe, i860 may be suffering from bitrot.
-
-If you try out gas on some host or target not listed above, please let me know
-the results, so I can update the list.
-
Compiler Support Hacks
======================
diff --git a/contrib/binutils/gas/acinclude.m4 b/contrib/binutils/gas/acinclude.m4
index 4a3ccf358bdd..0946e724f126 100644
--- a/contrib/binutils/gas/acinclude.m4
+++ b/contrib/binutils/gas/acinclude.m4
@@ -1,3 +1,5 @@
+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)
diff --git a/contrib/binutils/gas/aclocal.m4 b/contrib/binutils/gas/aclocal.m4
index c5ef088d3d2d..cd4267338b72 100644
--- a/contrib/binutils/gas/aclocal.m4
+++ b/contrib/binutils/gas/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.8.4 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 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.
@@ -11,55 +11,32 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# -*- Autoconf -*-
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-# Generated from amversion.in; do not edit by hand.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# Copyright (C) 2002, 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.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# 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.8.4])])
-
-# AM_AUX_DIR_EXPAND
+ [AM_AUTOMAKE_VERSION([1.9.6])])
-# Copyright (C) 2001, 2003 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.
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# 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.
+# Copyright (C) 2001, 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.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
@@ -106,26 +83,16 @@ AC_PREREQ([2.50])dnl
am_aux_dir=`cd $ac_aux_dir && pwd`
])
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003 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.
+# AM_CONDITIONAL -*- Autoconf -*-
-# 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.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 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 6
+# serial 7
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
@@ -145,30 +112,19 @@ else
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.])
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
fi])])
-# serial 7 -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
+# serial 8
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -177,7 +133,6 @@ fi])])
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
@@ -317,26 +272,16 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])
])
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Generate code to set up dependency tracking. -*- Autoconf -*-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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
+#serial 3
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
@@ -355,27 +300,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
else
continue
fi
- grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # We invoke sed twice because it is the simplest approach to
- # changing $(DEPDIR) to its actual value in the expansion.
- for file in `sed -n '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
@@ -401,54 +340,31 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
-# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1996, 1997, 2000, 2001, 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 7
+# serial 8
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-# Do all the work for Automake. -*- Autoconf -*-
+# Do all the work for Automake. -*- Autoconf -*-
-# This macro actually does too much some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 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.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# serial 12
-# serial 11
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
@@ -506,7 +422,6 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
@@ -515,7 +430,9 @@ AC_REQUIRE([AM_PROG_MKDIR_P])dnl
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
@@ -549,51 +466,27 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+# Copyright (C) 2001, 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.
+
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# -*- Autoconf -*-
-# Copyright (C) 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# 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 1
+# serial 2
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
@@ -608,26 +501,14 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
-
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 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.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 4
+# serial 5
# AM_PROG_LEX
# -----------
@@ -641,28 +522,17 @@ if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi])
-# Add --enable-maintainer-mode option to configure.
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 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.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
+# serial 4
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
@@ -681,26 +551,15 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003 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.
+# Check to see how 'make' treats includes. -*- Autoconf -*-
-# 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.
+# Copyright (C) 2001, 2002, 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
+# serial 3
# AM_MAKE_INCLUDE()
# -----------------
@@ -744,27 +603,16 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
-# -*- Autoconf -*-
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+# Copyright (C) 1997, 1999, 2000, 2001, 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.
-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
+# serial 4
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -790,27 +638,16 @@ else
fi
])
+# Copyright (C) 2003, 2004, 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.
+
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
+#
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
@@ -831,13 +668,21 @@ fi
# this.)
AC_DEFUN([AM_PROG_MKDIR_P],
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # Keeping the `.' argument allows $(mkdir_p) to be used without
- # argument. Indeed, we sometimes output rules like
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined.
- # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
- # expensive solution, as it forces Make to start a sub-shell.)
- mkdir_p='mkdir -p -- .'
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
@@ -856,26 +701,15 @@ else
fi
AC_SUBST([mkdir_p])])
-# Helper functions for option handling. -*- Autoconf -*-
+# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2001, 2002, 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
+# serial 3
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -900,28 +734,16 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-#
-# Check to make sure that the build environment is sane.
-#
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1996, 1997, 2000, 2001, 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 3
+# serial 4
# AM_SANITY_CHECK
# ---------------
@@ -964,25 +786,14 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
-# AM_PROG_INSTALL_STRIP
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2001, 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.
+# AM_PROG_INSTALL_STRIP
+# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
@@ -1003,4 +814,100 @@ fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 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
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
m4_include([acinclude.m4])
diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c
index 1dbc49a8cd89..275ad68ebb0b 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, 2002, 2003
+ 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Modified by Allen Wirfs-Brock, Instantiations Inc 2/90. */
/* App, the assembler pre-processor. This pre-processor strips out excess
@@ -345,6 +345,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
char *fromend;
int fromlen;
register int ch, ch2 = 0;
+ /* Character that started the string we're working on. */
+ static char quotechar;
/*State 0: beginning of normal line
1: After first whitespace on line (flush more white)
@@ -374,6 +376,10 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
15: After seeing a `(' at state 1, looking for a `)' as
predicate.
#endif
+#ifdef TC_Z80
+ 16: After seeing an 'a' or an 'A' at the start of a symbol
+ 17: After seeing an 'f' or an 'F' in state 16
+#endif
*/
/* I added states 9 and 10 because the MIPS ECOFF assembler uses
@@ -536,11 +542,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
for (s = from; s < fromend; s++)
{
ch = *s;
- /* This condition must be changed if the type of any
- other character can be LEX_IS_STRINGQUOTE. */
if (ch == '\\'
- || ch == '"'
- || ch == '\''
+ || ch == quotechar
|| ch == '\n')
break;
}
@@ -558,12 +561,12 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
ch = GET ();
if (ch == EOF)
{
- as_warn (_("end of file in string; inserted '\"'"));
+ as_warn (_("end of file in string; '%c' inserted"), quotechar);
state = old_state;
UNGET ('\n');
- PUT ('"');
+ PUT (quotechar);
}
- else if (lex[ch] == LEX_IS_STRINGQUOTE)
+ else if (ch == quotechar)
{
state = old_state;
PUT (ch);
@@ -603,8 +606,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
continue;
case EOF:
- as_warn (_("end of file in string; '\"' inserted"));
- PUT ('"');
+ as_warn (_("end of file in string; '%c' inserted"), quotechar);
+ PUT (quotechar);
continue;
case '"':
@@ -638,10 +641,9 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
case 7:
ch = GET ();
+ quotechar = ch;
state = 5;
old_state = 8;
- if (ch == EOF)
- goto fromeof;
PUT (ch);
continue;
@@ -667,6 +669,32 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
PUT ('|');
continue;
#endif
+#ifdef TC_Z80
+ case 16:
+ /* We have seen an 'a' at the start of a symbol, look for an 'f'. */
+ ch = GET ();
+ if (ch == 'f' || ch == 'F')
+ {
+ state = 17;
+ PUT (ch);
+ }
+ else
+ {
+ state = 9;
+ break;
+ }
+ case 17:
+ /* We have seen "af" at the start of a symbol,
+ a ' here is a part of that symbol. */
+ ch = GET ();
+ state = 9;
+ if (ch == '\'')
+ /* Change to avoid warning about unclosed string. */
+ PUT ('`');
+ else
+ UNGET (ch);
+ break;
+#endif
}
/* OK, we are somewhere in states 0 through 4 or 9 through 11. */
@@ -975,6 +1003,7 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
break;
case LEX_IS_STRINGQUOTE:
+ quotechar = ch;
if (state == 10)
{
/* Preserve the whitespace in foo "bar". */
@@ -1243,6 +1272,30 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
break;
}
+#ifdef TC_Z80
+ /* "af'" is a symbol containing '\''. */
+ if (state == 3 && (ch == 'a' || ch == 'A'))
+ {
+ state = 16;
+ PUT (ch);
+ ch = GET ();
+ if (ch == 'f' || ch == 'F')
+ {
+ state = 17;
+ PUT (ch);
+ break;
+ }
+ else
+ {
+ state = 9;
+ if (!IS_SYMBOL_COMPONENT (ch))
+ {
+ UNGET (ch);
+ break;
+ }
+ }
+ }
+#endif
if (state == 3)
state = 9;
@@ -1282,26 +1335,11 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
if (len > 0)
{
PUT (ch);
- if (len > 8)
- {
- memcpy (to, from, len);
- to += len;
- from += len;
- }
- else
- {
- switch (len)
- {
- case 8: *to++ = *from++;
- case 7: *to++ = *from++;
- case 6: *to++ = *from++;
- case 5: *to++ = *from++;
- case 4: *to++ = *from++;
- case 3: *to++ = *from++;
- case 2: *to++ = *from++;
- case 1: *to++ = *from++;
- }
- }
+ memcpy (to, from, len);
+ to += len;
+ from += len;
+ if (to >= toend)
+ goto tofull;
ch = GET ();
}
}
diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c
index 0911aa1fa260..727a1dd40ee5 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
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Main program for AS; a 32-bit assembler of GNU.
Understands command arguments.
@@ -42,10 +42,8 @@
#include "macro.h"
#include "dwarf2dbg.h"
#include "dw2gencfi.h"
-
-#ifdef BFD_ASSEMBLER
+#include "hash.h"
#include "bfdver.h"
-#endif
#ifdef HAVE_ITBL_CPU
#include "itbl-ops.h"
@@ -89,11 +87,16 @@ int listing;
enum debug_info_type debug_type = DEBUG_UNSPECIFIED;
int use_gnu_debug_info_extensions = 0;
+#ifndef MD_DEBUG_FORMAT_SELECTOR
+#define MD_DEBUG_FORMAT_SELECTOR NULL
+#endif
+static enum debug_info_type (*md_debug_format_selector) (int *) = MD_DEBUG_FORMAT_SELECTOR;
+
/* Maximum level of macro nesting. */
int max_macro_nest = 100;
/* argv[0] */
-char * myname;
+static char * myname;
/* The default obstack chunk size. If we set this to zero, the
obstack code will use whatever will fit in a 4096 byte block. */
@@ -106,13 +109,11 @@ int debug_memory = 0;
/* Enable verbose mode. */
int verbose = 0;
-#ifdef BFD_ASSEMBLER
segT reg_section;
segT expr_section;
segT text_section;
segT data_section;
segT bss_section;
-#endif
/* Name of listing file. */
static char *listing_filename = NULL;
@@ -123,6 +124,8 @@ static struct itbl_file_list *itbl_files;
static long start_time;
+static int flag_macro_alternate;
+
#ifdef USE_EMULATIONS
#define EMULATION_ENVIRON "AS_EMULATION"
@@ -217,13 +220,8 @@ print_version_id (void)
return;
printed = 1;
-#ifdef BFD_ASSEMBLER
- fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"),
+ fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s\n"),
VERSION, TARGET_ALIAS, BFD_VERSION_STRING);
-#else
- fprintf (stderr, _("GNU assembler version %s (%s)"), VERSION, TARGET_ALIAS);
-#endif
- fprintf (stderr, "\n");
}
static void
@@ -245,6 +243,8 @@ Options:\n\
=FILE list to FILE (must be last sub-option)\n"));
fprintf (stream, _("\
+ --alternate initially turn on alternate macro syntax\n"));
+ fprintf (stream, _("\
-D produce assembler debugging messages\n"));
fprintf (stream, _("\
--defsym SYM=VAL define symbol SYM to given value\n"));
@@ -266,7 +266,7 @@ Options:\n\
emulate output (default %s)\n"), def_em);
}
#endif
-#if defined BFD_ASSEMBLER && (defined OBJ_ELF || defined OBJ_MAYBE_ELF)
+#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
fprintf (stream, _("\
--execstack require executable stack for this object\n"));
fprintf (stream, _("\
@@ -275,11 +275,15 @@ Options:\n\
fprintf (stream, _("\
-f skip whitespace and comment preprocessing\n"));
fprintf (stream, _("\
- --gstabs generate stabs debugging information\n"));
+ -g --gen-debug generate debugging information\n"));
+ fprintf (stream, _("\
+ --gstabs generate STABS debugging information\n"));
fprintf (stream, _("\
- --gstabs+ generate stabs debug info with GNU extensions\n"));
+ --gstabs+ generate STABS debug info with GNU extensions\n"));
fprintf (stream, _("\
- --gdwarf2 generate DWARF2 debugging information\n"));
+ --gdwarf-2 generate DWARF2 debugging information\n"));
+ fprintf (stream, _("\
+ --hash-size=<value> set the hash table size close to <value>\n"));
fprintf (stream, _("\
--help show this message and exit\n"));
fprintf (stream, _("\
@@ -303,6 +307,10 @@ Options:\n\
fprintf (stream, _("\
-R fold data section into text section\n"));
fprintf (stream, _("\
+ --reduce-memory-overheads \n\
+ prefer smaller memory use at the cost of longer\n\
+ assembly times\n"));
+ fprintf (stream, _("\
--statistics print various measured statistics from execution\n"));
fprintf (stream, _("\
--strip-local-absolute strip local absolute symbols\n"));
@@ -338,6 +346,8 @@ Options:\n\
fprintf (stream, _("\
--listing-cont-lines set the maximum number of continuation lines used\n\
for the output data column of the listing\n"));
+ fprintf (stream, _("\
+ @FILE read options from FILE\n"));
md_show_usage (stream);
@@ -374,7 +384,7 @@ parse_args (int * pargc, char *** pargv)
/* -K is not meaningful if .word is not being hacked. */
'K',
#endif
- 'L', 'M', 'R', 'W', 'Z', 'a', ':', ':', 'D', 'f', 'I', ':', 'o', ':',
+ 'L', 'M', 'R', 'W', 'Z', 'a', ':', ':', 'D', 'f', 'g', ':',':', 'I', ':', 'o', ':',
#ifndef VMS
/* -v takes an argument on VMS, so we don't make it a generic
option. */
@@ -407,59 +417,80 @@ parse_args (int * pargc, char *** pargv)
OPTION_DEPFILE,
OPTION_GSTABS,
OPTION_GSTABS_PLUS,
+ OPTION_GDWARF2,
OPTION_STRIP_LOCAL_ABSOLUTE,
OPTION_TRADITIONAL_FORMAT,
- OPTION_GDWARF2,
OPTION_WARN,
OPTION_TARGET_HELP,
OPTION_EXECSTACK,
OPTION_NOEXECSTACK,
+ OPTION_ALTERNATE,
+ OPTION_AL,
+ OPTION_HASH_TABLE_SIZE,
+ OPTION_REDUCE_MEMORY_OVERHEADS,
OPTION_WARN_FATAL
+ /* When you add options here, check that they do
+ not collide with OPTION_MD_BASE. See as.h. */
};
static const struct option std_longopts[] =
{
- {"help", no_argument, NULL, OPTION_HELP},
- /* getopt allows abbreviations, so we do this to stop it from
- treating -k as an abbreviation for --keep-locals. Some
- ports use -k to enable PIC assembly. */
- {"keep-locals", no_argument, NULL, 'L'},
- {"keep-locals", no_argument, NULL, 'L'},
- {"mri", no_argument, NULL, 'M'},
- {"nocpp", no_argument, NULL, OPTION_NOCPP},
- {"statistics", no_argument, NULL, OPTION_STATISTICS},
- {"version", no_argument, NULL, OPTION_VERSION},
- {"dump-config", no_argument, NULL, OPTION_DUMPCONFIG},
- {"verbose", no_argument, NULL, OPTION_VERBOSE},
- {"emulation", required_argument, NULL, OPTION_EMULATION},
- {"defsym", required_argument, NULL, OPTION_DEFSYM},
+ /* Note: commas are placed at the start of the line rather than
+ the end of the preceeding line so that it is simpler to
+ selectively add and remove lines from this list. */
+ {"alternate", no_argument, NULL, OPTION_ALTERNATE}
+ /* The entry for "a" is here to prevent getopt_long_only() from
+ considering that -a is an abbreviation for --alternate. This is
+ necessary because -a=<FILE> is a valid switch but getopt would
+ normally reject it since --alternate does not take an argument. */
+ ,{"a", optional_argument, NULL, 'a'}
+ /* Handle -al=<FILE>. */
+ ,{"al", optional_argument, NULL, OPTION_AL}
+ ,{"defsym", required_argument, NULL, OPTION_DEFSYM}
+ ,{"dump-config", no_argument, NULL, OPTION_DUMPCONFIG}
+ ,{"emulation", required_argument, NULL, OPTION_EMULATION}
+#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
+ ,{"execstack", no_argument, NULL, OPTION_EXECSTACK}
+ ,{"noexecstack", no_argument, NULL, OPTION_NOEXECSTACK}
+#endif
+ ,{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
+ ,{"gdwarf-2", no_argument, NULL, OPTION_GDWARF2}
+ /* GCC uses --gdwarf-2 but GAS uses to use --gdwarf2,
+ so we keep it here for backwards compatibility. */
+ ,{"gdwarf2", no_argument, NULL, OPTION_GDWARF2}
+ ,{"gen-debug", no_argument, NULL, 'g'}
+ ,{"gstabs", no_argument, NULL, OPTION_GSTABS}
+ ,{"gstabs+", no_argument, NULL, OPTION_GSTABS_PLUS}
+ ,{"hash-size", required_argument, NULL, OPTION_HASH_TABLE_SIZE}
+ ,{"help", no_argument, NULL, OPTION_HELP}
/* New option for extending instruction set (see also -t above).
The "-t file" or "--itbl file" option extends the basic set of
valid instructions by reading "file", a text file containing a
list of instruction formats. The additional opcodes and their
formats are added to the built-in set of instructions, and
mnemonics for new registers may also be defined. */
- {"itbl", required_argument, NULL, OPTION_INSTTBL},
- {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH},
- {"listing-lhs-width2", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
- {"listing-rhs-width", required_argument, NULL, OPTION_LISTING_RHS_WIDTH},
- {"listing-cont-lines", required_argument, NULL, OPTION_LISTING_CONT_LINES},
- {"MD", required_argument, NULL, OPTION_DEPFILE},
- {"gstabs", no_argument, NULL, OPTION_GSTABS},
- {"gstabs+", no_argument, NULL, OPTION_GSTABS_PLUS},
- {"strip-local-absolute", no_argument, NULL, OPTION_STRIP_LOCAL_ABSOLUTE},
- {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
- {"gdwarf2", no_argument, NULL, OPTION_GDWARF2},
- {"no-warn", no_argument, NULL, 'W'},
- {"warn", no_argument, NULL, OPTION_WARN},
- {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
-#if defined BFD_ASSEMBLER && (defined OBJ_ELF || defined OBJ_MAYBE_ELF)
- {"execstack", no_argument, NULL, OPTION_EXECSTACK},
- {"noexecstack", no_argument, NULL, OPTION_NOEXECSTACK},
-#endif
- {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
- /* When you add options here, check that they do not collide with
- OPTION_MD_BASE. See as.h. */
+ ,{"itbl", required_argument, NULL, OPTION_INSTTBL}
+ /* getopt allows abbreviations, so we do this to stop it from
+ treating -k as an abbreviation for --keep-locals. Some
+ ports use -k to enable PIC assembly. */
+ ,{"keep-locals", no_argument, NULL, 'L'}
+ ,{"keep-locals", no_argument, NULL, 'L'}
+ ,{"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH}
+ ,{"listing-lhs-width2", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2}
+ ,{"listing-rhs-width", required_argument, NULL, OPTION_LISTING_RHS_WIDTH}
+ ,{"listing-cont-lines", required_argument, NULL, OPTION_LISTING_CONT_LINES}
+ ,{"MD", required_argument, NULL, OPTION_DEPFILE}
+ ,{"mri", no_argument, NULL, 'M'}
+ ,{"nocpp", no_argument, NULL, OPTION_NOCPP}
+ ,{"no-warn", no_argument, NULL, 'W'}
+ ,{"reduce-memory-overheads", no_argument, NULL, OPTION_REDUCE_MEMORY_OVERHEADS}
+ ,{"statistics", no_argument, NULL, OPTION_STATISTICS}
+ ,{"strip-local-absolute", no_argument, NULL, OPTION_STRIP_LOCAL_ABSOLUTE}
+ ,{"version", no_argument, NULL, OPTION_VERSION}
+ ,{"verbose", no_argument, NULL, OPTION_VERBOSE}
+ ,{"target-help", no_argument, NULL, OPTION_TARGET_HELP}
+ ,{"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT}
+ ,{"warn", no_argument, NULL, OPTION_WARN}
};
/* Construct the option lists from the standard list and the target
@@ -520,6 +551,8 @@ parse_args (int * pargc, char *** pargv)
verbose = 1;
break;
}
+ else
+ as_bad (_("unrecognized option -%c%s"), optc, optarg ? optarg : "");
/* Fall through. */
case '?':
@@ -557,12 +590,8 @@ parse_args (int * pargc, char *** pargv)
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
-#ifdef BFD_ASSEMBLER
printf (_("GNU assembler %s\n"), BFD_VERSION_STRING);
-#else
- printf (_("GNU assembler %s\n"), VERSION);
-#endif
- printf (_("Copyright 2002 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2005 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"));
@@ -602,11 +631,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
if (*s == '\0')
as_fatal (_("bad defsym; format is --defsym name=value"));
*s++ = '\0';
-#ifdef BFD_ASSEMBLER
i = bfd_scan_vma (s, (const char **) NULL, 0);
-#else
- i = strtol (s, (char **) NULL, 0);
-#endif
n = xmalloc (sizeof *n);
n->next = defsyms;
n->name = optarg;
@@ -648,6 +673,22 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
start_dependencies (optarg);
break;
+ case 'g':
+ /* Some backends, eg Alpha and Mips, use the -g switch for their
+ own purposes. So we check here for an explicit -g and allow
+ the backend to decide if it wants to process it. */
+ if ( old_argv[optind - 1][1] == 'g'
+ && md_parse_option (optc, optarg))
+ continue;
+
+ if (md_debug_format_selector)
+ debug_type = md_debug_format_selector (& use_gnu_debug_info_extensions);
+ else if (IS_ELF)
+ debug_type = DEBUG_DWARF2;
+ else
+ debug_type = DEBUG_STABS;
+ break;
+
case OPTION_GSTABS_PLUS:
use_gnu_debug_info_extensions = 1;
/* Fall through. */
@@ -680,6 +721,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case OPTION_LISTING_LHS_WIDTH2:
{
int tmp = atoi (optarg);
+
if (tmp > listing_lhs_width)
listing_lhs_width_second = tmp;
}
@@ -716,7 +758,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
flag_fatal_warnings = 1;
break;
-#if defined BFD_ASSEMBLER && (defined OBJ_ELF || defined OBJ_MAYBE_ELF)
+#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
case OPTION_EXECSTACK:
flag_execstack = 1;
flag_noexecstack = 0;
@@ -731,9 +773,31 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
flag_always_generate_output = 1;
break;
+ case OPTION_AL:
+ listing |= LISTING_LISTING;
+ if (optarg)
+ listing_filename = xstrdup (optarg);
+ break;
+
+ case OPTION_ALTERNATE:
+ optarg = old_argv [optind - 1];
+ while (* optarg == '-')
+ optarg ++;
+
+ if (strcmp (optarg, "alternate") == 0)
+ {
+ flag_macro_alternate = 1;
+ break;
+ }
+ optarg ++;
+ /* Fall through. */
+
case 'a':
if (optarg)
{
+ if (optarg != old_argv[optind] && optarg[-1] == '=')
+ --optarg;
+
if (md_parse_option (optc, optarg) != 0)
break;
@@ -790,6 +854,7 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case 'I':
{ /* Include file directory. */
char *temp = xstrdup (optarg);
+
add_include_dir (temp);
break;
}
@@ -804,6 +869,24 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case 'X':
/* -X means treat warnings as errors. */
break;
+
+ case OPTION_REDUCE_MEMORY_OVERHEADS:
+ /* The only change we make at the moment is to reduce
+ the size of the hash tables that we use. */
+ set_gas_hash_table_size (4051);
+ break;
+
+ case OPTION_HASH_TABLE_SIZE:
+ {
+ unsigned long new_size;
+
+ new_size = strtoul (optarg, NULL, 0);
+ if (new_size)
+ set_gas_hash_table_size (new_size);
+ else
+ as_fatal (_("--hash-size needs a numeric argument"));
+ break;
+ }
}
}
@@ -847,6 +930,14 @@ dump_statistics (void)
#endif
}
+#ifndef OBJ_VMS
+static void
+close_output_file (void)
+{
+ output_file_close (out_file_name);
+}
+#endif
+
/* The interface between the macro code and gas expression handling. */
static int
@@ -859,7 +950,7 @@ macro_expr (const char *emsg, int idx, sb *in, int *val)
hold = input_line_pointer;
input_line_pointer = in->ptr + idx;
- expression (&ex);
+ expression_and_evaluate (&ex);
idx = input_line_pointer - in->ptr;
input_line_pointer = hold;
@@ -884,44 +975,10 @@ static void
perform_an_assembly_pass (int argc, char ** argv)
{
int saw_a_file = 0;
-#ifdef BFD_ASSEMBLER
flagword applicable;
-#endif
need_pass_2 = 0;
-#ifndef BFD_ASSEMBLER
-#ifdef MANY_SEGMENTS
- {
- unsigned int i;
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- segment_info[i].fix_root = 0;
- }
- /* Create the three fixed ones. */
- {
- segT seg;
-
-#ifdef TE_APOLLO
- seg = subseg_new (".wtext", 0);
-#else
- seg = subseg_new (".text", 0);
-#endif
- assert (seg == SEG_E0);
- seg = subseg_new (".data", 0);
- assert (seg == SEG_E1);
- seg = subseg_new (".bss", 0);
- assert (seg == SEG_E2);
-#ifdef TE_APOLLO
- create_target_segments ();
-#endif
- }
-
-#else /* not MANY_SEGMENTS. */
- text_fix_root = NULL;
- data_fix_root = NULL;
- bss_fix_root = NULL;
-#endif /* not MANY_SEGMENTS. */
-#else /* BFD_ASSEMBLER. */
/* Create the standard sections, and those the assembler uses
internally. */
text_section = subseg_new (TEXT_SECTION_NAME, 0);
@@ -943,12 +1000,10 @@ perform_an_assembly_pass (int argc, char ** argv)
reg_section = subseg_new ("*GAS `reg' section*", 0);
expr_section = subseg_new ("*GAS `expr' section*", 0);
-#endif /* BFD_ASSEMBLER. */
-
subseg_set (text_section, 0);
/* This may add symbol table entries, which requires having an open BFD,
- and sections already created, in BFD_ASSEMBLER mode. */
+ and sections already created. */
md_begin ();
#ifdef USING_CGEN
@@ -981,7 +1036,6 @@ perform_an_assembly_pass (int argc, char ** argv)
int
main (int argc, char ** argv)
{
- int macro_alternate;
int macro_strip_at;
int keep_it;
@@ -1006,6 +1060,8 @@ main (int argc, char ** argv)
myname = argv[0];
xmalloc_set_program_name (myname);
+ expandargv (&argc, &argv);
+
START_PROGRESS (myname, 0);
#ifndef OBJ_DEFAULT_OUTPUT_FILE_NAME
@@ -1015,47 +1071,43 @@ main (int argc, char ** argv)
out_file_name = OBJ_DEFAULT_OUTPUT_FILE_NAME;
hex_init ();
-#ifdef BFD_ASSEMBLER
bfd_init ();
bfd_set_error_program_name (myname);
-#endif
#ifdef USE_EMULATIONS
select_emulation_mode (argc, argv);
#endif
PROGRESS (1);
+ /* Call parse_args before any of the init/begin functions
+ so that switches like --hash-size can be honored. */
+ parse_args (&argc, &argv);
symbol_begin ();
frag_init ();
subsegs_begin ();
- parse_args (&argc, &argv);
read_begin ();
input_scrub_begin ();
expr_begin ();
+#ifndef OBJ_VMS /* Does its own file handling. */
+ /* It has to be called after dump_statistics (). */
+ xatexit (close_output_file);
+#endif
+
if (flag_print_statistics)
xatexit (dump_statistics);
- macro_alternate = 0;
macro_strip_at = 0;
#ifdef TC_I960
macro_strip_at = flag_mri;
#endif
-#ifdef TC_A29K
- /* For compatibility with the AMD 29K family macro assembler
- specification. */
- macro_alternate = 1;
- macro_strip_at = 1;
-#endif
- macro_init (macro_alternate, flag_mri, macro_strip_at, macro_expr);
+ macro_init (flag_macro_alternate, flag_mri, macro_strip_at, macro_expr);
PROGRESS (1);
-#ifdef BFD_ASSEMBLER
output_file_create (out_file_name);
assert (stdoutput != 0);
-#endif
#ifdef tc_init_after_args
tc_init_after_args ();
@@ -1090,7 +1142,7 @@ main (int argc, char ** argv)
md_end ();
#endif
-#if defined BFD_ASSEMBLER && (defined OBJ_ELF || defined OBJ_MAYBE_ELF)
+#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
if ((flag_execstack || flag_noexecstack)
&& OUTPUT_FLAVOR == bfd_target_elf_flavour)
{
@@ -1117,13 +1169,11 @@ main (int argc, char ** argv)
else
keep_it = 0;
-#if defined (BFD_ASSEMBLER) || !defined (BFD)
/* This used to be done at the start of write_object_file in
write.c, but that caused problems when doing listings when
keep_it was zero. This could probably be moved above md_end, but
I didn't want to risk the change. */
subsegs_finish ();
-#endif
if (keep_it)
write_object_file ();
@@ -1132,13 +1182,6 @@ main (int argc, char ** argv)
listing_print (listing_filename);
#endif
-#ifndef OBJ_VMS /* Does its own file handling. */
-#ifndef BFD_ASSEMBLER
- if (keep_it)
-#endif
- output_file_close (out_file_name);
-#endif
-
if (flag_fatal_warnings && had_warnings () > 0 && had_errors () == 0)
as_bad (_("%d warnings, treating warnings as errors"), had_warnings ());
@@ -1146,7 +1189,7 @@ main (int argc, char ** argv)
keep_it = 0;
if (!keep_it)
- unlink (out_file_name);
+ unlink_if_ordinary (out_file_name);
input_scrub_end ();
@@ -1162,4 +1205,3 @@ main (int argc, char ** argv)
xexit (EXIT_SUCCESS);
}
-
diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h
index 5e30f478313e..2f92c2ed7748 100644
--- a/contrib/binutils/gas/as.h
+++ b/contrib/binutils/gas/as.h
@@ -17,25 +17,24 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef GAS
#define GAS 1
/* I think this stuff is largely out of date. xoxorich.
- *
- * CAPITALISED names are #defined.
- * "lowercaseH" is #defined if "lowercase.h" has been #include-d.
- * "lowercaseT" is a typedef of "lowercase" objects.
- * "lowercaseP" is type "pointer to object of type 'lowercase'".
- * "lowercaseS" is typedef struct ... lowercaseS.
- *
- * #define DEBUG to enable all the "know" assertion tests.
- * #define SUSPECT when debugging hash code.
- * #define COMMON as "extern" for all modules except one, where you #define
- * COMMON as "".
- * If TEST is #defined, then we are testing a module: #define COMMON as "".
- */
+
+ CAPITALISED names are #defined.
+ "lowercaseH" is #defined if "lowercase.h" has been #include-d.
+ "lowercaseT" is a typedef of "lowercase" objects.
+ "lowercaseP" is type "pointer to object of type 'lowercase'".
+ "lowercaseS" is typedef struct ... lowercaseS.
+
+ #define DEBUG to enable all the "know" assertion tests.
+ #define SUSPECT when debugging hash code.
+ #define COMMON as "extern" for all modules except one, where you #define
+ COMMON as "".
+ If TEST is #defined, then we are testing a module: #define COMMON as "". */
#include "config.h"
#include "bin-bugs.h"
@@ -69,6 +68,19 @@ extern void *alloca ();
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */
+/* Prefer varargs for non-ANSI compiler, since some will barf if the
+ ellipsis definition is used with a no-arguments declaration. */
+#if defined (HAVE_VARARGS_H) && !defined (__STDC__)
+#undef HAVE_STDARG_H
+#endif
+
+#if defined (HAVE_STDARG_H)
+#define USE_STDARG
+#endif
+#if !defined (USE_STDARG) && defined (HAVE_VARARGS_H)
+#define USE_VARARGS
+#endif
+
/* Now, tend to the rest of the configuration. */
/* System include files first... */
@@ -91,6 +103,27 @@ extern void *alloca ();
#include <sys/types.h>
#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#ifdef USE_STDARG
+#include <stdarg.h>
+#endif
+
+#ifdef USE_VARARGS
+#include <varargs.h>
+#endif
+
+#if !defined (USE_STDARG) && !defined (USE_VARARGS)
+/* Roll our own. */
+#define va_alist REST
+#define va_dcl
+typedef int * va_list;
+#define va_start(ARGS) ARGS = &REST
+#define va_end(ARGS)
+#endif
+
#include "getopt.h"
/* The first getopt value for machine-independent long options.
150 isn't special; it's just an arbitrary non-ASCII char value. */
@@ -105,60 +138,49 @@ extern void *alloca ();
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
#define __PRETTY_FUNCTION__ ((char*)0)
#endif
-#if 0
-
-/* Handle lossage with assert.h. */
-#ifndef BROKEN_ASSERT
-#include <assert.h>
-#else /* BROKEN_ASSERT */
-#ifndef NDEBUG
-#define assert(p) ((p) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0))
-#else
-#define assert(p) ((p), 0)
-#endif
-#endif /* BROKEN_ASSERT */
-
-#else
-
-#define assert(P) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0))
+#define assert(P) \
+ ((void) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)))
#undef abort
#define abort() as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
-#endif
-
/* Now GNU header files... */
#include "ansidecl.h"
-#ifdef BFD_ASSEMBLER
#include "bfd.h"
-#endif
#include "libiberty.h"
/* Define the standard progress macros. */
#include "progress.h"
/* This doesn't get taken care of anywhere. */
-#ifndef __MWERKS__ /* Metrowerks C chokes on the "defined (inline)" */
+#ifndef __MWERKS__ /* Metrowerks C chokes on the "defined (inline)" */
#if !defined (__GNUC__) && !defined (inline)
#define inline
#endif
#endif /* !__MWERKS__ */
/* Other stuff from config.h. */
-#ifdef NEED_DECLARATION_STRSTR
-extern char *strstr ();
+#ifdef NEED_DECLARATION_ENVIRON
+extern char **environ;
#endif
-#ifdef NEED_DECLARATION_MALLOC
-extern PTR malloc ();
-extern PTR realloc ();
+#ifdef NEED_DECLARATION_ERRNO
+extern int errno;
+#endif
+#ifdef NEED_DECLARATION_FFS
+extern int ffs (int);
#endif
#ifdef NEED_DECLARATION_FREE
extern void free ();
#endif
-#ifdef NEED_DECLARATION_ERRNO
-extern int errno;
+#ifdef NEED_DECLARATION_MALLOC
+extern PTR malloc ();
+extern PTR realloc ();
#endif
-#ifdef NEED_DECLARATION_ENVIRON
-extern char **environ;
+#ifdef NEED_DECLARATION_STRSTR
+extern char *strstr ();
+#endif
+
+#if !HAVE_DECL_VSNPRINTF
+extern int vsnprintf(char *, size_t, const char *, va_list);
#endif
/* This is needed for VMS. */
@@ -221,33 +243,28 @@ extern char **environ;
/* These are assembler-wide concepts */
-#ifdef BFD_ASSEMBLER
extern bfd *stdoutput;
typedef bfd_vma addressT;
typedef bfd_signed_vma offsetT;
-#else
-typedef unsigned long addressT;
-typedef long offsetT;
-#endif
/* Type of symbol value, etc. For use in prototypes. */
typedef addressT valueT;
#ifndef COMMON
#ifdef TEST
-#define COMMON /* declare our COMMONs storage here. */
+#define COMMON /* Declare our COMMONs storage here. */
#else
-#define COMMON extern /* our commons live elsewhere */
+#define COMMON extern /* Our commons live elsewhere. */
#endif
#endif
/* COMMON now defined */
#ifdef DEBUG
#ifndef know
-#define know(p) assert(p) /* Verify our assumptions! */
+#define know(p) assert(p) /* Verify our assumptions! */
#endif /* not yet defined */
#else
-#define know(p) /* know() checks are no-op.ed */
+#define know(p) /* know() checks are no-op.ed */
#endif
/* input_scrub.c */
@@ -257,90 +274,36 @@ typedef addressT valueT;
/* subsegs.c Sub-segments. Also, segment(=expression type)s.*/
-#ifndef BFD_ASSEMBLER
-
-#ifdef MANY_SEGMENTS
-#include "bfd.h"
-#define N_SEGMENTS 40
-#define SEG_NORMAL(x) ((x) >= SEG_E0 && (x) <= SEG_E39)
-#define SEG_LIST SEG_E0,SEG_E1,SEG_E2,SEG_E3,SEG_E4,SEG_E5,SEG_E6,SEG_E7,SEG_E8,SEG_E9,\
- SEG_E10,SEG_E11,SEG_E12,SEG_E13,SEG_E14,SEG_E15,SEG_E16,SEG_E17,SEG_E18,SEG_E19,\
- SEG_E20,SEG_E21,SEG_E22,SEG_E23,SEG_E24,SEG_E25,SEG_E26,SEG_E27,SEG_E28,SEG_E29,\
- SEG_E30,SEG_E31,SEG_E32,SEG_E33,SEG_E34,SEG_E35,SEG_E36,SEG_E37,SEG_E38,SEG_E39
-#define SEG_TEXT SEG_E0
-#define SEG_DATA SEG_E1
-#define SEG_BSS SEG_E2
-#define SEG_LAST SEG_E39
-#else
-#define N_SEGMENTS 3
-#define SEG_NORMAL(x) ((x) == SEG_TEXT || (x) == SEG_DATA || (x) == SEG_BSS)
-#define SEG_LIST SEG_TEXT,SEG_DATA,SEG_BSS
-#endif
-
-typedef enum _segT {
- SEG_ABSOLUTE = 0,
- SEG_LIST,
- SEG_UNKNOWN,
- SEG_GOOF, /* Only happens if AS has a logic error. */
- /* Invented so we don't crash printing */
- /* error message involving weird segment. */
- SEG_EXPR, /* Intermediate expression values. */
- SEG_DEBUG, /* Debug segment */
- SEG_NTV, /* Transfert vector preload segment */
- SEG_PTV, /* Transfert vector postload segment */
- SEG_REGISTER /* Mythical: a register-valued expression */
-} segT;
-
-#define SEG_MAXIMUM_ORDINAL (SEG_REGISTER)
-#else
typedef asection *segT;
-#define SEG_NORMAL(SEG) ((SEG) != absolute_section \
+#define SEG_NORMAL(SEG) ( (SEG) != absolute_section \
&& (SEG) != undefined_section \
&& (SEG) != reg_section \
&& (SEG) != expr_section)
-#endif
typedef int subsegT;
-/* What subseg we are accessing now? */
+/* What subseg we are accessing now? */
COMMON subsegT now_subseg;
/* Segment our instructions emit to. */
COMMON segT now_seg;
-#ifdef BFD_ASSEMBLER
#define segment_name(SEG) bfd_get_section_name (stdoutput, SEG)
-#else
-extern char const *const seg_name[];
-#define segment_name(SEG) seg_name[(int) (SEG)]
-#endif
-#ifndef BFD_ASSEMBLER
-extern int section_alignment[];
-#endif
-
-#ifdef BFD_ASSEMBLER
extern segT reg_section, expr_section;
/* Shouldn't these be eliminated someday? */
extern segT text_section, data_section, bss_section;
#define absolute_section bfd_abs_section_ptr
#define undefined_section bfd_und_section_ptr
-#else
-#define reg_section SEG_REGISTER
-#define expr_section SEG_EXPR
-#define text_section SEG_TEXT
-#define data_section SEG_DATA
-#define bss_section SEG_BSS
-#define absolute_section SEG_ABSOLUTE
-#define undefined_section SEG_UNKNOWN
-#endif
-/* relax() */
+enum _relax_state
+{
+ /* Dummy frag used by listing code. */
+ rs_dummy = 0,
-enum _relax_state {
/* Variable chars to be repeated fr_offset times.
Fr_symbol unused. Used with fr_offset == 0 for a
constant length frag. */
- rs_fill = 1,
+ rs_fill,
/* Align. The fr_offset field holds the power of 2 to which to
align. The fr_var field holds the number of characters in the
@@ -368,7 +331,7 @@ enum _relax_state {
rs_broken_word,
#endif
- /* machine-specific relaxable (or similarly alterable) instruction */
+ /* Machine specific relaxable (or similarly alterable) instruction. */
rs_machine_dependent,
/* .space directive with expression operand that needs to be computed
@@ -414,7 +377,7 @@ struct relax_type
typedef struct relax_type relax_typeS;
-/* main program "as.c" (command arguments etc) */
+/* main program "as.c" (command arguments etc). */
COMMON unsigned char flag_no_comments; /* -f */
COMMON unsigned char flag_debug; /* -D */
@@ -482,7 +445,8 @@ extern int listing;
This is especially relevant to DWARF2, since the compiler may emit line
number directives that the assembler resolves. */
-enum debug_info_type {
+enum debug_info_type
+{
DEBUG_UNSPECIFIED,
DEBUG_NONE,
DEBUG_STABS,
@@ -504,7 +468,8 @@ extern int verbose;
increase malloc calls for monitoring memory allocation. */
extern int chunksize;
-struct _pseudo_type {
+struct _pseudo_type
+{
/* assembler mnemonic, lower case, no '.' */
const char *poc_name;
/* Do the work */
@@ -515,19 +480,6 @@ struct _pseudo_type {
typedef struct _pseudo_type pseudo_typeS;
-/* Prefer varargs for non-ANSI compiler, since some will barf if the
- ellipsis definition is used with a no-arguments declaration. */
-#if defined (HAVE_VARARGS_H) && !defined (__STDC__)
-#undef HAVE_STDARG_H
-#endif
-
-#if defined (HAVE_STDARG_H)
-#define USE_STDARG
-#endif
-#if !defined (USE_STDARG) && defined (HAVE_VARARGS_H)
-#define USE_VARARGS
-#endif
-
#ifdef USE_STDARG
#if (__GNUC__ >= 2) && !defined(VMS)
/* for use with -Wformat */
@@ -569,54 +521,48 @@ PRINTF_LIKE (as_warn);
PRINTF_WHERE_LIKE (as_bad_where);
PRINTF_WHERE_LIKE (as_warn_where);
-void as_assert (const char *, int, const char *);
-void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
-
-void fprint_value (FILE *file, addressT value);
-void sprint_value (char *buf, addressT value);
-
-int had_errors (void);
-int had_warnings (void);
-
-void print_version_id (void);
-char *app_push (void);
-char *atof_ieee (char *str, int what_kind, LITTLENUM_TYPE * words);
-char *input_scrub_include_file (char *filename, char *position);
-extern void input_scrub_insert_line (const char *line);
-extern void input_scrub_insert_file (char *path);
-char *input_scrub_new_file (char *filename);
-char *input_scrub_next_buffer (char **bufp);
-int do_scrub_chars (int (*get) (char *, int), char *to, int tolen);
-int gen_to_words (LITTLENUM_TYPE * words, int precision,
- long exponent_bits);
-int had_err (void);
-int ignore_input (void);
-void cond_finish_check (int);
-void cond_exit_macro (int);
-int seen_at_least_1_file (void);
-void app_pop (char *arg);
-void as_howmuch (FILE * stream);
-void as_perror (const char *gripe, const char *filename);
-void as_where (char **namep, unsigned int *linep);
-void bump_line_counters (void);
-void do_scrub_begin (int);
-void input_scrub_begin (void);
-void input_scrub_close (void);
-void input_scrub_end (void);
-int new_logical_line (char *fname, int line_number);
-void subsegs_begin (void);
-void subseg_change (segT seg, int subseg);
-segT subseg_new (const char *name, subsegT subseg);
-segT subseg_force_new (const char *name, subsegT subseg);
-void subseg_set (segT seg, subsegT subseg);
-#ifdef BFD_ASSEMBLER
-segT subseg_get (const char *, int);
-#endif
-int subseg_text_p (segT);
-
-void start_dependencies (char *);
-void register_dependency (char *);
-void print_dependencies (void);
+void as_assert (const char *, int, const char *);
+void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
+void sprint_value (char *, addressT);
+int had_errors (void);
+int had_warnings (void);
+void as_warn_value_out_of_range (char *, offsetT, offsetT, offsetT, char *, unsigned);
+void as_bad_value_out_of_range (char *, offsetT, offsetT, offsetT, char *, unsigned);
+void print_version_id (void);
+char * app_push (void);
+char * atof_ieee (char *, int, LITTLENUM_TYPE *);
+char * input_scrub_include_file (char *, char *);
+void input_scrub_insert_line (const char *);
+void input_scrub_insert_file (char *);
+char * input_scrub_new_file (char *);
+char * input_scrub_next_buffer (char **bufp);
+int do_scrub_chars (int (*get) (char *, int), char *, int);
+int gen_to_words (LITTLENUM_TYPE *, int, long);
+int had_err (void);
+int ignore_input (void);
+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);
+void input_scrub_begin (void);
+void input_scrub_close (void);
+void input_scrub_end (void);
+int new_logical_line (char *, int);
+void subsegs_begin (void);
+void subseg_change (segT, int);
+segT subseg_new (const char *, subsegT);
+segT subseg_force_new (const char *, subsegT);
+void subseg_set (segT, subsegT);
+int subseg_text_p (segT);
+int seg_not_empty_p (segT);
+void start_dependencies (char *);
+void register_dependency (char *);
+void print_dependencies (void);
+segT subseg_get (const char *, int);
struct expressionS;
struct fix;
@@ -624,21 +570,18 @@ typedef struct symbol symbolS;
struct relax_type;
typedef struct frag fragS;
-#ifdef BFD_ASSEMBLER
/* literal.c */
valueT add_to_literal_pool (symbolS *, valueT, segT, int);
-#endif
int check_eh_frame (struct expressionS *, unsigned int *);
int eh_frame_estimate_size_before_relax (fragS *);
int eh_frame_relax_frag (fragS *);
void eh_frame_convert_frag (fragS *);
-
int generic_force_reloc (struct fix *);
#include "expr.h" /* Before targ-*.h */
-/* this one starts the chain of target dependant headers */
+/* This one starts the chain of target dependant headers. */
#include "targ-env.h"
#ifdef OBJ_MAYBE_ELF
@@ -668,14 +611,19 @@ int generic_force_reloc (struct fix *);
#ifdef TC_M68K
/* True if we are assembling in m68k MRI mode. */
COMMON int flag_m68k_mri;
+#define DOLLAR_AMBIGU flag_m68k_mri
#else
#define flag_m68k_mri 0
#endif
#ifdef WARN_COMMENTS
-COMMON int warn_comment;
-COMMON unsigned int found_comment;
-COMMON char *found_comment_file;
+COMMON int warn_comment;
+COMMON unsigned int found_comment;
+COMMON char * found_comment_file;
+#endif
+
+#ifndef DOLLAR_AMBIGU
+#define DOLLAR_AMBIGU 0
#endif
#ifndef NUMBERS_WITH_SUFFIX
diff --git a/contrib/binutils/gas/asintl.h b/contrib/binutils/gas/asintl.h
index 41bb21826eee..67ce0dd4fd45 100644
--- a/contrib/binutils/gas/asintl.h
+++ b/contrib/binutils/gas/asintl.h
@@ -1,5 +1,5 @@
/* asintl.h - gas-specific header for gettext code.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
Written by Tom Tromey <tromey@cygnus.com>
@@ -17,10 +17,19 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#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
diff --git a/contrib/binutils/gas/atof-generic.c b/contrib/binutils/gas/atof-generic.c
index 8c599b571edb..6a5c2f15b3cc 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
- Free Software Foundation, Inc.
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
+ 2001, 2003, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <string.h>
@@ -324,19 +324,10 @@ atof_generic (/* return pointer to just AFTER number we read. */
+ 1); /* Number of destination littlenums. */
/* Includes guard bits (two littlenums worth) */
-#if 0 /* The integer version below is very close, and it doesn't
- require floating point support (which is currently buggy on
- the Alpha). */
- maximum_useful_digits = (((double) (precision - 2))
- * ((double) (LITTLENUM_NUMBER_OF_BITS))
- / (LOG_TO_BASE_2_OF_10))
- + 2; /* 2 :: guard digits. */
-#else
maximum_useful_digits = (((precision - 2))
* ( (LITTLENUM_NUMBER_OF_BITS))
* 1000000 / 3321928)
+ 2; /* 2 :: guard digits. */
-#endif
if (number_of_digits_available > maximum_useful_digits)
{
@@ -353,13 +344,8 @@ atof_generic (/* return pointer to just AFTER number we read. */
decimal_exponent += ((long) number_of_digits_before_decimal
- (long) number_of_digits_to_use);
-#if 0
- more_than_enough_bits_for_digits
- = ((((double) number_of_digits_to_use) * LOG_TO_BASE_2_OF_10) + 1);
-#else
more_than_enough_bits_for_digits
= (number_of_digits_to_use * 3321928 / 1000000 + 1);
-#endif
more_than_enough_littlenums_for_digits
= (more_than_enough_bits_for_digits
diff --git a/contrib/binutils/gas/bignum-copy.c b/contrib/binutils/gas/bignum-copy.c
deleted file mode 100644
index 56974722f51f..000000000000
--- a/contrib/binutils/gas/bignum-copy.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* bignum_copy.c - copy a bignum
- Copyright 1987, 1990, 1991, 1992, 1993, 2000
- Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "as.h"
-
-/*
- * bignum_copy ()
- *
- * Copy a bignum from in to out.
- * If the output is shorter than the input, copy lower-order littlenums.
- * Return 0 or the number of significant littlenums dropped.
- * Assumes littlenum arrays are densely packed: no unused chars between
- * the littlenums. Uses memcpy() to move littlenums, and wants to
- * know length (in chars) of the input bignum.
- */
-
-/* void */
-int
-bignum_copy (register LITTLENUM_TYPE *in,
- register int in_length, /* in sizeof(littlenum)s */
- register LITTLENUM_TYPE *out,
- register int out_length /* in sizeof(littlenum)s */)
-{
- int significant_littlenums_dropped;
-
- if (out_length < in_length)
- {
- LITTLENUM_TYPE *p; /* -> most significant (non-zero) input
- littlenum. */
-
- memcpy ((void *) out, (void *) in,
- (unsigned int) out_length << LITTLENUM_SHIFT);
- for (p = in + in_length - 1; p >= in; --p)
- {
- if (*p)
- break;
- }
- significant_littlenums_dropped = p - in - in_length + 1;
-
- if (significant_littlenums_dropped < 0)
- {
- significant_littlenums_dropped = 0;
- }
- }
- else
- {
- memcpy ((char *) out, (char *) in,
- (unsigned int) in_length << LITTLENUM_SHIFT);
-
- if (out_length > in_length)
- {
- memset ((char *) (out + in_length),
- '\0',
- (unsigned int) (out_length - in_length) << LITTLENUM_SHIFT);
- }
-
- significant_littlenums_dropped = 0;
- }
-
- return (significant_littlenums_dropped);
-} /* bignum_copy() */
-
-/* end of bignum-copy.c */
diff --git a/contrib/binutils/gas/bignum.h b/contrib/binutils/gas/bignum.h
index fbb77ffe7e18..d9e0429ddeb0 100644
--- a/contrib/binutils/gas/bignum.h
+++ b/contrib/binutils/gas/bignum.h
@@ -1,5 +1,5 @@
/* bignum.h-arbitrary precision integers
- Copyright 1987, 1992 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 2003, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/***********************************************************************\
* *
@@ -39,14 +39,3 @@
#endif
typedef unsigned short LITTLENUM_TYPE;
-
-/* JF truncated this to get around a problem with GCC */
-#define LOG_TO_BASE_2_OF_10 (3.3219280948873623478703194294893901758651)
-/* WARNING: I haven't checked that the trailing digits are correct! */
-
-/* lengths are in sizeof(littlenum)s */
-
-int bignum_copy (LITTLENUM_TYPE * in, int in_length,
- LITTLENUM_TYPE * out, int out_length);
-
-/* end of bignum.h */
diff --git a/contrib/binutils/gas/bit_fix.h b/contrib/binutils/gas/bit_fix.h
index 1676d2c5f0bd..64be49b430a4 100644
--- a/contrib/binutils/gas/bit_fix.h
+++ b/contrib/binutils/gas/bit_fix.h
@@ -1,5 +1,5 @@
/* bit_fix.h
- Copyright 1987, 1992, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* The bit_fix was implemented to support machines that need variables
to be inserted in bitfields other than 1, 2 and 4 bytes.
diff --git a/contrib/binutils/gas/cgen.c b/contrib/binutils/gas/cgen.c
index 5ce7f4c99ecb..363c05e5318a 100644
--- a/contrib/binutils/gas/cgen.c
+++ b/contrib/binutils/gas/cgen.c
@@ -1,5 +1,5 @@
/* GAS interface for targets using CGEN: Cpu tools GENerator.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include <setjmp.h>
#include "ansidecl.h"
@@ -225,7 +225,7 @@ gas_cgen_swap_fixups (i)
At this point we do not use a bfd_reloc_code_real_type for
operands residing in the insn, but instead just use the
operand index. This lets us easily handle fixups for any
- operand type. We pick a BFD reloc type in md_apply_fix3. */
+ operand type. We pick a BFD reloc type in md_apply_fix. */
fixS *
gas_cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset)
@@ -264,7 +264,7 @@ gas_cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offse
At this point we do not use a bfd_reloc_code_real_type for
operands residing in the insn, but instead just use the
operand index. This lets us easily handle fixups for any
- operand type. We pick a BFD reloc type in md_apply_fix3. */
+ operand type. We pick a BFD reloc type in md_apply_fix. */
fixS *
gas_cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
@@ -320,9 +320,11 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
/* These are volatile to survive the setjmp. */
char * volatile hold;
enum cgen_parse_operand_result * volatile resultP_1;
+ volatile int opinfo_1;
#else
static char *hold;
static enum cgen_parse_operand_result *resultP_1;
+ int opinfo_1;
#endif
const char *errmsg;
expressionS exp;
@@ -336,6 +338,7 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
resultP_1 = resultP;
hold = input_line_pointer;
input_line_pointer = (char *) *strP;
+ opinfo_1 = opinfo;
/* We rely on md_operand to longjmp back to us.
This is done via gas_cgen_md_operand. */
@@ -355,6 +358,10 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
*strP = input_line_pointer;
input_line_pointer = hold;
+#ifdef TC_CGEN_PARSE_FIX_EXP
+ opinfo_1 = TC_CGEN_PARSE_FIX_EXP (opinfo_1, & exp);
+#endif
+
/* FIXME: Need to check `want'. */
switch (exp.X_op)
@@ -368,6 +375,8 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
*resultP = CGEN_PARSE_OPERAND_RESULT_ERROR;
break;
case O_constant:
+ if (want == CGEN_PARSE_OPERAND_SYMBOLIC)
+ goto de_fault;
*valueP = exp.X_add_number;
*resultP = CGEN_PARSE_OPERAND_RESULT_NUMBER;
break;
@@ -375,8 +384,9 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
*valueP = exp.X_add_number;
*resultP = CGEN_PARSE_OPERAND_RESULT_REGISTER;
break;
+ de_fault:
default:
- queue_fixup (opindex, opinfo, &exp);
+ queue_fixup (opindex, opinfo_1, &exp);
*valueP = 0;
*resultP = CGEN_PARSE_OPERAND_RESULT_QUEUED;
break;
@@ -515,7 +525,7 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
/* If we're recording insns as numbers (rather than a string of bytes),
target byte order handling is deferred until now. */
#if CGEN_INT_INSN_P
- cgen_put_insn_value (gas_cgen_cpu_desc, f, length, *buf);
+ cgen_put_insn_value (gas_cgen_cpu_desc, (unsigned char *) f, length, *buf);
#else
memcpy (f, buf, byte_len);
#endif
@@ -570,7 +580,7 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
should handle them all. */
void
-gas_cgen_md_apply_fix3 (fixP, valP, seg)
+gas_cgen_md_apply_fix (fixP, valP, seg)
fixS * fixP;
valueT * valP;
segT seg ATTRIBUTE_UNUSED;
@@ -609,17 +619,19 @@ gas_cgen_md_apply_fix3 (fixP, valP, seg)
#if CGEN_INT_INSN_P
{
CGEN_INSN_INT insn_value =
- cgen_get_insn_value (cd, where, CGEN_INSN_BITSIZE (insn));
+ cgen_get_insn_value (cd, (unsigned char *) where,
+ CGEN_INSN_BITSIZE (insn));
/* ??? 0 is passed for `pc'. */
errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields,
&insn_value, (bfd_vma) 0);
- cgen_put_insn_value (cd, where, CGEN_INSN_BITSIZE (insn),
- insn_value);
+ cgen_put_insn_value (cd, (unsigned char *) where,
+ CGEN_INSN_BITSIZE (insn), insn_value);
}
#else
/* ??? 0 is passed for `pc'. */
- errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields, where,
+ errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields,
+ (unsigned char *) where,
(bfd_vma) 0);
#endif
if (errmsg)
diff --git a/contrib/binutils/gas/cgen.h b/contrib/binutils/gas/cgen.h
index 8cf72af4b39b..acb9f48d459b 100644
--- a/contrib/binutils/gas/cgen.h
+++ b/contrib/binutils/gas/cgen.h
@@ -1,5 +1,6 @@
/* GAS cgen support.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef GAS_CGEN_H
#define GAS_CGEN_H
@@ -79,8 +80,8 @@ extern fixS * gas_cgen_record_fixup_exp (fragS *, int, const CGEN_INSN *,
int, const CGEN_OPERAND *, int,
expressionS *);
-/* md_apply_fix3 handler */
-extern void gas_cgen_md_apply_fix3 (fixS *, valueT *, segT);
+/* md_apply_fix handler */
+extern void gas_cgen_md_apply_fix (fixS *, valueT *, segT);
/* tc_gen_reloc handler */
extern arelent *gas_cgen_tc_gen_reloc (asection *, fixS *);
diff --git a/contrib/binutils/gas/cond.c b/contrib/binutils/gas/cond.c
index 870a7d5bf5c8..d6c32acc2532 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
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1995, 1997, 1998, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "as.h"
#include "macro.h"
@@ -102,7 +102,7 @@ s_ifdef (int test_defined)
considered to be undefined. */
is_defined =
symbolP != NULL
- && S_IS_DEFINED (symbolP)
+ && (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
&& S_GET_SEGMENT (symbolP) != reg_section;
cframe.ignoring = ! (test_defined ^ is_defined);
@@ -144,7 +144,7 @@ s_if (int arg)
}
else
{
- expression (&operand);
+ expression_and_evaluate (&operand);
if (operand.X_op != O_constant)
as_bad (_("non-constant expression in \".if\" statement"));
}
@@ -181,6 +181,40 @@ s_if (int arg)
demand_empty_rest_of_line ();
}
+/* Performs the .ifb (test_blank == 1) and
+ the .ifnb (test_blank == 0) pseudo op. */
+
+void
+s_ifb (int test_blank)
+{
+ struct conditional_frame cframe;
+
+ initialize_cframe (&cframe);
+
+ if (cframe.dead_tree)
+ cframe.ignoring = 1;
+ else
+ {
+ int is_eol;
+
+ SKIP_WHITESPACE ();
+ is_eol = is_end_of_line[(unsigned char) *input_line_pointer];
+ cframe.ignoring = (test_blank == !is_eol);
+ }
+
+ current_cframe = ((struct conditional_frame *)
+ obstack_copy (&cond_obstack, &cframe,
+ sizeof (cframe)));
+
+ if (LISTING_SKIP_COND ()
+ && cframe.ignoring
+ && (cframe.previous_cframe == NULL
+ || ! cframe.previous_cframe->ignoring))
+ listing_list (2);
+
+ ignore_rest_of_line ();
+}
+
/* Get a string for the MRI IFC or IFNC pseudo-ops. */
static char *
@@ -306,7 +340,7 @@ s_elseif (int arg)
/* Leading whitespace is part of operand. */
SKIP_WHITESPACE ();
- expression (&operand);
+ expression_and_evaluate (&operand);
if (operand.X_op != O_constant)
as_bad (_("non-constant expression in \".elseif\" statement"));
diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in
index fe2bc3fbcfbc..b15d8024aba2 100644
--- a/contrib/binutils/gas/config.in
+++ b/contrib/binutils/gas/config.in
@@ -1,188 +1,203 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-#undef C_ALLOCA
+/* Define if using AIX 5.2 value for C_WEAKEXT. */
+#undef AIX_WEAK_SUPPORT
-/* Define to empty if the keyword does not work. */
-#undef const
+/* assert broken? */
+#undef BROKEN_ASSERT
-/* 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. */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
#undef CRAY_STACKSEG_END
-/* Define if you have alloca, as a function or macro. */
-#undef HAVE_ALLOCA
+/* Compiling cross-assembler? */
+#undef CROSS_COMPILE
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Default architecture. */
+#undef DEFAULT_ARCH
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Default CRIS architecture. */
+#undef DEFAULT_CRIS_ARCH
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Default emulation. */
+#undef DEFAULT_EMULATION
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Supported emulations. */
+#undef EMULATIONS
-/* 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 NLS is requested */
+#undef ENABLE_NLS
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#undef YYTEXT_POINTER
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Is the prototype for getopt in <unistd.h> in the expected format? */
+#undef HAVE_DECL_GETOPT
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_VSNPRINTF
-/* Define if you have the getcwd function. */
+/* 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 if you have the getpagesize function. */
+/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
-/* Define if you have the munmap function. */
-#undef HAVE_MUNMAP
-
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
-
-/* Define if you have the remove function. */
-#undef HAVE_REMOVE
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
-/* Define if you have the sbrk function. */
-#undef HAVE_SBRK
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
-/* Define if you have the unlink function. */
-#undef HAVE_UNLINK
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
-/* Define if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
+/* Define to 1 if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define to 1 if you have the `remove' function. */
+#undef HAVE_REMOVE
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if you have the `sbrk' function. */
+#undef HAVE_SBRK
-/* Define if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
-/* Define if you have the <stdarg.h> header file. */
+/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
-/* Define if you have the <stdlib.h> header file. */
+/* 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 <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define if you have the stpcpy function */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
-/* Define if you have the <strings.h> header file. */
+/* 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 if you have the <sys/param.h> header file. */
+/* 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 if you have the <sys/types.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <values.h> header file. */
+/* 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 if you have the <varargs.h> header file. */
+/* Define to 1 if you have the <varargs.h> header file. */
#undef HAVE_VARARGS_H
-/* Name of package */
-#undef PACKAGE
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
-/* Version number of package */
-#undef VERSION
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
-/* Define if defaulting to ELF on SCO 5. */
-#undef SCO_ELF
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
-/* Using strict COFF? */
-#undef STRICTCOFF
+/* Using i386 COFF? */
+#undef I386COFF
-/* Define if default target is PowerPC Solaris. */
-#undef TARGET_SOLARIS_COMMENT
+/* Using m68k COFF? */
+#undef M68KCOFF
-/* Define as 1 if big endian. */
-#undef TARGET_BYTES_BIG_ENDIAN
+/* Using m88k COFF? */
+#undef M88KCOFF
-/* Default CPU for MIPS targets. */
+/* Default CPU for MIPS targets. */
#undef MIPS_CPU_STRING_DEFAULT
-/* Allow use of E_MIPS_ABI_O32 on MIPS targets. */
-#undef USE_E_MIPS_ABI_O32
-
-/* Generate 64-bit code by default on MIPS targets. */
+/* Generate 64-bit code by default on MIPS targets. */
#undef MIPS_DEFAULT_64BIT
-/* Choose a default ABI for MIPS targets. */
+/* Choose a default ABI for MIPS targets. */
#undef MIPS_DEFAULT_ABI
-/* Default architecture. */
-#undef DEFAULT_ARCH
+/* Define if environ is not declared in system header files. */
+#undef NEED_DECLARATION_ENVIRON
-/* Using cgen code? */
-#undef USING_CGEN
+/* Define if errno is not declared in system header files. */
+#undef NEED_DECLARATION_ERRNO
-/* Using i386 COFF? */
-#undef I386COFF
+/* Define if ffs is not declared in system header files. */
+#undef NEED_DECLARATION_FFS
-/* Using m68k COFF? */
-#undef M68KCOFF
+/* Define if free is not declared in system header files. */
+#undef NEED_DECLARATION_FREE
-/* Using m88k COFF? */
-#undef M88KCOFF
+/* Define if malloc is not declared in system header files. */
+#undef NEED_DECLARATION_MALLOC
+
+/* Define if sbrk is not declared in system header files. */
+#undef NEED_DECLARATION_SBRK
+
+/* Define if strstr is not declared in system header files. */
+#undef NEED_DECLARATION_STRSTR
/* a.out support? */
#undef OBJ_MAYBE_AOUT
@@ -202,81 +217,102 @@
/* generic support? */
#undef OBJ_MAYBE_GENERIC
-/* HP300 support? */
-#undef OBJ_MAYBE_HP300
-
/* IEEE support? */
#undef OBJ_MAYBE_IEEE
/* SOM support? */
#undef OBJ_MAYBE_SOM
-/* VMS support? */
-#undef OBJ_MAYBE_VMS
+/* Name of package */
+#undef PACKAGE
-/* Use emulation support? */
-#undef USE_EMULATIONS
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Supported emulations. */
-#undef EMULATIONS
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/* Default emulation. */
-#undef DEFAULT_EMULATION
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define if defaulting to ELF on SCO 5. */
+#undef SCO_ELF
+
+/* 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
-/* old COFF support? */
-#undef MANY_SEGMENTS
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
-/* Use BFD interface? */
-#undef BFD_ASSEMBLER
+/* Using strict COFF? */
+#undef STRICTCOFF
/* Target alias. */
#undef TARGET_ALIAS
+/* Define as 1 if big endian. */
+#undef TARGET_BYTES_BIG_ENDIAN
+
/* Canonical target. */
#undef TARGET_CANONICAL
/* Target CPU. */
#undef TARGET_CPU
-/* Target vendor. */
-#undef TARGET_VENDOR
-
/* Target OS. */
#undef TARGET_OS
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
+/* Define if default target is PowerPC Solaris. */
+#undef TARGET_SOLARIS_COMMENT
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Define if target is Symbian OS. */
+#undef TARGET_SYMBIAN
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
+/* Target vendor. */
+#undef TARGET_VENDOR
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
+/* Use emulation support? */
+#undef USE_EMULATIONS
-/* Compiling cross-assembler? */
-#undef CROSS_COMPILE
+/* Allow use of E_MIPS_ABI_O32 on MIPS targets. */
+#undef USE_E_MIPS_ABI_O32
-/* assert broken? */
-#undef BROKEN_ASSERT
+/* Using cgen code? */
+#undef USING_CGEN
-/* Define if strstr is not declared in system header files. */
-#undef NEED_DECLARATION_STRSTR
+/* Version number of package */
+#undef VERSION
-/* Define if malloc is not declared in system header files. */
-#undef NEED_DECLARATION_MALLOC
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
-/* Define if free is not declared in system header files. */
-#undef NEED_DECLARATION_FREE
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#undef YYTEXT_POINTER
-/* Define if sbrk is not declared in system header files. */
-#undef NEED_DECLARATION_SBRK
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
-/* Define if environ is not declared in system header files. */
-#undef NEED_DECLARATION_ENVIRON
+/* 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 if errno is not declared in system header files. */
-#undef NEED_DECLARATION_ERRNO
+/* 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/aout_gnu.h b/contrib/binutils/gas/config/aout_gnu.h
index 0942fd34a9b9..e17fda9465bc 100644
--- a/contrib/binutils/gas/config/aout_gnu.h
+++ b/contrib/binutils/gas/config/aout_gnu.h
@@ -1,6 +1,6 @@
/* This file is aout_gnu.h
- Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 2000
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 2000, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef __A_OUT_GNU_H__
#define __A_OUT_GNU_H__
@@ -26,15 +26,15 @@
relocations, and one which uses extended relocations.
Today, the extended reloc uses are
- TC_SPARC, TC_A29K
+ TC_SPARC
each must define the enum reloc_type
*/
-#define USE_EXTENDED_RELOC (defined(TC_SPARC) || defined(TC_A29K))
+#define USE_EXTENDED_RELOC defined(TC_SPARC)
-#if defined(TC_SPARC) || defined(TC_A29K)
+#if defined(TC_SPARC)
enum reloc_type
{
RELOC_8, RELOC_16, RELOC_32,/* simple relocations */
@@ -62,7 +62,7 @@ enum reloc_type
NO_RELOC
};
-#endif /* TC_SPARC or TC_A29K */
+#endif /* TC_SPARC */
#define __GNU_EXEC_MACROS__
diff --git a/contrib/binutils/gas/config/atof-ieee.c b/contrib/binutils/gas/config/atof-ieee.c
index 0ad39c9b3011..bf842e1717db 100644
--- a/contrib/binutils/gas/config/atof-ieee.c
+++ b/contrib/binutils/gas/config/atof-ieee.c
@@ -1,5 +1,5 @@
/* atof_ieee.c - turn a Flonum into an IEEE floating point number
- Copyright 1987, 1992, 1994, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1987, 1992, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,29 +16,25 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "as.h"
/* Flonums returned here. */
extern FLONUM_TYPE generic_floating_point_number;
-static int next_bits PARAMS ((int));
-static void unget_bits PARAMS ((int));
-static void make_invalid_floating_point_number PARAMS ((LITTLENUM_TYPE *));
-
extern const char EXP_CHARS[];
/* Precision in LittleNums. */
/* Don't count the gap in the m68k extended precision format. */
-#define MAX_PRECISION (5)
-#define F_PRECISION (2)
-#define D_PRECISION (4)
-#define X_PRECISION (5)
-#define P_PRECISION (5)
+#define MAX_PRECISION 5
+#define F_PRECISION 2
+#define D_PRECISION 4
+#define X_PRECISION 5
+#define P_PRECISION 5
/* Length in LittleNums of guard bits. */
-#define GUARD (2)
+#define GUARD 2
#ifndef TC_LARGEST_EXPONENT_IS_NORMAL
#define TC_LARGEST_EXPONENT_IS_NORMAL(PRECISION) 0
@@ -86,13 +82,13 @@ static int littlenums_left;
static LITTLENUM_TYPE *littlenum_pointer;
static int
-next_bits (number_of_bits)
- int number_of_bits;
+next_bits (int number_of_bits)
{
int return_value;
if (!littlenums_left)
- return (0);
+ return 0;
+
if (number_of_bits >= bits_left_in_littlenum)
{
return_value = mask[bits_left_in_littlenum] & *littlenum_pointer;
@@ -120,8 +116,7 @@ next_bits (number_of_bits)
/* Num had better be less than LITTLENUM_NUMBER_OF_BITS. */
static void
-unget_bits (num)
- int num;
+unget_bits (int num)
{
if (!littlenums_left)
{
@@ -141,8 +136,7 @@ unget_bits (num)
}
static void
-make_invalid_floating_point_number (words)
- LITTLENUM_TYPE *words;
+make_invalid_floating_point_number (LITTLENUM_TYPE *words)
{
as_bad (_("cannot create floating-point number"));
/* Zero the leftmost bit. */
@@ -165,10 +159,9 @@ make_invalid_floating_point_number (words)
/* Returns pointer past text consumed. */
char *
-atof_ieee (str, what_kind, words)
- char *str; /* Text to convert to binary. */
- int what_kind; /* 'd', 'f', 'g', 'h'. */
- LITTLENUM_TYPE *words; /* Build the binary here. */
+atof_ieee (char *str, /* Text to convert to binary. */
+ int what_kind, /* 'd', 'f', 'g', 'h'. */
+ LITTLENUM_TYPE *words) /* Build the binary here. */
{
/* Extra bits for zeroed low-order bits.
The 1st MAX_PRECISION are zeroed, the last contain flonum bits. */
@@ -242,7 +235,7 @@ atof_ieee (str, what_kind, words)
&generic_floating_point_number))
{
make_invalid_floating_point_number (words);
- return (NULL);
+ return NULL;
}
gen_to_words (words, precision, exponent_bits);
@@ -256,10 +249,7 @@ atof_ieee (str, what_kind, words)
/* Turn generic_floating_point_number into a real float/double/extended. */
int
-gen_to_words (words, precision, exponent_bits)
- LITTLENUM_TYPE *words;
- int precision;
- long exponent_bits;
+gen_to_words (LITTLENUM_TYPE *words, int precision, long exponent_bits)
{
int return_value = 0;
@@ -673,35 +663,11 @@ gen_to_words (words, precision, exponent_bits)
but return a floating exception because we can't encode
the number. */
*words &= ~(1 << (LITTLENUM_NUMBER_OF_BITS - 1));
-#if 0
- make_invalid_floating_point_number (words);
- return return_value;
-#endif
}
}
return return_value;
}
-#if 0
-/* Unused. */
-/* This routine is a real kludge. Someone really should do it better,
- but I'm too lazy, and I don't understand this stuff all too well
- anyway. (JF) */
-
-static void
-int_to_gen (x)
- long x;
-{
- char buf[20];
- char *bufp;
-
- sprintf (buf, "%ld", x);
- bufp = &buf[0];
- if (atof_generic (&bufp, ".", EXP_CHARS, &generic_floating_point_number))
- as_bad (_("Error converting number to floating point (Exponent overflow?)"));
-}
-#endif
-
#ifdef TEST
char *
print_gen (gen)
diff --git a/contrib/binutils/gas/config/atof-vax.c b/contrib/binutils/gas/config/atof-vax.c
index 7c9f04e7fd1c..75756904fb89 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
+ Copyright 1987, 1992, 1993, 1995, 1997, 1999, 2000, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,42 +16,33 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "as.h"
-static int atof_vax_sizeof PARAMS ((int));
-static int next_bits PARAMS ((int));
-static void make_invalid_floating_point_number PARAMS ((LITTLENUM_TYPE *));
-static int what_kind_of_float PARAMS ((int, int *, long *));
-static char *atof_vax PARAMS ((char *, int, LITTLENUM_TYPE *));
-
/* Precision in LittleNums. */
-#define MAX_PRECISION (8)
-#define H_PRECISION (8)
-#define G_PRECISION (4)
-#define D_PRECISION (4)
-#define F_PRECISION (2)
+#define MAX_PRECISION 8
+#define H_PRECISION 8
+#define G_PRECISION 4
+#define D_PRECISION 4
+#define F_PRECISION 2
/* Length in LittleNums of guard bits. */
-#define GUARD (2)
+#define GUARD 2
-int flonum_gen2vax PARAMS ((int format_letter, FLONUM_TYPE * f,
- LITTLENUM_TYPE * words));
+int flonum_gen2vax (int, FLONUM_TYPE *, LITTLENUM_TYPE *);
/* Number of chars in flonum type 'letter'. */
+
static int
-atof_vax_sizeof (letter)
- int letter;
+atof_vax_sizeof (int letter)
{
int return_value;
- /*
- * Permitting uppercase letters is probably a bad idea.
- * Please use only lower-cased letters in case the upper-cased
- * ones become unsupported!
- */
+ /* Permitting uppercase letters is probably a bad idea.
+ Please use only lower-cased letters in case the upper-cased
+ ones become unsupported! */
switch (letter)
{
case 'f':
@@ -75,8 +66,9 @@ atof_vax_sizeof (letter)
return_value = 0;
break;
}
- return (return_value);
-} /* atof_vax_sizeof */
+
+ return return_value;
+}
static const long mask[] =
{
@@ -116,14 +108,13 @@ static const long mask[] =
};
-/* Shared between flonum_gen2vax and next_bits */
+/* Shared between flonum_gen2vax and next_bits. */
static int bits_left_in_littlenum;
static LITTLENUM_TYPE *littlenum_pointer;
static LITTLENUM_TYPE *littlenum_end;
static int
-next_bits (number_of_bits)
- int number_of_bits;
+next_bits (int number_of_bits)
{
int return_value;
@@ -144,23 +135,22 @@ next_bits (number_of_bits)
bits_left_in_littlenum -= number_of_bits;
return_value = mask[number_of_bits] & ((*littlenum_pointer) >> bits_left_in_littlenum);
}
- return (return_value);
+ return return_value;
}
static void
-make_invalid_floating_point_number (words)
- LITTLENUM_TYPE *words;
+make_invalid_floating_point_number (LITTLENUM_TYPE *words)
{
- *words = 0x8000; /* Floating Reserved Operand Code */
+ *words = 0x8000; /* Floating Reserved Operand Code. */
}
+
static int /* 0 means letter is OK. */
-what_kind_of_float (letter, precisionP, exponent_bitsP)
- int letter; /* In: lowercase please. What kind of float? */
- int *precisionP; /* Number of 16-bit words in the float. */
- long *exponent_bitsP; /* Number of exponent bits. */
+what_kind_of_float (int letter, /* In: lowercase please. What kind of float? */
+ int *precisionP, /* Number of 16-bit words in the float. */
+ long *exponent_bitsP) /* Number of exponent bits. */
{
- int retval; /* 0: OK. */
+ int retval;
retval = 0;
switch (letter)
@@ -189,29 +179,24 @@ what_kind_of_float (letter, precisionP, exponent_bitsP)
retval = 69;
break;
}
- return (retval);
+ return retval;
}
-/***********************************************************************\
- * *
- * Warning: this returns 16-bit LITTLENUMs, because that is *
- * what the VAX thinks in. It is up to the caller to figure *
- * out any alignment problems and to conspire for the bytes/word *
- * to be emitted in the right order. Bigendians beware! *
- * *
- \***********************************************************************/
-
-static char * /* Return pointer past text consumed. */
-atof_vax (str, what_kind, words)
- char *str; /* Text to convert to binary. */
- int what_kind; /* 'd', 'f', 'g', 'h' */
- LITTLENUM_TYPE *words; /* Build the binary here. */
+/* Warning: this returns 16-bit LITTLENUMs, because that is
+ what the VAX thinks in. It is up to the caller to figure
+ out any alignment problems and to conspire for the bytes/word
+ to be emitted in the right order. Bigendians beware! */
+
+static char *
+atof_vax (char *str, /* Text to convert to binary. */
+ int what_kind, /* 'd', 'f', 'g', 'h' */
+ LITTLENUM_TYPE *words) /* Build the binary here. */
{
FLONUM_TYPE f;
LITTLENUM_TYPE bits[MAX_PRECISION + MAX_PRECISION + GUARD];
- /* Extra bits for zeroed low-order bits. */
- /* The 1st MAX_PRECISION are zeroed, */
- /* the last contain flonum bits. */
+ /* Extra bits for zeroed low-order bits.
+ The 1st MAX_PRECISION are zeroed,
+ the last contain flonum bits. */
char *return_value;
int precision; /* Number of 16-bit words in the format. */
long exponent_bits;
@@ -225,7 +210,7 @@ atof_vax (str, what_kind, words)
if (what_kind_of_float (what_kind, &precision, &exponent_bits))
{
- return_value = NULL; /* We lost. */
+ return_value = NULL;
make_invalid_floating_point_number (words);
}
@@ -233,37 +218,30 @@ atof_vax (str, what_kind, words)
{
memset (bits, '\0', sizeof (LITTLENUM_TYPE) * MAX_PRECISION);
- /* Use more LittleNums than seems */
- /* necessary: the highest flonum may have */
- /* 15 leading 0 bits, so could be useless. */
+ /* Use more LittleNums than seems
+ necessary: the highest flonum may have
+ 15 leading 0 bits, so could be useless. */
f.high = f.low + precision - 1 + GUARD;
if (atof_generic (&return_value, ".", "eE", &f))
{
make_invalid_floating_point_number (words);
- return_value = NULL; /* we lost */
- }
- else
- {
- if (flonum_gen2vax (what_kind, &f, words))
- {
- return_value = NULL;
- }
+ return_value = NULL;
}
+ else if (flonum_gen2vax (what_kind, &f, words))
+ return_value = NULL;
}
- return (return_value);
-} /* atof_vax() */
+
+ return return_value;
+}
-/*
- * In: a flonum, a vax floating point format.
- * Out: a vax floating-point bit pattern.
- */
-
-int /* 0: OK. */
-flonum_gen2vax (format_letter, f, words)
- int format_letter; /* One of 'd' 'f' 'g' 'h'. */
- FLONUM_TYPE *f;
- LITTLENUM_TYPE *words; /* Deliver answer here. */
+/* In: a flonum, a vax floating point format.
+ Out: a vax floating-point bit pattern. */
+
+int
+flonum_gen2vax (int format_letter, /* One of 'd' 'f' 'g' 'h'. */
+ FLONUM_TYPE *f,
+ LITTLENUM_TYPE *words) /* Deliver answer here. */
{
LITTLENUM_TYPE *lp;
int precision;
@@ -273,16 +251,14 @@ flonum_gen2vax (format_letter, f, words)
return_value = what_kind_of_float (format_letter, &precision, &exponent_bits);
if (return_value != 0)
- {
- make_invalid_floating_point_number (words);
- }
+ make_invalid_floating_point_number (words);
+
else
{
if (f->low > f->leader)
- {
- /* 0.0e0 seen. */
- memset (words, '\0', sizeof (LITTLENUM_TYPE) * precision);
- }
+ /* 0.0e0 seen. */
+ memset (words, '\0', sizeof (LITTLENUM_TYPE) * precision);
+
else
{
long exponent_1;
@@ -292,49 +268,31 @@ flonum_gen2vax (format_letter, f, words)
int exponent_skippage;
LITTLENUM_TYPE word1;
- /* JF: Deal with new Nan, +Inf and -Inf codes */
+ /* JF: Deal with new Nan, +Inf and -Inf codes. */
if (f->sign != '-' && f->sign != '+')
{
make_invalid_floating_point_number (words);
return return_value;
}
- /*
- * All vaxen floating_point formats (so far) have:
- * Bit 15 is sign bit.
- * Bits 14:n are excess-whatever exponent.
- * Bits n-1:0 (if any) are most significant bits of fraction.
- * Bits 15:0 of the next word are the next most significant bits.
- * And so on for each other word.
- *
- * All this to be compatible with a KF11?? (Which is still faster
- * than lots of vaxen I can think of, but it also has higher
- * maintenance costs ... sigh).
- *
- * So we need: number of bits of exponent, number of bits of
- * mantissa.
- */
-
-#ifdef NEVER /******* This zeroing seems redundant - Dean 3may86 **********/
- /*
- * No matter how few bits we got back from the atof()
- * routine, add enough zero littlenums so the rest of the
- * code won't run out of "significant" bits in the mantissa.
- */
- {
- LITTLENUM_TYPE *ltp;
- for (ltp = f->leader + 1;
- ltp <= f->low + precision;
- ltp++)
- {
- *ltp = 0;
- }
- }
-#endif
+
+ /* All vaxen floating_point formats (so far) have:
+ Bit 15 is sign bit.
+ Bits 14:n are excess-whatever exponent.
+ Bits n-1:0 (if any) are most significant bits of fraction.
+ Bits 15:0 of the next word are the next most significant bits.
+ And so on for each other word.
+
+ All this to be compatible with a KF11?? (Which is still faster
+ than lots of vaxen I can think of, but it also has higher
+ maintenance costs ... sigh).
+
+ So we need: number of bits of exponent, number of bits of
+ mantissa. */
bits_left_in_littlenum = LITTLENUM_NUMBER_OF_BITS;
littlenum_pointer = f->leader;
littlenum_end = f->low;
- /* Seek (and forget) 1st significant bit */
+ /* Seek (and forget) 1st significant bit. */
for (exponent_skippage = 0;
!next_bits (1);
exponent_skippage++);;
@@ -350,24 +308,19 @@ flonum_gen2vax (format_letter, f, words)
if (exponent_4 & ~mask[exponent_bits])
{
- /*
- * Exponent overflow. Lose immediately.
- */
-
+ /* Exponent overflow. Lose immediately. */
make_invalid_floating_point_number (words);
- /*
- * We leave return_value alone: admit we read the
- * number, but return a floating exception
- * because we can't encode the number.
- */
+ /* We leave return_value alone: admit we read the
+ number, but return a floating exception
+ because we can't encode the number. */
}
else
{
lp = words;
- /* Word 1. Sign, exponent and perhaps high bits. */
- /* Assume 2's complement integers. */
+ /* Word 1. Sign, exponent and perhaps high bits.
+ Assume 2's complement integers. */
word1 = (((exponent_4 & mask[exponent_bits]) << (15 - exponent_bits))
| ((f->sign == '+') ? 0 : 0x8000)
| next_bits (15 - exponent_bits));
@@ -375,32 +328,26 @@ flonum_gen2vax (format_letter, f, words)
/* The rest of the words are just mantissa bits. */
for (; lp < words + precision; lp++)
- {
- *lp = next_bits (LITTLENUM_NUMBER_OF_BITS);
- }
+ *lp = next_bits (LITTLENUM_NUMBER_OF_BITS);
if (next_bits (1))
{
- /*
- * Since the NEXT bit is a 1, round UP the mantissa.
- * The cunning design of these hidden-1 floats permits
- * us to let the mantissa overflow into the exponent, and
- * it 'does the right thing'. However, we lose if the
- * highest-order bit of the lowest-order word flips.
- * Is that clear?
- */
-
+ /* Since the NEXT bit is a 1, round UP the mantissa.
+ The cunning design of these hidden-1 floats permits
+ us to let the mantissa overflow into the exponent, and
+ it 'does the right thing'. However, we lose if the
+ highest-order bit of the lowest-order word flips.
+ Is that clear? */
unsigned long carry;
/*
- #if (sizeof(carry)) < ((sizeof(bits[0]) * BITS_PER_CHAR) + 2)
- Please allow at least 1 more bit in carry than is in a LITTLENUM.
- We need that extra bit to hold a carry during a LITTLENUM carry
- propagation. Another extra bit (kept 0) will assure us that we
- don't get a sticky sign bit after shifting right, and that
- permits us to propagate the carry without any masking of bits.
- #endif
- */
+ #if (sizeof(carry)) < ((sizeof(bits[0]) * BITS_PER_CHAR) + 2)
+ Please allow at least 1 more bit in carry than is in a LITTLENUM.
+ We need that extra bit to hold a carry during a LITTLENUM carry
+ propagation. Another extra bit (kept 0) will assure us that we
+ don't get a sticky sign bit after shifting right, and that
+ permits us to propagate the carry without any masking of bits.
+ #endif */
for (carry = 1, lp--;
carry && (lp >= words);
lp--)
@@ -413,68 +360,61 @@ flonum_gen2vax (format_letter, f, words)
if ((word1 ^ *words) & (1 << (LITTLENUM_NUMBER_OF_BITS - 1)))
{
make_invalid_floating_point_number (words);
- /*
- * We leave return_value alone: admit we read the
- * number, but return a floating exception
- * because we can't encode the number.
- */
+ /* We leave return_value alone: admit we read the
+ number, but return a floating exception
+ because we can't encode the number. */
}
- } /* if (we needed to round up) */
- } /* if (exponent overflow) */
- } /* if (0.0e0) */
- } /* if (float_type was OK) */
- return (return_value);
-} /* flonum_gen2vax() */
-
-/* JF this used to be in vax.c but this looks like a better place for it */
-
-/*
- * md_atof()
- *
- * In: input_line_pointer->the 1st character of a floating-point
- * number.
- * 1 letter denoting the type of statement that wants a
- * binary floating point number returned.
- * Address of where to build floating point literal.
- * Assumed to be 'big enough'.
- * Address of where to return size of literal (in chars).
- *
- * Out: Input_line_pointer->of next char after floating number.
- * Error message, or 0.
- * Floating point literal.
- * Number of chars we used for the literal.
- */
-
-#define MAXIMUM_NUMBER_OF_LITTLENUMS (8) /* For .hfloats. */
+ }
+ }
+ }
+ }
+ return return_value;
+}
+
+/* JF this used to be in vax.c but this looks like a better place for it. */
+
+/* In: input_line_pointer->the 1st character of a floating-point
+ number.
+ 1 letter denoting the type of statement that wants a
+ binary floating point number returned.
+ Address of where to build floating point literal.
+ Assumed to be 'big enough'.
+ Address of where to return size of literal (in chars).
+
+ Out: Input_line_pointer->of next char after floating number.
+ Error message, or 0.
+ Floating point literal.
+ Number of chars we used for the literal. */
+
+#define MAXIMUM_NUMBER_OF_LITTLENUMS 8 /* For .hfloats. */
char *
-md_atof (what_statement_type, literalP, sizeP)
- int what_statement_type;
- char *literalP;
- int *sizeP;
+md_atof (int what_statement_type,
+ char *literalP,
+ int *sizeP)
{
LITTLENUM_TYPE words[MAXIMUM_NUMBER_OF_LITTLENUMS];
- register char kind_of_float;
- register int number_of_chars;
- register LITTLENUM_TYPE *littlenumP;
+ char kind_of_float;
+ int number_of_chars;
+ LITTLENUM_TYPE *littlenumP;
switch (what_statement_type)
{
- case 'F': /* .float */
- case 'f': /* .ffloat */
+ case 'F':
+ case 'f':
kind_of_float = 'f';
break;
- case 'D': /* .double */
- case 'd': /* .dfloat */
+ case 'D':
+ case 'd':
kind_of_float = 'd';
break;
- case 'g': /* .gfloat */
+ case 'g':
kind_of_float = 'g';
break;
- case 'h': /* .hfloat */
+ case 'h':
kind_of_float = 'h';
break;
@@ -485,17 +425,15 @@ md_atof (what_statement_type, literalP, sizeP)
if (kind_of_float)
{
- register LITTLENUM_TYPE *limit;
+ LITTLENUM_TYPE *limit;
input_line_pointer = atof_vax (input_line_pointer,
kind_of_float,
words);
- /*
- * The atof_vax() builds up 16-bit numbers.
- * Since the assembler may not be running on
- * a little-endian machine, be very careful about
- * converting words to chars.
- */
+ /* The atof_vax() builds up 16-bit numbers.
+ Since the assembler may not be running on
+ a little-endian machine, be very careful about
+ converting words to chars. */
number_of_chars = atof_vax_sizeof (kind_of_float);
know (number_of_chars <= MAXIMUM_NUMBER_OF_LITTLENUMS * sizeof (LITTLENUM_TYPE));
limit = words + (number_of_chars / sizeof (LITTLENUM_TYPE));
@@ -506,12 +444,8 @@ md_atof (what_statement_type, literalP, sizeP)
};
}
else
- {
- number_of_chars = 0;
- };
+ number_of_chars = 0;
*sizeP = number_of_chars;
return kind_of_float ? NULL : _("Bad call to md_atof()");
}
-
-/* end of atof-vax.c */
diff --git a/contrib/binutils/gas/config/itbl-mips.h b/contrib/binutils/gas/config/itbl-mips.h
index 8ecb9ecc4ecd..cfa072f298a0 100644
--- a/contrib/binutils/gas/config/itbl-mips.h
+++ b/contrib/binutils/gas/config/itbl-mips.h
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Defines for Mips itbl cop support */
diff --git a/contrib/binutils/gas/config/obj-aout.c b/contrib/binutils/gas/config/obj-aout.c
index 6e5fd29191a1..e99e63d9574a 100644
--- a/contrib/binutils/gas/config/obj-aout.c
+++ b/contrib/binutils/gas/config/obj-aout.c
@@ -1,110 +1,33 @@
/* a.out object file format
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-This file is part of GAS, the GNU Assembler.
+ 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 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.
+ GAS is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ the GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with GAS; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+ 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 OBJ_HEADER "obj-aout.h"
#include "as.h"
-#ifdef BFD_ASSEMBLER
#undef NO_RELOC
#include "aout/aout64.h"
-#endif
#include "obstack.h"
-#ifndef BFD_ASSEMBLER
-/* in: segT out: N_TYPE bits */
-const short seg_N_TYPE[] =
-{
- N_ABS,
- N_TEXT,
- N_DATA,
- N_BSS,
- N_UNDF, /* unknown */
- N_UNDF, /* error */
- N_UNDF, /* expression */
- N_UNDF, /* debug */
- N_UNDF, /* ntv */
- N_UNDF, /* ptv */
- N_REGISTER, /* register */
-};
-
-const segT N_TYPE_seg[N_TYPE + 2] =
-{ /* N_TYPE == 0x1E = 32-2 */
- SEG_UNKNOWN, /* N_UNDF == 0 */
- SEG_GOOF,
- SEG_ABSOLUTE, /* N_ABS == 2 */
- SEG_GOOF,
- SEG_TEXT, /* N_TEXT == 4 */
- SEG_GOOF,
- SEG_DATA, /* N_DATA == 6 */
- SEG_GOOF,
- SEG_BSS, /* N_BSS == 8 */
- SEG_GOOF,
- SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF,
- SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF,
- SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF,
- SEG_REGISTER, /* dummy N_REGISTER for regs = 30 */
- SEG_GOOF,
-};
-#endif
-
-static void obj_aout_line PARAMS ((int));
-static void obj_aout_weak PARAMS ((int));
-static void obj_aout_type PARAMS ((int));
-
-const pseudo_typeS aout_pseudo_table[] =
-{
- {"line", obj_aout_line, 0}, /* source code line number */
- {"ln", obj_aout_line, 0}, /* coff line number that we use anyway */
-
- {"weak", obj_aout_weak, 0}, /* mark symbol as weak. */
-
- {"type", obj_aout_type, 0},
-
- /* coff debug pseudos (ignored) */
- {"def", s_ignore, 0},
- {"dim", s_ignore, 0},
- {"endef", s_ignore, 0},
- {"ident", s_ignore, 0},
- {"line", s_ignore, 0},
- {"ln", s_ignore, 0},
- {"scl", s_ignore, 0},
- {"size", s_ignore, 0},
- {"tag", s_ignore, 0},
- {"val", s_ignore, 0},
- {"version", s_ignore, 0},
-
- {"optim", s_ignore, 0}, /* For sun386i cc (?) */
-
- /* other stuff */
- {"ABORT", s_abort, 0},
-
- {NULL, NULL, 0} /* end sentinel */
-}; /* aout_pseudo_table */
-
-#ifdef BFD_ASSEMBLER
-
void
-obj_aout_frob_symbol (sym, punt)
- symbolS *sym;
- int *punt ATTRIBUTE_UNUSED;
+obj_aout_frob_symbol (symbolS *sym, int *punt ATTRIBUTE_UNUSED)
{
flagword flags;
asection *sec;
@@ -184,23 +107,18 @@ obj_aout_frob_symbol (sym, punt)
}
}
else
- {
- symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
- }
+ symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING;
aout_symbol (symbol_get_bfdsym (sym))->type = type;
/* Double check weak symbols. */
- if (S_IS_WEAK (sym))
- {
- if (S_IS_COMMON (sym))
- as_bad (_("Symbol `%s' can not be both weak and common"),
- S_GET_NAME (sym));
- }
+ if (S_IS_WEAK (sym) && S_IS_COMMON (sym))
+ as_bad (_("Symbol `%s' can not be both weak and common"),
+ S_GET_NAME (sym));
}
void
-obj_aout_frob_file_before_fix ()
+obj_aout_frob_file_before_fix (void)
{
/* Relocation processing may require knowing the VMAs of the sections.
Since writing to a section will cause the BFD back end to compute the
@@ -208,166 +126,29 @@ obj_aout_frob_file_before_fix ()
bfd_byte b = 0;
bfd_boolean x = TRUE;
if (bfd_section_size (stdoutput, text_section) != 0)
- {
- x = bfd_set_section_contents (stdoutput, text_section, &b, (file_ptr) 0,
- (bfd_size_type) 1);
- }
+ x = bfd_set_section_contents (stdoutput, text_section, &b, (file_ptr) 0,
+ (bfd_size_type) 1);
else if (bfd_section_size (stdoutput, data_section) != 0)
- {
- x = bfd_set_section_contents (stdoutput, data_section, &b, (file_ptr) 0,
- (bfd_size_type) 1);
- }
- assert (x);
-}
-
-#else /* ! BFD_ASSEMBLER */
-
-/* Relocation. */
-
-/*
- * emit_relocations()
- *
- * Crawl along a fixS chain. Emit the segment's relocations.
- */
-void
-obj_emit_relocations (where, fixP, segment_address_in_file)
- char **where;
- fixS *fixP; /* Fixup chain for this segment. */
- relax_addressT segment_address_in_file;
-{
- for (; fixP; fixP = fixP->fx_next)
- if (fixP->fx_done == 0)
- {
- symbolS *sym;
-
- sym = fixP->fx_addsy;
- while (sym->sy_value.X_op == O_symbol
- && (! S_IS_DEFINED (sym) || S_IS_COMMON (sym)))
- sym = sym->sy_value.X_add_symbol;
- fixP->fx_addsy = sym;
-
- if (! sym->sy_resolved && ! S_IS_DEFINED (sym))
- {
- char *file;
- unsigned int line;
-
- if (expr_symbol_where (sym, &file, &line))
- as_bad_where (file, line, _("unresolved relocation"));
- else
- as_bad (_("bad relocation: symbol `%s' not in symbol table"),
- S_GET_NAME (sym));
- }
-
- tc_aout_fix_to_chars (*where, fixP, segment_address_in_file);
- *where += md_reloc_size;
- }
-}
-
-#ifndef obj_header_append
-/* Aout file generation & utilities */
-void
-obj_header_append (where, headers)
- char **where;
- object_headers *headers;
-{
- tc_headers_hook (headers);
-
-#ifdef CROSS_COMPILE
- md_number_to_chars (*where, headers->header.a_info, sizeof (headers->header.a_info));
- *where += sizeof (headers->header.a_info);
- md_number_to_chars (*where, headers->header.a_text, sizeof (headers->header.a_text));
- *where += sizeof (headers->header.a_text);
- md_number_to_chars (*where, headers->header.a_data, sizeof (headers->header.a_data));
- *where += sizeof (headers->header.a_data);
- md_number_to_chars (*where, headers->header.a_bss, sizeof (headers->header.a_bss));
- *where += sizeof (headers->header.a_bss);
- md_number_to_chars (*where, headers->header.a_syms, sizeof (headers->header.a_syms));
- *where += sizeof (headers->header.a_syms);
- md_number_to_chars (*where, headers->header.a_entry, sizeof (headers->header.a_entry));
- *where += sizeof (headers->header.a_entry);
- md_number_to_chars (*where, headers->header.a_trsize, sizeof (headers->header.a_trsize));
- *where += sizeof (headers->header.a_trsize);
- md_number_to_chars (*where, headers->header.a_drsize, sizeof (headers->header.a_drsize));
- *where += sizeof (headers->header.a_drsize);
-
-#else /* CROSS_COMPILE */
-
- append (where, (char *) &headers->header, sizeof (headers->header));
-#endif /* CROSS_COMPILE */
-
-}
-#endif /* ! defined (obj_header_append) */
-
-void
-obj_symbol_to_chars (where, symbolP)
- char **where;
- symbolS *symbolP;
-{
- md_number_to_chars ((char *) &(S_GET_OFFSET (symbolP)), S_GET_OFFSET (symbolP), sizeof (S_GET_OFFSET (symbolP)));
- md_number_to_chars ((char *) &(S_GET_DESC (symbolP)), S_GET_DESC (symbolP), sizeof (S_GET_DESC (symbolP)));
- md_number_to_chars ((char *) &(symbolP->sy_symbol.n_value), S_GET_VALUE (symbolP), sizeof (symbolP->sy_symbol.n_value));
+ x = bfd_set_section_contents (stdoutput, data_section, &b, (file_ptr) 0,
+ (bfd_size_type) 1);
- append (where, (char *) &symbolP->sy_symbol, sizeof (obj_symbol_type));
-}
-
-void
-obj_emit_symbols (where, symbol_rootP)
- char **where;
- symbolS *symbol_rootP;
-{
- symbolS *symbolP;
-
- /* Emit all symbols left in the symbol chain. */
- for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
- {
- /* Used to save the offset of the name. It is used to point
- to the string in memory but must be a file offset. */
- register char *temp;
-
- temp = S_GET_NAME (symbolP);
- S_SET_OFFSET (symbolP, symbolP->sy_name_offset);
-
- /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */
- if (!S_IS_DEBUG (symbolP) && !S_IS_DEFINED (symbolP))
- S_SET_EXTERNAL (symbolP);
-
- /* Adjust the type of a weak symbol. */
- if (S_GET_WEAK (symbolP))
- {
- switch (S_GET_TYPE (symbolP))
- {
- case N_UNDF: S_SET_TYPE (symbolP, N_WEAKU); break;
- case N_ABS: S_SET_TYPE (symbolP, N_WEAKA); break;
- case N_TEXT: S_SET_TYPE (symbolP, N_WEAKT); break;
- case N_DATA: S_SET_TYPE (symbolP, N_WEAKD); break;
- case N_BSS: S_SET_TYPE (symbolP, N_WEAKB); break;
- default: as_bad (_("%s: bad type for weak symbol"), temp); break;
- }
- }
-
- obj_symbol_to_chars (where, symbolP);
- S_SET_NAME (symbolP, temp);
- }
+ assert (x);
}
-#endif /* ! BFD_ASSEMBLER */
-
static void
-obj_aout_line (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_aout_line (int ignore ATTRIBUTE_UNUSED)
{
/* Assume delimiter is part of expression.
BSD4.2 as fails with delightful bug, so we
are not being incompatible here. */
new_logical_line ((char *) NULL, (int) (get_absolute_expression ()));
demand_empty_rest_of_line ();
-} /* obj_aout_line() */
+}
/* Handle .weak. This is a GNU extension. */
static void
-obj_aout_weak (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_aout_weak (int ignore ATTRIBUTE_UNUSED)
{
char *name;
int c;
@@ -399,8 +180,7 @@ obj_aout_weak (ignore)
we can't parse it. */
static void
-obj_aout_type (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_aout_type (int ignore ATTRIBUTE_UNUSED)
{
char *name;
int c;
@@ -419,17 +199,9 @@ obj_aout_type (ignore)
{
++input_line_pointer;
if (strncmp (input_line_pointer, "object", 6) == 0)
-#ifdef BFD_ASSEMBLER
- aout_symbol (symbol_get_bfdsym (sym))->other = 1;
-#else
- S_SET_OTHER (sym, 1);
-#endif
+ S_SET_OTHER (sym, 1);
else if (strncmp (input_line_pointer, "function", 8) == 0)
-#ifdef BFD_ASSEMBLER
- aout_symbol (symbol_get_bfdsym (sym))->other = 2;
-#else
- S_SET_OTHER (sym, 2);
-#endif
+ S_SET_OTHER (sym, 2);
}
}
@@ -437,271 +209,136 @@ obj_aout_type (ignore)
s_ignore (0);
}
-#ifndef BFD_ASSEMBLER
-
-void
-obj_crawl_symbol_chain (headers)
- object_headers *headers;
-{
- symbolS *symbolP;
- symbolS **symbolPP;
- int symbol_number = 0;
-
- tc_crawl_symbol_chain (headers);
-
- symbolPP = &symbol_rootP; /*->last symbol chain link. */
- while ((symbolP = *symbolPP) != NULL)
- {
- if (symbolP->sy_mri_common)
- {
- if (S_IS_EXTERNAL (symbolP))
- as_bad (_("%s: global symbols not supported in common sections"),
- S_GET_NAME (symbolP));
- *symbolPP = symbol_next (symbolP);
- continue;
- }
-
- if (flag_readonly_data_in_text && (S_GET_SEGMENT (symbolP) == SEG_DATA))
- {
- S_SET_SEGMENT (symbolP, SEG_TEXT);
- } /* if pushing data into text */
-
- resolve_symbol_value (symbolP);
-
- /* Skip symbols which were equated to undefined or common
- symbols. Also skip defined uncommon symbols which can
- be resolved since in this case they should have been
- resolved to a non-symbolic constant. */
- if (symbolP->sy_value.X_op == O_symbol
- && (! S_IS_DEFINED (symbolP)
- || S_IS_COMMON (symbolP)
- || symbol_resolved_p (symbolP)))
- {
- *symbolPP = symbol_next (symbolP);
- continue;
- }
-
- /* OK, here is how we decide which symbols go out into the brave
- new symtab. Symbols that do are:
-
- * symbols with no name (stabd's?)
- * symbols with debug info in their N_TYPE
-
- Symbols that don't are:
- * symbols that are registers
- * symbols with \1 as their 3rd character (numeric labels)
- * "local labels" as defined by S_LOCAL_NAME(name) if the -L
- switch was passed to gas.
-
- All other symbols are output. We complain if a deleted
- symbol was marked external. */
-
- if (!S_IS_REGISTER (symbolP)
- && (!S_GET_NAME (symbolP)
- || S_IS_DEBUG (symbolP)
- || !S_IS_DEFINED (symbolP)
- || S_IS_EXTERNAL (symbolP)
- || (S_GET_NAME (symbolP)[0] != '\001'
- && (flag_keep_locals || !S_LOCAL_NAME (symbolP)))))
- {
- symbolP->sy_number = symbol_number++;
-
- /* The + 1 after strlen account for the \0 at the
- end of each string */
- if (!S_IS_STABD (symbolP))
- {
- /* Ordinary case. */
- symbolP->sy_name_offset = string_byte_count;
- string_byte_count += strlen (S_GET_NAME (symbolP)) + 1;
- }
- else /* .Stabd case. */
- symbolP->sy_name_offset = 0;
- symbolPP = &symbolP->sy_next;
- }
- else
- {
- if (S_IS_EXTERNAL (symbolP) || !S_IS_DEFINED (symbolP))
- /* This warning should never get triggered any more.
- Well, maybe if you're doing twisted things with
- register names... */
- {
- as_bad (_("Local symbol %s never defined."), decode_local_label_name (S_GET_NAME (symbolP)));
- } /* oops. */
-
- /* Unhook it from the chain */
- *symbolPP = symbol_next (symbolP);
- } /* if this symbol should be in the output */
- } /* for each symbol */
-
- H_SET_SYMBOL_TABLE_SIZE (headers, symbol_number);
-}
-
-/*
- * Find strings by crawling along symbol table chain.
- */
-
-void
-obj_emit_strings (where)
- char **where;
-{
- symbolS *symbolP;
-
-#ifdef CROSS_COMPILE
- /* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK */
- md_number_to_chars (*where, string_byte_count, sizeof (string_byte_count));
- *where += sizeof (string_byte_count);
-#else /* CROSS_COMPILE */
- append (where, (char *) &string_byte_count, (unsigned long) sizeof (string_byte_count));
-#endif /* CROSS_COMPILE */
-
- for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
- {
- if (S_GET_NAME (symbolP))
- append (&next_object_file_charP, S_GET_NAME (symbolP),
- (unsigned long) (strlen (S_GET_NAME (symbolP)) + 1));
- } /* walk symbol chain */
-}
-
-#ifndef AOUT_VERSION
-#define AOUT_VERSION 0
-#endif
-
-void
-obj_pre_write_hook (headers)
- object_headers *headers;
-{
- H_SET_DYNAMIC (headers, 0);
- H_SET_VERSION (headers, AOUT_VERSION);
- H_SET_MACHTYPE (headers, AOUT_MACHTYPE);
- tc_aout_pre_write_hook (headers);
-}
-
-#endif /* ! BFD_ASSEMBLER */
-
-#ifdef BFD_ASSEMBLER
-
/* Support for an AOUT emulation. */
-static void aout_pop_insert PARAMS ((void));
-static int obj_aout_s_get_other PARAMS ((symbolS *));
-static void obj_aout_s_set_other PARAMS ((symbolS *, int));
-static int obj_aout_s_get_desc PARAMS ((symbolS *));
-static void obj_aout_s_set_desc PARAMS ((symbolS *, int));
-static int obj_aout_s_get_type PARAMS ((symbolS *));
-static void obj_aout_s_set_type PARAMS ((symbolS *, int));
-static int obj_aout_separate_stab_sections PARAMS ((void));
-static int obj_aout_sec_sym_ok_for_reloc PARAMS ((asection *));
-static void obj_aout_process_stab PARAMS ((segT, int, const char *, int, int, int));
-
static void
-aout_pop_insert ()
+aout_pop_insert (void)
{
pop_insert (aout_pseudo_table);
}
static int
-obj_aout_s_get_other (sym)
- symbolS *sym;
+obj_aout_s_get_other (symbolS *sym)
{
return aout_symbol (symbol_get_bfdsym (sym))->other;
}
static void
-obj_aout_s_set_other (sym, o)
- symbolS *sym;
- int o;
+obj_aout_s_set_other (symbolS *sym, int o)
{
aout_symbol (symbol_get_bfdsym (sym))->other = o;
}
static int
-obj_aout_sec_sym_ok_for_reloc (sec)
- asection *sec ATTRIBUTE_UNUSED;
+obj_aout_sec_sym_ok_for_reloc (asection *sec ATTRIBUTE_UNUSED)
{
return obj_sec_sym_ok_for_reloc (sec);
}
static void
-obj_aout_process_stab (seg, w, s, t, o, d)
- segT seg ATTRIBUTE_UNUSED;
- int w;
- const char *s;
- int t;
- int o;
- int d;
+obj_aout_process_stab (segT seg ATTRIBUTE_UNUSED,
+ int w,
+ const char *s,
+ int t,
+ int o,
+ int d)
{
aout_process_stab (w, s, t, o, d);
}
static int
-obj_aout_s_get_desc (sym)
- symbolS *sym;
+obj_aout_s_get_desc (symbolS *sym)
{
return aout_symbol (symbol_get_bfdsym (sym))->desc;
}
static void
-obj_aout_s_set_desc (sym, d)
- symbolS *sym;
- int d;
+obj_aout_s_set_desc (symbolS *sym, int d)
{
aout_symbol (symbol_get_bfdsym (sym))->desc = d;
}
static int
-obj_aout_s_get_type (sym)
- symbolS *sym;
+obj_aout_s_get_type (symbolS *sym)
{
return aout_symbol (symbol_get_bfdsym (sym))->type;
}
static void
-obj_aout_s_set_type (sym, t)
- symbolS *sym;
- int t;
+obj_aout_s_set_type (symbolS *sym, int t)
{
aout_symbol (symbol_get_bfdsym (sym))->type = t;
}
static int
-obj_aout_separate_stab_sections ()
+obj_aout_separate_stab_sections (void)
{
return 0;
}
/* When changed, make sure these table entries match the single-format
definitions in obj-aout.h. */
+
const struct format_ops aout_format_ops =
{
bfd_target_aout_flavour,
- 1, /* dfl_leading_underscore */
- 0, /* emit_section_symbols */
- 0, /* begin */
- 0, /* app_file */
+ 1, /* dfl_leading_underscore. */
+ 0, /* emit_section_symbols. */
+ 0, /* begin. */
+ 0, /* app_file. */
obj_aout_frob_symbol,
- 0, /* frob_file */
- 0, /* frob_file_before_adjust */
+ 0, /* frob_file. */
+ 0, /* frob_file_before_adjust. */
obj_aout_frob_file_before_fix,
- 0, /* frob_file_after_relocs */
- 0, /* s_get_size */
- 0, /* s_set_size */
- 0, /* s_get_align */
- 0, /* s_set_align */
+ 0, /* frob_file_after_relocs. */
+ 0, /* s_get_size. */
+ 0, /* s_set_size. */
+ 0, /* s_get_align. */
+ 0, /* s_set_align. */
obj_aout_s_get_other,
obj_aout_s_set_other,
obj_aout_s_get_desc,
obj_aout_s_set_desc,
obj_aout_s_get_type,
obj_aout_s_set_type,
- 0, /* copy_symbol_attributes */
- 0, /* generate_asm_lineno */
+ 0, /* copy_symbol_attributes. */
+ 0, /* generate_asm_lineno. */
obj_aout_process_stab,
obj_aout_separate_stab_sections,
- 0, /* init_stab_section */
+ 0, /* init_stab_section. */
obj_aout_sec_sym_ok_for_reloc,
aout_pop_insert,
- 0, /* ecoff_set_ext */
- 0, /* read_begin_hook */
- 0 /* symbol_new_hook */
+ 0, /* ecoff_set_ext. */
+ 0, /* read_begin_hook. */
+ 0 /* symbol_new_hook. */
+};
+
+const pseudo_typeS aout_pseudo_table[] =
+{
+ {"line", obj_aout_line, 0}, /* Source code line number. */
+ {"ln", obj_aout_line, 0}, /* COFF line number that we use anyway. */
+
+ {"weak", obj_aout_weak, 0}, /* Mark symbol as weak. */
+
+ {"type", obj_aout_type, 0},
+
+ /* coff debug pseudos (ignored) */
+ {"def", s_ignore, 0},
+ {"dim", s_ignore, 0},
+ {"endef", s_ignore, 0},
+ {"ident", s_ignore, 0},
+ {"line", s_ignore, 0},
+ {"ln", s_ignore, 0},
+ {"scl", s_ignore, 0},
+ {"size", s_ignore, 0},
+ {"tag", s_ignore, 0},
+ {"val", s_ignore, 0},
+ {"version", s_ignore, 0},
+
+ {"optim", s_ignore, 0}, /* For sun386i cc (?). */
+
+ /* other stuff */
+ {"ABORT", s_abort, 0},
+
+ {NULL, NULL, 0}
};
-#endif /* BFD_ASSEMBLER */
diff --git a/contrib/binutils/gas/config/obj-aout.h b/contrib/binutils/gas/config/obj-aout.h
index 23a2907acc56..4acc4201eb9c 100644
--- a/contrib/binutils/gas/config/obj-aout.h
+++ b/contrib/binutils/gas/config/obj-aout.h
@@ -1,6 +1,6 @@
/* obj-aout.h, a.out object file format for gas, the assembler.
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,56 +16,30 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Tag to validate a.out object file format processing */
#define OBJ_AOUT 1
#include "targ-cpu.h"
-#ifdef BFD_ASSEMBLER
-
#include "bfd/libaout.h"
#define OUTPUT_FLAVOR bfd_target_aout_flavour
-#else /* ! BFD_ASSEMBLER */
-
-#ifndef VMS
-#include "aout_gnu.h" /* Needed to define struct nlist. Sigh. */
-#else
-#include "a_out.h"
-#endif
-
-#ifndef AOUT_MACHTYPE
-#define AOUT_MACHTYPE 0
-#endif /* AOUT_MACHTYPE */
-
-extern const short seg_N_TYPE[];
-extern const segT N_TYPE_seg[];
-
-#ifndef DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE
-#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (OMAGIC)
-#endif /* DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE */
-
-#endif /* ! BFD_ASSEMBLER */
-
extern const pseudo_typeS aout_pseudo_table[];
#ifndef obj_pop_insert
#define obj_pop_insert() pop_insert (aout_pseudo_table)
#endif
-/* SYMBOL TABLE */
-/* Symbol table entry data type */
+/* Symbol table entry data type. */
-typedef struct nlist obj_symbol_type; /* Symbol table entry */
+typedef struct nlist obj_symbol_type; /* Symbol table entry. */
/* Symbol table macros and constants */
-#ifdef BFD_ASSEMBLER
-
#define S_SET_OTHER(S,V) \
(aout_symbol (symbol_get_bfdsym (S))->other = (V))
#define S_SET_TYPE(S,T) \
@@ -83,170 +57,11 @@ asection *text_section, *data_section, *bss_section;
#define obj_frob_symbol(S,PUNT) obj_aout_frob_symbol (S, &PUNT)
#define obj_frob_file_before_fix() obj_aout_frob_file_before_fix ()
-extern void obj_aout_frob_symbol PARAMS ((symbolS *, int *));
-extern void obj_aout_frob_file_before_fix PARAMS ((void));
-
-#define obj_sec_sym_ok_for_reloc(SEC) (1)
-
-#else
-
-/* We use the sy_obj field to record whether a symbol is weak. */
-#define OBJ_SYMFIELD_TYPE char
-
-/*
- * Macros to extract information from a symbol table entry.
- * This syntactic indirection allows independence regarding a.out or coff.
- * The argument (s) of all these macros is a pointer to a symbol table entry.
- */
-
-/* True if the symbol is external */
-#define S_IS_EXTERNAL(s) ((s)->sy_symbol.n_type & N_EXT)
-
-/* True if symbol has been defined, ie is in N_{TEXT,DATA,BSS,ABS} or N_EXT */
-#define S_IS_DEFINED(s) \
- (S_GET_TYPE (s) != N_UNDF || S_GET_DESC (s) != 0)
-
-#define S_IS_COMMON(s) \
- (S_GET_TYPE (s) == N_UNDF && S_GET_VALUE (s) != 0)
-
-/* 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 (S_GET_SEGMENT (s)))
-
-#define S_IS_REGISTER(s) ((s)->sy_symbol.n_type == N_REGISTER)
-
-/* True if a debug special symbol entry */
-#define S_IS_DEBUG(s) ((s)->sy_symbol.n_type & N_STAB)
-/* True if a symbol is local symbol name */
-#define S_IS_LOCAL(s) \
- ((S_GET_NAME (s) \
- && !S_IS_DEBUG (s) \
- && (strchr (S_GET_NAME (s), '\001') != NULL \
- || strchr (S_GET_NAME (s), '\002') != NULL \
- || (S_LOCAL_NAME(s) && !flag_keep_locals))) \
- || (flag_strip_local_absolute \
- && ! S_IS_EXTERNAL(s) \
- && S_GET_SEGMENT (s) == absolute_section))
-/* True if a symbol is not defined in this file */
-#define S_IS_EXTERN(s) ((s)->sy_symbol.n_type & N_EXT)
-/* True if the symbol has been generated because of a .stabd directive */
-#define S_IS_STABD(s) (S_GET_NAME(s) == (char *)0)
-/* Accessors */
-/* The name of the symbol */
-#define S_GET_NAME(s) ((s)->sy_symbol.n_un.n_name)
-/* The pointer to the string table */
-#define S_GET_OFFSET(s) ((s)->sy_symbol.n_un.n_strx)
-/* The type of the symbol */
-#define S_GET_TYPE(s) ((s)->sy_symbol.n_type & N_TYPE)
-/* The numeric value of the segment */
-#define S_GET_SEGMENT(s) (N_TYPE_seg[S_GET_TYPE(s)])
-/* The n_other expression value */
-#define S_GET_OTHER(s) ((s)->sy_symbol.n_other)
-/* The n_desc expression value */
-#define S_GET_DESC(s) ((s)->sy_symbol.n_desc)
-/* Whether the symbol is weak. */
-#define S_GET_WEAK(s) ((s)->sy_obj)
+extern void obj_aout_frob_symbol (symbolS *, int *);
+extern void obj_aout_frob_file_before_fix (void);
-/* Modifiers */
-/* Assume that a symbol cannot be simultaneously in more than on segment */
-/* set segment */
-#define S_SET_SEGMENT(s,seg) ((s)->sy_symbol.n_type &= ~N_TYPE,(s)->sy_symbol.n_type|=SEGMENT_TO_SYMBOL_TYPE(seg))
-/* The symbol is external */
-#define S_SET_EXTERNAL(s) ((s)->sy_symbol.n_type |= N_EXT)
-/* The symbol is not external */
-#define S_CLEAR_EXTERNAL(s) ((s)->sy_symbol.n_type &= ~N_EXT)
-/* Set the name of the symbol */
-#define S_SET_NAME(s,v) ((s)->sy_symbol.n_un.n_name = (v))
-/* Set the offset in the string table */
-#define S_SET_OFFSET(s,v) ((s)->sy_symbol.n_un.n_strx = (v))
-/* Set the n_type field */
-#define S_SET_TYPE(s,t) ((s)->sy_symbol.n_type = (t))
-/* Set the n_other expression value */
-#define S_SET_OTHER(s,v) ((s)->sy_symbol.n_other = (v))
-/* Set the n_desc expression value */
-#define S_SET_DESC(s,v) ((s)->sy_symbol.n_desc = (v))
-/* Mark the symbol as weak. This causes n_type to be adjusted when
- the symbol is written out. */
-#define S_SET_WEAK(s) ((s)->sy_obj = 1)
-
-/* File header macro and type definition */
-
-#define H_GET_FILE_SIZE(h) (H_GET_HEADER_SIZE(h) \
- + H_GET_TEXT_SIZE(h) \
- + H_GET_DATA_SIZE(h) \
- + H_GET_SYMBOL_TABLE_SIZE(h) \
- + H_GET_TEXT_RELOCATION_SIZE(h) \
- + H_GET_DATA_RELOCATION_SIZE(h) \
- + H_GET_STRING_SIZE(h))
-
-#define H_GET_HEADER_SIZE(h) (EXEC_BYTES_SIZE)
-#define H_GET_TEXT_SIZE(h) ((h)->header.a_text)
-#define H_GET_DATA_SIZE(h) ((h)->header.a_data)
-#define H_GET_BSS_SIZE(h) ((h)->header.a_bss)
-#define H_GET_TEXT_RELOCATION_SIZE(h) ((h)->header.a_trsize)
-#define H_GET_DATA_RELOCATION_SIZE(h) ((h)->header.a_drsize)
-#define H_GET_SYMBOL_TABLE_SIZE(h) ((h)->header.a_syms)
-#define H_GET_ENTRY_POINT(h) ((h)->header.a_entry)
-#define H_GET_STRING_SIZE(h) ((h)->string_table_size)
-#define H_GET_LINENO_SIZE(h) (0)
-
-#define H_GET_DYNAMIC(h) ((h)->header.a_info >> 31)
-#define H_GET_VERSION(h) (((h)->header.a_info >> 24) & 0x7f)
-#define H_GET_MACHTYPE(h) (((h)->header.a_info >> 16) & 0xff)
-#define H_GET_MAGIC_NUMBER(h) ((h)->header.a_info & 0xffff)
-
-#define H_SET_DYNAMIC(h,v) ((h)->header.a_info = (((v) << 31) \
- | (H_GET_VERSION(h) << 24) \
- | (H_GET_MACHTYPE(h) << 16) \
- | (H_GET_MAGIC_NUMBER(h))))
-
-#define H_SET_VERSION(h,v) ((h)->header.a_info = ((H_GET_DYNAMIC(h) << 31) \
- | ((v) << 24) \
- | (H_GET_MACHTYPE(h) << 16) \
- | (H_GET_MAGIC_NUMBER(h))))
-
-#define H_SET_MACHTYPE(h,v) ((h)->header.a_info = ((H_GET_DYNAMIC(h) << 31) \
- | (H_GET_VERSION(h) << 24) \
- | ((v) << 16) \
- | (H_GET_MAGIC_NUMBER(h))))
-
-#define H_SET_MAGIC_NUMBER(h,v) ((h)->header.a_info = ((H_GET_DYNAMIC(h) << 31) \
- | (H_GET_VERSION(h) << 24) \
- | (H_GET_MACHTYPE(h) << 16) \
- | ((v))))
-
-#define H_SET_TEXT_SIZE(h,v) ((h)->header.a_text = md_section_align(SEG_TEXT, (v)))
-#define H_SET_DATA_SIZE(h,v) ((h)->header.a_data = md_section_align(SEG_DATA, (v)))
-#define H_SET_BSS_SIZE(h,v) ((h)->header.a_bss = md_section_align(SEG_BSS, (v)))
-
-#define H_SET_RELOCATION_SIZE(h,t,d) (H_SET_TEXT_RELOCATION_SIZE((h),(t)),\
- H_SET_DATA_RELOCATION_SIZE((h),(d)))
-
-#define H_SET_TEXT_RELOCATION_SIZE(h,v) ((h)->header.a_trsize = (v))
-#define H_SET_DATA_RELOCATION_SIZE(h,v) ((h)->header.a_drsize = (v))
-#define H_SET_SYMBOL_TABLE_SIZE(h,v) ((h)->header.a_syms = (v) * 12)
-
-#define H_SET_ENTRY_POINT(h,v) ((h)->header.a_entry = (v))
-#define H_SET_STRING_SIZE(h,v) ((h)->string_table_size = (v))
-
-typedef struct
- {
- struct exec header; /* a.out header */
- long string_table_size; /* names + '\0' + sizeof (int) */
- }
-
-object_headers;
-
-/* line numbering stuff. */
-#define OBJ_EMIT_LINENO(a, b, c) {;}
-
-struct fix;
-void tc_aout_fix_to_chars PARAMS ((char *where, struct fix *fixP, relax_addressT segment_address));
-
-#endif
+#define obj_sec_sym_ok_for_reloc(SEC) 1
#define obj_read_begin_hook() {;}
#define obj_symbol_new_hook(s) {;}
diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c
index bd08c2b5f8b7..a5a76ff3da0a 100644
--- a/contrib/binutils/gas/config/obj-coff.c
+++ b/contrib/binutils/gas/config/obj-coff.c
@@ -1,6 +1,6 @@
/* coff object file format
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define OBJ_HEADER "obj-coff.h"
@@ -26,14 +26,21 @@
#include "obstack.h"
#include "subsegs.h"
+#ifdef TE_PE
+#include "coff/pe.h"
+#endif
+
+#define streq(a,b) (strcmp ((a), (b)) == 0)
+#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
+
/* I think this is probably always correct. */
#ifndef KEEP_RELOC_INFO
#define KEEP_RELOC_INFO
#endif
-/* The BFD_ASSEMBLER version of obj_coff_section will use this macro to set
- a new section's attributes when a directive has no valid flags or the
- "w" flag is used. This default should be appropriate for most. */
+/* obj_coff_section will use this macro to set a new section's
+ attributes when a directive has no valid flags or the "w" flag is
+ used. This default should be appropriate for most. */
#ifndef TC_COFF_SECTION_DEFAULT_ATTRIBUTES
#define TC_COFF_SECTION_DEFAULT_ATTRIBUTES (SEC_LOAD | SEC_DATA)
#endif
@@ -41,6 +48,10 @@
/* This is used to hold the symbol built by a sequence of pseudo-ops
from .def and .endef. */
static symbolS *def_symbol_in_progress;
+#ifdef TE_PE
+/* PE weak alternate symbols begin with this string. */
+static const char weak_altprefix[] = ".weak.";
+#endif /* TE_PE */
typedef struct
{
@@ -52,48 +63,23 @@ typedef struct
}
stack;
-static stack *stack_init PARAMS ((unsigned long, unsigned long));
-static char *stack_push PARAMS ((stack *, char *));
-static char *stack_pop PARAMS ((stack *));
-static void tag_init PARAMS ((void));
-static void tag_insert PARAMS ((const char *, symbolS *));
-static symbolS *tag_find PARAMS ((char *));
-static symbolS *tag_find_or_make PARAMS ((char *));
-static void obj_coff_bss PARAMS ((int));
-static void obj_coff_weak PARAMS ((int));
-const char *s_get_name PARAMS ((symbolS * s));
-static void obj_coff_ln PARAMS ((int));
-static void obj_coff_def PARAMS ((int));
-static void obj_coff_endef PARAMS ((int));
-static void obj_coff_dim PARAMS ((int));
-static void obj_coff_line PARAMS ((int));
-static void obj_coff_size PARAMS ((int));
-static void obj_coff_scl PARAMS ((int));
-static void obj_coff_tag PARAMS ((int));
-static void obj_coff_val PARAMS ((int));
-static void obj_coff_type PARAMS ((int));
-static void obj_coff_ident PARAMS ((int));
-#ifdef BFD_ASSEMBLER
-static void obj_coff_loc PARAMS((int));
-#endif
-/* stack stuff */
+/* Stack stuff. */
static stack *
-stack_init (chunk_size, element_size)
- unsigned long chunk_size;
- unsigned long element_size;
+stack_init (unsigned long chunk_size,
+ unsigned long element_size)
{
stack *st;
- st = (stack *) malloc (sizeof (stack));
+ st = malloc (sizeof (* st));
if (!st)
- return 0;
+ return NULL;
st->data = malloc (chunk_size);
if (!st->data)
{
free (st);
- return 0;
+ return NULL;
}
st->pointer = 0;
st->size = chunk_size;
@@ -102,27 +88,14 @@ stack_init (chunk_size, element_size)
return st;
}
-#if 0
-/* Not currently used. */
-static void
-stack_delete (st)
- stack *st;
-{
- free (st->data);
- free (st);
-}
-#endif
-
static char *
-stack_push (st, element)
- stack *st;
- char *element;
+stack_push (stack *st, char *element)
{
if (st->pointer + st->element_size >= st->size)
{
st->size += st->chunk_size;
- if ((st->data = xrealloc (st->data, st->size)) == (char *) 0)
- return (char *) 0;
+ if ((st->data = xrealloc (st->data, st->size)) == NULL)
+ return NULL;
}
memcpy (st->data + st->pointer, element, st->element_size);
st->pointer += st->element_size;
@@ -130,58 +103,45 @@ stack_push (st, element)
}
static char *
-stack_pop (st)
- stack *st;
+stack_pop (stack *st)
{
if (st->pointer < st->element_size)
{
st->pointer = 0;
- return (char *) 0;
+ return NULL;
}
st->pointer -= st->element_size;
return st->data + st->pointer;
}
-/*
- * Maintain a list of the tagnames of the structures.
- */
+/* Maintain a list of the tagnames of the structures. */
static struct hash_control *tag_hash;
static void
-tag_init ()
+tag_init (void)
{
tag_hash = hash_new ();
}
static void
-tag_insert (name, symbolP)
- const char *name;
- symbolS *symbolP;
+tag_insert (const char *name, symbolS *symbolP)
{
const char *error_string;
if ((error_string = hash_jam (tag_hash, name, (char *) symbolP)))
- {
- as_fatal (_("Inserting \"%s\" into structure table failed: %s"),
- name, error_string);
- }
+ as_fatal (_("Inserting \"%s\" into structure table failed: %s"),
+ name, error_string);
}
static symbolS *
-tag_find (name)
- char *name;
+tag_find (char *name)
{
-#ifdef STRIP_UNDERSCORE
- if (*name == '_')
- name++;
-#endif /* STRIP_UNDERSCORE */
return (symbolS *) hash_find (tag_hash, name);
}
static symbolS *
-tag_find_or_make (name)
- char *name;
+tag_find_or_make (char *name)
{
symbolS *symbolP;
@@ -191,10 +151,8 @@ tag_find_or_make (name)
0, &zero_address_frag);
tag_insert (S_GET_NAME (symbolP), symbolP);
-#ifdef BFD_ASSEMBLER
symbol_table_insert (symbolP);
-#endif
- } /* not found */
+ }
return symbolP;
}
@@ -203,8 +161,7 @@ tag_find_or_make (name)
compatibility with earlier versions of gas. */
static void
-obj_coff_bss (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_bss (int ignore ATTRIBUTE_UNUSED)
{
if (*input_line_pointer == '\n')
subseg_new (".bss", get_absolute_expression ());
@@ -212,67 +169,20 @@ obj_coff_bss (ignore)
s_lcomm (0);
}
-/* Handle .weak. This is a GNU extension. */
-
-static void
-obj_coff_weak (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- char *name;
- int c;
- symbolS *symbolP;
-
- do
- {
- name = input_line_pointer;
- c = get_symbol_end ();
- symbolP = symbol_find_or_make (name);
- *input_line_pointer = c;
- SKIP_WHITESPACE ();
-
-#if defined BFD_ASSEMBLER || defined S_SET_WEAK
- S_SET_WEAK (symbolP);
-#endif
-
-#ifdef TE_PE
- S_SET_STORAGE_CLASS (symbolP, C_NT_WEAK);
-#else
- S_SET_STORAGE_CLASS (symbolP, C_WEAKEXT);
-#endif
-
- if (c == ',')
- {
- input_line_pointer++;
- SKIP_WHITESPACE ();
- if (*input_line_pointer == '\n')
- c = '\n';
- }
- }
- while (c == ',');
-
- demand_empty_rest_of_line ();
-}
-
-#ifdef BFD_ASSEMBLER
-
-static segT fetch_coff_debug_section PARAMS ((void));
-static void SA_SET_SYM_TAGNDX PARAMS ((symbolS *, symbolS *));
-static int S_GET_DATA_TYPE PARAMS ((symbolS *));
-void c_symbol_merge PARAMS ((symbolS *, symbolS *));
-static void add_lineno PARAMS ((fragS *, addressT, int));
-
#define GET_FILENAME_STRING(X) \
-((char*) (&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1])
+ ((char *) (&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1])
/* @@ Ick. */
static segT
-fetch_coff_debug_section ()
+fetch_coff_debug_section (void)
{
static segT debug_section;
+
if (!debug_section)
{
const asymbol *s;
- s = bfd_make_debug_symbol (stdoutput, (char *) 0, 0);
+
+ s = bfd_make_debug_symbol (stdoutput, NULL, 0);
assert (s != 0);
debug_section = s->section;
}
@@ -280,9 +190,7 @@ fetch_coff_debug_section ()
}
void
-SA_SET_SYM_ENDNDX (sym, val)
- symbolS *sym;
- symbolS *val;
+SA_SET_SYM_ENDNDX (symbolS *sym, symbolS *val)
{
combined_entry_type *entry, *p;
@@ -293,9 +201,7 @@ SA_SET_SYM_ENDNDX (sym, val)
}
static void
-SA_SET_SYM_TAGNDX (sym, val)
- symbolS *sym;
- symbolS *val;
+SA_SET_SYM_TAGNDX (symbolS *sym, symbolS *val)
{
combined_entry_type *entry, *p;
@@ -306,32 +212,26 @@ SA_SET_SYM_TAGNDX (sym, val)
}
static int
-S_GET_DATA_TYPE (sym)
- symbolS *sym;
+S_GET_DATA_TYPE (symbolS *sym)
{
return coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_type;
}
int
-S_SET_DATA_TYPE (sym, val)
- symbolS *sym;
- int val;
+S_SET_DATA_TYPE (symbolS *sym, int val)
{
coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_type = val;
return val;
}
int
-S_GET_STORAGE_CLASS (sym)
- symbolS *sym;
+S_GET_STORAGE_CLASS (symbolS *sym)
{
return coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_sclass;
}
int
-S_SET_STORAGE_CLASS (sym, val)
- symbolS *sym;
- int val;
+S_SET_STORAGE_CLASS (symbolS *sym, int val)
{
coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_sclass = val;
return val;
@@ -339,35 +239,28 @@ S_SET_STORAGE_CLASS (sym, val)
/* Merge a debug symbol containing debug information into a normal symbol. */
-void
-c_symbol_merge (debug, normal)
- symbolS *debug;
- symbolS *normal;
+static void
+c_symbol_merge (symbolS *debug, symbolS *normal)
{
S_SET_DATA_TYPE (normal, S_GET_DATA_TYPE (debug));
S_SET_STORAGE_CLASS (normal, S_GET_STORAGE_CLASS (debug));
if (S_GET_NUMBER_AUXILIARY (debug) > S_GET_NUMBER_AUXILIARY (normal))
- {
- /* take the most we have */
- S_SET_NUMBER_AUXILIARY (normal, S_GET_NUMBER_AUXILIARY (debug));
- }
+ /* Take the most we have. */
+ S_SET_NUMBER_AUXILIARY (normal, S_GET_NUMBER_AUXILIARY (debug));
if (S_GET_NUMBER_AUXILIARY (debug) > 0)
- {
- /* Move all the auxiliary information. */
- memcpy (SYM_AUXINFO (normal), SYM_AUXINFO (debug),
- (S_GET_NUMBER_AUXILIARY (debug)
- * sizeof (*SYM_AUXINFO (debug))));
- }
+ /* Move all the auxiliary information. */
+ memcpy (SYM_AUXINFO (normal), SYM_AUXINFO (debug),
+ (S_GET_NUMBER_AUXILIARY (debug)
+ * sizeof (*SYM_AUXINFO (debug))));
/* Move the debug flags. */
SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug));
}
void
-c_dot_file_symbol (filename)
- const char *filename;
+c_dot_file_symbol (const char *filename, int appfile ATTRIBUTE_UNUSED)
{
symbolS *symbolP;
@@ -383,24 +276,24 @@ c_dot_file_symbol (filename)
#ifndef NO_LISTING
{
extern int listing;
+
if (listing)
- {
- listing_source_file (filename);
- }
+ listing_source_file (filename);
}
#endif
- /* Make sure that the symbol is first on the symbol chain */
+ /* Make sure that the symbol is first on the symbol chain. */
if (symbol_rootP != symbolP)
{
symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
symbol_insert (symbolP, symbol_rootP, &symbol_rootP, &symbol_lastP);
- } /* if not first on the list */
+ }
}
-/* Line number handling */
+/* Line number handling. */
-struct line_no {
+struct line_no
+{
struct line_no *next;
fragS *frag;
alent l;
@@ -417,11 +310,10 @@ static symbolS *line_fsym;
void
-coff_obj_symbol_new_hook (symbolP)
- symbolS *symbolP;
+coff_obj_symbol_new_hook (symbolS *symbolP)
{
long sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type);
- char * s = (char *) xmalloc (sz);
+ char * s = xmalloc (sz);
memset (s, 0, sz);
coffsymbol (symbol_get_bfdsym (symbolP))->native = (combined_entry_type *) s;
@@ -437,31 +329,36 @@ coff_obj_symbol_new_hook (symbolP)
SF_SET_LOCAL (symbolP);
}
+void
+coff_obj_symbol_clone_hook (symbolS *newsymP, symbolS *orgsymP)
+{
+ long sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type);
+ combined_entry_type * s = xmalloc (sz);
+
+ memcpy (s, coffsymbol (symbol_get_bfdsym (orgsymP))->native, sz);
+ coffsymbol (symbol_get_bfdsym (newsymP))->native = s;
+
+ SF_SET (newsymP, SF_GET (orgsymP));
+}
+
-/*
- * Handle .ln directives.
- */
+/* Handle .ln directives. */
static symbolS *current_lineno_sym;
static struct line_no *line_nos;
-/* @@ Blindly assume all .ln directives will be in the .text section... */
+/* FIXME: Blindly assume all .ln directives will be in the .text section. */
int coff_n_line_nos;
static void
-add_lineno (frag, offset, num)
- fragS *frag;
- addressT offset;
- int num;
+add_lineno (fragS * frag, addressT offset, int num)
{
- struct line_no *new_line =
- (struct line_no *) xmalloc (sizeof (struct line_no));
+ struct line_no * new_line = xmalloc (sizeof (* new_line));
+
if (!current_lineno_sym)
- {
- abort ();
- }
+ abort ();
#ifndef OBJ_XCOFF
- /* The native aix assembler accepts negative line number */
+ /* The native aix assembler accepts negative line number. */
if (num <= 0)
{
@@ -479,8 +376,7 @@ add_lineno (frag, offset, num)
}
void
-coff_add_linesym (sym)
- symbolS *sym;
+coff_add_linesym (symbolS *sym)
{
if (line_nos)
{
@@ -493,8 +389,7 @@ coff_add_linesym (sym)
}
static void
-obj_coff_ln (appline)
- int appline;
+obj_coff_ln (int appline)
{
int l;
@@ -534,8 +429,7 @@ obj_coff_ln (appline)
compatibility. */
static void
-obj_coff_loc (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_loc (int ignore ATTRIBUTE_UNUSED)
{
int lineno;
@@ -582,8 +476,7 @@ obj_coff_loc (ignore)
/* Handle the .ident pseudo-op. */
static void
-obj_coff_ident (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_ident (int ignore ATTRIBUTE_UNUSED)
{
segT current_seg = now_seg;
subsegT current_subseg = now_subseg;
@@ -608,32 +501,26 @@ obj_coff_ident (ignore)
subseg_set (current_seg, current_subseg);
}
-/*
- * def()
- *
- * Handle .def directives.
- *
- * One might ask : why can't we symbol_new if the symbol does not
- * already exist and fill it with debug information. Because of
- * the C_EFCN special symbol. It would clobber the value of the
- * function symbol before we have a chance to notice that it is
- * a C_EFCN. And a second reason is that the code is more clear this
- * way. (at least I think it is :-).
- *
- */
+/* Handle .def directives.
+
+ One might ask : why can't we symbol_new if the symbol does not
+ already exist and fill it with debug information. Because of
+ the C_EFCN special symbol. It would clobber the value of the
+ function symbol before we have a chance to notice that it is
+ a C_EFCN. And a second reason is that the code is more clear this
+ way. (at least I think it is :-). */
#define SKIP_SEMI_COLON() while (*input_line_pointer++ != ';')
#define SKIP_WHITESPACES() while (*input_line_pointer == ' ' || \
- *input_line_pointer == '\t') \
- input_line_pointer++;
+ *input_line_pointer == '\t') \
+ input_line_pointer++;
static void
-obj_coff_def (what)
- int what ATTRIBUTE_UNUSED;
+obj_coff_def (int what ATTRIBUTE_UNUSED)
{
- char name_end; /* Char after the end of name */
- char *symbol_name; /* Name of the debug symbol */
- char *symbol_name_copy; /* Temporary copy of the name */
+ char name_end; /* Char after the end of name. */
+ char *symbol_name; /* Name of the debug symbol. */
+ char *symbol_name_copy; /* Temporary copy of the name. */
unsigned int symbol_name_length;
if (def_symbol_in_progress != NULL)
@@ -641,16 +528,11 @@ obj_coff_def (what)
as_warn (_(".def pseudo-op used inside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
- } /* if not inside .def/.endef */
+ }
SKIP_WHITESPACES ();
symbol_name = input_line_pointer;
-#ifdef STRIP_UNDERSCORE
- if (symbol_name[0] == '_' && symbol_name[1] != 0)
- symbol_name++;
-#endif /* STRIP_UNDERSCORE */
-
name_end = get_symbol_end ();
symbol_name_length = strlen (symbol_name);
symbol_name_copy = xmalloc (symbol_name_length + 1);
@@ -659,7 +541,7 @@ obj_coff_def (what)
symbol_name_copy = tc_canonicalize_symbol_name (symbol_name_copy);
#endif
- /* Initialize the new symbol */
+ /* Initialize the new symbol. */
def_symbol_in_progress = symbol_make (symbol_name_copy);
symbol_set_frag (def_symbol_in_progress, &zero_address_frag);
S_SET_VALUE (def_symbol_in_progress, 0);
@@ -675,19 +557,17 @@ obj_coff_def (what)
unsigned int dim_index;
static void
-obj_coff_endef (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_endef (int ignore ATTRIBUTE_UNUSED)
{
symbolS *symbolP = NULL;
- /* DIM BUG FIX sac@cygnus.com */
dim_index = 0;
if (def_symbol_in_progress == NULL)
{
as_warn (_(".endef pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
- } /* if not inside .def/.endef */
+ }
/* Set the section number according to storage class. */
switch (S_GET_STORAGE_CLASS (def_symbol_in_progress))
@@ -696,7 +576,7 @@ obj_coff_endef (ignore)
case C_ENTAG:
case C_UNTAG:
SF_SET_TAG (def_symbol_in_progress);
- /* intentional fallthrough */
+ /* Fall through. */
case C_FILE:
case C_TPDEF:
SF_SET_DEBUG (def_symbol_in_progress);
@@ -705,13 +585,14 @@ obj_coff_endef (ignore)
case C_EFCN:
SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */
- /* intentional fallthrough */
+ /* Fall through. */
case C_BLOCK:
- SF_SET_PROCESS (def_symbol_in_progress); /* Will need processing before writing */
- /* intentional fallthrough */
+ SF_SET_PROCESS (def_symbol_in_progress); /* Will need processing before writing. */
+ /* Fall through. */
case C_FCN:
{
const char *name;
+
S_SET_SEGMENT (def_symbol_in_progress, text_section);
name = S_GET_NAME (def_symbol_in_progress);
@@ -802,7 +683,7 @@ obj_coff_endef (ignore)
#endif
case C_STAT:
case C_LABEL:
- /* Valid but set somewhere else (s_comm, s_lcomm, colon) */
+ /* Valid but set somewhere else (s_comm, s_lcomm, colon). */
break;
default:
@@ -812,7 +693,7 @@ obj_coff_endef (ignore)
as_warn (_("unexpected storage class %d"),
S_GET_STORAGE_CLASS (def_symbol_in_progress));
break;
- } /* switch on storage class */
+ }
/* Now that we have built a debug symbol, try to find if we should
merge with an existing symbol or not. If a symbol is C_EFCN or
@@ -835,14 +716,13 @@ obj_coff_endef (ignore)
if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN
|| S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL
- || (!strcmp (bfd_get_section_name (stdoutput,
- S_GET_SEGMENT (def_symbol_in_progress)),
- "*DEBUG*")
+ || (streq (bfd_get_section_name (stdoutput,
+ S_GET_SEGMENT (def_symbol_in_progress)),
+ "*DEBUG*")
&& !SF_GET_TAG (def_symbol_in_progress))
|| S_GET_SEGMENT (def_symbol_in_progress) == absolute_section
|| ! symbol_constant_p (def_symbol_in_progress)
- || (symbolP = symbol_find_base (S_GET_NAME (def_symbol_in_progress),
- DO_NOT_STRIP)) == NULL
+ || (symbolP = symbol_find (S_GET_NAME (def_symbol_in_progress))) == NULL
|| SF_GET_TAG (def_symbol_in_progress) != SF_GET_TAG (symbolP))
{
/* If it already is at the end of the symbol list, do nothing */
@@ -859,7 +739,7 @@ obj_coff_endef (ignore)
into the old one. This is not mandatory. The linker can
handle duplicate symbols correctly. But I guess that it save
a *lot* of space if the assembly file defines a lot of
- symbols. [loic] */
+ symbols. [loic] */
/* The debug entry (def_symbol_in_progress) is merged into the
previous definition. */
@@ -876,7 +756,7 @@ obj_coff_endef (ignore)
/* For functions, and tags, and static symbols, the symbol
*must* be where the debug symbol appears. Move the
existing symbol to the current place. */
- /* If it already is at the end of the symbol list, do nothing */
+ /* If it already is at the end of the symbol list, do nothing. */
if (def_symbol_in_progress != symbol_lastP)
{
symbol_remove (def_symbol_in_progress, &symbol_rootP, &symbol_lastP);
@@ -889,8 +769,7 @@ obj_coff_endef (ignore)
{
symbolS *oldtag;
- oldtag = symbol_find_base (S_GET_NAME (def_symbol_in_progress),
- DO_NOT_STRIP);
+ oldtag = symbol_find (S_GET_NAME (def_symbol_in_progress));
if (oldtag == NULL || ! SF_GET_TAG (oldtag))
tag_insert (S_GET_NAME (def_symbol_in_progress),
def_symbol_in_progress);
@@ -903,20 +782,18 @@ obj_coff_endef (ignore)
SF_SET_PROCESS (def_symbol_in_progress);
if (symbolP == NULL)
- {
- /* That is, if this is the first time we've seen the
- function... */
- symbol_table_insert (def_symbol_in_progress);
- } /* definition follows debug */
- } /* Create the line number entry pointing to the function being defined */
+ /* That is, if this is the first time we've seen the
+ function. */
+ symbol_table_insert (def_symbol_in_progress);
+
+ }
def_symbol_in_progress = NULL;
demand_empty_rest_of_line ();
}
static void
-obj_coff_dim (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_dim (int ignore ATTRIBUTE_UNUSED)
{
int dim_index;
@@ -925,7 +802,7 @@ obj_coff_dim (ignore)
as_warn (_(".dim pseudo-op used outside of .def/.endef: ignored."));
demand_empty_rest_of_line ();
return;
- } /* if not inside .def/.endef */
+ }
S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
@@ -943,7 +820,7 @@ obj_coff_dim (ignore)
default:
as_warn (_("badly formed .dim directive ignored"));
- /* intentional fallthrough */
+ /* Fall through. */
case '\n':
case ';':
dim_index = DIMNUM;
@@ -955,8 +832,7 @@ obj_coff_dim (ignore)
}
static void
-obj_coff_line (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_line (int ignore ATTRIBUTE_UNUSED)
{
int this_base;
@@ -968,7 +844,7 @@ obj_coff_line (ignore)
}
this_base = get_absolute_expression ();
- if (!strcmp (".bf", S_GET_NAME (def_symbol_in_progress)))
+ if (streq (".bf", S_GET_NAME (def_symbol_in_progress)))
coff_line_base = this_base;
S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
@@ -977,7 +853,7 @@ obj_coff_line (ignore)
demand_empty_rest_of_line ();
#ifndef NO_LISTING
- if (strcmp (".bf", S_GET_NAME (def_symbol_in_progress)) == 0)
+ if (streq (".bf", S_GET_NAME (def_symbol_in_progress)))
{
extern int listing;
@@ -988,15 +864,14 @@ obj_coff_line (ignore)
}
static void
-obj_coff_size (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_size (int ignore ATTRIBUTE_UNUSED)
{
if (def_symbol_in_progress == NULL)
{
as_warn (_(".size pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
- } /* if not inside .def/.endef */
+ }
S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
SA_SET_SYM_SIZE (def_symbol_in_progress, get_absolute_expression ());
@@ -1004,23 +879,21 @@ obj_coff_size (ignore)
}
static void
-obj_coff_scl (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_scl (int ignore ATTRIBUTE_UNUSED)
{
if (def_symbol_in_progress == NULL)
{
as_warn (_(".scl pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
- } /* if not inside .def/.endef */
+ }
S_SET_STORAGE_CLASS (def_symbol_in_progress, get_absolute_expression ());
demand_empty_rest_of_line ();
}
static void
-obj_coff_tag (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_tag (int ignore ATTRIBUTE_UNUSED)
{
char *symbol_name;
char name_end;
@@ -1045,9 +918,7 @@ obj_coff_tag (ignore)
SA_SET_SYM_TAGNDX (def_symbol_in_progress,
tag_find_or_make (symbol_name));
if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L)
- {
- as_warn (_("tag not found for .tag %s"), symbol_name);
- } /* not defined */
+ as_warn (_("tag not found for .tag %s"), symbol_name);
SF_SET_TAGGED (def_symbol_in_progress);
*input_line_pointer = name_end;
@@ -1056,37 +927,33 @@ obj_coff_tag (ignore)
}
static void
-obj_coff_type (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_type (int ignore ATTRIBUTE_UNUSED)
{
if (def_symbol_in_progress == NULL)
{
as_warn (_(".type pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
- } /* if not inside .def/.endef */
+ }
S_SET_DATA_TYPE (def_symbol_in_progress, get_absolute_expression ());
if (ISFCN (S_GET_DATA_TYPE (def_symbol_in_progress)) &&
S_GET_STORAGE_CLASS (def_symbol_in_progress) != C_TPDEF)
- {
- SF_SET_FUNCTION (def_symbol_in_progress);
- } /* is a function */
+ SF_SET_FUNCTION (def_symbol_in_progress);
demand_empty_rest_of_line ();
}
static void
-obj_coff_val (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_val (int ignore ATTRIBUTE_UNUSED)
{
if (def_symbol_in_progress == NULL)
{
as_warn (_(".val pseudo-op used outside of .def/.endef ignored."));
demand_empty_rest_of_line ();
return;
- } /* if not inside .def/.endef */
+ }
if (is_name_beginner (*input_line_pointer))
{
@@ -1096,13 +963,13 @@ obj_coff_val (ignore)
#ifdef tc_canonicalize_symbol_name
symbol_name = tc_canonicalize_symbol_name (symbol_name);
#endif
- if (!strcmp (symbol_name, "."))
+ if (streq (symbol_name, "."))
{
+ /* If the .val is != from the .def (e.g. statics). */
symbol_set_frag (def_symbol_in_progress, frag_now);
S_SET_VALUE (def_symbol_in_progress, (valueT) frag_now_fix ());
- /* If the .val is != from the .def (e.g. statics) */
}
- else if (strcmp (S_GET_NAME (def_symbol_in_progress), symbol_name))
+ else if (! streq (S_GET_NAME (def_symbol_in_progress), symbol_name))
{
expressionS exp;
@@ -1130,19 +997,156 @@ obj_coff_val (ignore)
else
{
S_SET_VALUE (def_symbol_in_progress, get_absolute_expression ());
- } /* if symbol based */
+ }
demand_empty_rest_of_line ();
}
+#ifdef TE_PE
+
+/* Return nonzero if name begins with weak alternate symbol prefix. */
+
+static int
+weak_is_altname (const char * name)
+{
+ return strneq (name, weak_altprefix, sizeof (weak_altprefix) - 1);
+}
+
+/* Return the name of the alternate symbol
+ name corresponding to a weak symbol's name. */
+
+static const char *
+weak_name2altname (const char * name)
+{
+ char *alt_name;
+
+ alt_name = xmalloc (sizeof (weak_altprefix) + strlen (name));
+ strcpy (alt_name, weak_altprefix);
+ return strcat (alt_name, name);
+}
+
+/* Return the name of the weak symbol corresponding to an
+ alterate symbol. */
+
+static const char *
+weak_altname2name (const char * name)
+{
+ char * weak_name;
+ char * dot;
+
+ assert (weak_is_altname (name));
+
+ weak_name = xstrdup (name + 6);
+ if ((dot = strchr (weak_name, '.')))
+ *dot = 0;
+ return weak_name;
+}
+
+/* Make a weak symbol name unique by
+ appending the name of an external symbol. */
+
+static const char *
+weak_uniquify (const char * name)
+{
+ char *ret;
+ const char * unique = "";
+
+#ifdef USE_UNIQUE
+ if (an_external_name != NULL)
+ unique = an_external_name;
+#endif
+ assert (weak_is_altname (name));
+
+ if (strchr (name + sizeof (weak_altprefix), '.'))
+ return name;
+
+ ret = xmalloc (strlen (name) + strlen (unique) + 2);
+ strcpy (ret, name);
+ strcat (ret, ".");
+ strcat (ret, unique);
+ return ret;
+}
+
+void
+pecoff_obj_set_weak_hook (symbolS *symbolP)
+{
+ symbolS *alternateP;
+
+ /* See _Microsoft Portable Executable and Common Object
+ File Format Specification_, section 5.5.3.
+ Create a symbol representing the alternate value.
+ coff_frob_symbol will set the value of this symbol from
+ the value of the weak symbol itself. */
+ S_SET_STORAGE_CLASS (symbolP, C_NT_WEAK);
+ S_SET_NUMBER_AUXILIARY (symbolP, 1);
+ SA_SET_SYM_FSIZE (symbolP, IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY);
+
+ alternateP = symbol_find_or_make (weak_name2altname (S_GET_NAME (symbolP)));
+ S_SET_EXTERNAL (alternateP);
+ S_SET_STORAGE_CLASS (alternateP, C_NT_WEAK);
+
+ SA_SET_SYM_TAGNDX (symbolP, alternateP);
+}
+
void
-coff_obj_read_begin_hook ()
+pecoff_obj_clear_weak_hook (symbolS *symbolP)
+{
+ symbolS *alternateP;
+
+ S_SET_STORAGE_CLASS (symbolP, 0);
+ SA_SET_SYM_FSIZE (symbolP, 0);
+
+ alternateP = symbol_find (weak_name2altname (S_GET_NAME (symbolP)));
+ S_CLEAR_EXTERNAL (alternateP);
+}
+
+#endif /* TE_PE */
+
+/* Handle .weak. This is a GNU extension in formats other than PE. */
+
+static void
+obj_coff_weak (int ignore ATTRIBUTE_UNUSED)
+{
+ char *name;
+ int c;
+ symbolS *symbolP;
+
+ do
+ {
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ if (*name == 0)
+ {
+ as_warn (_("badly formed .weak directive ignored"));
+ ignore_rest_of_line ();
+ return;
+ }
+ c = 0;
+ symbolP = symbol_find_or_make (name);
+ *input_line_pointer = c;
+ SKIP_WHITESPACE ();
+ S_SET_WEAK (symbolP);
+
+ if (c == ',')
+ {
+ input_line_pointer++;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == '\n')
+ c = '\n';
+ }
+
+ }
+ while (c == ',');
+
+ demand_empty_rest_of_line ();
+}
+
+void
+coff_obj_read_begin_hook (void)
{
/* These had better be the same. Usually 18 bytes. */
-#ifndef BFD_HEADERS
know (sizeof (SYMENT) == sizeof (AUXENT));
know (SYMESZ == AUXESZ);
-#endif
tag_init ();
}
@@ -1152,9 +1156,7 @@ static symbolS *coff_last_bf;
#endif
void
-coff_frob_symbol (symp, punt)
- symbolS *symp;
- int *punt;
+coff_frob_symbol (symbolS *symp, int *punt)
{
static symbolS *last_tagP;
static stack *block_stack;
@@ -1168,19 +1170,79 @@ coff_frob_symbol (symp, punt)
}
if (current_lineno_sym)
- coff_add_linesym ((symbolS *) 0);
+ coff_add_linesym (NULL);
if (!block_stack)
block_stack = stack_init (512, sizeof (symbolS*));
- if (S_IS_WEAK (symp))
- {
#ifdef TE_PE
- S_SET_STORAGE_CLASS (symp, C_NT_WEAK);
-#else
- S_SET_STORAGE_CLASS (symp, C_WEAKEXT);
-#endif
+ if (S_GET_STORAGE_CLASS (symp) == C_NT_WEAK
+ && ! S_IS_WEAK (symp)
+ && weak_is_altname (S_GET_NAME (symp)))
+ {
+ /* This is a weak alternate symbol. All processing of
+ PECOFFweak symbols is done here, through the alternate. */
+ symbolS *weakp = symbol_find_noref (weak_altname2name
+ (S_GET_NAME (symp)), 1);
+
+ assert (weakp);
+ assert (S_GET_NUMBER_AUXILIARY (weakp) == 1);
+
+ if (! S_IS_WEAK (weakp))
+ {
+ /* The symbol was turned from weak to strong. Discard altname. */
+ *punt = 1;
+ return;
+ }
+ else if (symbol_equated_p (weakp))
+ {
+ /* The weak symbol has an alternate specified; symp is unneeded. */
+ S_SET_STORAGE_CLASS (weakp, C_NT_WEAK);
+ SA_SET_SYM_TAGNDX (weakp,
+ symbol_get_value_expression (weakp)->X_add_symbol);
+
+ S_CLEAR_EXTERNAL (symp);
+ *punt = 1;
+ return;
+ }
+ else
+ {
+ /* The weak symbol has been assigned an alternate value.
+ Copy this value to symp, and set symp as weakp's alternate. */
+ if (S_GET_STORAGE_CLASS (weakp) != C_NT_WEAK)
+ {
+ S_SET_STORAGE_CLASS (symp, S_GET_STORAGE_CLASS (weakp));
+ S_SET_STORAGE_CLASS (weakp, C_NT_WEAK);
+ }
+
+ if (S_IS_DEFINED (weakp))
+ {
+ /* This is a defined weak symbol. Copy value information
+ from the weak symbol itself to the alternate symbol. */
+ symbol_set_value_expression (symp,
+ symbol_get_value_expression (weakp));
+ symbol_set_frag (symp, symbol_get_frag (weakp));
+ S_SET_SEGMENT (symp, S_GET_SEGMENT (weakp));
+ }
+ else
+ {
+ /* This is an undefined weak symbol.
+ Define the alternate symbol to zero. */
+ S_SET_VALUE (symp, 0);
+ S_SET_SEGMENT (symp, absolute_section);
+ }
+
+ S_SET_NAME (symp, weak_uniquify (S_GET_NAME (symp)));
+ S_SET_STORAGE_CLASS (symp, C_EXT);
+
+ S_SET_VALUE (weakp, 0);
+ S_SET_SEGMENT (weakp, undefined_section);
+ }
}
+#else /* TE_PE */
+ if (S_IS_WEAK (symp))
+ S_SET_STORAGE_CLASS (symp, C_WEAKEXT);
+#endif /* TE_PE */
if (!S_IS_DEFINED (symp)
&& !S_IS_WEAK (symp)
@@ -1194,8 +1256,8 @@ coff_frob_symbol (symp, punt)
if (!SF_GET_LOCAL (symp)
&& !SF_GET_STATICS (symp)
&& S_GET_STORAGE_CLASS (symp) != C_LABEL
- && symbol_constant_p(symp)
- && (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP))
+ && symbol_constant_p (symp)
+ && (real = symbol_find_noref (S_GET_NAME (symp), 1))
&& S_GET_STORAGE_CLASS (real) == C_NULL
&& real != symp)
{
@@ -1207,7 +1269,10 @@ coff_frob_symbol (symp, punt)
if (!S_IS_DEFINED (symp) && !SF_GET_LOCAL (symp))
{
assert (S_GET_VALUE (symp) == 0);
- S_SET_EXTERNAL (symp);
+ if (S_IS_WEAKREFD (symp))
+ *punt = 1;
+ else
+ S_SET_EXTERNAL (symp);
}
else if (S_GET_STORAGE_CLASS (symp) == C_NULL)
{
@@ -1222,7 +1287,7 @@ coff_frob_symbol (symp, punt)
{
if (S_GET_STORAGE_CLASS (symp) == C_BLOCK)
{
- if (!strcmp (S_GET_NAME (symp), ".bb"))
+ if (streq (S_GET_NAME (symp), ".bb"))
stack_push (block_stack, (char *) &symp);
else
{
@@ -1251,7 +1316,8 @@ coff_frob_symbol (symp, punt)
if (S_GET_STORAGE_CLASS (symp) == C_EFCN)
{
if (coff_last_function == 0)
- as_fatal (_("C_EFCN symbol out of scope"));
+ as_fatal (_("C_EFCN symbol for %s out of scope"),
+ S_GET_NAME (symp));
SA_SET_SYM_FSIZE (coff_last_function,
(long) (S_GET_VALUE (symp)
- S_GET_VALUE (coff_last_function)));
@@ -1267,8 +1333,6 @@ coff_frob_symbol (symp, punt)
if (SF_GET_FUNCTION (symp))
symbol_get_bfdsym (symp)->flags |= BSF_FUNCTION;
-
- /* more ... */
}
/* Double check weak symbols. */
@@ -1286,7 +1350,7 @@ coff_frob_symbol (symp, punt)
order to call SA_SET_SYM_ENDNDX correctly. */
if (! symbol_used_in_reloc_p (symp)
&& ((symbol_get_bfdsym (symp)->flags & BSF_SECTION_SYM) != 0
- || (! S_IS_EXTERNAL (symp)
+ || (! (S_IS_EXTERNAL (symp) || S_IS_WEAK (symp))
&& ! symbol_get_tc (symp)->output
&& S_GET_STORAGE_CLASS (symp) != C_FILE)))
*punt = 1;
@@ -1314,7 +1378,7 @@ coff_frob_symbol (symp, punt)
#ifndef OBJ_XCOFF
if (! *punt
&& S_GET_STORAGE_CLASS (symp) == C_FCN
- && strcmp (S_GET_NAME (symp), ".bf") == 0)
+ && streq (S_GET_NAME (symp), ".bf"))
{
if (coff_last_bf != NULL)
SA_SET_SYM_ENDNDX (coff_last_bf, symp);
@@ -1335,7 +1399,7 @@ coff_frob_symbol (symp, punt)
/* We need i entries for line numbers, plus 1 for the first
entry which BFD will override, plus 1 for the last zero
entry (a marker for BFD). */
- l = (alent *) xmalloc ((i + 2) * sizeof (alent));
+ l = xmalloc ((i + 2) * sizeof (* l));
coffsymbol (symbol_get_bfdsym (symp))->lineno = l;
l[i + 1].line_number = 0;
l[i + 1].u.sym = NULL;
@@ -1350,10 +1414,9 @@ coff_frob_symbol (symp, punt)
}
void
-coff_adjust_section_syms (abfd, sec, x)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- PTR x ATTRIBUTE_UNUSED;
+coff_adjust_section_syms (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ void * x ATTRIBUTE_UNUSED)
{
symbolS *secsym;
segment_info_type *seginfo = seg_info (sec);
@@ -1364,7 +1427,7 @@ coff_adjust_section_syms (abfd, sec, x)
if (seginfo == NULL)
return;
- if (!strcmp (sec->name, ".text"))
+ if (streq (sec->name, ".text"))
nlnno = coff_n_line_nos;
else
nlnno = 0;
@@ -1379,13 +1442,14 @@ coff_adjust_section_syms (abfd, sec, x)
fixp = fixp->fx_next;
}
}
- if (bfd_get_section_size_before_reloc (sec) == 0
+ if (bfd_get_section_size (sec) == 0
&& nrelocs == 0
&& nlnno == 0
&& sec != text_section
&& sec != data_section
&& sec != bss_section)
return;
+
secsym = section_symbol (sec);
/* This is an estimate; we'll plug in the real value using
SET_SECTION_RELOCS later */
@@ -1394,9 +1458,9 @@ coff_adjust_section_syms (abfd, sec, x)
}
void
-coff_frob_file_after_relocs ()
+coff_frob_file_after_relocs (void)
{
- bfd_map_over_sections (stdoutput, coff_adjust_section_syms, (char*) 0);
+ bfd_map_over_sections (stdoutput, coff_adjust_section_syms, NULL);
}
/* Implement the .section pseudo op:
@@ -1419,10 +1483,9 @@ coff_frob_file_after_relocs ()
.section directive to be parsed in both ELF and COFF formats. */
void
-obj_coff_section (ignore)
- int ignore ATTRIBUTE_UNUSED;
+obj_coff_section (int ignore ATTRIBUTE_UNUSED)
{
- /* Strip out the section name */
+ /* Strip out the section name. */
char *section_name;
char c;
char *name;
@@ -1459,38 +1522,81 @@ obj_coff_section (ignore)
exp = get_absolute_expression ();
else
{
- ++input_line_pointer;
- while (*input_line_pointer != '"'
- && ! is_end_of_line[(unsigned char) *input_line_pointer])
+ unsigned char attr;
+ int readonly_removed = 0;
+ int load_removed = 0;
+
+ while (attr = *++input_line_pointer,
+ attr != '"'
+ && ! is_end_of_line[attr])
{
- switch (*input_line_pointer)
+ switch (attr)
{
- case 'b': flags |= SEC_ALLOC; flags &=~ SEC_LOAD; break;
- case 'n': flags &=~ SEC_LOAD; flags |= SEC_NEVER_LOAD; break;
+ case 'b':
+ /* Uninitialised data section. */
+ flags |= SEC_ALLOC;
+ flags &=~ SEC_LOAD;
+ break;
+
+ case 'n':
+ /* Section not loaded. */
+ flags &=~ SEC_LOAD;
+ flags |= SEC_NEVER_LOAD;
+ load_removed = 1;
+ break;
+
+ case 's':
+ /* Shared section. */
+ flags |= SEC_COFF_SHARED;
+ /* Fall through. */
+ case 'd':
+ /* Data section. */
+ flags |= SEC_DATA;
+ if (! load_removed)
+ flags |= SEC_LOAD;
+ flags &=~ SEC_READONLY;
+ break;
+
+ case 'w':
+ /* Writable section. */
+ flags &=~ SEC_READONLY;
+ readonly_removed = 1;
+ break;
- case 's': flags |= SEC_SHARED; /* fall through */
- case 'd': flags |= SEC_DATA | SEC_LOAD; /* fall through */
- case 'w': flags &=~ SEC_READONLY; break;
+ case 'a':
+ /* Ignore. Here for compatibility with ELF. */
+ break;
- case 'a': break; /* For compatibility with ELF. */
- case 'x': flags |= SEC_CODE | SEC_LOAD; break;
- case 'r': flags |= SEC_DATA | SEC_LOAD | SEC_READONLY; break;
+ case 'r': /* Read-only section. Implies a data section. */
+ readonly_removed = 0;
+ /* Fall through. */
+ case 'x': /* Executable section. */
+ /* If we are setting the 'x' attribute or if the 'r'
+ attribute is being used to restore the readonly status
+ of a code section (eg "wxr") then set the SEC_CODE flag,
+ otherwise set the SEC_DATA flag. */
+ flags |= (attr == 'x' || (flags & SEC_CODE) ? SEC_CODE : SEC_DATA);
+ 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
+ linker. */
+ if (! readonly_removed)
+ flags |= SEC_READONLY;
+ break;
case 'i': /* STYP_INFO */
case 'l': /* STYP_LIB */
case 'o': /* STYP_OVER */
- as_warn (_("unsupported section attribute '%c'"),
- *input_line_pointer);
+ as_warn (_("unsupported section attribute '%c'"), attr);
break;
default:
- as_warn(_("unknown section attribute '%c'"),
- *input_line_pointer);
+ as_warn (_("unknown section attribute '%c'"), attr);
break;
}
- ++input_line_pointer;
}
- if (*input_line_pointer == '"')
+ if (attr == '"')
++input_line_pointer;
}
}
@@ -1509,7 +1615,7 @@ obj_coff_section (ignore)
/* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce
sections so adjust_reloc_syms in write.c will correctly handle
relocs which refer to non-local symbols in these sections. */
- if (strncmp (name, ".gnu.linkonce", sizeof (".gnu.linkonce") - 1) == 0)
+ if (strneq (name, ".gnu.linkonce", sizeof (".gnu.linkonce") - 1))
flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
@@ -1520,10 +1626,10 @@ obj_coff_section (ignore)
}
else if (flags != SEC_NO_FLAGS)
{
- /* This section's attributes have already been set. Warn if the
+ /* This section's attributes have already been set. Warn if the
attributes don't match. */
flagword matchflags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_DATA | SEC_SHARED | SEC_NEVER_LOAD);
+ | SEC_DATA | SEC_COFF_SHARED | SEC_NEVER_LOAD);
if ((flags ^ oldflags) & matchflags)
as_warn (_("Ignoring changed section attributes for %s"), name);
}
@@ -1532,16 +1638,15 @@ obj_coff_section (ignore)
}
void
-coff_adjust_symtab ()
+coff_adjust_symtab (void)
{
if (symbol_rootP == NULL
|| S_GET_STORAGE_CLASS (symbol_rootP) != C_FILE)
- c_dot_file_symbol ("fake");
+ c_dot_file_symbol ("fake", 0);
}
void
-coff_frob_section (sec)
- segT sec;
+coff_frob_section (segT sec)
{
segT strsec;
char *p;
@@ -1554,7 +1659,7 @@ coff_frob_section (sec)
supposedly because standard COFF has no other way of encoding alignment
for sections. If your COFF flavor has a different way of encoding
section alignment, then skip this step, as TICOFF does. */
- size = bfd_get_section_size_before_reloc (sec);
+ size = bfd_get_section_size (sec);
mask = ((bfd_vma) 1 << align_power) - 1;
#if !defined(TICOFF)
if (size & mask)
@@ -1594,22 +1699,22 @@ coff_frob_section (sec)
SA_SET_SCN_SCNLEN (secsym, size);
}
- /* @@ these should be in a "stabs.h" file, or maybe as.h */
+ /* FIXME: These should be in a "stabs.h" file, or maybe as.h. */
#ifndef STAB_SECTION_NAME
#define STAB_SECTION_NAME ".stab"
#endif
#ifndef STAB_STRING_SECTION_NAME
#define STAB_STRING_SECTION_NAME ".stabstr"
#endif
- if (strcmp (STAB_STRING_SECTION_NAME, sec->name))
+ if (! streq (STAB_STRING_SECTION_NAME, sec->name))
return;
strsec = sec;
sec = subseg_get (STAB_SECTION_NAME, 0);
/* size is already rounded up, since other section will be listed first */
- size = bfd_get_section_size_before_reloc (strsec);
+ size = bfd_get_section_size (strsec);
- n_entries = bfd_get_section_size_before_reloc (sec) / 12 - 1;
+ n_entries = bfd_get_section_size (sec) / 12 - 1;
/* Find first non-empty frag. It should be large enough. */
fragp = seg_info (sec)->frchainP->frch_root;
@@ -1624,8 +1729,7 @@ coff_frob_section (sec)
}
void
-obj_coff_init_stab_section (seg)
- segT seg;
+obj_coff_init_stab_section (segT seg)
{
char *file;
char *p;
@@ -1637,7 +1741,7 @@ obj_coff_init_stab_section (seg)
/* Zero it out. */
memset (p, 0, 12);
as_where (&file, (unsigned int *) NULL);
- stabstr_name = (char *) xmalloc (strlen (seg->name) + 4);
+ stabstr_name = xmalloc (strlen (seg->name) + 4);
strcpy (stabstr_name, seg->name);
strcat (stabstr_name, "str");
stroff = get_stab_string_offset (file, stabstr_name);
@@ -1646,3009 +1750,73 @@ obj_coff_init_stab_section (seg)
}
#ifdef DEBUG
-/* for debugging */
const char *
-s_get_name (s)
- symbolS *s;
+s_get_name (symbolS *s)
{
return ((s == NULL) ? "(NULL)" : S_GET_NAME (s));
}
void
-symbol_dump ()
+symbol_dump (void)
{
symbolS *symbolP;
for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
- {
- printf (_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"),
- (unsigned long) symbolP,
- S_GET_NAME(symbolP),
- (long) S_GET_DATA_TYPE(symbolP),
- S_GET_STORAGE_CLASS(symbolP),
- (int) S_GET_SEGMENT(symbolP));
- }
+ printf (_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"),
+ (unsigned long) symbolP,
+ S_GET_NAME (symbolP),
+ (long) S_GET_DATA_TYPE (symbolP),
+ S_GET_STORAGE_CLASS (symbolP),
+ (int) S_GET_SEGMENT (symbolP));
}
#endif /* DEBUG */
-#else /* not BFD_ASSEMBLER */
-
-#include "frags.h"
-/* This is needed because we include internal bfd things. */
-#include <time.h>
-
-#include "libbfd.h"
-#include "libcoff.h"
-
-#ifdef TE_PE
-#include "coff/pe.h"
-#endif
-
-/* The NOP_OPCODE is for the alignment fill value. Fill with nop so
- that we can stick sections together without causing trouble. */
-#ifndef NOP_OPCODE
-#define NOP_OPCODE 0x00
-#endif
-
-/* The zeroes if symbol name is longer than 8 chars */
-#define S_SET_ZEROES(s,v) ((s)->sy_symbol.ost_entry.n_zeroes = (v))
-
-#define MIN(a,b) ((a) < (b)? (a) : (b))
-
-/* This vector is used to turn a gas internal segment number into a
- section number suitable for insertion into a coff symbol table.
- This must correspond to seg_info_off_by_4. */
-
-const short seg_N_TYPE[] =
-{ /* in: segT out: N_TYPE bits */
- C_ABS_SECTION,
- 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,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- C_UNDEF_SECTION, /* SEG_UNKNOWN */
- C_UNDEF_SECTION, /* SEG_GOOF */
- C_UNDEF_SECTION, /* SEG_EXPR */
- C_DEBUG_SECTION, /* SEG_DEBUG */
- C_NTV_SECTION, /* SEG_NTV */
- C_PTV_SECTION, /* SEG_PTV */
- C_REGISTER_SECTION, /* SEG_REGISTER */
-};
-
-int function_lineoff = -1; /* Offset in line#s where the last function
- started (the odd entry for line #0) */
-
-/* Structure used to keep the filenames which
- are too long around so that we can stick them
- into the string table. */
-struct filename_list
-{
- char *filename;
- struct filename_list *next;
-};
-
-static struct filename_list *filename_list_head;
-static struct filename_list *filename_list_tail;
-
-static symbolS *last_line_symbol;
-
-/* Add 4 to the real value to get the index and compensate the
- negatives. This vector is used by S_GET_SEGMENT to turn a coff
- section number into a segment number. */
-
-bfd *abfd;
-static symbolS *previous_file_symbol;
-static int line_base;
-
-void c_symbol_merge PARAMS ((symbolS *, symbolS *));
-symbolS *c_section_symbol PARAMS ((char *, int));
-void obj_coff_section PARAMS ((int));
-void do_relocs_for PARAMS ((bfd *, object_headers *, unsigned long *));
-char * symbol_to_chars PARAMS ((bfd *, char *, symbolS *));
-void w_strings PARAMS ((char *));
-
-static void fixup_segment PARAMS ((segment_info_type *, segT));
-static void fixup_mdeps PARAMS ((fragS *, object_headers *, segT));
-static void fill_section PARAMS ((bfd *, object_headers *, unsigned long *));
-static int c_line_new PARAMS ((symbolS *, long, int, fragS *));
-static void w_symbols PARAMS ((bfd *, char *, symbolS *));
-static void adjust_stab_section PARAMS ((bfd *, segT));
-static void obj_coff_lcomm PARAMS ((int));
-static void obj_coff_text PARAMS ((int));
-static void obj_coff_data PARAMS ((int));
-static unsigned int count_entries_in_chain PARAMS ((unsigned int));
-static void coff_header_append PARAMS ((bfd *, object_headers *));
-static unsigned int yank_symbols PARAMS ((void));
-static unsigned int glue_symbols PARAMS ((symbolS **, symbolS **));
-static unsigned int tie_tags PARAMS ((void));
-static void crawl_symbols PARAMS ((object_headers *, bfd *));
-static void do_linenos_for PARAMS ((bfd *, object_headers *, unsigned long *));
-static void remove_subsegs PARAMS ((void));
-
-
-
-/* When not using BFD_ASSEMBLER, we permit up to 40 sections.
-
- This array maps a COFF section number into a gas section number.
- Because COFF uses negative section numbers, you must add 4 to the
- COFF section number when indexing into this array; this is done via
- the SEG_INFO_FROM_SECTION_NUMBER macro. This must correspond to
- seg_N_TYPE. */
-
-static const segT seg_info_off_by_4[] =
-{
- SEG_PTV,
- SEG_NTV,
- SEG_DEBUG,
- SEG_ABSOLUTE,
- SEG_UNKNOWN,
- SEG_E0, SEG_E1, SEG_E2, SEG_E3, SEG_E4,
- SEG_E5, SEG_E6, SEG_E7, SEG_E8, SEG_E9,
- SEG_E10, SEG_E11, SEG_E12, SEG_E13, SEG_E14,
- SEG_E15, SEG_E16, SEG_E17, SEG_E18, SEG_E19,
- SEG_E20, SEG_E21, SEG_E22, SEG_E23, SEG_E24,
- SEG_E25, SEG_E26, SEG_E27, SEG_E28, SEG_E29,
- SEG_E30, SEG_E31, SEG_E32, SEG_E33, SEG_E34,
- SEG_E35, SEG_E36, SEG_E37, SEG_E38, SEG_E39,
- (segT) 40,
- (segT) 41,
- (segT) 42,
- (segT) 43,
- (segT) 44,
- (segT) 45,
- (segT) 0,
- (segT) 0,
- (segT) 0,
- SEG_REGISTER
-};
-
-#define SEG_INFO_FROM_SECTION_NUMBER(x) (seg_info_off_by_4[(x)+4])
-
-static relax_addressT relax_align PARAMS ((relax_addressT, long));
-
-static relax_addressT
-relax_align (address, alignment)
- relax_addressT address;
- long alignment;
-{
- relax_addressT mask;
- relax_addressT new_address;
-
- mask = ~((~0) << alignment);
- new_address = (address + mask) & (~mask);
- return (new_address - address);
-}
-
-segT
-s_get_segment (x)
- symbolS * x;
-{
- return SEG_INFO_FROM_SECTION_NUMBER (x->sy_symbol.ost_entry.n_scnum);
-}
-
-static unsigned int size_section PARAMS ((bfd *, unsigned int));
-
-/* Calculate the size of the frag chain and fill in the section header
- to contain all of it, also fill in the addr of the sections. */
-
-static unsigned int
-size_section (abfd, idx)
- bfd *abfd ATTRIBUTE_UNUSED;
- unsigned int idx;
-{
-
- unsigned int size = 0;
- fragS *frag = segment_info[idx].frchainP->frch_root;
-
- while (frag)
- {
- size = frag->fr_address;
- if (frag->fr_address != size)
- {
- fprintf (stderr, _("Out of step\n"));
- size = frag->fr_address;
- }
-
- switch (frag->fr_type)
- {
-#ifdef TC_COFF_SIZEMACHDEP
- case rs_machine_dependent:
- size += TC_COFF_SIZEMACHDEP (frag);
- break;
-#endif
- case rs_space:
- case rs_fill:
- case rs_org:
- size += frag->fr_fix;
- size += frag->fr_offset * frag->fr_var;
- break;
- case rs_align:
- case rs_align_code:
- case rs_align_test:
- {
- addressT off;
-
- size += frag->fr_fix;
- off = relax_align (size, frag->fr_offset);
- if (frag->fr_subtype != 0 && off > frag->fr_subtype)
- off = 0;
- size += off;
- }
- break;
- default:
- BAD_CASE (frag->fr_type);
- break;
- }
- frag = frag->fr_next;
- }
- segment_info[idx].scnhdr.s_size = size;
- return size;
-}
-
-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)
- {
- if (fixup_ptr->fx_done == 0 && TC_COUNT_RELOC (fixup_ptr))
- {
-#if defined(TC_A29K) || defined(TC_OR32)
- if (fixup_ptr->fx_r_type == RELOC_CONSTH)
- nrelocs += 2;
- else
- nrelocs++;
-#else
- nrelocs++;
-#endif
- }
-
- fixup_ptr = fixup_ptr->fx_next;
- }
- return nrelocs;
-}
-
-#ifdef TE_AUX
-
-static int compare_external_relocs PARAMS ((const PTR, const PTR));
-
-/* AUX's ld expects relocations to be sorted. */
-
-static int
-compare_external_relocs (x, y)
- const PTR x;
- const PTR y;
-{
- struct external_reloc *a = (struct external_reloc *) x;
- struct external_reloc *b = (struct external_reloc *) y;
- bfd_vma aadr = bfd_getb32 (a->r_vaddr);
- bfd_vma badr = bfd_getb32 (b->r_vaddr);
- return (aadr < badr ? -1 : badr < aadr ? 1 : 0);
-}
-
-#endif
-
-/* Output all the relocations for a section. */
-
-void
-do_relocs_for (abfd, h, file_cursor)
- bfd * abfd;
- object_headers * h;
- unsigned long *file_cursor;
-{
- unsigned int nrelocs;
- unsigned int idx;
- unsigned long reloc_start = *file_cursor;
-
- for (idx = SEG_E0; idx < SEG_LAST; idx++)
- {
- if (segment_info[idx].scnhdr.s_name[0])
- {
- struct external_reloc *ext_ptr;
- struct external_reloc *external_reloc_vec;
- unsigned int external_reloc_size;
- unsigned int base = segment_info[idx].scnhdr.s_paddr;
- fixS *fix_ptr = segment_info[idx].fix_root;
- nrelocs = count_entries_in_chain (idx);
-
- if (nrelocs)
- /* Bypass this stuff if no relocs. This also incidentally
- avoids a SCO bug, where free(malloc(0)) tends to crash. */
- {
- external_reloc_size = nrelocs * RELSZ;
- external_reloc_vec =
- (struct external_reloc *) malloc (external_reloc_size);
-
- ext_ptr = external_reloc_vec;
-
- /* Fill in the internal coff style reloc struct from the
- internal fix list. */
- while (fix_ptr)
- {
- struct internal_reloc intr;
-
- /* Only output some of the relocations. */
- if (fix_ptr->fx_done == 0 && TC_COUNT_RELOC (fix_ptr))
- {
-#ifdef TC_RELOC_MANGLE
- TC_RELOC_MANGLE (&segment_info[idx], fix_ptr, &intr,
- base);
-#else
- symbolS *dot;
- symbolS *symbol_ptr = fix_ptr->fx_addsy;
-
- intr.r_type = TC_COFF_FIX2RTYPE (fix_ptr);
- intr.r_vaddr =
- base + fix_ptr->fx_frag->fr_address + fix_ptr->fx_where;
-
-#ifdef TC_KEEP_FX_OFFSET
- intr.r_offset = fix_ptr->fx_offset;
-#else
- intr.r_offset = 0;
-#endif
-
- while (symbol_ptr->sy_value.X_op == O_symbol
- && (! S_IS_DEFINED (symbol_ptr)
- || S_IS_COMMON (symbol_ptr)))
- {
- symbolS *n;
-
- /* We must avoid looping, as that can occur
- with a badly written program. */
- n = symbol_ptr->sy_value.X_add_symbol;
- if (n == symbol_ptr)
- break;
- symbol_ptr = n;
- }
-
- /* Turn the segment of the symbol into an offset. */
- if (symbol_ptr)
- {
- resolve_symbol_value (symbol_ptr);
- if (! symbol_ptr->sy_resolved)
- {
- char *file;
- unsigned int line;
-
- if (expr_symbol_where (symbol_ptr, &file, &line))
- as_bad_where (file, line,
- _("unresolved relocation"));
- else
- as_bad (_("bad relocation: symbol `%s' not in symbol table"),
- S_GET_NAME (symbol_ptr));
- }
-
- dot = segment_info[S_GET_SEGMENT (symbol_ptr)].dot;
- if (dot)
- intr.r_symndx = dot->sy_number;
- else
- intr.r_symndx = symbol_ptr->sy_number;
- }
- else
- intr.r_symndx = -1;
-#endif
- (void) bfd_coff_swap_reloc_out (abfd, &intr, ext_ptr);
- ext_ptr++;
-#if defined(TC_A29K)
- /* The 29k has a special kludge for the high 16 bit
- reloc. Two relocations are emitted, R_IHIHALF,
- and R_IHCONST. The second one doesn't contain a
- symbol, but uses the value for offset. */
- if (intr.r_type == R_IHIHALF)
- {
- /* Now emit the second bit. */
- intr.r_type = R_IHCONST;
- intr.r_symndx = fix_ptr->fx_addnumber;
- (void) bfd_coff_swap_reloc_out (abfd, &intr, ext_ptr);
- ext_ptr++;
- }
-#endif
-#if defined(TC_OR32)
- /* The or32 has a special kludge for the high 16 bit
- reloc. Two relocations are emitted, R_IHIHALF,
- and R_IHCONST. The second one doesn't contain a
- symbol, but uses the value for offset. */
- if (intr.r_type == R_IHIHALF)
- {
- /* Now emit the second bit. */
- intr.r_type = R_IHCONST;
- intr.r_symndx = fix_ptr->fx_addnumber;
- (void) bfd_coff_swap_reloc_out (abfd, & intr, ext_ptr);
- ext_ptr ++;
- }
-#endif
- }
-
- fix_ptr = fix_ptr->fx_next;
- }
-#ifdef TE_AUX
- /* Sort the reloc table. */
- qsort ((PTR) external_reloc_vec, nrelocs,
- sizeof (struct external_reloc), compare_external_relocs);
-#endif
- /* Write out the reloc table. */
- bfd_bwrite ((PTR) external_reloc_vec,
- (bfd_size_type) external_reloc_size, abfd);
- free (external_reloc_vec);
-
- /* Fill in section header info. */
- segment_info[idx].scnhdr.s_relptr = *file_cursor;
- *file_cursor += external_reloc_size;
- segment_info[idx].scnhdr.s_nreloc = nrelocs;
- }
- else
- {
- /* No relocs. */
- segment_info[idx].scnhdr.s_relptr = 0;
- }
- }
- }
-
- /* Set relocation_size field in file headers. */
- H_SET_RELOCATION_SIZE (h, *file_cursor - reloc_start, 0);
-}
-
-/* Run through a frag chain and write out the data to go with it, fill
- in the scnhdrs with the info on the file positions. */
-
-static void
-fill_section (abfd, h, file_cursor)
- bfd * abfd;
- object_headers *h ATTRIBUTE_UNUSED;
- unsigned long *file_cursor;
-{
- unsigned int i;
- unsigned int paddr = 0;
-
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- unsigned int offset = 0;
- struct internal_scnhdr *s = &(segment_info[i].scnhdr);
-
- PROGRESS (1);
-
- if (s->s_name[0])
- {
- fragS *frag = segment_info[i].frchainP->frch_root;
- char *buffer = NULL;
-
- if (s->s_size == 0)
- s->s_scnptr = 0;
- else
- {
- buffer = xmalloc (s->s_size);
- s->s_scnptr = *file_cursor;
- }
- know (s->s_paddr == paddr);
-
- if (strcmp (s->s_name, ".text") == 0)
- s->s_flags |= STYP_TEXT;
- else if (strcmp (s->s_name, ".data") == 0)
- s->s_flags |= STYP_DATA;
- else if (strcmp (s->s_name, ".bss") == 0)
- {
- s->s_scnptr = 0;
- s->s_flags |= STYP_BSS;
-
- /* @@ Should make the i386 and a29k coff targets define
- COFF_NOLOAD_PROBLEM, and have only one test here. */
-#ifndef TC_I386
-#ifndef TC_A29K
-#ifndef TC_OR32
-#ifndef COFF_NOLOAD_PROBLEM
- /* Apparently the SVR3 linker (and exec syscall) and UDI
- mondfe progrem are confused by noload sections. */
- s->s_flags |= STYP_NOLOAD;
-#endif
-#endif
-#endif
-#endif
- }
- else if (strcmp (s->s_name, ".lit") == 0)
- s->s_flags = STYP_LIT | STYP_TEXT;
- else if (strcmp (s->s_name, ".init") == 0)
- s->s_flags |= STYP_TEXT;
- else if (strcmp (s->s_name, ".fini") == 0)
- s->s_flags |= STYP_TEXT;
- else if (strncmp (s->s_name, ".comment", 8) == 0)
- s->s_flags |= STYP_INFO;
-
- while (frag)
- {
- unsigned int fill_size;
- switch (frag->fr_type)
- {
- case rs_machine_dependent:
- if (frag->fr_fix)
- {
- memcpy (buffer + frag->fr_address,
- frag->fr_literal,
- (unsigned int) frag->fr_fix);
- offset += frag->fr_fix;
- }
-
- break;
- case rs_space:
- case rs_fill:
- case rs_align:
- case rs_align_code:
- case rs_align_test:
- case rs_org:
- if (frag->fr_fix)
- {
- memcpy (buffer + frag->fr_address,
- frag->fr_literal,
- (unsigned int) frag->fr_fix);
- offset += frag->fr_fix;
- }
-
- fill_size = frag->fr_var;
- if (fill_size && frag->fr_offset > 0)
- {
- unsigned int count;
- unsigned int off = frag->fr_fix;
- for (count = frag->fr_offset; count; count--)
- {
- if (fill_size + frag->fr_address + off <= s->s_size)
- {
- memcpy (buffer + frag->fr_address + off,
- frag->fr_literal + frag->fr_fix,
- fill_size);
- off += fill_size;
- offset += fill_size;
- }
- }
- }
- break;
- case rs_broken_word:
- break;
- default:
- abort ();
- }
- frag = frag->fr_next;
- }
-
- if (s->s_size != 0)
- {
- if (s->s_scnptr != 0)
- {
- bfd_bwrite (buffer, s->s_size, abfd);
- *file_cursor += s->s_size;
- }
- free (buffer);
- }
- paddr += s->s_size;
- }
- }
-}
-
-/* Coff file generation & utilities. */
-
-static void
-coff_header_append (abfd, h)
- bfd * abfd;
- object_headers * h;
-{
- unsigned int i;
- char buffer[1000];
- char buffero[1000];
-#ifdef COFF_LONG_SECTION_NAMES
- unsigned long string_size = 4;
-#endif
-
- bfd_seek (abfd, (file_ptr) 0, 0);
-
-#ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER
- H_SET_MAGIC_NUMBER (h, COFF_MAGIC);
- H_SET_VERSION_STAMP (h, 0);
- H_SET_ENTRY_POINT (h, 0);
- H_SET_TEXT_START (h, segment_info[SEG_E0].frchainP->frch_root->fr_address);
- H_SET_DATA_START (h, segment_info[SEG_E1].frchainP->frch_root->fr_address);
- H_SET_SIZEOF_OPTIONAL_HEADER (h, bfd_coff_swap_aouthdr_out(abfd, &h->aouthdr,
- buffero));
-#else /* defined (OBJ_COFF_OMIT_OPTIONAL_HEADER) */
- H_SET_SIZEOF_OPTIONAL_HEADER (h, 0);
-#endif /* defined (OBJ_COFF_OMIT_OPTIONAL_HEADER) */
-
- i = bfd_coff_swap_filehdr_out (abfd, &h->filehdr, buffer);
-
- bfd_bwrite (buffer, (bfd_size_type) i, abfd);
- bfd_bwrite (buffero, (bfd_size_type) H_GET_SIZEOF_OPTIONAL_HEADER (h), abfd);
-
- for (i = SEG_E0; i < SEG_LAST; i++)
- {
- if (segment_info[i].scnhdr.s_name[0])
- {
- unsigned int size;
-
-#ifdef COFF_LONG_SECTION_NAMES
- /* Support long section names as found in PE. This code
- must coordinate with that in write_object_file and
- w_strings. */
- if (strlen (segment_info[i].name) > SCNNMLEN)
- {
- memset (segment_info[i].scnhdr.s_name, 0, SCNNMLEN);
- sprintf (segment_info[i].scnhdr.s_name, "/%lu", string_size);
- string_size += strlen (segment_info[i].name) + 1;
- }
-#endif
- size = bfd_coff_swap_scnhdr_out (abfd,
- &(segment_info[i].scnhdr),
- buffer);
- if (size == 0)
- as_bad (_("bfd_coff_swap_scnhdr_out failed"));
- bfd_bwrite (buffer, (bfd_size_type) size, abfd);
- }
- }
-}
-
-char *
-symbol_to_chars (abfd, where, symbolP)
- bfd * abfd;
- char *where;
- symbolS * symbolP;
-{
- unsigned int numaux = symbolP->sy_symbol.ost_entry.n_numaux;
- unsigned int i;
- valueT val;
-
- /* Turn any symbols with register attributes into abs symbols. */
- if (S_GET_SEGMENT (symbolP) == reg_section)
- S_SET_SEGMENT (symbolP, absolute_section);
-
- /* At the same time, relocate all symbols to their output value. */
-#ifndef TE_PE
- val = (segment_info[S_GET_SEGMENT (symbolP)].scnhdr.s_paddr
- + S_GET_VALUE (symbolP));
-#else
- val = S_GET_VALUE (symbolP);
-#endif
-
- S_SET_VALUE (symbolP, val);
-
- symbolP->sy_symbol.ost_entry.n_value = val;
-
- where += bfd_coff_swap_sym_out (abfd, &symbolP->sy_symbol.ost_entry,
- where);
-
- for (i = 0; i < numaux; i++)
- {
- where += bfd_coff_swap_aux_out (abfd,
- &symbolP->sy_symbol.ost_auxent[i],
- S_GET_DATA_TYPE (symbolP),
- S_GET_STORAGE_CLASS (symbolP),
- i, numaux, where);
- }
-
- return where;
-}
-
-void
-coff_obj_symbol_new_hook (symbolP)
- symbolS *symbolP;
-{
- char underscore = 0; /* Symbol has leading _ */
-
- /* Effective symbol. */
- /* Store the pointer in the offset. */
- S_SET_ZEROES (symbolP, 0L);
- S_SET_DATA_TYPE (symbolP, T_NULL);
- S_SET_STORAGE_CLASS (symbolP, 0);
- S_SET_NUMBER_AUXILIARY (symbolP, 0);
- /* Additional information. */
- symbolP->sy_symbol.ost_flags = 0;
- /* Auxiliary entries. */
- memset ((char *) &symbolP->sy_symbol.ost_auxent[0], 0, AUXESZ);
-
- if (S_IS_STRING (symbolP))
- SF_SET_STRING (symbolP);
- if (!underscore && S_IS_LOCAL (symbolP))
- SF_SET_LOCAL (symbolP);
-}
-
-/* Handle .ln directives. */
-
-static void
-obj_coff_ln (appline)
- int appline;
-{
- int l;
-
- if (! appline && def_symbol_in_progress != NULL)
- {
- /* Wrong context. */
- as_warn (_(".ln pseudo-op inside .def/.endef: ignored."));
- demand_empty_rest_of_line ();
- return;
- }
-
- l = get_absolute_expression ();
- c_line_new (0, frag_now_fix (), l, frag_now);
-
- if (appline)
- new_logical_line ((char *) NULL, l - 1);
-
-#ifndef NO_LISTING
- {
- extern int listing;
-
- if (listing)
- {
- if (! appline)
- l += line_base - 1;
- listing_source_line ((unsigned int) l);
- }
-
- }
-#endif
- demand_empty_rest_of_line ();
-}
-
-/* Handle .def directives.
-
- One might ask : why can't we symbol_new if the symbol does not
- already exist and fill it with debug information. Because of
- the C_EFCN special symbol. It would clobber the value of the
- function symbol before we have a chance to notice that it is
- a C_EFCN. And a second reason is that the code is more clear this
- way. (at least I think it is :-). */
-
-#define SKIP_SEMI_COLON() while (*input_line_pointer++ != ';')
-#define SKIP_WHITESPACES() while (*input_line_pointer == ' ' || \
- *input_line_pointer == '\t') \
- input_line_pointer++;
-
-static void
-obj_coff_def (what)
- int what ATTRIBUTE_UNUSED;
-{
- char name_end; /* Char after the end of name. */
- char *symbol_name; /* Name of the debug symbol. */
- char *symbol_name_copy; /* Temporary copy of the name. */
- unsigned int symbol_name_length;
-
- if (def_symbol_in_progress != NULL)
- {
- as_warn (_(".def pseudo-op used inside of .def/.endef: ignored."));
- demand_empty_rest_of_line ();
- return;
- }
-
- SKIP_WHITESPACES ();
-
- def_symbol_in_progress = (symbolS *) obstack_alloc (&notes, sizeof (*def_symbol_in_progress));
- memset (def_symbol_in_progress, 0, sizeof (*def_symbol_in_progress));
-
- symbol_name = input_line_pointer;
- name_end = get_symbol_end ();
- symbol_name_length = strlen (symbol_name);
- symbol_name_copy = xmalloc (symbol_name_length + 1);
- strcpy (symbol_name_copy, symbol_name);
-#ifdef tc_canonicalize_symbol_name
- symbol_name_copy = tc_canonicalize_symbol_name (symbol_name_copy);
-#endif
-
- /* Initialize the new symbol. */
-#ifdef STRIP_UNDERSCORE
- S_SET_NAME (def_symbol_in_progress, (*symbol_name_copy == '_'
- ? symbol_name_copy + 1
- : symbol_name_copy));
-#else /* STRIP_UNDERSCORE */
- S_SET_NAME (def_symbol_in_progress, symbol_name_copy);
-#endif /* STRIP_UNDERSCORE */
- /* free(symbol_name_copy); */
- def_symbol_in_progress->sy_name_offset = (unsigned long) ~0;
- def_symbol_in_progress->sy_number = ~0;
- def_symbol_in_progress->sy_frag = &zero_address_frag;
- S_SET_VALUE (def_symbol_in_progress, 0);
-
- if (S_IS_STRING (def_symbol_in_progress))
- SF_SET_STRING (def_symbol_in_progress);
-
- *input_line_pointer = name_end;
-
- demand_empty_rest_of_line ();
-}
-
-unsigned int dim_index;
-
-static void
-obj_coff_endef (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- symbolS *symbolP = 0;
- /* DIM BUG FIX sac@cygnus.com */
- dim_index = 0;
- if (def_symbol_in_progress == NULL)
- {
- as_warn (_(".endef pseudo-op used outside of .def/.endef: ignored."));
- demand_empty_rest_of_line ();
- return;
- }
-
- /* Set the section number according to storage class. */
- switch (S_GET_STORAGE_CLASS (def_symbol_in_progress))
- {
- case C_STRTAG:
- case C_ENTAG:
- case C_UNTAG:
- SF_SET_TAG (def_symbol_in_progress);
- /* Intentional fallthrough. */
-
- case C_FILE:
- case C_TPDEF:
- SF_SET_DEBUG (def_symbol_in_progress);
- S_SET_SEGMENT (def_symbol_in_progress, SEG_DEBUG);
- break;
-
- case C_EFCN:
- /* Do not emit this symbol. */
- SF_SET_LOCAL (def_symbol_in_progress);
- /* Intentional fallthrough. */
-
- case C_BLOCK:
- /* Will need processing before writing. */
- SF_SET_PROCESS (def_symbol_in_progress);
- /* Intentional fallthrough. */
-
- case C_FCN:
- S_SET_SEGMENT (def_symbol_in_progress, SEG_E0);
-
- if (strcmp (S_GET_NAME (def_symbol_in_progress), ".bf") == 0)
- { /* .bf */
- if (function_lineoff < 0)
- fprintf (stderr, _("`.bf' symbol without preceding function\n"));
-
- SA_GET_SYM_LNNOPTR (last_line_symbol) = function_lineoff;
-
- SF_SET_PROCESS (last_line_symbol);
- SF_SET_ADJ_LNNOPTR (last_line_symbol);
- SF_SET_PROCESS (def_symbol_in_progress);
- function_lineoff = -1;
- }
-
- /* Value is always set to . */
- def_symbol_in_progress->sy_frag = frag_now;
- S_SET_VALUE (def_symbol_in_progress, (valueT) frag_now_fix ());
- break;
-
-#ifdef C_AUTOARG
- case C_AUTOARG:
-#endif /* C_AUTOARG */
- case C_AUTO:
- case C_REG:
- case C_MOS:
- case C_MOE:
- case C_MOU:
- case C_ARG:
- case C_REGPARM:
- case C_FIELD:
- case C_EOS:
- SF_SET_DEBUG (def_symbol_in_progress);
- S_SET_SEGMENT (def_symbol_in_progress, absolute_section);
- break;
-
- case C_EXT:
- case C_WEAKEXT:
-#ifdef TE_PE
- case C_NT_WEAK:
-#endif
- case C_STAT:
- case C_LABEL:
- /* Valid but set somewhere else (s_comm, s_lcomm, colon). */
- break;
-
- case C_USTATIC:
- case C_EXTDEF:
- case C_ULABEL:
- as_warn (_("unexpected storage class %d"), S_GET_STORAGE_CLASS (def_symbol_in_progress));
- break;
- }
-
- /* Now that we have built a debug symbol, try to find if we should
- merge with an existing symbol or not. If a symbol is C_EFCN or
- absolute_section or untagged SEG_DEBUG it never merges. We also
- don't merge labels, which are in a different namespace, nor
- symbols which have not yet been defined since they are typically
- unique, nor do we merge tags with non-tags. */
-
- /* Two cases for functions. Either debug followed by definition or
- definition followed by debug. For definition first, we will
- merge the debug symbol into the definition. For debug first, the
- lineno entry MUST point to the definition function or else it
- will point off into space when crawl_symbols() merges the debug
- symbol into the real symbol. Therefor, let's presume the debug
- symbol is a real function reference. */
-
- /* FIXME-SOON If for some reason the definition label/symbol is
- never seen, this will probably leave an undefined symbol at link
- time. */
-
- if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN
- || S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL
- || (S_GET_SEGMENT (def_symbol_in_progress) == SEG_DEBUG
- && !SF_GET_TAG (def_symbol_in_progress))
- || S_GET_SEGMENT (def_symbol_in_progress) == absolute_section
- || def_symbol_in_progress->sy_value.X_op != O_constant
- || (symbolP = symbol_find_base (S_GET_NAME (def_symbol_in_progress), DO_NOT_STRIP)) == NULL
- || (SF_GET_TAG (def_symbol_in_progress) != SF_GET_TAG (symbolP)))
- {
- symbol_append (def_symbol_in_progress, symbol_lastP, &symbol_rootP,
- &symbol_lastP);
- }
- else
- {
- /* This symbol already exists, merge the newly created symbol
- into the old one. This is not mandatory. The linker can
- handle duplicate symbols correctly. But I guess that it save
- a *lot* of space if the assembly file defines a lot of
- symbols. [loic] */
-
- /* The debug entry (def_symbol_in_progress) is merged into the
- previous definition. */
-
- c_symbol_merge (def_symbol_in_progress, symbolP);
- /* FIXME-SOON Should *def_symbol_in_progress be free'd? xoxorich. */
- def_symbol_in_progress = symbolP;
-
- if (SF_GET_FUNCTION (def_symbol_in_progress)
- || SF_GET_TAG (def_symbol_in_progress)
- || S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_STAT)
- {
- /* For functions, and tags, and static symbols, the symbol
- *must* be where the debug symbol appears. Move the
- existing symbol to the current place. */
- /* If it already is at the end of the symbol list, do nothing. */
- if (def_symbol_in_progress != symbol_lastP)
- {
- symbol_remove (def_symbol_in_progress, &symbol_rootP,
- &symbol_lastP);
- symbol_append (def_symbol_in_progress, symbol_lastP,
- &symbol_rootP, &symbol_lastP);
- }
- }
- }
-
- if (SF_GET_TAG (def_symbol_in_progress))
- {
- symbolS *oldtag;
-
- oldtag = symbol_find_base (S_GET_NAME (def_symbol_in_progress),
- DO_NOT_STRIP);
- if (oldtag == NULL || ! SF_GET_TAG (oldtag))
- tag_insert (S_GET_NAME (def_symbol_in_progress),
- def_symbol_in_progress);
- }
-
- if (SF_GET_FUNCTION (def_symbol_in_progress))
- {
- know (sizeof (def_symbol_in_progress) <= sizeof (long));
- function_lineoff
- = c_line_new (def_symbol_in_progress, 0, 0, &zero_address_frag);
-
- SF_SET_PROCESS (def_symbol_in_progress);
-
- if (symbolP == NULL)
- {
- /* That is, if this is the first time we've seen the
- function... */
- symbol_table_insert (def_symbol_in_progress);
- }
- }
-
- def_symbol_in_progress = NULL;
- demand_empty_rest_of_line ();
-}
-
-static void
-obj_coff_dim (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- int dim_index;
-
- if (def_symbol_in_progress == NULL)
- {
- as_warn (_(".dim pseudo-op used outside of .def/.endef: ignored."));
- demand_empty_rest_of_line ();
- return;
- }
-
- S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
-
- for (dim_index = 0; dim_index < DIMNUM; dim_index++)
- {
- SKIP_WHITESPACES ();
- SA_SET_SYM_DIMEN (def_symbol_in_progress, dim_index,
- get_absolute_expression ());
-
- switch (*input_line_pointer)
- {
- case ',':
- input_line_pointer++;
- break;
-
- default:
- as_warn (_("badly formed .dim directive ignored"));
- /* Intentional fallthrough. */
-
- case '\n':
- case ';':
- dim_index = DIMNUM;
- break;
- }
- }
-
- demand_empty_rest_of_line ();
-}
-
-static void
-obj_coff_line (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- int this_base;
- const char *name;
-
- if (def_symbol_in_progress == NULL)
- {
- obj_coff_ln (0);
- return;
- }
-
- name = S_GET_NAME (def_symbol_in_progress);
- this_base = get_absolute_expression ();
-
- /* Only .bf symbols indicate the use of a new base line number; the
- line numbers associated with .ef, .bb, .eb are relative to the
- start of the containing function. */
- if (!strcmp (".bf", name))
- {
-#if 0 /* XXX Can we ever have line numbers going backwards? */
- if (this_base > line_base)
-#endif
- line_base = this_base;
-
-#ifndef NO_LISTING
- {
- extern int listing;
- if (listing)
- listing_source_line ((unsigned int) line_base);
- }
-#endif
- }
-
- S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
- SA_SET_SYM_LNNO (def_symbol_in_progress, this_base);
-
- demand_empty_rest_of_line ();
-}
-
-static void
-obj_coff_size (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- if (def_symbol_in_progress == NULL)
- {
- as_warn (_(".size pseudo-op used outside of .def/.endef ignored."));
- demand_empty_rest_of_line ();
- return;
- }
-
- S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
- SA_SET_SYM_SIZE (def_symbol_in_progress, get_absolute_expression ());
- demand_empty_rest_of_line ();
-}
-
-static void
-obj_coff_scl (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- if (def_symbol_in_progress == NULL)
- {
- as_warn (_(".scl pseudo-op used outside of .def/.endef ignored."));
- demand_empty_rest_of_line ();
- return;
- }
-
- S_SET_STORAGE_CLASS (def_symbol_in_progress, get_absolute_expression ());
- demand_empty_rest_of_line ();
-}
-
-static void
-obj_coff_tag (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- char *symbol_name;
- char name_end;
-
- if (def_symbol_in_progress == NULL)
- {
- as_warn (_(".tag pseudo-op used outside of .def/.endef ignored."));
- demand_empty_rest_of_line ();
- return;
- }
-
- S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
- symbol_name = input_line_pointer;
- name_end = get_symbol_end ();
-#ifdef tc_canonicalize_symbol_name
- symbol_name = tc_canonicalize_symbol_name (symbol_name);
-#endif
-
- /* Assume that the symbol referred to by .tag is always defined.
- This was a bad assumption. I've added find_or_make. xoxorich. */
- SA_SET_SYM_TAGNDX (def_symbol_in_progress,
- (long) tag_find_or_make (symbol_name));
- if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L)
- as_warn (_("tag not found for .tag %s"), symbol_name);
-
- SF_SET_TAGGED (def_symbol_in_progress);
- *input_line_pointer = name_end;
-
- demand_empty_rest_of_line ();
-}
-
-static void
-obj_coff_type (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- if (def_symbol_in_progress == NULL)
- {
- as_warn (_(".type pseudo-op used outside of .def/.endef ignored."));
- demand_empty_rest_of_line ();
- return;
- }
-
- S_SET_DATA_TYPE (def_symbol_in_progress, get_absolute_expression ());
-
- if (ISFCN (S_GET_DATA_TYPE (def_symbol_in_progress)) &&
- S_GET_STORAGE_CLASS (def_symbol_in_progress) != C_TPDEF)
- SF_SET_FUNCTION (def_symbol_in_progress);
-
- demand_empty_rest_of_line ();
-}
-
-static void
-obj_coff_val (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- if (def_symbol_in_progress == NULL)
- {
- as_warn (_(".val pseudo-op used outside of .def/.endef ignored."));
- demand_empty_rest_of_line ();
- return;
- }
-
- if (is_name_beginner (*input_line_pointer))
- {
- char *symbol_name = input_line_pointer;
- char name_end = get_symbol_end ();
-
-#ifdef tc_canonicalize_symbol_name
- symbol_name = tc_canonicalize_symbol_name (symbol_name);
-#endif
-
- if (!strcmp (symbol_name, "."))
- {
- def_symbol_in_progress->sy_frag = frag_now;
- S_SET_VALUE (def_symbol_in_progress, (valueT) frag_now_fix ());
- /* If the .val is != from the .def (e.g. statics). */
- }
- else if (strcmp (S_GET_NAME (def_symbol_in_progress), symbol_name))
- {
- def_symbol_in_progress->sy_value.X_op = O_symbol;
- def_symbol_in_progress->sy_value.X_add_symbol =
- symbol_find_or_make (symbol_name);
- def_symbol_in_progress->sy_value.X_op_symbol = NULL;
- def_symbol_in_progress->sy_value.X_add_number = 0;
-
- /* If the segment is undefined when the forward reference is
- resolved, then copy the segment id from the forward
- symbol. */
- SF_SET_GET_SEGMENT (def_symbol_in_progress);
-
- /* FIXME: gcc can generate address expressions here in
- unusual cases (search for "obscure" in sdbout.c). We
- just ignore the offset here, thus generating incorrect
- debugging information. We ignore the rest of the line
- just below. */
- }
- /* Otherwise, it is the name of a non debug symbol and
- its value will be calculated later. */
- *input_line_pointer = name_end;
-
- /* FIXME: this is to avoid an error message in the
- FIXME case mentioned just above. */
- while (! is_end_of_line[(unsigned char) *input_line_pointer])
- ++input_line_pointer;
- }
- else
- {
- S_SET_VALUE (def_symbol_in_progress,
- (valueT) get_absolute_expression ());
- } /* if symbol based */
-
- demand_empty_rest_of_line ();
-}
-
-#ifdef TE_PE
-
-/* Handle the .linkonce pseudo-op. This is parsed by s_linkonce in
- read.c, which then calls this object file format specific routine. */
-
-void
-obj_coff_pe_handle_link_once (type)
- enum linkonce_type type;
-{
- seg_info (now_seg)->scnhdr.s_flags |= IMAGE_SCN_LNK_COMDAT;
-
- /* We store the type in the seg_info structure, and use it to set up
- the auxiliary entry for the section symbol in c_section_symbol. */
- seg_info (now_seg)->linkonce = type;
-}
-
-#endif /* TE_PE */
-
-void
-coff_obj_read_begin_hook ()
-{
- /* These had better be the same. Usually 18 bytes. */
-#ifndef BFD_HEADERS
- know (sizeof (SYMENT) == sizeof (AUXENT));
- know (SYMESZ == AUXESZ);
-#endif
- tag_init ();
-}
-
-/* This function runs through the symbol table and puts all the
- externals onto another chain. */
-
-/* The chain of globals. */
-symbolS *symbol_globalP;
-symbolS *symbol_global_lastP;
-
-/* The chain of externals. */
-symbolS *symbol_externP;
-symbolS *symbol_extern_lastP;
-
-stack *block_stack;
-symbolS *last_functionP;
-static symbolS *last_bfP;
-symbolS *last_tagP;
-
-static unsigned int
-yank_symbols ()
-{
- symbolS *symbolP;
- unsigned int symbol_number = 0;
- unsigned int last_file_symno = 0;
-
- struct filename_list *filename_list_scan = filename_list_head;
-
- for (symbolP = symbol_rootP;
- symbolP;
- symbolP = symbolP ? symbol_next (symbolP) : symbol_rootP)
- {
- if (symbolP->sy_mri_common)
- {
- if (S_GET_STORAGE_CLASS (symbolP) == C_EXT
-#ifdef TE_PE
- || S_GET_STORAGE_CLASS (symbolP) == C_NT_WEAK
-#endif
- || S_GET_STORAGE_CLASS (symbolP) == C_WEAKEXT)
- as_bad (_("%s: global symbols not supported in common sections"),
- S_GET_NAME (symbolP));
- symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
- continue;
- }
-
- if (!SF_GET_DEBUG (symbolP))
- {
- /* Debug symbols do not need all this rubbish. */
- symbolS *real_symbolP;
-
- /* L* and C_EFCN symbols never merge. */
- if (!SF_GET_LOCAL (symbolP)
- && !SF_GET_STATICS (symbolP)
- && S_GET_STORAGE_CLASS (symbolP) != C_LABEL
- && symbolP->sy_value.X_op == O_constant
- && (real_symbolP = symbol_find_base (S_GET_NAME (symbolP), DO_NOT_STRIP))
- && real_symbolP != symbolP)
- {
- /* FIXME-SOON: where do dups come from?
- Maybe tag references before definitions? xoxorich. */
- /* Move the debug data from the debug symbol to the
- real symbol. Do NOT do the opposite (i.e. move from
- real symbol to debug symbol and remove real symbol from the
- list.) Because some pointers refer to the real symbol
- whereas no pointers refer to the debug symbol. */
- c_symbol_merge (symbolP, real_symbolP);
- /* Replace the current symbol by the real one. */
- /* The symbols will never be the last or the first
- because : 1st symbol is .file and 3 last symbols are
- .text, .data, .bss. */
- symbol_remove (real_symbolP, &symbol_rootP, &symbol_lastP);
- symbol_insert (real_symbolP, symbolP, &symbol_rootP, &symbol_lastP);
- symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
- symbolP = real_symbolP;
- }
-
- if (flag_readonly_data_in_text && (S_GET_SEGMENT (symbolP) == SEG_E1))
- S_SET_SEGMENT (symbolP, SEG_E0);
-
- resolve_symbol_value (symbolP);
-
- if (S_GET_STORAGE_CLASS (symbolP) == C_NULL)
- {
- if (!S_IS_DEFINED (symbolP) && !SF_GET_LOCAL (symbolP))
- {
- S_SET_EXTERNAL (symbolP);
- }
-
- else if (S_GET_SEGMENT (symbolP) == SEG_E0)
- S_SET_STORAGE_CLASS (symbolP, C_LABEL);
-
- else
- S_SET_STORAGE_CLASS (symbolP, C_STAT);
- }
-
- /* Mainly to speed up if not -g. */
- if (SF_GET_PROCESS (symbolP))
- {
- /* Handle the nested blocks auxiliary info. */
- if (S_GET_STORAGE_CLASS (symbolP) == C_BLOCK)
- {
- if (!strcmp (S_GET_NAME (symbolP), ".bb"))
- stack_push (block_stack, (char *) &symbolP);
- else
- {
- /* .eb */
- symbolS *begin_symbolP;
-
- begin_symbolP = *(symbolS **) stack_pop (block_stack);
- if (begin_symbolP == (symbolS *) 0)
- as_warn (_("mismatched .eb"));
- else
- SA_SET_SYM_ENDNDX (begin_symbolP, symbol_number + 2);
- }
- }
- /* If we are able to identify the type of a function, and we
- are out of a function (last_functionP == 0) then, the
- function symbol will be associated with an auxiliary
- entry. */
- if (last_functionP == (symbolS *) 0 &&
- SF_GET_FUNCTION (symbolP))
- {
- last_functionP = symbolP;
-
- if (S_GET_NUMBER_AUXILIARY (symbolP) < 1)
- S_SET_NUMBER_AUXILIARY (symbolP, 1);
-
- /* Clobber possible stale .dim information. */
-#if 0
- /* Iffed out by steve - this fries the lnnoptr info too. */
- bzero (symbolP->sy_symbol.ost_auxent[0].x_sym.x_fcnary.x_ary.x_dimen,
- sizeof (symbolP->sy_symbol.ost_auxent[0].x_sym.x_fcnary.x_ary.x_dimen));
-#endif
- }
- if (S_GET_STORAGE_CLASS (symbolP) == C_FCN)
- {
- if (strcmp (S_GET_NAME (symbolP), ".bf") == 0)
- {
- if (last_bfP != NULL)
- SA_SET_SYM_ENDNDX (last_bfP, symbol_number);
- last_bfP = symbolP;
- }
- }
- else if (S_GET_STORAGE_CLASS (symbolP) == C_EFCN)
- {
- /* I don't even know if this is needed for sdb. But
- the standard assembler generates it, so... */
- if (last_functionP == (symbolS *) 0)
- as_fatal (_("C_EFCN symbol out of scope"));
- SA_SET_SYM_FSIZE (last_functionP,
- (long) (S_GET_VALUE (symbolP) -
- S_GET_VALUE (last_functionP)));
- SA_SET_SYM_ENDNDX (last_functionP, symbol_number);
- last_functionP = (symbolS *) 0;
- }
- }
- }
- else if (SF_GET_TAG (symbolP))
- {
- /* First descriptor of a structure must point to
- the first slot after the structure description. */
- last_tagP = symbolP;
-
- }
- else if (S_GET_STORAGE_CLASS (symbolP) == C_EOS)
- {
- /* +2 take in account the current symbol. */
- SA_SET_SYM_ENDNDX (last_tagP, symbol_number + 2);
- }
- else if (S_GET_STORAGE_CLASS (symbolP) == C_FILE)
- {
- /* If the filename was too long to fit in the
- auxent, put it in the string table. */
- if (SA_GET_FILE_FNAME_ZEROS (symbolP) == 0
- && SA_GET_FILE_FNAME_OFFSET (symbolP) != 0)
- {
- SA_SET_FILE_FNAME_OFFSET (symbolP, string_byte_count);
- string_byte_count += strlen (filename_list_scan->filename) + 1;
- filename_list_scan = filename_list_scan->next;
- }
- if (S_GET_VALUE (symbolP))
- {
- S_SET_VALUE (symbolP, last_file_symno);
- last_file_symno = symbol_number;
- }
- }
-
-#ifdef tc_frob_coff_symbol
- tc_frob_coff_symbol (symbolP);
-#endif
-
- /* We must put the external symbols apart. The loader
- does not bomb if we do not. But the references in
- the endndx field for a .bb symbol are not corrected
- if an external symbol is removed between .bb and .be.
- I.e in the following case :
- [20] .bb endndx = 22
- [21] foo external
- [22] .be
- ld will move the symbol 21 to the end of the list but
- endndx will still be 22 instead of 21. */
-
- if (SF_GET_LOCAL (symbolP))
- {
- /* Remove C_EFCN and LOCAL (L...) symbols. */
- /* Next pointer remains valid. */
- symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
-
- }
- else if (symbolP->sy_value.X_op == O_symbol
- && (! S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP)))
- {
- /* Skip symbols which were equated to undefined or common
- symbols. */
- symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
- }
- else if (!S_IS_DEFINED (symbolP)
- && !S_IS_DEBUG (symbolP)
- && !SF_GET_STATICS (symbolP)
- && (S_GET_STORAGE_CLASS (symbolP) == C_EXT
-#ifdef TE_PE
- || S_GET_STORAGE_CLASS (symbolP) == C_NT_WEAK
-#endif
- || S_GET_STORAGE_CLASS (symbolP) == C_WEAKEXT))
- {
- /* If external, Remove from the list. */
- symbolS *hold = symbol_previous (symbolP);
-
- symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
- symbol_clear_list_pointers (symbolP);
- symbol_append (symbolP, symbol_extern_lastP, &symbol_externP, &symbol_extern_lastP);
- symbolP = hold;
- }
- else if (! S_IS_DEBUG (symbolP)
- && ! SF_GET_STATICS (symbolP)
- && ! SF_GET_FUNCTION (symbolP)
- && (S_GET_STORAGE_CLASS (symbolP) == C_EXT
-#ifdef TE_PE
- || S_GET_STORAGE_CLASS (symbolP) == C_NT_WEAK
-#endif
- || S_GET_STORAGE_CLASS (symbolP) == C_NT_WEAK))
- {
- symbolS *hold = symbol_previous (symbolP);
-
- /* The O'Reilly COFF book says that defined global symbols
- come at the end of the symbol table, just before
- undefined global symbols. */
- symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
- symbol_clear_list_pointers (symbolP);
- symbol_append (symbolP, symbol_global_lastP, &symbol_globalP,
- &symbol_global_lastP);
- symbolP = hold;
- }
- else
- {
- if (SF_GET_STRING (symbolP))
- {
- symbolP->sy_name_offset = string_byte_count;
- string_byte_count += strlen (S_GET_NAME (symbolP)) + 1;
- }
- else
- {
- symbolP->sy_name_offset = 0;
- }
-
- symbolP->sy_number = symbol_number;
- symbol_number += 1 + S_GET_NUMBER_AUXILIARY (symbolP);
- }
- }
-
- return symbol_number;
-}
-
-static unsigned int
-glue_symbols (head, tail)
- symbolS **head;
- symbolS **tail;
-{
- unsigned int symbol_number = 0;
-
- while (*head != NULL)
- {
- symbolS *tmp = *head;
-
- /* Append. */
- symbol_remove (tmp, head, tail);
- symbol_append (tmp, symbol_lastP, &symbol_rootP, &symbol_lastP);
-
- /* Process. */
- if (SF_GET_STRING (tmp))
- {
- tmp->sy_name_offset = string_byte_count;
- string_byte_count += strlen (S_GET_NAME (tmp)) + 1;
- }
- else
- {
- /* Fix "long" names. */
- tmp->sy_name_offset = 0;
- }
-
- tmp->sy_number = symbol_number;
- symbol_number += 1 + S_GET_NUMBER_AUXILIARY (tmp);
- }
-
- return symbol_number;
-}
-
-static unsigned int
-tie_tags ()
-{
- unsigned int symbol_number = 0;
- symbolS *symbolP;
-
- for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
- {
- symbolP->sy_number = symbol_number;
-
- if (SF_GET_TAGGED (symbolP))
- {
- SA_SET_SYM_TAGNDX
- (symbolP,
- ((symbolS *) SA_GET_SYM_TAGNDX (symbolP))->sy_number);
- }
-
- symbol_number += 1 + S_GET_NUMBER_AUXILIARY (symbolP);
- }
-
- return symbol_number;
-}
-
-
-static void
-crawl_symbols (h, abfd)
- object_headers *h;
- bfd *abfd ATTRIBUTE_UNUSED;
-{
- unsigned int i;
-
- /* Initialize the stack used to keep track of the matching .bb .be. */
-
- block_stack = stack_init (512, sizeof (symbolS *));
-
- /* The symbol list should be ordered according to the following sequence
- order :
- . .file symbol
- . debug entries for functions
- . fake symbols for the sections, including .text .data and .bss
- . defined symbols
- . undefined symbols
- But this is not mandatory. The only important point is to put the
- undefined symbols at the end of the list. */
-
- /* Is there a .file symbol ? If not insert one at the beginning. */
- if (symbol_rootP == NULL
- || S_GET_STORAGE_CLASS (symbol_rootP) != C_FILE)
- c_dot_file_symbol ("fake");
-
- /* Build up static symbols for the sections, they are filled in later. */
-
- for (i = SEG_E0; i < SEG_LAST; i++)
- if (segment_info[i].scnhdr.s_name[0])
- segment_info[i].dot = c_section_symbol ((char *) segment_info[i].name,
- i - SEG_E0 + 1);
-
- /* Take all the externals out and put them into another chain. */
- H_SET_SYMBOL_TABLE_SIZE (h, yank_symbols ());
- /* Take the externals and glue them onto the end. */
- H_SET_SYMBOL_TABLE_SIZE (h,
- (H_GET_SYMBOL_COUNT (h)
- + glue_symbols (&symbol_globalP,
- &symbol_global_lastP)
- + glue_symbols (&symbol_externP,
- &symbol_extern_lastP)));
-
- H_SET_SYMBOL_TABLE_SIZE (h, tie_tags ());
- know (symbol_globalP == NULL);
- know (symbol_global_lastP == NULL);
- know (symbol_externP == NULL);
- know (symbol_extern_lastP == NULL);
-}
-
-/* Find strings by crawling along symbol table chain. */
-
-void
-w_strings (where)
- char *where;
-{
- symbolS *symbolP;
- struct filename_list *filename_list_scan = filename_list_head;
-
- /* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK. */
- md_number_to_chars (where, (valueT) string_byte_count, 4);
- where += 4;
-
-#ifdef COFF_LONG_SECTION_NAMES
- /* Support long section names as found in PE. This code must
- coordinate with that in coff_header_append and write_object_file. */
- {
- unsigned int i;
-
- for (i = SEG_E0; i < SEG_LAST; i++)
- {
- if (segment_info[i].scnhdr.s_name[0]
- && strlen (segment_info[i].name) > SCNNMLEN)
- {
- unsigned int size;
-
- size = strlen (segment_info[i].name) + 1;
- memcpy (where, segment_info[i].name, size);
- where += size;
- }
- }
- }
-#endif /* COFF_LONG_SECTION_NAMES */
-
- for (symbolP = symbol_rootP;
- symbolP;
- symbolP = symbol_next (symbolP))
- {
- unsigned int size;
-
- if (SF_GET_STRING (symbolP))
- {
- size = strlen (S_GET_NAME (symbolP)) + 1;
- memcpy (where, S_GET_NAME (symbolP), size);
- where += size;
- }
- if (S_GET_STORAGE_CLASS (symbolP) == C_FILE
- && SA_GET_FILE_FNAME_ZEROS (symbolP) == 0
- && SA_GET_FILE_FNAME_OFFSET (symbolP) != 0)
- {
- size = strlen (filename_list_scan->filename) + 1;
- memcpy (where, filename_list_scan->filename, size);
- filename_list_scan = filename_list_scan ->next;
- where += size;
- }
- }
-}
-
-static void
-do_linenos_for (abfd, h, file_cursor)
- bfd * abfd;
- object_headers * h;
- unsigned long *file_cursor;
-{
- unsigned int idx;
- unsigned long start = *file_cursor;
-
- for (idx = SEG_E0; idx < SEG_LAST; idx++)
- {
- segment_info_type *s = segment_info + idx;
-
- if (s->scnhdr.s_nlnno != 0)
- {
- struct lineno_list *line_ptr;
-
- struct external_lineno *buffer =
- (struct external_lineno *) xmalloc (s->scnhdr.s_nlnno * LINESZ);
-
- struct external_lineno *dst = buffer;
-
- /* Run through the table we've built and turn it into its external
- form, take this chance to remove duplicates. */
-
- for (line_ptr = s->lineno_list_head;
- line_ptr != (struct lineno_list *) NULL;
- line_ptr = line_ptr->next)
- {
- if (line_ptr->line.l_lnno == 0)
- {
- /* Turn a pointer to a symbol into the symbols' index,
- provided that it has been initialised. */
- if (line_ptr->line.l_addr.l_symndx)
- line_ptr->line.l_addr.l_symndx =
- ((symbolS *) line_ptr->line.l_addr.l_symndx)->sy_number;
- }
- else
- line_ptr->line.l_addr.l_paddr += ((struct frag *) (line_ptr->frag))->fr_address;
-
- (void) bfd_coff_swap_lineno_out (abfd, &(line_ptr->line), dst);
- dst++;
- }
-
- s->scnhdr.s_lnnoptr = *file_cursor;
-
- bfd_bwrite (buffer, (bfd_size_type) s->scnhdr.s_nlnno * LINESZ, abfd);
- free (buffer);
-
- *file_cursor += s->scnhdr.s_nlnno * LINESZ;
- }
- }
-
- H_SET_LINENO_SIZE (h, *file_cursor - start);
-}
-
-/* Now we run through the list of frag chains in a segment and
- make all the subsegment frags appear at the end of the
- list, as if the seg 0 was extra long. */
-
-static void
-remove_subsegs ()
-{
- unsigned int i;
-
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- frchainS *head = segment_info[i].frchainP;
- fragS dummy;
- fragS *prev_frag = &dummy;
-
- while (head && head->frch_seg == i)
- {
- prev_frag->fr_next = head->frch_root;
- prev_frag = head->frch_last;
- head = head->frch_next;
- }
- prev_frag->fr_next = 0;
- }
-}
-
-unsigned long machine;
-int coff_flags;
-
-#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) 1
-#endif
-#endif
-
-extern void
-write_object_file ()
-{
- int i;
- const char *name;
- struct frchain *frchain_ptr;
-
- object_headers headers;
- unsigned long file_cursor;
- bfd *abfd;
- unsigned int addr;
- abfd = bfd_openw (out_file_name, TARGET_FORMAT);
-
- 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, machine);
-
- string_byte_count = 4;
-
- /* 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);
- }
-
- remove_subsegs ();
-
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- relax_segment (segment_info[i].frchainP->frch_root, i);
-
- /* Relaxation has completed. Freeze all syms. */
- finalize_syms = 1;
-
- H_SET_NUMBER_OF_SECTIONS (&headers, 0);
-
- /* Find out how big the sections are, and set the addresses. */
- addr = 0;
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- long size;
-
- segment_info[i].scnhdr.s_paddr = addr;
- segment_info[i].scnhdr.s_vaddr = addr;
-
- if (segment_info[i].scnhdr.s_name[0])
- {
- H_SET_NUMBER_OF_SECTIONS (&headers,
- H_GET_NUMBER_OF_SECTIONS (&headers) + 1);
-
-#ifdef COFF_LONG_SECTION_NAMES
- /* Support long section names as found in PE. This code
- must coordinate with that in coff_header_append and
- w_strings. */
- {
- unsigned int len;
-
- len = strlen (segment_info[i].name);
- if (len > SCNNMLEN)
- string_byte_count += len + 1;
- }
-#endif /* COFF_LONG_SECTION_NAMES */
- }
-
- size = size_section (abfd, (unsigned int) i);
- addr += size;
-
- /* I think the section alignment is only used on the i960; the
- i960 needs it, and it should do no harm on other targets. */
-#ifdef ALIGNMENT_IN_S_FLAGS
- segment_info[i].scnhdr.s_flags |= (section_alignment[i] & 0xF) << 8;
-#else
- segment_info[i].scnhdr.s_align = 1 << section_alignment[i];
-#endif
-
- if (i == SEG_E0)
- H_SET_TEXT_SIZE (&headers, size);
- else if (i == SEG_E1)
- H_SET_DATA_SIZE (&headers, size);
- else if (i == SEG_E2)
- H_SET_BSS_SIZE (&headers, size);
- }
-
- /* Turn the gas native symbol table shape into a coff symbol table. */
- crawl_symbols (&headers, abfd);
-
- if (string_byte_count == 4)
- string_byte_count = 0;
-
- H_SET_STRING_SIZE (&headers, string_byte_count);
-
-#ifdef tc_frob_file
- tc_frob_file ();
-#endif
-
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- fixup_mdeps (segment_info[i].frchainP->frch_root, &headers, i);
- fixup_segment (&segment_info[i], i);
- }
-
- /* Look for ".stab" segments and fill in their initial symbols
- correctly. */
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- name = segment_info[i].name;
-
- if (name != NULL
- && strncmp (".stab", name, 5) == 0
- && strncmp (".stabstr", name, 8) != 0)
- adjust_stab_section (abfd, i);
- }
-
- file_cursor = H_GET_TEXT_FILE_OFFSET (&headers);
-
- bfd_seek (abfd, (file_ptr) file_cursor, 0);
-
- /* Plant the data. */
- fill_section (abfd, &headers, &file_cursor);
-
- do_relocs_for (abfd, &headers, &file_cursor);
-
- do_linenos_for (abfd, &headers, &file_cursor);
-
- H_SET_FILE_MAGIC_NUMBER (&headers, COFF_MAGIC);
-#ifndef OBJ_COFF_OMIT_TIMESTAMP
- H_SET_TIME_STAMP (&headers, (long)time((time_t *)0));
-#else
- H_SET_TIME_STAMP (&headers, 0);
-#endif
-#ifdef TC_COFF_SET_MACHINE
- TC_COFF_SET_MACHINE (&headers);
-#endif
-
-#ifndef COFF_FLAGS
-#define COFF_FLAGS 0
-#endif
-
-#ifdef KEEP_RELOC_INFO
- H_SET_FLAGS (&headers, ((H_GET_LINENO_SIZE(&headers) ? 0 : F_LNNO) |
- COFF_FLAGS | coff_flags));
-#else
- H_SET_FLAGS (&headers, ((H_GET_LINENO_SIZE(&headers) ? 0 : F_LNNO) |
- (H_GET_RELOCATION_SIZE(&headers) ? 0 : F_RELFLG) |
- COFF_FLAGS | coff_flags));
-#endif
-
- {
- unsigned int symtable_size = H_GET_SYMBOL_TABLE_SIZE (&headers);
- char *buffer1 = xmalloc (symtable_size + string_byte_count + 1);
-
- H_SET_SYMBOL_TABLE_POINTER (&headers, bfd_tell (abfd));
- w_symbols (abfd, buffer1, symbol_rootP);
- if (string_byte_count > 0)
- w_strings (buffer1 + symtable_size);
- bfd_bwrite (buffer1, (bfd_size_type) symtable_size + string_byte_count,
- abfd);
- free (buffer1);
- }
-
- coff_header_append (abfd, &headers);
-#if 0
- /* Recent changes to write need this, but where it should
- go is up to Ken.. */
- if (!bfd_close_all_done (abfd))
- as_fatal (_("Can't close %s: %s"), out_file_name,
- bfd_errmsg (bfd_get_error ()));
-#else
- {
- extern bfd *stdoutput;
- stdoutput = abfd;
- }
-#endif
-
-}
-
-/* Add a new segment. This is called from subseg_new via the
- obj_new_segment macro. */
-
-segT
-obj_coff_add_segment (name)
- const char *name;
-{
- unsigned int i;
-
-#ifndef COFF_LONG_SECTION_NAMES
- char buf[SCNNMLEN + 1];
-
- strncpy (buf, name, SCNNMLEN);
- buf[SCNNMLEN] = '\0';
- name = buf;
-#endif
-
- for (i = SEG_E0; i < SEG_LAST && segment_info[i].scnhdr.s_name[0]; i++)
- if (strcmp (name, segment_info[i].name) == 0)
- return (segT) i;
-
- if (i == SEG_LAST)
- {
- as_bad (_("Too many new sections; can't add \"%s\""), name);
- return now_seg;
- }
-
- /* Add a new section. */
- strncpy (segment_info[i].scnhdr.s_name, name,
- sizeof (segment_info[i].scnhdr.s_name));
- segment_info[i].scnhdr.s_flags = STYP_REG;
- segment_info[i].name = xstrdup (name);
-
- return (segT) i;
-}
-
-/* Implement the .section pseudo op:
- .section name {, "flags"}
- ^ ^
- | +--- optional flags: 'b' for bss
- | 'i' for info
- +-- section name 'l' for lib
- 'n' for noload
- 'o' for over
- 'w' for data
- 'd' (apparently m88k for data)
- 'x' for text
- 'r' for read-only data
- But if the argument is not a quoted string, treat it as a
- subsegment number. */
-
-void
-obj_coff_section (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- /* Strip out the section name. */
- char *section_name, *name;
- char c;
- unsigned int exp;
- long flags;
-
- if (flag_mri)
- {
- char type;
-
- s_mri_sect (&type);
- flags = 0;
- if (type == 'C')
- flags = STYP_TEXT;
- else if (type == 'D')
- flags = STYP_DATA;
- segment_info[now_seg].scnhdr.s_flags |= flags;
-
- return;
- }
-
- section_name = input_line_pointer;
- c = get_symbol_end ();
-
- name = xmalloc (input_line_pointer - section_name + 1);
- strcpy (name, section_name);
-
- *input_line_pointer = c;
-
- exp = 0;
- flags = 0;
-
- SKIP_WHITESPACE ();
- if (*input_line_pointer == ',')
- {
- ++input_line_pointer;
- SKIP_WHITESPACE ();
-
- if (*input_line_pointer != '"')
- exp = get_absolute_expression ();
- else
- {
- ++input_line_pointer;
- while (*input_line_pointer != '"'
- && ! is_end_of_line[(unsigned char) *input_line_pointer])
- {
- switch (*input_line_pointer)
- {
- case 'b': flags |= STYP_BSS; break;
- case 'i': flags |= STYP_INFO; break;
- case 'l': flags |= STYP_LIB; break;
- case 'n': flags |= STYP_NOLOAD; break;
- case 'o': flags |= STYP_OVER; break;
- case 'd':
- case 'w': flags |= STYP_DATA; break;
- case 'x': flags |= STYP_TEXT; break;
- case 'r': flags |= STYP_LIT; break;
- default:
- as_warn(_("unknown section attribute '%c'"),
- *input_line_pointer);
- break;
- }
- ++input_line_pointer;
- }
- if (*input_line_pointer == '"')
- ++input_line_pointer;
- }
- }
-
- subseg_new (name, (subsegT) exp);
-
- segment_info[now_seg].scnhdr.s_flags |= flags;
-
- demand_empty_rest_of_line ();
-}
-
-static void
-obj_coff_text (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- subseg_new (".text", get_absolute_expression ());
-}
-
-static void
-obj_coff_data (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- if (flag_readonly_data_in_text)
- subseg_new (".text", get_absolute_expression () + 1000);
- else
- subseg_new (".data", get_absolute_expression ());
-}
-
-static void
-obj_coff_ident (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- segT current_seg = now_seg; /* Save current seg. */
- subsegT current_subseg = now_subseg;
-
- subseg_new (".comment", 0); /* .comment seg. */
- stringer (1); /* Read string. */
- subseg_set (current_seg, current_subseg); /* Restore current seg. */
-}
-
-void
-c_symbol_merge (debug, normal)
- symbolS *debug;
- symbolS *normal;
-{
- S_SET_DATA_TYPE (normal, S_GET_DATA_TYPE (debug));
- S_SET_STORAGE_CLASS (normal, S_GET_STORAGE_CLASS (debug));
-
- if (S_GET_NUMBER_AUXILIARY (debug) > S_GET_NUMBER_AUXILIARY (normal))
- S_SET_NUMBER_AUXILIARY (normal, S_GET_NUMBER_AUXILIARY (debug));
-
- if (S_GET_NUMBER_AUXILIARY (debug) > 0)
- memcpy ((char *) &normal->sy_symbol.ost_auxent[0],
- (char *) &debug->sy_symbol.ost_auxent[0],
- (unsigned int) (S_GET_NUMBER_AUXILIARY (debug) * AUXESZ));
-
- /* Move the debug flags. */
- SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug));
-}
-
-static int
-c_line_new (symbol, paddr, line_number, frag)
- symbolS * symbol;
- long paddr;
- int line_number;
- fragS * frag;
-{
- struct lineno_list *new_line =
- (struct lineno_list *) xmalloc (sizeof (struct lineno_list));
-
- segment_info_type *s = segment_info + now_seg;
- new_line->line.l_lnno = line_number;
-
- if (line_number == 0)
- {
- last_line_symbol = symbol;
- new_line->line.l_addr.l_symndx = (long) symbol;
- }
- else
- {
- new_line->line.l_addr.l_paddr = paddr;
- }
-
- new_line->frag = (char *) frag;
- new_line->next = (struct lineno_list *) NULL;
-
- if (s->lineno_list_head == (struct lineno_list *) NULL)
- s->lineno_list_head = new_line;
- else
- s->lineno_list_tail->next = new_line;
-
- s->lineno_list_tail = new_line;
- return LINESZ * s->scnhdr.s_nlnno++;
-}
-
-void
-c_dot_file_symbol (filename)
- char *filename;
-{
- symbolS *symbolP;
-
- symbolP = symbol_new (".file",
- SEG_DEBUG,
- 0,
- &zero_address_frag);
-
- S_SET_STORAGE_CLASS (symbolP, C_FILE);
- S_SET_NUMBER_AUXILIARY (symbolP, 1);
-
- if (strlen (filename) > FILNMLEN)
- {
- /* Filename is too long to fit into an auxent,
- we stick it into the string table instead. We keep
- a linked list of the filenames we find so we can emit
- them later. */
- struct filename_list *f = ((struct filename_list *)
- xmalloc (sizeof (struct filename_list)));
-
- f->filename = filename;
- f->next = 0;
-
- SA_SET_FILE_FNAME_ZEROS (symbolP, 0);
- SA_SET_FILE_FNAME_OFFSET (symbolP, 1);
-
- if (filename_list_tail)
- filename_list_tail->next = f;
- else
- filename_list_head = f;
- filename_list_tail = f;
- }
- else
- {
- SA_SET_FILE_FNAME (symbolP, filename);
- }
-#ifndef NO_LISTING
- {
- extern int listing;
- if (listing)
- listing_source_file (filename);
- }
-#endif
- SF_SET_DEBUG (symbolP);
- S_SET_VALUE (symbolP, (valueT) previous_file_symbol);
-
- previous_file_symbol = symbolP;
-
- /* Make sure that the symbol is first on the symbol chain. */
- if (symbol_rootP != symbolP)
- {
- symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
- symbol_insert (symbolP, symbol_rootP, &symbol_rootP, &symbol_lastP);
- }
-}
-
-/* Build a 'section static' symbol. */
-
-symbolS *
-c_section_symbol (name, idx)
- char *name;
- int idx;
-{
- symbolS *symbolP;
-
- symbolP = symbol_find_base (name, DO_NOT_STRIP);
- if (symbolP == NULL)
- symbolP = symbol_new (name, idx, 0, &zero_address_frag);
- else
- {
- /* Mmmm. I just love violating interfaces. Makes me feel...dirty. */
- S_SET_SEGMENT (symbolP, idx);
- symbolP->sy_frag = &zero_address_frag;
- }
-
- S_SET_STORAGE_CLASS (symbolP, C_STAT);
- S_SET_NUMBER_AUXILIARY (symbolP, 1);
-
- SF_SET_STATICS (symbolP);
-
-#ifdef TE_DELTA
- /* manfred@s-direktnet.de: section symbols *must* have the LOCAL bit cleared,
- which is set by the new definition of LOCAL_LABEL in tc-m68k.h. */
- SF_CLEAR_LOCAL (symbolP);
-#endif
-#ifdef TE_PE
- /* If the .linkonce pseudo-op was used for this section, we must
- store the information in the auxiliary entry for the section
- symbol. */
- if (segment_info[idx].linkonce != LINKONCE_UNSET)
- {
- int type;
-
- switch (segment_info[idx].linkonce)
- {
- default:
- abort ();
- case LINKONCE_DISCARD:
- type = IMAGE_COMDAT_SELECT_ANY;
- break;
- case LINKONCE_ONE_ONLY:
- type = IMAGE_COMDAT_SELECT_NODUPLICATES;
- break;
- case LINKONCE_SAME_SIZE:
- type = IMAGE_COMDAT_SELECT_SAME_SIZE;
- break;
- case LINKONCE_SAME_CONTENTS:
- type = IMAGE_COMDAT_SELECT_EXACT_MATCH;
- break;
- }
-
- SYM_AUXENT (symbolP)->x_scn.x_comdat = type;
- }
-#endif /* TE_PE */
-
- return symbolP;
-}
-
-static void
-w_symbols (abfd, where, symbol_rootP)
- bfd * abfd;
- char *where;
- symbolS * symbol_rootP;
-{
- symbolS *symbolP;
- unsigned int i;
-
- /* First fill in those values we have only just worked out. */
- for (i = SEG_E0; i < SEG_LAST; i++)
- {
- symbolP = segment_info[i].dot;
- if (symbolP)
- {
- SA_SET_SCN_SCNLEN (symbolP, segment_info[i].scnhdr.s_size);
- SA_SET_SCN_NRELOC (symbolP, segment_info[i].scnhdr.s_nreloc);
- SA_SET_SCN_NLINNO (symbolP, segment_info[i].scnhdr.s_nlnno);
- }
- }
-
- /* Emit all symbols left in the symbol chain. */
- for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
- {
- /* Used to save the offset of the name. It is used to point
- to the string in memory but must be a file offset. */
- char *temp;
-
- /* We can't fix the lnnoptr field in yank_symbols with the other
- adjustments, because we have to wait until we know where they
- go in the file. */
- if (SF_GET_ADJ_LNNOPTR (symbolP))
- SA_GET_SYM_LNNOPTR (symbolP) +=
- segment_info[S_GET_SEGMENT (symbolP)].scnhdr.s_lnnoptr;
-
- tc_coff_symbol_emit_hook (symbolP);
-
- temp = S_GET_NAME (symbolP);
- if (SF_GET_STRING (symbolP))
- {
- S_SET_OFFSET (symbolP, symbolP->sy_name_offset);
- S_SET_ZEROES (symbolP, 0);
- }
- else
- {
- memset (symbolP->sy_symbol.ost_entry.n_name, 0, SYMNMLEN);
- strncpy (symbolP->sy_symbol.ost_entry.n_name, temp, SYMNMLEN);
- }
- where = symbol_to_chars (abfd, where, symbolP);
- S_SET_NAME (symbolP, temp);
- }
-}
-
-static void
-obj_coff_lcomm (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- s_lcomm(0);
- return;
-#if 0
- char *name;
- char c;
- int temp;
- char *p;
-
- symbolS *symbolP;
-
- name = input_line_pointer;
-
- c = get_symbol_end ();
- p = input_line_pointer;
- *p = c;
- SKIP_WHITESPACE ();
- if (*input_line_pointer != ',')
- {
- as_bad (_("Expected comma after name"));
- ignore_rest_of_line ();
- return;
- }
- if (*input_line_pointer == '\n')
- {
- as_bad (_("Missing size expression"));
- return;
- }
- input_line_pointer++;
- if ((temp = get_absolute_expression ()) < 0)
- {
- as_warn (_("lcomm length (%d.) <0! Ignored."), temp);
- ignore_rest_of_line ();
- return;
- }
- *p = 0;
-
- symbolP = symbol_find_or_make (name);
-
- if (S_GET_SEGMENT (symbolP) == SEG_UNKNOWN &&
- S_GET_VALUE (symbolP) == 0)
- {
- if (! need_pass_2)
- {
- char *p;
- segT current_seg = now_seg; /* Save current seg. */
- subsegT current_subseg = now_subseg;
-
- subseg_set (SEG_E2, 1);
- symbolP->sy_frag = frag_now;
- p = frag_var(rs_org, 1, 1, (relax_substateT)0, symbolP,
- (offsetT) temp, (char *) 0);
- *p = 0;
- subseg_set (current_seg, current_subseg); /* Restore current seg. */
- S_SET_SEGMENT (symbolP, SEG_E2);
- S_SET_STORAGE_CLASS (symbolP, C_STAT);
- }
- }
- else
- as_bad (_("Symbol %s already defined"), name);
-
- demand_empty_rest_of_line ();
-#endif
-}
-
-static void
-fixup_mdeps (frags, h, this_segment)
- fragS *frags;
- object_headers *h ATTRIBUTE_UNUSED;
- segT this_segment;
-{
- subseg_change (this_segment, 0);
-
- while (frags)
- {
- switch (frags->fr_type)
- {
- case rs_align:
- case rs_align_code:
- case rs_align_test:
- case rs_org:
-#ifdef HANDLE_ALIGN
- HANDLE_ALIGN (frags);
-#endif
- frags->fr_type = rs_fill;
- frags->fr_offset =
- ((frags->fr_next->fr_address - frags->fr_address - frags->fr_fix)
- / frags->fr_var);
- break;
- case rs_machine_dependent:
- md_convert_frag (h, this_segment, frags);
- frag_wane (frags);
- break;
- default:
- ;
- }
- frags = frags->fr_next;
- }
-}
-
-#if 1
-
-#ifndef TC_FORCE_RELOCATION
-#define TC_FORCE_RELOCATION(fix) 0
-#endif
-
-static void
-fixup_segment (segP, this_segment_type)
- segment_info_type * segP;
- segT this_segment_type;
-{
- fixS * fixP;
- symbolS *add_symbolP;
- symbolS *sub_symbolP;
- long add_number;
- int size;
- char *place;
- long where;
- char pcrel;
- fragS *fragP;
- segT add_symbol_segment = absolute_section;
-
- for (fixP = segP->fix_root; fixP; fixP = fixP->fx_next)
- {
- fragP = fixP->fx_frag;
- know (fragP);
- where = fixP->fx_where;
- place = fragP->fr_literal + where;
- size = fixP->fx_size;
- add_symbolP = fixP->fx_addsy;
- sub_symbolP = fixP->fx_subsy;
- add_number = fixP->fx_offset;
- pcrel = fixP->fx_pcrel;
-
- /* We want function-relative stabs to work on systems which
- may use a relaxing linker; thus we must handle the sym1-sym2
- fixups function-relative stabs generates.
-
- Of course, if you actually enable relaxing in the linker, the
- line and block scoping information is going to be incorrect
- in some cases. The only way to really fix this is to support
- a reloc involving the difference of two symbols. */
- if (linkrelax
- && (!sub_symbolP || pcrel))
- continue;
-
-#ifdef TC_I960
- if (fixP->fx_tcbit && SF_GET_CALLNAME (add_symbolP))
- {
- /* Relocation should be done via the associated 'bal' entry
- point symbol. */
-
- if (!SF_GET_BALNAME (tc_get_bal_of_call (add_symbolP)))
- {
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("No 'bal' entry point for leafproc %s"),
- S_GET_NAME (add_symbolP));
- continue;
- }
- fixP->fx_addsy = add_symbolP = tc_get_bal_of_call (add_symbolP);
- }
-#endif
-
- /* Make sure the symbols have been resolved; this may not have
- happened if these are expression symbols. */
- if (add_symbolP != NULL && ! add_symbolP->sy_resolved)
- resolve_symbol_value (add_symbolP);
-
- if (add_symbolP != NULL)
- {
- /* If this fixup is against a symbol which has been equated
- to another symbol, convert it to the other symbol. */
- if (add_symbolP->sy_value.X_op == O_symbol
- && (! S_IS_DEFINED (add_symbolP)
- || S_IS_COMMON (add_symbolP)))
- {
- while (add_symbolP->sy_value.X_op == O_symbol
- && (! S_IS_DEFINED (add_symbolP)
- || S_IS_COMMON (add_symbolP)))
- {
- symbolS *n;
-
- /* We must avoid looping, as that can occur with a
- badly written program. */
- n = add_symbolP->sy_value.X_add_symbol;
- if (n == add_symbolP)
- break;
- add_number += add_symbolP->sy_value.X_add_number;
- add_symbolP = n;
- }
- fixP->fx_addsy = add_symbolP;
- fixP->fx_offset = add_number;
- }
- }
-
- if (sub_symbolP != NULL && ! sub_symbolP->sy_resolved)
- resolve_symbol_value (sub_symbolP);
-
- if (add_symbolP != NULL
- && add_symbolP->sy_mri_common)
- {
- know (add_symbolP->sy_value.X_op == O_symbol);
- add_number += S_GET_VALUE (add_symbolP);
- fixP->fx_offset = add_number;
- add_symbolP = fixP->fx_addsy = add_symbolP->sy_value.X_add_symbol;
- }
-
- if (add_symbolP)
- add_symbol_segment = S_GET_SEGMENT (add_symbolP);
-
- if (sub_symbolP)
- {
- if (add_symbolP == NULL || add_symbol_segment == absolute_section)
- {
- if (add_symbolP != NULL)
- {
- add_number += S_GET_VALUE (add_symbolP);
- add_symbolP = NULL;
- fixP->fx_addsy = NULL;
- }
-
- /* It's just -sym. */
- if (S_GET_SEGMENT (sub_symbolP) == absolute_section)
- {
- add_number -= S_GET_VALUE (sub_symbolP);
- fixP->fx_subsy = 0;
- fixP->fx_done = 1;
- }
- else
- {
-#ifndef TC_M68K
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Negative of non-absolute symbol %s"),
- S_GET_NAME (sub_symbolP));
-#endif
- add_number -= S_GET_VALUE (sub_symbolP);
- } /* not absolute */
-
- /* if sub_symbol is in the same segment that add_symbol
- and add_symbol is either in DATA, TEXT, BSS or ABSOLUTE. */
- }
- else if (S_GET_SEGMENT (sub_symbolP) == add_symbol_segment
- && SEG_NORMAL (add_symbol_segment))
- {
- /* Difference of 2 symbols from same segment. Can't
- make difference of 2 undefineds: 'value' means
- something different for N_UNDF. */
-#ifdef TC_I960
- /* Makes no sense to use the difference of 2 arbitrary symbols
- as the target of a call instruction. */
- if (fixP->fx_tcbit)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("callj to difference of 2 symbols"));
-#endif /* TC_I960 */
- add_number += S_GET_VALUE (add_symbolP) -
- S_GET_VALUE (sub_symbolP);
- add_symbolP = NULL;
-
- if (!TC_FORCE_RELOCATION (fixP))
- {
- fixP->fx_addsy = NULL;
- fixP->fx_subsy = NULL;
- fixP->fx_done = 1;
-#ifdef TC_M68K /* is this right? */
- pcrel = 0;
- fixP->fx_pcrel = 0;
-#endif
- }
- }
- else
- {
- /* Different segments in subtraction. */
- know (!(S_IS_EXTERNAL (sub_symbolP) && (S_GET_SEGMENT (sub_symbolP) == absolute_section)));
-
- if ((S_GET_SEGMENT (sub_symbolP) == absolute_section))
- add_number -= S_GET_VALUE (sub_symbolP);
-
-#ifdef DIFF_EXPR_OK
- else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type
-#if 0 /* Okay for 68k, at least... */
- && !pcrel
-#endif
- )
- {
- /* Make it pc-relative. */
- add_number += (md_pcrel_from (fixP)
- - S_GET_VALUE (sub_symbolP));
- pcrel = 1;
- fixP->fx_pcrel = 1;
- sub_symbolP = 0;
- fixP->fx_subsy = 0;
- }
-#endif
- else
- {
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld."),
- segment_name (S_GET_SEGMENT (sub_symbolP)),
- S_GET_NAME (sub_symbolP),
- (long) (fragP->fr_address + where));
- }
- }
- }
-
- if (add_symbolP)
- {
- if (add_symbol_segment == this_segment_type && pcrel)
- {
- /* 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. */
-#ifdef TC_I960
- /* reloc_callj() may replace a 'call' with a 'calls' or a 'bal',
- in which cases it modifies *fixP as appropriate. In the case
- of a 'calls', no further work is required, and *fixP has been
- set up to make the rest of the code below a no-op. */
- reloc_callj (fixP);
-#endif /* TC_I960 */
-
- add_number += S_GET_VALUE (add_symbolP);
- add_number -= md_pcrel_from (fixP);
-
- /* We used to do
- add_number -= segP->scnhdr.s_vaddr;
- if defined (TC_I386) || defined (TE_LYNX). I now
- think that was an error propagated from the case when
- we are going to emit the relocation. If we are not
- going to emit the relocation, then we just want to
- set add_number to the difference between the symbols.
- This is a case that would only arise when there is a
- PC relative reference from a section other than .text
- to a symbol defined in the same section, and the
- reference is not relaxed. Since jump instructions on
- the i386 are relaxed, this could only arise with a
- call instruction. */
-
- pcrel = 0; /* Lie. Don't want further pcrel processing. */
- if (!TC_FORCE_RELOCATION (fixP))
- {
- fixP->fx_addsy = NULL;
- fixP->fx_done = 1;
- }
- }
- else
- {
- switch (add_symbol_segment)
- {
- case absolute_section:
-#ifdef TC_I960
- /* See comment about reloc_callj() above. */
- reloc_callj (fixP);
-#endif /* TC_I960 */
- add_number += S_GET_VALUE (add_symbolP);
- add_symbolP = NULL;
-
- if (!TC_FORCE_RELOCATION (fixP))
- {
- fixP->fx_addsy = NULL;
- fixP->fx_done = 1;
- }
- break;
- default:
-
-#if defined(TC_A29K) || (defined(TE_PE) && defined(TC_I386)) || defined(TC_M88K) || defined(TC_OR32)
- /* This really should be handled in the linker, but
- backward compatibility forbids. */
- add_number += S_GET_VALUE (add_symbolP);
-#else
- add_number += S_GET_VALUE (add_symbolP) +
- segment_info[S_GET_SEGMENT (add_symbolP)].scnhdr.s_paddr;
-#endif
- break;
-
- case SEG_UNKNOWN:
-#ifdef TC_I960
- if ((int) fixP->fx_bit_fixP == 13)
- {
- /* This is a COBR instruction. They have only a
- 13-bit displacement and are only to be used
- for local branches: flag as error, don't generate
- relocation. */
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("can't use COBR format with external label"));
- fixP->fx_addsy = NULL;
- fixP->fx_done = 1;
- continue;
- }
-#endif /* TC_I960 */
-#if ((defined (TC_I386) || defined (TE_LYNX) || defined (TE_AUX)) && !defined(TE_PE)) || defined (COFF_COMMON_ADDEND)
- /* 386 COFF uses a peculiar format in which the
- value of a common symbol is stored in the .text
- segment (I've checked this on SVR3.2 and SCO
- 3.2.2) Ian Taylor <ian@cygnus.com>. */
- /* This is also true for 68k COFF on sysv machines
- (Checked on Motorola sysv68 R3V6 and R3V7.1, and also on
- UNIX System V/M68000, Release 1.0 from ATT/Bell Labs)
- Philippe De Muyter <phdm@info.ucl.ac.be>. */
- if (S_IS_COMMON (add_symbolP))
- add_number += S_GET_VALUE (add_symbolP);
-#endif
- break;
-
- }
- }
- }
-
- if (pcrel)
- {
-#if !defined(TC_M88K) && !(defined(TE_PE) && defined(TC_I386)) && !defined(TC_A29K) && !defined(TC_OR32)
- /* This adjustment is not correct on the m88k, for which the
- linker does all the computation. */
- add_number -= md_pcrel_from (fixP);
-#endif
- if (add_symbolP == 0)
- fixP->fx_addsy = &abs_symbol;
-#if defined (TC_I386) || defined (TE_LYNX) || defined (TC_I960) || defined (TC_M68K)
- /* On the 386 we must adjust by the segment vaddr as well.
- Ian Taylor.
-
- I changed the i960 to work this way as well. This is
- compatible with the current GNU linker behaviour. I do
- not know what other i960 COFF assemblers do. This is not
- a common case: normally, only assembler code will contain
- a PC relative reloc, and only branches which do not
- originate in the .text section will have a non-zero
- address.
-
- I changed the m68k to work this way as well. This will
- break existing PC relative relocs from sections which do
- not start at address 0, but it will make ld -r work.
- Ian Taylor, 4 Oct 96. */
-
- add_number -= segP->scnhdr.s_vaddr;
-#endif
- }
-
- md_apply_fix3 (fixP, (valueT *) & add_number, this_segment_type);
-
- if (!fixP->fx_bit_fixP && ! fixP->fx_no_overflow)
- {
-#ifndef TC_M88K
- /* The m88k uses the offset field of the reloc to get around
- this problem. */
- if ((size == 1
- && ((add_number & ~0xFF)
- || (fixP->fx_signed && (add_number & 0x80)))
- && ((add_number & ~0xFF) != (-1 & ~0xFF)
- || (add_number & 0x80) == 0))
- || (size == 2
- && ((add_number & ~0xFFFF)
- || (fixP->fx_signed && (add_number & 0x8000)))
- && ((add_number & ~0xFFFF) != (-1 & ~0xFFFF)
- || (add_number & 0x8000) == 0)))
- {
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Value of %ld too large for field of %d bytes at 0x%lx"),
- (long) add_number, size,
- (unsigned long) (fragP->fr_address + where));
- }
-#endif
-#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
- && 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,
- (unsigned long) (fragP->fr_address + where));
-#endif
- }
- }
-}
-
-#endif
-
-/* The first entry in a .stab section is special. */
-
-void
-obj_coff_init_stab_section (seg)
- segT seg;
-{
- char *file;
- char *p;
- char *stabstr_name;
- unsigned int stroff;
-
- /* Make space for this first symbol. */
- p = frag_more (12);
- /* Zero it out. */
- memset (p, 0, 12);
- as_where (&file, (unsigned int *) NULL);
- stabstr_name = (char *) alloca (strlen (segment_info[seg].name) + 4);
- strcpy (stabstr_name, segment_info[seg].name);
- strcat (stabstr_name, "str");
- stroff = get_stab_string_offset (file, stabstr_name);
- know (stroff == 1);
- md_number_to_chars (p, stroff, 4);
-}
-
-/* Fill in the counts in the first entry in a .stab section. */
-
-static void
-adjust_stab_section(abfd, seg)
- bfd *abfd;
- segT seg;
-{
- segT stabstrseg = SEG_UNKNOWN;
- const char *secname, *name2;
- char *name;
- char *p = NULL;
- int i, strsz = 0, nsyms;
- fragS *frag = segment_info[seg].frchainP->frch_root;
-
- /* Look for the associated string table section. */
-
- secname = segment_info[seg].name;
- name = (char *) alloca (strlen (secname) + 4);
- strcpy (name, secname);
- strcat (name, "str");
-
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- name2 = segment_info[i].name;
- if (name2 != NULL && strncmp(name2, name, 8) == 0)
- {
- stabstrseg = i;
- break;
- }
- }
-
- /* If we found the section, get its size. */
- if (stabstrseg != SEG_UNKNOWN)
- strsz = size_section (abfd, stabstrseg);
-
- nsyms = size_section (abfd, seg) / 12 - 1;
-
- /* Look for the first frag of sufficient size for the initial stab
- symbol, and collect a pointer to it. */
- while (frag && frag->fr_fix < 12)
- frag = frag->fr_next;
- assert (frag != 0);
- p = frag->fr_literal;
- assert (p != 0);
-
- /* Write in the number of stab symbols and the size of the string
- table. */
- bfd_h_put_16 (abfd, (bfd_vma) nsyms, (bfd_byte *) p + 6);
- bfd_h_put_32 (abfd, (bfd_vma) strsz, (bfd_byte *) p + 8);
-}
-
-#endif /* not BFD_ASSEMBLER */
-
const pseudo_typeS coff_pseudo_table[] =
{
+ {"ABORT", s_abort, 0},
+ {"appline", obj_coff_ln, 1},
+ /* We accept the .bss directive for backward compatibility with
+ earlier versions of gas. */
+ {"bss", obj_coff_bss, 0},
{"def", obj_coff_def, 0},
{"dim", obj_coff_dim, 0},
{"endef", obj_coff_endef, 0},
+ {"ident", obj_coff_ident, 0},
{"line", obj_coff_line, 0},
{"ln", obj_coff_ln, 0},
-#ifdef BFD_ASSEMBLER
- {"loc", obj_coff_loc, 0},
-#endif
- {"appline", obj_coff_ln, 1},
{"scl", obj_coff_scl, 0},
+ {"sect", obj_coff_section, 0},
+ {"sect.s", obj_coff_section, 0},
+ {"section", obj_coff_section, 0},
+ {"section.s", obj_coff_section, 0},
+ /* FIXME: We ignore the MRI short attribute. */
{"size", obj_coff_size, 0},
{"tag", obj_coff_tag, 0},
{"type", obj_coff_type, 0},
{"val", obj_coff_val, 0},
- {"section", obj_coff_section, 0},
- {"sect", obj_coff_section, 0},
- /* FIXME: We ignore the MRI short attribute. */
- {"section.s", obj_coff_section, 0},
- {"sect.s", obj_coff_section, 0},
- /* We accept the .bss directive for backward compatibility with
- earlier versions of gas. */
- {"bss", obj_coff_bss, 0},
- {"weak", obj_coff_weak, 0},
- {"ident", obj_coff_ident, 0},
-#ifndef BFD_ASSEMBLER
- {"use", obj_coff_section, 0},
- {"text", obj_coff_text, 0},
- {"data", obj_coff_data, 0},
- {"lcomm", obj_coff_lcomm, 0},
-#else
- {"optim", s_ignore, 0}, /* For sun386i cc (?) */
-#endif
{"version", s_ignore, 0},
- {"ABORT", s_abort, 0},
-#if defined( TC_M88K ) || defined ( TC_TIC4X )
- /* The m88k and tic4x uses sdef instead of def. */
+ {"loc", obj_coff_loc, 0},
+ {"optim", s_ignore, 0}, /* For sun386i cc (?) */
+ {"weak", obj_coff_weak, 0},
+#if defined TC_TIC4X
+ /* The tic4x uses sdef instead of def. */
{"sdef", obj_coff_def, 0},
#endif
- {NULL, NULL, 0} /* end sentinel */
-}; /* coff_pseudo_table */
+ {NULL, NULL, 0}
+};
-#ifdef BFD_ASSEMBLER
/* Support for a COFF emulation. */
-static void coff_pop_insert PARAMS ((void));
-static int coff_separate_stab_sections PARAMS ((void));
-
static void
-coff_pop_insert ()
+coff_pop_insert (void)
{
pop_insert (coff_pseudo_table);
}
static int
-coff_separate_stab_sections ()
+coff_separate_stab_sections (void)
{
return 1;
}
@@ -4686,5 +1854,3 @@ const struct format_ops coff_format_ops =
coff_obj_read_begin_hook,
coff_obj_symbol_new_hook
};
-
-#endif
diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h
index 520055268c28..6fcbc9f06cbb 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, 2002, 2003
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS.
@@ -17,24 +17,14 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef OBJ_FORMAT_H
#define OBJ_FORMAT_H
#define OBJ_COFF 1
-#ifndef BFD_ASSEMBLER
-
-#define WORKING_DOT_WORD
-#define WARN_SIGNED_OVERFLOW_WORD
-#define OBJ_COFF_OMIT_OPTIONAL_HEADER
-#define BFD_HEADERS
-#define BFD
-
-#endif
-
#include "targ-cpu.h"
#include "bfd.h"
@@ -85,11 +75,6 @@
#endif
#endif
-#ifdef TC_A29K
-#include "coff/a29k.h"
-#define TARGET_FORMAT "coff-a29k-big"
-#endif
-
#ifdef TC_OR32
#include "coff/or32.h"
#define TARGET_FORMAT "coff-or32-big"
@@ -100,6 +85,11 @@
#define TARGET_FORMAT "coff-Intel-little"
#endif
+#ifdef TC_Z80
+#include "coff/z80.h"
+#define TARGET_FORMAT "coff-z80"
+#endif
+
#ifdef TC_Z8K
#include "coff/z8k.h"
#define TARGET_FORMAT "coff-z8k"
@@ -115,6 +105,11 @@
#define TARGET_FORMAT "coff-h8500"
#endif
+#ifdef TC_MAXQ20
+#include "coff/maxq.h"
+#define TARGET_FORMAT "coff-maxq"
+#endif
+
#ifdef TC_SH
#ifdef TE_PE
@@ -142,16 +137,6 @@
#define TARGET_FORMAT "pe-mips"
#endif
-#ifdef TC_M88K
-#include "coff/m88k.h"
-#define TARGET_FORMAT "coff-m88kbcs"
-#endif
-
-#ifdef TC_W65
-#include "coff/w65.h"
-#define TARGET_FORMAT "coff-w65"
-#endif
-
#ifdef TC_TIC30
#include "coff/tic30.h"
#define TARGET_FORMAT "coff-tic30"
@@ -167,12 +152,6 @@
#define TARGET_FORMAT "coff1-c54x"
#endif
-#ifdef TC_TIC80
-#include "coff/tic80.h"
-#define TARGET_FORMAT "coff-tic80"
-#define ALIGNMENT_IN_S_FLAGS 1
-#endif
-
#ifdef TC_MCORE
#include "coff/mcore.h"
#ifndef TARGET_FORMAT
@@ -180,65 +159,26 @@
#endif
#endif
-/* Targets may also set this. Also, if BFD_ASSEMBLER is defined, this
- will already have been defined. */
-#undef SYMBOLS_NEED_BACKPOINTERS
-#define SYMBOLS_NEED_BACKPOINTERS 1
+#ifdef TE_PE
+/* PE weak symbols need USE_UNIQUE. */
+#define USE_UNIQUE 1
+
+#define obj_set_weak_hook pecoff_obj_set_weak_hook
+#define obj_clear_weak_hook pecoff_obj_clear_weak_hook
+#endif
#ifndef OBJ_COFF_MAX_AUXENTRIES
#define OBJ_COFF_MAX_AUXENTRIES 1
-#endif /* OBJ_COFF_MAX_AUXENTRIES */
+#endif
-extern void coff_obj_symbol_new_hook PARAMS ((symbolS *));
#define obj_symbol_new_hook coff_obj_symbol_new_hook
-
-extern void coff_obj_read_begin_hook PARAMS ((void));
+#define obj_symbol_clone_hook coff_obj_symbol_clone_hook
#define obj_read_begin_hook coff_obj_read_begin_hook
-/* This file really contains two implementations of the COFF back end.
- They are in the process of being merged, but this is only a
- preliminary, mechanical merging. Many definitions that are
- identical between the two are still found in both versions.
-
- The first version, with BFD_ASSEMBLER defined, uses high-level BFD
- interfaces and data structures. The second version, with
- BFD_ASSEMBLER not defined, also uses BFD, but mostly for swapping
- data structures and for doing the actual I/O. The latter defines
- the preprocessor symbols BFD and BFD_HEADERS. Try not to let this
- confuse you.
-
- These two are in the process of being merged, and eventually the
- BFD_ASSEMBLER version should take over completely. Release timing
- issues and namespace problems convinced me to merge the two
- together in this fashion, a little sooner than I would have liked.
- The real merge should be much better done by the time the next
- release comes out.
-
- For now, the structure of this file is:
- <common>
- #ifdef BFD_ASSEMBLER
- <one version>
- #else
- <other version>
- #endif
- <common>
- Unfortunately, the common portions are very small at the moment,
- and many declarations or definitions are duplicated. The structure
- of obj-coff.c is similar.
-
- See doc/internals.texi for a brief discussion of the history, if
- you care.
-
- Ken Raeburn, 5 May 1994. */
-
-#ifdef BFD_ASSEMBLER
-
#include "bfd/libcoff.h"
#define OUTPUT_FLAVOR bfd_target_coff_flavour
-/* SYMBOL TABLE */
-
/* Alter the field names, for now, until we've fixed up the other
references to use the new name. */
#ifdef TC_I960
@@ -260,23 +200,14 @@ extern void coff_obj_read_begin_hook PARAMS ((void));
#define SYM_AUXINFO(S) \
(&coffsymbol (symbol_get_bfdsym (S))->native[1])
-#define DO_NOT_STRIP 0
-
-extern void obj_coff_section PARAMS ((int));
-
/* The number of auxiliary entries. */
#define S_GET_NUMBER_AUXILIARY(s) \
(coffsymbol (symbol_get_bfdsym (s))->native->u.syment.n_numaux)
/* The number of auxiliary entries. */
-#define S_SET_NUMBER_AUXILIARY(s,v) (S_GET_NUMBER_AUXILIARY (s) = (v))
+#define S_SET_NUMBER_AUXILIARY(s, v) (S_GET_NUMBER_AUXILIARY (s) = (v))
/* True if a symbol name is in the string table, i.e. its length is > 8. */
-#define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0)
-
-extern int S_SET_DATA_TYPE PARAMS ((symbolS *, int));
-extern int S_SET_STORAGE_CLASS PARAMS ((symbolS *, int));
-extern int S_GET_STORAGE_CLASS PARAMS ((symbolS *));
-extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
+#define S_IS_STRING(s) (strlen (S_GET_NAME (s)) > 8 ? 1 : 0)
/* Auxiliary entry macros. SA_ stands for symbol auxiliary. */
/* Omit the tv related fields. */
@@ -294,15 +225,15 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
#define SA_GET_SCN_NRELOC(s) (SYM_AUXENT (s)->x_scn.x_nreloc)
#define SA_GET_SCN_NLINNO(s) (SYM_AUXENT (s)->x_scn.x_nlinno)
-#define SA_SET_SYM_LNNO(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno=(v))
-#define SA_SET_SYM_SIZE(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size=(v))
-#define SA_SET_SYM_FSIZE(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_fsize=(v))
-#define SA_SET_SYM_LNNOPTR(s,v) (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_lnnoptr=(v))
-#define SA_SET_SYM_DIMEN(s,i,v) (SYM_AUXENT (s)->x_sym.x_fcnary.x_ary.x_dimen[(i)]=(v))
-#define SA_SET_FILE_FNAME(s,v) strncpy(SYM_AUXENT (s)->x_file.x_fname,(v),FILNMLEN)
-#define SA_SET_SCN_SCNLEN(s,v) (SYM_AUXENT (s)->x_scn.x_scnlen=(v))
-#define SA_SET_SCN_NRELOC(s,v) (SYM_AUXENT (s)->x_scn.x_nreloc=(v))
-#define SA_SET_SCN_NLINNO(s,v) (SYM_AUXENT (s)->x_scn.x_nlinno=(v))
+#define SA_SET_SYM_LNNO(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno = (v))
+#define SA_SET_SYM_SIZE(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size = (v))
+#define SA_SET_SYM_FSIZE(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_fsize = (v))
+#define SA_SET_SYM_LNNOPTR(s,v) (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_lnnoptr = (v))
+#define SA_SET_SYM_DIMEN(s,i,v) (SYM_AUXENT (s)->x_sym.x_fcnary.x_ary.x_dimen[(i)] = (v))
+#define SA_SET_FILE_FNAME(s,v) strncpy (SYM_AUXENT (s)->x_file.x_fname, (v), FILNMLEN)
+#define SA_SET_SCN_SCNLEN(s,v) (SYM_AUXENT (s)->x_scn.x_scnlen = (v))
+#define SA_SET_SCN_NRELOC(s,v) (SYM_AUXENT (s)->x_scn.x_nreloc = (v))
+#define SA_SET_SCN_NLINNO(s,v) (SYM_AUXENT (s)->x_scn.x_nlinno = (v))
/* Internal use only definitions. SF_ stands for symbol flags.
@@ -312,31 +243,31 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
more on the balname/callname hack, see tc-i960.h. b.out is done
differently. */
-#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
-#define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */
-#define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */
-#define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */
-#define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */
-
-#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */
-
-#define SF_STATICS (0x00001000) /* Mark the .text & all symbols */
-#define SF_DEFINED (0x00002000) /* Symbol is defined in this file */
-#define SF_STRING (0x00004000) /* Symbol name length > 8 */
-#define SF_LOCAL (0x00008000) /* Symbol must not be emitted */
-
-#define SF_DEBUG_MASK (0xffff0000) /* bits 16-31 are debug info */
-
-#define SF_FUNCTION (0x00010000) /* The symbol is a function */
-#define SF_PROCESS (0x00020000) /* Process symbol before write */
-#define SF_TAGGED (0x00040000) /* Is associated with a tag */
-#define SF_TAG (0x00080000) /* Is a tag */
-#define SF_DEBUG (0x00100000) /* Is in debug or abs section */
-#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */
+#define SF_I960_MASK 0x000001ff /* Bits 0-8 are used by the i960 port. */
+#define SF_SYSPROC 0x0000003f /* bits 0-5 are used to store the sysproc number. */
+#define SF_IS_SYSPROC 0x00000040 /* bit 6 marks symbols that are sysprocs. */
+#define SF_BALNAME 0x00000080 /* bit 7 marks BALNAME symbols. */
+#define SF_CALLNAME 0x00000100 /* bit 8 marks CALLNAME symbols. */
+
+#define SF_NORMAL_MASK 0x0000ffff /* bits 12-15 are general purpose. */
+
+#define SF_STATICS 0x00001000 /* Mark the .text & all symbols. */
+#define SF_DEFINED 0x00002000 /* Symbol is defined in this file. */
+#define SF_STRING 0x00004000 /* Symbol name length > 8. */
+#define SF_LOCAL 0x00008000 /* Symbol must not be emitted. */
+
+#define SF_DEBUG_MASK 0xffff0000 /* bits 16-31 are debug info. */
+
+#define SF_FUNCTION 0x00010000 /* The symbol is a function. */
+#define SF_PROCESS 0x00020000 /* Process symbol before write. */
+#define SF_TAGGED 0x00040000 /* Is associated with a tag. */
+#define SF_TAG 0x00080000 /* Is a tag. */
+#define SF_DEBUG 0x00100000 /* Is in debug or abs section. */
+#define SF_GET_SEGMENT 0x00200000 /* Get the section of the forward symbol. */
/* All other bits are unused. */
/* Accessors. */
-#define SF_GET(s) (*symbol_get_obj (s))
+#define SF_GET(s) (* symbol_get_obj (s))
#define SF_GET_DEBUG(s) (symbol_get_bfdsym (s)->flags & BSF_DEBUGGING)
#define SF_SET_DEBUG(s) (symbol_get_bfdsym (s)->flags |= BSF_DEBUGGING)
#define SF_GET_NORMAL_FIELD(s) (SF_GET (s) & SF_NORMAL_MASK)
@@ -351,15 +282,15 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
#define SF_GET_TAGGED(s) (SF_GET (s) & SF_TAGGED)
#define SF_GET_TAG(s) (SF_GET (s) & SF_TAG)
#define SF_GET_GET_SEGMENT(s) (SF_GET (s) & SF_GET_SEGMENT)
-#define SF_GET_I960(s) (SF_GET (s) & SF_I960_MASK) /* used by i960 */
-#define SF_GET_BALNAME(s) (SF_GET (s) & SF_BALNAME) /* used by i960 */
-#define SF_GET_CALLNAME(s) (SF_GET (s) & SF_CALLNAME) /* used by i960 */
-#define SF_GET_IS_SYSPROC(s) (SF_GET (s) & SF_IS_SYSPROC) /* used by i960 */
-#define SF_GET_SYSPROC(s) (SF_GET (s) & SF_SYSPROC) /* used by i960 */
+#define SF_GET_I960(s) (SF_GET (s) & SF_I960_MASK) /* Used by i960. */
+#define SF_GET_BALNAME(s) (SF_GET (s) & SF_BALNAME) /* Used by i960. */
+#define SF_GET_CALLNAME(s) (SF_GET (s) & SF_CALLNAME) /* Used by i960. */
+#define SF_GET_IS_SYSPROC(s) (SF_GET (s) & SF_IS_SYSPROC) /* Used by i960. */
+#define SF_GET_SYSPROC(s) (SF_GET (s) & SF_SYSPROC) /* Used by i960. */
/* Modifiers. */
#define SF_SET(s,v) (SF_GET (s) = (v))
-#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK))
+#define SF_SET_NORMAL_FIELD(s,v)(SF_GET (s) |= ((v) & SF_NORMAL_MASK))
#define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK))
#define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE)
#define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS)
@@ -372,47 +303,38 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
#define SF_SET_TAGGED(s) (SF_GET (s) |= SF_TAGGED)
#define SF_SET_TAG(s) (SF_GET (s) |= SF_TAG)
#define SF_SET_GET_SEGMENT(s) (SF_GET (s) |= SF_GET_SEGMENT)
-#define SF_SET_I960(s,v) (SF_GET (s) |= ((v) & SF_I960_MASK)) /* used by i960 */
-#define SF_SET_BALNAME(s) (SF_GET (s) |= SF_BALNAME) /* used by i960 */
-#define SF_SET_CALLNAME(s) (SF_GET (s) |= SF_CALLNAME) /* used by i960 */
-#define SF_SET_IS_SYSPROC(s) (SF_GET (s) |= SF_IS_SYSPROC) /* used by i960 */
-#define SF_SET_SYSPROC(s,v) (SF_GET (s) |= ((v) & SF_SYSPROC)) /* used by i960 */
+#define SF_SET_I960(s,v) (SF_GET (s) |= ((v) & SF_I960_MASK)) /* Used by i960. */
+#define SF_SET_BALNAME(s) (SF_GET (s) |= SF_BALNAME) /* Used by i960. */
+#define SF_SET_CALLNAME(s) (SF_GET (s) |= SF_CALLNAME) /* Used by i960. */
+#define SF_SET_IS_SYSPROC(s) (SF_GET (s) |= SF_IS_SYSPROC) /* Used by i960. */
+#define SF_SET_SYSPROC(s,v) (SF_GET (s) |= ((v) & SF_SYSPROC)) /* Used by i960. */
+
-/* -------------- Line number handling ------- */
+/* Line number handling. */
extern int text_lineno_number;
extern int coff_line_base;
extern int coff_n_line_nos;
+extern symbolS *coff_last_function;
-#define obj_emit_lineno(WHERE,LINE,FILE_START) abort ()
-extern void coff_add_linesym PARAMS ((symbolS *));
-
-void c_dot_file_symbol PARAMS ((const char *filename));
-#define obj_app_file c_dot_file_symbol
-
-extern void coff_frob_symbol PARAMS ((symbolS *, int *));
-extern void coff_adjust_symtab PARAMS ((void));
-extern void coff_frob_section PARAMS ((segT));
-extern void coff_adjust_section_syms PARAMS ((bfd *, asection *, PTR));
-extern void coff_frob_file_after_relocs PARAMS ((void));
-#define obj_frob_symbol(S,P) coff_frob_symbol(S,&P)
+#define obj_emit_lineno(WHERE, LINE, FILE_START) abort ()
+#define obj_app_file(name, app) c_dot_file_symbol (name, app)
+#define obj_frob_symbol(S,P) coff_frob_symbol (S, & P)
+#define obj_frob_section(S) coff_frob_section (S)
+#define obj_frob_file_after_relocs() coff_frob_file_after_relocs ()
#ifndef obj_adjust_symtab
-#define obj_adjust_symtab() coff_adjust_symtab()
+#define obj_adjust_symtab() coff_adjust_symtab ()
#endif
-#define obj_frob_section(S) coff_frob_section (S)
-#define obj_frob_file_after_relocs() coff_frob_file_after_relocs ()
-
-extern symbolS *coff_last_function;
/* Forward the segment of a forwarded symbol, handle assignments that
just copy symbol values, etc. */
#ifndef OBJ_COPY_SYMBOL_ATTRIBUTES
#ifndef TE_I386AIX
-#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src) \
+#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest, src) \
(SF_GET_GET_SEGMENT (dest) \
? (S_SET_SEGMENT (dest, S_GET_SEGMENT (src)), 0) \
: 0)
#else
-#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src) \
+#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest, src) \
(SF_GET_GET_SEGMENT (dest) && S_GET_SEGMENT (dest) == SEG_UNKNOWN \
? (S_SET_SEGMENT (dest, S_GET_SEGMENT (src)), 0) \
: 0)
@@ -427,452 +349,6 @@ hey ! Where is the C_LEAFSTAT definition ? i960 - coff support is depending on i
#endif /* no C_LEAFSTAT */
#endif /* TC_I960 */
-#else /* not BFD_ASSEMBLER */
-
-#if defined TC_A29K || defined TC_OR32
-/* Allow translate from aout relocs to coff relocs. */
-#define NO_RELOC 20
-#define RELOC_32 1
-#define RELOC_8 2
-#define RELOC_CONST 3
-#define RELOC_CONSTH 4
-#define RELOC_JUMPTARG 5
-#define RELOC_BASE22 6
-#define RELOC_HI22 7
-#define RELOC_LO10 8
-#define RELOC_BASE13 9
-#define RELOC_WDISP22 10
-#define RELOC_WDISP30 11
-#endif
-
-extern const segT N_TYPE_seg[];
-
-/* Magic number of paged executable. */
-#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE 0x8300
-
-/* SYMBOL TABLE */
-
-/* Symbol table entry data type. */
-
-typedef struct
-{
- /* Basic symbol */
- struct internal_syment ost_entry;
- /* Auxiliary entry. */
- union internal_auxent ost_auxent[OBJ_COFF_MAX_AUXENTRIES];
- /* obj_coff internal use only flags. */
- unsigned int ost_flags;
-} obj_symbol_type;
-
-#ifndef DO_NOT_STRIP
-#define DO_NOT_STRIP 0
-#endif
-/* Symbol table macros and constants. */
-
-/* Possible and useful section number in symbol table
- The values of TEXT, DATA and BSS may not be portable. */
-
-#define C_ABS_SECTION N_ABS
-#define C_UNDEF_SECTION N_UNDEF
-#define C_DEBUG_SECTION N_DEBUG
-#define C_NTV_SECTION N_TV
-#define C_PTV_SECTION P_TV
-#define C_REGISTER_SECTION 50
-
-/* Macros to extract information from a symbol table entry.
- This syntactic indirection allows independence regarding a.out or coff.
- The argument (s) of all these macros is a pointer to a symbol table entry. */
-
-/* Predicates. */
-/* True if the symbol is external. */
-#define S_IS_EXTERNAL(s) \
- ((s)->sy_symbol.ost_entry.n_scnum == C_UNDEF_SECTION)
-
-/* True if symbol has been defined, ie :
- section > 0 (DATA, TEXT or BSS)
- section == 0 and value > 0 (external bss symbol). */
-#define S_IS_DEFINED(s) \
- ((s)->sy_symbol.ost_entry.n_scnum > C_UNDEF_SECTION \
- || ((s)->sy_symbol.ost_entry.n_scnum == C_UNDEF_SECTION \
- && S_GET_VALUE (s) > 0) \
- || ((s)->sy_symbol.ost_entry.n_scnum == C_ABS_SECTION))
-
-/* 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 (S_GET_SEGMENT (s)) || (strict && S_IS_WEAK (s)))
-
-/* True if a debug special symbol entry. */
-#define S_IS_DEBUG(s) \
- ((s)->sy_symbol.ost_entry.n_scnum == C_DEBUG_SECTION)
-
-/* True if a symbol is local symbol name. */
-/* A symbol name whose name includes ^A is a gas internal pseudo symbol. */
-#define S_IS_LOCAL(s) \
- ((s)->sy_symbol.ost_entry.n_scnum == C_REGISTER_SECTION \
- || (S_LOCAL_NAME(s) && ! flag_keep_locals && ! S_IS_DEBUG (s)) \
- || strchr (S_GET_NAME (s), '\001') != NULL \
- || strchr (S_GET_NAME (s), '\002') != NULL \
- || (flag_strip_local_absolute \
- && !S_IS_EXTERNAL(s) \
- && (s)->sy_symbol.ost_entry.n_scnum == C_ABS_SECTION))
-
-/* True if a symbol is not defined in this file. */
-#define S_IS_EXTERN(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \
- && S_GET_VALUE (s) == 0)
-
-/* True if a symbol can be multiply defined (bss symbols have this def
- though it is bad practice). */
-#define S_IS_COMMON(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \
- && S_GET_VALUE (s) != 0)
-
-/* True if a symbol name is in the string table, i.e. its length is > 8. */
-#define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0)
-
-/* True if a symbol is defined as weak. */
-#ifdef TE_PE
-#define S_IS_WEAK(s) \
- ((s)->sy_symbol.ost_entry.n_sclass == C_NT_WEAK \
- || (s)->sy_symbol.ost_entry.n_sclass == C_WEAKEXT)
-#else
-#define S_IS_WEAK(s) \
- ((s)->sy_symbol.ost_entry.n_sclass == C_WEAKEXT)
-#endif
-
-/* Accessors. */
-/* The name of the symbol. */
-#define S_GET_NAME(s) ((char*) (s)->sy_symbol.ost_entry.n_offset)
-
-/* The pointer to the string table. */
-#define S_GET_OFFSET(s) ((s)->sy_symbol.ost_entry.n_offset)
-
-/* The numeric value of the segment. */
-#define S_GET_SEGMENT(s) s_get_segment(s)
-
-/* The data type. */
-#define S_GET_DATA_TYPE(s) ((s)->sy_symbol.ost_entry.n_type)
-
-/* The storage class. */
-#define S_GET_STORAGE_CLASS(s) ((s)->sy_symbol.ost_entry.n_sclass)
-
-/* The number of auxiliary entries. */
-#define S_GET_NUMBER_AUXILIARY(s) ((s)->sy_symbol.ost_entry.n_numaux)
-
-/* Modifiers. */
-/* Set the name of the symbol. */
-#define S_SET_NAME(s,v) \
- ((s)->sy_symbol.ost_entry.n_offset = (unsigned long) (v))
-
-/* Set the offset of the symbol. */
-#define S_SET_OFFSET(s,v) \
- ((s)->sy_symbol.ost_entry.n_offset = (v))
-
-/* The numeric value of the segment. */
-#define S_SET_SEGMENT(s,v) \
- ((s)->sy_symbol.ost_entry.n_scnum = SEGMENT_TO_SYMBOL_TYPE(v))
-
-/* The data type. */
-#define S_SET_DATA_TYPE(s,v) \
- ((s)->sy_symbol.ost_entry.n_type = (v))
-
-/* The storage class. */
-#define S_SET_STORAGE_CLASS(s,v) \
- ((s)->sy_symbol.ost_entry.n_sclass = (v))
-
-/* The number of auxiliary entries. */
-#define S_SET_NUMBER_AUXILIARY(s,v) \
- ((s)->sy_symbol.ost_entry.n_numaux = (v))
-
-/* Additional modifiers. */
-/* The symbol is external (does not mean undefined). */
-#define S_SET_EXTERNAL(s) \
- { S_SET_STORAGE_CLASS(s, C_EXT) ; SF_CLEAR_LOCAL(s); }
-
-/* Auxiliary entry macros. SA_ stands for symbol auxiliary. */
-/* Omit the tv related fields. */
-/* Accessors. */
-#define SYM_AUXENT(S) (&(S)->sy_symbol.ost_auxent[0])
-
-#define SA_GET_SYM_TAGNDX(s) (SYM_AUXENT (s)->x_sym.x_tagndx.l)
-#define SA_GET_SYM_LNNO(s) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno)
-#define SA_GET_SYM_SIZE(s) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size)
-#define SA_GET_SYM_FSIZE(s) (SYM_AUXENT (s)->x_sym.x_misc.x_fsize)
-#define SA_GET_SYM_LNNOPTR(s) (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_lnnoptr)
-#define SA_GET_SYM_ENDNDX(s) (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_endndx.l)
-#define SA_GET_SYM_DIMEN(s,i) (SYM_AUXENT (s)->x_sym.x_fcnary.x_ary.x_dimen[(i)])
-#define SA_GET_FILE_FNAME(s) (SYM_AUXENT (s)->x_file.x_fname)
-#define SA_GET_FILE_FNAME_OFFSET(s) (SYM_AUXENT (s)->x_file.x_n.x_offset)
-#define SA_GET_FILE_FNAME_ZEROS(s) (SYM_AUXENT (s)->x_file.x_n.x_zeroes)
-#define SA_GET_SCN_SCNLEN(s) (SYM_AUXENT (s)->x_scn.x_scnlen)
-#define SA_GET_SCN_NRELOC(s) (SYM_AUXENT (s)->x_scn.x_nreloc)
-#define SA_GET_SCN_NLINNO(s) (SYM_AUXENT (s)->x_scn.x_nlinno)
-
-/* Modifiers. */
-#define SA_SET_SYM_TAGNDX(s,v) (SYM_AUXENT (s)->x_sym.x_tagndx.l=(v))
-#define SA_SET_SYM_LNNO(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno=(v))
-#define SA_SET_SYM_SIZE(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size=(v))
-#define SA_SET_SYM_FSIZE(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_fsize=(v))
-#define SA_SET_SYM_LNNOPTR(s,v) (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_lnnoptr=(v))
-#define SA_SET_SYM_ENDNDX(s,v) (SYM_AUXENT (s)->x_sym.x_fcnary.x_fcn.x_endndx.l=(v))
-#define SA_SET_SYM_DIMEN(s,i,v) (SYM_AUXENT (s)->x_sym.x_fcnary.x_ary.x_dimen[(i)]=(v))
-#define SA_SET_FILE_FNAME(s,v) strncpy(SYM_AUXENT (s)->x_file.x_fname,(v),FILNMLEN)
-#define SA_SET_FILE_FNAME_OFFSET(s,v) (SYM_AUXENT (s)->x_file.x_n.x_offset=(v))
-#define SA_SET_FILE_FNAME_ZEROS(s,v) (SYM_AUXENT (s)->x_file.x_n.x_zeroes=(v))
-#define SA_SET_SCN_SCNLEN(s,v) (SYM_AUXENT (s)->x_scn.x_scnlen=(v))
-#define SA_SET_SCN_NRELOC(s,v) (SYM_AUXENT (s)->x_scn.x_nreloc=(v))
-#define SA_SET_SCN_NLINNO(s,v) (SYM_AUXENT (s)->x_scn.x_nlinno=(v))
-
-/* Internal use only definitions. SF_ stands for symbol flags.
-
- These values can be assigned to sy_symbol.ost_flags field of a symbolS.
-
- You'll break i960 if you shift the SYSPROC bits anywhere else. for
- more on the balname/callname hack, see tc-i960.h. b.out is done
- differently. */
-
-#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
-#define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */
-#define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */
-#define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */
-#define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */
-
-#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */
-
-#define SF_STATICS (0x00001000) /* Mark the .text & all symbols */
-#define SF_DEFINED (0x00002000) /* Symbol is defined in this file */
-#define SF_STRING (0x00004000) /* Symbol name length > 8 */
-#define SF_LOCAL (0x00008000) /* Symbol must not be emitted */
-
-#define SF_DEBUG_MASK (0xffff0000) /* bits 16-31 are debug info */
-
-#define SF_FUNCTION (0x00010000) /* The symbol is a function */
-#define SF_PROCESS (0x00020000) /* Process symbol before write */
-#define SF_TAGGED (0x00040000) /* Is associated with a tag */
-#define SF_TAG (0x00080000) /* Is a tag */
-#define SF_DEBUG (0x00100000) /* Is in debug or abs section */
-#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */
-#define SF_ADJ_LNNOPTR (0x00400000) /* Has a lnnoptr */
-/* All other bits are unused. */
-
-/* Accessors. */
-#define SF_GET(s) ((s)->sy_symbol.ost_flags)
-#define SF_GET_NORMAL_FIELD(s) (SF_GET (s) & SF_NORMAL_MASK)
-#define SF_GET_DEBUG_FIELD(s) (SF_GET (s) & SF_DEBUG_MASK)
-#define SF_GET_FILE(s) (SF_GET (s) & SF_FILE)
-#define SF_GET_STATICS(s) (SF_GET (s) & SF_STATICS)
-#define SF_GET_DEFINED(s) (SF_GET (s) & SF_DEFINED)
-#define SF_GET_STRING(s) (SF_GET (s) & SF_STRING)
-#define SF_GET_LOCAL(s) (SF_GET (s) & SF_LOCAL)
-#define SF_GET_FUNCTION(s) (SF_GET (s) & SF_FUNCTION)
-#define SF_GET_PROCESS(s) (SF_GET (s) & SF_PROCESS)
-#define SF_GET_DEBUG(s) (SF_GET (s) & SF_DEBUG)
-#define SF_GET_TAGGED(s) (SF_GET (s) & SF_TAGGED)
-#define SF_GET_TAG(s) (SF_GET (s) & SF_TAG)
-#define SF_GET_GET_SEGMENT(s) (SF_GET (s) & SF_GET_SEGMENT)
-#define SF_GET_ADJ_LNNOPTR(s) (SF_GET (s) & SF_ADJ_LNNOPTR)
-#define SF_GET_I960(s) (SF_GET (s) & SF_I960_MASK) /* used by i960 */
-#define SF_GET_BALNAME(s) (SF_GET (s) & SF_BALNAME) /* used by i960 */
-#define SF_GET_CALLNAME(s) (SF_GET (s) & SF_CALLNAME) /* used by i960 */
-#define SF_GET_IS_SYSPROC(s) (SF_GET (s) & SF_IS_SYSPROC) /* used by i960 */
-#define SF_GET_SYSPROC(s) (SF_GET (s) & SF_SYSPROC) /* used by i960 */
-
-/* Modifiers. */
-#define SF_SET(s,v) (SF_GET (s) = (v))
-#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK))
-#define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK))
-#define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE)
-#define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS)
-#define SF_SET_DEFINED(s) (SF_GET (s) |= SF_DEFINED)
-#define SF_SET_STRING(s) (SF_GET (s) |= SF_STRING)
-#define SF_SET_LOCAL(s) (SF_GET (s) |= SF_LOCAL)
-#define SF_CLEAR_LOCAL(s) (SF_GET (s) &= ~SF_LOCAL)
-#define SF_SET_FUNCTION(s) (SF_GET (s) |= SF_FUNCTION)
-#define SF_SET_PROCESS(s) (SF_GET (s) |= SF_PROCESS)
-#define SF_SET_DEBUG(s) (SF_GET (s) |= SF_DEBUG)
-#define SF_SET_TAGGED(s) (SF_GET (s) |= SF_TAGGED)
-#define SF_SET_TAG(s) (SF_GET (s) |= SF_TAG)
-#define SF_SET_GET_SEGMENT(s) (SF_GET (s) |= SF_GET_SEGMENT)
-#define SF_SET_ADJ_LNNOPTR(s) (SF_GET (s) |= SF_ADJ_LNNOPTR)
-#define SF_SET_I960(s,v) (SF_GET (s) |= ((v) & SF_I960_MASK)) /* used by i960 */
-#define SF_SET_BALNAME(s) (SF_GET (s) |= SF_BALNAME) /* used by i960 */
-#define SF_SET_CALLNAME(s) (SF_GET (s) |= SF_CALLNAME) /* used by i960 */
-#define SF_SET_IS_SYSPROC(s) (SF_GET (s) |= SF_IS_SYSPROC) /* used by i960 */
-#define SF_SET_SYSPROC(s,v) (SF_GET (s) |= ((v) & SF_SYSPROC)) /* used by i960 */
-
-/* File header macro and type definition. */
-
-/* File position calculators. Beware to use them when all the
- appropriate fields are set in the header. */
-
-#ifdef OBJ_COFF_OMIT_OPTIONAL_HEADER
-#define OBJ_COFF_AOUTHDRSZ (0)
-#else
-#define OBJ_COFF_AOUTHDRSZ (AOUTHDRSZ)
-#endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */
-
-#define H_GET_FILE_SIZE(h) \
- (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
- H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
- H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \
- H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h) + \
- H_GET_SYMBOL_TABLE_SIZE(h) + \
- (h)->string_table_size)
-#define H_GET_TEXT_FILE_OFFSET(h) \
- (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
- H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ)
-#define H_GET_DATA_FILE_OFFSET(h) \
- (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
- H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
- H_GET_TEXT_SIZE(h))
-#define H_GET_BSS_FILE_OFFSET(h) 0
-#define H_GET_RELOCATION_FILE_OFFSET(h) \
- (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
- H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
- H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h))
-#define H_GET_LINENO_FILE_OFFSET(h) \
- (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
- H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
- H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \
- H_GET_RELOCATION_SIZE(h))
-#define H_GET_SYMBOL_TABLE_FILE_OFFSET(h) \
- (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \
- H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \
- H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \
- H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h))
-
-/* Accessors. */
-/* aouthdr. */
-#define H_GET_MAGIC_NUMBER(h) ((h)->aouthdr.magic)
-#define H_GET_VERSION_STAMP(h) ((h)->aouthdr.vstamp)
-#define H_GET_TEXT_SIZE(h) ((h)->aouthdr.tsize)
-#define H_GET_DATA_SIZE(h) ((h)->aouthdr.dsize)
-#define H_GET_BSS_SIZE(h) ((h)->aouthdr.bsize)
-#define H_GET_ENTRY_POINT(h) ((h)->aouthdr.entry)
-#define H_GET_TEXT_START(h) ((h)->aouthdr.text_start)
-#define H_GET_DATA_START(h) ((h)->aouthdr.data_start)
-/* filehdr. */
-#define H_GET_FILE_MAGIC_NUMBER(h) ((h)->filehdr.f_magic)
-#define H_GET_NUMBER_OF_SECTIONS(h) ((h)->filehdr.f_nscns)
-#define H_GET_TIME_STAMP(h) ((h)->filehdr.f_timdat)
-#define H_GET_SYMBOL_TABLE_POINTER(h) ((h)->filehdr.f_symptr)
-#define H_GET_SYMBOL_COUNT(h) ((h)->filehdr.f_nsyms)
-#define H_GET_SYMBOL_TABLE_SIZE(h) (H_GET_SYMBOL_COUNT(h) * SYMESZ)
-#define H_GET_SIZEOF_OPTIONAL_HEADER(h) ((h)->filehdr.f_opthdr)
-#define H_GET_FLAGS(h) ((h)->filehdr.f_flags)
-/* Extra fields to achieve bsd a.out compatibility and for convenience. */
-#define H_GET_RELOCATION_SIZE(h) ((h)->relocation_size)
-#define H_GET_STRING_SIZE(h) ((h)->string_table_size)
-#define H_GET_LINENO_SIZE(h) ((h)->lineno_size)
-
-#ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER
-#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \
- + sizeof (AOUTHDR)\
- + (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ))
-#else /* OBJ_COFF_OMIT_OPTIONAL_HEADER */
-#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \
- + (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ))
-#endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */
-
-#define H_GET_TEXT_RELOCATION_SIZE(h) (text_section_header.s_nreloc * RELSZ)
-#define H_GET_DATA_RELOCATION_SIZE(h) (data_section_header.s_nreloc * RELSZ)
-
-/* Modifiers. */
-/* aouthdr. */
-#define H_SET_MAGIC_NUMBER(h,v) ((h)->aouthdr.magic = (v))
-#define H_SET_VERSION_STAMP(h,v) ((h)->aouthdr.vstamp = (v))
-#define H_SET_TEXT_SIZE(h,v) ((h)->aouthdr.tsize = (v))
-#define H_SET_DATA_SIZE(h,v) ((h)->aouthdr.dsize = (v))
-#define H_SET_BSS_SIZE(h,v) ((h)->aouthdr.bsize = (v))
-#define H_SET_ENTRY_POINT(h,v) ((h)->aouthdr.entry = (v))
-#define H_SET_TEXT_START(h,v) ((h)->aouthdr.text_start = (v))
-#define H_SET_DATA_START(h,v) ((h)->aouthdr.data_start = (v))
-/* filehdr. */
-#define H_SET_FILE_MAGIC_NUMBER(h,v) ((h)->filehdr.f_magic = (v))
-#define H_SET_NUMBER_OF_SECTIONS(h,v) ((h)->filehdr.f_nscns = (v))
-#define H_SET_TIME_STAMP(h,v) ((h)->filehdr.f_timdat = (v))
-#define H_SET_SYMBOL_TABLE_POINTER(h,v) ((h)->filehdr.f_symptr = (v))
-#define H_SET_SYMBOL_TABLE_SIZE(h,v) ((h)->filehdr.f_nsyms = (v))
-#define H_SET_SIZEOF_OPTIONAL_HEADER(h,v) ((h)->filehdr.f_opthdr = (v))
-#define H_SET_FLAGS(h,v) ((h)->filehdr.f_flags = (v))
-/* Extra fields to achieve bsd a.out compatibility and for convenience. */
-#define H_SET_RELOCATION_SIZE(h,t,d) ((h)->relocation_size = (t)+(d))
-#define H_SET_STRING_SIZE(h,v) ((h)->string_table_size = (v))
-#define H_SET_LINENO_SIZE(h,v) ((h)->lineno_size = (v))
-
-/* Segment flipping. */
-
-typedef struct
-{
- struct internal_aouthdr aouthdr; /* a.out header */
- struct internal_filehdr filehdr; /* File header, not machine dep. */
- long string_table_size; /* names + '\0' + sizeof (int) */
- long relocation_size; /* Cumulated size of relocation
- information for all sections in
- bytes. */
- long lineno_size; /* Size of the line number information
- table in bytes. */
-} object_headers;
-
-struct lineno_list
-{
- struct bfd_internal_lineno line;
- char *frag; /* Frag to which the line number is related. */
- struct lineno_list *next; /* Forward chain pointer. */
-};
-
-#define obj_segment_name(i) (segment_info[(int) (i)].scnhdr.s_name)
-
-#define obj_add_segment(s) obj_coff_add_segment (s)
-
-extern segT obj_coff_add_segment PARAMS ((const char *));
-
-extern void obj_coff_section PARAMS ((int));
-
-extern void c_dot_file_symbol PARAMS ((char *filename));
-#define obj_app_file c_dot_file_symbol
-extern void obj_extra_stuff PARAMS ((object_headers * headers));
-
-extern segT s_get_segment PARAMS ((symbolS *ptr));
-
-extern void c_section_header PARAMS ((struct internal_scnhdr * header,
- char *name,
- long core_address,
- long size,
- long data_ptr,
- long reloc_ptr,
- long lineno_ptr,
- long reloc_number,
- long lineno_number,
- long alignment));
-
-#ifndef tc_coff_symbol_emit_hook
-void tc_coff_symbol_emit_hook PARAMS ((symbolS *));
-#endif
-
-/* Sanity check. */
-
-#ifdef TC_I960
-#ifndef C_LEAFSTAT
-hey ! Where is the C_LEAFSTAT definition ? i960 - coff support is depending on it.
-#endif /* no C_LEAFSTAT */
-#endif /* TC_I960 */
-extern struct internal_scnhdr data_section_header;
-extern struct internal_scnhdr text_section_header;
-
-/* Forward the segment of a forwarded symbol. */
-#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src) \
- (SF_GET_GET_SEGMENT (dest) \
- ? (S_SET_SEGMENT (dest, S_GET_SEGMENT (src)), 0) \
- : 0)
-
-#ifdef TE_PE
-#define obj_handle_link_once(t) obj_coff_pe_handle_link_once (t)
-extern void obj_coff_pe_handle_link_once ();
-#endif
-
-#endif /* not BFD_ASSEMBLER */
-
extern const pseudo_typeS coff_pseudo_table[];
#ifndef obj_pop_insert
@@ -896,11 +372,43 @@ extern const pseudo_typeS coff_pseudo_table[];
/* We need 12 bytes at the start of the section to hold some initial
information. */
-extern void obj_coff_init_stab_section PARAMS ((segT));
#define INIT_STAB_SECTION(seg) obj_coff_init_stab_section (seg)
/* Store the number of relocations in the section aux entry. */
#define SET_SECTION_RELOCS(sec, relocs, n) \
SA_SET_SCN_NRELOC (section_symbol (sec), n)
+#define obj_app_file(name, app) c_dot_file_symbol (name, app)
+
+extern int S_SET_DATA_TYPE (symbolS *, int);
+extern int S_SET_STORAGE_CLASS (symbolS *, int);
+extern int S_GET_STORAGE_CLASS (symbolS *);
+extern void SA_SET_SYM_ENDNDX (symbolS *, symbolS *);
+extern void coff_add_linesym (symbolS *);
+extern void c_dot_file_symbol (const char *, int);
+extern void coff_frob_symbol (symbolS *, int *);
+extern void coff_adjust_symtab (void);
+extern void coff_frob_section (segT);
+extern void coff_adjust_section_syms (bfd *, asection *, void *);
+extern void coff_frob_file_after_relocs (void);
+extern void coff_obj_symbol_new_hook (symbolS *);
+extern void coff_obj_symbol_clone_hook (symbolS *, symbolS *);
+extern void coff_obj_read_begin_hook (void);
+#ifdef TE_PE
+extern void pecoff_obj_set_weak_hook (symbolS *);
+extern void pecoff_obj_clear_weak_hook (symbolS *);
+#endif
+extern void obj_coff_section (int);
+extern segT obj_coff_add_segment (const char *);
+extern void obj_coff_section (int);
+extern void c_dot_file_symbol (const char *, int);
+extern segT s_get_segment (symbolS *);
+#ifndef tc_coff_symbol_emit_hook
+extern void tc_coff_symbol_emit_hook (symbolS *);
+#endif
+extern void obj_coff_pe_handle_link_once (void);
+extern void obj_coff_init_stab_section (segT);
+extern void c_section_header (struct internal_scnhdr *,
+ char *, long, long, long, long,
+ long, long, long, long);
#endif /* OBJ_FORMAT_H */
diff --git a/contrib/binutils/gas/config/obj-ecoff.c b/contrib/binutils/gas/config/obj-ecoff.c
index 69f8d9a89ab8..c1d2c647f0f9 100644
--- a/contrib/binutils/gas/config/obj-ecoff.c
+++ b/contrib/binutils/gas/config/obj-ecoff.c
@@ -1,6 +1,6 @@
/* ECOFF object file format.
- Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+ 2005 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>.
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define OBJ_HEADER "obj-ecoff.h"
#include "as.h"
@@ -31,80 +31,13 @@
gas directory. This file mostly just arranges to call that one at
the right times. */
-static int ecoff_sec_sym_ok_for_reloc PARAMS ((asection *));
-static void obj_ecoff_frob_symbol PARAMS ((symbolS *, int *));
-static void ecoff_pop_insert PARAMS ((void));
-static int ecoff_separate_stab_sections PARAMS ((void));
-
-/* These are the pseudo-ops we support in this file. Only those
- relating to debugging information are supported here.
-
- The following pseudo-ops from the Kane and Heinrich MIPS book
- should be defined here, but are currently unsupported: .aent,
- .bgnb, .endb, .verstamp, .vreg.
-
- The following pseudo-ops from the Kane and Heinrich MIPS book are
- MIPS CPU specific, and should be defined by tc-mips.c: .alias,
- .extern, .galive, .gjaldef, .gjrlive, .livereg, .noalias, .option,
- .rdata, .sdata, .set.
-
- The following pseudo-ops from the Kane and Heinrich MIPS book are
- not MIPS CPU specific, but are also not ECOFF specific. I have
- only listed the ones which are not already in read.c. It's not
- completely clear where these should be defined, but tc-mips.c is
- probably the most reasonable place: .asciiz, .asm0, .endr, .err,
- .half, .lab, .repeat, .struct, .weakext. */
-
-const pseudo_typeS obj_pseudo_table[] =
-{
- /* COFF style debugging information. .ln is not used; .loc is used
- instead. */
- { "def", ecoff_directive_def, 0 },
- { "dim", ecoff_directive_dim, 0 },
- { "endef", ecoff_directive_endef, 0 },
- { "file", ecoff_directive_file, 0 },
- { "scl", ecoff_directive_scl, 0 },
- { "size", ecoff_directive_size, 0 },
- { "esize", ecoff_directive_size, 0 },
- { "tag", ecoff_directive_tag, 0 },
- { "type", ecoff_directive_type, 0 },
- { "etype", ecoff_directive_type, 0 },
- { "val", ecoff_directive_val, 0 },
-
- /* ECOFF specific debugging information. */
- { "begin", ecoff_directive_begin, 0 },
- { "bend", ecoff_directive_bend, 0 },
- { "end", ecoff_directive_end, 0 },
- { "ent", ecoff_directive_ent, 0 },
- { "fmask", ecoff_directive_fmask, 0 },
- { "frame", ecoff_directive_frame, 0 },
- { "loc", ecoff_directive_loc, 0 },
- { "mask", ecoff_directive_mask, 0 },
-
- /* Other ECOFF directives. */
- { "extern", ecoff_directive_extern, 0 },
-
-#ifndef TC_MIPS
- /* For TC_MIPS, tc-mips.c adds this. */
- { "weakext", ecoff_directive_weakext, 0 },
-#endif
-
- /* These are used on Irix. I don't know how to implement them. */
- { "bgnb", s_ignore, 0 },
- { "endb", s_ignore, 0 },
- { "verstamp", s_ignore, 0 },
-
- /* Sentinel. */
- { NULL, s_ignore, 0 }
-};
-
/* Set section VMAs and GP values before reloc processing. */
void
-ecoff_frob_file_before_fix ()
+ecoff_frob_file_before_fix (void)
{
bfd_vma addr;
- asection **sec;
+ asection *sec;
/* Set the section VMA values. We force the .sdata and .sbss
sections to the end to ensure that their VMA addresses are close
@@ -128,7 +61,8 @@ ecoff_frob_file_before_fix ()
I don't know if section ordering on the MIPS is important. */
- static const char *const names[] = {
+ static const char *const names[] =
+ {
/* text segment */
".text", ".rdata", ".init", ".fini",
/* data segment */
@@ -144,22 +78,21 @@ ecoff_frob_file_before_fix ()
addr = 0;
for (i = 0; i < n_names; i++)
- secs[i] = 0;
+ secs[i] = NULL;
- for (sec = &stdoutput->sections; *sec != (asection *) NULL; )
+ for (sec = stdoutput->sections; sec != NULL; sec = sec->next)
{
for (i = 0; i < n_names; i++)
- if (!strcmp ((*sec)->name, names[i]))
+ if (!strcmp (sec->name, names[i]))
{
- secs[i] = *sec;
+ secs[i] = sec;
bfd_section_list_remove (stdoutput, sec);
break;
}
if (i == n_names)
{
- bfd_set_section_vma (stdoutput, *sec, addr);
- addr += bfd_section_size (stdoutput, *sec);
- sec = &(*sec)->next;
+ bfd_set_section_vma (stdoutput, sec, addr);
+ addr += bfd_section_size (stdoutput, sec);
}
}
for (i = 0; i < n_names; i++)
@@ -170,7 +103,7 @@ ecoff_frob_file_before_fix ()
}
for (i = n_names - 1; i >= 0; i--)
if (secs[i])
- bfd_section_list_insert (stdoutput, &stdoutput->sections, secs[i]);
+ bfd_section_list_prepend (stdoutput, secs[i]);
/* Fill in the register masks. */
{
@@ -203,7 +136,7 @@ ecoff_frob_file_before_fix ()
/* Swap out the symbols and debugging information for BFD. */
void
-ecoff_frob_file ()
+ecoff_frob_file (void)
{
const struct ecoff_debug_swap * const debug_swap
= &ecoff_backend (stdoutput)->debug_swap;
@@ -221,7 +154,7 @@ ecoff_frob_file ()
set = buf;
#define SET(ptr, count, type, size) \
if (hdr->count == 0) \
- ecoff_data (stdoutput)->debug_info.ptr = (type) NULL; \
+ ecoff_data (stdoutput)->debug_info.ptr = NULL; \
else \
{ \
ecoff_data (stdoutput)->debug_info.ptr = (type) set; \
@@ -229,16 +162,16 @@ ecoff_frob_file ()
}
SET (line, cbLine, unsigned char *, sizeof (unsigned char));
- SET (external_dnr, idnMax, PTR, debug_swap->external_dnr_size);
- SET (external_pdr, ipdMax, PTR, debug_swap->external_pdr_size);
- SET (external_sym, isymMax, PTR, debug_swap->external_sym_size);
- SET (external_opt, ioptMax, PTR, debug_swap->external_opt_size);
+ SET (external_dnr, idnMax, void *, debug_swap->external_dnr_size);
+ SET (external_pdr, ipdMax, void *, debug_swap->external_pdr_size);
+ SET (external_sym, isymMax, void *, debug_swap->external_sym_size);
+ SET (external_opt, ioptMax, void *, debug_swap->external_opt_size);
SET (external_aux, iauxMax, union aux_ext *, sizeof (union aux_ext));
SET (ss, issMax, char *, sizeof (char));
SET (ssext, issExtMax, char *, sizeof (char));
- SET (external_rfd, crfd, PTR, debug_swap->external_rfd_size);
- SET (external_fdr, ifdMax, PTR, debug_swap->external_fdr_size);
- SET (external_ext, iextMax, PTR, debug_swap->external_ext_size);
+ SET (external_rfd, crfd, void *, debug_swap->external_rfd_size);
+ SET (external_fdr, ifdMax, void *, debug_swap->external_fdr_size);
+ SET (external_ext, iextMax, void *, debug_swap->external_ext_size);
#undef SET
}
@@ -247,9 +180,7 @@ ecoff_frob_file ()
information to be stored in the native field of the symbol. */
void
-obj_ecoff_set_ext (sym, ext)
- symbolS *sym;
- EXTR *ext;
+obj_ecoff_set_ext (symbolS *sym, EXTR *ext)
{
const struct ecoff_debug_swap * const debug_swap
= &ecoff_backend (stdoutput)->debug_swap;
@@ -264,62 +195,121 @@ obj_ecoff_set_ext (sym, ext)
}
static int
-ecoff_sec_sym_ok_for_reloc (sec)
- asection *sec ATTRIBUTE_UNUSED;
+ecoff_sec_sym_ok_for_reloc (asection *sec ATTRIBUTE_UNUSED)
{
return 1;
}
static void
-obj_ecoff_frob_symbol (sym, puntp)
- symbolS *sym;
- int *puntp ATTRIBUTE_UNUSED;
+obj_ecoff_frob_symbol (symbolS *sym, int *puntp ATTRIBUTE_UNUSED)
{
ecoff_frob_symbol (sym);
}
static void
-ecoff_pop_insert ()
+ecoff_pop_insert (void)
{
pop_insert (obj_pseudo_table);
}
static int
-ecoff_separate_stab_sections ()
+ecoff_separate_stab_sections (void)
{
return 0;
}
+/* These are the pseudo-ops we support in this file. Only those
+ relating to debugging information are supported here.
+
+ The following pseudo-ops from the Kane and Heinrich MIPS book
+ should be defined here, but are currently unsupported: .aent,
+ .bgnb, .endb, .verstamp, .vreg.
+
+ The following pseudo-ops from the Kane and Heinrich MIPS book are
+ MIPS CPU specific, and should be defined by tc-mips.c: .alias,
+ .extern, .galive, .gjaldef, .gjrlive, .livereg, .noalias, .option,
+ .rdata, .sdata, .set.
+
+ The following pseudo-ops from the Kane and Heinrich MIPS book are
+ not MIPS CPU specific, but are also not ECOFF specific. I have
+ only listed the ones which are not already in read.c. It's not
+ completely clear where these should be defined, but tc-mips.c is
+ probably the most reasonable place: .asciiz, .asm0, .endr, .err,
+ .half, .lab, .repeat, .struct, .weakext. */
+
+const pseudo_typeS obj_pseudo_table[] =
+{
+ /* COFF style debugging information. .ln is not used; .loc is used
+ instead. */
+ { "def", ecoff_directive_def, 0 },
+ { "dim", ecoff_directive_dim, 0 },
+ { "endef", ecoff_directive_endef, 0 },
+ { "file", ecoff_directive_file, 0 },
+ { "scl", ecoff_directive_scl, 0 },
+ { "size", ecoff_directive_size, 0 },
+ { "esize", ecoff_directive_size, 0 },
+ { "tag", ecoff_directive_tag, 0 },
+ { "type", ecoff_directive_type, 0 },
+ { "etype", ecoff_directive_type, 0 },
+ { "val", ecoff_directive_val, 0 },
+
+ /* ECOFF specific debugging information. */
+ { "begin", ecoff_directive_begin, 0 },
+ { "bend", ecoff_directive_bend, 0 },
+ { "end", ecoff_directive_end, 0 },
+ { "ent", ecoff_directive_ent, 0 },
+ { "fmask", ecoff_directive_fmask, 0 },
+ { "frame", ecoff_directive_frame, 0 },
+ { "loc", ecoff_directive_loc, 0 },
+ { "mask", ecoff_directive_mask, 0 },
+
+ /* Other ECOFF directives. */
+ { "extern", ecoff_directive_extern, 0 },
+
+#ifndef TC_MIPS
+ /* For TC_MIPS, tc-mips.c adds this. */
+ { "weakext", ecoff_directive_weakext, 0 },
+#endif
+
+ /* These are used on Irix. I don't know how to implement them. */
+ { "bgnb", s_ignore, 0 },
+ { "endb", s_ignore, 0 },
+ { "verstamp", s_ignore, 0 },
+
+ /* Sentinel. */
+ { NULL, s_ignore, 0 }
+};
+
const struct format_ops ecoff_format_ops =
{
bfd_target_ecoff_flavour,
- 0, /* dfl_leading_underscore */
+ 0, /* dfl_leading_underscore. */
/* FIXME: A comment why emit_section_symbols is different here (1) from
the single-format definition (0) would be in order. */
- 1, /* emit_section_symbols */
- 0, /* begin */
+ 1, /* emit_section_symbols. */
+ 0, /* begin. */
ecoff_new_file,
obj_ecoff_frob_symbol,
ecoff_frob_file,
- 0, /* frob_file_before_adjust */
+ 0, /* frob_file_before_adjust. */
ecoff_frob_file_before_fix,
- 0, /* frob_file_after_relocs */
- 0, /* s_get_size */
- 0, /* s_set_size */
- 0, /* s_get_align */
- 0, /* s_set_align */
- 0, /* s_get_other */
- 0, /* s_set_other */
- 0, /* s_get_desc */
- 0, /* s_set_desc */
- 0, /* s_get_type */
- 0, /* s_set_type */
- 0, /* copy_symbol_attributes */
+ 0, /* frob_file_after_relocs. */
+ 0, /* s_get_size. */
+ 0, /* s_set_size. */
+ 0, /* s_get_align. */
+ 0, /* s_set_align. */
+ 0, /* s_get_other. */
+ 0, /* s_set_other. */
+ 0, /* s_get_desc. */
+ 0, /* s_set_desc. */
+ 0, /* s_get_type. */
+ 0, /* s_set_type. */
+ 0, /* copy_symbol_attributes. */
ecoff_generate_asm_lineno,
ecoff_stab,
ecoff_separate_stab_sections,
- 0, /* init_stab_section */
+ 0, /* init_stab_section. */
ecoff_sec_sym_ok_for_reloc,
ecoff_pop_insert,
ecoff_set_ext,
diff --git a/contrib/binutils/gas/config/obj-ecoff.h b/contrib/binutils/gas/config/obj-ecoff.h
index 54ee0438db39..fdec4bc14280 100644
--- a/contrib/binutils/gas/config/obj-ecoff.h
+++ b/contrib/binutils/gas/config/obj-ecoff.h
@@ -1,5 +1,5 @@
/* ECOFF object file format header file.
- Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002, 2004, 2005
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define OBJ_ECOFF 1
@@ -50,12 +50,10 @@ struct ecoff_sy_obj
#define obj_frob_symbol(symp, punt) ecoff_frob_symbol (symp)
/* Set section VMAs and GP. */
-extern void ecoff_frob_file_before_fix PARAMS ((void));
#define obj_frob_file_before_fix() ecoff_frob_file_before_fix ()
/* This is used to write the symbolic data in the format that BFD
expects it. */
-extern void ecoff_frob_file PARAMS ((void));
#define obj_frob_file() ecoff_frob_file ()
/* We use the ECOFF functions as our hooks. */
@@ -63,7 +61,7 @@ extern void ecoff_frob_file PARAMS ((void));
#define obj_symbol_new_hook ecoff_symbol_new_hook
/* Record file switches in the ECOFF symbol table. */
-#define obj_app_file(name) ecoff_new_file (name)
+#define obj_app_file(name, app) ecoff_new_file (name, app)
/* At the moment we don't want to do any stabs processing in read.c. */
#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \
@@ -73,4 +71,7 @@ extern void ecoff_frob_file PARAMS ((void));
#define obj_sec_sym_ok_for_reloc(SEC) 1
#define obj_ecoff_set_ext ecoff_set_ext
-extern void obj_ecoff_set_ext PARAMS ((symbolS *, EXTR *));
+
+extern void ecoff_frob_file_before_fix (void);
+extern void ecoff_frob_file (void);
+extern void obj_ecoff_set_ext (symbolS *, EXTR *);
diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c
index 14d48f2ee74d..f922149cae0d 100644
--- a/contrib/binutils/gas/config/obj-elf.c
+++ b/contrib/binutils/gas/config/obj-elf.c
@@ -1,6 +1,6 @@
/* ELF object file format
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define OBJ_HEADER "obj-elf.h"
#include "as.h"
@@ -53,6 +53,10 @@
#include "elf/i370.h"
#endif
+#ifdef TC_I386
+#include "elf/x86-64.h"
+#endif
+
static void obj_elf_line (int);
static void obj_elf_size (int);
static void obj_elf_type (int);
@@ -65,6 +69,7 @@ static void obj_elf_subsection (int);
static void obj_elf_popsection (int);
static void obj_elf_tls_common (int);
static void obj_elf_lcomm (int);
+static void obj_elf_struct (int);
static const pseudo_typeS elf_pseudo_table[] =
{
@@ -110,9 +115,12 @@ static const pseudo_typeS elf_pseudo_table[] =
/* 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 },
/* We need to trap the section changing calls to handle .previous. */
{"data", obj_elf_data, 0},
+ {"offset", obj_elf_struct, 0},
+ {"struct", obj_elf_struct, 0},
{"text", obj_elf_text, 0},
{"tls_common", obj_elf_tls_common, 0},
@@ -171,6 +179,8 @@ static const pseudo_typeS ecoff_debug_pseudo_table[] =
/* This is called when the assembler starts. */
+asection *elf_com_section_ptr;
+
void
elf_begin (void)
{
@@ -183,6 +193,7 @@ elf_begin (void)
symbol_table_insert (section_symbol (s));
s = bfd_get_section_by_name (stdoutput, BSS_SECTION_NAME);
symbol_table_insert (section_symbol (s));
+ elf_com_section_ptr = bfd_com_section_ptr;
}
void
@@ -236,32 +247,38 @@ elf_sec_sym_ok_for_reloc (asection *sec)
}
void
-elf_file_symbol (const char *s)
+elf_file_symbol (const char *s, int appfile)
{
- symbolS *sym;
+ if (!appfile
+ || symbol_rootP == NULL
+ || symbol_rootP->bsym == NULL
+ || (symbol_rootP->bsym->flags & BSF_FILE) == 0)
+ {
+ symbolS *sym;
- sym = symbol_new (s, absolute_section, 0, NULL);
- symbol_set_frag (sym, &zero_address_frag);
- symbol_get_bfdsym (sym)->flags |= BSF_FILE;
+ sym = symbol_new (s, absolute_section, 0, NULL);
+ symbol_set_frag (sym, &zero_address_frag);
+ symbol_get_bfdsym (sym)->flags |= BSF_FILE;
- if (symbol_rootP != sym)
- {
- symbol_remove (sym, &symbol_rootP, &symbol_lastP);
- symbol_insert (sym, symbol_rootP, &symbol_rootP, &symbol_lastP);
+ if (symbol_rootP != sym)
+ {
+ symbol_remove (sym, &symbol_rootP, &symbol_lastP);
+ symbol_insert (sym, symbol_rootP, &symbol_rootP, &symbol_lastP);
#ifdef DEBUG
- verify_symbol_chain (symbol_rootP, symbol_lastP);
+ verify_symbol_chain (symbol_rootP, symbol_lastP);
#endif
+ }
}
#ifdef NEED_ECOFF_DEBUG
- ecoff_new_file (s);
+ ecoff_new_file (s, appfile);
#endif
}
/* Called from read.c:s_comm after we've parsed .comm symbol, size.
Parse a possible alignment value. */
-static symbolS *
+symbolS *
elf_common_parse (int ignore ATTRIBUTE_UNUSED, symbolS *symbolP, addressT size)
{
addressT align = 0;
@@ -325,7 +342,7 @@ elf_common_parse (int ignore ATTRIBUTE_UNUSED, symbolS *symbolP, addressT size)
S_SET_VALUE (symbolP, size);
S_SET_ALIGN (symbolP, align);
S_SET_EXTERNAL (symbolP);
- S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
+ S_SET_SEGMENT (symbolP, elf_com_section_ptr);
}
symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT;
@@ -469,6 +486,18 @@ struct section_stack
static struct section_stack *section_stack;
+static bfd_boolean
+get_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *inf)
+{
+ const char *gname = inf;
+ const char *group_name = elf_group_name (sec);
+
+ return (group_name == gname
+ || (group_name != NULL
+ && gname != NULL
+ && strcmp (group_name, gname) == 0));
+}
+
/* Handle the .section pseudo-op. This code supports two different
syntaxes.
@@ -499,6 +528,7 @@ obj_elf_change_section (const char *name,
asection *old_sec;
segT sec;
flagword flags;
+ const struct elf_backend_data *bed;
const struct bfd_elf_special_section *ssect;
#ifdef md_flush_pending_output
@@ -520,9 +550,18 @@ obj_elf_change_section (const char *name,
previous_section = now_seg;
previous_subsection = now_subseg;
- old_sec = bfd_get_section_by_name (stdoutput, name);
- sec = subseg_new (name, 0);
- ssect = _bfd_elf_get_sec_type_attr (stdoutput, name);
+ old_sec = bfd_get_section_by_name_if (stdoutput, name, get_section,
+ (void *) group_name);
+ if (old_sec)
+ {
+ sec = old_sec;
+ subseg_set (sec, 0);
+ }
+ else
+ sec = subseg_force_new (name, 0);
+
+ bed = get_elf_backend_data (stdoutput);
+ ssect = (*bed->get_sec_type_attr) (stdoutput, sec);
if (ssect != NULL)
{
@@ -538,7 +577,16 @@ obj_elf_change_section (const char *name,
.section .init_array,"aw",@progbits
for __attribute__ ((section (".init_array"))).
+ "@progbits" is incorrect. Also for x86-64 large bss
+ sections, gcc, as of 2005-07-06, will emit
+
+ .section .lbss,"aw",@progbits
+
"@progbits" is incorrect. */
+#ifdef TC_I386
+ && (bed->s->arch_size != 64
+ || !(ssect->attr & SHF_X86_64_LARGE))
+#endif
&& ssect->type != SHT_INIT_ARRAY
&& ssect->type != SHT_FINI_ARRAY
&& ssect->type != SHT_PREINIT_ARRAY)
@@ -580,10 +628,15 @@ obj_elf_change_section (const char *name,
|| strcmp (name, ".strtab") == 0
|| strcmp (name, ".symtab") == 0))
override = TRUE;
+ /* .note.GNU-stack can have SHF_EXECINSTR. */
+ else if (attr == SHF_EXECINSTR
+ && strcmp (name, ".note.GNU-stack") == 0)
+ override = TRUE;
else
{
- as_warn (_("setting incorrect section attributes for %s"),
- name);
+ if (group_name == NULL)
+ as_warn (_("setting incorrect section attributes for %s"),
+ name);
override = TRUE;
}
}
@@ -591,11 +644,6 @@ obj_elf_change_section (const char *name,
attr |= ssect->attr;
}
- if (type != SHT_NULL)
- elf_section_type (sec) = type;
- if (attr != 0)
- elf_section_flags (sec) = attr;
-
/* Convert ELF type and flags to BFD flags. */
flags = (SEC_RELOC
| ((attr & SHF_WRITE) ? 0 : SEC_READONLY)
@@ -609,16 +657,20 @@ obj_elf_change_section (const char *name,
flags = md_elf_section_flags (flags, attr, type);
#endif
+ if (linkonce)
+ flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
+
if (old_sec == NULL)
{
symbolS *secsym;
+ elf_section_type (sec) = type;
+ elf_section_flags (sec) = attr;
+
/* Prevent SEC_HAS_CONTENTS from being inadvertently set. */
if (type == SHT_NOBITS)
seg_info (sec)->bss = 1;
- if (linkonce)
- flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
bfd_set_section_flags (stdoutput, sec, flags);
if (flags & SEC_MERGE)
sec->entsize = entsize;
@@ -631,22 +683,26 @@ obj_elf_change_section (const char *name,
else
symbol_table_insert (section_symbol (sec));
}
- else if (attr != 0)
+ else
{
- /* If section attributes are specified the second time we see a
- particular section, then check that they are the same as we
- saw the first time. */
- if (((old_sec->flags ^ flags)
- & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_EXCLUDE | SEC_SORT_ENTRIES | SEC_MERGE | SEC_STRINGS
- | SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD
- | SEC_THREAD_LOCAL)))
- as_warn (_("ignoring changed section attributes for %s"), name);
- if ((flags & SEC_MERGE) && old_sec->entsize != (unsigned) entsize)
- as_warn (_("ignoring changed section entity size for %s"), name);
- if ((attr & SHF_GROUP) != 0
- && strcmp (elf_group_name (old_sec), group_name) != 0)
- as_warn (_("ignoring new section group for %s"), name);
+ if (type != SHT_NULL
+ && (unsigned) type != elf_section_type (old_sec))
+ as_warn (_("ignoring changed section type for %s"), name);
+
+ if (attr != 0)
+ {
+ /* If section attributes are specified the second time we see a
+ particular section, then check that they are the same as we
+ saw the first time. */
+ if (((old_sec->flags ^ flags)
+ & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+ | SEC_EXCLUDE | SEC_SORT_ENTRIES | SEC_MERGE | SEC_STRINGS
+ | SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD
+ | SEC_THREAD_LOCAL)))
+ as_warn (_("ignoring changed section attributes for %s"), name);
+ if ((flags & SEC_MERGE) && old_sec->entsize != (unsigned) entsize)
+ as_warn (_("ignoring changed section entity size for %s"), name);
+ }
}
#ifdef md_elf_section_change_hook
@@ -748,6 +804,12 @@ obj_elf_section_type (char *str, size_t len)
return SHT_NOBITS;
if (len == 4 && strncmp (str, "note", 4) == 0)
return SHT_NOTE;
+ if (len == 10 && strncmp (str, "init_array", 10) == 0)
+ return SHT_INIT_ARRAY;
+ if (len == 10 && strncmp (str, "fini_array", 10) == 0)
+ return SHT_FINI_ARRAY;
+ if (len == 13 && strncmp (str, "preinit_array", 13) == 0)
+ return SHT_PREINIT_ARRAY;
#ifdef md_elf_section_type
{
@@ -996,6 +1058,24 @@ obj_elf_text (int i)
#endif
}
+/* Change to the *ABS* section. */
+
+void
+obj_elf_struct (int i)
+{
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
+ previous_section = now_seg;
+ previous_subsection = now_subseg;
+ s_struct (i);
+
+#ifdef md_elf_section_change_hook
+ md_elf_section_change_hook ();
+#endif
+}
+
static void
obj_elf_subsection (int ignore ATTRIBUTE_UNUSED)
{
@@ -1775,17 +1855,6 @@ elf_frob_symbol (symbolS *symp, int *puntp)
&& (symbol_get_bfdsym (symp)->flags & BSF_FUNCTION) == 0)
symbol_get_bfdsym (symp)->flags |= BSF_OBJECT;
#endif
-
-#if 0 /* TC_PPC */
- /* If TC_PPC is defined, we used to force the type of a symbol to be
- BSF_OBJECT if it was otherwise unset. This was required by some
- version of VxWorks. Thomas de Lellis <tdel@windriver.com> says
- that this is no longer needed, so it is now commented out. */
- if ((symbol_get_bfdsym (symp)->flags
- & (BSF_FUNCTION | BSF_FILE | BSF_SECTION_SYM)) == 0
- && S_IS_DEFINED (symp))
- symbol_get_bfdsym (symp)->flags |= BSF_OBJECT;
-#endif
}
struct group_list
@@ -1864,6 +1933,7 @@ elf_frob_file (void)
flagword flags;
struct symbol *sy;
int has_sym;
+ bfd_size_type size;
flags = SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_GROUP;
for (s = list.head[i]; s != NULL; s = elf_next_in_group (s))
@@ -1904,8 +1974,9 @@ elf_frob_file (void)
if (has_sym)
elf_group_id (s) = sy->bsym;
- s->_raw_size = 4 * (list.elt_count[i] + 1);
- s->contents = frag_more (s->_raw_size);
+ size = 4 * (list.elt_count[i] + 1);
+ bfd_set_section_size (stdoutput, s, size);
+ s->contents = (unsigned char *) frag_more (size);
frag_now->fr_fix = frag_now_fix_octets ();
}
@@ -2014,7 +2085,8 @@ elf_frob_file_after_relocs (void)
to force the ELF backend to allocate a file position, and then
write out the data. FIXME: Is this really the best way to do
this? */
- sec->_raw_size = bfd_ecoff_debug_size (stdoutput, &debug, debug_swap);
+ bfd_set_section_size
+ (stdoutput, sec, bfd_ecoff_debug_size (stdoutput, &debug, debug_swap));
/* Pass BUF to bfd_set_section_contents because this will
eventually become a call to fwrite, and ISO C prohibits
diff --git a/contrib/binutils/gas/config/obj-elf.h b/contrib/binutils/gas/config/obj-elf.h
index e71379721a26..7ff9ef09aa3c 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 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* HP PA-RISC support was contributed by the Center for Software Science
at the University of Utah. */
@@ -156,10 +156,17 @@ extern void elf_frob_file_before_adjust (void);
#endif
extern void elf_frob_file_after_relocs (void);
+/* If the target doesn't have special processing for labels, take care of
+ dwarf2 output at the object file level. */
+#ifndef tc_frob_label
+#include "dwarf2dbg.h"
+#define obj_frob_label dwarf2_emit_label
+#endif
+
#ifndef obj_app_file
#define obj_app_file elf_file_symbol
#endif
-extern void elf_file_symbol (const char *);
+extern void elf_file_symbol (const char *, int);
extern void obj_elf_section_change_hook (void);
@@ -241,10 +248,11 @@ extern void elf_pop_insert (void);
#ifndef OBJ_MAYBE_ELF
#define obj_ecoff_set_ext elf_ecoff_set_ext
-#ifdef ANSI_PROTOTYPES
struct ecoff_extr;
-#endif
extern void elf_ecoff_set_ext (symbolS *, struct ecoff_extr *);
#endif
+extern asection *elf_com_section_ptr;
+extern symbolS * elf_common_parse (int ignore ATTRIBUTE_UNUSED, symbolS *symbolP,
+ addressT size);
#endif /* _OBJ_ELF_H */
diff --git a/contrib/binutils/gas/config/obj-ieee.c b/contrib/binutils/gas/config/obj-ieee.c
index 02f43393d688..bac46757c131 100644
--- a/contrib/binutils/gas/config/obj-ieee.c
+++ b/contrib/binutils/gas/config/obj-ieee.c
@@ -1,5 +1,5 @@
/* obj-format for ieee-695 records.
- Copyright 1991, 1992, 1993, 1994, 1997, 2000
+ Copyright 1991, 1992, 1993, 1994, 1997, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Created by Steve Chamberlain <steve@cygnus.com>. */
@@ -209,12 +209,6 @@ do_relocs_for (idx)
reloc_ptr_vector[i] = to;
to->howto = (reloc_howto_type *) (from->fx_r_type);
-#if 0
- /* We can't represent complicated things in a reloc yet. */
- if (from->fx_addsy == 0 || from->fx_subsy != 0)
- abort ();
-#endif
-
s = &(from->fx_addsy->sy_symbol.sy);
to->address = ((char *) (from->fx_frag->fr_address +
from->fx_where))
@@ -561,21 +555,7 @@ write_object_file ()
fragS **prev_frag_ptr_ptr;
struct frchain *next_frchain_ptr;
-#if 0
- struct frag **head_ptr = segment_info[i].frag_root;
-#endif
-
segment_info[i].frag_root = segment_info[i].frchainP->frch_root;
-#if 0
- /* I'm not sure what this is for. */
- for (frchain_ptr = segment_info[i].frchainP->frch_root;
- frchain_ptr != (struct frchain *) NULL;
- frchain_ptr = frchain_ptr->frch_next)
- {
- *head_ptr = frchain_ptr;
- head_ptr = &frchain_ptr->next;
- }
-#endif
}
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
diff --git a/contrib/binutils/gas/config/obj-ieee.h b/contrib/binutils/gas/config/obj-ieee.h
index c0bd628a5443..29654296e83f 100644
--- a/contrib/binutils/gas/config/obj-ieee.h
+++ b/contrib/binutils/gas/config/obj-ieee.h
@@ -16,10 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#define BFD 1
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
@@ -43,8 +41,6 @@ typedef struct
}
object_headers;
-#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE 1
-
int lineno_rootP;
#define IEEE_STYLE
diff --git a/contrib/binutils/gas/config/obj-multi.h b/contrib/binutils/gas/config/obj-multi.h
index 37d9fe828b4a..70faf103be7f 100644
--- a/contrib/binutils/gas/config/obj-multi.h
+++ b/contrib/binutils/gas/config/obj-multi.h
@@ -1,5 +1,5 @@
/* Multiple object format emulation.
- Copyright 1995, 1996, 1997, 1999, 2000, 2002
+ Copyright 1995, 1996, 1997, 1999, 2000, 2002, 2004
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef _OBJ_MULTI_H
#define _OBJ_MULTI_H
@@ -37,9 +37,9 @@
? (*this_format->begin) () \
: (void) 0)
-#define obj_app_file(NAME) \
+#define obj_app_file(NAME, APPFILE) \
(this_format->app_file \
- ? (*this_format->app_file) (NAME) \
+ ? (*this_format->app_file) (NAME, APPFILE) \
: (void) 0)
#define obj_frob_symbol(S,P) \
@@ -146,6 +146,8 @@
#define EMIT_SECTION_SYMBOLS (this_format->emit_section_symbols)
+#define FAKE_LABEL_NAME (this_emulation->fake_label_name)
+
#ifdef OBJ_MAYBE_ELF
/* We need OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined in symbol.c
We also need various STAB defines for stab.c */
diff --git a/contrib/binutils/gas/config/tc-alpha.c b/contrib/binutils/gas/config/tc-alpha.c
index 93600473ffcf..3765b08c73a5 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 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 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.
@@ -21,34 +21,32 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-/*
- * Mach Operating System
- * Copyright (c) 1993 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Mach Operating System
+ Copyright (c) 1993 Carnegie Mellon University
+ All Rights Reserved.
+
+ Permission to use, copy, modify and distribute this software and its
+ documentation is hereby granted, provided that both the copyright
+ notice and this permission notice appear in all copies of the
+ software, derivative works or modified versions, and any portions
+ thereof, and that both notices appear in supporting documentation.
+
+ CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+
+ Carnegie Mellon requests users of this software to return to
+
+ Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ School of Computer Science
+ Carnegie Mellon University
+ Pittsburgh PA 15213-3890
+
+ any improvements or extensions that they make and grant Carnegie the
+ rights to redistribute these changes. */
#include "as.h"
#include "subsegs.h"
@@ -60,18 +58,17 @@
#ifdef OBJ_ELF
#include "elf/alpha.h"
#include "dwarf2dbg.h"
-#include "dw2gencfi.h"
#endif
+#include "dw2gencfi.h"
#include "safe-ctype.h"
/* Local types. */
-#define TOKENIZE_ERROR -1
-#define TOKENIZE_ERROR_REPORT -2
-
-#define MAX_INSN_FIXUPS 2
-#define MAX_INSN_ARGS 5
+#define TOKENIZE_ERROR -1
+#define TOKENIZE_ERROR_REPORT -2
+#define MAX_INSN_FIXUPS 2
+#define MAX_INSN_ARGS 5
struct alpha_fixup
{
@@ -101,39 +98,40 @@ enum alpha_macro_arg
struct alpha_macro
{
const char *name;
- void (*emit) PARAMS ((const expressionS *, int, const PTR));
- const PTR arg;
+ void (*emit) (const expressionS *, int, const void *);
+ const void * arg;
enum alpha_macro_arg argsets[16];
};
/* Extra expression types. */
-#define O_pregister O_md1 /* O_register, in parentheses */
-#define O_cpregister O_md2 /* + a leading comma */
+#define O_pregister O_md1 /* O_register, in parentheses. */
+#define O_cpregister O_md2 /* + a leading comma. */
/* The alpha_reloc_op table below depends on the ordering of these. */
-#define O_literal O_md3 /* !literal relocation */
-#define O_lituse_addr O_md4 /* !lituse_addr relocation */
-#define O_lituse_base O_md5 /* !lituse_base relocation */
-#define O_lituse_bytoff O_md6 /* !lituse_bytoff relocation */
-#define O_lituse_jsr O_md7 /* !lituse_jsr relocation */
-#define O_lituse_tlsgd O_md8 /* !lituse_tlsgd relocation */
-#define O_lituse_tlsldm O_md9 /* !lituse_tlsldm relocation */
-#define O_gpdisp O_md10 /* !gpdisp relocation */
-#define O_gprelhigh O_md11 /* !gprelhigh relocation */
-#define O_gprellow O_md12 /* !gprellow relocation */
-#define O_gprel O_md13 /* !gprel relocation */
-#define O_samegp O_md14 /* !samegp relocation */
-#define O_tlsgd O_md15 /* !tlsgd relocation */
-#define O_tlsldm O_md16 /* !tlsldm relocation */
-#define O_gotdtprel O_md17 /* !gotdtprel relocation */
-#define O_dtprelhi O_md18 /* !dtprelhi relocation */
-#define O_dtprello O_md19 /* !dtprello relocation */
-#define O_dtprel O_md20 /* !dtprel relocation */
-#define O_gottprel O_md21 /* !gottprel relocation */
-#define O_tprelhi O_md22 /* !tprelhi relocation */
-#define O_tprello O_md23 /* !tprello relocation */
-#define O_tprel O_md24 /* !tprel relocation */
+#define O_literal O_md3 /* !literal relocation. */
+#define O_lituse_addr O_md4 /* !lituse_addr relocation. */
+#define O_lituse_base O_md5 /* !lituse_base relocation. */
+#define O_lituse_bytoff O_md6 /* !lituse_bytoff relocation. */
+#define O_lituse_jsr O_md7 /* !lituse_jsr relocation. */
+#define O_lituse_tlsgd O_md8 /* !lituse_tlsgd relocation. */
+#define O_lituse_tlsldm O_md9 /* !lituse_tlsldm relocation. */
+#define O_lituse_jsrdirect O_md10 /* !lituse_jsrdirect relocation. */
+#define O_gpdisp O_md11 /* !gpdisp relocation. */
+#define O_gprelhigh O_md12 /* !gprelhigh relocation. */
+#define O_gprellow O_md13 /* !gprellow relocation. */
+#define O_gprel O_md14 /* !gprel relocation. */
+#define O_samegp O_md15 /* !samegp relocation. */
+#define O_tlsgd O_md16 /* !tlsgd relocation. */
+#define O_tlsldm O_md17 /* !tlsldm relocation. */
+#define O_gotdtprel O_md18 /* !gotdtprel relocation. */
+#define O_dtprelhi O_md19 /* !dtprelhi relocation. */
+#define O_dtprello O_md20 /* !dtprello relocation. */
+#define O_dtprel O_md21 /* !dtprel relocation. */
+#define O_gottprel O_md22 /* !gottprel relocation. */
+#define O_tprelhi O_md23 /* !tprelhi relocation. */
+#define O_tprello O_md24 /* !tprello relocation. */
+#define O_tprel O_md25 /* !tprel relocation. */
#define DUMMY_RELOC_LITUSE_ADDR (BFD_RELOC_UNUSED + 1)
#define DUMMY_RELOC_LITUSE_BASE (BFD_RELOC_UNUSED + 2)
@@ -141,6 +139,7 @@ struct alpha_macro
#define DUMMY_RELOC_LITUSE_JSR (BFD_RELOC_UNUSED + 4)
#define DUMMY_RELOC_LITUSE_TLSGD (BFD_RELOC_UNUSED + 5)
#define DUMMY_RELOC_LITUSE_TLSLDM (BFD_RELOC_UNUSED + 6)
+#define DUMMY_RELOC_LITUSE_JSRDIRECT (BFD_RELOC_UNUSED + 7)
#define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_tprel)
@@ -206,89 +205,6 @@ struct alpha_macro
(t).X_op = O_constant, \
(t).X_add_number = (n))
-/* Prototypes for all local functions. */
-
-static struct alpha_reloc_tag *get_alpha_reloc_tag PARAMS ((long));
-static void alpha_adjust_relocs PARAMS ((bfd *, asection *, PTR));
-
-static int tokenize_arguments PARAMS ((char *, expressionS *, int));
-static const struct alpha_opcode *find_opcode_match
- PARAMS ((const struct alpha_opcode *, const expressionS *, int *, int *));
-static const struct alpha_macro *find_macro_match
- PARAMS ((const struct alpha_macro *, const expressionS *, int *));
-static unsigned insert_operand
- PARAMS ((unsigned, const struct alpha_operand *, offsetT, char *, unsigned));
-static void assemble_insn
- PARAMS ((const struct alpha_opcode *, const expressionS *, int,
- struct alpha_insn *, bfd_reloc_code_real_type));
-static void emit_insn PARAMS ((struct alpha_insn *));
-static void assemble_tokens_to_insn
- PARAMS ((const char *, const expressionS *, int, struct alpha_insn *));
-static void assemble_tokens
- PARAMS ((const char *, const expressionS *, int, int));
-
-static long load_expression
- PARAMS ((int, const expressionS *, int *, expressionS *));
-
-static void emit_ldgp PARAMS ((const expressionS *, int, const PTR));
-static void emit_division PARAMS ((const expressionS *, int, const PTR));
-static void emit_lda PARAMS ((const expressionS *, int, const PTR));
-static void emit_ldah PARAMS ((const expressionS *, int, const PTR));
-static void emit_ir_load PARAMS ((const expressionS *, int, const PTR));
-static void emit_loadstore PARAMS ((const expressionS *, int, const PTR));
-static void emit_jsrjmp PARAMS ((const expressionS *, int, const PTR));
-static void emit_ldX PARAMS ((const expressionS *, int, const PTR));
-static void emit_ldXu PARAMS ((const expressionS *, int, const PTR));
-static void emit_uldX PARAMS ((const expressionS *, int, const PTR));
-static void emit_uldXu PARAMS ((const expressionS *, int, const PTR));
-static void emit_ldil PARAMS ((const expressionS *, int, const PTR));
-static void emit_stX PARAMS ((const expressionS *, int, const PTR));
-static void emit_ustX PARAMS ((const expressionS *, int, const PTR));
-static void emit_sextX PARAMS ((const expressionS *, int, const PTR));
-static void emit_retjcr PARAMS ((const expressionS *, int, const PTR));
-
-static void s_alpha_text PARAMS ((int));
-static void s_alpha_data PARAMS ((int));
-#ifndef OBJ_ELF
-static void s_alpha_comm PARAMS ((int));
-static void s_alpha_rdata PARAMS ((int));
-#endif
-#ifdef OBJ_ECOFF
-static void s_alpha_sdata PARAMS ((int));
-#endif
-#ifdef OBJ_ELF
-static void s_alpha_section PARAMS ((int));
-static void s_alpha_ent PARAMS ((int));
-static void s_alpha_end PARAMS ((int));
-static void s_alpha_mask PARAMS ((int));
-static void s_alpha_frame PARAMS ((int));
-static void s_alpha_prologue PARAMS ((int));
-static void s_alpha_file PARAMS ((int));
-static void s_alpha_loc PARAMS ((int));
-static void s_alpha_stab PARAMS ((int));
-static void s_alpha_coff_wrapper PARAMS ((int));
-static void s_alpha_usepv PARAMS ((int));
-#endif
-#ifdef OBJ_EVAX
-static void s_alpha_section PARAMS ((int));
-#endif
-static void s_alpha_gprel32 PARAMS ((int));
-static void s_alpha_float_cons PARAMS ((int));
-static void s_alpha_proc PARAMS ((int));
-static void s_alpha_set PARAMS ((int));
-static void s_alpha_base PARAMS ((int));
-static void s_alpha_align PARAMS ((int));
-static void s_alpha_stringer PARAMS ((int));
-static void s_alpha_space PARAMS ((int));
-static void s_alpha_ucons PARAMS ((int));
-static void s_alpha_arch PARAMS ((int));
-
-static void create_literal_section PARAMS ((const char *, segT *, symbolS **));
-#ifndef OBJ_ELF
-static void select_gp_value PARAMS ((void));
-#endif
-static void alpha_align PARAMS ((int, char *, symbolS *, int));
-
/* Generic assembler global variables which must be defined by all
targets. */
@@ -308,12 +224,8 @@ const char EXP_CHARS[] = "eE";
/* Characters which mean that a number is a floating point constant,
as in 0d1.0. */
-#if 0
-const char FLT_CHARS[] = "dD";
-#else
/* XXX: Do all of these really get used on the alpha?? */
char FLT_CHARS[] = "rRsSfFdDxXpP";
-#endif
#ifdef OBJ_EVAX
const char *md_shortopts = "Fm:g+1h:HG:";
@@ -454,11 +366,12 @@ static int g_switch_value = 8;
#ifdef OBJ_EVAX
/* Collect information about current procedure here. */
-static struct {
- symbolS *symbol; /* proc pdesc symbol */
+static struct
+{
+ symbolS *symbol; /* Proc pdesc symbol. */
int pdsckind;
- int framereg; /* register for frame pointer */
- int framesize; /* size of frame */
+ int framereg; /* Register for frame pointer. */
+ int framesize; /* Size of frame. */
int rsa_offset;
int ra_save;
int fp_save;
@@ -491,37 +404,38 @@ static int alpha_flag_show_after_trunc = 0; /* -H */
static const struct alpha_reloc_op_tag
{
- const char *name; /* string to lookup */
- size_t length; /* size of the string */
- operatorT op; /* which operator to use */
- bfd_reloc_code_real_type reloc; /* relocation before frob */
- unsigned int require_seq : 1; /* require a sequence number */
- unsigned int allow_seq : 1; /* allow a sequence number */
+ const char *name; /* String to lookup. */
+ size_t length; /* Size of the string. */
+ operatorT op; /* Which operator to use. */
+ bfd_reloc_code_real_type reloc; /* Relocation before frob. */
+ unsigned int require_seq : 1; /* Require a sequence number. */
+ unsigned int allow_seq : 1; /* Allow a sequence number. */
}
alpha_reloc_op[] =
{
- DEF(literal, BFD_RELOC_ALPHA_ELF_LITERAL, 0, 1),
- DEF(lituse_addr, DUMMY_RELOC_LITUSE_ADDR, 1, 1),
- DEF(lituse_base, DUMMY_RELOC_LITUSE_BASE, 1, 1),
- DEF(lituse_bytoff, DUMMY_RELOC_LITUSE_BYTOFF, 1, 1),
- DEF(lituse_jsr, DUMMY_RELOC_LITUSE_JSR, 1, 1),
- DEF(lituse_tlsgd, DUMMY_RELOC_LITUSE_TLSGD, 1, 1),
- DEF(lituse_tlsldm, DUMMY_RELOC_LITUSE_TLSLDM, 1, 1),
- DEF(gpdisp, BFD_RELOC_ALPHA_GPDISP, 1, 1),
- DEF(gprelhigh, BFD_RELOC_ALPHA_GPREL_HI16, 0, 0),
- DEF(gprellow, BFD_RELOC_ALPHA_GPREL_LO16, 0, 0),
- DEF(gprel, BFD_RELOC_GPREL16, 0, 0),
- DEF(samegp, BFD_RELOC_ALPHA_BRSGP, 0, 0),
- DEF(tlsgd, BFD_RELOC_ALPHA_TLSGD, 0, 1),
- DEF(tlsldm, BFD_RELOC_ALPHA_TLSLDM, 0, 1),
- DEF(gotdtprel, BFD_RELOC_ALPHA_GOTDTPREL16, 0, 0),
- DEF(dtprelhi, BFD_RELOC_ALPHA_DTPREL_HI16, 0, 0),
- DEF(dtprello, BFD_RELOC_ALPHA_DTPREL_LO16, 0, 0),
- DEF(dtprel, BFD_RELOC_ALPHA_DTPREL16, 0, 0),
- DEF(gottprel, BFD_RELOC_ALPHA_GOTTPREL16, 0, 0),
- DEF(tprelhi, BFD_RELOC_ALPHA_TPREL_HI16, 0, 0),
- DEF(tprello, BFD_RELOC_ALPHA_TPREL_LO16, 0, 0),
- DEF(tprel, BFD_RELOC_ALPHA_TPREL16, 0, 0),
+ DEF (literal, BFD_RELOC_ALPHA_ELF_LITERAL, 0, 1),
+ DEF (lituse_addr, DUMMY_RELOC_LITUSE_ADDR, 1, 1),
+ DEF (lituse_base, DUMMY_RELOC_LITUSE_BASE, 1, 1),
+ DEF (lituse_bytoff, DUMMY_RELOC_LITUSE_BYTOFF, 1, 1),
+ DEF (lituse_jsr, DUMMY_RELOC_LITUSE_JSR, 1, 1),
+ DEF (lituse_tlsgd, DUMMY_RELOC_LITUSE_TLSGD, 1, 1),
+ DEF (lituse_tlsldm, DUMMY_RELOC_LITUSE_TLSLDM, 1, 1),
+ DEF (lituse_jsrdirect, DUMMY_RELOC_LITUSE_JSRDIRECT, 1, 1),
+ DEF (gpdisp, BFD_RELOC_ALPHA_GPDISP, 1, 1),
+ DEF (gprelhigh, BFD_RELOC_ALPHA_GPREL_HI16, 0, 0),
+ DEF (gprellow, BFD_RELOC_ALPHA_GPREL_LO16, 0, 0),
+ DEF (gprel, BFD_RELOC_GPREL16, 0, 0),
+ DEF (samegp, BFD_RELOC_ALPHA_BRSGP, 0, 0),
+ DEF (tlsgd, BFD_RELOC_ALPHA_TLSGD, 0, 1),
+ DEF (tlsldm, BFD_RELOC_ALPHA_TLSLDM, 0, 1),
+ DEF (gotdtprel, BFD_RELOC_ALPHA_GOTDTPREL16, 0, 0),
+ DEF (dtprelhi, BFD_RELOC_ALPHA_DTPREL_HI16, 0, 0),
+ DEF (dtprello, BFD_RELOC_ALPHA_DTPREL_LO16, 0, 0),
+ DEF (dtprel, BFD_RELOC_ALPHA_DTPREL16, 0, 0),
+ DEF (gottprel, BFD_RELOC_ALPHA_GOTTPREL16, 0, 0),
+ DEF (tprelhi, BFD_RELOC_ALPHA_TPREL_HI16, 0, 0),
+ DEF (tprello, BFD_RELOC_ALPHA_TPREL_LO16, 0, 0),
+ DEF (tprel, BFD_RELOC_ALPHA_TPREL16, 0, 0),
};
#undef DEF
@@ -530,27 +444,27 @@ static const int alpha_num_reloc_op
= sizeof (alpha_reloc_op) / sizeof (*alpha_reloc_op);
#endif /* RELOC_OP_P */
-/* Maximum # digits needed to hold the largest sequence # */
+/* Maximum # digits needed to hold the largest sequence #. */
#define ALPHA_RELOC_DIGITS 25
/* Structure to hold explicit sequence information. */
struct alpha_reloc_tag
{
- fixS *master; /* the literal reloc */
- fixS *slaves; /* head of linked list of lituses */
- segT segment; /* segment relocs are in or undefined_section*/
- long sequence; /* sequence # */
- unsigned n_master; /* # of literals */
- unsigned n_slaves; /* # of lituses */
- unsigned saw_tlsgd : 1; /* true if ... */
+ fixS *master; /* The literal reloc. */
+ fixS *slaves; /* Head of linked list of lituses. */
+ segT segment; /* Segment relocs are in or undefined_section. */
+ long sequence; /* Sequence #. */
+ unsigned n_master; /* # of literals. */
+ unsigned n_slaves; /* # of lituses. */
+ unsigned saw_tlsgd : 1; /* True if ... */
unsigned saw_tlsldm : 1;
unsigned saw_lu_tlsgd : 1;
unsigned saw_lu_tlsldm : 1;
- unsigned multi_section_p : 1; /* true if more than one section was used */
- char string[1]; /* printable form of sequence to hash with */
+ unsigned multi_section_p : 1; /* True if more than one section was used. */
+ char string[1]; /* Printable form of sequence to hash with. */
};
-/* Hash table to link up literals with the appropriate lituse */
+/* Hash table to link up literals with the appropriate lituse. */
static struct hash_control *alpha_literal_hash;
/* Sequence numbers for internal use by macros. */
@@ -599,1075 +513,23 @@ cpu_types[] =
{ 0, 0 }
};
-/* The macro table */
-
-static const struct alpha_macro alpha_macros[] =
-{
-/* Load/Store macros */
- { "lda", emit_lda, NULL,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldah", emit_ldah, NULL,
- { MACRO_IR, MACRO_EXP, MACRO_EOA } },
-
- { "ldl", emit_ir_load, "ldl",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldl_l", emit_ir_load, "ldl_l",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldq", emit_ir_load, "ldq",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldq_l", emit_ir_load, "ldq_l",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldq_u", emit_ir_load, "ldq_u",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldf", emit_loadstore, "ldf",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldg", emit_loadstore, "ldg",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "lds", emit_loadstore, "lds",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldt", emit_loadstore, "ldt",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
-
- { "ldb", emit_ldX, (PTR) 0,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldbu", emit_ldXu, (PTR) 0,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldw", emit_ldX, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ldwu", emit_ldXu, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
-
- { "uldw", emit_uldX, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "uldwu", emit_uldXu, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "uldl", emit_uldX, (PTR) 2,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "uldlu", emit_uldXu, (PTR) 2,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "uldq", emit_uldXu, (PTR) 3,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
-
- { "ldgp", emit_ldgp, NULL,
- { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA } },
-
- { "ldi", emit_lda, NULL,
- { MACRO_IR, MACRO_EXP, MACRO_EOA } },
- { "ldil", emit_ldil, NULL,
- { MACRO_IR, MACRO_EXP, MACRO_EOA } },
- { "ldiq", emit_lda, NULL,
- { MACRO_IR, MACRO_EXP, MACRO_EOA } },
-#if 0
- { "ldif" emit_ldiq, NULL,
- { MACRO_FPR, MACRO_EXP, MACRO_EOA } },
- { "ldid" emit_ldiq, NULL,
- { MACRO_FPR, MACRO_EXP, MACRO_EOA } },
- { "ldig" emit_ldiq, NULL,
- { MACRO_FPR, MACRO_EXP, MACRO_EOA } },
- { "ldis" emit_ldiq, NULL,
- { MACRO_FPR, MACRO_EXP, MACRO_EOA } },
- { "ldit" emit_ldiq, NULL,
- { MACRO_FPR, MACRO_EXP, MACRO_EOA } },
-#endif
-
- { "stl", emit_loadstore, "stl",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "stl_c", emit_loadstore, "stl_c",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "stq", emit_loadstore, "stq",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "stq_c", emit_loadstore, "stq_c",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "stq_u", emit_loadstore, "stq_u",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "stf", emit_loadstore, "stf",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "stg", emit_loadstore, "stg",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "sts", emit_loadstore, "sts",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "stt", emit_loadstore, "stt",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
-
- { "stb", emit_stX, (PTR) 0,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "stw", emit_stX, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ustw", emit_ustX, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ustl", emit_ustX, (PTR) 2,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
- { "ustq", emit_ustX, (PTR) 3,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
-
-/* Arithmetic macros */
-#if 0
- { "absl" emit_absl, 1, { IR } },
- { "absl" emit_absl, 2, { IR, IR } },
- { "absl" emit_absl, 2, { EXP, IR } },
- { "absq" emit_absq, 1, { IR } },
- { "absq" emit_absq, 2, { IR, IR } },
- { "absq" emit_absq, 2, { EXP, IR } },
-#endif
-
- { "sextb", emit_sextX, (PTR) 0,
- { MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EOA,
- /* MACRO_EXP, MACRO_IR, MACRO_EOA */ } },
- { "sextw", emit_sextX, (PTR) 1,
- { MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EOA,
- /* MACRO_EXP, MACRO_IR, MACRO_EOA */ } },
-
- { "divl", emit_division, "__divl",
- { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_IR, MACRO_EOA,
- /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
- { "divlu", emit_division, "__divlu",
- { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_IR, MACRO_EOA,
- /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
- { "divq", emit_division, "__divq",
- { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_IR, MACRO_EOA,
- /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
- { "divqu", emit_division, "__divqu",
- { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_IR, MACRO_EOA,
- /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
- { "reml", emit_division, "__reml",
- { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_IR, MACRO_EOA,
- /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
- { "remlu", emit_division, "__remlu",
- { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_IR, MACRO_EOA,
- /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
- { "remq", emit_division, "__remq",
- { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_IR, MACRO_EOA,
- /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
- { "remqu", emit_division, "__remqu",
- { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_IR, MACRO_EOA,
- /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
-
- { "jsr", emit_jsrjmp, "jsr",
- { MACRO_PIR, MACRO_EXP, MACRO_EOA,
- MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA,
- MACRO_EXP, MACRO_EOA } },
- { "jmp", emit_jsrjmp, "jmp",
- { MACRO_PIR, MACRO_EXP, MACRO_EOA,
- MACRO_PIR, MACRO_EOA,
- MACRO_IR, MACRO_EXP, MACRO_EOA,
- MACRO_EXP, MACRO_EOA } },
- { "ret", emit_retjcr, "ret",
- { MACRO_IR, MACRO_EXP, MACRO_EOA,
- MACRO_IR, MACRO_EOA,
- MACRO_PIR, MACRO_EXP, MACRO_EOA,
- MACRO_PIR, MACRO_EOA,
- MACRO_EXP, MACRO_EOA,
- MACRO_EOA } },
- { "jcr", emit_retjcr, "jcr",
- { MACRO_IR, MACRO_EXP, MACRO_EOA,
- MACRO_IR, MACRO_EOA,
- MACRO_PIR, MACRO_EXP, MACRO_EOA,
- MACRO_PIR, MACRO_EOA,
- MACRO_EXP, MACRO_EOA,
- MACRO_EOA } },
- { "jsr_coroutine", emit_retjcr, "jcr",
- { MACRO_IR, MACRO_EXP, MACRO_EOA,
- MACRO_IR, MACRO_EOA,
- MACRO_PIR, MACRO_EXP, MACRO_EOA,
- MACRO_PIR, MACRO_EOA,
- MACRO_EXP, MACRO_EOA,
- MACRO_EOA } },
-};
-
-static const unsigned int alpha_num_macros
- = sizeof (alpha_macros) / sizeof (*alpha_macros);
-
-/* Public interface functions */
-
-/* This function is called once, at assembler startup time. It sets
- up all the tables, etc. that the MD part of the assembler will
- need, that can be determined before arguments are parsed. */
-
-void
-md_begin ()
-{
- unsigned int i;
-
- /* Verify that X_op field is wide enough. */
- {
- expressionS e;
- e.X_op = O_max;
- assert (e.X_op == O_max);
- }
-
- /* Create the opcode hash table. */
- alpha_opcode_hash = hash_new ();
- for (i = 0; i < alpha_num_opcodes;)
- {
- const char *name, *retval, *slash;
-
- name = alpha_opcodes[i].name;
- retval = hash_insert (alpha_opcode_hash, name, (PTR) &alpha_opcodes[i]);
- if (retval)
- as_fatal (_("internal error: can't hash opcode `%s': %s"),
- name, retval);
-
- /* Some opcodes include modifiers of various sorts with a "/mod"
- syntax, like the architecture manual suggests. However, for
- use with gcc at least, we also need access to those same opcodes
- without the "/". */
-
- if ((slash = strchr (name, '/')) != NULL)
- {
- char *p = xmalloc (strlen (name));
- memcpy (p, name, slash - name);
- strcpy (p + (slash - name), slash + 1);
-
- (void) hash_insert (alpha_opcode_hash, p, (PTR) &alpha_opcodes[i]);
- /* Ignore failures -- the opcode table does duplicate some
- variants in different forms, like "hw_stq" and "hw_st/q". */
- }
-
- while (++i < alpha_num_opcodes
- && (alpha_opcodes[i].name == name
- || !strcmp (alpha_opcodes[i].name, name)))
- continue;
- }
-
- /* Create the macro hash table. */
- alpha_macro_hash = hash_new ();
- for (i = 0; i < alpha_num_macros;)
- {
- const char *name, *retval;
-
- name = alpha_macros[i].name;
- retval = hash_insert (alpha_macro_hash, name, (PTR) &alpha_macros[i]);
- if (retval)
- as_fatal (_("internal error: can't hash macro `%s': %s"),
- name, retval);
-
- while (++i < alpha_num_macros
- && (alpha_macros[i].name == name
- || !strcmp (alpha_macros[i].name, name)))
- continue;
- }
-
- /* Construct symbols for each of the registers. */
- for (i = 0; i < 32; ++i)
- {
- char name[4];
-
- sprintf (name, "$%d", i);
- alpha_register_table[i] = symbol_create (name, reg_section, i,
- &zero_address_frag);
- }
- for (; i < 64; ++i)
- {
- char name[5];
-
- sprintf (name, "$f%d", i - 32);
- alpha_register_table[i] = symbol_create (name, reg_section, i,
- &zero_address_frag);
- }
-
- /* Create the special symbols and sections we'll be using. */
-
- /* So .sbss will get used for tiny objects. */
- bfd_set_gp_size (stdoutput, g_switch_value);
-
-#ifdef OBJ_ECOFF
- create_literal_section (".lita", &alpha_lita_section, &alpha_lita_symbol);
-
- /* For handling the GP, create a symbol that won't be output in the
- symbol table. We'll edit it out of relocs later. */
- alpha_gp_symbol = symbol_create ("<GP value>", alpha_lita_section, 0x8000,
- &zero_address_frag);
-#endif
-
-#ifdef OBJ_EVAX
- create_literal_section (".link", &alpha_link_section, &alpha_link_symbol);
-#endif
-
-#ifdef OBJ_ELF
- if (ECOFF_DEBUGGING)
- {
- segT sec = subseg_new (".mdebug", (subsegT) 0);
- bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY);
- bfd_set_section_alignment (stdoutput, sec, 3);
- }
-#endif /* OBJ_ELF */
-
- /* Create literal lookup hash table. */
- alpha_literal_hash = hash_new ();
-
- subseg_set (text_section, 0);
-}
-
-/* The public interface to the instruction assembler. */
-
-void
-md_assemble (str)
- char *str;
-{
- char opname[32]; /* Current maximum is 13. */
- expressionS tok[MAX_INSN_ARGS];
- int ntok, trunclen;
- size_t opnamelen;
-
- /* Split off the opcode. */
- opnamelen = strspn (str, "abcdefghijklmnopqrstuvwxyz_/46819");
- trunclen = (opnamelen < sizeof (opname) - 1
- ? opnamelen
- : sizeof (opname) - 1);
- memcpy (opname, str, trunclen);
- opname[trunclen] = '\0';
-
- /* Tokenize the rest of the line. */
- if ((ntok = tokenize_arguments (str + opnamelen, tok, MAX_INSN_ARGS)) < 0)
- {
- if (ntok != TOKENIZE_ERROR_REPORT)
- as_bad (_("syntax error"));
-
- return;
- }
-
- /* Finish it off. */
- assemble_tokens (opname, tok, ntok, alpha_macros_on);
-}
-
-/* Round up a section's size to the appropriate boundary. */
-
-valueT
-md_section_align (seg, size)
- segT seg;
- valueT size;
-{
- int align = bfd_get_section_alignment (stdoutput, seg);
- valueT mask = ((valueT) 1 << align) - 1;
-
- return (size + mask) & ~mask;
-}
-
-/* Turn a string in input_line_pointer into a floating point constant
- of type TYPE, and store the appropriate bytes in *LITP. The number
- of LITTLENUMS emitted is stored in *SIZEP. An error message is
- returned, or NULL on OK. */
-
-/* Equal to MAX_PRECISION in atof-ieee.c. */
-#define MAX_LITTLENUMS 6
-
-extern char *vax_md_atof PARAMS ((int, char *, int *));
-
-char *
-md_atof (type, litP, sizeP)
- char type;
- char *litP;
- int *sizeP;
-{
- int prec;
- LITTLENUM_TYPE words[MAX_LITTLENUMS];
- LITTLENUM_TYPE *wordP;
- char *t;
-
- switch (type)
- {
- /* VAX floats */
- case 'G':
- /* VAX md_atof doesn't like "G" for some reason. */
- type = 'g';
- case 'F':
- case 'D':
- return vax_md_atof (type, litP, sizeP);
-
- /* IEEE floats */
- case 'f':
- prec = 2;
- break;
-
- case 'd':
- 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 - 1; prec--;)
- {
- md_number_to_chars (litP, (long) (*wordP--), sizeof (LITTLENUM_TYPE));
- litP += sizeof (LITTLENUM_TYPE);
- }
-
- return 0;
-}
-
-/* Take care of the target-specific command-line options. */
-
-int
-md_parse_option (c, arg)
- int c;
- char *arg;
-{
- switch (c)
- {
- case 'F':
- alpha_nofloats_on = 1;
- break;
-
- case OPTION_32ADDR:
- alpha_addr32_on = 1;
- break;
-
- case 'g':
- alpha_debug = 1;
- break;
-
- case 'G':
- g_switch_value = atoi (arg);
- break;
-
- case 'm':
- {
- const struct cpu_type *p;
- for (p = cpu_types; p->name; ++p)
- if (strcmp (arg, p->name) == 0)
- {
- alpha_target_name = p->name, alpha_target = p->flags;
- goto found;
- }
- as_warn (_("Unknown CPU identifier `%s'"), arg);
- found:;
- }
- break;
-
-#ifdef OBJ_EVAX
- case '+': /* For g++. Hash any name > 63 chars long. */
- alpha_flag_hash_long_names = 1;
- break;
-
- case 'H': /* Show new symbol after hash truncation */
- alpha_flag_show_after_trunc = 1;
- break;
-
- case 'h': /* for gnu-c/vax compatibility. */
- break;
-#endif
-
- case OPTION_RELAX:
- alpha_flag_relax = 1;
- break;
-
-#ifdef OBJ_ELF
- case OPTION_MDEBUG:
- alpha_flag_mdebug = 1;
- break;
- case OPTION_NO_MDEBUG:
- alpha_flag_mdebug = 0;
- break;
-#endif
-
- default:
- return 0;
- }
-
- return 1;
-}
-
-/* Print a description of the command-line options that we accept. */
-
-void
-md_show_usage (stream)
- FILE *stream;
-{
- fputs (_("\
-Alpha options:\n\
--32addr treat addresses as 32-bit values\n\
--F lack floating point instructions support\n\
--mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mev67 | -mev68 | -mall\n\
- specify variant of Alpha architecture\n\
--m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264 | -m21264a | -m21264b\n\
- these variants include PALcode opcodes\n"),
- stream);
-#ifdef OBJ_EVAX
- fputs (_("\
-VMS options:\n\
--+ hash encode (don't truncate) names longer than 64 characters\n\
--H show new symbol after hash truncation\n"),
- stream);
-#endif
-}
-
-/* Decide from what point a pc-relative relocation is relative to,
- relative to the pc-relative fixup. Er, relatively speaking. */
-
-long
-md_pcrel_from (fixP)
- fixS *fixP;
-{
- valueT addr = fixP->fx_where + fixP->fx_frag->fr_address;
- switch (fixP->fx_r_type)
- {
- case BFD_RELOC_23_PCREL_S2:
- case BFD_RELOC_ALPHA_HINT:
- case BFD_RELOC_ALPHA_BRSGP:
- return addr + 4;
- default:
- return addr;
- }
-}
-
-/* Attempt to simplify or even eliminate a fixup. The return value is
- ignored; perhaps it was once meaningful, but now it is historical.
- To indicate that a fixup has been eliminated, set fixP->fx_done.
-
- For ELF, here it is that we transform the GPDISP_HI16 reloc we used
- internally into the GPDISP reloc used externally. We had to do
- this so that we'd have the GPDISP_LO16 reloc as a tag to compute
- the distance to the "lda" instruction for setting the addend to
- GPDISP. */
-
-void
-md_apply_fix3 (fixP, valP, seg)
- fixS *fixP;
- valueT * valP;
- segT seg;
-{
- char * const fixpos = fixP->fx_frag->fr_literal + fixP->fx_where;
- valueT value = * valP;
- unsigned image, size;
-
- switch (fixP->fx_r_type)
- {
- /* The GPDISP relocations are processed internally with a symbol
- referring to the current function's section; we need to drop
- in a value which, when added to the address of the start of
- the function, gives the desired GP. */
- case BFD_RELOC_ALPHA_GPDISP_HI16:
- {
- fixS *next = fixP->fx_next;
-
- /* With user-specified !gpdisp relocations, we can be missing
- the matching LO16 reloc. We will have already issued an
- error message. */
- if (next)
- fixP->fx_offset = (next->fx_frag->fr_address + next->fx_where
- - fixP->fx_frag->fr_address - fixP->fx_where);
-
- value = (value - sign_extend_16 (value)) >> 16;
- }
-#ifdef OBJ_ELF
- fixP->fx_r_type = BFD_RELOC_ALPHA_GPDISP;
-#endif
- goto do_reloc_gp;
-
- case BFD_RELOC_ALPHA_GPDISP_LO16:
- value = sign_extend_16 (value);
- fixP->fx_offset = 0;
-#ifdef OBJ_ELF
- fixP->fx_done = 1;
-#endif
-
- do_reloc_gp:
- fixP->fx_addsy = section_symbol (seg);
- md_number_to_chars (fixpos, value, 2);
- break;
-
- case BFD_RELOC_16:
- if (fixP->fx_pcrel)
- fixP->fx_r_type = BFD_RELOC_16_PCREL;
- size = 2;
- goto do_reloc_xx;
- case BFD_RELOC_32:
- if (fixP->fx_pcrel)
- fixP->fx_r_type = BFD_RELOC_32_PCREL;
- size = 4;
- goto do_reloc_xx;
- case BFD_RELOC_64:
- if (fixP->fx_pcrel)
- fixP->fx_r_type = BFD_RELOC_64_PCREL;
- size = 8;
- do_reloc_xx:
- if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
- {
- md_number_to_chars (fixpos, value, size);
- goto done;
- }
- return;
-
-#ifdef OBJ_ECOFF
- case BFD_RELOC_GPREL32:
- assert (fixP->fx_subsy == alpha_gp_symbol);
- fixP->fx_subsy = 0;
- /* FIXME: inherited this obliviousness of `value' -- why? */
- md_number_to_chars (fixpos, -alpha_gp_value, 4);
- break;
-#else
- case BFD_RELOC_GPREL32:
-#endif
- case BFD_RELOC_GPREL16:
- case BFD_RELOC_ALPHA_GPREL_HI16:
- case BFD_RELOC_ALPHA_GPREL_LO16:
- return;
-
- case BFD_RELOC_23_PCREL_S2:
- if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
- {
- image = bfd_getl32 (fixpos);
- image = (image & ~0x1FFFFF) | ((value >> 2) & 0x1FFFFF);
- goto write_done;
- }
- return;
-
- case BFD_RELOC_ALPHA_HINT:
- if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
- {
- image = bfd_getl32 (fixpos);
- image = (image & ~0x3FFF) | ((value >> 2) & 0x3FFF);
- goto write_done;
- }
- return;
-
-#ifdef OBJ_ELF
- case BFD_RELOC_ALPHA_BRSGP:
- return;
-
- case BFD_RELOC_ALPHA_TLSGD:
- case BFD_RELOC_ALPHA_TLSLDM:
- case BFD_RELOC_ALPHA_GOTDTPREL16:
- case BFD_RELOC_ALPHA_DTPREL_HI16:
- case BFD_RELOC_ALPHA_DTPREL_LO16:
- case BFD_RELOC_ALPHA_DTPREL16:
- case BFD_RELOC_ALPHA_GOTTPREL16:
- case BFD_RELOC_ALPHA_TPREL_HI16:
- case BFD_RELOC_ALPHA_TPREL_LO16:
- case BFD_RELOC_ALPHA_TPREL16:
- if (fixP->fx_addsy)
- S_SET_THREAD_LOCAL (fixP->fx_addsy);
- return;
-#endif
-
-#ifdef OBJ_ECOFF
- case BFD_RELOC_ALPHA_LITERAL:
- md_number_to_chars (fixpos, value, 2);
- return;
-#endif
- case BFD_RELOC_ALPHA_ELF_LITERAL:
- case BFD_RELOC_ALPHA_LITUSE:
- case BFD_RELOC_ALPHA_LINKAGE:
- case BFD_RELOC_ALPHA_CODEADDR:
- return;
-
- case BFD_RELOC_VTABLE_INHERIT:
- case BFD_RELOC_VTABLE_ENTRY:
- return;
-
- default:
- {
- const struct alpha_operand *operand;
-
- if ((int) fixP->fx_r_type >= 0)
- as_fatal (_("unhandled relocation type %s"),
- bfd_get_reloc_code_name (fixP->fx_r_type));
-
- assert (-(int) fixP->fx_r_type < (int) alpha_num_operands);
- operand = &alpha_operands[-(int) fixP->fx_r_type];
-
- /* The rest of these fixups only exist internally during symbol
- resolution and have no representation in the object file.
- Therefore they must be completely resolved as constants. */
-
- if (fixP->fx_addsy != 0
- && S_GET_SEGMENT (fixP->fx_addsy) != absolute_section)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("non-absolute expression in constant field"));
-
- image = bfd_getl32 (fixpos);
- image = insert_operand (image, operand, (offsetT) value,
- fixP->fx_file, fixP->fx_line);
- }
- goto write_done;
- }
-
- if (fixP->fx_addsy != 0 || fixP->fx_pcrel != 0)
- return;
- else
- {
- as_warn_where (fixP->fx_file, fixP->fx_line,
- _("type %d reloc done?\n"), (int) fixP->fx_r_type);
- goto done;
- }
-
-write_done:
- md_number_to_chars (fixpos, image, 4);
-
-done:
- fixP->fx_done = 1;
-}
-
-/* Look for a register name in the given symbol. */
-
-symbolS *
-md_undefined_symbol (name)
- char *name;
-{
- if (*name == '$')
- {
- int is_float = 0, num;
-
- switch (*++name)
- {
- case 'f':
- if (name[1] == 'p' && name[2] == '\0')
- return alpha_register_table[AXP_REG_FP];
- is_float = 32;
- /* FALLTHRU */
-
- case 'r':
- if (!ISDIGIT (*++name))
- break;
- /* FALLTHRU */
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- if (name[1] == '\0')
- num = name[0] - '0';
- else if (name[0] != '0' && ISDIGIT (name[1]) && name[2] == '\0')
- {
- num = (name[0] - '0') * 10 + name[1] - '0';
- if (num >= 32)
- break;
- }
- else
- break;
-
- if (!alpha_noat_on && (num + is_float) == AXP_REG_AT)
- as_warn (_("Used $at without \".set noat\""));
- return alpha_register_table[num + is_float];
-
- case 'a':
- if (name[1] == 't' && name[2] == '\0')
- {
- if (!alpha_noat_on)
- as_warn (_("Used $at without \".set noat\""));
- return alpha_register_table[AXP_REG_AT];
- }
- break;
-
- case 'g':
- if (name[1] == 'p' && name[2] == '\0')
- return alpha_register_table[alpha_gp_register];
- break;
-
- case 's':
- if (name[1] == 'p' && name[2] == '\0')
- return alpha_register_table[AXP_REG_SP];
- break;
- }
- }
- return NULL;
-}
-
-#ifdef OBJ_ECOFF
-/* @@@ Magic ECOFF bits. */
-
-void
-alpha_frob_ecoff_data ()
-{
- select_gp_value ();
- /* $zero and $f31 are read-only */
- alpha_gprmask &= ~1;
- alpha_fprmask &= ~1;
-}
-#endif
-
-/* Hook to remember a recently defined label so that the auto-align
- code can adjust the symbol after we know what alignment will be
- required. */
-
-void
-alpha_define_label (sym)
- symbolS *sym;
-{
- alpha_insn_label = sym;
-}
-
-/* Return true if we must always emit a reloc for a type and false if
- there is some hope of resolving it at assembly time. */
-
-int
-alpha_force_relocation (f)
- fixS *f;
-{
- if (alpha_flag_relax)
- return 1;
-
- switch (f->fx_r_type)
- {
- case BFD_RELOC_ALPHA_GPDISP_HI16:
- case BFD_RELOC_ALPHA_GPDISP_LO16:
- case BFD_RELOC_ALPHA_GPDISP:
- case BFD_RELOC_ALPHA_LITERAL:
- case BFD_RELOC_ALPHA_ELF_LITERAL:
- case BFD_RELOC_ALPHA_LITUSE:
- case BFD_RELOC_GPREL16:
- case BFD_RELOC_GPREL32:
- case BFD_RELOC_ALPHA_GPREL_HI16:
- case BFD_RELOC_ALPHA_GPREL_LO16:
- case BFD_RELOC_ALPHA_LINKAGE:
- case BFD_RELOC_ALPHA_CODEADDR:
- case BFD_RELOC_ALPHA_BRSGP:
- case BFD_RELOC_ALPHA_TLSGD:
- case BFD_RELOC_ALPHA_TLSLDM:
- case BFD_RELOC_ALPHA_GOTDTPREL16:
- case BFD_RELOC_ALPHA_DTPREL_HI16:
- case BFD_RELOC_ALPHA_DTPREL_LO16:
- case BFD_RELOC_ALPHA_DTPREL16:
- case BFD_RELOC_ALPHA_GOTTPREL16:
- case BFD_RELOC_ALPHA_TPREL_HI16:
- case BFD_RELOC_ALPHA_TPREL_LO16:
- case BFD_RELOC_ALPHA_TPREL16:
- return 1;
-
- default:
- break;
- }
-
- return generic_force_reloc (f);
-}
-
-/* Return true if we can partially resolve a relocation now. */
-
-int
-alpha_fix_adjustable (f)
- fixS *f;
-{
- /* Are there any relocation types for which we must generate a reloc
- but we can adjust the values contained within it? */
- switch (f->fx_r_type)
- {
- case BFD_RELOC_ALPHA_GPDISP_HI16:
- case BFD_RELOC_ALPHA_GPDISP_LO16:
- case BFD_RELOC_ALPHA_GPDISP:
- return 0;
-
- case BFD_RELOC_ALPHA_LITERAL:
- case BFD_RELOC_ALPHA_ELF_LITERAL:
- case BFD_RELOC_ALPHA_LITUSE:
- case BFD_RELOC_ALPHA_LINKAGE:
- case BFD_RELOC_ALPHA_CODEADDR:
- return 1;
-
- case BFD_RELOC_VTABLE_ENTRY:
- case BFD_RELOC_VTABLE_INHERIT:
- return 0;
-
- case BFD_RELOC_GPREL16:
- case BFD_RELOC_GPREL32:
- case BFD_RELOC_ALPHA_GPREL_HI16:
- case BFD_RELOC_ALPHA_GPREL_LO16:
- case BFD_RELOC_23_PCREL_S2:
- case BFD_RELOC_32:
- case BFD_RELOC_64:
- case BFD_RELOC_ALPHA_HINT:
- return 1;
-
- case BFD_RELOC_ALPHA_TLSGD:
- case BFD_RELOC_ALPHA_TLSLDM:
- case BFD_RELOC_ALPHA_GOTDTPREL16:
- case BFD_RELOC_ALPHA_DTPREL_HI16:
- case BFD_RELOC_ALPHA_DTPREL_LO16:
- case BFD_RELOC_ALPHA_DTPREL16:
- case BFD_RELOC_ALPHA_GOTTPREL16:
- case BFD_RELOC_ALPHA_TPREL_HI16:
- case BFD_RELOC_ALPHA_TPREL_LO16:
- case BFD_RELOC_ALPHA_TPREL16:
- /* ??? No idea why we can't return a reference to .tbss+10, but
- we're preventing this in the other assemblers. Follow for now. */
- return 0;
-
-#ifdef OBJ_ELF
- case BFD_RELOC_ALPHA_BRSGP:
- /* If we have a BRSGP reloc to a local symbol, adjust it to BRADDR and
- let it get resolved at assembly time. */
- {
- symbolS *sym = f->fx_addsy;
- const char *name;
- int offset = 0;
-
- if (generic_force_reloc (f))
- return 0;
-
- switch (S_GET_OTHER (sym) & STO_ALPHA_STD_GPLOAD)
- {
- case STO_ALPHA_NOPV:
- break;
- case STO_ALPHA_STD_GPLOAD:
- offset = 8;
- break;
- default:
- if (S_IS_LOCAL (sym))
- name = "<local>";
- else
- name = S_GET_NAME (sym);
- as_bad_where (f->fx_file, f->fx_line,
- _("!samegp reloc against symbol without .prologue: %s"),
- name);
- break;
- }
- f->fx_r_type = BFD_RELOC_23_PCREL_S2;
- f->fx_offset += offset;
- return 1;
- }
-#endif
-
- default:
- return 1;
- }
- /*NOTREACHED*/
-}
-
-/* Generate the BFD reloc to be stuck in the object file from the
- fixup used internally in the assembler. */
-
-arelent *
-tc_gen_reloc (sec, fixp)
- asection *sec ATTRIBUTE_UNUSED;
- fixS *fixp;
-{
- arelent *reloc;
-
- reloc = (arelent *) xmalloc (sizeof (arelent));
- reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
- *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
- reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
-
- /* Make sure none of our internal relocations make it this far.
- They'd better have been fully resolved by this point. */
- assert ((int) fixp->fx_r_type > 0);
-
- reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
- if (reloc->howto == NULL)
- {
- as_bad_where (fixp->fx_file, fixp->fx_line,
- _("cannot represent `%s' relocation in object file"),
- bfd_get_reloc_code_name (fixp->fx_r_type));
- return NULL;
- }
-
- if (!fixp->fx_pcrel != !reloc->howto->pc_relative)
- {
- as_fatal (_("internal error? cannot generate `%s' relocation"),
- bfd_get_reloc_code_name (fixp->fx_r_type));
- }
- assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);
-
-#ifdef OBJ_ECOFF
- if (fixp->fx_r_type == BFD_RELOC_ALPHA_LITERAL)
- {
- /* Fake out bfd_perform_relocation. sigh. */
- reloc->addend = -alpha_gp_value;
- }
- else
-#endif
- {
- reloc->addend = fixp->fx_offset;
-#ifdef OBJ_ELF
- /* Ohhh, this is ugly. The problem is that if this is a local global
- symbol, the relocation will entirely be performed at link time, not
- at assembly time. bfd_perform_reloc doesn't know about this sort
- of thing, and as a result we need to fake it out here. */
- if ((S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)
- || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE)
- || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_THREAD_LOCAL))
- && !S_IS_COMMON (fixp->fx_addsy))
- reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value;
-#endif
- }
-
- return reloc;
-}
-
-/* Parse a register name off of the input_line and return a register
- number. Gets md_undefined_symbol above to do the register name
- matching for us.
-
- Only called as a part of processing the ECOFF .frame directive. */
-
-int
-tc_get_register (frame)
- int frame ATTRIBUTE_UNUSED;
-{
- int framereg = AXP_REG_SP;
-
- SKIP_WHITESPACE ();
- if (*input_line_pointer == '$')
- {
- char *s = input_line_pointer;
- char c = get_symbol_end ();
- symbolS *sym = md_undefined_symbol (s);
-
- *strchr (s, '\0') = c;
- if (sym && (framereg = S_GET_VALUE (sym)) <= 31)
- goto found;
- }
- as_warn (_("frame reg expected, using $%d."), framereg);
-
-found:
- note_gpreg (framereg);
- return framereg;
-}
-
-/* This is called before the symbol table is processed. In order to
- work with gcc when using mips-tfile, we must keep all local labels.
- However, in other cases, we want to discard them. If we were
- called with -g, but we didn't see any debugging information, it may
- mean that gcc is smuggling debugging information through to
- mips-tfile, in which case we must generate all local labels. */
-
-#ifdef OBJ_ECOFF
-
-void
-alpha_frob_file_before_adjust ()
-{
- if (alpha_debug != 0
- && ! ecoff_debugging_seen)
- flag_keep_locals = 1;
-}
+/* Some instruction sets indexed by lg(size). */
+static const char * const sextX_op[] = { "sextb", "sextw", "sextl", NULL };
+static const char * const insXl_op[] = { "insbl", "inswl", "insll", "insql" };
+static const char * const insXh_op[] = { NULL, "inswh", "inslh", "insqh" };
+static const char * const extXl_op[] = { "extbl", "extwl", "extll", "extql" };
+static const char * const extXh_op[] = { NULL, "extwh", "extlh", "extqh" };
+static const char * const mskXl_op[] = { "mskbl", "mskwl", "mskll", "mskql" };
+static const char * const mskXh_op[] = { NULL, "mskwh", "msklh", "mskqh" };
+static const char * const stX_op[] = { "stb", "stw", "stl", "stq" };
+static const char * const ldXu_op[] = { "ldbu", "ldwu", NULL, NULL };
-#endif /* OBJ_ECOFF */
+static void assemble_insn (const struct alpha_opcode *, const expressionS *, int, struct alpha_insn *, bfd_reloc_code_real_type);
+static void emit_insn (struct alpha_insn *);
+static void assemble_tokens (const char *, const expressionS *, int, int);
static struct alpha_reloc_tag *
-get_alpha_reloc_tag (sequence)
- long sequence;
+get_alpha_reloc_tag (long sequence)
{
char buffer[ALPHA_RELOC_DIGITS];
struct alpha_reloc_tag *info;
@@ -1680,13 +542,12 @@ get_alpha_reloc_tag (sequence)
size_t len = strlen (buffer);
const char *errmsg;
- info = (struct alpha_reloc_tag *)
- xcalloc (sizeof (struct alpha_reloc_tag) + len, 1);
+ info = xcalloc (sizeof (struct alpha_reloc_tag) + len, 1);
info->segment = now_seg;
info->sequence = sequence;
strcpy (info->string, buffer);
- errmsg = hash_insert (alpha_literal_hash, info->string, (PTR) info);
+ errmsg = hash_insert (alpha_literal_hash, info->string, (void *) info);
if (errmsg)
as_fatal (errmsg);
}
@@ -1694,22 +555,10 @@ get_alpha_reloc_tag (sequence)
return info;
}
-/* Before the relocations are written, reorder them, so that user
- supplied !lituse relocations follow the appropriate !literal
- relocations, and similarly for !gpdisp relocations. */
-
-void
-alpha_before_fix ()
-{
- if (alpha_literal_hash)
- bfd_map_over_sections (stdoutput, alpha_adjust_relocs, NULL);
-}
-
static void
-alpha_adjust_relocs (abfd, sec, ptr)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- PTR ptr ATTRIBUTE_UNUSED;
+alpha_adjust_relocs (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ void * ptr ATTRIBUTE_UNUSED)
{
segment_info_type *seginfo = seg_info (sec);
fixS **prevP;
@@ -1823,7 +672,7 @@ alpha_adjust_relocs (abfd, sec, ptr)
fixp->tc_fix_data.info->master->fx_next = fixp->fx_next;
fixp->fx_next = fixp->tc_fix_data.info->master;
fixp = fixp->fx_next;
- /* FALLTHRU */
+ /* Fall through. */
case BFD_RELOC_ALPHA_ELF_LITERAL:
if (fixp->tc_fix_data.info
@@ -1858,12 +707,21 @@ alpha_adjust_relocs (abfd, sec, ptr)
}
}
}
+
+/* Before the relocations are written, reorder them, so that user
+ supplied !lituse relocations follow the appropriate !literal
+ relocations, and similarly for !gpdisp relocations. */
+
+void
+alpha_before_fix (void)
+{
+ if (alpha_literal_hash)
+ bfd_map_over_sections (stdoutput, alpha_adjust_relocs, NULL);
+}
#ifdef DEBUG_ALPHA
static void
-debug_exp (tok, ntok)
- expressionS tok[];
- int ntok;
+debug_exp (expressionS tok[], int ntok)
{
int i;
@@ -1915,6 +773,7 @@ debug_exp (tok, ntok)
case O_lituse_jsr: name = "O_lituse_jsr"; break;
case O_lituse_tlsgd: name = "O_lituse_tlsgd"; break;
case O_lituse_tlsldm: name = "O_lituse_tlsldm"; break;
+ case O_lituse_jsrdirect: name = "O_lituse_jsrdirect"; break;
case O_gpdisp: name = "O_gpdisp"; break;
case O_gprelhigh: name = "O_gprelhigh"; break;
case O_gprellow: name = "O_gprellow"; break;
@@ -1945,10 +804,9 @@ debug_exp (tok, ntok)
/* Parse the arguments to an opcode. */
static int
-tokenize_arguments (str, tok, ntok)
- char *str;
- expressionS tok[];
- int ntok;
+tokenize_arguments (char *str,
+ expressionS tok[],
+ int ntok)
{
expressionS *end_tok = tok + ntok;
char *old_input_line_pointer;
@@ -2134,11 +992,10 @@ err_report:
syntax match. */
static const struct alpha_opcode *
-find_opcode_match (first_opcode, tok, pntok, pcpumatch)
- const struct alpha_opcode *first_opcode;
- const expressionS *tok;
- int *pntok;
- int *pcpumatch;
+find_opcode_match (const struct alpha_opcode *first_opcode,
+ const expressionS *tok,
+ int *pntok,
+ int *pcpumatch)
{
const struct alpha_opcode *opcode = first_opcode;
int ntok = *pntok;
@@ -2237,529 +1094,6 @@ find_opcode_match (first_opcode, tok, pntok, pcpumatch)
return NULL;
}
-/* Search forward through all variants of a macro looking for a syntax
- match. */
-
-static const struct alpha_macro *
-find_macro_match (first_macro, tok, pntok)
- const struct alpha_macro *first_macro;
- const expressionS *tok;
- int *pntok;
-{
- const struct alpha_macro *macro = first_macro;
- int ntok = *pntok;
-
- do
- {
- const enum alpha_macro_arg *arg = macro->argsets;
- int tokidx = 0;
-
- while (*arg)
- {
- switch (*arg)
- {
- case MACRO_EOA:
- if (tokidx == ntok)
- return macro;
- else
- tokidx = 0;
- break;
-
- /* Index register. */
- case MACRO_IR:
- if (tokidx >= ntok || tok[tokidx].X_op != O_register
- || !is_ir_num (tok[tokidx].X_add_number))
- goto match_failed;
- ++tokidx;
- break;
-
- /* Parenthesized index register. */
- case MACRO_PIR:
- if (tokidx >= ntok || tok[tokidx].X_op != O_pregister
- || !is_ir_num (tok[tokidx].X_add_number))
- goto match_failed;
- ++tokidx;
- break;
-
- /* Optional parenthesized index register. */
- case MACRO_OPIR:
- if (tokidx < ntok && tok[tokidx].X_op == O_pregister
- && is_ir_num (tok[tokidx].X_add_number))
- ++tokidx;
- break;
-
- /* Leading comma with a parenthesized index register. */
- case MACRO_CPIR:
- if (tokidx >= ntok || tok[tokidx].X_op != O_cpregister
- || !is_ir_num (tok[tokidx].X_add_number))
- goto match_failed;
- ++tokidx;
- break;
-
- /* Floating point register. */
- case MACRO_FPR:
- if (tokidx >= ntok || tok[tokidx].X_op != O_register
- || !is_fpr_num (tok[tokidx].X_add_number))
- goto match_failed;
- ++tokidx;
- break;
-
- /* Normal expression. */
- case MACRO_EXP:
- if (tokidx >= ntok)
- goto match_failed;
- switch (tok[tokidx].X_op)
- {
- case O_illegal:
- case O_absent:
- case O_register:
- case O_pregister:
- case O_cpregister:
- case O_literal:
- case O_lituse_base:
- case O_lituse_bytoff:
- case O_lituse_jsr:
- case O_gpdisp:
- case O_gprelhigh:
- case O_gprellow:
- case O_gprel:
- case O_samegp:
- goto match_failed;
-
- default:
- break;
- }
- ++tokidx;
- break;
-
- match_failed:
- while (*arg != MACRO_EOA)
- ++arg;
- tokidx = 0;
- break;
- }
- ++arg;
- }
- }
- while (++macro - alpha_macros < (int) alpha_num_macros
- && !strcmp (macro->name, first_macro->name));
-
- return NULL;
-}
-
-/* Insert an operand value into an instruction. */
-
-static unsigned
-insert_operand (insn, operand, val, file, line)
- unsigned insn;
- const struct alpha_operand *operand;
- offsetT val;
- char *file;
- unsigned line;
-{
- if (operand->bits != 32 && !(operand->flags & AXP_OPERAND_NOOVERFLOW))
- {
- offsetT min, max;
-
- if (operand->flags & AXP_OPERAND_SIGNED)
- {
- max = (1 << (operand->bits - 1)) - 1;
- min = -(1 << (operand->bits - 1));
- }
- else
- {
- max = (1 << operand->bits) - 1;
- min = 0;
- }
-
- if (val < min || val > max)
- {
- const char *err =
- _("operand out of range (%s not between %d and %d)");
- char buf[sizeof (val) * 3 + 2];
-
- sprint_value (buf, val);
- if (file)
- as_warn_where (file, line, err, buf, min, max);
- else
- as_warn (err, buf, min, max);
- }
- }
-
- if (operand->insert)
- {
- const char *errmsg = NULL;
-
- insn = (*operand->insert) (insn, val, &errmsg);
- if (errmsg)
- as_warn (errmsg);
- }
- else
- insn |= ((val & ((1 << operand->bits) - 1)) << operand->shift);
-
- return insn;
-}
-
-/* Turn an opcode description and a set of arguments into
- an instruction and a fixup. */
-
-static void
-assemble_insn (opcode, tok, ntok, insn, reloc)
- const struct alpha_opcode *opcode;
- const expressionS *tok;
- int ntok;
- struct alpha_insn *insn;
- bfd_reloc_code_real_type reloc;
-{
- const struct alpha_operand *reloc_operand = NULL;
- const expressionS *reloc_exp = NULL;
- const unsigned char *argidx;
- unsigned image;
- int tokidx = 0;
-
- memset (insn, 0, sizeof (*insn));
- image = opcode->opcode;
-
- for (argidx = opcode->operands; *argidx; ++argidx)
- {
- const struct alpha_operand *operand = &alpha_operands[*argidx];
- const expressionS *t = (const expressionS *) 0;
-
- if (operand->flags & AXP_OPERAND_FAKE)
- {
- /* fake operands take no value and generate no fixup */
- image = insert_operand (image, operand, 0, NULL, 0);
- continue;
- }
-
- if (tokidx >= ntok)
- {
- switch (operand->flags & AXP_OPERAND_OPTIONAL_MASK)
- {
- case AXP_OPERAND_DEFAULT_FIRST:
- t = &tok[0];
- break;
- case AXP_OPERAND_DEFAULT_SECOND:
- t = &tok[1];
- break;
- case AXP_OPERAND_DEFAULT_ZERO:
- {
- static expressionS zero_exp;
- t = &zero_exp;
- zero_exp.X_op = O_constant;
- zero_exp.X_unsigned = 1;
- }
- break;
- default:
- abort ();
- }
- }
- else
- t = &tok[tokidx++];
-
- switch (t->X_op)
- {
- case O_register:
- case O_pregister:
- case O_cpregister:
- image = insert_operand (image, operand, regno (t->X_add_number),
- NULL, 0);
- break;
-
- case O_constant:
- image = insert_operand (image, operand, t->X_add_number, NULL, 0);
- assert (reloc_operand == NULL);
- reloc_operand = operand;
- reloc_exp = t;
- break;
-
- default:
- /* This is only 0 for fields that should contain registers,
- which means this pattern shouldn't have matched. */
- if (operand->default_reloc == 0)
- abort ();
-
- /* There is one special case for which an insn receives two
- relocations, and thus the user-supplied reloc does not
- override the operand reloc. */
- if (operand->default_reloc == BFD_RELOC_ALPHA_HINT)
- {
- struct alpha_fixup *fixup;
-
- if (insn->nfixups >= MAX_INSN_FIXUPS)
- as_fatal (_("too many fixups"));
-
- fixup = &insn->fixups[insn->nfixups++];
- fixup->exp = *t;
- fixup->reloc = BFD_RELOC_ALPHA_HINT;
- }
- else
- {
- if (reloc == BFD_RELOC_UNUSED)
- reloc = operand->default_reloc;
-
- assert (reloc_operand == NULL);
- reloc_operand = operand;
- reloc_exp = t;
- }
- break;
- }
- }
-
- if (reloc != BFD_RELOC_UNUSED)
- {
- struct alpha_fixup *fixup;
-
- if (insn->nfixups >= MAX_INSN_FIXUPS)
- as_fatal (_("too many fixups"));
-
- /* ??? My but this is hacky. But the OSF/1 assembler uses the same
- relocation tag for both ldah and lda with gpdisp. Choose the
- correct internal relocation based on the opcode. */
- if (reloc == BFD_RELOC_ALPHA_GPDISP)
- {
- if (strcmp (opcode->name, "ldah") == 0)
- reloc = BFD_RELOC_ALPHA_GPDISP_HI16;
- else if (strcmp (opcode->name, "lda") == 0)
- reloc = BFD_RELOC_ALPHA_GPDISP_LO16;
- else
- as_bad (_("invalid relocation for instruction"));
- }
-
- /* If this is a real relocation (as opposed to a lituse hint), then
- the relocation width should match the operand width. */
- else if (reloc < BFD_RELOC_UNUSED)
- {
- reloc_howto_type *reloc_howto
- = bfd_reloc_type_lookup (stdoutput, reloc);
- if (reloc_howto->bitsize != reloc_operand->bits)
- {
- as_bad (_("invalid relocation for field"));
- return;
- }
- }
-
- fixup = &insn->fixups[insn->nfixups++];
- if (reloc_exp)
- fixup->exp = *reloc_exp;
- else
- fixup->exp.X_op = O_absent;
- fixup->reloc = reloc;
- }
-
- insn->insn = image;
-}
-
-/* Actually output an instruction with its fixup. */
-
-static void
-emit_insn (insn)
- struct alpha_insn *insn;
-{
- char *f;
- int i;
-
- /* Take care of alignment duties. */
- if (alpha_auto_align_on && alpha_current_align < 2)
- alpha_align (2, (char *) NULL, alpha_insn_label, 0);
- if (alpha_current_align > 2)
- alpha_current_align = 2;
- alpha_insn_label = NULL;
-
- /* Write out the instruction. */
- f = frag_more (4);
- md_number_to_chars (f, insn->insn, 4);
-
-#ifdef OBJ_ELF
- dwarf2_emit_insn (4);
-#endif
-
- /* Apply the fixups in order. */
- for (i = 0; i < insn->nfixups; ++i)
- {
- const struct alpha_operand *operand = (const struct alpha_operand *) 0;
- struct alpha_fixup *fixup = &insn->fixups[i];
- struct alpha_reloc_tag *info = NULL;
- int size, pcrel;
- fixS *fixP;
-
- /* Some fixups are only used internally and so have no howto. */
- if ((int) fixup->reloc < 0)
- {
- operand = &alpha_operands[-(int) fixup->reloc];
- size = 4;
- pcrel = ((operand->flags & AXP_OPERAND_RELATIVE) != 0);
- }
- else if (fixup->reloc > BFD_RELOC_UNUSED
- || fixup->reloc == BFD_RELOC_ALPHA_GPDISP_HI16
- || fixup->reloc == BFD_RELOC_ALPHA_GPDISP_LO16)
- {
- size = 2;
- pcrel = 0;
- }
- else
- {
- reloc_howto_type *reloc_howto
- = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
- assert (reloc_howto);
-
- size = bfd_get_reloc_size (reloc_howto);
- assert (size >= 1 && size <= 4);
-
- pcrel = reloc_howto->pc_relative;
- }
-
- fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size,
- &fixup->exp, pcrel, fixup->reloc);
-
- /* Turn off complaints that the addend is too large for some fixups,
- and copy in the sequence number for the explicit relocations. */
- switch (fixup->reloc)
- {
- case BFD_RELOC_ALPHA_HINT:
- case BFD_RELOC_GPREL32:
- case BFD_RELOC_GPREL16:
- case BFD_RELOC_ALPHA_GPREL_HI16:
- case BFD_RELOC_ALPHA_GPREL_LO16:
- case BFD_RELOC_ALPHA_GOTDTPREL16:
- case BFD_RELOC_ALPHA_DTPREL_HI16:
- case BFD_RELOC_ALPHA_DTPREL_LO16:
- case BFD_RELOC_ALPHA_DTPREL16:
- case BFD_RELOC_ALPHA_GOTTPREL16:
- case BFD_RELOC_ALPHA_TPREL_HI16:
- case BFD_RELOC_ALPHA_TPREL_LO16:
- case BFD_RELOC_ALPHA_TPREL16:
- fixP->fx_no_overflow = 1;
- break;
-
- case BFD_RELOC_ALPHA_GPDISP_HI16:
- fixP->fx_no_overflow = 1;
- fixP->fx_addsy = section_symbol (now_seg);
- fixP->fx_offset = 0;
-
- info = get_alpha_reloc_tag (insn->sequence);
- if (++info->n_master > 1)
- as_bad (_("too many ldah insns for !gpdisp!%ld"), insn->sequence);
- if (info->segment != now_seg)
- as_bad (_("both insns for !gpdisp!%ld must be in the same section"),
- insn->sequence);
- fixP->tc_fix_data.info = info;
- break;
-
- case BFD_RELOC_ALPHA_GPDISP_LO16:
- fixP->fx_no_overflow = 1;
-
- info = get_alpha_reloc_tag (insn->sequence);
- if (++info->n_slaves > 1)
- as_bad (_("too many lda insns for !gpdisp!%ld"), insn->sequence);
- if (info->segment != now_seg)
- as_bad (_("both insns for !gpdisp!%ld must be in the same section"),
- insn->sequence);
- fixP->tc_fix_data.info = info;
- info->slaves = fixP;
- break;
-
- case BFD_RELOC_ALPHA_LITERAL:
- case BFD_RELOC_ALPHA_ELF_LITERAL:
- fixP->fx_no_overflow = 1;
-
- if (insn->sequence == 0)
- break;
- info = get_alpha_reloc_tag (insn->sequence);
- info->master = fixP;
- info->n_master++;
- if (info->segment != now_seg)
- info->multi_section_p = 1;
- fixP->tc_fix_data.info = info;
- break;
-
-#ifdef RELOC_OP_P
- case DUMMY_RELOC_LITUSE_ADDR:
- fixP->fx_offset = LITUSE_ALPHA_ADDR;
- goto do_lituse;
- case DUMMY_RELOC_LITUSE_BASE:
- fixP->fx_offset = LITUSE_ALPHA_BASE;
- goto do_lituse;
- case DUMMY_RELOC_LITUSE_BYTOFF:
- fixP->fx_offset = LITUSE_ALPHA_BYTOFF;
- goto do_lituse;
- case DUMMY_RELOC_LITUSE_JSR:
- fixP->fx_offset = LITUSE_ALPHA_JSR;
- goto do_lituse;
- case DUMMY_RELOC_LITUSE_TLSGD:
- fixP->fx_offset = LITUSE_ALPHA_TLSGD;
- goto do_lituse;
- case DUMMY_RELOC_LITUSE_TLSLDM:
- fixP->fx_offset = LITUSE_ALPHA_TLSLDM;
- goto do_lituse;
- do_lituse:
- fixP->fx_addsy = section_symbol (now_seg);
- fixP->fx_r_type = BFD_RELOC_ALPHA_LITUSE;
-
- info = get_alpha_reloc_tag (insn->sequence);
- if (fixup->reloc == DUMMY_RELOC_LITUSE_TLSGD)
- info->saw_lu_tlsgd = 1;
- else if (fixup->reloc == DUMMY_RELOC_LITUSE_TLSLDM)
- info->saw_lu_tlsldm = 1;
- if (++info->n_slaves > 1)
- {
- if (info->saw_lu_tlsgd)
- as_bad (_("too many lituse insns for !lituse_tlsgd!%ld"),
- insn->sequence);
- else if (info->saw_lu_tlsldm)
- as_bad (_("too many lituse insns for !lituse_tlsldm!%ld"),
- insn->sequence);
- }
- fixP->tc_fix_data.info = info;
- fixP->tc_fix_data.next_reloc = info->slaves;
- info->slaves = fixP;
- if (info->segment != now_seg)
- info->multi_section_p = 1;
- break;
-
- case BFD_RELOC_ALPHA_TLSGD:
- fixP->fx_no_overflow = 1;
-
- if (insn->sequence == 0)
- break;
- info = get_alpha_reloc_tag (insn->sequence);
- if (info->saw_tlsgd)
- as_bad (_("duplicate !tlsgd!%ld"), insn->sequence);
- else if (info->saw_tlsldm)
- as_bad (_("sequence number in use for !tlsldm!%ld"),
- insn->sequence);
- else
- info->saw_tlsgd = 1;
- fixP->tc_fix_data.info = info;
- break;
-
- case BFD_RELOC_ALPHA_TLSLDM:
- fixP->fx_no_overflow = 1;
-
- if (insn->sequence == 0)
- break;
- info = get_alpha_reloc_tag (insn->sequence);
- if (info->saw_tlsldm)
- as_bad (_("duplicate !tlsldm!%ld"), insn->sequence);
- else if (info->saw_tlsgd)
- as_bad (_("sequence number in use for !tlsgd!%ld"),
- insn->sequence);
- else
- info->saw_tlsldm = 1;
- fixP->tc_fix_data.info = info;
- break;
-#endif
- default:
- if ((int) fixup->reloc < 0)
- {
- if (operand->flags & AXP_OPERAND_NOOVERFLOW)
- fixP->fx_no_overflow = 1;
- }
- break;
- }
- }
-}
-
/* Given an opcode name and a pre-tokenized set of arguments, assemble
the insn, but do not emit it.
@@ -2767,15 +1101,14 @@ emit_insn (insn)
than one insn in an insn structure. */
static void
-assemble_tokens_to_insn (opname, tok, ntok, insn)
- const char *opname;
- const expressionS *tok;
- int ntok;
- struct alpha_insn *insn;
+assemble_tokens_to_insn (const char *opname,
+ const expressionS *tok,
+ int ntok,
+ struct alpha_insn *insn)
{
const struct alpha_opcode *opcode;
- /* search opcodes */
+ /* Search opcodes. */
opcode = (const struct alpha_opcode *) hash_find (alpha_opcode_hash, opname);
if (opcode)
{
@@ -2796,208 +1129,27 @@ assemble_tokens_to_insn (opname, tok, ntok, insn)
as_bad (_("unknown opcode `%s'"), opname);
}
-/* Given an opcode name and a pre-tokenized set of arguments, take the
- opcode all the way through emission. */
-
-static void
-assemble_tokens (opname, tok, ntok, local_macros_on)
- const char *opname;
- const expressionS *tok;
- int ntok;
- int local_macros_on;
-{
- int found_something = 0;
- const struct alpha_opcode *opcode;
- const struct alpha_macro *macro;
- int cpumatch = 1;
- bfd_reloc_code_real_type reloc = BFD_RELOC_UNUSED;
-
-#ifdef RELOC_OP_P
- /* If a user-specified relocation is present, this is not a macro. */
- if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
- {
- reloc = ALPHA_RELOC_TABLE (tok[ntok - 1].X_op)->reloc;
- ntok--;
- }
- else
-#endif
- if (local_macros_on)
- {
- macro = ((const struct alpha_macro *)
- hash_find (alpha_macro_hash, opname));
- if (macro)
- {
- found_something = 1;
- macro = find_macro_match (macro, tok, &ntok);
- if (macro)
- {
- (*macro->emit) (tok, ntok, macro->arg);
- return;
- }
- }
- }
-
- /* Search opcodes. */
- opcode = (const struct alpha_opcode *) hash_find (alpha_opcode_hash, opname);
- if (opcode)
- {
- found_something = 1;
- opcode = find_opcode_match (opcode, tok, &ntok, &cpumatch);
- if (opcode)
- {
- struct alpha_insn insn;
- assemble_insn (opcode, tok, ntok, &insn, reloc);
-
- /* Copy the sequence number for the reloc from the reloc token. */
- if (reloc != BFD_RELOC_UNUSED)
- insn.sequence = tok[ntok].X_add_number;
-
- emit_insn (&insn);
- return;
- }
- }
-
- if (found_something)
- {
- if (cpumatch)
- as_bad (_("inappropriate arguments for opcode `%s'"), opname);
- else
- as_bad (_("opcode `%s' not supported for target %s"), opname,
- alpha_target_name);
- }
- else
- as_bad (_("unknown opcode `%s'"), opname);
-}
-
-/* Some instruction sets indexed by lg(size). */
-static const char * const sextX_op[] = { "sextb", "sextw", "sextl", NULL };
-static const char * const insXl_op[] = { "insbl", "inswl", "insll", "insql" };
-static const char * const insXh_op[] = { NULL, "inswh", "inslh", "insqh" };
-static const char * const extXl_op[] = { "extbl", "extwl", "extll", "extql" };
-static const char * const extXh_op[] = { NULL, "extwh", "extlh", "extqh" };
-static const char * const mskXl_op[] = { "mskbl", "mskwl", "mskll", "mskql" };
-static const char * const mskXh_op[] = { NULL, "mskwh", "msklh", "mskqh" };
-static const char * const stX_op[] = { "stb", "stw", "stl", "stq" };
-static const char * const ldXu_op[] = { "ldbu", "ldwu", NULL, NULL };
-
-/* Implement the ldgp macro. */
+/* Build a BFD section with its flags set appropriately for the .lita,
+ .lit8, or .lit4 sections. */
static void
-emit_ldgp (tok, ntok, unused)
- const expressionS *tok;
- int ntok ATTRIBUTE_UNUSED;
- const PTR unused ATTRIBUTE_UNUSED;
-{
-#ifdef OBJ_AOUT
-FIXME
-#endif
-#if defined(OBJ_ECOFF) || defined(OBJ_ELF)
- /* from "ldgp r1,n(r2)", generate "ldah r1,X(R2); lda r1,Y(r1)"
- with appropriate constants and relocations. */
- struct alpha_insn insn;
- expressionS newtok[3];
- expressionS addend;
-
-#ifdef OBJ_ECOFF
- if (regno (tok[2].X_add_number) == AXP_REG_PV)
- ecoff_set_gp_prolog_size (0);
-#endif
-
- newtok[0] = tok[0];
- set_tok_const (newtok[1], 0);
- newtok[2] = tok[2];
-
- assemble_tokens_to_insn ("ldah", newtok, 3, &insn);
-
- addend = tok[1];
-
-#ifdef OBJ_ECOFF
- if (addend.X_op != O_constant)
- as_bad (_("can not resolve expression"));
- addend.X_op = O_symbol;
- addend.X_add_symbol = alpha_gp_symbol;
-#endif
-
- insn.nfixups = 1;
- insn.fixups[0].exp = addend;
- insn.fixups[0].reloc = BFD_RELOC_ALPHA_GPDISP_HI16;
- insn.sequence = next_sequence_num;
-
- emit_insn (&insn);
-
- set_tok_preg (newtok[2], tok[0].X_add_number);
-
- assemble_tokens_to_insn ("lda", newtok, 3, &insn);
-
-#ifdef OBJ_ECOFF
- addend.X_add_number += 4;
-#endif
-
- insn.nfixups = 1;
- insn.fixups[0].exp = addend;
- insn.fixups[0].reloc = BFD_RELOC_ALPHA_GPDISP_LO16;
- insn.sequence = next_sequence_num--;
-
- emit_insn (&insn);
-#endif /* OBJ_ECOFF || OBJ_ELF */
-}
-
-#ifdef OBJ_EVAX
-
-/* Add symbol+addend to link pool.
- Return offset from basesym to entry in link pool.
-
- Add new fixup only if offset isn't 16bit. */
-
-valueT
-add_to_link_pool (basesym, sym, addend)
- symbolS *basesym;
- symbolS *sym;
- offsetT addend;
+create_literal_section (const char *name,
+ segT *secp,
+ symbolS **symp)
{
segT current_section = now_seg;
int current_subsec = now_subseg;
- valueT offset;
- bfd_reloc_code_real_type reloc_type;
- char *p;
- segment_info_type *seginfo = seg_info (alpha_link_section);
- fixS *fixp;
-
- offset = - *symbol_get_obj (basesym);
-
- /* @@ This assumes all entries in a given section will be of the same
- size... Probably correct, but unwise to rely on. */
- /* This must always be called with the same subsegment. */
-
- if (seginfo->frchainP)
- for (fixp = seginfo->frchainP->fix_root;
- fixp != (fixS *) NULL;
- fixp = fixp->fx_next, offset += 8)
- {
- if (fixp->fx_addsy == sym && fixp->fx_offset == addend)
- {
- if (range_signed_16 (offset))
- {
- return offset;
- }
- }
- }
-
- /* Not found in 16bit signed range. */
-
- subseg_set (alpha_link_section, 0);
- p = frag_more (8);
- memset (p, 0, 8);
-
- fix_new (frag_now, p - frag_now->fr_literal, 8, sym, addend, 0,
- BFD_RELOC_64);
+ segT new_sec;
+ *secp = new_sec = subseg_new (name, 0);
subseg_set (current_section, current_subsec);
- seginfo->literal_pool_size += 8;
- return offset;
-}
+ bfd_set_section_alignment (stdoutput, new_sec, 4);
+ bfd_set_section_flags (stdoutput, new_sec,
+ SEC_RELOC | SEC_ALLOC | SEC_LOAD | SEC_READONLY
+ | SEC_DATA);
-#endif /* OBJ_EVAX */
+ S_CLEAR_EXTERNAL (*symp = section_symbol (new_sec));
+}
/* Load a (partial) expression into a target register.
@@ -3021,11 +1173,10 @@ add_to_link_pool (basesym, sym, addend)
sequence number to use. */
static long
-load_expression (targreg, exp, pbasereg, poffset)
- int targreg;
- const expressionS *exp;
- int *pbasereg;
- expressionS *poffset;
+load_expression (int targreg,
+ const expressionS *exp,
+ int *pbasereg,
+ expressionS *poffset)
{
long emit_lituse = 0;
offsetT addend = exp->X_add_number;
@@ -3051,15 +1202,13 @@ load_expression (targreg, exp, pbasereg, poffset)
addend = 0;
}
else
- {
- lit = add_to_literal_pool (exp->X_add_symbol, 0,
- alpha_lita_section, 8);
- }
+ lit = add_to_literal_pool (exp->X_add_symbol, 0,
+ alpha_lita_section, 8);
if (lit >= 0x8000)
as_fatal (_("overflow in literal (.lita) table"));
- /* emit "ldq r, lit(gp)" */
+ /* Emit "ldq r, lit(gp)". */
if (basereg != alpha_gp_register && targreg == basereg)
{
@@ -3072,6 +1221,7 @@ load_expression (targreg, exp, pbasereg, poffset)
}
else
set_tok_reg (newtok[0], targreg);
+
set_tok_sym (newtok[1], alpha_lita_symbol, lit);
set_tok_preg (newtok[2], alpha_gp_register);
@@ -3082,7 +1232,7 @@ load_expression (targreg, exp, pbasereg, poffset)
insn.sequence = emit_lituse = next_sequence_num--;
#endif /* OBJ_ECOFF */
#ifdef OBJ_ELF
- /* emit "ldq r, gotoff(gp)" */
+ /* Emit "ldq r, gotoff(gp)". */
if (basereg != alpha_gp_register && targreg == basereg)
{
@@ -3107,9 +1257,7 @@ load_expression (targreg, exp, pbasereg, poffset)
addend = 0;
}
else
- {
- set_tok_sym (newtok[1], exp->X_add_symbol, 0);
- }
+ set_tok_sym (newtok[1], exp->X_add_symbol, 0);
set_tok_preg (newtok[2], alpha_gp_register);
@@ -3151,10 +1299,9 @@ load_expression (targreg, exp, pbasereg, poffset)
addend = 0;
}
else
- {
- link = add_to_link_pool (alpha_evax_proc.symbol,
- exp->X_add_symbol, 0);
- }
+ link = add_to_link_pool (alpha_evax_proc.symbol,
+ exp->X_add_symbol, 0);
+
set_tok_reg (newtok[0], targreg);
set_tok_const (newtok[1], link);
set_tok_preg (newtok[2], basereg);
@@ -3167,14 +1314,13 @@ load_expression (targreg, exp, pbasereg, poffset)
#ifndef OBJ_EVAX
if (basereg != alpha_gp_register && basereg != AXP_REG_ZERO)
{
- /* emit "addq r, base, r" */
+ /* Emit "addq r, base, r". */
set_tok_reg (newtok[1], basereg);
set_tok_reg (newtok[2], targreg);
assemble_tokens ("addq", newtok, 3, 0);
}
#endif
-
basereg = targreg;
}
break;
@@ -3215,9 +1361,8 @@ load_expression (targreg, exp, pbasereg, poffset)
long seq_num = next_sequence_num--;
/* For 64-bit addends, just put it in the literal pool. */
-
#ifdef OBJ_EVAX
- /* emit "ldq targreg, lit(basereg)" */
+ /* Emit "ldq targreg, lit(basereg)". */
lit = add_to_link_pool (alpha_evax_proc.symbol,
section_symbol (absolute_section), addend);
set_tok_reg (newtok[0], targreg);
@@ -3244,7 +1389,7 @@ load_expression (targreg, exp, pbasereg, poffset)
if (lit >= 0x8000)
as_fatal (_("overflow in literal (.lit8) table"));
- /* emit "lda litreg, .lit8+0x8000" */
+ /* Emit "lda litreg, .lit8+0x8000". */
if (targreg == basereg)
{
@@ -3278,7 +1423,7 @@ load_expression (targreg, exp, pbasereg, poffset)
emit_insn (&insn);
- /* emit "ldq litreg, lit(litreg)" */
+ /* Emit "ldq litreg, lit(litreg)". */
set_tok_const (newtok[1], lit);
set_tok_preg (newtok[2], newtok[0].X_add_number);
@@ -3294,7 +1439,7 @@ load_expression (targreg, exp, pbasereg, poffset)
emit_insn (&insn);
- /* emit "addq litreg, base, target" */
+ /* Emit "addq litreg, base, target". */
if (basereg != AXP_REG_ZERO)
{
@@ -3312,7 +1457,7 @@ load_expression (targreg, exp, pbasereg, poffset)
{
offsetT low, high, extra, tmp;
- /* for 32-bit operands, break up the addend */
+ /* For 32-bit operands, break up the addend. */
low = sign_extend_16 (addend);
tmp = addend - low;
@@ -3332,7 +1477,7 @@ load_expression (targreg, exp, pbasereg, poffset)
if (extra)
{
- /* emit "ldah r, extra(r) */
+ /* Emit "ldah r, extra(r). */
set_tok_const (newtok[1], extra);
assemble_tokens ("ldah", newtok, 3, 0);
set_tok_preg (newtok[2], basereg = targreg);
@@ -3340,7 +1485,7 @@ load_expression (targreg, exp, pbasereg, poffset)
if (high)
{
- /* emit "ldah r, high(r) */
+ /* Emit "ldah r, high(r). */
set_tok_const (newtok[1], high);
assemble_tokens ("ldah", newtok, 3, 0);
basereg = targreg;
@@ -3349,7 +1494,7 @@ load_expression (targreg, exp, pbasereg, poffset)
if ((low && !poffset) || (!poffset && basereg != targreg))
{
- /* emit "lda r, low(base)" */
+ /* Emit "lda r, low(base)". */
set_tok_const (newtok[1], low);
assemble_tokens ("lda", newtok, 3, 0);
basereg = targreg;
@@ -3369,10 +1514,9 @@ load_expression (targreg, exp, pbasereg, poffset)
large constants. */
static void
-emit_lda (tok, ntok, unused)
- const expressionS *tok;
- int ntok;
- const PTR unused ATTRIBUTE_UNUSED;
+emit_lda (const expressionS *tok,
+ int ntok,
+ const void * unused ATTRIBUTE_UNUSED)
{
int basereg;
@@ -3388,10 +1532,9 @@ emit_lda (tok, ntok, unused)
as an implied base register. */
static void
-emit_ldah (tok, ntok, unused)
- const expressionS *tok;
- int ntok ATTRIBUTE_UNUSED;
- const PTR unused ATTRIBUTE_UNUSED;
+emit_ldah (const expressionS *tok,
+ int ntok ATTRIBUTE_UNUSED,
+ const void * unused ATTRIBUTE_UNUSED)
{
expressionS newtok[3];
@@ -3402,15 +1545,455 @@ emit_ldah (tok, ntok, unused)
assemble_tokens ("ldah", newtok, 3, 0);
}
+/* Called internally to handle all alignment needs. This takes care
+ of eliding calls to frag_align if'n the cached current alignment
+ says we've already got it, as well as taking care of the auto-align
+ feature wrt labels. */
+
+static void
+alpha_align (int n,
+ char *pfill,
+ symbolS *label,
+ int force ATTRIBUTE_UNUSED)
+{
+ if (alpha_current_align >= n)
+ return;
+
+ if (pfill == NULL)
+ {
+ if (subseg_text_p (now_seg))
+ frag_align_code (n, 0);
+ else
+ frag_align (n, 0, 0);
+ }
+ else
+ frag_align (n, *pfill, 0);
+
+ alpha_current_align = n;
+
+ if (label != NULL && S_GET_SEGMENT (label) == now_seg)
+ {
+ symbol_set_frag (label, frag_now);
+ S_SET_VALUE (label, (valueT) frag_now_fix ());
+ }
+
+ record_alignment (now_seg, n);
+
+ /* ??? If alpha_flag_relax && force && elf, record the requested alignment
+ in a reloc for the linker to see. */
+}
+
+/* Actually output an instruction with its fixup. */
+
+static void
+emit_insn (struct alpha_insn *insn)
+{
+ char *f;
+ int i;
+
+ /* Take care of alignment duties. */
+ if (alpha_auto_align_on && alpha_current_align < 2)
+ alpha_align (2, (char *) NULL, alpha_insn_label, 0);
+ if (alpha_current_align > 2)
+ alpha_current_align = 2;
+ alpha_insn_label = NULL;
+
+ /* Write out the instruction. */
+ f = frag_more (4);
+ md_number_to_chars (f, insn->insn, 4);
+
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (4);
+#endif
+
+ /* Apply the fixups in order. */
+ for (i = 0; i < insn->nfixups; ++i)
+ {
+ const struct alpha_operand *operand = (const struct alpha_operand *) 0;
+ struct alpha_fixup *fixup = &insn->fixups[i];
+ struct alpha_reloc_tag *info = NULL;
+ int size, pcrel;
+ fixS *fixP;
+
+ /* Some fixups are only used internally and so have no howto. */
+ if ((int) fixup->reloc < 0)
+ {
+ operand = &alpha_operands[-(int) fixup->reloc];
+ size = 4;
+ pcrel = ((operand->flags & AXP_OPERAND_RELATIVE) != 0);
+ }
+ else if (fixup->reloc > BFD_RELOC_UNUSED
+ || fixup->reloc == BFD_RELOC_ALPHA_GPDISP_HI16
+ || fixup->reloc == BFD_RELOC_ALPHA_GPDISP_LO16)
+ {
+ size = 2;
+ pcrel = 0;
+ }
+ else
+ {
+ reloc_howto_type *reloc_howto
+ = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
+ assert (reloc_howto);
+
+ size = bfd_get_reloc_size (reloc_howto);
+ assert (size >= 1 && size <= 4);
+
+ pcrel = reloc_howto->pc_relative;
+ }
+
+ fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size,
+ &fixup->exp, pcrel, fixup->reloc);
+
+ /* Turn off complaints that the addend is too large for some fixups,
+ and copy in the sequence number for the explicit relocations. */
+ switch (fixup->reloc)
+ {
+ case BFD_RELOC_ALPHA_HINT:
+ case BFD_RELOC_GPREL32:
+ case BFD_RELOC_GPREL16:
+ case BFD_RELOC_ALPHA_GPREL_HI16:
+ case BFD_RELOC_ALPHA_GPREL_LO16:
+ case BFD_RELOC_ALPHA_GOTDTPREL16:
+ case BFD_RELOC_ALPHA_DTPREL_HI16:
+ case BFD_RELOC_ALPHA_DTPREL_LO16:
+ case BFD_RELOC_ALPHA_DTPREL16:
+ case BFD_RELOC_ALPHA_GOTTPREL16:
+ case BFD_RELOC_ALPHA_TPREL_HI16:
+ case BFD_RELOC_ALPHA_TPREL_LO16:
+ case BFD_RELOC_ALPHA_TPREL16:
+ fixP->fx_no_overflow = 1;
+ break;
+
+ case BFD_RELOC_ALPHA_GPDISP_HI16:
+ fixP->fx_no_overflow = 1;
+ fixP->fx_addsy = section_symbol (now_seg);
+ fixP->fx_offset = 0;
+
+ info = get_alpha_reloc_tag (insn->sequence);
+ if (++info->n_master > 1)
+ as_bad (_("too many ldah insns for !gpdisp!%ld"), insn->sequence);
+ if (info->segment != now_seg)
+ as_bad (_("both insns for !gpdisp!%ld must be in the same section"),
+ insn->sequence);
+ fixP->tc_fix_data.info = info;
+ break;
+
+ case BFD_RELOC_ALPHA_GPDISP_LO16:
+ fixP->fx_no_overflow = 1;
+
+ info = get_alpha_reloc_tag (insn->sequence);
+ if (++info->n_slaves > 1)
+ as_bad (_("too many lda insns for !gpdisp!%ld"), insn->sequence);
+ if (info->segment != now_seg)
+ as_bad (_("both insns for !gpdisp!%ld must be in the same section"),
+ insn->sequence);
+ fixP->tc_fix_data.info = info;
+ info->slaves = fixP;
+ break;
+
+ case BFD_RELOC_ALPHA_LITERAL:
+ case BFD_RELOC_ALPHA_ELF_LITERAL:
+ fixP->fx_no_overflow = 1;
+
+ if (insn->sequence == 0)
+ break;
+ info = get_alpha_reloc_tag (insn->sequence);
+ info->master = fixP;
+ info->n_master++;
+ if (info->segment != now_seg)
+ info->multi_section_p = 1;
+ fixP->tc_fix_data.info = info;
+ break;
+
+#ifdef RELOC_OP_P
+ case DUMMY_RELOC_LITUSE_ADDR:
+ fixP->fx_offset = LITUSE_ALPHA_ADDR;
+ goto do_lituse;
+ case DUMMY_RELOC_LITUSE_BASE:
+ fixP->fx_offset = LITUSE_ALPHA_BASE;
+ goto do_lituse;
+ case DUMMY_RELOC_LITUSE_BYTOFF:
+ fixP->fx_offset = LITUSE_ALPHA_BYTOFF;
+ goto do_lituse;
+ case DUMMY_RELOC_LITUSE_JSR:
+ fixP->fx_offset = LITUSE_ALPHA_JSR;
+ goto do_lituse;
+ case DUMMY_RELOC_LITUSE_TLSGD:
+ fixP->fx_offset = LITUSE_ALPHA_TLSGD;
+ goto do_lituse;
+ case DUMMY_RELOC_LITUSE_TLSLDM:
+ fixP->fx_offset = LITUSE_ALPHA_TLSLDM;
+ goto do_lituse;
+ case DUMMY_RELOC_LITUSE_JSRDIRECT:
+ fixP->fx_offset = LITUSE_ALPHA_JSRDIRECT;
+ goto do_lituse;
+ do_lituse:
+ fixP->fx_addsy = section_symbol (now_seg);
+ fixP->fx_r_type = BFD_RELOC_ALPHA_LITUSE;
+
+ info = get_alpha_reloc_tag (insn->sequence);
+ if (fixup->reloc == DUMMY_RELOC_LITUSE_TLSGD)
+ info->saw_lu_tlsgd = 1;
+ else if (fixup->reloc == DUMMY_RELOC_LITUSE_TLSLDM)
+ info->saw_lu_tlsldm = 1;
+ if (++info->n_slaves > 1)
+ {
+ if (info->saw_lu_tlsgd)
+ as_bad (_("too many lituse insns for !lituse_tlsgd!%ld"),
+ insn->sequence);
+ else if (info->saw_lu_tlsldm)
+ as_bad (_("too many lituse insns for !lituse_tlsldm!%ld"),
+ insn->sequence);
+ }
+ fixP->tc_fix_data.info = info;
+ fixP->tc_fix_data.next_reloc = info->slaves;
+ info->slaves = fixP;
+ if (info->segment != now_seg)
+ info->multi_section_p = 1;
+ break;
+
+ case BFD_RELOC_ALPHA_TLSGD:
+ fixP->fx_no_overflow = 1;
+
+ if (insn->sequence == 0)
+ break;
+ info = get_alpha_reloc_tag (insn->sequence);
+ if (info->saw_tlsgd)
+ as_bad (_("duplicate !tlsgd!%ld"), insn->sequence);
+ else if (info->saw_tlsldm)
+ as_bad (_("sequence number in use for !tlsldm!%ld"),
+ insn->sequence);
+ else
+ info->saw_tlsgd = 1;
+ fixP->tc_fix_data.info = info;
+ break;
+
+ case BFD_RELOC_ALPHA_TLSLDM:
+ fixP->fx_no_overflow = 1;
+
+ if (insn->sequence == 0)
+ break;
+ info = get_alpha_reloc_tag (insn->sequence);
+ if (info->saw_tlsldm)
+ as_bad (_("duplicate !tlsldm!%ld"), insn->sequence);
+ else if (info->saw_tlsgd)
+ as_bad (_("sequence number in use for !tlsgd!%ld"),
+ insn->sequence);
+ else
+ info->saw_tlsldm = 1;
+ fixP->tc_fix_data.info = info;
+ break;
+#endif
+ default:
+ if ((int) fixup->reloc < 0)
+ {
+ if (operand->flags & AXP_OPERAND_NOOVERFLOW)
+ fixP->fx_no_overflow = 1;
+ }
+ break;
+ }
+ }
+}
+
+/* Insert an operand value into an instruction. */
+
+static unsigned
+insert_operand (unsigned insn,
+ const struct alpha_operand *operand,
+ offsetT val,
+ char *file,
+ unsigned line)
+{
+ if (operand->bits != 32 && !(operand->flags & AXP_OPERAND_NOOVERFLOW))
+ {
+ offsetT min, max;
+
+ if (operand->flags & AXP_OPERAND_SIGNED)
+ {
+ max = (1 << (operand->bits - 1)) - 1;
+ min = -(1 << (operand->bits - 1));
+ }
+ else
+ {
+ max = (1 << operand->bits) - 1;
+ min = 0;
+ }
+
+ if (val < min || val > max)
+ as_warn_value_out_of_range (_("operand"), val, min, max, file, line);
+ }
+
+ if (operand->insert)
+ {
+ const char *errmsg = NULL;
+
+ insn = (*operand->insert) (insn, val, &errmsg);
+ if (errmsg)
+ as_warn (errmsg);
+ }
+ else
+ insn |= ((val & ((1 << operand->bits) - 1)) << operand->shift);
+
+ return insn;
+}
+
+/* Turn an opcode description and a set of arguments into
+ an instruction and a fixup. */
+
+static void
+assemble_insn (const struct alpha_opcode *opcode,
+ const expressionS *tok,
+ int ntok,
+ struct alpha_insn *insn,
+ bfd_reloc_code_real_type reloc)
+{
+ const struct alpha_operand *reloc_operand = NULL;
+ const expressionS *reloc_exp = NULL;
+ const unsigned char *argidx;
+ unsigned image;
+ int tokidx = 0;
+
+ memset (insn, 0, sizeof (*insn));
+ image = opcode->opcode;
+
+ for (argidx = opcode->operands; *argidx; ++argidx)
+ {
+ const struct alpha_operand *operand = &alpha_operands[*argidx];
+ const expressionS *t = (const expressionS *) 0;
+
+ if (operand->flags & AXP_OPERAND_FAKE)
+ {
+ /* Fake operands take no value and generate no fixup. */
+ image = insert_operand (image, operand, 0, NULL, 0);
+ continue;
+ }
+
+ if (tokidx >= ntok)
+ {
+ switch (operand->flags & AXP_OPERAND_OPTIONAL_MASK)
+ {
+ case AXP_OPERAND_DEFAULT_FIRST:
+ t = &tok[0];
+ break;
+ case AXP_OPERAND_DEFAULT_SECOND:
+ t = &tok[1];
+ break;
+ case AXP_OPERAND_DEFAULT_ZERO:
+ {
+ static expressionS zero_exp;
+ t = &zero_exp;
+ zero_exp.X_op = O_constant;
+ zero_exp.X_unsigned = 1;
+ }
+ break;
+ default:
+ abort ();
+ }
+ }
+ else
+ t = &tok[tokidx++];
+
+ switch (t->X_op)
+ {
+ case O_register:
+ case O_pregister:
+ case O_cpregister:
+ image = insert_operand (image, operand, regno (t->X_add_number),
+ NULL, 0);
+ break;
+
+ case O_constant:
+ image = insert_operand (image, operand, t->X_add_number, NULL, 0);
+ assert (reloc_operand == NULL);
+ reloc_operand = operand;
+ reloc_exp = t;
+ break;
+
+ default:
+ /* This is only 0 for fields that should contain registers,
+ which means this pattern shouldn't have matched. */
+ if (operand->default_reloc == 0)
+ abort ();
+
+ /* There is one special case for which an insn receives two
+ relocations, and thus the user-supplied reloc does not
+ override the operand reloc. */
+ if (operand->default_reloc == BFD_RELOC_ALPHA_HINT)
+ {
+ struct alpha_fixup *fixup;
+
+ if (insn->nfixups >= MAX_INSN_FIXUPS)
+ as_fatal (_("too many fixups"));
+
+ fixup = &insn->fixups[insn->nfixups++];
+ fixup->exp = *t;
+ fixup->reloc = BFD_RELOC_ALPHA_HINT;
+ }
+ else
+ {
+ if (reloc == BFD_RELOC_UNUSED)
+ reloc = operand->default_reloc;
+
+ assert (reloc_operand == NULL);
+ reloc_operand = operand;
+ reloc_exp = t;
+ }
+ break;
+ }
+ }
+
+ if (reloc != BFD_RELOC_UNUSED)
+ {
+ struct alpha_fixup *fixup;
+
+ if (insn->nfixups >= MAX_INSN_FIXUPS)
+ as_fatal (_("too many fixups"));
+
+ /* ??? My but this is hacky. But the OSF/1 assembler uses the same
+ relocation tag for both ldah and lda with gpdisp. Choose the
+ correct internal relocation based on the opcode. */
+ if (reloc == BFD_RELOC_ALPHA_GPDISP)
+ {
+ if (strcmp (opcode->name, "ldah") == 0)
+ reloc = BFD_RELOC_ALPHA_GPDISP_HI16;
+ else if (strcmp (opcode->name, "lda") == 0)
+ reloc = BFD_RELOC_ALPHA_GPDISP_LO16;
+ else
+ as_bad (_("invalid relocation for instruction"));
+ }
+
+ /* If this is a real relocation (as opposed to a lituse hint), then
+ the relocation width should match the operand width. */
+ else if (reloc < BFD_RELOC_UNUSED)
+ {
+ reloc_howto_type *reloc_howto
+ = bfd_reloc_type_lookup (stdoutput, reloc);
+ if (reloc_howto->bitsize != reloc_operand->bits)
+ {
+ as_bad (_("invalid relocation for field"));
+ return;
+ }
+ }
+
+ fixup = &insn->fixups[insn->nfixups++];
+ if (reloc_exp)
+ fixup->exp = *reloc_exp;
+ else
+ fixup->exp.X_op = O_absent;
+ fixup->reloc = reloc;
+ }
+
+ insn->insn = image;
+}
+
/* Handle all "simple" integer register loads -- ldq, ldq_l, ldq_u,
etc. They differ from the real instructions in that they do simple
expressions like the lda macro. */
static void
-emit_ir_load (tok, ntok, opname)
- const expressionS *tok;
- int ntok;
- const PTR opname;
+emit_ir_load (const expressionS *tok,
+ int ntok,
+ const void * opname)
{
int basereg;
long lituse;
@@ -3446,10 +2029,9 @@ emit_ir_load (tok, ntok, opname)
Again, we handle simple expressions. */
static void
-emit_loadstore (tok, ntok, opname)
- const expressionS *tok;
- int ntok;
- const PTR opname;
+emit_loadstore (const expressionS *tok,
+ int ntok,
+ const void * opname)
{
int basereg;
long lituse;
@@ -3494,10 +2076,9 @@ emit_loadstore (tok, ntok, opname)
/* Load a half-word or byte as an unsigned value. */
static void
-emit_ldXu (tok, ntok, vlgsize)
- const expressionS *tok;
- int ntok;
- const PTR vlgsize;
+emit_ldXu (const expressionS *tok,
+ int ntok,
+ const void * vlgsize)
{
if (alpha_target & AXP_OPCODE_BWX)
emit_ir_load (tok, ntok, ldXu_op[(long) vlgsize]);
@@ -3517,12 +2098,10 @@ emit_ldXu (tok, ntok, vlgsize)
else
basereg = tok[2].X_add_number;
- /* emit "lda $at, exp" */
-
+ /* Emit "lda $at, exp". */
lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, NULL);
- /* emit "ldq_u targ, 0($at)" */
-
+ /* Emit "ldq_u targ, 0($at)". */
newtok[0] = tok[0];
set_tok_const (newtok[1], 0);
set_tok_preg (newtok[2], basereg);
@@ -3539,8 +2118,7 @@ emit_ldXu (tok, ntok, vlgsize)
emit_insn (&insn);
- /* emit "extXl targ, $at, targ" */
-
+ /* Emit "extXl targ, $at, targ". */
set_tok_reg (newtok[1], basereg);
newtok[2] = newtok[0];
assemble_tokens_to_insn (extXl_op[(long) vlgsize], newtok, 3, &insn);
@@ -3561,10 +2139,9 @@ emit_ldXu (tok, ntok, vlgsize)
/* Load a half-word or byte as a signed value. */
static void
-emit_ldX (tok, ntok, vlgsize)
- const expressionS *tok;
- int ntok;
- const PTR vlgsize;
+emit_ldX (const expressionS *tok,
+ int ntok,
+ const void * vlgsize)
{
emit_ldXu (tok, ntok, vlgsize);
assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1);
@@ -3574,10 +2151,9 @@ emit_ldX (tok, ntok, vlgsize)
value. */
static void
-emit_uldXu (tok, ntok, vlgsize)
- const expressionS *tok;
- int ntok;
- const PTR vlgsize;
+emit_uldXu (const expressionS *tok,
+ int ntok,
+ const void * vlgsize)
{
long lgsize = (long) vlgsize;
expressionS newtok[3];
@@ -3585,40 +2161,34 @@ emit_uldXu (tok, ntok, vlgsize)
if (alpha_noat_on)
as_bad (_("macro requires $at register while noat in effect"));
- /* emit "lda $at, exp" */
-
+ /* Emit "lda $at, exp". */
memcpy (newtok, tok, sizeof (expressionS) * ntok);
newtok[0].X_add_number = AXP_REG_AT;
assemble_tokens ("lda", newtok, ntok, 1);
- /* emit "ldq_u $t9, 0($at)" */
-
+ /* Emit "ldq_u $t9, 0($at)". */
set_tok_reg (newtok[0], AXP_REG_T9);
set_tok_const (newtok[1], 0);
set_tok_preg (newtok[2], AXP_REG_AT);
assemble_tokens ("ldq_u", newtok, 3, 1);
- /* emit "ldq_u $t10, size-1($at)" */
-
+ /* Emit "ldq_u $t10, size-1($at)". */
set_tok_reg (newtok[0], AXP_REG_T10);
set_tok_const (newtok[1], (1 << lgsize) - 1);
assemble_tokens ("ldq_u", newtok, 3, 1);
- /* emit "extXl $t9, $at, $t9" */
-
+ /* Emit "extXl $t9, $at, $t9". */
set_tok_reg (newtok[0], AXP_REG_T9);
set_tok_reg (newtok[1], AXP_REG_AT);
set_tok_reg (newtok[2], AXP_REG_T9);
assemble_tokens (extXl_op[lgsize], newtok, 3, 1);
- /* emit "extXh $t10, $at, $t10" */
-
+ /* Emit "extXh $t10, $at, $t10". */
set_tok_reg (newtok[0], AXP_REG_T10);
set_tok_reg (newtok[2], AXP_REG_T10);
assemble_tokens (extXh_op[lgsize], newtok, 3, 1);
- /* emit "or $t9, $t10, targ" */
-
+ /* Emit "or $t9, $t10, targ". */
set_tok_reg (newtok[0], AXP_REG_T9);
set_tok_reg (newtok[1], AXP_REG_T10);
newtok[2] = tok[0];
@@ -3630,10 +2200,9 @@ emit_uldXu (tok, ntok, vlgsize)
don't have to do the sign extension. */
static void
-emit_uldX (tok, ntok, vlgsize)
- const expressionS *tok;
- int ntok;
- const PTR vlgsize;
+emit_uldX (const expressionS *tok,
+ int ntok,
+ const void * vlgsize)
{
emit_uldXu (tok, ntok, vlgsize);
assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1);
@@ -3642,10 +2211,9 @@ emit_uldX (tok, ntok, vlgsize)
/* Implement the ldil macro. */
static void
-emit_ldil (tok, ntok, unused)
- const expressionS *tok;
- int ntok;
- const PTR unused ATTRIBUTE_UNUSED;
+emit_ldil (const expressionS *tok,
+ int ntok,
+ const void * unused ATTRIBUTE_UNUSED)
{
expressionS newtok[2];
@@ -3658,10 +2226,9 @@ emit_ldil (tok, ntok, unused)
/* Store a half-word or byte. */
static void
-emit_stX (tok, ntok, vlgsize)
- const expressionS *tok;
- int ntok;
- const PTR vlgsize;
+emit_stX (const expressionS *tok,
+ int ntok,
+ const void * vlgsize)
{
int lgsize = (int) (long) vlgsize;
@@ -3683,12 +2250,10 @@ emit_stX (tok, ntok, vlgsize)
else
basereg = tok[2].X_add_number;
- /* emit "lda $at, exp" */
-
+ /* Emit "lda $at, exp". */
lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, NULL);
- /* emit "ldq_u $t9, 0($at)" */
-
+ /* Emit "ldq_u $t9, 0($at)". */
set_tok_reg (newtok[0], AXP_REG_T9);
set_tok_const (newtok[1], 0);
set_tok_preg (newtok[2], basereg);
@@ -3705,8 +2270,7 @@ emit_stX (tok, ntok, vlgsize)
emit_insn (&insn);
- /* emit "insXl src, $at, $t10" */
-
+ /* Emit "insXl src, $at, $t10". */
newtok[0] = tok[0];
set_tok_reg (newtok[1], basereg);
set_tok_reg (newtok[2], AXP_REG_T10);
@@ -3723,8 +2287,7 @@ emit_stX (tok, ntok, vlgsize)
emit_insn (&insn);
- /* emit "mskXl $t9, $at, $t9" */
-
+ /* Emit "mskXl $t9, $at, $t9". */
set_tok_reg (newtok[0], AXP_REG_T9);
newtok[2] = newtok[0];
assemble_tokens_to_insn (mskXl_op[lgsize], newtok, 3, &insn);
@@ -3740,13 +2303,11 @@ emit_stX (tok, ntok, vlgsize)
emit_insn (&insn);
- /* emit "or $t9, $t10, $t9" */
-
+ /* Emit "or $t9, $t10, $t9". */
set_tok_reg (newtok[1], AXP_REG_T10);
assemble_tokens ("or", newtok, 3, 1);
- /* emit "stq_u $t9, 0($at) */
-
+ /* Emit "stq_u $t9, 0($at). */
set_tok_const(newtok[1], 0);
set_tok_preg (newtok[2], AXP_REG_AT);
assemble_tokens_to_insn ("stq_u", newtok, 3, &insn);
@@ -3767,80 +2328,68 @@ emit_stX (tok, ntok, vlgsize)
/* Store an integer to an unaligned address. */
static void
-emit_ustX (tok, ntok, vlgsize)
- const expressionS *tok;
- int ntok;
- const PTR vlgsize;
+emit_ustX (const expressionS *tok,
+ int ntok,
+ const void * vlgsize)
{
int lgsize = (int) (long) vlgsize;
expressionS newtok[3];
- /* emit "lda $at, exp" */
-
+ /* Emit "lda $at, exp". */
memcpy (newtok, tok, sizeof (expressionS) * ntok);
newtok[0].X_add_number = AXP_REG_AT;
assemble_tokens ("lda", newtok, ntok, 1);
- /* emit "ldq_u $9, 0($at)" */
-
+ /* Emit "ldq_u $9, 0($at)". */
set_tok_reg (newtok[0], AXP_REG_T9);
set_tok_const (newtok[1], 0);
set_tok_preg (newtok[2], AXP_REG_AT);
assemble_tokens ("ldq_u", newtok, 3, 1);
- /* emit "ldq_u $10, size-1($at)" */
-
+ /* Emit "ldq_u $10, size-1($at)". */
set_tok_reg (newtok[0], AXP_REG_T10);
set_tok_const (newtok[1], (1 << lgsize) - 1);
assemble_tokens ("ldq_u", newtok, 3, 1);
- /* emit "insXl src, $at, $t11" */
-
+ /* Emit "insXl src, $at, $t11". */
newtok[0] = tok[0];
set_tok_reg (newtok[1], AXP_REG_AT);
set_tok_reg (newtok[2], AXP_REG_T11);
assemble_tokens (insXl_op[lgsize], newtok, 3, 1);
- /* emit "insXh src, $at, $t12" */
-
+ /* Emit "insXh src, $at, $t12". */
set_tok_reg (newtok[2], AXP_REG_T12);
assemble_tokens (insXh_op[lgsize], newtok, 3, 1);
- /* emit "mskXl $t9, $at, $t9" */
-
+ /* Emit "mskXl $t9, $at, $t9". */
set_tok_reg (newtok[0], AXP_REG_T9);
newtok[2] = newtok[0];
assemble_tokens (mskXl_op[lgsize], newtok, 3, 1);
- /* emit "mskXh $t10, $at, $t10" */
-
+ /* Emit "mskXh $t10, $at, $t10". */
set_tok_reg (newtok[0], AXP_REG_T10);
newtok[2] = newtok[0];
assemble_tokens (mskXh_op[lgsize], newtok, 3, 1);
- /* emit "or $t9, $t11, $t9" */
-
+ /* Emit "or $t9, $t11, $t9". */
set_tok_reg (newtok[0], AXP_REG_T9);
set_tok_reg (newtok[1], AXP_REG_T11);
newtok[2] = newtok[0];
assemble_tokens ("or", newtok, 3, 1);
- /* emit "or $t10, $t12, $t10" */
-
+ /* Emit "or $t10, $t12, $t10". */
set_tok_reg (newtok[0], AXP_REG_T10);
set_tok_reg (newtok[1], AXP_REG_T12);
newtok[2] = newtok[0];
assemble_tokens ("or", newtok, 3, 1);
- /* emit "stq_u $t9, 0($at)" */
-
+ /* 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)" */
-
+ /* Emit "stq_u $t10, size-1($at)". */
set_tok_reg (newtok[0], AXP_REG_T10);
set_tok_const (newtok[1], (1 << lgsize) - 1);
assemble_tokens ("stq_u", newtok, 3, 1);
@@ -3850,10 +2399,9 @@ emit_ustX (tok, ntok, vlgsize)
implemented as "addl $31, $r, $t" in the opcode table. */
static void
-emit_sextX (tok, ntok, vlgsize)
- const expressionS *tok;
- int ntok;
- const PTR vlgsize;
+emit_sextX (const expressionS *tok,
+ int ntok,
+ const void * vlgsize)
{
long lgsize = (long) vlgsize;
@@ -3864,15 +2412,13 @@ emit_sextX (tok, ntok, vlgsize)
int bitshift = 64 - 8 * (1 << lgsize);
expressionS newtok[3];
- /* emit "sll src,bits,dst" */
-
+ /* Emit "sll src,bits,dst". */
newtok[0] = tok[0];
set_tok_const (newtok[1], bitshift);
newtok[2] = tok[ntok - 1];
assemble_tokens ("sll", newtok, 3, 1);
- /* emit "sra dst,bits,dst" */
-
+ /* Emit "sra dst,bits,dst". */
newtok[0] = newtok[2];
assemble_tokens ("sra", newtok, 3, 1);
}
@@ -3886,13 +2432,12 @@ emit_sextX (tok, ntok, vlgsize)
Don't clobber PV and RA. */
static void
-emit_division (tok, ntok, symname)
- const expressionS *tok;
- int ntok;
- const PTR symname;
+emit_division (const expressionS *tok,
+ int ntok,
+ const void * symname)
{
/* DIVISION and MODULUS. Yech.
-
+
Convert
OP x,y,result
to
@@ -3901,7 +2446,7 @@ emit_division (tok, ntok, symname)
lda AT,__OP
jsr AT,(AT),0
mov R0,result
-
+
with appropriate optimizations if R0,R16,R17 are the registers
specified by the compiler. */
@@ -3921,7 +2466,6 @@ emit_division (tok, ntok, symname)
if (yr == AXP_REG_R16 && xr == AXP_REG_R17)
{
/* They are in exactly the wrong order -- swap through AT. */
-
if (alpha_noat_on)
as_bad (_("macro requires $at register while noat in effect"));
@@ -3985,10 +2529,9 @@ emit_division (tok, ntok, symname)
#else /* !OBJ_EVAX */
static void
-emit_division (tok, ntok, symname)
- const expressionS *tok;
- int ntok;
- const PTR symname;
+emit_division (const expressionS *tok,
+ int ntok,
+ const void * symname)
{
/* DIVISION and MODULUS. Yech.
Convert
@@ -3999,7 +2542,7 @@ emit_division (tok, ntok, symname)
mov y,t11
jsr t9,(pv),__OP
mov t12,result
-
+
with appropriate optimizations if t10,t11,t12 are the registers
specified by the compiler. */
@@ -4092,10 +2635,9 @@ FIXME
everything. */
static void
-emit_jsrjmp (tok, ntok, vopname)
- const expressionS *tok;
- int ntok;
- const PTR vopname;
+emit_jsrjmp (const expressionS *tok,
+ int ntok,
+ const void * vopname)
{
const char *opname = (const char *) vopname;
struct alpha_insn insn;
@@ -4114,7 +2656,7 @@ emit_jsrjmp (tok, ntok, vopname)
(tok[tokidx].X_op == O_pregister || tok[tokidx].X_op == O_cpregister))
r = regno (tok[tokidx++].X_add_number);
#ifdef OBJ_EVAX
- /* keep register if jsr $n.<sym> */
+ /* Keep register if jsr $n.<sym>. */
#else
else
{
@@ -4152,10 +2694,9 @@ emit_jsrjmp (tok, ntok, vopname)
counterparts in that everything can be defaulted. */
static void
-emit_retjcr (tok, ntok, vopname)
- const expressionS *tok;
- int ntok;
- const PTR vopname;
+emit_retjcr (const expressionS *tok,
+ int ntok,
+ const void * vopname)
{
const char *opname = (const char *) vopname;
expressionS newtok[3];
@@ -4183,6 +2724,482 @@ emit_retjcr (tok, ntok, vopname)
assemble_tokens (opname, newtok, 3, 0);
}
+
+/* Implement the ldgp macro. */
+
+static void
+emit_ldgp (const expressionS *tok,
+ int ntok ATTRIBUTE_UNUSED,
+ const void * unused ATTRIBUTE_UNUSED)
+{
+#ifdef OBJ_AOUT
+FIXME
+#endif
+#if defined(OBJ_ECOFF) || defined(OBJ_ELF)
+ /* from "ldgp r1,n(r2)", generate "ldah r1,X(R2); lda r1,Y(r1)"
+ with appropriate constants and relocations. */
+ struct alpha_insn insn;
+ expressionS newtok[3];
+ expressionS addend;
+
+#ifdef OBJ_ECOFF
+ if (regno (tok[2].X_add_number) == AXP_REG_PV)
+ ecoff_set_gp_prolog_size (0);
+#endif
+
+ newtok[0] = tok[0];
+ set_tok_const (newtok[1], 0);
+ newtok[2] = tok[2];
+
+ assemble_tokens_to_insn ("ldah", newtok, 3, &insn);
+
+ addend = tok[1];
+
+#ifdef OBJ_ECOFF
+ if (addend.X_op != O_constant)
+ as_bad (_("can not resolve expression"));
+ addend.X_op = O_symbol;
+ addend.X_add_symbol = alpha_gp_symbol;
+#endif
+
+ insn.nfixups = 1;
+ insn.fixups[0].exp = addend;
+ insn.fixups[0].reloc = BFD_RELOC_ALPHA_GPDISP_HI16;
+ insn.sequence = next_sequence_num;
+
+ emit_insn (&insn);
+
+ set_tok_preg (newtok[2], tok[0].X_add_number);
+
+ assemble_tokens_to_insn ("lda", newtok, 3, &insn);
+
+#ifdef OBJ_ECOFF
+ addend.X_add_number += 4;
+#endif
+
+ insn.nfixups = 1;
+ insn.fixups[0].exp = addend;
+ insn.fixups[0].reloc = BFD_RELOC_ALPHA_GPDISP_LO16;
+ insn.sequence = next_sequence_num--;
+
+ emit_insn (&insn);
+#endif /* OBJ_ECOFF || OBJ_ELF */
+}
+
+/* The macro table. */
+
+static const struct alpha_macro alpha_macros[] =
+{
+/* Load/Store macros. */
+ { "lda", emit_lda, NULL,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldah", emit_ldah, NULL,
+ { MACRO_IR, MACRO_EXP, MACRO_EOA } },
+
+ { "ldl", emit_ir_load, "ldl",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldl_l", emit_ir_load, "ldl_l",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldq", emit_ir_load, "ldq",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldq_l", emit_ir_load, "ldq_l",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldq_u", emit_ir_load, "ldq_u",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldf", emit_loadstore, "ldf",
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldg", emit_loadstore, "ldg",
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "lds", emit_loadstore, "lds",
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldt", emit_loadstore, "ldt",
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+
+ { "ldb", emit_ldX, (void *) 0,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldbu", emit_ldXu, (void *) 0,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldw", emit_ldX, (void *) 1,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ldwu", emit_ldXu, (void *) 1,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+
+ { "uldw", emit_uldX, (void *) 1,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "uldwu", emit_uldXu, (void *) 1,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "uldl", emit_uldX, (void *) 2,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "uldlu", emit_uldXu, (void *) 2,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "uldq", emit_uldXu, (void *) 3,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+
+ { "ldgp", emit_ldgp, NULL,
+ { MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA } },
+
+ { "ldi", emit_lda, NULL,
+ { MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { "ldil", emit_ldil, NULL,
+ { MACRO_IR, MACRO_EXP, MACRO_EOA } },
+ { "ldiq", emit_lda, NULL,
+ { MACRO_IR, MACRO_EXP, MACRO_EOA } },
+
+ { "stl", emit_loadstore, "stl",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "stl_c", emit_loadstore, "stl_c",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "stq", emit_loadstore, "stq",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "stq_c", emit_loadstore, "stq_c",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "stq_u", emit_loadstore, "stq_u",
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "stf", emit_loadstore, "stf",
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "stg", emit_loadstore, "stg",
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "sts", emit_loadstore, "sts",
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "stt", emit_loadstore, "stt",
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+
+ { "stb", emit_stX, (void *) 0,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "stw", emit_stX, (void *) 1,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ustw", emit_ustX, (void *) 1,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ustl", emit_ustX, (void *) 2,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+ { "ustq", emit_ustX, (void *) 3,
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
+
+/* Arithmetic macros. */
+
+ { "sextb", emit_sextX, (void *) 0,
+ { MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EOA,
+ /* MACRO_EXP, MACRO_IR, MACRO_EOA */ } },
+ { "sextw", emit_sextX, (void *) 1,
+ { MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EOA,
+ /* MACRO_EXP, MACRO_IR, MACRO_EOA */ } },
+
+ { "divl", emit_division, "__divl",
+ { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_IR, MACRO_EOA,
+ /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
+ { "divlu", emit_division, "__divlu",
+ { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_IR, MACRO_EOA,
+ /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
+ { "divq", emit_division, "__divq",
+ { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_IR, MACRO_EOA,
+ /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
+ { "divqu", emit_division, "__divqu",
+ { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_IR, MACRO_EOA,
+ /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
+ { "reml", emit_division, "__reml",
+ { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_IR, MACRO_EOA,
+ /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
+ { "remlu", emit_division, "__remlu",
+ { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_IR, MACRO_EOA,
+ /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
+ { "remq", emit_division, "__remq",
+ { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_IR, MACRO_EOA,
+ /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
+ { "remqu", emit_division, "__remqu",
+ { MACRO_IR, MACRO_IR, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_IR, MACRO_EOA,
+ /* MACRO_IR, MACRO_EXP, MACRO_IR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
+
+ { "jsr", emit_jsrjmp, "jsr",
+ { MACRO_PIR, MACRO_EXP, MACRO_EOA,
+ MACRO_PIR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA,
+ MACRO_EXP, MACRO_EOA } },
+ { "jmp", emit_jsrjmp, "jmp",
+ { MACRO_PIR, MACRO_EXP, MACRO_EOA,
+ MACRO_PIR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA,
+ MACRO_EXP, MACRO_EOA } },
+ { "ret", emit_retjcr, "ret",
+ { MACRO_IR, MACRO_EXP, MACRO_EOA,
+ MACRO_IR, MACRO_EOA,
+ MACRO_PIR, MACRO_EXP, MACRO_EOA,
+ MACRO_PIR, MACRO_EOA,
+ MACRO_EXP, MACRO_EOA,
+ MACRO_EOA } },
+ { "jcr", emit_retjcr, "jcr",
+ { MACRO_IR, MACRO_EXP, MACRO_EOA,
+ MACRO_IR, MACRO_EOA,
+ MACRO_PIR, MACRO_EXP, MACRO_EOA,
+ MACRO_PIR, MACRO_EOA,
+ MACRO_EXP, MACRO_EOA,
+ MACRO_EOA } },
+ { "jsr_coroutine", emit_retjcr, "jcr",
+ { MACRO_IR, MACRO_EXP, MACRO_EOA,
+ MACRO_IR, MACRO_EOA,
+ MACRO_PIR, MACRO_EXP, MACRO_EOA,
+ MACRO_PIR, MACRO_EOA,
+ MACRO_EXP, MACRO_EOA,
+ MACRO_EOA } },
+};
+
+static const unsigned int alpha_num_macros
+ = sizeof (alpha_macros) / sizeof (*alpha_macros);
+
+/* Search forward through all variants of a macro looking for a syntax
+ match. */
+
+static const struct alpha_macro *
+find_macro_match (const struct alpha_macro *first_macro,
+ const expressionS *tok,
+ int *pntok)
+
+{
+ const struct alpha_macro *macro = first_macro;
+ int ntok = *pntok;
+
+ do
+ {
+ const enum alpha_macro_arg *arg = macro->argsets;
+ int tokidx = 0;
+
+ while (*arg)
+ {
+ switch (*arg)
+ {
+ case MACRO_EOA:
+ if (tokidx == ntok)
+ return macro;
+ else
+ tokidx = 0;
+ break;
+
+ /* Index register. */
+ case MACRO_IR:
+ if (tokidx >= ntok || tok[tokidx].X_op != O_register
+ || !is_ir_num (tok[tokidx].X_add_number))
+ goto match_failed;
+ ++tokidx;
+ break;
+
+ /* Parenthesized index register. */
+ case MACRO_PIR:
+ if (tokidx >= ntok || tok[tokidx].X_op != O_pregister
+ || !is_ir_num (tok[tokidx].X_add_number))
+ goto match_failed;
+ ++tokidx;
+ break;
+
+ /* Optional parenthesized index register. */
+ case MACRO_OPIR:
+ if (tokidx < ntok && tok[tokidx].X_op == O_pregister
+ && is_ir_num (tok[tokidx].X_add_number))
+ ++tokidx;
+ break;
+
+ /* Leading comma with a parenthesized index register. */
+ case MACRO_CPIR:
+ if (tokidx >= ntok || tok[tokidx].X_op != O_cpregister
+ || !is_ir_num (tok[tokidx].X_add_number))
+ goto match_failed;
+ ++tokidx;
+ break;
+
+ /* Floating point register. */
+ case MACRO_FPR:
+ if (tokidx >= ntok || tok[tokidx].X_op != O_register
+ || !is_fpr_num (tok[tokidx].X_add_number))
+ goto match_failed;
+ ++tokidx;
+ break;
+
+ /* Normal expression. */
+ case MACRO_EXP:
+ if (tokidx >= ntok)
+ goto match_failed;
+ switch (tok[tokidx].X_op)
+ {
+ case O_illegal:
+ case O_absent:
+ case O_register:
+ case O_pregister:
+ case O_cpregister:
+ case O_literal:
+ case O_lituse_base:
+ case O_lituse_bytoff:
+ case O_lituse_jsr:
+ case O_gpdisp:
+ case O_gprelhigh:
+ case O_gprellow:
+ case O_gprel:
+ case O_samegp:
+ goto match_failed;
+
+ default:
+ break;
+ }
+ ++tokidx;
+ break;
+
+ match_failed:
+ while (*arg != MACRO_EOA)
+ ++arg;
+ tokidx = 0;
+ break;
+ }
+ ++arg;
+ }
+ }
+ while (++macro - alpha_macros < (int) alpha_num_macros
+ && !strcmp (macro->name, first_macro->name));
+
+ return NULL;
+}
+
+/* Given an opcode name and a pre-tokenized set of arguments, take the
+ opcode all the way through emission. */
+
+static void
+assemble_tokens (const char *opname,
+ const expressionS *tok,
+ int ntok,
+ int local_macros_on)
+{
+ int found_something = 0;
+ const struct alpha_opcode *opcode;
+ const struct alpha_macro *macro;
+ int cpumatch = 1;
+ bfd_reloc_code_real_type reloc = BFD_RELOC_UNUSED;
+
+#ifdef RELOC_OP_P
+ /* If a user-specified relocation is present, this is not a macro. */
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
+ {
+ reloc = ALPHA_RELOC_TABLE (tok[ntok - 1].X_op)->reloc;
+ ntok--;
+ }
+ else
+#endif
+ if (local_macros_on)
+ {
+ macro = ((const struct alpha_macro *)
+ hash_find (alpha_macro_hash, opname));
+ if (macro)
+ {
+ found_something = 1;
+ macro = find_macro_match (macro, tok, &ntok);
+ if (macro)
+ {
+ (*macro->emit) (tok, ntok, macro->arg);
+ return;
+ }
+ }
+ }
+
+ /* Search opcodes. */
+ opcode = (const struct alpha_opcode *) hash_find (alpha_opcode_hash, opname);
+ if (opcode)
+ {
+ found_something = 1;
+ opcode = find_opcode_match (opcode, tok, &ntok, &cpumatch);
+ if (opcode)
+ {
+ struct alpha_insn insn;
+ assemble_insn (opcode, tok, ntok, &insn, reloc);
+
+ /* Copy the sequence number for the reloc from the reloc token. */
+ if (reloc != BFD_RELOC_UNUSED)
+ insn.sequence = tok[ntok].X_add_number;
+
+ emit_insn (&insn);
+ return;
+ }
+ }
+
+ if (found_something)
+ {
+ if (cpumatch)
+ as_bad (_("inappropriate arguments for opcode `%s'"), opname);
+ else
+ as_bad (_("opcode `%s' not supported for target %s"), opname,
+ alpha_target_name);
+ }
+ else
+ as_bad (_("unknown opcode `%s'"), opname);
+}
+
+#ifdef OBJ_EVAX
+
+/* Add symbol+addend to link pool.
+ Return offset from basesym to entry in link pool.
+
+ Add new fixup only if offset isn't 16bit. */
+
+valueT
+add_to_link_pool (symbolS *basesym,
+ symbolS *sym,
+ offsetT addend)
+{
+ segT current_section = now_seg;
+ int current_subsec = now_subseg;
+ valueT offset;
+ bfd_reloc_code_real_type reloc_type;
+ char *p;
+ segment_info_type *seginfo = seg_info (alpha_link_section);
+ fixS *fixp;
+
+ offset = - *symbol_get_obj (basesym);
+
+ /* @@ This assumes all entries in a given section will be of the same
+ size... Probably correct, but unwise to rely on. */
+ /* This must always be called with the same subsegment. */
+
+ if (seginfo->frchainP)
+ for (fixp = seginfo->frchainP->fix_root;
+ fixp != (fixS *) NULL;
+ fixp = fixp->fx_next, offset += 8)
+ {
+ if (fixp->fx_addsy == sym && fixp->fx_offset == addend)
+ {
+ if (range_signed_16 (offset))
+ {
+ return offset;
+ }
+ }
+ }
+
+ /* Not found in 16bit signed range. */
+
+ subseg_set (alpha_link_section, 0);
+ p = frag_more (8);
+ memset (p, 0, 8);
+
+ fix_new (frag_now, p - frag_now->fr_literal, 8, sym, addend, 0,
+ BFD_RELOC_64);
+
+ subseg_set (current_section, current_subsec);
+ seginfo->literal_pool_size += 8;
+ return offset;
+}
+
+#endif /* OBJ_EVAX */
/* Assembler directives. */
@@ -4190,8 +3207,7 @@ emit_retjcr (tok, ntok, vopname)
clears alpha_insn_label and restores auto alignment. */
static void
-s_alpha_text (i)
- int i;
+s_alpha_text (int i)
{
#ifdef OBJ_ELF
@@ -4208,8 +3224,7 @@ s_alpha_text (i)
clears alpha_insn_label and restores auto alignment. */
static void
-s_alpha_data (i)
- int i;
+s_alpha_data (int i)
{
#ifdef OBJ_ELF
obj_elf_data (i);
@@ -4227,15 +3242,13 @@ s_alpha_data (i)
openVMS constructs a section for every common symbol. */
static void
-s_alpha_comm (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_comm (int ignore ATTRIBUTE_UNUSED)
{
- register char *name;
- register char c;
- register char *p;
+ char *name;
+ char c;
+ char *p;
offsetT temp;
- register symbolS *symbolP;
-
+ symbolS *symbolP;
#ifdef OBJ_EVAX
segT current_section = now_seg;
int current_subsec = now_subseg;
@@ -4245,7 +3258,7 @@ s_alpha_comm (ignore)
name = input_line_pointer;
c = get_symbol_end ();
- /* just after name is now '\0' */
+ /* Just after name is now '\0'. */
p = input_line_pointer;
*p = c;
@@ -4275,7 +3288,7 @@ s_alpha_comm (ignore)
*p = c;
#ifdef OBJ_EVAX
- /* alignment might follow */
+ /* Alignment might follow. */
if (*input_line_pointer == ',')
{
offsetT align;
@@ -4318,10 +3331,10 @@ s_alpha_comm (ignore)
subseg_set (new_seg, 0);
p = frag_more (temp);
new_seg->flags |= SEC_IS_COMMON;
- if (! S_IS_DEFINED (symbolP))
- S_SET_SEGMENT (symbolP, new_seg);
+ S_SET_SEGMENT (symbolP, new_seg);
#else
S_SET_VALUE (symbolP, (valueT) temp);
+ S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
#endif
S_SET_EXTERNAL (symbolP);
}
@@ -4343,8 +3356,7 @@ s_alpha_comm (ignore)
clears alpha_insn_label and restores auto alignment. */
static void
-s_alpha_rdata (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_rdata (int ignore ATTRIBUTE_UNUSED)
{
int temp;
@@ -4364,8 +3376,7 @@ s_alpha_rdata (ignore)
clears alpha_insn_label and restores auto alignment. */
static void
-s_alpha_sdata (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_sdata (int ignore ATTRIBUTE_UNUSED)
{
int temp;
@@ -4403,8 +3414,7 @@ static struct alpha_elf_frame_data *cur_frame_data;
clears alpha_insn_label and restores auto alignment. */
static void
-s_alpha_section (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_section (int ignore ATTRIBUTE_UNUSED)
{
obj_elf_section (ignore);
@@ -4414,8 +3424,7 @@ s_alpha_section (ignore)
}
static void
-s_alpha_ent (dummy)
- int dummy ATTRIBUTE_UNUSED;
+s_alpha_ent (int dummy ATTRIBUTE_UNUSED)
{
if (ECOFF_DEBUGGING)
ecoff_directive_ent (0);
@@ -4467,8 +3476,7 @@ s_alpha_ent (dummy)
}
static void
-s_alpha_end (dummy)
- int dummy ATTRIBUTE_UNUSED;
+s_alpha_end (int dummy ATTRIBUTE_UNUSED)
{
if (ECOFF_DEBUGGING)
ecoff_directive_end (0);
@@ -4517,8 +3525,7 @@ s_alpha_end (dummy)
}
static void
-s_alpha_mask (fp)
- int fp;
+s_alpha_mask (int fp)
{
if (ECOFF_DEBUGGING)
{
@@ -4570,8 +3577,7 @@ s_alpha_mask (fp)
}
static void
-s_alpha_frame (dummy)
- int dummy ATTRIBUTE_UNUSED;
+s_alpha_frame (int dummy ATTRIBUTE_UNUSED)
{
if (ECOFF_DEBUGGING)
ecoff_directive_frame (0);
@@ -4609,8 +3615,7 @@ s_alpha_frame (dummy)
}
static void
-s_alpha_prologue (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_prologue (int ignore ATTRIBUTE_UNUSED)
{
symbolS *sym;
int arg;
@@ -4654,8 +3659,7 @@ s_alpha_prologue (ignore)
static char *first_file_directive;
static void
-s_alpha_file (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_file (int ignore ATTRIBUTE_UNUSED)
{
/* Save the first .file directive we see, so that we can change our
minds about whether ecoff debugging should or shouldn't be enabled. */
@@ -4681,8 +3685,7 @@ s_alpha_file (ignore)
}
static void
-s_alpha_loc (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_loc (int ignore ATTRIBUTE_UNUSED)
{
if (ECOFF_DEBUGGING)
ecoff_directive_loc (0);
@@ -4691,8 +3694,7 @@ s_alpha_loc (ignore)
}
static void
-s_alpha_stab (n)
- int n;
+s_alpha_stab (int n)
{
/* If we've been undecided about mdebug, make up our minds in favour. */
if (alpha_flag_mdebug < 0)
@@ -4718,8 +3720,7 @@ s_alpha_stab (n)
}
static void
-s_alpha_coff_wrapper (which)
- int which;
+s_alpha_coff_wrapper (int which)
{
static void (* const fns[]) PARAMS ((int)) = {
ecoff_directive_begin,
@@ -4866,7 +3867,7 @@ s_alpha_usepv (int unused ATTRIBUTE_UNUSED)
as_bad (_("unknown argument for .usepv"));
other = 0;
}
-
+
*input_line_pointer = which_end;
demand_empty_rest_of_line ();
@@ -4877,7 +3878,7 @@ s_alpha_usepv (int unused ATTRIBUTE_UNUSED)
/* Standard calling conventions leaves the CFA at $30 on entry. */
void
-alpha_cfi_frame_initial_instructions ()
+alpha_cfi_frame_initial_instructions (void)
{
cfi_add_CFA_def_cfa_register (30);
}
@@ -4887,8 +3888,7 @@ alpha_cfi_frame_initial_instructions ()
/* Handle the section specific pseudo-op. */
static void
-s_alpha_section (secid)
- int secid;
+s_alpha_section (int secid)
{
int temp;
#define EVAX_SECTION_COUNT 5
@@ -4912,8 +3912,7 @@ s_alpha_section (secid)
/* Parse .ent directives. */
static void
-s_alpha_ent (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_ent (int ignore ATTRIBUTE_UNUSED)
{
symbolS *symbol;
expressionS symexpr;
@@ -4948,8 +3947,7 @@ s_alpha_ent (ignore)
/* Parse .frame <framreg>,<framesize>,RA,<rsa_offset> directives. */
static void
-s_alpha_frame (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_frame (int ignore ATTRIBUTE_UNUSED)
{
long val;
@@ -4980,8 +3978,7 @@ s_alpha_frame (ignore)
}
static void
-s_alpha_pdesc (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_pdesc (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char name_end;
@@ -5036,17 +4033,14 @@ s_alpha_pdesc (ignore)
name_end = get_symbol_end ();
if (strncmp (name, "stack", 5) == 0)
- {
- alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_STACK;
- }
+ alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_STACK;
+
else if (strncmp (name, "reg", 3) == 0)
- {
- alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_REGISTER;
- }
+ alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_REGISTER;
+
else if (strncmp (name, "null", 4) == 0)
- {
- alpha_evax_proc.pdsckind = PDSC_S_K_KIND_NULL;
- }
+ alpha_evax_proc.pdsckind = PDSC_S_K_KIND_NULL;
+
else
{
as_fatal (_("unknown procedure kind"));
@@ -5131,10 +4125,9 @@ s_alpha_pdesc (ignore)
/* Support for crash debug on vms. */
static void
-s_alpha_name (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_name (int ignore ATTRIBUTE_UNUSED)
{
- register char *p;
+ char *p;
expressionS exp;
segment_info_type *seginfo = seg_info (alpha_link_section);
@@ -5167,8 +4160,7 @@ s_alpha_name (ignore)
}
static void
-s_alpha_linkage (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_linkage (int ignore ATTRIBUTE_UNUSED)
{
expressionS exp;
char *p;
@@ -5193,8 +4185,7 @@ s_alpha_linkage (ignore)
}
static void
-s_alpha_code_address (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_code_address (int ignore ATTRIBUTE_UNUSED)
{
expressionS exp;
char *p;
@@ -5205,9 +4196,7 @@ s_alpha_code_address (ignore)
expression (&exp);
if (exp.X_op != O_symbol)
- {
- as_fatal (_("No symbol after .code_address"));
- }
+ as_fatal (_("No symbol after .code_address"));
else
{
p = frag_more (8);
@@ -5219,8 +4208,7 @@ s_alpha_code_address (ignore)
}
static void
-s_alpha_fp_save (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_fp_save (int ignore ATTRIBUTE_UNUSED)
{
alpha_evax_proc.fp_save = tc_get_register (1);
@@ -5229,8 +4217,7 @@ s_alpha_fp_save (ignore)
}
static void
-s_alpha_mask (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_mask (int ignore ATTRIBUTE_UNUSED)
{
long val;
@@ -5248,8 +4235,7 @@ s_alpha_mask (ignore)
}
static void
-s_alpha_fmask (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_fmask (int ignore ATTRIBUTE_UNUSED)
{
long val;
@@ -5267,8 +4253,7 @@ s_alpha_fmask (ignore)
}
static void
-s_alpha_end (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_end (int ignore ATTRIBUTE_UNUSED)
{
char c;
@@ -5279,8 +4264,7 @@ s_alpha_end (ignore)
}
static void
-s_alpha_file (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_file (int ignore ATTRIBUTE_UNUSED)
{
symbolS *s;
int length;
@@ -5302,8 +4286,7 @@ s_alpha_file (ignore)
/* Handle the .gprel32 pseudo op. */
static void
-s_alpha_gprel32 (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_gprel32 (int ignore ATTRIBUTE_UNUSED)
{
expressionS e;
char *p;
@@ -5357,8 +4340,7 @@ s_alpha_gprel32 (ignore)
correctly aligned. */
static void
-s_alpha_float_cons (type)
- int type;
+s_alpha_float_cons (int type)
{
int log_size;
@@ -5397,8 +4379,7 @@ s_alpha_float_cons (type)
parse it. */
static void
-s_alpha_proc (is_static)
- int is_static ATTRIBUTE_UNUSED;
+s_alpha_proc (int is_static ATTRIBUTE_UNUSED)
{
char *name;
char c;
@@ -5406,7 +4387,7 @@ s_alpha_proc (is_static)
symbolS *symbolP;
int temp;
- /* Takes ".proc name,nargs" */
+ /* Takes ".proc name,nargs". */
SKIP_WHITESPACE ();
name = input_line_pointer;
c = get_symbol_end ();
@@ -5436,8 +4417,7 @@ s_alpha_proc (is_static)
the assembler features. */
static void
-s_alpha_set (x)
- int x ATTRIBUTE_UNUSED;
+s_alpha_set (int x ATTRIBUTE_UNUSED)
{
char *name, ch, *s;
int yesno = 1;
@@ -5473,21 +4453,13 @@ s_alpha_set (x)
the $gp register. */
static void
-s_alpha_base (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_base (int ignore ATTRIBUTE_UNUSED)
{
-#if 0
- if (first_32bit_quadrant)
- {
- /* not fatal, but it might not work in the end */
- as_warn (_("File overrides no-base-register option."));
- first_32bit_quadrant = 0;
- }
-#endif
-
SKIP_WHITESPACE ();
+
if (*input_line_pointer == '$')
- { /* $rNN form */
+ {
+ /* $rNN form. */
input_line_pointer++;
if (*input_line_pointer == 'r')
input_line_pointer++;
@@ -5508,8 +4480,7 @@ s_alpha_base (ignore)
way the MIPS port does: .align 0 turns off auto alignment. */
static void
-s_alpha_align (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_alpha_align (int ignore ATTRIBUTE_UNUSED)
{
int align;
char fill, *pfill;
@@ -5552,8 +4523,7 @@ s_alpha_align (ignore)
/* Hook the normal string processor to reset known alignment. */
static void
-s_alpha_stringer (terminate)
- int terminate;
+s_alpha_stringer (int terminate)
{
alpha_current_align = 0;
alpha_insn_label = NULL;
@@ -5563,8 +4533,7 @@ s_alpha_stringer (terminate)
/* Hook the normal space processing to reset known alignment. */
static void
-s_alpha_space (ignore)
- int ignore;
+s_alpha_space (int ignore)
{
alpha_current_align = 0;
alpha_insn_label = NULL;
@@ -5574,8 +4543,7 @@ s_alpha_space (ignore)
/* Hook into cons for auto-alignment. */
void
-alpha_cons_align (size)
- int size;
+alpha_cons_align (int size)
{
int log_size;
@@ -5594,8 +4562,7 @@ alpha_cons_align (size)
pseudos. We just turn off auto-alignment and call down to cons. */
static void
-s_alpha_ucons (bytes)
- int bytes;
+s_alpha_ucons (int bytes)
{
int hold = alpha_auto_align_on;
alpha_auto_align_on = 0;
@@ -5606,8 +4573,7 @@ s_alpha_ucons (bytes)
/* Switch the working cpu type. */
static void
-s_alpha_arch (ignored)
- int ignored ATTRIBUTE_UNUSED;
+s_alpha_arch (int ignored ATTRIBUTE_UNUSED)
{
char *name, ch;
const struct cpu_type *p;
@@ -5633,9 +4599,7 @@ found:
/* print token expression with alpha specific extension. */
static void
-alpha_print_token (f, exp)
- FILE *f;
- const expressionS *exp;
+alpha_print_token (FILE *f, const expressionS *exp)
{
switch (exp->X_op)
{
@@ -5660,9 +4624,10 @@ alpha_print_token (f, exp)
/* The target specific pseudo-ops which we support. */
-const pseudo_typeS md_pseudo_table[] = {
+const pseudo_typeS md_pseudo_table[] =
+{
#ifdef OBJ_ECOFF
- {"comm", s_alpha_comm, 0}, /* osf1 compiler does this */
+ {"comm", s_alpha_comm, 0}, /* OSF1 compiler does this. */
{"rdata", s_alpha_rdata, 0},
#endif
{"text", s_alpha_text, 0},
@@ -5769,29 +4734,6 @@ const pseudo_typeS md_pseudo_table[] = {
{NULL, 0, 0},
};
-/* Build a BFD section with its flags set appropriately for the .lita,
- .lit8, or .lit4 sections. */
-
-static void
-create_literal_section (name, secp, symp)
- const char *name;
- segT *secp;
- symbolS **symp;
-{
- segT current_section = now_seg;
- int current_subsec = now_subseg;
- segT new_sec;
-
- *secp = new_sec = subseg_new (name, 0);
- subseg_set (current_section, current_subsec);
- bfd_set_section_alignment (stdoutput, new_sec, 4);
- bfd_set_section_flags (stdoutput, new_sec,
- SEC_RELOC | SEC_ALLOC | SEC_LOAD | SEC_READONLY
- | SEC_DATA);
-
- S_CLEAR_EXTERNAL (*symp = section_symbol (new_sec));
-}
-
#ifdef OBJ_ECOFF
/* @@@ GP selection voodoo. All of this seems overly complicated and
@@ -5799,10 +4741,10 @@ create_literal_section (name, secp, symp)
static inline void maybe_set_gp PARAMS ((asection *));
static inline void
-maybe_set_gp (sec)
- asection *sec;
+maybe_set_gp (asection *sec)
{
bfd_vma vma;
+
if (!sec)
return;
vma = bfd_get_section_vma (foo, sec);
@@ -5811,7 +4753,7 @@ maybe_set_gp (sec)
}
static void
-select_gp_value ()
+select_gp_value (void)
{
assert (alpha_gp_value == 0);
@@ -5821,12 +4763,6 @@ select_gp_value ()
/* Select the smallest VMA of these existing sections. */
maybe_set_gp (alpha_lita_section);
-#if 0
- /* These were disabled before -- should we use them? */
- maybe_set_gp (sdata);
- maybe_set_gp (lit8_sec);
- maybe_set_gp (lit4_sec);
-#endif
/* @@ Will a simple 0x8000 work here? If not, why not? */
#define GP_ADJUSTMENT (0x8000 - 0x10)
@@ -5845,9 +4781,7 @@ select_gp_value ()
/* Map 's' to SHF_ALPHA_GPREL. */
int
-alpha_elf_section_letter (letter, ptr_msg)
- int letter;
- char **ptr_msg;
+alpha_elf_section_letter (int letter, char **ptr_msg)
{
if (letter == 's')
return SHF_ALPHA_GPREL;
@@ -5859,9 +4793,7 @@ alpha_elf_section_letter (letter, ptr_msg)
/* Map SHF_ALPHA_GPREL to SEC_SMALL_DATA. */
flagword
-alpha_elf_section_flags (flags, attr, type)
- flagword flags;
- int attr, type ATTRIBUTE_UNUSED;
+alpha_elf_section_flags (flagword flags, int attr, int type ATTRIBUTE_UNUSED)
{
if (attr & SHF_ALPHA_GPREL)
flags |= SEC_SMALL_DATA;
@@ -5869,54 +4801,15 @@ alpha_elf_section_flags (flags, attr, type)
}
#endif /* OBJ_ELF */
-/* Called internally to handle all alignment needs. This takes care
- of eliding calls to frag_align if'n the cached current alignment
- says we've already got it, as well as taking care of the auto-align
- feature wrt labels. */
-
-static void
-alpha_align (n, pfill, label, force)
- int n;
- char *pfill;
- symbolS *label;
- int force ATTRIBUTE_UNUSED;
-{
- if (alpha_current_align >= n)
- return;
-
- if (pfill == NULL)
- {
- if (subseg_text_p (now_seg))
- frag_align_code (n, 0);
- else
- frag_align (n, 0, 0);
- }
- else
- frag_align (n, *pfill, 0);
-
- alpha_current_align = n;
-
- if (label != NULL && S_GET_SEGMENT (label) == now_seg)
- {
- symbol_set_frag (label, frag_now);
- S_SET_VALUE (label, (valueT) frag_now_fix ());
- }
-
- record_alignment (now_seg, n);
-
- /* ??? If alpha_flag_relax && force && elf, record the requested alignment
- in a reloc for the linker to see. */
-}
-
/* This is called from HANDLE_ALIGN in write.c. Fill in the contents
of an rs_align_code fragment. */
void
-alpha_handle_align (fragp)
- fragS *fragp;
+alpha_handle_align (fragS *fragp)
{
static char const unop[4] = { 0x00, 0x00, 0xfe, 0x2f };
- static char const nopunop[8] = {
+ static char const nopunop[8] =
+ {
0x1f, 0x04, 0xff, 0x47,
0x00, 0x00, 0xfe, 0x2f
};
@@ -5952,6 +4845,866 @@ alpha_handle_align (fragp)
fragp->fr_fix += fix;
fragp->fr_var = 8;
}
+
+/* Public interface functions. */
+
+/* This function is called once, at assembler startup time. It sets
+ up all the tables, etc. that the MD part of the assembler will
+ need, that can be determined before arguments are parsed. */
+
+void
+md_begin (void)
+{
+ unsigned int i;
+
+ /* Verify that X_op field is wide enough. */
+ {
+ expressionS e;
+
+ e.X_op = O_max;
+ assert (e.X_op == O_max);
+ }
+
+ /* Create the opcode hash table. */
+ alpha_opcode_hash = hash_new ();
+
+ for (i = 0; i < alpha_num_opcodes;)
+ {
+ const char *name, *retval, *slash;
+
+ name = alpha_opcodes[i].name;
+ retval = hash_insert (alpha_opcode_hash, name, (void *) &alpha_opcodes[i]);
+ if (retval)
+ as_fatal (_("internal error: can't hash opcode `%s': %s"),
+ name, retval);
+
+ /* Some opcodes include modifiers of various sorts with a "/mod"
+ syntax, like the architecture manual suggests. However, for
+ use with gcc at least, we also need access to those same opcodes
+ without the "/". */
+
+ if ((slash = strchr (name, '/')) != NULL)
+ {
+ char *p = xmalloc (strlen (name));
+
+ memcpy (p, name, slash - name);
+ strcpy (p + (slash - name), slash + 1);
+
+ (void) hash_insert (alpha_opcode_hash, p, (void *) &alpha_opcodes[i]);
+ /* Ignore failures -- the opcode table does duplicate some
+ variants in different forms, like "hw_stq" and "hw_st/q". */
+ }
+
+ while (++i < alpha_num_opcodes
+ && (alpha_opcodes[i].name == name
+ || !strcmp (alpha_opcodes[i].name, name)))
+ continue;
+ }
+
+ /* Create the macro hash table. */
+ alpha_macro_hash = hash_new ();
+
+ for (i = 0; i < alpha_num_macros;)
+ {
+ const char *name, *retval;
+
+ name = alpha_macros[i].name;
+ retval = hash_insert (alpha_macro_hash, name, (void *) &alpha_macros[i]);
+ if (retval)
+ as_fatal (_("internal error: can't hash macro `%s': %s"),
+ name, retval);
+
+ while (++i < alpha_num_macros
+ && (alpha_macros[i].name == name
+ || !strcmp (alpha_macros[i].name, name)))
+ continue;
+ }
+
+ /* Construct symbols for each of the registers. */
+ for (i = 0; i < 32; ++i)
+ {
+ char name[4];
+
+ sprintf (name, "$%d", i);
+ alpha_register_table[i] = symbol_create (name, reg_section, i,
+ &zero_address_frag);
+ }
+
+ for (; i < 64; ++i)
+ {
+ char name[5];
+
+ sprintf (name, "$f%d", i - 32);
+ alpha_register_table[i] = symbol_create (name, reg_section, i,
+ &zero_address_frag);
+ }
+
+ /* Create the special symbols and sections we'll be using. */
+
+ /* So .sbss will get used for tiny objects. */
+ bfd_set_gp_size (stdoutput, g_switch_value);
+
+#ifdef OBJ_ECOFF
+ create_literal_section (".lita", &alpha_lita_section, &alpha_lita_symbol);
+
+ /* For handling the GP, create a symbol that won't be output in the
+ symbol table. We'll edit it out of relocs later. */
+ alpha_gp_symbol = symbol_create ("<GP value>", alpha_lita_section, 0x8000,
+ &zero_address_frag);
+#endif
+
+#ifdef OBJ_EVAX
+ create_literal_section (".link", &alpha_link_section, &alpha_link_symbol);
+#endif
+
+#ifdef OBJ_ELF
+ if (ECOFF_DEBUGGING)
+ {
+ segT sec = subseg_new (".mdebug", (subsegT) 0);
+ bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY);
+ bfd_set_section_alignment (stdoutput, sec, 3);
+ }
+#endif
+
+ /* Create literal lookup hash table. */
+ alpha_literal_hash = hash_new ();
+
+ subseg_set (text_section, 0);
+}
+
+/* The public interface to the instruction assembler. */
+
+void
+md_assemble (char *str)
+{
+ /* Current maximum is 13. */
+ char opname[32];
+ expressionS tok[MAX_INSN_ARGS];
+ int ntok, trunclen;
+ size_t opnamelen;
+
+ /* Split off the opcode. */
+ opnamelen = strspn (str, "abcdefghijklmnopqrstuvwxyz_/46819");
+ trunclen = (opnamelen < sizeof (opname) - 1
+ ? opnamelen
+ : sizeof (opname) - 1);
+ memcpy (opname, str, trunclen);
+ opname[trunclen] = '\0';
+
+ /* Tokenize the rest of the line. */
+ if ((ntok = tokenize_arguments (str + opnamelen, tok, MAX_INSN_ARGS)) < 0)
+ {
+ if (ntok != TOKENIZE_ERROR_REPORT)
+ as_bad (_("syntax error"));
+
+ return;
+ }
+
+ /* Finish it off. */
+ assemble_tokens (opname, tok, ntok, alpha_macros_on);
+}
+
+/* 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;
+}
+
+/* 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
+
+extern char *vax_md_atof (int, char *, int *);
+
+char *
+md_atof (int type, char *litP, int *sizeP)
+{
+ int prec;
+ LITTLENUM_TYPE words[MAX_LITTLENUMS];
+ LITTLENUM_TYPE *wordP;
+ char *t;
+
+ switch (type)
+ {
+ /* VAX floats. */
+ case 'G':
+ /* VAX md_atof doesn't like "G" for some reason. */
+ type = 'g';
+ case 'F':
+ case 'D':
+ return vax_md_atof (type, litP, sizeP);
+
+ /* IEEE floats. */
+ case 'f':
+ prec = 2;
+ break;
+
+ case 'd':
+ 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 - 1; prec--;)
+ {
+ md_number_to_chars (litP, (long) (*wordP--), sizeof (LITTLENUM_TYPE));
+ litP += sizeof (LITTLENUM_TYPE);
+ }
+
+ return 0;
+}
+
+/* Take care of the target-specific command-line options. */
+
+int
+md_parse_option (int c, char *arg)
+{
+ switch (c)
+ {
+ case 'F':
+ alpha_nofloats_on = 1;
+ break;
+
+ case OPTION_32ADDR:
+ alpha_addr32_on = 1;
+ break;
+
+ case 'g':
+ alpha_debug = 1;
+ break;
+
+ case 'G':
+ g_switch_value = atoi (arg);
+ break;
+
+ case 'm':
+ {
+ const struct cpu_type *p;
+
+ for (p = cpu_types; p->name; ++p)
+ if (strcmp (arg, p->name) == 0)
+ {
+ alpha_target_name = p->name, alpha_target = p->flags;
+ goto found;
+ }
+ as_warn (_("Unknown CPU identifier `%s'"), arg);
+ found:;
+ }
+ break;
+
+#ifdef OBJ_EVAX
+ case '+': /* For g++. Hash any name > 63 chars long. */
+ alpha_flag_hash_long_names = 1;
+ break;
+
+ case 'H': /* Show new symbol after hash truncation. */
+ alpha_flag_show_after_trunc = 1;
+ break;
+
+ case 'h': /* For gnu-c/vax compatibility. */
+ break;
+#endif
+
+ case OPTION_RELAX:
+ alpha_flag_relax = 1;
+ break;
+
+#ifdef OBJ_ELF
+ case OPTION_MDEBUG:
+ alpha_flag_mdebug = 1;
+ break;
+ case OPTION_NO_MDEBUG:
+ alpha_flag_mdebug = 0;
+ break;
+#endif
+
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
+/* Print a description of the command-line options that we accept. */
+
+void
+md_show_usage (FILE *stream)
+{
+ fputs (_("\
+Alpha options:\n\
+-32addr treat addresses as 32-bit values\n\
+-F lack floating point instructions support\n\
+-mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mev67 | -mev68 | -mall\n\
+ specify variant of Alpha architecture\n\
+-m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264 | -m21264a | -m21264b\n\
+ these variants include PALcode opcodes\n"),
+ stream);
+#ifdef OBJ_EVAX
+ fputs (_("\
+VMS options:\n\
+-+ hash encode (don't truncate) names longer than 64 characters\n\
+-H show new symbol after hash truncation\n"),
+ stream);
+#endif
+}
+
+/* Decide from what point a pc-relative relocation is relative to,
+ relative to the pc-relative fixup. Er, relatively speaking. */
+
+long
+md_pcrel_from (fixS *fixP)
+{
+ valueT addr = fixP->fx_where + fixP->fx_frag->fr_address;
+
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_23_PCREL_S2:
+ case BFD_RELOC_ALPHA_HINT:
+ case BFD_RELOC_ALPHA_BRSGP:
+ return addr + 4;
+ default:
+ return addr;
+ }
+}
+
+/* Attempt to simplify or even eliminate a fixup. The return value is
+ ignored; perhaps it was once meaningful, but now it is historical.
+ To indicate that a fixup has been eliminated, set fixP->fx_done.
+
+ For ELF, here it is that we transform the GPDISP_HI16 reloc we used
+ internally into the GPDISP reloc used externally. We had to do
+ this so that we'd have the GPDISP_LO16 reloc as a tag to compute
+ the distance to the "lda" instruction for setting the addend to
+ GPDISP. */
+
+void
+md_apply_fix (fixS *fixP, valueT * valP, segT seg)
+{
+ char * const fixpos = fixP->fx_frag->fr_literal + fixP->fx_where;
+ valueT value = * valP;
+ unsigned image, size;
+
+ switch (fixP->fx_r_type)
+ {
+ /* The GPDISP relocations are processed internally with a symbol
+ referring to the current function's section; we need to drop
+ in a value which, when added to the address of the start of
+ the function, gives the desired GP. */
+ case BFD_RELOC_ALPHA_GPDISP_HI16:
+ {
+ fixS *next = fixP->fx_next;
+
+ /* With user-specified !gpdisp relocations, we can be missing
+ the matching LO16 reloc. We will have already issued an
+ error message. */
+ if (next)
+ fixP->fx_offset = (next->fx_frag->fr_address + next->fx_where
+ - fixP->fx_frag->fr_address - fixP->fx_where);
+
+ value = (value - sign_extend_16 (value)) >> 16;
+ }
+#ifdef OBJ_ELF
+ fixP->fx_r_type = BFD_RELOC_ALPHA_GPDISP;
+#endif
+ goto do_reloc_gp;
+
+ case BFD_RELOC_ALPHA_GPDISP_LO16:
+ value = sign_extend_16 (value);
+ fixP->fx_offset = 0;
+#ifdef OBJ_ELF
+ fixP->fx_done = 1;
+#endif
+
+ do_reloc_gp:
+ fixP->fx_addsy = section_symbol (seg);
+ md_number_to_chars (fixpos, value, 2);
+ break;
+
+ case BFD_RELOC_16:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_16_PCREL;
+ size = 2;
+ goto do_reloc_xx;
+
+ case BFD_RELOC_32:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_32_PCREL;
+ size = 4;
+ goto do_reloc_xx;
+
+ case BFD_RELOC_64:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_64_PCREL;
+ size = 8;
+
+ do_reloc_xx:
+ if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
+ {
+ md_number_to_chars (fixpos, value, size);
+ goto done;
+ }
+ return;
+
+#ifdef OBJ_ECOFF
+ case BFD_RELOC_GPREL32:
+ assert (fixP->fx_subsy == alpha_gp_symbol);
+ fixP->fx_subsy = 0;
+ /* FIXME: inherited this obliviousness of `value' -- why? */
+ md_number_to_chars (fixpos, -alpha_gp_value, 4);
+ break;
+#else
+ case BFD_RELOC_GPREL32:
+#endif
+ case BFD_RELOC_GPREL16:
+ case BFD_RELOC_ALPHA_GPREL_HI16:
+ case BFD_RELOC_ALPHA_GPREL_LO16:
+ return;
+
+ case BFD_RELOC_23_PCREL_S2:
+ if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
+ {
+ image = bfd_getl32 (fixpos);
+ image = (image & ~0x1FFFFF) | ((value >> 2) & 0x1FFFFF);
+ goto write_done;
+ }
+ return;
+
+ case BFD_RELOC_ALPHA_HINT:
+ if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
+ {
+ image = bfd_getl32 (fixpos);
+ image = (image & ~0x3FFF) | ((value >> 2) & 0x3FFF);
+ goto write_done;
+ }
+ return;
+
+#ifdef OBJ_ELF
+ case BFD_RELOC_ALPHA_BRSGP:
+ return;
+
+ case BFD_RELOC_ALPHA_TLSGD:
+ case BFD_RELOC_ALPHA_TLSLDM:
+ case BFD_RELOC_ALPHA_GOTDTPREL16:
+ case BFD_RELOC_ALPHA_DTPREL_HI16:
+ case BFD_RELOC_ALPHA_DTPREL_LO16:
+ case BFD_RELOC_ALPHA_DTPREL16:
+ case BFD_RELOC_ALPHA_GOTTPREL16:
+ case BFD_RELOC_ALPHA_TPREL_HI16:
+ case BFD_RELOC_ALPHA_TPREL_LO16:
+ case BFD_RELOC_ALPHA_TPREL16:
+ if (fixP->fx_addsy)
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
+ return;
+#endif
+
+#ifdef OBJ_ECOFF
+ case BFD_RELOC_ALPHA_LITERAL:
+ md_number_to_chars (fixpos, value, 2);
+ return;
+#endif
+ case BFD_RELOC_ALPHA_ELF_LITERAL:
+ case BFD_RELOC_ALPHA_LITUSE:
+ case BFD_RELOC_ALPHA_LINKAGE:
+ case BFD_RELOC_ALPHA_CODEADDR:
+ return;
+
+ case BFD_RELOC_VTABLE_INHERIT:
+ case BFD_RELOC_VTABLE_ENTRY:
+ return;
+
+ default:
+ {
+ const struct alpha_operand *operand;
+
+ if ((int) fixP->fx_r_type >= 0)
+ as_fatal (_("unhandled relocation type %s"),
+ bfd_get_reloc_code_name (fixP->fx_r_type));
+
+ assert (-(int) fixP->fx_r_type < (int) alpha_num_operands);
+ operand = &alpha_operands[-(int) fixP->fx_r_type];
+
+ /* The rest of these fixups only exist internally during symbol
+ resolution and have no representation in the object file.
+ Therefore they must be completely resolved as constants. */
+
+ if (fixP->fx_addsy != 0
+ && S_GET_SEGMENT (fixP->fx_addsy) != absolute_section)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("non-absolute expression in constant field"));
+
+ image = bfd_getl32 (fixpos);
+ image = insert_operand (image, operand, (offsetT) value,
+ fixP->fx_file, fixP->fx_line);
+ }
+ goto write_done;
+ }
+
+ if (fixP->fx_addsy != 0 || fixP->fx_pcrel != 0)
+ return;
+ else
+ {
+ as_warn_where (fixP->fx_file, fixP->fx_line,
+ _("type %d reloc done?\n"), (int) fixP->fx_r_type);
+ goto done;
+ }
+
+write_done:
+ md_number_to_chars (fixpos, image, 4);
+
+done:
+ fixP->fx_done = 1;
+}
+
+/* Look for a register name in the given symbol. */
+
+symbolS *
+md_undefined_symbol (char *name)
+{
+ if (*name == '$')
+ {
+ int is_float = 0, num;
+
+ switch (*++name)
+ {
+ case 'f':
+ if (name[1] == 'p' && name[2] == '\0')
+ return alpha_register_table[AXP_REG_FP];
+ is_float = 32;
+ /* Fall through. */
+
+ case 'r':
+ if (!ISDIGIT (*++name))
+ break;
+ /* Fall through. */
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ if (name[1] == '\0')
+ num = name[0] - '0';
+ else if (name[0] != '0' && ISDIGIT (name[1]) && name[2] == '\0')
+ {
+ num = (name[0] - '0') * 10 + name[1] - '0';
+ if (num >= 32)
+ break;
+ }
+ else
+ break;
+
+ if (!alpha_noat_on && (num + is_float) == AXP_REG_AT)
+ as_warn (_("Used $at without \".set noat\""));
+ return alpha_register_table[num + is_float];
+
+ case 'a':
+ if (name[1] == 't' && name[2] == '\0')
+ {
+ if (!alpha_noat_on)
+ as_warn (_("Used $at without \".set noat\""));
+ return alpha_register_table[AXP_REG_AT];
+ }
+ break;
+
+ case 'g':
+ if (name[1] == 'p' && name[2] == '\0')
+ return alpha_register_table[alpha_gp_register];
+ break;
+
+ case 's':
+ if (name[1] == 'p' && name[2] == '\0')
+ return alpha_register_table[AXP_REG_SP];
+ break;
+ }
+ }
+ return NULL;
+}
+
+#ifdef OBJ_ECOFF
+/* @@@ Magic ECOFF bits. */
+
+void
+alpha_frob_ecoff_data (void)
+{
+ select_gp_value ();
+ /* $zero and $f31 are read-only. */
+ alpha_gprmask &= ~1;
+ alpha_fprmask &= ~1;
+}
+#endif
+
+/* Hook to remember a recently defined label so that the auto-align
+ code can adjust the symbol after we know what alignment will be
+ required. */
+
+void
+alpha_define_label (symbolS *sym)
+{
+ alpha_insn_label = sym;
+#ifdef OBJ_ELF
+ dwarf2_emit_label (sym);
+#endif
+}
+
+/* Return true if we must always emit a reloc for a type and false if
+ there is some hope of resolving it at assembly time. */
+
+int
+alpha_force_relocation (fixS *f)
+{
+ if (alpha_flag_relax)
+ return 1;
+
+ switch (f->fx_r_type)
+ {
+ case BFD_RELOC_ALPHA_GPDISP_HI16:
+ case BFD_RELOC_ALPHA_GPDISP_LO16:
+ case BFD_RELOC_ALPHA_GPDISP:
+ case BFD_RELOC_ALPHA_LITERAL:
+ case BFD_RELOC_ALPHA_ELF_LITERAL:
+ case BFD_RELOC_ALPHA_LITUSE:
+ case BFD_RELOC_GPREL16:
+ case BFD_RELOC_GPREL32:
+ case BFD_RELOC_ALPHA_GPREL_HI16:
+ case BFD_RELOC_ALPHA_GPREL_LO16:
+ case BFD_RELOC_ALPHA_LINKAGE:
+ case BFD_RELOC_ALPHA_CODEADDR:
+ case BFD_RELOC_ALPHA_BRSGP:
+ case BFD_RELOC_ALPHA_TLSGD:
+ case BFD_RELOC_ALPHA_TLSLDM:
+ case BFD_RELOC_ALPHA_GOTDTPREL16:
+ case BFD_RELOC_ALPHA_DTPREL_HI16:
+ case BFD_RELOC_ALPHA_DTPREL_LO16:
+ case BFD_RELOC_ALPHA_DTPREL16:
+ case BFD_RELOC_ALPHA_GOTTPREL16:
+ case BFD_RELOC_ALPHA_TPREL_HI16:
+ case BFD_RELOC_ALPHA_TPREL_LO16:
+ case BFD_RELOC_ALPHA_TPREL16:
+ return 1;
+
+ default:
+ break;
+ }
+
+ return generic_force_reloc (f);
+}
+
+/* Return true if we can partially resolve a relocation now. */
+
+int
+alpha_fix_adjustable (fixS *f)
+{
+ /* Are there any relocation types for which we must generate a
+ reloc but we can adjust the values contained within it? */
+ switch (f->fx_r_type)
+ {
+ case BFD_RELOC_ALPHA_GPDISP_HI16:
+ case BFD_RELOC_ALPHA_GPDISP_LO16:
+ case BFD_RELOC_ALPHA_GPDISP:
+ return 0;
+
+ case BFD_RELOC_ALPHA_LITERAL:
+ case BFD_RELOC_ALPHA_ELF_LITERAL:
+ case BFD_RELOC_ALPHA_LITUSE:
+ case BFD_RELOC_ALPHA_LINKAGE:
+ case BFD_RELOC_ALPHA_CODEADDR:
+ return 1;
+
+ case BFD_RELOC_VTABLE_ENTRY:
+ case BFD_RELOC_VTABLE_INHERIT:
+ return 0;
+
+ case BFD_RELOC_GPREL16:
+ case BFD_RELOC_GPREL32:
+ case BFD_RELOC_ALPHA_GPREL_HI16:
+ case BFD_RELOC_ALPHA_GPREL_LO16:
+ case BFD_RELOC_23_PCREL_S2:
+ case BFD_RELOC_32:
+ case BFD_RELOC_64:
+ case BFD_RELOC_ALPHA_HINT:
+ return 1;
+
+ case BFD_RELOC_ALPHA_TLSGD:
+ case BFD_RELOC_ALPHA_TLSLDM:
+ case BFD_RELOC_ALPHA_GOTDTPREL16:
+ case BFD_RELOC_ALPHA_DTPREL_HI16:
+ case BFD_RELOC_ALPHA_DTPREL_LO16:
+ case BFD_RELOC_ALPHA_DTPREL16:
+ case BFD_RELOC_ALPHA_GOTTPREL16:
+ case BFD_RELOC_ALPHA_TPREL_HI16:
+ case BFD_RELOC_ALPHA_TPREL_LO16:
+ case BFD_RELOC_ALPHA_TPREL16:
+ /* ??? No idea why we can't return a reference to .tbss+10, but
+ we're preventing this in the other assemblers. Follow for now. */
+ return 0;
+
+#ifdef OBJ_ELF
+ case BFD_RELOC_ALPHA_BRSGP:
+ /* If we have a BRSGP reloc to a local symbol, adjust it to BRADDR and
+ let it get resolved at assembly time. */
+ {
+ symbolS *sym = f->fx_addsy;
+ const char *name;
+ int offset = 0;
+
+ if (generic_force_reloc (f))
+ return 0;
+
+ switch (S_GET_OTHER (sym) & STO_ALPHA_STD_GPLOAD)
+ {
+ case STO_ALPHA_NOPV:
+ break;
+ case STO_ALPHA_STD_GPLOAD:
+ offset = 8;
+ break;
+ default:
+ if (S_IS_LOCAL (sym))
+ name = "<local>";
+ else
+ name = S_GET_NAME (sym);
+ as_bad_where (f->fx_file, f->fx_line,
+ _("!samegp reloc against symbol without .prologue: %s"),
+ name);
+ break;
+ }
+ f->fx_r_type = BFD_RELOC_23_PCREL_S2;
+ f->fx_offset += offset;
+ return 1;
+ }
+#endif
+
+ default:
+ return 1;
+ }
+}
+
+/* Generate the BFD reloc to be stuck in the object file from the
+ fixup used internally in the assembler. */
+
+arelent *
+tc_gen_reloc (asection *sec ATTRIBUTE_UNUSED,
+ fixS *fixp)
+{
+ arelent *reloc;
+
+ reloc = xmalloc (sizeof (* reloc));
+ 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;
+
+ /* Make sure none of our internal relocations make it this far.
+ They'd better have been fully resolved by this point. */
+ assert ((int) fixp->fx_r_type > 0);
+
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
+ if (reloc->howto == NULL)
+ {
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("cannot represent `%s' relocation in object file"),
+ bfd_get_reloc_code_name (fixp->fx_r_type));
+ return NULL;
+ }
+
+ if (!fixp->fx_pcrel != !reloc->howto->pc_relative)
+ as_fatal (_("internal error? cannot generate `%s' relocation"),
+ bfd_get_reloc_code_name (fixp->fx_r_type));
+
+ assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);
+
+#ifdef OBJ_ECOFF
+ if (fixp->fx_r_type == BFD_RELOC_ALPHA_LITERAL)
+ /* Fake out bfd_perform_relocation. sigh. */
+ reloc->addend = -alpha_gp_value;
+ else
+#endif
+ {
+ reloc->addend = fixp->fx_offset;
+#ifdef OBJ_ELF
+ /* Ohhh, this is ugly. The problem is that if this is a local global
+ symbol, the relocation will entirely be performed at link time, not
+ at assembly time. bfd_perform_reloc doesn't know about this sort
+ of thing, and as a result we need to fake it out here. */
+ if ((S_IS_EXTERNAL (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)
+ || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE)
+ || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_THREAD_LOCAL))
+ && !S_IS_COMMON (fixp->fx_addsy))
+ reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value;
+#endif
+ }
+
+ return reloc;
+}
+
+/* Parse a register name off of the input_line and return a register
+ number. Gets md_undefined_symbol above to do the register name
+ matching for us.
+
+ Only called as a part of processing the ECOFF .frame directive. */
+
+int
+tc_get_register (int frame ATTRIBUTE_UNUSED)
+{
+ int framereg = AXP_REG_SP;
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == '$')
+ {
+ char *s = input_line_pointer;
+ char c = get_symbol_end ();
+ symbolS *sym = md_undefined_symbol (s);
+
+ *strchr (s, '\0') = c;
+ if (sym && (framereg = S_GET_VALUE (sym)) <= 31)
+ goto found;
+ }
+ as_warn (_("frame reg expected, using $%d."), framereg);
+
+found:
+ note_gpreg (framereg);
+ return framereg;
+}
+
+/* This is called before the symbol table is processed. In order to
+ work with gcc when using mips-tfile, we must keep all local labels.
+ However, in other cases, we want to discard them. If we were
+ called with -g, but we didn't see any debugging information, it may
+ mean that gcc is smuggling debugging information through to
+ mips-tfile, in which case we must generate all local labels. */
+
+#ifdef OBJ_ECOFF
+
+void
+alpha_frob_file_before_adjust (void)
+{
+ if (alpha_debug != 0
+ && ! ecoff_debugging_seen)
+ flag_keep_locals = 1;
+}
+
+#endif /* OBJ_ECOFF */
/* The Alpha has support for some VAX floating point types, as well as for
IEEE floating point. We consider IEEE to be the primary floating point
diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h
index 939a14f296e6..42e004e41482 100644
--- a/contrib/binutils/gas/config/tc-alpha.h
+++ b/contrib/binutils/gas/config/tc-alpha.h
@@ -1,5 +1,6 @@
/* This file is tc-alpha.h
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ 2005
Free Software Foundation, Inc.
Written by Ken Raeburn <raeburn@cygnus.com>.
@@ -17,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define TC_ALPHA
@@ -49,8 +50,8 @@
struct fix;
struct alpha_reloc_tag;
-extern int alpha_force_relocation PARAMS ((struct fix *));
-extern int alpha_fix_adjustable PARAMS ((struct fix *));
+extern int alpha_force_relocation (struct fix *);
+extern int alpha_fix_adjustable (struct fix *);
extern unsigned long alpha_gprmask, alpha_fprmask;
extern valueT alpha_gp_value;
@@ -59,7 +60,7 @@ extern valueT alpha_gp_value;
#define tc_fix_adjustable(FIX) alpha_fix_adjustable (FIX)
#define RELOC_REQUIRES_SYMBOL
-/* Values passed to md_apply_fix3 don't include the symbol value. */
+/* Values passed to md_apply_fix don't include the symbol value. */
#define MD_APPLY_SYM_VALUE(FIX) 0
#define md_convert_frag(b,s,f) as_fatal ("alpha convert_frag\n")
@@ -97,32 +98,32 @@ extern valueT alpha_gp_value;
#define md_number_to_chars number_to_chars_littleendian
-extern int tc_get_register PARAMS ((int frame));
-extern void alpha_frob_ecoff_data PARAMS ((void));
+extern int tc_get_register (int);
+extern void alpha_frob_ecoff_data (void);
#define tc_frob_label(sym) alpha_define_label (sym)
-extern void alpha_define_label PARAMS ((symbolS *));
+extern void alpha_define_label (symbolS *);
#define md_cons_align(nbytes) alpha_cons_align (nbytes)
-extern void alpha_cons_align PARAMS ((int));
+extern void alpha_cons_align (int);
#define HANDLE_ALIGN(fragp) alpha_handle_align (fragp)
-extern void alpha_handle_align PARAMS ((struct frag *));
+extern void alpha_handle_align (struct frag *);
#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4 + 8)
#ifdef OBJ_ECOFF
#define tc_frob_file_before_adjust() alpha_frob_file_before_adjust ()
-extern void alpha_frob_file_before_adjust PARAMS ((void));
+extern void alpha_frob_file_before_adjust (void);
#endif
-#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
+#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs. */
#ifdef OBJ_ELF
#define md_elf_section_letter alpha_elf_section_letter
-extern int alpha_elf_section_letter PARAMS ((int, char **));
+extern int alpha_elf_section_letter (int, char **);
#define md_elf_section_flags alpha_elf_section_flags
-extern flagword alpha_elf_section_flags PARAMS ((flagword, int, int));
+extern flagword alpha_elf_section_flags (flagword, int, int);
#endif
/* Whether to add support for explicit !relocation_op!sequence_number. At the
@@ -137,11 +138,11 @@ extern flagword alpha_elf_section_flags PARAMS ((flagword, int, int));
relocations. Also convert the gas-internal relocations to the
appropriate linker relocations. */
#define tc_frob_file_before_fix() alpha_before_fix ()
-extern void alpha_before_fix PARAMS ((void));
+extern void alpha_before_fix (void);
#ifdef OBJ_ELF
#define md_end alpha_elf_md_end
-extern void alpha_elf_md_end PARAMS ((void));
+extern void alpha_elf_md_end (void);
#endif
/* New fields for supporting explicit relocations (such as !literal to mark
@@ -152,15 +153,15 @@ extern void alpha_elf_md_end PARAMS ((void));
struct alpha_fix_tag
{
- struct fix *next_reloc; /* next !lituse or !gpdisp */
- struct alpha_reloc_tag *info; /* other members with same sequence */
+ struct fix *next_reloc; /* Next !lituse or !gpdisp. */
+ struct alpha_reloc_tag *info; /* Other members with same sequence. */
};
/* Initialize the TC_FIX_TYPE field. */
#define TC_INIT_FIX_DATA(FIX) \
do { \
- FIX->tc_fix_data.next_reloc = (struct fix *) 0; \
- FIX->tc_fix_data.info = (struct alpha_reloc_tag *) 0; \
+ FIX->tc_fix_data.next_reloc = NULL; \
+ FIX->tc_fix_data.info = NULL; \
} while (0)
/* Work with DEBUG5 to print fields in tc_fix_type. */
@@ -175,7 +176,7 @@ do { \
#define TARGET_USE_CFIPOP 1
#define tc_cfi_frame_initial_instructions alpha_cfi_frame_initial_instructions
-extern void alpha_cfi_frame_initial_instructions(void);
+extern void alpha_cfi_frame_initial_instructions (void);
#define DWARF2_LINE_MIN_INSN_LENGTH 4
#define DWARF2_DEFAULT_RETURN_COLUMN 26
diff --git a/contrib/binutils/gas/config/tc-arc.c b/contrib/binutils/gas/config/tc-arc.c
index 60cfa34652ad..525b54083fb9 100644
--- a/contrib/binutils/gas/config/tc-arc.c
+++ b/contrib/binutils/gas/config/tc-arc.c
@@ -1,6 +1,6 @@
/* tc-arc.c -- Assembler for the ARC
- Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <stdio.h>
#include "libiberty.h"
@@ -31,31 +31,12 @@
#include "elf/arc.h"
#include "dwarf2dbg.h"
-extern int arc_get_mach PARAMS ((char *));
-extern int arc_operand_type PARAMS ((int));
-extern int arc_insn_not_jl PARAMS ((arc_insn));
-extern int arc_limm_fixup_adjust PARAMS ((arc_insn));
-extern int arc_get_noshortcut_flag PARAMS ((void));
-extern int arc_set_ext_seg PARAMS ((void));
-extern void arc_code_symbol PARAMS ((expressionS *));
-
-static arc_insn arc_insert_operand PARAMS ((arc_insn,
- const struct arc_operand *, int,
- const struct arc_operand_value *,
- offsetT, char *, unsigned int));
-static void arc_common PARAMS ((int));
-static void arc_extinst PARAMS ((int));
-static void arc_extoper PARAMS ((int));
-static void arc_option PARAMS ((int));
-static int get_arc_exp_reloc_type PARAMS ((int, int, expressionS *,
- expressionS *));
-
-static void init_opcode_tables PARAMS ((int));
-
-const struct suffix_classes {
+const struct suffix_classes
+{
char *name;
int len;
-} suffixclass[] = {
+} suffixclass[] =
+{
{ "SUFFIX_COND|SUFFIX_FLAG",23 },
{ "SUFFIX_FLAG", 11 },
{ "SUFFIX_COND", 11 },
@@ -64,11 +45,13 @@ const struct suffix_classes {
#define MAXSUFFIXCLASS (sizeof (suffixclass) / sizeof (struct suffix_classes))
-const struct syntax_classes {
+const struct syntax_classes
+{
char *name;
int len;
int class;
-} syntaxclass[] = {
+} syntaxclass[] =
+{
{ "SYNTAX_3OP|OP1_MUST_BE_IMM", 26, SYNTAX_3OP|OP1_MUST_BE_IMM|SYNTAX_VALID },
{ "OP1_MUST_BE_IMM|SYNTAX_3OP", 26, OP1_MUST_BE_IMM|SYNTAX_3OP|SYNTAX_VALID },
{ "SYNTAX_2OP|OP1_IMM_IMPLIED", 26, SYNTAX_2OP|OP1_IMM_IMPLIED|SYNTAX_VALID },
@@ -79,28 +62,6 @@ const struct syntax_classes {
#define MAXSYNTAXCLASS (sizeof (syntaxclass) / sizeof (struct syntax_classes))
-const pseudo_typeS md_pseudo_table[] = {
- { "align", s_align_bytes, 0 }, /* Defaulting is invalid (0). */
- { "comm", arc_common, 0 },
- { "common", arc_common, 0 },
- { "lcomm", arc_common, 1 },
- { "lcommon", arc_common, 1 },
- { "2byte", cons, 2 },
- { "half", cons, 2 },
- { "short", cons, 2 },
- { "3byte", cons, 3 },
- { "4byte", cons, 4 },
- { "word", cons, 4 },
- { "option", arc_option, 0 },
- { "cpu", arc_option, 0 },
- { "block", s_space, 0 },
- { "extcondcode", arc_extoper, 0 },
- { "extcoreregister", arc_extoper, 1 },
- { "extauxregister", arc_extoper, 2 },
- { "extinstruction", arc_extinst, 0 },
- { NULL, 0, 0 },
-};
-
/* 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[] = "#;";
@@ -144,21 +105,27 @@ static int cpu_tables_init_p = 0;
static struct hash_control *arc_suffix_hash = NULL;
const char *md_shortopts = "";
-struct option md_longopts[] = {
-#define OPTION_EB (OPTION_MD_BASE + 0)
+
+enum options
+{
+ OPTION_EB = OPTION_MD_BASE,
+ OPTION_EL,
+ OPTION_ARC5,
+ OPTION_ARC6,
+ OPTION_ARC7,
+ OPTION_ARC8,
+ OPTION_ARC
+};
+
+struct option md_longopts[] =
+{
{ "EB", no_argument, NULL, OPTION_EB },
-#define OPTION_EL (OPTION_MD_BASE + 1)
{ "EL", no_argument, NULL, OPTION_EL },
-#define OPTION_ARC5 (OPTION_MD_BASE + 2)
{ "marc5", no_argument, NULL, OPTION_ARC5 },
{ "pre-v6", no_argument, NULL, OPTION_ARC5 },
-#define OPTION_ARC6 (OPTION_MD_BASE + 3)
{ "marc6", no_argument, NULL, OPTION_ARC6 },
-#define OPTION_ARC7 (OPTION_MD_BASE + 4)
{ "marc7", no_argument, NULL, OPTION_ARC7 },
-#define OPTION_ARC8 (OPTION_MD_BASE + 5)
{ "marc8", no_argument, NULL, OPTION_ARC8 },
-#define OPTION_ARC (OPTION_MD_BASE + 6)
{ "marc", no_argument, NULL, OPTION_ARC },
{ NULL, no_argument, NULL, 0 }
};
@@ -173,9 +140,7 @@ struct arc_operand_value *get_ext_suffix (char *s);
See if it's a processor-specific option. */
int
-md_parse_option (c, arg)
- int c;
- char *arg ATTRIBUTE_UNUSED;
+md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
@@ -207,8 +172,7 @@ md_parse_option (c, arg)
}
void
-md_show_usage (stream)
- FILE *stream;
+md_show_usage (FILE *stream)
{
fprintf (stream, "\
ARC Options:\n\
@@ -223,7 +187,7 @@ ARC Options:\n\
command. */
void
-md_begin ()
+md_begin (void)
{
/* The endianness can be chosen "at the factory". */
target_big_endian = byte_order == BIG_ENDIAN;
@@ -239,9 +203,9 @@ md_begin ()
/* Initialize the various opcode and operand tables.
MACH is one of bfd_mach_arc_xxx. */
+
static void
-init_opcode_tables (mach)
- int mach;
+init_opcode_tables (int mach)
{
int i;
char *last;
@@ -262,7 +226,7 @@ init_opcode_tables (mach)
for (i = 0; i < arc_suffixes_count; i++)
{
if (strcmp (arc_suffixes[i].name, last) != 0)
- hash_insert (arc_suffix_hash, arc_suffixes[i].name, (PTR) (arc_suffixes + i));
+ hash_insert (arc_suffix_hash, arc_suffixes[i].name, (void *) (arc_suffixes + i));
last = arc_suffixes[i].name;
}
@@ -282,7 +246,7 @@ init_opcode_tables (mach)
output registers into the object file's symbol table. */
symbol_table_insert (symbol_create (arc_reg_names[i].name,
reg_section,
- (int) &arc_reg_names[i],
+ (valueT) &arc_reg_names[i],
&zero_address_frag));
}
@@ -294,14 +258,13 @@ init_opcode_tables (mach)
If REG is non-NULL, it is a register number and ignore VAL. */
static arc_insn
-arc_insert_operand (insn, operand, mods, reg, val, file, line)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods;
- const struct arc_operand_value *reg;
- offsetT val;
- char *file;
- unsigned int line;
+arc_insert_operand (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods,
+ const struct arc_operand_value *reg,
+ offsetT val,
+ char *file,
+ unsigned int line)
{
if (operand->bits != 32)
{
@@ -328,17 +291,7 @@ arc_insert_operand (insn, operand, mods, reg, val, file, line)
test = val;
if (test < (offsetT) min || test > (offsetT) max)
- {
- const char *err =
- "operand out of range (%s not between %ld and %ld)";
- char buf[100];
-
- sprint_value (buf, test);
- if (file == (char *) NULL)
- as_warn (err, buf, min, max);
- else
- as_warn_where (file, line, err, buf, min, max);
- }
+ as_warn_value_out_of_range (_("operand"), test, (offsetT) min, (offsetT) max, file, line);
}
if (operand->insert)
@@ -361,7 +314,8 @@ arc_insert_operand (insn, operand, mods, reg, val, file, line)
we go, because that would require us to first create the frag, and
that would screw up references to ``.''. */
-struct arc_fixup {
+struct arc_fixup
+{
/* index into `arc_operands' */
int opindex;
expressionS exp;
@@ -371,524 +325,81 @@ struct arc_fixup {
#define MAX_SUFFIXES 5
-/* This routine is called for each instruction to be assembled. */
+/* Compute the reloc type of an expression.
+ The possibly modified expression is stored in EXPNEW.
-void
-md_assemble (str)
- char *str;
-{
- const struct arc_opcode *opcode;
- const struct arc_opcode *std_opcode;
- struct arc_opcode *ext_opcode;
- char *start;
- const char *last_errmsg = 0;
- arc_insn insn;
- static int init_tables_p = 0;
+ This is used to convert the expressions generated by the %-op's into
+ the appropriate operand type. It is called for both data in instructions
+ (operands) and data outside instructions (variables, debugging info, etc.).
- /* Opcode table initialization is deferred until here because we have to
- wait for a possible .option command. */
- if (!init_tables_p)
- {
- init_opcode_tables (arc_mach_type);
- init_tables_p = 1;
- }
+ Currently supported %-ops:
- /* Skip leading white space. */
- while (ISSPACE (*str))
- str++;
+ %st(symbol): represented as "symbol >> 2"
+ "st" is short for STatus as in the status register (pc)
- /* The instructions are stored in lists hashed by the first letter (though
- we needn't care how they're hashed). Get the first in the list. */
+ DEFAULT_TYPE is the type to use if no special processing is required.
- ext_opcode = arc_ext_opcodes;
- std_opcode = arc_opcode_lookup_asm (str);
+ DATA_P is non-zero for data or limm values, zero for insn operands.
+ Remember that the opcode "insertion fns" cannot be used on data, they're
+ only for inserting operands into insns. They also can't be used for limm
+ values as the insertion routines don't handle limm values. When called for
+ insns we return fudged reloc types (real_value - BFD_RELOC_UNUSED). When
+ called for data or limm values we use real reloc types. */
- /* Keep looking until we find a match. */
+static int
+get_arc_exp_reloc_type (int data_p,
+ int default_type,
+ expressionS *exp,
+ expressionS *expnew)
+{
+ /* If the expression is "symbol >> 2" we must change it to just "symbol",
+ as fix_new_exp can't handle it. Similarly for (symbol - symbol) >> 2.
+ That's ok though. What's really going on here is that we're using
+ ">> 2" as a special syntax for specifying BFD_RELOC_ARC_B26. */
- start = str;
- for (opcode = (ext_opcode ? ext_opcode : std_opcode);
- opcode != NULL;
- opcode = (ARC_OPCODE_NEXT_ASM (opcode)
- ? ARC_OPCODE_NEXT_ASM (opcode)
- : (ext_opcode ? ext_opcode = NULL, std_opcode : NULL)))
+ if (exp->X_op == O_right_shift
+ && exp->X_op_symbol != NULL
+ && exp->X_op_symbol->sy_value.X_op == O_constant
+ && exp->X_op_symbol->sy_value.X_add_number == 2
+ && exp->X_add_number == 0)
{
- int past_opcode_p, fc, num_suffixes;
- int fix_up_at = 0;
- char *syn;
- struct arc_fixup fixups[MAX_FIXUPS];
- /* Used as a sanity check. If we need a limm reloc, make sure we ask
- for an extra 4 bytes from frag_more. */
- int limm_reloc_p;
- int ext_suffix_p;
- const struct arc_operand_value *insn_suffixes[MAX_SUFFIXES];
-
- /* Is this opcode supported by the selected cpu? */
- if (! arc_opcode_supported (opcode))
- continue;
-
- /* Scan the syntax string. If it doesn't match, try the next one. */
-
- arc_opcode_init_insert ();
- insn = opcode->value;
- fc = 0;
- past_opcode_p = 0;
- num_suffixes = 0;
- limm_reloc_p = 0;
- ext_suffix_p = 0;
-
- /* We don't check for (*str != '\0') here because we want to parse
- any trailing fake arguments in the syntax string. */
- for (str = start, syn = opcode->syntax; *syn != '\0';)
+ if (exp->X_add_symbol != NULL
+ && (exp->X_add_symbol->sy_value.X_op == O_constant
+ || exp->X_add_symbol->sy_value.X_op == O_symbol))
{
- int mods;
- const struct arc_operand *operand;
-
- /* Non operand chars must match exactly. */
- if (*syn != '%' || *++syn == '%')
- {
- /* Handle '+' specially as we want to allow "ld r0,[sp-4]". */
- /* ??? The syntax has changed to [sp,-4]. */
- if (0 && *syn == '+' && *str == '-')
- {
- /* Skip over syn's +, but leave str's - alone.
- That makes the case identical to "ld r0,[sp+-4]". */
- ++syn;
- }
- else if (*str == *syn)
- {
- if (*syn == ' ')
- past_opcode_p = 1;
- ++syn;
- ++str;
- }
- else
- break;
- continue;
- }
-
- /* We have an operand. Pick out any modifiers. */
- mods = 0;
- while (ARC_MOD_P (arc_operands[arc_operand_map[(int) *syn]].flags))
- {
- mods |= arc_operands[arc_operand_map[(int) *syn]].flags & ARC_MOD_BITS;
- ++syn;
- }
- operand = arc_operands + arc_operand_map[(int) *syn];
- if (operand->fmt == 0)
- as_fatal ("unknown syntax format character `%c'", *syn);
-
- if (operand->flags & ARC_OPERAND_FAKE)
- {
- const char *errmsg = NULL;
- if (operand->insert)
- {
- insn = (*operand->insert) (insn, operand, mods, NULL, 0, &errmsg);
- if (errmsg != (const char *) NULL)
- {
- last_errmsg = errmsg;
- if (operand->flags & ARC_OPERAND_ERROR)
- {
- as_bad (errmsg);
- return;
- }
- else if (operand->flags & ARC_OPERAND_WARN)
- as_warn (errmsg);
- break;
- }
- if (limm_reloc_p
- && (operand->flags && operand->flags & ARC_OPERAND_LIMM)
- && (operand->flags &
- (ARC_OPERAND_ABSOLUTE_BRANCH | ARC_OPERAND_ADDRESS)))
- {
- fixups[fix_up_at].opindex = arc_operand_map[operand->fmt];
- }
- }
- ++syn;
- }
- /* Are we finished with suffixes? */
- else if (!past_opcode_p)
- {
- int found;
- char c;
- char *s, *t;
- const struct arc_operand_value *suf, *suffix_end;
- const struct arc_operand_value *suffix = NULL;
-
- if (!(operand->flags & ARC_OPERAND_SUFFIX))
- abort ();
-
- /* If we're at a space in the input string, we want to skip the
- remaining suffixes. There may be some fake ones though, so
- just go on to try the next one. */
- if (*str == ' ')
- {
- ++syn;
- continue;
- }
-
- s = str;
- if (mods & ARC_MOD_DOT)
- {
- if (*s != '.')
- break;
- ++s;
- }
- else
- {
- /* This can happen in "b.nd foo" and we're currently looking
- for "%q" (ie: a condition code suffix). */
- if (*s == '.')
- {
- ++syn;
- continue;
- }
- }
-
- /* Pick the suffix out and look it up via the hash table. */
- for (t = s; *t && ISALNUM (*t); ++t)
- continue;
- c = *t;
- *t = '\0';
- if ((suf = get_ext_suffix (s)))
- ext_suffix_p = 1;
- else
- suf = hash_find (arc_suffix_hash, s);
- if (!suf)
- {
- /* This can happen in "blle foo" and we're currently using
- the template "b%q%.n %j". The "bl" insn occurs later in
- the table so "lle" isn't an illegal suffix. */
- *t = c;
- break;
- }
-
- /* Is it the right type? Note that the same character is used
- several times, so we have to examine all of them. This is
- relatively efficient as equivalent entries are kept
- together. If it's not the right type, don't increment `str'
- so we try the next one in the series. */
- found = 0;
- if (ext_suffix_p && arc_operands[suf->type].fmt == *syn)
- {
- /* Insert the suffix's value into the insn. */
- *t = c;
- if (operand->insert)
- insn = (*operand->insert) (insn, operand,
- mods, NULL, suf->value,
- NULL);
- else
- insn |= suf->value << operand->shift;
-
- str = t;
- found = 1;
- }
- else
- {
- *t = c;
- suffix_end = arc_suffixes + arc_suffixes_count;
- for (suffix = suf;
- suffix < suffix_end && strcmp (suffix->name, suf->name) == 0;
- ++suffix)
- {
- if (arc_operands[suffix->type].fmt == *syn)
- {
- /* Insert the suffix's value into the insn. */
- if (operand->insert)
- insn = (*operand->insert) (insn, operand,
- mods, NULL, suffix->value,
- NULL);
- else
- insn |= suffix->value << operand->shift;
-
- str = t;
- found = 1;
- break;
- }
- }
- }
- ++syn;
- if (!found)
- /* Wrong type. Just go on to try next insn entry. */
- ;
- else
- {
- if (num_suffixes == MAX_SUFFIXES)
- as_bad ("too many suffixes");
- else
- insn_suffixes[num_suffixes++] = suffix;
- }
- }
- else
- /* This is either a register or an expression of some kind. */
- {
- char *hold;
- const struct arc_operand_value *reg = NULL;
- long value = 0;
- expressionS exp;
-
- if (operand->flags & ARC_OPERAND_SUFFIX)
- abort ();
-
- /* Is there anything left to parse?
- We don't check for this at the top because we want to parse
- any trailing fake arguments in the syntax string. */
- if (is_end_of_line[(unsigned char) *str])
- break;
-
- /* Parse the operand. */
- hold = input_line_pointer;
- input_line_pointer = str;
- expression (&exp);
- str = input_line_pointer;
- input_line_pointer = hold;
-
- if (exp.X_op == O_illegal)
- as_bad ("illegal operand");
- else if (exp.X_op == O_absent)
- as_bad ("missing operand");
- else if (exp.X_op == O_constant)
- {
- value = exp.X_add_number;
- }
- else if (exp.X_op == O_register)
- {
- reg = (struct arc_operand_value *) exp.X_add_number;
- }
-#define IS_REG_DEST_OPERAND(o) ((o) == 'a')
- else if (IS_REG_DEST_OPERAND (*syn))
- as_bad ("symbol as destination register");
- else
- {
- if (!strncmp (str, "@h30", 4))
- {
- arc_code_symbol (&exp);
- str += 4;
- }
- /* We need to generate a fixup for this expression. */
- if (fc >= MAX_FIXUPS)
- as_fatal ("too many fixups");
- fixups[fc].exp = exp;
- /* We don't support shimm relocs. break here to force
- the assembler to output a limm. */
-#define IS_REG_SHIMM_OFFSET(o) ((o) == 'd')
- if (IS_REG_SHIMM_OFFSET (*syn))
- break;
- /* If this is a register constant (IE: one whose
- register value gets stored as 61-63) then this
- must be a limm. */
- /* ??? This bit could use some cleaning up.
- Referencing the format chars like this goes
- against style. */
- if (IS_SYMBOL_OPERAND (*syn))
- {
- const char *junk;
- limm_reloc_p = 1;
- /* Save this, we don't yet know what reloc to use. */
- fix_up_at = fc;
- /* Tell insert_reg we need a limm. This is
- needed because the value at this point is
- zero, a shimm. */
- /* ??? We need a cleaner interface than this. */
- (*arc_operands[arc_operand_map['Q']].insert)
- (insn, operand, mods, reg, 0L, &junk);
- }
- else
- fixups[fc].opindex = arc_operand_map[(int) *syn];
- ++fc;
- value = 0;
- }
-
- /* Insert the register or expression into the instruction. */
- if (operand->insert)
- {
- const char *errmsg = NULL;
- insn = (*operand->insert) (insn, operand, mods,
- reg, (long) value, &errmsg);
- if (errmsg != (const char *) NULL)
- {
- last_errmsg = errmsg;
- if (operand->flags & ARC_OPERAND_ERROR)
- {
- as_bad (errmsg);
- return;
- }
- else if (operand->flags & ARC_OPERAND_WARN)
- as_warn (errmsg);
- break;
- }
- }
- else
- insn |= (value & ((1 << operand->bits) - 1)) << operand->shift;
-
- ++syn;
- }
+ *expnew = *exp;
+ expnew->X_op = O_symbol;
+ expnew->X_op_symbol = NULL;
+ return data_p ? BFD_RELOC_ARC_B26 : arc_operand_map['J'];
}
-
- /* If we're at the end of the syntax string, we're done. */
- /* FIXME: try to move this to a separate function. */
- if (*syn == '\0')
+ else if (exp->X_add_symbol != NULL
+ && exp->X_add_symbol->sy_value.X_op == O_subtract)
{
- int i;
- char *f;
- long limm, limm_p;
-
- /* 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 (!is_end_of_line[(unsigned char) *str])
- as_bad ("junk at end of line: `%s'", str);
-
- /* Is there a limm value? */
- limm_p = arc_opcode_limm_p (&limm);
-
- /* Perform various error and warning tests. */
-
- {
- static int in_delay_slot_p = 0;
- static int prev_insn_needs_cc_nop_p = 0;
- /* delay slot type seen */
- int delay_slot_type = ARC_DELAY_NONE;
- /* conditional execution flag seen */
- int conditional = 0;
- /* 1 if condition codes are being set */
- int cc_set_p = 0;
- /* 1 if conditional branch, including `b' "branch always" */
- int cond_branch_p = opcode->flags & ARC_OPCODE_COND_BRANCH;
-
- for (i = 0; i < num_suffixes; ++i)
- {
- switch (arc_operands[insn_suffixes[i]->type].fmt)
- {
- case 'n':
- delay_slot_type = insn_suffixes[i]->value;
- break;
- case 'q':
- conditional = insn_suffixes[i]->value;
- break;
- case 'f':
- cc_set_p = 1;
- break;
- }
- }
-
- /* Putting an insn with a limm value in a delay slot is supposed to
- be legal, but let's warn the user anyway. Ditto for 8 byte
- jumps with delay slots. */
- if (in_delay_slot_p && limm_p)
- as_warn ("8 byte instruction in delay slot");
- if (delay_slot_type != ARC_DELAY_NONE
- && limm_p && arc_insn_not_jl (insn)) /* except for jl addr */
- as_warn ("8 byte jump instruction with delay slot");
- in_delay_slot_p = (delay_slot_type != ARC_DELAY_NONE) && !limm_p;
-
- /* Warn when a conditional branch immediately follows a set of
- the condition codes. Note that this needn't be done if the
- insn that sets the condition codes uses a limm. */
- if (cond_branch_p && conditional != 0 /* 0 = "always" */
- && prev_insn_needs_cc_nop_p && arc_mach_type == bfd_mach_arc_5)
- as_warn ("conditional branch follows set of flags");
- prev_insn_needs_cc_nop_p =
- /* FIXME: ??? not required:
- (delay_slot_type != ARC_DELAY_NONE) && */
- cc_set_p && !limm_p;
- }
-
- /* Write out the instruction.
- It is important to fetch enough space in one call to `frag_more'.
- We use (f - frag_now->fr_literal) to compute where we are and we
- don't want frag_now to change between calls. */
- if (limm_p)
- {
- f = frag_more (8);
- md_number_to_chars (f, insn, 4);
- md_number_to_chars (f + 4, limm, 4);
- dwarf2_emit_insn (8);
- }
- else if (limm_reloc_p)
- {
- /* We need a limm reloc, but the tables think we don't. */
- abort ();
- }
- else
- {
- f = frag_more (4);
- md_number_to_chars (f, insn, 4);
- dwarf2_emit_insn (4);
- }
-
- /* Create any fixups. */
- for (i = 0; i < fc; ++i)
- {
- int op_type, reloc_type;
- expressionS exptmp;
- const struct arc_operand *operand;
-
- /* Create a fixup for this operand.
- At this point we do not use a bfd_reloc_code_real_type for
- operands residing in the insn, but instead just use the
- operand index. This lets us easily handle fixups for any
- operand type, although that is admittedly not a very exciting
- feature. We pick a BFD reloc type in md_apply_fix3.
-
- Limm values (4 byte immediate "constants") must be treated
- normally because they're not part of the actual insn word
- and thus the insertion routines don't handle them. */
-
- if (arc_operands[fixups[i].opindex].flags & ARC_OPERAND_LIMM)
- {
- /* Modify the fixup addend as required by the cpu. */
- fixups[i].exp.X_add_number += arc_limm_fixup_adjust (insn);
- op_type = fixups[i].opindex;
- /* FIXME: can we add this data to the operand table? */
- if (op_type == arc_operand_map['L']
- || op_type == arc_operand_map['s']
- || op_type == arc_operand_map['o']
- || op_type == arc_operand_map['O'])
- reloc_type = BFD_RELOC_32;
- else if (op_type == arc_operand_map['J'])
- reloc_type = BFD_RELOC_ARC_B26;
- else
- abort ();
- reloc_type = get_arc_exp_reloc_type (1, reloc_type,
- &fixups[i].exp,
- &exptmp);
- }
- else
- {
- op_type = get_arc_exp_reloc_type (0, fixups[i].opindex,
- &fixups[i].exp, &exptmp);
- reloc_type = op_type + (int) BFD_RELOC_UNUSED;
- }
- operand = &arc_operands[op_type];
- fix_new_exp (frag_now,
- ((f - frag_now->fr_literal)
- + (operand->flags & ARC_OPERAND_LIMM ? 4 : 0)), 4,
- &exptmp,
- (operand->flags & ARC_OPERAND_RELATIVE_BRANCH) != 0,
- (bfd_reloc_code_real_type) reloc_type);
- }
-
- /* All done. */
- return;
+ *expnew = exp->X_add_symbol->sy_value;
+ return data_p ? BFD_RELOC_ARC_B26 : arc_operand_map['J'];
}
-
- /* Try the next entry. */
}
- if (NULL == last_errmsg)
- as_bad ("bad instruction `%s'", start);
- else
- as_bad (last_errmsg);
+ *expnew = *exp;
+ return default_type;
}
+static int
+arc_set_ext_seg (void)
+{
+ if (!arcext_section)
+ {
+ arcext_section = subseg_new (".arcextmap", 0);
+ bfd_set_section_flags (stdoutput, arcext_section,
+ SEC_READONLY | SEC_HAS_CONTENTS);
+ }
+ else
+ subseg_set (arcext_section, 0);
+ return 1;
+}
+
static void
-arc_extoper (opertype)
- int opertype;
+arc_extoper (int opertype)
{
char *name;
char *mode;
@@ -1031,8 +542,7 @@ arc_extoper (opertype)
return;
}
- ext_oper = (struct arc_ext_operand_value *) \
- xmalloc (sizeof (struct arc_ext_operand_value));
+ ext_oper = xmalloc (sizeof (struct arc_ext_operand_value));
if (opertype)
{
@@ -1040,7 +550,7 @@ arc_extoper (opertype)
if ((symbolP = symbol_find (name)))
{
if (S_GET_SEGMENT (symbolP) == reg_section)
- S_SET_VALUE (symbolP, (int) &ext_oper->operand);
+ S_SET_VALUE (symbolP, (valueT) &ext_oper->operand);
else
{
as_bad ("attempt to override symbol: %s", name);
@@ -1054,7 +564,8 @@ arc_extoper (opertype)
{
/* If its not there, add it. */
symbol_table_insert (symbol_create (name, reg_section,
- (int) &ext_oper->operand, &zero_address_frag));
+ (valueT) &ext_oper->operand,
+ &zero_address_frag));
}
}
@@ -1128,10 +639,9 @@ arc_extoper (opertype)
}
static void
-arc_extinst (ignore)
- int ignore ATTRIBUTE_UNUSED;
+arc_extinst (int ignore ATTRIBUTE_UNUSED)
{
- unsigned char syntax[129];
+ char syntax[129];
char *name;
char *p;
char c;
@@ -1294,7 +804,7 @@ arc_extinst (ignore)
strcat (syntax, "%F");
strcat (syntax, "%S%L");
- ext_op = (struct arc_opcode *) xmalloc (sizeof (struct arc_opcode));
+ ext_op = xmalloc (sizeof (struct arc_opcode));
ext_op->syntax = xstrdup (syntax);
ext_op->mask = I (-1) | ((0x3 == opcode) ? C (-1) : 0);
@@ -1332,23 +842,8 @@ arc_extinst (ignore)
demand_empty_rest_of_line ();
}
-int
-arc_set_ext_seg ()
-{
- if (!arcext_section)
- {
- arcext_section = subseg_new (".arcextmap", 0);
- bfd_set_section_flags (stdoutput, arcext_section,
- SEC_READONLY | SEC_HAS_CONTENTS);
- }
- else
- subseg_set (arcext_section, 0);
- return 1;
-}
-
static void
-arc_common (localScope)
- int localScope;
+arc_common (int localScope)
{
char *name;
char c;
@@ -1459,9 +954,9 @@ arc_common (localScope)
/* Select the cpu we're assembling for. */
static void
-arc_option (ignore)
- int ignore ATTRIBUTE_UNUSED;
+arc_option (int ignore ATTRIBUTE_UNUSED)
{
+ extern int arc_get_mach (char *);
int mach;
char c;
char *cpu;
@@ -1515,10 +1010,7 @@ arc_option (ignore)
#define MAX_LITTLENUMS 6
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[MAX_LITTLENUMS];
@@ -1559,10 +1051,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);
@@ -1573,9 +1062,7 @@ md_number_to_chars (buf, val, n)
/* Round up a section size to the appropriate boundary. */
valueT
-md_section_align (segment, size)
- segT segment;
- valueT size;
+md_section_align (segT segment, valueT size)
{
int align = bfd_get_section_alignment (stdoutput, segment);
@@ -1585,9 +1072,8 @@ md_section_align (segment, size)
/* 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)
{
as_fatal (_("md_estimate_size_before_relax\n"));
return 1;
@@ -1596,21 +1082,20 @@ 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)
{
as_fatal (_("md_convert_frag\n"));
}
-void
-arc_code_symbol (expressionP)
- expressionS *expressionP;
+static void
+arc_code_symbol (expressionS *expressionP)
{
if (expressionP->X_op == O_symbol && expressionP->X_add_number == 0)
{
expressionS two;
+
expressionP->X_op = O_right_shift;
expressionP->X_add_symbol->sy_value.X_op = O_constant;
two.X_op = O_constant;
@@ -1625,6 +1110,7 @@ arc_code_symbol (expressionP)
&& expressionP->X_add_number == 0)
{
expressionS two;
+
expressionP->X_add_symbol = make_expr_symbol (expressionP);
expressionP->X_op = O_right_shift;
two.X_op = O_constant;
@@ -1633,10 +1119,7 @@ arc_code_symbol (expressionP)
expressionP->X_op_symbol = make_expr_symbol (&two);
}
else
- {
- as_bad ("expression too complex code symbol");
- return;
- }
+ as_bad ("expression too complex code symbol");
}
/* Parse an operand that is machine-specific.
@@ -1650,55 +1133,56 @@ arc_code_symbol (expressionP)
to achieve the same effect. */
void
-md_operand (expressionP)
- expressionS *expressionP;
+md_operand (expressionS *expressionP)
{
char *p = input_line_pointer;
- if (*p == '%')
- if (strncmp (p, "%st(", 4) == 0)
- {
- input_line_pointer += 4;
- expression (expressionP);
- if (*input_line_pointer != ')')
- {
- as_bad ("missing ')' in %%-op");
- return;
- }
- ++input_line_pointer;
- arc_code_symbol (expressionP);
- }
- else
- {
- /* It could be a register. */
- int i, l;
- struct arc_ext_operand_value *ext_oper = arc_ext_operands;
- p++;
+ if (*p != '%')
+ return;
- while (ext_oper)
- {
- l = strlen (ext_oper->operand.name);
- if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
- {
- input_line_pointer += l + 1;
- expressionP->X_op = O_register;
- expressionP->X_add_number = (int) &ext_oper->operand;
- return;
- }
- ext_oper = ext_oper->next;
- }
- for (i = 0; i < arc_reg_names_count; i++)
- {
- l = strlen (arc_reg_names[i].name);
- if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
- {
- input_line_pointer += l + 1;
- expressionP->X_op = O_register;
- expressionP->X_add_number = (int) &arc_reg_names[i];
- break;
- }
- }
- }
+ if (strncmp (p, "%st(", 4) == 0)
+ {
+ input_line_pointer += 4;
+ expression (expressionP);
+ if (*input_line_pointer != ')')
+ {
+ as_bad ("missing ')' in %%-op");
+ return;
+ }
+ ++input_line_pointer;
+ arc_code_symbol (expressionP);
+ }
+ else
+ {
+ /* It could be a register. */
+ int i, l;
+ struct arc_ext_operand_value *ext_oper = arc_ext_operands;
+ p++;
+
+ while (ext_oper)
+ {
+ l = strlen (ext_oper->operand.name);
+ if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
+ {
+ input_line_pointer += l + 1;
+ expressionP->X_op = O_register;
+ expressionP->X_add_number = (offsetT) &ext_oper->operand;
+ return;
+ }
+ ext_oper = ext_oper->next;
+ }
+ for (i = 0; i < arc_reg_names_count; i++)
+ {
+ l = strlen (arc_reg_names[i].name);
+ if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
+ {
+ input_line_pointer += l + 1;
+ expressionP->X_op = O_register;
+ expressionP->X_add_number = (offsetT) &arc_reg_names[i];
+ break;
+ }
+ }
+ }
}
/* We have no need to default values of symbols.
@@ -1706,8 +1190,7 @@ md_operand (expressionP)
them all in the symbol table to begin with. */
symbolS *
-md_undefined_symbol (name)
- char *name ATTRIBUTE_UNUSED;
+md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
{
return 0;
}
@@ -1720,9 +1203,8 @@ md_undefined_symbol (name)
`label' will be right shifted by 2. */
void
-arc_parse_cons_expression (exp, nbytes)
- expressionS *exp;
- unsigned int nbytes ATTRIBUTE_UNUSED;
+arc_parse_cons_expression (expressionS *exp,
+ unsigned int nbytes ATTRIBUTE_UNUSED)
{
char *p = input_line_pointer;
int code_symbol_fix = 0;
@@ -1733,7 +1215,7 @@ arc_parse_cons_expression (exp, nbytes)
code_symbol_fix = 1;
strcpy (p, "; ");
}
- expr (0, exp);
+ expression_and_evaluate (exp);
if (code_symbol_fix)
{
arc_code_symbol (exp);
@@ -1744,11 +1226,10 @@ arc_parse_cons_expression (exp, nbytes)
/* Record a fixup for a cons expression. */
void
-arc_cons_fix_new (frag, where, nbytes, exp)
- fragS *frag;
- int where;
- int nbytes;
- expressionS *exp;
+arc_cons_fix_new (fragS *frag,
+ int where,
+ int nbytes,
+ expressionS *exp)
{
if (nbytes == 4)
{
@@ -1774,73 +1255,12 @@ arc_cons_fix_new (frag, where, nbytes, exp)
given a PC relative reloc. */
long
-md_pcrel_from (fixP)
- fixS *fixP;
+md_pcrel_from (fixS *fixP)
{
/* Return the address of the delay slot. */
return fixP->fx_frag->fr_address + fixP->fx_where + fixP->fx_size;
}
-/* Compute the reloc type of an expression.
- The possibly modified expression is stored in EXPNEW.
-
- This is used to convert the expressions generated by the %-op's into
- the appropriate operand type. It is called for both data in instructions
- (operands) and data outside instructions (variables, debugging info, etc.).
-
- Currently supported %-ops:
-
- %st(symbol): represented as "symbol >> 2"
- "st" is short for STatus as in the status register (pc)
-
- DEFAULT_TYPE is the type to use if no special processing is required.
-
- DATA_P is non-zero for data or limm values, zero for insn operands.
- Remember that the opcode "insertion fns" cannot be used on data, they're
- only for inserting operands into insns. They also can't be used for limm
- values as the insertion routines don't handle limm values. When called for
- insns we return fudged reloc types (real_value - BFD_RELOC_UNUSED). When
- called for data or limm values we use real reloc types. */
-
-static int
-get_arc_exp_reloc_type (data_p, default_type, exp, expnew)
- int data_p;
- int default_type;
- expressionS *exp;
- expressionS *expnew;
-{
- /* If the expression is "symbol >> 2" we must change it to just "symbol",
- as fix_new_exp can't handle it. Similarly for (symbol - symbol) >> 2.
- That's ok though. What's really going on here is that we're using
- ">> 2" as a special syntax for specifying BFD_RELOC_ARC_B26. */
-
- if (exp->X_op == O_right_shift
- && exp->X_op_symbol != NULL
- && exp->X_op_symbol->sy_value.X_op == O_constant
- && exp->X_op_symbol->sy_value.X_add_number == 2
- && exp->X_add_number == 0)
- {
- if (exp->X_add_symbol != NULL
- && (exp->X_add_symbol->sy_value.X_op == O_constant
- || exp->X_add_symbol->sy_value.X_op == O_symbol))
- {
- *expnew = *exp;
- expnew->X_op = O_symbol;
- expnew->X_op_symbol = NULL;
- return data_p ? BFD_RELOC_ARC_B26 : arc_operand_map['J'];
- }
- else if (exp->X_add_symbol != NULL
- && exp->X_add_symbol->sy_value.X_op == O_subtract)
- {
- *expnew = exp->X_add_symbol->sy_value;
- return data_p ? BFD_RELOC_ARC_B26 : arc_operand_map['J'];
- }
- }
-
- *expnew = *exp;
- return default_type;
-}
-
/* 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
@@ -1850,14 +1270,8 @@ get_arc_exp_reloc_type (data_p, default_type, exp, expnew)
that, we determine the correct reloc code and put it back in the fixup. */
void
-md_apply_fix3 (fixP, valP, seg)
- fixS *fixP;
- valueT * valP;
- segT seg;
+md_apply_fix (fixS *fixP, valueT * valP, segT seg)
{
-#if 0
- char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
-#endif
valueT value = * valP;
if (fixP->fx_addsy == (symbolS *) NULL)
@@ -1900,10 +1314,8 @@ md_apply_fix3 (fixP, valP, seg)
bfd_putl32 ((bfd_vma) insn, (unsigned char *) where);
if (fixP->fx_done)
- {
- /* Nothing else to do here. */
- return;
- }
+ /* Nothing else to do here. */
+ return;
/* Determine a BFD reloc value based on the operand information.
We are only prepared to turn a few of the operands into relocs.
@@ -1956,12 +1368,6 @@ md_apply_fix3 (fixP, valP, seg)
md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
value, 4);
break;
-#if 0
- case BFD_RELOC_64:
- md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
- value, 8);
- break;
-#endif
case BFD_RELOC_ARC_B26:
/* If !fixP->fx_done then `value' is an implicit addend.
We must shift it right by 2 in this case as well because the
@@ -1981,15 +1387,15 @@ md_apply_fix3 (fixP, valP, seg)
format. */
arelent *
-tc_gen_reloc (section, fixP)
- asection *section ATTRIBUTE_UNUSED;
- fixS *fixP;
+tc_gen_reloc (asection *section ATTRIBUTE_UNUSED,
+ fixS *fixP)
{
arelent *reloc;
- reloc = (arelent *) xmalloc (sizeof (arelent));
+ reloc = xmalloc (sizeof (arelent));
+ reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
- reloc->sym_ptr_ptr = &fixP->fx_addsy->bsym;
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
reloc->howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
if (reloc->howto == (reloc_howto_type *) NULL)
@@ -2010,3 +1416,520 @@ tc_gen_reloc (section, fixP)
return reloc;
}
+
+const pseudo_typeS md_pseudo_table[] =
+{
+ { "align", s_align_bytes, 0 }, /* Defaulting is invalid (0). */
+ { "comm", arc_common, 0 },
+ { "common", arc_common, 0 },
+ { "lcomm", arc_common, 1 },
+ { "lcommon", arc_common, 1 },
+ { "2byte", cons, 2 },
+ { "half", cons, 2 },
+ { "short", cons, 2 },
+ { "3byte", cons, 3 },
+ { "4byte", cons, 4 },
+ { "word", cons, 4 },
+ { "option", arc_option, 0 },
+ { "cpu", arc_option, 0 },
+ { "block", s_space, 0 },
+ { "extcondcode", arc_extoper, 0 },
+ { "extcoreregister", arc_extoper, 1 },
+ { "extauxregister", arc_extoper, 2 },
+ { "extinstruction", arc_extinst, 0 },
+ { NULL, 0, 0 },
+};
+
+/* This routine is called for each instruction to be assembled. */
+
+void
+md_assemble (char *str)
+{
+ const struct arc_opcode *opcode;
+ const struct arc_opcode *std_opcode;
+ struct arc_opcode *ext_opcode;
+ char *start;
+ const char *last_errmsg = 0;
+ arc_insn insn;
+ static int init_tables_p = 0;
+
+ /* Opcode table initialization is deferred until here because we have to
+ wait for a possible .option command. */
+ if (!init_tables_p)
+ {
+ init_opcode_tables (arc_mach_type);
+ init_tables_p = 1;
+ }
+
+ /* Skip leading white space. */
+ while (ISSPACE (*str))
+ str++;
+
+ /* The instructions are stored in lists hashed by the first letter (though
+ we needn't care how they're hashed). Get the first in the list. */
+
+ ext_opcode = arc_ext_opcodes;
+ std_opcode = arc_opcode_lookup_asm (str);
+
+ /* Keep looking until we find a match. */
+ start = str;
+ for (opcode = (ext_opcode ? ext_opcode : std_opcode);
+ opcode != NULL;
+ opcode = (ARC_OPCODE_NEXT_ASM (opcode)
+ ? ARC_OPCODE_NEXT_ASM (opcode)
+ : (ext_opcode ? ext_opcode = NULL, std_opcode : NULL)))
+ {
+ int past_opcode_p, fc, num_suffixes;
+ int fix_up_at = 0;
+ char *syn;
+ struct arc_fixup fixups[MAX_FIXUPS];
+ /* Used as a sanity check. If we need a limm reloc, make sure we ask
+ for an extra 4 bytes from frag_more. */
+ int limm_reloc_p;
+ int ext_suffix_p;
+ const struct arc_operand_value *insn_suffixes[MAX_SUFFIXES];
+
+ /* Is this opcode supported by the selected cpu? */
+ if (! arc_opcode_supported (opcode))
+ continue;
+
+ /* Scan the syntax string. If it doesn't match, try the next one. */
+ arc_opcode_init_insert ();
+ insn = opcode->value;
+ fc = 0;
+ past_opcode_p = 0;
+ num_suffixes = 0;
+ limm_reloc_p = 0;
+ ext_suffix_p = 0;
+
+ /* We don't check for (*str != '\0') here because we want to parse
+ any trailing fake arguments in the syntax string. */
+ for (str = start, syn = opcode->syntax; *syn != '\0';)
+ {
+ int mods;
+ const struct arc_operand *operand;
+
+ /* Non operand chars must match exactly. */
+ if (*syn != '%' || *++syn == '%')
+ {
+ if (*str == *syn)
+ {
+ if (*syn == ' ')
+ past_opcode_p = 1;
+ ++syn;
+ ++str;
+ }
+ else
+ break;
+ continue;
+ }
+
+ /* We have an operand. Pick out any modifiers. */
+ mods = 0;
+ while (ARC_MOD_P (arc_operands[arc_operand_map[(int) *syn]].flags))
+ {
+ mods |= arc_operands[arc_operand_map[(int) *syn]].flags & ARC_MOD_BITS;
+ ++syn;
+ }
+ operand = arc_operands + arc_operand_map[(int) *syn];
+ if (operand->fmt == 0)
+ as_fatal ("unknown syntax format character `%c'", *syn);
+
+ if (operand->flags & ARC_OPERAND_FAKE)
+ {
+ const char *errmsg = NULL;
+ if (operand->insert)
+ {
+ insn = (*operand->insert) (insn, operand, mods, NULL, 0, &errmsg);
+ if (errmsg != (const char *) NULL)
+ {
+ last_errmsg = errmsg;
+ if (operand->flags & ARC_OPERAND_ERROR)
+ {
+ as_bad (errmsg);
+ return;
+ }
+ else if (operand->flags & ARC_OPERAND_WARN)
+ as_warn (errmsg);
+ break;
+ }
+ if (limm_reloc_p
+ && (operand->flags && operand->flags & ARC_OPERAND_LIMM)
+ && (operand->flags &
+ (ARC_OPERAND_ABSOLUTE_BRANCH | ARC_OPERAND_ADDRESS)))
+ {
+ fixups[fix_up_at].opindex = arc_operand_map[operand->fmt];
+ }
+ }
+ ++syn;
+ }
+ /* Are we finished with suffixes? */
+ else if (!past_opcode_p)
+ {
+ int found;
+ char c;
+ char *s, *t;
+ const struct arc_operand_value *suf, *suffix_end;
+ const struct arc_operand_value *suffix = NULL;
+
+ if (!(operand->flags & ARC_OPERAND_SUFFIX))
+ abort ();
+
+ /* If we're at a space in the input string, we want to skip the
+ remaining suffixes. There may be some fake ones though, so
+ just go on to try the next one. */
+ if (*str == ' ')
+ {
+ ++syn;
+ continue;
+ }
+
+ s = str;
+ if (mods & ARC_MOD_DOT)
+ {
+ if (*s != '.')
+ break;
+ ++s;
+ }
+ else
+ {
+ /* This can happen in "b.nd foo" and we're currently looking
+ for "%q" (ie: a condition code suffix). */
+ if (*s == '.')
+ {
+ ++syn;
+ continue;
+ }
+ }
+
+ /* Pick the suffix out and look it up via the hash table. */
+ for (t = s; *t && ISALNUM (*t); ++t)
+ continue;
+ c = *t;
+ *t = '\0';
+ if ((suf = get_ext_suffix (s)))
+ ext_suffix_p = 1;
+ else
+ suf = hash_find (arc_suffix_hash, s);
+ if (!suf)
+ {
+ /* This can happen in "blle foo" and we're currently using
+ the template "b%q%.n %j". The "bl" insn occurs later in
+ the table so "lle" isn't an illegal suffix. */
+ *t = c;
+ break;
+ }
+
+ /* Is it the right type? Note that the same character is used
+ several times, so we have to examine all of them. This is
+ relatively efficient as equivalent entries are kept
+ together. If it's not the right type, don't increment `str'
+ so we try the next one in the series. */
+ found = 0;
+ if (ext_suffix_p && arc_operands[suf->type].fmt == *syn)
+ {
+ /* Insert the suffix's value into the insn. */
+ *t = c;
+ if (operand->insert)
+ insn = (*operand->insert) (insn, operand,
+ mods, NULL, suf->value,
+ NULL);
+ else
+ insn |= suf->value << operand->shift;
+ suffix = suf;
+ str = t;
+ found = 1;
+ }
+ else
+ {
+ *t = c;
+ suffix_end = arc_suffixes + arc_suffixes_count;
+ for (suffix = suf;
+ suffix < suffix_end && strcmp (suffix->name, suf->name) == 0;
+ ++suffix)
+ {
+ if (arc_operands[suffix->type].fmt == *syn)
+ {
+ /* Insert the suffix's value into the insn. */
+ if (operand->insert)
+ insn = (*operand->insert) (insn, operand,
+ mods, NULL, suffix->value,
+ NULL);
+ else
+ insn |= suffix->value << operand->shift;
+
+ str = t;
+ found = 1;
+ break;
+ }
+ }
+ }
+ ++syn;
+ if (!found)
+ /* Wrong type. Just go on to try next insn entry. */
+ ;
+ else
+ {
+ if (num_suffixes == MAX_SUFFIXES)
+ as_bad ("too many suffixes");
+ else
+ insn_suffixes[num_suffixes++] = suffix;
+ }
+ }
+ else
+ /* This is either a register or an expression of some kind. */
+ {
+ char *hold;
+ const struct arc_operand_value *reg = NULL;
+ long value = 0;
+ expressionS exp;
+
+ if (operand->flags & ARC_OPERAND_SUFFIX)
+ abort ();
+
+ /* Is there anything left to parse?
+ We don't check for this at the top because we want to parse
+ any trailing fake arguments in the syntax string. */
+ if (is_end_of_line[(unsigned char) *str])
+ break;
+
+ /* Parse the operand. */
+ hold = input_line_pointer;
+ input_line_pointer = str;
+ expression (&exp);
+ str = input_line_pointer;
+ input_line_pointer = hold;
+
+ if (exp.X_op == O_illegal)
+ as_bad ("illegal operand");
+ else if (exp.X_op == O_absent)
+ as_bad ("missing operand");
+ else if (exp.X_op == O_constant)
+ value = exp.X_add_number;
+ else if (exp.X_op == O_register)
+ reg = (struct arc_operand_value *) exp.X_add_number;
+#define IS_REG_DEST_OPERAND(o) ((o) == 'a')
+ else if (IS_REG_DEST_OPERAND (*syn))
+ as_bad ("symbol as destination register");
+ else
+ {
+ if (!strncmp (str, "@h30", 4))
+ {
+ arc_code_symbol (&exp);
+ str += 4;
+ }
+ /* We need to generate a fixup for this expression. */
+ if (fc >= MAX_FIXUPS)
+ as_fatal ("too many fixups");
+ fixups[fc].exp = exp;
+ /* We don't support shimm relocs. break here to force
+ the assembler to output a limm. */
+#define IS_REG_SHIMM_OFFSET(o) ((o) == 'd')
+ if (IS_REG_SHIMM_OFFSET (*syn))
+ break;
+ /* If this is a register constant (IE: one whose
+ register value gets stored as 61-63) then this
+ must be a limm. */
+ /* ??? This bit could use some cleaning up.
+ Referencing the format chars like this goes
+ against style. */
+ if (IS_SYMBOL_OPERAND (*syn))
+ {
+ const char *junk;
+ limm_reloc_p = 1;
+ /* Save this, we don't yet know what reloc to use. */
+ fix_up_at = fc;
+ /* Tell insert_reg we need a limm. This is
+ needed because the value at this point is
+ zero, a shimm. */
+ /* ??? We need a cleaner interface than this. */
+ (*arc_operands[arc_operand_map['Q']].insert)
+ (insn, operand, mods, reg, 0L, &junk);
+ }
+ else
+ fixups[fc].opindex = arc_operand_map[(int) *syn];
+ ++fc;
+ value = 0;
+ }
+
+ /* Insert the register or expression into the instruction. */
+ if (operand->insert)
+ {
+ const char *errmsg = NULL;
+ insn = (*operand->insert) (insn, operand, mods,
+ reg, (long) value, &errmsg);
+ if (errmsg != (const char *) NULL)
+ {
+ last_errmsg = errmsg;
+ if (operand->flags & ARC_OPERAND_ERROR)
+ {
+ as_bad (errmsg);
+ return;
+ }
+ else if (operand->flags & ARC_OPERAND_WARN)
+ as_warn (errmsg);
+ break;
+ }
+ }
+ else
+ insn |= (value & ((1 << operand->bits) - 1)) << operand->shift;
+
+ ++syn;
+ }
+ }
+
+ /* If we're at the end of the syntax string, we're done. */
+ /* FIXME: try to move this to a separate function. */
+ if (*syn == '\0')
+ {
+ int i;
+ char *f;
+ long limm, limm_p;
+
+ /* 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 (!is_end_of_line[(unsigned char) *str])
+ as_bad ("junk at end of line: `%s'", str);
+
+ /* Is there a limm value? */
+ limm_p = arc_opcode_limm_p (&limm);
+
+ /* Perform various error and warning tests. */
+
+ {
+ static int in_delay_slot_p = 0;
+ static int prev_insn_needs_cc_nop_p = 0;
+ /* delay slot type seen */
+ int delay_slot_type = ARC_DELAY_NONE;
+ /* conditional execution flag seen */
+ int conditional = 0;
+ /* 1 if condition codes are being set */
+ int cc_set_p = 0;
+ /* 1 if conditional branch, including `b' "branch always" */
+ int cond_branch_p = opcode->flags & ARC_OPCODE_COND_BRANCH;
+
+ for (i = 0; i < num_suffixes; ++i)
+ {
+ switch (arc_operands[insn_suffixes[i]->type].fmt)
+ {
+ case 'n':
+ delay_slot_type = insn_suffixes[i]->value;
+ break;
+ case 'q':
+ conditional = insn_suffixes[i]->value;
+ break;
+ case 'f':
+ cc_set_p = 1;
+ break;
+ }
+ }
+
+ /* Putting an insn with a limm value in a delay slot is supposed to
+ be legal, but let's warn the user anyway. Ditto for 8 byte
+ jumps with delay slots. */
+ if (in_delay_slot_p && limm_p)
+ as_warn ("8 byte instruction in delay slot");
+ if (delay_slot_type != ARC_DELAY_NONE
+ && limm_p && arc_insn_not_jl (insn)) /* except for jl addr */
+ as_warn ("8 byte jump instruction with delay slot");
+ in_delay_slot_p = (delay_slot_type != ARC_DELAY_NONE) && !limm_p;
+
+ /* Warn when a conditional branch immediately follows a set of
+ the condition codes. Note that this needn't be done if the
+ insn that sets the condition codes uses a limm. */
+ if (cond_branch_p && conditional != 0 /* 0 = "always" */
+ && prev_insn_needs_cc_nop_p && arc_mach_type == bfd_mach_arc_5)
+ as_warn ("conditional branch follows set of flags");
+ prev_insn_needs_cc_nop_p =
+ /* FIXME: ??? not required:
+ (delay_slot_type != ARC_DELAY_NONE) && */
+ cc_set_p && !limm_p;
+ }
+
+ /* Write out the instruction.
+ It is important to fetch enough space in one call to `frag_more'.
+ We use (f - frag_now->fr_literal) to compute where we are and we
+ don't want frag_now to change between calls. */
+ if (limm_p)
+ {
+ f = frag_more (8);
+ md_number_to_chars (f, insn, 4);
+ md_number_to_chars (f + 4, limm, 4);
+ dwarf2_emit_insn (8);
+ }
+ else if (limm_reloc_p)
+ /* We need a limm reloc, but the tables think we don't. */
+ abort ();
+ else
+ {
+ f = frag_more (4);
+ md_number_to_chars (f, insn, 4);
+ dwarf2_emit_insn (4);
+ }
+
+ /* Create any fixups. */
+ for (i = 0; i < fc; ++i)
+ {
+ int op_type, reloc_type;
+ expressionS exptmp;
+ const struct arc_operand *operand;
+
+ /* Create a fixup for this operand.
+ At this point we do not use a bfd_reloc_code_real_type for
+ operands residing in the insn, but instead just use the
+ operand index. This lets us easily handle fixups for any
+ operand type, although that is admittedly not a very exciting
+ feature. We pick a BFD reloc type in md_apply_fix.
+
+ Limm values (4 byte immediate "constants") must be treated
+ normally because they're not part of the actual insn word
+ and thus the insertion routines don't handle them. */
+
+ if (arc_operands[fixups[i].opindex].flags & ARC_OPERAND_LIMM)
+ {
+ /* Modify the fixup addend as required by the cpu. */
+ fixups[i].exp.X_add_number += arc_limm_fixup_adjust (insn);
+ op_type = fixups[i].opindex;
+ /* FIXME: can we add this data to the operand table? */
+ if (op_type == arc_operand_map['L']
+ || op_type == arc_operand_map['s']
+ || op_type == arc_operand_map['o']
+ || op_type == arc_operand_map['O'])
+ reloc_type = BFD_RELOC_32;
+ else if (op_type == arc_operand_map['J'])
+ reloc_type = BFD_RELOC_ARC_B26;
+ else
+ abort ();
+ reloc_type = get_arc_exp_reloc_type (1, reloc_type,
+ &fixups[i].exp,
+ &exptmp);
+ }
+ else
+ {
+ op_type = get_arc_exp_reloc_type (0, fixups[i].opindex,
+ &fixups[i].exp, &exptmp);
+ reloc_type = op_type + (int) BFD_RELOC_UNUSED;
+ }
+ operand = &arc_operands[op_type];
+ fix_new_exp (frag_now,
+ ((f - frag_now->fr_literal)
+ + (operand->flags & ARC_OPERAND_LIMM ? 4 : 0)), 4,
+ &exptmp,
+ (operand->flags & ARC_OPERAND_RELATIVE_BRANCH) != 0,
+ (bfd_reloc_code_real_type) reloc_type);
+ }
+ return;
+ }
+ }
+
+ if (NULL == last_errmsg)
+ as_bad ("bad instruction `%s'", start);
+ else
+ as_bad (last_errmsg);
+}
diff --git a/contrib/binutils/gas/config/tc-arc.h b/contrib/binutils/gas/config/tc-arc.h
index 884d375546ad..4c3d9c2cdd07 100644
--- a/contrib/binutils/gas/config/tc-arc.h
+++ b/contrib/binutils/gas/config/tc-arc.h
@@ -1,5 +1,5 @@
/* tc-arc.h - Macros and type defines for the ARC.
- Copyright 1994, 1995, 1997, 2000, 2001, 2002
+ Copyright 1994, 1995, 1997, 2000, 2001, 2002, 2005
Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define TC_ARC 1
@@ -45,28 +45,27 @@
/* The endianness of the target format may change based on command
line arguments. */
-extern const char *arc_target_format;
-#define DEFAULT_TARGET_FORMAT "elf32-littlearc"
-#define TARGET_FORMAT arc_target_format
-#define DEFAULT_BYTE_ORDER LITTLE_ENDIAN
+extern const char * arc_target_format;
+#define DEFAULT_TARGET_FORMAT "elf32-littlearc"
+#define TARGET_FORMAT arc_target_format
+#define DEFAULT_BYTE_ORDER LITTLE_ENDIAN
#define WORKING_DOT_WORD
-
-#define LISTING_HEADER "ARC GAS "
+#define LISTING_HEADER "ARC GAS "
/* The ARC needs to parse reloc specifiers in .word. */
-extern void arc_parse_cons_expression PARAMS ((struct expressionS *, unsigned));
+extern void arc_parse_cons_expression (struct expressionS *, unsigned);
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) \
-arc_parse_cons_expression (EXP, NBYTES)
+ arc_parse_cons_expression (EXP, NBYTES)
-extern void arc_cons_fix_new PARAMS ((struct frag *, int, int, struct expressionS *));
+extern void arc_cons_fix_new (struct frag *, int, int, struct expressionS *);
#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
-arc_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
+ arc_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
#define DWARF2_LINE_MIN_INSN_LENGTH 4
-/* Values passed to md_apply_fix3 don't include the symbol value. */
+/* Values passed to md_apply_fix don't include the symbol value. */
#define MD_APPLY_SYM_VALUE(FIX) 0
/* No shared lib support, so we don't need to ensure externally
diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c
index 2ed5196f7429..ae420b353471 100644
--- a/contrib/binutils/gas/config/tc-arm.c
+++ b/contrib/binutils/gas/config/tc-arm.c
@@ -1,5 +1,6 @@
/* tc-arm.c -- Assemble for the ARM
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004, 2005
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -16,16 +17,16 @@
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
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <string.h>
-#define NO_RELOC 0
+#define NO_RELOC 0
#include "as.h"
#include "safe-ctype.h"
@@ -36,86 +37,58 @@
#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 */
+/* XXX Set this to 1 after the next binutils release. */
#define WARN_DEPRECATED 0
-/* The following bitmasks control CPU extensions: */
-#define ARM_EXT_V1 0x00000001 /* All processors (core set). */
-#define ARM_EXT_V2 0x00000002 /* Multiply instructions. */
-#define ARM_EXT_V2S 0x00000004 /* SWP instructions. */
-#define ARM_EXT_V3 0x00000008 /* MSR MRS. */
-#define ARM_EXT_V3M 0x00000010 /* Allow long multiplies. */
-#define ARM_EXT_V4 0x00000020 /* Allow half word loads. */
-#define ARM_EXT_V4T 0x00000040 /* Thumb v1. */
-#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */
-#define ARM_EXT_V5T 0x00000100 /* Thumb v2. */
-#define ARM_EXT_V5ExP 0x00000200 /* DSP core set. */
-#define ARM_EXT_V5E 0x00000400 /* DSP Double transfers. */
-#define ARM_EXT_V5J 0x00000800 /* Jazelle extension. */
-#define ARM_EXT_V6 0x00001000 /* ARM V6. */
-
-/* Co-processor space extensions. */
-#define ARM_CEXT_XSCALE 0x00800000 /* Allow MIA etc. */
-#define ARM_CEXT_MAVERICK 0x00400000 /* Use Cirrus/DSP coprocessor. */
-#define ARM_CEXT_IWMMXT 0x00200000 /* Intel Wireless MMX technology coprocessor. */
-
-/* Architectures are the sum of the base and extensions. The ARM ARM (rev E)
- defines the following: ARMv3, ARMv3M, ARMv4xM, ARMv4, ARMv4TxM, ARMv4T,
- ARMv5xM, ARMv5, ARMv5TxM, ARMv5T, ARMv5TExP, ARMv5TE. To these we add
- three more to cover cores prior to ARM6. Finally, there are cores which
- implement further extensions in the co-processor space. */
-#define ARM_ARCH_V1 ARM_EXT_V1
-#define ARM_ARCH_V2 (ARM_ARCH_V1 | ARM_EXT_V2)
-#define ARM_ARCH_V2S (ARM_ARCH_V2 | ARM_EXT_V2S)
-#define ARM_ARCH_V3 (ARM_ARCH_V2S | ARM_EXT_V3)
-#define ARM_ARCH_V3M (ARM_ARCH_V3 | ARM_EXT_V3M)
-#define ARM_ARCH_V4xM (ARM_ARCH_V3 | ARM_EXT_V4)
-#define ARM_ARCH_V4 (ARM_ARCH_V3M | ARM_EXT_V4)
-#define ARM_ARCH_V4TxM (ARM_ARCH_V4xM | ARM_EXT_V4T)
-#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_EXT_V4T)
-#define ARM_ARCH_V5xM (ARM_ARCH_V4xM | ARM_EXT_V5)
-#define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5)
-#define ARM_ARCH_V5TxM (ARM_ARCH_V5xM | ARM_EXT_V4T | ARM_EXT_V5T)
-#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_EXT_V4T | ARM_EXT_V5T)
-#define ARM_ARCH_V5TExP (ARM_ARCH_V5T | ARM_EXT_V5ExP)
-#define ARM_ARCH_V5TE (ARM_ARCH_V5TExP | ARM_EXT_V5E)
-#define ARM_ARCH_V5TEJ (ARM_ARCH_V5TE | ARM_EXT_V5J)
-#define ARM_ARCH_V6 (ARM_ARCH_V5TEJ | ARM_EXT_V6)
-
-/* Processors with specific extensions in the co-processor space. */
-#define ARM_ARCH_XSCALE (ARM_ARCH_V5TE | ARM_CEXT_XSCALE)
-#define ARM_ARCH_IWMMXT (ARM_ARCH_XSCALE | ARM_CEXT_IWMMXT)
-
-/* Some useful combinations: */
-#define ARM_ANY 0x0000ffff /* Any basic core. */
-#define ARM_ALL 0x00ffffff /* Any core + co-processor */
-#define CPROC_ANY 0x00ff0000 /* Any co-processor */
-#define FPU_ANY 0xff000000 /* Note this is ~ARM_ALL. */
-
-
-#define FPU_FPA_EXT_V1 0x80000000 /* Base FPA instruction set. */
-#define FPU_FPA_EXT_V2 0x40000000 /* LFM/SFM. */
-#define FPU_VFP_EXT_NONE 0x20000000 /* Use VFP word-ordering. */
-#define FPU_VFP_EXT_V1xD 0x10000000 /* Base VFP instruction set. */
-#define FPU_VFP_EXT_V1 0x08000000 /* Double-precision insns. */
-#define FPU_VFP_EXT_V2 0x04000000 /* ARM10E VFPr1. */
-#define FPU_MAVERICK 0x02000000 /* Cirrus Maverick. */
-#define FPU_NONE 0
-
-#define FPU_ARCH_FPE FPU_FPA_EXT_V1
-#define FPU_ARCH_FPA (FPU_ARCH_FPE | FPU_FPA_EXT_V2)
-
-#define FPU_ARCH_VFP FPU_VFP_EXT_NONE
-#define FPU_ARCH_VFP_V1xD (FPU_VFP_EXT_V1xD | FPU_VFP_EXT_NONE)
-#define FPU_ARCH_VFP_V1 (FPU_ARCH_VFP_V1xD | FPU_VFP_EXT_V1)
-#define FPU_ARCH_VFP_V2 (FPU_ARCH_VFP_V1 | FPU_VFP_EXT_V2)
-
-#define FPU_ARCH_MAVERICK FPU_MAVERICK
+#ifdef OBJ_ELF
+/* Must be at least the size of the largest unwind opcode (currently two). */
+#define ARM_OPCODE_CHUNK_SIZE 8
+
+/* This structure holds the unwinding state. */
+
+static struct
+{
+ symbolS * proc_start;
+ symbolS * table_entry;
+ symbolS * personality_routine;
+ int personality_index;
+ /* The segment containing the function. */
+ segT saved_seg;
+ subsegT saved_subseg;
+ /* Opcodes generated from this function. */
+ unsigned char * opcodes;
+ int opcode_count;
+ int opcode_alloc;
+ /* The number of bytes pushed to the stack. */
+ offsetT frame_size;
+ /* We don't add stack adjustment opcodes immediately so that we can merge
+ multiple adjustments. We can also omit the final adjustment
+ when using a frame pointer. */
+ offsetT pending_offset;
+ /* These two fields are set by both unwind_movsp and unwind_setfp. They
+ hold the reg+offset to use when restoring sp from a frame pointer. */
+ offsetT fp_offset;
+ int fp_reg;
+ /* Nonzero if an unwind_setfp directive has been seen. */
+ unsigned fp_used:1;
+ /* Nonzero if the last opcode restores sp from fp_reg. */
+ unsigned sp_restored:1;
+} unwind;
+
+/* Bit N indicates that an R_ARM_NONE relocation has been output for
+ __aeabi_unwind_cpp_prN already if set. This enables dependencies to be
+ emitted only once per section, to save unnecessary bloat. */
+static unsigned int marked_pr_dependency = 0;
+
+#endif /* OBJ_ELF */
enum arm_float_abi
{
@@ -124,195 +97,200 @@ enum arm_float_abi
ARM_FLOAT_ABI_SOFT
};
-/* Types of processor to assemble for. */
-#define ARM_1 ARM_ARCH_V1
-#define ARM_2 ARM_ARCH_V2
-#define ARM_3 ARM_ARCH_V2S
-#define ARM_250 ARM_ARCH_V2S
-#define ARM_6 ARM_ARCH_V3
-#define ARM_7 ARM_ARCH_V3
-#define ARM_8 ARM_ARCH_V4
-#define ARM_9 ARM_ARCH_V4T
-#define ARM_STRONG ARM_ARCH_V4
-#define ARM_CPU_MASK 0x0000000f /* XXX? */
-
+/* Types of processor to assemble for. */
#ifndef CPU_DEFAULT
#if defined __XSCALE__
-#define CPU_DEFAULT (ARM_ARCH_XSCALE)
+#define CPU_DEFAULT ARM_ARCH_XSCALE
#else
#if defined __thumb__
-#define CPU_DEFAULT (ARM_ARCH_V5T)
-#else
-#define CPU_DEFAULT ARM_ANY
+#define CPU_DEFAULT ARM_ARCH_V5T
#endif
#endif
#endif
-#ifdef TE_LINUX
-#define FPU_DEFAULT FPU_ARCH_FPA
-#endif
-
-#ifdef TE_NetBSD
-#ifdef OBJ_ELF
-#define FPU_DEFAULT FPU_ARCH_VFP /* Soft-float, but VFP order. */
-#else
-/* Legacy a.out format. */
-#define FPU_DEFAULT FPU_ARCH_FPA /* Soft-float, but FPA order. */
-#endif
-#endif
-
-/* For backwards compatibility we default to the FPA. */
#ifndef FPU_DEFAULT
-#define FPU_DEFAULT FPU_ARCH_FPA
-#endif
-
-#define streq(a, b) (strcmp (a, b) == 0)
-#define skip_whitespace(str) while (*(str) == ' ') ++(str)
-
-static unsigned long cpu_variant;
-static int target_oabi = 0;
+# ifdef TE_LINUX
+# define FPU_DEFAULT FPU_ARCH_FPA
+# elif defined (TE_NetBSD)
+# ifdef OBJ_ELF
+# define FPU_DEFAULT FPU_ARCH_VFP /* Soft-float, but VFP order. */
+# else
+ /* Legacy a.out format. */
+# define FPU_DEFAULT FPU_ARCH_FPA /* Soft-float, but FPA order. */
+# endif
+# elif defined (TE_VXWORKS)
+# define FPU_DEFAULT FPU_ARCH_VFP /* Soft-float, VFP order. */
+# else
+ /* For backwards compatibility, default to FPA. */
+# define FPU_DEFAULT FPU_ARCH_FPA
+# endif
+#endif /* ifndef FPU_DEFAULT */
+
+#define streq(a, b) (strcmp (a, b) == 0)
+
+static arm_feature_set cpu_variant;
+static arm_feature_set arm_arch_used;
+static arm_feature_set thumb_arch_used;
/* Flags stored in private area of BFD structure. */
-static int uses_apcs_26 = FALSE;
-static int atpcs = FALSE;
+static int uses_apcs_26 = FALSE;
+static int atpcs = FALSE;
static int support_interwork = FALSE;
static int uses_apcs_float = FALSE;
-static int pic_code = FALSE;
+static int pic_code = FALSE;
/* Variables that we set while parsing command-line options. Once all
options have been read we re-process these values to set the real
assembly flags. */
-static int legacy_cpu = -1;
-static int legacy_fpu = -1;
-
-static int mcpu_cpu_opt = -1;
-static int mcpu_fpu_opt = -1;
-static int march_cpu_opt = -1;
-static int march_fpu_opt = -1;
-static int mfpu_opt = -1;
-static int mfloat_abi_opt = -1;
-
-/* This array holds the chars that always start a comment. If the
- pre-processor is disabled, these aren't very useful. */
-const char comment_chars[] = "@";
-
-/* This array holds the chars that only start a comment at the beginning of
- a line. If the line seems to have the form '# 123 filename'
- .line and .file directives will appear in the pre-processed output. */
-/* Note that input_file.c hand checks for '#' at the beginning of the
- first line of the input file. This is because the compiler outputs
- #NO_APP at the beginning of its output. */
-/* Also note that comments like this one will always work. */
-const char line_comment_chars[] = "#";
-
-const char line_separator_chars[] = ";";
-
-/* Chars that can be used to separate mant
- from exp in floating point numbers. */
-const char EXP_CHARS[] = "eE";
-
-/* Chars that mean this number is a floating point constant. */
-/* As in 0f12.456 */
-/* or 0d1.2345e12 */
+static const arm_feature_set *legacy_cpu = NULL;
+static const arm_feature_set *legacy_fpu = NULL;
+
+static const arm_feature_set *mcpu_cpu_opt = NULL;
+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;
+
+/* 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_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;
+static const arm_feature_set fpu_endian_pure = FPU_ARCH_ENDIAN_PURE;
+
+#ifdef CPU_DEFAULT
+static const arm_feature_set cpu_default = CPU_DEFAULT;
+#endif
-const char FLT_CHARS[] = "rRsSfFdDxXeEpP";
+static const arm_feature_set arm_ext_v1 = ARM_FEATURE (ARM_EXT_V1, 0);
+static const arm_feature_set arm_ext_v2 = ARM_FEATURE (ARM_EXT_V1, 0);
+static const arm_feature_set arm_ext_v2s = ARM_FEATURE (ARM_EXT_V2S, 0);
+static const arm_feature_set arm_ext_v3 = ARM_FEATURE (ARM_EXT_V3, 0);
+static const arm_feature_set arm_ext_v3m = ARM_FEATURE (ARM_EXT_V3M, 0);
+static const arm_feature_set arm_ext_v4 = ARM_FEATURE (ARM_EXT_V4, 0);
+static const arm_feature_set arm_ext_v4t = ARM_FEATURE (ARM_EXT_V4T, 0);
+static const arm_feature_set arm_ext_v5 = ARM_FEATURE (ARM_EXT_V5, 0);
+static const arm_feature_set arm_ext_v4t_5 =
+ ARM_FEATURE (ARM_EXT_V4T | ARM_EXT_V5, 0);
+static const arm_feature_set arm_ext_v5t = ARM_FEATURE (ARM_EXT_V5T, 0);
+static const arm_feature_set arm_ext_v5e = ARM_FEATURE (ARM_EXT_V5E, 0);
+static const arm_feature_set arm_ext_v5exp = ARM_FEATURE (ARM_EXT_V5ExP, 0);
+static const arm_feature_set arm_ext_v5j = ARM_FEATURE (ARM_EXT_V5J, 0);
+static const arm_feature_set arm_ext_v6 = ARM_FEATURE (ARM_EXT_V6, 0);
+static const arm_feature_set arm_ext_v6k = ARM_FEATURE (ARM_EXT_V6K, 0);
+static const arm_feature_set arm_ext_v6z = ARM_FEATURE (ARM_EXT_V6Z, 0);
+static const arm_feature_set arm_ext_v6t2 = ARM_FEATURE (ARM_EXT_V6T2, 0);
+static const arm_feature_set arm_ext_v6_notm = ARM_FEATURE (ARM_EXT_V6_NOTM, 0);
+static const arm_feature_set arm_ext_div = ARM_FEATURE (ARM_EXT_DIV, 0);
+static const arm_feature_set arm_ext_v7 = ARM_FEATURE (ARM_EXT_V7, 0);
+static const arm_feature_set arm_ext_v7a = ARM_FEATURE (ARM_EXT_V7A, 0);
+static const arm_feature_set arm_ext_v7r = ARM_FEATURE (ARM_EXT_V7R, 0);
+static const arm_feature_set arm_ext_v7m = ARM_FEATURE (ARM_EXT_V7M, 0);
+
+static const arm_feature_set arm_arch_any = ARM_ANY;
+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_iwmmxt =
+ ARM_FEATURE (0, ARM_CEXT_IWMMXT);
+static const arm_feature_set arm_cext_xscale =
+ ARM_FEATURE (0, ARM_CEXT_XSCALE);
+static const arm_feature_set arm_cext_maverick =
+ ARM_FEATURE (0, ARM_CEXT_MAVERICK);
+static const arm_feature_set fpu_fpa_ext_v1 = ARM_FEATURE (0, FPU_FPA_EXT_V1);
+static const arm_feature_set fpu_fpa_ext_v2 = ARM_FEATURE (0, FPU_FPA_EXT_V2);
+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);
-/* Prefix characters that indicate the start of an immediate
- value. */
-#define is_immediate_prefix(C) ((C) == '#' || (C) == '$')
+static int mfloat_abi_opt = -1;
+/* Record user cpu selection for object attributes. */
+static arm_feature_set selected_cpu = ARM_ARCH_NONE;
+/* Must be long enough to hold any of the names in arm_cpus. */
+static char selected_cpu_name[16];
+#ifdef OBJ_ELF
+# ifdef EABI_DEFAULT
+static int meabi_flags = EABI_DEFAULT;
+# else
+static int meabi_flags = EF_ARM_EABI_UNKNOWN;
+# endif
+#endif
#ifdef OBJ_ELF
-/* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
+/* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
symbolS * GOT_symbol;
#endif
-/* Size of relocation record. */
-const int md_reloc_size = 8;
-
/* 0: assemble for ARM,
1: assemble for Thumb,
2: assemble for Thumb even though target CPU does not support thumb
instructions. */
static int thumb_mode = 0;
-typedef struct arm_fix
-{
- int thumb_mode;
-} arm_fix_data;
+/* If unified_syntax is true, we are processing the new unified
+ ARM/Thumb syntax. Important differences from the old ARM mode:
+
+ - Immediate operands do not require a # prefix.
+ - Conditional affixes always appear at the end of the
+ instruction. (For backward compatibility, those instructions
+ that formerly had them in the middle, continue to accept them
+ there.)
+ - The IT instruction may appear, and if it does is validated
+ against subsequent conditional affixes. It does not generate
+ machine code.
+
+ Important differences from the old Thumb mode:
+
+ - Immediate operands do not require a # prefix.
+ - Most of the V6T2 instructions are only available in unified mode.
+ - The .N and .W suffixes are recognized and honored (it is an error
+ if they cannot be honored).
+ - All instructions set the flags if and only if they have an 's' affix.
+ - Conditional affixes may be used. They are validated against
+ preceding IT instructions. Unlike ARM mode, you cannot use a
+ conditional affix except in the scope of an IT instruction. */
+
+static bfd_boolean unified_syntax = FALSE;
struct arm_it
{
- const char * error;
+ const char * error;
unsigned long instruction;
- int size;
+ int size;
+ int size_req;
+ int cond;
+ /* Set to the opcode if the instruction needs relaxation.
+ Zero if the instruction is not relaxed. */
+ unsigned long relax;
struct
{
bfd_reloc_code_real_type type;
- expressionS exp;
- int pc_rel;
+ expressionS exp;
+ int pc_rel;
} reloc;
-};
-
-struct arm_it inst;
-enum asm_shift_index
-{
- SHIFT_LSL = 0,
- SHIFT_LSR,
- SHIFT_ASR,
- SHIFT_ROR,
- SHIFT_RRX
-};
-
-struct asm_shift_properties
-{
- enum asm_shift_index index;
- unsigned long bit_field;
- unsigned int allows_0 : 1;
- unsigned int allows_32 : 1;
-};
-
-static const struct asm_shift_properties shift_properties [] =
-{
- { SHIFT_LSL, 0, 1, 0},
- { SHIFT_LSR, 0x20, 0, 1},
- { SHIFT_ASR, 0x40, 0, 1},
- { SHIFT_ROR, 0x60, 0, 0},
- { SHIFT_RRX, 0x60, 0, 0}
-};
-
-struct asm_shift_name
-{
- const char * name;
- const struct asm_shift_properties * properties;
-};
-
-static const struct asm_shift_name shift_names [] =
-{
- { "asl", shift_properties + SHIFT_LSL },
- { "lsl", shift_properties + SHIFT_LSL },
- { "lsr", shift_properties + SHIFT_LSR },
- { "asr", shift_properties + SHIFT_ASR },
- { "ror", shift_properties + SHIFT_ROR },
- { "rrx", shift_properties + SHIFT_RRX },
- { "ASL", shift_properties + SHIFT_LSL },
- { "LSL", shift_properties + SHIFT_LSL },
- { "LSR", shift_properties + SHIFT_LSR },
- { "ASR", shift_properties + SHIFT_ASR },
- { "ROR", shift_properties + SHIFT_ROR },
- { "RRX", shift_properties + SHIFT_RRX }
+ struct
+ {
+ unsigned reg;
+ signed int imm;
+ unsigned present : 1; /* Operand present. */
+ unsigned isreg : 1; /* Operand was a register. */
+ unsigned immisreg : 1; /* .imm field is a second register. */
+ unsigned hasreloc : 1; /* Operand has relocation suffix. */
+ unsigned writeback : 1; /* Operand has trailing ! */
+ unsigned preind : 1; /* Preindexed address. */
+ unsigned postind : 1; /* Postindexed address. */
+ unsigned negative : 1; /* Index register was negated. */
+ unsigned shifted : 1; /* Shift applied to operation. */
+ unsigned shift_kind : 3; /* Shift operation (enum shift_kind). */
+ } operands[6];
};
-/* Any kind of shift is accepted. */
-#define NO_SHIFT_RESTRICT 1
-/* The shift operand must be an immediate value, not a register. */
-#define SHIFT_IMMEDIATE 0
-/* The shift must be LSL or ASR and the operand must be an immediate. */
-#define SHIFT_LSL_OR_ASR_IMMEDIATE 2
-/* The shift must be ASR and the operand must be an immediate. */
-#define SHIFT_ASR_IMMEDIATE 3
-/* The shift must be LSL and the operand must be an immediate. */
-#define SHIFT_LSL_IMMEDIATE 4
+static struct arm_it inst;
#define NUM_FLOAT_VALS 8
@@ -321,7 +299,7 @@ const char * fp_const[] =
"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0", 0
};
-/* Number of littlenums required to hold an extended precision number. */
+/* Number of littlenums required to hold an extended precision number. */
#define MAX_LITTLENUMS 6
LITTLENUM_TYPE fp_values[NUM_FLOAT_VALS][MAX_LITTLENUMS];
@@ -329,246 +307,52 @@ LITTLENUM_TYPE fp_values[NUM_FLOAT_VALS][MAX_LITTLENUMS];
#define FAIL (-1)
#define SUCCESS (0)
-/* Whether a Co-processor load/store operation accepts write-back forms. */
-#define CP_WB_OK 1
-#define CP_NO_WB 0
-
#define SUFF_S 1
#define SUFF_D 2
#define SUFF_E 3
#define SUFF_P 4
-#define CP_T_X 0x00008000
-#define CP_T_Y 0x00400000
-#define CP_T_Pre 0x01000000
-#define CP_T_UD 0x00800000
-#define CP_T_WB 0x00200000
+#define CP_T_X 0x00008000
+#define CP_T_Y 0x00400000
-#define CONDS_BIT 0x00100000
-#define LOAD_BIT 0x00100000
+#define CONDS_BIT 0x00100000
+#define LOAD_BIT 0x00100000
#define DOUBLE_LOAD_FLAG 0x00000001
struct asm_cond
{
- const char * template;
+ const char * template;
unsigned long value;
};
-#define COND_ALWAYS 0xe0000000
-#define COND_MASK 0xf0000000
+#define COND_ALWAYS 0xE
-static const struct asm_cond conds[] =
+struct asm_psr
{
- {"eq", 0x00000000},
- {"ne", 0x10000000},
- {"cs", 0x20000000}, {"hs", 0x20000000},
- {"cc", 0x30000000}, {"ul", 0x30000000}, {"lo", 0x30000000},
- {"mi", 0x40000000},
- {"pl", 0x50000000},
- {"vs", 0x60000000},
- {"vc", 0x70000000},
- {"hi", 0x80000000},
- {"ls", 0x90000000},
- {"ge", 0xa0000000},
- {"lt", 0xb0000000},
- {"gt", 0xc0000000},
- {"le", 0xd0000000},
- {"al", 0xe0000000},
- {"nv", 0xf0000000}
+ const char *template;
+ unsigned long field;
};
-struct asm_psr
+struct asm_barrier_opt
{
const char *template;
- bfd_boolean cpsr;
- unsigned long field;
+ unsigned long value;
};
/* The bit that distinguishes CPSR and SPSR. */
#define SPSR_BIT (1 << 22)
-/* How many bits to shift the PSR_xxx bits up by. */
-#define PSR_SHIFT 16
-
-#define PSR_c (1 << 0)
-#define PSR_x (1 << 1)
-#define PSR_s (1 << 2)
-#define PSR_f (1 << 3)
-
-static const struct asm_psr psrs[] =
-{
- {"CPSR", TRUE, PSR_c | PSR_f},
- {"CPSR_all", TRUE, PSR_c | PSR_f},
- {"SPSR", FALSE, PSR_c | PSR_f},
- {"SPSR_all", FALSE, PSR_c | PSR_f},
- {"CPSR_flg", TRUE, PSR_f},
- {"CPSR_f", TRUE, PSR_f},
- {"SPSR_flg", FALSE, PSR_f},
- {"SPSR_f", FALSE, PSR_f},
- {"CPSR_c", TRUE, PSR_c},
- {"CPSR_ctl", TRUE, PSR_c},
- {"SPSR_c", FALSE, PSR_c},
- {"SPSR_ctl", FALSE, PSR_c},
- {"CPSR_x", TRUE, PSR_x},
- {"CPSR_s", TRUE, PSR_s},
- {"SPSR_x", FALSE, PSR_x},
- {"SPSR_s", FALSE, PSR_s},
- /* Combinations of flags. */
- {"CPSR_fs", TRUE, PSR_f | PSR_s},
- {"CPSR_fx", TRUE, PSR_f | PSR_x},
- {"CPSR_fc", TRUE, PSR_f | PSR_c},
- {"CPSR_sf", TRUE, PSR_s | PSR_f},
- {"CPSR_sx", TRUE, PSR_s | PSR_x},
- {"CPSR_sc", TRUE, PSR_s | PSR_c},
- {"CPSR_xf", TRUE, PSR_x | PSR_f},
- {"CPSR_xs", TRUE, PSR_x | PSR_s},
- {"CPSR_xc", TRUE, PSR_x | PSR_c},
- {"CPSR_cf", TRUE, PSR_c | PSR_f},
- {"CPSR_cs", TRUE, PSR_c | PSR_s},
- {"CPSR_cx", TRUE, PSR_c | PSR_x},
- {"CPSR_fsx", TRUE, PSR_f | PSR_s | PSR_x},
- {"CPSR_fsc", TRUE, PSR_f | PSR_s | PSR_c},
- {"CPSR_fxs", TRUE, PSR_f | PSR_x | PSR_s},
- {"CPSR_fxc", TRUE, PSR_f | PSR_x | PSR_c},
- {"CPSR_fcs", TRUE, PSR_f | PSR_c | PSR_s},
- {"CPSR_fcx", TRUE, PSR_f | PSR_c | PSR_x},
- {"CPSR_sfx", TRUE, PSR_s | PSR_f | PSR_x},
- {"CPSR_sfc", TRUE, PSR_s | PSR_f | PSR_c},
- {"CPSR_sxf", TRUE, PSR_s | PSR_x | PSR_f},
- {"CPSR_sxc", TRUE, PSR_s | PSR_x | PSR_c},
- {"CPSR_scf", TRUE, PSR_s | PSR_c | PSR_f},
- {"CPSR_scx", TRUE, PSR_s | PSR_c | PSR_x},
- {"CPSR_xfs", TRUE, PSR_x | PSR_f | PSR_s},
- {"CPSR_xfc", TRUE, PSR_x | PSR_f | PSR_c},
- {"CPSR_xsf", TRUE, PSR_x | PSR_s | PSR_f},
- {"CPSR_xsc", TRUE, PSR_x | PSR_s | PSR_c},
- {"CPSR_xcf", TRUE, PSR_x | PSR_c | PSR_f},
- {"CPSR_xcs", TRUE, PSR_x | PSR_c | PSR_s},
- {"CPSR_cfs", TRUE, PSR_c | PSR_f | PSR_s},
- {"CPSR_cfx", TRUE, PSR_c | PSR_f | PSR_x},
- {"CPSR_csf", TRUE, PSR_c | PSR_s | PSR_f},
- {"CPSR_csx", TRUE, PSR_c | PSR_s | PSR_x},
- {"CPSR_cxf", TRUE, PSR_c | PSR_x | PSR_f},
- {"CPSR_cxs", TRUE, PSR_c | PSR_x | PSR_s},
- {"CPSR_fsxc", TRUE, PSR_f | PSR_s | PSR_x | PSR_c},
- {"CPSR_fscx", TRUE, PSR_f | PSR_s | PSR_c | PSR_x},
- {"CPSR_fxsc", TRUE, PSR_f | PSR_x | PSR_s | PSR_c},
- {"CPSR_fxcs", TRUE, PSR_f | PSR_x | PSR_c | PSR_s},
- {"CPSR_fcsx", TRUE, PSR_f | PSR_c | PSR_s | PSR_x},
- {"CPSR_fcxs", TRUE, PSR_f | PSR_c | PSR_x | PSR_s},
- {"CPSR_sfxc", TRUE, PSR_s | PSR_f | PSR_x | PSR_c},
- {"CPSR_sfcx", TRUE, PSR_s | PSR_f | PSR_c | PSR_x},
- {"CPSR_sxfc", TRUE, PSR_s | PSR_x | PSR_f | PSR_c},
- {"CPSR_sxcf", TRUE, PSR_s | PSR_x | PSR_c | PSR_f},
- {"CPSR_scfx", TRUE, PSR_s | PSR_c | PSR_f | PSR_x},
- {"CPSR_scxf", TRUE, PSR_s | PSR_c | PSR_x | PSR_f},
- {"CPSR_xfsc", TRUE, PSR_x | PSR_f | PSR_s | PSR_c},
- {"CPSR_xfcs", TRUE, PSR_x | PSR_f | PSR_c | PSR_s},
- {"CPSR_xsfc", TRUE, PSR_x | PSR_s | PSR_f | PSR_c},
- {"CPSR_xscf", TRUE, PSR_x | PSR_s | PSR_c | PSR_f},
- {"CPSR_xcfs", TRUE, PSR_x | PSR_c | PSR_f | PSR_s},
- {"CPSR_xcsf", TRUE, PSR_x | PSR_c | PSR_s | PSR_f},
- {"CPSR_cfsx", TRUE, PSR_c | PSR_f | PSR_s | PSR_x},
- {"CPSR_cfxs", TRUE, PSR_c | PSR_f | PSR_x | PSR_s},
- {"CPSR_csfx", TRUE, PSR_c | PSR_s | PSR_f | PSR_x},
- {"CPSR_csxf", TRUE, PSR_c | PSR_s | PSR_x | PSR_f},
- {"CPSR_cxfs", TRUE, PSR_c | PSR_x | PSR_f | PSR_s},
- {"CPSR_cxsf", TRUE, PSR_c | PSR_x | PSR_s | PSR_f},
- {"SPSR_fs", FALSE, PSR_f | PSR_s},
- {"SPSR_fx", FALSE, PSR_f | PSR_x},
- {"SPSR_fc", FALSE, PSR_f | PSR_c},
- {"SPSR_sf", FALSE, PSR_s | PSR_f},
- {"SPSR_sx", FALSE, PSR_s | PSR_x},
- {"SPSR_sc", FALSE, PSR_s | PSR_c},
- {"SPSR_xf", FALSE, PSR_x | PSR_f},
- {"SPSR_xs", FALSE, PSR_x | PSR_s},
- {"SPSR_xc", FALSE, PSR_x | PSR_c},
- {"SPSR_cf", FALSE, PSR_c | PSR_f},
- {"SPSR_cs", FALSE, PSR_c | PSR_s},
- {"SPSR_cx", FALSE, PSR_c | PSR_x},
- {"SPSR_fsx", FALSE, PSR_f | PSR_s | PSR_x},
- {"SPSR_fsc", FALSE, PSR_f | PSR_s | PSR_c},
- {"SPSR_fxs", FALSE, PSR_f | PSR_x | PSR_s},
- {"SPSR_fxc", FALSE, PSR_f | PSR_x | PSR_c},
- {"SPSR_fcs", FALSE, PSR_f | PSR_c | PSR_s},
- {"SPSR_fcx", FALSE, PSR_f | PSR_c | PSR_x},
- {"SPSR_sfx", FALSE, PSR_s | PSR_f | PSR_x},
- {"SPSR_sfc", FALSE, PSR_s | PSR_f | PSR_c},
- {"SPSR_sxf", FALSE, PSR_s | PSR_x | PSR_f},
- {"SPSR_sxc", FALSE, PSR_s | PSR_x | PSR_c},
- {"SPSR_scf", FALSE, PSR_s | PSR_c | PSR_f},
- {"SPSR_scx", FALSE, PSR_s | PSR_c | PSR_x},
- {"SPSR_xfs", FALSE, PSR_x | PSR_f | PSR_s},
- {"SPSR_xfc", FALSE, PSR_x | PSR_f | PSR_c},
- {"SPSR_xsf", FALSE, PSR_x | PSR_s | PSR_f},
- {"SPSR_xsc", FALSE, PSR_x | PSR_s | PSR_c},
- {"SPSR_xcf", FALSE, PSR_x | PSR_c | PSR_f},
- {"SPSR_xcs", FALSE, PSR_x | PSR_c | PSR_s},
- {"SPSR_cfs", FALSE, PSR_c | PSR_f | PSR_s},
- {"SPSR_cfx", FALSE, PSR_c | PSR_f | PSR_x},
- {"SPSR_csf", FALSE, PSR_c | PSR_s | PSR_f},
- {"SPSR_csx", FALSE, PSR_c | PSR_s | PSR_x},
- {"SPSR_cxf", FALSE, PSR_c | PSR_x | PSR_f},
- {"SPSR_cxs", FALSE, PSR_c | PSR_x | PSR_s},
- {"SPSR_fsxc", FALSE, PSR_f | PSR_s | PSR_x | PSR_c},
- {"SPSR_fscx", FALSE, PSR_f | PSR_s | PSR_c | PSR_x},
- {"SPSR_fxsc", FALSE, PSR_f | PSR_x | PSR_s | PSR_c},
- {"SPSR_fxcs", FALSE, PSR_f | PSR_x | PSR_c | PSR_s},
- {"SPSR_fcsx", FALSE, PSR_f | PSR_c | PSR_s | PSR_x},
- {"SPSR_fcxs", FALSE, PSR_f | PSR_c | PSR_x | PSR_s},
- {"SPSR_sfxc", FALSE, PSR_s | PSR_f | PSR_x | PSR_c},
- {"SPSR_sfcx", FALSE, PSR_s | PSR_f | PSR_c | PSR_x},
- {"SPSR_sxfc", FALSE, PSR_s | PSR_x | PSR_f | PSR_c},
- {"SPSR_sxcf", FALSE, PSR_s | PSR_x | PSR_c | PSR_f},
- {"SPSR_scfx", FALSE, PSR_s | PSR_c | PSR_f | PSR_x},
- {"SPSR_scxf", FALSE, PSR_s | PSR_c | PSR_x | PSR_f},
- {"SPSR_xfsc", FALSE, PSR_x | PSR_f | PSR_s | PSR_c},
- {"SPSR_xfcs", FALSE, PSR_x | PSR_f | PSR_c | PSR_s},
- {"SPSR_xsfc", FALSE, PSR_x | PSR_s | PSR_f | PSR_c},
- {"SPSR_xscf", FALSE, PSR_x | PSR_s | PSR_c | PSR_f},
- {"SPSR_xcfs", FALSE, PSR_x | PSR_c | PSR_f | PSR_s},
- {"SPSR_xcsf", FALSE, PSR_x | PSR_c | PSR_s | PSR_f},
- {"SPSR_cfsx", FALSE, PSR_c | PSR_f | PSR_s | PSR_x},
- {"SPSR_cfxs", FALSE, PSR_c | PSR_f | PSR_x | PSR_s},
- {"SPSR_csfx", FALSE, PSR_c | PSR_s | PSR_f | PSR_x},
- {"SPSR_csxf", FALSE, PSR_c | PSR_s | PSR_x | PSR_f},
- {"SPSR_cxfs", FALSE, PSR_c | PSR_x | PSR_f | PSR_s},
- {"SPSR_cxsf", FALSE, PSR_c | PSR_x | PSR_s | PSR_f},
-};
-
-enum wreg_type
- {
- IWMMXT_REG_WR = 0,
- IWMMXT_REG_WC = 1,
- IWMMXT_REG_WR_OR_WC = 2,
- IWMMXT_REG_WCG
- };
-
-enum iwmmxt_insn_type
-{
- check_rd,
- check_wr,
- check_wrwr,
- check_wrwrwr,
- check_wrwrwcg,
- check_tbcst,
- check_tmovmsk,
- check_tmia,
- check_tmcrr,
- check_tmrrc,
- check_tmcr,
- check_tmrc,
- check_tinsr,
- check_textrc,
- check_waligni,
- check_textrm,
- check_wshufh
-};
+/* The individual PSR flag bits. */
+#define PSR_c (1 << 16)
+#define PSR_x (1 << 17)
+#define PSR_s (1 << 18)
+#define PSR_f (1 << 19)
-enum vfp_dp_reg_pos
+struct reloc_entry
{
- VFP_REG_Dd, VFP_REG_Dm, VFP_REG_Dn
+ char *name;
+ bfd_reloc_code_real_type reloc;
};
enum vfp_sp_reg_pos
@@ -581,1666 +365,101 @@ enum vfp_ldstm_type
VFP_LDSTMIA, VFP_LDSTMDB, VFP_LDSTMIAX, VFP_LDSTMDBX
};
-/* VFP system registers. */
-struct vfp_reg
-{
- const char *name;
- unsigned long regno;
-};
-
-static const struct vfp_reg vfp_regs[] =
+/* ARM register categories. This includes coprocessor numbers and various
+ architecture extensions' registers. */
+enum arm_reg_type
{
- {"fpsid", 0x00000000},
- {"FPSID", 0x00000000},
- {"fpscr", 0x00010000},
- {"FPSCR", 0x00010000},
- {"fpexc", 0x00080000},
- {"FPEXC", 0x00080000}
+ REG_TYPE_RN,
+ REG_TYPE_CP,
+ REG_TYPE_CN,
+ REG_TYPE_FN,
+ REG_TYPE_VFS,
+ REG_TYPE_VFD,
+ REG_TYPE_VFC,
+ REG_TYPE_MVF,
+ REG_TYPE_MVD,
+ REG_TYPE_MVFX,
+ REG_TYPE_MVDX,
+ REG_TYPE_MVAX,
+ REG_TYPE_DSPSC,
+ REG_TYPE_MMXWR,
+ REG_TYPE_MMXWC,
+ REG_TYPE_MMXWCG,
+ REG_TYPE_XSCALE,
};
/* Structure for a hash table entry for a register. */
struct reg_entry
{
- const char * name;
- int number;
- bfd_boolean builtin;
-};
-
-/* Some well known registers that we refer to directly elsewhere. */
-#define REG_SP 13
-#define REG_LR 14
-#define REG_PC 15
-
-#define wr_register(reg) ((reg ^ WR_PREFIX) >= 0 && (reg ^ WR_PREFIX) <= 15)
-#define wc_register(reg) ((reg ^ WC_PREFIX) >= 0 && (reg ^ WC_PREFIX) <= 15)
-#define wcg_register(reg) ((reg ^ WC_PREFIX) >= 8 && (reg ^ WC_PREFIX) <= 11)
-
-/* These are the standard names. Users can add aliases with .req.
- and delete them with .unreq. */
-
-/* Integer Register Numbers. */
-static const struct reg_entry rn_table[] =
-{
- {"r0", 0, TRUE}, {"r1", 1, TRUE}, {"r2", 2, TRUE}, {"r3", 3, TRUE},
- {"r4", 4, TRUE}, {"r5", 5, TRUE}, {"r6", 6, TRUE}, {"r7", 7, TRUE},
- {"r8", 8, TRUE}, {"r9", 9, TRUE}, {"r10", 10, TRUE}, {"r11", 11, TRUE},
- {"r12", 12, TRUE}, {"r13", REG_SP, TRUE}, {"r14", REG_LR, TRUE}, {"r15", REG_PC, TRUE},
- /* ATPCS Synonyms. */
- {"a1", 0, TRUE}, {"a2", 1, TRUE}, {"a3", 2, TRUE}, {"a4", 3, TRUE},
- {"v1", 4, TRUE}, {"v2", 5, TRUE}, {"v3", 6, TRUE}, {"v4", 7, TRUE},
- {"v5", 8, TRUE}, {"v6", 9, TRUE}, {"v7", 10, TRUE}, {"v8", 11, TRUE},
- /* Well-known aliases. */
- {"wr", 7, TRUE}, {"sb", 9, TRUE}, {"sl", 10, TRUE}, {"fp", 11, TRUE},
- {"ip", 12, TRUE}, {"sp", REG_SP, TRUE}, {"lr", REG_LR, TRUE}, {"pc", REG_PC, TRUE},
- {NULL, 0, TRUE}
-};
-
-#define WR_PREFIX 0x200
-#define WC_PREFIX 0x400
-
-static const struct reg_entry iwmmxt_table[] =
-{
- /* Intel Wireless MMX technology register names. */
- { "wr0", 0x0 | WR_PREFIX, TRUE}, {"wr1", 0x1 | WR_PREFIX, TRUE},
- { "wr2", 0x2 | WR_PREFIX, TRUE}, {"wr3", 0x3 | WR_PREFIX, TRUE},
- { "wr4", 0x4 | WR_PREFIX, TRUE}, {"wr5", 0x5 | WR_PREFIX, TRUE},
- { "wr6", 0x6 | WR_PREFIX, TRUE}, {"wr7", 0x7 | WR_PREFIX, TRUE},
- { "wr8", 0x8 | WR_PREFIX, TRUE}, {"wr9", 0x9 | WR_PREFIX, TRUE},
- { "wr10", 0xa | WR_PREFIX, TRUE}, {"wr11", 0xb | WR_PREFIX, TRUE},
- { "wr12", 0xc | WR_PREFIX, TRUE}, {"wr13", 0xd | WR_PREFIX, TRUE},
- { "wr14", 0xe | WR_PREFIX, TRUE}, {"wr15", 0xf | WR_PREFIX, TRUE},
- { "wcid", 0x0 | WC_PREFIX, TRUE}, {"wcon", 0x1 | WC_PREFIX, TRUE},
- {"wcssf", 0x2 | WC_PREFIX, TRUE}, {"wcasf", 0x3 | WC_PREFIX, TRUE},
- {"wcgr0", 0x8 | WC_PREFIX, TRUE}, {"wcgr1", 0x9 | WC_PREFIX, TRUE},
- {"wcgr2", 0xa | WC_PREFIX, TRUE}, {"wcgr3", 0xb | WC_PREFIX, TRUE},
-
- { "wR0", 0x0 | WR_PREFIX, TRUE}, {"wR1", 0x1 | WR_PREFIX, TRUE},
- { "wR2", 0x2 | WR_PREFIX, TRUE}, {"wR3", 0x3 | WR_PREFIX, TRUE},
- { "wR4", 0x4 | WR_PREFIX, TRUE}, {"wR5", 0x5 | WR_PREFIX, TRUE},
- { "wR6", 0x6 | WR_PREFIX, TRUE}, {"wR7", 0x7 | WR_PREFIX, TRUE},
- { "wR8", 0x8 | WR_PREFIX, TRUE}, {"wR9", 0x9 | WR_PREFIX, TRUE},
- { "wR10", 0xa | WR_PREFIX, TRUE}, {"wR11", 0xb | WR_PREFIX, TRUE},
- { "wR12", 0xc | WR_PREFIX, TRUE}, {"wR13", 0xd | WR_PREFIX, TRUE},
- { "wR14", 0xe | WR_PREFIX, TRUE}, {"wR15", 0xf | WR_PREFIX, TRUE},
- { "wCID", 0x0 | WC_PREFIX, TRUE}, {"wCon", 0x1 | WC_PREFIX, TRUE},
- {"wCSSF", 0x2 | WC_PREFIX, TRUE}, {"wCASF", 0x3 | WC_PREFIX, TRUE},
- {"wCGR0", 0x8 | WC_PREFIX, TRUE}, {"wCGR1", 0x9 | WC_PREFIX, TRUE},
- {"wCGR2", 0xa | WC_PREFIX, TRUE}, {"wCGR3", 0xb | WC_PREFIX, TRUE},
- {NULL, 0, TRUE}
+ const char *name;
+ unsigned char number;
+ unsigned char type;
+ unsigned char builtin;
};
-/* Co-processor Numbers. */
-static const struct reg_entry cp_table[] =
-{
- {"p0", 0, TRUE}, {"p1", 1, TRUE}, {"p2", 2, TRUE}, {"p3", 3, TRUE},
- {"p4", 4, TRUE}, {"p5", 5, TRUE}, {"p6", 6, TRUE}, {"p7", 7, TRUE},
- {"p8", 8, TRUE}, {"p9", 9, TRUE}, {"p10", 10, TRUE}, {"p11", 11, TRUE},
- {"p12", 12, TRUE}, {"p13", 13, TRUE}, {"p14", 14, TRUE}, {"p15", 15, TRUE},
- {NULL, 0, TRUE}
-};
-
-/* Co-processor Register Numbers. */
-static const struct reg_entry cn_table[] =
-{
- {"c0", 0, TRUE}, {"c1", 1, TRUE}, {"c2", 2, TRUE}, {"c3", 3, TRUE},
- {"c4", 4, TRUE}, {"c5", 5, TRUE}, {"c6", 6, TRUE}, {"c7", 7, TRUE},
- {"c8", 8, TRUE}, {"c9", 9, TRUE}, {"c10", 10, TRUE}, {"c11", 11, TRUE},
- {"c12", 12, TRUE}, {"c13", 13, TRUE}, {"c14", 14, TRUE}, {"c15", 15, TRUE},
- /* Not really valid, but kept for back-wards compatibility. */
- {"cr0", 0, TRUE}, {"cr1", 1, TRUE}, {"cr2", 2, TRUE}, {"cr3", 3, TRUE},
- {"cr4", 4, TRUE}, {"cr5", 5, TRUE}, {"cr6", 6, TRUE}, {"cr7", 7, TRUE},
- {"cr8", 8, TRUE}, {"cr9", 9, TRUE}, {"cr10", 10, TRUE}, {"cr11", 11, TRUE},
- {"cr12", 12, TRUE}, {"cr13", 13, TRUE}, {"cr14", 14, TRUE}, {"cr15", 15, TRUE},
- {NULL, 0, TRUE}
-};
-
-/* FPA Registers. */
-static const struct reg_entry fn_table[] =
-{
- {"f0", 0, TRUE}, {"f1", 1, TRUE}, {"f2", 2, TRUE}, {"f3", 3, TRUE},
- {"f4", 4, TRUE}, {"f5", 5, TRUE}, {"f6", 6, TRUE}, {"f7", 7, TRUE},
- {NULL, 0, TRUE}
-};
-
-/* VFP SP Registers. */
-static const struct reg_entry sn_table[] =
-{
- {"s0", 0, TRUE}, {"s1", 1, TRUE}, {"s2", 2, TRUE}, {"s3", 3, TRUE},
- {"s4", 4, TRUE}, {"s5", 5, TRUE}, {"s6", 6, TRUE}, {"s7", 7, TRUE},
- {"s8", 8, TRUE}, {"s9", 9, TRUE}, {"s10", 10, TRUE}, {"s11", 11, TRUE},
- {"s12", 12, TRUE}, {"s13", 13, TRUE}, {"s14", 14, TRUE}, {"s15", 15, TRUE},
- {"s16", 16, TRUE}, {"s17", 17, TRUE}, {"s18", 18, TRUE}, {"s19", 19, TRUE},
- {"s20", 20, TRUE}, {"s21", 21, TRUE}, {"s22", 22, TRUE}, {"s23", 23, TRUE},
- {"s24", 24, TRUE}, {"s25", 25, TRUE}, {"s26", 26, TRUE}, {"s27", 27, TRUE},
- {"s28", 28, TRUE}, {"s29", 29, TRUE}, {"s30", 30, TRUE}, {"s31", 31, TRUE},
- {NULL, 0, TRUE}
-};
-
-/* VFP DP Registers. */
-static const struct reg_entry dn_table[] =
-{
- {"d0", 0, TRUE}, {"d1", 1, TRUE}, {"d2", 2, TRUE}, {"d3", 3, TRUE},
- {"d4", 4, TRUE}, {"d5", 5, TRUE}, {"d6", 6, TRUE}, {"d7", 7, TRUE},
- {"d8", 8, TRUE}, {"d9", 9, TRUE}, {"d10", 10, TRUE}, {"d11", 11, TRUE},
- {"d12", 12, TRUE}, {"d13", 13, TRUE}, {"d14", 14, TRUE}, {"d15", 15, TRUE},
- {NULL, 0, TRUE}
-};
-
-/* Maverick DSP coprocessor registers. */
-static const struct reg_entry mav_mvf_table[] =
-{
- {"mvf0", 0, TRUE}, {"mvf1", 1, TRUE}, {"mvf2", 2, TRUE}, {"mvf3", 3, TRUE},
- {"mvf4", 4, TRUE}, {"mvf5", 5, TRUE}, {"mvf6", 6, TRUE}, {"mvf7", 7, TRUE},
- {"mvf8", 8, TRUE}, {"mvf9", 9, TRUE}, {"mvf10", 10, TRUE}, {"mvf11", 11, TRUE},
- {"mvf12", 12, TRUE}, {"mvf13", 13, TRUE}, {"mvf14", 14, TRUE}, {"mvf15", 15, TRUE},
- {NULL, 0, TRUE}
+/* Diagnostics used when we don't get a register of the expected type. */
+const char *const reg_expected_msgs[] =
+{
+ N_("ARM register expected"),
+ N_("bad or missing co-processor number"),
+ N_("co-processor register expected"),
+ N_("FPA register expected"),
+ N_("VFP single precision register expected"),
+ N_("VFP double precision register expected"),
+ N_("VFP system register expected"),
+ N_("Maverick MVF register expected"),
+ N_("Maverick MVD register expected"),
+ N_("Maverick MVFX register expected"),
+ N_("Maverick MVDX register expected"),
+ N_("Maverick MVAX register expected"),
+ N_("Maverick DSPSC register expected"),
+ N_("iWMMXt data register expected"),
+ N_("iWMMXt control register expected"),
+ N_("iWMMXt scalar register expected"),
+ N_("XScale accumulator register expected"),
};
-static const struct reg_entry mav_mvd_table[] =
-{
- {"mvd0", 0, TRUE}, {"mvd1", 1, TRUE}, {"mvd2", 2, TRUE}, {"mvd3", 3, TRUE},
- {"mvd4", 4, TRUE}, {"mvd5", 5, TRUE}, {"mvd6", 6, TRUE}, {"mvd7", 7, TRUE},
- {"mvd8", 8, TRUE}, {"mvd9", 9, TRUE}, {"mvd10", 10, TRUE}, {"mvd11", 11, TRUE},
- {"mvd12", 12, TRUE}, {"mvd13", 13, TRUE}, {"mvd14", 14, TRUE}, {"mvd15", 15, TRUE},
- {NULL, 0, TRUE}
-};
-
-static const struct reg_entry mav_mvfx_table[] =
-{
- {"mvfx0", 0, TRUE}, {"mvfx1", 1, TRUE}, {"mvfx2", 2, TRUE}, {"mvfx3", 3, TRUE},
- {"mvfx4", 4, TRUE}, {"mvfx5", 5, TRUE}, {"mvfx6", 6, TRUE}, {"mvfx7", 7, TRUE},
- {"mvfx8", 8, TRUE}, {"mvfx9", 9, TRUE}, {"mvfx10", 10, TRUE}, {"mvfx11", 11, TRUE},
- {"mvfx12", 12, TRUE}, {"mvfx13", 13, TRUE}, {"mvfx14", 14, TRUE}, {"mvfx15", 15, TRUE},
- {NULL, 0, TRUE}
-};
-
-static const struct reg_entry mav_mvdx_table[] =
-{
- {"mvdx0", 0, TRUE}, {"mvdx1", 1, TRUE}, {"mvdx2", 2, TRUE}, {"mvdx3", 3, TRUE},
- {"mvdx4", 4, TRUE}, {"mvdx5", 5, TRUE}, {"mvdx6", 6, TRUE}, {"mvdx7", 7, TRUE},
- {"mvdx8", 8, TRUE}, {"mvdx9", 9, TRUE}, {"mvdx10", 10, TRUE}, {"mvdx11", 11, TRUE},
- {"mvdx12", 12, TRUE}, {"mvdx13", 13, TRUE}, {"mvdx14", 14, TRUE}, {"mvdx15", 15, TRUE},
- {NULL, 0, TRUE}
-};
-
-static const struct reg_entry mav_mvax_table[] =
-{
- {"mvax0", 0, TRUE}, {"mvax1", 1, TRUE}, {"mvax2", 2, TRUE}, {"mvax3", 3, TRUE},
- {NULL, 0, TRUE}
-};
-
-static const struct reg_entry mav_dspsc_table[] =
-{
- {"dspsc", 0, TRUE},
- {NULL, 0, TRUE}
-};
-
-struct reg_map
-{
- const struct reg_entry *names;
- int max_regno;
- struct hash_control *htab;
- const char *expected;
-};
-
-struct reg_map all_reg_maps[] =
-{
- {rn_table, 15, NULL, N_("ARM register expected")},
- {cp_table, 15, NULL, N_("bad or missing co-processor number")},
- {cn_table, 15, NULL, N_("co-processor register expected")},
- {fn_table, 7, NULL, N_("FPA register expected")},
- {sn_table, 31, NULL, N_("VFP single precision register expected")},
- {dn_table, 15, NULL, N_("VFP double precision register expected")},
- {mav_mvf_table, 15, NULL, N_("Maverick MVF register expected")},
- {mav_mvd_table, 15, NULL, N_("Maverick MVD register expected")},
- {mav_mvfx_table, 15, NULL, N_("Maverick MVFX register expected")},
- {mav_mvdx_table, 15, NULL, N_("Maverick MVDX register expected")},
- {mav_mvax_table, 3, NULL, N_("Maverick MVAX register expected")},
- {mav_dspsc_table, 0, NULL, N_("Maverick DSPSC register expected")},
- {iwmmxt_table, 23, NULL, N_("Intel Wireless MMX technology register expected")},
-};
-
-/* Enumeration matching entries in table above. */
-enum arm_reg_type
-{
- REG_TYPE_RN = 0,
-#define REG_TYPE_FIRST REG_TYPE_RN
- REG_TYPE_CP = 1,
- REG_TYPE_CN = 2,
- REG_TYPE_FN = 3,
- REG_TYPE_SN = 4,
- REG_TYPE_DN = 5,
- REG_TYPE_MVF = 6,
- REG_TYPE_MVD = 7,
- REG_TYPE_MVFX = 8,
- REG_TYPE_MVDX = 9,
- REG_TYPE_MVAX = 10,
- REG_TYPE_DSPSC = 11,
- REG_TYPE_IWMMXT = 12,
-
- REG_TYPE_MAX = 13
-};
-
-/* Functions called by parser. */
-/* ARM instructions. */
-static void do_arit PARAMS ((char *));
-static void do_cmp PARAMS ((char *));
-static void do_mov PARAMS ((char *));
-static void do_ldst PARAMS ((char *));
-static void do_ldstt PARAMS ((char *));
-static void do_ldmstm PARAMS ((char *));
-static void do_branch PARAMS ((char *));
-static void do_swi PARAMS ((char *));
-
-/* Pseudo Op codes. */
-static void do_adr PARAMS ((char *));
-static void do_adrl PARAMS ((char *));
-static void do_empty PARAMS ((char *));
-
-/* ARM v2. */
-static void do_mul PARAMS ((char *));
-static void do_mla PARAMS ((char *));
-
-/* ARM v2S. */
-static void do_swap PARAMS ((char *));
-
-/* ARM v3. */
-static void do_msr PARAMS ((char *));
-static void do_mrs PARAMS ((char *));
-
-/* ARM v3M. */
-static void do_mull PARAMS ((char *));
-
-/* ARM v4. */
-static void do_ldstv4 PARAMS ((char *));
-
-/* ARM v4T. */
-static void do_bx PARAMS ((char *));
-
-/* ARM v5T. */
-static void do_blx PARAMS ((char *));
-static void do_bkpt PARAMS ((char *));
-static void do_clz PARAMS ((char *));
-static void do_lstc2 PARAMS ((char *));
-static void do_cdp2 PARAMS ((char *));
-static void do_co_reg2 PARAMS ((char *));
-
-/* ARM v5TExP. */
-static void do_smla PARAMS ((char *));
-static void do_smlal PARAMS ((char *));
-static void do_smul PARAMS ((char *));
-static void do_qadd PARAMS ((char *));
-
-/* ARM v5TE. */
-static void do_pld PARAMS ((char *));
-static void do_ldrd PARAMS ((char *));
-static void do_co_reg2c PARAMS ((char *));
-
-/* ARM v5TEJ. */
-static void do_bxj PARAMS ((char *));
-
-/* ARM V6. */
-static void do_cps PARAMS ((char *));
-static void do_cpsi PARAMS ((char *));
-static void do_ldrex PARAMS ((char *));
-static void do_pkhbt PARAMS ((char *));
-static void do_pkhtb PARAMS ((char *));
-static void do_qadd16 PARAMS ((char *));
-static void do_rev PARAMS ((char *));
-static void do_rfe PARAMS ((char *));
-static void do_sxtah PARAMS ((char *));
-static void do_sxth PARAMS ((char *));
-static void do_setend PARAMS ((char *));
-static void do_smlad PARAMS ((char *));
-static void do_smlald PARAMS ((char *));
-static void do_smmul PARAMS ((char *));
-static void do_ssat PARAMS ((char *));
-static void do_usat PARAMS ((char *));
-static void do_srs PARAMS ((char *));
-static void do_ssat16 PARAMS ((char *));
-static void do_usat16 PARAMS ((char *));
-static void do_strex PARAMS ((char *));
-static void do_umaal PARAMS ((char *));
-
-static void do_cps_mode PARAMS ((char **));
-static void do_cps_flags PARAMS ((char **, int));
-static int do_endian_specifier PARAMS ((char *));
-static void do_pkh_core PARAMS ((char *, int));
-static void do_sat PARAMS ((char **, int));
-static void do_sat16 PARAMS ((char **, int));
-
-/* Coprocessor Instructions. */
-static void do_cdp PARAMS ((char *));
-static void do_lstc PARAMS ((char *));
-static void do_co_reg PARAMS ((char *));
-
-/* FPA instructions. */
-static void do_fpa_ctrl PARAMS ((char *));
-static void do_fpa_ldst PARAMS ((char *));
-static void do_fpa_ldmstm PARAMS ((char *));
-static void do_fpa_dyadic PARAMS ((char *));
-static void do_fpa_monadic PARAMS ((char *));
-static void do_fpa_cmp PARAMS ((char *));
-static void do_fpa_from_reg PARAMS ((char *));
-static void do_fpa_to_reg PARAMS ((char *));
-
-/* VFP instructions. */
-static void do_vfp_sp_monadic PARAMS ((char *));
-static void do_vfp_dp_monadic PARAMS ((char *));
-static void do_vfp_sp_dyadic PARAMS ((char *));
-static void do_vfp_dp_dyadic PARAMS ((char *));
-static void do_vfp_reg_from_sp PARAMS ((char *));
-static void do_vfp_sp_from_reg PARAMS ((char *));
-static void do_vfp_reg2_from_sp2 PARAMS ((char *));
-static void do_vfp_sp2_from_reg2 PARAMS ((char *));
-static void do_vfp_reg_from_dp PARAMS ((char *));
-static void do_vfp_reg2_from_dp PARAMS ((char *));
-static void do_vfp_dp_from_reg PARAMS ((char *));
-static void do_vfp_dp_from_reg2 PARAMS ((char *));
-static void do_vfp_reg_from_ctrl PARAMS ((char *));
-static void do_vfp_ctrl_from_reg PARAMS ((char *));
-static void do_vfp_sp_ldst PARAMS ((char *));
-static void do_vfp_dp_ldst PARAMS ((char *));
-static void do_vfp_sp_ldstmia PARAMS ((char *));
-static void do_vfp_sp_ldstmdb PARAMS ((char *));
-static void do_vfp_dp_ldstmia PARAMS ((char *));
-static void do_vfp_dp_ldstmdb PARAMS ((char *));
-static void do_vfp_xp_ldstmia PARAMS ((char *));
-static void do_vfp_xp_ldstmdb PARAMS ((char *));
-static void do_vfp_sp_compare_z PARAMS ((char *));
-static void do_vfp_dp_compare_z PARAMS ((char *));
-static void do_vfp_dp_sp_cvt PARAMS ((char *));
-static void do_vfp_sp_dp_cvt PARAMS ((char *));
-
-/* XScale. */
-static void do_xsc_mia PARAMS ((char *));
-static void do_xsc_mar PARAMS ((char *));
-static void do_xsc_mra PARAMS ((char *));
-
-/* Maverick. */
-static void do_mav_binops PARAMS ((char *, int, enum arm_reg_type,
- enum arm_reg_type));
-static void do_mav_binops_1a PARAMS ((char *));
-static void do_mav_binops_1b PARAMS ((char *));
-static void do_mav_binops_1c PARAMS ((char *));
-static void do_mav_binops_1d PARAMS ((char *));
-static void do_mav_binops_1e PARAMS ((char *));
-static void do_mav_binops_1f PARAMS ((char *));
-static void do_mav_binops_1g PARAMS ((char *));
-static void do_mav_binops_1h PARAMS ((char *));
-static void do_mav_binops_1i PARAMS ((char *));
-static void do_mav_binops_1j PARAMS ((char *));
-static void do_mav_binops_1k PARAMS ((char *));
-static void do_mav_binops_1l PARAMS ((char *));
-static void do_mav_binops_1m PARAMS ((char *));
-static void do_mav_binops_1n PARAMS ((char *));
-static void do_mav_binops_1o PARAMS ((char *));
-static void do_mav_binops_2a PARAMS ((char *));
-static void do_mav_binops_2b PARAMS ((char *));
-static void do_mav_binops_2c PARAMS ((char *));
-static void do_mav_binops_3a PARAMS ((char *));
-static void do_mav_binops_3b PARAMS ((char *));
-static void do_mav_binops_3c PARAMS ((char *));
-static void do_mav_binops_3d PARAMS ((char *));
-static void do_mav_triple PARAMS ((char *, int, enum arm_reg_type,
- enum arm_reg_type,
- enum arm_reg_type));
-static void do_mav_triple_4a PARAMS ((char *));
-static void do_mav_triple_4b PARAMS ((char *));
-static void do_mav_triple_5a PARAMS ((char *));
-static void do_mav_triple_5b PARAMS ((char *));
-static void do_mav_triple_5c PARAMS ((char *));
-static void do_mav_triple_5d PARAMS ((char *));
-static void do_mav_triple_5e PARAMS ((char *));
-static void do_mav_triple_5f PARAMS ((char *));
-static void do_mav_triple_5g PARAMS ((char *));
-static void do_mav_triple_5h PARAMS ((char *));
-static void do_mav_quad PARAMS ((char *, int, enum arm_reg_type,
- enum arm_reg_type,
- enum arm_reg_type,
- enum arm_reg_type));
-static void do_mav_quad_6a PARAMS ((char *));
-static void do_mav_quad_6b PARAMS ((char *));
-static void do_mav_dspsc_1 PARAMS ((char *));
-static void do_mav_dspsc_2 PARAMS ((char *));
-static void do_mav_shift PARAMS ((char *, enum arm_reg_type,
- enum arm_reg_type));
-static void do_mav_shift_1 PARAMS ((char *));
-static void do_mav_shift_2 PARAMS ((char *));
-static void do_mav_ldst PARAMS ((char *, enum arm_reg_type));
-static void do_mav_ldst_1 PARAMS ((char *));
-static void do_mav_ldst_2 PARAMS ((char *));
-static void do_mav_ldst_3 PARAMS ((char *));
-static void do_mav_ldst_4 PARAMS ((char *));
-
-static int mav_reg_required_here PARAMS ((char **, int,
- enum arm_reg_type));
-static int mav_parse_offset PARAMS ((char **, int *));
-
-static void fix_new_arm PARAMS ((fragS *, int, short, expressionS *,
- int, int));
-static int arm_reg_parse PARAMS ((char **, struct hash_control *));
-static enum arm_reg_type arm_reg_parse_any PARAMS ((char *));
-static const struct asm_psr * arm_psr_parse PARAMS ((char **));
-static void symbol_locate PARAMS ((symbolS *, const char *, segT, valueT,
- fragS *));
-static int add_to_lit_pool PARAMS ((void));
-static unsigned validate_immediate PARAMS ((unsigned));
-static unsigned validate_immediate_twopart PARAMS ((unsigned int,
- unsigned int *));
-static int validate_offset_imm PARAMS ((unsigned int, int));
-static void opcode_select PARAMS ((int));
-static void end_of_line PARAMS ((char *));
-static int reg_required_here PARAMS ((char **, int));
-static int psr_required_here PARAMS ((char **));
-static int co_proc_number PARAMS ((char **));
-static int cp_opc_expr PARAMS ((char **, int, int));
-static int cp_reg_required_here PARAMS ((char **, int));
-static int fp_reg_required_here PARAMS ((char **, int));
-static int vfp_sp_reg_required_here PARAMS ((char **, enum vfp_sp_reg_pos));
-static int vfp_dp_reg_required_here PARAMS ((char **, enum vfp_dp_reg_pos));
-static void vfp_sp_ldstm PARAMS ((char *, enum vfp_ldstm_type));
-static void vfp_dp_ldstm PARAMS ((char *, enum vfp_ldstm_type));
-static long vfp_sp_reg_list PARAMS ((char **, enum vfp_sp_reg_pos));
-static long vfp_dp_reg_list PARAMS ((char **));
-static int vfp_psr_required_here PARAMS ((char **str));
-static const struct vfp_reg *vfp_psr_parse PARAMS ((char **str));
-static int cp_address_offset PARAMS ((char **));
-static int cp_address_required_here PARAMS ((char **, int));
-static int my_get_float_expression PARAMS ((char **));
-static int skip_past_comma PARAMS ((char **));
-static int walk_no_bignums PARAMS ((symbolS *));
-static int negate_data_op PARAMS ((unsigned long *, unsigned long));
-static int data_op2 PARAMS ((char **));
-static int fp_op2 PARAMS ((char **));
-static long reg_list PARAMS ((char **));
-static void thumb_load_store PARAMS ((char *, int, int));
-static int decode_shift PARAMS ((char **, int));
-static int ldst_extend PARAMS ((char **));
-static int ldst_extend_v4 PARAMS ((char **));
-static void thumb_add_sub PARAMS ((char *, int));
-static void insert_reg PARAMS ((const struct reg_entry *,
- struct hash_control *));
-static void thumb_shift PARAMS ((char *, int));
-static void thumb_mov_compare PARAMS ((char *, int));
-static void build_arm_ops_hsh PARAMS ((void));
-static void set_constant_flonums PARAMS ((void));
-static valueT md_chars_to_number PARAMS ((char *, int));
-static void build_reg_hsh PARAMS ((struct reg_map *));
-static void insert_reg_alias PARAMS ((char *, int, struct hash_control *));
-static int create_register_alias PARAMS ((char *, char *));
-static void output_inst PARAMS ((const char *));
-static int accum0_required_here PARAMS ((char **));
-static int ld_mode_required_here PARAMS ((char **));
-static void do_branch25 PARAMS ((char *));
-static symbolS * find_real_start PARAMS ((symbolS *));
-#ifdef OBJ_ELF
-static bfd_reloc_code_real_type arm_parse_reloc PARAMS ((void));
-#endif
-
-static int wreg_required_here PARAMS ((char **, int, enum wreg_type));
-static void do_iwmmxt_byte_addr PARAMS ((char *));
-static void do_iwmmxt_tandc PARAMS ((char *));
-static void do_iwmmxt_tbcst PARAMS ((char *));
-static void do_iwmmxt_textrc PARAMS ((char *));
-static void do_iwmmxt_textrm PARAMS ((char *));
-static void do_iwmmxt_tinsr PARAMS ((char *));
-static void do_iwmmxt_tmcr PARAMS ((char *));
-static void do_iwmmxt_tmcrr PARAMS ((char *));
-static void do_iwmmxt_tmia PARAMS ((char *));
-static void do_iwmmxt_tmovmsk PARAMS ((char *));
-static void do_iwmmxt_tmrc PARAMS ((char *));
-static void do_iwmmxt_tmrrc PARAMS ((char *));
-static void do_iwmmxt_torc PARAMS ((char *));
-static void do_iwmmxt_waligni PARAMS ((char *));
-static void do_iwmmxt_wmov PARAMS ((char *));
-static void do_iwmmxt_word_addr PARAMS ((char *));
-static void do_iwmmxt_wrwr PARAMS ((char *));
-static void do_iwmmxt_wrwrwcg PARAMS ((char *));
-static void do_iwmmxt_wrwrwr PARAMS ((char *));
-static void do_iwmmxt_wshufh PARAMS ((char *));
-static void do_iwmmxt_wzero PARAMS ((char *));
-static int cp_byte_address_offset PARAMS ((char **));
-static int cp_byte_address_required_here PARAMS ((char **));
+/* Some well known registers that we refer to directly elsewhere. */
+#define REG_SP 13
+#define REG_LR 14
+#define REG_PC 15
/* ARM instructions take 4bytes in the object file, Thumb instructions
take 2: */
-#define INSN_SIZE 4
-
-/* "INSN<cond> X,Y" where X:bit12, Y:bit16. */
-#define MAV_MODE1 0x100c
-
-/* "INSN<cond> X,Y" where X:bit16, Y:bit12. */
-#define MAV_MODE2 0x0c10
-
-/* "INSN<cond> X,Y" where X:bit12, Y:bit16. */
-#define MAV_MODE3 0x100c
-
-/* "INSN<cond> X,Y,Z" where X:16, Y:0, Z:12. */
-#define MAV_MODE4 0x0c0010
-
-/* "INSN<cond> X,Y,Z" where X:12, Y:16, Z:0. */
-#define MAV_MODE5 0x00100c
-
-/* "INSN<cond> W,X,Y,Z" where W:5, X:12, Y:16, Z:0. */
-#define MAV_MODE6 0x00100c05
+#define INSN_SIZE 4
struct asm_opcode
{
/* Basic string to match. */
- const char * template;
-
- /* Basic instruction code. */
- unsigned long value;
-
- /* Offset into the template where the condition code (if any) will be.
- If zero, then the instruction is never conditional. */
- unsigned cond_offset;
-
- /* Which architecture variant provides this instruction. */
- unsigned long variant;
-
- /* Function to call to parse args. */
- void (* parms) PARAMS ((char *));
-};
-
-static const struct asm_opcode insns[] =
-{
- /* Core ARM Instructions. */
- {"and", 0xe0000000, 3, ARM_EXT_V1, do_arit},
- {"ands", 0xe0100000, 3, ARM_EXT_V1, do_arit},
- {"eor", 0xe0200000, 3, ARM_EXT_V1, do_arit},
- {"eors", 0xe0300000, 3, ARM_EXT_V1, do_arit},
- {"sub", 0xe0400000, 3, ARM_EXT_V1, do_arit},
- {"subs", 0xe0500000, 3, ARM_EXT_V1, do_arit},
- {"rsb", 0xe0600000, 3, ARM_EXT_V1, do_arit},
- {"rsbs", 0xe0700000, 3, ARM_EXT_V1, do_arit},
- {"add", 0xe0800000, 3, ARM_EXT_V1, do_arit},
- {"adds", 0xe0900000, 3, ARM_EXT_V1, do_arit},
- {"adc", 0xe0a00000, 3, ARM_EXT_V1, do_arit},
- {"adcs", 0xe0b00000, 3, ARM_EXT_V1, do_arit},
- {"sbc", 0xe0c00000, 3, ARM_EXT_V1, do_arit},
- {"sbcs", 0xe0d00000, 3, ARM_EXT_V1, do_arit},
- {"rsc", 0xe0e00000, 3, ARM_EXT_V1, do_arit},
- {"rscs", 0xe0f00000, 3, ARM_EXT_V1, do_arit},
- {"orr", 0xe1800000, 3, ARM_EXT_V1, do_arit},
- {"orrs", 0xe1900000, 3, ARM_EXT_V1, do_arit},
- {"bic", 0xe1c00000, 3, ARM_EXT_V1, do_arit},
- {"bics", 0xe1d00000, 3, ARM_EXT_V1, do_arit},
-
- {"tst", 0xe1100000, 3, ARM_EXT_V1, do_cmp},
- {"tsts", 0xe1100000, 3, ARM_EXT_V1, do_cmp},
- {"tstp", 0xe110f000, 3, ARM_EXT_V1, do_cmp},
- {"teq", 0xe1300000, 3, ARM_EXT_V1, do_cmp},
- {"teqs", 0xe1300000, 3, ARM_EXT_V1, do_cmp},
- {"teqp", 0xe130f000, 3, ARM_EXT_V1, do_cmp},
- {"cmp", 0xe1500000, 3, ARM_EXT_V1, do_cmp},
- {"cmps", 0xe1500000, 3, ARM_EXT_V1, do_cmp},
- {"cmpp", 0xe150f000, 3, ARM_EXT_V1, do_cmp},
- {"cmn", 0xe1700000, 3, ARM_EXT_V1, do_cmp},
- {"cmns", 0xe1700000, 3, ARM_EXT_V1, do_cmp},
- {"cmnp", 0xe170f000, 3, ARM_EXT_V1, do_cmp},
-
- {"mov", 0xe1a00000, 3, ARM_EXT_V1, do_mov},
- {"movs", 0xe1b00000, 3, ARM_EXT_V1, do_mov},
- {"mvn", 0xe1e00000, 3, ARM_EXT_V1, do_mov},
- {"mvns", 0xe1f00000, 3, ARM_EXT_V1, do_mov},
-
- {"ldr", 0xe4100000, 3, ARM_EXT_V1, do_ldst},
- {"ldrb", 0xe4500000, 3, ARM_EXT_V1, do_ldst},
- {"ldrt", 0xe4300000, 3, ARM_EXT_V1, do_ldstt},
- {"ldrbt", 0xe4700000, 3, ARM_EXT_V1, do_ldstt},
- {"str", 0xe4000000, 3, ARM_EXT_V1, do_ldst},
- {"strb", 0xe4400000, 3, ARM_EXT_V1, do_ldst},
- {"strt", 0xe4200000, 3, ARM_EXT_V1, do_ldstt},
- {"strbt", 0xe4600000, 3, ARM_EXT_V1, do_ldstt},
-
- {"stmia", 0xe8800000, 3, ARM_EXT_V1, do_ldmstm},
- {"stmib", 0xe9800000, 3, ARM_EXT_V1, do_ldmstm},
- {"stmda", 0xe8000000, 3, ARM_EXT_V1, do_ldmstm},
- {"stmdb", 0xe9000000, 3, ARM_EXT_V1, do_ldmstm},
- {"stmfd", 0xe9000000, 3, ARM_EXT_V1, do_ldmstm},
- {"stmfa", 0xe9800000, 3, ARM_EXT_V1, do_ldmstm},
- {"stmea", 0xe8800000, 3, ARM_EXT_V1, do_ldmstm},
- {"stmed", 0xe8000000, 3, ARM_EXT_V1, do_ldmstm},
-
- {"ldmia", 0xe8900000, 3, ARM_EXT_V1, do_ldmstm},
- {"ldmib", 0xe9900000, 3, ARM_EXT_V1, do_ldmstm},
- {"ldmda", 0xe8100000, 3, ARM_EXT_V1, do_ldmstm},
- {"ldmdb", 0xe9100000, 3, ARM_EXT_V1, do_ldmstm},
- {"ldmfd", 0xe8900000, 3, ARM_EXT_V1, do_ldmstm},
- {"ldmfa", 0xe8100000, 3, ARM_EXT_V1, do_ldmstm},
- {"ldmea", 0xe9100000, 3, ARM_EXT_V1, do_ldmstm},
- {"ldmed", 0xe9900000, 3, ARM_EXT_V1, do_ldmstm},
-
- {"swi", 0xef000000, 3, ARM_EXT_V1, do_swi},
-#ifdef TE_WINCE
- /* XXX This is the wrong place to do this. Think multi-arch. */
- {"bl", 0xeb000000, 2, ARM_EXT_V1, do_branch},
- {"b", 0xea000000, 1, ARM_EXT_V1, do_branch},
-#else
- {"bl", 0xebfffffe, 2, ARM_EXT_V1, do_branch},
- {"b", 0xeafffffe, 1, ARM_EXT_V1, do_branch},
-#endif
-
- /* Pseudo ops. */
- {"adr", 0xe28f0000, 3, ARM_EXT_V1, do_adr},
- {"adrl", 0xe28f0000, 3, ARM_EXT_V1, do_adrl},
- {"nop", 0xe1a00000, 3, ARM_EXT_V1, do_empty},
-
- /* ARM 2 multiplies. */
- {"mul", 0xe0000090, 3, ARM_EXT_V2, do_mul},
- {"muls", 0xe0100090, 3, ARM_EXT_V2, do_mul},
- {"mla", 0xe0200090, 3, ARM_EXT_V2, do_mla},
- {"mlas", 0xe0300090, 3, ARM_EXT_V2, do_mla},
-
- /* Generic coprocessor instructions. */
- {"cdp", 0xee000000, 3, ARM_EXT_V2, do_cdp},
- {"ldc", 0xec100000, 3, ARM_EXT_V2, do_lstc},
- {"ldcl", 0xec500000, 3, ARM_EXT_V2, do_lstc},
- {"stc", 0xec000000, 3, ARM_EXT_V2, do_lstc},
- {"stcl", 0xec400000, 3, ARM_EXT_V2, do_lstc},
- {"mcr", 0xee000010, 3, ARM_EXT_V2, do_co_reg},
- {"mrc", 0xee100010, 3, ARM_EXT_V2, do_co_reg},
-
- /* ARM 3 - swp instructions. */
- {"swp", 0xe1000090, 3, ARM_EXT_V2S, do_swap},
- {"swpb", 0xe1400090, 3, ARM_EXT_V2S, do_swap},
-
- /* ARM 6 Status register instructions. */
- {"mrs", 0xe10f0000, 3, ARM_EXT_V3, do_mrs},
- {"msr", 0xe120f000, 3, ARM_EXT_V3, do_msr},
- /* ScottB: our code uses 0xe128f000 for msr.
- NickC: but this is wrong because the bits 16 through 19 are
- handled by the PSR_xxx defines above. */
-
- /* ARM 7M long multiplies. */
- {"smull", 0xe0c00090, 5, ARM_EXT_V3M, do_mull},
- {"smulls", 0xe0d00090, 5, ARM_EXT_V3M, do_mull},
- {"umull", 0xe0800090, 5, ARM_EXT_V3M, do_mull},
- {"umulls", 0xe0900090, 5, ARM_EXT_V3M, do_mull},
- {"smlal", 0xe0e00090, 5, ARM_EXT_V3M, do_mull},
- {"smlals", 0xe0f00090, 5, ARM_EXT_V3M, do_mull},
- {"umlal", 0xe0a00090, 5, ARM_EXT_V3M, do_mull},
- {"umlals", 0xe0b00090, 5, ARM_EXT_V3M, do_mull},
-
- /* ARM Architecture 4. */
- {"ldrh", 0xe01000b0, 3, ARM_EXT_V4, do_ldstv4},
- {"ldrsh", 0xe01000f0, 3, ARM_EXT_V4, do_ldstv4},
- {"ldrsb", 0xe01000d0, 3, ARM_EXT_V4, do_ldstv4},
- {"strh", 0xe00000b0, 3, ARM_EXT_V4, do_ldstv4},
-
- /* ARM Architecture 4T. */
- /* Note: bx (and blx) are required on V5, even if the processor does
- not support Thumb. */
- {"bx", 0xe12fff10, 2, ARM_EXT_V4T | ARM_EXT_V5, do_bx},
-
- /* ARM Architecture 5T. */
- /* Note: blx has 2 variants, so the .value is set dynamically.
- Only one of the variants has conditional execution. */
- {"blx", 0xe0000000, 3, ARM_EXT_V5, do_blx},
- {"clz", 0xe16f0f10, 3, ARM_EXT_V5, do_clz},
- {"bkpt", 0xe1200070, 0, ARM_EXT_V5, do_bkpt},
- {"ldc2", 0xfc100000, 0, ARM_EXT_V5, do_lstc2},
- {"ldc2l", 0xfc500000, 0, ARM_EXT_V5, do_lstc2},
- {"stc2", 0xfc000000, 0, ARM_EXT_V5, do_lstc2},
- {"stc2l", 0xfc400000, 0, ARM_EXT_V5, do_lstc2},
- {"cdp2", 0xfe000000, 0, ARM_EXT_V5, do_cdp2},
- {"mcr2", 0xfe000010, 0, ARM_EXT_V5, do_co_reg2},
- {"mrc2", 0xfe100010, 0, ARM_EXT_V5, do_co_reg2},
-
- /* ARM Architecture 5TExP. */
- {"smlabb", 0xe1000080, 6, ARM_EXT_V5ExP, do_smla},
- {"smlatb", 0xe10000a0, 6, ARM_EXT_V5ExP, do_smla},
- {"smlabt", 0xe10000c0, 6, ARM_EXT_V5ExP, do_smla},
- {"smlatt", 0xe10000e0, 6, ARM_EXT_V5ExP, do_smla},
-
- {"smlawb", 0xe1200080, 6, ARM_EXT_V5ExP, do_smla},
- {"smlawt", 0xe12000c0, 6, ARM_EXT_V5ExP, do_smla},
-
- {"smlalbb", 0xe1400080, 7, ARM_EXT_V5ExP, do_smlal},
- {"smlaltb", 0xe14000a0, 7, ARM_EXT_V5ExP, do_smlal},
- {"smlalbt", 0xe14000c0, 7, ARM_EXT_V5ExP, do_smlal},
- {"smlaltt", 0xe14000e0, 7, ARM_EXT_V5ExP, do_smlal},
-
- {"smulbb", 0xe1600080, 6, ARM_EXT_V5ExP, do_smul},
- {"smultb", 0xe16000a0, 6, ARM_EXT_V5ExP, do_smul},
- {"smulbt", 0xe16000c0, 6, ARM_EXT_V5ExP, do_smul},
- {"smultt", 0xe16000e0, 6, ARM_EXT_V5ExP, do_smul},
-
- {"smulwb", 0xe12000a0, 6, ARM_EXT_V5ExP, do_smul},
- {"smulwt", 0xe12000e0, 6, ARM_EXT_V5ExP, do_smul},
-
- {"qadd", 0xe1000050, 4, ARM_EXT_V5ExP, do_qadd},
- {"qdadd", 0xe1400050, 5, ARM_EXT_V5ExP, do_qadd},
- {"qsub", 0xe1200050, 4, ARM_EXT_V5ExP, do_qadd},
- {"qdsub", 0xe1600050, 5, ARM_EXT_V5ExP, do_qadd},
-
- /* ARM Architecture 5TE. */
- {"pld", 0xf450f000, 0, ARM_EXT_V5E, do_pld},
- {"ldrd", 0xe00000d0, 3, ARM_EXT_V5E, do_ldrd},
- {"strd", 0xe00000f0, 3, ARM_EXT_V5E, do_ldrd},
-
- {"mcrr", 0xec400000, 4, ARM_EXT_V5E, do_co_reg2c},
- {"mrrc", 0xec500000, 4, ARM_EXT_V5E, do_co_reg2c},
-
- /* ARM Architecture 5TEJ. */
- {"bxj", 0xe12fff20, 3, ARM_EXT_V5J, do_bxj},
-
- /* ARM V6. */
- { "cps", 0xf1020000, 0, ARM_EXT_V6, do_cps},
- { "cpsie", 0xf1080000, 0, ARM_EXT_V6, do_cpsi},
- { "cpsid", 0xf10C0000, 0, ARM_EXT_V6, do_cpsi},
- { "ldrex", 0xe1900f9f, 5, ARM_EXT_V6, do_ldrex},
- { "mcrr2", 0xfc400000, 0, ARM_EXT_V6, do_co_reg2c},
- { "mrrc2", 0xfc500000, 0, ARM_EXT_V6, do_co_reg2c},
- { "pkhbt", 0xe6800010, 5, ARM_EXT_V6, do_pkhbt},
- { "pkhtb", 0xe6800050, 5, ARM_EXT_V6, do_pkhtb},
- { "qadd16", 0xe6200f10, 6, ARM_EXT_V6, do_qadd16},
- { "qadd8", 0xe6200f90, 5, ARM_EXT_V6, do_qadd16},
- { "qaddsubx", 0xe6200f30, 8, ARM_EXT_V6, do_qadd16},
- { "qsub16", 0xe6200f70, 6, ARM_EXT_V6, do_qadd16},
- { "qsub8", 0xe6200ff0, 5, ARM_EXT_V6, do_qadd16},
- { "qsubaddx", 0xe6200f50, 8, ARM_EXT_V6, do_qadd16},
- { "sadd16", 0xe6100f10, 6, ARM_EXT_V6, do_qadd16},
- { "sadd8", 0xe6100f90, 5, ARM_EXT_V6, do_qadd16},
- { "saddsubx", 0xe6100f30, 8, ARM_EXT_V6, do_qadd16},
- { "shadd16", 0xe6300f10, 7, ARM_EXT_V6, do_qadd16},
- { "shadd8", 0xe6300f90, 6, ARM_EXT_V6, do_qadd16},
- { "shaddsubx", 0xe6300f30, 9, ARM_EXT_V6, do_qadd16},
- { "shsub16", 0xe6300f70, 7, ARM_EXT_V6, do_qadd16},
- { "shsub8", 0xe6300ff0, 6, ARM_EXT_V6, do_qadd16},
- { "shsubaddx", 0xe6300f50, 9, ARM_EXT_V6, do_qadd16},
- { "ssub16", 0xe6100f70, 6, ARM_EXT_V6, do_qadd16},
- { "ssub8", 0xe6100ff0, 5, ARM_EXT_V6, do_qadd16},
- { "ssubaddx", 0xe6100f50, 8, ARM_EXT_V6, do_qadd16},
- { "uadd16", 0xe6500f10, 6, ARM_EXT_V6, do_qadd16},
- { "uadd8", 0xe6500f90, 5, ARM_EXT_V6, do_qadd16},
- { "uaddsubx", 0xe6500f30, 8, ARM_EXT_V6, do_qadd16},
- { "uhadd16", 0xe6700f10, 7, ARM_EXT_V6, do_qadd16},
- { "uhadd8", 0xe6700f90, 6, ARM_EXT_V6, do_qadd16},
- { "uhaddsubx", 0xe6700f30, 9, ARM_EXT_V6, do_qadd16},
- { "uhsub16", 0xe6700f70, 7, ARM_EXT_V6, do_qadd16},
- { "uhsub8", 0xe6700ff0, 6, ARM_EXT_V6, do_qadd16},
- { "uhsubaddx", 0xe6700f50, 9, ARM_EXT_V6, do_qadd16},
- { "uqadd16", 0xe6600f10, 7, ARM_EXT_V6, do_qadd16},
- { "uqadd8", 0xe6600f90, 6, ARM_EXT_V6, do_qadd16},
- { "uqaddsubx", 0xe6600f30, 9, ARM_EXT_V6, do_qadd16},
- { "uqsub16", 0xe6600f70, 7, ARM_EXT_V6, do_qadd16},
- { "uqsub8", 0xe6600ff0, 6, ARM_EXT_V6, do_qadd16},
- { "uqsubaddx", 0xe6600f50, 9, ARM_EXT_V6, do_qadd16},
- { "usub16", 0xe6500f70, 6, ARM_EXT_V6, do_qadd16},
- { "usub8", 0xe6500ff0, 5, ARM_EXT_V6, do_qadd16},
- { "usubaddx", 0xe6500f50, 8, ARM_EXT_V6, do_qadd16},
- { "rev", 0xe6bf0f30, 3, ARM_EXT_V6, do_rev},
- { "rev16", 0xe6bf0fb0, 5, ARM_EXT_V6, do_rev},
- { "revsh", 0xe6ff0fb0, 5, ARM_EXT_V6, do_rev},
- { "rfeia", 0xf8900a00, 0, ARM_EXT_V6, do_rfe},
- { "rfeib", 0xf9900a00, 0, ARM_EXT_V6, do_rfe},
- { "rfeda", 0xf8100a00, 0, ARM_EXT_V6, do_rfe},
- { "rfedb", 0xf9100a00, 0, ARM_EXT_V6, do_rfe},
- { "rfefd", 0xf8900a00, 0, ARM_EXT_V6, do_rfe},
- { "rfefa", 0xf9900a00, 0, ARM_EXT_V6, do_rfe},
- { "rfeea", 0xf8100a00, 0, ARM_EXT_V6, do_rfe},
- { "rfeed", 0xf9100a00, 0, ARM_EXT_V6, do_rfe},
- { "sxtah", 0xe6b00070, 5, ARM_EXT_V6, do_sxtah},
- { "sxtab16", 0xe6800070, 7, ARM_EXT_V6, do_sxtah},
- { "sxtab", 0xe6a00070, 5, ARM_EXT_V6, do_sxtah},
- { "sxth", 0xe6bf0070, 4, ARM_EXT_V6, do_sxth},
- { "sxtb16", 0xe68f0070, 6, ARM_EXT_V6, do_sxth},
- { "sxtb", 0xe6af0070, 4, ARM_EXT_V6, do_sxth},
- { "uxtah", 0xe6f00070, 5, ARM_EXT_V6, do_sxtah},
- { "uxtab16", 0xe6c00070, 7, ARM_EXT_V6, do_sxtah},
- { "uxtab", 0xe6e00070, 5, ARM_EXT_V6, do_sxtah},
- { "uxth", 0xe6ff0070, 4, ARM_EXT_V6, do_sxth},
- { "uxtb16", 0xe6cf0070, 6, ARM_EXT_V6, do_sxth},
- { "uxtb", 0xe6ef0070, 4, ARM_EXT_V6, do_sxth},
- { "sel", 0xe68000b0, 3, ARM_EXT_V6, do_qadd16},
- { "setend", 0xf1010000, 0, ARM_EXT_V6, do_setend},
- { "smlad", 0xe7000010, 5, ARM_EXT_V6, do_smlad},
- { "smladx", 0xe7000030, 6, ARM_EXT_V6, do_smlad},
- { "smlald", 0xe7400010, 6, ARM_EXT_V6, do_smlald},
- { "smlaldx", 0xe7400030, 7, ARM_EXT_V6, do_smlald},
- { "smlsd", 0xe7000050, 5, ARM_EXT_V6, do_smlad},
- { "smlsdx", 0xe7000070, 6, ARM_EXT_V6, do_smlad},
- { "smlsld", 0xe7400050, 6, ARM_EXT_V6, do_smlald},
- { "smlsldx", 0xe7400070, 7, ARM_EXT_V6, do_smlald},
- { "smmla", 0xe7500010, 5, ARM_EXT_V6, do_smlad},
- { "smmlar", 0xe7500030, 6, ARM_EXT_V6, do_smlad},
- { "smmls", 0xe75000d0, 5, ARM_EXT_V6, do_smlad},
- { "smmlsr", 0xe75000f0, 6, ARM_EXT_V6, do_smlad},
- { "smmul", 0xe750f010, 5, ARM_EXT_V6, do_smmul},
- { "smmulr", 0xe750f030, 6, ARM_EXT_V6, do_smmul},
- { "smuad", 0xe700f010, 5, ARM_EXT_V6, do_smmul},
- { "smuadx", 0xe700f030, 6, ARM_EXT_V6, do_smmul},
- { "smusd", 0xe700f050, 5, ARM_EXT_V6, do_smmul},
- { "smusdx", 0xe700f070, 6, ARM_EXT_V6, do_smmul},
- { "srsia", 0xf8cd0500, 0, ARM_EXT_V6, do_srs},
- { "srsib", 0xf9cd0500, 0, ARM_EXT_V6, do_srs},
- { "srsda", 0xf84d0500, 0, ARM_EXT_V6, do_srs},
- { "srsdb", 0xf94d0500, 0, ARM_EXT_V6, do_srs},
- { "ssat", 0xe6a00010, 4, ARM_EXT_V6, do_ssat},
- { "ssat16", 0xe6a00f30, 6, ARM_EXT_V6, do_ssat16},
- { "strex", 0xe1800f90, 5, ARM_EXT_V6, do_strex},
- { "umaal", 0xe0400090, 5, ARM_EXT_V6, do_umaal},
- { "usad8", 0xe780f010, 5, ARM_EXT_V6, do_smmul},
- { "usada8", 0xe7800010, 6, ARM_EXT_V6, do_smlad},
- { "usat", 0xe6e00010, 4, ARM_EXT_V6, do_usat},
- { "usat16", 0xe6e00f30, 6, ARM_EXT_V6, do_usat16},
-
- /* Core FPA instruction set (V1). */
- {"wfs", 0xee200110, 3, FPU_FPA_EXT_V1, do_fpa_ctrl},
- {"rfs", 0xee300110, 3, FPU_FPA_EXT_V1, do_fpa_ctrl},
- {"wfc", 0xee400110, 3, FPU_FPA_EXT_V1, do_fpa_ctrl},
- {"rfc", 0xee500110, 3, FPU_FPA_EXT_V1, do_fpa_ctrl},
-
- {"ldfs", 0xec100100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
- {"ldfd", 0xec108100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
- {"ldfe", 0xec500100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
- {"ldfp", 0xec508100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
-
- {"stfs", 0xec000100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
- {"stfd", 0xec008100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
- {"stfe", 0xec400100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
- {"stfp", 0xec408100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
-
- {"mvfs", 0xee008100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfsp", 0xee008120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfsm", 0xee008140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfsz", 0xee008160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfd", 0xee008180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfdp", 0xee0081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfdm", 0xee0081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfdz", 0xee0081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfe", 0xee088100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfep", 0xee088120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfem", 0xee088140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mvfez", 0xee088160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"mnfs", 0xee108100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfsp", 0xee108120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfsm", 0xee108140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfsz", 0xee108160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfd", 0xee108180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfdp", 0xee1081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfdm", 0xee1081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfdz", 0xee1081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfe", 0xee188100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfep", 0xee188120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfem", 0xee188140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"mnfez", 0xee188160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"abss", 0xee208100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"abssp", 0xee208120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"abssm", 0xee208140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"abssz", 0xee208160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"absd", 0xee208180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"absdp", 0xee2081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"absdm", 0xee2081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"absdz", 0xee2081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"abse", 0xee288100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"absep", 0xee288120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"absem", 0xee288140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"absez", 0xee288160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"rnds", 0xee308100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rndsp", 0xee308120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rndsm", 0xee308140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rndsz", 0xee308160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rndd", 0xee308180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rnddp", 0xee3081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rnddm", 0xee3081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rnddz", 0xee3081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rnde", 0xee388100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rndep", 0xee388120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rndem", 0xee388140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"rndez", 0xee388160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"sqts", 0xee408100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtsp", 0xee408120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtsm", 0xee408140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtsz", 0xee408160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtd", 0xee408180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtdp", 0xee4081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtdm", 0xee4081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtdz", 0xee4081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqte", 0xee488100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtep", 0xee488120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtem", 0xee488140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sqtez", 0xee488160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"logs", 0xee508100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logsp", 0xee508120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logsm", 0xee508140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logsz", 0xee508160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logd", 0xee508180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logdp", 0xee5081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logdm", 0xee5081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logdz", 0xee5081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"loge", 0xee588100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logep", 0xee588120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logem", 0xee588140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"logez", 0xee588160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"lgns", 0xee608100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgnsp", 0xee608120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgnsm", 0xee608140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgnsz", 0xee608160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgnd", 0xee608180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgndp", 0xee6081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgndm", 0xee6081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgndz", 0xee6081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgne", 0xee688100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgnep", 0xee688120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgnem", 0xee688140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"lgnez", 0xee688160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"exps", 0xee708100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expsp", 0xee708120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expsm", 0xee708140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expsz", 0xee708160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expd", 0xee708180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expdp", 0xee7081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expdm", 0xee7081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expdz", 0xee7081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expe", 0xee788100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expep", 0xee788120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expem", 0xee788140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"expdz", 0xee788160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"sins", 0xee808100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sinsp", 0xee808120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sinsm", 0xee808140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sinsz", 0xee808160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sind", 0xee808180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sindp", 0xee8081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sindm", 0xee8081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sindz", 0xee8081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sine", 0xee888100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sinep", 0xee888120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sinem", 0xee888140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"sinez", 0xee888160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"coss", 0xee908100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cossp", 0xee908120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cossm", 0xee908140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cossz", 0xee908160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cosd", 0xee908180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cosdp", 0xee9081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cosdm", 0xee9081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cosdz", 0xee9081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cose", 0xee988100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cosep", 0xee988120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cosem", 0xee988140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"cosez", 0xee988160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"tans", 0xeea08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tansp", 0xeea08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tansm", 0xeea08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tansz", 0xeea08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tand", 0xeea08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tandp", 0xeea081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tandm", 0xeea081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tandz", 0xeea081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tane", 0xeea88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tanep", 0xeea88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tanem", 0xeea88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"tanez", 0xeea88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"asns", 0xeeb08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asnsp", 0xeeb08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asnsm", 0xeeb08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asnsz", 0xeeb08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asnd", 0xeeb08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asndp", 0xeeb081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asndm", 0xeeb081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asndz", 0xeeb081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asne", 0xeeb88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asnep", 0xeeb88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asnem", 0xeeb88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"asnez", 0xeeb88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"acss", 0xeec08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acssp", 0xeec08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acssm", 0xeec08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acssz", 0xeec08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acsd", 0xeec08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acsdp", 0xeec081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acsdm", 0xeec081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acsdz", 0xeec081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acse", 0xeec88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acsep", 0xeec88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acsem", 0xeec88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"acsez", 0xeec88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"atns", 0xeed08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atnsp", 0xeed08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atnsm", 0xeed08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atnsz", 0xeed08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atnd", 0xeed08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atndp", 0xeed081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atndm", 0xeed081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atndz", 0xeed081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atne", 0xeed88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atnep", 0xeed88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atnem", 0xeed88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"atnez", 0xeed88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"urds", 0xeee08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urdsp", 0xeee08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urdsm", 0xeee08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urdsz", 0xeee08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urdd", 0xeee08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urddp", 0xeee081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urddm", 0xeee081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urddz", 0xeee081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urde", 0xeee88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urdep", 0xeee88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urdem", 0xeee88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"urdez", 0xeee88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"nrms", 0xeef08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmsp", 0xeef08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmsm", 0xeef08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmsz", 0xeef08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmd", 0xeef08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmdp", 0xeef081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmdm", 0xeef081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmdz", 0xeef081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrme", 0xeef88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmep", 0xeef88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmem", 0xeef88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
- {"nrmez", 0xeef88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
-
- {"adfs", 0xee000100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfsp", 0xee000120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfsm", 0xee000140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfsz", 0xee000160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfd", 0xee000180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfdp", 0xee0001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfdm", 0xee0001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfdz", 0xee0001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfe", 0xee080100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfep", 0xee080120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfem", 0xee080140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"adfez", 0xee080160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"sufs", 0xee200100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufsp", 0xee200120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufsm", 0xee200140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufsz", 0xee200160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufd", 0xee200180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufdp", 0xee2001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufdm", 0xee2001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufdz", 0xee2001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufe", 0xee280100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufep", 0xee280120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufem", 0xee280140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"sufez", 0xee280160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"rsfs", 0xee300100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfsp", 0xee300120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfsm", 0xee300140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfsz", 0xee300160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfd", 0xee300180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfdp", 0xee3001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfdm", 0xee3001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfdz", 0xee3001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfe", 0xee380100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfep", 0xee380120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfem", 0xee380140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rsfez", 0xee380160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"mufs", 0xee100100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufsp", 0xee100120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufsm", 0xee100140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufsz", 0xee100160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufd", 0xee100180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufdp", 0xee1001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufdm", 0xee1001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufdz", 0xee1001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufe", 0xee180100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufep", 0xee180120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufem", 0xee180140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"mufez", 0xee180160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"dvfs", 0xee400100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfsp", 0xee400120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfsm", 0xee400140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfsz", 0xee400160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfd", 0xee400180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfdp", 0xee4001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfdm", 0xee4001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfdz", 0xee4001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfe", 0xee480100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfep", 0xee480120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfem", 0xee480140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"dvfez", 0xee480160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"rdfs", 0xee500100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfsp", 0xee500120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfsm", 0xee500140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfsz", 0xee500160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfd", 0xee500180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfdp", 0xee5001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfdm", 0xee5001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfdz", 0xee5001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfe", 0xee580100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfep", 0xee580120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfem", 0xee580140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rdfez", 0xee580160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"pows", 0xee600100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powsp", 0xee600120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powsm", 0xee600140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powsz", 0xee600160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powd", 0xee600180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powdp", 0xee6001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powdm", 0xee6001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powdz", 0xee6001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powe", 0xee680100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powep", 0xee680120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powem", 0xee680140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"powez", 0xee680160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"rpws", 0xee700100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwsp", 0xee700120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwsm", 0xee700140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwsz", 0xee700160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwd", 0xee700180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwdp", 0xee7001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwdm", 0xee7001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwdz", 0xee7001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwe", 0xee780100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwep", 0xee780120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwem", 0xee780140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rpwez", 0xee780160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"rmfs", 0xee800100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfsp", 0xee800120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfsm", 0xee800140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfsz", 0xee800160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfd", 0xee800180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfdp", 0xee8001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfdm", 0xee8001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfdz", 0xee8001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfe", 0xee880100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfep", 0xee880120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfem", 0xee880140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"rmfez", 0xee880160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"fmls", 0xee900100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmlsp", 0xee900120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmlsm", 0xee900140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmlsz", 0xee900160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmld", 0xee900180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmldp", 0xee9001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmldm", 0xee9001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmldz", 0xee9001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmle", 0xee980100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmlep", 0xee980120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmlem", 0xee980140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fmlez", 0xee980160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"fdvs", 0xeea00100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvsp", 0xeea00120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvsm", 0xeea00140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvsz", 0xeea00160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvd", 0xeea00180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvdp", 0xeea001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvdm", 0xeea001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvdz", 0xeea001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdve", 0xeea80100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvep", 0xeea80120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvem", 0xeea80140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"fdvez", 0xeea80160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"frds", 0xeeb00100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frdsp", 0xeeb00120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frdsm", 0xeeb00140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frdsz", 0xeeb00160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frdd", 0xeeb00180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frddp", 0xeeb001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frddm", 0xeeb001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frddz", 0xeeb001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frde", 0xeeb80100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frdep", 0xeeb80120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frdem", 0xeeb80140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"frdez", 0xeeb80160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"pols", 0xeec00100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"polsp", 0xeec00120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"polsm", 0xeec00140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"polsz", 0xeec00160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"pold", 0xeec00180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"poldp", 0xeec001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"poldm", 0xeec001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"poldz", 0xeec001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"pole", 0xeec80100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"polep", 0xeec80120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"polem", 0xeec80140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
- {"polez", 0xeec80160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
-
- {"cmf", 0xee90f110, 3, FPU_FPA_EXT_V1, do_fpa_cmp},
- {"cmfe", 0xeed0f110, 3, FPU_FPA_EXT_V1, do_fpa_cmp},
- {"cnf", 0xeeb0f110, 3, FPU_FPA_EXT_V1, do_fpa_cmp},
- {"cnfe", 0xeef0f110, 3, FPU_FPA_EXT_V1, do_fpa_cmp},
- /* The FPA10 data sheet suggests that the 'E' of cmfe/cnfe should
- not be an optional suffix, but part of the instruction. To be
- compatible, we accept either. */
- {"cmfe", 0xeed0f110, 4, FPU_FPA_EXT_V1, do_fpa_cmp},
- {"cnfe", 0xeef0f110, 4, FPU_FPA_EXT_V1, do_fpa_cmp},
-
- {"flts", 0xee000110, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltsp", 0xee000130, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltsm", 0xee000150, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltsz", 0xee000170, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltd", 0xee000190, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltdp", 0xee0001b0, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltdm", 0xee0001d0, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltdz", 0xee0001f0, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"flte", 0xee080110, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltep", 0xee080130, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltem", 0xee080150, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
- {"fltez", 0xee080170, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ const char *template;
- /* The implementation of the FIX instruction is broken on some
- assemblers, in that it accepts a precision specifier as well as a
- rounding specifier, despite the fact that this is meaningless.
- To be more compatible, we accept it as well, though of course it
- does not set any bits. */
- {"fix", 0xee100110, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixp", 0xee100130, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixm", 0xee100150, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixz", 0xee100170, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixsp", 0xee100130, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixsm", 0xee100150, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixsz", 0xee100170, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixdp", 0xee100130, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixdm", 0xee100150, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixdz", 0xee100170, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixep", 0xee100130, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixem", 0xee100150, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
- {"fixez", 0xee100170, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ /* Parameters to instruction. */
+ unsigned char operands[8];
- /* Instructions that were new with the real FPA, call them V2. */
- {"lfm", 0xec100200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
- {"lfmfd", 0xec900200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
- {"lfmea", 0xed100200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
- {"sfm", 0xec000200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
- {"sfmfd", 0xed000200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
- {"sfmea", 0xec800200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
-
- /* VFP V1xD (single precision). */
- /* Moves and type conversions. */
- {"fcpys", 0xeeb00a40, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"fmrs", 0xee100a10, 4, FPU_VFP_EXT_V1xD, do_vfp_reg_from_sp},
- {"fmsr", 0xee000a10, 4, FPU_VFP_EXT_V1xD, do_vfp_sp_from_reg},
- {"fmstat", 0xeef1fa10, 6, FPU_VFP_EXT_V1xD, do_empty},
- {"fsitos", 0xeeb80ac0, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"fuitos", 0xeeb80a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"ftosis", 0xeebd0a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"ftosizs", 0xeebd0ac0, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"ftouis", 0xeebc0a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"ftouizs", 0xeebc0ac0, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"fmrx", 0xeef00a10, 4, FPU_VFP_EXT_V1xD, do_vfp_reg_from_ctrl},
- {"fmxr", 0xeee00a10, 4, FPU_VFP_EXT_V1xD, do_vfp_ctrl_from_reg},
-
- /* Memory operations. */
- {"flds", 0xed100a00, 4, FPU_VFP_EXT_V1xD, do_vfp_sp_ldst},
- {"fsts", 0xed000a00, 4, FPU_VFP_EXT_V1xD, do_vfp_sp_ldst},
- {"fldmias", 0xec900a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmia},
- {"fldmfds", 0xec900a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmia},
- {"fldmdbs", 0xed300a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmdb},
- {"fldmeas", 0xed300a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmdb},
- {"fldmiax", 0xec900b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmia},
- {"fldmfdx", 0xec900b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmia},
- {"fldmdbx", 0xed300b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmdb},
- {"fldmeax", 0xed300b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmdb},
- {"fstmias", 0xec800a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmia},
- {"fstmeas", 0xec800a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmia},
- {"fstmdbs", 0xed200a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmdb},
- {"fstmfds", 0xed200a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmdb},
- {"fstmiax", 0xec800b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmia},
- {"fstmeax", 0xec800b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmia},
- {"fstmdbx", 0xed200b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmdb},
- {"fstmfdx", 0xed200b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmdb},
+ /* Conditional tag - see opcode_lookup. */
+ unsigned int tag : 4;
- /* Monadic operations. */
- {"fabss", 0xeeb00ac0, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"fnegs", 0xeeb10a40, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"fsqrts", 0xeeb10ac0, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
-
- /* Dyadic operations. */
- {"fadds", 0xee300a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
- {"fsubs", 0xee300a40, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
- {"fmuls", 0xee200a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
- {"fdivs", 0xee800a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
- {"fmacs", 0xee000a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
- {"fmscs", 0xee100a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
- {"fnmuls", 0xee200a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
- {"fnmacs", 0xee000a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
- {"fnmscs", 0xee100a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+ /* Basic instruction code. */
+ unsigned int avalue : 28;
- /* Comparisons. */
- {"fcmps", 0xeeb40a40, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"fcmpzs", 0xeeb50a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_compare_z},
- {"fcmpes", 0xeeb40ac0, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
- {"fcmpezs", 0xeeb50ac0, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_compare_z},
+ /* Thumb-format instruction code. */
+ unsigned int tvalue;
- /* VFP V1 (Double precision). */
- /* Moves and type conversions. */
- {"fcpyd", 0xeeb00b40, 5, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
- {"fcvtds", 0xeeb70ac0, 6, FPU_VFP_EXT_V1, do_vfp_dp_sp_cvt},
- {"fcvtsd", 0xeeb70bc0, 6, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
- {"fmdhr", 0xee200b10, 5, FPU_VFP_EXT_V1, do_vfp_dp_from_reg},
- {"fmdlr", 0xee000b10, 5, FPU_VFP_EXT_V1, do_vfp_dp_from_reg},
- {"fmrdh", 0xee300b10, 5, FPU_VFP_EXT_V1, do_vfp_reg_from_dp},
- {"fmrdl", 0xee100b10, 5, FPU_VFP_EXT_V1, do_vfp_reg_from_dp},
- {"fsitod", 0xeeb80bc0, 6, FPU_VFP_EXT_V1, do_vfp_dp_sp_cvt},
- {"fuitod", 0xeeb80b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_sp_cvt},
- {"ftosid", 0xeebd0b40, 6, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
- {"ftosizd", 0xeebd0bc0, 7, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
- {"ftouid", 0xeebc0b40, 6, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
- {"ftouizd", 0xeebc0bc0, 7, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
-
- /* Memory operations. */
- {"fldd", 0xed100b00, 4, FPU_VFP_EXT_V1, do_vfp_dp_ldst},
- {"fstd", 0xed000b00, 4, FPU_VFP_EXT_V1, do_vfp_dp_ldst},
- {"fldmiad", 0xec900b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmia},
- {"fldmfdd", 0xec900b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmia},
- {"fldmdbd", 0xed300b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmdb},
- {"fldmead", 0xed300b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmdb},
- {"fstmiad", 0xec800b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmia},
- {"fstmead", 0xec800b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmia},
- {"fstmdbd", 0xed200b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmdb},
- {"fstmfdd", 0xed200b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmdb},
+ /* Which architecture variant provides this instruction. */
+ const arm_feature_set *avariant;
+ const arm_feature_set *tvariant;
- /* Monadic operations. */
- {"fabsd", 0xeeb00bc0, 5, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
- {"fnegd", 0xeeb10b40, 5, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
- {"fsqrtd", 0xeeb10bc0, 6, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
-
- /* Dyadic operations. */
- {"faddd", 0xee300b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
- {"fsubd", 0xee300b40, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
- {"fmuld", 0xee200b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
- {"fdivd", 0xee800b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
- {"fmacd", 0xee000b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
- {"fmscd", 0xee100b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
- {"fnmuld", 0xee200b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
- {"fnmacd", 0xee000b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
- {"fnmscd", 0xee100b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+ /* Function to call to encode instruction in ARM format. */
+ void (* aencode) (void);
- /* Comparisons. */
- {"fcmpd", 0xeeb40b40, 5, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
- {"fcmpzd", 0xeeb50b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_compare_z},
- {"fcmped", 0xeeb40bc0, 6, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
- {"fcmpezd", 0xeeb50bc0, 7, FPU_VFP_EXT_V1, do_vfp_dp_compare_z},
-
- /* VFP V2. */
- {"fmsrr", 0xec400a10, 5, FPU_VFP_EXT_V2, do_vfp_sp2_from_reg2},
- {"fmrrs", 0xec500a10, 5, FPU_VFP_EXT_V2, do_vfp_reg2_from_sp2},
- {"fmdrr", 0xec400b10, 5, FPU_VFP_EXT_V2, do_vfp_dp_from_reg2},
- {"fmrrd", 0xec500b10, 5, FPU_VFP_EXT_V2, do_vfp_reg2_from_dp},
-
- /* Intel XScale extensions to ARM V5 ISA. (All use CP0). */
- {"mia", 0xee200010, 3, ARM_CEXT_XSCALE, do_xsc_mia},
- {"miaph", 0xee280010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
- {"miabb", 0xee2c0010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
- {"miabt", 0xee2d0010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
- {"miatb", 0xee2e0010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
- {"miatt", 0xee2f0010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
- {"mar", 0xec400000, 3, ARM_CEXT_XSCALE, do_xsc_mar},
- {"mra", 0xec500000, 3, ARM_CEXT_XSCALE, do_xsc_mra},
-
- /* Intel Wireless MMX technology instructions. */
- {"tandcb", 0xee130130, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tandc},
- {"tandch", 0xee530130, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tandc},
- {"tandcw", 0xee930130, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tandc},
- {"tbcstb", 0xee400010, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tbcst},
- {"tbcsth", 0xee400050, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tbcst},
- {"tbcstw", 0xee400090, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tbcst},
- {"textrcb", 0xee130170, 7, ARM_CEXT_IWMMXT, do_iwmmxt_textrc},
- {"textrch", 0xee530170, 7, ARM_CEXT_IWMMXT, do_iwmmxt_textrc},
- {"textrcw", 0xee930170, 7, ARM_CEXT_IWMMXT, do_iwmmxt_textrc},
- {"textrmub", 0xee100070, 8, ARM_CEXT_IWMMXT, do_iwmmxt_textrm},
- {"textrmuh", 0xee500070, 8, ARM_CEXT_IWMMXT, do_iwmmxt_textrm},
- {"textrmuw", 0xee900070, 8, ARM_CEXT_IWMMXT, do_iwmmxt_textrm},
- {"textrmsb", 0xee100078, 8, ARM_CEXT_IWMMXT, do_iwmmxt_textrm},
- {"textrmsh", 0xee500078, 8, ARM_CEXT_IWMMXT, do_iwmmxt_textrm},
- {"textrmsw", 0xee900078, 8, ARM_CEXT_IWMMXT, do_iwmmxt_textrm},
- {"tinsrb", 0xee600010, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tinsr},
- {"tinsrh", 0xee600050, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tinsr},
- {"tinsrw", 0xee600090, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tinsr},
- {"tmcr", 0xee000110, 4, ARM_CEXT_IWMMXT, do_iwmmxt_tmcr},
- {"tmcrr", 0xec400000, 5, ARM_CEXT_IWMMXT, do_iwmmxt_tmcrr},
- {"tmia", 0xee200010, 4, ARM_CEXT_IWMMXT, do_iwmmxt_tmia},
- {"tmiaph", 0xee280010, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tmia},
- {"tmiabb", 0xee2c0010, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tmia},
- {"tmiabt", 0xee2d0010, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tmia},
- {"tmiatb", 0xee2e0010, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tmia},
- {"tmiatt", 0xee2f0010, 6, ARM_CEXT_IWMMXT, do_iwmmxt_tmia},
- {"tmovmskb", 0xee100030, 8, ARM_CEXT_IWMMXT, do_iwmmxt_tmovmsk},
- {"tmovmskh", 0xee500030, 8, ARM_CEXT_IWMMXT, do_iwmmxt_tmovmsk},
- {"tmovmskw", 0xee900030, 8, ARM_CEXT_IWMMXT, do_iwmmxt_tmovmsk},
- {"tmrc", 0xee100110, 4, ARM_CEXT_IWMMXT, do_iwmmxt_tmrc},
- {"tmrrc", 0xec500000, 5, ARM_CEXT_IWMMXT, do_iwmmxt_tmrrc},
- {"torcb", 0xee130150, 5, ARM_CEXT_IWMMXT, do_iwmmxt_torc},
- {"torch", 0xee530150, 5, ARM_CEXT_IWMMXT, do_iwmmxt_torc},
- {"torcw", 0xee930150, 5, ARM_CEXT_IWMMXT, do_iwmmxt_torc},
- {"waccb", 0xee0001c0, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wacch", 0xee4001c0, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"waccw", 0xee8001c0, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"waddbss", 0xee300180, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"waddb", 0xee000180, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"waddbus", 0xee100180, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"waddhss", 0xee700180, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"waddh", 0xee400180, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"waddhus", 0xee500180, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"waddwss", 0xeeb00180, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"waddw", 0xee800180, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"waddwus", 0xee900180, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"waligni", 0xee000020, 7, ARM_CEXT_IWMMXT, do_iwmmxt_waligni},
- {"walignr0", 0xee800020, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"walignr1", 0xee900020, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"walignr2", 0xeea00020, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"walignr3", 0xeeb00020, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wand", 0xee200000, 4, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wandn", 0xee300000, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wavg2b", 0xee800000, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wavg2br", 0xee900000, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wavg2h", 0xeec00000, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wavg2hr", 0xeed00000, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wcmpeqb", 0xee000060, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wcmpeqh", 0xee400060, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wcmpeqw", 0xee800060, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wcmpgtub", 0xee100060, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wcmpgtuh", 0xee500060, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wcmpgtuw", 0xee900060, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wcmpgtsb", 0xee300060, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wcmpgtsh", 0xee700060, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wcmpgtsw", 0xeeb00060, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wldrb", 0xec100000, 5, ARM_CEXT_IWMMXT, do_iwmmxt_byte_addr},
- {"wldrh", 0xec100100, 5, ARM_CEXT_IWMMXT, do_iwmmxt_byte_addr},
- {"wldrw", 0xec100200, 5, ARM_CEXT_IWMMXT, do_iwmmxt_word_addr},
- {"wldrd", 0xec100300, 5, ARM_CEXT_IWMMXT, do_iwmmxt_word_addr},
- {"wmacs", 0xee600100, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmacsz", 0xee700100, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmacu", 0xee400100, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmacuz", 0xee500100, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmadds", 0xeea00100, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmaddu", 0xee800100, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmaxsb", 0xee200160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmaxsh", 0xee600160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmaxsw", 0xeea00160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmaxub", 0xee000160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmaxuh", 0xee400160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmaxuw", 0xee800160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wminsb", 0xee300160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wminsh", 0xee700160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wminsw", 0xeeb00160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wminub", 0xee100160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wminuh", 0xee500160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wminuw", 0xee900160, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmov", 0xee000000, 4, ARM_CEXT_IWMMXT, do_iwmmxt_wmov},
- {"wmulsm", 0xee300100, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmulsl", 0xee200100, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmulum", 0xee100100, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wmulul", 0xee000100, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wor", 0xee000000, 3, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wpackhss", 0xee700080, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wpackhus", 0xee500080, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wpackwss", 0xeeb00080, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wpackwus", 0xee900080, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wpackdss", 0xeef00080, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wpackdus", 0xeed00080, 8, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wrorh", 0xee700040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wrorhg", 0xee700148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wrorw", 0xeeb00040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wrorwg", 0xeeb00148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wrord", 0xeef00040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wrordg", 0xeef00148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wsadb", 0xee000120, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsadbz", 0xee100120, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsadh", 0xee400120, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsadhz", 0xee500120, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wshufh", 0xee0001e0, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wshufh},
- {"wsllh", 0xee500040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsllhg", 0xee500148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wsllw", 0xee900040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsllwg", 0xee900148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wslld", 0xeed00040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wslldg", 0xeed00148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wsrah", 0xee400040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsrahg", 0xee400148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wsraw", 0xee800040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsrawg", 0xee800148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wsrad", 0xeec00040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsradg", 0xeec00148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wsrlh", 0xee600040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsrlhg", 0xee600148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wsrlw", 0xeea00040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsrlwg", 0xeea00148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wsrld", 0xeee00040, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsrldg", 0xeee00148, 6, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwcg},
- {"wstrb", 0xec000000, 5, ARM_CEXT_IWMMXT, do_iwmmxt_byte_addr},
- {"wstrh", 0xec000100, 5, ARM_CEXT_IWMMXT, do_iwmmxt_byte_addr},
- {"wstrw", 0xec000200, 5, ARM_CEXT_IWMMXT, do_iwmmxt_word_addr},
- {"wstrd", 0xec000300, 5, ARM_CEXT_IWMMXT, do_iwmmxt_word_addr},
- {"wsubbss", 0xee3001a0, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsubb", 0xee0001a0, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsubbus", 0xee1001a0, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsubhss", 0xee7001a0, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsubh", 0xee4001a0, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsubhus", 0xee5001a0, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsubwss", 0xeeb001a0, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsubw", 0xee8001a0, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wsubwus", 0xee9001a0, 7, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wunpckehub", 0xee0000c0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckehuh", 0xee4000c0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckehuw", 0xee8000c0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckehsb", 0xee2000c0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckehsh", 0xee6000c0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckehsw", 0xeea000c0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckihb", 0xee1000c0, 9, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wunpckihh", 0xee5000c0, 9, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wunpckihw", 0xee9000c0, 9, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wunpckelub", 0xee0000e0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckeluh", 0xee4000e0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckeluw", 0xee8000e0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckelsb", 0xee2000e0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckelsh", 0xee6000e0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckelsw", 0xeea000e0, 10, ARM_CEXT_IWMMXT, do_iwmmxt_wrwr},
- {"wunpckilb", 0xee1000e0, 9, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wunpckilh", 0xee5000e0, 9, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wunpckilw", 0xee9000e0, 9, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wxor", 0xee100000, 4, ARM_CEXT_IWMMXT, do_iwmmxt_wrwrwr},
- {"wzero", 0xee300000, 5, ARM_CEXT_IWMMXT, do_iwmmxt_wzero},
-
- /* Cirrus Maverick instructions. */
- {"cfldrs", 0xec100400, 6, ARM_CEXT_MAVERICK, do_mav_ldst_1},
- {"cfldrd", 0xec500400, 6, ARM_CEXT_MAVERICK, do_mav_ldst_2},
- {"cfldr32", 0xec100500, 7, ARM_CEXT_MAVERICK, do_mav_ldst_3},
- {"cfldr64", 0xec500500, 7, ARM_CEXT_MAVERICK, do_mav_ldst_4},
- {"cfstrs", 0xec000400, 6, ARM_CEXT_MAVERICK, do_mav_ldst_1},
- {"cfstrd", 0xec400400, 6, ARM_CEXT_MAVERICK, do_mav_ldst_2},
- {"cfstr32", 0xec000500, 7, ARM_CEXT_MAVERICK, do_mav_ldst_3},
- {"cfstr64", 0xec400500, 7, ARM_CEXT_MAVERICK, do_mav_ldst_4},
- {"cfmvsr", 0xee000450, 6, ARM_CEXT_MAVERICK, do_mav_binops_2a},
- {"cfmvrs", 0xee100450, 6, ARM_CEXT_MAVERICK, do_mav_binops_1a},
- {"cfmvdlr", 0xee000410, 7, ARM_CEXT_MAVERICK, do_mav_binops_2b},
- {"cfmvrdl", 0xee100410, 7, ARM_CEXT_MAVERICK, do_mav_binops_1b},
- {"cfmvdhr", 0xee000430, 7, ARM_CEXT_MAVERICK, do_mav_binops_2b},
- {"cfmvrdh", 0xee100430, 7, ARM_CEXT_MAVERICK, do_mav_binops_1b},
- {"cfmv64lr", 0xee000510, 8, ARM_CEXT_MAVERICK, do_mav_binops_2c},
- {"cfmvr64l", 0xee100510, 8, ARM_CEXT_MAVERICK, do_mav_binops_1c},
- {"cfmv64hr", 0xee000530, 8, ARM_CEXT_MAVERICK, do_mav_binops_2c},
- {"cfmvr64h", 0xee100530, 8, ARM_CEXT_MAVERICK, do_mav_binops_1c},
- {"cfmval32", 0xee200440, 8, ARM_CEXT_MAVERICK, do_mav_binops_3a},
- {"cfmv32al", 0xee100440, 8, ARM_CEXT_MAVERICK, do_mav_binops_3b},
- {"cfmvam32", 0xee200460, 8, ARM_CEXT_MAVERICK, do_mav_binops_3a},
- {"cfmv32am", 0xee100460, 8, ARM_CEXT_MAVERICK, do_mav_binops_3b},
- {"cfmvah32", 0xee200480, 8, ARM_CEXT_MAVERICK, do_mav_binops_3a},
- {"cfmv32ah", 0xee100480, 8, ARM_CEXT_MAVERICK, do_mav_binops_3b},
- {"cfmva32", 0xee2004a0, 7, ARM_CEXT_MAVERICK, do_mav_binops_3a},
- {"cfmv32a", 0xee1004a0, 7, ARM_CEXT_MAVERICK, do_mav_binops_3b},
- {"cfmva64", 0xee2004c0, 7, ARM_CEXT_MAVERICK, do_mav_binops_3c},
- {"cfmv64a", 0xee1004c0, 7, ARM_CEXT_MAVERICK, do_mav_binops_3d},
- {"cfmvsc32", 0xee2004e0, 8, ARM_CEXT_MAVERICK, do_mav_dspsc_1},
- {"cfmv32sc", 0xee1004e0, 8, ARM_CEXT_MAVERICK, do_mav_dspsc_2},
- {"cfcpys", 0xee000400, 6, ARM_CEXT_MAVERICK, do_mav_binops_1d},
- {"cfcpyd", 0xee000420, 6, ARM_CEXT_MAVERICK, do_mav_binops_1e},
- {"cfcvtsd", 0xee000460, 7, ARM_CEXT_MAVERICK, do_mav_binops_1f},
- {"cfcvtds", 0xee000440, 7, ARM_CEXT_MAVERICK, do_mav_binops_1g},
- {"cfcvt32s", 0xee000480, 8, ARM_CEXT_MAVERICK, do_mav_binops_1h},
- {"cfcvt32d", 0xee0004a0, 8, ARM_CEXT_MAVERICK, do_mav_binops_1i},
- {"cfcvt64s", 0xee0004c0, 8, ARM_CEXT_MAVERICK, do_mav_binops_1j},
- {"cfcvt64d", 0xee0004e0, 8, ARM_CEXT_MAVERICK, do_mav_binops_1k},
- {"cfcvts32", 0xee100580, 8, ARM_CEXT_MAVERICK, do_mav_binops_1l},
- {"cfcvtd32", 0xee1005a0, 8, ARM_CEXT_MAVERICK, do_mav_binops_1m},
- {"cftruncs32", 0xee1005c0, 10, ARM_CEXT_MAVERICK, do_mav_binops_1l},
- {"cftruncd32", 0xee1005e0, 10, ARM_CEXT_MAVERICK, do_mav_binops_1m},
- {"cfrshl32", 0xee000550, 8, ARM_CEXT_MAVERICK, do_mav_triple_4a},
- {"cfrshl64", 0xee000570, 8, ARM_CEXT_MAVERICK, do_mav_triple_4b},
- {"cfsh32", 0xee000500, 6, ARM_CEXT_MAVERICK, do_mav_shift_1},
- {"cfsh64", 0xee200500, 6, ARM_CEXT_MAVERICK, do_mav_shift_2},
- {"cfcmps", 0xee100490, 6, ARM_CEXT_MAVERICK, do_mav_triple_5a},
- {"cfcmpd", 0xee1004b0, 6, ARM_CEXT_MAVERICK, do_mav_triple_5b},
- {"cfcmp32", 0xee100590, 7, ARM_CEXT_MAVERICK, do_mav_triple_5c},
- {"cfcmp64", 0xee1005b0, 7, ARM_CEXT_MAVERICK, do_mav_triple_5d},
- {"cfabss", 0xee300400, 6, ARM_CEXT_MAVERICK, do_mav_binops_1d},
- {"cfabsd", 0xee300420, 6, ARM_CEXT_MAVERICK, do_mav_binops_1e},
- {"cfnegs", 0xee300440, 6, ARM_CEXT_MAVERICK, do_mav_binops_1d},
- {"cfnegd", 0xee300460, 6, ARM_CEXT_MAVERICK, do_mav_binops_1e},
- {"cfadds", 0xee300480, 6, ARM_CEXT_MAVERICK, do_mav_triple_5e},
- {"cfaddd", 0xee3004a0, 6, ARM_CEXT_MAVERICK, do_mav_triple_5f},
- {"cfsubs", 0xee3004c0, 6, ARM_CEXT_MAVERICK, do_mav_triple_5e},
- {"cfsubd", 0xee3004e0, 6, ARM_CEXT_MAVERICK, do_mav_triple_5f},
- {"cfmuls", 0xee100400, 6, ARM_CEXT_MAVERICK, do_mav_triple_5e},
- {"cfmuld", 0xee100420, 6, ARM_CEXT_MAVERICK, do_mav_triple_5f},
- {"cfabs32", 0xee300500, 7, ARM_CEXT_MAVERICK, do_mav_binops_1n},
- {"cfabs64", 0xee300520, 7, ARM_CEXT_MAVERICK, do_mav_binops_1o},
- {"cfneg32", 0xee300540, 7, ARM_CEXT_MAVERICK, do_mav_binops_1n},
- {"cfneg64", 0xee300560, 7, ARM_CEXT_MAVERICK, do_mav_binops_1o},
- {"cfadd32", 0xee300580, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
- {"cfadd64", 0xee3005a0, 7, ARM_CEXT_MAVERICK, do_mav_triple_5h},
- {"cfsub32", 0xee3005c0, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
- {"cfsub64", 0xee3005e0, 7, ARM_CEXT_MAVERICK, do_mav_triple_5h},
- {"cfmul32", 0xee100500, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
- {"cfmul64", 0xee100520, 7, ARM_CEXT_MAVERICK, do_mav_triple_5h},
- {"cfmac32", 0xee100540, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
- {"cfmsc32", 0xee100560, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
- {"cfmadd32", 0xee000600, 8, ARM_CEXT_MAVERICK, do_mav_quad_6a},
- {"cfmsub32", 0xee100600, 8, ARM_CEXT_MAVERICK, do_mav_quad_6a},
- {"cfmadda32", 0xee200600, 9, ARM_CEXT_MAVERICK, do_mav_quad_6b},
- {"cfmsuba32", 0xee300600, 9, ARM_CEXT_MAVERICK, do_mav_quad_6b},
+ /* Function to call to encode instruction in Thumb format. */
+ void (* tencode) (void);
};
/* Defines for various bits that we will want to toggle. */
#define INST_IMMEDIATE 0x02000000
#define OFFSET_REG 0x02000000
-#define HWOFFSET_IMM 0x00400000
+#define HWOFFSET_IMM 0x00400000
#define SHIFT_BY_REG 0x00000010
#define PRE_INDEX 0x01000000
#define INDEX_UP 0x00800000
@@ -2253,6 +472,9 @@ static const struct asm_opcode insns[] =
#define DATA_OP_SHIFT 21
+#define T2_OPCODE_MASK 0xfe1fffff
+#define T2_DATA_OP_SHIFT 21
+
/* Codes to distinguish the arithmetic instructions. */
#define OPCODE_AND 0
#define OPCODE_EOR 1
@@ -2271,40 +493,16 @@ static const struct asm_opcode insns[] =
#define OPCODE_BIC 14
#define OPCODE_MVN 15
-/* Thumb v1 (ARMv4T). */
-static void do_t_nop PARAMS ((char *));
-static void do_t_arit PARAMS ((char *));
-static void do_t_add PARAMS ((char *));
-static void do_t_asr PARAMS ((char *));
-static void do_t_branch9 PARAMS ((char *));
-static void do_t_branch12 PARAMS ((char *));
-static void do_t_branch23 PARAMS ((char *));
-static void do_t_bx PARAMS ((char *));
-static void do_t_compare PARAMS ((char *));
-static void do_t_ldmstm PARAMS ((char *));
-static void do_t_ldr PARAMS ((char *));
-static void do_t_ldrb PARAMS ((char *));
-static void do_t_ldrh PARAMS ((char *));
-static void do_t_lds PARAMS ((char *));
-static void do_t_lsl PARAMS ((char *));
-static void do_t_lsr PARAMS ((char *));
-static void do_t_mov PARAMS ((char *));
-static void do_t_push_pop PARAMS ((char *));
-static void do_t_str PARAMS ((char *));
-static void do_t_strb PARAMS ((char *));
-static void do_t_strh PARAMS ((char *));
-static void do_t_sub PARAMS ((char *));
-static void do_t_swi PARAMS ((char *));
-static void do_t_adr PARAMS ((char *));
-
-/* Thumb v2 (ARMv5T). */
-static void do_t_blx PARAMS ((char *));
-static void do_t_bkpt PARAMS ((char *));
-
-/* ARM V6. */
-static void do_t_cps PARAMS ((char *));
-static void do_t_cpy PARAMS ((char *));
-static void do_t_setend PARAMS ((char *));;
+#define T2_OPCODE_AND 0
+#define T2_OPCODE_BIC 1
+#define T2_OPCODE_ORR 2
+#define T2_OPCODE_ORN 3
+#define T2_OPCODE_EOR 4
+#define T2_OPCODE_ADD 8
+#define T2_OPCODE_ADC 10
+#define T2_OPCODE_SBC 11
+#define T2_OPCODE_SUB 13
+#define T2_OPCODE_RSB 14
#define T_OPCODE_MUL 0x4340
#define T_OPCODE_TST 0x4200
@@ -2326,7 +524,8 @@ static void do_t_setend PARAMS ((char *));;
#define T_OPCODE_ASR_R 0x4100
#define T_OPCODE_LSL_R 0x4080
-#define T_OPCODE_LSR_R 0x40c0
+#define T_OPCODE_LSR_R 0x40c0
+#define T_OPCODE_ROR_R 0x41c0
#define T_OPCODE_ASR_I 0x1000
#define T_OPCODE_LSL_I 0x0000
#define T_OPCODE_LSR_I 0x0800
@@ -2356,546 +555,865 @@ static void do_t_setend PARAMS ((char *));;
#define T_OPCODE_PUSH 0xb400
#define T_OPCODE_POP 0xbc00
-#define T_OPCODE_BRANCH 0xe7fe
-
-static int thumb_reg PARAMS ((char ** str, int hi_lo));
+#define T_OPCODE_BRANCH 0xe000
#define THUMB_SIZE 2 /* Size of thumb instruction. */
-#define THUMB_REG_LO 0x1
-#define THUMB_REG_HI 0x2
-#define THUMB_REG_ANY 0x3
+#define THUMB_PP_PC_LR 0x0100
+#define THUMB_LOAD_BIT 0x0800
+#define THUMB2_LOAD_BIT 0x00100000
+
+#define BAD_ARGS _("bad arguments to instruction")
+#define BAD_PC _("r15 not allowed here")
+#define BAD_COND _("instruction cannot be conditional")
+#define BAD_OVERLAP _("registers may not be the same")
+#define BAD_HIREG _("lo register required")
+#define BAD_THUMB32 _("instruction not supported in Thumb16 mode")
+#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")
+
+static struct hash_control *arm_ops_hsh;
+static struct hash_control *arm_cond_hsh;
+static struct hash_control *arm_shift_hsh;
+static struct hash_control *arm_psr_hsh;
+static struct hash_control *arm_v7m_psr_hsh;
+static struct hash_control *arm_reg_hsh;
+static struct hash_control *arm_reloc_hsh;
+static struct hash_control *arm_barrier_opt_hsh;
-#define THUMB_H1 0x0080
-#define THUMB_H2 0x0040
+/* Stuff needed to resolve the label ambiguity
+ As:
+ ...
+ label: <insn>
+ may differ from:
+ ...
+ label:
+ <insn>
+*/
-#define THUMB_ASR 0
-#define THUMB_LSL 1
-#define THUMB_LSR 2
+symbolS * last_label_seen;
+static int label_is_thumb_function_name = FALSE;
+
+/* Literal pool structure. Held on a per-section
+ and per-sub-section basis. */
-#define THUMB_MOVE 0
-#define THUMB_COMPARE 1
-#define THUMB_CPY 2
+#define MAX_LITERAL_POOL_SIZE 1024
+typedef struct literal_pool
+{
+ expressionS literals [MAX_LITERAL_POOL_SIZE];
+ unsigned int next_free_entry;
+ unsigned int id;
+ symbolS * symbol;
+ segT section;
+ subsegT sub_section;
+ struct literal_pool * next;
+} literal_pool;
-#define THUMB_LOAD 0
-#define THUMB_STORE 1
+/* Pointer to a linked list of literal pools. */
+literal_pool * list_of_pools = NULL;
-#define THUMB_PP_PC_LR 0x0100
+/* State variables for IT block handling. */
+static bfd_boolean current_it_mask = 0;
+static int current_cc;
-/* These three are used for immediate shifts, do not alter. */
-#define THUMB_WORD 2
-#define THUMB_HALFWORD 1
-#define THUMB_BYTE 0
+
+/* Pure syntax. */
-struct thumb_opcode
-{
- /* Basic string to match. */
- const char * template;
+/* 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[] = "@";
- /* Basic instruction code. */
- unsigned long value;
+/* This array holds the chars that only start a comment at the beginning of
+ a line. If the line seems to have the form '# 123 filename'
+ .line and .file directives will appear in the pre-processed output. */
+/* Note that input_file.c hand checks for '#' at the beginning of the
+ first line of the input file. This is because the compiler outputs
+ #NO_APP at the beginning of its output. */
+/* Also note that comments like this one will always work. */
+const char line_comment_chars[] = "#";
- int size;
+const char line_separator_chars[] = ";";
- /* Which CPU variants this exists for. */
- unsigned long variant;
+/* Chars that can be used to separate mant
+ from exp in floating point numbers. */
+const char EXP_CHARS[] = "eE";
- /* Function to call to parse args. */
- void (* parms) PARAMS ((char *));
-};
+/* Chars that mean this number is a floating point constant. */
+/* As in 0f12.456 */
+/* or 0d1.2345e12 */
-static const struct thumb_opcode tinsns[] =
-{
- /* Thumb v1 (ARMv4T). */
- {"adc", 0x4140, 2, ARM_EXT_V4T, do_t_arit},
- {"add", 0x0000, 2, ARM_EXT_V4T, do_t_add},
- {"and", 0x4000, 2, ARM_EXT_V4T, do_t_arit},
- {"asr", 0x0000, 2, ARM_EXT_V4T, do_t_asr},
- {"b", T_OPCODE_BRANCH, 2, ARM_EXT_V4T, do_t_branch12},
- {"beq", 0xd0fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bne", 0xd1fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bcs", 0xd2fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bhs", 0xd2fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bcc", 0xd3fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bul", 0xd3fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"blo", 0xd3fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bmi", 0xd4fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bpl", 0xd5fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bvs", 0xd6fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bvc", 0xd7fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bhi", 0xd8fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bls", 0xd9fe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bge", 0xdafe, 2, ARM_EXT_V4T, do_t_branch9},
- {"blt", 0xdbfe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bgt", 0xdcfe, 2, ARM_EXT_V4T, do_t_branch9},
- {"ble", 0xddfe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bal", 0xdefe, 2, ARM_EXT_V4T, do_t_branch9},
- {"bic", 0x4380, 2, ARM_EXT_V4T, do_t_arit},
- {"bl", 0xf7fffffe, 4, ARM_EXT_V4T, do_t_branch23},
- {"bx", 0x4700, 2, ARM_EXT_V4T, do_t_bx},
- {"cmn", T_OPCODE_CMN, 2, ARM_EXT_V4T, do_t_arit},
- {"cmp", 0x0000, 2, ARM_EXT_V4T, do_t_compare},
- {"eor", 0x4040, 2, ARM_EXT_V4T, do_t_arit},
- {"ldmia", 0xc800, 2, ARM_EXT_V4T, do_t_ldmstm},
- {"ldr", 0x0000, 2, ARM_EXT_V4T, do_t_ldr},
- {"ldrb", 0x0000, 2, ARM_EXT_V4T, do_t_ldrb},
- {"ldrh", 0x0000, 2, ARM_EXT_V4T, do_t_ldrh},
- {"ldrsb", 0x5600, 2, ARM_EXT_V4T, do_t_lds},
- {"ldrsh", 0x5e00, 2, ARM_EXT_V4T, do_t_lds},
- {"ldsb", 0x5600, 2, ARM_EXT_V4T, do_t_lds},
- {"ldsh", 0x5e00, 2, ARM_EXT_V4T, do_t_lds},
- {"lsl", 0x0000, 2, ARM_EXT_V4T, do_t_lsl},
- {"lsr", 0x0000, 2, ARM_EXT_V4T, do_t_lsr},
- {"mov", 0x0000, 2, ARM_EXT_V4T, do_t_mov},
- {"mul", T_OPCODE_MUL, 2, ARM_EXT_V4T, do_t_arit},
- {"mvn", T_OPCODE_MVN, 2, ARM_EXT_V4T, do_t_arit},
- {"neg", T_OPCODE_NEG, 2, ARM_EXT_V4T, do_t_arit},
- {"orr", 0x4300, 2, ARM_EXT_V4T, do_t_arit},
- {"pop", 0xbc00, 2, ARM_EXT_V4T, do_t_push_pop},
- {"push", 0xb400, 2, ARM_EXT_V4T, do_t_push_pop},
- {"ror", 0x41c0, 2, ARM_EXT_V4T, do_t_arit},
- {"sbc", 0x4180, 2, ARM_EXT_V4T, do_t_arit},
- {"stmia", 0xc000, 2, ARM_EXT_V4T, do_t_ldmstm},
- {"str", 0x0000, 2, ARM_EXT_V4T, do_t_str},
- {"strb", 0x0000, 2, ARM_EXT_V4T, do_t_strb},
- {"strh", 0x0000, 2, ARM_EXT_V4T, do_t_strh},
- {"swi", 0xdf00, 2, ARM_EXT_V4T, do_t_swi},
- {"sub", 0x0000, 2, ARM_EXT_V4T, do_t_sub},
- {"tst", T_OPCODE_TST, 2, ARM_EXT_V4T, do_t_arit},
- /* Pseudo ops: */
- {"adr", 0x0000, 2, ARM_EXT_V4T, do_t_adr},
- {"nop", 0x46C0, 2, ARM_EXT_V4T, do_t_nop}, /* mov r8,r8 */
- /* Thumb v2 (ARMv5T). */
- {"blx", 0, 0, ARM_EXT_V5T, do_t_blx},
- {"bkpt", 0xbe00, 2, ARM_EXT_V5T, do_t_bkpt},
-
- /* ARM V6. */
- {"cpsie", 0xb660, 2, ARM_EXT_V6, do_t_cps},
- {"cpsid", 0xb670, 2, ARM_EXT_V6, do_t_cps},
- {"cpy", 0x4600, 2, ARM_EXT_V6, do_t_cpy},
- {"rev", 0xba00, 2, ARM_EXT_V6, do_t_arit},
- {"rev16", 0xba40, 2, ARM_EXT_V6, do_t_arit},
- {"revsh", 0xbac0, 2, ARM_EXT_V6, do_t_arit},
- {"setend", 0xb650, 2, ARM_EXT_V6, do_t_setend},
- {"sxth", 0xb200, 2, ARM_EXT_V6, do_t_arit},
- {"sxtb", 0xb240, 2, ARM_EXT_V6, do_t_arit},
- {"uxth", 0xb280, 2, ARM_EXT_V6, do_t_arit},
- {"uxtb", 0xb2c0, 2, ARM_EXT_V6, do_t_arit},
-};
+const char FLT_CHARS[] = "rRsSfFdDxXeEpP";
-#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")
+/* Prefix characters that indicate the start of an immediate
+ value. */
+#define is_immediate_prefix(C) ((C) == '#' || (C) == '$')
-static struct hash_control * arm_ops_hsh = NULL;
-static struct hash_control * arm_tops_hsh = NULL;
-static struct hash_control * arm_cond_hsh = NULL;
-static struct hash_control * arm_shift_hsh = NULL;
-static struct hash_control * arm_psr_hsh = NULL;
+/* Separator character handling. */
-/* 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. */
+#define skip_whitespace(str) do { if (*(str) == ' ') ++(str); } while (0)
-static void s_req PARAMS ((int));
-static void s_unreq PARAMS ((int));
-static void s_align PARAMS ((int));
-static void s_bss PARAMS ((int));
-static void s_even PARAMS ((int));
-static void s_ltorg PARAMS ((int));
-static void s_arm PARAMS ((int));
-static void s_thumb PARAMS ((int));
-static void s_code PARAMS ((int));
-static void s_force_thumb PARAMS ((int));
-static void s_thumb_func PARAMS ((int));
-static void s_thumb_set PARAMS ((int));
-#ifdef OBJ_ELF
-static void s_arm_elf_cons PARAMS ((int));
-#endif
+static inline int
+skip_past_char (char ** str, char c)
+{
+ if (**str == c)
+ {
+ (*str)++;
+ return SUCCESS;
+ }
+ else
+ return FAIL;
+}
+#define skip_past_comma(str) skip_past_char (str, ',')
-static int my_get_expression PARAMS ((expressionS *, char **));
+/* Arithmetic expressions (possibly involving symbols). */
-const pseudo_typeS md_pseudo_table[] =
+/* Return TRUE if anything in the expression is a bignum. */
+
+static int
+walk_no_bignums (symbolS * sp)
{
- /* Never called because '.req' does not start a line. */
- { "req", s_req, 0 },
- { "unreq", s_unreq, 0 },
- { "bss", s_bss, 0 },
- { "align", s_align, 0 },
- { "arm", s_arm, 0 },
- { "thumb", s_thumb, 0 },
- { "code", s_code, 0 },
- { "force_thumb", s_force_thumb, 0 },
- { "thumb_func", s_thumb_func, 0 },
- { "thumb_set", s_thumb_set, 0 },
- { "even", s_even, 0 },
- { "ltorg", s_ltorg, 0 },
- { "pool", s_ltorg, 0 },
-#ifdef OBJ_ELF
- { "word", s_arm_elf_cons, 4 },
- { "long", s_arm_elf_cons, 4 },
-#else
- { "word", cons, 4},
-#endif
- { "extend", float_cons, 'x' },
- { "ldouble", float_cons, 'x' },
- { "packed", float_cons, 'p' },
- { 0, 0, 0 }
-};
+ if (symbol_get_value_expression (sp)->X_op == O_big)
+ return 1;
-/* Other internal functions. */
-static int arm_parse_extension PARAMS ((char *, int *));
-static int arm_parse_cpu PARAMS ((char *));
-static int arm_parse_arch PARAMS ((char *));
-static int arm_parse_fpu PARAMS ((char *));
-static int arm_parse_float_abi PARAMS ((char *));
-#if 0 /* Suppressed - for now. */
-#if defined OBJ_COFF || defined OBJ_ELF
-static void arm_add_note PARAMS ((const char *, const char *, unsigned int));
-#endif
+ 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 in_my_get_expression = 0;
+
+/* Third argument to my_get_expression. */
+#define GE_NO_PREFIX 0
+#define GE_IMM_PREFIX 1
+#define GE_OPT_PREFIX 2
+
+static int
+my_get_expression (expressionS * ep, char ** str, int prefix_mode)
+{
+ char * save_in;
+ segT seg;
+
+ /* In unified syntax, all prefixes are optional. */
+ if (unified_syntax)
+ prefix_mode = GE_OPT_PREFIX;
+
+ switch (prefix_mode)
+ {
+ case GE_NO_PREFIX: break;
+ case GE_IMM_PREFIX:
+ if (!is_immediate_prefix (**str))
+ {
+ inst.error = _("immediate expression requires a # prefix");
+ return FAIL;
+ }
+ (*str)++;
+ break;
+ case GE_OPT_PREFIX:
+ if (is_immediate_prefix (**str))
+ (*str)++;
+ break;
+ default: abort ();
+ }
+
+ memset (ep, 0, sizeof (expressionS));
+
+ save_in = input_line_pointer;
+ input_line_pointer = *str;
+ in_my_get_expression = 1;
+ seg = expression (ep);
+ in_my_get_expression = 0;
+
+ if (ep->X_op == O_illegal)
+ {
+ /* We found a bad expression in md_operand(). */
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ if (inst.error == NULL)
+ inst.error = _("bad expression");
+ return 1;
+ }
+
+#ifdef OBJ_AOUT
+ if (seg != absolute_section
+ && seg != text_section
+ && seg != data_section
+ && seg != bss_section
+ && seg != undefined_section)
+ {
+ inst.error = _("bad segment");
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return 1;
+ }
#endif
-/* Stuff needed to resolve the label ambiguity
- As:
- ...
- label: <insn>
- may differ from:
- ...
- label:
- <insn>
-*/
+ /* Get rid of any bignums now, so that we don't generate an error for which
+ we can't establish a line number later on. Big numbers are never valid
+ in instructions, which is where this routine is always called. */
+ if (ep->X_op == O_big
+ || (ep->X_add_symbol
+ && (walk_no_bignums (ep->X_add_symbol)
+ || (ep->X_op_symbol
+ && walk_no_bignums (ep->X_op_symbol)))))
+ {
+ inst.error = _("invalid constant");
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return 1;
+ }
-symbolS * last_label_seen;
-static int label_is_thumb_function_name = FALSE;
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return 0;
+}
-/* Literal Pool stuff. */
+/* 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.
-#define MAX_LITERAL_POOL_SIZE 1024
+ 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.
-/* Literal pool structure. Held on a per-section
- and per-sub-section basis. */
-typedef struct literal_pool
+ ??? The format of 12 byte floats is uncertain according to gcc's arm.h. */
+
+char *
+md_atof (int type, char * litP, int * sizeP)
{
- expressionS literals [MAX_LITERAL_POOL_SIZE];
- unsigned int next_free_entry;
- unsigned int id;
- symbolS * symbol;
- segT section;
- subsegT sub_section;
- struct literal_pool * next;
-} literal_pool;
+ int prec;
+ LITTLENUM_TYPE words[MAX_LITTLENUMS];
+ char *t;
+ int i;
-/* Pointer to a linked list of literal pools. */
-literal_pool * list_of_pools = NULL;
+ switch (type)
+ {
+ case 'f':
+ case 'F':
+ case 's':
+ case 'S':
+ prec = 2;
+ break;
-static literal_pool * find_literal_pool PARAMS ((void));
-static literal_pool * find_or_make_literal_pool PARAMS ((void));
+ case 'd':
+ case 'D':
+ case 'r':
+ case 'R':
+ prec = 4;
+ break;
-static literal_pool *
-find_literal_pool ()
+ case 'x':
+ case 'X':
+ prec = 6;
+ break;
+
+ case 'p':
+ case 'P':
+ prec = 6;
+ break;
+
+ default:
+ *sizeP = 0;
+ return _("bad call to MD_ATOF()");
+ }
+
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+ *sizeP = prec * 2;
+
+ if (target_big_endian)
+ {
+ for (i = 0; i < prec; i++)
+ {
+ md_number_to_chars (litP, (valueT) words[i], 2);
+ litP += 2;
+ }
+ }
+ else
+ {
+ if (ARM_CPU_HAS_FEATURE (cpu_variant, fpu_endian_pure))
+ for (i = prec - 1; i >= 0; i--)
+ {
+ md_number_to_chars (litP, (valueT) words[i], 2);
+ litP += 2;
+ }
+ else
+ /* For a 4 byte float the order of elements in `words' is 1 0.
+ For an 8 byte float the order is 1 0 3 2. */
+ for (i = 0; i < prec; i += 2)
+ {
+ md_number_to_chars (litP, (valueT) words[i + 1], 2);
+ md_number_to_chars (litP + 2, (valueT) words[i], 2);
+ litP += 4;
+ }
+ }
+
+ return 0;
+}
+
+/* We handle all bad expressions here, so that we can report the faulty
+ instruction in the error message. */
+void
+md_operand (expressionS * expr)
{
- literal_pool * pool;
+ if (in_my_get_expression)
+ expr->X_op = O_illegal;
+}
- for (pool = list_of_pools; pool != NULL; pool = pool->next)
+/* Immediate values. */
+
+/* Generic immediate-value read function for use in directives.
+ Accepts anything that 'expression' can fold to a constant.
+ *val receives the number. */
+#ifdef OBJ_ELF
+static int
+immediate_for_directive (int *val)
+{
+ expressionS exp;
+ exp.X_op = O_illegal;
+
+ if (is_immediate_prefix (*input_line_pointer))
{
- if (pool->section == now_seg
- && pool->sub_section == now_subseg)
- break;
+ input_line_pointer++;
+ expression (&exp);
}
- return pool;
+ if (exp.X_op != O_constant)
+ {
+ as_bad (_("expected #constant"));
+ ignore_rest_of_line ();
+ return FAIL;
+ }
+ *val = exp.X_add_number;
+ return SUCCESS;
}
+#endif
-static literal_pool *
-find_or_make_literal_pool ()
+/* Register parsing. */
+
+/* Generic register parser. CCP points to what should be the
+ beginning of a register name. If it is indeed a valid register
+ name, advance CCP over it and return the reg_entry structure;
+ otherwise return NULL. Does not issue diagnostics. */
+
+static struct reg_entry *
+arm_reg_parse_multi (char **ccp)
{
- /* Next literal pool ID number. */
- static unsigned int latest_pool_num = 1;
- literal_pool * pool;
+ char *start = *ccp;
+ char *p;
+ struct reg_entry *reg;
- pool = find_literal_pool ();
+#ifdef REGISTER_PREFIX
+ if (*start != REGISTER_PREFIX)
+ return NULL;
+ start++;
+#endif
+#ifdef OPTIONAL_REGISTER_PREFIX
+ if (*start == OPTIONAL_REGISTER_PREFIX)
+ start++;
+#endif
- if (pool == NULL)
+ p = start;
+ if (!ISALPHA (*p) || !is_name_beginner (*p))
+ return NULL;
+
+ do
+ p++;
+ while (ISALPHA (*p) || ISDIGIT (*p) || *p == '_');
+
+ reg = (struct reg_entry *) hash_find_n (arm_reg_hsh, start, p - start);
+
+ if (!reg)
+ return NULL;
+
+ *ccp = p;
+ 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)
+{
+ 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)
{
- /* Create a new pool. */
- pool = (literal_pool *) xmalloc (sizeof (* pool));
- if (! pool)
- return NULL;
+ case REG_TYPE_MVF:
+ case REG_TYPE_MVD:
+ case REG_TYPE_MVFX:
+ case REG_TYPE_MVDX:
+ /* Generic coprocessor register names are allowed for these. */
+ if (reg && reg->type == REG_TYPE_CN)
+ return reg->number;
+ break;
- pool->next_free_entry = 0;
- pool->section = now_seg;
- pool->sub_section = now_subseg;
- pool->next = list_of_pools;
- pool->symbol = NULL;
+ case REG_TYPE_CP:
+ /* For backward compatibility, a bare number is valid here. */
+ {
+ unsigned long processor = strtoul (start, ccp, 10);
+ if (*ccp != start && processor <= 15)
+ return processor;
+ }
- /* Add it to the list. */
- list_of_pools = pool;
+ case REG_TYPE_MMXWC:
+ /* WC includes WCG. ??? I'm not sure this is true for all
+ instructions that take WC registers. */
+ if (reg && reg->type == REG_TYPE_MMXWCG)
+ return reg->number;
+ break;
+
+ default:
+ break;
}
- /* New pools, and emptied pools, will have a NULL symbol. */
- if (pool->symbol == NULL)
+ *ccp = start;
+ return FAIL;
+}
+
+/* Parse an ARM register list. Returns the bitmask, or FAIL. */
+static long
+parse_reg_list (char ** strp)
+{
+ char * str = * strp;
+ long range = 0;
+ int another_range;
+
+ /* We come back here if we get ranges concatenated by '+' or '|'. */
+ do
{
- pool->symbol = symbol_create (FAKE_LABEL_NAME, undefined_section,
- (valueT) 0, &zero_address_frag);
- pool->id = latest_pool_num ++;
+ another_range = 0;
+
+ if (*str == '{')
+ {
+ int in_range = 0;
+ int cur_reg = -1;
+
+ str++;
+ do
+ {
+ int reg;
+
+ if ((reg = arm_reg_parse (&str, REG_TYPE_RN)) == FAIL)
+ {
+ inst.error = _(reg_expected_msgs[REG_TYPE_RN]);
+ return FAIL;
+ }
+
+ if (in_range)
+ {
+ int i;
+
+ if (reg <= cur_reg)
+ {
+ inst.error = _("bad range in register list");
+ return FAIL;
+ }
+
+ for (i = cur_reg + 1; i < reg; i++)
+ {
+ if (range & (1 << i))
+ as_tsktsk
+ (_("Warning: duplicated register (r%d) in register list"),
+ i);
+ else
+ range |= 1 << i;
+ }
+ in_range = 0;
+ }
+
+ if (range & (1 << reg))
+ as_tsktsk (_("Warning: duplicated register (r%d) in register list"),
+ reg);
+ else if (reg <= cur_reg)
+ as_tsktsk (_("Warning: register range not in ascending order"));
+
+ range |= 1 << reg;
+ cur_reg = reg;
+ }
+ while (skip_past_comma (&str) != FAIL
+ || (in_range = 1, *str++ == '-'));
+ str--;
+
+ if (*str++ != '}')
+ {
+ inst.error = _("missing `}'");
+ return FAIL;
+ }
+ }
+ else
+ {
+ expressionS expr;
+
+ if (my_get_expression (&expr, &str, GE_NO_PREFIX))
+ return FAIL;
+
+ if (expr.X_op == O_constant)
+ {
+ if (expr.X_add_number
+ != (expr.X_add_number & 0x0000ffff))
+ {
+ inst.error = _("invalid register mask");
+ return FAIL;
+ }
+
+ if ((range & expr.X_add_number) != 0)
+ {
+ int regno = range & expr.X_add_number;
+
+ regno &= -regno;
+ regno = (1 << regno) - 1;
+ as_tsktsk
+ (_("Warning: duplicated register (r%d) in register list"),
+ regno);
+ }
+
+ range |= expr.X_add_number;
+ }
+ else
+ {
+ if (inst.reloc.type != 0)
+ {
+ inst.error = _("expression too complex");
+ return FAIL;
+ }
+
+ memcpy (&inst.reloc.exp, &expr, sizeof (expressionS));
+ inst.reloc.type = BFD_RELOC_ARM_MULTI;
+ inst.reloc.pc_rel = 0;
+ }
+ }
+
+ if (*str == '|' || *str == '+')
+ {
+ str++;
+ another_range = 1;
+ }
}
+ while (another_range);
- /* Done. */
- return pool;
+ *strp = str;
+ return range;
}
-/* Add the literal in the global 'inst'
- structure to the relevent literal pool. */
+/* 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. */
+
static int
-add_to_lit_pool ()
+parse_vfp_reg_list (char **str, unsigned int *pbase, int dp)
{
- literal_pool * pool;
- unsigned int entry;
+ int base_reg;
+ int new_base;
+ int regtype;
+ int max_regs;
+ int count = 0;
+ int warned = 0;
+ unsigned long mask = 0;
+ int i;
- pool = find_or_make_literal_pool ();
+ if (**str != '{')
+ return FAIL;
- /* Check if this literal value is already in the pool. */
- for (entry = 0; entry < pool->next_free_entry; entry ++)
- {
- if ((pool->literals[entry].X_op == inst.reloc.exp.X_op)
- && (inst.reloc.exp.X_op == O_constant)
- && (pool->literals[entry].X_add_number
- == inst.reloc.exp.X_add_number)
- && (pool->literals[entry].X_unsigned
- == inst.reloc.exp.X_unsigned))
- break;
+ (*str)++;
- if ((pool->literals[entry].X_op == inst.reloc.exp.X_op)
- && (inst.reloc.exp.X_op == O_symbol)
- && (pool->literals[entry].X_add_number
- == inst.reloc.exp.X_add_number)
- && (pool->literals[entry].X_add_symbol
- == inst.reloc.exp.X_add_symbol)
- && (pool->literals[entry].X_op_symbol
- == inst.reloc.exp.X_op_symbol))
- break;
+ if (dp)
+ {
+ regtype = REG_TYPE_VFD;
+ max_regs = 16;
+ }
+ else
+ {
+ regtype = REG_TYPE_VFS;
+ max_regs = 32;
}
- /* Do we need to create a new entry? */
- if (entry == pool->next_free_entry)
+ base_reg = max_regs;
+
+ do
{
- if (entry >= MAX_LITERAL_POOL_SIZE)
+ new_base = arm_reg_parse (str, regtype);
+ if (new_base == FAIL)
{
- inst.error = _("literal pool overflow");
+ inst.error = gettext (reg_expected_msgs[regtype]);
return FAIL;
}
- pool->literals[entry] = inst.reloc.exp;
- pool->next_free_entry += 1;
+ if (new_base < base_reg)
+ base_reg = new_base;
+
+ if (mask & (1 << new_base))
+ {
+ inst.error = _("invalid register list");
+ return FAIL;
+ }
+
+ if ((mask >> new_base) != 0 && ! warned)
+ {
+ as_tsktsk (_("register list not in ascending order"));
+ warned = 1;
+ }
+
+ mask |= 1 << new_base;
+ count++;
+
+ if (**str == '-') /* We have the start of a range expression */
+ {
+ int high_range;
+
+ (*str)++;
+
+ if ((high_range = arm_reg_parse (str, regtype)) == FAIL)
+ {
+ inst.error = gettext (reg_expected_msgs[regtype]);
+ return FAIL;
+ }
+
+ if (high_range <= new_base)
+ {
+ inst.error = _("register range not in ascending order");
+ return FAIL;
+ }
+
+ for (new_base++; new_base <= high_range; new_base++)
+ {
+ if (mask & (1 << new_base))
+ {
+ inst.error = _("invalid register list");
+ return FAIL;
+ }
+
+ mask |= 1 << new_base;
+ count++;
+ }
+ }
}
+ while (skip_past_comma (str) != FAIL);
- inst.reloc.exp.X_op = O_symbol;
- inst.reloc.exp.X_add_number = ((int) entry) * 4 - 8;
- inst.reloc.exp.X_add_symbol = pool->symbol;
+ (*str)++;
- return SUCCESS;
+ /* Sanity check -- should have raised a parse error above. */
+ if (count == 0 || count > max_regs)
+ abort ();
+
+ *pbase = base_reg;
+
+ /* Final test -- the registers must be consecutive. */
+ mask >>= base_reg;
+ for (i = 0; i < count; i++)
+ {
+ if ((mask & (1u << i)) == 0)
+ {
+ inst.error = _("non-contiguous register range");
+ return FAIL;
+ }
+ }
+
+ return count;
}
-/* Can't use symbol_new here, so have to create a symbol and then at
- a later date assign it a value. Thats what these functions do. */
+/* 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
+ succeed if there is no () after the word. Returns -1 on error,
+ BFD_RELOC_UNUSED if there wasn't any suffix. */
+static int
+parse_reloc (char **str)
+{
+ struct reloc_entry *r;
+ char *p, *q;
+
+ if (**str != '(')
+ return BFD_RELOC_UNUSED;
+
+ p = *str + 1;
+ q = p;
+
+ while (*q && *q != ')' && *q != ',')
+ q++;
+ if (*q != ')')
+ return -1;
+
+ if ((r = hash_find_n (arm_reloc_hsh, p, q - p)) == NULL)
+ return -1;
+
+ *str = q + 1;
+ return r->reloc;
+}
+
+/* Directives: register aliases. */
static void
-symbol_locate (symbolP, name, segment, valu, frag)
- symbolS * symbolP;
- const char * name; /* It is copied, the caller can modify. */
- segT segment; /* Segment identifier (SEG_<something>). */
- valueT valu; /* Symbol value. */
- fragS * frag; /* Associated fragment. */
+insert_reg_alias (char *str, int number, int type)
{
- unsigned int name_length;
- char * preserved_copy_of_name;
+ struct reg_entry *new;
+ const char *name;
- name_length = strlen (name) + 1; /* +1 for \0. */
- obstack_grow (&notes, name, name_length);
- preserved_copy_of_name = obstack_finish (&notes);
-#ifdef STRIP_UNDERSCORE
- if (preserved_copy_of_name[0] == '_')
- preserved_copy_of_name++;
-#endif
+ if ((new = hash_find (arm_reg_hsh, str)) != 0)
+ {
+ if (new->builtin)
+ as_warn (_("ignoring attempt to redefine built-in register '%s'"), str);
-#ifdef tc_canonicalize_symbol_name
- preserved_copy_of_name =
- tc_canonicalize_symbol_name (preserved_copy_of_name);
-#endif
+ /* Only warn about a redefinition if it's not defined as the
+ same register. */
+ else if (new->number != number || new->type != type)
+ as_warn (_("ignoring redefinition of register alias '%s'"), str);
- S_SET_NAME (symbolP, preserved_copy_of_name);
+ return;
+ }
- S_SET_SEGMENT (symbolP, segment);
- S_SET_VALUE (symbolP, valu);
- symbol_clear_list_pointers (symbolP);
+ name = xstrdup (str);
+ new = xmalloc (sizeof (struct reg_entry));
- symbol_set_frag (symbolP, frag);
+ new->name = name;
+ new->number = number;
+ new->type = type;
+ new->builtin = FALSE;
- /* Link to end of symbol chain. */
- {
- extern int symbol_table_frozen;
- if (symbol_table_frozen)
- abort ();
- }
+ if (hash_insert (arm_reg_hsh, name, (PTR) new))
+ abort ();
+}
- symbol_append (symbolP, symbol_lastP, & symbol_rootP, & symbol_lastP);
+/* Look for the .req directive. This is of the form:
- obj_symbol_new_hook (symbolP);
+ new_register_name .req existing_register_name
-#ifdef tc_symbol_new_hook
- tc_symbol_new_hook (symbolP);
+ If we find one, or if it looks sufficiently like one that we want to
+ handle any error here, return non-zero. Otherwise return zero. */
+
+static int
+create_register_alias (char * newname, char *p)
+{
+ struct reg_entry *old;
+ char *oldname, *nbuf;
+ size_t nlen;
+
+ /* The input scrubber ensures that whitespace after the mnemonic is
+ collapsed to single spaces. */
+ oldname = p;
+ if (strncmp (oldname, " .req ", 6) != 0)
+ return 0;
+
+ oldname += 6;
+ if (*oldname == '\0')
+ return 0;
+
+ old = hash_find (arm_reg_hsh, oldname);
+ if (!old)
+ {
+ as_warn (_("unknown register '%s' -- .req ignored"), oldname);
+ return 1;
+ }
+
+ /* If TC_CASE_SENSITIVE is defined, then newname already points to
+ the desired alias name, and p points to its end. If not, then
+ the desired alias name is in the global original_case_string. */
+#ifdef TC_CASE_SENSITIVE
+ nlen = p - newname;
+#else
+ newname = original_case_string;
+ nlen = strlen (newname);
#endif
-#ifdef DEBUG_SYMS
- verify_symbol_chain (symbol_rootP, symbol_lastP);
-#endif /* DEBUG_SYMS */
-}
+ nbuf = alloca (nlen + 1);
+ memcpy (nbuf, newname, nlen);
+ nbuf[nlen] = '\0';
-/* Check that an immediate is valid.
- If so, convert it to the right format. */
+ /* Create aliases under the new name as stated; an all-lowercase
+ version of the new name; and an all-uppercase version of the new
+ name. */
+ insert_reg_alias (nbuf, old->number, old->type);
-static unsigned int
-validate_immediate (val)
- unsigned int val;
-{
- unsigned int a;
- unsigned int i;
+ for (p = nbuf; *p; p++)
+ *p = TOUPPER (*p);
-#define rotate_left(v, n) (v << n | v >> (32 - n))
+ if (strncmp (nbuf, newname, nlen))
+ insert_reg_alias (nbuf, old->number, old->type);
- for (i = 0; i < 32; i += 2)
- if ((a = rotate_left (val, i)) <= 0xff)
- return a | (i << 7); /* 12-bit pack: [shift-cnt,const]. */
+ for (p = nbuf; *p; p++)
+ *p = TOLOWER (*p);
- return FAIL;
+ if (strncmp (nbuf, newname, nlen))
+ insert_reg_alias (nbuf, old->number, old->type);
+
+ 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
+s_req (int a ATTRIBUTE_UNUSED)
+{
+ as_bad (_("invalid syntax for .req directive"));
}
-/* Check to see if an immediate can be computed as two separate immediate
- values, added together. We already know that this value cannot be
- computed by just one ARM instruction. */
+/* The .unreq directive deletes an alias which was previously defined
+ by .req. For example:
-static unsigned int
-validate_immediate_twopart (val, highpart)
- unsigned int val;
- unsigned int * highpart;
+ my_alias .req r11
+ .unreq my_alias */
+
+static void
+s_unreq (int a ATTRIBUTE_UNUSED)
{
- unsigned int a;
- unsigned int i;
+ char * name;
+ char saved_char;
- for (i = 0; i < 32; i += 2)
- if (((a = rotate_left (val, i)) & 0xff) != 0)
- {
- if (a & 0xff00)
- {
- if (a & ~ 0xffff)
- continue;
- * highpart = (a >> 8) | ((i + 24) << 7);
- }
- else if (a & 0xff0000)
- {
- if (a & 0xff000000)
- continue;
- * highpart = (a >> 16) | ((i + 16) << 7);
- }
- else
- {
- assert (a & 0xff000000);
- * highpart = (a >> 24) | ((i + 8) << 7);
- }
+ name = input_line_pointer;
- return (a & 0xff) | (i << 7);
- }
+ while (*input_line_pointer != 0
+ && *input_line_pointer != ' '
+ && *input_line_pointer != '\n')
+ ++input_line_pointer;
- return FAIL;
-}
+ saved_char = *input_line_pointer;
+ *input_line_pointer = 0;
-static int
-validate_offset_imm (val, hwse)
- unsigned int val;
- int hwse;
-{
- if ((hwse && val > 255) || val > 4095)
- return FAIL;
- return val;
+ if (!*name)
+ as_bad (_("invalid syntax for .unreq directive"));
+ else
+ {
+ struct reg_entry *reg = hash_find (arm_reg_hsh, name);
+
+ if (!reg)
+ as_bad (_("unknown register alias '%s'"), name);
+ else if (reg->builtin)
+ as_warn (_("ignoring attempt to undefine built-in register '%s'"),
+ name);
+ else
+ {
+ hash_delete (arm_reg_hsh, name);
+ free ((char *) reg->name);
+ free (reg);
+ }
+ }
+
+ *input_line_pointer = saved_char;
+ demand_empty_rest_of_line ();
}
-
+/* Directives: Instruction set selection. */
+
#ifdef OBJ_ELF
/* This code is to handle mapping symbols as defined in the ARM ELF spec.
- (This text is taken from version B-02 of the spec):
-
- 4.4.7 Mapping and tagging symbols
-
- A section of an ARM ELF file can contain a mixture of ARM code,
- Thumb code, and data. There are inline transitions between code
- and data at literal pool boundaries. There can also be inline
- transitions between ARM code and Thumb code, for example in
- ARM-Thumb inter-working veneers. Linkers, machine-level
- debuggers, profiling tools, and disassembly tools need to map
- images accurately. For example, setting an ARM breakpoint on a
- Thumb location, or in a literal pool, can crash the program
- being debugged, ruining the debugging session.
-
- ARM ELF entities are mapped (see section 4.4.7.1 below) and
- tagged (see section 4.4.7.2 below) using local symbols (with
- binding STB_LOCAL). To assist consumers, mapping and tagging
- symbols should be collated first in the symbol table, before
- other symbols with binding STB_LOCAL.
-
- To allow properly collated mapping and tagging symbols to be
- skipped by consumers that have no interest in them, the first
- such symbol should have the name $m and its st_value field equal
- to the total number of mapping and tagging symbols (including
- the $m) in the symbol table.
-
- 4.4.7.1 Mapping symbols
-
- $a Labels the first byte of a sequence of ARM instructions.
- Its type is STT_FUNC.
-
- $d Labels the first byte of a sequence of data items.
- Its type is STT_OBJECT.
-
- $t Labels the first byte of a sequence of Thumb instructions.
- Its type is STT_FUNC.
-
- This list of mapping symbols may be extended in the future.
-
- Section-relative mapping symbols
-
- Mapping symbols defined in a section define a sequence of
- half-open address intervals that cover the address range of the
- section. Each interval starts at the address defined by a
- mapping symbol, and continues up to, but not including, the
- address defined by the next (in address order) mapping symbol or
- the end of the section. A corollary is that there must be a
- mapping symbol defined at the beginning of each section.
- Consumers can ignore the size of a section-relative mapping
- symbol. Producers can set it to 0.
-
- Absolute mapping symbols
-
- Because of the need to crystallize a Thumb address with the
- Thumb-bit set, absolute symbol of type STT_FUNC (symbols of type
- STT_FUNC defined in section SHN_ABS) need to be mapped with $a
- or $t.
-
- The extent of a mapping symbol defined in SHN_ABS is [st_value,
- st_value + st_size), or [st_value, st_value + 1) if st_size = 0,
- where [x, y) denotes the half-open address range from x,
- inclusive, to y, exclusive.
-
- In the absence of a mapping symbol, a consumer can interpret a
- function symbol with an odd value as the Thumb code address
- obtained by clearing the least significant bit of the
- value. This interpretation is deprecated, and it may not work in
- the future.
-
- Note - the Tagging symbols ($b, $f, $p $m) have been dropped from
- the EABI (which is still under development), so they are not
- implemented here. */
+ (See "Mapping symbols", section 4.5.5, ARM AAELF version 1.0).
+ Note that previously, $a and $t has type STT_FUNC (BSF_OBJECT flag),
+ and $d has type STT_OBJECT (BSF_OBJECT flag). Now all three are untyped. */
static enum mstate mapstate = MAP_UNDEFINED;
@@ -2917,28 +1435,28 @@ mapping_state (enum mstate state)
{
case MAP_DATA:
symname = "$d";
- type = BSF_OBJECT;
+ type = BSF_NO_FLAGS;
break;
case MAP_ARM:
symname = "$a";
- type = BSF_FUNCTION;
+ type = BSF_NO_FLAGS;
break;
case MAP_THUMB:
symname = "$t";
- type = BSF_FUNCTION;
+ type = BSF_NO_FLAGS;
break;
case MAP_UNDEFINED:
- return;
+ return;
default:
abort ();
}
- seg_info (now_seg)->tc_segment_info_data = state;
+ seg_info (now_seg)->tc_segment_info_data.mapstate = state;
symbolP = symbol_new (symname, now_seg, (valueT) frag_now_fix (), frag_now);
symbol_table_insert (symbolP);
symbol_get_bfdsym (symbolP)->flags |= type | BSF_LOCAL;
-
+
switch (state)
{
case MAP_ARM:
@@ -2946,239 +1464,140 @@ mapping_state (enum mstate state)
ARM_SET_THUMB (symbolP, 0);
ARM_SET_INTERWORK (symbolP, support_interwork);
break;
-
+
case MAP_THUMB:
THUMB_SET_FUNC (symbolP, 1);
ARM_SET_THUMB (symbolP, 1);
ARM_SET_INTERWORK (symbolP, support_interwork);
break;
-
+
case MAP_DATA:
default:
return;
}
}
+#else
+#define mapping_state(x) /* nothing */
+#endif
-/* When we change sections we need to issue a new mapping symbol. */
+/* Find the real, Thumb encoded start of a Thumb function. */
-void
-arm_elf_change_section (void)
+static symbolS *
+find_real_start (symbolS * symbolP)
{
- flagword flags;
-
- if (!SEG_NORMAL (now_seg))
- return;
+ char * real_start;
+ const char * name = S_GET_NAME (symbolP);
+ symbolS * new_target;
- flags = bfd_get_section_flags (stdoutput, now_seg);
+ /* This definition must agree with the one in gcc/config/arm/thumb.c. */
+#define STUB_NAME ".real_start_of"
- /* We can ignore sections that only contain debug info. */
- if ((flags & SEC_ALLOC) == 0)
- return;
+ if (name == NULL)
+ abort ();
- mapstate = seg_info (now_seg)->tc_segment_info_data;
-}
-#else
-#define mapping_state(a)
-#endif /* OBJ_ELF */
-
+ /* The compiler may generate BL instructions to local labels because
+ it needs to perform a branch to a far away location. These labels
+ do not have a corresponding ".real_start_of" label. We check
+ both for S_IS_LOCAL and for a leading dot, to give a way to bypass
+ the ".real_start_of" convention for nonlocal branches. */
+ if (S_IS_LOCAL (symbolP) || name[0] == '.')
+ return symbolP;
-static void
-s_req (a)
- int a ATTRIBUTE_UNUSED;
-{
- as_bad (_("invalid syntax for .req directive"));
-}
+ real_start = ACONCAT ((STUB_NAME, name, NULL));
+ new_target = symbol_find (real_start);
-/* The .unreq directive deletes an alias which was previously defined
- by .req. For example:
+ if (new_target == NULL)
+ {
+ as_warn ("Failed to find real start of function: %s\n", name);
+ new_target = symbolP;
+ }
- my_alias .req r11
- .unreq my_alias */
+ return new_target;
+}
static void
-s_unreq (int a ATTRIBUTE_UNUSED)
+opcode_select (int width)
{
- char *name;
- char saved_char;
-
- skip_whitespace (input_line_pointer);
- name = input_line_pointer;
+ switch (width)
+ {
+ case 16:
+ if (! thumb_mode)
+ {
+ if (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v4t))
+ as_bad (_("selected processor does not support THUMB opcodes"));
- while (*input_line_pointer != 0
- && *input_line_pointer != ' '
- && *input_line_pointer != '\n')
- ++input_line_pointer;
+ thumb_mode = 1;
+ /* No need to force the alignment, since we will have been
+ coming from ARM mode, which is word-aligned. */
+ record_alignment (now_seg, 1);
+ }
+ mapping_state (MAP_THUMB);
+ break;
- saved_char = *input_line_pointer;
- *input_line_pointer = 0;
+ case 32:
+ if (thumb_mode)
+ {
+ if (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v1))
+ as_bad (_("selected processor does not support ARM opcodes"));
- if (*name)
- {
- enum arm_reg_type req_type = arm_reg_parse_any (name);
+ thumb_mode = 0;
- if (req_type != REG_TYPE_MAX)
- {
- char *temp_name = name;
- int req_no = arm_reg_parse (&temp_name, all_reg_maps[req_type].htab);
+ if (!need_pass_2)
+ frag_align (2, 0, 0);
- if (req_no != FAIL)
- {
- struct reg_entry *req_entry;
-
- /* Check to see if this alias is a builtin one. */
- req_entry = hash_delete (all_reg_maps[req_type].htab, name);
-
- if (!req_entry)
- as_bad (_("unreq: missing hash entry for \"%s\""), name);
- else if (req_entry->builtin)
- /* FIXME: We are deleting a built in register alias which
- points to a const data structure, so we only need to
- free up the memory used by the key in the hash table.
- Unfortunately we have not recorded this value, so this
- is a memory leak. */
- /* FIXME: Should we issue a warning message ? */
- ;
- else
- {
- /* Deleting a user defined alias. We need to free the
- key and the value, but fortunately the key is the same
- as the value->name field. */
- free ((char *) req_entry->name);
- free (req_entry);
- }
- }
- else
- as_bad (_(".unreq: unrecognized symbol \"%s\""), name);
+ record_alignment (now_seg, 1);
}
- else
- as_bad (_(".unreq: unrecognized symbol \"%s\""), name);
- }
- else
- as_bad (_("invalid syntax for .unreq directive"));
+ mapping_state (MAP_ARM);
+ break;
- *input_line_pointer = saved_char;
- demand_empty_rest_of_line ();
+ default:
+ as_bad (_("invalid instruction size selected (%d)"), width);
+ }
}
static void
-s_bss (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_arm (int ignore ATTRIBUTE_UNUSED)
{
- /* We don't support putting frags in the BSS segment, we fake it by
- marking in_bss, then looking at s_skip for clues. */
- subseg_set (bss_section, 0);
+ opcode_select (32);
demand_empty_rest_of_line ();
- mapping_state (MAP_DATA);
}
static void
-s_even (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_thumb (int ignore ATTRIBUTE_UNUSED)
{
- /* Never make frag if expect extra pass. */
- if (!need_pass_2)
- frag_align (1, 0, 0);
-
- record_alignment (now_seg, 1);
-
+ opcode_select (16);
demand_empty_rest_of_line ();
}
static void
-s_ltorg (ignored)
- int ignored ATTRIBUTE_UNUSED;
+s_code (int unused ATTRIBUTE_UNUSED)
{
- unsigned int entry;
- literal_pool * pool;
- char sym_name[20];
-
- pool = find_literal_pool ();
- if (pool == NULL
- || pool->symbol == NULL
- || pool->next_free_entry == 0)
- return;
-
- mapping_state (MAP_DATA);
-
- /* Align pool as you have word accesses.
- Only make a frag if we have to. */
- if (!need_pass_2)
- frag_align (2, 0, 0);
-
- record_alignment (now_seg, 2);
-
- sprintf (sym_name, "$$lit_\002%x", pool->id);
-
- symbol_locate (pool->symbol, sym_name, now_seg,
- (valueT) frag_now_fix (), frag_now);
- symbol_table_insert (pool->symbol);
-
- ARM_SET_THUMB (pool->symbol, thumb_mode);
-
-#if defined OBJ_COFF || defined OBJ_ELF
- ARM_SET_INTERWORK (pool->symbol, support_interwork);
-#endif
-
- for (entry = 0; entry < pool->next_free_entry; entry ++)
- /* First output the expression in the instruction to the pool. */
- emit_expr (&(pool->literals[entry]), 4); /* .word */
-
- /* Mark the pool as empty. */
- pool->next_free_entry = 0;
- pool->symbol = NULL;
-}
-
-/* Same as s_align_ptwo but align 0 => align 2. */
-
-static void
-s_align (unused)
- int unused ATTRIBUTE_UNUSED;
-{
- register int temp;
- register long temp_fill;
- long max_alignment = 15;
+ int temp;
temp = get_absolute_expression ();
- if (temp > max_alignment)
- as_bad (_("alignment too large: %d assumed"), temp = max_alignment);
- else if (temp < 0)
+ switch (temp)
{
- as_bad (_("alignment negative. 0 assumed."));
- temp = 0;
- }
+ case 16:
+ case 32:
+ opcode_select (temp);
+ break;
- if (*input_line_pointer == ',')
- {
- input_line_pointer++;
- temp_fill = get_absolute_expression ();
+ default:
+ as_bad (_("invalid operand to .code directive (%d) (expecting 16 or 32)"), temp);
}
- else
- temp_fill = 0;
-
- if (!temp)
- temp = 2;
-
- /* Only make a frag if we HAVE to. */
- if (temp && !need_pass_2)
- frag_align (temp, (int) temp_fill, 0);
- demand_empty_rest_of_line ();
-
- record_alignment (now_seg, temp);
}
static void
-s_force_thumb (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_force_thumb (int ignore ATTRIBUTE_UNUSED)
{
/* If we are not already in thumb mode go into it, EVEN if
the target processor does not support thumb instructions.
This is used by gcc/config/arm/lib1funcs.asm for example
to compile interworking support functions even if the
- target processor should not support interworking. */
+ target processor should not support interworking. */
if (! thumb_mode)
{
thumb_mode = 2;
-
record_alignment (now_seg, 1);
}
@@ -3186,44 +1605,37 @@ s_force_thumb (ignore)
}
static void
-s_thumb_func (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_thumb_func (int ignore ATTRIBUTE_UNUSED)
{
- if (! thumb_mode)
- opcode_select (16);
+ s_thumb (0);
/* The following label is the name/address of the start of a Thumb function.
- We need to know this for the interworking support. */
+ We need to know this for the interworking support. */
label_is_thumb_function_name = TRUE;
-
- demand_empty_rest_of_line ();
}
/* Perform a .set directive, but also mark the alias as
being a thumb function. */
static void
-s_thumb_set (equiv)
- int equiv;
+s_thumb_set (int equiv)
{
/* XXX the following is a duplicate of the code for s_set() in read.c
We cannot just call that code as we need to get at the symbol that
is created. */
- register char * name;
- register char delim;
- register char * end_name;
- register symbolS * symbolP;
+ char * name;
+ char delim;
+ char * end_name;
+ symbolS * symbolP;
/* Especial apologies for the random logic:
This just grew, and could be parsed much more simply!
Dean - in haste. */
- name = input_line_pointer;
- delim = get_symbol_end ();
+ name = input_line_pointer;
+ delim = get_symbol_end ();
end_name = input_line_pointer;
*end_name = delim;
- SKIP_WHITESPACE ();
-
if (*input_line_pointer != ',')
{
*end_name = 0;
@@ -3248,11 +1660,11 @@ s_thumb_set (equiv)
#ifndef NO_LISTING
/* When doing symbol listings, play games with dummy fragments living
outside the normal fragment chain to record the file and line info
- for this symbol. */
+ for this symbol. */
if (listing & LISTING_SYMBOLS)
{
extern struct list_info_struct * listing_tail;
- fragS * dummy_frag = (fragS *) xmalloc (sizeof (fragS));
+ fragS * dummy_frag = xmalloc (sizeof (fragS));
memset (dummy_frag, 0, sizeof (fragS));
dummy_frag->fr_type = rs_fill;
@@ -3283,7 +1695,7 @@ s_thumb_set (equiv)
demand_empty_rest_of_line ();
- /* XXX Now we come to the Thumb specific bit of code. */
+ /* XXX Now we come to the Thumb specific bit of code. */
THUMB_SET_FUNC (symbolP, 1);
ARM_SET_THUMB (symbolP, 1);
@@ -3292,3374 +1704,3250 @@ s_thumb_set (equiv)
#endif
}
+/* Directives: Mode selection. */
+
+/* .syntax [unified|divided] - choose the new unified syntax
+ (same for Arm and Thumb encoding, modulo slight differences in what
+ can be represented) or the old divergent syntax for each mode. */
static void
-opcode_select (width)
- int width;
+s_syntax (int unused ATTRIBUTE_UNUSED)
{
- switch (width)
- {
- case 16:
- if (! thumb_mode)
- {
- if (! (cpu_variant & ARM_EXT_V4T))
- as_bad (_("selected processor does not support THUMB opcodes"));
-
- thumb_mode = 1;
- /* No need to force the alignment, since we will have been
- coming from ARM mode, which is word-aligned. */
- record_alignment (now_seg, 1);
- }
- mapping_state (MAP_THUMB);
- break;
-
- case 32:
- if (thumb_mode)
- {
- if ((cpu_variant & ARM_ALL) == ARM_EXT_V4T)
- as_bad (_("selected processor does not support ARM opcodes"));
-
- thumb_mode = 0;
-
- if (!need_pass_2)
- frag_align (2, 0, 0);
+ char *name, delim;
- record_alignment (now_seg, 1);
- }
- mapping_state (MAP_ARM);
- break;
+ name = input_line_pointer;
+ delim = get_symbol_end ();
- default:
- as_bad (_("invalid instruction size selected (%d)"), width);
+ if (!strcasecmp (name, "unified"))
+ unified_syntax = TRUE;
+ else if (!strcasecmp (name, "divided"))
+ unified_syntax = FALSE;
+ else
+ {
+ as_bad (_("unrecognized syntax mode \"%s\""), name);
+ return;
}
-}
-
-static void
-s_arm (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- opcode_select (32);
+ *input_line_pointer = delim;
demand_empty_rest_of_line ();
}
-static void
-s_thumb (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- opcode_select (16);
- demand_empty_rest_of_line ();
-}
+/* Directives: sectioning and alignment. */
+
+/* Same as s_align_ptwo but align 0 => align 2. */
static void
-s_code (unused)
- int unused ATTRIBUTE_UNUSED;
+s_align (int unused ATTRIBUTE_UNUSED)
{
- register int temp;
+ int temp;
+ long temp_fill;
+ long max_alignment = 15;
temp = get_absolute_expression ();
- switch (temp)
+ if (temp > max_alignment)
+ as_bad (_("alignment too large: %d assumed"), temp = max_alignment);
+ else if (temp < 0)
{
- case 16:
- case 32:
- opcode_select (temp);
- break;
+ as_bad (_("alignment negative. 0 assumed."));
+ temp = 0;
+ }
- default:
- as_bad (_("invalid operand to .code directive (%d) (expecting 16 or 32)"), temp);
+ if (*input_line_pointer == ',')
+ {
+ input_line_pointer++;
+ temp_fill = get_absolute_expression ();
}
+ else
+ temp_fill = 0;
+
+ if (!temp)
+ temp = 2;
+
+ /* Only make a frag if we HAVE to. */
+ if (temp && !need_pass_2)
+ frag_align (temp, (int) temp_fill, 0);
+ demand_empty_rest_of_line ();
+
+ record_alignment (now_seg, temp);
}
static void
-end_of_line (str)
- char *str;
+s_bss (int ignore ATTRIBUTE_UNUSED)
{
- skip_whitespace (str);
-
- if (*str != '\0' && !inst.error)
- inst.error = _("garbage following instruction");
+ /* We don't support putting frags in the BSS segment, we fake it by
+ marking in_bss, then looking at s_skip for clues. */
+ subseg_set (bss_section, 0);
+ demand_empty_rest_of_line ();
+ mapping_state (MAP_DATA);
}
-static int
-skip_past_comma (str)
- char ** str;
+static void
+s_even (int ignore ATTRIBUTE_UNUSED)
{
- char * p = * str, c;
- int comma = 0;
-
- while ((c = *p) == ' ' || c == ',')
- {
- p++;
- if (c == ',' && comma++)
- return FAIL;
- }
+ /* Never make frag if expect extra pass. */
+ if (!need_pass_2)
+ frag_align (1, 0, 0);
- if (c == '\0')
- return FAIL;
+ record_alignment (now_seg, 1);
- *str = p;
- return comma ? SUCCESS : FAIL;
+ demand_empty_rest_of_line ();
}
-/* A standard register must be given at this point.
- SHIFT is the place to put it in inst.instruction.
- Restores input start point on error.
- Returns the reg#, or FAIL. */
+/* Directives: Literal pools. */
-static int
-reg_required_here (str, shift)
- char ** str;
- int shift;
+static literal_pool *
+find_literal_pool (void)
{
- static char buff [128]; /* XXX */
- int reg;
- char * start = * str;
+ literal_pool * pool;
- if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_RN].htab)) != FAIL)
+ for (pool = list_of_pools; pool != NULL; pool = pool->next)
{
- if (shift >= 0)
- inst.instruction |= reg << shift;
- return reg;
+ if (pool->section == now_seg
+ && pool->sub_section == now_subseg)
+ break;
}
- /* Restore the start point, we may have got a reg of the wrong class. */
- *str = start;
-
- /* In the few cases where we might be able to accept something else
- this error can be overridden. */
- sprintf (buff, _("register expected, not '%.100s'"), start);
- inst.error = buff;
-
- return FAIL;
-}
-
-/* A Intel Wireless MMX technology register
- must be given at this point.
- Shift is the place to put it in inst.instruction.
- Restores input start point on err.
- Returns the reg#, or FAIL. */
-
-static int
-wreg_required_here (str, shift, reg_type)
- char ** str;
- int shift;
- enum wreg_type reg_type;
-{
- static char buff [128];
- int reg;
- char * start = *str;
-
- if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_IWMMXT].htab)) != FAIL)
- {
- if (wr_register (reg)
- && (reg_type == IWMMXT_REG_WR || reg_type == IWMMXT_REG_WR_OR_WC))
- {
- if (shift >= 0)
- inst.instruction |= (reg ^ WR_PREFIX) << shift;
- return reg;
- }
- else if (wc_register (reg)
- && (reg_type == IWMMXT_REG_WC || reg_type == IWMMXT_REG_WR_OR_WC))
- {
- if (shift >= 0)
- inst.instruction |= (reg ^ WC_PREFIX) << shift;
- return reg;
- }
- else if ((wcg_register (reg) && reg_type == IWMMXT_REG_WCG))
- {
- if (shift >= 0)
- inst.instruction |= ((reg ^ WC_PREFIX) - 8) << shift;
- return reg;
- }
- }
-
- /* Restore the start point, we may have got a reg of the wrong class. */
- *str = start;
-
- /* In the few cases where we might be able to accept
- something else this error can be overridden. */
- sprintf (buff, _("Intel Wireless MMX technology register expected, not '%.100s'"), start);
- inst.error = buff;
-
- return FAIL;
+ return pool;
}
-static const struct asm_psr *
-arm_psr_parse (ccp)
- register char ** ccp;
+static literal_pool *
+find_or_make_literal_pool (void)
{
- char * start = * ccp;
- char c;
- char * p;
- const struct asm_psr * psr;
+ /* Next literal pool ID number. */
+ static unsigned int latest_pool_num = 1;
+ literal_pool * pool;
- p = start;
+ pool = find_literal_pool ();
- /* Skip to the end of the next word in the input stream. */
- do
+ if (pool == NULL)
{
- c = *p++;
- }
- while (ISALPHA (c) || c == '_');
-
- /* Terminate the word. */
- *--p = 0;
-
- /* CPSR's and SPSR's can now be lowercase. This is just a convenience
- feature for ease of use and backwards compatibility. */
- if (!strncmp (start, "cpsr", 4))
- strncpy (start, "CPSR", 4);
- else if (!strncmp (start, "spsr", 4))
- strncpy (start, "SPSR", 4);
+ /* Create a new pool. */
+ pool = xmalloc (sizeof (* pool));
+ if (! pool)
+ return NULL;
- /* Now locate the word in the psr hash table. */
- psr = (const struct asm_psr *) hash_find (arm_psr_hsh, start);
+ pool->next_free_entry = 0;
+ pool->section = now_seg;
+ pool->sub_section = now_subseg;
+ pool->next = list_of_pools;
+ pool->symbol = NULL;
- /* Restore the input stream. */
- *p = c;
+ /* Add it to the list. */
+ list_of_pools = pool;
+ }
- /* If we found a valid match, advance the
- stream pointer past the end of the word. */
- *ccp = p;
+ /* New pools, and emptied pools, will have a NULL symbol. */
+ if (pool->symbol == NULL)
+ {
+ pool->symbol = symbol_create (FAKE_LABEL_NAME, undefined_section,
+ (valueT) 0, &zero_address_frag);
+ pool->id = latest_pool_num ++;
+ }
- return psr;
+ /* Done. */
+ return pool;
}
-/* Parse the input looking for a PSR flag. */
+/* Add the literal in the global 'inst'
+ structure to the relevent literal pool. */
static int
-psr_required_here (str)
- char ** str;
+add_to_lit_pool (void)
{
- char * start = * str;
- const struct asm_psr * psr;
+ literal_pool * pool;
+ unsigned int entry;
- psr = arm_psr_parse (str);
+ pool = find_or_make_literal_pool ();
- if (psr)
+ /* Check if this literal value is already in the pool. */
+ for (entry = 0; entry < pool->next_free_entry; entry ++)
{
- /* If this is the SPSR that is being modified, set the R bit. */
- if (! psr->cpsr)
- inst.instruction |= SPSR_BIT;
-
- /* Set the psr flags in the MSR instruction. */
- inst.instruction |= psr->field << PSR_SHIFT;
+ if ((pool->literals[entry].X_op == inst.reloc.exp.X_op)
+ && (inst.reloc.exp.X_op == O_constant)
+ && (pool->literals[entry].X_add_number
+ == inst.reloc.exp.X_add_number)
+ && (pool->literals[entry].X_unsigned
+ == inst.reloc.exp.X_unsigned))
+ break;
- return SUCCESS;
+ if ((pool->literals[entry].X_op == inst.reloc.exp.X_op)
+ && (inst.reloc.exp.X_op == O_symbol)
+ && (pool->literals[entry].X_add_number
+ == inst.reloc.exp.X_add_number)
+ && (pool->literals[entry].X_add_symbol
+ == inst.reloc.exp.X_add_symbol)
+ && (pool->literals[entry].X_op_symbol
+ == inst.reloc.exp.X_op_symbol))
+ break;
}
- /* In the few cases where we might be able to accept
- something else this error can be overridden. */
- inst.error = _("flag for {c}psr instruction expected");
-
- /* Restore the start point. */
- *str = start;
- return FAIL;
-}
-
-static int
-co_proc_number (str)
- char **str;
-{
- int processor, pchar;
- char *start;
-
- skip_whitespace (*str);
- start = *str;
-
- /* The data sheet seems to imply that just a number on its own is valid
- here, but the RISC iX assembler seems to accept a prefix 'p'. We will
- accept either. */
- if ((processor = arm_reg_parse (str, all_reg_maps[REG_TYPE_CP].htab))
- == FAIL)
+ /* Do we need to create a new entry? */
+ if (entry == pool->next_free_entry)
{
- *str = start;
-
- pchar = *(*str)++;
- if (pchar >= '0' && pchar <= '9')
- {
- processor = pchar - '0';
- if (**str >= '0' && **str <= '9')
- {
- processor = processor * 10 + *(*str)++ - '0';
- if (processor > 15)
- {
- inst.error = _("illegal co-processor number");
- return FAIL;
- }
- }
- }
- else
+ if (entry >= MAX_LITERAL_POOL_SIZE)
{
- inst.error = _("bad or missing co-processor number");
+ inst.error = _("literal pool overflow");
return FAIL;
}
+
+ pool->literals[entry] = inst.reloc.exp;
+ pool->next_free_entry += 1;
}
- inst.instruction |= processor << 8;
+ inst.reloc.exp.X_op = O_symbol;
+ inst.reloc.exp.X_add_number = ((int) entry) * 4;
+ inst.reloc.exp.X_add_symbol = pool->symbol;
+
return SUCCESS;
}
-static int
-cp_opc_expr (str, where, length)
- char ** str;
- int where;
- int length;
-{
- expressionS expr;
-
- skip_whitespace (* str);
+/* Can't use symbol_new here, so have to create a symbol and then at
+ a later date assign it a value. Thats what these functions do. */
- memset (&expr, '\0', sizeof (expr));
+static void
+symbol_locate (symbolS * symbolP,
+ const char * name, /* It is copied, the caller can modify. */
+ segT segment, /* Segment identifier (SEG_<something>). */
+ valueT valu, /* Symbol value. */
+ fragS * frag) /* Associated fragment. */
+{
+ unsigned int name_length;
+ char * preserved_copy_of_name;
- if (my_get_expression (&expr, str))
- return FAIL;
- if (expr.X_op != O_constant)
- {
- inst.error = _("bad or missing expression");
- return FAIL;
- }
+ name_length = strlen (name) + 1; /* +1 for \0. */
+ obstack_grow (&notes, name, name_length);
+ preserved_copy_of_name = obstack_finish (&notes);
- if ((expr.X_add_number & ((1 << length) - 1)) != expr.X_add_number)
- {
- inst.error = _("immediate co-processor expression too large");
- return FAIL;
- }
+#ifdef tc_canonicalize_symbol_name
+ preserved_copy_of_name =
+ tc_canonicalize_symbol_name (preserved_copy_of_name);
+#endif
- inst.instruction |= expr.X_add_number << where;
- return SUCCESS;
-}
+ S_SET_NAME (symbolP, preserved_copy_of_name);
-static int
-cp_reg_required_here (str, where)
- char ** str;
- int where;
-{
- int reg;
- char * start = *str;
+ S_SET_SEGMENT (symbolP, segment);
+ S_SET_VALUE (symbolP, valu);
+ symbol_clear_list_pointers (symbolP);
- if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_CN].htab)) != FAIL)
- {
- inst.instruction |= reg << where;
- return reg;
- }
+ symbol_set_frag (symbolP, frag);
- /* In the few cases where we might be able to accept something else
- this error can be overridden. */
- inst.error = _("co-processor register expected");
+ /* Link to end of symbol chain. */
+ {
+ extern int symbol_table_frozen;
- /* Restore the start point. */
- *str = start;
- return FAIL;
-}
+ if (symbol_table_frozen)
+ abort ();
+ }
-static int
-fp_reg_required_here (str, where)
- char ** str;
- int where;
-{
- int reg;
- char * start = * str;
+ symbol_append (symbolP, symbol_lastP, & symbol_rootP, & symbol_lastP);
- if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_FN].htab)) != FAIL)
- {
- inst.instruction |= reg << where;
- return reg;
- }
+ obj_symbol_new_hook (symbolP);
- /* In the few cases where we might be able to accept something else
- this error can be overridden. */
- inst.error = _("floating point register expected");
+#ifdef tc_symbol_new_hook
+ tc_symbol_new_hook (symbolP);
+#endif
- /* Restore the start point. */
- *str = start;
- return FAIL;
+#ifdef DEBUG_SYMS
+ verify_symbol_chain (symbol_rootP, symbol_lastP);
+#endif /* DEBUG_SYMS */
}
-static int
-cp_address_offset (str)
- char ** str;
+
+static void
+s_ltorg (int ignored ATTRIBUTE_UNUSED)
{
- int offset;
+ unsigned int entry;
+ literal_pool * pool;
+ char sym_name[20];
- skip_whitespace (* str);
+ pool = find_literal_pool ();
+ if (pool == NULL
+ || pool->symbol == NULL
+ || pool->next_free_entry == 0)
+ return;
- if (! is_immediate_prefix (**str))
- {
- inst.error = _("immediate expression expected");
- return FAIL;
- }
+ mapping_state (MAP_DATA);
- (*str)++;
+ /* Align pool as you have word accesses.
+ Only make a frag if we have to. */
+ if (!need_pass_2)
+ frag_align (2, 0, 0);
- if (my_get_expression (& inst.reloc.exp, str))
- return FAIL;
+ record_alignment (now_seg, 2);
- if (inst.reloc.exp.X_op == O_constant)
- {
- offset = inst.reloc.exp.X_add_number;
+ sprintf (sym_name, "$$lit_\002%x", pool->id);
- if (offset & 3)
- {
- inst.error = _("co-processor address must be word aligned");
- return FAIL;
- }
+ symbol_locate (pool->symbol, sym_name, now_seg,
+ (valueT) frag_now_fix (), frag_now);
+ symbol_table_insert (pool->symbol);
- if (offset > 1023 || offset < -1023)
- {
- inst.error = _("offset too large");
- return FAIL;
- }
+ ARM_SET_THUMB (pool->symbol, thumb_mode);
- if (offset >= 0)
- inst.instruction |= INDEX_UP;
- else
- offset = -offset;
+#if defined OBJ_COFF || defined OBJ_ELF
+ ARM_SET_INTERWORK (pool->symbol, support_interwork);
+#endif
- inst.instruction |= offset >> 2;
- }
- else
- inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM;
+ for (entry = 0; entry < pool->next_free_entry; entry ++)
+ /* First output the expression in the instruction to the pool. */
+ emit_expr (&(pool->literals[entry]), 4); /* .word */
- return SUCCESS;
+ /* Mark the pool as empty. */
+ pool->next_free_entry = 0;
+ pool->symbol = NULL;
}
-static int
-cp_address_required_here (str, wb_ok)
- char ** str;
- int wb_ok;
+#ifdef OBJ_ELF
+/* Forward declarations for functions below, in the MD interface
+ section. */
+static void fix_new_arm (fragS *, int, short, expressionS *, int, int);
+static valueT create_unwind_entry (int);
+static void start_unwind_section (const segT, int);
+static void add_unwind_opcode (valueT, int);
+static void flush_pending_unwind (void);
+
+/* Directives: Data. */
+
+static void
+s_arm_elf_cons (int nbytes)
{
- char * p = * str;
- int pre_inc = 0;
- int write_back = 0;
+ expressionS exp;
+
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
- if (*p == '[')
+ if (is_it_end_of_statement ())
{
- int reg;
+ demand_empty_rest_of_line ();
+ return;
+ }
- p++;
- skip_whitespace (p);
+#ifdef md_cons_align
+ md_cons_align (nbytes);
+#endif
- if ((reg = reg_required_here (& p, 16)) == FAIL)
- return FAIL;
+ mapping_state (MAP_DATA);
+ do
+ {
+ int reloc;
+ char *base = input_line_pointer;
- skip_whitespace (p);
+ expression (& exp);
- if (*p == ']')
+ if (exp.X_op != O_symbol)
+ emit_expr (&exp, (unsigned int) nbytes);
+ else
{
- p++;
-
- skip_whitespace (p);
-
- if (*p == '\0')
+ char *before_reloc = input_line_pointer;
+ reloc = parse_reloc (&input_line_pointer);
+ if (reloc == -1)
{
- /* As an extension to the official ARM syntax we allow:
-
- [Rn]
-
- as a short hand for:
-
- [Rn,#0] */
- inst.instruction |= PRE_INDEX | INDEX_UP;
- *str = p;
- return SUCCESS;
+ as_bad (_("unrecognized relocation suffix"));
+ ignore_rest_of_line ();
+ return;
}
-
- if (skip_past_comma (& p) == FAIL)
+ else if (reloc == BFD_RELOC_UNUSED)
+ emit_expr (&exp, (unsigned int) nbytes);
+ else
{
- inst.error = _("comma expected after closing square bracket");
- return FAIL;
- }
+ reloc_howto_type *howto = bfd_reloc_type_lookup (stdoutput, reloc);
+ int size = bfd_get_reloc_size (howto);
- skip_whitespace (p);
-
- if (*p == '#')
- {
- if (wb_ok)
+ if (reloc == BFD_RELOC_ARM_PLT32)
{
- /* [Rn], #expr */
- write_back = WRITE_BACK;
-
- if (reg == REG_PC)
- {
- inst.error = _("pc may not be used in post-increment");
- return FAIL;
- }
-
- if (cp_address_offset (& p) == FAIL)
- return FAIL;
+ as_bad (_("(plt) is only valid on branch targets"));
+ reloc = BFD_RELOC_UNUSED;
+ size = 0;
}
- else
- pre_inc = PRE_INDEX | INDEX_UP;
- }
- else if (*p == '{')
- {
- int option;
-
- /* [Rn], {<expr>} */
- p++;
-
- skip_whitespace (p);
-
- if (my_get_expression (& inst.reloc.exp, & p))
- return FAIL;
-
- if (inst.reloc.exp.X_op == O_constant)
- {
- option = inst.reloc.exp.X_add_number;
-
- if (option > 255 || option < 0)
- {
- inst.error = _("'option' field too large");
- return FAIL;
- }
- skip_whitespace (p);
-
- if (*p != '}')
- {
- inst.error = _("'}' expected at end of 'option' field");
- return FAIL;
- }
- else
- {
- p++;
- inst.instruction |= option;
- inst.instruction |= INDEX_UP;
- }
- }
+ if (size > nbytes)
+ as_bad (_("%s relocations do not fit in %d bytes"),
+ howto->name, nbytes);
else
{
- inst.error = _("non-constant expressions for 'option' field not supported");
- return FAIL;
+ /* We've parsed an expression stopping at O_symbol.
+ But there may be more expression left now that we
+ have parsed the relocation marker. Parse it again.
+ XXX Surely there is a cleaner way to do this. */
+ char *p = input_line_pointer;
+ int offset;
+ char *save_buf = alloca (input_line_pointer - base);
+ memcpy (save_buf, base, input_line_pointer - base);
+ memmove (base + (input_line_pointer - before_reloc),
+ base, before_reloc - base);
+
+ input_line_pointer = base + (input_line_pointer-before_reloc);
+ expression (&exp);
+ memcpy (base, save_buf, p - base);
+
+ offset = nbytes - size;
+ p = frag_more ((int) nbytes);
+ fix_new_exp (frag_now, p - frag_now->fr_literal + offset,
+ size, &exp, 0, reloc);
}
}
- else
- {
- inst.error = _("# or { expected after comma");
- return FAIL;
- }
}
- else
- {
- /* '['Rn, #expr']'[!] */
-
- if (skip_past_comma (& p) == FAIL)
- {
- inst.error = _("pre-indexed expression expected");
- return FAIL;
- }
-
- pre_inc = PRE_INDEX;
-
- if (cp_address_offset (& p) == FAIL)
- return FAIL;
-
- skip_whitespace (p);
+ }
+ while (*input_line_pointer++ == ',');
- if (*p++ != ']')
- {
- inst.error = _("missing ]");
- return FAIL;
- }
+ /* Put terminator back into stream. */
+ input_line_pointer --;
+ demand_empty_rest_of_line ();
+}
- skip_whitespace (p);
- if (wb_ok && *p == '!')
- {
- if (reg == REG_PC)
- {
- inst.error = _("pc may not be used with write-back");
- return FAIL;
- }
+/* Parse a .rel31 directive. */
- p++;
- write_back = WRITE_BACK;
- }
- }
- }
- else
- {
- if (my_get_expression (&inst.reloc.exp, &p))
- return FAIL;
+static void
+s_arm_rel31 (int ignored ATTRIBUTE_UNUSED)
+{
+ expressionS exp;
+ char *p;
+ valueT highbit;
- inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM;
- inst.reloc.exp.X_add_number -= 8; /* PC rel adjust. */
- inst.reloc.pc_rel = 1;
- inst.instruction |= (REG_PC << 16);
- pre_inc = PRE_INDEX;
- }
+ highbit = 0;
+ if (*input_line_pointer == '1')
+ highbit = 0x80000000;
+ else if (*input_line_pointer != '0')
+ as_bad (_("expected 0 or 1"));
- inst.instruction |= write_back | pre_inc;
- *str = p;
- return SUCCESS;
-}
+ input_line_pointer++;
+ if (*input_line_pointer != ',')
+ as_bad (_("missing comma"));
+ input_line_pointer++;
-static int
-cp_byte_address_offset (str)
- char ** str;
-{
- int offset;
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
- skip_whitespace (* str);
+#ifdef md_cons_align
+ md_cons_align (4);
+#endif
- if (! is_immediate_prefix (**str))
- {
- inst.error = _("immediate expression expected");
- return FAIL;
- }
+ mapping_state (MAP_DATA);
- (*str)++;
-
- if (my_get_expression (& inst.reloc.exp, str))
- return FAIL;
-
- if (inst.reloc.exp.X_op == O_constant)
- {
- offset = inst.reloc.exp.X_add_number;
-
- if (offset > 255 || offset < -255)
- {
- inst.error = _("offset too large");
- return FAIL;
- }
-
- if (offset >= 0)
- inst.instruction |= INDEX_UP;
- else
- offset = -offset;
+ expression (&exp);
- inst.instruction |= offset;
- }
- else
- inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM_S2;
+ p = frag_more (4);
+ md_number_to_chars (p, highbit, 4);
+ fix_new_arm (frag_now, p - frag_now->fr_literal, 4, &exp, 1,
+ BFD_RELOC_ARM_PREL31);
- return SUCCESS;
+ demand_empty_rest_of_line ();
}
-static int
-cp_byte_address_required_here (str)
- char ** str;
-{
- char * p = * str;
- int pre_inc = 0;
- int write_back = 0;
+/* Directives: AEABI stack-unwind tables. */
- if (*p == '[')
- {
- int reg;
+/* Parse an unwind_fnstart directive. Simply records the current location. */
- p++;
- skip_whitespace (p);
-
- if ((reg = reg_required_here (& p, 16)) == FAIL)
- return FAIL;
-
- skip_whitespace (p);
+static void
+s_arm_unwind_fnstart (int ignored ATTRIBUTE_UNUSED)
+{
+ demand_empty_rest_of_line ();
+ /* Mark the start of the function. */
+ unwind.proc_start = expr_build_dot ();
- if (*p == ']')
- {
- p++;
-
- if (skip_past_comma (& p) == SUCCESS)
- {
- /* [Rn], #expr */
- write_back = WRITE_BACK;
-
- if (reg == REG_PC)
- {
- inst.error = _("pc may not be used in post-increment");
- return FAIL;
- }
-
- if (cp_byte_address_offset (& p) == FAIL)
- return FAIL;
- }
- else
- pre_inc = PRE_INDEX | INDEX_UP;
- }
- else
- {
- /* '['Rn, #expr']'[!] */
-
- if (skip_past_comma (& p) == FAIL)
- {
- inst.error = _("pre-indexed expression expected");
- return FAIL;
- }
-
- pre_inc = PRE_INDEX;
-
- if (cp_byte_address_offset (& p) == FAIL)
- return FAIL;
-
- skip_whitespace (p);
-
- if (*p++ != ']')
- {
- inst.error = _("missing ]");
- return FAIL;
- }
-
- skip_whitespace (p);
-
- if (*p == '!')
- {
- if (reg == REG_PC)
- {
- inst.error = _("pc may not be used with write-back");
- return FAIL;
- }
-
- p++;
- write_back = WRITE_BACK;
- }
- }
- }
- else
- {
- if (my_get_expression (&inst.reloc.exp, &p))
- return FAIL;
+ /* Reset the rest of the unwind info. */
+ unwind.opcode_count = 0;
+ unwind.table_entry = NULL;
+ unwind.personality_routine = NULL;
+ unwind.personality_index = -1;
+ unwind.frame_size = 0;
+ unwind.fp_offset = 0;
+ unwind.fp_reg = 13;
+ unwind.fp_used = 0;
+ unwind.sp_restored = 0;
+}
- inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM_S2;
- inst.reloc.exp.X_add_number -= 8; /* PC rel adjust. */
- inst.reloc.pc_rel = 1;
- inst.instruction |= (REG_PC << 16);
- pre_inc = PRE_INDEX;
- }
- inst.instruction |= write_back | pre_inc;
- *str = p;
- return SUCCESS;
-}
+/* Parse a handlerdata directive. Creates the exception handling table entry
+ for the function. */
static void
-do_empty (str)
- char * str;
+s_arm_unwind_handlerdata (int ignored ATTRIBUTE_UNUSED)
{
- /* Do nothing really. */
- end_of_line (str);
+ demand_empty_rest_of_line ();
+ if (unwind.table_entry)
+ as_bad (_("dupicate .handlerdata directive"));
+
+ create_unwind_entry (1);
}
+/* Parse an unwind_fnend directive. Generates the index table entry. */
+
static void
-do_mrs (str)
- char *str;
+s_arm_unwind_fnend (int ignored ATTRIBUTE_UNUSED)
{
- int skip = 0;
+ long where;
+ char *ptr;
+ valueT val;
- /* Only one syntax. */
- skip_whitespace (str);
-
- if (reg_required_here (&str, 12) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
+ demand_empty_rest_of_line ();
- if (skip_past_comma (&str) == FAIL)
- {
- inst.error = _("comma expected after register name");
- return;
- }
+ /* Add eh table entry. */
+ if (unwind.table_entry == NULL)
+ val = create_unwind_entry (0);
+ else
+ val = 0;
- skip_whitespace (str);
+ /* Add index table entry. This is two words. */
+ start_unwind_section (unwind.saved_seg, 1);
+ frag_align (2, 0, 0);
+ record_alignment (now_seg, 2);
- if ( strcmp (str, "CPSR") == 0
- || strcmp (str, "SPSR") == 0
- /* Lower case versions for backwards compatibility. */
- || strcmp (str, "cpsr") == 0
- || strcmp (str, "spsr") == 0)
- skip = 4;
-
- /* This is for backwards compatibility with older toolchains. */
- else if ( strcmp (str, "cpsr_all") == 0
- || strcmp (str, "spsr_all") == 0)
- skip = 8;
+ ptr = frag_more (8);
+ where = frag_now_fix () - 8;
+
+ /* Self relative offset of the function start. */
+ fix_new (frag_now, where, 4, unwind.proc_start, 0, 1,
+ BFD_RELOC_ARM_PREL31);
+
+ /* Indicate dependency on EHABI-defined personality routines to the
+ linker, if it hasn't been done already. */
+ if (unwind.personality_index >= 0 && unwind.personality_index < 3
+ && !(marked_pr_dependency & (1 << unwind.personality_index)))
+ {
+ static const char *const name[] = {
+ "__aeabi_unwind_cpp_pr0",
+ "__aeabi_unwind_cpp_pr1",
+ "__aeabi_unwind_cpp_pr2"
+ };
+ symbolS *pr = symbol_find_or_make (name[unwind.personality_index]);
+ fix_new (frag_now, where, 0, pr, 0, 1, BFD_RELOC_NONE);
+ marked_pr_dependency |= 1 << unwind.personality_index;
+ seg_info (now_seg)->tc_segment_info_data.marked_pr_dependency
+ = marked_pr_dependency;
+ }
+
+ if (val)
+ /* Inline exception table entry. */
+ md_number_to_chars (ptr + 4, val, 4);
else
- {
- inst.error = _("CPSR or SPSR expected");
- return;
- }
+ /* Self relative offset of the table entry. */
+ fix_new (frag_now, where + 4, 4, unwind.table_entry, 0, 1,
+ BFD_RELOC_ARM_PREL31);
- if (* str == 's' || * str == 'S')
- inst.instruction |= SPSR_BIT;
- str += skip;
-
- end_of_line (str);
+ /* Restore the original section. */
+ subseg_set (unwind.saved_seg, unwind.saved_subseg);
}
-/* Two possible forms:
- "{C|S}PSR_<field>, Rm",
- "{C|S}PSR_f, #expression". */
+
+/* Parse an unwind_cantunwind directive. */
static void
-do_msr (str)
- char * str;
+s_arm_unwind_cantunwind (int ignored ATTRIBUTE_UNUSED)
{
- skip_whitespace (str);
+ demand_empty_rest_of_line ();
+ if (unwind.personality_routine || unwind.personality_index != -1)
+ as_bad (_("personality routine specified for cantunwind frame"));
- if (psr_required_here (& str) == FAIL)
- return;
+ unwind.personality_index = -2;
+}
- if (skip_past_comma (& str) == FAIL)
- {
- inst.error = _("comma missing after psr flags");
- return;
- }
- skip_whitespace (str);
+/* Parse a personalityindex directive. */
- if (reg_required_here (& str, 0) != FAIL)
- {
- inst.error = NULL;
- end_of_line (str);
- return;
- }
+static void
+s_arm_unwind_personalityindex (int ignored ATTRIBUTE_UNUSED)
+{
+ expressionS exp;
- if (! is_immediate_prefix (* str))
- {
- inst.error =
- _("only a register or immediate value can follow a psr flag");
- return;
- }
+ if (unwind.personality_routine || unwind.personality_index != -1)
+ as_bad (_("duplicate .personalityindex directive"));
- str ++;
- inst.error = NULL;
+ expression (&exp);
- if (my_get_expression (& inst.reloc.exp, & str))
+ if (exp.X_op != O_constant
+ || exp.X_add_number < 0 || exp.X_add_number > 15)
{
- inst.error =
- _("only a register or immediate value can follow a psr flag");
+ as_bad (_("bad personality routine number"));
+ ignore_rest_of_line ();
return;
}
-#if 0 /* The first edition of the ARM architecture manual stated that
- writing anything other than the flags with an immediate operation
- had UNPREDICTABLE effects. This constraint was removed in the
- second edition of the specification. */
- if ((cpu_variant & ARM_EXT_V5) != ARM_EXT_V5
- && inst.instruction & ((PSR_c | PSR_x | PSR_s) << PSR_SHIFT))
- {
- inst.error = _("immediate value cannot be used to set this field");
- return;
- }
-#endif
+ unwind.personality_index = exp.X_add_number;
- inst.instruction |= INST_IMMEDIATE;
+ demand_empty_rest_of_line ();
+}
- if (inst.reloc.exp.X_add_symbol)
- {
- inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
- inst.reloc.pc_rel = 0;
- }
- else
- {
- unsigned value = validate_immediate (inst.reloc.exp.X_add_number);
- if (value == (unsigned) FAIL)
- {
- inst.error = _("invalid constant");
- return;
- }
+/* Parse a personality directive. */
- inst.instruction |= value;
- }
+static void
+s_arm_unwind_personality (int ignored ATTRIBUTE_UNUSED)
+{
+ char *name, *p, c;
+
+ if (unwind.personality_routine || unwind.personality_index != -1)
+ as_bad (_("duplicate .personality directive"));
- inst.error = NULL;
- end_of_line (str);
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ p = input_line_pointer;
+ unwind.personality_routine = symbol_find_or_make (name);
+ *p = c;
+ demand_empty_rest_of_line ();
}
-/* Long Multiply Parser
- UMULL RdLo, RdHi, Rm, Rs
- SMULL RdLo, RdHi, Rm, Rs
- UMLAL RdLo, RdHi, Rm, Rs
- SMLAL RdLo, RdHi, Rm, Rs. */
+
+/* Parse a directive saving core registers. */
static void
-do_mull (str)
- char * str;
+s_arm_unwind_save_core (void)
{
- int rdlo, rdhi, rm, rs;
-
- /* Only one format "rdlo, rdhi, rm, rs". */
- skip_whitespace (str);
+ valueT op;
+ long range;
+ int n;
- if ((rdlo = reg_required_here (&str, 12)) == FAIL)
+ range = parse_reg_list (&input_line_pointer);
+ if (range == FAIL)
{
- inst.error = BAD_ARGS;
+ as_bad (_("expected register list"));
+ ignore_rest_of_line ();
return;
}
- if (skip_past_comma (&str) == FAIL
- || (rdhi = reg_required_here (&str, 16)) == FAIL)
+ demand_empty_rest_of_line ();
+
+ /* Turn .unwind_movsp ip followed by .unwind_save {..., ip, ...}
+ into .unwind_save {..., sp...}. We aren't bothered about the value of
+ ip because it is clobbered by calls. */
+ if (unwind.sp_restored && unwind.fp_reg == 12
+ && (range & 0x3000) == 0x1000)
{
- inst.error = BAD_ARGS;
- return;
+ unwind.opcode_count--;
+ unwind.sp_restored = 0;
+ range = (range | 0x2000) & ~0x1000;
+ unwind.pending_offset = 0;
}
- if (skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL)
+ /* Pop r4-r15. */
+ if (range & 0xfff0)
{
- inst.error = BAD_ARGS;
- return;
+ /* See if we can use the short opcodes. These pop a block of up to 8
+ registers starting with r4, plus maybe r14. */
+ for (n = 0; n < 8; n++)
+ {
+ /* Break at the first non-saved register. */
+ if ((range & (1 << (n + 4))) == 0)
+ break;
+ }
+ /* See if there are any other bits set. */
+ if (n == 0 || (range & (0xfff0 << n) & 0xbff0) != 0)
+ {
+ /* Use the long form. */
+ op = 0x8000 | ((range >> 4) & 0xfff);
+ add_unwind_opcode (op, 2);
+ }
+ else
+ {
+ /* Use the short form. */
+ if (range & 0x4000)
+ op = 0xa8; /* Pop r14. */
+ else
+ op = 0xa0; /* Do not pop r14. */
+ op |= (n - 1);
+ add_unwind_opcode (op, 1);
+ }
}
- /* rdhi, rdlo and rm must all be different. */
- if (rdlo == rdhi || rdlo == rm || rdhi == rm)
- as_tsktsk (_("rdhi, rdlo and rm must all be different"));
-
- if (skip_past_comma (&str) == FAIL
- || (rs = reg_required_here (&str, 8)) == FAIL)
+ /* Pop r0-r3. */
+ if (range & 0xf)
{
- inst.error = BAD_ARGS;
- return;
+ op = 0xb100 | (range & 0xf);
+ add_unwind_opcode (op, 2);
}
- if (rdhi == REG_PC || rdhi == REG_PC || rdhi == REG_PC || rdhi == REG_PC)
+ /* Record the number of bytes pushed. */
+ for (n = 0; n < 16; n++)
{
- inst.error = BAD_PC;
- return;
+ if (range & (1 << n))
+ unwind.frame_size += 4;
}
-
- end_of_line (str);
}
+
+/* Parse a directive saving FPA registers. */
+
static void
-do_mul (str)
- char * str;
+s_arm_unwind_save_fpa (int reg)
{
- int rd, rm;
-
- /* Only one format "rd, rm, rs". */
- skip_whitespace (str);
+ expressionS exp;
+ int num_regs;
+ valueT op;
- if ((rd = reg_required_here (&str, 16)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
+ /* Get Number of registers to transfer. */
+ if (skip_past_comma (&input_line_pointer) != FAIL)
+ expression (&exp);
+ else
+ exp.X_op = O_illegal;
- if (rd == REG_PC)
+ if (exp.X_op != O_constant)
{
- inst.error = BAD_PC;
+ as_bad (_("expected , <constant>"));
+ ignore_rest_of_line ();
return;
}
- if (skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
+ num_regs = exp.X_add_number;
- if (rm == REG_PC)
+ if (num_regs < 1 || num_regs > 4)
{
- inst.error = BAD_PC;
+ as_bad (_("number of registers must be in the range [1:4]"));
+ ignore_rest_of_line ();
return;
}
- if (rm == rd)
- as_tsktsk (_("rd and rm should be different in mul"));
+ demand_empty_rest_of_line ();
- if (skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 8)) == FAIL)
+ if (reg == 4)
{
- inst.error = BAD_ARGS;
- return;
+ /* Short form. */
+ op = 0xb4 | (num_regs - 1);
+ add_unwind_opcode (op, 1);
}
-
- if (rm == REG_PC)
+ else
{
- inst.error = BAD_PC;
- return;
+ /* Long form. */
+ op = 0xc800 | (reg << 4) | (num_regs - 1);
+ add_unwind_opcode (op, 2);
}
-
- end_of_line (str);
+ unwind.frame_size += num_regs * 12;
}
-static void
-do_mla (str)
- char * str;
-{
- int rd, rm;
-
- /* Only one format "rd, rm, rs, rn". */
- skip_whitespace (str);
- if ((rd = reg_required_here (&str, 16)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
+/* Parse a directive saving VFP registers. */
- if (rd == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
-
- if (skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
+static void
+s_arm_unwind_save_vfp (void)
+{
+ int count;
+ unsigned int reg;
+ valueT op;
- if (rm == REG_PC)
+ count = parse_vfp_reg_list (&input_line_pointer, &reg, 1);
+ if (count == FAIL)
{
- inst.error = BAD_PC;
+ as_bad (_("expected register list"));
+ ignore_rest_of_line ();
return;
}
- if (rm == rd)
- as_tsktsk (_("rd and rm should be different in mla"));
+ demand_empty_rest_of_line ();
- if (skip_past_comma (&str) == FAIL
- || (rd = reg_required_here (&str, 8)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 12)) == FAIL)
+ if (reg == 8)
{
- inst.error = BAD_ARGS;
- return;
+ /* Short form. */
+ op = 0xb8 | (count - 1);
+ add_unwind_opcode (op, 1);
}
-
- if (rd == REG_PC || rm == REG_PC)
+ else
{
- inst.error = BAD_PC;
- return;
+ /* Long form. */
+ op = 0xb300 | (reg << 4) | (count - 1);
+ add_unwind_opcode (op, 2);
}
-
- end_of_line (str);
+ unwind.frame_size += count * 8 + 4;
}
-/* Expects *str -> the characters "acc0", possibly with leading blanks.
- Advances *str to the next non-alphanumeric.
- Returns 0, or else FAIL (in which case sets inst.error).
- (In a future XScale, there may be accumulators other than zero.
- At that time this routine and its callers can be upgraded to suit.) */
+/* Parse a directive saving iWMMXt data registers. */
-static int
-accum0_required_here (str)
- char ** str;
+static void
+s_arm_unwind_save_mmxwr (void)
{
- static char buff [128]; /* Note the address is taken. Hence, static. */
- char * p = * str;
- char c;
- int result = 0; /* The accum number. */
-
- skip_whitespace (p);
-
- *str = p; /* Advance caller's string pointer too. */
- c = *p++;
- while (ISALNUM (c))
- c = *p++;
+ int reg;
+ int hi_reg;
+ int i;
+ unsigned mask = 0;
+ valueT op;
- *--p = 0; /* Aap nul into input buffer at non-alnum. */
+ if (*input_line_pointer == '{')
+ input_line_pointer++;
- if (! ( streq (*str, "acc0") || streq (*str, "ACC0")))
+ do
{
- sprintf (buff, _("acc0 expected, not '%.100s'"), *str);
- inst.error = buff;
- result = FAIL;
- }
+ reg = arm_reg_parse (&input_line_pointer, REG_TYPE_MMXWR);
- *p = c; /* Unzap. */
- *str = p; /* Caller's string pointer to after match. */
- return result;
-}
-
-/* Expects **str -> after a comma. May be leading blanks.
- Advances *str, recognizing a load mode, and setting inst.instruction.
- Returns rn, or else FAIL (in which case may set inst.error
- and not advance str)
+ if (reg == FAIL)
+ {
+ as_bad (_(reg_expected_msgs[REG_TYPE_MMXWR]));
+ goto error;
+ }
- Note: doesn't know Rd, so no err checks that require such knowledge. */
+ if (mask >> reg)
+ as_tsktsk (_("register list not in ascending order"));
+ mask |= 1 << reg;
-static int
-ld_mode_required_here (string)
- char ** string;
-{
- char * str = * string;
- int rn;
- int pre_inc = 0;
-
- skip_whitespace (str);
+ if (*input_line_pointer == '-')
+ {
+ input_line_pointer++;
+ hi_reg = arm_reg_parse (&input_line_pointer, REG_TYPE_MMXWR);
+ if (hi_reg == FAIL)
+ {
+ as_bad (_(reg_expected_msgs[REG_TYPE_MMXWR]));
+ goto error;
+ }
+ else if (reg >= hi_reg)
+ {
+ as_bad (_("bad register range"));
+ goto error;
+ }
+ for (; reg < hi_reg; reg++)
+ mask |= 1 << reg;
+ }
+ }
+ while (skip_past_comma (&input_line_pointer) != FAIL);
- if (* str == '[')
- {
- str++;
+ if (*input_line_pointer == '}')
+ input_line_pointer++;
- skip_whitespace (str);
+ demand_empty_rest_of_line ();
- if ((rn = reg_required_here (& str, 16)) == FAIL)
- return FAIL;
+ /* Generate any deferred opcodes becuuse we're going to be looking at
+ the list. */
+ flush_pending_unwind ();
- skip_whitespace (str);
+ for (i = 0; i < 16; i++)
+ {
+ if (mask & (1 << i))
+ unwind.frame_size += 8;
+ }
- if (* str == ']')
+ /* Attempt to combine with a previous opcode. We do this because gcc
+ likes to output separate unwind directives for a single block of
+ registers. */
+ if (unwind.opcode_count > 0)
+ {
+ i = unwind.opcodes[unwind.opcode_count - 1];
+ if ((i & 0xf8) == 0xc0)
{
- str ++;
-
- if (skip_past_comma (& str) == SUCCESS)
+ i &= 7;
+ /* Only merge if the blocks are contiguous. */
+ if (i < 6)
{
- /* [Rn],... (post inc) */
- if (ldst_extend_v4 (&str) == FAIL)
- return FAIL;
+ if ((mask & 0xfe00) == (1 << 9))
+ {
+ mask |= ((1 << (i + 11)) - 1) & 0xfc00;
+ unwind.opcode_count--;
+ }
}
- else /* [Rn] */
+ else if (i == 6 && unwind.opcode_count >= 2)
{
- skip_whitespace (str);
+ i = unwind.opcodes[unwind.opcode_count - 2];
+ reg = i >> 4;
+ i &= 0xf;
- if (* str == '!')
+ op = 0xffff << (reg - 1);
+ if (reg > 0
+ || ((mask & op) == (1u << (reg - 1))))
{
- str ++;
- inst.instruction |= WRITE_BACK;
+ op = (1 << (reg + i + 1)) - 1;
+ op &= ~((1 << reg) - 1);
+ mask |= op;
+ unwind.opcode_count -= 2;
}
-
- inst.instruction |= INDEX_UP | HWOFFSET_IMM;
- pre_inc = 1;
}
}
- else /* [Rn,...] */
+ }
+
+ hi_reg = 15;
+ /* We want to generate opcodes in the order the registers have been
+ saved, ie. descending order. */
+ for (reg = 15; reg >= -1; reg--)
+ {
+ /* Save registers in blocks. */
+ if (reg < 0
+ || !(mask & (1 << reg)))
{
- if (skip_past_comma (& str) == FAIL)
+ /* We found an unsaved reg. Generate opcodes to save the
+ preceeding block. */
+ if (reg != hi_reg)
{
- inst.error = _("pre-indexed expression expected");
- return FAIL;
+ if (reg == 9)
+ {
+ /* Short form. */
+ op = 0xc0 | (hi_reg - 10);
+ add_unwind_opcode (op, 1);
+ }
+ else
+ {
+ /* Long form. */
+ op = 0xc600 | ((reg + 1) << 4) | ((hi_reg - reg) - 1);
+ add_unwind_opcode (op, 2);
+ }
}
+ hi_reg = reg - 1;
+ }
+ }
- pre_inc = 1;
+ return;
+error:
+ ignore_rest_of_line ();
+}
- if (ldst_extend_v4 (&str) == FAIL)
- return FAIL;
+static void
+s_arm_unwind_save_mmxwcg (void)
+{
+ int reg;
+ int hi_reg;
+ unsigned mask = 0;
+ valueT op;
- skip_whitespace (str);
+ if (*input_line_pointer == '{')
+ input_line_pointer++;
- if (* str ++ != ']')
- {
- inst.error = _("missing ]");
- return FAIL;
- }
+ do
+ {
+ reg = arm_reg_parse (&input_line_pointer, REG_TYPE_MMXWCG);
+
+ if (reg == FAIL)
+ {
+ as_bad (_(reg_expected_msgs[REG_TYPE_MMXWCG]));
+ goto error;
+ }
- skip_whitespace (str);
+ reg -= 8;
+ if (mask >> reg)
+ as_tsktsk (_("register list not in ascending order"));
+ mask |= 1 << reg;
- if (* str == '!')
+ if (*input_line_pointer == '-')
+ {
+ input_line_pointer++;
+ hi_reg = arm_reg_parse (&input_line_pointer, REG_TYPE_MMXWCG);
+ if (hi_reg == FAIL)
+ {
+ as_bad (_(reg_expected_msgs[REG_TYPE_MMXWCG]));
+ goto error;
+ }
+ else if (reg >= hi_reg)
{
- str ++;
- inst.instruction |= WRITE_BACK;
+ as_bad (_("bad register range"));
+ goto error;
}
+ for (; reg < hi_reg; reg++)
+ mask |= 1 << reg;
}
}
- else if (* str == '=') /* ldr's "r,=label" syntax */
- /* We should never reach here, because <text> = <expression> is
- caught gas/read.c read_a_source_file() as a .set operation. */
- return FAIL;
- else /* PC +- 8 bit immediate offset. */
- {
- if (my_get_expression (& inst.reloc.exp, & str))
- return FAIL;
+ while (skip_past_comma (&input_line_pointer) != FAIL);
- inst.instruction |= HWOFFSET_IMM; /* The I bit. */
- inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
- inst.reloc.exp.X_add_number -= 8; /* PC rel adjust. */
- inst.reloc.pc_rel = 1;
- inst.instruction |= (REG_PC << 16);
+ if (*input_line_pointer == '}')
+ input_line_pointer++;
- rn = REG_PC;
- pre_inc = 1;
- }
+ demand_empty_rest_of_line ();
- inst.instruction |= (pre_inc ? PRE_INDEX : 0);
- * string = str;
+ /* Generate any deferred opcodes becuuse we're going to be looking at
+ the list. */
+ flush_pending_unwind ();
- return rn;
+ for (reg = 0; reg < 16; reg++)
+ {
+ if (mask & (1 << reg))
+ unwind.frame_size += 4;
+ }
+ op = 0xc700 | mask;
+ add_unwind_opcode (op, 2);
+ return;
+error:
+ ignore_rest_of_line ();
}
-/* ARM V5E (El Segundo) signed-multiply-accumulate (argument parse)
- SMLAxy{cond} Rd,Rm,Rs,Rn
- SMLAWy{cond} Rd,Rm,Rs,Rn
- Error if any register is R15. */
+
+/* Parse an unwind_save directive. */
static void
-do_smla (str)
- char * str;
+s_arm_unwind_save (int ignored ATTRIBUTE_UNUSED)
{
- int rd, rm, rs, rn;
-
- skip_whitespace (str);
-
- if ((rd = reg_required_here (& str, 16)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rm = reg_required_here (& str, 0)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rs = reg_required_here (& str, 8)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rn = reg_required_here (& str, 12)) == FAIL)
- inst.error = BAD_ARGS;
-
- else if (rd == REG_PC || rm == REG_PC || rs == REG_PC || rn == REG_PC)
- inst.error = BAD_PC;
-
- else
- end_of_line (str);
-}
+ char *peek;
+ struct reg_entry *reg;
+ bfd_boolean had_brace = FALSE;
-/* ARM V5E (El Segundo) signed-multiply-accumulate-long (argument parse)
- SMLALxy{cond} Rdlo,Rdhi,Rm,Rs
- Error if any register is R15.
- Warning if Rdlo == Rdhi. */
+ /* Figure out what sort of save we have. */
+ peek = input_line_pointer;
-static void
-do_smlal (str)
- char * str;
-{
- int rdlo, rdhi, rm, rs;
+ if (*peek == '{')
+ {
+ had_brace = TRUE;
+ peek++;
+ }
- skip_whitespace (str);
+ reg = arm_reg_parse_multi (&peek);
- if ((rdlo = reg_required_here (& str, 12)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rdhi = reg_required_here (& str, 16)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rm = reg_required_here (& str, 0)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rs = reg_required_here (& str, 8)) == FAIL)
+ if (!reg)
{
- inst.error = BAD_ARGS;
+ as_bad (_("register expected"));
+ ignore_rest_of_line ();
return;
}
- if (rdlo == REG_PC || rdhi == REG_PC || rm == REG_PC || rs == REG_PC)
+ switch (reg->type)
{
- inst.error = BAD_PC;
+ case REG_TYPE_FN:
+ if (had_brace)
+ {
+ as_bad (_("FPA .unwind_save does not take a register list"));
+ ignore_rest_of_line ();
+ return;
+ }
+ s_arm_unwind_save_fpa (reg->number);
return;
- }
- if (rdlo == rdhi)
- as_tsktsk (_("rdhi and rdlo must be different"));
+ case REG_TYPE_RN: s_arm_unwind_save_core (); return;
+ case REG_TYPE_VFD: 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;
- end_of_line (str);
+ default:
+ as_bad (_(".unwind_save does not support this kind of register"));
+ ignore_rest_of_line ();
+ }
}
-/* ARM V5E (El Segundo) signed-multiply (argument parse)
- SMULxy{cond} Rd,Rm,Rs
- Error if any register is R15. */
+
+/* Parse an unwind_movsp directive. */
static void
-do_smul (str)
- char * str;
+s_arm_unwind_movsp (int ignored ATTRIBUTE_UNUSED)
{
- int rd, rm, rs;
+ int reg;
+ valueT op;
- skip_whitespace (str);
+ reg = arm_reg_parse (&input_line_pointer, REG_TYPE_RN);
+ if (reg == FAIL)
+ {
+ as_bad (_(reg_expected_msgs[REG_TYPE_RN]));
+ ignore_rest_of_line ();
+ return;
+ }
+ demand_empty_rest_of_line ();
+
+ if (reg == REG_SP || reg == REG_PC)
+ {
+ as_bad (_("SP and PC not permitted in .unwind_movsp directive"));
+ return;
+ }
- if ((rd = reg_required_here (& str, 16)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rm = reg_required_here (& str, 0)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rs = reg_required_here (& str, 8)) == FAIL)
- inst.error = BAD_ARGS;
+ if (unwind.fp_reg != REG_SP)
+ as_bad (_("unexpected .unwind_movsp directive"));
- else if (rd == REG_PC || rm == REG_PC || rs == REG_PC)
- inst.error = BAD_PC;
+ /* Generate opcode to restore the value. */
+ op = 0x90 | reg;
+ add_unwind_opcode (op, 1);
- else
- end_of_line (str);
+ /* Record the information for later. */
+ unwind.fp_reg = reg;
+ unwind.fp_offset = unwind.frame_size;
+ unwind.sp_restored = 1;
}
-/* ARM V5E (El Segundo) saturating-add/subtract (argument parse)
- Q[D]{ADD,SUB}{cond} Rd,Rm,Rn
- Error if any register is R15. */
+/* Parse an unwind_pad directive. */
static void
-do_qadd (str)
- char * str;
+s_arm_unwind_pad (int ignored ATTRIBUTE_UNUSED)
{
- int rd, rm, rn;
+ int offset;
- skip_whitespace (str);
+ if (immediate_for_directive (&offset) == FAIL)
+ return;
- if ((rd = reg_required_here (& str, 12)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rm = reg_required_here (& str, 0)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rn = reg_required_here (& str, 16)) == FAIL)
- inst.error = BAD_ARGS;
+ if (offset & 3)
+ {
+ as_bad (_("stack increment must be multiple of 4"));
+ ignore_rest_of_line ();
+ return;
+ }
- else if (rd == REG_PC || rm == REG_PC || rn == REG_PC)
- inst.error = BAD_PC;
+ /* Don't generate any opcodes, just record the details for later. */
+ unwind.frame_size += offset;
+ unwind.pending_offset += offset;
- else
- end_of_line (str);
+ demand_empty_rest_of_line ();
}
-/* ARM V5E (el Segundo)
- MCRRcc <coproc>, <opcode>, <Rd>, <Rn>, <CRm>.
- MRRCcc <coproc>, <opcode>, <Rd>, <Rn>, <CRm>.
-
- These are equivalent to the XScale instructions MAR and MRA,
- respectively, when coproc == 0, opcode == 0, and CRm == 0.
-
- Result unpredicatable if Rd or Rn is R15. */
+/* Parse an unwind_setfp directive. */
static void
-do_co_reg2c (str)
- char * str;
+s_arm_unwind_setfp (int ignored ATTRIBUTE_UNUSED)
{
- int rd, rn;
+ int sp_reg;
+ int fp_reg;
+ int offset;
- skip_whitespace (str);
+ fp_reg = arm_reg_parse (&input_line_pointer, REG_TYPE_RN);
+ if (skip_past_comma (&input_line_pointer) == FAIL)
+ sp_reg = FAIL;
+ else
+ sp_reg = arm_reg_parse (&input_line_pointer, REG_TYPE_RN);
- if (co_proc_number (& str) == FAIL)
+ if (fp_reg == FAIL || sp_reg == FAIL)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
+ as_bad (_("expected <reg>, <reg>"));
+ ignore_rest_of_line ();
return;
}
- if (skip_past_comma (& str) == FAIL
- || cp_opc_expr (& str, 4, 4) == FAIL)
+ /* Optional constant. */
+ if (skip_past_comma (&input_line_pointer) != FAIL)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ if (immediate_for_directive (&offset) == FAIL)
+ return;
}
+ else
+ offset = 0;
+
+ demand_empty_rest_of_line ();
- if (skip_past_comma (& str) == FAIL
- || (rd = reg_required_here (& str, 12)) == FAIL)
+ if (sp_reg != 13 && sp_reg != unwind.fp_reg)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
+ as_bad (_("register must be either sp or set by a previous"
+ "unwind_movsp directive"));
return;
}
- if (skip_past_comma (& str) == FAIL
- || (rn = reg_required_here (& str, 16)) == FAIL)
+ /* Don't generate any opcodes, just record the information for later. */
+ unwind.fp_reg = fp_reg;
+ unwind.fp_used = 1;
+ if (sp_reg == 13)
+ unwind.fp_offset = unwind.frame_size - offset;
+ else
+ unwind.fp_offset -= offset;
+}
+
+/* Parse an unwind_raw directive. */
+
+static void
+s_arm_unwind_raw (int ignored ATTRIBUTE_UNUSED)
+{
+ expressionS exp;
+ /* This is an arbitary limit. */
+ unsigned char op[16];
+ int count;
+
+ expression (&exp);
+ if (exp.X_op == O_constant
+ && skip_past_comma (&input_line_pointer) != FAIL)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ unwind.frame_size += exp.X_add_number;
+ expression (&exp);
}
+ else
+ exp.X_op = O_illegal;
- /* Unpredictable result if rd or rn is R15. */
- if (rd == REG_PC || rn == REG_PC)
- as_tsktsk
- (_("Warning: instruction unpredictable when using r15"));
-
- if (skip_past_comma (& str) == FAIL
- || cp_reg_required_here (& str, 0) == FAIL)
+ if (exp.X_op != O_constant)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
+ as_bad (_("expected <offset>, <opcode>"));
+ ignore_rest_of_line ();
return;
}
- end_of_line (str);
-}
-
-/* ARM V5 count-leading-zeroes instruction (argument parse)
- CLZ{<cond>} <Rd>, <Rm>
- Condition defaults to COND_ALWAYS.
- Error if Rd or Rm are R15. */
+ count = 0;
-static void
-do_clz (str)
- char * str;
-{
- int rd, rm;
+ /* Parse the opcode. */
+ for (;;)
+ {
+ if (count >= 16)
+ {
+ as_bad (_("unwind opcode too long"));
+ ignore_rest_of_line ();
+ }
+ if (exp.X_op != O_constant || exp.X_add_number & ~0xff)
+ {
+ as_bad (_("invalid unwind opcode"));
+ ignore_rest_of_line ();
+ return;
+ }
+ op[count++] = exp.X_add_number;
- skip_whitespace (str);
+ /* Parse the next byte. */
+ if (skip_past_comma (&input_line_pointer) == FAIL)
+ break;
- if (((rd = reg_required_here (& str, 12)) == FAIL)
- || (skip_past_comma (& str) == FAIL)
- || ((rm = reg_required_here (& str, 0)) == FAIL))
- inst.error = BAD_ARGS;
+ expression (&exp);
+ }
- else if (rd == REG_PC || rm == REG_PC )
- inst.error = BAD_PC;
+ /* Add the opcode bytes in reverse order. */
+ while (count--)
+ add_unwind_opcode (op[count], 1);
- else
- end_of_line (str);
+ demand_empty_rest_of_line ();
}
-/* ARM V5 (argument parse)
- LDC2{L} <coproc>, <CRd>, <addressing mode>
- STC2{L} <coproc>, <CRd>, <addressing mode>
- Instruction is not conditional, and has 0xf in the condition field.
- Otherwise, it's the same as LDC/STC. */
+
+/* Parse a .eabi_attribute directive. */
static void
-do_lstc2 (str)
- char * str;
+s_arm_eabi_attribute (int ignored ATTRIBUTE_UNUSED)
{
- skip_whitespace (str);
+ expressionS exp;
+ bfd_boolean is_string;
+ int tag;
+ unsigned int i = 0;
+ char *s = NULL;
+ char saved_char;
- if (co_proc_number (& str) == FAIL)
+ expression (& exp);
+ if (exp.X_op != O_constant)
+ goto bad;
+
+ tag = exp.X_add_number;
+ if (tag == 4 || tag == 5 || tag == 32 || (tag > 32 && (tag & 1) != 0))
+ is_string = 1;
+ else
+ is_string = 0;
+
+ if (skip_past_comma (&input_line_pointer) == FAIL)
+ goto bad;
+ if (tag == 32 || !is_string)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
+ expression (& exp);
+ if (exp.X_op != O_constant)
+ {
+ as_bad (_("expected numeric constant"));
+ ignore_rest_of_line ();
+ return;
+ }
+ i = exp.X_add_number;
}
- else if (skip_past_comma (& str) == FAIL
- || cp_reg_required_here (& str, 12) == FAIL)
+ if (tag == Tag_compatibility
+ && skip_past_comma (&input_line_pointer) == FAIL)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
+ as_bad (_("expected comma"));
+ ignore_rest_of_line ();
+ return;
}
- else if (skip_past_comma (& str) == FAIL
- || cp_address_required_here (&str, CP_WB_OK) == FAIL)
+ if (is_string)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
+ 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
- end_of_line (str);
-}
-
-/* ARM V5 (argument parse)
- CDP2 <coproc>, <opcode_1>, <CRd>, <CRn>, <CRm>, <opcode_2>
- Instruction is not conditional, and has 0xf in the condition field.
- Otherwise, it's the same as CDP. */
-
-static void
-do_cdp2 (str)
- char * str;
-{
- skip_whitespace (str);
-
- if (co_proc_number (& str) == FAIL)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ 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);
- if (skip_past_comma (& str) == FAIL
- || cp_opc_expr (& str, 20,4) == FAIL)
+ if (s)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ *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 ();
+}
- if (skip_past_comma (& str) == FAIL
- || cp_reg_required_here (& str, 12) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void s_arm_arch (int);
+static void s_arm_cpu (int);
+static void s_arm_fpu (int);
+#endif /* OBJ_ELF */
- if (skip_past_comma (& str) == FAIL
- || cp_reg_required_here (& str, 16) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+/* 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[] =
+{
+ /* Never called because '.req' does not start a line. */
+ { "req", s_req, 0 },
+ { "unreq", s_unreq, 0 },
+ { "bss", s_bss, 0 },
+ { "align", s_align, 0 },
+ { "arm", s_arm, 0 },
+ { "thumb", s_thumb, 0 },
+ { "code", s_code, 0 },
+ { "force_thumb", s_force_thumb, 0 },
+ { "thumb_func", s_thumb_func, 0 },
+ { "thumb_set", s_thumb_set, 0 },
+ { "even", s_even, 0 },
+ { "ltorg", s_ltorg, 0 },
+ { "pool", s_ltorg, 0 },
+ { "syntax", s_syntax, 0 },
+#ifdef OBJ_ELF
+ { "word", s_arm_elf_cons, 4 },
+ { "long", s_arm_elf_cons, 4 },
+ { "rel31", s_arm_rel31, 0 },
+ { "fnstart", s_arm_unwind_fnstart, 0 },
+ { "fnend", s_arm_unwind_fnend, 0 },
+ { "cantunwind", s_arm_unwind_cantunwind, 0 },
+ { "personality", s_arm_unwind_personality, 0 },
+ { "personalityindex", s_arm_unwind_personalityindex, 0 },
+ { "handlerdata", s_arm_unwind_handlerdata, 0 },
+ { "save", s_arm_unwind_save, 0 },
+ { "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},
+#endif
+ { "extend", float_cons, 'x' },
+ { "ldouble", float_cons, 'x' },
+ { "packed", float_cons, 'p' },
+ { 0, 0, 0 }
+};
+
+/* Parser functions used exclusively in instruction operands. */
- if (skip_past_comma (& str) == FAIL
- || cp_reg_required_here (& str, 0) == FAIL)
+/* Generic immediate-value read function for use in insn parsing.
+ STR points to the beginning of the immediate (the leading #);
+ VAL receives the value; if the value is outside [MIN, MAX]
+ issue an error. PREFIX_OPT is true if the immediate prefix is
+ optional. */
+
+static int
+parse_immediate (char **str, int *val, int min, int max,
+ bfd_boolean prefix_opt)
+{
+ expressionS exp;
+ my_get_expression (&exp, str, prefix_opt ? GE_OPT_PREFIX : GE_IMM_PREFIX);
+ if (exp.X_op != O_constant)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ inst.error = _("constant expression required");
+ return FAIL;
}
- if (skip_past_comma (& str) == SUCCESS)
+ if (exp.X_add_number < min || exp.X_add_number > max)
{
- if (cp_opc_expr (& str, 5, 3) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ inst.error = _("immediate value out of range");
+ return FAIL;
}
- end_of_line (str);
+ *val = exp.X_add_number;
+ return SUCCESS;
}
-/* ARM V5 (argument parse)
- MCR2 <coproc>, <opcode_1>, <Rd>, <CRn>, <CRm>, <opcode_2>
- MRC2 <coproc>, <opcode_1>, <Rd>, <CRn>, <CRm>, <opcode_2>
- Instruction is not conditional, and has 0xf in the condition field.
- Otherwise, it's the same as MCR/MRC. */
+/* Returns the pseudo-register number of an FPA immediate constant,
+ or FAIL if there isn't a valid constant here. */
-static void
-do_co_reg2 (str)
- char * str;
+static int
+parse_fpa_immediate (char ** str)
{
- skip_whitespace (str);
+ LITTLENUM_TYPE words[MAX_LITTLENUMS];
+ char * save_in;
+ expressionS exp;
+ int i;
+ int j;
- if (co_proc_number (& str) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ /* First try and match exact strings, this is to guarantee
+ that some formats will work even for cross assembly. */
- if (skip_past_comma (& str) == FAIL
- || cp_opc_expr (& str, 21, 3) == FAIL)
+ for (i = 0; fp_const[i]; i++)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ if (strncmp (*str, fp_const[i], strlen (fp_const[i])) == 0)
+ {
+ char *start = *str;
- if (skip_past_comma (& str) == FAIL
- || reg_required_here (& str, 12) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ *str += strlen (fp_const[i]);
+ if (is_end_of_line[(unsigned char) **str])
+ return i + 8;
+ *str = start;
+ }
}
- if (skip_past_comma (& str) == FAIL
- || cp_reg_required_here (& str, 16) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ /* Just because we didn't get a match doesn't mean that the constant
+ isn't valid, just that it is in a format that we don't
+ automatically recognize. Try parsing it with the standard
+ expression routines. */
+
+ memset (words, 0, MAX_LITTLENUMS * sizeof (LITTLENUM_TYPE));
- if (skip_past_comma (& str) == FAIL
- || cp_reg_required_here (& str, 0) == FAIL)
+ /* Look for a raw floating point number. */
+ if ((save_in = atof_ieee (*str, 'x', words)) != NULL
+ && is_end_of_line[(unsigned char) *save_in])
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ for (i = 0; i < NUM_FLOAT_VALS; i++)
+ {
+ for (j = 0; j < MAX_LITTLENUMS; j++)
+ {
+ if (words[j] != fp_values[i][j])
+ break;
+ }
+
+ if (j == MAX_LITTLENUMS)
+ {
+ *str = save_in;
+ return i + 8;
+ }
+ }
}
- if (skip_past_comma (& str) == SUCCESS)
+ /* Try and parse a more complex expression, this will probably fail
+ unless the code uses a floating point prefix (eg "0f"). */
+ save_in = input_line_pointer;
+ input_line_pointer = *str;
+ if (expression (&exp) == absolute_section
+ && exp.X_op == O_big
+ && exp.X_add_number < 0)
{
- if (cp_opc_expr (& str, 5, 3) == FAIL)
+ /* FIXME: 5 = X_PRECISION, should be #define'd where we can use it.
+ Ditto for 15. */
+ if (gen_to_words (words, 5, (long) 15) == 0)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ for (i = 0; i < NUM_FLOAT_VALS; i++)
+ {
+ for (j = 0; j < MAX_LITTLENUMS; j++)
+ {
+ if (words[j] != fp_values[i][j])
+ break;
+ }
+
+ if (j == MAX_LITTLENUMS)
+ {
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return i + 8;
+ }
+ }
}
}
- end_of_line (str);
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ inst.error = _("invalid FPA immediate expression");
+ return FAIL;
}
-/* ARM v5TEJ. Jump to Jazelle code. */
-static void
-do_bxj (str)
- char * str;
+/* Shift operands. */
+enum shift_kind
{
- int reg;
+ SHIFT_LSL, SHIFT_LSR, SHIFT_ASR, SHIFT_ROR, SHIFT_RRX
+};
- skip_whitespace (str);
+struct asm_shift_name
+{
+ const char *name;
+ enum shift_kind kind;
+};
- if ((reg = reg_required_here (&str, 0)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
+/* Third argument to parse_shift. */
+enum parse_shift_mode
+{
+ NO_SHIFT_RESTRICT, /* Any kind of shift is accepted. */
+ SHIFT_IMMEDIATE, /* Shift operand must be an immediate. */
+ SHIFT_LSL_OR_ASR_IMMEDIATE, /* Shift must be LSL or ASR immediate. */
+ SHIFT_ASR_IMMEDIATE, /* Shift must be ASR immediate. */
+ SHIFT_LSL_IMMEDIATE, /* Shift must be LSL immediate. */
+};
- /* Note - it is not illegal to do a "bxj pc". Useless, but not illegal. */
- if (reg == REG_PC)
- as_tsktsk (_("use of r15 in bxj is not really useful"));
+/* Parse a <shift> specifier on an ARM data processing instruction.
+ This has three forms:
- end_of_line (str);
-}
+ (LSL|LSR|ASL|ASR|ROR) Rs
+ (LSL|LSR|ASL|ASR|ROR) #imm
+ RRX
-/* ARM V6 umaal (argument parse). */
+ Note that ASL is assimilated to LSL in the instruction encoding, and
+ RRX to ROR #0 (which cannot be written as such). */
-static void
-do_umaal (str)
- char *str;
+static int
+parse_shift (char **str, int i, enum parse_shift_mode mode)
{
+ const struct asm_shift_name *shift_name;
+ enum shift_kind shift;
+ char *s = *str;
+ char *p = s;
+ int reg;
- int rdlo, rdhi, rm, rs;
+ for (p = *str; ISALPHA (*p); p++)
+ ;
- skip_whitespace (str);
- if ((rdlo = reg_required_here (& str, 12)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rdhi = reg_required_here (& str, 16)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rm = reg_required_here (& str, 0)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rs = reg_required_here (& str, 8)) == FAIL)
+ if (p == *str)
{
- inst.error = BAD_ARGS;
- return;
+ inst.error = _("shift expression expected");
+ return FAIL;
}
- if (rdlo == REG_PC || rdhi == REG_PC || rm == REG_PC || rs == REG_PC)
+ shift_name = hash_find_n (arm_shift_hsh, *str, p - *str);
+
+ if (shift_name == NULL)
{
- inst.error = BAD_PC;
- return;
+ inst.error = _("shift expression expected");
+ return FAIL;
}
- end_of_line (str);
-}
+ shift = shift_name->kind;
-/* ARM V6 strex (argument parse). */
+ switch (mode)
+ {
+ case NO_SHIFT_RESTRICT:
+ case SHIFT_IMMEDIATE: break;
-static void
-do_strex (str)
- char *str;
-{
- int rd, rm, rn;
+ case SHIFT_LSL_OR_ASR_IMMEDIATE:
+ if (shift != SHIFT_LSL && shift != SHIFT_ASR)
+ {
+ inst.error = _("'LSL' or 'ASR' required");
+ return FAIL;
+ }
+ break;
- /* Parse Rd, Rm,. */
- skip_whitespace (str);
- if ((rd = reg_required_here (& str, 12)) == FAIL
- || skip_past_comma (& str) == FAIL
- || (rm = reg_required_here (& str, 0)) == FAIL
- || skip_past_comma (& str) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
- if (rd == REG_PC || rm == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
- if (rd == rm)
- {
- inst.error = _("Rd equal to Rm or Rn yields unpredictable results");
- return;
- }
+ case SHIFT_LSL_IMMEDIATE:
+ if (shift != SHIFT_LSL)
+ {
+ inst.error = _("'LSL' required");
+ return FAIL;
+ }
+ break;
- /* Skip past '['. */
- if ((strlen (str) >= 1)
- && strncmp (str, "[", 1) == 0)
- str+=1;
- skip_whitespace (str);
+ case SHIFT_ASR_IMMEDIATE:
+ if (shift != SHIFT_ASR)
+ {
+ inst.error = _("'ASR' required");
+ return FAIL;
+ }
+ break;
- /* Parse Rn. */
- if ((rn = reg_required_here (& str, 16)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
- else if (rn == REG_PC)
- {
- inst.error = BAD_PC;
- return;
+ default: abort ();
}
- if (rd == rn)
+
+ if (shift != SHIFT_RRX)
{
- inst.error = _("Rd equal to Rm or Rn yields unpredictable results");
- return;
- }
- skip_whitespace (str);
+ /* Whitespace can appear here if the next thing is a bare digit. */
+ skip_whitespace (p);
- /* Skip past ']'. */
- if ((strlen (str) >= 1)
- && strncmp (str, "]", 1) == 0)
- str+=1;
-
- end_of_line (str);
+ if (mode == NO_SHIFT_RESTRICT
+ && (reg = arm_reg_parse (&p, REG_TYPE_RN)) != FAIL)
+ {
+ inst.operands[i].imm = reg;
+ inst.operands[i].immisreg = 1;
+ }
+ else if (my_get_expression (&inst.reloc.exp, &p, GE_IMM_PREFIX))
+ return FAIL;
+ }
+ inst.operands[i].shift_kind = shift;
+ inst.operands[i].shifted = 1;
+ *str = p;
+ return SUCCESS;
}
-/* ARM V6 ssat (argument parse). */
-
-static void
-do_ssat (str)
- char* str;
-{
- do_sat (&str, /*bias=*/-1);
- end_of_line (str);
-}
+/* Parse a <shifter_operand> for an ARM data processing instruction:
-/* ARM V6 usat (argument parse). */
+ #<immediate>
+ #<immediate>, <rotate>
+ <Rm>
+ <Rm>, <shift>
-static void
-do_usat (str)
- char* str;
-{
- do_sat (&str, /*bias=*/0);
- end_of_line (str);
-}
+ where <shift> is defined by parse_shift above, and <rotate> is a
+ multiple of 2 between 0 and 30. Validation of immediate operands
+ is deferred to md_apply_fix. */
-static void
-do_sat (str, bias)
- char **str;
- int bias;
+static int
+parse_shifter_operand (char **str, int i)
{
- int rd, rm;
+ int value;
expressionS expr;
- skip_whitespace (*str);
-
- /* Parse <Rd>, field. */
- if ((rd = reg_required_here (str, 12)) == FAIL
- || skip_past_comma (str) == FAIL)
+ if ((value = arm_reg_parse (str, REG_TYPE_RN)) != FAIL)
{
- inst.error = BAD_ARGS;
- return;
- }
- if (rd == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
+ inst.operands[i].reg = value;
+ inst.operands[i].isreg = 1;
- /* Parse #<immed>, field. */
- if (is_immediate_prefix (**str))
- (*str)++;
- else
- {
- inst.error = _("immediate expression expected");
- return;
- }
- if (my_get_expression (&expr, str))
- {
- inst.error = _("bad expression");
- return;
- }
- if (expr.X_op != O_constant)
- {
- inst.error = _("constant expression expected");
- return;
- }
- if (expr.X_add_number + bias < 0
- || expr.X_add_number + bias > 31)
- {
- inst.error = _("immediate value out of range");
- return;
- }
- inst.instruction |= (expr.X_add_number + bias) << 16;
- if (skip_past_comma (str) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
+ /* parse_shift will override this if appropriate */
+ inst.reloc.exp.X_op = O_constant;
+ inst.reloc.exp.X_add_number = 0;
- /* Parse <Rm> field. */
- if ((rm = reg_required_here (str, 0)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
+ if (skip_past_comma (str) == FAIL)
+ return SUCCESS;
+
+ /* Shift operation on register. */
+ return parse_shift (str, i, NO_SHIFT_RESTRICT);
}
- if (rm == REG_PC)
+
+ if (my_get_expression (&inst.reloc.exp, str, GE_IMM_PREFIX))
+ return FAIL;
+
+ if (skip_past_comma (str) == SUCCESS)
{
- inst.error = BAD_PC;
- return;
+ /* #x, y -- ie explicit rotation by Y. */
+ if (my_get_expression (&expr, str, GE_NO_PREFIX))
+ return FAIL;
+
+ if (expr.X_op != O_constant || inst.reloc.exp.X_op != O_constant)
+ {
+ inst.error = _("constant expression expected");
+ return FAIL;
+ }
+
+ value = expr.X_add_number;
+ if (value < 0 || value > 30 || value % 2 != 0)
+ {
+ inst.error = _("invalid rotation");
+ return FAIL;
+ }
+ if (inst.reloc.exp.X_add_number < 0 || inst.reloc.exp.X_add_number > 255)
+ {
+ inst.error = _("invalid constant");
+ return FAIL;
+ }
+
+ /* Convert to decoded value. md_apply_fix will put it back. */
+ inst.reloc.exp.X_add_number
+ = (((inst.reloc.exp.X_add_number << (32 - value))
+ | (inst.reloc.exp.X_add_number >> value)) & 0xffffffff);
}
- if (skip_past_comma (str) == SUCCESS)
- decode_shift (str, SHIFT_LSL_OR_ASR_IMMEDIATE);
+ inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
+ inst.reloc.pc_rel = 0;
+ return SUCCESS;
}
-/* ARM V6 ssat16 (argument parse). */
+/* Parse all forms of an ARM address expression. Information is written
+ to inst.operands[i] and/or inst.reloc.
-static void
-do_ssat16 (str)
- char *str;
-{
- do_sat16 (&str, /*bias=*/-1);
- end_of_line (str);
-}
+ Preindexed addressing (.preind=1):
-static void
-do_usat16 (str)
- char *str;
-{
- do_sat16 (&str, /*bias=*/0);
- end_of_line (str);
-}
+ [Rn, #offset] .reg=Rn .reloc.exp=offset
+ [Rn, +/-Rm] .reg=Rn .imm=Rm .immisreg=1 .negative=0/1
+ [Rn, +/-Rm, shift] .reg=Rn .imm=Rm .immisreg=1 .negative=0/1
+ .shift_kind=shift .reloc.exp=shift_imm
-static void
-do_sat16 (str, bias)
- char **str;
- int bias;
-{
- int rd, rm;
- expressionS expr;
+ These three may have a trailing ! which causes .writeback to be set also.
- skip_whitespace (*str);
+ Postindexed addressing (.postind=1, .writeback=1):
- /* Parse the <Rd> field. */
- if ((rd = reg_required_here (str, 12)) == FAIL
- || skip_past_comma (str) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
- if (rd == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
+ [Rn], #offset .reg=Rn .reloc.exp=offset
+ [Rn], +/-Rm .reg=Rn .imm=Rm .immisreg=1 .negative=0/1
+ [Rn], +/-Rm, shift .reg=Rn .imm=Rm .immisreg=1 .negative=0/1
+ .shift_kind=shift .reloc.exp=shift_imm
- /* Parse #<immed>, field. */
- if (is_immediate_prefix (**str))
- (*str)++;
- else
- {
- inst.error = _("immediate expression expected");
- return;
- }
- if (my_get_expression (&expr, str))
+ Unindexed addressing (.preind=0, .postind=0):
+
+ [Rn], {option} .reg=Rn .imm=option .immisreg=0
+
+ Other:
+
+ [Rn]{!} shorthand for [Rn,#0]{!}
+ =immediate .isreg=0 .reloc.exp=immediate
+ label .reg=PC .reloc.pc_rel=1 .reloc.exp=label
+
+ 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)
+{
+ char *p = *str;
+ int reg;
+
+ if (skip_past_char (&p, '[') == FAIL)
{
- inst.error = _("bad expression");
- return;
+ if (skip_past_char (&p, '=') == FAIL)
+ {
+ /* bare address - translate to PC-relative offset */
+ inst.reloc.pc_rel = 1;
+ inst.operands[i].reg = REG_PC;
+ inst.operands[i].isreg = 1;
+ inst.operands[i].preind = 1;
+ }
+ /* else a load-constant pseudo op, no special treatment needed here */
+
+ if (my_get_expression (&inst.reloc.exp, &p, GE_NO_PREFIX))
+ return FAIL;
+
+ *str = p;
+ return SUCCESS;
}
- if (expr.X_op != O_constant)
+
+ if ((reg = arm_reg_parse (&p, REG_TYPE_RN)) == FAIL)
{
- inst.error = _("constant expression expected");
- return;
+ inst.error = _(reg_expected_msgs[REG_TYPE_RN]);
+ return FAIL;
}
- if (expr.X_add_number + bias < 0
- || expr.X_add_number + bias > 15)
+ inst.operands[i].reg = reg;
+ inst.operands[i].isreg = 1;
+
+ if (skip_past_comma (&p) == SUCCESS)
{
- inst.error = _("immediate value out of range");
- return;
+ inst.operands[i].preind = 1;
+
+ if (*p == '+') p++;
+ else if (*p == '-') p++, inst.operands[i].negative = 1;
+
+ if ((reg = arm_reg_parse (&p, REG_TYPE_RN)) != FAIL)
+ {
+ 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;
+ }
+ else
+ {
+ if (inst.operands[i].negative)
+ {
+ inst.operands[i].negative = 0;
+ p--;
+ }
+ if (my_get_expression (&inst.reloc.exp, &p, GE_IMM_PREFIX))
+ return FAIL;
+ }
}
- inst.instruction |= (expr.X_add_number + bias) << 16;
- if (skip_past_comma (str) == FAIL)
+
+ if (skip_past_char (&p, ']') == FAIL)
{
- inst.error = BAD_ARGS;
- return;
+ inst.error = _("']' expected");
+ return FAIL;
}
- /* Parse <Rm> field. */
- if ((rm = reg_required_here (str, 0)) == FAIL)
+ if (skip_past_char (&p, '!') == SUCCESS)
+ inst.operands[i].writeback = 1;
+
+ else if (skip_past_comma (&p) == SUCCESS)
{
- inst.error = BAD_ARGS;
- return;
+ if (skip_past_char (&p, '{') == SUCCESS)
+ {
+ /* [Rn], {expr} - unindexed, with option */
+ if (parse_immediate (&p, &inst.operands[i].imm,
+ 0, 255, TRUE) == FAIL)
+ return FAIL;
+
+ if (skip_past_char (&p, '}') == FAIL)
+ {
+ inst.error = _("'}' expected at end of 'option' field");
+ return FAIL;
+ }
+ if (inst.operands[i].preind)
+ {
+ inst.error = _("cannot combine index with option");
+ return FAIL;
+ }
+ *str = p;
+ return SUCCESS;
+ }
+ else
+ {
+ inst.operands[i].postind = 1;
+ inst.operands[i].writeback = 1;
+
+ if (inst.operands[i].preind)
+ {
+ inst.error = _("cannot combine pre- and post-indexing");
+ return FAIL;
+ }
+
+ if (*p == '+') p++;
+ else if (*p == '-') p++, inst.operands[i].negative = 1;
+
+ if ((reg = arm_reg_parse (&p, REG_TYPE_RN)) != FAIL)
+ {
+ 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;
+ }
+ else
+ {
+ if (inst.operands[i].negative)
+ {
+ inst.operands[i].negative = 0;
+ p--;
+ }
+ if (my_get_expression (&inst.reloc.exp, &p, GE_IMM_PREFIX))
+ return FAIL;
+ }
+ }
}
- if (rm == REG_PC)
+
+ /* If at this point neither .preind nor .postind is set, we have a
+ bare [Rn]{!}, which is shorthand for [Rn,#0]{!}. */
+ if (inst.operands[i].preind == 0 && inst.operands[i].postind == 0)
{
- inst.error = BAD_PC;
- return;
+ inst.operands[i].preind = 1;
+ inst.reloc.exp.X_op = O_constant;
+ inst.reloc.exp.X_add_number = 0;
}
+ *str = p;
+ return SUCCESS;
}
-/* ARM V6 srs (argument parse). */
+/* Miscellaneous. */
-static void
-do_srs (str)
- char* str;
+/* Parse a PSR flag operand. The value returned is FAIL on syntax error,
+ or a bitmask suitable to be or-ed into the ARM msr instruction. */
+static int
+parse_psr (char **str)
{
- char *exclam;
- skip_whitespace (str);
- exclam = strchr (str, '!');
- if (exclam)
- *exclam = '\0';
- do_cps_mode (&str);
- if (exclam)
- *exclam = '!';
- if (*str == '!')
+ char *p;
+ unsigned long psr_field;
+ const struct asm_psr *psr;
+ char *start;
+
+ /* CPSR's and SPSR's can now be lowercase. This is just a convenience
+ feature for ease of use and backwards compatibility. */
+ p = *str;
+ if (strncasecmp (p, "SPSR", 4) == 0)
+ psr_field = SPSR_BIT;
+ else if (strncasecmp (p, "CPSR", 4) == 0)
+ psr_field = 0;
+ else
{
- inst.instruction |= WRITE_BACK;
- str++;
- }
- end_of_line (str);
-}
+ start = p;
+ do
+ p++;
+ while (ISALNUM (*p) || *p == '_');
-/* ARM V6 SMMUL (argument parse). */
+ psr = hash_find_n (arm_v7m_psr_hsh, start, p - start);
+ if (!psr)
+ return FAIL;
-static void
-do_smmul (str)
- char* str;
-{
- int rd, rm, rs;
-
- skip_whitespace (str);
- if ((rd = reg_required_here (&str, 16)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rs = reg_required_here (&str, 8)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
+ *str = p;
+ return psr->field;
}
- if (rd == REG_PC
- || rm == REG_PC
- || rs == REG_PC)
+ p += 4;
+ if (*p == '_')
{
- inst.error = BAD_PC;
- return;
- }
+ /* A suffix follows. */
+ p++;
+ start = p;
- end_of_line (str);
-
-}
+ do
+ p++;
+ while (ISALNUM (*p) || *p == '_');
-/* ARM V6 SMLALD (argument parse). */
+ psr = hash_find_n (arm_psr_hsh, start, p - start);
+ if (!psr)
+ goto error;
-static void
-do_smlald (str)
- char* str;
-{
- int rdlo, rdhi, rm, rs;
- skip_whitespace (str);
- if ((rdlo = reg_required_here (&str, 12)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rdhi = reg_required_here (&str, 16)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rs = reg_required_here (&str, 8)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
+ psr_field |= psr->field;
}
-
- if (rdlo == REG_PC
- || rdhi == REG_PC
- || rm == REG_PC
- || rs == REG_PC)
+ else
{
- inst.error = BAD_PC;
- return;
+ if (ISALNUM (*p))
+ goto error; /* Garbage after "[CS]PSR". */
+
+ psr_field |= (PSR_c | PSR_f);
}
+ *str = p;
+ return psr_field;
- end_of_line (str);
+ error:
+ inst.error = _("flag for {c}psr instruction expected");
+ return FAIL;
}
-/* ARM V6 SMLAD (argument parse). Signed multiply accumulate dual.
- smlad{x}{<cond>} Rd, Rm, Rs, Rn */
+/* Parse the flags argument to CPSI[ED]. Returns FAIL on error, or a
+ value suitable for splatting into the AIF field of the instruction. */
-static void
-do_smlad (str)
- char *str;
+static int
+parse_cps_flags (char **str)
{
- int rd, rm, rs, rn;
-
- skip_whitespace (str);
- if ((rd = reg_required_here (&str, 16)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rs = reg_required_here (&str, 8)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rn = reg_required_here (&str, 12)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
-
- if (rd == REG_PC
- || rn == REG_PC
- || rs == REG_PC
- || rm == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
+ int val = 0;
+ int saw_a_flag = 0;
+ char *s = *str;
- end_of_line (str);
-}
+ for (;;)
+ switch (*s++)
+ {
+ case '\0': case ',':
+ goto done;
-/* ARM V6 SETEND (argument parse). Sets the E bit in the CPSR while
- preserving the other bits.
+ case 'a': case 'A': saw_a_flag = 1; val |= 0x4; break;
+ case 'i': case 'I': saw_a_flag = 1; val |= 0x2; break;
+ case 'f': case 'F': saw_a_flag = 1; val |= 0x1; break;
- setend <endian_specifier>, where <endian_specifier> is either
- BE or LE. */
+ default:
+ inst.error = _("unrecognized CPS flag");
+ return FAIL;
+ }
-static void
-do_setend (str)
- char *str;
-{
- if (do_endian_specifier (str))
- inst.instruction |= 0x200;
+ done:
+ if (saw_a_flag == 0)
+ {
+ inst.error = _("missing CPS flags");
+ return FAIL;
+ }
+
+ *str = s - 1;
+ return val;
}
-/* Returns true if the endian-specifier indicates big-endianness. */
+/* Parse an endian specifier ("BE" or "LE", case insensitive);
+ returns 0 for big-endian, 1 for little-endian, FAIL for an error. */
static int
-do_endian_specifier (str)
- char *str;
+parse_endian_specifier (char **str)
{
- int big_endian = 0;
+ int little_endian;
+ char *s = *str;
- skip_whitespace (str);
- if (strlen (str) < 2)
- inst.error = _("missing endian specifier");
- else if (strncasecmp (str, "BE", 2) == 0)
+ if (strncasecmp (s, "BE", 2))
+ little_endian = 0;
+ else if (strncasecmp (s, "LE", 2))
+ little_endian = 1;
+ else
{
- str += 2;
- big_endian = 1;
+ inst.error = _("valid endian specifiers are be or le");
+ return FAIL;
}
- else if (strncasecmp (str, "LE", 2) == 0)
- str += 2;
- else
- inst.error = _("valid endian specifiers are be or le");
- end_of_line (str);
+ if (ISALNUM (s[2]) || s[2] == '_')
+ {
+ inst.error = _("valid endian specifiers are be or le");
+ return FAIL;
+ }
- return big_endian;
+ *str = s + 2;
+ return little_endian;
}
-/* ARM V6 SXTH.
-
- SXTH {<cond>} <Rd>, <Rm>{, <rotation>}
- Condition defaults to COND_ALWAYS.
- Error if any register uses R15. */
+/* Parse a rotation specifier: ROR #0, #8, #16, #24. *val receives a
+ value suitable for poking into the rotate field of an sxt or sxta
+ instruction, or FAIL on error. */
-static void
-do_sxth (str)
- char *str;
+static int
+parse_ror (char **str)
{
- int rd, rm;
- expressionS expr;
- int rotation_clear_mask = 0xfffff3ff;
- int rotation_eight_mask = 0x00000400;
- int rotation_sixteen_mask = 0x00000800;
- int rotation_twenty_four_mask = 0x00000c00;
-
- skip_whitespace (str);
- if ((rd = reg_required_here (&str, 12)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
+ int rot;
+ char *s = *str;
- else if (rd == REG_PC || rm == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
-
- /* Zero out the rotation field. */
- inst.instruction &= rotation_clear_mask;
-
- /* Check for lack of optional rotation field. */
- if (skip_past_comma (&str) == FAIL)
- {
- end_of_line (str);
- return;
- }
-
- /* Move past 'ROR'. */
- skip_whitespace (str);
- if (strncasecmp (str, "ROR", 3) == 0)
- str+=3;
+ if (strncasecmp (s, "ROR", 3) == 0)
+ s += 3;
else
{
inst.error = _("missing rotation field after comma");
- return;
- }
-
- /* Get the immediate constant. */
- skip_whitespace (str);
- if (is_immediate_prefix (* str))
- str++;
- else
- {
- inst.error = _("immediate expression expected");
- return;
- }
-
- if (my_get_expression (&expr, &str))
- {
- inst.error = _("bad expression");
- return;
+ return FAIL;
}
- if (expr.X_op != O_constant)
+ if (parse_immediate (&s, &rot, 0, 24, FALSE) == FAIL)
+ return FAIL;
+
+ switch (rot)
{
- inst.error = _("constant expression expected");
- return;
+ case 0: *str = s; return 0x0;
+ case 8: *str = s; return 0x1;
+ case 16: *str = s; return 0x2;
+ case 24: *str = s; return 0x3;
+
+ default:
+ inst.error = _("rotation can only be 0, 8, 16, or 24");
+ return FAIL;
}
-
- switch (expr.X_add_number)
- {
- case 0:
- /* Rotation field has already been zeroed. */
- break;
- case 8:
- inst.instruction |= rotation_eight_mask;
- break;
+}
- case 16:
- inst.instruction |= rotation_sixteen_mask;
- break;
-
- case 24:
- inst.instruction |= rotation_twenty_four_mask;
- break;
+/* Parse a conditional code (from conds[] below). The value returned is in the
+ range 0 .. 14, or FAIL. */
+static int
+parse_cond (char **str)
+{
+ char *p, *q;
+ const struct asm_cond *c;
- default:
- inst.error = _("rotation can be 8, 16, 24 or 0 when field is ommited");
- break;
+ p = q = *str;
+ while (ISALPHA (*q))
+ q++;
+
+ c = hash_find_n (arm_cond_hsh, p, q - p);
+ if (!c)
+ {
+ inst.error = _("condition required");
+ return FAIL;
}
- end_of_line (str);
-
+ *str = q;
+ return c->value;
}
-/* ARM V6 SXTAH extracts a 16-bit value from a register, sign
- extends it to 32-bits, and adds the result to a value in another
- register. You can specify a rotation by 0, 8, 16, or 24 bits
- before extracting the 16-bit value.
- SXTAH{<cond>} <Rd>, <Rn>, <Rm>{, <rotation>}
- Condition defaults to COND_ALWAYS.
- Error if any register uses R15. */
+/* Parse an option for a barrier instruction. Returns the encoding for the
+ option, or FAIL. */
+static int
+parse_barrier (char **str)
+{
+ char *p, *q;
+ const struct asm_barrier_opt *o;
-static void
-do_sxtah (str)
- char *str;
+ p = q = *str;
+ while (ISALPHA (*q))
+ q++;
+
+ o = hash_find_n (arm_barrier_opt_hsh, p, q - p);
+ if (!o)
+ return FAIL;
+
+ *str = q;
+ return o->value;
+}
+
+/* Parse the operands of a table branch instruction. Similar to a memory
+ operand. */
+static int
+parse_tb (char **str)
{
- int rd, rn, rm;
- expressionS expr;
- int rotation_clear_mask = 0xfffff3ff;
- int rotation_eight_mask = 0x00000400;
- int rotation_sixteen_mask = 0x00000800;
- int rotation_twenty_four_mask = 0x00000c00;
-
- skip_whitespace (str);
- if ((rd = reg_required_here (&str, 12)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rn = reg_required_here (&str, 16)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
+ char * p = *str;
+ int reg;
- else if (rd == REG_PC || rn == REG_PC || rm == REG_PC)
+ if (skip_past_char (&p, '[') == FAIL)
{
- inst.error = BAD_PC;
- return;
+ inst.error = _("'[' expected");
+ return FAIL;
}
-
- /* Zero out the rotation field. */
- inst.instruction &= rotation_clear_mask;
-
- /* Check for lack of optional rotation field. */
- if (skip_past_comma (&str) == FAIL)
+
+ if ((reg = arm_reg_parse (&p, REG_TYPE_RN)) == FAIL)
{
- end_of_line (str);
- return;
+ inst.error = _(reg_expected_msgs[REG_TYPE_RN]);
+ return FAIL;
}
-
- /* Move past 'ROR'. */
- skip_whitespace (str);
- if (strncasecmp (str, "ROR", 3) == 0)
- str+=3;
- else
+ inst.operands[0].reg = reg;
+
+ if (skip_past_comma (&p) == FAIL)
{
- inst.error = _("missing rotation field after comma");
- return;
+ inst.error = _("',' expected");
+ return FAIL;
}
- /* Get the immediate constant. */
- skip_whitespace (str);
- if (is_immediate_prefix (* str))
- str++;
- else
+ if ((reg = arm_reg_parse (&p, REG_TYPE_RN)) == FAIL)
{
- inst.error = _("immediate expression expected");
- return;
+ inst.error = _(reg_expected_msgs[REG_TYPE_RN]);
+ return FAIL;
}
-
- if (my_get_expression (&expr, &str))
+ inst.operands[0].imm = reg;
+
+ if (skip_past_comma (&p) == SUCCESS)
{
- inst.error = _("bad expression");
- return;
+ if (parse_shift (&p, 0, SHIFT_LSL_IMMEDIATE) == FAIL)
+ return FAIL;
+ if (inst.reloc.exp.X_add_number != 1)
+ {
+ inst.error = _("invalid shift");
+ return FAIL;
+ }
+ inst.operands[0].shifted = 1;
}
- if (expr.X_op != O_constant)
+ if (skip_past_char (&p, ']') == FAIL)
{
- inst.error = _("constant expression expected");
- return;
+ inst.error = _("']' expected");
+ return FAIL;
}
-
- switch (expr.X_add_number)
- {
- case 0:
- /* Rotation field has already been zeroed. */
- break;
+ *str = p;
+ return SUCCESS;
+}
- case 8:
- inst.instruction |= rotation_eight_mask;
- break;
+/* Matcher codes for parse_operands. */
+enum operand_parse_code
+{
+ OP_stop, /* end of line */
+
+ OP_RR, /* ARM register */
+ OP_RRnpc, /* ARM register, not r15 */
+ OP_RRnpcb, /* ARM register, not r15, in square brackets */
+ OP_RRw, /* ARM register, not r15, optional trailing ! */
+ OP_RCP, /* Coprocessor number */
+ OP_RCN, /* Coprocessor register */
+ OP_RF, /* FPA register */
+ OP_RVS, /* VFP single precision register */
+ OP_RVD, /* VFP double precision register */
+ OP_RVC, /* VFP control register */
+ OP_RMF, /* Maverick F register */
+ OP_RMD, /* Maverick D register */
+ OP_RMFX, /* Maverick FX register */
+ OP_RMDX, /* Maverick DX register */
+ OP_RMAX, /* Maverick AX register */
+ OP_RMDS, /* Maverick DSPSC register */
+ OP_RIWR, /* iWMMXt wR register */
+ OP_RIWC, /* iWMMXt wC register */
+ OP_RIWG, /* iWMMXt wCG register */
+ OP_RXA, /* XScale accumulator register */
+
+ OP_REGLST, /* ARM register list */
+ OP_VRSLST, /* VFP single-precision register list */
+ OP_VRDLST, /* VFP double-precision register list */
+
+ OP_I7, /* immediate value 0 .. 7 */
+ OP_I15, /* 0 .. 15 */
+ OP_I16, /* 1 .. 16 */
+ OP_I31, /* 0 .. 31 */
+ OP_I31w, /* 0 .. 31, optional trailing ! */
+ OP_I32, /* 1 .. 32 */
+ OP_I63s, /* -64 .. 63 */
+ OP_I255, /* 0 .. 255 */
+ OP_Iffff, /* 0 .. 65535 */
+
+ OP_I4b, /* immediate, prefix optional, 1 .. 4 */
+ OP_I7b, /* 0 .. 7 */
+ OP_I15b, /* 0 .. 15 */
+ OP_I31b, /* 0 .. 31 */
+
+ OP_SH, /* shifter operand */
+ OP_ADDR, /* Memory address expression (any mode) */
+ OP_EXP, /* arbitrary expression */
+ OP_EXPi, /* same, with optional immediate prefix */
+ OP_EXPr, /* same, with optional relocation suffix */
+
+ OP_CPSF, /* CPS flags */
+ OP_ENDI, /* Endianness specifier */
+ OP_PSR, /* CPSR/SPSR mask for msr */
+ OP_COND, /* conditional code */
+ OP_TB, /* Table branch. */
+
+ 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 */
+
+ /* Optional operands. */
+ OP_oI7b, /* immediate, prefix optional, 0 .. 7 */
+ OP_oI31b, /* 0 .. 31 */
+ OP_oIffffb, /* 0 .. 65535 */
+ OP_oI255c, /* curly-brace enclosed, 0 .. 255 */
+
+ OP_oRR, /* ARM register */
+ OP_oRRnpc, /* ARM register, not the PC */
+ OP_oSHll, /* LSL immediate */
+ OP_oSHar, /* ASR immediate */
+ OP_oSHllar, /* LSL or ASR immediate */
+ OP_oROR, /* ROR 0/8/16/24 */
+ OP_oBARRIER, /* Option argument for a barrier instruction. */
+
+ OP_FIRST_OPTIONAL = OP_oI7b
+};
- case 16:
- inst.instruction |= rotation_sixteen_mask;
- break;
-
- case 24:
- inst.instruction |= rotation_twenty_four_mask;
- break;
+/* Generic instruction operand parser. This does no encoding and no
+ semantic validation; it merely squirrels values away in the inst
+ structure. Returns SUCCESS or FAIL depending on whether the
+ specified grammar matched. */
+static int
+parse_operands (char *str, const unsigned char *pattern)
+{
+ unsigned const char *upat = pattern;
+ char *backtrack_pos = 0;
+ const char *backtrack_error = 0;
+ int i, val, backtrack_index = 0;
+
+#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; \
+} 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; \
+} while (0)
+
+#define po_imm_or_fail(min, max, popt) do { \
+ if (parse_immediate (&str, &val, min, max, popt) == FAIL) \
+ goto failure; \
+ inst.operands[i].imm = val; \
+} while (0)
+
+#define po_misc_or_fail(expr) do { \
+ if (expr) \
+ goto failure; \
+} while (0)
- default:
- inst.error = _("rotation can be 8, 16, 24 or 0 when field is ommited");
- break;
- }
+ skip_whitespace (str);
- end_of_line (str);
-
-}
-
+ for (i = 0; upat[i] != OP_stop; i++)
+ {
+ if (upat[i] >= OP_FIRST_OPTIONAL)
+ {
+ /* Remember where we are in case we need to backtrack. */
+ assert (!backtrack_pos);
+ backtrack_pos = str;
+ backtrack_error = inst.error;
+ backtrack_index = i;
+ }
+
+ if (i > 0)
+ po_char_or_fail (',');
+
+ switch (upat[i])
+ {
+ /* Registers */
+ case OP_oRRnpc:
+ case OP_RRnpc:
+ case OP_oRR:
+ case OP_RR: po_reg_or_fail (REG_TYPE_RN); break;
+ case OP_RCP: po_reg_or_fail (REG_TYPE_CP); break;
+ case OP_RCN: po_reg_or_fail (REG_TYPE_CN); break;
+ 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_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;
+ case OP_RMDX: po_reg_or_fail (REG_TYPE_MVDX); break;
+ case OP_RMAX: po_reg_or_fail (REG_TYPE_MVAX); break;
+ case OP_RMDS: po_reg_or_fail (REG_TYPE_DSPSC); break;
+ case OP_RIWR: po_reg_or_fail (REG_TYPE_MMXWR); break;
+ 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_RRnpcb:
+ po_char_or_fail ('[');
+ po_reg_or_fail (REG_TYPE_RN);
+ po_char_or_fail (']');
+ break;
-/* ARM V6 RFE (Return from Exception) loads the PC and CPSR from the
- word at the specified address and the following word
- respectively.
- Unconditionally executed.
- Error if Rn is R15.
-*/
+ case OP_RRw:
+ po_reg_or_fail (REG_TYPE_RN);
+ if (skip_past_char (&str, '!') == SUCCESS)
+ inst.operands[i].writeback = 1;
+ break;
-static void
-do_rfe (str)
- char *str;
-{
- int rn;
+ /* Immediates */
+ 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_I31: po_imm_or_fail ( 0, 31, FALSE); break;
+ case OP_I32: po_imm_or_fail ( 1, 32, FALSE); break;
+ case OP_I63s: po_imm_or_fail (-64, 63, 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:
+ case OP_I7b: po_imm_or_fail ( 0, 7, TRUE); break;
+ 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_oIffffb: po_imm_or_fail ( 0, 0xffff, TRUE); break;
+
+ /* Immediate variants */
+ case OP_oI255c:
+ po_char_or_fail ('{');
+ po_imm_or_fail (0, 255, TRUE);
+ po_char_or_fail ('}');
+ break;
- skip_whitespace (str);
-
- if ((rn = reg_required_here (&str, 16)) == FAIL)
- return;
+ case OP_I31w:
+ /* The expression parser chokes on a trailing !, so we have
+ to find it first and zap it. */
+ {
+ char *s = str;
+ while (*s && *s != ',')
+ s++;
+ if (s[-1] == '!')
+ {
+ s[-1] = '\0';
+ inst.operands[i].writeback = 1;
+ }
+ po_imm_or_fail (0, 31, TRUE);
+ if (str == s - 1)
+ str = s;
+ }
+ break;
- if (rn == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
+ /* Expressions */
+ case OP_EXPi: EXPi:
+ po_misc_or_fail (my_get_expression (&inst.reloc.exp, &str,
+ GE_OPT_PREFIX));
+ break;
- skip_whitespace (str);
-
- if (*str == '!')
- {
- inst.instruction |= WRITE_BACK;
- str++;
- }
- end_of_line (str);
-}
+ case OP_EXP:
+ po_misc_or_fail (my_get_expression (&inst.reloc.exp, &str,
+ GE_NO_PREFIX));
+ break;
-/* ARM V6 REV (Byte Reverse Word) reverses the byte order in a 32-bit
- register (argument parse).
- REV{<cond>} Rd, Rm.
- Condition defaults to COND_ALWAYS.
- Error if Rd or Rm are R15. */
+ case OP_EXPr: EXPr:
+ po_misc_or_fail (my_get_expression (&inst.reloc.exp, &str,
+ GE_NO_PREFIX));
+ if (inst.reloc.exp.X_op == O_symbol)
+ {
+ val = parse_reloc (&str);
+ if (val == -1)
+ {
+ inst.error = _("unrecognized relocation suffix");
+ goto failure;
+ }
+ else if (val != BFD_RELOC_UNUSED)
+ {
+ inst.operands[i].imm = val;
+ inst.operands[i].hasreloc = 1;
+ }
+ }
+ break;
-static void
-do_rev (str)
- char* str;
-{
- int rd, rm;
+ /* 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;
- skip_whitespace (str);
+ /* Register or immediate */
+ case OP_RRnpc_I0: po_reg_or_goto (REG_TYPE_RN, I0); break;
+ I0: po_imm_or_fail (0, 0, FALSE); break;
+
+ case OP_RF_IF: po_reg_or_goto (REG_TYPE_FN, IF); break;
+ IF:
+ if (!is_immediate_prefix (*str))
+ goto bad_args;
+ str++;
+ val = parse_fpa_immediate (&str);
+ if (val == FAIL)
+ goto failure;
+ /* FPA immediates are encoded as registers 8-15.
+ parse_fpa_immediate has already applied the offset. */
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ 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)
+ {
+ inst.error = _("iWMMXt data or control register expected");
+ goto failure;
+ }
+ inst.operands[i].reg = rege->number;
+ inst.operands[i].isreg = (rege->type == REG_TYPE_MMXWR);
+ }
+ break;
- if ((rd = reg_required_here (&str, 12)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL)
- inst.error = BAD_ARGS;
+ /* Misc */
+ case OP_CPSF: val = parse_cps_flags (&str); break;
+ case OP_ENDI: val = parse_endian_specifier (&str); break;
+ case OP_oROR: val = parse_ror (&str); break;
+ case OP_PSR: val = parse_psr (&str); break;
+ case OP_COND: val = parse_cond (&str); break;
+ case OP_oBARRIER:val = parse_barrier (&str); break;
- else if (rd == REG_PC || rm == REG_PC)
- inst.error = BAD_PC;
+ case OP_TB:
+ po_misc_or_fail (parse_tb (&str));
+ break;
- else
- end_of_line (str);
-}
+ /* Register lists */
+ case OP_REGLST:
+ val = parse_reg_list (&str);
+ if (*str == '^')
+ {
+ inst.operands[1].writeback = 1;
+ str++;
+ }
+ break;
-/* ARM V6 Perform Two Sixteen Bit Integer Additions. (argument parse).
- QADD16{<cond>} <Rd>, <Rn>, <Rm>
- Condition defaults to COND_ALWAYS.
- Error if Rd, Rn or Rm are R15. */
+ case OP_VRSLST:
+ val = parse_vfp_reg_list (&str, &inst.operands[i].reg, 0);
+ break;
-static void
-do_qadd16 (str)
- char* str;
-{
- int rd, rm, rn;
+ case OP_VRDLST:
+ val = parse_vfp_reg_list (&str, &inst.operands[i].reg, 1);
+ break;
- skip_whitespace (str);
+ /* Addressing modes */
+ case OP_ADDR:
+ po_misc_or_fail (parse_address (&str, i));
+ break;
- if ((rd = reg_required_here (&str, 12)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rn = reg_required_here (&str, 16)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (rm = reg_required_here (&str, 0)) == FAIL)
- inst.error = BAD_ARGS;
+ case OP_SH:
+ po_misc_or_fail (parse_shifter_operand (&str, i));
+ break;
- else if (rd == REG_PC || rm == REG_PC || rn == REG_PC)
- inst.error = BAD_PC;
+ case OP_oSHll:
+ po_misc_or_fail (parse_shift (&str, i, SHIFT_LSL_IMMEDIATE));
+ break;
- else
- end_of_line (str);
-}
+ case OP_oSHar:
+ po_misc_or_fail (parse_shift (&str, i, SHIFT_ASR_IMMEDIATE));
+ break;
-/* ARM V6 Pack Halfword Bottom Top instruction (argument parse).
- PKHBT {<cond>} <Rd>, <Rn>, <Rm> {, LSL #<shift_imm>}
- Condition defaults to COND_ALWAYS.
- Error if Rd, Rn or Rm are R15. */
+ case OP_oSHllar:
+ po_misc_or_fail (parse_shift (&str, i, SHIFT_LSL_OR_ASR_IMMEDIATE));
+ break;
-static void
-do_pkhbt (str)
- char* str;
-{
- do_pkh_core (str, SHIFT_LSL_IMMEDIATE);
-}
+ default:
+ as_fatal ("unhandled operand code %d", upat[i]);
+ }
-/* ARM V6 PKHTB (Argument Parse). */
+ /* Various value-based sanity checks and shared operations. We
+ do not signal immediate failures for the register constraints;
+ this allows a syntax error to take precedence. */
+ switch (upat[i])
+ {
+ case OP_oRRnpc:
+ case OP_RRnpc:
+ case OP_RRnpcb:
+ case OP_RRw:
+ case OP_RRnpc_I0:
+ if (inst.operands[i].isreg && inst.operands[i].reg == REG_PC)
+ inst.error = BAD_PC;
+ break;
-static void
-do_pkhtb (str)
- char* str;
-{
- do_pkh_core (str, SHIFT_ASR_IMMEDIATE);
-}
+ case OP_CPSF:
+ case OP_ENDI:
+ case OP_oROR:
+ case OP_PSR:
+ case OP_COND:
+ case OP_oBARRIER:
+ case OP_REGLST:
+ case OP_VRSLST:
+ case OP_VRDLST:
+ if (val == FAIL)
+ goto failure;
+ inst.operands[i].imm = val;
+ break;
-static void
-do_pkh_core (str, shift)
- char* str;
- int shift;
-{
- int rd, rn, rm;
+ default:
+ break;
+ }
- skip_whitespace (str);
- if (((rd = reg_required_here (&str, 12)) == FAIL)
- || (skip_past_comma (&str) == FAIL)
- || ((rn = reg_required_here (&str, 16)) == FAIL)
- || (skip_past_comma (&str) == FAIL)
- || ((rm = reg_required_here (&str, 0)) == FAIL))
- {
+ /* If we get here, this operand was successfully parsed. */
+ inst.operands[i].present = 1;
+ continue;
+
+ bad_args:
inst.error = BAD_ARGS;
- return;
- }
- else if (rd == REG_PC || rn == REG_PC || rm == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
+ failure:
+ if (!backtrack_pos)
+ {
+ /* The parse routine should already have set inst.error, but set a
+ defaut here just in case. */
+ if (!inst.error)
+ inst.error = _("syntax error");
+ return FAIL;
+ }
- /* Check for optional shift immediate constant. */
- if (skip_past_comma (&str) == FAIL)
- {
- if (shift == SHIFT_ASR_IMMEDIATE)
+ /* Do not backtrack over a trailing optional argument that
+ absorbed some text. We will only fail again, with the
+ 'garbage following instruction' error message, which is
+ probably less helpful than the current one. */
+ if (backtrack_index == i && backtrack_pos != str
+ && upat[i+1] == OP_stop)
{
- /* If the shift specifier is ommited, turn the instruction
- into pkhbt rd, rm, rn. First, switch the instruction
- code, and clear the rn and rm fields. */
- inst.instruction &= 0xfff0f010;
- /* Now, re-encode the registers. */
- inst.instruction |= (rm << 16) | rn;
+ if (!inst.error)
+ inst.error = _("syntax error");
+ return FAIL;
}
- return;
+
+ /* Try again, skipping the optional argument at backtrack_pos. */
+ str = backtrack_pos;
+ inst.error = backtrack_error;
+ inst.operands[backtrack_index].present = 0;
+ i = backtrack_index;
+ backtrack_pos = 0;
}
- decode_shift (&str, shift);
+ /* Check that we have parsed all the arguments. */
+ if (*str != '\0' && !inst.error)
+ inst.error = _("garbage following instruction");
+
+ return inst.error ? FAIL : SUCCESS;
}
-/* ARM V6 Load Register Exclusive instruction (argument parse).
- LDREX{<cond>} <Rd, [<Rn>]
- Condition defaults to COND_ALWAYS.
- Error if Rd or Rn are R15.
- See ARMARMv6 A4.1.27: LDREX. */
+#undef po_char_or_fail
+#undef po_reg_or_fail
+#undef po_reg_or_goto
+#undef po_imm_or_fail
+
+/* Shorthand macro for instruction encoding functions issuing errors. */
+#define constraint(expr, err) do { \
+ if (expr) \
+ { \
+ inst.error = err; \
+ return; \
+ } \
+} while (0)
+/* Functions for operand encoding. ARM, then Thumb. */
-static void
-do_ldrex (str)
- char * str;
+#define rotate_left(v, n) (v << n | v >> (32 - n))
+
+/* If VAL can be encoded in the immediate field of an ARM instruction,
+ return the encoded form. Otherwise, return FAIL. */
+
+static unsigned int
+encode_arm_immediate (unsigned int val)
{
- int rd, rn;
+ unsigned int a, i;
- skip_whitespace (str);
+ for (i = 0; i < 32; i += 2)
+ if ((a = rotate_left (val, i)) <= 0xff)
+ return a | (i << 7); /* 12-bit pack: [shift-cnt,const]. */
- /* Parse Rd. */
- if (((rd = reg_required_here (&str, 12)) == FAIL)
- || (skip_past_comma (&str) == FAIL))
- {
- inst.error = BAD_ARGS;
- return;
- }
- else if (rd == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
- skip_whitespace (str);
+ return FAIL;
+}
- /* Skip past '['. */
- if ((strlen (str) >= 1)
- &&strncmp (str, "[", 1) == 0)
- str+=1;
- skip_whitespace (str);
+/* If VAL can be encoded in the immediate field of a Thumb32 instruction,
+ return the encoded form. Otherwise, return FAIL. */
+static unsigned int
+encode_thumb32_immediate (unsigned int val)
+{
+ unsigned int a, i;
- /* Parse Rn. */
- if ((rn = reg_required_here (&str, 16)) == FAIL)
- {
- inst.error = BAD_ARGS;
- return;
- }
- else if (rn == REG_PC)
+ if (val <= 0xff)
+ return val;
+
+ for (i = 1; i <= 24; i++)
{
- inst.error = BAD_PC;
- return;
+ a = val >> i;
+ if ((val & ~(0xff << i)) == 0)
+ return ((val >> i) & 0x7f) | ((32 - i) << 7);
}
- skip_whitespace (str);
- /* Skip past ']'. */
- if ((strlen (str) >= 1)
- && strncmp (str, "]", 1) == 0)
- str+=1;
-
- end_of_line (str);
-}
+ a = val & 0xff;
+ if (val == ((a << 16) | a))
+ return 0x100 | a;
+ if (val == ((a << 24) | (a << 16) | (a << 8) | a))
+ return 0x300 | a;
-/* ARM V6 change processor state instruction (argument parse)
- CPS, CPSIE, CSPID . */
+ a = val & 0xff00;
+ if (val == ((a << 16) | a))
+ return 0x200 | (a >> 8);
-static void
-do_cps (str)
- char * str;
-{
- do_cps_mode (&str);
- end_of_line (str);
+ return FAIL;
}
+/* Encode a VFP SP register number into inst.instruction. */
static void
-do_cpsi (str)
- char * str;
+encode_arm_vfp_sp_reg (int reg, enum vfp_sp_reg_pos pos)
{
- do_cps_flags (&str, /*thumb_p=*/0);
-
- if (skip_past_comma (&str) == SUCCESS)
+ switch (pos)
{
- skip_whitespace (str);
- do_cps_mode (&str);
- }
- end_of_line (str);
-}
+ case VFP_REG_Sd:
+ inst.instruction |= ((reg >> 1) << 12) | ((reg & 1) << 22);
+ break;
-static void
-do_cps_mode (str)
- char **str;
-{
- expressionS expr;
+ case VFP_REG_Sn:
+ inst.instruction |= ((reg >> 1) << 16) | ((reg & 1) << 7);
+ break;
- skip_whitespace (*str);
+ case VFP_REG_Sm:
+ inst.instruction |= ((reg >> 1) << 0) | ((reg & 1) << 5);
+ break;
- if (! is_immediate_prefix (**str))
- {
- inst.error = _("immediate expression expected");
- return;
+ default:
+ abort ();
}
+}
- (*str)++; /* Strip off the immediate signifier. */
- if (my_get_expression (&expr, str))
+/* Encode a <shift> in an ARM-format instruction. The immediate,
+ if any, is handled by md_apply_fix. */
+static void
+encode_arm_shift (int i)
+{
+ if (inst.operands[i].shift_kind == SHIFT_RRX)
+ inst.instruction |= SHIFT_ROR << 5;
+ else
{
- inst.error = _("bad expression");
- return;
+ inst.instruction |= inst.operands[i].shift_kind << 5;
+ if (inst.operands[i].immisreg)
+ {
+ inst.instruction |= SHIFT_BY_REG;
+ inst.instruction |= inst.operands[i].imm << 8;
+ }
+ else
+ inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM;
}
+}
- if (expr.X_op != O_constant)
- {
- inst.error = _("constant expression expected");
- return;
- }
-
- /* The mode is a 5 bit field. Valid values are 0-31. */
- if (((unsigned) expr.X_add_number) > 31
- || (inst.reloc.exp.X_add_number) < 0)
+static void
+encode_arm_shifter_operand (int i)
+{
+ if (inst.operands[i].isreg)
{
- inst.error = _("invalid constant");
- return;
+ inst.instruction |= inst.operands[i].reg;
+ encode_arm_shift (i);
}
-
- inst.instruction |= expr.X_add_number;
+ else
+ inst.instruction |= INST_IMMEDIATE;
}
+/* Subroutine of encode_arm_addr_mode_2 and encode_arm_addr_mode_3. */
static void
-do_cps_flags (str, thumb_p)
- char **str;
- int thumb_p;
+encode_arm_addr_mode_common (int i, bfd_boolean is_t)
{
- struct cps_flag {
- char character;
- unsigned long arm_value;
- unsigned long thumb_value;
- };
- static struct cps_flag flag_table[] = {
- {'a', 0x100, 0x4 },
- {'i', 0x080, 0x2 },
- {'f', 0x040, 0x1 }
- };
-
- int saw_a_flag = 0;
+ assert (inst.operands[i].isreg);
+ inst.instruction |= inst.operands[i].reg << 16;
- skip_whitespace (*str);
-
- /* Get the a, f and i flags. */
- while (**str && **str != ',')
+ if (inst.operands[i].preind)
{
- struct cps_flag *p;
- struct cps_flag *q = flag_table + sizeof (flag_table)/sizeof (*p);
- for (p = flag_table; p < q; ++p)
- if (strncasecmp (*str, &p->character, 1) == 0)
- {
- inst.instruction |= (thumb_p ? p->thumb_value : p->arm_value);
- saw_a_flag = 1;
- break;
- }
- if (p == q)
+ if (is_t)
{
- inst.error = _("unrecognized flag");
+ inst.error = _("instruction does not accept preindexed addressing");
return;
}
- (*str)++;
- }
- if (!saw_a_flag)
- inst.error = _("no 'a', 'i', or 'f' flags for 'cps'");
-}
-
-/* THUMB V5 breakpoint instruction (argument parse)
- BKPT <immed_8>. */
-
-static void
-do_t_bkpt (str)
- char * str;
-{
- expressionS expr;
- unsigned long number;
-
- skip_whitespace (str);
-
- /* Allow optional leading '#'. */
- if (is_immediate_prefix (*str))
- str ++;
+ inst.instruction |= PRE_INDEX;
+ if (inst.operands[i].writeback)
+ inst.instruction |= WRITE_BACK;
- memset (& expr, '\0', sizeof (expr));
- if (my_get_expression (& expr, & str)
- || (expr.X_op != O_constant
- /* As a convenience we allow 'bkpt' without an operand. */
- && expr.X_op != O_absent))
+ }
+ else if (inst.operands[i].postind)
{
- inst.error = _("bad expression");
- return;
+ assert (inst.operands[i].writeback);
+ if (is_t)
+ inst.instruction |= WRITE_BACK;
}
-
- number = expr.X_add_number;
-
- /* Check it fits an 8 bit unsigned. */
- if (number != (number & 0xff))
+ else /* unindexed - only for coprocessor */
{
- inst.error = _("immediate value out of range");
+ inst.error = _("instruction does not accept unindexed addressing");
return;
}
- inst.instruction |= number;
-
- end_of_line (str);
+ if (((inst.instruction & WRITE_BACK) || !(inst.instruction & PRE_INDEX))
+ && (((inst.instruction & 0x000f0000) >> 16)
+ == ((inst.instruction & 0x0000f000) >> 12)))
+ as_warn ((inst.instruction & LOAD_BIT)
+ ? _("destination register same as write-back base")
+ : _("source register same as write-back base"));
}
-/* ARM V5 branch-link-exchange (argument parse) for BLX(1) only.
- Expects inst.instruction is set for BLX(1).
- Note: this is cloned from do_branch, and the reloc changed to be a
- new one that can cope with setting one extra bit (the H bit). */
-
+/* inst.operands[i] was set up by parse_address. Encode it into an
+ ARM-format mode 2 load or store instruction. If is_t is true,
+ reject forms that cannot be used with a T instruction (i.e. not
+ post-indexed). */
static void
-do_branch25 (str)
- char * str;
+encode_arm_addr_mode_2 (int i, bfd_boolean is_t)
{
- if (my_get_expression (& inst.reloc.exp, & str))
- return;
+ encode_arm_addr_mode_common (i, is_t);
-#ifdef OBJ_ELF
- {
- char * save_in;
-
- /* ScottB: February 5, 1998 */
- /* Check to see of PLT32 reloc required for the instruction. */
-
- /* arm_parse_reloc() works on input_line_pointer.
- We actually want to parse the operands to the branch instruction
- passed in 'str'. Save the input pointer and restore it later. */
- save_in = input_line_pointer;
- input_line_pointer = str;
-
- if (inst.reloc.exp.X_op == O_symbol
- && *str == '('
- && arm_parse_reloc () == BFD_RELOC_ARM_PLT32)
- {
- inst.reloc.type = BFD_RELOC_ARM_PLT32;
- inst.reloc.pc_rel = 0;
- /* Modify str to point to after parsed operands, otherwise
- end_of_line() will complain about the (PLT) left in str. */
- str = input_line_pointer;
- }
- else
- {
- inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX;
- inst.reloc.pc_rel = 1;
- }
-
- input_line_pointer = save_in;
- }
-#else
- inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX;
- inst.reloc.pc_rel = 1;
-#endif /* OBJ_ELF */
-
- end_of_line (str);
+ if (inst.operands[i].immisreg)
+ {
+ inst.instruction |= INST_IMMEDIATE; /* yes, this is backwards */
+ inst.instruction |= inst.operands[i].imm;
+ if (!inst.operands[i].negative)
+ inst.instruction |= INDEX_UP;
+ if (inst.operands[i].shifted)
+ {
+ if (inst.operands[i].shift_kind == SHIFT_RRX)
+ inst.instruction |= SHIFT_ROR << 5;
+ else
+ {
+ inst.instruction |= inst.operands[i].shift_kind << 5;
+ inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM;
+ }
+ }
+ }
+ else /* immediate offset in inst.reloc */
+ {
+ if (inst.reloc.type == BFD_RELOC_UNUSED)
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM;
+ }
}
-/* ARM V5 branch-link-exchange instruction (argument parse)
- BLX <target_addr> ie BLX(1)
- BLX{<condition>} <Rm> ie BLX(2)
- Unfortunately, there are two different opcodes for this mnemonic.
- So, the insns[].value is not used, and the code here zaps values
- into inst.instruction.
- Also, the <target_addr> can be 25 bits, hence has its own reloc. */
-
+/* inst.operands[i] was set up by parse_address. Encode it into an
+ ARM-format mode 3 load or store instruction. Reject forms that
+ cannot be used with such instructions. If is_t is true, reject
+ forms that cannot be used with a T instruction (i.e. not
+ post-indexed). */
static void
-do_blx (str)
- char * str;
+encode_arm_addr_mode_3 (int i, bfd_boolean is_t)
{
- char * mystr = str;
- int rm;
-
- skip_whitespace (mystr);
- rm = reg_required_here (& mystr, 0);
+ if (inst.operands[i].immisreg && inst.operands[i].shifted)
+ {
+ inst.error = _("instruction does not accept scaled register index");
+ return;
+ }
- /* The above may set inst.error. Ignore his opinion. */
- inst.error = 0;
+ encode_arm_addr_mode_common (i, is_t);
- if (rm != FAIL)
+ if (inst.operands[i].immisreg)
{
- /* Arg is a register.
- Use the condition code our caller put in inst.instruction.
- Pass ourselves off as a BX with a funny opcode. */
- inst.instruction |= 0x012fff30;
- do_bx (str);
+ inst.instruction |= inst.operands[i].imm;
+ if (!inst.operands[i].negative)
+ inst.instruction |= INDEX_UP;
}
- else
+ else /* immediate offset in inst.reloc */
{
- /* This must be is BLX <target address>, no condition allowed. */
- if (inst.instruction != COND_ALWAYS)
- {
- inst.error = BAD_COND;
- return;
- }
-
- inst.instruction = 0xfafffffe;
-
- /* Process like a B/BL, but with a different reloc.
- Note that B/BL expecte fffffe, not 0, offset in the opcode table. */
- do_branch25 (str);
+ inst.instruction |= HWOFFSET_IMM;
+ if (inst.reloc.type == BFD_RELOC_UNUSED)
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
}
}
-/* ARM V5 Thumb BLX (argument parse)
- BLX <target_addr> which is BLX(1)
- BLX <Rm> which is BLX(2)
- Unfortunately, there are two different opcodes for this mnemonic.
- So, the tinsns[].value is not used, and the code here zaps values
- into inst.instruction. */
+/* inst.operands[i] was set up by parse_address. Encode it into an
+ ARM-format instruction. Reject all forms which cannot be encoded
+ 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. */
-static void
-do_t_blx (str)
- char * str;
+static int
+encode_arm_cp_address (int i, int wb_ok, int unind_ok, int reloc_override)
{
- char * mystr = str;
- int rm;
+ inst.instruction |= inst.operands[i].reg << 16;
- skip_whitespace (mystr);
- inst.instruction = 0x4780;
+ assert (!(inst.operands[i].preind && inst.operands[i].postind));
- /* Note that this call is to the ARM register recognizer. BLX(2)
- uses the ARM register space, not the Thumb one, so a call to
- thumb_reg() would be wrong. */
- rm = reg_required_here (& mystr, 3);
- inst.error = 0;
-
- if (rm != FAIL)
+ if (!inst.operands[i].preind && !inst.operands[i].postind) /* unindexed */
{
- /* It's BLX(2). The .instruction was zapped with rm & is final. */
- inst.size = 2;
+ assert (!inst.operands[i].writeback);
+ if (!unind_ok)
+ {
+ inst.error = _("instruction does not support unindexed addressing");
+ return FAIL;
+ }
+ inst.instruction |= inst.operands[i].imm;
+ inst.instruction |= INDEX_UP;
+ return SUCCESS;
}
- else
- {
- /* No ARM register. This must be BLX(1). Change the .instruction. */
- inst.instruction = 0xf7ffeffe;
- inst.size = 4;
- if (my_get_expression (& inst.reloc.exp, & mystr))
- return;
+ if (inst.operands[i].preind)
+ inst.instruction |= PRE_INDEX;
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BLX;
- inst.reloc.pc_rel = 1;
+ if (inst.operands[i].writeback)
+ {
+ if (inst.operands[i].reg == REG_PC)
+ {
+ inst.error = _("pc may not be used with write-back");
+ return FAIL;
+ }
+ if (!wb_ok)
+ {
+ inst.error = _("instruction does not support writeback");
+ return FAIL;
+ }
+ inst.instruction |= WRITE_BACK;
}
- end_of_line (mystr);
+ 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;
+ return SUCCESS;
}
-/* ARM V5 breakpoint instruction (argument parse)
- BKPT <16 bit unsigned immediate>
- Instruction is not conditional.
- The bit pattern given in insns[] has the COND_ALWAYS condition,
- and it is an error if the caller tried to override that. */
-
-static void
-do_bkpt (str)
- char * str;
-{
- expressionS expr;
- unsigned long number;
+/* inst.reloc.exp describes an "=expr" load pseudo-operation.
+ Determine whether it can be performed with a move instruction; if
+ it can, convert inst.instruction to that move instruction and
+ return 1; if it can't, convert inst.instruction to a literal-pool
+ load and return 0. If this is not a valid thing to do in the
+ current context, set inst.error and return 1.
- skip_whitespace (str);
+ inst.operands[i] describes the destination register. */
- /* Allow optional leading '#'. */
- if (is_immediate_prefix (* str))
- str++;
+static int
+move_or_literal_pool (int i, bfd_boolean thumb_p, bfd_boolean mode_3)
+{
+ unsigned long tbit;
- memset (& expr, '\0', sizeof (expr));
+ if (thumb_p)
+ tbit = (inst.instruction > 0xffff) ? THUMB2_LOAD_BIT : THUMB_LOAD_BIT;
+ else
+ tbit = LOAD_BIT;
- if (my_get_expression (& expr, & str)
- || (expr.X_op != O_constant
- /* As a convenience we allow 'bkpt' without an operand. */
- && expr.X_op != O_absent))
+ if ((inst.instruction & tbit) == 0)
{
- inst.error = _("bad expression");
- return;
+ inst.error = _("invalid pseudo operation");
+ return 1;
}
-
- number = expr.X_add_number;
-
- /* Check it fits a 16 bit unsigned. */
- if (number != (number & 0xffff))
+ if (inst.reloc.exp.X_op != O_constant && inst.reloc.exp.X_op != O_symbol)
{
- inst.error = _("immediate value out of range");
- return;
+ inst.error = _("constant expression expected");
+ return 1;
}
+ if (inst.reloc.exp.X_op == O_constant)
+ {
+ if (thumb_p)
+ {
+ if (!unified_syntax && (inst.reloc.exp.X_add_number & ~0xFF) == 0)
+ {
+ /* This can be done with a mov(1) instruction. */
+ inst.instruction = T_OPCODE_MOV_I8 | (inst.operands[i].reg << 8);
+ inst.instruction |= inst.reloc.exp.X_add_number;
+ return 1;
+ }
+ }
+ else
+ {
+ int value = encode_arm_immediate (inst.reloc.exp.X_add_number);
+ if (value != FAIL)
+ {
+ /* This can be done with a mov instruction. */
+ inst.instruction &= LITERAL_MASK;
+ inst.instruction |= INST_IMMEDIATE | (OPCODE_MOV << DATA_OP_SHIFT);
+ inst.instruction |= value & 0xfff;
+ return 1;
+ }
- /* Top 12 of 16 bits to bits 19:8. */
- inst.instruction |= (number & 0xfff0) << 4;
-
- /* Bottom 4 of 16 bits to bits 3:0. */
- inst.instruction |= number & 0xf;
+ value = encode_arm_immediate (~inst.reloc.exp.X_add_number);
+ if (value != FAIL)
+ {
+ /* This can be done with a mvn instruction. */
+ inst.instruction &= LITERAL_MASK;
+ inst.instruction |= INST_IMMEDIATE | (OPCODE_MVN << DATA_OP_SHIFT);
+ inst.instruction |= value & 0xfff;
+ return 1;
+ }
+ }
+ }
- end_of_line (str);
+ if (add_to_lit_pool () == FAIL)
+ {
+ inst.error = _("literal pool insertion failed");
+ return 1;
+ }
+ inst.operands[1].reg = REG_PC;
+ inst.operands[1].isreg = 1;
+ inst.operands[1].preind = 1;
+ inst.reloc.pc_rel = 1;
+ inst.reloc.type = (thumb_p
+ ? BFD_RELOC_ARM_THUMB_OFFSET
+ : (mode_3
+ ? BFD_RELOC_ARM_HWLITERAL
+ : BFD_RELOC_ARM_LITERAL));
+ return 0;
}
-/* THUMB CPS instruction (argument parse). */
+/* Functions for instruction encoding, sorted by subarchitecture.
+ First some generics; their names are taken from the conventional
+ bit positions for register arguments in ARM format instructions. */
static void
-do_t_cps (str)
- char *str;
+do_noargs (void)
{
- do_cps_flags (&str, /*thumb_p=*/1);
- end_of_line (str);
}
-/* THUMB CPY instruction (argument parse). */
-
static void
-do_t_cpy (str)
- char *str;
+do_rd (void)
{
- thumb_mov_compare (str, THUMB_CPY);
+ inst.instruction |= inst.operands[0].reg << 12;
}
-/* THUMB SETEND instruction (argument parse). */
-
static void
-do_t_setend (str)
- char *str;
+do_rd_rm (void)
{
- if (do_endian_specifier (str))
- inst.instruction |= 0x8;
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg;
}
-static unsigned long check_iwmmxt_insn PARAMS ((char *, enum iwmmxt_insn_type, int));
-
-/* Parse INSN_TYPE insn STR having a possible IMMEDIATE_SIZE immediate. */
-
-static unsigned long
-check_iwmmxt_insn (str, insn_type, immediate_size)
- char * str;
- enum iwmmxt_insn_type insn_type;
- int immediate_size;
+static void
+do_rd_rn (void)
{
- int reg = 0;
- const char * inst_error;
- expressionS expr;
- unsigned long number;
-
- inst_error = inst.error;
- if (!inst.error)
- inst.error = BAD_ARGS;
- skip_whitespace (str);
-
- switch (insn_type)
- {
- case check_rd:
- if ((reg = reg_required_here (&str, 12)) == FAIL)
- return FAIL;
- break;
-
- case check_wr:
- if ((wreg_required_here (&str, 0, IWMMXT_REG_WR)) == FAIL)
- return FAIL;
- break;
-
- case check_wrwr:
- if ((wreg_required_here (&str, 12, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 16, IWMMXT_REG_WR) == FAIL))
- return FAIL;
- break;
-
- case check_wrwrwr:
- if ((wreg_required_here (&str, 12, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 16, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 0, IWMMXT_REG_WR) == FAIL))
- return FAIL;
- break;
-
- case check_wrwrwcg:
- if ((wreg_required_here (&str, 12, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 16, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 0, IWMMXT_REG_WCG) == FAIL))
- return FAIL;
- break;
-
- case check_tbcst:
- if ((wreg_required_here (&str, 16, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL))
- return FAIL;
- break;
-
- case check_tmovmsk:
- if ((reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 16, IWMMXT_REG_WR) == FAIL))
- return FAIL;
- break;
-
- case check_tmia:
- if ((wreg_required_here (&str, 5, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 0) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL))
- return FAIL;
- break;
-
- case check_tmcrr:
- if ((wreg_required_here (&str, 0, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 16) == FAIL))
- return FAIL;
- break;
-
- case check_tmrrc:
- if ((reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 16) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 0, IWMMXT_REG_WR) == FAIL))
- return FAIL;
- break;
-
- case check_tmcr:
- if ((wreg_required_here (&str, 16, IWMMXT_REG_WC) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL))
- return FAIL;
- break;
-
- case check_tmrc:
- if ((reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 16, IWMMXT_REG_WC) == FAIL))
- return FAIL;
- break;
-
- case check_tinsr:
- if ((wreg_required_here (&str, 16, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL))
- return FAIL;
- break;
-
- case check_textrc:
- if ((reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL))
- return FAIL;
- break;
-
- case check_waligni:
- if ((wreg_required_here (&str, 12, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 16, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 0, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL))
- return FAIL;
- break;
-
- case check_textrm:
- if ((reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 16, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL))
- return FAIL;
- break;
-
- case check_wshufh:
- if ((wreg_required_here (&str, 12, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL
- || wreg_required_here (&str, 16, IWMMXT_REG_WR) == FAIL
- || skip_past_comma (&str) == FAIL))
- return FAIL;
- break;
- }
-
- if (immediate_size == 0)
- {
- end_of_line (str);
- inst.error = inst_error;
- return reg;
- }
- else
- {
- skip_whitespace (str);
-
- /* Allow optional leading '#'. */
- if (is_immediate_prefix (* str))
- str++;
-
- memset (& expr, '\0', sizeof (expr));
-
- if (my_get_expression (& expr, & str) || (expr.X_op != O_constant))
- {
- inst.error = _("bad or missing expression");
- return FAIL;
- }
-
- number = expr.X_add_number;
-
- if (number != (number & immediate_size))
- {
- inst.error = _("immediate value out of range");
- return FAIL;
- }
- end_of_line (str);
- inst.error = inst_error;
- return number;
- }
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
}
static void
-do_iwmmxt_byte_addr (str)
- char * str;
+do_rn_rd (void)
{
- int op = (inst.instruction & 0x300) >> 8;
- int reg;
-
- inst.instruction &= ~0x300;
- inst.instruction |= (op & 1) << 22 | (op & 2) << 7;
-
- skip_whitespace (str);
-
- if ((reg = wreg_required_here (&str, 12, IWMMXT_REG_WR_OR_WC)) == FAIL
- || skip_past_comma (& str) == FAIL
- || cp_byte_address_required_here (&str) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- }
- else
- end_of_line (str);
-
- if (wc_register (reg))
- {
- as_bad (_("non-word size not supported with control register"));
- inst.instruction |= 0xf0000100;
- inst.instruction &= ~0x00400000;
- }
+ inst.instruction |= inst.operands[0].reg << 16;
+ inst.instruction |= inst.operands[1].reg << 12;
}
static void
-do_iwmmxt_tandc (str)
- char * str;
+do_rd_rm_rn (void)
{
- int reg;
-
- reg = check_iwmmxt_insn (str, check_rd, 0);
-
- if (reg != REG_PC && !inst.error)
- inst.error = _("only r15 allowed here");
+ unsigned Rn = inst.operands[2].reg;
+ /* Enforce resutrictions 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"));
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= Rn << 16;
}
static void
-do_iwmmxt_tbcst (str)
- char * str;
+do_rd_rn_rm (void)
{
- check_iwmmxt_insn (str, check_tbcst, 0);
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
}
static void
-do_iwmmxt_textrc (str)
- char * str;
+do_rm_rd_rn (void)
{
- unsigned long number;
-
- if ((number = check_iwmmxt_insn (str, check_textrc, 7)) == (unsigned long) FAIL)
- return;
-
- inst.instruction |= number & 0x7;
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 12;
+ inst.instruction |= inst.operands[2].reg << 16;
}
static void
-do_iwmmxt_textrm (str)
- char * str;
+do_imm0 (void)
{
- unsigned long number;
-
- if ((number = check_iwmmxt_insn (str, check_textrm, 7)) == (unsigned long) FAIL)
- return;
-
- inst.instruction |= number & 0x7;
+ inst.instruction |= inst.operands[0].imm;
}
static void
-do_iwmmxt_tinsr (str)
- char * str;
+do_rd_cpaddr (void)
{
- unsigned long number;
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_cp_address (1, TRUE, TRUE, 0);
+}
- if ((number = check_iwmmxt_insn (str, check_tinsr, 7)) == (unsigned long) FAIL)
- return;
+/* ARM instructions, in alphabetical order by function name (except
+ that wrapper functions appear immediately after the function they
+ wrap). */
- inst.instruction |= number & 0x7;
-}
+/* This is a pseudo-op of the form "adr rd, label" to be converted
+ into a relative address of the form "add rd, pc, #label-.-8". */
static void
-do_iwmmxt_tmcr (str)
- char * str;
+do_adr (void)
{
- check_iwmmxt_insn (str, check_tmcr, 0);
-}
+ inst.instruction |= (inst.operands[0].reg << 12); /* Rd */
-static void
-do_iwmmxt_tmcrr (str)
- char * str;
-{
- check_iwmmxt_insn (str, check_tmcrr, 0);
+ /* Frag hacking will turn this into a sub instruction if the offset turns
+ out to be negative. */
+ inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
+ inst.reloc.pc_rel = 1;
+ inst.reloc.exp.X_add_number -= 8;
}
-static void
-do_iwmmxt_tmia (str)
- char * str;
-{
- check_iwmmxt_insn (str, check_tmia, 0);
-}
+/* This is a pseudo-op of the form "adrl rd, label" to be converted
+ into a relative address of the form:
+ add rd, pc, #low(label-.-8)"
+ add rd, rd, #high(label-.-8)" */
static void
-do_iwmmxt_tmovmsk (str)
- char * str;
+do_adrl (void)
{
- check_iwmmxt_insn (str, check_tmovmsk, 0);
+ inst.instruction |= (inst.operands[0].reg << 12); /* Rd */
+
+ /* Frag hacking will turn this into a sub instruction if the offset turns
+ out to be negative. */
+ inst.reloc.type = BFD_RELOC_ARM_ADRL_IMMEDIATE;
+ inst.reloc.pc_rel = 1;
+ inst.size = INSN_SIZE * 2;
+ inst.reloc.exp.X_add_number -= 8;
}
static void
-do_iwmmxt_tmrc (str)
- char * str;
+do_arit (void)
{
- check_iwmmxt_insn (str, check_tmrc, 0);
+ if (!inst.operands[1].present)
+ inst.operands[1].reg = inst.operands[0].reg;
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ encode_arm_shifter_operand (2);
}
static void
-do_iwmmxt_tmrrc (str)
- char * str;
+do_barrier (void)
{
- check_iwmmxt_insn (str, check_tmrrc, 0);
+ if (inst.operands[0].present)
+ {
+ constraint ((inst.instruction & 0xf0) != 0x40
+ && inst.operands[0].imm != 0xf,
+ "bad barrier type");
+ inst.instruction |= inst.operands[0].imm;
+ }
+ else
+ inst.instruction |= 0xf;
}
static void
-do_iwmmxt_torc (str)
- char * str;
+do_bfc (void)
{
- check_iwmmxt_insn (str, check_rd, 0);
+ unsigned int msb = inst.operands[1].imm + inst.operands[2].imm;
+ constraint (msb > 32, _("bit-field extends past end of register"));
+ /* The instruction encoding stores the LSB and MSB,
+ not the LSB and width. */
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].imm << 7;
+ inst.instruction |= (msb - 1) << 16;
}
static void
-do_iwmmxt_waligni (str)
- char * str;
+do_bfi (void)
{
- unsigned long number;
+ unsigned int msb;
- if ((number = check_iwmmxt_insn (str, check_waligni, 7)) == (unsigned long) FAIL)
- return;
+ /* #0 in second position is alternative syntax for bfc, which is
+ the same instruction but with REG_PC in the Rm field. */
+ if (!inst.operands[1].isreg)
+ inst.operands[1].reg = REG_PC;
- inst.instruction |= ((number & 0x7) << 20);
+ msb = inst.operands[2].imm + inst.operands[3].imm;
+ constraint (msb > 32, _("bit-field extends past end of register"));
+ /* The instruction encoding stores the LSB and MSB,
+ not the LSB and width. */
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].imm << 7;
+ inst.instruction |= (msb - 1) << 16;
}
static void
-do_iwmmxt_wmov (str)
- char * str;
+do_bfx (void)
{
- if (check_iwmmxt_insn (str, check_wrwr, 0) == (unsigned long) FAIL)
- return;
-
- inst.instruction |= ((inst.instruction >> 16) & 0xf);
+ constraint (inst.operands[2].imm + inst.operands[3].imm > 32,
+ _("bit-field extends past end of register"));
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].imm << 7;
+ inst.instruction |= (inst.operands[3].imm - 1) << 16;
}
+/* ARM V5 breakpoint instruction (argument parse)
+ BKPT <16 bit unsigned immediate>
+ Instruction is not conditional.
+ The bit pattern given in insns[] has the COND_ALWAYS condition,
+ and it is an error if the caller tried to override that. */
+
static void
-do_iwmmxt_word_addr (str)
- char * str;
+do_bkpt (void)
{
- int op = (inst.instruction & 0x300) >> 8;
- int reg;
-
- inst.instruction &= ~0x300;
- inst.instruction |= (op & 1) << 22 | (op & 2) << 7;
+ /* Top 12 of 16 bits to bits 19:8. */
+ inst.instruction |= (inst.operands[0].imm & 0xfff0) << 4;
- skip_whitespace (str);
+ /* Bottom 4 of 16 bits to bits 3:0. */
+ inst.instruction |= inst.operands[0].imm & 0xf;
+}
- if ((reg = wreg_required_here (&str, 12, IWMMXT_REG_WR_OR_WC)) == FAIL
- || skip_past_comma (& str) == FAIL
- || cp_address_required_here (& str, CP_WB_OK) == FAIL)
+static void
+encode_branch (int default_reloc)
+{
+ if (inst.operands[0].hasreloc)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
+ constraint (inst.operands[0].imm != BFD_RELOC_ARM_PLT32,
+ _("the only suffix valid here is '(plt)'"));
+ inst.reloc.type = BFD_RELOC_ARM_PLT32;
}
else
- end_of_line (str);
-
- if (wc_register (reg))
{
- if ((inst.instruction & COND_MASK) != COND_ALWAYS)
- as_bad (_("conditional execution not supported with control register"));
- if (op != 2)
- as_bad (_("non-word size not supported with control register"));
- inst.instruction |= 0xf0000100;
- inst.instruction &= ~0x00400000;
+ inst.reloc.type = default_reloc;
}
+ inst.reloc.pc_rel = 1;
}
static void
-do_iwmmxt_wrwr (str)
- char * str;
+do_branch (void)
{
- check_iwmmxt_insn (str, check_wrwr, 0);
+#ifdef OBJ_ELF
+ if (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4)
+ encode_branch (BFD_RELOC_ARM_PCREL_JUMP);
+ else
+#endif
+ encode_branch (BFD_RELOC_ARM_PCREL_BRANCH);
}
static void
-do_iwmmxt_wrwrwcg (str)
- char * str;
+do_bl (void)
{
- check_iwmmxt_insn (str, check_wrwrwcg, 0);
+#ifdef OBJ_ELF
+ if (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4)
+ {
+ if (inst.cond == COND_ALWAYS)
+ encode_branch (BFD_RELOC_ARM_PCREL_CALL);
+ else
+ encode_branch (BFD_RELOC_ARM_PCREL_JUMP);
+ }
+ else
+#endif
+ encode_branch (BFD_RELOC_ARM_PCREL_BRANCH);
}
-static void
-do_iwmmxt_wrwrwr (str)
- char * str;
-{
- check_iwmmxt_insn (str, check_wrwrwr, 0);
-}
+/* ARM V5 branch-link-exchange instruction (argument parse)
+ BLX <target_addr> ie BLX(1)
+ BLX{<condition>} <Rm> ie BLX(2)
+ Unfortunately, there are two different opcodes for this mnemonic.
+ So, the insns[].value is not used, and the code here zaps values
+ into inst.instruction.
+ Also, the <target_addr> can be 25 bits, hence has its own reloc. */
static void
-do_iwmmxt_wshufh (str)
- char * str;
+do_blx (void)
{
- unsigned long number;
-
- if ((number = check_iwmmxt_insn (str, check_wshufh, 0xff)) == (unsigned long) FAIL)
- return;
+ if (inst.operands[0].isreg)
+ {
+ /* Arg is a register; the opcode provided by insns[] is correct.
+ It is not illegal to do "blx pc", just useless. */
+ if (inst.operands[0].reg == REG_PC)
+ as_tsktsk (_("use of r15 in blx in ARM mode is not really useful"));
- inst.instruction |= ((number & 0xf0) << 16) | (number & 0xf);
+ inst.instruction |= inst.operands[0].reg;
+ }
+ else
+ {
+ /* Arg is an address; this instruction cannot be executed
+ conditionally, and the opcode must be adjusted. */
+ constraint (inst.cond != COND_ALWAYS, BAD_COND);
+ inst.instruction = 0xfa000000;
+#ifdef OBJ_ELF
+ if (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4)
+ encode_branch (BFD_RELOC_ARM_PCREL_CALL);
+ else
+#endif
+ encode_branch (BFD_RELOC_ARM_PCREL_BLX);
+ }
}
static void
-do_iwmmxt_wzero (str)
- char * str;
+do_bx (void)
{
- if (check_iwmmxt_insn (str, check_wr, 0) == (unsigned long) FAIL)
- return;
+ if (inst.operands[0].reg == REG_PC)
+ as_tsktsk (_("use of r15 in bx in ARM mode is not really useful"));
- inst.instruction |= ((inst.instruction & 0xf) << 12) | ((inst.instruction & 0xf) << 16);
+ inst.instruction |= inst.operands[0].reg;
}
-/* Xscale multiply-accumulate (argument parse)
- MIAcc acc0,Rm,Rs
- MIAPHcc acc0,Rm,Rs
- MIAxycc acc0,Rm,Rs. */
+
+/* ARM v5TEJ. Jump to Jazelle code. */
static void
-do_xsc_mia (str)
- char * str;
+do_bxj (void)
{
- int rs;
- int rm;
-
- if (accum0_required_here (& str) == FAIL)
- inst.error = ERR_NO_ACCUM;
-
- else if (skip_past_comma (& str) == FAIL
- || (rm = reg_required_here (& str, 0)) == FAIL)
- inst.error = BAD_ARGS;
-
- else if (skip_past_comma (& str) == FAIL
- || (rs = reg_required_here (& str, 12)) == FAIL)
- inst.error = BAD_ARGS;
-
- /* inst.instruction has now been zapped with both rm and rs. */
- else if (rm == REG_PC || rs == REG_PC)
- inst.error = BAD_PC; /* Undefined result if rm or rs is R15. */
+ if (inst.operands[0].reg == REG_PC)
+ as_tsktsk (_("use of r15 in bxj is not really useful"));
- else
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg;
}
-/* Xscale move-accumulator-register (argument parse)
-
- MARcc acc0,RdLo,RdHi. */
-
+/* Co-processor data operation:
+ CDP{cond} <coproc>, <opcode_1>, <CRd>, <CRn>, <CRm>{, <opcode_2>}
+ CDP2 <coproc>, <opcode_1>, <CRd>, <CRn>, <CRm>{, <opcode_2>} */
static void
-do_xsc_mar (str)
- char * str;
+do_cdp (void)
{
- int rdlo, rdhi;
-
- if (accum0_required_here (& str) == FAIL)
- inst.error = ERR_NO_ACCUM;
-
- else if (skip_past_comma (& str) == FAIL
- || (rdlo = reg_required_here (& str, 12)) == FAIL)
- inst.error = BAD_ARGS;
-
- else if (skip_past_comma (& str) == FAIL
- || (rdhi = reg_required_here (& str, 16)) == FAIL)
- inst.error = BAD_ARGS;
-
- /* inst.instruction has now been zapped with both rdlo and rdhi. */
- else if (rdlo == REG_PC || rdhi == REG_PC)
- inst.error = BAD_PC; /* Undefined result if rdlo or rdhi is R15. */
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm << 20;
+ inst.instruction |= inst.operands[2].reg << 12;
+ inst.instruction |= inst.operands[3].reg << 16;
+ inst.instruction |= inst.operands[4].reg;
+ inst.instruction |= inst.operands[5].imm << 5;
+}
- else
- end_of_line (str);
+static void
+do_cmp (void)
+{
+ inst.instruction |= inst.operands[0].reg << 16;
+ encode_arm_shifter_operand (1);
}
-/* Xscale move-register-accumulator (argument parse)
+/* Transfer between coprocessor and ARM registers.
+ MRC{cond} <coproc>, <opcode_1>, <Rd>, <CRn>, <CRm>{, <opcode_2>}
+ MRC2
+ MCR{cond}
+ MCR2
- MRAcc RdLo,RdHi,acc0. */
+ No special properties. */
static void
-do_xsc_mra (str)
- char * str;
+do_co_reg (void)
{
- int rdlo;
- int rdhi;
-
- skip_whitespace (str);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm << 21;
+ inst.instruction |= inst.operands[2].reg << 12;
+ inst.instruction |= inst.operands[3].reg << 16;
+ inst.instruction |= inst.operands[4].reg;
+ inst.instruction |= inst.operands[5].imm << 5;
+}
- if ((rdlo = reg_required_here (& str, 12)) == FAIL)
- inst.error = BAD_ARGS;
+/* Transfer between coprocessor register and pair of ARM registers.
+ MCRR{cond} <coproc>, <opcode>, <Rd>, <Rn>, <CRm>.
+ MCRR2
+ MRRC{cond}
+ MRRC2
- else if (skip_past_comma (& str) == FAIL
- || (rdhi = reg_required_here (& str, 16)) == FAIL)
- inst.error = BAD_ARGS;
+ Two XScale instructions are special cases of these:
- else if (skip_past_comma (& str) == FAIL
- || accum0_required_here (& str) == FAIL)
- inst.error = ERR_NO_ACCUM;
+ MAR{cond} acc0, <RdLo>, <RdHi> == MCRR{cond} p0, #0, <RdLo>, <RdHi>, c0
+ MRA{cond} acc0, <RdLo>, <RdHi> == MRRC{cond} p0, #0, <RdLo>, <RdHi>, c0
- /* inst.instruction has now been zapped with both rdlo and rdhi. */
- else if (rdlo == rdhi)
- inst.error = BAD_ARGS; /* Undefined result if 2 writes to same reg. */
+ Result unpredicatable if Rd or Rn is R15. */
- else if (rdlo == REG_PC || rdhi == REG_PC)
- inst.error = BAD_PC; /* Undefined result if rdlo or rdhi is R15. */
- else
- end_of_line (str);
+static void
+do_co_reg2c (void)
+{
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm << 4;
+ inst.instruction |= inst.operands[2].reg << 12;
+ inst.instruction |= inst.operands[3].reg << 16;
+ inst.instruction |= inst.operands[4].reg;
}
-/* ARMv5TE: Preload-Cache
-
- PLD <addr_mode>
-
- Syntactically, like LDR with B=1, W=0, L=1. */
-
static void
-do_pld (str)
- char * str;
+do_cpsi (void)
{
- int rd;
-
- skip_whitespace (str);
+ inst.instruction |= inst.operands[0].imm << 6;
+ inst.instruction |= inst.operands[1].imm;
+}
- if (* str != '[')
- {
- inst.error = _("'[' expected after PLD mnemonic");
- return;
- }
+static void
+do_dbg (void)
+{
+ inst.instruction |= inst.operands[0].imm;
+}
- ++str;
- skip_whitespace (str);
+static void
+do_it (void)
+{
+ /* There is no IT instruction in ARM mode. We
+ process it but do not generate code for it. */
+ inst.size = 0;
+}
- if ((rd = reg_required_here (& str, 16)) == FAIL)
- return;
+static void
+do_ldmstm (void)
+{
+ int base_reg = inst.operands[0].reg;
+ int range = inst.operands[1].imm;
- skip_whitespace (str);
+ inst.instruction |= base_reg << 16;
+ inst.instruction |= range;
- if (*str == ']')
- {
- /* [Rn], ... ? */
- ++str;
- skip_whitespace (str);
+ if (inst.operands[1].writeback)
+ inst.instruction |= LDM_TYPE_2_OR_3;
- /* Post-indexed addressing is not allowed with PLD. */
- if (skip_past_comma (&str) == SUCCESS)
- {
- inst.error
- = _("post-indexed expression used in preload instruction");
- return;
- }
- else if (*str == '!') /* [Rn]! */
- {
- inst.error = _("writeback used in preload instruction");
- ++str;
- }
- else /* [Rn] */
- inst.instruction |= INDEX_UP | PRE_INDEX;
- }
- else /* [Rn, ...] */
+ if (inst.operands[0].writeback)
{
- if (skip_past_comma (& str) == FAIL)
- {
- inst.error = _("pre-indexed expression expected");
- return;
- }
-
- if (ldst_extend (&str) == FAIL)
- return;
-
- skip_whitespace (str);
-
- if (* str != ']')
+ inst.instruction |= WRITE_BACK;
+ /* Check for unpredictable uses of writeback. */
+ if (inst.instruction & LOAD_BIT)
{
- inst.error = _("missing ]");
- return;
+ /* Not allowed in LDM type 2. */
+ if ((inst.instruction & LDM_TYPE_2_OR_3)
+ && ((range & (1 << REG_PC)) == 0))
+ as_warn (_("writeback of base register is UNPREDICTABLE"));
+ /* Only allowed if base reg not in list for other types. */
+ else if (range & (1 << base_reg))
+ as_warn (_("writeback of base register when in register list is UNPREDICTABLE"));
}
-
- ++ str;
- skip_whitespace (str);
-
- if (* str == '!') /* [Rn]! */
+ else /* STM. */
{
- inst.error = _("writeback used in preload instruction");
- ++ str;
+ /* Not allowed for type 2. */
+ if (inst.instruction & LDM_TYPE_2_OR_3)
+ as_warn (_("writeback of base register is UNPREDICTABLE"));
+ /* Only allowed if base reg not in list, or first in list. */
+ else if ((range & (1 << base_reg))
+ && (range & ((1 << base_reg) - 1)))
+ as_warn (_("if writeback register is in list, it must be the lowest reg in the list"));
}
-
- inst.instruction |= PRE_INDEX;
}
-
- end_of_line (str);
}
/* ARMv5TE load-consecutive (argument parse)
@@ -6669,5496 +4957,6618 @@ do_pld (str)
STRccD R, mode. */
static void
-do_ldrd (str)
- char * str;
+do_ldrd (void)
{
- int rd;
- int rn;
-
- skip_whitespace (str);
+ constraint (inst.operands[0].reg % 2 != 0,
+ _("first destination register must be even"));
+ constraint (inst.operands[1].present
+ && inst.operands[1].reg != inst.operands[0].reg + 1,
+ _("can only load two consecutive registers"));
+ constraint (inst.operands[0].reg == REG_LR, _("r14 not allowed here"));
+ constraint (!inst.operands[2].isreg, _("'[' expected"));
- if ((rd = reg_required_here (& str, 12)) == FAIL)
+ if (!inst.operands[1].present)
+ inst.operands[1].reg = inst.operands[0].reg + 1;
+
+ if (inst.instruction & LOAD_BIT)
{
- inst.error = BAD_ARGS;
- return;
- }
+ /* encode_arm_addr_mode_3 will diagnose overlap between the base
+ register and the first register written; we have to diagnose
+ overlap between the base and the second register written here. */
- if (skip_past_comma (& str) == FAIL
- || (rn = ld_mode_required_here (& str)) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ if (inst.operands[2].reg == inst.operands[1].reg
+ && (inst.operands[2].writeback || inst.operands[2].postind))
+ as_warn (_("base register written back, and overlaps "
+ "second destination register"));
- /* inst.instruction has now been zapped with Rd and the addressing mode. */
- if (rd & 1) /* Unpredictable result if Rd is odd. */
- {
- inst.error = _("destination register must be even");
- return;
+ /* For an index-register load, the index register must not overlap the
+ destination (even if not write-back). */
+ else if (inst.operands[2].immisreg
+ && ((unsigned) inst.operands[2].imm == inst.operands[0].reg
+ || (unsigned) inst.operands[2].imm == inst.operands[1].reg))
+ as_warn (_("index register overlaps destination register"));
}
- if (rd == REG_LR)
- {
- inst.error = _("r14 not allowed here");
- return;
- }
-
- if (((rd == rn) || (rd + 1 == rn))
- && ((inst.instruction & WRITE_BACK)
- || (!(inst.instruction & PRE_INDEX))))
- as_warn (_("pre/post-indexing used when modified address register is destination"));
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_addr_mode_3 (2, /*is_t=*/FALSE);
+}
- /* For an index-register load, the index register must not overlap the
- destination (even if not write-back). */
- if ((inst.instruction & V4_STR_BIT) == 0
- && (inst.instruction & HWOFFSET_IMM) == 0)
- {
- int rm = inst.instruction & 0x0000000f;
+static void
+do_ldrex (void)
+{
+ constraint (!inst.operands[1].isreg || !inst.operands[1].preind
+ || inst.operands[1].postind || inst.operands[1].writeback
+ || inst.operands[1].immisreg || inst.operands[1].shifted
+ || inst.operands[1].negative
+ /* This can arise if the programmer has written
+ strex rN, rM, foo
+ or if they have mistakenly used a register name as the last
+ operand, eg:
+ strex rN, rM, rX
+ It is very difficult to distinguish between these two cases
+ because "rX" might actually be a label. ie the register
+ name has been occluded by a symbol of the same name. So we
+ just generate a general 'bad addressing mode' type error
+ message and leave it up to the programmer to discover the
+ true cause and fix their mistake. */
+ || (inst.operands[1].reg == REG_PC),
+ BAD_ADDR_MODE);
- if (rm == rd || (rm == rd + 1))
- as_warn (_("ldrd destination registers must not overlap index register"));
- }
+ constraint (inst.reloc.exp.X_op != O_constant
+ || inst.reloc.exp.X_add_number != 0,
+ _("offset must be zero in ARM encoding"));
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.reloc.type = BFD_RELOC_UNUSED;
}
-/* Returns the index into fp_values of a floating point number,
- or -1 if not in the table. */
-
-static int
-my_get_float_expression (str)
- char ** str;
+static void
+do_ldrexd (void)
{
- LITTLENUM_TYPE words[MAX_LITTLENUMS];
- char * save_in;
- expressionS exp;
- int i;
- int j;
+ constraint (inst.operands[0].reg % 2 != 0,
+ _("even register required"));
+ constraint (inst.operands[1].present
+ && inst.operands[1].reg != inst.operands[0].reg + 1,
+ _("can only load two consecutive registers"));
+ /* If op 1 were present and equal to PC, this function wouldn't
+ have been called in the first place. */
+ constraint (inst.operands[0].reg == REG_LR, _("r14 not allowed here"));
- memset (words, 0, MAX_LITTLENUMS * sizeof (LITTLENUM_TYPE));
-
- /* Look for a raw floating point number. */
- if ((save_in = atof_ieee (*str, 'x', words)) != NULL
- && is_end_of_line[(unsigned char) *save_in])
- {
- for (i = 0; i < NUM_FLOAT_VALS; i++)
- {
- for (j = 0; j < MAX_LITTLENUMS; j++)
- {
- if (words[j] != fp_values[i][j])
- break;
- }
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[2].reg << 16;
+}
- if (j == MAX_LITTLENUMS)
- {
- *str = save_in;
- return i;
- }
- }
- }
+static void
+do_ldst (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ if (!inst.operands[1].isreg)
+ if (move_or_literal_pool (0, /*thumb_p=*/FALSE, /*mode_3=*/FALSE))
+ return;
+ encode_arm_addr_mode_2 (1, /*is_t=*/FALSE);
+}
- /* Try and parse a more complex expression, this will probably fail
- unless the code uses a floating point prefix (eg "0f"). */
- save_in = input_line_pointer;
- input_line_pointer = *str;
- if (expression (&exp) == absolute_section
- && exp.X_op == O_big
- && exp.X_add_number < 0)
+static void
+do_ldstt (void)
+{
+ /* ldrt/strt always use post-indexed addressing. Turn [Rn] into [Rn]! and
+ reject [Rn,...]. */
+ if (inst.operands[1].preind)
{
- /* FIXME: 5 = X_PRECISION, should be #define'd where we can use it.
- Ditto for 15. */
- if (gen_to_words (words, 5, (long) 15) == 0)
- {
- for (i = 0; i < NUM_FLOAT_VALS; i++)
- {
- for (j = 0; j < MAX_LITTLENUMS; j++)
- {
- if (words[j] != fp_values[i][j])
- break;
- }
+ constraint (inst.reloc.exp.X_op != O_constant ||
+ inst.reloc.exp.X_add_number != 0,
+ _("this instruction requires a post-indexed address"));
- if (j == MAX_LITTLENUMS)
- {
- *str = input_line_pointer;
- input_line_pointer = save_in;
- return i;
- }
- }
- }
+ inst.operands[1].preind = 0;
+ inst.operands[1].postind = 1;
+ inst.operands[1].writeback = 1;
}
-
- *str = input_line_pointer;
- input_line_pointer = save_in;
- return -1;
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_addr_mode_2 (1, /*is_t=*/TRUE);
}
-/* Return TRUE if anything in the expression is a bignum. */
+/* Halfword and signed-byte load/store operations. */
-static int
-walk_no_bignums (sp)
- symbolS * sp;
+static void
+do_ldstv4 (void)
{
- if (symbol_get_value_expression (sp)->X_op == O_big)
- return 1;
+ inst.instruction |= inst.operands[0].reg << 12;
+ if (!inst.operands[1].isreg)
+ if (move_or_literal_pool (0, /*thumb_p=*/FALSE, /*mode_3=*/TRUE))
+ return;
+ encode_arm_addr_mode_3 (1, /*is_t=*/FALSE);
+}
- if (symbol_get_value_expression (sp)->X_add_symbol)
+static void
+do_ldsttv4 (void)
+{
+ /* ldrt/strt always use post-indexed addressing. Turn [Rn] into [Rn]! and
+ reject [Rn,...]. */
+ if (inst.operands[1].preind)
{
- 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)));
- }
+ constraint (inst.reloc.exp.X_op != O_constant ||
+ inst.reloc.exp.X_add_number != 0,
+ _("this instruction requires a post-indexed address"));
- return 0;
+ inst.operands[1].preind = 0;
+ inst.operands[1].postind = 1;
+ inst.operands[1].writeback = 1;
+ }
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_addr_mode_3 (1, /*is_t=*/TRUE);
}
-static int in_my_get_expression = 0;
+/* Co-processor register load/store.
+ Format: <LDC|STC>{cond}[L] CP#,CRd,<address> */
+static void
+do_lstc (void)
+{
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 12;
+ encode_arm_cp_address (2, TRUE, TRUE, 0);
+}
-static int
-my_get_expression (ep, str)
- expressionS * ep;
- char ** str;
+static void
+do_mlas (void)
{
- char * save_in;
- segT seg;
+ /* This restriction does not apply to mls (nor to mla in v6, but
+ that's hard to detect at present). */
+ if (inst.operands[0].reg == inst.operands[1].reg
+ && !(inst.instruction & 0x00400000))
+ as_tsktsk (_("rd and rm should be different in mla"));
- save_in = input_line_pointer;
- input_line_pointer = *str;
- in_my_get_expression = 1;
- seg = expression (ep);
- in_my_get_expression = 0;
+ 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;
- if (ep->X_op == O_illegal)
- {
- /* We found a bad expression in md_operand(). */
- *str = input_line_pointer;
- input_line_pointer = save_in;
- return 1;
- }
+}
-#ifdef OBJ_AOUT
- if (seg != absolute_section
- && seg != text_section
- && seg != data_section
- && seg != bss_section
- && seg != undefined_section)
- {
- inst.error = _("bad_segment");
- *str = input_line_pointer;
- input_line_pointer = save_in;
- return 1;
- }
-#endif
+static void
+do_mov (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_shifter_operand (1);
+}
- /* Get rid of any bignums now, so that we don't generate an error for which
- we can't establish a line number later on. Big numbers are never valid
- in instructions, which is where this routine is always called. */
- if (ep->X_op == O_big
- || (ep->X_add_symbol
- && (walk_no_bignums (ep->X_add_symbol)
- || (ep->X_op_symbol
- && walk_no_bignums (ep->X_op_symbol)))))
- {
- inst.error = _("invalid constant");
- *str = input_line_pointer;
- input_line_pointer = save_in;
- return 1;
- }
+/* ARM V6T2 16-bit immediate register load: MOV[WT]{cond} Rd, #<imm16>. */
+static void
+do_mov16 (void)
+{
+ 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;
+}
- *str = input_line_pointer;
- input_line_pointer = save_in;
- return 0;
+static void
+do_mrs (void)
+{
+ /* 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),
+ _("'CPSR' or 'SPSR' expected"));
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= (inst.operands[1].imm & SPSR_BIT);
}
-/* We handle all bad expressions here, so that we can report the faulty
- instruction in the error message. */
-void
-md_operand (expr)
- expressionS *expr;
+/* Two possible forms:
+ "{C|S}PSR_<field>, Rm",
+ "{C|S}PSR_f, #expression". */
+
+static void
+do_msr (void)
{
- if (in_my_get_expression)
+ inst.instruction |= inst.operands[0].imm;
+ if (inst.operands[1].isreg)
+ inst.instruction |= inst.operands[1].reg;
+ else
{
- expr->X_op = O_illegal;
- if (inst.error == NULL)
- inst.error = _("bad expression");
+ inst.instruction |= INST_IMMEDIATE;
+ inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
+ inst.reloc.pc_rel = 0;
}
}
-/* KIND indicates what kind of shifts are accepted. */
-
-static int
-decode_shift (str, kind)
- char ** str;
- int kind;
+static void
+do_mul (void)
{
- const struct asm_shift_name * shift;
- char * p;
- char c;
+ if (!inst.operands[2].present)
+ inst.operands[2].reg = inst.operands[0].reg;
+ inst.instruction |= inst.operands[0].reg << 16;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].reg << 8;
- skip_whitespace (* str);
+ if (inst.operands[0].reg == inst.operands[1].reg)
+ as_tsktsk (_("rd and rm should be different in mul"));
+}
- for (p = * str; ISALPHA (* p); p ++)
- ;
+/* Long Multiply Parser
+ UMULL RdLo, RdHi, Rm, Rs
+ SMULL RdLo, RdHi, Rm, Rs
+ UMLAL RdLo, RdHi, Rm, Rs
+ SMLAL RdLo, RdHi, Rm, Rs. */
- if (p == * str)
- {
- inst.error = _("shift expression expected");
- return FAIL;
- }
+static void
+do_mull (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].reg << 8;
- c = * p;
- * p = '\0';
- shift = (const struct asm_shift_name *) hash_find (arm_shift_hsh, * str);
- * p = c;
+ /* rdhi, rdlo and rm must all be different. */
+ if (inst.operands[0].reg == inst.operands[1].reg
+ || inst.operands[0].reg == inst.operands[2].reg
+ || inst.operands[1].reg == inst.operands[2].reg)
+ as_tsktsk (_("rdhi, rdlo and rm must all be different"));
+}
- if (shift == NULL)
+static void
+do_nop (void)
+{
+ if (inst.operands[0].present)
{
- inst.error = _("shift expression expected");
- return FAIL;
+ /* Architectural NOP hints are CPSR sets with no bits selected. */
+ inst.instruction &= 0xf0000000;
+ inst.instruction |= 0x0320f000 + inst.operands[0].imm;
}
+}
- assert (shift->properties->index == shift_properties[shift->properties->index].index);
+/* ARM V6 Pack Halfword Bottom Top instruction (argument parse).
+ PKHBT {<cond>} <Rd>, <Rn>, <Rm> {, LSL #<shift_imm>}
+ Condition defaults to COND_ALWAYS.
+ Error if Rd, Rn or Rm are R15. */
- if (kind == SHIFT_LSL_OR_ASR_IMMEDIATE
- && shift->properties->index != SHIFT_LSL
- && shift->properties->index != SHIFT_ASR)
- {
- inst.error = _("'LSL' or 'ASR' required");
- return FAIL;
- }
- else if (kind == SHIFT_LSL_IMMEDIATE
- && shift->properties->index != SHIFT_LSL)
- {
- inst.error = _("'LSL' required");
- return FAIL;
- }
- else if (kind == SHIFT_ASR_IMMEDIATE
- && shift->properties->index != SHIFT_ASR)
- {
- inst.error = _("'ASR' required");
- return FAIL;
- }
-
- if (shift->properties->index == SHIFT_RRX)
- {
- * str = p;
- inst.instruction |= shift->properties->bit_field;
- return SUCCESS;
- }
+static void
+do_pkhbt (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
+ if (inst.operands[3].present)
+ encode_arm_shift (3);
+}
- skip_whitespace (p);
+/* ARM V6 PKHTB (Argument Parse). */
- if (kind == NO_SHIFT_RESTRICT && reg_required_here (& p, 8) != FAIL)
+static void
+do_pkhtb (void)
+{
+ if (!inst.operands[3].present)
{
- inst.instruction |= shift->properties->bit_field | SHIFT_BY_REG;
- * str = p;
- return SUCCESS;
+ /* If the shift specifier is omitted, turn the instruction
+ into pkhbt rd, rm, rn. */
+ inst.instruction &= 0xfff00010;
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].reg << 16;
}
- else if (! is_immediate_prefix (* p))
+ else
{
- inst.error = (NO_SHIFT_RESTRICT
- ? _("shift requires register or #expression")
- : _("shift requires #expression"));
- * str = p;
- return FAIL;
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
+ encode_arm_shift (3);
}
+}
- inst.error = NULL;
- p ++;
-
- if (my_get_expression (& inst.reloc.exp, & p))
- return FAIL;
-
- /* Validate some simple #expressions. */
- if (inst.reloc.exp.X_op == O_constant)
- {
- unsigned num = inst.reloc.exp.X_add_number;
-
- /* Reject operations greater than 32. */
- if (num > 32
- /* Reject a shift of 0 unless the mode allows it. */
- || (num == 0 && shift->properties->allows_0 == 0)
- /* Reject a shift of 32 unless the mode allows it. */
- || (num == 32 && shift->properties->allows_32 == 0)
- )
- {
- /* As a special case we allow a shift of zero for
- modes that do not support it to be recoded as an
- logical shift left of zero (ie nothing). We warn
- about this though. */
- if (num == 0)
- {
- as_warn (_("shift of 0 ignored."));
- shift = & shift_names[0];
- assert (shift->properties->index == SHIFT_LSL);
- }
- else
- {
- inst.error = _("invalid immediate shift");
- return FAIL;
- }
- }
+/* ARMv5TE: Preload-Cache
- /* Shifts of 32 are encoded as 0, for those shifts that
- support it. */
- if (num == 32)
- num = 0;
+ PLD <addr_mode>
- inst.instruction |= (num << 7) | shift->properties->bit_field;
- }
- else
- {
- inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM;
- inst.reloc.pc_rel = 0;
- inst.instruction |= shift->properties->bit_field;
- }
+ Syntactically, like LDR with B=1, W=0, L=1. */
- * str = p;
- return SUCCESS;
+static void
+do_pld (void)
+{
+ constraint (!inst.operands[0].isreg,
+ _("'[' expected after PLD mnemonic"));
+ constraint (inst.operands[0].postind,
+ _("post-indexed expression used in preload instruction"));
+ constraint (inst.operands[0].writeback,
+ _("writeback used in preload instruction"));
+ constraint (!inst.operands[0].preind,
+ _("unindexed addressing used in preload instruction"));
+ encode_arm_addr_mode_2 (0, /*is_t=*/FALSE);
}
-/* Do those data_ops which can take a negative immediate constant
- by altering the instruction. A bit of a hack really.
- MOV <-> MVN
- AND <-> BIC
- ADC <-> SBC
- by inverting the second operand, and
- ADD <-> SUB
- CMP <-> CMN
- by negating the second operand. */
+/* ARMv7: PLI <addr_mode> */
+static void
+do_pli (void)
+{
+ constraint (!inst.operands[0].isreg,
+ _("'[' expected after PLI mnemonic"));
+ constraint (inst.operands[0].postind,
+ _("post-indexed expression used in preload instruction"));
+ constraint (inst.operands[0].writeback,
+ _("writeback used in preload instruction"));
+ constraint (!inst.operands[0].preind,
+ _("unindexed addressing used in preload instruction"));
+ encode_arm_addr_mode_2 (0, /*is_t=*/FALSE);
+ inst.instruction &= ~PRE_INDEX;
+}
-static int
-negate_data_op (instruction, value)
- unsigned long * instruction;
- unsigned long value;
+static void
+do_push_pop (void)
{
- int op, new_inst;
- unsigned long negated, inverted;
+ inst.operands[1] = inst.operands[0];
+ memset (&inst.operands[0], 0, sizeof inst.operands[0]);
+ inst.operands[0].isreg = 1;
+ inst.operands[0].writeback = 1;
+ inst.operands[0].reg = REG_SP;
+ do_ldmstm ();
+}
- negated = validate_immediate (-value);
- inverted = validate_immediate (~value);
+/* ARM V6 RFE (Return from Exception) loads the PC and CPSR from the
+ word at the specified address and the following word
+ respectively.
+ Unconditionally executed.
+ Error if Rn is R15. */
- op = (*instruction >> DATA_OP_SHIFT) & 0xf;
- switch (op)
- {
- /* First negates. */
- case OPCODE_SUB: /* ADD <-> SUB */
- new_inst = OPCODE_ADD;
- value = negated;
- break;
+static void
+do_rfe (void)
+{
+ inst.instruction |= inst.operands[0].reg << 16;
+ if (inst.operands[0].writeback)
+ inst.instruction |= WRITE_BACK;
+}
- case OPCODE_ADD:
- new_inst = OPCODE_SUB;
- value = negated;
- break;
+/* ARM V6 ssat (argument parse). */
- case OPCODE_CMP: /* CMP <-> CMN */
- new_inst = OPCODE_CMN;
- value = negated;
- break;
+static void
+do_ssat (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= (inst.operands[1].imm - 1) << 16;
+ inst.instruction |= inst.operands[2].reg;
- case OPCODE_CMN:
- new_inst = OPCODE_CMP;
- value = negated;
- break;
+ if (inst.operands[3].present)
+ encode_arm_shift (3);
+}
- /* Now Inverted ops. */
- case OPCODE_MOV: /* MOV <-> MVN */
- new_inst = OPCODE_MVN;
- value = inverted;
- break;
+/* ARM V6 usat (argument parse). */
- case OPCODE_MVN:
- new_inst = OPCODE_MOV;
- value = inverted;
- break;
+static void
+do_usat (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].imm << 16;
+ inst.instruction |= inst.operands[2].reg;
- case OPCODE_AND: /* AND <-> BIC */
- new_inst = OPCODE_BIC;
- value = inverted;
- break;
+ if (inst.operands[3].present)
+ encode_arm_shift (3);
+}
- case OPCODE_BIC:
- new_inst = OPCODE_AND;
- value = inverted;
- break;
+/* ARM V6 ssat16 (argument parse). */
- case OPCODE_ADC: /* ADC <-> SBC */
- new_inst = OPCODE_SBC;
- value = inverted;
- break;
+static void
+do_ssat16 (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= ((inst.operands[1].imm - 1) << 16);
+ inst.instruction |= inst.operands[2].reg;
+}
- case OPCODE_SBC:
- new_inst = OPCODE_ADC;
- value = inverted;
- break;
+static void
+do_usat16 (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].imm << 16;
+ inst.instruction |= inst.operands[2].reg;
+}
- /* We cannot do anything. */
- default:
- return FAIL;
- }
+/* ARM V6 SETEND (argument parse). Sets the E bit in the CPSR while
+ preserving the other bits.
- if (value == (unsigned) FAIL)
- return FAIL;
+ setend <endian_specifier>, where <endian_specifier> is either
+ BE or LE. */
- *instruction &= OPCODE_MASK;
- *instruction |= new_inst << DATA_OP_SHIFT;
- return value;
+static void
+do_setend (void)
+{
+ if (inst.operands[0].imm)
+ inst.instruction |= 0x200;
}
-static int
-data_op2 (str)
- char ** str;
+static void
+do_shift (void)
{
- int value;
- expressionS expr;
-
- skip_whitespace (* str);
+ unsigned int Rm = (inst.operands[1].present
+ ? inst.operands[1].reg
+ : inst.operands[0].reg);
- if (reg_required_here (str, 0) != FAIL)
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= Rm;
+ if (inst.operands[2].isreg) /* Rd, {Rm,} Rs */
{
- if (skip_past_comma (str) == SUCCESS)
- /* Shift operation on register. */
- return decode_shift (str, NO_SHIFT_RESTRICT);
-
- return SUCCESS;
+ inst.instruction |= inst.operands[2].reg << 8;
+ inst.instruction |= SHIFT_BY_REG;
}
else
- {
- /* Immediate expression. */
- if (is_immediate_prefix (**str))
- {
- (*str)++;
- inst.error = NULL;
-
- if (my_get_expression (&inst.reloc.exp, str))
- return FAIL;
-
- if (inst.reloc.exp.X_add_symbol)
- {
- inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
- inst.reloc.pc_rel = 0;
- }
- else
- {
- if (skip_past_comma (str) == SUCCESS)
- {
- /* #x, y -- ie explicit rotation by Y. */
- if (my_get_expression (&expr, str))
- return FAIL;
+ inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM;
+}
- if (expr.X_op != O_constant)
- {
- inst.error = _("constant expression expected");
- return FAIL;
- }
+static void
+do_smc (void)
+{
+ inst.reloc.type = BFD_RELOC_ARM_SMC;
+ inst.reloc.pc_rel = 0;
+}
- /* Rotate must be a multiple of 2. */
- if (((unsigned) expr.X_add_number) > 30
- || (expr.X_add_number & 1) != 0
- || ((unsigned) inst.reloc.exp.X_add_number) > 255)
- {
- inst.error = _("invalid constant");
- return FAIL;
- }
- inst.instruction |= INST_IMMEDIATE;
- inst.instruction |= inst.reloc.exp.X_add_number;
- inst.instruction |= expr.X_add_number << 7;
- return SUCCESS;
- }
+static void
+do_swi (void)
+{
+ inst.reloc.type = BFD_RELOC_ARM_SWI;
+ inst.reloc.pc_rel = 0;
+}
- /* Implicit rotation, select a suitable one. */
- value = validate_immediate (inst.reloc.exp.X_add_number);
+/* ARM V5E (El Segundo) signed-multiply-accumulate (argument parse)
+ SMLAxy{cond} Rd,Rm,Rs,Rn
+ SMLAWy{cond} Rd,Rm,Rs,Rn
+ Error if any register is R15. */
- if (value == FAIL)
- {
- /* Can't be done. Perhaps the code reads something like
- "add Rd, Rn, #-n", where "sub Rd, Rn, #n" would be OK. */
- if ((value = negate_data_op (&inst.instruction,
- inst.reloc.exp.X_add_number))
- == FAIL)
- {
- inst.error = _("invalid constant");
- return FAIL;
- }
- }
+static void
+do_smla (void)
+{
+ 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;
+}
- inst.instruction |= value;
- }
+/* ARM V5E (El Segundo) signed-multiply-accumulate-long (argument parse)
+ SMLALxy{cond} Rdlo,Rdhi,Rm,Rs
+ Error if any register is R15.
+ Warning if Rdlo == Rdhi. */
- inst.instruction |= INST_IMMEDIATE;
- return SUCCESS;
- }
+static void
+do_smlal (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].reg << 8;
- (*str)++;
- inst.error = _("register or shift expression expected");
- return FAIL;
- }
+ if (inst.operands[0].reg == inst.operands[1].reg)
+ as_tsktsk (_("rdhi and rdlo must be different"));
}
-static int
-fp_op2 (str)
- char ** str;
-{
- skip_whitespace (* str);
+/* ARM V5E (El Segundo) signed-multiply (argument parse)
+ SMULxy{cond} Rd,Rm,Rs
+ Error if any register is R15. */
- if (fp_reg_required_here (str, 0) != FAIL)
- return SUCCESS;
- else
- {
- /* Immediate expression. */
- if (*((*str)++) == '#')
- {
- int i;
+static void
+do_smul (void)
+{
+ inst.instruction |= inst.operands[0].reg << 16;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].reg << 8;
+}
- inst.error = NULL;
+/* ARM V6 srs (argument parse). */
- skip_whitespace (* str);
+static void
+do_srs (void)
+{
+ inst.instruction |= inst.operands[0].imm;
+ if (inst.operands[0].writeback)
+ inst.instruction |= WRITE_BACK;
+}
- /* First try and match exact strings, this is to guarantee
- that some formats will work even for cross assembly. */
+/* ARM V6 strex (argument parse). */
- for (i = 0; fp_const[i]; i++)
- {
- if (strncmp (*str, fp_const[i], strlen (fp_const[i])) == 0)
- {
- char *start = *str;
+static void
+do_strex (void)
+{
+ constraint (!inst.operands[2].isreg || !inst.operands[2].preind
+ || inst.operands[2].postind || inst.operands[2].writeback
+ || inst.operands[2].immisreg || inst.operands[2].shifted
+ || inst.operands[2].negative
+ /* See comment in do_ldrex(). */
+ || (inst.operands[2].reg == REG_PC),
+ BAD_ADDR_MODE);
- *str += strlen (fp_const[i]);
- if (is_end_of_line[(unsigned char) **str])
- {
- inst.instruction |= i + 8;
- return SUCCESS;
- }
- *str = start;
- }
- }
+ constraint (inst.operands[0].reg == inst.operands[1].reg
+ || inst.operands[0].reg == inst.operands[2].reg, BAD_OVERLAP);
- /* Just because we didn't get a match doesn't mean that the
- constant isn't valid, just that it is in a format that we
- don't automatically recognize. Try parsing it with
- the standard expression routines. */
- if ((i = my_get_float_expression (str)) >= 0)
- {
- inst.instruction |= i + 8;
- return SUCCESS;
- }
+ constraint (inst.reloc.exp.X_op != O_constant
+ || inst.reloc.exp.X_add_number != 0,
+ _("offset must be zero in ARM encoding"));
- inst.error = _("invalid floating point immediate expression");
- return FAIL;
- }
- inst.error =
- _("floating point register or immediate expression expected");
- return FAIL;
- }
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].reg << 16;
+ inst.reloc.type = BFD_RELOC_UNUSED;
}
static void
-do_arit (str)
- char * str;
+do_strexd (void)
{
- skip_whitespace (str);
+ constraint (inst.operands[1].reg % 2 != 0,
+ _("even register required"));
+ constraint (inst.operands[2].present
+ && inst.operands[2].reg != inst.operands[1].reg + 1,
+ _("can only store two consecutive registers"));
+ /* If op 2 were present and equal to PC, this function wouldn't
+ have been called in the first place. */
+ constraint (inst.operands[1].reg == REG_LR, _("r14 not allowed here"));
- if (reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 16) == FAIL
- || skip_past_comma (&str) == FAIL
- || data_op2 (&str) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ constraint (inst.operands[0].reg == inst.operands[1].reg
+ || inst.operands[0].reg == inst.operands[1].reg + 1
+ || inst.operands[0].reg == inst.operands[3].reg,
+ BAD_OVERLAP);
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[3].reg << 16;
}
+/* ARM V6 SXTAH extracts a 16-bit value from a register, sign
+ extends it to 32-bits, and adds the result to a value in another
+ register. You can specify a rotation by 0, 8, 16, or 24 bits
+ before extracting the 16-bit value.
+ SXTAH{<cond>} <Rd>, <Rn>, <Rm>{, <rotation>}
+ Condition defaults to COND_ALWAYS.
+ Error if any register uses R15. */
+
static void
-do_adr (str)
- char * str;
+do_sxtah (void)
{
- /* This is a pseudo-op of the form "adr rd, label" to be converted
- into a relative address of the form "add rd, pc, #label-.-8". */
- skip_whitespace (str);
+ 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 << 10;
+}
- if (reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || my_get_expression (&inst.reloc.exp, &str))
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+/* ARM V6 SXTH.
- /* Frag hacking will turn this into a sub instruction if the offset turns
- out to be negative. */
- inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
-#ifndef TE_WINCE
- inst.reloc.exp.X_add_number -= 8; /* PC relative adjust. */
-#endif
- inst.reloc.pc_rel = 1;
+ SXTH {<cond>} <Rd>, <Rm>{, <rotation>}
+ Condition defaults to COND_ALWAYS.
+ Error if any register uses R15. */
- end_of_line (str);
+static void
+do_sxth (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].imm << 10;
}
+
+/* VFP instructions. In a logical order: SP variant first, monad
+ before dyad, arithmetic then move then load/store. */
static void
-do_adrl (str)
- char * str;
+do_vfp_sp_monadic (void)
{
- /* This is a pseudo-op of the form "adrl rd, label" to be converted
- into a relative address of the form:
- add rd, pc, #low(label-.-8)"
- add rd, rd, #high(label-.-8)" */
+ encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ encode_arm_vfp_sp_reg (inst.operands[1].reg, VFP_REG_Sm);
+}
- skip_whitespace (str);
+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);
+}
- if (reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || my_get_expression (&inst.reloc.exp, &str))
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
+static void
+do_vfp_sp_compare_z (void)
+{
+ encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sd);
+}
- return;
- }
+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);
+}
- end_of_line (str);
- /* Frag hacking will turn this into a sub instruction if the offset turns
- out to be negative. */
- inst.reloc.type = BFD_RELOC_ARM_ADRL_IMMEDIATE;
-#ifndef TE_WINCE
- inst.reloc.exp.X_add_number -= 8; /* PC relative adjust */
-#endif
- inst.reloc.pc_rel = 1;
- inst.size = INSN_SIZE * 2;
+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;
}
static void
-do_cmp (str)
- char * str;
+do_vfp_reg_from_sp (void)
{
- skip_whitespace (str);
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_vfp_sp_reg (inst.operands[1].reg, VFP_REG_Sn);
+}
- if (reg_required_here (&str, 16) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void
+do_vfp_reg2_from_sp2 (void)
+{
+ constraint (inst.operands[2].imm != 2,
+ _("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);
+}
- if (skip_past_comma (&str) == FAIL
- || data_op2 (&str) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void
+do_vfp_sp_from_reg (void)
+{
+ encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sn);
+ inst.instruction |= inst.operands[1].reg << 12;
+}
- end_of_line (str);
+static void
+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);
+ inst.instruction |= inst.operands[1].reg << 12;
+ inst.instruction |= inst.operands[2].reg << 16;
}
static void
-do_mov (str)
- char * str;
+do_vfp_sp_ldst (void)
{
- skip_whitespace (str);
+ encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ encode_arm_cp_address (1, FALSE, TRUE, 0);
+}
- if (reg_required_here (&str, 12) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void
+do_vfp_dp_ldst (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_cp_address (1, FALSE, TRUE, 0);
+}
- if (skip_past_comma (&str) == FAIL
- || data_op2 (&str) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
- end_of_line (str);
+static void
+vfp_sp_ldstm (enum vfp_ldstm_type ldstm_type)
+{
+ if (inst.operands[0].writeback)
+ inst.instruction |= WRITE_BACK;
+ else
+ 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);
+ inst.instruction |= inst.operands[1].imm;
}
-static int
-ldst_extend (str)
- char ** str;
+static void
+vfp_dp_ldstm (enum vfp_ldstm_type ldstm_type)
{
- int add = INDEX_UP;
-
- switch (**str)
- {
- case '#':
- case '$':
- (*str)++;
- if (my_get_expression (& inst.reloc.exp, str))
- return FAIL;
+ int count;
- if (inst.reloc.exp.X_op == O_constant)
- {
- int value = inst.reloc.exp.X_add_number;
-
- if (value < -4095 || value > 4095)
- {
- inst.error = _("address offset too large");
- return FAIL;
- }
+ if (inst.operands[0].writeback)
+ inst.instruction |= WRITE_BACK;
+ else
+ constraint (ldstm_type != VFP_LDSTMIA && ldstm_type != VFP_LDSTMIAX,
+ _("this addressing mode requires base-register writeback"));
- if (value < 0)
- {
- value = -value;
- add = 0;
- }
+ inst.instruction |= inst.operands[0].reg << 16;
+ inst.instruction |= inst.operands[1].reg << 12;
- inst.instruction |= add | value;
- }
- else
- {
- inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM;
- inst.reloc.pc_rel = 0;
- }
- return SUCCESS;
+ count = inst.operands[1].imm << 1;
+ if (ldstm_type == VFP_LDSTMIAX || ldstm_type == VFP_LDSTMDBX)
+ count += 1;
- case '-':
- add = 0;
- /* Fall through. */
+ inst.instruction |= count;
+}
- case '+':
- (*str)++;
- /* Fall through. */
+static void
+do_vfp_sp_ldstmia (void)
+{
+ vfp_sp_ldstm (VFP_LDSTMIA);
+}
- default:
- if (reg_required_here (str, 0) == FAIL)
- return FAIL;
+static void
+do_vfp_sp_ldstmdb (void)
+{
+ vfp_sp_ldstm (VFP_LDSTMDB);
+}
- inst.instruction |= add | OFFSET_REG;
- if (skip_past_comma (str) == SUCCESS)
- return decode_shift (str, SHIFT_IMMEDIATE);
+static void
+do_vfp_dp_ldstmia (void)
+{
+ vfp_dp_ldstm (VFP_LDSTMIA);
+}
- return SUCCESS;
- }
+static void
+do_vfp_dp_ldstmdb (void)
+{
+ vfp_dp_ldstm (VFP_LDSTMDB);
}
static void
-do_ldst (str)
- char * str;
+do_vfp_xp_ldstmia (void)
{
- int pre_inc = 0;
- int conflict_reg;
- int value;
+ vfp_dp_ldstm (VFP_LDSTMIAX);
+}
- skip_whitespace (str);
+static void
+do_vfp_xp_ldstmdb (void)
+{
+ vfp_dp_ldstm (VFP_LDSTMDBX);
+}
+
+/* FPA instructions. Also in a logical order. */
- if ((conflict_reg = reg_required_here (&str, 12)) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void
+do_fpa_cmp (void)
+{
+ inst.instruction |= inst.operands[0].reg << 16;
+ inst.instruction |= inst.operands[1].reg;
+}
- if (skip_past_comma (&str) == FAIL)
+static void
+do_fpa_ldmstm (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ switch (inst.operands[1].imm)
{
- inst.error = _("address expected");
- return;
+ case 1: inst.instruction |= CP_T_X; break;
+ case 2: inst.instruction |= CP_T_Y; break;
+ case 3: inst.instruction |= CP_T_Y | CP_T_X; break;
+ case 4: break;
+ default: abort ();
}
- if (*str == '[')
+ if (inst.instruction & (PRE_INDEX | INDEX_UP))
{
- int reg;
-
- str++;
-
- skip_whitespace (str);
-
- if ((reg = reg_required_here (&str, 16)) == FAIL)
- return;
-
- /* Conflicts can occur on stores as well as loads. */
- conflict_reg = (conflict_reg == reg);
-
- skip_whitespace (str);
-
- if (*str == ']')
- {
- str ++;
+ /* The instruction specified "ea" or "fd", so we can only accept
+ [Rn]{!}. The instruction does not really support stacking or
+ unstacking, so we have to emulate these by setting appropriate
+ bits and offsets. */
+ constraint (inst.reloc.exp.X_op != O_constant
+ || inst.reloc.exp.X_add_number != 0,
+ _("this instruction does not support indexing"));
- if (skip_past_comma (&str) == SUCCESS)
- {
- /* [Rn],... (post inc) */
- if (ldst_extend (&str) == FAIL)
- return;
- if (conflict_reg)
- as_warn (_("%s register same as write-back base"),
- ((inst.instruction & LOAD_BIT)
- ? _("destination") : _("source")));
- }
- else
- {
- /* [Rn] */
- skip_whitespace (str);
+ if ((inst.instruction & PRE_INDEX) || inst.operands[2].writeback)
+ inst.reloc.exp.X_add_number = 12 * inst.operands[1].imm;
- if (*str == '!')
- {
- if (conflict_reg)
- as_warn (_("%s register same as write-back base"),
- ((inst.instruction & LOAD_BIT)
- ? _("destination") : _("source")));
- str++;
- inst.instruction |= WRITE_BACK;
- }
+ if (!(inst.instruction & INDEX_UP))
+ inst.reloc.exp.X_add_number = -inst.reloc.exp.X_add_number;
- inst.instruction |= INDEX_UP;
- pre_inc = 1;
- }
- }
- else
+ if (!(inst.instruction & PRE_INDEX) && inst.operands[2].writeback)
{
- /* [Rn,...] */
- if (skip_past_comma (&str) == FAIL)
- {
- inst.error = _("pre-indexed expression expected");
- return;
- }
-
- pre_inc = 1;
- if (ldst_extend (&str) == FAIL)
- return;
-
- skip_whitespace (str);
-
- if (*str++ != ']')
- {
- inst.error = _("missing ]");
- return;
- }
-
- skip_whitespace (str);
-
- if (*str == '!')
- {
- if (conflict_reg)
- as_warn (_("%s register same as write-back base"),
- ((inst.instruction & LOAD_BIT)
- ? _("destination") : _("source")));
- str++;
- inst.instruction |= WRITE_BACK;
- }
+ inst.operands[2].preind = 0;
+ inst.operands[2].postind = 1;
}
}
- else if (*str == '=')
- {
- if ((inst.instruction & LOAD_BIT) == 0)
- {
- inst.error = _("invalid pseudo operation");
- return;
- }
-
- /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */
- str++;
- skip_whitespace (str);
+ encode_arm_cp_address (2, TRUE, TRUE, 0);
+}
+
+/* iWMMXt instructions: strictly in alphabetical order. */
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
+static void
+do_iwmmxt_tandorc (void)
+{
+ constraint (inst.operands[0].reg != REG_PC, _("only r15 allowed here"));
+}
- if (inst.reloc.exp.X_op != O_constant
- && inst.reloc.exp.X_op != O_symbol)
- {
- inst.error = _("constant expression expected");
- return;
- }
+static void
+do_iwmmxt_textrc (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].imm;
+}
- if (inst.reloc.exp.X_op == O_constant)
- {
- value = validate_immediate (inst.reloc.exp.X_add_number);
+static void
+do_iwmmxt_textrm (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].imm;
+}
- if (value != FAIL)
- {
- /* This can be done with a mov instruction. */
- inst.instruction &= LITERAL_MASK;
- inst.instruction |= (INST_IMMEDIATE
- | (OPCODE_MOV << DATA_OP_SHIFT));
- inst.instruction |= value & 0xfff;
- end_of_line (str);
- return;
- }
+static void
+do_iwmmxt_tinsr (void)
+{
+ inst.instruction |= inst.operands[0].reg << 16;
+ inst.instruction |= inst.operands[1].reg << 12;
+ inst.instruction |= inst.operands[2].imm;
+}
- value = validate_immediate (~inst.reloc.exp.X_add_number);
+static void
+do_iwmmxt_tmia (void)
+{
+ inst.instruction |= inst.operands[0].reg << 5;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].reg << 12;
+}
- if (value != FAIL)
- {
- /* This can be done with a mvn instruction. */
- inst.instruction &= LITERAL_MASK;
- inst.instruction |= (INST_IMMEDIATE
- | (OPCODE_MVN << DATA_OP_SHIFT));
- inst.instruction |= value & 0xfff;
- end_of_line (str);
- return;
- }
- }
+static void
+do_iwmmxt_waligni (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 << 20;
+}
- /* Insert into literal pool. */
- if (add_to_lit_pool () == FAIL)
- {
- if (!inst.error)
- inst.error = _("literal pool insertion failed");
- return;
- }
+static void
+do_iwmmxt_wmov (void)
+{
+ /* WMOV rD, rN is an alias for WOR rD, rN, rN. */
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[1].reg;
+}
- /* Change the instruction exp to point to the pool. */
- inst.reloc.type = BFD_RELOC_ARM_LITERAL;
- inst.reloc.pc_rel = 1;
- inst.instruction |= (REG_PC << 16);
- pre_inc = 1;
- }
+static void
+do_iwmmxt_wldstbh (void)
+{
+ int reloc;
+ inst.instruction |= inst.operands[0].reg << 12;
+ if (thumb_mode)
+ reloc = BFD_RELOC_ARM_T32_CP_OFF_IMM_S2;
else
- {
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
+ reloc = BFD_RELOC_ARM_CP_OFF_IMM_S2;
+ encode_arm_cp_address (1, TRUE, FALSE, reloc);
+}
- inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM;
-#ifndef TE_WINCE
- /* PC rel adjust. */
- inst.reloc.exp.X_add_number -= 8;
-#endif
- inst.reloc.pc_rel = 1;
- inst.instruction |= (REG_PC << 16);
- pre_inc = 1;
+static void
+do_iwmmxt_wldstw (void)
+{
+ /* RIWR_RIWC clears .isreg for a control register. */
+ if (!inst.operands[0].isreg)
+ {
+ constraint (inst.cond != COND_ALWAYS, BAD_COND);
+ inst.instruction |= 0xf0000000;
}
- inst.instruction |= (pre_inc ? PRE_INDEX : 0);
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_cp_address (1, TRUE, TRUE, 0);
}
static void
-do_ldstt (str)
- char * str;
+do_iwmmxt_wldstd (void)
{
- int conflict_reg;
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_cp_address (1, TRUE, FALSE, 0);
+}
- skip_whitespace (str);
+static void
+do_iwmmxt_wshufh (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= ((inst.operands[2].imm & 0xf0) << 16);
+ inst.instruction |= (inst.operands[2].imm & 0x0f);
+}
- if ((conflict_reg = reg_required_here (& str, 12)) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void
+do_iwmmxt_wzero (void)
+{
+ /* WZERO reg is an alias for WANDN reg, reg, reg. */
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[0].reg << 16;
+}
+
+/* Cirrus Maverick instructions. Simple 2-, 3-, and 4-register
+ operations first, then control, shift, and load/store. */
- if (skip_past_comma (& str) == FAIL)
- {
- inst.error = _("address expected");
- return;
- }
+/* Insns like "foo X,Y,Z". */
- if (*str == '[')
- {
- int reg;
+static void
+do_mav_triple (void)
+{
+ inst.instruction |= inst.operands[0].reg << 16;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].reg << 12;
+}
- str++;
+/* Insns like "foo W,X,Y,Z".
+ where W=MVAX[0:3] and X,Y,Z=MVFX[0:15]. */
- skip_whitespace (str);
+static void
+do_mav_quad (void)
+{
+ inst.instruction |= inst.operands[0].reg << 5;
+ inst.instruction |= inst.operands[1].reg << 12;
+ inst.instruction |= inst.operands[2].reg << 16;
+ inst.instruction |= inst.operands[3].reg;
+}
- if ((reg = reg_required_here (&str, 16)) == FAIL)
- return;
+/* cfmvsc32<cond> DSPSC,MVDX[15:0]. */
+static void
+do_mav_dspsc (void)
+{
+ inst.instruction |= inst.operands[1].reg << 12;
+}
- /* ldrt/strt always use post-indexed addressing, so if the base is
- the same as Rd, we warn. */
- if (conflict_reg == reg)
- as_warn (_("%s register same as write-back base"),
- ((inst.instruction & LOAD_BIT)
- ? _("destination") : _("source")));
+/* Maverick shift immediate instructions.
+ cfsh32<cond> MVFX[15:0],MVFX[15:0],Shift[6:0].
+ cfsh64<cond> MVDX[15:0],MVDX[15:0],Shift[6:0]. */
- skip_whitespace (str);
+static void
+do_mav_shift (void)
+{
+ int imm = inst.operands[2].imm;
- if (*str == ']')
- {
- str ++;
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
- if (skip_past_comma (&str) == SUCCESS)
- {
- /* [Rn],... (post inc) */
- if (ldst_extend (&str) == FAIL)
- return;
- }
- else
- {
- /* [Rn] */
- skip_whitespace (str);
+ /* Bits 0-3 of the insn should have bits 0-3 of the immediate.
+ Bits 5-7 of the insn should have bits 4-6 of the immediate.
+ Bit 4 should be 0. */
+ imm = (imm & 0xf) | ((imm & 0x70) << 1);
- /* Skip a write-back '!'. */
- if (*str == '!')
- str++;
+ inst.instruction |= imm;
+}
+
+/* XScale instructions. Also sorted arithmetic before move. */
- inst.instruction |= INDEX_UP;
- }
- }
- else
- {
- inst.error = _("post-indexed expression expected");
- return;
- }
- }
- else
- {
- inst.error = _("post-indexed expression expected");
- return;
- }
+/* Xscale multiply-accumulate (argument parse)
+ MIAcc acc0,Rm,Rs
+ MIAPHcc acc0,Rm,Rs
+ MIAxycc acc0,Rm,Rs. */
- end_of_line (str);
+static void
+do_xsc_mia (void)
+{
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].reg << 12;
}
-static int
-ldst_extend_v4 (str)
- char ** str;
+/* Xscale move-accumulator-register (argument parse)
+
+ MARcc acc0,RdLo,RdHi. */
+
+static void
+do_xsc_mar (void)
{
- int add = INDEX_UP;
+ inst.instruction |= inst.operands[1].reg << 12;
+ inst.instruction |= inst.operands[2].reg << 16;
+}
- switch (**str)
- {
- case '#':
- case '$':
- (*str)++;
- if (my_get_expression (& inst.reloc.exp, str))
- return FAIL;
+/* Xscale move-register-accumulator (argument parse)
- if (inst.reloc.exp.X_op == O_constant)
- {
- int value = inst.reloc.exp.X_add_number;
+ MRAcc RdLo,RdHi,acc0. */
- if (value < -255 || value > 255)
- {
- inst.error = _("address offset too large");
- return FAIL;
- }
+static void
+do_xsc_mra (void)
+{
+ constraint (inst.operands[0].reg == inst.operands[1].reg, BAD_OVERLAP);
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+}
+
+/* Encoding functions relevant only to Thumb. */
- if (value < 0)
- {
- value = -value;
- add = 0;
- }
+/* inst.operands[i] is a shifted-register operand; encode
+ it into inst.instruction in the format used by Thumb32. */
- /* Halfword and signextension instructions have the
- immediate value split across bits 11..8 and bits 3..0. */
- inst.instruction |= (add | HWOFFSET_IMM
- | ((value >> 4) << 8) | (value & 0xF));
- }
- else
- {
- inst.instruction |= HWOFFSET_IMM;
- inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
- inst.reloc.pc_rel = 0;
- }
- return SUCCESS;
+static void
+encode_thumb32_shifted_operand (int i)
+{
+ unsigned int value = inst.reloc.exp.X_add_number;
+ unsigned int shift = inst.operands[i].shift_kind;
- case '-':
- add = 0;
- /* Fall through. */
+ constraint (inst.operands[i].immisreg,
+ _("shift by register not allowed in thumb mode"));
+ inst.instruction |= inst.operands[i].reg;
+ if (shift == SHIFT_RRX)
+ inst.instruction |= SHIFT_ROR << 4;
+ else
+ {
+ constraint (inst.reloc.exp.X_op != O_constant,
+ _("expression too complex"));
- case '+':
- (*str)++;
- /* Fall through. */
+ constraint (value > 32
+ || (value == 32 && (shift == SHIFT_LSL
+ || shift == SHIFT_ROR)),
+ _("shift expression is too large"));
- default:
- if (reg_required_here (str, 0) == FAIL)
- return FAIL;
+ if (value == 0)
+ shift = SHIFT_LSL;
+ else if (value == 32)
+ value = 0;
- inst.instruction |= add;
- return SUCCESS;
+ inst.instruction |= shift << 4;
+ inst.instruction |= (value & 0x1c) << 10;
+ inst.instruction |= (value & 0x03) << 6;
}
}
-/* Halfword and signed-byte load/store operations. */
+
+/* inst.operands[i] was set up by parse_address. Encode it into a
+ Thumb32 format load or store instruction. Reject forms that cannot
+ be used with such instructions. If is_t is true, reject forms that
+ cannot be used with a T instruction; if is_d is true, reject forms
+ that cannot be used with a D instruction. */
+
static void
-do_ldstv4 (str)
- char * str;
+encode_thumb32_addr_mode (int i, bfd_boolean is_t, bfd_boolean is_d)
{
- int pre_inc = 0;
- int conflict_reg;
- int value;
+ bfd_boolean is_pc = (inst.operands[i].reg == REG_PC);
- skip_whitespace (str);
+ constraint (!inst.operands[i].isreg,
+ _("Instruction does not support =N addresses"));
- if ((conflict_reg = reg_required_here (& str, 12)) == FAIL)
+ inst.instruction |= inst.operands[i].reg << 16;
+ if (inst.operands[i].immisreg)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ constraint (is_pc, _("cannot use register index with PC-relative addressing"));
+ constraint (is_t || is_d, _("cannot use register index with this instruction"));
+ constraint (inst.operands[i].negative,
+ _("Thumb does not support negative register indexing"));
+ constraint (inst.operands[i].postind,
+ _("Thumb does not support register post-indexing"));
+ constraint (inst.operands[i].writeback,
+ _("Thumb does not support register indexing with writeback"));
+ constraint (inst.operands[i].shifted && inst.operands[i].shift_kind != SHIFT_LSL,
+ _("Thumb supports only LSL in shifted register indexing"));
- if (skip_past_comma (& str) == FAIL)
- {
- inst.error = _("address expected");
- return;
+ inst.instruction |= inst.operands[i].imm;
+ if (inst.operands[i].shifted)
+ {
+ 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 > 3,
+ _("shift out of range"));
+ inst.instruction |= inst.reloc.exp.X_add_number << 4;
+ }
+ inst.reloc.type = BFD_RELOC_UNUSED;
}
-
- if (*str == '[')
+ else if (inst.operands[i].preind)
{
- int reg;
-
- str++;
+ constraint (is_pc && inst.operands[i].writeback,
+ _("cannot use writeback with PC-relative addressing"));
+ constraint (is_t && inst.operands[i].writeback,
+ _("cannot use writeback with this instruction"));
- skip_whitespace (str);
+ if (is_d)
+ {
+ inst.instruction |= 0x01000000;
+ if (inst.operands[i].writeback)
+ inst.instruction |= 0x00200000;
+ }
+ else
+ {
+ inst.instruction |= 0x00000c00;
+ if (inst.operands[i].writeback)
+ inst.instruction |= 0x00000100;
+ }
+ inst.reloc.type = BFD_RELOC_ARM_T32_OFFSET_IMM;
+ }
+ else if (inst.operands[i].postind)
+ {
+ assert (inst.operands[i].writeback);
+ constraint (is_pc, _("cannot use post-indexing with PC-relative addressing"));
+ constraint (is_t, _("cannot use post-indexing with this instruction"));
- if ((reg = reg_required_here (&str, 16)) == FAIL)
- return;
+ if (is_d)
+ inst.instruction |= 0x00200000;
+ else
+ inst.instruction |= 0x00000900;
+ inst.reloc.type = BFD_RELOC_ARM_T32_OFFSET_IMM;
+ }
+ else /* unindexed - only for coprocessor */
+ inst.error = _("instruction does not accept unindexed addressing");
+}
+
+/* Table of Thumb instructions which exist in both 16- and 32-bit
+ encodings (the latter only in post-V6T2 cores). The index is the
+ value used in the insns table below. When there is more than one
+ possible 16-bit encoding for the instruction, this table always
+ holds variant (1).
+ Also contains several pseudo-instructions used during relaxation. */
+#define T16_32_TAB \
+ X(adc, 4140, eb400000), \
+ X(adcs, 4140, eb500000), \
+ X(add, 1c00, eb000000), \
+ X(adds, 1c00, eb100000), \
+ X(addi, 0000, f1000000), \
+ X(addis, 0000, f1100000), \
+ X(add_pc,000f, f20f0000), \
+ X(add_sp,000d, f10d0000), \
+ X(adr, 000f, f20f0000), \
+ X(and, 4000, ea000000), \
+ X(ands, 4000, ea100000), \
+ X(asr, 1000, fa40f000), \
+ X(asrs, 1000, fa50f000), \
+ X(b, e000, f000b000), \
+ X(bcond, d000, f0008000), \
+ X(bic, 4380, ea200000), \
+ X(bics, 4380, ea300000), \
+ X(cmn, 42c0, eb100f00), \
+ X(cmp, 2800, ebb00f00), \
+ X(cpsie, b660, f3af8400), \
+ X(cpsid, b670, f3af8600), \
+ X(cpy, 4600, ea4f0000), \
+ X(dec_sp,80dd, f1bd0d00), \
+ X(eor, 4040, ea800000), \
+ X(eors, 4040, ea900000), \
+ X(inc_sp,00dd, f10d0d00), \
+ X(ldmia, c800, e8900000), \
+ X(ldr, 6800, f8500000), \
+ X(ldrb, 7800, f8100000), \
+ X(ldrh, 8800, f8300000), \
+ X(ldrsb, 5600, f9100000), \
+ X(ldrsh, 5e00, f9300000), \
+ X(ldr_pc,4800, f85f0000), \
+ X(ldr_pc2,4800, f85f0000), \
+ X(ldr_sp,9800, f85d0000), \
+ X(lsl, 0000, fa00f000), \
+ X(lsls, 0000, fa10f000), \
+ X(lsr, 0800, fa20f000), \
+ X(lsrs, 0800, fa30f000), \
+ X(mov, 2000, ea4f0000), \
+ X(movs, 2000, ea5f0000), \
+ X(mul, 4340, fb00f000), \
+ X(muls, 4340, ffffffff), /* no 32b muls */ \
+ X(mvn, 43c0, ea6f0000), \
+ X(mvns, 43c0, ea7f0000), \
+ X(neg, 4240, f1c00000), /* rsb #0 */ \
+ X(negs, 4240, f1d00000), /* rsbs #0 */ \
+ X(orr, 4300, ea400000), \
+ X(orrs, 4300, ea500000), \
+ X(pop, bc00, e8bd0000), /* ldmia sp!,... */ \
+ X(push, b400, e92d0000), /* stmdb sp!,... */ \
+ X(rev, ba00, fa90f080), \
+ X(rev16, ba40, fa90f090), \
+ X(revsh, bac0, fa90f0b0), \
+ X(ror, 41c0, fa60f000), \
+ X(rors, 41c0, fa70f000), \
+ X(sbc, 4180, eb600000), \
+ X(sbcs, 4180, eb700000), \
+ X(stmia, c000, e8800000), \
+ X(str, 6000, f8400000), \
+ X(strb, 7000, f8000000), \
+ X(strh, 8000, f8200000), \
+ X(str_sp,9000, f84d0000), \
+ X(sub, 1e00, eba00000), \
+ X(subs, 1e00, ebb00000), \
+ X(subi, 8000, f1a00000), \
+ X(subis, 8000, f1b00000), \
+ X(sxtb, b240, fa4ff080), \
+ X(sxth, b200, fa0ff080), \
+ X(tst, 4200, ea100f00), \
+ X(uxtb, b2c0, fa5ff080), \
+ X(uxth, b280, fa1ff080), \
+ X(nop, bf00, f3af8000), \
+ X(yield, bf10, f3af8001), \
+ X(wfe, bf20, f3af8002), \
+ X(wfi, bf30, f3af8003), \
+ X(sev, bf40, f3af9004), /* typo, 8004? */
+
+/* To catch errors in encoding functions, the codes are all offset by
+ 0xF800, putting them in one of the 32-bit prefix ranges, ergo undefined
+ as 16-bit instructions. */
+#define X(a,b,c) T_MNEM_##a
+enum t16_32_codes { T16_32_OFFSET = 0xF7FF, T16_32_TAB };
+#undef X
+
+#define X(a,b,c) 0x##b
+static const unsigned short thumb_op16[] = { T16_32_TAB };
+#define THUMB_OP16(n) (thumb_op16[(n) - (T16_32_OFFSET + 1)])
+#undef X
+
+#define X(a,b,c) 0x##c
+static const unsigned int thumb_op32[] = { T16_32_TAB };
+#define THUMB_OP32(n) (thumb_op32[(n) - (T16_32_OFFSET + 1)])
+#define THUMB_SETS_FLAGS(n) (THUMB_OP32 (n) & 0x00100000)
+#undef X
+#undef T16_32_TAB
+
+/* Thumb instruction encoders, in alphabetical order. */
+
+/* ADDW or SUBW. */
+static void
+do_t_add_sub_w (void)
+{
+ int Rd, Rn;
+
+ Rd = inst.operands[0].reg;
+ Rn = inst.operands[1].reg;
+
+ constraint (Rd == 15, _("PC not allowed as destination"));
+ inst.instruction |= (Rn << 16) | (Rd << 8);
+ inst.reloc.type = BFD_RELOC_ARM_T32_IMM12;
+}
+
+/* Parse an add or subtract instruction. We get here with inst.instruction
+ equalling any of THUMB_OPCODE_add, adds, sub, or subs. */
+
+static void
+do_t_add_sub (void)
+{
+ int Rd, Rs, Rn;
- /* Conflicts can occur on stores as well as loads. */
- conflict_reg = (conflict_reg == reg);
+ Rd = inst.operands[0].reg;
+ Rs = (inst.operands[1].present
+ ? inst.operands[1].reg /* Rd, Rs, foo */
+ : inst.operands[0].reg); /* Rd, foo -> Rd, Rd, foo */
- skip_whitespace (str);
+ if (unified_syntax)
+ {
+ bfd_boolean flags;
+ bfd_boolean narrow;
+ int opcode;
- if (*str == ']')
+ flags = (inst.instruction == T_MNEM_adds
+ || inst.instruction == T_MNEM_subs);
+ if (flags)
+ narrow = (current_it_mask == 0);
+ else
+ narrow = (current_it_mask != 0);
+ if (!inst.operands[2].isreg)
{
- str ++;
-
- if (skip_past_comma (&str) == SUCCESS)
- {
- /* [Rn],... (post inc) */
- if (ldst_extend_v4 (&str) == FAIL)
- return;
- if (conflict_reg)
- as_warn (_("%s register same as write-back base"),
- ((inst.instruction & LOAD_BIT)
- ? _("destination") : _("source")));
- }
- else
+ opcode = 0;
+ if (inst.size_req != 4)
{
- /* [Rn] */
- inst.instruction |= HWOFFSET_IMM;
-
- skip_whitespace (str);
-
- if (*str == '!')
+ 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)
+ opcode = add ? T_MNEM_inc_sp : T_MNEM_dec_sp;
+ else if (Rd <= 7 && Rs == REG_SP && add && !flags)
+ opcode = T_MNEM_add_sp;
+ else if (Rd <= 7 && Rs == REG_PC && add && !flags)
+ opcode = T_MNEM_add_pc;
+ else if (Rd <= 7 && Rs <= 7 && narrow)
{
- if (conflict_reg)
- as_warn (_("%s register same as write-back base"),
- ((inst.instruction & LOAD_BIT)
- ? _("destination") : _("source")));
- str++;
- inst.instruction |= WRITE_BACK;
+ if (flags)
+ opcode = add ? T_MNEM_addis : T_MNEM_subis;
+ else
+ opcode = add ? T_MNEM_addi : T_MNEM_subi;
}
-
- inst.instruction |= INDEX_UP;
- pre_inc = 1;
+ if (opcode)
+ {
+ inst.instruction = THUMB_OP16(opcode);
+ inst.instruction |= (Rd << 4) | Rs;
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD;
+ if (inst.size_req != 2)
+ inst.relax = opcode;
+ }
+ else
+ constraint (inst.size_req == 2, BAD_HIREG);
+ }
+ 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;
}
}
else
{
- /* [Rn,...] */
- if (skip_past_comma (&str) == FAIL)
+ Rn = inst.operands[2].reg;
+ /* See if we can do this with a 16-bit instruction. */
+ if (!inst.operands[2].shifted && inst.size_req != 4)
{
- inst.error = _("pre-indexed expression expected");
- return;
- }
-
- pre_inc = 1;
- if (ldst_extend_v4 (&str) == FAIL)
- return;
+ if (Rd > 7 || Rs > 7 || Rn > 7)
+ narrow = FALSE;
- skip_whitespace (str);
-
- if (*str++ != ']')
- {
- inst.error = _("missing ]");
- return;
- }
-
- skip_whitespace (str);
+ if (narrow)
+ {
+ inst.instruction = ((inst.instruction == T_MNEM_adds
+ || inst.instruction == T_MNEM_add)
+ ? T_OPCODE_ADD_R3
+ : T_OPCODE_SUB_R3);
+ inst.instruction |= Rd | (Rs << 3) | (Rn << 6);
+ return;
+ }
- if (*str == '!')
- {
- if (conflict_reg)
- as_warn (_("%s register same as write-back base"),
- ((inst.instruction & LOAD_BIT)
- ? _("destination") : _("source")));
- str++;
- inst.instruction |= WRITE_BACK;
+ if (inst.instruction == T_MNEM_add)
+ {
+ if (Rd == Rs)
+ {
+ inst.instruction = T_OPCODE_ADD_HI;
+ inst.instruction |= (Rd & 8) << 4;
+ inst.instruction |= (Rd & 7);
+ inst.instruction |= Rn << 3;
+ return;
+ }
+ /* ... because addition is commutative! */
+ else if (Rd == Rn)
+ {
+ inst.instruction = T_OPCODE_ADD_HI;
+ inst.instruction |= (Rd & 8) << 4;
+ inst.instruction |= (Rd & 7);
+ inst.instruction |= Rs << 3;
+ return;
+ }
+ }
}
+ /* If we get here, it can't be done in 16 bits. */
+ constraint (inst.operands[2].shifted && inst.operands[2].immisreg,
+ _("shift must be constant"));
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= Rd << 8;
+ inst.instruction |= Rs << 16;
+ encode_thumb32_shifted_operand (2);
}
}
- else if (*str == '=')
+ else
{
- if ((inst.instruction & LOAD_BIT) == 0)
- {
- inst.error = _("invalid pseudo operation");
- return;
- }
-
- /* XXX Does this work correctly for half-word/byte ops? */
- /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */
- str++;
-
- skip_whitespace (str);
-
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
+ constraint (inst.instruction == T_MNEM_adds
+ || inst.instruction == T_MNEM_subs,
+ BAD_THUMB32);
- if (inst.reloc.exp.X_op != O_constant
- && inst.reloc.exp.X_op != O_symbol)
+ if (!inst.operands[2].isreg) /* Rd, Rs, #imm */
{
- inst.error = _("constant expression expected");
+ constraint ((Rd > 7 && (Rd != REG_SP || Rs != REG_SP))
+ || (Rs > 7 && Rs != REG_SP && Rs != REG_PC),
+ BAD_HIREG);
+
+ inst.instruction = (inst.instruction == T_MNEM_add
+ ? 0x0000 : 0x8000);
+ inst.instruction |= (Rd << 4) | Rs;
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD;
return;
}
- if (inst.reloc.exp.X_op == O_constant)
- {
- value = validate_immediate (inst.reloc.exp.X_add_number);
+ Rn = inst.operands[2].reg;
+ constraint (inst.operands[2].shifted, _("unshifted register required"));
- if (value != FAIL)
- {
- /* This can be done with a mov instruction. */
- inst.instruction &= LITERAL_MASK;
- inst.instruction |= INST_IMMEDIATE | (OPCODE_MOV << DATA_OP_SHIFT);
- inst.instruction |= value & 0xfff;
- end_of_line (str);
- return;
- }
-
- value = validate_immediate (~ inst.reloc.exp.X_add_number);
-
- if (value != FAIL)
- {
- /* This can be done with a mvn instruction. */
- inst.instruction &= LITERAL_MASK;
- inst.instruction |= INST_IMMEDIATE | (OPCODE_MVN << DATA_OP_SHIFT);
- inst.instruction |= value & 0xfff;
- end_of_line (str);
- return;
- }
+ /* We now have Rd, Rs, and Rn set to registers. */
+ if (Rd > 7 || Rs > 7 || Rn > 7)
+ {
+ /* Can't do this for SUB. */
+ constraint (inst.instruction == T_MNEM_sub, BAD_HIREG);
+ inst.instruction = T_OPCODE_ADD_HI;
+ inst.instruction |= (Rd & 8) << 4;
+ inst.instruction |= (Rd & 7);
+ if (Rs == Rd)
+ inst.instruction |= Rn << 3;
+ else if (Rn == Rd)
+ inst.instruction |= Rs << 3;
+ else
+ constraint (1, _("dest must overlap one source register"));
}
-
- /* Insert into literal pool. */
- if (add_to_lit_pool () == FAIL)
+ else
{
- if (!inst.error)
- inst.error = _("literal pool insertion failed");
- return;
+ inst.instruction = (inst.instruction == T_MNEM_add
+ ? T_OPCODE_ADD_R3 : T_OPCODE_SUB_R3);
+ inst.instruction |= Rd | (Rs << 3) | (Rn << 6);
}
+ }
+}
- /* Change the instruction exp to point to the pool. */
- inst.instruction |= HWOFFSET_IMM;
- inst.reloc.type = BFD_RELOC_ARM_HWLITERAL;
+static void
+do_t_adr (void)
+{
+ if (unified_syntax && inst.size_req == 0 && inst.operands[0].reg <= 7)
+ {
+ /* Defer to section relaxation. */
+ inst.relax = inst.instruction;
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 4;
+ }
+ else if (unified_syntax && inst.size_req != 2)
+ {
+ /* Generate a 32-bit opcode. */
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.reloc.type = BFD_RELOC_ARM_T32_ADD_PC12;
inst.reloc.pc_rel = 1;
- inst.instruction |= (REG_PC << 16);
- pre_inc = 1;
}
else
{
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
-
- inst.instruction |= HWOFFSET_IMM;
- inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
-#ifndef TE_WINCE
- /* PC rel adjust. */
- inst.reloc.exp.X_add_number -= 8;
-#endif
+ /* Generate a 16-bit opcode. */
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD;
+ inst.reloc.exp.X_add_number -= 4; /* PC relative adjust. */
inst.reloc.pc_rel = 1;
- inst.instruction |= (REG_PC << 16);
- pre_inc = 1;
- }
- inst.instruction |= (pre_inc ? PRE_INDEX : 0);
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg << 4;
+ }
}
-static long
-reg_list (strp)
- char ** strp;
+/* Arithmetic instructions for which there is just one 16-bit
+ instruction encoding, and it allows only two low registers.
+ For maximal compatibility with ARM syntax, we allow three register
+ operands even when Thumb-32 instructions are not available, as long
+ as the first two are identical. For instance, both "sbc r0,r1" and
+ "sbc r0,r0,r1" are allowed. */
+static void
+do_t_arit3 (void)
{
- char * str = * strp;
- long range = 0;
- int another_range;
+ int Rd, Rs, Rn;
- /* We come back here if we get ranges concatenated by '+' or '|'. */
- do
- {
- another_range = 0;
+ Rd = inst.operands[0].reg;
+ Rs = (inst.operands[1].present
+ ? inst.operands[1].reg /* Rd, Rs, foo */
+ : inst.operands[0].reg); /* Rd, foo -> Rd, Rd, foo */
+ Rn = inst.operands[2].reg;
- if (*str == '{')
+ if (unified_syntax)
+ {
+ if (!inst.operands[2].isreg)
{
- int in_range = 0;
- int cur_reg = -1;
+ /* For an immediate, we always generate a 32-bit opcode;
+ section relaxation will shrink it later if possible. */
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction = (inst.instruction & 0xe1ffffff) | 0x10000000;
+ inst.instruction |= Rd << 8;
+ inst.instruction |= Rs << 16;
+ inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ }
+ else
+ {
+ bfd_boolean narrow;
- str++;
- do
- {
- int reg;
+ /* See if we can do this with a 16-bit instruction. */
+ if (THUMB_SETS_FLAGS (inst.instruction))
+ narrow = current_it_mask == 0;
+ else
+ narrow = current_it_mask != 0;
- skip_whitespace (str);
+ if (Rd > 7 || Rn > 7 || Rs > 7)
+ narrow = FALSE;
+ if (inst.operands[2].shifted)
+ narrow = FALSE;
+ if (inst.size_req == 4)
+ narrow = FALSE;
- if ((reg = reg_required_here (& str, -1)) == FAIL)
- return FAIL;
+ if (narrow
+ && Rd == Rs)
+ {
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= Rd;
+ inst.instruction |= Rn << 3;
+ return;
+ }
- if (in_range)
- {
- int i;
+ /* If we get here, it can't be done in 16 bits. */
+ constraint (inst.operands[2].shifted
+ && inst.operands[2].immisreg,
+ _("shift must be constant"));
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= Rd << 8;
+ inst.instruction |= Rs << 16;
+ encode_thumb32_shifted_operand (2);
+ }
+ }
+ else
+ {
+ /* On its face this is a lie - the instruction does set the
+ flags. However, the only supported mnemonic in this mode
+ says it doesn't. */
+ constraint (THUMB_SETS_FLAGS (inst.instruction), BAD_THUMB32);
- if (reg <= cur_reg)
- {
- inst.error = _("bad range in register list");
- return FAIL;
- }
+ constraint (!inst.operands[2].isreg || inst.operands[2].shifted,
+ _("unshifted register required"));
+ constraint (Rd > 7 || Rs > 7 || Rn > 7, BAD_HIREG);
+ constraint (Rd != Rs,
+ _("dest and source1 must be the same register"));
- for (i = cur_reg + 1; i < reg; i++)
- {
- if (range & (1 << i))
- as_tsktsk
- (_("Warning: duplicated register (r%d) in register list"),
- i);
- else
- range |= 1 << i;
- }
- in_range = 0;
- }
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= Rd;
+ inst.instruction |= Rn << 3;
+ }
+}
- if (range & (1 << reg))
- as_tsktsk (_("Warning: duplicated register (r%d) in register list"),
- reg);
- else if (reg <= cur_reg)
- as_tsktsk (_("Warning: register range not in ascending order"));
+/* Similarly, but for instructions where the arithmetic operation is
+ commutative, so we can allow either of them to be different from
+ the destination operand in a 16-bit instruction. For instance, all
+ three of "adc r0,r1", "adc r0,r0,r1", and "adc r0,r1,r0" are
+ accepted. */
+static void
+do_t_arit3c (void)
+{
+ int Rd, Rs, Rn;
- range |= 1 << reg;
- cur_reg = reg;
- }
- while (skip_past_comma (&str) != FAIL
- || (in_range = 1, *str++ == '-'));
- str--;
- skip_whitespace (str);
+ Rd = inst.operands[0].reg;
+ Rs = (inst.operands[1].present
+ ? inst.operands[1].reg /* Rd, Rs, foo */
+ : inst.operands[0].reg); /* Rd, foo -> Rd, Rd, foo */
+ Rn = inst.operands[2].reg;
- if (*str++ != '}')
- {
- inst.error = _("missing `}'");
- return FAIL;
- }
+ if (unified_syntax)
+ {
+ if (!inst.operands[2].isreg)
+ {
+ /* For an immediate, we always generate a 32-bit opcode;
+ section relaxation will shrink it later if possible. */
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction = (inst.instruction & 0xe1ffffff) | 0x10000000;
+ inst.instruction |= Rd << 8;
+ inst.instruction |= Rs << 16;
+ inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
}
else
{
- expressionS expr;
+ bfd_boolean narrow;
- if (my_get_expression (&expr, &str))
- return FAIL;
+ /* See if we can do this with a 16-bit instruction. */
+ if (THUMB_SETS_FLAGS (inst.instruction))
+ narrow = current_it_mask == 0;
+ else
+ narrow = current_it_mask != 0;
- if (expr.X_op == O_constant)
- {
- if (expr.X_add_number
- != (expr.X_add_number & 0x0000ffff))
- {
- inst.error = _("invalid register mask");
- return FAIL;
- }
+ if (Rd > 7 || Rn > 7 || Rs > 7)
+ narrow = FALSE;
+ if (inst.operands[2].shifted)
+ narrow = FALSE;
+ if (inst.size_req == 4)
+ narrow = FALSE;
- if ((range & expr.X_add_number) != 0)
+ if (narrow)
+ {
+ if (Rd == Rs)
{
- int regno = range & expr.X_add_number;
-
- regno &= -regno;
- regno = (1 << regno) - 1;
- as_tsktsk
- (_("Warning: duplicated register (r%d) in register list"),
- regno);
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= Rd;
+ inst.instruction |= Rn << 3;
+ return;
}
-
- range |= expr.X_add_number;
- }
- else
- {
- if (inst.reloc.type != 0)
+ if (Rd == Rn)
{
- inst.error = _("expression too complex");
- return FAIL;
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= Rd;
+ inst.instruction |= Rs << 3;
+ return;
}
-
- memcpy (&inst.reloc.exp, &expr, sizeof (expressionS));
- inst.reloc.type = BFD_RELOC_ARM_MULTI;
- inst.reloc.pc_rel = 0;
}
- }
- skip_whitespace (str);
-
- if (*str == '|' || *str == '+')
- {
- str++;
- another_range = 1;
+ /* If we get here, it can't be done in 16 bits. */
+ constraint (inst.operands[2].shifted
+ && inst.operands[2].immisreg,
+ _("shift must be constant"));
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= Rd << 8;
+ inst.instruction |= Rs << 16;
+ encode_thumb32_shifted_operand (2);
}
}
- while (another_range);
-
- *strp = str;
- return range;
-}
-
-static void
-do_ldmstm (str)
- char * str;
-{
- int base_reg;
- long range;
-
- skip_whitespace (str);
-
- if ((base_reg = reg_required_here (&str, 16)) == FAIL)
- return;
-
- if (base_reg == REG_PC)
+ else
{
- inst.error = _("r15 not allowed as base register");
- return;
- }
+ /* On its face this is a lie - the instruction does set the
+ flags. However, the only supported mnemonic in this mode
+ says it doesn't. */
+ constraint (THUMB_SETS_FLAGS (inst.instruction), BAD_THUMB32);
- skip_whitespace (str);
+ constraint (!inst.operands[2].isreg || inst.operands[2].shifted,
+ _("unshifted register required"));
+ constraint (Rd > 7 || Rs > 7 || Rn > 7, BAD_HIREG);
- if (*str == '!')
- {
- inst.instruction |= WRITE_BACK;
- str++;
- }
-
- if (skip_past_comma (&str) == FAIL
- || (range = reg_list (&str)) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= Rd;
- if (*str == '^')
- {
- str++;
- inst.instruction |= LDM_TYPE_2_OR_3;
+ if (Rd == Rs)
+ inst.instruction |= Rn << 3;
+ else if (Rd == Rn)
+ inst.instruction |= Rs << 3;
+ else
+ constraint (1, _("dest must overlap one source register"));
}
+}
- if (inst.instruction & WRITE_BACK)
+static void
+do_t_barrier (void)
+{
+ if (inst.operands[0].present)
{
- /* Check for unpredictable uses of writeback. */
- if (inst.instruction & LOAD_BIT)
- {
- /* Not allowed in LDM type 2. */
- if ((inst.instruction & LDM_TYPE_2_OR_3)
- && ((range & (1 << REG_PC)) == 0))
- as_warn (_("writeback of base register is UNPREDICTABLE"));
- /* Only allowed if base reg not in list for other types. */
- else if (range & (1 << base_reg))
- as_warn (_("writeback of base register when in register list is UNPREDICTABLE"));
- }
- else /* STM. */
- {
- /* Not allowed for type 2. */
- if (inst.instruction & LDM_TYPE_2_OR_3)
- as_warn (_("writeback of base register is UNPREDICTABLE"));
- /* Only allowed if base reg not in list, or first in list. */
- else if ((range & (1 << base_reg))
- && (range & ((1 << base_reg) - 1)))
- as_warn (_("if writeback register is in list, it must be the lowest reg in the list"));
- }
+ constraint ((inst.instruction & 0xf0) != 0x40
+ && inst.operands[0].imm != 0xf,
+ "bad barrier type");
+ inst.instruction |= inst.operands[0].imm;
}
-
- inst.instruction |= range;
- end_of_line (str);
+ else
+ inst.instruction |= 0xf;
}
static void
-do_swi (str)
- char * str;
+do_t_bfc (void)
{
- skip_whitespace (str);
-
- /* Allow optional leading '#'. */
- if (is_immediate_prefix (*str))
- str++;
-
- if (my_get_expression (& inst.reloc.exp, & str))
- return;
-
- inst.reloc.type = BFD_RELOC_ARM_SWI;
- inst.reloc.pc_rel = 0;
- end_of_line (str);
+ unsigned int msb = inst.operands[1].imm + inst.operands[2].imm;
+ constraint (msb > 32, _("bit-field extends past end of register"));
+ /* The instruction encoding stores the LSB and MSB,
+ not the LSB and width. */
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= (inst.operands[1].imm & 0x1c) << 10;
+ inst.instruction |= (inst.operands[1].imm & 0x03) << 6;
+ inst.instruction |= msb - 1;
}
static void
-do_swap (str)
- char * str;
+do_t_bfi (void)
{
- int reg;
-
- skip_whitespace (str);
-
- if ((reg = reg_required_here (&str, 12)) == FAIL)
- return;
-
- if (reg == REG_PC)
- {
- inst.error = _("r15 not allowed in swap");
- return;
- }
-
- if (skip_past_comma (&str) == FAIL
- || (reg = reg_required_here (&str, 0)) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- if (reg == REG_PC)
- {
- inst.error = _("r15 not allowed in swap");
- return;
- }
-
- if (skip_past_comma (&str) == FAIL
- || *str++ != '[')
- {
- inst.error = BAD_ARGS;
- return;
- }
+ unsigned int msb;
- skip_whitespace (str);
+ /* #0 in second position is alternative syntax for bfc, which is
+ the same instruction but with REG_PC in the Rm field. */
+ if (!inst.operands[1].isreg)
+ inst.operands[1].reg = REG_PC;
- if ((reg = reg_required_here (&str, 16)) == FAIL)
- return;
-
- if (reg == REG_PC)
- {
- inst.error = BAD_PC;
- return;
- }
-
- skip_whitespace (str);
-
- if (*str++ != ']')
- {
- inst.error = _("missing ]");
- return;
- }
-
- end_of_line (str);
+ msb = inst.operands[2].imm + inst.operands[3].imm;
+ constraint (msb > 32, _("bit-field extends past end of register"));
+ /* The instruction encoding stores the LSB and MSB,
+ not the LSB and width. */
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= (inst.operands[2].imm & 0x1c) << 10;
+ inst.instruction |= (inst.operands[2].imm & 0x03) << 6;
+ inst.instruction |= msb - 1;
}
static void
-do_branch (str)
- char * str;
+do_t_bfx (void)
{
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
+ constraint (inst.operands[2].imm + inst.operands[3].imm > 32,
+ _("bit-field extends past end of register"));
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= (inst.operands[2].imm & 0x1c) << 10;
+ inst.instruction |= (inst.operands[2].imm & 0x03) << 6;
+ inst.instruction |= inst.operands[3].imm - 1;
+}
-#ifdef OBJ_ELF
- {
- char * save_in;
-
- /* ScottB: February 5, 1998 - Check to see of PLT32 reloc
- required for the instruction. */
-
- /* arm_parse_reloc () works on input_line_pointer.
- We actually want to parse the operands to the branch instruction
- passed in 'str'. Save the input pointer and restore it later. */
- save_in = input_line_pointer;
- input_line_pointer = str;
- if (inst.reloc.exp.X_op == O_symbol
- && *str == '('
- && arm_parse_reloc () == BFD_RELOC_ARM_PLT32)
- {
- inst.reloc.type = BFD_RELOC_ARM_PLT32;
- inst.reloc.pc_rel = 0;
- /* Modify str to point to after parsed operands, otherwise
- end_of_line() will complain about the (PLT) left in str. */
- str = input_line_pointer;
- }
- else
- {
- inst.reloc.type = BFD_RELOC_ARM_PCREL_BRANCH;
- inst.reloc.pc_rel = 1;
- }
- input_line_pointer = save_in;
- }
-#else
- inst.reloc.type = BFD_RELOC_ARM_PCREL_BRANCH;
- inst.reloc.pc_rel = 1;
-#endif /* OBJ_ELF */
+/* ARM V5 Thumb BLX (argument parse)
+ BLX <target_addr> which is BLX(1)
+ BLX <Rm> which is BLX(2)
+ Unfortunately, there are two different opcodes for this mnemonic.
+ So, the insns[].value is not used, and the code here zaps values
+ into inst.instruction.
- end_of_line (str);
-}
+ ??? How to take advantage of the additional two bits of displacement
+ available in Thumb32 mode? Need new relocation? */
static void
-do_bx (str)
- char * str;
+do_t_blx (void)
{
- int reg;
-
- skip_whitespace (str);
-
- if ((reg = reg_required_here (&str, 0)) == FAIL)
+ constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
+ if (inst.operands[0].isreg)
+ /* We have a register, so this is BLX(2). */
+ inst.instruction |= inst.operands[0].reg << 3;
+ else
{
- inst.error = BAD_ARGS;
- return;
+ /* No register. This must be BLX(1). */
+ inst.instruction = 0xf000e800;
+#ifdef OBJ_ELF
+ if (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4)
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH23;
+ else
+#endif
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BLX;
+ inst.reloc.pc_rel = 1;
}
-
- /* Note - it is not illegal to do a "bx pc". Useless, but not illegal. */
- if (reg == REG_PC)
- as_tsktsk (_("use of r15 in bx in ARM mode is not really useful"));
-
- end_of_line (str);
}
static void
-do_cdp (str)
- char * str;
+do_t_branch (void)
{
- /* Co-processor data operation.
- Format: CDP{cond} CP#,<expr>,CRd,CRn,CRm{,<expr>} */
- skip_whitespace (str);
-
- if (co_proc_number (&str) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- if (skip_past_comma (&str) == FAIL
- || cp_opc_expr (&str, 20,4) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ int opcode;
+ int cond;
- if (skip_past_comma (&str) == FAIL
- || cp_reg_required_here (&str, 12) == FAIL)
+ if (current_it_mask)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ /* Conditional branches inside IT blocks are encoded as unconditional
+ branches. */
+ cond = COND_ALWAYS;
+ /* A branch must be the last instruction in an IT block. */
+ constraint (current_it_mask != 0x10, BAD_BRANCH);
}
+ else
+ cond = inst.cond;
- if (skip_past_comma (&str) == FAIL
- || cp_reg_required_here (&str, 16) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ if (cond != COND_ALWAYS)
+ opcode = T_MNEM_bcond;
+ else
+ opcode = inst.instruction;
- if (skip_past_comma (&str) == FAIL
- || cp_reg_required_here (&str, 0) == FAIL)
+ if (unified_syntax && inst.size_req == 4)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ inst.instruction = THUMB_OP32(opcode);
+ if (cond == COND_ALWAYS)
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH25;
+ else
+ {
+ assert (cond != 0xF);
+ inst.instruction |= cond << 22;
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH20;
+ }
}
-
- if (skip_past_comma (&str) == SUCCESS)
+ else
{
- if (cp_opc_expr (&str, 5, 3) == FAIL)
+ inst.instruction = THUMB_OP16(opcode);
+ if (cond == COND_ALWAYS)
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH12;
+ else
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ inst.instruction |= cond << 8;
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH9;
}
+ /* Allow section relaxation. */
+ if (unified_syntax && inst.size_req != 2)
+ inst.relax = opcode;
}
- end_of_line (str);
+ inst.reloc.pc_rel = 1;
}
static void
-do_lstc (str)
- char * str;
+do_t_bkpt (void)
{
- /* Co-processor register load/store.
- Format: <LDC|STC{cond}[L] CP#,CRd,<address> */
-
- skip_whitespace (str);
-
- if (co_proc_number (&str) == FAIL)
+ constraint (inst.cond != COND_ALWAYS,
+ _("instruction is always unconditional"));
+ if (inst.operands[0].present)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ constraint (inst.operands[0].imm > 255,
+ _("immediate value out of range"));
+ inst.instruction |= inst.operands[0].imm;
}
+}
- if (skip_past_comma (&str) == FAIL
- || cp_reg_required_here (&str, 12) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void
+do_t_branch23 (void)
+{
+ constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH23;
+ inst.reloc.pc_rel = 1;
- if (skip_past_comma (&str) == FAIL
- || cp_address_required_here (&str, CP_WB_OK) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ /* If the destination of the branch is a defined symbol which does not have
+ the THUMB_FUNC attribute, then we must be calling a function which has
+ the (interfacearm) attribute. We look for the Thumb entry point to that
+ function and change the branch to refer to that function instead. */
+ if ( inst.reloc.exp.X_op == O_symbol
+ && inst.reloc.exp.X_add_symbol != NULL
+ && S_IS_DEFINED (inst.reloc.exp.X_add_symbol)
+ && ! THUMB_IS_FUNC (inst.reloc.exp.X_add_symbol))
+ inst.reloc.exp.X_add_symbol =
+ find_real_start (inst.reloc.exp.X_add_symbol);
+}
- end_of_line (str);
+static void
+do_t_bx (void)
+{
+ constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
+ inst.instruction |= inst.operands[0].reg << 3;
+ /* ??? FIXME: Should add a hacky reloc here if reg is REG_PC. The reloc
+ should cause the alignment to be checked once it is known. This is
+ because BX PC only works if the instruction is word aligned. */
}
static void
-do_co_reg (str)
- char * str;
+do_t_bxj (void)
{
- /* Co-processor register transfer.
- Format: <MCR|MRC>{cond} CP#,<expr1>,Rd,CRn,CRm{,<expr2>} */
+ constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
+ if (inst.operands[0].reg == REG_PC)
+ as_tsktsk (_("use of r15 in bxj is not really useful"));
- skip_whitespace (str);
+ inst.instruction |= inst.operands[0].reg << 16;
+}
- if (co_proc_number (&str) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void
+do_t_clz (void)
+{
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[1].reg;
+}
- if (skip_past_comma (&str) == FAIL
- || cp_opc_expr (&str, 21, 3) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void
+do_t_cps (void)
+{
+ constraint (current_it_mask, BAD_NOT_IT);
+ inst.instruction |= inst.operands[0].imm;
+}
- if (skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL)
+static void
+do_t_cpsi (void)
+{
+ constraint (current_it_mask, BAD_NOT_IT);
+ if (unified_syntax
+ && (inst.operands[1].present || inst.size_req == 4)
+ && ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v6_notm))
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ unsigned int imod = (inst.instruction & 0x0030) >> 4;
+ inst.instruction = 0xf3af8000;
+ inst.instruction |= imod << 9;
+ inst.instruction |= inst.operands[0].imm << 5;
+ if (inst.operands[1].present)
+ inst.instruction |= 0x100 | inst.operands[1].imm;
}
-
- if (skip_past_comma (&str) == FAIL
- || cp_reg_required_here (&str, 16) == FAIL)
+ else
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v1)
+ && (inst.operands[0].imm & 4),
+ _("selected processor does not support 'A' form "
+ "of this instruction"));
+ constraint (inst.operands[1].present || inst.size_req == 4,
+ _("Thumb does not support the 2-argument "
+ "form of this instruction"));
+ inst.instruction |= inst.operands[0].imm;
}
+}
+
+/* THUMB CPY instruction (argument parse). */
- if (skip_past_comma (&str) == FAIL
- || cp_reg_required_here (&str, 0) == FAIL)
+static void
+do_t_cpy (void)
+{
+ if (inst.size_req == 4)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ inst.instruction = THUMB_OP32 (T_MNEM_mov);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg;
}
-
- if (skip_past_comma (&str) == SUCCESS)
+ else
{
- if (cp_opc_expr (&str, 5, 3) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ inst.instruction |= (inst.operands[0].reg & 0x8) << 4;
+ inst.instruction |= (inst.operands[0].reg & 0x7);
+ inst.instruction |= inst.operands[1].reg << 3;
}
-
- end_of_line (str);
}
static void
-do_fpa_ctrl (str)
- char * str;
+do_t_czb (void)
{
- /* FP control registers.
- Format: <WFS|RFS|WFC|RFC>{cond} Rn */
-
- skip_whitespace (str);
-
- if (reg_required_here (&str, 12) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- end_of_line (str);
+ constraint (current_it_mask, BAD_NOT_IT);
+ constraint (inst.operands[0].reg > 7, BAD_HIREG);
+ inst.instruction |= inst.operands[0].reg;
+ inst.reloc.pc_rel = 1;
+ inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH7;
}
static void
-do_fpa_ldst (str)
- char * str;
+do_t_dbg (void)
{
- skip_whitespace (str);
-
- if (fp_reg_required_here (&str, 12) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ inst.instruction |= inst.operands[0].imm;
+}
- if (skip_past_comma (&str) == FAIL
- || cp_address_required_here (&str, CP_WB_OK) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+static void
+do_t_div (void)
+{
+ if (!inst.operands[1].present)
+ inst.operands[1].reg = inst.operands[0].reg;
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
+}
- end_of_line (str);
+static void
+do_t_hint (void)
+{
+ if (unified_syntax && inst.size_req == 4)
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ else
+ inst.instruction = THUMB_OP16 (inst.instruction);
}
static void
-do_fpa_ldmstm (str)
- char * str;
+do_t_it (void)
{
- int num_regs;
+ unsigned int cond = inst.operands[0].imm;
- skip_whitespace (str);
+ constraint (current_it_mask, BAD_NOT_IT);
+ current_it_mask = (inst.instruction & 0xf) | 0x10;
+ current_cc = cond;
- if (fp_reg_required_here (&str, 12) == FAIL)
+ /* If the condition is a negative condition, invert the mask. */
+ if ((cond & 0x1) == 0x0)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ unsigned int mask = inst.instruction & 0x000f;
- /* Get Number of registers to transfer. */
- if (skip_past_comma (&str) == FAIL
- || my_get_expression (&inst.reloc.exp, &str))
- {
- if (! inst.error)
- inst.error = _("constant expression expected");
- return;
- }
+ if ((mask & 0x7) == 0)
+ /* no conversion needed */;
+ else if ((mask & 0x3) == 0)
+ mask ^= 0x8;
+ else if ((mask & 0x1) == 0)
+ mask ^= 0xC;
+ else
+ mask ^= 0xE;
- if (inst.reloc.exp.X_op != O_constant)
- {
- inst.error = _("constant value required for number of registers");
- return;
+ inst.instruction &= 0xfff0;
+ inst.instruction |= mask;
}
- num_regs = inst.reloc.exp.X_add_number;
-
- if (num_regs < 1 || num_regs > 4)
- {
- inst.error = _("number of registers must be in the range [1:4]");
- return;
- }
+ inst.instruction |= cond << 4;
+}
- switch (num_regs)
- {
- case 1:
- inst.instruction |= CP_T_X;
- break;
- case 2:
- inst.instruction |= CP_T_Y;
- break;
- case 3:
- inst.instruction |= CP_T_Y | CP_T_X;
- break;
- case 4:
- break;
- default:
- abort ();
- }
+static void
+do_t_ldmstm (void)
+{
+ /* This really doesn't seem worth it. */
+ constraint (inst.reloc.type != BFD_RELOC_UNUSED,
+ _("expression too complex"));
+ constraint (inst.operands[1].writeback,
+ _("Thumb load/store multiple does not support {reglist}^"));
- if (inst.instruction & (CP_T_Pre | CP_T_UD)) /* ea/fd format. */
+ if (unified_syntax)
{
- int reg;
- int write_back;
- int offset;
-
- /* The instruction specified "ea" or "fd", so we can only accept
- [Rn]{!}. The instruction does not really support stacking or
- unstacking, so we have to emulate these by setting appropriate
- bits and offsets. */
- if (skip_past_comma (&str) == FAIL
- || *str != '[')
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- str++;
- skip_whitespace (str);
-
- if ((reg = reg_required_here (&str, 16)) == FAIL)
- return;
-
- skip_whitespace (str);
-
- if (*str != ']')
+ /* 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)))))
{
- inst.error = BAD_ARGS;
- return;
- }
+ 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);
- str++;
- if (*str == '!')
- {
- write_back = 1;
- str++;
- if (reg == REG_PC)
- {
- inst.error =
- _("r15 not allowed as base register with write-back");
- return;
- }
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm;
}
else
- write_back = 0;
-
- if (inst.instruction & CP_T_Pre)
{
- /* Pre-decrement. */
- offset = 3 * num_regs;
- if (write_back)
- inst.instruction |= CP_T_WB;
- }
- else
- {
- /* Post-increment. */
- if (write_back)
+ if (inst.operands[1].imm & (1 << 13))
+ as_warn (_("SP should not be in register list"));
+ if (inst.instruction == T_MNEM_stmia)
{
- inst.instruction |= CP_T_WB;
- offset = 3 * num_regs;
+ 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))
+ as_warn (_("value stored for r%d is UNPREDICTABLE"),
+ inst.operands[0].reg);
}
else
{
- /* No write-back, so convert this into a standard pre-increment
- instruction -- aesthetically more pleasing. */
- inst.instruction |= CP_T_Pre | CP_T_UD;
- offset = 0;
+ 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"));
}
+ 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;
}
-
- inst.instruction |= offset;
}
- else if (skip_past_comma (&str) == FAIL
- || cp_address_required_here (&str, CP_WB_OK) == FAIL)
+ else
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ constraint (inst.operands[0].reg > 7
+ || (inst.operands[1].imm & ~0xff), BAD_HIREG);
+ if (inst.instruction == T_MNEM_stmia)
+ {
+ if (!inst.operands[0].writeback)
+ as_warn (_("this instruction will write back the base register"));
+ if ((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);
+ }
+ else
+ {
+ if (!inst.operands[0].writeback
+ && !(inst.operands[1].imm & (1 << inst.operands[0].reg)))
+ as_warn (_("this instruction will write back the base register"));
+ else if (inst.operands[0].writeback
+ && (inst.operands[1].imm & (1 << inst.operands[0].reg)))
+ as_warn (_("this instruction will not write back the base register"));
+ }
- end_of_line (str);
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm;
+ }
}
static void
-do_fpa_dyadic (str)
- char * str;
+do_t_ldrex (void)
{
- skip_whitespace (str);
-
- if (fp_reg_required_here (&str, 12) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ constraint (!inst.operands[1].isreg || !inst.operands[1].preind
+ || inst.operands[1].postind || inst.operands[1].writeback
+ || inst.operands[1].immisreg || inst.operands[1].shifted
+ || inst.operands[1].negative,
+ BAD_ADDR_MODE);
- if (skip_past_comma (&str) == FAIL
- || fp_reg_required_here (&str, 16) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.reloc.type = BFD_RELOC_ARM_T32_OFFSET_U8;
+}
- if (skip_past_comma (&str) == FAIL
- || fp_op2 (&str) == FAIL)
+static void
+do_t_ldrexd (void)
+{
+ if (!inst.operands[1].present)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ constraint (inst.operands[0].reg == REG_LR,
+ _("r14 not allowed as first register "
+ "when second register is omitted"));
+ inst.operands[1].reg = inst.operands[0].reg + 1;
}
+ constraint (inst.operands[0].reg == inst.operands[1].reg,
+ BAD_OVERLAP);
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 8;
+ inst.instruction |= inst.operands[2].reg << 16;
}
static void
-do_fpa_monadic (str)
- char * str;
+do_t_ldst (void)
{
- skip_whitespace (str);
+ unsigned long opcode;
+ int Rn;
- if (fp_reg_required_here (&str, 12) == FAIL)
+ opcode = inst.instruction;
+ if (unified_syntax)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
+ if (!inst.operands[1].isreg)
+ {
+ if (opcode <= 0xffff)
+ inst.instruction = THUMB_OP32 (opcode);
+ if (move_or_literal_pool (0, /*thumb_p=*/TRUE, /*mode_3=*/FALSE))
+ return;
+ }
+ if (inst.operands[1].isreg
+ && !inst.operands[1].writeback
+ && !inst.operands[1].shifted && !inst.operands[1].postind
+ && !inst.operands[1].negative && inst.operands[0].reg <= 7
+ && opcode <= 0xffff
+ && inst.size_req != 4)
+ {
+ /* Insn may have a 16-bit form. */
+ Rn = inst.operands[1].reg;
+ if (inst.operands[1].immisreg)
+ {
+ inst.instruction = THUMB_OP16 (opcode);
+ /* [Rn, Ri] */
+ if (Rn <= 7 && inst.operands[1].imm <= 7)
+ goto op16;
+ }
+ else if ((Rn <= 7 && opcode != T_MNEM_ldrsh
+ && opcode != T_MNEM_ldrsb)
+ || ((Rn == REG_PC || Rn == REG_SP) && opcode == T_MNEM_ldr)
+ || (Rn == REG_SP && opcode == T_MNEM_str))
+ {
+ /* [Rn, #const] */
+ if (Rn > 7)
+ {
+ if (Rn == REG_PC)
+ {
+ if (inst.reloc.pc_rel)
+ opcode = T_MNEM_ldr_pc2;
+ else
+ opcode = T_MNEM_ldr_pc;
+ }
+ else
+ {
+ if (opcode == T_MNEM_ldr)
+ opcode = T_MNEM_ldr_sp;
+ else
+ opcode = T_MNEM_str_sp;
+ }
+ inst.instruction = inst.operands[0].reg << 8;
+ }
+ else
+ {
+ inst.instruction = inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ }
+ inst.instruction |= THUMB_OP16 (opcode);
+ if (inst.size_req == 2)
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
+ else
+ inst.relax = opcode;
+ return;
+ }
+ }
+ /* Definitely a 32-bit variant. */
+ inst.instruction = THUMB_OP32 (opcode);
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_thumb32_addr_mode (1, /*is_t=*/FALSE, /*is_d=*/FALSE);
return;
}
- if (skip_past_comma (&str) == FAIL
- || fp_op2 (&str) == FAIL)
+ constraint (inst.operands[0].reg > 7, BAD_HIREG);
+
+ if (inst.instruction == T_MNEM_ldrsh || inst.instruction == T_MNEM_ldrsb)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ /* Only [Rn,Rm] is acceptable. */
+ constraint (inst.operands[1].reg > 7 || inst.operands[1].imm > 7, BAD_HIREG);
+ constraint (!inst.operands[1].isreg || !inst.operands[1].immisreg
+ || inst.operands[1].postind || inst.operands[1].shifted
+ || inst.operands[1].negative,
+ _("Thumb does not support this addressing mode"));
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ goto op16;
}
+
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ if (!inst.operands[1].isreg)
+ if (move_or_literal_pool (0, /*thumb_p=*/TRUE, /*mode_3=*/FALSE))
+ return;
- end_of_line (str);
-}
+ constraint (!inst.operands[1].preind
+ || inst.operands[1].shifted
+ || inst.operands[1].writeback,
+ _("Thumb does not support this addressing mode"));
+ if (inst.operands[1].reg == REG_PC || inst.operands[1].reg == REG_SP)
+ {
+ constraint (inst.instruction & 0x0600,
+ _("byte or halfword not valid for base register"));
+ constraint (inst.operands[1].reg == REG_PC
+ && !(inst.instruction & THUMB_LOAD_BIT),
+ _("r15 based store not allowed"));
+ constraint (inst.operands[1].immisreg,
+ _("invalid base register for register offset"));
-static void
-do_fpa_cmp (str)
- char * str;
-{
- skip_whitespace (str);
+ if (inst.operands[1].reg == REG_PC)
+ inst.instruction = T_OPCODE_LDR_PC;
+ else if (inst.instruction & THUMB_LOAD_BIT)
+ inst.instruction = T_OPCODE_LDR_SP;
+ else
+ inst.instruction = T_OPCODE_STR_SP;
- if (fp_reg_required_here (&str, 16) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
return;
}
- if (skip_past_comma (&str) == FAIL
- || fp_op2 (&str) == FAIL)
+ constraint (inst.operands[1].reg > 7, BAD_HIREG);
+ if (!inst.operands[1].immisreg)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
+ /* Immediate offset. */
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
return;
}
- end_of_line (str);
-}
-
-static void
-do_fpa_from_reg (str)
- char * str;
-{
- skip_whitespace (str);
-
- if (fp_reg_required_here (&str, 16) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ /* Register offset. */
+ constraint (inst.operands[1].imm > 7, BAD_HIREG);
+ constraint (inst.operands[1].negative,
+ _("Thumb does not support this addressing mode"));
- if (skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL)
+ op16:
+ switch (inst.instruction)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ case T_OPCODE_STR_IW: inst.instruction = T_OPCODE_STR_RW; break;
+ case T_OPCODE_STR_IH: inst.instruction = T_OPCODE_STR_RH; break;
+ case T_OPCODE_STR_IB: inst.instruction = T_OPCODE_STR_RB; break;
+ case T_OPCODE_LDR_IW: inst.instruction = T_OPCODE_LDR_RW; break;
+ case T_OPCODE_LDR_IH: inst.instruction = T_OPCODE_LDR_RH; break;
+ case T_OPCODE_LDR_IB: inst.instruction = T_OPCODE_LDR_RB; break;
+ case 0x5600 /* ldrsb */:
+ case 0x5e00 /* ldrsh */: break;
+ default: abort ();
}
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ inst.instruction |= inst.operands[1].imm << 6;
}
static void
-do_fpa_to_reg (str)
- char * str;
+do_t_ldstd (void)
{
- skip_whitespace (str);
-
- if (reg_required_here (&str, 12) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || fp_reg_required_here (&str, 0) == FAIL)
+ if (!inst.operands[1].present)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ inst.operands[1].reg = inst.operands[0].reg + 1;
+ constraint (inst.operands[0].reg == REG_LR,
+ _("r14 not allowed here"));
}
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 8;
+ encode_thumb32_addr_mode (2, /*is_t=*/FALSE, /*is_d=*/TRUE);
+
+}
- end_of_line (str);
+static void
+do_t_ldstt (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ encode_thumb32_addr_mode (1, /*is_t=*/TRUE, /*is_d=*/FALSE);
}
-static int
-vfp_sp_reg_required_here (str, pos)
- char **str;
- enum vfp_sp_reg_pos pos;
+static void
+do_t_mla (void)
{
- int reg;
- char *start = *str;
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
+ inst.instruction |= inst.operands[3].reg << 12;
+}
- if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_SN].htab)) != FAIL)
- {
- switch (pos)
- {
- case VFP_REG_Sd:
- inst.instruction |= ((reg >> 1) << 12) | ((reg & 1) << 22);
- break;
+static void
+do_t_mlal (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 8;
+ inst.instruction |= inst.operands[2].reg << 16;
+ inst.instruction |= inst.operands[3].reg;
+}
- case VFP_REG_Sn:
- inst.instruction |= ((reg >> 1) << 16) | ((reg & 1) << 7);
- break;
+static void
+do_t_mov_cmp (void)
+{
+ if (unified_syntax)
+ {
+ int r0off = (inst.instruction == T_MNEM_mov
+ || inst.instruction == T_MNEM_movs) ? 8 : 16;
+ unsigned long opcode;
+ bfd_boolean narrow;
+ bfd_boolean low_regs;
- case VFP_REG_Sm:
- inst.instruction |= ((reg >> 1) << 0) | ((reg & 1) << 5);
- break;
+ low_regs = (inst.operands[0].reg <= 7 && inst.operands[1].reg <= 7);
+ opcode = inst.instruction;
+ if (current_it_mask)
+ narrow = opcode != T_MNEM_movs;
+ else
+ narrow = opcode != T_MNEM_movs || low_regs;
+ if (inst.size_req == 4
+ || inst.operands[1].shifted)
+ narrow = FALSE;
- default:
- abort ();
+ if (!inst.operands[1].isreg)
+ {
+ /* Immediate operand. */
+ if (current_it_mask == 0 && opcode == T_MNEM_mov)
+ narrow = 0;
+ if (low_regs && narrow)
+ {
+ inst.instruction = THUMB_OP16 (opcode);
+ inst.instruction |= inst.operands[0].reg << 8;
+ if (inst.size_req == 2)
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_IMM;
+ else
+ inst.relax = opcode;
+ }
+ else
+ {
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction = (inst.instruction & 0xe1ffffff) | 0x10000000;
+ inst.instruction |= inst.operands[0].reg << r0off;
+ inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ }
}
- return reg;
- }
-
- /* In the few cases where we might be able to accept something else
- this error can be overridden. */
- inst.error = _(all_reg_maps[REG_TYPE_SN].expected);
+ else if (!narrow)
+ {
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << r0off;
+ encode_thumb32_shifted_operand (1);
+ }
+ else
+ switch (inst.instruction)
+ {
+ case T_MNEM_mov:
+ inst.instruction = T_OPCODE_MOV_HR;
+ inst.instruction |= (inst.operands[0].reg & 0x8) << 4;
+ inst.instruction |= (inst.operands[0].reg & 0x7);
+ inst.instruction |= inst.operands[1].reg << 3;
+ break;
- /* Restore the start point. */
- *str = start;
- return FAIL;
-}
+ case T_MNEM_movs:
+ /* We know we have low registers at this point.
+ Generate ADD Rd, Rs, #0. */
+ inst.instruction = T_OPCODE_ADD_I3;
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ break;
-static int
-vfp_dp_reg_required_here (str, pos)
- char **str;
- enum vfp_dp_reg_pos pos;
-{
- int reg;
- char *start = *str;
+ case T_MNEM_cmp:
+ if (low_regs)
+ {
+ inst.instruction = T_OPCODE_CMP_LR;
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ }
+ else
+ {
+ inst.instruction = T_OPCODE_CMP_HR;
+ inst.instruction |= (inst.operands[0].reg & 0x8) << 4;
+ inst.instruction |= (inst.operands[0].reg & 0x7);
+ inst.instruction |= inst.operands[1].reg << 3;
+ }
+ break;
+ }
+ return;
+ }
- if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_DN].htab)) != FAIL)
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ if (inst.operands[1].isreg)
{
- switch (pos)
+ if (inst.operands[0].reg < 8 && inst.operands[1].reg < 8)
{
- case VFP_REG_Dd:
- inst.instruction |= reg << 12;
- break;
-
- case VFP_REG_Dn:
- inst.instruction |= reg << 16;
- break;
-
- case VFP_REG_Dm:
- inst.instruction |= reg << 0;
- break;
+ /* A move of two lowregs is encoded as ADD Rd, Rs, #0
+ since a MOV instruction produces unpredictable results. */
+ if (inst.instruction == T_OPCODE_MOV_I8)
+ inst.instruction = T_OPCODE_ADD_I3;
+ else
+ inst.instruction = T_OPCODE_CMP_LR;
- default:
- abort ();
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ }
+ else
+ {
+ if (inst.instruction == T_OPCODE_MOV_I8)
+ inst.instruction = T_OPCODE_MOV_HR;
+ else
+ inst.instruction = T_OPCODE_CMP_HR;
+ do_t_cpy ();
}
- return reg;
}
-
- /* In the few cases where we might be able to accept something else
- this error can be overridden. */
- inst.error = _(all_reg_maps[REG_TYPE_DN].expected);
-
- /* Restore the start point. */
- *str = start;
- return FAIL;
-}
-
-static void
-do_vfp_sp_monadic (str)
- char *str;
-{
- skip_whitespace (str);
-
- if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || vfp_sp_reg_required_here (&str, VFP_REG_Sm) == FAIL)
+ else
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ constraint (inst.operands[0].reg > 7,
+ _("only lo regs allowed with immediate"));
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_IMM;
}
-
- end_of_line (str);
}
static void
-do_vfp_dp_monadic (str)
- char *str;
+do_t_mov16 (void)
{
- skip_whitespace (str);
-
- if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- end_of_line (str);
+ 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);
}
static void
-do_vfp_sp_dyadic (str)
- char *str;
+do_t_mvn_tst (void)
{
- skip_whitespace (str);
+ if (unified_syntax)
+ {
+ int r0off = (inst.instruction == T_MNEM_mvn
+ || inst.instruction == T_MNEM_mvns) ? 8 : 16;
+ bfd_boolean narrow;
- if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
- return;
+ if (inst.size_req == 4
+ || inst.instruction > 0xffff
+ || inst.operands[1].shifted
+ || inst.operands[0].reg > 7 || inst.operands[1].reg > 7)
+ narrow = FALSE;
+ else if (inst.instruction == T_MNEM_cmn)
+ narrow = TRUE;
+ else if (THUMB_SETS_FLAGS (inst.instruction))
+ narrow = (current_it_mask == 0);
+ else
+ narrow = (current_it_mask != 0);
- if (skip_past_comma (&str) == FAIL
- || vfp_sp_reg_required_here (&str, VFP_REG_Sn) == FAIL
- || skip_past_comma (&str) == FAIL
- || vfp_sp_reg_required_here (&str, VFP_REG_Sm) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ if (!inst.operands[1].isreg)
+ {
+ /* For an immediate, we always generate a 32-bit opcode;
+ section relaxation will shrink it later if possible. */
+ if (inst.instruction < 0xffff)
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction = (inst.instruction & 0xe1ffffff) | 0x10000000;
+ inst.instruction |= inst.operands[0].reg << r0off;
+ inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ }
+ else
+ {
+ /* See if we can do this with a 16-bit instruction. */
+ if (narrow)
+ {
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ }
+ else
+ {
+ constraint (inst.operands[1].shifted
+ && inst.operands[1].immisreg,
+ _("shift must be constant"));
+ if (inst.instruction < 0xffff)
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << r0off;
+ encode_thumb32_shifted_operand (1);
+ }
+ }
}
+ else
+ {
+ constraint (inst.instruction > 0xffff
+ || inst.instruction == T_MNEM_mvns, BAD_THUMB32);
+ constraint (!inst.operands[1].isreg || inst.operands[1].shifted,
+ _("unshifted register required"));
+ constraint (inst.operands[0].reg > 7 || inst.operands[1].reg > 7,
+ BAD_HIREG);
- end_of_line (str);
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ }
}
static void
-do_vfp_dp_dyadic (str)
- char *str;
+do_t_mrs (void)
{
- skip_whitespace (str);
-
- if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || vfp_dp_reg_required_here (&str, VFP_REG_Dn) == FAIL
- || skip_past_comma (&str) == FAIL
- || vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
+ int flags;
+ flags = inst.operands[1].imm & (PSR_c|PSR_x|PSR_s|PSR_f|SPSR_BIT);
+ if (flags == 0)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v7m),
+ _("selected processor does not support "
+ "requested special purpose register"));
}
-
- end_of_line (str);
+ else
+ {
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v1),
+ _("selected processor does not support "
+ "requested special purpose register %x"));
+ /* mrs only accepts CPSR/SPSR/CPSR_all/SPSR_all. */
+ constraint ((flags & ~SPSR_BIT) != (PSR_c|PSR_f),
+ _("'CPSR' or 'SPSR' expected"));
+ }
+
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= (flags & SPSR_BIT) >> 2;
+ inst.instruction |= inst.operands[1].imm & 0xff;
}
static void
-do_vfp_reg_from_sp (str)
- char *str;
+do_t_msr (void)
{
- skip_whitespace (str);
+ int flags;
- if (reg_required_here (&str, 12) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || vfp_sp_reg_required_here (&str, VFP_REG_Sn) == FAIL)
+ constraint (!inst.operands[1].isreg,
+ _("Thumb encoding does not support an immediate here"));
+ flags = inst.operands[0].imm;
+ if (flags & ~0xff)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v1),
+ _("selected processor does not support "
+ "requested special purpose register"));
}
-
- end_of_line (str);
+ else
+ {
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v7m),
+ _("selected processor does not support "
+ "requested special purpose register"));
+ flags |= PSR_f;
+ }
+ inst.instruction |= (flags & SPSR_BIT) >> 2;
+ inst.instruction |= (flags & ~SPSR_BIT) >> 8;
+ inst.instruction |= (flags & 0xff);
+ inst.instruction |= inst.operands[1].reg << 16;
}
static void
-do_vfp_reg2_from_sp2 (str)
- char *str;
+do_t_mul (void)
{
- skip_whitespace (str);
+ if (!inst.operands[2].present)
+ inst.operands[2].reg = inst.operands[0].reg;
- if (reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 16) == FAIL
- || skip_past_comma (&str) == FAIL)
+ /* There is no 32-bit MULS and no 16-bit MUL. */
+ if (unified_syntax && inst.instruction == T_MNEM_mul)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg << 0;
}
-
- /* We require exactly two consecutive SP registers. */
- if (vfp_sp_reg_list (&str, VFP_REG_Sm) != 2)
+ else
{
- if (! inst.error)
- inst.error = _("only two consecutive VFP SP registers allowed here");
- }
+ constraint (!unified_syntax
+ && inst.instruction == T_MNEM_muls, BAD_THUMB32);
+ constraint (inst.operands[0].reg > 7 || inst.operands[1].reg > 7,
+ BAD_HIREG);
+
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg;
- end_of_line (str);
+ if (inst.operands[0].reg == inst.operands[1].reg)
+ inst.instruction |= inst.operands[2].reg << 3;
+ else if (inst.operands[0].reg == inst.operands[2].reg)
+ inst.instruction |= inst.operands[1].reg << 3;
+ else
+ constraint (1, _("dest must overlap one source register"));
+ }
}
static void
-do_vfp_sp_from_reg (str)
- char *str;
+do_t_mull (void)
{
- skip_whitespace (str);
-
- if (vfp_sp_reg_required_here (&str, VFP_REG_Sn) == FAIL)
- return;
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 8;
+ inst.instruction |= inst.operands[2].reg << 16;
+ inst.instruction |= inst.operands[3].reg;
- if (skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- end_of_line (str);
+ if (inst.operands[0].reg == inst.operands[1].reg)
+ as_tsktsk (_("rdhi and rdlo must be different"));
}
static void
-do_vfp_sp2_from_reg2 (str)
- char *str;
+do_t_nop (void)
{
- skip_whitespace (str);
-
- /* We require exactly two consecutive SP registers. */
- if (vfp_sp_reg_list (&str, VFP_REG_Sm) != 2)
+ if (unified_syntax)
{
- if (! inst.error)
- inst.error = _("only two consecutive VFP SP registers allowed here");
+ if (inst.size_req == 4 || inst.operands[0].imm > 15)
+ {
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].imm;
+ }
+ else
+ {
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].imm << 4;
+ }
}
-
- if (skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 16) == FAIL)
+ else
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ constraint (inst.operands[0].present,
+ _("Thumb does not support NOP with hints"));
+ inst.instruction = 0x46c0;
}
-
- end_of_line (str);
}
static void
-do_vfp_reg_from_dp (str)
- char *str;
+do_t_neg (void)
{
- skip_whitespace (str);
+ if (unified_syntax)
+ {
+ bfd_boolean narrow;
- if (reg_required_here (&str, 12) == FAIL)
- return;
+ if (THUMB_SETS_FLAGS (inst.instruction))
+ narrow = (current_it_mask == 0);
+ else
+ narrow = (current_it_mask != 0);
+ if (inst.operands[0].reg > 7 || inst.operands[1].reg > 7)
+ narrow = FALSE;
+ if (inst.size_req == 4)
+ narrow = FALSE;
- if (skip_past_comma (&str) == FAIL
- || vfp_dp_reg_required_here (&str, VFP_REG_Dn) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ if (!narrow)
+ {
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ }
+ else
+ {
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ }
}
+ else
+ {
+ constraint (inst.operands[0].reg > 7 || inst.operands[1].reg > 7,
+ BAD_HIREG);
+ constraint (THUMB_SETS_FLAGS (inst.instruction), BAD_THUMB32);
- end_of_line (str);
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ }
}
static void
-do_vfp_reg2_from_dp (str)
- char *str;
+do_t_pkhbt (void)
{
- skip_whitespace (str);
-
- if (reg_required_here (&str, 12) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 16) == FAIL
- || skip_past_comma (&str) == FAIL
- || vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
+ if (inst.operands[3].present)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ unsigned int val = inst.reloc.exp.X_add_number;
+ constraint (inst.reloc.exp.X_op != O_constant,
+ _("expression too complex"));
+ inst.instruction |= (val & 0x1c) << 10;
+ inst.instruction |= (val & 0x03) << 6;
}
-
- end_of_line (str);
}
static void
-do_vfp_dp_from_reg (str)
- char *str;
+do_t_pkhtb (void)
{
- skip_whitespace (str);
-
- if (vfp_dp_reg_required_here (&str, VFP_REG_Dn) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- end_of_line (str);
+ if (!inst.operands[3].present)
+ inst.instruction &= ~0x00000020;
+ do_t_pkhbt ();
}
static void
-do_vfp_dp_from_reg2 (str)
- char *str;
+do_t_pld (void)
{
- skip_whitespace (str);
-
- if (vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL
- || skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 16) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- end_of_line (str);
+ encode_thumb32_addr_mode (0, /*is_t=*/FALSE, /*is_d=*/FALSE);
}
-static const struct vfp_reg *
-vfp_psr_parse (str)
- char **str;
+static void
+do_t_push_pop (void)
{
- char *start = *str;
- char c;
- char *p;
- const struct vfp_reg *vreg;
-
- p = start;
+ unsigned mask;
+
+ constraint (inst.operands[0].writeback,
+ _("push/pop do not support {reglist}^"));
+ constraint (inst.reloc.type != BFD_RELOC_UNUSED,
+ _("expression too complex"));
- /* Find the end of the current token. */
- do
+ mask = inst.operands[0].imm;
+ if ((mask & ~0xff) == 0)
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ else if ((inst.instruction == T_MNEM_push
+ && (mask & ~0xff) == 1 << REG_LR)
+ || (inst.instruction == T_MNEM_pop
+ && (mask & ~0xff) == 1 << REG_PC))
{
- c = *p++;
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= THUMB_PP_PC_LR;
+ mask &= 0xff;
}
- while (ISALPHA (c));
-
- /* Mark it. */
- *--p = 0;
-
- for (vreg = vfp_regs + 0;
- vreg < vfp_regs + sizeof (vfp_regs) / sizeof (struct vfp_reg);
- vreg++)
+ else if (unified_syntax)
{
- if (strcmp (start, vreg->name) == 0)
+ if (mask & (1 << 13))
+ inst.error = _("SP not allowed in register list");
+ if (inst.instruction == T_MNEM_push)
{
- *p = c;
- *str = p;
- return vreg;
+ 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);
}
-
- *p = c;
- return NULL;
-}
-
-static int
-vfp_psr_required_here (str)
- char **str;
-{
- char *start = *str;
- const struct vfp_reg *vreg;
-
- vreg = vfp_psr_parse (str);
-
- if (vreg)
- {
- inst.instruction |= vreg->regno;
- return SUCCESS;
- }
-
- inst.error = _("VFP system register expected");
-
- *str = start;
- return FAIL;
-}
-
-static void
-do_vfp_reg_from_ctrl (str)
- char *str;
-{
- skip_whitespace (str);
-
- if (reg_required_here (&str, 12) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || vfp_psr_required_here (&str) == FAIL)
+ else
{
- if (! inst.error)
- inst.error = BAD_ARGS;
+ inst.error = _("invalid register list to push/pop instruction");
return;
}
- end_of_line (str);
+ inst.instruction |= mask;
}
static void
-do_vfp_ctrl_from_reg (str)
- char *str;
+do_t_rbit (void)
{
- skip_whitespace (str);
-
- if (vfp_psr_required_here (&str) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || reg_required_here (&str, 12) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
}
static void
-do_vfp_sp_ldst (str)
- char *str;
+do_t_rev (void)
{
- skip_whitespace (str);
-
- if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
+ if (inst.operands[0].reg <= 7 && inst.operands[1].reg <= 7
+ && inst.size_req != 4)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
}
-
- if (skip_past_comma (&str) == FAIL
- || cp_address_required_here (&str, CP_NO_WB) == FAIL)
+ else if (unified_syntax)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[1].reg;
}
-
- end_of_line (str);
+ else
+ inst.error = BAD_HIREG;
}
static void
-do_vfp_dp_ldst (str)
- char *str;
+do_t_rsb (void)
{
- skip_whitespace (str);
+ int Rd, Rs;
- if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ Rd = inst.operands[0].reg;
+ Rs = (inst.operands[1].present
+ ? inst.operands[1].reg /* Rd, Rs, foo */
+ : inst.operands[0].reg); /* Rd, foo -> Rd, Rd, foo */
- if (skip_past_comma (&str) == FAIL
- || cp_address_required_here (&str, CP_NO_WB) == FAIL)
+ inst.instruction |= Rd << 8;
+ inst.instruction |= Rs << 16;
+ if (!inst.operands[2].isreg)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ inst.instruction = (inst.instruction & 0xe1ffffff) | 0x10000000;
+ inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
}
-
- end_of_line (str);
+ else
+ encode_thumb32_shifted_operand (2);
}
-/* Parse and encode a VFP SP register list, storing the initial
- register in position POS and returning the range as the result. If
- the string is invalid return FAIL (an invalid range). */
-static long
-vfp_sp_reg_list (str, pos)
- char **str;
- enum vfp_sp_reg_pos pos;
+static void
+do_t_setend (void)
{
- long range = 0;
- int base_reg = 0;
- int new_base;
- long base_bits = 0;
- int count = 0;
- long tempinst;
- unsigned long mask = 0;
- int warned = 0;
-
- if (**str != '{')
- return FAIL;
-
- (*str)++;
- skip_whitespace (*str);
+ constraint (current_it_mask, BAD_NOT_IT);
+ if (inst.operands[0].imm)
+ inst.instruction |= 0x8;
+}
- tempinst = inst.instruction;
+static void
+do_t_shift (void)
+{
+ if (!inst.operands[1].present)
+ inst.operands[1].reg = inst.operands[0].reg;
- do
+ if (unified_syntax)
{
- inst.instruction = 0;
-
- if ((new_base = vfp_sp_reg_required_here (str, pos)) == FAIL)
- return FAIL;
+ bfd_boolean narrow;
+ int shift_kind;
- if (count == 0 || base_reg > new_base)
+ switch (inst.instruction)
{
- base_reg = new_base;
- base_bits = inst.instruction;
+ case T_MNEM_asr:
+ case T_MNEM_asrs: shift_kind = SHIFT_ASR; break;
+ case T_MNEM_lsl:
+ case T_MNEM_lsls: shift_kind = SHIFT_LSL; break;
+ case T_MNEM_lsr:
+ case T_MNEM_lsrs: shift_kind = SHIFT_LSR; break;
+ case T_MNEM_ror:
+ case T_MNEM_rors: shift_kind = SHIFT_ROR; break;
+ default: abort ();
}
- if (mask & (1 << new_base))
- {
- inst.error = _("invalid register list");
- return FAIL;
- }
-
- if ((mask >> new_base) != 0 && ! warned)
- {
- as_tsktsk (_("register list not in ascending order"));
- warned = 1;
- }
-
- mask |= 1 << new_base;
- count++;
-
- skip_whitespace (*str);
-
- if (**str == '-') /* We have the start of a range expression */
- {
- int high_range;
-
- (*str)++;
-
- if ((high_range
- = arm_reg_parse (str, all_reg_maps[REG_TYPE_SN].htab))
- == FAIL)
+ if (THUMB_SETS_FLAGS (inst.instruction))
+ narrow = (current_it_mask == 0);
+ else
+ narrow = (current_it_mask != 0);
+ if (inst.operands[0].reg > 7 || inst.operands[1].reg > 7)
+ narrow = FALSE;
+ if (!inst.operands[2].isreg && shift_kind == SHIFT_ROR)
+ narrow = FALSE;
+ if (inst.operands[2].isreg
+ && (inst.operands[1].reg != inst.operands[0].reg
+ || inst.operands[2].reg > 7))
+ narrow = FALSE;
+ if (inst.size_req == 4)
+ narrow = FALSE;
+
+ if (!narrow)
+ {
+ if (inst.operands[2].isreg)
{
- inst.error = _(all_reg_maps[REG_TYPE_SN].expected);
- return FAIL;
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
}
-
- if (high_range <= new_base)
+ else
{
- inst.error = _("register range not in ascending order");
- return FAIL;
+ inst.operands[1].shifted = 1;
+ inst.operands[1].shift_kind = shift_kind;
+ inst.instruction = THUMB_OP32 (THUMB_SETS_FLAGS (inst.instruction)
+ ? T_MNEM_movs : T_MNEM_mov);
+ inst.instruction |= inst.operands[0].reg << 8;
+ encode_thumb32_shifted_operand (1);
+ /* Prevent the incorrect generation of an ARM_IMMEDIATE fixup. */
+ inst.reloc.type = BFD_RELOC_UNUSED;
}
-
- for (new_base++; new_base <= high_range; new_base++)
- {
- if (mask & (1 << new_base))
- {
- inst.error = _("invalid register list");
- return FAIL;
- }
-
- mask |= 1 << new_base;
- count++;
- }
- }
- }
- while (skip_past_comma (str) != FAIL);
-
- if (**str != '}')
- {
- inst.error = _("invalid register list");
- return FAIL;
- }
-
- (*str)++;
-
- range = count;
-
- /* Sanity check -- should have raised a parse error above. */
- if (count == 0 || count > 32)
- abort ();
-
- /* Final test -- the registers must be consecutive. */
- while (count--)
- {
- if ((mask & (1 << base_reg++)) == 0)
- {
- inst.error = _("non-contiguous register range");
- return FAIL;
- }
- }
-
- inst.instruction = tempinst | base_bits;
- return range;
-}
-
-static long
-vfp_dp_reg_list (str)
- char **str;
-{
- long range = 0;
- int base_reg = 0;
- int new_base;
- int count = 0;
- long tempinst;
- unsigned long mask = 0;
- int warned = 0;
-
- if (**str != '{')
- return FAIL;
-
- (*str)++;
- skip_whitespace (*str);
-
- tempinst = inst.instruction;
-
- do
- {
- inst.instruction = 0;
-
- if ((new_base = vfp_dp_reg_required_here (str, VFP_REG_Dd)) == FAIL)
- return FAIL;
-
- if (count == 0 || base_reg > new_base)
- {
- base_reg = new_base;
- range = inst.instruction;
- }
-
- if (mask & (1 << new_base))
- {
- inst.error = _("invalid register list");
- return FAIL;
- }
-
- if ((mask >> new_base) != 0 && ! warned)
- {
- as_tsktsk (_("register list not in ascending order"));
- warned = 1;
}
-
- mask |= 1 << new_base;
- count++;
-
- skip_whitespace (*str);
-
- if (**str == '-') /* We have the start of a range expression */
+ else
{
- int high_range;
-
- (*str)++;
-
- if ((high_range
- = arm_reg_parse (str, all_reg_maps[REG_TYPE_DN].htab))
- == FAIL)
+ if (inst.operands[2].isreg)
{
- inst.error = _(all_reg_maps[REG_TYPE_DN].expected);
- return FAIL;
- }
-
- if (high_range <= new_base)
- {
- inst.error = _("register range not in ascending order");
- return FAIL;
+ switch (shift_kind)
+ {
+ case SHIFT_ASR: inst.instruction = T_OPCODE_ASR_R; break;
+ case SHIFT_LSL: inst.instruction = T_OPCODE_LSL_R; break;
+ case SHIFT_LSR: inst.instruction = T_OPCODE_LSR_R; break;
+ case SHIFT_ROR: inst.instruction = T_OPCODE_ROR_R; break;
+ default: abort ();
+ }
+
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[2].reg << 3;
}
-
- for (new_base++; new_base <= high_range; new_base++)
+ else
{
- if (mask & (1 << new_base))
+ switch (shift_kind)
{
- inst.error = _("invalid register list");
- return FAIL;
+ case SHIFT_ASR: inst.instruction = T_OPCODE_ASR_I; break;
+ case SHIFT_LSL: inst.instruction = T_OPCODE_LSL_I; break;
+ case SHIFT_LSR: inst.instruction = T_OPCODE_LSR_I; break;
+ default: abort ();
}
-
- mask |= 1 << new_base;
- count++;
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_SHIFT;
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
}
}
}
- while (skip_past_comma (str) != FAIL);
-
- if (**str != '}')
+ else
{
- inst.error = _("invalid register list");
- return FAIL;
- }
-
- (*str)++;
+ constraint (inst.operands[0].reg > 7
+ || inst.operands[1].reg > 7, BAD_HIREG);
+ constraint (THUMB_SETS_FLAGS (inst.instruction), BAD_THUMB32);
- range |= 2 * count;
-
- /* Sanity check -- should have raised a parse error above. */
- if (count == 0 || count > 16)
- abort ();
+ if (inst.operands[2].isreg) /* Rd, {Rs,} Rn */
+ {
+ constraint (inst.operands[2].reg > 7, BAD_HIREG);
+ constraint (inst.operands[0].reg != inst.operands[1].reg,
+ _("source1 and dest must be same register"));
- /* Final test -- the registers must be consecutive. */
- while (count--)
- {
- if ((mask & (1 << base_reg++)) == 0)
+ switch (inst.instruction)
+ {
+ case T_MNEM_asr: inst.instruction = T_OPCODE_ASR_R; break;
+ case T_MNEM_lsl: inst.instruction = T_OPCODE_LSL_R; break;
+ case T_MNEM_lsr: inst.instruction = T_OPCODE_LSR_R; break;
+ case T_MNEM_ror: inst.instruction = T_OPCODE_ROR_R; break;
+ default: abort ();
+ }
+
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[2].reg << 3;
+ }
+ else
{
- inst.error = _("non-contiguous register range");
- return FAIL;
+ switch (inst.instruction)
+ {
+ case T_MNEM_asr: inst.instruction = T_OPCODE_ASR_I; break;
+ case T_MNEM_lsl: inst.instruction = T_OPCODE_LSL_I; break;
+ case T_MNEM_lsr: inst.instruction = T_OPCODE_LSR_I; break;
+ case T_MNEM_ror: inst.error = _("ror #imm not supported"); return;
+ default: abort ();
+ }
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_SHIFT;
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
}
}
-
- inst.instruction = tempinst;
- return range;
}
static void
-vfp_sp_ldstm (str, ldstm_type)
- char *str;
- enum vfp_ldstm_type ldstm_type;
+do_t_simd (void)
{
- long range;
-
- skip_whitespace (str);
-
- if (reg_required_here (&str, 16) == FAIL)
- return;
-
- skip_whitespace (str);
-
- if (*str == '!')
- {
- inst.instruction |= WRITE_BACK;
- str++;
- }
- else if (ldstm_type != VFP_LDSTMIA)
- {
- inst.error = _("this addressing mode requires base-register writeback");
- return;
- }
-
- if (skip_past_comma (&str) == FAIL
- || (range = vfp_sp_reg_list (&str, VFP_REG_Sd)) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- inst.instruction |= range;
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
}
static void
-vfp_dp_ldstm (str, ldstm_type)
- char *str;
- enum vfp_ldstm_type ldstm_type;
+do_t_smc (void)
{
- long range;
-
- skip_whitespace (str);
-
- if (reg_required_here (&str, 16) == FAIL)
- return;
+ unsigned int value = inst.reloc.exp.X_add_number;
+ constraint (inst.reloc.exp.X_op != O_constant,
+ _("expression too complex"));
+ inst.reloc.type = BFD_RELOC_UNUSED;
+ inst.instruction |= (value & 0xf000) >> 12;
+ inst.instruction |= (value & 0x0ff0);
+ inst.instruction |= (value & 0x000f) << 16;
+}
- skip_whitespace (str);
+static void
+do_t_ssat (void)
+{
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm - 1;
+ inst.instruction |= inst.operands[2].reg << 16;
- if (*str == '!')
+ if (inst.operands[3].present)
{
- inst.instruction |= WRITE_BACK;
- str++;
- }
- else if (ldstm_type != VFP_LDSTMIA && ldstm_type != VFP_LDSTMIAX)
- {
- inst.error = _("this addressing mode requires base-register writeback");
- return;
- }
+ constraint (inst.reloc.exp.X_op != O_constant,
+ _("expression too complex"));
- if (skip_past_comma (&str) == FAIL
- || (range = vfp_dp_reg_list (&str)) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ if (inst.reloc.exp.X_add_number != 0)
+ {
+ if (inst.operands[3].shift_kind == SHIFT_ASR)
+ inst.instruction |= 0x00200000; /* sh bit */
+ inst.instruction |= (inst.reloc.exp.X_add_number & 0x1c) << 10;
+ inst.instruction |= (inst.reloc.exp.X_add_number & 0x03) << 6;
+ }
+ inst.reloc.type = BFD_RELOC_UNUSED;
}
-
- if (ldstm_type == VFP_LDSTMIAX || ldstm_type == VFP_LDSTMDBX)
- range += 1;
-
- inst.instruction |= range;
- end_of_line (str);
}
static void
-do_vfp_sp_ldstmia (str)
- char *str;
+do_t_ssat16 (void)
{
- vfp_sp_ldstm (str, VFP_LDSTMIA);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm - 1;
+ inst.instruction |= inst.operands[2].reg << 16;
}
static void
-do_vfp_sp_ldstmdb (str)
- char *str;
+do_t_strex (void)
{
- vfp_sp_ldstm (str, VFP_LDSTMDB);
+ constraint (!inst.operands[2].isreg || !inst.operands[2].preind
+ || inst.operands[2].postind || inst.operands[2].writeback
+ || inst.operands[2].immisreg || inst.operands[2].shifted
+ || inst.operands[2].negative,
+ BAD_ADDR_MODE);
+
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 12;
+ inst.instruction |= inst.operands[2].reg << 16;
+ inst.reloc.type = BFD_RELOC_ARM_T32_OFFSET_U8;
}
static void
-do_vfp_dp_ldstmia (str)
- char *str;
+do_t_strexd (void)
{
- vfp_dp_ldstm (str, VFP_LDSTMIA);
+ if (!inst.operands[2].present)
+ inst.operands[2].reg = inst.operands[1].reg + 1;
+
+ constraint (inst.operands[0].reg == inst.operands[1].reg
+ || inst.operands[0].reg == inst.operands[2].reg
+ || inst.operands[0].reg == inst.operands[3].reg
+ || inst.operands[1].reg == inst.operands[2].reg,
+ BAD_OVERLAP);
+
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 12;
+ inst.instruction |= inst.operands[2].reg << 8;
+ inst.instruction |= inst.operands[3].reg << 16;
}
static void
-do_vfp_dp_ldstmdb (str)
- char *str;
+do_t_sxtah (void)
{
- vfp_dp_ldstm (str, VFP_LDSTMDB);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
+ inst.instruction |= inst.operands[3].imm << 4;
}
static void
-do_vfp_xp_ldstmia (str)
- char *str;
+do_t_sxth (void)
{
- vfp_dp_ldstm (str, VFP_LDSTMIAX);
+ if (inst.instruction <= 0xffff && inst.size_req != 4
+ && inst.operands[0].reg <= 7 && inst.operands[1].reg <= 7
+ && (!inst.operands[2].present || inst.operands[2].imm == 0))
+ {
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ }
+ else if (unified_syntax)
+ {
+ if (inst.instruction <= 0xffff)
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg;
+ inst.instruction |= inst.operands[2].imm << 4;
+ }
+ else
+ {
+ constraint (inst.operands[2].present && inst.operands[2].imm != 0,
+ _("Thumb encoding does not support rotation"));
+ constraint (1, BAD_HIREG);
+ }
}
static void
-do_vfp_xp_ldstmdb (str)
- char *str;
+do_t_swi (void)
{
- vfp_dp_ldstm (str, VFP_LDSTMDBX);
+ inst.reloc.type = BFD_RELOC_ARM_SWI;
}
static void
-do_vfp_sp_compare_z (str)
- char *str;
+do_t_tb (void)
{
- skip_whitespace (str);
+ int half;
- if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- end_of_line (str);
+ half = (inst.instruction & 0x10) != 0;
+ constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
+ constraint (inst.operands[0].immisreg,
+ _("instruction requires register index"));
+ constraint (inst.operands[0].imm == 15,
+ _("PC is not a valid index register"));
+ constraint (!half && inst.operands[0].shifted,
+ _("instruction does not allow shifted index"));
+ inst.instruction |= (inst.operands[0].reg << 16) | inst.operands[0].imm;
}
static void
-do_vfp_dp_compare_z (str)
- char *str;
+do_t_usat (void)
{
- skip_whitespace (str);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm;
+ inst.instruction |= inst.operands[2].reg << 16;
- if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
+ if (inst.operands[3].present)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ constraint (inst.reloc.exp.X_op != O_constant,
+ _("expression too complex"));
+ if (inst.reloc.exp.X_add_number != 0)
+ {
+ if (inst.operands[3].shift_kind == SHIFT_ASR)
+ inst.instruction |= 0x00200000; /* sh bit */
- end_of_line (str);
+ inst.instruction |= (inst.reloc.exp.X_add_number & 0x1c) << 10;
+ inst.instruction |= (inst.reloc.exp.X_add_number & 0x03) << 6;
+ }
+ inst.reloc.type = BFD_RELOC_UNUSED;
+ }
}
static void
-do_vfp_dp_sp_cvt (str)
- char *str;
+do_t_usat16 (void)
{
- skip_whitespace (str);
-
- if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || vfp_sp_reg_required_here (&str, VFP_REG_Sm) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- end_of_line (str);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm;
+ inst.instruction |= inst.operands[2].reg << 16;
}
+
+/* Overall per-instruction processing. */
+
+/* We need to be able to fix up arbitrary expressions in some statements.
+ This is so that we can handle symbols that are an arbitrary distance from
+ the pc. The most common cases are of the form ((+/-sym -/+ . - 8) & mask),
+ which returns part of an address in a form which will be valid for
+ a data instruction. We do this by pushing the expression into a symbol
+ in the expr_section, and creating a fix for that. */
static void
-do_vfp_sp_dp_cvt (str)
- char *str;
+fix_new_arm (fragS * frag,
+ int where,
+ short int size,
+ expressionS * exp,
+ int pc_rel,
+ int reloc)
{
- skip_whitespace (str);
+ fixS * new_fix;
- if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
- return;
-
- if (skip_past_comma (&str) == FAIL
- || vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
+ switch (exp->X_op)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ 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;
}
- end_of_line (str);
+ /* Mark whether the fix is to a THUMB instruction, or an ARM
+ instruction. */
+ new_fix->tc_fix_data = thumb_mode;
}
-/* Thumb specific routines. */
-
-/* Parse and validate that a register is of the right form, this saves
- repeated checking of this information in many similar cases.
- Unlike the 32-bit case we do not insert the register into the opcode
- here, since the position is often unknown until the full instruction
- has been parsed. */
-
-static int
-thumb_reg (strp, hi_lo)
- char ** strp;
- int hi_lo;
+/* Create a frg for an instruction requiring relaxation. */
+static void
+output_relax_insn (void)
{
- int reg;
+ char * to;
+ symbolS *sym;
+ int offset;
- if ((reg = reg_required_here (strp, -1)) == FAIL)
- return FAIL;
+#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 (hi_lo)
+ switch (inst.reloc.exp.X_op)
{
- case THUMB_REG_LO:
- if (reg > 7)
- {
- inst.error = _("lo register required");
- return FAIL;
- }
+ case O_symbol:
+ sym = inst.reloc.exp.X_add_symbol;
+ offset = inst.reloc.exp.X_add_number;
break;
-
- case THUMB_REG_HI:
- if (reg < 8)
- {
- inst.error = _("hi register required");
- return FAIL;
- }
+ case O_constant:
+ sym = NULL;
+ offset = inst.reloc.exp.X_add_number;
break;
-
default:
+ sym = make_expr_symbol (&inst.reloc.exp);
+ offset = 0;
break;
- }
-
- return reg;
+ }
+ to = frag_var (rs_machine_dependent, INSN_SIZE, THUMB_SIZE,
+ inst.relax, sym, offset, NULL/*offset, opcode*/);
+ md_number_to_chars (to, inst.instruction, THUMB_SIZE);
}
-/* Parse an add or subtract instruction, SUBTRACT is non-zero if the opcode
- was SUB. */
-
+/* Write a 32-bit thumb instruction to buf. */
static void
-thumb_add_sub (str, subtract)
- char * str;
- int subtract;
+put_thumb32_insn (char * buf, unsigned long insn)
{
- int Rd, Rs, Rn = FAIL;
+ md_number_to_chars (buf, insn >> 16, THUMB_SIZE);
+ md_number_to_chars (buf + THUMB_SIZE, insn, THUMB_SIZE);
+}
- skip_whitespace (str);
+static void
+output_inst (const char * str)
+{
+ char * to = NULL;
- if ((Rd = thumb_reg (&str, THUMB_REG_ANY)) == FAIL
- || skip_past_comma (&str) == FAIL)
+ if (inst.error)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
+ as_bad ("%s -- `%s'", inst.error, str);
return;
}
+ if (inst.relax) {
+ output_relax_insn();
+ return;
+ }
+ if (inst.size == 0)
+ return;
- if (is_immediate_prefix (*str))
- {
- Rs = Rd;
- str++;
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
- }
- else
- {
- if ((Rs = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
- return;
+ to = frag_more (inst.size);
- if (skip_past_comma (&str) == FAIL)
- {
- /* Two operand format, shuffle the registers
- and pretend there are 3. */
- Rn = Rs;
- Rs = Rd;
- }
- else if (is_immediate_prefix (*str))
- {
- str++;
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
- }
- else if ((Rn = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
- return;
+ if (thumb_mode && (inst.size > THUMB_SIZE))
+ {
+ assert (inst.size == (2 * THUMB_SIZE));
+ put_thumb32_insn (to, inst.instruction);
}
-
- /* We now have Rd and Rs set to registers, and Rn set to a register or FAIL;
- for the latter case, EXPR contains the immediate that was found. */
- if (Rn != FAIL)
+ else if (inst.size > INSN_SIZE)
{
- /* All register format. */
- if (Rd > 7 || Rs > 7 || Rn > 7)
- {
- if (Rs != Rd)
- {
- inst.error = _("dest and source1 must be the same register");
- return;
- }
-
- /* Can't do this for SUB. */
- if (subtract)
- {
- inst.error = _("subtract valid only on lo regs");
- return;
- }
-
- inst.instruction = (T_OPCODE_ADD_HI
- | (Rd > 7 ? THUMB_H1 : 0)
- | (Rn > 7 ? THUMB_H2 : 0));
- inst.instruction |= (Rd & 7) | ((Rn & 7) << 3);
- }
- else
- {
- inst.instruction = subtract ? T_OPCODE_SUB_R3 : T_OPCODE_ADD_R3;
- inst.instruction |= Rd | (Rs << 3) | (Rn << 6);
- }
+ assert (inst.size == (2 * INSN_SIZE));
+ md_number_to_chars (to, inst.instruction, INSN_SIZE);
+ md_number_to_chars (to + INSN_SIZE, inst.instruction, INSN_SIZE);
}
else
- {
- /* Immediate expression, now things start to get nasty. */
-
- /* First deal with HI regs, only very restricted cases allowed:
- Adjusting SP, and using PC or SP to get an address. */
- if ((Rd > 7 && (Rd != REG_SP || Rs != REG_SP))
- || (Rs > 7 && Rs != REG_SP && Rs != REG_PC))
- {
- inst.error = _("invalid Hi register with immediate");
- return;
- }
-
- if (inst.reloc.exp.X_op != O_constant)
- {
- /* Value isn't known yet, all we can do is store all the fragments
- we know about in the instruction and let the reloc hacking
- work it all out. */
- inst.instruction = (subtract ? 0x8000 : 0) | (Rd << 4) | Rs;
- inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD;
- }
- else
- {
- int offset = inst.reloc.exp.X_add_number;
-
- if (subtract)
- offset = - offset;
-
- if (offset < 0)
- {
- offset = - offset;
- subtract = 1;
-
- /* Quick check, in case offset is MIN_INT. */
- if (offset < 0)
- {
- inst.error = _("immediate value out of range");
- return;
- }
- }
- /* Note - you cannot convert a subtract of 0 into an
- add of 0 because the carry flag is set differently. */
- else if (offset > 0)
- subtract = 0;
+ md_number_to_chars (to, inst.instruction, inst.size);
- if (Rd == REG_SP)
- {
- if (offset & ~0x1fc)
- {
- inst.error = _("invalid immediate value for stack adjust");
- return;
- }
- inst.instruction = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST;
- inst.instruction |= offset >> 2;
- }
- else if (Rs == REG_PC || Rs == REG_SP)
- {
- if (subtract
- || (offset & ~0x3fc))
- {
- inst.error = _("invalid immediate for address calculation");
- return;
- }
- inst.instruction = (Rs == REG_PC ? T_OPCODE_ADD_PC
- : T_OPCODE_ADD_SP);
- inst.instruction |= (Rd << 8) | (offset >> 2);
- }
- else if (Rs == Rd)
- {
- if (offset & ~0xff)
- {
- inst.error = _("immediate value out of range");
- return;
- }
- inst.instruction = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8;
- inst.instruction |= (Rd << 8) | offset;
- }
- else
- {
- if (offset & ~0x7)
- {
- inst.error = _("immediate value out of range");
- return;
- }
- inst.instruction = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3;
- inst.instruction |= Rd | (Rs << 3) | (offset << 6);
- }
- }
- }
+ if (inst.reloc.type != BFD_RELOC_UNUSED)
+ fix_new_arm (frag_now, to - frag_now->fr_literal,
+ inst.size, & inst.reloc.exp, inst.reloc.pc_rel,
+ inst.reloc.type);
- end_of_line (str);
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (inst.size);
+#endif
}
-static void
-thumb_shift (str, shift)
- char * str;
- int shift;
-{
- int Rd, Rs, Rn = FAIL;
+/* Tag values used in struct asm_opcode's tag field. */
+enum opcode_tag
+{
+ OT_unconditional, /* Instruction cannot be conditionalized.
+ The ARM condition field is still 0xE. */
+ OT_unconditionalF, /* Instruction cannot be conditionalized
+ and carries 0xF in its ARM condition field. */
+ OT_csuffix, /* Instruction takes a conditional suffix. */
+ OT_cinfix3, /* Instruction takes a conditional infix,
+ beginning at character index 3. (In
+ unified mode, it becomes a suffix.) */
+ 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
+ may be ambiguous. */
+ OT_csuf_or_in3, /* Instruction takes either a conditional
+ suffix or an infix at character index 3. */
+ OT_odd_infix_unc, /* This is the unconditional variant of an
+ instruction that takes a conditional infix
+ at an unusual position. In unified mode,
+ this variant will accept a suffix. */
+ OT_odd_infix_0 /* Values greater than or equal to OT_odd_infix_0
+ are the conditional variants of instructions that
+ take conditional infixes in unusual positions.
+ The infix appears at character index
+ (tag - OT_odd_infix_0). These are not accepted
+ in unified mode. */
+};
- skip_whitespace (str);
+/* Subroutine of md_assemble, responsible for looking up the primary
+ opcode from the mnemonic the user wrote. STR points to the
+ beginning of the mnemonic.
+
+ This is not simply a hash table lookup, because of conditional
+ variants. Most instructions have conditional variants, which are
+ expressed with a _conditional affix_ to the mnemonic. If we were
+ to encode each conditional variant as a literal string in the opcode
+ table, it would have approximately 20,000 entries.
+
+ Most mnemonics take this affix as a suffix, and in unified syntax,
+ 'most' is upgraded to 'all'. However, in the divided syntax, some
+ instructions take the affix as an infix, notably the s-variants of
+ the arithmetic instructions. Of those instructions, all but six
+ have the infix appear after the third character of the mnemonic.
+
+ Accordingly, the algorithm for looking up primary opcodes given
+ an identifier is:
+
+ 1. Look up the identifier in the opcode table.
+ If we find a match, go to step U.
+
+ 2. Look up the last two characters of the identifier in the
+ conditions table. If we find a match, look up the first N-2
+ characters of the identifier in the opcode table. If we
+ find a match, go to step CE.
+
+ 3. Look up the fourth and fifth characters of the identifier in
+ the conditions table. If we find a match, extract those
+ characters from the identifier, and look up the remaining
+ characters in the opcode table. If we find a match, go
+ to step CM.
+
+ 4. Fail.
+
+ U. Examine the tag field of the opcode structure, in case this is
+ one of the six instructions with its conditional infix in an
+ unusual place. If it is, the tag tells us where to find the
+ infix; look it up in the conditions table and set inst.cond
+ accordingly. Otherwise, this is an unconditional instruction.
+ Again set inst.cond accordingly. Return the opcode structure.
+
+ CE. Examine the tag field to make sure this is an instruction that
+ should receive a conditional suffix. If it is not, fail.
+ Otherwise, set inst.cond from the suffix we already looked up,
+ and return the opcode structure.
+
+ CM. Examine the tag field to make sure this is an instruction that
+ should receive a conditional infix after the third character.
+ If it is not, fail. Otherwise, undo the edits to the current
+ line of input and proceed as for case CE. */
+
+static const struct asm_opcode *
+opcode_lookup (char **str)
+{
+ char *end, *base;
+ char *affix;
+ const struct asm_opcode *opcode;
+ const struct asm_cond *cond;
+ char save[2];
+
+ /* Scan up to the end of the mnemonic, which must end in white space,
+ '.' (in unified mode only), or end of string. */
+ for (base = end = *str; *end != '\0'; end++)
+ if (*end == ' ' || (unified_syntax && *end == '.'))
+ break;
- if ((Rd = thumb_reg (&str, THUMB_REG_LO)) == FAIL
- || skip_past_comma (&str) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ if (end == base)
+ return 0;
- if (is_immediate_prefix (*str))
+ /* Handle a possible width suffix. */
+ if (end[0] == '.')
{
- /* Two operand immediate format, set Rs to Rd. */
- Rs = Rd;
- str ++;
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
- }
- else
- {
- if ((Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
- return;
+ if (end[1] == 'w' && (end[2] == ' ' || end[2] == '\0'))
+ inst.size_req = 4;
+ else if (end[1] == 'n' && (end[2] == ' ' || end[2] == '\0'))
+ inst.size_req = 2;
+ else
+ return 0;
- if (skip_past_comma (&str) == FAIL)
- {
- /* Two operand format, shuffle the registers
- and pretend there are 3. */
- Rn = Rs;
- Rs = Rd;
- }
- else if (is_immediate_prefix (*str))
- {
- str++;
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
- }
- else if ((Rn = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
- return;
+ *str = end + 2;
}
+ else
+ *str = end;
- /* We now have Rd and Rs set to registers, and Rn set to a register or FAIL;
- for the latter case, EXPR contains the immediate that was found. */
-
- if (Rn != FAIL)
+ /* Look for unaffixed or special-case affixed mnemonic. */
+ opcode = hash_find_n (arm_ops_hsh, base, end - base);
+ if (opcode)
{
- if (Rs != Rd)
+ /* step U */
+ if (opcode->tag < OT_odd_infix_0)
{
- inst.error = _("source1 and dest must be same register");
- return;
+ inst.cond = COND_ALWAYS;
+ return opcode;
}
- switch (shift)
- {
- case THUMB_ASR: inst.instruction = T_OPCODE_ASR_R; break;
- case THUMB_LSL: inst.instruction = T_OPCODE_LSL_R; break;
- case THUMB_LSR: inst.instruction = T_OPCODE_LSR_R; break;
- }
+ if (unified_syntax)
+ as_warn (_("conditional infixes are deprecated in unified syntax"));
+ affix = base + (opcode->tag - OT_odd_infix_0);
+ cond = hash_find_n (arm_cond_hsh, affix, 2);
+ assert (cond);
- inst.instruction |= Rd | (Rn << 3);
+ inst.cond = cond->value;
+ return opcode;
}
- else
+
+ /* Cannot have a conditional suffix on a mnemonic of less than two
+ characters. */
+ if (end - base < 3)
+ return 0;
+
+ /* Look for suffixed mnemonic. */
+ affix = end - 2;
+ cond = hash_find_n (arm_cond_hsh, affix, 2);
+ opcode = hash_find_n (arm_ops_hsh, base, affix - base);
+ if (opcode && cond)
{
- switch (shift)
+ /* step CE */
+ switch (opcode->tag)
{
- case THUMB_ASR: inst.instruction = T_OPCODE_ASR_I; break;
- case THUMB_LSL: inst.instruction = T_OPCODE_LSL_I; break;
- case THUMB_LSR: inst.instruction = T_OPCODE_LSR_I; break;
- }
+ case OT_cinfix3_legacy:
+ /* Ignore conditional suffixes matched on infix only mnemonics. */
+ break;
- if (inst.reloc.exp.X_op != O_constant)
- {
- /* Value isn't known yet, create a dummy reloc and let reloc
- hacking fix it up. */
- inst.reloc.type = BFD_RELOC_ARM_THUMB_SHIFT;
- }
- else
- {
- unsigned shift_value = inst.reloc.exp.X_add_number;
+ case OT_cinfix3:
+ case OT_odd_infix_unc:
+ if (!unified_syntax)
+ return 0;
+ /* else fall through */
- if (shift_value > 32 || (shift_value == 32 && shift == THUMB_LSL))
+ case OT_csuffix:
+ case OT_csuf_or_in3:
+ inst.cond = cond->value;
+ return opcode;
+
+ case OT_unconditional:
+ case OT_unconditionalF:
+ if (thumb_mode)
{
- inst.error = _("invalid immediate for shift");
- return;
+ inst.cond = cond->value;
}
+ else
+ {
+ /* delayed diagnostic */
+ inst.error = BAD_COND;
+ inst.cond = COND_ALWAYS;
+ }
+ return opcode;
- /* Shifts of zero are handled by converting to LSL. */
- if (shift_value == 0)
- inst.instruction = T_OPCODE_LSL_I;
-
- /* Shifts of 32 are encoded as a shift of zero. */
- if (shift_value == 32)
- shift_value = 0;
-
- inst.instruction |= shift_value << 6;
+ default:
+ return 0;
}
-
- inst.instruction |= Rd | (Rs << 3);
}
- end_of_line (str);
-}
+ /* Cannot have a usual-position infix on a mnemonic of less than
+ six characters (five would be a suffix). */
+ if (end - base < 6)
+ return 0;
-static void
-thumb_mov_compare (str, move)
- char * str;
- int move;
-{
- int Rd, Rs = FAIL;
+ /* Look for infixed mnemonic in the usual position. */
+ affix = base + 3;
+ cond = hash_find_n (arm_cond_hsh, affix, 2);
+ if (!cond)
+ return 0;
- skip_whitespace (str);
+ memcpy (save, affix, 2);
+ memmove (affix, affix + 2, (end - affix) - 2);
+ opcode = hash_find_n (arm_ops_hsh, base, (end - base) - 2);
+ memmove (affix + 2, affix, (end - affix) - 2);
+ memcpy (affix, save, 2);
- if ((Rd = thumb_reg (&str, THUMB_REG_ANY)) == FAIL
- || skip_past_comma (&str) == FAIL)
+ if (opcode && (opcode->tag == OT_cinfix3 || opcode->tag == OT_csuf_or_in3
+ || opcode->tag == OT_cinfix3_legacy))
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
+ /* step CM */
+ if (unified_syntax && opcode->tag == OT_cinfix3)
+ as_warn (_("conditional infixes are deprecated in unified syntax"));
- if (move != THUMB_CPY && is_immediate_prefix (*str))
- {
- str++;
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
+ inst.cond = cond->value;
+ return opcode;
}
- else if ((Rs = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
- return;
- if (Rs != FAIL)
- {
- if (move != THUMB_CPY && Rs < 8 && Rd < 8)
- {
- if (move == THUMB_MOVE)
- /* A move of two lowregs is encoded as ADD Rd, Rs, #0
- since a MOV instruction produces unpredictable results. */
- inst.instruction = T_OPCODE_ADD_I3;
- else
- inst.instruction = T_OPCODE_CMP_LR;
- inst.instruction |= Rd | (Rs << 3);
- }
- else
- {
- if (move == THUMB_MOVE)
- inst.instruction = T_OPCODE_MOV_HR;
- else if (move != THUMB_CPY)
- inst.instruction = T_OPCODE_CMP_HR;
-
- if (Rd > 7)
- inst.instruction |= THUMB_H1;
+ return 0;
+}
- if (Rs > 7)
- inst.instruction |= THUMB_H2;
+void
+md_assemble (char *str)
+{
+ char *p = str;
+ const struct asm_opcode * opcode;
- inst.instruction |= (Rd & 7) | ((Rs & 7) << 3);
- }
- }
- else
+ /* Align the previous label if needed. */
+ if (last_label_seen != NULL)
{
- if (Rd > 7)
- {
- inst.error = _("only lo regs allowed with immediate");
- return;
- }
-
- if (move == THUMB_MOVE)
- inst.instruction = T_OPCODE_MOV_I8;
- else
- inst.instruction = T_OPCODE_CMP_I8;
-
- inst.instruction |= Rd << 8;
-
- if (inst.reloc.exp.X_op != O_constant)
- inst.reloc.type = BFD_RELOC_ARM_THUMB_IMM;
- else
- {
- unsigned value = inst.reloc.exp.X_add_number;
-
- if (value > 255)
- {
- inst.error = _("invalid immediate");
- return;
- }
-
- inst.instruction |= value;
- }
+ symbol_set_frag (last_label_seen, frag_now);
+ S_SET_VALUE (last_label_seen, (valueT) frag_now_fix ());
+ S_SET_SEGMENT (last_label_seen, now_seg);
}
- end_of_line (str);
-}
-
-static void
-thumb_load_store (str, load_store, size)
- char * str;
- int load_store;
- int size;
-{
- int Rd, Rb, Ro = FAIL;
-
- skip_whitespace (str);
+ memset (&inst, '\0', sizeof (inst));
+ inst.reloc.type = BFD_RELOC_UNUSED;
- if ((Rd = thumb_reg (&str, THUMB_REG_LO)) == FAIL
- || skip_past_comma (&str) == FAIL)
+ opcode = opcode_lookup (&p);
+ if (!opcode)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
+ /* It wasn't an instruction, but it might be a register alias of
+ the form alias .req reg. */
+ if (!create_register_alias (str, p))
+ as_bad (_("bad instruction `%s'"), str);
+
return;
}
- if (*str == '[')
+ if (thumb_mode)
{
- str++;
- if ((Rb = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
- return;
+ arm_feature_set variant;
- if (skip_past_comma (&str) != FAIL)
+ variant = cpu_variant;
+ /* Only allow coprocessor instructions on Thumb-2 capable devices. */
+ if (!ARM_CPU_HAS_FEATURE (variant, arm_arch_t2))
+ ARM_CLEAR_FEATURE (variant, variant, fpu_any_hard);
+ /* Check that this instruction is supported for this CPU. */
+ if (!opcode->tvariant
+ || (thumb_mode == 1
+ && !ARM_CPU_HAS_FEATURE (variant, *opcode->tvariant)))
{
- if (is_immediate_prefix (*str))
- {
- str++;
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
- }
- else if ((Ro = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
- return;
+ as_bad (_("selected processor does not support `%s'"), str);
+ return;
}
- else
+ if (inst.cond != COND_ALWAYS && !unified_syntax
+ && opcode->tencode != do_t_branch)
{
- inst.reloc.exp.X_op = O_constant;
- inst.reloc.exp.X_add_number = 0;
+ as_bad (_("Thumb does not support conditional execution"));
+ return;
}
- if (*str != ']')
+ /* Check conditional suffixes. */
+ if (current_it_mask)
{
- inst.error = _("expected ']'");
- return;
+ int cond;
+ cond = current_cc ^ ((current_it_mask >> 4) & 1) ^ 1;
+ current_it_mask <<= 1;
+ current_it_mask &= 0x1f;
+ /* The BKPT instruction is unconditional even in an IT block. */
+ if (!inst.error
+ && cond != inst.cond && opcode->tencode != do_t_bkpt)
+ {
+ as_bad (_("incorrect condition in IT block"));
+ return;
+ }
}
- str++;
- }
- else if (*str == '=')
- {
- if (load_store != THUMB_LOAD)
+ else if (inst.cond != COND_ALWAYS && opcode->tencode != do_t_branch)
{
- inst.error = _("invalid pseudo operation");
+ as_bad (_("thumb conditional instrunction not in IT block"));
return;
}
- /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */
- str++;
-
- skip_whitespace (str);
-
- if (my_get_expression (& inst.reloc.exp, & str))
- return;
-
- end_of_line (str);
-
- if ( inst.reloc.exp.X_op != O_constant
- && inst.reloc.exp.X_op != O_symbol)
- {
- inst.error = "Constant expression expected";
- return;
- }
+ mapping_state (MAP_THUMB);
+ inst.instruction = opcode->tvalue;
- if (inst.reloc.exp.X_op == O_constant
- && ((inst.reloc.exp.X_add_number & ~0xFF) == 0))
- {
- /* This can be done with a mov instruction. */
+ if (!parse_operands (p, opcode->operands))
+ opcode->tencode ();
- inst.instruction = T_OPCODE_MOV_I8 | (Rd << 8);
- inst.instruction |= inst.reloc.exp.X_add_number;
- return;
- }
+ /* Clear current_it_mask at the end of an IT block. */
+ if (current_it_mask == 0x10)
+ current_it_mask = 0;
- /* Insert into literal pool. */
- if (add_to_lit_pool () == FAIL)
+ if (!(inst.error || inst.relax))
{
- if (!inst.error)
- inst.error = "literal pool insertion failed";
- return;
+ assert (inst.instruction < 0xe800 || inst.instruction > 0xffff);
+ inst.size = (inst.instruction > 0xffff ? 4 : 2);
+ if (inst.size_req && inst.size_req != inst.size)
+ {
+ as_bad (_("cannot honor width suffix -- `%s'"), str);
+ return;
+ }
}
-
- inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
- inst.reloc.pc_rel = 1;
- inst.instruction = T_OPCODE_LDR_PC | (Rd << 8);
- /* Adjust ARM pipeline offset to Thumb. */
- inst.reloc.exp.X_add_number += 4;
-
- return;
+ 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.
+ anything other than bl/blx.
+ This is overly pessimistic for relaxable instructions. */
+ if ((inst.size == 4 && (inst.instruction & 0xf800e800) != 0xf000e800)
+ || inst.relax)
+ ARM_MERGE_FEATURE_SETS (thumb_arch_used, thumb_arch_used,
+ arm_ext_v6t2);
}
else
{
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
-
- inst.instruction = T_OPCODE_LDR_PC | (Rd << 8);
- inst.reloc.pc_rel = 1;
- inst.reloc.exp.X_add_number -= 4; /* Pipeline offset. */
- inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
- end_of_line (str);
- return;
- }
-
- if (Rb == REG_PC || Rb == REG_SP)
- {
- if (size != THUMB_WORD)
+ /* Check that this instruction is supported for this CPU. */
+ if (!opcode->avariant ||
+ !ARM_CPU_HAS_FEATURE (cpu_variant, *opcode->avariant))
{
- inst.error = _("byte or halfword not valid for base register");
+ as_bad (_("selected processor does not support `%s'"), str);
return;
}
- else if (Rb == REG_PC && load_store != THUMB_LOAD)
+ if (inst.size_req)
{
- inst.error = _("r15 based store not allowed");
+ as_bad (_("width suffixes are invalid in ARM mode -- `%s'"), str);
return;
}
- else if (Ro != FAIL)
- {
- inst.error = _("invalid base register for register offset");
- return;
- }
-
- if (Rb == REG_PC)
- inst.instruction = T_OPCODE_LDR_PC;
- else if (load_store == THUMB_LOAD)
- inst.instruction = T_OPCODE_LDR_SP;
- else
- inst.instruction = T_OPCODE_STR_SP;
- inst.instruction |= Rd << 8;
- if (inst.reloc.exp.X_op == O_constant)
- {
- unsigned offset = inst.reloc.exp.X_add_number;
-
- if (offset & ~0x3fc)
- {
- inst.error = _("invalid offset");
- return;
- }
-
- inst.instruction |= offset >> 2;
- }
- else
- inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
- }
- else if (Rb > 7)
- {
- inst.error = _("invalid base register in load/store");
- return;
- }
- else if (Ro == FAIL)
- {
- /* Immediate offset. */
- if (size == THUMB_WORD)
- inst.instruction = (load_store == THUMB_LOAD
- ? T_OPCODE_LDR_IW : T_OPCODE_STR_IW);
- else if (size == THUMB_HALFWORD)
- inst.instruction = (load_store == THUMB_LOAD
- ? T_OPCODE_LDR_IH : T_OPCODE_STR_IH);
- else
- inst.instruction = (load_store == THUMB_LOAD
- ? T_OPCODE_LDR_IB : T_OPCODE_STR_IB);
-
- inst.instruction |= Rd | (Rb << 3);
-
- if (inst.reloc.exp.X_op == O_constant)
- {
- unsigned offset = inst.reloc.exp.X_add_number;
-
- if (offset & ~(0x1f << size))
- {
- inst.error = _("invalid offset");
- return;
- }
- inst.instruction |= (offset >> size) << 6;
- }
+ mapping_state (MAP_ARM);
+ inst.instruction = opcode->avalue;
+ if (opcode->tag == OT_unconditionalF)
+ inst.instruction |= 0xF << 28;
else
- inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET;
- }
- else
- {
- /* Register offset. */
- if (size == THUMB_WORD)
- inst.instruction = (load_store == THUMB_LOAD
- ? T_OPCODE_LDR_RW : T_OPCODE_STR_RW);
- else if (size == THUMB_HALFWORD)
- inst.instruction = (load_store == THUMB_LOAD
- ? T_OPCODE_LDR_RH : T_OPCODE_STR_RH);
+ inst.instruction |= inst.cond << 28;
+ inst.size = INSN_SIZE;
+ if (!parse_operands (p, opcode->operands))
+ opcode->aencode ();
+ /* Arm mode bx is marked as both v4T and v5 because it's still required
+ on a hypothetical non-thumb v5 core. */
+ if (ARM_CPU_HAS_FEATURE (*opcode->avariant, arm_ext_v4t)
+ || ARM_CPU_HAS_FEATURE (*opcode->avariant, arm_ext_v5))
+ ARM_MERGE_FEATURE_SETS (arm_arch_used, arm_arch_used, arm_ext_v4t);
else
- inst.instruction = (load_store == THUMB_LOAD
- ? T_OPCODE_LDR_RB : T_OPCODE_STR_RB);
-
- inst.instruction |= Rd | (Rb << 3) | (Ro << 6);
+ ARM_MERGE_FEATURE_SETS (arm_arch_used, arm_arch_used,
+ *opcode->avariant);
}
-
- end_of_line (str);
+ output_inst (str);
}
-/* A register must be given at this point.
+/* Various frobbings of labels and their addresses. */
- Shift is the place to put it in inst.instruction.
-
- Restores input start point on err.
- Returns the reg#, or FAIL. */
-
-static int
-mav_reg_required_here (str, shift, regtype)
- char ** str;
- int shift;
- enum arm_reg_type regtype;
+void
+arm_start_line_hook (void)
{
- int reg;
- char *start = *str;
-
- if ((reg = arm_reg_parse (str, all_reg_maps[regtype].htab)) != FAIL)
- {
- if (shift >= 0)
- inst.instruction |= reg << shift;
-
- return reg;
- }
+ last_label_seen = NULL;
+}
- /* Restore the start point. */
- *str = start;
+void
+arm_frob_label (symbolS * sym)
+{
+ last_label_seen = sym;
- /* In the few cases where we might be able to accept something else
- this error can be overridden. */
- inst.error = _(all_reg_maps[regtype].expected);
+ ARM_SET_THUMB (sym, thumb_mode);
- return FAIL;
-}
+#if defined OBJ_COFF || defined OBJ_ELF
+ ARM_SET_INTERWORK (sym, support_interwork);
+#endif
-/* Cirrus Maverick Instructions. */
+ /* Note - do not allow local symbols (.Lxxx) to be labeled
+ as Thumb functions. This is because these labels, whilst
+ they exist inside Thumb code, are not the entry points for
+ possible ARM->Thumb calls. Also, these labels can be used
+ as part of a computed goto or switch statement. eg gcc
+ can generate code that looks like this:
-/* Wrapper functions. */
+ ldr r2, [pc, .Laaa]
+ lsl r3, r3, #2
+ ldr r2, [r3, r2]
+ mov pc, r2
-static void
-do_mav_binops_1a (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_RN, REG_TYPE_MVF);
-}
+ .Lbbb: .word .Lxxx
+ .Lccc: .word .Lyyy
+ ..etc...
+ .Laaa: .word Lbbb
-static void
-do_mav_binops_1b (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_RN, REG_TYPE_MVD);
-}
+ The first instruction loads the address of the jump table.
+ The second instruction converts a table index into a byte offset.
+ The third instruction gets the jump address out of the table.
+ The fourth instruction performs the jump.
-static void
-do_mav_binops_1c (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_RN, REG_TYPE_MVDX);
-}
+ If the address stored at .Laaa is that of a symbol which has the
+ Thumb_Func bit set, then the linker will arrange for this address
+ to have the bottom bit set, which in turn would mean that the
+ address computation performed by the third instruction would end
+ up with the bottom bit set. Since the ARM is capable of unaligned
+ word loads, the instruction would then load the incorrect address
+ out of the jump table, and chaos would ensue. */
+ if (label_is_thumb_function_name
+ && (S_GET_NAME (sym)[0] != '.' || S_GET_NAME (sym)[1] != 'L')
+ && (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
+ {
+ /* When the address of a Thumb function is taken the bottom
+ bit of that address should be set. This will allow
+ interworking between Arm and Thumb functions to work
+ correctly. */
-static void
-do_mav_binops_1d (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVF, REG_TYPE_MVF);
-}
+ THUMB_SET_FUNC (sym, 1);
-static void
-do_mav_binops_1e (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVD, REG_TYPE_MVD);
-}
+ label_is_thumb_function_name = FALSE;
+ }
-static void
-do_mav_binops_1f (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVD, REG_TYPE_MVF);
+#ifdef OBJ_ELF
+ dwarf2_emit_label (sym);
+#endif
}
-static void
-do_mav_binops_1g (str)
- char * str;
+int
+arm_data_in_code (void)
{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVF, REG_TYPE_MVD);
-}
+ if (thumb_mode && ! strncmp (input_line_pointer + 1, "data:", 5))
+ {
+ *input_line_pointer = '/';
+ input_line_pointer += 5;
+ *input_line_pointer = 0;
+ return 1;
+ }
-static void
-do_mav_binops_1h (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVF, REG_TYPE_MVFX);
+ return 0;
}
-static void
-do_mav_binops_1i (str)
- char * str;
+char *
+arm_canonicalize_symbol_name (char * name)
{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVD, REG_TYPE_MVFX);
-}
+ int len;
-static void
-do_mav_binops_1j (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVF, REG_TYPE_MVDX);
-}
+ if (thumb_mode && (len = strlen (name)) > 5
+ && streq (name + len - 5, "/data"))
+ *(name + len - 5) = 0;
-static void
-do_mav_binops_1k (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVD, REG_TYPE_MVDX);
+ return name;
}
+
+/* Table of all register names defined by default. The user can
+ define additional names with .req. Note that all register names
+ should appear in both upper and lowercase variants. Some registers
+ also have mixed-case names. */
-static void
-do_mav_binops_1l (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVFX, REG_TYPE_MVF);
-}
+#define REGDEF(s,n,t) { #s, n, REG_TYPE_##t, TRUE }
+#define REGNUM(p,n,t) REGDEF(p##n, 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)
-static void
-do_mav_binops_1m (str)
- char * str;
+static const struct reg_entry reg_names[] =
{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVFX, REG_TYPE_MVD);
-}
+ /* ARM integer registers. */
+ REGSET(r, RN), REGSET(R, RN),
-static void
-do_mav_binops_1n (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVFX, REG_TYPE_MVFX);
-}
+ /* ATPCS synonyms. */
+ REGDEF(a1,0,RN), REGDEF(a2,1,RN), REGDEF(a3, 2,RN), REGDEF(a4, 3,RN),
+ REGDEF(v1,4,RN), REGDEF(v2,5,RN), REGDEF(v3, 6,RN), REGDEF(v4, 7,RN),
+ REGDEF(v5,8,RN), REGDEF(v6,9,RN), REGDEF(v7,10,RN), REGDEF(v8,11,RN),
-static void
-do_mav_binops_1o (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE1, REG_TYPE_MVDX, REG_TYPE_MVDX);
-}
+ REGDEF(A1,0,RN), REGDEF(A2,1,RN), REGDEF(A3, 2,RN), REGDEF(A4, 3,RN),
+ REGDEF(V1,4,RN), REGDEF(V2,5,RN), REGDEF(V3, 6,RN), REGDEF(V4, 7,RN),
+ REGDEF(V5,8,RN), REGDEF(V6,9,RN), REGDEF(V7,10,RN), REGDEF(V8,11,RN),
-static void
-do_mav_binops_2a (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE2, REG_TYPE_MVF, REG_TYPE_RN);
-}
+ /* Well-known aliases. */
+ REGDEF(wr, 7,RN), REGDEF(sb, 9,RN), REGDEF(sl,10,RN), REGDEF(fp,11,RN),
+ REGDEF(ip,12,RN), REGDEF(sp,13,RN), REGDEF(lr,14,RN), REGDEF(pc,15,RN),
+
+ REGDEF(WR, 7,RN), REGDEF(SB, 9,RN), REGDEF(SL,10,RN), REGDEF(FP,11,RN),
+ REGDEF(IP,12,RN), REGDEF(SP,13,RN), REGDEF(LR,14,RN), REGDEF(PC,15,RN),
+
+ /* Coprocessor numbers. */
+ REGSET(p, CP), REGSET(P, CP),
+
+ /* Coprocessor register numbers. The "cr" variants are for backward
+ compatibility. */
+ REGSET(c, CN), REGSET(C, CN),
+ REGSET(cr, CN), REGSET(CR, CN),
+
+ /* FPA registers. */
+ REGNUM(f,0,FN), REGNUM(f,1,FN), REGNUM(f,2,FN), REGNUM(f,3,FN),
+ REGNUM(f,4,FN), REGNUM(f,5,FN), REGNUM(f,6,FN), REGNUM(f,7, FN),
+
+ REGNUM(F,0,FN), REGNUM(F,1,FN), REGNUM(F,2,FN), REGNUM(F,3,FN),
+ 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),
+
+ /* VFP DP Registers. */
+ REGSET(d,VFD), REGSET(D,VFS),
+
+ /* 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),
+
+ /* Maverick DSP coprocessor registers. */
+ REGSET(mvf,MVF), REGSET(mvd,MVD), REGSET(mvfx,MVFX), REGSET(mvdx,MVDX),
+ REGSET(MVF,MVF), REGSET(MVD,MVD), REGSET(MVFX,MVFX), REGSET(MVDX,MVDX),
+
+ REGNUM(mvax,0,MVAX), REGNUM(mvax,1,MVAX),
+ REGNUM(mvax,2,MVAX), REGNUM(mvax,3,MVAX),
+ REGDEF(dspsc,0,DSPSC),
+
+ REGNUM(MVAX,0,MVAX), REGNUM(MVAX,1,MVAX),
+ REGNUM(MVAX,2,MVAX), REGNUM(MVAX,3,MVAX),
+ REGDEF(DSPSC,0,DSPSC),
+
+ /* iWMMXt data registers - p0, c0-15. */
+ REGSET(wr,MMXWR), REGSET(wR,MMXWR), REGSET(WR, MMXWR),
+
+ /* iWMMXt control registers - p1, c0-3. */
+ REGDEF(wcid, 0,MMXWC), REGDEF(wCID, 0,MMXWC), REGDEF(WCID, 0,MMXWC),
+ REGDEF(wcon, 1,MMXWC), REGDEF(wCon, 1,MMXWC), REGDEF(WCON, 1,MMXWC),
+ REGDEF(wcssf, 2,MMXWC), REGDEF(wCSSF, 2,MMXWC), REGDEF(WCSSF, 2,MMXWC),
+ REGDEF(wcasf, 3,MMXWC), REGDEF(wCASF, 3,MMXWC), REGDEF(WCASF, 3,MMXWC),
+
+ /* iWMMXt scalar (constant/offset) registers - p1, c8-11. */
+ REGDEF(wcgr0, 8,MMXWCG), REGDEF(wCGR0, 8,MMXWCG), REGDEF(WCGR0, 8,MMXWCG),
+ REGDEF(wcgr1, 9,MMXWCG), REGDEF(wCGR1, 9,MMXWCG), REGDEF(WCGR1, 9,MMXWCG),
+ REGDEF(wcgr2,10,MMXWCG), REGDEF(wCGR2,10,MMXWCG), REGDEF(WCGR2,10,MMXWCG),
+ REGDEF(wcgr3,11,MMXWCG), REGDEF(wCGR3,11,MMXWCG), REGDEF(WCGR3,11,MMXWCG),
+
+ /* XScale accumulator registers. */
+ REGNUM(acc,0,XSCALE), REGNUM(ACC,0,XSCALE),
+};
+#undef REGDEF
+#undef REGNUM
+#undef REGSET
-static void
-do_mav_binops_2b (str)
- char * str;
+/* Table of all PSR suffixes. Bare "CPSR" and "SPSR" are handled
+ within psr_required_here. */
+static const struct asm_psr psrs[] =
{
- do_mav_binops (str, MAV_MODE2, REG_TYPE_MVD, REG_TYPE_RN);
-}
+ /* Backward compatibility notation. Note that "all" is no longer
+ truly all possible PSR bits. */
+ {"all", PSR_c | PSR_f},
+ {"flg", PSR_f},
+ {"ctl", PSR_c},
+
+ /* Individual flags. */
+ {"f", PSR_f},
+ {"c", PSR_c},
+ {"x", PSR_x},
+ {"s", PSR_s},
+ /* Combinations of flags. */
+ {"fs", PSR_f | PSR_s},
+ {"fx", PSR_f | PSR_x},
+ {"fc", PSR_f | PSR_c},
+ {"sf", PSR_s | PSR_f},
+ {"sx", PSR_s | PSR_x},
+ {"sc", PSR_s | PSR_c},
+ {"xf", PSR_x | PSR_f},
+ {"xs", PSR_x | PSR_s},
+ {"xc", PSR_x | PSR_c},
+ {"cf", PSR_c | PSR_f},
+ {"cs", PSR_c | PSR_s},
+ {"cx", PSR_c | PSR_x},
+ {"fsx", PSR_f | PSR_s | PSR_x},
+ {"fsc", PSR_f | PSR_s | PSR_c},
+ {"fxs", PSR_f | PSR_x | PSR_s},
+ {"fxc", PSR_f | PSR_x | PSR_c},
+ {"fcs", PSR_f | PSR_c | PSR_s},
+ {"fcx", PSR_f | PSR_c | PSR_x},
+ {"sfx", PSR_s | PSR_f | PSR_x},
+ {"sfc", PSR_s | PSR_f | PSR_c},
+ {"sxf", PSR_s | PSR_x | PSR_f},
+ {"sxc", PSR_s | PSR_x | PSR_c},
+ {"scf", PSR_s | PSR_c | PSR_f},
+ {"scx", PSR_s | PSR_c | PSR_x},
+ {"xfs", PSR_x | PSR_f | PSR_s},
+ {"xfc", PSR_x | PSR_f | PSR_c},
+ {"xsf", PSR_x | PSR_s | PSR_f},
+ {"xsc", PSR_x | PSR_s | PSR_c},
+ {"xcf", PSR_x | PSR_c | PSR_f},
+ {"xcs", PSR_x | PSR_c | PSR_s},
+ {"cfs", PSR_c | PSR_f | PSR_s},
+ {"cfx", PSR_c | PSR_f | PSR_x},
+ {"csf", PSR_c | PSR_s | PSR_f},
+ {"csx", PSR_c | PSR_s | PSR_x},
+ {"cxf", PSR_c | PSR_x | PSR_f},
+ {"cxs", PSR_c | PSR_x | PSR_s},
+ {"fsxc", PSR_f | PSR_s | PSR_x | PSR_c},
+ {"fscx", PSR_f | PSR_s | PSR_c | PSR_x},
+ {"fxsc", PSR_f | PSR_x | PSR_s | PSR_c},
+ {"fxcs", PSR_f | PSR_x | PSR_c | PSR_s},
+ {"fcsx", PSR_f | PSR_c | PSR_s | PSR_x},
+ {"fcxs", PSR_f | PSR_c | PSR_x | PSR_s},
+ {"sfxc", PSR_s | PSR_f | PSR_x | PSR_c},
+ {"sfcx", PSR_s | PSR_f | PSR_c | PSR_x},
+ {"sxfc", PSR_s | PSR_x | PSR_f | PSR_c},
+ {"sxcf", PSR_s | PSR_x | PSR_c | PSR_f},
+ {"scfx", PSR_s | PSR_c | PSR_f | PSR_x},
+ {"scxf", PSR_s | PSR_c | PSR_x | PSR_f},
+ {"xfsc", PSR_x | PSR_f | PSR_s | PSR_c},
+ {"xfcs", PSR_x | PSR_f | PSR_c | PSR_s},
+ {"xsfc", PSR_x | PSR_s | PSR_f | PSR_c},
+ {"xscf", PSR_x | PSR_s | PSR_c | PSR_f},
+ {"xcfs", PSR_x | PSR_c | PSR_f | PSR_s},
+ {"xcsf", PSR_x | PSR_c | PSR_s | PSR_f},
+ {"cfsx", PSR_c | PSR_f | PSR_s | PSR_x},
+ {"cfxs", PSR_c | PSR_f | PSR_x | PSR_s},
+ {"csfx", PSR_c | PSR_s | PSR_f | PSR_x},
+ {"csxf", PSR_c | PSR_s | PSR_x | PSR_f},
+ {"cxfs", PSR_c | PSR_x | PSR_f | PSR_s},
+ {"cxsf", PSR_c | PSR_x | PSR_s | PSR_f},
+};
-static void
-do_mav_binops_2c (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE2, REG_TYPE_MVDX, REG_TYPE_RN);
-}
+/* 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}
+};
-static void
-do_mav_binops_3a (str)
- char * str;
+/* Table of all shift-in-operand names. */
+static const struct asm_shift_name shift_names [] =
{
- do_mav_binops (str, MAV_MODE3, REG_TYPE_MVAX, REG_TYPE_MVFX);
-}
+ { "asl", SHIFT_LSL }, { "ASL", SHIFT_LSL },
+ { "lsl", SHIFT_LSL }, { "LSL", SHIFT_LSL },
+ { "lsr", SHIFT_LSR }, { "LSR", SHIFT_LSR },
+ { "asr", SHIFT_ASR }, { "ASR", SHIFT_ASR },
+ { "ror", SHIFT_ROR }, { "ROR", SHIFT_ROR },
+ { "rrx", SHIFT_RRX }, { "RRX", SHIFT_RRX }
+};
-static void
-do_mav_binops_3b (str)
- char * str;
-{
- do_mav_binops (str, MAV_MODE3, REG_TYPE_MVFX, REG_TYPE_MVAX);
-}
+/* Table of all explicit relocation names. */
+#ifdef OBJ_ELF
+static struct reloc_entry reloc_names[] =
+{
+ { "got", BFD_RELOC_ARM_GOT32 }, { "GOT", BFD_RELOC_ARM_GOT32 },
+ { "gotoff", BFD_RELOC_ARM_GOTOFF }, { "GOTOFF", BFD_RELOC_ARM_GOTOFF },
+ { "plt", BFD_RELOC_ARM_PLT32 }, { "PLT", BFD_RELOC_ARM_PLT32 },
+ { "target1", BFD_RELOC_ARM_TARGET1 }, { "TARGET1", BFD_RELOC_ARM_TARGET1 },
+ { "target2", BFD_RELOC_ARM_TARGET2 }, { "TARGET2", BFD_RELOC_ARM_TARGET2 },
+ { "sbrel", BFD_RELOC_ARM_SBREL32 }, { "SBREL", BFD_RELOC_ARM_SBREL32 },
+ { "tlsgd", BFD_RELOC_ARM_TLS_GD32}, { "TLSGD", BFD_RELOC_ARM_TLS_GD32},
+ { "tlsldm", BFD_RELOC_ARM_TLS_LDM32}, { "TLSLDM", BFD_RELOC_ARM_TLS_LDM32},
+ { "tlsldo", BFD_RELOC_ARM_TLS_LDO32}, { "TLSLDO", BFD_RELOC_ARM_TLS_LDO32},
+ { "gottpoff",BFD_RELOC_ARM_TLS_IE32}, { "GOTTPOFF",BFD_RELOC_ARM_TLS_IE32},
+ { "tpoff", BFD_RELOC_ARM_TLS_LE32}, { "TPOFF", BFD_RELOC_ARM_TLS_LE32}
+};
+#endif
-static void
-do_mav_binops_3c (str)
- char * str;
+/* Table of all conditional affixes. 0xF is not defined as a condition code. */
+static const struct asm_cond conds[] =
{
- do_mav_binops (str, MAV_MODE3, REG_TYPE_MVAX, REG_TYPE_MVDX);
-}
+ {"eq", 0x0},
+ {"ne", 0x1},
+ {"cs", 0x2}, {"hs", 0x2},
+ {"cc", 0x3}, {"ul", 0x3}, {"lo", 0x3},
+ {"mi", 0x4},
+ {"pl", 0x5},
+ {"vs", 0x6},
+ {"vc", 0x7},
+ {"hi", 0x8},
+ {"ls", 0x9},
+ {"ge", 0xa},
+ {"lt", 0xb},
+ {"gt", 0xc},
+ {"le", 0xd},
+ {"al", 0xe}
+};
-static void
-do_mav_binops_3d (str)
- char * str;
+static struct asm_barrier_opt barrier_opt_names[] =
{
- do_mav_binops (str, MAV_MODE3, REG_TYPE_MVDX, REG_TYPE_MVAX);
-}
+ { "sy", 0xf },
+ { "un", 0x7 },
+ { "st", 0xe },
+ { "unst", 0x6 }
+};
-static void
-do_mav_triple_4a (str)
- char * str;
-{
- do_mav_triple (str, MAV_MODE4, REG_TYPE_MVFX, REG_TYPE_MVFX, REG_TYPE_RN);
-}
+/* Table of ARM-format instructions. */
+
+/* Macros for gluing together operand strings. N.B. In all cases
+ other than OPS0, the trailing OP_stop comes from default
+ zero-initialization of the unspecified elements of the array. */
+#define OPS0() { OP_stop, }
+#define OPS1(a) { OP_##a, }
+#define OPS2(a,b) { OP_##a,OP_##b, }
+#define OPS3(a,b,c) { OP_##a,OP_##b,OP_##c, }
+#define OPS4(a,b,c,d) { OP_##a,OP_##b,OP_##c,OP_##d, }
+#define OPS5(a,b,c,d,e) { OP_##a,OP_##b,OP_##c,OP_##d,OP_##e, }
+#define OPS6(a,b,c,d,e,f) { OP_##a,OP_##b,OP_##c,OP_##d,OP_##e,OP_##f, }
+
+/* These macros abstract out the exact format of the mnemonic table and
+ save some repeated characters. */
+
+/* The normal sort of mnemonic; has a Thumb variant; takes a conditional suffix. */
+#define TxCE(mnem, op, top, nops, ops, ae, te) \
+ { #mnem, OPS##nops ops, OT_csuffix, 0x##op, top, ARM_VARIANT, \
+ THUMB_VARIANT, do_##ae, do_##te }
+
+/* Two variants of the above - TCE for a numeric Thumb opcode, tCE for
+ a T_MNEM_xyz enumerator. */
+#define TCE(mnem, aop, top, nops, ops, ae, te) \
+ TxCE(mnem, aop, 0x##top, nops, ops, ae, te)
+#define tCE(mnem, aop, top, nops, ops, ae, te) \
+ TxCE(mnem, aop, T_MNEM_##top, nops, ops, ae, te)
+
+/* Second most common sort of mnemonic: has a Thumb variant, takes a conditional
+ infix after the third character. */
+#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 TC3(mnem, aop, top, nops, ops, ae, te) \
+ TxC3(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)
+
+/* Mnemonic with a conditional infix in an unusual place. Each and every variant has to
+ appear in the condition table. */
+#define TxCM_(m1, m2, m3, op, top, nops, ops, ae, te) \
+ { #m1 #m2 #m3, OPS##nops ops, sizeof(#m2) == 1 ? OT_odd_infix_unc : OT_odd_infix_0 + sizeof(#m1) - 1, \
+ 0x##op, top, ARM_VARIANT, THUMB_VARIANT, do_##ae, do_##te }
+
+#define TxCM(m1, m2, op, top, nops, ops, ae, te) \
+ TxCM_(m1, , m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, eq, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, ne, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, cs, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, hs, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, cc, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, ul, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, lo, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, mi, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, pl, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, vs, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, vc, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, hi, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, ls, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, ge, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, lt, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, gt, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, le, m2, op, top, nops, ops, ae, te), \
+ TxCM_(m1, al, m2, op, top, nops, ops, ae, te)
+
+#define TCM(m1,m2, aop, top, nops, ops, ae, te) \
+ TxCM(m1,m2, aop, 0x##top, nops, ops, ae, te)
+#define tCM(m1,m2, aop, top, nops, ops, ae, te) \
+ TxCM(m1,m2, aop, T_MNEM_##top, nops, ops, ae, te)
+
+/* Mnemonic that cannot be conditionalized. The ARM condition-code
+ field is still 0xE. Many of the Thumb variants can be executed
+ conditionally, so this is checked separately. */
+#define TUE(mnem, op, top, nops, ops, ae, te) \
+ { #mnem, OPS##nops ops, OT_unconditional, 0x##op, 0x##top, ARM_VARIANT, \
+ THUMB_VARIANT, do_##ae, do_##te }
+
+/* Mnemonic that cannot be conditionalized, and bears 0xF in its ARM
+ condition code field. */
+#define TUF(mnem, op, top, nops, ops, ae, te) \
+ { #mnem, OPS##nops ops, OT_unconditionalF, 0x##op, 0x##top, ARM_VARIANT, \
+ THUMB_VARIANT, do_##ae, do_##te }
+
+/* ARM-only variants of all the above. */
+#define CE(mnem, op, nops, ops, ae) \
+ { #mnem, OPS##nops ops, OT_csuffix, 0x##op, 0x0, ARM_VARIANT, 0, do_##ae, NULL }
+
+#define C3(mnem, op, nops, ops, ae) \
+ { #mnem, OPS##nops ops, OT_cinfix3, 0x##op, 0x0, ARM_VARIANT, 0, do_##ae, NULL }
+
+/* Legacy mnemonics that always have conditional infix after the third
+ character. */
+#define CL(mnem, op, nops, ops, ae) \
+ { #mnem, OPS##nops ops, OT_cinfix3_legacy, \
+ 0x##op, 0x0, ARM_VARIANT, 0, do_##ae, NULL }
+
+/* Coprocessor instructions. Isomorphic between Arm and Thumb-2. */
+#define cCE(mnem, op, nops, ops, ae) \
+ { #mnem, OPS##nops ops, OT_csuffix, 0x##op, 0xe##op, ARM_VARIANT, ARM_VARIANT, do_##ae, do_##ae }
+
+/* Legacy coprocessor instructions where conditional infix and conditional
+ suffix are ambiguous. For consistency this includes all FPA instructions,
+ not just the potentially ambiguous ones. */
+#define cCL(mnem, op, nops, ops, ae) \
+ { #mnem, OPS##nops ops, OT_cinfix3_legacy, \
+ 0x##op, 0xe##op, ARM_VARIANT, ARM_VARIANT, do_##ae, do_##ae }
+
+/* Coprocessor, takes either a suffix or a position-3 infix
+ (for an FPA corner case). */
+#define C3E(mnem, op, nops, ops, ae) \
+ { #mnem, OPS##nops ops, OT_csuf_or_in3, \
+ 0x##op, 0xe##op, ARM_VARIANT, ARM_VARIANT, do_##ae, do_##ae }
+
+#define xCM_(m1, m2, m3, op, nops, ops, ae) \
+ { #m1 #m2 #m3, OPS##nops ops, \
+ sizeof(#m2) == 1 ? OT_odd_infix_unc : OT_odd_infix_0 + sizeof(#m1) - 1, \
+ 0x##op, 0x0, ARM_VARIANT, 0, do_##ae, NULL }
+
+#define CM(m1, m2, op, nops, ops, ae) \
+ xCM_(m1, , m2, op, nops, ops, ae), \
+ xCM_(m1, eq, m2, op, nops, ops, ae), \
+ xCM_(m1, ne, m2, op, nops, ops, ae), \
+ xCM_(m1, cs, m2, op, nops, ops, ae), \
+ xCM_(m1, hs, m2, op, nops, ops, ae), \
+ xCM_(m1, cc, m2, op, nops, ops, ae), \
+ xCM_(m1, ul, m2, op, nops, ops, ae), \
+ xCM_(m1, lo, m2, op, nops, ops, ae), \
+ xCM_(m1, mi, m2, op, nops, ops, ae), \
+ xCM_(m1, pl, m2, op, nops, ops, ae), \
+ xCM_(m1, vs, m2, op, nops, ops, ae), \
+ xCM_(m1, vc, m2, op, nops, ops, ae), \
+ xCM_(m1, hi, m2, op, nops, ops, ae), \
+ xCM_(m1, ls, m2, op, nops, ops, ae), \
+ xCM_(m1, ge, m2, op, nops, ops, ae), \
+ xCM_(m1, lt, m2, op, nops, ops, ae), \
+ xCM_(m1, gt, m2, op, nops, ops, ae), \
+ xCM_(m1, le, m2, op, nops, ops, ae), \
+ xCM_(m1, al, m2, op, nops, ops, ae)
+
+#define UE(mnem, op, nops, ops, ae) \
+ { #mnem, OPS##nops ops, OT_unconditional, 0x##op, 0, ARM_VARIANT, 0, do_##ae, NULL }
+
+#define UF(mnem, op, nops, ops, ae) \
+ { #mnem, OPS##nops ops, OT_unconditionalF, 0x##op, 0, ARM_VARIANT, 0, do_##ae, NULL }
+
+#define do_0 0
+
+/* Thumb-only, unconditional. */
+#define UT(mnem, op, nops, ops, te) TUE(mnem, 0, op, nops, ops, 0, te)
-static void
-do_mav_triple_4b (str)
- char * str;
+static const struct asm_opcode insns[] =
{
- do_mav_triple (str, MAV_MODE4, REG_TYPE_MVDX, REG_TYPE_MVDX, REG_TYPE_RN);
-}
+#define ARM_VARIANT &arm_ext_v1 /* Core ARM Instructions. */
+#define THUMB_VARIANT &arm_ext_v4t
+ tCE(and, 0000000, and, 3, (RR, oRR, SH), arit, t_arit3c),
+ tC3(ands, 0100000, ands, 3, (RR, oRR, SH), arit, t_arit3c),
+ tCE(eor, 0200000, eor, 3, (RR, oRR, SH), arit, t_arit3c),
+ 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(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),
+ tC3(sbcs, 0d00000, sbcs, 3, (RR, oRR, SH), arit, t_arit3),
+ tCE(orr, 1800000, orr, 3, (RR, oRR, SH), arit, t_arit3c),
+ tC3(orrs, 1900000, orrs, 3, (RR, oRR, SH), arit, t_arit3c),
+ tCE(bic, 1c00000, bic, 3, (RR, oRR, SH), arit, t_arit3),
+ tC3(bics, 1d00000, bics, 3, (RR, oRR, SH), arit, t_arit3),
+
+ /* The p-variants of tst/cmp/cmn/teq (below) are the pre-V6 mechanism
+ 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),
+ 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),
+ 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),
+ CL(cmnp, 170f000, 2, (RR, SH), cmp),
+
+ tCE(mov, 1a00000, mov, 2, (RR, SH), mov, t_mov_cmp),
+ tC3(movs, 1b00000, movs, 2, (RR, SH), mov, t_mov_cmp),
+ 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(stm, 8800000, stmia, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+ tC3(stmia, 8800000, stmia, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+ tC3(stmea, 8800000, stmia, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+ tCE(ldm, 8900000, ldmia, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+ tC3(ldmia, 8900000, ldmia, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+ tC3(ldmfd, 8900000, ldmia, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+
+ TCE(swi, f000000, df00, 1, (EXPi), swi, t_swi),
+ TCE(svc, f000000, df00, 1, (EXPi), swi, t_swi),
+ tCE(b, a000000, b, 1, (EXPr), branch, t_branch),
+ TCE(bl, b000000, f000f800, 1, (EXPr), bl, t_branch23),
-static void
-do_mav_triple_5a (str)
- char * str;
-{
- do_mav_triple (str, MAV_MODE5, REG_TYPE_RN, REG_TYPE_MVF, REG_TYPE_MVF);
-}
+ /* Pseudo ops. */
+ tCE(adr, 28f0000, adr, 2, (RR, EXP), adr, t_adr),
+ C3(adrl, 28f0000, 2, (RR, EXP), adrl),
+ tCE(nop, 1a00000, nop, 1, (oI255c), nop, t_nop),
+
+ /* Thumb-compatibility pseudo ops. */
+ tCE(lsl, 1a00000, lsl, 3, (RR, oRR, SH), shift, t_shift),
+ tC3(lsls, 1b00000, lsls, 3, (RR, oRR, SH), shift, t_shift),
+ tCE(lsr, 1a00020, lsr, 3, (RR, oRR, SH), shift, t_shift),
+ tC3(lsrs, 1b00020, lsrs, 3, (RR, oRR, SH), shift, t_shift),
+ tCE(asr, 1a00040, asr, 3, (RR, oRR, SH), shift, t_shift),
+ tC3(asrs, 1b00040, asrs, 3, (RR, oRR, SH), shift, t_shift),
+ tCE(ror, 1a00060, ror, 3, (RR, oRR, SH), shift, t_shift),
+ tC3(rors, 1b00060, rors, 3, (RR, oRR, SH), shift, t_shift),
+ tCE(neg, 2600000, neg, 2, (RR, RR), rd_rn, t_neg),
+ tC3(negs, 2700000, negs, 2, (RR, RR), rd_rn, t_neg),
+ tCE(push, 92d0000, push, 1, (REGLST), push_pop, t_push_pop),
+ tCE(pop, 8bd0000, pop, 1, (REGLST), push_pop, t_push_pop),
+
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v6
+ TCE(cpy, 1a00000, 4600, 2, (RR, RR), rd_rm, t_cpy),
+
+ /* 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),
+ CL(teqp, 130f000, 2, (RR, SH), cmp),
+
+ TC3(ldrt, 4300000, f8500e00, 2, (RR, ADDR), ldstt, t_ldstt),
+ TC3(ldrbt, 4700000, f8100e00, 2, (RR, ADDR), ldstt, t_ldstt),
+ TC3(strt, 4200000, f8400e00, 2, (RR, ADDR), ldstt, t_ldstt),
+ TC3(strbt, 4600000, f8000e00, 2, (RR, ADDR), ldstt, t_ldstt),
+
+ TC3(stmdb, 9000000, e9000000, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+ TC3(stmfd, 9000000, e9000000, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+
+ TC3(ldmdb, 9100000, e9100000, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+ TC3(ldmea, 9100000, e9100000, 2, (RRw, REGLST), ldmstm, t_ldmstm),
+
+ /* V1 instructions with no Thumb analogue at all. */
+ CE(rsc, 0e00000, 3, (RR, oRR, SH), arit),
+ C3(rscs, 0f00000, 3, (RR, oRR, SH), arit),
+
+ C3(stmib, 9800000, 2, (RRw, REGLST), ldmstm),
+ C3(stmfa, 9800000, 2, (RRw, REGLST), ldmstm),
+ C3(stmda, 8000000, 2, (RRw, REGLST), ldmstm),
+ C3(stmed, 8000000, 2, (RRw, REGLST), ldmstm),
+ C3(ldmib, 9900000, 2, (RRw, REGLST), ldmstm),
+ C3(ldmed, 9900000, 2, (RRw, REGLST), ldmstm),
+ C3(ldmda, 8100000, 2, (RRw, REGLST), ldmstm),
+ C3(ldmfa, 8100000, 2, (RRw, REGLST), ldmstm),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v2 /* ARM 2 - multiplies. */
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v4t
+ tCE(mul, 0000090, mul, 3, (RRnpc, RRnpc, oRR), mul, t_mul),
+ tC3(muls, 0100090, muls, 3, (RRnpc, RRnpc, oRR), mul, t_mul),
+
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v6t2
+ TCE(mla, 0200090, fb000000, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mlas, t_mla),
+ C3(mlas, 0300090, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mlas),
+
+ /* 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(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),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v2s /* ARM 3 - swp instructions. */
+ CE(swp, 1000090, 3, (RRnpc, RRnpc, RRnpcb), rd_rm_rn),
+ C3(swpb, 1400090, 3, (RRnpc, RRnpc, RRnpcb), rd_rm_rn),
+
+#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),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v3m /* ARM 7M long multiplies. */
+ TCE(smull, 0c00090, fb800000, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mull, t_mull),
+ CM(smull,s, 0d00090, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mull),
+ TCE(umull, 0800090, fba00000, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mull, t_mull),
+ CM(umull,s, 0900090, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mull),
+ TCE(smlal, 0e00090, fbc00000, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mull, t_mull),
+ CM(smlal,s, 0f00090, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mull),
+ TCE(umlal, 0a00090, fbe00000, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mull, t_mull),
+ CM(umlal,s, 0b00090, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mull),
+
+#undef ARM_VARIANT
+#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),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v4t_5
+ /* ARM Architecture 4T. */
+ /* Note: bx (and blx) are required on V5, even if the processor does
+ not support Thumb. */
+ TCE(bx, 12fff10, 4700, 1, (RR), bx, t_bx),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v5 /* ARM Architecture 5T. */
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v5t
+ /* Note: blx has 2 variants; the .value coded here is for
+ BLX(2). Only this variant has conditional execution. */
+ TCE(blx, 12fff30, 4780, 1, (RR_EXr), blx, t_blx),
+ TUE(bkpt, 1200070, be00, 1, (oIffffb), bkpt, t_bkpt),
+
+#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(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),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v5exp /* ARM Architecture 5TExP. */
+ TCE(smlabb, 1000080, fb100000, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smla, t_mla),
+ TCE(smlatb, 10000a0, fb100020, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smla, t_mla),
+ TCE(smlabt, 10000c0, fb100010, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smla, t_mla),
+ TCE(smlatt, 10000e0, fb100030, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smla, t_mla),
+
+ TCE(smlawb, 1200080, fb300000, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smla, t_mla),
+ TCE(smlawt, 12000c0, fb300010, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smla, t_mla),
+
+ TCE(smlalbb, 1400080, fbc00080, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smlal, t_mlal),
+ TCE(smlaltb, 14000a0, fbc000a0, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smlal, t_mlal),
+ TCE(smlalbt, 14000c0, fbc00090, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smlal, t_mlal),
+ TCE(smlaltt, 14000e0, fbc000b0, 4, (RRnpc, RRnpc, RRnpc, RRnpc), smlal, t_mlal),
+
+ TCE(smulbb, 1600080, fb10f000, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
+ TCE(smultb, 16000a0, fb10f020, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
+ TCE(smulbt, 16000c0, fb10f010, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
+ TCE(smultt, 16000e0, fb10f030, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
+
+ TCE(smulwb, 12000a0, fb30f000, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
+ TCE(smulwt, 12000e0, fb30f010, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
+
+ TCE(qadd, 1000050, fa80f080, 3, (RRnpc, RRnpc, RRnpc), rd_rm_rn, rd_rm_rn),
+ TCE(qdadd, 1400050, fa80f090, 3, (RRnpc, RRnpc, RRnpc), rd_rm_rn, rd_rm_rn),
+ TCE(qsub, 1200050, fa80f0a0, 3, (RRnpc, RRnpc, RRnpc), rd_rm_rn, rd_rm_rn),
+ TCE(qdsub, 1600050, fa80f0b0, 3, (RRnpc, RRnpc, RRnpc), rd_rm_rn, rd_rm_rn),
+
+#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),
+
+ 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),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v5j /* ARM Architecture 5TEJ. */
+ TCE(bxj, 12fff20, f3c08f00, 1, (RR), bxj, t_bxj),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v6 /* ARM V6. */
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v6
+ TUF(cpsie, 1080000, b660, 2, (CPSF, oI31b), cpsi, t_cpsi),
+ TUF(cpsid, 10c0000, b670, 2, (CPSF, oI31b), cpsi, t_cpsi),
+ tCE(rev, 6bf0f30, rev, 2, (RRnpc, RRnpc), rd_rm, t_rev),
+ tCE(rev16, 6bf0fb0, rev16, 2, (RRnpc, RRnpc), rd_rm, t_rev),
+ tCE(revsh, 6ff0fb0, revsh, 2, (RRnpc, RRnpc), rd_rm, t_rev),
+ tCE(sxth, 6bf0070, sxth, 3, (RRnpc, RRnpc, oROR), sxth, t_sxth),
+ tCE(uxth, 6ff0070, uxth, 3, (RRnpc, RRnpc, oROR), sxth, t_sxth),
+ tCE(sxtb, 6af0070, sxtb, 3, (RRnpc, RRnpc, oROR), sxth, t_sxth),
+ tCE(uxtb, 6ef0070, uxtb, 3, (RRnpc, RRnpc, oROR), sxth, t_sxth),
+ TUF(setend, 1010000, b650, 1, (ENDI), setend, t_setend),
+
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v6t2
+ TCE(ldrex, 1900f9f, e8500f00, 2, (RRnpc, ADDR), ldrex, t_ldrex),
+ 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),
+
+ TCE(ssat, 6a00010, f3000000, 4, (RRnpc, I32, RRnpc, oSHllar),ssat, t_ssat),
+ TCE(usat, 6e00010, f3800000, 4, (RRnpc, I31, RRnpc, oSHllar),usat, t_usat),
+
+/* ARM V6 not included in V7M (eg. integer SIMD). */
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v6_notm
+ TUF(cps, 1020000, f3af8100, 1, (I31b), imm0, t_cps),
+ TCE(pkhbt, 6800010, eac00000, 4, (RRnpc, RRnpc, RRnpc, oSHll), pkhbt, t_pkhbt),
+ TCE(pkhtb, 6800050, eac00020, 4, (RRnpc, RRnpc, RRnpc, oSHar), pkhtb, t_pkhtb),
+ TCE(qadd16, 6200f10, fa90f010, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(qadd8, 6200f90, fa80f010, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(qaddsubx, 6200f30, faa0f010, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(qsub16, 6200f70, fad0f010, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(qsub8, 6200ff0, fac0f010, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(qsubaddx, 6200f50, fae0f010, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(sadd16, 6100f10, fa90f000, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(sadd8, 6100f90, fa80f000, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(saddsubx, 6100f30, faa0f000, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(shadd16, 6300f10, fa90f020, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(shadd8, 6300f90, fa80f020, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(shaddsubx, 6300f30, faa0f020, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(shsub16, 6300f70, fad0f020, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(shsub8, 6300ff0, fac0f020, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(shsubaddx, 6300f50, fae0f020, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(ssub16, 6100f70, fad0f000, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(ssub8, 6100ff0, fac0f000, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(ssubaddx, 6100f50, fae0f000, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uadd16, 6500f10, fa90f040, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uadd8, 6500f90, fa80f040, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uaddsubx, 6500f30, faa0f040, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uhadd16, 6700f10, fa90f060, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uhadd8, 6700f90, fa80f060, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uhaddsubx, 6700f30, faa0f060, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uhsub16, 6700f70, fad0f060, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uhsub8, 6700ff0, fac0f060, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uhsubaddx, 6700f50, fae0f060, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uqadd16, 6600f10, fa90f050, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uqadd8, 6600f90, fa80f050, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uqaddsubx, 6600f30, faa0f050, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uqsub16, 6600f70, fad0f050, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uqsub8, 6600ff0, fac0f050, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(uqsubaddx, 6600f50, fae0f050, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(usub16, 6500f70, fad0f040, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(usub8, 6500ff0, fac0f040, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(usubaddx, 6500f50, fae0f040, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TUF(rfeia, 8900a00, e990c000, 1, (RRw), rfe, rfe),
+ UF(rfeib, 9900a00, 1, (RRw), rfe),
+ UF(rfeda, 8100a00, 1, (RRw), rfe),
+ TUF(rfedb, 9100a00, e810c000, 1, (RRw), rfe, rfe),
+ TUF(rfefd, 8900a00, e990c000, 1, (RRw), rfe, rfe),
+ UF(rfefa, 9900a00, 1, (RRw), rfe),
+ UF(rfeea, 8100a00, 1, (RRw), rfe),
+ TUF(rfeed, 9100a00, e810c000, 1, (RRw), rfe, rfe),
+ TCE(sxtah, 6b00070, fa00f080, 4, (RRnpc, RRnpc, RRnpc, oROR), sxtah, t_sxtah),
+ TCE(sxtab16, 6800070, fa20f080, 4, (RRnpc, RRnpc, RRnpc, oROR), sxtah, t_sxtah),
+ TCE(sxtab, 6a00070, fa40f080, 4, (RRnpc, RRnpc, RRnpc, oROR), sxtah, t_sxtah),
+ TCE(sxtb16, 68f0070, fa2ff080, 3, (RRnpc, RRnpc, oROR), sxth, t_sxth),
+ TCE(uxtah, 6f00070, fa10f080, 4, (RRnpc, RRnpc, RRnpc, oROR), sxtah, t_sxtah),
+ TCE(uxtab16, 6c00070, fa30f080, 4, (RRnpc, RRnpc, RRnpc, oROR), sxtah, t_sxtah),
+ TCE(uxtab, 6e00070, fa50f080, 4, (RRnpc, RRnpc, RRnpc, oROR), sxtah, t_sxtah),
+ TCE(uxtb16, 6cf0070, fa3ff080, 3, (RRnpc, RRnpc, oROR), sxth, t_sxth),
+ TCE(sel, 6800fb0, faa0f080, 3, (RRnpc, RRnpc, RRnpc), rd_rn_rm, t_simd),
+ TCE(smlad, 7000010, fb200000, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smla, t_mla),
+ TCE(smladx, 7000030, fb200010, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smla, t_mla),
+ TCE(smlald, 7400010, fbc000c0, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smlal,t_mlal),
+ TCE(smlaldx, 7400030, fbc000d0, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smlal,t_mlal),
+ TCE(smlsd, 7000050, fb400000, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smla, t_mla),
+ TCE(smlsdx, 7000070, fb400010, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smla, t_mla),
+ TCE(smlsld, 7400050, fbd000c0, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smlal,t_mlal),
+ TCE(smlsldx, 7400070, fbd000d0, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smlal,t_mlal),
+ TCE(smmla, 7500010, fb500000, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smla, t_mla),
+ TCE(smmlar, 7500030, fb500010, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smla, t_mla),
+ TCE(smmls, 75000d0, fb600000, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smla, t_mla),
+ TCE(smmlsr, 75000f0, fb600010, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smla, t_mla),
+ TCE(smmul, 750f010, fb50f000, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
+ TCE(smmulr, 750f030, fb50f010, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
+ TCE(smuad, 700f010, fb20f000, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
+ 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),
+ 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),
+ TCE(usat16, 6e00f30, f3a00000, 3, (RRnpc, I15, RRnpc), usat16, t_usat16),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v6k
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v6k
+ tCE(yield, 320f001, yield, 0, (), noargs, t_hint),
+ tCE(wfe, 320f002, wfe, 0, (), noargs, t_hint),
+ tCE(wfi, 320f003, wfi, 0, (), noargs, t_hint),
+ tCE(sev, 320f004, sev, 0, (), noargs, t_hint),
+
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v6_notm
+ TCE(ldrexd, 1b00f9f, e8d0007f, 3, (RRnpc, oRRnpc, RRnpcb), ldrexd, t_ldrexd),
+ TCE(strexd, 1a00f90, e8c00070, 4, (RRnpc, RRnpc, oRRnpc, RRnpcb), strexd, t_strexd),
+
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v6t2
+ TCE(ldrexb, 1d00f9f, e8d00f4f, 2, (RRnpc, RRnpcb), rd_rn, rd_rn),
+ TCE(ldrexh, 1f00f9f, e8d00f5f, 2, (RRnpc, RRnpcb), rd_rn, rd_rn),
+ TCE(strexb, 1c00f90, e8c00f40, 3, (RRnpc, RRnpc, ADDR), strex, rm_rd_rn),
+ TCE(strexh, 1e00f90, e8c00f50, 3, (RRnpc, RRnpc, ADDR), strex, rm_rd_rn),
+ TUF(clrex, 57ff01f, f3bf8f2f, 0, (), noargs, noargs),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v6z
+ TCE(smc, 1600070, f7f08000, 1, (EXPi), smc, t_smc),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v6t2
+ TCE(bfc, 7c0001f, f36f0000, 3, (RRnpc, I31, I32), bfc, t_bfc),
+ TCE(bfi, 7c00010, f3600000, 4, (RRnpc, RRnpc_I0, I31, I32), bfi, t_bfi),
+ TCE(sbfx, 7a00050, f3400000, 4, (RR, RR, I31, I32), bfx, t_bfx),
+ 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),
+
+ 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. */
+ 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),
+ TUE(ittt, 0, bf0e, 1, (COND), it, t_it),
+ TUE(itet, 0, bf06, 1, (COND), it, t_it),
+ TUE(itte, 0, bf0a, 1, (COND), it, t_it),
+ TUE(itee, 0, bf02, 1, (COND), it, t_it),
+ TUE(itttt, 0, bf0f, 1, (COND), it, t_it),
+ TUE(itett, 0, bf07, 1, (COND), it, t_it),
+ TUE(ittet, 0, bf0b, 1, (COND), it, t_it),
+ TUE(iteet, 0, bf03, 1, (COND), it, t_it),
+ TUE(ittte, 0, bf0d, 1, (COND), it, t_it),
+ TUE(itete, 0, bf05, 1, (COND), it, t_it),
+ TUE(ittee, 0, bf09, 1, (COND), it, t_it),
+ TUE(iteee, 0, bf01, 1, (COND), it, t_it),
+
+ /* Thumb2 only instructions. */
+#undef ARM_VARIANT
+#define ARM_VARIANT NULL
+
+ TCE(addw, 0, f2000000, 3, (RR, RR, EXPi), 0, t_add_sub_w),
+ TCE(subw, 0, f2a00000, 3, (RR, RR, EXPi), 0, t_add_sub_w),
+ TCE(tbb, 0, e8d0f000, 1, (TB), 0, t_tb),
+ TCE(tbh, 0, e8d0f010, 1, (TB), 0, t_tb),
+
+ /* Thumb-2 hardware division instructions (R and M profiles only). */
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_div
+ TCE(sdiv, 0, fb90f0f0, 3, (RR, oRR, RR), 0, t_div),
+ TCE(udiv, 0, fbb0f0f0, 3, (RR, oRR, RR), 0, t_div),
+
+ /* ARM V7 instructions. */
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v7
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &arm_ext_v7
+ TUF(pli, 450f000, f910f000, 1, (ADDR), pli, t_pld),
+ TCE(dbg, 320f0f0, f3af80f0, 1, (I15), dbg, t_dbg),
+ TUF(dmb, 57ff050, f3bf8f50, 1, (oBARRIER), barrier, t_barrier),
+ TUF(dsb, 57ff040, f3bf8f40, 1, (oBARRIER), barrier, t_barrier),
+ TUF(isb, 57ff060, f3bf8f60, 1, (oBARRIER), barrier, t_barrier),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &fpu_fpa_ext_v1 /* Core FPA instruction set (V1). */
+ cCE(wfs, e200110, 1, (RR), rd),
+ cCE(rfs, e300110, 1, (RR), rd),
+ 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(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(mvfs, e008100, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfsp, e008120, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfsm, e008140, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfsz, e008160, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfd, e008180, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfdp, e0081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfdm, e0081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfdz, e0081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfe, e088100, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfep, e088120, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfem, e088140, 2, (RF, RF_IF), rd_rm),
+ cCL(mvfez, e088160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(mnfs, e108100, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfsp, e108120, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfsm, e108140, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfsz, e108160, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfd, e108180, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfdp, e1081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfdm, e1081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfdz, e1081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfe, e188100, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfep, e188120, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfem, e188140, 2, (RF, RF_IF), rd_rm),
+ cCL(mnfez, e188160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(abss, e208100, 2, (RF, RF_IF), rd_rm),
+ cCL(abssp, e208120, 2, (RF, RF_IF), rd_rm),
+ cCL(abssm, e208140, 2, (RF, RF_IF), rd_rm),
+ cCL(abssz, e208160, 2, (RF, RF_IF), rd_rm),
+ cCL(absd, e208180, 2, (RF, RF_IF), rd_rm),
+ cCL(absdp, e2081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(absdm, e2081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(absdz, e2081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(abse, e288100, 2, (RF, RF_IF), rd_rm),
+ cCL(absep, e288120, 2, (RF, RF_IF), rd_rm),
+ cCL(absem, e288140, 2, (RF, RF_IF), rd_rm),
+ cCL(absez, e288160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(rnds, e308100, 2, (RF, RF_IF), rd_rm),
+ cCL(rndsp, e308120, 2, (RF, RF_IF), rd_rm),
+ cCL(rndsm, e308140, 2, (RF, RF_IF), rd_rm),
+ cCL(rndsz, e308160, 2, (RF, RF_IF), rd_rm),
+ cCL(rndd, e308180, 2, (RF, RF_IF), rd_rm),
+ cCL(rnddp, e3081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(rnddm, e3081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(rnddz, e3081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(rnde, e388100, 2, (RF, RF_IF), rd_rm),
+ cCL(rndep, e388120, 2, (RF, RF_IF), rd_rm),
+ cCL(rndem, e388140, 2, (RF, RF_IF), rd_rm),
+ cCL(rndez, e388160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(sqts, e408100, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtsp, e408120, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtsm, e408140, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtsz, e408160, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtd, e408180, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtdp, e4081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtdm, e4081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtdz, e4081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(sqte, e488100, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtep, e488120, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtem, e488140, 2, (RF, RF_IF), rd_rm),
+ cCL(sqtez, e488160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(logs, e508100, 2, (RF, RF_IF), rd_rm),
+ cCL(logsp, e508120, 2, (RF, RF_IF), rd_rm),
+ cCL(logsm, e508140, 2, (RF, RF_IF), rd_rm),
+ cCL(logsz, e508160, 2, (RF, RF_IF), rd_rm),
+ cCL(logd, e508180, 2, (RF, RF_IF), rd_rm),
+ cCL(logdp, e5081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(logdm, e5081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(logdz, e5081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(loge, e588100, 2, (RF, RF_IF), rd_rm),
+ cCL(logep, e588120, 2, (RF, RF_IF), rd_rm),
+ cCL(logem, e588140, 2, (RF, RF_IF), rd_rm),
+ cCL(logez, e588160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(lgns, e608100, 2, (RF, RF_IF), rd_rm),
+ cCL(lgnsp, e608120, 2, (RF, RF_IF), rd_rm),
+ cCL(lgnsm, e608140, 2, (RF, RF_IF), rd_rm),
+ cCL(lgnsz, e608160, 2, (RF, RF_IF), rd_rm),
+ cCL(lgnd, e608180, 2, (RF, RF_IF), rd_rm),
+ cCL(lgndp, e6081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(lgndm, e6081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(lgndz, e6081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(lgne, e688100, 2, (RF, RF_IF), rd_rm),
+ cCL(lgnep, e688120, 2, (RF, RF_IF), rd_rm),
+ cCL(lgnem, e688140, 2, (RF, RF_IF), rd_rm),
+ cCL(lgnez, e688160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(exps, e708100, 2, (RF, RF_IF), rd_rm),
+ cCL(expsp, e708120, 2, (RF, RF_IF), rd_rm),
+ cCL(expsm, e708140, 2, (RF, RF_IF), rd_rm),
+ cCL(expsz, e708160, 2, (RF, RF_IF), rd_rm),
+ cCL(expd, e708180, 2, (RF, RF_IF), rd_rm),
+ cCL(expdp, e7081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(expdm, e7081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(expdz, e7081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(expe, e788100, 2, (RF, RF_IF), rd_rm),
+ cCL(expep, e788120, 2, (RF, RF_IF), rd_rm),
+ cCL(expem, e788140, 2, (RF, RF_IF), rd_rm),
+ cCL(expdz, e788160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(sins, e808100, 2, (RF, RF_IF), rd_rm),
+ cCL(sinsp, e808120, 2, (RF, RF_IF), rd_rm),
+ cCL(sinsm, e808140, 2, (RF, RF_IF), rd_rm),
+ cCL(sinsz, e808160, 2, (RF, RF_IF), rd_rm),
+ cCL(sind, e808180, 2, (RF, RF_IF), rd_rm),
+ cCL(sindp, e8081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(sindm, e8081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(sindz, e8081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(sine, e888100, 2, (RF, RF_IF), rd_rm),
+ cCL(sinep, e888120, 2, (RF, RF_IF), rd_rm),
+ cCL(sinem, e888140, 2, (RF, RF_IF), rd_rm),
+ cCL(sinez, e888160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(coss, e908100, 2, (RF, RF_IF), rd_rm),
+ cCL(cossp, e908120, 2, (RF, RF_IF), rd_rm),
+ cCL(cossm, e908140, 2, (RF, RF_IF), rd_rm),
+ cCL(cossz, e908160, 2, (RF, RF_IF), rd_rm),
+ cCL(cosd, e908180, 2, (RF, RF_IF), rd_rm),
+ cCL(cosdp, e9081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(cosdm, e9081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(cosdz, e9081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(cose, e988100, 2, (RF, RF_IF), rd_rm),
+ cCL(cosep, e988120, 2, (RF, RF_IF), rd_rm),
+ cCL(cosem, e988140, 2, (RF, RF_IF), rd_rm),
+ cCL(cosez, e988160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(tans, ea08100, 2, (RF, RF_IF), rd_rm),
+ cCL(tansp, ea08120, 2, (RF, RF_IF), rd_rm),
+ cCL(tansm, ea08140, 2, (RF, RF_IF), rd_rm),
+ cCL(tansz, ea08160, 2, (RF, RF_IF), rd_rm),
+ cCL(tand, ea08180, 2, (RF, RF_IF), rd_rm),
+ cCL(tandp, ea081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(tandm, ea081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(tandz, ea081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(tane, ea88100, 2, (RF, RF_IF), rd_rm),
+ cCL(tanep, ea88120, 2, (RF, RF_IF), rd_rm),
+ cCL(tanem, ea88140, 2, (RF, RF_IF), rd_rm),
+ cCL(tanez, ea88160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(asns, eb08100, 2, (RF, RF_IF), rd_rm),
+ cCL(asnsp, eb08120, 2, (RF, RF_IF), rd_rm),
+ cCL(asnsm, eb08140, 2, (RF, RF_IF), rd_rm),
+ cCL(asnsz, eb08160, 2, (RF, RF_IF), rd_rm),
+ cCL(asnd, eb08180, 2, (RF, RF_IF), rd_rm),
+ cCL(asndp, eb081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(asndm, eb081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(asndz, eb081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(asne, eb88100, 2, (RF, RF_IF), rd_rm),
+ cCL(asnep, eb88120, 2, (RF, RF_IF), rd_rm),
+ cCL(asnem, eb88140, 2, (RF, RF_IF), rd_rm),
+ cCL(asnez, eb88160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(acss, ec08100, 2, (RF, RF_IF), rd_rm),
+ cCL(acssp, ec08120, 2, (RF, RF_IF), rd_rm),
+ cCL(acssm, ec08140, 2, (RF, RF_IF), rd_rm),
+ cCL(acssz, ec08160, 2, (RF, RF_IF), rd_rm),
+ cCL(acsd, ec08180, 2, (RF, RF_IF), rd_rm),
+ cCL(acsdp, ec081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(acsdm, ec081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(acsdz, ec081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(acse, ec88100, 2, (RF, RF_IF), rd_rm),
+ cCL(acsep, ec88120, 2, (RF, RF_IF), rd_rm),
+ cCL(acsem, ec88140, 2, (RF, RF_IF), rd_rm),
+ cCL(acsez, ec88160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(atns, ed08100, 2, (RF, RF_IF), rd_rm),
+ cCL(atnsp, ed08120, 2, (RF, RF_IF), rd_rm),
+ cCL(atnsm, ed08140, 2, (RF, RF_IF), rd_rm),
+ cCL(atnsz, ed08160, 2, (RF, RF_IF), rd_rm),
+ cCL(atnd, ed08180, 2, (RF, RF_IF), rd_rm),
+ cCL(atndp, ed081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(atndm, ed081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(atndz, ed081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(atne, ed88100, 2, (RF, RF_IF), rd_rm),
+ cCL(atnep, ed88120, 2, (RF, RF_IF), rd_rm),
+ cCL(atnem, ed88140, 2, (RF, RF_IF), rd_rm),
+ cCL(atnez, ed88160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(urds, ee08100, 2, (RF, RF_IF), rd_rm),
+ cCL(urdsp, ee08120, 2, (RF, RF_IF), rd_rm),
+ cCL(urdsm, ee08140, 2, (RF, RF_IF), rd_rm),
+ cCL(urdsz, ee08160, 2, (RF, RF_IF), rd_rm),
+ cCL(urdd, ee08180, 2, (RF, RF_IF), rd_rm),
+ cCL(urddp, ee081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(urddm, ee081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(urddz, ee081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(urde, ee88100, 2, (RF, RF_IF), rd_rm),
+ cCL(urdep, ee88120, 2, (RF, RF_IF), rd_rm),
+ cCL(urdem, ee88140, 2, (RF, RF_IF), rd_rm),
+ cCL(urdez, ee88160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(nrms, ef08100, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmsp, ef08120, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmsm, ef08140, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmsz, ef08160, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmd, ef08180, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmdp, ef081a0, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmdm, ef081c0, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmdz, ef081e0, 2, (RF, RF_IF), rd_rm),
+ cCL(nrme, ef88100, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmep, ef88120, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmem, ef88140, 2, (RF, RF_IF), rd_rm),
+ cCL(nrmez, ef88160, 2, (RF, RF_IF), rd_rm),
+
+ cCL(adfs, e000100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfsp, e000120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfsm, e000140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfsz, e000160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfd, e000180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfdp, e0001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfdm, e0001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfdz, e0001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfe, e080100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfep, e080120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfem, e080140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(adfez, e080160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(sufs, e200100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufsp, e200120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufsm, e200140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufsz, e200160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufd, e200180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufdp, e2001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufdm, e2001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufdz, e2001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufe, e280100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufep, e280120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufem, e280140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(sufez, e280160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(rsfs, e300100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfsp, e300120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfsm, e300140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfsz, e300160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfd, e300180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfdp, e3001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfdm, e3001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfdz, e3001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfe, e380100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfep, e380120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfem, e380140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rsfez, e380160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(mufs, e100100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufsp, e100120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufsm, e100140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufsz, e100160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufd, e100180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufdp, e1001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufdm, e1001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufdz, e1001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufe, e180100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufep, e180120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufem, e180140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(mufez, e180160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(dvfs, e400100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfsp, e400120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfsm, e400140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfsz, e400160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfd, e400180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfdp, e4001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfdm, e4001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfdz, e4001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfe, e480100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfep, e480120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfem, e480140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(dvfez, e480160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(rdfs, e500100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfsp, e500120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfsm, e500140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfsz, e500160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfd, e500180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfdp, e5001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfdm, e5001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfdz, e5001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfe, e580100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfep, e580120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfem, e580140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rdfez, e580160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(pows, e600100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powsp, e600120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powsm, e600140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powsz, e600160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powd, e600180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powdp, e6001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powdm, e6001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powdz, e6001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powe, e680100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powep, e680120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powem, e680140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(powez, e680160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(rpws, e700100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwsp, e700120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwsm, e700140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwsz, e700160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwd, e700180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwdp, e7001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwdm, e7001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwdz, e7001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwe, e780100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwep, e780120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwem, e780140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rpwez, e780160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(rmfs, e800100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfsp, e800120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfsm, e800140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfsz, e800160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfd, e800180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfdp, e8001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfdm, e8001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfdz, e8001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfe, e880100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfep, e880120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfem, e880140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(rmfez, e880160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(fmls, e900100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmlsp, e900120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmlsm, e900140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmlsz, e900160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmld, e900180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmldp, e9001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmldm, e9001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmldz, e9001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmle, e980100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmlep, e980120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmlem, e980140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fmlez, e980160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(fdvs, ea00100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvsp, ea00120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvsm, ea00140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvsz, ea00160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvd, ea00180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvdp, ea001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvdm, ea001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvdz, ea001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdve, ea80100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvep, ea80120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvem, ea80140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(fdvez, ea80160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(frds, eb00100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frdsp, eb00120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frdsm, eb00140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frdsz, eb00160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frdd, eb00180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frddp, eb001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frddm, eb001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frddz, eb001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frde, eb80100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frdep, eb80120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frdem, eb80140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(frdez, eb80160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCL(pols, ec00100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(polsp, ec00120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(polsm, ec00140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(polsz, ec00160, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(pold, ec00180, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(poldp, ec001a0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(poldm, ec001c0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(poldz, ec001e0, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(pole, ec80100, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(polep, ec80120, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(polem, ec80140, 3, (RF, RF, RF_IF), rd_rn_rm),
+ cCL(polez, ec80160, 3, (RF, RF, RF_IF), rd_rn_rm),
+
+ cCE(cmf, e90f110, 2, (RF, RF_IF), fpa_cmp),
+ C3E(cmfe, ed0f110, 2, (RF, RF_IF), fpa_cmp),
+ cCE(cnf, eb0f110, 2, (RF, RF_IF), fpa_cmp),
+ C3E(cnfe, ef0f110, 2, (RF, RF_IF), fpa_cmp),
+
+ cCL(flts, e000110, 2, (RF, RR), rn_rd),
+ cCL(fltsp, e000130, 2, (RF, RR), rn_rd),
+ cCL(fltsm, e000150, 2, (RF, RR), rn_rd),
+ cCL(fltsz, e000170, 2, (RF, RR), rn_rd),
+ cCL(fltd, e000190, 2, (RF, RR), rn_rd),
+ cCL(fltdp, e0001b0, 2, (RF, RR), rn_rd),
+ cCL(fltdm, e0001d0, 2, (RF, RR), rn_rd),
+ cCL(fltdz, e0001f0, 2, (RF, RR), rn_rd),
+ cCL(flte, e080110, 2, (RF, RR), rn_rd),
+ cCL(fltep, e080130, 2, (RF, RR), rn_rd),
+ cCL(fltem, e080150, 2, (RF, RR), rn_rd),
+ cCL(fltez, e080170, 2, (RF, RR), rn_rd),
-static void
-do_mav_triple_5b (str)
- char * str;
-{
- do_mav_triple (str, MAV_MODE5, REG_TYPE_RN, REG_TYPE_MVD, REG_TYPE_MVD);
-}
+ /* The implementation of the FIX instruction is broken on some
+ assemblers, in that it accepts a precision specifier as well as a
+ rounding specifier, despite the fact that this is meaningless.
+ To be more compatible, we accept it as well, though of course it
+ does not set any bits. */
+ cCE(fix, e100110, 2, (RR, RF), rd_rm),
+ cCL(fixp, e100130, 2, (RR, RF), rd_rm),
+ cCL(fixm, e100150, 2, (RR, RF), rd_rm),
+ cCL(fixz, e100170, 2, (RR, RF), rd_rm),
+ cCL(fixsp, e100130, 2, (RR, RF), rd_rm),
+ cCL(fixsm, e100150, 2, (RR, RF), rd_rm),
+ cCL(fixsz, e100170, 2, (RR, RF), rd_rm),
+ cCL(fixdp, e100130, 2, (RR, RF), rd_rm),
+ cCL(fixdm, e100150, 2, (RR, RF), rd_rm),
+ cCL(fixdz, e100170, 2, (RR, RF), rd_rm),
+ cCL(fixep, e100130, 2, (RR, RF), rd_rm),
+ cCL(fixem, e100150, 2, (RR, RF), rd_rm),
+ cCL(fixez, e100170, 2, (RR, RF), rd_rm),
-static void
-do_mav_triple_5c (str)
- char * str;
-{
- do_mav_triple (str, MAV_MODE5, REG_TYPE_RN, REG_TYPE_MVFX, REG_TYPE_MVFX);
-}
+ /* Instructions that were new with the real FPA, call them V2. */
+#undef ARM_VARIANT
+#define ARM_VARIANT &fpu_fpa_ext_v2
+ cCE(lfm, c100200, 3, (RF, I4b, ADDR), fpa_ldmstm),
+ cCL(lfmfd, c900200, 3, (RF, I4b, ADDR), fpa_ldmstm),
+ cCL(lfmea, d100200, 3, (RF, I4b, ADDR), fpa_ldmstm),
+ cCE(sfm, c000200, 3, (RF, I4b, ADDR), fpa_ldmstm),
+ cCL(sfmfd, d000200, 3, (RF, I4b, ADDR), fpa_ldmstm),
+ cCL(sfmea, c800200, 3, (RF, I4b, ADDR), fpa_ldmstm),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &fpu_vfp_ext_v1xd /* VFP V1xD (single precision). */
+ /* Moves and type conversions. */
+ cCE(fcpys, eb00a40, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(fmrs, e100a10, 2, (RR, RVS), vfp_reg_from_sp),
+ cCE(fmsr, e000a10, 2, (RVS, RR), vfp_sp_from_reg),
+ cCE(fmstat, ef1fa10, 0, (), noargs),
+ cCE(fsitos, eb80ac0, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(fuitos, eb80a40, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(ftosis, ebd0a40, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(ftosizs, ebd0ac0, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(ftouis, ebc0a40, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(ftouizs, ebc0ac0, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(fmrx, ef00a10, 2, (RR, RVC), rd_rn),
+ 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(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),
+ cCE(fldmeas, d300a00, 2, (RRw, VRSLST), vfp_sp_ldstmdb),
+ cCE(fldmiax, c900b00, 2, (RRw, VRDLST), vfp_xp_ldstmia),
+ cCE(fldmfdx, c900b00, 2, (RRw, VRDLST), vfp_xp_ldstmia),
+ cCE(fldmdbx, d300b00, 2, (RRw, VRDLST), vfp_xp_ldstmdb),
+ cCE(fldmeax, d300b00, 2, (RRw, VRDLST), vfp_xp_ldstmdb),
+ cCE(fstmias, c800a00, 2, (RRw, VRSLST), vfp_sp_ldstmia),
+ cCE(fstmeas, c800a00, 2, (RRw, VRSLST), vfp_sp_ldstmia),
+ cCE(fstmdbs, d200a00, 2, (RRw, VRSLST), vfp_sp_ldstmdb),
+ cCE(fstmfds, d200a00, 2, (RRw, VRSLST), vfp_sp_ldstmdb),
+ cCE(fstmiax, c800b00, 2, (RRw, VRDLST), vfp_xp_ldstmia),
+ cCE(fstmeax, c800b00, 2, (RRw, VRDLST), vfp_xp_ldstmia),
+ cCE(fstmdbx, d200b00, 2, (RRw, VRDLST), vfp_xp_ldstmdb),
+ cCE(fstmfdx, d200b00, 2, (RRw, VRDLST), vfp_xp_ldstmdb),
-static void
-do_mav_triple_5d (str)
- char * str;
-{
- do_mav_triple (str, MAV_MODE5, REG_TYPE_RN, REG_TYPE_MVDX, REG_TYPE_MVDX);
-}
+ /* Monadic operations. */
+ cCE(fabss, eb00ac0, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(fnegs, eb10a40, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(fsqrts, eb10ac0, 2, (RVS, RVS), vfp_sp_monadic),
+
+ /* Dyadic operations. */
+ cCE(fadds, e300a00, 3, (RVS, RVS, RVS), vfp_sp_dyadic),
+ cCE(fsubs, e300a40, 3, (RVS, RVS, RVS), vfp_sp_dyadic),
+ cCE(fmuls, e200a00, 3, (RVS, RVS, RVS), vfp_sp_dyadic),
+ cCE(fdivs, e800a00, 3, (RVS, RVS, RVS), vfp_sp_dyadic),
+ cCE(fmacs, e000a00, 3, (RVS, RVS, RVS), vfp_sp_dyadic),
+ cCE(fmscs, e100a00, 3, (RVS, RVS, RVS), vfp_sp_dyadic),
+ cCE(fnmuls, e200a40, 3, (RVS, RVS, RVS), vfp_sp_dyadic),
+ cCE(fnmacs, e000a40, 3, (RVS, RVS, RVS), vfp_sp_dyadic),
+ cCE(fnmscs, e100a40, 3, (RVS, RVS, RVS), vfp_sp_dyadic),
-static void
-do_mav_triple_5e (str)
- char * str;
-{
- do_mav_triple (str, MAV_MODE5, REG_TYPE_MVF, REG_TYPE_MVF, REG_TYPE_MVF);
-}
+ /* Comparisons. */
+ cCE(fcmps, eb40a40, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(fcmpzs, eb50a40, 1, (RVS), vfp_sp_compare_z),
+ cCE(fcmpes, eb40ac0, 2, (RVS, RVS), vfp_sp_monadic),
+ cCE(fcmpezs, eb50ac0, 1, (RVS), vfp_sp_compare_z),
-static void
-do_mav_triple_5f (str)
- char * str;
-{
- do_mav_triple (str, MAV_MODE5, REG_TYPE_MVD, REG_TYPE_MVD, REG_TYPE_MVD);
-}
+#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(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(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),
+ cCE(ftosizd, ebd0bc0, 2, (RVS, RVD), vfp_sp_dp_cvt),
+ cCE(ftouid, ebc0b40, 2, (RVS, RVD), vfp_sp_dp_cvt),
+ 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(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),
+ cCE(fldmead, d300b00, 2, (RRw, VRDLST), vfp_dp_ldstmdb),
+ cCE(fstmiad, c800b00, 2, (RRw, VRDLST), vfp_dp_ldstmia),
+ cCE(fstmead, c800b00, 2, (RRw, VRDLST), vfp_dp_ldstmia),
+ cCE(fstmdbd, d200b00, 2, (RRw, VRDLST), vfp_dp_ldstmdb),
+ cCE(fstmfdd, d200b00, 2, (RRw, VRDLST), vfp_dp_ldstmdb),
-static void
-do_mav_triple_5g (str)
- char * str;
-{
- do_mav_triple (str, MAV_MODE5, REG_TYPE_MVFX, REG_TYPE_MVFX, REG_TYPE_MVFX);
-}
+ /* 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),
+
+ /* 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),
-static void
-do_mav_triple_5h (str)
- char * str;
-{
- do_mav_triple (str, MAV_MODE5, REG_TYPE_MVDX, REG_TYPE_MVDX, REG_TYPE_MVDX);
-}
+ /* 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),
+
+#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),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_cext_xscale /* Intel XScale extensions. */
+ cCE(mia, e200010, 3, (RXA, RRnpc, RRnpc), xsc_mia),
+ cCE(miaph, e280010, 3, (RXA, RRnpc, RRnpc), xsc_mia),
+ cCE(miabb, e2c0010, 3, (RXA, RRnpc, RRnpc), xsc_mia),
+ cCE(miabt, e2d0010, 3, (RXA, RRnpc, RRnpc), xsc_mia),
+ cCE(miatb, e2e0010, 3, (RXA, RRnpc, RRnpc), xsc_mia),
+ cCE(miatt, e2f0010, 3, (RXA, RRnpc, RRnpc), xsc_mia),
+ cCE(mar, c400000, 3, (RXA, RRnpc, RRnpc), xsc_mar),
+ cCE(mra, c500000, 3, (RRnpc, RRnpc, RXA), xsc_mra),
+
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_cext_iwmmxt /* Intel Wireless MMX technology. */
+ cCE(tandcb, e13f130, 1, (RR), iwmmxt_tandorc),
+ cCE(tandch, e53f130, 1, (RR), iwmmxt_tandorc),
+ cCE(tandcw, e93f130, 1, (RR), iwmmxt_tandorc),
+ cCE(tbcstb, e400010, 2, (RIWR, RR), rn_rd),
+ cCE(tbcsth, e400050, 2, (RIWR, RR), rn_rd),
+ cCE(tbcstw, e400090, 2, (RIWR, RR), rn_rd),
+ cCE(textrcb, e130170, 2, (RR, I7), iwmmxt_textrc),
+ cCE(textrch, e530170, 2, (RR, I7), iwmmxt_textrc),
+ cCE(textrcw, e930170, 2, (RR, I7), iwmmxt_textrc),
+ cCE(textrmub, e100070, 3, (RR, RIWR, I7), iwmmxt_textrm),
+ cCE(textrmuh, e500070, 3, (RR, RIWR, I7), iwmmxt_textrm),
+ cCE(textrmuw, e900070, 3, (RR, RIWR, I7), iwmmxt_textrm),
+ cCE(textrmsb, e100078, 3, (RR, RIWR, I7), iwmmxt_textrm),
+ cCE(textrmsh, e500078, 3, (RR, RIWR, I7), iwmmxt_textrm),
+ cCE(textrmsw, e900078, 3, (RR, RIWR, I7), iwmmxt_textrm),
+ 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(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),
+ cCE(tmiabb, e2c0010, 3, (RIWR, RR, RR), iwmmxt_tmia),
+ cCE(tmiabt, e2d0010, 3, (RIWR, RR, RR), iwmmxt_tmia),
+ cCE(tmiatb, e2e0010, 3, (RIWR, RR, RR), iwmmxt_tmia),
+ cCE(tmiatt, e2f0010, 3, (RIWR, RR, RR), iwmmxt_tmia),
+ 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(tmrrc, c500000, 3, (RR, RR, RIWR), rd_rn_rm),
+ cCE(torcb, e13f150, 1, (RR), iwmmxt_tandorc),
+ cCE(torch, e53f150, 1, (RR), iwmmxt_tandorc),
+ cCE(torcw, e93f150, 1, (RR), iwmmxt_tandorc),
+ cCE(waccb, e0001c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wacch, e4001c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(waccw, e8001c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(waddbss, e300180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddb, e000180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddbus, e100180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddhss, e700180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddh, e400180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddhus, e500180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddwss, eb00180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddw, e800180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddwus, e900180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waligni, e000020, 4, (RIWR, RIWR, RIWR, I7), iwmmxt_waligni),
+ cCE(walignr0, e800020, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(walignr1, e900020, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(walignr2, ea00020, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(walignr3, eb00020, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wand, e200000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wandn, e300000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wavg2b, e800000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wavg2br, e900000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wavg2h, ec00000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wavg2hr, ed00000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wcmpeqb, e000060, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wcmpeqh, e400060, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wcmpeqw, e800060, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wcmpgtub, e100060, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wcmpgtuh, e500060, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wcmpgtuw, e900060, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wcmpgtsb, e300060, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wcmpgtsh, e700060, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wcmpgtsw, eb00060, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wldrb, c100000, 2, (RIWR, ADDR), iwmmxt_wldstbh),
+ cCE(wldrh, c500000, 2, (RIWR, ADDR), iwmmxt_wldstbh),
+ cCE(wldrw, c100100, 2, (RIWR_RIWC, ADDR), iwmmxt_wldstw),
+ cCE(wldrd, c500100, 2, (RIWR, ADDR), iwmmxt_wldstd),
+ cCE(wmacs, e600100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmacsz, e700100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmacu, e400100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmacuz, e500100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmadds, ea00100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaddu, e800100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaxsb, e200160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaxsh, e600160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaxsw, ea00160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaxub, e000160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaxuh, e400160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaxuw, e800160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wminsb, e300160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wminsh, e700160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wminsw, eb00160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wminub, e100160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wminuh, e500160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wminuw, e900160, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmov, e000000, 2, (RIWR, RIWR), iwmmxt_wmov),
+ cCE(wmulsm, e300100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulsl, e200100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulum, e100100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulul, e000100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wor, e000000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wpackhss, e700080, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wpackhus, e500080, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wpackwss, eb00080, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ 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(wrorhg, e700148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wrorw, eb00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wrorwg, eb00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wrord, ef00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ 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(wsllhg, e500148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wsllw, e900040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsllwg, e900148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wslld, ed00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wslldg, ed00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wsrah, e400040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsrahg, e400148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wsraw, e800040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsrawg, e800148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wsrad, ec00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsradg, ec00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wsrlh, e600040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsrlhg, e600148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wsrlw, ea00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsrlwg, ea00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
+ cCE(wsrld, ee00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ 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),
+ cCE(wstrw, c000100, 2, (RIWR_RIWC, ADDR), iwmmxt_wldstw),
+ cCE(wstrd, c400100, 2, (RIWR, ADDR), iwmmxt_wldstd),
+ cCE(wsubbss, e3001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsubb, e0001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsubbus, e1001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsubhss, e7001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsubh, e4001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsubhus, e5001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsubwss, eb001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsubw, e8001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsubwus, e9001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wunpckehub,e0000c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckehuh,e4000c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckehuw,e8000c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckehsb,e2000c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckehsh,e6000c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckehsw,ea000c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckihb, e1000c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wunpckihh, e5000c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wunpckihw, e9000c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wunpckelub,e0000e0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckeluh,e4000e0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckeluw,e8000e0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckelsb,e2000e0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckelsh,e6000e0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckelsw,ea000e0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wunpckilb, e1000e0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wunpckilh, e5000e0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wunpckilw, e9000e0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wxor, e100000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wzero, e300000, 1, (RIWR), iwmmxt_wzero),
+
+#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(cfmvsr, e000450, 2, (RMF, RR), rn_rd),
+ cCE(cfmvrs, e100450, 2, (RR, RMF), rd_rn),
+ cCE(cfmvdlr, e000410, 2, (RMD, RR), rn_rd),
+ cCE(cfmvrdl, e100410, 2, (RR, RMD), rd_rn),
+ cCE(cfmvdhr, e000430, 2, (RMD, RR), rn_rd),
+ cCE(cfmvrdh, e100430, 2, (RR, RMD), rd_rn),
+ cCE(cfmv64lr, e000510, 2, (RMDX, RR), rn_rd),
+ cCE(cfmvr64l, e100510, 2, (RR, RMDX), rd_rn),
+ cCE(cfmv64hr, e000530, 2, (RMDX, RR), rn_rd),
+ cCE(cfmvr64h, e100530, 2, (RR, RMDX), rd_rn),
+ cCE(cfmval32, e200440, 2, (RMAX, RMFX), rd_rn),
+ cCE(cfmv32al, e100440, 2, (RMFX, RMAX), rd_rn),
+ cCE(cfmvam32, e200460, 2, (RMAX, RMFX), rd_rn),
+ cCE(cfmv32am, e100460, 2, (RMFX, RMAX), rd_rn),
+ cCE(cfmvah32, e200480, 2, (RMAX, RMFX), rd_rn),
+ cCE(cfmv32ah, e100480, 2, (RMFX, RMAX), rd_rn),
+ cCE(cfmva32, e2004a0, 2, (RMAX, RMFX), rd_rn),
+ cCE(cfmv32a, e1004a0, 2, (RMFX, RMAX), rd_rn),
+ cCE(cfmva64, e2004c0, 2, (RMAX, RMDX), rd_rn),
+ cCE(cfmv64a, e1004c0, 2, (RMDX, RMAX), rd_rn),
+ cCE(cfmvsc32, e2004e0, 2, (RMDS, RMDX), mav_dspsc),
+ cCE(cfmv32sc, e1004e0, 2, (RMDX, RMDS), rd),
+ cCE(cfcpys, e000400, 2, (RMF, RMF), rd_rn),
+ cCE(cfcpyd, e000420, 2, (RMD, RMD), rd_rn),
+ cCE(cfcvtsd, e000460, 2, (RMD, RMF), rd_rn),
+ cCE(cfcvtds, e000440, 2, (RMF, RMD), rd_rn),
+ cCE(cfcvt32s, e000480, 2, (RMF, RMFX), rd_rn),
+ cCE(cfcvt32d, e0004a0, 2, (RMD, RMFX), rd_rn),
+ cCE(cfcvt64s, e0004c0, 2, (RMF, RMDX), rd_rn),
+ cCE(cfcvt64d, e0004e0, 2, (RMD, RMDX), rd_rn),
+ cCE(cfcvts32, e100580, 2, (RMFX, RMF), rd_rn),
+ cCE(cfcvtd32, e1005a0, 2, (RMFX, RMD), rd_rn),
+ cCE(cftruncs32,e1005c0, 2, (RMFX, RMF), rd_rn),
+ cCE(cftruncd32,e1005e0, 2, (RMFX, RMD), rd_rn),
+ cCE(cfrshl32, e000550, 3, (RMFX, RMFX, RR), mav_triple),
+ cCE(cfrshl64, e000570, 3, (RMDX, RMDX, RR), mav_triple),
+ cCE(cfsh32, e000500, 3, (RMFX, RMFX, I63s), mav_shift),
+ cCE(cfsh64, e200500, 3, (RMDX, RMDX, I63s), mav_shift),
+ cCE(cfcmps, e100490, 3, (RR, RMF, RMF), rd_rn_rm),
+ cCE(cfcmpd, e1004b0, 3, (RR, RMD, RMD), rd_rn_rm),
+ cCE(cfcmp32, e100590, 3, (RR, RMFX, RMFX), rd_rn_rm),
+ cCE(cfcmp64, e1005b0, 3, (RR, RMDX, RMDX), rd_rn_rm),
+ cCE(cfabss, e300400, 2, (RMF, RMF), rd_rn),
+ cCE(cfabsd, e300420, 2, (RMD, RMD), rd_rn),
+ cCE(cfnegs, e300440, 2, (RMF, RMF), rd_rn),
+ cCE(cfnegd, e300460, 2, (RMD, RMD), rd_rn),
+ cCE(cfadds, e300480, 3, (RMF, RMF, RMF), rd_rn_rm),
+ cCE(cfaddd, e3004a0, 3, (RMD, RMD, RMD), rd_rn_rm),
+ cCE(cfsubs, e3004c0, 3, (RMF, RMF, RMF), rd_rn_rm),
+ cCE(cfsubd, e3004e0, 3, (RMD, RMD, RMD), rd_rn_rm),
+ cCE(cfmuls, e100400, 3, (RMF, RMF, RMF), rd_rn_rm),
+ cCE(cfmuld, e100420, 3, (RMD, RMD, RMD), rd_rn_rm),
+ cCE(cfabs32, e300500, 2, (RMFX, RMFX), rd_rn),
+ cCE(cfabs64, e300520, 2, (RMDX, RMDX), rd_rn),
+ cCE(cfneg32, e300540, 2, (RMFX, RMFX), rd_rn),
+ cCE(cfneg64, e300560, 2, (RMDX, RMDX), rd_rn),
+ cCE(cfadd32, e300580, 3, (RMFX, RMFX, RMFX), rd_rn_rm),
+ cCE(cfadd64, e3005a0, 3, (RMDX, RMDX, RMDX), rd_rn_rm),
+ cCE(cfsub32, e3005c0, 3, (RMFX, RMFX, RMFX), rd_rn_rm),
+ cCE(cfsub64, e3005e0, 3, (RMDX, RMDX, RMDX), rd_rn_rm),
+ cCE(cfmul32, e100500, 3, (RMFX, RMFX, RMFX), rd_rn_rm),
+ cCE(cfmul64, e100520, 3, (RMDX, RMDX, RMDX), rd_rn_rm),
+ cCE(cfmac32, e100540, 3, (RMFX, RMFX, RMFX), rd_rn_rm),
+ cCE(cfmsc32, e100560, 3, (RMFX, RMFX, RMFX), rd_rn_rm),
+ cCE(cfmadd32, e000600, 4, (RMAX, RMFX, RMFX, RMFX), mav_quad),
+ cCE(cfmsub32, e100600, 4, (RMAX, RMFX, RMFX, RMFX), mav_quad),
+ cCE(cfmadda32, e200600, 4, (RMAX, RMAX, RMFX, RMFX), mav_quad),
+ cCE(cfmsuba32, e300600, 4, (RMAX, RMAX, RMFX, RMFX), mav_quad),
+};
+#undef ARM_VARIANT
+#undef THUMB_VARIANT
+#undef TCE
+#undef TCM
+#undef TUE
+#undef TUF
+#undef TCC
+#undef cCE
+#undef cCL
+#undef C3E
+#undef CE
+#undef CM
+#undef UE
+#undef UF
+#undef UT
+#undef OPS0
+#undef OPS1
+#undef OPS2
+#undef OPS3
+#undef OPS4
+#undef OPS5
+#undef OPS6
+#undef do_0
+
+/* MD interface: bits in the object file. */
-static void
-do_mav_quad_6a (str)
- char * str;
-{
- do_mav_quad (str, MAV_MODE6, REG_TYPE_MVAX, REG_TYPE_MVFX, REG_TYPE_MVFX,
- REG_TYPE_MVFX);
-}
+/* 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). */
-static void
-do_mav_quad_6b (str)
- char * str;
+void
+md_number_to_chars (char * buf, valueT val, int n)
{
- do_mav_quad (str, MAV_MODE6, REG_TYPE_MVAX, REG_TYPE_MVAX, REG_TYPE_MVFX,
- REG_TYPE_MVFX);
+ if (target_big_endian)
+ number_to_chars_bigendian (buf, val, n);
+ else
+ number_to_chars_littleendian (buf, val, n);
}
-/* cfmvsc32<cond> DSPSC,MVDX[15:0]. */
-static void
-do_mav_dspsc_1 (str)
- char * str;
+static valueT
+md_chars_to_number (char * buf, int n)
{
- skip_whitespace (str);
+ valueT result = 0;
+ unsigned char * where = (unsigned char *) buf;
- /* cfmvsc32. */
- if (mav_reg_required_here (&str, -1, REG_TYPE_DSPSC) == FAIL
- || skip_past_comma (&str) == FAIL
- || mav_reg_required_here (&str, 12, REG_TYPE_MVDX) == FAIL)
+ if (target_big_endian)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
-
- return;
+ while (n--)
+ {
+ result <<= 8;
+ result |= (*where++ & 255);
+ }
}
-
- end_of_line (str);
-}
-
-/* cfmv32sc<cond> MVDX[15:0],DSPSC. */
-static void
-do_mav_dspsc_2 (str)
- char * str;
-{
- skip_whitespace (str);
-
- /* cfmv32sc. */
- if (mav_reg_required_here (&str, 12, REG_TYPE_MVDX) == FAIL
- || skip_past_comma (&str) == FAIL
- || mav_reg_required_here (&str, -1, REG_TYPE_DSPSC) == FAIL)
+ else
{
- if (!inst.error)
- inst.error = BAD_ARGS;
-
- return;
+ while (n--)
+ {
+ result <<= 8;
+ result |= (where[n] & 255);
+ }
}
- end_of_line (str);
-}
-
-static void
-do_mav_shift_1 (str)
- char * str;
-{
- do_mav_shift (str, REG_TYPE_MVFX, REG_TYPE_MVFX);
-}
-
-static void
-do_mav_shift_2 (str)
- char * str;
-{
- do_mav_shift (str, REG_TYPE_MVDX, REG_TYPE_MVDX);
-}
-
-static void
-do_mav_ldst_1 (str)
- char * str;
-{
- do_mav_ldst (str, REG_TYPE_MVF);
+ return result;
}
-static void
-do_mav_ldst_2 (str)
- char * str;
-{
- do_mav_ldst (str, REG_TYPE_MVD);
-}
+/* MD interface: Sections. */
-static void
-do_mav_ldst_3 (str)
- char * str;
-{
- do_mav_ldst (str, REG_TYPE_MVFX);
-}
+/* Estimate the size of a frag before relaxing. Assume everything fits in
+ 2 bytes. */
-static void
-do_mav_ldst_4 (str)
- char * str;
+int
+md_estimate_size_before_relax (fragS * fragp,
+ segT segtype ATTRIBUTE_UNUSED)
{
- do_mav_ldst (str, REG_TYPE_MVDX);
+ fragp->fr_var = 2;
+ return 2;
}
-/* Isnsn like "foo X,Y". */
+/* Convert a machine dependent frag. */
-static void
-do_mav_binops (str, mode, reg0, reg1)
- char * str;
- int mode;
- enum arm_reg_type reg0;
- enum arm_reg_type reg1;
+void
+md_convert_frag (bfd *abfd, segT asec ATTRIBUTE_UNUSED, fragS *fragp)
{
- int shift0, shift1;
-
- shift0 = mode & 0xff;
- shift1 = (mode >> 8) & 0xff;
-
- skip_whitespace (str);
+ unsigned long insn;
+ unsigned long old_op;
+ char *buf;
+ expressionS exp;
+ fixS *fixp;
+ int reloc_type;
+ int pc_rel;
+ int opcode;
+
+ buf = fragp->fr_literal + fragp->fr_fix;
+
+ old_op = bfd_get_16(abfd, buf);
+ if (fragp->fr_symbol) {
+ exp.X_op = O_symbol;
+ exp.X_add_symbol = fragp->fr_symbol;
+ } else {
+ exp.X_op = O_constant;
+ }
+ exp.X_add_number = fragp->fr_offset;
+ opcode = fragp->fr_subtype;
+ switch (opcode)
+ {
+ case T_MNEM_ldr_pc:
+ case T_MNEM_ldr_pc2:
+ case T_MNEM_ldr_sp:
+ case T_MNEM_str_sp:
+ case T_MNEM_ldr:
+ case T_MNEM_ldrb:
+ case T_MNEM_ldrh:
+ case T_MNEM_str:
+ case T_MNEM_strb:
+ case T_MNEM_strh:
+ if (fragp->fr_var == 4)
+ {
+ insn = THUMB_OP32(opcode);
+ if ((old_op >> 12) == 4 || (old_op >> 12) == 9)
+ {
+ insn |= (old_op & 0x700) << 4;
+ }
+ else
+ {
+ insn |= (old_op & 7) << 12;
+ insn |= (old_op & 0x38) << 13;
+ }
+ insn |= 0x00000c00;
+ put_thumb32_insn (buf, insn);
+ reloc_type = BFD_RELOC_ARM_T32_OFFSET_IMM;
+ }
+ else
+ {
+ reloc_type = BFD_RELOC_ARM_THUMB_OFFSET;
+ }
+ pc_rel = (opcode == T_MNEM_ldr_pc2);
+ break;
+ case T_MNEM_adr:
+ if (fragp->fr_var == 4)
+ {
+ insn = THUMB_OP32 (opcode);
+ insn |= (old_op & 0xf0) << 4;
+ put_thumb32_insn (buf, insn);
+ reloc_type = BFD_RELOC_ARM_T32_ADD_PC12;
+ }
+ else
+ {
+ reloc_type = BFD_RELOC_ARM_THUMB_ADD;
+ exp.X_add_number -= 4;
+ }
+ pc_rel = 1;
+ break;
+ case T_MNEM_mov:
+ case T_MNEM_movs:
+ case T_MNEM_cmp:
+ case T_MNEM_cmn:
+ if (fragp->fr_var == 4)
+ {
+ int r0off = (opcode == T_MNEM_mov
+ || opcode == T_MNEM_movs) ? 0 : 8;
+ insn = THUMB_OP32 (opcode);
+ insn = (insn & 0xe1ffffff) | 0x10000000;
+ insn |= (old_op & 0x700) << r0off;
+ put_thumb32_insn (buf, insn);
+ reloc_type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ }
+ else
+ {
+ reloc_type = BFD_RELOC_ARM_THUMB_IMM;
+ }
+ pc_rel = 0;
+ break;
+ case T_MNEM_b:
+ if (fragp->fr_var == 4)
+ {
+ insn = THUMB_OP32(opcode);
+ put_thumb32_insn (buf, insn);
+ reloc_type = BFD_RELOC_THUMB_PCREL_BRANCH25;
+ }
+ else
+ reloc_type = BFD_RELOC_THUMB_PCREL_BRANCH12;
+ pc_rel = 1;
+ break;
+ case T_MNEM_bcond:
+ if (fragp->fr_var == 4)
+ {
+ insn = THUMB_OP32(opcode);
+ insn |= (old_op & 0xf00) << 14;
+ put_thumb32_insn (buf, insn);
+ reloc_type = BFD_RELOC_THUMB_PCREL_BRANCH20;
+ }
+ else
+ reloc_type = BFD_RELOC_THUMB_PCREL_BRANCH9;
+ pc_rel = 1;
+ break;
+ case T_MNEM_add_sp:
+ case T_MNEM_add_pc:
+ case T_MNEM_inc_sp:
+ case T_MNEM_dec_sp:
+ if (fragp->fr_var == 4)
+ {
+ /* ??? Choose between add and addw. */
+ insn = THUMB_OP32 (opcode);
+ insn |= (old_op & 0xf0) << 4;
+ put_thumb32_insn (buf, insn);
+ reloc_type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ }
+ else
+ reloc_type = BFD_RELOC_ARM_THUMB_ADD;
+ pc_rel = 0;
+ break;
- if (mav_reg_required_here (&str, shift0, reg0) == FAIL
- || skip_past_comma (&str) == FAIL
- || mav_reg_required_here (&str, shift1, reg1) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
+ case T_MNEM_addi:
+ case T_MNEM_addis:
+ case T_MNEM_subi:
+ case T_MNEM_subis:
+ if (fragp->fr_var == 4)
+ {
+ insn = THUMB_OP32 (opcode);
+ insn |= (old_op & 0xf0) << 4;
+ insn |= (old_op & 0xf) << 16;
+ put_thumb32_insn (buf, insn);
+ reloc_type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ }
+ else
+ reloc_type = BFD_RELOC_ARM_THUMB_ADD;
+ pc_rel = 0;
+ break;
+ default:
+ abort();
}
- else
- end_of_line (str);
+ fixp = fix_new_exp (fragp, fragp->fr_fix, fragp->fr_var, &exp, pc_rel,
+ reloc_type);
+ fixp->fx_file = fragp->fr_file;
+ fixp->fx_line = fragp->fr_line;
+ fragp->fr_fix += fragp->fr_var;
}
-/* Isnsn like "foo X,Y,Z". */
-
-static void
-do_mav_triple (str, mode, reg0, reg1, reg2)
- char * str;
- int mode;
- enum arm_reg_type reg0;
- enum arm_reg_type reg1;
- enum arm_reg_type reg2;
+/* Return the size of a relaxable immediate operand instruction.
+ SHIFT and SIZE specify the form of the allowable immediate. */
+static int
+relax_immediate (fragS *fragp, int size, int shift)
{
- int shift0, shift1, shift2;
+ offsetT offset;
+ offsetT mask;
+ offsetT low;
- shift0 = mode & 0xff;
- shift1 = (mode >> 8) & 0xff;
- shift2 = (mode >> 16) & 0xff;
+ /* ??? Should be able to do better than this. */
+ if (fragp->fr_symbol)
+ return 4;
- skip_whitespace (str);
-
- if (mav_reg_required_here (&str, shift0, reg0) == FAIL
- || skip_past_comma (&str) == FAIL
- || mav_reg_required_here (&str, shift1, reg1) == FAIL
- || skip_past_comma (&str) == FAIL
- || mav_reg_required_here (&str, shift2, reg2) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- }
- else
- end_of_line (str);
+ low = (1 << shift) - 1;
+ mask = (1 << (shift + size)) - (1 << shift);
+ offset = fragp->fr_offset;
+ /* Force misaligned offsets to 32-bit variant. */
+ if (offset & low)
+ return -4;
+ if (offset & ~mask)
+ return 4;
+ return 2;
}
-/* Isnsn like "foo W,X,Y,Z".
- where W=MVAX[0:3] and X,Y,Z=MVFX[0:15]. */
-
-static void
-do_mav_quad (str, mode, reg0, reg1, reg2, reg3)
- char * str;
- int mode;
- enum arm_reg_type reg0;
- enum arm_reg_type reg1;
- enum arm_reg_type reg2;
- enum arm_reg_type reg3;
+/* Return the size of a relaxable adr pseudo-instruction or PC-relative
+ load. */
+static int
+relax_adr (fragS *fragp, asection *sec)
+{
+ addressT addr;
+ offsetT val;
+
+ /* Assume worst case for symbols not known to be in the same section. */
+ if (!S_IS_DEFINED(fragp->fr_symbol)
+ || sec != S_GET_SEGMENT (fragp->fr_symbol))
+ return 4;
+
+ val = S_GET_VALUE(fragp->fr_symbol) + fragp->fr_offset;
+ 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. */
+ if (val & 3)
+ return -4;
+ val -= addr;
+ if (val < 0 || val > 1020)
+ return 4;
+ return 2;
+}
+
+/* Return the size of a relaxable add/sub immediate instruction. */
+static int
+relax_addsub (fragS *fragp, asection *sec)
{
- int shift0, shift1, shift2, shift3;
+ char *buf;
+ int op;
- shift0= mode & 0xff;
- shift1 = (mode >> 8) & 0xff;
- shift2 = (mode >> 16) & 0xff;
- shift3 = (mode >> 24) & 0xff;
-
- skip_whitespace (str);
-
- if (mav_reg_required_here (&str, shift0, reg0) == FAIL
- || skip_past_comma (&str) == FAIL
- || mav_reg_required_here (&str, shift1, reg1) == FAIL
- || skip_past_comma (&str) == FAIL
- || mav_reg_required_here (&str, shift2, reg2) == FAIL
- || skip_past_comma (&str) == FAIL
- || mav_reg_required_here (&str, shift3, reg3) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- }
+ buf = fragp->fr_literal + fragp->fr_fix;
+ op = bfd_get_16(sec->owner, buf);
+ if ((op & 0xf) == ((op >> 4) & 0xf))
+ return relax_immediate (fragp, 8, 0);
else
- end_of_line (str);
+ return relax_immediate (fragp, 3, 0);
}
-/* Maverick shift immediate instructions.
- cfsh32<cond> MVFX[15:0],MVFX[15:0],Shift[6:0].
- cfsh64<cond> MVDX[15:0],MVDX[15:0],Shift[6:0]. */
-
-static void
-do_mav_shift (str, reg0, reg1)
- char * str;
- enum arm_reg_type reg0;
- enum arm_reg_type reg1;
-{
- int error;
- int imm, neg = 0;
-
- skip_whitespace (str);
-
- error = 0;
-
- if (mav_reg_required_here (&str, 12, reg0) == FAIL
- || skip_past_comma (&str) == FAIL
- || mav_reg_required_here (&str, 16, reg1) == FAIL
- || skip_past_comma (&str) == FAIL)
- {
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- /* Calculate the immediate operand.
- The operand is a 7bit signed number. */
- skip_whitespace (str);
-
- if (*str == '#')
- ++str;
-
- if (!ISDIGIT (*str) && *str != '-')
- {
- inst.error = _("expecting immediate, 7bit operand");
- return;
- }
- if (*str == '-')
- {
- neg = 1;
- ++str;
- }
+/* Return the size of a relaxable branch instruction. BITS is the
+ size of the offset field in the narrow instruction. */
- for (imm = 0; *str && ISDIGIT (*str); ++str)
- imm = imm * 10 + *str - '0';
+static int
+relax_branch (fragS *fragp, asection *sec, int bits)
+{
+ addressT addr;
+ offsetT val;
+ offsetT limit;
- if (imm > 64)
- {
- inst.error = _("immediate out of range");
- return;
- }
+ /* Assume worst case for symbols not known to be in the same section. */
+ if (!S_IS_DEFINED(fragp->fr_symbol)
+ || sec != S_GET_SEGMENT (fragp->fr_symbol))
+ return 4;
- /* Make negative imm's into 7bit signed numbers. */
- if (neg)
- {
- imm = -imm;
- imm &= 0x0000007f;
- }
+ val = S_GET_VALUE(fragp->fr_symbol) + fragp->fr_offset;
+ addr = fragp->fr_address + fragp->fr_fix + 4;
+ val -= addr;
- /* Bits 0-3 of the insn should have bits 0-3 of the immediate.
- Bits 5-7 of the insn should have bits 4-6 of the immediate.
- Bit 4 should be 0. */
- imm = (imm & 0xf) | ((imm & 0x70) << 1);
-
- inst.instruction |= imm;
- end_of_line (str);
+ /* Offset is a signed value *2 */
+ limit = 1 << bits;
+ if (val >= limit || val < -limit)
+ return 4;
+ return 2;
}
-static int
-mav_parse_offset (str, negative)
- char ** str;
- int *negative;
-{
- char * p = *str;
- int offset;
-
- *negative = 0;
-
- skip_whitespace (p);
- if (*p == '#')
- ++p;
+/* Relax a machine dependent frag. This returns the amount by which
+ the current size of the frag should change. */
- if (*p == '-')
- {
- *negative = 1;
- ++p;
- }
+int
+arm_relax_frag (asection *sec, fragS *fragp, long stretch ATTRIBUTE_UNUSED)
+{
+ int oldsize;
+ int newsize;
- if (!ISDIGIT (*p))
+ oldsize = fragp->fr_var;
+ switch (fragp->fr_subtype)
{
- inst.error = _("offset expected");
- return 0;
+ case T_MNEM_ldr_pc2:
+ newsize = relax_adr(fragp, sec);
+ break;
+ case T_MNEM_ldr_pc:
+ case T_MNEM_ldr_sp:
+ case T_MNEM_str_sp:
+ newsize = relax_immediate(fragp, 8, 2);
+ break;
+ case T_MNEM_ldr:
+ case T_MNEM_str:
+ newsize = relax_immediate(fragp, 5, 2);
+ break;
+ case T_MNEM_ldrh:
+ case T_MNEM_strh:
+ newsize = relax_immediate(fragp, 5, 1);
+ break;
+ case T_MNEM_ldrb:
+ case T_MNEM_strb:
+ newsize = relax_immediate(fragp, 5, 0);
+ break;
+ case T_MNEM_adr:
+ newsize = relax_adr(fragp, sec);
+ break;
+ case T_MNEM_mov:
+ case T_MNEM_movs:
+ case T_MNEM_cmp:
+ case T_MNEM_cmn:
+ newsize = relax_immediate(fragp, 8, 0);
+ break;
+ case T_MNEM_b:
+ newsize = relax_branch(fragp, sec, 11);
+ break;
+ case T_MNEM_bcond:
+ newsize = relax_branch(fragp, sec, 8);
+ break;
+ case T_MNEM_add_sp:
+ case T_MNEM_add_pc:
+ newsize = relax_immediate (fragp, 8, 2);
+ break;
+ case T_MNEM_inc_sp:
+ case T_MNEM_dec_sp:
+ newsize = relax_immediate (fragp, 7, 2);
+ break;
+ case T_MNEM_addi:
+ case T_MNEM_addis:
+ case T_MNEM_subi:
+ case T_MNEM_subis:
+ newsize = relax_addsub (fragp, sec);
+ break;
+ default:
+ abort();
}
-
- for (offset = 0; *p && ISDIGIT (*p); ++p)
- offset = offset * 10 + *p - '0';
-
- if (offset > 0xff)
+ if (newsize < 0)
{
- inst.error = _("offset out of range");
- return 0;
+ fragp->fr_var = -newsize;
+ md_convert_frag (sec->owner, sec, fragp);
+ frag_wane(fragp);
+ return -(newsize + oldsize);
}
-
- *str = p;
-
- return *negative ? -offset : offset;
+ fragp->fr_var = newsize;
+ return newsize - oldsize;
}
-/* Maverick load/store instructions.
- <insn><cond> CRd,[Rn,<offset>]{!}.
- <insn><cond> CRd,[Rn],<offset>. */
+/* Round up a section size to the appropriate boundary. */
-static void
-do_mav_ldst (str, reg0)
- char * str;
- enum arm_reg_type reg0;
+valueT
+md_section_align (segT segment ATTRIBUTE_UNUSED,
+ valueT size)
{
- int offset, negative;
+#ifdef OBJ_ELF
+ return size;
+#else
+ /* Round all sects to multiple of 4. */
+ return (size + 3) & ~3;
+#endif
+}
- skip_whitespace (str);
+/* This is called from HANDLE_ALIGN in write.c. Fill in the contents
+ of an rs_align_code fragment. */
- if (mav_reg_required_here (&str, 12, reg0) == FAIL
- || skip_past_comma (&str) == FAIL
- || *str++ != '['
- || reg_required_here (&str, 16) == FAIL)
- goto fail_ldst;
+void
+arm_handle_align (fragS * fragP)
+{
+ static char const arm_noop[4] = { 0x00, 0x00, 0xa0, 0xe1 };
+ static char const thumb_noop[2] = { 0xc0, 0x46 };
+ static char const arm_bigend_noop[4] = { 0xe1, 0xa0, 0x00, 0x00 };
+ static char const thumb_bigend_noop[2] = { 0x46, 0xc0 };
- if (skip_past_comma (&str) == SUCCESS)
- {
- /* You are here: "<offset>]{!}". */
- inst.instruction |= PRE_INDEX;
+ int bytes, fix, noop_size;
+ char * p;
+ const char * noop;
- offset = mav_parse_offset (&str, &negative);
+ if (fragP->fr_type != rs_align_code)
+ return;
- if (inst.error)
- return;
+ bytes = fragP->fr_next->fr_address - fragP->fr_address - fragP->fr_fix;
+ p = fragP->fr_literal + fragP->fr_fix;
+ fix = 0;
- if (*str++ != ']')
- {
- inst.error = _("missing ]");
- return;
- }
+ if (bytes > MAX_MEM_FOR_RS_ALIGN_CODE)
+ bytes &= MAX_MEM_FOR_RS_ALIGN_CODE;
- if (*str == '!')
- {
- inst.instruction |= WRITE_BACK;
- ++str;
- }
+ if (fragP->tc_frag_data)
+ {
+ if (target_big_endian)
+ noop = thumb_bigend_noop;
+ else
+ noop = thumb_noop;
+ noop_size = sizeof (thumb_noop);
}
else
{
- /* You are here: "], <offset>". */
- if (*str++ != ']')
- {
- inst.error = _("missing ]");
- return;
- }
-
- if (skip_past_comma (&str) == FAIL
- || (offset = mav_parse_offset (&str, &negative), inst.error))
- goto fail_ldst;
-
- inst.instruction |= CP_T_WB; /* Post indexed, set bit W. */
+ if (target_big_endian)
+ noop = arm_bigend_noop;
+ else
+ noop = arm_noop;
+ noop_size = sizeof (arm_noop);
}
- if (negative)
- offset = -offset;
- else
- inst.instruction |= CP_T_UD; /* Positive, so set bit U. */
-
- inst.instruction |= offset >> 2;
- end_of_line (str);
- return;
-
-fail_ldst:
- if (!inst.error)
- inst.error = BAD_ARGS;
-}
-
-static void
-do_t_nop (str)
- char * str;
-{
- /* Do nothing. */
- end_of_line (str);
-}
-
-/* Handle the Format 4 instructions that do not have equivalents in other
- formats. That is, ADC, AND, EOR, SBC, ROR, TST, NEG, CMN, ORR, MUL,
- BIC and MVN. */
-
-static void
-do_t_arit (str)
- char * str;
-{
- int Rd, Rs, Rn;
-
- skip_whitespace (str);
-
- if ((Rd = thumb_reg (&str, THUMB_REG_LO)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
+ if (bytes & (noop_size - 1))
{
- inst.error = BAD_ARGS;
- return;
+ fix = bytes & (noop_size - 1);
+ memset (p, 0, fix);
+ p += fix;
+ bytes -= fix;
}
- if (skip_past_comma (&str) != FAIL)
+ while (bytes >= noop_size)
{
- /* Three operand format not allowed for TST, CMN, NEG and MVN.
- (It isn't allowed for CMP either, but that isn't handled by this
- function.) */
- if (inst.instruction == T_OPCODE_TST
- || inst.instruction == T_OPCODE_CMN
- || inst.instruction == T_OPCODE_NEG
- || inst.instruction == T_OPCODE_MVN)
- {
- inst.error = BAD_ARGS;
- return;
- }
-
- if ((Rn = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
- return;
-
- if (Rs != Rd)
- {
- inst.error = _("dest and source1 must be the same register");
- return;
- }
- Rs = Rn;
+ memcpy (p, noop, noop_size);
+ p += noop_size;
+ bytes -= noop_size;
+ fix += noop_size;
}
- if (inst.instruction == T_OPCODE_MUL
- && Rs == Rd)
- as_tsktsk (_("Rs and Rd must be different in MUL"));
-
- inst.instruction |= Rd | (Rs << 3);
- end_of_line (str);
+ fragP->fr_fix += fix;
+ fragP->fr_var = noop_size;
}
-static void
-do_t_add (str)
- char * str;
-{
- thumb_add_sub (str, 0);
-}
+/* Called from md_do_align. Used to create an alignment
+ frag in a code section. */
-static void
-do_t_asr (str)
- char * str;
+void
+arm_frag_align_code (int n, int max)
{
- thumb_shift (str, THUMB_ASR);
-}
+ char * p;
-static void
-do_t_branch9 (str)
- char * str;
-{
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH9;
- inst.reloc.pc_rel = 1;
- end_of_line (str);
-}
+ /* We assume that there will never be a requirement
+ to support alignments greater than 32 bytes. */
+ if (max > MAX_MEM_FOR_RS_ALIGN_CODE)
+ as_fatal (_("alignments greater than 32 bytes not supported in .text sections."));
-static void
-do_t_branch12 (str)
- char * str;
-{
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH12;
- inst.reloc.pc_rel = 1;
- end_of_line (str);
+ p = frag_var (rs_align_code,
+ MAX_MEM_FOR_RS_ALIGN_CODE,
+ 1,
+ (relax_substateT) max,
+ (symbolS *) NULL,
+ (offsetT) n,
+ (char *) NULL);
+ *p = 0;
}
-/* Find the real, Thumb encoded start of a Thumb function. */
+/* Perform target specific initialisation of a frag. */
-static symbolS *
-find_real_start (symbolP)
- symbolS * symbolP;
+void
+arm_init_frag (fragS * fragP)
{
- char * real_start;
- const char * name = S_GET_NAME (symbolP);
- symbolS * new_target;
-
- /* This definition must agree with the one in gcc/config/arm/thumb.c. */
-#define STUB_NAME ".real_start_of"
-
- if (name == NULL)
- abort ();
-
- /* Names that start with '.' are local labels, not function entry points.
- The compiler may generate BL instructions to these labels because it
- needs to perform a branch to a far away location. */
- if (name[0] == '.')
- return symbolP;
-
- real_start = malloc (strlen (name) + strlen (STUB_NAME) + 1);
- sprintf (real_start, "%s%s", STUB_NAME, name);
-
- new_target = symbol_find (real_start);
-
- if (new_target == NULL)
- {
- as_warn ("Failed to find real start of function: %s\n", name);
- new_target = symbolP;
- }
-
- free (real_start);
-
- return new_target;
+ /* Record whether this frag is in an ARM or a THUMB area. */
+ fragP->tc_frag_data = thumb_mode;
}
-static void
-do_t_branch23 (str)
- char * str;
-{
- if (my_get_expression (& inst.reloc.exp, & str))
- return;
-
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH23;
- inst.reloc.pc_rel = 1;
- end_of_line (str);
-
- /* If the destination of the branch is a defined symbol which does not have
- the THUMB_FUNC attribute, then we must be calling a function which has
- the (interfacearm) attribute. We look for the Thumb entry point to that
- function and change the branch to refer to that function instead. */
- if ( inst.reloc.exp.X_op == O_symbol
- && inst.reloc.exp.X_add_symbol != NULL
- && S_IS_DEFINED (inst.reloc.exp.X_add_symbol)
- && ! THUMB_IS_FUNC (inst.reloc.exp.X_add_symbol))
- inst.reloc.exp.X_add_symbol =
- find_real_start (inst.reloc.exp.X_add_symbol);
-}
+#ifdef OBJ_ELF
+/* When we change sections we need to issue a new mapping symbol. */
-static void
-do_t_bx (str)
- char * str;
+void
+arm_elf_change_section (void)
{
- int reg;
+ flagword flags;
+ segment_info_type *seginfo;
- skip_whitespace (str);
+ /* Link an unlinked unwind index table section to the .text section. */
+ if (elf_section_type (now_seg) == SHT_ARM_EXIDX
+ && elf_linked_to_section (now_seg) == NULL)
+ elf_linked_to_section (now_seg) = text_section;
- if ((reg = thumb_reg (&str, THUMB_REG_ANY)) == FAIL)
+ if (!SEG_NORMAL (now_seg))
return;
- /* This sets THUMB_H2 from the top bit of reg. */
- inst.instruction |= reg << 3;
+ flags = bfd_get_section_flags (stdoutput, now_seg);
- /* ??? FIXME: Should add a hacky reloc here if reg is REG_PC. The reloc
- should cause the alignment to be checked once it is known. This is
- because BX PC only works if the instruction is word aligned. */
+ /* We can ignore sections that only contain debug info. */
+ if ((flags & SEC_ALLOC) == 0)
+ return;
- end_of_line (str);
+ seginfo = seg_info (now_seg);
+ mapstate = seginfo->tc_segment_info_data.mapstate;
+ marked_pr_dependency = seginfo->tc_segment_info_data.marked_pr_dependency;
}
-static void
-do_t_compare (str)
- char * str;
-{
- thumb_mov_compare (str, THUMB_COMPARE);
-}
-
-static void
-do_t_ldmstm (str)
- char * str;
+int
+arm_elf_section_type (const char * str, size_t len)
{
- int Rb;
- long range;
-
- skip_whitespace (str);
-
- if ((Rb = thumb_reg (&str, THUMB_REG_LO)) == FAIL)
- return;
+ if (len == 5 && strncmp (str, "exidx", 5) == 0)
+ return SHT_ARM_EXIDX;
- if (*str != '!')
- as_warn (_("inserted missing '!': load/store multiple always writes back base register"));
- else
- str++;
-
- if (skip_past_comma (&str) == FAIL
- || (range = reg_list (&str)) == FAIL)
- {
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
- }
-
- if (inst.reloc.type != BFD_RELOC_NONE)
- {
- /* This really doesn't seem worth it. */
- inst.reloc.type = BFD_RELOC_NONE;
- inst.error = _("expression too complex");
- return;
- }
+ return -1;
+}
+
+/* Code to deal with unwinding tables. */
- if (range & ~0xff)
- {
- inst.error = _("only lo-regs valid in load/store multiple");
- return;
- }
+static void add_unwind_adjustsp (offsetT);
- inst.instruction |= (Rb << 8) | range;
- end_of_line (str);
-}
+/* Cenerate and deferred unwind frame offset. */
static void
-do_t_ldr (str)
- char * str;
+flush_pending_unwind (void)
{
- thumb_load_store (str, THUMB_LOAD, THUMB_WORD);
-}
+ offsetT offset;
-static void
-do_t_ldrb (str)
- char * str;
-{
- thumb_load_store (str, THUMB_LOAD, THUMB_BYTE);
+ offset = unwind.pending_offset;
+ unwind.pending_offset = 0;
+ if (offset != 0)
+ add_unwind_adjustsp (offset);
}
-static void
-do_t_ldrh (str)
- char * str;
-{
- thumb_load_store (str, THUMB_LOAD, THUMB_HALFWORD);
-}
+/* Add an opcode to this list for this function. Two-byte opcodes should
+ be passed as op[0] << 8 | op[1]. The list of opcodes is built in reverse
+ order. */
static void
-do_t_lds (str)
- char * str;
+add_unwind_opcode (valueT op, int length)
{
- int Rd, Rb, Ro;
+ /* Add any deferred stack adjustment. */
+ if (unwind.pending_offset)
+ flush_pending_unwind ();
- skip_whitespace (str);
+ unwind.sp_restored = 0;
- if ((Rd = thumb_reg (&str, THUMB_REG_LO)) == FAIL
- || skip_past_comma (&str) == FAIL
- || *str++ != '['
- || (Rb = thumb_reg (&str, THUMB_REG_LO)) == FAIL
- || skip_past_comma (&str) == FAIL
- || (Ro = thumb_reg (&str, THUMB_REG_LO)) == FAIL
- || *str++ != ']')
+ if (unwind.opcode_count + length > unwind.opcode_alloc)
{
- if (! inst.error)
- inst.error = _("syntax: ldrs[b] Rd, [Rb, Ro]");
- return;
+ unwind.opcode_alloc += ARM_OPCODE_CHUNK_SIZE;
+ if (unwind.opcodes)
+ unwind.opcodes = xrealloc (unwind.opcodes,
+ unwind.opcode_alloc);
+ else
+ unwind.opcodes = xmalloc (unwind.opcode_alloc);
+ }
+ while (length > 0)
+ {
+ length--;
+ unwind.opcodes[unwind.opcode_count] = op & 0xff;
+ op >>= 8;
+ unwind.opcode_count++;
}
-
- inst.instruction |= Rd | (Rb << 3) | (Ro << 6);
- end_of_line (str);
-}
-
-static void
-do_t_lsl (str)
- char * str;
-{
- thumb_shift (str, THUMB_LSL);
}
-static void
-do_t_lsr (str)
- char * str;
-{
- thumb_shift (str, THUMB_LSR);
-}
+/* Add unwind opcodes to adjust the stack pointer. */
static void
-do_t_mov (str)
- char * str;
+add_unwind_adjustsp (offsetT offset)
{
- thumb_mov_compare (str, THUMB_MOVE);
-}
+ valueT op;
-static void
-do_t_push_pop (str)
- char * str;
-{
- long range;
+ if (offset > 0x200)
+ {
+ /* We need at most 5 bytes to hold a 32-bit value in a uleb128. */
+ char bytes[5];
+ int n;
+ valueT o;
- skip_whitespace (str);
+ /* Long form: 0xb2, uleb128. */
+ /* This might not fit in a word so add the individual bytes,
+ remembering the list is built in reverse order. */
+ o = (valueT) ((offset - 0x204) >> 2);
+ if (o == 0)
+ add_unwind_opcode (0, 1);
- if ((range = reg_list (&str)) == FAIL)
+ /* Calculate the uleb128 encoding of the offset. */
+ n = 0;
+ while (o)
+ {
+ bytes[n] = o & 0x7f;
+ o >>= 7;
+ if (o)
+ bytes[n] |= 0x80;
+ n++;
+ }
+ /* Add the insn. */
+ for (; n; n--)
+ add_unwind_opcode (bytes[n - 1], 1);
+ add_unwind_opcode (0xb2, 1);
+ }
+ else if (offset > 0x100)
{
- if (! inst.error)
- inst.error = BAD_ARGS;
- return;
+ /* Two short opcodes. */
+ add_unwind_opcode (0x3f, 1);
+ op = (offset - 0x104) >> 2;
+ add_unwind_opcode (op, 1);
}
-
- if (inst.reloc.type != BFD_RELOC_NONE)
+ else if (offset > 0)
{
- /* This really doesn't seem worth it. */
- inst.reloc.type = BFD_RELOC_NONE;
- inst.error = _("expression too complex");
- return;
+ /* Short opcode. */
+ op = (offset - 4) >> 2;
+ add_unwind_opcode (op, 1);
}
-
- if (range & ~0xff)
+ else if (offset < 0)
{
- if ((inst.instruction == T_OPCODE_PUSH
- && (range & ~0xff) == 1 << REG_LR)
- || (inst.instruction == T_OPCODE_POP
- && (range & ~0xff) == 1 << REG_PC))
- {
- inst.instruction |= THUMB_PP_PC_LR;
- range &= 0xff;
- }
- else
+ offset = -offset;
+ while (offset > 0x100)
{
- inst.error = _("invalid register list to push/pop instruction");
- return;
+ add_unwind_opcode (0x7f, 1);
+ offset -= 0x100;
}
+ op = ((offset - 4) >> 2) | 0x40;
+ add_unwind_opcode (op, 1);
}
-
- inst.instruction |= range;
- end_of_line (str);
}
+/* Finish the list of unwind opcodes for this function. */
static void
-do_t_str (str)
- char * str;
+finish_unwind_opcodes (void)
{
- thumb_load_store (str, THUMB_STORE, THUMB_WORD);
-}
+ valueT op;
-static void
-do_t_strb (str)
- char * str;
-{
- thumb_load_store (str, THUMB_STORE, THUMB_BYTE);
-}
-
-static void
-do_t_strh (str)
- char * str;
-{
- thumb_load_store (str, THUMB_STORE, THUMB_HALFWORD);
-}
+ if (unwind.fp_used)
+ {
+ /* Adjust sp as neccessary. */
+ unwind.pending_offset += unwind.fp_offset - unwind.frame_size;
+ flush_pending_unwind ();
-static void
-do_t_sub (str)
- char * str;
-{
- thumb_add_sub (str, 1);
+ /* After restoring sp from the frame pointer. */
+ op = 0x90 | unwind.fp_reg;
+ add_unwind_opcode (op, 1);
+ }
+ else
+ flush_pending_unwind ();
}
-static void
-do_t_swi (str)
- char * str;
-{
- skip_whitespace (str);
-
- if (my_get_expression (&inst.reloc.exp, &str))
- return;
- inst.reloc.type = BFD_RELOC_ARM_SWI;
- end_of_line (str);
-}
+/* Start an exception table entry. If idx is nonzero this is an index table
+ entry. */
static void
-do_t_adr (str)
- char * str;
+start_unwind_section (const segT text_seg, int idx)
{
- int reg;
-
- /* This is a pseudo-op of the form "adr rd, label" to be converted
- into a relative address of the form "add rd, pc, #label-.-4". */
- skip_whitespace (str);
+ const char * text_name;
+ const char * prefix;
+ const char * prefix_once;
+ const char * group_name;
+ size_t prefix_len;
+ size_t text_len;
+ char * sec_name;
+ size_t sec_name_len;
+ int type;
+ int flags;
+ int linkonce;
- /* Store Rd in temporary location inside instruction. */
- if ((reg = reg_required_here (&str, 4)) == FAIL
- || (reg > 7) /* For Thumb reg must be r0..r7. */
- || skip_past_comma (&str) == FAIL
- || my_get_expression (&inst.reloc.exp, &str))
+ if (idx)
{
- if (!inst.error)
- inst.error = BAD_ARGS;
- return;
+ prefix = ELF_STRING_ARM_unwind;
+ prefix_once = ELF_STRING_ARM_unwind_once;
+ type = SHT_ARM_EXIDX;
+ }
+ else
+ {
+ prefix = ELF_STRING_ARM_unwind_info;
+ prefix_once = ELF_STRING_ARM_unwind_info_once;
+ type = SHT_PROGBITS;
}
- inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD;
- inst.reloc.exp.X_add_number -= 4; /* PC relative adjust. */
- inst.reloc.pc_rel = 1;
- inst.instruction |= REG_PC; /* Rd is already placed into the instruction. */
-
- end_of_line (str);
-}
+ text_name = segment_name (text_seg);
+ if (streq (text_name, ".text"))
+ text_name = "";
-static void
-insert_reg (r, htab)
- const struct reg_entry *r;
- struct hash_control *htab;
-{
- int len = strlen (r->name) + 2;
- char * buf = (char *) xmalloc (len);
- char * buf2 = (char *) xmalloc (len);
- int i = 0;
+ if (strncmp (text_name, ".gnu.linkonce.t.",
+ strlen (".gnu.linkonce.t.")) == 0)
+ {
+ prefix = prefix_once;
+ text_name += strlen (".gnu.linkonce.t.");
+ }
-#ifdef REGISTER_PREFIX
- buf[i++] = REGISTER_PREFIX;
-#endif
+ prefix_len = strlen (prefix);
+ text_len = strlen (text_name);
+ sec_name_len = prefix_len + text_len;
+ sec_name = xmalloc (sec_name_len + 1);
+ memcpy (sec_name, prefix, prefix_len);
+ memcpy (sec_name + prefix_len, text_name, text_len);
+ sec_name[prefix_len + text_len] = '\0';
- strcpy (buf + i, r->name);
+ flags = SHF_ALLOC;
+ linkonce = 0;
+ group_name = 0;
- for (i = 0; buf[i]; i++)
- buf2[i] = TOUPPER (buf[i]);
+ /* Handle COMDAT group. */
+ if (prefix != prefix_once && (text_seg->flags & SEC_LINK_ONCE) != 0)
+ {
+ group_name = elf_group_name (text_seg);
+ if (group_name == NULL)
+ {
+ as_bad ("Group section `%s' has no group signature",
+ segment_name (text_seg));
+ ignore_rest_of_line ();
+ return;
+ }
+ flags |= SHF_GROUP;
+ linkonce = 1;
+ }
- buf2[i] = '\0';
+ obj_elf_change_section (sec_name, type, flags, 0, group_name, linkonce, 0);
- hash_insert (htab, buf, (PTR) r);
- hash_insert (htab, buf2, (PTR) r);
+ /* Set the setion link for index tables. */
+ if (idx)
+ elf_linked_to_section (now_seg) = text_seg;
}
-static void
-build_reg_hsh (map)
- struct reg_map *map;
-{
- const struct reg_entry *r;
- if ((map->htab = hash_new ()) == NULL)
- as_fatal (_("virtual memory exhausted"));
-
- for (r = map->names; r->name != NULL; r++)
- insert_reg (r, map->htab);
-}
+/* Start an unwind table entry. HAVE_DATA is nonzero if we have additional
+ personality routine data. Returns zero, or the index table value for
+ and inline entry. */
-static void
-insert_reg_alias (str, regnum, htab)
- char *str;
- int regnum;
- struct hash_control *htab;
+static valueT
+create_unwind_entry (int have_data)
{
- const char *error;
- struct reg_entry *new = xmalloc (sizeof (struct reg_entry));
- const char *name = xmalloc (strlen (str) + 1);
-
- strcpy ((char *) name, str);
-
- new->name = name;
- new->number = regnum;
- new->builtin = FALSE;
-
- error = hash_insert (htab, name, (PTR) new);
- if (error)
- {
- as_bad (_("failed to create an alias for %s, reason: %s"),
- str, error);
- free ((char *) name);
- free (new);
- }
-}
+ int size;
+ addressT where;
+ char *ptr;
+ /* The current word of data. */
+ valueT data;
+ /* The number of bytes left in this word. */
+ int n;
-/* Look for the .req directive. This is of the form:
+ finish_unwind_opcodes ();
- new_register_name .req existing_register_name
+ /* Remember the current text section. */
+ unwind.saved_seg = now_seg;
+ unwind.saved_subseg = now_subseg;
- If we find one, or if it looks sufficiently like one that we want to
- handle any error here, return non-zero. Otherwise return zero. */
-static int
-create_register_alias (newname, p)
- char *newname;
- char *p;
-{
- char *q;
- char c;
+ start_unwind_section (now_seg, 0);
- q = p;
- skip_whitespace (q);
-
- c = *p;
- *p = '\0';
-
- if (*q && !strncmp (q, ".req ", 5))
+ if (unwind.personality_routine == NULL)
{
- char *copy_of_str;
- char *r;
-
-#ifdef IGNORE_OPCODE_CASE
- newname = original_case_string;
-#endif
- copy_of_str = newname;
-
- q += 4;
- skip_whitespace (q);
-
- for (r = q; *r != '\0'; r++)
- if (*r == ' ')
- break;
-
- if (r != q)
+ if (unwind.personality_index == -2)
{
- enum arm_reg_type new_type, old_type;
- int old_regno;
- char d = *r;
+ if (have_data)
+ as_bad (_("handerdata in cantunwind frame"));
+ return 1; /* EXIDX_CANTUNWIND. */
+ }
- *r = '\0';
- old_type = arm_reg_parse_any (q);
- *r = d;
+ /* Use a default personality routine if none is specified. */
+ if (unwind.personality_index == -1)
+ {
+ if (unwind.opcode_count > 3)
+ unwind.personality_index = 1;
+ else
+ unwind.personality_index = 0;
+ }
- new_type = arm_reg_parse_any (newname);
+ /* Space for the personality routine entry. */
+ if (unwind.personality_index == 0)
+ {
+ if (unwind.opcode_count > 3)
+ as_bad (_("too many unwind opcodes for personality routine 0"));
- if (new_type == REG_TYPE_MAX)
+ if (!have_data)
{
- if (old_type != REG_TYPE_MAX)
+ /* All the data is inline in the index table. */
+ data = 0x80;
+ n = 3;
+ while (unwind.opcode_count > 0)
{
- old_regno = arm_reg_parse (&q, all_reg_maps[old_type].htab);
- insert_reg_alias (newname, old_regno,
- all_reg_maps[old_type].htab);
+ unwind.opcode_count--;
+ data = (data << 8) | unwind.opcodes[unwind.opcode_count];
+ n--;
}
- else
- as_warn (_("register '%s' does not exist\n"), q);
- }
- else if (old_type == REG_TYPE_MAX)
- {
- as_warn (_("ignoring redefinition of register alias '%s' to non-existant register '%s'"),
- copy_of_str, q);
- }
- else
- {
- /* Do not warn about redefinitions to the same alias. */
- if (new_type != old_type
- || (arm_reg_parse (&q, all_reg_maps[old_type].htab)
- != arm_reg_parse (&q, all_reg_maps[new_type].htab)))
- as_warn (_("ignoring redefinition of register alias '%s'"),
- copy_of_str);
+ /* Pad with "finish" opcodes. */
+ while (n--)
+ data = (data << 8) | 0xb0;
+
+ return data;
}
+ size = 0;
}
else
- as_warn (_("ignoring incomplete .req pseuso op"));
-
- *p = c;
- return 1;
+ /* We get two opcodes "free" in the first word. */
+ size = unwind.opcode_count - 2;
}
-
- *p = c;
- return 0;
-}
-
-static void
-set_constant_flonums ()
-{
- int i;
+ else
+ /* An extra byte is required for the opcode count. */
+ size = unwind.opcode_count + 1;
- for (i = 0; i < NUM_FLOAT_VALS; i++)
- if (atof_ieee ((char *) fp_const[i], 'x', fp_values[i]) == NULL)
- abort ();
-}
+ size = (size + 3) >> 2;
+ if (size > 0xff)
+ as_bad (_("too many unwind opcodes"));
-/* Iterate over the base tables to create the instruction patterns. */
-static void
-build_arm_ops_hsh ()
-{
- unsigned int i;
- unsigned int j;
- static struct obstack insn_obstack;
+ frag_align (2, 0, 0);
+ record_alignment (now_seg, 2);
+ unwind.table_entry = expr_build_dot ();
- obstack_begin (&insn_obstack, 4000);
+ /* Allocate the table entry. */
+ ptr = frag_more ((size << 2) + 4);
+ where = frag_now_fix () - ((size << 2) + 4);
- for (i = 0; i < sizeof (insns) / sizeof (struct asm_opcode); i++)
+ switch (unwind.personality_index)
{
- const struct asm_opcode *insn = insns + i;
+ case -1:
+ /* ??? Should this be a PLT generating relocation? */
+ /* Custom personality routine. */
+ fix_new (frag_now, where, 4, unwind.personality_routine, 0, 1,
+ BFD_RELOC_ARM_PREL31);
+
+ where += 4;
+ ptr += 4;
+
+ /* Set the first byte to the number of additional words. */
+ data = size - 1;
+ n = 3;
+ break;
+
+ /* ABI defined personality routines. */
+ case 0:
+ /* Three opcodes bytes are packed into the first word. */
+ data = 0x80;
+ n = 3;
+ break;
+
+ case 1:
+ case 2:
+ /* The size and first two opcode bytes go in the first word. */
+ data = ((0x80 + unwind.personality_index) << 8) | size;
+ n = 2;
+ break;
+
+ default:
+ /* Should never happen. */
+ abort ();
+ }
- if (insn->cond_offset != 0)
+ /* Pack the opcodes into words (MSB first), reversing the list at the same
+ time. */
+ while (unwind.opcode_count > 0)
+ {
+ if (n == 0)
{
- /* Insn supports conditional execution. Build the varaints
- and insert them in the hash table. */
- for (j = 0; j < sizeof (conds) / sizeof (struct asm_cond); j++)
- {
- unsigned len = strlen (insn->template);
- struct asm_opcode *new;
- char *template;
-
- new = obstack_alloc (&insn_obstack, sizeof (struct asm_opcode));
- /* All condition codes are two characters. */
- template = obstack_alloc (&insn_obstack, len + 3);
-
- strncpy (template, insn->template, insn->cond_offset);
- strcpy (template + insn->cond_offset, conds[j].template);
- if (len > insn->cond_offset)
- strcpy (template + insn->cond_offset + 2,
- insn->template + insn->cond_offset);
- new->template = template;
- new->cond_offset = 0;
- new->variant = insn->variant;
- new->parms = insn->parms;
- new->value = (insn->value & ~COND_MASK) | conds[j].value;
-
- hash_insert (arm_ops_hsh, new->template, (PTR) new);
- }
+ md_number_to_chars (ptr, data, 4);
+ ptr += 4;
+ n = 4;
+ data = 0;
}
- /* Finally, insert the unconditional insn in the table directly;
- no need to build a copy. */
- hash_insert (arm_ops_hsh, insn->template, (PTR) insn);
+ unwind.opcode_count--;
+ n--;
+ data = (data << 8) | unwind.opcodes[unwind.opcode_count];
}
-}
-
-#if 0 /* Suppressed - for now. */
-#if defined OBJ_ELF || defined OBJ_COFF
-#ifdef OBJ_ELF
-#define arm_Note Elf_External_Note
-#else
-typedef struct
-{
- unsigned char namesz[4]; /* Size of entry's owner string. */
- unsigned char descsz[4]; /* Size of the note descriptor. */
- unsigned char type[4]; /* Interpretation of the descriptor. */
- char name[1]; /* Start of the name+desc data. */
-} arm_Note;
-#endif
+ /* Finish off the last word. */
+ if (n < 4)
+ {
+ /* Pad with "finish" opcodes. */
+ while (n--)
+ data = (data << 8) | 0xb0;
-/* The description is kept to a fix sized in order to make updating
- it and merging it easier. */
-#define ARM_NOTE_DESCRIPTION_LENGTH 8
+ md_number_to_chars (ptr, data, 4);
+ }
-static void
-arm_add_note (name, description, type)
- const char * name;
- const char * description;
- unsigned int type;
-{
- arm_Note note ATTRIBUTE_UNUSED;
- char * p;
- unsigned int name_len;
+ if (!have_data)
+ {
+ /* Add an empty descriptor if there is no user-specified data. */
+ ptr = frag_more (4);
+ md_number_to_chars (ptr, 0, 4);
+ }
- name_len = (strlen (name) + 1 + 3) & ~3;
-
- p = frag_more (sizeof (note.namesz));
- md_number_to_chars (p, (valueT) name_len, sizeof (note.namesz));
+ return 0;
+}
- p = frag_more (sizeof (note.descsz));
- md_number_to_chars (p, (valueT) ARM_NOTE_DESCRIPTION_LENGTH, sizeof (note.descsz));
+/* Convert REGNAME to a DWARF-2 register number. */
- p = frag_more (sizeof (note.type));
- md_number_to_chars (p, (valueT) type, sizeof (note.type));
+int
+tc_arm_regname_to_dw2regnum (const char *regname)
+{
+ int reg = arm_reg_parse ((char **) &regname, REG_TYPE_RN);
- p = frag_more (name_len);
- strcpy (p, name);
+ if (reg == FAIL)
+ return -1;
- p = frag_more (ARM_NOTE_DESCRIPTION_LENGTH);
- strncpy (p, description, ARM_NOTE_DESCRIPTION_LENGTH);
- frag_align (2, 0, 0);
+ return reg;
}
-#endif
-#endif
+
+/* Initialize the DWARF-2 unwind information for this procedure. */
void
-md_begin ()
+tc_arm_frame_initial_instructions (void)
{
- unsigned mach;
- unsigned int i;
+ cfi_add_CFA_def_cfa (REG_SP, 0);
+}
+#endif /* OBJ_ELF */
- if ( (arm_ops_hsh = hash_new ()) == NULL
- || (arm_tops_hsh = hash_new ()) == NULL
- || (arm_cond_hsh = hash_new ()) == NULL
- || (arm_shift_hsh = hash_new ()) == NULL
- || (arm_psr_hsh = hash_new ()) == NULL)
- as_fatal (_("virtual memory exhausted"));
- build_arm_ops_hsh ();
- for (i = 0; i < sizeof (tinsns) / sizeof (struct thumb_opcode); i++)
- hash_insert (arm_tops_hsh, tinsns[i].template, (PTR) (tinsns + i));
- for (i = 0; i < sizeof (conds) / sizeof (struct asm_cond); i++)
- hash_insert (arm_cond_hsh, conds[i].template, (PTR) (conds + i));
- for (i = 0; i < sizeof (shift_names) / sizeof (struct asm_shift_name); i++)
- hash_insert (arm_shift_hsh, shift_names[i].name, (PTR) (shift_names + i));
- for (i = 0; i < sizeof (psrs) / sizeof (struct asm_psr); i++)
- hash_insert (arm_psr_hsh, psrs[i].template, (PTR) (psrs + i));
+/* MD interface: Symbol and relocation handling. */
- for (i = (int) REG_TYPE_FIRST; i < (int) REG_TYPE_MAX; i++)
- build_reg_hsh (all_reg_maps + i);
+/* Return the address within the segment that a PC-relative fixup is
+ relative to. For ARM, PC-relative fixups applied to instructions
+ are generally relative to the location of the fixup plus 8 bytes.
+ Thumb branches are offset by 4, and Thumb loads relative to PC
+ require special handling. */
- set_constant_flonums ();
+long
+md_pcrel_from_section (fixS * fixP, segT seg)
+{
+ offsetT base = fixP->fx_where + fixP->fx_frag->fr_address;
- /* Set the cpu variant based on the command-line options. We prefer
- -mcpu= over -march= if both are set (as for GCC); and we prefer
- -mfpu= over any other way of setting the floating point unit.
- Use of legacy options with new options are faulted. */
- if (legacy_cpu != -1)
+ /* If 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. */
+ if (fixP->fx_pcrel
+ && ((fixP->fx_addsy && S_GET_SEGMENT (fixP->fx_addsy) != seg)
+ || arm_force_relocation (fixP)))
+ base = 0;
+
+ switch (fixP->fx_r_type)
{
- if (mcpu_cpu_opt != -1 || march_cpu_opt != -1)
- as_bad (_("use of old and new-style options to set CPU type"));
+ /* PC relative addressing on the Thumb is slightly odd as the
+ bottom two bits of the PC are forced to zero for the
+ calculation. This happens *after* application of the
+ pipeline offset. However, Thumb adrl already adjusts for
+ this, so we need not do it again. */
+ case BFD_RELOC_ARM_THUMB_ADD:
+ return base & ~3;
- mcpu_cpu_opt = legacy_cpu;
- }
- else if (mcpu_cpu_opt == -1)
- mcpu_cpu_opt = march_cpu_opt;
+ case BFD_RELOC_ARM_THUMB_OFFSET:
+ case BFD_RELOC_ARM_T32_OFFSET_IMM:
+ case BFD_RELOC_ARM_T32_ADD_PC12:
+ case BFD_RELOC_ARM_T32_CP_OFF_IMM:
+ return (base + 4) & ~3;
- if (legacy_fpu != -1)
- {
- if (mfpu_opt != -1)
- as_bad (_("use of old and new-style options to set FPU type"));
+ /* Thumb branches are simply offset by +4. */
+ case BFD_RELOC_THUMB_PCREL_BRANCH7:
+ case BFD_RELOC_THUMB_PCREL_BRANCH9:
+ case BFD_RELOC_THUMB_PCREL_BRANCH12:
+ case BFD_RELOC_THUMB_PCREL_BRANCH20:
+ case BFD_RELOC_THUMB_PCREL_BRANCH23:
+ case BFD_RELOC_THUMB_PCREL_BRANCH25:
+ case BFD_RELOC_THUMB_PCREL_BLX:
+ return base + 4;
- mfpu_opt = legacy_fpu;
- }
- else if (mfpu_opt == -1)
- {
-#if !(defined (TE_LINUX) || defined (TE_NetBSD))
- /* Some environments specify a default FPU. If they don't, infer it
- from the processor. */
- if (mcpu_fpu_opt != -1)
- mfpu_opt = mcpu_fpu_opt;
- else
- mfpu_opt = march_fpu_opt;
+ /* ARM mode branches are offset by +8. However, the Windows CE
+ loader expects the relocation not to take this into account. */
+ case BFD_RELOC_ARM_PCREL_BRANCH:
+ case BFD_RELOC_ARM_PCREL_CALL:
+ case BFD_RELOC_ARM_PCREL_JUMP:
+ case BFD_RELOC_ARM_PCREL_BLX:
+ case BFD_RELOC_ARM_PLT32:
+#ifdef TE_WINCE
+ return base;
#else
- mfpu_opt = FPU_DEFAULT;
+ return base + 8;
#endif
+
+ /* ARM mode loads relative to PC are also offset by +8. Unlike
+ branches, the Windows CE loader *does* expect the relocation
+ to take this into account. */
+ case BFD_RELOC_ARM_OFFSET_IMM:
+ case BFD_RELOC_ARM_OFFSET_IMM8:
+ case BFD_RELOC_ARM_HWLITERAL:
+ case BFD_RELOC_ARM_LITERAL:
+ case BFD_RELOC_ARM_CP_OFF_IMM:
+ return base + 8;
+
+
+ /* Other PC-relative relocations are un-offset. */
+ default:
+ return base;
}
+}
+
+/* Under ELF we need to default _GLOBAL_OFFSET_TABLE.
+ Otherwise we have no need to default values of symbols. */
- if (mfpu_opt == -1)
+symbolS *
+md_undefined_symbol (char * name ATTRIBUTE_UNUSED)
+{
+#ifdef OBJ_ELF
+ if (name[0] == '_' && name[1] == 'G'
+ && streq (name, GLOBAL_OFFSET_TABLE_NAME))
{
- if (mcpu_cpu_opt == -1)
- mfpu_opt = FPU_DEFAULT;
- else if (mcpu_cpu_opt & ARM_EXT_V5)
- mfpu_opt = FPU_ARCH_VFP_V2;
- else
- mfpu_opt = FPU_ARCH_FPA;
+ if (!GOT_symbol)
+ {
+ if (symbol_find (name))
+ as_bad ("GOT already in the symbol table");
+
+ GOT_symbol = symbol_new (name, undefined_section,
+ (valueT) 0, & zero_address_frag);
+ }
+
+ return GOT_symbol;
}
+#endif
- if (mcpu_cpu_opt == -1)
- mcpu_cpu_opt = CPU_DEFAULT;
+ return 0;
+}
- cpu_variant = mcpu_cpu_opt | mfpu_opt;
+/* Subroutine of md_apply_fix. Check to see if an immediate can be
+ computed as two separate immediate values, added together. We
+ already know that this value cannot be computed by just one ARM
+ instruction. */
-#if defined OBJ_COFF || defined OBJ_ELF
- {
- unsigned int flags = 0;
+static unsigned int
+validate_immediate_twopart (unsigned int val,
+ unsigned int * highpart)
+{
+ unsigned int a;
+ unsigned int i;
- /* Set the flags in the private structure. */
- if (uses_apcs_26) flags |= F_APCS26;
- if (support_interwork) flags |= F_INTERWORK;
- if (uses_apcs_float) flags |= F_APCS_FLOAT;
- if (pic_code) flags |= F_PIC;
- if ((cpu_variant & FPU_ANY) == FPU_NONE
- || (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only. */
- {
- flags |= F_SOFT_FLOAT;
- }
- switch (mfloat_abi_opt)
+ for (i = 0; i < 32; i += 2)
+ if (((a = rotate_left (val, i)) & 0xff) != 0)
{
- case ARM_FLOAT_ABI_SOFT:
- case ARM_FLOAT_ABI_SOFTFP:
- flags |= F_SOFT_FLOAT;
- break;
+ if (a & 0xff00)
+ {
+ if (a & ~ 0xffff)
+ continue;
+ * highpart = (a >> 8) | ((i + 24) << 7);
+ }
+ else if (a & 0xff0000)
+ {
+ if (a & 0xff000000)
+ continue;
+ * highpart = (a >> 16) | ((i + 16) << 7);
+ }
+ else
+ {
+ assert (a & 0xff000000);
+ * highpart = (a >> 24) | ((i + 8) << 7);
+ }
- case ARM_FLOAT_ABI_HARD:
- if (flags & F_SOFT_FLOAT)
- as_bad (_("hard-float conflicts with specified fpu"));
- break;
+ return (a & 0xff) | (i << 7);
}
- /* Using VFP conventions (even if soft-float). */
- if (cpu_variant & FPU_VFP_EXT_NONE) flags |= F_VFP_FLOAT;
-#if defined OBJ_ELF
- if (cpu_variant & FPU_ARCH_MAVERICK)
- flags |= EF_ARM_MAVERICK_FLOAT;
-#endif
+ return FAIL;
+}
- bfd_set_private_flags (stdoutput, flags);
+static int
+validate_offset_imm (unsigned int val, int hwse)
+{
+ if ((hwse && val > 255) || val > 4095)
+ return FAIL;
+ return val;
+}
- /* We have run out flags in the COFF header to encode the
- status of ATPCS support, so instead we create a dummy,
- empty, debug section called .arm.atpcs. */
- if (atpcs)
- {
- asection * sec;
+/* Subroutine of md_apply_fix. Do those data_ops which can take a
+ negative immediate constant by altering the instruction. A bit of
+ a hack really.
+ MOV <-> MVN
+ AND <-> BIC
+ ADC <-> SBC
+ by inverting the second operand, and
+ ADD <-> SUB
+ CMP <-> CMN
+ by negating the second operand. */
- sec = bfd_make_section (stdoutput, ".arm.atpcs");
+static int
+negate_data_op (unsigned long * instruction,
+ unsigned long value)
+{
+ int op, new_inst;
+ unsigned long negated, inverted;
- if (sec != NULL)
- {
- bfd_set_section_flags
- (stdoutput, sec, SEC_READONLY | SEC_DEBUGGING /* | SEC_HAS_CONTENTS */);
- bfd_set_section_size (stdoutput, sec, 0);
- bfd_set_section_contents (stdoutput, sec, NULL, 0, 0);
- }
- }
- }
-#endif
+ negated = encode_arm_immediate (-value);
+ inverted = encode_arm_immediate (~value);
- /* Record the CPU type as well. */
- switch (cpu_variant & ARM_CPU_MASK)
+ op = (*instruction >> DATA_OP_SHIFT) & 0xf;
+ switch (op)
{
- case ARM_2:
- mach = bfd_mach_arm_2;
+ /* First negates. */
+ case OPCODE_SUB: /* ADD <-> SUB */
+ new_inst = OPCODE_ADD;
+ value = negated;
break;
- case ARM_3: /* Also ARM_250. */
- mach = bfd_mach_arm_2a;
+ case OPCODE_ADD:
+ new_inst = OPCODE_SUB;
+ value = negated;
break;
- case ARM_6: /* Also ARM_7. */
- mach = bfd_mach_arm_3;
+ case OPCODE_CMP: /* CMP <-> CMN */
+ new_inst = OPCODE_CMN;
+ value = negated;
break;
- default:
- mach = bfd_mach_arm_unknown;
+ case OPCODE_CMN:
+ new_inst = OPCODE_CMP;
+ value = negated;
break;
- }
-
- /* Catch special cases. */
- if (cpu_variant & ARM_CEXT_IWMMXT)
- mach = bfd_mach_arm_iWMMXt;
- else if (cpu_variant & ARM_CEXT_XSCALE)
- mach = bfd_mach_arm_XScale;
- else if (cpu_variant & ARM_CEXT_MAVERICK)
- mach = bfd_mach_arm_ep9312;
- else if (cpu_variant & ARM_EXT_V5E)
- mach = bfd_mach_arm_5TE;
- else if (cpu_variant & ARM_EXT_V5)
- {
- if (cpu_variant & ARM_EXT_V4T)
- mach = bfd_mach_arm_5T;
- else
- mach = bfd_mach_arm_5;
- }
- else if (cpu_variant & ARM_EXT_V4)
- {
- if (cpu_variant & ARM_EXT_V4T)
- mach = bfd_mach_arm_4T;
- else
- mach = bfd_mach_arm_4;
- }
- else if (cpu_variant & ARM_EXT_V3M)
- mach = bfd_mach_arm_3M;
-#if 0 /* Suppressed - for now. */
-#if defined (OBJ_ELF) || defined (OBJ_COFF)
+ /* Now Inverted ops. */
+ case OPCODE_MOV: /* MOV <-> MVN */
+ new_inst = OPCODE_MVN;
+ value = inverted;
+ break;
- /* Create a .note section to fully identify this arm binary. */
+ case OPCODE_MVN:
+ new_inst = OPCODE_MOV;
+ value = inverted;
+ break;
-#define NOTE_ARCH_STRING "arch: "
+ case OPCODE_AND: /* AND <-> BIC */
+ new_inst = OPCODE_BIC;
+ value = inverted;
+ break;
-#if defined OBJ_COFF && ! defined NT_VERSION
-#define NT_VERSION 1
-#define NT_ARCH 2
-#endif
-
- {
- segT current_seg = now_seg;
- subsegT current_subseg = now_subseg;
- asection * arm_arch;
- const char * arch_string;
+ case OPCODE_BIC:
+ new_inst = OPCODE_AND;
+ value = inverted;
+ break;
- arm_arch = bfd_make_section_old_way (stdoutput, ARM_NOTE_SECTION);
+ case OPCODE_ADC: /* ADC <-> SBC */
+ new_inst = OPCODE_SBC;
+ value = inverted;
+ break;
-#ifdef OBJ_COFF
- bfd_set_section_flags (stdoutput, arm_arch,
- SEC_DATA | SEC_ALLOC | SEC_LOAD | SEC_LINK_ONCE \
- | SEC_HAS_CONTENTS);
-#else
- bfd_set_section_flags (stdoutput, arm_arch,
- SEC_READONLY | SEC_HAS_CONTENTS);
-#endif
- arm_arch->output_section = arm_arch;
- subseg_set (arm_arch, 0);
+ case OPCODE_SBC:
+ new_inst = OPCODE_ADC;
+ value = inverted;
+ break;
- switch (mach)
- {
- default:
- case bfd_mach_arm_unknown: arch_string = "unknown"; break;
- case bfd_mach_arm_2: arch_string = "armv2"; break;
- case bfd_mach_arm_2a: arch_string = "armv2a"; break;
- case bfd_mach_arm_3: arch_string = "armv3"; break;
- case bfd_mach_arm_3M: arch_string = "armv3M"; break;
- case bfd_mach_arm_4: arch_string = "armv4"; break;
- case bfd_mach_arm_4T: arch_string = "armv4t"; break;
- case bfd_mach_arm_5: arch_string = "armv5"; break;
- case bfd_mach_arm_5T: arch_string = "armv5t"; break;
- case bfd_mach_arm_5TE: arch_string = "armv5te"; break;
- case bfd_mach_arm_XScale: arch_string = "XScale"; break;
- case bfd_mach_arm_ep9312: arch_string = "ep9312"; break;
- case bfd_mach_arm_iWMMXt: arch_string = "iWMMXt"; break;
- }
+ /* We cannot do anything. */
+ default:
+ return FAIL;
+ }
- arm_add_note (NOTE_ARCH_STRING, arch_string, NT_ARCH);
+ if (value == (unsigned) FAIL)
+ return FAIL;
- subseg_set (current_seg, current_subseg);
- }
-#endif
-#endif /* Suppressed code. */
-
- bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach);
+ *instruction &= OPCODE_MASK;
+ *instruction |= new_inst << DATA_OP_SHIFT;
+ return value;
}
-/* 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). */
+/* Like negate_data_op, but for Thumb-2. */
-void
-md_number_to_chars (buf, val, n)
- char * buf;
- valueT val;
- int n;
+static unsigned int
+thumb32_negate_data_op (offsetT *instruction, offsetT value)
{
- if (target_big_endian)
- number_to_chars_bigendian (buf, val, n);
- else
- number_to_chars_littleendian (buf, val, n);
-}
+ int op, new_inst;
+ int rd;
+ offsetT negated, inverted;
-static valueT
-md_chars_to_number (buf, n)
- char * buf;
- int n;
-{
- valueT result = 0;
- unsigned char * where = (unsigned char *) buf;
+ negated = encode_thumb32_immediate (-value);
+ inverted = encode_thumb32_immediate (~value);
- if (target_big_endian)
- {
- while (n--)
- {
- result <<= 8;
- result |= (*where++ & 255);
- }
- }
- else
+ rd = (*instruction >> 8) & 0xf;
+ op = (*instruction >> T2_DATA_OP_SHIFT) & 0xf;
+ switch (op)
{
- 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.
+ /* ADD <-> SUB. Includes CMP <-> CMN. */
+ case T2_OPCODE_SUB:
+ new_inst = T2_OPCODE_ADD;
+ value = negated;
+ break;
- 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.
+ case T2_OPCODE_ADD:
+ new_inst = T2_OPCODE_SUB;
+ value = negated;
+ break;
- ??? The format of 12 byte floats is uncertain according to gcc's arm.h. */
+ /* ORR <-> ORN. Includes MOV <-> MVN. */
+ case T2_OPCODE_ORR:
+ new_inst = T2_OPCODE_ORN;
+ value = inverted;
+ break;
-char *
-md_atof (type, litP, sizeP)
- char type;
- char * litP;
- int * sizeP;
-{
- int prec;
- LITTLENUM_TYPE words[MAX_LITTLENUMS];
- char *t;
- int i;
+ case T2_OPCODE_ORN:
+ new_inst = T2_OPCODE_ORR;
+ value = inverted;
+ break;
- switch (type)
- {
- case 'f':
- case 'F':
- case 's':
- case 'S':
- prec = 2;
+ /* AND <-> BIC. TST has no inverted equivalent. */
+ case T2_OPCODE_AND:
+ new_inst = T2_OPCODE_BIC;
+ if (rd == 15)
+ value = FAIL;
+ else
+ value = inverted;
break;
- case 'd':
- case 'D':
- case 'r':
- case 'R':
- prec = 4;
+ case T2_OPCODE_BIC:
+ new_inst = T2_OPCODE_AND;
+ value = inverted;
break;
- case 'x':
- case 'X':
- prec = 6;
+ /* ADC <-> SBC */
+ case T2_OPCODE_ADC:
+ new_inst = T2_OPCODE_SBC;
+ value = inverted;
break;
- case 'p':
- case 'P':
- prec = 6;
+ case T2_OPCODE_SBC:
+ new_inst = T2_OPCODE_ADC;
+ value = inverted;
break;
+ /* We cannot do anything. */
default:
- *sizeP = 0;
- return _("bad call to MD_ATOF()");
+ return FAIL;
}
- 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
- {
- if (cpu_variant & FPU_ARCH_VFP)
- for (i = prec - 1; i >= 0; i--)
- {
- md_number_to_chars (litP, (valueT) words[i], 2);
- litP += 2;
- }
- else
- /* For a 4 byte float the order of elements in `words' is 1 0.
- For an 8 byte float the order is 1 0 3 2. */
- for (i = 0; i < prec; i += 2)
- {
- md_number_to_chars (litP, (valueT) words[i + 1], 2);
- md_number_to_chars (litP + 2, (valueT) words[i], 2);
- litP += 4;
- }
- }
+ if (value == FAIL)
+ return FAIL;
- return 0;
+ *instruction &= T2_OPCODE_MASK;
+ *instruction |= new_inst << T2_DATA_OP_SHIFT;
+ return value;
}
-/* The knowledge of the PC's pipeline offset is built into the insns
- themselves. */
-
-long
-md_pcrel_from (fixP)
- fixS * fixP;
+/* Read a 32-bit thumb instruction from buf. */
+static unsigned long
+get_thumb32_insn (char * buf)
{
- if (fixP->fx_addsy
- && S_GET_SEGMENT (fixP->fx_addsy) == undefined_section
- && fixP->fx_subsy == NULL)
- return 0;
-
- if (fixP->fx_pcrel && (fixP->fx_r_type == BFD_RELOC_ARM_THUMB_ADD))
- {
- /* PC relative addressing on the Thumb is slightly odd
- as the bottom two bits of the PC are forced to zero
- for the calculation. */
- return (fixP->fx_where + fixP->fx_frag->fr_address) & ~3;
- }
-
-#ifdef TE_WINCE
- /* The pattern was adjusted to accommodate CE's off-by-one fixups,
- so we un-adjust here to compensate for the accommodation. */
- return fixP->fx_where + fixP->fx_frag->fr_address + 8;
-#else
- return fixP->fx_where + fixP->fx_frag->fr_address;
-#endif
-}
+ unsigned long insn;
+ insn = md_chars_to_number (buf, THUMB_SIZE) << 16;
+ insn |= md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE);
-/* Round up a section size to the appropriate boundary. */
-
-valueT
-md_section_align (segment, size)
- segT segment ATTRIBUTE_UNUSED;
- valueT size;
-{
-#ifdef OBJ_ELF
- return size;
-#else
- /* Round all sects to multiple of 4. */
- return (size + 3) & ~3;
-#endif
+ return insn;
}
-/* Under ELF we need to default _GLOBAL_OFFSET_TABLE.
- Otherwise we have no need to default values of symbols. */
-symbolS *
-md_undefined_symbol (name)
- char * name ATTRIBUTE_UNUSED;
+/* We usually want to set the low bit on the address of thumb function
+ symbols. In particular .word foo - . should have the low bit set.
+ Generic code tries to fold the difference of two symbols to
+ a constant. Prevent this and force a relocation when the first symbols
+ is a thumb function. */
+int
+arm_optimize_expr (expressionS *l, operatorT op, expressionS *r)
{
-#ifdef OBJ_ELF
- if (name[0] == '_' && name[1] == 'G'
- && streq (name, GLOBAL_OFFSET_TABLE_NAME))
+ if (op == O_subtract
+ && l->X_op == O_symbol
+ && r->X_op == O_symbol
+ && THUMB_IS_FUNC (l->X_add_symbol))
{
- if (!GOT_symbol)
- {
- if (symbol_find (name))
- as_bad ("GOT already in the symbol table");
-
- GOT_symbol = symbol_new (name, undefined_section,
- (valueT) 0, & zero_address_frag);
- }
-
- return GOT_symbol;
+ l->X_op = O_subtract;
+ l->X_op_symbol = r->X_add_symbol;
+ l->X_add_number -= r->X_add_number;
+ return 1;
}
-#endif
-
+ /* Process as normal. */
return 0;
}
-/* arm_reg_parse () := if it looks like a register, return its token and
- advance the pointer. */
-
-static int
-arm_reg_parse (ccp, htab)
- register char ** ccp;
- struct hash_control *htab;
-{
- char * start = * ccp;
- char c;
- char * p;
- struct reg_entry * reg;
-
-#ifdef REGISTER_PREFIX
- if (*start != REGISTER_PREFIX)
- return FAIL;
- p = start + 1;
-#else
- p = start;
-#ifdef OPTIONAL_REGISTER_PREFIX
- if (*p == OPTIONAL_REGISTER_PREFIX)
- p++, start++;
-#endif
-#endif
- if (!ISALPHA (*p) || !is_name_beginner (*p))
- return FAIL;
-
- c = *p++;
- while (ISALPHA (c) || ISDIGIT (c) || c == '_')
- c = *p++;
-
- *--p = 0;
- reg = (struct reg_entry *) hash_find (htab, start);
- *p = c;
-
- if (reg)
- {
- *ccp = p;
- return reg->number;
- }
-
- return FAIL;
-}
-
-/* Search for the following register name in each of the possible reg name
- tables. Return the classification if found, or REG_TYPE_MAX if not
- present. */
-static enum arm_reg_type
-arm_reg_parse_any (cp)
- char *cp;
-{
- int i;
-
- for (i = (int) REG_TYPE_FIRST; i < (int) REG_TYPE_MAX; i++)
- if (arm_reg_parse (&cp, all_reg_maps[i].htab) != FAIL)
- return (enum arm_reg_type) i;
-
- return REG_TYPE_MAX;
-}
-
void
-md_apply_fix3 (fixP, valP, seg)
- fixS * fixP;
- valueT * valP;
- segT seg;
+md_apply_fix (fixS * fixP,
+ valueT * valP,
+ segT seg)
{
- offsetT value = * valP;
- offsetT newval;
- unsigned int newimm;
- unsigned long temp;
- int sign;
- char * buf = fixP->fx_where + fixP->fx_frag->fr_literal;
- arm_fix_data * arm_data = (arm_fix_data *) fixP->tc_fix_data;
+ offsetT value = * valP;
+ offsetT newval;
+ unsigned int newimm;
+ unsigned long temp;
+ int sign;
+ char * buf = fixP->fx_where + fixP->fx_frag->fr_literal;
- assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
+ assert (fixP->fx_r_type <= BFD_RELOC_UNUSED);
/* Note whether this will delete the relocation. */
-#if 0
- /* Patch from REarnshaw to JDavis (disabled for the moment, since it
- doesn't work fully.) */
- if ((fixP->fx_addsy == 0 || symbol_constant_p (fixP->fx_addsy))
- && !fixP->fx_pcrel)
-#else
if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)
-#endif
fixP->fx_done = 1;
- /* If this symbol is in a different section then we need to leave it for
- the linker to deal with. Unfortunately, md_pcrel_from can't tell,
- so we have to undo it's effects here. */
- if (fixP->fx_pcrel)
- {
- if (fixP->fx_addsy != NULL
- && S_IS_DEFINED (fixP->fx_addsy)
- && S_GET_SEGMENT (fixP->fx_addsy) != seg)
- {
- if (target_oabi
- && (fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH
- || fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BLX
- ))
- value = 0;
- else
- value += md_pcrel_from (fixP);
- }
- }
+ /* On a 64-bit host, silently truncate 'value' to 32 bits for
+ consistency with the behavior on 32-bit hosts. Remember value
+ for emit_reloc. */
+ value &= 0xffffffff;
+ value ^= 0x80000000;
+ value -= 0x80000000;
- /* Remember value for emit_reloc. */
+ *valP = value;
fixP->fx_addnumber = value;
+ /* Same treatment for fixP->fx_offset. */
+ fixP->fx_offset &= 0xffffffff;
+ fixP->fx_offset ^= 0x80000000;
+ fixP->fx_offset -= 0x80000000;
+
switch (fixP->fx_r_type)
{
+ case BFD_RELOC_NONE:
+ /* This will need to go in the object file. */
+ fixP->fx_done = 0;
+ break;
+
case BFD_RELOC_ARM_IMMEDIATE:
- newimm = validate_immediate (value);
+ /* We claim that this fixup has been processed here,
+ even if in fact we generate an error because we do
+ not have a reloc for it, so tc_gen_reloc will reject it. */
+ fixP->fx_done = 1;
+
+ if (fixP->fx_addsy
+ && ! S_IS_DEFINED (fixP->fx_addsy))
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("undefined symbol %s used as an immediate value"),
+ S_GET_NAME (fixP->fx_addsy));
+ break;
+ }
+
+ newimm = encode_arm_immediate (value);
temp = md_chars_to_number (buf, INSN_SIZE);
/* If the instruction will fail, see if we can fix things up by
@@ -12174,7 +11584,6 @@ md_apply_fix3 (fixP, valP, seg)
newimm |= (temp & 0xfffff000);
md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
- fixP->fx_done = 1;
break;
case BFD_RELOC_ARM_ADRL_IMMEDIATE:
@@ -12182,20 +11591,20 @@ md_apply_fix3 (fixP, valP, seg)
unsigned int highpart = 0;
unsigned int newinsn = 0xe1a00000; /* nop. */
- newimm = validate_immediate (value);
+ newimm = encode_arm_immediate (value);
temp = md_chars_to_number (buf, INSN_SIZE);
/* If the instruction will fail, see if we can fix things up by
- changing the opcode. */
+ changing the opcode. */
if (newimm == (unsigned int) FAIL
&& (newimm = negate_data_op (& temp, value)) == (unsigned int) FAIL)
{
/* No ? OK - try using two ADD instructions to generate
- the value. */
+ the value. */
newimm = validate_immediate_twopart (value, & highpart);
/* Yes - then make sure that the second instruction is
- also an add. */
+ also an add. */
if (newimm != (unsigned int) FAIL)
newinsn = temp;
/* Still No ? Try using a negated value. */
@@ -12227,6 +11636,10 @@ md_apply_fix3 (fixP, valP, seg)
break;
case BFD_RELOC_ARM_OFFSET_IMM:
+ if (!fixP->fx_done && seg->use_rela_p)
+ value = 0;
+
+ case BFD_RELOC_ARM_LITERAL:
sign = value >= 0;
if (value < 0)
@@ -12234,9 +11647,13 @@ md_apply_fix3 (fixP, valP, seg)
if (validate_offset_imm (value, 0) == FAIL)
{
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("bad immediate value for offset (%ld)"),
- (long) value);
+ if (fixP->fx_r_type == BFD_RELOC_ARM_LITERAL)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("invalid literal constant: pool needs to be closer"));
+ else
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("bad immediate value for offset (%ld)"),
+ (long) value);
break;
}
@@ -12270,23 +11687,130 @@ md_apply_fix3 (fixP, valP, seg)
md_number_to_chars (buf, newval, INSN_SIZE);
break;
- case BFD_RELOC_ARM_LITERAL:
- sign = value >= 0;
+ case BFD_RELOC_ARM_T32_OFFSET_U8:
+ if (value < 0 || value > 1020 || value % 4 != 0)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("bad immediate value for offset (%ld)"), (long) value);
+ value /= 4;
- if (value < 0)
- value = - value;
+ newval = md_chars_to_number (buf+2, THUMB_SIZE);
+ newval |= value;
+ md_number_to_chars (buf+2, newval, THUMB_SIZE);
+ break;
- if (validate_offset_imm (value, 0) == FAIL)
+ case BFD_RELOC_ARM_T32_OFFSET_IMM:
+ /* This is a complicated relocation used for all varieties of Thumb32
+ load/store instruction with immediate offset:
+
+ 1110 100P u1WL NNNN XXXX YYYY iiii iiii - +/-(U) pre/post(P) 8-bit,
+ *4, optional writeback(W)
+ (doubleword load/store)
+
+ 1111 100S uTTL 1111 XXXX iiii iiii iiii - +/-(U) 12-bit PC-rel
+ 1111 100S 0TTL NNNN XXXX 1Pu1 iiii iiii - +/-(U) pre/post(P) 8-bit
+ 1111 100S 0TTL NNNN XXXX 1110 iiii iiii - positive 8-bit (T instruction)
+ 1111 100S 1TTL NNNN XXXX iiii iiii iiii - positive 12-bit
+ 1111 100S 0TTL NNNN XXXX 1100 iiii iiii - negative 8-bit
+
+ Uppercase letters indicate bits that are already encoded at
+ this point. Lowercase letters are our problem. For the
+ second block of instructions, the secondary opcode nybble
+ (bits 8..11) is present, and bit 23 is zero, even if this is
+ a PC-relative operation. */
+ newval = md_chars_to_number (buf, THUMB_SIZE);
+ newval <<= 16;
+ newval |= md_chars_to_number (buf+THUMB_SIZE, THUMB_SIZE);
+
+ if ((newval & 0xf0000000) == 0xe0000000)
{
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid literal constant: pool needs to be closer"));
- break;
+ /* Doubleword load/store: 8-bit offset, scaled by 4. */
+ if (value >= 0)
+ newval |= (1 << 23);
+ else
+ value = -value;
+ if (value % 4 != 0)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("offset not a multiple of 4"));
+ break;
+ }
+ value /= 4;
+ if (value > 0xff)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("offset out of range"));
+ break;
+ }
+ newval &= ~0xff;
+ }
+ else if ((newval & 0x000f0000) == 0x000f0000)
+ {
+ /* PC-relative, 12-bit offset. */
+ if (value >= 0)
+ newval |= (1 << 23);
+ else
+ value = -value;
+ if (value > 0xfff)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("offset out of range"));
+ break;
+ }
+ newval &= ~0xfff;
+ }
+ else if ((newval & 0x00000100) == 0x00000100)
+ {
+ /* Writeback: 8-bit, +/- offset. */
+ if (value >= 0)
+ newval |= (1 << 9);
+ else
+ value = -value;
+ if (value > 0xff)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("offset out of range"));
+ break;
+ }
+ newval &= ~0xff;
+ }
+ else if ((newval & 0x00000f00) == 0x00000e00)
+ {
+ /* T-instruction: positive 8-bit offset. */
+ if (value < 0 || value > 0xff)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("offset out of range"));
+ break;
+ }
+ newval &= ~0xff;
+ newval |= value;
+ }
+ else
+ {
+ /* Positive 12-bit or negative 8-bit offset. */
+ int limit;
+ if (value >= 0)
+ {
+ newval |= (1 << 23);
+ limit = 0xfff;
+ }
+ else
+ {
+ value = -value;
+ limit = 0xff;
+ }
+ if (value > limit)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("offset out of range"));
+ break;
+ }
+ newval &= ~limit;
}
- newval = md_chars_to_number (buf, INSN_SIZE);
- newval &= 0xff7ff000;
- newval |= value | (sign ? INDEX_UP : 0);
- md_number_to_chars (buf, newval, INSN_SIZE);
+ newval |= value;
+ md_number_to_chars (buf, (newval >> 16) & 0xffff, THUMB_SIZE);
+ md_number_to_chars (buf + THUMB_SIZE, newval & 0xffff, THUMB_SIZE);
break;
case BFD_RELOC_ARM_SHIFT_IMM:
@@ -12301,7 +11825,7 @@ md_apply_fix3 (fixP, valP, seg)
}
if (value == 0)
- /* Shifts of zero must be done as lsl. */
+ /* Shifts of zero must be done as lsl. */
newval &= ~0x60;
else if (value == 32)
value = 0;
@@ -12310,13 +11834,80 @@ md_apply_fix3 (fixP, valP, seg)
md_number_to_chars (buf, newval, INSN_SIZE);
break;
+ case BFD_RELOC_ARM_T32_IMMEDIATE:
+ case BFD_RELOC_ARM_T32_IMM12:
+ case BFD_RELOC_ARM_T32_ADD_PC12:
+ /* We claim that this fixup has been processed here,
+ even if in fact we generate an error because we do
+ not have a reloc for it, so tc_gen_reloc will reject it. */
+ fixP->fx_done = 1;
+
+ if (fixP->fx_addsy
+ && ! S_IS_DEFINED (fixP->fx_addsy))
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("undefined symbol %s used as an immediate value"),
+ S_GET_NAME (fixP->fx_addsy));
+ break;
+ }
+
+ newval = md_chars_to_number (buf, THUMB_SIZE);
+ 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 = encode_thumb32_immediate (value);
+ if (newimm == (unsigned int) FAIL)
+ newimm = thumb32_negate_data_op (&newval, value);
+ }
+ else
+ {
+ /* 12 bit immediate for addw/subw. */
+ if (value < 0)
+ {
+ value = -value;
+ newval ^= 0x00a00000;
+ }
+ if (value > 0xfff)
+ newimm = (unsigned int) FAIL;
+ else
+ newimm = value;
+ }
+
+ if (newimm == (unsigned int)FAIL)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("invalid constant (%lx) after fixup"),
+ (unsigned long) value);
+ break;
+ }
+
+ newval |= (newimm & 0x800) << 15;
+ newval |= (newimm & 0x700) << 4;
+ newval |= (newimm & 0x0ff);
+
+ md_number_to_chars (buf, (valueT) ((newval >> 16) & 0xffff), THUMB_SIZE);
+ md_number_to_chars (buf+2, (valueT) (newval & 0xffff), THUMB_SIZE);
+ break;
+
+ case BFD_RELOC_ARM_SMC:
+ if (((unsigned long) value) > 0xffff)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("invalid smc expression"));
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ newval |= (value & 0xf) | ((value & 0xfff0) << 4);
+ md_number_to_chars (buf, newval, INSN_SIZE);
+ break;
+
case BFD_RELOC_ARM_SWI:
- if (arm_data->thumb_mode)
+ if (fixP->tc_fix_data != 0)
{
if (((unsigned long) value) > 0xff)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("invalid swi expression"));
- newval = md_chars_to_number (buf, THUMB_SIZE) & 0xff00;
+ newval = md_chars_to_number (buf, THUMB_SIZE);
newval |= value;
md_number_to_chars (buf, newval, THUMB_SIZE);
}
@@ -12325,7 +11916,7 @@ md_apply_fix3 (fixP, valP, seg)
if (((unsigned long) value) > 0x00ffffff)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("invalid swi expression"));
- newval = md_chars_to_number (buf, INSN_SIZE) & 0xff000000;
+ newval = md_chars_to_number (buf, INSN_SIZE);
newval |= value;
md_number_to_chars (buf, newval, INSN_SIZE);
}
@@ -12339,224 +11930,257 @@ md_apply_fix3 (fixP, valP, seg)
md_number_to_chars (buf, newval, INSN_SIZE);
break;
- case BFD_RELOC_ARM_PCREL_BRANCH:
+#ifdef OBJ_ELF
+ case BFD_RELOC_ARM_PCREL_CALL:
newval = md_chars_to_number (buf, INSN_SIZE);
+ if ((newval & 0xf0000000) == 0xf0000000)
+ temp = 1;
+ else
+ temp = 3;
+ goto arm_branch_common;
- /* Sign-extend a 24-bit number. */
-#define SEXT24(x) ((((x) & 0xffffff) ^ (~ 0x7fffff)) + 0x800000)
-
-#ifdef OBJ_ELF
- if (! target_oabi)
- value = fixP->fx_offset;
+ case BFD_RELOC_ARM_PCREL_JUMP:
+ case BFD_RELOC_ARM_PLT32:
#endif
+ case BFD_RELOC_ARM_PCREL_BRANCH:
+ temp = 3;
+ goto arm_branch_common;
+ case BFD_RELOC_ARM_PCREL_BLX:
+ temp = 1;
+ arm_branch_common:
/* We are going to store value (shifted right by two) in the
- instruction, in a 24 bit, signed field. Thus we need to check
- that none of the top 8 bits of the shifted value (top 7 bits of
- the unshifted, unsigned value) are set, or that they are all set. */
- if ((value & ~ ((offsetT) 0x1ffffff)) != 0
- && ((value & ~ ((offsetT) 0x1ffffff)) != ~ ((offsetT) 0x1ffffff)))
+ instruction, in a 24 bit, signed field. Bits 26 through 32 either
+ all clear or all set and bit 0 must be clear. For B/BL bit 1 must
+ also be be clear. */
+ if (value & temp)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("misaligned branch destination"));
+ if ((value & (offsetT)0xfe000000) != (offsetT)0
+ && (value & (offsetT)0xfe000000) != (offsetT)0xfe000000)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch out of range"));
+
+ if (fixP->fx_done || !seg->use_rela_p)
{
-#ifdef OBJ_ELF
- /* Normally we would be stuck at this point, since we cannot store
- the absolute address that is the destination of the branch in the
- 24 bits of the branch instruction. If however, we happen to know
- that the destination of the branch is in the same section as the
- branch instruction itself, then we can compute the relocation for
- ourselves and not have to bother the linker with it.
-
- FIXME: The tests for OBJ_ELF and ! target_oabi are only here
- because I have not worked out how to do this for OBJ_COFF or
- target_oabi. */
- if (! target_oabi
- && fixP->fx_addsy != NULL
- && S_IS_DEFINED (fixP->fx_addsy)
- && S_GET_SEGMENT (fixP->fx_addsy) == seg)
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ newval |= (value >> 2) & 0x00ffffff;
+ /* Set the H bit on BLX instructions. */
+ if (temp == 1)
{
- /* Get pc relative value to go into the branch. */
- value = * valP;
-
- /* Permit a backward branch provided that enough bits
- are set. Allow a forwards branch, provided that
- enough bits are clear. */
- if ( (value & ~ ((offsetT) 0x1ffffff)) == ~ ((offsetT) 0x1ffffff)
- || (value & ~ ((offsetT) 0x1ffffff)) == 0)
- fixP->fx_done = 1;
+ if (value & 2)
+ newval |= 0x01000000;
+ else
+ newval &= ~0x01000000;
}
-
- if (! fixP->fx_done)
-#endif
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("GAS can't handle same-section branch dest >= 0x04000000"));
+ md_number_to_chars (buf, newval, INSN_SIZE);
}
+ break;
- value >>= 2;
- value += SEXT24 (newval);
-
- if ( (value & ~ ((offsetT) 0xffffff)) != 0
- && ((value & ~ ((offsetT) 0xffffff)) != ~ ((offsetT) 0xffffff)))
+ case BFD_RELOC_THUMB_PCREL_BRANCH7: /* CZB */
+ /* CZB can only branch forward. */
+ if (value & ~0x7e)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("out of range branch"));
+ _("branch out of range"));
- newval = (value & 0x00ffffff) | (newval & 0xff000000);
- md_number_to_chars (buf, newval, INSN_SIZE);
+ 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_ARM_PCREL_BLX:
- {
- offsetT hbit;
- newval = md_chars_to_number (buf, INSN_SIZE);
+ case BFD_RELOC_THUMB_PCREL_BRANCH9: /* Conditional branch. */
+ if ((value & ~0xff) && ((value & ~0xff) != ~0xff))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch out of range"));
-#ifdef OBJ_ELF
- if (! target_oabi)
- value = fixP->fx_offset;
-#endif
- hbit = (value >> 1) & 1;
- value = (value >> 2) & 0x00ffffff;
- value = (value + (newval & 0x00ffffff)) & 0x00ffffff;
- newval = value | (newval & 0xfe000000) | (hbit << 24);
- md_number_to_chars (buf, newval, INSN_SIZE);
- }
+ if (fixP->fx_done || !seg->use_rela_p)
+ {
+ newval = md_chars_to_number (buf, THUMB_SIZE);
+ newval |= (value & 0x1ff) >> 1;
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ }
break;
- case BFD_RELOC_THUMB_PCREL_BRANCH9: /* Conditional branch. */
- newval = md_chars_to_number (buf, THUMB_SIZE);
- {
- addressT diff = (newval & 0xff) << 1;
- if (diff & 0x100)
- diff |= ~0xff;
+ case BFD_RELOC_THUMB_PCREL_BRANCH12: /* Unconditional branch. */
+ if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch out of range"));
- value += diff;
- if ((value & ~0xff) && ((value & ~0xff) != ~0xff))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("branch out of range"));
- newval = (newval & 0xff00) | ((value & 0x1ff) >> 1);
- }
- md_number_to_chars (buf, newval, THUMB_SIZE);
+ if (fixP->fx_done || !seg->use_rela_p)
+ {
+ newval = md_chars_to_number (buf, THUMB_SIZE);
+ newval |= (value & 0xfff) >> 1;
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ }
break;
- case BFD_RELOC_THUMB_PCREL_BRANCH12: /* Unconditional branch. */
- newval = md_chars_to_number (buf, THUMB_SIZE);
- {
- addressT diff = (newval & 0x7ff) << 1;
- if (diff & 0x800)
- diff |= ~0x7ff;
+ case BFD_RELOC_THUMB_PCREL_BRANCH20:
+ if ((value & ~0x1fffff) && ((value & ~0x1fffff) != ~0x1fffff))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("conditional branch out of range"));
- value += diff;
- if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("branch out of range"));
- newval = (newval & 0xf800) | ((value & 0xfff) >> 1);
- }
- md_number_to_chars (buf, newval, THUMB_SIZE);
+ if (fixP->fx_done || !seg->use_rela_p)
+ {
+ offsetT newval2;
+ addressT S, J1, J2, lo, hi;
+
+ S = (value & 0x00100000) >> 20;
+ J2 = (value & 0x00080000) >> 19;
+ J1 = (value & 0x00040000) >> 18;
+ hi = (value & 0x0003f000) >> 12;
+ lo = (value & 0x00000ffe) >> 1;
+
+ newval = md_chars_to_number (buf, THUMB_SIZE);
+ newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE);
+ newval |= (S << 10) | hi;
+ newval2 |= (J1 << 13) | (J2 << 11) | lo;
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE);
+ }
break;
case BFD_RELOC_THUMB_PCREL_BLX:
case BFD_RELOC_THUMB_PCREL_BRANCH23:
- {
- offsetT newval2;
- addressT diff;
-
- newval = md_chars_to_number (buf, THUMB_SIZE);
- newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE);
- diff = ((newval & 0x7ff) << 12) | ((newval2 & 0x7ff) << 1);
- if (diff & 0x400000)
- diff |= ~0x3fffff;
-#ifdef OBJ_ELF
- value = fixP->fx_offset;
-#endif
- value += diff;
+ if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch out of range"));
- if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("branch with link out of range"));
-
- newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12);
- newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1);
- if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX)
- /* For a BLX instruction, make sure that the relocation is rounded up
- to a word boundary. This follows the semantics of the instruction
- which specifies that bit 1 of the target address will come from bit
- 1 of the base address. */
- newval2 = (newval2 + 1) & ~ 1;
- md_number_to_chars (buf, newval, THUMB_SIZE);
- md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE);
- }
+ if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX)
+ /* For a BLX instruction, make sure that the relocation is rounded up
+ to a word boundary. This follows the semantics of the instruction
+ which specifies that bit 1 of the target address will come from bit
+ 1 of the base address. */
+ value = (value + 1) & ~ 1;
+
+ if (fixP->fx_done || !seg->use_rela_p)
+ {
+ offsetT newval2;
+
+ newval = md_chars_to_number (buf, THUMB_SIZE);
+ newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE);
+ newval |= (value & 0x7fffff) >> 12;
+ newval2 |= (value & 0xfff) >> 1;
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE);
+ }
break;
- case BFD_RELOC_8:
- if (fixP->fx_done || fixP->fx_pcrel)
- md_number_to_chars (buf, value, 1);
-#ifdef OBJ_ELF
- else if (!target_oabi)
+ case BFD_RELOC_THUMB_PCREL_BRANCH25:
+ if ((value & ~0x1ffffff) && ((value & ~0x1ffffff) != ~0x1ffffff))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch out of range"));
+
+ if (fixP->fx_done || !seg->use_rela_p)
{
- value = fixP->fx_offset;
- md_number_to_chars (buf, value, 1);
+ offsetT newval2;
+ addressT S, I1, I2, lo, hi;
+
+ S = (value & 0x01000000) >> 24;
+ I1 = (value & 0x00800000) >> 23;
+ I2 = (value & 0x00400000) >> 22;
+ hi = (value & 0x003ff000) >> 12;
+ lo = (value & 0x00000ffe) >> 1;
+
+ I1 = !(I1 ^ S);
+ I2 = !(I2 ^ S);
+
+ newval = md_chars_to_number (buf, THUMB_SIZE);
+ newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE);
+ newval |= (S << 10) | hi;
+ newval2 |= (I1 << 13) | (I2 << 11) | lo;
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE);
}
-#endif
+ break;
+
+ case BFD_RELOC_8:
+ if (fixP->fx_done || !seg->use_rela_p)
+ md_number_to_chars (buf, value, 1);
break;
case BFD_RELOC_16:
- if (fixP->fx_done || fixP->fx_pcrel)
+ if (fixP->fx_done || !seg->use_rela_p)
md_number_to_chars (buf, value, 2);
-#ifdef OBJ_ELF
- else if (!target_oabi)
- {
- value = fixP->fx_offset;
- md_number_to_chars (buf, value, 2);
- }
-#endif
break;
#ifdef OBJ_ELF
+ case BFD_RELOC_ARM_TLS_GD32:
+ case BFD_RELOC_ARM_TLS_LE32:
+ case BFD_RELOC_ARM_TLS_IE32:
+ case BFD_RELOC_ARM_TLS_LDM32:
+ case BFD_RELOC_ARM_TLS_LDO32:
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
+ /* fall through */
+
case BFD_RELOC_ARM_GOT32:
case BFD_RELOC_ARM_GOTOFF:
- md_number_to_chars (buf, 0, 4);
+ case BFD_RELOC_ARM_TARGET2:
+ if (fixP->fx_done || !seg->use_rela_p)
+ md_number_to_chars (buf, 0, 4);
break;
#endif
case BFD_RELOC_RVA:
case BFD_RELOC_32:
- if (fixP->fx_done || fixP->fx_pcrel)
+ case BFD_RELOC_ARM_TARGET1:
+ case BFD_RELOC_ARM_ROSEGREL32:
+ case BFD_RELOC_ARM_SBREL32:
+ case BFD_RELOC_32_PCREL:
+ if (fixP->fx_done || !seg->use_rela_p)
md_number_to_chars (buf, value, 4);
-#ifdef OBJ_ELF
- else if (!target_oabi)
- {
- value = fixP->fx_offset;
- md_number_to_chars (buf, value, 4);
- }
-#endif
break;
#ifdef OBJ_ELF
- case BFD_RELOC_ARM_PLT32:
- /* It appears the instruction is fully prepared at this point. */
+ case BFD_RELOC_ARM_PREL31:
+ if (fixP->fx_done || !seg->use_rela_p)
+ {
+ newval = md_chars_to_number (buf, 4) & 0x80000000;
+ if ((value ^ (value >> 1)) & 0x40000000)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("rel31 relocation overflow"));
+ }
+ newval |= value & 0x7fffffff;
+ md_number_to_chars (buf, newval, 4);
+ }
break;
#endif
case BFD_RELOC_ARM_CP_OFF_IMM:
- sign = value >= 0;
+ case BFD_RELOC_ARM_T32_CP_OFF_IMM:
if (value < -1023 || value > 1023 || (value & 3))
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("illegal value for co-processor offset"));
+ _("co-processor offset out of range"));
+ cp_off_common:
+ sign = value >= 0;
if (value < 0)
value = -value;
- newval = md_chars_to_number (buf, INSN_SIZE) & 0xff7fff00;
+ if (fixP->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM
+ || fixP->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM_S2)
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ else
+ newval = get_thumb32_insn (buf);
+ newval &= 0xff7fff00;
newval |= (value >> 2) | (sign ? INDEX_UP : 0);
- md_number_to_chars (buf, newval, INSN_SIZE);
+ 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);
+ else
+ put_thumb32_insn (buf, newval);
break;
case BFD_RELOC_ARM_CP_OFF_IMM_S2:
- sign = value >= 0;
+ case BFD_RELOC_ARM_T32_CP_OFF_IMM_S2:
if (value < -255 || value > 255)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Illegal value for co-processor offset"));
- if (value < 0)
- value = -value;
- newval = md_chars_to_number (buf, INSN_SIZE) & 0xff7fff00;
- newval |= value | (sign ? INDEX_UP : 0);
- md_number_to_chars (buf, newval , INSN_SIZE);
- break;
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("co-processor offset out of range"));
+ value *= 4;
+ goto cp_off_common;
case BFD_RELOC_ARM_THUMB_OFFSET:
newval = md_chars_to_number (buf, THUMB_SIZE);
@@ -12567,24 +12191,21 @@ md_apply_fix3 (fixP, valP, seg)
{
case 4: /* PC load. */
/* Thumb PC loads are somewhat odd, bit 1 of the PC is
- forced to zero for these loads, so we will need to round
- up the offset if the instruction address is not word
- aligned (since the final address produced must be, and
- we can only describe word-aligned immediate offsets). */
-
- if ((fixP->fx_frag->fr_address + fixP->fx_where + value) & 3)
+ forced to zero for these loads; md_pcrel_from has already
+ compensated for this. */
+ if (value & 3)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid offset, target not word aligned (0x%08X)"),
- (unsigned int) (fixP->fx_frag->fr_address
- + fixP->fx_where + value));
+ _("invalid offset, target not word aligned (0x%08lX)"),
+ (((unsigned long) fixP->fx_frag->fr_address
+ + (unsigned long) fixP->fx_where) & ~3)
+ + (unsigned long) value);
- if ((value + 2) & ~0x3fe)
+ if (value & ~0x3fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("invalid offset, value too big (0x%08lX)"),
(long) value);
- /* Round up, since pc will be rounded down. */
- newval |= (value + 2) >> 2;
+ newval |= value >> 2;
break;
case 9: /* SP load/store. */
@@ -12611,7 +12232,7 @@ md_apply_fix3 (fixP, valP, seg)
newval |= value << 6;
break;
- case 8: /* Halfword load/store. */
+ case 8: /* Halfword load/store. */
if (value & ~0x3e)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("invalid offset, value too big (0x%08lX)"),
@@ -12630,15 +12251,15 @@ md_apply_fix3 (fixP, valP, seg)
case BFD_RELOC_ARM_THUMB_ADD:
/* This is a complicated relocation, since we use it for all of
- the following immediate relocations:
+ the following immediate relocations:
3bit ADD/SUB
8bit ADD/SUB
9bit ADD/SUB SP word-aligned
10bit ADD PC/SP word-aligned
- The type of instruction being processed is encoded in the
- instruction field:
+ The type of instruction being processed is encoded in the
+ instruction field:
0x8000 SUB
0x00F0 Rd
@@ -12648,7 +12269,24 @@ md_apply_fix3 (fixP, valP, seg)
{
int rd = (newval >> 4) & 0xf;
int rs = newval & 0xf;
- int subtract = newval & 0x8000;
+ int subtract = !!(newval & 0x8000);
+
+ /* Check for HI regs, only very restricted cases allowed:
+ Adjusting SP, and using PC or SP to get an address. */
+ if ((rd > 7 && (rd != REG_SP || rs != REG_SP))
+ || (rs > 7 && rs != REG_SP && rs != REG_PC))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("invalid Hi register with immediate"));
+
+ /* If value is negative, choose the opposite instruction. */
+ if (value < 0)
+ {
+ value = -value;
+ subtract = !subtract;
+ if (value < 0)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("immediate value out of range"));
+ }
if (rd == REG_SP)
{
@@ -12660,8 +12298,7 @@ md_apply_fix3 (fixP, valP, seg)
}
else if (rs == REG_PC || rs == REG_SP)
{
- if (subtract ||
- value & ~0x3fc)
+ if (subtract || value & ~0x3fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("invalid immediate for address calculation (value = 0x%08lX)"),
(unsigned long) value);
@@ -12673,7 +12310,7 @@ md_apply_fix3 (fixP, valP, seg)
{
if (value & ~0xff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid 8bit immediate"));
+ _("immediate value out of range"));
newval = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8;
newval |= (rd << 8) | value;
}
@@ -12681,7 +12318,7 @@ md_apply_fix3 (fixP, valP, seg)
{
if (value & ~0x7)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid 3bit immediate"));
+ _("immediate value out of range"));
newval = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3;
newval |= rd | (rs << 3) | (value << 6);
}
@@ -12691,29 +12328,27 @@ md_apply_fix3 (fixP, valP, seg)
case BFD_RELOC_ARM_THUMB_IMM:
newval = md_chars_to_number (buf, THUMB_SIZE);
- switch (newval >> 11)
- {
- case 0x04: /* 8bit immediate MOV. */
- case 0x05: /* 8bit immediate CMP. */
- if (value < 0 || value > 255)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("invalid immediate: %ld is too large"),
- (long) value);
- newval |= value;
- break;
-
- default:
- abort ();
- }
+ if (value < 0 || value > 255)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("invalid immediate: %ld is too large"),
+ (long) value);
+ newval |= value;
md_number_to_chars (buf, newval, THUMB_SIZE);
break;
case BFD_RELOC_ARM_THUMB_SHIFT:
- /* 5bit shift value (0..31). */
- if (value < 0 || value > 31)
+ /* 5bit shift value (0..32). LSL cannot take 32. */
+ newval = md_chars_to_number (buf, THUMB_SIZE) & 0xf83f;
+ temp = newval & 0xf800;
+ if (value < 0 || value > 32 || (value == 32 && temp == T_OPCODE_LSL_I))
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("illegal Thumb shift value: %ld"), (long) value);
- newval = md_chars_to_number (buf, THUMB_SIZE) & 0xf03f;
+ _("invalid shift value: %ld"), (long) value);
+ /* Shifts of zero must be encoded as LSL. */
+ if (value == 0)
+ newval = (newval & 0x003f) | T_OPCODE_LSL_I;
+ /* Shifts of 32 are encoded as zero. */
+ else if (value == 32)
+ value = 0;
newval |= value << 6;
md_number_to_chars (buf, newval, THUMB_SIZE);
break;
@@ -12723,7 +12358,7 @@ md_apply_fix3 (fixP, valP, seg)
fixP->fx_done = 0;
return;
- case BFD_RELOC_NONE:
+ case BFD_RELOC_UNUSED:
default:
as_bad_where (fixP->fx_file, fixP->fx_line,
_("bad relocation fixup type (%d)"), fixP->fx_r_type);
@@ -12734,28 +12369,25 @@ md_apply_fix3 (fixP, valP, seg)
format. */
arelent *
-tc_gen_reloc (section, fixp)
- asection * section ATTRIBUTE_UNUSED;
- fixS * fixp;
+tc_gen_reloc (asection *section, fixS *fixp)
{
arelent * reloc;
bfd_reloc_code_real_type code;
- reloc = (arelent *) xmalloc (sizeof (arelent));
+ reloc = xmalloc (sizeof (arelent));
- reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ 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;
- /* @@ Why fx_addnumber sometimes and fx_offset other times? */
-#ifndef OBJ_ELF
- if (fixp->fx_pcrel == 0)
- reloc->addend = fixp->fx_offset;
- else
- reloc->addend = fixp->fx_offset = reloc->address;
-#else /* OBJ_ELF */
+ if (fixp->fx_pcrel)
+ {
+ if (section->use_rela_p)
+ fixp->fx_offset -= md_pcrel_from_section (fixp, section);
+ else
+ fixp->fx_offset = reloc->address;
+ }
reloc->addend = fixp->fx_offset;
-#endif
switch (fixp->fx_r_type)
{
@@ -12780,12 +12412,16 @@ tc_gen_reloc (section, fixp)
break;
}
+ case BFD_RELOC_NONE:
case BFD_RELOC_ARM_PCREL_BRANCH:
case BFD_RELOC_ARM_PCREL_BLX:
case BFD_RELOC_RVA:
+ case BFD_RELOC_THUMB_PCREL_BRANCH7:
case BFD_RELOC_THUMB_PCREL_BRANCH9:
case BFD_RELOC_THUMB_PCREL_BRANCH12:
+ case BFD_RELOC_THUMB_PCREL_BRANCH20:
case BFD_RELOC_THUMB_PCREL_BRANCH23:
+ case BFD_RELOC_THUMB_PCREL_BRANCH25:
case BFD_RELOC_THUMB_PCREL_BLX:
case BFD_RELOC_VTABLE_ENTRY:
case BFD_RELOC_VTABLE_INHERIT:
@@ -12804,6 +12440,25 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_ARM_GOT32:
case BFD_RELOC_ARM_GOTOFF:
case BFD_RELOC_ARM_PLT32:
+ case BFD_RELOC_ARM_TARGET1:
+ case BFD_RELOC_ARM_ROSEGREL32:
+ case BFD_RELOC_ARM_SBREL32:
+ case BFD_RELOC_ARM_PREL31:
+ case BFD_RELOC_ARM_TARGET2:
+ case BFD_RELOC_ARM_TLS_LE32:
+ case BFD_RELOC_ARM_TLS_LDO32:
+ case BFD_RELOC_ARM_PCREL_CALL:
+ case BFD_RELOC_ARM_PCREL_JUMP:
+ code = fixp->fx_r_type;
+ break;
+
+ case BFD_RELOC_ARM_TLS_GD32:
+ case BFD_RELOC_ARM_TLS_IE32:
+ case BFD_RELOC_ARM_TLS_LDM32:
+ /* BFD will include the symbol's address in the addend.
+ But we don't want that, so subtract it out again here. */
+ if (!S_IS_COMMON (fixp->fx_addsy))
+ reloc->addend -= (*reloc->sym_ptr_ptr)->value;
code = fixp->fx_r_type;
break;
#endif
@@ -12819,6 +12474,12 @@ tc_gen_reloc (section, fixp)
return NULL;
case BFD_RELOC_ARM_OFFSET_IMM:
+ if (section->use_rela_p)
+ {
+ code = fixp->fx_r_type;
+ break;
+ }
+
if (fixp->fx_addsy != NULL
&& !S_IS_DEFINED (fixp->fx_addsy)
&& S_IS_LOCAL (fixp->fx_addsy))
@@ -12839,16 +12500,19 @@ tc_gen_reloc (section, fixp)
switch (fixp->fx_r_type)
{
+ case BFD_RELOC_NONE: type = "NONE"; break;
case BFD_RELOC_ARM_OFFSET_IMM8: type = "OFFSET_IMM8"; break;
- case BFD_RELOC_ARM_SHIFT_IMM: type = "SHIFT_IMM"; break;
- case BFD_RELOC_ARM_SWI: type = "SWI"; break;
- case BFD_RELOC_ARM_MULTI: type = "MULTI"; break;
- case BFD_RELOC_ARM_CP_OFF_IMM: type = "CP_OFF_IMM"; break;
- case BFD_RELOC_ARM_THUMB_ADD: type = "THUMB_ADD"; break;
+ case BFD_RELOC_ARM_SHIFT_IMM: type = "SHIFT_IMM"; break;
+ case BFD_RELOC_ARM_SMC: type = "SMC"; break;
+ case BFD_RELOC_ARM_SWI: type = "SWI"; break;
+ case BFD_RELOC_ARM_MULTI: type = "MULTI"; break;
+ case BFD_RELOC_ARM_CP_OFF_IMM: type = "CP_OFF_IMM"; break;
+ case BFD_RELOC_ARM_T32_CP_OFF_IMM: type = "T32_CP_OFF_IMM"; break;
+ case BFD_RELOC_ARM_THUMB_ADD: type = "THUMB_ADD"; break;
case BFD_RELOC_ARM_THUMB_SHIFT: type = "THUMB_SHIFT"; break;
- case BFD_RELOC_ARM_THUMB_IMM: type = "THUMB_IMM"; break;
+ case BFD_RELOC_ARM_THUMB_IMM: type = "THUMB_IMM"; break;
case BFD_RELOC_ARM_THUMB_OFFSET: type = "THUMB_OFFSET"; break;
- default: type = _("<unknown>"); break;
+ default: type = _("<unknown>"); break;
}
as_bad_where (fixp->fx_file, fixp->fx_line,
_("cannot represent %s relocation in this object file format"),
@@ -12885,154 +12549,487 @@ tc_gen_reloc (section, fixp)
return reloc;
}
-int
-md_estimate_size_before_relax (fragP, segtype)
- fragS * fragP ATTRIBUTE_UNUSED;
- segT segtype ATTRIBUTE_UNUSED;
-{
- as_fatal (_("md_estimate_size_before_relax\n"));
- return 1;
-}
+/* This fix_new is called by cons via TC_CONS_FIX_NEW. */
-static void
-output_inst (str)
- const char *str;
+void
+cons_fix_new_arm (fragS * frag,
+ int where,
+ int size,
+ expressionS * exp)
{
- char * to = NULL;
+ bfd_reloc_code_real_type type;
+ int pcrel = 0;
- if (inst.error)
+ /* Pick a reloc.
+ FIXME: @@ Should look at CPU word size. */
+ switch (size)
{
- as_bad ("%s -- `%s'", inst.error, str);
- return;
+ case 1:
+ type = BFD_RELOC_8;
+ break;
+ case 2:
+ type = BFD_RELOC_16;
+ break;
+ case 4:
+ default:
+ type = BFD_RELOC_32;
+ break;
+ case 8:
+ type = BFD_RELOC_64;
+ break;
}
- to = frag_more (inst.size);
+ fix_new_exp (frag, where, (int) size, exp, pcrel, type);
+}
- if (thumb_mode && (inst.size > THUMB_SIZE))
- {
- assert (inst.size == (2 * THUMB_SIZE));
- md_number_to_chars (to, inst.instruction >> 16, THUMB_SIZE);
- md_number_to_chars (to + THUMB_SIZE, inst.instruction, THUMB_SIZE);
- }
- else if (inst.size > INSN_SIZE)
+#if defined OBJ_COFF || defined OBJ_ELF
+void
+arm_validate_fix (fixS * fixP)
+{
+ /* If the destination of the branch is a defined symbol which does not have
+ the THUMB_FUNC attribute, then we must be calling a function which has
+ the (interfacearm) attribute. We look for the Thumb entry point to that
+ function and change the branch to refer to that function instead. */
+ if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23
+ && fixP->fx_addsy != NULL
+ && S_IS_DEFINED (fixP->fx_addsy)
+ && ! THUMB_IS_FUNC (fixP->fx_addsy))
{
- assert (inst.size == (2 * INSN_SIZE));
- md_number_to_chars (to, inst.instruction, INSN_SIZE);
- md_number_to_chars (to + INSN_SIZE, inst.instruction, INSN_SIZE);
+ fixP->fx_addsy = find_real_start (fixP->fx_addsy);
}
- else
- md_number_to_chars (to, inst.instruction, inst.size);
+}
+#endif
- if (inst.reloc.type != BFD_RELOC_NONE)
- fix_new_arm (frag_now, to - frag_now->fr_literal,
- inst.size, & inst.reloc.exp, inst.reloc.pc_rel,
- inst.reloc.type);
+int
+arm_force_relocation (struct fix * fixp)
+{
+#if defined (OBJ_COFF) && defined (TE_PE)
+ if (fixp->fx_r_type == BFD_RELOC_RVA)
+ return 1;
+#endif
+
+ /* Resolve these relocations even if the symbol is extern or weak. */
+ 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_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. */
+
+bfd_boolean
+arm_fix_adjustable (fixS * fixP)
+{
+ if (fixP->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE)
+ return 1;
+ return 0;
+}
+#endif
#ifdef OBJ_ELF
- dwarf2_emit_insn (inst.size);
+/* Relocations against Thumb function names must be left unadjusted,
+ so that the linker can use this information to correctly set the
+ bottom bit of their addresses. The MIPS version of this function
+ also prevents relocations that are mips-16 specific, but I do not
+ know why it does this.
+
+ FIXME:
+ There is one other problem that ought to be addressed here, but
+ which currently is not: Taking the address of a label (rather
+ than a function) and then later jumping to that address. Such
+ addresses also ought to have their bottom bit set (assuming that
+ they reside in Thumb code), but at the moment they will not. */
+
+bfd_boolean
+arm_fix_adjustable (fixS * fixP)
+{
+ if (fixP->fx_addsy == NULL)
+ return 1;
+
+ if (THUMB_IS_FUNC (fixP->fx_addsy)
+ && fixP->fx_subsy == NULL)
+ return 0;
+
+ /* We need the symbol name for the VTABLE entries. */
+ if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ return 0;
+
+ /* Don't allow symbols to be discarded on GOT related relocs. */
+ if (fixP->fx_r_type == BFD_RELOC_ARM_PLT32
+ || fixP->fx_r_type == BFD_RELOC_ARM_GOT32
+ || fixP->fx_r_type == BFD_RELOC_ARM_GOTOFF
+ || fixP->fx_r_type == BFD_RELOC_ARM_TLS_GD32
+ || fixP->fx_r_type == BFD_RELOC_ARM_TLS_LE32
+ || fixP->fx_r_type == BFD_RELOC_ARM_TLS_IE32
+ || fixP->fx_r_type == BFD_RELOC_ARM_TLS_LDM32
+ || fixP->fx_r_type == BFD_RELOC_ARM_TLS_LDO32
+ || fixP->fx_r_type == BFD_RELOC_ARM_TARGET2)
+ return 0;
+
+ return 1;
+}
+
+const char *
+elf32_arm_target_format (void)
+{
+#ifdef TE_SYMBIAN
+ return (target_big_endian
+ ? "elf32-bigarm-symbian"
+ : "elf32-littlearm-symbian");
+#elif defined (TE_VXWORKS)
+ return (target_big_endian
+ ? "elf32-bigarm-vxworks"
+ : "elf32-littlearm-vxworks");
+#else
+ if (target_big_endian)
+ return "elf32-bigarm";
+ else
+ return "elf32-littlearm";
#endif
}
void
-md_assemble (str)
- char * str;
+armelf_frob_symbol (symbolS * symp,
+ int * puntp)
{
- char c;
- char *p;
- char *start;
-
- /* Align the instruction.
- This may not be the right thing to do but ... */
-#if 0
- arm_align (2, 0);
+ elf_frob_symbol (symp, puntp);
+}
#endif
- /* Align the previous label if needed. */
- if (last_label_seen != NULL)
- {
- symbol_set_frag (last_label_seen, frag_now);
- S_SET_VALUE (last_label_seen, (valueT) frag_now_fix ());
- S_SET_SEGMENT (last_label_seen, now_seg);
- }
-
- memset (&inst, '\0', sizeof (inst));
- inst.reloc.type = BFD_RELOC_NONE;
+/* MD interface: Finalization. */
- skip_whitespace (str);
+/* A good place to do this, although this was probably not intended
+ for this kind of use. We need to dump the literal pool before
+ references are made to a null symbol pointer. */
- /* Scan up to the end of the op-code, which must end in white space or
- end of string. */
- for (start = p = str; *p != '\0'; p++)
- if (*p == ' ')
- break;
+void
+arm_cleanup (void)
+{
+ literal_pool * pool;
- if (p == str)
+ for (pool = list_of_pools; pool; pool = pool->next)
{
- as_bad (_("no operator -- statement `%s'\n"), str);
- return;
+ /* Put it at the end of the relevent section. */
+ subseg_set (pool->section, pool->sub_section);
+#ifdef OBJ_ELF
+ arm_elf_change_section ();
+#endif
+ s_ltorg (0);
}
+}
- if (thumb_mode)
- {
- const struct thumb_opcode * opcode;
+/* Adjust the symbol table. This marks Thumb symbols as distinct from
+ ARM ones. */
- c = *p;
- *p = '\0';
- opcode = (const struct thumb_opcode *) hash_find (arm_tops_hsh, str);
- *p = c;
+void
+arm_adjust_symtab (void)
+{
+#ifdef OBJ_COFF
+ symbolS * sym;
- if (opcode)
+ for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
+ {
+ if (ARM_IS_THUMB (sym))
{
- /* Check that this instruction is supported for this CPU. */
- if (thumb_mode == 1 && (opcode->variant & cpu_variant) == 0)
+ if (THUMB_IS_FUNC (sym))
{
- as_bad (_("selected processor does not support `%s'"), str);
- return;
- }
+ /* Mark the symbol as a Thumb function. */
+ if ( S_GET_STORAGE_CLASS (sym) == C_STAT
+ || S_GET_STORAGE_CLASS (sym) == C_LABEL) /* This can happen! */
+ S_SET_STORAGE_CLASS (sym, C_THUMBSTATFUNC);
- mapping_state (MAP_THUMB);
- inst.instruction = opcode->value;
- inst.size = opcode->size;
- (*opcode->parms) (p);
- output_inst (str);
- return;
+ else if (S_GET_STORAGE_CLASS (sym) == C_EXT)
+ S_SET_STORAGE_CLASS (sym, C_THUMBEXTFUNC);
+ else
+ as_bad (_("%s: unexpected function type: %d"),
+ S_GET_NAME (sym), S_GET_STORAGE_CLASS (sym));
+ }
+ else switch (S_GET_STORAGE_CLASS (sym))
+ {
+ case C_EXT:
+ S_SET_STORAGE_CLASS (sym, C_THUMBEXT);
+ break;
+ case C_STAT:
+ S_SET_STORAGE_CLASS (sym, C_THUMBSTAT);
+ break;
+ case C_LABEL:
+ S_SET_STORAGE_CLASS (sym, C_THUMBLABEL);
+ break;
+ default:
+ /* Do nothing. */
+ break;
+ }
}
+
+ if (ARM_IS_INTERWORK (sym))
+ coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_flags = 0xFF;
}
- else
+#endif
+#ifdef OBJ_ELF
+ symbolS * sym;
+ char bind;
+
+ for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
{
- const struct asm_opcode * opcode;
+ if (ARM_IS_THUMB (sym))
+ {
+ elf_symbol_type * elf_sym;
- c = *p;
- *p = '\0';
- opcode = (const struct asm_opcode *) hash_find (arm_ops_hsh, str);
- *p = c;
+ elf_sym = elf_symbol (symbol_get_bfdsym (sym));
+ bind = ELF_ST_BIND (elf_sym->internal_elf_sym.st_info);
- if (opcode)
- {
- /* Check that this instruction is supported for this CPU. */
- if ((opcode->variant & cpu_variant) == 0)
+ if (! bfd_is_arm_mapping_symbol_name (elf_sym->symbol.name))
{
- as_bad (_("selected processor does not support `%s'"), str);
- return;
+ /* If it's a .thumb_func, declare it as so,
+ otherwise tag label as .code 16. */
+ if (THUMB_IS_FUNC (sym))
+ elf_sym->internal_elf_sym.st_info =
+ ELF_ST_INFO (bind, STT_ARM_TFUNC);
+ else
+ elf_sym->internal_elf_sym.st_info =
+ ELF_ST_INFO (bind, STT_ARM_16BIT);
}
-
- mapping_state (MAP_ARM);
- inst.instruction = opcode->value;
- inst.size = INSN_SIZE;
- (*opcode->parms) (p);
- output_inst (str);
- return;
}
}
+#endif
+}
- /* It wasn't an instruction, but it might be a register alias of the form
- alias .req reg. */
- if (create_register_alias (str, p))
- return;
+/* MD interface: Initialization. */
+
+static void
+set_constant_flonums (void)
+{
+ int i;
+
+ for (i = 0; i < NUM_FLOAT_VALS; i++)
+ if (atof_ieee ((char *) fp_const[i], 'x', fp_values[i]) == NULL)
+ abort ();
+}
+
+void
+md_begin (void)
+{
+ unsigned mach;
+ unsigned int i;
+
+ if ( (arm_ops_hsh = hash_new ()) == NULL
+ || (arm_cond_hsh = hash_new ()) == NULL
+ || (arm_shift_hsh = hash_new ()) == NULL
+ || (arm_psr_hsh = hash_new ()) == NULL
+ || (arm_v7m_psr_hsh = hash_new ()) == NULL
+ || (arm_reg_hsh = hash_new ()) == NULL
+ || (arm_reloc_hsh = hash_new ()) == NULL
+ || (arm_barrier_opt_hsh = hash_new ()) == NULL)
+ as_fatal (_("virtual memory exhausted"));
+
+ for (i = 0; i < sizeof (insns) / sizeof (struct asm_opcode); i++)
+ hash_insert (arm_ops_hsh, insns[i].template, (PTR) (insns + i));
+ for (i = 0; i < sizeof (conds) / sizeof (struct asm_cond); i++)
+ hash_insert (arm_cond_hsh, conds[i].template, (PTR) (conds + i));
+ for (i = 0; i < sizeof (shift_names) / sizeof (struct asm_shift_name); i++)
+ hash_insert (arm_shift_hsh, shift_names[i].name, (PTR) (shift_names + i));
+ for (i = 0; i < sizeof (psrs) / sizeof (struct asm_psr); i++)
+ hash_insert (arm_psr_hsh, psrs[i].template, (PTR) (psrs + i));
+ for (i = 0; i < sizeof (v7m_psrs) / sizeof (struct asm_psr); i++)
+ hash_insert (arm_v7m_psr_hsh, v7m_psrs[i].template, (PTR) (v7m_psrs + i));
+ for (i = 0; i < sizeof (reg_names) / sizeof (struct reg_entry); i++)
+ hash_insert (arm_reg_hsh, reg_names[i].name, (PTR) (reg_names + i));
+ for (i = 0;
+ i < sizeof (barrier_opt_names) / sizeof (struct asm_barrier_opt);
+ i++)
+ hash_insert (arm_barrier_opt_hsh, barrier_opt_names[i].template,
+ (PTR) (barrier_opt_names + i));
+#ifdef OBJ_ELF
+ for (i = 0; i < sizeof (reloc_names) / sizeof (struct reloc_entry); i++)
+ hash_insert (arm_reloc_hsh, reloc_names[i].name, (PTR) (reloc_names + i));
+#endif
+
+ set_constant_flonums ();
+
+ /* Set the cpu variant based on the command-line options. We prefer
+ -mcpu= over -march= if both are set (as for GCC); and we prefer
+ -mfpu= over any other way of setting the floating point unit.
+ Use of legacy options with new options are faulted. */
+ if (legacy_cpu)
+ {
+ if (mcpu_cpu_opt || march_cpu_opt)
+ as_bad (_("use of old and new-style options to set CPU type"));
+
+ mcpu_cpu_opt = legacy_cpu;
+ }
+ else if (!mcpu_cpu_opt)
+ mcpu_cpu_opt = march_cpu_opt;
+
+ if (legacy_fpu)
+ {
+ if (mfpu_opt)
+ as_bad (_("use of old and new-style options to set FPU type"));
+
+ mfpu_opt = legacy_fpu;
+ }
+ else if (!mfpu_opt)
+ {
+#if !(defined (TE_LINUX) || defined (TE_NetBSD) || defined (TE_VXWORKS))
+ /* Some environments specify a default FPU. If they don't, infer it
+ from the processor. */
+ if (mcpu_fpu_opt)
+ mfpu_opt = mcpu_fpu_opt;
+ else
+ mfpu_opt = march_fpu_opt;
+#else
+ mfpu_opt = &fpu_default;
+#endif
+ }
+
+ if (!mfpu_opt)
+ {
+ if (!mcpu_cpu_opt)
+ mfpu_opt = &fpu_default;
+ else if (ARM_CPU_HAS_FEATURE (*mcpu_fpu_opt, arm_ext_v5))
+ mfpu_opt = &fpu_arch_vfp_v2;
+ else
+ mfpu_opt = &fpu_arch_fpa;
+ }
+
+#ifdef CPU_DEFAULT
+ if (!mcpu_cpu_opt)
+ {
+ mcpu_cpu_opt = &cpu_default;
+ selected_cpu = cpu_default;
+ }
+#else
+ if (mcpu_cpu_opt)
+ selected_cpu = *mcpu_cpu_opt;
+ else
+ mcpu_cpu_opt = &arm_arch_any;
+#endif
+
+ ARM_MERGE_FEATURE_SETS (cpu_variant, *mcpu_cpu_opt, *mfpu_opt);
- as_bad (_("bad instruction `%s'"), start);
+ arm_arch_used = thumb_arch_used = arm_arch_none;
+
+#if defined OBJ_COFF || defined OBJ_ELF
+ {
+ unsigned int flags = 0;
+
+#if defined OBJ_ELF
+ flags = meabi_flags;
+
+ switch (meabi_flags)
+ {
+ case EF_ARM_EABI_UNKNOWN:
+#endif
+ /* Set the flags in the private structure. */
+ if (uses_apcs_26) flags |= F_APCS26;
+ if (support_interwork) flags |= F_INTERWORK;
+ if (uses_apcs_float) flags |= F_APCS_FLOAT;
+ if (pic_code) flags |= F_PIC;
+ if (!ARM_CPU_HAS_FEATURE (cpu_variant, fpu_any_hard))
+ flags |= F_SOFT_FLOAT;
+
+ switch (mfloat_abi_opt)
+ {
+ case ARM_FLOAT_ABI_SOFT:
+ case ARM_FLOAT_ABI_SOFTFP:
+ flags |= F_SOFT_FLOAT;
+ break;
+
+ case ARM_FLOAT_ABI_HARD:
+ if (flags & F_SOFT_FLOAT)
+ as_bad (_("hard-float conflicts with specified fpu"));
+ break;
+ }
+
+ /* Using pure-endian doubles (even if soft-float). */
+ if (ARM_CPU_HAS_FEATURE (cpu_variant, fpu_endian_pure))
+ flags |= F_VFP_FLOAT;
+
+#if defined OBJ_ELF
+ if (ARM_CPU_HAS_FEATURE (cpu_variant, fpu_arch_maverick))
+ flags |= EF_ARM_MAVERICK_FLOAT;
+ break;
+
+ case EF_ARM_EABI_VER4:
+ case EF_ARM_EABI_VER5:
+ /* No additional flags to set. */
+ break;
+
+ default:
+ abort ();
+ }
+#endif
+ bfd_set_private_flags (stdoutput, flags);
+
+ /* We have run out flags in the COFF header to encode the
+ status of ATPCS support, so instead we create a dummy,
+ empty, debug section called .arm.atpcs. */
+ if (atpcs)
+ {
+ asection * sec;
+
+ sec = bfd_make_section (stdoutput, ".arm.atpcs");
+
+ if (sec != NULL)
+ {
+ bfd_set_section_flags
+ (stdoutput, sec, SEC_READONLY | SEC_DEBUGGING /* | SEC_HAS_CONTENTS */);
+ bfd_set_section_size (stdoutput, sec, 0);
+ bfd_set_section_contents (stdoutput, sec, NULL, 0, 0);
+ }
+ }
+ }
+#endif
+
+ /* Record the CPU type as well. */
+ 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;
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_cext_maverick))
+ mach = bfd_mach_arm_ep9312;
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v5e))
+ mach = bfd_mach_arm_5TE;
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v5))
+ {
+ if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v4t))
+ mach = bfd_mach_arm_5T;
+ else
+ mach = bfd_mach_arm_5;
+ }
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v4))
+ {
+ if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v4t))
+ mach = bfd_mach_arm_4T;
+ else
+ mach = bfd_mach_arm_4;
+ }
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v3m))
+ mach = bfd_mach_arm_3M;
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v3))
+ mach = bfd_mach_arm_3;
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v2s))
+ mach = bfd_mach_arm_2a;
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v2))
+ mach = bfd_mach_arm_2;
+ else
+ mach = bfd_mach_arm_unknown;
+
+ bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach);
}
+/* Command line processing. */
+
/* md_parse_option
Invocation line includes a switch not recognized by the base assembler.
See if it's a processor-specific option.
@@ -13065,23 +13062,23 @@ md_assemble (str)
The remaining options are only supported for back-wards compatibility.
Cpu variants, the arm part is optional:
- -m[arm]1 Currently not supported.
- -m[arm]2, -m[arm]250 Arm 2 and Arm 250 processor
- -m[arm]3 Arm 3 processor
- -m[arm]6[xx], Arm 6 processors
- -m[arm]7[xx][t][[d]m] Arm 7 processors
- -m[arm]8[10] Arm 8 processors
- -m[arm]9[20][tdmi] Arm 9 processors
- -mstrongarm[110[0]] StrongARM processors
- -mxscale XScale processors
- -m[arm]v[2345[t[e]]] Arm architectures
- -mall All (except the ARM1)
+ -m[arm]1 Currently not supported.
+ -m[arm]2, -m[arm]250 Arm 2 and Arm 250 processor
+ -m[arm]3 Arm 3 processor
+ -m[arm]6[xx], Arm 6 processors
+ -m[arm]7[xx][t][[d]m] Arm 7 processors
+ -m[arm]8[10] Arm 8 processors
+ -m[arm]9[20][tdmi] Arm 9 processors
+ -mstrongarm[110[0]] StrongARM processors
+ -mxscale XScale processors
+ -m[arm]v[2345[t[e]]] Arm architectures
+ -mall All (except the ARM1)
FP variants:
- -mfpa10, -mfpa11 FPA10 and 11 co-processor instructions
- -mfpe-old (No float load/store multiples)
+ -mfpa10, -mfpa11 FPA10 and 11 co-processor instructions
+ -mfpe-old (No float load/store multiples)
-mvfpxd VFP Single precision
-mvfp All VFP
- -mno-fpu Disable all floating point instructions
+ -mno-fpu Disable all floating point instructions
The following CPU names are recognized:
arm1, arm2, arm250, arm3, arm6, arm600, arm610, arm620,
@@ -13124,18 +13121,17 @@ struct arm_option_table
{
char *option; /* Option name to match. */
char *help; /* Help information. */
- int *var; /* Variable to change. */
- int value; /* What to change it to. */
+ int *var; /* Variable to change. */
+ int value; /* What to change it to. */
char *deprecated; /* If non-null, print this message. */
};
struct arm_option_table arm_opts[] =
{
- {"k", N_("generate PIC code"), &pic_code, 1, NULL},
- {"mthumb", N_("assemble Thumb code"), &thumb_mode, 1, NULL},
+ {"k", N_("generate PIC code"), &pic_code, 1, NULL},
+ {"mthumb", N_("assemble Thumb code"), &thumb_mode, 1, NULL},
{"mthumb-interwork", N_("support ARM/Thumb interworking"),
&support_interwork, 1, NULL},
- {"moabi", N_("use old ABI (ELF only)"), &target_oabi, 1, NULL},
{"mapcs-32", N_("code uses 32-bit program counter"), &uses_apcs_26, 0, NULL},
{"mapcs-26", N_("code uses 26-bit program counter"), &uses_apcs_26, 1, NULL},
{"mapcs-float", N_("floating point args are in fp regs"), &uses_apcs_float,
@@ -13143,218 +13139,252 @@ struct arm_option_table arm_opts[] =
{"mapcs-reentrant", N_("re-entrant code"), &pic_code, 1, NULL},
{"matpcs", N_("code is ATPCS conformant"), &atpcs, 1, NULL},
{"mbig-endian", N_("assemble for big-endian"), &target_big_endian, 1, NULL},
- {"mlittle-endian", N_("assemble for little-endian"), &target_big_endian, 1,
+ {"mlittle-endian", N_("assemble for little-endian"), &target_big_endian, 0,
NULL},
- /* These are recognized by the assembler, but have no affect on code. */
+ /* These are recognized by the assembler, but have no affect on code. */
{"mapcs-frame", N_("use frame pointer"), NULL, 0, NULL},
{"mapcs-stack-check", N_("use stack size checking"), NULL, 0, NULL},
+ {NULL, NULL, NULL, 0, NULL}
+};
+
+struct arm_legacy_option_table
+{
+ char *option; /* Option name to match. */
+ const arm_feature_set **var; /* Variable to change. */
+ const arm_feature_set value; /* What to change it to. */
+ char *deprecated; /* If non-null, print this message. */
+};
+const struct arm_legacy_option_table arm_legacy_opts[] =
+{
/* DON'T add any new processors to this list -- we want the whole list
to go away... Add them to the processors table instead. */
- {"marm1", NULL, &legacy_cpu, ARM_ARCH_V1, N_("use -mcpu=arm1")},
- {"m1", NULL, &legacy_cpu, ARM_ARCH_V1, N_("use -mcpu=arm1")},
- {"marm2", NULL, &legacy_cpu, ARM_ARCH_V2, N_("use -mcpu=arm2")},
- {"m2", NULL, &legacy_cpu, ARM_ARCH_V2, N_("use -mcpu=arm2")},
- {"marm250", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm250")},
- {"m250", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm250")},
- {"marm3", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm3")},
- {"m3", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm3")},
- {"marm6", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm6")},
- {"m6", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm6")},
- {"marm600", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm600")},
- {"m600", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm600")},
- {"marm610", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm610")},
- {"m610", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm610")},
- {"marm620", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm620")},
- {"m620", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm620")},
- {"marm7", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7")},
- {"m7", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7")},
- {"marm70", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm70")},
- {"m70", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm70")},
- {"marm700", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700")},
- {"m700", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700")},
- {"marm700i", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700i")},
- {"m700i", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700i")},
- {"marm710", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710")},
- {"m710", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710")},
- {"marm710c", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710c")},
- {"m710c", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710c")},
- {"marm720", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm720")},
- {"m720", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm720")},
- {"marm7d", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7d")},
- {"m7d", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7d")},
- {"marm7di", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7di")},
- {"m7di", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7di")},
- {"marm7m", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7m")},
- {"m7m", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7m")},
- {"marm7dm", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dm")},
- {"m7dm", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dm")},
- {"marm7dmi", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dmi")},
- {"m7dmi", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dmi")},
- {"marm7100", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7100")},
- {"m7100", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7100")},
- {"marm7500", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500")},
- {"m7500", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500")},
- {"marm7500fe", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500fe")},
- {"m7500fe", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500fe")},
- {"marm7t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
- {"m7t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
- {"marm7tdmi", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
- {"m7tdmi", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
- {"marm710t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm710t")},
- {"m710t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm710t")},
- {"marm720t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm720t")},
- {"m720t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm720t")},
- {"marm740t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm740t")},
- {"m740t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm740t")},
- {"marm8", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm8")},
- {"m8", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm8")},
- {"marm810", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm810")},
- {"m810", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm810")},
- {"marm9", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9")},
- {"m9", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9")},
- {"marm9tdmi", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9tdmi")},
- {"m9tdmi", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9tdmi")},
- {"marm920", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm920")},
- {"m920", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm920")},
- {"marm940", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm940")},
- {"m940", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm940")},
- {"mstrongarm", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=strongarm")},
- {"mstrongarm110", NULL, &legacy_cpu, ARM_ARCH_V4,
+ {"marm1", &legacy_cpu, ARM_ARCH_V1, N_("use -mcpu=arm1")},
+ {"m1", &legacy_cpu, ARM_ARCH_V1, N_("use -mcpu=arm1")},
+ {"marm2", &legacy_cpu, ARM_ARCH_V2, N_("use -mcpu=arm2")},
+ {"m2", &legacy_cpu, ARM_ARCH_V2, N_("use -mcpu=arm2")},
+ {"marm250", &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm250")},
+ {"m250", &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm250")},
+ {"marm3", &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm3")},
+ {"m3", &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm3")},
+ {"marm6", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm6")},
+ {"m6", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm6")},
+ {"marm600", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm600")},
+ {"m600", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm600")},
+ {"marm610", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm610")},
+ {"m610", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm610")},
+ {"marm620", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm620")},
+ {"m620", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm620")},
+ {"marm7", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7")},
+ {"m7", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7")},
+ {"marm70", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm70")},
+ {"m70", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm70")},
+ {"marm700", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700")},
+ {"m700", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700")},
+ {"marm700i", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700i")},
+ {"m700i", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700i")},
+ {"marm710", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710")},
+ {"m710", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710")},
+ {"marm710c", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710c")},
+ {"m710c", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710c")},
+ {"marm720", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm720")},
+ {"m720", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm720")},
+ {"marm7d", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7d")},
+ {"m7d", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7d")},
+ {"marm7di", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7di")},
+ {"m7di", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7di")},
+ {"marm7m", &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7m")},
+ {"m7m", &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7m")},
+ {"marm7dm", &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dm")},
+ {"m7dm", &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dm")},
+ {"marm7dmi", &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dmi")},
+ {"m7dmi", &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dmi")},
+ {"marm7100", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7100")},
+ {"m7100", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7100")},
+ {"marm7500", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500")},
+ {"m7500", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500")},
+ {"marm7500fe", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500fe")},
+ {"m7500fe", &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500fe")},
+ {"marm7t", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
+ {"m7t", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
+ {"marm7tdmi", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
+ {"m7tdmi", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
+ {"marm710t", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm710t")},
+ {"m710t", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm710t")},
+ {"marm720t", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm720t")},
+ {"m720t", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm720t")},
+ {"marm740t", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm740t")},
+ {"m740t", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm740t")},
+ {"marm8", &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm8")},
+ {"m8", &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm8")},
+ {"marm810", &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm810")},
+ {"m810", &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm810")},
+ {"marm9", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9")},
+ {"m9", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9")},
+ {"marm9tdmi", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9tdmi")},
+ {"m9tdmi", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9tdmi")},
+ {"marm920", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm920")},
+ {"m920", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm920")},
+ {"marm940", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm940")},
+ {"m940", &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm940")},
+ {"mstrongarm", &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=strongarm")},
+ {"mstrongarm110", &legacy_cpu, ARM_ARCH_V4,
N_("use -mcpu=strongarm110")},
- {"mstrongarm1100", NULL, &legacy_cpu, ARM_ARCH_V4,
+ {"mstrongarm1100", &legacy_cpu, ARM_ARCH_V4,
N_("use -mcpu=strongarm1100")},
- {"mstrongarm1110", NULL, &legacy_cpu, ARM_ARCH_V4,
+ {"mstrongarm1110", &legacy_cpu, ARM_ARCH_V4,
N_("use -mcpu=strongarm1110")},
- {"mxscale", NULL, &legacy_cpu, ARM_ARCH_XSCALE, N_("use -mcpu=xscale")},
- {"miwmmxt", NULL, &legacy_cpu, ARM_ARCH_IWMMXT, N_("use -mcpu=iwmmxt")},
- {"mall", NULL, &legacy_cpu, ARM_ANY, N_("use -mcpu=all")},
+ {"mxscale", &legacy_cpu, ARM_ARCH_XSCALE, N_("use -mcpu=xscale")},
+ {"miwmmxt", &legacy_cpu, ARM_ARCH_IWMMXT, N_("use -mcpu=iwmmxt")},
+ {"mall", &legacy_cpu, ARM_ANY, N_("use -mcpu=all")},
/* Architecture variants -- don't add any more to this list either. */
- {"mv2", NULL, &legacy_cpu, ARM_ARCH_V2, N_("use -march=armv2")},
- {"marmv2", NULL, &legacy_cpu, ARM_ARCH_V2, N_("use -march=armv2")},
- {"mv2a", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -march=armv2a")},
- {"marmv2a", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -march=armv2a")},
- {"mv3", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -march=armv3")},
- {"marmv3", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -march=armv3")},
- {"mv3m", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -march=armv3m")},
- {"marmv3m", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -march=armv3m")},
- {"mv4", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -march=armv4")},
- {"marmv4", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -march=armv4")},
- {"mv4t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -march=armv4t")},
- {"marmv4t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -march=armv4t")},
- {"mv5", NULL, &legacy_cpu, ARM_ARCH_V5, N_("use -march=armv5")},
- {"marmv5", NULL, &legacy_cpu, ARM_ARCH_V5, N_("use -march=armv5")},
- {"mv5t", NULL, &legacy_cpu, ARM_ARCH_V5T, N_("use -march=armv5t")},
- {"marmv5t", NULL, &legacy_cpu, ARM_ARCH_V5T, N_("use -march=armv5t")},
- {"mv5e", NULL, &legacy_cpu, ARM_ARCH_V5TE, N_("use -march=armv5te")},
- {"marmv5e", NULL, &legacy_cpu, ARM_ARCH_V5TE, N_("use -march=armv5te")},
-
- /* Floating point variants -- don't add any more to this list either. */
- {"mfpe-old", NULL, &legacy_fpu, FPU_ARCH_FPE, N_("use -mfpu=fpe")},
- {"mfpa10", NULL, &legacy_fpu, FPU_ARCH_FPA, N_("use -mfpu=fpa10")},
- {"mfpa11", NULL, &legacy_fpu, FPU_ARCH_FPA, N_("use -mfpu=fpa11")},
- {"mno-fpu", NULL, &legacy_fpu, 0,
+ {"mv2", &legacy_cpu, ARM_ARCH_V2, N_("use -march=armv2")},
+ {"marmv2", &legacy_cpu, ARM_ARCH_V2, N_("use -march=armv2")},
+ {"mv2a", &legacy_cpu, ARM_ARCH_V2S, N_("use -march=armv2a")},
+ {"marmv2a", &legacy_cpu, ARM_ARCH_V2S, N_("use -march=armv2a")},
+ {"mv3", &legacy_cpu, ARM_ARCH_V3, N_("use -march=armv3")},
+ {"marmv3", &legacy_cpu, ARM_ARCH_V3, N_("use -march=armv3")},
+ {"mv3m", &legacy_cpu, ARM_ARCH_V3M, N_("use -march=armv3m")},
+ {"marmv3m", &legacy_cpu, ARM_ARCH_V3M, N_("use -march=armv3m")},
+ {"mv4", &legacy_cpu, ARM_ARCH_V4, N_("use -march=armv4")},
+ {"marmv4", &legacy_cpu, ARM_ARCH_V4, N_("use -march=armv4")},
+ {"mv4t", &legacy_cpu, ARM_ARCH_V4T, N_("use -march=armv4t")},
+ {"marmv4t", &legacy_cpu, ARM_ARCH_V4T, N_("use -march=armv4t")},
+ {"mv5", &legacy_cpu, ARM_ARCH_V5, N_("use -march=armv5")},
+ {"marmv5", &legacy_cpu, ARM_ARCH_V5, N_("use -march=armv5")},
+ {"mv5t", &legacy_cpu, ARM_ARCH_V5T, N_("use -march=armv5t")},
+ {"marmv5t", &legacy_cpu, ARM_ARCH_V5T, N_("use -march=armv5t")},
+ {"mv5e", &legacy_cpu, ARM_ARCH_V5TE, N_("use -march=armv5te")},
+ {"marmv5e", &legacy_cpu, ARM_ARCH_V5TE, N_("use -march=armv5te")},
+
+ /* Floating point variants -- don't add any more to this list either. */
+ {"mfpe-old", &legacy_fpu, FPU_ARCH_FPE, N_("use -mfpu=fpe")},
+ {"mfpa10", &legacy_fpu, FPU_ARCH_FPA, N_("use -mfpu=fpa10")},
+ {"mfpa11", &legacy_fpu, FPU_ARCH_FPA, N_("use -mfpu=fpa11")},
+ {"mno-fpu", &legacy_fpu, ARM_ARCH_NONE,
N_("use either -mfpu=softfpa or -mfpu=softvfp")},
- {NULL, NULL, NULL, 0, NULL}
+ {NULL, NULL, ARM_ARCH_NONE, NULL}
};
struct arm_cpu_option_table
{
char *name;
- int value;
+ const arm_feature_set value;
/* For some CPUs we assume an FPU unless the user explicitly sets
- -mfpu=... */
- int default_fpu;
+ -mfpu=... */
+ const arm_feature_set default_fpu;
+ /* The canonical name of the CPU, or NULL to use NAME converted to upper
+ case. */
+ const char *canonical_name;
};
/* This list should, at a minimum, contain all the cpu names
recognized by GCC. */
-static struct arm_cpu_option_table arm_cpus[] =
-{
- {"all", ARM_ANY, FPU_ARCH_FPA},
- {"arm1", ARM_ARCH_V1, FPU_ARCH_FPA},
- {"arm2", ARM_ARCH_V2, FPU_ARCH_FPA},
- {"arm250", ARM_ARCH_V2S, FPU_ARCH_FPA},
- {"arm3", ARM_ARCH_V2S, FPU_ARCH_FPA},
- {"arm6", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm60", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm600", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm610", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm620", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm7", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm7m", ARM_ARCH_V3M, FPU_ARCH_FPA},
- {"arm7d", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm7dm", ARM_ARCH_V3M, FPU_ARCH_FPA},
- {"arm7di", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm7dmi", ARM_ARCH_V3M, FPU_ARCH_FPA},
- {"arm70", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm700", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm700i", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm710", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm710t", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm720", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm720t", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm740t", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm710c", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm7100", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm7500", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm7500fe", ARM_ARCH_V3, FPU_ARCH_FPA},
- {"arm7t", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm7tdmi", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm8", ARM_ARCH_V4, FPU_ARCH_FPA},
- {"arm810", ARM_ARCH_V4, FPU_ARCH_FPA},
- {"strongarm", ARM_ARCH_V4, FPU_ARCH_FPA},
- {"strongarm1", ARM_ARCH_V4, FPU_ARCH_FPA},
- {"strongarm110", ARM_ARCH_V4, FPU_ARCH_FPA},
- {"strongarm1100", ARM_ARCH_V4, FPU_ARCH_FPA},
- {"strongarm1110", ARM_ARCH_V4, FPU_ARCH_FPA},
- {"arm9", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm920", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm920t", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm922t", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm940t", ARM_ARCH_V4T, FPU_ARCH_FPA},
- {"arm9tdmi", ARM_ARCH_V4T, FPU_ARCH_FPA},
+static const struct arm_cpu_option_table arm_cpus[] =
+{
+ {"all", ARM_ANY, FPU_ARCH_FPA, NULL},
+ {"arm1", ARM_ARCH_V1, FPU_ARCH_FPA, NULL},
+ {"arm2", ARM_ARCH_V2, FPU_ARCH_FPA, NULL},
+ {"arm250", ARM_ARCH_V2S, FPU_ARCH_FPA, NULL},
+ {"arm3", ARM_ARCH_V2S, FPU_ARCH_FPA, NULL},
+ {"arm6", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm60", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm600", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm610", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm620", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm7", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm7m", ARM_ARCH_V3M, FPU_ARCH_FPA, NULL},
+ {"arm7d", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm7dm", ARM_ARCH_V3M, FPU_ARCH_FPA, NULL},
+ {"arm7di", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm7dmi", ARM_ARCH_V3M, FPU_ARCH_FPA, NULL},
+ {"arm70", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm700", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm700i", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm710", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm710t", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm720", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm720t", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm740t", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm710c", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm7100", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm7500", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm7500fe", ARM_ARCH_V3, FPU_ARCH_FPA, NULL},
+ {"arm7t", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm7tdmi", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm7tdmi-s", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm8", ARM_ARCH_V4, FPU_ARCH_FPA, NULL},
+ {"arm810", ARM_ARCH_V4, FPU_ARCH_FPA, NULL},
+ {"strongarm", ARM_ARCH_V4, FPU_ARCH_FPA, NULL},
+ {"strongarm1", ARM_ARCH_V4, FPU_ARCH_FPA, NULL},
+ {"strongarm110", ARM_ARCH_V4, FPU_ARCH_FPA, NULL},
+ {"strongarm1100", ARM_ARCH_V4, FPU_ARCH_FPA, NULL},
+ {"strongarm1110", ARM_ARCH_V4, FPU_ARCH_FPA, NULL},
+ {"arm9", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm920", ARM_ARCH_V4T, FPU_ARCH_FPA, "ARM920T"},
+ {"arm920t", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm922t", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm940t", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
+ {"arm9tdmi", ARM_ARCH_V4T, FPU_ARCH_FPA, NULL},
/* For V5 or later processors we default to using VFP; but the user
- should really set the FPU type explicitly. */
- {"arm9e-r0", ARM_ARCH_V5TExP, FPU_ARCH_VFP_V2},
- {"arm9e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
- {"arm926ej", ARM_ARCH_V5TEJ, FPU_ARCH_VFP_V2},
- {"arm926ejs", ARM_ARCH_V5TEJ, FPU_ARCH_VFP_V2},
- {"arm946e-r0", ARM_ARCH_V5TExP, FPU_ARCH_VFP_V2},
- {"arm946e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
- {"arm966e-r0", ARM_ARCH_V5TExP, FPU_ARCH_VFP_V2},
- {"arm966e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
- {"arm10t", ARM_ARCH_V5T, FPU_ARCH_VFP_V1},
- {"arm10e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
- {"arm1020", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
- {"arm1020t", ARM_ARCH_V5T, FPU_ARCH_VFP_V1},
- {"arm1020e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
- {"arm1026ejs", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
- {"arm1136js", ARM_ARCH_V6, FPU_NONE},
- {"arm1136jfs", ARM_ARCH_V6, FPU_ARCH_VFP_V2},
+ should really set the FPU type explicitly. */
+ {"arm9e-r0", ARM_ARCH_V5TExP, FPU_ARCH_VFP_V2, NULL},
+ {"arm9e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, NULL},
+ {"arm926ej", ARM_ARCH_V5TEJ, FPU_ARCH_VFP_V2, "ARM926EJ-S"},
+ {"arm926ejs", ARM_ARCH_V5TEJ, FPU_ARCH_VFP_V2, "ARM926EJ-S"},
+ {"arm926ej-s", ARM_ARCH_V5TEJ, FPU_ARCH_VFP_V2, NULL},
+ {"arm946e-r0", ARM_ARCH_V5TExP, FPU_ARCH_VFP_V2, NULL},
+ {"arm946e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, "ARM946E-S"},
+ {"arm946e-s", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, NULL},
+ {"arm966e-r0", ARM_ARCH_V5TExP, FPU_ARCH_VFP_V2, NULL},
+ {"arm966e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, "ARM966E-S"},
+ {"arm966e-s", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, NULL},
+ {"arm968e-s", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, NULL},
+ {"arm10t", ARM_ARCH_V5T, FPU_ARCH_VFP_V1, NULL},
+ {"arm10tdmi", ARM_ARCH_V5T, FPU_ARCH_VFP_V1, NULL},
+ {"arm10e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, NULL},
+ {"arm1020", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, "ARM1020E"},
+ {"arm1020t", ARM_ARCH_V5T, FPU_ARCH_VFP_V1, NULL},
+ {"arm1020e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, NULL},
+ {"arm1022e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2, NULL},
+ {"arm1026ejs", ARM_ARCH_V5TEJ, FPU_ARCH_VFP_V2, "ARM1026EJ-S"},
+ {"arm1026ej-s", ARM_ARCH_V5TEJ, FPU_ARCH_VFP_V2, NULL},
+ {"arm1136js", ARM_ARCH_V6, FPU_NONE, "ARM1136J-S"},
+ {"arm1136j-s", ARM_ARCH_V6, FPU_NONE, NULL},
+ {"arm1136jfs", ARM_ARCH_V6, FPU_ARCH_VFP_V2, "ARM1136JF-S"},
+ {"arm1136jf-s", ARM_ARCH_V6, FPU_ARCH_VFP_V2, NULL},
+ {"mpcore", ARM_ARCH_V6K, FPU_ARCH_VFP_V2, NULL},
+ {"mpcorenovfp", ARM_ARCH_V6K, FPU_NONE, NULL},
+ {"arm1156t2-s", ARM_ARCH_V6T2, FPU_NONE, NULL},
+ {"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-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},
+ {"xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2, NULL},
/* ??? iwmmxt is not a processor. */
- {"iwmmxt", ARM_ARCH_IWMMXT, FPU_ARCH_VFP_V2},
- {"i80200", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2},
+ {"iwmmxt", ARM_ARCH_IWMMXT, FPU_ARCH_VFP_V2, NULL},
+ {"i80200", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2, NULL},
/* Maverick */
- {"ep9312", ARM_ARCH_V4T | ARM_CEXT_MAVERICK, FPU_ARCH_MAVERICK},
- {NULL, 0, 0}
+ {"ep9312", ARM_FEATURE(ARM_AEXT_V4T, ARM_CEXT_MAVERICK), FPU_ARCH_MAVERICK, "ARM920T"},
+ {NULL, ARM_ARCH_NONE, ARM_ARCH_NONE, NULL}
};
struct arm_arch_option_table
{
char *name;
- int value;
- int default_fpu;
+ const arm_feature_set value;
+ const arm_feature_set default_fpu;
};
/* This list should, at a minimum, contain all the architecture names
recognized by GCC. */
-static struct arm_arch_option_table arm_archs[] =
+static const struct arm_arch_option_table arm_archs[] =
{
{"all", ARM_ANY, FPU_ARCH_FPA},
{"armv1", ARM_ARCH_V1, FPU_ARCH_FPA},
@@ -13372,38 +13402,43 @@ static struct arm_arch_option_table arm_archs[] =
{"armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP},
{"armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP},
{"armv5texp", ARM_ARCH_V5TExP, FPU_ARCH_VFP},
- {"armv5tej", ARM_ARCH_V5TEJ, FPU_ARCH_VFP},
- {"armv6", ARM_ARCH_V6, FPU_ARCH_VFP},
- {"armv6j", ARM_ARCH_V6, FPU_ARCH_VFP},
+ {"armv5tej", ARM_ARCH_V5TEJ, FPU_ARCH_VFP},
+ {"armv6", ARM_ARCH_V6, FPU_ARCH_VFP},
+ {"armv6j", ARM_ARCH_V6, FPU_ARCH_VFP},
+ {"armv6k", ARM_ARCH_V6K, FPU_ARCH_VFP},
+ {"armv6z", ARM_ARCH_V6Z, FPU_ARCH_VFP},
+ {"armv6zk", ARM_ARCH_V6ZK, FPU_ARCH_VFP},
+ {"armv6t2", ARM_ARCH_V6T2, FPU_ARCH_VFP},
+ {"armv6kt2", ARM_ARCH_V6KT2, FPU_ARCH_VFP},
+ {"armv6zt2", ARM_ARCH_V6ZT2, FPU_ARCH_VFP},
+ {"armv6zkt2", ARM_ARCH_V6ZKT2, FPU_ARCH_VFP},
+ {"armv7", ARM_ARCH_V7, FPU_ARCH_VFP},
+ {"armv7a", ARM_ARCH_V7A, FPU_ARCH_VFP},
+ {"armv7r", ARM_ARCH_V7R, FPU_ARCH_VFP},
+ {"armv7m", ARM_ARCH_V7M, FPU_ARCH_VFP},
{"xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP},
{"iwmmxt", ARM_ARCH_IWMMXT, FPU_ARCH_VFP},
- {NULL, 0, 0}
+ {NULL, ARM_ARCH_NONE, ARM_ARCH_NONE}
};
/* ISA extensions in the co-processor space. */
-struct arm_arch_extension_table
+struct arm_option_cpu_value_table
{
char *name;
- int value;
+ const arm_feature_set value;
};
-static struct arm_arch_extension_table arm_extensions[] =
+static const struct arm_option_cpu_value_table arm_extensions[] =
{
- {"maverick", ARM_CEXT_MAVERICK},
- {"xscale", ARM_CEXT_XSCALE},
- {"iwmmxt", ARM_CEXT_IWMMXT},
- {NULL, 0}
-};
-
-struct arm_fpu_option_table
-{
- char *name;
- int value;
+ {"maverick", ARM_FEATURE (0, ARM_CEXT_MAVERICK)},
+ {"xscale", ARM_FEATURE (0, ARM_CEXT_XSCALE)},
+ {"iwmmxt", ARM_FEATURE (0, ARM_CEXT_IWMMXT)},
+ {NULL, ARM_ARCH_NONE}
};
/* This list should, at a minimum, contain all the fpu names
recognized by GCC. */
-static struct arm_fpu_option_table arm_fpus[] =
+static const struct arm_option_cpu_value_table arm_fpus[] =
{
{"softfpa", FPU_NONE},
{"fpe", FPU_ARCH_FPE},
@@ -13423,41 +13458,57 @@ static struct arm_fpu_option_table arm_fpus[] =
{"arm1020t", FPU_ARCH_VFP_V1},
{"arm1020e", FPU_ARCH_VFP_V2},
{"arm1136jfs", FPU_ARCH_VFP_V2},
+ {"arm1136jf-s", FPU_ARCH_VFP_V2},
{"maverick", FPU_ARCH_MAVERICK},
- {NULL, 0}
+ {NULL, ARM_ARCH_NONE}
};
-struct arm_float_abi_option_table
+struct arm_option_value_table
{
char *name;
- int value;
+ long value;
};
-static struct arm_float_abi_option_table arm_float_abis[] =
+static const struct arm_option_value_table arm_float_abis[] =
{
{"hard", ARM_FLOAT_ABI_HARD},
{"softfp", ARM_FLOAT_ABI_SOFTFP},
{"soft", ARM_FLOAT_ABI_SOFT},
- {NULL, 0}
+ {NULL, 0}
};
+#ifdef OBJ_ELF
+/* We only know how to output GNU and ver 4/5 (AAELF) formats. */
+static const struct arm_option_value_table arm_eabis[] =
+{
+ {"gnu", EF_ARM_EABI_UNKNOWN},
+ {"4", EF_ARM_EABI_VER4},
+ {"5", EF_ARM_EABI_VER5},
+ {NULL, 0}
+};
+#endif
+
struct arm_long_option_table
{
- char *option; /* Substring to match. */
- char *help; /* Help information. */
- int (*func) PARAMS ((char *subopt)); /* Function to decode sub-option. */
- char *deprecated; /* If non-null, print this message. */
+ char * option; /* Substring to match. */
+ char * help; /* Help information. */
+ int (* func) (char * subopt); /* Function to decode sub-option. */
+ char * deprecated; /* If non-null, print this message. */
};
static int
-arm_parse_extension (str, opt_p)
- char *str;
- int *opt_p;
+arm_parse_extension (char * str, const arm_feature_set **opt_p)
{
+ arm_feature_set *ext_set = xmalloc (sizeof (arm_feature_set));
+
+ /* Copy the feature set, so that we can modify it. */
+ *ext_set = **opt_p;
+ *opt_p = ext_set;
+
while (str != NULL && *str != 0)
{
- struct arm_arch_extension_table *opt;
- char *ext;
+ const struct arm_option_cpu_value_table * opt;
+ char * ext;
int optlen;
if (*str != '+')
@@ -13483,7 +13534,7 @@ arm_parse_extension (str, opt_p)
for (opt = arm_extensions; opt->name != NULL; opt++)
if (strncmp (opt->name, str, optlen) == 0)
{
- *opt_p |= opt->value;
+ ARM_MERGE_FEATURE_SETS (*ext_set, *ext_set, opt->value);
break;
}
@@ -13500,11 +13551,10 @@ arm_parse_extension (str, opt_p)
}
static int
-arm_parse_cpu (str)
- char *str;
+arm_parse_cpu (char * str)
{
- struct arm_cpu_option_table *opt;
- char *ext = strchr (str, '+');
+ const struct arm_cpu_option_table * opt;
+ char * ext = strchr (str, '+');
int optlen;
if (ext != NULL)
@@ -13521,8 +13571,17 @@ arm_parse_cpu (str)
for (opt = arm_cpus; opt->name != NULL; opt++)
if (strncmp (opt->name, str, optlen) == 0)
{
- mcpu_cpu_opt = opt->value;
- mcpu_fpu_opt = opt->default_fpu;
+ mcpu_cpu_opt = &opt->value;
+ mcpu_fpu_opt = &opt->default_fpu;
+ if (opt->canonical_name)
+ strcpy(selected_cpu_name, opt->canonical_name);
+ else
+ {
+ int i;
+ for (i = 0; i < optlen; i++)
+ selected_cpu_name[i] = TOUPPER (opt->name[i]);
+ selected_cpu_name[i] = 0;
+ }
if (ext != NULL)
return arm_parse_extension (ext, &mcpu_cpu_opt);
@@ -13535,10 +13594,9 @@ arm_parse_cpu (str)
}
static int
-arm_parse_arch (str)
- char *str;
+arm_parse_arch (char * str)
{
- struct arm_arch_option_table *opt;
+ const struct arm_arch_option_table *opt;
char *ext = strchr (str, '+');
int optlen;
@@ -13553,12 +13611,12 @@ arm_parse_arch (str)
return 0;
}
-
for (opt = arm_archs; opt->name != NULL; opt++)
- if (strcmp (opt->name, str) == 0)
+ if (streq (opt->name, str))
{
- march_cpu_opt = opt->value;
- march_fpu_opt = opt->default_fpu;
+ march_cpu_opt = &opt->value;
+ march_fpu_opt = &opt->default_fpu;
+ strcpy(selected_cpu_name, opt->name);
if (ext != NULL)
return arm_parse_extension (ext, &march_cpu_opt);
@@ -13571,15 +13629,14 @@ arm_parse_arch (str)
}
static int
-arm_parse_fpu (str)
- char *str;
+arm_parse_fpu (char * str)
{
- struct arm_fpu_option_table *opt;
+ const struct arm_option_cpu_value_table * opt;
for (opt = arm_fpus; opt->name != NULL; opt++)
- if (strcmp (opt->name, str) == 0)
+ if (streq (opt->name, str))
{
- mfpu_opt = opt->value;
+ mfpu_opt = &opt->value;
return 1;
}
@@ -13588,13 +13645,12 @@ arm_parse_fpu (str)
}
static int
-arm_parse_float_abi (str)
- char * str;
+arm_parse_float_abi (char * str)
{
- struct arm_float_abi_option_table *opt;
+ const struct arm_option_value_table * opt;
for (opt = arm_float_abis; opt->name != NULL; opt++)
- if (strcmp (opt->name, str) == 0)
+ if (streq (opt->name, str))
{
mfloat_abi_opt = opt->value;
return 1;
@@ -13604,6 +13660,23 @@ arm_parse_float_abi (str)
return 0;
}
+#ifdef OBJ_ELF
+static int
+arm_parse_eabi (char * str)
+{
+ const struct arm_option_value_table *opt;
+
+ for (opt = arm_eabis; opt->name != NULL; opt++)
+ if (streq (opt->name, str))
+ {
+ meabi_flags = opt->value;
+ return 1;
+ }
+ as_bad (_("unknown EABI `%s'\n"), str);
+ return 0;
+}
+#endif
+
struct arm_long_option_table arm_long_opts[] =
{
{"mcpu=", N_("<cpu name>\t assemble for CPU <cpu name>"),
@@ -13614,15 +13687,18 @@ struct arm_long_option_table arm_long_opts[] =
arm_parse_fpu, NULL},
{"mfloat-abi=", N_("<abi>\t assemble for floating point ABI <abi>"),
arm_parse_float_abi, NULL},
+#ifdef OBJ_ELF
+ {"meabi=", N_("<ver>\t assemble for eabi version <ver>"),
+ arm_parse_eabi, NULL},
+#endif
{NULL, NULL, 0, NULL}
};
int
-md_parse_option (c, arg)
- int c;
- char * arg;
+md_parse_option (int c, char * arg)
{
struct arm_option_table *opt;
+ const struct arm_legacy_option_table *fopt;
struct arm_long_option_table *lopt;
switch (c)
@@ -13641,7 +13717,7 @@ md_parse_option (c, arg)
case 'a':
/* Listing option. Just ignore these, we don't support additional
- ones. */
+ ones. */
return 0;
default:
@@ -13649,7 +13725,7 @@ md_parse_option (c, arg)
{
if (c == opt->option[0]
&& ((arg == NULL && opt->option[1] == 0)
- || strcmp (arg, opt->option + 1) == 0))
+ || streq (arg, opt->option + 1)))
{
#if WARN_DEPRECATED
/* If the option is deprecated, tell the user. */
@@ -13665,6 +13741,26 @@ md_parse_option (c, arg)
}
}
+ for (fopt = arm_legacy_opts; fopt->option != NULL; fopt++)
+ {
+ if (c == fopt->option[0]
+ && ((arg == NULL && fopt->option[1] == 0)
+ || streq (arg, fopt->option + 1)))
+ {
+#if WARN_DEPRECATED
+ /* If the option is deprecated, tell the user. */
+ if (fopt->deprecated != NULL)
+ as_tsktsk (_("option `-%c%s' is deprecated: %s"), c,
+ arg ? arg : "", _(fopt->deprecated));
+#endif
+
+ if (fopt->var != NULL)
+ *fopt->var = &fopt->value;
+
+ return 1;
+ }
+ }
+
for (lopt = arm_long_opts; lopt->option != NULL; lopt++)
{
/* These options are expected to have an argument. */
@@ -13681,11 +13777,10 @@ md_parse_option (c, arg)
#endif
/* Call the sup-option parser. */
- return (*lopt->func)(arg + strlen (lopt->option) - 1);
+ return lopt->func (arg + strlen (lopt->option) - 1);
}
}
- as_bad (_("unrecognized option `-%c%s'"), c, arg ? arg : "");
return 0;
}
@@ -13693,8 +13788,7 @@ md_parse_option (c, arg)
}
void
-md_show_usage (fp)
- FILE * fp;
+md_show_usage (FILE * fp)
{
struct arm_option_table *opt;
struct arm_long_option_table *lopt;
@@ -13720,581 +13814,229 @@ md_show_usage (fp)
#endif
}
-/* We need to be able to fix up arbitrary expressions in some statements.
- This is so that we can handle symbols that are an arbitrary distance from
- the pc. The most common cases are of the form ((+/-sym -/+ . - 8) & mask),
- which returns part of an address in a form which will be valid for
- a data instruction. We do this by pushing the expression into a symbol
- in the expr_section, and creating a fix for that. */
-
-static void
-fix_new_arm (frag, where, size, exp, pc_rel, reloc)
- fragS * frag;
- int where;
- short int size;
- expressionS * exp;
- int pc_rel;
- int reloc;
-{
- fixS * new_fix;
- arm_fix_data * arm_data;
-
- switch (exp->X_op)
- {
- case O_constant:
- case O_symbol:
- case O_add:
- case O_subtract:
- new_fix = fix_new_exp (frag, where, size, exp, pc_rel, reloc);
- break;
-
- default:
- new_fix = fix_new (frag, where, size, make_expr_symbol (exp), 0,
- pc_rel, reloc);
- break;
- }
-
- /* Mark whether the fix is to a THUMB instruction, or an ARM
- instruction. */
- arm_data = (arm_fix_data *) obstack_alloc (& notes, sizeof (arm_fix_data));
- new_fix->tc_fix_data = (PTR) arm_data;
- arm_data->thumb_mode = thumb_mode;
-}
-
-/* This fix_new is called by cons via TC_CONS_FIX_NEW. */
-
-void
-cons_fix_new_arm (frag, where, size, exp)
- fragS * frag;
- int where;
- int size;
- expressionS * exp;
-{
- bfd_reloc_code_real_type type;
- int pcrel = 0;
-
- /* Pick a reloc.
- FIXME: @@ Should look at CPU word size. */
- switch (size)
- {
- case 1:
- type = BFD_RELOC_8;
- break;
- case 2:
- type = BFD_RELOC_16;
- break;
- case 4:
- default:
- type = BFD_RELOC_32;
- break;
- case 8:
- type = BFD_RELOC_64;
- break;
- }
-
- fix_new_exp (frag, where, (int) size, exp, pcrel, type);
-}
-
-/* A good place to do this, although this was probably not intended
- for this kind of use. We need to dump the literal pool before
- references are made to a null symbol pointer. */
-
-void
-arm_cleanup ()
-{
- literal_pool * pool;
- for (pool = list_of_pools; pool; pool = pool->next)
- {
- /* Put it at the end of the relevent section. */
- subseg_set (pool->section, pool->sub_section);
#ifdef OBJ_ELF
- arm_elf_change_section ();
-#endif
- s_ltorg (0);
- }
-}
-
-void
-arm_start_line_hook ()
-{
- last_label_seen = NULL;
-}
-
-void
-arm_frob_label (sym)
- symbolS * sym;
+typedef struct
{
- last_label_seen = sym;
-
- ARM_SET_THUMB (sym, thumb_mode);
-
-#if defined OBJ_COFF || defined OBJ_ELF
- ARM_SET_INTERWORK (sym, support_interwork);
-#endif
-
- /* Note - do not allow local symbols (.Lxxx) to be labeled
- as Thumb functions. This is because these labels, whilst
- they exist inside Thumb code, are not the entry points for
- possible ARM->Thumb calls. Also, these labels can be used
- as part of a computed goto or switch statement. eg gcc
- can generate code that looks like this:
-
- ldr r2, [pc, .Laaa]
- lsl r3, r3, #2
- ldr r2, [r3, r2]
- mov pc, r2
-
- .Lbbb: .word .Lxxx
- .Lccc: .word .Lyyy
- ..etc...
- .Laaa: .word Lbbb
-
- The first instruction loads the address of the jump table.
- The second instruction converts a table index into a byte offset.
- The third instruction gets the jump address out of the table.
- The fourth instruction performs the jump.
-
- If the address stored at .Laaa is that of a symbol which has the
- Thumb_Func bit set, then the linker will arrange for this address
- to have the bottom bit set, which in turn would mean that the
- address computation performed by the third instruction would end
- up with the bottom bit set. Since the ARM is capable of unaligned
- word loads, the instruction would then load the incorrect address
- out of the jump table, and chaos would ensue. */
- if (label_is_thumb_function_name
- && (S_GET_NAME (sym)[0] != '.' || S_GET_NAME (sym)[1] != 'L')
- && (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
- {
- /* When the address of a Thumb function is taken the bottom
- bit of that address should be set. This will allow
- interworking between Arm and Thumb functions to work
- correctly. */
-
- THUMB_SET_FUNC (sym, 1);
-
- label_is_thumb_function_name = FALSE;
- }
-}
-
-/* Adjust the symbol table. This marks Thumb symbols as distinct from
- ARM ones. */
+ int val;
+ arm_feature_set flags;
+} cpu_arch_ver_table;
+
+/* Mapping from CPU features to EABI CPU arch values. Table must be sorted
+ least features first. */
+static const cpu_arch_ver_table cpu_arch_ver[] =
+{
+ {1, ARM_ARCH_V4},
+ {2, ARM_ARCH_V4T},
+ {3, ARM_ARCH_V5},
+ {4, ARM_ARCH_V5TE},
+ {5, ARM_ARCH_V5TEJ},
+ {6, ARM_ARCH_V6},
+ {7, ARM_ARCH_V6Z},
+ {8, ARM_ARCH_V6K},
+ {9, ARM_ARCH_V6T2},
+ {10, ARM_ARCH_V7A},
+ {10, ARM_ARCH_V7R},
+ {10, ARM_ARCH_V7M},
+ {0, ARM_ARCH_NONE}
+};
-void
-arm_adjust_symtab ()
+/* Set the public EABI object attributes. */
+static void
+aeabi_set_public_attributes (void)
{
-#ifdef OBJ_COFF
- symbolS * sym;
-
- for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
- {
- if (ARM_IS_THUMB (sym))
- {
- if (THUMB_IS_FUNC (sym))
- {
- /* Mark the symbol as a Thumb function. */
- if ( S_GET_STORAGE_CLASS (sym) == C_STAT
- || S_GET_STORAGE_CLASS (sym) == C_LABEL) /* This can happen! */
- S_SET_STORAGE_CLASS (sym, C_THUMBSTATFUNC);
-
- else if (S_GET_STORAGE_CLASS (sym) == C_EXT)
- S_SET_STORAGE_CLASS (sym, C_THUMBEXTFUNC);
- else
- as_bad (_("%s: unexpected function type: %d"),
- S_GET_NAME (sym), S_GET_STORAGE_CLASS (sym));
- }
- else switch (S_GET_STORAGE_CLASS (sym))
- {
- case C_EXT:
- S_SET_STORAGE_CLASS (sym, C_THUMBEXT);
- break;
- case C_STAT:
- S_SET_STORAGE_CLASS (sym, C_THUMBSTAT);
- break;
- case C_LABEL:
- S_SET_STORAGE_CLASS (sym, C_THUMBLABEL);
- break;
- default:
- /* Do nothing. */
- break;
- }
- }
-
- if (ARM_IS_INTERWORK (sym))
- coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_flags = 0xFF;
- }
-#endif
-#ifdef OBJ_ELF
- symbolS * sym;
- char bind;
+ int arch;
+ arm_feature_set flags;
+ arm_feature_set tmp;
+ const cpu_arch_ver_table *p;
- for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
+ /* Choose the architecture based on the capabilities of the requested cpu
+ (if any) and/or the instructions actually used. */
+ 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);
+
+ tmp = flags;
+ arch = 0;
+ for (p = cpu_arch_ver; p->val; p++)
{
- if (ARM_IS_THUMB (sym))
+ if (ARM_CPU_HAS_FEATURE (tmp, p->flags))
{
- elf_symbol_type * elf_sym;
-
- elf_sym = elf_symbol (symbol_get_bfdsym (sym));
- bind = ELF_ST_BIND (elf_sym);
-
- /* If it's a .thumb_func, declare it as so,
- otherwise tag label as .code 16. */
- if (THUMB_IS_FUNC (sym))
- elf_sym->internal_elf_sym.st_info =
- ELF_ST_INFO (bind, STT_ARM_TFUNC);
- else
- elf_sym->internal_elf_sym.st_info =
- ELF_ST_INFO (bind, STT_ARM_16BIT);
+ arch = p->val;
+ ARM_CLEAR_FEATURE (tmp, tmp, p->flags);
}
}
-#endif
-}
-int
-arm_data_in_code ()
-{
- if (thumb_mode && ! strncmp (input_line_pointer + 1, "data:", 5))
+ /* Tag_CPU_name. */
+ if (selected_cpu_name[0])
{
- *input_line_pointer = '/';
- input_line_pointer += 5;
- *input_line_pointer = 0;
- return 1;
- }
-
- return 0;
-}
-
-char *
-arm_canonicalize_symbol_name (name)
- char * name;
-{
- int len;
-
- if (thumb_mode && (len = strlen (name)) > 5
- && streq (name + len - 5, "/data"))
- *(name + len - 5) = 0;
-
- return name;
-}
+ char *p;
-#if defined OBJ_COFF || defined OBJ_ELF
+ p = selected_cpu_name;
+ if (strncmp(p, "armv", 4) == 0)
+ {
+ int i;
+
+ p += 4;
+ for (i = 0; p[i]; i++)
+ p[i] = TOUPPER (p[i]);
+ }
+ elf32_arm_add_eabi_attr_string (stdoutput, 5, p);
+ }
+ /* Tag_CPU_arch. */
+ elf32_arm_add_eabi_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');
+ else if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7r))
+ elf32_arm_add_eabi_attr_int (stdoutput, 7, 'R');
+ else if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7m))
+ elf32_arm_add_eabi_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);
+ /* Tag_THUMB_ISA_use. */
+ if (ARM_CPU_HAS_FEATURE (thumb_arch_used, arm_arch_full))
+ elf32_arm_add_eabi_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);
+ /* 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);
+}
+
+/* Add the .ARM.attributes section. */
void
-arm_validate_fix (fixP)
- fixS * fixP;
+arm_md_end (void)
{
- /* If the destination of the branch is a defined symbol which does not have
- the THUMB_FUNC attribute, then we must be calling a function which has
- the (interfacearm) attribute. We look for the Thumb entry point to that
- function and change the branch to refer to that function instead. */
- if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23
- && fixP->fx_addsy != NULL
- && S_IS_DEFINED (fixP->fx_addsy)
- && ! THUMB_IS_FUNC (fixP->fx_addsy))
- {
- fixP->fx_addsy = find_real_start (fixP->fx_addsy);
- }
-}
-#endif
-
-int
-arm_force_relocation (fixp)
- struct fix * fixp;
-{
-#if defined (OBJ_COFF) && defined (TE_PE)
- if (fixp->fx_r_type == BFD_RELOC_RVA)
- return 1;
-#endif
-#ifdef OBJ_ELF
- if (fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH
- || fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BLX
- || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX
- || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23)
- return 1;
-#endif
-
- /* Resolve these relocations even if the symbol is extern or weak. */
- 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)
- 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. */
+ segT s;
+ char *p;
+ addressT addr;
+ offsetT size;
+
+ if (EF_ARM_EABI_VERSION (meabi_flags) < EF_ARM_EABI_VER4)
+ return;
-bfd_boolean
-arm_fix_adjustable (fixP)
- fixS * fixP;
-{
- if (fixP->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE)
- return 1;
- return 0;
+ 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
-#ifdef OBJ_ELF
-/* Relocations against Thumb function names must be left unadjusted,
- so that the linker can use this information to correctly set the
- bottom bit of their addresses. The MIPS version of this function
- also prevents relocations that are mips-16 specific, but I do not
- know why it does this.
- FIXME:
- There is one other problem that ought to be addressed here, but
- which currently is not: Taking the address of a label (rather
- than a function) and then later jumping to that address. Such
- addresses also ought to have their bottom bit set (assuming that
- they reside in Thumb code), but at the moment they will not. */
+/* Parse a .cpu directive. */
-bfd_boolean
-arm_fix_adjustable (fixP)
- fixS * fixP;
+static void
+s_arm_cpu (int ignored ATTRIBUTE_UNUSED)
{
- if (fixP->fx_addsy == NULL)
- return 1;
-
- if (THUMB_IS_FUNC (fixP->fx_addsy)
- && fixP->fx_subsy == NULL)
- return 0;
-
- /* We need the symbol name for the VTABLE entries. */
- if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
- || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
- return 0;
-
- /* Don't allow symbols to be discarded on GOT related relocs. */
- if (fixP->fx_r_type == BFD_RELOC_ARM_PLT32
- || fixP->fx_r_type == BFD_RELOC_ARM_GOT32
- || fixP->fx_r_type == BFD_RELOC_ARM_GOTOFF)
- return 0;
-
- return 1;
-}
+ const struct arm_cpu_option_table *opt;
+ char *name;
+ char saved_char;
-const char *
-elf32_arm_target_format ()
-{
- if (target_big_endian)
- {
- if (target_oabi)
- return "elf32-bigarm-oabi";
- else
- return "elf32-bigarm";
- }
- else
- {
- if (target_oabi)
- return "elf32-littlearm-oabi";
- else
- return "elf32-littlearm";
- }
-}
+ name = input_line_pointer;
+ while (*input_line_pointer && !ISSPACE(*input_line_pointer))
+ input_line_pointer++;
+ saved_char = *input_line_pointer;
+ *input_line_pointer = 0;
-void
-armelf_frob_symbol (symp, puntp)
- symbolS * symp;
- int * puntp;
-{
- elf_frob_symbol (symp, puntp);
+ /* Skip the first "all" entry. */
+ for (opt = arm_cpus + 1; opt->name != NULL; opt++)
+ if (streq (opt->name, name))
+ {
+ mcpu_cpu_opt = &opt->value;
+ selected_cpu = opt->value;
+ if (opt->canonical_name)
+ strcpy(selected_cpu_name, opt->canonical_name);
+ else
+ {
+ int i;
+ for (i = 0; opt->name[i]; i++)
+ selected_cpu_name[i] = TOUPPER (opt->name[i]);
+ selected_cpu_name[i] = 0;
+ }
+ ARM_MERGE_FEATURE_SETS (cpu_variant, *mcpu_cpu_opt, *mfpu_opt);
+ *input_line_pointer = saved_char;
+ demand_empty_rest_of_line ();
+ return;
+ }
+ as_bad (_("unknown cpu `%s'"), name);
+ *input_line_pointer = saved_char;
+ ignore_rest_of_line ();
}
-static bfd_reloc_code_real_type
-arm_parse_reloc ()
-{
- char id [16];
- char * ip;
- unsigned int i;
- static struct
- {
- char * str;
- int len;
- bfd_reloc_code_real_type reloc;
- }
- reloc_map[] =
- {
-#define MAP(str,reloc) { str, sizeof (str) - 1, reloc }
- MAP ("(got)", BFD_RELOC_ARM_GOT32),
- MAP ("(gotoff)", BFD_RELOC_ARM_GOTOFF),
- /* ScottB: Jan 30, 1998 - Added support for parsing "var(PLT)"
- branch instructions generated by GCC for PLT relocs. */
- MAP ("(plt)", BFD_RELOC_ARM_PLT32),
- { NULL, 0, BFD_RELOC_UNUSED }
-#undef MAP
- };
-
- for (i = 0, ip = input_line_pointer;
- i < sizeof (id) && (ISALNUM (*ip) || ISPUNCT (*ip));
- i++, ip++)
- id[i] = TOLOWER (*ip);
-
- for (i = 0; reloc_map[i].str; i++)
- if (strncmp (id, reloc_map[i].str, reloc_map[i].len) == 0)
- break;
-
- input_line_pointer += reloc_map[i].len;
- return reloc_map[i].reloc;
-}
+/* Parse a .arch directive. */
static void
-s_arm_elf_cons (nbytes)
- int nbytes;
+s_arm_arch (int ignored ATTRIBUTE_UNUSED)
{
- expressionS exp;
-
-#ifdef md_flush_pending_output
- md_flush_pending_output ();
-#endif
-
- if (is_it_end_of_statement ())
- {
- demand_empty_rest_of_line ();
- return;
- }
-
-#ifdef md_cons_align
- md_cons_align (nbytes);
-#endif
-
- mapping_state (MAP_DATA);
- do
- {
- bfd_reloc_code_real_type reloc;
-
- expression (& exp);
-
- if (exp.X_op == O_symbol
- && * input_line_pointer == '('
- && (reloc = arm_parse_reloc ()) != BFD_RELOC_UNUSED)
- {
- reloc_howto_type *howto = bfd_reloc_type_lookup (stdoutput, reloc);
- int size = bfd_get_reloc_size (howto);
+ const struct arm_arch_option_table *opt;
+ char saved_char;
+ char *name;
- if (size > nbytes)
- as_bad ("%s relocations do not fit in %d bytes",
- howto->name, nbytes);
- else
- {
- register char *p = frag_more ((int) nbytes);
- int offset = nbytes - size;
+ name = input_line_pointer;
+ while (*input_line_pointer && !ISSPACE(*input_line_pointer))
+ input_line_pointer++;
+ saved_char = *input_line_pointer;
+ *input_line_pointer = 0;
- fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size,
- &exp, 0, reloc);
- }
- }
- else
- emit_expr (&exp, (unsigned int) nbytes);
- }
- while (*input_line_pointer++ == ',');
+ /* Skip the first "all" entry. */
+ for (opt = arm_archs + 1; opt->name != NULL; opt++)
+ if (streq (opt->name, name))
+ {
+ mcpu_cpu_opt = &opt->value;
+ selected_cpu = opt->value;
+ strcpy(selected_cpu_name, opt->name);
+ ARM_MERGE_FEATURE_SETS (cpu_variant, *mcpu_cpu_opt, *mfpu_opt);
+ *input_line_pointer = saved_char;
+ demand_empty_rest_of_line ();
+ return;
+ }
- /* Put terminator back into stream. */
- input_line_pointer --;
- demand_empty_rest_of_line ();
+ as_bad (_("unknown architecture `%s'\n"), name);
+ *input_line_pointer = saved_char;
+ ignore_rest_of_line ();
}
-#endif /* OBJ_ELF */
-
-/* This is called from HANDLE_ALIGN in write.c. Fill in the contents
- of an rs_align_code fragment. */
-
-void
-arm_handle_align (fragP)
- fragS *fragP;
-{
- static char const arm_noop[4] = { 0x00, 0x00, 0xa0, 0xe1 };
- static char const thumb_noop[2] = { 0xc0, 0x46 };
- static char const arm_bigend_noop[4] = { 0xe1, 0xa0, 0x00, 0x00 };
- static char const thumb_bigend_noop[2] = { 0x46, 0xc0 };
-
- int bytes, fix, noop_size;
- char * p;
- const char * noop;
-
- if (fragP->fr_type != rs_align_code)
- return;
-
- bytes = fragP->fr_next->fr_address - fragP->fr_address - fragP->fr_fix;
- p = fragP->fr_literal + fragP->fr_fix;
- fix = 0;
-
- if (bytes > MAX_MEM_FOR_RS_ALIGN_CODE)
- bytes &= MAX_MEM_FOR_RS_ALIGN_CODE;
-
- if (fragP->tc_frag_data)
- {
- if (target_big_endian)
- noop = thumb_bigend_noop;
- else
- noop = thumb_noop;
- noop_size = sizeof (thumb_noop);
- }
- else
- {
- if (target_big_endian)
- noop = arm_bigend_noop;
- else
- noop = arm_noop;
- noop_size = sizeof (arm_noop);
- }
-
- if (bytes & (noop_size - 1))
- {
- fix = bytes & (noop_size - 1);
- memset (p, 0, fix);
- p += fix;
- bytes -= fix;
- }
- while (bytes >= noop_size)
- {
- memcpy (p, noop, noop_size);
- p += noop_size;
- bytes -= noop_size;
- fix += noop_size;
- }
-
- fragP->fr_fix += fix;
- fragP->fr_var = noop_size;
-}
-
-/* Called from md_do_align. Used to create an alignment
- frag in a code section. */
+/* Parse a .fpu directive. */
-void
-arm_frag_align_code (n, max)
- int n;
- int max;
+static void
+s_arm_fpu (int ignored ATTRIBUTE_UNUSED)
{
- char * p;
-
- /* We assume that there will never be a requirement
- to support alignments greater than 32 bytes. */
- if (max > MAX_MEM_FOR_RS_ALIGN_CODE)
- as_fatal (_("alignments greater than 32 bytes not supported in .text sections."));
+ const struct arm_option_cpu_value_table *opt;
+ char saved_char;
+ char *name;
- p = frag_var (rs_align_code,
- MAX_MEM_FOR_RS_ALIGN_CODE,
- 1,
- (relax_substateT) max,
- (symbolS *) NULL,
- (offsetT) n,
- (char *) NULL);
- *p = 0;
+ name = input_line_pointer;
+ while (*input_line_pointer && !ISSPACE(*input_line_pointer))
+ input_line_pointer++;
+ saved_char = *input_line_pointer;
+ *input_line_pointer = 0;
+
+ for (opt = arm_fpus; opt->name != NULL; opt++)
+ if (streq (opt->name, name))
+ {
+ mfpu_opt = &opt->value;
+ ARM_MERGE_FEATURE_SETS (cpu_variant, *mcpu_cpu_opt, *mfpu_opt);
+ *input_line_pointer = saved_char;
+ demand_empty_rest_of_line ();
+ return;
+ }
+ as_bad (_("unknown floating point format `%s'\n"), name);
+ *input_line_pointer = saved_char;
+ ignore_rest_of_line ();
}
+#endif /* OBJ_ELF */
-/* Perform target specific initialisation of a frag. */
-
-void
-arm_init_frag (fragP)
- fragS *fragP;
-{
- /* Record whether this frag is in an ARM or a THUMB area. */
- fragP->tc_frag_data = thumb_mode;
-}
diff --git a/contrib/binutils/gas/config/tc-arm.h b/contrib/binutils/gas/config/tc-arm.h
index 4e791a083f41..f2615770c47d 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, 2004
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define TC_ARM 1
@@ -32,8 +32,6 @@
#define COFF_MAGIC ARMMAGIC
#define TARGET_ARCH bfd_arch_arm
-#define AOUT_MACHTYPE 0
-
#define DIFF_EXPR_OK
#ifdef LITTLE_ENDIAN
@@ -81,7 +79,12 @@ struct fix;
#define TC_FORCE_RELOCATION(FIX) arm_force_relocation (FIX)
-#define md_convert_frag(b, s, f) { as_fatal (_("arm convert_frag\n")); }
+#define md_relax_frag(segment, fragp, stretch) \
+ arm_relax_frag(segment, fragp, stretch)
+extern int arm_relax_frag (asection *, struct frag *, long);
+
+#define md_optimize_expr(l,o,r) arm_optimize_expr (l, o, r)
+extern int arm_optimize_expr (expressionS *, operatorT, expressionS *);
#define md_cleanup() arm_cleanup ()
@@ -92,12 +95,17 @@ struct fix;
/* We also need to mark assembler created symbols: */
#define tc_frob_fake_label(S) arm_frob_label (S)
+#ifdef OBJ_ELF
+#define md_end arm_md_end
+extern void arm_md_end (void);
+#endif
+
/* NOTE: The fake label creation in stabs.c:s_stab_generic() has
deliberately not been updated to mark assembler created stabs
symbols as Thumb. */
-#define TC_FIX_TYPE PTR
-#define TC_INIT_FIX_DATA(FIX) ((FIX)->tc_fix_data = NULL)
+#define TC_FIX_TYPE int
+#define TC_INIT_FIX_DATA(FIX) ((FIX)->tc_fix_data = 0)
/* We need to keep some local information on symbols. */
@@ -121,14 +129,13 @@ struct fix;
#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 ()
-#define tc_aout_pre_write_hook(x) {;} /* not used */
#define LISTING_HEADER "ARM GAS "
#define OPTIONAL_REGISTER_PREFIX '%'
-#define LOCAL_LABEL(name) (name[0] == '.' && (name[1] == 'L'))
-#define LOCAL_LABELS_FB 1
+#define LOCAL_LABEL(name) (name[0] == '.' && name[1] == 'L')
+#define LOCAL_LABELS_FB 1
/* This expression evaluates to true if the relocation is for a local
object for which we still want to do the relocation at runtime.
@@ -140,11 +147,16 @@ struct fix;
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
(!(FIX)->fx_pcrel \
|| (FIX)->fx_plt \
- || (FIX)->fx_r_type == BFD_RELOC_ARM_GOT12 \
|| (FIX)->fx_r_type == BFD_RELOC_ARM_GOT32 \
|| (FIX)->fx_r_type == BFD_RELOC_32 \
|| TC_FORCE_RELOCATION (FIX))
+/* Force output of R_ARM_REL32 relocations against thumb function symbols.
+ This is needed to ensure the low bit is handled correctly. */
+#define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEG) \
+ (THUMB_IS_FUNC ((FIX)->fx_addsy) \
+ || !SEG_NORMAL (SEG))
+
#define TC_CONS_FIX_NEW cons_fix_new_arm
#define MAX_MEM_FOR_RS_ALIGN_CODE 31
@@ -167,9 +179,9 @@ struct fix;
# 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 LOCAL_LABEL_PREFIX '.'
-# define TC_SEGMENT_INFO_TYPE enum mstate
+# define TC_SEGMENT_INFO_TYPE struct arm_segment_info_type
enum mstate
{
@@ -179,6 +191,25 @@ enum mstate
MAP_THUMB
};
+struct arm_segment_info_type
+{
+ enum mstate mapstate;
+ unsigned int marked_pr_dependency;
+};
+
+/* 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
+
#else /* Not OBJ_ELF. */
#define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
#endif
@@ -187,12 +218,15 @@ enum mstate
# define EXTERN_FORCE_RELOC 1
# define tc_fix_adjustable(FIX) arm_fix_adjustable (FIX)
-/* Values passed to md_apply_fix3 don't include the symbol value. */
+/* Values passed to md_apply_fix don't include the symbol value. */
# define MD_APPLY_SYM_VALUE(FIX) 0
# define TC_VALIDATE_FIX(FIX, SEGTYPE, LABEL) arm_validate_fix (FIX)
#endif
+#define MD_PCREL_FROM_SECTION(F,S) md_pcrel_from_section(F,S)
+
+extern long md_pcrel_from_section (struct fix *, segT);
extern void arm_frag_align_code (int, int);
extern void arm_validate_fix (struct fix *);
extern const char * elf32_arm_target_format (void);
@@ -209,3 +243,6 @@ extern void cons_fix_new_arm (fragS *, int, int, expressionS *);
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 void tc_arm_frame_initial_instructions (void);
diff --git a/contrib/binutils/gas/config/tc-generic.c b/contrib/binutils/gas/config/tc-generic.c
index e69de29bb2d1..8028403550bd 100644
--- a/contrib/binutils/gas/config/tc-generic.c
+++ b/contrib/binutils/gas/config/tc-generic.c
@@ -0,0 +1,22 @@
+/* This file is tc-generic.c
+
+ Copyright 2004 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. */
+
+/* This file is tc-generic.c and is intended to be a template for
+ target cpu specific files. */
diff --git a/contrib/binutils/gas/config/tc-generic.h b/contrib/binutils/gas/config/tc-generic.h
index f3b676ba011a..fbeba9a25c11 100644
--- a/contrib/binutils/gas/config/tc-generic.h
+++ b/contrib/binutils/gas/config/tc-generic.h
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License along
with GAS; see the file COPYING. If not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
* This file is tc-generic.h and is intended to be a template for target cpu
diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c
index 5de6a55d2f51..be384bc99a76 100644
--- a/contrib/binutils/gas/config/tc-i386.c
+++ b/contrib/binutils/gas/config/tc-i386.c
@@ -1,6 +1,6 @@
/* i386.c -- Assemble code for the Intel 80386
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Intel 80386 machine specific gas.
Written by Eliot Dresselhaus (eliot@mgm.mit.edu).
@@ -33,6 +33,7 @@
#include "dwarf2dbg.h"
#include "dw2gencfi.h"
#include "opcode/i386.h"
+#include "elf/x86-64.h"
#ifndef REGISTER_WARNINGS
#define REGISTER_WARNINGS 1
@@ -76,6 +77,10 @@ static void set_code_flag PARAMS ((int));
static void set_16bit_gcc_code_flag PARAMS ((int));
static void set_intel_syntax PARAMS ((int));
static void set_cpu_arch PARAMS ((int));
+#ifdef TE_PE
+static void pe_directive_secrel PARAMS ((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));
@@ -107,6 +112,9 @@ static void output_disp PARAMS ((fragS *insn_start_frag,
#ifndef I386COFF
static void s_bss PARAMS ((int));
#endif
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+static void handle_large_common (int small ATTRIBUTE_UNUSED);
+#endif
static const char *default_arch = DEFAULT_ARCH;
@@ -179,22 +187,34 @@ typedef struct _i386_insn i386_insn;
/* List of chars besides those in app.c:symbol_chars that can start an
operand. Used to prevent the scrubber eating vital white-space. */
+const char extra_symbol_chars[] = "*%-(["
#ifdef LEX_AT
-const char extra_symbol_chars[] = "*%-(@[";
-#else
-const char extra_symbol_chars[] = "*%-([";
+ "@"
+#endif
+#ifdef LEX_QM
+ "?"
#endif
+ ;
#if (defined (TE_I386AIX) \
|| ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
+ && !defined (TE_GNU) \
&& !defined (TE_LINUX) \
+ && !defined (TE_NETWARE) \
&& !defined (TE_FreeBSD) \
&& !defined (TE_NetBSD)))
/* 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[] = "#/";
+ pre-processor is disabled, these aren't very useful. The option
+ --divide will remove '/' from this list. */
+const char *i386_comment_chars = "#/";
+#define SVR4_COMMENT_CHARS 1
#define PREFIX_SEPARATOR '\\'
+#else
+const char *i386_comment_chars = "#";
+#define PREFIX_SEPARATOR '/'
+#endif
+
/* This array holds the chars that only start a comment at the beginning of
a line. If the line seems to have the form '# 123 filename'
.line and .file directives will appear in the pre-processed output.
@@ -203,16 +223,7 @@ const char comment_chars[] = "#/";
#NO_APP at the beginning of its output.
Also note that comments started like this one will always work if
'/' isn't otherwise defined. */
-const char line_comment_chars[] = "#";
-
-#else
-/* Putting '/' here makes it impossible to use the divide operator.
- However, we need it for compatibility with SVR4 systems. */
-const char comment_chars[] = "#";
-#define PREFIX_SEPARATOR '/'
-
-const char line_comment_chars[] = "/#";
-#endif
+const char line_comment_chars[] = "#/";
const char line_separator_chars[] = ";";
@@ -276,6 +287,7 @@ enum flag_code {
#define NUM_FLAG_CODE ((int) CODE_64BIT + 1)
static enum flag_code flag_code;
+static unsigned int object_64bit;
static int use_rela_relocations = 0;
/* The names used to print error messages. */
@@ -306,6 +318,7 @@ static int quiet_warnings = 0;
/* CPU name. */
static const char *cpu_arch_name = NULL;
+static const char *cpu_sub_arch_name = NULL;
/* CPU feature flags. */
static unsigned int cpu_arch_flags = CpuUnknownFlags | CpuNo64;
@@ -315,7 +328,7 @@ static unsigned int cpu_arch_flags = CpuUnknownFlags | CpuNo64;
static unsigned int no_cond_jump_promotion = 0;
/* Pre-defined "_GLOBAL_OFFSET_TABLE_". */
-symbolS *GOT_symbol;
+static symbolS *GOT_symbol;
/* The dwarf2 return column, adjusted for 32 or 64 bit. */
unsigned int x86_dwarf2_return_column;
@@ -408,14 +421,28 @@ static const arch_entry cpu_arch[] = {
{"i286", Cpu086|Cpu186|Cpu286 },
{"i386", Cpu086|Cpu186|Cpu286|Cpu386 },
{"i486", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486 },
- {"i586", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuMMX },
- {"i686", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuSSE },
- {"pentium", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuMMX },
- {"pentiumpro",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuSSE },
- {"pentium4", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX|CpuSSE|CpuSSE2 },
- {"k6", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX|Cpu3dnow },
- {"athlon", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuMMX|Cpu3dnow },
- {"sledgehammer",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuSledgehammer|CpuMMX|Cpu3dnow|CpuSSE|CpuSSE2 },
+ {"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 }
};
@@ -434,6 +461,7 @@ const pseudo_typeS md_pseudo_table[] =
{"dfloat", float_cons, 'd'},
{"tfloat", float_cons, 'x'},
{"value", cons, 2},
+ {"slong", signed_cons, 4},
{"noopt", s_ignore, 0},
{"optim", s_ignore, 0},
{"code16gcc", set_16bit_gcc_code_flag, CODE_16BIT},
@@ -442,8 +470,16 @@ const pseudo_typeS md_pseudo_table[] =
{"code64", set_code_flag, CODE_64BIT},
{"intel_syntax", set_intel_syntax, 1},
{"att_syntax", set_intel_syntax, 0},
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ {"largecomm", handle_large_common, 0},
+#else
{"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0},
{"loc", dwarf2_directive_loc, 0},
+ {"loc_mark_labels", dwarf2_directive_loc_mark_labels, 0},
+#endif
+#ifdef TE_PE
+ {"secrel32", pe_directive_secrel, 0},
+#endif
{0, 0, 0}
};
@@ -694,55 +730,66 @@ add_prefix (prefix)
unsigned int prefix;
{
int ret = 1;
- int q;
+ unsigned int q;
if (prefix >= REX_OPCODE && prefix < REX_OPCODE + 16
&& flag_code == CODE_64BIT)
- q = REX_PREFIX;
+ {
+ 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))))
+ ret = 0;
+ q = REX_PREFIX;
+ }
else
- switch (prefix)
- {
- default:
- abort ();
-
- case CS_PREFIX_OPCODE:
- case DS_PREFIX_OPCODE:
- case ES_PREFIX_OPCODE:
- case FS_PREFIX_OPCODE:
- case GS_PREFIX_OPCODE:
- case SS_PREFIX_OPCODE:
- q = SEG_PREFIX;
- break;
+ {
+ switch (prefix)
+ {
+ default:
+ abort ();
+
+ case CS_PREFIX_OPCODE:
+ case DS_PREFIX_OPCODE:
+ case ES_PREFIX_OPCODE:
+ case FS_PREFIX_OPCODE:
+ case GS_PREFIX_OPCODE:
+ case SS_PREFIX_OPCODE:
+ q = SEG_PREFIX;
+ break;
- case REPNE_PREFIX_OPCODE:
- case REPE_PREFIX_OPCODE:
- ret = 2;
- /* fall thru */
- case LOCK_PREFIX_OPCODE:
- q = LOCKREP_PREFIX;
- break;
+ case REPNE_PREFIX_OPCODE:
+ case REPE_PREFIX_OPCODE:
+ ret = 2;
+ /* fall thru */
+ case LOCK_PREFIX_OPCODE:
+ q = LOCKREP_PREFIX;
+ break;
- case FWAIT_OPCODE:
- q = WAIT_PREFIX;
- break;
+ case FWAIT_OPCODE:
+ q = WAIT_PREFIX;
+ break;
- case ADDR_PREFIX_OPCODE:
- q = ADDR_PREFIX;
- break;
+ case ADDR_PREFIX_OPCODE:
+ q = ADDR_PREFIX;
+ break;
- case DATA_PREFIX_OPCODE:
- q = DATA_PREFIX;
- break;
- }
+ case DATA_PREFIX_OPCODE:
+ q = DATA_PREFIX;
+ break;
+ }
+ if (i.prefix[q] != 0)
+ ret = 0;
+ }
- if (i.prefix[q] != 0)
+ if (ret)
{
- as_bad (_("same type of prefix used twice"));
- return 0;
+ if (!i.prefix[q])
+ ++i.prefixes;
+ i.prefix[q] |= prefix;
}
+ else
+ as_bad (_("same type of prefix used twice"));
- i.prefixes += 1;
- i.prefix[q] = prefix;
return ret;
}
@@ -771,7 +818,7 @@ set_16bit_gcc_code_flag (new_code_flag)
flag_code = new_code_flag;
cpu_arch_flags &= ~(Cpu64 | CpuNo64);
cpu_arch_flags |= (flag_code == CODE_64BIT ? Cpu64 : CpuNo64);
- stackop_size = 'l';
+ stackop_size = LONG_MNEM_SUFFIX;
}
static void
@@ -804,6 +851,9 @@ set_intel_syntax (syntax_flag)
&& (bfd_get_symbol_leading_char (stdoutput) != '\0'));
else
allow_naked_reg = (ask_naked_reg < 0);
+
+ identifier_chars['%'] = intel_syntax && allow_naked_reg ? '%' : 0;
+ identifier_chars['$'] = intel_syntax ? '$' : 0;
}
static void
@@ -822,10 +872,22 @@ set_cpu_arch (dummy)
{
if (strcmp (string, cpu_arch[i].name) == 0)
{
- cpu_arch_name = cpu_arch[i].name;
- cpu_arch_flags = (cpu_arch[i].flags
- | (flag_code == CODE_64BIT ? Cpu64 : CpuNo64));
- break;
+ if (*string != '.')
+ {
+ 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));
+ break;
+ }
+ if ((cpu_arch_flags | cpu_arch[i].flags) != cpu_arch_flags)
+ {
+ cpu_sub_arch_name = cpu_arch[i].name;
+ cpu_arch_flags |= cpu_arch[i].flags;
+ }
+ *input_line_pointer = e;
+ demand_empty_rest_of_line ();
+ return;
}
}
if (!cpu_arch[i].name)
@@ -966,7 +1028,12 @@ md_begin ()
#ifdef LEX_AT
identifier_chars['@'] = '@';
#endif
+#ifdef LEX_QM
+ identifier_chars['?'] = '?';
+ operand_chars['?'] = '?';
+#endif
digit_chars['-'] = '-';
+ mnemonic_chars['-'] = '-';
identifier_chars['_'] = '_';
identifier_chars['.'] = '.';
@@ -975,7 +1042,7 @@ md_begin ()
}
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
+ if (IS_ELF)
{
record_alignment (text_section, 2);
record_alignment (data_section, 2);
@@ -1102,13 +1169,12 @@ ps (s)
segment_name (S_GET_SEGMENT (s)));
}
-struct type_name
+static struct type_name
{
unsigned int mask;
char *tname;
}
-
-static const type_names[] =
+const type_names[] =
{
{ Reg8, "r8" },
{ Reg16, "r16" },
@@ -1158,34 +1224,80 @@ pt (t)
#endif /* DEBUG386 */
-static bfd_reloc_code_real_type reloc
- PARAMS ((int, int, int, bfd_reloc_code_real_type));
-
static bfd_reloc_code_real_type
-reloc (size, pcrel, sign, other)
- int size;
- int pcrel;
- int sign;
- bfd_reloc_code_real_type other;
+reloc (unsigned int size,
+ int pcrel,
+ int sign,
+ bfd_reloc_code_real_type other)
{
if (other != NO_RELOC)
- return other;
+ {
+ reloc_howto_type *reloc;
+
+ 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;
+ }
+
+ /* Sign-checking 4-byte relocations in 16-/32-bit code is pointless. */
+ if (size == 4 && flag_code != CODE_64BIT)
+ sign = -1;
+
+ reloc = bfd_reloc_type_lookup (stdoutput, other);
+ if (!reloc)
+ as_bad (_("unknown relocation (%u)"), other);
+ else if (size != bfd_get_reloc_size (reloc))
+ as_bad (_("%u-byte relocation cannot be applied to %u-byte field"),
+ bfd_get_reloc_size (reloc),
+ size);
+ else if (pcrel && !reloc->pc_relative)
+ as_bad (_("non-pc-relative relocation for pc-relative field"));
+ else if ((reloc->complain_on_overflow == complain_overflow_signed
+ && !sign)
+ || (reloc->complain_on_overflow == complain_overflow_unsigned
+ && sign > 0))
+ as_bad (_("relocated field and relocation type differ in signedness"));
+ else
+ return other;
+ return NO_RELOC;
+ }
if (pcrel)
{
if (!sign)
- as_bad (_("There are no unsigned pc-relative relocations"));
+ as_bad (_("there are no unsigned pc-relative relocations"));
switch (size)
{
case 1: return BFD_RELOC_8_PCREL;
case 2: return BFD_RELOC_16_PCREL;
case 4: return BFD_RELOC_32_PCREL;
+ case 8: return BFD_RELOC_64_PCREL;
}
- as_bad (_("can not do %d byte pc-relative relocation"), size);
+ as_bad (_("cannot do %u byte pc-relative relocation"), size);
}
else
{
- if (sign)
+ if (sign > 0)
switch (size)
{
case 4: return BFD_RELOC_X86_64_32S;
@@ -1198,8 +1310,8 @@ reloc (size, pcrel, sign, other)
case 4: return BFD_RELOC_32;
case 8: return BFD_RELOC_64;
}
- as_bad (_("can not do %s %d byte relocation"),
- sign ? "signed" : "unsigned", size);
+ as_bad (_("cannot do %s %u byte relocation"),
+ sign > 0 ? "signed" : "unsigned", size);
}
abort ();
@@ -1216,7 +1328,7 @@ tc_i386_fix_adjustable (fixP)
fixS *fixP ATTRIBUTE_UNUSED;
{
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
return 1;
/* Don't adjust pc-relative references to merge sections in 64-bit
@@ -1244,14 +1356,21 @@ tc_i386_fix_adjustable (fixP)
|| fixP->fx_r_type == BFD_RELOC_386_TLS_GOTIE
|| fixP->fx_r_type == BFD_RELOC_386_TLS_LE_32
|| fixP->fx_r_type == BFD_RELOC_386_TLS_LE
+ || fixP->fx_r_type == BFD_RELOC_386_TLS_GOTDESC
+ || fixP->fx_r_type == BFD_RELOC_386_TLS_DESC_CALL
|| fixP->fx_r_type == BFD_RELOC_X86_64_PLT32
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOT32
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTPCREL
|| fixP->fx_r_type == BFD_RELOC_X86_64_TLSGD
|| fixP->fx_r_type == BFD_RELOC_X86_64_TLSLD
|| fixP->fx_r_type == BFD_RELOC_X86_64_DTPOFF32
+ || fixP->fx_r_type == BFD_RELOC_X86_64_DTPOFF64
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTTPOFF
|| fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF32
+ || fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF64
+ || fixP->fx_r_type == BFD_RELOC_X86_64_GOTOFF64
+ || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC
+ || fixP->fx_r_type == BFD_RELOC_X86_64_TLSDESC_CALL
|| fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
@@ -1265,13 +1384,54 @@ static int
intel_float_operand (mnemonic)
const char *mnemonic;
{
- if (mnemonic[0] == 'f' && mnemonic[1] == 'i')
- return 2;
-
- if (mnemonic[0] == 'f')
- return 1;
+ /* Note that the value returned is meaningful only for opcodes with (memory)
+ operands, hence the code here is free to improperly handle opcodes that
+ have no operands (for better performance and smaller code). */
+
+ if (mnemonic[0] != 'f')
+ return 0; /* non-math */
+
+ switch (mnemonic[1])
+ {
+ /* fclex, fdecstp, fdisi, femms, feni, fincstp, finit, fsetpm, and
+ the fs segment override prefix not currently handled because no
+ call path can make opcodes without operands get here */
+ case 'i':
+ return 2 /* integer op */;
+ case 'l':
+ if (mnemonic[2] == 'd' && (mnemonic[3] == 'c' || mnemonic[3] == 'e'))
+ return 3; /* fldcw/fldenv */
+ break;
+ case 'n':
+ if (mnemonic[2] != 'o' /* fnop */)
+ return 3; /* non-waiting control op */
+ break;
+ case 'r':
+ if (mnemonic[2] == 's')
+ return 3; /* frstor/frstpm */
+ break;
+ case 's':
+ if (mnemonic[2] == 'a')
+ return 3; /* fsave */
+ if (mnemonic[2] == 't')
+ {
+ switch (mnemonic[3])
+ {
+ case 'c': /* fstcw */
+ case 'd': /* fstdw */
+ case 'e': /* fstenv */
+ case 's': /* fsts[gw] */
+ return 3;
+ }
+ }
+ break;
+ case 'x':
+ if (mnemonic[2] == 'r' || mnemonic[2] == 's')
+ return 0; /* fxsave/fxrstor are not really math ops */
+ break;
+ }
- return 0;
+ return 1;
}
/* This is the guts of the machine-dependent assembler. LINE points to a
@@ -1316,13 +1476,18 @@ md_assemble (line)
have two immediate operands. */
if (intel_syntax && i.operands > 1
&& (strcmp (mnemonic, "bound") != 0)
+ && (strcmp (mnemonic, "invlpga") != 0)
&& !((i.types[0] & Imm) && (i.types[1] & Imm)))
swap_operands ();
if (i.imm_operands)
optimize_imm ();
- if (i.disp_operands)
+ /* Don't optimize displacement for movabs since it only takes 64bit
+ displacement. */
+ if (i.disp_operands
+ && (flag_code != CODE_64BIT
+ || strcmp (mnemonic, "movabs") != 0))
optimize_disp ();
/* Next, we find a template that matches the given insn,
@@ -1343,7 +1508,20 @@ md_assemble (line)
"word ptr" or "byte ptr" on the source operand, but we'll use
the suffix later to choose the destination register. */
if ((i.tm.base_opcode & ~9) == 0x0fb6)
- i.suffix = 0;
+ {
+ if (i.reg_operands < 2
+ && !i.suffix
+ && (~i.tm.opcode_modifier
+ & (No_bSuf
+ | No_wSuf
+ | No_lSuf
+ | No_sSuf
+ | No_xSuf
+ | No_qSuf)))
+ as_bad (_("ambiguous operand size for `%s'"), i.tm.name);
+
+ i.suffix = 0;
+ }
}
if (i.tm.opcode_modifier & FWait)
@@ -1462,7 +1640,7 @@ 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.\n"),
+ as_bad (_("can't encode register '%%%s' in an instruction requiring REX prefix."),
i.op[x].regs->reg_name);
/* Otherwise it is equivalent to the extended register.
@@ -1489,6 +1667,8 @@ parse_insn (line, mnemonic)
char *l = line;
char *token_start = l;
char *mnem_p;
+ int supported;
+ const template *t;
/* Non-zero if we found a prefix only acceptable with string insns. */
const char *expecting_string_instruction = NULL;
@@ -1508,8 +1688,9 @@ parse_insn (line, mnemonic)
}
if (!is_space_char (*l)
&& *l != END_OF_INSN
- && *l != PREFIX_SEPARATOR
- && *l != ',')
+ && (intel_syntax
+ || (*l != PREFIX_SEPARATOR
+ && *l != ',')))
{
as_bad (_("invalid character %s in mnemonic"),
output_invalid (*l));
@@ -1517,7 +1698,7 @@ parse_insn (line, mnemonic)
}
if (token_start == l)
{
- if (*l == PREFIX_SEPARATOR)
+ if (!intel_syntax && *l == PREFIX_SEPARATOR)
as_bad (_("expecting prefix; got nothing"));
else
as_bad (_("expecting mnemonic; got nothing"));
@@ -1532,6 +1713,15 @@ parse_insn (line, mnemonic)
&& current_templates
&& (current_templates->start->opcode_modifier & IsPrefix))
{
+ if (current_templates->start->cpu_flags
+ & (flag_code != CODE_64BIT ? Cpu64 : CpuNo64))
+ {
+ as_bad ((flag_code != CODE_64BIT
+ ? _("`%s' is only supported in 64-bit mode")
+ : _("`%s' is not supported in 64-bit mode")),
+ current_templates->start->name);
+ return NULL;
+ }
/* If we are in 16-bit mode, do not allow addr16 or data16.
Similarly, in 32-bit mode, do not allow addr32 or data32. */
if ((current_templates->start->opcode_modifier & (Size16 | Size32))
@@ -1565,6 +1755,9 @@ parse_insn (line, mnemonic)
switch (mnem_p[-1])
{
case WORD_MNEM_SUFFIX:
+ if (intel_syntax && (intel_float_operand (mnemonic) & 2))
+ i.suffix = SHORT_MNEM_SUFFIX;
+ else
case BYTE_MNEM_SUFFIX:
case QWORD_MNEM_SUFFIX:
i.suffix = mnem_p[-1];
@@ -1585,7 +1778,7 @@ parse_insn (line, mnemonic)
case 'd':
if (intel_syntax)
{
- if (intel_float_operand (mnemonic))
+ if (intel_float_operand (mnemonic) == 1)
i.suffix = SHORT_MNEM_SUFFIX;
else
i.suffix = LONG_MNEM_SUFFIX;
@@ -1634,11 +1827,29 @@ parse_insn (line, mnemonic)
}
/* Check if instruction is supported on specified architecture. */
- if ((current_templates->start->cpu_flags & ~(Cpu64 | CpuNo64))
- & ~(cpu_arch_flags & ~(Cpu64 | CpuNo64)))
+ supported = 0;
+ for (t = current_templates->start; t < current_templates->end; ++t)
{
- as_warn (_("`%s' is not supported on `%s'"),
- current_templates->start->name, cpu_arch_name);
+ if (!((t->cpu_flags & ~(Cpu64 | CpuNo64))
+ & ~(cpu_arch_flags & ~(Cpu64 | CpuNo64))))
+ supported |= 1;
+ if (!(t->cpu_flags & (flag_code == CODE_64BIT ? CpuNo64 : Cpu64)))
+ supported |= 2;
+ }
+ if (!(supported & 2))
+ {
+ as_bad (flag_code == CODE_64BIT
+ ? _("`%s' is not supported in 64-bit mode")
+ : _("`%s' is only supported in 64-bit mode"),
+ current_templates->start->name);
+ return NULL;
+ }
+ if (!(supported & 1))
+ {
+ as_warn (_("`%s' is not supported on `%s%s'"),
+ current_templates->start->name,
+ cpu_arch_name,
+ cpu_sub_arch_name ? cpu_sub_arch_name : "");
}
else if ((Cpu386 & ~cpu_arch_flags) && (flag_code != CODE_16BIT))
{
@@ -1646,12 +1857,24 @@ parse_insn (line, mnemonic)
}
/* Check for rep/repne without a string instruction. */
- if (expecting_string_instruction
- && !(current_templates->start->opcode_modifier & IsString))
+ if (expecting_string_instruction)
{
- as_bad (_("expecting string instruction after `%s'"),
- expecting_string_instruction);
- return NULL;
+ static templates override;
+
+ for (t = current_templates->start; t < current_templates->end; ++t)
+ if (t->opcode_modifier & IsString)
+ break;
+ if (t >= current_templates->end)
+ {
+ as_bad (_("expecting string instruction after `%s'"),
+ expecting_string_instruction);
+ return NULL;
+ }
+ for (override.start = t; t < current_templates->end; ++t)
+ if (!(t->opcode_modifier & IsString))
+ break;
+ override.end = t;
+ current_templates = &override;
}
return l;
@@ -1901,24 +2124,36 @@ optimize_imm ()
/* Symbols and expressions. */
default:
- /* Convert symbolic operand to proper sizes for matching. */
- switch (guess_suffix)
- {
- case QWORD_MNEM_SUFFIX:
- i.types[op] = Imm64 | Imm32S;
- break;
- case LONG_MNEM_SUFFIX:
- i.types[op] = Imm32 | Imm64;
- break;
- case WORD_MNEM_SUFFIX:
- i.types[op] = Imm16 | Imm32 | Imm64;
- break;
- break;
- case BYTE_MNEM_SUFFIX:
- i.types[op] = Imm8 | Imm8S | Imm16 | Imm32S | Imm32;
- break;
- break;
- }
+ /* Convert symbolic operand to proper sizes for matching, but don't
+ prevent matching a set of insns that only supports sizes other
+ than those matching the insn suffix. */
+ {
+ unsigned int mask, allowed = 0;
+ const template *t;
+
+ for (t = current_templates->start; t < current_templates->end; ++t)
+ allowed |= t->operand_types[op];
+ switch (guess_suffix)
+ {
+ case QWORD_MNEM_SUFFIX:
+ mask = Imm64 | Imm32S;
+ break;
+ case LONG_MNEM_SUFFIX:
+ mask = Imm32;
+ break;
+ case WORD_MNEM_SUFFIX:
+ mask = Imm16;
+ break;
+ case BYTE_MNEM_SUFFIX:
+ mask = Imm8;
+ break;
+ default:
+ mask = 0;
+ break;
+ }
+ if (mask & allowed)
+ i.types[op] &= mask;
+ }
break;
}
}
@@ -1931,37 +2166,61 @@ optimize_disp ()
int op;
for (op = i.operands; --op >= 0;)
- if ((i.types[op] & Disp) && i.op[op].disps->X_op == O_constant)
+ if (i.types[op] & Disp)
{
- offsetT disp = i.op[op].disps->X_add_number;
-
- if (i.types[op] & Disp16)
+ if (i.op[op].disps->X_op == O_constant)
{
- /* We know this operand is at most 16 bits, so
- convert to a signed 16 bit number before trying
- to see whether it will fit in an even smaller
- size. */
+ offsetT disp = i.op[op].disps->X_add_number;
- disp = (((disp & 0xffff) ^ 0x8000) - 0x8000);
- }
- else if (i.types[op] & Disp32)
- {
- /* We know this operand is at most 32 bits, so convert to a
- signed 32 bit number before trying to see whether it will
- fit in an even smaller size. */
- disp &= (((offsetT) 2 << 31) - 1);
- disp = (disp ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31);
+ if ((i.types[op] & Disp16)
+ && (disp & ~(offsetT) 0xffff) == 0)
+ {
+ /* If this operand is at most 16 bits, convert
+ to a signed 16 bit number and don't use 64bit
+ displacement. */
+ disp = (((disp & 0xffff) ^ 0x8000) - 0x8000);
+ i.types[op] &= ~Disp64;
+ }
+ if ((i.types[op] & Disp32)
+ && (disp & ~(((offsetT) 2 << 31) - 1)) == 0)
+ {
+ /* If this operand is at most 32 bits, convert
+ to a signed 32 bit number and don't use 64bit
+ displacement. */
+ disp &= (((offsetT) 2 << 31) - 1);
+ disp = (disp ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31);
+ i.types[op] &= ~Disp64;
+ }
+ if (!disp && (i.types[op] & BaseIndex))
+ {
+ i.types[op] &= ~Disp;
+ i.op[op].disps = 0;
+ i.disp_operands--;
+ }
+ else if (flag_code == CODE_64BIT)
+ {
+ if (fits_in_signed_long (disp))
+ {
+ i.types[op] &= ~Disp64;
+ i.types[op] |= Disp32S;
+ }
+ if (fits_in_unsigned_long (disp))
+ i.types[op] |= Disp32;
+ }
+ if ((i.types[op] & (Disp32 | Disp32S | Disp16))
+ && fits_in_signed_byte (disp))
+ i.types[op] |= Disp8;
}
- if (flag_code == CODE_64BIT)
+ else if (i.reloc[op] == BFD_RELOC_386_TLS_DESC_CALL
+ || i.reloc[op] == BFD_RELOC_X86_64_TLSDESC_CALL)
{
- if (fits_in_signed_long (disp))
- i.types[op] |= Disp32S;
- if (fits_in_unsigned_long (disp))
- i.types[op] |= Disp32;
+ fix_new_exp (frag_now, frag_more (0) - frag_now->fr_literal, 0,
+ i.op[op].disps, 0, i.reloc[op]);
+ i.types[op] &= ~Disp;
}
- if ((i.types[op] & (Disp32 | Disp32S | Disp16))
- && fits_in_signed_byte (disp))
- i.types[op] |= Disp8;
+ else
+ /* We only support 64bit displacement on constants. */
+ i.types[op] &= ~Disp64;
}
}
@@ -2004,9 +2263,7 @@ match_template ()
: (i.suffix == LONG_DOUBLE_MNEM_SUFFIX
? No_xSuf : 0))))));
- for (t = current_templates->start;
- t < current_templates->end;
- t++)
+ for (t = current_templates->start; t < current_templates->end; t++)
{
/* Must have right number of operands. */
if (i.operands != t->operands)
@@ -2015,11 +2272,20 @@ match_template ()
/* Check the suffix, except for some instructions in intel mode. */
if ((t->opcode_modifier & suffix_check)
&& !(intel_syntax
- && (t->opcode_modifier & IgnoreSize))
- && !(intel_syntax
- && t->base_opcode == 0xd9
- && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */
- || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */
+ && (t->opcode_modifier & IgnoreSize)))
+ continue;
+
+ /* In general, don't allow 64-bit operands in 32-bit mode. */
+ if (i.suffix == QWORD_MNEM_SUFFIX
+ && flag_code != CODE_64BIT
+ && (intel_syntax
+ ? (!(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)))
+ && (t->base_opcode != 0x0fc7
+ || t->extension_opcode != 1 /* cmpxchg8b */))
continue;
/* Do not verify operands when there are none. */
@@ -2043,10 +2309,15 @@ match_template ()
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])
- || !CONSISTENT_REGISTER_MATCH (overlap0, i.types[0],
- t->operand_types[0],
- overlap1, i.types[1],
- t->operand_types[1]))
+ /* monitor in SSE3 is a very special case. The first
+ register and the second register may have differnet
+ sizes. */
+ || !((t->base_opcode == 0x0f01
+ && t->extension_opcode == 0xc8)
+ || CONSISTENT_REGISTER_MATCH (overlap0, i.types[0],
+ t->operand_types[0],
+ overlap1, i.types[1],
+ t->operand_types[1])))
{
/* Check if other direction is valid ... */
if ((t->opcode_modifier & (D | FloatD)) == 0)
@@ -2173,7 +2444,7 @@ check_string ()
}
static int
-process_suffix ()
+process_suffix (void)
{
/* If matched instruction specifies an explicit instruction mnemonic
suffix, use it. */
@@ -2196,6 +2467,7 @@ process_suffix ()
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))
@@ -2233,20 +2505,72 @@ process_suffix ()
else
abort ();
}
- else if ((i.tm.opcode_modifier & DefaultSize) && !i.suffix)
+ else if ((i.tm.opcode_modifier & DefaultSize)
+ && !i.suffix
+ /* exclude fldenv/frstor/fsave/fstenv */
+ && (i.tm.opcode_modifier & No_sSuf))
{
i.suffix = stackop_size;
}
+ 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)))
+ {
+ switch (flag_code)
+ {
+ case CODE_64BIT:
+ if (!(i.tm.opcode_modifier & No_qSuf))
+ {
+ i.suffix = QWORD_MNEM_SUFFIX;
+ break;
+ }
+ case CODE_32BIT:
+ if (!(i.tm.opcode_modifier & No_lSuf))
+ i.suffix = LONG_MNEM_SUFFIX;
+ break;
+ case CODE_16BIT:
+ if (!(i.tm.opcode_modifier & No_wSuf))
+ i.suffix = WORD_MNEM_SUFFIX;
+ break;
+ }
+ }
- /* Change the opcode based on the operand size given by i.suffix;
- We need not change things for byte insns. */
-
- if (!i.suffix && (i.tm.opcode_modifier & W))
+ if (!i.suffix)
{
- as_bad (_("no instruction mnemonic suffix given and no register operands; can't size instruction"));
- return 0;
+ if (!intel_syntax)
+ {
+ if (i.tm.opcode_modifier & W)
+ {
+ 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);
+
+ if ((i.tm.opcode_modifier & W)
+ || ((suffixes & (suffixes - 1))
+ && !(i.tm.opcode_modifier & (DefaultSize | IgnoreSize))))
+ {
+ as_bad (_("ambiguous operand size for `%s'"), i.tm.name);
+ return 0;
+ }
+ }
}
+ /* Change the opcode based on the operand size given by i.suffix;
+ We don't need to change things for byte insns. */
+
if (i.suffix && i.suffix != BYTE_MNEM_SUFFIX)
{
/* It's not a byte, select word/dword operation. */
@@ -2261,13 +2585,25 @@ process_suffix ()
/* Now select between word & dword operations via the operand
size prefix, except for instructions that will ignore this
prefix anyway. */
- if (i.suffix != QWORD_MNEM_SUFFIX
- && !(i.tm.opcode_modifier & IgnoreSize)
- && ((i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT)
- || (flag_code == CODE_64BIT
- && (i.tm.opcode_modifier & JumpByte))))
+ if (i.tm.base_opcode == 0x0f01 && i.tm.extension_opcode == 0xc8)
+ {
+ /* monitor in SSE3 is a very special case. The default size
+ of AX is the size of mode. The address size override
+ prefix will change the size of AX. */
+ if (i.op->regs[0].reg_type &
+ (flag_code == CODE_32BIT ? Reg16 : Reg32))
+ if (!add_prefix (ADDR_PREFIX_OPCODE))
+ return 0;
+ }
+ else if (i.suffix != QWORD_MNEM_SUFFIX
+ && i.suffix != LONG_DOUBLE_MNEM_SUFFIX
+ && !(i.tm.opcode_modifier & (IgnoreSize | FloatMF))
+ && ((i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT)
+ || (flag_code == CODE_64BIT
+ && (i.tm.opcode_modifier & JumpByte))))
{
unsigned int prefix = DATA_PREFIX_OPCODE;
+
if (i.tm.opcode_modifier & JumpByte) /* jcxz, loop */
prefix = ADDR_PREFIX_OPCODE;
@@ -2283,19 +2619,18 @@ process_suffix ()
/* Size floating point instruction. */
if (i.suffix == LONG_MNEM_SUFFIX)
- {
- if (i.tm.opcode_modifier & FloatMF)
- i.tm.base_opcode ^= 4;
- }
+ if (i.tm.opcode_modifier & FloatMF)
+ i.tm.base_opcode ^= 4;
}
return 1;
}
static int
-check_byte_reg ()
+check_byte_reg (void)
{
int op;
+
for (op = i.operands; --op >= 0;)
{
/* If this is an eight bit register, it's OK. If it's the 16 or
@@ -2313,14 +2648,7 @@ check_byte_reg ()
|| i.tm.base_opcode == 0xfbf))
continue;
- if ((i.types[op] & WordReg) && i.op[op].regs->reg_num < 4
-#if 0
- /* Check that the template allows eight bit regs. This
- kills insns such as `orb $1,%edx', which maybe should be
- allowed. */
- && (i.tm.operand_types[op] & (Reg8 | InOutPortReg))
-#endif
- )
+ if ((i.types[op] & WordReg) && i.op[op].regs->reg_num < 4)
{
/* Prohibit these changes in the 64bit mode, since the
lowering is more complicated. */
@@ -2490,7 +2818,7 @@ finalize_imm ()
unsigned int overlap0, overlap1, overlap2;
overlap0 = i.types[0] & i.tm.operand_types[0];
- if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32 | Imm32S))
+ if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32 | Imm32S | Imm64))
&& overlap0 != Imm8 && overlap0 != Imm8S
&& overlap0 != Imm16 && overlap0 != Imm32S
&& overlap0 != Imm32 && overlap0 != Imm64)
@@ -2523,7 +2851,7 @@ finalize_imm ()
i.types[0] = overlap0;
overlap1 = i.types[1] & i.tm.operand_types[1];
- if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32))
+ if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32 | Imm64))
&& overlap1 != Imm8 && overlap1 != Imm8S
&& overlap1 != Imm16 && overlap1 != Imm32S
&& overlap1 != Imm32 && overlap1 != Imm64)
@@ -2641,8 +2969,10 @@ process_operands ()
default_seg = &ds;
}
- if (i.tm.base_opcode == 0x8d /* lea */ && i.seg[0] && !quiet_warnings)
- as_warn (_("segment override on `lea' is ineffectual"));
+ if ((i.tm.base_opcode == 0x8d /* lea */
+ || (i.tm.cpu_flags & CpuSVME))
+ && i.seg[0] && !quiet_warnings)
+ as_warn (_("segment override on `%s' is ineffectual"), i.tm.name);
/* If a segment was explicitly specified, and the specified segment
is not the default, use an opcode prefix to select it. If we
@@ -2699,6 +3029,13 @@ build_modrm_byte ()
if ((i.op[source].regs->reg_flags & RegRex) != 0)
i.rex |= REX_EXTX;
}
+ if (flag_code != CODE_64BIT && (i.rex & (REX_EXTX | REX_EXTZ)))
+ {
+ if (!((i.types[0] | i.types[1]) & Control))
+ abort ();
+ i.rex &= ~(REX_EXTX | REX_EXTZ);
+ add_prefix (LOCK_PREFIX_OPCODE);
+ }
}
else
{ /* If it's not 2 reg operands... */
@@ -2719,21 +3056,7 @@ build_modrm_byte ()
if (i.index_reg == 0)
{
/* Operand is just <disp> */
- if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)
- && (flag_code != CODE_64BIT))
- {
- i.rm.regmem = NO_BASE_REGISTER_16;
- i.types[op] &= ~Disp;
- i.types[op] |= Disp16;
- }
- else if (flag_code != CODE_64BIT
- || (i.prefix[ADDR_PREFIX] != 0))
- {
- i.rm.regmem = NO_BASE_REGISTER;
- i.types[op] &= ~Disp;
- i.types[op] |= Disp32;
- }
- else
+ if (flag_code == CODE_64BIT)
{
/* 64bit mode overwrites the 32bit absolute
addressing by RIP relative addressing and
@@ -2742,8 +3065,17 @@ 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] &= ~Disp;
- i.types[op] |= Disp32S;
+ i.types[op] = ((i.prefix[ADDR_PREFIX] == 0) ? Disp32S : Disp32);
+ }
+ else if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
+ {
+ i.rm.regmem = NO_BASE_REGISTER_16;
+ i.types[op] = Disp16;
+ }
+ else
+ {
+ i.rm.regmem = NO_BASE_REGISTER;
+ i.types[op] = Disp32;
}
}
else /* !i.base_reg && i.index_reg */
@@ -2765,9 +3097,11 @@ build_modrm_byte ()
else if (i.base_reg->reg_type == BaseIndex)
{
i.rm.regmem = NO_BASE_REGISTER;
- i.types[op] &= ~Disp;
+ i.types[op] &= ~ Disp;
i.types[op] |= Disp32S;
i.flags[op] = Operand_PCrel;
+ if (! i.disp_operands)
+ fake_zero_displacement = 1;
}
else if (i.base_reg->reg_type & Reg16)
{
@@ -2803,12 +3137,8 @@ build_modrm_byte ()
{
if (flag_code == CODE_64BIT
&& (i.types[op] & Disp))
- {
- if (i.types[op] & Disp8)
- i.types[op] = Disp8 | Disp32S;
- else
- i.types[op] = Disp32S;
- }
+ i.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;
@@ -2850,7 +3180,13 @@ build_modrm_byte ()
if ((i.index_reg->reg_flags & RegRex) != 0)
i.rex |= REX_EXTY;
}
- i.rm.mode = mode_from_disp_size (i.types[op]);
+
+ if (i.disp_operands
+ && (i.reloc[op] == BFD_RELOC_386_TLS_DESC_CALL
+ || i.reloc[op] == BFD_RELOC_X86_64_TLSDESC_CALL))
+ i.rm.mode = 0;
+ else
+ i.rm.mode = mode_from_disp_size (i.types[op]);
}
if (fake_zero_displacement)
@@ -3150,24 +3486,32 @@ output_insn ()
/* Output normal instructions here. */
char *p;
unsigned char *q;
+ unsigned int prefix;
- /* All opcodes on i386 have either 1 or 2 bytes, PadLock instructions
- have 3 bytes. We may use one more higher byte to specify a prefix
- the instruction requires. */
- if ((i.tm.cpu_flags & CpuPadLock) != 0
- && (i.tm.base_opcode & 0xff000000) != 0)
- {
- unsigned int prefix;
- prefix = (i.tm.base_opcode >> 24) & 0xff;
-
- if (prefix != REPE_PREFIX_OPCODE
- || i.prefix[LOCKREP_PREFIX] != REPE_PREFIX_OPCODE)
+ /* 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)
+ {
+ if (i.tm.base_opcode & 0xff000000)
+ {
+ prefix = (i.tm.base_opcode >> 24) & 0xff;
+ goto check_prefix;
+ }
+ }
+ else if ((i.tm.base_opcode & 0xff0000) != 0)
+ {
+ prefix = (i.tm.base_opcode >> 16) & 0xff;
+ if ((i.tm.cpu_flags & CpuPadLock) != 0)
+ {
+check_prefix:
+ if (prefix != REPE_PREFIX_OPCODE
+ || i.prefix[LOCKREP_PREFIX] != REPE_PREFIX_OPCODE)
+ add_prefix (prefix);
+ }
+ else
add_prefix (prefix);
}
- else
- if ((i.tm.cpu_flags & CpuPadLock) == 0
- && (i.tm.base_opcode & 0xff0000) != 0)
- add_prefix ((i.tm.base_opcode >> 16) & 0xff);
/* The prefix bytes. */
for (q = i.prefix;
@@ -3188,7 +3532,7 @@ output_insn ()
}
else
{
- if ((i.tm.cpu_flags & CpuPadLock) != 0)
+ if ((i.tm.cpu_flags & CpuMNI) != 0)
{
p = frag_more (3);
*p++ = (i.tm.base_opcode >> 16) & 0xff;
@@ -3237,7 +3581,7 @@ output_insn ()
#ifdef DEBUG386
if (flag_debug)
{
- pi (line, &i);
+ pi ("" /*line*/, &i);
}
#endif /* DEBUG386 */
}
@@ -3319,14 +3663,18 @@ output_disp (insn_start_frag, insn_start_off)
p = frag_more (size);
reloc_type = reloc (size, pcrel, sign, i.reloc[n]);
- if (reloc_type == BFD_RELOC_32
- && GOT_symbol
+ if (GOT_symbol
&& GOT_symbol == i.op[n].disps->X_add_symbol
- && (i.op[n].disps->X_op == O_symbol
- || (i.op[n].disps->X_op == O_add
- && ((symbol_get_value_expression
- (i.op[n].disps->X_op_symbol)->X_op)
- == O_subtract))))
+ && (((reloc_type == BFD_RELOC_32
+ || reloc_type == BFD_RELOC_X86_64_32S
+ || (reloc_type == BFD_RELOC_64
+ && object_64bit))
+ && (i.op[n].disps->X_op == O_symbol
+ || (i.op[n].disps->X_op == O_add
+ && ((symbol_get_value_expression
+ (i.op[n].disps->X_op_symbol)->X_op)
+ == O_subtract))))
+ || reloc_type == BFD_RELOC_32_PCREL))
{
offsetT add;
@@ -3343,11 +3691,18 @@ output_disp (insn_start_frag, insn_start_off)
add += p - frag_now->fr_literal;
}
- /* We don't support dynamic linking on x86-64 yet. */
- if (flag_code == CODE_64BIT)
- abort ();
- reloc_type = BFD_RELOC_386_GOTPC;
- i.op[n].disps->X_add_number += add;
+ if (!object_64bit)
+ {
+ reloc_type = BFD_RELOC_386_GOTPC;
+ i.op[n].imms->X_add_number += add;
+ }
+ else if (reloc_type == BFD_RELOC_64)
+ reloc_type = BFD_RELOC_X86_64_GOTPC64;
+ else
+ /* Don't do the adjustment for x86-64, as there
+ the pcrel addressing is relative to the _next_
+ insn, and that is taken care of in other code. */
+ reloc_type = BFD_RELOC_X86_64_GOTPC32;
}
fix_new_exp (frag_now, p - frag_now->fr_literal, size,
i.op[n].disps, pcrel, reloc_type);
@@ -3398,7 +3753,8 @@ output_imm (insn_start_frag, insn_start_off)
int sign = 0;
if ((i.types[n] & (Imm32S))
- && i.suffix == QWORD_MNEM_SUFFIX)
+ && (i.suffix == QWORD_MNEM_SUFFIX
+ || (!i.suffix && (i.tm.opcode_modifier & No_lSuf))))
sign = 1;
if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64))
{
@@ -3454,7 +3810,9 @@ output_imm (insn_start_frag, insn_start_off)
* since the expression is not pcrel, I felt it would be
* confusing to do it this way. */
- if (reloc_type == BFD_RELOC_32
+ if ((reloc_type == BFD_RELOC_32
+ || reloc_type == BFD_RELOC_X86_64_32S
+ || reloc_type == BFD_RELOC_64)
&& GOT_symbol
&& GOT_symbol == i.op[n].imms->X_add_symbol
&& (i.op[n].imms->X_op == O_symbol
@@ -3478,10 +3836,12 @@ output_imm (insn_start_frag, insn_start_off)
add += p - frag_now->fr_literal;
}
- /* We don't support dynamic linking on x86-64 yet. */
- if (flag_code == CODE_64BIT)
- abort ();
- reloc_type = BFD_RELOC_386_GOTPC;
+ if (!object_64bit)
+ reloc_type = BFD_RELOC_386_GOTPC;
+ else if (size == 4)
+ reloc_type = BFD_RELOC_X86_64_GOTPC32;
+ else if (size == 8)
+ reloc_type = BFD_RELOC_X86_64_GOTPC64;
i.op[n].imms->X_add_number += add;
}
fix_new_exp (frag_now, p - frag_now->fr_literal, size,
@@ -3491,9 +3851,35 @@ output_imm (insn_start_frag, insn_start_off)
}
}
-#ifndef LEX_AT
-static char *lex_got PARAMS ((enum bfd_reloc_code_real *, int *));
+/* x86_cons_fix_new is called via the expression parsing code when a
+ reloc is needed. We use this hook to get the correct .got reloc. */
+static 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)
+{
+ enum bfd_reloc_code_real r = reloc (len, 0, cons_sign, got_reloc);
+
+ got_reloc = NO_RELOC;
+
+#ifdef TE_PE
+ if (exp->X_op == O_secrel)
+ {
+ exp->X_op = O_symbol;
+ r = BFD_RELOC_32_SECREL;
+ }
+#endif
+ fix_new_exp (frag, off, len, exp, 0, r);
+}
+
+#if (!defined (OBJ_ELF) && !defined (OBJ_MAYBE_ELF)) || defined (LEX_AT)
+# define lex_got(reloc, adjust, types) NULL
+#else
/* Parse operands of the form
<symbol>@GOTOFF+<nnn>
and similar .plt or .got references.
@@ -3504,32 +3890,44 @@ static char *lex_got PARAMS ((enum bfd_reloc_code_real *, int *));
is non-null set it to the length of the string we removed from the
input line. Otherwise return NULL. */
static char *
-lex_got (reloc, adjust)
- enum bfd_reloc_code_real *reloc;
- int *adjust;
+lex_got (enum bfd_reloc_code_real *reloc,
+ int *adjust,
+ unsigned int *types)
{
- static const char * const mode_name[NUM_FLAG_CODE] = { "32", "16", "64" };
+ /* Some of the relocations depend on the size of what field is to
+ be relocated. But in our callers i386_immediate and i386_displacement
+ we don't yet know the operand size (this will be set by insn
+ matching). Hence we record the word32 relocation here,
+ and adjust the reloc according to the real size in reloc(). */
static const struct {
const char *str;
- const enum bfd_reloc_code_real rel[NUM_FLAG_CODE];
+ const enum bfd_reloc_code_real rel[2];
+ const unsigned int types64;
} gotrel[] = {
- { "PLT", { BFD_RELOC_386_PLT32, 0, BFD_RELOC_X86_64_PLT32 } },
- { "GOTOFF", { BFD_RELOC_386_GOTOFF, 0, 0 } },
- { "GOTPCREL", { 0, 0, BFD_RELOC_X86_64_GOTPCREL } },
- { "TLSGD", { BFD_RELOC_386_TLS_GD, 0, BFD_RELOC_X86_64_TLSGD } },
- { "TLSLDM", { BFD_RELOC_386_TLS_LDM, 0, 0 } },
- { "TLSLD", { 0, 0, BFD_RELOC_X86_64_TLSLD } },
- { "GOTTPOFF", { BFD_RELOC_386_TLS_IE_32, 0, BFD_RELOC_X86_64_GOTTPOFF } },
- { "TPOFF", { BFD_RELOC_386_TLS_LE_32, 0, BFD_RELOC_X86_64_TPOFF32 } },
- { "NTPOFF", { BFD_RELOC_386_TLS_LE, 0, 0 } },
- { "DTPOFF", { BFD_RELOC_386_TLS_LDO_32, 0, BFD_RELOC_X86_64_DTPOFF32 } },
- { "GOTNTPOFF",{ BFD_RELOC_386_TLS_GOTIE, 0, 0 } },
- { "INDNTPOFF",{ BFD_RELOC_386_TLS_IE, 0, 0 } },
- { "GOT", { BFD_RELOC_386_GOT32, 0, BFD_RELOC_X86_64_GOT32 } }
+ { "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;
+ if (!IS_ELF)
+ return NULL;
+
for (cp = input_line_pointer; *cp != '@'; cp++)
if (is_end_of_line[(unsigned char) *cp])
return NULL;
@@ -3541,15 +3939,23 @@ lex_got (reloc, adjust)
len = strlen (gotrel[j].str);
if (strncasecmp (cp + 1, gotrel[j].str, len) == 0)
{
- if (gotrel[j].rel[(unsigned int) flag_code] != 0)
+ if (gotrel[j].rel[object_64bit] != 0)
{
int first, second;
char *tmpbuf, *past_reloc;
- *reloc = gotrel[j].rel[(unsigned int) flag_code];
+ *reloc = gotrel[j].rel[object_64bit];
if (adjust)
*adjust = len;
+ if (types)
+ {
+ if (flag_code != CODE_64BIT)
+ *types = Imm32|Disp32;
+ else
+ *types = gotrel[j].types64;
+ }
+
if (GOT_symbol == NULL)
GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
@@ -3577,8 +3983,8 @@ lex_got (reloc, adjust)
return tmpbuf;
}
- as_bad (_("@%s reloc is not supported in %s bit mode"),
- gotrel[j].str, mode_name[(unsigned int) flag_code]);
+ as_bad (_("@%s reloc is not supported with %d-bit output format"),
+ gotrel[j].str, 1 << (5 + object_64bit));
return NULL;
}
}
@@ -3587,28 +3993,12 @@ lex_got (reloc, adjust)
return NULL;
}
-/* x86_cons_fix_new is called via the expression parsing code when a
- reloc is needed. We use this hook to get the correct .got reloc. */
-static enum bfd_reloc_code_real got_reloc = NO_RELOC;
-
-void
-x86_cons_fix_new (frag, off, len, exp)
- fragS *frag;
- unsigned int off;
- unsigned int len;
- expressionS *exp;
-{
- enum bfd_reloc_code_real r = reloc (len, 0, 0, got_reloc);
- got_reloc = NO_RELOC;
- fix_new_exp (frag, off, len, exp, 0, r);
-}
-
void
x86_cons (exp, size)
expressionS *exp;
int size;
{
- if (size == 4)
+ if (size == 4 || (object_64bit && size == 8))
{
/* Handle @GOTOFF and the like in an expression. */
char *save;
@@ -3616,7 +4006,7 @@ x86_cons (exp, size)
int adjust;
save = input_line_pointer;
- gotfree_input_line = lex_got (&got_reloc, &adjust);
+ gotfree_input_line = lex_got (&got_reloc, &adjust, NULL);
if (gotfree_input_line)
input_line_pointer = gotfree_input_line;
@@ -3638,6 +4028,36 @@ x86_cons (exp, size)
}
#endif
+static void signed_cons (int size)
+{
+ if (flag_code == CODE_64BIT)
+ cons_sign = 1;
+ cons (size);
+ cons_sign = -1;
+}
+
+#ifdef TE_PE
+static void
+pe_directive_secrel (dummy)
+ int dummy ATTRIBUTE_UNUSED;
+{
+ expressionS exp;
+
+ do
+ {
+ 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 ();
+}
+#endif
+
static int i386_immediate PARAMS ((char *));
static int
@@ -3645,11 +4065,10 @@ i386_immediate (imm_start)
char *imm_start;
{
char *save_input_line_pointer;
-#ifndef LEX_AT
char *gotfree_input_line;
-#endif
segT exp_seg = 0;
expressionS *exp;
+ unsigned int types = ~0U;
if (i.imm_operands == MAX_IMMEDIATE_OPERANDS)
{
@@ -3666,11 +4085,9 @@ i386_immediate (imm_start)
save_input_line_pointer = input_line_pointer;
input_line_pointer = imm_start;
-#ifndef LEX_AT
- gotfree_input_line = lex_got (&i.reloc[this_operand], NULL);
+ gotfree_input_line = lex_got (&i.reloc[this_operand], NULL, &types);
if (gotfree_input_line)
input_line_pointer = gotfree_input_line;
-#endif
exp_seg = expression (exp);
@@ -3679,10 +4096,8 @@ i386_immediate (imm_start)
as_bad (_("junk `%s' after expression"), input_line_pointer);
input_line_pointer = save_input_line_pointer;
-#ifndef LEX_AT
if (gotfree_input_line)
free (gotfree_input_line);
-#endif
if (exp->X_op == O_absent || exp->X_op == O_big)
{
@@ -3722,6 +4137,7 @@ i386_immediate (imm_start)
determined later, depending on destination register,
suffix, or the default for the section. */
i.types[this_operand] |= Imm8 | Imm16 | Imm32 | Imm32S | Imm64;
+ i.types[this_operand] &= types;
}
return 1;
@@ -3741,7 +4157,6 @@ i386_scale (scale)
switch (val)
{
- case 0:
case 1:
i.log2_scale_factor = 0;
break;
@@ -3755,10 +4170,16 @@ i386_scale (scale)
i.log2_scale_factor = 3;
break;
default:
- as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"),
- scale);
- input_line_pointer = save;
- return NULL;
+ {
+ char sep = *input_line_pointer;
+
+ *input_line_pointer = '\0';
+ as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"),
+ scale);
+ *input_line_pointer = sep;
+ input_line_pointer = save;
+ return NULL;
+ }
}
if (i.log2_scale_factor != 0 && i.index_reg == 0)
{
@@ -3783,18 +4204,45 @@ i386_displacement (disp_start, disp_end)
expressionS *exp;
segT exp_seg = 0;
char *save_input_line_pointer;
-#ifndef LEX_AT
char *gotfree_input_line;
-#endif
- int bigdisp = Disp32;
+ int bigdisp, override;
+ unsigned int types = Disp;
+ if ((i.types[this_operand] & JumpAbsolute)
+ || !(current_templates->start->opcode_modifier & (Jump | JumpDword)))
+ {
+ bigdisp = Disp32;
+ override = (i.prefix[ADDR_PREFIX] != 0);
+ }
+ else
+ {
+ /* For PC-relative branches, the width of the displacement
+ is dependent upon data size, not address size. */
+ bigdisp = 0;
+ override = (i.prefix[DATA_PREFIX] != 0);
+ }
if (flag_code == CODE_64BIT)
{
- if (i.prefix[ADDR_PREFIX] == 0)
- bigdisp = Disp64;
+ if (!bigdisp)
+ bigdisp = (override || i.suffix == WORD_MNEM_SUFFIX)
+ ? Disp16
+ : Disp32S | Disp32;
+ else if (!override)
+ bigdisp = Disp64 | Disp32S | Disp32;
+ }
+ else
+ {
+ if (!bigdisp)
+ {
+ if (!override)
+ override = (i.suffix == (flag_code != CODE_16BIT
+ ? WORD_MNEM_SUFFIX
+ : LONG_MNEM_SUFFIX));
+ bigdisp = Disp32;
+ }
+ if ((flag_code == CODE_16BIT) ^ override)
+ bigdisp = Disp16;
}
- else if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
- bigdisp = Disp16;
i.types[this_operand] |= bigdisp;
exp = &disp_expressions[i.disp_operands];
@@ -3848,11 +4296,9 @@ i386_displacement (disp_start, disp_end)
*displacement_string_end = '0';
}
#endif
-#ifndef LEX_AT
- gotfree_input_line = lex_got (&i.reloc[this_operand], NULL);
+ gotfree_input_line = lex_got (&i.reloc[this_operand], NULL, &types);
if (gotfree_input_line)
input_line_pointer = gotfree_input_line;
-#endif
exp_seg = expression (exp);
@@ -3864,16 +4310,15 @@ i386_displacement (disp_start, disp_end)
#endif
RESTORE_END_STRING (disp_end);
input_line_pointer = save_input_line_pointer;
-#ifndef LEX_AT
if (gotfree_input_line)
free (gotfree_input_line);
-#endif
/* We do this to make sure that the section symbol is in
the symbol table. We will ultimately change the relocation
to be relative to the beginning of the section. */
if (i.reloc[this_operand] == BFD_RELOC_386_GOTOFF
- || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL)
+ || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL
+ || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTOFF64)
{
if (exp->X_op != O_symbol)
{
@@ -3891,6 +4336,8 @@ i386_displacement (disp_start, disp_end)
exp->X_op_symbol = GOT_symbol;
if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL)
i.reloc[this_operand] = BFD_RELOC_32_PCREL;
+ else if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTOFF64)
+ i.reloc[this_operand] = BFD_RELOC_64;
else
i.reloc[this_operand] = BFD_RELOC_32;
}
@@ -3920,8 +4367,10 @@ i386_displacement (disp_start, disp_end)
return 0;
}
#endif
- else if (flag_code == CODE_64BIT)
- i.types[this_operand] |= Disp32S | Disp32;
+
+ if (!(i.types[this_operand] & ~Disp))
+ i.types[this_operand] &= types;
+
return 1;
}
@@ -3941,30 +4390,41 @@ i386_index_check (operand_string)
tryprefix:
#endif
ok = 1;
- if (flag_code == CODE_64BIT)
- {
- if (i.prefix[ADDR_PREFIX] == 0)
- {
- /* 64bit checks. */
- if ((i.base_reg
- && ((i.base_reg->reg_type & Reg64) == 0)
- && (i.base_reg->reg_type != BaseIndex
- || i.index_reg))
- || (i.index_reg
- && ((i.index_reg->reg_type & (Reg64 | BaseIndex))
- != (Reg64 | BaseIndex))))
- ok = 0;
- }
+ if ((current_templates->start->cpu_flags & CpuSVME)
+ && current_templates->end[-1].operand_types[0] == AnyMem)
+ {
+ /* Memory operands of SVME insns are special in that they only allow
+ rAX as their memory address and ignore any segment override. */
+ unsigned RegXX;
+
+ /* SKINIT is even more restrictive: it always requires EAX. */
+ if (strcmp (current_templates->start->name, "skinit") == 0)
+ RegXX = Reg32;
+ else if (flag_code == CODE_64BIT)
+ RegXX = i.prefix[ADDR_PREFIX] == 0 ? Reg64 : Reg32;
else
- {
- /* 32bit checks. */
- if ((i.base_reg
- && (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32)
- || (i.index_reg
- && ((i.index_reg->reg_type & (Reg32 | BaseIndex | RegRex))
- != (Reg32 | BaseIndex))))
- ok = 0;
- }
+ 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)
+ || i.index_reg
+ || (i.types[0] & Disp))
+ 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;
}
else
{
@@ -3997,8 +4457,7 @@ i386_index_check (operand_string)
if (!ok)
{
#if INFER_ADDR_PREFIX
- if (flag_code != CODE_64BIT
- && i.prefix[ADDR_PREFIX] == 0 && stackop_size != '\0')
+ if (i.prefix[ADDR_PREFIX] == 0)
{
i.prefix[ADDR_PREFIX] = ADDR_PREFIX_OPCODE;
i.prefixes += 1;
@@ -4007,7 +4466,7 @@ 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 (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;
@@ -4020,9 +4479,8 @@ i386_index_check (operand_string)
as_bad (_("`%s' is not a valid %s bit base/index expression"),
operand_string,
flag_code_names[flag_code]);
- return 0;
}
- return 1;
+ return ok;
}
/* Parse OPERAND_STRING into the i386_insn structure I. Returns non-zero
@@ -4050,8 +4508,7 @@ i386_operand (operand_string)
}
/* Check if operand is a register. */
- if ((*op_string == REGISTER_PREFIX || allow_naked_reg)
- && (r = parse_register (op_string, &end_op)) != NULL)
+ if ((r = parse_register (op_string, &end_op)) != NULL)
{
/* Check for a segment override by searching for ':' after a
segment register. */
@@ -4189,8 +4646,7 @@ i386_operand (operand_string)
++base_string;
if (*base_string == ','
- || ((*base_string == REGISTER_PREFIX || allow_naked_reg)
- && (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;
@@ -4210,8 +4666,7 @@ i386_operand (operand_string)
if (is_space_char (*base_string))
++base_string;
- if ((*base_string == REGISTER_PREFIX || allow_naked_reg)
- && (i.index_reg = parse_register (base_string, &end_op)) != NULL)
+ if ((i.index_reg = parse_register (base_string, &end_op)) != NULL)
{
base_string = end_op;
if (is_space_char (*base_string))
@@ -4336,7 +4791,7 @@ md_estimate_size_before_relax (fragP, segment)
shared library. */
if (S_GET_SEGMENT (fragP->fr_symbol) != segment
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- || (OUTPUT_FLAVOR == bfd_target_elf_flavour
+ || (IS_ELF
&& (S_IS_EXTERNAL (fragP->fr_symbol)
|| S_IS_WEAK (fragP->fr_symbol)))
#endif
@@ -4523,6 +4978,20 @@ md_convert_frag (abfd, sec, fragP)
}
}
+ /* If size if less then four we are sure that the operand fits,
+ but if it's 4, then it could be that the displacement is larger
+ then -/+ 2GB. */
+ 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)))
+ {
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("jump target out of range"));
+ /* Make us emit 0. */
+ displacement_from_opcode_start = extension;
+ }
/* Now put displacement after opcode. */
md_number_to_chars ((char *) where_to_put_displacement,
(valueT) (displacement_from_opcode_start - extension),
@@ -4536,9 +5005,6 @@ int md_short_jump_size = 2;
/* Size of dword displacement jmp. */
int md_long_jump_size = 5;
-/* Size of relocation record. */
-const int md_reloc_size = 8;
-
void
md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
char *ptr;
@@ -4576,7 +5042,7 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
we are handling. */
void
-md_apply_fix3 (fixP, valP, seg)
+md_apply_fix (fixP, valP, seg)
/* The fix we're to put in. */
fixS *fixP;
/* Pointer to the value of the bits. */
@@ -4595,7 +5061,11 @@ md_apply_fix3 (fixP, valP, seg)
default:
break;
+ case BFD_RELOC_64:
+ fixP->fx_r_type = BFD_RELOC_64_PCREL;
+ break;
case BFD_RELOC_32:
+ case BFD_RELOC_X86_64_32S:
fixP->fx_r_type = BFD_RELOC_32_PCREL;
break;
case BFD_RELOC_16:
@@ -4609,6 +5079,7 @@ md_apply_fix3 (fixP, valP, seg)
if (fixP->fx_addsy != NULL
&& (fixP->fx_r_type == BFD_RELOC_32_PCREL
+ || fixP->fx_r_type == BFD_RELOC_64_PCREL
|| fixP->fx_r_type == BFD_RELOC_16_PCREL
|| fixP->fx_r_type == BFD_RELOC_8_PCREL)
&& !use_rela_relocations)
@@ -4618,7 +5089,7 @@ md_apply_fix3 (fixP, valP, seg)
subtract the current location (for partial_inplace, PC relative
relocations); see more below. */
#ifndef OBJ_AOUT
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour
+ if (IS_ELF
#ifdef TE_PE
|| OUTPUT_FLAVOR == bfd_target_coff_flavour
#endif
@@ -4626,7 +5097,7 @@ md_apply_fix3 (fixP, valP, seg)
value += fixP->fx_where + fixP->fx_frag->fr_address;
#endif
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
+ if (IS_ELF)
{
segT sym_seg = S_GET_SEGMENT (fixP->fx_addsy);
@@ -4644,9 +5115,10 @@ md_apply_fix3 (fixP, valP, seg)
}
#endif
#if defined (OBJ_COFF) && defined (TE_PE)
- /* For some reason, the PE format does not store a section
- address offset for a PC relative symbol. */
- if (S_GET_SEGMENT (fixP->fx_addsy) != seg)
+ /* For some reason, the PE format does not store a
+ section address offset for a PC relative symbol. */
+ if (S_GET_SEGMENT (fixP->fx_addsy) != seg
+ || S_IS_WEAK (fixP->fx_addsy))
value += md_pcrel_from (fixP);
#endif
}
@@ -4654,8 +5126,7 @@ md_apply_fix3 (fixP, valP, seg)
/* Fix a few things - the dynamic linker expects certain values here,
and we must not disappoint it. */
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour
- && fixP->fx_addsy)
+ if (IS_ELF && fixP->fx_addsy)
switch (fixP->fx_r_type)
{
case BFD_RELOC_386_PLT32:
@@ -4670,19 +5141,30 @@ md_apply_fix3 (fixP, valP, seg)
case BFD_RELOC_386_TLS_IE_32:
case BFD_RELOC_386_TLS_IE:
case BFD_RELOC_386_TLS_GOTIE:
+ case BFD_RELOC_386_TLS_GOTDESC:
case BFD_RELOC_X86_64_TLSGD:
case BFD_RELOC_X86_64_TLSLD:
case BFD_RELOC_X86_64_GOTTPOFF:
+ case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
value = 0; /* Fully resolved at runtime. No addend. */
/* Fallthrough */
case BFD_RELOC_386_TLS_LE:
case BFD_RELOC_386_TLS_LDO_32:
case BFD_RELOC_386_TLS_LE_32:
case BFD_RELOC_X86_64_DTPOFF32:
+ case BFD_RELOC_X86_64_DTPOFF64:
case BFD_RELOC_X86_64_TPOFF32:
+ case BFD_RELOC_X86_64_TPOFF64:
S_SET_THREAD_LOCAL (fixP->fx_addsy);
break;
+ case BFD_RELOC_386_TLS_DESC_CALL:
+ case BFD_RELOC_X86_64_TLSDESC_CALL:
+ value = 0; /* Fully resolved at runtime. No addend. */
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
+ fixP->fx_done = 0;
+ return;
+
case BFD_RELOC_386_GOT32:
case BFD_RELOC_X86_64_GOT32:
value = 0; /* Fully resolved at runtime. No addend. */
@@ -4768,7 +5250,7 @@ md_atof (type, litP, sizeP)
return 0;
}
-char output_invalid_buf[8];
+static char output_invalid_buf[8];
static char *
output_invalid (c)
@@ -4784,9 +5266,7 @@ output_invalid (c)
/* REG_STRING starts *before* REGISTER_PREFIX. */
static const reg_entry *
-parse_register (reg_string, end_op)
- char *reg_string;
- char **end_op;
+parse_real_register (char *reg_string, char **end_op)
{
char *s = reg_string;
char *p;
@@ -4846,14 +5326,87 @@ parse_register (reg_string, end_op)
}
if (r != NULL
- && (r->reg_flags & (RegRex64 | RegRex)) != 0
+ && ((r->reg_flags & (RegRex64 | RegRex)) | (r->reg_type & Reg64)) != 0
+ && (r->reg_type != Control || !(cpu_arch_flags & CpuSledgehammer))
&& flag_code != CODE_64BIT)
+ return (const reg_entry *) NULL;
+
+ return r;
+}
+
+/* REG_STRING starts *before* REGISTER_PREFIX. */
+
+static const reg_entry *
+parse_register (char *reg_string, char **end_op)
+{
+ const reg_entry *r;
+
+ if (*reg_string == REGISTER_PREFIX || allow_naked_reg)
+ r = parse_real_register (reg_string, end_op);
+ else
+ r = NULL;
+ if (!r)
{
- return (const reg_entry *) NULL;
- }
+ char *save = input_line_pointer;
+ char c;
+ symbolS *symbolP;
+
+ input_line_pointer = reg_string;
+ c = get_symbol_end ();
+ symbolP = symbol_find (reg_string);
+ if (symbolP && S_GET_SEGMENT (symbolP) == reg_section)
+ {
+ 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));
+ r = i386_regtab + e->X_add_number;
+ *end_op = input_line_pointer;
+ }
+ *input_line_pointer = c;
+ input_line_pointer = save;
+ }
return r;
}
+
+int
+i386_parse_name (char *name, expressionS *e, char *nextcharP)
+{
+ const reg_entry *r;
+ char *end = input_line_pointer;
+
+ *end = *nextcharP;
+ r = parse_register (name, &input_line_pointer);
+ if (r && end <= input_line_pointer)
+ {
+ *nextcharP = *input_line_pointer;
+ *input_line_pointer = 0;
+ e->X_op = O_register;
+ e->X_add_number = r - i386_regtab;
+ return 1;
+ }
+ input_line_pointer = end;
+ *end = 0;
+ return 0;
+}
+
+void
+md_operand (expressionS *e)
+{
+ if (*input_line_pointer == REGISTER_PREFIX)
+ {
+ char *end;
+ const reg_entry *r = parse_real_register (input_line_pointer, &end);
+
+ if (r)
+ {
+ e->X_op = O_register;
+ e->X_add_number = r - i386_regtab;
+ input_line_pointer = end;
+ }
+ }
+}
+
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
const char *md_shortopts = "kVQ:sqn";
@@ -4861,13 +5414,16 @@ const char *md_shortopts = "kVQ:sqn";
const char *md_shortopts = "qn";
#endif
-struct option md_longopts[] = {
#define OPTION_32 (OPTION_MD_BASE + 0)
+#define OPTION_64 (OPTION_MD_BASE + 1)
+#define OPTION_DIVIDE (OPTION_MD_BASE + 2)
+
+struct option md_longopts[] = {
{"32", no_argument, NULL, OPTION_32},
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
-#define OPTION_64 (OPTION_MD_BASE + 1)
{"64", no_argument, NULL, OPTION_64},
#endif
+ {"divide", no_argument, NULL, OPTION_DIVIDE},
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
@@ -4929,6 +5485,23 @@ md_parse_option (c, arg)
default_arch = "i386";
break;
+ case OPTION_DIVIDE:
+#ifdef SVR4_COMMENT_CHARS
+ {
+ char *n, *t;
+ const char *s;
+
+ n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
+ t = n;
+ for (s = i386_comment_chars; *s != '\0'; s++)
+ if (*s != '/')
+ *t++ = *s;
+ *t = '\0';
+ i386_comment_chars = n;
+ }
+#endif
+ break;
+
default:
return 0;
}
@@ -4943,14 +5516,21 @@ md_show_usage (stream)
fprintf (stream, _("\
-Q ignored\n\
-V print assembler version number\n\
- -k ignored\n\
+ -k ignored\n"));
+#endif
+ fprintf (stream, _("\
-n Do not optimize code alignment\n\
- -q quieten some warnings\n\
+ -q quieten some warnings\n"));
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ fprintf (stream, _("\
-s ignored\n"));
+#endif
+#ifdef SVR4_COMMENT_CHARS
+ fprintf (stream, _("\
+ --divide do not treat `/' as a comment character\n"));
#else
fprintf (stream, _("\
- -n Do not optimize code alignment\n\
- -q quieten some warnings\n"));
+ --divide ignored\n"));
#endif
}
@@ -4982,7 +5562,10 @@ i386_target_format ()
case bfd_target_elf_flavour:
{
if (flag_code == CODE_64BIT)
- use_rela_relocations = 1;
+ {
+ object_64bit = 1;
+ use_rela_relocations = 1;
+ }
return flag_code == CODE_64BIT ? "elf64-x86-64" : ELF_TARGET_FORMAT;
}
#endif
@@ -4997,8 +5580,7 @@ i386_target_format ()
#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
void i386_elf_emit_arch_note ()
{
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour
- && cpu_arch_name != NULL)
+ if (IS_ELF && cpu_arch_name != NULL)
{
char *p;
asection *seg = now_seg;
@@ -5101,6 +5683,10 @@ s_bss (ignore)
{
int temp;
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ if (IS_ELF)
+ obj_elf_section_change_hook ();
+#endif
temp = get_absolute_expression ();
subseg_set (bss_section, (subsegT) temp);
demand_empty_rest_of_line ();
@@ -5114,18 +5700,18 @@ i386_validate_fix (fixp)
{
if (fixp->fx_subsy && fixp->fx_subsy == GOT_symbol)
{
- /* GOTOFF relocation are nonsense in 64bit mode. */
if (fixp->fx_r_type == BFD_RELOC_32_PCREL)
{
- if (flag_code != CODE_64BIT)
+ if (!object_64bit)
abort ();
fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCREL;
}
else
{
- if (flag_code == CODE_64BIT)
- abort ();
- fixp->fx_r_type = BFD_RELOC_386_GOTOFF;
+ if (!object_64bit)
+ fixp->fx_r_type = BFD_RELOC_386_GOTOFF;
+ else
+ fixp->fx_r_type = BFD_RELOC_X86_64_GOTOFF64;
}
fixp->fx_subsy = 0;
}
@@ -5156,17 +5742,39 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_386_TLS_GOTIE:
case BFD_RELOC_386_TLS_LE_32:
case BFD_RELOC_386_TLS_LE:
- case BFD_RELOC_X86_64_32S:
+ case BFD_RELOC_386_TLS_GOTDESC:
+ case BFD_RELOC_386_TLS_DESC_CALL:
case BFD_RELOC_X86_64_TLSGD:
case BFD_RELOC_X86_64_TLSLD:
case BFD_RELOC_X86_64_DTPOFF32:
+ case BFD_RELOC_X86_64_DTPOFF64:
case BFD_RELOC_X86_64_GOTTPOFF:
case BFD_RELOC_X86_64_TPOFF32:
+ case BFD_RELOC_X86_64_TPOFF64:
+ case BFD_RELOC_X86_64_GOTOFF64:
+ case BFD_RELOC_X86_64_GOTPC32:
+ case BFD_RELOC_X86_64_GOT64:
+ case BFD_RELOC_X86_64_GOTPCREL64:
+ case BFD_RELOC_X86_64_GOTPC64:
+ case BFD_RELOC_X86_64_GOTPLT64:
+ case BFD_RELOC_X86_64_PLTOFF64:
+ case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
+ case BFD_RELOC_X86_64_TLSDESC_CALL:
case BFD_RELOC_RVA:
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;
+ case BFD_RELOC_X86_64_32S:
+ if (!fixp->fx_pcrel)
+ {
+ /* Don't turn BFD_RELOC_X86_64_32S into BFD_RELOC_32. */
+ code = fixp->fx_r_type;
+ break;
+ }
default:
if (fixp->fx_pcrel)
{
@@ -5181,6 +5789,9 @@ tc_gen_reloc (section, fixp)
case 1: code = BFD_RELOC_8_PCREL; break;
case 2: code = BFD_RELOC_16_PCREL; break;
case 4: code = BFD_RELOC_32_PCREL; break;
+#ifdef BFD64
+ case 8: code = BFD_RELOC_64_PCREL; break;
+#endif
}
}
else
@@ -5204,14 +5815,22 @@ tc_gen_reloc (section, fixp)
break;
}
- if (code == BFD_RELOC_32
+ if ((code == BFD_RELOC_32
+ || code == BFD_RELOC_32_PCREL
+ || code == BFD_RELOC_X86_64_32S)
&& GOT_symbol
&& fixp->fx_addsy == GOT_symbol)
{
- /* We don't support GOTPC on 64bit targets. */
- if (flag_code == CODE_64BIT)
- abort ();
- code = BFD_RELOC_386_GOTPC;
+ if (!object_64bit)
+ code = BFD_RELOC_386_GOTPC;
+ else
+ code = BFD_RELOC_X86_64_GOTPC32;
+ }
+ if ((code == BFD_RELOC_64 || code == BFD_RELOC_64_PCREL)
+ && GOT_symbol
+ && fixp->fx_addsy == GOT_symbol)
+ {
+ code = BFD_RELOC_X86_64_GOTPC64;
}
rel = (arelent *) xmalloc (sizeof (arelent));
@@ -5219,6 +5838,7 @@ tc_gen_reloc (section, fixp)
*rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
+
if (!use_rela_relocations)
{
/* HACK: Since i386 ELF uses Rel instead of Rela, encode the
@@ -5242,6 +5862,8 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_X86_64_TLSGD:
case BFD_RELOC_X86_64_TLSLD:
case BFD_RELOC_X86_64_GOTTPOFF:
+ case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
+ case BFD_RELOC_X86_64_TLSDESC_CALL:
rel->addend = fixp->fx_offset - fixp->fx_size;
break;
default:
@@ -5287,11 +5909,13 @@ tc_gen_reloc (section, fixp)
alpha [a-zA-Z]
+ binOp & | AND | \| | OR | ^ | XOR
+
byteRegister AL | AH | BL | BH | CL | CH | DL | DH
constant digits [[ radixOverride ]]
- dataType BYTE | WORD | DWORD | QWORD | XWORD
+ dataType BYTE | WORD | DWORD | FWORD | QWORD | TBYTE | OWORD | XMMWORD
digits decdigit
| digits decdigit
@@ -5299,13 +5923,21 @@ tc_gen_reloc (section, fixp)
decdigit [0-9]
- e05 e05 addOp e06
+ e04 e04 addOp e05
+ | e05
+
+ e05 e05 binOp e06
| e06
e06 e06 mulOp e09
| e09
e09 OFFSET e10
+ | SHORT e10
+ | + e10
+ | - e10
+ | ~ e10
+ | NOT e10
| e09 PTR e10
| e09 : e10
| e10
@@ -5321,8 +5953,8 @@ tc_gen_reloc (section, fixp)
| $
| register
- => expr SHORT e05
- | e05
+ => expr expr cmpOp e04
+ | e04
gpRegister AX | EAX | BX | EBX | CX | ECX | DX | EDX
| BP | EBP | SP | ESP | DI | EDI | SI | ESI
@@ -5334,7 +5966,7 @@ tc_gen_reloc (section, fixp)
| id alpha
| id decdigit
- mulOp * | / | MOD
+ mulOp * | / | % | MOD | << | SHL | >> | SHR
quote " | '
@@ -5344,7 +5976,7 @@ tc_gen_reloc (section, fixp)
segmentRegister CS | DS | ES | FS | GS | SS
- specialRegister CR0 | CR2 | CR3
+ specialRegister CR0 | CR2 | CR3 | CR4
| DR0 | DR1 | DR2 | DR3 | DR6 | DR7
| TR3 | TR4 | TR5 | TR6 | TR7
@@ -5352,12 +5984,19 @@ tc_gen_reloc (section, fixp)
done by calling parse_register) and eliminate immediate left recursion
to implement a recursive-descent parser.
- expr SHORT e05
- | e05
+ expr e04 expr'
+
+ expr' cmpOp e04 expr'
+ | Empty
+
+ e04 e05 e04'
+
+ e04' addOp e05 e04'
+ | Empty
e05 e06 e05'
- e05' addOp e06 e05'
+ e05' binOp e06 e05'
| Empty
e06 e09 e06'
@@ -5366,6 +6005,11 @@ tc_gen_reloc (section, fixp)
| Empty
e09 OFFSET e10 e09'
+ | SHORT e10'
+ | + e10'
+ | - e10'
+ | ~ e10'
+ | NOT e10'
| e10 e09'
e09' PTR e10 e09'
@@ -5382,8 +6026,11 @@ tc_gen_reloc (section, fixp)
| BYTE
| WORD
| DWORD
+ | FWORD
| QWORD
- | XWORD
+ | TBYTE
+ | OWORD
+ | XMMWORD
| .
| $
| register
@@ -5398,8 +6045,11 @@ 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. */
const reg_entry *reg; /* Last register reference found. */
char *disp; /* Displacement string being built. */
+ char *next_operand; /* Resume point when splitting operands. */
};
static struct intel_parser_s intel_parser;
@@ -5421,28 +6071,30 @@ static struct intel_token cur_token, prev_token;
#define T_REG 2
#define T_BYTE 3
#define T_WORD 4
-#define T_DWORD 5
-#define T_QWORD 6
-#define T_XWORD 7
+#define T_DWORD 5
+#define T_FWORD 6
+#define T_QWORD 7
+#define T_TBYTE 8
+#define T_XMMWORD 9
#undef T_SHORT
-#define T_SHORT 8
-#define T_OFFSET 9
-#define T_PTR 10
-#define T_ID 11
+#define T_SHORT 10
+#define T_OFFSET 11
+#define T_PTR 12
+#define T_ID 13
+#define T_SHL 14
+#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_e05_1 PARAMS ((void));
static int intel_e06 PARAMS ((void));
-static int intel_e06_1 PARAMS ((void));
static int intel_e09 PARAMS ((void));
-static int intel_e09_1 PARAMS ((void));
+static int intel_bracket_expr PARAMS ((void));
static int intel_e10 PARAMS ((void));
-static int intel_e10_1 PARAMS ((void));
static int intel_e11 PARAMS ((void));
static int
@@ -5453,34 +6105,42 @@ i386_intel_operand (operand_string, got_a_float)
int ret;
char *p;
- /* Initialize token holders. */
- cur_token.code = prev_token.code = T_NIL;
- cur_token.reg = prev_token.reg = NULL;
- cur_token.str = prev_token.str = NULL;
-
- /* Initialize parser structure. */
- p = intel_parser.op_string = (char *) malloc (strlen (operand_string) + 1);
- if (p == NULL)
- abort ();
- strcpy (intel_parser.op_string, operand_string);
- intel_parser.got_a_float = got_a_float;
- intel_parser.op_modifier = -1;
- intel_parser.is_mem = 0;
- intel_parser.reg = NULL;
- intel_parser.disp = (char *) malloc (strlen (operand_string) + 1);
- if (intel_parser.disp == NULL)
- abort ();
- intel_parser.disp[0] = '\0';
-
- /* Read the first token and start the parser. */
- intel_get_token ();
- ret = intel_expr ();
+ p = intel_parser.op_string = xstrdup (operand_string);
+ intel_parser.disp = (char *) xmalloc (strlen (operand_string) + 1);
- if (ret)
+ for (;;)
{
+ /* Initialize token holders. */
+ cur_token.code = prev_token.code = T_NIL;
+ cur_token.reg = prev_token.reg = NULL;
+ cur_token.str = prev_token.str = NULL;
+
+ /* Initialize parser structure. */
+ intel_parser.got_a_float = got_a_float;
+ intel_parser.op_modifier = 0;
+ intel_parser.is_mem = 0;
+ intel_parser.in_offset = 0;
+ intel_parser.in_bracket = 0;
+ intel_parser.reg = NULL;
+ intel_parser.disp[0] = '\0';
+ intel_parser.next_operand = NULL;
+
+ /* Read the first token and start the parser. */
+ intel_get_token ();
+ ret = intel_expr ();
+
+ if (!ret)
+ break;
+
+ if (cur_token.code != T_NIL)
+ {
+ as_bad (_("invalid operand for '%s' ('%s' unexpected)"),
+ current_templates->start->name, cur_token.str);
+ ret = 0;
+ }
/* If we found a memory reference, hand it over to i386_displacement
to fill in the rest of the operand fields. */
- if (intel_parser.is_mem)
+ else if (intel_parser.is_mem)
{
if ((i.mem_operands == 1
&& (current_templates->start->opcode_modifier & IsString) == 0)
@@ -5495,18 +6155,46 @@ i386_intel_operand (operand_string, got_a_float)
char *s = intel_parser.disp;
i.mem_operands++;
+ if (!quiet_warnings && intel_parser.is_mem < 0)
+ /* See the comments in intel_bracket_expr. */
+ as_warn (_("Treating `%s' as memory reference"), operand_string);
+
/* Add the displacement expression. */
if (*s != '\0')
ret = i386_displacement (s, s + strlen (s));
if (ret)
- ret = i386_index_check (operand_string);
+ {
+ /* Swap base and index in 16-bit memory operands like
+ [si+bx]. Since i386_index_check is also used in AT&T
+ mode we have to do that here. */
+ if (i.base_reg
+ && i.index_reg
+ && (i.base_reg->reg_type & Reg16)
+ && (i.index_reg->reg_type & Reg16)
+ && i.base_reg->reg_num >= 6
+ && i.index_reg->reg_num < 6)
+ {
+ const reg_entry *base = i.index_reg;
+
+ i.index_reg = i.base_reg;
+ i.base_reg = base;
+ }
+ ret = i386_index_check (operand_string);
+ }
}
}
/* Constant and OFFSET expressions are handled by i386_immediate. */
- else if (intel_parser.op_modifier == OFFSET_FLAT
+ else if ((intel_parser.op_modifier & (1 << T_OFFSET))
|| intel_parser.reg == NULL)
ret = i386_immediate (intel_parser.disp);
+
+ if (intel_parser.next_operand && this_operand >= MAX_OPERANDS - 1)
+ ret = 0;
+ if (!ret || !intel_parser.next_operand)
+ break;
+ intel_parser.op_string = intel_parser.next_operand;
+ this_operand = i.operands++;
}
free (p);
@@ -5515,50 +6203,81 @@ i386_intel_operand (operand_string, got_a_float)
return ret;
}
-/* expr SHORT e05
- | e05 */
+#define NUM_ADDRESS_REGS (!!i.base_reg + !!i.index_reg)
+
+/* expr e04 expr'
+
+ expr' cmpOp e04 expr'
+ | Empty */
static int
intel_expr ()
{
- /* expr SHORT e05 */
- if (cur_token.code == T_SHORT)
+ /* XXX Implement the comparison operators. */
+ return intel_e04 ();
+}
+
+/* e04 e05 e04'
+
+ e04' addOp e05 e04'
+ | Empty */
+static int
+intel_e04 ()
+{
+ int nregs = -1;
+
+ for (;;)
{
- intel_parser.op_modifier = SHORT;
- intel_match_token (T_SHORT);
+ if (!intel_e05())
+ return 0;
- return (intel_e05 ());
- }
+ if (nregs >= 0 && NUM_ADDRESS_REGS > nregs)
+ i.base_reg = i386_regtab + REGNAM_AL; /* al is invalid as base */
- /* expr e05 */
- else
- return intel_e05 ();
+ if (cur_token.code == '+')
+ nregs = -1;
+ else if (cur_token.code == '-')
+ nregs = NUM_ADDRESS_REGS;
+ else
+ return 1;
+
+ strcat (intel_parser.disp, cur_token.str);
+ intel_match_token (cur_token.code);
+ }
}
/* e05 e06 e05'
- e05' addOp e06 e05'
+ e05' binOp e06 e05'
| Empty */
static int
intel_e05 ()
{
- return (intel_e06 () && intel_e05_1 ());
-}
+ int nregs = ~NUM_ADDRESS_REGS;
-static int
-intel_e05_1 ()
-{
- /* e05' addOp e06 e05' */
- if (cur_token.code == '+' || cur_token.code == '-')
+ for (;;)
{
- strcat (intel_parser.disp, cur_token.str);
+ if (!intel_e06())
+ return 0;
+
+ if (cur_token.code == '&' || cur_token.code == '|' || cur_token.code == '^')
+ {
+ char str[2];
+
+ str[0] = cur_token.code;
+ str[1] = 0;
+ strcat (intel_parser.disp, str);
+ }
+ else
+ break;
+
intel_match_token (cur_token.code);
- return (intel_e06 () && intel_e05_1 ());
+ if (nregs < 0)
+ nregs = ~nregs;
}
-
- /* e05' Empty */
- else
- return 1;
+ if (nregs >= 0 && NUM_ADDRESS_REGS > nregs)
+ i.base_reg = i386_regtab + REGNAM_AL + 1; /* cl is invalid as base */
+ return 1;
}
/* e06 e09 e06'
@@ -5568,27 +6287,44 @@ intel_e05_1 ()
static int
intel_e06 ()
{
- return (intel_e09 () && intel_e06_1 ());
-}
+ int nregs = ~NUM_ADDRESS_REGS;
-static int
-intel_e06_1 ()
-{
- /* e06' mulOp e09 e06' */
- if (cur_token.code == '*' || cur_token.code == '/')
+ for (;;)
{
- strcat (intel_parser.disp, cur_token.str);
- intel_match_token (cur_token.code);
+ if (!intel_e09())
+ return 0;
- return (intel_e09 () && intel_e06_1 ());
- }
+ if (cur_token.code == '*' || cur_token.code == '/' || cur_token.code == '%')
+ {
+ char str[2];
- /* e06' Empty */
- else
- return 1;
+ str[0] = cur_token.code;
+ str[1] = 0;
+ strcat (intel_parser.disp, str);
+ }
+ else if (cur_token.code == T_SHL)
+ strcat (intel_parser.disp, "<<");
+ else if (cur_token.code == T_SHR)
+ strcat (intel_parser.disp, ">>");
+ else
+ break;
+
+ intel_match_token (cur_token.code);
+
+ if (nregs < 0)
+ nregs = ~nregs;
+ }
+ if (nregs >= 0 && NUM_ADDRESS_REGS > nregs)
+ i.base_reg = i386_regtab + REGNAM_AL + 2; /* dl is invalid as base */
+ return 1;
}
-/* e09 OFFSET e10 e09'
+/* e09 OFFSET e09
+ | SHORT e09
+ | + e09
+ | - e09
+ | ~ e09
+ | NOT e09
| e10 e09'
e09' PTR e10 e09'
@@ -5597,82 +6333,287 @@ intel_e06_1 ()
static int
intel_e09 ()
{
- /* e09 OFFSET e10 e09' */
- if (cur_token.code == T_OFFSET)
+ int nregs = ~NUM_ADDRESS_REGS;
+ int in_offset = 0;
+
+ for (;;)
{
- intel_parser.is_mem = 0;
- intel_parser.op_modifier = OFFSET_FLAT;
- intel_match_token (T_OFFSET);
+ /* Don't consume constants here. */
+ if (cur_token.code == '+' || cur_token.code == '-')
+ {
+ /* Need to look one token ahead - if the next token
+ is a constant, the current token is its sign. */
+ int next_code;
- return (intel_e10 () && intel_e09_1 ());
- }
+ intel_match_token (cur_token.code);
+ next_code = cur_token.code;
+ intel_putback_token ();
+ if (next_code == T_CONST)
+ break;
+ }
- /* e09 e10 e09' */
- else
- return (intel_e10 () && intel_e09_1 ());
-}
+ /* e09 OFFSET e09 */
+ if (cur_token.code == T_OFFSET)
+ {
+ if (!in_offset++)
+ ++intel_parser.in_offset;
+ }
-static int
-intel_e09_1 ()
-{
- /* e09' PTR e10 e09' */
- if (cur_token.code == T_PTR)
- {
- if (prev_token.code == T_BYTE)
- i.suffix = BYTE_MNEM_SUFFIX;
+ /* e09 SHORT e09 */
+ else if (cur_token.code == T_SHORT)
+ intel_parser.op_modifier |= 1 << T_SHORT;
- else if (prev_token.code == T_WORD)
+ /* e09 + e09 */
+ else if (cur_token.code == '+')
+ strcat (intel_parser.disp, "+");
+
+ /* e09 - e09
+ | ~ e09
+ | NOT e09 */
+ else if (cur_token.code == '-' || cur_token.code == '~')
{
- if (intel_parser.got_a_float == 2) /* "fi..." */
- i.suffix = SHORT_MNEM_SUFFIX;
- else
- i.suffix = WORD_MNEM_SUFFIX;
+ char str[2];
+
+ if (nregs < 0)
+ nregs = ~nregs;
+ str[0] = cur_token.code;
+ str[1] = 0;
+ strcat (intel_parser.disp, str);
}
- else if (prev_token.code == T_DWORD)
+ /* e09 e10 e09' */
+ else
+ break;
+
+ intel_match_token (cur_token.code);
+ }
+
+ for (;;)
+ {
+ if (!intel_e10 ())
+ return 0;
+
+ /* e09' PTR e10 e09' */
+ if (cur_token.code == T_PTR)
{
- if (intel_parser.got_a_float == 1) /* "f..." */
- i.suffix = SHORT_MNEM_SUFFIX;
+ char suffix;
+
+ if (prev_token.code == T_BYTE)
+ suffix = BYTE_MNEM_SUFFIX;
+
+ else if (prev_token.code == T_WORD)
+ {
+ if (current_templates->start->name[0] == 'l'
+ && current_templates->start->name[2] == 's'
+ && current_templates->start->name[3] == 0)
+ suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
+ else if (intel_parser.got_a_float == 2) /* "fi..." */
+ suffix = SHORT_MNEM_SUFFIX;
+ else
+ suffix = WORD_MNEM_SUFFIX;
+ }
+
+ else if (prev_token.code == T_DWORD)
+ {
+ if (current_templates->start->name[0] == 'l'
+ && current_templates->start->name[2] == 's'
+ && current_templates->start->name[3] == 0)
+ suffix = WORD_MNEM_SUFFIX;
+ else if (flag_code == CODE_16BIT
+ && (current_templates->start->opcode_modifier
+ & (Jump | JumpDword)))
+ suffix = LONG_DOUBLE_MNEM_SUFFIX;
+ else if (intel_parser.got_a_float == 1) /* "f..." */
+ suffix = SHORT_MNEM_SUFFIX;
+ else
+ suffix = LONG_MNEM_SUFFIX;
+ }
+
+ else if (prev_token.code == T_FWORD)
+ {
+ if (current_templates->start->name[0] == 'l'
+ && current_templates->start->name[2] == 's'
+ && current_templates->start->name[3] == 0)
+ suffix = LONG_MNEM_SUFFIX;
+ else if (!intel_parser.got_a_float)
+ {
+ if (flag_code == CODE_16BIT)
+ add_prefix (DATA_PREFIX_OPCODE);
+ suffix = LONG_DOUBLE_MNEM_SUFFIX;
+ }
+ else
+ suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
+ }
+
+ else if (prev_token.code == T_QWORD)
+ {
+ if (intel_parser.got_a_float == 1) /* "f..." */
+ suffix = LONG_MNEM_SUFFIX;
+ else
+ suffix = QWORD_MNEM_SUFFIX;
+ }
+
+ else if (prev_token.code == T_TBYTE)
+ {
+ if (intel_parser.got_a_float == 1)
+ suffix = LONG_DOUBLE_MNEM_SUFFIX;
+ else
+ suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
+ }
+
+ else if (prev_token.code == T_XMMWORD)
+ {
+ /* XXX ignored for now, but accepted since gcc uses it */
+ suffix = 0;
+ }
+
else
- i.suffix = LONG_MNEM_SUFFIX;
+ {
+ as_bad (_("Unknown operand modifier `%s'"), prev_token.str);
+ return 0;
+ }
+
+ /* Operands for jump/call using 'ptr' notation denote absolute
+ addresses. */
+ if (current_templates->start->opcode_modifier & (Jump | JumpDword))
+ i.types[this_operand] |= JumpAbsolute;
+
+ if (current_templates->start->base_opcode == 0x8d /* lea */)
+ ;
+ else if (!i.suffix)
+ i.suffix = suffix;
+ else if (i.suffix != suffix)
+ {
+ as_bad (_("Conflicting operand modifiers"));
+ return 0;
+ }
+
}
- else if (prev_token.code == T_QWORD)
+ /* e09' : e10 e09' */
+ else if (cur_token.code == ':')
{
- if (intel_parser.got_a_float == 1) /* "f..." */
- i.suffix = LONG_MNEM_SUFFIX;
- else
- i.suffix = QWORD_MNEM_SUFFIX;
+ if (prev_token.code != T_REG)
+ {
+ /* While {call,jmp} SSSS:OOOO is MASM syntax only when SSSS is a
+ segment/group identifier (which we don't have), using comma
+ as the operand separator there is even less consistent, since
+ there all branches only have a single operand. */
+ if (this_operand != 0
+ || intel_parser.in_offset
+ || intel_parser.in_bracket
+ || (!(current_templates->start->opcode_modifier
+ & (Jump|JumpDword|JumpInterSegment))
+ && !(current_templates->start->operand_types[0]
+ & JumpAbsolute)))
+ return intel_match_token (T_NIL);
+ /* Remember the start of the 2nd operand and terminate 1st
+ operand here.
+ XXX This isn't right, yet (when SSSS:OOOO is right operand of
+ another expression), but it gets at least the simplest case
+ (a plain number or symbol on the left side) right. */
+ intel_parser.next_operand = intel_parser.op_string;
+ *--intel_parser.op_string = '\0';
+ return intel_match_token (':');
+ }
}
- else if (prev_token.code == T_XWORD)
- i.suffix = LONG_DOUBLE_MNEM_SUFFIX;
-
+ /* e09' Empty */
else
+ break;
+
+ intel_match_token (cur_token.code);
+
+ }
+
+ if (in_offset)
+ {
+ --intel_parser.in_offset;
+ if (nregs < 0)
+ nregs = ~nregs;
+ if (NUM_ADDRESS_REGS > nregs)
{
- as_bad (_("Unknown operand modifier `%s'\n"), prev_token.str);
+ as_bad (_("Invalid operand to `OFFSET'"));
return 0;
}
+ intel_parser.op_modifier |= 1 << T_OFFSET;
+ }
- intel_match_token (T_PTR);
+ if (nregs >= 0 && NUM_ADDRESS_REGS > nregs)
+ i.base_reg = i386_regtab + REGNAM_AL + 3; /* bl is invalid as base */
+ return 1;
+}
- return (intel_e10 () && intel_e09_1 ());
- }
+static int
+intel_bracket_expr ()
+{
+ int was_offset = intel_parser.op_modifier & (1 << T_OFFSET);
+ const char *start = intel_parser.op_string;
+ int len;
- /* e09 : e10 e09' */
- else if (cur_token.code == ':')
+ if (i.op[this_operand].regs)
+ return intel_match_token (T_NIL);
+
+ intel_match_token ('[');
+
+ /* Mark as a memory operand only if it's not already known to be an
+ offset expression. If it's an offset expression, we need to keep
+ the brace in. */
+ if (!intel_parser.in_offset)
{
- /* Mark as a memory operand only if it's not already known to be an
- offset expression. */
- if (intel_parser.op_modifier != OFFSET_FLAT)
- intel_parser.is_mem = 1;
+ ++intel_parser.in_bracket;
- return (intel_match_token (':') && intel_e10 () && intel_e09_1 ());
- }
+ /* Operands for jump/call inside brackets denote absolute addresses. */
+ if (current_templates->start->opcode_modifier & (Jump | JumpDword))
+ i.types[this_operand] |= JumpAbsolute;
- /* e09' Empty */
+ /* Unfortunately gas always diverged from MASM in a respect that can't
+ be easily fixed without risking to break code sequences likely to be
+ encountered (the testsuite even check for this): MASM doesn't consider
+ an expression inside brackets unconditionally as a memory reference.
+ When that is e.g. a constant, an offset expression, or the sum of the
+ two, this is still taken as a constant load. gas, however, always
+ treated these as memory references. As a compromise, we'll try to make
+ offset expressions inside brackets work the MASM way (since that's
+ less likely to be found in real world code), but make constants alone
+ continue to work the traditional gas way. In either case, issue a
+ warning. */
+ intel_parser.op_modifier &= ~was_offset;
+ }
else
- return 1;
+ strcat (intel_parser.disp, "[");
+
+ /* Add a '+' to the displacement string if necessary. */
+ if (*intel_parser.disp != '\0'
+ && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+')
+ strcat (intel_parser.disp, "+");
+
+ if (intel_expr ()
+ && (len = intel_parser.op_string - start - 1,
+ intel_match_token (']')))
+ {
+ /* Preserve brackets when the operand is an offset expression. */
+ if (intel_parser.in_offset)
+ strcat (intel_parser.disp, "]");
+ else
+ {
+ --intel_parser.in_bracket;
+ if (i.base_reg || i.index_reg)
+ intel_parser.is_mem = 1;
+ if (!intel_parser.is_mem)
+ {
+ if (!(intel_parser.op_modifier & (1 << T_OFFSET)))
+ /* 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);
+ }
+ }
+ intel_parser.op_modifier |= was_offset;
+
+ return 1;
+ }
+ return 0;
}
/* e10 e11 e10'
@@ -5682,45 +6623,16 @@ intel_e09_1 ()
static int
intel_e10 ()
{
- return (intel_e11 () && intel_e10_1 ());
-}
+ if (!intel_e11 ())
+ return 0;
-static int
-intel_e10_1 ()
-{
- /* e10' [ expr ] e10' */
- if (cur_token.code == '[')
+ while (cur_token.code == '[')
{
- intel_match_token ('[');
-
- /* Mark as a memory operand only if it's not already known to be an
- offset expression. If it's an offset expression, we need to keep
- the brace in. */
- if (intel_parser.op_modifier != OFFSET_FLAT)
- intel_parser.is_mem = 1;
- else
- strcat (intel_parser.disp, "[");
-
- /* Add a '+' to the displacement string if necessary. */
- if (*intel_parser.disp != '\0'
- && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+')
- strcat (intel_parser.disp, "+");
-
- if (intel_expr () && intel_match_token (']'))
- {
- /* Preserve brackets when the operand is an offset expression. */
- if (intel_parser.op_modifier == OFFSET_FLAT)
- strcat (intel_parser.disp, "]");
-
- return intel_e10_1 ();
- }
- else
+ if (!intel_bracket_expr ())
return 0;
}
- /* e10' Empty */
- else
- return 1;
+ return 1;
}
/* e11 ( expr )
@@ -5728,8 +6640,11 @@ intel_e10_1 ()
| BYTE
| WORD
| DWORD
+ | FWORD
| QWORD
- | XWORD
+ | TBYTE
+ | OWORD
+ | XMMWORD
| $
| .
| register
@@ -5738,9 +6653,10 @@ intel_e10_1 ()
static int
intel_e11 ()
{
- /* e11 ( expr ) */
- if (cur_token.code == '(')
+ switch (cur_token.code)
{
+ /* e11 ( expr ) */
+ case '(':
intel_match_token ('(');
strcat (intel_parser.disp, "(");
@@ -5749,292 +6665,284 @@ intel_e11 ()
strcat (intel_parser.disp, ")");
return 1;
}
- else
- return 0;
- }
-
- /* e11 [ expr ] */
- else if (cur_token.code == '[')
- {
- intel_match_token ('[');
-
- /* Mark as a memory operand only if it's not already known to be an
- offset expression. If it's an offset expression, we need to keep
- the brace in. */
- if (intel_parser.op_modifier != OFFSET_FLAT)
- intel_parser.is_mem = 1;
- else
- strcat (intel_parser.disp, "[");
-
- /* Operands for jump/call inside brackets denote absolute addresses. */
- if (current_templates->start->opcode_modifier & Jump
- || current_templates->start->opcode_modifier & JumpDword
- || current_templates->start->opcode_modifier & JumpByte
- || current_templates->start->opcode_modifier & JumpInterSegment)
- i.types[this_operand] |= JumpAbsolute;
-
- /* Add a '+' to the displacement string if necessary. */
- if (*intel_parser.disp != '\0'
- && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+')
- strcat (intel_parser.disp, "+");
-
- if (intel_expr () && intel_match_token (']'))
- {
- /* Preserve brackets when the operand is an offset expression. */
- if (intel_parser.op_modifier == OFFSET_FLAT)
- strcat (intel_parser.disp, "]");
-
- return 1;
- }
- else
- return 0;
- }
+ return 0;
- /* e11 BYTE
- | WORD
- | DWORD
- | QWORD
- | XWORD */
- else if (cur_token.code == T_BYTE
- || cur_token.code == T_WORD
- || cur_token.code == T_DWORD
- || cur_token.code == T_QWORD
- || cur_token.code == T_XWORD)
- {
- intel_match_token (cur_token.code);
+ /* e11 [ expr ] */
+ case '[':
+ return intel_bracket_expr ();
- return 1;
- }
-
- /* e11 $
- | . */
- else if (cur_token.code == '$' || cur_token.code == '.')
- {
+ /* e11 $
+ | . */
+ case '.':
strcat (intel_parser.disp, cur_token.str);
intel_match_token (cur_token.code);
/* Mark as a memory operand only if it's not already known to be an
offset expression. */
- if (intel_parser.op_modifier != OFFSET_FLAT)
+ if (!intel_parser.in_offset)
intel_parser.is_mem = 1;
return 1;
- }
- /* e11 register */
- else if (cur_token.code == T_REG)
- {
- const reg_entry *reg = intel_parser.reg = cur_token.reg;
+ /* e11 register */
+ case T_REG:
+ {
+ const reg_entry *reg = intel_parser.reg = cur_token.reg;
- intel_match_token (T_REG);
+ intel_match_token (T_REG);
- /* Check for segment change. */
- if (cur_token.code == ':')
- {
- if (reg->reg_type & (SReg2 | SReg3))
- {
- switch (reg->reg_num)
- {
- case 0:
- i.seg[i.mem_operands] = &es;
- break;
- case 1:
- i.seg[i.mem_operands] = &cs;
- break;
- case 2:
- i.seg[i.mem_operands] = &ss;
- break;
- case 3:
- i.seg[i.mem_operands] = &ds;
- break;
- case 4:
- i.seg[i.mem_operands] = &fs;
- break;
- case 5:
- i.seg[i.mem_operands] = &gs;
- break;
- }
- }
- else
- {
- as_bad (_("`%s' is not a valid segment register"), reg->reg_name);
- return 0;
- }
- }
+ /* Check for segment change. */
+ if (cur_token.code == ':')
+ {
+ if (!(reg->reg_type & (SReg2 | SReg3)))
+ {
+ as_bad (_("`%s' is not a valid segment register"), reg->reg_name);
+ return 0;
+ }
+ else if (i.seg[i.mem_operands])
+ as_warn (_("Extra segment override ignored"));
+ else
+ {
+ if (!intel_parser.in_offset)
+ intel_parser.is_mem = 1;
+ switch (reg->reg_num)
+ {
+ case 0:
+ i.seg[i.mem_operands] = &es;
+ break;
+ case 1:
+ i.seg[i.mem_operands] = &cs;
+ break;
+ case 2:
+ i.seg[i.mem_operands] = &ss;
+ break;
+ case 3:
+ i.seg[i.mem_operands] = &ds;
+ break;
+ case 4:
+ i.seg[i.mem_operands] = &fs;
+ break;
+ case 5:
+ i.seg[i.mem_operands] = &gs;
+ break;
+ }
+ }
+ }
- /* Not a segment register. Check for register scaling. */
- else if (cur_token.code == '*')
- {
- if (!intel_parser.is_mem)
- {
- as_bad (_("Register scaling only allowed in memory operands."));
- return 0;
- }
+ /* Not a segment register. Check for register scaling. */
+ else if (cur_token.code == '*')
+ {
+ if (!intel_parser.in_bracket)
+ {
+ as_bad (_("Register scaling only allowed in memory operands"));
+ return 0;
+ }
- /* What follows must be a valid scale. */
- if (intel_match_token ('*')
- && strchr ("01248", *cur_token.str))
- {
- i.index_reg = reg;
- i.types[this_operand] |= BaseIndex;
+ if (reg->reg_type & Reg16) /* Disallow things like [si*1]. */
+ reg = i386_regtab + REGNAM_AX + 4; /* sp is invalid as index */
+ else if (i.index_reg)
+ reg = i386_regtab + REGNAM_EAX + 4; /* esp is invalid as index */
- /* Set the scale after setting the register (otherwise,
- i386_scale will complain) */
- i386_scale (cur_token.str);
- intel_match_token (T_CONST);
- }
- else
- {
- as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"),
- cur_token.str);
- return 0;
- }
- }
+ /* What follows must be a valid scale. */
+ intel_match_token ('*');
+ i.index_reg = reg;
+ i.types[this_operand] |= BaseIndex;
- /* No scaling. If this is a memory operand, the register is either a
- base register (first occurrence) or an index register (second
- occurrence). */
- else if (intel_parser.is_mem && !(reg->reg_type & (SReg2 | SReg3)))
- {
- if (i.base_reg && i.index_reg)
- {
- as_bad (_("Too many register references in memory operand.\n"));
+ /* Set the scale after setting the register (otherwise,
+ i386_scale will complain) */
+ if (cur_token.code == '+' || cur_token.code == '-')
+ {
+ char *str, sign = cur_token.code;
+ intel_match_token (cur_token.code);
+ if (cur_token.code != T_CONST)
+ {
+ as_bad (_("Syntax error: Expecting a constant, got `%s'"),
+ cur_token.str);
+ return 0;
+ }
+ str = (char *) xmalloc (strlen (cur_token.str) + 2);
+ strcpy (str + 1, cur_token.str);
+ *str = sign;
+ if (!i386_scale (str))
+ return 0;
+ free (str);
+ }
+ else if (!i386_scale (cur_token.str))
return 0;
- }
-
- if (i.base_reg == NULL)
- i.base_reg = reg;
- else
- i.index_reg = reg;
+ intel_match_token (cur_token.code);
+ }
- i.types[this_operand] |= BaseIndex;
- }
+ /* No scaling. If this is a memory operand, the register is either a
+ base register (first occurrence) or an index register (second
+ occurrence). */
+ else if (intel_parser.in_bracket)
+ {
- /* Offset modifier. Add the register to the displacement string to be
- parsed as an immediate expression after we're done. */
- else if (intel_parser.op_modifier == OFFSET_FLAT)
- strcat (intel_parser.disp, reg->reg_name);
+ if (!i.base_reg)
+ i.base_reg = reg;
+ else if (!i.index_reg)
+ i.index_reg = reg;
+ else
+ {
+ as_bad (_("Too many register references in memory operand"));
+ return 0;
+ }
- /* It's neither base nor index nor offset. */
- else
- {
- i.types[this_operand] |= reg->reg_type & ~BaseIndex;
- i.op[this_operand].regs = reg;
- i.reg_operands++;
- }
+ i.types[this_operand] |= BaseIndex;
+ }
- /* Since registers are not part of the displacement string (except
- when we're parsing offset operands), we may need to remove any
- preceding '+' from the displacement string. */
- if (*intel_parser.disp != '\0'
- && intel_parser.op_modifier != OFFSET_FLAT)
- {
- char *s = intel_parser.disp;
- s += strlen (s) - 1;
- if (*s == '+')
- *s = '\0';
- }
+ /* It's neither base nor index. */
+ else if (!intel_parser.in_offset && !intel_parser.is_mem)
+ {
+ i.types[this_operand] |= reg->reg_type & ~BaseIndex;
+ i.op[this_operand].regs = reg;
+ i.reg_operands++;
+ }
+ else
+ {
+ as_bad (_("Invalid use of register"));
+ return 0;
+ }
- return 1;
- }
+ /* Since registers are not part of the displacement string (except
+ when we're parsing offset operands), we may need to remove any
+ preceding '+' from the displacement string. */
+ if (*intel_parser.disp != '\0'
+ && !intel_parser.in_offset)
+ {
+ char *s = intel_parser.disp;
+ s += strlen (s) - 1;
+ if (*s == '+')
+ *s = '\0';
+ }
- /* e11 id */
- else if (cur_token.code == T_ID)
- {
- /* Add the identifier to the displacement string. */
- strcat (intel_parser.disp, cur_token.str);
- intel_match_token (T_ID);
+ return 1;
+ }
- /* The identifier represents a memory reference only if it's not
- preceded by an offset modifier. */
- if (intel_parser.op_modifier != OFFSET_FLAT)
- intel_parser.is_mem = 1;
+ /* e11 BYTE
+ | WORD
+ | DWORD
+ | FWORD
+ | QWORD
+ | TBYTE
+ | OWORD
+ | XMMWORD */
+ case T_BYTE:
+ case T_WORD:
+ case T_DWORD:
+ case T_FWORD:
+ case T_QWORD:
+ case T_TBYTE:
+ case T_XMMWORD:
+ intel_match_token (cur_token.code);
- return 1;
- }
+ if (cur_token.code == T_PTR)
+ return 1;
- /* e11 constant */
- else if (cur_token.code == T_CONST
- || cur_token.code == '-'
- || cur_token.code == '+')
- {
- char *save_str;
+ /* It must have been an identifier. */
+ intel_putback_token ();
+ cur_token.code = T_ID;
+ /* FALLTHRU */
- /* Allow constants that start with `+' or `-'. */
- if (cur_token.code == '-' || cur_token.code == '+')
+ /* e11 id
+ | constant */
+ case T_ID:
+ if (!intel_parser.in_offset && intel_parser.is_mem <= 0)
{
- strcat (intel_parser.disp, cur_token.str);
- intel_match_token (cur_token.code);
- if (cur_token.code != T_CONST)
- {
- as_bad (_("Syntax error. Expecting a constant. Got `%s'.\n"),
- cur_token.str);
- return 0;
- }
- }
+ symbolS *symbolP;
- save_str = (char *) malloc (strlen (cur_token.str) + 1);
- if (save_str == NULL)
- abort ();
- strcpy (save_str, cur_token.str);
+ /* The identifier represents a memory reference only if it's not
+ preceded by an offset modifier and if it's not an equate. */
+ symbolP = symbol_find(cur_token.str);
+ if (!symbolP || S_GET_SEGMENT(symbolP) != absolute_section)
+ intel_parser.is_mem = 1;
+ }
+ /* FALLTHRU */
- /* Get the next token to check for register scaling. */
- intel_match_token (cur_token.code);
+ case T_CONST:
+ case '-':
+ case '+':
+ {
+ char *save_str, sign = 0;
- /* Check if this constant is a scaling factor for an index register. */
- if (cur_token.code == '*')
- {
- if (intel_match_token ('*') && cur_token.code == T_REG)
- {
- if (!intel_parser.is_mem)
- {
- as_bad (_("Register scaling only allowed in memory operands."));
- return 0;
- }
+ /* Allow constants that start with `+' or `-'. */
+ if (cur_token.code == '-' || cur_token.code == '+')
+ {
+ sign = cur_token.code;
+ intel_match_token (cur_token.code);
+ if (cur_token.code != T_CONST)
+ {
+ as_bad (_("Syntax error: Expecting a constant, got `%s'"),
+ cur_token.str);
+ return 0;
+ }
+ }
- /* The constant is followed by `* reg', so it must be
- a valid scale. */
- if (strchr ("01248", *save_str))
- {
- i.index_reg = cur_token.reg;
- i.types[this_operand] |= BaseIndex;
-
- /* Set the scale after setting the register (otherwise,
- i386_scale will complain) */
- i386_scale (save_str);
- intel_match_token (T_REG);
-
- /* Since registers are not part of the displacement
- string, we may need to remove any preceding '+' from
- the displacement string. */
- if (*intel_parser.disp != '\0')
- {
- char *s = intel_parser.disp;
- s += strlen (s) - 1;
- if (*s == '+')
- *s = '\0';
- }
+ save_str = (char *) xmalloc (strlen (cur_token.str) + 2);
+ strcpy (save_str + !!sign, cur_token.str);
+ if (sign)
+ *save_str = sign;
- free (save_str);
+ /* Get the next token to check for register scaling. */
+ intel_match_token (cur_token.code);
- return 1;
- }
- else
- return 0;
- }
+ /* 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)
+ {
+ const reg_entry *reg = cur_token.reg;
+
+ if (!intel_parser.in_bracket)
+ {
+ 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 */
+ else if (i.index_reg)
+ reg = i386_regtab + REGNAM_EAX + 4; /* esp is invalid as index */
+
+ /* The constant is followed by `* reg', so it must be
+ a valid scale. */
+ i.index_reg = reg;
+ i.types[this_operand] |= BaseIndex;
+
+ /* Set the scale after setting the register (otherwise,
+ i386_scale will complain) */
+ if (!i386_scale (save_str))
+ return 0;
+ intel_match_token (T_REG);
+
+ /* Since registers are not part of the displacement
+ string, we may need to remove any preceding '+' from
+ the displacement string. */
+ if (*intel_parser.disp != '\0')
+ {
+ char *s = intel_parser.disp;
+ s += strlen (s) - 1;
+ if (*s == '+')
+ *s = '\0';
+ }
+
+ free (save_str);
+
+ return 1;
+ }
- /* The constant was not used for register scaling. Since we have
- already consumed the token following `*' we now need to put it
- back in the stream. */
- else
+ /* The constant was not used for register scaling. Since we have
+ already consumed the token following `*' we now need to put it
+ back in the stream. */
intel_putback_token ();
- }
+ }
- /* Add the constant to the displacement string. */
- strcat (intel_parser.disp, save_str);
- free (save_str);
+ /* Add the constant to the displacement string. */
+ strcat (intel_parser.disp, save_str);
+ free (save_str);
- return 1;
+ return 1;
+ }
}
as_bad (_("Unrecognized token '%s'"), cur_token.str);
@@ -6054,7 +6962,7 @@ intel_match_token (code)
}
else
{
- as_bad (_("Unexpected token `%s'\n"), cur_token.str);
+ as_bad (_("Unexpected token `%s'"), cur_token.str);
return 0;
}
}
@@ -6091,9 +6999,7 @@ intel_get_token ()
/* The new token cannot be larger than the remainder of the operand
string. */
- new_token.str = (char *) malloc (strlen (intel_parser.op_string) + 1);
- if (new_token.str == NULL)
- abort ();
+ new_token.str = (char *) xmalloc (strlen (intel_parser.op_string) + 1);
new_token.str[0] = '\0';
if (strchr ("0123456789", *intel_parser.op_string))
@@ -6115,26 +7021,15 @@ intel_get_token ()
new_token.code = T_ID;
}
- else if (strchr ("+-/*:[]()", *intel_parser.op_string))
+ else if ((reg = parse_register (intel_parser.op_string, &end_op)) != NULL)
{
- new_token.code = *intel_parser.op_string;
- new_token.str[0] = *intel_parser.op_string;
- new_token.str[1] = '\0';
- }
+ size_t len = end_op - intel_parser.op_string;
- else if ((*intel_parser.op_string == REGISTER_PREFIX || allow_naked_reg)
- && ((reg = parse_register (intel_parser.op_string, &end_op)) != NULL))
- {
new_token.code = T_REG;
new_token.reg = reg;
- if (*intel_parser.op_string == REGISTER_PREFIX)
- {
- new_token.str[0] = REGISTER_PREFIX;
- new_token.str[1] = '\0';
- }
-
- strcat (new_token.str, reg->reg_name);
+ memcpy (new_token.str, intel_parser.op_string, len);
+ new_token.str[len] = '\0';
}
else if (is_identifier_char (*intel_parser.op_string))
@@ -6146,8 +7041,8 @@ intel_get_token ()
Otherwise, it's operator '.' followed by an expression. */
if ((*q == '.' || *q == '$') && !is_identifier_char (*(q + 1)))
{
- new_token.code = *q;
- new_token.str[0] = *q;
+ new_token.code = '.';
+ new_token.str[0] = '.';
new_token.str[1] = '\0';
}
else
@@ -6156,7 +7051,28 @@ intel_get_token ()
*p++ = *q++;
*p = '\0';
- if (strcasecmp (new_token.str, "BYTE") == 0)
+ if (strcasecmp (new_token.str, "NOT") == 0)
+ new_token.code = '~';
+
+ else if (strcasecmp (new_token.str, "MOD") == 0)
+ new_token.code = '%';
+
+ else if (strcasecmp (new_token.str, "AND") == 0)
+ new_token.code = '&';
+
+ else if (strcasecmp (new_token.str, "OR") == 0)
+ new_token.code = '|';
+
+ else if (strcasecmp (new_token.str, "XOR") == 0)
+ new_token.code = '^';
+
+ else if (strcasecmp (new_token.str, "SHL") == 0)
+ new_token.code = T_SHL;
+
+ else if (strcasecmp (new_token.str, "SHR") == 0)
+ new_token.code = T_SHR;
+
+ else if (strcasecmp (new_token.str, "BYTE") == 0)
new_token.code = T_BYTE;
else if (strcasecmp (new_token.str, "WORD") == 0)
@@ -6165,11 +7081,20 @@ intel_get_token ()
else if (strcasecmp (new_token.str, "DWORD") == 0)
new_token.code = T_DWORD;
+ else if (strcasecmp (new_token.str, "FWORD") == 0)
+ new_token.code = T_FWORD;
+
else if (strcasecmp (new_token.str, "QWORD") == 0)
new_token.code = T_QWORD;
- else if (strcasecmp (new_token.str, "XWORD") == 0)
- new_token.code = T_XWORD;
+ else if (strcasecmp (new_token.str, "TBYTE") == 0
+ /* XXX remove (gcc still uses it) */
+ || strcasecmp (new_token.str, "XWORD") == 0)
+ new_token.code = T_TBYTE;
+
+ else if (strcasecmp (new_token.str, "XMMWORD") == 0
+ || strcasecmp (new_token.str, "OWORD") == 0)
+ new_token.code = T_XMMWORD;
else if (strcasecmp (new_token.str, "PTR") == 0)
new_token.code = T_PTR;
@@ -6190,15 +7115,37 @@ intel_get_token ()
/* ??? This is not mentioned in the MASM grammar. */
else if (strcasecmp (new_token.str, "FLAT") == 0)
- new_token.code = T_OFFSET;
+ {
+ new_token.code = T_OFFSET;
+ if (*q == ':')
+ strcat (new_token.str, ":");
+ else
+ as_bad (_("`:' expected"));
+ }
else
new_token.code = T_ID;
}
}
+ else if (strchr ("+-/*%|&^:[]()~", *intel_parser.op_string))
+ {
+ new_token.code = *intel_parser.op_string;
+ new_token.str[0] = *intel_parser.op_string;
+ new_token.str[1] = '\0';
+ }
+
+ else if (strchr ("<>", *intel_parser.op_string)
+ && *intel_parser.op_string == *(intel_parser.op_string + 1))
+ {
+ new_token.code = *intel_parser.op_string == '<' ? T_SHL : T_SHR;
+ new_token.str[0] = *intel_parser.op_string;
+ new_token.str[1] = *intel_parser.op_string;
+ new_token.str[2] = '\0';
+ }
+
else
- as_bad (_("Unrecognized token `%s'\n"), intel_parser.op_string);
+ as_bad (_("Unrecognized token `%s'"), intel_parser.op_string);
intel_parser.op_string += strlen (new_token.str);
cur_token = new_token;
@@ -6209,8 +7156,11 @@ intel_get_token ()
static void
intel_putback_token ()
{
- intel_parser.op_string -= strlen (cur_token.str);
- free (cur_token.str);
+ if (cur_token.code != T_NIL)
+ {
+ intel_parser.op_string -= strlen (cur_token.str);
+ free (cur_token.str);
+ }
cur_token = prev_token;
/* Forget prev_token. */
@@ -6224,21 +7174,44 @@ tc_x86_regname_to_dw2regnum (const char *regname)
{
unsigned int regnum;
unsigned int regnames_count;
- char *regnames_32[] =
+ static const char *const regnames_32[] =
{
"eax", "ecx", "edx", "ebx",
"esp", "ebp", "esi", "edi",
- "eip"
+ "eip", "eflags", NULL,
+ "st0", "st1", "st2", "st3",
+ "st4", "st5", "st6", "st7",
+ NULL, NULL,
+ "xmm0", "xmm1", "xmm2", "xmm3",
+ "xmm4", "xmm5", "xmm6", "xmm7",
+ "mm0", "mm1", "mm2", "mm3",
+ "mm4", "mm5", "mm6", "mm7",
+ "fcw", "fsw", "mxcsr",
+ "es", "cs", "ss", "ds", "fs", "gs", NULL, NULL,
+ "tr", "ldtr"
};
- char *regnames_64[] =
+ static const char *const regnames_64[] =
{
- "rax", "rbx", "rcx", "rdx",
- "rdi", "rsi", "rbp", "rsp",
- "r8", "r9", "r10", "r11",
+ "rax", "rdx", "rcx", "rbx",
+ "rsi", "rdi", "rbp", "rsp",
+ "r8", "r9", "r10", "r11",
"r12", "r13", "r14", "r15",
- "rip"
+ "rip",
+ "xmm0", "xmm1", "xmm2", "xmm3",
+ "xmm4", "xmm5", "xmm6", "xmm7",
+ "xmm8", "xmm9", "xmm10", "xmm11",
+ "xmm12", "xmm13", "xmm14", "xmm15",
+ "st0", "st1", "st2", "st3",
+ "st4", "st5", "st6", "st7",
+ "mm0", "mm1", "mm2", "mm3",
+ "mm4", "mm5", "mm6", "mm7",
+ "rflags",
+ "es", "cs", "ss", "ds", "fs", "gs", NULL, NULL,
+ "fs.base", "gs.base", NULL, NULL,
+ "tr", "ldtr",
+ "mxcsr", "fcw", "fsw"
};
- char **regnames;
+ const char *const *regnames;
if (flag_code == CODE_64BIT)
{
@@ -6252,7 +7225,8 @@ tc_x86_regname_to_dw2regnum (const char *regname)
}
for (regnum = 0; regnum < regnames_count; regnum++)
- if (strcmp (regname, regnames[regnum]) == 0)
+ if (regnames[regnum] != NULL
+ && strcmp (regname, regnames[regnum]) == 0)
return regnum;
return -1;
@@ -6270,3 +7244,95 @@ tc_x86_frame_initial_instructions (void)
cfi_add_CFA_def_cfa (sp_regno, -x86_cie_data_alignment);
cfi_add_CFA_offset (x86_dwarf2_return_column, x86_cie_data_alignment);
}
+
+int
+i386_elf_section_type (const char *str, size_t len)
+{
+ if (flag_code == CODE_64BIT
+ && len == sizeof ("unwind") - 1
+ && strncmp (str, "unwind", 6) == 0)
+ return SHT_X86_64_UNWIND;
+
+ return -1;
+}
+
+#ifdef TE_PE
+void
+tc_pe_dwarf2_emit_offset (symbolS *symbol, unsigned int size)
+{
+ expressionS expr;
+
+ expr.X_op = O_secrel;
+ expr.X_add_symbol = symbol;
+ expr.X_add_number = 0;
+ emit_expr (&expr, size);
+}
+#endif
+
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+/* For ELF on x86-64, add support for SHF_X86_64_LARGE. */
+
+int
+x86_64_section_letter (int letter, char **ptr_msg)
+{
+ if (flag_code == CODE_64BIT)
+ {
+ if (letter == 'l')
+ 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");
+ return -1;
+}
+
+int
+x86_64_section_word (char *str, size_t len)
+{
+ if (len == 5 && flag_code == CODE_64BIT && strncmp (str, "large", 5) == 0)
+ return SHF_X86_64_LARGE;
+
+ return -1;
+}
+
+static void
+handle_large_common (int small ATTRIBUTE_UNUSED)
+{
+ if (flag_code != CODE_64BIT)
+ {
+ s_comm_internal (0, elf_common_parse);
+ as_warn (_(".largecomm supported only in 64bit mode, producing .comm"));
+ }
+ else
+ {
+ static segT lbss_section;
+ asection *saved_com_section_ptr = elf_com_section_ptr;
+ asection *saved_bss_section = bss_section;
+
+ if (lbss_section == NULL)
+ {
+ flagword applicable;
+ segT seg = now_seg;
+ subsegT subseg = now_subseg;
+
+ /* The .lbss section is for local .largecomm symbols. */
+ lbss_section = subseg_new (".lbss", 0);
+ applicable = bfd_applicable_section_flags (stdoutput);
+ bfd_set_section_flags (stdoutput, lbss_section,
+ applicable & SEC_ALLOC);
+ seg_info (lbss_section)->bss = 1;
+
+ subseg_set (seg, subseg);
+ }
+
+ elf_com_section_ptr = &_bfd_elf_large_com_section;
+ bss_section = lbss_section;
+
+ s_comm_internal (0, elf_common_parse);
+
+ elf_com_section_ptr = saved_com_section_ptr;
+ bss_section = saved_bss_section;
+ }
+}
+#endif /* OBJ_ELF || OBJ_MAYBE_ELF */
diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h
index 14b522b56495..98517041dadd 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
+ 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,29 +17,19 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef TC_I386
#define TC_I386 1
-#ifndef BFD_ASSEMBLER
-#error So, do you know what you are doing?
-#endif
-
-#ifdef ANSI_PROTOTYPES
struct fix;
-#endif
#define TARGET_BYTES_BIG_ENDIAN 0
-#ifdef TE_LYNX
-#define TARGET_FORMAT "coff-i386-lynx"
-#endif
-
#define TARGET_ARCH bfd_arch_i386
#define TARGET_MACH (i386_mach ())
-extern unsigned long i386_mach PARAMS ((void));
+extern unsigned long i386_mach (void);
#ifdef TE_FreeBSD
#define AOUT_TARGET_FORMAT "a.out-i386-freebsd"
@@ -65,7 +55,10 @@ extern unsigned long i386_mach PARAMS ((void));
#ifdef TE_FreeBSD
#define ELF_TARGET_FORMAT "elf32-i386-freebsd"
+#elif defined (TE_VXWORKS)
+#define ELF_TARGET_FORMAT "elf32-i386-vxworks"
#endif
+
#ifndef ELF_TARGET_FORMAT
#define ELF_TARGET_FORMAT "elf32-i386"
#endif
@@ -95,6 +88,9 @@ extern void i386_elf_emit_arch_note PARAMS ((void));
extern const char extra_symbol_chars[];
#define tc_symbol_chars 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) */
@@ -145,18 +141,6 @@ extern const char extra_symbol_chars[];
#define END_OF_INSN '\0'
-/* Intel Syntax */
-/* Values 0-4 map onto scale factor */
-#define BYTE_PTR 0
-#define WORD_PTR 1
-#define DWORD_PTR 2
-#define QWORD_PTR 3
-#define XWORD_PTR 4
-#define SHORT 5
-#define OFFSET_FLAT 6
-#define FLAT 7
-#define NONE_FOUND 8
-
typedef struct
{
/* instruction name sans width suffix ("mov" for movl insns) */
@@ -190,18 +174,26 @@ typedef struct
#define CpuAthlon 0x200 /* AMD Athlon or better required*/
#define CpuSledgehammer 0x400 /* Sledgehammer or better required */
#define CpuMMX 0x800 /* MMX support required */
-#define CpuSSE 0x1000 /* Streaming SIMD extensions required */
-#define CpuSSE2 0x2000 /* Streaming SIMD extensions 2 required */
-#define Cpu3dnow 0x4000 /* 3dnow! support required */
-#define CpuPNI 0x8000 /* Prescott New Instructions required */
-#define CpuPadLock 0x10000 /* VIA PadLock 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|CpuSSE|CpuSSE2|CpuPNI|Cpu3dnow|CpuK6|CpuAthlon|CpuPadLock)
+#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
@@ -399,14 +391,14 @@ arch_entry;
#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
#endif
-#ifndef LEX_AT
+#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));
+#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 *));
-#endif
#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
@@ -418,7 +410,7 @@ void i386_validate_fix PARAMS ((struct fix *));
#define tc_fix_adjustable(X) tc_i386_fix_adjustable(X)
extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
-/* Values passed to md_apply_fix3 don't include the symbol value. */
+/* Values passed to md_apply_fix don't include the symbol value. */
#define MD_APPLY_SYM_VALUE(FIX) 0
/* ELF wants external syms kept, as does PE COFF. */
@@ -446,7 +438,8 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
|| (FIX)->fx_r_type == BFD_RELOC_386_GOTPC \
|| TC_FORCE_RELOCATION (FIX))
-#define md_operand(x)
+extern int i386_parse_name (char *, expressionS *, char *);
+#define md_parse_name(s, e, m, c) i386_parse_name (s, e, c)
extern const struct relax_type md_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_relax_table
@@ -500,4 +493,22 @@ extern int tc_x86_regname_to_dw2regnum PARAMS ((const char *regname));
#define tc_cfi_frame_initial_instructions tc_x86_frame_initial_instructions
extern void tc_x86_frame_initial_instructions PARAMS ((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));
+
+/* 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));
+#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)
+
+#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 */
+
#endif /* TC_I386 */
diff --git a/contrib/binutils/gas/config/tc-ia64.c b/contrib/binutils/gas/config/tc-ia64.c
index f5526c980102..426b60f589aa 100644
--- a/contrib/binutils/gas/config/tc-ia64.c
+++ b/contrib/binutils/gas/config/tc-ia64.c
@@ -1,5 +1,6 @@
/* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GAS, the GNU Assembler.
@@ -16,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/*
TODO:
@@ -50,7 +51,14 @@
#include "elf/ia64.h"
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
#define NELEMS(a) ((int) (sizeof (a)/sizeof ((a)[0])))
+
+/* Some systems define MIN in, e.g., param.h. */
+#undef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define NUM_SLOTS 4
@@ -116,7 +124,6 @@ enum reg_symbol
IND_DTR,
IND_ITR,
IND_IBR,
- IND_MEM,
IND_MSR,
IND_PKR,
IND_PMC,
@@ -151,10 +158,15 @@ struct label_fix
{
struct label_fix *next;
struct symbol *sym;
+ bfd_boolean dw2_mark_labels;
};
+/* This is the endianness of the current section. */
extern int target_big_endian;
+/* This is the default endianness. */
+static int default_big_endian = TARGET_BYTES_BIG_ENDIAN;
+
void (*ia64_number_to_chars) PARAMS ((char *, valueT, int));
static void ia64_float_to_chars_bigendian
@@ -169,6 +181,10 @@ static struct hash_control *alias_name_hash;
static struct hash_control *secalias_hash;
static struct hash_control *secalias_name_hash;
+/* List of chars besides those in app.c:symbol_chars that can start an
+ operand. Used to prevent the scrubber eating vital white-space. */
+const char ia64_symbol_chars[] = "@?";
+
/* Characters which always start a comment. */
const char comment_chars[] = "";
@@ -177,7 +193,7 @@ const char line_comment_chars[] = "#";
/* Characters which may be used to separate multiple commands on a
single line. */
-const char line_separator_chars[] = ";";
+const char line_separator_chars[] = ";{}";
/* Characters which are used to indicate an exponent in a floating
point number. */
@@ -209,13 +225,26 @@ static struct
struct hash_control *const_hash; /* constant hash table */
struct hash_control *entry_hash; /* code entry hint hash table */
- symbolS *regsym[REG_NUM];
-
/* If X_op is != O_absent, the registername for the instruction's
qualifying predicate. If NULL, p0 is assumed for instructions
that are predicatable. */
expressionS qp;
+ /* Optimize for which CPU. */
+ enum
+ {
+ itanium1,
+ itanium2
+ } tune;
+
+ /* What to do when hint.b is used. */
+ enum
+ {
+ hint_b_error,
+ hint_b_warning,
+ hint_b_ok
+ } hint_b;
+
unsigned int
manual_bundling : 1,
debug_dv: 1,
@@ -226,6 +255,13 @@ static struct
auto_align : 1,
keep_pending_output : 1;
+ /* What to do when something is wrong with unwind directives. */
+ enum
+ {
+ unwind_check_warning,
+ unwind_check_error
+ } unwind_check;
+
/* Each bundle consists of up to three instructions. We keep
track of four most recent instructions so we can correctly set
the end_of_insn_group for the last instruction in a bundle. */
@@ -236,7 +272,8 @@ static struct
unsigned int
end_of_insn_group : 1,
manual_bundling_on : 1,
- manual_bundling_off : 1;
+ manual_bundling_off : 1,
+ loc_directive_seen : 1;
signed char user_template; /* user-selected template, if any */
unsigned char qp_regno; /* qualifying predicate */
/* This duplicates a good fraction of "struct fix" but we
@@ -286,31 +323,29 @@ static struct
the current DV-checking block. */
int maxpaths; /* size currently allocated for
entry_labels */
- /* Support for hardware errata workarounds. */
-
- /* Record data about the last three insn groups. */
- struct group
- {
- /* B-step workaround.
- For each predicate register, this is set if the corresponding insn
- group conditionally sets this register with one of the affected
- instructions. */
- int p_reg_set[64];
- /* B-step workaround.
- For each general register, this is set if the corresponding insn
- a) is conditional one one of the predicate registers for which
- P_REG_SET is 1 in the corresponding entry of the previous group,
- b) sets this general register with one of the affected
- instructions. */
- int g_reg_set_conditionally[128];
- } last_groups[3];
- int group_idx;
int pointer_size; /* size in bytes of a pointer */
int pointer_size_shift; /* shift size of a pointer for alignment */
+
+ symbolS *indregsym[IND_RR - IND_CPUID + 1];
}
md;
+/* These are not const, because they are modified to MMI for non-itanium1
+ targets below. */
+/* MFI bundle of nops. */
+static unsigned char le_nop[16] =
+{
+ 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00
+};
+/* MFI bundle of nops with stop-bit. */
+static unsigned char le_nop_stop[16] =
+{
+ 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00
+};
+
/* application registers: */
#define AR_K0 0
@@ -319,33 +354,52 @@ md;
#define AR_BSP 17
#define AR_BSPSTORE 18
#define AR_RNAT 19
+#define AR_FCR 21
+#define AR_EFLAG 24
+#define AR_CSD 25
+#define AR_SSD 26
+#define AR_CFLG 27
+#define AR_FSR 28
+#define AR_FIR 29
+#define AR_FDR 30
+#define AR_CCV 32
#define AR_UNAT 36
#define AR_FPSR 40
#define AR_ITC 44
#define AR_PFS 64
#define AR_LC 65
+#define AR_EC 66
static const struct
{
const char *name;
- int regnum;
+ unsigned int regnum;
}
ar[] =
{
- {"ar.k0", 0}, {"ar.k1", 1}, {"ar.k2", 2}, {"ar.k3", 3},
- {"ar.k4", 4}, {"ar.k5", 5}, {"ar.k6", 6}, {"ar.k7", 7},
- {"ar.rsc", 16}, {"ar.bsp", 17},
- {"ar.bspstore", 18}, {"ar.rnat", 19},
- {"ar.fcr", 21}, {"ar.eflag", 24},
- {"ar.csd", 25}, {"ar.ssd", 26},
- {"ar.cflg", 27}, {"ar.fsr", 28},
- {"ar.fir", 29}, {"ar.fdr", 30},
- {"ar.ccv", 32}, {"ar.unat", 36},
- {"ar.fpsr", 40}, {"ar.itc", 44},
- {"ar.pfs", 64}, {"ar.lc", 65},
- {"ar.ec", 66},
+ {"ar.k0", AR_K0}, {"ar.k1", AR_K0 + 1},
+ {"ar.k2", AR_K0 + 2}, {"ar.k3", AR_K0 + 3},
+ {"ar.k4", AR_K0 + 4}, {"ar.k5", AR_K0 + 5},
+ {"ar.k6", AR_K0 + 6}, {"ar.k7", AR_K7},
+ {"ar.rsc", AR_RSC}, {"ar.bsp", AR_BSP},
+ {"ar.bspstore", AR_BSPSTORE}, {"ar.rnat", AR_RNAT},
+ {"ar.fcr", AR_FCR}, {"ar.eflag", AR_EFLAG},
+ {"ar.csd", AR_CSD}, {"ar.ssd", AR_SSD},
+ {"ar.cflg", AR_CFLG}, {"ar.fsr", AR_FSR},
+ {"ar.fir", AR_FIR}, {"ar.fdr", AR_FDR},
+ {"ar.ccv", AR_CCV}, {"ar.unat", AR_UNAT},
+ {"ar.fpsr", AR_FPSR}, {"ar.itc", AR_ITC},
+ {"ar.pfs", AR_PFS}, {"ar.lc", AR_LC},
+ {"ar.ec", AR_EC},
};
+/* control registers: */
+
+#define CR_DCR 0
+#define CR_ITM 1
+#define CR_IVA 2
+#define CR_PTA 8
+#define CR_GPTA 9
#define CR_IPSR 16
#define CR_ISR 17
#define CR_IIP 19
@@ -355,49 +409,52 @@ ar[] =
#define CR_IFS 23
#define CR_IIM 24
#define CR_IHA 25
+#define CR_LID 64
#define CR_IVR 65
#define CR_TPR 66
#define CR_EOI 67
#define CR_IRR0 68
#define CR_IRR3 71
+#define CR_ITV 72
+#define CR_PMV 73
+#define CR_CMCV 74
#define CR_LRR0 80
#define CR_LRR1 81
-/* control registers: */
static const struct
{
const char *name;
- int regnum;
+ unsigned int regnum;
}
cr[] =
{
- {"cr.dcr", 0},
- {"cr.itm", 1},
- {"cr.iva", 2},
- {"cr.pta", 8},
- {"cr.gpta", 9},
- {"cr.ipsr", 16},
- {"cr.isr", 17},
- {"cr.iip", 19},
- {"cr.ifa", 20},
- {"cr.itir", 21},
- {"cr.iipa", 22},
- {"cr.ifs", 23},
- {"cr.iim", 24},
- {"cr.iha", 25},
- {"cr.lid", 64},
- {"cr.ivr", 65},
- {"cr.tpr", 66},
- {"cr.eoi", 67},
- {"cr.irr0", 68},
- {"cr.irr1", 69},
- {"cr.irr2", 70},
- {"cr.irr3", 71},
- {"cr.itv", 72},
- {"cr.pmv", 73},
- {"cr.cmcv", 74},
- {"cr.lrr0", 80},
- {"cr.lrr1", 81}
+ {"cr.dcr", CR_DCR},
+ {"cr.itm", CR_ITM},
+ {"cr.iva", CR_IVA},
+ {"cr.pta", CR_PTA},
+ {"cr.gpta", CR_GPTA},
+ {"cr.ipsr", CR_IPSR},
+ {"cr.isr", CR_ISR},
+ {"cr.iip", CR_IIP},
+ {"cr.ifa", CR_IFA},
+ {"cr.itir", CR_ITIR},
+ {"cr.iipa", CR_IIPA},
+ {"cr.ifs", CR_IFS},
+ {"cr.iim", CR_IIM},
+ {"cr.iha", CR_IHA},
+ {"cr.lid", CR_LID},
+ {"cr.ivr", CR_IVR},
+ {"cr.tpr", CR_TPR},
+ {"cr.eoi", CR_EOI},
+ {"cr.irr0", CR_IRR0},
+ {"cr.irr1", CR_IRR0 + 1},
+ {"cr.irr2", CR_IRR0 + 2},
+ {"cr.irr3", CR_IRR3},
+ {"cr.itv", CR_ITV},
+ {"cr.pmv", CR_PMV},
+ {"cr.cmcv", CR_CMCV},
+ {"cr.lrr0", CR_LRR0},
+ {"cr.lrr1", CR_LRR1}
};
#define PSR_MFL 4
@@ -455,7 +512,7 @@ const_bits[] =
static const struct
{
const char *name;
- int regnum;
+ unsigned int regnum;
}
indirect_reg[] =
{
@@ -508,10 +565,10 @@ pseudo_func[] =
{ "segrel", PSEUDO_FUNC_RELOC, { 0 } },
{ "tprel", PSEUDO_FUNC_RELOC, { 0 } },
{ "ltv", PSEUDO_FUNC_RELOC, { 0 } },
- { "", 0, { 0 } }, /* placeholder for FUNC_LT_FPTR_RELATIVE */
- { "", 0, { 0 } }, /* placeholder for FUNC_LT_DTP_MODULE */
- { "", 0, { 0 } }, /* placeholder for FUNC_LT_DTP_RELATIVE */
- { "", 0, { 0 } }, /* placeholder for FUNC_LT_TP_RELATIVE */
+ { NULL, 0, { 0 } }, /* placeholder for FUNC_LT_FPTR_RELATIVE */
+ { NULL, 0, { 0 } }, /* placeholder for FUNC_LT_DTP_MODULE */
+ { NULL, 0, { 0 } }, /* placeholder for FUNC_LT_DTP_RELATIVE */
+ { NULL, 0, { 0 } }, /* placeholder for FUNC_LT_TP_RELATIVE */
{ "iplt", PSEUDO_FUNC_RELOC, { 0 } },
/* mbtype4 constants: */
@@ -558,7 +615,7 @@ static const bfd_vma nop[IA64_NUM_UNITS] =
0x0008000000LL, /* M-unit nop */
0x4000000000LL, /* B-unit nop */
0x0008000000LL, /* F-unit nop */
- 0x0008000000LL, /* L-"unit" nop */
+ 0x0000000000LL, /* L-"unit" nop immediate */
0x0008000000LL, /* X-unit nop */
};
@@ -571,11 +628,6 @@ static char special_section_name[][20] =
{".init_array"}, {".fini_array"}
};
-static char *special_linkonce_name[] =
- {
- ".gnu.linkonce.ia64unw.", ".gnu.linkonce.ia64unwi."
- };
-
/* The best template for a particular sequence of up to three
instructions: */
#define N IA64_NUM_TYPES
@@ -634,7 +686,17 @@ static struct gr {
unsigned known:1;
int path;
valueT value;
-} gr_values[128] = {{ 1, 0, 0 }};
+} gr_values[128] = {
+ {
+ 1,
+#ifdef INT_MAX
+ INT_MAX,
+#else
+ (((1 << (8 * sizeof(gr_values->path) - 2)) - 1) << 1) + 1,
+#endif
+ 0
+ }
+};
/* Remember the alignment frag. */
static fragS *align_frag;
@@ -655,8 +717,6 @@ typedef struct unw_rec_list {
unwind_record r;
unsigned long slot_number;
fragS *slot_frag;
- unsigned long next_slot_number;
- fragS *next_slot_frag;
struct unw_rec_list *next;
} unw_rec_list;
@@ -671,6 +731,12 @@ typedef struct label_prologue_count
unsigned int prologue_count;
} label_prologue_count;
+typedef struct proc_pending
+{
+ symbolS *sym;
+ struct proc_pending *next;
+} proc_pending;
+
static struct
{
/* Maintain a list of unwind entries for the current function. */
@@ -682,8 +748,7 @@ static struct
unw_rec_list *current_entry;
/* These are used to create the unwind table entry for this function. */
- symbolS *proc_start;
- symbolS *proc_end;
+ proc_pending proc_pending;
symbolS *info; /* pointer to unwind info */
symbolS *personality_routine;
segT saved_text_seg;
@@ -691,17 +756,28 @@ static struct
unsigned int force_unwind_entry : 1; /* force generation of unwind entry? */
/* TRUE if processing unwind directives in a prologue region. */
- int prologue;
- int prologue_mask;
+ unsigned int prologue : 1;
+ unsigned int prologue_mask : 4;
+ unsigned int prologue_gr : 7;
+ unsigned int body : 1;
+ unsigned int insn : 1;
unsigned int prologue_count; /* number of .prologues seen so far */
/* Prologue counts at previous .label_state directives. */
struct label_prologue_count * saved_prologue_counts;
+
+ /* List of split up .save-s. */
+ unw_p_record *pending_saves;
} unwind;
+/* The input value is a negated offset from psp, and specifies an address
+ psp - offset. The encoded value is psp + 16 - (4 * offset). Thus we
+ must add 16 and divide by 4 to get the encoded value. */
+
+#define ENCODED_PSP_OFFSET(OFFSET) (((OFFSET) + 16) / 4)
+
typedef void (*vbyte_func) PARAMS ((int, char *, char *));
/* Forward declarations: */
-static int ar_is_in_integer_unit PARAMS ((int regnum));
static void set_section PARAMS ((char *name));
static unsigned int set_regstack PARAMS ((unsigned int, unsigned int,
unsigned int, unsigned int));
@@ -712,11 +788,9 @@ static void dot_proc PARAMS ((int));
static void dot_fframe PARAMS ((int));
static void dot_vframe PARAMS ((int));
static void dot_vframesp PARAMS ((int));
-static void dot_vframepsp PARAMS ((int));
static void dot_save PARAMS ((int));
static void dot_restore PARAMS ((int));
static void dot_restorereg PARAMS ((int));
-static void dot_restorereg_p PARAMS ((int));
static void dot_handlerdata PARAMS ((int));
static void dot_unwentry PARAMS ((int));
static void dot_altrp PARAMS ((int));
@@ -728,8 +802,6 @@ static void dot_savegf PARAMS ((int));
static void dot_spill PARAMS ((int));
static void dot_spillreg PARAMS ((int));
static void dot_spillmem PARAMS ((int));
-static void dot_spillreg_p PARAMS ((int));
-static void dot_spillmem_p PARAMS ((int));
static void dot_label_state PARAMS ((int));
static void dot_copy_state PARAMS ((int));
static void dot_unwabi PARAMS ((int));
@@ -744,7 +816,7 @@ static void dot_byteorder PARAMS ((int));
static void dot_psr PARAMS ((int));
static void dot_alias PARAMS ((int));
static void dot_ln PARAMS ((int));
-static char *parse_section_name PARAMS ((void));
+static void cross_section PARAMS ((int ref, void (*cons) PARAMS((int)), int ua));
static void dot_xdata PARAMS ((int));
static void stmt_float_cons PARAMS ((int));
static void stmt_cons_ua PARAMS ((int));
@@ -755,19 +827,19 @@ static void dot_xfloat_cons_ua PARAMS ((int));
static void print_prmask PARAMS ((valueT mask));
static void dot_pred_rel PARAMS ((int));
static void dot_reg_val PARAMS ((int));
+static void dot_serialize PARAMS ((int));
static void dot_dv_mode PARAMS ((int));
static void dot_entry PARAMS ((int));
static void dot_mem_offset PARAMS ((int));
-static void add_unwind_entry PARAMS((unw_rec_list *ptr));
-static symbolS *declare_register PARAMS ((const char *name, int regnum));
-static void declare_register_set PARAMS ((const char *, int, int));
+static void add_unwind_entry PARAMS((unw_rec_list *, int));
+static symbolS *declare_register PARAMS ((const char *name, unsigned int regnum));
+static void declare_register_set PARAMS ((const char *, unsigned int, unsigned int));
static unsigned int operand_width PARAMS ((enum ia64_opnd));
static enum operand_match_result operand_match PARAMS ((const struct ia64_opcode *idesc,
int index,
expressionS *e));
-static int parse_operand PARAMS ((expressionS *e));
+static int parse_operand PARAMS ((expressionS *, int));
static struct ia64_opcode * parse_operands PARAMS ((struct ia64_opcode *));
-static int errata_nop_necessary_p PARAMS ((struct slot *, enum ia64_unit));
static void build_insn PARAMS ((struct slot *, bfd_vma *));
static void emit_one_bundle PARAMS ((void));
static void fix_insn PARAMS ((fixS *, const struct ia64_operand *, valueT));
@@ -887,15 +959,11 @@ static unw_rec_list *output_unwabi PARAMS ((unsigned long, unsigned long));
static unw_rec_list *output_epilogue PARAMS ((unsigned long));
static unw_rec_list *output_label_state PARAMS ((unsigned long));
static unw_rec_list *output_copy_state PARAMS ((unsigned long));
-static unw_rec_list *output_spill_psprel PARAMS ((unsigned int, unsigned int, unsigned int));
-static unw_rec_list *output_spill_sprel PARAMS ((unsigned int, unsigned int, unsigned int));
-static unw_rec_list *output_spill_psprel_p PARAMS ((unsigned int, unsigned int, unsigned int,
+static unw_rec_list *output_spill_psprel PARAMS ((unsigned int, unsigned int, unsigned int,
unsigned int));
-static unw_rec_list *output_spill_sprel_p PARAMS ((unsigned int, unsigned int, unsigned int,
+static unw_rec_list *output_spill_sprel PARAMS ((unsigned int, unsigned int, unsigned int,
unsigned int));
static unw_rec_list *output_spill_reg PARAMS ((unsigned int, unsigned int, unsigned int,
- unsigned int));
-static unw_rec_list *output_spill_reg_p PARAMS ((unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int));
static void process_one_record PARAMS ((unw_rec_list *, vbyte_func));
static void process_unw_records PARAMS ((unw_rec_list *, vbyte_func));
@@ -906,51 +974,29 @@ static unsigned long slot_index PARAMS ((unsigned long, fragS *,
int));
static unw_rec_list *optimize_unw_records PARAMS ((unw_rec_list *));
static void fixup_unw_records PARAMS ((unw_rec_list *, int));
-static int convert_expr_to_ab_reg PARAMS ((expressionS *, unsigned int *, unsigned int *));
-static int convert_expr_to_xy_reg PARAMS ((expressionS *, unsigned int *, unsigned int *));
-static void generate_unwind_image PARAMS ((const char *));
+static int parse_predicate_and_operand PARAMS ((expressionS *, unsigned *, const char *));
+static void convert_expr_to_ab_reg PARAMS ((const expressionS *, unsigned int *, unsigned int *, const char *, int));
+static void convert_expr_to_xy_reg PARAMS ((const expressionS *, unsigned int *, unsigned int *, const char *, int));
static unsigned int get_saved_prologue_count PARAMS ((unsigned long));
static void save_prologue_count PARAMS ((unsigned long, unsigned int));
static void free_saved_prologue_counts PARAMS ((void));
-/* Build the unwind section name by appending the (possibly stripped)
- text section NAME to the unwind PREFIX. The resulting string
- pointer is assigned to RESULT. The string is allocated on the
- stack, so this must be a macro... */
-#define make_unw_section_name(special, text_name, result) \
- { \
- const char *_prefix = special_section_name[special]; \
- const char *_suffix = text_name; \
- size_t _prefix_len, _suffix_len; \
- char *_result; \
- if (strncmp (text_name, ".gnu.linkonce.t.", \
- sizeof (".gnu.linkonce.t.") - 1) == 0) \
- { \
- _prefix = special_linkonce_name[special - SPECIAL_SECTION_UNWIND]; \
- _suffix += sizeof (".gnu.linkonce.t.") - 1; \
- } \
- _prefix_len = strlen (_prefix), _suffix_len = strlen (_suffix); \
- _result = alloca (_prefix_len + _suffix_len + 1); \
- memcpy (_result, _prefix, _prefix_len); \
- memcpy (_result + _prefix_len, _suffix, _suffix_len); \
- _result[_prefix_len + _suffix_len] = '\0'; \
- result = _result; \
- } \
-while (0)
-
-/* Determine if application register REGNUM resides in the integer
+/* Determine if application register REGNUM resides only in the integer
unit (as opposed to the memory unit). */
static int
-ar_is_in_integer_unit (reg)
- int reg;
+ar_is_only_in_integer_unit (int reg)
{
reg -= REG_AR;
+ return reg >= 64 && reg <= 111;
+}
- return (reg == 64 /* pfs */
- || reg == 65 /* lc */
- || reg == 66 /* ec */
- /* ??? ias accepts and puts these in the integer unit. */
- || (reg >= 112 && reg <= 127));
+/* Determine if application register REGNUM resides only in the memory
+ unit (as opposed to the integer unit). */
+static int
+ar_is_only_in_memory_unit (int reg)
+{
+ reg -= REG_AR;
+ return reg >= 0 && reg <= 47;
}
/* Switch to section NAME and create section if necessary. It's
@@ -1019,12 +1065,6 @@ ia64_elf_section_type (str, len)
if (STREQ ("unwind"))
return SHT_IA_64_UNWIND;
- if (STREQ ("init_array"))
- return SHT_INIT_ARRAY;
-
- if (STREQ ("fini_array"))
- return SHT_FINI_ARRAY;
-
return -1;
#undef STREQ
}
@@ -1065,6 +1105,7 @@ ia64_flush_insns ()
segT saved_seg;
subsegT saved_subseg;
unw_rec_list *ptr;
+ bfd_boolean mark;
if (!md.last_text_seg)
return;
@@ -1078,18 +1119,23 @@ ia64_flush_insns ()
emit_one_bundle (); /* force out queued instructions */
/* In case there are labels following the last instruction, resolve
- those now: */
+ those now. */
+ mark = FALSE;
for (lfix = CURR_SLOT.label_fixups; lfix; lfix = lfix->next)
{
- S_SET_VALUE (lfix->sym, frag_now_fix ());
- symbol_set_frag (lfix->sym, frag_now);
+ symbol_set_value_now (lfix->sym);
+ mark |= lfix->dw2_mark_labels;
}
- CURR_SLOT.label_fixups = 0;
- for (lfix = CURR_SLOT.tag_fixups; lfix; lfix = lfix->next)
+ if (mark)
{
- S_SET_VALUE (lfix->sym, frag_now_fix ());
- symbol_set_frag (lfix->sym, frag_now);
+ dwarf2_where (&CURR_SLOT.debug_line);
+ CURR_SLOT.debug_line.flags |= DWARF2_FLAG_BASIC_BLOCK;
+ dwarf2_gen_line_info (frag_now_fix (), &CURR_SLOT.debug_line);
}
+ CURR_SLOT.label_fixups = 0;
+
+ for (lfix = CURR_SLOT.tag_fixups; lfix; lfix = lfix->next)
+ symbol_set_value_now (lfix->sym);
CURR_SLOT.tag_fixups = 0;
/* In case there are unwind directives following the last instruction,
@@ -1160,7 +1206,7 @@ ia64_cons_align (nbytes)
}
/* Output COUNT bytes to a memory location. */
-static unsigned char *vbyte_mem_ptr = NULL;
+static char *vbyte_mem_ptr = NULL;
void
output_vbyte_mem (count, ptr, comment)
@@ -1337,7 +1383,7 @@ output_P4_format (f, imask, imask_size)
unsigned long imask_size;
{
imask[0] = UNW_P4;
- (*f) (imask_size, imask, NULL);
+ (*f) (imask_size, (char *) imask, NULL);
}
static void
@@ -1723,6 +1769,55 @@ output_X4_format (f, qp, ab, reg, x, y, treg, t)
(*f) (count, bytes, NULL);
}
+/* This function checks whether there are any outstanding .save-s and
+ discards them if so. */
+
+static void
+check_pending_save (void)
+{
+ if (unwind.pending_saves)
+ {
+ unw_rec_list *cur, *prev;
+
+ as_warn ("Previous .save incomplete");
+ for (cur = unwind.list, prev = NULL; cur; )
+ if (&cur->r.record.p == unwind.pending_saves)
+ {
+ if (prev)
+ prev->next = cur->next;
+ else
+ unwind.list = cur->next;
+ if (cur == unwind.tail)
+ unwind.tail = prev;
+ if (cur == unwind.current_entry)
+ unwind.current_entry = cur->next;
+ /* Don't free the first discarded record, it's being used as
+ terminator for (currently) br_gr and gr_gr processing, and
+ also prevents leaving a dangling pointer to it in its
+ predecessor. */
+ cur->r.record.p.grmask = 0;
+ cur->r.record.p.brmask = 0;
+ cur->r.record.p.frmask = 0;
+ prev = cur->r.record.p.next;
+ cur->r.record.p.next = NULL;
+ cur = prev;
+ break;
+ }
+ else
+ {
+ prev = cur;
+ cur = cur->next;
+ }
+ while (cur)
+ {
+ prev = cur;
+ cur = cur->r.record.p.next;
+ free (prev);
+ }
+ unwind.pending_saves = NULL;
+ }
+}
+
/* This function allocates a record list structure, and initializes fields. */
static unw_rec_list *
@@ -1730,11 +1825,9 @@ alloc_record (unw_record_type t)
{
unw_rec_list *ptr;
ptr = xmalloc (sizeof (*ptr));
- ptr->next = NULL;
+ memset (ptr, 0, sizeof (*ptr));
ptr->slot_number = SLOT_NUM_NOT_SET;
ptr->r.type = t;
- ptr->next_slot_number = 0;
- ptr->next_slot_frag = 0;
return ptr;
}
@@ -1796,7 +1889,7 @@ output_psp_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (psp_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -1805,7 +1898,7 @@ output_psp_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (psp_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -1821,7 +1914,7 @@ output_rp_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (rp_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -1830,7 +1923,7 @@ output_rp_br (br)
unsigned int br;
{
unw_rec_list *ptr = alloc_record (rp_br);
- ptr->r.record.p.br = br;
+ ptr->r.record.p.r.br = br;
return ptr;
}
@@ -1839,7 +1932,7 @@ output_rp_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (rp_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -1848,7 +1941,7 @@ output_rp_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (rp_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -1864,7 +1957,7 @@ output_pfs_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (pfs_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -1873,7 +1966,7 @@ output_pfs_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (pfs_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -1882,7 +1975,7 @@ output_pfs_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (pfs_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -1898,7 +1991,7 @@ output_preds_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (preds_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -1907,7 +2000,7 @@ output_preds_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (preds_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -1916,7 +2009,7 @@ output_preds_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (preds_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -1925,8 +2018,24 @@ output_fr_mem (mask)
unsigned int mask;
{
unw_rec_list *ptr = alloc_record (fr_mem);
- ptr->r.record.p.rmask = mask;
- return ptr;
+ unw_rec_list *cur = ptr;
+
+ ptr->r.record.p.frmask = mask;
+ unwind.pending_saves = &ptr->r.record.p;
+ for (;;)
+ {
+ unw_rec_list *prev = cur;
+
+ /* Clear least significant set bit. */
+ mask &= ~(mask & (~mask + 1));
+ if (!mask)
+ return ptr;
+ cur = alloc_record (fr_mem);
+ cur->r.record.p.frmask = mask;
+ /* Retain only least significant bit. */
+ prev->r.record.p.frmask ^= mask;
+ prev->r.record.p.next = cur;
+ }
}
static unw_rec_list *
@@ -1935,9 +2044,39 @@ output_frgr_mem (gr_mask, fr_mask)
unsigned int fr_mask;
{
unw_rec_list *ptr = alloc_record (frgr_mem);
- ptr->r.record.p.grmask = gr_mask;
- ptr->r.record.p.frmask = fr_mask;
- return ptr;
+ unw_rec_list *cur = ptr;
+
+ unwind.pending_saves = &cur->r.record.p;
+ cur->r.record.p.frmask = fr_mask;
+ while (fr_mask)
+ {
+ unw_rec_list *prev = cur;
+
+ /* Clear least significant set bit. */
+ fr_mask &= ~(fr_mask & (~fr_mask + 1));
+ if (!gr_mask && !fr_mask)
+ return ptr;
+ cur = alloc_record (frgr_mem);
+ cur->r.record.p.frmask = fr_mask;
+ /* Retain only least significant bit. */
+ prev->r.record.p.frmask ^= fr_mask;
+ prev->r.record.p.next = cur;
+ }
+ cur->r.record.p.grmask = gr_mask;
+ for (;;)
+ {
+ unw_rec_list *prev = cur;
+
+ /* Clear least significant set bit. */
+ gr_mask &= ~(gr_mask & (~gr_mask + 1));
+ if (!gr_mask)
+ return ptr;
+ cur = alloc_record (frgr_mem);
+ cur->r.record.p.grmask = gr_mask;
+ /* Retain only least significant bit. */
+ prev->r.record.p.grmask ^= gr_mask;
+ prev->r.record.p.next = cur;
+ }
}
static unw_rec_list *
@@ -1946,9 +2085,27 @@ output_gr_gr (mask, reg)
unsigned int reg;
{
unw_rec_list *ptr = alloc_record (gr_gr);
+ unw_rec_list *cur = ptr;
+
ptr->r.record.p.grmask = mask;
- ptr->r.record.p.gr = reg;
- return ptr;
+ ptr->r.record.p.r.gr = reg;
+ unwind.pending_saves = &ptr->r.record.p;
+ for (;;)
+ {
+ unw_rec_list *prev = cur;
+
+ /* Clear least significant set bit. */
+ mask &= ~(mask & (~mask + 1));
+ if (!mask)
+ return ptr;
+ cur = alloc_record (gr_gr);
+ cur->r.record.p.grmask = mask;
+ /* Indicate this record shouldn't be output. */
+ cur->r.record.p.r.gr = REG_NUM;
+ /* Retain only least significant bit. */
+ prev->r.record.p.grmask ^= mask;
+ prev->r.record.p.next = cur;
+ }
}
static unw_rec_list *
@@ -1956,27 +2113,77 @@ output_gr_mem (mask)
unsigned int mask;
{
unw_rec_list *ptr = alloc_record (gr_mem);
- ptr->r.record.p.rmask = mask;
- return ptr;
+ unw_rec_list *cur = ptr;
+
+ ptr->r.record.p.grmask = mask;
+ unwind.pending_saves = &ptr->r.record.p;
+ for (;;)
+ {
+ unw_rec_list *prev = cur;
+
+ /* Clear least significant set bit. */
+ mask &= ~(mask & (~mask + 1));
+ if (!mask)
+ return ptr;
+ cur = alloc_record (gr_mem);
+ cur->r.record.p.grmask = mask;
+ /* Retain only least significant bit. */
+ prev->r.record.p.grmask ^= mask;
+ prev->r.record.p.next = cur;
+ }
}
static unw_rec_list *
output_br_mem (unsigned int mask)
{
unw_rec_list *ptr = alloc_record (br_mem);
+ unw_rec_list *cur = ptr;
+
ptr->r.record.p.brmask = mask;
- return ptr;
+ unwind.pending_saves = &ptr->r.record.p;
+ for (;;)
+ {
+ unw_rec_list *prev = cur;
+
+ /* Clear least significant set bit. */
+ mask &= ~(mask & (~mask + 1));
+ if (!mask)
+ return ptr;
+ cur = alloc_record (br_mem);
+ cur->r.record.p.brmask = mask;
+ /* Retain only least significant bit. */
+ prev->r.record.p.brmask ^= mask;
+ prev->r.record.p.next = cur;
+ }
}
static unw_rec_list *
-output_br_gr (save_mask, reg)
- unsigned int save_mask;
+output_br_gr (mask, reg)
+ unsigned int mask;
unsigned int reg;
{
unw_rec_list *ptr = alloc_record (br_gr);
- ptr->r.record.p.brmask = save_mask;
- ptr->r.record.p.gr = reg;
- return ptr;
+ unw_rec_list *cur = ptr;
+
+ ptr->r.record.p.brmask = mask;
+ ptr->r.record.p.r.gr = reg;
+ unwind.pending_saves = &ptr->r.record.p;
+ for (;;)
+ {
+ unw_rec_list *prev = cur;
+
+ /* Clear least significant set bit. */
+ mask &= ~(mask & (~mask + 1));
+ if (!mask)
+ return ptr;
+ cur = alloc_record (br_gr);
+ cur->r.record.p.brmask = mask;
+ /* Indicate this record shouldn't be output. */
+ cur->r.record.p.r.gr = REG_NUM;
+ /* Retain only least significant bit. */
+ prev->r.record.p.brmask ^= mask;
+ prev->r.record.p.next = cur;
+ }
}
static unw_rec_list *
@@ -1984,7 +2191,7 @@ output_spill_base (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (spill_base);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -2000,7 +2207,7 @@ output_unat_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (unat_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -2009,7 +2216,7 @@ output_unat_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (unat_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -2018,7 +2225,7 @@ output_unat_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (unat_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -2034,7 +2241,7 @@ output_lc_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (lc_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -2043,7 +2250,7 @@ output_lc_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (lc_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -2052,7 +2259,7 @@ output_lc_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (lc_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -2068,7 +2275,7 @@ output_fpsr_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (fpsr_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -2077,7 +2284,7 @@ output_fpsr_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (fpsr_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -2086,7 +2293,7 @@ output_fpsr_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (fpsr_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -2109,7 +2316,7 @@ output_priunat_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (priunat_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -2118,7 +2325,7 @@ output_priunat_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (priunat_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -2127,7 +2334,7 @@ output_priunat_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (priunat_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -2143,7 +2350,7 @@ output_bsp_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (bsp_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -2152,7 +2359,7 @@ output_bsp_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (bsp_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -2161,7 +2368,7 @@ output_bsp_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (bsp_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -2177,7 +2384,7 @@ output_bspstore_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (bspstore_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -2186,7 +2393,7 @@ output_bspstore_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (bspstore_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -2195,7 +2402,7 @@ output_bspstore_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (bspstore_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -2211,7 +2418,7 @@ output_rnat_gr (gr)
unsigned int gr;
{
unw_rec_list *ptr = alloc_record (rnat_gr);
- ptr->r.record.p.gr = gr;
+ ptr->r.record.p.r.gr = gr;
return ptr;
}
@@ -2220,7 +2427,7 @@ output_rnat_psprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (rnat_psprel);
- ptr->r.record.p.pspoff = offset / 4;
+ ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
return ptr;
}
@@ -2229,7 +2436,7 @@ output_rnat_sprel (offset)
unsigned int offset;
{
unw_rec_list *ptr = alloc_record (rnat_sprel);
- ptr->r.record.p.spoff = offset / 4;
+ ptr->r.record.p.off.sp = offset / 4;
return ptr;
}
@@ -2269,88 +2476,47 @@ output_copy_state (unsigned long label)
}
static unw_rec_list *
-output_spill_psprel (ab, reg, offset)
- unsigned int ab;
- unsigned int reg;
- unsigned int offset;
-{
- unw_rec_list *ptr = alloc_record (spill_psprel);
- ptr->r.record.x.ab = ab;
- ptr->r.record.x.reg = reg;
- ptr->r.record.x.pspoff = offset / 4;
- return ptr;
-}
-
-static unw_rec_list *
-output_spill_sprel (ab, reg, offset)
- unsigned int ab;
- unsigned int reg;
- unsigned int offset;
-{
- unw_rec_list *ptr = alloc_record (spill_sprel);
- ptr->r.record.x.ab = ab;
- ptr->r.record.x.reg = reg;
- ptr->r.record.x.spoff = offset / 4;
- return ptr;
-}
-
-static unw_rec_list *
-output_spill_psprel_p (ab, reg, offset, predicate)
+output_spill_psprel (ab, reg, offset, predicate)
unsigned int ab;
unsigned int reg;
unsigned int offset;
unsigned int predicate;
{
- unw_rec_list *ptr = alloc_record (spill_psprel_p);
+ unw_rec_list *ptr = alloc_record (predicate ? spill_psprel_p : spill_psprel);
ptr->r.record.x.ab = ab;
ptr->r.record.x.reg = reg;
- ptr->r.record.x.pspoff = offset / 4;
+ ptr->r.record.x.where.pspoff = ENCODED_PSP_OFFSET (offset);
ptr->r.record.x.qp = predicate;
return ptr;
}
static unw_rec_list *
-output_spill_sprel_p (ab, reg, offset, predicate)
+output_spill_sprel (ab, reg, offset, predicate)
unsigned int ab;
unsigned int reg;
unsigned int offset;
unsigned int predicate;
{
- unw_rec_list *ptr = alloc_record (spill_sprel_p);
+ unw_rec_list *ptr = alloc_record (predicate ? spill_sprel_p : spill_sprel);
ptr->r.record.x.ab = ab;
ptr->r.record.x.reg = reg;
- ptr->r.record.x.spoff = offset / 4;
+ ptr->r.record.x.where.spoff = offset / 4;
ptr->r.record.x.qp = predicate;
return ptr;
}
static unw_rec_list *
-output_spill_reg (ab, reg, targ_reg, xy)
- unsigned int ab;
- unsigned int reg;
- unsigned int targ_reg;
- unsigned int xy;
-{
- unw_rec_list *ptr = alloc_record (spill_reg);
- ptr->r.record.x.ab = ab;
- ptr->r.record.x.reg = reg;
- ptr->r.record.x.treg = targ_reg;
- ptr->r.record.x.xy = xy;
- return ptr;
-}
-
-static unw_rec_list *
-output_spill_reg_p (ab, reg, targ_reg, xy, predicate)
+output_spill_reg (ab, reg, targ_reg, xy, predicate)
unsigned int ab;
unsigned int reg;
unsigned int targ_reg;
unsigned int xy;
unsigned int predicate;
{
- unw_rec_list *ptr = alloc_record (spill_reg_p);
+ unw_rec_list *ptr = alloc_record (predicate ? spill_reg_p : spill_reg);
ptr->r.record.x.ab = ab;
ptr->r.record.x.reg = reg;
- ptr->r.record.x.treg = targ_reg;
+ ptr->r.record.x.where.reg = targ_reg;
ptr->r.record.x.xy = xy;
ptr->r.record.x.qp = predicate;
return ptr;
@@ -2364,7 +2530,7 @@ process_one_record (ptr, f)
unw_rec_list *ptr;
vbyte_func f;
{
- unsigned long fr_mask, gr_mask;
+ unsigned int fr_mask, gr_mask;
switch (ptr->r.type)
{
@@ -2430,13 +2596,13 @@ process_one_record (ptr, f)
case bsp_gr:
case bspstore_gr:
case rnat_gr:
- output_P3_format (f, ptr->r.type, ptr->r.record.p.gr);
+ output_P3_format (f, ptr->r.type, ptr->r.record.p.r.gr);
break;
case rp_br:
- output_P3_format (f, rp_br, ptr->r.record.p.br);
+ output_P3_format (f, rp_br, ptr->r.record.p.r.br);
break;
case psp_sprel:
- output_P7_format (f, psp_sprel, ptr->r.record.p.spoff, 0);
+ output_P7_format (f, psp_sprel, ptr->r.record.p.off.sp, 0);
break;
case rp_when:
case pfs_when:
@@ -2453,7 +2619,7 @@ process_one_record (ptr, f)
case lc_psprel:
case fpsr_psprel:
case spill_base:
- output_P7_format (f, ptr->r.type, ptr->r.record.p.pspoff, 0);
+ output_P7_format (f, ptr->r.type, ptr->r.record.p.off.psp, 0);
break;
case rp_sprel:
case pfs_sprel:
@@ -2465,13 +2631,29 @@ process_one_record (ptr, f)
case bsp_sprel:
case bspstore_sprel:
case rnat_sprel:
- output_P8_format (f, ptr->r.type, ptr->r.record.p.spoff);
+ output_P8_format (f, ptr->r.type, ptr->r.record.p.off.sp);
break;
case gr_gr:
- output_P9_format (f, ptr->r.record.p.grmask, ptr->r.record.p.gr);
+ if (ptr->r.record.p.r.gr < REG_NUM)
+ {
+ const unw_rec_list *cur = ptr;
+
+ gr_mask = cur->r.record.p.grmask;
+ while ((cur = cur->r.record.p.next) != NULL)
+ gr_mask |= cur->r.record.p.grmask;
+ output_P9_format (f, gr_mask, ptr->r.record.p.r.gr);
+ }
break;
case br_gr:
- output_P2_format (f, ptr->r.record.p.brmask, ptr->r.record.p.gr);
+ if (ptr->r.record.p.r.gr < REG_NUM)
+ {
+ const unw_rec_list *cur = ptr;
+
+ gr_mask = cur->r.record.p.brmask;
+ while ((cur = cur->r.record.p.next) != NULL)
+ gr_mask |= cur->r.record.p.brmask;
+ output_P2_format (f, gr_mask, ptr->r.record.p.r.gr);
+ }
break;
case spill_mask:
as_bad ("spill_mask record unimplemented.");
@@ -2487,7 +2669,7 @@ process_one_record (ptr, f)
case bsp_psprel:
case bspstore_psprel:
case rnat_psprel:
- output_P8_format (f, ptr->r.type, ptr->r.record.p.pspoff);
+ output_P8_format (f, ptr->r.type, ptr->r.record.p.off.psp);
break;
case unwabi:
output_P10_format (f, ptr->r.record.p.abi, ptr->r.record.p.context);
@@ -2502,32 +2684,32 @@ process_one_record (ptr, f)
case spill_psprel:
output_X1_format (f, ptr->r.type, ptr->r.record.x.ab,
ptr->r.record.x.reg, ptr->r.record.x.t,
- ptr->r.record.x.pspoff);
+ ptr->r.record.x.where.pspoff);
break;
case spill_sprel:
output_X1_format (f, ptr->r.type, ptr->r.record.x.ab,
ptr->r.record.x.reg, ptr->r.record.x.t,
- ptr->r.record.x.spoff);
+ ptr->r.record.x.where.spoff);
break;
case spill_reg:
output_X2_format (f, ptr->r.record.x.ab, ptr->r.record.x.reg,
ptr->r.record.x.xy >> 1, ptr->r.record.x.xy,
- ptr->r.record.x.treg, ptr->r.record.x.t);
+ ptr->r.record.x.where.reg, ptr->r.record.x.t);
break;
case spill_psprel_p:
output_X3_format (f, ptr->r.type, ptr->r.record.x.qp,
ptr->r.record.x.ab, ptr->r.record.x.reg,
- ptr->r.record.x.t, ptr->r.record.x.pspoff);
+ ptr->r.record.x.t, ptr->r.record.x.where.pspoff);
break;
case spill_sprel_p:
output_X3_format (f, ptr->r.type, ptr->r.record.x.qp,
ptr->r.record.x.ab, ptr->r.record.x.reg,
- ptr->r.record.x.t, ptr->r.record.x.spoff);
+ ptr->r.record.x.t, ptr->r.record.x.where.spoff);
break;
case spill_reg_p:
output_X4_format (f, ptr->r.record.x.qp, ptr->r.record.x.ab,
ptr->r.record.x.reg, ptr->r.record.x.xy >> 1,
- ptr->r.record.x.xy, ptr->r.record.x.treg,
+ ptr->r.record.x.xy, ptr->r.record.x.where.reg,
ptr->r.record.x.t);
break;
default:
@@ -2558,6 +2740,28 @@ calc_record_size (list)
return vbyte_count;
}
+/* Return the number of bits set in the input value.
+ Perhaps this has a better place... */
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# define popcount __builtin_popcount
+#else
+static int
+popcount (unsigned x)
+{
+ static const unsigned char popcnt[16] =
+ {
+ 0, 1, 1, 2,
+ 1, 2, 2, 3,
+ 1, 2, 2, 3,
+ 2, 3, 3, 4
+ };
+
+ if (x < NELEMS (popcnt))
+ return popcnt[x];
+ return popcnt[x % NELEMS (popcnt)] + popcount (x / NELEMS (popcnt));
+}
+#endif
+
/* Update IMASK bitmask to reflect the fact that one or more registers
of type TYPE are saved starting at instruction with index T. If N
bits are set in REGMASK, it is assumed that instructions T through
@@ -2689,6 +2893,13 @@ slot_index (slot_addr, slot_frag, first_addr, first_frag, before_relax)
/* Move to the beginning of the next frag. */
first_frag = first_frag->fr_next;
first_addr = (unsigned long) &first_frag->fr_literal;
+
+ /* This can happen if there is section switching in the middle of a
+ function, causing the frag chain for the function to be broken.
+ It is too difficult to recover safely from this problem, so we just
+ exit with an error. */
+ if (first_frag == NULL)
+ as_fatal ("Section switching in code is not supported.");
}
/* Add in the used part of the last frag. */
@@ -2770,7 +2981,13 @@ fixup_unw_records (list, before_relax)
break;
}
case epilogue:
- ptr->r.record.b.t = rlen - 1 - t;
+ if (t < rlen)
+ ptr->r.record.b.t = rlen - 1 - t;
+ else
+ /* This happens when a memory-stack-less procedure uses a
+ ".restore sp" directive at the end of a region to pop
+ the frame state. */
+ ptr->r.record.b.t = 0;
break;
case mem_stack_f:
@@ -2801,7 +3018,7 @@ fixup_unw_records (list, before_relax)
case frgr_mem:
if (!region)
{
- as_bad ("frgr_mem record before region record!\n");
+ as_bad ("frgr_mem record before region record!");
return;
}
region->r.record.r.mask.fr_mem |= ptr->r.record.p.frmask;
@@ -2812,25 +3029,25 @@ fixup_unw_records (list, before_relax)
case fr_mem:
if (!region)
{
- as_bad ("fr_mem record before region record!\n");
+ as_bad ("fr_mem record before region record!");
return;
}
- region->r.record.r.mask.fr_mem |= ptr->r.record.p.rmask;
- set_imask (region, ptr->r.record.p.rmask, t, 1);
+ region->r.record.r.mask.fr_mem |= ptr->r.record.p.frmask;
+ set_imask (region, ptr->r.record.p.frmask, t, 1);
break;
case gr_mem:
if (!region)
{
- as_bad ("gr_mem record before region record!\n");
+ as_bad ("gr_mem record before region record!");
return;
}
- region->r.record.r.mask.gr_mem |= ptr->r.record.p.rmask;
- set_imask (region, ptr->r.record.p.rmask, t, 2);
+ region->r.record.r.mask.gr_mem |= ptr->r.record.p.grmask;
+ set_imask (region, ptr->r.record.p.grmask, t, 2);
break;
case br_mem:
if (!region)
{
- as_bad ("br_mem record before region record!\n");
+ as_bad ("br_mem record before region record!");
return;
}
region->r.record.r.mask.br_mem |= ptr->r.record.p.brmask;
@@ -2840,7 +3057,7 @@ fixup_unw_records (list, before_relax)
case gr_gr:
if (!region)
{
- as_bad ("gr_gr record before region record!\n");
+ as_bad ("gr_gr record before region record!");
return;
}
set_imask (region, ptr->r.record.p.grmask, t, 2);
@@ -2848,7 +3065,7 @@ fixup_unw_records (list, before_relax)
case br_gr:
if (!region)
{
- as_bad ("br_gr record before region record!\n");
+ as_bad ("br_gr record before region record!");
return;
}
set_imask (region, ptr->r.record.p.brmask, t, 3);
@@ -2879,8 +3096,11 @@ ia64_estimate_size_before_relax (fragS *frag,
pad = len % md.pointer_size;
if (pad != 0)
len += md.pointer_size - pad;
- /* Add 8 for the header + a pointer for the personality offset. */
- size = len + 8 + md.pointer_size;
+ /* Add 8 for the header. */
+ size = len + 8;
+ /* Add a pointer for the personality offset. */
+ if (frag->fr_offset)
+ size += md.pointer_size;
/* fr_var carries the max_chars that we created the fragment with.
We must, of course, have allocated enough memory earlier. */
@@ -2907,8 +3127,11 @@ ia64_convert_frag (fragS *frag)
pad = len % md.pointer_size;
if (pad != 0)
len += md.pointer_size - pad;
- /* Add 8 for the header + a pointer for the personality offset. */
- size = len + 8 + md.pointer_size;
+ /* Add 8 for the header. */
+ size = len + 8;
+ /* Add a pointer for the personality offset. */
+ if (frag->fr_offset)
+ size += md.pointer_size;
/* fr_var carries the max_chars that we created the fragment with.
We must, of course, have allocated enough memory earlier. */
@@ -2949,17 +3172,43 @@ ia64_convert_frag (fragS *frag)
}
static int
-convert_expr_to_ab_reg (e, ab, regp)
- expressionS *e;
+parse_predicate_and_operand (e, qp, po)
+ expressionS * e;
+ unsigned * qp;
+ const char * po;
+{
+ int sep = parse_operand (e, ',');
+
+ *qp = e->X_add_number - REG_P;
+ if (e->X_op != O_register || *qp > 63)
+ {
+ as_bad ("First operand to .%s must be a predicate", po);
+ *qp = 0;
+ }
+ else if (*qp == 0)
+ as_warn ("Pointless use of p0 as first operand to .%s", po);
+ if (sep == ',')
+ sep = parse_operand (e, ',');
+ else
+ e->X_op = O_absent;
+ return sep;
+}
+
+static void
+convert_expr_to_ab_reg (e, ab, regp, po, n)
+ const expressionS *e;
unsigned int *ab;
unsigned int *regp;
+ const char * po;
+ int n;
{
- unsigned int reg;
+ unsigned int reg = e->X_add_number;
+
+ *ab = *regp = 0; /* Anything valid is good here. */
if (e->X_op != O_register)
- return 0;
+ reg = REG_GR; /* Anything invalid is good here. */
- reg = e->X_add_number;
if (reg >= (REG_GR + 4) && reg <= (REG_GR + 7))
{
*ab = 0;
@@ -2994,31 +3243,33 @@ convert_expr_to_ab_reg (e, ab, regp)
case REG_AR + AR_LC: *regp = 10; break;
default:
- return 0;
+ as_bad ("Operand %d to .%s must be a preserved register", n, po);
+ break;
}
}
- return 1;
}
-static int
-convert_expr_to_xy_reg (e, xy, regp)
- expressionS *e;
+static void
+convert_expr_to_xy_reg (e, xy, regp, po, n)
+ const expressionS *e;
unsigned int *xy;
unsigned int *regp;
+ const char * po;
+ int n;
{
- unsigned int reg;
+ unsigned int reg = e->X_add_number;
- if (e->X_op != O_register)
- return 0;
+ *xy = *regp = 0; /* Anything valid is good here. */
- reg = e->X_add_number;
+ if (e->X_op != O_register)
+ reg = REG_GR; /* Anything invalid is good here. */
- if (/* reg >= REG_GR && */ reg <= (REG_GR + 127))
+ if (reg >= (REG_GR + 1) && reg <= (REG_GR + 127))
{
*xy = 0;
*regp = reg - REG_GR;
}
- else if (reg >= REG_FR && reg <= (REG_FR + 127))
+ else if (reg >= (REG_FR + 2) && reg <= (REG_FR + 127))
{
*xy = 1;
*regp = reg - REG_FR;
@@ -3029,8 +3280,7 @@ convert_expr_to_xy_reg (e, xy, regp)
*regp = reg - REG_BR;
}
else
- return -1;
- return 1;
+ as_bad ("Operand %d to .%s must be a writable register", n, po);
}
static void
@@ -3045,17 +3295,31 @@ static void
dot_radix (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- int radix;
+ char *radix;
+ int ch;
SKIP_WHITESPACE ();
- radix = *input_line_pointer++;
- if (radix != 'C' && !is_end_of_line[(unsigned char) radix])
- {
- as_bad ("Radix `%c' unsupported", *input_line_pointer);
- ignore_rest_of_line ();
- return;
- }
+ if (is_it_end_of_statement ())
+ return;
+ radix = input_line_pointer;
+ ch = get_symbol_end ();
+ ia64_canonicalize_symbol_name (radix);
+ if (strcasecmp (radix, "C"))
+ as_bad ("Radix `%s' unsupported or invalid", radix);
+ *input_line_pointer = ch;
+ demand_empty_rest_of_line ();
+}
+
+/* Helper function for .loc directives. If the assembler is not generating
+ line number info, then we need to remember which instructions have a .loc
+ directive, and only call dwarf2_gen_line_info for those instructions. */
+
+static void
+dot_loc (int x)
+{
+ CURR_SLOT.loc_directive_seen = 1;
+ dwarf2_directive_loc (x);
}
/* .sbss, .bss etc. are macros that expand into ".section SECNAME". */
@@ -3066,19 +3330,112 @@ dot_special_section (which)
set_section ((char *) special_section_name[which]);
}
+/* Return -1 for warning and 0 for error. */
+
+static int
+unwind_diagnostic (const char * region, const char *directive)
+{
+ if (md.unwind_check == unwind_check_warning)
+ {
+ as_warn (".%s outside of %s", directive, region);
+ return -1;
+ }
+ else
+ {
+ as_bad (".%s outside of %s", directive, region);
+ ignore_rest_of_line ();
+ return 0;
+ }
+}
+
+/* Return 1 if a directive is in a procedure, -1 if a directive isn't in
+ a procedure but the unwind directive check is set to warning, 0 if
+ a directive isn't in a procedure and the unwind directive check is set
+ to error. */
+
+static int
+in_procedure (const char *directive)
+{
+ if (unwind.proc_pending.sym
+ && (!unwind.saved_text_seg || strcmp (directive, "endp") == 0))
+ return 1;
+ return unwind_diagnostic ("procedure", directive);
+}
+
+/* Return 1 if a directive is in a prologue, -1 if a directive isn't in
+ a prologue but the unwind directive check is set to warning, 0 if
+ a directive isn't in a prologue and the unwind directive check is set
+ to error. */
+
+static int
+in_prologue (const char *directive)
+{
+ int in = in_procedure (directive);
+
+ if (in > 0 && !unwind.prologue)
+ in = unwind_diagnostic ("prologue", directive);
+ check_pending_save ();
+ return in;
+}
+
+/* Return 1 if a directive is in a body, -1 if a directive isn't in
+ a body but the unwind directive check is set to warning, 0 if
+ a directive isn't in a body and the unwind directive check is set
+ to error. */
+
+static int
+in_body (const char *directive)
+{
+ int in = in_procedure (directive);
+
+ if (in > 0 && !unwind.body)
+ in = unwind_diagnostic ("body region", directive);
+ return in;
+}
+
static void
-add_unwind_entry (ptr)
+add_unwind_entry (ptr, sep)
unw_rec_list *ptr;
+ int sep;
{
- if (unwind.tail)
- unwind.tail->next = ptr;
- else
- unwind.list = ptr;
- unwind.tail = ptr;
+ if (ptr)
+ {
+ if (unwind.tail)
+ unwind.tail->next = ptr;
+ else
+ unwind.list = ptr;
+ unwind.tail = ptr;
+
+ /* The current entry can in fact be a chain of unwind entries. */
+ if (unwind.current_entry == NULL)
+ unwind.current_entry = ptr;
+ }
/* The current entry can in fact be a chain of unwind entries. */
if (unwind.current_entry == NULL)
unwind.current_entry = ptr;
+
+ if (sep == ',')
+ {
+ /* Parse a tag permitted for the current directive. */
+ int ch;
+
+ SKIP_WHITESPACE ();
+ ch = get_symbol_end ();
+ /* FIXME: For now, just issue a warning that this isn't implemented. */
+ {
+ static int warned;
+
+ if (!warned)
+ {
+ warned = 1;
+ as_warn ("Tags on unwind pseudo-ops aren't supported, yet");
+ }
+ }
+ *input_line_pointer = ch;
+ }
+ if (sep != NOT_A_CHAR)
+ demand_empty_rest_of_line ();
}
static void
@@ -3086,13 +3443,19 @@ dot_fframe (dummy)
int dummy ATTRIBUTE_UNUSED;
{
expressionS e;
+ int sep;
+
+ if (!in_prologue ("fframe"))
+ return;
- parse_operand (&e);
+ sep = parse_operand (&e, ',');
if (e.X_op != O_constant)
- as_bad ("Operand to .fframe must be a constant");
- else
- add_unwind_entry (output_mem_stack_f (e.X_add_number));
+ {
+ as_bad ("First operand to .fframe must be a constant");
+ e.X_add_number = 0;
+ }
+ add_unwind_entry (output_mem_stack_f (e.X_add_number), sep);
}
static void
@@ -3101,49 +3464,47 @@ dot_vframe (dummy)
{
expressionS e;
unsigned reg;
+ int sep;
- parse_operand (&e);
+ if (!in_prologue ("vframe"))
+ return;
+
+ sep = parse_operand (&e, ',');
reg = e.X_add_number - REG_GR;
- if (e.X_op == O_register && reg < 128)
+ if (e.X_op != O_register || reg > 127)
{
- add_unwind_entry (output_mem_stack_v ());
- if (! (unwind.prologue_mask & 2))
- add_unwind_entry (output_psp_gr (reg));
+ as_bad ("First operand to .vframe must be a general register");
+ reg = 0;
}
- else
- as_bad ("First operand to .vframe must be a general register");
+ add_unwind_entry (output_mem_stack_v (), sep);
+ if (! (unwind.prologue_mask & 2))
+ add_unwind_entry (output_psp_gr (reg), NOT_A_CHAR);
+ else if (reg != unwind.prologue_gr
+ + (unsigned) popcount (unwind.prologue_mask & (-2 << 1)))
+ as_warn ("Operand of .vframe contradicts .prologue");
}
static void
-dot_vframesp (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_vframesp (psp)
+ int psp;
{
expressionS e;
+ int sep;
- parse_operand (&e);
- if (e.X_op == O_constant)
- {
- add_unwind_entry (output_mem_stack_v ());
- add_unwind_entry (output_psp_sprel (e.X_add_number));
- }
- else
- as_bad ("Operand to .vframesp must be a constant (sp-relative offset)");
-}
+ if (psp)
+ as_warn (".vframepsp is meaningless, assuming .vframesp was meant");
-static void
-dot_vframepsp (dummy)
- int dummy ATTRIBUTE_UNUSED;
-{
- expressionS e;
+ if (!in_prologue ("vframesp"))
+ return;
- parse_operand (&e);
- if (e.X_op == O_constant)
+ sep = parse_operand (&e, ',');
+ if (e.X_op != O_constant)
{
- add_unwind_entry (output_mem_stack_v ());
- add_unwind_entry (output_psp_sprel (e.X_add_number));
+ as_bad ("Operand to .vframesp must be a constant (sp-relative offset)");
+ e.X_add_number = 0;
}
- else
- as_bad ("Operand to .vframepsp must be a constant (psp-relative offset)");
+ add_unwind_entry (output_mem_stack_v (), sep);
+ add_unwind_entry (output_psp_sprel (e.X_add_number), NOT_A_CHAR);
}
static void
@@ -3151,100 +3512,115 @@ dot_save (dummy)
int dummy ATTRIBUTE_UNUSED;
{
expressionS e1, e2;
+ unsigned reg1, reg2;
int sep;
- int reg1, reg2;
- sep = parse_operand (&e1);
- if (sep != ',')
- as_bad ("No second operand to .save");
- sep = parse_operand (&e2);
+ if (!in_prologue ("save"))
+ return;
- reg1 = e1.X_add_number;
- reg2 = e2.X_add_number - REG_GR;
+ sep = parse_operand (&e1, ',');
+ if (sep == ',')
+ sep = parse_operand (&e2, ',');
+ else
+ e2.X_op = O_absent;
+ reg1 = e1.X_add_number;
/* Make sure its a valid ar.xxx reg, OR its br0, aka 'rp'. */
- if (e1.X_op == O_register)
+ if (e1.X_op != O_register)
{
- if (e2.X_op == O_register && reg2 >= 0 && reg2 < 128)
- {
- switch (reg1)
- {
- case REG_AR + AR_BSP:
- add_unwind_entry (output_bsp_when ());
- add_unwind_entry (output_bsp_gr (reg2));
- break;
- case REG_AR + AR_BSPSTORE:
- add_unwind_entry (output_bspstore_when ());
- add_unwind_entry (output_bspstore_gr (reg2));
- break;
- case REG_AR + AR_RNAT:
- add_unwind_entry (output_rnat_when ());
- add_unwind_entry (output_rnat_gr (reg2));
- break;
- case REG_AR + AR_UNAT:
- add_unwind_entry (output_unat_when ());
- add_unwind_entry (output_unat_gr (reg2));
- break;
- case REG_AR + AR_FPSR:
- add_unwind_entry (output_fpsr_when ());
- add_unwind_entry (output_fpsr_gr (reg2));
- break;
- case REG_AR + AR_PFS:
- add_unwind_entry (output_pfs_when ());
- if (! (unwind.prologue_mask & 4))
- add_unwind_entry (output_pfs_gr (reg2));
- break;
- case REG_AR + AR_LC:
- add_unwind_entry (output_lc_when ());
- add_unwind_entry (output_lc_gr (reg2));
- break;
- case REG_BR:
- add_unwind_entry (output_rp_when ());
- if (! (unwind.prologue_mask & 8))
- add_unwind_entry (output_rp_gr (reg2));
- break;
- case REG_PR:
- add_unwind_entry (output_preds_when ());
- if (! (unwind.prologue_mask & 1))
- add_unwind_entry (output_preds_gr (reg2));
- break;
- case REG_PRIUNAT:
- add_unwind_entry (output_priunat_when_gr ());
- add_unwind_entry (output_priunat_gr (reg2));
- break;
- default:
- as_bad ("First operand not a valid register");
- }
- }
- else
- as_bad (" Second operand not a valid register");
+ as_bad ("First operand to .save not a register");
+ reg1 = REG_PR; /* Anything valid is good here. */
+ }
+ reg2 = e2.X_add_number - REG_GR;
+ if (e2.X_op != O_register || reg2 > 127)
+ {
+ as_bad ("Second operand to .save not a valid register");
+ reg2 = 0;
+ }
+ switch (reg1)
+ {
+ case REG_AR + AR_BSP:
+ add_unwind_entry (output_bsp_when (), sep);
+ add_unwind_entry (output_bsp_gr (reg2), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_BSPSTORE:
+ add_unwind_entry (output_bspstore_when (), sep);
+ add_unwind_entry (output_bspstore_gr (reg2), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_RNAT:
+ add_unwind_entry (output_rnat_when (), sep);
+ add_unwind_entry (output_rnat_gr (reg2), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_UNAT:
+ add_unwind_entry (output_unat_when (), sep);
+ add_unwind_entry (output_unat_gr (reg2), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_FPSR:
+ add_unwind_entry (output_fpsr_when (), sep);
+ add_unwind_entry (output_fpsr_gr (reg2), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_PFS:
+ add_unwind_entry (output_pfs_when (), sep);
+ if (! (unwind.prologue_mask & 4))
+ add_unwind_entry (output_pfs_gr (reg2), NOT_A_CHAR);
+ else if (reg2 != unwind.prologue_gr
+ + (unsigned) popcount (unwind.prologue_mask & (-4 << 1)))
+ as_warn ("Second operand of .save contradicts .prologue");
+ break;
+ case REG_AR + AR_LC:
+ add_unwind_entry (output_lc_when (), sep);
+ add_unwind_entry (output_lc_gr (reg2), NOT_A_CHAR);
+ break;
+ case REG_BR:
+ add_unwind_entry (output_rp_when (), sep);
+ if (! (unwind.prologue_mask & 8))
+ add_unwind_entry (output_rp_gr (reg2), NOT_A_CHAR);
+ else if (reg2 != unwind.prologue_gr)
+ as_warn ("Second operand of .save contradicts .prologue");
+ break;
+ case REG_PR:
+ add_unwind_entry (output_preds_when (), sep);
+ if (! (unwind.prologue_mask & 1))
+ add_unwind_entry (output_preds_gr (reg2), NOT_A_CHAR);
+ else if (reg2 != unwind.prologue_gr
+ + (unsigned) popcount (unwind.prologue_mask & (-1 << 1)))
+ as_warn ("Second operand of .save contradicts .prologue");
+ break;
+ case REG_PRIUNAT:
+ add_unwind_entry (output_priunat_when_gr (), sep);
+ add_unwind_entry (output_priunat_gr (reg2), NOT_A_CHAR);
+ break;
+ default:
+ as_bad ("First operand to .save not a valid register");
+ add_unwind_entry (NULL, sep);
+ break;
}
- else
- as_bad ("First operand not a register");
}
static void
dot_restore (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- expressionS e1, e2;
+ expressionS e1;
unsigned long ecount; /* # of _additional_ regions to pop */
int sep;
- sep = parse_operand (&e1);
+ if (!in_body ("restore"))
+ return;
+
+ sep = parse_operand (&e1, ',');
if (e1.X_op != O_register || e1.X_add_number != REG_GR + 12)
- {
- as_bad ("First operand to .restore must be stack pointer (sp)");
- return;
- }
+ as_bad ("First operand to .restore must be stack pointer (sp)");
if (sep == ',')
{
- parse_operand (&e2);
+ expressionS e2;
+
+ sep = parse_operand (&e2, ',');
if (e2.X_op != O_constant || e2.X_add_number < 0)
{
as_bad ("Second operand to .restore must be a constant >= 0");
- return;
+ e2.X_add_number = 0;
}
ecount = e2.X_add_number;
}
@@ -3255,10 +3631,10 @@ dot_restore (dummy)
{
as_bad ("Epilogue count of %lu exceeds number of nested prologues (%u)",
ecount + 1, unwind.prologue_count);
- return;
+ ecount = 0;
}
- add_unwind_entry (output_epilogue (ecount));
+ add_unwind_entry (output_epilogue (ecount), sep);
if (ecount < unwind.prologue_count)
unwind.prologue_count -= ecount + 1;
@@ -3267,64 +3643,155 @@ dot_restore (dummy)
}
static void
-dot_restorereg (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_restorereg (pred)
+ int pred;
{
- unsigned int ab, reg;
+ unsigned int qp, ab, reg;
expressionS e;
+ int sep;
+ const char * const po = pred ? "restorereg.p" : "restorereg";
- parse_operand (&e);
+ if (!in_procedure (po))
+ return;
- if (!convert_expr_to_ab_reg (&e, &ab, &reg))
+ if (pred)
+ sep = parse_predicate_and_operand (&e, &qp, po);
+ else
{
- as_bad ("First operand to .restorereg must be a preserved register");
- return;
+ sep = parse_operand (&e, ',');
+ qp = 0;
}
- add_unwind_entry (output_spill_reg (ab, reg, 0, 0));
+ convert_expr_to_ab_reg (&e, &ab, &reg, po, 1 + pred);
+
+ add_unwind_entry (output_spill_reg (ab, reg, 0, 0, qp), sep);
}
+static char *special_linkonce_name[] =
+ {
+ ".gnu.linkonce.ia64unw.", ".gnu.linkonce.ia64unwi."
+ };
+
static void
-dot_restorereg_p (dummy)
- int dummy ATTRIBUTE_UNUSED;
+start_unwind_section (const segT text_seg, int sec_index)
{
- unsigned int qp, ab, reg;
- expressionS e1, e2;
- int sep;
+ /*
+ Use a slightly ugly scheme to derive the unwind section names from
+ the text section name:
+
+ text sect. unwind table sect.
+ name: name: comments:
+ ---------- ----------------- --------------------------------
+ .text .IA_64.unwind
+ .text.foo .IA_64.unwind.text.foo
+ .foo .IA_64.unwind.foo
+ .gnu.linkonce.t.foo
+ .gnu.linkonce.ia64unw.foo
+ _info .IA_64.unwind_info gas issues error message (ditto)
+ _infoFOO .IA_64.unwind_infoFOO gas issues error message (ditto)
+
+ This mapping is done so that:
+
+ (a) An object file with unwind info only in .text will use
+ unwind section names .IA_64.unwind and .IA_64.unwind_info.
+ This follows the letter of the ABI and also ensures backwards
+ compatibility with older toolchains.
+
+ (b) An object file with unwind info in multiple text sections
+ will use separate unwind sections for each text section.
+ This allows us to properly set the "sh_info" and "sh_link"
+ fields in SHT_IA_64_UNWIND as required by the ABI and also
+ lets GNU ld support programs with multiple segments
+ containing unwind info (as might be the case for certain
+ embedded applications).
+
+ (c) An error is issued if there would be a name clash.
+ */
- sep = parse_operand (&e1);
- if (sep != ',')
+ const char *text_name, *sec_text_name;
+ char *sec_name;
+ const char *prefix = special_section_name [sec_index];
+ const char *suffix;
+ size_t prefix_len, suffix_len, sec_name_len;
+
+ sec_text_name = segment_name (text_seg);
+ text_name = sec_text_name;
+ if (strncmp (text_name, "_info", 5) == 0)
{
- as_bad ("No second operand to .restorereg.p");
+ as_bad ("Illegal section name `%s' (causes unwind section name clash)",
+ text_name);
+ ignore_rest_of_line ();
return;
}
+ if (strcmp (text_name, ".text") == 0)
+ text_name = "";
- parse_operand (&e2);
-
- qp = e1.X_add_number - REG_P;
- if (e1.X_op != O_register || qp > 63)
+ /* Build the unwind section name by appending the (possibly stripped)
+ text section name to the unwind prefix. */
+ suffix = text_name;
+ if (strncmp (text_name, ".gnu.linkonce.t.",
+ sizeof (".gnu.linkonce.t.") - 1) == 0)
{
- as_bad ("First operand to .restorereg.p must be a predicate");
- return;
+ prefix = special_linkonce_name [sec_index - SPECIAL_SECTION_UNWIND];
+ suffix += sizeof (".gnu.linkonce.t.") - 1;
}
- if (!convert_expr_to_ab_reg (&e2, &ab, &reg))
+ prefix_len = strlen (prefix);
+ suffix_len = strlen (suffix);
+ sec_name_len = prefix_len + suffix_len;
+ sec_name = alloca (sec_name_len + 1);
+ memcpy (sec_name, prefix, prefix_len);
+ memcpy (sec_name + prefix_len, suffix, suffix_len);
+ sec_name [sec_name_len] = '\0';
+
+ /* Handle COMDAT group. */
+ if ((text_seg->flags & SEC_LINK_ONCE) != 0
+ && (elf_section_flags (text_seg) & SHF_GROUP) != 0)
{
- as_bad ("Second operand to .restorereg.p must be a preserved register");
- return;
+ char *section;
+ size_t len, group_name_len;
+ const char *group_name = elf_group_name (text_seg);
+
+ if (group_name == NULL)
+ {
+ as_bad ("Group section `%s' has no group signature",
+ sec_text_name);
+ ignore_rest_of_line ();
+ return;
+ }
+ /* We have to construct a fake section directive. */
+ group_name_len = strlen (group_name);
+ len = (sec_name_len
+ + 16 /* ,"aG",@progbits, */
+ + group_name_len /* ,group_name */
+ + 7); /* ,comdat */
+
+ section = alloca (len + 1);
+ memcpy (section, sec_name, sec_name_len);
+ memcpy (section + sec_name_len, ",\"aG\",@progbits,", 16);
+ memcpy (section + sec_name_len + 16, group_name, group_name_len);
+ memcpy (section + len - 7, ",comdat", 7);
+ section [len] = '\0';
+ set_section (section);
}
- add_unwind_entry (output_spill_reg_p (ab, reg, 0, 0, qp));
+ else
+ {
+ set_section (sec_name);
+ bfd_set_section_flags (stdoutput, now_seg,
+ SEC_LOAD | SEC_ALLOC | SEC_READONLY);
+ }
+
+ elf_linked_to_section (now_seg) = text_seg;
}
static void
-generate_unwind_image (text_name)
- const char *text_name;
+generate_unwind_image (const segT text_seg)
{
int size, pad;
unw_rec_list *list;
/* Mark the end of the unwind info, so that we can compute the size of the
last unwind region. */
- add_unwind_entry (output_endp ());
+ add_unwind_entry (output_endp (), NOT_A_CHAR);
/* Force out pending instructions, to make sure all unwind records have
a valid slot_number field. */
@@ -3342,22 +3809,20 @@ generate_unwind_image (text_name)
pad = size % md.pointer_size;
if (pad != 0)
size += md.pointer_size - pad;
- /* Add 8 for the header + a pointer for the personality
- offset. */
- size += 8 + md.pointer_size;
+ /* Add 8 for the header. */
+ size += 8;
+ /* Add a pointer for the personality offset. */
+ if (unwind.personality_routine)
+ size += md.pointer_size;
}
/* If there are unwind records, switch sections, and output the info. */
if (size != 0)
{
- char *sec_name;
expressionS exp;
bfd_reloc_code_real_type reloc;
- make_unw_section_name (SPECIAL_SECTION_UNWIND_INFO, text_name, sec_name);
- set_section (sec_name);
- bfd_set_section_flags (stdoutput, now_seg,
- SEC_LOAD | SEC_ALLOC | SEC_READONLY);
+ start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO);
/* Make sure the section has 4 byte alignment for ILP32 and
8 byte alignment for LP64. */
@@ -3368,7 +3833,8 @@ generate_unwind_image (text_name)
unwind.info = expr_build_dot ();
frag_var (rs_machine_dependent, size, size, 0, 0,
- (offsetT) unwind.personality_routine, (char *) list);
+ (offsetT) (long) unwind.personality_routine,
+ (char *) list);
/* Add the personality address to the image. */
if (unwind.personality_routine != 0)
@@ -3406,13 +3872,8 @@ static void
dot_handlerdata (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- const char *text_name = segment_name (now_seg);
-
- /* If text section name starts with ".text" (which it should),
- strip this prefix off. */
- if (strcmp (text_name, ".text") == 0)
- text_name = "";
-
+ if (!in_procedure ("handlerdata"))
+ return;
unwind.force_unwind_entry = 1;
/* Remember which segment we're in so we can switch back after .endp */
@@ -3422,7 +3883,7 @@ dot_handlerdata (dummy)
/* Generate unwind info into unwind-info section and then leave that
section as the currently active one so dataXX directives go into
the language specific data area of the unwind info block. */
- generate_unwind_image (text_name);
+ generate_unwind_image (now_seg);
demand_empty_rest_of_line ();
}
@@ -3430,6 +3891,8 @@ static void
dot_unwentry (dummy)
int dummy ATTRIBUTE_UNUSED;
{
+ if (!in_procedure ("unwentry"))
+ return;
unwind.force_unwind_entry = 1;
demand_empty_rest_of_line ();
}
@@ -3441,12 +3904,17 @@ dot_altrp (dummy)
expressionS e;
unsigned reg;
- parse_operand (&e);
+ if (!in_prologue ("altrp"))
+ return;
+
+ parse_operand (&e, 0);
reg = e.X_add_number - REG_BR;
- if (e.X_op == O_register && reg < 8)
- add_unwind_entry (output_rp_br (reg));
- else
- as_bad ("First operand not a valid branch register");
+ if (e.X_op != O_register || reg > 7)
+ {
+ as_bad ("First operand to .altrp not a valid branch register");
+ reg = 0;
+ }
+ add_unwind_entry (output_rp_br (reg), 0);
}
static void
@@ -3456,371 +3924,343 @@ dot_savemem (psprel)
expressionS e1, e2;
int sep;
int reg1, val;
+ const char * const po = psprel ? "savepsp" : "savesp";
- sep = parse_operand (&e1);
- if (sep != ',')
- as_bad ("No second operand to .save%ssp", psprel ? "p" : "");
- sep = parse_operand (&e2);
+ if (!in_prologue (po))
+ return;
+
+ sep = parse_operand (&e1, ',');
+ if (sep == ',')
+ sep = parse_operand (&e2, ',');
+ else
+ e2.X_op = O_absent;
reg1 = e1.X_add_number;
val = e2.X_add_number;
/* Make sure its a valid ar.xxx reg, OR its br0, aka 'rp'. */
- if (e1.X_op == O_register)
+ if (e1.X_op != O_register)
{
- if (e2.X_op == O_constant)
- {
- switch (reg1)
- {
- case REG_AR + AR_BSP:
- add_unwind_entry (output_bsp_when ());
- add_unwind_entry ((psprel
- ? output_bsp_psprel
- : output_bsp_sprel) (val));
- break;
- case REG_AR + AR_BSPSTORE:
- add_unwind_entry (output_bspstore_when ());
- add_unwind_entry ((psprel
- ? output_bspstore_psprel
- : output_bspstore_sprel) (val));
- break;
- case REG_AR + AR_RNAT:
- add_unwind_entry (output_rnat_when ());
- add_unwind_entry ((psprel
- ? output_rnat_psprel
- : output_rnat_sprel) (val));
- break;
- case REG_AR + AR_UNAT:
- add_unwind_entry (output_unat_when ());
- add_unwind_entry ((psprel
- ? output_unat_psprel
- : output_unat_sprel) (val));
- break;
- case REG_AR + AR_FPSR:
- add_unwind_entry (output_fpsr_when ());
- add_unwind_entry ((psprel
- ? output_fpsr_psprel
- : output_fpsr_sprel) (val));
- break;
- case REG_AR + AR_PFS:
- add_unwind_entry (output_pfs_when ());
- add_unwind_entry ((psprel
- ? output_pfs_psprel
- : output_pfs_sprel) (val));
- break;
- case REG_AR + AR_LC:
- add_unwind_entry (output_lc_when ());
- add_unwind_entry ((psprel
- ? output_lc_psprel
- : output_lc_sprel) (val));
- break;
- case REG_BR:
- add_unwind_entry (output_rp_when ());
- add_unwind_entry ((psprel
- ? output_rp_psprel
- : output_rp_sprel) (val));
- break;
- case REG_PR:
- add_unwind_entry (output_preds_when ());
- add_unwind_entry ((psprel
- ? output_preds_psprel
- : output_preds_sprel) (val));
- break;
- case REG_PRIUNAT:
- add_unwind_entry (output_priunat_when_mem ());
- add_unwind_entry ((psprel
- ? output_priunat_psprel
- : output_priunat_sprel) (val));
- break;
- default:
- as_bad ("First operand not a valid register");
- }
- }
- else
- as_bad (" Second operand not a valid constant");
+ as_bad ("First operand to .%s not a register", po);
+ reg1 = REG_PR; /* Anything valid is good here. */
}
- else
- as_bad ("First operand not a register");
-}
-
-static void
-dot_saveg (dummy)
- int dummy ATTRIBUTE_UNUSED;
-{
- expressionS e1, e2;
- int sep;
- sep = parse_operand (&e1);
- if (sep == ',')
- parse_operand (&e2);
-
- if (e1.X_op != O_constant)
- as_bad ("First operand to .save.g must be a constant.");
- else
+ if (e2.X_op != O_constant)
{
- int grmask = e1.X_add_number;
- if (sep != ',')
- add_unwind_entry (output_gr_mem (grmask));
- else
- {
- int reg = e2.X_add_number - REG_GR;
- if (e2.X_op == O_register && reg >= 0 && reg < 128)
- add_unwind_entry (output_gr_gr (grmask, reg));
- else
- as_bad ("Second operand is an invalid register.");
- }
+ as_bad ("Second operand to .%s not a constant", po);
+ val = 0;
+ }
+
+ switch (reg1)
+ {
+ case REG_AR + AR_BSP:
+ add_unwind_entry (output_bsp_when (), sep);
+ add_unwind_entry ((psprel
+ ? output_bsp_psprel
+ : output_bsp_sprel) (val), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_BSPSTORE:
+ add_unwind_entry (output_bspstore_when (), sep);
+ add_unwind_entry ((psprel
+ ? output_bspstore_psprel
+ : output_bspstore_sprel) (val), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_RNAT:
+ add_unwind_entry (output_rnat_when (), sep);
+ add_unwind_entry ((psprel
+ ? output_rnat_psprel
+ : output_rnat_sprel) (val), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_UNAT:
+ add_unwind_entry (output_unat_when (), sep);
+ add_unwind_entry ((psprel
+ ? output_unat_psprel
+ : output_unat_sprel) (val), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_FPSR:
+ add_unwind_entry (output_fpsr_when (), sep);
+ add_unwind_entry ((psprel
+ ? output_fpsr_psprel
+ : output_fpsr_sprel) (val), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_PFS:
+ add_unwind_entry (output_pfs_when (), sep);
+ add_unwind_entry ((psprel
+ ? output_pfs_psprel
+ : output_pfs_sprel) (val), NOT_A_CHAR);
+ break;
+ case REG_AR + AR_LC:
+ add_unwind_entry (output_lc_when (), sep);
+ add_unwind_entry ((psprel
+ ? output_lc_psprel
+ : output_lc_sprel) (val), NOT_A_CHAR);
+ break;
+ case REG_BR:
+ add_unwind_entry (output_rp_when (), sep);
+ add_unwind_entry ((psprel
+ ? output_rp_psprel
+ : output_rp_sprel) (val), NOT_A_CHAR);
+ break;
+ case REG_PR:
+ add_unwind_entry (output_preds_when (), sep);
+ add_unwind_entry ((psprel
+ ? output_preds_psprel
+ : output_preds_sprel) (val), NOT_A_CHAR);
+ break;
+ case REG_PRIUNAT:
+ add_unwind_entry (output_priunat_when_mem (), sep);
+ add_unwind_entry ((psprel
+ ? output_priunat_psprel
+ : output_priunat_sprel) (val), NOT_A_CHAR);
+ break;
+ default:
+ as_bad ("First operand to .%s not a valid register", po);
+ add_unwind_entry (NULL, sep);
+ break;
}
}
static void
-dot_savef (dummy)
+dot_saveg (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- expressionS e1;
+ expressionS e;
+ unsigned grmask;
int sep;
- sep = parse_operand (&e1);
- if (e1.X_op != O_constant)
- as_bad ("Operand to .save.f must be a constant.");
- else
- add_unwind_entry (output_fr_mem (e1.X_add_number));
-}
+ if (!in_prologue ("save.g"))
+ return;
-static void
-dot_saveb (dummy)
- int dummy ATTRIBUTE_UNUSED;
-{
- expressionS e1, e2;
- unsigned int reg;
- unsigned char sep;
- int brmask;
+ sep = parse_operand (&e, ',');
- sep = parse_operand (&e1);
- if (e1.X_op != O_constant)
+ grmask = e.X_add_number;
+ if (e.X_op != O_constant
+ || e.X_add_number <= 0
+ || e.X_add_number > 0xf)
{
- as_bad ("First operand to .save.b must be a constant.");
- return;
+ as_bad ("First operand to .save.g must be a positive 4-bit constant");
+ grmask = 0;
}
- brmask = e1.X_add_number;
if (sep == ',')
{
- sep = parse_operand (&e2);
- reg = e2.X_add_number - REG_GR;
- if (e2.X_op != O_register || reg > 127)
+ unsigned reg;
+ int n = popcount (grmask);
+
+ parse_operand (&e, 0);
+ reg = e.X_add_number - REG_GR;
+ if (e.X_op != O_register || reg > 127)
{
- as_bad ("Second operand to .save.b must be a general register.");
- return;
+ as_bad ("Second operand to .save.g must be a general register");
+ reg = 0;
}
- add_unwind_entry (output_br_gr (brmask, e2.X_add_number));
+ else if (reg > 128U - n)
+ {
+ as_bad ("Second operand to .save.g must be the first of %d general registers", n);
+ reg = 0;
+ }
+ add_unwind_entry (output_gr_gr (grmask, reg), 0);
}
else
- add_unwind_entry (output_br_mem (brmask));
-
- if (!is_end_of_line[sep] && !is_it_end_of_statement ())
- demand_empty_rest_of_line ();
+ add_unwind_entry (output_gr_mem (grmask), 0);
}
static void
-dot_savegf (dummy)
+dot_savef (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- expressionS e1, e2;
- int sep;
- sep = parse_operand (&e1);
- if (sep == ',')
- parse_operand (&e2);
+ expressionS e;
- if (e1.X_op != O_constant || sep != ',' || e2.X_op != O_constant)
- as_bad ("Both operands of .save.gf must be constants.");
- else
+ if (!in_prologue ("save.f"))
+ return;
+
+ parse_operand (&e, 0);
+
+ if (e.X_op != O_constant
+ || e.X_add_number <= 0
+ || e.X_add_number > 0xfffff)
{
- int grmask = e1.X_add_number;
- int frmask = e2.X_add_number;
- add_unwind_entry (output_frgr_mem (grmask, frmask));
+ as_bad ("Operand to .save.f must be a positive 20-bit constant");
+ e.X_add_number = 0;
}
+ add_unwind_entry (output_fr_mem (e.X_add_number), 0);
}
static void
-dot_spill (dummy)
+dot_saveb (dummy)
int dummy ATTRIBUTE_UNUSED;
{
expressionS e;
- unsigned char sep;
-
- sep = parse_operand (&e);
- if (!is_end_of_line[sep] && !is_it_end_of_statement ())
- demand_empty_rest_of_line ();
+ unsigned brmask;
+ int sep;
- if (e.X_op != O_constant)
- as_bad ("Operand to .spill must be a constant");
- else
- add_unwind_entry (output_spill_base (e.X_add_number));
-}
+ if (!in_prologue ("save.b"))
+ return;
-static void
-dot_spillreg (dummy)
- int dummy ATTRIBUTE_UNUSED;
-{
- int sep, ab, xy, reg, treg;
- expressionS e1, e2;
+ sep = parse_operand (&e, ',');
- sep = parse_operand (&e1);
- if (sep != ',')
+ brmask = e.X_add_number;
+ if (e.X_op != O_constant
+ || e.X_add_number <= 0
+ || e.X_add_number > 0x1f)
{
- as_bad ("No second operand to .spillreg");
- return;
+ as_bad ("First operand to .save.b must be a positive 5-bit constant");
+ brmask = 0;
}
- parse_operand (&e2);
-
- if (!convert_expr_to_ab_reg (&e1, &ab, &reg))
+ if (sep == ',')
{
- as_bad ("First operand to .spillreg must be a preserved register");
- return;
- }
+ unsigned reg;
+ int n = popcount (brmask);
- if (!convert_expr_to_xy_reg (&e2, &xy, &treg))
- {
- as_bad ("Second operand to .spillreg must be a register");
- return;
+ parse_operand (&e, 0);
+ reg = e.X_add_number - REG_GR;
+ if (e.X_op != O_register || reg > 127)
+ {
+ as_bad ("Second operand to .save.b must be a general register");
+ reg = 0;
+ }
+ else if (reg > 128U - n)
+ {
+ as_bad ("Second operand to .save.b must be the first of %d general registers", n);
+ reg = 0;
+ }
+ add_unwind_entry (output_br_gr (brmask, reg), 0);
}
-
- add_unwind_entry (output_spill_reg (ab, reg, treg, xy));
+ else
+ add_unwind_entry (output_br_mem (brmask), 0);
}
static void
-dot_spillmem (psprel)
- int psprel;
+dot_savegf (dummy)
+ int dummy ATTRIBUTE_UNUSED;
{
expressionS e1, e2;
- int sep, ab, reg;
- sep = parse_operand (&e1);
- if (sep != ',')
- {
- as_bad ("Second operand missing");
- return;
- }
+ if (!in_prologue ("save.gf"))
+ return;
- parse_operand (&e2);
+ if (parse_operand (&e1, ',') == ',')
+ parse_operand (&e2, 0);
+ else
+ e2.X_op = O_absent;
- if (!convert_expr_to_ab_reg (&e1, &ab, &reg))
+ if (e1.X_op != O_constant
+ || e1.X_add_number < 0
+ || e1.X_add_number > 0xf)
{
- as_bad ("First operand to .spill%s must be a preserved register",
- psprel ? "psp" : "sp");
- return;
+ as_bad ("First operand to .save.gf must be a non-negative 4-bit constant");
+ e1.X_op = O_absent;
+ e1.X_add_number = 0;
}
-
- if (e2.X_op != O_constant)
+ if (e2.X_op != O_constant
+ || e2.X_add_number < 0
+ || e2.X_add_number > 0xfffff)
{
- as_bad ("Second operand to .spill%s must be a constant",
- psprel ? "psp" : "sp");
- return;
+ as_bad ("Second operand to .save.gf must be a non-negative 20-bit constant");
+ e2.X_op = O_absent;
+ e2.X_add_number = 0;
}
+ if (e1.X_op == O_constant
+ && e2.X_op == O_constant
+ && e1.X_add_number == 0
+ && e2.X_add_number == 0)
+ as_bad ("Operands to .save.gf may not be both zero");
- if (psprel)
- add_unwind_entry (output_spill_psprel (ab, reg, e2.X_add_number));
- else
- add_unwind_entry (output_spill_sprel (ab, reg, e2.X_add_number));
+ add_unwind_entry (output_frgr_mem (e1.X_add_number, e2.X_add_number), 0);
}
static void
-dot_spillreg_p (dummy)
+dot_spill (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- int sep, ab, xy, reg, treg;
- expressionS e1, e2, e3;
- unsigned int qp;
+ expressionS e;
- sep = parse_operand (&e1);
- if (sep != ',')
- {
- as_bad ("No second and third operand to .spillreg.p");
- return;
- }
+ if (!in_prologue ("spill"))
+ return;
+
+ parse_operand (&e, 0);
- sep = parse_operand (&e2);
- if (sep != ',')
+ if (e.X_op != O_constant)
{
- as_bad ("No third operand to .spillreg.p");
- return;
+ as_bad ("Operand to .spill must be a constant");
+ e.X_add_number = 0;
}
+ add_unwind_entry (output_spill_base (e.X_add_number), 0);
+}
- parse_operand (&e3);
-
- qp = e1.X_add_number - REG_P;
+static void
+dot_spillreg (pred)
+ int pred;
+{
+ int sep;
+ unsigned int qp, ab, xy, reg, treg;
+ expressionS e;
+ const char * const po = pred ? "spillreg.p" : "spillreg";
- if (e1.X_op != O_register || qp > 63)
- {
- as_bad ("First operand to .spillreg.p must be a predicate");
- return;
- }
+ if (!in_procedure (po))
+ return;
- if (!convert_expr_to_ab_reg (&e2, &ab, &reg))
+ if (pred)
+ sep = parse_predicate_and_operand (&e, &qp, po);
+ else
{
- as_bad ("Second operand to .spillreg.p must be a preserved register");
- return;
+ sep = parse_operand (&e, ',');
+ qp = 0;
}
+ convert_expr_to_ab_reg (&e, &ab, &reg, po, 1 + pred);
- if (!convert_expr_to_xy_reg (&e3, &xy, &treg))
- {
- as_bad ("Third operand to .spillreg.p must be a register");
- return;
- }
+ if (sep == ',')
+ sep = parse_operand (&e, ',');
+ else
+ e.X_op = O_absent;
+ convert_expr_to_xy_reg (&e, &xy, &treg, po, 2 + pred);
- add_unwind_entry (output_spill_reg_p (ab, reg, treg, xy, qp));
+ add_unwind_entry (output_spill_reg (ab, reg, treg, xy, qp), sep);
}
static void
-dot_spillmem_p (psprel)
+dot_spillmem (psprel)
int psprel;
{
- expressionS e1, e2, e3;
- int sep, ab, reg;
- unsigned int qp;
-
- sep = parse_operand (&e1);
- if (sep != ',')
- {
- as_bad ("Second operand missing");
- return;
- }
+ expressionS e;
+ int pred = (psprel < 0), sep;
+ unsigned int qp, ab, reg;
+ const char * po;
- parse_operand (&e2);
- if (sep != ',')
+ if (pred)
{
- as_bad ("Second operand missing");
- return;
+ psprel = ~psprel;
+ po = psprel ? "spillpsp.p" : "spillsp.p";
}
+ else
+ po = psprel ? "spillpsp" : "spillsp";
- parse_operand (&e3);
-
- qp = e1.X_add_number - REG_P;
- if (e1.X_op != O_register || qp > 63)
- {
- as_bad ("First operand to .spill%s_p must be a predicate",
- psprel ? "psp" : "sp");
- return;
- }
+ if (!in_procedure (po))
+ return;
- if (!convert_expr_to_ab_reg (&e2, &ab, &reg))
+ if (pred)
+ sep = parse_predicate_and_operand (&e, &qp, po);
+ else
{
- as_bad ("Second operand to .spill%s_p must be a preserved register",
- psprel ? "psp" : "sp");
- return;
+ sep = parse_operand (&e, ',');
+ qp = 0;
}
+ convert_expr_to_ab_reg (&e, &ab, &reg, po, 1 + pred);
- if (e3.X_op != O_constant)
+ if (sep == ',')
+ sep = parse_operand (&e, ',');
+ else
+ e.X_op = O_absent;
+ if (e.X_op != O_constant)
{
- as_bad ("Third operand to .spill%s_p must be a constant",
- psprel ? "psp" : "sp");
- return;
+ as_bad ("Operand %d to .%s must be a constant", 2 + pred, po);
+ e.X_add_number = 0;
}
if (psprel)
- add_unwind_entry (output_spill_psprel_p (ab, reg, e3.X_add_number, qp));
+ add_unwind_entry (output_spill_psprel (ab, reg, e.X_add_number, qp), sep);
else
- add_unwind_entry (output_spill_sprel_p (ab, reg, e3.X_add_number, qp));
+ add_unwind_entry (output_spill_sprel (ab, reg, e.X_add_number, qp), sep);
}
static unsigned int
@@ -3884,14 +4324,18 @@ dot_label_state (dummy)
{
expressionS e;
- parse_operand (&e);
- if (e.X_op != O_constant)
+ if (!in_body ("label_state"))
+ return;
+
+ parse_operand (&e, 0);
+ if (e.X_op == O_constant)
+ save_prologue_count (e.X_add_number, unwind.prologue_count);
+ else
{
as_bad ("Operand to .label_state must be a constant");
- return;
+ e.X_add_number = 0;
}
- add_unwind_entry (output_label_state (e.X_add_number));
- save_prologue_count (e.X_add_number, unwind.prologue_count);
+ add_unwind_entry (output_label_state (e.X_add_number), 0);
}
static void
@@ -3900,14 +4344,18 @@ dot_copy_state (dummy)
{
expressionS e;
- parse_operand (&e);
- if (e.X_op != O_constant)
+ if (!in_body ("copy_state"))
+ return;
+
+ parse_operand (&e, 0);
+ if (e.X_op == O_constant)
+ unwind.prologue_count = get_saved_prologue_count (e.X_add_number);
+ else
{
as_bad ("Operand to .copy_state must be a constant");
- return;
+ e.X_add_number = 0;
}
- add_unwind_entry (output_copy_state (e.X_add_number));
- unwind.prologue_count = get_saved_prologue_count (e.X_add_number);
+ add_unwind_entry (output_copy_state (e.X_add_number), 0);
}
static void
@@ -3917,29 +4365,28 @@ dot_unwabi (dummy)
expressionS e1, e2;
unsigned char sep;
- sep = parse_operand (&e1);
- if (sep != ',')
- {
- as_bad ("Second operand to .unwabi missing");
- return;
- }
- sep = parse_operand (&e2);
- if (!is_end_of_line[sep] && !is_it_end_of_statement ())
- demand_empty_rest_of_line ();
+ if (!in_prologue ("unwabi"))
+ return;
+
+ sep = parse_operand (&e1, ',');
+ if (sep == ',')
+ parse_operand (&e2, 0);
+ else
+ e2.X_op = O_absent;
if (e1.X_op != O_constant)
{
as_bad ("First operand to .unwabi must be a constant");
- return;
+ e1.X_add_number = 0;
}
if (e2.X_op != O_constant)
{
as_bad ("Second operand to .unwabi must be a constant");
- return;
+ e2.X_add_number = 0;
}
- add_unwind_entry (output_unwabi (e1.X_add_number, e2.X_add_number));
+ add_unwind_entry (output_unwabi (e1.X_add_number, e2.X_add_number), 0);
}
static void
@@ -3947,6 +4394,8 @@ dot_personality (dummy)
int dummy ATTRIBUTE_UNUSED;
{
char *name, *p, c;
+ if (!in_procedure ("personality"))
+ return;
SKIP_WHITESPACE ();
name = input_line_pointer;
c = get_symbol_end ();
@@ -3964,8 +4413,22 @@ dot_proc (dummy)
{
char *name, *p, c;
symbolS *sym;
+ proc_pending *pending, *last_pending;
+
+ if (unwind.proc_pending.sym)
+ {
+ (md.unwind_check == unwind_check_warning
+ ? as_warn
+ : as_bad) ("Missing .endp after previous .proc");
+ while (unwind.proc_pending.next)
+ {
+ pending = unwind.proc_pending.next;
+ unwind.proc_pending.next = pending->next;
+ free (pending);
+ }
+ }
+ last_pending = NULL;
- unwind.proc_start = expr_build_dot ();
/* Parse names of main and alternate entry points and mark them as
function symbols: */
while (1)
@@ -3974,22 +4437,45 @@ dot_proc (dummy)
name = input_line_pointer;
c = get_symbol_end ();
p = input_line_pointer;
- sym = symbol_find_or_make (name);
- if (unwind.proc_start == 0)
+ if (!*name)
+ as_bad ("Empty argument of .proc");
+ else
{
- unwind.proc_start = sym;
+ sym = symbol_find_or_make (name);
+ if (S_IS_DEFINED (sym))
+ as_bad ("`%s' was already defined", name);
+ else if (!last_pending)
+ {
+ unwind.proc_pending.sym = sym;
+ last_pending = &unwind.proc_pending;
+ }
+ else
+ {
+ pending = xmalloc (sizeof (*pending));
+ pending->sym = sym;
+ last_pending = last_pending->next = pending;
+ }
+ symbol_get_bfdsym (sym)->flags |= BSF_FUNCTION;
}
- symbol_get_bfdsym (sym)->flags |= BSF_FUNCTION;
*p = c;
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
break;
++input_line_pointer;
}
+ if (!last_pending)
+ {
+ unwind.proc_pending.sym = expr_build_dot ();
+ last_pending = &unwind.proc_pending;
+ }
+ last_pending->next = NULL;
demand_empty_rest_of_line ();
ia64_do_align (16);
+ unwind.prologue = 0;
unwind.prologue_count = 0;
+ unwind.body = 0;
+ unwind.insn = 0;
unwind.list = unwind.tail = unwind.current_entry = NULL;
unwind.personality_routine = 0;
}
@@ -3998,52 +4484,86 @@ static void
dot_body (dummy)
int dummy ATTRIBUTE_UNUSED;
{
+ if (!in_procedure ("body"))
+ return;
+ if (!unwind.prologue && !unwind.body && unwind.insn)
+ as_warn ("Initial .body should precede any instructions");
+ check_pending_save ();
+
unwind.prologue = 0;
unwind.prologue_mask = 0;
+ unwind.body = 1;
- add_unwind_entry (output_body ());
- demand_empty_rest_of_line ();
+ add_unwind_entry (output_body (), 0);
}
static void
dot_prologue (dummy)
int dummy ATTRIBUTE_UNUSED;
{
- unsigned char sep;
- int mask = 0, grsave = 0;
+ unsigned mask = 0, grsave = 0;
- if (!is_it_end_of_statement ())
+ if (!in_procedure ("prologue"))
+ return;
+ if (unwind.prologue)
{
- expressionS e1, e2;
- sep = parse_operand (&e1);
- if (sep != ',')
- as_bad ("No second operand to .prologue");
- sep = parse_operand (&e2);
- if (!is_end_of_line[sep] && !is_it_end_of_statement ())
- demand_empty_rest_of_line ();
+ as_bad (".prologue within prologue");
+ ignore_rest_of_line ();
+ return;
+ }
+ if (!unwind.body && unwind.insn)
+ as_warn ("Initial .prologue should precede any instructions");
- if (e1.X_op == O_constant)
- {
- mask = e1.X_add_number;
+ if (!is_it_end_of_statement ())
+ {
+ expressionS e;
+ int n, sep = parse_operand (&e, ',');
- if (e2.X_op == O_constant)
- grsave = e2.X_add_number;
- else if (e2.X_op == O_register
- && (grsave = e2.X_add_number - REG_GR) < 128)
- ;
- else
- as_bad ("Second operand not a constant or general register");
+ if (e.X_op != O_constant
+ || e.X_add_number < 0
+ || e.X_add_number > 0xf)
+ as_bad ("First operand to .prologue must be a positive 4-bit constant");
+ else if (e.X_add_number == 0)
+ as_warn ("Pointless use of zero first operand to .prologue");
+ else
+ mask = e.X_add_number;
+ n = popcount (mask);
- add_unwind_entry (output_prologue_gr (mask, grsave));
- }
+ if (sep == ',')
+ parse_operand (&e, 0);
else
- as_bad ("First operand not a constant");
+ e.X_op = O_absent;
+ if (e.X_op == O_constant
+ && e.X_add_number >= 0
+ && e.X_add_number < 128)
+ {
+ if (md.unwind_check == unwind_check_error)
+ as_warn ("Using a constant as second operand to .prologue is deprecated");
+ grsave = e.X_add_number;
+ }
+ else if (e.X_op != O_register
+ || (grsave = e.X_add_number - REG_GR) > 127)
+ {
+ as_bad ("Second operand to .prologue must be a general register");
+ grsave = 0;
+ }
+ else if (grsave > 128U - n)
+ {
+ as_bad ("Second operand to .prologue must be the first of %d general registers", n);
+ grsave = 0;
+ }
+
}
+
+ if (mask)
+ add_unwind_entry (output_prologue_gr (mask, grsave), 0);
else
- add_unwind_entry (output_prologue ());
+ add_unwind_entry (output_prologue (), 0);
unwind.prologue = 1;
unwind.prologue_mask = mask;
+ unwind.prologue_gr = grsave;
+ unwind.body = 0;
++unwind.prologue_count;
}
@@ -4052,14 +4572,17 @@ dot_endp (dummy)
int dummy ATTRIBUTE_UNUSED;
{
expressionS e;
- unsigned char *ptr;
int bytes_per_address;
long where;
segT saved_seg;
subsegT saved_subseg;
- const char *sec_name, *text_name;
- char *name, *p, c;
- symbolS *sym;
+ proc_pending *pending;
+ int unwind_check = md.unwind_check;
+
+ md.unwind_check = unwind_check_error;
+ if (!in_procedure ("endp"))
+ return;
+ md.unwind_check = unwind_check;
if (unwind.saved_text_seg)
{
@@ -4073,64 +4596,20 @@ dot_endp (dummy)
saved_subseg = now_subseg;
}
- /*
- Use a slightly ugly scheme to derive the unwind section names from
- the text section name:
-
- text sect. unwind table sect.
- name: name: comments:
- ---------- ----------------- --------------------------------
- .text .IA_64.unwind
- .text.foo .IA_64.unwind.text.foo
- .foo .IA_64.unwind.foo
- .gnu.linkonce.t.foo
- .gnu.linkonce.ia64unw.foo
- _info .IA_64.unwind_info gas issues error message (ditto)
- _infoFOO .IA_64.unwind_infoFOO gas issues error message (ditto)
-
- This mapping is done so that:
-
- (a) An object file with unwind info only in .text will use
- unwind section names .IA_64.unwind and .IA_64.unwind_info.
- This follows the letter of the ABI and also ensures backwards
- compatibility with older toolchains.
-
- (b) An object file with unwind info in multiple text sections
- will use separate unwind sections for each text section.
- This allows us to properly set the "sh_info" and "sh_link"
- fields in SHT_IA_64_UNWIND as required by the ABI and also
- lets GNU ld support programs with multiple segments
- containing unwind info (as might be the case for certain
- embedded applications).
-
- (c) An error is issued if there would be a name clash.
- */
- text_name = segment_name (saved_seg);
- if (strncmp (text_name, "_info", 5) == 0)
- {
- as_bad ("Illegal section name `%s' (causes unwind section name clash)",
- text_name);
- ignore_rest_of_line ();
- return;
- }
- if (strcmp (text_name, ".text") == 0)
- text_name = "";
-
insn_group_break (1, 0, 0);
/* If there wasn't a .handlerdata, we haven't generated an image yet. */
if (!unwind.info)
- generate_unwind_image (text_name);
+ generate_unwind_image (saved_seg);
if (unwind.info || unwind.force_unwind_entry)
{
+ symbolS *proc_end;
+
subseg_set (md.last_text_seg, 0);
- unwind.proc_end = expr_build_dot ();
+ proc_end = expr_build_dot ();
- make_unw_section_name (SPECIAL_SECTION_UNWIND, text_name, sec_name);
- set_section ((char *) sec_name);
- bfd_set_section_flags (stdoutput, now_seg,
- SEC_LOAD | SEC_ALLOC | SEC_READONLY);
+ start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND);
/* Make sure that section has 4 byte alignment for ILP32 and
8 byte alignment for LP64. */
@@ -4138,7 +4617,7 @@ dot_endp (dummy)
/* Need space for 3 pointers for procedure start, procedure end,
and unwind info. */
- ptr = frag_more (3 * md.pointer_size);
+ memset (frag_more (3 * md.pointer_size), 0, 3 * md.pointer_size);
where = frag_now_fix () - (3 * md.pointer_size);
bytes_per_address = bfd_arch_bits_per_address (stdoutput) / 8;
@@ -4146,13 +4625,19 @@ dot_endp (dummy)
e.X_op = O_pseudo_fixup;
e.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym;
e.X_add_number = 0;
- e.X_add_symbol = unwind.proc_start;
+ if (!S_IS_LOCAL (unwind.proc_pending.sym)
+ && S_IS_DEFINED (unwind.proc_pending.sym))
+ e.X_add_symbol = symbol_temp_new (S_GET_SEGMENT (unwind.proc_pending.sym),
+ S_GET_VALUE (unwind.proc_pending.sym),
+ symbol_get_frag (unwind.proc_pending.sym));
+ else
+ e.X_add_symbol = unwind.proc_pending.sym;
ia64_cons_fix_new (frag_now, where, bytes_per_address, &e);
e.X_op = O_pseudo_fixup;
e.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym;
e.X_add_number = 0;
- e.X_add_symbol = unwind.proc_end;
+ e.X_add_symbol = proc_end;
ia64_cons_fix_new (frag_now, where + bytes_per_address,
bytes_per_address, &e);
@@ -4165,48 +4650,71 @@ dot_endp (dummy)
ia64_cons_fix_new (frag_now, where + (bytes_per_address * 2),
bytes_per_address, &e);
}
- else
- md_number_to_chars (ptr + (bytes_per_address * 2), 0,
- bytes_per_address);
-
}
subseg_set (saved_seg, saved_subseg);
- /* Parse names of main and alternate entry points and set symbol sizes. */
+ /* Set symbol sizes. */
+ pending = &unwind.proc_pending;
+ if (S_GET_NAME (pending->sym))
+ {
+ do
+ {
+ symbolS *sym = pending->sym;
+
+ if (!S_IS_DEFINED (sym))
+ as_bad ("`%s' was not defined within procedure", S_GET_NAME (sym));
+ else if (S_GET_SIZE (sym) == 0
+ && symbol_get_obj (sym)->size == NULL)
+ {
+ fragS *frag = symbol_get_frag (sym);
+
+ if (frag)
+ {
+ if (frag == frag_now && SEG_NORMAL (now_seg))
+ S_SET_SIZE (sym, frag_now_fix () - S_GET_VALUE (sym));
+ else
+ {
+ symbol_get_obj (sym)->size =
+ (expressionS *) xmalloc (sizeof (expressionS));
+ symbol_get_obj (sym)->size->X_op = O_subtract;
+ symbol_get_obj (sym)->size->X_add_symbol
+ = symbol_new (FAKE_LABEL_NAME, now_seg,
+ frag_now_fix (), frag_now);
+ symbol_get_obj (sym)->size->X_op_symbol = sym;
+ symbol_get_obj (sym)->size->X_add_number = 0;
+ }
+ }
+ }
+ } while ((pending = pending->next) != NULL);
+ }
+
+ /* Parse names of main and alternate entry points. */
while (1)
{
+ char *name, *p, c;
+
SKIP_WHITESPACE ();
name = input_line_pointer;
c = get_symbol_end ();
p = input_line_pointer;
- sym = symbol_find (name);
- if (sym && unwind.proc_start
- && (symbol_get_bfdsym (sym)->flags & BSF_FUNCTION)
- && S_GET_SIZE (sym) == 0 && symbol_get_obj (sym)->size == NULL)
- {
- fragS *fr = symbol_get_frag (unwind.proc_start);
- fragS *frag = symbol_get_frag (sym);
-
- /* Check whether the function label is at or beyond last
- .proc directive. */
- while (fr && fr != frag)
- fr = fr->fr_next;
- if (fr)
- {
- if (frag == frag_now && SEG_NORMAL (now_seg))
- S_SET_SIZE (sym, frag_now_fix () - S_GET_VALUE (sym));
- else
+ if (!*name)
+ (md.unwind_check == unwind_check_warning
+ ? as_warn
+ : as_bad) ("Empty argument of .endp");
+ else
+ {
+ symbolS *sym = symbol_find (name);
+
+ for (pending = &unwind.proc_pending; pending; pending = pending->next)
+ {
+ if (sym == pending->sym)
{
- symbol_get_obj (sym)->size =
- (expressionS *) xmalloc (sizeof (expressionS));
- symbol_get_obj (sym)->size->X_op = O_subtract;
- symbol_get_obj (sym)->size->X_add_symbol
- = symbol_new (FAKE_LABEL_NAME, now_seg,
- frag_now_fix (), frag_now);
- symbol_get_obj (sym)->size->X_op_symbol = sym;
- symbol_get_obj (sym)->size->X_add_number = 0;
+ pending->sym = NULL;
+ break;
}
}
+ if (!sym || !pending)
+ as_warn ("`%s' was not specified with previous .proc", name);
}
*p = c;
SKIP_WHITESPACE ();
@@ -4215,7 +4723,21 @@ dot_endp (dummy)
++input_line_pointer;
}
demand_empty_rest_of_line ();
- unwind.proc_start = unwind.proc_end = unwind.info = 0;
+
+ /* Deliberately only checking for the main entry point here; the
+ language spec even says all arguments to .endp are ignored. */
+ if (unwind.proc_pending.sym
+ && S_GET_NAME (unwind.proc_pending.sym)
+ && strcmp (S_GET_NAME (unwind.proc_pending.sym), FAKE_LABEL_NAME))
+ as_warn ("`%s' should be an operand to this .endp",
+ S_GET_NAME (unwind.proc_pending.sym));
+ while (unwind.proc_pending.next)
+ {
+ pending = unwind.proc_pending.next;
+ unwind.proc_pending.next = pending->next;
+ free (pending);
+ }
+ unwind.proc_pending.sym = unwind.info = NULL;
}
static void
@@ -4258,7 +4780,8 @@ static void
dot_rot (type)
int type;
{
- unsigned num_regs, num_alloced = 0;
+ offsetT num_regs;
+ valueT num_alloced = 0;
struct dynreg **drpp, *dr;
int ch, base_reg = 0;
char *name, *start;
@@ -4276,6 +4799,7 @@ dot_rot (type)
for (dr = md.dynreg[type]; dr && dr->num_regs; dr = dr->next)
{
hash_delete (md.dynreg_hash, dr->name);
+ /* FIXME: Free dr->name. */
dr->num_regs = 0;
}
@@ -4284,8 +4808,8 @@ dot_rot (type)
{
start = input_line_pointer;
ch = get_symbol_end ();
+ len = strlen (ia64_canonicalize_symbol_name (start));
*input_line_pointer = ch;
- len = (input_line_pointer - start);
SKIP_WHITESPACE ();
if (*input_line_pointer != '[')
@@ -4302,6 +4826,11 @@ dot_rot (type)
as_bad ("Expected ']'");
goto err;
}
+ if (num_regs <= 0)
+ {
+ as_bad ("Number of elements must be positive");
+ goto err;
+ }
SKIP_WHITESPACE ();
num_alloced += num_regs;
@@ -4334,16 +4863,16 @@ dot_rot (type)
break;
}
- name = obstack_alloc (&notes, len + 1);
- memcpy (name, start, len);
- name[len] = '\0';
-
if (!*drpp)
{
*drpp = obstack_alloc (&notes, sizeof (*dr));
memset (*drpp, 0, sizeof (*dr));
}
+ name = obstack_alloc (&notes, len + 1);
+ memcpy (name, start, len);
+ name[len] = '\0';
+
dr = *drpp;
dr->name = name;
dr->num_regs = num_regs;
@@ -4354,6 +4883,7 @@ dot_rot (type)
if (hash_insert (md.dynreg_hash, name, dr))
{
as_bad ("Attempt to redefine register set `%s'", name);
+ obstack_free (&notes, name);
goto err;
}
@@ -4378,8 +4908,7 @@ dot_byteorder (byteorder)
if (byteorder == -1)
{
if (seginfo->tc_segment_info_data.endian == 0)
- seginfo->tc_segment_info_data.endian
- = TARGET_BYTES_BIG_ENDIAN ? 1 : 2;
+ seginfo->tc_segment_info_data.endian = default_big_endian ? 1 : 2;
byteorder = seginfo->tc_segment_info_data.endian == 1;
}
else
@@ -4442,49 +4971,75 @@ dot_ln (dummy)
demand_empty_rest_of_line ();
}
-static char *
-parse_section_name ()
+static void
+cross_section (ref, cons, ua)
+ int ref;
+ void (*cons) PARAMS((int));
+ int ua;
{
- char *name;
- int len;
+ char *start, *end;
+ int saved_auto_align;
+ unsigned int section_count;
SKIP_WHITESPACE ();
- if (*input_line_pointer != '"')
+ start = input_line_pointer;
+ if (*start == '"')
{
- as_bad ("Missing section name");
- ignore_rest_of_line ();
- return 0;
+ int len;
+ char *name;
+
+ name = demand_copy_C_string (&len);
+ obstack_free(&notes, name);
+ if (!name)
+ {
+ ignore_rest_of_line ();
+ return;
+ }
}
- name = demand_copy_C_string (&len);
- if (!name)
+ else
{
- ignore_rest_of_line ();
- return 0;
+ char c = get_symbol_end ();
+
+ if (input_line_pointer == start)
+ {
+ as_bad ("Missing section name");
+ ignore_rest_of_line ();
+ return;
+ }
+ *input_line_pointer = c;
}
+ end = input_line_pointer;
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
as_bad ("Comma expected after section name");
ignore_rest_of_line ();
- return 0;
+ return;
}
- ++input_line_pointer; /* skip comma */
- return name;
+ *end = '\0';
+ end = input_line_pointer + 1; /* skip comma */
+ input_line_pointer = start;
+ md.keep_pending_output = 1;
+ section_count = bfd_count_sections(stdoutput);
+ obj_elf_section (0);
+ if (section_count != bfd_count_sections(stdoutput))
+ as_warn ("Creating sections with .xdataN/.xrealN/.xstringZ is deprecated.");
+ input_line_pointer = end;
+ saved_auto_align = md.auto_align;
+ if (ua)
+ md.auto_align = 0;
+ (*cons) (ref);
+ if (ua)
+ md.auto_align = saved_auto_align;
+ obj_elf_previous (0);
+ md.keep_pending_output = 0;
}
static void
dot_xdata (size)
int size;
{
- char *name = parse_section_name ();
- if (!name)
- return;
-
- md.keep_pending_output = 1;
- set_section (name);
- cons (size);
- obj_elf_previous (0);
- md.keep_pending_output = 0;
+ cross_section (size, cons, 0);
}
/* Why doesn't float_cons() call md_cons_align() the way cons() does? */
@@ -4530,66 +5085,28 @@ static void
dot_xfloat_cons (kind)
int kind;
{
- char *name = parse_section_name ();
- if (!name)
- return;
-
- md.keep_pending_output = 1;
- set_section (name);
- stmt_float_cons (kind);
- obj_elf_previous (0);
- md.keep_pending_output = 0;
+ cross_section (kind, stmt_float_cons, 0);
}
static void
dot_xstringer (zero)
int zero;
{
- char *name = parse_section_name ();
- if (!name)
- return;
-
- md.keep_pending_output = 1;
- set_section (name);
- stringer (zero);
- obj_elf_previous (0);
- md.keep_pending_output = 0;
+ cross_section (zero, stringer, 0);
}
static void
dot_xdata_ua (size)
int size;
{
- int saved_auto_align = md.auto_align;
- char *name = parse_section_name ();
- if (!name)
- return;
-
- md.keep_pending_output = 1;
- set_section (name);
- md.auto_align = 0;
- cons (size);
- md.auto_align = saved_auto_align;
- obj_elf_previous (0);
- md.keep_pending_output = 0;
+ cross_section (size, cons, 1);
}
static void
dot_xfloat_cons_ua (kind)
int kind;
{
- int saved_auto_align = md.auto_align;
- char *name = parse_section_name ();
- if (!name)
- return;
-
- md.keep_pending_output = 1;
- set_section (name);
- md.auto_align = 0;
- stmt_float_cons (kind);
- md.auto_align = saved_auto_align;
- obj_elf_previous (0);
- md.keep_pending_output = 0;
+ cross_section (kind, float_cons, 1);
}
/* .reg.val <regname>,value */
@@ -4600,7 +5117,7 @@ dot_reg_val (dummy)
{
expressionS reg;
- expression (&reg);
+ expression_and_evaluate (&reg);
if (reg.X_op != O_register)
{
as_bad (_("Register name expected"));
@@ -4615,7 +5132,7 @@ dot_reg_val (dummy)
{
valueT value = get_absolute_expression ();
int regno = reg.X_add_number;
- if (regno < REG_GR || regno > REG_GR + 128)
+ if (regno <= REG_GR || regno > REG_GR + 127)
as_warn (_("Register value annotation ignored"));
else
{
@@ -4627,6 +5144,23 @@ dot_reg_val (dummy)
demand_empty_rest_of_line ();
}
+/*
+ .serialize.data
+ .serialize.instruction
+ */
+static void
+dot_serialize (type)
+ int type;
+{
+ insn_group_break (0, 0, 0);
+ if (type)
+ instruction_serialization ();
+ else
+ data_serialization ();
+ insn_group_break (0, 0, 0);
+ demand_empty_rest_of_line ();
+}
+
/* select dv checking mode
.auto
.explicit
@@ -4689,9 +5223,9 @@ print_prmask (mask)
}
/*
- .pred.rel.clear [p1 [,p2 [,...]]] (also .pred.rel "clear")
- .pred.rel.imply p1, p2 (also .pred.rel "imply")
- .pred.rel.mutex p1, p2 [,...] (also .pred.rel "mutex")
+ .pred.rel.clear [p1 [,p2 [,...]]] (also .pred.rel "clear" or @clear)
+ .pred.rel.imply p1, p2 (also .pred.rel "imply" or @imply)
+ .pred.rel.mutex p1, p2 [,...] (also .pred.rel "mutex" or @mutex)
.pred.safe_across_calls p1 [, p2 [,...]]
*/
@@ -4705,28 +5239,43 @@ dot_pred_rel (type)
if (type == 0)
{
- if (*input_line_pointer != '"')
- {
- as_bad (_("Missing predicate relation type"));
- ignore_rest_of_line ();
- return;
- }
- else
+ if (*input_line_pointer == '"')
{
int len;
char *form = demand_copy_C_string (&len);
+
if (strcmp (form, "mutex") == 0)
type = 'm';
else if (strcmp (form, "clear") == 0)
type = 'c';
else if (strcmp (form, "imply") == 0)
type = 'i';
- else
- {
- as_bad (_("Unrecognized predicate relation type"));
- ignore_rest_of_line ();
- return;
- }
+ obstack_free (&notes, form);
+ }
+ else if (*input_line_pointer == '@')
+ {
+ char *form = ++input_line_pointer;
+ char c = get_symbol_end();
+
+ if (strcmp (form, "mutex") == 0)
+ type = 'm';
+ else if (strcmp (form, "clear") == 0)
+ type = 'c';
+ else if (strcmp (form, "imply") == 0)
+ type = 'i';
+ *input_line_pointer = c;
+ }
+ else
+ {
+ as_bad (_("Missing predicate relation type"));
+ ignore_rest_of_line ();
+ return;
+ }
+ if (type == 0)
+ {
+ as_bad (_("Unrecognized predicate relation type"));
+ ignore_rest_of_line ();
+ return;
}
if (*input_line_pointer == ',')
++input_line_pointer;
@@ -4736,59 +5285,57 @@ dot_pred_rel (type)
SKIP_WHITESPACE ();
while (1)
{
- valueT bit = 1;
+ valueT bits = 1;
int regno;
-
- if (TOUPPER (*input_line_pointer) != 'P'
- || (regno = atoi (++input_line_pointer)) < 0
- || regno > 63)
- {
- as_bad (_("Predicate register expected"));
- ignore_rest_of_line ();
- return;
- }
- while (ISDIGIT (*input_line_pointer))
- ++input_line_pointer;
- if (p1 == -1)
- p1 = regno;
- else if (p2 == -1)
- p2 = regno;
- bit <<= regno;
- if (mask & bit)
- as_warn (_("Duplicate predicate register ignored"));
- mask |= bit;
- count++;
- /* See if it's a range. */
- if (*input_line_pointer == '-')
- {
- valueT stop = 1;
- ++input_line_pointer;
-
- if (TOUPPER (*input_line_pointer) != 'P'
- || (regno = atoi (++input_line_pointer)) < 0
- || regno > 63)
- {
- as_bad (_("Predicate register expected"));
- ignore_rest_of_line ();
- return;
- }
- while (ISDIGIT (*input_line_pointer))
- ++input_line_pointer;
- stop <<= regno;
- if (bit >= stop)
+ expressionS pr, *pr1, *pr2;
+
+ expression_and_evaluate (&pr);
+ if (pr.X_op == O_register
+ && pr.X_add_number >= REG_P
+ && pr.X_add_number <= REG_P + 63)
+ {
+ regno = pr.X_add_number - REG_P;
+ bits <<= regno;
+ count++;
+ if (p1 == -1)
+ p1 = regno;
+ else if (p2 == -1)
+ p2 = regno;
+ }
+ else if (type != 'i'
+ && pr.X_op == O_subtract
+ && (pr1 = symbol_get_value_expression (pr.X_add_symbol))
+ && pr1->X_op == O_register
+ && pr1->X_add_number >= REG_P
+ && pr1->X_add_number <= REG_P + 63
+ && (pr2 = symbol_get_value_expression (pr.X_op_symbol))
+ && pr2->X_op == O_register
+ && pr2->X_add_number >= REG_P
+ && pr2->X_add_number <= REG_P + 63)
+ {
+ /* It's a range. */
+ int stop;
+
+ regno = pr1->X_add_number - REG_P;
+ stop = pr2->X_add_number - REG_P;
+ if (regno >= stop)
{
as_bad (_("Bad register range"));
ignore_rest_of_line ();
return;
}
- while (bit < stop)
- {
- bit <<= 1;
- mask |= bit;
- count++;
- }
- SKIP_WHITESPACE ();
+ bits = ((bits << stop) << 1) - (bits << regno);
+ count += stop - regno + 1;
}
+ else
+ {
+ as_bad (_("Predicate register expected"));
+ ignore_rest_of_line ();
+ return;
+ }
+ if (mask & bits)
+ as_warn (_("Duplicate predicate register ignored"));
+ mask |= bits;
if (*input_line_pointer != ',')
break;
++input_line_pointer;
@@ -4908,6 +5455,7 @@ const pseudo_typeS md_pseudo_table[] =
{
{ "radix", dot_radix, 0 },
{ "lcomm", s_lcomm_bytes, 1 },
+ { "loc", dot_loc, 0 },
{ "bss", dot_special_section, SPECIAL_SECTION_BSS },
{ "sbss", dot_special_section, SPECIAL_SECTION_SBSS },
{ "sdata", dot_special_section, SPECIAL_SECTION_SDATA },
@@ -4925,11 +5473,11 @@ const pseudo_typeS md_pseudo_table[] =
{ "fframe", dot_fframe, 0 },
{ "vframe", dot_vframe, 0 },
{ "vframesp", dot_vframesp, 0 },
- { "vframepsp", dot_vframepsp, 0 },
+ { "vframepsp", dot_vframesp, 1 },
{ "save", dot_save, 0 },
{ "restore", dot_restore, 0 },
{ "restorereg", dot_restorereg, 0 },
- { "restorereg.p", dot_restorereg_p, 0 },
+ { "restorereg.p", dot_restorereg, 1 },
{ "handlerdata", dot_handlerdata, 0 },
{ "unwentry", dot_unwentry, 0 },
{ "altrp", dot_altrp, 0 },
@@ -4943,16 +5491,13 @@ const pseudo_typeS md_pseudo_table[] =
{ "spillreg", dot_spillreg, 0 },
{ "spillsp", dot_spillmem, 0 },
{ "spillpsp", dot_spillmem, 1 },
- { "spillreg.p", dot_spillreg_p, 0 },
- { "spillsp.p", dot_spillmem_p, 0 },
- { "spillpsp.p", dot_spillmem_p, 1 },
+ { "spillreg.p", dot_spillreg, 1 },
+ { "spillsp.p", dot_spillmem, ~0 },
+ { "spillpsp.p", dot_spillmem, ~1 },
{ "label_state", dot_label_state, 0 },
{ "copy_state", dot_copy_state, 0 },
{ "unwabi", dot_unwabi, 0 },
{ "personality", dot_personality, 0 },
-#if 0
- { "estate", dot_estate, 0 },
-#endif
{ "mii", dot_template, 0x0 },
{ "mli", dot_template, 0x2 }, /* old format, for compatibility */
{ "mlx", dot_template, 0x2 },
@@ -4964,10 +5509,6 @@ const pseudo_typeS md_pseudo_table[] =
{ "bbb", dot_template, 0xb },
{ "mmb", dot_template, 0xc },
{ "mfb", dot_template, 0xe },
-#if 0
- { "lb", dot_scope, 0 },
- { "le", dot_scope, 1 },
-#endif
{ "align", dot_align, 0 },
{ "regstk", dot_regstk, 0 },
{ "rotr", dot_rot, DYNREG_GR },
@@ -4984,6 +5525,7 @@ const pseudo_typeS md_pseudo_table[] =
{ "xdata2", dot_xdata, 2 },
{ "xdata4", dot_xdata, 4 },
{ "xdata8", dot_xdata, 8 },
+ { "xdata16", dot_xdata, 16 },
{ "xreal4", dot_xfloat_cons, 'f' },
{ "xreal8", dot_xfloat_cons, 'd' },
{ "xreal10", dot_xfloat_cons, 'x' },
@@ -4995,6 +5537,7 @@ const pseudo_typeS md_pseudo_table[] =
{ "xdata2.ua", dot_xdata_ua, 2 },
{ "xdata4.ua", dot_xdata_ua, 4 },
{ "xdata8.ua", dot_xdata_ua, 8 },
+ { "xdata16.ua", dot_xdata_ua, 16 },
{ "xreal4.ua", dot_xfloat_cons_ua, 'f' },
{ "xreal8.ua", dot_xfloat_cons_ua, 'd' },
{ "xreal10.ua", dot_xfloat_cons_ua, 'x' },
@@ -5009,6 +5552,8 @@ const pseudo_typeS md_pseudo_table[] =
{ "pred.rel.mutex", dot_pred_rel, 'm' },
{ "pred.safe_across_calls", dot_pred_rel, 's' },
{ "reg.val", dot_reg_val, 0 },
+ { "serialize.data", dot_serialize, 0 },
+ { "serialize.instruction", dot_serialize, 1 },
{ "auto", dot_dv_mode, 'a' },
{ "explicit", dot_dv_mode, 'e' },
{ "default", dot_dv_mode, 'd' },
@@ -5063,12 +5608,12 @@ pseudo_opcode[] =
static symbolS *
declare_register (name, regnum)
const char *name;
- int regnum;
+ unsigned int regnum;
{
const char *err;
symbolS *sym;
- sym = symbol_new (name, reg_section, regnum, &zero_address_frag);
+ sym = symbol_create (name, reg_section, regnum, &zero_address_frag);
err = hash_insert (md.reg_hash, S_GET_NAME (sym), (PTR) sym);
if (err)
@@ -5081,11 +5626,11 @@ declare_register (name, regnum)
static void
declare_register_set (prefix, num_regs, base_regnum)
const char *prefix;
- int num_regs;
- int base_regnum;
+ unsigned int num_regs;
+ unsigned int base_regnum;
{
char name[8];
- int i;
+ unsigned int i;
for (i = 0; i < num_regs; ++i)
{
@@ -5369,6 +5914,17 @@ operand_match (idesc, index, e)
return OPERAND_MATCH;
break;
+ case IA64_OPND_IMMU5b:
+ if (e->X_op == O_constant)
+ {
+ val = e->X_add_number;
+ if (val >= 32 && val <= 63)
+ return OPERAND_MATCH;
+ else
+ return OPERAND_OUT_OF_RANGE;
+ }
+ break;
+
case IA64_OPND_CCNT5:
case IA64_OPND_CNT5:
case IA64_OPND_CNT6:
@@ -5611,7 +6167,7 @@ operand_match (idesc, index, e)
case O_symbol:
fix = CURR_SLOT.fixup + CURR_SLOT.num_fixups;
/* There are no external relocs for TAG13/TAG13b fields, so we
- create a dummy reloc. This will not live past md_apply_fix3. */
+ create a dummy reloc. This will not live past md_apply_fix. */
fix->code = BFD_RELOC_UNUSED;
fix->code = ia64_gen_real_reloc_type (e->X_op_symbol, fix->code);
fix->opnd = idesc->operands[index];
@@ -5641,27 +6197,19 @@ operand_match (idesc, index, e)
}
static int
-parse_operand (e)
+parse_operand (e, more)
expressionS *e;
+ int more;
{
int sep = '\0';
memset (e, 0, sizeof (*e));
e->X_op = O_absent;
SKIP_WHITESPACE ();
- if (*input_line_pointer != '}')
- expression (e);
- sep = *input_line_pointer++;
-
- if (sep == '}')
- {
- if (!md.manual_bundling)
- as_warn ("Found '}' when manual bundling is off");
- else
- CURR_SLOT.manual_bundling_off = 1;
- md.manual_bundling = 0;
- sep = '\0';
- }
+ expression_and_evaluate (e);
+ sep = *input_line_pointer;
+ if (more && (sep == ',' || sep == more))
+ ++input_line_pointer;
return sep;
}
@@ -5686,6 +6234,8 @@ parse_operands (idesc)
{
int i = 0, highest_unmatched_operand, num_operands = 0, num_outputs = 0;
int error_pos, out_of_range_pos, curr_out_of_range_pos, sep = 0;
+ int reg1, reg2;
+ char reg_class;
enum ia64_opnd expected_operand = IA64_OPND_NIL;
enum operand_match_result result;
char mnemonic[129];
@@ -5695,7 +6245,8 @@ parse_operands (idesc)
assert (strlen (idesc->name) <= 128);
strcpy (mnemonic, idesc->name);
- if (idesc->operands[2] == IA64_OPND_SOF)
+ if (idesc->operands[2] == IA64_OPND_SOF
+ || idesc->operands[1] == IA64_OPND_SOF)
{
/* To make the common idiom "alloc loc?=ar.pfs,0,1,0,0" work, we
can't parse the first operand until we have parsed the
@@ -5713,11 +6264,22 @@ parse_operands (idesc)
++num_outputs;
}
- for (; i < NELEMS (CURR_SLOT.opnd); ++i)
+ for (; ; ++i)
{
- sep = parse_operand (CURR_SLOT.opnd + i);
- if (CURR_SLOT.opnd[i].X_op == O_absent)
- break;
+ if (i < NELEMS (CURR_SLOT.opnd))
+ {
+ sep = parse_operand (CURR_SLOT.opnd + i, '=');
+ if (CURR_SLOT.opnd[i].X_op == O_absent)
+ break;
+ }
+ else
+ {
+ expressionS dummy;
+
+ sep = parse_operand (&dummy, '=');
+ if (dummy.X_op == O_absent)
+ break;
+ }
++num_operands;
@@ -5738,44 +6300,59 @@ parse_operands (idesc)
return 0;
}
- if (idesc->operands[2] == IA64_OPND_SOF)
+ if (idesc->operands[2] == IA64_OPND_SOF
+ || idesc->operands[1] == IA64_OPND_SOF)
{
- /* map alloc r1=ar.pfs,i,l,o,r to alloc r1=ar.pfs,(i+l+o),(i+l),r */
+ /* Map alloc r1=ar.pfs,i,l,o,r to alloc r1=ar.pfs,(i+l+o),(i+l),r.
+ Note, however, that due to that mapping operand numbers in error
+ messages for any of the constant operands will not be correct. */
know (strcmp (idesc->name, "alloc") == 0);
- if (num_operands == 5 /* first_arg not included in this count! */
- && CURR_SLOT.opnd[2].X_op == O_constant
- && CURR_SLOT.opnd[3].X_op == O_constant
- && CURR_SLOT.opnd[4].X_op == O_constant
- && CURR_SLOT.opnd[5].X_op == O_constant)
- {
- sof = set_regstack (CURR_SLOT.opnd[2].X_add_number,
- CURR_SLOT.opnd[3].X_add_number,
- CURR_SLOT.opnd[4].X_add_number,
- CURR_SLOT.opnd[5].X_add_number);
-
- /* now we can parse the first arg: */
- saved_input_pointer = input_line_pointer;
- input_line_pointer = first_arg;
- sep = parse_operand (CURR_SLOT.opnd + 0);
- if (sep != '=')
- --num_outputs; /* force error */
- input_line_pointer = saved_input_pointer;
-
- CURR_SLOT.opnd[2].X_add_number = sof;
- CURR_SLOT.opnd[3].X_add_number
- = sof - CURR_SLOT.opnd[4].X_add_number;
- CURR_SLOT.opnd[4] = CURR_SLOT.opnd[5];
- }
+ /* The first operand hasn't been parsed/initialized, yet (but
+ num_operands intentionally doesn't account for that). */
+ i = num_operands > 4 ? 2 : 1;
+#define FORCE_CONST(n) (CURR_SLOT.opnd[n].X_op == O_constant \
+ ? CURR_SLOT.opnd[n].X_add_number \
+ : 0)
+ sof = set_regstack (FORCE_CONST(i),
+ FORCE_CONST(i + 1),
+ FORCE_CONST(i + 2),
+ FORCE_CONST(i + 3));
+#undef FORCE_CONST
+
+ /* now we can parse the first arg: */
+ saved_input_pointer = input_line_pointer;
+ input_line_pointer = first_arg;
+ sep = parse_operand (CURR_SLOT.opnd + 0, '=');
+ if (sep != '=')
+ --num_outputs; /* force error */
+ input_line_pointer = saved_input_pointer;
+
+ CURR_SLOT.opnd[i].X_add_number = sof;
+ if (CURR_SLOT.opnd[i + 1].X_op == O_constant
+ && CURR_SLOT.opnd[i + 2].X_op == O_constant)
+ CURR_SLOT.opnd[i + 1].X_add_number
+ = sof - CURR_SLOT.opnd[i + 2].X_add_number;
+ else
+ CURR_SLOT.opnd[i + 1].X_op = O_illegal;
+ CURR_SLOT.opnd[i + 2] = CURR_SLOT.opnd[i + 3];
}
- highest_unmatched_operand = 0;
+ highest_unmatched_operand = -4;
curr_out_of_range_pos = -1;
error_pos = 0;
- expected_operand = idesc->operands[0];
for (; idesc; idesc = get_next_opcode (idesc))
{
if (num_outputs != idesc->num_outputs)
continue; /* mismatch in # of outputs */
+ if (highest_unmatched_operand < 0)
+ highest_unmatched_operand |= 1;
+ if (num_operands > NELEMS (idesc->operands)
+ || (num_operands < NELEMS (idesc->operands)
+ && idesc->operands[num_operands])
+ || (num_operands > 0 && !idesc->operands[num_operands - 1]))
+ continue; /* mismatch in number of arguments */
+ if (highest_unmatched_operand < 0)
+ highest_unmatched_operand |= 2;
CURR_SLOT.num_fixups = 0;
@@ -5828,10 +6405,6 @@ parse_operands (idesc)
continue;
}
- if (num_operands < NELEMS (idesc->operands)
- && idesc->operands[num_operands])
- continue; /* mismatch in number of arguments */
-
break;
}
if (!idesc)
@@ -5840,103 +6413,136 @@ parse_operands (idesc)
as_bad ("Operand %u of `%s' should be %s",
error_pos + 1, mnemonic,
elf64_ia64_operands[expected_operand].desc);
+ else if (highest_unmatched_operand < 0 && !(highest_unmatched_operand & 1))
+ as_bad ("Wrong number of output operands");
+ else if (highest_unmatched_operand < 0 && !(highest_unmatched_operand & 2))
+ as_bad ("Wrong number of input operands");
else
as_bad ("Operand mismatch");
return 0;
}
- return idesc;
-}
-
-/* Keep track of state necessary to determine whether a NOP is necessary
- to avoid an erratum in A and B step Itanium chips, and return 1 if we
- detect a case where additional NOPs may be necessary. */
-static int
-errata_nop_necessary_p (slot, insn_unit)
- struct slot *slot;
- enum ia64_unit insn_unit;
-{
- int i;
- struct group *this_group = md.last_groups + md.group_idx;
- struct group *prev_group = md.last_groups + (md.group_idx + 2) % 3;
- struct ia64_opcode *idesc = slot->idesc;
-
- /* Test whether this could be the first insn in a problematic sequence. */
- if (insn_unit == IA64_UNIT_F)
- {
- for (i = 0; i < idesc->num_outputs; i++)
- if (idesc->operands[i] == IA64_OPND_P1
- || idesc->operands[i] == IA64_OPND_P2)
- {
- int regno = slot->opnd[i].X_add_number - REG_P;
- /* Ignore invalid operands; they generate errors elsewhere. */
- if (regno >= 64)
- return 0;
- this_group->p_reg_set[regno] = 1;
- }
- }
- /* Test whether this could be the second insn in a problematic sequence. */
- if (insn_unit == IA64_UNIT_M && slot->qp_regno > 0
- && prev_group->p_reg_set[slot->qp_regno])
+ /* Check that the instruction doesn't use
+ - r0, f0, or f1 as output operands
+ - the same predicate twice as output operands
+ - r0 as address of a base update load or store
+ - the same GR as output and address of a base update load
+ - two even- or two odd-numbered FRs as output operands of a floating
+ point parallel load.
+ At most two (conflicting) output (or output-like) operands can exist,
+ (floating point parallel loads have three outputs, but the base register,
+ if updated, cannot conflict with the actual outputs). */
+ reg2 = reg1 = -1;
+ for (i = 0; i < num_operands; ++i)
{
- for (i = 0; i < idesc->num_outputs; i++)
- if (idesc->operands[i] == IA64_OPND_R1
- || idesc->operands[i] == IA64_OPND_R2
- || idesc->operands[i] == IA64_OPND_R3)
- {
- int regno = slot->opnd[i].X_add_number - REG_GR;
- /* Ignore invalid operands; they generate errors elsewhere. */
- if (regno >= 128)
- return 0;
- if (strncmp (idesc->name, "add", 3) != 0
- && strncmp (idesc->name, "sub", 3) != 0
- && strncmp (idesc->name, "shladd", 6) != 0
- && (idesc->flags & IA64_OPCODE_POSTINC) == 0)
- this_group->g_reg_set_conditionally[regno] = 1;
- }
- }
+ int regno = 0;
- /* Test whether this could be the third insn in a problematic sequence. */
- for (i = 0; i < NELEMS (idesc->operands) && idesc->operands[i]; i++)
- {
- if (/* For fc, ptc, ptr, tak, thash, tpa, ttag, probe, ptr, ptc. */
- idesc->operands[i] == IA64_OPND_R3
- /* For mov indirect. */
- || idesc->operands[i] == IA64_OPND_RR_R3
- || idesc->operands[i] == IA64_OPND_DBR_R3
- || idesc->operands[i] == IA64_OPND_IBR_R3
- || idesc->operands[i] == IA64_OPND_PKR_R3
- || idesc->operands[i] == IA64_OPND_PMC_R3
- || idesc->operands[i] == IA64_OPND_PMD_R3
- || idesc->operands[i] == IA64_OPND_MSR_R3
- || idesc->operands[i] == IA64_OPND_CPUID_R3
- /* For itr. */
- || idesc->operands[i] == IA64_OPND_ITR_R3
- || idesc->operands[i] == IA64_OPND_DTR_R3
- /* Normal memory addresses (load, store, xchg, cmpxchg, etc.). */
- || idesc->operands[i] == IA64_OPND_MR3)
- {
- int regno = slot->opnd[i].X_add_number - REG_GR;
- /* Ignore invalid operands; they generate errors elsewhere. */
- if (regno >= 128)
- return 0;
- if (idesc->operands[i] == IA64_OPND_R3)
- {
- if (strcmp (idesc->name, "fc") != 0
- && strcmp (idesc->name, "tak") != 0
- && strcmp (idesc->name, "thash") != 0
- && strcmp (idesc->name, "tpa") != 0
- && strcmp (idesc->name, "ttag") != 0
- && strncmp (idesc->name, "ptr", 3) != 0
- && strncmp (idesc->name, "ptc", 3) != 0
- && strncmp (idesc->name, "probe", 5) != 0)
- return 0;
- }
- if (prev_group->g_reg_set_conditionally[regno])
- return 1;
+ reg_class = 0;
+ switch (idesc->operands[i])
+ {
+ case IA64_OPND_R1:
+ case IA64_OPND_R2:
+ case IA64_OPND_R3:
+ if (i < num_outputs)
+ {
+ if (CURR_SLOT.opnd[i].X_add_number == REG_GR)
+ reg_class = 'r';
+ else if (reg1 < 0)
+ reg1 = CURR_SLOT.opnd[i].X_add_number;
+ else if (reg2 < 0)
+ reg2 = CURR_SLOT.opnd[i].X_add_number;
+ }
+ break;
+ case IA64_OPND_P1:
+ case IA64_OPND_P2:
+ if (i < num_outputs)
+ {
+ if (reg1 < 0)
+ reg1 = CURR_SLOT.opnd[i].X_add_number;
+ else if (reg2 < 0)
+ reg2 = CURR_SLOT.opnd[i].X_add_number;
+ }
+ break;
+ case IA64_OPND_F1:
+ case IA64_OPND_F2:
+ case IA64_OPND_F3:
+ case IA64_OPND_F4:
+ if (i < num_outputs)
+ {
+ if (CURR_SLOT.opnd[i].X_add_number >= REG_FR
+ && CURR_SLOT.opnd[i].X_add_number <= REG_FR + 1)
+ {
+ reg_class = 'f';
+ regno = CURR_SLOT.opnd[i].X_add_number - REG_FR;
+ }
+ else if (reg1 < 0)
+ reg1 = CURR_SLOT.opnd[i].X_add_number;
+ else if (reg2 < 0)
+ reg2 = CURR_SLOT.opnd[i].X_add_number;
+ }
+ break;
+ case IA64_OPND_MR3:
+ if (idesc->flags & IA64_OPCODE_POSTINC)
+ {
+ if (CURR_SLOT.opnd[i].X_add_number == REG_GR)
+ reg_class = 'm';
+ else if (reg1 < 0)
+ reg1 = CURR_SLOT.opnd[i].X_add_number;
+ else if (reg2 < 0)
+ reg2 = CURR_SLOT.opnd[i].X_add_number;
+ }
+ break;
+ default:
+ break;
+ }
+ switch (reg_class)
+ {
+ case 0:
+ break;
+ default:
+ as_warn ("Invalid use of `%c%d' as output operand", reg_class, regno);
+ break;
+ case 'm':
+ as_warn ("Invalid use of `r%d' as base update address operand", regno);
+ break;
}
}
- return 0;
+ if (reg1 == reg2)
+ {
+ if (reg1 >= REG_GR && reg1 <= REG_GR + 127)
+ {
+ reg1 -= REG_GR;
+ reg_class = 'r';
+ }
+ else if (reg1 >= REG_P && reg1 <= REG_P + 63)
+ {
+ reg1 -= REG_P;
+ reg_class = 'p';
+ }
+ else if (reg1 >= REG_FR && reg1 <= REG_FR + 127)
+ {
+ reg1 -= REG_FR;
+ reg_class = 'f';
+ }
+ else
+ reg_class = 0;
+ if (reg_class)
+ as_warn ("Invalid duplicate use of `%c%d'", reg_class, reg1);
+ }
+ else if (((reg1 >= REG_FR && reg1 <= REG_FR + 31
+ && reg2 >= REG_FR && reg2 <= REG_FR + 31)
+ || (reg1 >= REG_FR + 32 && reg1 <= REG_FR + 127
+ && reg2 >= REG_FR + 32 && reg2 <= REG_FR + 127))
+ && ! ((reg1 ^ reg2) & 1))
+ as_warn ("Invalid simultaneous use of `f%d' and `f%d'",
+ reg1 - REG_FR, reg2 - REG_FR);
+ else if ((reg1 >= REG_FR && reg1 <= REG_FR + 31
+ && reg2 >= REG_FR + 32 && reg2 <= REG_FR + 127)
+ || (reg1 >= REG_FR + 32 && reg1 <= REG_FR + 127
+ && reg2 >= REG_FR && reg2 <= REG_FR + 31))
+ as_warn ("Dangerous simultaneous use of `f%d' and `f%d'",
+ reg1 - REG_FR, reg2 - REG_FR);
+ return idesc;
}
static void
@@ -5946,7 +6552,8 @@ build_insn (slot, insnp)
{
const struct ia64_operand *odesc, *o2desc;
struct ia64_opcode *idesc = slot->idesc;
- bfd_signed_vma insn, val;
+ bfd_vma insn;
+ bfd_signed_vma val;
const char *err;
int i;
@@ -6066,22 +6673,22 @@ build_insn (slot, insnp)
static void
emit_one_bundle ()
{
- unsigned int manual_bundling_on = 0, manual_bundling_off = 0;
- unsigned int manual_bundling = 0;
+ int manual_bundling_off = 0, manual_bundling = 0;
enum ia64_unit required_unit, insn_unit = 0;
enum ia64_insn_type type[3], insn_type;
unsigned int template, orig_template;
bfd_vma insn[3] = { -1, -1, -1 };
struct ia64_opcode *idesc;
int end_of_insn_group = 0, user_template = -1;
- int n, i, j, first, curr;
- unw_rec_list *ptr, *last_ptr, *end_ptr;
+ int n, i, j, first, curr, last_slot;
bfd_vma t0 = 0, t1 = 0;
struct label_fix *lfix;
+ bfd_boolean mark_label;
struct insn_fix *ifix;
char mnemonic[16];
fixS *fix;
char *f;
+ int addr_mod;
first = (md.curr_slot + NUM_SLOTS - md.num_slots_in_use) % NUM_SLOTS;
know (first >= 0 & first < NUM_SLOTS);
@@ -6113,14 +6720,25 @@ emit_one_bundle ()
f = frag_more (16);
+ /* Check to see if this bundle is at an offset that is a multiple of 16-bytes
+ from the start of the frag. */
+ addr_mod = frag_now_fix () & 15;
+ if (frag_now->has_code && frag_now->insn_addr != addr_mod)
+ as_bad (_("instruction address is not a multiple of 16"));
+ frag_now->insn_addr = addr_mod;
+ frag_now->has_code = 1;
+
/* now fill in slots with as many insns as possible: */
curr = first;
idesc = md.slot[curr].idesc;
end_of_insn_group = 0;
+ last_slot = -1;
for (i = 0; i < 3 && md.num_slots_in_use > 0; ++i)
{
/* If we have unwind records, we may need to update some now. */
- ptr = md.slot[curr].unwind_record;
+ unw_rec_list *ptr = md.slot[curr].unwind_record;
+ unw_rec_list *end_ptr = NULL;
+
if (ptr)
{
/* Find the last prologue/body record in the list for the current
@@ -6130,9 +6748,11 @@ emit_one_bundle ()
issued. This matters because there may have been nops emitted
meanwhile. Any non-prologue non-body record followed by a
prologue/body record must also refer to the current point. */
- last_ptr = NULL;
- end_ptr = md.slot[(curr + 1) % NUM_SLOTS].unwind_record;
- for (; ptr != end_ptr; ptr = ptr->next)
+ unw_rec_list *last_ptr;
+
+ for (j = 1; end_ptr == NULL && j < md.num_slots_in_use; ++j)
+ end_ptr = md.slot[(curr + j) % NUM_SLOTS].unwind_record;
+ for (last_ptr = NULL; ptr != end_ptr; ptr = ptr->next)
if (ptr->r.type == prologue || ptr->r.type == prologue_gr
|| ptr->r.type == body)
last_ptr = ptr;
@@ -6153,13 +6773,30 @@ emit_one_bundle ()
}
}
- if (idesc->flags & IA64_OPCODE_SLOT2)
+ manual_bundling_off = md.slot[curr].manual_bundling_off;
+ if (md.slot[curr].manual_bundling_on)
{
- if (manual_bundling && i != 2)
- as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
- "`%s' must be last in bundle", idesc->name);
+ if (curr == first)
+ manual_bundling = 1;
else
- i = 2;
+ break; /* Need to start a new bundle. */
+ }
+
+ /* If this instruction specifies a template, then it must be the first
+ instruction of a bundle. */
+ if (curr != first && md.slot[curr].user_template >= 0)
+ break;
+
+ if (idesc->flags & IA64_OPCODE_SLOT2)
+ {
+ if (manual_bundling && !manual_bundling_off)
+ {
+ as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
+ "`%s' must be last in bundle", idesc->name);
+ if (i < 2)
+ manual_bundling = -1; /* Suppress meaningless post-loop errors. */
+ }
+ i = 2;
}
if (idesc->flags & IA64_OPCODE_LAST)
{
@@ -6192,10 +6829,19 @@ emit_one_bundle ()
required_slot = i;
break;
}
- if (manual_bundling && i != required_slot)
- as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
- "`%s' must be last in instruction group",
- idesc->name);
+ if (manual_bundling
+ && (i > required_slot
+ || (required_slot == 2 && !manual_bundling_off)
+ || (user_template >= 0
+ /* Changing from MMI to M;MI is OK. */
+ && (template ^ required_template) > 1)))
+ {
+ as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
+ "`%s' must be last in instruction group",
+ idesc->name);
+ if (i < 2 && required_slot == 2 && !manual_bundling_off)
+ manual_bundling = -1; /* Suppress meaningless post-loop errors. */
+ }
if (required_slot < i)
/* Can't fit this instruction. */
break;
@@ -6209,29 +6855,25 @@ emit_one_bundle ()
changing NOPs in front of this slot. */
for (j = i; j < 3; ++j)
insn[j] = nop[ia64_templ_desc[required_template].exec_unit[j]];
+
+ /* We just picked a template that includes the stop bit in the
+ middle, so we don't need another one emitted later. */
+ md.slot[curr].end_of_insn_group = 0;
}
template = required_template;
}
if (curr != first && md.slot[curr].label_fixups)
{
- if (manual_bundling_on)
- as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
+ if (manual_bundling)
+ {
+ as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
"Label must be first in a bundle");
+ manual_bundling = -1; /* Suppress meaningless post-loop errors. */
+ }
/* This insn must go into the first slot of a bundle. */
break;
}
- manual_bundling_on = md.slot[curr].manual_bundling_on;
- manual_bundling_off = md.slot[curr].manual_bundling_off;
-
- if (manual_bundling_on)
- {
- if (curr == first)
- manual_bundling = 1;
- else
- break; /* need to start a new bundle */
- }
-
if (end_of_insn_group && md.num_slots_in_use >= 1)
{
/* We need an instruction group boundary in the middle of a
@@ -6259,12 +6901,17 @@ emit_one_bundle ()
reason we have to check for this is that otherwise we
may end up generating "MI;;I M.." which has the deadly
effect that the second M instruction is no longer the
- first in the bundle! --davidm 99/12/16 */
+ first in the group! --davidm 99/12/16 */
&& (idesc->flags & IA64_OPCODE_FIRST) == 0)
{
template = 1;
end_of_insn_group = 0;
}
+ else if (i == 1
+ && user_template == 0
+ && !(idesc->flags & IA64_OPCODE_FIRST))
+ /* Use the next slot. */
+ continue;
else if (curr != first)
/* can't fit this insn */
break;
@@ -6282,25 +6929,62 @@ emit_one_bundle ()
/* resolve dynamic opcodes such as "break", "hint", and "nop": */
if (idesc->type == IA64_TYPE_DYN)
{
+ enum ia64_opnd opnd1, opnd2;
+
if ((strcmp (idesc->name, "nop") == 0)
- || (strcmp (idesc->name, "hint") == 0)
|| (strcmp (idesc->name, "break") == 0))
insn_unit = required_unit;
- else if (strcmp (idesc->name, "chk.s") == 0)
+ else if (strcmp (idesc->name, "hint") == 0)
+ {
+ insn_unit = required_unit;
+ if (required_unit == IA64_UNIT_B)
+ {
+ switch (md.hint_b)
+ {
+ case hint_b_ok:
+ break;
+ case hint_b_warning:
+ as_warn ("hint in B unit may be treated as nop");
+ break;
+ case hint_b_error:
+ /* When manual bundling is off and there is no
+ user template, we choose a different unit so
+ that hint won't go into the current slot. We
+ will fill the current bundle with nops and
+ try to put hint into the next bundle. */
+ if (!manual_bundling && user_template < 0)
+ insn_unit = IA64_UNIT_I;
+ else
+ as_bad ("hint in B unit can't be used");
+ break;
+ }
+ }
+ }
+ else if (strcmp (idesc->name, "chk.s") == 0
+ || strcmp (idesc->name, "mov") == 0)
{
insn_unit = IA64_UNIT_M;
- if (required_unit == IA64_UNIT_I)
+ if (required_unit == IA64_UNIT_I
+ || (required_unit == IA64_UNIT_F && template == 6))
insn_unit = IA64_UNIT_I;
}
else
as_fatal ("emit_one_bundle: unexpected dynamic op");
- sprintf (mnemonic, "%s.%c", idesc->name, "?imbf??"[insn_unit]);
+ sprintf (mnemonic, "%s.%c", idesc->name, "?imbfxx"[insn_unit]);
+ opnd1 = idesc->operands[0];
+ opnd2 = idesc->operands[1];
ia64_free_opcode (idesc);
- md.slot[curr].idesc = idesc = ia64_find_opcode (mnemonic);
-#if 0
- know (!idesc->next); /* no resolved dynamic ops have collisions */
-#endif
+ idesc = ia64_find_opcode (mnemonic);
+ /* moves to/from ARs have collisions */
+ if (opnd1 == IA64_OPND_AR3 || opnd2 == IA64_OPND_AR3)
+ {
+ while (idesc != NULL
+ && (idesc->operands[0] != opnd1
+ || idesc->operands[1] != opnd2))
+ idesc = get_next_opcode (idesc);
+ }
+ md.slot[curr].idesc = idesc;
}
else
{
@@ -6322,37 +7006,34 @@ emit_one_bundle ()
}
if (insn_unit != required_unit)
+ continue; /* Try next slot. */
+
+ /* Now is a good time to fix up the labels for this insn. */
+ mark_label = FALSE;
+ for (lfix = md.slot[curr].label_fixups; lfix; lfix = lfix->next)
{
- if (required_unit == IA64_UNIT_L
- && insn_unit == IA64_UNIT_I
- && !(idesc->flags & IA64_OPCODE_X_IN_MLX))
- {
- /* we got ourselves an MLX template but the current
- instruction isn't an X-unit, or an I-unit instruction
- that can go into the X slot of an MLX template. Duh. */
- if (md.num_slots_in_use >= NUM_SLOTS)
- {
- as_bad_where (md.slot[curr].src_file,
- md.slot[curr].src_line,
- "`%s' can't go in X slot of "
- "MLX template", idesc->name);
- /* drop this insn so we don't livelock: */
- --md.num_slots_in_use;
- }
- break;
- }
- continue; /* try next slot */
+ S_SET_VALUE (lfix->sym, frag_now_fix () - 16);
+ symbol_set_frag (lfix->sym, frag_now);
+ mark_label |= lfix->dw2_mark_labels;
+ }
+ for (lfix = md.slot[curr].tag_fixups; lfix; lfix = lfix->next)
+ {
+ S_SET_VALUE (lfix->sym, frag_now_fix () - 16 + i);
+ symbol_set_frag (lfix->sym, frag_now);
}
- {
- bfd_vma addr;
+ if (debug_type == DEBUG_DWARF2
+ || md.slot[curr].loc_directive_seen
+ || mark_label)
+ {
+ bfd_vma addr = frag_now->fr_address + frag_now_fix () - 16 + i;
- addr = frag_now->fr_address + frag_now_fix () - 16 + i;
- dwarf2_gen_line_info (addr, &md.slot[curr].debug_line);
- }
+ md.slot[curr].loc_directive_seen = 0;
+ if (mark_label)
+ md.slot[curr].debug_line.flags |= DWARF2_FLAG_BASIC_BLOCK;
- if (errata_nop_necessary_p (md.slot + curr, insn_unit))
- as_warn (_("Additional NOP may be necessary to workaround Itanium processor A/B step errata"));
+ dwarf2_gen_line_info (addr, &md.slot[curr].debug_line);
+ }
build_insn (md.slot + curr, insn + i);
@@ -6362,7 +7043,6 @@ emit_one_bundle ()
/* Set slot numbers for all remaining unwind records belonging to the
current insn. There can not be any prologue/body unwind records
here. */
- end_ptr = md.slot[(curr + 1) % NUM_SLOTS].unwind_record;
for (; ptr != end_ptr; ptr = ptr->next)
{
ptr->slot_number = (unsigned long) f + i;
@@ -6378,19 +7058,7 @@ emit_one_bundle ()
++i;
}
--md.num_slots_in_use;
-
- /* now is a good time to fix up the labels for this insn: */
- for (lfix = md.slot[curr].label_fixups; lfix; lfix = lfix->next)
- {
- S_SET_VALUE (lfix->sym, frag_now_fix () - 16);
- symbol_set_frag (lfix->sym, frag_now);
- }
- /* and fix up the tags also. */
- for (lfix = md.slot[curr].tag_fixups; lfix; lfix = lfix->next)
- {
- S_SET_VALUE (lfix->sym, frag_now_fix () - 16 + i);
- symbol_set_frag (lfix->sym, frag_now);
- }
+ last_slot = i;
for (j = 0; j < md.slot[curr].num_fixups; ++j)
{
@@ -6405,12 +7073,6 @@ emit_one_bundle ()
end_of_insn_group = md.slot[curr].end_of_insn_group;
- if (end_of_insn_group)
- {
- md.group_idx = (md.group_idx + 1) % 3;
- memset (md.last_groups + md.group_idx, 0, sizeof md.last_groups[0]);
- }
-
/* clear slot: */
ia64_free_opcode (md.slot[curr].idesc);
memset (md.slot + curr, 0, sizeof (md.slot[curr]));
@@ -6424,16 +7086,48 @@ emit_one_bundle ()
curr = (curr + 1) % NUM_SLOTS;
idesc = md.slot[curr].idesc;
}
- if (manual_bundling)
+
+ /* A user template was specified, but the first following instruction did
+ not fit. This can happen with or without manual bundling. */
+ if (md.num_slots_in_use > 0 && last_slot < 0)
+ {
+ as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
+ "`%s' does not fit into %s template",
+ idesc->name, ia64_templ_desc[template].name);
+ /* Drop first insn so we don't livelock. */
+ --md.num_slots_in_use;
+ know (curr == first);
+ ia64_free_opcode (md.slot[curr].idesc);
+ memset (md.slot + curr, 0, sizeof (md.slot[curr]));
+ md.slot[curr].user_template = -1;
+ }
+ else if (manual_bundling > 0)
{
if (md.num_slots_in_use > 0)
- as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
- "`%s' does not fit into %s template",
- idesc->name, ia64_templ_desc[template].name);
+ {
+ if (last_slot >= 2)
+ as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
+ "`%s' does not fit into bundle", idesc->name);
+ else
+ {
+ const char *where;
+
+ if (template == 2)
+ where = "X slot";
+ else if (last_slot == 0)
+ where = "slots 2 or 3";
+ else
+ where = "slot 3";
+ as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
+ "`%s' can't go in %s of %s template",
+ idesc->name, where, ia64_templ_desc[template].name);
+ }
+ }
else
as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
"Missing '}' at end of file");
}
+
know (md.num_slots_in_use < NUM_SLOTS);
t0 = end_of_insn_group | (template << 1) | (insn[0] << 5) | (insn[1] << 46);
@@ -6441,12 +7135,6 @@ emit_one_bundle ()
number_to_chars_littleendian (f + 0, t0, 8);
number_to_chars_littleendian (f + 8, t1, 8);
-
- if (unwind.list)
- {
- unwind.list->next_slot_number = (unsigned long) f + 16;
- unwind.list->next_slot_frag = frag_now;
- }
}
int
@@ -6472,10 +7160,44 @@ md_parse_option (c, arg)
else if (strcmp (arg, "le") == 0)
{
md.flags &= ~EF_IA_64_BE;
+ default_big_endian = 0;
}
else if (strcmp (arg, "be") == 0)
{
md.flags |= EF_IA_64_BE;
+ default_big_endian = 1;
+ }
+ else if (strncmp (arg, "unwind-check=", 13) == 0)
+ {
+ arg += 13;
+ if (strcmp (arg, "warning") == 0)
+ md.unwind_check = unwind_check_warning;
+ else if (strcmp (arg, "error") == 0)
+ md.unwind_check = unwind_check_error;
+ else
+ return 0;
+ }
+ else if (strncmp (arg, "hint.b=", 7) == 0)
+ {
+ arg += 7;
+ if (strcmp (arg, "ok") == 0)
+ md.hint_b = hint_b_ok;
+ else if (strcmp (arg, "warning") == 0)
+ md.hint_b = hint_b_warning;
+ else if (strcmp (arg, "error") == 0)
+ md.hint_b = hint_b_error;
+ else
+ return 0;
+ }
+ else if (strncmp (arg, "tune=", 5) == 0)
+ {
+ arg += 5;
+ if (strcmp (arg, "itanium1") == 0)
+ md.tune = itanium1;
+ else if (strcmp (arg, "itanium2") == 0)
+ md.tune = itanium2;
+ else
+ return 0;
}
else
return 0;
@@ -6532,6 +7254,10 @@ md_parse_option (c, arg)
{
md.default_explicit_mode = 0;
}
+ else if (strcmp (arg, "none") == 0)
+ {
+ md.detect_dv = 0;
+ }
else if (strcmp (arg, "debug") == 0)
{
md.debug_dv = 1;
@@ -6541,6 +7267,11 @@ md_parse_option (c, arg)
md.default_explicit_mode = 1;
md.debug_dv = 1;
}
+ else if (strcmp (arg, "debugn") == 0)
+ {
+ md.debug_dv = 1;
+ md.detect_dv = 0;
+ }
else
{
as_bad (_("Unrecognized option '-x%s'"), arg);
@@ -6580,9 +7311,20 @@ IA-64 options:\n\
EF_IA_64_NOFUNCDESC_CONS_GP)\n\
-milp32|-milp64|-mlp64|-mp64 select data model (default -mlp64)\n\
-mle | -mbe select little- or big-endian byte order (default -mle)\n\
- -x | -xexplicit turn on dependency violation checking (default)\n\
- -xauto automagically remove dependency violations\n\
- -xdebug debug dependency violation checker\n"),
+ -mtune=[itanium1|itanium2]\n\
+ tune for a specific CPU (default -mtune=itanium2)\n\
+ -munwind-check=[warning|error]\n\
+ unwind directive check (default -munwind-check=warning)\n\
+ -mhint.b=[ok|warning|error]\n\
+ hint.b check (default -mhint.b=error)\n\
+ -x | -xexplicit turn on dependency violation checking\n\
+ -xauto automagically remove dependency violations (default)\n\
+ -xnone turn off dependency violation checking\n\
+ -xdebug debug dependency violation checker\n\
+ -xdebugn debug dependency violation checker but turn off\n\
+ dependency violation checking\n\
+ -xdebugx debug dependency violation checker and turn on\n\
+ dependency violation checking\n"),
stream);
}
@@ -6618,17 +7360,37 @@ match (int templ, int type, int slot)
return result;
}
-/* Add a bit of extra goodness if a nop of type F or B would fit
- in TEMPL at SLOT. */
+/* For Itanium 1, add a bit of extra goodness if a nop of type F or B would fit
+ in TEMPL at SLOT. For Itanium 2, add a bit of extra goodness if a nop of
+ type M or I would fit in TEMPL at SLOT. */
static inline int
extra_goodness (int templ, int slot)
{
- if (slot == 1 && match (templ, IA64_TYPE_F, slot))
- return 2;
- if (slot == 2 && match (templ, IA64_TYPE_B, slot))
- return 1;
- return 0;
+ switch (md.tune)
+ {
+ case itanium1:
+ if (slot == 1 && match (templ, IA64_TYPE_F, slot))
+ return 2;
+ else if (slot == 2 && match (templ, IA64_TYPE_B, slot))
+ return 1;
+ else
+ return 0;
+ break;
+ case itanium2:
+ if (match (templ, IA64_TYPE_M, slot)
+ || match (templ, IA64_TYPE_I, slot))
+ /* Favor M- and I-unit NOPs. We definitely want to avoid
+ F-unit and B-unit may cause split-issue or less-than-optimal
+ branch-prediction. */
+ return 2;
+ else
+ return 0;
+ break;
+ default:
+ abort ();
+ return 0;
+ }
}
/* This function is called once, at assembler startup time. It sets
@@ -6637,7 +7399,7 @@ extra_goodness (int templ, int slot)
void
md_begin ()
{
- int i, j, k, t, total, ar_base, cr_base, goodness, best, regnum, ok;
+ int i, j, k, t, goodness, best, ok;
const char *err;
char name[8];
@@ -6648,7 +7410,7 @@ md_begin ()
/* Make sure function pointers get initialized. */
target_big_endian = -1;
- dot_byteorder (TARGET_BYTES_BIG_ENDIAN);
+ dot_byteorder (default_big_endian);
alias_hash = hash_new ();
alias_name_hash = hash_new ();
@@ -6723,11 +7485,17 @@ md_begin ()
symbol_new (".<iplt>", undefined_section, FUNC_IPLT_RELOC,
&zero_address_frag);
+ if (md.tune != itanium1)
+ {
+ /* Convert MFI NOPs bundles into MMI NOPs bundles. */
+ le_nop[0] = 0x8;
+ le_nop_stop[0] = 0x9;
+ }
+
/* Compute the table of best templates. We compute goodness as a
- base 4 value, in which each match counts for 3, each F counts
- for 2, each B counts for 1. This should maximize the number of
- F and B nops in the chosen bundles, which is good because these
- pipelines are least likely to be overcommitted. */
+ base 4 value, in which each match counts for 3. Match-failures
+ result in NOPs and we use extra_goodness() to pick the execution
+ units that are best suited for issuing the NOP. */
for (i = 0; i < IA64_NUM_TYPES; ++i)
for (j = 0; j < IA64_NUM_TYPES; ++j)
for (k = 0; k < IA64_NUM_TYPES; ++k)
@@ -6740,7 +7508,7 @@ md_begin ()
{
if (match (t, j, 1))
{
- if (match (t, k, 2))
+ if ((t == 2 && j == IA64_TYPE_X) || match (t, k, 2))
goodness = 3 + 3 + 3;
else
goodness = 3 + 3 + extra_goodness (t, 2);
@@ -6756,7 +7524,7 @@ md_begin ()
}
else if (match (t, i, 1))
{
- if (match (t, j, 2))
+ if ((t == 2 && i == IA64_TYPE_X) || match (t, j, 2))
goodness = 3 + 3;
else
goodness = 3 + extra_goodness (t, 2);
@@ -6772,6 +7540,21 @@ md_begin ()
}
}
+#ifdef DEBUG_TEMPLATES
+ /* For debugging changes to the best_template calculations. We don't care
+ about combinations with invalid instructions, so start the loops at 1. */
+ for (i = 0; i < IA64_NUM_TYPES; ++i)
+ for (j = 0; j < IA64_NUM_TYPES; ++j)
+ for (k = 0; k < IA64_NUM_TYPES; ++k)
+ {
+ char type_letter[IA64_NUM_TYPES] = { 'n', 'a', 'i', 'm', 'b', 'f',
+ 'x', 'd' };
+ fprintf (stderr, "%c%c%c %s\n", type_letter[i], type_letter[j],
+ type_letter[k],
+ ia64_templ_desc[best_template[i][j][k]].name);
+ }
+#endif
+
for (i = 0; i < NUM_SLOTS; ++i)
md.slot[i].user_template = -1;
@@ -6791,91 +7574,52 @@ md_begin ()
md.entry_hash = hash_new ();
/* general registers: */
-
- total = 128;
- for (i = 0; i < total; ++i)
- {
- sprintf (name, "r%d", i - REG_GR);
- md.regsym[i] = declare_register (name, i);
- }
+ declare_register_set ("r", 128, REG_GR);
+ declare_register ("gp", REG_GR + 1);
+ declare_register ("sp", REG_GR + 12);
+ declare_register ("tp", REG_GR + 13);
+ declare_register_set ("ret", 4, REG_GR + 8);
/* floating point registers: */
- total += 128;
- for (; i < total; ++i)
- {
- sprintf (name, "f%d", i - REG_FR);
- md.regsym[i] = declare_register (name, i);
- }
-
- /* application registers: */
- total += 128;
- ar_base = i;
- for (; i < total; ++i)
- {
- sprintf (name, "ar%d", i - REG_AR);
- md.regsym[i] = declare_register (name, i);
- }
+ declare_register_set ("f", 128, REG_FR);
+ declare_register_set ("farg", 8, REG_FR + 8);
+ declare_register_set ("fret", 8, REG_FR + 8);
- /* control registers: */
- total += 128;
- cr_base = i;
- for (; i < total; ++i)
- {
- sprintf (name, "cr%d", i - REG_CR);
- md.regsym[i] = declare_register (name, i);
- }
+ /* branch registers: */
+ declare_register_set ("b", 8, REG_BR);
+ declare_register ("rp", REG_BR + 0);
/* predicate registers: */
- total += 64;
- for (; i < total; ++i)
- {
- sprintf (name, "p%d", i - REG_P);
- md.regsym[i] = declare_register (name, i);
- }
+ declare_register_set ("p", 64, REG_P);
+ declare_register ("pr", REG_PR);
+ declare_register ("pr.rot", REG_PR_ROT);
- /* branch registers: */
- total += 8;
- for (; i < total; ++i)
- {
- sprintf (name, "b%d", i - REG_BR);
- md.regsym[i] = declare_register (name, i);
- }
+ /* application registers: */
+ declare_register_set ("ar", 128, REG_AR);
+ for (i = 0; i < NELEMS (ar); ++i)
+ declare_register (ar[i].name, REG_AR + ar[i].regnum);
+
+ /* control registers: */
+ declare_register_set ("cr", 128, REG_CR);
+ for (i = 0; i < NELEMS (cr); ++i)
+ declare_register (cr[i].name, REG_CR + cr[i].regnum);
- md.regsym[REG_IP] = declare_register ("ip", REG_IP);
- md.regsym[REG_CFM] = declare_register ("cfm", REG_CFM);
- md.regsym[REG_PR] = declare_register ("pr", REG_PR);
- md.regsym[REG_PR_ROT] = declare_register ("pr.rot", REG_PR_ROT);
- md.regsym[REG_PSR] = declare_register ("psr", REG_PSR);
- md.regsym[REG_PSR_L] = declare_register ("psr.l", REG_PSR_L);
- md.regsym[REG_PSR_UM] = declare_register ("psr.um", REG_PSR_UM);
+ declare_register ("ip", REG_IP);
+ declare_register ("cfm", REG_CFM);
+ declare_register ("psr", REG_PSR);
+ declare_register ("psr.l", REG_PSR_L);
+ declare_register ("psr.um", REG_PSR_UM);
for (i = 0; i < NELEMS (indirect_reg); ++i)
{
- regnum = indirect_reg[i].regnum;
- md.regsym[regnum] = declare_register (indirect_reg[i].name, regnum);
- }
-
- /* define synonyms for application registers: */
- for (i = REG_AR; i < REG_AR + NELEMS (ar); ++i)
- md.regsym[i] = declare_register (ar[i - REG_AR].name,
- REG_AR + ar[i - REG_AR].regnum);
-
- /* define synonyms for control registers: */
- for (i = REG_CR; i < REG_CR + NELEMS (cr); ++i)
- md.regsym[i] = declare_register (cr[i - REG_CR].name,
- REG_CR + cr[i - REG_CR].regnum);
+ unsigned int regnum = indirect_reg[i].regnum;
- declare_register ("gp", REG_GR + 1);
- declare_register ("sp", REG_GR + 12);
- declare_register ("rp", REG_BR + 0);
+ md.indregsym[regnum - IND_CPUID] = declare_register (indirect_reg[i].name, regnum);
+ }
/* pseudo-registers used to specify unwind info: */
declare_register ("psp", REG_PSP);
- declare_register_set ("ret", 4, REG_GR + 8);
- declare_register_set ("farg", 8, REG_FR + 8);
- declare_register_set ("fret", 8, REG_FR + 8);
-
for (i = 0; i < NELEMS (const_bits); ++i)
{
err = hash_insert (md.const_hash, const_bits[i].name,
@@ -6914,10 +7658,9 @@ md_begin ()
md.entry_labels = NULL;
}
-/* Set the elf type to 64 bit ABI by default. Cannot do this in md_begin
- because that is called after md_parse_option which is where we do the
- dynamic changing of md.flags based on -mlp64 or -milp32. Also, set the
- default endianness. */
+/* Set the default options in md. Cannot do this in md_begin because
+ that is called after md_parse_option which is where we set the
+ options in md based on command line options. */
void
ia64_init (argc, argv)
@@ -6925,6 +7668,11 @@ ia64_init (argc, argv)
char **argv ATTRIBUTE_UNUSED;
{
md.flags = MD_FLAGS_DEFAULT;
+ md.detect_dv = 1;
+ /* FIXME: We should change it to unwind_check_error someday. */
+ md.unwind_check = unwind_check_warning;
+ md.hint_b = hint_b_error;
+ md.tune = itanium2;
}
/* Return a string for the target object file format. */
@@ -6990,6 +7738,15 @@ ia64_end_of_source ()
void
ia64_start_line ()
{
+ static int first;
+
+ if (!first) {
+ /* Make sure we don't reference input_line_pointer[-1] when that's
+ not valid. */
+ first = 1;
+ return;
+ }
+
if (md.qp.X_op == O_register)
as_bad ("qualifying predicate not followed by instruction");
md.qp.X_op = O_absent;
@@ -7000,42 +7757,20 @@ ia64_start_line ()
if (input_line_pointer[0] == ';' && input_line_pointer[-1] == ';')
{
if (md.detect_dv && !md.explicit_mode)
- as_warn (_("Explicit stops are ignored in auto mode"));
+ {
+ static int warned;
+
+ if (!warned)
+ {
+ warned = 1;
+ as_warn (_("Explicit stops are ignored in auto mode"));
+ }
+ }
else
insn_group_break (1, 0, 0);
}
-}
-
-/* This is a hook for ia64_frob_label, so that it can distinguish tags from
- labels. */
-static int defining_tag = 0;
-
-int
-ia64_unrecognized_line (ch)
- int ch;
-{
- switch (ch)
+ else if (input_line_pointer[-1] == '{')
{
- case '(':
- expression (&md.qp);
- if (*input_line_pointer++ != ')')
- {
- as_bad ("Expected ')'");
- return 0;
- }
- if (md.qp.X_op != O_register)
- {
- as_bad ("Qualifying predicate expected");
- return 0;
- }
- if (md.qp.X_add_number < REG_P || md.qp.X_add_number >= REG_P + 64)
- {
- as_bad ("Predicate register expected");
- return 0;
- }
- return 1;
-
- case '{':
if (md.manual_bundling)
as_warn ("Found '{' when manual bundling is already turned on");
else
@@ -7052,9 +7787,9 @@ ia64_unrecognized_line (ch)
else
as_warn (_("Found '{' after explicit switch to automatic mode"));
}
- return 1;
-
- case '}':
+ }
+ else if (input_line_pointer[-1] == '}')
+ {
if (!md.manual_bundling)
as_warn ("Found '}' when manual bundling is off");
else
@@ -7067,17 +7802,36 @@ ia64_unrecognized_line (ch)
&& !md.mode_explicitly_set
&& !md.default_explicit_mode)
dot_dv_mode ('A');
+ }
+}
- /* Allow '{' to follow on the same line. We also allow ";;", but that
- happens automatically because ';' is an end of line marker. */
- SKIP_WHITESPACE ();
- if (input_line_pointer[0] == '{')
+/* This is a hook for ia64_frob_label, so that it can distinguish tags from
+ labels. */
+static int defining_tag = 0;
+
+int
+ia64_unrecognized_line (ch)
+ int ch;
+{
+ switch (ch)
+ {
+ case '(':
+ expression_and_evaluate (&md.qp);
+ if (*input_line_pointer++ != ')')
{
- input_line_pointer++;
- return ia64_unrecognized_line ('{');
+ as_bad ("Expected ')'");
+ return 0;
+ }
+ if (md.qp.X_op != O_register)
+ {
+ as_bad ("Qualifying predicate expected");
+ return 0;
+ }
+ if (md.qp.X_add_number < REG_P || md.qp.X_add_number >= REG_P + 64)
+ {
+ as_bad ("Predicate register expected");
+ return 0;
}
-
- demand_empty_rest_of_line ();
return 1;
case '[':
@@ -7162,6 +7916,7 @@ ia64_frob_label (sym)
fix = obstack_alloc (&notes, sizeof (*fix));
fix->sym = sym;
fix->next = CURR_SLOT.tag_fixups;
+ fix->dw2_mark_labels = FALSE;
CURR_SLOT.tag_fixups = fix;
return;
@@ -7173,6 +7928,7 @@ ia64_frob_label (sym)
fix = obstack_alloc (&notes, sizeof (*fix));
fix->sym = sym;
fix->next = CURR_SLOT.label_fixups;
+ fix->dw2_mark_labels = dwarf2_loc_mark_labels;
CURR_SLOT.label_fixups = fix;
/* Keep track of how many code entry points we've seen. */
@@ -7227,52 +7983,148 @@ ia64_optimize_expr (l, op, r)
operatorT op;
expressionS *r;
{
- unsigned num_regs;
-
- if (op == O_index)
+ if (op != O_index)
+ return 0;
+ resolve_expression (l);
+ if (l->X_op == O_register)
{
- if (l->X_op == O_register && r->X_op == O_constant)
+ unsigned num_regs = l->X_add_number >> 16;
+
+ resolve_expression (r);
+ if (num_regs)
{
- num_regs = (l->X_add_number >> 16);
- if ((unsigned) r->X_add_number >= num_regs)
+ /* Left side is a .rotX-allocated register. */
+ if (r->X_op != O_constant)
{
- if (!num_regs)
- as_bad ("No current frame");
- else
- as_bad ("Index out of range 0..%u", num_regs - 1);
+ as_bad ("Rotating register index must be a non-negative constant");
+ r->X_add_number = 0;
+ }
+ else if ((valueT) r->X_add_number >= num_regs)
+ {
+ as_bad ("Index out of range 0..%u", num_regs - 1);
r->X_add_number = 0;
}
l->X_add_number = (l->X_add_number & 0xffff) + r->X_add_number;
return 1;
}
- else if (l->X_op == O_register && r->X_op == O_register)
+ else if (l->X_add_number >= IND_CPUID && l->X_add_number <= IND_RR)
{
- if (l->X_add_number < IND_CPUID || l->X_add_number > IND_RR
- || l->X_add_number == IND_MEM)
+ if (r->X_op != O_register
+ || r->X_add_number < REG_GR
+ || r->X_add_number > REG_GR + 127)
{
- as_bad ("Indirect register set name expected");
- l->X_add_number = IND_CPUID;
+ as_bad ("Indirect register index must be a general register");
+ r->X_add_number = REG_GR;
}
l->X_op = O_index;
- l->X_op_symbol = md.regsym[l->X_add_number];
+ l->X_op_symbol = md.indregsym[l->X_add_number - IND_CPUID];
l->X_add_number = r->X_add_number;
return 1;
}
}
- return 0;
+ as_bad ("Index can only be applied to rotating or indirect registers");
+ /* Fall back to some register use of which has as little as possible
+ side effects, to minimize subsequent error messages. */
+ l->X_op = O_register;
+ l->X_add_number = REG_GR + 3;
+ return 1;
}
int
-ia64_parse_name (name, e)
+ia64_parse_name (name, e, nextcharP)
char *name;
expressionS *e;
+ char *nextcharP;
{
struct const_desc *cdesc;
struct dynreg *dr = 0;
- unsigned int regnum;
+ unsigned int idx;
struct symbol *sym;
char *end;
+ if (*name == '@')
+ {
+ enum pseudo_type pseudo_type = PSEUDO_FUNC_NONE;
+
+ /* Find what relocation pseudo-function we're dealing with. */
+ for (idx = 0; idx < NELEMS (pseudo_func); ++idx)
+ if (pseudo_func[idx].name
+ && pseudo_func[idx].name[0] == name[1]
+ && strcmp (pseudo_func[idx].name + 1, name + 2) == 0)
+ {
+ pseudo_type = pseudo_func[idx].type;
+ break;
+ }
+ switch (pseudo_type)
+ {
+ case PSEUDO_FUNC_RELOC:
+ end = input_line_pointer;
+ if (*nextcharP != '(')
+ {
+ as_bad ("Expected '('");
+ break;
+ }
+ /* Skip '('. */
+ ++input_line_pointer;
+ expression (e);
+ if (*input_line_pointer != ')')
+ {
+ as_bad ("Missing ')'");
+ goto done;
+ }
+ /* Skip ')'. */
+ ++input_line_pointer;
+ if (e->X_op != O_symbol)
+ {
+ if (e->X_op != O_pseudo_fixup)
+ {
+ as_bad ("Not a symbolic expression");
+ goto done;
+ }
+ if (idx != FUNC_LT_RELATIVE)
+ {
+ as_bad ("Illegal combination of relocation functions");
+ goto done;
+ }
+ switch (S_GET_VALUE (e->X_op_symbol))
+ {
+ case FUNC_FPTR_RELATIVE:
+ idx = FUNC_LT_FPTR_RELATIVE; break;
+ case FUNC_DTP_MODULE:
+ idx = FUNC_LT_DTP_MODULE; break;
+ case FUNC_DTP_RELATIVE:
+ idx = FUNC_LT_DTP_RELATIVE; break;
+ case FUNC_TP_RELATIVE:
+ idx = FUNC_LT_TP_RELATIVE; break;
+ default:
+ as_bad ("Illegal combination of relocation functions");
+ goto done;
+ }
+ }
+ /* Make sure gas doesn't get rid of local symbols that are used
+ in relocs. */
+ e->X_op = O_pseudo_fixup;
+ e->X_op_symbol = pseudo_func[idx].u.sym;
+ done:
+ *nextcharP = *input_line_pointer;
+ break;
+
+ case PSEUDO_FUNC_CONST:
+ e->X_op = O_constant;
+ e->X_add_number = pseudo_func[idx].u.ival;
+ break;
+
+ case PSEUDO_FUNC_REG:
+ e->X_op = O_register;
+ e->X_add_number = pseudo_func[idx].u.ival;
+ break;
+
+ default:
+ return 0;
+ }
+ return 1;
+ }
+
/* first see if NAME is a known register name: */
sym = hash_find (md.reg_hash, name);
if (sym)
@@ -7291,13 +8143,14 @@ ia64_parse_name (name, e)
}
/* check for inN, locN, or outN: */
+ idx = 0;
switch (name[0])
{
case 'i':
if (name[1] == 'n' && ISDIGIT (name[2]))
{
dr = &md.in;
- name += 2;
+ idx = 2;
}
break;
@@ -7305,7 +8158,7 @@ ia64_parse_name (name, e)
if (name[1] == 'o' && name[2] == 'c' && ISDIGIT (name[3]))
{
dr = &md.loc;
- name += 3;
+ idx = 3;
}
break;
@@ -7313,7 +8166,7 @@ ia64_parse_name (name, e)
if (name[1] == 'u' && name[2] == 't' && ISDIGIT (name[3]))
{
dr = &md.out;
- name += 3;
+ idx = 3;
}
break;
@@ -7321,13 +8174,16 @@ ia64_parse_name (name, e)
break;
}
- if (dr)
+ /* Ignore register numbers with leading zeroes, except zero itself. */
+ if (dr && (name[idx] != '0' || name[idx + 1] == '\0'))
{
+ unsigned long regnum;
+
/* The name is inN, locN, or outN; parse the register number. */
- regnum = strtoul (name, &end, 10);
- if (end > name && *end == '\0')
+ regnum = strtoul (name + idx, &end, 10);
+ if (end > name + idx && *end == '\0' && regnum < 96)
{
- if ((unsigned) regnum >= dr->num_regs)
+ if (regnum >= dr->num_regs)
{
if (!dr->num_regs)
as_bad ("No current frame");
@@ -7342,6 +8198,9 @@ ia64_parse_name (name, e)
}
}
+ end = alloca (strlen (name) + 1);
+ strcpy (end, name);
+ name = ia64_canonicalize_symbol_name (end);
if ((dr = hash_find (md.dynreg_hash, name)))
{
/* We've got ourselves the name of a rotating register set.
@@ -7361,9 +8220,18 @@ char *
ia64_canonicalize_symbol_name (name)
char *name;
{
- size_t len = strlen (name);
- if (len > 1 && name[len - 1] == '#')
- name[len - 1] = '\0';
+ size_t len = strlen (name), full = len;
+
+ while (len > 0 && name[len - 1] == '#')
+ --len;
+ if (len <= 0)
+ {
+ if (full > 0)
+ as_bad ("Standalone `#' is illegal");
+ }
+ else if (len < full - 1)
+ as_warn ("Redundant `#' suffix operators");
+ name[len] = '\0';
return name;
}
@@ -7474,6 +8342,8 @@ depends_on (depind, idesc)
IC:rse-writers.
15+16) Represents reserved instructions, which the assembler does not
generate.
+ 17) CR[TPR] has a RAW dependency only between mov-to-CR-TPR and
+ mov-to-PSR-l or ssm instructions that set PSR.i, PSR.pp or PSR.up.
Memory resources (i.e. locations in memory) are *not* marked or tracked by
this code; there are no dependency violations based on memory access.
@@ -7509,9 +8379,15 @@ specify_resource (dep, idesc, type, specs, note, path)
tmpl.qp_regno = CURR_SLOT.qp_regno;
tmpl.link_to_qp_branch = 1;
tmpl.mem_offset.hint = 0;
+ tmpl.mem_offset.offset = 0;
+ tmpl.mem_offset.base = 0;
tmpl.specific = 1;
- tmpl.index = 0;
+ tmpl.index = -1;
tmpl.cmp_type = CMP_NONE;
+ tmpl.depind = 0;
+ tmpl.file = NULL;
+ tmpl.line = 0;
+ tmpl.path = 0;
#define UNHANDLED \
as_warn (_("Unhandled dependency %s for %s (%s), note %d"), \
@@ -8556,8 +9432,9 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note)
break;
case IA64_RS_CRX:
- /* Handle all CR[REG] resources */
- if (note == 0 || note == 1)
+ /* Handle all CR[REG] resources.
+ ??? FIXME: The rule 17 isn't really handled correctly. */
+ if (note == 0 || note == 1 || note == 17)
{
if (idesc->operands[!rsrc_write] == IA64_OPND_CR3)
{
@@ -8753,8 +9630,7 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note)
if (idesc->operands[0] == IA64_OPND_AR3
&& CURR_SLOT.opnd[0].X_add_number - REG_AR == AR_BSPSTORE)
{
- specs[count] = tmpl;
- specs[count++].index = 0; /* IA64_RSE_BSPLOAD/RNATBITINDEX */
+ specs[count++] = tmpl;
}
}
else
@@ -9208,6 +10084,7 @@ note_register_values (idesc)
else if (idesc->operands[0] == IA64_OPND_R1
&& (idesc->operands[1] == IA64_OPND_IMM22
|| idesc->operands[1] == IA64_OPND_IMMU64)
+ && CURR_SLOT.opnd[1].X_op == O_constant
&& (strcmp (idesc->name, "mov") == 0
|| strcmp (idesc->name, "movl") == 0))
{
@@ -9225,6 +10102,30 @@ note_register_values (idesc)
}
}
}
+ /* Look for dep.z imm insns. */
+ else if (idesc->operands[0] == IA64_OPND_R1
+ && idesc->operands[1] == IA64_OPND_IMM8
+ && strcmp (idesc->name, "dep.z") == 0)
+ {
+ int regno = CURR_SLOT.opnd[0].X_add_number - REG_GR;
+ if (regno > 0 && regno < NELEMS (gr_values))
+ {
+ valueT value = CURR_SLOT.opnd[1].X_add_number;
+
+ if (CURR_SLOT.opnd[3].X_add_number < 64)
+ value &= ((valueT)1 << CURR_SLOT.opnd[3].X_add_number) - 1;
+ value <<= CURR_SLOT.opnd[2].X_add_number;
+ gr_values[regno].known = 1;
+ gr_values[regno].value = value;
+ gr_values[regno].path = md.path;
+ if (md.debug_dv)
+ {
+ fprintf (stderr, " Know gr%d = ", regno);
+ fprintf_vma (stderr, gr_values[regno].value);
+ fputs ("\n", stderr);
+ }
+ }
+ }
else
{
clear_qp_mutex (qp_changemask);
@@ -9330,10 +10231,6 @@ resources_match (rs, idesc, note, qp_regno, path)
else if (specs[count].index == rs->index)
return 1;
}
-#if 0
- if (md.debug_dv)
- fprintf (stderr, " No %s conflicts\n", rs->dependency->name);
-#endif
return 0;
}
@@ -9449,7 +10346,7 @@ print_dependency (action, depind)
fprintf (stderr, " %s %s '%s'",
action, dv_mode[(regdeps[depind].dependency)->mode],
(regdeps[depind].dependency)->name);
- if (regdeps[depind].specific && regdeps[depind].index != 0)
+ if (regdeps[depind].specific && regdeps[depind].index >= 0)
fprintf (stderr, " (%d)", regdeps[depind].index);
if (regdeps[depind].mem_offset.hint)
{
@@ -9513,17 +10410,16 @@ remove_marked_resource (rs)
insn_group_break (1, 0, 0);
if (rs->insn_srlz < STATE_SRLZ)
{
- int oldqp = CURR_SLOT.qp_regno;
- struct ia64_opcode *oldidesc = CURR_SLOT.idesc;
+ struct slot oldslot = CURR_SLOT;
/* Manually jam a srlz.i insn into the stream */
- CURR_SLOT.qp_regno = 0;
+ memset (&CURR_SLOT, 0, sizeof (CURR_SLOT));
+ CURR_SLOT.user_template = -1;
CURR_SLOT.idesc = ia64_find_opcode ("srlz.i");
instruction_serialization ();
md.curr_slot = (md.curr_slot + 1) % NUM_SLOTS;
if (++md.num_slots_in_use >= NUM_SLOTS)
emit_one_bundle ();
- CURR_SLOT.qp_regno = oldqp;
- CURR_SLOT.idesc = oldidesc;
+ CURR_SLOT = oldslot;
}
insn_group_break (1, 0, 0);
break;
@@ -9536,17 +10432,16 @@ remove_marked_resource (rs)
if (rs->data_srlz < STATE_STOP)
insn_group_break (1, 0, 0);
{
- int oldqp = CURR_SLOT.qp_regno;
- struct ia64_opcode *oldidesc = CURR_SLOT.idesc;
+ struct slot oldslot = CURR_SLOT;
/* Manually jam a srlz.d insn into the stream */
- CURR_SLOT.qp_regno = 0;
+ memset (&CURR_SLOT, 0, sizeof (CURR_SLOT));
+ CURR_SLOT.user_template = -1;
CURR_SLOT.idesc = ia64_find_opcode ("srlz.d");
data_serialization ();
md.curr_slot = (md.curr_slot + 1) % NUM_SLOTS;
if (++md.num_slots_in_use >= NUM_SLOTS)
emit_one_bundle ();
- CURR_SLOT.qp_regno = oldqp;
- CURR_SLOT.idesc = oldidesc;
+ CURR_SLOT = oldslot;
}
break;
case IA64_DVS_IMPLIED:
@@ -9651,7 +10546,7 @@ check_dependencies (idesc)
if (path != 0)
sprintf (pathmsg, " when entry is at label '%s'",
md.entry_labels[path - 1]);
- if (rs->specific && rs->index != 0)
+ if (matchtype == 1 && rs->index >= 0)
sprintf (indexmsg, ", specific resource number is %d",
rs->index);
sprintf (msg, "Use of '%s' %s %s dependency '%s' (%s)%s%s",
@@ -9738,12 +10633,6 @@ mark_resources (idesc)
count = specify_resource (dep, idesc, DV_REG, specs, note, md.path);
-#if 0
- if (md.debug_dv && !count)
- fprintf (stderr, " No %s %s usage found (path %d)\n",
- dv_mode[dep->mode], dep->name, md.path);
-#endif
-
while (count-- > 0)
{
mark_resource (idesc, dep, &specs[count],
@@ -9960,9 +10849,6 @@ md_assemble (str)
mnemonic = "adds";
ia64_free_opcode (idesc);
idesc = ia64_find_opcode (mnemonic);
-#if 0
- know (!idesc->next);
-#endif
}
else if (strcmp (idesc->name, "mov") == 0)
{
@@ -9977,17 +10863,67 @@ md_assemble (str)
rop = 1;
else
abort ();
- if (CURR_SLOT.opnd[rop].X_op == O_register
- && ar_is_in_integer_unit (CURR_SLOT.opnd[rop].X_add_number))
- mnemonic = "mov.i";
+ if (CURR_SLOT.opnd[rop].X_op == O_register)
+ {
+ if (ar_is_only_in_integer_unit (CURR_SLOT.opnd[rop].X_add_number))
+ mnemonic = "mov.i";
+ else if (ar_is_only_in_memory_unit (CURR_SLOT.opnd[rop].X_add_number))
+ mnemonic = "mov.m";
+ else
+ rop = -1;
+ }
else
- mnemonic = "mov.m";
- ia64_free_opcode (idesc);
- idesc = ia64_find_opcode (mnemonic);
- while (idesc != NULL
- && (idesc->operands[0] != opnd1
- || idesc->operands[1] != opnd2))
- idesc = get_next_opcode (idesc);
+ abort ();
+ if (rop >= 0)
+ {
+ ia64_free_opcode (idesc);
+ idesc = ia64_find_opcode (mnemonic);
+ while (idesc != NULL
+ && (idesc->operands[0] != opnd1
+ || idesc->operands[1] != opnd2))
+ idesc = get_next_opcode (idesc);
+ }
+ }
+ }
+ else if (strcmp (idesc->name, "mov.i") == 0
+ || strcmp (idesc->name, "mov.m") == 0)
+ {
+ enum ia64_opnd opnd1, opnd2;
+ int rop;
+
+ opnd1 = idesc->operands[0];
+ opnd2 = idesc->operands[1];
+ if (opnd1 == IA64_OPND_AR3)
+ rop = 0;
+ else if (opnd2 == IA64_OPND_AR3)
+ rop = 1;
+ else
+ abort ();
+ if (CURR_SLOT.opnd[rop].X_op == O_register)
+ {
+ char unit = 'a';
+ if (ar_is_only_in_integer_unit (CURR_SLOT.opnd[rop].X_add_number))
+ unit = 'i';
+ else if (ar_is_only_in_memory_unit (CURR_SLOT.opnd[rop].X_add_number))
+ unit = 'm';
+ if (unit != 'a' && unit != idesc->name [4])
+ as_bad ("AR %d can only be accessed by %c-unit",
+ (int) (CURR_SLOT.opnd[rop].X_add_number - REG_AR),
+ TOUPPER (unit));
+ }
+ }
+ else if (strcmp (idesc->name, "hint.b") == 0)
+ {
+ switch (md.hint_b)
+ {
+ case hint_b_ok:
+ break;
+ case hint_b_warning:
+ as_warn ("hint.b may be treated as nop");
+ break;
+ case hint_b_error:
+ as_bad ("hint.b shouldn't be used");
+ break;
}
}
@@ -10035,12 +10971,26 @@ md_assemble (str)
as_where (&CURR_SLOT.src_file, &CURR_SLOT.src_line);
dwarf2_where (&CURR_SLOT.debug_line);
- /* Add unwind entry, if there is one. */
+ /* Add unwind entries, if there are any. */
if (unwind.current_entry)
{
CURR_SLOT.unwind_record = unwind.current_entry;
unwind.current_entry = NULL;
}
+ if (unwind.pending_saves)
+ {
+ if (unwind.pending_saves->next)
+ {
+ /* Attach the next pending save to the next slot so that its
+ slot number will get set correctly. */
+ add_unwind_entry (unwind.pending_saves->next, NOT_A_CHAR);
+ unwind.pending_saves = &unwind.pending_saves->next->r.record.p;
+ }
+ else
+ unwind.pending_saves = NULL;
+ }
+ if (unwind.proc_pending.sym && S_IS_DEFINED (unwind.proc_pending.sym))
+ unwind.insn = 1;
/* Check for dependency violations. */
if (md.detect_dv)
@@ -10077,110 +11027,25 @@ void
md_operand (e)
expressionS *e;
{
- enum pseudo_type pseudo_type;
- const char *name;
- size_t len;
- int ch, i;
-
switch (*input_line_pointer)
{
- case '@':
- /* Find what relocation pseudo-function we're dealing with. */
- pseudo_type = 0;
- ch = *++input_line_pointer;
- for (i = 0; i < NELEMS (pseudo_func); ++i)
- if (pseudo_func[i].name && pseudo_func[i].name[0] == ch)
- {
- len = strlen (pseudo_func[i].name);
- if (strncmp (pseudo_func[i].name + 1,
- input_line_pointer + 1, len - 1) == 0
- && !is_part_of_name (input_line_pointer[len]))
- {
- input_line_pointer += len;
- pseudo_type = pseudo_func[i].type;
- break;
- }
- }
- switch (pseudo_type)
- {
- case PSEUDO_FUNC_RELOC:
- SKIP_WHITESPACE ();
- if (*input_line_pointer != '(')
- {
- as_bad ("Expected '('");
- goto err;
- }
- /* Skip '('. */
- ++input_line_pointer;
- expression (e);
- if (*input_line_pointer++ != ')')
- {
- as_bad ("Missing ')'");
- goto err;
- }
- if (e->X_op != O_symbol)
- {
- if (e->X_op != O_pseudo_fixup)
- {
- as_bad ("Not a symbolic expression");
- goto err;
- }
- if (i != FUNC_LT_RELATIVE)
- {
- as_bad ("Illegal combination of relocation functions");
- goto err;
- }
- switch (S_GET_VALUE (e->X_op_symbol))
- {
- case FUNC_FPTR_RELATIVE:
- i = FUNC_LT_FPTR_RELATIVE; break;
- case FUNC_DTP_MODULE:
- i = FUNC_LT_DTP_MODULE; break;
- case FUNC_DTP_RELATIVE:
- i = FUNC_LT_DTP_RELATIVE; break;
- case FUNC_TP_RELATIVE:
- i = FUNC_LT_TP_RELATIVE; break;
- default:
- as_bad ("Illegal combination of relocation functions");
- goto err;
- }
- }
- /* Make sure gas doesn't get rid of local symbols that are used
- in relocs. */
- e->X_op = O_pseudo_fixup;
- e->X_op_symbol = pseudo_func[i].u.sym;
- break;
-
- case PSEUDO_FUNC_CONST:
- e->X_op = O_constant;
- e->X_add_number = pseudo_func[i].u.ival;
- break;
-
- case PSEUDO_FUNC_REG:
- e->X_op = O_register;
- e->X_add_number = pseudo_func[i].u.ival;
- break;
-
- default:
- name = input_line_pointer - 1;
- get_symbol_end ();
- as_bad ("Unknown pseudo function `%s'", name);
- goto err;
- }
- break;
-
case '[':
++input_line_pointer;
- expression (e);
+ expression_and_evaluate (e);
if (*input_line_pointer != ']')
{
- as_bad ("Closing bracket misssing");
+ as_bad ("Closing bracket missing");
goto err;
}
else
{
- if (e->X_op != O_register)
- as_bad ("Register expected as index");
+ if (e->X_op != O_register
+ || e->X_add_number < REG_GR
+ || e->X_add_number > REG_GR + 127)
+ {
+ as_bad ("Index must be a general register");
+ e->X_add_number = REG_GR;
+ }
++input_line_pointer;
e->X_op = O_index;
@@ -10205,7 +11070,7 @@ ia64_fix_adjustable (fix)
fixS *fix;
{
/* Prevent all adjustments to global symbols */
- if (S_IS_EXTERN (fix->fx_addsy) || S_IS_WEAK (fix->fx_addsy))
+ if (S_IS_EXTERNAL (fix->fx_addsy) || S_IS_WEAK (fix->fx_addsy))
return 0;
switch (fix->fx_r_type)
@@ -10366,7 +11231,7 @@ ia64_cons_fix_new (f, where, nbytes, exp)
fix = fix_new_exp (f, where, nbytes, exp, 0, code);
/* We need to store the byte order in effect in case we're going
to fix an 8 or 16 bit relocation (for which there no real
- relocs available). See md_apply_fix3(). */
+ relocs available). See md_apply_fix(). */
fix->tc_fix_data.bigendian = target_big_endian;
}
@@ -10380,6 +11245,7 @@ ia64_gen_real_reloc_type (sym, r_type)
bfd_reloc_code_real_type r_type;
{
bfd_reloc_code_real_type new = 0;
+ const char *type = NULL, *suffix = "";
if (sym == NULL)
{
@@ -10396,7 +11262,7 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_FPTR32LSB; break;
case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_FPTR64MSB; break;
case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_FPTR64LSB; break;
- default: break;
+ default: type = "FPTR"; break;
}
break;
@@ -10409,7 +11275,7 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_GPREL32LSB; break;
case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_GPREL64MSB; break;
case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_GPREL64LSB; break;
- default: break;
+ default: type = "GPREL"; break;
}
break;
@@ -10418,7 +11284,7 @@ ia64_gen_real_reloc_type (sym, r_type)
{
case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_LTOFF22; break;
case BFD_RELOC_IA64_IMM64: new = BFD_RELOC_IA64_LTOFF64I; break;
- default: break;
+ default: type = "LTOFF"; break;
}
break;
@@ -10426,7 +11292,7 @@ ia64_gen_real_reloc_type (sym, r_type)
switch (r_type)
{
case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_LTOFF22X; break;
- default: break;
+ default: type = "LTOFF"; suffix = "X"; break;
}
break;
@@ -10439,7 +11305,7 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_PCREL32LSB; break;
case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_PCREL64MSB; break;
case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_PCREL64LSB; break;
- default: break;
+ default: type = "PCREL"; break;
}
break;
@@ -10450,7 +11316,7 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_IMM64: new = BFD_RELOC_IA64_PLTOFF64I; break;
case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_PLTOFF64MSB;break;
case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_PLTOFF64LSB;break;
- default: break;
+ default: type = "PLTOFF"; break;
}
break;
@@ -10461,7 +11327,7 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_SECREL32LSB;break;
case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_SECREL64MSB;break;
case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_SECREL64LSB;break;
- default: break;
+ default: type = "SECREL"; break;
}
break;
@@ -10472,7 +11338,7 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_SEGREL32LSB;break;
case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_SEGREL64MSB;break;
case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_SEGREL64LSB;break;
- default: break;
+ default: type = "SEGREL"; break;
}
break;
@@ -10483,7 +11349,7 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_DIR32LSB: new = BFD_RELOC_IA64_LTV32LSB; break;
case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_LTV64MSB; break;
case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_LTV64LSB; break;
- default: break;
+ default: type = "LTV"; break;
}
break;
@@ -10494,22 +11360,28 @@ ia64_gen_real_reloc_type (sym, r_type)
new = BFD_RELOC_IA64_LTOFF_FPTR22; break;
case BFD_RELOC_IA64_IMM64:
new = BFD_RELOC_IA64_LTOFF_FPTR64I; break;
+ case BFD_RELOC_IA64_DIR32MSB:
+ new = BFD_RELOC_IA64_LTOFF_FPTR32MSB; break;
+ case BFD_RELOC_IA64_DIR32LSB:
+ new = BFD_RELOC_IA64_LTOFF_FPTR32LSB; break;
+ case BFD_RELOC_IA64_DIR64MSB:
+ new = BFD_RELOC_IA64_LTOFF_FPTR64MSB; break;
+ case BFD_RELOC_IA64_DIR64LSB:
+ new = BFD_RELOC_IA64_LTOFF_FPTR64LSB; break;
default:
- break;
+ type = "LTOFF_FPTR"; break;
}
break;
case FUNC_TP_RELATIVE:
switch (r_type)
{
- case BFD_RELOC_IA64_IMM14:
- new = BFD_RELOC_IA64_TPREL14; break;
- case BFD_RELOC_IA64_IMM22:
- new = BFD_RELOC_IA64_TPREL22; break;
- case BFD_RELOC_IA64_IMM64:
- new = BFD_RELOC_IA64_TPREL64I; break;
- default:
- break;
+ case BFD_RELOC_IA64_IMM14: new = BFD_RELOC_IA64_TPREL14; break;
+ case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_TPREL22; break;
+ case BFD_RELOC_IA64_IMM64: new = BFD_RELOC_IA64_TPREL64I; break;
+ case BFD_RELOC_IA64_DIR64MSB: new = BFD_RELOC_IA64_TPREL64MSB; break;
+ case BFD_RELOC_IA64_DIR64LSB: new = BFD_RELOC_IA64_TPREL64LSB; break;
+ default: type = "TPREL"; break;
}
break;
@@ -10519,7 +11391,19 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_IMM22:
new = BFD_RELOC_IA64_LTOFF_TPREL22; break;
default:
- break;
+ type = "LTOFF_TPREL"; break;
+ }
+ break;
+
+ case FUNC_DTP_MODULE:
+ switch (r_type)
+ {
+ case BFD_RELOC_IA64_DIR64MSB:
+ new = BFD_RELOC_IA64_DTPMOD64MSB; break;
+ case BFD_RELOC_IA64_DIR64LSB:
+ new = BFD_RELOC_IA64_DTPMOD64LSB; break;
+ default:
+ type = "DTPMOD"; break;
}
break;
@@ -10529,13 +11413,17 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_IMM22:
new = BFD_RELOC_IA64_LTOFF_DTPMOD22; break;
default:
- break;
+ type = "LTOFF_DTPMOD"; break;
}
break;
case FUNC_DTP_RELATIVE:
switch (r_type)
{
+ case BFD_RELOC_IA64_DIR32MSB:
+ new = BFD_RELOC_IA64_DTPREL32MSB; break;
+ case BFD_RELOC_IA64_DIR32LSB:
+ new = BFD_RELOC_IA64_DTPREL32LSB; break;
case BFD_RELOC_IA64_DIR64MSB:
new = BFD_RELOC_IA64_DTPREL64MSB; break;
case BFD_RELOC_IA64_DIR64LSB:
@@ -10547,7 +11435,7 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_IMM64:
new = BFD_RELOC_IA64_DTPREL64I; break;
default:
- break;
+ type = "DTPREL"; break;
}
break;
@@ -10557,22 +11445,49 @@ ia64_gen_real_reloc_type (sym, r_type)
case BFD_RELOC_IA64_IMM22:
new = BFD_RELOC_IA64_LTOFF_DTPREL22; break;
default:
- break;
+ type = "LTOFF_DTPREL"; break;
}
break;
case FUNC_IPLT_RELOC:
+ switch (r_type)
+ {
+ case BFD_RELOC_IA64_IPLTMSB: return r_type;
+ case BFD_RELOC_IA64_IPLTLSB: return r_type;
+ default: type = "IPLT"; break;
+ }
break;
default:
abort ();
}
- /* Hmmmm. Should this ever occur? */
if (new)
return new;
else
- return r_type;
+ {
+ int width;
+
+ if (!type)
+ abort ();
+ switch (r_type)
+ {
+ case BFD_RELOC_IA64_DIR32MSB: width = 32; suffix = "MSB"; break;
+ case BFD_RELOC_IA64_DIR32LSB: width = 32; suffix = "LSB"; break;
+ case BFD_RELOC_IA64_DIR64MSB: width = 64; suffix = "MSB"; break;
+ case BFD_RELOC_IA64_DIR64LSB: width = 64; suffix = "LSB"; break;
+ case BFD_RELOC_UNUSED: width = 13; break;
+ case BFD_RELOC_IA64_IMM14: width = 14; break;
+ case BFD_RELOC_IA64_IMM22: width = 22; break;
+ case BFD_RELOC_IA64_IMM64: width = 64; suffix = "I"; break;
+ default: abort ();
+ }
+
+ /* This should be an error, but since previously there wasn't any
+ diagnostic here, dont't make it fail because of this for now. */
+ as_warn ("Cannot express %s%d%s relocation", type, width, suffix);
+ return r_type;
+ }
}
/* Here is where generate the appropriate reloc for pseudo relocation
@@ -10663,7 +11578,7 @@ fix_insn (fix, odesc, value)
(if possible). */
void
-md_apply_fix3 (fix, valP, seg)
+md_apply_fix (fix, valP, seg)
fixS *fix;
valueT *valP;
segT seg ATTRIBUTE_UNUSED;
@@ -10675,27 +11590,24 @@ md_apply_fix3 (fix, valP, seg)
if (fix->fx_pcrel)
{
- switch (fix->fx_r_type)
- {
- case BFD_RELOC_IA64_DIR32MSB:
- fix->fx_r_type = BFD_RELOC_IA64_PCREL32MSB;
- break;
-
- case BFD_RELOC_IA64_DIR32LSB:
- fix->fx_r_type = BFD_RELOC_IA64_PCREL32LSB;
- break;
-
- case BFD_RELOC_IA64_DIR64MSB:
- fix->fx_r_type = BFD_RELOC_IA64_PCREL64MSB;
- break;
-
- case BFD_RELOC_IA64_DIR64LSB:
- fix->fx_r_type = BFD_RELOC_IA64_PCREL64LSB;
- break;
-
- default:
- break;
- }
+ switch (fix->fx_r_type)
+ {
+ case BFD_RELOC_IA64_PCREL21B: break;
+ case BFD_RELOC_IA64_PCREL21BI: break;
+ case BFD_RELOC_IA64_PCREL21F: break;
+ case BFD_RELOC_IA64_PCREL21M: break;
+ case BFD_RELOC_IA64_PCREL60B: break;
+ case BFD_RELOC_IA64_PCREL22: break;
+ case BFD_RELOC_IA64_PCREL64I: break;
+ case BFD_RELOC_IA64_PCREL32MSB: break;
+ case BFD_RELOC_IA64_PCREL32LSB: break;
+ case BFD_RELOC_IA64_PCREL64MSB: break;
+ case BFD_RELOC_IA64_PCREL64LSB: break;
+ default:
+ fix->fx_r_type = ia64_gen_real_reloc_type (pseudo_func[FUNC_PC_RELATIVE].u.sym,
+ fix->fx_r_type);
+ break;
+ }
}
if (fix->fx_addsy)
{
@@ -10850,14 +11762,6 @@ void
ia64_handle_align (fragp)
fragS *fragp;
{
- /* Use mfi bundle of nops with no stop bits. */
- static const unsigned char le_nop[]
- = { 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00};
- static const unsigned char le_nop_stop[]
- = { 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00};
-
int bytes;
char *p;
const unsigned char *nop;
@@ -10934,6 +11838,9 @@ ia64_float_to_chars_littleendian (char *lit, LITTLENUM_TYPE *words,
void
ia64_elf_section_change_hook (void)
{
+ if (elf_section_type (now_seg) == SHT_IA_64_UNWIND
+ && elf_linked_to_section (now_seg) == NULL)
+ elf_linked_to_section (now_seg) = text_section;
dot_byteorder (-1);
}
@@ -10981,7 +11888,7 @@ dot_alias (int section)
if (name == end_name)
{
as_bad (_("expected symbol name"));
- discard_rest_of_line ();
+ ignore_rest_of_line ();
return;
}
@@ -10998,6 +11905,7 @@ dot_alias (int section)
input_line_pointer++;
*end_name = 0;
+ ia64_canonicalize_symbol_name (name);
/* We call demand_copy_C_string to check if alias string is valid.
There should be a closing `"' and no `\0' in the string. */
diff --git a/contrib/binutils/gas/config/tc-ia64.h b/contrib/binutils/gas/config/tc-ia64.h
index dcc2c299602d..c17494beb16b 100644
--- a/contrib/binutils/gas/config/tc-ia64.h
+++ b/contrib/binutils/gas/config/tc-ia64.h
@@ -1,5 +1,6 @@
/* tc-ia64.h -- Header file for tc-ia64.c.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GAS, the GNU Assembler.
@@ -16,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "opcode/ia64.h"
#include "elf/ia64.h"
@@ -74,10 +75,13 @@ extern const char *ia64_target_format PARAMS ((void));
#define NEED_INDEX_OPERATOR /* [ ] is index operator */
#define QUOTES_IN_INSN /* allow `string "foo;bar"' */
-#define LEX_AT LEX_NAME /* allow `@' inside name */
-#define LEX_QM LEX_NAME /* allow `?' inside name */
+#define LEX_AT (LEX_NAME|LEX_BEGIN_NAME) /* allow `@' inside name */
+#define LEX_QM (LEX_NAME|LEX_BEGIN_NAME) /* allow `?' inside name */
#define LEX_HASH LEX_END_NAME /* allow `#' ending a name */
+extern const char ia64_symbol_chars[];
+#define tc_symbol_chars ia64_symbol_chars
+
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
struct ia64_fix
@@ -94,7 +98,7 @@ extern void ia64_frob_label PARAMS((struct symbol *sym));
extern int ia64_frob_symbol PARAMS((struct symbol *sym));
#endif
extern void ia64_flush_pending_output PARAMS((void));
-extern int ia64_parse_name (char *name, expressionS *e);
+extern int ia64_parse_name PARAMS((char *name, expressionS *e, char *nextP));
extern int ia64_optimize_expr PARAMS((expressionS *l, operatorT op,
expressionS *r));
extern void ia64_cons_align PARAMS((int));
@@ -125,7 +129,7 @@ extern void ia64_convert_frag (fragS *);
#define tc_frob_symbol(s,p) p |= ia64_frob_symbol (s)
#endif /* TE_HPUX */
#define md_flush_pending_output() ia64_flush_pending_output ()
-#define md_parse_name(s,e,c) ia64_parse_name (s, e)
+#define md_parse_name(s,e,m,c) ia64_parse_name (s, e, c)
#define tc_canonicalize_symbol_name(s) ia64_canonicalize_symbol_name (s)
#define tc_canonicalize_section_name(s) ia64_canonicalize_symbol_name (s)
#define md_optimize_expr(l,o,r) ia64_optimize_expr (l, o, r)
@@ -158,6 +162,14 @@ extern void ia64_convert_frag (fragS *);
#define TC_FRAG_TYPE int
#define TC_FRAG_INIT(FRAGP) do {(FRAGP)->tc_frag_data = 0;}while (0)
+/* Give an error if a frag containing code is not aligned to a 16 byte
+ boundary. */
+#define md_frag_check(FRAGP) \
+ if ((FRAGP)->has_code \
+ && (((FRAGP)->fr_address + (FRAGP)->insn_addr) & 15) != 0) \
+ as_bad_where ((FRAGP)->fr_file, (FRAGP)->fr_line, \
+ _("instruction address is not a multiple of 16"));
+
#define MAX_MEM_FOR_RS_ALIGN_CODE (15 + 16)
#define WORKING_DOT_WORD /* don't do broken word processing for now */
@@ -229,7 +241,7 @@ typedef struct unw_r_record
struct
{
unsigned char *i;
- unsigned long fr_mem;
+ unsigned int fr_mem;
unsigned char gr_mem;
unsigned char br_mem;
} mask;
@@ -237,17 +249,22 @@ typedef struct unw_r_record
typedef struct unw_p_record
{
- void *imask;
+ struct unw_rec_list *next;
unsigned long t;
unsigned long size;
- unsigned long spoff;
- unsigned long br;
- unsigned long pspoff;
- unsigned short gr;
- unsigned short rmask;
- unsigned short grmask;
- unsigned long frmask;
- unsigned short brmask;
+ union
+ {
+ unsigned long sp;
+ unsigned long psp;
+ } off;
+ union
+ {
+ unsigned short gr;
+ unsigned short br;
+ } r;
+ unsigned char grmask;
+ unsigned char brmask;
+ unsigned int frmask;
unsigned char abi;
unsigned char context;
} unw_p_record;
@@ -262,10 +279,13 @@ typedef struct unw_b_record
typedef struct unw_x_record
{
unsigned long t;
- unsigned long spoff;
- unsigned long pspoff;
+ union
+ {
+ unsigned long spoff;
+ unsigned long pspoff;
+ unsigned int reg;
+ } where;
unsigned short reg;
- unsigned short treg;
unsigned short qp;
unsigned short ab; /* Value of the AB field.. */
unsigned short xy; /* Value of the XY field.. */
diff --git a/contrib/binutils/gas/config/tc-m68851.h b/contrib/binutils/gas/config/tc-m68851.h
index 870e8810d0f2..0374861a9cbe 100644
--- a/contrib/binutils/gas/config/tc-m68851.h
+++ b/contrib/binutils/gas/config/tc-m68851.h
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/*
* pmmu.h
diff --git a/contrib/binutils/gas/config/tc-mips.c b/contrib/binutils/gas/config/tc-mips.c
index b8ef69eea341..dc5ff68e3ec7 100644
--- a/contrib/binutils/gas/config/tc-mips.c
+++ b/contrib/binutils/gas/config/tc-mips.c
@@ -1216,6 +1216,12 @@ mips_target_format (void)
case bfd_target_coff_flavour:
return "pe-mips";
case bfd_target_elf_flavour:
+#ifdef TE_VXWORKS
+ if (!HAVE_64BIT_OBJECTS && !HAVE_NEWABI)
+ return (target_big_endian
+ ? "elf32-bigmips-vxworks"
+ : "elf32-littlemips-vxworks");
+#endif
#ifdef TE_TMIPS
/* This is traditional mips. */
return (target_big_endian
@@ -1556,9 +1562,9 @@ md_begin (void)
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
{
- /* On a native system, sections must be aligned to 16 byte
- boundaries. When configured for an embedded ELF target, we
- don't bother. */
+ /* On a native system other than VxWorks, sections must be aligned
+ to 16 byte boundaries. When configured for an embedded ELF
+ target, we don't bother. */
if (strcmp (TARGET_OS, "elf") != 0
&& strcmp (TARGET_OS, "vxworks") != 0)
{
@@ -1719,8 +1725,12 @@ md_assemble (char *str)
static inline bfd_boolean
reloc_needs_lo_p (bfd_reloc_code_real_type reloc)
{
- return (reloc == BFD_RELOC_HI16_S
- || reloc == BFD_RELOC_MIPS_GOT16);
+ return (HAVE_IN_PLACE_ADDENDS
+ && (reloc == BFD_RELOC_HI16_S
+ || reloc == BFD_RELOC_MIPS16_HI16_S
+ /* VxWorks R_MIPS_GOT16 relocs never need a matching %lo();
+ all GOT16 relocations evaluate to "G". */
+ || (reloc == BFD_RELOC_MIPS_GOT16 && mips_pic != VXWORKS_PIC)));
}
/* Return true if the given fixup is followed by a matching R_MIPS_LO16
@@ -1730,7 +1740,8 @@ static inline bfd_boolean
fixup_has_matching_lo_p (fixS *fixp)
{
return (fixp->fx_next != NULL
- && fixp->fx_next->fx_r_type == BFD_RELOC_LO16
+ && (fixp->fx_next->fx_r_type == BFD_RELOC_LO16
+ || fixp->fx_next->fx_r_type == BFD_RELOC_MIPS16_LO16)
&& fixp->fx_addsy == fixp->fx_next->fx_addsy
&& fixp->fx_offset == fixp->fx_next->fx_offset);
}
@@ -2487,7 +2498,10 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
|| reloc_type[0] == BFD_RELOC_MIPS_HIGHER
|| reloc_type[0] == BFD_RELOC_MIPS_SCN_DISP
|| reloc_type[0] == BFD_RELOC_MIPS_REL16
- || reloc_type[0] == BFD_RELOC_MIPS_RELGOT))
+ || reloc_type[0] == BFD_RELOC_MIPS_RELGOT
+ || reloc_type[0] == BFD_RELOC_MIPS16_GPREL
+ || reloc_type[0] == BFD_RELOC_MIPS16_HI16_S
+ || reloc_type[0] == BFD_RELOC_MIPS16_LO16))
ip->fixp[0]->fx_no_overflow = 1;
if (mips_relax.sequence)
@@ -5687,6 +5701,8 @@ macro (struct mips_cl_insn *ip)
}
}
}
+ else if (mips_pic == VXWORKS_PIC)
+ as_bad (_("Non-PIC jump used in PIC library"));
else
abort ();
@@ -9726,10 +9742,34 @@ mips16_ip (char *str, struct mips_cl_insn *ip)
&& *imm_reloc > BFD_RELOC_UNUSED
&& insn->pinfo != INSN_MACRO)
{
+ valueT tmp;
+
+ switch (*offset_reloc)
+ {
+ case BFD_RELOC_MIPS16_HI16_S:
+ tmp = (imm_expr.X_add_number + 0x8000) >> 16;
+ break;
+
+ case BFD_RELOC_MIPS16_HI16:
+ tmp = imm_expr.X_add_number >> 16;
+ break;
+
+ case BFD_RELOC_MIPS16_LO16:
+ tmp = ((imm_expr.X_add_number + 0x8000) & 0xffff)
+ - 0x8000;
+ break;
+
+ case BFD_RELOC_UNUSED:
+ tmp = imm_expr.X_add_number;
+ break;
+
+ default:
+ internalError ();
+ }
*offset_reloc = BFD_RELOC_UNUSED;
mips16_immed (NULL, 0, *imm_reloc - BFD_RELOC_UNUSED,
- imm_expr.X_add_number, TRUE, mips16_small,
+ tmp, TRUE, mips16_small,
mips16_ext, &ip->insn_opcode,
&ip->use_extend, &ip->extend);
imm_expr.X_op = O_absent;
@@ -10537,10 +10577,25 @@ static const struct percent_op_match mips_percent_op[] =
{"%highest", BFD_RELOC_MIPS_HIGHEST},
{"%higher", BFD_RELOC_MIPS_HIGHER},
{"%neg", BFD_RELOC_MIPS_SUB},
+ {"%tlsgd", BFD_RELOC_MIPS_TLS_GD},
+ {"%tlsldm", BFD_RELOC_MIPS_TLS_LDM},
+ {"%dtprel_hi", BFD_RELOC_MIPS_TLS_DTPREL_HI16},
+ {"%dtprel_lo", BFD_RELOC_MIPS_TLS_DTPREL_LO16},
+ {"%tprel_hi", BFD_RELOC_MIPS_TLS_TPREL_HI16},
+ {"%tprel_lo", BFD_RELOC_MIPS_TLS_TPREL_LO16},
+ {"%gottprel", BFD_RELOC_MIPS_TLS_GOTTPREL},
#endif
{"%hi", BFD_RELOC_HI16_S}
};
+static const struct percent_op_match mips16_percent_op[] =
+{
+ {"%lo", BFD_RELOC_MIPS16_LO16},
+ {"%gprel", BFD_RELOC_MIPS16_GPREL},
+ {"%hi", BFD_RELOC_MIPS16_HI16_S}
+};
+
+
/* Return true if *STR points to a relocation operator. When returning true,
move *STR over the operator and store its relocation code in *RELOC.
Leave both *STR and *RELOC alone when returning false. */
@@ -10551,8 +10606,16 @@ parse_relocation (char **str, bfd_reloc_code_real_type *reloc)
const struct percent_op_match *percent_op;
size_t limit, i;
- percent_op = mips_percent_op;
- limit = ARRAY_SIZE (mips_percent_op);
+ if (mips_opts.mips16)
+ {
+ percent_op = mips16_percent_op;
+ limit = ARRAY_SIZE (mips16_percent_op);
+ }
+ else
+ {
+ percent_op = mips_percent_op;
+ limit = ARRAY_SIZE (mips_percent_op);
+ }
for (i = 0; i < limit; i++)
if (strncasecmp (*str, percent_op[i].str, strlen (percent_op[i].str)) == 0)
@@ -10902,6 +10965,8 @@ struct option md_longopts[] =
{"mpdr", no_argument, NULL, OPTION_PDR},
#define OPTION_NO_PDR (OPTION_ELF_BASE + 10)
{"mno-pdr", no_argument, NULL, OPTION_NO_PDR},
+#define OPTION_MVXWORKS_PIC (OPTION_ELF_BASE + 11)
+ {"mvxworks-pic", no_argument, NULL, OPTION_MVXWORKS_PIC},
#endif /* OBJ_ELF */
#define OPTION_MOCTEON_UNSUPPORTED (OPTION_MISC_BASE + 28)
@@ -11297,6 +11362,10 @@ md_parse_option (int c, char *arg)
case OPTION_NO_PDR:
mips_flag_pdr = FALSE;
break;
+
+ case OPTION_MVXWORKS_PIC:
+ mips_pic = VXWORKS_PIC;
+ break;
#endif /* OBJ_ELF */
default:
@@ -11509,7 +11578,7 @@ mips_frob_file_before_adjust (void)
}
/* Sort any unmatched HI16 and GOT16 relocs so that they immediately precede
- the corresponding LO16 reloc. This is called before md_apply_fix3 and
+ the corresponding LO16 reloc. This is called before md_apply_fix and
tc_gen_reloc. Unmatched relocs can only be generated by use of explicit
relocation operators.
@@ -11594,7 +11663,8 @@ mips_frob_file (void)
if (*pos == l->fixp)
hi_pos = pos;
- if ((*pos)->fx_r_type == BFD_RELOC_LO16
+ if (((*pos)->fx_r_type == BFD_RELOC_LO16
+ || (*pos)->fx_r_type == BFD_RELOC_MIPS16_LO16)
&& (*pos)->fx_addsy == l->fixp->fx_addsy
&& (*pos)->fx_offset >= l->fixp->fx_offset
&& (lo_pos == NULL
@@ -11650,7 +11720,7 @@ mips_force_relocation (fixS *fixp)
/* Apply a fixup to the object file. */
void
-md_apply_fix3 (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
+md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
{
bfd_byte *buf;
long insn;
@@ -11688,6 +11758,16 @@ md_apply_fix3 (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
switch (fixP->fx_r_type)
{
+ case BFD_RELOC_MIPS_TLS_GD:
+ case BFD_RELOC_MIPS_TLS_LDM:
+ case BFD_RELOC_MIPS_TLS_DTPREL_HI16:
+ case BFD_RELOC_MIPS_TLS_DTPREL_LO16:
+ case BFD_RELOC_MIPS_TLS_GOTTPREL:
+ case BFD_RELOC_MIPS_TLS_TPREL_HI16:
+ case BFD_RELOC_MIPS_TLS_TPREL_LO16:
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
+ /* fall through */
+
case BFD_RELOC_MIPS_JMP:
case BFD_RELOC_MIPS_SHIFT5:
case BFD_RELOC_MIPS_SHIFT6:
@@ -11716,6 +11796,8 @@ md_apply_fix3 (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
case BFD_RELOC_MIPS_CALL_HI16:
case BFD_RELOC_MIPS_CALL_LO16:
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;
@@ -11766,6 +11848,7 @@ md_apply_fix3 (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
break;
case BFD_RELOC_LO16:
+ case BFD_RELOC_MIPS16_LO16:
/* FIXME: Now that embedded-PIC is gone, some of this code/comment
may be safe to remove, but if so it's not obvious. */
/* When handling an embedded PIC switch statement, we can wind
@@ -11809,7 +11892,7 @@ md_apply_fix3 (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
&& fixP->fx_done
&& fixP->fx_frag->fr_address >= text_section->vma
&& (fixP->fx_frag->fr_address
- < text_section->vma + text_section->_raw_size)
+ < text_section->vma + bfd_get_section_size (text_section))
&& ((insn & 0xffff0000) == 0x10000000 /* beq $0,$0 */
|| (insn & 0xffff0000) == 0x04010000 /* bgez $0 */
|| (insn & 0xffff0000) == 0x04110000)) /* bgezal $0 */
@@ -13423,6 +13506,9 @@ md_estimate_size_before_relax (fragS *fragp, asection *segtype)
change = nopic_need_relax (fragp->fr_symbol, 0);
else if (mips_pic == SVR4_PIC)
change = pic_need_relax (fragp->fr_symbol, segtype);
+ else if (mips_pic == VXWORKS_PIC)
+ /* For vxworks, GOT16 relocations never have a corresponding LO16. */
+ change = 0;
else
abort ();
@@ -13468,6 +13554,7 @@ mips_fix_adjustable (fixS *fixp)
this, it seems better not to force the issue, and instead keep the
original symbol. This will work with either linker behavior. */
if ((fixp->fx_r_type == BFD_RELOC_LO16
+ || fixp->fx_r_type == BFD_RELOC_MIPS16_LO16
|| reloc_needs_lo_p (fixp->fx_r_type))
&& HAVE_IN_PLACE_ADDENDS
&& (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE) != 0)
@@ -13988,6 +14075,10 @@ mips_define_label (symbolS *sym)
l->label = sym;
l->next = insn_labels;
insn_labels = l;
+
+#ifdef OBJ_ELF
+ dwarf2_emit_label (sym);
+#endif
}
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
@@ -14218,7 +14309,7 @@ s_mips_file (int x ATTRIBUTE_UNUSED)
if (filename != NULL && ! first_file_directive)
{
(void) new_logical_line (filename, -1);
- s_app_file_string (filename);
+ s_app_file_string (filename, 0);
}
first_file_directive = 1;
}
diff --git a/contrib/binutils/gas/config/tc-mips.h b/contrib/binutils/gas/config/tc-mips.h
index 0621b2eaf498..5665d3decdd7 100644
--- a/contrib/binutils/gas/config/tc-mips.h
+++ b/contrib/binutils/gas/config/tc-mips.h
@@ -1,5 +1,5 @@
/* tc-mips.h -- header file for tc-mips.c.
- Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by the OSF and Ralph Campbell.
Written by Keith Knowles and Ralph Campbell, working independently.
@@ -19,8 +19,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef TC_MIPS
#define TC_MIPS
@@ -58,10 +58,6 @@ extern void mips_handle_align (struct frag *);
#define MAX_MEM_FOR_RS_ALIGN_CODE (1 + 2)
-/* We permit PC relative difference expressions when generating
- embedded PIC code. */
-#define DIFF_EXPR_OK
-
/* Tell assembler that we have an itbl_mips.h header file to include. */
#define HAVE_ITBL_CPU
@@ -80,11 +76,8 @@ enum mips_pic_level
/* Generate PIC code as in the SVR4 MIPS ABI. */
SVR4_PIC,
- /* Generate PIC code without using a global offset table: the data
- segment has a maximum size of 64K, all data references are off
- the $gp register, and all text references are PC relative. This
- is used on some embedded systems. */
- EMBEDDED_PIC
+ /* VxWorks's PIC model. */
+ VXWORKS_PIC
};
extern enum mips_pic_level mips_pic;
@@ -117,17 +110,15 @@ extern void mips_frob_file_after_relocs (void);
#define tc_fix_adjustable(fixp) mips_fix_adjustable (fixp)
extern int mips_fix_adjustable (struct fix *);
-/* Values passed to md_apply_fix3 don't include symbol values. */
+/* Values passed to md_apply_fix don't include symbol values. */
#define MD_APPLY_SYM_VALUE(FIX) 0
-/* Global syms must not be resolved, to support ELF shared libraries.
- When generating embedded code, we don't have shared libs. */
+/* Global syms must not be resolved, to support ELF shared libraries. */
#define EXTERN_FORCE_RELOC \
- (OUTPUT_FLAVOR == bfd_target_elf_flavour \
- && mips_pic != EMBEDDED_PIC)
+ (OUTPUT_FLAVOR == bfd_target_elf_flavour)
-/* When generating embedded PIC code we must keep PC relative
- relocations. */
+/* When generating NEWABI code, we may need to have to keep combined
+ relocations which don't have symbols. */
#define TC_FORCE_RELOCATION(FIX) mips_force_relocation (FIX)
extern int mips_force_relocation (struct fix *);
@@ -149,10 +140,6 @@ extern void mips_elf_final_processing (void);
extern void md_mips_end (void);
#define md_end() md_mips_end()
-#define USE_GLOBAL_POINTER_OPT (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \
- || OUTPUT_FLAVOR == bfd_target_coff_flavour \
- || OUTPUT_FLAVOR == bfd_target_elf_flavour)
-
extern void mips_pop_insert (void);
#define md_pop_insert() mips_pop_insert()
@@ -165,6 +152,15 @@ extern void mips_enable_auto_align (void);
extern enum dwarf2_format mips_dwarf2_format (void);
#define DWARF2_FORMAT() mips_dwarf2_format ()
+extern int mips_dwarf2_addr_size (void);
#define DWARF2_ADDR_SIZE(bfd) mips_dwarf2_addr_size ()
+#define TARGET_USE_CFIPOP 1
+
+#define tc_cfi_frame_initial_instructions mips_cfi_frame_initial_instructions
+extern void mips_cfi_frame_initial_instructions (void);
+
+#define DWARF2_DEFAULT_RETURN_COLUMN 31
+#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 66366a57d23c..d5bdb9e643ea 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 Free Software Foundation, Inc.
+ 2004, 2005 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <stdio.h>
#include "as.h"
@@ -184,8 +184,10 @@ const char EXP_CHARS[] = "eE";
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. */
-const char ppc_symbol_chars[] = "+-";
+ branches. So they need to be accepted as symbol characters.
+ Also, anything that can start an operand needs to be mentioned here,
+ to stop the input scrubber eating whitespace. */
+const char ppc_symbol_chars[] = "+-%[";
/* The dwarf2 data alignment, adjusted for 32 or 64 bit. */
int ppc_cie_data_alignment;
@@ -858,6 +860,9 @@ parse_cpu (const char *arg)
|| strcmp (arg, "7455") == 0)
ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC
| PPC_OPCODE_ALTIVEC | PPC_OPCODE_32);
+ else if (strcmp (arg, "e300") == 0)
+ ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32
+ | PPC_OPCODE_E300);
else if (strcmp (arg, "altivec") == 0)
{
if (ppc_cpu == 0)
@@ -906,6 +911,12 @@ parse_cpu (const char *arg)
ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC
| PPC_OPCODE_64 | PPC_OPCODE_POWER4);
}
+ else if (strcmp (arg, "power5") == 0)
+ {
+ ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC
+ | PPC_OPCODE_64 | PPC_OPCODE_POWER4
+ | PPC_OPCODE_POWER5);
+ }
/* -mcom means assemble for the common intersection between Power
and PowerPC. At present, we just allow the union, rather
than the intersection. */
@@ -1100,10 +1111,12 @@ PowerPC options:\n\
-mbooke64 generate code for 64-bit PowerPC BookE\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\
-mcom generate code Power/PowerPC common instructions\n\
-many generate code for any architecture (PWR/PWRX/PPC)\n"));
fprintf (stream, _("\
-maltivec generate code for AltiVec\n\
+-me300 generate code for PowerPC e300 family\n\
-me500, -me500x2 generate code for Motorola e500 core complex\n\
-mspe generate code for Motorola SPE instructions\n\
-mregnames Allow symbolic names for registers\n\
@@ -1144,19 +1157,15 @@ ppc_set_cpu ()
else if (strcmp (default_cpu, "rs6000") == 0)
ppc_cpu |= PPC_OPCODE_POWER | PPC_OPCODE_32;
else if (strncmp (default_cpu, "powerpc", 7) == 0)
- {
- if (default_cpu[7] == '6' && default_cpu[8] == '4')
- ppc_cpu |= PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_64;
- else
- ppc_cpu |= PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32;
- }
+ ppc_cpu |= PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32;
else
as_fatal (_("Unknown default cpu = %s, os = %s"),
default_cpu, default_os);
}
}
-/* Figure out the BFD architecture to use. */
+/* Figure out the BFD architecture to use. This function and ppc_mach
+ are called well before md_begin, when the output file is opened. */
enum bfd_architecture
ppc_arch ()
@@ -1208,9 +1217,13 @@ ppc_target_format ()
#endif
#endif
#ifdef OBJ_ELF
+# ifdef TE_VXWORKS
+ return "elf32-powerpc-vxworks";
+# else
return (target_big_endian
? (ppc_obj64 ? "elf64-powerpc" : "elf32-powerpc")
: (ppc_obj64 ? "elf64-powerpcle" : "elf32-powerpcle"));
+# endif
#endif
}
@@ -1254,7 +1267,10 @@ ppc_setup_opcodes (void)
|| (ppc_cpu & PPC_OPCODE_BOOKE) == 0)
&& ((op->flags & (PPC_OPCODE_POWER4 | PPC_OPCODE_NOPOWER4)) == 0
|| ((op->flags & PPC_OPCODE_POWER4)
- == (ppc_cpu & PPC_OPCODE_POWER4))))
+ == (ppc_cpu & PPC_OPCODE_POWER4)))
+ && ((op->flags & PPC_OPCODE_POWER5) == 0
+ || ((op->flags & PPC_OPCODE_POWER5)
+ == (ppc_cpu & PPC_OPCODE_POWER5))))
{
const char *retval;
@@ -1457,14 +1473,7 @@ ppc_insert_operand (insn, operand, val, file, line)
test = val;
if (test < (offsetT) min || test > (offsetT) max)
- {
- const char *err =
- _("operand out of range (%s not between %ld and %ld)");
- char buf[100];
-
- sprint_value (buf, test);
- as_bad_where (file, line, err, buf, min, max);
- }
+ as_bad_value_out_of_range (_("operand"), test, (offsetT) min, (offsetT) max, file, line);
}
if (operand->insert)
@@ -1898,6 +1907,7 @@ void
ppc_frob_file_before_adjust ()
{
symbolS *symp;
+ asection *toc;
if (!ppc_obj64)
return;
@@ -1921,15 +1931,19 @@ ppc_frob_file_before_adjust ()
dotname = xmalloc (len + 1);
dotname[0] = '.';
memcpy (dotname + 1, name, len);
- dotsym = symbol_find (dotname);
+ dotsym = symbol_find_noref (dotname, 1);
free (dotname);
if (dotsym != NULL && (symbol_used_p (dotsym)
|| symbol_used_in_reloc_p (dotsym)))
- {
- symbol_mark_used (symp);
- }
+ symbol_mark_used (symp);
+
}
+ toc = bfd_get_section_by_name (stdoutput, ".toc");
+ if (toc != NULL
+ && bfd_section_size (stdoutput, toc) > 0x10000)
+ as_warn (_("TOC section size exceeds 64k"));
+
/* Don't emit .TOC. symbol. */
symp = symbol_find (".TOC.");
if (symp != NULL)
@@ -2098,6 +2112,7 @@ md_assemble (str)
struct ppc_fixup fixups[MAX_INSN_FIXUPS];
int fc;
char *f;
+ int addr_mod;
int i;
#ifdef OBJ_ELF
bfd_reloc_code_real_type reloc;
@@ -2625,6 +2640,11 @@ md_assemble (str)
/* Write out the instruction. */
f = frag_more (4);
+ addr_mod = frag_now_fix () & 3;
+ if (frag_now->has_code && frag_now->insn_addr != addr_mod)
+ as_bad (_("instruction address is not a multiple of 4"));
+ frag_now->insn_addr = addr_mod;
+ frag_now->has_code = 1;
md_number_to_chars (f, insn, 4);
#ifdef OBJ_ELF
@@ -2636,7 +2656,7 @@ md_assemble (str)
BFD_RELOC_UNUSED plus the operand index. This lets us easily
handle fixups for any operand type, although that is admittedly
not a very exciting feature. We pick a BFD reloc type in
- md_apply_fix3. */
+ md_apply_fix. */
for (i = 0; i < fc; i++)
{
const struct powerpc_operand *operand;
@@ -4396,6 +4416,7 @@ ppc_pe_comm (lcomm)
{
S_SET_VALUE (symbolP, (valueT) temp);
S_SET_EXTERNAL (symbolP);
+ S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
}
demand_empty_rest_of_line ();
@@ -4820,6 +4841,10 @@ ppc_frob_label (sym)
&symbol_rootP, &symbol_lastP);
symbol_get_tc (ppc_current_csect)->within = sym;
}
+
+#ifdef OBJ_ELF
+ dwarf2_emit_label (sym);
+#endif
}
/* This variable is set by ppc_frob_symbol if any absolute symbols are
@@ -4844,7 +4869,7 @@ ppc_frob_symbol (sym)
table. */
if (! symbol_used_in_reloc_p (sym)
&& ((symbol_get_bfdsym (sym)->flags & BSF_SECTION_SYM) != 0
- || (! S_IS_EXTERNAL (sym)
+ || (! (S_IS_EXTERNAL (sym) || S_IS_WEAK (sym))
&& ! symbol_get_tc (sym)->output
&& S_GET_STORAGE_CLASS (sym) != C_FILE)))
return 1;
@@ -4910,7 +4935,7 @@ ppc_frob_symbol (sym)
}
}
- if (! S_IS_EXTERNAL (sym)
+ if (! (S_IS_EXTERNAL (sym) || S_IS_WEAK (sym))
&& (symbol_get_bfdsym (sym)->flags & BSF_SECTION_SYM) == 0
&& S_GET_STORAGE_CLASS (sym) != C_FILE
&& S_GET_STORAGE_CLASS (sym) != C_FCN
@@ -5455,6 +5480,7 @@ ppc_force_relocation (fix)
case BFD_RELOC_PPC_B16_BRNTAKEN:
case BFD_RELOC_PPC_BA16_BRTAKEN:
case BFD_RELOC_PPC_BA16_BRNTAKEN:
+ case BFD_RELOC_24_PLT_PCREL:
case BFD_RELOC_PPC64_TOC:
return 1;
default:
@@ -5480,12 +5506,7 @@ ppc_fix_adjustable (fix)
&& fix->fx_r_type != BFD_RELOC_VTABLE_INHERIT
&& fix->fx_r_type != BFD_RELOC_VTABLE_ENTRY
&& !(fix->fx_r_type >= BFD_RELOC_PPC_TLS
- && fix->fx_r_type <= BFD_RELOC_PPC64_DTPREL16_HIGHESTA)
- && (fix->fx_pcrel
- || (fix->fx_subsy != NULL
- && (S_GET_SEGMENT (fix->fx_subsy)
- == S_GET_SEGMENT (fix->fx_addsy)))
- || S_IS_LOCAL (fix->fx_addsy)));
+ && fix->fx_r_type <= BFD_RELOC_PPC64_DTPREL16_HIGHESTA));
}
#endif
@@ -5499,7 +5520,7 @@ ppc_fix_adjustable (fix)
fixup. */
void
-md_apply_fix3 (fixP, valP, seg)
+md_apply_fix (fixP, valP, seg)
fixS *fixP;
valueT * valP;
segT seg ATTRIBUTE_UNUSED;
@@ -5517,11 +5538,11 @@ md_apply_fix3 (fixP, valP, seg)
fixP->fx_done = 1;
#else
/* FIXME FIXME FIXME: The value we are passed in *valP includes
- the symbol values. Since we are using BFD_ASSEMBLER, if we are
- doing this relocation the code in write.c is going to call
- bfd_install_relocation, which is also going to use the symbol
- value. That means that if the reloc is fully resolved we want to
- use *valP since bfd_install_relocation is not being used.
+ the symbol values. If we are doing this relocation the code in
+ write.c is going to call bfd_install_relocation, which is also
+ going to use the symbol value. That means that if the reloc is
+ fully resolved we want to use *valP since bfd_install_relocation is
+ not being used.
However, if the reloc is not fully resolved we do not want to use
*valP, and must use fx_offset instead. However, if the reloc
is PC relative, we do want to use *valP since it includes the
@@ -5707,8 +5728,6 @@ md_apply_fix3 (fixP, valP, seg)
value, 8);
break;
- case BFD_RELOC_LO16:
- case BFD_RELOC_16:
case BFD_RELOC_GPREL16:
case BFD_RELOC_16_GOT_PCREL:
case BFD_RELOC_16_GOTOFF:
@@ -5754,19 +5773,45 @@ md_apply_fix3 (fixP, valP, seg)
value, 2);
break;
+ case BFD_RELOC_16:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_16_PCREL;
+ /* fall through */
+
+ case BFD_RELOC_16_PCREL:
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ value, 2);
+ break;
+
+ case BFD_RELOC_LO16:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_LO16_PCREL;
+ /* fall through */
+
+ case BFD_RELOC_LO16_PCREL:
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ value, 2);
+ break;
+
/* This case happens when you write, for example,
lis %r3,(L1-L2)@ha
where L1 and L2 are defined later. */
case BFD_RELOC_HI16:
if (fixP->fx_pcrel)
- abort ();
+ fixP->fx_r_type = BFD_RELOC_HI16_PCREL;
+ /* fall through */
+
+ case BFD_RELOC_HI16_PCREL:
md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
PPC_HI (value), 2);
break;
case BFD_RELOC_HI16_S:
if (fixP->fx_pcrel)
- abort ();
+ fixP->fx_r_type = BFD_RELOC_HI16_S_PCREL;
+ /* fall through */
+
+ case BFD_RELOC_HI16_S_PCREL:
md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
PPC_HA (value), 2);
break;
@@ -5814,7 +5859,7 @@ md_apply_fix3 (fixP, valP, seg)
if (fixP->fx_pcrel)
abort ();
{
- unsigned char *where = fixP->fx_frag->fr_literal + fixP->fx_where;
+ char *where = fixP->fx_frag->fr_literal + fixP->fx_where;
unsigned long val, mask;
if (target_big_endian)
@@ -5841,6 +5886,8 @@ md_apply_fix3 (fixP, valP, seg)
break;
case BFD_RELOC_PPC_TLS:
+ break;
+
case BFD_RELOC_PPC_DTPMOD:
case BFD_RELOC_PPC_TPREL16:
case BFD_RELOC_PPC_TPREL16_LO:
@@ -5880,6 +5927,7 @@ md_apply_fix3 (fixP, valP, seg)
case BFD_RELOC_PPC64_DTPREL16_HIGHERA:
case BFD_RELOC_PPC64_DTPREL16_HIGHEST:
case BFD_RELOC_PPC64_DTPREL16_HIGHESTA:
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
break;
#endif
/* Because SDA21 modifies the register field, the size is set to 4
@@ -5972,6 +6020,13 @@ md_apply_fix3 (fixP, valP, seg)
#ifdef OBJ_ELF
fixP->fx_addnumber = value;
+
+ /* PowerPC uses RELA relocs, ie. the reloc addend is stored separately
+ from the section contents. If we are going to be emitting a reloc
+ then the section contents are immaterial, so don't warn if they
+ happen to overflow. Leave such warnings to ld. */
+ if (!fixP->fx_done)
+ fixP->fx_no_overflow = 1;
#else
if (fixP->fx_r_type != BFD_RELOC_PPC_TOC16)
fixP->fx_addnumber = 0;
@@ -6033,7 +6088,7 @@ tc_ppc_regname_to_dw2regnum (const char *regname)
{
{ "sp", 1 }, { "r.sp", 1 }, { "rtoc", 2 }, { "r.toc", 2 },
{ "mq", 64 }, { "lr", 65 }, { "ctr", 66 }, { "ap", 67 },
- { "cc", 68 }, { "xer", 76 }, { "vrsave", 109 }, { "vscr", 110 },
+ { "cr", 70 }, { "xer", 76 }, { "vrsave", 109 }, { "vscr", 110 },
{ "spe_acc", 111 }, { "spefscr", 112 }
};
diff --git a/contrib/binutils/gas/config/tc-ppc.h b/contrib/binutils/gas/config/tc-ppc.h
index 0844f84cefab..f7c2da619cbc 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
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004, 2005 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
@@ -17,24 +17,18 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define TC_PPC
-#ifdef ANSI_PROTOTYPES
struct fix;
-#endif
/* Set the endianness we are using. Default to big endian. */
#ifndef TARGET_BYTES_BIG_ENDIAN
#define TARGET_BYTES_BIG_ENDIAN 1
#endif
-#ifndef BFD_ASSEMBLER
- #error PowerPC support requires BFD_ASSEMBLER
-#endif
-
/* If OBJ_COFF is defined, and TE_PE is not defined, we are assembling
XCOFF for AIX or PowerMac. If TE_PE is defined, we are assembling
COFF for Windows NT. */
@@ -90,7 +84,7 @@ extern char *ppc_target_format PARAMS ((void));
- ((FRAGP)->fr_address + (FRAGP)->fr_fix)); \
if (count != 0 && (count & 3) == 0) \
{ \
- unsigned char *dest = (FRAGP)->fr_literal + (FRAGP)->fr_fix; \
+ char *dest = (FRAGP)->fr_literal + (FRAGP)->fr_fix; \
\
(FRAGP)->fr_var = 4; \
if (target_big_endian) \
@@ -110,6 +104,11 @@ extern char *ppc_target_format PARAMS ((void));
} \
}
+#define md_frag_check(FRAGP) \
+ if ((FRAGP)->has_code \
+ && (((FRAGP)->fr_address + (FRAGP)->insn_addr) & 3) != 0) \
+ as_bad_where ((FRAGP)->fr_file, (FRAGP)->fr_line, \
+ _("instruction address is not a multiple of 4"));
#ifdef TE_PE
@@ -229,7 +228,7 @@ extern const char *ppc_comment_chars;
#define tc_fix_adjustable(FIX) ppc_fix_adjustable (FIX)
extern int ppc_fix_adjustable PARAMS ((struct fix *));
-/* Values passed to md_apply_fix3 don't include symbol values. */
+/* 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
@@ -246,7 +245,7 @@ extern int ppc_force_relocation PARAMS ((struct fix *));
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section(FIX, SEC)
extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
-#define md_parse_name(name, exp, c) ppc_parse_name (name, exp)
+#define md_parse_name(name, exp, mode, c) ppc_parse_name (name, exp)
extern int ppc_parse_name PARAMS ((const char *, struct expressionS *));
#define md_operand(x)
diff --git a/contrib/binutils/gas/config/tc-s390.c b/contrib/binutils/gas/config/tc-s390.c
index 4fafbec35fe4..56b5b2594f8f 100644
--- a/contrib/binutils/gas/config/tc-s390.c
+++ b/contrib/binutils/gas/config/tc-s390.c
@@ -1,5 +1,6 @@
/* tc-s390.c -- Assemble for the S390
- Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of GAS, the GNU Assembler.
@@ -16,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <stdio.h>
#include "as.h"
@@ -312,8 +313,8 @@ static flagword s390_flags = 0;
symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
#ifndef WORKING_DOT_WORD
-const int md_short_jump_size = 4;
-const int md_long_jump_size = 4;
+int md_short_jump_size = 4;
+int md_long_jump_size = 4;
#endif
const char *md_shortopts = "A:m:kVQ:";
@@ -409,6 +410,8 @@ md_parse_option (c, arg)
current_cpu = S390_OPCODE_Z900;
else if (strcmp (arg + 5, "z990") == 0)
current_cpu = S390_OPCODE_Z990;
+ else if (strcmp (arg + 5, "z9-109") == 0)
+ current_cpu = S390_OPCODE_Z9_109;
else
{
as_bad (_("invalid switch -m%s"), arg);
@@ -601,21 +604,15 @@ s390_insert_operand (insn, operand, val, file, line)
/* Check for underflow / overflow. */
if (uval < min || uval > max)
{
- const char *err =
- "operand out of range (%s not between %ld and %ld)";
- char buf[100];
-
if (operand->flags & S390_OPERAND_LENGTH)
{
uval++;
min++;
max++;
}
- sprint_value (buf, uval);
- if (file == (char *) NULL)
- as_bad (err, buf, (int) min, (int) max);
- else
- as_bad_where (file, line, err, buf, (int) min, (int) max);
+
+ as_bad_value_out_of_range (_("operand"), uval, (offsetT) min, (offsetT) max, file, line);
+
return;
}
}
@@ -1358,8 +1355,19 @@ md_gather_operands (str, insn, opcode)
/* If there is a next operand it must be separated by a comma. */
if (opindex_ptr[1] != '\0')
{
- if (*str++ != ',')
- as_bad (_("syntax error; expected ,"));
+ if (*str != ',')
+ {
+ while (opindex_ptr[1] != '\0')
+ {
+ operand = s390_operands + *(++opindex_ptr);
+ if (operand->flags & S390_OPERAND_OPTIONAL)
+ continue;
+ as_bad (_("syntax error; expected ,"));
+ break;
+ }
+ }
+ else
+ str++;
}
}
else
@@ -1391,8 +1399,19 @@ md_gather_operands (str, insn, opcode)
/* If there is a next operand it must be separated by a comma. */
if (opindex_ptr[1] != '\0')
{
- if (*str++ != ',')
- as_bad (_("syntax error; expected ,"));
+ if (*str != ',')
+ {
+ while (opindex_ptr[1] != '\0')
+ {
+ operand = s390_operands + *(++opindex_ptr);
+ if (operand->flags & S390_OPERAND_OPTIONAL)
+ continue;
+ as_bad (_("syntax error; expected ,"));
+ break;
+ }
+ }
+ else
+ str++;
}
}
else
@@ -1410,8 +1429,19 @@ md_gather_operands (str, insn, opcode)
/* If there is a next operand it must be separated by a comma. */
if (opindex_ptr[1] != '\0')
{
- if (*str++ != ',')
- as_bad (_("syntax error; expected ,"));
+ if (*str != ',')
+ {
+ while (opindex_ptr[1] != '\0')
+ {
+ operand = s390_operands + *(++opindex_ptr);
+ if (operand->flags & S390_OPERAND_OPTIONAL)
+ continue;
+ as_bad (_("syntax error; expected ,"));
+ break;
+ }
+ }
+ else
+ str++;
}
}
}
@@ -1454,7 +1484,7 @@ md_gather_operands (str, insn, opcode)
BFD_RELOC_UNUSED plus the operand index. This lets us easily
handle fixups for any operand type, although that is admittedly
not a very exciting feature. We pick a BFD reloc type in
- md_apply_fix3. */
+ md_apply_fix. */
for (i = 0; i < fc; i++)
{
@@ -1602,15 +1632,12 @@ s390_insn (ignore)
if (exp.X_op == O_constant)
{
if ( ( opformat->oplen == 6
- && exp.X_add_number >= 0
&& (addressT) exp.X_add_number < (1ULL << 48))
|| ( opformat->oplen == 4
- && exp.X_add_number >= 0
&& (addressT) exp.X_add_number < (1ULL << 32))
|| ( opformat->oplen == 2
- && exp.X_add_number >= 0
&& (addressT) exp.X_add_number < (1ULL << 16)))
- md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
+ md_number_to_chars ((char *) insn, exp.X_add_number, opformat->oplen);
else
as_bad (_("Invalid .insn format\n"));
}
@@ -1620,9 +1647,9 @@ s390_insn (ignore)
&& opformat->oplen == 6
&& generic_bignum[3] == 0)
{
- md_number_to_chars (insn, generic_bignum[2], 2);
- md_number_to_chars (&insn[2], generic_bignum[1], 2);
- md_number_to_chars (&insn[4], generic_bignum[0], 2);
+ md_number_to_chars ((char *) insn, generic_bignum[2], 2);
+ md_number_to_chars ((char *) &insn[2], generic_bignum[1], 2);
+ md_number_to_chars ((char *) &insn[4], generic_bignum[0], 2);
}
else
as_bad (_("Invalid .insn format\n"));
@@ -1965,7 +1992,7 @@ tc_s390_force_relocation (fixp)
fixup. */
void
-md_apply_fix3 (fixP, valP, seg)
+md_apply_fix (fixP, valP, seg)
fixS *fixP;
valueT *valP;
segT seg ATTRIBUTE_UNUSED;
@@ -2000,8 +2027,8 @@ md_apply_fix3 (fixP, valP, seg)
if (fixP->fx_done)
{
/* Insert the fully resolved operand value. */
- s390_insert_operand (where, operand, (offsetT) value,
- fixP->fx_file, fixP->fx_line);
+ s390_insert_operand ((unsigned char *) where, operand,
+ (offsetT) value, fixP->fx_file, fixP->fx_line);
return;
}
@@ -2223,10 +2250,12 @@ md_apply_fix3 (fixP, valP, seg)
case BFD_RELOC_390_TLS_DTPMOD:
case BFD_RELOC_390_TLS_DTPOFF:
case BFD_RELOC_390_TLS_TPOFF:
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
/* Fully resolved at link time. */
break;
case BFD_RELOC_390_TLS_IEENT:
/* Fully resolved at link time. */
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
value += 2;
break;
diff --git a/contrib/binutils/gas/config/tc-s390.h b/contrib/binutils/gas/config/tc-s390.h
index fe55e15c89de..dbecfef3a553 100644
--- a/contrib/binutils/gas/config/tc-s390.h
+++ b/contrib/binutils/gas/config/tc-s390.h
@@ -1,5 +1,6 @@
/* tc-s390.h -- Header file for tc-s390.c.
- Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
Written by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of GAS, the GNU Assembler.
@@ -16,18 +17,12 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define TC_S390
-#ifdef ANSI_PROTOTYPES
struct fix;
-#endif
-
-#ifndef BFD_ASSEMBLER
- #error S390 support requires BFD_ASSEMBLER
-#endif
#define TC_FORCE_RELOCATION(FIX) tc_s390_force_relocation(FIX)
extern int tc_s390_force_relocation PARAMS ((struct fix *));
@@ -39,7 +34,7 @@ extern int tc_s390_force_relocation PARAMS ((struct fix *));
#define tc_fix_adjustable(X) tc_s390_fix_adjustable(X)
extern int tc_s390_fix_adjustable PARAMS ((struct fix *));
-/* Values passed to md_apply_fix3 don't include symbol values. */
+/* Values passed to md_apply_fix don't include symbol values. */
#define MD_APPLY_SYM_VALUE(FIX) 0
/* The target BFD architecture. */
diff --git a/contrib/binutils/gas/config/tc-sparc.c b/contrib/binutils/gas/config/tc-sparc.c
index ba6b4ed5689a..10a1411b5260 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
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public
License along with GAS; see the file COPYING. If not, write
- to the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ to the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include <stdio.h>
@@ -133,7 +133,7 @@ int sparc_cie_data_alignment;
/* Handle of the OPCODE hash table. */
static struct hash_control *op_hash;
-static int log2 PARAMS ((int));
+static int mylog2 PARAMS ((int));
static void s_data1 PARAMS ((void));
static void s_seg PARAMS ((int));
static void s_proc PARAMS ((int));
@@ -174,9 +174,6 @@ const pseudo_typeS md_pseudo_table[] =
{NULL, 0, 0},
};
-/* Size of relocation record. */
-const int md_reloc_size = 12;
-
/* This array holds the chars that always start a comment. If the
pre-processor is disabled, these aren't very useful. */
const char comment_chars[] = "!"; /* JF removed '|' from
@@ -207,7 +204,7 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
changed in read.c. Ideally it shouldn't have to know about it at all,
but nothing is ideal around here. */
-#define isoctal(c) ((unsigned) ((c) - '0') < '8')
+#define isoctal(c) ((unsigned) ((c) - '0') < 8)
struct sparc_it
{
@@ -337,6 +334,10 @@ sparc_target_format ()
#endif
#endif
+#ifdef TE_VXWORKS
+ return "elf32-sparc-vxworks";
+#endif
+
#ifdef OBJ_ELF
return sparc_arch_size == 64 ? "elf64-sparc" : "elf32-sparc";
#endif
@@ -727,7 +728,7 @@ struct
{NULL, NULL, NULL},
};
-/* sparc64 privileged registers. */
+/* sparc64 privileged and hyperprivileged registers. */
struct priv_reg_entry
{
@@ -753,10 +754,22 @@ struct priv_reg_entry priv_reg_table[] =
{"otherwin", 13},
{"wstate", 14},
{"fq", 15},
+ {"gl", 16},
{"ver", 31},
{"", -1}, /* End marker. */
};
+struct priv_reg_entry hpriv_reg_table[] =
+{
+ {"hpstate", 0},
+ {"htstate", 1},
+ {"hintp", 3},
+ {"htba", 5},
+ {"hver", 6},
+ {"hstick_cmpr", 31},
+ {"", -1}, /* End marker. */
+};
+
/* v9a specific asrs. */
struct priv_reg_entry v9a_asr_table[] =
@@ -1304,11 +1317,12 @@ md_assemble (str)
know (str);
special_case = sparc_ip (str, &insn);
+ if (insn == NULL)
+ return;
/* We warn about attempts to put a floating point branch in a delay slot,
unless the delay slot has been annulled. */
- if (insn != NULL
- && last_insn != NULL
+ if (last_insn != NULL
&& (insn->flags & F_FBR) != 0
&& (last_insn->flags & F_DELAYED) != 0
/* ??? This test isn't completely accurate. We assume anything with
@@ -1321,7 +1335,6 @@ md_assemble (str)
point instruction and a floating point branch. We insert one
automatically, with a warning. */
if (max_architecture < SPARC_OPCODE_ARCH_V9
- && insn != NULL
&& last_insn != NULL
&& (insn->flags & F_FBR) != 0
&& (last_insn->flags & F_FLOAT) != 0)
@@ -1417,7 +1430,9 @@ sparc_ip (str, pinsn)
break;
default:
- as_fatal (_("Unknown opcode: `%s'"), str);
+ as_bad (_("Unknown opcode: `%s'"), str);
+ *pinsn = NULL;
+ return special_case;
}
insn = (struct sparc_opcode *) hash_find (op_hash, str);
*pinsn = insn;
@@ -1573,6 +1588,42 @@ sparc_ip (str, pinsn)
goto error;
}
+ case '$':
+ case '%':
+ /* Parse a sparc64 hyperprivileged register. */
+ if (*s == '%')
+ {
+ struct priv_reg_entry *p = hpriv_reg_table;
+ unsigned int len = 9999999; /* Init to make gcc happy. */
+
+ s += 1;
+ while (p->name[0] > s[0])
+ p++;
+ while (p->name[0] == s[0])
+ {
+ len = strlen (p->name);
+ if (strncmp (p->name, s, len) == 0)
+ break;
+ p++;
+ }
+ if (p->name[0] != s[0])
+ {
+ error_message = _(": unrecognizable hyperprivileged register");
+ goto error;
+ }
+ if (*args == '$')
+ opcode |= (p->regnum << 14);
+ else
+ opcode |= (p->regnum << 25);
+ s += len;
+ continue;
+ }
+ else
+ {
+ error_message = _(": unrecognizable hyperprivileged register");
+ goto error;
+ }
+
case '_':
case '/':
/* Parse a v9a/v9b ancillary state register. */
@@ -2231,7 +2282,7 @@ sparc_ip (str, pinsn)
{
char *s1;
char *op_arg = NULL;
- expressionS op_exp;
+ static expressionS op_exp;
bfd_reloc_code_real_type old_reloc = the_insn.reloc;
/* Check for %hi, etc. */
@@ -2484,12 +2535,12 @@ sparc_ip (str, pinsn)
goto error;
}
- /* Constants that won't fit are checked in md_apply_fix3
+ /* Constants that won't fit are checked in md_apply_fix
and bfd_install_relocation.
??? It would be preferable to install the constants
into the insn here and save having to create a fixS
for each one. There already exists code to handle
- all the various cases (e.g. in md_apply_fix3 and
+ all the various cases (e.g. in md_apply_fix and
bfd_install_relocation) so duplicating all that code
here isn't right. */
}
@@ -2877,7 +2928,7 @@ output_insn (insn, the_insn)
the_insn->pcrel,
the_insn->reloc);
/* Turn off overflow checking in fixup_segment. We'll do our
- own overflow checking in md_apply_fix3. This is necessary because
+ own overflow checking in md_apply_fix. This is necessary because
the insn size is 4 and fixup_segment will signal an overflow for
large 8 byte quantities. */
fixP->fx_no_overflow = 1;
@@ -2996,7 +3047,7 @@ md_number_to_chars (buf, val, n)
hold. */
void
-md_apply_fix3 (fixP, valP, segment)
+md_apply_fix (fixP, valP, segment)
fixS *fixP;
valueT *valP;
segT segment ATTRIBUTE_UNUSED;
@@ -3012,7 +3063,41 @@ md_apply_fix3 (fixP, valP, segment)
#ifdef OBJ_ELF
/* SPARC ELF relocations don't use an addend in the data field. */
if (fixP->fx_addsy != NULL)
- return;
+ {
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_SPARC_TLS_GD_HI22:
+ case BFD_RELOC_SPARC_TLS_GD_LO10:
+ case BFD_RELOC_SPARC_TLS_GD_ADD:
+ case BFD_RELOC_SPARC_TLS_GD_CALL:
+ case BFD_RELOC_SPARC_TLS_LDM_HI22:
+ case BFD_RELOC_SPARC_TLS_LDM_LO10:
+ case BFD_RELOC_SPARC_TLS_LDM_ADD:
+ case BFD_RELOC_SPARC_TLS_LDM_CALL:
+ case BFD_RELOC_SPARC_TLS_LDO_HIX22:
+ case BFD_RELOC_SPARC_TLS_LDO_LOX10:
+ case BFD_RELOC_SPARC_TLS_LDO_ADD:
+ case BFD_RELOC_SPARC_TLS_IE_HI22:
+ case BFD_RELOC_SPARC_TLS_IE_LO10:
+ case BFD_RELOC_SPARC_TLS_IE_LD:
+ case BFD_RELOC_SPARC_TLS_IE_LDX:
+ case BFD_RELOC_SPARC_TLS_IE_ADD:
+ case BFD_RELOC_SPARC_TLS_LE_HIX22:
+ case BFD_RELOC_SPARC_TLS_LE_LOX10:
+ case BFD_RELOC_SPARC_TLS_DTPMOD32:
+ case BFD_RELOC_SPARC_TLS_DTPMOD64:
+ case BFD_RELOC_SPARC_TLS_DTPOFF32:
+ case BFD_RELOC_SPARC_TLS_DTPOFF64:
+ case BFD_RELOC_SPARC_TLS_TPOFF32:
+ case BFD_RELOC_SPARC_TLS_TPOFF64:
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
+
+ default:
+ break;
+ }
+
+ return;
+ }
#endif
/* This is a hack. There should be a better way to
@@ -3447,6 +3532,10 @@ tc_gen_reloc (section, fixp)
#else
#define GOT_NAME "__GLOBAL_OFFSET_TABLE_"
#endif
+#ifdef TE_VXWORKS
+#define GOTT_BASE "__GOTT_BASE__"
+#define GOTT_INDEX "__GOTT_INDEX__"
+#endif
/* This code must be parallel to the OBJ_ELF tc_fix_adjustable. */
@@ -3459,18 +3548,30 @@ tc_gen_reloc (section, fixp)
code = BFD_RELOC_SPARC_WPLT30;
break;
case BFD_RELOC_HI22:
- if (fixp->fx_addsy != NULL
- && strcmp (S_GET_NAME (fixp->fx_addsy), GOT_NAME) == 0)
- code = BFD_RELOC_SPARC_PC22;
- else
- code = BFD_RELOC_SPARC_GOT22;
+ code = BFD_RELOC_SPARC_GOT22;
+ if (fixp->fx_addsy != NULL)
+ {
+ if (strcmp (S_GET_NAME (fixp->fx_addsy), GOT_NAME) == 0)
+ code = BFD_RELOC_SPARC_PC22;
+#ifdef TE_VXWORKS
+ if (strcmp (S_GET_NAME (fixp->fx_addsy), GOTT_BASE) == 0
+ || strcmp (S_GET_NAME (fixp->fx_addsy), GOTT_INDEX) == 0)
+ code = BFD_RELOC_HI22; /* Unchanged. */
+#endif
+ }
break;
case BFD_RELOC_LO10:
- if (fixp->fx_addsy != NULL
- && strcmp (S_GET_NAME (fixp->fx_addsy), GOT_NAME) == 0)
- code = BFD_RELOC_SPARC_PC10;
- else
- code = BFD_RELOC_SPARC_GOT10;
+ code = BFD_RELOC_SPARC_GOT10;
+ if (fixp->fx_addsy != NULL)
+ {
+ if (strcmp (S_GET_NAME (fixp->fx_addsy), GOT_NAME) == 0)
+ code = BFD_RELOC_SPARC_PC10;
+#ifdef TE_VXWORKS
+ if (strcmp (S_GET_NAME (fixp->fx_addsy), GOTT_BASE) == 0
+ || strcmp (S_GET_NAME (fixp->fx_addsy), GOTT_INDEX) == 0)
+ code = BFD_RELOC_LO10; /* Unchanged. */
+#endif
+ }
break;
case BFD_RELOC_SPARC13:
code = BFD_RELOC_SPARC_GOT13;
@@ -3603,7 +3704,7 @@ md_pcrel_from (fixP)
of two. */
static int
-log2 (value)
+mylog2 (value)
int value;
{
int shift;
@@ -3705,7 +3806,7 @@ s_reserve (ignore)
if (align != 0)
{
- temp = log2 (align);
+ temp = mylog2 (align);
if (temp < 0)
{
as_bad (_("alignment not a power of 2"));
@@ -3843,7 +3944,7 @@ s_common (ignore)
if (temp > max_alignment)
{
temp = max_alignment;
- as_warn (_("alignment too large; assuming %d"), temp);
+ as_warn (_("alignment too large; assuming %ld"), (long) temp);
}
#endif
@@ -3868,7 +3969,7 @@ s_common (ignore)
if (temp == 0)
align = 0;
else
- align = log2 (temp);
+ align = mylog2 (temp);
if (align < 0)
{
@@ -3925,9 +4026,7 @@ s_common (ignore)
goto allocate_common;
}
-#ifdef BFD_ASSEMBLER
symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT;
-#endif
demand_empty_rest_of_line ();
return;
@@ -4191,7 +4290,7 @@ sparc_cons_align (nbytes)
if (sparc_no_align_cons)
return;
- nalign = log2 (nbytes);
+ nalign = mylog2 (nbytes);
if (nalign == 0)
return;
diff --git a/contrib/binutils/gas/config/tc-sparc.h b/contrib/binutils/gas/config/tc-sparc.h
index e99222bab589..14da16ad627a 100644
--- a/contrib/binutils/gas/config/tc-sparc.h
+++ b/contrib/binutils/gas/config/tc-sparc.h
@@ -1,6 +1,6 @@
/* tc-sparc.h - Macros and type defines for the sparc.
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,15 +16,13 @@
You should have received a copy of the GNU General Public
License along with GAS; see the file COPYING. If not, write
- to the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ to the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#ifndef TC_SPARC
#define TC_SPARC 1
-#ifdef ANSI_PROTOTYPES
struct frag;
-#endif
/* This is used to set the default value for `target_big_endian'. */
#define TARGET_BYTES_BIG_ENDIAN 1
@@ -39,13 +37,6 @@ extern const char *sparc_target_format PARAMS ((void));
#define RELOC_EXPANSION_POSSIBLE
#define MAX_RELOC_EXPANSION 2
-#if 0
-#ifdef TE_SPARCAOUT
-/* Bi-endian support may eventually be unconditional, but until things are
- working well it's only provided for targets that need it. */
-#define SPARC_BIENDIAN
-#endif
-#endif
/* Make it unconditional and check if -EL is valid after option parsing */
#define SPARC_BIENDIAN
@@ -116,7 +107,7 @@ extern void sparc_handle_align PARAMS ((struct frag *));
== S_GET_SEGMENT ((FIX)->fx_addsy))) \
|| S_IS_LOCAL ((FIX)->fx_addsy)))))
-/* Values passed to md_apply_fix3 don't include the symbol value. */
+/* Values passed to md_apply_fix don't include the symbol value. */
#define MD_APPLY_SYM_VALUE(FIX) 0
/* Finish up the entire symtab. */
diff --git a/contrib/binutils/gas/config/te-386bsd.h b/contrib/binutils/gas/config/te-386bsd.h
index da2d692f72f4..ad7769c50b41 100644
--- a/contrib/binutils/gas/config/te-386bsd.h
+++ b/contrib/binutils/gas/config/te-386bsd.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define TE_386BSD 1
diff --git a/contrib/binutils/gas/config/te-aux.h b/contrib/binutils/gas/config/te-aux.h
deleted file mode 100644
index 38445d9920ce..000000000000
--- a/contrib/binutils/gas/config/te-aux.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#define TE_AUX
-
-/* From obj-coff.h:
- This internal_lineno crap is to stop namespace pollution from the
- bfd internal coff headerfile. */
-#define internal_lineno bfd_internal_lineno
-#include "coff/aux-coff.h" /* override bits in coff/internal.h */
-#undef internal_lineno
-
-#define COFF_NOLOAD_PROBLEM
-#define KEEP_RELOC_INFO
-
-#include "obj-format.h"
-
-#ifndef LOCAL_LABELS_FB
-#define LOCAL_LABELS_FB 1
-#endif
diff --git a/contrib/binutils/gas/config/te-freebsd.h b/contrib/binutils/gas/config/te-freebsd.h
index 6992561bd592..eb16f3c46389 100644
--- a/contrib/binutils/gas/config/te-freebsd.h
+++ b/contrib/binutils/gas/config/te-freebsd.h
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Target environment for FreeBSD. It is the same as the generic
target, except that it arranges via the TE_FreeBSD define to
diff --git a/contrib/binutils/gas/config/te-nbsd.h b/contrib/binutils/gas/config/te-nbsd.h
index cb8dc092eb5e..e428fab68fcd 100644
--- a/contrib/binutils/gas/config/te-nbsd.h
+++ b/contrib/binutils/gas/config/te-nbsd.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define TE_NetBSD 1
#define LOCAL_LABELS_FB 1
diff --git a/contrib/binutils/gas/config/te-ppcnw.h b/contrib/binutils/gas/config/te-ppcnw.h
deleted file mode 100644
index 133759156ae8..000000000000
--- a/contrib/binutils/gas/config/te-ppcnw.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* te-ppcnw.h -- Power PC running Netware environment declarations.
- Copyright 1994, 1995, 2000 Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-/* Added these, because if we don't know what we're targeting we may
- need an assembler version of libgcc, and that will use local
- labels. */
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-
-/* these define interfaces */
-#include "obj-format.h"
-
-/* gcc uses escape sequences for ppc/netware. */
-
-#undef NO_STRING_ESCAPES
diff --git a/contrib/binutils/gas/config/te-sparcaout.h b/contrib/binutils/gas/config/te-sparcaout.h
index edd376617261..791811610349 100644
--- a/contrib/binutils/gas/config/te-sparcaout.h
+++ b/contrib/binutils/gas/config/te-sparcaout.h
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#define TE_SPARCAOUT 1
#include "obj-format.h"
diff --git a/contrib/binutils/gas/config/te-sysv32.h b/contrib/binutils/gas/config/te-sysv32.h
deleted file mode 100644
index c60728a975d6..000000000000
--- a/contrib/binutils/gas/config/te-sysv32.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Remove leading underscore from the gcc generated symbol names. */
-#define STRIP_UNDERSCORE
-
-#include "obj-format.h"
-
-/* end of te-sysv32.h */
diff --git a/contrib/binutils/gas/config/te-tmips.h b/contrib/binutils/gas/config/te-tmips.h
index 2fc6fd91005a..87d432884f58 100644
--- a/contrib/binutils/gas/config/te-tmips.h
+++ b/contrib/binutils/gas/config/te-tmips.h
@@ -1,5 +1,5 @@
/* Traditional MIPS targets
- Copyright 2000 Free Software Foundation, Inc.
+ Copyright 2000, 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file is te-tmips.h and is intended to provide support for
traditional mips targets like mips-dde-sysv4.2MP (Supermax ) ,
diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure
index e66abca67bc9..dca6497031ce 100755
--- a/contrib/binutils/gas/configure
+++ b/contrib/binutils/gas/configure
@@ -309,7 +309,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 AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot 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 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 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 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_files=''
# Initialize some variables set by options.
@@ -856,10 +856,10 @@ Optional Features:
--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-bfd-assembler use BFD back end for writing object files
- targets alternative target configurations besides the primary
+ --enable-targets alternative target configurations besides the primary
--enable-commonbfdlib build shared BFD/opcodes/libiberty library
- --enable-build-warnings Enable build-time compiler warnings if gcc is used
+ --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
@@ -971,7 +971,7 @@ esac
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
- cd "$ac_popdir"
+ cd $ac_popdir
done
fi
@@ -1994,7 +1994,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -2052,7 +2053,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -2168,7 +2170,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -2222,7 +2225,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -2267,7 +2271,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -2311,7 +2316,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -2389,7 +2395,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -2443,7 +2450,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -2477,7 +2485,7 @@ fi
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
-am__api_version="1.8"
+am__api_version="1.9"
# 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:
@@ -2629,13 +2637,21 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # Keeping the `.' argument allows $(mkdir_p) to be used without
- # argument. Indeed, we sometimes output rules like
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined.
- # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
- # expensive solution, as it forces Make to start a sub-shell.)
- mkdir_p='mkdir -p -- .'
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
@@ -2844,9 +2860,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
install_sh=${install_sh-"$am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user
@@ -2939,6 +2952,13 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
depcc="$CC" am_compiler_list=
@@ -3320,6 +3340,7 @@ cygwin* | mingw* |pw32*)
;;
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
@@ -3330,9 +3351,10 @@ darwin* | rhapsody*)
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -3390,17 +3412,10 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case $host_cpu in
- alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+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
@@ -3458,6 +3473,67 @@ 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*)
@@ -3791,7 +3867,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3794 "configure"' > conftest.$ac_ext
+ echo '#line 3870 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -3846,6 +3922,52 @@ ia64-*-hpux*)
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"
@@ -3887,7 +4009,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -4031,18 +4154,7 @@ exec 5>>./config.log
-user_bfd_gas=
-# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
-if test "${enable_bfd_assembler+set}" = set; then
- enableval="$enable_bfd_assembler"
- case "${enableval}" in
- yes) need_bfd=yes user_bfd_gas=yes ;;
- no) user_bfd_gas=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} given for bfd-assembler option" >&5
-echo "$as_me: error: bad value ${enableval} given for bfd-assembler option" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-fi; # Check whether --enable-targets or --disable-targets was given.
+# Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
enableval="$enable_targets"
case "${enableval}" in
@@ -4066,28 +4178,60 @@ esac
fi;
using_cgen=no
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+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) ;;
- no) build_warnings="-w";;
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi
-fi; WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
+fi;
+
+if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
+ echo "Setting warning flags = $WARN_CFLAGS" 6>&1
fi
+
+
+
# Generate a header file
ac_config_headers="$ac_config_headers config.h:config.in"
@@ -4108,6 +4252,238 @@ case "${host}" in
esac
+#We need this for the host. BOUT header is in host order.
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+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 <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#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
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+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 <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#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_bigendian=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ 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
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+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
+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 ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+_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_bigendian=no
+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_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+
te_file=generic
# Makefile target for installing gas in $(tooldir)/bin.
@@ -4148,55 +4524,17 @@ emulations=""
for this_target in $target $canon_targets ; do
- eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
-
- # check for architecture variants
- arch=
- endian=
- case ${cpu} in
- am33_2.0) cpu_type=mn10300 endian=little ;;
- alpha*) cpu_type=alpha ;;
- arm*b|xscale*b|strongarm*b) cpu_type=arm endian=big ;;
- arm*|xscale*|strongarm*) cpu_type=arm endian=little ;;
- c4x*) cpu_type=tic4x ;;
- hppa*) cpu_type=hppa ;;
- i[3-7]86) cpu_type=i386 arch=i386;;
- x86_64) cpu_type=i386 arch=x86_64;;
- ia64) cpu_type=ia64 ;;
- ip2k) cpu_type=ip2k endian=big ;;
- iq2000) cpu_type=iq2000 endian=big ;;
- m6811|m6812|m68hc12) cpu_type=m68hc11 ;;
- m680[012346]0) cpu_type=m68k ;;
- m68008) cpu_type=m68k ;;
- m683??) cpu_type=m68k ;;
- m5200) cpu_type=m68k ;;
- m8*) cpu_type=m88k ;;
- mips*el) cpu_type=mips endian=little ;;
- mips*) cpu_type=mips endian=big ;;
- or32*) cpu_type=or32 endian=big ;;
- pjl*) cpu_type=pj endian=little ;;
- pj*) cpu_type=pj endian=big ;;
- powerpc*le*) cpu_type=ppc endian=little ;;
- powerpc*) cpu_type=ppc endian=big ;;
- rs6000*) cpu_type=ppc ;;
- s390x*) cpu_type=s390 arch=s390x ;;
- s390*) cpu_type=s390 arch=s390 ;;
- sh5*) cpu_type=sh64 endian=big ;;
- sh5le*) cpu_type=sh64 endian=little ;;
- sh64*) cpu_type=sh64 endian=big ;;
- sh64le*) cpu_type=sh64 endian=little ;;
- sh*le) cpu_type=sh endian=little ;;
- sh*) cpu_type=sh endian=big ;;
- sparclite*) cpu_type=sparc arch=sparclite ;;
- sparclet*) cpu_type=sparc arch=sparclet ;;
- sparc64*) cpu_type=sparc arch=v9-64 ;;
- sparc86x*) cpu_type=sparc arch=sparc86x ;;
- sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
- v850*) cpu_type=v850 ;;
- xtensa*) cpu_type=xtensa arch=xtensa ;;
- m32r) cpu_type=m32r target_cpu=m32r endian=big ;;
- m32rle) cpu_type=m32r target_cpu=m32r endian=little ;;
- *) cpu_type=${cpu} ;;
+ targ=${this_target}
+ . ${srcdir}/configure.tgt
+
+ case ${target_cpu} in
+ crisv32)
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_CRIS_ARCH $arch
+_ACEOF
+
+ ;;
esac
if test ${this_target} = $target ; then
@@ -4205,371 +4543,78 @@ for this_target in $target $canon_targets ; do
continue
fi
- generic_target=${cpu_type}-$vendor-$os
- dev=no
- bfd_gas=no
- em=generic
-
- # assign object format
+ generic_target=${cpu_type}-${target_vendor}-${target_os}
case ${generic_target} in
- a29k-*-coff) fmt=coff ;;
- a29k-amd-udi) fmt=coff ;;
- a29k-amd-ebmon) fmt=coff ;;
- a29k-nyu-sym1) fmt=coff ;;
- a29k-*-rtems*) fmt=coff ;;
- a29k-*-vxworks*) fmt=coff ;;
-
- alpha*-*-*vms*) fmt=evax ;;
- alpha*-*-netware*) fmt=ecoff ;;
- alpha*-*-osf*) fmt=ecoff ;;
- alpha*-*-linuxecoff*) fmt=ecoff ;;
- alpha*-*-linux-gnu*) fmt=elf em=linux ;;
- alpha*-*-netbsd*) fmt=elf em=nbsd ;;
- alpha*-*-openbsd*) fmt=elf em=obsd ;;
-
- # cpu_type for am33_2.0 is set to mn10300
- mn10300-*-linux*) fmt=elf bfd_gas=yes em=linux ;;
-
- arc-*-elf*) fmt=elf ;;
-
- arm-*-aout) fmt=aout ;;
- arm-*-coff | thumb-*-coff) fmt=coff ;;
- arm-*-rtems* | thumb-*-rtems*) fmt=elf ;;
- arm-*-elf | thumb-*-elf) fmt=elf ;;
- arm-*-kaos*) fmt=elf ;;
- arm*-*-conix*) fmt=elf ;;
- arm-*-linux*aout*) fmt=aout em=linux ;;
- arm*-*-linux-gnu*) fmt=elf em=linux ;;
- arm*-*-uclinux*) fmt=elf em=linux ;;
- arm-*-netbsdelf*) fmt=elf em=nbsd ;;
- arm-*-*n*bsd*) fmt=aout em=nbsd ;;
- arm-**-nto*) fmt=elf ;;
- arm-*-oabi | thumb-*-oabi) fmt=elf ;;
- arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
- arm-wince-pe | arm-*-wince) fmt=coff em=wince-pe ;;
- arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
- arm-*-riscix*) fmt=aout em=riscix ;;
-
- avr-*-*) fmt=elf ;;
-
- cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
- cris-*-*) fmt=multi bfd_gas=yes ;;
-
- d10v-*-*) fmt=elf ;;
- d30v-*-*) fmt=elf ;;
- dlx-*-*) fmt=elf ;;
-
- fr30-*-*) fmt=elf ;;
- frv-*-*linux*) fmt=elf em=linux;;
- frv-*-*) fmt=elf ;;
-
- hppa-*-linux*) case ${cpu} in
- hppa*64*) fmt=elf em=hppalinux64;;
- hppa*) fmt=elf em=linux;;
- esac ;;
- hppa-*-*elf*) fmt=elf em=hppa ;;
- hppa-*-lites*) fmt=elf em=hppa ;;
- hppa-*-netbsd*) fmt=elf em=nbsd ;;
- hppa-*-openbsd*) fmt=elf em=hppa ;;
- hppa-*-osf*) fmt=som em=hppa ;;
- hppa-*-rtems*) fmt=elf em=hppa ;;
- hppa-*-hpux11*) case ${cpu} in
- hppa*64*) fmt=elf em=hppa64 ;;
- hppa*) fmt=som em=hppa ;;
- esac ;;
- hppa-*-hpux*) fmt=som em=hppa ;;
- hppa-*-mpeix*) fmt=som em=hppa ;;
- hppa-*-bsd*) fmt=som em=hppa ;;
- hppa-*-hiux*) fmt=som em=hppa ;;
-
- h8300-*-rtems*) fmt=coff ;;
- h8300-*-coff) fmt=coff ;;
- h8300-*-elf) fmt=elf ;;
- h8500-*-rtems*) fmt=coff ;;
- h8500-*-coff) fmt=coff ;;
-
- i370-*-elf* | i370-*-linux*) fmt=elf ;;
- i386-ibm-aix*) fmt=coff em=i386aix ;;
- i386-sequent-bsd*) fmt=aout em=dynix ;;
- i386-*-beospe*) fmt=coff em=pe ;;
- i386-*-beos*) fmt=elf ;;
- i386-*-coff) fmt=coff ;;
- i386-*-elf) fmt=elf ;;
- i386-*-kaos*) fmt=elf ;;
- i386-*-bsd*) fmt=aout em=386bsd ;;
- i386-*-netbsd0.8) fmt=aout em=386bsd ;;
- i386-*-netbsdpe*) fmt=coff em=pe ;;
- i386-*-netbsd*-gnu* | \
- i386-*-knetbsd*-gnu | \
- i386-*-netbsdelf*) fmt=elf em=nbsd ;;
- i386-*-*n*bsd*) case ${cpu} in
- x86_64) fmt=elf em=nbsd ;;
- *) fmt=aout em=nbsd ;;
- esac ;;
- i386-*-linux*aout*) fmt=aout em=linux ;;
- i386-*-linux*oldld) fmt=aout em=linux ;;
- i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-gnu*) fmt=elf em=linux ;;
- x86_64-*-linux-gnu*) fmt=elf em=linux ;;
- i386-*-lynxos*) fmt=coff em=lynx ;;
- i386-*-sysv[45]*) fmt=elf ;;
- i386-*-solaris*) fmt=elf ;;
- i386-*-freebsdaout*) fmt=aout em=386bsd ;;
- i386-*-freebsd[12].*) fmt=aout em=386bsd ;;
- i386-*-freebsd[12]) fmt=aout em=386bsd ;;
- i386-*-freebsd* | i386-*-kfreebsd*-gnu)
- fmt=elf em=freebsd ;;
- i386-*-sysv*) fmt=coff ;;
- i386-*-sco3.2v5*coff) fmt=coff ;;
- i386-*-isc*) fmt=coff ;;
- i386-*-sco3.2v5*) fmt=elf
- if test ${this_target} = $target; then
+ i386-*-sco3.2v5*)
+ if test ${this_target} = $target; then
cat >>confdefs.h <<\_ACEOF
#define SCO_ELF 1
_ACEOF
- fi ;;
- i386-*-sco3.2*) fmt=coff ;;
- i386-*-vsta) fmt=aout ;;
+ fi
+ ;;
+
i386-*-msdosdjgpp* \
| i386-*-go32* \
- | i386-go32-rtems*) fmt=coff em=go32
+ | i386-go32-rtems*)
cat >>confdefs.h <<\_ACEOF
#define STRICTCOFF 1
_ACEOF
- ;;
- i386-*-rtemself*) fmt=elf ;;
- i386-*-rtemscoff*) fmt=coff ;;
- i386-*-rtems*) fmt=elf ;;
- i386-*-gnu*) fmt=elf ;;
- i386-*-mach*) fmt=aout em=mach ;;
- i386-*-msdos*) fmt=aout ;;
- i386-*-moss*) fmt=elf ;;
- i386-*-pe) fmt=coff em=pe ;;
- i386-*-cygwin*) fmt=coff em=pe ;;
- i386-*-interix*) fmt=coff em=interix ;;
- i386-*-mingw32*) fmt=coff em=pe ;;
- i386-*-nto-qnx*) fmt=elf ;;
- i386-*-*nt*) fmt=coff em=pe ;;
- i386-*-chaos) fmt=elf ;;
-
- i860-*-*) fmt=elf endian=little
- { echo "$as_me:$LINENO: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&5
-echo "$as_me: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&2;} ;;
- i960-*-bout) fmt=bout ;;
- i960-*-coff) fmt=coff em=ic960 ;;
- i960-*-rtems*) fmt=coff em=ic960 ;;
- i960-*-nindy*) fmt=bout ;;
- i960-*-vxworks5.0) fmt=bout ;;
- i960-*-vxworks5.*) fmt=coff em=ic960 ;;
- i960-*-vxworks*) fmt=bout ;;
- i960-*-elf*) fmt=elf ;;
-
- ia64-*-elf*) fmt=elf ;;
- ia64-*-aix*) fmt=elf em=ia64aix ;;
- ia64-*-linux-gnu*) fmt=elf em=linux ;;
- ia64-*-hpux*) fmt=elf em=hpux ;;
- ia64-*-netbsd*) fmt=elf em=nbsd ;;
-
- ip2k-*-*) fmt=elf ;;
-
- iq2000-*-elf) fmt=elf bfd_gas=yes ;;
-
- m32r-*-elf*) fmt=elf ;;
- m32r-*-linux*) fmt=elf em=linux;;
-
- m68hc11-*-* | m6811-*-*) fmt=elf ;;
- m68hc12-*-* | m6812-*-*) fmt=elf ;;
-
- m68k-*-vxworks*) fmt=aout em=sun3 ;;
- m68k-ericsson-ose) fmt=aout em=sun3 ;;
- m68k-*-sunos*) fmt=aout em=sun3 ;;
- m68k-motorola-sysv*) fmt=coff em=delta ;;
- m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
- m68k-apollo-*) fmt=coff em=apollo ;;
- m68k-*-elf*) fmt=elf ;;
- m68k-*-sysv4*) fmt=elf em=svr4 ;;
- m68k-*-sysv*) fmt=coff ;;
- m68k-*-coff | m68k-*-rtemscoff*) fmt=coff ;;
- m68k-*-rtems*) fmt=elf ;;
- m68k-*-hpux*) fmt=hp300 em=hp300 ;;
- m68k-*-linux*aout*) fmt=aout em=linux ;;
- m68k-*-linux-gnu*) fmt=elf em=linux ;;
- m68k-*-uclinux*) fmt=elf ;;
- m68k-*-gnu*) fmt=elf ;;
- m68k-*-lynxos*) fmt=coff em=lynx ;;
- m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
- m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- m68k-apple-aux*) fmt=coff em=aux ;;
- m68k-*-psos*) fmt=elf em=psos;;
-
- m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
- m88k-*-coff*) fmt=coff ;;
-
- mcore-*-elf) fmt=elf ;;
- mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
-
- # don't change em like *-*-bsd does
- mips-dec-openbsd*) fmt=elf endian=little ;;
- mips-sony-bsd*) fmt=ecoff ;;
+
+ ;;
+
+ i860-*-*)
+ { echo "$as_me:$LINENO: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&5
+echo "$as_me: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&2;}
+ ;;
+
+ mips-sony-bsd*)
+ ;;
mips-*-bsd*)
- { { echo "$as_me:$LINENO: error: Unknown vendor for mips-bsd configuration." >&5
+ { { echo "$as_me:$LINENO: error: Unknown vendor for mips-bsd configuration." >&5
echo "$as_me: error: Unknown vendor for mips-bsd configuration." >&2;}
- { (exit 1); exit 1; }; } ;;
- mips-*-ultrix*) fmt=ecoff endian=little ;;
- mips-*-osf*) fmt=ecoff endian=little ;;
- mips-*-ecoff*) fmt=ecoff ;;
- mips-*-pe*) fmt=coff endian=little em=pe ;;
- mips-*-irix6*) fmt=elf em=irix ;;
- mips-*-irix5*) fmt=elf em=irix ;;
- mips-*-irix*) fmt=ecoff em=irix ;;
- mips-*-lnews*) fmt=ecoff em=lnews ;;
- mips-*-riscos*) fmt=ecoff ;;
- mips*-*-linux*) fmt=elf em=tmips ;;
- mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;;
- mips-*-sysv*) fmt=ecoff ;;
- mips-*-elf* | mips-*-rtems*) fmt=elf ;;
- mips-*-netbsd*) fmt=elf ;;
- mips-*-openbsd*) fmt=elf ;;
-
- mmix-*-*) fmt=elf ;;
- mn10200-*-*) fmt=elf ;;
- mn10300-*-*) fmt=elf ;;
- msp430-*-*) fmt=elf ;;
- openrisc-*-*) fmt=elf ;;
- or32-*-rtems*) fmt=elf ;;
- or32-*-coff) fmt=coff ;;
- or32-*-elf) fmt=elf ;;
- pj*) fmt=elf ;;
-
- ppc-*-pe | ppc-*-cygwin*) fmt=coff em=pe ;;
- ppc-*-winnt*) fmt=coff em=pe ;;
- ppc-*-aix5.[01]) fmt=coff em=aix5 ;;
- ppc-*-aix5.*) fmt=coff em=aix5
+ { (exit 1); exit 1; }; }
+ ;;
+
+ ppc-*-aix5.*)
cat >>confdefs.h <<\_ACEOF
#define AIX_WEAK_SUPPORT 1
_ACEOF
- ;;
- ppc-*-aix*) fmt=coff ;;
- ppc-*-beos*) fmt=coff ;;
- ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
- ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
- ppc-*-linux-gnu*) fmt=elf em=linux
- case "$endian" in
- big) ;;
- *) { { echo "$as_me:$LINENO: error: GNU/Linux must be configured big endian" >&5
+ ;;
+ ppc-*-linux-*)
+ case "$endian" in
+ big) ;;
+ *) { { echo "$as_me:$LINENO: error: GNU/Linux must be configured big endian" >&5
echo "$as_me: error: GNU/Linux must be configured big endian" >&2;}
{ (exit 1); exit 1; }; } ;;
- esac ;;
- ppc-*-solaris*) fmt=elf
- if test ${this_target} = $target; then
+ esac
+ ;;
+ ppc-*-solaris*)
+ if test ${this_target} = $target; then
cat >>confdefs.h <<\_ACEOF
#define TARGET_SOLARIS_COMMENT 1
_ACEOF
- fi
- if test x${endian} = xbig; then
- { { echo "$as_me:$LINENO: error: Solaris must be configured little endian" >&5
+ fi
+ if test x${endian} = xbig; then
+ { { echo "$as_me:$LINENO: error: Solaris must be configured little endian" >&5
echo "$as_me: error: Solaris must be configured little endian" >&2;}
{ (exit 1); exit 1; }; }
- fi ;;
- ppc-*-rtems*) fmt=elf ;;
- ppc-*-macos* | ppc-*-mpw*) fmt=coff em=macos ;;
- ppc-*-netware*) fmt=elf em=ppcnw ;;
- ppc-**-nto*) fmt=elf ;;
- ppc-*-kaos*) fmt=elf ;;
-
- s390x-*-linux-gnu*) fmt=elf em=linux ;;
- s390-*-linux-gnu*) fmt=elf em=linux ;;
-
- sh*-*-linux*) fmt=elf em=linux
- case ${cpu} in
- sh*eb) endian=big ;;
- *) endian=little ;;
- esac ;;
- sh5*-*-netbsd*) fmt=elf em=nbsd ;;
- sh64*-*-netbsd*) fmt=elf em=nbsd ;;
- sh*-*-netbsdelf*) fmt=elf em=nbsd ;;
- sh-*-elf*) fmt=elf ;;
- sh-*-coff*) fmt=coff ;;
- sh-*-nto*) fmt=elf ;;
- sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
- sh-*-rtemscoff*) fmt=coff ;;
- sh-*-rtems*) fmt=elf ;;
- sh-*-kaos*) fmt=elf ;;
- shle*-*-kaos*) fmt=elf ;;
- sh64-*-elf*) fmt=elf ;;
-
- ns32k-pc532-mach*) fmt=aout em=pc532mach ;;
- ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
- ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
- ns32k-*-*n*bsd*) fmt=aout em=nbsd532 ;;
-
- sparc-*-rtemsaout*) fmt=aout ;;
- sparc-*-rtemself*) fmt=elf ;;
- sparc-*-rtems*) fmt=elf ;;
- sparc-*-sunos4*) fmt=aout em=sun3 ;;
- sparc-*-aout | sparc*-*-vxworks*) fmt=aout em=sparcaout ;;
- sparc-*-coff) fmt=coff ;;
- sparc-*-linux*aout*) fmt=aout em=linux ;;
- sparc-*-linux-gnu*) fmt=elf em=linux ;;
- sparc-*-lynxos*) fmt=coff em=lynx ;;
- sparc-fujitsu-none) fmt=aout ;;
- sparc-*-elf) fmt=elf ;;
- sparc-*-sysv4*) fmt=elf ;;
- sparc-*-solaris*) fmt=elf ;;
- sparc-*-netbsdelf*) fmt=elf em=nbsd ;;
- sparc-*-*n*bsd*) case ${cpu} in
- sparc64) fmt=elf em=nbsd ;;
- *) fmt=aout em=nbsd ;;
- esac ;;
- strongarm-*-coff) fmt=coff ;;
- strongarm-*-elf) fmt=elf ;;
- strongarm-*-kaos*) fmt=elf ;;
- xscale-*-coff) fmt=coff ;;
- xscale-*-elf) fmt=elf ;;
-
- tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
- tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
- tic4x-*-* | c4x-*-*) fmt=coff bfd_gas=yes ;;
- tic54x-*-* | c54x*-*-*) fmt=coff bfd_gas=yes need_libm=yes;;
- tic80-*-*) fmt=coff ;;
-
- v850-*-*) fmt=elf ;;
- v850e-*-*) fmt=elf ;;
- v850ea-*-*) fmt=elf ;;
-
- vax-*-netbsdelf*) fmt=elf em=nbsd ;;
- vax-*-netbsd*) fmt=aout em=nbsd ;;
- vax-*-bsd* | vax-*-ultrix*) fmt=aout ;;
- vax-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
- vax-*-vms) fmt=vms ;;
-
- w65-*-*) fmt=coff ;;
-
- xstormy16-*-*) fmt=elf ;;
-
- xtensa-*-*) fmt=elf ;;
-
- z8k-*-coff | z8k-*-sim) fmt=coff ;;
-
- *-*-aout | *-*-scout) fmt=aout ;;
- *-*-freebsd* | *-*-kfreebsd*-gnu) fmt=elf em=freebsd ;;
- *-*-nindy*) fmt=bout ;;
- *-*-bsd*) fmt=aout em=sun3 ;;
- *-*-generic) fmt=generic ;;
- *-*-xray | *-*-hms) fmt=coff ;;
- *-*-sim) fmt=coff ;;
- *-*-elf | *-*-sysv4* | *-*-solaris*) fmt=elf dev=yes ;;
- *-*-aros*) fmt=elf em=linux bfd_gas=yes ;;
- *-*-vxworks | *-*-windiss) fmt=elf ;;
- *-*-netware) fmt=elf ;;
+ fi
+ ;;
+
+ sh*-*-symbianelf*)
+
+cat >>confdefs.h <<\_ACEOF
+#define TARGET_SYMBIAN 1
+_ACEOF
+
+ ;;
esac
if test ${this_target} = $target ; then
@@ -4588,13 +4633,6 @@ _ACEOF
fi
fi
- case ${cpu_type}-${fmt} in
- alpha*-* | arm-* | i386-* | ia64*-* | mips-* | ns32k-* \
- | pdp11-* | ppc-* | sparc-* | strongarm-* | xscale-* \
- | *-elf | *-ecoff | *-som)
- bfd_gas=yes ;;
- esac
-
# Other random stuff.
case ${cpu_type} in
@@ -4663,6 +4701,9 @@ echo "$as_me: error: $target_cpu isn't a supported MIPS CPU name" >&2;}
mips*-linux*)
mips_default_abi=O32_ABI
;;
+ mips64*-openbsd*)
+ mips_default_abi=N64_ABI
+ ;;
*)
mips_default_abi=NO_ABI
;;
@@ -4703,19 +4744,31 @@ _ACEOF
*opcodes*) shared_opcodes=true ;;
*) shared_opcodes=false ;;
esac
- if test "${shared_opcodes}" = "true"; then
- # A shared libopcodes must be linked against libbfd.
- need_bfd=yes
- fi
;;
esac
# Any other special object files needed ?
case ${cpu_type} in
+
+ bfin)
+ echo ${extra_objects} | grep -s "bfin-parse.o"
+ if test $? -ne 0 ; then
+ extra_objects="$extra_objects bfin-parse.o"
+ fi
+
+ echo ${extra_objects} | grep -s "bfin-lex.o"
+ if test $? -ne 0 ; then
+ extra_objects="$extra_objects bfin-lex.o"
+ fi
+ ;;
+
fr30 | ip2k | iq2000 | m32r | openrisc)
using_cgen=yes
;;
+ m32c)
+ using_cgen=yes
+ ;;
frv)
using_cgen=yes
;;
@@ -4743,6 +4796,10 @@ _ACEOF
fi
;;
+ mt)
+ using_cgen=yes
+ ;;
+
i386 | s390 | sparc)
if test $this_target = $target ; then
@@ -4757,6 +4814,10 @@ _ACEOF
using_cgen=yes
;;
+ xc16x)
+ using_cgen=yes
+ ;;
+
xtensa)
echo ${extra_objects} | grep -s "xtensa-relax.o"
if test $? -ne 0 ; then
@@ -4778,17 +4839,8 @@ _ACEOF
# See if we really can support this configuration with the emulation code.
if test $this_target = $target ; then
- primary_bfd_gas=$bfd_gas
obj_format=$fmt
te_file=$em
-
- if test $bfd_gas = no ; then
- # Can't support other configurations this way.
- break
- fi
- elif test $bfd_gas = no ; then
- # Can't support this configuration.
- break
fi
# From target name and format, produce a list of supported emulations.
@@ -4889,28 +4941,6 @@ echo "$as_me: error: GAS does not have support for object file format ${obj_form
{ (exit 1); exit 1; }; }
fi
-case ${user_bfd_gas}-${primary_bfd_gas} in
- yes-yes | no-no)
- # We didn't override user's choice.
- ;;
- no-yes)
- { echo "$as_me:$LINENO: WARNING: Use of BFD is required for ${target}; overriding config options." >&5
-echo "$as_me: WARNING: Use of BFD is required for ${target}; overriding config options." >&2;}
- ;;
- no-preferred)
- primary_bfd_gas=no
- ;;
- *-preferred)
- primary_bfd_gas=yes
- ;;
- yes-*)
- primary_bfd_gas=yes
- ;;
- -*)
- # User specified nothing.
- ;;
-esac
-
# Some COFF configurations want these random other flags set.
case ${obj_format} in
coff)
@@ -4935,8 +4965,8 @@ _ACEOF
esac
# Getting this done right is going to be a bitch. Each configuration specified
-# with --enable-targets=... should be checked for environment, format, cpu, and
-# bfd_gas setting.
+# with --enable-targets=... should be checked for environment, format, cpu
+# setting.
#
# For each configuration, the necessary object file support code must be linked
# in. This might be only one, it might be up to four. The necessary emulation
@@ -5039,11 +5069,6 @@ cat >>confdefs.h <<\_ACEOF
#define OBJ_MAYBE_GENERIC 1
_ACEOF
;;
- hp300)
-cat >>confdefs.h <<\_ACEOF
-#define OBJ_MAYBE_HP300 1
-_ACEOF
- ;;
ieee)
cat >>confdefs.h <<\_ACEOF
#define OBJ_MAYBE_IEEE 1
@@ -5054,11 +5079,6 @@ cat >>confdefs.h <<\_ACEOF
#define OBJ_MAYBE_SOM 1
_ACEOF
;;
- vms)
-cat >>confdefs.h <<\_ACEOF
-#define OBJ_MAYBE_VMS 1
-_ACEOF
- ;;
esac
extra_objects="$extra_objects obj-$fmt.o"
done
@@ -5091,16 +5111,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
- yes-*-coff) need_bfd=yes ;;
- no-*-coff) need_bfd=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define MANY_SEGMENTS 1
-_ACEOF
- ;;
-esac
-
reject_dev_configs=yes
case ${reject_dev_configs}-${dev} in
@@ -5117,15 +5127,6 @@ esac
-case "${primary_bfd_gas}" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define BFD_ASSEMBLER 1
-_ACEOF
-
- need_bfd=yes ;;
-esac
-
# do we need the opcodes library?
case "${need_opcodes}" in
yes)
@@ -5133,13 +5134,9 @@ yes)
;;
esac
-case "${need_bfd}" in
-yes)
- BFDLIB=../bfd/libbfd.la
- BFDVER_H=../bfd/bfdver.h
- ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
- ;;
-esac
+BFDLIB=../bfd/libbfd.la
+BFDVER_H=../bfd/bfdver.h
+ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
@@ -5540,7 +5537,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -5598,7 +5596,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -5714,7 +5713,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -5768,7 +5768,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -5813,7 +5814,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -5857,7 +5859,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -6019,7 +6022,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -6085,7 +6089,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -6174,7 +6179,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -6213,7 +6219,7 @@ if test "$LEX" = :; then
LEX=${am_missing_run}flex
fi
-ALL_LINGUAS="fr tr es"
+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
@@ -6577,7 +6583,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -6784,7 +6791,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -6844,7 +6852,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -6923,7 +6932,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -6988,7 +6998,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -7053,7 +7064,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -7117,7 +7129,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -7198,7 +7211,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -7339,7 +7353,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -7477,7 +7492,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -7661,7 +7677,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -7912,7 +7929,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -8106,7 +8124,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -8209,7 +8228,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -8280,7 +8300,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -8328,11 +8349,6 @@ echo "${ECHO_T}$USE_NLS" >&6
USE_INCLUDED_LIBINTL=no
if test "$USE_NLS" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
-_ACEOF
-
echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
@@ -8350,7 +8366,7 @@ echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
nls_cv_header_intl=
nls_cv_header_libgt=
- CATOBJEXT=NONE
+ CATOBJEXT=
if test "${ac_cv_header_libintl_h+set}" = set; then
echo "$as_me:$LINENO: checking for libintl.h" >&5
@@ -8382,7 +8398,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -8518,7 +8535,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -8582,7 +8600,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -8637,7 +8656,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -8777,7 +8797,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -8910,7 +8931,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -8942,8 +8964,10 @@ fi
- if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
+ 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
@@ -9114,6 +9138,13 @@ echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
+ if test "x$CATOBJEXT" != "x"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+ fi
if test "x$CATOBJEXT" != "x"; then
@@ -9178,7 +9209,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -9399,7 +9431,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -9563,7 +9596,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -9644,7 +9678,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -9785,7 +9820,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -9917,7 +9953,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
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'
+ { 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=$?
@@ -10030,7 +10067,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10133,7 +10171,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10171,8 +10210,9 @@ case "${need_libm}" in
yes)
LIBM=
case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
# These system don't have libm
+ # on darwin the libm is a symbolic link to libSystem.dylib
;;
*-ncr-sysv4.3*)
echo "$as_me:$LINENO: checking for _mwvalidcheckl in -lmw" >&5
@@ -10213,7 +10253,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10274,7 +10315,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10337,7 +10379,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10414,7 +10457,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10467,9 +10511,146 @@ gas_test_headers="
#endif
"
-echo "$as_me:$LINENO: checking whether declaration is required for strstr" >&5
-echo $ECHO_N "checking whether declaration is required for strstr... $ECHO_C" >&6
-if test "${gas_cv_decl_needed_strstr+set}" = set; then
+# Does errno.h declare errno, or do we have to add a separate declaration
+# for it?
+
+echo "$as_me:$LINENO: checking whether declaration is required for errno" >&5
+echo $ECHO_N "checking whether declaration is required for errno... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_errno+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 HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+int
+main ()
+{
+
+typedef int f;
+f x;
+x = (f) errno;
+
+ ;
+ 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
+ gas_cv_decl_needed_errno=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gas_cv_decl_needed_errno=yes
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_errno" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_errno" >&6
+if test $gas_cv_decl_needed_errno = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NEED_DECLARATION_ERRNO 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking for a known getopt prototype in unistd.h" >&5
+echo $ECHO_N "checking for a known getopt prototype in unistd.h... $ECHO_C" >&6
+if test "${gas_cv_decl_getopt_unistd_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 <unistd.h>
+int
+main ()
+{
+extern int getopt (int, char *const*, const char *);
+ ;
+ 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
+ gas_cv_decl_getopt_unistd_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gas_cv_decl_getopt_unistd_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: result: $gas_cv_decl_getopt_unistd_h" >&5
+echo "${ECHO_T}$gas_cv_decl_getopt_unistd_h" >&6
+if test $gas_cv_decl_getopt_unistd_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DECL_GETOPT 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether declaration is required for environ" >&5
+echo $ECHO_N "checking whether declaration is required for environ... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_environ+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -10483,9 +10664,9 @@ int
main ()
{
-typedef char *(*f)();
+typedef char **f;
f x;
-x = (f) strstr;
+x = (f) environ;
;
return 0;
@@ -10500,7 +10681,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10512,30 +10694,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gas_cv_decl_needed_strstr=no
+ gas_cv_decl_needed_environ=no
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gas_cv_decl_needed_strstr=yes
+gas_cv_decl_needed_environ=yes
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $gas_cv_decl_needed_strstr" >&5
-echo "${ECHO_T}$gas_cv_decl_needed_strstr" >&6
-if test $gas_cv_decl_needed_strstr = yes; then
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_environ" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_environ" >&6
+if test $gas_cv_decl_needed_environ = yes; then
cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_STRSTR 1
+#define NEED_DECLARATION_ENVIRON 1
_ACEOF
fi
-echo "$as_me:$LINENO: checking whether declaration is required for malloc" >&5
-echo $ECHO_N "checking whether declaration is required for malloc... $ECHO_C" >&6
-if test "${gas_cv_decl_needed_malloc+set}" = set; then
+echo "$as_me:$LINENO: checking whether declaration is required for ffs" >&5
+echo $ECHO_N "checking whether declaration is required for ffs... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_ffs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -10549,9 +10731,9 @@ int
main ()
{
-typedef char *(*f)();
+typedef int (*f)(int);
f x;
-x = (f) malloc;
+x = (f) ffs;
;
return 0;
@@ -10566,7 +10748,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10578,22 +10761,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gas_cv_decl_needed_malloc=no
+ gas_cv_decl_needed_ffs=no
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gas_cv_decl_needed_malloc=yes
+gas_cv_decl_needed_ffs=yes
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $gas_cv_decl_needed_malloc" >&5
-echo "${ECHO_T}$gas_cv_decl_needed_malloc" >&6
-if test $gas_cv_decl_needed_malloc = yes; then
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_ffs" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_ffs" >&6
+if test $gas_cv_decl_needed_ffs = yes; then
cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_MALLOC 1
+#define NEED_DECLARATION_FFS 1
_ACEOF
fi
@@ -10632,7 +10815,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10665,6 +10849,73 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking whether declaration is required for malloc" >&5
+echo $ECHO_N "checking whether declaration is required for malloc... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_malloc+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. */
+$gas_test_headers
+int
+main ()
+{
+
+typedef char *(*f)();
+f x;
+x = (f) malloc;
+
+ ;
+ 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
+ gas_cv_decl_needed_malloc=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gas_cv_decl_needed_malloc=yes
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_malloc" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_malloc" >&6
+if test $gas_cv_decl_needed_malloc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NEED_DECLARATION_MALLOC 1
+_ACEOF
+
+fi
+
+
echo "$as_me:$LINENO: checking whether declaration is required for sbrk" >&5
echo $ECHO_N "checking whether declaration is required for sbrk... $ECHO_C" >&6
if test "${gas_cv_decl_needed_sbrk+set}" = set; then
@@ -10698,7 +10949,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10731,9 +10983,9 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking whether declaration is required for environ" >&5
-echo $ECHO_N "checking whether declaration is required for environ... $ECHO_C" >&6
-if test "${gas_cv_decl_needed_environ+set}" = set; then
+echo "$as_me:$LINENO: checking whether declaration is required for strstr" >&5
+echo $ECHO_N "checking whether declaration is required for strstr... $ECHO_C" >&6
+if test "${gas_cv_decl_needed_strstr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -10747,9 +10999,9 @@ int
main ()
{
-typedef char **f;
+typedef char *(*f)();
f x;
-x = (f) environ;
+x = (f) strstr;
;
return 0;
@@ -10764,7 +11016,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
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'
+ { 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=$?
@@ -10776,33 +11029,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gas_cv_decl_needed_environ=no
+ gas_cv_decl_needed_strstr=no
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gas_cv_decl_needed_environ=yes
+gas_cv_decl_needed_strstr=yes
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $gas_cv_decl_needed_environ" >&5
-echo "${ECHO_T}$gas_cv_decl_needed_environ" >&6
-if test $gas_cv_decl_needed_environ = yes; then
+echo "$as_me:$LINENO: result: $gas_cv_decl_needed_strstr" >&5
+echo "${ECHO_T}$gas_cv_decl_needed_strstr" >&6
+if test $gas_cv_decl_needed_strstr = yes; then
cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_ENVIRON 1
+#define NEED_DECLARATION_STRSTR 1
_ACEOF
fi
-# Does errno.h declare errno, or do we have to add a separate declaration
-# for it?
-
-echo "$as_me:$LINENO: checking whether declaration is required for errno" >&5
-echo $ECHO_N "checking whether declaration is required for errno... $ECHO_C" >&6
-if test "${gas_cv_decl_needed_errno+set}" = set; then
+echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
+echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -10811,67 +11061,74 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
+$ac_includes_default
int
main ()
{
-
-typedef int f;
-f x;
-x = (f) errno;
+#ifndef vsnprintf
+ char *p = (char *) vsnprintf;
+#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
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'
+ { 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'
+ { 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
- gas_cv_decl_needed_errno=no
+ ac_cv_have_decl_vsnprintf=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gas_cv_decl_needed_errno=yes
+ac_cv_have_decl_vsnprintf=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $gas_cv_decl_needed_errno" >&5
-echo "${ECHO_T}$gas_cv_decl_needed_errno" >&6
-if test $gas_cv_decl_needed_errno = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
+if test $ac_cv_have_decl_vsnprintf = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_ERRNO 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 0
_ACEOF
+
fi
+
+
+
+
+
ac_config_files="$ac_config_files Makefile doc/Makefile po/Makefile.in:po/Make-in"
ac_config_commands="$ac_config_commands default"
@@ -11560,7 +11817,6 @@ s,@AUTOCONF@,$AUTOCONF,;t t
s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
-s,@AMTAR@,$AMTAR,;t t
s,@install_sh@,$install_sh,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
@@ -11569,6 +11825,9 @@ s,@mkdir_p@,$mkdir_p,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
s,@DEPDIR@,$DEPDIR,;t t
s,@am__include@,$am__include,;t t
s,@am__quote@,$am__quote,;t t
@@ -11583,6 +11842,7 @@ s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
+s,@NO_WERROR@,$NO_WERROR,;t t
s,@GDBINIT@,$GDBINIT,;t t
s,@cgen_cpu_prefix@,$cgen_cpu_prefix,;t t
s,@extra_objects@,$extra_objects,;t t
@@ -11626,6 +11886,9 @@ s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
s,@LIBM@,$LIBM,;t t
+s,@datarootdir@,$datarootdir,;t t
+s,@docdir@,$docdir,;t t
+s,@htmldir@,$htmldir,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
@@ -11794,6 +12057,11 @@ esac
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
+ 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. */
@@ -11832,12 +12100,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
fi;;
esac
done` || { (exit 1); exit 1; }
-
- 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
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
@@ -12251,27 +12513,21 @@ echo X"$mf" |
else
continue
fi
- grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # We invoke sed twice because it is the simplest approach to
- # changing $(DEPDIR) to its actual value in the expansion.
- for file in `sed -n '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in
index f7d0acbcae71..fe69a51c9259 100644
--- a/contrib/binutils/gas/configure.in
+++ b/contrib/binutils/gas/configure.in
@@ -22,16 +22,8 @@ AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
AM_PROG_LIBTOOL
-user_bfd_gas=
-AC_ARG_ENABLE(bfd-assembler,
-[ --enable-bfd-assembler use BFD back end for writing object files],
-[case "${enableval}" in
- yes) need_bfd=yes user_bfd_gas=yes ;;
- no) user_bfd_gas=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} given for bfd-assembler option) ;;
-esac])dnl
AC_ARG_ENABLE(targets,
-[ 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')
;;
@@ -48,26 +40,7 @@ esac])dnl
using_cgen=no
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-AC_ARG_ENABLE(build-warnings,
-[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
-[case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi])dnl
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
-fi
-AC_SUBST(WARN_CFLAGS)
+AM_BINUTILS_WARNINGS
# Generate a header file
AM_CONFIG_HEADER(config.h:config.in)
@@ -86,6 +59,9 @@ case "${host}" in
esac
AC_SUBST(GDBINIT)
+#We need this for the host. BOUT header is in host order.
+AC_C_BIGENDIAN
+
te_file=generic
# Makefile target for installing gas in $(tooldir)/bin.
@@ -114,59 +90,14 @@ emulations=""
for this_target in $target $canon_targets ; do
-changequote(,)dnl
- eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
-changequote([,])dnl
+ targ=${this_target}
+ . ${srcdir}/configure.tgt
- # check for architecture variants
- arch=
- endian=
- case ${cpu} in
- am33_2.0) cpu_type=mn10300 endian=little ;;
- alpha*) cpu_type=alpha ;;
- arm*b|xscale*b|strongarm*b) cpu_type=arm endian=big ;;
- arm*|xscale*|strongarm*) cpu_type=arm endian=little ;;
- c4x*) cpu_type=tic4x ;;
- hppa*) cpu_type=hppa ;;
-changequote(,)dnl
- i[3-7]86) cpu_type=i386 arch=i386;;
- x86_64) cpu_type=i386 arch=x86_64;;
- ia64) cpu_type=ia64 ;;
- ip2k) cpu_type=ip2k endian=big ;;
- iq2000) cpu_type=iq2000 endian=big ;;
- m6811|m6812|m68hc12) cpu_type=m68hc11 ;;
- m680[012346]0) cpu_type=m68k ;;
-changequote([,])dnl
- m68008) cpu_type=m68k ;;
- m683??) cpu_type=m68k ;;
- m5200) cpu_type=m68k ;;
- m8*) cpu_type=m88k ;;
- mips*el) cpu_type=mips endian=little ;;
- mips*) cpu_type=mips endian=big ;;
- or32*) cpu_type=or32 endian=big ;;
- pjl*) cpu_type=pj endian=little ;;
- pj*) cpu_type=pj endian=big ;;
- powerpc*le*) cpu_type=ppc endian=little ;;
- powerpc*) cpu_type=ppc endian=big ;;
- rs6000*) cpu_type=ppc ;;
- s390x*) cpu_type=s390 arch=s390x ;;
- s390*) cpu_type=s390 arch=s390 ;;
- sh5*) cpu_type=sh64 endian=big ;;
- sh5le*) cpu_type=sh64 endian=little ;;
- sh64*) cpu_type=sh64 endian=big ;;
- sh64le*) cpu_type=sh64 endian=little ;;
- sh*le) cpu_type=sh endian=little ;;
- sh*) cpu_type=sh endian=big ;;
- sparclite*) cpu_type=sparc arch=sparclite ;;
- sparclet*) cpu_type=sparc arch=sparclet ;;
- sparc64*) cpu_type=sparc arch=v9-64 ;;
- sparc86x*) cpu_type=sparc arch=sparc86x ;;
- sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
- v850*) cpu_type=v850 ;;
- xtensa*) cpu_type=xtensa arch=xtensa ;;
- m32r) cpu_type=m32r target_cpu=m32r endian=big ;;
- m32rle) cpu_type=m32r target_cpu=m32r endian=little ;;
- *) cpu_type=${cpu} ;;
+ case ${target_cpu} in
+ crisv32)
+ AC_DEFINE_UNQUOTED(DEFAULT_CRIS_ARCH, $arch,
+ [Default CRIS architecture.])
+ ;;
esac
if test ${this_target} = $target ; then
@@ -175,354 +106,53 @@ changequote([,])dnl
continue
fi
- generic_target=${cpu_type}-$vendor-$os
- dev=no
- bfd_gas=no
- em=generic
-
- # assign object format
+ generic_target=${cpu_type}-${target_vendor}-${target_os}
case ${generic_target} in
- a29k-*-coff) fmt=coff ;;
- a29k-amd-udi) fmt=coff ;;
- a29k-amd-ebmon) fmt=coff ;;
- a29k-nyu-sym1) fmt=coff ;;
- a29k-*-rtems*) fmt=coff ;;
- a29k-*-vxworks*) fmt=coff ;;
-
- alpha*-*-*vms*) fmt=evax ;;
- alpha*-*-netware*) fmt=ecoff ;;
- alpha*-*-osf*) fmt=ecoff ;;
- alpha*-*-linuxecoff*) fmt=ecoff ;;
- alpha*-*-linux-gnu*) fmt=elf em=linux ;;
- alpha*-*-netbsd*) fmt=elf em=nbsd ;;
- alpha*-*-openbsd*) fmt=elf em=obsd ;;
-
- # cpu_type for am33_2.0 is set to mn10300
- mn10300-*-linux*) fmt=elf bfd_gas=yes em=linux ;;
-
- arc-*-elf*) fmt=elf ;;
-
- arm-*-aout) fmt=aout ;;
- arm-*-coff | thumb-*-coff) fmt=coff ;;
- arm-*-rtems* | thumb-*-rtems*) fmt=elf ;;
- arm-*-elf | thumb-*-elf) fmt=elf ;;
- arm-*-kaos*) fmt=elf ;;
- arm*-*-conix*) fmt=elf ;;
- arm-*-linux*aout*) fmt=aout em=linux ;;
- arm*-*-linux-gnu*) fmt=elf em=linux ;;
- arm*-*-uclinux*) fmt=elf em=linux ;;
- arm-*-netbsdelf*) fmt=elf em=nbsd ;;
- arm-*-*n*bsd*) fmt=aout em=nbsd ;;
- arm-**-nto*) fmt=elf ;;
- arm-*-oabi | thumb-*-oabi) fmt=elf ;;
- arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
- arm-wince-pe | arm-*-wince) fmt=coff em=wince-pe ;;
- arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
- arm-*-riscix*) fmt=aout em=riscix ;;
-
- avr-*-*) fmt=elf ;;
-
- cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
- cris-*-*) fmt=multi bfd_gas=yes ;;
-
- d10v-*-*) fmt=elf ;;
- d30v-*-*) fmt=elf ;;
- dlx-*-*) fmt=elf ;;
-
- fr30-*-*) fmt=elf ;;
- frv-*-*linux*) fmt=elf em=linux;;
- frv-*-*) fmt=elf ;;
-
- hppa-*-linux*) case ${cpu} in
- hppa*64*) fmt=elf em=hppalinux64;;
- hppa*) fmt=elf em=linux;;
- esac ;;
- hppa-*-*elf*) fmt=elf em=hppa ;;
- hppa-*-lites*) fmt=elf em=hppa ;;
- hppa-*-netbsd*) fmt=elf em=nbsd ;;
- hppa-*-openbsd*) fmt=elf em=hppa ;;
- hppa-*-osf*) fmt=som em=hppa ;;
- hppa-*-rtems*) fmt=elf em=hppa ;;
- hppa-*-hpux11*) case ${cpu} in
- hppa*64*) fmt=elf em=hppa64 ;;
- hppa*) fmt=som em=hppa ;;
- esac ;;
- hppa-*-hpux*) fmt=som em=hppa ;;
- hppa-*-mpeix*) fmt=som em=hppa ;;
- hppa-*-bsd*) fmt=som em=hppa ;;
- hppa-*-hiux*) fmt=som em=hppa ;;
-
- h8300-*-rtems*) fmt=coff ;;
- h8300-*-coff) fmt=coff ;;
- h8300-*-elf) fmt=elf ;;
- h8500-*-rtems*) fmt=coff ;;
- h8500-*-coff) fmt=coff ;;
-
- i370-*-elf* | i370-*-linux*) fmt=elf ;;
- i386-ibm-aix*) fmt=coff em=i386aix ;;
- i386-sequent-bsd*) fmt=aout em=dynix ;;
- i386-*-beospe*) fmt=coff em=pe ;;
- i386-*-beos*) fmt=elf ;;
- i386-*-coff) fmt=coff ;;
- i386-*-elf) fmt=elf ;;
- i386-*-kaos*) fmt=elf ;;
- i386-*-bsd*) fmt=aout em=386bsd ;;
- i386-*-netbsd0.8) fmt=aout em=386bsd ;;
- i386-*-netbsdpe*) fmt=coff em=pe ;;
- i386-*-netbsd*-gnu* | \
- i386-*-knetbsd*-gnu | \
- i386-*-netbsdelf*) fmt=elf em=nbsd ;;
- i386-*-*n*bsd*) case ${cpu} in
- x86_64) fmt=elf em=nbsd ;;
- *) fmt=aout em=nbsd ;;
- esac ;;
- i386-*-linux*aout*) fmt=aout em=linux ;;
- i386-*-linux*oldld) fmt=aout em=linux ;;
- i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-gnu*) fmt=elf em=linux ;;
- x86_64-*-linux-gnu*) fmt=elf em=linux ;;
- i386-*-lynxos*) fmt=coff em=lynx ;;
-changequote(,)dnl
- i386-*-sysv[45]*) fmt=elf ;;
- i386-*-solaris*) fmt=elf ;;
- i386-*-freebsdaout*) fmt=aout em=386bsd ;;
- i386-*-freebsd[12].*) fmt=aout em=386bsd ;;
- i386-*-freebsd[12]) fmt=aout em=386bsd ;;
-changequote([,])dnl
- i386-*-freebsd* | i386-*-kfreebsd*-gnu)
- fmt=elf em=freebsd ;;
- i386-*-sysv*) fmt=coff ;;
- i386-*-sco3.2v5*coff) fmt=coff ;;
- i386-*-isc*) fmt=coff ;;
- i386-*-sco3.2v5*) fmt=elf
- if test ${this_target} = $target; then
- AC_DEFINE(SCO_ELF, 1, [Define if defaulting to ELF on SCO 5.])
- fi ;;
- i386-*-sco3.2*) fmt=coff ;;
- i386-*-vsta) fmt=aout ;;
+ i386-*-sco3.2v5*)
+ if test ${this_target} = $target; then
+ AC_DEFINE(SCO_ELF, 1, [Define if defaulting to ELF on SCO 5.])
+ fi
+ ;;
+
i386-*-msdosdjgpp* \
| i386-*-go32* \
- | i386-go32-rtems*) fmt=coff em=go32
- AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?]) ;;
- i386-*-rtemself*) fmt=elf ;;
- i386-*-rtemscoff*) fmt=coff ;;
- i386-*-rtems*) fmt=elf ;;
- i386-*-gnu*) fmt=elf ;;
- i386-*-mach*) fmt=aout em=mach ;;
- i386-*-msdos*) fmt=aout ;;
- i386-*-moss*) fmt=elf ;;
- i386-*-pe) fmt=coff em=pe ;;
- i386-*-cygwin*) fmt=coff em=pe ;;
- i386-*-interix*) fmt=coff em=interix ;;
- i386-*-mingw32*) fmt=coff em=pe ;;
- i386-*-nto-qnx*) fmt=elf ;;
- i386-*-*nt*) fmt=coff em=pe ;;
- i386-*-chaos) fmt=elf ;;
-
- i860-*-*) fmt=elf endian=little
- AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) ;;
- i960-*-bout) fmt=bout ;;
- i960-*-coff) fmt=coff em=ic960 ;;
- i960-*-rtems*) fmt=coff em=ic960 ;;
- i960-*-nindy*) fmt=bout ;;
- i960-*-vxworks5.0) fmt=bout ;;
- i960-*-vxworks5.*) fmt=coff em=ic960 ;;
- i960-*-vxworks*) fmt=bout ;;
- i960-*-elf*) fmt=elf ;;
-
- ia64-*-elf*) fmt=elf ;;
- ia64-*-aix*) fmt=elf em=ia64aix ;;
- ia64-*-linux-gnu*) fmt=elf em=linux ;;
- ia64-*-hpux*) fmt=elf em=hpux ;;
- ia64-*-netbsd*) fmt=elf em=nbsd ;;
-
- ip2k-*-*) fmt=elf ;;
-
- iq2000-*-elf) fmt=elf bfd_gas=yes ;;
-
- m32r-*-elf*) fmt=elf ;;
- m32r-*-linux*) fmt=elf em=linux;;
-
- m68hc11-*-* | m6811-*-*) fmt=elf ;;
- m68hc12-*-* | m6812-*-*) fmt=elf ;;
-
- m68k-*-vxworks*) fmt=aout em=sun3 ;;
- m68k-ericsson-ose) fmt=aout em=sun3 ;;
- m68k-*-sunos*) fmt=aout em=sun3 ;;
- m68k-motorola-sysv*) fmt=coff em=delta ;;
- m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
- m68k-apollo-*) fmt=coff em=apollo ;;
- m68k-*-elf*) fmt=elf ;;
- m68k-*-sysv4*) fmt=elf em=svr4 ;;
- m68k-*-sysv*) fmt=coff ;;
- m68k-*-coff | m68k-*-rtemscoff*) fmt=coff ;;
- m68k-*-rtems*) fmt=elf ;;
- m68k-*-hpux*) fmt=hp300 em=hp300 ;;
- m68k-*-linux*aout*) fmt=aout em=linux ;;
- m68k-*-linux-gnu*) fmt=elf em=linux ;;
- m68k-*-uclinux*) fmt=elf ;;
- m68k-*-gnu*) fmt=elf ;;
- m68k-*-lynxos*) fmt=coff em=lynx ;;
- m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
- m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- m68k-apple-aux*) fmt=coff em=aux ;;
- m68k-*-psos*) fmt=elf em=psos;;
-
- m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
- m88k-*-coff*) fmt=coff ;;
-
- mcore-*-elf) fmt=elf ;;
- mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
-
- # don't change em like *-*-bsd does
- mips-dec-openbsd*) fmt=elf endian=little ;;
- mips-sony-bsd*) fmt=ecoff ;;
+ | i386-go32-rtems*)
+ AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?])
+ ;;
+
+ i860-*-*)
+ AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress)
+ ;;
+
+ mips-sony-bsd*)
+ ;;
mips-*-bsd*)
- AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
- mips-*-ultrix*) fmt=ecoff endian=little ;;
- mips-*-osf*) fmt=ecoff endian=little ;;
- mips-*-ecoff*) fmt=ecoff ;;
- mips-*-pe*) fmt=coff endian=little em=pe ;;
- mips-*-irix6*) fmt=elf em=irix ;;
- mips-*-irix5*) fmt=elf em=irix ;;
- mips-*-irix*) fmt=ecoff em=irix ;;
- mips-*-lnews*) fmt=ecoff em=lnews ;;
- mips-*-riscos*) fmt=ecoff ;;
- mips*-*-linux*) fmt=elf em=tmips ;;
- mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;;
- mips-*-sysv*) fmt=ecoff ;;
- mips-*-elf* | mips-*-rtems*) fmt=elf ;;
- mips-*-netbsd*) fmt=elf ;;
- mips-*-openbsd*) fmt=elf ;;
-
- mmix-*-*) fmt=elf ;;
- mn10200-*-*) fmt=elf ;;
- mn10300-*-*) fmt=elf ;;
- msp430-*-*) fmt=elf ;;
- openrisc-*-*) fmt=elf ;;
- or32-*-rtems*) fmt=elf ;;
- or32-*-coff) fmt=coff ;;
- or32-*-elf) fmt=elf ;;
- pj*) fmt=elf ;;
-
- ppc-*-pe | ppc-*-cygwin*) fmt=coff em=pe ;;
- ppc-*-winnt*) fmt=coff em=pe ;;
-changequote(,)dnl
- ppc-*-aix5.[01]) fmt=coff em=aix5 ;;
-changequote([,])dnl
- ppc-*-aix5.*) fmt=coff em=aix5
- AC_DEFINE(AIX_WEAK_SUPPORT, 1,
+ AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.)
+ ;;
+
+ ppc-*-aix5.*)
+ AC_DEFINE(AIX_WEAK_SUPPORT, 1,
[Define if using AIX 5.2 value for C_WEAKEXT.])
- ;;
- ppc-*-aix*) fmt=coff ;;
- ppc-*-beos*) fmt=coff ;;
- ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
- ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
- ppc-*-linux-gnu*) fmt=elf em=linux
- case "$endian" in
- big) ;;
- *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
- esac ;;
- ppc-*-solaris*) fmt=elf
- if test ${this_target} = $target; then
- AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
- [Define if default target is PowerPC Solaris.])
- fi
- if test x${endian} = xbig; then
- AC_MSG_ERROR(Solaris must be configured little endian)
- fi ;;
- ppc-*-rtems*) fmt=elf ;;
- ppc-*-macos* | ppc-*-mpw*) fmt=coff em=macos ;;
- ppc-*-netware*) fmt=elf em=ppcnw ;;
- ppc-**-nto*) fmt=elf ;;
- ppc-*-kaos*) fmt=elf ;;
-
- s390x-*-linux-gnu*) fmt=elf em=linux ;;
- s390-*-linux-gnu*) fmt=elf em=linux ;;
-
- sh*-*-linux*) fmt=elf em=linux
- case ${cpu} in
- sh*eb) endian=big ;;
- *) endian=little ;;
- esac ;;
- sh5*-*-netbsd*) fmt=elf em=nbsd ;;
- sh64*-*-netbsd*) fmt=elf em=nbsd ;;
- sh*-*-netbsdelf*) fmt=elf em=nbsd ;;
- sh-*-elf*) fmt=elf ;;
- sh-*-coff*) fmt=coff ;;
- sh-*-nto*) fmt=elf ;;
- sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
- sh-*-rtemscoff*) fmt=coff ;;
- sh-*-rtems*) fmt=elf ;;
- sh-*-kaos*) fmt=elf ;;
- shle*-*-kaos*) fmt=elf ;;
- sh64-*-elf*) fmt=elf ;;
-
- ns32k-pc532-mach*) fmt=aout em=pc532mach ;;
- ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
- ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
- ns32k-*-*n*bsd*) fmt=aout em=nbsd532 ;;
-
- sparc-*-rtemsaout*) fmt=aout ;;
- sparc-*-rtemself*) fmt=elf ;;
- sparc-*-rtems*) fmt=elf ;;
- sparc-*-sunos4*) fmt=aout em=sun3 ;;
- sparc-*-aout | sparc*-*-vxworks*) fmt=aout em=sparcaout ;;
- sparc-*-coff) fmt=coff ;;
- sparc-*-linux*aout*) fmt=aout em=linux ;;
- sparc-*-linux-gnu*) fmt=elf em=linux ;;
- sparc-*-lynxos*) fmt=coff em=lynx ;;
- sparc-fujitsu-none) fmt=aout ;;
- sparc-*-elf) fmt=elf ;;
- sparc-*-sysv4*) fmt=elf ;;
- sparc-*-solaris*) fmt=elf ;;
- sparc-*-netbsdelf*) fmt=elf em=nbsd ;;
- sparc-*-*n*bsd*) case ${cpu} in
- sparc64) fmt=elf em=nbsd ;;
- *) fmt=aout em=nbsd ;;
- esac ;;
- strongarm-*-coff) fmt=coff ;;
- strongarm-*-elf) fmt=elf ;;
- strongarm-*-kaos*) fmt=elf ;;
- xscale-*-coff) fmt=coff ;;
- xscale-*-elf) fmt=elf ;;
-
- tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
- tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
- tic4x-*-* | c4x-*-*) fmt=coff bfd_gas=yes ;;
- tic54x-*-* | c54x*-*-*) fmt=coff bfd_gas=yes need_libm=yes;;
- tic80-*-*) fmt=coff ;;
-
- v850-*-*) fmt=elf ;;
- v850e-*-*) fmt=elf ;;
- v850ea-*-*) fmt=elf ;;
-
- vax-*-netbsdelf*) fmt=elf em=nbsd ;;
- vax-*-netbsd*) fmt=aout em=nbsd ;;
- vax-*-bsd* | vax-*-ultrix*) fmt=aout ;;
- vax-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
- vax-*-vms) fmt=vms ;;
-
- w65-*-*) fmt=coff ;;
-
- xstormy16-*-*) fmt=elf ;;
-
- xtensa-*-*) fmt=elf ;;
-
- z8k-*-coff | z8k-*-sim) fmt=coff ;;
-
- *-*-aout | *-*-scout) fmt=aout ;;
- *-*-freebsd* | *-*-kfreebsd*-gnu) fmt=elf em=freebsd ;;
- *-*-nindy*) fmt=bout ;;
- *-*-bsd*) fmt=aout em=sun3 ;;
- *-*-generic) fmt=generic ;;
- *-*-xray | *-*-hms) fmt=coff ;;
- *-*-sim) fmt=coff ;;
- *-*-elf | *-*-sysv4* | *-*-solaris*) fmt=elf dev=yes ;;
- *-*-aros*) fmt=elf em=linux bfd_gas=yes ;;
- *-*-vxworks | *-*-windiss) fmt=elf ;;
- *-*-netware) fmt=elf ;;
+ ;;
+ ppc-*-linux-*)
+ case "$endian" in
+ big) ;;
+ *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
+ esac
+ ;;
+ ppc-*-solaris*)
+ if test ${this_target} = $target; then
+ AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
+ [Define if default target is PowerPC Solaris.])
+ fi
+ if test x${endian} = xbig; then
+ AC_MSG_ERROR(Solaris must be configured little endian)
+ fi
+ ;;
+
+ sh*-*-symbianelf*)
+ AC_DEFINE(TARGET_SYMBIAN, 1, [Define if target is Symbian OS.])
+ ;;
esac
if test ${this_target} = $target ; then
@@ -538,13 +168,6 @@ changequote([,])dnl
fi
fi
- case ${cpu_type}-${fmt} in
- alpha*-* | arm-* | i386-* | ia64*-* | mips-* | ns32k-* \
- | pdp11-* | ppc-* | sparc-* | strongarm-* | xscale-* \
- | *-elf | *-ecoff | *-som)
- bfd_gas=yes ;;
- esac
-
# Other random stuff.
case ${cpu_type} in
@@ -615,6 +238,9 @@ changequote([,])dnl
mips*-linux*)
mips_default_abi=O32_ABI
;;
+ mips64*-openbsd*)
+ mips_default_abi=N64_ABI
+ ;;
*)
mips_default_abi=NO_ABI
;;
@@ -643,19 +269,31 @@ changequote([,])dnl
*opcodes*) shared_opcodes=true ;;
*) shared_opcodes=false ;;
esac
- if test "${shared_opcodes}" = "true"; then
- # A shared libopcodes must be linked against libbfd.
- need_bfd=yes
- fi
;;
esac
# Any other special object files needed ?
case ${cpu_type} in
+
+ bfin)
+ echo ${extra_objects} | grep -s "bfin-parse.o"
+ if test $? -ne 0 ; then
+ extra_objects="$extra_objects bfin-parse.o"
+ fi
+
+ echo ${extra_objects} | grep -s "bfin-lex.o"
+ if test $? -ne 0 ; then
+ extra_objects="$extra_objects bfin-lex.o"
+ fi
+ ;;
+
fr30 | ip2k | iq2000 | m32r | openrisc)
using_cgen=yes
;;
+ m32c)
+ using_cgen=yes
+ ;;
frv)
using_cgen=yes
;;
@@ -683,6 +321,10 @@ changequote([,])dnl
fi
;;
+ mt)
+ using_cgen=yes
+ ;;
+
i386 | s390 | sparc)
if test $this_target = $target ; then
AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
@@ -693,6 +335,10 @@ changequote([,])dnl
using_cgen=yes
;;
+ xc16x)
+ using_cgen=yes
+ ;;
+
xtensa)
echo ${extra_objects} | grep -s "xtensa-relax.o"
if test $? -ne 0 ; then
@@ -714,17 +360,8 @@ changequote([,])dnl
# See if we really can support this configuration with the emulation code.
if test $this_target = $target ; then
- primary_bfd_gas=$bfd_gas
obj_format=$fmt
te_file=$em
-
- if test $bfd_gas = no ; then
- # Can't support other configurations this way.
- break
- fi
- elif test $bfd_gas = no ; then
- # Can't support this configuration.
- break
fi
# From target name and format, produce a list of supported emulations.
@@ -818,27 +455,6 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})
fi
-case ${user_bfd_gas}-${primary_bfd_gas} in
- yes-yes | no-no)
- # We didn't override user's choice.
- ;;
- no-yes)
- AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.)
- ;;
- no-preferred)
- primary_bfd_gas=no
- ;;
- *-preferred)
- primary_bfd_gas=yes
- ;;
- yes-*)
- primary_bfd_gas=yes
- ;;
- -*)
- # User specified nothing.
- ;;
-esac
-
# Some COFF configurations want these random other flags set.
case ${obj_format} in
coff)
@@ -851,8 +467,8 @@ case ${obj_format} in
esac
# Getting this done right is going to be a bitch. Each configuration specified
-# with --enable-targets=... should be checked for environment, format, cpu, and
-# bfd_gas setting.
+# with --enable-targets=... should be checked for environment, format, cpu
+# setting.
#
# For each configuration, the necessary object file support code must be linked
# in. This might be only one, it might be up to four. The necessary emulation
@@ -895,10 +511,8 @@ 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?]) ;;
- hp300) AC_DEFINE(OBJ_MAYBE_HP300, 1, [HP300 support?]) ;;
ieee) AC_DEFINE(OBJ_MAYBE_IEEE, 1, [IEEE support?]) ;;
som) AC_DEFINE(OBJ_MAYBE_SOM, 1, [SOM support?]) ;;
- vms) AC_DEFINE(OBJ_MAYBE_VMS, 1, [VMS support?]) ;;
esac
extra_objects="$extra_objects obj-$fmt.o"
done
@@ -920,12 +534,6 @@ AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS, [Supported emulations.])
AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION",
[Default emulation.])
-case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
- yes-*-coff) need_bfd=yes ;;
- no-*-coff) need_bfd=yes
- AC_DEFINE(MANY_SEGMENTS, 1, [old COFF support?]) ;;
-esac
-
reject_dev_configs=yes
case ${reject_dev_configs}-${dev} in
@@ -941,11 +549,6 @@ AC_SUBST(install_tooldir)
AC_SUBST(atof)
dnl AC_SUBST(emulation)
-case "${primary_bfd_gas}" in
- yes) AC_DEFINE(BFD_ASSEMBLER, 1, [Use BFD interface?])
- need_bfd=yes ;;
-esac
-
# do we need the opcodes library?
case "${need_opcodes}" in
yes)
@@ -953,13 +556,9 @@ yes)
;;
esac
-case "${need_bfd}" in
-yes)
- BFDLIB=../bfd/libbfd.la
- BFDVER_H=../bfd/bfdver.h
- ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
- ;;
-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)
@@ -978,7 +577,7 @@ AC_PROG_CC
AC_PROG_YACC
AM_PROG_LEX
-ALL_LINGUAS="fr tr es"
+ALL_LINGUAS="fr tr es rw"
CY_GNU_GETTEXT
AM_MAINTAINER_MODE
@@ -1042,11 +641,6 @@ gas_test_headers="
#include <unistd.h>
#endif
"
-GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
-GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
-GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
-GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
-GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
# Does errno.h declare errno, or do we have to add a separate declaration
# for it?
@@ -1056,6 +650,30 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [
#endif
])
+AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
+AC_CACHE_VAL(gas_cv_decl_getopt_unistd_h,
+[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
+gas_cv_decl_getopt_unistd_h=yes, gas_cv_decl_getopt_unistd_h=no)])
+AC_MSG_RESULT($gas_cv_decl_getopt_unistd_h)
+if test $gas_cv_decl_getopt_unistd_h = yes; then
+ AC_DEFINE([HAVE_DECL_GETOPT], 1,
+ [Is the prototype for getopt in <unistd.h> in the expected format?])
+fi
+
+GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(ffs, f, int (*f)(int), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
+
+AC_CHECK_DECLS([vsnprintf])
+
+dnl Required for html and install-html targets.
+AC_SUBST(datarootdir)
+AC_SUBST(docdir)
+AC_SUBST(htmldir)
+
dnl This must come last.
dnl We used to make symlinks to files in the source directory, but now
diff --git a/contrib/binutils/gas/debug.c b/contrib/binutils/gas/debug.c
index 7d1038736d95..fe2ed8c6536f 100644
--- a/contrib/binutils/gas/debug.c
+++ b/contrib/binutils/gas/debug.c
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Routines for debug use only. */
diff --git a/contrib/binutils/gas/dep-in.sed b/contrib/binutils/gas/dep-in.sed
index 2e2717ccc675..f23c2018fe97 100644
--- a/contrib/binutils/gas/dep-in.sed
+++ b/contrib/binutils/gas/dep-in.sed
@@ -3,6 +3,7 @@
/\\$/b loop
s! \.\./! !g
+s! \./! !g
s!@INCDIR@!$(INCDIR)!g
s!@TOPDIR@/include!$(INCDIR)!g
s!@BFDDIR@!$(BFDDIR)!g
diff --git a/contrib/binutils/gas/depend.c b/contrib/binutils/gas/depend.c
index 127c819180d7..4a264aa7038c 100644
--- a/contrib/binutils/gas/depend.c
+++ b/contrib/binutils/gas/depend.c
@@ -1,5 +1,5 @@
/* depend.c - Handle dependency tracking.
- Copyright 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "as.h"
diff --git a/contrib/binutils/gas/doc/Makefile.am b/contrib/binutils/gas/doc/Makefile.am
index 7f0f805fbc58..d48a9ccb2412 100644
--- a/contrib/binutils/gas/doc/Makefile.am
+++ b/contrib/binutils/gas/doc/Makefile.am
@@ -8,7 +8,7 @@ CONFIG=all
# Options to extract the man page from as.texinfo
MANCONF = -Dman
-TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
+TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
--release="binutils-$(VERSION)" --section=1
@@ -17,33 +17,35 @@ man_MANS = as.1
info_TEXINFOS = as.texinfo
+AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
+TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
+
asconfig.texi: $(CONFIG).texi
rm -f asconfig.texi
- ln -s $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
- || ln $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
- || cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
+ cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
+ chmod u+w ./asconfig.texi
CPU_DOCS = \
- c-a29k.texi \
c-alpha.texi \
c-arc.texi \
c-arm.texi \
+ c-bfin.texi \
c-d10v.texi \
c-cris.texi \
c-h8300.texi \
- c-h8500.texi \
c-hppa.texi \
c-i370.texi \
c-i386.texi \
c-i860.texi \
c-i960.texi \
c-ip2k.texi \
+ c-m32c.texi \
c-m32r.texi \
c-m68hc11.texi \
c-m68k.texi \
- c-m88k.texi \
c-mips.texi \
c-mmix.texi \
+ c-mt.texi \
c-msp430.texi \
c-ns32k.texi \
c-pdp11.texi \
@@ -56,26 +58,46 @@ CPU_DOCS = \
c-vax.texi \
c-v850.texi \
c-xtensa.texi \
+ c-z80.texi \
c-z8k.texi
-gasver.texi: Makefile
+gasver.texi: $(srcdir)/../../bfd/configure
rm -f $@
- echo '@set VERSION $(VERSION)' > $@
+ eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
+ echo "@set VERSION $$VERSION" > $@
-as.info: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
-as.dvi: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
+$(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
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
+
# This one isn't ready for prime time yet. Not even a little bit.
noinst_TEXINFOS = internals.texi
-DISTCLEANFILES = asconfig.texi
-
-MAINTAINERCLEANFILES = gasver.texi
+MAINTAINERCLEANFILES = asconfig.texi gasver.texi
BASEDIR = $(srcdir)/../..
BFDDIR = $(BASEDIR)/bfd
@@ -85,7 +107,7 @@ CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
# Maintenance
# We need it for the taz target in ../../Makefile.in.
-info: $(MANS)
+info-local: $(MANS)
# Build the man page from the texinfo file
# The sed command removes the no-adjust Nroff command so that
diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in
index 0c6a1b0ab986..cd9dad2baaf8 100644
--- a/contrib/binutils/gas/doc/Makefile.in
+++ b/contrib/binutils/gas/doc/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.8.4 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,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,8 +40,8 @@ subdir = doc
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \
- $(top_srcdir)/configure.in
+ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
+ $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
@@ -50,7 +50,6 @@ CONFIG_CLEAN_FILES =
depcomp =
am__depfiles_maybe =
SOURCES =
-DIST_SOURCES =
INFO_DEPS = $(srcdir)/as.info
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
@@ -59,11 +58,6 @@ PDFS = as.pdf
PSS = as.ps
HTMLS = as.html
TEXINFOS = as.texinfo
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
- echo $(top_srcdir)/../texinfo/util/texi2dvi; \
- else \
- echo texi2dvi; \
- fi`
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
@@ -130,6 +124,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
OPCODES_LIB = @OPCODES_LIB@
PACKAGE = @PACKAGE@
@@ -159,6 +154,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
atof = @atof@
bindir = @bindir@
build = @build@
@@ -168,6 +165,8 @@ build_os = @build_os@
build_vendor = @build_vendor@
cgen_cpu_prefix = @cgen_cpu_prefix@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
exec_prefix = @exec_prefix@
extra_objects = @extra_objects@
host = @host@
@@ -175,6 +174,7 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@@ -206,33 +206,35 @@ CONFIG = all
# Options to extract the man page from as.texinfo
MANCONF = -Dman
-TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
+TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
--release="binutils-$(VERSION)" --section=1
man_MANS = as.1
info_TEXINFOS = as.texinfo
+AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
+TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
CPU_DOCS = \
- c-a29k.texi \
c-alpha.texi \
c-arc.texi \
c-arm.texi \
+ c-bfin.texi \
c-d10v.texi \
c-cris.texi \
c-h8300.texi \
- c-h8500.texi \
c-hppa.texi \
c-i370.texi \
c-i386.texi \
c-i860.texi \
c-i960.texi \
c-ip2k.texi \
+ c-m32c.texi \
c-m32r.texi \
c-m68hc11.texi \
c-m68k.texi \
- c-m88k.texi \
c-mips.texi \
c-mmix.texi \
+ c-mt.texi \
c-msp430.texi \
c-ns32k.texi \
c-pdp11.texi \
@@ -245,13 +247,14 @@ CPU_DOCS = \
c-vax.texi \
c-v850.texi \
c-xtensa.texi \
+ c-z80.texi \
c-z8k.texi
+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
-DISTCLEANFILES = asconfig.texi
-MAINTAINERCLEANFILES = gasver.texi
+MAINTAINERCLEANFILES = asconfig.texi gasver.texi
BASEDIR = $(srcdir)/../..
BFDDIR = $(BASEDIR)/bfd
CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
@@ -299,16 +302,14 @@ distclean-libtool:
-rm -f libtool
.texinfo.info:
- restore=: && \
- backupdir="$(am__leading_dot)am$$$$" && \
+ 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; \
- fi; \
- done; \
+ 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 $@ $<; \
@@ -320,8 +321,7 @@ distclean-libtool:
cd $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
- rm -rf $$backupdir; \
- exit $$rc
+ rm -rf $$backupdir; exit $$rc
.texinfo.dvi:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
@@ -334,18 +334,28 @@ distclean-libtool:
$(TEXI2PDF) $<
.texinfo.html:
- $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $@ $<
- if test ! -d $@ && test -d $(@:.html=); then \
- mv $(@:.html=) $@; else :; fi
+ rm -rf $(@:.html=.htp)
+ if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $(@:.html=.htp) $<; \
+ then \
+ rm -rf $@; \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+ else \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ 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 $@ $<
uninstall-info-am:
- $(PRE_UNINSTALL)
+ @$(PRE_UNINSTALL)
@if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
@@ -361,7 +371,7 @@ uninstall-info-am:
relfile=`echo "$$file" | sed 's|^.*/||'`; \
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if cd "$(DESTDIR)$(infodir)"; then \
- echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \
done
@@ -470,8 +480,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f $(CONFIG_CLEAN_FILES)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -493,7 +502,9 @@ html: html-am
html-am: $(HTMLS)
-info-am: $(INFO_DEPS)
+info: info-am
+
+info-am: $(INFO_DEPS) info-local
install-data-am: install-data-local install-man
@@ -559,11 +570,11 @@ uninstall-man: uninstall-man1
.PHONY: all all-am check check-am clean clean-generic clean-info \
clean-libtool dist-info distclean distclean-generic \
- distclean-libtool dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-data-local \
- install-exec install-exec-am install-info install-info-am \
- install-man install-man1 install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+ distclean-libtool dvi dvi-am html html-am info info-am \
+ info-local install install-am install-data install-data-am \
+ install-data-local install-exec install-exec-am install-info \
+ install-info-am install-man install-man1 install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
@@ -572,25 +583,43 @@ uninstall-man: uninstall-man1
asconfig.texi: $(CONFIG).texi
rm -f asconfig.texi
- ln -s $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
- || ln $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
- || cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
+ cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
+ chmod u+w ./asconfig.texi
-gasver.texi: Makefile
+gasver.texi: $(srcdir)/../../bfd/configure
rm -f $@
- echo '@set VERSION $(VERSION)' > $@
+ eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
+ echo "@set VERSION $$VERSION" > $@
-as.info: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
-as.dvi: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
+$(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
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
+
# Maintenance
# We need it for the taz target in ../../Makefile.in.
-info: $(MANS)
+info-local: $(MANS)
# Build the man page from the texinfo file
# The sed command removes the no-adjust Nroff command so that
diff --git a/contrib/binutils/gas/doc/all.texi b/contrib/binutils/gas/doc/all.texi
index 4e302cea1f6c..5192f5471c97 100644
--- a/contrib/binutils/gas/doc/all.texi
+++ b/contrib/binutils/gas/doc/all.texi
@@ -1,4 +1,5 @@
-@c Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002
+@c Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002,
+@c 2003, 2005
@c Free Software Foundation, Inc.
@c This file is part of the documentation for the GAS manual
@@ -19,35 +20,36 @@
@c Object formats of interest
@c ==========================
@set AOUT
-@set BOUT
@set COFF
@set ELF
@set SOM
@c CPUs of interest
@c ================
-@set A29K
@set ALPHA
@set ARC
@set ARM
+@set BFIN
@set CRIS
@set D10V
@set D30V
@set H8/300
-@set H8/500
@set HPPA
@set I370
@set I80386
@set I860
@set I960
+@set IA64
@set IP2K
+@set M32C
@set M32R
+@set xc16x
@set M68HC11
@set M680X0
-@set M880X0
@set MCORE
@set MIPS
@set MMIX
+@set MS1
@set MSP430
@set PDP11
@set PJ
@@ -57,8 +59,8 @@
@set TIC54X
@set V850
@set VAX
-@set VXWORKS
@set XTENSA
+@set Z80
@set Z8000
@c Does this version of the assembler use the difference-table kluge?
diff --git a/contrib/binutils/gas/doc/as.1 b/contrib/binutils/gas/doc/as.1
index e16cbe920aa2..89e3b4c2c7c8 100644
--- a/contrib/binutils/gas/doc/as.1
+++ b/contrib/binutils/gas/doc/as.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,19 +128,21 @@
.\" ========================================================================
.\"
.IX Title "AS 1"
-.TH AS 1 "2004-05-17" "binutils-2.15" "GNU Development Tools"
+.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\-D\fR] [\fB\-\-defsym\fR \fIsym\fR=\fIval\fR]
- [\fB\-f\fR] [\fB\-\-gstabs\fR] [\fB\-\-gstabs+\fR] [\fB\-\-gdwarf2\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\-\-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\-\-target\-help\fR] [\fItarget-options\fR]
+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
@@ -158,16 +160,18 @@ as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-D\fR] [\fB\-\-defsym\fR \fIsym\f
[\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\-moabi\fR] [\fB\-k\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]
@@ -183,9 +187,21 @@ as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-D\fR] [\fB\-\-defsym\fR \fIsym\f
\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]
@@ -208,7 +224,7 @@ as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-D\fR] [\fB\-\-defsym\fR \fIsym\f
\&\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\-\-membedded\-pic\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]
@@ -219,6 +235,8 @@ as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-D\fR] [\fB\-\-defsym\fR \fIsym\f
[\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
@@ -256,10 +274,20 @@ as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-D\fR] [\fB\-\-defsym\fR \fIsym\f
[\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\-]density\fR] [\fB\-\-[no\-]relax\fR] [\fB\-\-[no\-]generics\fR]
- [\fB\-\-[no\-]text\-section\-literals\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.
@@ -311,7 +339,7 @@ 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
+\& 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
@@ -325,6 +353,19 @@ 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:
@@ -360,6 +401,9 @@ 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
@@ -371,8 +415,17 @@ Define the symbol \fIsym\fR to be \fIvalue\fR before assembling the input file.
indicates a hexadecimal value, and a leading \fB0\fR indicates an octal value.
.IP "\fB\-f\fR" 4
.IX Item "-f"
-``fast''\-\-\-skip whitespace and comment preprocessing (assume source is
+\&\*(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
@@ -384,8 +437,8 @@ 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\-\-gdwarf2\fR" 4
-.IX Item "--gdwarf2"
+.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.
@@ -435,6 +488,17 @@ 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
@@ -504,8 +568,8 @@ 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 | \-moabi\fR" 4
-.IX Item "-mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi"
+.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"
@@ -562,6 +626,15 @@ 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"
@@ -604,7 +677,7 @@ 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 \f(CW@ref\fR{PDP\-11\-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
@@ -635,10 +708,10 @@ The following options are available when as is configured for
a picoJava processor.
.IP "\fB\-mb\fR" 4
.IX Item "-mb"
-Generate ``big endian'' format output.
+Generate \*(L"big endian\*(R" format output.
.IP "\fB\-ml\fR" 4
.IX Item "-ml"
-Generate ``little endian'' format output.
+Generate \*(L"little endian\*(R" format output.
.PP
The following options are available when as is configured for the
Motorola 68HC11 or 68HC12 series.
@@ -728,10 +801,10 @@ implicitly with the \f(CW\*(C`gp\*(C'\fR register. It is only accepted for targ
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 ``big endian'' format output.
+Generate \*(L"big endian\*(R" format output.
.IP "\fB\-EL\fR" 4
.IX Item "-EL"
-Generate ``little endian'' format output.
+Generate \*(L"little endian\*(R" format output.
.IP "\fB\-mips1\fR" 4
.IX Item "-mips1"
.PD 0
@@ -828,6 +901,24 @@ This tells the assembler to accept \s-1MIPS\-3D\s0 instructions.
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
@@ -923,29 +1014,20 @@ 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\-\-density | \-\-no\-density\fR" 4
-.IX Item "--density | --no-density"
-Enable or disable use of instructions from the Xtensa code density
-option. This is enabled by default when the Xtensa processor supports
-the code density option.
-.IP "\fB\-\-relax | \-\-no\-relax\fR" 4
-.IX Item "--relax | --no-relax"
-Enable or disable instruction relaxation. This is enabled by default.
-Note: In the current implementation, these options also control whether
-assembler optimizations are performed, making these options equivalent
-to \fB\-\-generics\fR and \fB\-\-no\-generics\fR.
-.IP "\fB\-\-generics | \-\-no\-generics\fR" 4
-.IX Item "--generics | --no-generics"
-Enable or disable all assembler transformations of Xtensa instructions.
-The default is \fB\-\-generics\fR;
-\&\fB\-\-no\-generics\fR should be used only in the rare cases when the
-instructions must be exactly as specified in the assembly source.
.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.
+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
@@ -955,6 +1037,63 @@ expense of some code density. The default is \fB\-\-target\-align\fR.
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.
@@ -967,4 +1106,4 @@ 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 ``\s-1GNU\s0 Free Documentation License''.
+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 d9d23dff59f4..6daaed028c7b 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
+@c 2001, 2002, 2003, 2004, 2005
@c Free Software Foundation, Inc.
@c UPDATE!! On future updates--
@c (1) check for new machine-dep cmdline options in
@@ -45,9 +45,6 @@
@ifset H8/300
@set H8
@end ifset
-@ifset H8/500
-@set H8
-@end ifset
@ifset SH
@set H8
@end ifset
@@ -226,21 +223,20 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@c to be limited to one line for the header.
@smallexample
@c man begin SYNOPSIS
-@value{AS} [@b{-a}[@b{cdhlns}][=@var{file}]] [@b{-D}] [@b{--defsym} @var{sym}=@var{val}]
- [@b{-f}] [@b{--gstabs}] [@b{--gstabs+}] [@b{--gdwarf2}] [@b{--help}]
- [@b{-I} @var{dir}] [@b{-J}] [@b{-K}] [@b{-L}]
- [@b{--listing-lhs-width}=@var{NUM}] [@b{--listing-lhs-width2}=@var{NUM}]
- [@b{--listing-rhs-width}=@var{NUM}] [@b{--listing-cont-lines}=@var{NUM}]
- [@b{--keep-locals}] [@b{-o} @var{objfile}] [@b{-R}] [@b{--statistics}] [@b{-v}]
- [@b{-version}] [@b{--version}] [@b{-W}] [@b{--warn}] [@b{--fatal-warnings}]
- [@b{-w}] [@b{-x}] [@b{-Z}] [@b{--target-help}] [@var{target-options}]
+@value{AS} [@b{-a}[@b{cdhlns}][=@var{file}]] [@b{--alternate}] [@b{-D}]
+ [@b{--defsym} @var{sym}=@var{val}] [@b{-f}] [@b{-g}] [@b{--gstabs}]
+ [@b{--gstabs+}] [@b{--gdwarf-2}] [@b{--help}] [@b{-I} @var{dir}] [@b{-J}]
+ [@b{-K}] [@b{-L}] [@b{--listing-lhs-width}=@var{NUM}]
+ [@b{--listing-lhs-width2}=@var{NUM}] [@b{--listing-rhs-width}=@var{NUM}]
+ [@b{--listing-cont-lines}=@var{NUM}] [@b{--keep-locals}] [@b{-o}
+ @var{objfile}] [@b{-R}] [@b{--reduce-memory-overheads}] [@b{--statistics}]
+ [@b{-v}] [@b{-version}] [@b{--version}] [@b{-W}] [@b{--warn}]
+ [@b{--fatal-warnings}] [@b{-w}] [@b{-x}] [@b{-Z}] [@b{@@@var{FILE}}]
+ [@b{--target-help}] [@var{target-options}]
[@b{--}|@var{files} @dots{}]
@c
@c Target dependent options are listed below. Keep the list sorted.
@c Add an empty line for separation.
-@ifset A29K
-@c am29k has no machine-dependent assembler options
-@end ifset
@ifset ALPHA
@emph{Target Alpha options:}
@@ -263,11 +259,12 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
[@b{-march}=@var{architecture}[+@var{extension}@dots{}]]
[@b{-mfpu}=@var{floating-point-format}]
[@b{-mfloat-abi}=@var{abi}]
+ [@b{-meabi}=@var{ver}]
[@b{-mthumb}]
[@b{-EB}|@b{-EL}]
[@b{-mapcs-32}|@b{-mapcs-26}|@b{-mapcs-float}|
@b{-mapcs-reentrant}]
- [@b{-mthumb-interwork}] [@b{-moabi}] [@b{-k}]
+ [@b{-mthumb-interwork}] [@b{-k}]
@end ifset
@ifset CRIS
@@ -275,6 +272,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
[@b{--underscore} | @b{--no-underscore}]
[@b{--pic}] [@b{-N}]
[@b{--emulation=criself} | @b{--emulation=crisaout}]
+ [@b{--march=v0_v10} | @b{--march=v10} | @b{--march=v32} | @b{--march=common_v10_v32}]
@c Deprecated -- deliberately not documented.
@c [@b{-h}] [@b{-H}]
@end ifset
@@ -313,6 +311,9 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
[@b{-mconstant-gp}|@b{-mauto-pic}]
[@b{-milp32}|@b{-milp64}|@b{-mlp64}|@b{-mp64}]
[@b{-mle}|@b{mbe}]
+ [@b{-mtune=itanium1}|@b{-mtune=itanium2}]
+ [@b{-munwind-check=warning}|@b{-munwind-check=error}]
+ [@b{-mhint.b=ok}|@b{-mhint.b=warning}|@b{-mhint.b=error}]
[@b{-x}|@b{-xexplicit}] [@b{-xauto}] [@b{-xdebug}]
@end ifset
@ifset IP2K
@@ -320,6 +321,11 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@emph{Target IP2K options:}
[@b{-mip2022}|@b{-mip2022ext}]
@end ifset
+@ifset M32C
+
+@emph{Target M32C options:}
+ [@b{-m32c}|@b{-m16c}]
+@end ifset
@ifset M32R
@emph{Target M32R options:}
@@ -352,7 +358,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{--membedded-pic}]
+ [@b{-non_shared}] [@b{-xgot}]
[@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}]
@@ -363,6 +369,8 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
[@b{-mips16}] [@b{-no-mips16}]
[@b{-mips3d}] [@b{-no-mips3d}]
[@b{-mdmx}] [@b{-no-mdmx}]
+ [@b{-mdsp}] [@b{-mno-dsp}]
+ [@b{-mmt}] [@b{-mno-mt}]
[@b{-mdebug}] [@b{-no-mdebug}]
[@b{-mpdr}] [@b{-mno-pdr}]
@end ifset
@@ -413,15 +421,29 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
[@b{-mcpu=54[123589]}|@b{-mcpu=54[56]lp}] [@b{-mfar-mode}|@b{-mf}]
[@b{-merrors-to-file} @var{<filename>}|@b{-me} @var{<filename>}]
@end ifset
+
+@ifset Z80
+
+@emph{Target Z80 options:}
+ [@b{-z80}] [@b{-r800}]
+ [@b{ -ignore-undocumented-instructions}] [@b{-Wnud}]
+ [@b{ -ignore-unportable-instructions}] [@b{-Wnup}]
+ [@b{ -warn-undocumented-instructions}] [@b{-Wud}]
+ [@b{ -warn-unportable-instructions}] [@b{-Wup}]
+ [@b{ -forbid-undocumented-instructions}] [@b{-Fud}]
+ [@b{ -forbid-unportable-instructions}] [@b{-Fup}]
+@end ifset
+
@ifset Z8000
@c Z8000 has no machine-dependent assembler options
@end ifset
@ifset XTENSA
@emph{Target Xtensa options:}
- [@b{--[no-]density}] [@b{--[no-]relax}] [@b{--[no-]generics}]
- [@b{--[no-]text-section-literals}]
+ [@b{--[no-]text-section-literals}] [@b{--[no-]absolute-literals}]
[@b{--[no-]target-align}] [@b{--[no-]longcalls}]
+ [@b{--[no-]transform}]
+ [@b{--rename-section} @var{oldname}=@var{newname}]
@end ifset
@c man end
@end smallexample
@@ -429,6 +451,8 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@c man begin OPTIONS
@table @gcctabopt
+@include at-file.texi
+
@item -a[cdhlmns]
Turn on listings, in any of a variety of ways:
@@ -462,6 +486,9 @@ You may combine these options; for example, use @samp{-aln} for assembly
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}}.
+
@item -D
Ignored. This option is accepted for script compatibility with calls to
other assemblers.
@@ -475,6 +502,12 @@ indicates a hexadecimal value, and a leading @samp{0} indicates an octal value.
``fast''---skip whitespace and comment preprocessing (assume source is
compiler output).
+@item -g
+@itemx --gen-debug
+Generate debugging information for each assembler source line using whichever
+debug format is preferred by the target. This currently means either STABS,
+ECOFF or DWARF2.
+
@item --gstabs
Generate stabs debugging information for each assembler line. This
may help debugging assembler code, if the debugger can handle it.
@@ -486,7 +519,7 @@ debuggers crash or refuse to read your program. This
may help debugging assembler code. Currently the only GNU extension is
the location of the current working directory at assembling time.
-@item --gdwarf2
+@item --gdwarf-2
Generate DWARF2 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.
@@ -539,6 +572,18 @@ Name the object-file output from @command{@value{AS}} @var{objfile}.
@item -R
Fold the data section into the text section.
+@kindex --hash-size=@var{number}
+Set the default size of GAS's hash tables to a prime number close to
+@var{number}. 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.
+
+@item --reduce-memory-overheads
+This option reduces GAS's memory requirements, at the expense of making the
+assembly processes slower. Currently this switch is a synonym for
+@samp{--hash-size=4051}, but in the future it may have other effects as well.
+
@item --statistics
Print the maximum space (in bytes) and total time (in seconds) used by
assembly.
@@ -604,7 +649,7 @@ Select which Floating Point architecture is the target.
Select which floating point ABI is in use.
@item -mthumb
Enable Thumb only instruction decoding.
-@item -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi
+@item -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant
Select which procedure calling convention is in use.
@item -EB | -EL
Select either big-endian (-EB) or little-endian (-EL) output.
@@ -684,6 +729,21 @@ just the basic IP2022 ones.
@end table
@end ifset
+@ifset M32C
+The following options are available when @value{AS} is configured for the
+Renesas M32C and M16C processors.
+
+@table @gcctabopt
+
+@item -m32c
+Assemble M32C instructions.
+
+@item -m16c
+Assemble M16C instructions (the default).
+
+@end table
+@end ifset
+
@ifset M32R
The following options are available when @value{AS} is configured for the
Renesas M32R (formerly Mitsubishi M32R) series.
@@ -958,6 +1018,18 @@ Generate code for the MDMX Application Specific Extension.
This tells the assembler to accept MDMX instructions.
@samp{-no-mdmx} turns off this option.
+@item -mdsp
+@itemx -mno-dsp
+Generate code for the DSP Application Specific Extension.
+This tells the assembler to accept DSP instructions.
+@samp{-mno-dsp} turns off this option.
+
+@item -mmt
+@itemx -mno-mt
+Generate code for the MT Application Specific Extension.
+This tells the assembler to accept MT instructions.
+@samp{-mno-mt} turns off this option.
+
@item --construct-floats
@itemx --no-construct-floats
The @samp{--no-construct-floats} option disables the construction of
@@ -1051,28 +1123,19 @@ The following options are available when @value{AS} is configured for
an Xtensa processor.
@table @gcctabopt
-@item --density | --no-density
-Enable or disable use of instructions from the Xtensa code density
-option. This is enabled by default when the Xtensa processor supports
-the code density option.
-
-@item --relax | --no-relax
-Enable or disable instruction relaxation. This is enabled by default.
-Note: In the current implementation, these options also control whether
-assembler optimizations are performed, making these options equivalent
-to @option{--generics} and @option{--no-generics}.
-
-@item --generics | --no-generics
-Enable or disable all assembler transformations of Xtensa instructions.
-The default is @option{--generics};
-@option{--no-generics} should be used only in the rare cases when the
-instructions must be exactly as specified in the assembly source.
-
@item --text-section-literals | --no-text-section-literals
With @option{--text-@-section-@-literals}, literal pools are interspersed
in the text section. The default is
@option{--no-@-text-@-section-@-literals}, which places literals in a
-separate section in the output file.
+separate section in the output file. These options only affect literals
+referenced via PC-relative @code{L32R} instructions; literals for
+absolute mode @code{L32R} instructions are handled separately.
+
+@item --absolute-literals | --no-absolute-literals
+Indicate to the assembler whether @code{L32R} instructions use absolute
+or PC-relative addressing. The default is to assume absolute addressing
+if the Xtensa processor includes the absolute @code{L32R} addressing
+option. Otherwise, only the PC-relative @code{L32R} mode can be used.
@item --target-align | --no-target-align
Enable or disable automatic alignment to reduce branch penalties at the
@@ -1082,6 +1145,41 @@ expense of some code density. The default is @option{--target-@-align}.
Enable or disable transformation of call instructions to allow calls
across a greater range of addresses. The default is
@option{--no-@-longcalls}.
+
+@item --transform | --no-transform
+Enable or disable all assembler transformations of Xtensa instructions.
+The default is @option{--transform};
+@option{--no-transform} should be used only in the rare cases when the
+instructions must be exactly as specified in the assembly source.
+@end table
+@end ifset
+
+@ifset Z80
+The following options are available when @value{AS} is configured for
+a Z80 family processor.
+@table @gcctabopt
+@item -z80
+Assemble for Z80 processor.
+@item -r800
+Assemble for R800 processor.
+@item -ignore-undocumented-instructions
+@itemx -Wnud
+Assemble undocumented Z80 instructions that also work on R800 without warning.
+@item -ignore-unportable-instructions
+@itemx -Wnup
+Assemble all undocumented Z80 instructions without warning.
+@item -warn-undocumented-instructions
+@itemx -Wud
+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.
+@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.
@end table
@end ifset
@@ -1132,10 +1230,6 @@ For information on the H8/300 machine instruction set, see @cite{H8/300
Series Programming Manual}. For the H8/300H, see @cite{H8/300H Series
Programming Manual} (Renesas).
@end ifset
-@ifset H8/500
-For information on the H8/500 machine instruction set, see @cite{H8/500
-Series Programming Manual} (Renesas M21T001).
-@end ifset
@ifset SH
For information on the Renesas (formerly Hitachi) / SuperH SH machine instruction set,
see @cite{SH-Microcomputer User's Manual} (Renesas) or
@@ -1225,10 +1319,6 @@ For the @value{TARGET} target, @command{@value{AS}} is configured to produce
@value{OBJ-NAME} format object files.
@end ifclear
@c The following should exhaust all configs that set MULTI-OBJ, ideally
-@ifset A29K
-On the @value{TARGET}, @command{@value{AS}} can be configured to produce either
-@code{a.out} or COFF format object files.
-@end ifset
@ifset I960
On the @value{TARGET}, @command{@value{AS}} can be configured to produce either
@code{b.out} or COFF format object files.
@@ -1395,14 +1485,6 @@ the current input file is used. If a logical line number was given
@ifset GENERIC
(@pxref{Line,,@code{.line}})
@end ifset
-@ifclear GENERIC
-@ifclear A29K
-(@pxref{Line,,@code{.line}})
-@end ifclear
-@ifset A29K
-(@pxref{Ln,,@code{.ln}})
-@end ifset
-@end ifclear
then it is used to calculate the number printed,
otherwise the actual line in the current source file is printed. The
message text is intended to be self explanatory (in the grand Unix
@@ -1456,6 +1538,7 @@ assembler.)
@menu
* a:: -a[cdhlns] enable listings
+* alternate:: --alternate enable alternate macro syntax
* D:: -D for compatibility
* f:: -f to work faster
* I:: -I for .include search path
@@ -1528,6 +1611,12 @@ directives. This is because the listing code buffers input source lines from
stdin only after they have been preprocessed by the assembler. This reduces
memory usage and makes the code more efficient.
+@node alternate
+@section @option{--alternate}
+
+@kindex --alternate
+Begin in alternate macro mode, see @ref{Altmacro,,@code{.altmacro}}.
+
@node D
@section @option{-D}
@@ -2035,9 +2124,6 @@ This means you may not nest these comments.
@cindex line comment character
Anything from the @dfn{line comment} character to the next newline
is considered a comment and is ignored. The line comment character is
-@ifset A29K
-@samp{;} for the AMD 29K family;
-@end ifset
@ifset ARC
@samp{;} on the ARC;
@end ifset
@@ -2047,9 +2133,6 @@ is considered a comment and is ignored. The line comment character is
@ifset H8/300
@samp{;} for the H8/300 family;
@end ifset
-@ifset H8/500
-@samp{!} for the H8/500 family;
-@end ifset
@ifset HPPA
@samp{;} for the HPPA;
@end ifset
@@ -2077,6 +2160,9 @@ is considered a comment and is ignored. The line comment character is
@ifset IP2K
@samp{#} on the ip2k;
@end ifset
+@ifset M32C
+@samp{#} on the m32c;
+@end ifset
@ifset M32R
@samp{#} on the m32r;
@end ifset
@@ -2086,12 +2172,12 @@ is considered a comment and is ignored. The line comment character is
@ifset M68HC11
@samp{#} on the 68HC11 and 68HC12;
@end ifset
-@ifset M880X0
-@samp{;} on the M880x0;
-@end ifset
@ifset VAX
@samp{#} on the Vax;
@end ifset
+@ifset Z80
+@samp{;} for the Z80;
+@end ifset
@ifset Z8000
@samp{!} for the Z8000;
@end ifset
@@ -2181,12 +2267,6 @@ the preceding statement. Newlines and semicolons within character
constants are an exception: they do not end statements.
@end ifclear
@ifset abnormal-separator
-@ifset A29K
-A @dfn{statement} ends at a newline character (@samp{\n}) or an ``at''
-sign (@samp{@@}). The newline or at sign is considered part of the
-preceding statement. Newlines and at signs within character constants
-are an exception: they do not end statements.
-@end ifset
@ifset HPPA
A @dfn{statement} ends at a newline character (@samp{\n}) or an exclamation
point (@samp{!}). The newline or exclamation point is considered part of the
@@ -2195,9 +2275,7 @@ constants are an exception: they do not end statements.
@end ifset
@ifset H8
A @dfn{statement} ends at a newline character (@samp{\n}); or (for the
-H8/300) a dollar sign (@samp{$}); or (for the
-Renesas-SH or the
-H8/500) a semicolon
+H8/300) a dollar sign (@samp{$}); or (for the Renesas-SH) a semicolon
(@samp{;}). 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.
@@ -2416,12 +2494,9 @@ grave accent. A newline
(or semicolon @samp{;})
@end ifclear
@ifset abnormal-separator
-@ifset A29K
-(or at sign @samp{@@})
-@end ifset
@ifset H8
(or dollar sign @samp{$}, for the H8/300; or semicolon @samp{;} for the
-Renesas SH or H8/500)
+Renesas SH)
@end ifset
@end ifset
@end ifclear
@@ -2524,8 +2599,7 @@ A letter, to tell @command{@value{AS}} the rest of the number is a flonum.
4.2 assembler seems to allow any of @samp{defghDEFGH}.)
@end ignore
-On the H8/300, H8/500,
-Renesas / SuperH SH,
+On the H8/300, Renesas / SuperH SH,
and AMD 29K architectures, the letter must be
one of the letters @samp{DFPRSX} (in upper or lower case).
@@ -2538,9 +2612,6 @@ one of the letters @samp{DFT} (in upper or lower case).
On the HPPA architecture, the letter must be @samp{E} (upper case only).
@end ifset
@ifclear GENERIC
-@ifset A29K
-One of the letters @samp{DFPRSX} (in upper or lower case).
-@end ifset
@ifset ARC
One of the letters @samp{DFRS} (in upper or lower case).
@end ifset
@@ -2661,8 +2732,7 @@ run-time addresses to sections is called @dfn{relocation}. It includes
the task of adjusting mentions of object-file addresses so they refer to
the proper run-time addresses.
@ifset H8
-For the H8/300 and H8/500,
-and for the Renesas / SuperH SH,
+For the H8/300, and for the Renesas / SuperH SH,
@command{@value{AS}} pads sections if needed to
ensure they end on a word (sixteen bit) boundary.
@end ifset
@@ -2954,7 +3024,7 @@ of @command{@value{AS}}.)
@end ifset
@ifclear GENERIC
@ifset H8
-On the H8/300 and H8/500 platforms, each subsection is zero-padded to a word
+On the H8/300 platform, each subsection is zero-padded to a word
boundary (two bytes).
The same is true on the Renesas SH.
@end ifset
@@ -2966,10 +3036,6 @@ The same is true on the Renesas SH.
@c these paragraphs might need to vanish from this manual, and be
@c discussed in BFD chapter of binutils (or some such).
@end ifset
-@ifset A29K
-On the AMD 29K family, no particular padding is added to section or
-subsection sizes; @value{AS} forces no alignment on this platform.
-@end ifset
@end ifclear
Subsections appear in your object file in numeric order, lowest numbered
@@ -2982,9 +3048,9 @@ data subsections as a data section.
To specify which subsection you want subsequent statements assembled
into, use a numeric argument to specify it, in a @samp{.text
@var{expression}} or a @samp{.data @var{expression}} statement.
-@ifset COFF-ELF
+@ifset COFF
@ifset GENERIC
-When generating COFF or ELF output, you
+When generating COFF output, you
@end ifset
@ifclear GENERIC
You
@@ -2993,6 +3059,16 @@ can also use an extra subsection
argument with arbitrary named sections: @samp{.section @var{name},
@var{expression}}.
@end ifset
+@ifset ELF
+@ifset GENERIC
+When generating ELF output, you
+@end ifset
+@ifclear GENERIC
+You
+@end ifclear
+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}
is assumed. Likewise @samp{.data} means @samp{.data 0}. Assembly
@@ -3091,7 +3167,9 @@ provides a special directive @code{.label} for defining labels more flexibly.
A symbol can be given an arbitrary value by writing a symbol, followed
by an equals sign @samp{=}, followed by an expression
(@pxref{Expressions}). This is equivalent to using the @code{.set}
-directive. @xref{Set,,@code{.set}}.
+directive. @xref{Set,,@code{.set}}. In the same way, using a double
+equals sign @samp{=}@samp{=} here represents an equivalent of the
+@code{.eqv} directive. @xref{Eqv,,@code{.eqv}}.
@node Symbol Names
@section Symbol Names
@@ -3105,15 +3183,10 @@ 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.
@end ifclear
-@ifset A29K
-For the AMD 29K family, @samp{?} is also allowed in the
-body of a symbol name, though not at its beginning.
-@end ifset
-
@ifset SPECIAL-SYMS
@ifset H8
Symbol names begin with a letter or with one of @samp{._}. On the
-Renesas SH or the H8/500, you can also use @code{$} in symbol names. That
+Renesas SH you can also use @code{$} in symbol names. That
character may be followed by any string of digits, letters, dollar signs (save
on the H8/300), and underscores.
@end ifset
@@ -3235,11 +3308,6 @@ directive. Thus, the expression @samp{.=.+4} is the same as saying
@ifclear no-space-dir
@samp{.space 4}.
@end ifclear
-@ifset no-space-dir
-@ifset A29K
-@samp{.block 4}.
-@end ifset
-@end ifset
@node Symbol Attributes
@section Symbol Attributes
@@ -3389,8 +3457,8 @@ respectively, with @code{.val} and @code{.type}.
@cindex auxiliary attributes, COFF symbols
The @command{@value{AS}} directives @code{.dim}, @code{.line}, @code{.scl},
-@code{.size}, and @code{.tag} can generate auxiliary symbol table
-information for COFF.
+@code{.size}, @code{.tag}, and @code{.weak} can generate auxiliary symbol
+table information for COFF.
@end ifset
@ifset SOM
@@ -3549,12 +3617,10 @@ Highest Precedence
@item %
@dfn{Remainder}.
-@item <
-@itemx <<
+@item <<
@dfn{Shift Left}. Same as the C operator @samp{<<}.
-@item >
-@itemx >>
+@item >>
@dfn{Shift Right}. Same as the C operator @samp{>>}.
@end table
@@ -3603,14 +3669,15 @@ You may not subtract arguments from different sections.
@item ==
@dfn{Is Equal To}
@item <>
+@itemx !=
@dfn{Is Not Equal To}
@item <
@dfn{Is Less Than}
-@itemx >
+@item >
@dfn{Is Greater Than}
-@itemx >=
+@item >=
@dfn{Is Greater Than Or Equal To}
-@itemx <=
+@item <=
@dfn{Is Less Than Or Equal To}
The comparison operators can be used as infix operators. A true results has a
@@ -3666,6 +3733,7 @@ Some machine configurations provide additional directives.
@end ifset
* Align:: @code{.align @var{abs-expr} , @var{abs-expr}}
+* Altmacro:: @code{.altmacro}
* Ascii:: @code{.ascii "@var{string}"}@dots{}
* Asciz:: @code{.asciz "@var{string}"}@dots{}
* Balign:: @code{.balign @var{abs-expr} , @var{abs-expr}}
@@ -3698,7 +3766,9 @@ Some machine configurations provide additional directives.
* Endif:: @code{.endif}
* Equ:: @code{.equ @var{symbol}, @var{expression}}
* Equiv:: @code{.equiv @var{symbol}, @var{expression}}
+* Eqv:: @code{.eqv @var{symbol}, @var{expression}}
* Err:: @code{.err}
+* Error:: @code{.error @var{string}}
* Exitm:: @code{.exitm}
* Extern:: @code{.extern}
* Fail:: @code{.fail}
@@ -3732,9 +3802,12 @@ Some machine configurations provide additional directives.
* Line:: @code{.line @var{line-number}}
@end ifclear
-* Ln:: @code{.ln @var{line-number}}
* Linkonce:: @code{.linkonce [@var{type}]}
* List:: @code{.list}
+* Ln:: @code{.ln @var{line-number}}
+
+* LNS directives:: @code{.file}, @code{.loc}, etc.
+
* Long:: @code{.long @var{expressions}}
@ignore
* Lsym:: @code{.lsym @var{symbol}, @var{expression}}
@@ -3742,6 +3815,7 @@ Some machine configurations provide additional directives.
* Macro:: @code{.macro @var{name} @var{args}}@dots{}
* MRI:: @code{.mri @var{val}}
+* Noaltmacro:: @code{.noaltmacro}
* Nolist:: @code{.nolist}
* Octa:: @code{.octa @var{bignums}}
* Org:: @code{.org @var{new-lc} , @var{fill}}
@@ -3812,9 +3886,11 @@ Some machine configurations provide additional directives.
* Version:: @code{.version "@var{string}"}
* VTableEntry:: @code{.vtable_entry @var{table}, @var{offset}}
* VTableInherit:: @code{.vtable_inherit @var{child}, @var{parent}}
-* Weak:: @code{.weak @var{names}}
@end ifset
+* Warning:: @code{.warning @var{string}}
+* Weak:: @code{.weak @var{names}}
+* Weakref:: @code{.weakref @var{alias}, @var{symbol}}
* Word:: @code{.word @var{expressions}}
* Deprecated:: Deprecated Directives
@end menu
@@ -3868,7 +3944,7 @@ required alignment; this can be useful if you want the alignment to be filled
with no-op instructions when appropriate.
The way the required alignment is specified varies from system to system.
-For the a29k, arc, hppa, i386 using ELF, i860, iq2000, m68k, m88k, or32,
+For the arc, hppa, i386 using ELF, i860, iq2000, m68k, or32,
s390, sparc, tic4x, tic80 and xtensa, the first expression is the
alignment request in bytes. For example @samp{.align 8} advances
the location counter until it is a multiple of 8. If the location counter
@@ -4026,6 +4102,9 @@ 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_signal_frame}
+Mark current function as signal trampoline.
+
@section @code{.cfi_window_save}
SPARC register window has been saved.
@@ -4034,6 +4113,61 @@ Allows the user to add arbitrary bytes to the unwind info. One
might use this to add OS-specific CFI opcodes, or generic CFI
opcodes that GAS does not yet support.
+@node LNS directives
+@section @code{.file @var{fileno} @var{filename}}
+@cindex @code{file} directive
+When emitting dwarf2 line number information @code{.file} assigns filenames
+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
+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
+entries will have.
+
+@section @code{.loc @var{fileno} @var{lineno} [@var{column}] [@var{options}]}
+@cindex @code{loc} directive
+The @code{.loc} directive will add row to the @code{.debug_line} line
+number matrix corresponding to the immediately following assembly
+instruction. The @var{fileno}, @var{lineno}, and optional @var{column}
+arguments will be applied to the @code{.debug_line} state machine before
+the row is added.
+
+The @var{options} are a sequence of the following tokens in any order:
+
+@table @code
+@item basic_block
+This option will set the @code{basic_block} register in the
+@code{.debug_line} state machine to @code{true}.
+
+@item prologue_end
+This option will set the @code{prologue_end} register in the
+@code{.debug_line} state machine to @code{true}.
+
+@item epilogue_begin
+This option will set the @code{epilogue_begin} register in the
+@code{.debug_line} state machine to @code{true}.
+
+@item is_stmt @var{value}
+This option will set the @code{is_stmt} register in the
+@code{.debug_line} state machine to @code{value}, which must be
+either 0 or 1.
+
+@item isa @var{value}
+This directive will set the @code{isa} register in the @code{.debug_line}
+state machine to @var{value}, which must be an unsigned integer.
+
+@end table
+
+@section @code{.loc_mark_blocks @var{enable}}
+@cindex @code{loc_mark_blocks} directive
+The @code{.loc_mark_blocks} directive makes the assembler emit an entry
+to the @code{.debug_line} line number matrix with the @code{basic_block}
+register in the state machine set whenever a code label is seen.
+The @var{enable} argument should be either 1 or 0, to enable or disable
+this function respectively.
+
@node Data
@section @code{.data @var{subsection}}
@@ -4189,6 +4323,14 @@ The syntax for @code{equ} on the HPPA is
@samp{@var{symbol} .equ @var{expression}}.
@end ifset
+@ifset Z80
+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}.
+@end ifset
+
@node Equiv
@section @code{.equiv @var{symbol}, @var{expression}}
@cindex @code{equiv} directive
@@ -4204,13 +4346,35 @@ Except for the contents of the error message, this is roughly equivalent to
.endif
.equ SYM,VAL
@end smallexample
+plus it protects the symbol from later redefinition.
+
+@node Eqv
+@section @code{.eqv @var{symbol}, @var{expression}}
+@cindex @code{eqv} directive
+The @code{.eqv} directive is like @code{.equiv}, but no attempt is made to
+evaluate the expression or any part of it immediately. Instead each time
+the resulting symbol is used in an expression, a snapshot of its current
+value is taken.
@node Err
@section @code{.err}
@cindex @code{err} directive
If @command{@value{AS}} assembles a @code{.err} directive, it will print an error
message and, unless the @option{-Z} option was used, it will not generate an
-object file. This can be used to signal error an conditionally compiled code.
+object file. This can be used to signal an error in conditionally compiled code.
+
+@node Error
+@section @code{.error "@var{string}"}
+@cindex error directive
+
+Similarly to @code{.err}, this directive emits an error, but you can specify a
+string that will be emitted as the error message. If you don't specify the
+message, it defaults to @code{".error directive invoked in source file"}.
+@xref{Errors, ,Error and Warning Messages}.
+
+@smallexample
+ .error "This code has not been assembled and tested."
+@end smallexample
@node Exitm
@section @code{.exitm}
@@ -4247,10 +4411,6 @@ recognized whether or not it is surrounded by quotes @samp{"}; but if you wish
to specify an empty file name, you must give the quotes--@code{""}. This
statement may go away in future: it is only recognized to be compatible with
old @command{@value{AS}} programs.
-@ifset A29K
-In some configurations of @command{@value{AS}}, @code{.file} has already been
-removed to avoid conflicts with other assemblers. @xref{Machine Dependencies}.
-@end ifset
@end ifclear
@node Fill
@@ -4333,7 +4493,7 @@ partial programs. You may need the HPPA-only @code{.EXPORT} directive as well.
@cindex @code{hidden} directive
@cindex visibility
-This one of the ELF visibility directives. The other two are
+This is one of the ELF visibility directives. The other two are
@code{.internal} (@pxref{Internal,,@code{.internal}}) and
@code{.protected} (@pxref{Protected,,@code{.protected}}).
@@ -4370,10 +4530,14 @@ This directive is a synonym for both @samp{.short} and @samp{.word}.
@section @code{.ident}
@cindex @code{ident} directive
-This directive is used by some assemblers to place tags in object files.
-@command{@value{AS}} simply accepts the directive for source-file
-compatibility with such assemblers, but does not actually emit anything
-for it.
+
+This directive is used by some assemblers to place tags in object files. The
+behavior of this directive varies depending on the target. When using the
+a.out object file format, @command{@value{AS}} simply accepts the directive for
+source-file compatibility with existing assemblers, but does not emit anything
+for it. When using COFF, comments are emitted to the @code{.comment} or
+@code{.rdata} section, depending on the target. When using ELF, comments are
+emitted to the @code{.comment} section.
@node If
@section @code{.if @var{absolute expression}}
@@ -4397,6 +4561,10 @@ Assembles the following section of code if the specified @var{symbol}
has been defined. Note a symbol which has been referenced but not yet defined
is considered to be undefined.
+@cindex @code{ifb} directive
+@item .ifb @var{text}
+Assembles the following section of code if the operand is blank (empty).
+
@cindex @code{ifc} directive
@item .ifc @var{string1},@var{string2}
Assembles the following section of code if the two strings are the same. The
@@ -4431,6 +4599,11 @@ to zero.
@item .iflt @var{absolute expression}
Assembles the following section of code if the argument is less than zero.
+@cindex @code{ifnb} directive
+@item .ifnb @var{text}
+Like @code{.ifb}, but the sense of the test is reversed: this assembles the
+following section of code if the operand is non-blank (non-empty).
+
@cindex @code{ifnc} directive
@item .ifnc @var{string1},@var{string2}.
Like @code{.ifc}, but the sense of the test is reversed: this assembles the
@@ -4497,7 +4670,7 @@ of target the assembly is for.
@ifclear GENERIC
@ifset H8
-On the H8/500 and most forms of the H8/300, @code{.int} emits 16-bit
+On most forms of the H8/300, @code{.int} emits 16-bit
integers. On the H8/300H and the Renesas SH, however, @code{.int} emits
32-bit integers.
@end ifset
@@ -4509,7 +4682,7 @@ integers. On the H8/300H and the Renesas SH, however, @code{.int} emits
@cindex @code{internal} directive
@cindex visibility
-This one of the ELF visibility directives. The other two are
+This is one of the ELF visibility directives. The other two are
@code{.hidden} (@pxref{Hidden,,@code{.hidden}}) and
@code{.protected} (@pxref{Protected,,@code{.protected}}).
@@ -4548,6 +4721,9 @@ 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}.
+
@node Irpc
@section @code{.irpc @var{symbol},@var{values}}@dots{}
@@ -4576,6 +4752,9 @@ 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}.
+
@node Lcomm
@section @code{.lcomm @var{symbol} , @var{length}}
@@ -4627,12 +4806,6 @@ reported as on logical line number @var{line-number} @minus{} 1. One day
@command{@value{AS}} will no longer support this directive: it is recognized only
for compatibility with existing assembler programs.
-@ifset GENERIC
-@ifset A29K
-@emph{Warning:} In the AMD29K configuration of @value{AS}, this command is
-not available; use the synonym @code{.ln} in that context.
-@end ifset
-@end ifset
@end ifset
@ifclear no-line-dir
@@ -4792,9 +4965,14 @@ With that definition, @samp{SUM 0,5} is equivalent to this assembly input:
@cindex @code{macro} directive
Begin the definition of a macro called @var{macname}. If your macro
definition requires arguments, specify their names after the macro name,
-separated by commas or spaces. You can supply a default value for any
-macro argument by following the name with @samp{=@var{deflt}}. For
-example, these are all valid @code{.macro} statements:
+separated by commas or spaces. You can qualify the macro argument to
+indicate whether all invocations must specify a non-blank value (through
+@samp{:@code{req}}), or whether it takes all of the remaining arguments
+(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
+definitions. For example, these are all valid @code{.macro} statements:
@table @code
@item .macro comm
@@ -4817,10 +4995,42 @@ After the definition is complete, you can call the macro either as
@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
+arguments. The first argument must always have a value specified, but
+not the second, which instead has a default value. The third formal
+will get assigned all remaining arguments specified at invocation time.
+
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}.
+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
+(@code{:}) is generally permitted to be part of a symbol name, but the
+architecture specific code special-cases it when occuring 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:
+
+@example
+ .altmacro
+ .macro label l
+l&:
+ .endm
+@end example
+
+This applies identically to the identifiers used in @code{.irp} (@xref{Irp}.)
+and @code{.irpc} (@xref{Irpc}.).
+
@item .endm
@cindex @code{endm} directive
Mark the end of a macro definition.
@@ -4836,20 +5046,52 @@ Exit early from the current macro definition.
executed in this pseudo-variable; you can copy that number to your
output with @samp{\@@}, but @emph{only within a macro definition}.
-@ignore
@item LOCAL @var{name} [ , @dots{} ]
@emph{Warning: @code{LOCAL} is only available if you select ``alternate
-macro syntax'' with @samp{-a} or @samp{--alternate}.} @xref{Alternate,,
-Alternate macro syntax}.
+macro syntax'' with @samp{--alternate} or @code{.altmacro}.}
+@xref{Altmacro,,@code{.altmacro}}.
+@end ftable
-Generate a string replacement for each of the @var{name} arguments, and
+@node Altmacro
+@section @code{.altmacro}
+Enable alternate macro mode, enabling:
+
+@ftable @code
+@item LOCAL @var{name} [ , @dots{} ]
+One additional directive, @code{LOCAL}, is available. It is used to
+generate a string replacement for each of the @var{name} arguments, and
replace any instances of @var{name} in each macro expansion. The
replacement string is unique in the assembly, and different for each
separate macro expansion. @code{LOCAL} allows you to write macros that
define symbols, without fear of conflict between separate macro expansions.
-@end ignore
+
+@item String delimiters
+You can write strings delimited in these other ways besides
+@code{"@var{string}"}:
+
+@table @code
+@item '@var{string}'
+You can delimit strings with single-quote charaters.
+
+@item <@var{string}>
+You can delimit strings with matching angle brackets.
+@end table
+
+@item single-character string escape
+To include any single character literally in a string (even if the
+character would otherwise have some special meaning), you can prefix the
+character with @samp{!} (an exclamation mark). For example, you can
+write @samp{<4.3 !> 5.4!!>} to get the literal text @samp{4.3 > 5.4!}.
+
+@item Expression results as strings
+You can write @samp{%@var{expr}} to evaluate the expression @var{expr}
+and use the result as a string.
@end ftable
+@node Noaltmacro
+@section @code{.noaltmacro}
+Disable alternate macro mode. @ref{Altmacro}
+
@node Nolist
@section @code{.nolist}
@@ -4996,7 +5238,7 @@ assembly. You must put @var{string} in double quotes.
@cindex @code{protected} directive
@cindex visibility
-This one of the ELF visibility directives. The other two are
+This is one of the ELF visibility directives. The other two are
@code{.hidden} (@pxref{Hidden}) and @code{.internal} (@pxref{Internal}).
This directive overrides the named symbols default visibility (which is set by
@@ -5045,9 +5287,9 @@ This is one of the ELF section stack manipulation directives. The others are
@code{.popsection} (@pxref{PopSection}), and @code{.previous}
(@pxref{Previous}).
-This directive is a synonym for @code{.section}. It pushes the current section
-(and subsection) onto the top of the section stack, and then replaces the
-current section and subsection with @code{name} and @code{subsection}.
+This directive pushes the current section (and subsection) onto the
+top of the section stack, and then replaces the current section and
+subsection with @code{name} and @code{subsection}.
@end ifset
@node Quad
@@ -5200,7 +5442,7 @@ This is one of the ELF section stack manipulation directives. The others are
For ELF targets, the @code{.section} directive is used like this:
@smallexample
-.section @var{name} [, "@var{flags}"[, @@@var{type}[, @@@var{entsize}]]]
+.section @var{name} [, "@var{flags}"[, @@@var{type}[,@var{flag_specific_arguments}]]]
@end smallexample
The optional @var{flags} argument is a quoted string which may contain any
@@ -5216,6 +5458,10 @@ section is executable
section is mergeable
@item S
section contains zero terminated strings
+@item G
+section is a member of a section group
+@item T
+section is used for thread-local-storage
@end table
The optional @var{type} argument may contain one of the following constants:
@@ -5224,18 +5470,58 @@ The optional @var{type} argument may contain one of the following constants:
section contains data
@item @@nobits
section does not contain data (i.e., section only occupies space)
+@item @@note
+section contains data which is used by things other than the program
+@item @@init_array
+section contains an array of pointers to init functions
+@item @@fini_array
+section contains an array of pointers to finish functions
+@item @@preinit_array
+section contains an array of pointers to pre-init functions
@end table
+Many targets only support the first three section types.
+
Note on targets where the @code{@@} character is the start of a comment (eg
ARM) then another character is used instead. For example the ARM port uses the
@code{%} character.
-If @var{flags} contains @code{M} flag, @var{type} argument must be specified
-as well as @var{entsize} argument. Sections with @code{M} flag but not
-@code{S} flag must contain fixed size constants, each @var{entsize} octets
-long. Sections with both @code{M} and @code{S} must contain zero terminated
-strings where each character is @var{entsize} bytes long. The linker may remove
-duplicates within sections with the same name, same entity size and same flags.
+If @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:
+
+@smallexample
+.section @var{name} , "@var{flags}"M, @@@var{type}, @var{entsize}
+@end smallexample
+
+Sections with the @code{M} flag but not @code{S} flag must contain fixed size
+constants, each @var{entsize} octets long. Sections with both @code{M} and
+@code{S} must contain zero terminated strings where each character is
+@var{entsize} bytes long. The linker may remove duplicates within sections with
+the same name, same entity size and same flags. @var{entsize} must be an
+absolute expression.
+
+If @var{flags} contains the @code{G} symbol then the @var{type} argument must
+be present along with an additional field like this:
+
+@smallexample
+.section @var{name} , "@var{flags}"G, @@@var{type}, @var{GroupName}[, @var{linkage}]
+@end smallexample
+
+The @var{GroupName} field specifies the name of the section group to which this
+particular section belongs. The optional linkage field can contain:
+@table @code
+@item comdat
+indicates that only one copy of this section should be retained
+@item .gnu.linkonce
+an alias for comdat
+@end table
+
+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
+.section @var{name} , "@var{flags}"MG, @@@var{type}, @var{entsize}, @var{GroupName}[, @var{linkage}]
+@end smallexample
If no flags are specified, the default flags depend upon the section name. If
the section name is not recognized, the default will be for the section to have
@@ -5258,12 +5544,14 @@ section is allocatable
section is writable
@item #execinstr
section is executable
+@item #tls
+section is used for thread local storage
@end table
-This directive replaces the current section and subsection. The replaced
-section and subsection are pushed onto the section stack. See the contents of
-the gas testsuite directory @code{gas/testsuite/gas/elf} for some examples of
-how this directive and the other section stack directives work.
+This directive replaces the current section and subsection. See the
+contents of the gas testsuite directory @code{gas/testsuite/gas/elf} for
+some examples of how this directive and the other section stack directives
+work.
@end ifset
@end ifset
@@ -5287,6 +5575,11 @@ The syntax for @code{set} on the HPPA is
@samp{@var{symbol} .set @var{expression}}.
@end ifset
+@ifset Z80
+On Z80 @code{set} is a real instruction, use
+@samp{@var{symbol} defl @var{expression}} instead.
+@end ifset
+
@node Short
@section @code{.short @var{expressions}}
@@ -5413,21 +5706,6 @@ for a summary.
@end ifset
@end ifclear
-@ifset A29K
-@ifclear GENERIC
-@node Space
-@section @code{.space}
-@cindex @code{space} directive
-@end ifclear
-On the AMD 29K, this directive is ignored; it is accepted for
-compatibility with other AMD 29K assemblers.
-
-@quotation
-@emph{Warning:} In most versions of the @sc{gnu} assembler, the directive
-@code{.space} has the effect of @code{.block} @xref{Machine Dependencies}.
-@end quotation
-@end ifset
-
@ifset have-stabs
@node Stab
@section @code{.stabd, .stabn, .stabs}
@@ -5745,28 +6023,59 @@ formatted note of type NT_VERSION. The note's name is set to @code{string}.
@node VTableEntry
@section @code{.vtable_entry @var{table}, @var{offset}}
-@cindex @code{vtable_entry}
+@cindex @code{vtable_entry} directive
This directive finds or creates a symbol @code{table} and creates a
@code{VTABLE_ENTRY} relocation for it with an addend of @code{offset}.
@node VTableInherit
@section @code{.vtable_inherit @var{child}, @var{parent}}
-@cindex @code{vtable_inherit}
+@cindex @code{vtable_inherit} directive
This directive finds the symbol @code{child} and finds or creates the symbol
@code{parent} and then creates a @code{VTABLE_INHERIT} relocation for the
parent whose addend is the value of the child symbol. As a special case the
parent name of @code{0} is treated as refering the @code{*ABS*} section.
@end ifset
-@ifset ELF
+@node Warning
+@section @code{.warning "@var{string}"}
+@cindex warning directive
+Similar to the directive @code{.error}
+(@pxref{Error,,@code{.error "@var{string}"}}), but just emits a warning.
+
@node Weak
@section @code{.weak @var{names}}
@cindex @code{weak} directive
This directive sets the weak attribute on the comma separated list of symbol
@code{names}. If the symbols do not already exist, they will be created.
-@end ifset
+
+On COFF targets other than PE, weak symbols are a GNU extension. This
+directive sets the weak attribute on the comma separated list of symbol
+@code{names}. If the symbols do not already exist, they will be created.
+
+On the PE target, weak symbols are supported natively as weak aliases.
+When a weak symbol is created that is not an alias, GAS creates an
+alternate symbol to hold the default value.
+
+@node Weakref
+@section @code{.weakref @var{alias}, @var{target}}
+
+@cindex @code{weakref} directive
+This directive creates an alias to the target symbol that enables the symbol to
+be referenced with weak-symbol semantics, but without actually making it weak.
+If direct references or definitions of the symbol are present, then the symbol
+will not be weak, but if all references to it are through weak references, the
+symbol will be marked as weak in the symbol table.
+
+The effect is equivalent to moving all references to the alias to a separate
+assembly source file, renaming the alias to the symbol in it, declaring the
+symbol as weak there, and running a reloadable link to merge the object files
+resulting from the assembly of the new source file and the old source file that
+had the references to the alias removed.
+
+The alias itself never makes to the symbol table, and is entirely handled
+within the assembler.
@node Word
@section @code{.word @var{expressions}}
@@ -5864,9 +6173,6 @@ include details on any machine's instruction set. For details on that
subject, see the hardware manufacturer's manual.
@menu
-@ifset A29K
-* AMD29K-Dependent:: AMD 29K Dependent Features
-@end ifset
@ifset ALPHA
* Alpha-Dependent:: Alpha Dependent Features
@end ifset
@@ -5876,6 +6182,9 @@ subject, see the hardware manufacturer's manual.
@ifset ARM
* ARM-Dependent:: ARM Dependent Features
@end ifset
+@ifset BFIN
+* BFIN-Dependent:: BFIN Dependent Features
+@end ifset
@ifset CRIS
* CRIS-Dependent:: CRIS Dependent Features
@end ifset
@@ -5888,9 +6197,6 @@ subject, see the hardware manufacturer's manual.
@ifset H8/300
* H8/300-Dependent:: Renesas H8/300 Dependent Features
@end ifset
-@ifset H8/500
-* H8/500-Dependent:: Renesas H8/500 Dependent Features
-@end ifset
@ifset HPPA
* HPPA-Dependent:: HPPA Dependent Features
@end ifset
@@ -5906,9 +6212,15 @@ subject, see the hardware manufacturer's manual.
@ifset I960
* i960-Dependent:: Intel 80960 Dependent Features
@end ifset
+@ifset IA64
+* IA-64-Dependent:: Intel IA-64 Dependent Features
+@end ifset
@ifset IP2K
* IP2K-Dependent:: IP2K Dependent Features
@end ifset
+@ifset M32C
+* M32C-Dependent:: M32C Dependent Features
+@end ifset
@ifset M32R
* M32R-Dependent:: M32R Dependent Features
@end ifset
@@ -5918,9 +6230,6 @@ subject, see the hardware manufacturer's manual.
@ifset M68HC11
* M68HC11-Dependent:: M68HC11 and 68HC12 Dependent Features
@end ifset
-@ifset M880X0
-* M88K-Dependent:: M880x0 Dependent Features
-@end ifset
@ifset MIPS
* MIPS-Dependent:: MIPS Dependent Features
@end ifset
@@ -5955,6 +6264,9 @@ subject, see the hardware manufacturer's manual.
@ifset XTENSA
* Xtensa-Dependent:: Xtensa Dependent Features
@end ifset
+@ifset Z80
+* Z80-Dependent:: Z80 Dependent Features
+@end ifset
@ifset Z8000
* Z8000-Dependent:: Z8000 Dependent Features
@end ifset
@@ -5974,10 +6286,6 @@ subject, see the hardware manufacturer's manual.
@c node and sectioning commands; hence the repetition of @chapter BLAH
@c in both conditional blocks.
-@ifset A29K
-@include c-a29k.texi
-@end ifset
-
@ifset ALPHA
@include c-alpha.texi
@end ifset
@@ -5990,6 +6298,10 @@ subject, see the hardware manufacturer's manual.
@include c-arm.texi
@end ifset
+@ifset BFIN
+@include c-bfin.texi
+@end ifset
+
@ifset CRIS
@include c-cris.texi
@end ifset
@@ -6006,7 +6318,6 @@ family.
@menu
* H8/300-Dependent:: Renesas H8/300 Dependent Features
-* H8/500-Dependent:: Renesas H8/500 Dependent Features
* SH-Dependent:: Renesas SH Dependent Features
@end menu
@lowersections
@@ -6025,10 +6336,6 @@ family.
@include c-h8300.texi
@end ifset
-@ifset H8/500
-@include c-h8500.texi
-@end ifset
-
@ifset HPPA
@include c-hppa.texi
@end ifset
@@ -6057,6 +6364,10 @@ family.
@include c-ip2k.texi
@end ifset
+@ifset M32C
+@include c-m32c.texi
+@end ifset
+
@ifset M32R
@include c-m32r.texi
@end ifset
@@ -6069,10 +6380,6 @@ family.
@include c-m68hc11.texi
@end ifset
-@ifset M880X0
-@include c-m88k.texi
-@end ifset
-
@ifset MIPS
@include c-mips.texi
@end ifset
@@ -6114,6 +6421,10 @@ family.
@include c-tic54x.texi
@end ifset
+@ifset Z80
+@include c-z80.texi
+@end ifset
+
@ifset Z8000
@include c-z8k.texi
@end ifset
@@ -6340,7 +6651,7 @@ things without first using the debugger to find the facts.
@node Acknowledgements
@chapter Acknowledgements
-If you have contributed to @command{@value{AS}} and your name isn't listed here,
+If you have contributed to GAS and your name isn't listed here,
it is not meant as a slight. We just don't know about it. Send mail to the
maintainer, and we'll correct the situation. Currently
@c (January 1994),
@@ -6382,8 +6693,8 @@ Keith Knowles at the Open Software Foundation wrote the original MIPS back end
(which hasn't been merged in yet). Ralph Campbell worked with the MIPS code to
support a.out format.
-Support for the Zilog Z8k and Renesas H8/300 and H8/500 processors (tc-z8k,
-tc-h8300, tc-h8500), and IEEE 695 object file format (obj-ieee), was written by
+Support for the Zilog Z8k and Renesas H8/300 processors (tc-z8k,
+tc-h8300), and IEEE 695 object file format (obj-ieee), was written by
Steve Chamberlain of Cygnus Support. Steve also modified the COFF back end to
use BFD for some low-level operations, for use with the H8/300 and AMD 29k
targets.
@@ -6401,7 +6712,7 @@ Ian Lance Taylor of Cygnus Support merged the Motorola and MIT syntax for the
added support for MIPS ECOFF and ELF targets, wrote the initial RS/6000 and
PowerPC assembler, and made a few other minor patches.
-Steve Chamberlain made @command{@value{AS}} able to generate listings.
+Steve Chamberlain made GAS able to generate listings.
Hewlett-Packard contributed support for the HP9000/300.
diff --git a/contrib/binutils/gas/doc/c-alpha.texi b/contrib/binutils/gas/doc/c-alpha.texi
index 0aee06b2d8be..f426b822828d 100644
--- a/contrib/binutils/gas/doc/c-alpha.texi
+++ b/contrib/binutils/gas/doc/c-alpha.texi
@@ -1,4 +1,4 @@
-@c Copyright 2002
+@c Copyright 2002, 2003
@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@@ -203,6 +203,12 @@ Used with a register branch format instruction (e.g.@: @code{jsr}) to
indicate that the literal is used for a call. During relaxation, the
code may be altered to use a direct branch (e.g.@: @code{bsr}).
+@item !lituse_jsrdirect!@var{N}
+Similar to @code{lituse_jsr}, but also that this call cannot be vectored
+through a PLT entry. This is useful for functions with special calling
+conventions which do not allow the normal call-clobbered registers to be
+clobbered.
+
@item !lituse_bytoff!@var{N}
Used with a byte mask instruction (e.g.@: @code{extbl}) to indicate
that only the low 3 bits of the address are relevant. During relaxation,
diff --git a/contrib/binutils/gas/doc/c-arc.texi b/contrib/binutils/gas/doc/c-arc.texi
index 700a01d15d8c..04544d1e4951 100644
--- a/contrib/binutils/gas/doc/c-arc.texi
+++ b/contrib/binutils/gas/doc/c-arc.texi
@@ -1,4 +1,4 @@
-@c Copyright 2000, 2001 Free Software Foundation, Inc.
+@c Copyright 2000, 2001, 2005 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@@ -34,7 +34,7 @@
@cindex @code{-marc[5|6|7|8]} command line option, ARC
@item -marc[5|6|7|8]
-This option selects the core processor variant. Using
+This option selects the core processor variant. Using
@code{-marc} is the same as @code{-marc@value{ARC_CORE_DEFAULT}}, which
is also the default.
@@ -46,8 +46,8 @@ Base instruction set.
@cindex @code{arc6} arc6, ARC
@item arc6
-Jump-and-link (jl) instruction. No requirement of an instruction between
-setting flags and conditional jump. For example:
+Jump-and-link (jl) instruction. No requirement of an instruction between
+setting flags and conditional jump. For example:
@smallexample
mov.f r0,r1
@@ -137,36 +137,161 @@ machine directives:
@cindex @code{extAuxRegister} directive, ARC
@item .extAuxRegister @var{name},@var{address},@var{mode}
-*TODO*
+The ARCtangent A4 has extensible auxiliary register space. The
+auxiliary registers can be defined in the assembler source code by
+using this directive. The first parameter is the @var{name} of the
+new auxiallry register. The second parameter is the @var{address} of
+the register in the auxiliary register memory map for the variant of
+the ARC. The third parameter specifies the @var{mode} in which the
+register can be operated is and it can be one of:
+
+@table @code
+@item r (readonly)
+@item w (write only)
+@item r|w (read or write)
+@end table
+
+For example:
@smallexample
.extAuxRegister mulhi,0x12,w
@end smallexample
+This specifies an extension auxiliary register called @emph{mulhi}
+which is at address 0x12 in the memory space and which is only
+writable.
+
@cindex @code{extCondCode} directive, ARC
@item .extCondCode @var{suffix},@var{value}
-*TODO*
+The condition codes on the ARCtangent A4 are extensible and can be
+specified by means of this assembler directive. They are specified
+by the suffix and the value for the condition code. They can be used to
+specify extra condition codes with any values. For example:
@smallexample
.extCondCode is_busy,0x14
+
+ add.is_busy r1,r2,r3
+ bis_busy _main
@end smallexample
@cindex @code{extCoreRegister} directive, ARC
@item .extCoreRegister @var{name},@var{regnum},@var{mode},@var{shortcut}
-*TODO*
+Specifies an extension core register @var{name} for the application.
+This allows a register @var{name} with a valid @var{regnum} between 0
+and 60, with the following as valid values for @var{mode}
+
+@table @samp
+@item @emph{r} (readonly)
+@item @emph{w} (write only)
+@item @emph{r|w} (read or write)
+@end table
+
+
+The other parameter gives a description of the register having a
+@var{shortcut} in the pipeline. The valid values are:
+
+@table @code
+@item can_shortcut
+@item cannot_shortcut
+@end table
+
+For example:
@smallexample
.extCoreRegister mlo,57,r,can_shortcut
@end smallexample
+This defines an extension core register mlo with the value 57 which
+can shortcut the pipeline.
+
@cindex @code{extInstruction} directive, ARC
@item .extInstruction @var{name},@var{opcode},@var{subopcode},@var{suffixclass},@var{syntaxclass}
-*TODO*
+The ARCtangent A4 allows the user to specify extension instructions.
+The extension instructions are not macros. The assembler creates
+encodings for use of these instructions according to the specification
+by the user. The parameters are:
+
+@table @bullet
+@item @var{name}
+Name of the extension instruction
+
+@item @var{opcode}
+Opcode to be used. (Bits 27:31 in the encoding). Valid values
+0x10-0x1f or 0x03
+
+@item @var{subopcode}
+Subopcode to be used. Valid values are from 0x09-0x3f. However the
+correct value also depends on @var{syntaxclass}
+
+@item @var{suffixclass}
+Determines the kinds of suffixes to be allowed. Valid values are
+@code{SUFFIX_NONE}, @code{SUFFIX_COND},
+@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}.
+
+@item @var{syntaxclass}
+Determines the syntax class for the instruction. It can have the
+following values:
+
+@table @code
+@item @code{SYNTAX_2OP}:
+2 Operand Instruction
+@item @code{SYNTAX_3OP}:
+3 Operand Instruction
+@end table
+
+In addition there could be modifiers for the syntax class as described
+below:
+
+@itemize @minus
+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
+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.
+
+@item @code{OP1_IMM_IMPLIED}:
+Modifies syntax class SYNTAX_20P, it specifies that there is an
+implied immediate destination operand which does not appear in the
+syntax. For example, if the source code contains an instruction like:
+
+@smallexample
+inst r1,r2
+@end smallexample
+
+it really means that the first argument is an implied immediate (that
+is, the result is discarded). This is the same as though the source
+code were: inst 0,r1,r2. You use OP1_IMM_IMPLIED by bitwise ORing it
+with SYNTAX_20P.
+
+@end itemize
+@end table
+
+For example, defining 64-bit multiplier with immediate operands:
@smallexample
- .extInstruction mul64,0x14,0x0,SUFFIX_COND,SYNTAX_3OP|OP1_MUST_BE_IMM
+.extInstruction mp64,0x14,0x0,SUFFIX_COND | SUFFIX_FLAG ,
+ SYNTAX_3OP|OP1_MUST_BE_IMM
@end smallexample
+The above specifies an extension instruction called mp64 which has 3 operands,
+sets the flags, can be used with a condition code, for which the
+first operand is an immediate. (Equivalent to discarding the result
+of the operation).
+
+@smallexample
+ .extInstruction mul64,0x14,0x00,SUFFIX_COND, SYNTAX_2OP|OP1_IMM_IMPLIED
+@end smallexample
+
+This describes a 2 operand instruction with an implicit first
+immediate operand. The result of this operation would be discarded.
+
@cindex @code{half} directive, ARC
@item .half @var{expressions}
*TODO*
@@ -204,4 +329,5 @@ between the two - even for the implicit default core version
@cindex opcodes for ARC
For information on the ARC instruction set, see @cite{ARC Programmers
-Reference Manual}, ARC Cores Ltd.
+Reference Manual}, ARC International (www.arc.com)
+
diff --git a/contrib/binutils/gas/doc/c-arm.texi b/contrib/binutils/gas/doc/c-arm.texi
index 23cd7bb3fef6..ca0998bea669 100644
--- a/contrib/binutils/gas/doc/c-arm.texi
+++ b/contrib/binutils/gas/doc/c-arm.texi
@@ -1,4 +1,4 @@
-@c Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003
+@c Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@@ -67,6 +67,7 @@ recognized:
@code{arm7500fe},
@code{arm7t},
@code{arm7tdmi},
+@code{arm7tdmi-s},
@code{arm8},
@code{arm810},
@code{strongarm},
@@ -82,19 +83,33 @@ recognized:
@code{arm9tdmi},
@code{arm9e},
@code{arm926e},
-@code{arm926ejs},
+@code{arm926ej-s},
@code{arm946e-r0},
@code{arm946e},
+@code{arm946e-s},
@code{arm966e-r0},
@code{arm966e},
+@code{arm966e-s},
+@code{arm968e-s},
@code{arm10t},
+@code{arm10tdmi},
@code{arm10e},
@code{arm1020},
@code{arm1020t},
@code{arm1020e},
-@code{arm1026ejs},
-@code{arm1136js},
-@code{arm1136jfs},
+@code{arm1022e},
+@code{arm1026ej-s},
+@code{arm1136j-s},
+@code{arm1136jf-s},
+@code{arm1156t2-s},
+@code{arm1156t2f-s},
+@code{arm1176jz-s},
+@code{arm1176jzf-s},
+@code{mpcore},
+@code{mpcorenovfp},
+@code{cortex-a8},
+@code{cortex-r4},
+@code{cortex-m3},
@code{ep9312} (ARM920 with Cirrus Maverick coprocessor),
@code{i80200} (Intel XScale processor)
@code{iwmmxt} (Intel(r) XScale processor with Wireless MMX(tm) technology coprocessor)
@@ -136,6 +151,13 @@ names are recognized:
@code{armv5texp},
@code{armv6},
@code{armv6j},
+@code{armv6k},
+@code{armv6z},
+@code{armv6zk},
+@code{armv7},
+@code{armv7a},
+@code{armv7r},
+@code{armv7m},
@code{iwmmxt}
and
@code{xscale}.
@@ -170,7 +192,7 @@ The following format options are recognized:
@code{vfpxd},
@code{arm1020t},
@code{arm1020e},
-@code{arm1136jfs}
+@code{arm1136jf-s}
and
@code{maverick}.
@@ -228,6 +250,16 @@ The following values are recognized:
and
@code{hard}.
+@cindex @code{-eabi=} command line option, ARM
+@item -meabi=@var{ver}
+This option specifies which EABI version the produced object files should
+conform to.
+The following values are recognised:
+@code{gnu},
+@code{4}
+and
+@code{5}.
+
@cindex @code{-EB} command line option, ARM
@item -EB
This option specifies that the output generated by the assembler should
@@ -244,13 +276,6 @@ be marked as being encoded for a little-endian processor.
This option specifies that the output of the assembler should be marked
as position-independent code (PIC).
-@cindex @code{-moabi} command line option, ARM
-@item -moabi
-This indicates that the code should be assembled using the old ARM ELF
-conventions, based on a beta release release of the ARM-ELF
-specifications, rather than the default conventions which are based on
-the final release of the ARM-ELF specifications.
-
@end table
@@ -390,6 +415,125 @@ it prevents accurate control of the placement of literal pools.
@item .pool
This is a synonym for .ltorg.
+@cindex @code{.fnstart} directive, ARM
+@item .unwind_fnstart
+Marks the start of a function with an unwind table entry.
+
+@cindex @code{.fnend} directive, ARM
+@item .unwind_fnend
+Marks the end of a function with an unwind table entry. The unwind index
+table entry is created when this directive is processed.
+
+If no personality routine has been specified then standard personality
+routine 0 or 1 will be used, depending on the number of unwind opcodes
+required.
+
+@cindex @code{.cantunwind} directive, ARM
+@item .cantunwind
+Prevents unwinding through the current function. No personality routine
+or exception table data is required or permitted.
+
+@cindex @code{.personality} directive, ARM
+@item .personality @var{name}
+Sets the personality routine for the current function to @var{name}.
+
+@cindex @code{.personalityindex} directive, ARM
+@item .personalityindex @var{index}
+Sets the personality routine for the current function to the EABI standard
+routine number @var{index}
+
+@cindex @code{.handlerdata} directive, ARM
+@item .handlerdata
+Marks the end of the current function, and the start of the exception table
+entry for that function. Anything between this directive and the
+@code{.fnend} directive will be added to the exception table entry.
+
+Must be preceded by a @code{.personality} or @code{.personalityindex}
+directive.
+
+@cindex @code{.save} directive, ARM
+@item .save @var{reglist}
+Generate unwinder annotations to restore the registers in @var{reglist}.
+The format of @var{reglist} is the same as the corresponding store-multiple
+instruction.
+
+@smallexample
+@exdent @emph{core registers}
+ .save @{r4, r5, r6, lr@}
+ stmfd sp!, @{r4, r5, r6, lr@}
+@exdent @emph{FPA registers}
+ .save f4, 2
+ sfmfd f4, 2, [sp]!
+@exdent @emph{VFP registers}
+ .save @{d8, d9, d10@}
+ fstmdf sp!, @{d8, d9, d10@}
+@exdent @emph{iWMMXt registers}
+ .save @{wr10, wr11@}
+ wstrd wr11, [sp, #-8]!
+ wstrd wr10, [sp, #-8]!
+or
+ .save wr11
+ wstrd wr11, [sp, #-8]!
+ .save wr10
+ wstrd wr10, [sp, #-8]!
+@end smallexample
+
+@cindex @code{.pad} directive, ARM
+@item .pad #@var{count}
+Generate unwinder annotations for a stack adjustment of @var{count} bytes.
+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.
+
+@cindex @code{.setfp} directive, ARM
+@item .setfp @var{fpreg}, @var{spreg} [, #@var{offset}]
+Make all unwinder annotations relaive to a frame pointer. Without this
+the unwinder will use offsets from the stack pointer.
+
+The syntax of this directive is the same as the @code{sub} or @code{mov}
+instruction used to set the frame pointer. @var{spreg} must be either
+@code{sp} or mentioned in a previous @code{.movsp} directive.
+
+@smallexample
+.movsp ip
+mov ip, sp
+@dots{}
+.setfp fp, ip, #4
+sub fp, ip, #4
+@end smallexample
+
+@cindex @code{.unwind_raw} directive, ARM
+@item .raw @var{offset}, @var{byte1}, @dots{}
+Insert one of more arbitary unwind opcode bytes, which are known to adjust
+the stack pointer by @var{offset} bytes.
+
+For example @code{.unwind_raw 4, 0xb1, 0x01} is equivalent to
+@code{.save @{r0@}}
+
+@cindex @code{.cpu} directive, ARM
+@item .cpu @var{name}
+Select the target processor. Valid values for @var{name} are the same as
+for the @option{-mcpu} commandline option.
+
+@cindex @code{.arch} directive, ARM
+@item .arch @var{name}
+Select the target architecture. Valid values for @var{name} are the same as
+for the @option{-march} commandline option.
+
+@cindex @code{.fpu} directive, ARM
+@item .fpu @var{name}
+Select the floating point unit to assemble for. Valid values for @var{name}
+are the same as for the @option{-mfpu} commandline option.
+
+@cindex @code{.eabi_attribute} directive, ARM
+@item .eabi_attribute @var{tag}, @var{value}
+Set the EABI object attribute number @var{tag} to @var{value}. The value
+is either a @code{number}, @code{"string"}, or @code{number, "string"}
+depending on the tag.
+
@end table
@node ARM Opcodes
diff --git a/contrib/binutils/gas/doc/c-i386.texi b/contrib/binutils/gas/doc/c-i386.texi
index f0047f93825a..81039c4dbe72 100644
--- a/contrib/binutils/gas/doc/c-i386.texi
+++ b/contrib/binutils/gas/doc/c-i386.texi
@@ -1,4 +1,5 @@
-@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
+@c 2001, 2003, 2004
@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@@ -66,6 +67,15 @@ usage and use x86-64 as target platform).
By default, x86 GAS replaces multiple nop instructions used for
alignment within code sections with multi-byte nop instructions such
as leal 0(%esi,1),%esi. This switch disables the optimization.
+
+@cindex @samp{--divide} option, i386
+@item --divide
+On SVR4-derived platforms, the character @samp{/} is treated as a comment
+character, which means that it cannot be used in expressions. The
+@samp{--divide} option turns @samp{/} into a normal character. This does
+not disable @samp{/} at the beginning of a line starting a comment, or
+affect using @samp{#} for starting a comment.
+
@end table
@node i386-Syntax
@@ -227,7 +237,7 @@ The Intel-syntax conversion instructions
(x86-64 only),
@item
-@samp{cdo} --- sign-extend quad in @samp{%rax} to octuple in
+@samp{cqo} --- sign-extend quad in @samp{%rax} to octuple in
@samp{%rdx:%rax} (x86-64 only),
@end itemize
@@ -691,15 +701,16 @@ register is @samp{%st(i)}.
@cindex x86-64 arch directive
@code{@value{AS}} may be told to assemble for a particular CPU
-architecture with the @code{.arch @var{cpu_type}} directive. This
+(sub-)architecture with the @code{.arch @var{cpu_type}} directive. This
directive enables a warning when gas detects an instruction that is not
supported on the CPU specified. The choices for @var{cpu_type} are:
@multitable @columnfractions .20 .20 .20 .20
@item @samp{i8086} @tab @samp{i186} @tab @samp{i286} @tab @samp{i386}
@item @samp{i486} @tab @samp{i586} @tab @samp{i686} @tab @samp{pentium}
-@item @samp{pentiumpro} @tab @samp{pentium4} @tab @samp{k6} @tab @samp{athlon}
-@item @samp{sledgehammer}
+@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}
@end multitable
Apart from the warning, there are only two other effects on
@@ -715,13 +726,14 @@ conditional jumps will be promoted when necessary to a two instruction
sequence consisting of a conditional jump of the opposite sense around
an unconditional jump to the target.
-Following the CPU architecture, you may specify @samp{jumps} or
-@samp{nojumps} to control automatic promotion of conditional jumps.
-@samp{jumps} is the default, and enables jump promotion; All external
-jumps will be of the long variety, and file-local jumps will be promoted
-as necessary. (@pxref{i386-Jumps}) @samp{nojumps} leaves external
-conditional jumps as byte offset jumps, and warns about file-local
-conditional jumps that @code{@value{AS}} promotes.
+Following the CPU architecture (but not a sub-architecture, which are those
+starting with a dot), you may specify @samp{jumps} or @samp{nojumps} to
+control automatic promotion of conditional jumps. @samp{jumps} is the
+default, and enables jump promotion; All external jumps will be of the long
+variety, and file-local jumps will be promoted as necessary.
+(@pxref{i386-Jumps}) @samp{nojumps} leaves external conditional jumps as
+byte offset jumps, and warns about file-local conditional jumps that
+@code{@value{AS}} promotes.
Unconditional jumps are treated as for @samp{jumps}.
For example
diff --git a/contrib/binutils/gas/doc/c-ia64.texi b/contrib/binutils/gas/doc/c-ia64.texi
index b62c05eb88d0..6b0f3a9515d7 100644
--- a/contrib/binutils/gas/doc/c-ia64.texi
+++ b/contrib/binutils/gas/doc/c-ia64.texi
@@ -1,4 +1,4 @@
-@c Copyright 2002
+@c Copyright 2002, 2003, 2005
@c Free Software Foundation, Inc.
@c Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
@c This is part of the GAS manual.
@@ -65,19 +65,49 @@ These options select the byte order. The @code{-mle} option selects little-endi
byte order (default) and @code{-mbe} selects big-endian byte order. Note that
IA-64 machine code always uses little-endian byte order.
+@item -mtune=itanium1
+@item -mtune=itanium2
+Tune for a particular IA-64 CPU, @var{itanium1} or @var{itanium2}. The
+default is @var{itanium2}.
+
+@item -munwind-check=warning
+@item -munwind-check=error
+These options control what the assembler will do when performing
+consistency checks on unwind directives. @code{-munwind-check=warning}
+will make the assembler issue a warning when an unwind directive check
+fails. This is the default. @code{-munwind-check=error} will make the
+assembler issue an error when an unwind directive check fails.
+
+@item -mhint.b=ok
+@item -mhint.b=warning
+@item -mhint.b=error
+These options control what the assembler will do when the @samp{hint.b}
+instruction is used. @code{-mhint.b=ok} will make the assembler accept
+@samp{hint.b}. @code{-mint.b=warning} will make the assembler issue a
+warning when @samp{hint.b} is used. @code{-mhint.b=error} will make
+the assembler treat @samp{hint.b} as an error, which is the default.
+
@item -x
@item -xexplicit
-These options turn on dependency violation checking. This checking is turned on by
-default.
+These options turn on dependency violation checking.
@item -xauto
This option instructs the assembler to automatically insert stop bits where necessary
-to remove dependency violations.
+to remove dependency violations. This is the default mode.
+
+@item -xnone
+This option turns off dependency violation checking.
@item -xdebug
This turns on debug output intended to help tracking down bugs in the dependency
violation checker.
+@item -xdebugn
+This is a shortcut for -xnone -xdebug.
+
+@item -xdebugx
+This is a shortcut for -xexplicit -xdebug.
+
@end table
@cindex IA-64 Syntax
@@ -90,7 +120,7 @@ Reference Guide.
* IA-64-Chars:: Special Characters
* IA-64-Regs:: Register Names
* IA-64-Bits:: Bit Names
-* IA-64-Relocs:: Relocations
+@c * IA-64-Relocs:: Relocations // to be written
@end menu
@node IA-64-Chars
@@ -136,7 +166,7 @@ the end-of-interrupt register (@samp{cr67}).
The assembler defines bit masks for each of the bits in the IA-64
processor status register. For example, @samp{psr.ic} corresponds to
a value of 0x2000. These masks are primarily intended for use with
-the @sample{ssm}/@sample{sum} and @sample{rsm}/@sample{rum}
+the @samp{ssm}/@samp{sum} and @samp{rsm}/@samp{rum}
instructions, but they can be used anywhere else where an integer
constant is expected.
diff --git a/contrib/binutils/gas/doc/c-mips.texi b/contrib/binutils/gas/doc/c-mips.texi
index 1375230a673b..3c70ff29bc08 100644
--- a/contrib/binutils/gas/doc/c-mips.texi
+++ b/contrib/binutils/gas/doc/c-mips.texi
@@ -26,6 +26,7 @@ Assembly Language Programming'' in the same work.
* MIPS Object:: ECOFF object code
* MIPS Stabs:: Directives for debugging information
* MIPS ISA:: Directives to override the ISA level
+* MIPS symbol sizes:: Directives to override the size of symbols
* MIPS autoextend:: Directives for extending MIPS 16 bit instructions
* MIPS insn:: Directive to mark data as an instruction
* MIPS option stack:: Directives to save and restore options
@@ -117,6 +118,18 @@ Generate code for the MDMX Application Specific Extension.
This tells the assembler to accept MDMX instructions.
@samp{-no-mdmx} turns off this option.
+@item -mdsp
+@itemx -mno-dsp
+Generate code for the DSP Application Specific Extension.
+This tells the assembler to accept DSP instructions.
+@samp{-mno-dsp} turns off this option.
+
+@item -mmt
+@itemx -mno-mt
+Generate code for the MT Application Specific Extension.
+This tells the assembler to accept MT instructions.
+@samp{-mno-mt} turns off this option.
+
@item -mfix7000
@itemx -mno-fix7000
Cause nops to be inserted if the read of the destination register
@@ -128,6 +141,10 @@ Insert nops to work around certain VR4120 errata. This option is
intended to be used on GCC-generated code: it is not designed to catch
all problems in hand-written assembler code.
+@item -mfix-vr4130
+@itemx -no-mfix-vr4130
+Insert nops to work around the VR4130 @samp{mflo}/@samp{mfhi} errata.
+
@item -m4010
@itemx -no-m4010
Generate code for the LSI @sc{r4010} chip. This tells the assembler to
@@ -197,6 +214,13 @@ identical to @samp{-march=@var{cpu}}.
Record which ABI the source code uses. The recognized arguments
are: @samp{32}, @samp{n32}, @samp{o64}, @samp{64} and @samp{eabi}.
+@item -msym32
+@itemx -mno-sym32
+@cindex -msym32
+@cindex -mno-sym32
+Equivalent to adding @code{.set sym32} or @code{.set nosym32} to
+the beginning of the assembler input. @xref{MIPS symbol sizes}.
+
@cindex @code{-nocpp} ignored (MIPS)
@item -nocpp
This option is ignored. It is accepted for command-line compatibility with
@@ -238,6 +262,16 @@ error is detected. This is the default.
@itemx -mno-pdr
Control generation of @code{.pdr} sections. Off by default on IRIX, on
elsewhere.
+
+@item -mshared
+@itemx -mno-shared
+When generating code using the Unix calling conventions (selected by
+@samp{-KPIC} or @samp{-mcall_shared}), gas will normally generate code
+which can go into a shared library. The @samp{-mno-shared} option
+tells gas to generate code which uses the calling convention, but can
+not go into a shared library. The resulting code is slightly more
+efficient. This option only affects the handling of the
+@samp{.cpload} and @samp{.cpsetup} pseudo-ops.
@end table
@node MIPS Object
@@ -287,6 +321,61 @@ not by traditional @sc{mips} debuggers (this enhancement is required to fully
support C++ debugging). These directives are primarily used by compilers, not
assembly language programmers!
+@node MIPS symbol sizes
+@section Directives to override the size of symbols
+
+@cindex @code{.set sym32}
+@cindex @code{.set nosym32}
+The n64 ABI allows symbols to have any 64-bit value. Although this
+provides a great deal of flexibility, it means that some macros have
+much longer expansions than their 32-bit counterparts. For example,
+the non-PIC expansion of @samp{dla $4,sym} is usually:
+
+@smallexample
+lui $4,%highest(sym)
+lui $1,%hi(sym)
+daddiu $4,$4,%higher(sym)
+daddiu $1,$1,%lo(sym)
+dsll32 $4,$4,0
+daddu $4,$4,$1
+@end smallexample
+
+whereas the 32-bit expansion is simply:
+
+@smallexample
+lui $4,%hi(sym)
+daddiu $4,$4,%lo(sym)
+@end smallexample
+
+n64 code is sometimes constructed in such a way that all symbolic
+constants are known to have 32-bit values, and in such cases, it's
+preferable to use the 32-bit expansion instead of the 64-bit
+expansion.
+
+You can use the @code{.set sym32} directive to tell the assembler
+that, from this point on, all expressions of the form
+@samp{@var{symbol}} or @samp{@var{symbol} + @var{offset}}
+have 32-bit values. For example:
+
+@smallexample
+.set sym32
+dla $4,sym
+lw $4,sym+16
+sw $4,sym+0x8000($4)
+@end smallexample
+
+will cause the assembler to treat @samp{sym}, @code{sym+16} and
+@code{sym+0x8000} as 32-bit values. The handling of non-symbolic
+addresses is not affected.
+
+The directive @code{.set nosym32} ends a @code{.set sym32} block and
+reverts to the normal behavior. It is also possible to change the
+symbol size using the command-line options @option{-msym32} and
+@option{-mno-sym32}.
+
+These options and directives are always accepted, but at present,
+they have no effect for anything other than n64.
+
@node MIPS ISA
@section Directives to override the ISA level
@@ -374,4 +463,20 @@ 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
+@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.
+
+@cindex MIPS MT instruction generation override
+@kindex @code{.set mt}
+@kindex @code{.set nomt}
+The directive @code{.set mt} makes the assembler accept instructions
+from the MT Application Specific Extension from that point on
+in the assembly. The @code{.set nomt} directive prevents MT
+instructions from being accepted.
+
Traditional @sc{mips} assemblers do not support these directives.
diff --git a/contrib/binutils/gas/doc/c-ppc.texi b/contrib/binutils/gas/doc/c-ppc.texi
index be90e336f8bd..4c9c096c055e 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
+@c Copyright 2001, 2002, 2003, 2005
@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@@ -67,12 +67,18 @@ Generate code for 64-bit BookE.
@item -mbooke, mbooke32
Generate code for 32-bit BookE.
+@item -me300
+Generate code for PowerPC e300 family.
+
@item -maltivec
Generate code for processors with AltiVec instructions.
@item -mpower4
Generate code for Power4 architecture.
+@item -mpower5
+Generate code for Power5 architecture.
+
@item -mcom
Generate code Power/PowerPC common instructions.
diff --git a/contrib/binutils/gas/doc/c-sh.texi b/contrib/binutils/gas/doc/c-sh.texi
index b08f325ee08e..e6dbe4bf5c2c 100644
--- a/contrib/binutils/gas/doc/c-sh.texi
+++ b/contrib/binutils/gas/doc/c-sh.texi
@@ -1,4 +1,4 @@
-@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2001, 2004
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2001, 2003, 2004, 2005
@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@@ -24,39 +24,43 @@
(formerly Hitachi) / SuperH SH family.
@table @code
-@kindex -little
-@kindex -big
-@kindex -relax
-@kindex -small
-@kindex -dsp
-@kindex -renesas
-
-@item -little
+@kindex --little
+@kindex --big
+@kindex --relax
+@kindex --small
+@kindex --dsp
+@kindex --renesas
+@kindex --allow-reg-prefix
+
+@item --little
Generate little endian code.
-@item -big
+@item --big
Generate big endian code.
-@item -relax
+@item --relax
Alter jump instructions for long displacements.
-@item -small
+@item --small
Align sections to 4 byte boundaries, not 16.
-@item -dsp
+@item --dsp
Enable sh-dsp insns, and disable sh3e / sh4 insns.
-@item -renesas
+@item --renesas
Disable optimization with section symbol for compatibility with
Renesas assembler.
-@item -isa=sh4 | sh4a
+@item --allow-reg-prefix
+Allow '$' as a register name prefix.
+
+@item --isa=sh4 | sh4a
Specify the sh4 or sh4a instruction set.
-@item -isa=dsp
+@item --isa=dsp
Enable sh-dsp insns, and disable sh3e / sh4 insns.
-@item -isa=fp
+@item --isa=fp
Enable sh2e, sh3e, sh4, and sh4a insn sets.
-@item -isa=all
+@item --isa=all
Enable sh1, sh2, sh2e, sh3, sh3e, sh4, sh4a, and sh-dsp insn sets.
@end table
diff --git a/contrib/binutils/gas/doc/c-sparc.texi b/contrib/binutils/gas/doc/c-sparc.texi
index c34950e13f7f..351b300b2f1a 100644
--- a/contrib/binutils/gas/doc/c-sparc.texi
+++ b/contrib/binutils/gas/doc/c-sparc.texi
@@ -1,4 +1,4 @@
-@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999
+@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2002
@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
diff --git a/contrib/binutils/gas/doc/gasver.texi b/contrib/binutils/gas/doc/gasver.texi
index 3610a96b9671..11d1801d6e65 100644
--- a/contrib/binutils/gas/doc/gasver.texi
+++ b/contrib/binutils/gas/doc/gasver.texi
@@ -1 +1 @@
-@set VERSION 2.15
+@set VERSION 2.17
diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi
index 6719bbf945d3..dffdb1e04fa9 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
+@c 2001, 2002, 2003, 2004, 2005
@c Free Software Foundation, Inc.
@setfilename internals.info
@node Top
@@ -14,7 +14,6 @@ it may help a bit.
This chapter is not updated regularly, and it may be out of date.
@menu
-* GAS versions:: GAS versions
* Data types:: Data types
* GAS processing:: What GAS does when it runs
* Porting GAS:: Porting GAS
@@ -24,80 +23,6 @@ This chapter is not updated regularly, and it may be out of date.
* Test suite:: Test suite
@end menu
-@node GAS versions
-@section GAS versions
-
-GAS has acquired layers of code over time. The original GAS only supported the
-a.out object file format, with three sections. Support for multiple sections
-has been added in two different ways.
-
-The preferred approach is to use the version of GAS created when the symbol
-@code{BFD_ASSEMBLER} is defined. The other versions of GAS are documented for
-historical purposes, and to help anybody who has to debug code written for
-them.
-
-The type @code{segT} is used to represent a section in code which must work
-with all versions of GAS.
-
-@menu
-* Original GAS:: Original GAS version
-* MANY_SEGMENTS:: MANY_SEGMENTS gas version
-* BFD_ASSEMBLER:: BFD_ASSEMBLER gas version
-@end menu
-
-@node Original GAS
-@subsection Original GAS
-
-The original GAS only supported the a.out object file format with three
-sections: @samp{.text}, @samp{.data}, and @samp{.bss}. This is the version of
-GAS that is compiled if neither @code{BFD_ASSEMBLER} nor @code{MANY_SEGMENTS}
-is defined. This version of GAS is still used for the m68k-aout target, and
-perhaps others.
-
-This version of GAS should not be used for any new development.
-
-There is still code that is specific to this version of GAS, notably in
-@file{write.c}. There is no way for this code to loop through all the
-sections; it simply looks at global variables like @code{text_frag_root} and
-@code{data_frag_root}.
-
-The type @code{segT} is an enum.
-
-@node MANY_SEGMENTS
-@subsection MANY_SEGMENTS gas version
-@cindex MANY_SEGMENTS
-
-The @code{MANY_SEGMENTS} version of gas is only used for COFF. It uses the BFD
-library, but it writes out all the data itself using @code{bfd_write}. This
-version of gas supports up to 40 normal sections. The section names are stored
-in the @code{seg_name} array. Other information is stored in the
-@code{segment_info} array.
-
-The type @code{segT} is an enum. Code that wants to examine all the sections
-can use a @code{segT} variable as loop index from @code{SEG_E0} up to but not
-including @code{SEG_UNKNOWN}.
-
-Most of the code specific to this version of GAS is in the file
-@file{config/obj-coff.c}, in the portion of that file that is compiled when
-@code{BFD_ASSEMBLER} is not defined.
-
-This version of GAS is still used for several COFF targets.
-
-@node BFD_ASSEMBLER
-@subsection BFD_ASSEMBLER gas version
-@cindex BFD_ASSEMBLER
-
-The preferred version of GAS is the @code{BFD_ASSEMBLER} version. In this
-version of GAS, the output file is a normal BFD, and the BFD routines are used
-to generate the output.
-
-@code{BFD_ASSEMBLER} will automatically be used for certain targets, including
-those that use the ELF, ECOFF, and SOM object file formats, and also all Alpha,
-MIPS, PowerPC, and SPARC targets. You can force the use of
-@code{BFD_ASSEMBLER} for other targets with the configure option
-@samp{--enable-bfd-assembler}; however, it has not been tested for many
-targets, and can not be assumed to work.
-
@node Data types
@section Data types
@cindex internals, data types
@@ -152,10 +77,8 @@ symbol list.
@item sy_next
@itemx sy_previous
-These pointers to other @code{symbolS} structures describe a singly or doubly
-linked list. (If @code{SYMBOLS_NEED_BACKPOINTERS} is not defined, the
-@code{sy_previous} field will be omitted; @code{SYMBOLS_NEED_BACKPOINTERS} is
-always defined if @code{BFD_ASSEMBLER}.) These fields should be accessed with
+These pointers to other @code{symbolS} structures describe a doubly
+linked list. These fields should be accessed with
the @code{symbol_next} and @code{symbol_previous} macros.
@item sy_frag
@@ -170,23 +93,22 @@ responsible for setting it when a symbol is used in backend routines.
Whether the symbol is an MRI common symbol created by the @code{COMMON}
pseudo-op when assembling in MRI mode.
-@item bsym
-If @code{BFD_ASSEMBLER} is defined, this points to the BFD @code{asymbol} that
-will be used in writing the object file.
+@item sy_volatile
+Whether the symbol can be re-defined.
-@item sy_name_offset
-(Only used if @code{BFD_ASSEMBLER} is not defined.) This is the position of
-the symbol's name in the string table of the object file. On some formats,
-this will start at position 4, with position 0 reserved for unnamed symbols.
-This field is not used until @code{write_object_file} is called.
+@item sy_forward_ref
+Whether the symbol's value must only be evaluated upon use.
-@item sy_symbol
-(Only used if @code{BFD_ASSEMBLER} is not defined.) This is the
-format-specific symbol structure, as it would be written into the object file.
+@item sy_weakrefr
+Whether the symbol is a @code{weakref} alias to another symbol.
-@item sy_number
-(Only used if @code{BFD_ASSEMBLER} is not defined.) This is a 24-bit symbol
-number, for use in constructing relocation table entries.
+@item sy_weakrefd
+Whether the symbol is or was referenced by one or more @code{weakref} aliases,
+and has not had any direct references.
+
+@item bsym
+This points to the BFD @code{asymbol} that
+will be used in writing the object file.
@item sy_obj
This format-specific data is of type @code{OBJ_SYMFIELD_TYPE}. If no macro by
@@ -237,7 +159,27 @@ A synonym for @code{S_IS_EXTERNAL}. Don't use it.
@item S_IS_WEAK
@cindex S_IS_WEAK
-Return non-zero if the symbol is weak.
+Return non-zero if the symbol is weak, or if it is a @code{weakref} alias or
+symbol that has not been strongly referenced.
+
+@item S_IS_WEAKREFR
+@cindex S_IS_WEAKREFR
+Return non-zero if the symbol is a @code{weakref} alias.
+
+@item S_IS_WEAKREFD
+@cindex S_IS_WEAKREFD
+Return non-zero if the symbol was aliased by a @code{weakref} alias and has not
+had any strong references.
+
+@item S_IS_VOLATILE
+@cindex S_IS_VOLATILE
+Return non-zero if the symbol may be re-defined. Such symbols get created by
+the @code{=} operator, @code{equ}, or @code{set}.
+
+@item S_IS_FORWARD_REF
+@cindex S_IS_FORWARD_REF
+Return non-zero if the symbol is a forward reference, that is its value must
+only be determined upon use.
@item S_IS_COMMON
@cindex S_IS_COMMON
@@ -273,6 +215,42 @@ Mark the symbol as not externally visible.
@cindex S_SET_WEAK
Mark the symbol as weak.
+@item S_SET_WEAKREFR
+@cindex S_SET_WEAKREFR
+Mark the symbol as the referrer in a @code{weakref} directive. The symbol it
+aliases must have been set to the value expression before this point. If the
+alias has already been used, the symbol is marked as used too.
+
+@item S_CLEAR_WEAKREFR
+@cindex S_CLEAR_WEAKREFR
+Clear the @code{weakref} alias status of a symbol. This is implicitly called
+whenever a symbol is defined or set to a new expression.
+
+@item S_SET_WEAKREFD
+@cindex S_SET_WEAKREFD
+Mark the symbol as the referred symbol in a @code{weakref} directive.
+Implicitly marks the symbol as weak, but see below. It should only be called
+if the referenced symbol has just been added to the symbol table.
+
+@item S_SET_WEAKREFD
+@cindex S_SET_WEAKREFD
+Clear the @code{weakref} aliased status of a symbol. This is implicitly called
+whenever the symbol is looked up, as part of a direct reference or a
+definition, but not as part of a @code{weakref} directive.
+
+@item S_SET_VOLATILE
+@cindex S_SET_VOLATILE
+Indicate that the symbol may be re-defined.
+
+@item S_CLEAR_VOLATILE
+@cindex S_CLEAR_VOLATILE
+Indicate that the symbol may no longer be re-defined.
+
+@item S_SET_FORWARD_REF
+@cindex S_SET_FORWARD_REF
+Indicate that the symbol is a forward reference, that is its value must only
+be determined upon use.
+
@item S_GET_TYPE
@item S_GET_DESC
@item S_GET_OTHER
@@ -415,7 +393,7 @@ Set the @code{TC_SYMFIELD_TYPE} field of a symbol.
@end table
-When @code{BFD_ASSEMBLER} is defined, GAS attempts to store local
+GAS attempts to store local
symbols--symbols which will not be written to the output file--using a
different structure, @code{struct local_symbol}. This structure can only
represent symbols whose value is an offset within a frag.
@@ -484,8 +462,8 @@ the fixup becomes a relocation entry in the object file.
@cindex fix_new_exp
A fixup is created by a call to @code{fix_new} or @code{fix_new_exp}. Both
take a frag (@pxref{Frags}), a position within the frag, a size, an indication
-of whether the fixup is PC relative, and a type. In a @code{BFD_ASSEMBLER}
-GAS, the type is nominally a @code{bfd_reloc_code_real_type}, but several
+of whether the fixup is PC relative, and a type.
+The type is nominally a @code{bfd_reloc_code_real_type}, but several
targets use other type codes to represent fixups that can not be described as
relocations.
@@ -512,15 +490,14 @@ A number which is added into the fixup.
@item fx_addnumber
Some CPU backends use this field to convey information between
-@code{md_apply_fix3} and @code{tc_gen_reloc}. The machine independent code does
+@code{md_apply_fix} and @code{tc_gen_reloc}. The machine independent code does
not use it.
@item fx_next
The next fixup in the section.
@item fx_r_type
-The type of the fixup. This field is only defined if @code{BFD_ASSEMBLER}, or
-if the target defines @code{NEED_FX_R_TYPE}.
+The type of the fixup.
@item fx_size
The size of the fixup. This is mostly used for error checking.
@@ -683,8 +660,7 @@ Indicates the section this frag chain belongs to.
@item frch_subseg
Subsection (subsegment) number of this frag chain.
@item fix_root, fix_tail
-(Defined only if @code{BFD_ASSEMBLER} is defined). Point to first and last
-@code{fixS} structures associated with this subsection.
+Point to first and last @code{fixS} structures associated with this subsection.
@item frch_obstack
Not currently used. Intended to be used for frag allocation for this
subsection. This should reduce frag generation caused by switching sections.
@@ -748,8 +724,7 @@ store relaxation information (@pxref{Relaxation}).
When the input file is finished, the @code{write_object_file} routine is
called. It assigns addresses to all the frags (@code{relax_segment}), resolves
all the fixups (@code{fixup_segment}), resolves all the symbol values (using
-@code{resolve_symbol_value}), and finally writes out the file (in the
-@code{BFD_ASSEMBLER} case, this is done by simply calling @code{bfd_close}).
+@code{resolve_symbol_value}), and finally writes out the file.
@end itemize
@node Porting GAS
@@ -858,13 +833,17 @@ independent string passed to @code{getopt}. @code{md_longopts} is a
passed to @code{getopt}; you may use @code{OPTION_MD_BASE}, defined in
@file{as.h}, as the start of a set of long option indices, if necessary.
@code{md_longopts_size} is a @code{size_t} holding the size @code{md_longopts}.
+
GAS will call @code{md_parse_option} whenever @code{getopt} returns an
unrecognized code, presumably indicating a special code value which appears in
-@code{md_longopts}. GAS will call @code{md_show_usage} when a usage message is
-printed; it should print a description of the machine specific options.
-@code{md_after_pase_args}, if defined, is called after all options are
-processed, to let the backend override settings done by the generic option
-parsing.
+@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.
+
+GAS will call @code{md_show_usage} when a usage message is printed; it should
+print a description of the machine specific options. @code{md_after_pase_args},
+if defined, is called after all options are processed, to let the backend
+override settings done by the generic option parsing.
@item md_begin
@cindex md_begin
@@ -1015,6 +994,11 @@ default definition is to accept any name followed by a colon character.
Same as TC_START_LABEL, but should be used instead of TC_START_LABEL when
LABELS_WITHOUT_COLONS is defined.
+@item TC_FAKE_LABEL
+@cindex TC_FAKE_LABEL
+You may define this macro to control what GAS considers to be a fake
+label. The default fake label is FAKE_LABEL_NAME.
+
@item NO_PSEUDO_DOT
@cindex NO_PSEUDO_DOT
If you define this macro, GAS will not require pseudo-ops to start with a
@@ -1025,7 +1009,7 @@ If you define this macro, GAS will not require pseudo-ops to start with a
If you define this macro, it should return nonzero if the instruction is
permitted to contain an @kbd{=} character. GAS will call it with two
arguments, the character before the @kbd{=} character, and the value of
-@code{input_line_pointer} at that point. GAS uses this macro to decide if a
+the string preceding the equal sign. GAS uses this macro to decide if a
@kbd{=} is an assignment or an instruction.
@item TC_EOL_IN_INSN
@@ -1118,6 +1102,11 @@ pseudo-op.
@cindex TC_CONS_FIX_NEW
You may define this macro to generate a fixup for a data allocation pseudo-op.
+@item TC_ADDRESS_BYTES
+@cindex TC_ADDRESS_BYTES
+Define this macro to specify the number of bytes used to store an address.
+Used to implement @code{dc.a}. The target must have a reloc for this size.
+
@item TC_INIT_FIX_DATA (@var{fixp})
@cindex TC_INIT_FIX_DATA
A C statement to initialize the target specific fields of fixup @var{fixp}.
@@ -1167,12 +1156,6 @@ single precision, @samp{D_PRECISION} for double precision, or
The macro has a default definition which returns 0 for all cases.
-@item md_reloc_size
-@cindex md_reloc_size
-This variable is only used in the original version of gas (not
-@code{BFD_ASSEMBLER} and not @code{MANY_SEGMENTS}). It holds the size of a
-relocation entry.
-
@item WORKING_DOT_WORD
@itemx md_short_jump_size
@itemx md_long_jump_size
@@ -1236,7 +1219,7 @@ given section will be processed when the @var{linkrelax} variable is
set. The macro is given the N_TYPE bits for the section in its
@var{segT} argument. If the macro evaluates to a non-zero value
then the fixups will be converted into relocs, otherwise they will
-be passed to @var{md_apply_fix3} as normal.
+be passed to @var{md_apply_fix} as normal.
@item md_convert_frag
@cindex md_convert_frag
@@ -1263,11 +1246,11 @@ It may be used to change the fixup in @code{struct fix *@var{fixP}} before
the generic code sees it, or to fully process the fixup. In the latter case,
a @code{goto @var{skip}} will bypass the generic code.
-@item md_apply_fix3 (@var{fixP}, @var{valP}, @var{seg})
-@cindex md_apply_fix3
+@item md_apply_fix (@var{fixP}, @var{valP}, @var{seg})
+@cindex md_apply_fix
GAS will call this for each fixup that passes the @code{TC_VALIDATE_FIX} test
when @var{linkrelax} is not set. It should store the correct value in the
-object file. @code{struct fix *@var{fixP}} is the fixup @code{md_apply_fix3}
+object file. @code{struct fix *@var{fixP}} is the fixup @code{md_apply_fix}
is operating on. @code{valueT *@var{valP}} is the value to store into the
object files, or at least is the generic code's best guess. Specifically,
*@var{valP} is the value of the fixup symbol, perhaps modified by
@@ -1275,8 +1258,8 @@ object files, or at least is the generic code's best guess. Specifically,
less @code{MD_PCREL_FROM_SECTION} for pc-relative fixups.
@code{segT @var{seg}} is the section the fix is in.
@code{fixup_segment} performs a generic overflow check on *@var{valP} after
-@code{md_apply_fix3} returns. If the overflow check is relevant for the target
-machine, then @code{md_apply_fix3} should modify *@var{valP}, typically to the
+@code{md_apply_fix} returns. If the overflow check is relevant for the target
+machine, then @code{md_apply_fix} should modify *@var{valP}, typically to the
value stored in the object file.
@item TC_FORCE_RELOCATION (@var{fix})
@@ -1304,7 +1287,7 @@ returns non-zero, will emit relocs.
This macro controls resolution of fixup expressions involving the
difference of two symbols in the same section. If this macro returns zero,
the subtrahend will be resolved and @code{fx_subsy} set to @code{NULL} for
-@code{md_apply_fix3}. If undefined, the default of
+@code{md_apply_fix}. If undefined, the default of
@w{@code{! SEG_NORMAL (@var{seg}) || TC_FORCE_RELOCATION (@var{fix})}} will
be used.
@@ -1327,13 +1310,13 @@ This macro is evaluated for any fixup with a @code{fx_subsy} that
@item MD_APPLY_SYM_VALUE (@var{fix})
@cindex MD_APPLY_SYM_VALUE
This macro controls whether the symbol value becomes part of the value passed
-to @code{md_apply_fix3}. If the macro is undefined, or returns non-zero, the
+to @code{md_apply_fix}. If the macro is undefined, or returns non-zero, the
symbol value will be included. For ELF, a suitable definition might simply be
@code{0}, because ELF relocations don't include the symbol value in the addend.
@item S_FORCE_RELOC (@var{sym}, @var{strict})
@cindex S_FORCE_RELOC
-This macro (or function, for @code{BFD_ASSEMBLER} gas) returns true for symbols
+This function returns true for symbols
that should not be reduced to section symbols or eliminated from expressions,
because they may be overridden by the linker. ie. for symbols that are
undefined or common, and when @var{strict} is set, weak, or global (for ELF
@@ -1347,7 +1330,7 @@ symbols. If undefined, the default is @code{true} for ELF assemblers, and
@item tc_gen_reloc
@cindex tc_gen_reloc
-A @code{BFD_ASSEMBLER} GAS will call this to generate a reloc. GAS will pass
+GAS will call this to generate a reloc. GAS will pass
the resulting reloc to @code{bfd_install_relocation}. This currently works
poorly, as @code{bfd_install_relocation} often does the wrong thing, and
instances of @code{tc_gen_reloc} have been written to work around the problems,
@@ -1432,7 +1415,7 @@ whitespace, or concatenated if there is not.
@item tc_frob_section
@cindex tc_frob_section
-If you define this macro, a @code{BFD_ASSEMBLER} GAS will call it for each
+If you define this macro, GAS will call it for each
section at the end of the assembly.
@item tc_frob_file_before_adjust
@@ -1520,6 +1503,20 @@ It should return the size of an address, as it should be represented in
debugging info. If you don't define this macro, the default definition uses
the number of bits per address, as defined in @var{bfd}, divided by 8.
+@item MD_DEBUG_FORMAT_SELECTOR
+@cindex MD_DEBUG_FORMAT_SELECTOR
+If defined this macro is the name of a function to be called when the
+@samp{--gen-debug} switch is detected on the assembler's command line. The
+prototype for the function looks like this:
+
+@smallexample
+ enum debug_info_type MD_DEBUG_FORMAT_SELECTOR (int * use_gnu_extensions)
+@end smallexample
+
+The function should return the debug format that is preferred by the CPU
+backend. This format will be used when generating assembler specific debug
+information.
+
@end table
@node Object format backend
@@ -1534,11 +1531,6 @@ defining a number of pseudo-ops.
The object format @file{.h} file must include @file{targ-cpu.h}.
-This section will only define the @code{BFD_ASSEMBLER} version of GAS. It is
-impossible to support a new object file format using any other version anyhow,
-as the original GAS version only supports a.out, and the @code{MANY_SEGMENTS}
-GAS version only supports COFF.
-
@table @code
@item OBJ_@var{format}
@cindex OBJ_@var{format}
@@ -1610,6 +1602,16 @@ If you define this macro, GAS will call it for each symbol. You can indicate
that the symbol should not be included in the object file by defining this
macro to set its second argument to a non-zero value.
+@item obj_set_weak_hook
+@cindex obj_set_weak_hook
+If you define this macro, @code{S_SET_WEAK} will call it before modifying the
+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
+the @code{weakrefd} flag, but before modifying any other flags.
+
@item obj_frob_file
@cindex obj_frob_file
If you define this macro, GAS will call it after the symbol table has been
@@ -1623,8 +1625,7 @@ generated.
@cindex SET_SECTION_RELOCS
If you define this, it will be called after the relocations have been set for
the section @var{sec}. The list of relocations is in @var{relocs}, and the
-number of relocations is in @var{n}. This is only used with
-@code{BFD_ASSEMBLER}.
+number of relocations is in @var{n}.
@end table
@node Emulations
@@ -1870,9 +1871,8 @@ after all input has been read, but messages about fixups should refer to the
original filename and line number that they are applicable to.
@end deftypefun
-@deftypefun @{@} void fprint_value (FILE *@var{file}, valueT @var{val})
-@deftypefunx @{@} void sprint_value (char *@var{buf}, valueT @var{val})
-These functions are helpful for converting a @code{valueT} value into printable
+@deftypefun @{@} void sprint_value (char *@var{buf}, valueT @var{val})
+This function is helpful for converting a @code{valueT} value into printable
format, in case it's wider than modes that @code{*printf} can handle. If the
type is narrow enough, a decimal number will be produced; otherwise, it will be
in hexadecimal. The value itself is not examined to make this determination.
diff --git a/contrib/binutils/gas/dw2gencfi.c b/contrib/binutils/gas/dw2gencfi.c
index ff0aa35353d2..bfa5d5cf45a6 100644
--- a/contrib/binutils/gas/dw2gencfi.c
+++ b/contrib/binutils/gas/dw2gencfi.c
@@ -1,5 +1,5 @@
/* dw2gencfi.c - Support for generating Dwarf2 CFI information.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by Michal Ludvig <mludvig@suse.cz>
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "as.h"
#include "dw2gencfi.h"
@@ -25,7 +25,7 @@
/* We re-use DWARF2_LINE_MIN_INSN_LENGTH for the code alignment field
of the CIE. Default to 1 if not otherwise specified. */
-#ifndef DWARF2_LINE_MIN_INSN_LENGTH
+#ifndef DWARF2_LINE_MIN_INSN_LENGTH
# define DWARF2_LINE_MIN_INSN_LENGTH 1
#endif
@@ -33,20 +33,16 @@
provide the following definitions. Otherwise provide them to
allow compilation to continue. */
#ifndef TARGET_USE_CFIPOP
-# ifndef DWARF2_DEFAULT_RETURN_COLUMN
+# ifndef DWARF2_DEFAULT_RETURN_COLUMN
# define DWARF2_DEFAULT_RETURN_COLUMN 0
# endif
-# ifndef DWARF2_CIE_DATA_ALIGNMENT
+# ifndef DWARF2_CIE_DATA_ALIGNMENT
# define DWARF2_CIE_DATA_ALIGNMENT 1
# endif
#endif
#ifndef EH_FRAME_ALIGNMENT
-# ifdef BFD_ASSEMBLER
-# define EH_FRAME_ALIGNMENT (bfd_get_arch_size (stdoutput) == 64 ? 3 : 2)
-# else
-# define EH_FRAME_ALIGNMENT 2
-# endif
+# define EH_FRAME_ALIGNMENT (bfd_get_arch_size (stdoutput) == 64 ? 3 : 2)
#endif
#ifndef tc_cfi_frame_initial_instructions
@@ -92,6 +88,7 @@ struct fde_entry
struct cfi_insn_data *data;
struct cfi_insn_data **last;
unsigned int return_column;
+ unsigned int signal_frame;
};
struct cie_entry
@@ -99,6 +96,7 @@ struct cie_entry
struct cie_entry *next;
symbolS *start_address;
unsigned int return_column;
+ unsigned int signal_frame;
struct cfi_insn_data *first, *last;
};
@@ -341,6 +339,8 @@ cfi_add_CFA_restore_state (void)
cfa_save_stack = p->next;
free (p);
}
+ else
+ as_bad (_("CFI state restore without previous remember"));
}
@@ -356,6 +356,7 @@ static void dot_cfi_endproc (int);
#define CFI_return_column 0x101
#define CFI_rel_offset 0x102
#define CFI_escape 0x103
+#define CFI_signal_frame 0x104
const pseudo_typeS cfi_pseudo_table[] =
{
@@ -376,6 +377,7 @@ const pseudo_typeS cfi_pseudo_table[] =
{ "cfi_restore_state", dot_cfi, DW_CFA_restore_state },
{ "cfi_window_save", dot_cfi, DW_CFA_GNU_window_save },
{ "cfi_escape", dot_cfi_escape, 0 },
+ { "cfi_signal_frame", dot_cfi, CFI_signal_frame },
{ NULL, NULL, 0 }
};
@@ -417,7 +419,7 @@ cfi_parse_reg (void)
}
#endif
- expression (&exp);
+ expression_and_evaluate (&exp);
switch (exp.X_op)
{
case O_register:
@@ -449,6 +451,7 @@ dot_cfi (int arg)
if (!cur_fde_data)
{
as_bad (_("CFI instruction used without previous .cfi_startproc"));
+ ignore_rest_of_line ();
return;
}
@@ -503,13 +506,27 @@ dot_cfi (int arg)
break;
case DW_CFA_restore:
- reg1 = cfi_parse_reg ();
- cfi_add_CFA_restore (reg1);
+ for (;;)
+ {
+ reg1 = cfi_parse_reg ();
+ cfi_add_CFA_restore (reg1);
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != ',')
+ break;
+ ++input_line_pointer;
+ }
break;
case DW_CFA_undefined:
- reg1 = cfi_parse_reg ();
- cfi_add_CFA_undefined (reg1);
+ for (;;)
+ {
+ reg1 = cfi_parse_reg ();
+ cfi_add_CFA_undefined (reg1);
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != ',')
+ break;
+ ++input_line_pointer;
+ }
break;
case DW_CFA_same_value:
@@ -534,6 +551,10 @@ dot_cfi (int arg)
cfi_add_CFA_insn (DW_CFA_GNU_window_save);
break;
+ case CFI_signal_frame:
+ cur_fde_data->signal_frame = 1;
+ break;
+
default:
abort ();
}
@@ -550,6 +571,7 @@ dot_cfi_escape (int ignored ATTRIBUTE_UNUSED)
if (!cur_fde_data)
{
as_bad (_("CFI instruction used without previous .cfi_startproc"));
+ ignore_rest_of_line ();
return;
}
@@ -572,6 +594,9 @@ dot_cfi_escape (int ignored ATTRIBUTE_UNUSED)
insn = alloc_cfi_insn_data ();
insn->insn = CFI_escape;
insn->u.esc = head;
+
+ --input_line_pointer;
+ demand_empty_rest_of_line ();
}
static void
@@ -582,6 +607,7 @@ dot_cfi_startproc (int ignored ATTRIBUTE_UNUSED)
if (cur_fde_data)
{
as_bad (_("previous CFI entry not closed (missing .cfi_endproc)"));
+ ignore_rest_of_line ();
return;
}
@@ -605,6 +631,7 @@ dot_cfi_startproc (int ignored ATTRIBUTE_UNUSED)
}
demand_empty_rest_of_line ();
+ cur_cfa_offset = 0;
if (!simple)
tc_cfi_frame_initial_instructions ();
}
@@ -615,10 +642,13 @@ dot_cfi_endproc (int ignored ATTRIBUTE_UNUSED)
if (! cur_fde_data)
{
as_bad (_(".cfi_endproc without corresponding .cfi_startproc"));
+ ignore_rest_of_line ();
return;
}
cfi_end_fde (symbol_temp_new_now ());
+
+ demand_empty_rest_of_line ();
}
@@ -726,7 +756,7 @@ output_cfi_insn (struct cfi_insn_data *insn)
{
out_one (DW_CFA_def_cfa_sf);
out_uleb128 (insn->u.ri.reg);
- out_uleb128 (offset);
+ out_sleb128 (offset / DWARF2_CIE_DATA_ALIGNMENT);
}
else
{
@@ -748,7 +778,7 @@ output_cfi_insn (struct cfi_insn_data *insn)
if (offset < 0)
{
out_one (DW_CFA_def_cfa_offset_sf);
- out_sleb128 (offset);
+ out_sleb128 (offset / DWARF2_CIE_DATA_ALIGNMENT);
}
else
{
@@ -836,17 +866,22 @@ output_cie (struct cie_entry *cie)
exp.X_op_symbol = after_size_address;
exp.X_add_number = 0;
- emit_expr (&exp, 4); /* Length */
+ emit_expr (&exp, 4); /* Length. */
symbol_set_value_now (after_size_address);
- out_four (0); /* CIE id */
- out_one (DW_CIE_VERSION); /* Version */
- out_one ('z'); /* Augmentation */
+ out_four (0); /* CIE id. */
+ out_one (DW_CIE_VERSION); /* Version. */
+ out_one ('z'); /* Augmentation. */
out_one ('R');
+ if (cie->signal_frame)
+ out_one ('S');
out_one (0);
- out_uleb128 (DWARF2_LINE_MIN_INSN_LENGTH); /* Code alignment */
- out_sleb128 (DWARF2_CIE_DATA_ALIGNMENT); /* Data alignment */
- out_one (cie->return_column); /* Return column */
- out_uleb128 (1); /* Augmentation size */
+ out_uleb128 (DWARF2_LINE_MIN_INSN_LENGTH); /* Code alignment. */
+ out_sleb128 (DWARF2_CIE_DATA_ALIGNMENT); /* Data alignment. */
+ if (DW_CIE_VERSION == 1) /* Return column. */
+ out_one (cie->return_column);
+ else
+ out_uleb128 (cie->return_column);
+ out_uleb128 (1); /* Augmentation size. */
#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
out_one (DW_EH_PE_pcrel | DW_EH_PE_sdata4);
#else
@@ -857,7 +892,7 @@ output_cie (struct cie_entry *cie)
for (i = cie->first; i != cie->last; i = i->next)
output_cfi_insn (i);
- frag_align (2, 0, 0);
+ frag_align (2, DW_CFA_nop, 0);
symbol_set_value_now (end_address);
}
@@ -875,39 +910,39 @@ output_fde (struct fde_entry *fde, struct cie_entry *cie,
exp.X_add_symbol = end_address;
exp.X_op_symbol = after_size_address;
exp.X_add_number = 0;
- emit_expr (&exp, 4); /* Length */
+ emit_expr (&exp, 4); /* Length. */
symbol_set_value_now (after_size_address);
exp.X_add_symbol = after_size_address;
exp.X_op_symbol = cie->start_address;
- emit_expr (&exp, 4); /* CIE offset */
+ emit_expr (&exp, 4); /* CIE offset. */
#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 */
+ emit_expr (&exp, 4); /* Code offset. */
#else
exp.X_op = O_symbol;
exp.X_add_symbol = fde->start_address;
exp.X_op_symbol = NULL;
#ifdef tc_cfi_emit_pcrel_expr
- tc_cfi_emit_pcrel_expr (&exp, 4); /* Code offset */
+ tc_cfi_emit_pcrel_expr (&exp, 4); /* Code offset. */
#else
- emit_expr (&exp, 4); /* Code offset */
+ emit_expr (&exp, 4); /* Code offset. */
#endif
exp.X_op = O_subtract;
#endif
exp.X_add_symbol = fde->end_address;
- exp.X_op_symbol = fde->start_address; /* Code length */
+ exp.X_op_symbol = fde->start_address; /* Code length. */
emit_expr (&exp, 4);
- out_uleb128 (0); /* Augmentation size */
+ out_uleb128 (0); /* Augmentation size. */
for (; first; first = first->next)
output_cfi_insn (first);
- frag_align (align, 0, 0);
+ frag_align (align, DW_CFA_nop, 0);
symbol_set_value_now (end_address);
}
@@ -919,7 +954,8 @@ 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)
+ if (cie->return_column != fde->return_column
+ || cie->signal_frame != fde->signal_frame)
continue;
for (i = cie->first, j = fde->data;
i != cie->last && j != NULL;
@@ -930,8 +966,9 @@ select_cie_for_fde (struct fde_entry *fde, struct cfi_insn_data **pfirst)
switch (i->insn)
{
case DW_CFA_advance_loc:
- /* We reached the first advance in the FDE, but did not
- reach the end of the CIE list. */
+ case DW_CFA_remember_state:
+ /* We reached the first advance/remember in the FDE,
+ but did not reach the end of the CIE list. */
goto fail;
case DW_CFA_offset:
@@ -972,8 +1009,13 @@ select_cie_for_fde (struct fde_entry *fde, struct cfi_insn_data **pfirst)
}
/* Success if we reached the end of the CIE list, and we've either
- run out of FDE entries or we've encountered an advance. */
- if (i == cie->last && (!j || j->insn == DW_CFA_advance_loc))
+ run out of FDE entries or we've encountered an advance,
+ remember, or escape. */
+ if (i == cie->last
+ && (!j
+ || j->insn == DW_CFA_advance_loc
+ || j->insn == DW_CFA_remember_state
+ || j->insn == CFI_escape))
{
*pfirst = j;
return cie;
@@ -986,10 +1028,13 @@ select_cie_for_fde (struct fde_entry *fde, struct cfi_insn_data **pfirst)
cie->next = cie_root;
cie_root = cie;
cie->return_column = fde->return_column;
+ cie->signal_frame = fde->signal_frame;
cie->first = fde->data;
for (i = cie->first; i ; i = i->next)
- if (i->insn == DW_CFA_advance_loc)
+ if (i->insn == DW_CFA_advance_loc
+ || i->insn == DW_CFA_remember_state
+ || i->insn == CFI_escape)
break;
cie->last = i;
@@ -1018,10 +1063,8 @@ cfi_finish (void)
/* Open .eh_frame section. */
cfi_seg = subseg_new (".eh_frame", 0);
-#ifdef BFD_ASSEMBLER
bfd_set_section_flags (stdoutput, cfi_seg,
SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_READONLY);
-#endif
subseg_set (cfi_seg, 0);
record_alignment (cfi_seg, EH_FRAME_ALIGNMENT);
diff --git a/contrib/binutils/gas/dw2gencfi.h b/contrib/binutils/gas/dw2gencfi.h
index 75b6ec24610a..53a35fcb68de 100644
--- a/contrib/binutils/gas/dw2gencfi.h
+++ b/contrib/binutils/gas/dw2gencfi.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef DW2GENCFI_H
#define DW2GENCFI_H
diff --git a/contrib/binutils/gas/dwarf2dbg.c b/contrib/binutils/gas/dwarf2dbg.c
index 3336453a4eef..16666fa4f28d 100644
--- a/contrib/binutils/gas/dwarf2dbg.c
+++ b/contrib/binutils/gas/dwarf2dbg.c
@@ -1,5 +1,6 @@
/* dwarf2dbg.c - DWARF2 debug support
- Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GAS, the GNU Assembler.
@@ -16,19 +17,20 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Logical line numbers can be controlled by the compiler via the
- following two directives:
+ following directives:
.file FILENO "file.c"
- .loc FILENO LINENO [COLUMN]
-
- FILENO is the filenumber. */
+ .loc FILENO LINENO [COLUMN] [basic_block] [prologue_end] \
+ [epilogue_begin] [is_stmt VALUE] [isa VALUE]
+*/
#include "ansidecl.h"
#include "as.h"
+#include "safe-ctype.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
@@ -52,8 +54,6 @@
# define DWARF2_ADDR_SIZE(bfd) (bfd_arch_bits_per_address (bfd) / 8)
#endif
-#ifdef BFD_ASSEMBLER
-
#include "subsegs.h"
#include "elf/dwarf2.h"
@@ -69,8 +69,8 @@
/* First special line opcde - leave room for the standard opcodes.
Note: If you want to change this, you'll have to update the
"standard_opcode_lengths" table that is emitted below in
- dwarf2_finish(). */
-#define DWARF2_LINE_OPCODE_BASE 10
+ out_debug_line(). */
+#define DWARF2_LINE_OPCODE_BASE 13
#ifndef DWARF2_LINE_BASE
/* Minimum line offset in a special line info. opcode. This value
@@ -89,10 +89,7 @@
# define DWARF2_LINE_MIN_INSN_LENGTH 1
#endif
-/* Flag that indicates the initial value of the is_stmt_start flag.
- In the present implementation, we do not mark any lines as
- the beginning of a source statement, because that information
- is not made available by the GCC front-end. */
+/* Flag that indicates the initial value of the is_stmt_start flag. */
#define DWARF2_LINE_DEFAULT_IS_STMT 1
/* Given a special op, return the line skip amount. */
@@ -108,8 +105,7 @@
struct line_entry {
struct line_entry *next;
- fragS *frag;
- addressT frag_ofs;
+ symbolS *label;
struct dwarf2_line_info loc;
};
@@ -150,8 +146,15 @@ static unsigned int dirs_allocated;
doing work when there's nothing to do. */
static bfd_boolean loc_directive_seen;
+/* TRUE when we're supposed to set the basic block mark whenever a
+ label is seen. */
+bfd_boolean dwarf2_loc_mark_labels;
+
/* Current location as indicated by the most recent .loc directive. */
-static struct dwarf2_line_info current;
+static struct dwarf2_line_info current = {
+ 1, 1, 0, 0,
+ DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_IS_STMT : 0
+};
/* The size of an address on the target. */
static unsigned int sizeof_address;
@@ -167,12 +170,11 @@ 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_set_addr (segT, fragS *, addressT);
+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 relax_inc_line_addr (int, segT, fragS *, addressT,
- fragS *, addressT);
+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);
@@ -207,21 +209,21 @@ get_line_subseg (segT seg, subsegT subseg)
static subsegT last_subseg;
static struct line_subseg *last_line_subseg;
- struct line_seg *s;
+ struct line_seg **ps, *s;
struct line_subseg **pss, *ss;
if (seg == last_seg && subseg == last_subseg)
return last_line_subseg;
- for (s = all_segs; s; s = s->next)
+ for (ps = &all_segs; (s = *ps) != NULL; ps = &s->next)
if (s->seg == seg)
goto found_seg;
s = (struct line_seg *) xmalloc (sizeof (*s));
- s->next = all_segs;
+ s->next = NULL;
s->seg = seg;
s->head = NULL;
- all_segs = s;
+ *ps = s;
found_seg:
for (pss = &s->head; (ss = *pss) != NULL ; pss = &ss->next)
@@ -247,16 +249,34 @@ get_line_subseg (segT seg, subsegT subseg)
return ss;
}
+/* Record an entry for LOC occurring at LABEL. */
+
+static void
+dwarf2_gen_line_info_1 (symbolS *label, struct dwarf2_line_info *loc)
+{
+ struct line_subseg *ss;
+ struct line_entry *e;
+
+ e = (struct line_entry *) xmalloc (sizeof (*e));
+ e->next = NULL;
+ e->label = label;
+ e->loc = *loc;
+
+ ss = get_line_subseg (now_seg, now_subseg);
+ *ss->ptail = e;
+ ss->ptail = &e->next;
+}
+
/* Record an entry for LOC occurring at OFS within the current fragment. */
void
dwarf2_gen_line_info (addressT ofs, struct dwarf2_line_info *loc)
{
- struct line_subseg *ss;
- struct line_entry *e;
static unsigned int line = -1;
static unsigned int filenum = -1;
+ symbolS *sym;
+
/* Early out for as-yet incomplete location information. */
if (loc->filenum == 0 || loc->line == 0)
return;
@@ -272,17 +292,15 @@ dwarf2_gen_line_info (addressT ofs, struct dwarf2_line_info *loc)
line = loc->line;
filenum = loc->filenum;
- e = (struct line_entry *) xmalloc (sizeof (*e));
- e->next = NULL;
- e->frag = frag_now;
- e->frag_ofs = ofs;
- e->loc = *loc;
-
- ss = get_line_subseg (now_seg, now_subseg);
- *ss->ptail = e;
- ss->ptail = &e->next;
+ sym = symbol_temp_new (now_seg, ofs, frag_now);
+ dwarf2_gen_line_info_1 (sym, loc);
}
+/* Returns the current source information. If .file directives have
+ been encountered, the info for the corresponding source file is
+ returned. Otherwise, the info for the assembly source file is
+ returned. */
+
void
dwarf2_where (struct dwarf2_line_info *line)
{
@@ -292,12 +310,22 @@ dwarf2_where (struct dwarf2_line_info *line)
as_where (&filename, &line->line);
line->filenum = get_filenum (filename, 0);
line->column = 0;
- line->flags = DWARF2_FLAG_BEGIN_STMT;
+ line->flags = DWARF2_FLAG_IS_STMT;
+ line->isa = current.isa;
}
else
*line = current;
}
+/* A hook to allow the target backend to inform the line number state
+ machine of isa changes when assembler debug info is enabled. */
+
+void
+dwarf2_set_isa (unsigned int isa)
+{
+ current.isa = isa;
+}
+
/* Called for each machine instruction, or relatively atomic group of
machine instructions (ie built-in macro). The instruction or group
is SIZE bytes in length. If dwarf2 line number generation is called
@@ -325,9 +353,45 @@ dwarf2_emit_insn (int size)
else if (debug_type != DEBUG_DWARF2)
return;
else
- dwarf2_where (& loc);
+ dwarf2_where (&loc);
dwarf2_gen_line_info (frag_now_fix () - size, &loc);
+
+ current.flags &= ~(DWARF2_FLAG_BASIC_BLOCK
+ | DWARF2_FLAG_PROLOGUE_END
+ | DWARF2_FLAG_EPILOGUE_BEGIN);
+}
+
+/* Called for each (preferably code) label. If dwarf2_loc_mark_labels
+ is enabled, emit a basic block marker. */
+
+void
+dwarf2_emit_label (symbolS *label)
+{
+ struct dwarf2_line_info loc;
+
+ if (!dwarf2_loc_mark_labels)
+ return;
+ if (S_GET_SEGMENT (label) != now_seg)
+ return;
+ if (!(bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE))
+ return;
+
+ if (debug_type == DEBUG_DWARF2)
+ dwarf2_where (&loc);
+ else
+ {
+ loc = current;
+ loc_directive_seen = FALSE;
+ }
+
+ loc.flags |= DWARF2_FLAG_BASIC_BLOCK;
+
+ current.flags &= ~(DWARF2_FLAG_BASIC_BLOCK
+ | DWARF2_FLAG_PROLOGUE_END
+ | DWARF2_FLAG_EPILOGUE_BEGIN);
+
+ dwarf2_gen_line_info_1 (label, &loc);
}
/* Get a .debug_line file number for FILENAME. If NUM is nonzero,
@@ -420,7 +484,8 @@ get_filenum (const char *filename, unsigned int num)
files[i].filename = num ? file : xstrdup (file);
files[i].dir = dir;
- files_in_use = i + 1;
+ if (files_in_use < i + 1)
+ files_in_use = i + 1;
last_used = i;
last_used_dir_len = dir_len;
@@ -450,6 +515,8 @@ dwarf2_directive_file (int dummy ATTRIBUTE_UNUSED)
num = get_absolute_expression ();
filename = demand_copy_C_string (&filename_len);
+ if (filename == NULL)
+ return NULL;
demand_empty_rest_of_line ();
if (num < 1)
@@ -472,14 +539,11 @@ dwarf2_directive_file (int dummy ATTRIBUTE_UNUSED)
void
dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED)
{
- offsetT filenum, line, column;
+ offsetT filenum, line;
filenum = get_absolute_expression ();
SKIP_WHITESPACE ();
line = get_absolute_expression ();
- SKIP_WHITESPACE ();
- column = get_absolute_expression ();
- demand_empty_rest_of_line ();
if (filenum < 1)
{
@@ -494,10 +558,6 @@ dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED)
current.filenum = filenum;
current.line = line;
- current.column = column;
- current.flags = DWARF2_FLAG_BEGIN_STMT;
-
- loc_directive_seen = TRUE;
#ifndef NO_LISTING
if (listing)
@@ -519,6 +579,92 @@ dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED)
listing_source_line (line);
}
#endif
+
+ SKIP_WHITESPACE ();
+ if (ISDIGIT (*input_line_pointer))
+ {
+ current.column = get_absolute_expression ();
+ SKIP_WHITESPACE ();
+ }
+
+ while (ISALPHA (*input_line_pointer))
+ {
+ char *p, c;
+ offsetT value;
+
+ p = input_line_pointer;
+ c = get_symbol_end ();
+
+ if (strcmp (p, "basic_block") == 0)
+ {
+ current.flags |= DWARF2_FLAG_BASIC_BLOCK;
+ *input_line_pointer = c;
+ }
+ else if (strcmp (p, "prologue_end") == 0)
+ {
+ current.flags |= DWARF2_FLAG_PROLOGUE_END;
+ *input_line_pointer = c;
+ }
+ else if (strcmp (p, "epilogue_begin") == 0)
+ {
+ current.flags |= DWARF2_FLAG_EPILOGUE_BEGIN;
+ *input_line_pointer = c;
+ }
+ else if (strcmp (p, "is_stmt") == 0)
+ {
+ *input_line_pointer = c;
+ value = get_absolute_expression ();
+ if (value == 0)
+ current.flags &= ~DWARF2_FLAG_IS_STMT;
+ else if (value == 1)
+ current.flags |= DWARF2_FLAG_IS_STMT;
+ else
+ {
+ as_bad (_("is_stmt value not 0 or 1"));
+ return;
+ }
+ }
+ else if (strcmp (p, "isa") == 0)
+ {
+ *input_line_pointer = c;
+ value = get_absolute_expression ();
+ if (value >= 0)
+ current.isa = value;
+ else
+ {
+ as_bad (_("isa number less than zero"));
+ return;
+ }
+ }
+ else
+ {
+ as_bad (_("unknown .loc sub-directive `%s'"), p);
+ *input_line_pointer = c;
+ return;
+ }
+
+ SKIP_WHITESPACE ();
+ }
+
+ demand_empty_rest_of_line ();
+ loc_directive_seen = TRUE;
+}
+
+void
+dwarf2_directive_loc_mark_labels (int dummy ATTRIBUTE_UNUSED)
+{
+ offsetT value = get_absolute_expression ();
+
+ if (value != 0 && value != 1)
+ {
+ as_bad (_("expected 0 or 1"));
+ ignore_rest_of_line ();
+ }
+ else
+ {
+ dwarf2_loc_mark_labels = value != 0;
+ demand_empty_rest_of_line ();
+ }
}
static struct frag *
@@ -619,12 +765,9 @@ get_frag_fix (fragS *frag)
/* Set an absolute address (may result in a relocation entry). */
static void
-out_set_addr (segT seg, fragS *frag, addressT ofs)
+out_set_addr (symbolS *sym)
{
expressionS expr;
- symbolS *sym;
-
- sym = symbol_temp_new (seg, ofs, frag);
out_opcode (DW_LNS_extended_op);
out_uleb128 (sizeof_address + 1);
@@ -728,6 +871,10 @@ emit_inc_line_addr (int line_delta, addressT addr_delta, char *p, int len)
int need_copy = 0;
char *end = p + len;
+ /* Line number sequences cannot go backward in addresses. This means
+ we've incorrectly ordered the statements in the sequence. */
+ assert ((offsetT) addr_delta >= 0);
+
/* Scale the address delta by the minimum instruction length. */
scale_addr_delta (&addr_delta);
@@ -760,19 +907,19 @@ emit_inc_line_addr (int line_delta, addressT addr_delta, char *p, int len)
*p++ = DW_LNS_advance_line;
p += output_leb128 (p, line_delta, 1);
- /* Prettier, I think, to use DW_LNS_copy instead of a
- "line +0, addr +0" special opcode. */
- if (addr_delta == 0)
- {
- *p++ = DW_LNS_copy;
- goto done;
- }
-
line_delta = 0;
tmp = 0 - DWARF2_LINE_BASE;
need_copy = 1;
}
+ /* Prettier, I think, to use DW_LNS_copy instead of a "line +0, addr +0"
+ special opcode. */
+ if (line_delta == 0 && addr_delta == 0)
+ {
+ *p++ = DW_LNS_copy;
+ goto done;
+ }
+
/* Bias the opcode by the special opcode base. */
tmp += DWARF2_LINE_OPCODE_BASE;
@@ -823,17 +970,11 @@ out_inc_line_addr (int line_delta, addressT addr_delta)
increments between fragments of the target segment. */
static void
-relax_inc_line_addr (int line_delta, segT seg,
- fragS *to_frag, addressT to_ofs,
- fragS *from_frag, addressT from_ofs)
+relax_inc_line_addr (int line_delta, symbolS *to_sym, symbolS *from_sym)
{
- symbolS *to_sym, *from_sym;
expressionS expr;
int max_chars;
- to_sym = symbol_temp_new (seg, to_ofs, to_frag);
- from_sym = symbol_temp_new (seg, from_ofs, from_frag);
-
expr.X_op = O_subtract;
expr.X_add_symbol = to_sym;
expr.X_op_symbol = from_sym;
@@ -914,23 +1055,22 @@ process_entries (segT seg, struct line_entry *e)
unsigned filenum = 1;
unsigned line = 1;
unsigned column = 0;
- unsigned flags = DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_BEGIN_STMT : 0;
- fragS *frag = NULL;
- fragS *last_frag;
- addressT frag_ofs = 0;
- addressT last_frag_ofs;
+ unsigned isa = 0;
+ unsigned flags = DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_IS_STMT : 0;
+ fragS *last_frag = NULL, *frag;
+ addressT last_frag_ofs = 0, frag_ofs;
+ symbolS *last_lab = NULL, *lab;
struct line_entry *next;
- while (e)
+ do
{
- int changed = 0;
+ int line_delta;
if (filenum != e->loc.filenum)
{
filenum = e->loc.filenum;
out_opcode (DW_LNS_set_file);
out_uleb128 (filenum);
- changed = 1;
}
if (column != e->loc.column)
@@ -938,64 +1078,70 @@ process_entries (segT seg, struct line_entry *e)
column = e->loc.column;
out_opcode (DW_LNS_set_column);
out_uleb128 (column);
- changed = 1;
}
- if ((e->loc.flags ^ flags) & DWARF2_FLAG_BEGIN_STMT)
+ if (isa != e->loc.isa)
{
- flags = e->loc.flags;
- out_opcode (DW_LNS_negate_stmt);
- changed = 1;
+ isa = e->loc.isa;
+ out_opcode (DW_LNS_set_isa);
+ out_uleb128 (isa);
}
- if (e->loc.flags & DWARF2_FLAG_BEGIN_BLOCK)
+ if ((e->loc.flags ^ flags) & DWARF2_FLAG_IS_STMT)
{
- out_opcode (DW_LNS_set_basic_block);
- changed = 1;
+ flags = e->loc.flags;
+ out_opcode (DW_LNS_negate_stmt);
}
+ if (e->loc.flags & DWARF2_FLAG_BASIC_BLOCK)
+ out_opcode (DW_LNS_set_basic_block);
+
+ if (e->loc.flags & DWARF2_FLAG_PROLOGUE_END)
+ out_opcode (DW_LNS_set_prologue_end);
+
+ if (e->loc.flags & DWARF2_FLAG_EPILOGUE_BEGIN)
+ out_opcode (DW_LNS_set_epilogue_begin);
+
/* Don't try to optimize away redundant entries; gdb wants two
entries for a function where the code starts on the same line as
the {, and there's no way to identify that case here. Trust gcc
to optimize appropriately. */
- if (1 /* line != e->loc.line || changed */)
- {
- int line_delta = e->loc.line - line;
- if (frag == NULL)
- {
- out_set_addr (seg, e->frag, e->frag_ofs);
- out_inc_line_addr (line_delta, 0);
- }
- else if (frag == e->frag)
- out_inc_line_addr (line_delta, e->frag_ofs - frag_ofs);
- else
- relax_inc_line_addr (line_delta, seg, e->frag, e->frag_ofs,
- frag, frag_ofs);
+ line_delta = e->loc.line - line;
+ lab = e->label;
+ frag = symbol_get_frag (lab);
+ frag_ofs = S_GET_VALUE (lab);
- frag = e->frag;
- frag_ofs = e->frag_ofs;
- line = e->loc.line;
- }
- else if (frag == NULL)
+ if (last_frag == NULL)
{
- out_set_addr (seg, e->frag, e->frag_ofs);
- frag = e->frag;
- frag_ofs = e->frag_ofs;
+ out_set_addr (lab);
+ out_inc_line_addr (line_delta, 0);
}
+ else if (frag == last_frag)
+ out_inc_line_addr (line_delta, frag_ofs - last_frag_ofs);
+ else
+ relax_inc_line_addr (line_delta, lab, last_lab);
+
+ line = e->loc.line;
+ last_lab = lab;
+ last_frag = frag;
+ last_frag_ofs = frag_ofs;
next = e->next;
free (e);
e = next;
}
+ while (e);
/* Emit a DW_LNE_end_sequence for the end of the section. */
- last_frag = last_frag_for_seg (seg);
- last_frag_ofs = get_frag_fix (last_frag);
+ frag = last_frag_for_seg (seg);
+ frag_ofs = get_frag_fix (frag);
if (frag == last_frag)
- out_inc_line_addr (INT_MAX, last_frag_ofs - frag_ofs);
+ out_inc_line_addr (INT_MAX, frag_ofs - last_frag_ofs);
else
- relax_inc_line_addr (INT_MAX, seg, last_frag, last_frag_ofs,
- frag, frag_ofs);
+ {
+ lab = symbol_temp_new (seg, frag_ofs, frag);
+ relax_inc_line_addr (INT_MAX, lab, last_lab);
+ }
}
/* Emit the directory and file tables for .debug_line. */
@@ -1116,6 +1262,9 @@ out_debug_line (segT line_seg)
out_byte (0); /* DW_LNS_set_basic_block */
out_byte (0); /* DW_LNS_const_add_pc */
out_byte (1); /* DW_LNS_fixed_advance_pc */
+ out_byte (0); /* DW_LNS_set_prologue_end */
+ out_byte (0); /* DW_LNS_set_epilogue_begin */
+ out_byte (1); /* DW_LNS_set_isa */
out_file_list ();
@@ -1349,21 +1498,28 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg)
symbol_set_value_now (info_end);
}
+/* Finish the dwarf2 debug sections. We emit .debug.line if there
+ were any .file/.loc directives, or --gdwarf2 was given, or if the
+ file has a non-empty .debug_info section. If we emit .debug_line,
+ and the .debug_info section is empty, we also emit .debug_info,
+ .debug_aranges and .debug_abbrev. ALL_SEGS will be non-null if
+ there were any .file/.loc directives, or --gdwarf2 was given and
+ there were any located instructions emitted. */
+
void
dwarf2_finish (void)
{
segT line_seg;
struct line_seg *s;
+ segT info_seg;
+ int emit_other_sections = 0;
- /* We don't need to do anything unless:
- - Some debug information was recorded via .file/.loc
- - or, we are generating DWARF2 information ourself (--gdwarf2)
- - or, there is a user-provided .debug_info section which could
- reference the file table in the .debug_line section we generate
- below. */
- if (all_segs == NULL
- && debug_type != DEBUG_DWARF2
- && bfd_get_section_by_name (stdoutput, ".debug_info") == NULL)
+ info_seg = bfd_get_section_by_name (stdoutput, ".debug_info");
+ emit_other_sections = info_seg == NULL || !seg_not_empty_p (info_seg);
+
+ if (!all_segs && emit_other_sections)
+ /* There is no line information and no non-empty .debug_info
+ section. */
return;
/* Calculate the size of an address for the target machine. */
@@ -1371,7 +1527,7 @@ dwarf2_finish (void)
/* Create and switch to the line number section. */
line_seg = subseg_new (".debug_line", 0);
- bfd_set_section_flags (stdoutput, line_seg, SEC_READONLY);
+ bfd_set_section_flags (stdoutput, line_seg, SEC_READONLY | SEC_DEBUGGING);
/* For each subsection, chain the debug entries together. */
for (s = all_segs; s; s = s->next)
@@ -1388,21 +1544,26 @@ dwarf2_finish (void)
out_debug_line (line_seg);
- /* If this is assembler generated line info, we need .debug_info
- and .debug_abbrev sections as well. */
- if (all_segs != NULL && debug_type == DEBUG_DWARF2)
+ /* If this is assembler generated line info, and there is no
+ debug_info already, we need .debug_info and .debug_abbrev
+ sections as well. */
+ if (emit_other_sections)
{
segT abbrev_seg;
- segT info_seg;
segT aranges_seg;
+ assert (all_segs);
+
info_seg = subseg_new (".debug_info", 0);
abbrev_seg = subseg_new (".debug_abbrev", 0);
aranges_seg = subseg_new (".debug_aranges", 0);
- bfd_set_section_flags (stdoutput, info_seg, SEC_READONLY);
- bfd_set_section_flags (stdoutput, abbrev_seg, SEC_READONLY);
- bfd_set_section_flags (stdoutput, aranges_seg, SEC_READONLY);
+ bfd_set_section_flags (stdoutput, info_seg,
+ SEC_READONLY | SEC_DEBUGGING);
+ bfd_set_section_flags (stdoutput, abbrev_seg,
+ SEC_READONLY | SEC_DEBUGGING);
+ bfd_set_section_flags (stdoutput, aranges_seg,
+ SEC_READONLY | SEC_DEBUGGING);
record_alignment (aranges_seg, ffs (2 * sizeof_address) - 1);
@@ -1411,54 +1572,3 @@ dwarf2_finish (void)
out_debug_info (info_seg, abbrev_seg, line_seg);
}
}
-
-#else
-void
-dwarf2_finish ()
-{
-}
-
-int
-dwarf2dbg_estimate_size_before_relax (frag)
- fragS *frag ATTRIBUTE_UNUSED;
-{
- as_fatal (_("dwarf2 is not supported for this object file format"));
- return 0;
-}
-
-int
-dwarf2dbg_relax_frag (frag)
- fragS *frag ATTRIBUTE_UNUSED;
-{
- as_fatal (_("dwarf2 is not supported for this object file format"));
- return 0;
-}
-
-void
-dwarf2dbg_convert_frag (frag)
- fragS *frag ATTRIBUTE_UNUSED;
-{
- as_fatal (_("dwarf2 is not supported for this object file format"));
-}
-
-void
-dwarf2_emit_insn (size)
- int size ATTRIBUTE_UNUSED;
-{
-}
-
-char *
-dwarf2_directive_file (dummy)
- int dummy ATTRIBUTE_UNUSED;
-{
- s_app_file (0);
- return NULL;
-}
-
-void
-dwarf2_directive_loc (dummy)
- int dummy ATTRIBUTE_UNUSED;
-{
- as_fatal (_("dwarf2 is not supported for this object file format"));
-}
-#endif /* BFD_ASSEMBLER */
diff --git a/contrib/binutils/gas/dwarf2dbg.h b/contrib/binutils/gas/dwarf2dbg.h
index fe8bf277eaa5..cd1d17b2031f 100644
--- a/contrib/binutils/gas/dwarf2dbg.h
+++ b/contrib/binutils/gas/dwarf2dbg.h
@@ -1,5 +1,5 @@
/* dwarf2dbg.h - DWARF2 debug support
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,21 +15,24 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef AS_DWARF2DBG_H
#define AS_DWARF2DBG_H
#include "as.h"
-#define DWARF2_FLAG_BEGIN_STMT (1 << 0) /* beginning of statement */
-#define DWARF2_FLAG_BEGIN_BLOCK (1 << 1) /* beginning of basic block */
+#define DWARF2_FLAG_IS_STMT (1 << 0)
+#define DWARF2_FLAG_BASIC_BLOCK (1 << 1)
+#define DWARF2_FLAG_PROLOGUE_END (1 << 2)
+#define DWARF2_FLAG_EPILOGUE_BEGIN (1 << 3)
struct dwarf2_line_info {
unsigned int filenum;
unsigned int line;
unsigned int column;
+ unsigned int isa;
unsigned int flags;
};
@@ -46,12 +49,19 @@ extern char *dwarf2_directive_file (int dummy);
used. */
extern void dwarf2_directive_loc (int dummy);
+/* Implements the .loc_mark_labels {0,1} directive. */
+extern void dwarf2_directive_loc_mark_labels (int dummy);
+
/* Returns the current source information. If .file directives have
been encountered, the info for the corresponding source file is
returned. Otherwise, the info for the assembly source file is
returned. */
extern void dwarf2_where (struct dwarf2_line_info *l);
+/* A hook to allow the target backend to inform the line number state
+ machine of isa changes when assembler debug info is enabled. */
+extern void dwarf2_set_isa (unsigned int isa);
+
/* This function generates .debug_line info based on the address and
source information passed in the arguments. ADDR should be the
frag-relative offset of the instruction the information is for and
@@ -62,6 +72,14 @@ extern void dwarf2_gen_line_info (addressT addr, struct dwarf2_line_info *l);
/* Must be called for each generated instruction. */
extern void dwarf2_emit_insn (int);
+/* Should be called for each code label. */
+extern void dwarf2_emit_label (symbolS *);
+
+/* True when we're supposed to set the basic block mark whenever a label
+ is seen. Unless the target is doing Something Weird, just call
+ dwarf2_emit_label. */
+bfd_boolean dwarf2_loc_mark_labels;
+
extern void dwarf2_finish (void);
extern int dwarf2dbg_estimate_size_before_relax (fragS *);
diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c
index 1de823e24dfa..45116e86db0d 100644
--- a/contrib/binutils/gas/ecoff.c
+++ b/contrib/binutils/gas/ecoff.c
@@ -1,5 +1,6 @@
/* ECOFF debugging support.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
@@ -20,8 +21,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "as.h"
@@ -2312,7 +2313,7 @@ add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
compiler output, only in hand coded assembler. */
void
-ecoff_new_file (const char *name)
+ecoff_new_file (const char *name, int appfile ATTRIBUTE_UNUSED)
{
if (cur_file_ptr != NULL && strcmp (cur_file_ptr->name, name) == 0)
return;
@@ -3185,14 +3186,10 @@ ecoff_directive_frame (int ignore ATTRIBUTE_UNUSED)
cur_proc_ptr->pdr.pcreg = tc_get_register (0);
-#if 0
/* Alpha-OSF1 adds "the offset of saved $a0 from $sp", according to
Sandro. I don't yet know where this value should be stored, if
- anywhere. */
- demand_empty_rest_of_line ();
-#else
+ anywhere. Don't call demand_empty_rest_of_line (). */
s_ignore (42);
-#endif
}
/* Parse .mask directives. */
@@ -3685,6 +3682,8 @@ ecoff_build_lineno (const struct ecoff_debug_swap *backend,
iline = 0;
totcount = 0;
+ /* FIXME? Now that MIPS embedded-PIC is gone, it may be safe to
+ remove this code. */
/* For some reason the address of the first procedure is ignored
when reading line numbers. This doesn't matter if the address of
the first procedure is 0, but when gcc is generating MIPS
diff --git a/contrib/binutils/gas/ecoff.h b/contrib/binutils/gas/ecoff.h
index 2f09afca857e..3fa1293c6da4 100644
--- a/contrib/binutils/gas/ecoff.h
+++ b/contrib/binutils/gas/ecoff.h
@@ -1,5 +1,5 @@
/* ecoff.h -- header file for ECOFF debugging support
- Copyright 1993, 1994, 1995, 1996, 1997, 1998
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Put together by Ian Lance Taylor <ian@cygnus.com>.
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef GAS_ECOFF_H
#define GAS_ECOFF_H
@@ -38,7 +38,7 @@ extern void ecoff_read_begin_hook (void);
/* This function should be called when the assembler switches to a new
file. */
-extern void ecoff_new_file (const char *);
+extern void ecoff_new_file (const char *, int);
/* This function should be called when a new symbol is created, by
obj_symbol_new_hook. */
diff --git a/contrib/binutils/gas/ehopt.c b/contrib/binutils/gas/ehopt.c
index 451aaff18c94..6b0ac5132370 100644
--- a/contrib/binutils/gas/ehopt.c
+++ b/contrib/binutils/gas/ehopt.c
@@ -1,5 +1,5 @@
/* ehopt.c--optimize gcc exception frame information.
- Copyright 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "as.h"
#include "subsegs.h"
@@ -111,16 +111,8 @@ get_cie_info (struct cie_info *info)
/* We should find the CIE at the start of the section. */
-#if defined (BFD_ASSEMBLER) || defined (MANY_SEGMENTS)
f = seg_info (now_seg)->frchainP->frch_root;
-#else
- f = frchain_now->frch_root;
-#endif
-#ifdef BFD_ASSEMBLER
fix = seg_info (now_seg)->frchainP->fix_root;
-#else
- fix = *seg_fix_rootP;
-#endif
/* Look through the frags of the section to find the code alignment. */
diff --git a/contrib/binutils/gas/emul-target.h b/contrib/binutils/gas/emul-target.h
index 4c1a02a500f0..506fc61f6e24 100644
--- a/contrib/binutils/gas/emul-target.h
+++ b/contrib/binutils/gas/emul-target.h
@@ -1,5 +1,5 @@
/* emul-target.h. Default values for struct emulation defined in emul.h
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 1995 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef emul_init
#define emul_init common_emul_init
diff --git a/contrib/binutils/gas/emul.h b/contrib/binutils/gas/emul.h
index e4afa68339f0..6e89ae9efa6d 100644
--- a/contrib/binutils/gas/emul.h
+++ b/contrib/binutils/gas/emul.h
@@ -1,5 +1,5 @@
/* emul.h. File format emulation routines
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 1995, 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef EMUL_DEFS
#define EMUL_DEFS
diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c
index d520a04bcd30..69f0aaccdb64 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
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This is really a branch office of as-read.c. I split it out to clearly
distinguish the world of expressions from the world of statements.
@@ -41,7 +41,7 @@ static void integer_constant (int radix, expressionS * expressionP);
static void mri_char_constant (expressionS *);
static void current_location (expressionS *);
static void clean_up_expression (expressionS * expressionP);
-static segT operand (expressionS *);
+static segT operand (expressionS *, enum expr_mode);
static operatorT operator (int *);
extern const char EXP_CHARS[], FLT_CHARS[];
@@ -157,33 +157,6 @@ expr_build_uconstant (offsetT value)
return make_expr_symbol (&e);
}
-/* Build an expression for OP s1. */
-
-symbolS *
-expr_build_unary (operatorT op, symbolS *s1)
-{
- expressionS e;
-
- e.X_op = op;
- e.X_add_symbol = s1;
- e.X_add_number = 0;
- return make_expr_symbol (&e);
-}
-
-/* Build an expression for s1 OP s2. */
-
-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);
-}
-
/* Build an expression for the current location ('.'). */
symbolS *
@@ -213,8 +186,6 @@ FLONUM_TYPE generic_floating_point_number = {
0 /* sign. */
};
-/* If nonzero, we've been asked to assemble nan, +inf or -inf. */
-int generic_floating_point_magic;
static void
floating_constant (expressionS *expressionP)
@@ -330,7 +301,10 @@ integer_constant (int radix, expressionS *expressionP)
{
c = *--suffix;
c = TOUPPER (c);
- if (c == 'B')
+ /* If we have both NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB,
+ we distinguish between 'B' and 'b'. This is the case for
+ Z80. */
+ if ((NUMBERS_WITH_SUFFIX && LOCAL_LABELS_FB ? *suffix : c) == 'B')
radix = 2;
else if (c == 'D')
radix = 10;
@@ -609,10 +583,6 @@ integer_constant (int radix, expressionS *expressionP)
else
{
expressionP->X_op = O_constant;
-#ifdef TARGET_WORD_SIZE
- /* Sign extend NUMBER. */
- number |= (-(number >> (TARGET_WORD_SIZE - 1))) << (TARGET_WORD_SIZE - 1);
-#endif
expressionP->X_add_number = number;
input_line_pointer--; /* Restore following character. */
} /* Really just a number. */
@@ -741,7 +711,7 @@ current_location (expressionS *expressionp)
Input_line_pointer->(next non-blank) char after operand. */
static segT
-operand (expressionS *expressionP)
+operand (expressionS *expressionP, enum expr_mode mode)
{
char c;
symbolS *symbolP; /* Points to symbol. */
@@ -977,16 +947,14 @@ operand (expressionS *expressionP)
case '[':
#endif
/* Didn't begin with digit & not a name. */
- segment = expression (expressionP);
+ if (mode != expr_defer)
+ segment = expression (expressionP);
+ else
+ segment = deferred_expression (expressionP);
/* expression () will pass trailing whitespace. */
if ((c == '(' && *input_line_pointer != ')')
|| (c == '[' && *input_line_pointer != ']'))
- {
-#ifdef RELAX_PAREN_GROUPING
- if (c != '(')
-#endif
- as_bad (_("missing '%c'"), c == '(' ? ')' : ']');
- }
+ as_bad (_("missing '%c'"), c == '(' ? ')' : ']');
else
input_line_pointer++;
SKIP_WHITESPACE ();
@@ -1020,14 +988,6 @@ operand (expressionS *expressionP)
mri_char_constant (expressionP);
break;
- case '+':
- /* Do not accept ++e as +(+e).
- Disabled, since the preprocessor removes whitespace. */
- if (0 && *input_line_pointer == '+')
- goto target_op;
- (void) operand (expressionP);
- break;
-
#ifdef TC_M68K
case '"':
/* Double quote is the bitwise not operator in MRI mode. */
@@ -1041,13 +1001,14 @@ operand (expressionS *expressionP)
goto isname;
case '!':
case '-':
+ case '+':
{
- /* Do not accept --e as -(-e)
+ /* Do not accept ++e or --e as +(+e) or -(-e)
Disabled, since the preprocessor removes whitespace. */
- if (0 && c == '-' && *input_line_pointer == '-')
+ if (0 && (c == '-' || c == '+') && *input_line_pointer == c)
goto target_op;
- operand (expressionP);
+ operand (expressionP, mode);
if (expressionP->X_op == O_constant)
{
/* input_line_pointer -> char after operand. */
@@ -1061,7 +1022,7 @@ operand (expressionS *expressionP)
}
else if (c == '~' || c == '"')
expressionP->X_add_number = ~ expressionP->X_add_number;
- else
+ else if (c == '!')
expressionP->X_add_number = ! expressionP->X_add_number;
}
else if (expressionP->X_op == O_big
@@ -1076,17 +1037,49 @@ operand (expressionS *expressionP)
else
generic_floating_point_number.sign = 'N';
}
+ else if (expressionP->X_op == O_big
+ && expressionP->X_add_number > 0)
+ {
+ int i;
+
+ if (c == '~' || c == '-')
+ {
+ for (i = 0; i < expressionP->X_add_number; ++i)
+ generic_bignum[i] = ~generic_bignum[i];
+ if (c == '-')
+ for (i = 0; i < expressionP->X_add_number; ++i)
+ {
+ generic_bignum[i] += 1;
+ if (generic_bignum[i])
+ break;
+ }
+ }
+ else if (c == '!')
+ {
+ int nonzero = 0;
+ for (i = 0; i < expressionP->X_add_number; ++i)
+ {
+ if (generic_bignum[i])
+ nonzero = 1;
+ generic_bignum[i] = 0;
+ }
+ generic_bignum[0] = nonzero;
+ }
+ }
else if (expressionP->X_op != O_illegal
&& expressionP->X_op != O_absent)
{
- expressionP->X_add_symbol = make_expr_symbol (expressionP);
- if (c == '-')
- expressionP->X_op = O_uminus;
- else if (c == '~' || c == '"')
- expressionP->X_op = O_bit_not;
- else
- expressionP->X_op = O_logical_not;
- expressionP->X_add_number = 0;
+ if (c != '+')
+ {
+ expressionP->X_add_symbol = make_expr_symbol (expressionP);
+ if (c == '-')
+ expressionP->X_op = O_uminus;
+ else if (c == '~' || c == '"')
+ expressionP->X_op = O_bit_not;
+ else
+ expressionP->X_op = O_logical_not;
+ expressionP->X_add_number = 0;
+ }
}
else
as_warn (_("Unary operator %c ignored because bad operand follows"),
@@ -1102,10 +1095,10 @@ operand (expressionS *expressionP)
if (! flag_m68k_mri)
goto de_fault;
#endif
- if (flag_m68k_mri && hex_p (*input_line_pointer))
+ if (DOLLAR_AMBIGU && hex_p (*input_line_pointer))
{
- /* In MRI mode, '$' is also used as the prefix for a
- hexadecimal constant. */
+ /* In MRI mode and on Z80, '$' is also used as the prefix
+ for a hexadecimal constant. */
integer_constant (16, expressionP);
break;
}
@@ -1227,7 +1220,7 @@ operand (expressionS *expressionP)
specially in certain contexts. If a name always has a
specific value, it can often be handled by simply
entering it in the symbol table. */
- if (md_parse_name (name, expressionP, &c))
+ if (md_parse_name (name, expressionP, mode, &c))
{
*input_line_pointer = c;
break;
@@ -1278,12 +1271,12 @@ operand (expressionS *expressionP)
/* If we have an absolute symbol or a reg, then we know its
value now. */
segment = S_GET_SEGMENT (symbolP);
- if (segment == absolute_section)
+ if (mode != expr_defer && segment == absolute_section)
{
expressionP->X_op = O_constant;
expressionP->X_add_number = S_GET_VALUE (symbolP);
}
- else if (segment == reg_section)
+ else if (mode != expr_defer && segment == reg_section)
{
expressionP->X_op = O_register;
expressionP->X_add_number = S_GET_VALUE (symbolP);
@@ -1327,6 +1320,9 @@ operand (expressionS *expressionP)
if (expressionP->X_add_symbol)
symbol_mark_used (expressionP->X_add_symbol);
+ expressionP->X_add_symbol = symbol_clone_if_forward_ref (expressionP->X_add_symbol);
+ expressionP->X_op_symbol = symbol_clone_if_forward_ref (expressionP->X_op_symbol);
+
switch (expressionP->X_op)
{
default:
@@ -1394,6 +1390,9 @@ clean_up_expression (expressionS *expressionP)
#undef __
#define __ O_illegal
+#ifndef O_SINGLE_EQ
+#define O_SINGLE_EQ O_illegal
+#endif
/* Maps ASCII -> operators. */
static const operatorT op_encoding[256] = {
@@ -1403,7 +1402,7 @@ static const operatorT op_encoding[256] = {
__, O_bit_or_not, __, __, __, O_modulus, O_bit_and, __,
__, __, O_multiply, O_add, __, O_subtract, __, O_divide,
__, __, __, __, __, __, __, __,
- __, __, __, __, O_lt, __, O_gt, __,
+ __, __, __, __, O_lt, O_SINGLE_EQ, O_gt, __,
__, __, __, __, __, __, __, __,
__, __, __, __, __, __, __, __,
__, __, __, __, __, __, __, __,
@@ -1600,15 +1599,21 @@ operator (int *num_chars)
return ret;
case '!':
- /* We accept !! as equivalent to ^ for MRI compatibility. */
- if (input_line_pointer[1] != '!')
+ switch (input_line_pointer[1])
{
+ case '!':
+ /* We accept !! as equivalent to ^ for MRI compatibility. */
+ *num_chars = 2;
+ return O_bit_exclusive_or;
+ case '=':
+ /* We accept != as equivalent to <>. */
+ *num_chars = 2;
+ return O_ne;
+ default:
if (flag_m68k_mri)
return O_bit_inclusive_or;
return op_encoding[c];
}
- *num_chars = 2;
- return O_bit_exclusive_or;
case '|':
if (input_line_pointer[1] != '|')
@@ -1632,7 +1637,8 @@ operator (int *num_chars)
segT
expr (int rankarg, /* Larger # is higher rank. */
- expressionS *resultP /* Deliver result here. */)
+ expressionS *resultP, /* Deliver result here. */
+ enum expr_mode mode /* Controls behavior. */)
{
operator_rankT rank = (operator_rankT) rankarg;
segT retval;
@@ -1647,7 +1653,7 @@ expr (int rankarg, /* Larger # is higher rank. */
if (rank == 0)
dot_value = frag_now_fix ();
- retval = operand (resultP);
+ retval = operand (resultP, mode);
/* operand () gobbles spaces. */
know (*input_line_pointer != ' ');
@@ -1656,10 +1662,11 @@ expr (int rankarg, /* Larger # is higher rank. */
while (op_left != O_illegal && op_rank[(int) op_left] > rank)
{
segT rightseg;
+ bfd_vma frag_off;
input_line_pointer += op_chars; /* -> after operator. */
- rightseg = expr (op_rank[(int) op_left], &right);
+ rightseg = expr (op_rank[(int) op_left], &right, mode);
if (right.X_op == O_absent)
{
as_warn (_("missing operand; zero assumed"));
@@ -1687,7 +1694,7 @@ expr (int rankarg, /* Larger # is higher rank. */
know (op_right == O_illegal
|| op_rank[(int) op_right] <= op_rank[(int) op_left]);
know ((int) op_left >= (int) O_multiply
- && (int) op_left <= (int) O_logical_or);
+ && (int) op_left <= (int) O_index);
/* input_line_pointer->after right-hand quantity. */
/* left-hand quantity in resultP. */
@@ -1735,12 +1742,15 @@ expr (int rankarg, /* Larger # is higher rank. */
else if (op_left == O_subtract
&& right.X_op == O_symbol
&& resultP->X_op == O_symbol
- && (symbol_get_frag (right.X_add_symbol)
- == symbol_get_frag (resultP->X_add_symbol))
+ && retval == rightseg
&& (SEG_NORMAL (rightseg)
- || right.X_add_symbol == resultP->X_add_symbol))
+ || right.X_add_symbol == resultP->X_add_symbol)
+ && frag_offset_fixed_p (symbol_get_frag (resultP->X_add_symbol),
+ symbol_get_frag (right.X_add_symbol),
+ &frag_off))
{
resultP->X_add_number -= right.X_add_number;
+ resultP->X_add_number -= frag_off / OCTETS_PER_BYTE;
resultP->X_add_number += (S_GET_VALUE (resultP->X_add_symbol)
- S_GET_VALUE (right.X_add_symbol));
resultP->X_op = O_constant;
@@ -1874,8 +1884,269 @@ expr (int rankarg, /* Larger # is higher rank. */
if (resultP->X_add_symbol)
symbol_mark_used (resultP->X_add_symbol);
+ if (rank == 0 && mode == expr_evaluate)
+ resolve_expression (resultP);
+
return resultP->X_op == O_constant ? absolute_section : retval;
}
+
+/* Resolve an expression without changing any symbols/sub-expressions
+ used. */
+
+int
+resolve_expression (expressionS *expressionP)
+{
+ /* Help out with CSE. */
+ valueT final_val = expressionP->X_add_number;
+ symbolS *add_symbol = expressionP->X_add_symbol;
+ symbolS *op_symbol = expressionP->X_op_symbol;
+ operatorT op = expressionP->X_op;
+ valueT left, right;
+ segT seg_left, seg_right;
+ fragS *frag_left, *frag_right;
+ bfd_vma frag_off;
+
+ switch (op)
+ {
+ default:
+ return 0;
+
+ case O_constant:
+ case O_register:
+ left = 0;
+ break;
+
+ case O_symbol:
+ case O_symbol_rva:
+ if (!snapshot_symbol (&add_symbol, &left, &seg_left, &frag_left))
+ return 0;
+
+ break;
+
+ case O_uminus:
+ case O_bit_not:
+ case O_logical_not:
+ if (!snapshot_symbol (&add_symbol, &left, &seg_left, &frag_left))
+ return 0;
+
+ if (seg_left != absolute_section)
+ return 0;
+
+ if (op == O_logical_not)
+ left = !left;
+ else if (op == O_uminus)
+ left = -left;
+ else
+ left = ~left;
+ op = O_constant;
+ 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 (!snapshot_symbol (&add_symbol, &left, &seg_left, &frag_left)
+ || !snapshot_symbol (&op_symbol, &right, &seg_right, &frag_right))
+ return 0;
+
+ /* Simplify addition or subtraction of a constant by folding the
+ constant into X_add_number. */
+ if (op == O_add)
+ {
+ if (seg_right == absolute_section)
+ {
+ final_val += right;
+ op = O_symbol;
+ break;
+ }
+ else if (seg_left == absolute_section)
+ {
+ final_val += left;
+ left = right;
+ seg_left = seg_right;
+ add_symbol = op_symbol;
+ op = O_symbol;
+ break;
+ }
+ }
+ else if (op == O_subtract)
+ {
+ if (seg_right == absolute_section)
+ {
+ final_val -= right;
+ op = O_symbol;
+ break;
+ }
+ }
+
+ /* Equality and non-equality tests are permitted on anything.
+ Subtraction, and other comparison operators are permitted if
+ both operands are in the same section.
+ Shifts by constant zero are permitted on anything.
+ Multiplies, bit-ors, and bit-ands with constant zero are
+ permitted on anything.
+ Multiplies and divides by constant one are permitted on
+ anything.
+ Binary operations with both operands being the same register
+ or undefined symbol are permitted if the result doesn't depend
+ on the input value.
+ Otherwise, both operands must be absolute. We already handled
+ the case of addition or subtraction of a constant above. */
+ frag_off = 0;
+ if (!(seg_left == absolute_section
+ && seg_right == absolute_section)
+ && !(op == O_eq || op == O_ne)
+ && !((op == O_subtract
+ || op == O_lt || op == O_le || op == O_ge || op == O_gt)
+ && seg_left == seg_right
+ && (finalize_syms
+ || frag_offset_fixed_p (frag_left, frag_right, &frag_off))
+ && (seg_left != reg_section || left == right)
+ && (seg_left != undefined_section || add_symbol == op_symbol)))
+ {
+ if ((seg_left == absolute_section && left == 0)
+ || (seg_right == absolute_section && right == 0))
+ {
+ if (op == O_bit_exclusive_or || op == O_bit_inclusive_or)
+ {
+ if (seg_right != absolute_section || right != 0)
+ {
+ seg_left = seg_right;
+ left = right;
+ add_symbol = op_symbol;
+ }
+ op = O_symbol;
+ break;
+ }
+ else if (op == O_left_shift || op == O_right_shift)
+ {
+ if (seg_left != absolute_section || left != 0)
+ {
+ op = O_symbol;
+ break;
+ }
+ }
+ else if (op != O_multiply
+ && op != O_bit_or_not && op != O_bit_and)
+ return 0;
+ }
+ else if (op == O_multiply
+ && seg_left == absolute_section && left == 1)
+ {
+ seg_left = seg_right;
+ left = right;
+ add_symbol = op_symbol;
+ op = O_symbol;
+ break;
+ }
+ else if ((op == O_multiply || op == O_divide)
+ && seg_right == absolute_section && right == 1)
+ {
+ op = O_symbol;
+ break;
+ }
+ else if (left != right
+ || ((seg_left != reg_section || seg_right != reg_section)
+ && (seg_left != undefined_section
+ || seg_right != undefined_section
+ || add_symbol != op_symbol)))
+ return 0;
+ else if (op == O_bit_and || op == O_bit_inclusive_or)
+ {
+ op = O_symbol;
+ break;
+ }
+ else if (op != O_bit_exclusive_or && op != O_bit_or_not)
+ return 0;
+ }
+
+ right += frag_off / OCTETS_PER_BYTE;
+ switch (op)
+ {
+ case O_add: left += right; break;
+ case O_subtract: left -= right; break;
+ case O_multiply: left *= right; break;
+ case O_divide:
+ if (right == 0)
+ return 0;
+ left = (offsetT) left / (offsetT) right;
+ break;
+ case O_modulus:
+ if (right == 0)
+ return 0;
+ left = (offsetT) left % (offsetT) right;
+ break;
+ case O_left_shift: left <<= right; break;
+ case O_right_shift: left >>= right; break;
+ case O_bit_inclusive_or: left |= right; break;
+ case O_bit_or_not: left |= ~right; break;
+ case O_bit_exclusive_or: left ^= right; break;
+ case O_bit_and: left &= right; break;
+ case O_eq:
+ case O_ne:
+ left = (left == right
+ && seg_left == seg_right
+ && (finalize_syms || frag_left == frag_right)
+ && (seg_left != undefined_section
+ || add_symbol == op_symbol)
+ ? ~ (valueT) 0 : 0);
+ if (op == O_ne)
+ left = ~left;
+ break;
+ case O_lt:
+ left = (offsetT) left < (offsetT) right ? ~ (valueT) 0 : 0;
+ break;
+ case O_le:
+ left = (offsetT) left <= (offsetT) right ? ~ (valueT) 0 : 0;
+ break;
+ case O_ge:
+ left = (offsetT) left >= (offsetT) right ? ~ (valueT) 0 : 0;
+ break;
+ case O_gt:
+ left = (offsetT) left > (offsetT) right ? ~ (valueT) 0 : 0;
+ break;
+ case O_logical_and: left = left && right; break;
+ case O_logical_or: left = left || right; break;
+ default: abort ();
+ }
+
+ op = O_constant;
+ break;
+ }
+
+ if (op == O_symbol)
+ {
+ if (seg_left == absolute_section)
+ op = O_constant;
+ else if (seg_left == reg_section && final_val == 0)
+ op = O_register;
+ else if (add_symbol != expressionP->X_add_symbol)
+ final_val += left;
+ expressionP->X_add_symbol = add_symbol;
+ }
+ expressionP->X_op = op;
+
+ if (op == O_constant || op == O_register)
+ final_val += left;
+ expressionP->X_add_number = final_val;
+
+ return 1;
+}
/* This lives here because it belongs equally in expr.c & read.c.
expr.c is just a branch office read.c anyway, and putting it
@@ -1912,6 +2183,6 @@ unsigned int
get_single_number (void)
{
expressionS exp;
- operand (&exp);
+ operand (&exp, expr_normal);
return exp.X_add_number;
}
diff --git a/contrib/binutils/gas/expr.h b/contrib/binutils/gas/expr.h
index 382dda9b1f24..6b88d0dfe43c 100644
--- a/contrib/binutils/gas/expr.h
+++ b/contrib/binutils/gas/expr.h
@@ -1,6 +1,6 @@
/* expr.h -> header file for expr.c
- Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
- Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2002, 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/*
* By popular demand, we define a struct to represent an expression.
@@ -143,8 +143,17 @@ typedef struct expressionS {
unsigned short X_md;
} expressionS;
+enum expr_mode
+{
+ expr_evaluate,
+ expr_normal,
+ expr_defer
+};
+
/* "result" should be type (expressionS *). */
-#define expression(result) expr (0, result)
+#define expression(result) expr (0, result, expr_normal)
+#define expression_and_evaluate(result) expr (0, result, expr_evaluate)
+#define deferred_expression(result) expr (0, result, expr_defer)
/* If an expression is O_big, look here for its value. These common
data may be clobbered whenever expr() is called. */
@@ -160,12 +169,12 @@ typedef char operator_rankT;
extern char get_symbol_end (void);
extern void expr_begin (void);
extern void expr_set_precedence (void);
-extern segT expr (int rank, expressionS * resultP);
+extern segT expr (int, expressionS *, enum expr_mode);
extern unsigned int get_single_number (void);
extern symbolS *make_expr_symbol (expressionS * expressionP);
extern int expr_symbol_where (symbolS *, char **, unsigned int *);
extern symbolS *expr_build_uconstant (offsetT);
-extern symbolS *expr_build_unary (operatorT, symbolS *);
-extern symbolS *expr_build_binary (operatorT, symbolS *, symbolS *);
extern symbolS *expr_build_dot (void);
+
+int resolve_expression (expressionS *);
diff --git a/contrib/binutils/gas/flonum-copy.c b/contrib/binutils/gas/flonum-copy.c
index e3aba2c4661e..b8b3e5e3cade 100644
--- a/contrib/binutils/gas/flonum-copy.c
+++ b/contrib/binutils/gas/flonum-copy.c
@@ -1,5 +1,5 @@
/* flonum_copy.c - copy a flonum
- Copyright 1987, 1990, 1991, 1992, 1993, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 2000, 2003
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "as.h"
diff --git a/contrib/binutils/gas/flonum-konst.c b/contrib/binutils/gas/flonum-konst.c
index 3e606fbfd7d3..9d0cfe6f9c81 100644
--- a/contrib/binutils/gas/flonum-konst.c
+++ b/contrib/binutils/gas/flonum-konst.c
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "ansidecl.h"
#include "flonum.h"
diff --git a/contrib/binutils/gas/flonum-mult.c b/contrib/binutils/gas/flonum-mult.c
index 6d17f0a86970..c6dd8ffdd7b1 100644
--- a/contrib/binutils/gas/flonum-mult.c
+++ b/contrib/binutils/gas/flonum-mult.c
@@ -1,5 +1,5 @@
/* flonum_mult.c - multiply two flonums
- Copyright 1987, 1990, 1991, 1992, 1995, 2000, 2002
+ Copyright 1987, 1990, 1991, 1992, 1995, 2000, 2002, 2003
Free Software Foundation, Inc.
This file is part of Gas, the GNU Assembler.
diff --git a/contrib/binutils/gas/flonum.h b/contrib/binutils/gas/flonum.h
index 22aa7558e835..04f5b8990f98 100644
--- a/contrib/binutils/gas/flonum.h
+++ b/contrib/binutils/gas/flonum.h
@@ -1,5 +1,5 @@
/* flonum.h - Floating point package
- Copyright 1987, 1990, 1991, 1992, 1994, 1996, 2000
+ Copyright 1987, 1990, 1991, 1992, 1994, 1996, 2000, 2003
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/***********************************************************************\
* *
diff --git a/contrib/binutils/gas/frags.c b/contrib/binutils/gas/frags.c
index 83625d7fbf60..b08ef502cbf7 100644
--- a/contrib/binutils/gas/frags.c
+++ b/contrib/binutils/gas/frags.c
@@ -1,6 +1,6 @@
/* frags.c - manage frags -
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2003
+ 1999, 2000, 2001, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "as.h"
#include "subsegs.h"
@@ -91,7 +91,14 @@ frag_grow (unsigned int nchars)
frag_wane (frag_now);
frag_new (0);
oldc = frchain_now->frch_obstack.chunk_size;
- frchain_now->frch_obstack.chunk_size = 2 * nchars + SIZEOF_STRUCT_FRAG;
+ /* Try to allocate a bit more than needed right now. But don't do
+ this if we would waste too much memory. Especially necessary
+ for extremely big (like 2GB initialized) frags. */
+ if (nchars < 0x10000)
+ frchain_now->frch_obstack.chunk_size = 2 * nchars;
+ else
+ frchain_now->frch_obstack.chunk_size = nchars + 0x10000;
+ frchain_now->frch_obstack.chunk_size += SIZEOF_STRUCT_FRAG;
if (frchain_now->frch_obstack.chunk_size > 0)
while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars
&& (unsigned long) frchain_now->frch_obstack.chunk_size > nchars)
@@ -376,3 +383,56 @@ frag_append_1_char (int datum)
}
obstack_1grow (&frchain_now->frch_obstack, datum);
}
+
+/* Return TRUE if FRAG1 and FRAG2 have a fixed relationship between
+ their start addresses. Set OFFSET to the difference in address
+ not already accounted for in the frag FR_ADDRESS. */
+
+bfd_boolean
+frag_offset_fixed_p (fragS *frag1, fragS *frag2, bfd_vma *offset)
+{
+ fragS *frag;
+ bfd_vma off;
+
+ /* Start with offset initialised to difference between the two frags.
+ Prior to assigning frag addresses this will be zero. */
+ off = frag1->fr_address - frag2->fr_address;
+ if (frag1 == frag2)
+ {
+ *offset = off;
+ return TRUE;
+ }
+
+ /* Maybe frag2 is after frag1. */
+ frag = frag1;
+ while (frag->fr_type == rs_fill)
+ {
+ off += frag->fr_fix + frag->fr_offset * frag->fr_var;
+ frag = frag->fr_next;
+ if (frag == NULL)
+ break;
+ if (frag == frag2)
+ {
+ *offset = off;
+ return TRUE;
+ }
+ }
+
+ /* Maybe frag1 is after frag2. */
+ off = frag1->fr_address - frag2->fr_address;
+ frag = frag2;
+ while (frag->fr_type == rs_fill)
+ {
+ off -= frag->fr_fix + frag->fr_offset * frag->fr_var;
+ frag = frag->fr_next;
+ if (frag == NULL)
+ break;
+ if (frag == frag1)
+ {
+ *offset = off;
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h
index 52a6cfeb4bd5..880446763a4e 100644
--- a/contrib/binutils/gas/frags.h
+++ b/contrib/binutils/gas/frags.h
@@ -1,6 +1,6 @@
/* frags.h - Header file for the frag concept.
- Copyright 1987, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,15 +16,13 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef FRAGS_H
#define FRAGS_H
-#ifdef ANSI_PROTOTYPES
struct obstack;
-#endif
/* A code fragment (frag) is some known number of chars, followed by some
unknown number of chars. Typically the unknown number of chars is an
@@ -74,6 +72,11 @@ struct frag {
fr_address has been adjusted. */
unsigned int relax_marker:1;
+ /* Used to ensure that all insns are emitted on proper address
+ boundaries. */
+ unsigned int has_code:1;
+ unsigned int insn_addr:6;
+
/* What state is my tail in? */
relax_stateT fr_type;
relax_substateT fr_subtype;
@@ -114,22 +117,8 @@ COMMON fragS zero_address_frag;
/* For local common (N_BSS segment) fixups. */
COMMON fragS bss_address_frag;
-#if 0
-/* A macro to speed up appending exactly 1 char to current frag. */
-/* JF changed < 1 to <= 1 to avoid a race condition. */
-#define FRAG_APPEND_1_CHAR(datum) \
-{ \
- if (obstack_room (&frags) <= 1) \
- { \
- frag_wane (frag_now); \
- frag_new (0); \
- } \
- obstack_1grow (&frags, datum); \
-}
-#else
extern void frag_append_1_char (int);
#define FRAG_APPEND_1_CHAR(X) frag_append_1_char (X)
-#endif
void frag_init (void);
fragS *frag_alloc (struct obstack *);
@@ -159,4 +148,6 @@ char *frag_var (relax_stateT type,
offsetT offset,
char *opcode);
+bfd_boolean frag_offset_fixed_p (fragS *, fragS *, bfd_vma *);
+
#endif /* FRAGS_H */
diff --git a/contrib/binutils/gas/hash.c b/contrib/binutils/gas/hash.c
index a7b82987b20f..6977ceeb5328 100644
--- a/contrib/binutils/gas/hash.c
+++ b/contrib/binutils/gas/hash.c
@@ -1,6 +1,6 @@
/* hash.c -- gas hash table code
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This version of the hash table code is a wholescale replacement of
the old hash table code, which was fairly bad. This is based on
@@ -33,10 +33,6 @@
#include "safe-ctype.h"
#include "obstack.h"
-/* The default number of entries to use when creating a hash table. */
-
-#define DEFAULT_SIZE (4051)
-
/* An entry in a hash table. */
struct hash_entry {
@@ -72,21 +68,55 @@ struct hash_control {
#endif /* HASH_STATISTICS */
};
+/* The default number of entries to use when creating a hash table.
+ Note this value can be reduced to 4051 by using the command line
+ switch --reduce-memory-overheads, or set to other values by using
+ the --hash-size=<NUMBER> switch. */
+
+static unsigned long gas_hash_table_size = 65537;
+
+void
+set_gas_hash_table_size (unsigned long size)
+{
+ gas_hash_table_size = size;
+}
+
+/* FIXME: This function should be amalgmated with bfd/hash.c:bfd_hash_set_default_size(). */
+static unsigned long
+get_gas_hash_table_size (void)
+{
+ /* Extend this prime list if you want more granularity of hash table size. */
+ static const unsigned long hash_size_primes[] =
+ {
+ 1021, 4051, 8599, 16699, 65537
+ };
+ unsigned int index;
+
+ /* Work out the best prime number near the hash_size.
+ FIXME: This could be a more sophisticated algorithm,
+ but is it really worth implementing it ? */
+ for (index = 0; index < ARRAY_SIZE (hash_size_primes) - 1; ++index)
+ if (gas_hash_table_size <= hash_size_primes[index])
+ break;
+
+ return hash_size_primes[index];
+}
+
/* Create a hash table. This return a control block. */
struct hash_control *
hash_new (void)
{
- unsigned int size;
+ unsigned long size;
+ unsigned long alloc;
struct hash_control *ret;
- unsigned int alloc;
- size = DEFAULT_SIZE;
+ size = get_gas_hash_table_size ();
- ret = (struct hash_control *) xmalloc (sizeof *ret);
+ ret = xmalloc (sizeof *ret);
obstack_begin (&ret->memory, chunksize);
alloc = size * sizeof (struct hash_entry *);
- ret->table = (struct hash_entry **) obstack_alloc (&ret->memory, alloc);
+ ret->table = obstack_alloc (&ret->memory, alloc);
memset (ret->table, 0, alloc);
ret->size = size;
@@ -120,19 +150,13 @@ hash_die (struct hash_control *table)
Each time we look up a string, we move it to the start of the list
for its hash code, to take advantage of referential locality. */
-static struct hash_entry *hash_lookup (struct hash_control *,
- const char *,
- struct hash_entry ***,
- unsigned long *);
-
static struct hash_entry *
-hash_lookup (struct hash_control *table, const char *key,
+hash_lookup (struct hash_control *table, const char *key, size_t len,
struct hash_entry ***plist, unsigned long *phash)
{
- register unsigned long hash;
- unsigned int len;
- register const unsigned char *s;
- register unsigned int c;
+ unsigned long hash;
+ size_t n;
+ unsigned int c;
unsigned int index;
struct hash_entry **list;
struct hash_entry *p;
@@ -143,13 +167,11 @@ hash_lookup (struct hash_control *table, const char *key,
#endif
hash = 0;
- len = 0;
- s = (const unsigned char *) key;
- while ((c = *s++) != '\0')
+ for (n = 0; n < len; n++)
{
+ c = key[n];
hash += c + (c << 17);
hash ^= hash >> 2;
- ++len;
}
hash += len + (len << 17);
hash ^= hash >> 2;
@@ -176,7 +198,7 @@ hash_lookup (struct hash_control *table, const char *key,
++table->string_compares;
#endif
- if (strcmp (p->string, key) == 0)
+ if (strncmp (p->string, key, len) == 0 && p->string[len] == '\0')
{
if (prev != NULL)
{
@@ -207,7 +229,7 @@ hash_insert (struct hash_control *table, const char *key, PTR value)
struct hash_entry **list;
unsigned long hash;
- p = hash_lookup (table, key, &list, &hash);
+ p = hash_lookup (table, key, strlen (key), &list, &hash);
if (p != NULL)
return "exists";
@@ -237,7 +259,7 @@ hash_jam (struct hash_control *table, const char *key, PTR value)
struct hash_entry **list;
unsigned long hash;
- p = hash_lookup (table, key, &list, &hash);
+ p = hash_lookup (table, key, strlen (key), &list, &hash);
if (p != NULL)
{
#ifdef HASH_STATISTICS
@@ -274,7 +296,7 @@ hash_replace (struct hash_control *table, const char *key, PTR value)
struct hash_entry *p;
PTR ret;
- p = hash_lookup (table, key, NULL, NULL);
+ p = hash_lookup (table, key, strlen (key), NULL, NULL);
if (p == NULL)
return NULL;
@@ -297,7 +319,22 @@ hash_find (struct hash_control *table, const char *key)
{
struct hash_entry *p;
- p = hash_lookup (table, key, NULL, NULL);
+ p = hash_lookup (table, key, strlen (key), NULL, NULL);
+ if (p == NULL)
+ return NULL;
+
+ return p->data;
+}
+
+/* As hash_find, but KEY is of length LEN and is not guaranteed to be
+ NUL-terminated. */
+
+PTR
+hash_find_n (struct hash_control *table, const char *key, size_t len)
+{
+ struct hash_entry *p;
+
+ p = hash_lookup (table, key, len, NULL, NULL);
if (p == NULL)
return NULL;
@@ -313,7 +350,7 @@ hash_delete (struct hash_control *table, const char *key)
struct hash_entry *p;
struct hash_entry **list;
- p = hash_lookup (table, key, &list, NULL);
+ p = hash_lookup (table, key, strlen (key), &list, NULL);
if (p == NULL)
return NULL;
diff --git a/contrib/binutils/gas/hash.h b/contrib/binutils/gas/hash.h
index 08f41e6c9de5..c2a8a203f94d 100644
--- a/contrib/binutils/gas/hash.h
+++ b/contrib/binutils/gas/hash.h
@@ -1,5 +1,6 @@
/* hash.h -- header file for gas hash table routines
- Copyright 1987, 1992, 1993, 1995, 1999 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1995, 1999, 2003
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,14 +16,18 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef HASH_H
#define HASH_H
struct hash_control;
+/* Set the size of the hash table used. */
+
+void set_gas_hash_table_size (unsigned long);
+
/* Create a hash table. This return a control block. */
extern struct hash_control *hash_new (void);
@@ -58,6 +63,11 @@ extern PTR hash_replace (struct hash_control *, const char *key,
extern PTR hash_find (struct hash_control *, const char *key);
+/* As hash_find, but KEY is of length LEN and is not guaranteed to be
+ NUL-terminated. */
+
+extern PTR hash_find_n (struct hash_control *, const char *key, size_t len);
+
/* Delete an entry from a hash table. This returns the value stored
for that entry, or NULL if there is no such entry. */
diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c
index 01cc669feffb..343f0494087c 100644
--- a/contrib/binutils/gas/input-file.c
+++ b/contrib/binutils/gas/input-file.c
@@ -1,5 +1,6 @@
/* input_file.c - Deal with Input Files -
- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2003
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001,
+ 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Confines all details of reading source bytes to this module.
All O/S specific crocks should live here.
@@ -79,12 +80,6 @@ input_file_buffer_size (void)
return (BUFFER_SIZE);
}
-int
-input_file_is_open (void)
-{
- return f_in != (FILE *) 0;
-}
-
/* Push the state of our input, returning a pointer to saved info that
can be restored with input_file_pop (). */
@@ -146,21 +141,22 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0. */
file_name = _("{standard input}");
}
- if (f_in)
- c = getc (f_in);
+ if (f_in == NULL)
+ {
+ bfd_set_error (bfd_error_system_call);
+ as_perror (_("Can't open %s for reading"), file_name);
+ return;
+ }
+
+ c = getc (f_in);
- if (f_in == NULL || ferror (f_in))
+ if (ferror (f_in))
{
-#ifdef BFD_ASSEMBLER
bfd_set_error (bfd_error_system_call);
-#endif
as_perror (_("Can't open %s for reading"), file_name);
- if (f_in)
- {
- fclose (f_in);
- f_in = NULL;
- }
+ fclose (f_in);
+ f_in = NULL;
return;
}
@@ -219,9 +215,7 @@ input_file_get (char *buf, int buflen)
size = fread (buf, sizeof (char), buflen, f_in);
if (size < 0)
{
-#ifdef BFD_ASSEMBLER
bfd_set_error (bfd_error_system_call);
-#endif
as_perror (_("Can't read from %s"), file_name);
size = 0;
}
@@ -248,9 +242,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)
{
-#ifdef BFD_ASSEMBLER
bfd_set_error (bfd_error_system_call);
-#endif
as_perror (_("Can't read from %s"), file_name);
size = 0;
}
@@ -260,9 +252,7 @@ input_file_give_next_buffer (char *where /* Where to place 1st character of new
{
if (fclose (f_in))
{
-#ifdef BFD_ASSEMBLER
bfd_set_error (bfd_error_system_call);
-#endif
as_perror (_("Can't close %s"), file_name);
}
f_in = (FILE *) 0;
diff --git a/contrib/binutils/gas/input-file.h b/contrib/binutils/gas/input-file.h
index b686a0d06567..bc8289e4e444 100644
--- a/contrib/binutils/gas/input-file.h
+++ b/contrib/binutils/gas/input-file.h
@@ -1,5 +1,5 @@
/* input_file.h header for input-file.c
- Copyright 1987, 1992, 1993, 2000 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 2000, 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/*"input_file.c":Operating-system dependant functions to read source files.*/
@@ -58,7 +58,6 @@
char *input_file_give_next_buffer (char *where);
char *input_file_push (void);
unsigned int input_file_buffer_size (void);
-int input_file_is_open (void);
void input_file_begin (void);
void input_file_close (void);
void input_file_end (void);
diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c
index 7a03965c9672..8562ee25dff3 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
+ 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ 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"
@@ -123,7 +123,6 @@ struct input_save {
static struct input_save *input_scrub_push (char *saved_position);
static char *input_scrub_pop (struct input_save *arg);
-static void as_1_char (unsigned int c, FILE * stream);
/* Saved information about the file that .include'd this one. When we hit EOF,
we automatically pop to that file. */
@@ -280,7 +279,7 @@ input_scrub_include_sb (sb *from, char *position, int is_expansion)
/* Add the sentinel required by read.c. */
sb_add_char (&from_sb, '\n');
}
- sb_add_sb (&from_sb, from);
+ sb_scrub_and_add_sb (&from_sb, from);
sb_index = 1;
/* These variables are reset by input_scrub_push. Restore them
@@ -476,39 +475,3 @@ as_where (char **namep, unsigned int *linep)
*linep = 0;
}
}
-
-/* Output to given stream how much of line we have scanned so far.
- Assumes we have scanned up to and including input_line_pointer.
- No free '\n' at end of line. */
-
-void
-as_howmuch (FILE *stream /* Opened for write please. */)
-{
- register char *p; /* Scan input line. */
-
- for (p = input_line_pointer - 1; *p != '\n'; --p)
- {
- }
- ++p; /* p->1st char of line. */
- for (; p <= input_line_pointer; p++)
- {
- /* Assume ASCII. EBCDIC & other micro-computer char sets ignored. */
- as_1_char ((unsigned char) *p, stream);
- }
-}
-
-static void
-as_1_char (unsigned int c, FILE *stream)
-{
- if (c > 127)
- {
- (void) putc ('%', stream);
- c -= 128;
- }
- if (c < 32)
- {
- (void) putc ('^', stream);
- c += '@';
- }
- (void) putc (c, stream);
-}
diff --git a/contrib/binutils/gas/itbl-lex.h b/contrib/binutils/gas/itbl-lex.h
new file mode 100644
index 000000000000..45c4dacfceeb
--- /dev/null
+++ b/contrib/binutils/gas/itbl-lex.h
@@ -0,0 +1,23 @@
+/* itbl-lex.h
+ Copyright 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. */
+
+extern int insntbl_line;
+extern int yyparse (void);
+extern int yylex (void);
diff --git a/contrib/binutils/gas/itbl-lex.l b/contrib/binutils/gas/itbl-lex.l
index e924efc56ef0..aceeac4f9f03 100644
--- a/contrib/binutils/gas/itbl-lex.l
+++ b/contrib/binutils/gas/itbl-lex.l
@@ -1,5 +1,5 @@
/* itbl-lex.l
- Copyright 1997, 1998, 2001 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,14 +15,15 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
%{
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include "itbl-lex.h"
#include <itbl-parse.h>
#ifdef DEBUG
diff --git a/contrib/binutils/gas/itbl-ops.c b/contrib/binutils/gas/itbl-ops.c
index 089bff4aac5a..bd1f6473f45c 100644
--- a/contrib/binutils/gas/itbl-ops.c
+++ b/contrib/binutils/gas/itbl-ops.c
@@ -1,5 +1,6 @@
/* itbl-ops.c
- Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1997, 1999, 2000, 2001, 2002, 2003, 2005
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/*======================================================================*/
/*
@@ -204,18 +205,6 @@ struct itbl_entry *
itbl_add_reg (int yyprocessor, int yytype, char *regname,
int regnum)
{
-#if 0
-#include "as.h"
-#include "symbols.h"
- /* Since register names don't have a prefix, we put them in the symbol table so
- they can't be used as symbols. This also simplifies argument parsing as
- we can let gas parse registers for us. The recorded register number is
- regnum. */
- /* Use symbol_create here instead of symbol_new so we don't try to
- output registers into the object file's symbol table. */
- symbol_table_insert (symbol_create (regname, reg_section,
- regnum, &zero_address_frag));
-#endif
return alloc_entry (get_processor (yyprocessor), get_type (yytype), regname,
(unsigned long) regnum);
}
diff --git a/contrib/binutils/gas/itbl-ops.h b/contrib/binutils/gas/itbl-ops.h
index 4c98d72da1a1..47dc8b295b19 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 Free Software Foundation, Inc.
+ Copyright 1997, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* External functions, constants and defines for itbl support */
diff --git a/contrib/binutils/gas/itbl-parse.y b/contrib/binutils/gas/itbl-parse.y
index 53552d7f31b0..a7a52dfabff9 100644
--- a/contrib/binutils/gas/itbl-parse.y
+++ b/contrib/binutils/gas/itbl-parse.y
@@ -1,5 +1,5 @@
/* itbl-parse.y
- Copyright 1997 Free Software Foundation, Inc.
+ Copyright 1997, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
%{
@@ -247,6 +247,7 @@ FIXME! hex is ambiguous with any digit
*/
#include <stdio.h>
+#include "itbl-lex.h"
#include "itbl-ops.h"
/* #define DEBUG */
@@ -273,9 +274,6 @@ FIXME! hex is ambiguous with any digit
static int sbit, ebit;
static struct itbl_entry *insn=0;
-extern int insntbl_line;
-int yyparse PARAMS ((void));
-int yylex PARAMS ((void));
static int yyerror PARAMS ((const char *));
%}
diff --git a/contrib/binutils/gas/link.cmd b/contrib/binutils/gas/link.cmd
deleted file mode 100644
index a035ca87daa9..000000000000
--- a/contrib/binutils/gas/link.cmd
+++ /dev/null
@@ -1,10 +0,0 @@
-ALIGN=1024
-RESNUM 0x0000, 0x8000
-; Putting in .lit1 gives errors.
-ORDER .data=0x80002000, .data1, .lit, .bss
-; Let's put this on the command line so it goes first, which is what
-; GDB expects.
-; LOAD /s2/amd/29k/lib/crt0.o
-LOAD /s2/amd/29k/lib/libqcb0h.lib
-LOAD /s2/amd/29k/lib/libscb0h.lib
-LOAD /s2/amd/29k/lib/libacb0h.lib
diff --git a/contrib/binutils/gas/listing.c b/contrib/binutils/gas/listing.c
index aa22c5e99e41..61ef6f55e40f 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
+ 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Contributed by Steve Chamberlain <sac@cygnus.com>
@@ -613,10 +613,6 @@ calc_hex (list_info_type *list)
sprintf (data_buffer + data_buffer_size,
"%02X",
(frag_ptr->fr_literal[var_rep_idx]) & 0xff);
-#if 0
- data_buffer[data_buffer_size++] = '*';
- data_buffer[data_buffer_size++] = '*';
-#endif
data_buffer_size += 2;
var_rep_idx++;
@@ -753,11 +749,10 @@ list_symbol_table (void)
if (SEG_NORMAL (S_GET_SEGMENT (ptr))
|| S_GET_SEGMENT (ptr) == absolute_section)
{
-#ifdef BFD_ASSEMBLER
/* Don't report section symbols. They are not interesting. */
if (symbol_section_p (ptr))
continue;
-#endif
+
if (S_GET_NAME (ptr))
{
char buf[30], fmt[8];
@@ -1090,9 +1085,7 @@ listing_print (char *name)
using_stdout = 0;
else
{
-#ifdef BFD_ASSEMBLER
- bfd_set_error (bfd_error_system_call);
-#endif
+ bfd_set_error (bfd_error_system_call);
as_perror (_("can't open list file: %s"), name);
list_file = stdout;
using_stdout = 1;
@@ -1112,9 +1105,7 @@ listing_print (char *name)
{
if (fclose (list_file) == EOF)
{
-#ifdef BFD_ASSEMBLER
bfd_set_error (bfd_error_system_call);
-#endif
as_perror (_("error closing list file: %s"), name);
}
}
diff --git a/contrib/binutils/gas/listing.h b/contrib/binutils/gas/listing.h
index 424b6642d046..e234da4cb403 100644
--- a/contrib/binutils/gas/listing.h
+++ b/contrib/binutils/gas/listing.h
@@ -1,6 +1,6 @@
/* This file is listing.h
- Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1997, 1998
- Free Software Foundation, Inc.
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1997, 1998,
+ 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef __listing_h__
#define __listing_h__
diff --git a/contrib/binutils/gas/literal.c b/contrib/binutils/gas/literal.c
index 7315f3eee035..cc3a25749719 100644
--- a/contrib/binutils/gas/literal.c
+++ b/contrib/binutils/gas/literal.c
@@ -1,5 +1,5 @@
-/* as.c - GAS literal pool management.
- Copyright 1994, 2000 Free Software Foundation, Inc.
+/* literal.c - GAS literal pool management.
+ Copyright 1994, 2000, 2005 Free Software Foundation, Inc.
Written by Ken Raeburn (raeburn@cygnus.com).
This file is part of GAS, the GNU Assembler.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This isn't quite a "constant" pool. Some of the values may get
adjusted at run time, e.g., for symbolic relocations when shared
@@ -39,7 +39,7 @@
#include "as.h"
#include "subsegs.h"
-#if defined (BFD_ASSEMBLER) && defined (NEED_LITERAL_POOL)
+#ifdef NEED_LITERAL_POOL
valueT
add_to_literal_pool (sym, addend, sec, size)
@@ -92,4 +92,4 @@ add_to_literal_pool (sym, addend, sec, size)
seginfo->literal_pool_size += size;
return offset;
}
-#endif /* BFD_ASSEMBLER */
+#endif
diff --git a/contrib/binutils/gas/macro.c b/contrib/binutils/gas/macro.c
index 09917443a1d5..af98bada6a86 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
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004, 2005 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -19,8 +19,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "config.h"
@@ -54,6 +54,7 @@ extern void *alloca ();
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#include "as.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "sb.h"
@@ -69,13 +70,16 @@ extern void *alloca ();
static int get_token (int, sb *, sb *);
static int getstring (int, sb *, sb *);
-static int get_any_string (int, sb *, sb *, int, int);
+static int get_any_string (int, sb *, sb *);
+static formal_entry *new_formal (void);
+static void del_formal (formal_entry *);
static int do_formals (macro_entry *, int, sb *);
static int get_apost_token (int, sb *, sb *, int);
static int sub_actual (int, sb *, sb *, struct hash_control *, int, sb *, int);
static const char *macro_expand_body
- (sb *, sb *, formal_entry *, struct hash_control *, int);
+ (sb *, sb *, formal_entry *, struct hash_control *, const macro_entry *);
static const char *macro_expand (int, sb *, macro_entry *, sb *);
+static void free_macro(macro_entry *);
#define ISWHITE(x) ((x) == ' ' || (x) == '\t')
@@ -132,6 +136,14 @@ macro_init (int alternate, int mri, int strip_at,
macro_expr = expr;
}
+/* Switch in and out of alternate mode on the fly. */
+
+void
+macro_set_alternate (int alternate)
+{
+ macro_alternate = alternate;
+}
+
/* Switch in and out of MRI mode on the fly. */
void
@@ -143,6 +155,7 @@ macro_mri_mode (int mri)
/* Read input lines till we get to a TO string.
Increase nesting depth if we get a FROM string.
Put the results into sb at PTR.
+ FROM may be NULL (or will be ignored) if TO is "ENDR".
Add a new input line to an sb using GET_LINE.
Return 1 on success, 0 on unexpected EOF. */
@@ -150,59 +163,92 @@ int
buffer_and_nest (const char *from, const char *to, sb *ptr,
int (*get_line) (sb *))
{
- int from_len = strlen (from);
+ int from_len;
int to_len = strlen (to);
int depth = 1;
int line_start = ptr->len;
int more = get_line (ptr);
+ if (to_len == 4 && strcasecmp(to, "ENDR") == 0)
+ {
+ from = NULL;
+ from_len = 0;
+ }
+ else
+ from_len = strlen (from);
+
while (more)
{
- /* Try and find the first pseudo op on the line. */
+ /* Try to find the first pseudo op on the line. */
int i = line_start;
- if (! macro_alternate && ! macro_mri)
- {
- /* With normal syntax we can suck what we want till we get
- to the dot. With the alternate, labels have to start in
- the first column, since we cant tell what's a label and
- whats a pseudoop. */
+ /* With normal syntax we can suck what we want till we get
+ to the dot. With the alternate, labels have to start in
+ the first column, since we can't tell what's a label and
+ what's a pseudoop. */
+ if (! LABELS_WITHOUT_COLONS)
+ {
/* Skip leading whitespace. */
while (i < ptr->len && ISWHITE (ptr->ptr[i]))
i++;
+ }
- /* Skip over a label. */
- while (i < ptr->len
- && (ISALNUM (ptr->ptr[i])
- || ptr->ptr[i] == '_'
- || ptr->ptr[i] == '$'))
+ for (;;)
+ {
+ /* Skip over a label, if any. */
+ if (i >= ptr->len || ! is_name_beginner (ptr->ptr[i]))
+ break;
+ i++;
+ while (i < ptr->len && is_part_of_name (ptr->ptr[i]))
i++;
-
- /* And a colon. */
- if (i < ptr->len
- && ptr->ptr[i] == ':')
+ if (i < ptr->len && is_name_ender (ptr->ptr[i]))
i++;
-
+ if (LABELS_WITHOUT_COLONS)
+ break;
+ /* Skip whitespace. */
+ while (i < ptr->len && ISWHITE (ptr->ptr[i]))
+ i++;
+ /* Check for the colon. */
+ if (i >= ptr->len || ptr->ptr[i] != ':')
+ {
+ i = line_start;
+ break;
+ }
+ i++;
+ line_start = i;
}
+
/* Skip trailing whitespace. */
while (i < ptr->len && ISWHITE (ptr->ptr[i]))
i++;
if (i < ptr->len && (ptr->ptr[i] == '.'
- || macro_alternate
+ || NO_PSEUDO_DOT
|| macro_mri))
{
- if (ptr->ptr[i] == '.')
+ if (! flag_m68k_mri && ptr->ptr[i] == '.')
i++;
- if (strncasecmp (ptr->ptr + i, from, from_len) == 0
+ if (from == NULL
+ && strncasecmp (ptr->ptr + i, "IRPC", from_len = 4) != 0
+ && strncasecmp (ptr->ptr + i, "IRP", from_len = 3) != 0
+ && strncasecmp (ptr->ptr + i, "IREPC", from_len = 5) != 0
+ && strncasecmp (ptr->ptr + i, "IREP", from_len = 4) != 0
+ && strncasecmp (ptr->ptr + i, "REPT", from_len = 4) != 0
+ && strncasecmp (ptr->ptr + i, "REP", from_len = 3) != 0)
+ from_len = 0;
+ if ((from != NULL
+ ? strncasecmp (ptr->ptr + i, from, from_len) == 0
+ : from_len > 0)
&& (ptr->len == (i + from_len)
- || ! ISALNUM (ptr->ptr[i + from_len])))
+ || ! (is_part_of_name (ptr->ptr[i + from_len])
+ || is_name_ender (ptr->ptr[i + from_len]))))
depth++;
if (strncasecmp (ptr->ptr + i, to, to_len) == 0
&& (ptr->len == (i + to_len)
- || ! ISALNUM (ptr->ptr[i + to_len])))
+ || ! (is_part_of_name (ptr->ptr[i + to_len])
+ || is_name_ender (ptr->ptr[i + to_len]))))
{
depth--;
if (depth == 0)
@@ -230,15 +276,16 @@ static int
get_token (int idx, sb *in, sb *name)
{
if (idx < in->len
- && (ISALPHA (in->ptr[idx])
- || in->ptr[idx] == '_'
- || in->ptr[idx] == '$'))
+ && is_name_beginner (in->ptr[idx]))
{
sb_add_char (name, in->ptr[idx++]);
while (idx < in->len
- && (ISALNUM (in->ptr[idx])
- || in->ptr[idx] == '_'
- || in->ptr[idx] == '$'))
+ && is_part_of_name (in->ptr[idx]))
+ {
+ sb_add_char (name, in->ptr[idx++]);
+ }
+ if (idx < in->len
+ && is_name_ender (in->ptr[idx]))
{
sb_add_char (name, in->ptr[idx++]);
}
@@ -254,8 +301,6 @@ get_token (int idx, sb *in, sb *name)
static int
getstring (int idx, sb *in, sb *acc)
{
- idx = sb_skip_white (idx, in);
-
while (idx < in->len
&& (in->ptr[idx] == '"'
|| (in->ptr[idx] == '<' && (macro_alternate || macro_mri))
@@ -334,13 +379,13 @@ getstring (int idx, sb *in, sb *acc)
/* Fetch string from the input stream,
rules:
'Bxyx<whitespace> -> return 'Bxyza
- %<char> -> return string of decimal value of x
- "<string>" -> return string
- xyx<whitespace> -> return xyz
-*/
+ %<expr> -> return string of decimal value of <expr>
+ "string" -> return string
+ (string) -> return (string-including-whitespaces)
+ xyx<whitespace> -> return xyz. */
static int
-get_any_string (int idx, sb *in, sb *out, int expand, int pretend_quoted)
+get_any_string (int idx, sb *in, sb *out)
{
sb_reset (out);
idx = sb_skip_white (idx, in);
@@ -352,12 +397,11 @@ get_any_string (int idx, sb *in, sb *out, int expand, int pretend_quoted)
while (!ISSEP (in->ptr[idx]))
sb_add_char (out, in->ptr[idx++]);
}
- else if (in->ptr[idx] == '%'
- && macro_alternate
- && expand)
+ else if (in->ptr[idx] == '%' && macro_alternate)
{
int val;
char buf[20];
+
/* Turns the next expression into a string. */
/* xgettext: no-c-format */
idx = (*macro_expr) (_("% operator needs absolute expression"),
@@ -371,15 +415,12 @@ get_any_string (int idx, sb *in, sb *out, int expand, int pretend_quoted)
|| (in->ptr[idx] == '<' && (macro_alternate || macro_mri))
|| (macro_alternate && in->ptr[idx] == '\''))
{
- if (macro_alternate
- && ! macro_strip_at
- && expand)
+ if (macro_alternate && ! macro_strip_at && in->ptr[idx] != '<')
{
/* Keep the quotes. */
- sb_add_char (out, '\"');
-
+ sb_add_char (out, '"');
idx = getstring (idx, in, out);
- sb_add_char (out, '\"');
+ sb_add_char (out, '"');
}
else
{
@@ -388,93 +429,194 @@ get_any_string (int idx, sb *in, sb *out, int expand, int pretend_quoted)
}
else
{
+ char *br_buf = xmalloc(1);
+ char *in_br = br_buf;
+
+ *in_br = '\0';
while (idx < in->len
- && (in->ptr[idx] == '"'
- || in->ptr[idx] == '\''
- || pretend_quoted
+ && (*in_br
|| (in->ptr[idx] != ' '
- && in->ptr[idx] != '\t'
- && in->ptr[idx] != ','
- && (in->ptr[idx] != '<'
- || (! macro_alternate && ! macro_mri)))))
+ && in->ptr[idx] != '\t'))
+ && in->ptr[idx] != ','
+ && (in->ptr[idx] != '<'
+ || (! macro_alternate && ! macro_mri)))
{
- if (in->ptr[idx] == '"'
- || in->ptr[idx] == '\'')
+ char tchar = in->ptr[idx];
+
+ switch (tchar)
{
- char tchar = in->ptr[idx];
+ case '"':
+ case '\'':
sb_add_char (out, in->ptr[idx++]);
while (idx < in->len
&& in->ptr[idx] != tchar)
sb_add_char (out, in->ptr[idx++]);
if (idx == in->len)
return idx;
+ break;
+ case '(':
+ case '[':
+ if (in_br > br_buf)
+ --in_br;
+ else
+ {
+ br_buf = xmalloc(strlen(in_br) + 2);
+ strcpy(br_buf + 1, in_br);
+ free(in_br);
+ in_br = br_buf;
+ }
+ *in_br = tchar;
+ break;
+ case ')':
+ if (*in_br == '(')
+ ++in_br;
+ break;
+ case ']':
+ if (*in_br == '[')
+ ++in_br;
+ break;
}
- sb_add_char (out, in->ptr[idx++]);
+ sb_add_char (out, tchar);
+ ++idx;
}
+ free(br_buf);
}
}
return idx;
}
+/* Allocate a new formal. */
+
+static formal_entry *
+new_formal (void)
+{
+ formal_entry *formal;
+
+ formal = xmalloc (sizeof (formal_entry));
+
+ sb_new (&formal->name);
+ sb_new (&formal->def);
+ sb_new (&formal->actual);
+ formal->next = NULL;
+ formal->type = FORMAL_OPTIONAL;
+ return formal;
+}
+
+/* Free a formal. */
+
+static void
+del_formal (formal_entry *formal)
+{
+ sb_kill (&formal->actual);
+ sb_kill (&formal->def);
+ sb_kill (&formal->name);
+ free (formal);
+}
+
/* Pick up the formal parameters of a macro definition. */
static int
do_formals (macro_entry *macro, int idx, sb *in)
{
formal_entry **p = &macro->formals;
+ const char *name;
- macro->formal_count = 0;
- macro->formal_hash = hash_new ();
+ idx = sb_skip_white (idx, in);
while (idx < in->len)
{
- formal_entry *formal;
-
- formal = (formal_entry *) xmalloc (sizeof (formal_entry));
-
- sb_new (&formal->name);
- sb_new (&formal->def);
- sb_new (&formal->actual);
+ formal_entry *formal = new_formal ();
+ int cidx;
- idx = sb_skip_white (idx, in);
idx = get_token (idx, in, &formal->name);
if (formal->name.len == 0)
- break;
+ {
+ if (macro->formal_count)
+ --idx;
+ break;
+ }
idx = sb_skip_white (idx, in);
- if (formal->name.len)
+ /* This is a formal. */
+ name = sb_terminate (&formal->name);
+ if (! macro_mri
+ && idx < in->len
+ && in->ptr[idx] == ':'
+ && (! is_name_beginner (':')
+ || idx + 1 >= in->len
+ || ! is_part_of_name (in->ptr[idx + 1])))
{
- /* This is a formal. */
- if (idx < in->len && in->ptr[idx] == '=')
+ /* Got a qualifier. */
+ sb qual;
+
+ sb_new (&qual);
+ idx = get_token (sb_skip_white (idx + 1, in), in, &qual);
+ sb_terminate (&qual);
+ if (qual.len == 0)
+ as_bad_where (macro->file,
+ macro->line,
+ _("Missing parameter qualifier for `%s' in macro `%s'"),
+ name,
+ macro->name);
+ else if (strcmp (qual.ptr, "req") == 0)
+ formal->type = FORMAL_REQUIRED;
+ else if (strcmp (qual.ptr, "vararg") == 0)
+ formal->type = FORMAL_VARARG;
+ else
+ as_bad_where (macro->file,
+ macro->line,
+ _("`%s' is not a valid parameter qualifier for `%s' in macro `%s'"),
+ qual.ptr,
+ name,
+ macro->name);
+ sb_kill (&qual);
+ idx = sb_skip_white (idx, in);
+ }
+ if (idx < in->len && in->ptr[idx] == '=')
+ {
+ /* Got a default. */
+ idx = get_any_string (idx + 1, in, &formal->def);
+ idx = sb_skip_white (idx, in);
+ if (formal->type == FORMAL_REQUIRED)
{
- /* Got a default. */
- idx = get_any_string (idx + 1, in, &formal->def, 1, 0);
+ sb_reset (&formal->def);
+ as_warn_where (macro->file,
+ macro->line,
+ _("Pointless default value for required parameter `%s' in macro `%s'"),
+ name,
+ macro->name);
}
}
/* Add to macro's hash table. */
- hash_jam (macro->formal_hash, sb_terminate (&formal->name), formal);
+ if (! hash_find (macro->formal_hash, name))
+ hash_jam (macro->formal_hash, name, formal);
+ else
+ as_bad_where (macro->file,
+ macro->line,
+ _("A parameter named `%s' already exists for macro `%s'"),
+ name,
+ macro->name);
- formal->index = macro->formal_count;
- idx = sb_skip_comma (idx, in);
- macro->formal_count++;
+ formal->index = macro->formal_count++;
*p = formal;
p = &formal->next;
- *p = NULL;
+ if (formal->type == FORMAL_VARARG)
+ break;
+ cidx = idx;
+ idx = sb_skip_comma (idx, in);
+ if (idx != cidx && idx >= in->len)
+ {
+ idx = cidx;
+ break;
+ }
}
if (macro_mri)
{
- formal_entry *formal;
- const char *name;
+ formal_entry *formal = new_formal ();
/* Add a special NARG formal, which macro_expand will set to the
number of arguments. */
- formal = (formal_entry *) xmalloc (sizeof (formal_entry));
-
- sb_new (&formal->name);
- sb_new (&formal->def);
- sb_new (&formal->actual);
-
/* The same MRI assemblers which treat '@' characters also use
the name $NARG. At least until we find an exception. */
if (macro_strip_at)
@@ -485,11 +627,16 @@ do_formals (macro_entry *macro, int idx, sb *in)
sb_add_string (&formal->name, name);
/* Add to macro's hash table. */
+ if (hash_find (macro->formal_hash, name))
+ as_bad_where (macro->file,
+ macro->line,
+ _("Reserved word `%s' used as parameter in macro `%s'"),
+ name,
+ macro->name);
hash_jam (macro->formal_hash, name, formal);
formal->index = NARG_INDEX;
*p = formal;
- formal->next = NULL;
}
return idx;
@@ -501,31 +648,39 @@ do_formals (macro_entry *macro, int idx, sb *in)
const char *
define_macro (int idx, sb *in, sb *label,
- int (*get_line) (sb *), const char **namep)
+ int (*get_line) (sb *),
+ char *file, unsigned int line,
+ const char **namep)
{
macro_entry *macro;
sb name;
- const char *namestr;
+ const char *error = NULL;
macro = (macro_entry *) xmalloc (sizeof (macro_entry));
sb_new (&macro->sub);
sb_new (&name);
+ macro->file = file;
+ macro->line = line;
macro->formal_count = 0;
macro->formals = 0;
+ macro->formal_hash = hash_new ();
idx = sb_skip_white (idx, in);
if (! buffer_and_nest ("MACRO", "ENDM", &macro->sub, get_line))
- return _("unexpected end of file in macro definition");
+ error = _("unexpected end of file in macro `%s' definition");
if (label != NULL && label->len != 0)
{
sb_add_sb (&name, label);
+ macro->name = sb_terminate (&name);
if (idx < in->len && in->ptr[idx] == '(')
{
/* It's the label: MACRO (formals,...) sort */
idx = do_formals (macro, idx + 1, in);
- if (in->ptr[idx] != ')')
- return _("missing ) after formals");
+ if (idx < in->len && in->ptr[idx] == ')')
+ idx = sb_skip_white (idx + 1, in);
+ else if (!error)
+ error = _("missing `)' after formals in macro definition `%s'");
}
else
{
@@ -535,23 +690,39 @@ define_macro (int idx, sb *in, sb *label,
}
else
{
+ int cidx;
+
idx = get_token (idx, in, &name);
- idx = sb_skip_comma (idx, in);
- idx = do_formals (macro, idx, in);
+ macro->name = sb_terminate (&name);
+ if (name.len == 0)
+ error = _("Missing macro name");
+ cidx = sb_skip_white (idx, in);
+ idx = sb_skip_comma (cidx, in);
+ if (idx == cidx || idx < in->len)
+ idx = do_formals (macro, idx, in);
+ else
+ idx = cidx;
}
+ if (!error && idx < in->len)
+ error = _("Bad parameter list for macro `%s'");
/* And stick it in the macro hash table. */
for (idx = 0; idx < name.len; idx++)
name.ptr[idx] = TOLOWER (name.ptr[idx]);
- namestr = sb_terminate (&name);
- hash_jam (macro_hash, namestr, (PTR) macro);
-
- macro_defined = 1;
+ if (hash_find (macro_hash, macro->name))
+ error = _("Macro `%s' was already defined");
+ if (!error)
+ error = hash_jam (macro_hash, macro->name, (PTR) macro);
if (namep != NULL)
- *namep = namestr;
+ *namep = macro->name;
- return NULL;
+ if (!error)
+ macro_defined = 1;
+ else
+ free_macro (macro);
+
+ return error;
}
/* Scan a token, and then skip KIND. */
@@ -619,16 +790,16 @@ sub_actual (int start, sb *in, sb *t, struct hash_control *formal_hash,
static const char *
macro_expand_body (sb *in, sb *out, formal_entry *formals,
- struct hash_control *formal_hash, int locals)
+ struct hash_control *formal_hash, const macro_entry *macro)
{
sb t;
- int src = 0;
- int inquote = 0;
+ int src = 0, inquote = 0, macro_line = 0;
formal_entry *loclist = NULL;
+ const char *err = NULL;
sb_new (&t);
- while (src < in->len)
+ while (src < in->len && !err)
{
if (in->ptr[src] == '&')
{
@@ -643,13 +814,15 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
else
{
/* FIXME: Why do we do this? */
+ /* At least in alternate mode this seems correct; without this
+ one can't append a literal to a parameter. */
src = sub_actual (src + 1, in, &t, formal_hash, '&', out, 0);
}
}
else if (in->ptr[src] == '\\')
{
src++;
- if (in->ptr[src] == '(')
+ if (src < in->len && in->ptr[src] == '(')
{
/* Sub in till the next ')' literally. */
src++;
@@ -657,12 +830,14 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
{
sb_add_char (out, in->ptr[src++]);
}
- if (in->ptr[src] == ')')
+ if (src < in->len)
src++;
+ else if (!macro)
+ err = _("missing `)'");
else
- return _("missplaced )");
+ as_bad_where (macro->file, macro->line + macro_line, _("missing `)'"));
}
- else if (in->ptr[src] == '@')
+ else if (src < in->len && in->ptr[src] == '@')
{
/* Sub in the macro invocation number. */
@@ -671,7 +846,7 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
sprintf (buffer, "%d", macro_number);
sb_add_string (out, buffer);
}
- else if (in->ptr[src] == '&')
+ else if (src < in->len && in->ptr[src] == '&')
{
/* This is a preprocessor variable name, we don't do them
here. */
@@ -679,7 +854,7 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
sb_add_char (out, '&');
src++;
}
- else if (macro_mri && ISALNUM (in->ptr[src]))
+ else if (macro_mri && src < in->len && ISALNUM (in->ptr[src]))
{
int ind;
formal_entry *f;
@@ -710,14 +885,12 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
}
}
else if ((macro_alternate || macro_mri)
- && (ISALPHA (in->ptr[src])
- || in->ptr[src] == '_'
- || in->ptr[src] == '$')
+ && is_name_beginner (in->ptr[src])
&& (! inquote
|| ! macro_strip_at
|| (src > 0 && in->ptr[src - 1] == '@')))
{
- if (! locals
+ if (! macro
|| src + 5 >= in->len
|| strncasecmp (in->ptr + src, "LOCAL", 5) != 0
|| ! ISWHITE (in->ptr[src + 5]))
@@ -729,31 +902,38 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
}
else
{
- formal_entry *f;
-
src = sb_skip_white (src + 5, in);
while (in->ptr[src] != '\n')
{
- static int loccnt;
- char buf[20];
- const char *err;
-
- f = (formal_entry *) xmalloc (sizeof (formal_entry));
- sb_new (&f->name);
- sb_new (&f->def);
- sb_new (&f->actual);
- f->index = LOCAL_INDEX;
- f->next = loclist;
- loclist = f;
+ const char *name;
+ formal_entry *f = new_formal ();
src = get_token (src, in, &f->name);
- ++loccnt;
- sprintf (buf, "LL%04x", loccnt);
- sb_add_string (&f->actual, buf);
+ name = sb_terminate (&f->name);
+ if (! hash_find (formal_hash, name))
+ {
+ static int loccnt;
+ char buf[20];
- err = hash_jam (formal_hash, sb_terminate (&f->name), f);
- if (err != NULL)
- return err;
+ f->index = LOCAL_INDEX;
+ f->next = loclist;
+ loclist = f;
+
+ sprintf (buf, IS_ELF ? ".LL%04x" : "LL%04x", ++loccnt);
+ sb_add_string (&f->actual, buf);
+
+ err = hash_jam (formal_hash, name, f);
+ if (err != NULL)
+ break;
+ }
+ else
+ {
+ as_bad_where (macro->file,
+ macro->line + macro_line,
+ _("`%s' was already used as parameter (or another local) name"),
+ name);
+ del_formal (f);
+ }
src = sb_skip_comma (src, in);
}
@@ -813,6 +993,8 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
}
else
{
+ if (in->ptr[src] == '\n')
+ ++macro_line;
sb_add_char (out, in->ptr[src++]);
}
}
@@ -827,14 +1009,11 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
/* Setting the value to NULL effectively deletes the entry. We
avoid calling hash_delete because it doesn't reclaim memory. */
hash_jam (formal_hash, sb_terminate (&loclist->name), NULL);
- sb_kill (&loclist->name);
- sb_kill (&loclist->def);
- sb_kill (&loclist->actual);
- free (loclist);
+ del_formal (loclist);
loclist = f;
}
- return NULL;
+ return err;
}
/* Assign values to the formal parameters of a macro, and expand the
@@ -849,7 +1028,7 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
int is_positional = 0;
int is_keyword = 0;
int narg = 0;
- const char *err;
+ const char *err = NULL;
sb_new (&t);
@@ -873,18 +1052,14 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
&& in->ptr[idx] != ' '
&& in->ptr[idx] != '\t')
{
- formal_entry *n;
+ formal_entry *n = new_formal ();
- n = (formal_entry *) xmalloc (sizeof (formal_entry));
- sb_new (&n->name);
- sb_new (&n->def);
- sb_new (&n->actual);
n->index = QUAL_INDEX;
n->next = m->formals;
m->formals = n;
- idx = get_any_string (idx, in, &n->actual, 1, 0);
+ idx = get_any_string (idx, in, &n->actual);
}
}
}
@@ -913,17 +1088,28 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
sb_reset (&t);
idx = get_token (idx, in, &t);
if (in->ptr[idx] != '=')
- return _("confusion in formal parameters");
+ {
+ err = _("confusion in formal parameters");
+ break;
+ }
/* Lookup the formal in the macro's list. */
ptr = (formal_entry *) hash_find (m->formal_hash, sb_terminate (&t));
if (!ptr)
- return _("macro formal argument does not exist");
+ as_bad (_("Parameter named `%s' does not exist for macro `%s'"),
+ t.ptr,
+ m->name);
else
{
/* Insert this value into the right place. */
- sb_reset (&ptr->actual);
- idx = get_any_string (idx + 1, in, &ptr->actual, 0, 0);
+ if (ptr->actual.len)
+ {
+ as_warn (_("Value for parameter `%s' of macro `%s' was already specified"),
+ ptr->name.ptr,
+ m->name);
+ sb_reset (&ptr->actual);
+ }
+ idx = get_any_string (idx + 1, in, &ptr->actual);
if (ptr->actual.len > 0)
++narg;
}
@@ -933,7 +1119,10 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
/* This is a positional arg. */
is_positional = 1;
if (is_keyword)
- return _("can't mix positional and keyword arguments");
+ {
+ err = _("can't mix positional and keyword arguments");
+ break;
+ }
if (!f)
{
@@ -941,13 +1130,12 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
int c;
if (!macro_mri)
- return _("too many positional arguments");
+ {
+ err = _("too many positional arguments");
+ break;
+ }
- f = (formal_entry *) xmalloc (sizeof (formal_entry));
- sb_new (&f->name);
- sb_new (&f->def);
- sb_new (&f->actual);
- f->next = NULL;
+ f = new_formal ();
c = -1;
for (pf = &m->formals; *pf != NULL; pf = &(*pf)->next)
@@ -959,8 +1147,13 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
f->index = c;
}
- sb_reset (&f->actual);
- idx = get_any_string (idx, in, &f->actual, 1, 0);
+ if (f->type != FORMAL_VARARG)
+ idx = get_any_string (idx, in, &f->actual);
+ else
+ {
+ sb_add_buffer (&f->actual, in->ptr + idx, in->len - idx);
+ idx = in->len;
+ }
if (f->actual.len > 0)
++narg;
do
@@ -981,21 +1174,29 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
}
}
- if (macro_mri)
+ if (! err)
{
- char buffer[20];
-
- sb_reset (&t);
- sb_add_string (&t, macro_strip_at ? "$NARG" : "NARG");
- ptr = (formal_entry *) hash_find (m->formal_hash, sb_terminate (&t));
- sb_reset (&ptr->actual);
- sprintf (buffer, "%d", narg);
- sb_add_string (&ptr->actual, buffer);
- }
+ for (ptr = m->formals; ptr; ptr = ptr->next)
+ {
+ if (ptr->type == FORMAL_REQUIRED && ptr->actual.len == 0)
+ as_bad (_("Missing value for required parameter `%s' of macro `%s'"),
+ ptr->name.ptr,
+ m->name);
+ }
- err = macro_expand_body (&m->sub, out, m->formals, m->formal_hash, 1);
- if (err != NULL)
- return err;
+ if (macro_mri)
+ {
+ char buffer[20];
+
+ sb_reset (&t);
+ sb_add_string (&t, macro_strip_at ? "$NARG" : "NARG");
+ ptr = (formal_entry *) hash_find (m->formal_hash, sb_terminate (&t));
+ sprintf (buffer, "%d", narg);
+ sb_add_string (&ptr->actual, buffer);
+ }
+
+ err = macro_expand_body (&m->sub, out, m->formals, m->formal_hash, m);
+ }
/* Discard any unnamed formal arguments. */
if (macro_mri)
@@ -1009,20 +1210,18 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
pf = &(*pf)->next;
else
{
- sb_kill (&(*pf)->name);
- sb_kill (&(*pf)->def);
- sb_kill (&(*pf)->actual);
f = (*pf)->next;
- free (*pf);
+ del_formal (*pf);
*pf = f;
}
}
}
sb_kill (&t);
- macro_number++;
+ if (!err)
+ macro_number++;
- return NULL;
+ return err;
}
/* Check for a macro. If one is found, put the expansion into
@@ -1037,16 +1236,14 @@ check_macro (const char *line, sb *expand,
macro_entry *macro;
sb line_sb;
- if (! ISALPHA (*line)
- && *line != '_'
- && *line != '$'
+ if (! is_name_beginner (*line)
&& (! macro_mri || *line != '.'))
return 0;
s = line + 1;
- while (ISALNUM (*s)
- || *s == '_'
- || *s == '$')
+ while (is_part_of_name (*s))
+ ++s;
+ if (is_name_ender (*s))
++s;
copy = (char *) alloca (s - line + 1);
@@ -1077,12 +1274,49 @@ check_macro (const char *line, sb *expand,
return 1;
}
+/* Free the memory allocated to a macro. */
+
+static void
+free_macro(macro_entry *macro)
+{
+ formal_entry *formal;
+
+ for (formal = macro->formals; formal; )
+ {
+ formal_entry *f;
+
+ f = formal;
+ formal = formal->next;
+ del_formal (f);
+ }
+ hash_die (macro->formal_hash);
+ sb_kill (&macro->sub);
+ free (macro);
+}
+
/* Delete a macro. */
void
delete_macro (const char *name)
{
- hash_delete (macro_hash, name);
+ char *copy;
+ size_t i, len;
+ macro_entry *macro;
+
+ len = strlen (name);
+ copy = (char *) alloca (len + 1);
+ for (i = 0; i < len; ++i)
+ copy[i] = TOLOWER (name[i]);
+ copy[i] = '\0';
+
+ /* Since hash_delete doesn't free memory, just clear out the entry. */
+ if ((macro = hash_find (macro_hash, copy)) != NULL)
+ {
+ hash_jam (macro_hash, copy, NULL);
+ free_macro (macro);
+ }
+ else
+ as_warn (_("Attempt to purge non-existant macro `%s'"), copy);
}
/* Handle the MRI IRP and IRPC pseudo-ops. These are handled as a
@@ -1092,21 +1326,15 @@ delete_macro (const char *name)
const char *
expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
{
- const char *mn;
sb sub;
formal_entry f;
struct hash_control *h;
const char *err;
- if (irpc)
- mn = "IRPC";
- else
- mn = "IRP";
-
idx = sb_skip_white (idx, in);
sb_new (&sub);
- if (! buffer_and_nest (mn, "ENDR", &sub, get_line))
+ if (! buffer_and_nest (NULL, "ENDR", &sub, get_line))
return _("unexpected end of file in irp or irpc");
sb_new (&f.name);
@@ -1124,6 +1352,7 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
f.index = 1;
f.next = NULL;
+ f.type = FORMAL_OPTIONAL;
sb_reset (out);
@@ -1132,8 +1361,6 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
{
/* Expand once with a null string. */
err = macro_expand_body (&sub, out, &f, h, 0);
- if (err != NULL)
- return err;
}
else
{
@@ -1142,7 +1369,7 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
while (idx < in->len)
{
if (!irpc)
- idx = get_any_string (idx, in, &f.actual, 1, 0);
+ idx = get_any_string (idx, in, &f.actual);
else
{
if (in->ptr[idx] == '"')
@@ -1162,7 +1389,7 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
}
err = macro_expand_body (&sub, out, &f, h, 0);
if (err != NULL)
- return err;
+ break;
if (!irpc)
idx = sb_skip_comma (idx, in);
else
@@ -1171,7 +1398,10 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
}
hash_die (h);
+ sb_kill (&f.actual);
+ sb_kill (&f.def);
+ sb_kill (&f.name);
sb_kill (&sub);
- return NULL;
+ return err;
}
diff --git a/contrib/binutils/gas/macro.h b/contrib/binutils/gas/macro.h
index a8bffaa0efc7..4fdaa52d0974 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
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
@@ -19,8 +19,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef MACRO_H
@@ -45,6 +45,12 @@ typedef struct formal_struct {
sb def; /* The default value. */
sb actual; /* The actual argument (changed on each expansion). */
int index; /* The index of the formal 0..formal_count - 1. */
+ enum formal_type
+ {
+ FORMAL_OPTIONAL,
+ FORMAL_REQUIRED,
+ FORMAL_VARARG
+ } type; /* The kind of the formal. */
} formal_entry;
/* Other values found in the index field of a formal_entry. */
@@ -60,6 +66,9 @@ typedef struct macro_struct
int formal_count; /* Number of formal args. */
formal_entry *formals; /* Pointer to list of formal_structs. */
struct hash_control *formal_hash; /* Hash table of formals. */
+ const char *name; /* Macro name. */
+ char *file; /* File the macro was defined in. */
+ unsigned int line; /* Line number of definition. */
} macro_entry;
/* Whether any macros have been defined. */
@@ -70,12 +79,17 @@ extern int macro_defined;
extern int macro_nest;
+/* The macro hash table. */
+
+extern struct hash_control *macro_hash;
+
extern int buffer_and_nest (const char *, const char *, sb *, int (*) (sb *));
extern void macro_init
(int, int, int, int (*) (const char *, int, sb *, int *));
+extern void macro_set_alternate (int);
extern void macro_mri_mode (int);
extern const char *define_macro
- (int, sb *, sb *, int (*) (sb *), const char **);
+ (int, sb *, sb *, int (*) (sb *), char *, unsigned int, const char **);
extern int check_macro (const char *, sb *, const char **, macro_entry **);
extern void delete_macro (const char *);
extern const char *expand_irp (int, int, sb *, sb *, int (*) (sb *));
diff --git a/contrib/binutils/gas/messages.c b/contrib/binutils/gas/messages.c
index 005cd22d417b..b1b94cdf7c6e 100644
--- a/contrib/binutils/gas/messages.c
+++ b/contrib/binutils/gas/messages.c
@@ -1,5 +1,6 @@
/* messages.c - error reporter -
- Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, 2003
+ Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
+ 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -15,33 +16,11 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "as.h"
-#include <stdio.h>
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
-#ifdef USE_STDARG
-#include <stdarg.h>
-#endif
-
-#ifdef USE_VARARGS
-#include <varargs.h>
-#endif
-
-#if !defined (USE_STDARG) && !defined (USE_VARARGS)
-/* Roll our own. */
-#define va_alist REST
-#define va_dcl
-typedef int * va_list;
-#define va_start(ARGS) ARGS = &REST
-#define va_end(ARGS)
-#endif
-
static void identify (char *);
static void as_show_where (void);
static void as_warn_internal (char *, unsigned int, char *);
@@ -149,16 +128,10 @@ as_perror (const char *gripe, /* Unpunctuated error theme. */
as_show_where ();
fprintf (stderr, gripe, filename);
errno = saved_errno;
-#ifdef BFD_ASSEMBLER
errtxt = bfd_errmsg (bfd_get_error ());
-#else
- errtxt = xstrerror (errno);
-#endif
fprintf (stderr, ": %s\n", errtxt);
errno = 0;
-#ifdef BFD_ASSEMBLER
bfd_set_error (bfd_error_no_error);
-#endif
}
/* Send to stderr a string as a warning, and locate warning
@@ -232,7 +205,7 @@ as_warn (const char *format, ...)
if (!flag_no_warnings)
{
va_start (args, format);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_warn_internal ((char *) NULL, 0, buffer);
}
@@ -249,7 +222,7 @@ as_warn (format, va_alist)
if (!flag_no_warnings)
{
va_start (args);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_warn_internal ((char *) NULL, 0, buffer);
}
@@ -270,7 +243,7 @@ as_warn_where (char *file, unsigned int line, const char *format, ...)
if (!flag_no_warnings)
{
va_start (args, format);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_warn_internal (file, line, buffer);
}
@@ -289,7 +262,7 @@ as_warn_where (file, line, format, va_alist)
if (!flag_no_warnings)
{
va_start (args);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_warn_internal (file, line, buffer);
}
@@ -331,7 +304,7 @@ as_bad (const char *format, ...)
char buffer[2000];
va_start (args, format);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_bad_internal ((char *) NULL, 0, buffer);
@@ -347,7 +320,7 @@ as_bad (format, va_alist)
char buffer[2000];
va_start (args);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_bad_internal ((char *) NULL, 0, buffer);
@@ -366,7 +339,7 @@ as_bad_where (char *file, unsigned int line, const char *format, ...)
char buffer[2000];
va_start (args, format);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_bad_internal (file, line, buffer);
@@ -384,7 +357,7 @@ as_bad_where (file, line, format, va_alist)
char buffer[2000];
va_start (args);
- vsprintf (buffer, format, args);
+ vsnprintf (buffer, sizeof (buffer), format, args);
va_end (args);
as_bad_internal (file, line, buffer);
@@ -411,7 +384,7 @@ as_fatal (const char *format, ...)
/* Delete the output file, if it exists. This will prevent make from
thinking that a file was created and hence does not need rebuilding. */
if (out_file_name != NULL)
- unlink (out_file_name);
+ unlink_if_ordinary (out_file_name);
xexit (EXIT_FAILURE);
}
#else
@@ -469,37 +442,96 @@ as_abort (const char *file, int line, const char *fn)
/* Support routines. */
void
-fprint_value (FILE *file, valueT val)
+sprint_value (char *buf, valueT val)
{
if (sizeof (val) <= sizeof (long))
{
- fprintf (file, "%ld", (long) val);
+ sprintf (buf, "%ld", (long) val);
return;
}
-#ifdef BFD_ASSEMBLER
if (sizeof (val) <= sizeof (bfd_vma))
{
- fprintf_vma (file, val);
+ sprintf_vma (buf, val);
return;
}
-#endif
abort ();
}
-void
-sprint_value (char *buf, valueT val)
+#define HEX_MAX_THRESHOLD 1024
+#define HEX_MIN_THRESHOLD -(HEX_MAX_THRESHOLD)
+
+static void
+as_internal_value_out_of_range (char * prefix,
+ offsetT val,
+ offsetT min,
+ offsetT max,
+ char * file,
+ unsigned line,
+ int bad)
{
- if (sizeof (val) <= sizeof (long))
+ const char * err;
+
+ if (prefix == NULL)
+ prefix = "";
+
+ if ( val < HEX_MAX_THRESHOLD
+ && min < HEX_MAX_THRESHOLD
+ && max < HEX_MAX_THRESHOLD
+ && val > HEX_MIN_THRESHOLD
+ && min > HEX_MIN_THRESHOLD
+ && max > HEX_MIN_THRESHOLD)
{
- sprintf (buf, "%ld", (long) val);
- return;
+ /* xgettext:c-format */
+ err = _("%s out of range (%d is not between %d and %d)");
+
+ if (bad)
+ as_bad_where (file, line, err,
+ prefix, (int) val, (int) min, (int) max);
+ else
+ as_warn_where (file, line, err,
+ prefix, (int) val, (int) min, (int) max);
}
-#ifdef BFD_ASSEMBLER
- if (sizeof (val) <= sizeof (bfd_vma))
+ else
{
- sprintf_vma (buf, val);
- return;
+ char val_buf [sizeof (val) * 3 + 2];
+ char min_buf [sizeof (val) * 3 + 2];
+ char max_buf [sizeof (val) * 3 + 2];
+
+ if (sizeof (val) > sizeof (bfd_vma))
+ abort ();
+
+ sprintf_vma (val_buf, val);
+ sprintf_vma (min_buf, min);
+ sprintf_vma (max_buf, max);
+
+ /* xgettext:c-format. */
+ err = _("%s out of range (0x%s is not between 0x%s and 0x%s)");
+
+ if (bad)
+ as_bad_where (file, line, err, prefix, val_buf, min_buf, max_buf);
+ else
+ as_warn_where (file, line, err, prefix, val_buf, min_buf, max_buf);
}
-#endif
- abort ();
+}
+
+void
+as_warn_value_out_of_range (char * prefix,
+ offsetT value,
+ offsetT min,
+ offsetT max,
+ char * file,
+ unsigned line)
+{
+ as_internal_value_out_of_range (prefix, value, min, max, file, line, 0);
+}
+
+void
+as_bad_value_out_of_range (char * prefix,
+ offsetT value,
+ offsetT min,
+ offsetT max,
+ char * file,
+ unsigned line)
+{
+ as_internal_value_out_of_range (prefix, value, min, max, file, line, 1);
}
diff --git a/contrib/binutils/gas/obj.h b/contrib/binutils/gas/obj.h
index 497524ac04e9..0cceab066fcd 100644
--- a/contrib/binutils/gas/obj.h
+++ b/contrib/binutils/gas/obj.h
@@ -1,8 +1,8 @@
/* obj.h - defines the object dependent hooks for all object
format backends.
- Copyright 1987, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2002
- Free Software Foundation, Inc.
+ Copyright 1987, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999, 2000,
+ 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
char *obj_default_output_file_name (void);
void obj_emit_relocations (char **where, fixS * fixP,
@@ -29,13 +29,6 @@ void obj_emit_symbols (char **where, symbolS * symbols);
#ifndef obj_read_begin_hook
void obj_read_begin_hook (void);
#endif
-#ifndef BFD_ASSEMBLER
-void obj_crawl_symbol_chain (object_headers * headers);
-void obj_header_append (char **where, object_headers * headers);
-#ifndef obj_pre_write_hook
-void obj_pre_write_hook (object_headers * headers);
-#endif
-#endif
#ifndef obj_symbol_new_hook
void obj_symbol_new_hook (symbolS * symbolP);
@@ -45,13 +38,12 @@ void obj_symbol_to_chars (char **where, symbolS * symbolP);
extern const pseudo_typeS obj_pseudo_table[];
-#ifdef BFD_ASSEMBLER
struct format_ops {
int flavor;
unsigned dfl_leading_underscore : 1;
unsigned emit_section_symbols : 1;
void (*begin) (void);
- void (*app_file) (const char *);
+ void (*app_file) (const char *, int);
void (*frob_symbol) (symbolS *, int *);
void (*frob_file) (void);
void (*frob_file_before_adjust) (void);
@@ -89,6 +81,5 @@ extern const struct format_ops aout_format_ops;
#ifndef this_format
COMMON const struct format_ops *this_format;
#endif
-#endif
/* end of obj.h */
diff --git a/contrib/binutils/gas/output-file.c b/contrib/binutils/gas/output-file.c
index 4c376b4dcc4b..f94359ab6b0a 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
- Free Software Foundation, Inc.
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2001,
+ 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <stdio.h>
@@ -25,18 +25,10 @@
#include "output-file.h"
-#ifdef BFD_HEADERS
-#define USE_BFD
-#endif
-
-#ifdef BFD_ASSEMBLER
-#define USE_BFD
#ifndef TARGET_MACH
#define TARGET_MACH 0
#endif
-#endif
-#ifdef USE_BFD
#include "bfd.h"
bfd *stdoutput;
@@ -48,14 +40,15 @@ output_file_create (char *name)
else if (!(stdoutput = bfd_openw (name, TARGET_FORMAT)))
{
- as_perror (_("FATAL: can't create %s"), name);
+ if (bfd_get_error () == bfd_error_invalid_target)
+ as_perror (_("Selected target format '%s' unknown"), TARGET_FORMAT);
+ else
+ as_perror (_("FATAL: can't create %s"), name);
exit (EXIT_FAILURE);
}
bfd_set_format (stdoutput, bfd_object);
-#ifdef BFD_ASSEMBLER
bfd_set_arch_mach (stdoutput, TARGET_ARCH, TARGET_MACH);
-#endif
if (flag_traditional_format)
stdoutput->flags |= BFD_TRADITIONAL_FORMAT;
}
@@ -63,7 +56,6 @@ output_file_create (char *name)
void
output_file_close (char *filename)
{
-#ifdef BFD_ASSEMBLER
/* Close the bfd. */
if (bfd_close (stdoutput) == 0)
{
@@ -71,84 +63,5 @@ output_file_close (char *filename)
as_perror (_("FATAL: can't close %s\n"), filename);
exit (EXIT_FAILURE);
}
-#else
- /* Close the bfd without getting bfd to write out anything by itself. */
- if (bfd_close_all_done (stdoutput) == 0)
- {
- as_perror (_("FATAL: can't close %s\n"), filename);
- exit (EXIT_FAILURE);
- }
-#endif
stdoutput = NULL; /* Trust nobody! */
}
-
-#ifndef BFD_ASSEMBLER
-void
-output_file_append (char *where ATTRIBUTE_UNUSED,
- long length ATTRIBUTE_UNUSED,
- char *filename ATTRIBUTE_UNUSED)
-{
- abort ();
-}
-#endif
-
-#else
-
-static FILE *stdoutput;
-
-void
-output_file_create (char *name)
-{
- if (name[0] == '-' && name[1] == '\0')
- {
- stdoutput = stdout;
- return;
- }
-
- stdoutput = fopen (name, FOPEN_WB);
- if (stdoutput == NULL)
- {
-#ifdef BFD_ASSEMBLER
- bfd_set_error (bfd_error_system_call);
-#endif
- as_perror (_("FATAL: can't create %s"), name);
- exit (EXIT_FAILURE);
- }
-}
-
-void
-output_file_close (char *filename)
-{
- if (EOF == fclose (stdoutput))
- {
-#ifdef BFD_ASSEMBLER
- bfd_set_error (bfd_error_system_call);
-#endif
- as_perror (_("FATAL: can't close %s"), filename);
- exit (EXIT_FAILURE);
- }
-
- /* Trust nobody! */
- stdoutput = NULL;
-}
-
-void
-output_file_append (char * where, long length, char * filename)
-{
- for (; length; length--, where++)
- {
- (void) putc (*where, stdoutput);
-
- if (ferror (stdoutput))
- {
-#ifdef BFD_ASSEMBLER
- bfd_set_error (bfd_error_system_call);
-#endif
- as_perror (_("Failed to emit an object byte"), filename);
- as_fatal (_("can't continue"));
- }
- }
-}
-
-#endif
-
diff --git a/contrib/binutils/gas/output-file.h b/contrib/binutils/gas/output-file.h
index 6779e4b40496..137115d5049f 100644
--- a/contrib/binutils/gas/output-file.h
+++ b/contrib/binutils/gas/output-file.h
@@ -1,6 +1,6 @@
/* This file is output-file.h
- Copyright 1987, 1988, 1989, 1990, 1991, 1992
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2003
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
void output_file_append (char *where, long length, char *filename);
void output_file_close (char *filename);
diff --git a/contrib/binutils/gas/po/Make-in b/contrib/binutils/gas/po/Make-in
index 6176dbf78c3c..be09b4cd788b 100644
--- a/contrib/binutils/gas/po/Make-in
+++ b/contrib/binutils/gas/po/Make-in
@@ -1,7 +1,8 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright 2003, 2006 Free Software Foundation, Inc.
#
-# This file file be copied and used freely without restrictions. It can
+# This file may be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
@@ -109,6 +110,7 @@ $(srcdir)/stamp-cat-id: $(PACKAGE).pot
install: install-exec install-data
install-exec:
install-info:
+install-html:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
@@ -184,7 +186,7 @@ check: all
cat-id-tbl.o: ../intl/libgettext.h
-dvi info tags TAGS ID:
+html dvi pdf ps info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
diff --git a/contrib/binutils/gas/po/POTFILES.in b/contrib/binutils/gas/po/POTFILES.in
index e4e3e4ea6aa7..3a173a536ff3 100644
--- a/contrib/binutils/gas/po/POTFILES.in
+++ b/contrib/binutils/gas/po/POTFILES.in
@@ -1,18 +1,12 @@
app.c
-app.c
-as.c
as.c
as.h
asintl.h
atof-generic.c
-atof-generic.c
-bignum-copy.c
-bignum-copy.c
bignum.h
bit_fix.h
cgen.h
cond.c
-cond.c
config/e-crisaout.c
config/e-criself.c
config/e-i386aout.c
@@ -22,8 +16,6 @@ config/e-mipsecoff.c
config/e-mipself.c
config/obj-aout.c
config/obj-aout.h
-config/obj-bout.c
-config/obj-bout.h
config/obj-coff.c
config/obj-coff.h
config/obj-ecoff.c
@@ -32,16 +24,10 @@ config/obj-elf.c
config/obj-elf.h
config/obj-evax.c
config/obj-evax.h
-config/obj-hp300.c
-config/obj-hp300.h
config/obj-ieee.c
config/obj-ieee.h
config/obj-som.c
config/obj-som.h
-config/obj-vms.c
-config/obj-vms.h
-config/tc-a29k.c
-config/tc-a29k.h
config/tc-alpha.c
config/tc-alpha.h
config/tc-arc.c
@@ -50,8 +36,12 @@ config/tc-arm.c
config/tc-arm.h
config/tc-avr.c
config/tc-avr.h
+config/tc-bfin.c
+config/tc-bfin.h
config/tc-cris.c
config/tc-cris.h
+config/tc-crx.c
+config/tc-crx.h
config/tc-d10v.c
config/tc-d10v.h
config/tc-d30v.c
@@ -64,8 +54,6 @@ config/tc-frv.c
config/tc-frv.h
config/tc-h8300.c
config/tc-h8300.h
-config/tc-h8500.c
-config/tc-h8500.h
config/tc-hppa.c
config/tc-hppa.h
config/tc-i370.c
@@ -80,14 +68,14 @@ config/tc-ia64.c
config/tc-ia64.h
config/tc-ip2k.c
config/tc-ip2k.h
+config/tc-m32c.c
+config/tc-m32c.h
config/tc-m32r.c
config/tc-m32r.h
config/tc-m68hc11.c
config/tc-m68hc11.h
config/tc-m68k.c
config/tc-m68k.h
-config/tc-m88k.c
-config/tc-m88k.h
config/tc-mcore.c
config/tc-mcore.h
config/tc-mips.c
@@ -120,94 +108,69 @@ config/tc-sh.c
config/tc-sh.h
config/tc-sparc.c
config/tc-sparc.h
-config/tc-tahoe.c
-config/tc-tahoe.h
config/tc-tic30.c
config/tc-tic30.h
config/tc-tic54x.c
config/tc-tic54x.h
-config/tc-tic80.c
-config/tc-tic80.h
config/tc-v850.c
config/tc-v850.h
config/tc-vax.c
config/tc-vax.h
-config/tc-w65.c
-config/tc-w65.h
+config/tc-xc16x.c
+config/tc-xc16x.h
config/tc-xstormy16.c
config/tc-xstormy16.h
config/tc-xtensa.c
config/tc-xtensa.h
+config/tc-z80.c
+config/tc-z80.h
config/tc-z8k.c
config/tc-z8k.h
depend.c
-depend.c
-dw2gencfi.c
dw2gencfi.c
dw2gencfi.h
dwarf2dbg.c
-dwarf2dbg.c
dwarf2dbg.h
ecoff.c
-ecoff.c
ecoff.h
ehopt.c
-ehopt.c
emul.h
emul-target.h
expr.c
-expr.c
expr.h
flonum-copy.c
-flonum-copy.c
flonum.h
flonum-konst.c
-flonum-konst.c
-flonum-mult.c
flonum-mult.c
frags.c
-frags.c
frags.h
hash.c
-hash.c
hash.h
input-file.c
-input-file.c
input-file.h
input-scrub.c
-input-scrub.c
+itbl-lex.h
itbl-ops.c
itbl-ops.h
listing.c
-listing.c
listing.h
literal.c
-literal.c
-macro.c
macro.c
macro.h
messages.c
-messages.c
obj.h
output-file.c
-output-file.c
output-file.h
read.c
-read.c
read.h
sb.c
-sb.c
sb.h
stabs.c
-stabs.c
struc-symbol.h
subsegs.c
-subsegs.c
subsegs.h
symbols.c
-symbols.c
symbols.h
tc.h
write.c
-write.c
write.h
diff --git a/contrib/binutils/gas/po/gas.pot b/contrib/binutils/gas/po/gas.pot
index ae3cbabd833d..122a678aa4a0 100644
--- a/contrib/binutils/gas/po/gas.pot
+++ b/contrib/binutils/gas/po/gas.pot
@@ -1,12 +1,14 @@
# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-07-17 14:56+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-10-25 08:41+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"
@@ -14,72 +16,65 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: app.c:474 app.c:488
+#: app.c:470 app.c:484
msgid "end of file in comment"
msgstr ""
-#: app.c:567
-msgid "end of file in string; inserted '\"'"
-msgstr ""
-
-#: app.c:612
-msgid "end of file in string; '\"' inserted"
+#: app.c:560 app.c:605
+#, c-format
+msgid "end of file in string; '%c' inserted"
msgstr ""
-#: app.c:638
+#: app.c:631
#, c-format
msgid "unknown escape '\\%c' in string; ignored"
msgstr ""
-#: app.c:790
+#: app.c:786
msgid "end of file not at end of a line; newline inserted"
msgstr ""
-#: app.c:949
+#: app.c:945
msgid "end of file in multiline comment"
msgstr ""
-#: app.c:1013
+#: app.c:1010
msgid "end of file after a one-character quote; \\0 inserted"
msgstr ""
-#: app.c:1021
+#: app.c:1018
msgid "end of file in escape character"
msgstr ""
-#: app.c:1033
+#: app.c:1030
msgid "missing close quote; (assumed)"
msgstr ""
-#: app.c:1101 app.c:1155 app.c:1166 app.c:1231
+#: app.c:1098 app.c:1152 app.c:1163 app.c:1228
msgid "end of file in comment; newline inserted"
msgstr ""
-#: as.c:160
+#: as.c:161
msgid "missing emulation mode name"
msgstr ""
-#: as.c:175
+#: as.c:176
#, c-format
msgid "unrecognized emulation name `%s'"
msgstr ""
-#: as.c:222
-#, c-format
-msgid "GNU assembler version %s (%s) using BFD version %s"
-msgstr ""
-
-#: as.c:225
+#: as.c:223
#, c-format
-msgid "GNU assembler version %s (%s)"
+msgid "GNU assembler version %s (%s) using BFD version %s\n"
msgstr ""
-#: as.c:234
+#: as.c:230
#, c-format
msgid "Usage: %s [option...] [asmfile...]\n"
msgstr ""
-#: as.c:236
+#: as.c:232
+#, c-format
msgid ""
"Options:\n"
" -a[sub-option...]\t turn on listings\n"
@@ -94,148 +89,208 @@ msgid ""
" \t =FILE list to FILE (must be last sub-option)\n"
msgstr ""
-#: as.c:249
+#: as.c:245
+#, c-format
+msgid " --alternate initially turn on alternate macro syntax\n"
+msgstr ""
+
+#: as.c:247
+#, c-format
msgid " -D produce assembler debugging messages\n"
msgstr ""
-#: as.c:251
+#: as.c:249
+#, c-format
msgid " --defsym SYM=VAL define symbol SYM to given value\n"
msgstr ""
-#: as.c:267
+#: as.c:265
#, c-format
msgid " emulate output (default %s)\n"
msgstr ""
-#: as.c:272
+#: as.c:270
+#, c-format
msgid " --execstack require executable stack for this object\n"
msgstr ""
-#: as.c:274
+#: as.c:272
+#, c-format
msgid ""
" --noexecstack don't require executable stack for this object\n"
msgstr ""
-#: as.c:277
+#: as.c:275
+#, c-format
msgid " -f skip whitespace and comment preprocessing\n"
msgstr ""
+#: as.c:277
+#, c-format
+msgid " -g --gen-debug generate debugging information\n"
+msgstr ""
+
#: as.c:279
-msgid " --gstabs generate stabs debugging information\n"
+#, c-format
+msgid " --gstabs generate STABS debugging information\n"
msgstr ""
#: as.c:281
-msgid " --gdwarf2 generate DWARF2 debugging information\n"
+#, c-format
+msgid ""
+" --gstabs+ generate STABS debug info with GNU extensions\n"
msgstr ""
#: as.c:283
-msgid " --help show this message and exit\n"
+#, c-format
+msgid " --gdwarf-2 generate DWARF2 debugging information\n"
msgstr ""
#: as.c:285
-msgid " --target-help show target specific options\n"
+#, c-format
+msgid " --hash-size=<value> set the hash table size close to <value>\n"
msgstr ""
#: as.c:287
+#, c-format
+msgid " --help show this message and exit\n"
+msgstr ""
+
+#: as.c:289
+#, c-format
+msgid " --target-help show target specific options\n"
+msgstr ""
+
+#: as.c:291
+#, c-format
msgid ""
" -I DIR add DIR to search list for .include directives\n"
msgstr ""
-#: as.c:289
+#: as.c:293
+#, c-format
msgid " -J don't warn about signed overflow\n"
msgstr ""
-#: as.c:291
+#: as.c:295
+#, c-format
msgid ""
" -K warn when differences altered for long "
"displacements\n"
msgstr ""
-#: as.c:293
+#: as.c:297
+#, c-format
msgid " -L,--keep-locals keep local symbols (e.g. starting with `L')\n"
msgstr ""
-#: as.c:295
+#: as.c:299
+#, c-format
msgid " -M,--mri assemble in MRI compatibility mode\n"
msgstr ""
-#: as.c:297
+#: as.c:301
+#, c-format
msgid ""
" --MD FILE write dependency information in FILE (default "
"none)\n"
msgstr ""
-#: as.c:299
+#: as.c:303
+#, c-format
msgid " -nocpp ignored\n"
msgstr ""
-#: as.c:301
+#: as.c:305
+#, c-format
msgid ""
" -o OBJFILE name the object-file output OBJFILE (default a."
"out)\n"
msgstr ""
-#: as.c:303
+#: as.c:307
+#, c-format
msgid " -R fold data section into text section\n"
msgstr ""
-#: as.c:305
+#: as.c:309
+#, c-format
+msgid ""
+" --reduce-memory-overheads \n"
+" prefer smaller memory use at the cost of longer\n"
+" assembly times\n"
+msgstr ""
+
+#: as.c:313
+#, c-format
msgid ""
" --statistics print various measured statistics from execution\n"
msgstr ""
-#: as.c:307
+#: as.c:315
+#, c-format
msgid " --strip-local-absolute strip local absolute symbols\n"
msgstr ""
-#: as.c:309
+#: as.c:317
+#, c-format
msgid ""
" --traditional-format Use same format as native assembler when possible\n"
msgstr ""
-#: as.c:311
+#: as.c:319
+#, c-format
msgid " --version print assembler version number and exit\n"
msgstr ""
-#: as.c:313
+#: as.c:321
+#, c-format
msgid " -W --no-warn suppress warnings\n"
msgstr ""
-#: as.c:315
+#: as.c:323
+#, c-format
msgid " --warn don't suppress warnings\n"
msgstr ""
-#: as.c:317
+#: as.c:325
+#, c-format
msgid " --fatal-warnings treat warnings as errors\n"
msgstr ""
-#: as.c:319
+#: as.c:327
+#, c-format
msgid ""
" --itbl INSTTBL extend instruction set to include instructions\n"
" matching the specifications defined in file "
"INSTTBL\n"
msgstr ""
-#: as.c:322
+#: as.c:330
+#, c-format
msgid " -w ignored\n"
msgstr ""
-#: as.c:324
+#: as.c:332
+#, c-format
msgid " -X ignored\n"
msgstr ""
-#: as.c:326
+#: as.c:334
+#, c-format
msgid " -Z generate object file even after errors\n"
msgstr ""
-#: as.c:328
+#: as.c:336
+#, c-format
msgid ""
" --listing-lhs-width set the width in words of the output data column "
"of\n"
" the listing\n"
msgstr ""
-#: as.c:331
+#: as.c:339
+#, c-format
msgid ""
" --listing-lhs-width2 set the width in words of the continuation lines\n"
" of the output data column; ignored if smaller "
@@ -243,110 +298,124 @@ msgid ""
" the width of the first line\n"
msgstr ""
-#: as.c:335
+#: as.c:343
+#, c-format
msgid ""
" --listing-rhs-width set the max width in characters of the lines from\n"
" the source file\n"
msgstr ""
-#: as.c:338
+#: as.c:346
+#, 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:345
+#: as.c:353
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: as.c:557 as.c:559
+#: as.c:553
+#, c-format
+msgid "unrecognized option -%c%s"
+msgstr ""
+
+#. This output is intended to follow the GNU standards document.
+#: as.c:591
#, c-format
msgid "GNU assembler %s\n"
msgstr ""
-#: as.c:561
-msgid "Copyright 2002 Free Software Foundation, Inc.\n"
+#: as.c:592
+#, c-format
+msgid "Copyright 2005 Free Software Foundation, Inc.\n"
msgstr ""
-#: as.c:562
+#: as.c:593
+#, 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:565
+#: as.c:596
#, c-format
msgid "This assembler was configured for a target of `%s'.\n"
msgstr ""
-#: as.c:572
+#: as.c:603
msgid "multiple emulation names specified"
msgstr ""
-#: as.c:574
+#: as.c:605
msgid "emulations not handled in this configuration"
msgstr ""
-#: as.c:579
+#: as.c:610
#, c-format
msgid "alias = %s\n"
msgstr ""
-#: as.c:580
+#: as.c:611
#, c-format
msgid "canonical = %s\n"
msgstr ""
-#: as.c:581
+#: as.c:612
#, c-format
msgid "cpu-type = %s\n"
msgstr ""
-#: as.c:583
+#: as.c:614
#, c-format
msgid "format = %s\n"
msgstr ""
-#: as.c:586
+#: as.c:617
#, c-format
msgid "bfd-target = %s\n"
msgstr ""
-#: as.c:599
+#: as.c:630
msgid "bad defsym; format is --defsym name=value"
msgstr ""
-#: as.c:623
+#: as.c:650
msgid "no file name following -t option"
msgstr ""
-#: as.c:638
+#: as.c:665
#, c-format
msgid "failed to read instruction table %s\n"
msgstr ""
-#: as.c:765
+#: as.c:832
#, c-format
msgid "invalid listing option `%c'"
msgstr ""
-#: as.c:984
-#, c-format
-msgid "%d warnings, treating warnings as errors"
+#: as.c:885
+msgid "--hash-size needs a numeric argument"
msgstr ""
-#: as.c:1015
+#: as.c:910
#, c-format
msgid "%s: total time in assembly: %ld.%06ld\n"
msgstr ""
-#: as.c:1018
+#: as.c:913
#, c-format
msgid "%s: data size %ld\n"
msgstr ""
-#: as.h:216
+#: as.c:1175
+#, c-format
+msgid "%d warnings, treating warnings as errors"
+msgstr ""
+
+#: as.h:200
#, c-format
msgid "Case value %ld unexpected at line %d of file \"%s\"\n"
msgstr ""
@@ -355,772 +424,791 @@ msgstr ""
#. * We have a GROSS internal error.
#. * This should never happen.
#.
-#: atof-generic.c:437 config/tc-m68k.c:2869
+#: atof-generic.c:419 config/tc-m68k.c:3118
msgid "failed sanity check"
msgstr ""
-#: cond.c:83
+#: cond.c:82
msgid "invalid identifier for \".ifdef\""
msgstr ""
-#: cond.c:151
+#: cond.c:149
msgid "non-constant expression in \".if\" statement"
msgstr ""
-#: cond.c:247
+#: cond.c:276
msgid "bad format for ifc or ifnc"
msgstr ""
-#: cond.c:278
+#: cond.c:306
msgid "\".elseif\" without matching \".if\""
msgstr ""
-#: cond.c:282
+#: cond.c:310
msgid "\".elseif\" after \".else\""
msgstr ""
-#: cond.c:285 cond.c:393
+#: cond.c:313 cond.c:419
msgid "here is the previous \"else\""
msgstr ""
-#: cond.c:288 cond.c:396
+#: cond.c:316 cond.c:422
msgid "here is the previous \"if\""
msgstr ""
-#: cond.c:317
+#: cond.c:345
msgid "non-constant expression in \".elseif\" statement"
msgstr ""
-#: cond.c:356
+#: cond.c:383
msgid "\".endif\" without \".if\""
msgstr ""
-#: cond.c:386
+#: cond.c:412
msgid "\".else\" without matching \".if\""
msgstr ""
-#: cond.c:390
+#: cond.c:416
msgid "duplicate \"else\""
msgstr ""
-#: cond.c:442
+#: cond.c:467
msgid ".ifeqs syntax error"
msgstr ""
-#: cond.c:525
+#: cond.c:548
msgid "end of macro inside conditional"
msgstr ""
-#: cond.c:527
+#: cond.c:550
msgid "end of file inside conditional"
msgstr ""
-#: cond.c:530
+#: cond.c:553
msgid "here is the start of the unterminated conditional"
msgstr ""
-#: cond.c:534
+#: cond.c:557
msgid "here is the \"else\" of the unterminated conditional"
msgstr ""
-#: config/obj-aout.c:162
+#: config/obj-aout.c:85
#, c-format
msgid "Attempt to put a common symbol into set %s"
msgstr ""
-#: config/obj-aout.c:166
+#: config/obj-aout.c:89
#, c-format
msgid "Attempt to put an undefined symbol into set %s"
msgstr ""
-#: config/obj-aout.c:197 config/obj-coff.c:1276
+#: config/obj-aout.c:116 config/obj-coff.c:1328
#, c-format
msgid "Symbol `%s' can not be both weak and common"
msgstr ""
-#: config/obj-aout.c:255 config/obj-coff.c:2022
-msgid "unresolved relocation"
-msgstr ""
-
-#: config/obj-aout.c:257 config/obj-coff.c:2024
-#, c-format
-msgid "bad relocation: symbol `%s' not in symbol table"
-msgstr ""
-
-#: config/obj-aout.c:344
-#, c-format
-msgid "%s: bad type for weak symbol"
-msgstr ""
-
-#: config/obj-aout.c:458 config/obj-coff.c:2945 write.c:1931
-#, c-format
-msgid "%s: global symbols not supported in common sections"
-msgstr ""
-
-#: config/obj-aout.c:524
-#, c-format
-msgid "Local symbol %s never defined."
-msgstr ""
-
-#: config/obj-bout.c:319 config/obj-vms.c:629
-#, c-format
-msgid "Local symbol %s never defined"
-msgstr ""
-
-#: config/obj-coff.c:166
+#: config/obj-coff.c:133
#, c-format
msgid "Inserting \"%s\" into structure table failed: %s"
msgstr ""
#. Zero is used as an end marker in the file.
-#: config/obj-coff.c:469
+#: config/obj-coff.c:354
msgid "Line numbers must be positive integers\n"
msgstr ""
-#. Wrong context.
-#: config/obj-coff.c:503 config/obj-coff.c:2367
+#: config/obj-coff.c:386
msgid ".ln pseudo-op inside .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:546 ecoff.c:3278
+#: config/obj-coff.c:428 ecoff.c:3240
msgid ".loc outside of .text"
msgstr ""
-#: config/obj-coff.c:553
+#: config/obj-coff.c:435
msgid ".loc pseudo-op inside .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:641 config/obj-coff.c:2419
+#: config/obj-coff.c:516
msgid ".def pseudo-op used inside of .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:687 config/obj-coff.c:2471
+#: config/obj-coff.c:555
msgid ".endef pseudo-op used outside of .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:725
+#: config/obj-coff.c:594
#, c-format
msgid "`%s' symbol without preceding function"
msgstr ""
-#: config/obj-coff.c:812 config/obj-coff.c:2551
+#: config/obj-coff.c:681
#, c-format
msgid "unexpected storage class %d"
msgstr ""
-#: config/obj-coff.c:925 config/obj-coff.c:2658
+#: config/obj-coff.c:790
msgid ".dim pseudo-op used outside of .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:945 config/obj-coff.c:2678
+#: config/obj-coff.c:810
msgid "badly formed .dim directive ignored"
msgstr ""
-#: config/obj-coff.c:996 config/obj-coff.c:2738
+#: config/obj-coff.c:859
msgid ".size pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1012 config/obj-coff.c:2754
+#: config/obj-coff.c:874
msgid ".scl pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1030 config/obj-coff.c:2772
+#: config/obj-coff.c:891
msgid ".tag pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1049 config/obj-coff.c:2789
+#: config/obj-coff.c:909
#, c-format
msgid "tag not found for .tag %s"
msgstr ""
-#: config/obj-coff.c:1064 config/obj-coff.c:2803
+#: config/obj-coff.c:922
msgid ".type pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1086 config/obj-coff.c:2823
+#: config/obj-coff.c:941
msgid ".val pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1233 config/obj-coff.c:3016
+#: config/obj-coff.c:1108
+msgid "badly formed .weak directive ignored"
+msgstr ""
+
+#: config/obj-coff.c:1286
msgid "mismatched .eb"
msgstr ""
-#: config/obj-coff.c:1254 config/obj-coff.c:3054
-msgid "C_EFCN symbol out of scope"
+#: config/obj-coff.c:1307
+#, c-format
+msgid "C_EFCN symbol for %s out of scope"
msgstr ""
#. STYP_INFO
#. STYP_LIB
#. STYP_OVER
-#: config/obj-coff.c:1482
+#: config/obj-coff.c:1533
#, c-format
msgid "unsupported section attribute '%c'"
msgstr ""
-#: config/obj-coff.c:1487 config/obj-coff.c:3759 config/tc-ppc.c:4508
+#: config/obj-coff.c:1538 config/tc-ppc.c:4610
#, c-format
msgid "unknown section attribute '%c'"
msgstr ""
-#: config/obj-coff.c:1517 config/tc-ppc.c:4526 config/tc-tic54x.c:4339
-#: read.c:2562
+#: config/obj-coff.c:1568 config/tc-ppc.c:4628 config/tc-tic54x.c:4287
+#: read.c:2551
#, c-format
msgid "error setting flags for \"%s\": %s"
msgstr ""
-#: config/obj-coff.c:1528
+#: config/obj-coff.c:1579
#, c-format
msgid "Ignoring changed section attributes for %s"
msgstr ""
-#: config/obj-coff.c:1664
+#: config/obj-coff.c:1710
#, c-format
msgid "0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"
msgstr ""
-#: config/obj-coff.c:1849 config/obj-ieee.c:69
-msgid "Out of step\n"
+#: config/obj-ecoff.c:125
+msgid "Can't set GP value"
msgstr ""
-#: config/obj-coff.c:2286
-msgid "bfd_coff_swap_scnhdr_out failed"
+#: config/obj-ecoff.c:132
+msgid "Can't set register masks"
msgstr ""
-#: config/obj-coff.c:2507
-msgid "`.bf' symbol without preceding function\n"
+#: config/obj-elf.c:318 config/tc-sparc.c:3973 config/tc-v850.c:451
+#, c-format
+msgid "bad .common segment %s"
msgstr ""
-#: config/obj-coff.c:3457 config/obj-ieee.c:521
+#: config/obj-elf.c:596
#, c-format
-msgid "FATAL: Can't create %s"
+msgid "setting incorrect section type for %s"
msgstr ""
-#: config/obj-coff.c:3635
+#: config/obj-elf.c:601
#, c-format
-msgid "Can't close %s: %s"
+msgid "ignoring incorrect section type for %s"
msgstr ""
-#: config/obj-coff.c:3669
+#: config/obj-elf.c:638
#, c-format
-msgid "Too many new sections; can't add \"%s\""
+msgid "setting incorrect section attributes for %s"
msgstr ""
-#: config/obj-coff.c:4057 config/tc-sparc.c:3635
-msgid "Expected comma after name"
+#: config/obj-elf.c:690
+#, c-format
+msgid "ignoring changed section type for %s"
msgstr ""
-#: config/obj-coff.c:4063
-msgid "Missing size expression"
+#: config/obj-elf.c:702
+#, c-format
+msgid "ignoring changed section attributes for %s"
msgstr ""
-#: config/obj-coff.c:4069
+#: config/obj-elf.c:704
#, c-format
-msgid "lcomm length (%d.) <0! Ignored."
+msgid "ignoring changed section entity size for %s"
msgstr ""
-#: config/obj-coff.c:4097
-#, c-format
-msgid "Symbol %s already defined"
+#: config/obj-elf.c:757
+msgid "unrecognized .section attribute: want a,w,x,M,S,G,T"
msgstr ""
-#: config/obj-coff.c:4193 config/tc-i960.c:3221
-#, c-format
-msgid "No 'bal' entry point for leafproc %s"
+#: config/obj-elf.c:794
+msgid "unrecognized section attribute"
msgstr ""
-#: config/obj-coff.c:4270
-#, c-format
-msgid "Negative of non-absolute symbol %s"
+#: config/obj-elf.c:822 read.c:2535
+msgid "unrecognized section type"
msgstr ""
-#: config/obj-coff.c:4290
-msgid "callj to difference of 2 symbols"
+#: config/obj-elf.c:852
+msgid "missing name"
msgstr ""
-#: config/obj-coff.c:4334
-#, c-format
-msgid "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld."
+#: config/obj-elf.c:963
+msgid "invalid merge entity size"
msgstr ""
-#: config/obj-coff.c:4420 config/tc-i960.c:2844
-msgid "can't use COBR format with external label"
+#: config/obj-elf.c:970
+msgid "entity size for SHF_MERGE not specified"
msgstr ""
-#: config/obj-coff.c:4493
-#, c-format
-msgid "Value of %ld too large for field of %d bytes at 0x%lx"
+#: config/obj-elf.c:990
+msgid "group name for SHF_GROUP not specified"
msgstr ""
-#: config/obj-coff.c:4507
-#, c-format
-msgid "Signed .word overflow; switch may be too large; %ld at 0x%lx"
+#: config/obj-elf.c:1003
+msgid "character following name is not '#'"
msgstr ""
-#: config/obj-ecoff.c:192
-msgid "Can't set GP value"
+#: config/obj-elf.c:1118
+msgid ".previous without corresponding .section; ignored"
msgstr ""
-#: config/obj-ecoff.c:199
-msgid "Can't set register masks"
+#: config/obj-elf.c:1144
+msgid ".popsection without corresponding .pushsection; ignored"
msgstr ""
-#: config/obj-elf.c:316
-msgid "expected comma after symbol-name"
+#: config/obj-elf.c:1196
+msgid "expected comma after name in .symver"
msgstr ""
-#: config/obj-elf.c:326
+#: config/obj-elf.c:1220
#, c-format
-msgid ".COMMon length (%ld) out of range, ignored."
+msgid "missing version name in `%s' for symbol `%s'"
msgstr ""
-#: config/obj-elf.c:335 ecoff.c:3397 read.c:1406 read.c:1507 read.c:2145
-#: read.c:2234 read.c:2863 read.c:4968 symbols.c:367 symbols.c:466
+#: config/obj-elf.c:1231
#, c-format
-msgid "symbol `%s' is already defined"
+msgid "multiple versions [`%s'|`%s'] for symbol `%s'"
msgstr ""
-#: config/obj-elf.c:343
-#, c-format
-msgid "length of .comm \"%s\" is already %ld; not changed to %ld"
+#: config/obj-elf.c:1461
+msgid "expected quoted string"
msgstr ""
-#: config/obj-elf.c:367
-msgid "common alignment negative; 0 assumed"
+#: config/obj-elf.c:1481
+#, c-format
+msgid "expected comma after name `%s' in .size directive"
msgstr ""
-#: config/obj-elf.c:386
-msgid "common alignment not a power of 2"
+#: config/obj-elf.c:1490
+msgid "missing expression in .size directive"
msgstr ""
-#: config/obj-elf.c:449 config/tc-sparc.c:3931 config/tc-v850.c:461
+#: config/obj-elf.c:1577
#, c-format
-msgid "bad .common segment %s"
+msgid "unrecognized symbol type \"%s\""
msgstr ""
-#: config/obj-elf.c:717
-#, c-format
-msgid "setting incorrect section type for %s"
+#: config/obj-elf.c:1745
+msgid ".size expression too complicated to fix up"
msgstr ""
-#: config/obj-elf.c:721
+#: config/obj-elf.c:1777
#, c-format
-msgid "ignoring incorrect section type for %s"
+msgid ""
+"invalid attempt to declare external version name as default in symbol `%s'"
msgstr ""
-#: config/obj-elf.c:734
+#: config/obj-elf.c:1838 ecoff.c:3598
#, c-format
-msgid "setting incorrect section attributes for %s"
+msgid "symbol `%s' can not be both weak and common"
msgstr ""
-#: config/obj-elf.c:786
+#: config/obj-elf.c:1945
#, c-format
-msgid "ignoring changed section attributes for %s"
+msgid "assuming all members of group `%s' are COMDAT"
msgstr ""
-#: config/obj-elf.c:788
+#: config/obj-elf.c:1967
#, c-format
-msgid "ignoring changed section entity size for %s"
+msgid "can't create group: %s"
msgstr ""
-#: config/obj-elf.c:791
+#: config/obj-elf.c:2076
#, c-format
-msgid "ignoring new section group for %s"
+msgid "failed to set up debugging information: %s"
msgstr ""
-#: config/obj-elf.c:845
-msgid "unrecognized .section attribute: want a,w,x,M,S,G,T"
+#: config/obj-elf.c:2096
+#, c-format
+msgid "can't start writing .mdebug section: %s"
msgstr ""
-#: config/obj-elf.c:884
-msgid "unrecognized section attribute"
+#: config/obj-elf.c:2104
+#, c-format
+msgid "could not write .mdebug section: %s"
msgstr ""
-#: config/obj-elf.c:906 read.c:2545
-msgid "unrecognized section type"
+#: config/obj-elf.h:140
+#, c-format
+msgid "can't allocate ELF private section data: %s"
msgstr ""
-#: config/obj-elf.c:936
-msgid "missing name"
+#: config/obj-ieee.c:69
+#, c-format
+msgid "Out of step\n"
msgstr ""
-#: config/obj-elf.c:1048
-msgid "invalid merge entity size"
+#: config/obj-ieee.c:449
+msgid "too many sections"
msgstr ""
-#: config/obj-elf.c:1055
-msgid "entity size for SHF_MERGE not specified"
+#: config/obj-ieee.c:511
+#, c-format
+msgid "FATAL: Can't create %s"
msgstr ""
-#: config/obj-elf.c:1075
-msgid "group name for SHF_GROUP not specified"
+#: config/obj-som.c:129
+msgid "Only one .version pseudo-op per file!"
msgstr ""
-#: config/obj-elf.c:1088
-msgid "character following name is not '#'"
+#: config/obj-som.c:146 config/obj-som.c:191
+msgid "Expected quoted string"
msgstr ""
-#: config/obj-elf.c:1189
-msgid ".previous without corresponding .section; ignored"
+#: config/obj-som.c:155
+#, c-format
+msgid "FATAL: Attaching version header %s"
msgstr ""
-#: config/obj-elf.c:1216
-msgid ".popsection without corresponding .pushsection; ignored"
+#: config/obj-som.c:174
+msgid "Only one .copyright pseudo-op per file!"
msgstr ""
-#: config/obj-elf.c:1270
-msgid "expected comma after name in .symver"
+#: config/obj-som.c:200
+#, c-format
+msgid "FATAL: Attaching copyright header %s"
msgstr ""
-#: config/obj-elf.c:1294
+#: config/tc-alpha.c:592
#, c-format
-msgid "missing version name in `%s' for symbol `%s'"
+msgid "No !literal!%ld was found"
msgstr ""
-#: config/obj-elf.c:1305
+#: config/tc-alpha.c:599
#, c-format
-msgid "multiple versions [`%s'|`%s'] for symbol `%s'"
+msgid "No !tlsgd!%ld was found"
msgstr ""
-#: config/obj-elf.c:1541
-msgid "expected quoted string"
+#: config/tc-alpha.c:606
+#, c-format
+msgid "No !tlsldm!%ld was found"
msgstr ""
-#: config/obj-elf.c:1562
+#: config/tc-alpha.c:615
#, c-format
-msgid "expected comma after name `%s' in .size directive"
+msgid "No ldah !gpdisp!%ld was found"
msgstr ""
-#: config/obj-elf.c:1571
-msgid "missing expression in .size directive"
+#: config/tc-alpha.c:665
+#, c-format
+msgid "too many !literal!%ld for %s"
msgstr ""
-#: config/obj-elf.c:1660
+#: config/tc-alpha.c:695
#, c-format
-msgid "unrecognized symbol type \"%s\""
+msgid "No lda !gpdisp!%ld was found"
msgstr ""
-#: config/obj-elf.c:1841
-msgid ".size expression too complicated to fix up"
+#. Only support one relocation op per insn.
+#: config/tc-alpha.c:852
+msgid "More than one relocation op per insn"
msgstr ""
-#: config/obj-elf.c:1873
+#: config/tc-alpha.c:868
+msgid "No relocation operand"
+msgstr ""
+
+#: config/tc-alpha.c:878
#, c-format
-msgid ""
-"invalid attempt to declare external version name as default in symbol `%s'"
+msgid "Unknown relocation operand: !%s"
msgstr ""
-#: config/obj-elf.c:1934 ecoff.c:3642
+#: config/tc-alpha.c:888
#, c-format
-msgid "symbol `%s' can not be both weak and common"
+msgid "no sequence number after !%s"
msgstr ""
-#: config/obj-elf.c:2054
+#: config/tc-alpha.c:898
#, c-format
-msgid "assuming all members of group `%s' are COMDAT"
+msgid "!%s does not use a sequence number"
msgstr ""
-#: config/obj-elf.c:2076
+#: config/tc-alpha.c:908
#, c-format
-msgid "can't create group: %s"
+msgid "Bad sequence number: !%s!%s"
msgstr ""
-#: config/obj-elf.c:2183
+#: config/tc-alpha.c:1123 config/tc-alpha.c:3139
#, c-format
-msgid "failed to set up debugging information: %s"
+msgid "inappropriate arguments for opcode `%s'"
msgstr ""
-#: config/obj-elf.c:2203
+#: config/tc-alpha.c:1125 config/tc-alpha.c:3141
#, c-format
-msgid "can't start writing .mdebug section: %s"
+msgid "opcode `%s' not supported for target %s"
msgstr ""
-#: config/obj-elf.c:2211
+#: config/tc-alpha.c:1129 config/tc-alpha.c:3145 config/tc-avr.c:1221
+#: config/tc-msp430.c:1870
#, c-format
-msgid "could not write .mdebug section: %s"
+msgid "unknown opcode `%s'"
msgstr ""
-#: config/obj-ieee.c:455
-msgid "too many sections"
+#: config/tc-alpha.c:1209 config/tc-alpha.c:1384
+msgid "overflow in literal (.lita) table"
msgstr ""
-#: config/obj-som.c:138
-msgid "Only one .version pseudo-op per file!"
+#: config/tc-alpha.c:1216 config/tc-alpha.c:1240 config/tc-alpha.c:1397
+#: config/tc-alpha.c:2049 config/tc-alpha.c:2093 config/tc-alpha.c:2162
+#: config/tc-alpha.c:2245 config/tc-alpha.c:2470 config/tc-alpha.c:2568
+msgid "macro requires $at register while noat in effect"
msgstr ""
-#: config/obj-som.c:155 config/obj-som.c:201
-msgid "Expected quoted string"
+#: config/tc-alpha.c:1218 config/tc-alpha.c:1242 config/tc-alpha.c:1399
+msgid "macro requires $at while $at in use"
msgstr ""
-#: config/obj-som.c:164
-#, c-format
-msgid "FATAL: Attaching version header %s"
+#: config/tc-alpha.c:1346
+msgid "bignum invalid; zero assumed"
msgstr ""
-#: config/obj-som.c:184
-msgid "Only one .copyright pseudo-op per file!"
+#: config/tc-alpha.c:1348
+msgid "floating point number invalid; zero assumed"
+msgstr ""
+
+#: config/tc-alpha.c:1353
+msgid "can't handle expression"
msgstr ""
-#: config/obj-som.c:210
+#: config/tc-alpha.c:1390
+msgid "overflow in literal (.lit8) table"
+msgstr ""
+
+#: config/tc-alpha.c:1674
#, c-format
-msgid "FATAL: Attaching copyright header %s"
+msgid "too many ldah insns for !gpdisp!%ld"
msgstr ""
-#: config/obj-vms.c:530
+#: config/tc-alpha.c:1676 config/tc-alpha.c:1688
#, c-format
-msgid "compiler emitted zero-size common symbol `%s' already defined"
+msgid "both insns for !gpdisp!%ld must be in the same section"
msgstr ""
-#: config/obj-vms.c:540
+#: config/tc-alpha.c:1686
#, c-format
-msgid "compiler redefined zero-size common symbol `%s'"
+msgid "too many lda insns for !gpdisp!%ld"
msgstr ""
-#: config/obj-vms.c:663
+#: config/tc-alpha.c:1742
#, c-format
-msgid "Couldn't create VMS object file \"%s\""
+msgid "too many lituse insns for !lituse_tlsgd!%ld"
msgstr ""
-#: config/obj-vms.c:688
-msgid "I/O error writing VMS object file (length prefix)"
+#: config/tc-alpha.c:1745
+#, c-format
+msgid "too many lituse insns for !lituse_tlsldm!%ld"
msgstr ""
-#: config/obj-vms.c:702
-msgid "I/O error writing VMS object file"
+#: config/tc-alpha.c:1762
+#, c-format
+msgid "duplicate !tlsgd!%ld"
msgstr ""
-#: config/obj-vms.c:1292
+#: config/tc-alpha.c:1764
#, c-format
-msgid "Couldn't find source file \"%s\", status=%%X%x"
+msgid "sequence number in use for !tlsldm!%ld"
msgstr ""
-#: config/obj-vms.c:1790 config/obj-vms.c:2967
+#: config/tc-alpha.c:1778
#, c-format
-msgid "debugger forward reference error, dbx type %d"
+msgid "duplicate !tlsldm!%ld"
msgstr ""
-#: config/obj-vms.c:1865
+#: config/tc-alpha.c:1780
#, c-format
-msgid "Variable descriptor %d too complicated. Defined as `void *'."
+msgid "sequence number in use for !tlsgd!%ld"
msgstr ""
-#: config/obj-vms.c:2179
-msgid ""
-"***Warning - the assembly code generated by the compiler has placed \n"
-" global constant(s) in the text psect. These will not be available to \n"
-" other modules, since this is not the correct way to handle this. You \n"
-" have two options: 1) get a patched compiler that does not put global \n"
-" constants in the text psect, or 2) remove the 'const' keyword from \n"
-" definitions of global variables in your source module(s). Don't say \n"
-" I didn't warn you! \n"
+#: 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
+msgid "operand"
msgstr ""
-#: config/obj-vms.c:2494
-#, c-format
-msgid "debugginer output: %d is an unknown untyped variable."
+#: 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
+msgid "too many fixups"
msgstr ""
-#: config/obj-vms.c:2712
-#, c-format
-msgid "debugger output: structure element `%s' has undefined type"
+#: config/tc-alpha.c:1962
+msgid "invalid relocation for instruction"
msgstr ""
-#: config/obj-vms.c:2823
-#, c-format
-msgid "debugger output: %d is an unknown type of variable."
+#: config/tc-alpha.c:1973
+msgid "invalid relocation for field"
msgstr ""
-#: config/obj-vms.c:2956
-#, c-format
-msgid "debugger output: Unable to resolve %d circular references."
+#: config/tc-alpha.c:2760
+msgid "can not resolve expression"
msgstr ""
-#: config/obj-vms.c:3158
+#: config/tc-alpha.c:3275 config/tc-ppc.c:1781 config/tc-ppc.c:4373
#, c-format
-msgid "Module name truncated: %s\n"
+msgid ".COMMon length (%ld.) <0! Ignored."
msgstr ""
-#: config/obj-vms.c:3436
-#, c-format
-msgid "Symbol %s replaced by %s\n"
+#: config/tc-alpha.c:3304 config/tc-sparc.c:3843 config/tc-v850.c:246
+msgid "Ignoring attempt to re-define symbol"
msgstr ""
-#. impossible
-#: config/obj-vms.c:3719
+#: config/tc-alpha.c:3313 config/tc-alpha.c:3322 config/tc-ppc.c:4410
+#: config/tc-sparc.c:3851
#, c-format
-msgid "Unknown VMS psect type (%ld)"
+msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
-#: config/obj-vms.c:3760
-#, c-format
-msgid "Globalsymbol attribute for symbol %s was unexpected."
+#: config/tc-alpha.c:3439 ecoff.c:3054
+msgid ".ent directive has no name"
msgstr ""
-#: config/obj-vms.c:3909
-msgid "Invalid data type for globalvalue"
+#: config/tc-alpha.c:3447
+msgid "nested .ent directives"
msgstr ""
-#: config/obj-vms.c:3921
-#, c-format
-msgid "Invalid globalvalue of %s"
+#: config/tc-alpha.c:3491 ecoff.c:3005
+msgid ".end directive has no name"
msgstr ""
-#: config/obj-vms.c:4271
-msgid "Couldn't find fixup fragment when checking for indirect reference"
+#: config/tc-alpha.c:3500
+msgid ".end directive without matching .ent"
msgstr ""
-#: config/obj-vms.c:4614 config/obj-vms.c:4757
-msgid "Fixup data addsy and subsy don't have the same type"
+#: config/tc-alpha.c:3502
+msgid ".end directive names different symbol than .ent"
msgstr ""
-#: config/obj-vms.c:4618 config/obj-vms.c:4761
-msgid "Fixup data addsy and subsy don't have an appropriate type"
+#: config/tc-alpha.c:3545 ecoff.c:3140
+msgid ".fmask outside of .ent"
msgstr ""
-#: config/obj-vms.c:4621 config/obj-vms.c:4764
-msgid "Fixup data is erroneously \"pcrel\""
+#: config/tc-alpha.c:3547 ecoff.c:3204
+msgid ".mask outside of .ent"
msgstr ""
-#: config/obj-vms.c:4637 config/obj-vms.c:4783
-msgid "Fixup datum is not a longword"
+#: config/tc-alpha.c:3555 ecoff.c:3147
+msgid "bad .fmask directive"
msgstr ""
-#: config/obj-vms.c:4641 config/obj-vms.c:4787
-msgid "Fixup datum is not \"fixP->fx_addsy\""
+#: config/tc-alpha.c:3557 ecoff.c:3211
+msgid "bad .mask directive"
msgstr ""
-#: config/obj-vms.c:4858
-#, c-format
-msgid ""
-"g++ wrote an extern reference to `%s' as a routine.\n"
-"I will fix it, but I hope that it was note really a routine."
+#: config/tc-alpha.c:3590 config/tc-mips.c:14022 ecoff.c:3168
+msgid ".frame outside of .ent"
msgstr ""
-#: config/obj-vms.c:4990
-msgid "Can't handle global xtors symbols yet."
+#: config/tc-alpha.c:3601 ecoff.c:3179
+msgid "bad .frame directive"
msgstr ""
-#: config/obj-vms.c:4993
-#, c-format
-msgid "Unknown %s"
+#: config/tc-alpha.c:3633
+msgid ".prologue directive without a preceding .ent directive"
msgstr ""
-#.
-#. * Error otherwise.
-#.
-#: config/obj-vms.c:5078
+#: config/tc-alpha.c:3651
#, c-format
-msgid "unhandled stab type %d"
+msgid "Invalid argument %d to .prologue."
msgstr ""
-#: config/tc-a29k.c:163 config/tc-sparc.c:3983
-msgid "Unknown segment type"
+#: config/tc-alpha.c:3742
+msgid "ECOFF debugging is disabled."
msgstr ""
-#. Probably a memory allocation problem? Give up now.
-#: config/tc-a29k.c:333 config/tc-dlx.c:369 config/tc-hppa.c:1463
-#: config/tc-mips.c:1108 config/tc-mips.c:1150 config/tc-or32.c:228
-#: config/tc-sparc.c:853
-msgid "Broken assembler. No assembly attempted."
+#: config/tc-alpha.c:3756
+msgid ".ent directive without matching .end"
msgstr ""
-#: config/tc-a29k.c:378 config/tc-avr.c:1121 config/tc-d10v.c:545
-#: config/tc-d30v.c:551 config/tc-h8300.c:492 config/tc-h8500.c:283
-#: config/tc-mcore.c:607 config/tc-mmix.c:470 config/tc-mn10200.c:940
-#: config/tc-mn10300.c:1815 config/tc-msp430.c:1544 config/tc-or32.c:334
-#: config/tc-or32.c:390 config/tc-ppc.c:2334 config/tc-s390.c:1236
-#: config/tc-sh.c:1264 config/tc-sh64.c:2254 config/tc-tic80.c:279
-#: config/tc-v850.c:2024 config/tc-w65.c:218 config/tc-z8k.c:376
-msgid "missing operand"
+#: config/tc-alpha.c:3841
+msgid ".usepv directive has no name"
msgstr ""
-#: config/tc-a29k.c:417 config/tc-cris.c:1075 config/tc-cris.c:1083
-#: config/tc-dlx.c:834 config/tc-hppa.c:1599 config/tc-i860.c:453
-#: config/tc-i860.c:470 config/tc-i860.c:930 config/tc-sparc.c:1415
-#: config/tc-sparc.c:1421
-#, c-format
-msgid "Unknown opcode: `%s'"
+#: config/tc-alpha.c:3852
+msgid ".usepv directive has no type"
msgstr ""
-#: config/tc-a29k.c:422 config/tc-dlx.c:852
-#, c-format
-msgid "Unknown opcode `%s'."
+#: config/tc-alpha.c:3867
+msgid "unknown argument for .usepv"
msgstr ""
-#: config/tc-a29k.c:454 config/tc-dlx.c:913
-#, c-format
-msgid "Too many operands: %s"
+#: config/tc-alpha.c:3900
+msgid "Unknown section directive"
msgstr ""
-#: config/tc-a29k.c:476 config/tc-a29k.c:507
-#, c-format
-msgid "Immediate value of %ld is too large"
+#: config/tc-alpha.c:3935
+msgid ".ent directive has no symbol"
msgstr ""
-#: config/tc-a29k.c:546 config/tc-i860.c:355 config/tc-i860.c:902
-#: config/tc-m68k.c:3171 config/tc-m68k.c:3200 config/tc-sparc.c:2647
-msgid "failed sanity check."
+#: config/tc-alpha.c:3960
+msgid "Bad .frame directive 1./2. param"
+msgstr ""
+
+#: config/tc-alpha.c:3972
+msgid "Bad .frame directive 3./4. param"
+msgstr ""
+
+#: config/tc-alpha.c:3994
+msgid ".pdesc directive not in link (.link) section"
+msgstr ""
+
+#: config/tc-alpha.c:4002
+msgid ".pdesc has no matching .ent"
+msgstr ""
+
+#: config/tc-alpha.c:4013
+msgid ".pdesc directive has no entry symbol"
+msgstr ""
+
+#: config/tc-alpha.c:4026
+msgid "No comma after .pdesc <entryname>"
+msgstr ""
+
+#: config/tc-alpha.c:4046
+msgid "unknown procedure kind"
+msgstr ""
+
+#: config/tc-alpha.c:4136
+msgid ".name directive not in link (.link) section"
+msgstr ""
+
+#: config/tc-alpha.c:4144
+msgid ".name directive has no symbol"
+msgstr ""
+
+#: config/tc-alpha.c:4175
+msgid "No symbol after .linkage"
+msgstr ""
+
+#: config/tc-alpha.c:4199
+msgid "No symbol after .code_address"
+msgstr ""
+
+#: config/tc-alpha.c:4226
+msgid "Bad .mask directive"
msgstr ""
-#: config/tc-a29k.c:892 config/tc-or32.c:1044 config/tc-or32.c:1178
+#: config/tc-alpha.c:4244
+msgid "Bad .fmask directive"
+msgstr ""
+
+#: config/tc-alpha.c:4401
#, c-format
-msgid "bad relocation type: 0x%02x"
+msgid "Expected comma after name \"%s\""
msgstr ""
-#: config/tc-a29k.c:919
+#. *symbol_get_obj (symbolP) = (signed char) temp;
+#: config/tc-alpha.c:4412
#, c-format
-msgid "need %o3\n"
+msgid "unhandled: .proc %s,%d"
msgstr ""
-#: config/tc-a29k.c:935
-msgid "a29k_convert_frag\n"
+#: config/tc-alpha.c:4446
+#, c-format
+msgid "Tried to .set unrecognized mode `%s'"
msgstr ""
-#: config/tc-a29k.c:944
-msgid "a29k_estimate_size_before_relax\n"
+#: config/tc-alpha.c:4472
+#, c-format
+msgid "Bad base register, using $%d."
msgstr ""
-#: config/tc-a29k.c:1095 config/tc-dlx.c:1283 config/tc-or32.c:1373
+#: config/tc-alpha.c:4493
#, c-format
-msgid "label \"$%d\" redefined"
+msgid "Alignment too large: %d. assumed"
msgstr ""
-#: config/tc-a29k.c:1168 config/tc-dlx.c:511 config/tc-or32.c:1466
+#: config/tc-alpha.c:4497 config/tc-d30v.c:2083
+msgid "Alignment negative: 0 assumed"
+msgstr ""
+
+#: config/tc-alpha.c:4775
#, c-format
-msgid "Invalid expression after %%%%\n"
+msgid "Chose GP value of %lx\n"
msgstr ""
-#: config/tc-a29k.c:1179
-msgid "Invalid register in & expression"
+#: config/tc-alpha.c:4789
+msgid "Bad .section directive: want a,s,w,x,M,S,G,T in string"
msgstr ""
-#: config/tc-alpha.c:826
+#: config/tc-alpha.c:4878
#, c-format
msgid "internal error: can't hash opcode `%s': %s"
msgstr ""
-#: config/tc-alpha.c:860
+#: config/tc-alpha.c:4914
#, c-format
msgid "internal error: can't hash macro `%s': %s"
msgstr ""
-#: config/tc-alpha.c:943 config/tc-i960.c:2707 config/tc-xtensa.c:4954
-#: config/tc-xtensa.c:5015
+#: 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
msgid "syntax error"
msgstr ""
-#: config/tc-alpha.c:1017 config/tc-h8300.c:2099 config/tc-h8500.c:1204
-#: config/tc-hppa.c:4018 config/tc-i860.c:1004 config/tc-m68hc11.c:568
-#: config/tc-m68k.c:4196 config/tc-m88k.c:991 config/tc-ns32k.c:1689
-#: config/tc-or32.c:910 config/tc-sparc.c:2934 config/tc-z8k.c:1371
+#: 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
msgid "Bad call to MD_ATOF()"
msgstr ""
-#: config/tc-alpha.c:1067
+#: config/tc-alpha.c:5116
#, c-format
msgid "Unknown CPU identifier `%s'"
msgstr ""
-#: config/tc-alpha.c:1111
+#: config/tc-alpha.c:5159
msgid ""
"Alpha options:\n"
"-32addr\t\t\ttreat addresses as 32-bit values\n"
@@ -1132,1528 +1220,1465 @@ msgid ""
"\t\t\tthese variants include PALcode opcodes\n"
msgstr ""
-#: config/tc-alpha.c:1121
+#: config/tc-alpha.c:5169
msgid ""
"VMS options:\n"
"-+\t\t\thash encode (don't truncate) names longer than 64 characters\n"
"-H\t\t\tshow new symbol after hash truncation\n"
msgstr ""
-#: config/tc-alpha.c:1298
+#: config/tc-alpha.c:5346
#, c-format
msgid "unhandled relocation type %s"
msgstr ""
-#: config/tc-alpha.c:1311
+#: config/tc-alpha.c:5359
msgid "non-absolute expression in constant field"
msgstr ""
-#: config/tc-alpha.c:1325
+#: config/tc-alpha.c:5373
#, c-format
msgid "type %d reloc done?\n"
msgstr ""
-#: config/tc-alpha.c:1373 config/tc-alpha.c:1380 config/tc-mips.c:8603
+#: config/tc-alpha.c:5420 config/tc-alpha.c:5427 config/tc-mips.c:8657
msgid "Used $at without \".set noat\""
msgstr ""
-#: config/tc-alpha.c:1542
+#: config/tc-alpha.c:5589
#, c-format
msgid "!samegp reloc against symbol without .prologue: %s"
msgstr ""
-#: config/tc-alpha.c:1581 config/tc-xtensa.c:5451
+#: config/tc-alpha.c:5626 config/tc-xtensa.c:5739
#, c-format
msgid "cannot represent `%s' relocation in object file"
msgstr ""
-#: config/tc-alpha.c:1588 config/tc-xtensa.c:5458
+#: config/tc-alpha.c:5632 config/tc-xtensa.c:5747
#, c-format
msgid "internal error? cannot generate `%s' relocation"
msgstr ""
-#: config/tc-alpha.c:1642
+#: config/tc-alpha.c:5683
#, c-format
msgid "frame reg expected, using $%d."
msgstr ""
-#: config/tc-alpha.c:1743
-#, c-format
-msgid "No !literal!%ld was found"
-msgstr ""
-
-#: config/tc-alpha.c:1750
-#, c-format
-msgid "No !tlsgd!%ld was found"
-msgstr ""
-
-#: config/tc-alpha.c:1757
-#, c-format
-msgid "No !tlsldm!%ld was found"
-msgstr ""
-
-#: config/tc-alpha.c:1766
-#, c-format
-msgid "No ldah !gpdisp!%ld was found"
-msgstr ""
-
-#: config/tc-alpha.c:1816
-#, c-format
-msgid "too many !literal!%ld for %s"
-msgstr ""
-
-#: config/tc-alpha.c:1846
-#, c-format
-msgid "No lda !gpdisp!%ld was found"
+#: config/tc-arc.c:1077 config/tc-ip2k.c:249
+msgid "md_estimate_size_before_relax\n"
msgstr ""
-#. Only support one relocation op per insn.
-#: config/tc-alpha.c:1994
-msgid "More than one relocation op per insn"
+#: config/tc-arc.c:1088
+msgid "md_convert_frag\n"
msgstr ""
-#: config/tc-alpha.c:2010
-msgid "No relocation operand"
+#. 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
+msgid "expression too complex"
msgstr ""
-#: config/tc-alpha.c:2020
-#, c-format
-msgid "Unknown relocation operand: !%s"
+#: config/tc-arm.c:352
+msgid "ARM register expected"
msgstr ""
-#: config/tc-alpha.c:2030
-#, c-format
-msgid "no sequence number after !%s"
+#: config/tc-arm.c:353
+msgid "bad or missing co-processor number"
msgstr ""
-#: config/tc-alpha.c:2040
-#, c-format
-msgid "!%s does not use a sequence number"
+#: config/tc-arm.c:354
+msgid "co-processor register expected"
msgstr ""
-#: config/tc-alpha.c:2050
-#, c-format
-msgid "Bad sequence number: !%s!%s"
+#: config/tc-arm.c:355
+msgid "FPA register expected"
msgstr ""
-#: config/tc-alpha.c:2378
-#, c-format
-msgid "operand out of range (%s not between %d and %d)"
+#: config/tc-arm.c:356
+msgid "VFP single precision register expected"
msgstr ""
-#: config/tc-alpha.c:2490 config/tc-alpha.c:2514 config/tc-d10v.c:634
-#: config/tc-d30v.c:639 config/tc-mn10200.c:995 config/tc-mn10300.c:1888
-#: config/tc-ppc.c:2300 config/tc-ppc.c:2517 config/tc-ppc.c:2529
-#: config/tc-s390.c:1246 config/tc-s390.c:1346 config/tc-s390.c:1442
-#: config/tc-v850.c:1804 config/tc-v850.c:1827 config/tc-v850.c:2047
-msgid "too many fixups"
+#: config/tc-arm.c:357
+msgid "VFP double precision register expected"
msgstr ""
-#: config/tc-alpha.c:2526
-msgid "invalid relocation for instruction"
+#: config/tc-arm.c:358
+msgid "VFP system register expected"
msgstr ""
-#: config/tc-alpha.c:2537
-msgid "invalid relocation for field"
+#: config/tc-arm.c:359
+msgid "Maverick MVF register expected"
msgstr ""
-#: config/tc-alpha.c:2642
-#, c-format
-msgid "too many ldah insns for !gpdisp!%ld"
+#: config/tc-arm.c:360
+msgid "Maverick MVD register expected"
msgstr ""
-#: config/tc-alpha.c:2644 config/tc-alpha.c:2656
-#, c-format
-msgid "both insns for !gpdisp!%ld must be in the same section"
+#: config/tc-arm.c:361
+msgid "Maverick MVFX register expected"
msgstr ""
-#: config/tc-alpha.c:2654
-#, c-format
-msgid "too many lda insns for !gpdisp!%ld"
+#: config/tc-arm.c:362
+msgid "Maverick MVDX register expected"
msgstr ""
-#: config/tc-alpha.c:2707
-#, c-format
-msgid "too many lituse insns for !lituse_tlsgd!%ld"
+#: config/tc-arm.c:363
+msgid "Maverick MVAX register expected"
msgstr ""
-#: config/tc-alpha.c:2710
-#, c-format
-msgid "too many lituse insns for !lituse_tlsldm!%ld"
+#: config/tc-arm.c:364
+msgid "Maverick DSPSC register expected"
msgstr ""
-#: config/tc-alpha.c:2727
-#, c-format
-msgid "duplicate !tlsgd!%ld"
+#: config/tc-arm.c:365
+msgid "iWMMXt data register expected"
msgstr ""
-#: config/tc-alpha.c:2729
-#, c-format
-msgid "sequence number in use for !tlsldm!%ld"
+#: config/tc-arm.c:366
+msgid "iWMMXt control register expected"
msgstr ""
-#: config/tc-alpha.c:2743
-#, c-format
-msgid "duplicate !tlsldm!%ld"
+#: config/tc-arm.c:367
+msgid "iWMMXt scalar register expected"
msgstr ""
-#: config/tc-alpha.c:2745
-#, c-format
-msgid "sequence number in use for !tlsgd!%ld"
+#: config/tc-arm.c:368
+msgid "XScale accumulator register expected"
msgstr ""
-#: config/tc-alpha.c:2790 config/tc-alpha.c:2863
-#, c-format
-msgid "inappropriate arguments for opcode `%s'"
+#: config/tc-arm.c:499
+msgid "bad arguments to instruction"
msgstr ""
-#: config/tc-alpha.c:2792 config/tc-alpha.c:2865
-#, c-format
-msgid "opcode `%s' not supported for target %s"
+#: config/tc-arm.c:500
+msgid "r15 not allowed here"
msgstr ""
-#: config/tc-alpha.c:2796 config/tc-alpha.c:2869 config/tc-avr.c:1087
-#: config/tc-msp430.c:446
-#, c-format
-msgid "unknown opcode `%s'"
+#: config/tc-arm.c:501
+msgid "instruction cannot be conditional"
msgstr ""
-#: config/tc-alpha.c:2916
-msgid "can not resolve expression"
+#: config/tc-arm.c:502
+msgid "registers may not be the same"
msgstr ""
-#: config/tc-alpha.c:3060 config/tc-alpha.c:3239
-msgid "overflow in literal (.lita) table"
+#: config/tc-arm.c:503
+msgid "lo register required"
msgstr ""
-#: config/tc-alpha.c:3067 config/tc-alpha.c:3090 config/tc-alpha.c:3252
-#: config/tc-alpha.c:3467 config/tc-alpha.c:3512 config/tc-alpha.c:3586
-#: config/tc-alpha.c:3678 config/tc-alpha.c:3926 config/tc-alpha.c:4025
-msgid "macro requires $at register while noat in effect"
+#: config/tc-arm.c:504
+msgid "instruction not supported in Thumb16 mode"
msgstr ""
-#: config/tc-alpha.c:3069 config/tc-alpha.c:3092 config/tc-alpha.c:3254
-msgid "macro requires $at while $at in use"
+#: config/tc-arm.c:640
+msgid "immediate expression requires a # prefix"
msgstr ""
-#: config/tc-alpha.c:3200
-msgid "bignum invalid; zero assumed"
+#: config/tc-arm.c:666 expr.c:1302 read.c:2228
+msgid "bad expression"
msgstr ""
-#: config/tc-alpha.c:3202
-msgid "floating point number invalid; zero assumed"
+#: config/tc-arm.c:677 config/tc-i860.c:1005 config/tc-sparc.c:2844
+msgid "bad segment"
msgstr ""
-#: config/tc-alpha.c:3207
-msgid "can't handle expression"
+#: config/tc-arm.c:693 config/tc-arm.c:3230 config/tc-i960.c:1302
+msgid "invalid constant"
msgstr ""
-#: config/tc-alpha.c:3245
-msgid "overflow in literal (.lit8) table"
+#: config/tc-arm.c:754
+msgid "bad call to MD_ATOF()"
msgstr ""
-#: config/tc-alpha.c:4262 config/tc-ppc.c:1740 config/tc-ppc.c:4271
-#, c-format
-msgid ".COMMon length (%ld.) <0! Ignored."
+#: config/tc-arm.c:821
+msgid "expected #constant"
msgstr ""
-#: config/tc-alpha.c:4291 config/tc-sparc.c:3799 config/tc-v850.c:256
-msgid "Ignoring attempt to re-define symbol"
+#: config/tc-arm.c:953
+msgid "bad range in register list"
msgstr ""
-#: config/tc-alpha.c:4300 config/tc-alpha.c:4309 config/tc-ppc.c:4308
+#: config/tc-arm.c:961 config/tc-arm.c:970 config/tc-arm.c:1011
#, c-format
-msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld."
-msgstr ""
-
-#: config/tc-alpha.c:4430 ecoff.c:3082
-msgid ".ent directive has no name"
-msgstr ""
-
-#: config/tc-alpha.c:4438
-msgid "nested .ent directives"
-msgstr ""
-
-#: config/tc-alpha.c:4483 ecoff.c:3032
-msgid ".end directive has no name"
+msgid "Warning: duplicated register (r%d) in register list"
msgstr ""
-#: config/tc-alpha.c:4492
-msgid ".end directive without matching .ent"
+#: config/tc-arm.c:973
+msgid "Warning: register range not in ascending order"
msgstr ""
-#: config/tc-alpha.c:4494
-msgid ".end directive names different symbol than .ent"
+#: config/tc-arm.c:984
+msgid "missing `}'"
msgstr ""
-#: config/tc-alpha.c:4538 ecoff.c:3171
-msgid ".fmask outside of .ent"
+#: config/tc-arm.c:1000
+msgid "invalid register mask"
msgstr ""
-#: config/tc-alpha.c:4540 ecoff.c:3241
-msgid ".mask outside of .ent"
+#: 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
+msgid "invalid register list"
msgstr ""
-#: config/tc-alpha.c:4548 ecoff.c:3178
-msgid "bad .fmask directive"
+#: config/tc-arm.c:1097 config/tc-arm.c:2402 config/tc-arm.c:2535
+msgid "register list not in ascending order"
msgstr ""
-#: config/tc-alpha.c:4550 ecoff.c:3248
-msgid "bad .mask directive"
+#: config/tc-arm.c:1118
+msgid "register range not in ascending order"
msgstr ""
-#: config/tc-alpha.c:4584 config/tc-mips.c:14143 ecoff.c:3200
-msgid ".frame outside of .ent"
+#: config/tc-arm.c:1151
+msgid "non-contiguous register range"
msgstr ""
-#: config/tc-alpha.c:4595 ecoff.c:3211
-msgid "bad .frame directive"
+#: config/tc-arm.c:1199
+#, c-format
+msgid "ignoring attempt to redefine built-in register '%s'"
msgstr ""
-#: config/tc-alpha.c:4628
-msgid ".prologue directive without a preceding .ent directive"
+#: config/tc-arm.c:1204
+#, c-format
+msgid "ignoring redefinition of register alias '%s'"
msgstr ""
-#: config/tc-alpha.c:4646
+#: config/tc-arm.c:1248
#, c-format
-msgid "Invalid argument %d to .prologue."
+msgid "unknown register '%s' -- .req ignored"
msgstr ""
-#: config/tc-alpha.c:4741
-msgid "ECOFF debugging is disabled."
+#: config/tc-arm.c:1291
+msgid "invalid syntax for .req directive"
msgstr ""
-#: config/tc-alpha.c:4755
-msgid ".ent directive without matching .end"
+#: config/tc-arm.c:1317
+msgid "invalid syntax for .unreq directive"
msgstr ""
-#: config/tc-alpha.c:4840
-msgid ".usepv directive has no name"
+#: config/tc-arm.c:1323
+#, c-format
+msgid "unknown register alias '%s'"
msgstr ""
-#: config/tc-alpha.c:4851
-msgid ".usepv directive has no type"
+#: config/tc-arm.c:1325
+#, c-format
+msgid "ignoring attempt to undefine built-in register '%s'"
msgstr ""
-#: config/tc-alpha.c:4866
-msgid "unknown argument for .usepv"
+#: config/tc-arm.c:1456
+msgid "selected processor does not support THUMB opcodes"
msgstr ""
-#: config/tc-alpha.c:4900
-msgid "Unknown section directive"
+#: config/tc-arm.c:1470
+msgid "selected processor does not support ARM opcodes"
msgstr ""
-#: config/tc-alpha.c:4936
-msgid ".ent directive has no symbol"
+#: config/tc-arm.c:1483
+#, c-format
+msgid "invalid instruction size selected (%d)"
msgstr ""
-#: config/tc-alpha.c:4963
-msgid "Bad .frame directive 1./2. param"
+#: config/tc-arm.c:1515
+#, c-format
+msgid "invalid operand to .code directive (%d) (expecting 16 or 32)"
msgstr ""
-#: config/tc-alpha.c:4975
-msgid "Bad .frame directive 3./4. param"
+#: config/tc-arm.c:1571
+#, c-format
+msgid "expected comma after name \"%s\""
msgstr ""
-#: config/tc-alpha.c:5000
-msgid ".pdesc directive not in link (.link) section"
+#: config/tc-arm.c:1621 config/tc-m32r.c:589
+#, c-format
+msgid "symbol `%s' already defined"
msgstr ""
-#: config/tc-alpha.c:5008
-msgid ".pdesc has no matching .ent"
+#: config/tc-arm.c:1655
+#, c-format
+msgid "unrecognized syntax mode \"%s\""
msgstr ""
-#: config/tc-alpha.c:5019
-msgid ".pdesc directive has no entry symbol"
+#: config/tc-arm.c:1675
+#, c-format
+msgid "alignment too large: %d assumed"
msgstr ""
-#: config/tc-alpha.c:5032
-msgid "No comma after .pdesc <entryname>"
+#: config/tc-arm.c:1678
+msgid "alignment negative. 0 assumed."
msgstr ""
-#: config/tc-alpha.c:5055
-msgid "unknown procedure kind"
+#: config/tc-arm.c:1816
+msgid "literal pool overflow"
msgstr ""
-#: config/tc-alpha.c:5148
-msgid ".name directive not in link (.link) section"
+#: config/tc-arm.c:1972 config/tc-arm.c:3888
+msgid "unrecognized relocation suffix"
msgstr ""
-#: config/tc-alpha.c:5156
-msgid ".name directive has no symbol"
+#: config/tc-arm.c:1985
+msgid "(plt) is only valid on branch targets"
msgstr ""
-#: config/tc-alpha.c:5190
-msgid "No symbol after .linkage"
+#: config/tc-arm.c:1991 config/tc-s390.c:1128 config/tc-s390.c:1742
+#: config/tc-xtensa.c:1601
+#, c-format
+msgid "%s relocations do not fit in %d bytes"
msgstr ""
-#: config/tc-alpha.c:5218
-msgid "No symbol after .code_address"
+#: config/tc-arm.c:2039 dwarf2dbg.c:659
+msgid "expected 0 or 1"
msgstr ""
-#: config/tc-alpha.c:5251
-msgid "Bad .mask directive"
+#: config/tc-arm.c:2043
+msgid "missing comma"
msgstr ""
-#: config/tc-alpha.c:5272
-msgid "Bad .fmask directive"
+#: config/tc-arm.c:2098
+msgid "dupicate .handlerdata directive"
msgstr ""
-#: config/tc-alpha.c:5440
-#, c-format
-msgid "Expected comma after name \"%s\""
+#: config/tc-arm.c:2169
+msgid "personality routine specified for cantunwind frame"
msgstr ""
-#. *symbol_get_obj (symbolP) = (signed char) temp;
-#: config/tc-alpha.c:5451
-#, c-format
-msgid "unhandled: .proc %s,%d"
+#: config/tc-arm.c:2183
+msgid "duplicate .personalityindex directive"
msgstr ""
-#: config/tc-alpha.c:5486
-#, c-format
-msgid "Tried to .set unrecognized mode `%s'"
+#: config/tc-arm.c:2190
+msgid "bad personality routine number"
msgstr ""
-#. not fatal, but it might not work in the end
-#: config/tc-alpha.c:5503
-msgid "File overrides no-base-register option."
+#: config/tc-arm.c:2209
+msgid "duplicate .personality directive"
msgstr ""
-#: config/tc-alpha.c:5520
-#, c-format
-msgid "Bad base register, using $%d."
+#: config/tc-arm.c:2232 config/tc-arm.c:2354
+msgid "expected register list"
msgstr ""
-#: config/tc-alpha.c:5542
-#, c-format
-msgid "Alignment too large: %d. assumed"
+#: config/tc-arm.c:2310
+msgid "expected , <constant>"
msgstr ""
-#: config/tc-alpha.c:5546 config/tc-d30v.c:2200
-msgid "Alignment negative: 0 assumed"
+#: config/tc-arm.c:2319
+msgid "number of registers must be in the range [1:4]"
msgstr ""
-#: config/tc-alpha.c:5860
-#, c-format
-msgid "Chose GP value of %lx\n"
+#: config/tc-arm.c:2416 config/tc-arm.c:2549
+msgid "bad register range"
msgstr ""
-#: config/tc-alpha.c:5876
-msgid "Bad .section directive: want a,s,w,x,M,S,G,T in string"
+#: config/tc-arm.c:2602
+msgid "register expected"
msgstr ""
-#: config/tc-arc.c:1615 config/tc-arm.c:11416 config/tc-ip2k.c:219
-msgid "md_estimate_size_before_relax\n"
+#: config/tc-arm.c:2612
+msgid "FPA .unwind_save does not take a register list"
msgstr ""
-#: config/tc-arc.c:1627
-msgid "md_convert_frag\n"
+#: config/tc-arm.c:2625
+msgid ".unwind_save does not support this kind of register"
msgstr ""
-#. We can't actually support subtracting a symbol.
-#: config/tc-arc.c:1898 config/tc-arm.c:6617 config/tc-arm.c:9705
-#: config/tc-arm.c:9805 config/tc-avr.c:854 config/tc-cris.c:3123
-#: config/tc-d10v.c:1710 config/tc-d30v.c:1851 config/tc-mips.c:3630
-#: config/tc-mips.c:4695 config/tc-mips.c:5828 config/tc-mips.c:6517
-#: config/tc-msp430.c:1403 config/tc-ppc.c:5460 config/tc-v850.c:2356
-#: config/tc-xstormy16.c:483
-msgid "expression too complex"
+#: config/tc-arm.c:2650
+msgid "SP and PC not permitted in .unwind_movsp directive"
msgstr ""
-#: config/tc-arm.c:763
-msgid "ARM register expected"
+#: config/tc-arm.c:2655
+msgid "unexpected .unwind_movsp directive"
msgstr ""
-#: config/tc-arm.c:764 config/tc-arm.c:3174
-msgid "bad or missing co-processor number"
+#: config/tc-arm.c:2679
+msgid "stack increment must be multiple of 4"
msgstr ""
-#. In the few cases where we might be able to accept something else
-#. this error can be overridden.
-#: config/tc-arm.c:765 config/tc-arm.c:3229
-msgid "co-processor register expected"
+#: config/tc-arm.c:2708
+msgid "expected <reg>, <reg>"
msgstr ""
-#: config/tc-arm.c:766
-msgid "FPA register expected"
+#: config/tc-arm.c:2726
+msgid "register must be either sp or set by a previousunwind_movsp directive"
msgstr ""
-#: config/tc-arm.c:767
-msgid "VFP single precision register expected"
+#: config/tc-arm.c:2762
+msgid "expected <offset>, <opcode>"
msgstr ""
-#: config/tc-arm.c:768
-msgid "VFP double precision register expected"
+#: config/tc-arm.c:2774
+msgid "unwind opcode too long"
msgstr ""
-#: config/tc-arm.c:769
-msgid "Maverick MVF register expected"
+#: config/tc-arm.c:2779
+msgid "invalid unwind opcode"
msgstr ""
-#: config/tc-arm.c:770
-msgid "Maverick MVD register expected"
+#: config/tc-arm.c:2829
+msgid "expected numeric constant"
msgstr ""
-#: config/tc-arm.c:771 config/tc-arm.c:772
-msgid "Maverick MVFX register expected"
+#: config/tc-arm.c:2838
+msgid "expected comma"
msgstr ""
-#: config/tc-arm.c:773
-msgid "Maverick MVAX register expected"
+#: config/tc-arm.c:2877
+msgid "bad string constant"
msgstr ""
-#: config/tc-arm.c:774
-msgid "Maverick DSPSC register expected"
+#: config/tc-arm.c:2881
+msgid "expected <tag> , <value>"
msgstr ""
-#: config/tc-arm.c:775
-msgid "Intel Wireless MMX technology register expected"
+#: config/tc-arm.c:2957
+msgid "constant expression required"
msgstr ""
-#: config/tc-arm.c:2309
-msgid "bad arguments to instruction"
+#: 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
+msgid "immediate value out of range"
msgstr ""
-#: config/tc-arm.c:2310
-msgid "r15 not allowed here"
+#: config/tc-arm.c:3058
+msgid "invalid FPA immediate expression"
msgstr ""
-#: config/tc-arm.c:2311
-msgid "instruction is not conditional"
+#: config/tc-arm.c:3108 config/tc-arm.c:3116
+msgid "shift expression expected"
msgstr ""
-#: config/tc-arm.c:2312
-msgid "acc0 expected"
+#: config/tc-arm.c:3130
+msgid "'LSL' or 'ASR' required"
msgstr ""
-#: config/tc-arm.c:2505
-msgid "literal pool overflow"
+#: config/tc-arm.c:3138
+msgid "'LSL' required"
msgstr ""
-#: config/tc-arm.c:2647
-msgid "invalid syntax for .req directive"
+#: config/tc-arm.c:3146
+msgid "'ASR' required"
msgstr ""
-#: config/tc-arm.c:2727
-#, c-format
-msgid "alignment too large: %d assumed"
+#: config/tc-arm.c:3218 config/tc-arm.c:4349 config/tc-v850.c:1844
+#: config/tc-v850.c:1865
+msgid "constant expression expected"
msgstr ""
-#: config/tc-arm.c:2730
-msgid "alignment negative. 0 assumed."
+#: config/tc-arm.c:3225
+msgid "invalid rotation"
msgstr ""
-#: config/tc-arm.c:2814
-#, c-format
-msgid "expected comma after name \"%s\""
+#: config/tc-arm.c:3340 config/tc-arm.c:3640
+msgid "']' expected"
msgstr ""
-#: config/tc-arm.c:2864 config/tc-m32r.c:420
-#, c-format
-msgid "symbol `%s' already defined"
+#: config/tc-arm.c:3358
+msgid "'}' expected at end of 'option' field"
msgstr ""
-#: config/tc-arm.c:2889
-msgid "selected processor does not support THUMB opcodes"
+#: config/tc-arm.c:3363
+msgid "cannot combine index with option"
msgstr ""
-#: config/tc-arm.c:2902
-msgid "selected processor does not support ARM opcodes"
+#: config/tc-arm.c:3376
+msgid "cannot combine pre- and post-indexing"
msgstr ""
-#: config/tc-arm.c:2914
-#, c-format
-msgid "invalid instruction size selected (%d)"
+#: config/tc-arm.c:3472
+msgid "flag for {c}psr instruction expected"
msgstr ""
-#: config/tc-arm.c:2949
-#, c-format
-msgid "invalid operand to .code directive (%d) (expecting 16 or 32)"
+#: config/tc-arm.c:3497
+msgid "unrecognized CPS flag"
msgstr ""
-#: config/tc-arm.c:2960
-msgid "garbage following instruction"
+#: config/tc-arm.c:3504
+msgid "missing CPS flags"
msgstr ""
-#. In the few cases where we might be able to accept something else
-#. this error can be overridden.
-#: config/tc-arm.c:3010
-#, c-format
-msgid "register expected, not '%.100s'"
+#: config/tc-arm.c:3527 config/tc-arm.c:3533
+msgid "valid endian specifiers are be or le"
msgstr ""
-#. In the few cases where we might be able to accept
-#. something else this error can be overridden.
-#: config/tc-arm.c:3061
-#, c-format
-msgid "Intel Wireless MMX technology register expected, not '%.100s'"
+#: config/tc-arm.c:3555
+msgid "missing rotation field after comma"
msgstr ""
-#. In the few cases where we might be able to accept
-#. something else this error can be overridden.
-#: config/tc-arm.c:3133
-msgid "flag for {c}psr instruction expected"
+#: config/tc-arm.c:3570
+msgid "rotation can only be 0, 8, 16, or 24"
msgstr ""
-#: config/tc-arm.c:3167
-msgid "illegal co-processor number"
+#: config/tc-arm.c:3590
+msgid "condition required"
msgstr ""
-#: config/tc-arm.c:3199 config/tc-arm.c:4778
-msgid "bad or missing expression"
+#: config/tc-arm.c:3632
+msgid "invalid shift"
msgstr ""
-#: config/tc-arm.c:3205
-msgid "immediate co-processor expression too large"
+#: config/tc-arm.c:3929
+msgid "iWMMXt data or control register expected"
msgstr ""
-#. In the few cases where we might be able to accept something else
-#. this error can be overridden.
-#: config/tc-arm.c:3252
-msgid "floating point register expected"
+#: config/tc-arm.c:4051
+msgid "garbage following instruction"
msgstr ""
-#: config/tc-arm.c:3269 config/tc-arm.c:3414
-msgid "immediate expression expected"
+#: config/tc-arm.c:4185
+msgid "instruction does not accept preindexed addressing"
msgstr ""
-#: config/tc-arm.c:3284
-msgid "co-processor address must be word aligned"
+#. unindexed - only for coprocessor
+#: config/tc-arm.c:4201 config/tc-arm.c:5857
+msgid "instruction does not accept unindexed addressing"
msgstr ""
-#: config/tc-arm.c:3290 config/tc-arm.c:3429
-msgid "offset too large"
+#: config/tc-arm.c:4209
+msgid "destination register same as write-back base"
msgstr ""
-#: config/tc-arm.c:3339 config/tc-arm.c:3477
-msgid "pc may not be used in post-increment"
+#: config/tc-arm.c:4210
+msgid "source register same as write-back base"
msgstr ""
-#: config/tc-arm.c:3355 config/tc-arm.c:3493 config/tc-arm.c:3938
-#: config/tc-arm.c:5197 config/tc-arm.c:6064 config/tc-arm.c:6398
-msgid "pre-indexed expression expected"
+#: config/tc-arm.c:4256
+msgid "instruction does not accept scaled register index"
msgstr ""
-#: config/tc-arm.c:3368 config/tc-arm.c:3506 config/tc-arm.c:3951
-#: config/tc-arm.c:5208 config/tc-arm.c:6076 config/tc-arm.c:6410
-#: config/tc-arm.c:6784 config/tc-arm.c:9448 config/tc-arm.c:9463
-msgid "missing ]"
+#: config/tc-arm.c:4295
+msgid "instruction does not support unindexed addressing"
msgstr ""
-#: config/tc-arm.c:3378 config/tc-arm.c:3516
+#: config/tc-arm.c:4310
msgid "pc may not be used with write-back"
msgstr ""
-#: config/tc-arm.c:3568
-msgid "comma expected after register name"
+#: config/tc-arm.c:4315
+msgid "instruction does not support writeback"
msgstr ""
-#: config/tc-arm.c:3587
-msgid "CPSR or SPSR expected"
+#: config/tc-arm.c:4344
+msgid "invalid pseudo operation"
msgstr ""
-#: config/tc-arm.c:3613
-msgid "comma missing after psr flags"
+#: config/tc-arm.c:4390
+msgid "literal pool insertion failed"
msgstr ""
-#: config/tc-arm.c:3629 config/tc-arm.c:3639
-msgid "only a register or immediate value can follow a psr flag"
+#: config/tc-arm.c:4448
+msgid "Rn must not overlap other operands"
msgstr ""
-#: config/tc-arm.c:3650
-msgid "immediate value cannot be used to set this field"
+#: 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
+msgid "bit-field extends past end of register"
msgstr ""
-#: config/tc-arm.c:3668 config/tc-arm.c:5424 config/tc-arm.c:5704
-#: config/tc-arm.c:5724 config/tc-i960.c:1935
-msgid "invalid constant"
+#: config/tc-arm.c:4595
+msgid "the only suffix valid here is '(plt)'"
msgstr ""
-#: config/tc-arm.c:3716
-msgid "rdhi, rdlo and rm must all be different"
+#: config/tc-arm.c:4627
+msgid "use of r15 in blx in ARM mode is not really useful"
msgstr ""
-#: config/tc-arm.c:3770
-msgid "rd and rm should be different in mul"
+#: config/tc-arm.c:4645
+msgid "use of r15 in bx in ARM mode is not really useful"
msgstr ""
-#: config/tc-arm.c:3824
-msgid "rd and rm should be different in mla"
+#: config/tc-arm.c:4657 config/tc-arm.c:6508
+msgid "use of r15 in bxj is not really useful"
msgstr ""
-#: config/tc-arm.c:3872
-#, c-format
-msgid "acc0 expected, not '%.100s'"
+#: config/tc-arm.c:4761 config/tc-arm.c:4770
+msgid "writeback of base register is UNPREDICTABLE"
msgstr ""
-#: config/tc-arm.c:4050
-msgid "rdhi and rdlo must be different"
+#: config/tc-arm.c:4764
+msgid "writeback of base register when in register list is UNPREDICTABLE"
msgstr ""
-#: config/tc-arm.c:4158
-msgid "Warning: instruction unpredictable when using r15"
+#: config/tc-arm.c:4774
+msgid "if writeback register is in list, it must be the lowest reg in the list"
msgstr ""
-#: config/tc-arm.c:4373
-msgid "use of r15 in bxj is not really useful"
+#: config/tc-arm.c:4789
+msgid "first destination register must be even"
msgstr ""
-#: config/tc-arm.c:4400 config/tc-arm.c:4585 config/tc-arm.c:5445 expr.c:1318
-#: read.c:2206
-msgid "bad expression"
+#: config/tc-arm.c:4792 config/tc-arm.c:4849
+msgid "can only load two consecutive registers"
msgstr ""
-#: config/tc-arm.c:4409 config/tc-arm.c:4594 config/tc-arm.c:4786
-#: config/tc-arm.c:8389 config/tc-arm.c:8424 config/tc-arm.c:8434
-#: config/tc-z8k.c:1161 config/tc-z8k.c:1173
-msgid "immediate value out of range"
+#. If op 1 were present and equal to PC, this function wouldn't
+#. 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
+msgid "r14 not allowed here"
msgstr ""
-#: config/tc-arm.c:4833
-msgid "only r15 allowed here"
+#: config/tc-arm.c:4794
+msgid "'[' expected"
msgstr ""
-#: config/tc-arm.c:5160
-msgid "'[' expected after PLD mnemonic"
+#: config/tc-arm.c:4807
+msgid "base register written back, and overlaps second destination register"
msgstr ""
-#: config/tc-arm.c:5182
-msgid "post-indexed expression used in preload instruction"
+#: config/tc-arm.c:4815
+msgid "index register overlaps destination register"
msgstr ""
-#: config/tc-arm.c:5187 config/tc-arm.c:5217
-msgid "writeback used in preload instruction"
+#: 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:5259
-msgid "destination register must be even"
+#: config/tc-arm.c:4835 config/tc-arm.c:5281
+msgid "offset must be zero in ARM encoding"
msgstr ""
-#: config/tc-arm.c:5265
-msgid "r14 not allowed here"
+#: config/tc-arm.c:4846 config/tc-arm.c:5293
+msgid "even register required"
msgstr ""
-#: config/tc-arm.c:5272
-msgid "pre/post-indexing used when modified address register is destination"
+#: config/tc-arm.c:4877 config/tc-arm.c:4908
+msgid "this instruction requires a post-indexed address"
msgstr ""
-#: config/tc-arm.c:5282
-msgid "ldrd destination registers must not overlap index register"
+#: config/tc-arm.c:4935
+msgid "rd and rm should be different in mla"
msgstr ""
-#: config/tc-arm.c:5408
-msgid "bad_segment"
+#: config/tc-arm.c:4967 config/tc-arm.c:7121
+msgid "'CPSR' or 'SPSR' expected"
msgstr ""
-#: config/tc-arm.c:5468 config/tc-arm.c:5479
-msgid "shift expression expected"
+#: config/tc-arm.c:5000
+msgid "rd and rm should be different in mul"
msgstr ""
-#: config/tc-arm.c:5503
-msgid "shift requires register or #expression"
+#: config/tc-arm.c:5021
+msgid "rdhi, rdlo and rm must all be different"
msgstr ""
-#: config/tc-arm.c:5504
-msgid "shift requires #expression"
+#: config/tc-arm.c:5083
+msgid "'[' expected after PLD mnemonic"
msgstr ""
-#: config/tc-arm.c:5534
-msgid "shift of 0 ignored."
+#: config/tc-arm.c:5085
+msgid "post-indexed expression used in preload instruction"
msgstr ""
-#: config/tc-arm.c:5540
-msgid "invalid immediate shift"
+#: config/tc-arm.c:5087
+msgid "writeback used in preload instruction"
msgstr ""
-#: config/tc-arm.c:5695 config/tc-arm.c:6112 config/tc-arm.c:6447
-#: config/tc-arm.c:7081 config/tc-v850.c:1907 config/tc-v850.c:1928
-msgid "constant expression expected"
+#: config/tc-arm.c:5089
+msgid "unindexed addressing used in preload instruction"
msgstr ""
-#: config/tc-arm.c:5737
-msgid "register or shift expression expected"
+#: config/tc-arm.c:5188 config/tc-arm.c:7492
+msgid "source1 and dest must be same register"
msgstr ""
-#: config/tc-arm.c:5790
-msgid "invalid floating point immediate expression"
+#: config/tc-arm.c:5238 config/tc-arm.c:7178
+msgid "rdhi and rdlo must be different"
msgstr ""
-#: config/tc-arm.c:5794
-msgid "floating point register or immediate expression expected"
+#: config/tc-arm.c:5296
+msgid "can only store two consecutive registers"
msgstr ""
-#: config/tc-arm.c:5948 config/tc-arm.c:6278
-msgid "address offset too large"
+#: config/tc-arm.c:5391 config/tc-arm.c:5408
+msgid "only two consecutive VFP SP registers allowed here"
msgstr ""
-#: config/tc-arm.c:6006 config/tc-arm.c:6196 config/tc-arm.c:6338
-msgid "address expected"
+#: config/tc-arm.c:5436 config/tc-arm.c:5451
+msgid "this addressing mode requires base-register writeback"
msgstr ""
-#: config/tc-arm.c:6036 config/tc-arm.c:6048 config/tc-arm.c:6085
-#: config/tc-arm.c:6214 config/tc-arm.c:6368 config/tc-arm.c:6382
-#: config/tc-arm.c:6419
-#, c-format
-msgid "%s register same as write-back base"
+#: config/tc-arm.c:5529
+msgid "this instruction does not support indexing"
msgstr ""
-#: config/tc-arm.c:6038 config/tc-arm.c:6050 config/tc-arm.c:6087
-#: config/tc-arm.c:6216 config/tc-arm.c:6370 config/tc-arm.c:6384
-#: config/tc-arm.c:6421
-msgid "destination"
+#: config/tc-arm.c:5552
+msgid "only r15 allowed here"
msgstr ""
-#: config/tc-arm.c:6038 config/tc-arm.c:6050 config/tc-arm.c:6087
-#: config/tc-arm.c:6216 config/tc-arm.c:6370 config/tc-arm.c:6384
-#: config/tc-arm.c:6421
-msgid "source"
+#: config/tc-arm.c:5757
+msgid "shift by register not allowed in thumb mode"
msgstr ""
-#: config/tc-arm.c:6097 config/tc-arm.c:6431 config/tc-arm.c:8695
-msgid "invalid pseudo operation"
+#: config/tc-arm.c:5769 config/tc-arm.c:11339
+msgid "shift expression is too large"
msgstr ""
-#: config/tc-arm.c:6149 config/tc-arm.c:6482
-msgid "literal pool insertion failed"
+#: config/tc-arm.c:5795
+msgid "Thumb does not support the ldr =N pseudo-operation"
msgstr ""
-#: config/tc-arm.c:6244 config/tc-arm.c:6250
-msgid "post-indexed expression expected"
+#: config/tc-arm.c:5800
+msgid "cannot use register index with PC-relative addressing"
msgstr ""
-#: config/tc-arm.c:6548
-msgid "bad range in register list"
+#: config/tc-arm.c:5801
+msgid "cannot use register index with this instruction"
msgstr ""
-#: config/tc-arm.c:6556 config/tc-arm.c:6565 config/tc-arm.c:6607
-#, c-format
-msgid "Warning: duplicated register (r%d) in register list"
+#: config/tc-arm.c:5803
+msgid "Thumb does not support negative register indexing"
msgstr ""
-#: config/tc-arm.c:6568
-msgid "Warning: register range not in ascending order"
+#: config/tc-arm.c:5805
+msgid "Thumb does not support register post-indexing"
msgstr ""
-#: config/tc-arm.c:6580
-msgid "missing `}'"
+#: config/tc-arm.c:5807
+msgid "Thumb does not support register indexing with writeback"
msgstr ""
-#: config/tc-arm.c:6596
-msgid "invalid register mask"
+#: config/tc-arm.c:5809
+msgid "Thumb supports only LSL in shifted register indexing"
msgstr ""
-#: config/tc-arm.c:6655
-msgid "r15 not allowed as base register"
+#: config/tc-arm.c:5818
+msgid "shift out of range"
msgstr ""
-#: config/tc-arm.c:6689 config/tc-arm.c:6698
-msgid "writeback of base register is UNPREDICTABLE"
+#: config/tc-arm.c:5826
+msgid "cannot use writeback with PC-relative addressing"
msgstr ""
-#: config/tc-arm.c:6692
-msgid "writeback of base register when in register list is UNPREDICTABLE"
+#: config/tc-arm.c:5828
+msgid "cannot use writeback with this instruction"
msgstr ""
-#: config/tc-arm.c:6702
-msgid "if writeback register is in list, it must be the lowest reg in the list"
+#: config/tc-arm.c:5847
+msgid "cannot use post-indexing with PC-relative addressing"
msgstr ""
-#: config/tc-arm.c:6744 config/tc-arm.c:6758
-msgid "r15 not allowed in swap"
+#: config/tc-arm.c:5848
+msgid "cannot use post-indexing with this instruction"
msgstr ""
-#: config/tc-arm.c:6853
-msgid "use of r15 in bx in ARM mode is not really useful"
+#: config/tc-arm.c:5975
+msgid "PC not allowed as destination"
msgstr ""
-#: config/tc-arm.c:7087
-msgid "constant value required for number of registers"
-msgstr ""
-
-#: config/tc-arm.c:7095
-msgid "number of registers must be in the range [1:4]"
+#: config/tc-arm.c:6093 config/tc-arm.c:6234 config/tc-arm.c:6326
+#: config/tc-arm.c:7092
+msgid "shift must be constant"
msgstr ""
-#: config/tc-arm.c:7156
-msgid "r15 not allowed as base register with write-back"
+#: config/tc-arm.c:6120 config/tc-arm.c:6249 config/tc-arm.c:6341
+#: config/tc-arm.c:7105
+msgid "unshifted register required"
msgstr ""
-#: config/tc-arm.c:7538
-msgid "only two consecutive VFP SP registers allowed here"
+#: config/tc-arm.c:6135 config/tc-arm.c:6352 config/tc-arm.c:7165
+msgid "dest must overlap one source register"
msgstr ""
-#: config/tc-arm.c:7706
-msgid "VFP system register expected"
+#: config/tc-arm.c:6252
+msgid "dest and source1 must be the same register"
msgstr ""
-#: config/tc-arm.c:7844 config/tc-arm.c:7883 config/tc-arm.c:7896
-#: config/tc-arm.c:7957 config/tc-arm.c:7996 config/tc-arm.c:8009
-#: config/tc-h8300.c:1035 config/tc-mips.c:9723 config/tc-mips.c:9753
-msgid "invalid register list"
+#: config/tc-arm.c:6537
+msgid "Thumb does not support the 2-argument form of this instruction"
msgstr ""
-#: config/tc-arm.c:7850 config/tc-arm.c:7963
-msgid "register list not in ascending order"
+#: config/tc-arm.c:6616
+msgid "Thumb load/store multiple does not support {reglist}^"
msgstr ""
-#: config/tc-arm.c:7875 config/tc-arm.c:7988
-msgid "register range not in ascending order"
+#: 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"
msgstr ""
-#: config/tc-arm.c:7913 config/tc-arm.c:8026
-msgid "non-contiguous register range"
+#: config/tc-arm.c:6643
+msgid "SP should not be in register list"
msgstr ""
-#: config/tc-arm.c:8056 config/tc-arm.c:8093
-msgid "this addressing mode requires base-register writeback"
+#: config/tc-arm.c:6647
+msgid "PC should not be in register list"
msgstr ""
-#: config/tc-arm.c:8253
-msgid "lo register required"
+#: config/tc-arm.c:6656 config/tc-arm.c:7311
+msgid "LR and PC should not both be in register list"
msgstr ""
-#: config/tc-arm.c:8261
-msgid "hi register required"
+#: config/tc-arm.c:6659
+msgid "base register should not be in register list when written back"
msgstr ""
-#: config/tc-arm.c:8331 config/tc-arm.c:9537
-msgid "dest and source1 must be the same register"
+#: config/tc-arm.c:6677 config/tc-arm.c:6687
+msgid "this instruction will write back the base register"
msgstr ""
-#: config/tc-arm.c:8338
-msgid "subtract valid only on lo regs"
+#: config/tc-arm.c:6690
+msgid "this instruction will not write back the base register"
msgstr ""
-#: config/tc-arm.c:8362
-msgid "invalid Hi register with immediate"
+#: config/tc-arm.c:6719
+msgid "r14 not allowed as first register when second register is omitted"
msgstr ""
-#: config/tc-arm.c:8402
-msgid "invalid immediate value for stack adjust"
+#: config/tc-arm.c:6809 config/tc-arm.c:6822 config/tc-arm.c:6858
+msgid "Thumb does not support this addressing mode"
msgstr ""
-#: config/tc-arm.c:8413
-msgid "invalid immediate for address calculation"
+#: config/tc-arm.c:6826
+msgid "byte or halfword not valid for base register"
msgstr ""
-#: config/tc-arm.c:8500
-msgid "source1 and dest must be same register"
+#: config/tc-arm.c:6829
+msgid "r15 based store not allowed"
msgstr ""
-#: config/tc-arm.c:8534
-msgid "invalid immediate for shift"
+#: config/tc-arm.c:6831
+msgid "invalid base register for register offset"
msgstr ""
-#: config/tc-arm.c:8613
+#: config/tc-arm.c:7032
msgid "only lo regs allowed with immediate"
msgstr ""
-#: config/tc-arm.c:8632
-msgid "invalid immediate"
+#: config/tc-arm.c:7130
+msgid "Thumb encoding does not support an immediate here"
msgstr ""
-#: config/tc-arm.c:8686
-msgid "expected ']'"
+#: config/tc-arm.c:7200
+msgid "Thumb does not support NOP with hints"
msgstr ""
-#: config/tc-arm.c:8759
-msgid "byte or halfword not valid for base register"
+#: config/tc-arm.c:7282
+msgid "push/pop do not support {reglist}^"
msgstr ""
-#: config/tc-arm.c:8764
-msgid "r15 based store not allowed"
+#: config/tc-arm.c:7301
+msgid "SP not allowed in register list"
msgstr ""
-#: config/tc-arm.c:8769
-msgid "invalid base register for register offset"
+#: config/tc-arm.c:7305
+msgid "PC not allowed in register list"
msgstr ""
-#: config/tc-arm.c:8787 config/tc-arm.c:8822
-msgid "invalid offset"
+#: config/tc-arm.c:7328
+msgid "invalid register list to push/pop instruction"
msgstr ""
-#: config/tc-arm.c:8798
-msgid "invalid base register in load/store"
+#: config/tc-arm.c:7513
+msgid "ror #imm not supported"
msgstr ""
-#: config/tc-arm.c:9341
-msgid "expecting immediate, 7bit operand"
+#: config/tc-arm.c:7638
+msgid "Thumb encoding does not support rotation"
msgstr ""
-#: config/tc-arm.c:9356
-msgid "immediate out of range"
+#: config/tc-arm.c:7656
+msgid "PC is not a valid index register"
msgstr ""
-#: config/tc-arm.c:9399
-msgid "offset expected"
+#: config/tc-arm.c:7658
+msgid "instruction does not allow shifted index"
msgstr ""
-#: config/tc-arm.c:9408 config/tc-pj.c:537 config/tc-sh.c:3593
-msgid "offset out of range"
+#: config/tc-arm.c:7660
+msgid "instruction requires shifted index"
msgstr ""
-#: config/tc-arm.c:9545
-msgid "Rs and Rd must be different in MUL"
+#: config/tc-arm.c:7943 config/tc-arm.c:8015
+msgid "conditional infixes are deprecated in unified syntax"
msgstr ""
-#: config/tc-arm.c:9689
-msgid ""
-"inserted missing '!': load/store multiple always writes back base register"
+#: config/tc-arm.c:8047
+#, c-format
+msgid "bad instruction `%s'"
msgstr ""
-#: config/tc-arm.c:9711
-msgid "only lo-regs valid in load/store multiple"
+#: config/tc-arm.c:8063 config/tc-arm.c:8126
+#, c-format
+msgid "selected processor does not support `%s'"
msgstr ""
-#: config/tc-arm.c:9757
-msgid "syntax: ldrs[b] Rd, [Rb, Ro]"
+#: config/tc-arm.c:8069
+msgid "Thumb does not support conditional execution"
msgstr ""
-#: config/tc-arm.c:9821
-msgid "invalid register list to push/pop instruction"
+#: config/tc-arm.c:8080
+msgid "incorrect condition in IT block"
msgstr ""
-#: config/tc-arm.c:9933 config/tc-arm.c:10159
-msgid "virtual memory exhausted"
+#: config/tc-arm.c:8088
+msgid "thumb conditional instrunction not in IT block"
msgstr ""
-#: config/tc-arm.c:10014
+#: config/tc-arm.c:8108
#, c-format
-msgid "register '%s' does not exist\n"
+msgid "cannot honor width suffix -- `%s'"
msgstr ""
-#: config/tc-arm.c:10018
+#: config/tc-arm.c:8131
#, c-format
-msgid ""
-"ignoring redefinition of register alias '%s' to non-existant register '%s'"
+msgid "width suffixes are invalid in ARM mode -- `%s'"
msgstr ""
-#: config/tc-arm.c:10027
-#, c-format
-msgid "ignoring redefinition of register alias '%s'"
+#: config/tc-arm.c:10340
+msgid "alignments greater than 32 bytes not supported in .text sections."
msgstr ""
-#: config/tc-arm.c:10033
-msgid "ignoring incomplete .req pseuso op"
+#: config/tc-arm.c:10634
+msgid "handerdata in cantunwind frame"
msgstr ""
-#: config/tc-arm.c:10183
-msgid "use of old and new-style options to set CPU type"
+#: config/tc-arm.c:10651
+msgid "too many unwind opcodes for personality routine 0"
msgstr ""
-#: config/tc-arm.c:10193
-msgid "use of old and new-style options to set FPU type"
+#: config/tc-arm.c:10683
+msgid "too many unwind opcodes"
msgstr ""
-#: config/tc-arm.c:10473
-msgid "bad call to MD_ATOF()"
+#: config/tc-arm.c:11085 config/tc-arm.c:11365
+#, c-format
+msgid "undefined symbol %s used as an immediate value"
msgstr ""
-#: config/tc-arm.c:10703
+#: config/tc-arm.c:11099 config/tc-arm.c:11394
#, c-format
msgid "invalid constant (%lx) after fixup"
msgstr ""
-#: config/tc-arm.c:10741
+#: config/tc-arm.c:11136
#, c-format
msgid "unable to compute ADRL instructions for PC offset of 0x%lx"
msgstr ""
-#: config/tc-arm.c:10771
-#, c-format
-msgid "bad immediate value for offset (%ld)"
+#: config/tc-arm.c:11168 config/tc-arm.c:11193
+msgid "invalid literal constant: pool needs to be closer"
msgstr ""
-#: config/tc-arm.c:10793 config/tc-arm.c:10815
-msgid "invalid literal constant: pool needs to be closer"
+#: config/tc-arm.c:11171 config/tc-arm.c:11209
+#, c-format
+msgid "bad immediate value for offset (%ld)"
msgstr ""
-#: config/tc-arm.c:10795
+#: config/tc-arm.c:11195
#, c-format
msgid "bad immediate value for half-word offset (%ld)"
msgstr ""
-#: config/tc-arm.c:10832
-msgid "shift expression is too large"
+#: config/tc-arm.c:11250
+msgid "offset not a multiple of 4"
msgstr ""
-#: config/tc-arm.c:10851 config/tc-arm.c:10860
+#: 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
+msgid "offset out of range"
+msgstr ""
+
+#: config/tc-arm.c:11410
+msgid "invalid smc expression"
+msgstr ""
+
+#: config/tc-arm.c:11421 config/tc-arm.c:11430
msgid "invalid swi expression"
msgstr ""
-#: config/tc-arm.c:10870
+#: config/tc-arm.c:11440
msgid "invalid expression in load/store multiple"
msgstr ""
-#: config/tc-arm.c:10923
-msgid "GAS can't handle same-section branch dest >= 0x04000000"
+#: config/tc-arm.c:11455
+msgid "misaligned branch destination"
msgstr ""
-#: config/tc-arm.c:10932
-msgid "out of range branch"
+#: 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
+msgid "branch out of range"
msgstr ""
-#: config/tc-arm.c:10965 config/tc-arm.c:10981
-msgid "branch out of range"
+#: config/tc-arm.c:11475
+msgid "misaligned BLX destination"
msgstr ""
-#: config/tc-arm.c:11005
-msgid "branch with link out of range"
+#: config/tc-arm.c:11536
+msgid "conditional branch out of range"
msgstr ""
-#: config/tc-arm.c:11074
-msgid "illegal value for co-processor offset"
+#: config/tc-arm.c:11657
+msgid "rel31 relocation overflow"
msgstr ""
-#: config/tc-arm.c:11086
-msgid "Illegal value for co-processor offset"
+#: config/tc-arm.c:11669 config/tc-arm.c:11694
+msgid "co-processor offset out of range"
msgstr ""
-#: config/tc-arm.c:11110
+#: config/tc-arm.c:11710
#, c-format
-msgid "invalid offset, target not word aligned (0x%08X)"
+msgid "invalid offset, target not word aligned (0x%08lX)"
msgstr ""
-#: config/tc-arm.c:11116 config/tc-arm.c:11126 config/tc-arm.c:11134
-#: config/tc-arm.c:11142 config/tc-arm.c:11150
+#: 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
#, c-format
msgid "invalid offset, value too big (0x%08lX)"
msgstr ""
-#: config/tc-arm.c:11190
+#: config/tc-arm.c:11790
+msgid "invalid Hi register with immediate"
+msgstr ""
+
+#: config/tc-arm.c:11806
msgid "invalid immediate for stack address calculation"
msgstr ""
-#: config/tc-arm.c:11199
+#: config/tc-arm.c:11814
#, c-format
msgid "invalid immediate for address calculation (value = 0x%08lX)"
msgstr ""
-#: config/tc-arm.c:11209
-msgid "invalid 8bit immediate"
-msgstr ""
-
-#: config/tc-arm.c:11217
-msgid "invalid 3bit immediate"
-msgstr ""
-
-#: config/tc-arm.c:11233
+#: config/tc-arm.c:11844
#, c-format
msgid "invalid immediate: %ld is too large"
msgstr ""
-#: config/tc-arm.c:11248
+#: config/tc-arm.c:11856
#, c-format
-msgid "illegal Thumb shift value: %ld"
+msgid "invalid shift value: %ld"
msgstr ""
-#: config/tc-arm.c:11262
+#: config/tc-arm.c:11875
#, c-format
msgid "bad relocation fixup type (%d)"
msgstr ""
-#: config/tc-arm.c:11333
+#: config/tc-arm.c:11943
msgid "literal referenced across section boundary"
msgstr ""
-#: config/tc-arm.c:11346
+#: config/tc-arm.c:11973
msgid "internal relocation (type: IMMEDIATE) not fixed up"
msgstr ""
-#: config/tc-arm.c:11351
+#: config/tc-arm.c:11978
msgid "ADRL used for a symbol not defined in the same file"
msgstr ""
-#: config/tc-arm.c:11356
+#: config/tc-arm.c:11987
+#, c-format
+msgid "undefined local label `%s'"
+msgstr ""
+
+#: config/tc-arm.c:11993
msgid "internal_relocation (type: OFFSET_IMM) not fixed up"
msgstr ""
-#: config/tc-arm.c:11374 config/tc-cris.c:3063 config/tc-mcore.c:2052
-#: config/tc-mmix.c:2867 config/tc-ns32k.c:2396
+#: 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
msgid "<unknown>"
msgstr ""
-#: config/tc-arm.c:11377 config/tc-arm.c:11398
+#: config/tc-arm.c:12017 config/tc-arm.c:12038
#, c-format
msgid "cannot represent %s relocation in this object file format"
msgstr ""
-#: config/tc-arm.c:11494
+#: config/tc-arm.c:12254
#, c-format
-msgid "no operator -- statement `%s'\n"
+msgid "%s: unexpected function type: %d"
msgstr ""
-#: config/tc-arm.c:11512 config/tc-arm.c:11537
-#, c-format
-msgid "selected processor does not support `%s'"
+#: config/tc-arm.c:12331
+msgid "virtual memory exhausted"
msgstr ""
-#: config/tc-arm.c:11554
-#, c-format
-msgid "bad instruction `%s'"
+#: config/tc-arm.c:12357
+msgid "use of old and new-style options to set CPU type"
+msgstr ""
+
+#: config/tc-arm.c:12367
+msgid "use of old and new-style options to set FPU type"
+msgstr ""
+
+#: config/tc-arm.c:12441
+msgid "hard-float conflicts with specified fpu"
msgstr ""
-#: config/tc-arm.c:11655
+#: config/tc-arm.c:12633
msgid "generate PIC code"
msgstr ""
-#: config/tc-arm.c:11656
+#: config/tc-arm.c:12634
msgid "assemble Thumb code"
msgstr ""
-#: config/tc-arm.c:11657
+#: config/tc-arm.c:12635
msgid "support ARM/Thumb interworking"
msgstr ""
-#: config/tc-arm.c:11659
-msgid "use old ABI (ELF only)"
-msgstr ""
-
-#: config/tc-arm.c:11660
+#: config/tc-arm.c:12637
msgid "code uses 32-bit program counter"
msgstr ""
-#: config/tc-arm.c:11661
+#: config/tc-arm.c:12638
msgid "code uses 26-bit program counter"
msgstr ""
-#: config/tc-arm.c:11662
+#: config/tc-arm.c:12639
msgid "floating point args are in fp regs"
msgstr ""
-#: config/tc-arm.c:11664
+#: config/tc-arm.c:12641
msgid "re-entrant code"
msgstr ""
-#: config/tc-arm.c:11665
+#: config/tc-arm.c:12642
msgid "code is ATPCS conformant"
msgstr ""
-#: config/tc-arm.c:11666
+#: config/tc-arm.c:12643
msgid "assemble for big-endian"
msgstr ""
-#: config/tc-arm.c:11667
+#: config/tc-arm.c:12644
msgid "assemble for little-endian"
msgstr ""
#. These are recognized by the assembler, but have no affect on code.
-#: config/tc-arm.c:11671
+#: config/tc-arm.c:12648
msgid "use frame pointer"
msgstr ""
-#: config/tc-arm.c:11672
+#: config/tc-arm.c:12649
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:11676 config/tc-arm.c:11677
+#: config/tc-arm.c:12653 config/tc-arm.c:12654
msgid "use -mcpu=arm1"
msgstr ""
-#: config/tc-arm.c:11678 config/tc-arm.c:11679
+#: config/tc-arm.c:12655 config/tc-arm.c:12656
msgid "use -mcpu=arm2"
msgstr ""
-#: config/tc-arm.c:11680 config/tc-arm.c:11681
+#: config/tc-arm.c:12657 config/tc-arm.c:12658
msgid "use -mcpu=arm250"
msgstr ""
-#: config/tc-arm.c:11682 config/tc-arm.c:11683
+#: config/tc-arm.c:12659 config/tc-arm.c:12660
msgid "use -mcpu=arm3"
msgstr ""
-#: config/tc-arm.c:11684 config/tc-arm.c:11685
+#: config/tc-arm.c:12661 config/tc-arm.c:12662
msgid "use -mcpu=arm6"
msgstr ""
-#: config/tc-arm.c:11686 config/tc-arm.c:11687
+#: config/tc-arm.c:12663 config/tc-arm.c:12664
msgid "use -mcpu=arm600"
msgstr ""
-#: config/tc-arm.c:11688 config/tc-arm.c:11689
+#: config/tc-arm.c:12665 config/tc-arm.c:12666
msgid "use -mcpu=arm610"
msgstr ""
-#: config/tc-arm.c:11690 config/tc-arm.c:11691
+#: config/tc-arm.c:12667 config/tc-arm.c:12668
msgid "use -mcpu=arm620"
msgstr ""
-#: config/tc-arm.c:11692 config/tc-arm.c:11693
+#: config/tc-arm.c:12669 config/tc-arm.c:12670
msgid "use -mcpu=arm7"
msgstr ""
-#: config/tc-arm.c:11694 config/tc-arm.c:11695
+#: config/tc-arm.c:12671 config/tc-arm.c:12672
msgid "use -mcpu=arm70"
msgstr ""
-#: config/tc-arm.c:11696 config/tc-arm.c:11697
+#: config/tc-arm.c:12673 config/tc-arm.c:12674
msgid "use -mcpu=arm700"
msgstr ""
-#: config/tc-arm.c:11698 config/tc-arm.c:11699
+#: config/tc-arm.c:12675 config/tc-arm.c:12676
msgid "use -mcpu=arm700i"
msgstr ""
-#: config/tc-arm.c:11700 config/tc-arm.c:11701
+#: config/tc-arm.c:12677 config/tc-arm.c:12678
msgid "use -mcpu=arm710"
msgstr ""
-#: config/tc-arm.c:11702 config/tc-arm.c:11703
+#: config/tc-arm.c:12679 config/tc-arm.c:12680
msgid "use -mcpu=arm710c"
msgstr ""
-#: config/tc-arm.c:11704 config/tc-arm.c:11705
+#: config/tc-arm.c:12681 config/tc-arm.c:12682
msgid "use -mcpu=arm720"
msgstr ""
-#: config/tc-arm.c:11706 config/tc-arm.c:11707
+#: config/tc-arm.c:12683 config/tc-arm.c:12684
msgid "use -mcpu=arm7d"
msgstr ""
-#: config/tc-arm.c:11708 config/tc-arm.c:11709
+#: config/tc-arm.c:12685 config/tc-arm.c:12686
msgid "use -mcpu=arm7di"
msgstr ""
-#: config/tc-arm.c:11710 config/tc-arm.c:11711
+#: config/tc-arm.c:12687 config/tc-arm.c:12688
msgid "use -mcpu=arm7m"
msgstr ""
-#: config/tc-arm.c:11712 config/tc-arm.c:11713
+#: config/tc-arm.c:12689 config/tc-arm.c:12690
msgid "use -mcpu=arm7dm"
msgstr ""
-#: config/tc-arm.c:11714 config/tc-arm.c:11715
+#: config/tc-arm.c:12691 config/tc-arm.c:12692
msgid "use -mcpu=arm7dmi"
msgstr ""
-#: config/tc-arm.c:11716 config/tc-arm.c:11717
+#: config/tc-arm.c:12693 config/tc-arm.c:12694
msgid "use -mcpu=arm7100"
msgstr ""
-#: config/tc-arm.c:11718 config/tc-arm.c:11719
+#: config/tc-arm.c:12695 config/tc-arm.c:12696
msgid "use -mcpu=arm7500"
msgstr ""
-#: config/tc-arm.c:11720 config/tc-arm.c:11721
+#: config/tc-arm.c:12697 config/tc-arm.c:12698
msgid "use -mcpu=arm7500fe"
msgstr ""
-#: config/tc-arm.c:11722 config/tc-arm.c:11723 config/tc-arm.c:11724
-#: config/tc-arm.c:11725
+#: config/tc-arm.c:12699 config/tc-arm.c:12700 config/tc-arm.c:12701
+#: config/tc-arm.c:12702
msgid "use -mcpu=arm7tdmi"
msgstr ""
-#: config/tc-arm.c:11726 config/tc-arm.c:11727
+#: config/tc-arm.c:12703 config/tc-arm.c:12704
msgid "use -mcpu=arm710t"
msgstr ""
-#: config/tc-arm.c:11728 config/tc-arm.c:11729
+#: config/tc-arm.c:12705 config/tc-arm.c:12706
msgid "use -mcpu=arm720t"
msgstr ""
-#: config/tc-arm.c:11730 config/tc-arm.c:11731
+#: config/tc-arm.c:12707 config/tc-arm.c:12708
msgid "use -mcpu=arm740t"
msgstr ""
-#: config/tc-arm.c:11732 config/tc-arm.c:11733
+#: config/tc-arm.c:12709 config/tc-arm.c:12710
msgid "use -mcpu=arm8"
msgstr ""
-#: config/tc-arm.c:11734 config/tc-arm.c:11735
+#: config/tc-arm.c:12711 config/tc-arm.c:12712
msgid "use -mcpu=arm810"
msgstr ""
-#: config/tc-arm.c:11736 config/tc-arm.c:11737
+#: config/tc-arm.c:12713 config/tc-arm.c:12714
msgid "use -mcpu=arm9"
msgstr ""
-#: config/tc-arm.c:11738 config/tc-arm.c:11739
+#: config/tc-arm.c:12715 config/tc-arm.c:12716
msgid "use -mcpu=arm9tdmi"
msgstr ""
-#: config/tc-arm.c:11740 config/tc-arm.c:11741
+#: config/tc-arm.c:12717 config/tc-arm.c:12718
msgid "use -mcpu=arm920"
msgstr ""
-#: config/tc-arm.c:11742 config/tc-arm.c:11743
+#: config/tc-arm.c:12719 config/tc-arm.c:12720
msgid "use -mcpu=arm940"
msgstr ""
-#: config/tc-arm.c:11744
+#: config/tc-arm.c:12721
msgid "use -mcpu=strongarm"
msgstr ""
-#: config/tc-arm.c:11746
+#: config/tc-arm.c:12723
msgid "use -mcpu=strongarm110"
msgstr ""
-#: config/tc-arm.c:11748
+#: config/tc-arm.c:12725
msgid "use -mcpu=strongarm1100"
msgstr ""
-#: config/tc-arm.c:11750
+#: config/tc-arm.c:12727
msgid "use -mcpu=strongarm1110"
msgstr ""
-#: config/tc-arm.c:11751
+#: config/tc-arm.c:12728
msgid "use -mcpu=xscale"
msgstr ""
-#: config/tc-arm.c:11752
+#: config/tc-arm.c:12729
msgid "use -mcpu=iwmmxt"
msgstr ""
-#: config/tc-arm.c:11753
+#: config/tc-arm.c:12730
msgid "use -mcpu=all"
msgstr ""
#. Architecture variants -- don't add any more to this list either.
-#: config/tc-arm.c:11756 config/tc-arm.c:11757
+#: config/tc-arm.c:12733 config/tc-arm.c:12734
msgid "use -march=armv2"
msgstr ""
-#: config/tc-arm.c:11758 config/tc-arm.c:11759
+#: config/tc-arm.c:12735 config/tc-arm.c:12736
msgid "use -march=armv2a"
msgstr ""
-#: config/tc-arm.c:11760 config/tc-arm.c:11761
+#: config/tc-arm.c:12737 config/tc-arm.c:12738
msgid "use -march=armv3"
msgstr ""
-#: config/tc-arm.c:11762 config/tc-arm.c:11763
+#: config/tc-arm.c:12739 config/tc-arm.c:12740
msgid "use -march=armv3m"
msgstr ""
-#: config/tc-arm.c:11764 config/tc-arm.c:11765
+#: config/tc-arm.c:12741 config/tc-arm.c:12742
msgid "use -march=armv4"
msgstr ""
-#: config/tc-arm.c:11766 config/tc-arm.c:11767
+#: config/tc-arm.c:12743 config/tc-arm.c:12744
msgid "use -march=armv4t"
msgstr ""
-#: config/tc-arm.c:11768 config/tc-arm.c:11769
+#: config/tc-arm.c:12745 config/tc-arm.c:12746
msgid "use -march=armv5"
msgstr ""
-#: config/tc-arm.c:11770 config/tc-arm.c:11771
+#: config/tc-arm.c:12747 config/tc-arm.c:12748
msgid "use -march=armv5t"
msgstr ""
-#: config/tc-arm.c:11772 config/tc-arm.c:11773
+#: config/tc-arm.c:12749 config/tc-arm.c:12750
msgid "use -march=armv5te"
msgstr ""
#. Floating point variants -- don't add any more to this list either.
-#: config/tc-arm.c:11776
+#: config/tc-arm.c:12753
msgid "use -mfpu=fpe"
msgstr ""
-#: config/tc-arm.c:11777
+#: config/tc-arm.c:12754
msgid "use -mfpu=fpa10"
msgstr ""
-#: config/tc-arm.c:11778
+#: config/tc-arm.c:12755
msgid "use -mfpu=fpa11"
msgstr ""
-#: config/tc-arm.c:11780
+#: config/tc-arm.c:12757
msgid "use either -mfpu=softfpa or -mfpu=softvfp"
msgstr ""
-#: config/tc-arm.c:11963
+#: config/tc-arm.c:12986
msgid "invalid architectural extension"
msgstr ""
-#: config/tc-arm.c:11977
+#: config/tc-arm.c:13000
msgid "missing architectural extension"
msgstr ""
-#: config/tc-arm.c:11990
+#: config/tc-arm.c:13013
#, c-format
msgid "unknown architectural extnsion `%s'"
msgstr ""
-#: config/tc-arm.c:12015
+#: config/tc-arm.c:13037
#, c-format
msgid "missing cpu name `%s'"
msgstr ""
-#: config/tc-arm.c:12031
+#: config/tc-arm.c:13062 config/tc-arm.c:13389
#, c-format
msgid "unknown cpu `%s'"
msgstr ""
-#: config/tc-arm.c:12050
+#: config/tc-arm.c:13080
#, c-format
msgid "missing architecture name `%s'"
msgstr ""
-#: config/tc-arm.c:12067
+#: config/tc-arm.c:13097 config/tc-arm.c:13423
#, c-format
msgid "unknown architecture `%s'\n"
msgstr ""
-#: config/tc-arm.c:12084
+#: config/tc-arm.c:13113 config/tc-arm.c:13454
#, c-format
msgid "unknown floating point format `%s'\n"
msgstr ""
-#: config/tc-arm.c:12090
+#: config/tc-arm.c:13129
+#, c-format
+msgid "unknown floating point abi `%s'\n"
+msgstr ""
+
+#: config/tc-arm.c:13145
+#, c-format
+msgid "unknown EABI `%s'\n"
+msgstr ""
+
+#: config/tc-arm.c:13152
msgid "<cpu name>\t assemble for CPU <cpu name>"
msgstr ""
-#: config/tc-arm.c:12092
+#: config/tc-arm.c:13154
msgid "<arch name>\t assemble for architecture <arch name>"
msgstr ""
-#: config/tc-arm.c:12094
+#: config/tc-arm.c:13156
msgid "<fpu name>\t assemble for FPU architecture <fpu name>"
msgstr ""
-#: config/tc-arm.c:12136 config/tc-arm.c:12158
-#, c-format
-msgid "option `-%c%s' is deprecated: %s"
+#: config/tc-arm.c:13158
+msgid "<abi>\t assemble for floating point ABI <abi>"
+msgstr ""
+
+#: config/tc-arm.c:13161
+msgid "<ver>\t assemble for eabi version <ver>"
msgstr ""
-#: config/tc-arm.c:12167
+#: config/tc-arm.c:13202 config/tc-arm.c:13224
#, c-format
-msgid "unrecognized option `-%c%s'"
+msgid "option `-%c%s' is deprecated: %s"
msgstr ""
-#: config/tc-arm.c:12181
+#: config/tc-arm.c:13245
+#, c-format
msgid " ARM-specific assembler options:\n"
msgstr ""
-#: config/tc-arm.c:12192
+#: config/tc-arm.c:13256
+#, c-format
msgid " -EB assemble code for a big-endian cpu\n"
msgstr ""
-#: config/tc-arm.c:12197
+#: config/tc-arm.c:13261
+#, c-format
msgid " -EL assemble code for a little-endian cpu\n"
msgstr ""
-#: config/tc-arm.c:12381
+#: config/tc-avr.c:209
#, c-format
-msgid "%s: unexpected function type: %d"
-msgstr ""
-
-#: config/tc-arm.c:12756
-msgid "alignments greater than 32 bytes not supported in .text sections."
-msgstr ""
-
-#: config/tc-arm.h:98
-msgid "arm convert_frag\n"
-msgstr ""
-
-#: config/tc-avr.c:203
msgid "Known MCU names:"
msgstr ""
-#: config/tc-avr.c:272
+#: config/tc-avr.c:275
+#, c-format
msgid ""
"AVR options:\n"
" -mmcu=[avr-name] select microcontroller variant\n"
@@ -2666,7 +2691,8 @@ msgid ""
" or immediate microcontroller name.\n"
msgstr ""
-#: config/tc-avr.c:282
+#: config/tc-avr.c:285
+#, c-format
msgid ""
" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
" -mno-skip-bug disable warnings for skipping two-word instructions\n"
@@ -2675,532 +2701,821 @@ msgid ""
" (default for avr3, avr5)\n"
msgstr ""
-#: config/tc-avr.c:330 config/tc-msp430.c:257
+#: config/tc-avr.c:329 config/tc-msp430.c:749
#, c-format
msgid "unknown MCU: %s\n"
msgstr ""
-#: config/tc-avr.c:339
+#: config/tc-avr.c:338
#, c-format
msgid "redefinition of mcu type `%s' to `%s'"
msgstr ""
-#: config/tc-avr.c:390 config/tc-d10v.c:319 config/tc-d30v.c:365
-#: config/tc-mips.c:10137 config/tc-mmix.c:2246 config/tc-mn10200.c:361
-#: config/tc-msp430.c:378 config/tc-pj.c:374 config/tc-ppc.c:5105
-#: config/tc-sh.c:2528 config/tc-v850.c:1244
+#: 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
msgid "bad call to md_atof"
msgstr ""
-#: config/tc-avr.c:453
+#: config/tc-avr.c:447
msgid "constant value required"
msgstr ""
-#: config/tc-avr.c:456
+#: config/tc-avr.c:450
#, c-format
msgid "number must be less than %d"
msgstr ""
-#: config/tc-avr.c:508
-msgid "`,' required"
+#: config/tc-avr.c:476 config/tc-avr.c:583
+#, c-format
+msgid "constant out of 8-bit range: %d"
msgstr ""
-#: config/tc-avr.c:527
-msgid "undefined combination of operands"
+#: 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
+msgid "missing operand"
msgstr ""
-#: config/tc-avr.c:536
-msgid "skipping two-word instruction"
+#: config/tc-avr.c:536 read.c:3345
+msgid "illegal expression"
msgstr ""
-#: config/tc-avr.c:598
+#: config/tc-avr.c:562 config/tc-avr.c:1282
+msgid "`)' required"
+msgstr ""
+
+#: config/tc-avr.c:638
msgid "register r16-r23 required"
msgstr ""
-#: config/tc-avr.c:604
+#: config/tc-avr.c:644
msgid "register number above 15 required"
msgstr ""
-#: config/tc-avr.c:610
+#: config/tc-avr.c:650
msgid "even register number required"
msgstr ""
-#: config/tc-avr.c:616
+#: config/tc-avr.c:656
msgid "register r24, r26, r28 or r30 required"
msgstr ""
-#: config/tc-avr.c:622
+#: config/tc-avr.c:662
msgid "register name or number from 0 to 31 required"
msgstr ""
-#: config/tc-avr.c:640
+#: config/tc-avr.c:680
msgid "pointer register (X, Y or Z) required"
msgstr ""
-#: config/tc-avr.c:647
+#: config/tc-avr.c:687
msgid "cannot both predecrement and postincrement"
msgstr ""
-#: config/tc-avr.c:655
+#: config/tc-avr.c:695
msgid "addressing mode not supported"
msgstr ""
-#: config/tc-avr.c:661
+#: config/tc-avr.c:701
msgid "can't predecrement"
msgstr ""
-#: config/tc-avr.c:664
+#: config/tc-avr.c:704
msgid "pointer register Z required"
msgstr ""
-#: config/tc-avr.c:682
+#: config/tc-avr.c:722
msgid "pointer register (Y or Z) required"
msgstr ""
-#: config/tc-avr.c:787
+#: config/tc-avr.c:826
#, c-format
msgid "unknown constraint `%c'"
msgstr ""
-#: config/tc-avr.c:881 config/tc-avr.c:897 config/tc-avr.c:998
-#: config/tc-msp430.c:1431 config/tc-msp430.c:1448
+#: config/tc-avr.c:878
+msgid "`,' required"
+msgstr ""
+
+#: config/tc-avr.c:896
+msgid "undefined combination of operands"
+msgstr ""
+
+#: config/tc-avr.c:905
+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
#, c-format
msgid "odd address operand: %ld"
msgstr ""
-#: config/tc-avr.c:889 config/tc-avr.c:908 config/tc-d10v.c:586
-#: config/tc-d30v.c:655 config/tc-msp430.c:1439 config/tc-msp430.c:1453
-#: config/tc-msp430.c:1463
+#: 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
#, c-format
msgid "operand out of range: %ld"
msgstr ""
-#: config/tc-avr.c:1007 config/tc-d10v.c:1793 config/tc-d30v.c:1973
-#: config/tc-msp430.c:1481
+#: config/tc-avr.c:1144 config/tc-d10v.c:1622 config/tc-d30v.c:2060
+#: config/tc-msp430.c:2063
#, c-format
msgid "line %d: unknown relocation type: 0x%x"
msgstr ""
-#: config/tc-avr.c:1021
+#: config/tc-avr.c:1158
msgid "only constant expression allowed"
msgstr ""
-#: config/tc-avr.c:1057 config/tc-d10v.c:1659 config/tc-d30v.c:1806
-#: config/tc-mn10200.c:1255 config/tc-mn10300.c:2303 config/tc-msp430.c:1520
-#: config/tc-or32.c:1618 config/tc-ppc.c:5919 config/tc-v850.c:2263
+#. 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
#, c-format
msgid "reloc %d not supported by object file format"
msgstr ""
-#: config/tc-avr.c:1081 config/tc-d10v.c:1248 config/tc-d10v.c:1262
-#: config/tc-h8300.c:1915 config/tc-h8500.c:1106 config/tc-mcore.c:938
-#: config/tc-msp430.c:438 config/tc-pj.c:283 config/tc-sh.c:2096
-#: config/tc-z8k.c:1238
+#: 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
msgid "can't find opcode "
msgstr ""
-#: config/tc-avr.c:1098
+#: config/tc-avr.c:1232
#, c-format
msgid "illegal opcode %s for mcu %s"
msgstr ""
-#: config/tc-avr.c:1106
+#: config/tc-avr.c:1241
msgid "garbage at end of line"
msgstr ""
-#: config/tc-avr.c:1170 read.c:3226
-msgid "illegal expression"
-msgstr ""
-
-#: config/tc-avr.c:1196 config/tc-avr.c:1262
-msgid "`)' required"
-msgstr ""
-
-#: config/tc-avr.c:1216
+#: config/tc-avr.c:1309 config/tc-avr.c:1316
#, c-format
-msgid "constant out of 8-bit range: %d"
+msgid "illegal %srelocation size: %d"
msgstr ""
-#: config/tc-avr.c:1219
-msgid "expression possibly out of 8-bit range"
+#: config/tc-bfin.c:263
+#, c-format
+msgid " BFIN specific command line options:\n"
msgstr ""
-#: config/tc-avr.c:1290 config/tc-avr.c:1297
-#, c-format
-msgid "illegal %srelocation size: %d"
+#: 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
+msgid "Bad call to md_atof()"
msgstr ""
-#: config/tc-cris.c:386 config/tc-m68hc11.c:2831
+#: config/tc-cris.c:532 config/tc-m68hc11.c:2794
#, c-format
msgid "internal inconsistency problem in %s: fr_symbol %lx"
msgstr ""
-#: config/tc-cris.c:390 config/tc-m68hc11.c:2835
+#: config/tc-cris.c:536 config/tc-m68hc11.c:2798 config/tc-msp430.c:2289
#, c-format
msgid "internal inconsistency problem in %s: resolved symbol"
msgstr ""
-#: config/tc-cris.c:396 config/tc-m68hc11.c:2841
+#: config/tc-cris.c:546 config/tc-m68hc11.c:2804
#, c-format
msgid "internal inconsistency problem in %s: fr_subtype %d"
msgstr ""
-#: config/tc-cris.c:650
+#: config/tc-cris.c:872
+msgid "Relaxation to long branches for .arch common_v10_v32 not implemented"
+msgstr ""
+
+#: config/tc-cris.c:902
+msgid "Complicated LAPC target operand is not a multiple of two. Use LAPC.D"
+msgstr ""
+
+#: config/tc-cris.c:907
+#, c-format
+msgid ""
+"Internal error found in md_convert_frag: offset %ld. Please report this."
+msgstr ""
+
+#: config/tc-cris.c:932
#, c-format
msgid "internal inconsistency in %s: bdapq no symbol"
msgstr ""
-#: config/tc-cris.c:663
+#: config/tc-cris.c:945
#, c-format
msgid "internal inconsistency in %s: bdap.w with no symbol"
msgstr ""
-#: config/tc-cris.c:807
+#: config/tc-cris.c:969
+msgid "section alignment must be >= 4 bytes to check MULS/MULU safeness"
+msgstr ""
+
+#: config/tc-cris.c:978
+msgid "dangerous MULS/MULU location; give it higher alignment"
+msgstr ""
+
+#: config/tc-cris.c:1083
+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:815
+#: config/tc-cris.c:1182 config/tc-crx.c:592
#, c-format
msgid "Can't hash `%s': %s\n"
msgstr ""
-#: config/tc-cris.c:816
+#: config/tc-cris.c:1183 config/tc-crx.c:593
msgid "(unknown reason)"
msgstr ""
-#: config/tc-cris.c:820
+#: config/tc-cris.c:1187
#, c-format
msgid "Buggy opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-cris.c:1164
+#: 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
#, c-format
msgid "Immediate value not in 5 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:1180
+#: config/tc-cris.c:1615
#, c-format
msgid "Immediate value not in 4 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:1219
+#: config/tc-cris.c:1667
#, c-format
msgid "Immediate value not in 6 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:1234
+#: config/tc-cris.c:1682
#, c-format
msgid "Immediate value not in 6 bit unsigned range: %ld"
msgstr ""
#. Others have a generic warning.
-#: config/tc-cris.c:1324
+#: config/tc-cris.c:1790
#, 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:1483
+#: config/tc-cris.c:2033
msgid "Illegal operands"
msgstr ""
-#: config/tc-cris.c:1514 config/tc-cris.c:1545
+#: config/tc-cris.c:2074 config/tc-cris.c:2114
#, c-format
msgid "Immediate value not in 8 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:1524 config/tc-cris.c:1552
+#: config/tc-cris.c:2084 config/tc-cris.c:2135
#, c-format
msgid "Immediate value not in 16 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:1573
+#: config/tc-cris.c:2119
+#, c-format
+msgid "Immediate value not in 8 bit signed range: %ld"
+msgstr ""
+
+#: config/tc-cris.c:2124
+#, c-format
+msgid "Immediate value not in 8 bit unsigned range: %ld"
+msgstr ""
+
+#: config/tc-cris.c:2140
+#, c-format
+msgid "Immediate value not in 16 bit signed range: %ld"
+msgstr ""
+
+#: config/tc-cris.c:2145
+#, c-format
+msgid "Immediate value not in 16 bit unsigned range: %ld"
+msgstr ""
+
+#: config/tc-cris.c:2167
msgid "PIC relocation size does not match operand size"
msgstr ""
-#: config/tc-cris.c:2572
+#: config/tc-cris.c:3304
+msgid "Calling gen_cond_branch_32 for .arch common_v10_v32\n"
+msgstr ""
+
+#: config/tc-cris.c:3308
msgid "32-bit conditional branch generated"
msgstr ""
-#: config/tc-cris.c:2626
+#: config/tc-cris.c:3367
msgid "Complex expression not supported"
msgstr ""
#. FIXME: Is this function mentioned in the internals.texi manual? If
#. not, add it.
-#: config/tc-cris.c:2747
+#: config/tc-cris.c:3490
msgid "Bad call to md_atof () - floating point formats are not supported"
msgstr ""
-#: config/tc-cris.c:2794
+#: config/tc-cris.c:3531
msgid "PC-relative relocation must be trivially resolved"
msgstr ""
-#: config/tc-cris.c:2837
+#: config/tc-cris.c:3584
#, c-format
msgid "Value not in 16 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:2848
+#: config/tc-cris.c:3595
+#, c-format
+msgid "Value not in 16 bit signed range: %ld"
+msgstr ""
+
+#: config/tc-cris.c:3606
#, c-format
msgid "Value not in 8 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:2855
+#: config/tc-cris.c:3614
+#, c-format
+msgid "Value not in 8 bit signed range: %ld"
+msgstr ""
+
+#: config/tc-cris.c:3625
#, c-format
msgid "Value not in 4 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:2862
+#: config/tc-cris.c:3633
#, c-format
msgid "Value not in 5 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:2869
+#: config/tc-cris.c:3641
#, c-format
msgid "Value not in 6 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:2876
+#: config/tc-cris.c:3649
#, c-format
msgid "Value not in 6 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:2924
+#: config/tc-cris.c:3695
+#, c-format
msgid "Please use --help to see usage and options for this assembler.\n"
msgstr ""
-#: config/tc-cris.c:2936
+#: config/tc-cris.c:3707
msgid "--no-underscore is invalid with a.out format"
msgstr ""
-#: config/tc-cris.c:3012
+#: config/tc-cris.c:3727
+#, c-format
+msgid "invalid <arch> in --march=<arch>: %s"
+msgstr ""
+
+#: config/tc-cris.c:3821
msgid ""
"Semantics error. This type of operand can not be relocated, it must be an "
"assembly-time constant"
msgstr ""
-#: config/tc-cris.c:3064
+#: config/tc-cris.c:3870
#, 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:3078
+#: config/tc-cris.c:3883
+#, c-format
msgid "CRIS-specific options:\n"
msgstr ""
-#: config/tc-cris.c:3080
+#: config/tc-cris.c:3885
msgid ""
" -h, -H Don't execute, print this help text. Deprecated.\n"
msgstr ""
-#: config/tc-cris.c:3082
+#: config/tc-cris.c:3887
msgid " -N Warn when branches are expanded to jumps.\n"
msgstr ""
-#: config/tc-cris.c:3084
+#: config/tc-cris.c:3889
msgid ""
" --underscore User symbols are normally prepended with "
"underscore.\n"
msgstr ""
-#: config/tc-cris.c:3086
+#: config/tc-cris.c:3891
msgid " Registers will not need any prefix.\n"
msgstr ""
-#: config/tc-cris.c:3088
+#: config/tc-cris.c:3893
msgid " --no-underscore User symbols do not have any prefix.\n"
msgstr ""
-#: config/tc-cris.c:3090
+#: config/tc-cris.c:3895
msgid " Registers will require a `$'-prefix.\n"
msgstr ""
-#: config/tc-cris.c:3092
+#: config/tc-cris.c:3897
msgid " --pic\t\t\tEnable generation of position-independent code.\n"
msgstr ""
-#: config/tc-cris.c:3115
+#: config/tc-cris.c:3899
+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
msgid "Invalid relocation"
msgstr ""
-#: config/tc-cris.c:3149
+#: config/tc-cris.c:3957
msgid "Invalid pc-relative relocation"
msgstr ""
-#: config/tc-cris.c:3198
+#: config/tc-cris.c:4002
#, c-format
msgid "Adjusted signed .word (%ld) overflows: `switch'-statement too large."
msgstr ""
-#: config/tc-cris.c:3225
+#: config/tc-cris.c:4032
#, c-format
msgid ".syntax %s requires command-line option `--underscore'"
msgstr ""
-#: config/tc-cris.c:3234
+#: config/tc-cris.c:4041
#, c-format
msgid ".syntax %s requires command-line option `--no-underscore'"
msgstr ""
-#: config/tc-cris.c:3272
+#: config/tc-cris.c:4078
msgid "Unknown .syntax operand"
msgstr ""
-#: config/tc-cris.c:3283
+#: config/tc-cris.c:4088
msgid "Pseudodirective .file is only valid when generating ELF"
msgstr ""
-#: config/tc-cris.c:3296
+#: config/tc-cris.c:4100
msgid "Pseudodirective .loc is only valid when generating ELF"
msgstr ""
-#: config/tc-d10v.c:252
-msgid ""
-"D10V options:\n"
-"-O Optimize. Will do some operations in parallel.\n"
-"--gstabs-packing Pack adjacent short instructions together even\n"
-" when --gstabs is specified. On by default.\n"
-"--no-gstabs-packing If --gstabs is specified, do not pack adjacent\n"
-" instructions together.\n"
+#: config/tc-cris.c:4243
+msgid "unknown operand to .arch"
msgstr ""
-#: config/tc-d10v.c:543 config/tc-d30v.c:549 config/tc-mn10200.c:937
-#: config/tc-mn10300.c:1812 config/tc-ppc.c:2332 config/tc-s390.c:1234
-#: config/tc-tic80.c:275 config/tc-v850.c:2021
-msgid "illegal operand"
+#: config/tc-cris.c:4252
+msgid ".arch <arch> requires a matching --march=... option"
msgstr ""
-#: config/tc-d10v.c:657
-msgid "operand is not an immediate"
+#: 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-d10v.c:675
+#: config/tc-crx.c:360
#, c-format
-msgid "operand out of range: %lu"
+msgid "internal error: reloc %d (`%s') not supported by object file format"
msgstr ""
-#: config/tc-d10v.c:736
-msgid "Instruction must be executed in parallel with another instruction."
+#: 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 ""
-#: config/tc-d10v.c:792
-msgid "Instruction must be executed in parallel"
+#. 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-d10v.c:795
-msgid "Long instructions may not be combined."
+#: 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-d10v.c:828
-msgid "One of these instructions may not be executed in parallel."
+#: config/tc-crx.c:866
+#, c-format
+msgid "Illegal Scale - `%d'"
msgstr ""
-#: config/tc-d10v.c:832 config/tc-d30v.c:876
-msgid "Two IU instructions may not be executed in parallel"
+#: config/tc-crx.c:982
+#, c-format
+msgid "Illegal operands (whitespace): `%s'"
msgstr ""
-#: config/tc-d10v.c:834 config/tc-d10v.c:842 config/tc-d10v.c:856
-#: config/tc-d10v.c:871 config/tc-d30v.c:877 config/tc-d30v.c:886
-msgid "Swapping instruction order"
+#: 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-d10v.c:840 config/tc-d30v.c:883
-msgid "Two MU instructions may not be executed in parallel"
+#: config/tc-crx.c:1044
+#, c-format
+msgid "Unknown exception: `%s'"
msgstr ""
-#: config/tc-d10v.c:860 config/tc-d30v.c:903
-msgid "IU instruction may not be in the left container"
+#: 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' "
+msgstr ""
+
+#: config/tc-crx.c:1317
+#, c-format
+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
+#, c-format
+msgid "Invalid DISPU4 operand value (arg %d)"
+msgstr ""
+
+#: config/tc-crx.c:1633
+#, c-format
+msgid "Invalid CST4 operand value (arg %d)"
+msgstr ""
+
+#: config/tc-crx.c:1636
+#, 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-d10v.c:862 config/tc-d10v.c:877
+#: config/tc-crx.c:1773
+msgid "Invalid Register in Register List"
+msgstr ""
+
+#: config/tc-crx.c:1827
+#, c-format
+msgid "Illegal register `%s' in cop-register list"
+msgstr ""
+
+#: config/tc-crx.c:1835
+#, c-format
+msgid "Illegal register `%s' in cop-special-register list"
+msgstr ""
+
+#: config/tc-crx.c:1854
+#, c-format
+msgid "Illegal register `%s' in user register list"
+msgstr ""
+
+#: config/tc-crx.c:1873
+#, c-format
+msgid "Illegal register `%s' in register list"
+msgstr ""
+
+#: config/tc-crx.c:1879
+#, c-format
+msgid "Maximum %d bits may be set in `mask16' operand"
+msgstr ""
+
+#: config/tc-crx.c:1888
+#, c-format
+msgid "rest of line ignored; first ignored character is `%c'"
+msgstr ""
+
+#: config/tc-crx.c:1896
+#, 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
+msgid "HI/LO registers should be specified together"
+msgstr ""
+
+#: config/tc-crx.c:1908
+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
+#, c-format
msgid ""
-"Instruction in R container is squashed by flow control instruction in L "
-"container."
+"D10V options:\n"
+"-O Optimize. Will do some operations in parallel.\n"
+"--gstabs-packing Pack adjacent short instructions together even\n"
+" when --gstabs is specified. On by default.\n"
+"--no-gstabs-packing If --gstabs is specified, do not pack adjacent\n"
+" instructions together.\n"
msgstr ""
-#: config/tc-d10v.c:875 config/tc-d30v.c:914
-msgid "MU instruction may not be in the right container"
+#: 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
+msgid "illegal operand"
msgstr ""
-#: config/tc-d10v.c:881 config/tc-d30v.c:926
-msgid "unknown execution type passed to write_2_short()"
+#: config/tc-d10v.c:608
+msgid "operand is not an immediate"
msgstr ""
-#: config/tc-d10v.c:1072 config/tc-d10v.c:1080
+#: config/tc-d10v.c:626
+#, c-format
+msgid "operand out of range: %lu"
+msgstr ""
+
+#: config/tc-d10v.c:684
+msgid "Instruction must be executed in parallel with another instruction."
+msgstr ""
+
+#: config/tc-d10v.c:738 config/tc-d10v.c:746
#, c-format
msgid "packing conflict: %s must dispatch sequentially"
msgstr ""
-#: config/tc-d10v.c:1179
+#: config/tc-d10v.c:845
#, c-format
msgid "resource conflict (R%d)"
msgstr ""
-#: config/tc-d10v.c:1182
+#: config/tc-d10v.c:848
#, c-format
msgid "resource conflict (A%d)"
msgstr ""
-#: config/tc-d10v.c:1184
+#: config/tc-d10v.c:850
msgid "resource conflict (PSW)"
msgstr ""
-#: config/tc-d10v.c:1186
+#: config/tc-d10v.c:852
msgid "resource conflict (C flag)"
msgstr ""
-#: config/tc-d10v.c:1188
+#: config/tc-d10v.c:854
msgid "resource conflict (F flag)"
msgstr ""
-#: config/tc-d10v.c:1276 config/tc-d10v.c:1298 config/tc-d30v.c:1410
-msgid "Unable to mix instructions as specified"
+#: config/tc-d10v.c:1004
+msgid "Instruction must be executed in parallel"
msgstr ""
-#: config/tc-d10v.c:1345 config/tc-d30v.c:1547
-#, c-format
-msgid "unknown opcode: %s"
+#: config/tc-d10v.c:1007
+msgid "Long instructions may not be combined."
msgstr ""
-#: config/tc-d10v.c:1428 config/tc-d10v.c:1603 config/tc-tic80.c:532
+#: config/tc-d10v.c:1040
+msgid "One of these instructions may not be executed in parallel."
+msgstr ""
+
+#: config/tc-d10v.c:1044 config/tc-d30v.c:1071
+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
+msgid "Swapping instruction order"
+msgstr ""
+
+#: config/tc-d10v.c:1052 config/tc-d30v.c:1078
+msgid "Two MU instructions may not be executed in parallel"
+msgstr ""
+
+#: config/tc-d10v.c:1072 config/tc-d30v.c:1098
+msgid "IU instruction may not be in the left container"
+msgstr ""
+
+#: config/tc-d10v.c:1074 config/tc-d10v.c:1089
+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
+msgid "MU instruction may not be in the right container"
+msgstr ""
+
+#: config/tc-d10v.c:1093 config/tc-d30v.c:1121
+msgid "unknown execution type passed to write_2_short()"
+msgstr ""
+
+#: config/tc-d10v.c:1221 config/tc-d10v.c:1394
msgid "bad opcode or operands"
msgstr ""
-#: config/tc-d10v.c:1503 config/tc-m68k.c:4305
+#: config/tc-d10v.c:1296 config/tc-m68k.c:4625
msgid "value out of range"
msgstr ""
-#: config/tc-d10v.c:1579
+#: config/tc-d10v.c:1370
msgid "illegal operand - register name found where none expected"
msgstr ""
-#: config/tc-d10v.c:1614 config/tc-tic80.c:543
+#: config/tc-d10v.c:1405
msgid "Register number must be EVEN"
msgstr ""
-#: config/tc-d10v.c:1617
+#: config/tc-d10v.c:1408
msgid "Unsupported use of sp"
msgstr ""
-#: config/tc-d10v.c:1636
+#: config/tc-d10v.c:1427
#, c-format
msgid "cr%ld is a reserved control register"
msgstr ""
-#: config/tc-d10v.c:1773
+#: config/tc-d10v.c:1466 config/tc-d30v.c:1430
+#, c-format
+msgid "unknown opcode: %s"
+msgstr ""
+
+#: config/tc-d10v.c:1602
#, c-format
msgid "line %d: rep or repi must include at least 4 instructions"
msgstr ""
-#: config/tc-d30v.c:192
+#: config/tc-d10v.c:1810 config/tc-d10v.c:1832 config/tc-d30v.c:1777
+msgid "Unable to mix instructions as specified"
+msgstr ""
+
+#: config/tc-d30v.c:150
#, c-format
msgid "Register name %s conflicts with symbol of the same name"
msgstr ""
-#: config/tc-d30v.c:287
+#: config/tc-d30v.c:240
+#, c-format
msgid ""
"\n"
"D30V options:\n"
@@ -3213,1097 +3528,1134 @@ msgid ""
"-C Opposite of -C. -c is the default.\n"
msgstr ""
-#: config/tc-d30v.c:461
+#: config/tc-d30v.c:402
msgid "unexpected 12-bit reloc type"
msgstr ""
-#: config/tc-d30v.c:468
+#: config/tc-d30v.c:409
msgid "unexpected 18-bit reloc type"
msgstr ""
-#: config/tc-d30v.c:719
+#: config/tc-d30v.c:659
#, c-format
msgid "%s NOP inserted"
msgstr ""
-#: config/tc-d30v.c:720
+#: config/tc-d30v.c:660
msgid "sequential"
msgstr ""
-#: config/tc-d30v.c:720
+#: config/tc-d30v.c:660
msgid "parallel"
msgstr ""
-#: config/tc-d30v.c:872
+#: config/tc-d30v.c:1067
msgid "Instructions may not be executed in parallel"
msgstr ""
-#: config/tc-d30v.c:885
+#: config/tc-d30v.c:1080
#, c-format
msgid "Executing %s in IU may not work"
msgstr ""
-#: config/tc-d30v.c:892
+#: config/tc-d30v.c:1087
#, c-format
msgid "Executing %s in IU may not work in parallel execution"
msgstr ""
-#: config/tc-d30v.c:905
+#: config/tc-d30v.c:1100
#, c-format
msgid "special left instruction `%s' kills instruction `%s' in right container"
msgstr ""
-#: config/tc-d30v.c:916
+#: config/tc-d30v.c:1111
#, c-format
msgid "Executing %s in reverse serial with %s may not work"
msgstr ""
-#: config/tc-d30v.c:919
+#: config/tc-d30v.c:1114
#, c-format
msgid "Executing %s in IU in reverse serial may not work"
msgstr ""
-#: config/tc-d30v.c:1289 config/tc-d30v.c:1306
-msgid "Cannot assemble instruction"
+#: config/tc-d30v.c:1303
+msgid "Odd numbered register used as target of multi-register instruction"
msgstr ""
-#: config/tc-d30v.c:1291
-msgid "First opcode is long. Unable to mix instructions as specified."
+#: config/tc-d30v.c:1367 config/tc-d30v.c:1402
+#, c-format
+msgid "unknown condition code: %s"
msgstr ""
-#: config/tc-d30v.c:1360
-msgid "word of NOPs added between word multiply and load"
+#: config/tc-d30v.c:1395
+#, c-format
+msgid "cmpu doesn't support condition code %s"
msgstr ""
-#: config/tc-d30v.c:1362
-msgid "word of NOPs added between word multiply and 16-bit multiply"
+#: config/tc-d30v.c:1441
+#, c-format
+msgid "operands for opcode `%s' do not match any valid format"
msgstr ""
-#: config/tc-d30v.c:1394
-msgid "Instruction uses long version, so it cannot be mixed as specified"
+#: config/tc-d30v.c:1656 config/tc-d30v.c:1673
+msgid "Cannot assemble instruction"
msgstr ""
-#: config/tc-d30v.c:1477 config/tc-d30v.c:1515
-#, c-format
-msgid "unknown condition code: %s"
+#: config/tc-d30v.c:1658
+msgid "First opcode is long. Unable to mix instructions as specified."
msgstr ""
-#: config/tc-d30v.c:1508
-#, c-format
-msgid "cmpu doesn't support condition code %s"
+#: config/tc-d30v.c:1727
+msgid "word of NOPs added between word multiply and load"
msgstr ""
-#: config/tc-d30v.c:1558
-#, c-format
-msgid "operands for opcode `%s' do not match any valid format"
+#: config/tc-d30v.c:1729
+msgid "word of NOPs added between word multiply and 16-bit multiply"
msgstr ""
-#: config/tc-d30v.c:1776
-msgid "Odd numbered register used as target of multi-register instruction"
+#: config/tc-d30v.c:1761
+msgid "Instruction uses long version, so it cannot be mixed as specified"
+msgstr ""
+
+#: config/tc-d30v.c:1888
+#, c-format
+msgid "value too large to fit in %d bits"
msgstr ""
-#: config/tc-d30v.c:1862
+#: config/tc-d30v.c:1949
#, c-format
msgid "line %d: unable to place address of symbol '%s' into a byte"
msgstr ""
-#: config/tc-d30v.c:1865
+#: config/tc-d30v.c:1952
#, c-format
msgid "line %d: unable to place value %lx into a byte"
msgstr ""
-#: config/tc-d30v.c:1873
+#: config/tc-d30v.c:1960
#, c-format
msgid "line %d: unable to place address of symbol '%s' into a short"
msgstr ""
-#: config/tc-d30v.c:1876
+#: config/tc-d30v.c:1963
#, c-format
msgid "line %d: unable to place value %lx into a short"
msgstr ""
-#: config/tc-d30v.c:1884
+#: config/tc-d30v.c:1971
#, c-format
msgid "line %d: unable to place address of symbol '%s' into a quad"
msgstr ""
-#: config/tc-d30v.c:2053
-#, c-format
-msgid "value too large to fit in %d bits"
-msgstr ""
-
-#: config/tc-d30v.c:2196
+#: config/tc-d30v.c:2079
#, c-format
msgid "Alignment too large: %d assumed"
msgstr ""
-#: config/tc-dlx.c:283
+#: config/tc-dlx.c:211
msgid "missing .proc"
msgstr ""
-#: config/tc-dlx.c:300
+#: config/tc-dlx.c:228
msgid ".endfunc missing for previous .proc"
msgstr ""
-#: config/tc-dlx.c:498
-#, c-format
-msgid "Expression Error for operand modifier %%hi/%%lo\n"
+#. 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
+msgid "Broken assembler. No assembly attempted."
msgstr ""
-#: config/tc-dlx.c:552
+#: config/tc-dlx.c:327
#, c-format
msgid "Bad operand for a load instruction: <%s>"
msgstr ""
-#: config/tc-dlx.c:667
+#: config/tc-dlx.c:441
#, c-format
msgid "Bad operand for a store instruction: <%s>"
msgstr ""
-#: config/tc-dlx.c:865
+#: config/tc-dlx.c:621
+#, c-format
+msgid "Expression Error for operand modifier %%hi/%%lo\n"
+msgstr ""
+
+#: config/tc-dlx.c:634 config/tc-or32.c:873
+#, c-format
+msgid "Invalid expression after %%%%\n"
+msgstr ""
+
+#: config/tc-dlx.c:703
+#, c-format
+msgid "Unknown opcode `%s'."
+msgstr ""
+
+#: config/tc-dlx.c:716
msgid "Can not set dlx_skip_hi16_flag"
msgstr ""
-#: config/tc-dlx.c:879
+#: config/tc-dlx.c:730
#, c-format
msgid "Missing arguments for opcode <%s>."
msgstr ""
-#: config/tc-dlx.c:950
+#: config/tc-dlx.c:764
+#, c-format
+msgid "Too many operands: %s"
+msgstr ""
+
+#: config/tc-dlx.c:801
#, c-format
msgid "Both the_insn.HI and the_insn.LO are set : %s"
msgstr ""
-#: config/tc-dlx.c:1022
+#: config/tc-dlx.c:871
msgid "failed regnum sanity check."
msgstr ""
-#: config/tc-dlx.c:1035
+#: config/tc-dlx.c:884
msgid "failed general register sanity check."
msgstr ""
-#: config/tc-dlx.c:1324
+#: config/tc-dlx.c:1175 config/tc-or32.c:835
+#, c-format
+msgid "label \"$%d\" redefined"
+msgstr ""
+
+#: config/tc-dlx.c:1213
msgid "Invalid expression after # number\n"
msgstr ""
-#: config/tc-fr30.c:85
+#: config/tc-fr30.c:83
+#, c-format
msgid " FR30 specific command line options:\n"
msgstr ""
-#: config/tc-fr30.c:139 config/tc-openrisc.c:152
+#: config/tc-fr30.c:136
#, c-format
msgid "Instruction %s not allowed in a delay slot."
msgstr ""
-#: config/tc-fr30.c:383 config/tc-m32r.c:1576
-msgid "Addend to unresolved symbol not on word boundary."
-msgstr ""
-
-#: config/tc-fr30.c:524 config/tc-frv.c:1289 config/tc-i960.c:798
-#: config/tc-ip2k.c:351 config/tc-m32r.c:1884 config/tc-openrisc.c:452
-#: config/tc-xstormy16.c:636
-msgid "Bad call to md_atof()"
-msgstr ""
-
-#: config/tc-frv.c:413
+#: config/tc-frv.c:461
+#, c-format
msgid "FRV specific command line options:\n"
msgstr ""
-#: config/tc-frv.c:414
+#: config/tc-frv.c:462
+#, c-format
msgid "-G n Data >= n bytes is in small data area\n"
msgstr ""
-#: config/tc-frv.c:415
+#: config/tc-frv.c:463
+#, c-format
msgid "-mgpr-32 Note 32 gprs are used\n"
msgstr ""
-#: config/tc-frv.c:416
+#: config/tc-frv.c:464
+#, c-format
msgid "-mgpr-64 Note 64 gprs are used\n"
msgstr ""
-#: config/tc-frv.c:417
+#: config/tc-frv.c:465
+#, c-format
msgid "-mfpr-32 Note 32 fprs are used\n"
msgstr ""
-#: config/tc-frv.c:418
+#: config/tc-frv.c:466
+#, c-format
msgid "-mfpr-64 Note 64 fprs are used\n"
msgstr ""
-#: config/tc-frv.c:419
+#: config/tc-frv.c:467
+#, c-format
msgid "-msoft-float Note software fp is used\n"
msgstr ""
-#: config/tc-frv.c:420
+#: config/tc-frv.c:468
+#, c-format
msgid "-mdword Note stack is aligned to a 8 byte boundary\n"
msgstr ""
-#: config/tc-frv.c:421
+#: config/tc-frv.c:469
+#, c-format
msgid "-mno-dword Note stack is aligned to a 4 byte boundary\n"
msgstr ""
-#: config/tc-frv.c:422
+#: config/tc-frv.c:470
+#, c-format
msgid "-mdouble Note fp double insns are used\n"
msgstr ""
-#: config/tc-frv.c:423
+#: config/tc-frv.c:471
+#, c-format
msgid "-mmedia Note media insns are used\n"
msgstr ""
-#: config/tc-frv.c:424
+#: config/tc-frv.c:472
+#, c-format
msgid "-mmuladd Note multiply add/subtract insns are used\n"
msgstr ""
-#: config/tc-frv.c:425
+#: config/tc-frv.c:473
+#, c-format
msgid "-mpack Note instructions are packed\n"
msgstr ""
-#: config/tc-frv.c:426
+#: config/tc-frv.c:474
+#, c-format
msgid "-mno-pack Do not allow instructions to be packed\n"
msgstr ""
-#: config/tc-frv.c:427
+#: config/tc-frv.c:475
+#, c-format
msgid "-mpic Note small position independent code\n"
msgstr ""
-#: config/tc-frv.c:428
+#: config/tc-frv.c:476
+#, c-format
msgid "-mPIC Note large position independent code\n"
msgstr ""
-#: config/tc-frv.c:429
+#: config/tc-frv.c:477
+#, c-format
msgid "-mlibrary-pic Compile library for large position indepedent code\n"
msgstr ""
-#: config/tc-frv.c:430
-msgid "-mcpu={fr500|fr400|fr300|frv|simple|tomcat}\n"
+#: config/tc-frv.c:478
+#, c-format
+msgid "-mfdpic Assemble for the FDPIC ABI\n"
+msgstr ""
+
+#: config/tc-frv.c:479
+#, c-format
+msgid "-mnopic Disable -mpic, -mPIC, -mlibrary-pic and -mfdpic\n"
+msgstr ""
+
+#: config/tc-frv.c:480
+#, c-format
+msgid "-mcpu={fr500|fr550|fr400|fr405|fr450|fr300|frv|simple|tomcat}\n"
msgstr ""
-#: config/tc-frv.c:431
+#: config/tc-frv.c:481
+#, c-format
msgid " Record the cpu type\n"
msgstr ""
-#: config/tc-frv.c:432
+#: config/tc-frv.c:482
+#, c-format
msgid "-mtomcat-stats Print out stats for tomcat workarounds\n"
msgstr ""
-#: config/tc-frv.c:433
+#: config/tc-frv.c:483
+#, c-format
msgid "-mtomcat-debug Debug tomcat workarounds\n"
msgstr ""
-#: config/tc-frv.c:1012
+#: config/tc-frv.c:1187
msgid "VLIW packing used for -mno-pack"
msgstr ""
-#: config/tc-frv.c:1025
+#: config/tc-frv.c:1197
+msgid "Instruction not supported by this architecture"
+msgstr ""
+
+#: config/tc-frv.c:1207
msgid "VLIW packing constraint violation"
msgstr ""
-#: config/tc-frv.c:1540
+#: config/tc-frv.c:1874
#, c-format
msgid "Relocation %s is not safe for %s"
msgstr ""
-#: config/tc-h8300.c:84 config/tc-h8300.c:96 config/tc-h8300.c:109
-#: config/tc-h8300.c:122 config/tc-h8300.c:135 config/tc-h8300.c:149
-#: config/tc-h8300.c:222 config/tc-hppa.c:1423 config/tc-hppa.c:6909
-#: config/tc-hppa.c:6915 config/tc-hppa.c:6921 config/tc-hppa.c:6927
-#: config/tc-mn10300.c:1218 config/tc-mn10300.c:1223 config/tc-mn10300.c:2722
+#: 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
msgid "could not set architecture and machine"
msgstr ""
-#: config/tc-h8300.c:436 config/tc-h8300.c:444
+#: config/tc-h8300.c:397 config/tc-h8300.c:405
msgid "Reg not valid for H8/300"
msgstr ""
-#: config/tc-h8300.c:529
+#: config/tc-h8300.c:486
msgid "invalid operand size requested"
msgstr ""
-#: config/tc-h8300.c:626 config/tc-h8300.c:629
+#: config/tc-h8300.c:585
msgid "Invalid register list for ldm/stm\n"
msgstr ""
-#: config/tc-h8300.c:632
-msgid "Invalid register list for ldm/stm)\n"
-msgstr ""
-
-#: config/tc-h8300.c:658 config/tc-h8300.c:663 config/tc-h8300.c:670
+#: config/tc-h8300.c:611 config/tc-h8300.c:616 config/tc-h8300.c:623
msgid "mismatch between register and suffix"
msgstr ""
-#: config/tc-h8300.c:697
+#: config/tc-h8300.c:650
msgid "address too high for vector table jmp/jsr"
msgstr ""
-#: config/tc-h8300.c:722 config/tc-h8300.c:832 config/tc-h8300.c:840
+#: config/tc-h8300.c:677 config/tc-h8300.c:789 config/tc-h8300.c:799
msgid "Wrong size pointer register for architecture."
msgstr ""
-#: config/tc-h8300.c:781 config/tc-h8300.c:789 config/tc-h8300.c:818
+#: config/tc-h8300.c:736 config/tc-h8300.c:744 config/tc-h8300.c:773
msgid "expected @(exp, reg16)"
msgstr ""
-#: config/tc-h8300.c:807
+#: config/tc-h8300.c:762
msgid "expected .L, .W or .B for register in indexed addressing mode"
msgstr ""
-#: config/tc-h8300.c:1000
+#: config/tc-h8300.c:956
msgid "expected valid addressing mode for mova: \"@(disp, ea.sz),ERn\""
msgstr ""
-#: config/tc-h8300.c:1018 config/tc-h8300.c:1027
+#: config/tc-h8300.c:974 config/tc-h8300.c:983
msgid "expected register"
msgstr ""
-#: config/tc-h8300.c:1043
+#: config/tc-h8300.c:999
msgid "expected closing paren"
msgstr ""
-#: config/tc-h8300.c:1104
+#: config/tc-h8300.c:1058
#, c-format
msgid "can't use high part of register in operand %d"
msgstr ""
-#: config/tc-h8300.c:1268
+#: config/tc-h8300.c:1215
#, c-format
msgid "Opcode `%s' with these operand types not available in %s mode"
msgstr ""
-#: config/tc-h8300.c:1277
+#: config/tc-h8300.c:1224
msgid "mismatch between opcode size and operand size"
msgstr ""
-#: config/tc-h8300.c:1316
+#: config/tc-h8300.c:1260
#, c-format
msgid "operand %s0x%lx out of range."
msgstr ""
-#: config/tc-h8300.c:1415
+#: config/tc-h8300.c:1356
msgid "Can't work out size of operand.\n"
msgstr ""
-#: config/tc-h8300.c:1466
+#: config/tc-h8300.c:1405
#, c-format
msgid "Opcode `%s' with these operand types not available in H8/300 mode"
msgstr ""
-#: config/tc-h8300.c:1471
+#: config/tc-h8300.c:1410
#, c-format
msgid "Opcode `%s' with these operand types not available in H8/300H mode"
msgstr ""
-#: config/tc-h8300.c:1477
+#: config/tc-h8300.c:1416
#, c-format
msgid "Opcode `%s' with these operand types not available in H8/300S mode"
msgstr ""
-#: config/tc-h8300.c:1538 config/tc-h8300.c:1558
+#: config/tc-h8300.c:1477 config/tc-h8300.c:1497
msgid "Need #1 or #2 here"
msgstr ""
-#: config/tc-h8300.c:1553
+#: config/tc-h8300.c:1492
msgid "#4 not valid on H8/300."
msgstr ""
-#: config/tc-h8300.c:1645 config/tc-h8300.c:1727
+#: config/tc-h8300.c:1598 config/tc-h8300.c:1680
#, c-format
msgid "branch operand has odd offset (%lx)\n"
msgstr ""
-#: config/tc-h8300.c:1766
+#: config/tc-h8300.c:1718
msgid "destination operand must be 16 bit register"
msgstr ""
-#: config/tc-h8300.c:1775
+#: config/tc-h8300.c:1727
msgid "source operand must be 8 bit register"
msgstr ""
-#: config/tc-h8300.c:1783
+#: config/tc-h8300.c:1735
msgid "destination operand must be 16bit absolute address"
msgstr ""
-#: config/tc-h8300.c:1790
+#: config/tc-h8300.c:1742
msgid "destination operand must be 8 bit register"
msgstr ""
-#: config/tc-h8300.c:1798
+#: config/tc-h8300.c:1750
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.
-#: config/tc-h8300.c:1806 config/tc-mmix.c:454 config/tc-mmix.c:466
-#: config/tc-mmix.c:2502 config/tc-mmix.c:2526 config/tc-mmix.c:2802
-#: config/tc-or32.c:640 config/tc-or32.c:854
+#. 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
msgid "invalid operands"
msgstr ""
-#: config/tc-h8300.c:1839
+#: config/tc-h8300.c:1789
msgid "operand/size mis-match"
msgstr ""
-#: config/tc-h8300.c:1926 config/tc-h8500.c:1112 config/tc-mips.c:9302
-#: config/tc-sh.c:2363 config/tc-sh64.c:2837 config/tc-w65.c:691
-#: config/tc-z8k.c:1248
+#: 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
msgid "unknown opcode"
msgstr ""
-#: config/tc-h8300.c:2031 config/tc-h8500.c:1139 config/tc-sh.c:2483
-#: config/tc-z8k.c:1304
-msgid "call to tc_crawl_symbol_chain \n"
+#: config/tc-h8300.c:1918
+msgid "invalid operand in ldm"
msgstr ""
-#: config/tc-h8300.c:2047 config/tc-h8500.c:1153 config/tc-sh.c:2490
-#: config/tc-z8k.c:1320
-msgid "call to tc_headers_hook \n"
+#: config/tc-h8300.c:1927
+msgid "invalid operand in stm"
msgstr ""
-#: config/tc-h8300.c:2140
+#: config/tc-h8300.c:2093
+#, c-format
msgid "call to tc_aout_fix_to_chars \n"
msgstr ""
-#: config/tc-h8300.c:2154
+#: config/tc-h8300.c:2102
+#, c-format
msgid "call to md_convert_frag \n"
msgstr ""
-#: config/tc-h8300.c:2216
+#: config/tc-h8300.c:2146
+#, c-format
msgid "call tomd_estimate_size_before_relax \n"
msgstr ""
-#: config/tc-h8300.c:2337 config/tc-mcore.c:2355 config/tc-pj.c:581
-#: config/tc-sh.c:3956
+#: config/tc-h8300.c:2197 config/tc-mcore.c:2282 config/tc-pj.c:538
+#: config/tc-sh.c:4270
#, c-format
msgid "Cannot represent relocation type %s"
msgstr ""
-#: config/tc-h8500.c:325
-msgid ":24 not valid for this opcode"
-msgstr ""
-
-#: config/tc-h8500.c:332
-msgid "expect :8,:16 or :24"
-msgstr ""
-
-#: config/tc-h8500.c:391
-msgid "syntax error in reg list"
-msgstr ""
-
-#: config/tc-h8500.c:409
-msgid "missing final register in range"
-msgstr ""
-
-#: config/tc-h8500.c:498 config/tc-h8500.c:505 config/tc-h8500.c:511
-msgid "expected @(exp, Rn)"
-msgstr ""
-
-#: config/tc-h8500.c:527
-msgid "@Rn+ needs word register"
-msgstr ""
-
-#: config/tc-h8500.c:537
-msgid "@Rn needs word register"
-msgstr ""
-
-#: config/tc-h8500.c:838 config/tc-sh.c:1827
-#, c-format
-msgid "unhandled %d\n"
-msgstr ""
-
-#: config/tc-h8500.c:868
-#, c-format
-msgid "operand must be absolute in range %d..%d"
-msgstr ""
-
-#: config/tc-h8500.c:963 config/tc-sh.c:2036
-#, c-format
-msgid "failed for %d\n"
-msgstr ""
-
-#: config/tc-h8500.c:1128 config/tc-sh.c:2138 config/tc-sh.c:2412
-#: config/tc-w65.c:710
-msgid "invalid operands for opcode"
-msgstr ""
-
-#. Simple range checking for FIELD againt HIGH and LOW bounds.
+#. Simple range checking for FIELD against HIGH and LOW bounds.
#. IGNORE is used to suppress the error message.
-#: config/tc-hppa.c:1156 config/tc-hppa.c:1170
+#. 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
#, c-format
msgid "Field out of range [%d..%d] (%d)."
msgstr ""
-#. Simple alignment checking for FIELD againt ALIGN (a power of two).
+#. Simple alignment checking for FIELD against ALIGN (a power of two).
#. IGNORE is used to suppress the error message.
-#: config/tc-hppa.c:1184
+#: config/tc-hppa.c:1204
#, c-format
msgid "Field not properly aligned [%d] (%d)."
msgstr ""
-#: config/tc-hppa.c:1213
+#: config/tc-hppa.c:1233
msgid "Missing .exit\n"
msgstr ""
-#: config/tc-hppa.c:1216
+#: config/tc-hppa.c:1236
msgid "Missing .procend\n"
msgstr ""
-#: config/tc-hppa.c:1396
+#: config/tc-hppa.c:1422
#, c-format
msgid "Invalid field selector. Assuming F%%."
msgstr ""
-#: config/tc-hppa.c:1429
+#: config/tc-hppa.c:1455
msgid "-R option not supported on this target."
msgstr ""
-#: config/tc-hppa.c:1445 config/tc-sparc.c:809 config/tc-sparc.c:845
+#: 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"
msgstr ""
-#: config/tc-hppa.c:1453 config/tc-i860.c:201
+#: config/tc-hppa.c:1479 config/tc-i860.c:238
#, c-format
msgid "internal error: losing opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-hppa.c:1524 config/tc-hppa.c:7048 config/tc-hppa.c:7105
+#: 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:1527 config/tc-hppa.c:7108
+#: config/tc-hppa.c:1553 config/tc-hppa.c:7125
msgid "Missing function name for .PROC"
msgstr ""
-#: config/tc-hppa.c:1634 config/tc-hppa.c:4905
-msgid "could not update architecture and machine"
-msgstr ""
-
-#: config/tc-hppa.c:1842
+#: config/tc-hppa.c:1857
msgid "Invalid Indexed Load Completer."
msgstr ""
-#: config/tc-hppa.c:1847
+#: config/tc-hppa.c:1862
msgid "Invalid Indexed Load Completer Syntax."
msgstr ""
-#: config/tc-hppa.c:1884
+#: config/tc-hppa.c:1896
msgid "Invalid Short Load/Store Completer."
msgstr ""
-#: config/tc-hppa.c:1944 config/tc-hppa.c:1949
+#: config/tc-hppa.c:1956 config/tc-hppa.c:1961
msgid "Invalid Store Bytes Short Completer"
msgstr ""
-#: config/tc-hppa.c:2260 config/tc-hppa.c:2266
+#: config/tc-hppa.c:2272 config/tc-hppa.c:2278
msgid "Invalid left/right combination completer"
msgstr ""
-#: config/tc-hppa.c:2315 config/tc-hppa.c:2322
+#: config/tc-hppa.c:2327 config/tc-hppa.c:2334
msgid "Invalid permutation completer"
msgstr ""
-#: config/tc-hppa.c:2423
+#: config/tc-hppa.c:2434
#, c-format
msgid "Invalid Add Condition: %s"
msgstr ""
-#: config/tc-hppa.c:2434 config/tc-hppa.c:2444
+#: config/tc-hppa.c:2445 config/tc-hppa.c:2455
msgid "Invalid Add and Branch Condition"
msgstr ""
-#: config/tc-hppa.c:2465 config/tc-hppa.c:2603
+#: config/tc-hppa.c:2476 config/tc-hppa.c:2613
msgid "Invalid Compare/Subtract Condition"
msgstr ""
-#: config/tc-hppa.c:2505
+#: config/tc-hppa.c:2516
#, c-format
msgid "Invalid Bit Branch Condition: %c"
msgstr ""
-#: config/tc-hppa.c:2591
+#: config/tc-hppa.c:2601
#, c-format
msgid "Invalid Compare/Subtract Condition: %s"
msgstr ""
-#: config/tc-hppa.c:2618
+#: config/tc-hppa.c:2628
msgid "Invalid Compare and Branch Condition"
msgstr ""
-#: config/tc-hppa.c:2714
+#: config/tc-hppa.c:2724
msgid "Invalid Logical Instruction Condition."
msgstr ""
-#: config/tc-hppa.c:2769
+#: config/tc-hppa.c:2779
msgid "Invalid Shift/Extract/Deposit Condition."
msgstr ""
-#: config/tc-hppa.c:2881
+#: config/tc-hppa.c:2891
msgid "Invalid Unit Instruction Condition."
msgstr ""
-#: config/tc-hppa.c:3258 config/tc-hppa.c:3290 config/tc-hppa.c:3321
-#: config/tc-hppa.c:3351
+#: 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"
msgstr ""
-#: config/tc-hppa.c:3529
+#: config/tc-hppa.c:3541
msgid "Invalid SFU identifier"
msgstr ""
-#: config/tc-hppa.c:3579
+#: config/tc-hppa.c:3591
msgid "Invalid COPR identifier"
msgstr ""
-#: config/tc-hppa.c:3708
+#: config/tc-hppa.c:3720
msgid "Invalid Floating Point Operand Format."
msgstr ""
-#: config/tc-hppa.c:3825 config/tc-hppa.c:3845 config/tc-hppa.c:3865
-#: config/tc-hppa.c:3885 config/tc-hppa.c:3905
+#: 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"
msgstr ""
-#: config/tc-hppa.c:3962
+#: config/tc-hppa.c:3968 config/tc-hppa.c:4928
+msgid "could not update architecture and machine"
+msgstr ""
+
+#: config/tc-hppa.c:3985
#, c-format
msgid "Invalid operands %s"
msgstr ""
-#: config/tc-hppa.c:4080
+#: config/tc-hppa.c:4103
msgid "Cannot handle fixup"
msgstr ""
-#: config/tc-hppa.c:4381
+#: config/tc-hppa.c:4404
+#, c-format
msgid " -Q ignored\n"
msgstr ""
-#: config/tc-hppa.c:4385
+#: config/tc-hppa.c:4408
+#, c-format
msgid " -c print a warning if a comment is found\n"
msgstr ""
-#: config/tc-hppa.c:4456
+#: config/tc-hppa.c:4479
#, c-format
msgid "no hppa_fixup entry for fixup type 0x%x"
msgstr ""
-#: config/tc-hppa.c:4627
+#: config/tc-hppa.c:4650
msgid "Unknown relocation encountered in md_apply_fix."
msgstr ""
-#: config/tc-hppa.c:4769 config/tc-hppa.c:4794
+#: config/tc-hppa.c:4792 config/tc-hppa.c:4817
#, c-format
msgid "Undefined register: '%s'."
msgstr ""
-#: config/tc-hppa.c:4828
+#: config/tc-hppa.c:4851
#, c-format
msgid "Non-absolute symbol: '%s'."
msgstr ""
-#: config/tc-hppa.c:4843
+#: config/tc-hppa.c:4866
#, c-format
msgid "Undefined absolute constant: '%s'."
msgstr ""
-#: config/tc-hppa.c:4944
+#: config/tc-hppa.c:4967
#, c-format
msgid "Invalid FP Compare Condition: %s"
msgstr ""
-#: config/tc-hppa.c:5000
+#: config/tc-hppa.c:5023
#, c-format
msgid "Invalid FTEST completer: %s"
msgstr ""
-#: config/tc-hppa.c:5067 config/tc-hppa.c:5105
+#: config/tc-hppa.c:5090 config/tc-hppa.c:5128
#, c-format
msgid "Invalid FP Operand Format: %3s"
msgstr ""
-#: config/tc-hppa.c:5184
+#: config/tc-hppa.c:5207
msgid "Bad segment in expression."
msgstr ""
-#: config/tc-hppa.c:5243
+#: config/tc-hppa.c:5266
msgid "Bad segment (should be absolute)."
msgstr ""
-#: config/tc-hppa.c:5286
+#: config/tc-hppa.c:5309
#, c-format
msgid "Invalid argument location: %s\n"
msgstr ""
-#: config/tc-hppa.c:5317
+#: config/tc-hppa.c:5340
#, c-format
msgid "Invalid argument description: %d"
msgstr ""
-#: config/tc-hppa.c:5340
+#: config/tc-hppa.c:5363
#, c-format
msgid "Invalid Nullification: (%c)"
msgstr ""
-#: config/tc-hppa.c:6060
+#: config/tc-hppa.c:5960
+msgid "Argument to .BLOCK/.BLOCKZ must be between 0 and 0x3fffffff"
+msgstr ""
+
+#: config/tc-hppa.c:6076
#, c-format
msgid "Invalid .CALL argument: %s"
msgstr ""
-#: config/tc-hppa.c:6182
+#: config/tc-hppa.c:6198
msgid ".callinfo is not within a procedure definition"
msgstr ""
-#: config/tc-hppa.c:6202
+#: config/tc-hppa.c:6218
#, c-format
msgid "FRAME parameter must be a multiple of 8: %d\n"
msgstr ""
-#: config/tc-hppa.c:6221
+#: config/tc-hppa.c:6237
msgid "Value for ENTRY_GR must be in the range 3..18\n"
msgstr ""
-#: config/tc-hppa.c:6233
+#: config/tc-hppa.c:6249
msgid "Value for ENTRY_FR must be in the range 12..21\n"
msgstr ""
-#: config/tc-hppa.c:6243
+#: config/tc-hppa.c:6259
msgid "Value for ENTRY_SR must be 3\n"
msgstr ""
-#: config/tc-hppa.c:6299
+#: config/tc-hppa.c:6315
#, c-format
msgid "Invalid .CALLINFO argument: %s"
msgstr ""
-#: config/tc-hppa.c:6410
+#: config/tc-hppa.c:6427
msgid "The .ENTER pseudo-op is not supported"
msgstr ""
-#: config/tc-hppa.c:6426
+#: config/tc-hppa.c:6443
msgid "Misplaced .entry. Ignored."
msgstr ""
-#: config/tc-hppa.c:6430
+#: config/tc-hppa.c:6447
msgid "Missing .callinfo."
msgstr ""
-#: config/tc-hppa.c:6496
+#: config/tc-hppa.c:6513
msgid ".REG expression must be a register"
msgstr ""
-#: config/tc-hppa.c:6512
+#: config/tc-hppa.c:6529
msgid "bad or irreducible absolute expression; zero assumed"
msgstr ""
-#: config/tc-hppa.c:6523
+#: config/tc-hppa.c:6540
msgid ".REG must use a label"
msgstr ""
-#: config/tc-hppa.c:6525
+#: config/tc-hppa.c:6542
msgid ".EQU must use a label"
msgstr ""
-#: config/tc-hppa.c:6578
+#: config/tc-hppa.c:6595
msgid ".EXIT must appear within a procedure"
msgstr ""
-#: config/tc-hppa.c:6582
+#: config/tc-hppa.c:6599
msgid "Missing .callinfo"
msgstr ""
-#: config/tc-hppa.c:6586
+#: config/tc-hppa.c:6603
msgid "No .ENTRY for this .EXIT"
msgstr ""
-#: config/tc-hppa.c:6613
+#: config/tc-hppa.c:6630
#, c-format
msgid "Cannot define export symbol: %s\n"
msgstr ""
-#: config/tc-hppa.c:6671
+#: config/tc-hppa.c:6688
#, c-format
msgid "Using ENTRY rather than CODE in export directive for %s"
msgstr ""
-#: config/tc-hppa.c:6788
+#: config/tc-hppa.c:6805
#, c-format
msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s"
msgstr ""
-#: config/tc-hppa.c:6870
+#: config/tc-hppa.c:6887
msgid "Missing label name on .LABEL"
msgstr ""
-#: config/tc-hppa.c:6875
+#: config/tc-hppa.c:6892
msgid "extra .LABEL arguments ignored."
msgstr ""
-#: config/tc-hppa.c:6892
+#: config/tc-hppa.c:6909
msgid "The .LEAVE pseudo-op is not supported"
msgstr ""
-#: config/tc-hppa.c:6931
+#: config/tc-hppa.c:6948
msgid "Unrecognized .LEVEL argument\n"
msgstr ""
-#: config/tc-hppa.c:6967
+#: config/tc-hppa.c:6984
#, c-format
msgid "Cannot define static symbol: %s\n"
msgstr ""
-#: config/tc-hppa.c:7002
+#: config/tc-hppa.c:7019
msgid "Nested procedures"
msgstr ""
-#: config/tc-hppa.c:7012
+#: config/tc-hppa.c:7029
msgid "Cannot allocate unwind descriptor\n"
msgstr ""
-#: config/tc-hppa.c:7112
+#: config/tc-hppa.c:7129
msgid "misplaced .procend"
msgstr ""
-#: config/tc-hppa.c:7115
+#: config/tc-hppa.c:7132
msgid "Missing .callinfo for this procedure"
msgstr ""
-#: config/tc-hppa.c:7118
+#: config/tc-hppa.c:7135
msgid "Missing .EXIT for a .ENTRY"
msgstr ""
-#: config/tc-hppa.c:7156
+#: config/tc-hppa.c:7173
msgid "Not in a space.\n"
msgstr ""
-#: config/tc-hppa.c:7159
+#: config/tc-hppa.c:7176
msgid "Not in a subspace.\n"
msgstr ""
-#: config/tc-hppa.c:7250
+#: config/tc-hppa.c:7267
msgid "Invalid .SPACE argument"
msgstr ""
-#: config/tc-hppa.c:7297
+#: config/tc-hppa.c:7314
msgid "Can't change spaces within a procedure definition. Ignored"
msgstr ""
-#: config/tc-hppa.c:7426
+#: config/tc-hppa.c:7443
#, c-format
msgid "Undefined space: '%s' Assuming space number = 0."
msgstr ""
-#: config/tc-hppa.c:7450
+#: config/tc-hppa.c:7467
msgid "Must be in a space before changing or declaring subspaces.\n"
msgstr ""
-#: config/tc-hppa.c:7454
+#: config/tc-hppa.c:7471
msgid "Can't change subspaces within a procedure definition. Ignored"
msgstr ""
-#: config/tc-hppa.c:7489
+#: config/tc-hppa.c:7507
msgid "Parameters of an existing subspace can't be modified"
msgstr ""
-#: config/tc-hppa.c:7540
+#: config/tc-hppa.c:7559
msgid "Alignment must be a power of 2"
msgstr ""
-#: config/tc-hppa.c:7582
+#: config/tc-hppa.c:7606
msgid "FIRST not supported as a .SUBSPACE argument"
msgstr ""
-#: config/tc-hppa.c:7584
+#: config/tc-hppa.c:7608
msgid "Invalid .SUBSPACE argument"
msgstr ""
-#: config/tc-hppa.c:7764
+#: config/tc-hppa.c:7797
#, c-format
msgid "Internal error: Unable to find containing space for %s."
msgstr ""
-#: config/tc-hppa.c:7803
+#: config/tc-hppa.c:7837
#, c-format
msgid "Out of memory: could not allocate new space chain entry: %s\n"
msgstr ""
-#: config/tc-hppa.c:7889
+#: config/tc-hppa.c:7926
#, c-format
msgid "Out of memory: could not allocate new subspace chain entry: %s\n"
msgstr ""
-#: config/tc-hppa.c:8622
+#: config/tc-hppa.c:8662
#, c-format
msgid "Symbol '%s' could not be created."
msgstr ""
-#: config/tc-hppa.c:8626
+#: config/tc-hppa.c:8666
msgid "No memory for symbol name."
msgstr ""
-#: config/tc-i386.c:689
+#: config/tc-i386.c:721
#, c-format
msgid "%s shortened to %s"
msgstr ""
-#: config/tc-i386.c:745
+#: config/tc-i386.c:777
msgid "same type of prefix used twice"
msgstr ""
-#: config/tc-i386.c:763
+#: config/tc-i386.c:795
msgid "64bit mode not supported on this CPU."
msgstr ""
-#: config/tc-i386.c:767
+#: config/tc-i386.c:799
msgid "32bit mode not supported on this CPU."
msgstr ""
-#: config/tc-i386.c:800
+#: config/tc-i386.c:832
msgid "bad argument to syntax directive."
msgstr ""
-#: config/tc-i386.c:844
+#: config/tc-i386.c:884
#, c-format
msgid "no such architecture: `%s'"
msgstr ""
-#: config/tc-i386.c:849
+#: config/tc-i386.c:889
msgid "missing cpu architecture"
msgstr ""
-#: config/tc-i386.c:863
+#: config/tc-i386.c:903
#, c-format
msgid "no such architecture modifier: `%s'"
msgstr ""
-#: config/tc-i386.c:880 config/tc-i386.c:5022
+#: config/tc-i386.c:919 config/tc-i386.c:5342
msgid "Unknown architecture"
msgstr ""
-#: config/tc-i386.c:915 config/tc-i386.c:938 config/tc-m68k.c:3816
+#: config/tc-i386.c:1247
#, c-format
-msgid "Internal Error: Can't hash %s: %s"
+msgid "unknown relocation (%u)"
msgstr ""
-#: config/tc-i386.c:1192
-msgid "There are no unsigned pc-relative relocations"
+#: config/tc-i386.c:1249
+#, c-format
+msgid "%u-byte relocation cannot be applied to %u-byte field"
+msgstr ""
+
+#: config/tc-i386.c:1253
+msgid "non-pc-relative relocation for pc-relative field"
+msgstr ""
+
+#: config/tc-i386.c:1258
+msgid "relocated field and relocation type differ in signedness"
msgstr ""
-#: config/tc-i386.c:1199 config/tc-i386.c:5234
+#: config/tc-i386.c:1267
+msgid "there are no unsigned pc-relative relocations"
+msgstr ""
+
+#: config/tc-i386.c:1275
#, c-format
-msgid "can not do %d byte pc-relative relocation"
+msgid "cannot do %u byte pc-relative relocation"
+msgstr ""
+
+#: config/tc-i386.c:1292
+#, c-format
+msgid "cannot do %s %u byte relocation"
msgstr ""
-#: config/tc-i386.c:1216
+#: config/tc-i386.c:1496 config/tc-i386.c:2527
#, c-format
-msgid "can not do %s %d byte relocation"
+msgid "ambiguous operand size for `%s'"
msgstr ""
-#: config/tc-i386.c:1428
+#: config/tc-i386.c:1544
#, c-format
msgid "can't use register '%%%s' as operand %d in '%s'."
msgstr ""
#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc.
-#: config/tc-i386.c:1457
+#: config/tc-i386.c:1573
#, c-format
msgid "translating to `%sp'"
msgstr ""
-#: config/tc-i386.c:1502
+#: config/tc-i386.c:1618
#, c-format
-msgid "can't encode register '%%%s' in an instruction requiring REX prefix.\n"
+msgid "can't encode register '%%%s' in an instruction requiring REX prefix."
msgstr ""
-#: config/tc-i386.c:1541 config/tc-i386.c:1636
+#: config/tc-i386.c:1659 config/tc-i386.c:1767
#, c-format
msgid "no such instruction: `%s'"
msgstr ""
-#: config/tc-i386.c:1551 config/tc-i386.c:1668
+#: config/tc-i386.c:1670 config/tc-i386.c:1799
#, c-format
msgid "invalid character %s in mnemonic"
msgstr ""
-#: config/tc-i386.c:1558
+#: config/tc-i386.c:1677
msgid "expecting prefix; got nothing"
msgstr ""
-#: config/tc-i386.c:1560
+#: config/tc-i386.c:1679
msgid "expecting mnemonic; got nothing"
msgstr ""
-#: config/tc-i386.c:1579
+#: config/tc-i386.c:1695 config/tc-i386.c:1818
+#, c-format
+msgid "`%s' is only supported in 64-bit mode"
+msgstr ""
+
+#: config/tc-i386.c:1696 config/tc-i386.c:1817
+#, c-format
+msgid "`%s' is not supported in 64-bit mode"
+msgstr ""
+
+#: config/tc-i386.c:1707
#, c-format
msgid "redundant %s prefix"
msgstr ""
-#: config/tc-i386.c:1677
+#: config/tc-i386.c:1824
#, c-format
-msgid "`%s' is not supported on `%s'"
+msgid "`%s' is not supported on `%s%s'"
msgstr ""
-#: config/tc-i386.c:1682
+#: config/tc-i386.c:1831
msgid "use .code16 to ensure correct addressing mode"
msgstr ""
-#: config/tc-i386.c:1689
+#: config/tc-i386.c:1844
#, c-format
msgid "expecting string instruction after `%s'"
msgstr ""
-#: config/tc-i386.c:1717
+#: config/tc-i386.c:1878
#, c-format
msgid "invalid character %s before operand %d"
msgstr ""
-#: config/tc-i386.c:1731
+#: config/tc-i386.c:1892
#, c-format
msgid "unbalanced parenthesis in operand %d."
msgstr ""
-#: config/tc-i386.c:1734
+#: config/tc-i386.c:1895
#, c-format
msgid "unbalanced brackets in operand %d."
msgstr ""
-#: config/tc-i386.c:1743
+#: config/tc-i386.c:1904
#, c-format
msgid "invalid character %s in operand %d"
msgstr ""
-#: config/tc-i386.c:1770
+#: config/tc-i386.c:1931
#, c-format
msgid "spurious operands; (%d operands/instruction max)"
msgstr ""
-#: config/tc-i386.c:1793
+#: config/tc-i386.c:1954
msgid "expecting operand after ','; got nothing"
msgstr ""
-#: config/tc-i386.c:1798
+#: config/tc-i386.c:1959
msgid "expecting operand before ','; got nothing"
msgstr ""
#. We found no match.
-#: config/tc-i386.c:2140
+#: config/tc-i386.c:2336
#, c-format
msgid "suffix or operands invalid for `%s'"
msgstr ""
-#: config/tc-i386.c:2151
+#: config/tc-i386.c:2347
#, 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:2159
+#: config/tc-i386.c:2355
#, c-format
msgid "stand-alone `%s' prefix"
msgstr ""
-#: config/tc-i386.c:2188 config/tc-i386.c:2203
+#: config/tc-i386.c:2384 config/tc-i386.c:2399
#, c-format
msgid "`%s' operand %d must use `%%es' segment"
msgstr ""
-#: config/tc-i386.c:2283
+#: config/tc-i386.c:2509
msgid ""
"no instruction mnemonic suffix given and no register operands; can't size "
"instruction"
@@ -4311,192 +4663,182 @@ msgstr ""
#. Prohibit these changes in the 64bit mode, since the
#. lowering is more complicated.
-#: config/tc-i386.c:2367 config/tc-i386.c:2426 config/tc-i386.c:2443
-#: config/tc-i386.c:2475 config/tc-i386.c:2508
+#: 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
#, c-format
msgid "Incorrect register `%%%s' used with `%c' suffix"
msgstr ""
-#: config/tc-i386.c:2375 config/tc-i386.c:2433 config/tc-i386.c:2515
+#: config/tc-i386.c:2618 config/tc-i386.c:2676 config/tc-i386.c:2758
#, c-format
msgid "using `%%%s' instead of `%%%s' due to `%c' suffix"
msgstr ""
-#: config/tc-i386.c:2390 config/tc-i386.c:2411 config/tc-i386.c:2462
-#: config/tc-i386.c:2493
+#: config/tc-i386.c:2633 config/tc-i386.c:2654 config/tc-i386.c:2705
+#: config/tc-i386.c:2736
#, c-format
msgid "`%%%s' not allowed with `%s%c'"
msgstr ""
-#: config/tc-i386.c:2556
+#: config/tc-i386.c:2799
msgid "no instruction mnemonic suffix given; can't determine immediate size"
msgstr ""
-#: config/tc-i386.c:2589
+#: config/tc-i386.c:2832
#, 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:2638
+#: config/tc-i386.c:2881
#, c-format
msgid "translating to `%s %%%s,%%%s'"
msgstr ""
#. Extraneous `l' suffix on fp insn.
-#: config/tc-i386.c:2645
+#: config/tc-i386.c:2888
#, c-format
msgid "translating to `%s %%%s'"
msgstr ""
-#: config/tc-i386.c:2663
+#: config/tc-i386.c:2906
#, c-format
msgid "you can't `pop %%cs'"
msgstr ""
-#. lea
-#: config/tc-i386.c:2682
-msgid "segment override on `lea' is ineffectual"
+#: config/tc-i386.c:2927
+#, c-format
+msgid "segment override on `%s' is ineffectual"
msgstr ""
-#: config/tc-i386.c:2991 config/tc-i386.c:3085 config/tc-i386.c:3130
+#: config/tc-i386.c:3236 config/tc-i386.c:3330 config/tc-i386.c:3375
msgid "skipping prefixes on this instruction"
msgstr ""
-#: config/tc-i386.c:3150
+#: config/tc-i386.c:3395
msgid "16-bit jump out of range"
msgstr ""
-#: config/tc-i386.c:3159
+#: config/tc-i386.c:3404
#, c-format
msgid "can't handle non absolute segment in `%s'"
msgstr ""
-#: config/tc-i386.c:3601
+#: config/tc-i386.c:3897
#, c-format
-msgid "@%s reloc is not supported in %s bit mode"
+msgid "@%s reloc is not supported with %d-bit output format"
msgstr ""
-#: config/tc-i386.c:3677
+#: config/tc-i386.c:3986
msgid "only 1 or 2 immediate operands are allowed"
msgstr ""
-#: config/tc-i386.c:3700 config/tc-i386.c:3892
+#: config/tc-i386.c:4007 config/tc-i386.c:4218
#, c-format
msgid "junk `%s' after expression"
msgstr ""
#. Missing or bad expr becomes absolute 0.
-#: config/tc-i386.c:3711
+#: config/tc-i386.c:4016
#, c-format
msgid "missing or invalid immediate expression `%s' taken as 0"
msgstr ""
-#: config/tc-i386.c:3743 config/tc-i386.c:3958
+#: config/tc-i386.c:4041 config/tc-i386.c:4277
#, c-format
msgid "unimplemented segment %s in operand"
msgstr ""
-#: config/tc-i386.c:3745 config/tc-i386.c:3960
-#, c-format
-msgid "unimplemented segment type %d in operand"
-msgstr ""
-
-#: config/tc-i386.c:3789 config/tc-i386.c:6011
+#: config/tc-i386.c:4088
#, c-format
msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'"
msgstr ""
-#: config/tc-i386.c:3796
+#: config/tc-i386.c:4097
#, c-format
msgid "scale factor of %d without an index register"
msgstr ""
-#: config/tc-i386.c:3912
+#: config/tc-i386.c:4236
#, c-format
msgid "bad expression used with @%s"
msgstr ""
-#. Missing or bad expr becomes absolute 0.
-#: config/tc-i386.c:3934
-#, c-format
-msgid "missing or invalid displacement expression `%s' taken as 0"
-msgstr ""
-
-#: config/tc-i386.c:4058
+#: config/tc-i386.c:4386
#, c-format
msgid "`%s' is not a valid base/index expression"
msgstr ""
-#: config/tc-i386.c:4062
+#: config/tc-i386.c:4390
#, c-format
msgid "`%s' is not a valid %s bit base/index expression"
msgstr ""
-#: config/tc-i386.c:4137
+#: config/tc-i386.c:4464
#, c-format
msgid "bad memory operand `%s'"
msgstr ""
-#: config/tc-i386.c:4152
+#: config/tc-i386.c:4479
#, c-format
msgid "junk `%s' after register"
msgstr ""
-#: config/tc-i386.c:4161 config/tc-i386.c:4276 config/tc-i386.c:4314
+#: config/tc-i386.c:4488 config/tc-i386.c:4603 config/tc-i386.c:4641
#, c-format
msgid "bad register name `%s'"
msgstr ""
-#: config/tc-i386.c:4169
+#: config/tc-i386.c:4496
msgid "immediate operand illegal with absolute jump"
msgstr ""
-#: config/tc-i386.c:4191
+#: config/tc-i386.c:4518
#, c-format
msgid "too many memory references for `%s'"
msgstr ""
-#: config/tc-i386.c:4269
+#: config/tc-i386.c:4596
#, c-format
msgid "expecting `,' or `)' after index register in `%s'"
msgstr ""
-#: config/tc-i386.c:4293
+#: config/tc-i386.c:4620
#, c-format
msgid "expecting `)' after scale factor in `%s'"
msgstr ""
-#: config/tc-i386.c:4300
+#: config/tc-i386.c:4627
#, c-format
msgid "expecting index register or scale factor after `,'; got '%c'"
msgstr ""
-#: config/tc-i386.c:4307
+#: config/tc-i386.c:4634
#, c-format
msgid "expecting `,' or `)' after base register in `%s'"
msgstr ""
#. It's not a memory operand; argh!
-#: config/tc-i386.c:4348
+#: config/tc-i386.c:4675
#, c-format
msgid "invalid char %s beginning operand %d `%s'"
msgstr ""
-#: config/tc-i386.c:4531
+#: config/tc-i386.c:4850
msgid "long jump required"
msgstr ""
-#: config/tc-i386.c:4805
+#: config/tc-i386.c:5127
msgid "Bad call to md_atof ()"
msgstr ""
-#: config/tc-i386.c:4973
+#: config/tc-i386.c:5294
msgid "No compiled in support for x86_64"
msgstr ""
-#: config/tc-i386.c:4994
+#: config/tc-i386.c:5315
+#, c-format
msgid ""
" -Q ignored\n"
" -V print assembler version number\n"
@@ -4506,417 +4848,501 @@ msgid ""
" -s ignored\n"
msgstr ""
-#: config/tc-i386.c:5002
+#: config/tc-i386.c:5323
+#, c-format
msgid ""
" -n Do not optimize code alignment\n"
" -q quieten some warnings\n"
msgstr ""
-#: config/tc-i386.c:5104 config/tc-s390.c:1841
+#: config/tc-i386.c:5425 config/tc-s390.c:1861
msgid "GOT already in symbol table"
msgstr ""
-#: config/tc-i386.c:5249
+#: config/tc-i386.c:5568
+#, c-format
+msgid "can not do %d byte pc-relative relocation"
+msgstr ""
+
+#: config/tc-i386.c:5586
#, c-format
msgid "can not do %d byte relocation"
msgstr ""
-#: config/tc-i386.c:5317 config/tc-s390.c:2285
+#: config/tc-i386.c:5657 config/tc-s390.c:2307
#, c-format
msgid "cannot represent relocation type %s"
msgstr ""
-#: config/tc-i386.c:5613
+#: config/tc-i386.c:5912
+#, c-format
+msgid "invalid operand for '%s' ('%s' unexpected)"
+msgstr ""
+
+#: config/tc-i386.c:5924
#, c-format
msgid "too many memory references for '%s'"
msgstr ""
-#: config/tc-i386.c:5776
+#. See the comments in intel_bracket_expr.
+#: config/tc-i386.c:5935
#, c-format
-msgid "Unknown operand modifier `%s'\n"
+msgid "Treating `%s' as memory reference"
msgstr ""
-#: config/tc-i386.c:5983
+#: config/tc-i386.c:6247
+#, c-format
+msgid "Unknown operand modifier `%s'"
+msgstr ""
+
+#: config/tc-i386.c:6262
+msgid "Conflicting operand modifiers"
+msgstr ""
+
+#: config/tc-i386.c:6311
+msgid "Invalid operand to `OFFSET'"
+msgstr ""
+
+#: config/tc-i386.c:6384
+#, c-format
+msgid "`[%.*s]' taken to mean just `%.*s'"
+msgstr ""
+
+#: config/tc-i386.c:6474
#, c-format
msgid "`%s' is not a valid segment register"
msgstr ""
-#: config/tc-i386.c:5993 config/tc-i386.c:6114
-msgid "Register scaling only allowed in memory operands."
+#: config/tc-i386.c:6478
+msgid "Extra segment override ignored"
msgstr ""
-#: config/tc-i386.c:6024
-msgid "Too many register references in memory operand.\n"
+#: config/tc-i386.c:6512 config/tc-i386.c:6681
+msgid "Register scaling only allowed in memory operands"
msgstr ""
-#: config/tc-i386.c:6093
+#: config/tc-i386.c:6534 config/tc-i386.c:6658
#, c-format
-msgid "Syntax error. Expecting a constant. Got `%s'.\n"
+msgid "Syntax error: Expecting a constant, got `%s'"
+msgstr ""
+
+#: config/tc-i386.c:6562
+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:6163
+#: config/tc-i386.c:6586
+msgid "Invalid use of register"
+msgstr ""
+
+#: config/tc-i386.c:6731
#, c-format
msgid "Unrecognized token '%s'"
msgstr ""
-#: config/tc-i386.c:6180
+#: config/tc-i386.c:6748
#, c-format
-msgid "Unexpected token `%s'\n"
+msgid "Unexpected token `%s'"
+msgstr ""
+
+#: config/tc-i386.c:6910
+msgid "`:' expected"
msgstr ""
-#: config/tc-i386.c:6324
+#: config/tc-i386.c:6935
#, c-format
-msgid "Unrecognized token `%s'\n"
+msgid "Unrecognized token `%s'"
+msgstr ""
+
+#: config/tc-i386.c:7070
+msgid "Bad .section directive: want a,l,w,x,M,S,G,T in string"
+msgstr ""
+
+#: config/tc-i386.c:7073
+msgid "Bad .section directive: want a,w,x,M,S,G,T in string"
+msgstr ""
+
+#: config/tc-i386.c:7092
+msgid ".largecomm supported only in 64bit mode, producing .comm"
+msgstr ""
+
+#: config/tc-i860.c:124
+msgid "Directive .dual available only with -mintel-syntax option"
+msgstr ""
+
+#: config/tc-i860.c:134
+msgid "Directive .enddual available only with -mintel-syntax option"
+msgstr ""
+
+#: config/tc-i860.c:147
+msgid "Directive .atmp available only with -mintel-syntax option"
msgstr ""
-#: config/tc-i860.c:165 config/tc-i860.c:169
+#: config/tc-i860.c:169 config/tc-i860.c:173
msgid "Unknown temporary pseudo register"
msgstr ""
-#: config/tc-i860.c:192 config/tc-mips.c:1105
+#: config/tc-i860.c:229 config/tc-mips.c:1412
#, c-format
msgid "internal error: can't hash `%s': %s\n"
msgstr ""
-#: config/tc-i860.c:212
+#: config/tc-i860.c:249
msgid "Defective assembler. No assembly attempted."
msgstr ""
-#: config/tc-i860.c:362
+#: 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
+msgid "failed sanity check."
+msgstr ""
+
+#: config/tc-i860.c:402
#, c-format
msgid "Expanded opcode after delayed branch: `%s'"
msgstr ""
-#: config/tc-i860.c:366
+#: config/tc-i860.c:406
#, c-format
msgid "Expanded opcode in dual mode: `%s'"
msgstr ""
-#: config/tc-i860.c:370
+#: config/tc-i860.c:410
#, c-format
msgid "An instruction was expanded (%s)"
msgstr ""
-#: config/tc-i860.c:643
+#: config/tc-i860.c:676
msgid "Pipelined instruction: fsrc1 = fdest"
msgstr ""
-#: config/tc-i860.c:844 config/tc-i860.c:851 config/tc-i860.c:858
+#: config/tc-i860.c:879 config/tc-i860.c:886 config/tc-i860.c:893
msgid "Assembler does not yet support PIC"
msgstr ""
-#: config/tc-i860.c:919
+#: config/tc-i860.c:957
#, c-format
msgid "Illegal operands for %s"
msgstr ""
-#: config/tc-i860.c:947 config/tc-sparc.c:2834
-msgid "bad segment"
+#: config/tc-i860.c:974
+#, c-format
+msgid "'d.%s' must be 8-byte aligned"
msgstr ""
-#: config/tc-i860.c:1037
+#: config/tc-i860.c:982
+#, c-format
+msgid "Prefix 'd.' invalid for instruction `%s'"
+msgstr ""
+
+#: config/tc-i860.c:1088
msgid "i860_estimate_size_before_relax\n"
msgstr ""
-#: config/tc-i860.c:1134
+#: config/tc-i860.c:1187
+#, c-format
msgid ""
" -EL\t\t\t generate code for little endian mode (default)\n"
" -EB\t\t\t generate code for big endian mode\n"
" -mwarn-expand\t\t warn if pseudo operations are expanded\n"
" -mxp\t\t\t enable i860XP support (disabled by default)\n"
+" -mintel-syntax\t enable Intel syntax (default to AT&T/SVR4)\n"
msgstr ""
#. SVR4 compatibility flags.
-#: config/tc-i860.c:1141
+#: config/tc-i860.c:1195
+#, c-format
msgid ""
" -V\t\t\t print assembler version number\n"
" -Qy, -Qn\t\t ignored\n"
msgstr ""
-#: config/tc-i860.c:1210
+#: config/tc-i860.c:1258
msgid "This immediate requires 0 MOD 2 alignment"
msgstr ""
-#: config/tc-i860.c:1213
+#: config/tc-i860.c:1261
msgid "This immediate requires 0 MOD 4 alignment"
msgstr ""
-#: config/tc-i860.c:1216
+#: config/tc-i860.c:1264
msgid "This immediate requires 0 MOD 8 alignment"
msgstr ""
-#: config/tc-i860.c:1219
+#: config/tc-i860.c:1267
msgid "This immediate requires 0 MOD 16 alignment"
msgstr ""
-#: config/tc-i860.c:1317
+#: config/tc-i860.c:1362
msgid "5-bit immediate too large"
msgstr ""
-#: config/tc-i860.c:1320
+#: config/tc-i860.c:1365
msgid "5-bit field must be absolute"
msgstr ""
-#: config/tc-i860.c:1365 config/tc-i860.c:1388
+#: config/tc-i860.c:1410 config/tc-i860.c:1433
msgid "A branch offset requires 0 MOD 4 alignment"
msgstr ""
-#: config/tc-i860.c:1409
+#: config/tc-i860.c:1454
#, c-format
msgid "Unrecognized fix-up (0x%08lx)"
msgstr ""
-#: config/tc-i860.h:80
+#: config/tc-i860.h:76
msgid "i860_convert_frag\n"
msgstr ""
-#: config/tc-i960.c:574
+#: config/tc-i960.c:488
#, c-format
msgid "Hashing returned \"%s\"."
msgstr ""
-#. Offset of last character in opcode mnemonic
-#: config/tc-i960.c:608
-msgid "branch prediction invalid on this opcode"
-msgstr ""
-
-#: config/tc-i960.c:648
-#, c-format
-msgid "invalid opcode, \"%s\"."
+#: config/tc-i960.c:584 config/tc-i960.c:1114
+msgid "expression syntax error"
msgstr ""
-#: config/tc-i960.c:653
-#, c-format
-msgid "improper number of operands. expecting %d, got %d"
+#: config/tc-i960.c:620
+msgid "attempt to branch into different segment"
msgstr ""
-#: config/tc-i960.c:877
+#: config/tc-i960.c:624
#, c-format
-msgid "Fixup of %ld too large for field width of %d"
+msgid "target of %s instruction must be a label"
msgstr ""
-#: config/tc-i960.c:994
-#, c-format
-msgid "invalid architecture %s"
+#: config/tc-i960.c:734
+msgid "unaligned register"
msgstr ""
-#: config/tc-i960.c:1014
-msgid "I960 options:\n"
+#: config/tc-i960.c:756
+msgid "no such sfr in this architecture"
msgstr ""
-#: config/tc-i960.c:1017
-msgid ""
-"\n"
-"\t\t\tspecify variant of 960 architecture\n"
-"-b\t\t\tadd code to collect statistics about branches taken\n"
-"-link-relax\t\tpreserve individual alignment directives so linker\n"
-"\t\t\tcan do relaxing (b.out format only)\n"
-"-no-relax\t\tdon't alter compare-and-branch instructions for\n"
-"\t\t\tlong displacements\n"
+#: config/tc-i960.c:794
+msgid "illegal literal"
msgstr ""
-#: config/tc-i960.c:1419 config/tc-xtensa.c:8604
-msgid "too many operands"
+#: config/tc-i960.c:837
+msgid "unmatched '['"
msgstr ""
-#: config/tc-i960.c:1477 config/tc-i960.c:1702
-msgid "expression syntax error"
+#: config/tc-i960.c:844
+msgid "garbage after index spec ignored"
msgstr ""
-#: config/tc-i960.c:1515
-msgid "attempt to branch into different segment"
+#: config/tc-i960.c:944
+msgid "invalid index register"
msgstr ""
-#: config/tc-i960.c:1519
-#, c-format
-msgid "target of %s instruction must be a label"
+#: config/tc-i960.c:967
+msgid "invalid scale factor"
msgstr ""
-#: config/tc-i960.c:1557
-msgid "unmatched '['"
+#: config/tc-i960.c:1191
+msgid "architecture of opcode conflicts with that of earlier instruction(s)"
msgstr ""
-#: config/tc-i960.c:1568
-msgid "garbage after index spec ignored"
+#: config/tc-i960.c:1425 config/tc-xtensa.c:11295
+msgid "too many operands"
msgstr ""
#. We never moved: there was no opcode either!
-#: config/tc-i960.c:1633
+#: config/tc-i960.c:1473
msgid "missing opcode"
msgstr ""
-#: config/tc-i960.c:2046
-msgid "invalid index register"
+#: config/tc-i960.c:1613
+msgid "branch prediction invalid on this opcode"
msgstr ""
-#: config/tc-i960.c:2069
-msgid "invalid scale factor"
+#: config/tc-i960.c:1651
+#, c-format
+msgid "invalid opcode, \"%s\"."
msgstr ""
-#: config/tc-i960.c:2250
-msgid "unaligned register"
+#: config/tc-i960.c:1653
+#, c-format
+msgid "improper number of operands. expecting %d, got %d"
msgstr ""
-#: config/tc-i960.c:2273
-msgid "no such sfr in this architecture"
+#: config/tc-i960.c:1810
+#, c-format
+msgid "Fixup of %ld too large for field width of %d"
msgstr ""
-#: config/tc-i960.c:2311
-msgid "illegal literal"
+#: config/tc-i960.c:1920
+#, c-format
+msgid "invalid architecture %s"
msgstr ""
-#. Should not happen: see block comment above
-#: config/tc-i960.c:2539
+#: config/tc-i960.c:1940
#, c-format
-msgid "Trying to 'bal' to %s"
+msgid "I960 options:\n"
msgstr ""
-#: config/tc-i960.c:2550
-msgid "Looks like a proc, but can't tell what kind.\n"
+#: config/tc-i960.c:1943
+#, c-format
+msgid ""
+"\n"
+"\t\t\tspecify variant of 960 architecture\n"
+"-b\t\t\tadd code to collect statistics about branches taken\n"
+"-link-relax\t\tpreserve individual alignment directives so linker\n"
+"\t\t\tcan do relaxing (b.out format only)\n"
+"-no-relax\t\tdon't alter compare-and-branch instructions for\n"
+"\t\t\tlong displacements\n"
msgstr ""
-#: config/tc-i960.c:2582
+#: config/tc-i960.c:2207
msgid "should have 1 or 2 operands"
msgstr ""
-#: config/tc-i960.c:2591 config/tc-i960.c:2610
+#: config/tc-i960.c:2215 config/tc-i960.c:2230
#, c-format
msgid "Redefining leafproc %s"
msgstr ""
-#: config/tc-i960.c:2641
+#: config/tc-i960.c:2260
msgid "should have two operands"
msgstr ""
-#: config/tc-i960.c:2651
+#: config/tc-i960.c:2270
msgid "'entry_num' must be absolute number in [0,31]"
msgstr ""
-#: config/tc-i960.c:2660
+#: config/tc-i960.c:2278
#, c-format
msgid "Redefining entrynum for sysproc %s"
msgstr ""
-#: config/tc-i960.c:2764
-msgid "architecture of opcode conflicts with that of earlier instruction(s)"
+#. Should not happen: see block comment above.
+#: config/tc-i960.c:2378
+#, c-format
+msgid "Trying to 'bal' to %s"
+msgstr ""
+
+#: config/tc-i960.c:2388
+msgid "Looks like a proc, but can't tell what kind.\n"
msgstr ""
-#: config/tc-i960.c:2785
+#: config/tc-i960.c:2407
msgid "big endian mode is not supported"
msgstr ""
-#: config/tc-i960.c:2787
+#: config/tc-i960.c:2409
#, c-format
msgid "ignoring unrecognized .endian type `%s'"
msgstr ""
-#: config/tc-i960.c:3071
-#, c-format
-msgid "leafproc symbol '%s' undefined"
+#: config/tc-i960.c:2454
+msgid "can't use COBR format with external label"
msgstr ""
-#: config/tc-i960.c:3081
-#, c-format
-msgid "Warning: making leafproc entries %s and %s both global\n"
+#: config/tc-i960.c:2629
+msgid "option --link-relax is only supported in b.out format"
msgstr ""
-#: config/tc-i960.c:3190
-msgid "option --link-relax is only supported in b.out format"
+#: config/tc-i960.c:2656
+#, c-format
+msgid "No 'bal' entry point for leafproc %s"
msgstr ""
-#: config/tc-ia64.c:982
+#: config/tc-ia64.c:1008
msgid "Bad .section directive: want a,o,s,w,x,M,S,G,T in string"
msgstr ""
-#: config/tc-ia64.c:1105
+#: config/tc-ia64.c:1151
msgid "Unwind directive not followed by an instruction."
msgstr ""
-#: config/tc-ia64.c:4563
+#: config/tc-ia64.c:5114
msgid "Register name expected"
msgstr ""
-#: config/tc-ia64.c:4568 config/tc-ia64.c:4854
+#: config/tc-ia64.c:5119 config/tc-ia64.c:5435
msgid "Comma expected"
msgstr ""
-#: config/tc-ia64.c:4576
+#: config/tc-ia64.c:5127
msgid "Register value annotation ignored"
msgstr ""
-#: config/tc-ia64.c:4600
+#: config/tc-ia64.c:5168
msgid "Directive invalid within a bundle"
msgstr ""
-#: config/tc-ia64.c:4667
+#: config/tc-ia64.c:5261
msgid "Missing predicate relation type"
msgstr ""
-#: config/tc-ia64.c:4683
+#: config/tc-ia64.c:5267
msgid "Unrecognized predicate relation type"
msgstr ""
-#: config/tc-ia64.c:4703 config/tc-ia64.c:4728
-msgid "Predicate register expected"
+#: config/tc-ia64.c:5314
+msgid "Bad register range"
msgstr ""
-#: config/tc-ia64.c:4715
-msgid "Duplicate predicate register ignored"
+#: config/tc-ia64.c:5323
+msgid "Predicate register expected"
msgstr ""
-#: config/tc-ia64.c:4737
-msgid "Bad register range"
+#: config/tc-ia64.c:5328
+msgid "Duplicate predicate register ignored"
msgstr ""
-#: config/tc-ia64.c:4765
+#: config/tc-ia64.c:5346
msgid "Predicate source and target required"
msgstr ""
-#: config/tc-ia64.c:4767 config/tc-ia64.c:4779
+#: config/tc-ia64.c:5348 config/tc-ia64.c:5360
msgid "Use of p0 is not valid in this context"
msgstr ""
-#: config/tc-ia64.c:4774
+#: config/tc-ia64.c:5355
msgid "At least two PR arguments expected"
msgstr ""
-#: config/tc-ia64.c:4788
+#: config/tc-ia64.c:5369
msgid "At least one PR argument expected"
msgstr ""
-#: config/tc-ia64.c:4824
+#: config/tc-ia64.c:5405
#, c-format
msgid "Inserting \"%s\" into entry hint table failed: %s"
msgstr ""
#. FIXME -- need 62-bit relocation type
-#: config/tc-ia64.c:5302
+#: config/tc-ia64.c:5881
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:5375
+#: config/tc-ia64.c:5954
msgid "lower 16 bits of mask ignored"
msgstr ""
-#: config/tc-ia64.c:5939
+#: config/tc-ia64.c:6569
msgid "Value truncated to 62 bits"
msgstr ""
-#: config/tc-ia64.c:6291
-msgid ""
-"Additional NOP may be necessary to workaround Itanium processor A/B step "
-"errata"
+#. 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
+msgid "instruction address is not a multiple of 16"
msgstr ""
-#: config/tc-ia64.c:6474
+#: config/tc-ia64.c:7249
#, c-format
msgid "Unrecognized option '-x%s'"
msgstr ""
-#: config/tc-ia64.c:6502
+#: config/tc-ia64.c:7277
msgid ""
"IA-64 options:\n"
" --mconstant-gp\t mark output file as using the constant-GP model\n"
@@ -4926,264 +5352,386 @@ msgid ""
"\t\t\t EF_IA_64_NOFUNCDESC_CONS_GP)\n"
" -milp32|-milp64|-mlp64|-mp64\tselect data model (default -mlp64)\n"
" -mle | -mbe\t\t select little- or big-endian byte order (default -mle)\n"
-" -x | -xexplicit\t turn on dependency violation checking (default)\n"
-" -xauto\t\t automagically remove dependency violations\n"
+" -mtune=[itanium1|itanium2]\n"
+"\t\t\t tune for a specific CPU (default -mtune=itanium2)\n"
+" -munwind-check=[warning|error]\n"
+"\t\t\t unwind directive check (default -munwind-check=warning)\n"
+" -mhint.b=[ok|warning|error]\n"
+"\t\t\t hint.b check (default -mhint.b=error)\n"
+" -x | -xexplicit\t turn on dependency violation checking\n"
+" -xauto\t\t automagically remove dependency violations (default)\n"
+" -xnone\t\t turn off dependency violation checking\n"
" -xdebug\t\t debug dependency violation checker\n"
+" -xdebugn\t\t debug dependency violation checker but turn off\n"
+"\t\t\t dependency violation checking\n"
+" -xdebugx\t\t debug dependency violation checker and turn on\n"
+"\t\t\t dependency violation checking\n"
msgstr ""
-#: config/tc-ia64.c:6521
+#: config/tc-ia64.c:7307
msgid "--gstabs is not supported for ia64"
msgstr ""
-#: config/tc-ia64.c:6824 config/tc-mips.c:1094
+#: config/tc-ia64.c:7641 config/tc-mips.c:1401
msgid "Could not set architecture and machine"
msgstr ""
-#: config/tc-ia64.c:6931
+#: config/tc-ia64.c:7767
msgid "Explicit stops are ignored in auto mode"
msgstr ""
-#: config/tc-ia64.c:6981
+#: config/tc-ia64.c:7789
msgid "Found '{' after explicit switch to automatic mode"
msgstr ""
-#: config/tc-ia64.c:7428
+#: config/tc-ia64.c:8392
#, c-format
msgid "Unhandled dependency %s for %s (%s), note %d"
msgstr ""
-#: config/tc-ia64.c:8704
+#: config/tc-ia64.c:9667
#, c-format
msgid "Unrecognized dependency specifier %d\n"
msgstr ""
-#: config/tc-ia64.c:9506
+#: config/tc-ia64.c:10561
msgid "Only the first path encountering the conflict is reported"
msgstr ""
-#: config/tc-ia64.c:9509
+#: config/tc-ia64.c:10564
msgid "This is the location of the conflicting usage"
msgstr ""
-#: config/tc-ia64.c:10778 read.c:1370 read.c:1976 read.c:2184 read.c:2795
+#: config/tc-ia64.c:11788
+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
msgid "expected symbol name"
msgstr ""
-#: config/tc-ia64.c:10788 read.c:1380 read.c:2194 read.c:2805 stabs.c:478
+#: config/tc-ia64.c:11898 read.c:2216 read.c:2856 read.c:3188 stabs.c:466
#, c-format
msgid "expected comma after \"%s\""
msgstr ""
-#: config/tc-ia64.c:10829
+#: config/tc-ia64.c:11940
#, c-format
msgid "`%s' is already the alias of %s `%s'"
msgstr ""
-#: config/tc-ia64.c:10839
+#: config/tc-ia64.c:11950
#, c-format
msgid "%s `%s' already has an alias `%s'"
msgstr ""
-#: config/tc-ia64.c:10850
+#: config/tc-ia64.c:11961
#, c-format
msgid "inserting \"%s\" into %s alias hash table failed: %s"
msgstr ""
-#: config/tc-ia64.c:10858
+#: config/tc-ia64.c:11969
#, c-format
msgid "inserting \"%s\" into %s name hash table failed: %s"
msgstr ""
-#: config/tc-ia64.c:10877
+#: config/tc-ia64.c:11988
#, c-format
msgid "symbol `%s' aliased to `%s' is not used"
msgstr ""
-#: config/tc-ia64.c:10899
+#: config/tc-ia64.c:12010
#, c-format
msgid "section `%s' aliased to `%s' is not used"
msgstr ""
-#: config/tc-ip2k.c:123
+#: config/tc-ip2k.c:158
+#, c-format
msgid "IP2K specific command line options:\n"
msgstr ""
-#: config/tc-ip2k.c:124
+#: config/tc-ip2k.c:159
+#, c-format
msgid " -mip2022 restrict to IP2022 insns \n"
msgstr ""
-#: config/tc-ip2k.c:125
+#: config/tc-ip2k.c:160
+#, c-format
msgid " -mip2022ext permit extended IP2022 insn\n"
msgstr ""
-#: config/tc-ip2k.c:246
+#: config/tc-ip2k.c:274
msgid "md_pcrel_from\n"
msgstr ""
+#: config/tc-m32c.c:128
+#, c-format
+msgid " M32C specific command line options:\n"
+msgstr ""
+
#. Pretend that we do not recognise this option.
-#: config/tc-m32r.c:233
+#: config/tc-m32r.c:332
msgid "Unrecognised option: -hidden"
msgstr ""
-#: config/tc-m32r.c:267
+#: config/tc-m32r.c:359 config/tc-sparc.c:593
+msgid "Unrecognized option following -K"
+msgstr ""
+
+#: config/tc-m32r.c:374
+#, c-format
msgid " M32R specific command line options:\n"
msgstr ""
-#: config/tc-m32r.c:269
+#: config/tc-m32r.c:376
+#, c-format
msgid ""
" -m32r disable support for the m32rx instruction set\n"
msgstr ""
-#: config/tc-m32r.c:271
+#: config/tc-m32r.c:378
+#, c-format
msgid " -m32rx support the extended m32rx instruction set\n"
msgstr ""
-#: config/tc-m32r.c:273
-msgid " -O try to combine instructions in parallel\n"
+#: config/tc-m32r.c:380
+#, c-format
+msgid " -m32r2 support the extended m32r2 instruction set\n"
+msgstr ""
+
+#: config/tc-m32r.c:382
+#, c-format
+msgid " -EL,-little produce little endian code and data\n"
+msgstr ""
+
+#: config/tc-m32r.c:384
+#, c-format
+msgid " -EB,-big produce big endian code and data\n"
msgstr ""
-#: config/tc-m32r.c:276
+#: config/tc-m32r.c:386
+#, c-format
+msgid " -parallel try to combine instructions in parallel\n"
+msgstr ""
+
+#: config/tc-m32r.c:388
+#, c-format
+msgid " -no-parallel disable -parallel\n"
+msgstr ""
+
+#: config/tc-m32r.c:390
+#, c-format
+msgid ""
+" -no-bitinst disallow the M32R2's extended bit-field "
+"instructions\n"
+msgstr ""
+
+#: config/tc-m32r.c:392
+#, c-format
+msgid " -O try to optimize code. Implies -parallel\n"
+msgstr ""
+
+#: config/tc-m32r.c:395
+#, c-format
msgid ""
" -warn-explicit-parallel-conflicts warn when parallel instructions\n"
msgstr ""
-#: config/tc-m32r.c:278
-msgid " violate contraints\n"
+#: config/tc-m32r.c:397
+#, c-format
+msgid " might violate contraints\n"
msgstr ""
-#: config/tc-m32r.c:280
+#: config/tc-m32r.c:399
+#, c-format
msgid " -no-warn-explicit-parallel-conflicts do not warn when parallel\n"
msgstr ""
-#: config/tc-m32r.c:282
+#: config/tc-m32r.c:401
+#, c-format
msgid ""
-" instructions violate contraints\n"
+" instructions might violate "
+"contraints\n"
msgstr ""
-#: config/tc-m32r.c:284
+#: config/tc-m32r.c:403
+#, c-format
msgid ""
" -Wp synonym for -warn-explicit-parallel-conflicts\n"
msgstr ""
-#: config/tc-m32r.c:286
+#: config/tc-m32r.c:405
+#, c-format
msgid ""
" -Wnp synonym for -no-warn-explicit-parallel-conflicts\n"
msgstr ""
-#: config/tc-m32r.c:289
+#: config/tc-m32r.c:407
+#, c-format
+msgid ""
+" -ignore-parallel-conflicts do not check parallel instructions\n"
+msgstr ""
+
+#: config/tc-m32r.c:409
+#, c-format
+msgid " fo contraint violations\n"
+msgstr ""
+
+#: config/tc-m32r.c:411
+#, c-format
+msgid ""
+" -no-ignore-parallel-conflicts check parallel instructions for\n"
+msgstr ""
+
+#: config/tc-m32r.c:413
+#, c-format
+msgid " contraint violations\n"
+msgstr ""
+
+#: config/tc-m32r.c:415
+#, c-format
+msgid " -Ip synonym for -ignore-parallel-conflicts\n"
+msgstr ""
+
+#: config/tc-m32r.c:417
+#, c-format
+msgid " -nIp synonym for -no-ignore-parallel-conflicts\n"
+msgstr ""
+
+#: config/tc-m32r.c:420
+#, c-format
msgid ""
" -warn-unmatched-high warn when an (s)high reloc has no matching low "
"reloc\n"
msgstr ""
-#: config/tc-m32r.c:291
+#: config/tc-m32r.c:422
+#, c-format
msgid " -no-warn-unmatched-high do not warn about missing low relocs\n"
msgstr ""
-#: config/tc-m32r.c:293
+#: config/tc-m32r.c:424
+#, c-format
msgid " -Wuh synonym for -warn-unmatched-high\n"
msgstr ""
-#: config/tc-m32r.c:295
+#: config/tc-m32r.c:426
+#, c-format
msgid " -Wnuh synonym for -no-warn-unmatched-high\n"
msgstr ""
-#: config/tc-m32r.c:299
-msgid " -relax create linker relaxable code\n"
-msgstr ""
-
-#: config/tc-m32r.c:301
-msgid " -cpu-desc provide runtime cpu description file\n"
+#: config/tc-m32r.c:429
+#, c-format
+msgid " -KPIC generate PIC\n"
msgstr ""
-#: config/tc-m32r.c:700
-msgid "Instructions write to the same destination register."
+#: config/tc-m32r.c:850
+msgid "instructions write to the same destination register."
msgstr ""
-#: config/tc-m32r.c:708
+#: config/tc-m32r.c:858
msgid "Instructions do not use parallel execution pipelines."
msgstr ""
-#: config/tc-m32r.c:715
+#: config/tc-m32r.c:866
msgid "Instructions share the same execution pipeline"
msgstr ""
-#: config/tc-m32r.c:791 config/tc-m32r.c:887
+#: config/tc-m32r.c:931 config/tc-m32r.c:1045
#, c-format
msgid "not a 16 bit instruction '%s'"
msgstr ""
-#: config/tc-m32r.c:798 config/tc-m32r.c:894 config/tc-m32r.c:1050
+#: config/tc-m32r.c:943 config/tc-m32r.c:1057 config/tc-m32r.c:1241
+#, 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
#, c-format
msgid "unknown instruction '%s'"
msgstr ""
-#: config/tc-m32r.c:807 config/tc-m32r.c:901 config/tc-m32r.c:1057
+#: config/tc-m32r.c:965 config/tc-m32r.c:1077 config/tc-m32r.c:1261
#, c-format
msgid "instruction '%s' is for the M32RX only"
msgstr ""
-#: config/tc-m32r.c:816 config/tc-m32r.c:910
+#: config/tc-m32r.c:974 config/tc-m32r.c:1086
#, c-format
msgid "instruction '%s' cannot be executed in parallel."
msgstr ""
-#: config/tc-m32r.c:871 config/tc-m32r.c:935 config/tc-m32r.c:1107
+#: config/tc-m32r.c:1029 config/tc-m32r.c:1111 config/tc-m32r.c:1318
msgid "internal error: lookup/get operands failed"
msgstr ""
-#: config/tc-m32r.c:920
+#: config/tc-m32r.c:1096
#, c-format
msgid "'%s': only the NOP instruction can be issued in parallel on the m32r"
msgstr ""
-#: config/tc-m32r.c:949
+#: config/tc-m32r.c:1125
#, 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:953
+#: config/tc-m32r.c:1129
#, 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:1267 config/tc-ppc.c:1732 config/tc-ppc.c:4263
+#: config/tc-m32r.c:1493 config/tc-ppc.c:1773 config/tc-ppc.c:4365
msgid "Expected comma after symbol-name: rest of line ignored."
msgstr ""
-#: config/tc-m32r.c:1277
+#: config/tc-m32r.c:1503
#, c-format
msgid ".SCOMMon length (%ld.) <0! Ignored."
msgstr ""
-#: config/tc-m32r.c:1291 config/tc-ppc.c:1754 config/tc-ppc.c:2899
-#: config/tc-ppc.c:4287
+#: config/tc-m32r.c:1517 config/tc-ppc.c:1795 config/tc-ppc.c:2952
+#: config/tc-ppc.c:4389
msgid "ignoring bad alignment"
msgstr ""
-#: config/tc-m32r.c:1303 config/tc-ppc.c:1791 config/tc-v850.c:335
+#: config/tc-m32r.c:1529 config/tc-ppc.c:1832 config/tc-v850.c:323
msgid "Common alignment not a power of 2"
msgstr ""
-#: config/tc-m32r.c:1318 config/tc-ppc.c:1765 config/tc-ppc.c:4299
+#: config/tc-m32r.c:1544 config/tc-ppc.c:1806 config/tc-ppc.c:4401
#, c-format
msgid "Ignoring attempt to re-define symbol `%s'."
msgstr ""
-#: config/tc-m32r.c:1327
+#: config/tc-m32r.c:1553
#, c-format
msgid "Length of .scomm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
-#: config/tc-m32r.c:1808
+#: config/tc-m32r.c:1789
+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
+msgid "Invalid PIC expression."
+msgstr ""
+
+#: config/tc-m32r.c:2074
msgid "Unmatched high/shigh reloc"
msgstr ""
-#: config/tc-m68hc11.c:372
+#: config/tc-m32r.c:2334 config/tc-sparc.c:3524
+#, c-format
+msgid "internal error: can't export reloc type %d (`%s')"
+msgstr ""
+
+#: config/tc-m68hc11.c:369
#, c-format
msgid ""
"Motorola 68HC11/68HC12/68HCS12 options:\n"
@@ -5204,55 +5752,56 @@ msgid ""
" (used for testing)\n"
msgstr ""
-#: config/tc-m68hc11.c:418
+#: config/tc-m68hc11.c:415
#, c-format
msgid "Default target `%s' is not supported."
msgstr ""
#. Dump the opcode statistics table.
-#: config/tc-m68hc11.c:437
+#: config/tc-m68hc11.c:433
+#, c-format
msgid "Name # Modes Min ops Max ops Modes mask # Used\n"
msgstr ""
-#: config/tc-m68hc11.c:505
+#: config/tc-m68hc11.c:499
#, c-format
msgid "Option `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:737
+#: config/tc-m68hc11.c:721
msgid "#<imm8>"
msgstr ""
-#: config/tc-m68hc11.c:746
+#: config/tc-m68hc11.c:730
msgid "#<imm16>"
msgstr ""
-#: config/tc-m68hc11.c:755 config/tc-m68hc11.c:764
+#: config/tc-m68hc11.c:739 config/tc-m68hc11.c:748
msgid "<imm8>,X"
msgstr ""
-#: config/tc-m68hc11.c:791
+#: config/tc-m68hc11.c:775
msgid "*<abs8>"
msgstr ""
-#: config/tc-m68hc11.c:803
+#: config/tc-m68hc11.c:787
msgid "#<mask>"
msgstr ""
-#: config/tc-m68hc11.c:813
+#: config/tc-m68hc11.c:797
#, c-format
msgid "symbol%d"
msgstr ""
-#: config/tc-m68hc11.c:815
+#: config/tc-m68hc11.c:799
msgid "<abs>"
msgstr ""
-#: config/tc-m68hc11.c:834
+#: config/tc-m68hc11.c:818
msgid "<label>"
msgstr ""
-#: config/tc-m68hc11.c:850
+#: config/tc-m68hc11.c:834
#, c-format
msgid ""
"# Example of `%s' instructions\n"
@@ -5260,618 +5809,673 @@ msgid ""
"_start:\n"
msgstr ""
-#: config/tc-m68hc11.c:898
+#: config/tc-m68hc11.c:881
#, c-format
msgid "Instruction `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:903
+#: config/tc-m68hc11.c:886
#, c-format
msgid "Instruction formats for `%s':"
msgstr ""
-#: config/tc-m68hc11.c:1038
+#: config/tc-m68hc11.c:1016
#, c-format
msgid "Immediate operand is not allowed for operand %d."
msgstr ""
-#: config/tc-m68hc11.c:1082
+#: config/tc-m68hc11.c:1060
msgid "Indirect indexed addressing is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1102
+#: config/tc-m68hc11.c:1080
msgid "Spurious `,' or bad indirect register addressing mode."
msgstr ""
-#: config/tc-m68hc11.c:1124
+#: config/tc-m68hc11.c:1102
msgid "Missing second register or offset for indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1134
+#: config/tc-m68hc11.c:1112
msgid "Missing second register for indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1150
+#: config/tc-m68hc11.c:1128
msgid "Missing `]' to close indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1195
+#: config/tc-m68hc11.c:1173
msgid "Illegal operand."
msgstr ""
-#: config/tc-m68hc11.c:1200
+#: config/tc-m68hc11.c:1178
msgid "Missing operand."
msgstr ""
-#: config/tc-m68hc11.c:1253
+#: config/tc-m68hc11.c:1231
msgid "Pre-increment mode is not valid for 68HC11"
msgstr ""
-#: config/tc-m68hc11.c:1266
+#: config/tc-m68hc11.c:1244
msgid "Wrong register in register indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1274
+#: config/tc-m68hc11.c:1252
msgid "Missing `]' to close register indirect operand."
msgstr ""
-#: config/tc-m68hc11.c:1294
+#: config/tc-m68hc11.c:1272
msgid "Post-decrement mode is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1302
+#: config/tc-m68hc11.c:1280
msgid "Post-increment mode is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1320
+#: config/tc-m68hc11.c:1298
msgid "Invalid indexed indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1417
+#: config/tc-m68hc11.c:1390
#, c-format
msgid "Trap id `%ld' is out of range."
msgstr ""
-#: config/tc-m68hc11.c:1421
+#: config/tc-m68hc11.c:1394
msgid "Trap id must be within [0x30..0x39] or [0x40..0xff]."
msgstr ""
-#: config/tc-m68hc11.c:1428
+#: config/tc-m68hc11.c:1401
#, c-format
msgid "Operand out of 8-bit range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1435
+#: config/tc-m68hc11.c:1408
msgid "The trap id must be a constant."
msgstr ""
-#: config/tc-m68hc11.c:1470
+#: config/tc-m68hc11.c:1443
#, c-format
msgid "Operand `%x' not recognized in fixup8."
msgstr ""
-#: config/tc-m68hc11.c:1490 config/tc-m68hc11.c:1542
+#: config/tc-m68hc11.c:1460 config/tc-m68hc11.c:1509
#, c-format
msgid "Operand out of 16-bit range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1522 config/tc-m68hc11.c:1558
+#: config/tc-m68hc11.c:1492 config/tc-m68hc11.c:1525
#, c-format
msgid "Operand `%x' not recognized in fixup16."
msgstr ""
-#: config/tc-m68hc11.c:1576
+#: config/tc-m68hc11.c:1542
#, c-format
msgid "Unexpected branch conversion with `%x'"
msgstr ""
-#: config/tc-m68hc11.c:1671 config/tc-m68hc11.c:1812
+#: config/tc-m68hc11.c:1633 config/tc-m68hc11.c:1771
#, c-format
msgid "Operand out of range for a relative branch: `%ld'"
msgstr ""
-#: config/tc-m68hc11.c:1780
+#: config/tc-m68hc11.c:1739
msgid "Invalid register for dbcc/tbcc instruction."
msgstr ""
-#: config/tc-m68hc11.c:1871
+#: config/tc-m68hc11.c:1827
#, c-format
msgid "Increment/decrement value is out of range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1882
+#: config/tc-m68hc11.c:1838
msgid "Expecting a register."
msgstr ""
-#: config/tc-m68hc11.c:1897
+#: config/tc-m68hc11.c:1853
msgid "Invalid register for post/pre increment."
msgstr ""
-#: config/tc-m68hc11.c:1927
+#: config/tc-m68hc11.c:1883
msgid "Invalid register."
msgstr ""
-#: config/tc-m68hc11.c:1934
+#: config/tc-m68hc11.c:1890
#, c-format
msgid "Offset out of 16-bit range: %ld."
msgstr ""
-#: config/tc-m68hc11.c:1939
+#: config/tc-m68hc11.c:1895
#, c-format
msgid "Offset out of 5-bit range for movw/movb insn: %ld."
msgstr ""
-#: config/tc-m68hc11.c:2020
+#: config/tc-m68hc11.c:2001
msgid "Expecting register D for indexed indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:2022
+#: config/tc-m68hc11.c:2003
msgid "Indexed indirect mode is not allowed for movb/movw."
msgstr ""
-#: config/tc-m68hc11.c:2039
+#: config/tc-m68hc11.c:2020
msgid "Invalid accumulator register."
msgstr ""
-#: config/tc-m68hc11.c:2064
+#: config/tc-m68hc11.c:2045
msgid "Invalid indexed register."
msgstr ""
-#: config/tc-m68hc11.c:2072
+#: config/tc-m68hc11.c:2053
msgid "Addressing mode not implemented yet."
msgstr ""
-#: config/tc-m68hc11.c:2087
+#: config/tc-m68hc11.c:2066
msgid "Invalid source register for this instruction, use 'tfr'."
msgstr ""
-#: config/tc-m68hc11.c:2089
+#: config/tc-m68hc11.c:2068
msgid "Invalid source register."
msgstr ""
-#: config/tc-m68hc11.c:2094
+#: config/tc-m68hc11.c:2073
msgid "Invalid destination register for this instruction, use 'tfr'."
msgstr ""
-#: config/tc-m68hc11.c:2096
+#: config/tc-m68hc11.c:2075
msgid "Invalid destination register."
msgstr ""
-#: config/tc-m68hc11.c:2194
+#: config/tc-m68hc11.c:2171
msgid "Invalid indexed register, expecting register X."
msgstr ""
-#: config/tc-m68hc11.c:2196
+#: config/tc-m68hc11.c:2173
msgid "Invalid indexed register, expecting register Y."
msgstr ""
-#: config/tc-m68hc11.c:2508
+#: config/tc-m68hc11.c:2479
msgid "No instruction or missing opcode."
msgstr ""
-#: config/tc-m68hc11.c:2573
+#: config/tc-m68hc11.c:2544
#, c-format
msgid "Opcode `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:2595
+#: config/tc-m68hc11.c:2566
#, c-format
msgid "Garbage at end of instruction: `%s'."
msgstr ""
-#: config/tc-m68hc11.c:2618
+#: config/tc-m68hc11.c:2589
#, c-format
msgid "Invalid operand for `%s'"
msgstr ""
-#: config/tc-m68hc11.c:2670
+#: config/tc-m68hc11.c:2640
#, c-format
msgid "Invalid mode: %s\n"
msgstr ""
-#: config/tc-m68hc11.c:2732
+#: config/tc-m68hc11.c:2700
msgid "bad .relax format"
msgstr ""
-#: config/tc-m68hc11.c:2779
+#: config/tc-m68hc11.c:2744
#, c-format
msgid "Relocation %d is not supported by object file format."
msgstr ""
-#: config/tc-m68hc11.c:3065
+#: config/tc-m68hc11.c:3023
msgid "bra or bsr with undefined symbol."
msgstr ""
-#: config/tc-m68hc11.c:3168 config/tc-m68hc11.c:3225
+#: config/tc-m68hc11.c:3126 config/tc-m68hc11.c:3183
#, c-format
msgid "Subtype %d is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:3289
+#: config/tc-m68hc11.c:3242
msgid "Expression too complex."
msgstr ""
-#: config/tc-m68hc11.c:3322
+#: config/tc-m68hc11.c:3275
msgid "Value out of 16-bit range."
msgstr ""
-#: config/tc-m68hc11.c:3346
+#: config/tc-m68hc11.c:3293
#, c-format
msgid "Value %ld too large for 8-bit PC-relative branch."
msgstr ""
-#: config/tc-m68hc11.c:3353
+#: config/tc-m68hc11.c:3300
#, c-format
msgid "Auto increment/decrement offset '%ld' is out of range."
msgstr ""
-#: config/tc-m68hc11.c:3371
+#: config/tc-m68hc11.c:3313
+#, c-format
+msgid "Offset out of 5-bit range for movw/movb insn: %ld"
+msgstr ""
+
+#: config/tc-m68hc11.c:3329
#, c-format
msgid "Line %d: unknown relocation type: 0x%x."
msgstr ""
-#: config/tc-m68k.c:678
-msgid "Unknown PC relative instruction"
+#: 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:817
+#: config/tc-m68k.c:843
#, c-format
msgid "Can not do %d byte pc-relative relocation"
msgstr ""
-#: config/tc-m68k.c:819
+#: config/tc-m68k.c:845
#, c-format
msgid "Can not do %d byte pc-relative pic relocation"
msgstr ""
-#: config/tc-m68k.c:824
+#: config/tc-m68k.c:850
#, c-format
msgid "Can not do %d byte relocation"
msgstr ""
-#: config/tc-m68k.c:826
+#: config/tc-m68k.c:852
#, c-format
msgid "Can not do %d byte pic relocation"
msgstr ""
-#: config/tc-m68k.c:894
+#: config/tc-m68k.c:915
#, c-format
msgid "Unable to produce reloc against symbol '%s'"
msgstr ""
-#: config/tc-m68k.c:938 config/tc-mips.c:13322 config/tc-vax.c:3441
+#: config/tc-m68k.c:959 config/tc-vax.c:3435
#, c-format
msgid "Cannot make %s relocation PC relative"
msgstr ""
-#: config/tc-m68k.c:1031 config/tc-tahoe.c:1495 config/tc-vax.c:1889
+#: config/tc-m68k.c:1050 config/tc-vax.c:1890
msgid "No operator"
msgstr ""
-#: config/tc-m68k.c:1061 config/tc-tahoe.c:1512 config/tc-vax.c:1906
+#: config/tc-m68k.c:1080 config/tc-vax.c:1907
msgid "Unknown operator"
msgstr ""
-#: config/tc-m68k.c:1836
+#: config/tc-m68k.c:1944
msgid "invalid instruction for this architecture; needs "
msgstr ""
-#: config/tc-m68k.c:1841
+#: config/tc-m68k.c:1950
+msgid "ColdFire ISA_A"
+msgstr ""
+
+#: config/tc-m68k.c:1958
+msgid "ColdFire hardware divide"
+msgstr ""
+
+#: config/tc-m68k.c:1966
+msgid "ColdFire ISA_A+"
+msgstr ""
+
+#: config/tc-m68k.c:1974
+msgid "ColdFire ISA_B"
+msgstr ""
+
+#: config/tc-m68k.c:1982
+msgid "ColdFire fpu"
+msgstr ""
+
+#: config/tc-m68k.c:1989
msgid "fpu (68040, 68060 or 68881/68882)"
msgstr ""
-#: config/tc-m68k.c:1844
+#: config/tc-m68k.c:1992
msgid "mmu (68030 or 68851)"
msgstr ""
-#: config/tc-m68k.c:1847
+#: config/tc-m68k.c:1995
msgid "68020 or higher"
msgstr ""
-#: config/tc-m68k.c:1850
+#: config/tc-m68k.c:1998
msgid "68000 or higher"
msgstr ""
-#: config/tc-m68k.c:1853
+#: config/tc-m68k.c:2001
msgid "68010 or higher"
msgstr ""
-#: config/tc-m68k.c:1882
+#: config/tc-m68k.c:2029
msgid "operands mismatch"
msgstr ""
-#: config/tc-m68k.c:1939 config/tc-m68k.c:1945 config/tc-m68k.c:1951
-#: config/tc-mmix.c:2464 config/tc-mmix.c:2488
+#: 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
msgid "operand out of range"
msgstr ""
-#: config/tc-m68k.c:2008
+#: config/tc-m68k.c:2159
#, c-format
msgid "Bignum too big for %c format; truncated"
msgstr ""
-#: config/tc-m68k.c:2076
+#: config/tc-m68k.c:2236
msgid "displacement too large for this architecture; needs 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2186
+#: config/tc-m68k.c:2347
msgid ""
"scale factor invalid on this architecture; needs cpu32 or 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2191
+#: config/tc-m68k.c:2352
msgid "invalid index size for coldfire"
msgstr ""
-#: config/tc-m68k.c:2244
+#: config/tc-m68k.c:2405
msgid "Forcing byte displacement"
msgstr ""
-#: config/tc-m68k.c:2246
+#: config/tc-m68k.c:2407
msgid "byte displacement out of range"
msgstr ""
-#: config/tc-m68k.c:2293 config/tc-m68k.c:2331
+#: config/tc-m68k.c:2455 config/tc-m68k.c:2493
msgid "invalid operand mode for this architecture; needs 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2317 config/tc-m68k.c:2351
+#: config/tc-m68k.c:2479 config/tc-m68k.c:2513
msgid ":b not permitted; defaulting to :w"
msgstr ""
-#: config/tc-m68k.c:2428
+#: config/tc-m68k.c:2590
msgid "unsupported byte value; use a different suffix"
msgstr ""
-#: config/tc-m68k.c:2442
+#: config/tc-m68k.c:2605
msgid "unknown/incorrect operand"
msgstr ""
-#: config/tc-m68k.c:2475 config/tc-m68k.c:2483 config/tc-m68k.c:2490
-#: config/tc-m68k.c:2497
+#: config/tc-m68k.c:2648 config/tc-m68k.c:2656 config/tc-m68k.c:2663
+#: config/tc-m68k.c:2670
msgid "out of range"
msgstr ""
-#: config/tc-m68k.c:2543
+#: config/tc-m68k.c:2716
msgid "Can't use long branches on 68000/68010/5200"
msgstr ""
-#: config/tc-m68k.c:2653
+#: config/tc-m68k.c:2833
msgid "Expression out of range, using 0"
msgstr ""
-#: config/tc-m68k.c:2765 config/tc-m68k.c:2781
+#: config/tc-m68k.c:3014 config/tc-m68k.c:3030
msgid "Floating point register in register list"
msgstr ""
-#: config/tc-m68k.c:2771
+#: config/tc-m68k.c:3020
msgid "Wrong register in floating-point reglist"
msgstr ""
-#: config/tc-m68k.c:2787
+#: config/tc-m68k.c:3036
msgid "incorrect register in reglist"
msgstr ""
-#: config/tc-m68k.c:2793
+#: config/tc-m68k.c:3042
msgid "wrong register in floating-point reglist"
msgstr ""
-#. ERROR
-#: config/tc-m68k.c:3234
+#. ERROR.
+#: config/tc-m68k.c:3505
msgid "Extra )"
msgstr ""
-#. ERROR
-#: config/tc-m68k.c:3245
+#. ERROR.
+#: config/tc-m68k.c:3516
msgid "Missing )"
msgstr ""
-#: config/tc-m68k.c:3262
+#: config/tc-m68k.c:3533
msgid "Missing operand"
msgstr ""
-#: config/tc-m68k.c:3594
+#: config/tc-m68k.c:3890
#, c-format
msgid "%s -- statement `%s' ignored"
msgstr ""
-#: config/tc-m68k.c:3643
+#: config/tc-m68k.c:3939
#, c-format
msgid "Don't know how to figure width of %c in md_assemble()"
msgstr ""
-#: config/tc-m68k.c:3825 config/tc-m68k.c:3863
+#: config/tc-m68k.c:4108
+#, 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
#, c-format
msgid "Internal Error: Can't find %s in hash table"
msgstr ""
-#: config/tc-m68k.c:3828 config/tc-m68k.c:3866
+#: config/tc-m68k.c:4162 config/tc-m68k.c:4201
#, c-format
msgid "Internal Error: Can't hash %s: %s"
msgstr ""
-#: config/tc-m68k.c:3948
+#: config/tc-m68k.c:4282
msgid "architecture not yet selected: defaulting to 68020"
msgstr ""
-#: config/tc-m68k.c:3997
+#: config/tc-m68k.c:4342
#, c-format
msgid "unrecognized default cpu `%s' ???"
msgstr ""
-#: config/tc-m68k.c:4009
+#: config/tc-m68k.c:4353
msgid "68040 and 68851 specified; mmu instructions may assemble incorrectly"
msgstr ""
-#: config/tc-m68k.c:4029
+#: config/tc-m68k.c:4370
msgid "options for 68881 and no-68881 both given"
msgstr ""
-#: config/tc-m68k.c:4031
+#: config/tc-m68k.c:4373
msgid "options for 68851 and no-68851 both given"
msgstr ""
-#: config/tc-m68k.c:4102
+#: config/tc-m68k.c:4434
#, c-format
msgid "text label `%s' aligned to odd boundary"
msgstr ""
-#: config/tc-m68k.c:4321
+#: config/tc-m68k.c:4638
msgid "invalid byte branch offset"
msgstr ""
-#: config/tc-m68k.c:4358
+#: config/tc-m68k.c:4674
msgid "short branch with zero offset: use :w"
msgstr ""
-#: config/tc-m68k.c:4827 config/tc-m68k.c:4838
+#: config/tc-m68k.c:4698
+msgid "Tried to convert PC relative BSR to absolute JSR"
+msgstr ""
+
+#: config/tc-m68k.c:4708 config/tc-m68k.c:5054
+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
msgid "expression out of range: defaulting to 1"
msgstr ""
-#: config/tc-m68k.c:4870
+#: config/tc-m68k.c:5141
msgid "expression out of range: defaulting to 0"
msgstr ""
-#: config/tc-m68k.c:4903 config/tc-m68k.c:4915
+#: config/tc-m68k.c:5182 config/tc-m68k.c:5194
#, c-format
msgid "Can't deal with expression; defaulting to %ld"
msgstr ""
-#: config/tc-m68k.c:4929
+#: config/tc-m68k.c:5208
msgid "expression doesn't fit in BYTE"
msgstr ""
-#: config/tc-m68k.c:4933
+#: config/tc-m68k.c:5212
msgid "expression doesn't fit in WORD"
msgstr ""
-#: config/tc-m68k.c:5026
+#: config/tc-m68k.c:5299
#, c-format
msgid "%s: unrecognized processor name"
msgstr ""
-#: config/tc-m68k.c:5091
+#: config/tc-m68k.c:5363
msgid "bad coprocessor id"
msgstr ""
-#: config/tc-m68k.c:5097
+#: config/tc-m68k.c:5369
msgid "unrecognized fopt option"
msgstr ""
-#: config/tc-m68k.c:5231
+#: config/tc-m68k.c:5502
#, c-format
msgid "option `%s' may not be negated"
msgstr ""
-#: config/tc-m68k.c:5242
+#: config/tc-m68k.c:5513
#, c-format
msgid "option `%s' not recognized"
msgstr ""
-#: config/tc-m68k.c:5275
+#: config/tc-m68k.c:5542
msgid "bad format of OPT NEST=depth"
msgstr ""
-#: config/tc-m68k.c:5338
+#: config/tc-m68k.c:5598
msgid "missing label"
msgstr ""
-#: config/tc-m68k.c:5362 config/tc-m68k.c:5391
+#: config/tc-m68k.c:5622 config/tc-m68k.c:5651
msgid "bad register list"
msgstr ""
-#: config/tc-m68k.c:5364
+#: config/tc-m68k.c:5624
#, c-format
msgid "bad register list: %s"
msgstr ""
-#: config/tc-m68k.c:5462
+#: config/tc-m68k.c:5722
msgid "restore without save"
msgstr ""
-#: config/tc-m68k.c:5636 config/tc-m68k.c:6023
+#: config/tc-m68k.c:5876 config/tc-m68k.c:6246
msgid "syntax error in structured control directive"
msgstr ""
-#: config/tc-m68k.c:5685
+#: config/tc-m68k.c:5921
msgid "missing condition code in structured control directive"
msgstr ""
-#: config/tc-m68k.c:5757
+#: config/tc-m68k.c:5992
#, c-format
msgid ""
"Condition <%c%c> in structured control directive can not be encoded correctly"
msgstr ""
-#: config/tc-m68k.c:6066
+#: config/tc-m68k.c:6288
msgid "missing then"
msgstr ""
-#: config/tc-m68k.c:6148
+#: config/tc-m68k.c:6369
msgid "else without matching if"
msgstr ""
-#: config/tc-m68k.c:6182
+#: config/tc-m68k.c:6402
msgid "endi without matching if"
msgstr ""
-#: config/tc-m68k.c:6223
+#: config/tc-m68k.c:6442
msgid "break outside of structured loop"
msgstr ""
-#: config/tc-m68k.c:6262
+#: config/tc-m68k.c:6480
msgid "next outside of structured loop"
msgstr ""
-#: config/tc-m68k.c:6314
+#: config/tc-m68k.c:6531
msgid "missing ="
msgstr ""
-#: config/tc-m68k.c:6352
+#: config/tc-m68k.c:6569
msgid "missing to or downto"
msgstr ""
-#: config/tc-m68k.c:6388 config/tc-m68k.c:6422 config/tc-m68k.c:6641
+#: config/tc-m68k.c:6605 config/tc-m68k.c:6639 config/tc-m68k.c:6853
msgid "missing do"
msgstr ""
-#: config/tc-m68k.c:6525
+#: config/tc-m68k.c:6740
msgid "endf without for"
msgstr ""
-#: config/tc-m68k.c:6581
+#: config/tc-m68k.c:6794
msgid "until without repeat"
msgstr ""
-#: config/tc-m68k.c:6677
+#: config/tc-m68k.c:6888
msgid "endw without while"
msgstr ""
-#: config/tc-m68k.c:6801
-#, c-format
-msgid "unrecognized option `%s'"
-msgstr ""
-
-#: config/tc-m68k.c:6846
+#: config/tc-m68k.c:7050
#, c-format
msgid "unrecognized architecture specification `%s'"
msgstr ""
-#: config/tc-m68k.c:6940
+#: config/tc-m68k.c:7143
#, 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 | -m5307 | -m5407\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"
msgstr ""
-#: config/tc-m68k.c:6951
+#: config/tc-m68k.c:7155
+#, c-format
msgid ""
"-m68851 | -mno-68851\n"
"\t\t\ttarget has/lacks memory-management unit coprocessor\n"
@@ -5884,7 +6488,8 @@ msgid ""
"--bitwise-or\t\tdo not treat `|' as a comment character\n"
msgstr ""
-#: config/tc-m68k.c:6961
+#: 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"
@@ -5892,222 +6497,175 @@ msgid ""
"--disp-size-default-32\tdisplacement with unknown size is 32 bits (default)\n"
msgstr ""
-#: config/tc-m68k.c:6996
+#: config/tc-m68k.c:7200
#, c-format
msgid "Error %s in %s\n"
msgstr ""
-#: config/tc-m68k.c:7000
+#: config/tc-m68k.c:7204
#, c-format
msgid "Opcode(%d.%s): "
msgstr ""
-#: config/tc-m88k.c:201
-#, c-format
-msgid "Can't hash instruction '%s':%s"
-msgstr ""
-
-#: config/tc-m88k.c:250
-#, c-format
-msgid "Invalid mnemonic '%s'"
-msgstr ""
-
-#: config/tc-m88k.c:268
-msgid "Parameter syntax error"
-msgstr ""
-
-#: config/tc-m88k.c:321
-msgid "Unknown relocation type"
-msgstr ""
-
-#. Having this here repeats the warning somtimes.
-#. But can't we stand that?
-#: config/tc-m88k.c:434
-msgid "Use of obsolete instruction"
-msgstr ""
-
-#: config/tc-m88k.c:551
-msgid "Expression truncated to 16 bits"
-msgstr ""
-
-#: config/tc-m88k.c:617 config/tc-m88k.c:639
-msgid "Expression truncated to 5 bits"
-msgstr ""
-
-#: config/tc-m88k.c:856
-msgid "Expression truncated to 9 bits"
-msgstr ""
-
-#: config/tc-m88k.c:878
-msgid "Removed lower 2 bits of expression"
-msgstr ""
-
-#: config/tc-m88k.c:1057
-msgid "Relaxation should never occur"
-msgstr ""
-
-#: config/tc-m88k.h:78
-msgid "m88k convert_frag\n"
-msgstr ""
-
-#: config/tc-mcore.c:460
+#: config/tc-mcore.c:524
#, c-format
msgid "register expected, but saw '%.6s'"
msgstr ""
-#: config/tc-mcore.c:544
+#: config/tc-mcore.c:606
#, c-format
msgid "control register expected, but saw '%.6s'"
msgstr ""
-#: config/tc-mcore.c:582
+#: config/tc-mcore.c:642
msgid "bad/missing psr specifier"
msgstr ""
-#: config/tc-mcore.c:743
+#: config/tc-mcore.c:692
msgid "more than 65K literal pools"
msgstr ""
-#: config/tc-mcore.c:797
+#: config/tc-mcore.c:746
msgid "missing ']'"
msgstr ""
-#: config/tc-mcore.c:837
+#: config/tc-mcore.c:785
msgid "operand must be a constant"
msgstr ""
-#: config/tc-mcore.c:839
+#: config/tc-mcore.c:787
#, c-format
msgid "operand must be absolute in range %u..%u, not %ld"
msgstr ""
-#: config/tc-mcore.c:875
+#: config/tc-mcore.c:822
msgid "operand must be a multiple of 4"
msgstr ""
-#: config/tc-mcore.c:882
+#: config/tc-mcore.c:829
msgid "operand must be a multiple of 2"
msgstr ""
-#: config/tc-mcore.c:896 config/tc-mcore.c:1410 config/tc-mcore.c:1464
+#: config/tc-mcore.c:843 config/tc-mcore.c:1359 config/tc-mcore.c:1413
msgid "base register expected"
msgstr ""
-#: config/tc-mcore.c:945
+#: config/tc-mcore.c:891
#, c-format
msgid "unknown opcode \"%s\""
msgstr ""
-#: config/tc-mcore.c:988
+#: config/tc-mcore.c:934
msgid "invalid register: r15 illegal"
msgstr ""
-#: config/tc-mcore.c:1036 config/tc-mcore.c:1614
+#: config/tc-mcore.c:983 config/tc-mcore.c:1564
msgid "M340 specific opcode used when assembling for M210"
msgstr ""
-#: config/tc-mcore.c:1054 config/tc-mcore.c:1093 config/tc-mcore.c:1112
-#: config/tc-mcore.c:1131 config/tc-mcore.c:1158 config/tc-mcore.c:1187
-#: config/tc-mcore.c:1224 config/tc-mcore.c:1259 config/tc-mcore.c:1278
-#: config/tc-mcore.c:1297 config/tc-mcore.c:1331 config/tc-mcore.c:1356
-#: config/tc-mcore.c:1413 config/tc-mcore.c:1467 config/tc-mcore.c:1503
-#: config/tc-mcore.c:1561 config/tc-mcore.c:1583 config/tc-mcore.c:1606
+#: 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
msgid "second operand missing"
msgstr ""
-#: config/tc-mcore.c:1069
+#: config/tc-mcore.c:1017
msgid "destination register must be r1"
msgstr ""
-#: config/tc-mcore.c:1090
+#: config/tc-mcore.c:1038
msgid "source register must be r1"
msgstr ""
-#: config/tc-mcore.c:1153 config/tc-mcore.c:1210
+#: config/tc-mcore.c:1102 config/tc-mcore.c:1159
msgid "immediate is not a power of two"
msgstr ""
-#: config/tc-mcore.c:1181
+#: config/tc-mcore.c:1130
msgid "translating bgeni to movi"
msgstr ""
-#: config/tc-mcore.c:1218
+#: config/tc-mcore.c:1167
msgid "translating mgeni to movi"
msgstr ""
-#: config/tc-mcore.c:1250
+#: config/tc-mcore.c:1199
msgid "translating bmaski to movi"
msgstr ""
-#: config/tc-mcore.c:1326
+#: config/tc-mcore.c:1275
#, c-format
msgid "displacement too large (%d)"
msgstr ""
-#: config/tc-mcore.c:1340
+#: config/tc-mcore.c:1289
msgid "Invalid register: r0 and r15 illegal"
msgstr ""
-#: config/tc-mcore.c:1371
+#: config/tc-mcore.c:1320
msgid "bad starting register: r0 and r15 invalid"
msgstr ""
-#: config/tc-mcore.c:1384
+#: config/tc-mcore.c:1333
msgid "ending register must be r15"
msgstr ""
-#: config/tc-mcore.c:1404
+#: config/tc-mcore.c:1353
msgid "bad base register: must be r0"
msgstr ""
-#: config/tc-mcore.c:1422
+#: config/tc-mcore.c:1371
msgid "first register must be r4"
msgstr ""
-#: config/tc-mcore.c:1433
+#: config/tc-mcore.c:1382
msgid "last register must be r7"
msgstr ""
-#: config/tc-mcore.c:1470
+#: config/tc-mcore.c:1419
msgid "reg-reg expected"
msgstr ""
-#: config/tc-mcore.c:1580
+#: config/tc-mcore.c:1530
msgid "second operand must be 1"
msgstr ""
-#: config/tc-mcore.c:1601
+#: config/tc-mcore.c:1551
msgid "zero used as immediate value"
msgstr ""
-#: config/tc-mcore.c:1628
+#: config/tc-mcore.c:1578
msgid "duplicated psr bit specifier"
msgstr ""
-#: config/tc-mcore.c:1634
+#: config/tc-mcore.c:1584
msgid "`af' must appear alone"
msgstr ""
-#: config/tc-mcore.c:1641
+#: config/tc-mcore.c:1591
#, c-format
msgid "unimplemented opcode \"%s\""
msgstr ""
-#: config/tc-mcore.c:1650
+#: config/tc-mcore.c:1600
#, c-format
msgid "ignoring operands: %s "
msgstr ""
-#: config/tc-mcore.c:1718 config/tc-w65.c:772
+#: config/tc-mcore.c:1665
msgid "Bad call to MD_NTOF()"
msgstr ""
-#: config/tc-mcore.c:1788
+#: config/tc-mcore.c:1736
#, c-format
msgid "unrecognised cpu type '%s'"
msgstr ""
-#: config/tc-mcore.c:1807
+#: config/tc-mcore.c:1754
+#, c-format
msgid ""
"MCORE specific options:\n"
" -{no-}jsri2bsr\t {dis}able jsri to bsr transformation (def: dis)\n"
@@ -6117,680 +6675,674 @@ msgid ""
" -EL assemble for a little endian system\n"
msgstr ""
-#: config/tc-mcore.c:1826
+#: config/tc-mcore.c:1772
msgid "failed sanity check: short_jump"
msgstr ""
-#: config/tc-mcore.c:1837
+#: config/tc-mcore.c:1782
msgid "failed sanity check: long_jump"
msgstr ""
-#: config/tc-mcore.c:1863
+#: config/tc-mcore.c:1808
#, c-format
msgid "odd displacement at %x"
msgstr ""
-#: config/tc-mcore.c:2047
+#: config/tc-mcore.c:1990
msgid "unknown"
msgstr ""
-#: config/tc-mcore.c:2073
+#: config/tc-mcore.c:2017
#, c-format
msgid "odd distance branch (0x%lx bytes)"
msgstr ""
-#: config/tc-mcore.c:2077
+#: config/tc-mcore.c:2021
#, c-format
msgid "pcrel for branch to %s too far (0x%lx)"
msgstr ""
-#: config/tc-mcore.c:2096
+#: config/tc-mcore.c:2041
#, c-format
msgid "pcrel for lrw/jmpi/jsri to %s too far (0x%lx)"
msgstr ""
-#: config/tc-mcore.c:2107
+#: config/tc-mcore.c:2053
#, c-format
msgid "pcrel for loopt too far (0x%lx)"
msgstr ""
-#: config/tc-mcore.c:2336
+#: config/tc-mcore.c:2263
#, c-format
msgid "Can not do %d byte %srelocation"
msgstr ""
-#: config/tc-mcore.c:2338
+#: config/tc-mcore.c:2265
msgid "pc-relative"
msgstr ""
#. Prototypes for static functions.
-#: config/tc-mips.c:818
+#: config/tc-mips.c:957
#, c-format
msgid "internal Error, line %d, %s"
msgstr ""
-#: config/tc-mips.c:1131
+#: config/tc-mips.c:1443
#, c-format
msgid "internal: can't hash `%s': %s"
msgstr ""
-#: config/tc-mips.c:1139
+#: config/tc-mips.c:1451
#, c-format
msgid "internal error: bad mips16 opcode: %s %s\n"
msgstr ""
-#: config/tc-mips.c:1332
+#: config/tc-mips.c:1652
#, c-format
msgid "returned from mips_ip(%s) insn_opcode = 0x%x\n"
msgstr ""
-#: config/tc-mips.c:1976 config/tc-mips.c:13666
+#: config/tc-mips.c:2327 config/tc-mips.c:13480
msgid "extended instruction in delay slot"
msgstr ""
-#: config/tc-mips.c:2022 config/tc-mips.c:2032
+#: config/tc-mips.c:2391 config/tc-mips.c:2401
#, c-format
msgid "jump to misaligned address (0x%lx)"
msgstr ""
-#: config/tc-mips.c:2025 config/tc-mips.c:2035
+#: config/tc-mips.c:2394 config/tc-mips.c:2404
#, c-format
msgid "jump address range overflow (0x%lx)"
msgstr ""
-#: config/tc-mips.c:2805 config/tc-mips.c:3194
-msgid "Macro instruction expanded into multiple instructions"
-msgstr ""
-
-#: config/tc-mips.c:2817
+#: config/tc-mips.c:2893
msgid ""
"Macro instruction expanded into multiple instructions in a branch delay slot"
msgstr ""
-#: config/tc-mips.c:3225 config/tc-mips.c:7549 config/tc-mips.c:7575
-#: config/tc-mips.c:7653 config/tc-mips.c:7678
+#: config/tc-mips.c:2896
+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
msgid "operand overflow"
msgstr ""
-#: config/tc-mips.c:3251 config/tc-mips.c:6902 config/tc-mips.c:7754
+#: config/tc-mips.c:3433 config/tc-mips.c:4033 config/tc-mips.c:6734
+#: config/tc-mips.c:7525
msgid "Macro used $at after \".set noat\""
msgstr ""
-#: config/tc-mips.c:3281
+#: config/tc-mips.c:3462
msgid "unsupported large constant"
msgstr ""
-#: config/tc-mips.c:3283
+#: config/tc-mips.c:3464
#, c-format
msgid "Instruction %s requires absolute expression"
msgstr ""
-#: config/tc-mips.c:3422
+#: config/tc-mips.c:3597 config/tc-mips.c:5844 config/tc-mips.c:6438
#, c-format
-msgid "Number (0x%lx) larger than 32 bits"
+msgid "Number (0x%s) larger than 32 bits"
msgstr ""
-#: config/tc-mips.c:3444
+#: config/tc-mips.c:3617
msgid "Number larger than 64 bits"
msgstr ""
-#: config/tc-mips.c:3747 config/tc-mips.c:3787 config/tc-mips.c:3829
-#: config/tc-mips.c:3886 config/tc-mips.c:6069 config/tc-mips.c:6111
-#: config/tc-mips.c:6163 config/tc-mips.c:6661 config/tc-mips.c:6716
+#: 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
msgid "PIC code offset overflow (max 16 signed bits)"
msgstr ""
-#: config/tc-mips.c:4146
+#: 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
+msgid "Unsupported large constant"
+msgstr ""
+
+#. result is always true
+#: config/tc-mips.c:4360
#, c-format
-msgid "Branch %s is always false (nop)"
+msgid "Branch %s is always true"
msgstr ""
-#: config/tc-mips.c:4153
+#: config/tc-mips.c:4601 config/tc-mips.c:4649 config/tc-mips.c:8309
#, c-format
-msgid "Branch likely %s is always false"
+msgid "Improper position (%lu)"
msgstr ""
-#: config/tc-mips.c:4160 config/tc-mips.c:4228 config/tc-mips.c:4320
-#: config/tc-mips.c:4369 config/tc-mips.c:7857 config/tc-mips.c:7865
-#: config/tc-mips.c:7872 config/tc-mips.c:7979
-msgid "Unsupported large constant"
+#: config/tc-mips.c:4607 config/tc-mips.c:8376
+#, c-format
+msgid "Improper extract size (%lu, position %lu)"
msgstr ""
-#. result is always true
-#: config/tc-mips.c:4194
+#: config/tc-mips.c:4655 config/tc-mips.c:8340
#, c-format
-msgid "Branch %s is always true"
+msgid "Improper insert size (%lu, position %lu)"
msgstr ""
-#: config/tc-mips.c:4437 config/tc-mips.c:4540
+#: config/tc-mips.c:4692 config/tc-mips.c:4789
msgid "Divide by zero."
msgstr ""
-#: config/tc-mips.c:4622
+#: config/tc-mips.c:4875
msgid "dla used to load 32-bit register"
msgstr ""
-#: config/tc-mips.c:4625
+#: config/tc-mips.c:4878
msgid "la used to load 64-bit address"
msgstr ""
-#: config/tc-mips.c:5000 config/tc-mips.c:5353
+#: config/tc-mips.c:4990
+msgid "offset too large"
+msgstr ""
+
+#: config/tc-mips.c:5162 config/tc-mips.c:5441
msgid "PIC code offset overflow (max 32 signed bits)"
msgstr ""
-#: config/tc-mips.c:5419
+#: config/tc-mips.c:5487
msgid "MIPS PIC call to register other than $25"
msgstr ""
-#: config/tc-mips.c:5425 config/tc-mips.c:5436 config/tc-mips.c:5574
-#: config/tc-mips.c:5585
+#: config/tc-mips.c:5493 config/tc-mips.c:5504 config/tc-mips.c:5628
+#: config/tc-mips.c:5639
msgid "No .cprestore pseudo-op used in PIC code"
msgstr ""
-#: config/tc-mips.c:5430 config/tc-mips.c:5579
+#: config/tc-mips.c:5498 config/tc-mips.c:5633
msgid "No .frame pseudo-op used in PIC code"
msgstr ""
-#: config/tc-mips.c:5657 config/tc-mips.c:5746 config/tc-mips.c:6414
-#: config/tc-mips.c:6453 config/tc-mips.c:6471 config/tc-mips.c:7221
+#: 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
msgid "opcode not supported on this processor"
msgstr ""
-#: config/tc-mips.c:5970
-msgid "load/store address overflow (max 32 bits)"
-msgstr ""
-
-#: config/tc-mips.c:7084 config/tc-mips.c:7117 config/tc-mips.c:7167
-#: config/tc-mips.c:7199
+#: config/tc-mips.c:6903 config/tc-mips.c:6934 config/tc-mips.c:6985
+#: config/tc-mips.c:7015
msgid "Improper rotate count"
msgstr ""
-#: config/tc-mips.c:7260
+#: config/tc-mips.c:7070
#, c-format
msgid "Instruction %s: result is always false"
msgstr ""
-#: config/tc-mips.c:7418
+#: config/tc-mips.c:7216
#, 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:7750
+#: config/tc-mips.c:7521
#, c-format
msgid "Macro %s not implemented yet"
msgstr ""
-#: config/tc-mips.c:8010
+#: config/tc-mips.c:7771
#, c-format
msgid "internal: bad mips opcode (mask error): %s %s"
msgstr ""
-#: config/tc-mips.c:8030 config/tc-mips.c:8361
+#: config/tc-mips.c:7799 config/tc-mips.c:8430
#, c-format
msgid "internal: bad mips opcode (unknown extension operand type `+%c'): %s %s"
msgstr ""
-#: config/tc-mips.c:8091
+#: config/tc-mips.c:7876
#, c-format
msgid "internal: bad mips opcode (unknown operand type `%c'): %s %s"
msgstr ""
-#: config/tc-mips.c:8098
+#: config/tc-mips.c:7883
#, c-format
msgid "internal: bad mips opcode (bits 0x%lx undefined): %s %s"
msgstr ""
-#: config/tc-mips.c:8212
+#: config/tc-mips.c:8000
#, c-format
msgid "opcode not supported on this processor: %s (%s)"
msgstr ""
-#: config/tc-mips.c:8293
+#: 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
#, c-format
-msgid "Improper position (%lu)"
+msgid "DSP immediate not in range 0..%d (%lu)"
msgstr ""
-#: config/tc-mips.c:8319
+#: config/tc-mips.c:8092 config/tc-mips.c:8120
+msgid "Invalid dsp acc register"
+msgstr ""
+
+#: config/tc-mips.c:8131 config/tc-mips.c:8165 config/tc-mips.c:8184
#, c-format
-msgid "Improper insert size (%lu, position %lu)"
+msgid "DSP immediate not in range %ld..%ld (%ld)"
msgstr ""
-#: config/tc-mips.c:8345
+#: config/tc-mips.c:8200 config/tc-mips.c:8214
#, c-format
-msgid "Improper extract size (%lu, position %lu)"
+msgid "MT immediate not in range 0..%d (%lu)"
msgstr ""
-#: config/tc-mips.c:8379
+#: config/tc-mips.c:8233 config/tc-mips.c:8246
+msgid "Invalid dsp/smartmips acc register"
+msgstr ""
+
+#: config/tc-mips.c:8395 config/tc-mips.c:8899
+msgid "absolute expression required"
+msgstr ""
+
+#: config/tc-mips.c:8418 config/tc-mips.c:8579
+#, c-format
+msgid "Invalid register number (%d)"
+msgstr ""
+
+#: config/tc-mips.c:8426
+msgid "Invalid coprocessor 0 register number"
+msgstr ""
+
+#: config/tc-mips.c:8447
#, c-format
msgid "Improper shift amount (%lu)"
msgstr ""
-#: config/tc-mips.c:8405 config/tc-mips.c:9655 config/tc-mips.c:9770
+#: config/tc-mips.c:8470 config/tc-mips.c:9731 config/tc-mips.c:9844
#, c-format
msgid "Invalid value for `%s' (%lu)"
msgstr ""
-#: config/tc-mips.c:8423
+#: config/tc-mips.c:8485
#, c-format
msgid "Illegal break code (%lu)"
msgstr ""
-#: config/tc-mips.c:8437
+#: config/tc-mips.c:8496
#, c-format
msgid "Illegal lower break code (%lu)"
msgstr ""
-#: config/tc-mips.c:8450
+#: config/tc-mips.c:8507
#, c-format
msgid "Illegal 20-bit code (%lu)"
msgstr ""
-#: config/tc-mips.c:8462
+#: config/tc-mips.c:8519
#, c-format
msgid "Coproccesor code > 25 bits (%lu)"
msgstr ""
-#: config/tc-mips.c:8475
+#: config/tc-mips.c:8532
#, c-format
msgid "Illegal 19-bit code (%lu)"
msgstr ""
-#: config/tc-mips.c:8487
+#: config/tc-mips.c:8543
#, c-format
msgid "Invalid performance register (%lu)"
msgstr ""
-#: config/tc-mips.c:8525
-#, c-format
-msgid "Invalid register number (%d)"
-msgstr ""
-
-#: config/tc-mips.c:8703
+#: config/tc-mips.c:8754
#, c-format
msgid "Invalid MDMX Immediate (%ld)"
msgstr ""
-#: config/tc-mips.c:8746
+#: config/tc-mips.c:8794
#, c-format
msgid "Invalid float register number (%d)"
msgstr ""
-#: config/tc-mips.c:8756
+#: config/tc-mips.c:8810
#, c-format
msgid "Float register should be even, was %d"
msgstr ""
-#: config/tc-mips.c:8795
+#: config/tc-mips.c:8849
#, c-format
msgid "Bad element selector %ld"
msgstr ""
-#: config/tc-mips.c:8802
+#: config/tc-mips.c:8857
#, c-format
msgid "Expecting ']' found '%s'"
msgstr ""
-#: config/tc-mips.c:8844
-msgid "absolute expression required"
-msgstr ""
-
-#: config/tc-mips.c:8912
+#: config/tc-mips.c:8963
#, c-format
msgid "Bad floating point constant: %s"
msgstr ""
-#: config/tc-mips.c:9040
+#: config/tc-mips.c:9084
msgid "Can't use floating point insn in this section"
msgstr ""
-#: config/tc-mips.c:9101
+#: config/tc-mips.c:9145
msgid "expression out of range"
msgstr ""
-#: config/tc-mips.c:9141
+#: config/tc-mips.c:9185
msgid "lui expression not in range 0..65535"
msgstr ""
-#: config/tc-mips.c:9165
+#: config/tc-mips.c:9209
+#, c-format
+msgid "Invalid condition code register $fcc%d"
+msgstr ""
+
+#: config/tc-mips.c:9214
+#, c-format
+msgid "Condition code register should be even for %s, was %d"
+msgstr ""
+
+#: config/tc-mips.c:9219
#, c-format
-msgid "invalid condition code register $fcc%d"
+msgid "Condition code register should be 0 or 4 for %s, was %d"
msgstr ""
-#: config/tc-mips.c:9190
+#: config/tc-mips.c:9245
msgid "invalid coprocessor sub-selection value (0-7)"
msgstr ""
-#: config/tc-mips.c:9202 config/tc-mips.c:9219
+#: config/tc-mips.c:9257 config/tc-mips.c:9274
#, c-format
msgid "bad byte vector index (%ld)"
msgstr ""
-#: config/tc-mips.c:9230
+#: config/tc-mips.c:9285
#, c-format
msgid "bad char = '%c'\n"
msgstr ""
-#: config/tc-mips.c:9241 config/tc-mips.c:9246 config/tc-mips.c:9795
+#: config/tc-mips.c:9296 config/tc-mips.c:9301 config/tc-mips.c:9869
msgid "illegal operands"
msgstr ""
-#: config/tc-mips.c:9311
+#: config/tc-mips.c:9367
msgid "unrecognized opcode"
msgstr ""
-#: config/tc-mips.c:9423
+#: config/tc-mips.c:9504
#, c-format
msgid "invalid register number (%d)"
msgstr ""
-#: config/tc-mips.c:9514
+#: config/tc-mips.c:9595
msgid "used $at without \".set noat\""
msgstr ""
-#: config/tc-mips.c:9689
+#: config/tc-mips.c:9763
msgid "can't parse register list"
msgstr ""
-#: config/tc-mips.c:9913
+#: config/tc-mips.c:9987
msgid "extended operand requested but not required"
msgstr ""
-#: config/tc-mips.c:9915
+#: config/tc-mips.c:9989
msgid "invalid unextended operand value"
msgstr ""
-#: config/tc-mips.c:9943
+#: config/tc-mips.c:10017
msgid "operand value out of range for instruction"
msgstr ""
-#: config/tc-mips.c:10341
+#: config/tc-mips.c:10469
#, c-format
msgid "A different %s was already specified, is now %s"
msgstr ""
-#: config/tc-mips.c:10502
-msgid "-G may not be used with embedded PIC code"
-msgstr ""
-
-#: config/tc-mips.c:10531
+#: config/tc-mips.c:10689
msgid "-call_shared is supported only for ELF format"
msgstr ""
-#: config/tc-mips.c:10538 config/tc-mips.c:11849 config/tc-mips.c:12087
+#: 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:10547
+#: config/tc-mips.c:10705
msgid "-non_shared is supported only for ELF format"
msgstr ""
-#: config/tc-mips.c:10565
-msgid "-G is not supported for this configuration"
-msgstr ""
-
-#: config/tc-mips.c:10570
-msgid "-G may not be used with SVR4 or embedded PIC code"
-msgstr ""
-
-#: config/tc-mips.c:10584
+#: config/tc-mips.c:10736
msgid "-32 is supported for ELF format only"
msgstr ""
-#: config/tc-mips.c:10593
+#: config/tc-mips.c:10745
msgid "-n32 is supported for ELF format only"
msgstr ""
-#: config/tc-mips.c:10602
+#: config/tc-mips.c:10754
msgid "-64 is supported for ELF format only"
msgstr ""
-#: config/tc-mips.c:10607 config/tc-mips.c:10644
+#: config/tc-mips.c:10759 config/tc-mips.c:10796
msgid "No compiled in support for 64 bit object file format"
msgstr ""
-#: config/tc-mips.c:10631
+#: config/tc-mips.c:10783
msgid "-mabi is supported for ELF format only"
msgstr ""
-#: config/tc-mips.c:10651
+#: config/tc-mips.c:10803
#, c-format
msgid "invalid abi -mabi=%s"
msgstr ""
-#: config/tc-mips.c:10718
+#: config/tc-mips.c:10877
msgid "-G not supported in this configuration."
msgstr ""
-#: config/tc-mips.c:10744
+#: config/tc-mips.c:10903
#, c-format
msgid "-%s conflicts with the other architecture options, which imply -%s"
msgstr ""
-#: config/tc-mips.c:10775
+#: config/tc-mips.c:10934
msgid "-mgp64 used with a 32-bit processor"
msgstr ""
-#: config/tc-mips.c:10777
+#: config/tc-mips.c:10936
msgid "-mgp32 used with a 64-bit ABI"
msgstr ""
-#: config/tc-mips.c:10779
+#: config/tc-mips.c:10938
msgid "-mgp64 used with a 32-bit ABI"
msgstr ""
-#: config/tc-mips.c:10809
+#: config/tc-mips.c:10968
msgid "trap exception not supported at ISA 1"
msgstr ""
-#: config/tc-mips.c:10957
-#, c-format
-msgid "Unmatched %%hi reloc"
-msgstr ""
-
-#: config/tc-mips.c:11049
+#: config/tc-mips.c:11229
msgid "Cannot branch to undefined symbol."
msgstr ""
-#: config/tc-mips.c:11056
+#: config/tc-mips.c:11236
msgid "Cannot branch to symbol in another section."
msgstr ""
-#: config/tc-mips.c:11065
+#: config/tc-mips.c:11245
msgid "Pretending global symbol used as branch target is local."
msgstr ""
-#: config/tc-mips.c:11230
-msgid "Invalid PC relative reloc"
-msgstr ""
-
-#: config/tc-mips.c:11325 config/tc-sparc.c:3185 config/tc-sparc.c:3192
-#: config/tc-sparc.c:3199 config/tc-sparc.c:3206 config/tc-sparc.c:3213
-#: config/tc-sparc.c:3222 config/tc-sparc.c:3233 config/tc-sparc.c:3255
-#: config/tc-sparc.c:3279 write.c:998 write.c:1070
+#: 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
msgid "relocation overflow"
msgstr ""
-#: config/tc-mips.c:11335
+#: config/tc-mips.c:11412
#, c-format
msgid "Branch to odd address (%lx)"
msgstr ""
-#: config/tc-mips.c:11384
+#: config/tc-mips.c:11461
msgid "Branch out of range"
msgstr ""
-#: config/tc-mips.c:11491
-#, c-format
-msgid "%08lx UNDEFINED\n"
-msgstr ""
-
-#: config/tc-mips.c:11550
+#: config/tc-mips.c:11540
#, c-format
msgid "Alignment too large: %d. assumed."
msgstr ""
-#: config/tc-mips.c:11553
+#: config/tc-mips.c:11543
msgid "Alignment negative: 0 assumed."
msgstr ""
-#: config/tc-mips.c:11640
-msgid "No read only data section in this object file format"
-msgstr ""
-
-#: config/tc-mips.c:11663
-msgid "Global pointers not supported; recompile -G 0"
-msgstr ""
-
-#: config/tc-mips.c:11805
+#: config/tc-mips.c:11780
#, c-format
msgid "%s: no such section"
msgstr ""
-#: config/tc-mips.c:11844
+#: config/tc-mips.c:11829
#, c-format
msgid ".option pic%d not supported"
msgstr ""
-#: config/tc-mips.c:11855
+#: config/tc-mips.c:11840
#, c-format
msgid "Unrecognized option \"%s\""
msgstr ""
-#: config/tc-mips.c:11917
+#: config/tc-mips.c:11893
msgid "`noreorder' must be set before `nomacro'"
msgstr ""
-#: config/tc-mips.c:11989
+#: config/tc-mips.c:11952
#, c-format
msgid "unknown architecture %s"
msgstr ""
-#: config/tc-mips.c:11997 config/tc-mips.c:12018
+#: config/tc-mips.c:11965 config/tc-mips.c:11995
#, c-format
msgid "unknown ISA level %s"
msgstr ""
-#: config/tc-mips.c:12046
+#: config/tc-mips.c:11973
+#, c-format
+msgid "unknown ISA or architecture %s"
+msgstr ""
+
+#: config/tc-mips.c:12023
msgid ".set pop with no .set push"
msgstr ""
-#: config/tc-mips.c:12070
+#: config/tc-mips.c:12044
#, c-format
msgid "Tried to set unrecognized symbol: %s\n"
msgstr ""
-#: config/tc-mips.c:12120
+#: config/tc-mips.c:12102
msgid ".cpload not in noreorder section"
msgstr ""
-#: config/tc-mips.c:12176 config/tc-mips.c:12195
+#: config/tc-mips.c:12171 config/tc-mips.c:12190
msgid "missing argument separator ',' for .cpsetup"
msgstr ""
-#: config/tc-mips.c:12373
+#: config/tc-mips.c:12380
msgid "Unsupported use of .gpword"
msgstr ""
-#: config/tc-mips.c:12409
+#: config/tc-mips.c:12416
msgid "Unsupported use of .gpdword"
msgstr ""
-#: config/tc-mips.c:12544
+#: config/tc-mips.c:12548
msgid "expected `$'"
msgstr ""
-#: config/tc-mips.c:12552
+#: config/tc-mips.c:12556
msgid "Bad register number"
msgstr ""
-#: config/tc-mips.c:12600
+#: config/tc-mips.c:12604
msgid "Unrecognized register name"
msgstr ""
-#: config/tc-mips.c:12835
+#: config/tc-mips.c:12837
msgid "unsupported PC relative reference to different section"
msgstr ""
-#: config/tc-mips.c:12948
+#: config/tc-mips.c:12950 config/tc-xtensa.c:1593 config/tc-xtensa.c:1804
msgid "unsupported relocation"
msgstr ""
-#: config/tc-mips.c:13063
-msgid "AT used after \".set noat\" or macro used after \".set nomacro\""
-msgstr ""
-
-#: config/tc-mips.c:13126
-msgid "Double check fx_r_type in tc-mips.c:tc_gen_reloc"
-msgstr ""
-
-#: config/tc-mips.c:13341 config/tc-sh.c:3800
+#: config/tc-mips.c:13158
#, c-format
msgid "Can not represent %s relocation in this object file format"
msgstr ""
-#: config/tc-mips.c:13430
+#: config/tc-mips.c:13244
msgid "relaxed out-of-range branch into a jump"
msgstr ""
-#: config/tc-mips.c:13903
+#: config/tc-mips.c:13766
msgid "missing .end at end of assembly"
msgstr ""
-#: config/tc-mips.c:13918
+#: config/tc-mips.c:13781
msgid "expected simple number"
msgstr ""
-#: config/tc-mips.c:13944
+#: config/tc-mips.c:13807
#, c-format
msgid " *input_line_pointer == '%c' 0x%02x\n"
msgstr ""
-#: config/tc-mips.c:13946
+#: config/tc-mips.c:13809
msgid "invalid number"
msgstr ""
-#: config/tc-mips.c:14019
+#: config/tc-mips.c:13882
msgid ".end not in text section"
msgstr ""
-#: config/tc-mips.c:14023
+#: config/tc-mips.c:13886
msgid ".end directive without a preceding .ent directive."
msgstr ""
-#: config/tc-mips.c:14032
+#: config/tc-mips.c:13895
msgid ".end symbol does not match .ent symbol."
msgstr ""
-#: config/tc-mips.c:14039
+#: config/tc-mips.c:13902
msgid ".end directive missing or unknown symbol"
msgstr ""
-#: config/tc-mips.c:14099
+#: config/tc-mips.c:13978
msgid ".ent or .aent not in text section."
msgstr ""
-#: config/tc-mips.c:14102
+#: config/tc-mips.c:13981
msgid "missing .end"
msgstr ""
-#: config/tc-mips.c:14154
+#: config/tc-mips.c:14033
msgid "Bad .frame directive"
msgstr ""
-#: config/tc-mips.c:14186
+#: config/tc-mips.c:14065
msgid ".mask/.fmask outside of .ent"
msgstr ""
-#: config/tc-mips.c:14193
+#: config/tc-mips.c:14072
msgid "Bad .mask/.fmask directive"
msgstr ""
-#: config/tc-mips.c:14472
+#: config/tc-mips.c:14337
+#, c-format
msgid ""
"MIPS options:\n"
-"-membedded-pic\t\tgenerate embedded position independent code\n"
"-EB\t\t\tgenerate big endian output\n"
"-EL\t\t\tgenerate little endian output\n"
"-g, -g2\t\t\tdo not remove unneeded NOPs or swap branches\n"
@@ -6798,7 +7350,8 @@ msgid ""
"\t\t\timplicitly with the gp register [default 8]\n"
msgstr ""
-#: config/tc-mips.c:14480
+#: config/tc-mips.c:14344
+#, c-format
msgid ""
"-mips1\t\t\tgenerate MIPS ISA I instructions\n"
"-mips2\t\t\tgenerate MIPS ISA II instructions\n"
@@ -6808,96 +7361,132 @@ msgid ""
"-mips32 generate MIPS32 ISA instructions\n"
"-mips32r2 generate MIPS32 release 2 ISA instructions\n"
"-mips64 generate MIPS64 ISA instructions\n"
+"-mips64r2 generate MIPS64 release 2 ISA instructions\n"
"-march=CPU/-mtune=CPU\tgenerate code/schedule for CPU, where CPU is one of:\n"
msgstr ""
-#: config/tc-mips.c:14498
+#: config/tc-mips.c:14363
+#, c-format
msgid ""
"-mCPU\t\t\tequivalent to -march=CPU -mtune=CPU. Deprecated.\n"
"-no-mCPU\t\tdon't generate code specific to CPU.\n"
"\t\t\tFor -mCPU and -no-mCPU, CPU must be one of:\n"
msgstr ""
-#: config/tc-mips.c:14511
+#: config/tc-mips.c:14376
+#, c-format
msgid ""
"-mips16\t\t\tgenerate mips16 instructions\n"
"-no-mips16\t\tdo not generate mips16 instructions\n"
msgstr ""
-#: config/tc-mips.c:14514
+#: config/tc-mips.c:14379
+#, 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
+#, 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
+#, 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"
-"-n\t\t\twarn about NOPs generated from macros\n"
"--[no-]construct-floats [dis]allow floating point values to be constructed\n"
"--trap, --no-break\ttrap exception on div by 0 and mult overflow\n"
"--break, --no-trap\tbreak exception on div by 0 and mult overflow\n"
msgstr ""
-#: config/tc-mips.c:14524
+#: config/tc-mips.c:14398
+#, c-format
msgid ""
"-KPIC, -call_shared\tgenerate SVR4 position independent code\n"
"-non_shared\t\tdo not generate position independent code\n"
"-xgot\t\t\tassume a 32 bit GOT\n"
+"-mpdr, -mno-pdr\t\tenable/disable creation of .pdr sections\n"
+"-mshared, -mno-shared disable/enable .cpload optimization for\n"
+" non-shared code\n"
"-mabi=ABI\t\tcreate ABI conformant object file for:\n"
msgstr ""
-#: config/tc-mips.c:14540
+#: config/tc-mips.c:14417
+#, c-format
msgid ""
"-32\t\t\tcreate o32 ABI object file (default)\n"
"-n32\t\t\tcreate n32 ABI object file\n"
"-64\t\t\tcreate 64 ABI object file\n"
msgstr ""
-#: config/tc-mmix.c:677
+#: config/tc-mmix.c:694
+#, c-format
msgid " MMIX-specific command line options:\n"
msgstr ""
-#: config/tc-mmix.c:678
+#: config/tc-mmix.c:695
+#, c-format
msgid ""
" -fixed-special-register-names\n"
" Allow only the original special register names.\n"
msgstr ""
-#: config/tc-mmix.c:681
+#: config/tc-mmix.c:698
+#, c-format
msgid " -globalize-symbols Make all symbols global.\n"
msgstr ""
-#: config/tc-mmix.c:683
+#: config/tc-mmix.c:700
+#, c-format
msgid " -gnu-syntax Turn off mmixal syntax compatibility.\n"
msgstr ""
-#: config/tc-mmix.c:685
+#: config/tc-mmix.c:702
+#, c-format
msgid " -relax Create linker relaxable code.\n"
msgstr ""
-#: config/tc-mmix.c:687
+#: config/tc-mmix.c:704
+#, 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:690
+#: config/tc-mmix.c:707
+#, c-format
msgid ""
" -no-expand Do not expand GETA, branches, PUSHJ or JUMP\n"
" into multiple instructions.\n"
msgstr ""
-#: config/tc-mmix.c:693
+#: config/tc-mmix.c:710
+#, c-format
msgid ""
" -no-merge-gregs Do not merge GREG definitions with nearby values.\n"
msgstr ""
-#: config/tc-mmix.c:695
+#: config/tc-mmix.c:712
+#, c-format
msgid ""
" -linker-allocated-gregs If there's no suitable GREG definition for "
"the operands of an instruction, let the linker "
"resolve.\n"
msgstr ""
-#: config/tc-mmix.c:698
+#: config/tc-mmix.c:715
+#, c-format
msgid ""
" -x Do not warn when an operand to GETA, a branch,\n"
" PUSHJ or JUMP is not known to be within range.\n"
@@ -6905,185 +7494,185 @@ msgid ""
" -linker-allocated-gregs."
msgstr ""
-#: config/tc-mmix.c:825
+#: config/tc-mmix.c:841
#, c-format
msgid "unknown opcode: `%s'"
msgstr ""
-#: config/tc-mmix.c:947 config/tc-mmix.c:962
+#: config/tc-mmix.c:963 config/tc-mmix.c:978
msgid "specified location wasn't TETRA-aligned"
msgstr ""
-#: config/tc-mmix.c:949 config/tc-mmix.c:964 config/tc-mmix.c:4015
-#: config/tc-mmix.c:4031
+#: config/tc-mmix.c:965 config/tc-mmix.c:980 config/tc-mmix.c:4124
+#: config/tc-mmix.c:4140
msgid "unaligned data at an absolute location is not supported"
msgstr ""
-#: config/tc-mmix.c:1074
+#: config/tc-mmix.c:1090
#, c-format
msgid "invalid operand to opcode %s: `%s'"
msgstr ""
-#: config/tc-mmix.c:1096 config/tc-mmix.c:1123 config/tc-mmix.c:1156
-#: config/tc-mmix.c:1164 config/tc-mmix.c:1181 config/tc-mmix.c:1209
-#: config/tc-mmix.c:1230 config/tc-mmix.c:1255 config/tc-mmix.c:1303
-#: config/tc-mmix.c:1401 config/tc-mmix.c:1426 config/tc-mmix.c:1458
-#: config/tc-mmix.c:1490 config/tc-mmix.c:1520 config/tc-mmix.c:1573
-#: config/tc-mmix.c:1590 config/tc-mmix.c:1617 config/tc-mmix.c:1645
-#: config/tc-mmix.c:1672 config/tc-mmix.c:1698 config/tc-mmix.c:1714
-#: config/tc-mmix.c:1740 config/tc-mmix.c:1756 config/tc-mmix.c:1772
-#: config/tc-mmix.c:1835 config/tc-mmix.c:1851
+#: 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
#, c-format
msgid "invalid operands to opcode %s: `%s'"
msgstr ""
-#: config/tc-mmix.c:1828
+#: config/tc-mmix.c:1844
#, c-format
msgid "unsupported operands to %s: `%s'"
msgstr ""
-#: config/tc-mmix.c:1956
+#: config/tc-mmix.c:1969
msgid "internal: mmix_prefix_name but empty prefix"
msgstr ""
-#: config/tc-mmix.c:2001
+#: config/tc-mmix.c:2013
#, c-format
msgid "too many GREG registers allocated (max %d)"
msgstr ""
-#: config/tc-mmix.c:2061
+#: config/tc-mmix.c:2071
msgid "BSPEC already active. Nesting is not supported."
msgstr ""
-#: config/tc-mmix.c:2070
+#: config/tc-mmix.c:2080
msgid "invalid BSPEC expression"
msgstr ""
-#: config/tc-mmix.c:2086
+#: config/tc-mmix.c:2096
#, c-format
msgid "can't create section %s"
msgstr ""
-#: config/tc-mmix.c:2091
+#: config/tc-mmix.c:2101
#, c-format
msgid "can't set section flags for section %s"
msgstr ""
-#: config/tc-mmix.c:2113
+#: config/tc-mmix.c:2122
msgid "ESPEC without preceding BSPEC"
msgstr ""
-#: config/tc-mmix.c:2143
+#: config/tc-mmix.c:2151
msgid "missing local expression"
msgstr ""
-#: config/tc-mmix.c:2363
+#: config/tc-mmix.c:2389
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:2620
+#: config/tc-mmix.c:2640
msgid "directive LOCAL must be placed in code or data"
msgstr ""
-#: config/tc-mmix.c:2621
+#: config/tc-mmix.c:2641
msgid "internal confusion: relocation in a section without contents"
msgstr ""
-#: config/tc-mmix.c:2734
+#: config/tc-mmix.c:2755
msgid "internal: BFD_RELOC_MMIX_BASE_PLUS_OFFSET not resolved to section"
msgstr ""
-#: config/tc-mmix.c:2782
+#: config/tc-mmix.c:2803
msgid "no suitable GREG definition for operands"
msgstr ""
-#: config/tc-mmix.c:2841
+#: config/tc-mmix.c:2862
msgid "operands were not reducible at assembly-time"
msgstr ""
-#: config/tc-mmix.c:2868
+#: config/tc-mmix.c:2889
#, c-format
msgid "cannot generate relocation type for symbol %s, code %s"
msgstr ""
-#: config/tc-mmix.c:2888
+#: config/tc-mmix.c:2909
#, c-format
msgid "internal: unhandled label %s"
msgstr ""
-#: config/tc-mmix.c:2942
+#: config/tc-mmix.c:2939
msgid "[0-9]H labels may not appear alone on a line"
msgstr ""
-#: config/tc-mmix.c:2951
+#: config/tc-mmix.c:2948
msgid "[0-9]H labels do not mix with dot-pseudos"
msgstr ""
-#: config/tc-mmix.c:3015
+#: config/tc-mmix.c:3036
msgid "invalid characters in input"
msgstr ""
-#: config/tc-mmix.c:3119
+#: config/tc-mmix.c:3140
msgid "empty label field for IS"
msgstr ""
-#: config/tc-mmix.c:3344
+#: config/tc-mmix.c:3466
#, c-format
msgid "internal: unexpected relax type %d:%d"
msgstr ""
-#: config/tc-mmix.c:3366
+#: config/tc-mmix.c:3488
msgid "BSPEC without ESPEC."
msgstr ""
-#: config/tc-mmix.c:3568
+#: config/tc-mmix.c:3688
msgid "GREG expression too complicated"
msgstr ""
-#: config/tc-mmix.c:3583
+#: config/tc-mmix.c:3703
msgid "internal: GREG expression not resolved to section"
msgstr ""
-#: config/tc-mmix.c:3634
+#: config/tc-mmix.c:3752
msgid "register section has contents\n"
msgstr ""
-#: config/tc-mmix.c:3768
+#: config/tc-mmix.c:3879
msgid "section change from within a BSPEC/ESPEC pair is not supported"
msgstr ""
-#: config/tc-mmix.c:3790
+#: config/tc-mmix.c:3900
msgid "directive LOC from within a BSPEC/ESPEC pair is not supported"
msgstr ""
-#: config/tc-mmix.c:3801
+#: config/tc-mmix.c:3911
msgid "invalid LOC expression"
msgstr ""
-#: config/tc-mmix.c:3826 config/tc-mmix.c:3852
+#: config/tc-mmix.c:3936 config/tc-mmix.c:3962
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:3936 config/tc-mmix.c:4097
+#: config/tc-mmix.c:4046 config/tc-mmix.c:4206
msgid "unterminated string"
msgstr ""
-#: config/tc-mmix.c:3953
+#: config/tc-mmix.c:4063
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:3962
+#: config/tc-mmix.c:4072
msgid "BYTE expression not in the range 0..255"
msgstr ""
-#: config/tc-mmix.c:4013 config/tc-mmix.c:4029
+#: config/tc-mmix.c:4122 config/tc-mmix.c:4138
msgid "data item with alignment larger than location"
msgstr ""
@@ -7093,70 +7682,83 @@ msgstr ""
msgid "`&' serial number operator is not supported"
msgstr ""
-#: config/tc-mn10200.c:319
+#: config/tc-mn10200.c:305
+#, c-format
msgid ""
"MN10200 options:\n"
"none yet\n"
msgstr ""
-#: config/tc-mn10200.c:793 config/tc-mn10300.c:1387 config/tc-ppc.c:2088
-#: config/tc-s390.c:1540 config/tc-v850.c:1677
+#: 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
#, c-format
msgid "Unrecognized opcode: `%s'"
msgstr ""
-#: config/tc-mn10200.c:1036 config/tc-mn10300.c:1960 config/tc-ppc.c:2566
-#: config/tc-s390.c:1455 config/tc-v850.c:2100
+#: 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
#, c-format
msgid "junk at end of line: `%s'"
msgstr ""
-#: config/tc-mn10200.c:1242 write.c:2691
+#: config/tc-mn10300.c:695
#, c-format
-msgid "can't resolve `%s' {%s section} - `%s' {%s section}"
-msgstr ""
-
-#: config/tc-mn10200.c:1347 config/tc-mn10300.c:2589 config/tc-ppc.c:1426
-#: config/tc-v850.c:1606
-#, c-format
-msgid "operand out of range (%s not between %ld and %ld)"
-msgstr ""
-
-#: config/tc-mn10300.c:690
msgid ""
"MN10300 options:\n"
"none yet\n"
msgstr ""
-#: config/tc-mn10300.c:1356 config/tc-sh.c:805 config/tc-xtensa.c:5177
-#: read.c:3764
+#: config/tc-mn10300.c:1361 config/tc-sh.c:778 read.c:3871
#, c-format
msgid "unsupported BFD relocation size %u"
msgstr ""
-#: config/tc-mn10300.c:1404
+#: config/tc-mn10300.c:1409
msgid "Invalid opcode/operands"
msgstr ""
-#: config/tc-mn10300.c:1931
+#: config/tc-mn10300.c:1936
msgid "Invalid register specification."
msgstr ""
-#: config/tc-mn10300.c:2514
+#: config/tc-mn10300.c:2518
#, c-format
msgid "Bad relocation fixup type (%d)"
msgstr ""
-#: config/tc-msp430.c:170
+#: config/tc-msp430.c:552
+msgid ".profiler pseudo requires at least two operands."
+msgstr ""
+
+#: config/tc-msp430.c:611
+msgid "unknown profiling flag - ignored."
+msgstr ""
+
+#: config/tc-msp430.c:627
+msgid "ambigious flags combination - '.profiler' directive ignored."
+msgstr ""
+
+#: config/tc-msp430.c:637
+msgid "profiling in absolute section? Hm..."
+msgstr ""
+
+#: config/tc-msp430.c:726
+#, c-format
msgid "Known MCU names:\n"
msgstr ""
-#: config/tc-msp430.c:173
+#: config/tc-msp430.c:729
#, c-format
msgid "\t %s\n"
msgstr ""
-#: config/tc-msp430.c:183
+#: config/tc-msp430.c:755
+#, c-format
+msgid "redefinition of mcu type %s' to %s'"
+msgstr ""
+
+#: config/tc-msp430.c:798
+#, c-format
msgid ""
"MSP430 options:\n"
" -mmcu=[msp430-name] select microcontroller type\n"
@@ -7170,154 +7772,194 @@ msgid ""
" msp430x147 msp430x148 msp430x149\n"
" msp430x155 msp430x156 msp430x157\n"
" msp430x167 msp430x168 msp430x169\n"
+" msp430x1610 msp430x1611 msp430x1612\n"
" msp430x311 msp430x312 msp430x313 msp430x314 "
"msp430x315\n"
" msp430x323 msp430x325\n"
" msp430x336 msp430x337\n"
-" msp430x412 msp430x413\n"
+" msp430x412 msp430x413 msp430x415 msp430x417\n"
+" msp430xE423 msp430xE425 msp430E427\n"
+" msp430xW423 msp430xW425 msp430W427\n"
+" msp430xG437 msp430xG438 msp430G439\n"
" msp430x435 msp430x436 msp430x437\n"
" msp430x447 msp430x448 msp430x449\n"
msgstr ""
-#: config/tc-msp430.c:263
+#: config/tc-msp430.c:821
#, c-format
-msgid "redefinition of mcu type %s' to %s'"
+msgid ""
+" -mQ - enable relaxation at assembly time. DANGEROUS!\n"
+" -mP - enable polymorph instructions\n"
msgstr ""
-#: config/tc-msp430.c:496
+#: config/tc-msp430.c:1011
#, c-format
-msgid "instruction %s requires %d operand(s)"
+msgid "value %d out of range. Use #lo() or #hi()"
msgstr ""
-#: config/tc-msp430.c:743
+#: config/tc-msp430.c:1099
#, c-format
-msgid "Even number required. Rounded to %d"
+msgid "unknown expression in operand %s. use #llo() #lhi() #hlo() #hhi() "
msgstr ""
-#: config/tc-msp430.c:754
+#: config/tc-msp430.c:1150
#, c-format
-msgid "Wrong displacement %d"
+msgid "Registers cannot be used within immediate expression [%s]"
msgstr ""
-#: config/tc-msp430.c:771
-msgid "instruction requires label sans '$'"
+#: config/tc-msp430.c:1152
+#, c-format
+msgid "unknown operand %s"
msgstr ""
-#: config/tc-msp430.c:777
-msgid "instruction requires label or value in range -511:512"
+#: config/tc-msp430.c:1174 config/tc-msp430.c:1309
+#, c-format
+msgid "value out of range: %d"
msgstr ""
-#: config/tc-msp430.c:783
-msgid "instruction requires label"
+#: config/tc-msp430.c:1185
+#, c-format
+msgid "Registers cannot be used within absolute expression [%s]"
msgstr ""
-#: config/tc-msp430.c:789
-msgid "Ilegal instruction or not implmented opcode."
+#: config/tc-msp430.c:1187 config/tc-msp430.c:1330
+#, c-format
+msgid "unknown expression in operand %s"
msgstr ""
-#: config/tc-msp430.c:817
+#: config/tc-msp430.c:1201 config/tc-msp430.c:1208
#, c-format
-msgid "Internal bug. Try to use 0(r%d) instead of @r%d"
+msgid "unknown addressing mode %s"
msgstr ""
-#: config/tc-msp430.c:827
-msgid "this addressing mode is not applicable for destination operand"
+#: config/tc-msp430.c:1216
+#, c-format
+msgid "Bad register name r%s"
msgstr ""
-#: config/tc-msp430.c:944
+#: config/tc-msp430.c:1228
#, c-format
-msgid "value %ld out of range. Use #lo() or #hi()"
+msgid "MSP430 does not have %d registers"
msgstr ""
-#: config/tc-msp430.c:1040
-#, c-format
-msgid "unknown expression in operand %s. use #llo() #lhi() #hlo() #hhi() "
+#: config/tc-msp430.c:1248
+msgid "')' required"
msgstr ""
-#: config/tc-msp430.c:1090 config/tc-msp430.c:1304
+#: config/tc-msp430.c:1261
#, c-format
-msgid "unknown operand %s"
+msgid "unknown operator %s. Did you mean X(Rn) or #[hl][hl][oi](CONST) ?"
msgstr ""
-#: config/tc-msp430.c:1111 config/tc-msp430.c:1242
+#: config/tc-msp430.c:1270
#, c-format
-msgid "value out of range: %d"
+msgid "unknown operator (r%s substituded as a register name"
msgstr ""
-#: config/tc-msp430.c:1120 config/tc-msp430.c:1259
+#: config/tc-msp430.c:1282 config/tc-msp430.c:1293
#, c-format
-msgid "unknown expression in operand %s"
+msgid "unknown operator %s"
+msgstr ""
+
+#: config/tc-msp430.c:1287
+msgid "r2 should not be used in indexed addressing mode"
msgstr ""
-#: config/tc-msp430.c:1134 config/tc-msp430.c:1141
+#: config/tc-msp430.c:1328
#, c-format
-msgid "unknown addressing mode %s"
+msgid "Registers cannot be used as a prefix of indexed expression [%s]"
msgstr ""
-#: config/tc-msp430.c:1149
+#. Unreachable.
+#: config/tc-msp430.c:1377
#, c-format
-msgid "Bad register name r%s"
+msgid "unknown addressing mode for operand %s"
msgstr ""
-#: config/tc-msp430.c:1161
+#: config/tc-msp430.c:1402
#, c-format
-msgid "MSP430 does not have %d registers"
+msgid "Internal bug. Try to use 0(r%d) instead of @r%d"
msgstr ""
-#: config/tc-msp430.c:1181
-msgid "')' required"
+#: config/tc-msp430.c:1412
+msgid "this addressing mode is not applicable for destination operand"
msgstr ""
-#: config/tc-msp430.c:1194
+#: config/tc-msp430.c:1456
#, c-format
-msgid "unknown operator %s. Did you mean X(Rn) or #[hl][hl][oi](CONST) ?"
+msgid "instruction %s requires %d operand(s)"
msgstr ""
-#: config/tc-msp430.c:1203
+#: config/tc-msp430.c:1709
#, c-format
-msgid "unknown operator (r%s substituded as a register name"
+msgid "Even number required. Rounded to %d"
msgstr ""
-#: config/tc-msp430.c:1215 config/tc-msp430.c:1226
+#: config/tc-msp430.c:1720
#, c-format
-msgid "unknown operator %s"
+msgid "Wrong displacement %d"
msgstr ""
-#: config/tc-msp430.c:1220
-msgid "r2 should not be used in indexed addressing mode"
+#: config/tc-msp430.c:1737
+msgid "instruction requires label sans '$'"
msgstr ""
-#. Unreachable.
-#: config/tc-msp430.c:1321
+#: config/tc-msp430.c:1742
+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
+msgid "instruction requires label"
+msgstr ""
+
+#: config/tc-msp430.c:1757 config/tc-msp430.c:1799
+msgid "polymorphs are not enabled. Use -mP option to enable."
+msgstr ""
+
+#: config/tc-msp430.c:1836
+msgid "Ilegal instruction or not implmented opcode."
+msgstr ""
+
+#: config/tc-msp430.c:2187
#, c-format
-msgid "unknown addressing mode for operand %s"
+msgid "internal inconsistency problem in %s: insn %04lx"
+msgstr ""
+
+#: config/tc-msp430.c:2217 config/tc-msp430.c:2240
+#, c-format
+msgid "internal inconsistency problem in %s: ext. insn %04lx"
msgstr ""
-#: config/tc-ns32k.c:449
+#: config/tc-msp430.c:2252
+#, c-format
+msgid "internal inconsistency problem in %s: %lx"
+msgstr ""
+
+#: config/tc-ns32k.c:441
msgid "Invalid syntax in PC-relative addressing mode"
msgstr ""
-#: config/tc-ns32k.c:473
+#: config/tc-ns32k.c:465
msgid "Invalid syntax in External addressing mode"
msgstr ""
-#: config/tc-ns32k.c:554
+#: config/tc-ns32k.c:546
msgid "Invalid syntax in Memory Relative addressing mode"
msgstr ""
-#: config/tc-ns32k.c:621
+#: config/tc-ns32k.c:613
msgid "Invalid scaled-indexed mode, use (b,w,d,q)"
msgstr ""
-#: config/tc-ns32k.c:626
+#: config/tc-ns32k.c:618
msgid "Syntax in scaled-indexed mode, use [Rn:m] where n=[0..7] m={b,w,d,q}"
msgstr ""
-#: config/tc-ns32k.c:631
+#: config/tc-ns32k.c:623
msgid "Scaled-indexed addressing mode combined with scaled-index"
msgstr ""
-#: config/tc-ns32k.c:642
+#: config/tc-ns32k.c:634
msgid "Invalid or illegal addressing mode combined with scaled-index"
msgstr ""
@@ -7329,35 +7971,35 @@ msgstr ""
msgid "Bad suffix after ':' use {b|w|d} Defaulting to d"
msgstr ""
-#: config/tc-ns32k.c:817
+#: config/tc-ns32k.c:815
msgid "Very short instr to option, ie you can't do it on a NULLstr"
msgstr ""
-#: config/tc-ns32k.c:870
+#: config/tc-ns32k.c:865
msgid "No such entry in list. (cpu/mmu register)"
msgstr ""
-#: config/tc-ns32k.c:915
+#: config/tc-ns32k.c:922
msgid "Internal consistency error. check ns32k-opcode.h"
msgstr ""
-#: config/tc-ns32k.c:939
+#: config/tc-ns32k.c:946
msgid "Address of immediate operand"
msgstr ""
-#: config/tc-ns32k.c:940
+#: config/tc-ns32k.c:947
msgid "Invalid immediate write operand."
msgstr ""
-#: config/tc-ns32k.c:1070
+#: config/tc-ns32k.c:1077
msgid "Bad opcode-table-option, check in file ns32k-opcode.h"
msgstr ""
-#: config/tc-ns32k.c:1107
+#: config/tc-ns32k.c:1110
msgid "No such opcode"
msgstr ""
-#: config/tc-ns32k.c:1184
+#: config/tc-ns32k.c:1185
msgid "Bad suffix, defaulting to d"
msgstr ""
@@ -7366,181 +8008,180 @@ msgid "Too many operands passed to instruction"
msgstr ""
#. Check error in default.
-#: config/tc-ns32k.c:1225
+#: config/tc-ns32k.c:1224
msgid "Wrong numbers of operands in default, check ns32k-opcodes.h"
msgstr ""
-#: config/tc-ns32k.c:1229
+#: config/tc-ns32k.c:1227
msgid "Wrong number of operands"
msgstr ""
-#: config/tc-ns32k.c:1355
-msgid "iif convert internal pcrel/binary"
+#: config/tc-ns32k.c:1300
+#, c-format
+msgid "Can not do %d byte pc-relative relocation for storage type %d"
msgstr ""
-#: config/tc-ns32k.c:1372
-msgid "Bignum too big for long"
+#: config/tc-ns32k.c:1303
+#, c-format
+msgid "Can not do %d byte relocation for storage type %d"
msgstr ""
-#: config/tc-ns32k.c:1451
-msgid "iif convert internal pcrel/pointer"
+#: config/tc-ns32k.c:1395
+#, c-format
+msgid "value of %ld out of byte displacement range."
msgstr ""
-#: config/tc-ns32k.c:1456
-msgid "Internal logic error in iif.iifP[n].type"
+#: config/tc-ns32k.c:1405
+#, c-format
+msgid "value of %ld out of word displacement range."
msgstr ""
-#. We cant relax this case.
-#: config/tc-ns32k.c:1493
-msgid "Can't relax difference"
+#: config/tc-ns32k.c:1420
+#, c-format
+msgid "value of %ld out of double word displacement range."
msgstr ""
-#: config/tc-ns32k.c:1541
-msgid "Displacement to large for :d"
+#: config/tc-ns32k.c:1441
+#, c-format
+msgid "Internal logic error. line %d, file \"%s\""
msgstr ""
-#: config/tc-ns32k.c:1554
-msgid "Internal logic error in iif.iifP[].type"
+#: config/tc-ns32k.c:1489
+#, c-format
+msgid "Internal logic error. line %d, file \"%s\""
msgstr ""
-#: config/tc-ns32k.c:1614
-#, c-format
-msgid "Can not do %d byte pc-relative relocation for storage type %d"
+#: config/tc-ns32k.c:1590
+msgid "Bit field out of range"
msgstr ""
-#: config/tc-ns32k.c:1617
-#, c-format
-msgid "Can not do %d byte relocation for storage type %d"
+#: config/tc-ns32k.c:1690
+msgid "iif convert internal pcrel/binary"
msgstr ""
-#. Fatal.
-#: config/tc-ns32k.c:1652
-#, c-format
-msgid "Can't hash %s: %s"
+#: config/tc-ns32k.c:1707
+msgid "Bignum too big for long"
msgstr ""
-#: config/tc-ns32k.c:1740
-#, c-format
-msgid "value of %ld out of byte displacement range."
+#: config/tc-ns32k.c:1784
+msgid "iif convert internal pcrel/pointer"
msgstr ""
-#: config/tc-ns32k.c:1749
-#, c-format
-msgid "value of %ld out of word displacement range."
+#: config/tc-ns32k.c:1789
+msgid "Internal logic error in iif.iifP[n].type"
msgstr ""
-#: config/tc-ns32k.c:1763
-#, c-format
-msgid "value of %ld out of double word displacement range."
+#. We cant relax this case.
+#: config/tc-ns32k.c:1825
+msgid "Can't relax difference"
msgstr ""
-#: config/tc-ns32k.c:1783
-#, c-format
-msgid "Internal logic error. line %d, file \"%s\""
+#: config/tc-ns32k.c:1866
+msgid "Displacement to large for :d"
msgstr ""
-#: config/tc-ns32k.c:1831
-#, c-format
-msgid "Internal logic error. line %d, file \"%s\""
+#: config/tc-ns32k.c:1879
+msgid "Internal logic error in iif.iifP[].type"
msgstr ""
-#: config/tc-ns32k.c:1936
-msgid "Bit field out of range"
+#. Fatal.
+#: config/tc-ns32k.c:1911
+#, c-format
+msgid "Can't hash %s: %s"
msgstr ""
-#: config/tc-ns32k.c:2183
+#: config/tc-ns32k.c:2181
#, c-format
msgid "invalid architecture option -m%s, ignored"
msgstr ""
-#: config/tc-ns32k.c:2196
+#: config/tc-ns32k.c:2194
#, c-format
msgid "invalid default displacement size \"%s\". Defaulting to %d."
msgstr ""
-#: config/tc-ns32k.c:2213
+#: config/tc-ns32k.c:2210
+#, c-format
msgid ""
"NS32K options:\n"
"-m32032 | -m32532\tselect variant of NS32K architecture\n"
"--disp-size-default=<1|2|4>\n"
msgstr ""
-#: config/tc-ns32k.c:2397
+#: config/tc-ns32k.c:2285
#, c-format
msgid "Cannot find relocation type for symbol %s, code %d"
msgstr ""
-#: config/tc-or32.c:465 config/tc-or32.c:680
+#: config/tc-or32.c:360
#, c-format
msgid "unknown opcode1: `%s'"
msgstr ""
-#: config/tc-or32.c:471 config/tc-or32.c:686
+#: config/tc-or32.c:366
#, c-format
msgid "unknown opcode2 `%s'."
msgstr ""
-#: config/tc-or32.c:510 config/tc-or32.c:725
+#: config/tc-or32.c:403
#, c-format
msgid "instruction not allowed: %s"
msgstr ""
-#: config/tc-or32.c:513 config/tc-or32.c:728
+#: config/tc-or32.c:406
#, c-format
msgid "too many operands: %s"
msgstr ""
-#: config/tc-or32.c:603 config/tc-or32.c:819
+#: config/tc-or32.c:490
msgid "call/jmp target out of range (1)"
msgstr ""
-#: config/tc-or32.c:1016 config/tc-or32.c:1133
-msgid "the linker will not handle this relocation correctly (1)"
-msgstr ""
-
-#: config/tc-or32.c:1025 config/tc-or32.c:1142
+#: config/tc-or32.c:674
msgid "call/jmp target out of range (2)"
msgstr ""
-#: config/tc-or32.c:1433
-msgid "register out of range"
+#: config/tc-or32.c:693
+#, c-format
+msgid "bad relocation type: 0x%02x"
msgstr ""
-#: config/tc-or32.c:1478
+#: config/tc-or32.c:885
msgid "invalid register in & expression"
msgstr ""
-#: config/tc-pdp11.c:454
+#: config/tc-pdp11.c:490
msgid "Low order bits truncated in immediate float operand"
msgstr ""
-#: config/tc-pdp11.c:665
+#: config/tc-pdp11.c:679
#, c-format
msgid "Unknown instruction '%s'"
msgstr ""
-#: config/tc-pj.c:82 config/tc-pj.c:90
+#: config/tc-pj.c:66 config/tc-pj.c:75
msgid "confusing relocation expressions"
msgstr ""
-#: config/tc-pj.c:181
+#: config/tc-pj.c:158
msgid "can't have relocation for ipush"
msgstr ""
-#: config/tc-pj.c:290 config/tc-xtensa.c:4976
+#: config/tc-pj.c:261
#, c-format
msgid "unknown opcode %s"
msgstr ""
-#: config/tc-pj.c:439
+#: config/tc-pj.c:404
+#, c-format
msgid ""
"PJ options:\n"
"-little\t\t\tgenerate little endian code\n"
"-big\t\t\tgenerate big endian code\n"
msgstr ""
-#: config/tc-pj.c:469 config/tc-sh.c:3464 config/tc-sh.c:3471
-#: config/tc-sh.c:3478 config/tc-sh.c:3485
+#: 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
msgid "pcrel too far"
msgstr ""
@@ -7552,17 +8193,18 @@ msgstr ""
msgid "estimate size\n"
msgstr ""
-#: config/tc-ppc.c:879
+#: config/tc-ppc.c:991
#, c-format
msgid "%s unsupported"
msgstr ""
-#: config/tc-ppc.c:1029 config/tc-s390.c:414 config/tc-s390.c:421
+#: config/tc-ppc.c:1057 config/tc-s390.c:417 config/tc-s390.c:424
#, c-format
msgid "invalid switch -m%s"
msgstr ""
-#: config/tc-ppc.c:1066
+#: config/tc-ppc.c:1094
+#, c-format
msgid ""
"PowerPC options:\n"
"-a32\t\t\tgenerate ELF32/XCOFF32\n"
@@ -7574,31 +8216,37 @@ msgid ""
"-mppc, -mppc32, -m603, -m604\n"
"\t\t\tgenerate code for PowerPC 603/604\n"
"-m403, -m405\t\tgenerate code for PowerPC 403/405\n"
+"-m440\t\t\tgenerate code for PowerPC 440\n"
"-m7400, -m7410, -m7450, -m7455\n"
"\t\t\tgenerate code For PowerPC 7400/7410/7450/7455\n"
msgstr ""
-#: config/tc-ppc.c:1079
+#: config/tc-ppc.c:1108
+#, c-format
msgid ""
"-mppc64, -m620\t\tgenerate code for PowerPC 620/625/630\n"
"-mppc64bridge\t\tgenerate code for PowerPC 64, including bridge insns\n"
"-mbooke64\t\tgenerate code for 64-bit PowerPC BookE\n"
"-mbooke, mbooke32\tgenerate code for 32-bit PowerPC BookE\n"
"-mpower4\t\tgenerate code for Power4 architecture\n"
+"-mpower5\t\tgenerate code for Power5 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:1087
+#: config/tc-ppc.c:1117
+#, c-format
msgid ""
"-maltivec\t\tgenerate code for AltiVec\n"
+"-me300\t\t\tgenerate code for PowerPC e300 family\n"
"-me500, -me500x2\tgenerate code for Motorola e500 core complex\n"
"-mspe\t\t\tgenerate code for Motorola SPE instructions\n"
"-mregnames\t\tAllow symbolic names for registers\n"
"-mno-regnames\t\tDo not allow symbolic names for registers\n"
msgstr ""
-#: config/tc-ppc.c:1094
+#: config/tc-ppc.c:1125
+#, c-format
msgid ""
"-mrelocatable\t\tsupport for GCC's -mrelocatble option\n"
"-mrelocatable-lib\tsupport for GCC's -mrelocatble-lib option\n"
@@ -7613,221 +8261,252 @@ msgid ""
"-Qy, -Qn\t\tignored\n"
msgstr ""
-#: config/tc-ppc.c:1136
+#: config/tc-ppc.c:1162
#, c-format
msgid "Unknown default cpu = %s, os = %s"
msgstr ""
-#: config/tc-ppc.c:1161
+#: config/tc-ppc.c:1188
msgid "Neither Power nor PowerPC opcodes were selected."
msgstr ""
-#: config/tc-ppc.c:1257 config/tc-s390.c:516
+#: config/tc-ppc.c:1285 config/tc-s390.c:519
#, c-format
msgid "Internal assembler error for instruction %s"
msgstr ""
-#: config/tc-ppc.c:1277
+#: config/tc-ppc.c:1309
#, c-format
msgid "Internal assembler error for macro %s"
msgstr ""
-#: config/tc-ppc.c:1599
+#: config/tc-ppc.c:1640
msgid "identifier+constant@got means identifier@got+constant"
msgstr ""
-#: config/tc-ppc.c:1666
+#: config/tc-ppc.c:1707
#, c-format
msgid "%s relocations do not fit in %d bytes\n"
msgstr ""
-#: config/tc-ppc.c:1773
+#: config/tc-ppc.c:1814
#, c-format
msgid "Length of .lcomm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
-#: config/tc-ppc.c:1855
+#: config/tc-ppc.c:1896
msgid "Relocation cannot be done when using -mrelocatable"
msgstr ""
-#: config/tc-ppc.c:1981
+#: config/tc-ppc.c:1945
+msgid "TOC section size exceeds 64k"
+msgstr ""
+
+#: config/tc-ppc.c:2027
#, c-format
msgid "syntax error: invalid toc specifier `%s'"
msgstr ""
-#: config/tc-ppc.c:1995
+#: config/tc-ppc.c:2041
#, c-format
msgid "syntax error: expected `]', found `%c'"
msgstr ""
-#: config/tc-ppc.c:2272
+#: config/tc-ppc.c:2320
msgid "[tocv] symbol is not a toc symbol"
msgstr ""
-#: config/tc-ppc.c:2283
+#: config/tc-ppc.c:2331
msgid "Unimplemented toc32 expression modifier"
msgstr ""
-#: config/tc-ppc.c:2288
+#: config/tc-ppc.c:2336
msgid "Unimplemented toc64 expression modifier"
msgstr ""
-#: config/tc-ppc.c:2292
+#: config/tc-ppc.c:2340
#, c-format
msgid "Unexpected return value [%d] from parse_toc_entry!\n"
msgstr ""
-#: config/tc-ppc.c:2510
+#: config/tc-ppc.c:2558
msgid "unsupported relocation for DS offset field"
msgstr ""
-#: config/tc-ppc.c:2554
+#: config/tc-ppc.c:2602
#, c-format
msgid "syntax error; found `%c' but expected `%c'"
msgstr ""
-#: config/tc-ppc.c:2703
+#: config/tc-ppc.c:2645 config/tc-ppc.h:111
+msgid "instruction address is not a multiple of 4"
+msgstr ""
+
+#: config/tc-ppc.c:2756
msgid "wrong number of operands"
msgstr ""
-#: config/tc-ppc.c:2759
+#: config/tc-ppc.c:2812
msgid "Bad .section directive: want a,e,w,x,M,S,G,T in string"
msgstr ""
-#: config/tc-ppc.c:2874
+#: config/tc-ppc.c:2927
msgid "missing size"
msgstr ""
-#: config/tc-ppc.c:2883
+#: config/tc-ppc.c:2936
msgid "negative size"
msgstr ""
-#: config/tc-ppc.c:2920
+#: config/tc-ppc.c:2973
msgid "missing real symbol name"
msgstr ""
-#: config/tc-ppc.c:2941
+#: config/tc-ppc.c:2994
msgid "attempt to redefine symbol"
msgstr ""
-#: config/tc-ppc.c:3188
+#: config/tc-ppc.c:3241
msgid "The XCOFF file format does not support arbitrary sections"
msgstr ""
-#: config/tc-ppc.c:3265
+#: config/tc-ppc.c:3318
msgid "missing rename string"
msgstr ""
-#: config/tc-ppc.c:3296 config/tc-ppc.c:3851 read.c:3060
+#: config/tc-ppc.c:3349 config/tc-ppc.c:3904 read.c:3064
msgid "missing value"
msgstr ""
-#: config/tc-ppc.c:3314
+#: config/tc-ppc.c:3367
msgid "illegal .stabx expression; zero assumed"
msgstr ""
-#: config/tc-ppc.c:3346
+#: config/tc-ppc.c:3399
msgid "missing class"
msgstr ""
-#: config/tc-ppc.c:3355
+#: config/tc-ppc.c:3408
msgid "missing type"
msgstr ""
-#: config/tc-ppc.c:3436
+#: config/tc-ppc.c:3489
msgid "missing symbol name"
msgstr ""
-#: config/tc-ppc.c:3630
+#: config/tc-ppc.c:3683
msgid "nested .bs blocks"
msgstr ""
-#: config/tc-ppc.c:3663
+#: config/tc-ppc.c:3716
msgid ".es without preceding .bs"
msgstr ""
-#: config/tc-ppc.c:3843
+#: config/tc-ppc.c:3896
msgid "non-constant byte count"
msgstr ""
-#: config/tc-ppc.c:3891
+#: config/tc-ppc.c:3944
msgid ".tc not in .toc section"
msgstr ""
-#: config/tc-ppc.c:3910
+#: config/tc-ppc.c:3963
msgid ".tc with no label"
msgstr ""
-#: config/tc-ppc.c:4021
+#: config/tc-ppc.c:4055
+msgid ".machine stack overflow"
+msgstr ""
+
+#: config/tc-ppc.c:4062
+msgid ".machine stack underflow"
+msgstr ""
+
+#: config/tc-ppc.c:4069
+#, c-format
+msgid "invalid machine `%s'"
+msgstr ""
+
+#: config/tc-ppc.c:4123
msgid "No previous section to return to. Directive ignored."
msgstr ""
#. Section Contents
#. unknown
-#: config/tc-ppc.c:4438
+#: config/tc-ppc.c:4540
msgid "Unsupported section attribute -- 'a'"
msgstr ""
-#: config/tc-ppc.c:4627
+#: config/tc-ppc.c:4729
msgid "bad symbol suffix"
msgstr ""
-#: config/tc-ppc.c:4720
+#: config/tc-ppc.c:4822
msgid "Unrecognized symbol suffix"
msgstr ""
-#: config/tc-ppc.c:4806
+#: config/tc-ppc.c:4912
msgid "two .function pseudo-ops with no intervening .ef"
msgstr ""
-#: config/tc-ppc.c:4819
+#: config/tc-ppc.c:4925
msgid ".ef with no preceding .function"
msgstr ""
-#: config/tc-ppc.c:4947
+#: config/tc-ppc.c:5053
#, c-format
msgid "warning: symbol %s has no csect"
msgstr ""
-#: config/tc-ppc.c:5251
+#: config/tc-ppc.c:5357
msgid "symbol in .toc does not match any .tc"
msgstr ""
-#: config/tc-ppc.c:5584 config/tc-s390.c:2072 config/tc-v850.c:2401
-#: config/tc-xstormy16.c:537
+#: config/tc-ppc.c:5686 config/tc-s390.c:2092 config/tc-v850.c:2314
+#: config/tc-xstormy16.c:538
msgid "unresolved expression that must be resolved"
msgstr ""
-#: config/tc-ppc.c:5587
+#: config/tc-ppc.c:5689
#, c-format
msgid "unsupported relocation against %s"
msgstr ""
-#: config/tc-ppc.c:5662
+#: config/tc-ppc.c:5762
#, c-format
msgid "cannot emit PC relative %s relocation against %s"
msgstr ""
-#: config/tc-ppc.c:5667
+#: config/tc-ppc.c:5767
#, c-format
msgid "cannot emit PC relative %s relocation"
msgstr ""
-#: config/tc-ppc.c:5841
+#: config/tc-ppc.c:5949
+#, c-format
+msgid "Unable to handle reference to symbol %s"
+msgstr ""
+
+#: config/tc-ppc.c:5952
+msgid "Unable to resolve expression"
+msgstr ""
+
+#: config/tc-ppc.c:5979
msgid "must branch to an address a multiple of 4"
msgstr ""
-#: config/tc-ppc.c:5845
+#: config/tc-ppc.c:5983
#, c-format
msgid "@local or @plt branch destination is too far away, %ld bytes"
msgstr ""
-#: config/tc-ppc.c:5876
+#: config/tc-ppc.c:6014
#, c-format
msgid "Gas failure, reloc value %d\n"
msgstr ""
-#: config/tc-s390.c:457
+#: config/tc-s390.c:460
+#, c-format
msgid ""
" S390 options:\n"
" -mregnames Allow symbolic names for registers\n"
@@ -7837,529 +8516,578 @@ msgid ""
" -m64 Set file format to 64 bit format\n"
msgstr ""
-#: config/tc-s390.c:464
+#: config/tc-s390.c:467
+#, c-format
msgid ""
" -V print assembler version number\n"
" -Qy, -Qn ignored\n"
msgstr ""
-#: config/tc-s390.c:500
+#: config/tc-s390.c:503
#, c-format
msgid "Internal assembler error for instruction format %s"
msgstr ""
-#: config/tc-s390.c:782
+#: config/tc-s390.c:766
#, c-format
msgid "identifier+constant@%s means identifier@%s+constant"
msgstr ""
-#: config/tc-s390.c:865
+#: config/tc-s390.c:849
msgid "Can't handle O_big in s390_exp_compare"
msgstr ""
-#: config/tc-s390.c:949
+#: config/tc-s390.c:933
msgid "Invalid suffix for literal pool entry"
msgstr ""
-#: config/tc-s390.c:1006
+#: config/tc-s390.c:990
msgid "Big number is too big"
msgstr ""
-#: config/tc-s390.c:1144 config/tc-s390.c:1722
-#, c-format
-msgid "%s relocations do not fit in %d bytes"
-msgstr ""
-
-#: config/tc-s390.c:1154
+#: config/tc-s390.c:1138
msgid "relocation not applicable"
msgstr ""
-#: config/tc-s390.c:1342
+#: config/tc-s390.c:1326
msgid "invalid operand suffix"
msgstr ""
-#: config/tc-s390.c:1365
+#: config/tc-s390.c:1349
msgid "syntax error; missing '(' after displacement"
msgstr ""
-#: config/tc-s390.c:1375 config/tc-s390.c:1408 config/tc-s390.c:1427
+#: config/tc-s390.c:1365 config/tc-s390.c:1409 config/tc-s390.c:1439
msgid "syntax error; expected ,"
msgstr ""
-#: config/tc-s390.c:1402
+#: config/tc-s390.c:1397
msgid "syntax error; missing ')' after base register"
msgstr ""
-#: config/tc-s390.c:1420
+#: config/tc-s390.c:1426
msgid "syntax error; ')' not allowed here"
msgstr ""
-#: config/tc-s390.c:1602 config/tc-s390.c:1622 config/tc-s390.c:1635
+#: config/tc-s390.c:1619 config/tc-s390.c:1642 config/tc-s390.c:1655
msgid "Invalid .insn format\n"
msgstr ""
-#: config/tc-s390.c:1610
+#: config/tc-s390.c:1627
#, c-format
msgid "Unrecognized opcode format: `%s'"
msgstr ""
-#: config/tc-s390.c:1638
+#: config/tc-s390.c:1658
msgid "second operand of .insn not a constant\n"
msgstr ""
-#: config/tc-s390.c:1641
+#: config/tc-s390.c:1661
msgid "missing comma after insn constant\n"
msgstr ""
-#: config/tc-s390.c:2075
+#: config/tc-s390.c:2095
msgid "unsupported relocation type"
msgstr ""
-#: config/tc-sh64.c:596
+#: config/tc-sh64.c:568
msgid "This operand must be constant at assembly time"
msgstr ""
-#: config/tc-sh64.c:711
+#: config/tc-sh64.c:681
msgid "Invalid operand expression"
msgstr ""
-#: config/tc-sh64.c:798 config/tc-sh64.c:904
+#: config/tc-sh64.c:773 config/tc-sh64.c:877
msgid "PTB operand is a SHmedia symbol"
msgstr ""
-#: config/tc-sh64.c:801 config/tc-sh64.c:901
+#: config/tc-sh64.c:776 config/tc-sh64.c:874
msgid "PTA operand is a SHcompact symbol"
msgstr ""
-#: config/tc-sh64.c:817
+#: config/tc-sh64.c:792
msgid "invalid expression in operand"
msgstr ""
-#: config/tc-sh64.c:1514
+#: config/tc-sh64.c:1483
#, c-format
msgid "invalid operand, not a 5-bit unsigned value: %d"
msgstr ""
-#: config/tc-sh64.c:1519
+#: config/tc-sh64.c:1488
#, c-format
msgid "invalid operand, not a 6-bit signed value: %d"
msgstr ""
-#: config/tc-sh64.c:1524
+#: config/tc-sh64.c:1493
#, c-format
msgid "invalid operand, not a 6-bit unsigned value: %d"
msgstr ""
-#: config/tc-sh64.c:1529 config/tc-sh64.c:1541
+#: config/tc-sh64.c:1498 config/tc-sh64.c:1510
#, c-format
msgid "invalid operand, not a 11-bit signed value: %d"
msgstr ""
-#: config/tc-sh64.c:1531
+#: config/tc-sh64.c:1500
#, c-format
msgid "invalid operand, not a multiple of 32: %d"
msgstr ""
-#: config/tc-sh64.c:1536
+#: config/tc-sh64.c:1505
#, c-format
msgid "invalid operand, not a 10-bit signed value: %d"
msgstr ""
-#: config/tc-sh64.c:1543
+#: config/tc-sh64.c:1512
#, c-format
msgid "invalid operand, not an even value: %d"
msgstr ""
-#: config/tc-sh64.c:1548
+#: config/tc-sh64.c:1517
#, c-format
msgid "invalid operand, not a 12-bit signed value: %d"
msgstr ""
-#: config/tc-sh64.c:1550
+#: config/tc-sh64.c:1519
#, c-format
msgid "invalid operand, not a multiple of 4: %d"
msgstr ""
-#: config/tc-sh64.c:1555
+#: config/tc-sh64.c:1524
#, c-format
msgid "invalid operand, not a 13-bit signed value: %d"
msgstr ""
-#: config/tc-sh64.c:1557
+#: config/tc-sh64.c:1526
#, c-format
msgid "invalid operand, not a multiple of 8: %d"
msgstr ""
-#: config/tc-sh64.c:1562
+#: config/tc-sh64.c:1531
#, c-format
msgid "invalid operand, not a 16-bit signed value: %d"
msgstr ""
-#: config/tc-sh64.c:1567
+#: config/tc-sh64.c:1536
#, c-format
msgid "invalid operand, not an 16-bit unsigned value: %d"
msgstr ""
-#: config/tc-sh64.c:1573
+#: config/tc-sh64.c:1542
msgid "operand out of range for PT, PTA and PTB"
msgstr ""
-#: config/tc-sh64.c:1575
+#: config/tc-sh64.c:1544
#, c-format
msgid "operand not a multiple of 4 for PT, PTA or PTB: %d"
msgstr ""
-#: config/tc-sh64.c:2103
+#: config/tc-sh64.c:2064
#, c-format
msgid "MOVI operand is not a 32-bit signed value: 0x%8x%08x"
msgstr ""
-#: config/tc-sh64.c:2466 config/tc-sh64.c:2631 config/tc-sh64.c:2646
+#: config/tc-sh64.c:2421 config/tc-sh64.c:2584 config/tc-sh64.c:2599
msgid "invalid PIC reference"
msgstr ""
-#: config/tc-sh64.c:2524
+#: config/tc-sh64.c:2478
msgid "can't find opcode"
msgstr ""
-#: config/tc-sh64.c:2854
+#: config/tc-sh64.c:2681 config/tc-sh64.c:2721
+msgid "invalid operand: expression in PT target"
+msgstr ""
+
+#: config/tc-sh64.c:2812
#, c-format
msgid "invalid operands to %s"
msgstr ""
-#: config/tc-sh64.c:2860
+#: config/tc-sh64.c:2818
#, c-format
msgid "excess operands to %s"
msgstr ""
-#: config/tc-sh64.c:2906
+#: config/tc-sh64.c:2863
#, c-format
msgid "The `.mode %s' directive is not valid with this architecture"
msgstr ""
-#: config/tc-sh64.c:2914
+#: config/tc-sh64.c:2871
#, c-format
msgid "Invalid argument to .mode: %s"
msgstr ""
-#: config/tc-sh64.c:2945
+#: config/tc-sh64.c:2901
#, c-format
msgid "The `.abi %s' directive is not valid with this architecture"
msgstr ""
-#: config/tc-sh64.c:2951
+#: config/tc-sh64.c:2907
msgid "`.abi 64' but command-line options do not specify 64-bit ABI"
msgstr ""
-#: config/tc-sh64.c:2956
+#: config/tc-sh64.c:2912
msgid "`.abi 32' but command-line options do not specify 32-bit ABI"
msgstr ""
-#: config/tc-sh64.c:2959
+#: config/tc-sh64.c:2915
#, c-format
msgid "Invalid argument to .abi: %s"
msgstr ""
-#: config/tc-sh64.c:3014
+#: config/tc-sh64.c:2970
msgid "-no-mix is invalid without specifying SHcompact or SHmedia"
msgstr ""
-#: config/tc-sh64.c:3019
+#: config/tc-sh64.c:2975
msgid "-shcompact-const-crange is invalid without SHcompact"
msgstr ""
-#: config/tc-sh64.c:3022
+#: config/tc-sh64.c:2978
msgid "-expand-pt32 only valid with -abi=64"
msgstr ""
-#: config/tc-sh64.c:3025
+#: config/tc-sh64.c:2981
msgid "-no-expand only valid with SHcompact or SHmedia"
msgstr ""
-#: config/tc-sh64.c:3028
+#: config/tc-sh64.c:2984
msgid "-expand-pt32 invalid together with -no-expand"
msgstr ""
-#: config/tc-sh64.c:3250
+#: config/tc-sh64.c:3201
msgid ""
"SHmedia code not allowed in same section as constants and SHcompact code"
msgstr ""
-#: config/tc-sh64.c:3268
+#: config/tc-sh64.c:3219
msgid "No segment info for current section"
msgstr ""
-#: config/tc-sh64.c:3310
+#: config/tc-sh64.c:3258
msgid "duplicate datalabel operator ignored"
msgstr ""
-#: config/tc-sh64.c:3380
+#: config/tc-sh64.c:3328
msgid "Invalid DataLabel expression"
msgstr ""
-#: config/tc-sh.c:91
+#: config/tc-sh.c:65
msgid "directive .big encountered when option -big required"
msgstr ""
-#: config/tc-sh.c:102
+#: config/tc-sh.c:75
msgid "directive .little encountered when option -little required"
msgstr ""
-#: config/tc-sh.c:776
-msgid "Invalid PIC expression."
+#: config/tc-sh.c:1277
+msgid "misplaced PIC operand"
msgstr ""
-#: config/tc-sh.c:1269
-msgid "misplaced PIC operand"
+#: config/tc-sh.c:1315
+msgid "illegal double indirection"
msgstr ""
-#: config/tc-sh.c:1310
+#: config/tc-sh.c:1324
msgid "illegal register after @-"
msgstr ""
-#: config/tc-sh.c:1326
+#: config/tc-sh.c:1340
msgid "must be @(r0,...)"
msgstr ""
-#: config/tc-sh.c:1350
+#: config/tc-sh.c:1364
msgid "syntax error in @(r0,...)"
msgstr ""
-#: config/tc-sh.c:1355
+#: config/tc-sh.c:1369
msgid "syntax error in @(r0...)"
msgstr ""
-#: config/tc-sh.c:1396
+#: config/tc-sh.c:1414
msgid "Deprecated syntax."
msgstr ""
-#: config/tc-sh.c:1408 config/tc-sh.c:1413
+#: config/tc-sh.c:1426 config/tc-sh.c:1431
msgid "syntax error in @(disp,[Rn, gbr, pc])"
msgstr ""
-#: config/tc-sh.c:1418
+#: config/tc-sh.c:1436
msgid "expecting )"
msgstr ""
-#: config/tc-sh.c:1426
+#: config/tc-sh.c:1444
msgid "illegal register after @"
msgstr ""
-#: config/tc-sh.c:1977
+#: config/tc-sh.c:2115
+#, c-format
+msgid "unhandled %d\n"
+msgstr ""
+
+#: config/tc-sh.c:2281
#, c-format
msgid "Invalid register: 'r%d'"
msgstr ""
-#: config/tc-sh.c:2143
+#: config/tc-sh.c:2385
+#, c-format
+msgid "failed for %d\n"
+msgstr ""
+
+#: config/tc-sh.c:2498 config/tc-sh.c:2894
+msgid "invalid operands for opcode"
+msgstr ""
+
+#: config/tc-sh.c:2503
msgid "insn can't be combined with parallel processing insn"
msgstr ""
-#: config/tc-sh.c:2150 config/tc-sh.c:2161
+#: config/tc-sh.c:2510 config/tc-sh.c:2521 config/tc-sh.c:2553
msgid "multiple movx specifications"
msgstr ""
-#: config/tc-sh.c:2155 config/tc-sh.c:2182
+#: config/tc-sh.c:2515 config/tc-sh.c:2537 config/tc-sh.c:2576
msgid "multiple movy specifications"
msgstr ""
-#: config/tc-sh.c:2163
+#: config/tc-sh.c:2524 config/tc-sh.c:2557
msgid "invalid movx address register"
msgstr ""
-#: config/tc-sh.c:2169 config/tc-sh.c:2174
+#: config/tc-sh.c:2526
+msgid "insn cannot be combined with non-nopy"
+msgstr ""
+
+#: config/tc-sh.c:2540 config/tc-sh.c:2596
+msgid "invalid movy address register"
+msgstr ""
+
+#: config/tc-sh.c:2542
+msgid "insn cannot be combined with non-nopx"
+msgstr ""
+
+#: config/tc-sh.c:2555
+msgid "previous movy requires nopx"
+msgstr ""
+
+#: config/tc-sh.c:2563 config/tc-sh.c:2568
msgid "invalid movx dsp register"
msgstr ""
-#: config/tc-sh.c:2191 config/tc-sh.c:2196
-msgid "invalid movy dsp register"
+#: config/tc-sh.c:2578
+msgid "previous movx requires nopy"
msgstr ""
-#: config/tc-sh.c:2200
-msgid "invalid movy address register"
+#: config/tc-sh.c:2587 config/tc-sh.c:2592
+msgid "invalid movy dsp register"
msgstr ""
-#: config/tc-sh.c:2206
+#: config/tc-sh.c:2602
msgid "dsp immediate shift value not constant"
msgstr ""
-#: config/tc-sh.c:2213 config/tc-sh.c:2226
+#: config/tc-sh.c:2616 config/tc-sh.c:2642
msgid "multiple parallel processing specifications"
msgstr ""
-#: config/tc-sh.c:2219
+#: config/tc-sh.c:2635
msgid "multiple condition specifications"
msgstr ""
-#: config/tc-sh.c:2235
+#: config/tc-sh.c:2673
msgid "insn cannot be combined with pmuls"
msgstr ""
-#: config/tc-sh.c:2252
-msgid "bad padd / psub pmuls output operand"
+#: config/tc-sh.c:2689
+msgid "bad combined pmuls output operand"
msgstr ""
-#: config/tc-sh.c:2262
+#: config/tc-sh.c:2699
msgid "destination register is same for parallel insns"
msgstr ""
-#: config/tc-sh.c:2271
+#: config/tc-sh.c:2708
msgid "condition not followed by conditionalizable insn"
msgstr ""
-#: config/tc-sh.c:2281
+#: config/tc-sh.c:2718
msgid "unrecognized characters at end of parallel processing insn"
msgstr ""
-#: config/tc-sh.c:2417
+#: config/tc-sh.c:2834
+msgid "opcode not valid for this cpu variant"
+msgstr ""
+
+#: config/tc-sh.c:2867
+msgid "Delayed branches not available on SH1"
+msgstr ""
+
+#: config/tc-sh.c:2899
#, c-format
msgid "excess operands: '%s'"
msgstr ""
-#: config/tc-sh.c:2569
+#: config/tc-sh.c:3026
msgid ".uses pseudo-op seen when not relaxing"
msgstr ""
-#: config/tc-sh.c:2575
+#: config/tc-sh.c:3032
msgid "bad .uses format"
msgstr ""
-#: config/tc-sh.c:2654
+#: config/tc-sh.c:3130
msgid "Invalid combination: --isa=SHcompact with --isa=SHmedia"
msgstr ""
-#: config/tc-sh.c:2660
+#: config/tc-sh.c:3136
msgid "Invalid combination: --isa=SHmedia with --isa=SHcompact"
msgstr ""
-#: config/tc-sh.c:2662
+#: config/tc-sh.c:3138
msgid "Invalid combination: --abi=64 with --isa=SHcompact"
msgstr ""
-#: config/tc-sh.c:2675
+#: config/tc-sh.c:3179
msgid "Invalid combination: --abi=32 with --abi=64"
msgstr ""
-#: config/tc-sh.c:2681
+#: config/tc-sh.c:3185
msgid "Invalid combination: --abi=64 with --abi=32"
msgstr ""
-#: config/tc-sh.c:2683
+#: config/tc-sh.c:3187
msgid "Invalid combination: --isa=SHcompact with --abi=64"
msgstr ""
-#: config/tc-sh.c:2718
+#: config/tc-sh.c:3221
+#, c-format
msgid ""
"SH options:\n"
-"-little\t\t\tgenerate little endian code\n"
-"-big\t\t\tgenerate big endian code\n"
-"-relax\t\t\talter jump instructions for long displacements\n"
-"-small\t\t\talign sections to 4 byte boundaries, not 16\n"
-"-dsp\t\t\tenable sh-dsp insns, and disable sh2e/sh3e/sh4 insns.\n"
+"--little\t\tgenerate little endian code\n"
+"--big\t\t\tgenerate big endian code\n"
+"--relax\t\t\talter jump instructions for long displacements\n"
+"--renesas\t\tdisable optimization with section symbol for\n"
+"\t\t\tcompatibility with Renesas assembler.\n"
+"--small\t\t\talign sections to 4 byte boundaries, not 16\n"
+"--dsp\t\t\tenable sh-dsp insns, and disable floating-point ISAs.\n"
+"--allow-reg-prefix\tallow '$' as a register name prefix.\n"
+"--isa=[any\t\tuse most appropriate isa\n"
+" | dsp same as '-dsp'\n"
+" | fp"
+msgstr ""
+
+#: config/tc-sh.c:3247
+#, c-format
+msgid ""
+"--isa=[shmedia\t\tset as the default instruction set for SH64\n"
+" | SHmedia\n"
+" | shcompact\n"
+" | SHcompact]\n"
msgstr ""
-#: config/tc-sh.c:2726
+#: config/tc-sh.c:3252
+#, c-format
msgid ""
-"-isa=[shmedia\t\tset default instruction set for SH64\n"
-" | SHmedia\n"
-" | shcompact\n"
-" | SHcompact]\n"
-"-abi=[32|64]\t\tset size of expanded SHmedia operands and object\n"
+"--abi=[32|64]\t\tset size of expanded SHmedia operands and object\n"
"\t\t\tfile type\n"
-"-shcompact-const-crange\temit code-range descriptors for constants in\n"
+"--shcompact-const-crange emit code-range descriptors for constants in\n"
"\t\t\tSHcompact code sections\n"
-"-no-mix\t\t\tdisallow SHmedia code in the same section as\n"
+"--no-mix\t\tdisallow SHmedia code in the same section as\n"
"\t\t\tconstants and SHcompact code\n"
-"-no-expand\t\tdo not expand MOVI, PT, PTA or PTB instructions\n"
-"-expand-pt32\t\twith -abi=64, expand PT, PTA and PTB instructions\n"
-"\t\t\tto 32 bits only"
+"--no-expand\t\tdo not expand MOVI, PT, PTA or PTB instructions\n"
+"--expand-pt32\t\twith -abi=64, expand PT, PTA and PTB instructions\n"
+"\t\t\tto 32 bits only\n"
msgstr ""
-#: config/tc-sh.c:2823
+#: config/tc-sh.c:3336
msgid ".uses does not refer to a local symbol in the same section"
msgstr ""
-#: config/tc-sh.c:2842
+#: config/tc-sh.c:3355
msgid "can't find fixup pointed to by .uses"
msgstr ""
-#: config/tc-sh.c:2865
+#: config/tc-sh.c:3375
msgid ".uses target does not refer to a local symbol in the same section"
msgstr ""
-#: config/tc-sh.c:2967
+#: config/tc-sh.c:3452
msgid "displacement overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:2970
+#: config/tc-sh.c:3455
#, c-format
msgid "displacement to defined symbol %s overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:2974
+#: config/tc-sh.c:3459
#, c-format
msgid "displacement to undefined symbol %s overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:3052
+#: config/tc-sh.c:3532
msgid "displacement overflows 8-bit field"
msgstr ""
-#: config/tc-sh.c:3055
+#: config/tc-sh.c:3535
#, c-format
msgid "displacement to defined symbol %s overflows 8-bit field"
msgstr ""
-#: config/tc-sh.c:3059
+#: config/tc-sh.c:3539
#, c-format
msgid "displacement to undefined symbol %s overflows 8-bit field "
msgstr ""
-#: config/tc-sh.c:3076
+#: config/tc-sh.c:3556
#, c-format
msgid "overflow in branch to %s; converted into longer instruction sequence"
msgstr ""
-#: config/tc-sh.c:3151 config/tc-sh.c:3199 config/tc-sparc.c:4192
-#: config/tc-sparc.c:4217
+#: config/tc-sh.c:3622 config/tc-sh.c:3669 config/tc-sparc.c:4234
+#: config/tc-sparc.c:4259
msgid "misaligned data"
msgstr ""
-#: config/tc-sh.c:3585
+#: config/tc-sh.c:4076
msgid "misaligned offset"
msgstr ""
-#: config/tc-sparc.c:287
+#: config/tc-sparc.c:288
msgid "Invalid default architecture, broken assembler."
msgstr ""
-#: config/tc-sparc.c:291 config/tc-sparc.c:494
+#: config/tc-sparc.c:292 config/tc-sparc.c:495
msgid "Bad opcode table, broken assembler."
msgstr ""
-#: config/tc-sparc.c:486
+#: config/tc-sparc.c:487
#, c-format
msgid "invalid architecture -xarch=%s"
msgstr ""
-#: config/tc-sparc.c:488
+#: config/tc-sparc.c:489
#, c-format
msgid "invalid architecture -A%s"
msgstr ""
-#: config/tc-sparc.c:555
+#: config/tc-sparc.c:556
#, c-format
msgid "No compiled in support for %d bit object file format"
msgstr ""
-#: config/tc-sparc.c:592
-msgid "Unrecognized option following -K"
-msgstr ""
-
-#: config/tc-sparc.c:633
+#: config/tc-sparc.c:634
+#, c-format
msgid "SPARC options:\n"
msgstr ""
-#: config/tc-sparc.c:662
+#: config/tc-sparc.c:663
+#, c-format
msgid ""
"\n"
"\t\t\tspecify variant of SPARC architecture\n"
@@ -8370,34 +9098,38 @@ msgid ""
"-no-relax\t\tavoid changing any jumps and branches\n"
msgstr ""
-#: config/tc-sparc.c:670
+#: config/tc-sparc.c:671
+#, c-format
msgid "-k\t\t\tgenerate PIC\n"
msgstr ""
-#: config/tc-sparc.c:674
+#: config/tc-sparc.c:675
+#, 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:677
+#: config/tc-sparc.c:678
#, c-format
msgid "\t\t\t[default is %d]\n"
msgstr ""
-#: config/tc-sparc.c:679
+#: config/tc-sparc.c:680
+#, c-format
msgid ""
"-TSO\t\t\tuse Total Store Ordering\n"
"-PSO\t\t\tuse Partial Store Ordering\n"
"-RMO\t\t\tuse Relaxed Memory Ordering\n"
msgstr ""
-#: config/tc-sparc.c:683
+#: config/tc-sparc.c:684
#, c-format
msgid "\t\t\t[default is %s]\n"
msgstr ""
-#: config/tc-sparc.c:685
+#: config/tc-sparc.c:686
+#, c-format
msgid ""
"-KPIC\t\t\tgenerate PIC\n"
"-V\t\t\tprint assembler version number\n"
@@ -8410,7 +9142,8 @@ msgid ""
"-s\t\t\tignored\n"
msgstr ""
-#: config/tc-sparc.c:697
+#: config/tc-sparc.c:698
+#, c-format
msgid ""
"-EL\t\t\tgenerate code for a little endian machine\n"
"-EB\t\t\tgenerate code for a big endian machine\n"
@@ -8418,1407 +9151,1173 @@ msgid ""
" instructions and little endian data.\n"
msgstr ""
-#: config/tc-sparc.c:817
+#: config/tc-sparc.c:819
#, c-format
msgid "Internal error: losing opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-sparc.c:836
+#: config/tc-sparc.c:838
#, c-format
msgid "Internal error: can't find opcode `%s' for `%s'\n"
msgstr ""
-#: config/tc-sparc.c:982
+#: config/tc-sparc.c:984
msgid "Support for 64-bit arithmetic not compiled in."
msgstr ""
-#: config/tc-sparc.c:1029
+#: config/tc-sparc.c:1031
msgid "set: number not in 0..4294967295 range"
msgstr ""
-#: config/tc-sparc.c:1036
+#: config/tc-sparc.c:1038
msgid "set: number not in -2147483648..4294967295 range"
msgstr ""
-#: config/tc-sparc.c:1096
+#: config/tc-sparc.c:1098
msgid "setsw: number not in -2147483648..4294967295 range"
msgstr ""
-#: config/tc-sparc.c:1145
+#: config/tc-sparc.c:1147
msgid "setx: temporary register same as destination register"
msgstr ""
-#: config/tc-sparc.c:1216
+#: config/tc-sparc.c:1218
msgid "setx: illegal temporary register g0"
msgstr ""
-#: config/tc-sparc.c:1313
+#: config/tc-sparc.c:1316
msgid "FP branch in delay slot"
msgstr ""
-#: config/tc-sparc.c:1329
+#: config/tc-sparc.c:1331
msgid "FP branch preceded by FP instruction; NOP inserted"
msgstr ""
-#: config/tc-sparc.c:1369
+#: config/tc-sparc.c:1371
msgid "failed special case insn sanity check"
msgstr ""
-#: config/tc-sparc.c:1457
+#: config/tc-sparc.c:1461
msgid ": invalid membar mask name"
msgstr ""
-#: config/tc-sparc.c:1473
+#: config/tc-sparc.c:1477
msgid ": invalid membar mask expression"
msgstr ""
-#: config/tc-sparc.c:1478
+#: config/tc-sparc.c:1482
msgid ": invalid membar mask number"
msgstr ""
-#: config/tc-sparc.c:1493
+#: config/tc-sparc.c:1497
msgid ": invalid siam mode expression"
msgstr ""
-#: config/tc-sparc.c:1498
+#: config/tc-sparc.c:1502
msgid ": invalid siam mode number"
msgstr ""
-#: config/tc-sparc.c:1514
+#: config/tc-sparc.c:1518
msgid ": invalid prefetch function name"
msgstr ""
-#: config/tc-sparc.c:1522
+#: config/tc-sparc.c:1526
msgid ": invalid prefetch function expression"
msgstr ""
-#: config/tc-sparc.c:1527
+#: config/tc-sparc.c:1531
msgid ": invalid prefetch function number"
msgstr ""
-#: config/tc-sparc.c:1555 config/tc-sparc.c:1567
+#: config/tc-sparc.c:1559 config/tc-sparc.c:1571
msgid ": unrecognizable privileged register"
msgstr ""
-#: config/tc-sparc.c:1591 config/tc-sparc.c:1616
+#: config/tc-sparc.c:1595 config/tc-sparc.c:1620
msgid ": unrecognizable v9a or v9b ancillary state register"
msgstr ""
-#: config/tc-sparc.c:1596
+#: config/tc-sparc.c:1600
msgid ": rd on write only ancillary state register"
msgstr ""
#. %sys_tick and %sys_tick_cmpr are v9bnotv9a
-#: config/tc-sparc.c:1604
+#: config/tc-sparc.c:1608
msgid ": unrecognizable v9a ancillary state register"
msgstr ""
-#: config/tc-sparc.c:1640
+#: config/tc-sparc.c:1644
msgid ": asr number must be between 16 and 31"
msgstr ""
-#: config/tc-sparc.c:1648
+#: config/tc-sparc.c:1652
msgid ": asr number must be between 0 and 31"
msgstr ""
-#: config/tc-sparc.c:1658
+#: config/tc-sparc.c:1662
+#, c-format
msgid ": expecting %asrN"
msgstr ""
-#: config/tc-sparc.c:1840 config/tc-sparc.c:1878 config/tc-sparc.c:2279
-#: config/tc-sparc.c:2315
+#: config/tc-sparc.c:1844 config/tc-sparc.c:1882 config/tc-sparc.c:2289
+#: config/tc-sparc.c:2325
#, c-format
msgid "Illegal operands: %%%s requires arguments in ()"
msgstr ""
-#: config/tc-sparc.c:1846
+#: config/tc-sparc.c:1850
#, c-format
msgid ""
"Illegal operands: %%%s cannot be used together with other relocs in the insn "
"()"
msgstr ""
-#: config/tc-sparc.c:1857
+#: config/tc-sparc.c:1861
#, c-format
msgid "Illegal operands: %%%s can be only used with call __tls_get_addr"
msgstr ""
-#: config/tc-sparc.c:2064
+#: config/tc-sparc.c:2068
msgid "detected global register use not covered by .register pseudo-op"
msgstr ""
-#: config/tc-sparc.c:2135
+#: config/tc-sparc.c:2139
msgid ": There are only 64 f registers; [0-63]"
msgstr ""
-#: config/tc-sparc.c:2137 config/tc-sparc.c:2149
+#: config/tc-sparc.c:2141 config/tc-sparc.c:2159
msgid ": There are only 32 f registers; [0-31]"
msgstr ""
-#: config/tc-sparc.c:2327
+#: config/tc-sparc.c:2151
+msgid ": There are only 32 single precision f registers; [0-31]"
+msgstr ""
+
+#: config/tc-sparc.c:2337
#, c-format
msgid ""
"Illegal operands: Can't do arithmetics other than + and - involving %%%s()"
msgstr ""
-#: config/tc-sparc.c:2437
+#: config/tc-sparc.c:2447
#, c-format
msgid "Illegal operands: Can't add non-constant expression to %%%s()"
msgstr ""
-#: config/tc-sparc.c:2447
+#: config/tc-sparc.c:2457
#, c-format
msgid ""
"Illegal operands: Can't do arithmetics involving %%%s() of a relocatable "
"symbol"
msgstr ""
-#: config/tc-sparc.c:2465
+#: config/tc-sparc.c:2475
msgid ": PC-relative operand can't be a constant"
msgstr ""
-#: config/tc-sparc.c:2472
+#: config/tc-sparc.c:2482
msgid ": TLS operand can't be a constant"
msgstr ""
-#: config/tc-sparc.c:2505
+#: config/tc-sparc.c:2515
msgid ": invalid ASI name"
msgstr ""
-#: config/tc-sparc.c:2513
+#: config/tc-sparc.c:2523
msgid ": invalid ASI expression"
msgstr ""
-#: config/tc-sparc.c:2518
+#: config/tc-sparc.c:2528
msgid ": invalid ASI number"
msgstr ""
-#: config/tc-sparc.c:2615
+#: config/tc-sparc.c:2625
msgid "OPF immediate operand out of range (0-0x1ff)"
msgstr ""
-#: config/tc-sparc.c:2620
+#: config/tc-sparc.c:2630
msgid "non-immediate OPF operand, ignored"
msgstr ""
-#: config/tc-sparc.c:2639
+#: config/tc-sparc.c:2649
msgid ": invalid cpreg name"
msgstr ""
-#: config/tc-sparc.c:2668
+#: config/tc-sparc.c:2678
#, c-format
msgid "Illegal operands%s"
msgstr ""
-#: config/tc-sparc.c:2702
+#: config/tc-sparc.c:2712
#, c-format
msgid "architecture bumped from \"%s\" to \"%s\" on \"%s\""
msgstr ""
-#: config/tc-sparc.c:2738
+#: config/tc-sparc.c:2748
#, c-format
msgid "Architecture mismatch on \"%s\"."
msgstr ""
-#: config/tc-sparc.c:2739
+#: config/tc-sparc.c:2749
#, c-format
msgid " (Requires %s; requested architecture is %s.)"
msgstr ""
-#: config/tc-sparc.c:3325
+#: config/tc-sparc.c:3369
#, c-format
msgid "bad or unhandled relocation type: 0x%02x"
msgstr ""
-#: config/tc-sparc.c:3480
-#, c-format
-msgid "internal error: can't export reloc type %d (`%s')"
+#: config/tc-sparc.c:3679
+msgid "Expected comma after name"
msgstr ""
-#: config/tc-sparc.c:3644
+#: config/tc-sparc.c:3688
#, c-format
msgid "BSS length (%d.) <0! Ignored."
msgstr ""
-#: config/tc-sparc.c:3656
+#: config/tc-sparc.c:3700
msgid "bad .reserve segment -- expected BSS segment"
msgstr ""
-#: config/tc-sparc.c:3673 read.c:2048
+#: config/tc-sparc.c:3717
msgid "missing alignment"
msgstr ""
-#: config/tc-sparc.c:3684 config/tc-sparc.c:3835
+#: config/tc-sparc.c:3728
#, c-format
msgid "alignment too large; assuming %d"
msgstr ""
-#: config/tc-sparc.c:3690 config/tc-sparc.c:3841
+#: config/tc-sparc.c:3734 config/tc-sparc.c:3885
msgid "negative alignment"
msgstr ""
-#: config/tc-sparc.c:3700 config/tc-sparc.c:3864 read.c:1251 read.c:2064
+#: config/tc-sparc.c:3744 config/tc-sparc.c:3908 read.c:1313 read.c:2143
msgid "alignment not a power of 2"
msgstr ""
-#: config/tc-sparc.c:3778 config/tc-v850.c:233
+#: config/tc-sparc.c:3822 config/tc-v850.c:223
msgid "Expected comma after symbol-name"
msgstr ""
-#: config/tc-sparc.c:3788 read.c:1392
+#: config/tc-sparc.c:3832
#, c-format
msgid ".COMMon length (%lu) out of range ignored"
msgstr ""
-#: config/tc-sparc.c:3807 config/tc-v850.c:266
+#: config/tc-sparc.c:3865
+msgid "Expected comma after common length"
+msgstr ""
+
+#: config/tc-sparc.c:3879
#, c-format
-msgid "Length of .comm \"%s\" is already %ld. Not changed to %d."
+msgid "alignment too large; assuming %ld"
msgstr ""
-#: config/tc-sparc.c:3821
-msgid "Expected comma after common length"
+#: config/tc-sparc.c:4025
+msgid "Unknown segment type"
msgstr ""
-#: config/tc-sparc.c:4062 config/tc-sparc.c:4072
+#: config/tc-sparc.c:4104 config/tc-sparc.c:4114
#, c-format
msgid "register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}"
msgstr ""
-#: config/tc-sparc.c:4090
+#: config/tc-sparc.c:4132
msgid "redefinition of global register"
msgstr ""
-#: config/tc-sparc.c:4101
+#: config/tc-sparc.c:4143
#, c-format
msgid "Register symbol %s already defined."
msgstr ""
-#: config/tc-sparc.c:4310
+#: config/tc-sparc.c:4352
#, c-format
msgid "Illegal operands: %%r_plt in %d-byte data field"
msgstr ""
-#: config/tc-sparc.c:4320
+#: config/tc-sparc.c:4362
#, c-format
msgid "Illegal operands: %%r_tls_dtpoff in %d-byte data field"
msgstr ""
-#: config/tc-sparc.c:4357
+#: config/tc-sparc.c:4399
#, c-format
msgid "Illegal operands: Only %%r_%s%d allowed in %d-byte data fields"
msgstr ""
-#: config/tc-sparc.c:4365 config/tc-sparc.c:4396 config/tc-sparc.c:4405
+#: config/tc-sparc.c:4407 config/tc-sparc.c:4438 config/tc-sparc.c:4447
#, c-format
msgid "Illegal operands: %%r_%s%d requires arguments in ()"
msgstr ""
-#: config/tc-sparc.c:4414
+#: config/tc-sparc.c:4456
#, c-format
msgid "Illegal operands: garbage after %%r_%s%d()"
msgstr ""
-#: config/tc-sparc.h:55
+#: config/tc-sparc.h:46
msgid "sparc convert_frag\n"
msgstr ""
-#: config/tc-sparc.h:57
+#: config/tc-sparc.h:48
msgid "estimate_size_before_relax called"
msgstr ""
-#: config/tc-tahoe.c:403
-msgid "The -a option doesn't exist. (Despite what the man page says!"
-msgstr ""
-
-#: config/tc-tahoe.c:407 config/tc-vax.c:3285
-#, c-format
-msgid "Displacement length %s ignored!"
-msgstr ""
-
-#: config/tc-tahoe.c:411 config/tc-vax.c:3277
-msgid "SYMBOL TABLE not implemented"
-msgstr ""
-
-#: config/tc-tahoe.c:415 config/tc-vax.c:3281
-msgid "TOKEN TRACE not implemented"
-msgstr ""
-
-#: config/tc-tahoe.c:419 config/tc-vax.c:3289
-#, c-format
-msgid "I don't need or use temp. file \"%s\"."
-msgstr ""
-
-#: config/tc-tahoe.c:423 config/tc-vax.c:3293
-msgid "I don't use an interpass file! -V ignored"
-msgstr ""
-
-#: config/tc-tahoe.c:437
-msgid ""
-"Tahoe options:\n"
-"-a\t\t\tignored\n"
-"-d LENGTH\t\tignored\n"
-"-J\t\t\tignored\n"
-"-S\t\t\tignored\n"
-"-t FILE\t\t\tignored\n"
-"-T\t\t\tignored\n"
-"-V\t\t\tignored\n"
-msgstr ""
-
-#: config/tc-tahoe.c:1066
-msgid "Casting a branch displacement is bad form, and is ignored."
-msgstr ""
-
-#: config/tc-tahoe.c:1122
-msgid "Couldn't parse the [index] in this operand."
-msgstr ""
-
-#: config/tc-tahoe.c:1128
-msgid "Couldn't find the opening '[' for the index of this operand."
-msgstr ""
-
-#: config/tc-tahoe.c:1168
-msgid "Couldn't find the opening '(' for the deref of this operand."
-msgstr ""
-
-#: config/tc-tahoe.c:1178
-msgid "Operand can't be both pre-inc and post-dec."
-msgstr ""
-
-#: config/tc-tahoe.c:1208
-msgid "I parsed 2 registers in this operand."
-msgstr ""
-
-#: config/tc-tahoe.c:1258
-msgid "Can't relocate expression error."
-msgstr ""
-
-#. This is an error. Tahoe doesn't allow any expressions
-#. bigger that a 32 bit long word. Any bigger has to be referenced
-#. by address.
-#: config/tc-tahoe.c:1265
-msgid "Expression is too large for a 32 bits."
-msgstr ""
-
-#: config/tc-tahoe.c:1270
-msgid "Junk at end of expression."
-msgstr ""
-
-#: config/tc-tahoe.c:1309
-msgid "Syntax error in direct register mode."
-msgstr ""
-
-#: config/tc-tahoe.c:1311
-msgid "You can't index a register in direct register mode."
-msgstr ""
-
-#: config/tc-tahoe.c:1314
-msgid "SP can't be the source operand with direct register addressing."
-msgstr ""
-
-#: config/tc-tahoe.c:1316
-msgid "Can't take the address of a register."
-msgstr ""
-
-#: config/tc-tahoe.c:1318
-msgid "Direct Register can't be used in a branch."
-msgstr ""
-
-#: config/tc-tahoe.c:1320
-msgid "For quad access, the register must be even and < 14."
-msgstr ""
-
-#: config/tc-tahoe.c:1322
-msgid "You can't cast a direct register."
-msgstr ""
-
-#: config/tc-tahoe.c:1328
-msgid "Using reg 14 for quadwords can tromp the FP register."
-msgstr ""
-
-#: config/tc-tahoe.c:1340
-msgid "Syntax error in auto-dec mode."
-msgstr ""
-
-#: config/tc-tahoe.c:1342
-msgid "You can't have an index auto dec mode."
-msgstr ""
-
-#: config/tc-tahoe.c:1344
-msgid "Auto dec mode cant be used for reading."
-msgstr ""
-
-#: config/tc-tahoe.c:1346
-msgid "Auto dec only works of the SP register."
-msgstr ""
-
-#: config/tc-tahoe.c:1348
-msgid "Auto dec can't be used in a branch."
-msgstr ""
-
-#: config/tc-tahoe.c:1350
-msgid "Auto dec won't work with quadwords."
-msgstr ""
-
-#: config/tc-tahoe.c:1357
-msgid "Syntax error in one of the auto-inc modes."
-msgstr ""
-
-#: config/tc-tahoe.c:1363
-msgid "Auto inc deferred only works of the SP register."
-msgstr ""
-
-#: config/tc-tahoe.c:1365
-msgid "You can't have an index auto inc deferred mode."
-msgstr ""
-
-#: config/tc-tahoe.c:1367 config/tc-tahoe.c:1378
-msgid "Auto inc can't be used in a branch."
-msgstr ""
-
-#: config/tc-tahoe.c:1374
-msgid "You can't write to an auto inc register."
-msgstr ""
-
-#: config/tc-tahoe.c:1376
-msgid "Auto inc only works of the SP register."
-msgstr ""
-
-#: config/tc-tahoe.c:1380
-msgid "Auto inc won't work with quadwords."
-msgstr ""
-
-#: config/tc-tahoe.c:1382
-msgid "You can't have an index in auto inc mode."
-msgstr ""
-
-#: config/tc-tahoe.c:1390
-msgid "You can't index the sp register."
-msgstr ""
-
-#: config/tc-tahoe.c:1396
-msgid "Syntax error in register displaced mode."
-msgstr ""
-
-#: config/tc-tahoe.c:1415
-msgid "An offest is needed for this operand."
-msgstr ""
-
-#: config/tc-tahoe.c:1427
-msgid "You can't index a register in immediate mode."
-msgstr ""
-
-#: config/tc-tahoe.c:1429
-msgid "Immediate access can't be used as an address."
-msgstr ""
-
-#: config/tc-tahoe.c:1540
-#, c-format
-msgid "Compiler bug: ODD number of bytes in arg structure %s."
-msgstr ""
-
-#: config/tc-tahoe.c:1567 config/tc-vax.c:1962
-msgid "Not enough operands"
-msgstr ""
-
-#: config/tc-tahoe.c:1577 config/tc-vax.c:1969
-msgid "Too many operands"
-msgstr ""
-
-#: config/tc-tahoe.c:1628 config/tc-vax.c:403
-#, c-format
-msgid "Ignoring statement due to \"%s\""
-msgstr ""
-
-#: config/tc-tahoe.c:1723
-#, c-format
-msgid "Compliler bug: Got a case (%d) I wasn't expecting."
-msgstr ""
-
-#: config/tc-tahoe.c:1817
-msgid "Real branch displacements must be expressions."
-msgstr ""
-
-#: config/tc-tahoe.c:1820
-#, c-format
-msgid "Complier error: I got an unknown synthetic branch :%c"
-msgstr ""
-
-#: config/tc-tahoe.c:1961
-#, c-format
-msgid "Barf, bad mode %x\n"
-msgstr ""
-
#. Only word (et al.), align, or conditionals are allowed within
#. .struct/.union.
-#: config/tc-tic54x.c:224
+#: config/tc-tic54x.c:222
msgid "pseudo-op illegal within .struct/.union"
msgstr ""
-#: config/tc-tic54x.c:349
+#: config/tc-tic54x.c:347
+#, c-format
msgid "C54x-specific command line options:\n"
msgstr ""
-#: config/tc-tic54x.c:350
+#: config/tc-tic54x.c:348
+#, c-format
msgid "-mfar-mode | -mf Use extended addressing\n"
msgstr ""
-#: config/tc-tic54x.c:351
+#: config/tc-tic54x.c:349
+#, c-format
msgid "-mcpu=<CPU version> Specify the CPU version\n"
msgstr ""
-#: config/tc-tic54x.c:353
-msgid "-mcoff-version={0|1|2} Select COFF version\n"
-msgstr ""
-
-#: config/tc-tic54x.c:355
+#: config/tc-tic54x.c:350
+#, c-format
msgid "-merrors-to-file <filename>\n"
msgstr ""
-#: config/tc-tic54x.c:356
+#: config/tc-tic54x.c:351
+#, c-format
msgid "-me <filename> Redirect errors to a file\n"
msgstr ""
-#: config/tc-tic54x.c:478
+#: config/tc-tic54x.c:473
msgid "Comma and symbol expected for '.asg STRING, SYMBOL'"
msgstr ""
-#: config/tc-tic54x.c:532
+#: config/tc-tic54x.c:527
msgid "Unterminated string after absolute expression"
msgstr ""
-#: config/tc-tic54x.c:540
+#: config/tc-tic54x.c:535
msgid "Comma and symbol expected for '.eval EXPR, SYMBOL'"
msgstr ""
-#: config/tc-tic54x.c:552
+#: config/tc-tic54x.c:547
msgid "symbols assigned with .eval must begin with a letter"
msgstr ""
-#: config/tc-tic54x.c:810
+#: config/tc-tic54x.c:805
msgid "Offset on nested structures is ignored"
msgstr ""
-#: config/tc-tic54x.c:861
+#: config/tc-tic54x.c:856
#, c-format
msgid ".end%s without preceding .%s"
msgstr ""
-#: config/tc-tic54x.c:928
+#: config/tc-tic54x.c:923
#, c-format
msgid "Unrecognized struct/union tag '%s'"
msgstr ""
-#: config/tc-tic54x.c:930
+#: config/tc-tic54x.c:925
msgid ".tag requires a structure tag"
msgstr ""
-#: config/tc-tic54x.c:936
+#: config/tc-tic54x.c:931
msgid "Label required for .tag"
msgstr ""
-#: config/tc-tic54x.c:955
+#: config/tc-tic54x.c:950
#, c-format
msgid ".tag target '%s' undefined"
msgstr ""
-#: config/tc-tic54x.c:1018
+#: config/tc-tic54x.c:1013
#, c-format
msgid ".field count '%d' out of range (1 <= X <= 32)"
msgstr ""
-#: config/tc-tic54x.c:1046
+#: config/tc-tic54x.c:1041
#, c-format
msgid "Unrecognized field type '%c'"
msgstr ""
#. Disallow .byte with a non constant expression that will
#. require relocation.
-#: config/tc-tic54x.c:1183
+#: config/tc-tic54x.c:1178
msgid "Relocatable values require at least WORD storage"
msgstr ""
-#: config/tc-tic54x.c:1245
+#: config/tc-tic54x.c:1240
msgid "Use of .def/.ref is deprecated. Use .global instead"
msgstr ""
-#: config/tc-tic54x.c:1444
+#: config/tc-tic54x.c:1439
msgid ".space/.bes repeat count is negative, ignored"
msgstr ""
-#: config/tc-tic54x.c:1449
+#: config/tc-tic54x.c:1444
msgid ".space/.bes repeat count is zero, ignored"
msgstr ""
-#: config/tc-tic54x.c:1527
+#: config/tc-tic54x.c:1522
msgid "Missing size argument"
msgstr ""
-#: config/tc-tic54x.c:1664
+#: config/tc-tic54x.c:1659
msgid "CPU version has already been set"
msgstr ""
-#: config/tc-tic54x.c:1668
+#: config/tc-tic54x.c:1663
#, c-format
msgid "Unrecognized version '%s'"
msgstr ""
-#: config/tc-tic54x.c:1674
+#: config/tc-tic54x.c:1669
msgid "Changing of CPU version on the fly not supported"
msgstr ""
-#: config/tc-tic54x.c:1810
+#: config/tc-tic54x.c:1805
msgid "p2align not supported on this target"
msgstr ""
-#: config/tc-tic54x.c:1823
+#: config/tc-tic54x.c:1818
msgid "Argument to .even ignored"
msgstr ""
-#: config/tc-tic54x.c:1870
+#: config/tc-tic54x.c:1865
msgid "Invalid field size, must be from 1 to 32"
msgstr ""
-#: config/tc-tic54x.c:1883
+#: config/tc-tic54x.c:1878
msgid "field size must be 16 when value is relocatable"
msgstr ""
-#: config/tc-tic54x.c:1898
+#: config/tc-tic54x.c:1893
msgid "field value truncated"
msgstr ""
-#: config/tc-tic54x.c:2007 config/tc-tic54x.c:2324
+#: config/tc-tic54x.c:2002 config/tc-tic54x.c:2319
#, c-format
msgid "Unrecognized section '%s'"
msgstr ""
-#: config/tc-tic54x.c:2016
+#: config/tc-tic54x.c:2011
msgid "Current section is unitialized, section name required for .clink"
msgstr ""
-#: config/tc-tic54x.c:2230
+#: config/tc-tic54x.c:2225
msgid "ENDLOOP without corresponding LOOP"
msgstr ""
-#: config/tc-tic54x.c:2274
+#: config/tc-tic54x.c:2269
msgid "Mixing of normal and extended addressing not supported"
msgstr ""
-#: config/tc-tic54x.c:2280
+#: config/tc-tic54x.c:2275
msgid "Extended addressing not supported on the specified CPU"
msgstr ""
-#: config/tc-tic54x.c:2330
+#: config/tc-tic54x.c:2325
msgid ".sblock may be used for initialized sections only"
msgstr ""
-#: config/tc-tic54x.c:2361
+#: config/tc-tic54x.c:2356
msgid "Symbol missing for .set/.equ"
msgstr ""
-#: config/tc-tic54x.c:2420
+#: config/tc-tic54x.c:2415
msgid ".var may only be used within a macro definition"
msgstr ""
-#: config/tc-tic54x.c:2428
+#: config/tc-tic54x.c:2423
msgid "Substitution symbols must begin with a letter"
msgstr ""
-#: config/tc-tic54x.c:2522
+#: config/tc-tic54x.c:2517
#, c-format
msgid "Can't open macro library file '%s' for reading."
msgstr ""
-#: config/tc-tic54x.c:2529
+#: config/tc-tic54x.c:2524
#, c-format
msgid "File '%s' not in macro archive format"
msgstr ""
-#: config/tc-tic54x.c:2689
+#: config/tc-tic54x.c:2656
#, c-format
msgid "Bad COFF version '%s'"
msgstr ""
-#: config/tc-tic54x.c:2698
+#: config/tc-tic54x.c:2665
#, c-format
msgid "Bad CPU version '%s'"
msgstr ""
-#: config/tc-tic54x.c:2711 config/tc-tic54x.c:2714
+#: config/tc-tic54x.c:2678 config/tc-tic54x.c:2681
#, c-format
msgid "Can't redirect stderr to the file '%s'"
msgstr ""
-#: config/tc-tic54x.c:2861
+#: config/tc-tic54x.c:2809
#, c-format
msgid "Undefined substitution symbol '%s'"
msgstr ""
-#: config/tc-tic54x.c:3518
+#: config/tc-tic54x.c:3466
msgid "Badly formed address expression"
msgstr ""
-#: config/tc-tic54x.c:3782
+#: config/tc-tic54x.c:3730
#, c-format
msgid "Invalid dmad syntax '%s'"
msgstr ""
-#: config/tc-tic54x.c:3848
+#: config/tc-tic54x.c:3796
#, c-format
msgid ""
"Use the .mmregs directive to use memory-mapped register names such as '%s'"
msgstr ""
-#: config/tc-tic54x.c:3901
+#: config/tc-tic54x.c:3849
msgid "Address mode *+ARx is write-only. Results of reading are undefined."
msgstr ""
-#: config/tc-tic54x.c:3921
+#: config/tc-tic54x.c:3869
#, c-format
msgid "Unrecognized indirect address format \"%s\""
msgstr ""
-#: config/tc-tic54x.c:3960
+#: config/tc-tic54x.c:3908
#, c-format
msgid "Operand '%s' out of range (%d <= x <= %d)"
msgstr ""
-#: config/tc-tic54x.c:3980
+#: config/tc-tic54x.c:3928
msgid "Error in relocation handling"
msgstr ""
-#: config/tc-tic54x.c:4001 config/tc-tic54x.c:4065 config/tc-tic54x.c:4097
+#: config/tc-tic54x.c:3949 config/tc-tic54x.c:4013 config/tc-tic54x.c:4045
#, c-format
msgid "Unrecognized condition code \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4018
+#: config/tc-tic54x.c:3966
#, c-format
msgid "Condition \"%s\" does not match preceding group"
msgstr ""
-#: config/tc-tic54x.c:4026
+#: config/tc-tic54x.c:3974
#, c-format
msgid ""
"Condition \"%s\" uses a different accumulator from a preceding condition"
msgstr ""
-#: config/tc-tic54x.c:4033
+#: config/tc-tic54x.c:3981
msgid "Only one comparison conditional allowed"
msgstr ""
-#: config/tc-tic54x.c:4038
+#: config/tc-tic54x.c:3986
msgid "Only one overflow conditional allowed"
msgstr ""
-#: config/tc-tic54x.c:4046
+#: config/tc-tic54x.c:3994
#, c-format
msgid "Duplicate %s conditional"
msgstr ""
-#: config/tc-tic54x.c:4081
+#: config/tc-tic54x.c:4029
msgid "Invalid auxiliary register (use AR0-AR7)"
msgstr ""
-#: config/tc-tic54x.c:4117
+#: config/tc-tic54x.c:4065
msgid "lk addressing modes are invalid for memory-mapped register addressing"
msgstr ""
-#: config/tc-tic54x.c:4125
+#: config/tc-tic54x.c:4073
msgid ""
"Address mode *+ARx is not allowed in memory-mapped register addressing. "
"Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:4151
+#: config/tc-tic54x.c:4099
msgid ""
"Destination accumulator for each part of this parallel instruction must be "
"different"
msgstr ""
-#: config/tc-tic54x.c:4200
+#: config/tc-tic54x.c:4148
#, c-format
msgid "Memory mapped register \"%s\" out of range"
msgstr ""
-#: config/tc-tic54x.c:4239
+#: config/tc-tic54x.c:4187
msgid "Invalid operand (use 1, 2, or 3)"
msgstr ""
-#: config/tc-tic54x.c:4264
+#: config/tc-tic54x.c:4212
msgid "A status register or status bit name is required"
msgstr ""
-#: config/tc-tic54x.c:4274
+#: config/tc-tic54x.c:4222
#, c-format
msgid "Unrecognized status bit \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4297
+#: config/tc-tic54x.c:4245
#, c-format
msgid "Invalid status register \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4309
+#: config/tc-tic54x.c:4257
#, c-format
msgid "Operand \"%s\" out of range (use 1 or 2)"
msgstr ""
-#: config/tc-tic54x.c:4517
+#: config/tc-tic54x.c:4465
#, c-format
msgid "Unrecognized instruction \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4546
+#: config/tc-tic54x.c:4494
#, c-format
msgid "Unrecognized operand list '%s' for instruction '%s'"
msgstr ""
-#: config/tc-tic54x.c:4578
+#: config/tc-tic54x.c:4526
#, c-format
msgid "Unrecognized parallel instruction \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4629
+#: config/tc-tic54x.c:4577
#, c-format
msgid "Invalid operand (s) for parallel instruction \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4632
+#: config/tc-tic54x.c:4580
#, c-format
msgid "Unrecognized parallel instruction combination \"%s || %s\""
msgstr ""
-#: config/tc-tic54x.c:4869
+#: config/tc-tic54x.c:4817
#, c-format
msgid "%s symbol recursion stopped at second appearance of '%s'"
msgstr ""
-#: config/tc-tic54x.c:4909
+#: config/tc-tic54x.c:4857
msgid "Unrecognized substitution symbol function"
msgstr ""
-#: config/tc-tic54x.c:4914
+#: config/tc-tic54x.c:4862
msgid "Missing '(' after substitution symbol function"
msgstr ""
-#: config/tc-tic54x.c:4928
+#: config/tc-tic54x.c:4876
msgid "Expecting second argument"
msgstr ""
-#: config/tc-tic54x.c:4941 config/tc-tic54x.c:4991
+#: config/tc-tic54x.c:4889 config/tc-tic54x.c:4939
msgid "Extra junk in function call, expecting ')'"
msgstr ""
-#: config/tc-tic54x.c:4967
+#: config/tc-tic54x.c:4915
msgid "Function expects two arguments"
msgstr ""
-#: config/tc-tic54x.c:4980
+#: config/tc-tic54x.c:4928
msgid "Expecting character constant argument"
msgstr ""
-#: config/tc-tic54x.c:4986
+#: config/tc-tic54x.c:4934
msgid "Both arguments must be substitution symbols"
msgstr ""
-#: config/tc-tic54x.c:5039
+#: config/tc-tic54x.c:4987
#, c-format
msgid "Invalid subscript (use 1 to %d)"
msgstr ""
-#: config/tc-tic54x.c:5049
+#: config/tc-tic54x.c:4997
#, c-format
msgid "Invalid length (use 0 to %d"
msgstr ""
-#: config/tc-tic54x.c:5059
+#: config/tc-tic54x.c:5007
msgid "Missing ')' in subscripted substitution symbol expression"
msgstr ""
-#: config/tc-tic54x.c:5079
+#: config/tc-tic54x.c:5027
msgid "Missing forced substitution terminator ':'"
msgstr ""
-#: config/tc-tic54x.c:5252
+#: config/tc-tic54x.c:5182
#, c-format
msgid ""
"Instruction does not fit in available delay slots (%d-word insn, %d slots "
"left)"
msgstr ""
-#: config/tc-tic54x.c:5293
+#: config/tc-tic54x.c:5223
#, c-format
msgid "Unrecognized parallel instruction '%s'"
msgstr ""
-#: config/tc-tic54x.c:5305
+#: config/tc-tic54x.c:5235
#, c-format
msgid "Instruction '%s' requires an LP cpu version"
msgstr ""
-#: config/tc-tic54x.c:5312
+#: config/tc-tic54x.c:5242
#, c-format
msgid "Instruction '%s' requires far mode addressing"
msgstr ""
-#: config/tc-tic54x.c:5324
+#: config/tc-tic54x.c:5254
#, 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:5334
+#: config/tc-tic54x.c:5264
msgid ""
"Instructions which cause PC discontinuity are not allowed in a delay slot. "
"Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5345
+#: config/tc-tic54x.c:5275
#, c-format
msgid "'%s' is not repeatable. Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5349
+#: config/tc-tic54x.c:5279
msgid ""
"Instructions using long offset modifiers or absolute addresses are not "
"repeatable. Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5545
+#: config/tc-tic54x.c:5459
#, c-format
msgid "Unsupported relocation size %d"
msgstr ""
-#: config/tc-tic54x.c:5699
+#: config/tc-tic54x.c:5602
msgid "non-absolute value used with .space/.bes"
msgstr ""
-#: config/tc-tic54x.c:5703
+#: config/tc-tic54x.c:5606
#, c-format
msgid "negative value ignored in %s"
msgstr ""
-#: config/tc-tic54x.c:5792
+#: config/tc-tic54x.c:5695
#, c-format
msgid "attempt to .space/.bes backwards? (%ld)"
msgstr ""
-#: config/tc-tic54x.c:5826
+#: config/tc-tic54x.c:5729
#, c-format
msgid "Invalid label '%s'"
msgstr ""
-#: config/tc-tic80.c:26
-#, c-format
-msgid "internal error:%s:%d: %s\n"
-msgstr ""
-
-#: config/tc-tic80.c:29
-#, c-format
-msgid "internal error:%s:%d: %s %ld\n"
-msgstr ""
-
-#: config/tc-tic80.c:89
-msgid "Relaxation is a luxury we can't afford"
-msgstr ""
-
-#: config/tc-tic80.c:138
-msgid "bad call to md_atof ()"
-msgstr ""
-
-#: config/tc-tic80.c:235
-msgid "':' not followed by 'm' or 's'"
-msgstr ""
-
-#: config/tc-tic80.c:248
-msgid "paren nesting"
-msgstr ""
-
-#: config/tc-tic80.c:262
-msgid "mismatched parenthesis"
-msgstr ""
-
-#: config/tc-tic80.c:464
-msgid "unhandled expression type"
-msgstr ""
-
-#: config/tc-tic80.c:678
-msgid "symbol reloc that is not PC relative or 32 bits"
-msgstr ""
-
-#: config/tc-tic80.c:707
-msgid "unhandled operand modifier"
-msgstr ""
-
-#: config/tc-tic80.c:749
-msgid "unhandled expression"
-msgstr ""
-
-#: config/tc-tic80.c:797
-#, c-format
-msgid "Invalid mnemonic: '%s'"
-msgstr ""
-
-#: config/tc-tic80.c:810
-#, c-format
-msgid "Invalid operands: '%s'"
-msgstr ""
-
-#: config/tc-tic80.c:888
-msgid "unhandled predefined symbol bits"
-msgstr ""
-
-#: config/tc-tic80.c:983
+#: config/tc-v850.c:234
#, c-format
-msgid "PC offset 0x%lx outside range 0x%lx-0x%lx"
-msgstr ""
-
-#: config/tc-tic80.c:998
-msgid "unhandled relocation type in fixup"
-msgstr ""
-
-#: config/tc-tic80.c:1037
-msgid "md_convert_frag() not implemented yet"
+msgid ".COMMon length (%d.) < 0! Ignored."
msgstr ""
-#: config/tc-v850.c:244
+#: config/tc-v850.c:255
#, c-format
-msgid ".COMMon length (%d.) < 0! Ignored."
+msgid "Length of .comm \"%s\" is already %ld. Not changed to %d."
msgstr ""
-#: config/tc-v850.c:293
+#: config/tc-v850.c:281
msgid "Common alignment negative; 0 assumed"
msgstr ""
-#: config/tc-v850.c:974
+#: config/tc-v850.c:939
#, c-format
msgid "unknown operand shift: %x\n"
msgstr ""
-#: config/tc-v850.c:975
+#: config/tc-v850.c:940
msgid "internal failure in parse_register_list"
msgstr ""
-#: config/tc-v850.c:991
+#: config/tc-v850.c:956
msgid "constant expression or register list expected"
msgstr ""
-#: config/tc-v850.c:996 config/tc-v850.c:1009 config/tc-v850.c:1028
+#: config/tc-v850.c:961 config/tc-v850.c:974 config/tc-v850.c:993
msgid "high bits set in register list expression"
msgstr ""
-#: config/tc-v850.c:1067 config/tc-v850.c:1130
+#: config/tc-v850.c:1032 config/tc-v850.c:1095
msgid "illegal register included in list"
msgstr ""
-#: config/tc-v850.c:1073
+#: config/tc-v850.c:1038
msgid "system registers cannot be included in list"
msgstr ""
-#: config/tc-v850.c:1078
+#: config/tc-v850.c:1043
msgid "PSW cannot be included in list"
msgstr ""
-#: config/tc-v850.c:1085
+#: config/tc-v850.c:1050
msgid "High value system registers cannot be included in list"
msgstr ""
-#: config/tc-v850.c:1109
+#: config/tc-v850.c:1074
msgid "second register should follow dash in register list"
msgstr ""
-#: config/tc-v850.c:1154
+#: config/tc-v850.c:1119
+#, c-format
msgid " V850 options:\n"
msgstr ""
-#: config/tc-v850.c:1155
+#: config/tc-v850.c:1120
+#, c-format
msgid " -mwarn-signed-overflow Warn if signed immediate values overflow\n"
msgstr ""
-#: config/tc-v850.c:1156
+#: config/tc-v850.c:1121
+#, c-format
msgid ""
" -mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n"
msgstr ""
-#: config/tc-v850.c:1157
+#: config/tc-v850.c:1122
+#, c-format
msgid " -mv850 The code is targeted at the v850\n"
msgstr ""
-#: config/tc-v850.c:1158
+#: config/tc-v850.c:1123
+#, c-format
msgid " -mv850e The code is targeted at the v850e\n"
msgstr ""
-#: config/tc-v850.c:1159
+#: config/tc-v850.c:1124
+#, c-format
+msgid " -mv850e1 The code is targeted at the v850e1\n"
+msgstr ""
+
+#: config/tc-v850.c:1125
+#, c-format
msgid ""
" -mv850any The code is generic, despite any processor "
"specific instructions\n"
msgstr ""
-#: config/tc-v850.c:1160
+#: config/tc-v850.c:1126
+#, c-format
msgid " -mrelax Enable relaxation\n"
msgstr ""
-#: config/tc-v850.c:1172 config/tc-v850.c:1207
+#: config/tc-v850.c:1308
#, c-format
-msgid "unknown command line option: -%c%s\n"
+msgid "Unable to determine default target processor from string: %s"
msgstr ""
-#: config/tc-v850.c:1348
-#, c-format
-msgid "Unable to determine default target processor from string: %s"
+#: config/tc-v850.c:1343
+msgid "lo() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1385
+#: config/tc-v850.c:1360
msgid "ctoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1411
+#: config/tc-v850.c:1382
msgid "sdaoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1437
+#: config/tc-v850.c:1404
msgid "zdaoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1474
+#: config/tc-v850.c:1437
msgid "tdaoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1698
+#: config/tc-v850.c:1642
msgid "Target processor does not support this instruction."
msgstr ""
-#: config/tc-v850.c:1788 config/tc-v850.c:1817 config/tc-v850.c:2005
+#: config/tc-v850.c:1731 config/tc-v850.c:1760 config/tc-v850.c:1940
msgid "immediate operand is too large"
msgstr ""
-#: config/tc-v850.c:1799
+#: config/tc-v850.c:1742
msgid "AAARG -> unhandled constant reloc"
msgstr ""
-#: config/tc-v850.c:1843
+#: config/tc-v850.c:1785
msgid "invalid register name"
msgstr ""
-#: config/tc-v850.c:1848
+#: config/tc-v850.c:1789
msgid "register r0 cannot be used here"
msgstr ""
-#: config/tc-v850.c:1860
+#: config/tc-v850.c:1800
msgid "invalid system register name"
msgstr ""
-#: config/tc-v850.c:1873
+#: config/tc-v850.c:1812
msgid "expected EP register"
msgstr ""
-#: config/tc-v850.c:1890
+#: config/tc-v850.c:1828
msgid "invalid condition code name"
msgstr ""
-#: config/tc-v850.c:1911 config/tc-v850.c:1915
+#: config/tc-v850.c:1848 config/tc-v850.c:1852
msgid "constant too big to fit into instruction"
msgstr ""
-#: config/tc-v850.c:1968
+#: config/tc-v850.c:1905
msgid "syntax error: value is missing before the register name"
msgstr ""
-#: config/tc-v850.c:1970
+#: config/tc-v850.c:1907
msgid "syntax error: register not expected"
msgstr ""
-#: config/tc-v850.c:1984
+#: config/tc-v850.c:1920
msgid "syntax error: system register not expected"
msgstr ""
-#: config/tc-v850.c:1989
+#: config/tc-v850.c:1924
msgid "syntax error: condition code not expected"
msgstr ""
-#: config/tc-v850.c:2030
+#: config/tc-v850.c:1958
msgid "invalid operand"
msgstr ""
-#: config/tc-vax.c:285
+#: config/tc-vax.c:290
#, c-format
msgid "VIP_BEGIN error:%s"
msgstr ""
-#: config/tc-vax.c:422
+#: 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:469
+#: config/tc-vax.c:527
msgid "Can't relocate expression"
msgstr ""
-#: config/tc-vax.c:572
+#: config/tc-vax.c:630
msgid "Bignum not permitted in short literal. Immediate mode assumed."
msgstr ""
-#: config/tc-vax.c:581
+#: config/tc-vax.c:639
msgid "Can't do flonum short literal: immediate mode used."
msgstr ""
-#: config/tc-vax.c:626
+#: config/tc-vax.c:684
#, c-format
msgid "A bignum/flonum may not be a displacement: 0x%lx used"
msgstr ""
-#: config/tc-vax.c:961
+#: config/tc-vax.c:1007
#, c-format
msgid "Short literal overflow(%ld.), immediate mode assumed."
msgstr ""
-#: config/tc-vax.c:970
+#: 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:1035
+#: config/tc-vax.c:1081
msgid "Length specification ignored. Address mode 9F used"
msgstr ""
-#: config/tc-vax.c:1096
+#: config/tc-vax.c:1142
msgid "Invalid operand: immediate value used as base address."
msgstr ""
-#: config/tc-vax.c:1098
+#: config/tc-vax.c:1144
msgid "Invalid operand: immediate value used as address."
msgstr ""
-#: config/tc-vax.c:1123
+#: config/tc-vax.c:1169
msgid "Symbol used as immediate operand in PIC mode."
msgstr ""
-#: config/tc-vax.c:1941
+#: config/tc-vax.c:1942
msgid "odd number of bytes in operand description"
msgstr ""
-#: config/tc-vax.c:1957
+#: config/tc-vax.c:1958
msgid "Bad operand"
msgstr ""
-#: config/tc-vax.c:2532
+#: 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
msgid "no '[' to match ']'"
msgstr ""
-#: config/tc-vax.c:2552
+#: config/tc-vax.c:2553
msgid "bad register in []"
msgstr ""
-#: config/tc-vax.c:2554
+#: config/tc-vax.c:2555
msgid "[PC] index banned"
msgstr ""
-#: config/tc-vax.c:2589
+#: config/tc-vax.c:2590
msgid "no '(' to match ')'"
msgstr ""
-#: config/tc-vax.c:2729
+#: config/tc-vax.c:2730
msgid "invalid branch operand"
msgstr ""
-#: config/tc-vax.c:2758
+#: config/tc-vax.c:2759
msgid "address prohibits @"
msgstr ""
-#: config/tc-vax.c:2760
+#: config/tc-vax.c:2761
msgid "address prohibits #"
msgstr ""
-#: config/tc-vax.c:2764
+#: config/tc-vax.c:2765
msgid "address prohibits -()"
msgstr ""
-#: config/tc-vax.c:2766
+#: config/tc-vax.c:2767
msgid "address prohibits ()+"
msgstr ""
-#: config/tc-vax.c:2769
+#: config/tc-vax.c:2770
msgid "address prohibits ()"
msgstr ""
-#: config/tc-vax.c:2771
+#: config/tc-vax.c:2772
msgid "address prohibits []"
msgstr ""
-#: config/tc-vax.c:2773
+#: config/tc-vax.c:2774
msgid "address prohibits register"
msgstr ""
-#: config/tc-vax.c:2775
+#: config/tc-vax.c:2776
msgid "address prohibits displacement length specifier"
msgstr ""
-#: config/tc-vax.c:2805
+#: config/tc-vax.c:2806
msgid "invalid operand of S^#"
msgstr ""
-#: config/tc-vax.c:2822
+#: config/tc-vax.c:2823
msgid "S^# needs expression"
msgstr ""
-#: config/tc-vax.c:2829
+#: config/tc-vax.c:2830
msgid "S^# may only read-access"
msgstr ""
-#: config/tc-vax.c:2854
+#: config/tc-vax.c:2855
msgid "invalid operand of -()"
msgstr ""
-#: config/tc-vax.c:2860
+#: config/tc-vax.c:2861
msgid "-(PC) unpredictable"
msgstr ""
-#: config/tc-vax.c:2862
+#: config/tc-vax.c:2863
msgid "[]index same as -()register: unpredictable"
msgstr ""
-#: config/tc-vax.c:2898
+#: config/tc-vax.c:2899
msgid "invalid operand of ()+"
msgstr ""
-#: config/tc-vax.c:2904
+#: config/tc-vax.c:2905
msgid "(PC)+ unpredictable"
msgstr ""
-#: config/tc-vax.c:2906
+#: config/tc-vax.c:2907
msgid "[]index same as ()+register: unpredictable"
msgstr ""
-#: config/tc-vax.c:2931
+#: config/tc-vax.c:2932
msgid "# conflicts length"
msgstr ""
-#: config/tc-vax.c:2933
+#: config/tc-vax.c:2934
msgid "# bars register"
msgstr ""
-#: config/tc-vax.c:2955
+#: config/tc-vax.c:2956
msgid "writing or modifying # is unpredictable"
msgstr ""
-#: config/tc-vax.c:2985
+#: config/tc-vax.c:2986
msgid "length not needed"
msgstr ""
-#: config/tc-vax.c:2992
+#: config/tc-vax.c:2993
msgid "can't []index a register, because it has no address"
msgstr ""
-#: config/tc-vax.c:2994
+#: config/tc-vax.c:2995
msgid "a register has no address"
msgstr ""
-#: config/tc-vax.c:3005
+#: config/tc-vax.c:3006
msgid "PC part of operand unpredictable"
msgstr ""
-#: config/tc-vax.c:3345
+#: config/tc-vax.c:3281
+msgid "SYMBOL TABLE not implemented"
+msgstr ""
+
+#: config/tc-vax.c:3285
+msgid "TOKEN TRACE not implemented"
+msgstr ""
+
+#: config/tc-vax.c:3289
+#, c-format
+msgid "Displacement length %s ignored!"
+msgstr ""
+
+#: config/tc-vax.c:3293
+#, c-format
+msgid "I don't need or use temp. file \"%s\"."
+msgstr ""
+
+#: config/tc-vax.c:3297
+msgid "I don't use an interpass file! -V ignored"
+msgstr ""
+
+#: config/tc-vax.c:3354
+#, c-format
msgid ""
"VAX options:\n"
"-d LENGTH\t\tignored\n"
@@ -9829,7 +10328,8 @@ msgid ""
"-V\t\t\tignored\n"
msgstr ""
-#: config/tc-vax.c:3354
+#: config/tc-vax.c:3363
+#, c-format
msgid ""
"VMS options:\n"
"-+\t\t\thash encode names longer than 31 characters\n"
@@ -9840,537 +10340,726 @@ msgid ""
"-v\"VERSION\"\t\tcode being assembled was produced by compiler \"VERSION\"\n"
msgstr ""
-#: config/tc-w65.c:145
-msgid "need on or off."
+#: config/tc-xstormy16.c:78
+#, c-format
+msgid " XSTORMY16 specific command line options:\n"
msgstr ""
-#: config/tc-w65.c:281 config/tc-w65.c:324
-msgid "syntax error after <exp"
+#: config/tc-xstormy16.c:563
+#, c-format
+msgid "internal error: can't install fix for reloc type %d (`%s')"
msgstr ""
-#: config/tc-xstormy16.c:80
-msgid " XSTORMY16 specific command line options:\n"
+#: config/tc-xtensa.c:590
+msgid "illegal range of target hardware versions"
msgstr ""
-#: config/tc-xstormy16.c:562
-#, c-format
-msgid "internal error: can't install fix for reloc type %d (`%s')"
+#: config/tc-xtensa.c:738
+msgid "--density option is ignored"
msgstr ""
-#: config/tc-xtensa.c:929
-msgid "'--density' option not supported in this Xtensa configuration"
+#: config/tc-xtensa.c:741
+msgid "--no-density option is ignored"
msgstr ""
-#: config/tc-xtensa.c:1030
-msgid ""
-"'--literal-section-name' is deprecated; use '--rename-section ."
-"literal=NEWNAME'"
+#: config/tc-xtensa.c:750
+msgid "--generics is deprecated; use --transform instead"
msgstr ""
-#: config/tc-xtensa.c:1036
-msgid ""
-"'--text-section-name' is deprecated; use '--rename-section .text=NEWNAME'"
+#: config/tc-xtensa.c:753
+msgid "--no-generics is deprecated; use --no-transform instead"
msgstr ""
-#: config/tc-xtensa.c:1042
-msgid ""
-"'--data-section-name' is deprecated; use '--rename-section .data=NEWNAME'"
+#: config/tc-xtensa.c:756
+msgid "--relax is deprecated; use --transform instead"
msgstr ""
-#: config/tc-xtensa.c:1048
-msgid "'--bss-section-name' is deprecated; use '--rename-section .bss=NEWNAME'"
+#: config/tc-xtensa.c:759
+msgid "--no-relax is deprecated; use --no-transform instead"
msgstr ""
-#: config/tc-xtensa.c:1186
+#: config/tc-xtensa.c:776
+msgid "--absolute-literals option not supported in this Xtensa configuration"
+msgstr ""
+
+#: config/tc-xtensa.c:849
+msgid "prefer-l32r conflicts with prefer-const16"
+msgstr ""
+
+#: config/tc-xtensa.c:855
+msgid "prefer-const16 conflicts with prefer-l32r"
+msgstr ""
+
+#: config/tc-xtensa.c:863 config/tc-xtensa.c:872 config/tc-xtensa.c:876
+msgid "invalid target hardware version"
+msgstr ""
+
+#: config/tc-xtensa.c:1078
msgid "unmatched end directive"
msgstr ""
-#: config/tc-xtensa.c:1215
+#: config/tc-xtensa.c:1107
msgid ".begin directive with no matching .end directive"
msgstr ""
-#: config/tc-xtensa.c:1259
+#: config/tc-xtensa.c:1148
+msgid "[no-]generics is deprecated; use [no-]transform instead"
+msgstr ""
+
+#: config/tc-xtensa.c:1153
+msgid "[no-]relax is deprecated; use [no-]transform instead"
+msgstr ""
+
+#: config/tc-xtensa.c:1166
#, c-format
-msgid "directive %s can't be negated"
+msgid "directive %s cannot be negated"
msgstr ""
-#: config/tc-xtensa.c:1265
+#: config/tc-xtensa.c:1172
msgid "unknown directive"
msgstr ""
-#: config/tc-xtensa.c:1300
+#: config/tc-xtensa.c:1194 config/tc-xtensa.c:1300 config/tc-xtensa.c:1573
+#: config/tc-xtensa.c:5496
+msgid "directives are not valid inside bundles"
+msgstr ""
+
+#: config/tc-xtensa.c:1206
+msgid ".begin literal is deprecated; use .literal instead"
+msgstr ""
+
+#: config/tc-xtensa.c:1220
msgid "cannot set literal_prefix inside literal fragment"
msgstr ""
-#: config/tc-xtensa.c:1337 config/tc-xtensa.c:1371
-msgid "Xtensa density option not supported; ignored"
+#: config/tc-xtensa.c:1263
+msgid ".begin [no-]density is ignored"
+msgstr ""
+
+#: config/tc-xtensa.c:1270 config/tc-xtensa.c:1320
+msgid "Xtensa absolute literals option not supported; ignored"
+msgstr ""
+
+#: config/tc-xtensa.c:1313
+msgid ".end [no-]density is ignored"
msgstr ""
-#: config/tc-xtensa.c:1383
+#: config/tc-xtensa.c:1338
#, c-format
msgid "does not match begin %s%s at %s:%d"
msgstr ""
-#: config/tc-xtensa.c:1429
+#: config/tc-xtensa.c:1393
msgid ".literal_position inside literal directive; ignoring"
msgstr ""
-#: config/tc-xtensa.c:1480
+#: config/tc-xtensa.c:1413
+msgid ".literal not allowed inside .begin literal region"
+msgstr ""
+
+#: config/tc-xtensa.c:1449
msgid "expected comma or colon after symbol name; rest of line ignored"
msgstr ""
-#: config/tc-xtensa.c:1655 config/tc-xtensa.c:1672
+#: config/tc-xtensa.c:1542
+msgid "fall through frequency must be greater than 0"
+msgstr ""
+
+#: config/tc-xtensa.c:1550
+msgid "branch target frequency must be greater than 0"
+msgstr ""
+
+#: config/tc-xtensa.c:1598
+#, c-format
+msgid "opcode-specific %s relocation used outside an instruction"
+msgstr ""
+
+#: config/tc-xtensa.c:1751 config/tc-xtensa.c:1768
#, c-format
msgid "bad register name: %s"
msgstr ""
-#: config/tc-xtensa.c:1661
+#: config/tc-xtensa.c:1757
#, c-format
msgid "bad register number: %s"
msgstr ""
-#: config/tc-xtensa.c:1724
+#: config/tc-xtensa.c:1836
msgid "register number out of range"
msgstr ""
-#: config/tc-xtensa.c:1836
-msgid "too many arguments"
+#: config/tc-xtensa.c:1920
+msgid "extra comma"
msgstr ""
#: config/tc-xtensa.c:1922
+msgid "extra colon"
+msgstr ""
+
+#: config/tc-xtensa.c:1924
+msgid "missing argument"
+msgstr ""
+
+#: config/tc-xtensa.c:1926
+msgid "missing comma or colon"
+msgstr ""
+
+#: config/tc-xtensa.c:1983
+msgid "incorrect register number, ignoring"
+msgstr ""
+
+#: config/tc-xtensa.c:1990
+msgid "too many arguments"
+msgstr ""
+
+#: config/tc-xtensa.c:2063
#, c-format
-msgid "not enough operands (%d) for '%s'; expected %d"
+msgid "cannot encode opcode \"%s\""
msgstr ""
-#: config/tc-xtensa.c:1929
+#: config/tc-xtensa.c:2157
#, c-format
-msgid "too many operands (%d) for '%s'; expected %d"
+msgid "not enough operands (%d) for '%s'; expected %d"
msgstr ""
-#: config/tc-xtensa.c:1973
+#: config/tc-xtensa.c:2164
#, c-format
-msgid "register number for `%s' is not a constant"
+msgid "too many operands (%d) for '%s'; expected %d"
msgstr ""
-#: config/tc-xtensa.c:1978
+#: config/tc-xtensa.c:2219
#, c-format
-msgid "register number (%ld) for `%s' is out of range"
+msgid "invalid register '%s' for '%s' instruction"
msgstr ""
-#: config/tc-xtensa.c:2464
+#: config/tc-xtensa.c:2226
#, c-format
-msgid "operand %d not properly aligned for '%s'"
+msgid "invalid register number (%ld) for '%s' instruction"
msgstr ""
-#: config/tc-xtensa.c:2469
+#: config/tc-xtensa.c:2295
#, c-format
-msgid "operand %d not in immediate table for '%s'"
+msgid "invalid register number (%ld) for '%s'"
msgstr ""
-#: config/tc-xtensa.c:2474
+#: config/tc-xtensa.c:2685
#, c-format
-msgid "operand %d too large for '%s'"
+msgid "operand %d of '%s' has out of range value '%u'"
msgstr ""
-#: config/tc-xtensa.c:2479
+#: config/tc-xtensa.c:2691
#, c-format
-msgid "operand %d too small for '%s'"
+msgid "operand %d of '%s' has invalid value '%u'"
msgstr ""
-#: config/tc-xtensa.c:2484
+#: config/tc-xtensa.c:2739
#, c-format
-msgid "operand %d is invalid for '%s'"
+msgid "internal error: unknown option name '%s'"
msgstr ""
-#: config/tc-xtensa.c:3716
+#: config/tc-xtensa.c:3791
msgid "INSTR_LABEL_DEF not supported yet"
msgstr ""
-#: config/tc-xtensa.c:3745
+#: config/tc-xtensa.c:3820
msgid "can't handle generation of literal/labels yet"
msgstr ""
-#: config/tc-xtensa.c:3749
+#: config/tc-xtensa.c:3824
msgid "can't handle undefined OP TYPE"
msgstr ""
-#: config/tc-xtensa.c:3810
+#: config/tc-xtensa.c:3885
#, c-format
msgid "found %d operands for '%s': Expected %d"
msgstr ""
-#: config/tc-xtensa.c:3817
+#: config/tc-xtensa.c:3892
#, c-format
msgid "found too many (%d) operands for '%s': Expected %d"
msgstr ""
-#: config/tc-xtensa.c:4072
-msgid "instruction fragment may contain data"
+#: config/tc-xtensa.c:4029
+msgid "invalid immediate"
msgstr ""
-#: config/tc-xtensa.c:4105
+#: config/tc-xtensa.c:4140
#, c-format
-msgid "invalid operand %d on '%s'"
+msgid "invalid relocation for operand %i of '%s'"
msgstr ""
-#: config/tc-xtensa.c:4116
+#: config/tc-xtensa.c:4150
#, c-format
-msgid "invalid expression for operand %d on '%s'"
+msgid "invalid expression for operand %i of '%s'"
msgstr ""
-#: config/tc-xtensa.c:4177
+#: config/tc-xtensa.c:4160
#, c-format
-msgid "invalid relocation operand %i on '%s'"
+msgid "invalid relocation in instruction slot %i"
msgstr ""
-#: config/tc-xtensa.c:4186
+#: config/tc-xtensa.c:4167
#, c-format
-msgid "undefined symbol for opcode \"%s\"."
+msgid "undefined symbol for opcode \"%s\""
msgstr ""
-#: config/tc-xtensa.c:4280
-msgid "instruction with constant operands does not fit"
+#: config/tc-xtensa.c:4608
+msgid "opcode 'NOP.N' unavailable in this configuration"
msgstr ""
-#: config/tc-xtensa.c:4289
-msgid "instruction with constant operands does not fit without widening"
+#: config/tc-xtensa.c:4668
+msgid "get_expanded_loop_offset: invalid opcode"
msgstr ""
-#: config/tc-xtensa.c:4379
-msgid "instruction's constant operands do not fit"
+#: config/tc-xtensa.c:4751
+#, c-format
+msgid "assembly state not set for first frag in section %s"
msgstr ""
-#: config/tc-xtensa.c:4718
-msgid "opcode 'NOP.N' unavailable in this configuration"
+#: config/tc-xtensa.c:4804
+#, c-format
+msgid "unaligned branch target: %d bytes at 0x%lx"
msgstr ""
-#: config/tc-xtensa.c:4727
-msgid "opcode 'OR' unavailable in this configuration"
+#: config/tc-xtensa.c:4843
+#, c-format
+msgid "unaligned loop: %d bytes at 0x%lx"
msgstr ""
-#: config/tc-xtensa.c:4737
-#, c-format
-msgid "invalid %d-byte NOP requested"
+#: config/tc-xtensa.c:4867
+msgid "unexpected fix"
msgstr ""
-#: config/tc-xtensa.c:4757
-msgid "get_expanded_loop_offset: undefined opcode"
+#: config/tc-xtensa.c:4878 config/tc-xtensa.c:4882
+msgid "undecodable fix"
msgstr ""
-#: config/tc-xtensa.c:4764
-msgid "get_expanded_loop_offset: invalid opcode"
+#: config/tc-xtensa.c:5012
+msgid "labels are not valid inside bundles"
msgstr ""
-#: config/tc-xtensa.c:4880
+#: config/tc-xtensa.c:5032
msgid "invalid last instruction for a zero-overhead loop"
msgstr ""
-#: config/tc-xtensa.c:4935
+#: config/tc-xtensa.c:5097
+msgid "extra opening brace"
+msgstr ""
+
+#: config/tc-xtensa.c:5107
+msgid "extra closing brace"
+msgstr ""
+
+#: config/tc-xtensa.c:5125
+msgid "missing closing brace"
+msgstr ""
+
+#: config/tc-xtensa.c:5205
#, c-format
-msgid "cannot assemble '%s' into a literal fragment"
+msgid "unknown opcode or format name '%s'"
msgstr ""
-#: config/tc-xtensa.c:4937
-msgid "..."
+#: config/tc-xtensa.c:5211
+msgid "format names only valid inside bundles"
msgstr ""
-#: config/tc-xtensa.c:5071
+#: config/tc-xtensa.c:5216
+#, c-format
+msgid "multiple formats specified for one bundle; using '%s'"
+msgstr ""
+
+#: config/tc-xtensa.c:5271
msgid "entry instruction with stack decrement < 16"
msgstr ""
-#: config/tc-xtensa.c:5075
+#: config/tc-xtensa.c:5275
msgid "entry instruction with non-constant decrement"
msgstr ""
-#: config/tc-xtensa.c:5152
+#: config/tc-xtensa.c:5330
+msgid "unaligned entry instruction"
+msgstr ""
+
+#: config/tc-xtensa.c:5389
+msgid "bad instruction format"
+msgstr ""
+
+#: config/tc-xtensa.c:5392
+msgid "invalid relocation"
+msgstr ""
+
+#: config/tc-xtensa.c:5403
#, c-format
-msgid "undefined @ suffix '%s', expected '%s'"
+msgid "invalid relocation for '%s' instruction"
msgstr ""
-#: config/tc-xtensa.c:5242
+#: config/tc-xtensa.c:5415
#, c-format
-msgid "invalid operand relocation for '%s' instruction"
+msgid "invalid relocation for operand %d of '%s'"
msgstr ""
-#: config/tc-xtensa.c:5245
+#: config/tc-xtensa.c:5572
+msgid "cannot represent subtraction with an offset"
+msgstr ""
+
+#: config/tc-xtensa.c:5660
#, c-format
-msgid "invalid relocation for operand %d in '%s' instruction"
+msgid "unhandled local relocation fix %s"
msgstr ""
-#: config/tc-xtensa.c:5252
+#: config/tc-xtensa.c:5968
+msgid "couldn't find a valid instruction format"
+msgstr ""
+
+#: config/tc-xtensa.c:5969
#, c-format
-msgid "invalid relocation type %d for %s instruction"
+msgid " ops were: "
msgstr ""
-#: config/tc-xtensa.c:5261
+#: config/tc-xtensa.c:5971
#, c-format
-msgid "invalid relocation for operand %d of '%s'"
+msgid " %s;"
msgstr ""
-#: config/tc-xtensa.c:5269
+#: config/tc-xtensa.c:5974
#, c-format
-msgid "non-PCREL relocation operand %d for '%s': %s"
+msgid "\n"
msgstr ""
-#: config/tc-xtensa.c:5328 config/tc-xtensa.c:5366
+#: config/tc-xtensa.c:5982
#, c-format
-msgid "unhandled local relocation fix %s"
+msgid "format '%s' allows %d slots, but there are %d opcodes"
msgstr ""
-#: config/tc-xtensa.c:5350
-msgid "undecodable FIX"
+#: config/tc-xtensa.c:5993 config/tc-xtensa.c:6091
+msgid "illegal resource usage in bundle"
msgstr ""
-#: config/tc-xtensa.c:5478
-msgid "emitting simplification relocation"
+#: config/tc-xtensa.c:6178
+#, c-format
+msgid "opcodes '%s' (slot %d) and '%s' (slot %d) write the same register"
msgstr ""
-#: config/tc-xtensa.c:5482
-msgid "emitting unknown relocation"
+#: config/tc-xtensa.c:6183
+#, c-format
+msgid "opcodes '%s' (slot %d) and '%s' (slot %d) write the same state"
msgstr ""
-#: config/tc-xtensa.c:5814
+#: config/tc-xtensa.c:6188
#, c-format
-msgid "fr_var %lu < length %d; ignoring"
+msgid "opcodes '%s' (slot %d) and '%s' (slot %d) write the same queue"
msgstr ""
-#: config/tc-xtensa.c:6000 config/tc-xtensa.c:6044
-msgid "undecodable instruction in instruction frag"
+#: config/tc-xtensa.c:6193
+#, c-format
+msgid ""
+"opcodes '%s' (slot %d) and '%s' (slot %d) both have volatile queue accesses"
msgstr ""
-#: config/tc-xtensa.c:6092
-msgid "invalid empty loop"
+#: config/tc-xtensa.c:6209
+msgid "multiple branches or jumps in the same bundle"
msgstr ""
-#: config/tc-xtensa.c:6097
-msgid "loop target does not follow loop instruction in section"
+#: config/tc-xtensa.c:6664
+msgid "cannot assemble into a literal fragment"
msgstr ""
-#: config/tc-xtensa.c:6215
-msgid "get_text_align_power: argument too large"
+#: config/tc-xtensa.c:6666
+msgid "..."
msgstr ""
-#: config/tc-xtensa.c:6420 config/tc-xtensa.c:6566
-msgid "invalid opcode for RELAX_ALIGN_NEXT_OPCODE"
+#: config/tc-xtensa.c:7175
+msgid ""
+"instruction sequence (write a0, branch, retw) may trigger hardware errata"
msgstr ""
-#: config/tc-xtensa.c:6421 config/tc-xtensa.c:6567
-msgid "cannot continue"
+#: config/tc-xtensa.c:7285
+msgid "branching or jumping to a loop end may trigger hardware errata"
msgstr ""
-#: config/tc-xtensa.c:6458
-msgid "expected loop opcode in relax align next target"
+#: config/tc-xtensa.c:7384
+msgid "loop end too close to another loop end may trigger hardware errata"
msgstr ""
-#: config/tc-xtensa.c:6475
-msgid "expected align_code or RELAX_ALIGN_NEXT_OPCODE"
+#: config/tc-xtensa.c:7393
+#, c-format
+msgid "fr_var %lu < length %d"
msgstr ""
-#: config/tc-xtensa.c:6549 config/tc-xtensa.c:6587 config/tc-xtensa.c:6591
-#: config/tc-xtensa.c:6595
-msgid "internal error aligning"
+#: config/tc-xtensa.c:7564
+msgid ""
+"loop containing less than three instructions may trigger hardware errata"
+msgstr ""
+
+#: config/tc-xtensa.c:7636
+msgid "undecodable instruction in instruction frag"
+msgstr ""
+
+#: config/tc-xtensa.c:7745
+msgid "invalid empty loop"
+msgstr ""
+
+#: config/tc-xtensa.c:7750
+msgid "loop target does not follow loop instruction in section"
msgstr ""
-#: config/tc-xtensa.c:6676
+#: config/tc-xtensa.c:8287
msgid "bad relaxation state"
msgstr ""
-#: config/tc-xtensa.c:6752
+#: config/tc-xtensa.c:8345
#, c-format
-msgid "fr_var (%ld) < length (%d); ignoring"
+msgid "fr_var (%ld) < length (%d)"
msgstr ""
-#: config/tc-xtensa.c:6928
+#: config/tc-xtensa.c:8846
msgid "internal error: relaxation failed"
msgstr ""
-#: config/tc-xtensa.c:6934
+#: config/tc-xtensa.c:8852
msgid "internal error: relaxation requires too many steps"
msgstr ""
-#: config/tc-xtensa.c:7055
+#: config/tc-xtensa.c:9027
msgid "invalid relaxation fragment result"
msgstr ""
-#: config/tc-xtensa.c:7128
+#: config/tc-xtensa.c:9107
msgid "unable to widen instruction"
msgstr ""
-#: config/tc-xtensa.c:7215
+#: config/tc-xtensa.c:9250
msgid "multiple literals in expansion"
msgstr ""
-#: config/tc-xtensa.c:7219
+#: config/tc-xtensa.c:9254
msgid "no registered fragment for literal"
msgstr ""
-#: config/tc-xtensa.c:7221
+#: config/tc-xtensa.c:9256
msgid "number of literal tokens != 1"
msgstr ""
-#: config/tc-xtensa.c:7298 config/tc-xtensa.c:7304
+#: config/tc-xtensa.c:9400 config/tc-xtensa.c:9406
#, c-format
msgid "unresolved loop target symbol: %s"
msgstr ""
-#: config/tc-xtensa.c:7401
-msgid "loop relaxation specification does not correspond"
+#: config/tc-xtensa.c:9512
+#, c-format
+msgid "invalid expression evaluation type %d"
msgstr ""
-#: config/tc-xtensa.c:7428
+#: config/tc-xtensa.c:9534
msgid "loop too long for LOOP instruction"
msgstr ""
-#: config/tc-xtensa.c:7465
-#, c-format
-msgid "invalid expression evaluation type %d"
-msgstr ""
-
-#: config/tc-xtensa.c:7702
+#: config/tc-xtensa.c:9805
#, c-format
msgid "fixes not all moved from %s"
msgstr ""
-#: config/tc-xtensa.c:7835
-msgid "inlining literal pool; specify location with .literal_position."
+#: config/tc-xtensa.c:9947
+msgid ""
+"literal pool location required for text-section-literals; specify with ."
+"literal_position"
msgstr ""
-#: config/tc-xtensa.c:8230
+#: config/tc-xtensa.c:10456
#, c-format
msgid "could not create section %s"
msgstr ""
-#: config/tc-xtensa.c:8232
+#: config/tc-xtensa.c:10458
#, c-format
msgid "invalid flag combination on section %s"
msgstr ""
-#: config/tc-xtensa.c:8481
+#: config/tc-xtensa.c:10844
+msgid "too many operands in instruction"
+msgstr ""
+
+#: config/tc-xtensa.c:11078
#, c-format
msgid "invalid symbolic operand %d on '%s'"
msgstr ""
-#: config/tc-xtensa.c:8545
+#: config/tc-xtensa.c:11147 config/tc-xtensa.c:11221
msgid "operand number mismatch"
msgstr ""
-#: config/tc-xtensa.c:8592
+#: config/tc-xtensa.c:11150
+msgid "cannot encode opcode"
+msgstr ""
+
+#: config/tc-xtensa.c:11225
+#, c-format
+msgid "cannot encode opcode \"%s\" in the given format \"%s\""
+msgstr ""
+
+#: config/tc-xtensa.c:11250
+#, c-format
+msgid "xtensa-isa failure: %s"
+msgstr ""
+
+#: config/tc-xtensa.c:11283
msgid "invalid opcode"
msgstr ""
-#: config/tc-xtensa.c:8598
+#: config/tc-xtensa.c:11289
msgid "too few operands"
msgstr ""
-#: config/tc-xtensa.c:8817
+#: config/tc-xtensa.c:11416 config/tc-xtensa.c:11424
+msgid "out of memory"
+msgstr ""
+
+#: config/tc-xtensa.c:11536
+msgid "instruction with constant operands does not fit"
+msgstr ""
+
+#: config/tc-xtensa.c:11545 config/tc-xtensa.c:11566
+#, c-format
+msgid "invalid operand %d on '%s'"
+msgstr ""
+
+#: config/tc-xtensa.c:11557
+msgid "invalid subtract operand"
+msgstr ""
+
+#: config/tc-xtensa.c:11571
+#, c-format
+msgid "invalid expression for operand %d on '%s'"
+msgstr ""
+
+#: config/tc-xtensa.c:11601
+msgid "cannot decode instruction format"
+msgstr ""
+
+#: config/tc-xtensa.c:11760
msgid "ignoring extra '-rename-section' delimiter ':'"
msgstr ""
-#: config/tc-xtensa.c:8822
+#: config/tc-xtensa.c:11765
#, c-format
msgid "ignoring invalid '-rename-section' specification: '%s'"
msgstr ""
-#: config/tc-xtensa.c:8845
+#: config/tc-xtensa.c:11776
#, c-format
msgid "section %s renamed multiple times"
msgstr ""
-#: config/tc-xtensa.c:8847
+#: config/tc-xtensa.c:11778
#, c-format
msgid "multiple sections remapped to output section %s"
msgstr ""
-#: config/tc-z8k.c:314
+#: config/tc-z8k.c:268
#, c-format
msgid "register rr%d out of range"
msgstr ""
-#: config/tc-z8k.c:316
+#: config/tc-z8k.c:270
#, c-format
msgid "register rr%d does not exist"
msgstr ""
-#: config/tc-z8k.c:326
+#: config/tc-z8k.c:280
#, c-format
msgid "register rh%d out of range"
msgstr ""
-#: config/tc-z8k.c:336
+#: config/tc-z8k.c:290
#, c-format
msgid "register rl%d out of range"
msgstr ""
-#: config/tc-z8k.c:347
+#: config/tc-z8k.c:301
#, c-format
msgid "register rq%d out of range"
msgstr ""
-#: config/tc-z8k.c:349
+#: config/tc-z8k.c:303
#, c-format
msgid "register rq%d does not exist"
msgstr ""
-#: config/tc-z8k.c:359
+#: config/tc-z8k.c:313
#, c-format
msgid "register r%d out of range"
msgstr ""
-#: config/tc-z8k.c:404
+#: config/tc-z8k.c:354
#, c-format
msgid "expected %c"
msgstr ""
-#: config/tc-z8k.c:421
+#: config/tc-z8k.c:369
#, c-format
msgid "register is wrong size for a word %s"
msgstr ""
-#: config/tc-z8k.c:437
+#: config/tc-z8k.c:383
#, c-format
msgid "register is wrong size for address %s"
msgstr ""
+#: config/tc-z8k.c:517
+#, c-format
+msgid "unknown interrupt %s"
+msgstr ""
+
#. No interrupt type specified, opcode won't do anything.
-#: config/tc-z8k.c:585
+#: config/tc-z8k.c:540
msgid "opcode has no effect"
msgstr ""
-#: config/tc-z8k.c:697
+#: config/tc-z8k.c:651
msgid "Missing ) in ra(rb)"
msgstr ""
-#: config/tc-z8k.c:919 config/tc-z8k.c:925
-msgid "invalid indirect register size"
+#: config/tc-z8k.c:731 config/tc-z8k.c:770
+#, c-format
+msgid "invalid condition code '%s'"
msgstr ""
-#: config/tc-z8k.c:971
+#: config/tc-z8k.c:743
#, c-format
-msgid "operand %s0x%x out of range"
+msgid "invalid flag '%s'"
+msgstr ""
+
+#: config/tc-z8k.c:897 config/tc-z8k.c:903
+msgid "invalid indirect register size"
+msgstr ""
+
+#: config/tc-z8k.c:920 config/tc-z8k.c:1068 config/tc-z8k.c:1073
+msgid "invalid control register name"
msgstr ""
-#: config/tc-z8k.c:1099
+#: config/tc-z8k.c:1057
msgid "immediate must be 1 or 2"
msgstr ""
-#: config/tc-z8k.c:1102
+#: config/tc-z8k.c:1060
msgid "immediate 1 or 2 expected"
msgstr ""
-#: config/tc-z8k.c:1129
+#: config/tc-z8k.c:1091
msgid "can't use R0 here"
msgstr ""
-#: config/tc-z8k.c:1292
+#: config/tc-z8k.c:1249
msgid "Can't find opcode to match operands"
msgstr ""
-#: config/tc-z8k.c:1411
+#: config/tc-z8k.c:1348
#, c-format
msgid "invalid architecture -z%s"
msgstr ""
-#: config/tc-z8k.c:1432
+#: config/tc-z8k.c:1368
+#, c-format
msgid ""
" Z8K options:\n"
" -z8001 generate segmented code\n"
@@ -10378,377 +11067,393 @@ msgid ""
" -linkrelax create linker relaxable code\n"
msgstr ""
-#: config/tc-z8k.c:1445
+#: config/tc-z8k.c:1380
+#, c-format
msgid "call to md_convert_frag\n"
msgstr ""
-#: config/tc-z8k.c:1476 config/tc-z8k.c:1487
+#: config/tc-z8k.c:1487 config/tc-z8k.c:1527 config/tc-z8k.c:1550
msgid "cannot branch to odd address"
msgstr ""
-#: config/tc-z8k.c:1479 config/tc-z8k.c:1490
+#: config/tc-z8k.c:1491 config/tc-z8k.c:1554
msgid "relative jump out of range"
msgstr ""
-#: config/tc-z8k.c:1497
-msgid "relative call out of range"
-msgstr ""
-
-#: config/tc-z8k.c:1523
+#: config/tc-z8k.c:1509
msgid "relative address out of range"
msgstr ""
-#: config/tc-z8k.c:1543
-#, c-format
-msgid "md_apply_fix3: unknown r_type 0x%x\n"
+#: config/tc-z8k.c:1530
+msgid "relative call out of range"
msgstr ""
-#: config/tc-z8k.c:1556
-msgid "call to md_estimate_size_before_relax\n"
+#: config/tc-z8k.c:1562
+#, c-format
+msgid "md_apply_fix: unknown r_type 0x%x\n"
msgstr ""
-#: config/tc-z8k.c:1600
+#: config/tc-z8k.c:1574
#, c-format
-msgid "Can't subtract symbols in different sections %s %s"
+msgid "call to md_estimate_size_before_relax\n"
msgstr ""
-#: depend.c:200
+#: depend.c:193
#, c-format
msgid "can't open `%s' for writing"
msgstr ""
-#: depend.c:212
+#: depend.c:205
#, c-format
msgid "can't close `%s'"
msgstr ""
-#: dw2gencfi.c:262
+#: dw2gencfi.c:258
#, c-format
msgid "register save offset not a multiple of %u"
msgstr ""
-#: dw2gencfi.c:388
+#: dw2gencfi.c:341
+msgid "CFI state restore without previous remember"
+msgstr ""
+
+#: dw2gencfi.c:387
msgid "missing separator"
msgstr ""
-#: dw2gencfi.c:410 dw2gencfi.c:428
+#: dw2gencfi.c:409 dw2gencfi.c:427
msgid "bad register expression"
msgstr ""
-#: dw2gencfi.c:450 dw2gencfi.c:547
+#: dw2gencfi.c:449 dw2gencfi.c:551
msgid "CFI instruction used without previous .cfi_startproc"
msgstr ""
-#: dw2gencfi.c:579
+#: dw2gencfi.c:587
msgid "previous CFI entry not closed (missing .cfi_endproc)"
msgstr ""
-#: dw2gencfi.c:612
+#: dw2gencfi.c:622
msgid ".cfi_endproc without corresponding .cfi_startproc"
msgstr ""
-#: dw2gencfi.c:987
+#: dw2gencfi.c:1031
msgid "open CFI at the end of file; missing .cfi_endproc directive"
msgstr ""
-#: dwarf2dbg.c:468 dwarf2dbg.c:498
+#: dwarf2dbg.c:523 dwarf2dbg.c:549
msgid "file number less than one"
msgstr ""
-#: dwarf2dbg.c:474
+#: dwarf2dbg.c:529
#, c-format
msgid "file number %ld already allocated"
msgstr ""
-#: dwarf2dbg.c:503 dwarf2dbg.c:1064
+#: dwarf2dbg.c:554 dwarf2dbg.c:1169
#, c-format
msgid "unassigned file number %ld"
msgstr ""
-#: dwarf2dbg.c:1130 dwarf2dbg.c:1327
-msgid "internal error: unknown dwarf2 format"
+#: dwarf2dbg.c:622
+msgid "is_stmt value not 0 or 1"
+msgstr ""
+
+#: dwarf2dbg.c:634
+msgid "isa number less than zero"
msgstr ""
-#: dwarf2dbg.c:1472 dwarf2dbg.c:1480 dwarf2dbg.c:1488 dwarf2dbg.c:1509
-msgid "dwarf2 is not supported for this object file format"
+#: dwarf2dbg.c:640
+#, c-format
+msgid "unknown .loc sub-directive `%s'"
+msgstr ""
+
+#: dwarf2dbg.c:1234 dwarf2dbg.c:1428
+msgid "internal error: unknown dwarf2 format"
msgstr ""
-#: ecoff.c:1556
+#: ecoff.c:1552
#, c-format
msgid "string too big (%lu bytes)"
msgstr ""
-#: ecoff.c:1582
+#: ecoff.c:1578
#, c-format
msgid "inserting \"%s\" into string hash table: %s"
msgstr ""
-#: ecoff.c:1614 ecoff.c:1808 ecoff.c:1833 ecoff.c:1865 ecoff.c:2019
-#: ecoff.c:2132
+#: ecoff.c:1609 ecoff.c:1802 ecoff.c:1825 ecoff.c:1856 ecoff.c:2009
+#: ecoff.c:2120
msgid "no current file pointer"
msgstr ""
-#: ecoff.c:1701
+#: ecoff.c:1696
msgid "too many st_End's"
msgstr ""
-#: ecoff.c:2044
+#: ecoff.c:2034
#, c-format
msgid "inserting \"%s\" into tag hash table: %s"
msgstr ""
-#: ecoff.c:2210
+#: ecoff.c:2195
msgid "fake .file after real one"
msgstr ""
-#: ecoff.c:2300
+#: ecoff.c:2285
msgid "filename goes over one page boundary"
msgstr ""
-#: ecoff.c:2435
+#: ecoff.c:2418
msgid ".begin directive without a preceding .file directive"
msgstr ""
-#: ecoff.c:2442
+#: ecoff.c:2425
msgid ".begin directive without a preceding .ent directive"
msgstr ""
-#: ecoff.c:2474
+#: ecoff.c:2456
msgid ".bend directive without a preceding .file directive"
msgstr ""
-#: ecoff.c:2481
+#: ecoff.c:2463
msgid ".bend directive without a preceding .ent directive"
msgstr ""
-#: ecoff.c:2494
+#: ecoff.c:2476
msgid ".bend directive names unknown symbol"
msgstr ""
-#: ecoff.c:2538
+#: ecoff.c:2519
msgid ".def pseudo-op used inside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2540
+#: ecoff.c:2521
msgid "empty symbol name in .def; ignored"
msgstr ""
-#: ecoff.c:2578
+#: ecoff.c:2558
msgid ".dim pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2593
+#: ecoff.c:2573
msgid "badly formed .dim directive"
msgstr ""
-#: ecoff.c:2606
+#: ecoff.c:2586
msgid "too many .dim entries"
msgstr ""
-#: ecoff.c:2627
+#: ecoff.c:2606
msgid ".scl pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2653
+#: ecoff.c:2631
msgid ".size pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2668
+#: ecoff.c:2646
msgid "badly formed .size directive"
msgstr ""
-#: ecoff.c:2681
+#: ecoff.c:2659
msgid "too many .size entries"
msgstr ""
-#: ecoff.c:2704
+#: ecoff.c:2681
msgid ".type pseudo-op used outside of .def/.endef; ignored"
msgstr ""
#. FIXME: We could handle this by setting the continued bit.
#. There would still be a limit: the .type argument can not
#. be infinite.
-#: ecoff.c:2722
+#: ecoff.c:2699
#, c-format
msgid "the type of %s is too complex; it will be simplified"
msgstr ""
-#: ecoff.c:2733
+#: ecoff.c:2710
msgid "Unrecognized .type argument"
msgstr ""
-#: ecoff.c:2772
+#: ecoff.c:2748
msgid ".tag pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2798
+#: ecoff.c:2773
msgid ".val pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2806
+#: ecoff.c:2781
msgid ".val expression is too copmlex"
msgstr ""
-#: ecoff.c:2837
+#: ecoff.c:2811
msgid ".endef pseudo-op used before .def; ignored"
msgstr ""
-#: ecoff.c:2863 ecoff.c:2944
+#: ecoff.c:2837 ecoff.c:2918
msgid "bad COFF debugging information"
msgstr ""
-#: ecoff.c:2912
+#: ecoff.c:2886
#, c-format
msgid "no tag specified for %s"
msgstr ""
-#: ecoff.c:3015
+#: ecoff.c:2988
msgid ".end directive without a preceding .file directive"
msgstr ""
-#: ecoff.c:3022
+#: ecoff.c:2995
msgid ".end directive without a preceding .ent directive"
msgstr ""
-#: ecoff.c:3044
+#: ecoff.c:3017
msgid ".end directive names unknown symbol"
msgstr ""
-#: ecoff.c:3072
+#: ecoff.c:3044
msgid "second .ent directive found before .end directive"
msgstr ""
-#: ecoff.c:3146
+#: ecoff.c:3116
msgid "no way to handle .file within .ent/.end section"
msgstr ""
-#: ecoff.c:3271
+#: ecoff.c:3233
msgid ".loc before .file"
msgstr ""
-#: ecoff.c:3410
+#: 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 ""
-#: ecoff.c:3479
+#: ecoff.c:3436
#, c-format
msgid ".stab%c is not supported"
msgstr ""
-#: ecoff.c:3489
+#: ecoff.c:3446
#, c-format
msgid ".stab%c: ignoring non-zero other field"
msgstr ""
-#: ecoff.c:3523
+#: ecoff.c:3480
#, c-format
msgid ""
"line number (%d) for .stab%c directive cannot fit in index field (20 bits)"
msgstr ""
-#: ecoff.c:3559
+#: ecoff.c:3516
#, c-format
msgid "illegal .stab%c directive, bad character"
msgstr ""
-#: ecoff.c:4021 ecoff.c:4210 ecoff.c:4235
+#: ecoff.c:3975 ecoff.c:4164 ecoff.c:4189
msgid ".begin/.bend in different segments"
msgstr ""
-#: ecoff.c:4737
+#: ecoff.c:4685
msgid "missing .end or .bend at end of file"
msgstr ""
-#: ecoff.c:5227
+#: ecoff.c:5170
msgid "GP prologue size exceeds field size, using 0 instead"
msgstr ""
-#: expr.c:83 read.c:3232
+#: expr.c:82 read.c:3351
msgid "bignum invalid"
msgstr ""
-#: expr.c:85 read.c:3234 read.c:3574 read.c:4474
+#: expr.c:84 read.c:3353 read.c:3702 read.c:4550
msgid "floating point number invalid"
msgstr ""
-#: expr.c:243
+#: expr.c:203
msgid "bad floating-point constant: exponent overflow"
msgstr ""
-#: expr.c:247
+#: expr.c:207
#, c-format
msgid "bad floating-point constant: unknown error code=%d"
msgstr ""
-#: expr.c:425
+#: expr.c:383
msgid ""
"a bignum with underscores may not have more than 8 hex digits in any word"
msgstr ""
-#: expr.c:448
+#: expr.c:406
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:571
+#: expr.c:529
#, c-format
msgid "backward ref to unknown label \"%d:\""
msgstr ""
-#: expr.c:694
+#: expr.c:647
msgid "character constant too large"
msgstr ""
-#: expr.c:942
+#: expr.c:893
#, c-format
msgid "expr.c(operand): bad atof_generic return val %d"
msgstr ""
-#: expr.c:1004
+#: expr.c:954
#, c-format
msgid "missing '%c'"
msgstr ""
-#: expr.c:1016 read.c:3945
+#: expr.c:965 read.c:4034
msgid "EBCDIC constants are not supported"
msgstr ""
-#: expr.c:1099
+#: expr.c:1082
#, c-format
msgid "Unary operator %c ignored because bad operand follows"
msgstr ""
-#: expr.c:1145 expr.c:1170
+#: expr.c:1128 expr.c:1153
msgid "syntax error in .startof. or .sizeof."
msgstr ""
-#: expr.c:1666
+#: expr.c:1665
msgid "missing operand; zero assumed"
msgstr ""
-#: expr.c:1701
+#: expr.c:1700
msgid "left operand is a bignum; integer 0 assumed"
msgstr ""
-#: expr.c:1703
+#: expr.c:1702
msgid "left operand is a float; integer 0 assumed"
msgstr ""
-#: expr.c:1712
+#: expr.c:1711
msgid "right operand is a bignum; integer 0 assumed"
msgstr ""
-#: expr.c:1714
+#: expr.c:1713
msgid "right operand is a float; integer 0 assumed"
msgstr ""
-#: expr.c:1770 symbols.c:1191
+#: expr.c:1769 symbols.c:1207
msgid "division by zero"
msgstr ""
-#: expr.c:1868
+#: expr.c:1867
msgid "operation combines symbols in different segments"
msgstr ""
@@ -10760,11 +11465,12 @@ msgstr ""
msgid "attempt to allocate data in common section"
msgstr ""
-#: frags.c:107
+#: frags.c:112
#, c-format
msgid "can't extend frag %u chars"
msgstr ""
+#. For error messages.
#. Detect if we are reading from stdin by examining the file
#. name returned by as_where().
#.
@@ -10776,508 +11482,615 @@ 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:145 input-scrub.c:242 listing.c:343
+#: input-file.c:141 input-scrub.c:238 listing.c:332
msgid "{standard input}"
msgstr ""
-#: input-file.c:149
+#: input-file.c:147 input-file.c:156
#, c-format
-msgid "can't open %s for reading"
+msgid "Can't open %s for reading"
msgstr ""
-#: input-file.c:212 input-file.c:239
+#: input-file.c:219 input-file.c:246
#, c-format
msgid "Can't read from %s"
msgstr ""
-#: input-file.c:247
+#: input-file.c:256
#, c-format
msgid "Can't close %s"
msgstr ""
-#: input-scrub.c:272
+#: input-scrub.c:263
msgid "macros nested too deeply"
msgstr ""
-#: input-scrub.c:375 input-scrub.c:397
+#: input-scrub.c:365 input-scrub.c:387
msgid "partial line at end of file ignored"
msgstr ""
-#: itbl-ops.c:351
+#: itbl-ops.c:338
+#, c-format
msgid "Unable to allocate memory for new instructions\n"
msgstr ""
-#: listing.c:243
+#: listing.c:238
msgid "Warning:"
msgstr ""
-#: listing.c:250
+#: listing.c:244
msgid "Error:"
msgstr ""
-#: listing.c:1130
+#: listing.c:1089
#, c-format
msgid "can't open list file: %s"
msgstr ""
-#: listing.c:1154
+#: listing.c:1109
#, c-format
msgid "error closing list file: %s"
msgstr ""
-#: listing.c:1233
+#: listing.c:1182
msgid "strange paper height, set to no form"
msgstr ""
-#: listing.c:1299
+#: listing.c:1246
msgid "new line in title"
msgstr ""
#. Turns the next expression into a string.
-#: macro.c:382
+#: macro.c:436
#, no-c-format
msgid "% operator needs absolute expression"
msgstr ""
-#: macro.c:545
-msgid "unexpected end of file in macro definition"
+#: macro.c:558
+#, c-format
+msgid "Missing parameter qualifier for `%s' in macro `%s'"
msgstr ""
-#: macro.c:554
-msgid "missing ) after formals"
+#: macro.c:568
+#, c-format
+msgid "`%s' is not a valid parameter qualifier for `%s' in macro `%s'"
msgstr ""
-#: macro.c:703
-msgid "missplaced )"
+#: macro.c:585
+#, c-format
+msgid "Pointless default value for required parameter `%s' in macro `%s'"
msgstr ""
-#: macro.c:960
+#: macro.c:597
+#, c-format
+msgid "A parameter named `%s' already exists for macro `%s'"
+msgstr ""
+
+#: macro.c:634
+#, c-format
+msgid "Reserved word `%s' used as parameter in macro `%s'"
+msgstr ""
+
+#: macro.c:672
+#, c-format
+msgid "unexpected end of file in macro `%s' definition"
+msgstr ""
+
+#: macro.c:684
+#, c-format
+msgid "missing `)' after formals in macro definition `%s'"
+msgstr ""
+
+#: macro.c:699
+msgid "Missing macro name"
+msgstr ""
+
+#: macro.c:708
+#, c-format
+msgid "Bad parameter list for macro `%s'"
+msgstr ""
+
+#: macro.c:714
+#, c-format
+msgid "Macro `%s' was already defined"
+msgstr ""
+
+#: macro.c:837 macro.c:839
+msgid "missing `)'"
+msgstr ""
+
+#: macro.c:934
+#, c-format
+msgid "`%s' was already used as parameter (or another local) name"
+msgstr ""
+
+#: macro.c:1093
msgid "confusion in formal parameters"
msgstr ""
-#: macro.c:965
-msgid "macro formal argument does not exist"
+#: macro.c:1100
+#, c-format
+msgid "Parameter named `%s' does not exist for macro `%s'"
msgstr ""
-#: macro.c:980
+#: macro.c:1108
+#, c-format
+msgid "Value for parameter `%s' of macro `%s' was already specified"
+msgstr ""
+
+#: macro.c:1124
msgid "can't mix positional and keyword arguments"
msgstr ""
-#: macro.c:988
+#: macro.c:1135
msgid "too many positional arguments"
msgstr ""
-#: macro.c:1163
+#: macro.c:1183
+#, c-format
+msgid "Missing value for required parameter `%s' of macro `%s'"
+msgstr ""
+
+#: macro.c:1320
+#, c-format
+msgid "Attempt to purge non-existant macro `%s'"
+msgstr ""
+
+#: macro.c:1339
msgid "unexpected end of file in irp or irpc"
msgstr ""
-#: macro.c:1171
+#: macro.c:1347
msgid "missing model parameter"
msgstr ""
#: messages.c:104
+#, c-format
msgid "Assembler messages:\n"
msgstr ""
-#: messages.c:214
+#: messages.c:206
+#, c-format
msgid "Warning: "
msgstr ""
-#: messages.c:318
+#: messages.c:307
+#, c-format
msgid "Error: "
msgstr ""
-#: messages.c:413 messages.c:433
+#: messages.c:402 messages.c:422
+#, c-format
msgid "Fatal error: "
msgstr ""
-#: messages.c:450
+#: messages.c:437
+#, c-format
msgid "Internal error!\n"
msgstr ""
-#: messages.c:452
+#: messages.c:439
#, c-format
msgid "Assertion failure in %s at %s line %d.\n"
msgstr ""
-#: messages.c:455
+#: messages.c:442
#, c-format
msgid "Assertion failure at %s line %d.\n"
msgstr ""
-#: messages.c:456 messages.c:475
+#: messages.c:443 messages.c:460
+#, c-format
msgid "Please report this bug.\n"
msgstr ""
-#: messages.c:470
+#: messages.c:455
#, c-format
msgid "Internal error, aborting at %s line %d in %s\n"
msgstr ""
-#: messages.c:473
+#: messages.c:458
#, c-format
msgid "Internal error, aborting at %s line %d\n"
msgstr ""
-#: output-file.c:48
+#: messages.c:507
#, c-format
-msgid "can't open a bfd on stdout %s"
+msgid "%s out of range (%d is not between %d and %d)"
msgstr ""
-#: output-file.c:52 output-file.c:115
+#. xgettext:c-format.
+#: messages.c:530
#, c-format
-msgid "FATAL: can't create %s"
+msgid "%s out of range (0x%s is not between 0x%s and 0x%s)"
msgstr ""
-#: output-file.c:73 output-file.c:80
+#: output-file.c:39
#, c-format
-msgid "FATAL: can't close %s\n"
+msgid "can't open a bfd on stdout %s"
msgstr ""
-#: output-file.c:126
+#: output-file.c:44
#, c-format
-msgid "FATAL: can't close %s"
+msgid "Selected target format '%s' unknown"
msgstr ""
-#: output-file.c:147
-msgid "Failed to emit an object byte"
+#: output-file.c:46
+#, c-format
+msgid "FATAL: can't create %s"
msgstr ""
-#: output-file.c:148
-msgid "can't continue"
+#: output-file.c:63
+#, c-format
+msgid "FATAL: can't close %s\n"
msgstr ""
-#: read.c:442
+#: read.c:450
+msgid "bad or irreducible absolute expression"
+msgstr ""
+
+#: read.c:476
#, c-format
msgid "error constructing %s pseudo-op table: %s"
msgstr ""
-#: read.c:809
+#: read.c:896
#, c-format
msgid "unknown pseudo-op: `%s'"
msgstr ""
-#: read.c:940
+#: read.c:983
#, c-format
msgid "label \"%d$\" redefined"
msgstr ""
-#: read.c:1152
+#: read.c:1214
msgid ".abort detected. Abandoning ship."
msgstr ""
-#: read.c:1174 read.c:2413
+#: read.c:1232 read.c:2406
msgid "ignoring fill value in absolute section"
msgstr ""
-#: read.c:1260
+#: read.c:1322
#, c-format
msgid "alignment too large: %u assumed"
msgstr ""
-#: read.c:1292
+#: read.c:1354
msgid "expected fill pattern missing"
msgstr ""
-#: read.c:1417
+#: read.c:1457
+msgid "missing size expression"
+msgstr ""
+
+#: read.c:1463
#, c-format
-msgid "length of .comm \"%s\" is already %ld; not changing to %ld"
+msgid "size (%ld) out of range, ignored"
+msgstr ""
+
+#: read.c:1483
+#, c-format
+msgid "size of \"%s\" is already %ld; not changing to %ld"
msgstr ""
#. Some of the back ends can't deal with non-positive line numbers.
-#. Besides, it's silly.
-#: read.c:1636
+#. Besides, it's silly. GCC however will generate a line number of
+#. zero when it is pre-processing builtins for assembler-with-cpp files:
+#.
+#. # 0 "<built-in>"
+#.
+#. 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
#, c-format
msgid "line numbers must be positive; line number %d rejected"
msgstr ""
-#: read.c:1664
+#: read.c:1739
msgid "start address not supported"
msgstr ""
-#: read.c:1674
+#: read.c:1748
msgid ".err encountered"
msgstr ""
-#: read.c:1693 read.c:1695
+#: read.c:1764
+msgid ".error directive invoked in source file"
+msgstr ""
+
+#: read.c:1765
+msgid ".warning directive invoked in source file"
+msgstr ""
+
+#: read.c:1771
+#, c-format
+msgid "%s argument must be a string"
+msgstr ""
+
+#: read.c:1803 read.c:1805
#, c-format
msgid ".fail %ld encountered"
msgstr ""
-#: read.c:1732
+#: read.c:1841
#, c-format
msgid ".fill size clamped to %d"
msgstr ""
-#: read.c:1737
+#: read.c:1846
msgid "size negative; .fill ignored"
msgstr ""
-#: read.c:1743
+#: read.c:1852
msgid "repeat < 0; .fill ignored"
msgstr ""
-#: read.c:1903
+#: read.c:2010
#, c-format
msgid "unrecognized .linkonce type `%s'"
msgstr ""
-#: read.c:1916 read.c:1942
+#: read.c:2022
msgid ".linkonce is not supported for this object file format"
msgstr ""
-#: read.c:1938
+#: read.c:2044
#, c-format
msgid "bfd_set_section_flags: %s"
msgstr ""
-#: read.c:1993
-msgid "missing size expression"
-msgstr ""
-
-#: read.c:1999
-#, c-format
-msgid "BSS length (%d) < 0 ignored"
-msgstr ""
-
-#: read.c:2015
+#: read.c:2070
#, c-format
msgid "error setting flags for \".sbss\": %s"
msgstr ""
-#: read.c:2038
-msgid "expected comma after size"
+#: read.c:2117
+msgid "expected alignment after size"
msgstr ""
-#: read.c:2072
-#, c-format
-msgid "alignment too large; %d assumed"
-msgstr ""
-
-#: read.c:2077
+#: read.c:2131
msgid "alignment negative; 0 assumed"
msgstr ""
-#: read.c:2342
+#: read.c:2340
#, c-format
msgid "attempt to redefine pseudo-op `%s' ignored"
msgstr ""
-#: read.c:2408
+#: read.c:2401
#, c-format
msgid "invalid segment \"%s\""
msgstr ""
-#: read.c:2416
+#: read.c:2409
msgid "only constant offsets supported in absolute section"
msgstr ""
-#: read.c:2456
+#: read.c:2448
msgid "MRI style ORG pseudo-op not supported"
msgstr ""
-#: read.c:2613
+#: read.c:2601
#, c-format
msgid "unrecognized section type `%s'"
msgstr ""
-#: read.c:2627
+#: read.c:2615
msgid "absolute sections are not supported"
msgstr ""
-#: read.c:2642
+#: read.c:2630
#, c-format
msgid "unrecognized section command `%s'"
msgstr ""
-#: read.c:2708
-msgid ".endr encountered without preceeding .rept, .irc, or .irp"
+#: read.c:2694
+#, c-format
+msgid ".end%c encountered without preceeding %s"
msgstr ""
-#: read.c:2740
+#: read.c:2724
#, c-format
msgid "%s without %s"
msgstr ""
-#: read.c:2949
+#: read.c:2951
msgid "unsupported variable size or fill value"
msgstr ""
-#: read.c:2974
+#: read.c:2979
msgid ".space repeat count is zero, ignored"
msgstr ""
-#: read.c:2976
+#: read.c:2981
msgid ".space repeat count is negative, ignored"
msgstr ""
-#: read.c:3005
+#: read.c:3010
msgid "space allocation too complex in absolute section"
msgstr ""
-#: read.c:3011
+#: read.c:3016
msgid "space allocation too complex in common section"
msgstr ""
-#: read.c:3099 read.c:4190
+#: read.c:3103 read.c:4276
#, c-format
msgid "bad floating literal: %s"
msgstr ""
-#: read.c:3172
+#: read.c:3243
#, c-format
-msgid "rest of line ignored; first ignored character is `%c'"
+msgid "%s: would close weakref loop: %s"
msgstr ""
-#: read.c:3175
+#: read.c:3286
#, c-format
-msgid "rest of line ignored; first ignored character valued 0x%x"
+msgid "junk at end of line, first unrecognized character is `%c'"
msgstr ""
-#: read.c:3228
+#: read.c:3289
+#, c-format
+msgid "junk at end of line, first unrecognized character valued 0x%x"
+msgstr ""
+
+#: read.c:3347
msgid "missing expression"
msgstr ""
-#: read.c:3404
+#: read.c:3408
+#, c-format
+msgid "`%s' can't be equated to common symbol '%s'"
+msgstr ""
+
+#: read.c:3536
msgid "rva without symbol"
msgstr ""
-#: read.c:3530
+#: read.c:3658
msgid "attempt to store value in absolute section"
msgstr ""
-#: read.c:3568 read.c:4468
+#: read.c:3696 read.c:4544
msgid "zero assumed for missing expression"
msgstr ""
-#: read.c:3580 read.c:4480 write.c:322
+#: read.c:3708 read.c:4556 write.c:265
msgid "register value used as expression"
msgstr ""
#. Leading bits contain both 0s & 1s.
-#: read.c:3671
+#: read.c:3786
#, c-format
msgid "value 0x%lx truncated to 0x%lx"
msgstr ""
-#: read.c:3687
+#: read.c:3802
#, c-format
msgid "bignum truncated to %d bytes"
msgstr ""
-#: read.c:3854
+#: read.c:3943
msgid "using a bit field width of zero"
msgstr ""
-#: read.c:3862
+#: read.c:3951
#, c-format
msgid "field width \"%s\" too complex for a bitfield"
msgstr ""
-#: read.c:3870
+#: read.c:3959
#, c-format
msgid "field width %lu too big to fit in %d bytes: truncated to %d bits"
msgstr ""
-#: read.c:3892
+#: read.c:3981
#, c-format
msgid "field value \"%s\" too complex for a bitfield"
msgstr ""
-#: read.c:4018 read.c:4212
+#: read.c:4107 read.c:4298
msgid "unresolvable or nonpositive repeat count; using 1"
msgstr ""
-#: read.c:4069
+#: read.c:4156
#, c-format
msgid "unknown floating type type '%c'"
msgstr ""
-#: read.c:4091
+#: read.c:4178
msgid "floating point constant too large"
msgstr ""
-#: read.c:4581
+#: read.c:4670
msgid "strings must be placed into a section"
msgstr ""
-#: read.c:4631
+#: read.c:4720
msgid "expected <nn>"
msgstr ""
#. To be compatible with BSD 4.2 as: give the luser a linefeed!!
-#: read.c:4664 read.c:4750
+#: read.c:4753 read.c:4839
msgid "unterminated string; newline inserted"
msgstr ""
-#: read.c:4758
+#: read.c:4847
msgid "bad escaped character in string"
msgstr ""
-#: read.c:4784
+#: read.c:4872
msgid "expected address expression"
msgstr ""
-#: read.c:4804
+#: read.c:4891
#, c-format
msgid "symbol \"%s\" undefined; zero assumed"
msgstr ""
-#: read.c:4807
+#: read.c:4894
msgid "some symbol undefined; zero assumed"
msgstr ""
-#: read.c:4824
-msgid "bad or irreducible absolute expression"
-msgstr ""
-
-#: read.c:4867
+#: read.c:4930
msgid "this string may not contain '\\0'"
msgstr ""
-#: read.c:4904
+#: read.c:4966
msgid "missing string"
msgstr ""
-#: read.c:5027
+#: read.c:5053
#, c-format
msgid ".incbin count zero, ignoring `%s'"
msgstr ""
-#: read.c:5053
+#: read.c:5079
#, c-format
msgid "file not found: %s"
msgstr ""
-#: read.c:5067
+#: read.c:5093
#, c-format
msgid "seek to end of .incbin file failed `%s'"
msgstr ""
-#: read.c:5078
+#: read.c:5104
#, c-format
-msgid "skip (%ld) + count (%ld) larger than file size (%ld)"
+msgid "skip (%ld) or count (%ld) invalid for file size (%ld)"
msgstr ""
-#: read.c:5085
+#: read.c:5111
#, c-format
msgid "could not skip to %ld in file `%s'"
msgstr ""
-#: read.c:5094
+#: read.c:5120
#, c-format
msgid "truncated file `%s', %ld of %ld bytes read"
msgstr ""
-#: read.c:5257
+#: read.c:5278
msgid "missing .func"
msgstr ""
-#: read.c:5274
+#: read.c:5295
msgid ".endfunc missing for previous .func"
msgstr ""
-#: stabs.c:220 stabs.c:228 stabs.c:236 stabs.c:255
+#: read.c:5418
+#, c-format
+msgid "missing closing `%c'"
+msgstr ""
+
+#: read.c:5420
+msgid "stray `\\'"
+msgstr ""
+
+#: stabs.c:212 stabs.c:220 stabs.c:228 stabs.c:247
#, c-format
msgid ".stab%c: missing comma"
msgstr ""
@@ -11285,183 +12098,196 @@ msgstr ""
#. This could happen for example with a source file with a huge
#. number of lines. The only cure is to use a different debug
#. format, probably DWARF.
-#: stabs.c:248
+#: stabs.c:240
#, c-format
msgid ".stab%c: description field '%x' too big, try a different debug format"
msgstr ""
-#: stabs.c:433
+#: stabs.c:421
msgid "comma missing in .xstabs"
msgstr ""
-#: subsegs.c:377
-#, c-format
-msgid "attempt to switch to nonexistent segment \"%s\""
-msgstr ""
-
-#: symbols.c:318
+#: symbols.c:278
#, c-format
msgid "cannot define symbol `%s' in absolute section"
msgstr ""
-#: symbols.c:452
+#: symbols.c:409
#, c-format
msgid "symbol `%s' is already defined as \"%s\"/%s%ld"
msgstr ""
-#: symbols.c:529 symbols.c:536
+#: symbols.c:483 symbols.c:490
#, c-format
msgid "inserting \"%s\" into symbol table failed: %s"
msgstr ""
-#: symbols.c:874 symbols.c:878
+#: symbols.c:864 symbols.c:868
#, c-format
msgid "undefined symbol `%s' in operation"
msgstr ""
-#: symbols.c:885
+#: symbols.c:875
#, c-format
msgid "invalid sections for operation on `%s' and `%s'"
msgstr ""
-#: symbols.c:889
+#: symbols.c:879
#, c-format
msgid "invalid section for operation on `%s'"
msgstr ""
-#: symbols.c:897 symbols.c:900
+#: symbols.c:887 symbols.c:890
#, c-format
msgid "undefined symbol `%s' in operation setting `%s'"
msgstr ""
-#: symbols.c:907
+#: symbols.c:897
#, c-format
msgid "invalid sections for operation on `%s' and `%s' setting `%s'"
msgstr ""
-#: symbols.c:911
+#: symbols.c:901
#, c-format
msgid "invalid section for operation on `%s' setting `%s'"
msgstr ""
-#: symbols.c:964
+#: symbols.c:951
#, c-format
msgid "symbol definition loop encountered at `%s'"
msgstr ""
-#: symbols.c:1193
+#: symbols.c:1209
#, c-format
msgid "division by zero when setting `%s'"
msgstr ""
-#: symbols.c:1280 write.c:2008
+#: symbols.c:1291 write.c:1545
#, c-format
msgid "can't resolve value for symbol `%s'"
msgstr ""
-#: symbols.c:1674
+#: symbols.c:1738
#, c-format
msgid "\"%d\" (instance number %d of a %s label)"
msgstr ""
-#: symbols.c:1711
+#: symbols.c:1775
#, c-format
msgid "attempt to get value of unresolved symbol `%s'"
msgstr ""
-#: symbols.c:1971
+#: symbols.c:2045
msgid "section symbols are already global"
msgstr ""
-#: symbols.c:2014
+#: symbols.c:2150
#, c-format
msgid "Accessing function `%s' as thread-local object"
msgstr ""
-#: symbols.c:2018
+#: symbols.c:2154
#, c-format
msgid "Accessing `%s' as thread-local object"
msgstr ""
-#: write.c:215
+#: write.c:164
#, c-format
msgid "field fx_size too small to hold %d"
msgstr ""
-#: write.c:349
-msgid "rva not supported"
+#: write.c:440
+#, c-format
+msgid "attempt to .org/.space backwards? (%ld)"
msgstr ""
-#: write.c:570
+#: write.c:691
#, c-format
-msgid "attempt to .org/.space backwards? (%ld)"
+msgid "Local symbol `%s' can't be equated to undefined symbol `%s'"
msgstr ""
-#: write.c:1002 write.c:1074
+#: write.c:865 write.c:937
msgid "relocation out of range"
msgstr ""
-#: write.c:1005 write.c:1077
+#: write.c:868 write.c:940
#, c-format
msgid "%s:%u: bad return from bfd_install_relocation: %x"
msgstr ""
-#: write.c:1057
+#: write.c:920
msgid "internal error: fixup not contained within frag"
msgstr ""
-#: write.c:1164 write.c:1188
+#: write.c:1026 write.c:1050
#, c-format
msgid "FATAL: Can't write %s"
msgstr ""
-#: write.c:1220
+#: write.c:1082
msgid "cannot write to output file"
msgstr ""
-#: write.c:1477
+#: write.c:1223
#, c-format
msgid "%d error%s, %d warning%s, generating bad object file"
msgstr ""
-#: write.c:1484
+#: write.c:1230
#, c-format
msgid "%d error%s, %d warning%s, no object file generated"
msgstr ""
-#: write.c:1945
+#: write.c:1464
+#, c-format
+msgid "%s: global symbols not supported in common sections"
+msgstr ""
+
+#: write.c:1478
#, c-format
msgid "local label `%s' is not defined"
msgstr ""
-#: write.c:2244
+#: write.c:1498
+#, c-format
+msgid "Local symbol `%s' can't be equated to common symbol `%s'"
+msgstr ""
+
+#: write.c:1768
#, c-format
msgid "alignment padding (%lu bytes) not a multiple of %ld"
msgstr ""
-#: write.c:2361
+#: write.c:1900
#, c-format
msgid ".word %s-%s+%s didn't fit"
msgstr ""
-#: write.c:2446
+#: write.c:1976
msgid "attempt to move .org backwards"
msgstr ""
-#: write.c:2474
+#: write.c:2004
msgid ".space specifies non-absolute value"
msgstr ""
-#: write.c:2481
+#: write.c:2011
msgid ".space or .fill with negative value, ignored"
msgstr ""
-#: write.c:2773
+#: write.c:2067
+#, 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:2785
+#: 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 f97bd25d2fb6..0485d72dec67 100644
--- a/contrib/binutils/gas/read.c
+++ b/contrib/binutils/gas/read.c
@@ -1,6 +1,7 @@
/* read.c - read a source file -
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,17 +17,13 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
-#if 0
-/* If your chars aren't 8 bits, you will change this a bit.
+/* If your chars aren't 8 bits, you will change this a bit (eg. to 0xFF).
But then, GNU isn't spozed to run on your machine anyway.
(RMS is so shortsighted sometimes.) */
-#define MASK_CHAR (0xFF)
-#else
#define MASK_CHAR ((int)(unsigned char) -1)
-#endif
/* This is the largest known floating point format (for now). It will
grow when we do 4361 style flonums. */
@@ -75,7 +72,6 @@ die horribly;
#endif
#ifndef LEX_AT
-/* The m88k unfortunately uses @ as a label beginner. */
#define LEX_AT 0
#endif
@@ -101,7 +97,6 @@ die horribly;
#endif
#ifndef LEX_DOLLAR
-/* The a29k assembler does not permits labels to start with $. */
#define LEX_DOLLAR 3
#endif
@@ -214,13 +209,17 @@ static int dwarf_file_string;
#endif
#endif
+static void do_s_func (int end_p, const char *default_prefix);
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);
static int hex_float (int, char *);
static segT get_known_segmented_expression (expressionS * expP);
static void pobegin (void);
static int get_line_sb (sb *);
static void generate_file_debug (void);
+static char *_find_end_of_line (char *, int, int);
void
read_begin (void)
@@ -244,6 +243,22 @@ read_begin (void)
lex_type['?'] = 3;
}
+#ifndef TC_ADDRESS_BYTES
+#define TC_ADDRESS_BYTES address_bytes
+
+static inline int
+address_bytes (void)
+{
+ /* Choose smallest of 1, 2, 4, 8 bytes that is large enough to
+ contain an address. */
+ int n = (stdoutput->arch_info->bits_per_address - 1) / 8;
+ n |= n >> 1;
+ n |= n >> 2;
+ n += 1;
+ return n;
+}
+#endif
+
/* Set up pseudo-op tables. */
static struct hash_control *po_hash;
@@ -251,6 +266,7 @@ static struct hash_control *po_hash;
static const pseudo_typeS potable[] = {
{"abort", s_abort, 0},
{"align", s_align_ptwo, 0},
+ {"altmacro", s_altmacro, 1},
{"ascii", stringer, 0},
{"asciz", stringer, 1},
{"balign", s_align_bytes, 0},
@@ -263,6 +279,9 @@ static const pseudo_typeS potable[] = {
{"common.s", s_mri_common, 1},
{"data", s_data, 0},
{"dc", cons, 2},
+#ifdef TC_ADDRESS_BYTES
+ {"dc.a", cons, 0},
+#endif
{"dc.b", cons, 1},
{"dc.d", float_cons, 'd'},
{"dc.l", cons, 4},
@@ -299,11 +318,14 @@ static const pseudo_typeS potable[] = {
{"endc", s_endif, 0},
{"endfunc", s_func, 1},
{"endif", s_endif, 0},
- {"endr", s_bad_endr, 0},
+ {"endm", s_bad_end, 0},
+ {"endr", s_bad_end, 1},
/* endef */
{"equ", s_set, 0},
{"equiv", s_set, 1},
+ {"eqv", s_set, -1},
{"err", s_err, 0},
+ {"error", s_errwarn, 1},
{"exitm", s_mexit, 0},
/* extend */
{"extern", s_ignore, 0}, /* We treat all undef as ext. */
@@ -319,6 +341,7 @@ static const pseudo_typeS potable[] = {
{"globl", s_globl, 0},
{"hword", cons, 2},
{"if", s_if, (int) O_ne},
+ {"ifb", s_ifb, 1},
{"ifc", s_ifc, 0},
{"ifdef", s_ifdef, 0},
{"ifeq", s_if, (int) O_eq},
@@ -327,6 +350,7 @@ static const pseudo_typeS potable[] = {
{"ifgt", s_if, (int) O_gt},
{"ifle", s_if, (int) O_le},
{"iflt", s_if, (int) O_lt},
+ {"ifnb", s_ifb, 0},
{"ifnc", s_ifc, 1},
{"ifndef", s_ifdef, 1},
{"ifne", s_if, (int) O_ne},
@@ -351,6 +375,7 @@ static const pseudo_typeS potable[] = {
{"mri", s_mri, 0},
{".mri", s_mri, 0}, /* Special case so .mri works in MRI mode. */
{"name", s_ignore, 0},
+ {"noaltmacro", s_altmacro, 0},
{"noformat", s_ignore, 0},
{"nolist", listing_list, 0}, /* Turn listing off. */
{"nopage", listing_nopage, 0},
@@ -408,11 +433,34 @@ static const pseudo_typeS potable[] = {
{"xdef", s_globl, 0},
{"xref", s_ignore, 0},
{"xstabs", s_xstab, 's'},
+ {"warning", s_errwarn, 0},
+ {"weakref", s_weakref, 0},
{"word", cons, 2},
{"zero", s_space, 0},
{NULL, NULL, 0} /* End sentinel. */
};
+static offsetT
+get_absolute_expr (expressionS *exp)
+{
+ expression_and_evaluate (exp);
+ if (exp->X_op != O_constant)
+ {
+ if (exp->X_op != O_absent)
+ as_bad (_("bad or irreducible absolute expression"));
+ exp->X_add_number = 0;
+ }
+ return exp->X_add_number;
+}
+
+offsetT
+get_absolute_expression (void)
+{
+ expressionS exp;
+
+ return get_absolute_expr (&exp);
+}
+
static int pop_override_ok = 0;
static const char *pop_table_name;
@@ -470,9 +518,11 @@ pobegin (void)
#define HANDLE_CONDITIONAL_ASSEMBLY() \
if (ignore_input ()) \
{ \
- while (!is_end_of_line[(unsigned char) *input_line_pointer++]) \
- if (input_line_pointer == buffer_limit) \
- break; \
+ char *eol = find_end_of_line (input_line_pointer, flag_m68k_mri); \
+ input_line_pointer = (input_line_pointer <= buffer_limit \
+ && eol >= buffer_limit) \
+ ? buffer_limit \
+ : eol + 1; \
continue; \
}
@@ -495,6 +545,32 @@ scrub_from_string (char *buf, int buflen)
return copy;
}
+/* Helper function of read_a_source_file, which tries to expand a macro. */
+static int
+try_macro (char term, const char *line)
+{
+ sb out;
+ const char *err;
+ macro_entry *macro;
+
+ if (check_macro (line, &out, &err, &macro))
+ {
+ if (err != NULL)
+ as_bad ("%s", err);
+ *input_line_pointer++ = term;
+ input_scrub_include_sb (&out,
+ input_line_pointer, 1);
+ sb_kill (&out);
+ buffer_limit =
+ input_scrub_next_buffer (&input_line_pointer);
+#ifdef md_macro_info
+ md_macro_info (macro);
+#endif
+ return 1;
+ }
+ return 0;
+}
+
/* We read the file, putting things into a web that represents what we
have been reading. */
void
@@ -522,6 +598,13 @@ read_a_source_file (char *name)
while ((buffer_limit = input_scrub_next_buffer (&input_line_pointer)) != 0)
{ /* We have another line to parse. */
+#ifndef NO_LISTING
+ /* In order to avoid listing macro expansion lines with labels
+ multiple times, keep track of which line was last issued. */
+ static char *last_eol;
+
+ last_eol = NULL;
+#endif
know (buffer_limit[-1] == '\n'); /* Must have a sentinel. */
while (input_line_pointer < buffer_limit)
@@ -637,21 +720,23 @@ read_a_source_file (char *name)
int len;
/* Find the end of the current expanded macro line. */
- for (s = input_line_pointer - 1; *s; ++s)
- if (is_end_of_line[(unsigned char) *s])
- break;
+ s = find_end_of_line (input_line_pointer - 1, flag_m68k_mri);
- /* Copy it for safe keeping. Also give an indication of
- how much macro nesting is involved at this point. */
- len = s - (input_line_pointer - 1);
- copy = (char *) xmalloc (len + macro_nest + 2);
- memset (copy, '>', macro_nest);
- copy[macro_nest] = ' ';
- memcpy (copy + macro_nest + 1, input_line_pointer - 1, len);
- copy[macro_nest + 1 + len] = '\0';
-
- /* Install the line with the listing facility. */
- listing_newline (copy);
+ if (s != last_eol)
+ {
+ last_eol = s;
+ /* Copy it for safe keeping. Also give an indication of
+ how much macro nesting is involved at this point. */
+ len = s - (input_line_pointer - 1);
+ copy = (char *) xmalloc (len + macro_nest + 2);
+ memset (copy, '>', macro_nest);
+ copy[macro_nest] = ' ';
+ memcpy (copy + macro_nest + 1, input_line_pointer - 1, len);
+ copy[macro_nest + 1 + len] = '\0';
+
+ /* Install the line with the listing facility. */
+ listing_newline (copy);
+ }
}
else
listing_newline (NULL);
@@ -704,13 +789,21 @@ read_a_source_file (char *name)
/* Input_line_pointer->after ':'. */
SKIP_WHITESPACE ();
}
- else if (c == '='
- || ((c == ' ' || c == '\t')
- && input_line_pointer[1] == '='
+ else if (input_line_pointer[1] == '='
+ && (c == '='
+ || ((c == ' ' || c == '\t')
+ && input_line_pointer[2] == '=')))
+ {
+ equals (s, -1);
+ demand_empty_rest_of_line ();
+ }
+ else if ((c == '='
+ || ((c == ' ' || c == '\t')
+ && input_line_pointer[1] == '='))
#ifdef TC_EQUAL_IN_INSN
- && !TC_EQUAL_IN_INSN (c, input_line_pointer)
+ && !TC_EQUAL_IN_INSN (c, s)
#endif
- ))
+ )
{
equals (s, 1);
demand_empty_rest_of_line ();
@@ -736,8 +829,8 @@ read_a_source_file (char *name)
#endif
if (NO_PSEUDO_DOT || flag_m68k_mri)
{
- /* The MRI assembler and the m88k use pseudo-ops
- without a period. */
+ /* The MRI assembler uses pseudo-ops without
+ a period. */
pop = (pseudo_typeS *) hash_find (po_hash, s);
if (pop != NULL && pop->poc_handler == NULL)
pop = NULL;
@@ -791,9 +884,18 @@ read_a_source_file (char *name)
/* Print the error msg now, while we still can. */
if (pop == NULL)
{
- as_bad (_("unknown pseudo-op: `%s'"), s);
+ char *end = input_line_pointer;
+
*input_line_pointer = c;
s_ignore (0);
+ c = *--input_line_pointer;
+ *input_line_pointer = '\0';
+ if (! macro_defined || ! try_macro (c, s))
+ {
+ *end = '\0';
+ as_bad (_("unknown pseudo-op: `%s'"), s);
+ *input_line_pointer++ = c;
+ }
continue;
}
@@ -816,61 +918,17 @@ read_a_source_file (char *name)
}
else
{
- int inquote = 0;
-#ifdef QUOTES_IN_INSN
- int inescape = 0;
-#endif
-
/* WARNING: c has char, which may be end-of-line. */
/* Also: input_line_pointer->`\0` where c was. */
*input_line_pointer = c;
- while (!is_end_of_line[(unsigned char) *input_line_pointer]
- || inquote
-#ifdef TC_EOL_IN_INSN
- || TC_EOL_IN_INSN (input_line_pointer)
-#endif
- )
- {
- if (flag_m68k_mri && *input_line_pointer == '\'')
- inquote = !inquote;
-#ifdef QUOTES_IN_INSN
- if (inescape)
- inescape = 0;
- else if (*input_line_pointer == '"')
- inquote = !inquote;
- else if (*input_line_pointer == '\\')
- inescape = 1;
-#endif
- input_line_pointer++;
- }
-
+ input_line_pointer = _find_end_of_line (input_line_pointer, flag_m68k_mri, 1);
c = *input_line_pointer;
*input_line_pointer = '\0';
generate_lineno_debug ();
- if (macro_defined)
- {
- sb out;
- const char *err;
- macro_entry *macro;
-
- if (check_macro (s, &out, &err, &macro))
- {
- if (err != NULL)
- as_bad ("%s", err);
- *input_line_pointer++ = c;
- input_scrub_include_sb (&out,
- input_line_pointer, 1);
- sb_kill (&out);
- buffer_limit =
- input_scrub_next_buffer (&input_line_pointer);
-#ifdef md_macro_info
- md_macro_info (macro);
-#endif
- continue;
- }
- }
+ if (macro_defined && try_macro (c, s))
+ continue;
if (mri_pending_align)
{
@@ -1077,6 +1135,29 @@ read_a_source_file (char *name)
#endif
}
+/* Convert O_constant expression EXP into the equivalent O_big representation.
+ Take the sign of the number from X_unsigned rather than X_add_number. */
+
+static void
+convert_to_bignum (expressionS *exp)
+{
+ valueT value;
+ unsigned int i;
+
+ value = exp->X_add_number;
+ for (i = 0; i < sizeof (exp->X_add_number) / CHARS_PER_LITTLENUM; i++)
+ {
+ generic_bignum[i] = value & LITTLENUM_MASK;
+ value >>= LITTLENUM_NUMBER_OF_BITS;
+ }
+ /* Add a sequence of sign bits if the top bit of X_add_number is not
+ the sign of the original value. */
+ if ((exp->X_add_number < 0) != !exp->X_unsigned)
+ generic_bignum[i++] = exp->X_unsigned ? 0 : LITTLENUM_MASK;
+ exp->X_op = O_big;
+ exp->X_add_number = i;
+}
+
/* For most MRI pseudo-ops, the line actually ends at the first
nonquoted space. This function looks for that point, stuffs a null
in, and sets *STOPCP to the character that used to be there, and
@@ -1155,6 +1236,9 @@ do_align (int n, char *fill, int len, int max)
len = 0;
}
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
#ifdef md_do_align
md_do_align (n, fill, len, max, just_record_alignment);
#endif
@@ -1187,10 +1271,13 @@ do_align (int n, char *fill, int len, int max)
fill pattern. BYTES_P is non-zero if the alignment value should be
interpreted as the byte boundary, rather than the power of 2. */
+#define ALIGN_LIMIT (stdoutput->arch_info->bits_per_address - 1)
+
static void
s_align (int arg, int bytes_p)
{
- register unsigned int align;
+ unsigned int align_limit = ALIGN_LIMIT;
+ unsigned int align;
char *stop = NULL;
char stopc;
offsetT fill = 0;
@@ -1229,9 +1316,9 @@ s_align (int arg, int bytes_p)
}
}
- if (align > 15)
+ if (align > align_limit)
{
- align = 15;
+ align = align_limit;
as_warn (_("alignment too large: %u assumed"), align);
}
@@ -1317,6 +1404,15 @@ s_align_ptwo (int arg)
s_align (arg, 0);
}
+/* Switch in and out of alternate macro mode. */
+
+void
+s_altmacro (int on)
+{
+ demand_empty_rest_of_line ();
+ macro_set_alternate (on);
+}
+
symbolS *
s_comm_internal (int param,
symbolS *(*comm_parse_extra) (int, symbolS *, addressT))
@@ -1342,7 +1438,7 @@ s_comm_internal (int param,
if (name == p)
{
as_bad (_("expected symbol name"));
- discard_rest_of_line ();
+ ignore_rest_of_line ();
goto out;
}
@@ -1353,35 +1449,43 @@ s_comm_internal (int param,
if (*input_line_pointer == ',')
input_line_pointer++;
- *p = 0;
temp = get_absolute_expr (&exp);
size = temp;
-#ifdef BFD_ASSEMBLER
size &= ((offsetT) 2 << (stdoutput->arch_info->bits_per_address - 1)) - 1;
-#endif
if (exp.X_op == O_absent)
{
as_bad (_("missing size expression"));
- *p = c;
ignore_rest_of_line ();
goto out;
}
else if (temp != size || !exp.X_unsigned)
{
as_warn (_("size (%ld) out of range, ignored"), (long) temp);
- *p = c;
ignore_rest_of_line ();
goto out;
}
+ *p = 0;
symbolP = symbol_find_or_make (name);
- if (S_IS_DEFINED (symbolP) && !S_IS_COMMON (symbolP))
+ if ((S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
+ && !S_IS_COMMON (symbolP))
{
- symbolP = NULL;
- as_bad (_("symbol `%s' is already defined"), name);
- *p = c;
- ignore_rest_of_line ();
- goto out;
+ if (!S_IS_VOLATILE (symbolP))
+ {
+ symbolP = NULL;
+ as_bad (_("symbol `%s' is already defined"), name);
+ *p = c;
+ 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);
+ S_SET_SEGMENT (symbolP, undefined_section);
+ S_SET_VALUE (symbolP, 0);
+ symbol_set_frag (symbolP, &zero_address_frag);
+ S_CLEAR_VOLATILE (symbolP);
}
size = S_GET_VALUE (symbolP);
@@ -1398,6 +1502,7 @@ s_comm_internal (int param,
{
S_SET_VALUE (symbolP, (valueT) size);
S_SET_EXTERNAL (symbolP);
+ S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
#ifdef OBJ_VMS
{
extern int flag_one;
@@ -1407,7 +1512,6 @@ s_comm_internal (int param,
#endif
}
- know (symbolP == NULL || symbolP->sy_frag == &zero_address_frag);
demand_empty_rest_of_line ();
out:
if (flag_mri)
@@ -1492,6 +1596,7 @@ s_mri_common (int small ATTRIBUTE_UNUSED)
}
S_SET_EXTERNAL (sym);
+ S_SET_SEGMENT (sym, bfd_com_section_ptr);
mri_common_symbol = sym;
#ifdef S_SET_ALIGN
@@ -1555,7 +1660,7 @@ s_data (int ignore ATTRIBUTE_UNUSED)
.file. */
void
-s_app_file_string (char *file)
+s_app_file_string (char *file, int appfile ATTRIBUTE_UNUSED)
{
#ifdef LISTING
if (listing)
@@ -1563,7 +1668,7 @@ s_app_file_string (char *file)
#endif
register_dependency (file);
#ifdef obj_app_file
- obj_app_file (file);
+ obj_app_file (file, appfile);
#endif
}
@@ -1591,7 +1696,7 @@ s_app_file (int appfile)
demand_empty_rest_of_line ();
if (!may_omit)
- s_app_file_string (s);
+ s_app_file_string (s, appfile);
}
}
@@ -1607,9 +1712,17 @@ s_app_line (int ignore ATTRIBUTE_UNUSED)
/* The given number is that of the next line. */
l = get_absolute_expression () - 1;
- if (l < 0)
+
+ if (l < -1)
/* Some of the back ends can't deal with non-positive line numbers.
- Besides, it's silly. */
+ Besides, it's silly. GCC however will generate a line number of
+ zero when it is pre-processing builtins for assembler-with-cpp files:
+
+ # 0 "<built-in>"
+
+ 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. */
as_warn (_("line numbers must be positive; line number %d rejected"),
l + 1);
else
@@ -1650,6 +1763,43 @@ s_err (int ignore ATTRIBUTE_UNUSED)
demand_empty_rest_of_line ();
}
+/* Handle the .error and .warning pseudo-ops. */
+
+void
+s_errwarn (int err)
+{
+ int len;
+ /* The purpose for the conditional assignment is not to
+ internationalize the directive itself, but that we need a
+ self-contained message, one that can be passed like the
+ demand_copy_C_string return value, and with no assumption on the
+ location of the name of the directive within the message. */
+ char *msg
+ = (err ? _(".error directive invoked in source file")
+ : _(".warning directive invoked in source file"));
+
+ if (!is_it_end_of_statement ())
+ {
+ if (*input_line_pointer != '\"')
+ {
+ as_bad (_("%s argument must be a string"),
+ err ? ".error" : ".warning");
+ ignore_rest_of_line ();
+ return;
+ }
+
+ msg = demand_copy_C_string (&len);
+ if (msg == NULL)
+ return;
+ }
+
+ if (err)
+ as_bad ("%s", msg);
+ else
+ as_warn ("%s", msg);
+ demand_empty_rest_of_line ();
+}
+
/* Handle the MRI fail pseudo-op. */
void
@@ -1815,7 +1965,7 @@ s_globl (int ignore ATTRIBUTE_UNUSED)
void
s_irp (int irpc)
{
- char *file;
+ char *file, *eol;
unsigned int line;
sb s;
const char *err;
@@ -1824,8 +1974,9 @@ s_irp (int irpc)
as_where (&file, &line);
sb_new (&s);
- while (!is_end_of_line[(unsigned char) *input_line_pointer])
- sb_add_char (&s, *input_line_pointer++);
+ eol = find_end_of_line (input_line_pointer, 0);
+ sb_add_buffer (&s, input_line_pointer, eol - input_line_pointer);
+ input_line_pointer = eol;
sb_new (&out);
@@ -1878,7 +2029,6 @@ s_linkonce (int ignore ATTRIBUTE_UNUSED)
#ifdef obj_handle_link_once
obj_handle_link_once (type);
#else /* ! defined (obj_handle_link_once) */
-#ifdef BFD_ASSEMBLER
{
flagword flags;
@@ -1908,9 +2058,6 @@ s_linkonce (int ignore ATTRIBUTE_UNUSED)
as_bad (_("bfd_set_section_flags: %s"),
bfd_errmsg (bfd_get_error ()));
}
-#else /* ! defined (BFD_ASSEMBLER) */
- as_warn (_(".linkonce is not supported for this object file format"));
-#endif /* ! defined (BFD_ASSEMBLER) */
#endif /* ! defined (obj_handle_link_once) */
demand_empty_rest_of_line ();
@@ -1933,11 +2080,9 @@ bss_alloc (symbolS *symbolP, addressT size, int align)
{
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
@@ -2073,7 +2218,7 @@ s_lsym (int ignore ATTRIBUTE_UNUSED)
if (name == p)
{
as_bad (_("expected symbol name"));
- discard_rest_of_line ();
+ ignore_rest_of_line ();
return;
}
@@ -2089,7 +2234,7 @@ s_lsym (int ignore ATTRIBUTE_UNUSED)
}
input_line_pointer++;
- expression (&exp);
+ expression_and_evaluate (&exp);
if (exp.X_op != O_constant
&& exp.X_op != O_register)
@@ -2102,15 +2247,7 @@ s_lsym (int ignore ATTRIBUTE_UNUSED)
*p = 0;
symbolP = symbol_find_or_make (name);
- /* FIXME-SOON I pulled a (&& symbolP->sy_other == 0 &&
- symbolP->sy_desc == 0) out of this test because coff doesn't have
- those fields, and I can't see when they'd ever be tripped. I
- don't think I understand why they were here so I may have
- introduced a bug. As recently as 1.37 didn't have this test
- anyway. xoxorich. */
-
- if (S_GET_SEGMENT (symbolP) == undefined_section
- && S_GET_VALUE (symbolP) == 0)
+ if (S_GET_SEGMENT (symbolP) == undefined_section)
{
/* The name might be an undefined .global symbol; be sure to
keep the "external" bit. */
@@ -2135,8 +2272,7 @@ s_lsym (int ignore ATTRIBUTE_UNUSED)
static int
get_line_sb (sb *line)
{
- char quote1, quote2, inquote;
- unsigned char c;
+ char *eol;
if (input_line_pointer[-1] == '\n')
bump_line_counters ();
@@ -2148,45 +2284,16 @@ get_line_sb (sb *line)
return 0;
}
- /* If app.c sets any other characters to LEX_IS_STRINGQUOTE, this
- code needs to be changed. */
- if (!flag_m68k_mri)
- quote1 = '"';
- else
- quote1 = '\0';
-
- quote2 = '\0';
- if (flag_m68k_mri)
- quote2 = '\'';
-#ifdef LEX_IS_STRINGQUOTE
- quote2 = '\'';
-#endif
-
- inquote = '\0';
-
- while ((c = * input_line_pointer ++) != 0
- && (!is_end_of_line[c]
- || (inquote != '\0' && c != '\n')))
- {
- if (inquote == c)
- inquote = '\0';
- else if (inquote == '\0')
- {
- if (c == quote1)
- inquote = quote1;
- else if (c == quote2)
- inquote = quote2;
- }
-
- sb_add_char (line, c);
- }
+ eol = find_end_of_line (input_line_pointer, flag_m68k_mri);
+ sb_add_buffer (line, input_line_pointer, eol - input_line_pointer);
+ input_line_pointer = eol;
/* Don't skip multiple end-of-line characters, because that breaks support
for the IA-64 stop bit (;;) which looks like two consecutive end-of-line
characters but isn't. Instead just skip one end of line character and
return the character skipped so that the caller can re-insert it if
necessary. */
- return c;
+ return *input_line_pointer++;
}
/* Define a macro. This is an interface to macro.c. */
@@ -2194,31 +2301,37 @@ get_line_sb (sb *line)
void
s_macro (int ignore ATTRIBUTE_UNUSED)
{
- char *file;
+ char *file, *eol;
unsigned int line;
sb s;
- sb label;
const char *err;
const char *name;
as_where (&file, &line);
sb_new (&s);
- while (!is_end_of_line[(unsigned char) *input_line_pointer])
- sb_add_char (&s, *input_line_pointer++);
+ eol = find_end_of_line (input_line_pointer, 0);
+ sb_add_buffer (&s, input_line_pointer, eol - input_line_pointer);
+ input_line_pointer = eol;
- sb_new (&label);
if (line_label != NULL)
- sb_add_string (&label, S_GET_NAME (line_label));
+ {
+ sb label;
- err = define_macro (0, &s, &label, get_line_sb, &name);
+ sb_new (&label);
+ sb_add_string (&label, S_GET_NAME (line_label));
+ err = define_macro (0, &s, &label, get_line_sb, file, line, &name);
+ sb_kill (&label);
+ }
+ else
+ err = define_macro (0, &s, NULL, get_line_sb, file, line, &name);
if (err != NULL)
- as_bad_where (file, line, "%s", err);
+ as_bad_where (file, line, err, name);
else
{
if (line_label != NULL)
{
- S_SET_SEGMENT (line_label, undefined_section);
+ S_SET_SEGMENT (line_label, absolute_section);
S_SET_VALUE (line_label, 0);
symbol_set_frag (line_label, &zero_address_frag);
}
@@ -2228,7 +2341,9 @@ s_macro (int ignore ATTRIBUTE_UNUSED)
|| (!flag_m68k_mri
&& *name == '.'
&& hash_find (po_hash, name + 1) != NULL))
- as_warn (_("attempt to redefine pseudo-op `%s' ignored"),
+ as_warn_where (file,
+ line,
+ _("attempt to redefine pseudo-op `%s' ignored"),
name);
}
@@ -2372,8 +2487,7 @@ s_org (int ignore ATTRIBUTE_UNUSED)
called by the obj-format routine which handles section changing
when in MRI mode. It will create a new section, and return it. It
will set *TYPE to the section type: one of 'C' (code), 'D' (data),
- 'M' (mixed), or 'R' (romable). If BFD_ASSEMBLER is defined, the
- flags will be set in the section. */
+ 'M' (mixed), or 'R' (romable). The flags will be set in the section. */
void
s_mri_sect (char *type ATTRIBUTE_UNUSED)
@@ -2427,7 +2541,6 @@ s_mri_sect (char *type ATTRIBUTE_UNUSED)
as_bad (_("unrecognized section type"));
++input_line_pointer;
-#ifdef BFD_ASSEMBLER
{
flagword flags;
@@ -2446,7 +2559,6 @@ s_mri_sect (char *type ATTRIBUTE_UNUSED)
bfd_errmsg (bfd_get_error ()));
}
}
-#endif
}
/* Ignore the HP type. */
@@ -2580,12 +2692,14 @@ s_purgem (int ignore ATTRIBUTE_UNUSED)
demand_empty_rest_of_line ();
}
-/* Handle the .rept pseudo-op. */
+/* Handle the .endm/.endr pseudo-ops. */
-void
-s_bad_endr (int ignore ATTRIBUTE_UNUSED)
+static void
+s_bad_end (int endr)
{
- as_warn (_(".endr encountered without preceeding .rept, .irc, or .irp"));
+ as_warn (_(".end%c encountered without preceeding %s"),
+ endr ? 'r' : 'm',
+ endr ? ".rept, .irp, or .irpc" : ".macro");
demand_empty_rest_of_line ();
}
@@ -2644,51 +2758,15 @@ end_repeat (int extra)
buffer_limit = input_scrub_next_buffer (&input_line_pointer);
}
-/* Handle the .equ, .equiv and .set directives. If EQUIV is 1, then
- this is .equiv, and it is an error if the symbol is already
- defined. */
-
-void
-s_set (int equiv)
+static void
+assign_symbol (char *name, int mode)
{
- register char *name;
- register char delim;
- register char *end_name;
- register symbolS *symbolP;
-
- /* Especial apologies for the random logic:
- this just grew, and could be parsed much more simply!
- Dean in haste. */
- name = input_line_pointer;
- delim = get_symbol_end ();
- end_name = input_line_pointer;
- *end_name = delim;
-
- if (name == end_name)
- {
- as_bad (_("expected symbol name"));
- discard_rest_of_line ();
- return;
- }
-
- SKIP_WHITESPACE ();
-
- if (*input_line_pointer != ',')
- {
- *end_name = 0;
- as_bad (_("expected comma after \"%s\""), name);
- *end_name = delim;
- ignore_rest_of_line ();
- return;
- }
-
- input_line_pointer++;
- *end_name = 0;
+ symbolS *symbolP;
if (name[0] == '.' && name[1] == '\0')
{
/* Turn '. = mumble' into a .org mumble. */
- register segT segment;
+ segT segment;
expressionS exp;
segment = get_known_segmented_expression (&exp);
@@ -2696,13 +2774,13 @@ s_set (int equiv)
if (!need_pass_2)
do_org (segment, &exp, 0);
- *end_name = delim;
return;
}
if ((symbolP = symbol_find (name)) == NULL
&& (symbolP = md_undefined_symbol (name)) == NULL)
{
+ symbolP = symbol_find_or_make (name);
#ifndef NO_LISTING
/* When doing symbol listings, play games with dummy fragments living
outside the normal fragment chain to record the file and line info
@@ -2710,33 +2788,89 @@ s_set (int equiv)
if (listing & LISTING_SYMBOLS)
{
extern struct list_info_struct *listing_tail;
- fragS *dummy_frag = (fragS *) xmalloc (sizeof (fragS));
- memset (dummy_frag, 0, sizeof (fragS));
- dummy_frag->fr_type = rs_fill;
+ fragS *dummy_frag = (fragS *) xcalloc (1, sizeof (fragS));
dummy_frag->line = listing_tail;
- symbolP = symbol_new (name, undefined_section, 0, dummy_frag);
dummy_frag->fr_symbol = symbolP;
+ symbol_set_frag (symbolP, dummy_frag);
}
- else
#endif
- symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
-
#ifdef OBJ_COFF
/* "set" symbols are local unless otherwise specified. */
SF_SET_LOCAL (symbolP);
-#endif /* OBJ_COFF */
+#endif
+ }
+
+ if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
+ {
+ /* Permit register names to be redefined. */
+ if ((mode != 0 || !S_IS_VOLATILE (symbolP))
+ && S_GET_SEGMENT (symbolP) != reg_section)
+ {
+ as_bad (_("symbol `%s' is already defined"), name);
+ symbolP = symbol_clone (symbolP, 0);
+ }
+ /* 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)))
+ symbolP = symbol_clone (symbolP, 1);
}
- symbol_table_insert (symbolP);
+ if (mode == 0)
+ S_SET_VOLATILE (symbolP);
+ else if (mode < 0)
+ S_SET_FORWARD_REF (symbolP);
+
+ pseudo_set (symbolP);
+}
+
+/* Handle the .equ, .equiv, .eqv, and .set directives. If EQUIV is 1,
+ then this is .equiv, and it is an error if the symbol is already
+ defined. If EQUIV is -1, the symbol additionally is a forward
+ reference. */
+
+void
+s_set (int equiv)
+{
+ char *name;
+ char delim;
+ char *end_name;
+ /* Especial apologies for the random logic:
+ this just grew, and could be parsed much more simply!
+ Dean in haste. */
+ name = input_line_pointer;
+ delim = get_symbol_end ();
+ end_name = input_line_pointer;
*end_name = delim;
- if (equiv
- && S_IS_DEFINED (symbolP)
- && S_GET_SEGMENT (symbolP) != reg_section)
- as_bad (_("symbol `%s' is already defined"), S_GET_NAME (symbolP));
+ if (name == end_name)
+ {
+ as_bad (_("expected symbol name"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ SKIP_WHITESPACE ();
+
+ if (*input_line_pointer != ',')
+ {
+ *end_name = 0;
+ as_bad (_("expected comma after \"%s\""), name);
+ *end_name = delim;
+ ignore_rest_of_line ();
+ return;
+ }
+
+ input_line_pointer++;
+ *end_name = 0;
+
+ assign_symbol (name, equiv);
+ *end_name = delim;
- pseudo_set (symbolP);
demand_empty_rest_of_line ();
}
@@ -2818,6 +2952,7 @@ s_space (int mult)
|| val.X_add_number > 0xff
|| (mult != 0 && mult != 1 && val.X_add_number != 0))
{
+ resolve_expression (&exp);
if (exp.X_op != O_constant)
as_bad (_("unsupported variable size or fill value"));
else
@@ -2833,6 +2968,9 @@ s_space (int mult)
}
else
{
+ if (now_seg == absolute_section || mri_common_symbol != NULL)
+ resolve_expression (&exp);
+
if (exp.X_op == O_constant)
{
long repeat;
@@ -3019,6 +3157,140 @@ s_text (int ignore ATTRIBUTE_UNUSED)
const_flag &= ~IN_DEFAULT_SECTION;
#endif
}
+
+/* .weakref x, y sets x as an alias to y that, as long as y is not
+ referenced directly, will cause y to become a weak symbol. */
+void
+s_weakref (int ignore ATTRIBUTE_UNUSED)
+{
+ char *name;
+ char delim;
+ char *end_name;
+ symbolS *symbolP;
+ symbolS *symbolP2;
+ expressionS exp;
+
+ name = input_line_pointer;
+ delim = get_symbol_end ();
+ end_name = input_line_pointer;
+
+ if (name == end_name)
+ {
+ as_bad (_("expected symbol name"));
+ *end_name = delim;
+ ignore_rest_of_line ();
+ return;
+ }
+
+ symbolP = symbol_find_or_make (name);
+
+ if (S_IS_DEFINED (symbolP) || symbol_equated_p (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);
+ S_CLEAR_VOLATILE (symbolP);
+ }
+
+ *end_name = delim;
+
+ SKIP_WHITESPACE ();
+
+ if (*input_line_pointer != ',')
+ {
+ *end_name = 0;
+ as_bad (_("expected comma after \"%s\""), name);
+ *end_name = delim;
+ ignore_rest_of_line ();
+ return;
+ }
+
+ input_line_pointer++;
+
+ SKIP_WHITESPACE ();
+
+ name = input_line_pointer;
+ delim = get_symbol_end ();
+ end_name = input_line_pointer;
+
+ if (name == end_name)
+ {
+ as_bad (_("expected symbol name"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if ((symbolP2 = symbol_find_noref (name, 1)) == NULL
+ && (symbolP2 = md_undefined_symbol (name)) == NULL)
+ {
+ symbolP2 = symbol_find_or_make (name);
+ S_SET_WEAKREFD (symbolP2);
+ }
+ else
+ {
+ symbolS *symp = symbolP2;
+
+ while (S_IS_WEAKREFR (symp) && symp != symbolP)
+ {
+ expressionS *expP = symbol_get_value_expression (symp);
+
+ assert (expP->X_op == O_symbol
+ && expP->X_add_number == 0);
+ symp = expP->X_add_symbol;
+ }
+ if (symp == symbolP)
+ {
+ char *loop;
+
+ loop = concat (S_GET_NAME (symbolP),
+ " => ", S_GET_NAME (symbolP2), NULL);
+
+ symp = symbolP2;
+ while (symp != symbolP)
+ {
+ char *old_loop = loop;
+ symp = symbol_get_value_expression (symp)->X_add_symbol;
+ loop = concat (loop, " => ", S_GET_NAME (symp), NULL);
+ free (old_loop);
+ }
+
+ as_bad (_("%s: would close weakref loop: %s"),
+ S_GET_NAME (symbolP), loop);
+
+ free (loop);
+
+ *end_name = delim;
+ ignore_rest_of_line ();
+ return;
+ }
+
+ /* Short-circuiting instead of just checking here might speed
+ things up a tiny little bit, but loop error messages would
+ miss intermediate links. */
+ /* symbolP2 = symp; */
+ }
+
+ *end_name = delim;
+
+ memset (&exp, 0, sizeof (exp));
+ exp.X_op = O_symbol;
+ exp.X_add_symbol = symbolP2;
+
+ S_SET_SEGMENT (symbolP, undefined_section);
+ symbol_set_value_expression (symbolP, &exp);
+ symbol_set_frag (symbolP, &zero_address_frag);
+ S_SET_WEAKREFR (symbolP);
+
+ demand_empty_rest_of_line ();
+}
/* Verify that we are at the end of a line. If not, issue an error and
@@ -3061,17 +3333,14 @@ ignore_rest_of_line (void)
know (is_end_of_line[(unsigned char) input_line_pointer[-1]]);
}
-void
-discard_rest_of_line (void)
-{
- while (input_line_pointer < buffer_limit
- && !is_end_of_line[(unsigned char) *input_line_pointer])
- input_line_pointer++;
-
- input_line_pointer++;
+/* Sets frag for given symbol to zero_address_frag, except when the
+ symbol frag is already set to a dummy listing frag. */
- /* Return pointing just after end-of-line. */
- know (is_end_of_line[(unsigned char) input_line_pointer[-1]]);
+static void
+set_zero_frag (symbolS *symbolP)
+{
+ if (symbol_get_frag (symbolP)->fr_type != rs_dummy)
+ symbol_set_frag (symbolP, &zero_address_frag);
}
/* In: Pointer to a symbol.
@@ -3085,16 +3354,14 @@ void
pseudo_set (symbolS *symbolP)
{
expressionS exp;
-#if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER)
- int ext;
-#endif /* OBJ_AOUT or OBJ_BOUT */
+ segT seg;
know (symbolP); /* NULL pointer is logic error. */
-#if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER)
- ext = S_IS_EXTERNAL (symbolP);
-#endif /* OBJ_AOUT or OBJ_BOUT */
- (void) expression (&exp);
+ if (!S_IS_FORWARD_REF (symbolP))
+ (void) expression (&exp);
+ else
+ (void) deferred_expression (&exp);
if (exp.X_op == O_illegal)
as_bad (_("illegal expression"));
@@ -3108,6 +3375,7 @@ pseudo_set (symbolS *symbolP)
as_bad (_("floating point number invalid"));
}
else if (exp.X_op == O_subtract
+ && !S_IS_FORWARD_REF (symbolP)
&& SEG_NORMAL (S_GET_SEGMENT (exp.X_add_symbol))
&& (symbol_get_frag (exp.X_add_symbol)
== symbol_get_frag (exp.X_op_symbol)))
@@ -3117,6 +3385,12 @@ pseudo_set (symbolS *symbolP)
- S_GET_VALUE (exp.X_op_symbol));
}
+ if (symbol_section_p (symbolP))
+ {
+ as_bad ("attempt to set value of section symbol");
+ return;
+ }
+
switch (exp.X_op)
{
case O_illegal:
@@ -3126,51 +3400,52 @@ pseudo_set (symbolS *symbolP)
/* Fall through. */
case O_constant:
S_SET_SEGMENT (symbolP, absolute_section);
-#if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER)
- if (ext)
- S_SET_EXTERNAL (symbolP);
- else
- S_CLEAR_EXTERNAL (symbolP);
-#endif /* OBJ_AOUT or OBJ_BOUT */
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
- if (exp.X_op != O_constant)
- symbol_set_frag (symbolP, &zero_address_frag);
+ set_zero_frag (symbolP);
break;
case O_register:
S_SET_SEGMENT (symbolP, reg_section);
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
- symbol_set_frag (symbolP, &zero_address_frag);
+ set_zero_frag (symbolP);
break;
case O_symbol:
- if (S_GET_SEGMENT (exp.X_add_symbol) == undefined_section
- || exp.X_add_number != 0)
- symbol_set_value_expression (symbolP, &exp);
- else if (symbol_section_p (symbolP))
- as_bad ("attempt to set value of section symbol");
- else
+ seg = S_GET_SEGMENT (exp.X_add_symbol);
+ /* For x=undef+const, create an expression symbol.
+ For x=x+const, just update x except when x is an undefined symbol
+ For x=defined+const, evaluate x. */
+ if (symbolP == exp.X_add_symbol
+ && (seg != undefined_section
+ || !symbol_constant_p (symbolP)))
+ {
+ *symbol_X_add_number (symbolP) += exp.X_add_number;
+ break;
+ }
+ else if (!S_IS_FORWARD_REF (symbolP) && seg != undefined_section)
{
symbolS *s = exp.X_add_symbol;
- S_SET_SEGMENT (symbolP, S_GET_SEGMENT (s));
-#if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER)
- if (ext)
- S_SET_EXTERNAL (symbolP);
- else
- S_CLEAR_EXTERNAL (symbolP);
-#endif /* OBJ_AOUT or OBJ_BOUT */
- S_SET_VALUE (symbolP,
- exp.X_add_number + S_GET_VALUE (s));
+ if (S_IS_COMMON (s))
+ as_bad (_("`%s' can't be equated to common symbol '%s'"),
+ S_GET_NAME (symbolP), S_GET_NAME (s));
+
+ S_SET_SEGMENT (symbolP, seg);
+ S_SET_VALUE (symbolP, exp.X_add_number + S_GET_VALUE (s));
symbol_set_frag (symbolP, symbol_get_frag (s));
copy_symbol_attributes (symbolP, s);
+ break;
}
+ S_SET_SEGMENT (symbolP, undefined_section);
+ symbol_set_value_expression (symbolP, &exp);
+ set_zero_frag (symbolP);
break;
default:
- /* The value is some complex expression.
- FIXME: Should we set the segment to anything? */
+ /* The value is some complex expression. */
+ S_SET_SEGMENT (symbolP, expr_section);
symbol_set_value_expression (symbolP, &exp);
+ set_zero_frag (symbolP);
break;
}
}
@@ -3256,6 +3531,11 @@ cons_worker (register int nbytes, /* 1=.byte, 2=.word, 4=.long. */
return;
}
+#ifdef TC_ADDRESS_BYTES
+ if (nbytes == 0)
+ nbytes = TC_ADDRESS_BYTES ();
+#endif
+
#ifdef md_cons_align
md_cons_align (nbytes);
#endif
@@ -3482,22 +3762,9 @@ emit_expr (expressionS *exp, unsigned int nbytes)
pass to md_number_to_chars, handle it as a bignum. */
if (op == O_constant && nbytes > sizeof (valueT))
{
- valueT val;
- int gencnt;
-
- if (!exp->X_unsigned && exp->X_add_number < 0)
- extra_digit = (valueT) -1;
- val = (valueT) exp->X_add_number;
- gencnt = 0;
- do
- {
- generic_bignum[gencnt] = val & LITTLENUM_MASK;
- val >>= LITTLENUM_NUMBER_OF_BITS;
- ++gencnt;
- }
- while (val != 0);
- op = exp->X_op = O_big;
- exp->X_add_number = gencnt;
+ extra_digit = exp->X_unsigned ? 0 : -1;
+ convert_to_bignum (exp);
+ op = O_big;
}
if (op == O_constant)
@@ -3600,16 +3867,8 @@ emit_expr (expressionS *exp, unsigned int nbytes)
{
memset (p, 0, nbytes);
- /* Now we need to generate a fixS to record the symbol value.
- This is easy for BFD. For other targets it can be more
- complex. For very complex cases (currently, the HPPA and
- NS32K), you can define TC_CONS_FIX_NEW to do whatever you
- want. For simpler cases, you can define TC_CONS_RELOC to be
- the name of the reloc code that should be stored in the fixS.
- If neither is defined, the code uses NO_RELOC if it is
- defined, and otherwise uses 0. */
+ /* Now we need to generate a fixS to record the symbol value. */
-#ifdef BFD_ASSEMBLER
#ifdef TC_CONS_FIX_NEW
TC_CONS_FIX_NEW (frag_now, p - frag_now->fr_literal, nbytes, exp);
#else
@@ -3639,24 +3898,6 @@ emit_expr (expressionS *exp, unsigned int nbytes)
0, r);
}
#endif
-#else
-#ifdef TC_CONS_FIX_NEW
- TC_CONS_FIX_NEW (frag_now, p - frag_now->fr_literal, nbytes, exp);
-#else
- /* Figure out which reloc number to use. Use TC_CONS_RELOC if
- it is defined, otherwise use NO_RELOC if it is defined,
- otherwise use 0. */
-#ifndef TC_CONS_RELOC
-#ifdef NO_RELOC
-#define TC_CONS_RELOC NO_RELOC
-#else
-#define TC_CONS_RELOC 0
-#endif
-#endif
- fix_new_exp (frag_now, p - frag_now->fr_literal, (int) nbytes, exp, 0,
- TC_CONS_RELOC);
-#endif /* TC_CONS_FIX_NEW */
-#endif /* BFD_ASSEMBLER */
}
}
@@ -4217,36 +4458,48 @@ output_big_sleb128 (char *p, LITTLENUM_TYPE *bignum, int size)
unsigned byte;
/* Strip leading sign extensions off the bignum. */
- while (size > 0 && bignum[size - 1] == (LITTLENUM_TYPE) -1)
+ while (size > 1
+ && bignum[size - 1] == LITTLENUM_MASK
+ && bignum[size - 2] > LITTLENUM_MASK / 2)
size--;
do
{
- if (loaded < 7 && size > 0)
- {
- val |= (*bignum << loaded);
- loaded += 8 * CHARS_PER_LITTLENUM;
- size--;
- bignum++;
- }
-
- byte = val & 0x7f;
- loaded -= 7;
- val >>= 7;
+ /* OR in the next part of the littlenum. */
+ val |= (*bignum << loaded);
+ loaded += LITTLENUM_NUMBER_OF_BITS;
+ size--;
+ bignum++;
- if (size == 0)
+ /* Add bytes until there are less than 7 bits left in VAL
+ or until every non-sign bit has been written. */
+ do
{
- if ((val == 0 && (byte & 0x40) == 0)
- || (~(val | ~(((valueT) 1 << loaded) - 1)) == 0
- && (byte & 0x40) != 0))
+ byte = val & 0x7f;
+ loaded -= 7;
+ val >>= 7;
+ if (size > 0
+ || val != ((byte & 0x40) == 0 ? 0 : ((valueT) 1 << loaded) - 1))
byte |= 0x80;
+
+ if (orig)
+ *p = byte;
+ p++;
}
+ while ((byte & 0x80) != 0 && loaded >= 7);
+ }
+ while (size > 0);
+ /* Mop up any left-over bits (of which there will be less than 7). */
+ if ((byte & 0x80) != 0)
+ {
+ /* Sign-extend VAL. */
+ if (val & (1 << (loaded - 1)))
+ val |= ~0 << loaded;
if (orig)
- *p = byte;
+ *p = val & 0x7f;
p++;
}
- while (byte & 0x80);
return p - orig;
}
@@ -4302,11 +4555,11 @@ output_big_leb128 (char *p, LITTLENUM_TYPE *bignum, int size, int sign)
/* Generate the appropriate fragments for a given expression to emit a
leb128 value. */
-void
+static void
emit_leb128_expr (expressionS *exp, int sign)
{
operatorT op = exp->X_op;
- int nbytes;
+ unsigned int nbytes;
if (op == O_absent || op == O_illegal)
{
@@ -4325,10 +4578,20 @@ emit_leb128_expr (expressionS *exp, int sign)
as_warn (_("register value used as expression"));
op = O_constant;
}
+ else if (op == O_constant
+ && sign
+ && (exp->X_add_number < 0) != !exp->X_unsigned)
+ {
+ /* We're outputting a signed leb128 and the sign of X_add_number
+ doesn't reflect the sign of the original value. Convert EXP
+ to a correctly-extended bignum instead. */
+ convert_to_bignum (exp);
+ op = O_big;
+ }
/* Let check_eh_frame know that data is being emitted. nbytes == -1 is
a signal that this is leb128 data. It shouldn't optimize this away. */
- nbytes = -1;
+ nbytes = (unsigned int) -1;
if (check_eh_frame (exp, &nbytes))
abort ();
@@ -4381,10 +4644,6 @@ s_leb128 (int sign)
md_flush_pending_output ();
#endif
-#ifdef md_flush_pending_output
- md_flush_pending_output ();
-#endif
-
do
{
expression (&exp);
@@ -4663,27 +4922,6 @@ get_known_segmented_expression (register expressionS *expP)
return (retval);
}
-offsetT
-get_absolute_expr (expressionS *exp)
-{
- expression (exp);
- if (exp->X_op != O_constant)
- {
- if (exp->X_op != O_absent)
- as_bad (_("bad or irreducible absolute expression"));
- exp->X_add_number = 0;
- }
- return exp->X_add_number;
-}
-
-offsetT
-get_absolute_expression (void)
-{
- expressionS exp;
-
- return get_absolute_expr (&exp);
-}
-
char /* Return terminator. */
get_absolute_expression_and_terminator (long *val_pointer /* Return value of expression. */)
{
@@ -4771,13 +5009,14 @@ is_it_end_of_statement (void)
void
equals (char *sym_name, int reassign)
{
- register symbolS *symbolP; /* Symbol we are working with. */
char *stop = NULL;
char stopc;
input_line_pointer++;
if (*input_line_pointer == '=')
input_line_pointer++;
+ if (reassign < 0 && *input_line_pointer == '=')
+ input_line_pointer++;
while (*input_line_pointer == ' ' || *input_line_pointer == '\t')
input_line_pointer++;
@@ -4785,44 +5024,10 @@ equals (char *sym_name, int reassign)
if (flag_mri)
stop = mri_comment_field (&stopc);
- if (sym_name[0] == '.' && sym_name[1] == '\0')
- {
- /* Turn '. = mumble' into a .org mumble. */
- register segT segment;
- expressionS exp;
-
- segment = get_known_segmented_expression (&exp);
- if (!need_pass_2)
- do_org (segment, &exp, 0);
- }
- else
- {
-#ifdef OBJ_COFF
- int local;
-
- symbolP = symbol_find (sym_name);
- local = symbolP == NULL;
- if (local)
-#endif /* OBJ_COFF */
- symbolP = symbol_find_or_make (sym_name);
- /* Permit register names to be redefined. */
- if (!reassign
- && S_IS_DEFINED (symbolP)
- && S_GET_SEGMENT (symbolP) != reg_section)
- as_bad (_("symbol `%s' is already defined"), S_GET_NAME (symbolP));
-
-#ifdef OBJ_COFF
- /* "set" symbols are local unless otherwise specified. */
- if (local)
- SF_SET_LOCAL (symbolP);
-#endif /* OBJ_COFF */
-
- pseudo_set (symbolP);
- }
+ assign_symbol (sym_name, reassign >= 0 ? !reassign : reassign);
if (flag_mri)
{
- /* Check garbage after the expression. */
demand_empty_rest_of_line ();
mri_comment_end (stop, stopc);
}
@@ -4912,13 +5117,13 @@ s_incbin (int x ATTRIBUTE_UNUSED)
}
file_len = ftell (binfile);
- /* If a count was not specified use the size of the file. */
+ /* If a count was not specified use the remainder of the file. */
if (count == 0)
- count = file_len;
+ count = file_len - skip;
- if (skip + count > file_len)
+ if (skip < 0 || count < 0 || file_len < 0 || skip + count > file_len)
{
- as_bad (_("skip (%ld) + count (%ld) larger than file size (%ld)"),
+ as_bad (_("skip (%ld) or count (%ld) invalid for file size (%ld)"),
skip, count, file_len);
goto done;
}
@@ -5079,7 +5284,7 @@ s_func (int end_p)
/* Subroutine of s_func so targets can choose a different default prefix.
If DEFAULT_PREFIX is NULL, use the target's "leading char". */
-void
+static void
do_s_func (int end_p, const char *default_prefix)
{
/* Record the current function so that we can issue an error message for
@@ -5125,10 +5330,7 @@ do_s_func (int end_p, const char *default_prefix)
asprintf (&label, "%s%s", default_prefix, name);
else
{
- char leading_char = 0;
-#ifdef BFD_ASSEMBLER
- leading_char = bfd_get_symbol_leading_char (stdoutput);
-#endif
+ char leading_char = bfd_get_symbol_leading_char (stdoutput);
/* Missing entry point, use function's name with the leading
char prepended. */
if (leading_char)
@@ -5160,11 +5362,7 @@ do_s_func (int end_p, const char *default_prefix)
void
s_ignore (int arg ATTRIBUTE_UNUSED)
{
- while (!is_end_of_line[(unsigned char) *input_line_pointer])
- {
- ++input_line_pointer;
- }
- ++input_line_pointer;
+ ignore_rest_of_line ();
}
void
@@ -5202,3 +5400,51 @@ input_scrub_insert_file (char *path)
input_scrub_include_file (path, input_line_pointer);
buffer_limit = input_scrub_next_buffer (&input_line_pointer);
}
+
+/* Find the end of a line, considering quotation and escaping of quotes. */
+
+#if !defined(TC_SINGLE_QUOTE_STRINGS) && defined(SINGLE_QUOTE_STRINGS)
+# define TC_SINGLE_QUOTE_STRINGS 1
+#endif
+
+static char *
+_find_end_of_line (char *s, int mri_string, int insn ATTRIBUTE_UNUSED)
+{
+ char inquote = '\0';
+ int inescape = 0;
+
+ while (!is_end_of_line[(unsigned char) *s]
+ || (inquote && !ISCNTRL (*s))
+ || (inquote == '\'' && flag_mri)
+#ifdef TC_EOL_IN_INSN
+ || (insn && TC_EOL_IN_INSN (s))
+#endif
+ )
+ {
+ if (mri_string && *s == '\'')
+ inquote ^= *s;
+ else if (inescape)
+ inescape = 0;
+ else if (*s == '\\')
+ inescape = 1;
+ else if (!inquote
+ ? *s == '"'
+#ifdef TC_SINGLE_QUOTE_STRINGS
+ || (TC_SINGLE_QUOTE_STRINGS && *s == '\'')
+#endif
+ : *s == inquote)
+ inquote ^= *s;
+ ++s;
+ }
+ if (inquote)
+ as_warn (_("missing closing `%c'"), inquote);
+ if (inescape)
+ as_warn (_("stray `\\'"));
+ return s;
+}
+
+char *
+find_end_of_line (char *s, int mri_string)
+{
+ return _find_end_of_line (s, mri_string, 0);
+}
diff --git a/contrib/binutils/gas/read.h b/contrib/binutils/gas/read.h
index b89ffcb4fbfd..a18272d8882c 100644
--- a/contrib/binutils/gas/read.h
+++ b/contrib/binutils/gas/read.h
@@ -1,6 +1,6 @@
/* read.h - of read.c
Copyright 1986, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
extern char *input_line_pointer; /* -> char we are parsing now. */
@@ -56,6 +56,7 @@ extern char lex_type[];
extern char is_end_of_line[];
extern int is_it_end_of_statement (void);
+extern char *find_end_of_line (char *, int);
extern int target_big_endian;
@@ -101,7 +102,6 @@ extern void aout_process_stab (int, const char *, int, int, int);
extern char *demand_copy_string (int *lenP);
extern char *demand_copy_C_string (int *len_pointer);
extern char get_absolute_expression_and_terminator (long *val_pointer);
-extern offsetT get_absolute_expr (expressionS *);
extern offsetT get_absolute_expression (void);
extern unsigned int next_char_of_string (void);
extern void s_mri_sect (char *);
@@ -111,11 +111,10 @@ extern void add_include_dir (char *path);
extern void cons (int nbytes);
extern void demand_empty_rest_of_line (void);
extern void emit_expr (expressionS *exp, unsigned int nbytes);
-extern void emit_leb128_expr (expressionS *, int);
extern void equals (char *sym_name, int reassign);
extern void float_cons (int float_type);
extern void ignore_rest_of_line (void);
-extern void discard_rest_of_line (void);
+#define discard_rest_of_line ignore_rest_of_line
extern int output_leb128 (char *, valueT, int sign);
extern void pseudo_set (symbolS * symbolP);
extern void read_a_source_file (char *name);
@@ -139,10 +138,9 @@ extern void bss_alloc (symbolS *, addressT, int);
extern offsetT parse_align (int);
extern symbolS *s_comm_internal (int, symbolS *(*) (int, symbolS *, addressT));
extern symbolS *s_lcomm_internal (int, symbolS *, addressT);
-extern void s_app_file_string (char *);
+extern void s_app_file_string (char *, int);
extern void s_app_file (int);
extern void s_app_line (int);
-extern void s_bad_endr (int);
extern void s_comm (int);
extern void s_data (int);
extern void s_desc (int);
@@ -151,13 +149,14 @@ extern void s_elseif (int arg);
extern void s_end (int arg);
extern void s_endif (int arg);
extern void s_err (int);
+extern void s_errwarn (int);
extern void s_fail (int);
extern void s_fill (int);
extern void s_float_space (int mult);
extern void s_func (int);
-extern void do_s_func (int, const char *);
extern void s_globl (int arg);
extern void s_if (int arg);
+extern void s_ifb (int arg);
extern void s_ifc (int arg);
extern void s_ifdef (int arg);
extern void s_ifeqs (int arg);
@@ -186,3 +185,4 @@ 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_weakref (int);
diff --git a/contrib/binutils/gas/sb.c b/contrib/binutils/gas/sb.c
index 27b29eee9cdc..ecd772c30c02 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 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000, 2003 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "config.h"
#include <stdio.h>
@@ -33,6 +33,7 @@
#endif
#include "libiberty.h"
#include "sb.h"
+#include "as.h"
/* These routines are about manipulating strings.
@@ -46,28 +47,23 @@
sb_new (&foo);
sb_grow... (&foo,...);
use foo->ptr[*];
- sb_kill (&foo);
-
-*/
-
-#define dsize 5
+ sb_kill (&foo); */
+static int dsize = 5;
static void sb_check (sb *, int);
/* Statistics of sb structures. */
-
-int string_count[sb_max_power_two];
+static int string_count[sb_max_power_two];
/* Free list of sb structures. */
-
static sb_list_vector free_list;
-/* initializes an sb. */
+/* Initializes an sb. */
-void
+static void
sb_build (sb *ptr, int size)
{
- /* see if we can find one to allocate */
+ /* See if we can find one to allocate. */
sb_element *e;
if (size > sb_max_power_two)
@@ -76,7 +72,7 @@ sb_build (sb *ptr, int size)
e = free_list.size[size];
if (!e)
{
- /* nothing there, allocate one and stick into the free list */
+ /* Nothing there, allocate one and stick into the free list. */
e = (sb_element *) xmalloc (sizeof (sb_element) + (1 << size));
e->next = free_list.size[size];
e->size = 1 << size;
@@ -84,11 +80,10 @@ sb_build (sb *ptr, int size)
string_count[size]++;
}
- /* remove from free list */
-
+ /* Remove from free list. */
free_list.size[size] = e->next;
- /* copy into callers world */
+ /* Copy into callers world. */
ptr->ptr = e->data;
ptr->pot = size;
ptr->len = 0;
@@ -101,17 +96,17 @@ sb_new (sb *ptr)
sb_build (ptr, dsize);
}
-/* deallocate the sb at ptr */
+/* Deallocate the sb at ptr. */
void
sb_kill (sb *ptr)
{
- /* return item to free list */
+ /* Return item to free list. */
ptr->item->next = free_list.size[ptr->pot];
free_list.size[ptr->pot] = ptr->item;
}
-/* add the sb at s to the end of the sb at ptr */
+/* Add the sb at s to the end of the sb at ptr. */
void
sb_add_sb (sb *ptr, sb *s)
@@ -121,7 +116,39 @@ sb_add_sb (sb *ptr, sb *s)
ptr->len += s->len;
}
-/* make sure that the sb at ptr has room for another len characters,
+/* Helper for sb_scrub_and_add_sb. */
+
+static sb *sb_to_scrub;
+static char *scrub_position;
+static int
+scrub_from_sb (char *buf, int buflen)
+{
+ int copy;
+ copy = sb_to_scrub->len - (scrub_position - sb_to_scrub->ptr);
+ if (copy > buflen)
+ copy = buflen;
+ memcpy (buf, scrub_position, copy);
+ scrub_position += copy;
+ return copy;
+}
+
+/* Run the sb at s through do_scrub_chars and add the result to the sb
+ at ptr. */
+
+void
+sb_scrub_and_add_sb (sb *ptr, sb *s)
+{
+ sb_to_scrub = s;
+ scrub_position = s->ptr;
+
+ sb_check (ptr, s->len);
+ ptr->len += do_scrub_chars (scrub_from_sb, ptr->ptr + ptr->len, s->len);
+
+ sb_to_scrub = 0;
+ scrub_position = 0;
+}
+
+/* Make sure that the sb at ptr has room for another len characters,
and grow it if it doesn't. */
static void
@@ -131,6 +158,7 @@ sb_check (sb *ptr, int len)
{
sb tmp;
int pot = ptr->pot;
+
while (ptr->len + len >= 1 << pot)
pot++;
sb_build (&tmp, pot);
@@ -140,7 +168,7 @@ sb_check (sb *ptr, int len)
}
}
-/* make the sb at ptr point back to the beginning. */
+/* Make the sb at ptr point back to the beginning. */
void
sb_reset (sb *ptr)
@@ -148,7 +176,7 @@ sb_reset (sb *ptr)
ptr->len = 0;
}
-/* add character c to the end of the sb at ptr. */
+/* Add character c to the end of the sb at ptr. */
void
sb_add_char (sb *ptr, int c)
@@ -157,7 +185,7 @@ sb_add_char (sb *ptr, int c)
ptr->ptr[ptr->len++] = c;
}
-/* add null terminated string s to the end of sb at ptr. */
+/* Add null terminated string s to the end of sb at ptr. */
void
sb_add_string (sb *ptr, const char *s)
@@ -168,7 +196,7 @@ sb_add_string (sb *ptr, const char *s)
ptr->len += len;
}
-/* add string at s of length len to sb at ptr */
+/* Add string at s of length len to sb at ptr */
void
sb_add_buffer (sb *ptr, const char *s, int len)
@@ -178,45 +206,7 @@ sb_add_buffer (sb *ptr, const char *s, int len)
ptr->len += len;
}
-/* print the sb at ptr to the output file */
-
-void
-sb_print (FILE *outfile, sb *ptr)
-{
- int i;
- int nc = 0;
-
- for (i = 0; i < ptr->len; i++)
- {
- if (nc)
- {
- fprintf (outfile, ",");
- }
- fprintf (outfile, "%d", ptr->ptr[i]);
- nc = 1;
- }
-}
-
-void
-sb_print_at (FILE *outfile, int idx, sb *ptr)
-{
- int i;
- for (i = idx; i < ptr->len; i++)
- putc (ptr->ptr[i], outfile);
-}
-
-/* put a null at the end of the sb at in and return the start of the
- string, so that it can be used as an arg to printf %s. */
-
-char *
-sb_name (sb *in)
-{
- /* stick a null on the end of the string */
- sb_add_char (in, 0);
- return in->ptr;
-}
-
-/* like sb_name, but don't include the null byte in the string. */
+/* Like sb_name, but don't include the null byte in the string. */
char *
sb_terminate (sb *in)
@@ -226,8 +216,8 @@ sb_terminate (sb *in)
return in->ptr;
}
-/* start at the index idx into the string in sb at ptr and skip
- whitespace. return the index of the first non whitespace character */
+/* Start at the index idx into the string in sb at ptr and skip
+ whitespace. return the index of the first non whitespace character. */
int
sb_skip_white (int idx, sb *ptr)
@@ -239,7 +229,7 @@ sb_skip_white (int idx, sb *ptr)
return idx;
}
-/* start at the index idx into the sb at ptr. skips whitespace,
+/* Start at the index idx into the sb at ptr. skips whitespace,
a comma and any following whitespace. returns the index of the
next character. */
diff --git a/contrib/binutils/gas/sb.h b/contrib/binutils/gas/sb.h
index 30e5bc3a02d6..5732688315f7 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 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000, 2003 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef SB_H
@@ -28,7 +28,7 @@
#include <stdio.h>
#include "ansidecl.h"
-/* string blocks
+/* String blocks
I had a couple of choices when deciding upon this data structure.
gas uses null terminated strings for all its internal work. This
@@ -46,49 +46,46 @@
An sb is allocated by the caller, and is initialized to point to an
sb_element. sb_elements are kept on a free lists, and used when
- needed, replaced onto the free list when unused.
- */
+ needed, replaced onto the free list when unused. */
+
+#define sb_max_power_two 30 /* Don't allow strings more than
+ 2^sb_max_power_two long. */
-#define sb_max_power_two 30 /* don't allow strings more than
- 2^sb_max_power_two long */
-/* structure of an sb */
typedef struct sb
- {
- char *ptr; /* points to the current block. */
- int len; /* how much is used. */
- int pot; /* the maximum length is 1<<pot */
- struct le *item;
- }
+{
+ char *ptr; /* Points to the current block. */
+ int len; /* How much is used. */
+ int pot; /* The maximum length is 1<<pot. */
+ struct le *item;
+}
sb;
-/* Structure of the free list object of an sb */
+/* Structure of the free list object of a string block. */
+
typedef struct le
- {
- struct le *next;
- int size;
- char data[1];
- }
+{
+ struct le *next;
+ int size;
+ char data[1];
+}
sb_element;
-/* The free list */
-typedef struct
- {
- sb_element *size[sb_max_power_two];
- } sb_list_vector;
+/* The free list. */
-extern int string_count[sb_max_power_two];
+typedef struct
+{
+ sb_element *size[sb_max_power_two];
+}
+sb_list_vector;
-extern void sb_build (sb *, int);
extern void sb_new (sb *);
extern void sb_kill (sb *);
extern void sb_add_sb (sb *, sb *);
+extern void sb_scrub_and_add_sb (sb *, sb *);
extern void sb_reset (sb *);
extern void sb_add_char (sb *, int);
extern void sb_add_string (sb *, const char *);
extern void sb_add_buffer (sb *, const char *, int);
-extern void sb_print (FILE *, sb *);
-extern void sb_print_at (FILE *, int, sb *);
-extern char *sb_name (sb *);
extern char *sb_terminate (sb *);
extern int sb_skip_white (int, sb *);
extern int sb_skip_comma (int, sb *);
diff --git a/contrib/binutils/gas/stabs.c b/contrib/binutils/gas/stabs.c
index f8acdc842575..0b5c83b324a8 100644
--- a/contrib/binutils/gas/stabs.c
+++ b/contrib/binutils/gas/stabs.c
@@ -1,6 +1,6 @@
/* Generic stabs parsing for gas.
Copyright 1989, 1990, 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2001
- Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@ the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "as.h"
#include "obstack.h"
@@ -107,11 +107,9 @@ get_stab_string_offset (const char *string, const char *stabstr_secname)
p = frag_more (1);
*p = 0;
retval = seg_info (seg)->stabu.stab_string_size = 1;
-#ifdef BFD_ASSEMBLER
bfd_set_section_flags (stdoutput, seg, SEC_READONLY | SEC_DEBUGGING);
if (seg->name == stabstr_secname)
seg->name = xstrdup (stabstr_secname);
-#endif
}
if (length > 0)
@@ -150,11 +148,10 @@ aout_process_stab (what, string, type, other, desc)
ends in "\" and the debug info is continued in the next .stabs
directive) from being separated by other random symbols. */
symbol = symbol_create (string, undefined_section, 0,
- (struct frag *) NULL);
+ &zero_address_frag);
if (what == 's' || what == 'n')
{
/* Pick up the value from the input line. */
- symbol_set_frag (symbol, &zero_address_frag);
pseudo_set (symbol);
}
else
@@ -332,10 +329,8 @@ s_stab_generic (int what, char *stab_secname, char *stabstr_secname)
if (! seg_info (seg)->hadone)
{
-#ifdef BFD_ASSEMBLER
bfd_set_section_flags (stdoutput, seg,
SEC_READONLY | SEC_RELOC | SEC_DEBUGGING);
-#endif
#ifdef INIT_STAB_SECTION
INIT_STAB_SECTION (seg);
#endif
diff --git a/contrib/binutils/gas/struc-symbol.h b/contrib/binutils/gas/struc-symbol.h
index 90945c433bc3..75e22076ca8e 100644
--- a/contrib/binutils/gas/struc-symbol.h
+++ b/contrib/binutils/gas/struc-symbol.h
@@ -1,5 +1,5 @@
/* struct_symbol.h - Internal symbol structure
- Copyright 1987, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
+ Copyright 1987, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,49 +16,27 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef __struc_symbol_h__
#define __struc_symbol_h__
-#ifdef BFD_ASSEMBLER
-/* The BFD code wants to walk the list in both directions. */
-#undef SYMBOLS_NEED_BACKPOINTERS
-#define SYMBOLS_NEED_BACKPOINTERS
-#endif
-
/* The information we keep for a symbol. Note that the symbol table
holds pointers both to this and to local_symbol structures. See
below. */
struct symbol
{
-#ifdef BFD_ASSEMBLER
/* BFD symbol */
asymbol *bsym;
-#else
- /* The (4-origin) position of sy_name in the symbol table of the object
- file. This will be 0 for (nameless) .stabd symbols.
-
- Not used until write_object_file() time. */
- unsigned long sy_name_offset;
-
- /* What we write in .o file (if permitted). */
- obj_symbol_type sy_symbol;
-
- /* The 24 bit symbol number. Symbol numbers start at 0 and are unsigned. */
- long sy_number;
-#endif
/* The value of the symbol. */
expressionS sy_value;
/* Forwards and (optionally) backwards chain pointers. */
struct symbol *sy_next;
-#ifdef SYMBOLS_NEED_BACKPOINTERS
struct symbol *sy_previous;
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
/* Pointer to the frag this symbol is attached to, if any.
Otherwise, NULL. */
@@ -82,12 +60,27 @@ struct symbol
a symbol is used in backend routines. */
unsigned int sy_used : 1;
+ /* Whether the symbol can be re-defined. */
+ unsigned int sy_volatile : 1;
+
+ /* Whether the symbol is a forward reference. */
+ unsigned int sy_forward_ref : 1;
+
/* This is set if the symbol is defined in an MRI common section.
We handle such sections as single common symbols, so symbols
defined within them must be treated specially by the relocation
routines. */
unsigned int sy_mri_common : 1;
+ /* This is set if the symbol is set with a .weakref directive. */
+ unsigned int sy_weakrefr : 1;
+
+ /* This is set when the symbol is referenced as part of a .weakref
+ directive, but only if the symbol was not in the symbol table
+ before. It is cleared as soon as any direct reference to the
+ symbol is present. */
+ unsigned int sy_weakrefd : 1;
+
#ifdef OBJ_SYMFIELD_TYPE
OBJ_SYMFIELD_TYPE sy_obj;
#endif
@@ -101,8 +94,6 @@ struct symbol
#endif
};
-#ifdef BFD_ASSEMBLER
-
/* A pointer in the symbol may point to either a complete symbol
(struct symbol above) or to a local symbol (struct local_symbol
defined here). The symbol code can detect the case by examining
@@ -154,6 +145,4 @@ struct local_symbol
#define local_symbol_get_real_symbol(l) ((l)->u.lsy_sym)
#define local_symbol_set_real_symbol(l, s) ((l)->u.lsy_sym = (s))
-#endif /* BFD_ASSEMBLER */
-
#endif /* __struc_symbol_h__ */
diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c
index b2432e9a1f80..9401d61a834c 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, 2002
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* Segments & sub-segments. */
@@ -31,45 +31,11 @@ frchainS *frchain_root, *frchain_now;
static struct obstack frchains;
-#ifndef BFD_ASSEMBLER
-#ifdef MANY_SEGMENTS
-segment_info_type segment_info[SEG_MAXIMUM_ORDINAL];
-
-#else
-/* Commented in "subsegs.h". */
-frchainS *data0_frchainP, *bss0_frchainP;
-
-#endif /* MANY_SEGMENTS */
-char const *const seg_name[] = {
- "absolute",
-#ifdef MANY_SEGMENTS
- "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9",
- "e10", "e11", "e12", "e13", "e14", "e15", "e16", "e17", "e18", "e19",
- "e20", "e21", "e22", "e23", "e24", "e25", "e26", "e27", "e28", "e29",
- "e30", "e31", "e32", "e33", "e34", "e35", "e36", "e37", "e38", "e39",
-#else
- "text",
- "data",
- "bss",
-#endif /* MANY_SEGMENTS */
- "unknown",
- "ASSEMBLER-INTERNAL-LOGIC-ERROR!",
- "expr",
- "debug",
- "transfert vector preload",
- "transfert vector postload",
- "register",
- "",
-}; /* Used by error reporters, dumpers etc. */
-#else /* BFD_ASSEMBLER */
-
/* 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;
-#endif /* BFD_ASSEMBLER */
-
static void subseg_set_rest (segT, subsegT);
static fragS dummy_frag;
@@ -79,22 +45,6 @@ static frchainS absolute_frchain;
void
subsegs_begin (void)
{
- /* Check table(s) seg_name[], seg_N_TYPE[] is in correct order */
-#if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
- know (SEG_ABSOLUTE == 0);
- know (SEG_TEXT == 1);
- know (SEG_DATA == 2);
- know (SEG_BSS == 3);
- know (SEG_UNKNOWN == 4);
- know (SEG_GOOF == 5);
- know (SEG_EXPR == 6);
- know (SEG_DEBUG == 7);
- know (SEG_NTV == 8);
- know (SEG_PTV == 9);
- know (SEG_REGISTER == 10);
- know (SEG_MAXIMUM_ORDINAL == SEG_REGISTER);
-#endif
-
obstack_begin (&frchains, chunksize);
#if __GNUC__ >= 2
obstack_alignment_mask (&frchains) = __alignof__ (frchainS) - 1;
@@ -105,32 +55,9 @@ subsegs_begin (void)
frag_now = &dummy_frag;
-#ifndef BFD_ASSEMBLER
- now_subseg = 42; /* Lie for 1st call to subseg_new. */
-#ifdef MANY_SEGMENTS
- {
- int i;
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- subseg_set (i, 0);
- segment_info[i].frchainP = frchain_now;
- }
- }
-#else
- subseg_set (SEG_DATA, 0); /* .data 0 */
- data0_frchainP = frchain_now;
-
- subseg_set (SEG_BSS, 0);
- bss0_frchainP = frchain_now;
-
-#endif /* ! MANY_SEGMENTS */
-#endif /* ! BFD_ASSEMBLER */
-
absolute_frchain.frch_seg = absolute_section;
absolute_frchain.frch_subseg = 0;
-#ifdef BFD_ASSEMBLER
absolute_frchain.fix_root = absolute_frchain.fix_tail = 0;
-#endif
absolute_frchain.frch_frag_now = &zero_address_frag;
absolute_frchain.frch_root = absolute_frchain.frch_last = &zero_address_frag;
}
@@ -148,56 +75,29 @@ subsegs_begin (void)
void
subseg_change (register segT seg, register int subseg)
{
+ segment_info_type *seginfo;
now_seg = seg;
now_subseg = subseg;
if (now_seg == absolute_section)
return;
-#ifdef BFD_ASSEMBLER
- {
- segment_info_type *seginfo;
- 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->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);
- }
- }
-#else
-#ifdef MANY_SEGMENTS
- seg_fix_rootP = &segment_info[seg].fix_root;
- seg_fix_tailP = &segment_info[seg].fix_tail;
-#else
- if (seg == SEG_DATA)
- {
- seg_fix_rootP = &data_fix_root;
- seg_fix_tailP = &data_fix_tail;
- }
- else if (seg == SEG_TEXT)
- {
- seg_fix_rootP = &text_fix_root;
- seg_fix_tailP = &text_fix_tail;
- }
- else
+ seginfo = (segment_info_type *) bfd_get_section_userdata (stdoutput, seg);
+ if (! seginfo)
{
- know (seg == SEG_BSS);
- seg_fix_rootP = &bss_fix_root;
- seg_fix_tailP = &bss_fix_tail;
+ seginfo = (segment_info_type *) xmalloc (sizeof (*seginfo));
+ memset ((PTR) seginfo, 0, sizeof (*seginfo));
+ seginfo->fix_root = NULL;
+ seginfo->fix_tail = NULL;
+ 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);
}
-
-#endif
-#endif
}
static void
@@ -274,13 +174,13 @@ subseg_set_rest (segT seg, subsegT subseg)
/*
* This should be the only code that creates a frchainS.
*/
+ segment_info_type *seginfo;
+
newP = (frchainS *) obstack_alloc (&frchains, sizeof (frchainS));
newP->frch_subseg = subseg;
newP->frch_seg = seg;
-#ifdef BFD_ASSEMBLER
newP->fix_root = NULL;
newP->fix_tail = NULL;
-#endif
obstack_begin (&newP->frch_obstack, chunksize);
#if __GNUC__ >= 2
obstack_alignment_mask (&newP->frch_obstack) = __alignof__ (fragS) - 1;
@@ -293,14 +193,9 @@ subseg_set_rest (segT seg, subsegT subseg)
*lastPP = newP;
newP->frch_next = frcP; /* perhaps NULL */
-#ifdef BFD_ASSEMBLER
- {
- segment_info_type *seginfo;
- seginfo = seg_info (seg);
- if (seginfo && seginfo->frchainP == frcP)
- seginfo->frchainP = newP;
- }
-#endif
+ seginfo = seg_info (seg);
+ if (seginfo && (!seginfo->frchainP || seginfo->frchainP == frcP))
+ seginfo->frchainP = newP;
frcP = newP;
}
@@ -329,73 +224,6 @@ subseg_set_rest (segT seg, subsegT subseg)
* Frchain_root updated if needed.
*/
-#ifndef BFD_ASSEMBLER
-
-segT
-subseg_new (segname, subseg)
- const char *segname;
- subsegT subseg;
-{
- int i;
-
- for (i = 0; i < (int) SEG_MAXIMUM_ORDINAL; i++)
- {
- const char *s;
-
- s = segment_name ((segT) i);
- if (strcmp (segname, s) == 0
- || (segname[0] == '.'
- && strcmp (segname + 1, s) == 0))
- {
- subseg_set ((segT) i, subseg);
- return (segT) i;
- }
-#ifdef obj_segment_name
- s = obj_segment_name ((segT) i);
- if (strcmp (segname, s) == 0
- || (segname[0] == '.'
- && strcmp (segname + 1, s) == 0))
- {
- subseg_set ((segT) i, subseg);
- return (segT) i;
- }
-#endif
- }
-
-#ifdef obj_add_segment
- {
- segT new_seg;
- new_seg = obj_add_segment (segname);
- subseg_set (new_seg, subseg);
- return new_seg;
- }
-#else
- as_bad (_("attempt to switch to nonexistent segment \"%s\""), segname);
- return now_seg;
-#endif
-}
-
-void
-subseg_set (seg, subseg) /* begin assembly for a new sub-segment */
- register segT seg; /* SEG_DATA or SEG_TEXT */
- register subsegT subseg;
-{
-#ifndef MANY_SEGMENTS
- know (seg == SEG_DATA
- || seg == SEG_TEXT
- || seg == SEG_BSS
- || seg == SEG_ABSOLUTE);
-#endif
-
- if (seg != now_seg || subseg != now_subseg)
- { /* we just changed sub-segments */
- subseg_set_rest (seg, subseg);
- }
- mri_common_symbol = NULL;
-}
-
-#else /* BFD_ASSEMBLER */
-
segT
subseg_get (const char *segname, int force_new)
{
@@ -523,16 +351,18 @@ section_symbol (segT sec)
}
else
{
- s = symbol_find_base (sec->symbol->name, 0);
- if (s == NULL)
+ segT seg;
+ s = symbol_find (sec->symbol->name);
+ /* We have to make sure it is the right symbol when we
+ have multiple sections with the same section name. */
+ if (s == NULL
+ || ((seg = S_GET_SEGMENT (s)) != sec
+ && seg != undefined_section))
s = symbol_new (sec->symbol->name, sec, 0, &zero_address_frag);
- else
+ else if (seg == undefined_section)
{
- if (S_GET_SEGMENT (s) == undefined_section)
- {
- S_SET_SEGMENT (s, sec);
- symbol_set_frag (s, &zero_address_frag);
- }
+ S_SET_SEGMENT (s, sec);
+ symbol_set_frag (s, &zero_address_frag);
}
}
@@ -548,49 +378,40 @@ section_symbol (segT sec)
return s;
}
-#endif /* BFD_ASSEMBLER */
-
/* Return whether the specified segment is thought to hold text. */
-#ifndef BFD_ASSEMBLER
-const char * const nontext_section_names[] = {
- ".eh_frame",
- ".gcc_except_table",
-#ifdef OBJ_COFF
-#ifndef COFF_LONG_SECTION_NAMES
- ".eh_fram",
- ".gcc_exc",
-#endif
-#endif
- NULL
-};
-#endif /* ! BFD_ASSEMBLER */
-
int
subseg_text_p (segT sec)
{
-#ifdef BFD_ASSEMBLER
return (bfd_get_section_flags (stdoutput, sec) & SEC_CODE) != 0;
-#else /* ! BFD_ASSEMBLER */
- const char * const *p;
+}
- if (sec == data_section || sec == bss_section || sec == absolute_section)
- return 0;
+/* Return non zero if SEC has at least one byte of data. It is
+ possible that we'll return zero even on a non-empty section because
+ we don't know all the fragment types, and it is possible that an
+ fr_fix == 0 one still contributes data. Think of this as
+ seg_definitely_not_empty_p. */
- for (p = nontext_section_names; *p != NULL; ++p)
- {
- if (strcmp (segment_name (sec), *p) == 0)
- return 0;
+int
+seg_not_empty_p (segT sec ATTRIBUTE_UNUSED)
+{
+ segment_info_type *seginfo = seg_info (sec);
+ frchainS *chain;
+ fragS *frag;
-#ifdef obj_segment_name
- if (strcmp (obj_segment_name (sec), *p) == 0)
- return 0;
-#endif
+ if (!seginfo)
+ return 0;
+
+ for (chain = seginfo->frchainP; chain; chain = chain->frch_next)
+ {
+ for (frag = chain->frch_root; frag; frag = frag->fr_next)
+ if (frag->fr_fix)
+ return 1;
+ if (obstack_next_free (&chain->frch_obstack)
+ != chain->frch_last->fr_literal)
+ return 1;
}
-
- return 1;
-
-#endif /* ! BFD_ASSEMBLER */
+ return 0;
}
void
@@ -614,27 +435,6 @@ subsegs_print_statistics (FILE *file)
for (fragp = frchp->frch_root; fragp; fragp = fragp->fr_next)
{
-#if 0
- switch (fragp->fr_type)
- {
- case rs_fill:
- fprintf (file, "f"); break;
- case rs_align:
- fprintf (file, "a"); break;
- case rs_align_code:
- fprintf (file, "c"); break;
- case rs_org:
- fprintf (file, "o"); break;
- case rs_machine_dependent:
- fprintf (file, "m"); break;
- case rs_space:
- fprintf (file, "s"); break;
- case 0:
- fprintf (file, "0"); break;
- default:
- fprintf (file, "?"); break;
- }
-#endif
count++;
}
fprintf (file, "\n");
diff --git a/contrib/binutils/gas/subsegs.h b/contrib/binutils/gas/subsegs.h
index 331c55709f5d..23ab4f9cf48e 100644
--- a/contrib/binutils/gas/subsegs.h
+++ b/contrib/binutils/gas/subsegs.h
@@ -1,5 +1,5 @@
/* subsegs.h -> subsegs.c
- Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/*
* For every sub-segment the user mentions in the ASsembler program,
@@ -47,10 +47,8 @@ struct frchain /* control building of a frag chain */
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 */
-#ifdef BFD_ASSEMBLER
fixS *fix_root; /* Root of fixups for this subsegment. */
fixS *fix_tail; /* Last fixup for this subsegment. */
-#endif
struct obstack frch_obstack; /* for objects in this frag chain */
fragS *frch_frag_now; /* frag_now for this subsegment */
};
@@ -77,30 +75,22 @@ typedef struct segment_info_struct {
int user_stuff;
- /* Fixups for this segment. If BFD_ASSEMBLER, this is only valid
- after the frchains are run together. */
+ /* Fixups for this segment. This is only valid after the frchains
+ are run together. */
fixS *fix_root;
fixS *fix_tail;
-#if defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
- struct internal_scnhdr scnhdr;
- enum linkonce_type linkonce;
- const char *name;
-#endif
-
symbolS *dot;
struct lineno_list *lineno_list_head;
struct lineno_list *lineno_list_tail;
-#ifdef BFD_ASSEMBLER
/* Which BFD section does this gas segment correspond to? */
asection *bfd_section;
/* NULL, or pointer to the gas symbol that is the section symbol for
this section. sym->bsym and bfd_section->symbol should be the same. */
symbolS *sym;
-#endif
union {
/* Current size of section holding stabs strings. */
@@ -119,37 +109,7 @@ typedef struct segment_info_struct {
#endif
} segment_info_type;
-#ifdef BFD_ASSEMBLER
-
extern segment_info_type *seg_info (segT);
extern symbolS *section_symbol (segT);
-#else /* ! BFD_ASSEMBLER */
-
-#ifdef MANY_SEGMENTS
-
-extern segment_info_type segment_info[];
-
-#define seg_info(SEC) (&segment_info[SEC])
-
-#else
-
-/* Sentinel for frchain crawling. Points to the 1st data-segment
- frchain. (Which is pointed to by the last text-segment frchain.) */
-extern frchainS *data0_frchainP;
-extern frchainS *bss0_frchainP;
-
-/* Dummy so stuff can compile. Should never be used. */
-struct seg_info_trash {
- struct {
- unsigned stab_string_size : 1;
- } stabu;
- unsigned hadone : 1;
-};
-#define seg_info(S) (abort (), (struct seg_info_trash *) 0)
-
-#endif
-
-#endif /* ! BFD_ASSEMBLER */
-
extern void subsegs_print_statistics (FILE *);
diff --git a/contrib/binutils/gas/symbols.c b/contrib/binutils/gas/symbols.c
index 761a0208515b..5935a7477ae0 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
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* #define DEBUG_SYMS / * to debug symbol list maintenance. */
@@ -59,6 +59,11 @@ symbolS abs_symbol;
#define LOCAL_LABEL_CHAR '\002'
struct obstack notes;
+#ifdef USE_UNIQUE
+/* The name of an external symbol which is
+ used to make weak PE symbol names unique. */
+const char * an_external_name;
+#endif
static char *save_symbol_name (const char *);
static void fb_label_init (void);
@@ -83,13 +88,11 @@ symbol_new (const char *name, segT segment, valueT valu, fragS *frag)
symbolS *symbolP = symbol_create (name, segment, valu, frag);
/* Link to end of symbol chain. */
-#ifdef BFD_ASSEMBLER
{
extern int symbol_table_frozen;
if (symbol_table_frozen)
abort ();
}
-#endif
symbol_append (symbolP, symbol_lastP, &symbol_rootP, &symbol_lastP);
return symbolP;
@@ -108,11 +111,6 @@ save_symbol_name (const char *name)
obstack_grow (&notes, name, name_length);
ret = obstack_finish (&notes);
-#ifdef STRIP_UNDERSCORE
- if (ret[0] == '_')
- ++ret;
-#endif
-
#ifdef tc_canonicalize_symbol_name
ret = tc_canonicalize_symbol_name (ret);
#endif
@@ -144,12 +142,10 @@ symbol_create (const char *name, /* It is copied, the caller can destroy/modify.
/* symbol must be born in some fixed state. This seems as good as any. */
memset (symbolP, 0, sizeof (symbolS));
-#ifdef BFD_ASSEMBLER
symbolP->bsym = bfd_make_empty_symbol (stdoutput);
if (symbolP->bsym == NULL)
as_perror ("%s", "bfd_make_empty_symbol");
symbolP->bsym->udata.p = (PTR) symbolP;
-#endif
S_SET_NAME (symbolP, preserved_copy_of_name);
S_SET_SEGMENT (symbolP, segment);
@@ -157,10 +153,6 @@ symbol_create (const char *name, /* It is copied, the caller can destroy/modify.
symbol_clear_list_pointers (symbolP);
symbolP->sy_frag = frag;
-#ifndef BFD_ASSEMBLER
- symbolP->sy_number = ~0;
- symbolP->sy_name_offset = (unsigned int) ~0;
-#endif
obj_symbol_new_hook (symbolP);
@@ -171,7 +163,6 @@ symbol_create (const char *name, /* It is copied, the caller can destroy/modify.
return symbolP;
}
-#ifdef BFD_ASSEMBLER
/* Local symbol support. If we can get away with it, we keep only a
small amount of information for local symbols. */
@@ -197,7 +188,7 @@ static unsigned long local_symbol_conversion_count;
/* Create a local symbol and insert it into the local hash table. */
-struct local_symbol *
+static struct local_symbol *
local_symbol_make (const char *name, segT section, valueT value, fragS *frag)
{
char *name_copy;
@@ -255,13 +246,6 @@ local_symbol_convert (struct local_symbol *locsym)
return ret;
}
-
-#else /* ! BFD_ASSEMBLER */
-
-#define LOCAL_SYMBOL_CHECK(s) 0
-#define local_symbol_convert(s) ((symbolS *) s)
-
-#endif /* ! BFD_ASSEMBLER */
/* We have just seen "<name>:".
Creates a struct symbol unless it already exists.
@@ -277,19 +261,9 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
/* Sun local labels go out of scope whenever a non-local symbol is
defined. */
- if (LOCAL_LABELS_DOLLAR)
- {
- int local;
-
-#ifdef BFD_ASSEMBLER
- local = bfd_is_local_label_name (stdoutput, sym_name);
-#else
- local = LOCAL_LABEL (sym_name);
-#endif
-
- if (! local)
- dollar_label_clear ();
- }
+ if (LOCAL_LABELS_DOLLAR
+ && !bfd_is_local_label_name (stdoutput, sym_name))
+ dollar_label_clear ();
#ifndef WORKING_DOT_WORD
if (new_broken_words)
@@ -299,9 +273,6 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
fragS *frag_tmp;
char *frag_opcode;
- extern const int md_short_jump_size;
- extern const int md_long_jump_size;
-
if (now_seg == absolute_section)
{
as_bad (_("cannot define symbol `%s' in absolute section"), sym_name);
@@ -338,6 +309,7 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
if ((symbolP = symbol_find (sym_name)) != 0)
{
+ S_CLEAR_WEAKREFR (symbolP);
#ifdef RESOLVE_SYMBOL_REDEFINITION
if (RESOLVE_SYMBOL_REDEFINITION (symbolP))
return symbolP;
@@ -345,7 +317,6 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
/* Now check for undefined symbols. */
if (LOCAL_SYMBOL_CHECK (symbolP))
{
-#ifdef BFD_ASSEMBLER
struct local_symbol *locsym = (struct local_symbol *) symbolP;
if (locsym->lsy_section != undefined_section
@@ -360,10 +331,20 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
locsym->lsy_section = now_seg;
local_symbol_set_frag (locsym, frag_now);
locsym->lsy_value = frag_now_fix ();
-#endif
}
- else if (!S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP))
+ else if (!(S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
+ || 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)))
+ {
+ symbolP = symbol_clone (symbolP, 1);
+ S_SET_VALUE (symbolP, 0);
+ S_CLEAR_VOLATILE (symbolP);
+ }
if (S_GET_VALUE (symbolP) == 0)
{
symbolP->sy_frag = frag_now;
@@ -395,6 +376,7 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
&& S_IS_EXTERNAL (symbolP))
|| S_GET_SEGMENT (symbolP) == bss_section)
&& (now_seg == data_section
+ || now_seg == bss_section
|| now_seg == S_GET_SEGMENT (symbolP)))
{
/* Select which of the 2 cases this is. */
@@ -431,9 +413,7 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
#else
char od_buf[100];
od_buf[0] = '\0';
-#ifdef BFD_ASSEMBLER
if (OUTPUT_FLAVOR == bfd_target_aout_flavour)
-#endif
sprintf (od_buf, "%d.%d.",
S_GET_OTHER (symbolP),
S_GET_DESC (symbolP));
@@ -452,18 +432,19 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
if (!(frag_now == symbolP->sy_frag
&& S_GET_VALUE (symbolP) == frag_now_fix ()
&& S_GET_SEGMENT (symbolP) == now_seg))
- as_bad (_("symbol `%s' is already defined"), sym_name);
+ {
+ as_bad (_("symbol `%s' is already defined"), sym_name);
+ symbolP = symbol_clone (symbolP, 0);
+ }
}
}
-#ifdef BFD_ASSEMBLER
else if (! flag_keep_locals && bfd_is_local_label_name (stdoutput, sym_name))
{
symbolP = (symbolS *) local_symbol_make (sym_name, now_seg,
(valueT) frag_now_fix (),
frag_now);
}
-#endif /* BFD_ASSEMBLER */
else
{
symbolP = symbol_new (sym_name, now_seg, (valueT) frag_now_fix (),
@@ -538,7 +519,6 @@ symbol_find_or_make (const char *name)
if (symbolP == NULL)
{
-#ifdef BFD_ASSEMBLER
if (! flag_keep_locals && bfd_is_local_label_name (stdoutput, name))
{
symbolP = md_undefined_symbol ((char *) name);
@@ -550,7 +530,6 @@ symbol_find_or_make (const char *name)
&zero_address_frag);
return symbolP;
}
-#endif
symbolP = symbol_make (name);
@@ -575,6 +554,114 @@ symbol_make (const char *name)
}
symbolS *
+symbol_clone (symbolS *orgsymP, int replace)
+{
+ symbolS *newsymP;
+ asymbol *bsymorg, *bsymnew;
+
+ /* Running local_symbol_convert on a clone that's not the one currently
+ in local_hash would incorrectly replace the hash entry. Thus the
+ symbol must be converted here. Note that the rest of the function
+ depends on not encountering an unconverted symbol. */
+ if (LOCAL_SYMBOL_CHECK (orgsymP))
+ 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");
+ 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);
+
+#ifdef obj_symbol_clone_hook
+ obj_symbol_clone_hook (newsymP, orgsymP);
+#endif
+
+#ifdef tc_symbol_clone_hook
+ tc_symbol_clone_hook (newsymP, orgsymP);
+#endif
+
+ if (replace)
+ {
+ if (symbol_rootP == orgsymP)
+ symbol_rootP = newsymP;
+ else if (orgsymP->sy_previous)
+ {
+ orgsymP->sy_previous->sy_next = newsymP;
+ orgsymP->sy_previous = NULL;
+ }
+ if (symbol_lastP == orgsymP)
+ symbol_lastP = newsymP;
+ else if (orgsymP->sy_next)
+ orgsymP->sy_next->sy_previous = newsymP;
+ orgsymP->sy_next = NULL;
+ debug_verify_symchain (symbol_rootP, symbol_lastP);
+
+ symbol_table_insert (newsymP);
+ }
+
+ return newsymP;
+}
+
+/* Referenced symbols, if they are forward references, need to be cloned
+ (without replacing the original) so that the value of the referenced
+ symbols at the point of use . */
+
+#undef symbol_clone_if_forward_ref
+symbolS *
+symbol_clone_if_forward_ref (symbolS *symbolP, int is_forward)
+{
+ if (symbolP && !LOCAL_SYMBOL_CHECK (symbolP))
+ {
+ symbolS *add_symbol = symbolP->sy_value.X_add_symbol;
+ symbolS *op_symbol = symbolP->sy_value.X_op_symbol;
+
+ if (symbolP->sy_forward_ref)
+ is_forward = 1;
+
+ if (is_forward)
+ {
+ /* assign_symbol() clones volatile symbols; pre-existing expressions
+ hold references to the original instance, but want the current
+ value. Just repeat the lookup. */
+ if (add_symbol && S_IS_VOLATILE (add_symbol))
+ add_symbol = symbol_find_exact (S_GET_NAME (add_symbol));
+ if (op_symbol && S_IS_VOLATILE (op_symbol))
+ op_symbol = symbol_find_exact (S_GET_NAME (op_symbol));
+ }
+
+ /* Re-using sy_resolving here, as this routine cannot get called from
+ symbol resolution code. */
+ if (symbolP->bsym->section == expr_section && !symbolP->sy_resolving)
+ {
+ symbolP->sy_resolving = 1;
+ add_symbol = symbol_clone_if_forward_ref (add_symbol, is_forward);
+ op_symbol = symbol_clone_if_forward_ref (op_symbol, is_forward);
+ symbolP->sy_resolving = 0;
+ }
+
+ if (symbolP->sy_forward_ref
+ || add_symbol != symbolP->sy_value.X_add_symbol
+ || op_symbol != symbolP->sy_value.X_op_symbol)
+ symbolP = symbol_clone (symbolP, 0);
+
+ symbolP->sy_value.X_add_symbol = add_symbol;
+ symbolP->sy_value.X_op_symbol = op_symbol;
+ }
+
+ return symbolP;
+}
+
+symbolS *
symbol_temp_new (segT seg, valueT ofs, fragS *frag)
{
return symbol_new (FAKE_LABEL_NAME, seg, ofs, frag);
@@ -598,37 +685,43 @@ symbol_temp_make (void)
of a struct symbol associated with that name. */
symbolS *
-symbol_find (const char *name)
+symbol_find_exact (const char *name)
{
-#ifdef STRIP_UNDERSCORE
- return (symbol_find_base (name, 1));
-#else /* STRIP_UNDERSCORE */
- return (symbol_find_base (name, 0));
-#endif /* STRIP_UNDERSCORE */
+ return symbol_find_exact_noref (name, 0);
}
symbolS *
-symbol_find_exact (const char *name)
+symbol_find_exact_noref (const char *name, int noref)
{
-#ifdef BFD_ASSEMBLER
- {
- struct local_symbol *locsym;
+ struct local_symbol *locsym;
+ symbolS* sym;
- locsym = (struct local_symbol *) hash_find (local_hash, name);
- if (locsym != NULL)
- return (symbolS *) locsym;
- }
-#endif
+ locsym = (struct local_symbol *) hash_find (local_hash, name);
+ if (locsym != NULL)
+ return (symbolS *) locsym;
+
+ sym = ((symbolS *) hash_find (sy_hash, name));
+
+ /* Any references to the symbol, except for the reference in
+ .weakref, must clear this flag, such that the symbol does not
+ turn into a weak symbol. Note that we don't have to handle the
+ local_symbol case, since a weakrefd is always promoted out of the
+ local_symbol table when it is turned into a weak symbol. */
+ if (sym && ! noref)
+ S_CLEAR_WEAKREFD (sym);
- return ((symbolS *) hash_find (sy_hash, name));
+ return sym;
}
symbolS *
-symbol_find_base (const char *name, int strip_underscore)
+symbol_find (const char *name)
{
- if (strip_underscore && *name == '_')
- name++;
+ return symbol_find_noref (name, 0);
+}
+symbolS *
+symbol_find_noref (const char *name, int noref)
+{
#ifdef tc_canonicalize_symbol_name
{
char *copy;
@@ -656,7 +749,7 @@ symbol_find_base (const char *name, int strip_underscore)
*copy = '\0';
}
- return symbol_find_exact (name);
+ return symbol_find_exact_noref (name, noref);
}
/* Once upon a time, symbols were kept in a singly linked list. At
@@ -681,9 +774,7 @@ symbol_append (symbolS *addme, symbolS *target,
know (*rootPP == NULL);
know (*lastPP == NULL);
addme->sy_next = NULL;
-#ifdef SYMBOLS_NEED_BACKPOINTERS
addme->sy_previous = NULL;
-#endif
*rootPP = addme;
*lastPP = addme;
return;
@@ -691,9 +782,7 @@ symbol_append (symbolS *addme, symbolS *target,
if (target->sy_next != NULL)
{
-#ifdef SYMBOLS_NEED_BACKPOINTERS
target->sy_next->sy_previous = addme;
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
}
else
{
@@ -703,10 +792,7 @@ symbol_append (symbolS *addme, symbolS *target,
addme->sy_next = target->sy_next;
target->sy_next = addme;
-
-#ifdef SYMBOLS_NEED_BACKPOINTERS
addme->sy_previous = target;
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
debug_verify_symchain (symbol_rootP, symbol_lastP);
}
@@ -719,12 +805,9 @@ symbol_clear_list_pointers (symbolS *symbolP)
if (LOCAL_SYMBOL_CHECK (symbolP))
abort ();
symbolP->sy_next = NULL;
-#ifdef SYMBOLS_NEED_BACKPOINTERS
symbolP->sy_previous = NULL;
-#endif
}
-#ifdef SYMBOLS_NEED_BACKPOINTERS
/* Remove SYMBOLP from the list. */
void
@@ -784,8 +867,6 @@ symbol_insert (symbolS *addme, symbolS *target,
debug_verify_symchain (*rootPP, *lastPP);
}
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
-
void
verify_symbol_chain (symbolS *rootP, symbolS *lastP)
{
@@ -796,33 +877,13 @@ verify_symbol_chain (symbolS *rootP, symbolS *lastP)
for (; symbol_next (symbolP) != NULL; symbolP = symbol_next (symbolP))
{
-#ifdef BFD_ASSEMBLER
assert (symbolP->bsym != NULL);
-#endif
-#ifdef SYMBOLS_NEED_BACKPOINTERS
assert (symbolP->sy_next->sy_previous == symbolP);
-#else
- /* Walk the list anyways, to make sure pointers are still good. */
- ;
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
}
assert (lastP == symbolP);
}
-void
-verify_symbol_chain_2 (symbolS *sym)
-{
- symbolS *p = sym, *n = sym;
-#ifdef SYMBOLS_NEED_BACKPOINTERS
- while (symbol_previous (p))
- p = symbol_previous (p);
-#endif
- while (symbol_next (n))
- n = symbol_next (n);
- verify_symbol_chain (p, n);
-}
-
static void
report_op_error (symbolS *symp, symbolS *left, symbolS *right)
{
@@ -867,13 +928,11 @@ report_op_error (symbolS *symp, symbolS *left, symbolS *right)
&& seg_right != undefined_section)
{
if (right)
- as_bad_where (file, line,
- _("invalid sections for operation on `%s' and `%s' setting `%s'"),
- S_GET_NAME (left), S_GET_NAME (right), S_GET_NAME (symp));
+ as_bad (_("invalid sections for operation on `%s' and `%s' setting `%s'"),
+ S_GET_NAME (left), S_GET_NAME (right), S_GET_NAME (symp));
else
- as_bad_where (file, line,
- _("invalid section for operation on `%s' setting `%s'"),
- S_GET_NAME (left), S_GET_NAME (symp));
+ as_bad (_("invalid section for operation on `%s' setting `%s'"),
+ S_GET_NAME (left), S_GET_NAME (symp));
}
}
}
@@ -889,7 +948,6 @@ resolve_symbol_value (symbolS *symp)
valueT final_val = 0;
segT final_seg;
-#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (symp))
{
struct local_symbol *locsym = (struct local_symbol *) symp;
@@ -908,7 +966,6 @@ resolve_symbol_value (symbolS *symp)
return final_val;
}
-#endif
if (symp->sy_resolved)
{
@@ -935,6 +992,7 @@ resolve_symbol_value (symbolS *symp)
offsetT left, right;
segT seg_left, seg_right;
operatorT op;
+ int move_seg_ok;
symp->sy_resolving = 1;
@@ -969,6 +1027,19 @@ resolve_symbol_value (symbolS *symp)
symp->sy_value.X_op_symbol = NULL;
do_symbol:
+ if (S_IS_WEAKREFR (symp))
+ {
+ assert (final_val == 0);
+ if (S_IS_WEAKREFR (add_symbol))
+ {
+ assert (add_symbol->sy_value.X_op == O_symbol
+ && add_symbol->sy_value.X_add_number == 0);
+ add_symbol = add_symbol->sy_value.X_add_symbol;
+ assert (! S_IS_WEAKREFR (add_symbol));
+ symp->sy_value.X_add_symbol = add_symbol;
+ }
+ }
+
if (symp->sy_mri_common)
{
/* This is a symbol inside an MRI common section. The
@@ -992,7 +1063,11 @@ resolve_symbol_value (symbolS *symp)
relocation to detect this case, and convert the
relocation to be against the symbol to which this symbol
is equated. */
- if (! S_IS_DEFINED (add_symbol) || S_IS_COMMON (add_symbol))
+ if (! S_IS_DEFINED (add_symbol)
+#if defined (OBJ_COFF) && defined (TE_PE)
+ || S_IS_WEAK (add_symbol)
+#endif
+ || S_IS_COMMON (add_symbol))
{
if (finalize_syms)
{
@@ -1034,6 +1109,8 @@ resolve_symbol_value (symbolS *symp)
}
resolved = symbol_resolved_p (add_symbol);
+ if (S_IS_WEAKREFR (symp))
+ goto exit_dont_set_value;
break;
case O_uminus:
@@ -1116,18 +1193,15 @@ resolve_symbol_value (symbolS *symp)
}
}
+ move_seg_ok = 1;
/* Equality and non-equality tests are permitted on anything.
Subtraction, and other comparison operators are permitted if
both operands are in the same section. Otherwise, both
operands must be absolute. We already handled the case of
addition or subtraction of a constant above. This will
probably need to be changed for an object file format which
- supports arbitrary expressions, such as IEEE-695.
-
- Don't emit messages unless we're finalizing the symbol value,
- otherwise we may get the same message multiple times. */
- if (finalize_syms
- && !(seg_left == absolute_section
+ supports arbitrary expressions, such as IEEE-695. */
+ if (!(seg_left == absolute_section
&& seg_right == absolute_section)
&& !(op == O_eq || op == O_ne)
&& !((op == O_subtract
@@ -1135,9 +1209,21 @@ resolve_symbol_value (symbolS *symp)
&& seg_left == seg_right
&& (seg_left != undefined_section
|| add_symbol == op_symbol)))
- report_op_error (symp, add_symbol, op_symbol);
+ {
+ /* Don't emit messages unless we're finalizing the symbol value,
+ otherwise we may get the same message multiple times. */
+ if (finalize_syms)
+ report_op_error (symp, add_symbol, op_symbol);
+ /* However do not move the symbol into the absolute section
+ if it cannot currently be resolved - this would confuse
+ other parts of the assembler into believing that the
+ expression had been evaluated to zero. */
+ else
+ move_seg_ok = 0;
+ }
- if (final_seg == expr_section || final_seg == undefined_section)
+ if (move_seg_ok
+ && (final_seg == expr_section || final_seg == undefined_section))
final_seg = absolute_section;
/* Check for division by zero. */
@@ -1226,11 +1312,6 @@ resolve_symbol_value (symbolS *symp)
exit_dont_set_value:
/* Always set the segment, even if not finalizing the value.
The segment is used to determine whether a symbol is defined. */
-#if defined (OBJ_AOUT) && ! defined (BFD_ASSEMBLER)
- /* The old a.out backend does not handle S_SET_SEGMENT correctly
- for a stab symbol, so we use this bad hack. */
- if (final_seg != S_GET_SEGMENT (symp))
-#endif
S_SET_SEGMENT (symp, final_seg);
/* Don't worry if we can't resolve an expr_section symbol. */
@@ -1249,8 +1330,6 @@ exit_dont_set_value:
return final_val;
}
-#ifdef BFD_ASSEMBLER
-
static void resolve_local_symbol (const char *, PTR);
/* A static function passed to hash_traverse. */
@@ -1262,16 +1341,80 @@ resolve_local_symbol (const char *key ATTRIBUTE_UNUSED, PTR value)
resolve_symbol_value (value);
}
-#endif
-
/* Resolve all local symbols. */
void
resolve_local_symbol_values (void)
{
-#ifdef BFD_ASSEMBLER
hash_traverse (local_hash, resolve_local_symbol);
-#endif
+}
+
+/* Obtain the current value of a symbol without changing any
+ sub-expressions used. */
+
+int
+snapshot_symbol (symbolS **symbolPP, valueT *valueP, segT *segP, fragS **fragPP)
+{
+ symbolS *symbolP = *symbolPP;
+
+ if (LOCAL_SYMBOL_CHECK (symbolP))
+ {
+ struct local_symbol *locsym = (struct local_symbol *) symbolP;
+
+ *valueP = locsym->lsy_value;
+ *segP = locsym->lsy_section;
+ *fragPP = local_symbol_get_frag (locsym);
+ }
+ else
+ {
+ expressionS expr = symbolP->sy_value;
+
+ if (!symbolP->sy_resolved && expr.X_op != O_illegal)
+ {
+ int resolved;
+
+ if (symbolP->sy_resolving)
+ return 0;
+ symbolP->sy_resolving = 1;
+ resolved = resolve_expression (&expr);
+ symbolP->sy_resolving = 0;
+ if (!resolved)
+ return 0;
+
+ switch (expr.X_op)
+ {
+ case O_constant:
+ case O_register:
+ if (!symbol_equated_p (symbolP))
+ break;
+ /* Fall thru. */
+ case O_symbol:
+ case O_symbol_rva:
+ symbolP = expr.X_add_symbol;
+ break;
+ default:
+ return 0;
+ }
+ }
+
+ /* Never change a defined symbol. */
+ if (symbolP->bsym->section == undefined_section
+ || symbolP->bsym->section == expr_section)
+ *symbolPP = symbolP;
+ *valueP = expr.X_add_number;
+ *segP = symbolP->bsym->section;
+ *fragPP = symbolP->sy_frag;
+
+ if (*segP == expr_section)
+ switch (expr.X_op)
+ {
+ case O_constant: *segP = absolute_section; break;
+ case O_register: *segP = reg_section; break;
+ default: break;
+ }
+ }
+
+ return 1;
}
/* Dollar labels look like a number followed by a dollar sign. Eg, "42$".
@@ -1555,7 +1698,11 @@ fb_label_name (long n, /* We just saw "n:", "nf" or "nb" : n a number. */
char symbol_name_temporary[20]; /* Build up a number, BACKWARDS. */
know (n >= 0);
- know (augend == 0 || augend == 1);
+#ifdef TC_MMIX
+ know ((unsigned long) augend <= 2 /* See mmix_fb_label. */);
+#else
+ know ((unsigned long) augend <= 1);
+#endif
p = symbol_name_build;
#ifdef LOCAL_LABEL_PREFIX
*p++ = LOCAL_LABEL_PREFIX;
@@ -1636,10 +1783,8 @@ decode_local_label_name (char *s)
valueT
S_GET_VALUE (symbolS *s)
{
-#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
return resolve_symbol_value (s);
-#endif
if (!s->sy_resolved)
{
@@ -1647,22 +1792,16 @@ S_GET_VALUE (symbolS *s)
if (!finalize_syms)
return val;
}
+ if (S_IS_WEAKREFR (s))
+ return S_GET_VALUE (s->sy_value.X_add_symbol);
+
if (s->sy_value.X_op != O_constant)
{
- static symbolS *recur;
-
- /* FIXME: In non BFD assemblers, S_IS_DEFINED and S_IS_COMMON
- may call S_GET_VALUE. We use a static symbol to avoid the
- immediate recursion. */
- if (recur == s)
- return (valueT) s->sy_value.X_add_number;
- recur = s;
if (! s->sy_resolved
|| s->sy_value.X_op != O_symbol
|| (S_IS_DEFINED (s) && ! S_IS_COMMON (s)))
as_bad (_("attempt to get value of unresolved symbol `%s'"),
S_GET_NAME (s));
- recur = NULL;
}
return (valueT) s->sy_value.X_add_number;
}
@@ -1672,17 +1811,16 @@ S_GET_VALUE (symbolS *s)
void
S_SET_VALUE (symbolS *s, valueT val)
{
-#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
{
((struct local_symbol *) s)->lsy_value = val;
return;
}
-#endif
s->sy_value.X_op = O_constant;
s->sy_value.X_add_number = (offsetT) val;
s->sy_value.X_unsigned = 0;
+ S_CLEAR_WEAKREFR (s);
}
void
@@ -1693,20 +1831,16 @@ copy_symbol_attributes (symbolS *dest, symbolS *src)
if (LOCAL_SYMBOL_CHECK (src))
src = local_symbol_convert ((struct local_symbol *) src);
-#ifdef BFD_ASSEMBLER
/* In an expression, transfer the settings of these flags.
The user can override later, of course. */
#define COPIED_SYMFLAGS (BSF_FUNCTION | BSF_OBJECT)
dest->bsym->flags |= src->bsym->flags & COPIED_SYMFLAGS;
-#endif
#ifdef OBJ_COPY_SYMBOL_ATTRIBUTES
OBJ_COPY_SYMBOL_ATTRIBUTES (dest, src);
#endif
}
-#ifdef BFD_ASSEMBLER
-
int
S_IS_FUNCTION (symbolS *s)
{
@@ -1742,10 +1876,32 @@ S_IS_WEAK (symbolS *s)
{
if (LOCAL_SYMBOL_CHECK (s))
return 0;
+ /* Conceptually, a weakrefr is weak if the referenced symbol is. We
+ could probably handle a WEAKREFR as always weak though. E.g., if
+ the referenced symbol has lost its weak status, there's no reason
+ to keep handling the weakrefr as if it was weak. */
+ if (S_IS_WEAKREFR (s))
+ return S_IS_WEAK (s->sy_value.X_add_symbol);
return (s->bsym->flags & BSF_WEAK) != 0;
}
int
+S_IS_WEAKREFR (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ return s->sy_weakrefr != 0;
+}
+
+int
+S_IS_WEAKREFD (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ return s->sy_weakrefd != 0;
+}
+
+int
S_IS_COMMON (symbolS *s)
{
if (LOCAL_SYMBOL_CHECK (s))
@@ -1812,7 +1968,9 @@ S_IS_LOCAL (symbolS *s)
return 1;
if (flag_strip_local_absolute
- && (flags & BSF_GLOBAL) == 0
+ /* Keep BSF_FILE symbols in order to allow debuggers to identify
+ the source file even when the object file is stripped. */
+ && (flags & (BSF_GLOBAL | BSF_FILE)) == 0
&& bfd_get_section (s->bsym) == absolute_section)
return 1;
@@ -1829,15 +1987,25 @@ S_IS_LOCAL (symbolS *s)
}
int
-S_IS_EXTERN (symbolS *s)
+S_IS_STABD (symbolS *s)
{
- return S_IS_EXTERNAL (s);
+ return S_GET_NAME (s) == 0;
}
int
-S_IS_STABD (symbolS *s)
+S_IS_VOLATILE (const symbolS *s)
{
- return S_GET_NAME (s) == 0;
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ return s->sy_volatile;
+}
+
+int
+S_IS_FORWARD_REF (const symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ return s->sy_forward_ref;
}
const char *
@@ -1906,6 +2074,11 @@ S_SET_EXTERNAL (symbolS *s)
}
s->bsym->flags |= BSF_GLOBAL;
s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
+
+#ifdef USE_UNIQUE
+ if (! an_external_name && S_GET_NAME(s)[0] != '.')
+ an_external_name = S_GET_NAME (s);
+#endif
}
void
@@ -1927,11 +2100,71 @@ S_SET_WEAK (symbolS *s)
{
if (LOCAL_SYMBOL_CHECK (s))
s = local_symbol_convert ((struct local_symbol *) s);
+#ifdef obj_set_weak_hook
+ obj_set_weak_hook (s);
+#endif
s->bsym->flags |= BSF_WEAK;
s->bsym->flags &= ~(BSF_GLOBAL | BSF_LOCAL);
}
void
+S_SET_WEAKREFR (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_weakrefr = 1;
+ /* If the alias was already used, make sure we mark the target as
+ used as well, otherwise it might be dropped from the symbol
+ table. This may have unintended side effects if the alias is
+ later redirected to another symbol, such as keeping the unused
+ previous target in the symbol table. Since it will be weak, it's
+ not a big deal. */
+ if (s->sy_used)
+ symbol_mark_used (s->sy_value.X_add_symbol);
+}
+
+void
+S_CLEAR_WEAKREFR (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return;
+ s->sy_weakrefr = 0;
+}
+
+void
+S_SET_WEAKREFD (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_weakrefd = 1;
+ S_SET_WEAK (s);
+}
+
+void
+S_CLEAR_WEAKREFD (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return;
+ if (s->sy_weakrefd)
+ {
+ s->sy_weakrefd = 0;
+ /* If a weakref target symbol is weak, then it was never
+ referenced directly before, not even in a .global directive,
+ so decay it to local. If it remains undefined, it will be
+ later turned into a global, like any other undefined
+ symbol. */
+ if (s->bsym->flags & BSF_WEAK)
+ {
+#ifdef obj_clear_weak_hook
+ obj_clear_weak_hook (s);
+#endif
+ s->bsym->flags &= ~BSF_WEAK;
+ s->bsym->flags |= BSF_LOCAL;
+ }
+ }
+}
+
+void
S_SET_THREAD_LOCAL (symbolS *s)
{
if (LOCAL_SYMBOL_CHECK (s))
@@ -1950,7 +2183,7 @@ S_SET_THREAD_LOCAL (symbolS *s)
}
void
-S_SET_NAME (symbolS *s, char *name)
+S_SET_NAME (symbolS *s, const char *name)
{
if (LOCAL_SYMBOL_CHECK (s))
{
@@ -1959,9 +2192,29 @@ S_SET_NAME (symbolS *s, char *name)
}
s->bsym->name = name;
}
-#endif /* BFD_ASSEMBLER */
-#ifdef SYMBOLS_NEED_BACKPOINTERS
+void
+S_SET_VOLATILE (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_volatile = 1;
+}
+
+void
+S_CLEAR_VOLATILE (symbolS *s)
+{
+ if (!LOCAL_SYMBOL_CHECK (s))
+ s->sy_volatile = 0;
+}
+
+void
+S_SET_FORWARD_REF (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ s = local_symbol_convert ((struct local_symbol *) s);
+ s->sy_forward_ref = 1;
+}
/* Return the previous symbol in a chain. */
@@ -1973,8 +2226,6 @@ symbol_previous (symbolS *s)
return s->sy_previous;
}
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
-
/* Return the next symbol in a chain. */
symbolS *
@@ -2003,6 +2254,18 @@ symbol_set_value_expression (symbolS *s, const expressionS *exp)
if (LOCAL_SYMBOL_CHECK (s))
s = local_symbol_convert ((struct local_symbol *) s);
s->sy_value = *exp;
+ S_CLEAR_WEAKREFR (s);
+}
+
+/* Return a pointer to the X_add_number component of a symbol. */
+
+offsetT *
+symbol_X_add_number (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return (offsetT *) &((struct local_symbol *) s)->lsy_value;
+
+ return &s->sy_value.X_add_number;
}
/* Set the value of SYM to the current position in the current segment. */
@@ -2020,14 +2283,13 @@ symbol_set_value_now (symbolS *sym)
void
symbol_set_frag (symbolS *s, fragS *f)
{
-#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
{
local_symbol_set_frag ((struct local_symbol *) s, f);
return;
}
-#endif
s->sy_frag = f;
+ S_CLEAR_WEAKREFR (s);
}
/* Return the frag of a symbol. */
@@ -2035,10 +2297,8 @@ symbol_set_frag (symbolS *s, fragS *f)
fragS *
symbol_get_frag (symbolS *s)
{
-#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
return local_symbol_get_frag ((struct local_symbol *) s);
-#endif
return s->sy_frag;
}
@@ -2050,6 +2310,8 @@ symbol_mark_used (symbolS *s)
if (LOCAL_SYMBOL_CHECK (s))
return;
s->sy_used = 1;
+ if (S_IS_WEAKREFR (s))
+ symbol_mark_used (s->sy_value.X_add_symbol);
}
/* Clear the mark of whether a symbol has been used. */
@@ -2167,13 +2429,11 @@ symbol_written_p (symbolS *s)
void
symbol_mark_resolved (symbolS *s)
{
-#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
{
local_symbol_mark_resolved ((struct local_symbol *) s);
return;
}
-#endif
s->sy_resolved = 1;
}
@@ -2182,10 +2442,8 @@ symbol_mark_resolved (symbolS *s)
int
symbol_resolved_p (symbolS *s)
{
-#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
return local_symbol_resolved_p ((struct local_symbol *) s);
-#endif
return s->sy_resolved;
}
@@ -2196,12 +2454,7 @@ symbol_section_p (symbolS *s ATTRIBUTE_UNUSED)
{
if (LOCAL_SYMBOL_CHECK (s))
return 0;
-#ifdef BFD_ASSEMBLER
return (s->bsym->flags & BSF_SECTION_SYM) != 0;
-#else
- /* FIXME. */
- return 0;
-#endif
}
/* Return whether a symbol is equated to another symbol. */
@@ -2226,6 +2479,9 @@ symbol_equated_reloc_p (symbolS *s)
resolve_symbol_value to flag expression syms that have been
equated. */
return (s->sy_value.X_op == O_symbol
+#if defined (OBJ_COFF) && defined (TE_PE)
+ && ! S_IS_WEAK (s)
+#endif
&& ((s->sy_resolved && s->sy_value.X_op_symbol != NULL)
|| ! S_IS_DEFINED (s)
|| S_IS_COMMON (s)));
@@ -2241,8 +2497,6 @@ symbol_constant_p (symbolS *s)
return s->sy_value.X_op == O_constant;
}
-#ifdef BFD_ASSEMBLER
-
/* Return the BFD symbol for a symbol. */
asymbol *
@@ -2260,11 +2514,18 @@ symbol_set_bfdsym (symbolS *s, asymbol *bsym)
{
if (LOCAL_SYMBOL_CHECK (s))
s = local_symbol_convert ((struct local_symbol *) s);
- s->bsym = bsym;
+ /* Usually, it is harmless to reset a symbol to a BFD section
+ symbol. For example, obj_elf_change_section sets the BFD symbol
+ of an old symbol with the newly created section symbol. But when
+ we have multiple sections with the same name, the newly created
+ section may have the same name as an old section. We check if the
+ old symbol has been already marked as a section symbol before
+ resetting it. */
+ if ((s->bsym->flags & BSF_SECTION_SYM) == 0)
+ s->bsym = bsym;
+ /* else XXX - What do we do now ? */
}
-#endif /* BFD_ASSEMBLER */
-
#ifdef OBJ_SYMFIELD_TYPE
/* Get a pointer to the object format information for a symbol. */
@@ -2319,19 +2580,12 @@ symbol_begin (void)
symbol_lastP = NULL;
symbol_rootP = NULL; /* In case we have 0 symbols (!!) */
sy_hash = hash_new ();
-#ifdef BFD_ASSEMBLER
local_hash = hash_new ();
-#endif
memset ((char *) (&abs_symbol), '\0', sizeof (abs_symbol));
-#ifdef BFD_ASSEMBLER
#if defined (EMIT_SECTION_SYMBOLS) || !defined (RELOC_REQUIRES_SYMBOL)
abs_symbol.bsym = bfd_abs_section.symbol;
#endif
-#else
- /* Can't initialise a union. Sigh. */
- S_SET_SEGMENT (&abs_symbol, absolute_section);
-#endif
abs_symbol.sy_value.X_op = O_constant;
abs_symbol.sy_frag = &zero_address_frag;
@@ -2343,17 +2597,7 @@ int indent_level;
/* Maximum indent level.
Available for modification inside a gdb session. */
-int max_indent_level = 8;
-
-#if 0
-
-static void
-indent (void)
-{
- printf ("%*s", indent_level * 4, "");
-}
-
-#endif
+static int max_indent_level = 8;
void
print_symbol_value_1 (FILE *file, symbolS *sym)
@@ -2365,7 +2609,6 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
if (LOCAL_SYMBOL_CHECK (sym))
{
-#ifdef BFD_ASSEMBLER
struct local_symbol *locsym = (struct local_symbol *) sym;
if (local_symbol_get_frag (locsym) != &zero_address_frag
&& local_symbol_get_frag (locsym) != NULL)
@@ -2373,7 +2616,6 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
if (local_symbol_resolved_p (locsym))
fprintf (file, " resolved");
fprintf (file, " local");
-#endif
}
else
{
@@ -2391,13 +2633,19 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
fprintf (file, " used");
if (S_IS_LOCAL (sym))
fprintf (file, " local");
- if (S_IS_EXTERN (sym))
+ if (S_IS_EXTERNAL (sym))
fprintf (file, " extern");
+ if (S_IS_WEAK (sym))
+ fprintf (file, " weak");
if (S_IS_DEBUG (sym))
fprintf (file, " debug");
if (S_IS_DEFINED (sym))
fprintf (file, " defined");
}
+ if (S_IS_WEAKREFR (sym))
+ fprintf (file, " weakrefr");
+ if (S_IS_WEAKREFD (sym))
+ fprintf (file, " weakrefd");
fprintf (file, " %s", segment_name (S_GET_SEGMENT (sym)));
if (symbol_resolved_p (sym))
{
@@ -2412,12 +2660,10 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
{
indent_level++;
fprintf (file, "\n%*s<", indent_level * 4, "");
-#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (sym))
fprintf (file, "constant %lx",
(long) ((struct local_symbol *) sym)->lsy_value);
else
-#endif
print_expr_1 (file, &sym->sy_value);
fprintf (file, ">");
indent_level--;
@@ -2568,9 +2814,7 @@ void
symbol_print_statistics (FILE *file)
{
hash_print_statistics (file, "symbol table", sy_hash);
-#ifdef BFD_ASSEMBLER
hash_print_statistics (file, "mini local symbol table", local_hash);
fprintf (file, "%lu mini local symbols created, %lu converted\n",
local_symbol_count, local_symbol_conversion_count);
-#endif
}
diff --git a/contrib/binutils/gas/symbols.h b/contrib/binutils/gas/symbols.h
index 15dc2639bf8d..7a4b8f7a6da3 100644
--- a/contrib/binutils/gas/symbols.h
+++ b/contrib/binutils/gas/symbols.h
@@ -1,6 +1,6 @@
/* symbols.h -
Copyright 1987, 1990, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,20 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifdef BFD_ASSEMBLER
-/* The BFD code wants to walk the list in both directions. */
-#undef SYMBOLS_NEED_BACKPOINTERS
-#define SYMBOLS_NEED_BACKPOINTERS
-#endif
-
-#ifndef BFD_ASSEMBLER
-/* The non-BFD code expects to be able to manipulate the symbol fields
- directly. */
-#include "struc-symbol.h"
-#endif
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
extern struct obstack notes; /* eg FixS live here. */
@@ -49,16 +37,19 @@ extern int symbols_case_sensitive;
char *decode_local_label_name (char *s);
symbolS *symbol_find (const char *name);
+symbolS *symbol_find_noref (const char *name, int noref);
symbolS *symbol_find_exact (const char *name);
-symbolS *symbol_find_base (const char *name, int strip_underscore);
+symbolS *symbol_find_exact_noref (const char *name, int noref);
symbolS *symbol_find_or_make (const char *name);
symbolS *symbol_make (const char *name);
symbolS *symbol_new (const char *name, segT segment, valueT value,
fragS * frag);
symbolS *symbol_create (const char *name, segT segment, valueT value,
fragS * frag);
-struct local_symbol *local_symbol_make (const char *name, segT section,
- valueT value, fragS * frag);
+symbolS *symbol_clone (symbolS *, int);
+#undef symbol_clone_if_forward_ref
+symbolS *symbol_clone_if_forward_ref (symbolS *, int);
+#define symbol_clone_if_forward_ref(s) symbol_clone_if_forward_ref (s, 0)
symbolS *symbol_temp_new (segT, valueT, fragS *);
symbolS *symbol_temp_new_now (void);
symbolS *symbol_temp_make (void);
@@ -70,6 +61,7 @@ void symbol_print_statistics (FILE *);
void symbol_table_insert (symbolS * symbolP);
valueT resolve_symbol_value (symbolS *);
void resolve_local_symbol_values (void);
+int snapshot_symbol (symbolS **, valueT *, segT *, fragS **);
void print_symbol_value (symbolS *);
void print_expr (expressionS *);
@@ -90,26 +82,34 @@ extern void copy_symbol_attributes (symbolS *, symbolS *);
extern valueT S_GET_VALUE (symbolS *);
extern void S_SET_VALUE (symbolS *, valueT);
-#ifdef BFD_ASSEMBLER
extern int S_IS_FUNCTION (symbolS *);
extern int S_IS_EXTERNAL (symbolS *);
extern int S_IS_WEAK (symbolS *);
+extern int S_IS_WEAKREFR (symbolS *);
+extern int S_IS_WEAKREFD (symbolS *);
extern int S_IS_COMMON (symbolS *);
extern int S_IS_DEFINED (symbolS *);
extern int S_FORCE_RELOC (symbolS *, int);
extern int S_IS_DEBUG (symbolS *);
extern int S_IS_LOCAL (symbolS *);
-extern int S_IS_EXTERN (symbolS *);
extern int S_IS_STABD (symbolS *);
+extern int S_IS_VOLATILE (const symbolS *);
+extern int S_IS_FORWARD_REF (const symbolS *);
extern const char *S_GET_NAME (symbolS *);
extern segT S_GET_SEGMENT (symbolS *);
extern void S_SET_SEGMENT (symbolS *, segT);
extern void S_SET_EXTERNAL (symbolS *);
-extern void S_SET_NAME (symbolS *, char *);
+extern void S_SET_NAME (symbolS *, const char *);
extern void S_CLEAR_EXTERNAL (symbolS *);
extern void S_SET_WEAK (symbolS *);
+extern void S_SET_WEAKREFR (symbolS *);
+extern void S_CLEAR_WEAKREFR (symbolS *);
+extern void S_SET_WEAKREFD (symbolS *);
+extern void S_CLEAR_WEAKREFD (symbolS *);
extern void S_SET_THREAD_LOCAL (symbolS *);
-#endif
+extern void S_SET_VOLATILE (symbolS *);
+extern void S_CLEAR_VOLATILE (symbolS *);
+extern void S_SET_FORWARD_REF (symbolS *);
#ifndef WORKING_DOT_WORD
struct broken_word
@@ -154,8 +154,6 @@ extern const short seg_N_TYPE[];/* subseg.c */
void symbol_clear_list_pointers (symbolS * symbolP);
-#ifdef SYMBOLS_NEED_BACKPOINTERS
-
void symbol_insert (symbolS * addme, symbolS * target,
symbolS ** rootP, symbolS ** lastP);
void symbol_remove (symbolS * symbolP, symbolS ** rootP,
@@ -163,10 +161,7 @@ void symbol_remove (symbolS * symbolP, symbolS ** rootP,
extern symbolS *symbol_previous (symbolS *);
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
-
void verify_symbol_chain (symbolS * rootP, symbolS * lastP);
-void verify_symbol_chain_2 (symbolS * symP);
void symbol_append (symbolS * addme, symbolS * target,
symbolS ** rootP, symbolS ** lastP);
@@ -175,6 +170,7 @@ extern symbolS *symbol_next (symbolS *);
extern expressionS *symbol_get_value_expression (symbolS *);
extern void symbol_set_value_expression (symbolS *, const expressionS *);
+extern offsetT *symbol_X_add_number (symbolS *);
extern void symbol_set_value_now (symbolS *);
extern void symbol_set_frag (symbolS *, fragS *);
extern fragS *symbol_get_frag (symbolS *);
@@ -196,11 +192,8 @@ 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 *);
-
-#ifdef BFD_ASSEMBLER
extern asymbol *symbol_get_bfdsym (symbolS *);
extern void symbol_set_bfdsym (symbolS *, asymbol *);
-#endif
#ifdef OBJ_SYMFIELD_TYPE
OBJ_SYMFIELD_TYPE *symbol_get_obj (symbolS *);
diff --git a/contrib/binutils/gas/tc.h b/contrib/binutils/gas/tc.h
index 5d7b44d66457..ec2f73159b53 100644
--- a/contrib/binutils/gas/tc.h
+++ b/contrib/binutils/gas/tc.h
@@ -1,6 +1,7 @@
/* tc.h - target cpu dependent
- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 2000, 2001, 2003
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 2000, 2001, 2003,
+ 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,77 +18,59 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* In theory (mine, at least!) the machine dependent part of the assembler
should only have to include one file. This one. -- JF */
extern const pseudo_typeS md_pseudo_table[];
-extern const int md_reloc_size; /* Size of a relocation record */
-
-char *md_atof (int what_statement_type, char *literalP, int *sizeP);
-#ifndef md_estimate_size_before_relax
-int md_estimate_size_before_relax (fragS * fragP, segT segment);
+char * md_atof (int, char *, int *);
+int md_parse_option (int, char *);
+void md_show_usage (FILE *);
+void md_assemble (char *);
+void md_begin (void);
+void md_number_to_chars (char *, valueT, int);
+void md_apply_fix (fixS *, valueT *, segT);
+
+#ifndef WORKING_DOT_WORD
+extern int md_short_jump_size;
+extern int md_long_jump_size;
#endif
-int md_parse_option (int c, char *arg);
-void md_show_usage (FILE *);
-#ifndef md_pcrel_from
-long md_pcrel_from (fixS * fixP);
+
+#ifdef USE_UNIQUE
+/* The name of an external symbol which is
+ used to make weak PE symbol names unique. */
+extern const char * an_external_name;
#endif
-short tc_coff_fix2rtype (fixS * fixP);
-void md_assemble (char *str);
-void md_begin (void);
+
#ifndef md_create_long_jump
-void md_create_long_jump (char *ptr, addressT from_addr,
- addressT to_addr, fragS * frag,
- symbolS * to_symbol);
+void md_create_long_jump (char *, addressT, addressT, fragS *, symbolS *);
#endif
#ifndef md_create_short_jump
-void md_create_short_jump (char *ptr, addressT from_addr,
- addressT to_addr, fragS * frag,
- symbolS * to_symbol);
+void md_create_short_jump (char *, addressT, addressT, fragS *, symbolS *);
+#endif
+#ifndef md_pcrel_from
+long md_pcrel_from (fixS *);
#endif
-void md_number_to_chars (char *buf, valueT val, int n);
-
#ifndef md_operand
-void md_operand (expressionS * expressionP);
+void md_operand (expressionS *);
+#endif
+#ifndef md_estimate_size_before_relax
+int md_estimate_size_before_relax (fragS * fragP, segT);
+#endif
+#ifndef md_section_align
+valueT md_section_align (segT, valueT);
+#endif
+#ifndef md_undefined_symbol
+symbolS *md_undefined_symbol (char *);
#endif
-void md_apply_fix3 (fixS *, valueT *, segT);
-
-#ifdef BFD_ASSEMBLER
#ifndef md_convert_frag
-void md_convert_frag (bfd * headers, segT sec, fragS * fragP);
-#endif
-#ifndef tc_headers_hook
-void tc_headers_hook (segT *, fixS *);
+void md_convert_frag (bfd *, segT, fragS *);
#endif
#ifndef RELOC_EXPANSION_POSSIBLE
extern arelent *tc_gen_reloc (asection *, fixS *);
#else
extern arelent **tc_gen_reloc (asection *, fixS *);
#endif
-#else /* not BFD_ASSEMBLER */
-#ifndef md_convert_frag
-void md_convert_frag (object_headers * headers, segT, fragS * fragP);
-#endif
-
-#ifndef tc_crawl_symbol_chain
-void tc_crawl_symbol_chain (object_headers * headers);
-#endif /* tc_crawl_symbol_chain */
-
-#ifndef tc_headers_hook
-void tc_headers_hook (object_headers * headers);
-#endif /* tc_headers_hook */
-#endif /* BFD_ASSEMBLER */
-
-#ifndef md_section_align
-valueT md_section_align (segT seg, valueT size);
-#endif
-
-#ifndef md_undefined_symbol
-symbolS *md_undefined_symbol (char *name);
-#endif
-
-/* end of tc.h */
diff --git a/contrib/binutils/gas/write.c b/contrib/binutils/gas/write.c
index 5acd6077844f..9186717c4f85 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
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This thing should be set up to do byteordering correctly. But... */
@@ -71,13 +71,9 @@
/* The PA needs this for PIC code generation. */
#define TC_VALIDATE_FIX_SUB(FIX) 1
#else
-#ifdef BFD_ASSEMBLER
#define TC_VALIDATE_FIX_SUB(FIX) \
((FIX)->fx_r_type == BFD_RELOC_GPREL32 \
|| (FIX)->fx_r_type == BFD_RELOC_GPREL16)
-#else
-#define TC_VALIDATE_FIX_SUB(FIX) 0
-#endif
#endif
#endif
@@ -97,9 +93,8 @@
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from (FIX)
#endif
-#ifndef WORKING_DOT_WORD
-extern const int md_short_jump_size;
-extern const int md_long_jump_size;
+#ifndef TC_FAKE_LABEL
+#define TC_FAKE_LABEL(NAME) (strcmp ((NAME), FAKE_LABEL_NAME) == 0)
#endif
/* Used to control final evaluation of expressions. */
@@ -114,7 +109,6 @@ addressT dot_value;
void print_fixup (fixS *);
-#ifdef BFD_ASSEMBLER
static void renumber_sections (bfd *, asection *, PTR);
/* We generally attach relocs to frag chains. However, after we have
@@ -122,53 +116,18 @@ static void renumber_sections (bfd *, asection *, PTR);
that must be attached to a segment. This will include relocs added
in md_estimate_size_for_relax, for example. */
static int frags_chained = 0;
-#endif
-
-#ifndef BFD_ASSEMBLER
-
-#ifndef MANY_SEGMENTS
-struct frag *text_frag_root;
-struct frag *data_frag_root;
-struct frag *bss_frag_root;
-
-struct frag *text_last_frag; /* Last frag in segment. */
-struct frag *data_last_frag; /* Last frag in segment. */
-static struct frag *bss_last_frag; /* Last frag in segment. */
-#endif
-
-#ifndef BFD
-static object_headers headers;
-#endif
-
-long string_byte_count;
-char *next_object_file_charP; /* Tracks object file bytes. */
-
-#ifndef OBJ_VMS
-int magic_number_for_object_file = DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE;
-#endif
-
-#endif /* BFD_ASSEMBLER */
static int n_fixups;
-#ifdef BFD_ASSEMBLER
#define RELOC_ENUM enum bfd_reloc_code_real
-#else
-#define RELOC_ENUM int
-#endif
static fixS *fix_new_internal (fragS *, int where, int size,
symbolS *add, symbolS *sub,
offsetT offset, int pcrel,
RELOC_ENUM r_type);
-#if defined (BFD_ASSEMBLER) || (!defined (BFD) && !defined (OBJ_VMS))
static long fixup_segment (fixS *, segT);
-#endif
static relax_addressT relax_align (relax_addressT addr, int align);
-#if defined (BFD_ASSEMBLER) || ! defined (BFD)
static fragS *chain_frchains_together_1 (segT, struct frchain *);
-#endif
-#ifdef BFD_ASSEMBLER
static void chain_frchains_together (bfd *, segT, PTR);
static void cvt_frag_to_fill (segT, fragS *);
static void adjust_reloc_syms (bfd *, asection *, PTR);
@@ -176,15 +135,7 @@ 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);
-#endif
-#if defined (BFD_ASSEMBLER) || (! defined (BFD) && ! defined (OBJ_AOUT))
static void merge_data_into_text (void);
-#endif
-#if ! defined (BFD_ASSEMBLER) && ! defined (BFD)
-static void cvt_frag_to_fill (object_headers *, segT, fragS *);
-static void remove_subsegs (frchainS *, int, fragS **, fragS **);
-static void relax_and_size_all_segments (void);
-#endif
/* Create a fixS in obstack 'notes'. */
@@ -219,9 +170,7 @@ fix_new_internal (fragS *frag, /* Which frag? */
fixP->fx_dot_value = dot_value;
fixP->fx_pcrel = pcrel;
fixP->fx_plt = 0;
-#if defined(NEED_FX_R_TYPE) || defined (BFD_ASSEMBLER)
fixP->fx_r_type = r_type;
-#endif
fixP->fx_im_disp = 0;
fixP->fx_pcrel_adjust = 0;
fixP->fx_bit_fixP = 0;
@@ -248,14 +197,12 @@ fix_new_internal (fragS *frag, /* Which frag? */
time option. xoxorich. */
{
-#ifdef BFD_ASSEMBLER
fixS **seg_fix_rootP = (frags_chained
? &seg_info (now_seg)->fix_root
: &frchain_now->fix_root);
fixS **seg_fix_tailP = (frags_chained
? &seg_info (now_seg)->fix_tail
: &frchain_now->fix_tail);
-#endif
#ifdef REVERSE_SORT_RELOCS
@@ -335,16 +282,7 @@ fix_new_exp (fragS *frag, /* Which frag? */
case O_symbol_rva:
add = exp->X_add_symbol;
off = exp->X_add_number;
-
-#if defined(BFD_ASSEMBLER)
r_type = BFD_RELOC_RVA;
-#else
-#if defined(TC_RVA_RELOC)
- r_type = TC_RVA_RELOC;
-#else
- as_fatal (_("rva not supported"));
-#endif
-#endif
break;
case O_uminus:
@@ -374,11 +312,13 @@ fix_new_exp (fragS *frag, /* Which frag? */
int
generic_force_reloc (fixS *fix)
{
-#ifdef BFD_ASSEMBLER
if (fix->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fix->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 1;
-#endif
+
+ if (fix->fx_addsy == NULL)
+ return 0;
+
return S_FORCE_RELOC (fix->fx_addsy, fix->fx_subsy == NULL);
}
@@ -394,10 +334,6 @@ append (char **charPP, char *fromP, unsigned long length)
*charPP += length;
}
-#ifndef BFD_ASSEMBLER
-int section_alignment[SEG_MAXIMUM_ORDINAL];
-#endif
-
/* This routine records the largest alignment seen for each segment.
If the beginning of the segment is aligned on the worst-case
boundary, all of the other alignments within it will work. At
@@ -412,13 +348,9 @@ record_alignment (/* Segment to which alignment pertains. */
{
if (seg == absolute_section)
return;
-#ifdef BFD_ASSEMBLER
+
if ((unsigned int) align > bfd_get_section_alignment (stdoutput, seg))
bfd_set_section_alignment (stdoutput, seg, align);
-#else
- if (align > section_alignment[(int) seg])
- section_alignment[(int) seg] = align;
-#endif
}
int
@@ -426,15 +358,10 @@ get_recorded_alignment (segT seg)
{
if (seg == absolute_section)
return 0;
-#ifdef BFD_ASSEMBLER
+
return bfd_get_section_alignment (stdoutput, seg);
-#else
- return section_alignment[(int) seg];
-#endif
}
-#ifdef BFD_ASSEMBLER
-
/* Reset the section indices after removing the gas created sections. */
static void
@@ -446,24 +373,17 @@ renumber_sections (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, PTR countparg)
++*countp;
}
-#endif /* defined (BFD_ASSEMBLER) */
-
-#if defined (BFD_ASSEMBLER) || ! defined (BFD)
-
static fragS *
chain_frchains_together_1 (segT section, struct frchain *frchp)
{
fragS dummy, *prev_frag = &dummy;
-#ifdef BFD_ASSEMBLER
fixS fix_dummy, *prev_fix = &fix_dummy;
-#endif
for (; frchp && frchp->frch_seg == section; frchp = frchp->frch_next)
{
prev_frag->fr_next = frchp->frch_root;
prev_frag = frchp->frch_last;
assert (prev_frag->fr_type != 0);
-#ifdef BFD_ASSEMBLER
if (frchp->fix_root != (fixS *) NULL)
{
if (seg_info (section)->fix_root == (fixS *) NULL)
@@ -472,17 +392,12 @@ chain_frchains_together_1 (segT section, struct frchain *frchp)
seg_info (section)->fix_tail = frchp->fix_tail;
prev_fix = frchp->fix_tail;
}
-#endif
}
assert (prev_frag->fr_type != 0);
prev_frag->fr_next = 0;
return prev_frag;
}
-#endif
-
-#ifdef BFD_ASSEMBLER
-
static void
chain_frchains_together (bfd *abfd ATTRIBUTE_UNUSED,
segT section,
@@ -502,28 +417,8 @@ chain_frchains_together (bfd *abfd ATTRIBUTE_UNUSED,
frags_chained = 1;
}
-#endif
-
-#if !defined (BFD) && !defined (BFD_ASSEMBLER)
-
-static void
-remove_subsegs (frchainS *head, int seg, fragS **root, fragS **last)
-{
- *root = head->frch_root;
- *last = chain_frchains_together_1 (seg, head);
-}
-
-#endif /* BFD */
-
-#if defined (BFD_ASSEMBLER) || !defined (BFD)
-
-#ifdef BFD_ASSEMBLER
static void
cvt_frag_to_fill (segT sec ATTRIBUTE_UNUSED, fragS *fragP)
-#else
-static void
-cvt_frag_to_fill (object_headers *headersP, segT sec, fragS *fragP)
-#endif
{
switch (fragP->fr_type)
{
@@ -577,11 +472,7 @@ cvt_frag_to_fill (object_headers *headersP, segT sec, fragS *fragP)
break;
case rs_machine_dependent:
-#ifdef BFD_ASSEMBLER
md_convert_frag (stdoutput, sec, fragP);
-#else
- md_convert_frag (headersP, sec, fragP);
-#endif
assert (fragP->fr_next == NULL
|| ((offsetT) (fragP->fr_next->fr_address - fragP->fr_address)
@@ -616,24 +507,26 @@ cvt_frag_to_fill (object_headers *headersP, segT sec, fragS *fragP)
BAD_CASE (fragP->fr_type);
break;
}
+#ifdef md_frag_check
+ md_frag_check (fragP);
+#endif
}
-#endif /* defined (BFD_ASSEMBLER) || !defined (BFD) */
-
-#ifdef BFD_ASSEMBLER
-static void relax_seg (bfd *, asection *, PTR);
+struct relax_seg_info
+{
+ int pass;
+ int changed;
+};
static void
-relax_seg (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, PTR xxx)
+relax_seg (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *xxx)
{
segment_info_type *seginfo = seg_info (sec);
+ struct relax_seg_info *info = (struct relax_seg_info *) xxx;
if (seginfo && seginfo->frchainP
- && relax_segment (seginfo->frchainP->frch_root, sec))
- {
- int *result = (int *) xxx;
- *result = 1;
- }
+ && relax_segment (seginfo->frchainP->frch_root, sec, info->pass))
+ info->changed = 1;
}
static void size_seg (bfd *, asection *, PTR);
@@ -711,12 +604,8 @@ size_seg (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
#ifdef DEBUG2
static void
-dump_section_relocs (abfd, sec, stream_)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- char *stream_;
+dump_section_relocs (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, FILE *stream)
{
- FILE *stream = (FILE *) stream_;
segment_info_type *seginfo = seg_info (sec);
fixS *fixp = seginfo->fix_root;
@@ -789,9 +678,10 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED,
if (fixp->fx_subsy != NULL)
resolve_symbol_value (fixp->fx_subsy);
- /* If this symbol is equated to an undefined symbol, convert
- the fixup to being against that symbol. */
- if (symbol_equated_reloc_p (sym))
+ /* 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))
{
fixp->fx_offset += symbol_get_value_expression (sym)->X_add_number;
sym = symbol_get_value_expression (sym)->X_add_symbol;
@@ -944,12 +834,12 @@ write_relocs (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
continue;
}
-#if 0
- /* 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 ();
-#endif
+ /*
+ 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,
@@ -1050,7 +940,7 @@ write_relocs (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
#ifdef DEBUG4
{
- int i, j, nsyms;
+ unsigned int i, j, nsyms;
asymbol **sympp;
sympp = bfd_get_outsymbols (stdoutput);
nsyms = bfd_get_symcount (stdoutput);
@@ -1079,7 +969,7 @@ write_relocs (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
#ifdef DEBUG3
{
- int i;
+ unsigned int i;
arelent *r;
asymbol *s;
fprintf (stderr, "relocs for sec %s\n", sec->name);
@@ -1087,8 +977,8 @@ write_relocs (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
{
r = relocs[i];
s = *r->sym_ptr_ptr;
- fprintf (stderr, " reloc %2d @%08x off %4x : sym %-10s addend %x\n",
- i, r, r->address, s->name, r->addend);
+ fprintf (stderr, " reloc %2d @%p off %4lx : sym %-10s addend %lx\n",
+ i, r, (unsigned long)r->address, s->name, (unsigned long)r->addend);
}
}
#endif
@@ -1189,126 +1079,17 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
}
}
}
-#endif
-#if defined(BFD_ASSEMBLER) || (!defined (BFD) && !defined(OBJ_AOUT))
static void
merge_data_into_text (void)
{
-#if defined(BFD_ASSEMBLER) || defined(MANY_SEGMENTS)
seg_info (text_section)->frchainP->frch_last->fr_next =
seg_info (data_section)->frchainP->frch_root;
seg_info (text_section)->frchainP->frch_last =
seg_info (data_section)->frchainP->frch_last;
seg_info (data_section)->frchainP = 0;
-#else
- fixS *tmp;
-
- text_last_frag->fr_next = data_frag_root;
- text_last_frag = data_last_frag;
- data_last_frag = NULL;
- data_frag_root = NULL;
- if (text_fix_root)
- {
- for (tmp = text_fix_root; tmp->fx_next; tmp = tmp->fx_next);;
- tmp->fx_next = data_fix_root;
- text_fix_tail = data_fix_tail;
- }
- else
- text_fix_root = data_fix_root;
- data_fix_root = NULL;
-#endif
}
-#endif /* BFD_ASSEMBLER || (! BFD && ! OBJ_AOUT) */
-#if !defined (BFD_ASSEMBLER) && !defined (BFD)
-static void
-relax_and_size_all_segments ()
-{
- fragS *fragP;
-
- relax_segment (text_frag_root, SEG_TEXT);
- relax_segment (data_frag_root, SEG_DATA);
- relax_segment (bss_frag_root, SEG_BSS);
-
- /* Now the addresses of frags are correct within the segment. */
- know (text_last_frag->fr_type == rs_fill && text_last_frag->fr_offset == 0);
- H_SET_TEXT_SIZE (&headers, text_last_frag->fr_address);
- text_last_frag->fr_address = H_GET_TEXT_SIZE (&headers);
-
- /* Join the 2 segments into 1 huge segment.
- To do this, re-compute every rn_address in the SEG_DATA frags.
- Then join the data frags after the text frags.
-
- Determine a_data [length of data segment]. */
- if (data_frag_root)
- {
- register relax_addressT slide;
-
- know ((text_last_frag->fr_type == rs_fill)
- && (text_last_frag->fr_offset == 0));
-
- H_SET_DATA_SIZE (&headers, data_last_frag->fr_address);
- data_last_frag->fr_address = H_GET_DATA_SIZE (&headers);
- slide = H_GET_TEXT_SIZE (&headers); /* & in file of the data segment. */
-#ifdef OBJ_BOUT
-#define RoundUp(N,S) (((N)+(S)-1)&-(S))
- /* For b.out: If the data section has a strict alignment
- requirement, its load address in the .o file will be
- rounded up from the size of the text section. These
- two values are *not* the same! Similarly for the bss
- section.... */
- slide = RoundUp (slide, 1 << section_alignment[SEG_DATA]);
-#endif
-
- for (fragP = data_frag_root; fragP; fragP = fragP->fr_next)
- fragP->fr_address += slide;
-
- know (text_last_frag != 0);
- text_last_frag->fr_next = data_frag_root;
- }
- else
- {
- H_SET_DATA_SIZE (&headers, 0);
- }
-
-#ifdef OBJ_BOUT
- /* See above comments on b.out data section address. */
- {
- addressT bss_vma;
- if (data_last_frag == 0)
- bss_vma = H_GET_TEXT_SIZE (&headers);
- else
- bss_vma = data_last_frag->fr_address;
- bss_vma = RoundUp (bss_vma, 1 << section_alignment[SEG_BSS]);
- bss_address_frag.fr_address = bss_vma;
- }
-#else /* ! OBJ_BOUT */
- bss_address_frag.fr_address = (H_GET_TEXT_SIZE (&headers) +
- H_GET_DATA_SIZE (&headers));
-
-#endif /* ! OBJ_BOUT */
-
- /* Slide all the frags. */
- if (bss_frag_root)
- {
- relax_addressT slide = bss_address_frag.fr_address;
-
- for (fragP = bss_frag_root; fragP; fragP = fragP->fr_next)
- fragP->fr_address += slide;
- }
-
- if (bss_last_frag)
- H_SET_BSS_SIZE (&headers,
- bss_last_frag->fr_address - bss_frag_root->fr_address);
- else
- H_SET_BSS_SIZE (&headers, 0);
-}
-#endif /* ! BFD_ASSEMBLER && ! BFD */
-
-#if defined (BFD_ASSEMBLER) || !defined (BFD)
-
-#ifdef BFD_ASSEMBLER
static void
set_symtab (void)
{
@@ -1344,7 +1125,6 @@ set_symtab (void)
assert (result);
symbol_table_frozen = 1;
}
-#endif
/* Finish the subsegments. After every sub-segment, we fake an
".align ...". This conforms to BSD4.2 brane-damage. We then fake
@@ -1361,11 +1141,7 @@ set_symtab (void)
(!(FRCHAIN)->frch_next || (FRCHAIN)->frch_next->frch_seg != (SEG) \
? get_recorded_alignment (SEG) : 0)
#else
-#ifdef BFD_ASSEMBLER
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
-#else
-#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 2
-#endif
#endif
#endif
@@ -1386,7 +1162,6 @@ subsegs_finish (void)
if (!had_errors ())
{
alignment = SUB_SEGMENT_ALIGN (now_seg, frchainP);
-#ifdef BFD_ASSEMBLER
if ((bfd_get_section_flags (now_seg->owner, now_seg) & SEC_MERGE)
&& now_seg->entsize)
{
@@ -1401,7 +1176,6 @@ subsegs_finish (void)
if (entalign > alignment)
alignment = entalign;
}
-#endif
}
if (subseg_text_p (now_seg))
@@ -1425,7 +1199,8 @@ subsegs_finish (void)
void
write_object_file (void)
{
-#if ! defined (BFD_ASSEMBLER) || ! defined (WORKING_DOT_WORD)
+ struct relax_seg_info rsi;
+#ifndef WORKING_DOT_WORD
fragS *fragP; /* Track along all frags. */
#endif
@@ -1462,49 +1237,30 @@ write_object_file (void)
/* From now on, we don't care about sub-segments. Build one frag chain
for each segment. Linked thru fr_next. */
-#ifdef BFD_ASSEMBLER
/* Remove the sections created by gas for its own purposes. */
{
- asection **seclist;
int i;
- seclist = &stdoutput->sections;
- while (*seclist)
- {
- if (*seclist == reg_section || *seclist == expr_section)
- {
- bfd_section_list_remove (stdoutput, seclist);
- stdoutput->section_count--;
- }
- else
- seclist = &(*seclist)->next;
- }
+ bfd_section_list_remove (stdoutput, reg_section);
+ bfd_section_list_remove (stdoutput, expr_section);
+ stdoutput->section_count -= 2;
i = 0;
bfd_map_over_sections (stdoutput, renumber_sections, &i);
}
bfd_map_over_sections (stdoutput, chain_frchains_together, (char *) 0);
-#else
- remove_subsegs (frchain_root, SEG_TEXT, &text_frag_root, &text_last_frag);
- remove_subsegs (data0_frchainP, SEG_DATA, &data_frag_root, &data_last_frag);
- remove_subsegs (bss0_frchainP, SEG_BSS, &bss_frag_root, &bss_last_frag);
-#endif
/* We have two segments. If user gave -R flag, then we must put the
data frags into the text segment. Do this before relaxing so
we know to take advantage of -R and make shorter addresses. */
-#if !defined (OBJ_AOUT) || defined (BFD_ASSEMBLER)
if (flag_readonly_data_in_text)
{
merge_data_into_text ();
}
-#endif
-#ifdef BFD_ASSEMBLER
+ rsi.pass = 0;
while (1)
{
- int changed;
-
#ifndef WORKING_DOT_WORD
/* We need to reset the markers in the broken word list and
associated frags between calls to relax_segment (via
@@ -1525,9 +1281,10 @@ write_object_file (void)
}
#endif
- changed = 0;
- bfd_map_over_sections (stdoutput, relax_seg, &changed);
- if (!changed)
+ rsi.changed = 0;
+ bfd_map_over_sections (stdoutput, relax_seg, &rsi);
+ rsi.pass++;
+ if (!rsi.changed)
break;
}
@@ -1541,9 +1298,6 @@ write_object_file (void)
finalize_syms = TC_FINALIZE_SYMS_BEFORE_SIZE_SEG;
bfd_map_over_sections (stdoutput, size_seg, (char *) 0);
-#else
- relax_and_size_all_segments ();
-#endif /* BFD_ASSEMBLER */
/* Relaxation has completed. Freeze all syms. */
finalize_syms = 1;
@@ -1552,64 +1306,6 @@ write_object_file (void)
md_post_relax_hook;
#endif
-#ifndef BFD_ASSEMBLER
- /* Crawl the symbol chain.
-
- For each symbol whose value depends on a frag, take the address of
- that frag and subsume it into the value of the symbol.
- After this, there is just one way to lookup a symbol value.
- Values are left in their final state for object file emission.
- We adjust the values of 'L' local symbols, even if we do
- not intend to emit them to the object file, because their values
- are needed for fix-ups.
-
- Unless we saw a -L flag, remove all symbols that begin with 'L'
- from the symbol chain. (They are still pointed to by the fixes.)
-
- Count the remaining symbols.
- Assign a symbol number to each symbol.
- Count the number of string-table chars we will emit.
- Put this info into the headers as appropriate. */
- know (zero_address_frag.fr_address == 0);
- string_byte_count = sizeof (string_byte_count);
-
- obj_crawl_symbol_chain (&headers);
-
- if (string_byte_count == sizeof (string_byte_count))
- string_byte_count = 0;
-
- H_SET_STRING_SIZE (&headers, string_byte_count);
-
- /* Addresses of frags now reflect addresses we use in the object file.
- Symbol values are correct.
- Scan the frags, converting any ".org"s and ".align"s to ".fill"s.
- Also converting any machine-dependent frags using md_convert_frag(); */
- subseg_change (SEG_TEXT, 0);
-
- for (fragP = text_frag_root; fragP; fragP = fragP->fr_next)
- {
- /* At this point we have linked all the frags into a single
- chain. However, cvt_frag_to_fill may call md_convert_frag
- which may call fix_new. We need to ensure that fix_new adds
- the fixup to the right section. */
- if (fragP == data_frag_root)
- subseg_change (SEG_DATA, 0);
-
- cvt_frag_to_fill (&headers, SEG_TEXT, fragP);
-
- /* Some assert macros don't work with # directives mixed in. */
-#ifndef NDEBUG
- if (!(fragP->fr_next == NULL
-#ifdef OBJ_BOUT
- || fragP->fr_next == data_frag_root
-#endif
- || ((offsetT) (fragP->fr_next->fr_address - fragP->fr_address)
- == (fragP->fr_fix + fragP->fr_offset * fragP->fr_var))))
- abort ();
-#endif
- }
-#endif /* ! BFD_ASSEMBLER */
-
#ifndef WORKING_DOT_WORD
{
struct broken_word *lie;
@@ -1626,7 +1322,6 @@ write_object_file (void)
exp.X_add_symbol = lie->add;
exp.X_op_symbol = lie->sub;
exp.X_add_number = lie->addnum;
-#ifdef BFD_ASSEMBLER
#ifdef TC_CONS_FIX_NEW
TC_CONS_FIX_NEW (lie->frag,
lie->word_goes_here - lie->frag->fr_literal,
@@ -1636,23 +1331,6 @@ write_object_file (void)
lie->word_goes_here - lie->frag->fr_literal,
2, &exp, 0, BFD_RELOC_16);
#endif
-#else
-#if defined(TC_SPARC) || defined(TC_A29K) || defined(NEED_FX_R_TYPE)
- fix_new_exp (lie->frag,
- lie->word_goes_here - lie->frag->fr_literal,
- 2, &exp, 0, NO_RELOC);
-#else
-#ifdef TC_NS32K
- fix_new_ns32k_exp (lie->frag,
- lie->word_goes_here - lie->frag->fr_literal,
- 2, &exp, 0, 0, 2, 0, 0);
-#else
- fix_new_exp (lie->frag,
- lie->word_goes_here - lie->frag->fr_literal,
- 2, &exp, 0, 0);
-#endif /* TC_NS32K */
-#endif /* TC_SPARC|TC_A29K|NEED_FX_R_TYPE */
-#endif /* BFD_ASSEMBLER */
*prevP = lie->next_broken_word;
}
else
@@ -1723,132 +1401,6 @@ write_object_file (void)
}
#endif /* not WORKING_DOT_WORD */
-#ifndef BFD_ASSEMBLER
-#ifndef OBJ_VMS
- { /* not vms */
- char *the_object_file;
- long object_file_size;
- /* Scan every FixS performing fixups. We had to wait until now to
- do this because md_convert_frag() may have made some fixSs. */
- int trsize, drsize;
-
- subseg_change (SEG_TEXT, 0);
- trsize = md_reloc_size * fixup_segment (text_fix_root, SEG_TEXT);
- subseg_change (SEG_DATA, 0);
- drsize = md_reloc_size * fixup_segment (data_fix_root, SEG_DATA);
- H_SET_RELOCATION_SIZE (&headers, trsize, drsize);
-
- /* FIXME: Move this stuff into the pre-write-hook. */
- H_SET_MAGIC_NUMBER (&headers, magic_number_for_object_file);
- H_SET_ENTRY_POINT (&headers, 0);
-
- obj_pre_write_hook (&headers); /* Extra coff stuff. */
-
- object_file_size = H_GET_FILE_SIZE (&headers);
- next_object_file_charP = the_object_file = xmalloc (object_file_size);
-
- output_file_create (out_file_name);
-
- obj_header_append (&next_object_file_charP, &headers);
-
- know ((next_object_file_charP - the_object_file)
- == H_GET_HEADER_SIZE (&headers));
-
- /* Emit code. */
- for (fragP = text_frag_root; fragP; fragP = fragP->fr_next)
- {
- register long count;
- register char *fill_literal;
- register long fill_size;
-
- PROGRESS (1);
- know (fragP->fr_type == rs_fill);
- append (&next_object_file_charP, fragP->fr_literal,
- (unsigned long) fragP->fr_fix);
- fill_literal = fragP->fr_literal + fragP->fr_fix;
- fill_size = fragP->fr_var;
- know (fragP->fr_offset >= 0);
-
- for (count = fragP->fr_offset; count; count--)
- append (&next_object_file_charP, fill_literal,
- (unsigned long) fill_size);
- }
-
- know ((next_object_file_charP - the_object_file)
- == (H_GET_HEADER_SIZE (&headers)
- + H_GET_TEXT_SIZE (&headers)
- + H_GET_DATA_SIZE (&headers)));
-
- /* Emit relocations. */
- obj_emit_relocations (&next_object_file_charP, text_fix_root,
- (relax_addressT) 0);
- know ((next_object_file_charP - the_object_file)
- == (H_GET_HEADER_SIZE (&headers)
- + H_GET_TEXT_SIZE (&headers)
- + H_GET_DATA_SIZE (&headers)
- + H_GET_TEXT_RELOCATION_SIZE (&headers)));
-#ifdef TC_I960
- /* Make addresses in data relocation directives relative to beginning of
- first data fragment, not end of last text fragment: alignment of the
- start of the data segment may place a gap between the segments. */
- obj_emit_relocations (&next_object_file_charP, data_fix_root,
- data0_frchainP->frch_root->fr_address);
-#else /* TC_I960 */
- obj_emit_relocations (&next_object_file_charP, data_fix_root,
- text_last_frag->fr_address);
-#endif /* TC_I960 */
-
- know ((next_object_file_charP - the_object_file)
- == (H_GET_HEADER_SIZE (&headers)
- + H_GET_TEXT_SIZE (&headers)
- + H_GET_DATA_SIZE (&headers)
- + H_GET_TEXT_RELOCATION_SIZE (&headers)
- + H_GET_DATA_RELOCATION_SIZE (&headers)));
-
- /* Emit line number entries. */
- OBJ_EMIT_LINENO (&next_object_file_charP, lineno_rootP, the_object_file);
- know ((next_object_file_charP - the_object_file)
- == (H_GET_HEADER_SIZE (&headers)
- + H_GET_TEXT_SIZE (&headers)
- + H_GET_DATA_SIZE (&headers)
- + H_GET_TEXT_RELOCATION_SIZE (&headers)
- + H_GET_DATA_RELOCATION_SIZE (&headers)
- + H_GET_LINENO_SIZE (&headers)));
-
- /* Emit symbols. */
- obj_emit_symbols (&next_object_file_charP, symbol_rootP);
- know ((next_object_file_charP - the_object_file)
- == (H_GET_HEADER_SIZE (&headers)
- + H_GET_TEXT_SIZE (&headers)
- + H_GET_DATA_SIZE (&headers)
- + H_GET_TEXT_RELOCATION_SIZE (&headers)
- + H_GET_DATA_RELOCATION_SIZE (&headers)
- + H_GET_LINENO_SIZE (&headers)
- + H_GET_SYMBOL_TABLE_SIZE (&headers)));
-
- /* Emit strings. */
- if (string_byte_count > 0)
- obj_emit_strings (&next_object_file_charP);
-
-#ifdef BFD_HEADERS
- bfd_seek (stdoutput, (file_ptr) 0, 0);
- bfd_bwrite (the_object_file, (bfd_size_type) object_file_size, stdoutput);
-#else
-
- /* Write the data to the file. */
- output_file_append (the_object_file, object_file_size, out_file_name);
- free (the_object_file);
-#endif
- }
-#else /* OBJ_VMS */
- /* Now do the VMS-dependent part of writing the object file. */
- vms_write_object_file (H_GET_TEXT_SIZE (&headers),
- H_GET_DATA_SIZE (&headers),
- H_GET_BSS_SIZE (&headers),
- text_frag_root, data_frag_root);
-#endif /* OBJ_VMS */
-#else /* BFD_ASSEMBLER */
-
/* Resolve symbol values. This needs to be done before processing
the relocations. */
if (symbol_rootP)
@@ -1884,12 +1436,22 @@ write_object_file (void)
if (symbol_rootP)
{
symbolS *symp;
+ bfd_boolean skip_next_symbol = FALSE;
for (symp = symbol_rootP; symp; symp = symbol_next (symp))
{
int punt = 0;
const char *name;
+ if (skip_next_symbol)
+ {
+ /* Don't do anything besides moving the value of the
+ symbol from the GAS value-field to the BFD value-field. */
+ symbol_get_bfdsym (symp)->value = S_GET_VALUE (symp);
+ skip_next_symbol = FALSE;
+ continue;
+ }
+
if (symbol_mri_common_p (symp))
{
if (S_IS_EXTERNAL (symp))
@@ -1917,25 +1479,23 @@ write_object_file (void)
/* Skip symbols which were equated to undefined or common
symbols. */
- if (symbol_equated_reloc_p (symp))
+ if (symbol_equated_reloc_p (symp)
+ || S_IS_WEAKREFR (symp))
{
+ const char *name = S_GET_NAME (symp);
+ if (S_IS_COMMON (symp)
+ && !TC_FAKE_LABEL (name)
+ && !S_IS_WEAKREFR (symp)
+ && (!S_IS_EXTERNAL (symp) || S_IS_LOCAL (symp)))
+ {
+ expressionS *e = symbol_get_value_expression (symp);
+ as_bad (_("Local symbol `%s' can't be equated to common symbol `%s'"),
+ name, S_GET_NAME (e->X_add_symbol));
+ }
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
continue;
}
- /* So far, common symbols have been treated like undefined symbols.
- Put them in the common section now. */
- if (S_IS_DEFINED (symp) == 0
- && S_GET_VALUE (symp) != 0)
- S_SET_SEGMENT (symp, bfd_com_section_ptr);
-#if 0
- printf ("symbol `%s'\n\t@%x: value=%d flags=%x seg=%s\n",
- S_GET_NAME (symp), symp,
- S_GET_VALUE (symp),
- symbol_get_bfdsym (symp)->flags,
- segment_name (S_GET_SEGMENT (symp)));
-#endif
-
#ifdef obj_frob_symbol
obj_frob_symbol (symp, punt);
#endif
@@ -1952,11 +1512,12 @@ write_object_file (void)
if (symp == abs_section_sym
|| (! EMIT_SECTION_SYMBOLS
&& symbol_section_p (symp))
- /* Note that S_IS_EXTERN and S_IS_LOCAL are not always
+ /* Note that S_IS_EXTERNAL and S_IS_LOCAL are not always
opposites. Sometimes the former checks flags and the
latter examines the name... */
- || (!S_IS_EXTERN (symp)
- && (punt || S_IS_LOCAL (symp))
+ || (!S_IS_EXTERNAL (symp)
+ && (punt || S_IS_LOCAL (symp) ||
+ (S_IS_WEAKREFD (symp) && ! symbol_used_p (symp)))
&& ! symbol_used_in_reloc_p (symp)))
{
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
@@ -1978,6 +1539,12 @@ write_object_file (void)
/* Set the value into the BFD symbol. Up til now the value
has only been kept in the gas symbolS struct. */
symbol_get_bfdsym (symp)->value = S_GET_VALUE (symp);
+
+ /* A warning construct is a warning symbol followed by the
+ symbol warned about. Don't let anything object-format or
+ target-specific muck with it; it's ready for output. */
+ if (symbol_get_bfdsym (symp)->flags & BSF_WARNING)
+ skip_next_symbol = TRUE;
}
}
@@ -2017,12 +1584,9 @@ write_object_file (void)
#endif
bfd_map_over_sections (stdoutput, write_contents, (char *) 0);
-#endif /* BFD_ASSEMBLER */
}
-#endif /* ! BFD */
#ifdef TC_GENERIC_RELAX_TABLE
-
/* Relax a fragment by scanning TC_GENERIC_RELAX_TABLE. */
long
@@ -2053,12 +1617,6 @@ relax_frag (segT segment, fragS *fragP, long stretch)
sym_frag = symbol_get_frag (symbolP);
#ifndef DIFF_EXPR_OK
-#if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
- know ((S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE)
- || (S_GET_SEGMENT (symbolP) == SEG_DATA)
- || (S_GET_SEGMENT (symbolP) == SEG_BSS)
- || (S_GET_SEGMENT (symbolP) == SEG_TEXT));
-#endif
know (sym_frag != NULL);
#endif
know (S_GET_SEGMENT (symbolP) != absolute_section
@@ -2082,14 +1640,10 @@ relax_frag (segT segment, fragS *fragP, long stretch)
#ifdef TC_PCREL_ADJUST
/* Currently only the ns32k family needs this. */
aim += TC_PCREL_ADJUST (fragP);
-/* #else */
- /* This machine doesn't want to use pcrel_adjust.
- In that case, pcrel_adjust should be zero. */
-#if 0
- assert (fragP->fr_targ.ns32k.pcrel_adjust == 0);
-#endif
#endif
-#ifdef md_prepare_relax_scan /* formerly called M68K_AIM_KLUDGE */
+
+#ifdef md_prepare_relax_scan
+ /* Formerly called M68K_AIM_KLUDGE. */
md_prepare_relax_scan (fragP, address, aim, this_state, this_type);
#endif
@@ -2161,22 +1715,22 @@ relax_align (register relax_addressT address, /* Address now. */
addresses. */
int
-relax_segment (struct frag *segment_frag_root, segT segment)
+relax_segment (struct frag *segment_frag_root, segT segment, int pass)
{
- register struct frag *fragP;
- register relax_addressT address;
+ unsigned long frag_count;
+ struct frag *fragP;
+ relax_addressT address;
int ret;
-#if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
- know (segment == SEG_DATA || segment == SEG_TEXT || segment == SEG_BSS);
-#endif
/* In case md_estimate_size_before_relax() wants to make fixSs. */
subseg_change (segment, 0);
/* For each frag in segment: count and store (a 1st guess of)
fr_address. */
address = 0;
- for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
+ for (frag_count = 0, fragP = segment_frag_root;
+ fragP;
+ fragP = fragP->fr_next, frag_count ++)
{
fragP->relax_marker = 0;
fragP->fr_address = address;
@@ -2252,6 +1806,7 @@ relax_segment (struct frag *segment_frag_root, segT segment)
/* 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. */
@@ -2260,6 +1815,21 @@ relax_segment (struct frag *segment_frag_root, segT segment)
grew, and another shrank. If a branch instruction doesn't fit anymore,
we could be scrod. */
+ /* 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 = .
+
+ 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)
+ max_iterations = frag_count;
+
+ ret = 0;
do
{
stretch = 0;
@@ -2376,20 +1946,11 @@ relax_segment (struct frag *segment_frag_root, segT segment)
if (symbolP)
{
-#if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
- know ((S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE)
- || (S_GET_SEGMENT (symbolP) == SEG_DATA)
- || (S_GET_SEGMENT (symbolP) == SEG_TEXT)
- || S_GET_SEGMENT (symbolP) == SEG_BSS);
- know (symbolP->sy_frag);
- know (!(S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE)
- || (symbolP->sy_frag == &zero_address_frag));
-#endif
/* Convert from an actual address to an octet offset
into the section. Here it is assumed that the
section's VMA is zero, and can omit subtracting it
from the symbol's value to get the address offset. */
- know (S_GET_SECTION (symbolP)->vma == 0);
+ know (S_GET_SEGMENT (symbolP)->vma == 0);
target += S_GET_VALUE (symbolP) * OCTETS_PER_BYTE;
}
@@ -2398,6 +1959,26 @@ relax_segment (struct frag *segment_frag_root, segT segment)
growth = target - after;
if (growth < 0)
{
+ growth = 0;
+
+ /* Don't error on first few frag relax passes.
+ The symbol might be an expression involving
+ symbol values from other sections. If those
+ sections have not yet been processed their
+ frags will all have zero addresses, so we
+ will calculate incorrect values for them. The
+ number of passes we allow before giving an
+ error is somewhat arbitrary. It should be at
+ least one, with larger values requiring
+ increasingly contrived dependencies between
+ frags to trigger a false error. */
+ if (pass < 2)
+ {
+ /* Force another pass. */
+ ret = 1;
+ break;
+ }
+
/* Growth may be negative, but variable part of frag
cannot have fewer than 0 chars. That is, we can't
.org backwards. */
@@ -2409,8 +1990,8 @@ relax_segment (struct frag *segment_frag_root, segT segment)
fragP->fr_type = rs_align;
fragP->fr_subtype = 0;
fragP->fr_offset = 0;
- fragP->fr_fix = after - address;
- growth = stretch;
+ fragP->fr_fix = after - was_address;
+ break;
}
/* This is an absolute growth factor */
@@ -2436,6 +2017,14 @@ relax_segment (struct frag *segment_frag_root, segT segment)
}
else if (amount < 0)
{
+ /* Don't error on first few frag relax passes.
+ See rs_org comment for a longer explanation. */
+ if (pass < 2)
+ {
+ ret = 1;
+ break;
+ }
+
as_warn_where (fragP->fr_file, fragP->fr_line,
_(".space or .fill with negative value, ignored"));
fragP->fr_symbol = 0;
@@ -2487,12 +2076,16 @@ relax_segment (struct frag *segment_frag_root, segT segment)
stretch += growth;
stretched = 1;
}
- } /* For each frag in the segment. */
+ }
}
- while (stretched); /* Until nothing further to relax. */
- } /* do_relax */
+ /* Until nothing further to relax. */
+ while (stretched && -- max_iterations);
+
+ if (stretched)
+ as_fatal (_("Infinite loop encountered whilst attempting to compute the addresses of symbols in section %s"),
+ segment_name (segment));
+ }
- ret = 0;
for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
if (fragP->last_fr_address != fragP->fr_address)
{
@@ -2502,14 +2095,12 @@ relax_segment (struct frag *segment_frag_root, segT segment)
return ret;
}
-#if defined (BFD_ASSEMBLER) || (!defined (BFD) && !defined (OBJ_VMS))
-
/* 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_fix3 to put the fix into the frag data.
+ 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.
@@ -2524,13 +2115,7 @@ fixup_segment (fixS *fixP, segT this_segment)
segT add_symbol_segment = absolute_section;
if (fixP != NULL && abs_section_sym == NULL)
- {
-#ifndef BFD_ASSEMBLER
- abs_section_sym = &abs_symbol;
-#else
- abs_section_sym = section_symbol (absolute_section);
-#endif
- }
+ abs_section_sym = section_symbol (absolute_section);
/* If the linker is doing the relaxing, we must not do any fixups.
@@ -2577,7 +2162,6 @@ fixup_segment (fixS *fixP, segT this_segment)
if (fixP->fx_addsy != NULL
&& symbol_mri_common_p (fixP->fx_addsy))
{
- know (fixP->fx_addsy->sy_value.X_op == O_symbol);
add_number += S_GET_VALUE (fixP->fx_addsy);
fixP->fx_offset = add_number;
fixP->fx_addsy
@@ -2670,9 +2254,7 @@ fixup_segment (fixS *fixP, segT this_segment)
fixP->fx_addsy = NULL;
}
else if (add_symbol_segment != undefined_section
-#ifdef BFD_ASSEMBLER
&& ! bfd_is_com_section (add_symbol_segment)
-#endif
&& MD_APPLY_SYM_VALUE (fixP))
add_number += S_GET_VALUE (fixP->fx_addsy);
}
@@ -2691,7 +2273,7 @@ fixup_segment (fixS *fixP, segT this_segment)
}
if (!fixP->fx_done)
- md_apply_fix3 (fixP, &add_number, this_segment);
+ md_apply_fix (fixP, &add_number, this_segment);
if (!fixP->fx_done)
{
@@ -2753,8 +2335,6 @@ fixup_segment (fixS *fixP, segT this_segment)
return seg_reloc_count;
}
-#endif /* defined (BFD_ASSEMBLER) || (!defined (BFD) && !defined (OBJ_VMS)) */
-
void
number_to_chars_bigendian (char *buf, valueT val, int n)
{
@@ -2812,14 +2392,8 @@ print_fixup (fixS *fixp)
fprintf (stderr, "\n size=%d frag=%lx where=%ld offset=%lx addnumber=%lx",
fixp->fx_size, (long) fixp->fx_frag, (long) fixp->fx_where,
(long) fixp->fx_offset, (long) fixp->fx_addnumber);
-#ifdef BFD_ASSEMBLER
fprintf (stderr, "\n %s (%d)", bfd_get_reloc_code_name (fixp->fx_r_type),
fixp->fx_r_type);
-#else
-#ifdef NEED_FX_R_TYPE
- fprintf (stderr, " r_type=%d", fixp->fx_r_type);
-#endif
-#endif
if (fixp->fx_addsy)
{
fprintf (stderr, "\n +<");
diff --git a/contrib/binutils/gas/write.h b/contrib/binutils/gas/write.h
index 0e0f59f8f70b..1f9b72dbf265 100644
--- a/contrib/binutils/gas/write.h
+++ b/contrib/binutils/gas/write.h
@@ -1,6 +1,6 @@
/* write.h
- Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001
- Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
+ 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef __write_h__
#define __write_h__
@@ -28,16 +28,6 @@
#endif
#endif /* TC_I960 */
-#ifndef BFD_ASSEMBLER
-
-#ifndef LOCAL_LABEL
-#define LOCAL_LABEL(name) (name [0] == 'L' )
-#endif
-
-#define S_LOCAL_NAME(s) (LOCAL_LABEL (S_GET_NAME (s)))
-
-#endif /* ! BFD_ASSEMBLER */
-
/* 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
@@ -120,15 +110,7 @@ struct fix
processing. */
bit_fixS *fx_bit_fixP;
-#ifdef BFD_ASSEMBLER
bfd_reloc_code_real_type fx_r_type;
-#else
-#ifdef NEED_FX_R_TYPE
- /* Hack for machines where the type of reloc can't be
- worked out by looking at how big it is. */
- int fx_r_type;
-#endif
-#endif
/* This field is sort of misnamed. It appears to be a sort of random
scratch field, for use by the back ends. The main gas code doesn't
@@ -165,53 +147,24 @@ typedef struct fix fixS;
extern int finalize_syms;
extern symbolS *abs_section_sym;
extern addressT dot_value;
-
-#ifndef BFD_ASSEMBLER
-extern char *next_object_file_charP;
-
-#ifndef MANY_SEGMENTS
-COMMON fixS *text_fix_root, *text_fix_tail; /* Chains fixSs. */
-COMMON fixS *data_fix_root, *data_fix_tail; /* Chains fixSs. */
-COMMON fixS *bss_fix_root, *bss_fix_tail; /* Chains fixSs. */
-extern struct frag *text_last_frag; /* Last frag in segment. */
-extern struct frag *data_last_frag; /* Last frag in segment. */
-#endif
-COMMON fixS **seg_fix_rootP, **seg_fix_tailP; /* -> one of above. */
-#endif
-
extern long string_byte_count;
extern int section_alignment[];
-extern bit_fixS *bit_fix_new
- (int size, int offset, long base_type, long base_adj, long min,
- long max, long add);
extern void append (char **charPP, char *fromP, unsigned long length);
extern void record_alignment (segT seg, int align);
extern int get_recorded_alignment (segT seg);
extern void subsegs_finish (void);
extern void write_object_file (void);
extern long relax_frag (segT, fragS *, long);
-extern int relax_segment (struct frag * seg_frag_root, segT seg_type);
-
+extern int relax_segment (struct frag *, segT, int);
extern void number_to_chars_littleendian (char *, valueT, int);
extern void number_to_chars_bigendian (char *, valueT, int);
-
-#ifdef BFD_ASSEMBLER
extern fixS *fix_new
(fragS * frag, int where, int size, symbolS * add_symbol,
offsetT offset, int pcrel, bfd_reloc_code_real_type r_type);
extern fixS *fix_new_exp
(fragS * frag, int where, int size, expressionS *exp, int pcrel,
bfd_reloc_code_real_type r_type);
-#else
-extern fixS *fix_new
- (fragS * frag, int where, int size, symbolS * add_symbol,
- offsetT offset, int pcrel, int r_type);
-extern fixS *fix_new_exp
- (fragS * frag, int where, int size, expressionS *exp, int pcrel,
- int r_type);
-#endif
-
extern void write_print_statistics (FILE *);
#endif /* __write_h__ */
diff --git a/contrib/binutils/gprof/mips.c b/contrib/binutils/gprof/mips.c
index ef7feae55c10..96d2707e0547 100644
--- a/contrib/binutils/gprof/mips.c
+++ b/contrib/binutils/gprof/mips.c
@@ -36,13 +36,10 @@
static Sym indirect_child;
-void mips_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
+void mips_find_call (Sym *, bfd_vma, bfd_vma);
void
-mips_find_call (parent, p_lowpc, p_highpc)
- Sym *parent;
- bfd_vma p_lowpc;
- bfd_vma p_highpc;
+mips_find_call (Sym *parent, bfd_vma p_lowpc, bfd_vma p_highpc)
{
bfd_vma pc, dest_pc;
unsigned int op;
diff --git a/contrib/binutils/gprof/po/Make-in b/contrib/binutils/gprof/po/Make-in
index 6176dbf78c3c..42863f2ab203 100644
--- a/contrib/binutils/gprof/po/Make-in
+++ b/contrib/binutils/gprof/po/Make-in
@@ -1,7 +1,8 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright 2002, 2003, 2006 Free Software Foundation, Inc.
#
-# This file file be copied and used freely without restrictions. It can
+# This file may be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
@@ -109,6 +110,7 @@ $(srcdir)/stamp-cat-id: $(PACKAGE).pot
install: install-exec install-data
install-exec:
install-info:
+install-html:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
@@ -184,7 +186,7 @@ check: all
cat-id-tbl.o: ../intl/libgettext.h
-dvi info tags TAGS ID:
+html dvi pdf ps info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
diff --git a/contrib/binutils/gprof/po/gprof.pot b/contrib/binutils/gprof/po/gprof.pot
index b1c319a3e178..295436b25854 100644
--- a/contrib/binutils/gprof/po/gprof.pot
+++ b/contrib/binutils/gprof/po/gprof.pot
@@ -7,7 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-07-11 13:58+0930\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-10-01 07:23+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"
@@ -15,46 +16,46 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: alpha.c:103 mips.c:57
+#: alpha.c:102 mips.c:54
msgid "<indirect child>"
msgstr ""
-#: alpha.c:120 mips.c:74
+#: alpha.c:119 mips.c:71
#, c-format
msgid "[find_call] %s: 0x%lx to 0x%lx\n"
msgstr ""
-#: alpha.c:142
+#: alpha.c:141
#, c-format
msgid "[find_call] 0x%lx: jsr%s <indirect_child>\n"
msgstr ""
-#: alpha.c:152
+#: alpha.c:151
#, c-format
msgid "[find_call] 0x%lx: bsr"
msgstr ""
-#: basic_blocks.c:134 call_graph.c:94 hist.c:98
+#: basic_blocks.c:128 call_graph.c:89 hist.c:97
#, c-format
msgid "%s: %s: unexpected end of file\n"
msgstr ""
-#: basic_blocks.c:202
+#: basic_blocks.c:196
#, c-format
msgid "%s: warning: ignoring basic-block exec counts (use -l or --line)\n"
msgstr ""
#. FIXME: This only works if bfd_vma is unsigned long.
-#: basic_blocks.c:295 basic_blocks.c:305
+#: basic_blocks.c:289 basic_blocks.c:299
#, c-format
msgid "%s:%d: (%s:0x%lx) %lu executions\n"
msgstr ""
-#: basic_blocks.c:296 basic_blocks.c:306
+#: basic_blocks.c:290 basic_blocks.c:300
msgid "<unknown>"
msgstr ""
-#: basic_blocks.c:553
+#: basic_blocks.c:543
#, c-format
msgid ""
"\n"
@@ -65,58 +66,61 @@ msgid ""
"\n"
msgstr ""
-#: basic_blocks.c:577
+#: basic_blocks.c:567
+#, c-format
msgid ""
"\n"
"Execution Summary:\n"
"\n"
msgstr ""
-#: basic_blocks.c:578
+#: basic_blocks.c:568
#, c-format
msgid "%9ld Executable lines in this file\n"
msgstr ""
-#: basic_blocks.c:580
+#: basic_blocks.c:570
#, c-format
msgid "%9ld Lines executed\n"
msgstr ""
-#: basic_blocks.c:581
+#: basic_blocks.c:571
#, c-format
msgid "%9.2f Percent of the file executed\n"
msgstr ""
-#: basic_blocks.c:585
+#: basic_blocks.c:575
#, c-format
msgid ""
"\n"
"%9lu Total number of line executions\n"
msgstr ""
-#: basic_blocks.c:587
+#: basic_blocks.c:577
#, c-format
msgid "%9.2f Average executions per line\n"
msgstr ""
-#: call_graph.c:71
+#: call_graph.c:68
#, c-format
msgid "[cg_tally] arc from %s to %s traversed %lu times\n"
msgstr ""
#: cg_print.c:73
+#, c-format
msgid ""
"\t\t Call graph (explanation follows)\n"
"\n"
msgstr ""
#: cg_print.c:75
+#, c-format
msgid ""
"\t\t\tCall graph\n"
"\n"
msgstr ""
-#: cg_print.c:78 hist.c:363
+#: cg_print.c:78 hist.c:359
#, c-format
msgid ""
"\n"
@@ -131,6 +135,7 @@ msgid ""
msgstr ""
#: cg_print.c:86
+#, c-format
msgid ""
" no time propagated\n"
"\n"
@@ -165,7 +170,7 @@ msgstr ""
msgid "descendants"
msgstr ""
-#: cg_print.c:98 hist.c:389
+#: cg_print.c:98 hist.c:385
msgid "name"
msgstr ""
@@ -178,28 +183,29 @@ msgstr ""
msgid "index %% time self children called name\n"
msgstr ""
-#: cg_print.c:129
+#: cg_print.c:128
#, c-format
msgid " <cycle %d as a whole> [%d]\n"
msgstr ""
-#: cg_print.c:363
+#: cg_print.c:354
#, c-format
msgid "%6.6s %5.5s %7.7s %11.11s %7.7s %7.7s <spontaneous>\n"
msgstr ""
-#: cg_print.c:364
+#: cg_print.c:355
#, c-format
msgid "%6.6s %5.5s %7.7s %7.7s %7.7s %7.7s <spontaneous>\n"
msgstr ""
-#: cg_print.c:604
+#: cg_print.c:589
+#, c-format
msgid ""
"Index by function name\n"
"\n"
msgstr ""
-#: cg_print.c:661 cg_print.c:670
+#: cg_print.c:646 cg_print.c:655
#, c-format
msgid "<cycle %d>"
msgstr ""
@@ -214,131 +220,132 @@ msgstr ""
msgid "%s: unable to parse mapping file %s.\n"
msgstr ""
-#: corefile.c:155
+#: corefile.c:158
#, c-format
msgid "%s: %s: not in a.out format\n"
msgstr ""
-#: corefile.c:166
+#: corefile.c:169
#, c-format
msgid "%s: can't find .text section in %s\n"
msgstr ""
-#: corefile.c:225
+#: corefile.c:244
#, c-format
msgid "%s: ran out room for %lu bytes of text space\n"
msgstr ""
-#: corefile.c:239
+#: corefile.c:258
#, c-format
msgid "%s: can't do -c\n"
msgstr ""
-#: corefile.c:276
+#: corefile.c:292
#, c-format
msgid "%s: -c not supported on architecture %s\n"
msgstr ""
-#: corefile.c:447
+#: corefile.c:457
#, c-format
msgid "%s: file `%s' has no symbols\n"
msgstr ""
-#: corefile.c:758
+#: corefile.c:771
#, c-format
msgid "%s: somebody miscounted: ltab.len=%d instead of %ld\n"
msgstr ""
-#: gmon_io.c:82
+#: gmon_io.c:83
#, c-format
msgid "%s: address size has unexpected value of %u\n"
msgstr ""
-#: gmon_io.c:345 gmon_io.c:440
+#: gmon_io.c:320 gmon_io.c:416
#, c-format
msgid "%s: file too short to be a gmon file\n"
msgstr ""
-#: gmon_io.c:355 gmon_io.c:483
+#: gmon_io.c:330 gmon_io.c:459
#, c-format
msgid "%s: file `%s' has bad magic cookie\n"
msgstr ""
-#: gmon_io.c:366
+#: gmon_io.c:341
#, c-format
msgid "%s: file `%s' has unsupported version %d\n"
msgstr ""
-#: gmon_io.c:396
+#: gmon_io.c:371
#, c-format
msgid "%s: %s: found bad tag %d (file corrupted?)\n"
msgstr ""
-#: gmon_io.c:462
+#: gmon_io.c:438
#, c-format
msgid "%s: profiling rate incompatible with first gmon file\n"
msgstr ""
-#: gmon_io.c:510
+#: gmon_io.c:486
#, c-format
msgid "%s: incompatible with first gmon file\n"
msgstr ""
-#: gmon_io.c:538
+#: gmon_io.c:514
#, c-format
msgid "%s: file '%s' does not appear to be in gmon.out format\n"
msgstr ""
-#: gmon_io.c:559
+#: gmon_io.c:535
#, c-format
msgid "%s: unexpected EOF after reading %d/%d bins\n"
msgstr ""
-#: gmon_io.c:592
+#: gmon_io.c:568
+#, c-format
msgid "time is in ticks, not seconds\n"
msgstr ""
-#: gmon_io.c:598 gmon_io.c:775
+#: gmon_io.c:574 gmon_io.c:750
#, c-format
msgid "%s: don't know how to deal with file format %d\n"
msgstr ""
-#: gmon_io.c:605
+#: gmon_io.c:581
#, c-format
msgid "File `%s' (version %d) contains:\n"
msgstr ""
-#: gmon_io.c:608
+#: gmon_io.c:584
#, c-format
msgid "\t%d histogram record\n"
msgstr ""
-#: gmon_io.c:609
+#: gmon_io.c:585
#, c-format
msgid "\t%d histogram records\n"
msgstr ""
-#: gmon_io.c:611
+#: gmon_io.c:587
#, c-format
msgid "\t%d call-graph record\n"
msgstr ""
-#: gmon_io.c:612
+#: gmon_io.c:588
#, c-format
msgid "\t%d call-graph records\n"
msgstr ""
-#: gmon_io.c:614
+#: gmon_io.c:590
#, c-format
msgid "\t%d basic-block count record\n"
msgstr ""
-#: gmon_io.c:615
+#: gmon_io.c:591
#, c-format
msgid "\t%d basic-block count records\n"
msgstr ""
-#: gprof.c:163
+#: gprof.c:158
#, c-format
msgid ""
"Usage: %s [-[abcDhilLsTvwxyz]] [-[ACeEfFJnNOpPqQZ][name]] [-I dirs]\n"
@@ -356,119 +363,123 @@ msgid ""
"\t[image-file] [profile-file...]\n"
msgstr ""
-#: gprof.c:179
+#: gprof.c:174
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: gprof.c:253
+#: gprof.c:250
#, c-format
msgid "%s: debugging not supported; -d ignored\n"
msgstr ""
-#: gprof.c:333
+#: gprof.c:330
#, c-format
msgid "%s: unknown file format %s\n"
msgstr ""
#. This output is intended to follow the GNU standards document.
-#: gprof.c:417
+#: gprof.c:414
#, c-format
msgid "GNU gprof %s\n"
msgstr ""
-#: gprof.c:418
+#: gprof.c:415
+#, c-format
msgid ""
"Based on BSD gprof, copyright 1983 Regents of the University of California.\n"
msgstr ""
-#: gprof.c:419
+#: gprof.c:416
+#, c-format
msgid ""
"This program is free software. This program has absolutely no warranty.\n"
msgstr ""
-#: gprof.c:460
+#: gprof.c:457
#, c-format
msgid "%s: unknown demangling style `%s'\n"
msgstr ""
-#: gprof.c:480
+#: gprof.c:477
#, c-format
msgid ""
"%s: Only one of --function-ordering and --file-ordering may be specified.\n"
msgstr ""
-#: gprof.c:578
+#: gprof.c:527
#, c-format
msgid "%s: sorry, file format `prof' is not yet supported\n"
msgstr ""
-#: gprof.c:639
+#: gprof.c:576
#, c-format
msgid "%s: gmon.out file is missing histogram\n"
msgstr ""
-#: gprof.c:646
+#: gprof.c:583
#, c-format
msgid "%s: gmon.out file is missing call-graph data\n"
msgstr ""
-#: hist.c:127
+#: hist.c:126
#, c-format
msgid "%s: `%s' is incompatible with first gmon file\n"
msgstr ""
-#: hist.c:143
+#: hist.c:142
#, c-format
-msgid "%s: %s: unexpected EOF after reading %d of %d samples\n"
+msgid "%s: %s: unexpected EOF after reading %u of %u samples\n"
msgstr ""
-#: hist.c:359
+#: hist.c:355
#, c-format
msgid "%c%c/call"
msgstr ""
-#: hist.c:367
+#: hist.c:363
#, c-format
msgid ""
" for %.2f%% of %.2f %s\n"
"\n"
msgstr ""
-#: hist.c:373
+#: hist.c:369
#, c-format
msgid ""
"\n"
"Each sample counts as %g %s.\n"
msgstr ""
-#: hist.c:378
+#: hist.c:374
+#, c-format
msgid ""
" no time accumulated\n"
"\n"
msgstr ""
-#: hist.c:385
+#: hist.c:381
msgid "cumulative"
msgstr ""
-#: hist.c:385
+#: hist.c:381
msgid "self "
msgstr ""
-#: hist.c:385
+#: hist.c:381
msgid "total "
msgstr ""
-#: hist.c:388
+#: hist.c:384
msgid "time"
msgstr ""
-#: hist.c:388
+#: hist.c:384
msgid "calls"
msgstr ""
-#: hist.c:481
+#: hist.c:473
+#, c-format
msgid ""
"\n"
"\n"
@@ -476,31 +487,32 @@ msgid ""
"flat profile:\n"
msgstr ""
-#: hist.c:487
+#: hist.c:479
+#, c-format
msgid "Flat profile:\n"
msgstr ""
-#: mips.c:85
+#: mips.c:82
#, c-format
msgid "[find_call] 0x%lx: jal"
msgstr ""
-#: mips.c:110
+#: mips.c:107
#, c-format
msgid "[find_call] 0x%lx: jalr\n"
msgstr ""
-#: source.c:166
+#: source.c:162
#, c-format
msgid "%s: could not locate `%s'\n"
msgstr ""
-#: source.c:241
+#: source.c:237
#, c-format
msgid "*** File %s:\n"
msgstr ""
-#: utils.c:109
+#: utils.c:107
#, c-format
msgid " <cycle %d>"
msgstr ""
diff --git a/contrib/binutils/include/ChangeLog b/contrib/binutils/include/ChangeLog
index 9ea1d2a4b340..0a3787aac37d 100644
--- a/contrib/binutils/include/ChangeLog
+++ b/contrib/binutils/include/ChangeLog
@@ -1,2157 +1,579 @@
-2004-04-08 Alan Modra <amodra@bigpond.net.au>
+2006-04-11 Jim Blandy <jimb@codesourcery.com>
- Apply from mainline.
- 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
- * bfdlink.h (bfd_link_info): Correct comments for the
- unresolved_syms_in_objects field.
-
-2004-03-23 Alan Modra <amodra@bigpond.net.au>
-
- PR 51.
- * bfdlink.h (struct bfd_link_info): Add wrap_char.
-
-2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
-
- * demangle.h: Instead of checking ANSI_PROTOTYPES, just include
- "libiberty.h".
-
- * demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.
-
- * demangle.h (enum demangle_component_type): Define.
- (struct demangle_operator_info): Declare.
- (struct demangle_builtin_type_info): Declare.
- (struct demangle_component): Define.
- (cplus_demangle_fill_component): Declare.
- (cplus_demangle_fill_name): Declare.
- (cplus_demangle_fill_builtin_type): Declare.
- (cplus_demangle_fill_operator): Declare.
- (cplus_demangle_fill_extended_operator): Declare.
- (cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
- (cplus_demangle_v3_components): Declare.
- (cplus_demangle_print): Declare.
-
-2003-12-19 Andreas Tobler <a.tobler@schweiz.ch>
-
- * include/fibheap.h (fibnode): Use __extension__ for
- bit-fields mark and degree if __GNUC__.
-
-2003-12-18 Kazu Hirata <kazu@cs.umass.edu>
-
- * include/fibheap.h (fibnode): Use unsigned long int for
- bit-fields if __GNUC__ is defined.
-
-2003-10-22 Joseph S. Myers <jsm@polyomino.org.uk>
-
- * obstack.h: Merge the following change from gnulib:
- 2003-10-21 Paul Eggert <eggert@twinsun.com>
- * obstack.h (obstack_1grow_fast): Properly parenthesize arg.
- (obstack_ptr_grow_fast, obstack_int_grow_fast):
- Don't use lvalue casts, as GCC plans to remove support for them
- in GCC 3.5. Reported by Joseph S. Myers. This bug
- was also present in the non-GCC version, indicating that this
- code had always been buggy and had never been widely used.
- (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
- Use the fast variant of each macro, rather than copying the
- definiens of the fast variant; that way, we'll be more likely to
- catch future bugs in the fast variants.
-
-2003-09-22 Andrew Cagney <cagney@redhat.com>
-
- * floatformat.h (struct floatformat): Add field "is_valid".
-
-2003-09-15 Andrew Cagney <cagney@redhat.com>
-
- * floatformat.h (floatformat_to_double): Make input buffer constant.
- (floatformat_from_double, floatformat_is_valid): Ditto.
-
-2003-09-15 Andrew Cagney <cagney@redhat.com>
-
- * floatformat.h (struct floatformat): Make "exp_bias" signed.
-
-2003-09-15 Daniel Jacobowitz <drow@mvista.com>
-
- * floatformat.h (floatformat_is_valid): Add prototype.
-
-2003-07-09 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h: Undef all macros before defining them.
-
-2003-07-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * demangle.h: Support C++.
-
-2003-07-01 Zack Weinberg <zack@codesourcery.com>
-
- * filenames.h: New file imported from binutils.
-
-2003-06-30 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h: New file imported from binutils.
-
-2003-06-22 Zack Weinberg <zack@codesourcery.com>
-
- * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC): Rename to
- HOST_CHARSET_UNKNOWN, HOST_CHARSET_ASCII, HOST_CHARSET_EBCDIC
- respectively.
-
-2003-06-21 Zack Weinberg <zack@codesourcery.com>
-
- * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC, HOST_CHARSET):
- New #defines.
-
-2003-06-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Delete HAVE_LONG_DOUBLE GCC bootstrap support.
-
-2003-05-15 Jim Blandy <jimb@redhat.com>
-
- * libiberty.h (hex_value): Make the value an unsigned int, to
- avoid unexpected sign-extension when cast to unsigned types larger
- than int --- like bfd_vma, on some platforms.
- (_hex_value): Update declaration.
-
-2003-05-07 Jason Merrill <jason@redhat.com>
-
- * hashtab.h (iterative_hash): Prototype.
- (iterative_hash_object): New macro.
-
-2003-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (ATTRIBUTE_NONNULL, ATTRIBUTE_NULL_PRINTF,
- ATTRIBUTE_NULL_PRINTF_1, ATTRIBUTE_NULL_PRINTF_2,
- ATTRIBUTE_NULL_PRINTF_3, ATTRIBUTE_NULL_PRINTF_4,
- ATTRIBUTE_NULL_PRINTF_5): New.
- (ATTRIBUTE_PRINTF): Add ATTRIBUTE_NONNULL.
-
-2003-03-17 Jan Hubicka <jh@suse.cz>
-
- * hashtab.h (htab_traverse_noresize): Declare.
-
-2003-02-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Document return value of physmem routines.
-
-2003-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (physmem_total, physmem_available): Prototype.
-
-2003-02-20 Daniel Jacobowitz <drow@mvista.com>
-
- * libiberty.h (lrealpath): Add declaration.
-
-2003-01-26 Daniel Jacobowitz <drow@mvista.com>
-
- * hashtab.h (htab_alloc_with_arg, htab_free_with_arg): Add new types.
- (struct htab): Add alloc_arg, alloc_with_arg_f, free_with_arg_f.
- (htab_create_alloc_ex): New prototype.
- (htab_set_functions_ex): New prototype.
-
-2002-07-17 Geoffrey Keating <geoffk@redhat.com>
-
- * splay-tree.h (GTY): Define if undefined.
- (splay_tree_allocate_fn): Return PTR for compatibility, not void *.
- (struct splay_tree_node_s): Support gengtype.
- (struct splay_tree_s): Likewise. Make allocate_data a PTR,
- not a void *.
-
-2002-11-23 Simon Burge <simonb@wasabisystems.com>
-
- * libiberty.h (basename): Add NetBSD to the list.
-
-2002-11-22 Daniel Jacobowitz <drow@mvista.com>
-
- * libiberty.h (make_relative_prefix): Add prototype.
-
-2002-10-26 Roger Sayle <roger@eyesopen.com>
-
- * partition.h: Close the extern "C" scope when compiling with C++.
-
-2002-10-26 Roger Sayle <roger@eyesopen.com>
- DJ Delorie <dj@redhat.com>
-
- PR bootstrap/8351
- * getopt.h: Avoid prototyping getopt with no arguments in C++.
-
-2002-10-24 Nathan Tallent <eraxxon@alumni.rice.edu>
-
- * ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the
- list of platform compilers that may look, smell and act
- like __STDC__ but that may not define it.
-
-2002-10-11 David O'Brien <obrien@FreeBSD.org>
-
- * getopt.h: getopt is in unistd.h (based on SUSv2).
-
-2002-09-19 Alexandre Oliva <aoliva@redhat.com>
-
- * libiberty.h (asprintf, vasprintf): Don't declare them if the
- corresponding HAVE_DECL_ macro is 1.
-
-2002-06-25 Alan Modra <amodra@bigpond.net.au>
-
- * demangle.h: #include "ansidecl.h" rather than #include <ansidecl.h>.
- * fibheap.h: Likewise.
- * hashtab.h: Likewise.
- * partition.h: Likewise.
- * sort.h: Likewise.
- * splay-tree.h: Likewise.
-
-2002-06-24 Alan Modra <amodra@bigpond.net.au>
-
- * libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME.
- * getopt.h (getopt): Don't declare if HAVE_DECL_GETOPT.
-
-2002-06-06 DJ Delorie <dj@redhat.com>
-
- * hashtab.h (htab): Rearrange new members for backward
- compatibility.
- (htab_create): Don't use a macro that requires other headers.
-
-2002-06-05 Geoffrey Keating <geoffk@redhat.com>
-
- * hashtab.h (htab_create): Restore prototype for backward
- compatibility.
- (htab_try_create): Likewise.
-
-2002-05-22 Geoffrey Keating <geoffk@redhat.com>
-
- * hashtab.h (struct htab): Update for change to length specifier.
-
-2002-05-10 Geoffrey Keating <geoffk@redhat.com>
-
- * hashtab.h (GTY): Define if undefined.
- (htab_alloc): New typedef.
- (htab_free): New typedef.
- (struct htab): Support gengtype; allow user-specified memory
- allocation.
- (htab_create_alloc): New.
- (htab_create): Replace with #define.
- (htab_try_create): Delete.
-
-2002-04-16 David S. Miller <davem@redhat.com>
-
- * xregex2.h (__restrict_arr): Define to __restrict on GCC
- 3.1 and later. Do not redefine.
-
-2002-04-01 Phil Edwards <pme@gcc.gnu.org>
-
- * dyn-string.h: Also allow IN_GLIBCPP_V3 to redefine names.
-
-2002-03-06 Andrew Cagney <ac131313@redhat.com>
-
- * floatformat.h (floatformat_arm_ext): Delete declaration.
-
-2002-02-22 Jim Blandy <jimb@redhat.com>
-
- Allow the user to specify functions for allocating memory for
- splay tree roots and nodes.
- * splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn):
- New types.
- (splay_tree): New fields: `allocate', `deallocate', and
- `allocate_data'.
- (splay_tree_new_with_allocator): New function declaration.
-
-2002-02-05 Jason Merrill <jason@redhat.com>
-
- * demangle.h (cplus_demangle_v3): Add "options" parm.
- (cplus_demangle_v3_type): Remove prototype.
- (DMGL_VERBOSE): New macro.
- (DMGL_TYPES): New macro.
-
-2002-02-02 H.J. Lu (hjl@gnu.org)
-
- * demangle.h (cplus_demangle_v3_type): New prototype.
-
-2002-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (C_alloca): Add ATTRIBUTE_MALLOC.
-
-2001-12-06 Richard Henderson <rth@redhat.com>
-
- * demangle.h (no_demangling): New.
- (NO_DEMANGLING_STYLE_STRING): New.
-
-2001-10-24 Neil Booth <neil@daikokuya.demon.co.uk>
-
- * safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New.
-
-2001-10-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (hex_init): Revert delete.
-
- * libiberty.h (_hex_value): Const-ify.
- (hex_init): Delete.
-
-2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h (demangler_engine): Const-ify.
- * libiberty.h (buildargv): Likewise.
-
-2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (reconcat): New function.
-
-2001-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (concat, concat_length, concat_copy, concat_copy2,
- ACONCAT): Improve comments.
-
-2001-09-18 Alan Modra <amodra@bigpond.net.au>
-
- * objalloc.h (OBJALLOC_ALIGN): Define using offsetof.
-
-2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (concat_length, concat_copy, concat_copy2,
- libiberty_concat_ptr, ACONCAT): New.
-
- * libiberty.h (ASTRDUP): New macro.
- libiberty_optr, libiberty_nptr, libiberty_len): Declare.
-
-2001-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Update comments reflecting previous change.
-
-2001-08-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses.
-
-2001-08-23 Lars Brinkhoff <lars@nocrew.org>
-
- * dyn-string.h, fibheap.h, partition.h, sort.h, splay-tree.h:
- replace "GNU CC" with "GCC".
-
-2001-08-21 Richard Henderson <rth@redhat.com>
-
- * fibheap.h: Tidy formatting.
- (fibnode_t): Limit degree to 31 bits to avoid warning.
-
-2001-08-20 Andrew Cagney <ac131313@redhat.com>
-
- * floatformat.h (floatformat_arm_ext): Document as deprecated.
- (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
- (floatformat_ia64_spill_little, floatformat_ia64_quad_little)
- (floatformat_ia64_spill_big, floatformat_ia64_quad_big)
- (floatformat_m88110_harris_ext): Declare.
-
-2001-08-20 Daniel Berlin <dan@cgsoftware.com>
-
- * fibheap.h: New file. Fibonacci heap.
-
-2001-08-18 Zack Weinberg <zackw@panix.com>
-
- * ansidecl.h: Reorganize for readability, remove documentation
- of obsolete macros, document PARAMS and VPARAMS. Add new
- macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic
- function implementation.
-
-2001-08-16 Richard Henderson <rth@redhat.com>
-
- * hashtab.h (htab_hash_string): Declare.
-
-2001-08-10 Andrew Cagney <ac131313@redhat.com>
-
- * libiberty.h (lbasename): Change function declaration to return a
- const char pointer.
-
-2001-08-02 Mark Kettenis <kettenis@gnu.org>
-
- * xregex.h (_REGEX_RE_COMP): Define.
- (re_comp): Define to xre_comp.
- (re_exec): Define to xre_exec.
-
-2001-07-18 Andreas Jaeger <aj@suse.de>
-
- * xregex2.h: Place under LGPL version 2.1.
-
-2001-07-10 Jeff Johnston <jjohnstn@redhat.com>
-
- * xregex.h: New file to support libiberty regex.
- * xregex2.h: Ditto.
-
-2001-05-16 Matt Kraai <kraai@alumni.carnegiemellon.edu>
-
- * partition.h: Fix misspelling of `implementation'.
-
-2001-05-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (NULL_PTR): Delete.
-
-2001-05-07 Zack Weinberg <zackw@stanford.edu>
-
- * demangle.h: Use PARAMS for all prototypes.
- * ternary.h: Use PARAMS for all prototypes. Use PTR, not void *.
- Make arguments constant where possible.
-
-2001-05-07 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_max): New function.
- (splay_tree_min): Likewise.
-
-2001-04-15 Daniel Berlin <dan@cgsoftware.com>
-
- * ternary.h: New file - Ternary search tree header.
-
-2001-04-03 Zack Weinberg <zackw@stanford.edu>
-
- * ansidecl.h: All logic from gcc/gansidecl.h moved here.
-
-2001-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (alloca): Handle setting C_ALLOCA.
-
-2001-03-20 Jim Blandy <jimb@redhat.com>
-
- * demangle.h (enum gnu_v3_constructor_kinds,
- is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds,
- is_gnu_v3_mangled_dtor): New declarations.
-
-2001-03-14 Nick Clifton <nickc@redhat.com>
-
- * ansidecl.h: Fix copyright dates.
- * demangle.h: Fix copyright dates.
- * floatformat.h: Fix copyright dates.
- * fnmatch.h: Fix copyright dates.
- * getopt.h: Fix copyright dates.
- * libiberty.h: Add FSF copyright notice.
- * md5.h: Fix copyright dates.
- * obstack.h: Fix copyright dates.
- * splay-tree.h: Fix copyright dates.
-
-2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
- John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * libiberty.h: Add lbasename.
-
-2001-03-06 Zack Weinberg <zackw@stanford.edu>
-
- * libiberty.h: Prototype C_alloca; define alloca to either
- __builtin_alloca or C_alloca as appropriate.
-
-2001-03-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * safe-ctype.h (_sch_test): Cast enum bit to unsigned short int for pcc
- compatibility.
-
-2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
-
- * COPYING: Update to current
- ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references
- to 19yy as example year in copyright notice).
-
-2000-12-16 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
-
- * safe-ctype.h: Make code work on all targets and not just on
- targets where a char is 8 bits.
-
-2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
-
- * safe-ctype.h: New file.
-
-2000-12-06 Rodney Brown <RodneyBrown@mynd.com>
-
- * getopt.h obstack.h: Standarize copyright statement.
-
-2000-12-04 Richard Henderson <rth@redhat.com>
-
- * demangle.h: Change "new_abi" to "v3" everywhere.
-
-2000-11-22 Zack Weinberg <zack@wolery.stanford.edu>
-
- * libiberty.h: Move #includes to top. Prototype xmalloc_failed.
-
-2000-11-15 Kenneth Block <kenneth.block@compaq.com>
-
- * demangle.h: Add gnat and java demangle styles.
-
-2000-11-04 Hans-Peter Nilsson <hp@bitrange.com>
-
- * hashtab.h (struct htab): Add member return_allocation_failure.
- (htab_try_create): New prototype. Mention which functions may
- return NULL when this is used.
-
-2000-11-03 Hans-Peter Nilsson <hp@bitrange.com>
-
- * hashtab.h: Change void * to PTR where necessary.
-
-2000-09-10 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_predecessor): Declare.
-
-2000-09-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * md5.h (md5_uint32): Choose via INT_MAX instead of UINT_MAX.
-
-2000-09-04 Alex Samuel <samuel@codesourcery.com>
-
- * dyn-string.h: Adjust formatting.
- (dyn_string_insert_char): New macro. New declaration.
-
-2000-08-28 Jason Merrill <jason@redhat.com>
-
- * md5.h: New file.
-
-2000-08-24 Greg McGary <greg@mcgary.org>
-
- * libiberty.h (ARRAY_SIZE): New macro.
-
-2000-06-21 Alex Samuel <samuel@codesourcery.com>
-
- * dyn-string.h (dyn_string_init, dyn_string_new,
- dyn_string_delete, dyn_string_release, dyn_string_resize,
- dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
- dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
- dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
- dyn_string_append_char, dyn_string_substring_dyn_string_eq):
- Define as same name with __cxa_ prepended, if IN_LIBGCC2.
- (dyn_string_init, dyn_string_copy, dyn_string_copy_cstr,
- dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
- dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
- dyn_string_append_char, dyn_string_substring): Change return type
- to int.
-
-2000-06-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h (demangling_styles): Remove trailing comma in enum.
-
- * dyn-string.h (dyn_string_append_char): Change parameter from
- char to int.
-
-2000-06-04 Alex Samuel <samuel@codesourcery.com>
-
- * dyn-string.h: Move here from gcc/dyn-string.h. Add new functions.
-
- * demangle.h (DMGL_GNU_NEW_ABI): New macro.
- (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI.
- (current_demangling_style): Add gnu_new_abi_demangling.
- (GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro.
- (GNU_NEW_ABI_DEMANGLING): Likewise.
- (cplus_demangle_new_abi): New declaration.
-
-Tue May 30 16:53:34 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * floatformat.h (struct floatformat): Add field name.
-
-2000-05-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * getopt.h (getopt): Also check HAVE_DECL_* when prototyping.
-
- * libiberty.h (basename): Likewise.
-
-2000-05-06 Zack Weinberg <zack@wolery.cumb.org>
-
- * ansidecl.h: #define __extension__ to nothing if
- GCC_VERSION < 2008.
-
-2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h (demangler_engine): Constify.
-
-Thu May 4 17:15:26 2000 Philippe De Muyter <phdm@macqel.be>
-
- * sort.h (sys/types.h): File included unconditionnaly.
- (stddef.h): File include only #ifdef __STDC__.
-
-2000-05-03 Zack Weinberg <zack@wolery.cumb.org>
-
- * symcat.h: Remove #endif label.
-
-2000-04-28 Kenneth Block <block@zk3.dec.com>
- Jason Merrill <jason@casey.cygnus.com>
-
- * demangle.h (libiberty_demanglers): new table for different styles.
- (cplus_demangle_set_style): New function for setting style.
- (cplus_demangle_name_to_style): New function to translate name.
-
-2000-04-24 Mark Mitchell <mark@codesourcery.com>
-
- * hashtab.h (hash_pointer): Declare.
- (eq_pointer): Likewise.
-
-2000-04-23 Mark Mitchell <mark@codesourcery.com>
-
- * sort.h: New file.
-
-Tue Apr 18 16:22:30 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
-
- * hashtab.h (enum insert_option): New type.
- (htab_find_slot, htab_find_slot_with_hash): Use it.
-
-2000-04-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * symcat.h: Honor autoconf macro HAVE_STRINGIZE. Add
- comments/caveats with regard to traditional C behavior.
-
-2000-04-05 Richard Henderson <rth@cygnus.com>
-
- * splay-tree.h (splay_tree_remove): Declare.
-
-2000-03-30 Mark Mitchell <mark@codesourcery.com>
-
- * hashtab.h (hashval_t): New type.
- (htab_find_with_hash): Use it as an argument.
- (htab_find_slot_with_hash): Likewise.
-
-2000-03-14 Bernd Schmidt <bernds@cygnus.co.uk>
-
- * hashtab.h (htab_trav): Modify type so that first arg is of type
- void **.
- (htab_find_with_hash, htab_find_slot_with_hash): Declare new
- functions.
-
-2000-03-09 Alex Samuel <samuel@codesourcery.com>
-
- * partition.h: New file.
-
-2000-03-09 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.h (struct htab): Add del_f.
- (htab_del): New type.
- (htab_create): Add fourth argument.
-
-2000-03-08 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.h (hash_table_t): Rename to htab_t.
- (struct hash_table): Rename to struct htab. Shorten element
- names. Reorder elements by size.
- (htab_hash, htab_eq, htab_trav): New typedefs for the callback
- function pointers.
- (hash_table_entry_t): Discard; just use void * for element
- type.
-
-Sat Jan 1 19:06:52 2000 Hans-Peter Nilsson <hp@bitrange.com>
-
- * symcat.h (STRINGX) [!__STDC__ || ALMOST_STDC]: Change "?" to "s"
- to stringify argument s.
-
-1999-12-05 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (struct splay_tree_node): Rename to ...
- (struct splay_tree_node_s): ... this.
- (struct splay_tree): Rename to ...
- (struct splay_tree_s): ... this.
-
-1999-11-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (ATTRIBUTE_MALLOC): New macro.
-
- * libiberty.h (buildargv, dupargv, concat, choose_temp_base,
- make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add
- ATTRIBUTE_MALLOC.
- (xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN.
-
-1999-11-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
- (asprintf, vasprintf): Provide declarations.
-
-Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
- Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'.
-
-1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
-
- * hashtab.h: Give hash_table_t a struct tag. Add prototypes
- for clear_hash_table_slot and traverse_hash_table. Correct
- prototype of all_hash_table_collisions.
-
-Fri Oct 15 01:47:51 1999 Vladimir Makarov <vmakarov@loony.cygnus.com>
-
- * hashtab.h: New file.
-
-1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (HAVE_GCC_VERSION): New macro. Use it instead of
- explicitly testing __GNUC__ and __GNUC_MINOR__.
-
- (ATTRIBUTE_PRINTF): Use `__format__', not `format'.
-
-1999-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (make_temp_file): Add a prototype.
-
-Tue Sep 14 00:35:02 1999 Marc Espie <espie@cvs.openbsd.org>
-
- * libiberty.h (basename): OpenBSD has a correct prototype.
- (xrealloc): Remove outdated comment.
-
-1999-09-07 Jeff Garzik <jgarzik@pobox.com>
-
- * libiberty.h (xmemdup): Add prototype for new function.
-
-1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * obstack.h (obstack_grow, obstack_grow0): Move (char*) casts
- in calls to `_obstack_memcpy' from here ...
-
- (_obstack_memcpy): ... to here, except in the __STDC__ case which
- doesn't need it.
-
-1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (getpwd): Prototype.
-
-1999-08-01 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_insert): Return the new node.
-
-1999-07-11 Ian Lance Taylor <ian@zembu.com>
-
- * ansidecl.h: Copy attribute support macros from egcs.
-
-1999-04-02 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_compare_pointers): Declare.
-
-1999-03-30 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_compare_ints): Declare.
-
-Wed Mar 24 12:46:29 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * libiberty.h (basename): Cygwin{,32} should have the prototype.
-
-Mon Dec 14 09:53:31 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h: Don't check IN_GCC anymore.
- * splay-tree.h: Likewise.
-
-Tue Dec 8 00:30:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * demangle.h: (DMGL_EDG): new macro for Kuck and Associates
- (DMGL_STYLE_MASK): modify to include Kuck and Assoc style
- (demangling_styles): add new edg_demangling style
- (EDG_DEMANGLING_STYLE_STRING): new macro
- (EDG_DEMANGLING): new macro
- (DMGL_HP): new macro, for HP/aCC compiler.
- (DMGL_STYLE_MASK): modify to include new HP's style.
- (demangling_styles): add new hp_demangling value.
- (HP_DEMANGLING_STYLE_STRING): new macro.
- (ARM_DEMANGLING): coerce to int.
- (HP_DEMANGLING): new macro.
-
-Fri Nov 20 13:14:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * libiberty.h (basename): Add prototype for FreeBSD.
-
-Fri Nov 13 19:19:11 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Prototype xcalloc.
-
-Sun Nov 8 17:42:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Wrap problematic macros with !IN_GCC.
-
- * demangle.h: Never define PARAMS().
- * splay-tree.h: Likewise.
-
-Sat Nov 7 16:04:03 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h: Don't include gansidecl.h.
- * splay-tree.h: Likewise.
-
-Thu Oct 22 19:58:00 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * splay-tree.h: Wrap function pointer parameter declarations in
- PARAMS() macro.
-
-1998-10-21 Mark Mitchell <mark@markmitchell.com>
-
- * splay-tree.h: New file.
-
-Fri Oct 9 00:02:03 1998 Jeffrey A Law (law@cygnus.com)
-
- * Merge devo and egcs include directories.
-
-Sat Sep 5 12:16:33 1998 Jeffrey A Law (law@cygnus.com)
-
- * getopt.h, obstack.h: Updated from gcc.
-
-1998-08-03 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * libiberty.h (xexit): Change decl to use modern GCC attribute
- to indicate exit does not return.
-
-Mon Jun 1 13:48:32 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * obstack.h: Update to latest FSF version.
-
-Tue Feb 24 13:05:02 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * dis-asm.h (disassemble_info): Member `symbol' renamed to `symbols'
- and made an "asymbol **". New member num_symbols.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Update.
-
-Tue Feb 17 12:32:18 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_fetch_register, sim_store_register): Add
- register length parameter. Functions return actual length of
- register.
-
-Thu Feb 12 16:29:01 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * getopt.h: Update to latest FSF version.
-
-Wed Feb 11 16:56:06 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * symcat.h: New file.
-
-Mon Feb 2 17:13:31 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- * dis-asm.h (print_insn_tic30): Declare.
-
-Thu Jan 22 16:23:59 1998 Fred Fish <fnf@cygnus.com>
-
- * dis-asm.h: Add flag INSN_HAS_RELOC to tell disassembly
- function there is a reloc on this line.
-
-Mon Dec 8 11:22:23 1997 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h: Remove prototype of disasm_symaddr() as this function
- no longer exists.
-
-Tue Dec 2 10:20:53 1997 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h (disasm_symaddr): New prototype.
-
-Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * coff/sh.h (R_SH_SWITCH8): New.
-
-Mon Dec 1 11:29:35 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * callback.h (CB_SYSCALL): Comment out arg names in prototypes.
-
-Wed Nov 26 16:47:58 1997 Michael Meissner <meissner@cygnus.com>
-
- * callback.h (CB_SYSCALL): Consistantly use names for prototype
- arguments.
-
-Wed Nov 26 11:39:30 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * callback.h (CB_SYSCALL): Change byte count arguments to
- {read,write}_mem to `int'. New member `magic'.
- (CB_SYSCALL_MAGIC,CB_SYSCALL_INIT): New macros.
-
-Tue Nov 25 01:35:52 1997 Doug Evans <devans@seba.cygnus.com>
-
- * callback.h (struct stat): Move forward decl up.
- (host_callback): Pass stat struct pointer to stat,fstat.
- (CB_SYS_nnn): Reorganize.
- (CB_SYSCALL): New members p1,p2.
- (cb_host_to_target_stat): Delete fourth arg.
-
-Sat Nov 22 23:34:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_stop_reason): Clarify sim_signalled SIGRC
- argument.
-
-Mon Nov 17 14:00:51 1997 Doug Evans <devans@seba.cygnus.com>
-
- * callback.h (CB_TARGET_DEFS_MAP): Renamed from target_defs_map.
- (host_callback): Add stat, fstat, syscall_map, errno_map, open_map,
- signal_map, stat_map.
- (errn_map,open_map): Renamed to cb_init_foo_map.
- (cb_host_to_target_errno,cb_target_to_host_open): Renamed from
- host_to_target_errno,target_to_host_open.
- (cb_read_target_syscall_maps): Add prototype.
- (cb_target_to_host_syscall): Likewise.
- (cb_host_to_target_stat): Likewise.
- (cb_syscall): Likewise.
- (CB_SYS_{exit,open,close,read,write,lseek,unlink,getpid,kill,fstat,
- argvlen,argv,chdir,stat,chmod,utime,time}): Define.
- (CB_SYSCALL): New type.
- (CB_RC): New enum.
-
-Fri Nov 7 10:34:09 1997 Rob Savoye <rob@darkstar.cygnus.com>
-
- * libiberty.h: Add extern "C" { so it can be used with C++
- programs.
- * remote-sim.h: Add extern "C" { so it can be used with C++
- programs.
-
-Tue Oct 14 16:07:51 1997 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h (struct disassemble_info): New field
- 'symbol_at_address_func'.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise new field with
- generic_symbol_at_address.
-
-Mon Oct 13 10:17:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h: Clarify sim_read, sim_write MEM argument.
+ * libiberty.h (pex_input_file, pex_input_pipe): New declarations.
-Wed Sep 24 18:03:10 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
+2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
- * remote-sim.h (SIM_RC): Add a bunch of new return codes for
- breakpoint stuff.
- * Add functions to tell the simulator to set/clear/enable/disable
- intrinsic breakpoints.
+ * bfdlink.h (bfd_link_info): Replace need_relax_finalize with
+ relax_pass.
-Thu Aug 28 19:41:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
+2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
- * libiberty.h (dupargv): Add prototype.
+ * elf/bfin.h (R_BFIN_GOT17M4, R_BFIN_GOTHI, R_BFIN_GOTLO,
+ R_BFIN_FUNCDESC, R_BFIN_FUNCDESC_GOT17M4, R_BFIN_FUNCDESC_GOTHI,
+ R_BFIN_FUNCDESC_GOTLO, R_BFIN_FUNCDESC_VALUE,
+ R_BFIN_FUNCDESC_GOTOFF17M4, R_BFIN_FUNCDESC_GOTOFFHI,
+ R_BFIN_FUNCDESC_GOTOFFLO, R_BFIN_GOTOFF17M4, R_BFIN_GOTOFFHI,
+ R_BFIN_GOTOFFLO): New relocs.
+ (EF_BFIN_PIC, EF_BFIN_FDPIC, EF_BFIN_PIC_FLAGS): New macros.
-Tue Aug 26 12:25:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
+2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
+ Anil Paranjape <anilp1@kpitcummins.com>
+ Shilin Shakti <shilins@kpitcummins.com>
- * remote-sim.h (sim_create_inferior): Add ABFD arg. Document.
+ * dis-asm.h (print_insn_xc16c): New prototype.
-Mon Aug 25 10:50:51 1997 Andrew Cagney <cagney@b1.cygnus.com>
+2006-02-06 Steve Ellcey <sje@cup.hp.com>
- * remote-sim.h (sim_open): Add ABFD arg. Document.
+ * elf/ia64.h (SHF_IA_64_HP_TLS): New.
-Fri Aug 8 16:43:56 1997 Doug Evans <dje@canuck.cygnus.com>
+2006-01-18 DJ Delorie <dj@redhat.com>
- * dis-asm.h (arc_get_disassembler): Declare.
+ * md5.h: Include ansidecl.h
-Wed Jul 30 11:39:50 1997 Per Bothner <bothner@deneb.cygnus.com>
+2006-01-17 Andreas Schwab <schwab@suse.de>
- * demangle.h (DMGL_JAVA): New option to request Java demangling.
+ PR binutils/1486
+ * dis-asm.h (struct disassemble_info): Add
+ disassembler_needs_relocs.
-Tue Jul 22 17:59:54 1997 Ian Lance Taylor <ian@cygnus.com>
+2006-01-09 Bob Wilson <bob.wilson@acm.org>
- * libiberty.h (PEXECUTE_*): Define.
- (pexecute, pwait): Declare.
+ * xtensa-config.h (XCHAL_HAVE_MUL32_HIGH): Define.
-Fri Jun 6 13:02:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
+2005-12-30 Bob Wilson <bob.wilson@acm.org>
- * remote-sim.h (sim_kill): Mark as deprecated.
+ * xtensa-config.h (XCHAL_HAVE_WIDE_BRANCHES): New.
-Fri May 23 13:43:41 1997 Fred Fish <fnf@cygnus.com>
+2005-12-16 Nathan Sidwell <nathan@codesourcery.com>
- * bfdlink.h (struct bfd_link_info): Add task_link member.
+ Second part of ms1 to mt renaming.
+ * dis-asm.h (print_insn_mt): Renamed.
-Thu May 22 11:32:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
+2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
- * remote-sim.h: Review documentation. Clarify restrictions on
- when functions can be called.
+ * elf/mt.h: Renamed from ms1.h
-Wed May 21 16:47:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
+2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
- * remote-sim.h (sim_set_profile_size): Add prototype, document as
- deprecated.
+ PR java/9861
+ * demangle.h : Add DMGL_RET_POSTFIX define to enable alternative
+ output format for return types
-Tue May 20 09:32:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
+2005-11-07 Nathan Sidwell <nathan@codesourcery.com>
- * remote-sim.h (sim_open): Add callback struct.
- (sim_set_callbacks): Drop SIM_DESC argument. Document.
- (sim_size): Remove recently added SIM_DESC argument. Document.
+ Add ms2.
+ * elf/ms1.h (EF_MS1_CPU_MS2): New.
-Mon May 19 19:14:44 1997 Andrew Cagney <cagney@b1.cygnus.com>
+2005-11-06 John David Anglin <dave.anglin@nrc-crnc.gc.ca>
- * remote-sim.h: Pass SD into sim_size.
+ * elf/hppa.h (R_PARISC_DIR64WR, R_PARISC_DIR64DR): Remove relocs.
-Thu May 15 01:24:16 1997 Mark Alexander <marka@cygnus.com>
+2005-11-03 Alan Modra <amodra@bigpond.net.au>
- * obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun,
- obstack_freefun): Eliminate compile warnings in gdb.
+ * bfdlink.h (struct bfd_link_order): Tweak comment.
-Tue May 13 10:21:14 1997 Nick Clifton <nickc@cygnus.com>
+2005-10-31 Mark Kettenis <kettenis@gnu.org>
- * coff/arm.h (constants): Added new flag bits F_APCS_26 and
- F_APCS_SET for the f_flags field of the filehdr structure. Added new
- flags: F_APCS26, F_ARM_2, F_ARM_3, F_ARM_7, F_ARM_7T to store
- information in the flags field of the internal_f structure used by BFD
- routines.
+ * floatformat.h (enum floatformat_byteorders): Add
+ floatformat_vax.
+ (floatformat_vax_aingle, floatformat_vax_double): Declare.
-Tue Apr 22 10:24:34 1997 Fred Fish <fnf@cygnus.com>
+2005-10-28 Dave Brolley <brolley@redhat.com>
- * floatformat.h (floatformat_byteorders): Add comments for previous
- formats and add floatformat_littlebyte_bigword, primarily for ARM.
- Add declaration for floatformat_ieee_double_littlebyte_bigword.
+ Contribute the following changes:
+ 2003-09-29 Dave Brolley <brolley@redhat.com>
-Fri Apr 18 13:04:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
+ * dis-asm.h (disassemble_info): insn_sets now (void *) to allow for
+ more exotic underlying types to be used.
- * remote-sim.h (sim_stop): New interface - asynchronous
- notification of a request to stop / suspend the running
- simulation.
+2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
- * remote-sim.h (enum sim_stop): Add sim_running and sim_polling as
- states for use internal to simulators.
+ disasm.h: Add declaration for print_insn_z80
- * callback.h (struct host_callback_strut): Put a magic number at
- the end of the struct to allow basic checking.
- (struct host_callback_struct ): Add poll_quit - so
- that the console etc can be polled at regular intervals.
+2005-09-30 Catherine Moore <clm@cm00re.com>
-Thu Apr 17 02:17:12 1997 Doug Evans <dje@canuck.cygnus.com>
+ * dis-asm.h (print_insn_bfin): Declare.
+ * opcode/bfin.h: New file.
- * remote-sim.h (struct _bfd): Declare.
- (sim_load): Return SIM_RC. New arg `abfd'.
- (sim_create_inferior): Return SIM_RC. Delete arg `start_address'.
+2005-09-26 Mark Mitchell <mark@codesourcery.com>
-Wed Apr 2 17:09:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
+ * libiberty.h (expandargv): New function.
- * remote-sim.h (sim_trace, sim_size): Make these global. They
- will go away shortly.
+2005-08-18 Alan Modra <amodra@bigpond.net.au>
-Wed Apr 2 15:23:49 1997 Doug Evans <dje@canuck.cygnus.com>
+ * bfdlink.h: Remove mention of a29k.
+ * dis-asm.h: Remove a29k support.
+ * aout/encap.h: Likewise.
- * remote-sim.h (SIM_OPEN_KIND, SIM_RC): New enums.
- (sim_open): New argument `kind'.
+2005-08-17 Mark Kettenis <kettenis@gnu.org>
-Wed Apr 2 14:45:51 1997 Ian Lance Taylor <ian@cygnus.com>
+ * floatformat.h (struct floatformat): Change type of large
+ argument for is_valid member to `const void *'.
+ (floatformat_to_double): Change type of second argument to `const
+ void *'.
+ (floatformat_from_double): Change type of last argument to `void
+ *'.
+ (floatformat_is_valid): Change type of last argument to `const
+ void *'.
- * COPYING: Update FSF address.
+2005-07-14 Jim Blandy <jimb@redhat.com>
-Fri Mar 28 15:29:54 1997 Mike Meissner <meissner@cygnus.com>
+ * dis-asm.h (print_insn_m32c): New declaration.
- * callback.h (top level): Include stdarg.h or varargs.h if
- va_start is not defined.
- (host_callback_struct): Make {,e}vprintf_filtered take a va_list
- instead of void *, since va_list might be an array or structure
- type.
+2005-07-12 Ben Elliston <bje@au.ibm.com>
-Fri Mar 28 15:44:41 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+ * xregex2.h (regexec): Qualify this prototype with __extension__
+ when compiling with GNU C.
- * libiberty.h (basename): Add prototype for glibc and linux.
+2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Mon Mar 17 19:22:12 1997 Ian Lance Taylor <ian@cygnus.com>
+ * dis-asm.h (fprintf_ftype): Add format attribute.
- * objalloc.h: New file.
+2005-07-03 Steve Ellcey <sje@cup.hp.com>
-Mon Mar 17 14:57:55 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
+ PR other/13906
+ * ansidecl.h (ATTRIBUTE_ALIGNED_ALIGNOF): New.
+ * md5.h (md5_uintptr): New.
+ (md5_ctx): Align buffer field.
- * remote-sim.h: New file, copied in from gdb/remote-sim.h. One
- day this will be placed in a directory of its own.
+2005-06-30 Daniel Berlin <dberlin@dberlin.org>
-Sat Mar 15 19:00:14 1997 Ian Lance Taylor <ian@cygnus.com>
+ * hashtab.h (HTAB_DELETED_ENTRY): New macro.
+ (HTAB_EMPTY_ENTRY): New macro.
- * obstack.h: Update to current FSF version.
+2005-06-20 Geoffrey Keating <geoffk@apple.com>
-Thu Mar 6 15:46:59 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
+ * libiberty.h (strverscmp): Prototype.
- * callback.h (struct host_callback_struct): Add callbacks -
- flush_stdout, write_stderr, flush_stderr, vprintf_filtered,
- evprintf_filtered. Delete redundant callbacks - printf_filtered.
+2005-06-17 Jakub Jelinek <jakub@redhat.com>
-Thu Feb 27 23:18:27 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf/external.h (GRP_ENTRY_SIZE): Define.
- * bfdlink.h (struct bfd_link_info): Remove lprefix and lprefix_len
- fields.
+2005-06-08 Zack Weinberg <zack@codesourcery.com>
-Tue Feb 25 00:10:49 1997 Ian Lance Taylor <ian@cygnus.com>
+ * dis-asm.h (get_arm_regnames): Update prototype.
- * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize
- bytes_per_chunk and display_endian.
+2005-06-07 Aldy Hernandez <aldyh@redhat.com>
+ Michael Snyder <msnyder@redhat.com>
+ Stan Cox <scox@redhat.com>
-Mon Feb 24 17:47:02 1997 Ian Lance Taylor <ian@cygnus.com>
+ * dis-asm.h: Externalize print_insn_ms1.
- From Eric Youngdale <eric@andante.jic.com>:
- * bfdlink.h (struct bfd_elf_version_expr): Define.
- (struct bfd_elf_version_deps): Define.
- (struct bfd_elf_version_tree): Define.
+2005-06-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
-Thu Feb 6 14:20:01 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
+ * libiberty.h (XOBFINISH): New.
- * dis-asm.h: (disassemble_info): Add new fields
- bytes_per_chunk and display_endian to control the
- display of raw instructions.
+2005-06-03 Alan Modra <amodra@bigpond.net.au>
-Sun Dec 8 17:11:12 1996 Doug Evans <dje@canuck.cygnus.com>
+ * bfdlink.h (struct bfd_link_callbacks): Add einfo.
- * callback.h (host_callback): New member `error'.
+2005-06-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Wed Nov 20 00:40:23 1996 Doug Evans <dje@canuck.cygnus.com>
+ * libiberty.h (vsnprintf): Add format attribute.
- * callback.h: New file, moved here from gdb.
+2005-05-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Mon Nov 18 16:34:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
+ * ansidecl.h: Add ATTRIBUTE_FPTR_PRINTF.
- * libiberty.h: Checkin again; last checkin failed due to sticky tag.
+2005-05-28 Eli Zaretskii <eliz@gnu.org>
-Wed Nov 13 08:22:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
+ * libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if
+ needed.
+ (vsnprintf) [!HAVE_DECL_VSNPRINTF]: Declare if needed.
- * libiberty.h: Revert last commit due to conflicts with hpux
- system headers.
+2005-05-25 Richard Henderson <rth@redhat.com>
-Tue Nov 12 16:31:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
+ * demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New.
- * libiberty.h: Move prototypes from argv.c here.
+2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
-Thu Oct 31 14:56:18 1996 Doug Evans <dje@canuck.cygnus.com>
+ * libiberty.h (ACONCAT): Properly cast value of alloca().
- * ansidecl.h (VPARAMS,VA_START): Define.
+ * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if
+ __cplusplus.
-Fri Oct 25 12:08:04 1996 Ian Lance Taylor <ian@cygnus.com>
+2005-05-12 Steve Ellcey <sje@cup.hp.com>
- * dis-asm.h (disassemble_info): Add bytes_per_line field.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize bytes_per_line field.
+ libiberty.h: Do not define empty basename prototype.
-Thu Oct 24 17:10:01 1996 Ian Lance Taylor <ian@cygnus.com>
+2005-05-10 Nick Clifton <nickc@redhat.com>
- * dis-asm.h (disassemble_info): Add symbol field.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize symbol field.
+ * Update the address and phone number of the FSF organization in
+ the GPL notices in the following files:
+ COPYING, ansidecl.h, bfdlink.h, bout.h, demangle.h, dis-asm.h,
+ dyn-string.h, fibheap.h, filenames.h, floatformat.h,
+ fnmatch.h, gdbm.h, getopt.h, hashtab.h, hp-symtab.h, ieee.h,
+ libiberty.h, md5.h, oasys.h, objalloc.h, obstack.h, os9k.h,
+ partition.h, progress.h, safe-ctype.h, sort.h, splay-tree.h,
+ symcat.h, ternary.h, xregex2.h, xtensa-config.h,
+ xtensa-isa-internal.h, xtensa-isa.h
-Thu Oct 17 11:17:40 1996 Doug Evans <dje@canuck.cygnus.com>
+2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * dis-asm.h (print_insn_m32r): Declare.
+ * libiberty.h (unlock_std_streams): New.
-Mon Oct 14 23:56:52 1996 Ian Lance Taylor <ian@cygnus.com>
+2005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * libiberty.h: Declare parameter types for xmalloc and xrealloc.
+ * hashtab.h, libiberty.h, objalloc.h, splay-tree.h, ternary.h:
+ Don't use the PTR macro.
-Thu Oct 3 13:45:27 1996 Ian Lance Taylor <ian@cygnus.com>
+ * sort.h: Don't use the PARAMS macro.
- * fnmatch.h: New file.
+2005-04-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Thu Oct 3 10:33:14 1996 Jeffrey A Law (law@cygnus.com)
+ * libiberty.h (unlock_stream): New.
- * dis-asm.h (print_insn_mn10x00): Delete declaration.
- (print_insn_mn10200, print_insn_mn10300): Declare.
+2005-04-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Wed Oct 2 21:24:43 1996 Jeffrey A Law (law@cygnus.com)
+ * libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
+ Remove parameter names.
- * dis-asm.h (print_insn_mn10x00): Declare.
+2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Mon Sep 30 13:56:11 1996 Fred Fish <fnf@cygnus.com>
+ * libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
+ Provide prototypes for new functions.
- * libiberty.h: Remove #ifndef PRIVATE_XMALLOC.
+2005-03-29 Ian Lance Taylor <ian@airs.com>
-Sat Aug 31 13:27:06 1996 Jeffrey A Law (law@cygnus.com)
+ * libiberty.h: Fix indentation.
- * dis-asm.h (print_insn_v850): Declare.
+2005-03-28 Ian Lance Taylor <ian@airs.com>
-Tue Aug 13 16:10:30 1996 Stu Grossman (grossman@critters.cygnus.com)
+ * libiberty.h: Include <stdio.h>.
+ (PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
+ (PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
+ (PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
+ (pex_init, pex_run, pex_read_output): Declare.
+ (pex_get_status, pex_get_times, pex_free, pex_one): Declare.
+ (struct pex_time): Define.
- * obstack.h: Change bcopy to memcpy. Works better on Posix
- systems, which generally lack bcopy.
+2005-03-28 Mark Mitchell <mark@codesourcery.com>
-Mon Aug 12 17:03:18 1996 Stu Grossman (grossman@critters.cygnus.com)
+ * libiberty.h (ffs): Declare, if necessary.
- * ansidecl.h: Change WIN32 to _WIN32.
+2005-03-27 Gabriel Dos Reis <gdr@integreable-solutions.net>
-Fri Jul 26 13:58:18 1996 Ian Lance Taylor <ian@cygnus.com>
+ * ternary.h: Don't use PARAMS anymore.
- * dis-asm.h: Add flavour field.
- (print_insn_alpha): Declare.
- (print_insn_alpha_osf, print_insn_alpha_vms): Don't declare.
- (INIT_DISASSEMBLE_INFO): Initialize flavour field.
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
-Tue Jul 23 17:37:58 1996 Fred Fish <fnf@cygnus.com>
-
- * libiberty.h (PRIVATE_XMALLOC): Enclose xmalloc/xrealloc
- definitions inside #ifndef so that programs that want to
- can define PRIVATE_XMALLOC and then define xmalloc and
- xrealloc anyway they want.
- (basename): Document in source that we can't declare the
- parameter type because it is declared inconsistently across
- different systems.
-
-Mon Jul 22 13:16:13 1996 Richard Henderson <rth@tamu.edu>
-
- * dis-asm.h (print_insn_alpha): Don't declare.
- (print_insn_alpha_osf, print_insn_alpha_vms): Declare.
-
-Wed Jul 17 14:45:12 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * dis-asm.h: (print_insn_d10v): Declare.
-
-Mon Jul 15 16:55:38 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dis-asm.h: Get rid of decls for print_insn_i8086,
- print_insn_sparc64 and print_insn_sparclite.
- * (INIT_DISASSEMBLE_INFO): Split into two pieces. One,
- INIT_DISASSEMBLE_INFO_NO_ARCH inits everything except for endian,
- mach, and arch.
-
-Fri Jul 12 10:19:27 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dis-asm.h (print_insn_i8086): Declare.
-
-Wed Jul 3 16:02:39 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dis-asm.h (print_insn_sparclite): Declare.
-
-Tue Jun 18 16:02:46 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * dis-asm.h (print_insn_h8300s): Declare.
-
-Tue Jun 18 15:11:33 1996 Klaus Kaempf <kkaempf@progis.de>
-
- * fopen-vms.h: New file.
-
-Tue Jun 4 18:58:16 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add notice_all field.
-
-Fri Apr 26 10:33:12 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * demangle.h (#ifdef IN_GCC): #include "gansidecl.h".
- (PROTO,PTR,const): Delete.
-
-Mon Apr 22 17:27:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add traditional_format field.
-
-Mon Apr 15 15:16:56 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libiberty.h (choose_temp_base): Add prototype.
-
-Tue Mar 12 17:29:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (bfd_wrapped_link_hash_lookup): Declare.
- (struct bfd_link_info): Add wrap_hash field.
-
-Wed Feb 14 16:49:17 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
-
- * ieee.h (ieee_record_enum_type): Define
- ieee_external_reference_info_enum.
-
-Fri Feb 2 17:09:25 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (DISASM_RAW_INSN): Delete.
-
-Tue Jan 23 09:21:47 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (INIT_DISASSEMBLE_INFO): Set endian to BFD_ENDIAN_UNKNOWN.
- New argument FPRINTF_FUNC.
-
-Mon Jan 22 16:37:59 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (disassemble_info): New members arch, mach, endian.
- (INIT_DISASSEMBLE_INFO): Initialize them.
- (DISASM_RAW_INSN{,FLAG}): Define.
-
-Thu Jan 18 11:32:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * demangle.h (cplus_demangle_opname): Change opname parameter to
- const char *.
- (cplus_mangle_opname): Change return type and opname parameter to
- const char *.
-
-Fri Jan 5 00:01:22 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.h (enum ieee_record): Add ieee_asn_record_enum,
- ieee_at_record_enum, ieee_ty_record_enum, ieee_atn_record_enum,
- ieee_bb_record_enum, and ieee_be_record_enum.
-
-Wed Jan 3 13:12:09 1996 Fred Fish <fnf@cygnus.com>
-
- * obstack.h: Update copyright to 1996.
- (_obstack_memory_used): Declare.
- (obstack_memory_used): Define macro.
-
-Thu Dec 28 11:42:12 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (xstrdup): Declare.
-
-Thu Dec 21 14:47:17 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * wait.h: Protect all macros with #ifndef.
-
-Tue Oct 24 21:45:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add static_link field.
-
-Tue Sep 12 16:28:04 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Add symbol parameter to
- warning callback.
-
-Fri Sep 1 13:11:51 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Change warning callback
- to take BFD, section, and address arguments.
-
-Thu Aug 31 16:45:12 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Remove PE stuff.
-
-Tue Aug 22 03:18:23 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- * libiberty.h: Declare xstrerror. From Pat Rankin.
-
-Mon Aug 21 18:11:36 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Remove PE stuff.
-
-Wed Aug 2 08:14:12 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * dis-asm.h (print_insn_sparc64): Declare.
-
-Mon Jul 10 13:26:49 1995 Eric Youngdale <eric@aib.com>
-
- * bfdlink.h (struct bfd_link_info): Add new field symbolic.
-
-Sun Jul 2 17:48:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Change type of base_file to
- PTR.
-
-Thu Jun 29 00:02:45 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Added base_file member.
-
-Tue Jun 20 16:40:04 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * ansidecl.h: win32s is ANSI enough.
-
-Thu May 18 04:25:50 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
-
- * dis-asm.h (print_insn_arm): Delete declaration.
- (print_insn_{little,big}_arm): New declarations.
-
- * floatformat.h (floatformat_arm_ext): Declare.
-
-Sat May 13 10:14:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * coff/pe.h: New file.
- * bfdlink.h (subsytem, stack_heap_parameters): New.
- * coff/i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT,
- NT_DEF_RESERVE, NT_DEF_COMMIT): New.
- * coff/internal.h (internal_filehdr): New fields for PE.
- (IMAGE_DATA_DIRECTORY): New.
- (internal_aouthdr): New fields for PE.
-
-Thu May 4 14:36:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * demangle.h: Don't include ansidecl.h if IN_GCC.
-
-Tue Feb 21 00:37:28 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hp-symtab.h: Don't use bitfield enumerations, the HP C compiler
- does not handle them correctly.
-
-Thu Feb 9 14:20:27 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (basename): Don't declare parameter type; some
- systems have this in their header files.
-
-Wed Feb 8 17:35:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_hash_entry): Change format of common
- symbol information, to remove restrictions on maximum size and
- alignment power, by using a pointer to a structure instead.
-
-Mon Feb 6 14:55:32 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (enum bfd_link_hash_type): Rename bfd_link_hash_weak
- to bfd_link_hash_undefweak. Add bfd_link_hash_defweak.
-
-Mon Jan 16 21:00:23 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * dis-asm.h (GDB_INIT_DISASSEMBLE_INFO, etc): Remove all
- GDB-specific definitions.
-
-Sun Jan 15 18:39:35 1995 Steve Chamberlain <sac@splat>
-
- * dis-asm.h (print_insn_w65): Declare.
-
-Thu Jan 12 17:51:17 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * libiberty.h (hex_p): Fix sense of test.
-
-Wed Jan 11 22:36:40 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * libiberty.h (_hex_array_size, _hex_bad, _hex_value, hex_init,
- hex_p, hex_value): New macros and declarations, for hex.c.
-
-Fri Jan 6 17:44:14 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * dis-asm.h: Make idempotent.
-
-Wed Dec 14 13:08:43 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * progress.h: New file, empty definitions for progress macros.
-
-Fri Nov 25 00:14:05 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hp-symtab.h: New file describing the debug symbols emitted
- by the HP C compilers.
-
-Fri Nov 11 15:48:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size from 24
- to 26 bits, and change u.c.alignment_power from 8 to 6 bits. 6
- bit in the alignment power is enough for a 64 bit address space.
-
-Mon Oct 31 13:02:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * demangle.h (cplus_mangle_opname): Declare.
-
-Tue Oct 25 11:38:02 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Fix comments for
- multiple_common field.
-
-Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
- * aout/aout64.h: Only define QMAGIC if it isn't already defined.
-
- * dis-asm.h: Add support for the ARM.
-
-Wed Aug 10 12:51:41 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libiberty.h (strsignal): Document its existence even if we
- can't declare it.
-
-Tue Aug 2 14:40:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * os9k.h: Remove u_int16, u_int32, and owner_id typedefs and
- expand their uses. Those names conflict with Mach headers.
-
-Fri Jul 22 14:17:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size into a
- bitfield. Add field u.c.alignment_power.
-
-Sun Jul 10 00:26:39 1994 Ian Dall (dall@hfrd.dsto.gov.au)
-
- * dis-asm.h: Add print_insn_ns32k declaration.
-
-Mon Jun 20 17:13:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * bfdlink.h (bfd_link_hash_table): Make creator a const pointer.
-
-Sat Jun 18 16:09:32 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * demangle.h (cplus_demangle_opname): Declare.
-
-Thu Jun 16 15:19:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_info): Add new field shared.
-
-Mon Jun 6 14:39:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_hash_entry): Remove written field:
- not needed for all backends.
-
-Thu Apr 28 19:06:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * dis-asm.h (disassembler): Declare.
-
-Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu)
-
- * obstack.h: Delete use of IN_GCC to control whether
- stddef.h or gstddef.h is included.
-
-Tue Mar 22 13:06:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (enum bfd_link_order_type): Add bfd_data_link_order.
- (struct bfd_link_order): Add data field to union.
-
-Mon Mar 21 18:45:26 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Change bitsize argument
- to add_to_set to reloc. Remove bitsize argument from constructor.
- Comment that reloc_overflow, reloc_dangerous and unattached_reloc
- must handle NULL pointers for reloc location.
- (enum bfd_link_order_type): Add bfd_section_reloc_link_order and
- bfd_symbol_reloc_link_order.
- (struct bfd_link_order): Add reloc field to union.
- (struct bfd_link_order_reloc): Define.
-
-Mon Mar 14 12:27:50 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ieee-float.h: Removed; no longer used.
-
-Tue Mar 1 18:10:49 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * os9k.h: os9000 target specific header file, the header of the
- object file is used now.
-
-Sun Feb 27 21:52:26 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * floatformat.h: New file, intended to replace ieee-float.h.
-
-Sun Feb 20 17:15:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
-
- * ansidecl.h (ANSI_PROTOTYPES): Define if using ANSI prototypes.
-
-Wed Feb 16 01:07:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * libiberty.h: Don't declare strsignal, to avoid conflicts with
- Solaris system header files.
-
-Sat Feb 12 22:11:32 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * libiberty.h (xexit): Use __volatile__ to avoid losing if
- compiling with gcc -traditional.
-
-Thu Feb 10 14:05:41 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * libiberty.h: New file. Declares functions provided by
- libiberty.
-
-Tue Feb 8 05:19:52 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- Handle obstack_chunk_alloc returning NULL. This allows
- obstacks to be used by libraries, without forcing them
- to call exit or longjmp.
- * obstack.h (struct obstack): Add alloc_failed flag.
- _obstack_begin, _obstack_begin_1): Declare to return int, not void.
- (obstack_finish): If alloc_failed, return NULL.
- (obstack_base, obstack_next_free, objstack_object_size):
- If alloc_failed, return 0.
- (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
- obstack_int_grow, obstack_blank): If alloc_failed, do nothing that
- could corrupt the obstack.
-
-Mon Jan 24 15:06:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Add name, reloc_name and
- addend argments to reloc_overflow callback.
-
-Fri Jan 21 19:13:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h (print_insn_big_powerpc, print_insn_little_powerpc,
- print_insn_rs6000): Declare.
-
-Thu Jan 6 14:15:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Add bitsize argument to
- add_to_set field. Add new callback named constructor.
-
-Thu Dec 30 10:44:06 1993 Ian Lance Taylor (ian@rtl.cygnus.com)
-
- * bfdlink.h: New file for new BFD linker backend routines.
-
-Mon Nov 29 10:43:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h (enum dis_insn_tyupe): Remove non-ANSI trailing comma.
-
-Sat Oct 2 20:42:26 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h: Move comment to right place.
-
-Mon Aug 9 19:03:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * obstack.h (obstack_chunkfun, obstack_freefun): Add defns from
- previous version. Are these Cygnus local changes?
-
-Fri Aug 6 17:05:47 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * getopt.h, obstack.h: Update to latest FSF version.
-
-Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com)
-
- * coff/i386.h: Add Lynx magic number.
-
-Mon Aug 2 14:45:29 1993 John Gilmore (gnu@cygnus.com)
-
- * dis-asm.h: Move enum outside of struct defn to avoid warnings.
-
-Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com)
-
- * wait.h (WEXITSTATUS, WSTOPSIG): Mask down to 8 bits. This is
- for systems that store stuff into the high 16 bits of a wait
- status.
-
-Fri Jul 30 18:38:02 1993 John Gilmore (gnu@cygnus.com)
-
- * dis-asm.h: Add new fields insn_info_valid, branch_delay_insns,
- data_size, insn_type, target, target2. These are used to return
- information from the instruction decoders back to the calling
- program. Add comments, make more readable.
-
-Mon Jul 19 22:14:14 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * nlm: New directory containing NLM/NetWare includes.
-
-Thu Jul 15 12:10:04 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * dis-asm.h (struct disassemble_info): New field application_data.
-
-Thu Jul 15 12:41:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h: Added declaration of print_insn_m88k.
-
-Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * opcode/h8300.h: Lots of little fixes for the h8/300h.
-
-Fri Jul 2 10:31:59 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ansidecl.h: Use ANSI macros if __mips and _SYSTYPE_SVR4 are
- defined, since RISC/OS cc handles ANSI declarations in SVR4 mode
- but does not define __STDC__.
-
-Sun Jun 20 18:27:52 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * dis-asm.h: Don't need to include ansidecl.h any more.
-
-Fri Jun 18 03:22:10 1993 John Gilmore (gnu@cygnus.com)
-
- * oasys.h: Eliminate "int8_type", "int16_type", "int32_type", and
- their variants. These changes are coordinated with corresponding
- changes in ../bfd/oasys.c.
-
-Wed Jun 16 10:43:08 1993 Fred Fish (fnf@cygnus.com)
-
- * bfd.h: Note that it has been removed.
-
-Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- Support for H8/300-H
- * dis-asm.h (print_insn_h8300, print_insn_h8300h): Declare it.
- * coff/h8300.h: New magic number.
- * coff/internal.h: New relocations.
- * opcode/h8300.h: Lots of new opcodes.
-
-Tue Jun 1 07:35:03 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * ansidecl.h (const): Don't define it if it's already defined.
-
-Thu May 27 18:19:51 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * dis-asm.h (print_insn_hppa): Declare it.
-
- * bfd.h: Moved to bfd directory. Small stub here includes it
- without requiring "-I../bfd".
-
-Thu Apr 29 12:06:13 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * bfd.h: Updated with BSF_FUNCTION.
-
-Mon Apr 26 18:15:50 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h, dis-asm.h: Updated with Hitachi SH.
-
-Fri Apr 23 18:41:38 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: Updated with alpha changes.
- * dis-asm.h: Added alpha.
-
-Fri Apr 16 17:35:30 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * bfd.h: Update for signed bfd_*get_*.
-
-Thu Apr 15 09:24:21 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * bfd.h: Updated for file_truncated error.
-
-Thu Apr 8 10:53:47 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ansidecl.h: If no ANSI, define const to be empty.
-
-Thu Apr 1 09:00:10 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * dis-asm.h: Declare a29k and i960 print_insn_*.
-
- * dis-asm.h: Add print_address_func and related stuff.
-
- * dis-asm.h (dis_asm_read_memory): Fix prototype.
-
-Wed Mar 31 17:40:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h: Add print_insn_sparc.
-
-Wed Mar 31 17:51:42 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Updated for BFD_RELOC_MIPS_GPREL and bfd_[gs]et_gp_size
- prototypes.
-
-Wed Mar 31 16:35:12 1993 Stu Grossman (grossman@cygnus.com)
-
- * dis-asm.h: (disassemble_info): Fix typo in prototype of
- dis_asm_memory_error().
-
-Tue Mar 30 19:09:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h (disassembler_info): Add read_memory_func,
- memory_error_func, buffer, and length.
- ({GDB_,}INIT_DISASSEMBLE_INFO): Set them.
- print_insn_*: Remove second argument.
-
-Tue Mar 30 14:48:55 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: Update for lma field of section.
-
-Tue Mar 30 12:22:55 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * ansidecl.h: Use ANSI versions on AIX regardless of __STDC__.
-
-Fri Mar 19 14:49:49 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * dis-asm.h: Add h8500.
-
-Thu Mar 18 13:49:09 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ieee-float.h: Moved from ../gdb.
- * dis-asm.h: New file. Interface to dis-assembler.
-
-Thu Mar 11 10:52:57 1993 Fred Fish (fnf@cygnus.com)
-
- * demangle.h (DMGL_NO_OPTS): Add define (set to 0) to use
- in place of bare 0, for readability reasons.
-
-Tue Mar 2 17:50:11 1993 Fred Fish (fnf@cygnus.com)
-
- * demangle.h: Replace all references to cfront with ARM.
-
-Tue Feb 23 12:21:14 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update for new elements in JUMP_TABLE.
-
-Tue Feb 16 00:51:30 1993 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update for BFD_VERSION 2.1.
-
-Tue Jan 26 11:49:20 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update for SEC_IS_COMMON flag.
-
-Tue Jan 19 12:25:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfd.h: Update for bfd_asymbol_value bug fix.
-
-Fri Jan 8 16:37:18 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfd.h: Update to include ECOFF tdata and target_flavour.
-
-Sun Dec 27 17:52:30 1992 Fred Fish (fnf@cygnus.com)
-
- * bfd.h: Add declaration for bfd_get_size().
-
-Tue Dec 22 22:42:46 1992 Fred Fish (fnf@cygnus.com)
-
- * demangle.h: Protect file from multiple inclusions with
- #if !defined(DEMANGLE_H)...#define DEMANGLE_H...#endif.
-
-Mon Dec 21 21:25:50 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h: Update to get hppa_core_struct from bfd.c.
-
-Thu Dec 17 00:42:35 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update to get tekhex tdata name change from bfd.
-
-Mon Nov 9 23:55:42 1992 John Gilmore (gnu@cygnus.com)
-
- * ansidecl.h: Update comments to discourage use of EXFUN.
-
-Thu Nov 5 16:35:44 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update to bring in SEC_SHARED_LIBRARY.
-
-Thu Nov 5 03:21:32 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update to match EXFUN, bfd_seclet_struct, and SDEF
- cleanups in bfd.
-
-Wed Nov 4 07:28:05 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * bout.h (N_CALLNAME, N_BALNAME): Define as char-type values, so
- widening works consistently.
-
-Fri Oct 16 03:17:08 1992 John Gilmore (gnu@cygnus.com)
-
- * getopt.h: Update to Revised Standard FSF Version.
-
-Thu Oct 15 21:43:22 1992 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * getopt.h (struct option): use the provided enum for has_arg.
-
- * demangle.h (AUTO_DEMANGLING, GNU_DEMANGLING,
- LUCID_DEMANGLING): ultrix compilers require enums to be
- enums and ints to be ints and casts where they meet. cast some
- enums into ints.
-
-Thu Oct 15 04:35:51 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update after comment changes.
-
-Thu Oct 8 09:03:02 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h (bfd_get_symbol_leading_char): new macro for getting in xvec
-
-Thu Sep 3 09:10:50 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h (struct reloc_howto_struct): size needs to be signed if
- it's going to hold negative values.
-
-Sun Aug 30 17:50:27 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * demangle.h: New file, moved from ../gdb. Made independent
- of gdb. Allow demangling style option to be passed as a
- parameter to cplus_demangle(), but using the
- current_demangling_style global as the default.
-
-Sat Aug 29 10:07:55 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Merge comment change from current FSF version.
-
-Thu Aug 27 12:59:29 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * bfd.h: add we32k
-
-Tue Aug 25 15:07:47 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: new after Z8000 stuff
-
-Mon Aug 17 09:01:23 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * bfd.h: Regenerated after page/segment size changes.
-
-Sat Aug 1 13:46:31 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Merge changes from current FSF version.
-
-Mon Jul 20 21:06:23 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h (area_id, flags): Remove, replace with extra_arg,
- use_extra_arg, and maybe_empty_object.
- * obstack.h (OBSTACK_MAYBE_EMPTY_OBJECT, OBSTACK_MMALLOC_LIKE):
- Remove, replaced by maybe_empty_object and use_extra_arg bitfields.
- * obstack.h (obstack_full_begin, _obstack_begin): Remove area_id
- and flags arguments.
- * obstack.h (obstack_alloc_arg): New macro to set extra_arg.
-
-Thu Jul 16 08:12:44 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: new after adding BFD_IS_RELAXABLE
-
-Sat Jul 4 03:22:23 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Regen after adding BSF_FILE.
-
-Mon Jun 29 14:18:36 1992 Fred Fish (fnf at sunfish)
-
- * obstack.h: Convert bcopy() use to memcpy(), which is more
- portable, more standard, and can take advantage of gcc's builtin
- functions for increased performance.
-
-Thu Jun 25 04:46:08 1992 John Gilmore (gnu at cygnus.com)
-
- * ansidecl.h (PARAMS): Incorporate this macro from gdb's defs.h.
- It's a cleaner way to forward-declare function prototypes.
-
-Fri Jun 19 15:46:32 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h: HPPA merge.
-
-Tue Jun 16 21:30:56 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: gratuitous white space changes merged from other prep
- releases.
-
-Thu Jun 11 01:10:55 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Regen'd from bfd.c after removing elf_core_tdata_struct.
-
-Mon May 18 17:29:03 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: merged changes from make-3.62.11.
-
- * getopt.h: merged changes from grep-1.6 (alpha).
-
-Fri May 8 14:53:32 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: merged changes from bison-1.18.
-
-Sat Mar 14 17:25:20 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Add "area_id" and "flags" members to obstack
- structure. Add obstack_chunkfun() and obstack_freefun() to
- set functions explicitly. Convert maybe_empty_object to
- a bit in "flags".
-
-Thu Feb 27 22:01:02 1992 Per Bothner (bothner@cygnus.com)
-
- * wait.h (WIFSTOPPED): Add IBM rs6000-specific version.
-
-Fri Feb 21 20:49:20 1992 John Gilmore (gnu at cygnus.com)
-
- * obstack.h: Add obstack_full_begin.
- * bfd.h, obstack.h: Protolint.
-
-Thu Jan 30 01:18:42 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Remove comma from enum declaration.
-
-Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com)
-
- * bfd.h : new target entr, bfd_relax_section
-
-Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h, ieee.h, opcode/m68k.h, opcode/sparc.h: ANSIfy enums.
-
-Thu Dec 12 20:59:56 1991 John Gilmore (gnu at cygnus.com)
-
- * fopen-same.h, fopen-bin.h: New files for configuring
- whether fopen distinguishes binary files or not. For use
- by host-dependent config files.
-
-Sat Nov 30 20:46:43 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * bfd.h: change the documentation format.
-
- * created coff, elf and opcode and aout directories. Moved:
-
- aout64.h ==> aout/aout64.h
- ar.h ==> aout/ar.h
- a.out.encap.h ==> aout/encap.h
- a.out.host.h ==> aout/host.h
- a.out.hp.h ==> aout/hp.h
- a.out.sun4.h ==> aout/sun4.h
- ranlib.h ==> aout/ranlib.h
- reloc.h ==> aout/reloc.h
- stab.def ==> aout/stab.def
- stab.gnu.h ==> aout/stab_gnu.h
-
- coff-a29k.h ==> coff/a29k.h
- coff-h8300.h ==> coff/h8300.h
- coff-i386.h ==> coff/i386.h
- coff-i960.h ==> coff/i960.h
- internalcoff.h ==> coff/internal.h
- coff-m68k.h ==> coff/m68k.h
- coff-m88k.h ==> coff/m88k.h
- coff-mips.h ==> coff/mips.h
- coff-rs6000.h ==> coff/rs6000.h
-
- elf-common.h ==> elf/common.h
- dwarf.h ==> elf/dwarf.h
- elf-external.h ==> elf/external.h
- elf-internal.h ==> elf/internal.h
-
- a29k-opcode.h ==> opcode/a29k.h
- arm-opcode.h ==> opcode/arm.h
- h8300-opcode.h ==> opcode/h8300.h
- i386-opcode.h ==> opcode/i386.h
- i860-opcode.h ==> opcode/i860.h
- i960-opcode.h ==> opcode/i960.h
- m68k-opcode.h ==> opcode/m68k.h
- m88k-opcode.h ==> opcode/m88k.h
- mips-opcode.h ==> opcode/mips.h
- np1-opcode.h ==> opcode/np1.h
- ns32k-opcode.h ==> opcode/ns32k.h
- pn-opcode.h ==> opcode/pn.h
- pyr-opcode.h ==> opcode/pyr.h
- sparc-opcode.h ==> opcode/sparc.h
- tahoe-opcode.h ==> opcode/tahoe.h
- vax-opcode.h ==> opcode/vax.h
-
-
-
-Wed Nov 27 10:38:31 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * internalcoff.h: (internal_scnhdr) took out #def dependency, now
- s_nreloc and s_nlnno are always long.
- (internal_reloc): Always has an offset field now.
-
-Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com)
-
- * coff-rs6000.h: Lint; use unsigned chars for external fields.
- * internalcoff.h: Lint; cast storage classes to signed char.
-
-Thu Nov 21 21:01:05 1991 Per Bothner (bothner at cygnus.com)
-
- * stab.def: Remove the GNU extended type codes (e.g. N_SETT).
- * aout64.h: The heuristic for distinguishing between
- sunos-style and bsd-style ZMAGIC files (wrt. where the
- text segment starts) is moved into (the default definition of)
- the macro N_HEADER_IN_TEXT. This definition is only used
- if no other definition is used - e.g. bfd/newsos3.c defines
- N_HEADER_IN_TEXT(x) to be always 0 (as before).
-
-Thu Nov 21 11:53:03 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h (N_TXTADDR, N_TXTOFF, N_TXTSIZE): New definitions
- that should handle all uses. LOGICAL_ versions deleted.
- Eliminate N_HEADER_IN_TEXT, using a_entry to determine which
- kind of zmagic a.out file we are looking at.
- * coff-rs6000.h: Typo.
+ * md5.h: Remove definition and uses of __P.
+ * dyn-string.h: Remove uses of PARAMS.
+ * fibheap.h: Likewise.
+ * floatformat.h: Likewise.
+ * hashtab.h: Likewise.
-Tue Nov 19 18:43:37 1991 Per Bothner (bothner at cygnus.com)
+2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
- (Note: This is a revised entry, as was aout64.h.)
- * aout64.h: Some cleanups of N_TXTADDR and N_TXTOFF:
- Will now work for both old- and new-style ZMAGIC files,
- depending on N_HEADER_IN_TEXT macro.
- Add LOGICAL_TXTADDR, LOICAL_TXTOFF and LOGICAL_TXTSIZE
- that don't count the exec header as part
- of the text segment, to be consistent with bfd.
- * a.out.sun4.h: Simplified/fixed for previous change.
+ * demangle.h: Remove uses of PARAMS.
-Mon Nov 18 00:02:06 1991 Fred Fish (fnf at cygnus.com)
+ * libiberty.h (ANSI_PROTOTYPES): Remove guard since
+ ANSI_PROTOTYPES is always assumed.
+ Remove uses of PARAMS throughout.
- * dwarf.h: Update to DWARF draft 5 version from gcc2.
+2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Thu Nov 14 19:44:59 1991 Per Bothner (bothner at cygnus.com)
+ * libiberty.h (xstrndup): Declare.
- * stab.def: Added defs for extended GNU symbol types,
- such as N_SETT. These are normally ifdef'd out (because
- of conflicts with a.out.gnu.h), but are used by bfb_stab_name().
+2005-03-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Thu Nov 14 19:17:03 1991 Fred Fish (fnf at cygnus.com)
+ * libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC.
- * elf-common.h: Add defines to support ELF symbol table code.
+2005-03-22 Bob Wilson <bob.wilson@acm.org>
-Mon Nov 11 19:01:06 1991 Fred Fish (fnf at cygnus.com)
+ * xtensa-isa.h: Update a comment and whitespace.
- * elf-internal.h, elf-external.h, elf-common.h: Add support for
- note sections, which are used in ELF core files to hold copies
- of various /proc structures.
+2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
-Thu Nov 7 08:58:26 1991 Steve Chamberlain (sac at cygnus.com)
+ * bfdlink.h (bfd_link_info): Add gc_sections.
- * internalcoff.h: took out the M88 dependency in the lineno
- struct.
- * coff-m88k.h: defines GET_LINENO_LNNO and PUT_LINENO_LNNO to use
- 32bit linno entries.
- * a29k-opcode.h: fixed encoding of mtacc
+2005-03-09 Mark Mitchell <mark@codesourcery.com>
-Sun Nov 3 11:54:22 1991 Per Bothner (bothner at cygnus.com)
+ * libiberty.h (gettimeofday): Declare.
- * bfd.h: Updated from ../bfd/bfd-in.h (q.v).
+2005-03-01 Jan Beulich <jbeulich@novell.com>
-Fri Nov 1 11:13:53 1991 John Gilmore (gnu at cygnus.com)
+ * libiberty.h: Declare unlink_if_ordinary.
- * internalcoff.h: Add x_csect defines.
+2005-02-21 Alan Modra <amodra@bigpond.net.au>
-Fri Oct 25 03:18:20 1991 John Gilmore (gnu at cygnus.com)
+ * xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix.
+ * xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise.
+ (xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise.
- * Rename COFF-related files in `coff-ARCH.h' form.
- coff-a29k.h, coff-i386.h, coff-i960.h, coff-m68k.h, coff-m88k.h,
- coff-mips.h, coff-rs6000.h to be exact.
+2005-02-14 Paolo Bonzini <bonzini@gnu.org>
-Thu Oct 24 22:11:11 1991 John Gilmore (gnu at cygnus.com)
+ PR bootstrap/19818
+ * ansidecl.h (PARAMS): Guard from redefinition.
- RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and
- John Gilmore.
+2005-02-03 Alan Modra <amodra@bigpond.net.au>
- * a.out.gnu.h: Update slightly.
- * bfd.h: Add new error code, fix doc, add bfd_arch_rs6000.
- * internalcoff.h: Add more F_ codes for filehdr. Add
- rs/6000-dependent fields to aouthdr. Add storage classes
- to syments. Add 6000-specific auxent. Add r_size in reloc.
- * rs6000coff.c: New file.
+ * bfdlink.h (struct bfd_link_hash_entry): Add u.undef.weak.
-Thu Oct 24 04:13:20 1991 Fred Fish (fnf at cygnus.com)
+2005-02-01 Alan Modra <amodra@bigpond.net.au>
- * dwarf.h: New file for dwarf support. Copied from gcc2
- distribution.
+ * bfdlink.h (bfd_link_repair_undef_list): Declare.
-Wed Oct 16 13:31:45 1991 John Gilmore (gnu at cygnus.com)
+2005-01-10 Andreas Schwab <schwab@suse.de>
- * aout64.h: Remove PAGE_SIZE defines; they are target-dependent.
- Add N_FN_SEQ for N_FN symbol type used on Sequent machines.
- * stab.def: Include N_FN_SEQ in table.
- * bout.h: External formats of structures use unsigned chars.
+ * dis-asm.h (struct disassemble_info): Add skip_zeroes and
+ skip_zeroes_at_end.
-Fri Oct 11 12:40:43 1991 Steve Chamberlain (steve at cygnus.com)
+2004-12-11 Ben Elliston <bje@au.ibm.com>
- * bfd.h:upgrade from bfd.c
- * internalcoff.h: add n_name, n_zeroes and n_offset macros
- * amdcoff.h: Define OMAGIC and AOUTHDRSZ.
+ * fibheap.h (struct fibnode): Only use unsigned long bitfields
+ when __GNUC__ is defined and ints are less than 32-bits wide.
-Fri Oct 11 10:58:06 1991 Per Bothner (bothner at cygnus.com)
+2004-11-04 Paul Brook <paul@codesourcery.com>
+
+ * bfdlink.h (bfd_link_info): Add default_imported_symver.
+
+2004-11-12 Bob Wilson <bob.wilson@acm.org>
+
+ * xtensa-isa-internal.h (xtensa_interface_internal): Add class_id.
+ * xtensa-isa.h (xtensa_interface_class_id): New prototype.
+
+2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
+ Vineet Sharma <vineets@noida.hcltech.com>
+
+ * dis-asm.h: Add prototype for print_insn_maxq_little.
+
+2004-10-26 Paul Brook <paul@codesourcery.com>
+
+ * bfdlink.h (struct bfd_link_info): Add create_default_symver.
+
+2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 463
+ * bfdlink.h (bfd_link_callbacks): Add a pointer to struct
+ bfd_link_hash_entry to reloc_overflow.
+
+2004-10-07 Bob Wilson <bob.wilson@acm.org>
+
+ * xtensa-config.h (XSHAL_USE_ABSOLUTE_LITERALS,
+ XCHAL_HAVE_PREDICTED_BRANCHES, XCHAL_INST_FETCH_WIDTH): New.
+ (XCHAL_EXTRA_SA_SIZE, XCHAL_EXTRA_SA_ALIGN): Delete.
+
+ * xtensa-isa-internal.h (ISA_INTERFACE_VERSION): Delete.
+ (config_sturct struct): Delete.
+ (XTENSA_OPERAND_IS_REGISTER, XTENSA_OPERAND_IS_PCRELATIVE,
+ XTENSA_OPERAND_IS_INVISIBLE, XTENSA_OPERAND_IS_UNKNOWN,
+ XTENSA_OPCODE_IS_BRANCH, XTENSA_OPCODE_IS_JUMP,
+ XTENSA_OPCODE_IS_LOOP, XTENSA_OPCODE_IS_CALL,
+ XTENSA_STATE_IS_EXPORTED, XTENSA_INTERFACE_HAS_SIDE_EFFECT): Define.
+ (xtensa_format_encode_fn, xtensa_get_slot_fn, xtensa_set_slot_fn): New.
+ (xtensa_insn_decode_fn): Rename to ...
+ (xtensa_opcode_decode_fn): ... this.
+ (xtensa_immed_decode_fn, xtensa_immed_encode_fn, xtensa_do_reloc_fn,
+ xtensa_undo_reloc_fn): Update.
+ (xtensa_encoding_template_fn): Delete.
+ (xtensa_opcode_encode_fn, xtensa_format_decode_fn,
+ xtensa_length_decode_fn): New.
+ (xtensa_format_internal, xtensa_slot_internal): New types.
+ (xtensa_operand_internal): Delete operand_kind, inout, isPCRelative,
+ get_field, and set_field fields. Add name, field_id, regfile,
+ num_regs, and flags fields.
+ (xtensa_arg_internal): New type.
+ (xtensa_iclass_internal): Change operands field to array of
+ xtensa_arg_internal. Add num_stateOperands, stateOperands,
+ num_interfaceOperands, and interfaceOperands fields.
+ (xtensa_opcode_internal): Delete length, template, and iclass fields.
+ Add iclass_id, flags, encode_fns, num_funcUnit_uses, and funcUnit_uses.
+ (opname_lookup_entry): Delete.
+ (xtensa_regfile_internal, xtensa_interface_internal,
+ xtensa_funcUnit_internal, xtensa_state_internal,
+ xtensa_sysreg_internal, xtensa_lookup_entry): New.
+ (xtensa_isa_internal): Replace opcode_table field with opcodes field.
+ Change type of opname_lookup_table. Delete num_modules,
+ module_opcode_base, module_decode_fn, config, and has_density fields.
+ Add num_formats, formats, format_decode_fn, length_decode_fn,
+ num_slots, slots, num_fields, num_operands, operands, num_iclasses,
+ iclasses, num_regfiles, regfiles, num_states, states,
+ state_lookup_table, num_sysregs, sysregs, sysreg_lookup_table,
+ max_sysreg_num, sysreg_table, num_interfaces, interfaces,
+ interface_lookup_table, num_funcUnits, funcUnits and
+ funcUnit_lookup_table fields.
+ (xtensa_isa_module, xtensa_isa_modules): Delete.
+ (xtensa_isa_name_compare): New prototype.
+ (xtisa_errno, xtisa_error_msg): New.
+ * xtensa-isa.h (XTENSA_ISA_VERSION): Define.
+ (xtensa_isa): Change type.
+ (xtensa_operand): Delete.
+ (xtensa_format, xtensa_regfile, xtensa_state, xtensa_sysreg,
+ xtensa_interface, xtensa_funcUnit, xtensa_isa_status,
+ xtensa_funcUnit_use): New types.
+ (libisa_module_specifier): Delete.
+ (xtensa_isa_errno, xtensa_isa_error_msg): New prototypes.
+ (xtensa_insnbuf_free, xtensa_insnbuf_to_chars,
+ xtensa_insnbuf_from_chars): Update prototypes.
+ (xtensa_load_isa, xtensa_extend_isa, xtensa_default_isa,
+ xtensa_insn_maxlength, xtensa_num_opcodes, xtensa_decode_insn,
+ xtensa_encode_insn, xtensa_insn_length,
+ xtensa_insn_length_from_first_byte, xtensa_num_operands,
+ xtensa_operand_kind, xtensa_encode_result,
+ xtensa_operand_isPCRelative): Delete.
+ (xtensa_isa_init, xtensa_operand_inout, xtensa_operand_get_field,
+ xtensa_operand_set_field, xtensa_operand_encode,
+ xtensa_operand_decode, xtensa_operand_do_reloc,
+ xtensa_operand_undo_reloc): Update prototypes.
+ (xtensa_isa_maxlength, xtensa_isa_length_from_chars,
+ xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
+ xtensa_isa_num_opcodes, xtensa_isa_num_regfiles, xtensa_isa_num_states,
+ xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
+ xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
+ xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
+ xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
+ xtensa_format_get_slot, xtensa_format_set_slot, xtensa_opcode_decode,
+ xtensa_opcode_encode, xtensa_opcode_is_branch, xtensa_opcode_is_jump,
+ xtensa_opcode_is_loop, xtensa_opcode_is_call,
+ xtensa_opcode_num_operands, xtensa_opcode_num_stateOperands,
+ xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
+ xtensa_opcode_funcUnit_use, xtensa_operand_name,
+ xtensa_operand_is_visible, xtensa_operand_is_register,
+ xtensa_operand_regfile, xtensa_operand_num_regs,
+ xtensa_operand_is_known_reg, xtensa_operand_is_PCrelative,
+ xtensa_stateOperand_state, xtensa_stateOperand_inout,
+ xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
+ xtensa_regfile_lookup_shortname, xtensa_regfile_name,
+ xtensa_regfile_shortname, xtensa_regfile_view_parent,
+ xtensa_regfile_num_bits, xtensa_regfile_num_entries,
+ xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
+ xtensa_state_is_exported, xtensa_sysreg_lookup,
+ xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
+ xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
+ xtensa_interface_num_bits, xtensa_interface_inout,
+ xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
+ xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New prototypes.
+2004-10-07 Jeff Baker <jbaker@qnx.com>
+
+ * bfdlink.h (bfd_link_info): Add bitfield: warn_shared_textrel.
+
+2004-09-17 Alan Modra <amodra@bigpond.net.au>
+
+ * bfdlink.h (struct bfd_link_hash_entry): Move und_next into elements
+ of union.
+
+2004-09-13 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
+
+ * libiberty.h (basename): Prototype for __MINGW32__.
+
+2004-09-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h (ATTRIBUTE_SENTINEL): Define.
+ * libiberty.h (concat, reconcat, concat_length, concat_copy,
+ concat_copy2): Use ATTRIBUTE_SENTINEL.
+
+2004-08-13 Alan Modra <amodra@bigpond.net.au>
+
+ * bfdlink.h (struct bfd_link_callbacks): Remove "error_handler".
+ (LD_DEFINITION_IN_DISCARDED_SECTION): Delete.
+
+2004-08-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
+ const-qualification before disposal.
+
+2004-07-24 Bernardo Innocenti <bernie@develer.com>
+
+ * ansidecl.h (ARG_UNUSED): New Macro.
+
+2004-07-23 H.J. Lu <hongjiu.lu@intel.com>
- * a.out.host.h: Change SEGMENT_SIZE to 0x1000 for Sony.
- * bfd.h (align_power): Add (actually move) comment.
+ * bin-bugs.h (REPORT_BUGS_TO): Set to
+ "<URL:http://www.sourceware.org/bugzilla/>".
-Tue Oct 8 15:29:32 1991 Per Bothner (bothner at cygnus.com)
+2004-07-21 Paolo Bonzini <bonzini@gnu.org>
- * sys/h-rtbsd.h: Define MISSING_VFPRINT (for binutils/bucomm.c).
+ * ansidecl.h (ATTRIBUTE_PURE): New.
-Sun Oct 6 19:24:39 1991 John Gilmore (gnu at cygnus.com)
+2004-07-13 Bernardo Innocenti <bernie@develer.com>
- * aout64.h: Move struct internal_exec to ../bfd/libaout.h so
- it can be shared by all `a.out-family' code. Rename
- EXTERNAL_LIST_SIZE to EXTERNAL_NLIST_SIZE. Use basic types
- for nlist members, and make strx integral rather than pointer.
- More commentary on n_type values.
- * bout.h: Provide a struct external_exec rather than an
- internal_exec.
- * m68kcoff.h: Remove `tagentries' which snuck in from the i960
- COFF port.
+ * libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
+ libcpp/internal.h.
+ (XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
+ macros.
-Fri Oct 4 01:25:59 1991 John Gilmore (gnu at cygnus.com)
+2004-07-13 Bernardo Innocenti <bernie@develer.com>
- * h8300-opcode.h: Remove `_enum' from the typedef for an enum.
- * bfd.h: Update to match bfd changes.
+ * libiberty.h (ASTRDUP): Add casts required for stricter
+ type conversion rules of C++.
+ * obstack.h (obstack_free): Likewise.
- * sys/h-i386mach.h, sysdep.h: Add 386 Mach host support.
+2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
-Tue Oct 1 04:58:42 1991 John Gilmore (gnu at cygnus.com)
+ * dis-asm.h (print_insn_crx): Declare.
- * bfd.h, elf-common.h, elf-external.h, elf-internal.h:
- Add preliminary ELF support, sufficient for GDB, from Fred Fish.
- * sysdep.h, sys/h-amix.h: Support Amiga SVR4.
+2004-06-24 Alan Modra <amodra@bigpond.net.au>
- * sys/h-vaxult.h: Make it work. (David Taylor <taylor@think.com>)
- * a.out.vax.h: Remove unused and confusing file.
+ * bfdlink.h (struct bfd_link_order): Update comment.
-Mon Sep 30 12:52:35 1991 Per Bothner (bothner at cygnus.com)
+2004-05-11 Jakub Jelinek <jakub@redhat.com>
- * sysdep.h: Define NEWSOS3_SYS, and use it.
+ * bfdlink.h (struct bfd_link_info): Add relro, relro_start and
+ relro_end fields.
-Fri Sep 20 13:38:21 1991 John Gilmore (gnu at cygnus.com)
+2004-05-04 Andreas Jaeger <aj@suse.de>
- * a.out.gnu.h (N_FN): Its value *really is* 0x1F.
- Fix it, and add comments warning about or-ing N_EXT with it
- and/or N_WARNING.
- * aout64.h (N_FN): Fix value, add comments about N_EXT.
- * stab.def (table at end): Update to show all the type
- values <0x20, including low order bits. Move N_FN to
- its rightful place.
+ * demangle.h: Do not use C++ reserved keyword typename as
+ parameter for cplus_demangle_fill_builtin_type.
-Tue Sep 17 17:41:37 1991 Stu Grossman (grossman at cygnus.com)
+2004-04-22 Richard Henderson <rth@redhat.com>
- * sys/h-irix3.h: sgi/irix support.
+ * hashtab.h (struct htab): Add size_prime_index.
-Tue Sep 17 07:52:59 1991 John Gilmore (gnu at cygint.cygnus.com)
+2004-04-13 Jeff Law <law@redhat.com>
- * stab.def (N_DEFD): Add GNU Modula-2 debug stab, from Andrew
- Beers.
+ * hashtab.h (htab_remove_elt_with_hash): Prototype new function.
-Thu Sep 12 14:12:59 1991 John Gilmore (gnu at cygint.cygnus.com)
+2004-03-30 Zack Weinberg <zack@codesourcery.com>
- * internalcoff.h (SYMNMLEN, FILNMLEN, DIMNUM): Define these
- for internalcoff, separately from the various external coff's.
- * amdcoff.h, bcs88kcoff.h, i386coff.h, intel-coff.h, m68kcoff.h,
- m88k-bcs.h: Prefix SYMNMLEN, FILNMLEN, and DIMNUM with E_'s for
- the external struct definitions.
- * ecoff.h: Remove these #define's, kludge no longer needed.
+ * hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
- * sys/h-ultra3.h: Add new Ultracomputer host.
- * sysdep.h: Add ULTRA3_SYM1_SYS and use it.
+2004-03-25 Stan Shebs <shebs@apple.com>
-Tue Sep 10 10:11:46 1991 John Gilmore (gnu at cygint.cygnus.com)
+ * mpw/: Remove subdirectory and everything in it.
- * i386coff.h (LINESZ): Always 6, not based on sizeof().
- (Fix from Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.)
+2004-03-23 Alan Modra <amodra@bigpond.net.au>
-Wed Sep 4 08:58:37 1991 John Gilmore (gnu at cygint.cygnus.com)
+ PR 51.
+ * bfdlink.h (struct bfd_link_info): Add wrap_char.
- * a.out.gnu.h, aout64.h: Add N_WARNING. Change N_FN to 0x0E,
- to match SunOS and BSD. Add N_COMM as 0x12 for SunOS shared lib
- support.
- * stab.def: Add N_COMM to table, fix overlap comment.
+2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
-Tue Sep 3 06:29:20 1991 John Gilmore (gnu at cygint.cygnus.com)
+ * bfdlink.h (bfd_link_info): Correct comments for the
+ unresolved_syms_in_objects field.
- Merge with latest FSF versions of these files.
+2004-02-24 Ian Lance Taylor <ian@wasabisystems.com>
- * stab.gnu.h: Add LAST_UNUSED_STAB_CODE.
- * stab.def: Update to GPL2. Move N_WARNING out, since not a
- debug symbol. Change comments, and reorder table to numeric
- order. Update final table comment.
- (N_DSLINE, N_BSLINE): Renumber from 0x66 and 0x68, to 0x46 and 0x48.
+ * dyn-string.h: Update copyright date.
- * obstack.h: GPL2. Merge.
+2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
-Fri Aug 23 01:54:23 1991 John Gilmore (gnu at cygint.cygnus.com)
+ * dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
+ the associated #defines.
- * a.out.gnu.h, a.out.sun4.h: Make SEGMENT_SIZE able to depend
- on the particular a.out being examined.
- * a.out.sun4.h: Define segment sizes for Sun-3's and Sun-4's.
- * FIXME: a.out.gnu.h is almost obsolete.
- * FIXME: a.out.sun4.h should be renamed a.out.sun.h now.
+2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
-Wed Aug 21 20:32:13 1991 John Gilmore (gnu at cygint.cygnus.com)
+ * demangle.h: Instead of checking ANSI_PROTOTYPES, just include
+ "libiberty.h".
- * Start a ChangeLog for the includes directory.
+ * demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.
- * a.out.gnu.h (N_FN): Fix value -- was 15, should be 0x1E.
- * stab.def: Update allocation table in comments at end,
- to reflect reality as I know it.
+ * demangle.h (enum demangle_component_type): Define.
+ (struct demangle_operator_info): Declare.
+ (struct demangle_builtin_type_info): Declare.
+ (struct demangle_component): Define.
+ (cplus_demangle_fill_component): Declare.
+ (cplus_demangle_fill_name): Declare.
+ (cplus_demangle_fill_builtin_type): Declare.
+ (cplus_demangle_fill_operator): Declare.
+ (cplus_demangle_fill_extended_operator): Declare.
+ (cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
+ (cplus_demangle_v3_components): Declare.
+ (cplus_demangle_print): Declare.
+For older changes see ChangeLog-9103
Local Variables:
mode: change-log
diff --git a/contrib/binutils/include/ansidecl.h b/contrib/binutils/include/ansidecl.h
index d2c87768ce2e..a1a765d63f32 100644
--- a/contrib/binutils/include/ansidecl.h
+++ b/contrib/binutils/include/ansidecl.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* ANSI and traditional C compatibility macros
@@ -149,7 +149,12 @@ So instead we use the macro below and test it against specific values. */
#define PTRCONST void *const
#define LONG_DOUBLE long double
+/* PARAMS is often defined elsewhere (e.g. by libintl.h), so wrap it in
+ a #ifndef. */
+#ifndef PARAMS
#define PARAMS(ARGS) ARGS
+#endif
+
#define VPARAMS(ARGS) ARGS
#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR)
@@ -253,17 +258,25 @@ So instead we use the macro below and test it against specific values. */
/* Attributes on labels were valid as of gcc 2.93. */
#ifndef ATTRIBUTE_UNUSED_LABEL
-# if (GCC_VERSION >= 2093)
+# if (!defined (__cplusplus) && GCC_VERSION >= 2093)
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
# else
# define ATTRIBUTE_UNUSED_LABEL
-# endif /* GNUC >= 2.93 */
+# endif /* !__cplusplus && GNUC >= 2.93 */
#endif /* ATTRIBUTE_UNUSED_LABEL */
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif /* ATTRIBUTE_UNUSED */
+/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the
+ identifier name. */
+#if ! defined(__cplusplus) || (GCC_VERSION >= 3004)
+# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED
+#else /* !__cplusplus || GNUC >= 3.4 */
+# define ARG_UNUSED(NAME) NAME
+#endif /* !__cplusplus || GNUC >= 3.4 */
+
#ifndef ATTRIBUTE_NORETURN
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
#endif /* ATTRIBUTE_NORETURN */
@@ -277,6 +290,15 @@ So instead we use the macro below and test it against specific values. */
# endif /* GNUC >= 3.3 */
#endif /* ATTRIBUTE_NONNULL */
+/* Attribute `pure' was valid as of gcc 3.0. */
+#ifndef ATTRIBUTE_PURE
+# if (GCC_VERSION >= 3000)
+# define ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define ATTRIBUTE_PURE
+# endif /* GNUC >= 3.0 */
+#endif /* ATTRIBUTE_PURE */
+
/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
This was the case for the `printf' format attribute by itself
before GCC 3.3, but as of 3.3 we need to add the `nonnull'
@@ -290,6 +312,22 @@ So instead we use the macro below and test it against specific values. */
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
#endif /* ATTRIBUTE_PRINTF */
+/* Use ATTRIBUTE_FPTR_PRINTF when the format attribute is to be set on
+ a function pointer. Format attributes were allowed on function
+ pointers as of gcc 3.1. */
+#ifndef ATTRIBUTE_FPTR_PRINTF
+# if (GCC_VERSION >= 3001)
+# define ATTRIBUTE_FPTR_PRINTF(m, n) ATTRIBUTE_PRINTF(m, n)
+# else
+# define ATTRIBUTE_FPTR_PRINTF(m, n)
+# endif /* GNUC >= 3.1 */
+# define ATTRIBUTE_FPTR_PRINTF_1 ATTRIBUTE_FPTR_PRINTF(1, 2)
+# define ATTRIBUTE_FPTR_PRINTF_2 ATTRIBUTE_FPTR_PRINTF(2, 3)
+# define ATTRIBUTE_FPTR_PRINTF_3 ATTRIBUTE_FPTR_PRINTF(3, 4)
+# define ATTRIBUTE_FPTR_PRINTF_4 ATTRIBUTE_FPTR_PRINTF(4, 5)
+# define ATTRIBUTE_FPTR_PRINTF_5 ATTRIBUTE_FPTR_PRINTF(5, 6)
+#endif /* ATTRIBUTE_FPTR_PRINTF */
+
/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A
NULL format specifier was allowed as of gcc 3.3. */
#ifndef ATTRIBUTE_NULL_PRINTF
@@ -305,6 +343,24 @@ So instead we use the macro below and test it against specific values. */
# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
#endif /* ATTRIBUTE_NULL_PRINTF */
+/* Attribute `sentinel' was valid as of gcc 3.5. */
+#ifndef ATTRIBUTE_SENTINEL
+# if (GCC_VERSION >= 3005)
+# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
+# else
+# define ATTRIBUTE_SENTINEL
+# endif /* GNUC >= 3.5 */
+#endif /* ATTRIBUTE_SENTINEL */
+
+
+#ifndef ATTRIBUTE_ALIGNED_ALIGNOF
+# if (GCC_VERSION >= 3000)
+# define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m))))
+# else
+# define ATTRIBUTE_ALIGNED_ALIGNOF(m)
+# endif /* GNUC >= 3.0 */
+#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
+
/* 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/aout/ChangeLog b/contrib/binutils/include/aout/ChangeLog
index 148a020e5cbc..e00c698c3cc0 100644
--- a/contrib/binutils/include/aout/ChangeLog
+++ b/contrib/binutils/include/aout/ChangeLog
@@ -1,3 +1,10 @@
+2005-05-10 Nick Clifton <nickc@redhat.com>
+
+ * Update the address and phone number of the FSF organization in
+ the GPL notices in the following files:
+ adobe.h, aout64.h, ar.h, dynix3.h, encap.h, host.h, hp.h,
+ ranlib.h, reloc.h, stab.def, stab_gnu.h, sun4.h
+
2004-01-06 Mark Kettenis <kettenis@gnu.org>
* stab.def: Add N_PATCH to DO definition.
diff --git a/contrib/binutils/include/aout/aout64.h b/contrib/binutils/include/aout/aout64.h
index 4843410d276b..2e289b3925de 100644
--- a/contrib/binutils/include/aout/aout64.h
+++ b/contrib/binutils/include/aout/aout64.h
@@ -1,6 +1,6 @@
/* `a.out' object-file definitions, including extensions to 64-bit fields
- Copyright 2001, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2003 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
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef __A_OUT_64_H__
#define __A_OUT_64_H__
diff --git a/contrib/binutils/include/aout/ar.h b/contrib/binutils/include/aout/ar.h
index 15d534c578b5..0d0aad2d5e3d 100644
--- a/contrib/binutils/include/aout/ar.h
+++ b/contrib/binutils/include/aout/ar.h
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* So far this is correct for BSDish archives. Don't forget that
files must begin on an even byte boundary. */
diff --git a/contrib/binutils/include/aout/encap.h b/contrib/binutils/include/aout/encap.h
index 1381557d85e3..be8e88ccd6b8 100644
--- a/contrib/binutils/include/aout/encap.h
+++ b/contrib/binutils/include/aout/encap.h
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
* We only use the coff headers to tell the kernel
@@ -85,7 +85,6 @@ struct coffheader
#define COFF_MAGIC_I386 0514 /* I386MAGIC */
#define COFF_MAGIC_M68K 0520 /* MC68MAGIC */
-#define COFF_MAGIC_A29K 0x17A /* Used by asm29k cross-tools */
#ifdef COFF_MAGIC
short __header_offset_temp;
diff --git a/contrib/binutils/include/aout/host.h b/contrib/binutils/include/aout/host.h
index 442981ac9f10..8807108d5cbf 100644
--- a/contrib/binutils/include/aout/host.h
+++ b/contrib/binutils/include/aout/host.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Address of data segment in memory after it is loaded.
It is up to you to define SEGMENT_SIZE on machines not listed here. */
diff --git a/contrib/binutils/include/aout/ranlib.h b/contrib/binutils/include/aout/ranlib.h
index e4603edf66af..8695b0502dff 100644
--- a/contrib/binutils/include/aout/ranlib.h
+++ b/contrib/binutils/include/aout/ranlib.h
@@ -13,7 +13,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* The Symdef member of an archive contains two things:
a table that maps symbol-string offsets to file offsets,
diff --git a/contrib/binutils/include/aout/reloc.h b/contrib/binutils/include/aout/reloc.h
index eca3f59b221f..c4ce1c406ad4 100644
--- a/contrib/binutils/include/aout/reloc.h
+++ b/contrib/binutils/include/aout/reloc.h
@@ -13,7 +13,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Relocation types for a.out files using reloc_info_extended
(SPARC and AMD 29000). */
diff --git a/contrib/binutils/include/aout/stab.def b/contrib/binutils/include/aout/stab.def
index 8188b845fc71..04ad1f109872 100644
--- a/contrib/binutils/include/aout/stab.def
+++ b/contrib/binutils/include/aout/stab.def
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* New stab from Solaris 2. This uses an n_type of 0, which in a.out files
overlaps the N_UNDF used for ordinary symbols. In ELF files, the
diff --git a/contrib/binutils/include/aout/stab_gnu.h b/contrib/binutils/include/aout/stab_gnu.h
index c62ac6ed4678..29dc99062e45 100644
--- a/contrib/binutils/include/aout/stab_gnu.h
+++ b/contrib/binutils/include/aout/stab_gnu.h
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef __GNU_STAB__
/* Indicate the GNU stab.h is in use. */
diff --git a/contrib/binutils/include/aout/sun4.h b/contrib/binutils/include/aout/sun4.h
index 623afc13131f..8cf05170483d 100644
--- a/contrib/binutils/include/aout/sun4.h
+++ b/contrib/binutils/include/aout/sun4.h
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Some systems, e.g., AIX, may have defined this in header files already
included. */
diff --git a/contrib/binutils/include/bfdlink.h b/contrib/binutils/include/bfdlink.h
index cc2043e10ed6..f4b7aa7cfa41 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, 2002, 2003,
- 2004 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005 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.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef BFDLINK_H
#define BFDLINK_H
@@ -85,26 +85,6 @@ struct bfd_link_hash_entry
/* Type of this entry. */
enum bfd_link_hash_type type;
- /* Undefined and common symbols are kept in a linked list through
- this field. This field is not in the union because that would
- force us to remove entries from the list when we changed their
- type, which would force the list to be doubly linked, which would
- waste more memory. When an undefined or common symbol is
- created, it should be added to this list, the head of which is in
- the link hash table itself. As symbols are defined, they need
- not be removed from the list; anything which reads the list must
- doublecheck the symbol type.
-
- Weak symbols are not kept on this list.
-
- Defined and defweak symbols use this field as a reference marker.
- If the field is not NULL, or this structure is the tail of the
- undefined symbol list, the symbol has been referenced. If the
- symbol is undefined and becomes defined, this field will
- automatically be non-NULL since the symbol will have been on the
- undefined symbol list. */
- struct bfd_link_hash_entry *und_next;
-
/* A union of information depending upon the type. */
union
{
@@ -112,23 +92,47 @@ struct bfd_link_hash_entry
/* bfd_link_hash_undefined, bfd_link_hash_undefweak. */
struct
{
+ /* Undefined and common symbols are kept in a linked list through
+ this field. This field is present in all of the union element
+ so that we don't need to remove entries from the list when we
+ change their type. Removing entries would either require the
+ list to be doubly linked, which would waste more memory, or
+ require a traversal. When an undefined or common symbol is
+ created, it should be added to this list, the head of which is in
+ the link hash table itself. As symbols are defined, they need
+ not be removed from the list; anything which reads the list must
+ doublecheck the symbol type.
+
+ Weak symbols are not kept on this list.
+
+ Defined and defweak symbols use this field as a reference marker.
+ If the field is not NULL, or this structure is the tail of the
+ undefined symbol list, the symbol has been referenced. If the
+ symbol is undefined and becomes defined, this field will
+ automatically be non-NULL since the symbol will have been on the
+ undefined symbol list. */
+ struct bfd_link_hash_entry *next;
bfd *abfd; /* BFD symbol was found in. */
+ bfd *weak; /* BFD weak symbol was found in. */
} undef;
/* bfd_link_hash_defined, bfd_link_hash_defweak. */
struct
{
- bfd_vma value; /* Symbol value. */
+ struct bfd_link_hash_entry *next;
asection *section; /* Symbol section. */
+ bfd_vma value; /* Symbol value. */
} def;
/* bfd_link_hash_indirect, bfd_link_hash_warning. */
struct
{
+ struct bfd_link_hash_entry *next;
struct bfd_link_hash_entry *link; /* Real symbol. */
const char *warning; /* Warning (bfd_link_hash_warning only). */
} i;
/* bfd_link_hash_common. */
struct
{
+ struct bfd_link_hash_entry *next;
/* The linker needs to know three things about common
symbols: the size, the alignment, and the section in
which the symbol should be placed. We store the size
@@ -138,12 +142,12 @@ struct bfd_link_hash_entry
directly because we don't want to increase the size of
the union; this structure is a major space user in the
linker. */
- bfd_size_type size; /* Common symbol size. */
struct bfd_link_hash_common_entry
{
unsigned int alignment_power; /* Alignment. */
asection *section; /* Symbol section. */
} *p;
+ bfd_size_type size; /* Common symbol size. */
} c;
} u;
};
@@ -194,6 +198,10 @@ extern void bfd_link_hash_traverse
extern void bfd_link_add_undef
(struct bfd_link_hash_table *, struct bfd_link_hash_entry *);
+/* Remove symbols from the undefs list that don't belong there. */
+extern void bfd_link_repair_undef_list
+ (struct bfd_link_hash_table *table);
+
struct bfd_sym_chain
{
struct bfd_sym_chain *next;
@@ -259,6 +267,14 @@ struct bfd_link_info
/* TRUE if ok to have version with no definition. */
unsigned int allow_undefined_version: 1;
+ /* TRUE if a default symbol version should be created and used for
+ exported symbols. */
+ unsigned int create_default_symver: 1;
+
+ /* TRUE if a default symbol version should be created and used for
+ imported symbols. */
+ unsigned int default_imported_symver: 1;
+
/* TRUE if symbols should be retained in memory, FALSE if they
should be freed and reread. */
unsigned int keep_memory: 1;
@@ -285,9 +301,6 @@ struct bfd_link_info
/* TRUE if global symbols in discarded sections should be stripped. */
unsigned int strip_discarded: 1;
- /* TRUE if the final relax pass is needed. */
- unsigned int need_relax_finalize: 1;
-
/* TRUE if generating a position independent executable. */
unsigned int pie: 1;
@@ -302,6 +315,15 @@ struct bfd_link_info
flags. */
unsigned int noexecstack: 1;
+ /* TRUE if PT_GNU_RELRO segment should be created. */
+ unsigned int relro: 1;
+
+ /* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */
+ unsigned int warn_shared_textrel: 1;
+
+ /* TRUE if unreferenced sections should be removed. */
+ unsigned int gc_sections: 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
@@ -373,6 +395,12 @@ struct bfd_link_info
unloaded. */
const char *fini_function;
+ /* Number of relaxation passes. Usually only one relaxation pass
+ is needed. But a backend can have as many relaxation passes as
+ necessary. During bfd_relax_section call, it is set to the
+ current pass, starting from 0. */
+ int relax_pass;
+
/* 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. */
@@ -391,14 +419,17 @@ struct bfd_link_info
/* May be used to set DT_FLAGS_1 for ELF. */
bfd_vma flags_1;
+
+ /* Start and end of RELRO region. */
+ bfd_vma relro_start, relro_end;
};
/* This structures holds a set of callback functions. These are
- called by the BFD linker routines. The first argument to each
- callback function is the bfd_link_info structure being used. Each
- function returns a boolean value. If the function returns FALSE,
- then the BFD function which called it will return with a failure
- indication. */
+ called by the BFD linker routines. Except for einfo, 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
+ return with a failure indication. */
struct bfd_link_callbacks
{
@@ -469,19 +500,20 @@ struct bfd_link_callbacks
bfd_boolean (*undefined_symbol)
(struct bfd_link_info *, const char *name, bfd *abfd,
asection *section, bfd_vma address, bfd_boolean fatal);
- /* A function which is called when a reloc overflow occurs. NAME is
- the name of the symbol or section the reloc is against,
- RELOC_NAME is the name of the relocation, and ADDEND is any
- addend that is used. ABFD, SECTION and ADDRESS identify the
+ /* A function which is called when a reloc overflow occurs. ENTRY is
+ the link hash table entry for the symbol the reloc is against.
+ NAME is the name of the local symbol or section the reloc is
+ against, RELOC_NAME is the name of the relocation, and ADDEND is
+ any addend that is used. ABFD, SECTION and ADDRESS identify the
location at which the overflow occurs; if this is the result of a
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
ABFD will be NULL. */
bfd_boolean (*reloc_overflow)
- (struct bfd_link_info *, const char *name, const char *reloc_name,
- bfd_vma addend, bfd *abfd, asection *section, bfd_vma address);
+ (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
+ const char *name, const char *reloc_name, bfd_vma addend,
+ bfd *abfd, asection *section, bfd_vma address);
/* A function which is called when a dangerous reloc is performed.
- The canonical example is an a29k IHCONST reloc which does not
- follow an IHIHALF reloc. MESSAGE is an appropriate message.
+ MESSAGE is an appropriate message.
ABFD, SECTION and ADDRESS identify the location at which the
problem occurred; if this is the result of a
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
@@ -505,14 +537,9 @@ struct bfd_link_callbacks
bfd_boolean (*notice)
(struct bfd_link_info *, const char *name,
bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called for reporting a linker error. ID is the
- error identifier. The remaining input is the same as einfo () in
- ld. */
- bfd_boolean (*error_handler)
- (int id, const char *fmt, ...);
-
-/* Identifiers of linker error messages used by error_handler. */
-#define LD_DEFINITION_IN_DISCARDED_SECTION 1
+ /* General link info message. */
+ void (*einfo)
+ (const char *fmt, ...);
};
/* The linker builds link_order structures which tell the code how to
@@ -530,7 +557,7 @@ enum bfd_link_order_type
};
/* This is the link_order structure itself. These form a chain
- attached to the section whose contents they are describing. */
+ attached to the output section whose contents they are describing. */
struct bfd_link_order
{
@@ -550,7 +577,7 @@ struct bfd_link_order
/* Section to include. If this is used, then
section->output_section must be the section the
link_order is attached to, section->output_offset must
- equal the link_order offset field, and section->_raw_size
+ equal the link_order offset field, and section->size
must equal the link_order size field. Maybe these
restrictions should be relaxed someday. */
asection *section;
diff --git a/contrib/binutils/include/bin-bugs.h b/contrib/binutils/include/bin-bugs.h
index 3c97715add4f..63901b044f46 100644
--- a/contrib/binutils/include/bin-bugs.h
+++ b/contrib/binutils/include/bin-bugs.h
@@ -1,3 +1,3 @@
#ifndef REPORT_BUGS_TO
-#define REPORT_BUGS_TO "bug-binutils@gnu.org"
+#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 33163834229e..f41c115bdadb 100644
--- a/contrib/binutils/include/coff/ChangeLog
+++ b/contrib/binutils/include/coff/ChangeLog
@@ -1,3 +1,64 @@
+2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
+
+ * internal.h: Add relocation number R_IMM24 for Z80.
+
+2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
+
+ * internal.h: Add relocation number for Z80
+ * z80.h: New file.
+
+2005-08-18 Alan Modra <amodra@bigpond.net.au>
+
+ * a29k.h: Delete.
+
+2005-07-14 Daniel Marques <marques@cs.cornell.edu>
+
+ * alpha.h (ALPHA_ECOFF_COMPRESSEDMAG): Define.
+ * ecoff.h (ALPHA_MAGIC_COMPRESSED): Define.
+
+2005-05-10 Nick Clifton <nickc@redhat.com>
+
+ * Update the address and phone number of the FSF organization in
+ the GPL notices in the following files:
+ a29k.h, alpha.h, apollo.h, arm.h, aux-coff.h, ecoff.h, external.h,
+ go32exe.h, h8300.h, h8500.h, i386.h, i860.h, i960.h, ia64.h,
+ internal.h, m68k.h, m88k.h, maxq.h, mcore.h, mips.h, mipspe.h,
+ or32.h, pe.h, powerpc.h, rs6k64.h, sh.h, sparc.h, ti.h, tic30.h,
+ tic4x.h, tic54x.h, tic80.h, w65.h, we32k.h, xcoff.h, z8k.h
+
+2005-02-21 Alan Modra <amodra@bigpond.net.au>
+
+ * xcoff.h (struct xcoff_loader_info): Warning fix.
+
+2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
+
+ * maxq.h (F_MAXQ10, F_MAXQ20): Define.
+
+2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
+ Vineet Sharma <vineets@noida.hcltech.com>
+
+ * maxq.h: New file: Defintions for the maxq port.
+
+2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
+
+ * pe.h (IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY): Define.
+ (IMAGE_WEAK_EXTERN_SEARCH_LIBRARY): Same.
+ (IMAGE_WEAK_EXTERN_SEARCH_ALIAS): Same.
+
+2004-08-13 Mark Kettenis <kettenis@gnu.org>
+
+ * symconst.h (langMax): Fix typo in comment.
+
+2004-04-23 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove
+ (MIPS_R_PCREL16): Update comment.
+ * ecoff.h (struct ecoff_value_adjust): Remove structure.
+ (struct ecoff_debug_info): Remove 'adjust' member.
+
+2004-04-20 DJ Delorie <dj@redhat.com>
+
+ * internal.h (R_SECREL32): Add.
For older changes see ChangeLog-9103
diff --git a/contrib/binutils/include/coff/alpha.h b/contrib/binutils/include/coff/alpha.h
index e5210a569970..7433938d5d16 100644
--- a/contrib/binutils/include/coff/alpha.h
+++ b/contrib/binutils/include/coff/alpha.h
@@ -1,7 +1,7 @@
/* ECOFF support on Alpha machines.
coff/ecoff.h must be included before this file.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 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
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/********************** FILE HEADER **********************/
@@ -34,6 +34,9 @@ struct external_filehdr
#define ALPHA_ECOFF_BADMAG(x) \
((x).f_magic != ALPHA_MAGIC && (x).f_magic != ALPHA_MAGIC_BSD)
+#define ALPHA_ECOFF_COMPRESSEDMAG(x) \
+ ((x).f_magic == ALPHA_MAGIC_COMPRESSED)
+
/* The object type is encoded in the f_flags. */
#define F_ALPHA_OBJECT_TYPE_MASK 0x3000
#define F_ALPHA_NO_SHARED 0x1000
diff --git a/contrib/binutils/include/coff/arm.h b/contrib/binutils/include/coff/arm.h
index 8b90228ca980..750f7f2fcca8 100644
--- a/contrib/binutils/include/coff/arm.h
+++ b/contrib/binutils/include/coff/arm.h
@@ -1,5 +1,5 @@
/* ARM COFF support for BFD.
- Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define COFFARM 1
diff --git a/contrib/binutils/include/coff/aux-coff.h b/contrib/binutils/include/coff/aux-coff.h
index f8536c9e7c86..5199f2c485a1 100644
--- a/contrib/binutils/include/coff/aux-coff.h
+++ b/contrib/binutils/include/coff/aux-coff.h
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Suggested by Ian Lance Taylor <ian@cygnus.com> */
diff --git a/contrib/binutils/include/coff/ecoff.h b/contrib/binutils/include/coff/ecoff.h
index 3a7aa4fbbb56..d4d3fa52d235 100644
--- a/contrib/binutils/include/coff/ecoff.h
+++ b/contrib/binutils/include/coff/ecoff.h
@@ -2,7 +2,7 @@
This does not include symbol information, found in sym.h and
symconst.h.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 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
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef ECOFF_H
#define ECOFF_H
@@ -41,6 +41,8 @@
/* Alpha magic numbers used in filehdr. */
#define ALPHA_MAGIC 0x183
#define ALPHA_MAGIC_BSD 0x185
+/* A compressed version of an ALPHA_MAGIC file created by DEC's tools. */
+#define ALPHA_MAGIC_COMPRESSED 0x188
/* Magic numbers used in a.out header. */
#define ECOFF_AOUT_OMAGIC 0407 /* not demand paged (ld -N). */
@@ -322,34 +324,6 @@ struct ecoff_debug_info
this changes in the future. This is a pointer to an array, not a
single structure. */
FDR *fdr;
-
- /* When relaxing MIPS embedded PIC code, we may need to adjust
- symbol values when they are output. This is a linked list of
- structures indicating how values should be adjusted. There is no
- requirement that the entries be in any order, or that they not
- overlap. This field is normally NULL, in which case no
- adjustments need to be made. */
- struct ecoff_value_adjust *adjust;
-};
-
-/* This structure describes how to adjust symbol values when
- outputting MIPS embedded PIC code. These adjustments only apply to
- the internal symbols, as the external symbol values will come from
- the hash table and have already been adjusted. */
-
-struct ecoff_value_adjust
-{
- /* Next entry on adjustment list. */
- struct ecoff_value_adjust *next;
- /* Starting VMA of adjustment. This is the VMA in the ECOFF file,
- not the offset from the start of the section. Thus it should
- indicate a particular section. */
- bfd_vma start;
- /* Ending VMA of adjustment. */
- bfd_vma end;
- /* Adjustment. This should be added to the value of the symbol, or
- FDR. This is zero for the last entry in the array. */
- long adjust;
};
/* These structures are used by the ECOFF find_nearest_line function. */
diff --git a/contrib/binutils/include/coff/external.h b/contrib/binutils/include/coff/external.h
index 19636dab7d76..9e760bd86dae 100644
--- a/contrib/binutils/include/coff/external.h
+++ b/contrib/binutils/include/coff/external.h
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef COFF_EXTERNAL_H
#define COFF_EXTERNAL_H
diff --git a/contrib/binutils/include/coff/i386.h b/contrib/binutils/include/coff/i386.h
index 484a3b1e9be8..023b30293ac8 100644
--- a/contrib/binutils/include/coff/i386.h
+++ b/contrib/binutils/include/coff/i386.h
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define L_LNNO_SIZE 2
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
diff --git a/contrib/binutils/include/coff/ia64.h b/contrib/binutils/include/coff/ia64.h
index f7ff0ee22f09..dd04f62c6599 100644
--- a/contrib/binutils/include/coff/ia64.h
+++ b/contrib/binutils/include/coff/ia64.h
@@ -1,6 +1,6 @@
/* coff information for HP/Intel IA-64.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define DO_NOT_DEFINE_AOUTHDR
#define L_LNNO_SIZE 2
diff --git a/contrib/binutils/include/coff/mips.h b/contrib/binutils/include/coff/mips.h
index b9503bd5555d..feb2652145b3 100644
--- a/contrib/binutils/include/coff/mips.h
+++ b/contrib/binutils/include/coff/mips.h
@@ -1,7 +1,7 @@
/* ECOFF support on MIPS machines.
coff/ecoff.h must be included before this file.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define DO_NOT_DEFINE_AOUTHDR
#define L_LNNO_SIZE 4
@@ -105,34 +105,10 @@ struct external_reloc
#define MIPS_R_GPREL 6
#define MIPS_R_LITERAL 7
-/* These reloc types are a Cygnus extension used when generating
- position independent code for embedded systems. The numbers are
- taken from Irix 4, but at least for internal relocs Irix 5 does not
- give them the same meaning. For an internal reloc the symbol index
- of RELHI and RELLO is modified as described below for
- MIPS_R_SWITCH. */
+/* FIXME: This relocation is used (internally only) to represent branches
+ when assembling. It should never appear in output files, and
+ be removed. (It used to be used for embedded-PIC support.) */
#define MIPS_R_PCREL16 12
-#define MIPS_R_RELHI 13
-#define MIPS_R_RELLO 14
-
-/* This reloc type is a Cygnus extension used when generating position
- independent code for embedded systems. It is used for an entry in
- a switch table, which looks like this:
- .word $L3-$LS12
- The object file will contain the correct difference, and does not
- require adjustment. However, when the linker is relaxing PC
- relative calls, it is possible for $L3 to move farther away. This
- reloc always appears in the .text section, and is always against
- the .text section. However, the symbol index is not
- RELOC_SECTION_TEXT. It is, instead, the distance between this
- switch table entry and $LS12. Thus, the original value of $L12 is
- vaddr - symndx
- and the original value of $L3 is
- vaddr - symndx + addend
- where addend is the value in the object file. Knowing this, the
- linker can know whether the addend in the object file must be
- adjusted. */
-#define MIPS_R_SWITCH 22
/********************** STABS **********************/
diff --git a/contrib/binutils/include/coff/mipspe.h b/contrib/binutils/include/coff/mipspe.h
index 9b4ffab70a03..c1c2efa5e64b 100644
--- a/contrib/binutils/include/coff/mipspe.h
+++ b/contrib/binutils/include/coff/mipspe.h
@@ -1,6 +1,6 @@
/* coff information for Windows CE with MIPS VR4111
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define L_LNNO_SIZE 2
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
diff --git a/contrib/binutils/include/coff/pe.h b/contrib/binutils/include/coff/pe.h
index 363d307379b9..643cea480c97 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 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _PE_H
#define _PE_H
@@ -310,4 +310,9 @@ typedef struct
#define IMPORT_NAME_NOPREFIX 2
#define IMPORT_NAME_UNDECORATE 3
+/* Weak external characteristics. */
+#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
+#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
+#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
+
#endif /* _PE_H */
diff --git a/contrib/binutils/include/coff/powerpc.h b/contrib/binutils/include/coff/powerpc.h
index 1d4d6fb0572c..0b1105530e4b 100644
--- a/contrib/binutils/include/coff/powerpc.h
+++ b/contrib/binutils/include/coff/powerpc.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Initial release: Kim Knuttila (krk@cygnus.com) */
#define L_LNNO_SIZE 2
diff --git a/contrib/binutils/include/coff/rs6000.h b/contrib/binutils/include/coff/rs6000.h
index 0c34861142a3..5323662823ed 100644
--- a/contrib/binutils/include/coff/rs6000.h
+++ b/contrib/binutils/include/coff/rs6000.h
@@ -1,5 +1,5 @@
/* IBM RS/6000 "XCOFF" file definitions for BFD.
- Copyright (C) 1990, 1991 Free Software Foundation, Inc.
+ 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
diff --git a/contrib/binutils/include/coff/rs6k64.h b/contrib/binutils/include/coff/rs6k64.h
index 47d080213185..388818dc4d2d 100644
--- a/contrib/binutils/include/coff/rs6k64.h
+++ b/contrib/binutils/include/coff/rs6k64.h
@@ -1,5 +1,5 @@
/* IBM RS/6000 "XCOFF64" file definitions for BFD.
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002 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
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/********************** FILE HEADER **********************/
diff --git a/contrib/binutils/include/coff/sh.h b/contrib/binutils/include/coff/sh.h
index d20834ca667a..5349a1074e66 100644
--- a/contrib/binutils/include/coff/sh.h
+++ b/contrib/binutils/include/coff/sh.h
@@ -1,6 +1,6 @@
/* coff information for Renesas SH
- Copyright 2001, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2003 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
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef COFF_WITH_PE
#define L_LNNO_SIZE 2
diff --git a/contrib/binutils/include/coff/sparc.h b/contrib/binutils/include/coff/sparc.h
index ac524d6c2038..fb475f1a588e 100644
--- a/contrib/binutils/include/coff/sparc.h
+++ b/contrib/binutils/include/coff/sparc.h
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file is an amalgamation of several standard include files that
define coff format, such as filehdr.h, aouthdr.h, and so forth. In
diff --git a/contrib/binutils/include/coff/symconst.h b/contrib/binutils/include/coff/symconst.h
index f40eef2a3115..3e45705f4084 100644
--- a/contrib/binutils/include/coff/symconst.h
+++ b/contrib/binutils/include/coff/symconst.h
@@ -48,7 +48,7 @@
#define langStdc 9 /* FIXME: Collides with SGI langCplusplus */
#define langCplusplus 9 /* FIXME: Collides with langStdc */
#define langCplusplusV2 10 /* SGI addition */
-#define langMax 11 /* maximun allowed 32 -- 5 bits */
+#define langMax 11 /* maximum allowed 32 -- 5 bits */
/* The following are value definitions for the fields in the SYMR */
diff --git a/contrib/binutils/include/coff/ti.h b/contrib/binutils/include/coff/ti.h
index a15fe717ab69..4c246d4a9e08 100644
--- a/contrib/binutils/include/coff/ti.h
+++ b/contrib/binutils/include/coff/ti.h
@@ -2,7 +2,7 @@
customized in a target-specific file, and then this file included (see
tic54x.h for an example).
- Copyright 2001, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 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
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef COFF_TI_H
#define COFF_TI_H
diff --git a/contrib/binutils/include/coff/xcoff.h b/contrib/binutils/include/coff/xcoff.h
index 64a9ee164ce5..7c1eef53acab 100644
--- a/contrib/binutils/include/coff/xcoff.h
+++ b/contrib/binutils/include/coff/xcoff.h
@@ -1,6 +1,6 @@
/* Internal format of XCOFF object file data structures for BFD.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _INTERNAL_XCOFF_H
#define _INTERNAL_XCOFF_H
@@ -409,7 +409,7 @@ struct xcoff_loader_info
size_t string_size;
/* String table. */
- bfd_byte *strings;
+ char *strings;
/* Allocated size of string table. */
size_t string_alc;
diff --git a/contrib/binutils/include/demangle.h b/contrib/binutils/include/demangle.h
index 6e995e4817d8..af2946727369 100644
--- a/contrib/binutils/include/demangle.h
+++ b/contrib/binutils/include/demangle.h
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#if !defined (DEMANGLE_H)
@@ -35,6 +35,8 @@ extern "C" {
#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */
#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */
+#define DMGL_RET_POSTFIX (1 << 5) /* Print function return types (when
+ present) after function signature */
#define DMGL_AUTO (1 << 8)
#define DMGL_GNU (1 << 9)
@@ -110,31 +112,31 @@ extern const struct demangler_engine
} libiberty_demanglers[];
extern char *
-cplus_demangle PARAMS ((const char *mangled, int options));
+cplus_demangle (const char *mangled, int options);
extern int
-cplus_demangle_opname PARAMS ((const char *opname, char *result, int options));
+cplus_demangle_opname (const char *opname, char *result, int options);
extern const char *
-cplus_mangle_opname PARAMS ((const char *opname, int options));
+cplus_mangle_opname (const char *opname, int options);
/* Note: This sets global state. FIXME if you care about multi-threading. */
extern void
-set_cplus_marker_for_demangling PARAMS ((int ch));
+set_cplus_marker_for_demangling (int ch);
extern enum demangling_styles
-cplus_demangle_set_style PARAMS ((enum demangling_styles style));
+cplus_demangle_set_style (enum demangling_styles style);
extern enum demangling_styles
-cplus_demangle_name_to_style PARAMS ((const char *name));
+cplus_demangle_name_to_style (const char *name);
/* V3 ABI demangling entry points, defined in cp-demangle.c. */
extern char*
-cplus_demangle_v3 PARAMS ((const char* mangled, int options));
+cplus_demangle_v3 (const char* mangled, int options);
extern char*
-java_demangle_v3 PARAMS ((const char* mangled));
+java_demangle_v3 (const char* mangled);
enum gnu_v3_ctor_kinds {
@@ -148,7 +150,7 @@ enum gnu_v3_ctor_kinds {
gnu_v3_ctor_kinds' value indicating what kind of constructor
it is. */
extern enum gnu_v3_ctor_kinds
- is_gnu_v3_mangled_ctor PARAMS ((const char *name));
+ is_gnu_v3_mangled_ctor (const char *name);
enum gnu_v3_dtor_kinds {
@@ -162,7 +164,7 @@ enum gnu_v3_dtor_kinds {
gnu_v3_dtor_kinds' value, indicating what kind of destructor
it is. */
extern enum gnu_v3_dtor_kinds
- is_gnu_v3_mangled_dtor PARAMS ((const char *name));
+ is_gnu_v3_mangled_dtor (const char *name);
/* The V3 demangler works in two passes. The first pass builds a tree
representation of the mangled name, and the second pass turns the
@@ -239,6 +241,9 @@ enum demangle_component_type
/* A reference temporary. This has one subtree, the name for which
this is a temporary. */
DEMANGLE_COMPONENT_REFTEMP,
+ /* A hidden alias. This has one subtree, the encoding for which it
+ is providing alternative linkage. */
+ DEMANGLE_COMPONENT_HIDDEN_ALIAS,
/* A standard substitution. This holds the name of the
substitution. */
DEMANGLE_COMPONENT_SUB_STD,
@@ -440,25 +445,25 @@ struct demangle_component
unrecognized or inappropriate component type. */
extern int
-cplus_demangle_fill_component PARAMS ((struct demangle_component *fill,
- enum demangle_component_type,
- struct demangle_component *left,
- struct demangle_component *right));
+cplus_demangle_fill_component (struct demangle_component *fill,
+ enum demangle_component_type,
+ struct demangle_component *left,
+ struct demangle_component *right);
/* Fill in a DEMANGLE_COMPONENT_NAME. Returns non-zero on success,
zero for bad arguments. */
extern int
-cplus_demangle_fill_name PARAMS ((struct demangle_component *fill,
- const char *, int));
+cplus_demangle_fill_name (struct demangle_component *fill,
+ const char *, int);
/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the
builtin type (e.g., "int", etc.). Returns non-zero on success,
zero if the type is not recognized. */
extern int
-cplus_demangle_fill_builtin_type PARAMS ((struct demangle_component *fill,
- const char *typename));
+cplus_demangle_fill_builtin_type (struct demangle_component *fill,
+ const char *type_name);
/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the
operator and the number of arguments which it takes (the latter is
@@ -467,33 +472,33 @@ cplus_demangle_fill_builtin_type PARAMS ((struct demangle_component *fill,
not recognized. */
extern int
-cplus_demangle_fill_operator PARAMS ((struct demangle_component *fill,
- const char *opname, int args));
+cplus_demangle_fill_operator (struct demangle_component *fill,
+ const char *opname, int args);
/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the
number of arguments and the name. Returns non-zero on success,
zero for bad arguments. */
extern int
-cplus_demangle_fill_extended_operator PARAMS ((struct demangle_component *fill,
- int numargs,
- struct demangle_component *nm));
+cplus_demangle_fill_extended_operator (struct demangle_component *fill,
+ int numargs,
+ struct demangle_component *nm);
/* Fill in a DEMANGLE_COMPONENT_CTOR. Returns non-zero on success,
zero for bad arguments. */
extern int
-cplus_demangle_fill_ctor PARAMS ((struct demangle_component *fill,
- enum gnu_v3_ctor_kinds kind,
- struct demangle_component *name));
+cplus_demangle_fill_ctor (struct demangle_component *fill,
+ enum gnu_v3_ctor_kinds kind,
+ struct demangle_component *name);
/* Fill in a DEMANGLE_COMPONENT_DTOR. Returns non-zero on success,
zero for bad arguments. */
extern int
-cplus_demangle_fill_dtor PARAMS ((struct demangle_component *fill,
- enum gnu_v3_dtor_kinds kind,
- struct demangle_component *name));
+cplus_demangle_fill_dtor (struct demangle_component *fill,
+ enum gnu_v3_dtor_kinds kind,
+ struct demangle_component *name);
/* This function translates a mangled name into a struct
demangle_component tree. The first argument is the mangled name.
@@ -504,9 +509,7 @@ cplus_demangle_fill_dtor PARAMS ((struct demangle_component *fill,
needed. */
extern struct demangle_component *
-cplus_demangle_v3_components PARAMS ((const char *mangled,
- int options,
- void **mem));
+cplus_demangle_v3_components (const char *mangled, int options, void **mem);
/* This function takes a struct demangle_component tree and returns
the corresponding demangled string. The first argument is DMGL_*
@@ -521,10 +524,10 @@ cplus_demangle_v3_components PARAMS ((const char *mangled,
memory allocation error. */
extern char *
-cplus_demangle_print PARAMS ((int options,
- const struct demangle_component *tree,
- int estimated_length,
- size_t *p_allocated_size));
+cplus_demangle_print (int options,
+ const struct demangle_component *tree,
+ int estimated_length,
+ size_t *p_allocated_size);
#ifdef __cplusplus
}
diff --git a/contrib/binutils/include/dis-asm.h b/contrib/binutils/include/dis-asm.h
index 3670c5189868..bdbf9f88c5f6 100644
--- a/contrib/binutils/include/dis-asm.h
+++ b/contrib/binutils/include/dis-asm.h
@@ -1,7 +1,8 @@
/* Interface between the opcode library and its callers.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
-
+ Copyright 1999, 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)
@@ -14,9 +15,9 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
+ Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
Written by Cygnus Support, 1993.
The opcode library (libopcodes.a) provides instruction decoders for
@@ -34,7 +35,7 @@ extern "C" {
#include <stdio.h>
#include "bfd.h"
-typedef int (*fprintf_ftype) (void *, const char*, ...);
+typedef int (*fprintf_ftype) (void *, const char*, ...) ATTRIBUTE_FPTR_PRINTF_2;
enum dis_insn_type {
dis_noninsn, /* Not a valid instruction */
@@ -47,7 +48,7 @@ enum dis_insn_type {
dis_dref2 /* Two data references in instruction */
};
-/* This struct is passed into the instruction decoding routine,
+/* This struct is passed into the instruction decoding routine,
and is passed back out into each callback. The various fields are used
for conveying information from your main routine into your callbacks,
for passing information into the instruction decoders (such as the
@@ -77,7 +78,7 @@ typedef struct disassemble_info {
for processors with run-time-switchable instruction sets. The default,
zero, means that there is no constraint. CGEN-based opcodes ports
may use ISA_foo masks. */
- unsigned long insn_sets;
+ void *insn_sets;
/* Some targets need information about the current section to accurately
display insns. If this is NULL, the target disassembler function
@@ -135,7 +136,7 @@ typedef struct disassemble_info {
displaying debugging outout. */
bfd_boolean (* symbol_is_valid)
(asymbol *, struct disassemble_info * info);
-
+
/* These are for buffer_read_memory. */
bfd_byte *buffer;
bfd_vma buffer_vma;
@@ -155,10 +156,25 @@ typedef struct disassemble_info {
int bytes_per_chunk;
enum bfd_endian display_endian;
- /* Number of octets per incremented target address
+ /* Number of octets per incremented target address
Normally one, but some DSPs have byte sizes of 16 or 32 bits. */
unsigned int octets_per_byte;
+ /* The number of zeroes we want to see at the end of a section before we
+ start skipping them. */
+ unsigned int skip_zeroes;
+
+ /* The number of zeroes to skip at the end of a section. If the number
+ of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES,
+ they will be disassembled. If there are fewer than
+ SKIP_ZEROES_AT_END, they will be skipped. This is a heuristic
+ attempt to avoid disassembling zeroes inserted by section
+ alignment. */
+ unsigned int skip_zeroes_at_end;
+
+ /* Whether the disassembler always needs the relocations. */
+ bfd_boolean disassembler_needs_relocs;
+
/* Results from instruction decoders. Not all decoders yet support
this information. This info is set each time an instruction is
decoded, and is only valid for the last such instruction.
@@ -195,6 +211,7 @@ 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 *);
@@ -205,9 +222,8 @@ 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_big_a29k (bfd_vma, disassemble_info *);
-extern int print_insn_little_a29k (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_d10v (bfd_vma, disassemble_info *);
extern int print_insn_d30v (bfd_vma, disassemble_info *);
extern int print_insn_dlx (bfd_vma, disassemble_info *);
@@ -218,12 +234,16 @@ extern int print_insn_i960 (bfd_vma, disassemble_info *);
extern int print_insn_ip2k (bfd_vma, disassemble_info *);
extern int print_insn_m32r (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_mcore (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_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 *);
@@ -232,7 +252,7 @@ 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_s390 (bfd_vma, disassemble_info *);
extern int print_insn_sh (bfd_vma, disassemble_info *);
extern int print_insn_tic30 (bfd_vma, disassemble_info *);
extern int print_insn_tic4x (bfd_vma, disassemble_info *);
@@ -247,6 +267,8 @@ 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 disassembler_ftype arc_get_disassembler (void *);
extern disassembler_ftype cris_get_disassembler (bfd *);
@@ -257,7 +279,7 @@ 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 ***);
+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. */
@@ -294,10 +316,10 @@ extern void generic_print_address
extern int generic_symbol_at_address
(bfd_vma, struct disassemble_info *);
-/* Also always true. */
+/* Also always true. */
extern bfd_boolean generic_symbol_is_valid
(asymbol *, struct disassemble_info *);
-
+
/* Method to initialize a disassemble_info struct. This should be
called by all applications creating such a struct. */
extern void init_disassemble_info (struct disassemble_info *info, void *stream,
diff --git a/contrib/binutils/include/dyn-string.h b/contrib/binutils/include/dyn-string.h
index 2a771c7a5d11..44e33deba3a5 100644
--- a/contrib/binutils/include/dyn-string.h
+++ b/contrib/binutils/include/dyn-string.h
@@ -1,5 +1,5 @@
/* An abstract string datatype.
- Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GCC.
@@ -16,8 +16,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
typedef struct dyn_string
@@ -40,53 +40,21 @@ typedef struct dyn_string
(strcmp ((DS1)->s, (DS2)->s))
-/* dyn_string functions are used in the demangling implementation
- included in the G++ runtime library. To prevent collisions with
- names in user programs, the functions that are used in the
- demangler are given implementation-reserved names. */
-
-#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3)
-
-#define dyn_string_init __cxa_dyn_string_init
-#define dyn_string_new __cxa_dyn_string_new
-#define dyn_string_delete __cxa_dyn_string_delete
-#define dyn_string_release __cxa_dyn_string_release
-#define dyn_string_resize __cxa_dyn_string_resize
-#define dyn_string_clear __cxa_dyn_string_clear
-#define dyn_string_copy __cxa_dyn_string_copy
-#define dyn_string_copy_cstr __cxa_dyn_string_copy_cstr
-#define dyn_string_prepend __cxa_dyn_string_prepend
-#define dyn_string_prepend_cstr __cxa_dyn_string_prepend_cstr
-#define dyn_string_insert __cxa_dyn_string_insert
-#define dyn_string_insert_cstr __cxa_dyn_string_insert_cstr
-#define dyn_string_insert_char __cxa_dyn_string_insert_char
-#define dyn_string_append __cxa_dyn_string_append
-#define dyn_string_append_cstr __cxa_dyn_string_append_cstr
-#define dyn_string_append_char __cxa_dyn_string_append_char
-#define dyn_string_substring __cxa_dyn_string_substring
-#define dyn_string_eq __cxa_dyn_string_eq
-
-#endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */
-
-
-extern int dyn_string_init PARAMS ((struct dyn_string *, int));
-extern dyn_string_t dyn_string_new PARAMS ((int));
-extern void dyn_string_delete PARAMS ((dyn_string_t));
-extern char *dyn_string_release PARAMS ((dyn_string_t));
-extern dyn_string_t dyn_string_resize PARAMS ((dyn_string_t, int));
-extern void dyn_string_clear PARAMS ((dyn_string_t));
-extern int dyn_string_copy PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_copy_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_prepend PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_prepend_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_insert PARAMS ((dyn_string_t, int,
- dyn_string_t));
-extern int dyn_string_insert_cstr PARAMS ((dyn_string_t, int,
- const char *));
-extern int dyn_string_insert_char PARAMS ((dyn_string_t, int, int));
-extern int dyn_string_append PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_append_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_append_char PARAMS ((dyn_string_t, int));
-extern int dyn_string_substring PARAMS ((dyn_string_t,
- dyn_string_t, int, int));
-extern int dyn_string_eq PARAMS ((dyn_string_t, dyn_string_t));
+extern int dyn_string_init (struct dyn_string *, int);
+extern dyn_string_t dyn_string_new (int);
+extern void dyn_string_delete (dyn_string_t);
+extern char *dyn_string_release (dyn_string_t);
+extern dyn_string_t dyn_string_resize (dyn_string_t, int);
+extern void dyn_string_clear (dyn_string_t);
+extern int dyn_string_copy (dyn_string_t, dyn_string_t);
+extern int dyn_string_copy_cstr (dyn_string_t, const char *);
+extern int dyn_string_prepend (dyn_string_t, dyn_string_t);
+extern int dyn_string_prepend_cstr (dyn_string_t, const char *);
+extern int dyn_string_insert (dyn_string_t, int, dyn_string_t);
+extern int dyn_string_insert_cstr (dyn_string_t, int, const char *);
+extern int dyn_string_insert_char (dyn_string_t, int, int);
+extern int dyn_string_append (dyn_string_t, dyn_string_t);
+extern int dyn_string_append_cstr (dyn_string_t, const char *);
+extern int dyn_string_append_char (dyn_string_t, int);
+extern int dyn_string_substring (dyn_string_t, dyn_string_t, int, int);
+extern int dyn_string_eq (dyn_string_t, dyn_string_t);
diff --git a/contrib/binutils/include/elf/ChangeLog b/contrib/binutils/include/elf/ChangeLog
index ea008d62423d..48ce81c1354a 100644
--- a/contrib/binutils/include/elf/ChangeLog
+++ b/contrib/binutils/include/elf/ChangeLog
@@ -1,3 +1,434 @@
+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>
+
+ * mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs.
+
+2006-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (SHF_HP_TLS, SHF_HP_NEAR_SHARED, SHF_HP_FAR_SHARED,
+ SHF_HP_COMDAT, SHF_HP_CONST, SHN_TLS_COMMON, SHN_NS_COMMON,
+ SHN_NS_UNDEF, SHN_FS_UNDEF, SHN_HP_EXTERN, SHN_HP_EXTHINT,
+ SHN_HP_UNDEF_BIND_IMM, SHT_HP_OVLBITS, SHT_HP_DLKM, SHT_HP_COMDAT,
+ SHT_HP_OBJDICT, SHT_HP_ANNOT, STB_HP_ALIAS): Define.
+
+2006-03-10 Paul Brook <paul@codesourcery.com>
+
+ * arm.h (EF_ARM_EABI_VER5): Define.
+
+2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A,
+ EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B, EF_M68K_ISA_C): Adjust.
+ (EF_M68K_ISA_A_NODIV, EF_M68K_ISA_B_NOUSP): New.
+ (EF_M68K_HW_DIV, EF_M68K_USP): Remove.
+ (EF_M68K_MAC, EF_M68K_EMAC, EF_M68K_FLOAT): Adjust.
+ (EF_M68K_EMAC_B): New.
+
+2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * avr.h (R_AVR_MS8_LDI,R_AVR_MS8_LDI_NEG): Add.
+ (EF_AVR_LINKRELAX_PREPARED): Add.
+
+2006-03-02 Ben Elliston <bje@au.ibm.com>
+
+ Import from the GCC tree:
+ 2006-03-01 Jakub Jelinek <jakub@redhat.com>
+
+ * dwarf2.h (DW_TAG_condition, DW_TAG_shared_type): New constants
+ from DWARF 3.
+ (DW_AT_description, DW_AT_binary_scale, DW_AT_decimal_scale,
+ DW_AT_small, DW_AT_decimal_sign, DW_AT_digit_count,
+ DW_AT_picture_string, DW_AT_mutable, DW_AT_threads_scaled,
+ DW_AT_explicit, DW_AT_object_pointer, DW_AT_endianity,
+ DW_AT_elemental, DW_AT_pure, DW_AT_recursive): New.
+ (DW_OP_form_tls_address, DW_OP_call_frame_cfa, DW_OP_bit_piece): New.
+ (DW_ATE_packed_decimal, DW_ATE_numeric_string, DW_ATE_edited,
+ DW_ATE_signed_fixed, DW_ATE_unsigned_fixed): New.
+ (DW_DS_unsigned, DW_DS_leading_overpunch, DW_DS_trailing_overpunch,
+ DW_DS_leading_separate, DW_DS_trailing_separate): New.
+ (DW_END_default, DW_END_big, DW_END_little): New.
+ (DW_END_lo_user, DW_END_hi_user): Define.
+ (DW_LNE_lo_user, DW_LNE_hi_user): Define.
+ (DW_CFA_val_offset, DW_CFA_val_offset_sf, DW_CFA_val_expression): New.
+ (DW_LANG_PLI, DW_LANG_ObjC, DW_LANG_ObjC_plus_plus, DW_LANG_UPC,
+ DW_LANG_D): New.
+
+2006-02-24 DJ Delorie <dj@redhat.com>
+
+ * m32c.h: Add relax relocs.
+
+2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
+ Anil Paranjape <anilp1@kpitcummins.com>
+ Shilin Shakti <shilins@kpitcummins.com>
+
+ * common.h (EM_XC16X): New entry for xc16x cpu.
+ Sort other EM_* numbers into numerical order.
+ * xc16x.h: New file.
+
+2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/2258
+ * internal.h (ELF_IS_SECTION_IN_SEGMENT_FILE): New.
+ (ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
+
+2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k.h (EF_CPU32, EF_M68000, EF_CFV4E): Rename to ...
+ (EF_M68K_CPU32, EF_M68K_M68000, EF_M68K_CFV4E): ... here.
+ (EF_M68K_ISA_MASK, EF_M68K_ISA_A, EF_M68K_M68K_ISA_A_PLUS,
+ EF_M68K_ISA_B, EF_M68K_HW_DIV, EF_M68K_MAC_MASK, EF_M68K_MAC,
+ EF_M68K_EMAC, EF_M68K_USP, EF_M68K_FLOAT): New.
+
+2006-02-06 Steve Ellcey <sje@cup.hp.com>
+
+ * ia64.h (SHF_IA_64_HP_TLS): New.
+
+2006-01-18 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce TLS descriptors for i386 and x86_64.
+ * common.h (DT_TLSDESC_GOT, DT_TLSDESC_PLT): New.
+ * i386.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL, R_386_TLS_DESC):
+ New.
+ * x86-64.h (R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL,
+ R_X86_64_TLSDESC): New.
+
+2006-01-09 Mike Frysinger <vapier@gentoo.org>:
+
+ * common.h (EM_ALTERA_NIOS2, EM_NIOS32) Define.
+
+2005-12-16 Nathan Sidwell <nathan@codesourcery.com>
+
+ Second part of ms1 to mt renaming.
+ * common.h (EM_MT): Renamed.
+ * mt.h: Rename relocs, cpu & other defines.
+
+2005-12-12 Paul Brook <paul@codesourcery.com>
+
+ * arm.h (elf32_arm_get_eabi_attr_int): Add prototype.
+
+2005-11-11 Nick Clifton <nickc@redhat.com>
+
+ PR 1150
+ * mips.h (STO_OPTIONAL): Define.
+ (ELF_MIPS_IS_OPTIONAL): Define.
+
+2005-09-30 Catherine Moore <clm@cm00re.com>
+
+ * bfin.h: New file.
+ * common.h (EM_BLACKFIN): Define.
+
+2005-10-08 Paul Brook <paul@codesourcery.com>
+
+ * arm.h: Add prototypes for BFD object attribute routines.
+
+2005-09-09 Richard Earnshaw <richard.earnshaw@arm.com>
+
+ * arm.h (SHT_ARM_PREEMPTMAP, SHT_ARM_ATTRIBUTES): New defines.
+
+2005-08-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (SHT_PARISC_DLKM, SHF_PARISC_WEAKORDER, PT_PARISC_WEAKORDER):
+ New defines.
+
+2005-08-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (PF_HP_CODE, PF_HP_MODIFY, PF_HP_LAZYSWAP): Revise defines.
+ (PF_HP_CODE_DEPR, PF_HP_MODIFY_DEPR, PF_HP_LAZYSWAP_DEPR): New
+ deprecated defines.
+ (DT_HP_EPLTREL, DT_HP_EPLTRELSZ, DT_HP_FILTERED, DT_HP_FILTER_TLS,
+ DT_HP_COMPAT_FILTERED, DT_HP_LAZYLOAD, DT_HP_BIND_NOW_COUNT, DT_PLT,
+ DT_PLT_SIZE, DT_DLT, DT_DLT_SIZE, DT_HP_BIND_DEPTH_FIRST, DT_HP_GST,
+ DT_HP_SHLIB_FIXED, DT_HP_MERGE_SHLIB_SEG, DT_HP_NODELETE, DT_HP_GROUP,
+ DT_HP_PROTECT_LINKAGE_TABLE, PT_HP_OPT_ANNOT, PT_HP_HSL_ANNOT,
+ PT_HP_STACK, PT_HP_CORE_UTSNAME, NT_HP_COMPILER, NT_HP_COPYRIGHT,
+ NT_HP_VERSION, NT_HP_SRCFILE_INFO, NT_HP_LINKER, NT_HP_INSTRUMENTED,
+ NT_HP_UX_OPTIONS): Define.
+
+2005-07-25 DJ Delorie <dj@redhat.com>
+
+ * m32c.h: Add R_M32C_8, R_M32C_LO16, R_M32C_HI8, and R_M32C_HI16.
+
+2005-07-25 Jan Hubicka <jh@suse.cz>
+
+ * x86-64.h (SHN_X86_64_LCOMMON): New.
+ (SHF_X86_64_LARGE): New.
+
+2005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * m32r.h (R_M32R_REL32): Added.
+
+2005-07-18 Ben Elliston <bje@au.ibm.com>
+
+ * dwarf2.h (enum dwarf_type): Remove DW_AT_GNU_decimal_float.
+ Replace with DW_ATE_decimal_float (now in DWARF 3).
+
+2005-07-14 Jim Blandy <jimb@redhat.com>
+
+ Add support for Renesas M32C and M16C.
+ * common.h (EM_M32C): New machine number.
+ * m32c.h: New file.
+
+2005-06-17 Jan Beulich <jbeulich@novell.com>
+
+ * x86-64.h (elf_x86_64_reloc_type): Adjust comment for
+ R_X86_64_GOTPCREL. Add R_X86_64_PC64, R_X86_64_GOTOFF64, and
+ R_X86_64_GOTPC32.
+
+2005-06-07 Aldy Hernandez <aldyh@redhat.com>
+ Michael Snyder <msnyder@redhat.com>
+ Stan Cox <scox@redhat.com>
+
+ * common.h (EM_MS1): Define.
+
+ * ms1.h: New file.
+
+2005-05-31 Richard Henderson <rth@redhat.com>
+
+ * alpha.h (LITUSE_ALPHA_JSRDIRECT): New.
+
+2005-05-29 Richard Henderson <rth@redhat.com>
+
+ * alpha.h (DT_ALPHA_PLTRO): New.
+
+2005-05-19 Ben Elliston <bje@au.ibm.com>
+
+ * dwarf2.h (enum dwarf_type): Assign DW_ATE_GNU_decimal_float from
+ the user-defined encoding space pending inclusion in the standard.
+
+2005-05-18 Zack Weinberg <zack@codesourcery.com>
+
+ * arm.h: Make all #ifndef OLD_ARM_ABI blocks
+ unconditional, delete all #ifdef OLD_ARM_ABI blocks.
+
+2005-05-17 Zack Weinberg <zack@codesourcery.com>
+
+ * arm.h: Import complete list of official relocation names
+ and numbers from AAELF. Define FAKE_RELOCs for old names.
+ Remove a few old names no longer used anywhere.
+
+2005-05-14 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (DT_PPC_GOT): Rename from DT_PPC_GLINK.
+
+2005-05-11 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT,
+ R_PPC_RELAX32PC_PLT) Adjust.
+ (R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI, R_PPC_REL16_HA): Define.
+ (DT_PPC_GLINK): Define.
+
+2005-05-10 Nick Clifton <nickc@redhat.com>
+
+ * Update the address and phone number of the FSF organization in
+ the GPL notices in the following files:
+ alpha.h, arc.h, arm.h, avr.h, common.h, cr16c.h, cris.h, crx.h,
+ d10v.h, d30v.h, dlx.h, dwarf.h, dwarf2.h, external.h, fr30.h,
+ frv.h, h8.h, hppa.h, i370.h, i386.h, i860.h, i960.h, ia64.h,
+ internal.h, ip2k.h, iq2000.h, m32r.h, m68hc11.h, m68k.h, mcore.h,
+ mips.h, mmix.h, mn10200.h, mn10300.h, msp430.h, openrisc.h,
+ or32.h, pj.h, ppc.h, ppc64.h, reloc-macros.h, s390.h, sh.h,
+ sparc.h, v850.h, vax.h, x86-64.h, xstormy16.h, xtensa.h
+
+2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ Moved from ../ChangeLog
+
+ 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
+ * arm.h: Add R_ARM_CALL and R_ARM_JUMP32.
+
+ 2004-10-12 Paul Brook <paul@codesourcery.com>
+ * arm.h (EF_ARM_EABI_VER4): Define.
+
+ 2004-10-08 Daniel Jacobowitz <dan@debian.org>
+
+ * common.h (PT_SUNW_EH_FRAME): Define.
+ * x86-64.h (SHT_X86_64_UNWIND): Define.
+
+ 2004-10-07 Bob Wilson <bob.wilson@acm.org>
+ * xtensa.h (R_XTENSA_DIFF8, R_XTENSA_DIFF16, R_XTENSA_DIFF32,
+ R_XTENSA_SLOT*_OP, R_XTENSA_SLOT*_ALT): New relocations.
+ (XTENSA_PROP_SEC_NAME): Define.
+ (property_table_entry): Add flags field.
+ (XTENSA_PROP_*, GET_XTENSA_PROP_*, SET_XTENSA_PROP_*): Define.
+
+ 2004-09-17 Paul Brook <paul@codesourcery.com>
+ * arm.h: Remove R_ARM_STKCHK and R_ARM_THM_STKCHK.
+ Add R_ARM_TARGET2, R_ARM_PREL31, R_ARM_GOT_ABS, R_ARM_GOT_PREL,
+ R_ARM_GOT_BREL12, R_ARM_GOTOFF12 and R_ARM_GOTRELAX.
+
+ 2004-09-13 Paul Brook <paul@codesourcery.com>
+ * arm.h: Rename RELABS to TARGET1.
+
+ 2004-05-11 Jakub Jelinek <jakub@redhat.com>
+ * common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
+ (PT_GNU_RELRO): Define.
+
+2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
+ Phil Blundell <philb@gnu.org>
+
+ * arm.h: Add TLS relocations.
+
+2005-03-23 Ben Elliston <bje@au.ibm.com>
+
+ * dwarf.h: Merge with GCC's dwarf.h.
+
+2005-03-18 C Jaipraash <cjaiprakash@noida.hcltech.com>
+
+ * m68k.h (EF_CFV4E): Define.
+
+2005-03-17 Paul Brook <paul@codesourcery.com>
+ Dan Jacobowitz <dan@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+
+ * arm.h (PT_ARM_EXIDX): Define.
+
+2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * mips.h: Define MIPS TLS relocations.
+
+2005-02-15 Nigel Stephens <nigel@mips.com>
+ Maciej W. Rozycki <macro@mips.com>
+
+ * mips.h (R_MIPS16_GOT16): New reloc code.
+ (R_MIPS16_CALL16): Likewise.
+ (R_MIPS16_HI16): Likewise.
+ (R_MIPS16_LO16): Likewise.
+ (R_MIPS16_min): New fake reloc code.
+ (R_MIPS16_max): Likewise.
+
+2005-02-11 Maciej W. Rozycki <macro@mips.com>
+
+ * mips.h (R_MIPS_max): Use FAKE_RELOC to define.
+
+2005-01-25 Alexandre Oliva <aoliva@redhat.com>
+
+ 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
+ * frv.h: Add R_FRV_TLSMOFF.
+ 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
+ * frv.h: Add TLS relocations.
+
+2005-01-17 Nick Clifton <nickc@redhat.com>
+
+ * sh.h (EF_SH2A_SH4_NOFPU, EF_SH2A_SH3_NOFPU, EF_SH2A_SH4,
+ EF_SH2A_SH3E): New flags.
+ (EF_SH_BFD_TABLE): Add these new flags to the table.
+
+2005-01-12 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Define.
+ (R_PPC_RELAX32, R_PPC_RELAX32PC): Adjust value.
+
+2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
+
+ * avr.h (R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW): New relocs.
+
+2004-12-16 Richard Sandiford <rsandifo@redhat.com>
+
+ * v850.h (R_V850_LO16_SPLIT_OFFSET): New reloc.
+
+2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * mips.h (E_MIPS_MACH_9000): Define.
+
+2004-11-04 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h (EF_CRIS_VARIANT_MASK, EF_CRIS_VARIANT_ANY_V0_V10)
+ (EF_CRIS_VARIANT_V32, EF_CRIS_VARIANT_COMMON_V10_V32): New
+ macros.
+
+2004-10-06 Eric Christopher <echristo@redhat.com>
+
+ * dwarf2.h: Sync with gcc dwarf2.h. Fix typo.
+
+2004-10-01 Paul Brook <paul@codesourcery.com>
+
+ * arm.h (SHT_ARM_EXIDX): Define.
+ (ELF_STRING_ARM_unwind, ELF_STRING_ARM_unwind,
+ ELF_STRING_ARM_unwind_once, ELF_STRING_ARM_unwind_info_once):
+ Define.
+
+2004-08-25 Dmitry Diky <diwil@spec.ru>
+
+ * msp430.h: Add new relocs.
+
+2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (R_386_USED_BY_INTEL_200): New.
+
+2004-07-29 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce SH2a support.
+ 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
+ * sh.h (EF_SH2A_NOFPU): New.
+ 2003-12-01 Michael Snyder <msnyder@redhat.com>
+ * sh.h (EF_SH2A): New.
+
+2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * crx.h: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
+ BFD_RELOC_CRX_SWITCH32.
+
+2004-07-06 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * common.h (EM_CRX): Define.
+ * crx.h: New file.
+
+2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * m32r.h: Add defintions of R_M32R_GOTOFF_HI_ULO,
+ R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
+
+2004-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (ELF64_R_INFO): Warning fix.
+
+2004-06-14 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (R_MIPS_PC32): Add back (undoing removal on 2004-04-24),
+ with an updated comment.
+
+2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
+
+ * sh.h (EF_SH_HAS_DSP): Remove.
+ (EF_SH_HAS_FP): Remove.
+ (EF_SH_MERGE_MACH): Remove.
+ (EF_SH4_NOFPU): Convert to decimal.
+ (EF_SH4A_NOFPU): Likewise.
+ (EF_SH4_NOMMU_NOFPU): Likewise.
+ (EF_SH3_NOMMU): Add new macro.
+ (EF_SH_BFD_TABLE): Likewise.
+ (sh_find_elf_flags): Add prototype.
+ (sh_elf_get_flags_from_mach): Likewise.
+
+2004-04-24 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16)
+ (R_MIPS_GNU_REL_HI16): Remove.
+ (R_MIPS_GNU_REL16_S2): Update comment.
+
+2004-30-30 Galit Heller <Galit.Heller@nsc.com>
+ Tomer Levi <Tomer.Levi@nsc.com>
+
+ * common.h (EM_CR): Define.
+ * cr16c.h: New file.
+
+2004-03-23 Paul Brook <paul@codesourcery.com>
+
+ * arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add.
+
+2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
+
+ * sh.h: Add EF_SH4_NOMMU_NOFPU.
+
+2004-03-01 Richard Sandiford <rsandifo@redhat.com>
+
+ * frv.h (EF_FRV_CPU_FR405, EF_FRV_CPU_FR450): Define.
+
2004-01-28 Roland McGrath <roland@redhat.com>
* common.h (AT_SECURE): New macro.
diff --git a/contrib/binutils/include/elf/ChangeLog-9103 b/contrib/binutils/include/elf/ChangeLog-9103
index 713d80d14405..93632ef80eb9 100644
--- a/contrib/binutils/include/elf/ChangeLog-9103
+++ b/contrib/binutils/include/elf/ChangeLog-9103
@@ -1,6 +1,40 @@
+2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ Moved from ../ChangeLog
+
+ 2003-10-14 Bob Wilson <bob.wilson@acm.org>
+ * xtensa.h: Formatting. Fix comments about property section
+ names for linkonce sections.
+
+ 2003-05-23 Jakub Jelinek <jakub@redhat.com>
+ * common.h (PT_GNU_STACK): Define.
+
+ 2003-01-25 Jakub Jelinek <jakub@redhat.com>
+ * sparc.h: Add TLS relocs. Move R_SPARC_REV32 to 252.
+
+ 2002-09-26 Jakub Jelinek <jakub@redhat.com>
+ * x86-64.h: Add TLS relocs.
+
+ 2002-09-19 Jakub Jelinek <jakub@redhat.com>
+ * i386.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE):
+ Define.
+
+ 2002-07-10 Jakub Jelinek <jakub@redhat.com>
+ * common.h (SHT_GNU_LIBLIST, DT_GNU_PRELINKED,
+ DT_GNU_CONFLICT*, DT_GNU_LIBLIST*): Define.
+
+ 2002-05-31 Michal Ludvig <mludvig@suse.cz>
+ * dwarf2.h (DW_CFA_low_user, DW_CFA_high_user): Renamed
+ to DW_CFA_lo_user, DW_CFA_hi_user respectively.
+
+ 2002-05-23 Jakub Jelinek <jakub@redhat.com>
+ * common.h (PT_TLS, SHF_TLS, STT_TLS, DF_STATIC_TLS): Define.
+ * ia64.h (R_IA64_LTOFF_TPREL22): Renamed from R_IA64_LTOFF_TP22.
+ * i386.h: Add TLS relocs.
+
2003-12-19 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
- * elf/m32r.h : Added m32r-linux and PIC support. Add new ABI that
+ * m32r.h : Added m32r-linux and PIC support. Add new ABI that
uses RELA.
(R_M32R_16_RELA, R_M32R_32_RELA, R_M32R_24_RELA,
R_M32R_10_PCREL_RELA, R_M32R_18_PCREL_RELA,
@@ -22,7 +56,7 @@
2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
- * elf/m32r.h: Add new machine type m32r2 and instruction modes.
+ * m32r.h: Add new machine type m32r2 and instruction modes.
2003-11-06 Alan Modra <amodra@bigpond.net.au>
@@ -148,7 +182,7 @@
2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
- * elf/h8.h (E_H8_MACH_H8300HN, E_H8_MACH_H8300SN): New
+ * h8.h (E_H8_MACH_H8300HN, E_H8_MACH_H8300SN): New
2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
@@ -165,8 +199,8 @@
2003-04-01 Bob Wilson <bob.wilson@acm.org>
- * elf/common.h (EM_XTENSA_OLD): Define.
- * elf/xtensa.h: New file.
+ * common.h (EM_XTENSA_OLD): Define.
+ * xtensa.h: New file.
2003-04-01 Nick Clifton <nickc@redhat.com>
@@ -339,7 +373,7 @@
2002-08-28 Catherine Moore <clm@redhat.com>
- * elf/v850.h (R_V850_LONGCALL, R_V850_ALIGN,
+ * v850.h (R_V850_LONGCALL, R_V850_ALIGN,
R_V850_LONGJUMP): New relocations.
2002-08-15 Alan Modra <amodra@bigpond.net.au>
@@ -535,7 +569,7 @@
2001-12-13 Jakub Jelinek <jakub@redhat.com>
- * elf/common.h (PT_GNU_EH_FRAME): Define.
+ * common.h (PT_GNU_EH_FRAME): Define.
2001-12-11 Alan Modra <amodra@bigpond.net.au>
diff --git a/contrib/binutils/include/elf/alpha.h b/contrib/binutils/include/elf/alpha.h
index 0313b5be6bb4..e53202c6e4ba 100644
--- a/contrib/binutils/include/elf/alpha.h
+++ b/contrib/binutils/include/elf/alpha.h
@@ -1,5 +1,5 @@
/* ALPHA ELF support for BFD.
- Copyright 1996, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
By Eric Youngdale, <eric@aib.com>. No processor supplement available
for this platform.
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the ALPHA ELF ABI. Note
that most of this is not actually implemented by BFD. */
@@ -63,6 +63,9 @@ typedef struct
#define STO_ALPHA_NOPV 0x80
#define STO_ALPHA_STD_GPLOAD 0x88
+/* Special values for Elf64_Dyn tag. */
+#define DT_ALPHA_PLTRO DT_LOPROC
+
#include "elf/reloc-macros.h"
/* Alpha relocs. */
@@ -122,5 +125,6 @@ END_RELOC_NUMBERS (R_ALPHA_max)
#define LITUSE_ALPHA_JSR 3
#define LITUSE_ALPHA_TLSGD 4
#define LITUSE_ALPHA_TLSLDM 5
+#define LITUSE_ALPHA_JSRDIRECT 6
#endif /* _ELF_ALPHA_H */
diff --git a/contrib/binutils/include/elf/arc.h b/contrib/binutils/include/elf/arc.h
index 6e94c29dbcec..e2f4f4160fe1 100644
--- a/contrib/binutils/include/elf/arc.h
+++ b/contrib/binutils/include/elf/arc.h
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the ARC ELF ABI. */
diff --git a/contrib/binutils/include/elf/arm.h b/contrib/binutils/include/elf/arm.h
index 181a9f0c5c92..8311c131c99c 100644
--- a/contrib/binutils/include/elf/arm.h
+++ b/contrib/binutils/include/elf/arm.h
@@ -1,5 +1,6 @@
/* ARM ELF support for BFD.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_ARM_H
#define _ELF_ARM_H
@@ -36,16 +37,26 @@
#define EF_ARM_VFP_FLOAT 0x400
#define EF_ARM_MAVERICK_FLOAT 0x800
+/* Frame unwind information */
+#define PT_ARM_EXIDX (PT_LOPROC + 1)
+
/* Other constants defined in the ARM ELF spec. version B-01. */
#define EF_ARM_SYMSARESORTED 0x04 /* NB conflicts with EF_INTERWORK */
#define EF_ARM_DYNSYMSUSESEGIDX 0x08 /* NB conflicts with EF_APCS26 */
#define EF_ARM_MAPSYMSFIRST 0x10 /* NB conflicts with EF_APCS_FLOAT */
#define EF_ARM_EABIMASK 0xFF000000
+/* Constants defined in AAELF. */
+#define EF_ARM_BE8 0x00800000
+#define EF_ARM_LE8 0x00400000
+
#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
#define EF_ARM_EABI_UNKNOWN 0x00000000
#define EF_ARM_EABI_VER1 0x01000000
#define EF_ARM_EABI_VER2 0x02000000
+#define EF_ARM_EABI_VER3 0x03000000
+#define EF_ARM_EABI_VER4 0x04000000
+#define EF_ARM_EABI_VER5 0x05000000
/* Local aliases for some flags to match names used by COFF port. */
#define F_INTERWORK EF_ARM_INTERWORK
@@ -59,6 +70,11 @@
#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
+/* Additional section types. */
+#define SHT_ARM_EXIDX 0x70000001 /* Section holds ARM unwind info. */
+#define SHT_ARM_PREEMPTMAP 0x70000002 /* Section pre-emption details. */
+#define SHT_ARM_ATTRIBUTES 0x70000003 /* Section holds attributes. */
+
/* ARM-specific values for sh_flags. */
#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */
#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */
@@ -71,76 +87,199 @@
/* Relocation types. */
START_RELOC_NUMBERS (elf_arm_reloc_type)
- RELOC_NUMBER (R_ARM_NONE, 0)
- RELOC_NUMBER (R_ARM_PC24, 1)
- RELOC_NUMBER (R_ARM_ABS32, 2)
- RELOC_NUMBER (R_ARM_REL32, 3)
-#ifdef OLD_ARM_ABI
- RELOC_NUMBER (R_ARM_ABS8, 4)
- RELOC_NUMBER (R_ARM_ABS16, 5)
- RELOC_NUMBER (R_ARM_ABS12, 6)
- RELOC_NUMBER (R_ARM_THM_ABS5, 7)
- RELOC_NUMBER (R_ARM_THM_PC22, 8)
- RELOC_NUMBER (R_ARM_SBREL32, 9)
- RELOC_NUMBER (R_ARM_AMP_VCALL9, 10)
- RELOC_NUMBER (R_ARM_THM_PC11, 11) /* Cygnus extension to abi: Thumb unconditional branch. */
- RELOC_NUMBER (R_ARM_THM_PC9, 12) /* Cygnus extension to abi: Thumb conditional branch. */
- RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 13)
- RELOC_NUMBER (R_ARM_GNU_VTENTRY, 14)
-#else /* not OLD_ARM_ABI */
- RELOC_NUMBER (R_ARM_PC13, 4)
- RELOC_NUMBER (R_ARM_ABS16, 5)
- RELOC_NUMBER (R_ARM_ABS12, 6)
- RELOC_NUMBER (R_ARM_THM_ABS5, 7)
- RELOC_NUMBER (R_ARM_ABS8, 8)
- RELOC_NUMBER (R_ARM_SBREL32, 9)
- RELOC_NUMBER (R_ARM_THM_PC22, 10)
- RELOC_NUMBER (R_ARM_THM_PC8, 11)
- RELOC_NUMBER (R_ARM_AMP_VCALL9, 12)
- RELOC_NUMBER (R_ARM_SWI24, 13)
- RELOC_NUMBER (R_ARM_THM_SWI8, 14)
- RELOC_NUMBER (R_ARM_XPC25, 15)
- RELOC_NUMBER (R_ARM_THM_XPC22, 16)
-#endif /* not OLD_ARM_ABI */
- RELOC_NUMBER (R_ARM_COPY, 20) /* Copy symbol at runtime. */
- RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* Create GOT entry. */
- RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* Create PLT entry. */
- RELOC_NUMBER (R_ARM_RELATIVE, 23) /* Adjust by program base. */
- RELOC_NUMBER (R_ARM_GOTOFF, 24) /* 32 bit offset to GOT. */
- RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT. */
- RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry. */
- RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address. */
-#ifdef OLD_ARM_ABI
- FAKE_RELOC (FIRST_INVALID_RELOC, 28)
- FAKE_RELOC (LAST_INVALID_RELOC, 249)
-#else /* not OLD_ARM_ABI */
- FAKE_RELOC (FIRST_INVALID_RELOC1, 28)
- FAKE_RELOC (LAST_INVALID_RELOC1, 31)
- RELOC_NUMBER (R_ARM_ALU_PCREL7_0, 32)
- RELOC_NUMBER (R_ARM_ALU_PCREL15_8, 33)
- RELOC_NUMBER (R_ARM_ALU_PCREL23_15, 34)
- RELOC_NUMBER (R_ARM_LDR_SBREL11_0, 35)
- RELOC_NUMBER (R_ARM_ALU_SBREL19_12, 36)
- RELOC_NUMBER (R_ARM_ALU_SBREL27_20, 37)
- FAKE_RELOC (FIRST_INVALID_RELOC2, 38)
- FAKE_RELOC (LAST_INVALID_RELOC2, 99)
- RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100)
- RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101)
- RELOC_NUMBER (R_ARM_THM_PC11, 102) /* Cygnus extension to abi: Thumb unconditional branch. */
- RELOC_NUMBER (R_ARM_THM_PC9, 103) /* Cygnus extension to abi: Thumb conditional branch. */
- FAKE_RELOC (FIRST_INVALID_RELOC3, 104)
- FAKE_RELOC (LAST_INVALID_RELOC3, 248)
- RELOC_NUMBER (R_ARM_RXPC25, 249)
-#endif /* not OLD_ARM_ABI */
- RELOC_NUMBER (R_ARM_RSBREL32, 250)
- RELOC_NUMBER (R_ARM_THM_RPC22, 251)
- RELOC_NUMBER (R_ARM_RREL32, 252)
- RELOC_NUMBER (R_ARM_RABS32, 253)
- RELOC_NUMBER (R_ARM_RPC24, 254)
- RELOC_NUMBER (R_ARM_RBASE, 255)
+/* AAELF official names and numbers. */
+ RELOC_NUMBER (R_ARM_NONE, 0)
+ RELOC_NUMBER (R_ARM_PC24, 1) /* deprecated */
+ RELOC_NUMBER (R_ARM_ABS32, 2)
+ RELOC_NUMBER (R_ARM_REL32, 3)
+ RELOC_NUMBER (R_ARM_LDR_PC_G0, 4)
+ RELOC_NUMBER (R_ARM_ABS16, 5)
+ RELOC_NUMBER (R_ARM_ABS12, 6)
+ RELOC_NUMBER (R_ARM_THM_ABS5, 7)
+ RELOC_NUMBER (R_ARM_ABS8, 8)
+ RELOC_NUMBER (R_ARM_SBREL32, 9)
+ RELOC_NUMBER (R_ARM_THM_CALL, 10)
+ RELOC_NUMBER (R_ARM_THM_PC8, 11)
+ RELOC_NUMBER (R_ARM_BREL_ADJ, 12)
+ RELOC_NUMBER (R_ARM_SWI24, 13) /* obsolete */
+ RELOC_NUMBER (R_ARM_THM_SWI8, 14) /* obsolete */
+ RELOC_NUMBER (R_ARM_XPC25, 15) /* obsolete */
+ RELOC_NUMBER (R_ARM_THM_XPC22, 16) /* obsolete */
+ RELOC_NUMBER (R_ARM_TLS_DTPMOD32, 17)
+ RELOC_NUMBER (R_ARM_TLS_DTPOFF32, 18)
+ RELOC_NUMBER (R_ARM_TLS_TPOFF32, 19)
+ RELOC_NUMBER (R_ARM_COPY, 20) /* Copy symbol at runtime. */
+ RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* Create GOT entry. */
+ RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* Create PLT entry. */
+ RELOC_NUMBER (R_ARM_RELATIVE, 23) /* Adjust by program base. */
+ RELOC_NUMBER (R_ARM_GOTOFF32, 24) /* 32 bit offset to GOT. */
+ RELOC_NUMBER (R_ARM_BASE_PREL, 25) /* 32 bit PC relative offset to GOT. */
+ RELOC_NUMBER (R_ARM_GOT_BREL, 26) /* 32 bit GOT entry. */
+ RELOC_NUMBER (R_ARM_PLT32, 27) /* deprecated - 32 bit PLT address. */
+ RELOC_NUMBER (R_ARM_CALL, 28)
+ RELOC_NUMBER (R_ARM_JUMP24, 29)
+ RELOC_NUMBER (R_ARM_THM_JUMP24, 30)
+ RELOC_NUMBER (R_ARM_BASE_ABS, 31)
+ RELOC_NUMBER (R_ARM_ALU_PCREL7_0, 32) /* obsolete */
+ RELOC_NUMBER (R_ARM_ALU_PCREL15_8, 33) /* obsolete */
+ RELOC_NUMBER (R_ARM_ALU_PCREL23_15, 34) /* obsolete */
+ RELOC_NUMBER (R_ARM_LDR_SBREL_11_0, 35) /* deprecated, should have _NC suffix */
+ RELOC_NUMBER (R_ARM_ALU_SBREL_19_12, 36) /* deprecated, should have _NC suffix */
+ RELOC_NUMBER (R_ARM_ALU_SBREL_27_20, 37) /* deprecated, should have _CK suffix */
+ RELOC_NUMBER (R_ARM_TARGET1, 38)
+ RELOC_NUMBER (R_ARM_SBREL31, 39) /* deprecated */
+ RELOC_NUMBER (R_ARM_V4BX, 40)
+ RELOC_NUMBER (R_ARM_TARGET2, 41)
+ RELOC_NUMBER (R_ARM_PREL31, 42)
+ RELOC_NUMBER (R_ARM_MOVW_ABS_NC, 43)
+ RELOC_NUMBER (R_ARM_MOVT_ABS, 44)
+ RELOC_NUMBER (R_ARM_MOVW_PREL_NC, 45)
+ RELOC_NUMBER (R_ARM_MOVT_PREL, 46)
+ RELOC_NUMBER (R_ARM_THM_MOVW_ABS_NC, 47)
+ RELOC_NUMBER (R_ARM_THM_MOVT_ABS, 48)
+ RELOC_NUMBER (R_ARM_THM_MOVW_PREL_NC, 49)
+ RELOC_NUMBER (R_ARM_THM_MOVT_PREL, 50)
+ RELOC_NUMBER (R_ARM_THM_JUMP19, 51)
+ RELOC_NUMBER (R_ARM_THM_JUMP6, 52)
+ RELOC_NUMBER (R_ARM_THM_ALU_PREL_11_0, 53)
+ RELOC_NUMBER (R_ARM_THM_PC12, 54)
+ RELOC_NUMBER (R_ARM_ABS32_NOI, 55)
+ RELOC_NUMBER (R_ARM_REL32_NOI, 56)
+ RELOC_NUMBER (R_ARM_ALU_PC_G0_NC, 57)
+ RELOC_NUMBER (R_ARM_ALU_PC_G0, 58)
+ RELOC_NUMBER (R_ARM_ALU_PC_G1_NC, 59)
+ RELOC_NUMBER (R_ARM_ALU_PC_G1, 60)
+ RELOC_NUMBER (R_ARM_ALU_PC_G2, 61)
+ RELOC_NUMBER (R_ARM_LDR_PC_G1, 62)
+ RELOC_NUMBER (R_ARM_LDR_PC_G2, 63)
+ RELOC_NUMBER (R_ARM_LDRS_PC_G0, 64)
+ RELOC_NUMBER (R_ARM_LDRS_PC_G1, 65)
+ RELOC_NUMBER (R_ARM_LDRS_PC_G2, 66)
+ RELOC_NUMBER (R_ARM_LDC_PC_G0, 67)
+ RELOC_NUMBER (R_ARM_LDC_PC_G1, 68)
+ RELOC_NUMBER (R_ARM_LDC_PC_G2, 69)
+ RELOC_NUMBER (R_ARM_ALU_SB_G0_NC, 70)
+ RELOC_NUMBER (R_ARM_ALU_SB_G0, 71)
+ RELOC_NUMBER (R_ARM_ALU_SB_G1_NC, 72)
+ RELOC_NUMBER (R_ARM_ALU_SB_G1, 73)
+ RELOC_NUMBER (R_ARM_ALU_SB_G2, 74)
+ RELOC_NUMBER (R_ARM_LDR_SB_G0, 75)
+ RELOC_NUMBER (R_ARM_LDR_SB_G1, 76)
+ RELOC_NUMBER (R_ARM_LDR_SB_G2, 77)
+ 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_MOVW_BREL_NC, 84)
+ RELOC_NUMBER (R_ARM_MOVT_BREL, 85)
+ RELOC_NUMBER (R_ARM_MOVW_BREL, 86)
+ RELOC_NUMBER (R_ARM_THM_MOVW_BREL_NC, 87)
+ RELOC_NUMBER (R_ARM_THM_MOVT_BREL, 88)
+ RELOC_NUMBER (R_ARM_THM_MOVW_BREL, 89)
+ /* 90-93 unallocated */
+ RELOC_NUMBER (R_ARM_PLT32_ABS, 94)
+ RELOC_NUMBER (R_ARM_GOT_ABS, 95)
+ RELOC_NUMBER (R_ARM_GOT_PREL, 96)
+ RELOC_NUMBER (R_ARM_GOT_BREL12, 97)
+ RELOC_NUMBER (R_ARM_GOTOFF12, 98)
+ RELOC_NUMBER (R_ARM_GOTRELAX, 99)
+ RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100) /* deprecated - old C++ abi */
+ RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101) /* deprecated - old C++ abi */
+ RELOC_NUMBER (R_ARM_THM_JUMP11, 102)
+ RELOC_NUMBER (R_ARM_THM_JUMP8, 103)
+ RELOC_NUMBER (R_ARM_TLS_GD32, 104)
+ RELOC_NUMBER (R_ARM_TLS_LDM32, 105)
+ RELOC_NUMBER (R_ARM_TLS_LDO32, 106)
+ RELOC_NUMBER (R_ARM_TLS_IE32, 107)
+ RELOC_NUMBER (R_ARM_TLS_LE32, 108)
+ RELOC_NUMBER (R_ARM_TLS_LDO12, 109)
+ RELOC_NUMBER (R_ARM_TLS_LE12, 110)
+ RELOC_NUMBER (R_ARM_TLS_IE12GP, 111)
+ /* 112 - 127 private range */
+ RELOC_NUMBER (R_ARM_ME_TOO, 128) /* obsolete */
+
+ /* Extensions? R=read-only? */
+ RELOC_NUMBER (R_ARM_RXPC25, 249)
+ RELOC_NUMBER (R_ARM_RSBREL32, 250)
+ RELOC_NUMBER (R_ARM_THM_RPC22, 251)
+ RELOC_NUMBER (R_ARM_RREL32, 252)
+ RELOC_NUMBER (R_ARM_RABS32, 253)
+ RELOC_NUMBER (R_ARM_RPC24, 254)
+ RELOC_NUMBER (R_ARM_RBASE, 255)
+
+ /* Unofficial names for some of the relocs. */
+ FAKE_RELOC (R_ARM_GOTOFF, R_ARM_GOTOFF32) /* 32 bit offset to GOT. */
+ FAKE_RELOC (R_ARM_THM_PC22, R_ARM_THM_CALL)
+ FAKE_RELOC (R_ARM_THM_PC11, R_ARM_THM_JUMP11)
+ FAKE_RELOC (R_ARM_THM_PC9, R_ARM_THM_JUMP8)
+
+ /* Relocs with both a different name, and (apparently) different meaning in
+ GNU usage. */
+ FAKE_RELOC (R_ARM_GOTPC, R_ARM_BASE_PREL) /* 32 bit PC relative offset to GOT. */
+ 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 *);
+
+enum
+{
+ Tag_NULL,
+ Tag_File,
+ Tag_Section,
+ Tag_Symbol,
+ Tag_CPU_raw_name,
+ Tag_CPU_name,
+ Tag_CPU_arch,
+ Tag_CPU_arch_profile,
+ Tag_ARM_ISA_use,
+ Tag_THUMB_ISA_use,
+ Tag_VFP_arch,
+ Tag_WMMX_arch,
+ Tag_NEON_arch,
+ Tag_PCS_config,
+ Tag_ABI_PCS_R9_use,
+ Tag_ABI_PCS_RW_data,
+ Tag_ABI_PCS_RO_data,
+ Tag_ABI_PCS_GOT_use,
+ Tag_ABI_PCS_wchar_t,
+ Tag_ABI_FP_rounding,
+ Tag_ABI_FP_denormal,
+ Tag_ABI_FP_exceptions,
+ Tag_ABI_FP_user_exceptions,
+ Tag_ABI_FP_number_model,
+ Tag_ABI_align8_needed,
+ Tag_ABI_align8_preserved,
+ Tag_ABI_enum_size,
+ Tag_ABI_HardFP_use,
+ Tag_ABI_VFP_args,
+ Tag_ABI_WMMX_args,
+ Tag_ABI_optimization_goals,
+ Tag_ABI_FP_optimization_goals,
+ Tag_compatibility,
+};
+
+#endif
+
/* The name of the note section used to identify arm variants. */
#define ARM_NOTE_SECTION ".note.gnu.arm.ident"
-
+
+/* Special section names. */
+#define ELF_STRING_ARM_unwind ".ARM.exidx"
+#define ELF_STRING_ARM_unwind_info ".ARM.extab"
+#define ELF_STRING_ARM_unwind_once ".gnu.linkonce.armexidx."
+#define ELF_STRING_ARM_unwind_info_once ".gnu.linkonce.armextab."
+
#endif /* _ELF_ARM_H */
diff --git a/contrib/binutils/include/elf/avr.h b/contrib/binutils/include/elf/avr.h
index 59cf07347159..f16043805eb6 100644
--- a/contrib/binutils/include/elf/avr.h
+++ b/contrib/binutils/include/elf/avr.h
@@ -1,22 +1,22 @@
/* AVR ELF support for BFD.
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2004 Free Software Foundation, Inc.
Contributed by Denis Chertykov <denisc@overta.ru>
-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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_AVR_H
#define _ELF_AVR_H
@@ -26,6 +26,10 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
/* Processor specific flags for the ELF header e_flags field. */
#define EF_AVR_MACH 0xf
+/* If bit #7 is set, it is assumed that the elf file uses local symbols
+ as reference for the relocations so that linker relaxation is possible. */
+#define EF_AVR_LINKRELAX_PREPARED 0x80
+
#define E_AVR_MACH_AVR1 1
#define E_AVR_MACH_AVR2 2
#define E_AVR_MACH_AVR3 3
@@ -53,6 +57,11 @@ START_RELOC_NUMBERS (elf_avr_reloc_type)
RELOC_NUMBER (R_AVR_HI8_LDI_PM_NEG, 16)
RELOC_NUMBER (R_AVR_HH8_LDI_PM_NEG, 17)
RELOC_NUMBER (R_AVR_CALL, 18)
+ RELOC_NUMBER (R_AVR_LDI, 19)
+ RELOC_NUMBER (R_AVR_6, 20)
+ RELOC_NUMBER (R_AVR_6_ADIW, 21)
+ RELOC_NUMBER (R_AVR_MS8_LDI, 22)
+ RELOC_NUMBER (R_AVR_MS8_LDI_NEG, 23)
END_RELOC_NUMBERS (R_AVR_max)
#endif /* _ELF_AVR_H */
diff --git a/contrib/binutils/include/elf/bfin.h b/contrib/binutils/include/elf/bfin.h
new file mode 100644
index 000000000000..3c07cd166c88
--- /dev/null
+++ b/contrib/binutils/include/elf/bfin.h
@@ -0,0 +1,92 @@
+/* Blackfin ELF support for BFD.
+ Copyright (C) 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.,
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _ELF_BFIN_H
+#define _ELF_BFIN_H
+
+#include "elf/reloc-macros.h"
+
+START_RELOC_NUMBERS (elf_bfin_reloc_type)
+ RELOC_NUMBER (R_unused0, 0x00) /* relocation type 0 is not defined*/
+ RELOC_NUMBER (R_pcrel5m2, 0x01) /*LSETUP part a*/
+ RELOC_NUMBER (R_unused1, 0x02) /* relocation type 2 is not defined*/
+ RELOC_NUMBER (R_pcrel10, 0x03) /* type 3, 0x00) if cc jump <target> */
+ RELOC_NUMBER (R_pcrel12_jump, 0x04) /* type 4, 0x00) jump <target> */
+ RELOC_NUMBER (R_rimm16, 0x05) /* type 0x5, 0x00) rN = <target> */
+ RELOC_NUMBER (R_luimm16, 0x06) /* # 0x6, 0x00) preg.l=<target> Load imm 16 to lower half */
+ RELOC_NUMBER (R_huimm16, 0x07) /* # 0x7, 0x00) preg.h=<target> Load imm 16 to upper half*/
+ RELOC_NUMBER (R_pcrel12_jump_s, 0x08) /* # 0x8 jump.s <target> */
+ RELOC_NUMBER (R_pcrel24_jump_x, 0x09) /* # 0x9 jump.x <target> */
+ RELOC_NUMBER (R_pcrel24, 0x0a) /* # 0xa call <target> , 0x00) not expandable*/
+ RELOC_NUMBER (R_unusedb, 0x0b) /* # 0xb not generated */
+ RELOC_NUMBER (R_unusedc, 0x0c) /* # 0xc not used */
+ RELOC_NUMBER (R_pcrel24_jump_l, 0x0d) /*0xd jump.l <target>*/
+ RELOC_NUMBER (R_pcrel24_call_x, 0x0e) /* 0xE, 0x00) call.x <target> if <target> is above 24 bit limit call through P1 */
+ RELOC_NUMBER (R_var_eq_symb, 0x0f) /* 0xf, 0x00) linker should treat it same as 0x12 */
+ RELOC_NUMBER (R_byte_data, 0x10) /* 0x10, 0x00) .byte var = symbol */
+ RELOC_NUMBER (R_byte2_data, 0x11) /* 0x11, 0x00) .byte2 var = symbol */
+ RELOC_NUMBER (R_byte4_data, 0x12) /* 0x12, 0x00) .byte4 var = symbol and .var var=symbol */
+ RELOC_NUMBER (R_pcrel11, 0x13) /* 0x13, 0x00) lsetup part b */
+ RELOC_NUMBER (R_BFIN_GOT17M4, 0x14)
+ RELOC_NUMBER (R_BFIN_GOTHI, 0x15)
+ RELOC_NUMBER (R_BFIN_GOTLO, 0x16)
+ RELOC_NUMBER (R_BFIN_FUNCDESC, 0x17)
+ RELOC_NUMBER (R_BFIN_FUNCDESC_GOT17M4, 0x18)
+ RELOC_NUMBER (R_BFIN_FUNCDESC_GOTHI, 0x19)
+ RELOC_NUMBER (R_BFIN_FUNCDESC_GOTLO, 0x1a)
+ RELOC_NUMBER (R_BFIN_FUNCDESC_VALUE, 0x1b)
+ RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFF17M4, 0x1c)
+ RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFFHI, 0x1d)
+ RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFFLO, 0x1e)
+ RELOC_NUMBER (R_BFIN_GOTOFF17M4, 0x1f)
+ RELOC_NUMBER (R_BFIN_GOTOFFHI, 0x20)
+ RELOC_NUMBER (R_BFIN_GOTOFFLO, 0x21)
+
+ RELOC_NUMBER (R_push, 0xE0)
+ RELOC_NUMBER (R_const, 0xE1)
+ RELOC_NUMBER (R_add, 0xE2)
+ RELOC_NUMBER (R_sub, 0xE3)
+ RELOC_NUMBER (R_mult, 0xE4)
+ RELOC_NUMBER (R_div, 0xE5)
+ RELOC_NUMBER (R_mod, 0xE6)
+ RELOC_NUMBER (R_lshift, 0xE7)
+ RELOC_NUMBER (R_rshift, 0xE8)
+ RELOC_NUMBER (R_and, 0xE9)
+ RELOC_NUMBER (R_or, 0xEA)
+ RELOC_NUMBER (R_xor, 0xEB)
+ RELOC_NUMBER (R_land, 0xEC)
+ RELOC_NUMBER (R_lor, 0xED)
+ RELOC_NUMBER (R_len, 0xEE)
+ RELOC_NUMBER (R_neg, 0xEF)
+ RELOC_NUMBER (R_comp, 0xF0)
+ RELOC_NUMBER (R_page, 0xF1)
+ RELOC_NUMBER (R_hwpage, 0xF2)
+ RELOC_NUMBER (R_addr, 0xF3)
+ RELOC_NUMBER (R_pltpc, 0x40) /* PLT gnu only relocation */
+ RELOC_NUMBER (R_got, 0x41) /* GOT gnu only relocation */
+ RELOC_NUMBER (R_BFIN_GNU_VTINHERIT, 0x42) /* C++, gnu only */
+ RELOC_NUMBER (R_BFIN_GNU_VTENTRY, 0x43) /* C++, gnu only */
+END_RELOC_NUMBERS (R_max)
+
+/* Processor specific flags for the ELF header e_flags field. */
+#define EF_BFIN_PIC 0x00000001 /* -fpic */
+#define EF_BFIN_FDPIC 0x00000002 /* -mfdpic */
+
+#define EF_BFIN_PIC_FLAGS (EF_BFIN_PIC | EF_BFIN_FDPIC)
+#endif /* _ELF_BFIN_H */
diff --git a/contrib/binutils/include/elf/common.h b/contrib/binutils/include/elf/common.h
index bf233f61dfdb..b11171b56b40 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
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -21,7 +21,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file is part of ELF support for BFD, and contains the portions
@@ -180,7 +180,11 @@
#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
#define EM_IP2K 101 /* Ubicom IP2022 micro controller */
+#define EM_CR 103 /* National Semiconductor CompactRISC */
#define EM_MSP430 105 /* TI msp430 micro controller */
+#define EM_BLACKFIN 106 /* ADI Blackfin */
+#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */
+#define EM_CRX 114 /* National Semiconductor CRX */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -194,76 +198,85 @@
unofficial e_machine number should eventually ask registry@caldera.com for
an officially blessed number to be added to the list above. */
-#define EM_PJ_OLD 99 /* picoJava */
+/* Old version of Sparc v9, from before the ABI;
+ This should be removed shortly. */
+#define EM_OLD_SPARCV9 11
-/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_POWERPC 0x9025
+/* Old version of PowerPC, this should be removed shortly. */
+#define EM_PPC_OLD 17
-/* Old version of Sparc v9, from before the ABI; this should be
- removed shortly. */
-#define EM_OLD_SPARCV9 11
+/* picoJava */
+#define EM_PJ_OLD 99
-/* Old version of PowerPC, this should be removed shortly. */
-#define EM_PPC_OLD 17
+/* AVR magic number. Written in the absense of an ABI. */
+#define EM_AVR_OLD 0x1057
-/* (Deprecated) Temporary number for the OpenRISC processor. */
-#define EM_OR32 0x8472
+/* MSP430 magic number. Written in the absense of everything. */
+#define EM_MSP430_OLD 0x1059
-/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_M32R 0x9041
+/* Morpho MT. Written in the absense of an ABI. */
+#define EM_MT 0x2530
-/* Alpha backend magic number. Written in the absence of an ABI. */
-#define EM_ALPHA 0x9026
+/* FR30 magic number - no EABI available. */
+#define EM_CYGNUS_FR30 0x3330
-/* old S/390 backend magic number. Written in the absence of an ABI. */
-#define EM_S390_OLD 0xa390
+/* OpenRISC magic number. Written in the absense of an ABI. */
+#define EM_OPENRISC_OLD 0x3426
+
+/* DLX magic number. Written in the absense of an ABI. */
+#define EM_DLX 0x5aa5
+
+/* FRV magic number - no EABI available??. */
+#define EM_CYGNUS_FRV 0x5441
+
+/* Infineon Technologies 16-bit microcontroller with C166-V2 core. */
+#define EM_XC16X 0x4688
/* D10V backend magic number. Written in the absence of an ABI. */
-#define EM_CYGNUS_D10V 0x7650
+#define EM_CYGNUS_D10V 0x7650
/* D30V backend magic number. Written in the absence of an ABI. */
-#define EM_CYGNUS_D30V 0x7676
+#define EM_CYGNUS_D30V 0x7676
-/* V850 backend magic number. Written in the absense of an ABI. */
-#define EM_CYGNUS_V850 0x9080
+/* Ubicom IP2xxx; Written in the absense of an ABI. */
+#define EM_IP2K_OLD 0x8217
-/* mn10200 and mn10300 backend magic numbers.
- Written in the absense of an ABI. */
-#define EM_CYGNUS_MN10200 0xdead
-#define EM_CYGNUS_MN10300 0xbeef
+/* (Deprecated) Temporary number for the OpenRISC processor. */
+#define EM_OR32 0x8472
-/* FR30 magic number - no EABI available. */
-#define EM_CYGNUS_FR30 0x3330
+/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
+#define EM_CYGNUS_POWERPC 0x9025
-/* AVR magic number
- Written in the absense of an ABI. */
-#define EM_AVR_OLD 0x1057
+/* Alpha backend magic number. Written in the absence of an ABI. */
+#define EM_ALPHA 0x9026
-/* OpenRISC magic number
- Written in the absense of an ABI. */
-#define EM_OPENRISC_OLD 0x3426
+/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
+#define EM_CYGNUS_M32R 0x9041
-/* DLX magic number
- Written in the absense of an ABI. */
-#define EM_DLX 0x5aa5
+/* V850 backend magic number. Written in the absense of an ABI. */
+#define EM_CYGNUS_V850 0x9080
-#define EM_XSTORMY16 0xad45
+/* old S/390 backend magic number. Written in the absence of an ABI. */
+#define EM_S390_OLD 0xa390
-/* FRV magic number - no EABI available??. */
-#define EM_CYGNUS_FRV 0x5441
+/* Old, unofficial value for Xtensa. */
+#define EM_XTENSA_OLD 0xabc7
-/* Ubicom IP2xxx; no ABI */
-#define EM_IP2K_OLD 0x8217
+#define EM_XSTORMY16 0xad45
-/* MSP430 magic number
- Written in the absense everything. */
-#define EM_MSP430_OLD 0x1059
+/* mn10200 and mn10300 backend magic numbers.
+ Written in the absense of an ABI. */
+#define EM_CYGNUS_MN10300 0xbeef
+#define EM_CYGNUS_MN10200 0xdead
+
+/* Renesas M32C and M16C. */
+#define EM_M32C 0xFEB0
/* Vitesse IQ2000. */
#define EM_IQ2000 0xFEBA
-/* Old, unofficial value for Xtensa. */
-#define EM_XTENSA_OLD 0xabc7
+/* NIOS magic number - no EABI available. */
+#define EM_NIOS32 0xFEBB
/* See the above comment before you add a new EM_* value here. */
@@ -287,8 +300,10 @@
#define PT_LOPROC 0x70000000 /* Processor-specific */
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
-#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
-#define PT_GNU_STACK (PT_LOOS + 0x474e551)
+#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) /* Frame unwind information */
+#define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
+#define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
+#define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
/* Program segment permissions, in program header p_flags field. */
@@ -493,7 +508,7 @@
#define ELF64_R_SYM(i) ((i) >> 32)
#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
-#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 32) + (bfd_vma) (t))
+#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 31 << 1) + (bfd_vma) (t))
/* Dynamic section tags. */
@@ -562,6 +577,8 @@
#define DT_VALRNGHI 0x6ffffdff
#define DT_ADDRRNGLO 0x6ffffe00
+#define DT_TLSDESC_PLT 0x6ffffef6
+#define DT_TLSDESC_GOT 0x6ffffef7
#define DT_GNU_CONFLICT 0x6ffffef8
#define DT_GNU_LIBLIST 0x6ffffef9
#define DT_CONFIG 0x6ffffefa
diff --git a/contrib/binutils/include/elf/cris.h b/contrib/binutils/include/elf/cris.h
index 3bd03e8aa812..8225baa414ad 100644
--- a/contrib/binutils/include/elf/cris.h
+++ b/contrib/binutils/include/elf/cris.h
@@ -1,5 +1,5 @@
/* CRIS ELF support for BFD.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2004 Free Software Foundation, Inc.
Contributed by Axis Communications AB, Lund, Sweden.
Written by Hans-Peter Nilsson.
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_CRIS_H
#define _ELF_CRIS_H
@@ -98,4 +98,16 @@ END_RELOC_NUMBERS (R_CRIS_max)
/* User symbols in this file have a leading underscore. */
#define EF_CRIS_UNDERSCORE 0x00000001
+/* This is a mask for different incompatible machine variants. */
+#define EF_CRIS_VARIANT_MASK 0x0000000e
+
+/* Variant 0; may contain v0..10 object. */
+#define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000
+
+/* Variant 1; contains v32 object. */
+#define EF_CRIS_VARIANT_V32 0x00000002
+
+/* Variant 2; contains object compatible with v32 and v10. */
+#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004
+
#endif /* _ELF_CRIS_H */
diff --git a/contrib/binutils/include/elf/crx.h b/contrib/binutils/include/elf/crx.h
new file mode 100644
index 000000000000..4893d48d3b40
--- /dev/null
+++ b/contrib/binutils/include/elf/crx.h
@@ -0,0 +1,53 @@
+/* CRX ELF support for BFD.
+ Copyright 2004 Free Software Foundation, Inc.
+ Contributed by Tomer Levi, NSC, Israel.
+ Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
+ Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
+
+ 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_CRX_H
+#define _ELF_CRX_H
+
+#include "elf/reloc-macros.h"
+
+/* Creating indices for reloc_map_index array. */
+START_RELOC_NUMBERS(elf_crx_reloc_type)
+ RELOC_NUMBER (R_CRX_NONE, 0)
+ RELOC_NUMBER (R_CRX_REL4, 1)
+ RELOC_NUMBER (R_CRX_REL8, 2)
+ RELOC_NUMBER (R_CRX_REL8_CMP, 3)
+ RELOC_NUMBER (R_CRX_REL16, 4)
+ RELOC_NUMBER (R_CRX_REL24, 5)
+ RELOC_NUMBER (R_CRX_REL32, 6)
+ RELOC_NUMBER (R_CRX_REGREL12, 7)
+ RELOC_NUMBER (R_CRX_REGREL22, 8)
+ RELOC_NUMBER (R_CRX_REGREL28, 9)
+ RELOC_NUMBER (R_CRX_REGREL32, 10)
+ RELOC_NUMBER (R_CRX_ABS16, 11)
+ RELOC_NUMBER (R_CRX_ABS32, 12)
+ RELOC_NUMBER (R_CRX_NUM8, 13)
+ RELOC_NUMBER (R_CRX_NUM16, 14)
+ RELOC_NUMBER (R_CRX_NUM32, 15)
+ RELOC_NUMBER (R_CRX_IMM16, 16)
+ RELOC_NUMBER (R_CRX_IMM32, 17)
+ RELOC_NUMBER (R_CRX_SWITCH8, 18)
+ RELOC_NUMBER (R_CRX_SWITCH16, 19)
+ RELOC_NUMBER (R_CRX_SWITCH32, 20)
+END_RELOC_NUMBERS(R_CRX_MAX)
+
+#endif /* _ELF_CRX_H */
diff --git a/contrib/binutils/include/elf/d10v.h b/contrib/binutils/include/elf/d10v.h
index 5bc613bc3bfa..bc32d8e1ff20 100644
--- a/contrib/binutils/include/elf/d10v.h
+++ b/contrib/binutils/include/elf/d10v.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_D10V_H
#define _ELF_D10V_H
diff --git a/contrib/binutils/include/elf/d30v.h b/contrib/binutils/include/elf/d30v.h
index 5abb06a551fa..8483a7858219 100644
--- a/contrib/binutils/include/elf/d30v.h
+++ b/contrib/binutils/include/elf/d30v.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_D30V_H
#define _ELF_D30V_H
diff --git a/contrib/binutils/include/elf/dlx.h b/contrib/binutils/include/elf/dlx.h
index 562f600f35db..eea5b80d607b 100644
--- a/contrib/binutils/include/elf/dlx.h
+++ b/contrib/binutils/include/elf/dlx.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_DLX_H
#define _ELF_DLX_H
diff --git a/contrib/binutils/include/elf/dwarf.h b/contrib/binutils/include/elf/dwarf.h
index f79397253a10..6f1bca37039c 100644
--- a/contrib/binutils/include/elf/dwarf.h
+++ b/contrib/binutils/include/elf/dwarf.h
@@ -1,25 +1,26 @@
/* Declarations and definitions of codes relating to the DWARF symbolic
debugging information format.
- Written by Ron Guilmette (rfg@ncd.com)
+ Written by Ron Guilmette (rfg@netcom.com)
-Copyright 1992, 1993, 1995, 1999 Free Software Foundation, Inc.
+Copyright 1992, 1993, 1995, 1999, 2005 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
/* This file is derived from the DWARF specification (a public document)
Revision 1.0.1 (April 8, 1992) developed by the UNIX International
@@ -170,8 +171,8 @@ enum dwarf_attribute {
AT_body_end = (0x8050|FORM_ADDR)
};
-#define AT_lo_user 0x8000 /* implementation-defined range start */
-#define AT_hi_user 0xffff /* implementation-defined range end */
+#define AT_lo_user 0x2000 /* implementation-defined range start */
+#define AT_hi_user 0x3ff0 /* implementation-defined range end */
/* Location atom names and codes. */
@@ -182,7 +183,11 @@ enum dwarf_location_atom {
OP_CONST = 0x04,
OP_DEREF2 = 0x05,
OP_DEREF4 = 0x06,
- OP_ADD = 0x07
+ OP_ADD = 0x07,
+
+ /* GNU extensions. */
+
+ OP_MULT = 0x80
};
#define OP_LO_USER 0x80 /* implementation-defined range start */
@@ -217,7 +222,7 @@ enum dwarf_fundamental_type {
/* GNU extensions
The low order byte must indicate the size (in bytes) for the type.
- All of these types will probably break "classic" svr4 SDB */
+ All of these types will probably break "classic" svr4 SDB. */
FT_long_long = 0x8008,
FT_signed_long_long = 0x8108,
@@ -235,6 +240,9 @@ enum dwarf_fundamental_type {
FT_int64 = 0x9908,
FT_signed_int64 = 0x9a08,
FT_unsigned_int64 = 0x9b08,
+ FT_int128 = 0x9c10,
+ FT_signed_int128 = 0x9d10,
+ FT_unsigned_int128 = 0x9e10,
FT_real32 = 0xa004,
FT_real64 = 0xa108,
@@ -280,10 +288,10 @@ enum dwarf_subscr_data_formats {
/* Derived from above for ease of use. */
-#define FMT_CODE(_FUNDAMENTAL_TYPE_P, _UB_CONST_P, _LB_CONST_P) \
+#define FMT_CODE(_FUNDAMENTAL_TYPE_P, _LB_CONST_P, _UB_CONST_P) \
(((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \
- | ((_UB_CONST_P) ? 0 : 2) \
- | ((_LB_CONST_P) ? 0 : 1))
+ | ((_LB_CONST_P) ? 0 : 2) \
+ | ((_UB_CONST_P) ? 0 : 1))
/* Source language names and codes. */
@@ -298,11 +306,7 @@ enum dwarf_source_language {
LANG_FORTRAN90 = 0x00000008,
LANG_PASCAL83 = 0x00000009,
LANG_MODULA2 = 0x0000000a,
-
- /* GNU extensions */
-
- LANG_CHILL = 0x00009af3, /* random value for GNU Chill */
- LANG_JAVA = 0x00009af4 /* random value + 1 for GNU Java */
+ LANG_JAVA = 0x0000000b
};
#define LANG_lo_user 0x00008000 /* implementation-defined range start */
diff --git a/contrib/binutils/include/elf/dwarf2.h b/contrib/binutils/include/elf/dwarf2.h
index bede7e297a3f..264952af1394 100644
--- a/contrib/binutils/include/elf/dwarf2.h
+++ b/contrib/binutils/include/elf/dwarf2.h
@@ -1,10 +1,10 @@
-/* Declarations and definitions of codes relating to the DWARF2 symbolic
- debugging information format.
+/* Declarations and definitions of codes relating to the DWARF2 and
+ DWARF3 symbolic debugging information formats.
Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
- Office (AJPO), Florida State Unviversity and Silicon Graphics Inc.
+ Office (AJPO), Florida State University and Silicon Graphics Inc.
provided support for this effort -- June 21, 1995.
Derived from the DWARF 1 implementation written by Ron Guilmette
@@ -24,8 +24,8 @@
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* This file is derived from the DWARF specification (a public document)
Revision 2.0.0 (July 27, 1993) developed by the UNIX International
@@ -187,6 +187,8 @@ enum dwarf_tag
DW_TAG_unspecified_type = 0x3b,
DW_TAG_partial_unit = 0x3c,
DW_TAG_imported_unit = 0x3d,
+ DW_TAG_condition = 0x3f,
+ DW_TAG_shared_type = 0x40,
/* SGI/MIPS Extensions. */
DW_TAG_MIPS_loop = 0x4081,
/* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */
@@ -317,6 +319,21 @@ enum dwarf_attribute
DW_AT_call_column = 0x57,
DW_AT_call_file = 0x58,
DW_AT_call_line = 0x59,
+ DW_AT_description = 0x5a,
+ DW_AT_binary_scale = 0x5b,
+ DW_AT_decimal_scale = 0x5c,
+ DW_AT_small = 0x5d,
+ DW_AT_decimal_sign = 0x5e,
+ DW_AT_digit_count = 0x5f,
+ DW_AT_picture_string = 0x60,
+ DW_AT_mutable = 0x61,
+ DW_AT_threads_scaled = 0x62,
+ DW_AT_explicit = 0x63,
+ DW_AT_object_pointer = 0x64,
+ DW_AT_endianity = 0x65,
+ DW_AT_elemental = 0x66,
+ DW_AT_pure = 0x67,
+ DW_AT_recursive = 0x68,
/* SGI/MIPS extensions. */
DW_AT_MIPS_fde = 0x2001,
DW_AT_MIPS_loop_begin = 0x2002,
@@ -518,6 +535,9 @@ enum dwarf_location_atom
DW_OP_call2 = 0x98,
DW_OP_call4 = 0x99,
DW_OP_call_ref = 0x9a,
+ DW_OP_form_tls_address = 0x9b,
+ DW_OP_call_frame_cfa = 0x9c,
+ DW_OP_bit_piece = 0x9d,
/* GNU extensions. */
DW_OP_GNU_push_tls_address = 0xe0,
/* HP extensions. */
@@ -547,6 +567,12 @@ enum dwarf_type
DW_ATE_unsigned_char = 0x8,
/* DWARF 3. */
DW_ATE_imaginary_float = 0x9,
+ DW_ATE_packed_decimal = 0xa,
+ DW_ATE_numeric_string = 0xb,
+ DW_ATE_edited = 0xc,
+ DW_ATE_signed_fixed = 0xd,
+ DW_ATE_unsigned_fixed = 0xe,
+ DW_ATE_decimal_float = 0xf,
/* HP extensions. */
DW_ATE_HP_float80 = 0x80, /* Floating-point (80 bit). */
DW_ATE_HP_complex_float80 = 0x81, /* Complex floating-point (80 bit). */
@@ -560,6 +586,29 @@ enum dwarf_type
#define DW_ATE_lo_user 0x80
#define DW_ATE_hi_user 0xff
+/* Decimal sign encodings. */
+enum dwarf_decimal_sign_encoding
+ {
+ /* DWARF 3. */
+ DW_DS_unsigned = 0x01,
+ DW_DS_leading_overpunch = 0x02,
+ DW_DS_trailing_overpunch = 0x03,
+ DW_DS_leading_separate = 0x04,
+ DW_DS_trailing_separate = 0x05
+ };
+
+/* Endianity encodings. */
+enum dwarf_endianity_encoding
+ {
+ /* DWARF 3. */
+ DW_END_default = 0x00,
+ DW_END_big = 0x01,
+ DW_END_little = 0x02
+ };
+
+#define DW_END_lo_user 0x40
+#define DW_END_hi_user 0xff
+
/* Array ordering names and codes. */
enum dwarf_array_dim_ordering
{
@@ -605,7 +654,8 @@ enum dwarf_calling_convention
{
DW_CC_normal = 0x1,
DW_CC_program = 0x2,
- DW_CC_nocall = 0x3
+ DW_CC_nocall = 0x3,
+ DW_CC_GNU_renesas_sh = 0x40
};
#define DW_CC_lo_user 0x40
@@ -665,6 +715,9 @@ enum dwarf_line_number_x_ops
DW_LNE_HP_define_proc = 0x20
};
+#define DW_LNE_lo_user 0x80
+#define DW_LNE_hi_user 0xff
+
/* Call frame information. */
enum dwarf_call_frame_info
{
@@ -692,6 +745,9 @@ enum dwarf_call_frame_info
DW_CFA_offset_extended_sf = 0x11,
DW_CFA_def_cfa_sf = 0x12,
DW_CFA_def_cfa_offset_sf = 0x13,
+ DW_CFA_val_offset = 0x14,
+ DW_CFA_val_offset_sf = 0x15,
+ DW_CFA_val_expression = 0x16,
/* SGI/MIPS specific. */
DW_CFA_MIPS_advance_loc8 = 0x1d,
/* GNU extensions. */
@@ -725,11 +781,16 @@ enum dwarf_source_language
DW_LANG_Fortran90 = 0x0008,
DW_LANG_Pascal83 = 0x0009,
DW_LANG_Modula2 = 0x000a,
- DW_LANG_Java = 0x000b,
/* DWARF 3. */
+ DW_LANG_Java = 0x000b,
DW_LANG_C99 = 0x000c,
DW_LANG_Ada95 = 0x000d,
DW_LANG_Fortran95 = 0x000e,
+ DW_LANG_PLI = 0x000f,
+ DW_LANG_ObjC = 0x0010,
+ DW_LANG_ObjC_plus_plus = 0x0011,
+ DW_LANG_UPC = 0x0012,
+ DW_LANG_D = 0x0013,
/* MIPS. */
DW_LANG_Mips_Assembler = 0x8001,
/* UPC. */
diff --git a/contrib/binutils/include/elf/external.h b/contrib/binutils/include/elf/external.h
index a171439172d2..5985e94b0226 100644
--- a/contrib/binutils/include/elf/external.h
+++ b/contrib/binutils/include/elf/external.h
@@ -1,5 +1,5 @@
/* ELF support for BFD.
- Copyright 1991, 1992, 1993, 1995, 1997, 1998, 1999, 2001
+ Copyright 1991, 1992, 1993, 1995, 1997, 1998, 1999, 2001, 2003, 2005
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -20,7 +20,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file is part of ELF support for BFD, and contains the portions
@@ -272,5 +272,8 @@ typedef struct
unsigned char a_val[8];
} Elf64_External_Auxv;
+/* Size of SHT_GROUP section entry. */
+
+#define GRP_ENTRY_SIZE 4
#endif /* _ELF_EXTERNAL_H */
diff --git a/contrib/binutils/include/elf/fr30.h b/contrib/binutils/include/elf/fr30.h
index 12a450dffd0a..eb2b93795fcc 100644
--- a/contrib/binutils/include/elf/fr30.h
+++ b/contrib/binutils/include/elf/fr30.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_FR30_H
#define _ELF_FR30_H
diff --git a/contrib/binutils/include/elf/frv.h b/contrib/binutils/include/elf/frv.h
index 8246a21bd410..f2b10974a833 100644
--- a/contrib/binutils/include/elf/frv.h
+++ b/contrib/binutils/include/elf/frv.h
@@ -1,5 +1,5 @@
/* FRV ELF support for BFD.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_FRV_H
#define _ELF_FRV_H
@@ -49,6 +49,22 @@ START_RELOC_NUMBERS (elf_frv_reloc_type)
RELOC_NUMBER (R_FRV_GOTOFF12, 22)
RELOC_NUMBER (R_FRV_GOTOFFHI, 23)
RELOC_NUMBER (R_FRV_GOTOFFLO, 24)
+ RELOC_NUMBER (R_FRV_GETTLSOFF, 25)
+ RELOC_NUMBER (R_FRV_TLSDESC_VALUE, 26)
+ RELOC_NUMBER (R_FRV_GOTTLSDESC12, 27)
+ RELOC_NUMBER (R_FRV_GOTTLSDESCHI, 28)
+ RELOC_NUMBER (R_FRV_GOTTLSDESCLO, 29)
+ RELOC_NUMBER (R_FRV_TLSMOFF12, 30)
+ RELOC_NUMBER (R_FRV_TLSMOFFHI, 31)
+ RELOC_NUMBER (R_FRV_TLSMOFFLO, 32)
+ RELOC_NUMBER (R_FRV_GOTTLSOFF12, 33)
+ RELOC_NUMBER (R_FRV_GOTTLSOFFHI, 34)
+ RELOC_NUMBER (R_FRV_GOTTLSOFFLO, 35)
+ RELOC_NUMBER (R_FRV_TLSOFF, 36)
+ RELOC_NUMBER (R_FRV_TLSDESC_RELAX, 37)
+ RELOC_NUMBER (R_FRV_GETTLSOFF_RELAX, 38)
+ RELOC_NUMBER (R_FRV_TLSOFF_RELAX, 39)
+ RELOC_NUMBER (R_FRV_TLSMOFF, 40)
RELOC_NUMBER (R_FRV_GNU_VTINHERIT, 200)
RELOC_NUMBER (R_FRV_GNU_VTENTRY, 201)
END_RELOC_NUMBERS(R_FRV_max)
@@ -91,6 +107,8 @@ END_RELOC_NUMBERS(R_FRV_max)
#define EF_FRV_CPU_TOMCAT 0x04000000 /* Tomcat, FR500 prototype */
#define EF_FRV_CPU_FR400 0x05000000 /* FRV400 */
#define EF_FRV_CPU_FR550 0x06000000 /* FRV550 */
+#define EF_FRV_CPU_FR405 0x07000000
+#define EF_FRV_CPU_FR450 0x08000000
/* Mask of PIC related bits */
#define EF_FRV_PIC_FLAGS (EF_FRV_PIC | EF_FRV_LIBPIC | EF_FRV_BIGPIC \
diff --git a/contrib/binutils/include/elf/h8.h b/contrib/binutils/include/elf/h8.h
index 1aad7a4ed5ba..1a115add169e 100644
--- a/contrib/binutils/include/elf/h8.h
+++ b/contrib/binutils/include/elf/h8.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_H8_H
#define _ELF_H8_H
diff --git a/contrib/binutils/include/elf/hppa.h b/contrib/binutils/include/elf/hppa.h
index 45e0b9f0f0fb..15be2d5655a3 100644
--- a/contrib/binutils/include/elf/hppa.h
+++ b/contrib/binutils/include/elf/hppa.h
@@ -1,5 +1,5 @@
/* HPPA ELF support for BFD.
- Copyright 1993, 1994, 1995, 1998, 1999, 2000
+ Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2005
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 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. */
@@ -74,6 +74,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Section contains code annotations. */
#define SHT_PARISC_ANNOT 0x70000003
+/* DLKM special section. */
+#define SHT_PARISC_DLKM 0x70000004
+
/* 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. */
@@ -93,6 +96,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Section should go near GP. */
#define SHF_PARISC_SHORT 0x20000000
+/* Section is weak ordered. */
+#define SHF_PARISC_WEAKORDER 0x10000000
/* Identifies the entry point of a millicode routine. */
#define STT_PARISC_MILLI 13
@@ -304,12 +309,6 @@ RELOC_NUMBER (R_PARISC_PCREL16DF, 79)
RELOC_NUMBER (R_PARISC_DIR64, 80)
/* 64-bit doubleword symbol + addend */
-RELOC_NUMBER (R_PARISC_DIR64WR, 81)
-/* 64-bit doubleword RR(symbol, addend) */
-
-RELOC_NUMBER (R_PARISC_DIR64DR, 82)
-/* 64-bit doubleword RR(symbol, addend) */
-
RELOC_NUMBER (R_PARISC_DIR14WR, 83)
/* load/store mod. comp. (2) RR(symbol, addend) */
@@ -489,13 +488,43 @@ typedef enum elf_hppa_reloc_type elf_hppa_reloc_type;
#define PT_PARISC_ARCHEXT 0x70000000
#define PT_PARISC_UNWIND 0x70000001
-#define PF_PARISC_SBP 0x08000000
+#define PT_PARISC_WEAKORDER 0x70000002
+
+/* Flag bits in sh_flags of ElfXX_Shdr. */
+#define SHF_HP_TLS 0x01000000
+#define SHF_HP_NEAR_SHARED 0x02000000
+#define SHF_HP_FAR_SHARED 0x04000000
+#define SHF_HP_COMDAT 0x08000000
+#define SHF_HP_CONST 0x00800000
+
+/* Reserved section header indices. */
+#define SHN_TLS_COMMON (SHN_LOOS + 0x0)
+#define SHN_NS_COMMON (SHN_LOOS + 0x1)
+#define SHN_FS_COMMON (SHN_LOOS + 0x2)
+#define SHN_NS_UNDEF (SHN_LOOS + 0x3)
+#define SHN_FS_UNDEF (SHN_LOOS + 0x4)
+#define SHN_HP_EXTERN (SHN_LOOS + 0x5)
+#define SHN_HP_EXTHINT (SHN_LOOS + 0x6)
+#define SHN_HP_UNDEF_BIND_IMM (SHN_LOOS + 0x7)
+
+/* Values of sh_type in ElfXX_Shdr. */
+#define SHT_HP_OVLBITS (SHT_LOOS + 0x0)
+#define SHT_HP_DLKM (SHT_LOOS + 0x1)
+#define SHT_HP_COMDAT (SHT_LOOS + 0x2)
+#define SHT_HP_OBJDICT (SHT_LOOS + 0x3)
+#define SHT_HP_ANNOT (SHT_LOOS + 0x4)
+
+/* Flag bits in p_flags of ElfXX_Phdr. */
+#define PF_HP_CODE 0x00040000
+#define PF_HP_MODIFY 0x00080000
#define PF_HP_PAGE_SIZE 0x00100000
#define PF_HP_FAR_SHARED 0x00200000
#define PF_HP_NEAR_SHARED 0x00400000
-#define PF_HP_CODE 0x01000000
-#define PF_HP_MODIFY 0x02000000
-#define PF_HP_LAZYSWAP 0x04000000
+#define PF_HP_LAZYSWAP 0x00800000
+#define PF_HP_CODE_DEPR 0x01000000
+#define PF_HP_MODIFY_DEPR 0x02000000
+#define PF_HP_LAZYSWAP_DEPR 0x04000000
+#define PF_PARISC_SBP 0x08000000
#define PF_HP_SBP 0x08000000
@@ -517,19 +546,36 @@ typedef enum elf_hppa_reloc_type elf_hppa_reloc_type;
#define DT_HP_GST_SIZE (OLD_DT_LOOS + 0xa)
#define DT_HP_GST_VERSION (OLD_DT_LOOS + 0xb)
#define DT_HP_GST_HASHVAL (OLD_DT_LOOS + 0xc)
+#define DT_HP_EPLTREL (OLD_DT_LOOS + 0xd)
+#define DT_HP_EPLTRELSZ (OLD_DT_LOOS + 0xe)
+#define DT_HP_FILTERED (OLD_DT_LOOS + 0xf)
+#define DT_HP_FILTER_TLS (OLD_DT_LOOS + 0x10)
+#define DT_HP_COMPAT_FILTERED (OLD_DT_LOOS + 0x11)
+#define DT_HP_LAZYLOAD (OLD_DT_LOOS + 0x12)
+#define DT_HP_BIND_NOW_COUNT (OLD_DT_LOOS + 0x13)
+#define DT_PLT (OLD_DT_LOOS + 0x14)
+#define DT_PLT_SIZE (OLD_DT_LOOS + 0x15)
+#define DT_DLT (OLD_DT_LOOS + 0x16)
+#define DT_DLT_SIZE (OLD_DT_LOOS + 0x17)
/* Values for DT_HP_DLD_FLAGS. */
-#define DT_HP_DEBUG_PRIVATE 0x0001 /* Map text private */
-#define DT_HP_DEBUG_CALLBACK 0x0002 /* Callback */
-#define DT_HP_DEBUG_CALLBACK_BOR 0x0004 /* BOR callback */
-#define DT_HP_NO_ENVVAR 0x0008 /* No env var */
-#define DT_HP_BIND_NOW 0x0010 /* Bind now */
-#define DT_HP_BIND_NONFATAL 0x0020 /* Bind non-fatal */
-#define DT_HP_BIND_VERBOSE 0x0040 /* Bind verbose */
-#define DT_HP_BIND_RESTRICTED 0x0080 /* Bind restricted */
-#define DT_HP_BIND_SYMBOLIC 0x0100 /* Bind symbolic */
-#define DT_HP_RPATH_FIRST 0x0200 /* RPATH first */
-#define DT_HP_BIND_DEPTH_FIRST 0x0400 /* Bind depth-first */
+#define DT_HP_DEBUG_PRIVATE 0x00001 /* Map text private */
+#define DT_HP_DEBUG_CALLBACK 0x00002 /* Callback */
+#define DT_HP_DEBUG_CALLBACK_BOR 0x00004 /* BOR callback */
+#define DT_HP_NO_ENVVAR 0x00008 /* No env var */
+#define DT_HP_BIND_NOW 0x00010 /* Bind now */
+#define DT_HP_BIND_NONFATAL 0x00020 /* Bind non-fatal */
+#define DT_HP_BIND_VERBOSE 0x00040 /* Bind verbose */
+#define DT_HP_BIND_RESTRICTED 0x00080 /* Bind restricted */
+#define DT_HP_BIND_SYMBOLIC 0x00100 /* Bind symbolic */
+#define DT_HP_RPATH_FIRST 0x00200 /* RPATH first */
+#define DT_HP_BIND_DEPTH_FIRST 0x00400 /* Bind depth-first */
+#define DT_HP_GST 0x00800 /* Dld global sym table */
+#define DT_HP_SHLIB_FIXED 0x01000 /* shared vtable support */
+#define DT_HP_MERGE_SHLIB_SEG 0x02000 /* merge shlib data segs */
+#define DT_HP_NODELETE 0x04000 /* never unload */
+#define DT_HP_GROUP 0x08000 /* bind only within group */
+#define DT_HP_PROTECT_LINKAGE_TABLE 0x10000 /* protected linkage table */
/* Program header extensions. */
#define PT_HP_TLS (PT_LOOS + 0x0)
@@ -544,9 +590,25 @@ typedef enum elf_hppa_reloc_type elf_hppa_reloc_type;
#define PT_HP_CORE_MMF (PT_LOOS + 0x9)
#define PT_HP_PARALLEL (PT_LOOS + 0x10)
#define PT_HP_FASTBIND (PT_LOOS + 0x11)
+#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12)
+#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13)
+#define PT_HP_STACK (PT_LOOS + 0x14)
+#define PT_HP_CORE_UTSNAME (PT_LOOS + 0x15)
+
+/* Binding information. */
+#define STB_HP_ALIAS (STB_LOOS + 0x0)
/* Additional symbol types. */
#define STT_HP_OPAQUE (STT_LOOS + 0x1)
#define STT_HP_STUB (STT_LOOS + 0x2)
+/* Note types. */
+#define NT_HP_COMPILER 1
+#define NT_HP_COPYRIGHT 2
+#define NT_HP_VERSION 3
+#define NT_HP_SRCFILE_INFO 4
+#define NT_HP_LINKER 5
+#define NT_HP_INSTRUMENTED 6
+#define NT_HP_UX_OPTIONS 7
+
#endif /* _ELF_HPPA_H */
diff --git a/contrib/binutils/include/elf/i370.h b/contrib/binutils/include/elf/i370.h
index fd5ec4739d51..27bfdccc81ae 100644
--- a/contrib/binutils/include/elf/i370.h
+++ b/contrib/binutils/include/elf/i370.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the i370 ELF ABI. Note
that most of this is not actually implemented by BFD. */
diff --git a/contrib/binutils/include/elf/i386.h b/contrib/binutils/include/elf/i386.h
index 95941196c7e2..e167871f34a7 100644
--- a/contrib/binutils/include/elf/i386.h
+++ b/contrib/binutils/include/elf/i386.h
@@ -1,5 +1,6 @@
/* ix86 ELF support for BFD.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_I386_H
#define _ELF_I386_H
@@ -61,6 +62,13 @@ START_RELOC_NUMBERS (elf_i386_reloc_type)
RELOC_NUMBER (R_386_TLS_DTPMOD32, 35)
RELOC_NUMBER (R_386_TLS_DTPOFF32, 36)
RELOC_NUMBER (R_386_TLS_TPOFF32, 37)
+/* 38 */
+ RELOC_NUMBER (R_386_TLS_GOTDESC, 39)
+ RELOC_NUMBER (R_386_TLS_DESC_CALL,40)
+ RELOC_NUMBER (R_386_TLS_DESC, 41)
+
+ /* Used by Intel. */
+ RELOC_NUMBER (R_386_USED_BY_INTEL_200, 200)
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_386_GNU_VTINHERIT, 250)
diff --git a/contrib/binutils/include/elf/i860.h b/contrib/binutils/include/elf/i860.h
index de34aeb01410..9e76dcda77ba 100644
--- a/contrib/binutils/include/elf/i860.h
+++ b/contrib/binutils/include/elf/i860.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_I860_H
#define _ELF_I860_H
diff --git a/contrib/binutils/include/elf/i960.h b/contrib/binutils/include/elf/i960.h
index 253e438522d7..b96aae9d3821 100644
--- a/contrib/binutils/include/elf/i960.h
+++ b/contrib/binutils/include/elf/i960.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_I960_H
#define _ELF_I960_H
diff --git a/contrib/binutils/include/elf/ia64.h b/contrib/binutils/include/elf/ia64.h
index 06dfa606dc79..c63edc315617 100644
--- a/contrib/binutils/include/elf/ia64.h
+++ b/contrib/binutils/include/elf/ia64.h
@@ -1,5 +1,6 @@
/* IA-64 ELF support for BFD.
- Copyright 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_IA64_H
#define _ELF_IA64_H
@@ -56,6 +57,8 @@
#define SHF_IA_64_SHORT 0x10000000 /* Section near gp. */
#define SHF_IA_64_NORECOV 0x20000000 /* Spec insns w/o recovery. */
+#define SHF_IA_64_HP_TLS 0x01000000 /* HP specific TLS flag. */
+
/* Possible values for sh_type in Elf64_Shdr: */
#define SHT_IA_64_EXT (SHT_LOPROC + 0) /* Extension bits. */
diff --git a/contrib/binutils/include/elf/internal.h b/contrib/binutils/include/elf/internal.h
index a7299d90534d..e4eba7d6cb34 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
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -20,7 +20,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file is part of ELF support for BFD, and contains the portions
@@ -251,4 +251,29 @@ struct elf_segment_map
asection *sections[1];
};
+/* 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))))
+
+/* 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))
+
#endif /* _ELF_INTERNAL_H */
diff --git a/contrib/binutils/include/elf/ip2k.h b/contrib/binutils/include/elf/ip2k.h
index c331b720fa3a..83fe1d41223e 100644
--- a/contrib/binutils/include/elf/ip2k.h
+++ b/contrib/binutils/include/elf/ip2k.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_IP2K_H
#define _ELF_IP2K_H
diff --git a/contrib/binutils/include/elf/iq2000.h b/contrib/binutils/include/elf/iq2000.h
index 83c690c70915..012f2538efa0 100644
--- a/contrib/binutils/include/elf/iq2000.h
+++ b/contrib/binutils/include/elf/iq2000.h
@@ -1,5 +1,5 @@
/* IQ2000 ELF support for BFD.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_IQ2000_H
#define _ELF_IQ2000_H
diff --git a/contrib/binutils/include/elf/m32c.h b/contrib/binutils/include/elf/m32c.h
new file mode 100644
index 000000000000..143773beda61
--- /dev/null
+++ b/contrib/binutils/include/elf/m32c.h
@@ -0,0 +1,67 @@
+/* M32C ELF support for BFD.
+ Copyright (C) 2004 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_M32C_H
+#define _ELF_M32C_H
+
+#include "elf/reloc-macros.h"
+
+ /* Relocations. */
+ START_RELOC_NUMBERS (elf_m32c_reloc_type)
+ RELOC_NUMBER (R_M32C_NONE, 0)
+ RELOC_NUMBER (R_M32C_16, 1)
+ RELOC_NUMBER (R_M32C_24, 2)
+ RELOC_NUMBER (R_M32C_32, 3)
+ RELOC_NUMBER (R_M32C_8_PCREL, 4)
+ RELOC_NUMBER (R_M32C_16_PCREL, 5)
+
+ /* 8 bit unsigned address, used for dsp8[a0] etc */
+ RELOC_NUMBER (R_M32C_8, 6)
+ /* Bits 0..15 of an address, for SMOVF's A0, A1A0, etc. */
+ RELOC_NUMBER (R_M32C_LO16, 7)
+ /* Bits 16..23 of an address, for SMOVF's R1H etc. */
+ RELOC_NUMBER (R_M32C_HI8, 8)
+ /* Bits 16..31 of an address, for LDE's A1A0 etc. */
+ RELOC_NUMBER (R_M32C_HI16, 9)
+
+ /* These are relocs we need when relaxing. */
+ /* Marks various jump opcodes. */
+ RELOC_NUMBER (R_M32C_RL_JUMP, 10)
+ /* Marks standard one-address form. */
+ RELOC_NUMBER (R_M32C_RL_1ADDR, 11)
+ /* Marks standard two-address form. */
+ RELOC_NUMBER (R_M32C_RL_2ADDR, 12)
+
+ END_RELOC_NUMBERS (R_M32C_max)
+
+#define EF_M32C_CPU_M16C 0x00000075 /* default */
+#define EF_M32C_CPU_M32C 0x00000078 /* m32c */
+#define EF_M32C_CPU_MASK 0x0000007F /* specific cpu bits */
+#define EF_M32C_ALL_FLAGS (EF_M32C_CPU_MASK)
+
+/* Define the data & instruction memory discriminator. In a linked
+ executable, an symbol should be deemed to point to an instruction
+ if ((address & M16C_INSN_MASK) == M16C_INSN_VALUE), and similarly
+ for the data space. See also `ld/emulparams/elf32m32c.sh'. */
+#define M32C_DATA_MASK 0xffc00000
+#define M32C_DATA_VALUE 0x00000000
+#define M32C_INSN_MASK 0xffc00000
+#define M32C_INSN_VALUE 0x00400000
+
+#endif /* _ELF_M32C_H */
diff --git a/contrib/binutils/include/elf/m32r.h b/contrib/binutils/include/elf/m32r.h
index 709d79234461..d648df90410b 100644
--- a/contrib/binutils/include/elf/m32r.h
+++ b/contrib/binutils/include/elf/m32r.h
@@ -1,5 +1,5 @@
/* M32R ELF support for BFD.
- Copyright 1996, 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_M32R_H
#define _ELF_M32R_H
@@ -52,6 +52,8 @@ START_RELOC_NUMBERS (elf_m32r_reloc_type)
RELOC_NUMBER (R_M32R_SDA16_RELA, 42)
RELOC_NUMBER (R_M32R_RELA_GNU_VTINHERIT, 43)
RELOC_NUMBER (R_M32R_RELA_GNU_VTENTRY, 44)
+
+ RELOC_NUMBER (R_M32R_REL32, 45)
RELOC_NUMBER (R_M32R_GOT24, 48)
RELOC_NUMBER (R_M32R_26_PLTREL, 49)
@@ -67,6 +69,10 @@ START_RELOC_NUMBERS (elf_m32r_reloc_type)
RELOC_NUMBER (R_M32R_GOTPC_HI_ULO, 59)
RELOC_NUMBER (R_M32R_GOTPC_HI_SLO, 60)
RELOC_NUMBER (R_M32R_GOTPC_LO, 61)
+ RELOC_NUMBER (R_M32R_GOTOFF_HI_ULO, 62)
+ RELOC_NUMBER (R_M32R_GOTOFF_HI_SLO, 63)
+ RELOC_NUMBER (R_M32R_GOTOFF_LO, 64)
+
END_RELOC_NUMBERS (R_M32R_max)
/* Processor specific section indices. These sections do not actually
diff --git a/contrib/binutils/include/elf/m68hc11.h b/contrib/binutils/include/elf/m68hc11.h
index 1902f7fa678c..1cd4600519cb 100644
--- a/contrib/binutils/include/elf/m68hc11.h
+++ b/contrib/binutils/include/elf/m68hc11.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_M68HC11_H
#define _ELF_M68HC11_H
diff --git a/contrib/binutils/include/elf/m68k.h b/contrib/binutils/include/elf/m68k.h
index 7769c59eb399..08d0c441988b 100644
--- a/contrib/binutils/include/elf/m68k.h
+++ b/contrib/binutils/include/elf/m68k.h
@@ -1,5 +1,5 @@
/* MC68k ELF support for BFD.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002, 2005, 2006 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_M68K_H
#define _ELF_M68K_H
@@ -52,7 +52,24 @@ START_RELOC_NUMBERS (elf_m68k_reloc_type)
RELOC_NUMBER (R_68K_GNU_VTENTRY, 24)
END_RELOC_NUMBERS (R_68K_max)
-#define EF_CPU32 0x00810000
-#define EF_M68000 0x01000000
+#define EF_M68K_CPU32 0x00810000
+#define EF_M68K_M68000 0x01000000
+#define EF_M68K_CFV4E 0x00008000
+/* 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 */
+#define EF_M68K_CF_MASK 0xFF
+
#endif
diff --git a/contrib/binutils/include/elf/mcore.h b/contrib/binutils/include/elf/mcore.h
index 387a57d45177..5600df7e8631 100644
--- a/contrib/binutils/include/elf/mcore.h
+++ b/contrib/binutils/include/elf/mcore.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the MCore ELF ABI. */
#ifndef _ELF_MORE_H
diff --git a/contrib/binutils/include/elf/mips.h b/contrib/binutils/include/elf/mips.h
index 3454aac1e482..d099bb8914be 100644
--- a/contrib/binutils/include/elf/mips.h
+++ b/contrib/binutils/include/elf/mips.h
@@ -73,16 +73,40 @@ START_RELOC_NUMBERS (elf_mips_reloc_type)
RELOC_NUMBER (R_MIPS_PJUMP, 35)
RELOC_NUMBER (R_MIPS_RELGOT, 36)
RELOC_NUMBER (R_MIPS_JALR, 37)
- RELOC_NUMBER (R_MIPS_max, 38)
+ /* TLS relocations. */
+ RELOC_NUMBER (R_MIPS_TLS_DTPMOD32, 38)
+ RELOC_NUMBER (R_MIPS_TLS_DTPREL32, 39)
+ RELOC_NUMBER (R_MIPS_TLS_DTPMOD64, 40)
+ RELOC_NUMBER (R_MIPS_TLS_DTPREL64, 41)
+ RELOC_NUMBER (R_MIPS_TLS_GD, 42)
+ RELOC_NUMBER (R_MIPS_TLS_LDM, 43)
+ RELOC_NUMBER (R_MIPS_TLS_DTPREL_HI16, 44)
+ RELOC_NUMBER (R_MIPS_TLS_DTPREL_LO16, 45)
+ RELOC_NUMBER (R_MIPS_TLS_GOTTPREL, 46)
+ RELOC_NUMBER (R_MIPS_TLS_TPREL32, 47)
+ 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)
/* These relocs are used for the mips16. */
+ FAKE_RELOC (R_MIPS16_min, 100)
RELOC_NUMBER (R_MIPS16_26, 100)
RELOC_NUMBER (R_MIPS16_GPREL, 101)
- /* These are GNU extensions to handle embedded-pic. */
+ RELOC_NUMBER (R_MIPS16_GOT16, 102)
+ RELOC_NUMBER (R_MIPS16_CALL16, 103)
+ RELOC_NUMBER (R_MIPS16_HI16, 104)
+ RELOC_NUMBER (R_MIPS16_LO16, 105)
+ FAKE_RELOC (R_MIPS16_max, 106)
+ /* These relocations are specific to VxWorks. */
+ RELOC_NUMBER (R_MIPS_COPY, 126)
+ RELOC_NUMBER (R_MIPS_JUMP_SLOT, 127)
+ /* This was a GNU extension used by embedded-PIC. It was co-opted by
+ mips-linux for exception-handling data. It is no longer used, but
+ should continue to be supported by the linker for backward
+ compatibility. (GCC stopped using it in May, 2004.) */
RELOC_NUMBER (R_MIPS_PC32, 248)
- RELOC_NUMBER (R_MIPS_PC64, 249)
+ /* FIXME: this relocation is used internally by gas. */
RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250)
- RELOC_NUMBER (R_MIPS_GNU_REL_LO16, 251)
- RELOC_NUMBER (R_MIPS_GNU_REL_HI16, 252)
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253)
RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254)
@@ -698,6 +722,13 @@ extern void bfd_mips_elf32_swap_reginfo_out
/* This value is used for a mips16 .text symbol. */
#define STO_MIPS16 0xf0
+
+/* This bit is used on Irix to indicate a symbol whose definition
+ is optional - if, at final link time, it cannot be found, no
+ error message should be produced. */
+#define STO_OPTIONAL (1 << 2)
+/* A macro to examine the STO_OPTIONAL bit. */
+#define ELF_MIPS_IS_OPTIONAL(other) ((other) & STO_OPTIONAL)
/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each
relocation entry specifies up to three actual relocations, all at
diff --git a/contrib/binutils/include/elf/mmix.h b/contrib/binutils/include/elf/mmix.h
index 89778e447cac..9661e87b5521 100644
--- a/contrib/binutils/include/elf/mmix.h
+++ b/contrib/binutils/include/elf/mmix.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the MMIX ELF ABI. */
#ifndef ELF_MMIX_H
diff --git a/contrib/binutils/include/elf/mn10200.h b/contrib/binutils/include/elf/mn10200.h
index 1dfade5ccd0d..8461588e3b0d 100644
--- a/contrib/binutils/include/elf/mn10200.h
+++ b/contrib/binutils/include/elf/mn10200.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the MN10200 ELF ABI. */
diff --git a/contrib/binutils/include/elf/mn10300.h b/contrib/binutils/include/elf/mn10300.h
index e640096a24fc..d241e9c61b8f 100644
--- a/contrib/binutils/include/elf/mn10300.h
+++ b/contrib/binutils/include/elf/mn10300.h
@@ -1,5 +1,5 @@
/* MN10300 ELF support for BFD.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the MN10300 ELF ABI. */
diff --git a/contrib/binutils/include/elf/msp430.h b/contrib/binutils/include/elf/msp430.h
index 912ded7685d3..ff16ba2d2603 100644
--- a/contrib/binutils/include/elf/msp430.h
+++ b/contrib/binutils/include/elf/msp430.h
@@ -1,5 +1,5 @@
/* MSP430 ELF support for BFD.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_MSP430_H
#define _ELF_MSP430_H
@@ -50,6 +50,8 @@ START_RELOC_NUMBERS (elf_msp430_reloc_type)
RELOC_NUMBER (R_MSP430_16_PCREL, 4)
RELOC_NUMBER (R_MSP430_16_BYTE, 5)
RELOC_NUMBER (R_MSP430_16_PCREL_BYTE, 6)
+ RELOC_NUMBER (R_MSP430_2X_PCREL, 7)
+ RELOC_NUMBER (R_MSP430_RL_PCREL, 8)
END_RELOC_NUMBERS (R_MSP430_max)
diff --git a/contrib/binutils/include/elf/mt.h b/contrib/binutils/include/elf/mt.h
new file mode 100644
index 000000000000..974c2def6a12
--- /dev/null
+++ b/contrib/binutils/include/elf/mt.h
@@ -0,0 +1,46 @@
+/* MS1 ELF support for BFD.
+ Copyright (C) 2000, 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_MT_H
+#define _ELF_MT_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_mt_reloc_type)
+ RELOC_NUMBER (R_MT_NONE, 0)
+ RELOC_NUMBER (R_MT_16, 1)
+ RELOC_NUMBER (R_MT_32, 2)
+ RELOC_NUMBER (R_MT_32_PCREL, 3)
+ RELOC_NUMBER (R_MT_PC16, 4)
+ RELOC_NUMBER (R_MT_HI16, 5)
+ RELOC_NUMBER (R_MT_LO16, 6)
+END_RELOC_NUMBERS(R_MT_max)
+
+#define EF_MT_CPU_MRISC 0x00000001 /* default */
+#define EF_MT_CPU_MRISC2 0x00000002 /* MRISC2 */
+#define EF_MT_CPU_MS2 0x00000003 /* MS2 */
+#define EF_MT_CPU_MASK 0x00000003 /* specific cpu bits */
+#define EF_MT_ALL_FLAGS (EF_MT_CPU_MASK)
+
+/* The location of the memory mapped hardware stack. */
+#define MT_STACK_VALUE 0x0f000000
+#define MT_STACK_SIZE 0x20
+
+#endif /* _ELF_MT_H */
diff --git a/contrib/binutils/include/elf/openrisc.h b/contrib/binutils/include/elf/openrisc.h
index c60990624f9e..326834e34d9c 100644
--- a/contrib/binutils/include/elf/openrisc.h
+++ b/contrib/binutils/include/elf/openrisc.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_OPENRISC_H
#define _ELF_OPENRISC_H
diff --git a/contrib/binutils/include/elf/or32.h b/contrib/binutils/include/elf/or32.h
index 14884f330c3e..bc308e751e6b 100644
--- a/contrib/binutils/include/elf/or32.h
+++ b/contrib/binutils/include/elf/or32.h
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_OR1K_H
#define _ELF_OR1K_H
diff --git a/contrib/binutils/include/elf/pj.h b/contrib/binutils/include/elf/pj.h
index 586fd3a3608c..45cc7b36a550 100644
--- a/contrib/binutils/include/elf/pj.h
+++ b/contrib/binutils/include/elf/pj.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_PJ_H
#define _ELF_PJ_H
diff --git a/contrib/binutils/include/elf/ppc.h b/contrib/binutils/include/elf/ppc.h
index b510f441c650..ca5035274d9a 100644
--- a/contrib/binutils/include/elf/ppc.h
+++ b/contrib/binutils/include/elf/ppc.h
@@ -1,5 +1,5 @@
/* PPC ELF support for BFD.
- Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003
+ Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
@@ -20,7 +20,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the PPC ELF ABI. Note
that most of this is not actually implemented by BFD. */
@@ -120,10 +120,17 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
-/* Fake relocations for branch stubs. This will keep them
- together. */
-#define R_PPC_RELAX32 251
-#define R_PPC_RELAX32PC 252
+/* Fake relocations for branch stubs, only used internally by ld. */
+#define R_PPC_RELAX32 245
+#define R_PPC_RELAX32PC 246
+#define R_PPC_RELAX32_PLT 247
+#define R_PPC_RELAX32PC_PLT 248
+
+/* These are GNU extensions used in PIC code sequences. */
+ RELOC_NUMBER (R_PPC_REL16, 249)
+ RELOC_NUMBER (R_PPC_REL16_LO, 250)
+ RELOC_NUMBER (R_PPC_REL16_HI, 251)
+ RELOC_NUMBER (R_PPC_REL16_HA, 252)
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253)
@@ -138,6 +145,9 @@ END_RELOC_NUMBERS (R_PPC_max)
#define IS_PPC_TLS_RELOC(R) \
((R) >= R_PPC_TLS && (R) <= R_PPC_GOT_DTPREL16_HA)
+/* Specify the value of _GLOBAL_OFFSET_TABLE_. */
+#define DT_PPC_GOT DT_LOPROC
+
/* Processor specific flags for the ELF header e_flags field. */
#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag. */
diff --git a/contrib/binutils/include/elf/ppc64.h b/contrib/binutils/include/elf/ppc64.h
index ee2b0ea53327..4aab2ec9446a 100644
--- a/contrib/binutils/include/elf/ppc64.h
+++ b/contrib/binutils/include/elf/ppc64.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_PPC64_H
#define _ELF_PPC64_H
diff --git a/contrib/binutils/include/elf/reloc-macros.h b/contrib/binutils/include/elf/reloc-macros.h
index 4a3a60f7ef5e..51e86b5af151 100644
--- a/contrib/binutils/include/elf/reloc-macros.h
+++ b/contrib/binutils/include/elf/reloc-macros.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* These macros are used by the various *.h target specific header
files to either generate an enum containing all the known relocations
diff --git a/contrib/binutils/include/elf/s390.h b/contrib/binutils/include/elf/s390.h
index 3a1306fa7509..c62b110166a6 100644
--- a/contrib/binutils/include/elf/s390.h
+++ b/contrib/binutils/include/elf/s390.h
@@ -1,5 +1,5 @@
/* 390 ELF support for BFD.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Carl B. Pedersen and Martin Schwidefsky.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef _ELF_390_H
#define _ELF_390_H
diff --git a/contrib/binutils/include/elf/sh.h b/contrib/binutils/include/elf/sh.h
index 15d460d36b40..deb7a9dc133d 100644
--- a/contrib/binutils/include/elf/sh.h
+++ b/contrib/binutils/include/elf/sh.h
@@ -1,5 +1,5 @@
/* SH ELF support for BFD.
- Copyright 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_SH_H
#define _ELF_SH_H
@@ -27,56 +27,63 @@
#define EF_SH1 1
#define EF_SH2 2
#define EF_SH3 3
-#define EF_SH_HAS_DSP(flags) (((flags) & EF_SH_MACH_MASK & ~3) == 4)
#define EF_SH_DSP 4
#define EF_SH3_DSP 5
#define EF_SH4AL_DSP 6
-#define EF_SH_HAS_FP(flags) ((flags) & 8)
#define EF_SH3E 8
#define EF_SH4 9
#define EF_SH2E 11
#define EF_SH4A 12
+#define EF_SH2A 13
-#define EF_SH4_NOFPU 0x10
-#define EF_SH4A_NOFPU 0x11
+#define EF_SH4_NOFPU 16
+#define EF_SH4A_NOFPU 17
+#define EF_SH4_NOMMU_NOFPU 18
+#define EF_SH2A_NOFPU 19
+#define EF_SH3_NOMMU 20
+
+#define EF_SH2A_SH4_NOFPU 21
+#define EF_SH2A_SH3_NOFPU 22
+#define EF_SH2A_SH4 23
+#define EF_SH2A_SH3E 24
/* This one can only mix in objects from other EF_SH5 objects. */
#define EF_SH5 10
-#define EF_SH_MERGE_MACH(mach1, mach2) \
- (((((mach1) == EF_SH3 || (mach1) == EF_SH_UNKNOWN) && (mach2) == EF_SH_DSP) \
- || ((mach1) == EF_SH_DSP \
- && ((mach2) == EF_SH3 || (mach2) == EF_SH_UNKNOWN))) \
- ? EF_SH3_DSP \
- : (((mach1) < EF_SH3 && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) < EF_SH3 && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH3 \
- : ((mach1) == EF_SH2E && EF_SH_HAS_FP (mach2)) \
- ? (mach2) \
- : ((mach2) == EF_SH2E && EF_SH_HAS_FP (mach1)) \
- ? (mach1) \
- : (((mach1) == EF_SH2E && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) == EF_SH2E && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH2E \
- : (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH4 \
- /* ??? SH4? Why not SH3E? */ \
- : ((((mach1) == EF_SH4_NOFPU || (mach1) == EF_SH4A_NOFPU) \
- && EF_SH_HAS_DSP (mach2)) \
- || (((mach2) == EF_SH4_NOFPU || (mach2) == EF_SH4A_NOFPU) \
- && EF_SH_HAS_DSP (mach1))) \
- ? EF_SH4AL_DSP \
- : ((mach1) == EF_SH4_NOFPU && EF_SH_HAS_FP (mach2)) \
- ? ((mach2) < EF_SH4A) ? EF_SH4 : (mach2) \
- : ((mach2) == EF_SH4_NOFPU && EF_SH_HAS_FP (mach1)) \
- ? ((mach1) < EF_SH4A) ? EF_SH4 : (mach1) \
- : ((mach1) == EF_SH4A_NOFPU && EF_SH_HAS_FP (mach2)) \
- ? ((mach2) <= EF_SH4A) ? EF_SH4A : (mach2) \
- : ((mach2) == EF_SH4A_NOFPU && EF_SH_HAS_FP (mach1)) \
- ? ((mach1) <= EF_SH4A) ? EF_SH4A : (mach1) \
- : (((mach1) == EF_SH2E ? 7 : (mach1)) > ((mach2) == EF_SH2E ? 7 : (mach2)) \
- ? (mach1) : (mach2)))
+/* Define the mapping from ELF to bfd mach numbers.
+ bfd_mach_* are defined in bfd_in2.h (generated from
+ archures.c). */
+#define EF_SH_BFD_TABLE \
+/* EF_SH_UNKNOWN */ bfd_mach_sh3 , \
+/* EF_SH1 */ bfd_mach_sh , \
+/* EF_SH2 */ bfd_mach_sh2 , \
+/* EF_SH3 */ bfd_mach_sh3 , \
+/* EF_SH_DSP */ bfd_mach_sh_dsp , \
+/* EF_SH3_DSP */ bfd_mach_sh3_dsp , \
+/* EF_SHAL_DSP */ bfd_mach_sh4al_dsp , \
+/* 7 */ 0, \
+/* EF_SH3E */ bfd_mach_sh3e , \
+/* EF_SH4 */ bfd_mach_sh4 , \
+/* EF_SH5 */ 0, \
+/* EF_SH2E */ bfd_mach_sh2e , \
+/* EF_SH4A */ bfd_mach_sh4a , \
+/* EF_SH2A */ bfd_mach_sh2a , \
+/* 14, 15 */ 0, 0, \
+/* EF_SH4_NOFPU */ bfd_mach_sh4_nofpu , \
+/* EF_SH4A_NOFPU */ bfd_mach_sh4a_nofpu , \
+/* EF_SH4_NOMMU_NOFPU */ bfd_mach_sh4_nommu_nofpu, \
+/* EF_SH2A_NOFPU */ bfd_mach_sh2a_nofpu , \
+/* EF_SH3_NOMMU */ bfd_mach_sh3_nommu , \
+/* EF_SH2A_SH4_NOFPU */ bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu, \
+/* EF_SH2A_SH3_NOFPU */ bfd_mach_sh2a_nofpu_or_sh3_nommu, \
+/* EF_SH2A_SH4 */ bfd_mach_sh2a_or_sh4 , \
+/* EF_SH2A_SH3E */ bfd_mach_sh2a_or_sh3e
+
+/* Convert arch_sh* into EF_SH*. */
+int sh_find_elf_flags (unsigned int arch_set);
+
+/* Convert bfd_mach_* into EF_SH*. */
+int sh_elf_get_flags_from_mach (unsigned long mach);
/* Flags for the st_other symbol field.
Keep away from the STV_ visibility flags (bit 0..1). */
diff --git a/contrib/binutils/include/elf/sparc.h b/contrib/binutils/include/elf/sparc.h
index 2d28d26f9b4d..dc20820ec397 100644
--- a/contrib/binutils/include/elf/sparc.h
+++ b/contrib/binutils/include/elf/sparc.h
@@ -1,5 +1,6 @@
/* SPARC ELF support for BFD.
- Copyright 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
By Doug Evans, Cygnus Support, <dje@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_SPARC_H
#define _ELF_SPARC_H
diff --git a/contrib/binutils/include/elf/v850.h b/contrib/binutils/include/elf/v850.h
index 7d5110b33426..95dab49b67d2 100644
--- a/contrib/binutils/include/elf/v850.h
+++ b/contrib/binutils/include/elf/v850.h
@@ -1,5 +1,6 @@
/* V850 ELF support for BFD.
- Copyright 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2000, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Created by Michael Meissner, Cygnus Support <meissner@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the MIPS ELF ABI. Note
that most of this is not actually implemented by BFD. */
@@ -79,6 +80,7 @@ START_RELOC_NUMBERS (v850_reloc_type)
RELOC_NUMBER (R_V850_LONGJUMP, 26)
RELOC_NUMBER (R_V850_ALIGN, 27)
RELOC_NUMBER (R_V850_REL32, 28)
+ RELOC_NUMBER (R_V850_LO16_SPLIT_OFFSET, 29) /* For ld.bu */
END_RELOC_NUMBERS (R_V850_max)
diff --git a/contrib/binutils/include/elf/vax.h b/contrib/binutils/include/elf/vax.h
index c1b5c2b30f22..8cc5a1193ef6 100644
--- a/contrib/binutils/include/elf/vax.h
+++ b/contrib/binutils/include/elf/vax.h
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_VAX_H
#define _ELF_VAX_H
diff --git a/contrib/binutils/include/elf/x86-64.h b/contrib/binutils/include/elf/x86-64.h
index 7e9100dba4a0..b09a558a35bb 100644
--- a/contrib/binutils/include/elf/x86-64.h
+++ b/contrib/binutils/include/elf/x86-64.h
@@ -1,5 +1,6 @@
/* x86_64 ELF support for BFD.
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Contributed by Jan Hubicka <jh@suse.cz>
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_X86_64_H
#define _ELF_X86_64_H
@@ -34,7 +35,7 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_type)
RELOC_NUMBER (R_X86_64_JUMP_SLOT,7) /* Create PLT entry */
RELOC_NUMBER (R_X86_64_RELATIVE, 8) /* Adjust by program base */
RELOC_NUMBER (R_X86_64_GOTPCREL, 9) /* 32 bit signed pc relative
- offset to GOT */
+ offset to GOT entry */
RELOC_NUMBER (R_X86_64_32, 10) /* Direct 32 bit zero extended */
RELOC_NUMBER (R_X86_64_32S, 11) /* Direct 32 bit sign extended */
RELOC_NUMBER (R_X86_64_16, 12) /* Direct 16 bit zero extended */
@@ -49,8 +50,38 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_type)
RELOC_NUMBER (R_X86_64_DTPOFF32, 21) /* Offset in TLS block */
RELOC_NUMBER (R_X86_64_GOTTPOFF, 22) /* PC relative offset to IE GOT entry */
RELOC_NUMBER (R_X86_64_TPOFF32, 23) /* Offset in initial TLS block */
+ RELOC_NUMBER (R_X86_64_PC64, 24) /* PC relative 64 bit */
+ RELOC_NUMBER (R_X86_64_GOTOFF64, 25) /* 64 bit offset to GOT */
+ RELOC_NUMBER (R_X86_64_GOTPC32, 26) /* 32 bit signed pc relative
+ offset to GOT */
+ RELOC_NUMBER (R_X86_64_GOT64, 27) /* 64 bit GOT entry offset */
+ RELOC_NUMBER (R_X86_64_GOTPCREL64, 28) /* 64 bit signed pc relative
+ offset to GOT entry */
+ RELOC_NUMBER (R_X86_64_GOTPC64, 29) /* 64 bit signed pc relative
+ offset to GOT */
+ RELOC_NUMBER (R_X86_64_GOTPLT64, 30) /* like GOT64, but indicates
+ that PLT entry is needed */
+ RELOC_NUMBER (R_X86_64_PLTOFF64, 31) /* 64 bit GOT relative offset
+ to PLT entry */
+ /* 32 .. 33 */
+ RELOC_NUMBER (R_X86_64_GOTPC32_TLSDESC, 34)
+ /* 32 bit signed pc relative
+ offset to TLS descriptor
+ in the GOT. */
+ RELOC_NUMBER (R_X86_64_TLSDESC_CALL, 35) /* Relaxable call through TLS
+ descriptor. */
+ RELOC_NUMBER (R_X86_64_TLSDESC, 36) /* 2x64-bit TLS descriptor. */
RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250) /* GNU C++ hack */
RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251) /* GNU C++ hack */
END_RELOC_NUMBERS (R_X86_64_max)
+/* Processor specific section types. */
+
+#define SHT_X86_64_UNWIND 0x70000001 /* unwind information */
+
+/* Like SHN_COMMON but the symbol will be allocated in the .lbss
+ section. */
+#define SHN_X86_64_LCOMMON 0xff02
+
+#define SHF_X86_64_LARGE 0x10000000
#endif
diff --git a/contrib/binutils/include/elf/xstormy16.h b/contrib/binutils/include/elf/xstormy16.h
index 6b1e98f57743..2442b27f4973 100644
--- a/contrib/binutils/include/elf/xstormy16.h
+++ b/contrib/binutils/include/elf/xstormy16.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ELF_XSTORMY16_H
#define _ELF_XSTORMY16_H
diff --git a/contrib/binutils/include/elf/xtensa.h b/contrib/binutils/include/elf/xtensa.h
index 6c584c715153..0de9741b6d1c 100644
--- a/contrib/binutils/include/elf/xtensa.h
+++ b/contrib/binutils/include/elf/xtensa.h
@@ -1,5 +1,5 @@
/* Xtensa ELF support for BFD.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
This file is part of BFD, the Binary File Descriptor library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
USA. */
/* This file holds definitions specific to the Xtensa ELF ABI. */
@@ -42,6 +42,39 @@ START_RELOC_NUMBERS (elf_xtensa_reloc_type)
RELOC_NUMBER (R_XTENSA_ASM_SIMPLIFY, 12)
RELOC_NUMBER (R_XTENSA_GNU_VTINHERIT, 15)
RELOC_NUMBER (R_XTENSA_GNU_VTENTRY, 16)
+ RELOC_NUMBER (R_XTENSA_DIFF8, 17)
+ RELOC_NUMBER (R_XTENSA_DIFF16, 18)
+ RELOC_NUMBER (R_XTENSA_DIFF32, 19)
+ RELOC_NUMBER (R_XTENSA_SLOT0_OP, 20)
+ RELOC_NUMBER (R_XTENSA_SLOT1_OP, 21)
+ RELOC_NUMBER (R_XTENSA_SLOT2_OP, 22)
+ RELOC_NUMBER (R_XTENSA_SLOT3_OP, 23)
+ RELOC_NUMBER (R_XTENSA_SLOT4_OP, 24)
+ RELOC_NUMBER (R_XTENSA_SLOT5_OP, 25)
+ RELOC_NUMBER (R_XTENSA_SLOT6_OP, 26)
+ RELOC_NUMBER (R_XTENSA_SLOT7_OP, 27)
+ RELOC_NUMBER (R_XTENSA_SLOT8_OP, 28)
+ RELOC_NUMBER (R_XTENSA_SLOT9_OP, 29)
+ RELOC_NUMBER (R_XTENSA_SLOT10_OP, 30)
+ RELOC_NUMBER (R_XTENSA_SLOT11_OP, 31)
+ RELOC_NUMBER (R_XTENSA_SLOT12_OP, 32)
+ RELOC_NUMBER (R_XTENSA_SLOT13_OP, 33)
+ RELOC_NUMBER (R_XTENSA_SLOT14_OP, 34)
+ RELOC_NUMBER (R_XTENSA_SLOT0_ALT, 35)
+ RELOC_NUMBER (R_XTENSA_SLOT1_ALT, 36)
+ RELOC_NUMBER (R_XTENSA_SLOT2_ALT, 37)
+ RELOC_NUMBER (R_XTENSA_SLOT3_ALT, 38)
+ RELOC_NUMBER (R_XTENSA_SLOT4_ALT, 39)
+ RELOC_NUMBER (R_XTENSA_SLOT5_ALT, 40)
+ RELOC_NUMBER (R_XTENSA_SLOT6_ALT, 41)
+ RELOC_NUMBER (R_XTENSA_SLOT7_ALT, 42)
+ RELOC_NUMBER (R_XTENSA_SLOT8_ALT, 43)
+ RELOC_NUMBER (R_XTENSA_SLOT9_ALT, 44)
+ RELOC_NUMBER (R_XTENSA_SLOT10_ALT, 45)
+ RELOC_NUMBER (R_XTENSA_SLOT11_ALT, 46)
+ RELOC_NUMBER (R_XTENSA_SLOT12_ALT, 47)
+ RELOC_NUMBER (R_XTENSA_SLOT13_ALT, 48)
+ RELOC_NUMBER (R_XTENSA_SLOT14_ALT, 49)
END_RELOC_NUMBERS (R_XTENSA_max)
/* Processor-specific flags for the ELF header e_flags field. */
@@ -78,11 +111,88 @@ END_RELOC_NUMBERS (R_XTENSA_max)
#define XTENSA_INSN_SEC_NAME ".xt.insn"
#define XTENSA_LIT_SEC_NAME ".xt.lit"
+#define XTENSA_PROP_SEC_NAME ".xt.prop"
typedef struct property_table_entry_t
{
bfd_vma address;
bfd_vma size;
+ flagword flags;
} property_table_entry;
+/* Flags in the property tables to specify whether blocks of memory are
+ literals, instructions, data, or unreachable. For instructions,
+ blocks that begin loop targets and branch targets are designated.
+ Blocks that do not allow density instructions, instruction reordering
+ or transformation are also specified. Finally, for branch targets,
+ branch target alignment priority is included. Alignment of the next
+ block is specified in the current block and the size of the current
+ block does not include any fill required to align to the next
+ block. */
+
+#define XTENSA_PROP_LITERAL 0x00000001
+#define XTENSA_PROP_INSN 0x00000002
+#define XTENSA_PROP_DATA 0x00000004
+#define XTENSA_PROP_UNREACHABLE 0x00000008
+/* Instruction-only properties at beginning of code. */
+#define XTENSA_PROP_INSN_LOOP_TARGET 0x00000010
+#define XTENSA_PROP_INSN_BRANCH_TARGET 0x00000020
+/* 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
+
+/* Branch target alignment information. This transmits information
+ to the linker optimization about the priority of aligning a
+ particular block for branch target alignment: None, low priority,
+ high priority, or required. These only need to be checked in
+ instruction blocks marked as XTENSA_PROP_INSN_BRANCH_TARGET.
+ Common usage is:
+
+ switch (GET_XTENSA_PROP_BT_ALIGN(flags))
+ case XTENSA_PROP_BT_ALIGN_NONE:
+ case XTENSA_PROP_BT_ALIGN_LOW:
+ case XTENSA_PROP_BT_ALIGN_HIGH:
+ case XTENSA_PROP_BT_ALIGN_REQUIRE:
+*/
+#define XTENSA_PROP_BT_ALIGN_MASK 0x00000600
+
+/* No branch target alignment. */
+#define XTENSA_PROP_BT_ALIGN_NONE 0x0
+/* Low priority branch target alignment. */
+#define XTENSA_PROP_BT_ALIGN_LOW 0x1
+/* High priority branch target alignment. */
+#define XTENSA_PROP_BT_ALIGN_HIGH 0x2
+/* Required branch target alignment. */
+#define XTENSA_PROP_BT_ALIGN_REQUIRE 0x3
+
+#define GET_XTENSA_PROP_BT_ALIGN(flag) \
+ (((unsigned)((flag) & (XTENSA_PROP_BT_ALIGN_MASK))) >> 9)
+#define SET_XTENSA_PROP_BT_ALIGN(flag, align) \
+ (((flag) & (~XTENSA_PROP_BT_ALIGN_MASK)) | \
+ (((align) << 9) & XTENSA_PROP_BT_ALIGN_MASK))
+
+/* Alignment is specified in the block BEFORE the one that needs
+ alignment. Up to 5 bits. Use GET_XTENSA_PROP_ALIGNMENT(flags) to
+ get the required alignment specified as a power of 2. Use
+ SET_XTENSA_PROP_ALIGNMENT(flags, pow2) to set the required
+ alignment. Be careful of side effects since the SET will evaluate
+ flags twice. Also, note that the SIZE of a block in the property
+ table does not include the alignment size, so the alignment fill
+ must be calculated to determine if two blocks are contiguous.
+ TEXT_ALIGN is not currently implemented but is a placeholder for a
+ possible future implementation. */
+
+#define XTENSA_PROP_ALIGN 0x00000800
+
+#define XTENSA_PROP_ALIGNMENT_MASK 0x0001f000
+
+#define GET_XTENSA_PROP_ALIGNMENT(flag) \
+ (((unsigned)((flag) & (XTENSA_PROP_ALIGNMENT_MASK))) >> 12)
+#define SET_XTENSA_PROP_ALIGNMENT(flag, align) \
+ (((flag) & (~XTENSA_PROP_ALIGNMENT_MASK)) | \
+ (((align) << 12) & XTENSA_PROP_ALIGNMENT_MASK))
+
+#define XTENSA_PROP_INSN_ABSLIT 0x00020000
+
#endif /* _ELF_XTENSA_H */
diff --git a/contrib/binutils/include/fibheap.h b/contrib/binutils/include/fibheap.h
index 4eebaf13ba6f..348c4ae26389 100644
--- a/contrib/binutils/include/fibheap.h
+++ b/contrib/binutils/include/fibheap.h
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* Fibonacci heaps are somewhat complex, but, there's an article in
DDJ that explains them pretty well:
@@ -59,7 +59,7 @@ typedef struct fibnode
struct fibnode *right;
fibheapkey_t key;
void *data;
-#ifdef __GNUC__
+#if defined (__GNUC__) && (!defined (SIZEOF_INT) || SIZEOF_INT < 4)
__extension__ unsigned long int degree : 31;
__extension__ unsigned long int mark : 1;
#else
@@ -68,19 +68,19 @@ typedef struct fibnode
#endif
} *fibnode_t;
-extern fibheap_t fibheap_new PARAMS ((void));
-extern fibnode_t fibheap_insert PARAMS ((fibheap_t, fibheapkey_t, void *));
-extern int fibheap_empty PARAMS ((fibheap_t));
-extern fibheapkey_t fibheap_min_key PARAMS ((fibheap_t));
-extern fibheapkey_t fibheap_replace_key PARAMS ((fibheap_t, fibnode_t,
- fibheapkey_t));
-extern void *fibheap_replace_key_data PARAMS ((fibheap_t, fibnode_t,
- fibheapkey_t, void *));
-extern void *fibheap_extract_min PARAMS ((fibheap_t));
-extern void *fibheap_min PARAMS ((fibheap_t));
-extern void *fibheap_replace_data PARAMS ((fibheap_t, fibnode_t, void *));
-extern void *fibheap_delete_node PARAMS ((fibheap_t, fibnode_t));
-extern void fibheap_delete PARAMS ((fibheap_t));
-extern fibheap_t fibheap_union PARAMS ((fibheap_t, fibheap_t));
+extern fibheap_t fibheap_new (void);
+extern fibnode_t fibheap_insert (fibheap_t, fibheapkey_t, void *);
+extern int fibheap_empty (fibheap_t);
+extern fibheapkey_t fibheap_min_key (fibheap_t);
+extern fibheapkey_t fibheap_replace_key (fibheap_t, fibnode_t,
+ fibheapkey_t);
+extern void *fibheap_replace_key_data (fibheap_t, fibnode_t,
+ fibheapkey_t, void *);
+extern void *fibheap_extract_min (fibheap_t);
+extern void *fibheap_min (fibheap_t);
+extern void *fibheap_replace_data (fibheap_t, fibnode_t, void *);
+extern void *fibheap_delete_node (fibheap_t, fibnode_t);
+extern void fibheap_delete (fibheap_t);
+extern fibheap_t fibheap_union (fibheap_t, fibheap_t);
#endif /* _FIBHEAP_H_ */
diff --git a/contrib/binutils/include/filenames.h b/contrib/binutils/include/filenames.h
index ca9e2732a326..6b72fd249b40 100644
--- a/contrib/binutils/include/filenames.h
+++ b/contrib/binutils/include/filenames.h
@@ -21,7 +21,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef FILENAMES_H
#define FILENAMES_H
diff --git a/contrib/binutils/include/floatformat.h b/contrib/binutils/include/floatformat.h
index a8244ada5c72..f1bd7f601f53 100644
--- a/contrib/binutils/include/floatformat.h
+++ b/contrib/binutils/include/floatformat.h
@@ -1,5 +1,6 @@
/* IEEE floating point support declarations, for GDB, the GNU Debugger.
- Copyright 1991, 1994, 1995, 1997, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1991, 1994, 1995, 1997, 2000, 2003, 2005
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -15,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#if !defined (FLOATFORMAT_H)
#define FLOATFORMAT_H 1
@@ -28,25 +29,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
(i.e. BITS_BIG_ENDIAN type numbering), and specify which bits each field
contains with the *_start and *_len fields. */
-/* What is the order of the bytes. */
+/* What is the order of the bytes? */
enum floatformat_byteorders {
-
/* Standard little endian byte order.
EX: 1.2345678e10 => 00 00 80 c5 e0 fe 06 42 */
-
floatformat_little,
/* Standard big endian byte order.
EX: 1.2345678e10 => 42 06 fe e0 c5 80 00 00 */
-
floatformat_big,
/* Little endian byte order but big endian word order.
EX: 1.2345678e10 => e0 fe 06 42 00 00 80 c5 */
+ floatformat_littlebyte_bigword,
- floatformat_littlebyte_bigword
-
+ /* VAX byte order. Little endian byte order with 16-bit words. The
+ following example is an illustration of the byte order only; VAX
+ doesn't have a fully IEEE compliant floating-point format.
+ EX: 1.2345678e10 => 80 c5 00 00 06 42 e0 fe */
+ floatformat_vax
};
enum floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no };
@@ -82,7 +84,7 @@ struct floatformat
const char *name;
/* Validator method. */
- int (*is_valid) PARAMS ((const struct floatformat *fmt, const char *from));
+ int (*is_valid) (const struct floatformat *fmt, const void *from);
};
/* floatformats for IEEE single and double, big and little endian. */
@@ -96,6 +98,12 @@ extern const struct floatformat floatformat_ieee_double_little;
extern const struct floatformat floatformat_ieee_double_littlebyte_bigword;
+/* floatformats for VAX. */
+
+extern const struct floatformat floatformat_vax_f;
+extern const struct floatformat floatformat_vax_d;
+extern const struct floatformat floatformat_vax_g;
+
/* floatformats for various extendeds. */
extern const struct floatformat floatformat_i387_ext;
@@ -116,18 +124,17 @@ extern const struct floatformat floatformat_ia64_quad_little;
Store the double in *TO. */
extern void
-floatformat_to_double PARAMS ((const struct floatformat *, const char *, double *));
+floatformat_to_double (const struct floatformat *, const void *, double *);
/* The converse: convert the double *FROM to FMT
and store where TO points. */
extern void
-floatformat_from_double PARAMS ((const struct floatformat *,
- const double *, char *));
+floatformat_from_double (const struct floatformat *, const double *, void *);
/* Return non-zero iff the data at FROM is a valid number in format FMT. */
extern int
-floatformat_is_valid PARAMS ((const struct floatformat *fmt, const char *from));
+floatformat_is_valid (const struct floatformat *fmt, const void *from);
#endif /* defined (FLOATFORMAT_H) */
diff --git a/contrib/binutils/include/fnmatch.h b/contrib/binutils/include/fnmatch.h
index 37d23ee1b35d..5b9953ca3f52 100644
--- a/contrib/binutils/include/fnmatch.h
+++ b/contrib/binutils/include/fnmatch.h
@@ -15,8 +15,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#ifndef _FNMATCH_H
diff --git a/contrib/binutils/include/gdbm.h b/contrib/binutils/include/gdbm.h
index 3ebc26d198a7..d2a600639347 100644
--- a/contrib/binutils/include/gdbm.h
+++ b/contrib/binutils/include/gdbm.h
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* You may contact the author by:
e-mail: phil@wwu.edu
diff --git a/contrib/binutils/include/hashtab.h b/contrib/binutils/include/hashtab.h
index f7bd4ae69d38..77eee14e94f3 100644
--- a/contrib/binutils/include/hashtab.h
+++ b/contrib/binutils/include/hashtab.h
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This package implements basic hash table functionality. It is possible
to search for an entry, create an entry and destroy an entry.
@@ -48,38 +48,47 @@ typedef unsigned int hashval_t;
/* Callback function pointer types. */
/* Calculate hash of a table entry. */
-typedef hashval_t (*htab_hash) PARAMS ((const void *));
+typedef hashval_t (*htab_hash) (const void *);
/* Compare a table entry with a possible entry. The entry already in
the table always comes first, so the second element can be of a
different type (but in this case htab_find and htab_find_slot
cannot be used; instead the variants that accept a hash value
must be used). */
-typedef int (*htab_eq) PARAMS ((const void *, const void *));
+typedef int (*htab_eq) (const void *, const void *);
/* Cleanup function called whenever a live element is removed from
the hash table. */
-typedef void (*htab_del) PARAMS ((void *));
+typedef void (*htab_del) (void *);
/* Function called by htab_traverse for each live element. The first
arg is the slot of the element (which can be passed to htab_clear_slot
if desired), the second arg is the auxiliary pointer handed to
htab_traverse. Return 1 to continue scan, 0 to stop. */
-typedef int (*htab_trav) PARAMS ((void **, void *));
+typedef int (*htab_trav) (void **, void *);
/* Memory-allocation function, with the same functionality as calloc().
Iff it returns NULL, the hash table implementation will pass an error
code back to the user, so if your code doesn't handle errors,
best if you use xcalloc instead. */
-typedef PTR (*htab_alloc) PARAMS ((size_t, size_t));
+typedef void *(*htab_alloc) (size_t, size_t);
/* We also need a free() routine. */
-typedef void (*htab_free) PARAMS ((PTR));
+typedef void (*htab_free) (void *);
/* Memory allocation and deallocation; variants which take an extra
argument. */
-typedef PTR (*htab_alloc_with_arg) PARAMS ((void *, size_t, size_t));
-typedef void (*htab_free_with_arg) PARAMS ((void *, void *));
+typedef void *(*htab_alloc_with_arg) (void *, size_t, size_t);
+typedef void (*htab_free_with_arg) (void *, void *);
+
+/* This macro defines reserved value for empty table entry. */
+
+#define HTAB_EMPTY_ENTRY ((PTR) 0)
+
+/* This macro defines reserved value for table entry which contained
+ a deleted element. */
+
+#define HTAB_DELETED_ENTRY ((PTR) 1)
/* Hash tables are of the following type. The structure
(implementation) of this type is not needed for using the hash
@@ -99,15 +108,15 @@ struct htab GTY(())
htab_del del_f;
/* Table itself. */
- PTR * GTY ((use_param (""), length ("%h.size"))) entries;
+ void ** GTY ((use_param, length ("%h.size"))) entries;
- /* Current size (in entries) of the hash table */
+ /* Current size (in entries) of the hash table. */
size_t size;
- /* Current number of elements including also deleted elements */
+ /* Current number of elements including also deleted elements. */
size_t n_elements;
- /* Current number of deleted elements in the table */
+ /* Current number of deleted elements in the table. */
size_t n_deleted;
/* The following member is used for debugging. Its value is number
@@ -123,9 +132,13 @@ struct htab GTY(())
htab_free free_f;
/* Alternate allocate/free functions, which take an extra argument. */
- PTR GTY((skip (""))) alloc_arg;
+ void * GTY((skip)) alloc_arg;
htab_alloc_with_arg alloc_with_arg_f;
htab_free_with_arg free_with_arg_f;
+
+ /* Current size (in entries) of the hash table, as an index into the
+ table of primes. */
+ unsigned int size_prime_index;
};
typedef struct htab *htab_t;
@@ -135,44 +148,42 @@ enum insert_option {NO_INSERT, INSERT};
/* The prototypes of the package functions. */
-extern htab_t htab_create_alloc PARAMS ((size_t, htab_hash,
- htab_eq, htab_del,
- htab_alloc, htab_free));
+extern htab_t htab_create_alloc (size_t, htab_hash,
+ htab_eq, htab_del,
+ htab_alloc, htab_free);
-extern htab_t htab_create_alloc_ex PARAMS ((size_t, htab_hash,
- htab_eq, htab_del,
- PTR, htab_alloc_with_arg,
- htab_free_with_arg));
+extern htab_t htab_create_alloc_ex (size_t, htab_hash,
+ htab_eq, htab_del,
+ void *, htab_alloc_with_arg,
+ htab_free_with_arg);
/* Backward-compatibility functions. */
-extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
-extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
-
-extern void htab_set_functions_ex PARAMS ((htab_t, htab_hash,
- htab_eq, htab_del,
- PTR, htab_alloc_with_arg,
- htab_free_with_arg));
-
-extern void htab_delete PARAMS ((htab_t));
-extern void htab_empty PARAMS ((htab_t));
-
-extern PTR htab_find PARAMS ((htab_t, const void *));
-extern PTR *htab_find_slot PARAMS ((htab_t, const void *,
- enum insert_option));
-extern PTR htab_find_with_hash PARAMS ((htab_t, const void *,
- hashval_t));
-extern PTR *htab_find_slot_with_hash PARAMS ((htab_t, const void *,
- hashval_t,
- enum insert_option));
-extern void htab_clear_slot PARAMS ((htab_t, void **));
-extern void htab_remove_elt PARAMS ((htab_t, void *));
-
-extern void htab_traverse PARAMS ((htab_t, htab_trav, void *));
-extern void htab_traverse_noresize PARAMS ((htab_t, htab_trav, void *));
-
-extern size_t htab_size PARAMS ((htab_t));
-extern size_t htab_elements PARAMS ((htab_t));
-extern double htab_collisions PARAMS ((htab_t));
+extern htab_t htab_create (size_t, htab_hash, htab_eq, htab_del);
+extern htab_t htab_try_create (size_t, htab_hash, htab_eq, htab_del);
+
+extern void htab_set_functions_ex (htab_t, htab_hash,
+ htab_eq, htab_del,
+ void *, htab_alloc_with_arg,
+ htab_free_with_arg);
+
+extern void htab_delete (htab_t);
+extern void htab_empty (htab_t);
+
+extern void * htab_find (htab_t, const void *);
+extern void ** htab_find_slot (htab_t, const void *, enum insert_option);
+extern void * htab_find_with_hash (htab_t, const void *, hashval_t);
+extern void ** htab_find_slot_with_hash (htab_t, const void *,
+ hashval_t, enum insert_option);
+extern void htab_clear_slot (htab_t, void **);
+extern void htab_remove_elt (htab_t, void *);
+extern void htab_remove_elt_with_hash (htab_t, void *, hashval_t);
+
+extern void htab_traverse (htab_t, htab_trav, void *);
+extern void htab_traverse_noresize (htab_t, htab_trav, void *);
+
+extern size_t htab_size (htab_t);
+extern size_t htab_elements (htab_t);
+extern double htab_collisions (htab_t);
/* A hash function for pointers. */
extern htab_hash htab_hash_pointer;
@@ -181,10 +192,10 @@ extern htab_hash htab_hash_pointer;
extern htab_eq htab_eq_pointer;
/* A hash function for null-terminated strings. */
-extern hashval_t htab_hash_string PARAMS ((const PTR));
+extern hashval_t htab_hash_string (const void *);
/* An iterative hash function for arbitrary data. */
-extern hashval_t iterative_hash PARAMS ((const PTR, size_t, hashval_t));
+extern hashval_t iterative_hash (const void *, size_t, hashval_t);
/* Shorthand for hashing something with an intrinsic size. */
#define iterative_hash_object(OB,INIT) iterative_hash (&OB, sizeof (OB), INIT)
diff --git a/contrib/binutils/include/ieee.h b/contrib/binutils/include/ieee.h
index 5abc32b62d81..72fcad420f9f 100644
--- a/contrib/binutils/include/ieee.h
+++ b/contrib/binutils/include/ieee.h
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA.
Contributed by Cygnus Support. */
diff --git a/contrib/binutils/include/libiberty.h b/contrib/binutils/include/libiberty.h
index 761b2cf060ff..6bd318e0fe5d 100644
--- a/contrib/binutils/include/libiberty.h
+++ b/contrib/binutils/include/libiberty.h
@@ -1,6 +1,6 @@
/* Function declarations for libiberty.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2005 Free Software Foundation, Inc.
Note - certain prototypes declared in this header file are for
functions whoes implementation copyright does not belong to the
@@ -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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA.
Written by Cygnus Support, 1994.
@@ -41,27 +41,50 @@ extern "C" {
#include "ansidecl.h"
-#ifdef ANSI_PROTOTYPES
/* Get a definition for size_t. */
#include <stddef.h>
/* Get a definition for va_list. */
#include <stdarg.h>
-#endif
+
+#include <stdio.h>
+
+/* If the OS supports it, ensure that the supplied stream is setup to
+ avoid any multi-threaded locking. Otherwise leave the FILE pointer
+ unchanged. If the stream is NULL do nothing. */
+
+extern void unlock_stream (FILE *);
+
+/* If the OS supports it, ensure that the standard I/O streams, stdin,
+ stdout and stderr are setup to avoid any multi-threaded locking.
+ Otherwise do nothing. */
+
+extern void unlock_std_streams (void);
+
+/* Open and return a FILE pointer. If the OS supports it, ensure that
+ the stream is setup to avoid any multi-threaded locking. Otherwise
+ return the FILE pointer unchanged. */
+
+extern FILE *fopen_unlocked (const char *, const char *);
+extern FILE *fdopen_unlocked (int, const char *);
+extern FILE *freopen_unlocked (const char *, const char *, FILE *);
/* Build an argument vector from a string. Allocates memory using
malloc. Use freeargv to free the vector. */
-extern char **buildargv PARAMS ((const char *)) ATTRIBUTE_MALLOC;
+extern char **buildargv (const char *) ATTRIBUTE_MALLOC;
/* Free a vector returned by buildargv. */
-extern void freeargv PARAMS ((char **));
+extern void freeargv (char **);
/* Duplicate an argument vector. Allocates memory using malloc. Use
freeargv to free the vector. */
-extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
+extern char **dupargv (char **) ATTRIBUTE_MALLOC;
+
+/* Expand "@file" arguments in argv. */
+extern void expandargv PARAMS ((int *, char ***));
/* Return the last component of a path name. Note that we can't use a
prototype here because the parameter is declared inconsistently
@@ -74,26 +97,29 @@ extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
to find the declaration so provide a fully prototyped one. If it
is 1, we found it so don't provide any declaration at all. */
#if !HAVE_DECL_BASENAME
-#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (HAVE_DECL_BASENAME)
-extern char *basename PARAMS ((const char *));
+#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
+extern char *basename (const char *);
#else
-extern char *basename ();
+/* Do not allow basename to be used if there is no prototype seen. We
+ either need to use the above prototype or have one from
+ autoconf which would result in HAVE_DECL_BASENAME being set. */
+#define basename basename_cannot_be_used_without_a_prototype
#endif
#endif
/* A well-defined basename () that is always compiled in. */
-extern const char *lbasename PARAMS ((const char *));
+extern const char *lbasename (const char *);
/* A well-defined realpath () that is always compiled in. */
-extern char *lrealpath PARAMS ((const char *));
+extern char *lrealpath (const char *);
/* Concatenate an arbitrary number of strings. You must pass NULL as
the last argument of this function, to terminate the list of
strings. Allocates memory using xmalloc. */
-extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
+extern char *concat (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings. You must pass NULL as
the last argument of this function, to terminate the list of
@@ -102,27 +128,27 @@ extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
pointer to be freed after the new string is created, similar to the
way xrealloc works. */
-extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC;
+extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
/* Determine the length of concatenating an arbitrary number of
strings. You must pass NULL as the last argument of this function,
to terminate the list of strings. */
-extern unsigned long concat_length PARAMS ((const char *, ...));
+extern unsigned long concat_length (const char *, ...) ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings into a SUPPLIED area of
memory. You must pass NULL as the last argument of this function,
to terminate the list of strings. The supplied memory is assumed
to be large enough. */
-extern char *concat_copy PARAMS ((char *, const char *, ...));
+extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings into a GLOBAL area of
memory. You must pass NULL as the last argument of this function,
to terminate the list of strings. The supplied memory is assumed
to be large enough. */
-extern char *concat_copy2 PARAMS ((const char *, ...));
+extern char *concat_copy2 (const char *, ...) ATTRIBUTE_SENTINEL;
/* This is the global area used by concat_copy2. */
@@ -133,134 +159,390 @@ extern char *libiberty_concat_ptr;
strings. Allocates memory using alloca. The arguments are
evaluated twice! */
#define ACONCAT(ACONCAT_PARAMS) \
- (libiberty_concat_ptr = alloca (concat_length ACONCAT_PARAMS + 1), \
+ (libiberty_concat_ptr = (char *) alloca (concat_length ACONCAT_PARAMS + 1), \
concat_copy2 ACONCAT_PARAMS)
/* Check whether two file descriptors refer to the same file. */
-extern int fdmatch PARAMS ((int fd1, int fd2));
+extern int fdmatch (int fd1, int fd2);
+
+/* Return the position of the first bit set in the argument. */
+/* Prototypes vary from system to system, so we only provide a
+ prototype on systems where we know that we need it. */
+#if defined (HAVE_DECL_FFS) && !HAVE_DECL_FFS
+extern int ffs(int);
+#endif
/* Get the working directory. The result is cached, so don't call
chdir() between calls to getpwd(). */
-extern char * getpwd PARAMS ((void));
+extern char * getpwd (void);
+
+/* Get the current time. */
+/* Prototypes vary from system to system, so we only provide a
+ prototype on systems where we know that we need it. */
+#ifdef __MINGW32__
+/* Forward declaration to avoid #include <sys/time.h>. */
+struct timeval;
+extern int gettimeofday (struct timeval *, void *);
+#endif
/* Get the amount of time the process has run, in microseconds. */
-extern long get_run_time PARAMS ((void));
+extern long get_run_time (void);
/* Generate a relocated path to some installation directory. Allocates
return value using malloc. */
-extern char *make_relative_prefix PARAMS ((const char *, const char *,
- const char *));
+extern char *make_relative_prefix (const char *, const char *,
+ const char *) ATTRIBUTE_MALLOC;
/* Choose a temporary directory to use for scratch files. */
-extern char *choose_temp_base PARAMS ((void)) ATTRIBUTE_MALLOC;
+extern char *choose_temp_base (void) ATTRIBUTE_MALLOC;
/* Return a temporary file name or NULL if unable to create one. */
-extern char *make_temp_file PARAMS ((const char *)) ATTRIBUTE_MALLOC;
+extern char *make_temp_file (const char *) ATTRIBUTE_MALLOC;
+
+/* Remove a link to a file unless it is special. */
+
+extern int unlink_if_ordinary (const char *);
/* Allocate memory filled with spaces. Allocates using malloc. */
-extern const char *spaces PARAMS ((int count));
+extern const char *spaces (int count);
/* Return the maximum error number for which strerror will return a
string. */
-extern int errno_max PARAMS ((void));
+extern int errno_max (void);
/* Return the name of an errno value (e.g., strerrno (EINVAL) returns
"EINVAL"). */
-extern const char *strerrno PARAMS ((int));
+extern const char *strerrno (int);
/* Given the name of an errno value, return the value. */
-extern int strtoerrno PARAMS ((const char *));
+extern int strtoerrno (const char *);
/* ANSI's strerror(), but more robust. */
-extern char *xstrerror PARAMS ((int));
+extern char *xstrerror (int);
/* Return the maximum signal number for which strsignal will return a
string. */
-extern int signo_max PARAMS ((void));
+extern int signo_max (void);
/* Return a signal message string for a signal number
(e.g., strsignal (SIGHUP) returns something like "Hangup"). */
/* This is commented out as it can conflict with one in system headers.
We still document its existence though. */
-/*extern const char *strsignal PARAMS ((int));*/
+/*extern const char *strsignal (int);*/
/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns
"SIGHUP"). */
-extern const char *strsigno PARAMS ((int));
+extern const char *strsigno (int);
/* Given the name of a signal, return its number. */
-extern int strtosigno PARAMS ((const char *));
+extern int strtosigno (const char *);
/* Register a function to be run by xexit. Returns 0 on success. */
-extern int xatexit PARAMS ((void (*fn) (void)));
+extern int xatexit (void (*fn) (void));
/* Exit, calling all the functions registered with xatexit. */
-extern void xexit PARAMS ((int status)) ATTRIBUTE_NORETURN;
+extern void xexit (int status) ATTRIBUTE_NORETURN;
/* Set the program name used by xmalloc. */
-extern void xmalloc_set_program_name PARAMS ((const char *));
+extern void xmalloc_set_program_name (const char *);
/* Report an allocation failure. */
-extern void xmalloc_failed PARAMS ((size_t)) ATTRIBUTE_NORETURN;
+extern void xmalloc_failed (size_t) ATTRIBUTE_NORETURN;
/* Allocate memory without fail. If malloc fails, this will print a
message to stderr (using the name set by xmalloc_set_program_name,
if any) and then call xexit. */
-extern PTR xmalloc PARAMS ((size_t)) ATTRIBUTE_MALLOC;
+extern void *xmalloc (size_t) ATTRIBUTE_MALLOC;
/* Reallocate memory without fail. This works like xmalloc. Note,
realloc type functions are not suitable for attribute malloc since
they may return the same address across multiple calls. */
-extern PTR xrealloc PARAMS ((PTR, size_t));
+extern void *xrealloc (void *, size_t);
/* Allocate memory without fail and set it to zero. This works like
xmalloc. */
-extern PTR xcalloc PARAMS ((size_t, size_t)) ATTRIBUTE_MALLOC;
+extern void *xcalloc (size_t, size_t) ATTRIBUTE_MALLOC;
/* Copy a string into a memory buffer without fail. */
-extern char *xstrdup PARAMS ((const char *)) ATTRIBUTE_MALLOC;
+extern char *xstrdup (const char *) ATTRIBUTE_MALLOC;
+
+/* Copy at most N characters from string into a buffer without fail. */
+
+extern char *xstrndup (const char *, size_t) ATTRIBUTE_MALLOC;
/* Copy an existing memory buffer to a new memory buffer without fail. */
-extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC;
+extern void *xmemdup (const void *, size_t, size_t) ATTRIBUTE_MALLOC;
/* Physical memory routines. Return values are in BYTES. */
-extern double physmem_total PARAMS ((void));
-extern double physmem_available PARAMS ((void));
+extern double physmem_total (void);
+extern double physmem_available (void);
+
+
+/* These macros provide a K&R/C89/C++-friendly way of allocating structures
+ with nice encapsulation. The XDELETE*() macros are technically
+ superfluous, but provided here for symmetry. Using them consistently
+ makes it easier to update client code to use different allocators such
+ as new/delete and new[]/delete[]. */
+
+/* Scalar allocators. */
+
+#define XNEW(T) ((T *) xmalloc (sizeof (T)))
+#define XCNEW(T) ((T *) xcalloc (1, sizeof (T)))
+#define XDELETE(P) free ((void*) (P))
+
+/* Array allocators. */
+
+#define XNEWVEC(T, N) ((T *) xmalloc (sizeof (T) * (N)))
+#define XCNEWVEC(T, N) ((T *) xcalloc ((N), sizeof (T)))
+#define XRESIZEVEC(T, P, N) ((T *) xrealloc ((void *) (P), sizeof (T) * (N)))
+#define XDELETEVEC(P) free ((void*) (P))
+
+/* Allocators for variable-sized structures and raw buffers. */
+
+#define XNEWVAR(T, S) ((T *) xmalloc ((S)))
+#define XCNEWVAR(T, S) ((T *) xcalloc (1, (S)))
+#define XRESIZEVAR(T, P, S) ((T *) xrealloc ((P), (S)))
+
+/* Type-safe obstack allocator. */
+
+#define XOBNEW(O, T) ((T *) obstack_alloc ((O), sizeof (T)))
+#define XOBFINISH(O, T) ((T) obstack_finish ((O)))
/* hex character manipulation routines */
#define _hex_array_size 256
#define _hex_bad 99
extern const unsigned char _hex_value[_hex_array_size];
-extern void hex_init PARAMS ((void));
+extern void hex_init (void);
#define hex_p(c) (hex_value (c) != _hex_bad)
/* If you change this, note well: Some code relies on side effects in
the argument being performed exactly once. */
#define hex_value(c) ((unsigned int) _hex_value[(unsigned char) (c)])
+/* Flags for pex_init. These are bits to be or'ed together. */
+
+/* Record subprocess times, if possible. */
+#define PEX_RECORD_TIMES 0x1
+
+/* Use pipes for communication between processes, if possible. */
+#define PEX_USE_PIPES 0x2
+
+/* Save files used for communication between processes. */
+#define PEX_SAVE_TEMPS 0x4
+
+/* Prepare to execute one or more programs, with standard output of
+ each program fed to standard input of the next.
+ FLAGS As above.
+ PNAME The name of the program to report in error messages.
+ TEMPBASE A base name to use for temporary files; may be NULL to
+ use a random name.
+ Returns NULL on error. */
+
+extern struct pex_obj *pex_init (int flags, const char *pname,
+ const char *tempbase);
+
+/* Flags for pex_run. These are bits to be or'ed together. */
+
+/* Last program in pipeline. Standard output of program goes to
+ OUTNAME, or, if OUTNAME is NULL, to standard output of caller. Do
+ not set this if you want to call pex_read_output. After this is
+ set, pex_run may no longer be called with the same struct
+ pex_obj. */
+#define PEX_LAST 0x1
+
+/* Search for program in executable search path. */
+#define PEX_SEARCH 0x2
+
+/* OUTNAME is a suffix. */
+#define PEX_SUFFIX 0x4
+
+/* Send program's standard error to standard output. */
+#define PEX_STDERR_TO_STDOUT 0x8
+
+/* Input file should be opened in binary mode. This flag is ignored
+ on Unix. */
+#define PEX_BINARY_INPUT 0x10
+
+/* Output file should be opened in binary mode. This flag is ignored
+ on Unix. For proper behaviour PEX_BINARY_INPUT and
+ PEX_BINARY_OUTPUT have to match appropriately--i.e., a call using
+ PEX_BINARY_OUTPUT should be followed by a call using
+ PEX_BINARY_INPUT. */
+#define PEX_BINARY_OUTPUT 0x20
+
+/* 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.
+
+ OBJ Returned by pex_init.
+
+ FLAGS As above.
+
+ EXECUTABLE The program to execute.
+
+ ARGV NULL terminated array of arguments to pass to the program.
+
+ OUTNAME Sets the output file name as follows:
+
+ PEX_SUFFIX set (OUTNAME may not be NULL):
+ TEMPBASE parameter to pex_init not NULL:
+ Output file name is the concatenation of TEMPBASE
+ and OUTNAME.
+ TEMPBASE is NULL:
+ Output file name is a random file name ending in
+ OUTNAME.
+ PEX_SUFFIX not set:
+ OUTNAME not NULL:
+ Output file name is OUTNAME.
+ OUTNAME NULL, TEMPBASE not NULL:
+ Output file name is randomly chosen using
+ TEMPBASE.
+ OUTNAME NULL, TEMPBASE NULL:
+ Output file name is randomly chosen.
+
+ If PEX_LAST is not set, the output file name is the
+ name to use for a temporary file holding stdout, if
+ any (there will not be a file if PEX_USE_PIPES is set
+ and the system supports pipes). If a file is used, it
+ will be removed when no longer needed unless
+ PEX_SAVE_TEMPS is set.
+
+ If PEX_LAST is set, and OUTNAME is not NULL, standard
+ output is written to the output file name. The file
+ will not be removed. If PEX_LAST and PEX_SUFFIX are
+ both set, TEMPBASE may not be NULL.
+
+ ERRNAME If not NULL, this is the name of a file to which
+ standard error is written. If NULL, standard error of
+ the program is standard error of the caller.
+
+ ERR On an error return, *ERR is set to an errno value, or
+ to 0 if there is no relevant errno.
+*/
+
+extern const char *pex_run (struct pex_obj *obj, int flags,
+ const char *executable, char * const *argv,
+ 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);
+
+/* 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.
+ pex_run closes the file automatically; don't close it yourself. */
+
+extern FILE *pex_input_file (struct pex_obj *obj, int flags,
+ const char *in_name);
+
+/* Return a stream for a pipe connected to the standard input of the
+ first program in the pipeline. You must have passed
+ `PEX_USE_PIPES' to `pex_init'. Close the returned stream
+ yourself. */
+
+extern FILE *pex_input_pipe (struct pex_obj *obj, int binary);
+
+/* Read the standard output 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_output (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. */
+
+extern int pex_get_status (struct pex_obj *, int count, int *vector);
+
+/* Return times of all programs in VECTOR. COUNT indicates the size
+ of VECTOR. struct pex_time is really just struct timeval, but that
+ is not portable to all systems. Returns 0 on error, 1 on
+ success. */
+
+struct pex_time
+{
+ unsigned long user_seconds;
+ unsigned long user_microseconds;
+ unsigned long system_seconds;
+ unsigned long system_microseconds;
+};
+
+extern int pex_get_times (struct pex_obj *, int count,
+ struct pex_time *vector);
+
+/* Clean up a pex_obj. */
+
+extern void pex_free (struct pex_obj *);
+
+/* Just execute one program. Return value is as for pex_run.
+ FLAGS Combination of PEX_SEARCH and PEX_STDERR_TO_STDOUT.
+ EXECUTABLE As for pex_run.
+ ARGV As for pex_run.
+ PNAME As for pex_init.
+ OUTNAME As for pex_run when PEX_LAST is set.
+ ERRNAME As for pex_run.
+ STATUS Set to exit status on success.
+ ERR As for pex_run.
+*/
+
+extern const char *pex_one (int flags, const char *executable,
+ char * const *argv, const char *pname,
+ const char *outname, const char *errname,
+ int *status, int *err);
+
+/* pexecute and pwait are the old pexecute interface, still here for
+ backward compatibility. Don't use these for new code. Instead,
+ use pex_init/pex_run/pex_get_status/pex_free, or pex_one. */
+
/* Definitions used by the pexecute routine. */
#define PEXECUTE_FIRST 1
@@ -271,26 +553,40 @@ extern void hex_init PARAMS ((void));
/* Execute a program. */
-extern int pexecute PARAMS ((const char *, char * const *, const char *,
- const char *, char **, char **, int));
+extern int pexecute (const char *, char * const *, const char *,
+ const char *, char **, char **, int);
/* Wait for pexecute to finish. */
-extern int pwait PARAMS ((int, int *, int));
+extern int pwait (int, int *, int);
#if !HAVE_DECL_ASPRINTF
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller. */
-extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2;
+extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
#endif
#if !HAVE_DECL_VASPRINTF
/* Like vsprintf but provides a pointer to malloc'd storage, which
must be freed by the caller. */
-extern int vasprintf PARAMS ((char **, const char *, va_list))
- ATTRIBUTE_PRINTF(2,0);
+extern int vasprintf (char **, const char *, va_list) ATTRIBUTE_PRINTF(2,0);
+#endif
+
+#if defined(HAVE_DECL_SNPRINTF) && !HAVE_DECL_SNPRINTF
+/* Like sprintf but prints at most N characters. */
+extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3;
+#endif
+
+#if defined(HAVE_DECL_VSNPRINTF) && !HAVE_DECL_VSNPRINTF
+/* Like vsprintf but prints at most N characters. */
+extern int vsnprintf (char *, size_t, const char *, va_list) ATTRIBUTE_PRINTF(3,0);
+#endif
+
+#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP
+/* Compare version strings. */
+extern int strverscmp (const char *, const char *);
#endif
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
@@ -301,7 +597,7 @@ extern int vasprintf PARAMS ((char **, const char *, va_list))
USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is
also set/unset as it is often used to indicate whether code needs
to call alloca(0). */
-extern PTR C_alloca PARAMS ((size_t)) ATTRIBUTE_MALLOC;
+extern void *C_alloca (size_t) ATTRIBUTE_MALLOC;
#undef alloca
#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA
# define alloca(x) __builtin_alloca(x)
@@ -309,7 +605,7 @@ extern PTR C_alloca PARAMS ((size_t)) ATTRIBUTE_MALLOC;
# define ASTRDUP(X) \
(__extension__ ({ const char *const libiberty_optr = (X); \
const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \
- char *const libiberty_nptr = alloca (libiberty_len); \
+ char *const libiberty_nptr = (char *const) alloca (libiberty_len); \
(char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); }))
#else
# define alloca(x) C_alloca(x)
@@ -323,7 +619,7 @@ extern unsigned long libiberty_len;
# define ASTRDUP(X) \
(libiberty_optr = (X), \
libiberty_len = strlen (libiberty_optr) + 1, \
- libiberty_nptr = alloca (libiberty_len), \
+ libiberty_nptr = (char *) alloca (libiberty_len), \
(char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len))
#endif
diff --git a/contrib/binutils/include/md5.h b/contrib/binutils/include/md5.h
index ad51f19877a2..e8eedb96d60b 100644
--- a/contrib/binutils/include/md5.h
+++ b/contrib/binutils/include/md5.h
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _MD5_H
#define _MD5_H 1
@@ -27,6 +27,8 @@
# include <limits.h>
#endif
+#include "ansidecl.h"
+
/* The following contortions are an attempt to use the C preprocessor
to determine an unsigned integral type that is 32 bits wide. An
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
@@ -37,6 +39,7 @@
#ifdef _LIBC
# include <sys/types.h>
typedef u_int32_t md5_uint32;
+typedef uintptr_t md5_uintptr;
#else
# define INT_MAX_32_BITS 2147483647
@@ -64,13 +67,9 @@ typedef u_int32_t md5_uint32;
# endif
# endif
# endif
-#endif
-
-#undef __P
-#if defined (__STDC__) && __STDC__
-#define __P(x) x
-#else
-#define __P(x) ()
+/* We have to make a guess about the integer type equivalent in size
+ to pointers which should always be correct. */
+typedef unsigned long int md5_uintptr;
#endif
/* Structure to save state of computation between the single steps. */
@@ -83,7 +82,7 @@ struct md5_ctx
md5_uint32 total[2];
md5_uint32 buflen;
- char buffer[128];
+ char buffer[128] ATTRIBUTE_ALIGNED_ALIGNOF(md5_uint32);
};
/*
@@ -93,21 +92,21 @@ struct md5_ctx
/* Initialize structure containing state of computation.
(RFC 1321, 3.3: Step 3) */
-extern void md5_init_ctx __P ((struct md5_ctx *ctx));
+extern void md5_init_ctx (struct md5_ctx *ctx);
/* Starting with the result of former calls of this function (or the
initialization function update the context for the next LEN bytes
starting at BUFFER.
It is necessary that LEN is a multiple of 64!!! */
-extern void md5_process_block __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
+extern void md5_process_block (const void *buffer, size_t len,
+ struct md5_ctx *ctx);
/* Starting with the result of former calls of this function (or the
initialization function update the context for the next LEN bytes
starting at BUFFER.
It is NOT required that LEN is a multiple of 64. */
-extern void md5_process_bytes __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
+extern void md5_process_bytes (const void *buffer, size_t len,
+ struct md5_ctx *ctx);
/* Process the remaining bytes in the buffer and put result from CTX
in first 16 bytes following RESBUF. The result is always in little
@@ -116,7 +115,7 @@ extern void md5_process_bytes __P ((const void *buffer, size_t len,
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
-extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
+extern void *md5_finish_ctx (struct md5_ctx *ctx, void *resbuf);
/* Put result from CTX in first 16 bytes following RESBUF. The result is
@@ -125,18 +124,18 @@ extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
-extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
+extern void *md5_read_ctx (const struct md5_ctx *ctx, void *resbuf);
/* Compute MD5 message digest for bytes read from STREAM. The
resulting message digest number will be written into the 16 bytes
beginning at RESBLOCK. */
-extern int md5_stream __P ((FILE *stream, void *resblock));
+extern int md5_stream (FILE *stream, void *resblock);
/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
result is always in little endian byte order, so that a byte-wise
output yields to the wanted ASCII representation of the message
digest. */
-extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
+extern void *md5_buffer (const char *buffer, size_t len, void *resblock);
#endif
diff --git a/contrib/binutils/include/objalloc.h b/contrib/binutils/include/objalloc.h
index c7106478dca4..36772d17b50d 100644
--- a/contrib/binutils/include/objalloc.h
+++ b/contrib/binutils/include/objalloc.h
@@ -14,8 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#ifndef OBJALLOC_H
#define OBJALLOC_H
@@ -45,7 +45,7 @@ struct objalloc
{
char *current_ptr;
unsigned int current_space;
- PTR chunks;
+ void *chunks;
};
/* Work out the required alignment. */
@@ -64,12 +64,12 @@ struct objalloc_align { char x; double d; };
/* Create an objalloc structure. Returns NULL if malloc fails. */
-extern struct objalloc *objalloc_create PARAMS ((void));
+extern struct objalloc *objalloc_create (void);
/* Allocate space from an objalloc structure. Returns NULL if malloc
fails. */
-extern PTR _objalloc_alloc PARAMS ((struct objalloc *, unsigned long));
+extern void *_objalloc_alloc (struct objalloc *, unsigned long);
/* The macro version of objalloc_alloc. We only define this if using
gcc, because otherwise we would have to evaluate the arguments
@@ -94,7 +94,7 @@ extern PTR _objalloc_alloc PARAMS ((struct objalloc *, unsigned long));
(__len <= __o->current_space \
? (__o->current_ptr += __len, \
__o->current_space -= __len, \
- (PTR) (__o->current_ptr - __len)) \
+ (void *) (__o->current_ptr - __len)) \
: _objalloc_alloc (__o, __len)); })
#else /* ! __GNUC__ */
@@ -105,11 +105,11 @@ extern PTR _objalloc_alloc PARAMS ((struct objalloc *, unsigned long));
/* Free an entire objalloc structure. */
-extern void objalloc_free PARAMS ((struct objalloc *));
+extern void objalloc_free (struct objalloc *);
/* Free a block allocated by objalloc_alloc. This also frees all more
recently allocated blocks. */
-extern void objalloc_free_block PARAMS ((struct objalloc *, PTR));
+extern void objalloc_free_block (struct objalloc *, void *);
#endif /* OBJALLOC_H */
diff --git a/contrib/binutils/include/obstack.h b/contrib/binutils/include/obstack.h
index 5496ff24071a..88c2a264adc9 100644
--- a/contrib/binutils/include/obstack.h
+++ b/contrib/binutils/include/obstack.h
@@ -1,6 +1,6 @@
/* obstack.h - object stack macros
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
- 1999, 2000
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
@@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
USA. */
/* Summary:
@@ -145,11 +145,7 @@ extern "C" {
#if defined _LIBC || defined HAVE_STRING_H
# include <string.h>
-# if defined __STDC__ && __STDC__
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-# else
-# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
-# endif
+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
#else
# ifdef memcpy
# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
@@ -174,18 +170,12 @@ struct obstack /* control current object in current chunk */
char *chunk_limit; /* address of char after current chunk */
PTR_INT_TYPE temp; /* Temporary for some macros. */
int alignment_mask; /* Mask of alignment for each object. */
-#if defined __STDC__ && __STDC__
/* These prototypes vary based on `use_extra_arg', and we use
casts to the prototypeless function type in all assignments,
but having prototypes here quiets -Wstrict-prototypes. */
struct _obstack_chunk *(*chunkfun) (void *, long);
void (*freefun) (void *, struct _obstack_chunk *);
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
-#else
- struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
- void (*freefun) (); /* User's function to free a chunk. */
- char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
-#endif
unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
unsigned maybe_empty_object:1;/* There is a possibility that the current
chunk contains a zero-length object. This
@@ -198,7 +188,6 @@ struct obstack /* control current object in current chunk */
/* Declare the external functions we use; they are in obstack.c. */
-#if defined __STDC__ && __STDC__
extern void _obstack_newchunk (struct obstack *, int);
extern void _obstack_free (struct obstack *, void *);
extern int _obstack_begin (struct obstack *, int, int,
@@ -207,16 +196,7 @@ extern int _obstack_begin_1 (struct obstack *, int, int,
void *(*) (void *, long),
void (*) (void *, void *), void *);
extern int _obstack_memory_used (struct obstack *);
-#else
-extern void _obstack_newchunk ();
-extern void _obstack_free ();
-extern int _obstack_begin ();
-extern int _obstack_begin_1 ();
-extern int _obstack_memory_used ();
-#endif
-#if defined __STDC__ && __STDC__
-
/* Do the function-declarations after the structs
but before defining the macros. */
@@ -255,19 +235,10 @@ int obstack_alignment_mask (struct obstack *obstack);
int obstack_chunk_size (struct obstack *obstack);
int obstack_memory_used (struct obstack *obstack);
-#endif /* __STDC__ */
-
-/* Non-ANSI C cannot really support alternative functions for these macros,
- so we do not declare them. */
-
/* Error handler called when `obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function. The
default action is to print a message and abort. */
-#if defined __STDC__ && __STDC__
extern void (*obstack_alloc_failed_handler) (void);
-#else
-extern void (*obstack_alloc_failed_handler) ();
-#endif
/* Exit value used when `print_and_abort' is used. */
extern int obstack_exit_failure;
@@ -292,8 +263,6 @@ extern int obstack_exit_failure;
/* To prevent prototype warnings provide complete argument list in
standard C version. */
-#if defined __STDC__ && __STDC__
-
# define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
@@ -317,32 +286,6 @@ extern int obstack_exit_failure;
# define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
-#else
-
-# define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-# define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun))
-
-# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
-
-# define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
-
-# define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)()) (newfreefun))
-
-#endif
-
#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
@@ -494,9 +437,9 @@ __extension__ \
# define obstack_free(OBSTACK, OBJ) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
+ void *__obj = (void *) (OBJ); \
if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = __obj; \
+ __o->next_free = __o->object_base = (char *) __obj; \
else (obstack_free) (__o, __obj); })
#else /* not __GNUC__ or not __STDC__ */
@@ -586,21 +529,12 @@ __extension__ \
(h)->object_base = (h)->next_free, \
__INT_TO_PTR ((h)->temp))
-# if defined __STDC__ && __STDC__
-# define obstack_free(h,obj) \
+# define obstack_free(h,obj) \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
? (int) ((h)->next_free = (h)->object_base \
= (h)->temp + (char *) (h)->chunk) \
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
-# else
-# define obstack_free(h,obj) \
-( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
-# endif
#endif /* not __GNUC__ or not __STDC__ */
diff --git a/contrib/binutils/include/opcode/ChangeLog b/contrib/binutils/include/opcode/ChangeLog
index 1d950d146914..0c67a5ce1233 100644
--- a/contrib/binutils/include/opcode/ChangeLog
+++ b/contrib/binutils/include/opcode/ChangeLog
@@ -1,17 +1,486 @@
+2006-05-26 Richard Sandiford <richard@codesourcery.com>
+
+ * m68k.h (mcf_mask): Define.
+
+2006-04-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
+
+ * avr.h (AVR_ISA_PWMx): New.
+
+2006-03-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k.h (cpu_m68k, cpu_cf, cpu_m68000, cpu_m68008, cpu_m68010,
+ cpu_m68020, cpu_m68ec030, cpu_m68040, cpu_m68060, cpu_m68851,
+ cpu_m68881, cpu_m68882, cpu_cpu32, cpu_cf5200, cpu_cf5206e,
+ cpu_cf5208, cpu_cf521x, cpu_cf5213, cpu_cf5249, cpu_cf528x,
+ cpu_cf5307, cpu_cf5329, cpu_cf5407, cpu_cf547x, cpu_cf548x): Remove.
+
+2006-03-10 Paul Brook <paul@codesourcery.com>
+
+ * arm.h (ARM_AEXT_V7_ARM): Include v6ZK extensions.
+
+2006-03-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (pa_opcodes): Reorder bb opcodes so that pa10 opcodes come
+ first. Correct mask of bb "B" opcode.
+
+2006-02-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Support Intel Merom New Instructions.
+
+2006-02-24 Paul Brook <paul@codesourcery.com>
+
+ * arm.h: Add V7 feature bits.
+
+2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ia64.h (ia64_opnd): Add IA64_OPND_IMMU5b.
+
+2006-01-31 Paul Brook <paul@codesourcery.com>
+ Richard Earnshaw <rearnsha@arm.com>
+
+ * arm.h: Use ARM_CPU_FEATURE.
+ (ARM_AEXT_*, FPU_ENDIAN_PURE, FPU_VFP_HARD): New.
+ (arm_feature_set): Change to a structure.
+ (ARM_CPU_HAS_FEATURE, ARM_MERGE_FEATURE_SETS, ARM_CLEAR_FEATURE,
+ ARM_FEATURE): New macros.
+
+2005-12-07 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h (MOVE_M_TO_PREG_OPCODE, MOVE_M_TO_PREG_ZBITS)
+ (MOVE_PC_INCR_OPCODE_PREFIX, MOVE_PC_INCR_OPCODE_SUFFIX): New macros.
+ (ADD_PC_INCR_OPCODE): Don't define.
+
+2005-12-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/1874
+ * i386.h (i386_optab): Add 64bit support for monitor and mwait.
+
+2005-11-14 David Ung <davidu@mips.com>
+
+ * mips.h: Assign 'm'/'M' codes to MIPS16e save/restore
+ instructions. Define MIPS16_ALL_ARGS and MIPS16_ALL_STATICS for
+ save/restore encoding of the args field.
+
+2005-10-28 Dave Brolley <brolley@redhat.com>
+
+ Contribute the following changes:
+ 2005-02-16 Dave Brolley <brolley@redhat.com>
+
+ * cgen-bitset.h: Rename CGEN_ISA_MASK to CGEN_BITSET. Rename
+ cgen_isa_mask_* to cgen_bitset_*.
+ * cgen.h: Likewise.
+
+ 2003-10-21 Richard Sandiford <rsandifo@redhat.com>
+
+ * cgen.h (CGEN_BITSET_ATTR_VALUE): Fix definition.
+ (CGEN_ATTR_ENTRY): Change "value" to type "unsigned".
+ (CGEN_CPU_TABLE): Make isas a ponter.
+
+ 2003-09-29 Dave Brolley <brolley@redhat.com>
+
+ * cgen.h (CGEN_ATTR_VALUE_BITSET_TYPE): New typedef.
+ (CGEN_ATTR_VALUE_ENUM_TYPE): Ditto.
+ (CGEN_ATTR_VALUE_TYPE): Use these new typedefs.
+
+ 2002-12-13 Dave Brolley <brolley@redhat.com>
+
+ * cgen.h (symcat.h): #include it.
+ (cgen-bitset.h): #include it.
+ (CGEN_ATTR_VALUE_TYPE): Now a union.
+ (CGEN_ATTR_VALUE): Reference macros generated in opcodes/<arch>-desc.h.
+ (CGEN_ATTR_ENTRY): 'value' now unsigned.
+ (cgen_cpu_desc): 'isas' now (CGEN_ISA_MASK*).
+ * cgen-bitset.h: New file.
+
+2005-09-30 Catherine Moore <clm@cm00re.com>
+
+ * bfin.h: New file.
+
+2005-10-24 Jan Beulich <jbeulich@novell.com>
+
+ * ia64.h (enum ia64_opnd): Move memory operand out of set of
+ indirect operands.
+
+2005-10-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (pa_opcodes): Add two fcmp opcodes. Reorder ftest opcodes.
+ Add FLAG_STRICT to pa10 ftest opcode.
+
+2005-10-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (pa_opcodes): Remove lha entries.
+
+2005-10-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (FLAG_STRICT): Revise comment.
+ (pa_opcode): Revise ordering rules. Add/move strict pa10 variants
+ before corresponding pa11 opcodes. Add strict pa10 register-immediate
+ entries for "fdc".
+
+2005-09-24 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (pa_opcodes): Add new "fdc" and "fic" opcode entries.
+
+2005-09-06 Chao-ying Fu <fu@mips.com>
+
+ * mips.h (OP_SH_MT_U, OP_MASK_MT_U, OP_SH_MT_H, OP_MASK_MT_H,
+ OP_SH_MTACC_T, OP_MASK_MTACC_T, OP_SH_MTACC_D, OP_MASK_MTACC_D): New
+ define.
+ Document !, $, *, &, g, +t, +T operand formats for MT instructions.
+ (INSN_ASE_MASK): Update to include INSN_MT.
+ (INSN_MT): New define for MT ASE.
+
+2005-08-25 Chao-ying Fu <fu@mips.com>
+
+ * mips.h (OP_SH_DSPACC, OP_MASK_DSPACC, OP_SH_DSPACC_S,
+ OP_MASK_DSPACC_S, OP_SH_DSPSFT, OP_MASK_DSPSFT, OP_SH_DSPSFT_7,
+ OP_MASK_DSPSFT_7, OP_SH_SA3, OP_MASK_SA3, OP_SH_SA4, OP_MASK_SA4,
+ OP_SH_IMM8, OP_MASK_IMM8, OP_SH_IMM10, OP_MASK_IMM10, OP_SH_WRDSP,
+ OP_MASK_WRDSP, OP_SH_RDDSP, OP_MASK_RDDSP): New define.
+ Document 3, 4, 5, 6, 7, 8, 9, 0, :, ', @ operand formats for DSP
+ instructions.
+ (INSN_DSP): New define for DSP ASE.
+
+2005-08-18 Alan Modra <amodra@bigpond.net.au>
+
+ * a29k.h: Delete.
+
+2005-08-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * ppc.h (PPC_OPCODE_E300): Define.
+
+2005-08-12 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390.h (s390_opcode_cpu_val): Add enum for cpu type z9-109.
+
+2005-07-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR gas/336
+ * hppa.h (pa_opcodes): Allow 0 immediates in PA 2.0 variants of pdtlb
+ and pitlb.
+
+2005-07-27 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h (i386_optab): Add comment to movd. Use LongMem for all
+ movd-s. Add NoRex64 to movq-s dealing only with mmx or xmm registers.
+ Add movq-s as 64-bit variants of movd-s.
+
+2005-07-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h: Fix punctuation in comment.
+
+ * hppa.h (pa_opcode): Add rules for opcode ordering. Check first for
+ implicit space-register addressing. Set space-register bits on opcodes
+ using implicit space-register addressing. Add various missing pa20
+ long-immediate opcodes. Remove various opcodes using implicit 3-bit
+ space-register addressing. Use "fE" instead of "fe" in various
+ fstw opcodes.
+
+2005-07-18 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h (i386_optab): Operands of aam and aad are unsigned.
+
+2007-07-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Support Intel VMX Instructions.
+
+2005-07-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (pa_opcode): Don't set FLAG_STRICT in pa10 loads and stores.
+
+2005-07-05 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h (i386_optab): Add new insns.
+
+2005-07-01 Nick Clifton <nickc@redhat.com>
+
+ * sparc.h: Add typedefs to structure declarations.
+
+2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 1013
+ * i386.h (i386_optab): Update comments for 64bit addressing on
+ mov. Allow 64bit addressing for mov and movq.
+
+2005-06-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (pa_opcodes): Use cM and cX instead of cm and cx,
+ respectively, in various floating-point load and store patterns.
+
+2005-05-23 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa.h (FLAG_STRICT): Correct comment.
+ (pa_opcodes): Update load and store entries to allow both PA 1.X and
+ PA 2.0 mneumonics when equivalent. Entries with cache control
+ completers now require PA 1.1. Adjust whitespace.
+
+2005-05-19 Anton Blanchard <anton@samba.org>
+
+ * ppc.h (PPC_OPCODE_POWER5): Define.
+
+2005-05-10 Nick Clifton <nickc@redhat.com>
+
+ * Update the address and phone number of the FSF organization in
+ the GPL notices in the following files:
+ a29k.h, alpha.h, arc.h, arm.h, avr.h, cgen.h, convex.h, cris.h,
+ crx.h, d10v.h, d30v.h, dlx.h, h8300.h, hppa.h, i370.h, i386.h,
+ i860.h, i960.h, m68hc11.h, m68k.h, m88k.h, maxq.h, mips.h, mmix.h,
+ mn10200.h, mn10300.h, msp430.h, np1.h, ns32k.h, or32.h, pdp11.h,
+ pj.h, pn.h, ppc.h, pyr.h, s390.h, sparc.h, tic30.h, tic4x.h,
+ tic54x.h, tic80.h, v850.h, vax.h
+
+2005-05-09 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h (i386_optab): Add ht and hnt.
+
+2005-04-18 Mark Kettenis <kettenis@gnu.org>
+
+ * i386.h: Insert hyphens into selected VIA PadLock extensions.
+ Add xcrypt-ctr. Provide aliases without hyphens.
+
+2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ Moved from ../ChangeLog
+
+ 2005-04-12 Paul Brook <paul@codesourcery.com>
+ * m88k.h: Rename psr macros to avoid conflicts.
+
+ 2005-03-12 Zack Weinberg <zack@codesourcery.com>
+ * arm.h: Adjust comments for ARM_EXT_V4T and ARM_EXT_V5T.
+ Add ARM_EXT_V6T2, ARM_ARCH_V6T2, ARM_ARCH_V6KT2, ARM_ARCH_V6ZT2,
+ and ARM_ARCH_V6ZKT2.
+
+ 2004-11-29 Tomer Levi <Tomer.Levi@nsc.com>
+ * crx.h (enum operand_type): Rename rbase_cst4 to rbase_dispu4.
+ Remove redundant instruction types.
+ (struct argument): X_op - new field.
+ (struct cst4_entry): Remove.
+ (no_op_insn): Declare.
+
+ 2004-11-05 Tomer Levi <Tomer.Levi@nsc.com>
+ * crx.h (enum argtype): Rename types, remove unused types.
+
+ 2004-10-27 Tomer Levi <Tomer.Levi@nsc.com>
+ * crx.h (enum reg): Rearrange registers, remove 'ccfg' and `'pc'.
+ (enum reg_type): Remove CRX_PC_REGTYPE, CRX_MTPR_REGTYPE.
+ (enum operand_type): Rearrange operands, edit comments.
+ replace us<N> with ui<N> for unsigned immediate.
+ replace d<N> with disps<N>/dispu<N>/dispe<N> for signed/unsigned/escaped
+ displacements (respectively).
+ replace rbase_ridx_scl2_dispu<N> with rindex_disps<N> for register index.
+ (instruction type): Add NO_TYPE_INS.
+ (instruction flags): Add USER_REG, CST4MAP, NO_SP, NO_RPTR.
+ (operand_entry): New field - 'flags'.
+ (operand flags): New.
+
+ 2004-10-21 Tomer Levi <Tomer.Levi@nsc.com>
+ * crx.h (operand_type): Remove redundant types i3, i4,
+ i5, i8, i12.
+ Add new unsigned immediate types us3, us4, us5, us16.
+
+2005-04-12 Mark Kettenis <kettenis@gnu.org>
+
+ * i386.h (i386_optab): Mark VIA PadLock instructions as ImmExt and
+ adjust them accordingly.
+
+2005-04-01 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h (i386_optab): Add rdtscp.
+
+2005-03-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Don't allow the `l' suffix for moving
+ between memory and segment register. Allow movq for moving between
+ general-purpose register and segment register.
+
+2005-02-09 Jan Beulich <jbeulich@novell.com>
+
+ PR gas/707
+ * i386.h (i386_optab): Add x_Suf to fbld and fbstp. Add w_Suf and
+ FloatMF to fldcw, fstcw, fnstcw, and the memory formas of fstsw and
+ fnstsw.
+
+2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k.h (m68008, m68ec030, m68882): Remove.
+ (m68k_mask): New.
+ (cpu_m68k, cpu_cf): New.
+ (mcf5200, mcf5206e, mcf521x, mcf5249, mcf528x, mcf5307, mcf5407,
+ mcf5470, mcf5480): Rename to cpu_<foo>. Add m680x0 variants.
+
+2005-01-25 Alexandre Oliva <aoliva@redhat.com>
+
+ 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
+ * cgen.h (enum cgen_parse_operand_type): Add
+ CGEN_PARSE_OPERAND_SYMBOLIC.
+
+2005-01-21 Fred Fish <fnf@specifixinc.com>
+
+ * mips.h: Change INSN_ALIAS to INSN2_ALIAS.
+ Change INSN_WRITE_MDMX_ACC to INSN2_WRITE_MDMX_ACC.
+ Change INSN_READ_MDMX_ACC to INSN2_READ_MDMX_ACC.
+
+2005-01-19 Fred Fish <fnf@specifixinc.com>
+
+ * mips.h (struct mips_opcode): Add new pinfo2 member.
+ (INSN_ALIAS): New define for opcode table entries that are
+ specific instances of another entry, such as 'move' for an 'or'
+ with a zero operand.
+ (INSN_READ_MDMX_ACC): Redefine from 0 to 0x2.
+ (INSN_WRITE_MDMX_ACC): Redefine from 0 to 0x4.
+
+2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * mips.h (CPU_RM9000): Define.
+ (OPCODE_IS_MEMBER): Handle CPU_RM9000.
+
+2004-11-25 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h: CpuNo64 mov can't reasonably have a 'q' suffix. Moves
+ to/from test registers are illegal in 64-bit mode. Add missing
+ NoRex64 to sidt. fxsave/fxrstor now allow for a 'q' suffix
+ (previously one had to explicitly encode a rex64 prefix). Re-enable
+ lahf/sahf in 64-bit mode as at least some Athlon64/Opteron steppings
+ support it there. Add cmpxchg16b as per Intel's 64-bit documentation.
+
+2004-11-23 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h (i386_optab): paddq and psubq, even in their MMX form, are
+ available only with SSE2. Change the MMX additions introduced by SSE
+ and 3DNow!A to CpuMMX2 (rather than CpuMMX). Indicate the 3DNow!A
+ instructions by their now designated identifier (since combining i686
+ and 3DNow! does not really imply 3DNow!A).
+
+2004-11-19 Alan Modra <amodra@bigpond.net.au>
+
+ * msp430.h (struct rcodes_s, MSP430_RLC, msp430_rcodes,
+ struct hcodes_s, msp430_hcodes): Move to gas/config/tc-msp430.c.
+
+2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
+ Vineet Sharma <vineets@noida.hcltech.com>
+
+ * maxq.h: New file: Disassembly information for the maxq port.
+
+2004-11-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Put back "movzb".
+
+2004-11-04 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h (enum cris_insn_version_usage): Tweak formatting and
+ comments. Remove member cris_ver_sim. Add members
+ cris_ver_sim_v0_10, cris_ver_v0_10, cris_ver_v3_10,
+ cris_ver_v8_10, cris_ver_v10, cris_ver_v10p.
+ (struct cris_support_reg, struct cris_cond15): New types.
+ (cris_conds15): Declare.
+ (JUMP_PC_INCR_OPCODE_V32, BA_DWORD_OPCODE, NOP_OPCODE_COMMON)
+ (NOP_OPCODE_ZBITS_COMMON, LAPC_DWORD_OPCODE, LAPC_DWORD_Z_BITS)
+ (NOP_OPCODE_V32, NOP_Z_BITS_V32): New macros.
+ (NOP_Z_BITS): Define in terms of NOP_OPCODE.
+ (cris_imm_oprnd_size_type): New members SIZE_FIELD_SIGNED and
+ SIZE_FIELD_UNSIGNED.
+
+2004-11-04 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h (sldx_Suf): Remove.
+ (FP, l_FP, sl_FP, x_FP): Don't imply IgnoreSize.
+ (q_FP): Define, implying no REX64.
+ (x_FP, sl_FP): Imply FloatMF.
+ (i386_optab): Split reg and mem forms of moving from segment registers
+ so that the memory forms can ignore the 16-/32-bit operand size
+ distinction. Adjust a few others for Intel mode. Remove *FP uses from
+ all non-floating-point instructions. Unite 32- and 64-bit forms of
+ movsx, movzx, and movd. Adjust floating point operations for the above
+ changes to the *FP macros. Add DefaultSize to floating point control
+ insns operating on larger memory ranges. Remove left over comments
+ hinting at certain insns being Intel-syntax ones where the ones
+ actually meant are already gone.
+
+2004-10-07 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * crx.h: Add COPS_REG_INS - Coprocessor Special register
+ instruction type.
+
+2004-09-30 Paul Brook <paul@codesourcery.com>
+
+ * arm.h (ARM_EXT_V6K, ARM_EXT_V6Z): Define.
+ (ARM_ARCH_V6K, ARM_ARCH_V6Z, ARM_ARCH_V6ZK): Define.
+
+2004-09-11 Theodore A. Roth <troth@openavr.org>
+
+ * avr.h: Add support for
+ atmega48, atmega88, atmega168, attiny13, attiny2313, at90can128.
+
+2004-09-09 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * ppc.h (PPC_OPERAND_OPTIONAL): Fix comment.
+
+2004-08-24 Dmitry Diky <diwil@spec.ru>
+
+ * msp430.h (msp430_opc): Add new instructions.
+ (msp430_rcodes): Declare new instructions.
+ (msp430_hcodes): Likewise..
+
+2004-08-13 Nick Clifton <nickc@redhat.com>
+
+ PR/301
+ * h8300.h (O_JSR): Do not allow VECIND addressing for non-SX
+ processors.
+
2004-08-30 Michal Ludvig <mludvig@suse.cz>
* i386.h (i386_optab): Added montmul/xsha1/xsha256 insns.
-2004-04-08 Alan Modra <amodra@bigpond.net.au>
+2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
- Apply from mainline.
- 2004-03-12 Jakub Jelinek <jakub@redhat.com>
- * i386.h (i386_optab): Remove CpuNo64 from sysenter and sysexit.
+ * i386.h (i386_optab): Allow cs/ds in 64bit for branch hints.
+
+2004-07-21 Jan Beulich <jbeulich@novell.com>
+
+ * i386.h: Adjust instruction descriptions to better match the
+ specification.
+
+2004-07-16 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm.h: Remove all old content. Replace with architecture defines
+ from gas/config/tc-arm.c.
+
+2004-07-09 Andreas Schwab <schwab@suse.de>
+
+ * m68k.h: Fix comment.
+
+2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * crx.h: New file.
+
+2004-06-24 Alan Modra <amodra@bigpond.net.au>
+
+ * i386.h (i386_optab): Remove fildd, fistpd and fisttpd.
+
+2004-05-24 Peter Barada <peter@the-baradas.com>
+
+ * m68k.h: Add 'size' to m68k_opcode.
+
+2004-05-05 Peter Barada <peter@the-baradas.com>
+
+ * m68k.h: Switch from ColdFire chip name to core variant.
+
+2004-04-22 Peter Barada <peter@the-baradas.com>
+
+ * m68k.h: Add mcfmac/mcfemac definitions. Update operand
+ descriptions for new EMAC cases.
+ Remove ColdFire macmw/macml/msacmw/msacmw hacks and properly
+ handle Motorola MAC syntax.
+ Allow disassembly of ColdFire V4e object files.
2004-03-16 Alan Modra <amodra@bigpond.net.au>
* ppc.h (PPC_OPERAND_GPR_0): Define. Bump other operand defines.
+2004-03-12 Jakub Jelinek <jakub@redhat.com>
+
+ * i386.h (i386_optab): Remove CpuNo64 from sysenter and sysexit.
+
2004-03-12 Michal Ludvig <mludvig@suse.cz>
* i386.h (i386_optab): Added xstore as an alias for xstorerng.
diff --git a/contrib/binutils/include/opcode/ChangeLog-9103 b/contrib/binutils/include/opcode/ChangeLog-9103
index 0cdb1f3bed6c..9a04bf5f5c7e 100644
--- a/contrib/binutils/include/opcode/ChangeLog-9103
+++ b/contrib/binutils/include/opcode/ChangeLog-9103
@@ -1,3 +1,22 @@
+2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ 2003-11-18 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ * mips.h: Define new enum members, M_LCA_AB and M_DLCA_AB.
+
+ 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
+ * tic4x.h: Namespace cleanup. Replace s/c4x/tic4x
+
+ 2002-11-16 Klee Dienes <kdienes@apple.com>
+ * m88k.h (INSTAB): Remove 'next' field.
+ (instruction): Remove definition; replace with extern declaration
+ and mark as const.
+
+ 2002-08-28 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+ * tic4x.h: New file.
+
+ 2002-07-25 Richard Sandiford <rsandifo@redhat.com>
+ * mips.h (CPU_R2000): Remove.
+
2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
Bernardo Innocenti <bernie@develer.com>
diff --git a/contrib/binutils/include/opcode/alpha.h b/contrib/binutils/include/opcode/alpha.h
index efe16260ea40..22c85a1f5efc 100644
--- a/contrib/binutils/include/opcode/alpha.h
+++ b/contrib/binutils/include/opcode/alpha.h
@@ -17,7 +17,7 @@ the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef OPCODE_ALPHA_H
#define OPCODE_ALPHA_H
diff --git a/contrib/binutils/include/opcode/arc.h b/contrib/binutils/include/opcode/arc.h
index 629979d54a78..8ddcf5433a4d 100644
--- a/contrib/binutils/include/opcode/arc.h
+++ b/contrib/binutils/include/opcode/arc.h
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS or GDB; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
/* List of the various cpu types.
diff --git a/contrib/binutils/include/opcode/arm.h b/contrib/binutils/include/opcode/arm.h
index 99bb9a64f016..1d3aa5aeb3d2 100644
--- a/contrib/binutils/include/opcode/arm.h
+++ b/contrib/binutils/include/opcode/arm.h
@@ -1,294 +1,186 @@
-/* ARM opcode list.
- Copyright 1989, 1991 Free Software Foundation, Inc.
-
-This file is part of GDB and GAS.
-
-GDB and GAS are free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GDB and GAS are distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GDB or GAS; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* types of instruction (encoded in bits 26 and 27 of the instruction) */
-
-#define TYPE_ARITHMETIC 0
-#define TYPE_LDR_STR 1
-#define TYPE_BLOCK_BRANCH 2
-#define TYPE_SWI 3
-
-/* bit 25 decides whether an instruction is a block move or a branch */
-#define SUBTYPE_BLOCK 0
-#define SUBTYPE_BRANCH 1
-
-/* codes to distinguish the arithmetic instructions */
-
-#define OPCODE_AND 0
-#define OPCODE_EOR 1
-#define OPCODE_SUB 2
-#define OPCODE_RSB 3
-#define OPCODE_ADD 4
-#define OPCODE_ADC 5
-#define OPCODE_SBC 6
-#define OPCODE_RSC 7
-#define OPCODE_TST 8
-#define OPCODE_TEQ 9
-#define OPCODE_CMP 10
-#define OPCODE_CMN 11
-#define OPCODE_ORR 12
-#define OPCODE_MOV 13
-#define OPCODE_BIC 14
-#define OPCODE_MVN 15
-
-/* condition codes */
-
-#define COND_EQ 0
-#define COND_NE 1
-#define COND_CS 2
-#define COND_CC 3
-#define COND_MI 4
-#define COND_PL 5
-#define COND_VS 6
-#define COND_VC 7
-#define COND_HI 8
-#define COND_LS 9
-#define COND_GE 10
-#define COND_LT 11
-#define COND_GT 12
-#define COND_LE 13
-#define COND_AL 14
-#define COND_NV 15
-
-/* Describes the format of an ARM machine instruction */
-
-struct generic_fmt {
- unsigned rest :25; /* the rest of the instruction */
- unsigned subtype :1; /* used to decide between block and branch */
- unsigned type :2; /* one of TYPE_* */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct arith_fmt {
- unsigned operand2 :12; /* #nn or rn or rn shift #m or rn shift rm */
- unsigned dest :4; /* place where the answer goes */
- unsigned operand1 :4; /* first operand to instruction */
- unsigned set :1; /* == 1 means set processor flags */
- unsigned opcode :4; /* one of OPCODE_* defined above */
- unsigned immed :1; /* operand2 is an immediate value */
- unsigned type :2; /* == TYPE_ARITHMETIC */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct ldr_str_fmt {
- unsigned offset :12; /* #nn or rn or rn shift #m */
- unsigned reg :4; /* destination for LDR, source for STR */
- unsigned base :4; /* base register */
- unsigned is_load :1; /* == 1 for LDR */
- unsigned writeback :1; /* == 1 means write back (base+offset) into base */
- unsigned byte :1; /* == 1 means byte access else word */
- unsigned up :1; /* == 1 means add offset else subtract it */
- unsigned pre_index :1; /* == 1 means [a,b] form else [a],b form */
- unsigned immed :1; /* == 0 means immediate offset */
- unsigned type :2; /* == TYPE_LDR_STR */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct block_fmt {
- unsigned mask :16; /* register mask */
- unsigned base :4; /* register used as base of move */
- unsigned is_load :1; /* == 1 for LDM */
- unsigned writeback :1; /* == 1 means update base after move */
- unsigned set :1; /* == 1 means set flags in pc if included in mask */
- unsigned increment :1; /* == 1 means increment base register */
- unsigned before :1; /* == 1 means inc/dec before each move */
- unsigned is_block :1; /* == SUBTYPE_BLOCK */
- unsigned type :2; /* == TYPE_BLOCK_BRANCH */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct branch_fmt {
- unsigned dest :24; /* destination of the branch */
- unsigned link :1; /* branch with link (function call) */
- unsigned is_branch :1; /* == SUBTYPE_BRANCH */
- unsigned type :2; /* == TYPE_BLOCK_BRANCH */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-#define ROUND_N 0
-#define ROUND_P 1
-#define ROUND_M 2
-#define ROUND_Z 3
-
-#define FLOAT2_MVF 0
-#define FLOAT2_MNF 1
-#define FLOAT2_ABS 2
-#define FLOAT2_RND 3
-#define FLOAT2_SQT 4
-#define FLOAT2_LOG 5
-#define FLOAT2_LGN 6
-#define FLOAT2_EXP 7
-#define FLOAT2_SIN 8
-#define FLOAT2_COS 9
-#define FLOAT2_TAN 10
-#define FLOAT2_ASN 11
-#define FLOAT2_ACS 12
-#define FLOAT2_ATN 13
-
-#define FLOAT3_ADF 0
-#define FLOAT3_MUF 1
-#define FLOAT3_SUF 2
-#define FLOAT3_RSF 3
-#define FLOAT3_DVF 4
-#define FLOAT3_RDF 5
-#define FLOAT3_POW 6
-#define FLOAT3_RPW 7
-#define FLOAT3_RMF 8
-#define FLOAT3_FML 9
-#define FLOAT3_FDV 10
-#define FLOAT3_FRD 11
-#define FLOAT3_POL 12
-
-struct float2_fmt {
- unsigned operand2 :3; /* second operand */
- unsigned immed :1; /* == 1 if second operand is a constant */
- unsigned pad1 :1; /* == 0 */
- unsigned rounding :2; /* ROUND_* */
- unsigned is_double :1; /* == 1 if precision is double (only if not extended) */
- unsigned pad2 :4; /* == 1 */
- unsigned dest :3; /* destination */
- unsigned is_2_op :1; /* == 1 if 2 operand ins */
- unsigned operand1 :3; /* first operand (only of is_2_op == 0) */
- unsigned is_extended :1; /* == 1 if precision is extended */
- unsigned opcode :4; /* FLOAT2_* or FLOAT3_* depending on is_2_op */
- unsigned must_be_2 :2; /* == 2 */
- unsigned type :2; /* == TYPE_SWI */
- unsigned cond :4; /* COND_* */
-};
-
-struct swi_fmt {
- unsigned argument :24; /* argument to SWI (syscall number) */
- unsigned must_be_3 :2; /* == 3 */
- unsigned type :2; /* == TYPE_SWI */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-union insn_fmt {
- struct generic_fmt generic;
- struct arith_fmt arith;
- struct ldr_str_fmt ldr_str;
- struct block_fmt block;
- struct branch_fmt branch;
- struct swi_fmt swi;
- unsigned long ins;
-};
-
-struct opcode {
- unsigned long value, mask; /* recognise instruction if (op&mask)==value */
- char *assembler; /* how to disassemble this instruction */
-};
-
-/* format of the assembler string :
-
- %% %
- %<bitfield>d print the bitfield in decimal
- %<bitfield>x print the bitfield in hex
- %<bitfield>r print as an ARM register
- %<bitfield>f print a floating point constant if >7 else an fp register
- %c print condition code (always bits 28-31)
- %P print floating point precision in arithmetic insn
- %Q print floating point precision in ldf/stf insn
- %R print floating point rounding mode
- %<bitnum>'c print specified char iff bit is one
- %<bitnum>`c print specified char iff bit is zero
- %<bitnum>?ab print a if bit is one else print b
- %p print 'p' iff bits 12-15 are 15
- %o print operand2 (immediate or register + shift)
- %a print address for ldr/str instruction
- %b print branch destination
- %A print address for ldc/stc/ldf/stf instruction
- %m print register mask for ldm/stm instruction
-*/
-
-static struct opcode opcodes[] = {
- /* ARM instructions */
- 0x00000090, 0x0fe000f0, "mul%20's %12-15r, %16-19r, %0-3r",
- 0x00200090, 0x0fe000f0, "mla%20's %12-15r, %16-19r, %0-3r, %8-11r",
- 0x00000000, 0x0de00000, "and%c%20's %12-15r, %16-19r, %o",
- 0x00200000, 0x0de00000, "eor%c%20's %12-15r, %16-19r, %o",
- 0x00400000, 0x0de00000, "sub%c%20's %12-15r, %16-19r, %o",
- 0x00600000, 0x0de00000, "rsb%c%20's %12-15r, %16-19r, %o",
- 0x00800000, 0x0de00000, "add%c%20's %12-15r, %16-19r, %o",
- 0x00a00000, 0x0de00000, "adc%c%20's %12-15r, %16-19r, %o",
- 0x00c00000, 0x0de00000, "sbc%c%20's %12-15r, %16-19r, %o",
- 0x00e00000, 0x0de00000, "rsc%c%20's %12-15r, %16-19r, %o",
- 0x01000000, 0x0de00000, "tst%c%p %16-19r, %o",
- 0x01200000, 0x0de00000, "teq%c%p %16-19r, %o",
- 0x01400000, 0x0de00000, "cmp%c%p %16-19r, %o",
- 0x01600000, 0x0de00000, "cmn%c%p %16-19r, %o",
- 0x01800000, 0x0de00000, "orr%c%20's %12-15r, %16-19r, %o",
- 0x01a00000, 0x0de00000, "mov%c%20's %12-15r, %o",
- 0x01c00000, 0x0de00000, "bic%c%20's %12-15r, %16-19r, %o",
- 0x01e00000, 0x0de00000, "mvn%c%20's %12-15r, %o",
- 0x04000000, 0x0c100000, "str%c%22'b %12-15r, %a",
- 0x04100000, 0x0c100000, "ldr%c%22'b %12-15r, %a",
- 0x08000000, 0x0e100000, "stm%c%23?id%24?ba %16-19r%22`!, %m",
- 0x08100000, 0x0e100000, "ldm%c%23?id%24?ba %16-19r%22`!, %m%22'^",
- 0x0a000000, 0x0e000000, "b%c%24'l %b",
- 0x0f000000, 0x0f000000, "swi%c %0-23x",
- /* Floating point coprocessor instructions */
- 0x0e000100, 0x0ff08f10, "adf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e100100, 0x0ff08f10, "muf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e200100, 0x0ff08f10, "suf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e300100, 0x0ff08f10, "rsf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e400100, 0x0ff08f10, "dvf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e500100, 0x0ff08f10, "rdf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e600100, 0x0ff08f10, "pow%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e700100, 0x0ff08f10, "rpw%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e800100, 0x0ff08f10, "rmf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e900100, 0x0ff08f10, "fml%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0ea00100, 0x0ff08f10, "fdv%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0eb00100, 0x0ff08f10, "frd%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0ec00100, 0x0ff08f10, "pol%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e008100, 0x0ff08f10, "mvf%c%P%R %12-14f, %0-3f",
- 0x0e108100, 0x0ff08f10, "mnf%c%P%R %12-14f, %0-3f",
- 0x0e208100, 0x0ff08f10, "abs%c%P%R %12-14f, %0-3f",
- 0x0e308100, 0x0ff08f10, "rnd%c%P%R %12-14f, %0-3f",
- 0x0e408100, 0x0ff08f10, "sqt%c%P%R %12-14f, %0-3f",
- 0x0e508100, 0x0ff08f10, "log%c%P%R %12-14f, %0-3f",
- 0x0e608100, 0x0ff08f10, "lgn%c%P%R %12-14f, %0-3f",
- 0x0e708100, 0x0ff08f10, "exp%c%P%R %12-14f, %0-3f",
- 0x0e808100, 0x0ff08f10, "sin%c%P%R %12-14f, %0-3f",
- 0x0e908100, 0x0ff08f10, "cos%c%P%R %12-14f, %0-3f",
- 0x0ea08100, 0x0ff08f10, "tan%c%P%R %12-14f, %0-3f",
- 0x0eb08100, 0x0ff08f10, "asn%c%P%R %12-14f, %0-3f",
- 0x0ec08100, 0x0ff08f10, "acs%c%P%R %12-14f, %0-3f",
- 0x0ed08100, 0x0ff08f10, "atn%c%P%R %12-14f, %0-3f",
- 0x0e000110, 0x0ff00f1f, "flt%c%P%R %16-18f, %12-15r",
- 0x0e100110, 0x0fff0f98, "fix%c%R %12-15r, %0-2f",
- 0x0e200110, 0x0fff0fff, "wfs%c %12-15r",
- 0x0e300110, 0x0fff0fff, "rfs%c %12-15r",
- 0x0e400110, 0x0fff0fff, "wfc%c %12-15r",
- 0x0e500110, 0x0fff0fff, "rfc%c %12-15r",
- 0x0e90f110, 0x0ff8fff0, "cmf%c %16-18f, %0-3f",
- 0x0eb0f110, 0x0ff8fff0, "cnf%c %16-18f, %0-3f",
- 0x0ed0f110, 0x0ff8fff0, "cmfe%c %16-18f, %0-3f",
- 0x0ef0f110, 0x0ff8fff0, "cnfe%c %16-18f, %0-3f",
- 0x0c000100, 0x0e100f00, "stf%c%Q %12-14f, %A",
- 0x0c100100, 0x0e100f00, "ldf%c%Q %12-14f, %A",
- /* Generic coprocessor instructions */
- 0x0e000000, 0x0f000010, "cdp%c %8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0e000010, 0x0f100010, "mrc%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0e100010, 0x0f100010, "mcr%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0c000000, 0x0e100000, "stc%c%22`l %8-11d, cr%12-15d, %A",
- 0x0c100000, 0x0e100000, "ldc%c%22`l %8-11d, cr%12-15d, %A",
- /* the rest */
- 0x00000000, 0x00000000, "undefined instruction %0-31x",
-};
-#define N_OPCODES (sizeof opcodes / sizeof opcodes[0])
+/* ARM assembler/disassembler support.
+ Copyright 2004 Free Software Foundation, Inc.
+
+ This file is part of GDB and GAS.
+
+ GDB and GAS are free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 1, or (at
+ your option) any later version.
+
+ GDB and GAS are distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GDB or GAS; see the file COPYING. If not, write to the
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* The following bitmasks control CPU extensions: */
+#define ARM_EXT_V1 0x00000001 /* All processors (core set). */
+#define ARM_EXT_V2 0x00000002 /* Multiply instructions. */
+#define ARM_EXT_V2S 0x00000004 /* SWP instructions. */
+#define ARM_EXT_V3 0x00000008 /* MSR MRS. */
+#define ARM_EXT_V3M 0x00000010 /* Allow long multiplies. */
+#define ARM_EXT_V4 0x00000020 /* Allow half word loads. */
+#define ARM_EXT_V4T 0x00000040 /* Thumb. */
+#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */
+#define ARM_EXT_V5T 0x00000100 /* Improved interworking. */
+#define ARM_EXT_V5ExP 0x00000200 /* DSP core set. */
+#define ARM_EXT_V5E 0x00000400 /* DSP Double transfers. */
+#define ARM_EXT_V5J 0x00000800 /* Jazelle extension. */
+#define ARM_EXT_V6 0x00001000 /* ARM V6. */
+#define ARM_EXT_V6K 0x00002000 /* ARM V6K. */
+#define ARM_EXT_V6Z 0x00004000 /* ARM V6Z. */
+#define ARM_EXT_V6T2 0x00008000 /* Thumb-2. */
+#define ARM_EXT_DIV 0x00010000 /* Integer division. */
+/* The 'M' in Arm V7M stands for Microcontroller.
+ On earlier architecture variants it stands for Multiply. */
+#define ARM_EXT_V5E_NOTM 0x00020000 /* Arm V5E but not Arm V7M. */
+#define ARM_EXT_V6_NOTM 0x00040000 /* Arm V6 but not Arm V7M. */
+#define ARM_EXT_V7 0x00080000 /* Arm V7. */
+#define ARM_EXT_V7A 0x00100000 /* Arm V7A. */
+#define ARM_EXT_V7R 0x00200000 /* Arm V7R. */
+#define ARM_EXT_V7M 0x00400000 /* Arm V7M. */
+
+/* Co-processor space extensions. */
+#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 FPU_ENDIAN_PURE 0x80000000 /* Pure-endian doubles. */
+#define FPU_ENDIAN_BIG 0 /* Double words-big-endian. */
+#define FPU_FPA_EXT_V1 0x40000000 /* Base FPA instruction set. */
+#define FPU_FPA_EXT_V2 0x20000000 /* LFM/SFM. */
+#define FPU_MAVERICK 0x10000000 /* Cirrus Maverick. */
+#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. */
+
+/* Architectures are the sum of the base and extensions. The ARM ARM (rev E)
+ defines the following: ARMv3, ARMv3M, ARMv4xM, ARMv4, ARMv4TxM, ARMv4T,
+ ARMv5xM, ARMv5, ARMv5TxM, ARMv5T, ARMv5TExP, ARMv5TE. To these we add
+ three more to cover cores prior to ARM6. Finally, there are cores which
+ implement further extensions in the co-processor space. */
+#define ARM_AEXT_V1 ARM_EXT_V1
+#define ARM_AEXT_V2 (ARM_AEXT_V1 | ARM_EXT_V2)
+#define ARM_AEXT_V2S (ARM_AEXT_V2 | ARM_EXT_V2S)
+#define ARM_AEXT_V3 (ARM_AEXT_V2S | ARM_EXT_V3)
+#define ARM_AEXT_V3M (ARM_AEXT_V3 | ARM_EXT_V3M)
+#define ARM_AEXT_V4xM (ARM_AEXT_V3 | ARM_EXT_V4)
+#define ARM_AEXT_V4 (ARM_AEXT_V3M | ARM_EXT_V4)
+#define ARM_AEXT_V4TxM (ARM_AEXT_V4xM | ARM_EXT_V4T)
+#define ARM_AEXT_V4T (ARM_AEXT_V4 | ARM_EXT_V4T)
+#define ARM_AEXT_V5xM (ARM_AEXT_V4xM | ARM_EXT_V5)
+#define ARM_AEXT_V5 (ARM_AEXT_V4 | ARM_EXT_V5)
+#define ARM_AEXT_V5TxM (ARM_AEXT_V5xM | ARM_EXT_V4T | ARM_EXT_V5T)
+#define ARM_AEXT_V5T (ARM_AEXT_V5 | ARM_EXT_V4T | ARM_EXT_V5T)
+#define ARM_AEXT_V5TExP (ARM_AEXT_V5T | ARM_EXT_V5ExP)
+#define ARM_AEXT_V5TE (ARM_AEXT_V5TExP | ARM_EXT_V5E)
+#define ARM_AEXT_V5TEJ (ARM_AEXT_V5TE | ARM_EXT_V5J)
+#define ARM_AEXT_V6 (ARM_AEXT_V5TEJ | ARM_EXT_V6)
+#define ARM_AEXT_V6K (ARM_AEXT_V6 | ARM_EXT_V6K)
+#define ARM_AEXT_V6Z (ARM_AEXT_V6 | ARM_EXT_V6Z)
+#define ARM_AEXT_V6ZK (ARM_AEXT_V6 | ARM_EXT_V6K | ARM_EXT_V6Z)
+#define ARM_AEXT_V6T2 (ARM_AEXT_V6 | ARM_EXT_V6T2 | ARM_EXT_V6_NOTM)
+#define ARM_AEXT_V6KT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K)
+#define ARM_AEXT_V6ZT2 (ARM_AEXT_V6T2 | ARM_EXT_V6Z)
+#define ARM_AEXT_V6ZKT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K | ARM_EXT_V6Z)
+#define ARM_AEXT_V7_ARM (ARM_AEXT_V6ZKT2 | ARM_EXT_V7)
+#define ARM_AEXT_V7A (ARM_AEXT_V7_ARM | ARM_EXT_V7A)
+#define ARM_AEXT_V7R (ARM_AEXT_V7_ARM | ARM_EXT_V7R | ARM_EXT_DIV)
+#define ARM_AEXT_NOTM \
+ (ARM_AEXT_V4 | ARM_EXT_V5ExP | ARM_EXT_V5J | ARM_EXT_V6_NOTM)
+#define ARM_AEXT_V7M \
+ ((ARM_AEXT_V7_ARM | ARM_EXT_V7M | ARM_EXT_DIV) & ~(ARM_AEXT_NOTM))
+#define ARM_AEXT_V7 (ARM_AEXT_V7A & ARM_AEXT_V7R & ARM_AEXT_V7M)
+
+/* Processors with specific extensions in the co-processor space. */
+#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 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_FPA (FPU_FPA_EXT_V1 | FPU_FPA_EXT_V2)
+
+/* Deprecated */
+#define FPU_ARCH_VFP ARM_FEATURE (0, FPU_ENDIAN_PURE)
+
+#define FPU_ARCH_FPE ARM_FEATURE (0, FPU_FPA_EXT_V1)
+#define FPU_ARCH_FPA ARM_FEATURE (0, FPU_FPA)
+
+#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_HARD ARM_FEATURE (0, FPU_VFP_HARD)
+
+#define FPU_ARCH_ENDIAN_PURE ARM_FEATURE (0, FPU_ENDIAN_PURE)
+
+#define FPU_ARCH_MAVERICK ARM_FEATURE (0, FPU_MAVERICK)
+
+#define ARM_ARCH_V1 ARM_FEATURE (ARM_AEXT_V1, 0)
+#define ARM_ARCH_V2 ARM_FEATURE (ARM_AEXT_V2, 0)
+#define ARM_ARCH_V2S ARM_FEATURE (ARM_AEXT_V2S, 0)
+#define ARM_ARCH_V3 ARM_FEATURE (ARM_AEXT_V3, 0)
+#define ARM_ARCH_V3M ARM_FEATURE (ARM_AEXT_V3M, 0)
+#define ARM_ARCH_V4xM ARM_FEATURE (ARM_AEXT_V4xM, 0)
+#define ARM_ARCH_V4 ARM_FEATURE (ARM_AEXT_V4, 0)
+#define ARM_ARCH_V4TxM ARM_FEATURE (ARM_AEXT_V4TxM, 0)
+#define ARM_ARCH_V4T ARM_FEATURE (ARM_AEXT_V4T, 0)
+#define ARM_ARCH_V5xM ARM_FEATURE (ARM_AEXT_V5xM, 0)
+#define ARM_ARCH_V5 ARM_FEATURE (ARM_AEXT_V5, 0)
+#define ARM_ARCH_V5TxM ARM_FEATURE (ARM_AEXT_V5TxM, 0)
+#define ARM_ARCH_V5T ARM_FEATURE (ARM_AEXT_V5T, 0)
+#define ARM_ARCH_V5TExP ARM_FEATURE (ARM_AEXT_V5TExP, 0)
+#define ARM_ARCH_V5TE ARM_FEATURE (ARM_AEXT_V5TE, 0)
+#define ARM_ARCH_V5TEJ ARM_FEATURE (ARM_AEXT_V5TEJ, 0)
+#define ARM_ARCH_V6 ARM_FEATURE (ARM_AEXT_V6, 0)
+#define ARM_ARCH_V6K ARM_FEATURE (ARM_AEXT_V6K, 0)
+#define ARM_ARCH_V6Z ARM_FEATURE (ARM_AEXT_V6Z, 0)
+#define ARM_ARCH_V6ZK ARM_FEATURE (ARM_AEXT_V6ZK, 0)
+#define ARM_ARCH_V6T2 ARM_FEATURE (ARM_AEXT_V6T2, 0)
+#define ARM_ARCH_V6KT2 ARM_FEATURE (ARM_AEXT_V6KT2, 0)
+#define ARM_ARCH_V6ZT2 ARM_FEATURE (ARM_AEXT_V6ZT2, 0)
+#define ARM_ARCH_V6ZKT2 ARM_FEATURE (ARM_AEXT_V6ZKT2, 0)
+#define ARM_ARCH_V7 ARM_FEATURE (ARM_AEXT_V7, 0)
+#define ARM_ARCH_V7A ARM_FEATURE (ARM_AEXT_V7A, 0)
+#define ARM_ARCH_V7R ARM_FEATURE (ARM_AEXT_V7R, 0)
+#define ARM_ARCH_V7M ARM_FEATURE (ARM_AEXT_V7M, 0)
+
+/* Some useful combinations: */
+#define ARM_ARCH_NONE ARM_FEATURE (0, 0)
+#define FPU_NONE ARM_FEATURE (0, 0)
+#define ARM_ANY ARM_FEATURE (-1, 0) /* Any basic core. */
+#define FPU_ANY_HARD ARM_FEATURE (0, FPU_FPA | FPU_VFP_HARD | FPU_MAVERICK)
+#define ARM_ARCH_THUMB2 ARM_FEATURE (ARM_EXT_V6T2 | ARM_EXT_V7 | ARM_EXT_V7A | ARM_EXT_V7R | ARM_EXT_V7M | ARM_EXT_DIV, 0)
+
+/* There are too many feature bits to fit in a single word, so use a
+ structure. For simplicity we put all core features in one word and
+ everything else in the other. */
+typedef struct
+{
+ unsigned long core;
+ unsigned long coproc;
+} arm_feature_set;
+
+#define ARM_CPU_HAS_FEATURE(CPU,FEAT) \
+ (((CPU).core & (FEAT).core) != 0 || ((CPU).coproc & (FEAT).coproc) != 0)
+
+#define ARM_MERGE_FEATURE_SETS(TARG,F1,F2) \
+ do { \
+ (TARG).core = (F1).core | (F2).core; \
+ (TARG).coproc = (F1).coproc | (F2).coproc; \
+ } while (0)
+
+#define ARM_CLEAR_FEATURE(TARG,F1,F2) \
+ do { \
+ (TARG).core = (F1).core &~ (F2).core; \
+ (TARG).coproc = (F1).coproc &~ (F2).coproc; \
+ } while (0)
+
+#define ARM_FEATURE(core, coproc) {(core), (coproc)}
diff --git a/contrib/binutils/include/opcode/cgen.h b/contrib/binutils/include/opcode/cgen.h
index 16366fd0d759..e8fd5d3d9f73 100644
--- a/contrib/binutils/include/opcode/cgen.h
+++ b/contrib/binutils/include/opcode/cgen.h
@@ -1,6 +1,6 @@
/* Header file for targets using CGEN: Cpu tools GENerator.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GDB, the GNU debugger, and the GNU Binutils.
@@ -17,11 +17,13 @@ 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. */
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef CGEN_H
#define CGEN_H
+#include "symcat.h"
+#include "cgen-bitset.h"
/* ??? This file requires bfd.h but only to get bfd_vma.
Seems like an awful lot to require just to get such a fundamental type.
Perhaps the definition of bfd_vma can be moved outside of bfd.h.
@@ -107,7 +109,13 @@ typedef struct cgen_cpu_desc *CGEN_CPU_DESC;
/* Type of attribute values. */
-typedef int CGEN_ATTR_VALUE_TYPE;
+typedef CGEN_BITSET CGEN_ATTR_VALUE_BITSET_TYPE;
+typedef int CGEN_ATTR_VALUE_ENUM_TYPE;
+typedef union
+{
+ CGEN_ATTR_VALUE_BITSET_TYPE bitset;
+ CGEN_ATTR_VALUE_ENUM_TYPE nonbitset;
+} CGEN_ATTR_VALUE_TYPE;
/* Struct to record attribute information. */
@@ -153,7 +161,9 @@ struct { unsigned int bool; \
#define CGEN_ATTR_VALUE(obj, attr_table, attr) \
((unsigned int) (attr) < CGEN_ATTR_NBOOL_OFFSET \
? ((CGEN_ATTR_BOOLS (attr_table) & CGEN_ATTR_MASK (attr)) != 0) \
- : ((attr_table)->nonbool[(attr) - CGEN_ATTR_NBOOL_OFFSET]))
+ : ((attr_table)->nonbool[(attr) - CGEN_ATTR_NBOOL_OFFSET].nonbitset))
+#define CGEN_BITSET_ATTR_VALUE(obj, attr_table, attr) \
+ ((attr_table)->nonbool[(attr) - CGEN_ATTR_NBOOL_OFFSET].bitset)
/* Attribute name/value tables.
These are used to assist parsing of descriptions at run-time. */
@@ -161,7 +171,7 @@ struct { unsigned int bool; \
typedef struct
{
const char * name;
- CGEN_ATTR_VALUE_TYPE value;
+ unsigned value;
} CGEN_ATTR_ENTRY;
/* For each domain (ifld,hw,operand,insn), list of attributes. */
@@ -369,7 +379,8 @@ enum cgen_parse_operand_type
{
CGEN_PARSE_OPERAND_INIT,
CGEN_PARSE_OPERAND_INTEGER,
- CGEN_PARSE_OPERAND_ADDRESS
+ CGEN_PARSE_OPERAND_ADDRESS,
+ CGEN_PARSE_OPERAND_SYMBOLIC
};
/* Values for indicating what was parsed. */
@@ -964,6 +975,7 @@ typedef CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) CGEN_INSN_ATTR_TYPE;
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS = 0
} CGEN_INSN_ATTR;
+#define CGEN_ATTR_CGEN_INSN_ALIAS_VALUE(attrs) ((attrs)->bool & (1 << CGEN_INSN_ALIAS))
#endif
/* This struct defines each entry in the instruction table. */
@@ -1015,6 +1027,8 @@ typedef struct
/* Return value of attribute ATTR in INSN. */
#define CGEN_INSN_ATTR_VALUE(insn, attr) \
CGEN_ATTR_VALUE ((insn), CGEN_INSN_ATTRS (insn), (attr))
+#define CGEN_INSN_BITSET_ATTR_VALUE(insn, attr) \
+ CGEN_BITSET_ATTR_VALUE ((insn), CGEN_INSN_ATTRS (insn), (attr))
} CGEN_IBASE;
/* Return non-zero if INSN is the "invalid" insn marker. */
@@ -1178,10 +1192,9 @@ typedef struct cgen_cpu_desc
/* Bitmap of selected machine(s) (a la BFD machine number). */
int machs;
- /* Bitmap of selected isa(s).
- ??? Simultaneous multiple isas might not make sense, but it's not (yet)
- precluded. */
- int isas;
+ /* Bitmap of selected isa(s). */
+ CGEN_BITSET *isas;
+#define CGEN_CPU_ISAS(cd) ((cd)->isas)
/* Current endian. */
enum cgen_endian endian;
diff --git a/contrib/binutils/include/opcode/convex.h b/contrib/binutils/include/opcode/convex.h
index ccf556829152..7843dce8b5b6 100644
--- a/contrib/binutils/include/opcode/convex.h
+++ b/contrib/binutils/include/opcode/convex.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define xxx 0
#define rrr 1
diff --git a/contrib/binutils/include/opcode/i386.h b/contrib/binutils/include/opcode/i386.h
index ce1a327bf8cf..2b2c1e0f9790 100644
--- a/contrib/binutils/include/opcode/i386.h
+++ b/contrib/binutils/include/opcode/i386.h
@@ -1,23 +1,23 @@
/* opcode/i386.h -- Intel 80386 opcode table
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
-This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
+ 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 free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* The SystemV/386 SVR3.2 assembler, and probably all AT&T derived
ix86 Unix assemblers, generate floating point instructions with
@@ -48,7 +48,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define OLDGCC_COMPAT SYSV386_COMPAT
#endif
-static const template i386_optab[] = {
+static const template i386_optab[] =
+{
#define X None
#define NoSuf (No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf)
@@ -64,13 +65,13 @@ static const template i386_optab[] = {
#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 sldx_Suf (No_bSuf|No_wSuf|No_qSuf)
#define bwl_Suf (No_sSuf|No_xSuf|No_qSuf)
#define bwlq_Suf (No_sSuf|No_xSuf)
-#define FP (NoSuf|IgnoreSize)
-#define l_FP (l_Suf|IgnoreSize)
-#define x_FP (x_Suf|IgnoreSize)
-#define sl_FP (sl_Suf|IgnoreSize)
+#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
@@ -82,12 +83,13 @@ static const template i386_optab[] = {
/* Move instructions. */
#define MOV_AX_DISP32 0xa0
-/* In the 64bit mode the short form mov immediate is redefined to have
- 64bit displacement value. */
-{ "mov", 2, 0xa0, X, CpuNo64,bwlq_Suf|D|W, { Disp16|Disp32, Acc, 0 } },
+/* 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 displacement value. */
+ 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 } },
@@ -96,17 +98,21 @@ static const template i386_optab[] = {
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|WordMem, 0 } },
-{ "mov", 2, 0x8c, X, Cpu386, wl_Suf|Modrm, { SReg3, WordReg|WordMem, 0 } },
-{ "mov", 2, 0x8e, X, 0, wl_Suf|Modrm|IgnoreSize, { WordReg|WordMem, SReg2, 0 } },
-{ "mov", 2, 0x8e, X, Cpu386, wl_Suf|Modrm|IgnoreSize, { WordReg|WordMem, SReg3, 0 } },
+{ "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, l_Suf|D|Modrm|IgnoreSize, { Test, Reg32|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 } },
@@ -119,42 +125,41 @@ static const template i386_optab[] = {
{"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 5 insns */
+/* 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, 0} },
-{"movsx", 2, 0x0fbe, X, Cpu64, b_Suf|Modrm|Rex64, { Reg8|ByteMem, Reg64, 0} },
-{"movsx", 2, 0x0fbf, X, Cpu64, w_Suf|Modrm|Rex64, { Reg16|ShortMem, Reg64, 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. */
+/* 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 usefull, since the zero extend
+/* 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 4 insns */
+/* 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, 0} },
-/* These instructions are not particulary usefull, since the zero extend
- 32->64 is implicit, but we can encode them. */
-{"movzx", 2, 0x0fb6, X, Cpu386, b_Suf|Modrm|Rex64, { Reg8|ByteMem, Reg64, 0} },
-{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm|Rex64, { Reg16|ShortMem, Reg64, 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, 0|CpuNo64, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 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, { WordReg, 0, 0 } },
-{"push", 1, 0xff, 6, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { WordReg|WordMem, 0, 0 } },
-{"push", 1, 0x6a, X, Cpu186|Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm8S, 0, 0} },
-{"push", 1, 0x68, X, Cpu186|Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm32S|Imm16, 0, 0} },
-{"push", 1, 0x06, X, Cpu64, wq_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
-{"push", 1, 0x0fa0, X, Cpu386|Cpu64, wq_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
+{"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 } },
@@ -165,9 +170,8 @@ static const template i386_optab[] = {
{"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, { WordReg, 0, 0 } },
-{"pop", 1, 0x8f, 0, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { WordReg|WordMem, 0, 0 } },
-{"pop", 1, 0x07, X, Cpu64, wq_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
+{"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 } },
@@ -175,14 +179,24 @@ static const template i386_optab[] = {
/* Exchange instructions.
xchg commutes: we allow both operand orders.
- In the 64bit code, xchg eax, eax is reused for new nop instruction.
- */
+ 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 } },
@@ -196,11 +210,11 @@ static const template i386_optab[] = {
{"lea", 2, 0x8d, X, 0, wlq_Suf|Modrm, { WordMem, WordReg, 0 } },
/* Load segment registers from memory. */
-{"lds", 2, 0xc5, X, CpuNo64, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
-{"les", 2, 0xc4, X, CpuNo64, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lfs", 2, 0x0fb4, X, Cpu386, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lgs", 2, 0x0fb5, X, Cpu386, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lss", 2, 0x0fb2, X, Cpu386, wlq_Suf|Modrm, { WordMem, WordReg, 0} },
+{"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} },
@@ -208,11 +222,11 @@ static const template i386_optab[] = {
{"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, CpuNo64,NoSuf, { 0, 0, 0} },
-{"sahf", 0, 0x9e, X, CpuNo64,NoSuf, { 0, 0, 0} },
-{"pushf", 0, 0x9c, X, CpuNo64,wlq_Suf|DefaultSize, { 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,wlq_Suf|DefaultSize, { 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} },
@@ -276,14 +290,14 @@ static const template i386_optab[] = {
{"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, 0, NoSuf, { 0, 0, 0} },
-{"aas", 0, 0x3f, X, 0, NoSuf, { 0, 0, 0} },
-{"daa", 0, 0x27, X, 0, NoSuf, { 0, 0, 0} },
-{"das", 0, 0x2f, X, 0, NoSuf, { 0, 0, 0} },
-{"aad", 0, 0xd50a, X, 0, NoSuf, { 0, 0, 0} },
-{"aad", 1, 0xd5, X, 0, NoSuf, { Imm8S, 0, 0} },
-{"aam", 0, 0xd40a, X, 0, NoSuf, { 0, 0, 0} },
-{"aam", 1, 0xd4, X, 0, NoSuf, { Imm8S, 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 */
@@ -370,37 +384,38 @@ static const template i386_optab[] = {
{"shrd", 2, 0x0fad, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
/* Control transfer instructions. */
-{"call", 1, 0xe8, X, 0, wlq_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
+{"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,{ 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,wlq_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
+{"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, 0, 0} },
-{"lcall", 2, 0x9a, X, CpuNo64, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
-{"lcall", 1, 0xff, 3, CpuNo64, wl_Suf|Modrm|DefaultSize, { WordMem|JumpAbsolute, 0, 0} },
-{"lcall", 1, 0xff, 3, Cpu64, q_Suf|Modrm|DefaultSize|NoRex64,{ WordMem|JumpAbsolute, 0, 0} },
+{"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, 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, { WordReg|WordMem|JumpAbsolute, 0, 0} },
-/* Intel Syntax */
+{"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, 0, 0} },
-{"ljmp", 2, 0xea, X, CpuNo64, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
-{"ljmp", 1, 0xff, 5, CpuNo64, wl_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} },
-{"ljmp", 1, 0xff, 5, Cpu64, q_Suf|Modrm|NoRex64, { WordMem|JumpAbsolute, 0, 0} },
-
-{"ret", 0, 0xc3, X, CpuNo64,wlq_Suf|DefaultSize, { 0, 0, 0} },
-{"ret", 1, 0xc2, X, CpuNo64,wlq_Suf|DefaultSize, { Imm16, 0, 0} },
-{"ret", 0, 0xc3, X, Cpu64, q_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
-{"ret", 1, 0xc2, X, Cpu64, q_Suf|DefaultSize|NoRex64,{ Imm16, 0, 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, wlq_Suf|DefaultSize, { Imm16, Imm8, 0} },
-{"leave", 0, 0xc9, X, Cpu186, wlq_Suf|DefaultSize, { 0, 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} },
@@ -536,33 +551,37 @@ static const template i386_optab[] = {
/* 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 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, 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, wlq_Suf|Modrm, { WordReg, WordMem, 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, w_Suf|Modrm|IgnoreSize,{ Reg16, Reg16|ShortMem, 0} },
+{"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, wlq_Suf|Modrm, { WordMem, 0, 0} },
-{"lidt", 1, 0x0f01, 3, Cpu286, wlq_Suf|Modrm, { WordMem, 0, 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, wlq_Suf|Modrm, { WordMem, 0, 0} },
-{"sidt", 1, 0x0f01, 1, Cpu286, wlq_Suf|Modrm, { WordMem, 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} },
@@ -577,37 +596,33 @@ static const template i386_optab[] = {
/* load */
{"fld", 1, 0xd9c0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fld", 1, 0xd9, 0, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fld", 1, 0xd9c0, X, 0, l_FP|ShortForm|Ugh, { 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|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-/* Intel Syntax */
-{"fildd", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fildq", 1, 0xdf, 5, 0, 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, 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|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fst", 1, 0xddd0, X, 0, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-{"fist", 1, 0xdf, 2, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 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|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fstp", 1, 0xddd8, X, 0, l_FP|ShortForm|Ugh, { 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|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-/* Intel Syntax */
-{"fistpd", 1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fistpq", 1, 0xdf, 7, 0, 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, 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} },
@@ -618,17 +633,17 @@ static const template i386_optab[] = {
{"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|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fcom", 1, 0xd8d0, X, 0, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-{"ficom", 1, 0xde, 2, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 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|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fcomp", 1, 0xd8d8, X, 0, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-{"ficomp", 1, 0xde, 3, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 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) */
@@ -652,7 +667,7 @@ static const template i386_optab[] = {
{"fldln2", 0, 0xd9ed, X, 0, FP, { 0, 0, 0} },
{"fldz", 0, 0xd9ee, X, 0, FP, { 0, 0, 0} },
-/* arithmetic */
+/* Arithmetic. */
/* add */
{"fadd", 2, 0xd8c0, X, 0, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
@@ -662,8 +677,8 @@ static const template i386_optab[] = {
/* alias for faddp */
{"fadd", 0, 0xdec1, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fadd", 1, 0xd8, 0, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fiadd", 1, 0xde, 0, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
@@ -678,8 +693,8 @@ static const template i386_optab[] = {
/* alias for fsubp */
{"fsub", 0, 0xdee1, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fsub", 1, 0xd8, 4, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fisub", 1, 0xde, 4, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
@@ -701,8 +716,8 @@ static const template i386_optab[] = {
/* alias for fsubrp */
{"fsubr", 0, 0xdee9, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fsubr", 1, 0xd8, 5, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fisubr", 1, 0xde, 5, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
@@ -724,8 +739,8 @@ static const template i386_optab[] = {
/* alias for fmulp */
{"fmul", 0, 0xdec9, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fmul", 1, 0xd8, 1, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fimul", 1, 0xde, 1, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
@@ -739,8 +754,8 @@ static const template i386_optab[] = {
/* alias for fdivp */
{"fdiv", 0, 0xdef1, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fdiv", 1, 0xd8, 6, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fidiv", 1, 0xde, 6, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
@@ -762,8 +777,8 @@ static const template i386_optab[] = {
/* alias for fdivrp */
{"fdivr", 0, 0xdef9, X, 0, FP|Ugh, { 0, 0, 0} },
#endif
-{"fdivr", 1, 0xd8, 7, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fidivr", 1, 0xde, 7, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+{"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} },
@@ -800,24 +815,26 @@ static const template i386_optab[] = {
/* 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, FP|Modrm, { ShortMem, 0, 0} },
-{"fnstcw", 1, 0xd9, 7, 0, FP|Modrm, { ShortMem, 0, 0} },
-{"fstcw", 1, 0xd9, 7, 0, FP|FWait|Modrm, { ShortMem, 0, 0} },
-{"fnstsw", 1, 0xdfe0, X, 0, FP, { Acc, 0, 0} },
-{"fnstsw", 1, 0xdd, 7, 0, FP|Modrm, { ShortMem, 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} },
-{"fstsw", 1, 0xdfe0, X, 0, FP|FWait, { Acc, 0, 0} },
-{"fstsw", 1, 0xdd, 7, 0, FP|FWait|Modrm, { ShortMem, 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, { LLongMem, 0, 0} },
-{"fstenv", 1, 0xd9, 6, 0, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} },
-{"fldenv", 1, 0xd9, 4, 0, sl_Suf|Modrm, { LLongMem, 0, 0} },
-{"fnsave", 1, 0xdd, 6, 0, sl_Suf|Modrm, { LLongMem, 0, 0} },
-{"fsave", 1, 0xdd, 6, 0, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} },
-{"frstor", 1, 0xdd, 4, 0, sl_Suf|Modrm, { LLongMem, 0, 0} },
+{"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 */
@@ -829,30 +846,30 @@ static const template i386_optab[] = {
/* Opcode prefixes; we allow them as separate insns too. */
#define ADDR_PREFIX_OPCODE 0x67
-{"addr16", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"addr32", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"aword", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"adword", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"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, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"word", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"dword", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
+{"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} },
+{"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} },
+{"ds", 0, 0x3e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define ES_PREFIX_OPCODE 0x26
-{"es", 0, 0x26, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"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, 0, NoSuf|IsPrefix, { 0, 0, 0} },
+{"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} },
@@ -860,6 +877,8 @@ static const template i386_optab[] = {
{"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} },
@@ -884,7 +903,7 @@ static const template i386_optab[] = {
{"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, { AnyMem, 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} },
@@ -893,13 +912,13 @@ static const template i386_optab[] = {
{"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, NoSuf|Modrm, { LLongMem, 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, FP|Modrm, { LLongMem, 0, 0} },
-{"fxrstor", 1, 0x0fae, 1, Cpu686, FP|Modrm, { LLongMem, 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} },
@@ -967,411 +986,505 @@ static const template i386_optab[] = {
/* Pentium4 extensions. */
-{"movnti", 2, 0x0fc3, X, CpuP4, FP|Modrm, { WordReg, WordMem, 0 } },
-{"clflush", 1, 0x0fae, 7, CpuP4, FP|Modrm, { ByteMem, 0, 0 } },
-{"lfence", 0, 0x0fae, 0xe8, CpuP4, FP|ImmExt, { 0, 0, 0 } },
-{"mfence", 0, 0x0fae, 0xf0, CpuP4, FP|ImmExt, { 0, 0, 0 } },
-{"pause", 0, 0xf390, X, CpuP4, FP, { 0, 0, 0 } },
+{"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, FP, { 0, 0, 0 } },
-{"movd", 2, 0x0f6e, X, CpuMMX, FP|Modrm, { Reg32|LongMem, RegMMX, 0 } },
-{"movd", 2, 0x0f7e, X, CpuMMX, FP|Modrm, { RegMMX, Reg32|LongMem, 0 } },
-{"movd", 2, 0x660f6e,X,CpuSSE2,FP|Modrm, { Reg32|LLongMem, RegXMM, 0 } },
-{"movd", 2, 0x660f7e,X,CpuSSE2,FP|Modrm, { RegXMM, Reg32|LLongMem, 0 } },
-/* Real MMX instructions. */
-{"movd", 2, 0x0f6e, X, CpuMMX, FP|Modrm, { Reg64|LLongMem, RegMMX, 0 } },
-{"movd", 2, 0x0f7e, X, CpuMMX, FP|Modrm, { RegMMX, Reg64|LLongMem, 0 } },
-{"movd", 2, 0x660f6e,X,CpuSSE2,FP|Modrm, { Reg64|LLongMem, RegXMM, 0 } },
-{"movd", 2, 0x660f7e,X,CpuSSE2,FP|Modrm, { RegXMM, Reg64|LLongMem, 0 } },
+{"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, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"movq", 2, 0x0f7f, X, CpuMMX, FP|Modrm, { RegMMX, RegMMX|LongMem, 0 } },
-{"movq", 2, 0xf30f7e,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movq", 2, 0x660fd6,X,CpuSSE2,FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
+{"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} },
-{"packssdw", 2, 0x0f6b, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packssdw", 2, 0x660f6b,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"packsswb", 2, 0x0f63, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packsswb", 2, 0x660f63,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"packuswb", 2, 0x0f67, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packuswb", 2, 0x660f67,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddb", 2, 0x0ffc, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddb", 2, 0x660ffc,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddw", 2, 0x0ffd, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddw", 2, 0x660ffd,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddd", 2, 0x0ffe, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddd", 2, 0x660ffe,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddq", 2, 0x0fd4, X, CpuMMX, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"paddq", 2, 0x660fd4,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddsb", 2, 0x0fec, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddsb", 2, 0x660fec,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddsw", 2, 0x0fed, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddsw", 2, 0x660fed,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddusb", 2, 0x0fdc, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddusb", 2, 0x660fdc,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddusw", 2, 0x0fdd, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddusw", 2, 0x660fdd,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pand", 2, 0x0fdb, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pand", 2, 0x660fdb,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pandn", 2, 0x0fdf, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pandn", 2, 0x660fdf,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpeqb", 2, 0x0f74, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqb", 2, 0x660f74,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpeqw", 2, 0x0f75, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqw", 2, 0x660f75,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpeqd", 2, 0x0f76, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqd", 2, 0x660f76,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpgtb", 2, 0x0f64, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtb", 2, 0x660f64,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpgtw", 2, 0x0f65, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtw", 2, 0x660f65,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpgtd", 2, 0x0f66, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtd", 2, 0x660f66,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmaddwd", 2, 0x0ff5, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmaddwd", 2, 0x660ff5,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmulhw", 2, 0x0fe5, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmulhw", 2, 0x660fe5,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmullw", 2, 0x0fd5, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmullw", 2, 0x660fd5,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"por", 2, 0x0feb, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"por", 2, 0x660feb,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psllw", 2, 0x0ff1, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllw", 2, 0x660ff1,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psllw", 2, 0x0f71, 6, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psllw", 2, 0x660f71,6,CpuSSE2,FP|Modrm, { Imm8, RegXMM, 0 } },
-{"pslld", 2, 0x0ff2, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pslld", 2, 0x660ff2,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pslld", 2, 0x0f72, 6, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"pslld", 2, 0x660f72,6,CpuSSE2,FP|Modrm, { Imm8, RegXMM, 0 } },
-{"psllq", 2, 0x0ff3, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllq", 2, 0x660ff3,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psllq", 2, 0x0f73, 6, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psllq", 2, 0x660f73,6,CpuSSE2,FP|Modrm, { Imm8, RegXMM, 0 } },
-{"psraw", 2, 0x0fe1, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psraw", 2, 0x660fe1,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psraw", 2, 0x0f71, 4, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psraw", 2, 0x660f71,4,CpuSSE2,FP|Modrm, { Imm8, RegXMM, 0 } },
-{"psrad", 2, 0x0fe2, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrad", 2, 0x660fe2,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psrad", 2, 0x0f72, 4, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrad", 2, 0x660f72,4,CpuSSE2,FP|Modrm, { Imm8, RegXMM, 0 } },
-{"psrlw", 2, 0x0fd1, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrlw", 2, 0x660fd1,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psrlw", 2, 0x0f71, 2, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrlw", 2, 0x660f71,2,CpuSSE2,FP|Modrm, { Imm8, RegXMM, 0 } },
-{"psrld", 2, 0x0fd2, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrld", 2, 0x660fd2,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psrld", 2, 0x0f72, 2, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrld", 2, 0x660f72,2,CpuSSE2,FP|Modrm, { Imm8, RegXMM, 0 } },
-{"psrlq", 2, 0x0fd3, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrlq", 2, 0x660fd3,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psrlq", 2, 0x0f73, 2, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrlq", 2, 0x660f73,2,CpuSSE2,FP|Modrm, { Imm8, RegXMM, 0 } },
-{"psubb", 2, 0x0ff8, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubb", 2, 0x660ff8,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubw", 2, 0x0ff9, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubw", 2, 0x660ff9,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubd", 2, 0x0ffa, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubd", 2, 0x660ffa,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubq", 2, 0x0ffb, X, CpuMMX, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"psubq", 2, 0x660ffb,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubsb", 2, 0x0fe8, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubsb", 2, 0x660fe8,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubsw", 2, 0x0fe9, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubsw", 2, 0x660fe9,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubusb", 2, 0x0fd8, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubusb", 2, 0x660fd8,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubusw", 2, 0x0fd9, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubusw", 2, 0x660fd9,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpckhbw",2, 0x0f68, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhbw",2, 0x660f68,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpckhwd",2, 0x0f69, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhwd",2, 0x660f69,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpckhdq",2, 0x0f6a, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhdq",2, 0x660f6a,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpcklbw",2, 0x0f60, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpcklbw",2, 0x660f60,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpcklwd",2, 0x0f61, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpcklwd",2, 0x660f61,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpckldq",2, 0x0f62, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckldq",2, 0x660f62,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pxor", 2, 0x0fef, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pxor", 2, 0x660fef,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 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, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"addss", 2, 0xf30f58, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"andnps", 2, 0x0f55, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"andps", 2, 0x0f54, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpeqps", 2, 0x0fc2, 0, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpeqss", 2, 0xf30fc2, 0, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpleps", 2, 0x0fc2, 2, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpless", 2, 0xf30fc2, 2, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpltps", 2, 0x0fc2, 1, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpltss", 2, 0xf30fc2, 1, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpneqps", 2, 0x0fc2, 4, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpneqss", 2, 0xf30fc2, 4, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpnleps", 2, 0x0fc2, 6, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnless", 2, 0xf30fc2, 6, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpnltps", 2, 0x0fc2, 5, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnltss", 2, 0xf30fc2, 5, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpordps", 2, 0x0fc2, 7, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpordss", 2, 0xf30fc2, 7, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpunordps",2, 0x0fc2, 3, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpunordss",2, 0xf30fc2, 3, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpps", 3, 0x0fc2, X, CpuSSE, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"cmpss", 3, 0xf30fc2, X, CpuSSE, FP|Modrm, { Imm8, RegXMM|WordMem, RegXMM } },
-{"comiss", 2, 0x0f2f, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cvtpi2ps", 2, 0x0f2a, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegXMM, 0 } },
-{"cvtps2pi", 2, 0x0f2d, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
+{"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, FP|Modrm, { RegXMM|LLongMem, RegMMX, 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, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"divss", 2, 0xf30f5e, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"ldmxcsr", 1, 0x0fae, 2, CpuSSE, FP|Modrm, { WordMem, 0, 0 } },
-{"maskmovq", 2, 0x0ff7, X, CpuSSE, FP|Modrm, { RegMMX|InvMem, RegMMX, 0 } },
-{"maxps", 2, 0x0f5f, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"maxss", 2, 0xf30f5f, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"minps", 2, 0x0f5d, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"minss", 2, 0xf30f5d, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"movaps", 2, 0x0f28, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movaps", 2, 0x0f29, X, CpuSSE, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movhlps", 2, 0x0f12, X, CpuSSE, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movhps", 2, 0x0f16, X, CpuSSE, FP|Modrm, { LLongMem, RegXMM, 0 } },
-{"movhps", 2, 0x0f17, X, CpuSSE, FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movlhps", 2, 0x0f16, X, CpuSSE, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movlps", 2, 0x0f12, X, CpuSSE, FP|Modrm, { LLongMem, RegXMM, 0 } },
-{"movlps", 2, 0x0f13, X, CpuSSE, FP|Modrm, { RegXMM, LLongMem, 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, FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movntq", 2, 0x0fe7, X, CpuSSE, FP|Modrm, { RegMMX, LLongMem, 0 } },
-{"movntdq", 2, 0x660fe7, X, CpuSSE2,FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movss", 2, 0xf30f10, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"movss", 2, 0xf30f11, X, CpuSSE, FP|Modrm, { RegXMM, RegXMM|WordMem, 0 } },
-{"movups", 2, 0x0f10, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movups", 2, 0x0f11, X, CpuSSE, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"mulps", 2, 0x0f59, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"mulss", 2, 0xf30f59, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"orps", 2, 0x0f56, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pavgb", 2, 0x0fe0, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pavgb", 2, 0x660fe0, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pavgw", 2, 0x0fe3, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pavgw", 2, 0x660fe3, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pextrw", 3, 0x0fc5, X, CpuSSE, lq_Suf|IgnoreSize|Modrm, { Imm8, RegMMX|InvMem, Reg32|Reg64 } },
+{"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, CpuSSE, 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, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmaxsw", 2, 0x660fee, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmaxub", 2, 0x0fde, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmaxub", 2, 0x660fde, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pminsw", 2, 0x0fea, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pminsw", 2, 0x660fea, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pminub", 2, 0x0fda, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pminub", 2, 0x660fda, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmovmskb", 2, 0x0fd7, X, CpuSSE, lq_Suf|IgnoreSize|Modrm, { RegMMX|InvMem, Reg32|Reg64, 0 } },
+{"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, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmulhuw", 2, 0x660fe4, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"prefetchnta", 1, 0x0f18, 0, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht0", 1, 0x0f18, 1, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht1", 1, 0x0f18, 2, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht2", 1, 0x0f18, 3, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } },
-{"psadbw", 2, 0x0ff6, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"psadbw", 2, 0x660ff6, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pshufw", 3, 0x0f70, X, CpuSSE, FP|Modrm, { Imm8, RegMMX|LLongMem, RegMMX } },
-{"rcpps", 2, 0x0f53, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"rcpss", 2, 0xf30f53, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"rsqrtps", 2, 0x0f52, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"rsqrtss", 2, 0xf30f52, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"sfence", 0, 0x0fae, 0xf8, CpuSSE, FP|ImmExt, { 0, 0, 0 } },
-{"shufps", 3, 0x0fc6, X, CpuSSE, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"sqrtps", 2, 0x0f51, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"sqrtss", 2, 0xf30f51, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"stmxcsr", 1, 0x0fae, 3, CpuSSE, FP|Modrm, { WordMem, 0, 0 } },
-{"subps", 2, 0x0f5c, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"subss", 2, 0xf30f5c, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"ucomiss", 2, 0x0f2e, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"unpckhps", 2, 0x0f15, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"unpcklps", 2, 0x0f14, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"xorps", 2, 0x0f57, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 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, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"addsd", 2, 0xf20f58, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"andnpd", 2, 0x660f55, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"andpd", 2, 0x660f54, X, CpuSSE2, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpeqpd", 2, 0x660fc2, 0, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpeqsd", 2, 0xf20fc2, 0, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmplepd", 2, 0x660fc2, 2, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmplesd", 2, 0xf20fc2, 2, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpltpd", 2, 0x660fc2, 1, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpltsd", 2, 0xf20fc2, 1, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpneqpd", 2, 0x660fc2, 4, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpneqsd", 2, 0xf20fc2, 4, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpnlepd", 2, 0x660fc2, 6, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnlesd", 2, 0xf20fc2, 6, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpnltpd", 2, 0x660fc2, 5, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnltsd", 2, 0xf20fc2, 5, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpordpd", 2, 0x660fc2, 7, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpordsd", 2, 0xf20fc2, 7, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpunordpd",2, 0x660fc2, 3, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpunordsd",2, 0xf20fc2, 3, CpuSSE2, FP|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmppd", 3, 0x660fc2, X, CpuSSE2, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
+{"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, FP|Modrm, { Imm8, RegXMM|LongMem, RegXMM } },
-{"comisd", 2, 0x660f2f, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"cvtpi2pd", 2, 0x660f2a, X, CpuSSE2, FP|Modrm, { RegMMX|LLongMem, RegXMM, 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, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"divsd", 2, 0xf20f5e, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"maxpd", 2, 0x660f5f, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"maxsd", 2, 0xf20f5f, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"minpd", 2, 0x660f5d, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"minsd", 2, 0xf20f5d, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"movapd", 2, 0x660f28, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movapd", 2, 0x660f29, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movhpd", 2, 0x660f16, X, CpuSSE2, FP|Modrm, { LLongMem, RegXMM, 0 } },
-{"movhpd", 2, 0x660f17, X, CpuSSE2, FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movlpd", 2, 0x660f12, X, CpuSSE2, FP|Modrm, { LLongMem, RegXMM, 0 } },
-{"movlpd", 2, 0x660f13, X, CpuSSE2, FP|Modrm, { RegXMM, LLongMem, 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, FP|Modrm, { RegXMM, LLongMem, 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, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"movsd", 2, 0xf20f11, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM|LongMem, 0 } },
-{"movupd", 2, 0x660f10, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movupd", 2, 0x660f11, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"mulpd", 2, 0x660f59, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"mulsd", 2, 0xf20f59, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"orpd", 2, 0x660f56, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"shufpd", 3, 0x660fc6, X, CpuSSE2, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"sqrtpd", 2, 0x660f51, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"sqrtsd", 2, 0xf20f51, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"subpd", 2, 0x660f5c, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"subsd", 2, 0xf20f5c, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"ucomisd", 2, 0x660f2e, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"unpckhpd", 2, 0x660f15, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"unpcklpd", 2, 0x660f14, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"xorpd", 2, 0x660f57, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtdq2pd", 2, 0xf30fe6, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtpd2dq", 2, 0xf20fe6, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtdq2ps", 2, 0x0f5b, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtpd2pi", 2, 0x660f2d, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvtpd2ps", 2, 0x660f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtps2pd", 2, 0x0f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtps2dq", 2, 0x660f5b, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 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, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtss2sd", 2, 0xf30f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvttpd2pi", 2, 0x660f2c, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegMMX, 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, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvttps2dq", 2, 0xf30f5b, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"maskmovdqu",2, 0x660ff7, X, CpuSSE2, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movdqa", 2, 0x660f6f, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movdqa", 2, 0x660f7f, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movdqu", 2, 0xf30f6f, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movdqu", 2, 0xf30f7f, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movdq2q", 2, 0xf20fd6, X, CpuSSE2, FP|Modrm, { RegXMM|InvMem, RegMMX, 0 } },
-{"movq2dq", 2, 0xf30fd6, X, CpuSSE2, FP|Modrm, { RegMMX|InvMem, RegXMM, 0 } },
-{"pmuludq", 2, 0x0ff4, X, CpuSSE2, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmuludq", 2, 0x660ff4, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"pshufd", 3, 0x660f70, X, CpuSSE2, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"pshufhw", 3, 0xf30f70, X, CpuSSE2, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"pshuflw", 3, 0xf20f70, X, CpuSSE2, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"pslldq", 2, 0x660f73, 7, CpuSSE2, FP|Modrm, { Imm8, RegXMM, 0 } },
-{"psrldq", 2, 0x660f73, 3, CpuSSE2, FP|Modrm, { Imm8, RegXMM, 0 } },
-{"punpckhqdq",2, 0x660f6d, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpcklqdq",2, 0x660f6c, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 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, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"addsubps", 2, 0xf20fd0, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"fisttp", 1, 0xdf, 1, CpuPNI, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-/* Intel Syntax */
-{"fisttpd", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
-{"fisttpq", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
+{"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, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"haddps", 2, 0xf20f7c, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"hsubpd", 2, 0x660f7d, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"hsubps", 2, 0xf20f7d, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"lddqu", 2, 0xf20ff0, X, CpuPNI, FP|Modrm, { LLongMem, RegXMM, 0 } },
-{"monitor", 0, 0x0f01, 0xc8, CpuPNI, FP|ImmExt, { 0, 0, 0} },
-/* Need to ensure only "monitor %eax,%ecx,%edx" is accepted. */
-{"monitor", 3, 0x0f01, 0xc8, CpuPNI, FP|ImmExt, { Reg32, Reg32, Reg32} },
-{"movddup", 2, 0xf20f12, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movshdup", 2, 0xf30f16, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movsldup", 2, 0xf30f12, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"mwait", 0, 0x0f01, 0xc9, CpuPNI, FP|ImmExt, { 0, 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, FP|ImmExt, { Reg32, Reg32, 0} },
+{"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, FP|Modrm, { ByteMem, 0, 0 } },
-{"prefetchw",1, 0x0f0d, 1, Cpu3dnow, FP|Modrm, { ByteMem, 0, 0 } },
-{"femms", 0, 0x0f0e, X, Cpu3dnow, FP, { 0, 0, 0 } },
-{"pavgusb", 2, 0x0f0f, 0xbf, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pf2id", 2, 0x0f0f, 0x1d, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pf2iw", 2, 0x0f0f, 0x1c, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfacc", 2, 0x0f0f, 0xae, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfadd", 2, 0x0f0f, 0x9e, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpeq", 2, 0x0f0f, 0xb0, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpge", 2, 0x0f0f, 0x90, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpgt", 2, 0x0f0f, 0xa0, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmax", 2, 0x0f0f, 0xa4, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmin", 2, 0x0f0f, 0x94, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmul", 2, 0x0f0f, 0xb4, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfnacc", 2, 0x0f0f, 0x8a, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfpnacc", 2, 0x0f0f, 0x8e, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcp", 2, 0x0f0f, 0x96, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcpit1", 2, 0x0f0f, 0xa6, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcpit2", 2, 0x0f0f, 0xb6, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrsqit1", 2, 0x0f0f, 0xa7, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrsqrt", 2, 0x0f0f, 0x97, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfsub", 2, 0x0f0f, 0x9a, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfsubr", 2, 0x0f0f, 0xaa, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pi2fd", 2, 0x0f0f, 0x0d, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pi2fw", 2, 0x0f0f, 0x0c, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmulhrw", 2, 0x0f0f, 0xb7, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pswapd", 2, 0x0f0f, 0xbb, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
+{"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} },
-
-/* VIA PadLock extensions. */
-{"xstorerng", 0, 0x0fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
-{"xcryptecb", 0, 0xf30fa7c8, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
-{"xcryptcbc", 0, 0xf30fa7d0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
-{"xcryptcfb", 0, 0xf30fa7e0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
-{"xcryptofb", 0, 0xf30fa7e8, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
-{"montmul", 0, 0xf30fa6c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
-{"xsha1", 0, 0xf30fa6c8, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
-{"xsha256", 0, 0xf30fa6d0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
-/* Alias for xstorerng. */
-{"xstore", 0, 0x0fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
+{"rdtscp", 0, 0x0f01, 0xf9, CpuSledgehammer,NoSuf|ImmExt, { 0, 0, 0} },
+
+/* 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 } },
+
+/* 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} },
/* sentinel */
{NULL, 0, 0, 0, 0, 0, { 0, 0, 0} }
@@ -1392,16 +1505,17 @@ static const template i386_optab[] = {
#undef bwlq_Suf
#undef FP
#undef l_FP
+#undef q_FP
#undef x_FP
#undef sl_FP
-#define MAX_MNEM_SIZE 16 /* for parsing insn mnemonics from input */
-
+#define MAX_MNEM_SIZE 16 /* For parsing insn mnemonics from input. */
/* 386 register table. */
-static const reg_entry i386_regtab[] = {
- /* make %st first as we test for it */
+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. */
@@ -1449,7 +1563,7 @@ static const reg_entry i386_regtab[] = {
{"r15w", Reg16, RegRex, 7},
/* 32 bit regs */
#define REGNAM_EAX 41
- {"eax", Reg32|BaseIndex|Acc, 0, 0}, /* Must be in ax + 16 slot */
+ {"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},
@@ -1481,14 +1595,14 @@ static const reg_entry i386_regtab[] = {
{"r13", Reg64|BaseIndex, RegRex, 5},
{"r14", Reg64|BaseIndex, RegRex, 6},
{"r15", Reg64|BaseIndex, RegRex, 7},
- /* segment registers */
+ /* 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 */
+ /* Control registers. */
{"cr0", Control, 0, 0},
{"cr1", Control, 0, 1},
{"cr2", Control, 0, 2},
@@ -1505,7 +1619,7 @@ static const reg_entry i386_regtab[] = {
{"cr13", Control, RegRex, 5},
{"cr14", Control, RegRex, 6},
{"cr15", Control, RegRex, 7},
- /* debug registers */
+ /* Debug registers. */
{"db0", Debug, 0, 0},
{"db1", Debug, 0, 1},
{"db2", Debug, 0, 2},
@@ -1538,7 +1652,7 @@ static const reg_entry i386_regtab[] = {
{"dr13", Debug, RegRex, 5},
{"dr14", Debug, RegRex, 6},
{"dr15", Debug, RegRex, 7},
- /* test registers */
+ /* Test registers. */
{"tr0", Test, 0, 0},
{"tr1", Test, 0, 1},
{"tr2", Test, 0, 2},
@@ -1547,7 +1661,7 @@ static const reg_entry i386_regtab[] = {
{"tr5", Test, 0, 5},
{"tr6", Test, 0, 6},
{"tr7", Test, 0, 7},
- /* mmx and simd registers */
+ /* MMX and simd registers. */
{"mm0", RegMMX, 0, 0},
{"mm1", RegMMX, 0, 1},
{"mm2", RegMMX, 0, 2},
@@ -1572,12 +1686,13 @@ static const reg_entry i386_regtab[] = {
{"xmm13", RegXMM, RegRex, 5},
{"xmm14", RegXMM, RegRex, 6},
{"xmm15", RegXMM, RegRex, 7},
- /* no type will make this register rejected for all purposes except
+ /* 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}
};
-static const reg_entry i386_float_regtab[] = {
+static const reg_entry i386_float_regtab[] =
+{
{"st(0)", FloatReg|FloatAcc, 0, 0},
{"st(1)", FloatReg, 0, 1},
{"st(2)", FloatReg, 0, 2},
@@ -1588,9 +1703,9 @@ static const reg_entry i386_float_regtab[] = {
{"st(7)", FloatReg, 0, 7}
};
-#define MAX_REG_NAME_SIZE 8 /* for parsing register names from input */
+#define MAX_REG_NAME_SIZE 8 /* For parsing register names from input. */
-/* segment stuff */
+/* Segment stuff. */
static const seg_entry cs = { "cs", 0x2e };
static const seg_entry ds = { "ds", 0x3e };
static const seg_entry ss = { "ss", 0x36 };
@@ -1598,4 +1713,3 @@ static const seg_entry es = { "es", 0x26 };
static const seg_entry fs = { "fs", 0x64 };
static const seg_entry gs = { "gs", 0x65 };
-/* end of opcode/i386.h */
diff --git a/contrib/binutils/include/opcode/ia64.h b/contrib/binutils/include/opcode/ia64.h
index 0d33fc61b2c7..447e50e1dbf7 100644
--- a/contrib/binutils/include/opcode/ia64.h
+++ b/contrib/binutils/include/opcode/ia64.h
@@ -1,6 +1,7 @@
/* ia64.h -- Header file for ia64 opcode table
- Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com> */
+ Copyright (C) 1998, 1999, 2000, 2002, 2005, 2006
+ Free Software Foundation, Inc.
+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com> */
#ifndef opcode_ia64_h
#define opcode_ia64_h
@@ -75,13 +76,15 @@ enum ia64_opnd
IA64_OPND_R3, /* third register # */
IA64_OPND_R3_2, /* third register # (limited to gr0-gr3) */
+ /* memory operands: */
+ IA64_OPND_MR3, /* memory at addr of third register # */
+
/* indirect operands: */
IA64_OPND_CPUID_R3, /* cpuid[reg] */
IA64_OPND_DBR_R3, /* dbr[reg] */
IA64_OPND_DTR_R3, /* dtr[reg] */
IA64_OPND_ITR_R3, /* itr[reg] */
IA64_OPND_IBR_R3, /* ibr[reg] */
- IA64_OPND_MR3, /* memory at addr of third register # */
IA64_OPND_MSR_R3, /* msr[reg] */
IA64_OPND_PKR_R3, /* pkr[reg] */
IA64_OPND_PMC_R3, /* pmc[reg] */
@@ -100,6 +103,7 @@ enum ia64_opnd
IA64_OPND_CPOS6c, /* 6-bit count (63 - bits 31-36) */
IA64_OPND_IMM1, /* signed 1-bit immediate (bit 36) */
IA64_OPND_IMMU2, /* unsigned 2-bit immediate (bits 13-14) */
+ IA64_OPND_IMMU5b, /* unsigned 5-bit immediate (32 + bits 14-18) */
IA64_OPND_IMMU7a, /* unsigned 7-bit immediate (bits 13-19) */
IA64_OPND_IMMU7b, /* unsigned 7-bit immediate (bits 20-26) */
IA64_OPND_SOF, /* 8-bit stack frame size */
diff --git a/contrib/binutils/include/opcode/np1.h b/contrib/binutils/include/opcode/np1.h
index c3f7e293fec4..ebe37f5d2dfc 100644
--- a/contrib/binutils/include/opcode/np1.h
+++ b/contrib/binutils/include/opcode/np1.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
struct gld_opcode
{
diff --git a/contrib/binutils/include/opcode/pn.h b/contrib/binutils/include/opcode/pn.h
index 8c427a2ddbd5..f8d474f60a50 100644
--- a/contrib/binutils/include/opcode/pn.h
+++ b/contrib/binutils/include/opcode/pn.h
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
struct gld_opcode
{
diff --git a/contrib/binutils/include/opcode/ppc.h b/contrib/binutils/include/opcode/ppc.h
index d55caa7568f2..f66263086165 100644
--- a/contrib/binutils/include/opcode/ppc.h
+++ b/contrib/binutils/include/opcode/ppc.h
@@ -1,5 +1,5 @@
/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
@@ -17,7 +17,7 @@ the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef PPC_H
#define PPC_H
@@ -134,6 +134,12 @@ extern const int powerpc_num_opcodes;
/* Opcode is supported by machine check APU. */
#define PPC_OPCODE_RFMCI 0x800000
+/* Opcode is only supported by Power5 architecture. */
+#define PPC_OPCODE_POWER5 0x1000000
+
+/* Opcode is supported by PowerPC e300 family. */
+#define PPC_OPCODE_E300 0x2000000
+
/* A macro to extract the major opcode from an instruction. */
#define PPC_OP(i) (((i) >> 26) & 0x3f)
@@ -249,7 +255,7 @@ extern const struct powerpc_operand powerpc_operands[];
#define PPC_OPERAND_ABSOLUTE (01000)
/* This operand is optional, and is zero if omitted. This is used for
- the optional BF and L fields in the comparison instructions. The
+ example, in the optional BF field in the comparison instructions. The
assembler must count the number of operands remaining on the line,
and the number of operands remaining for the opcode, and decide
whether this operand is present or not. The disassembler should
diff --git a/contrib/binutils/include/opcode/s390.h b/contrib/binutils/include/opcode/s390.h
index f582a4e51043..7bb30de285f9 100644
--- a/contrib/binutils/include/opcode/s390.h
+++ b/contrib/binutils/include/opcode/s390.h
@@ -1,5 +1,5 @@
/* s390.h -- Header file for S390 opcode table
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of BFD, the Binary File Descriptor library.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef S390_H
#define S390_H
@@ -35,7 +35,8 @@ enum s390_opcode_cpu_val
S390_OPCODE_G5 = 0,
S390_OPCODE_G6,
S390_OPCODE_Z900,
- S390_OPCODE_Z990
+ S390_OPCODE_Z990,
+ S390_OPCODE_Z9_109
};
/* The opcode table is an array of struct s390_opcode. */
@@ -138,4 +139,8 @@ extern const struct s390_operand s390_operands[];
/* This operand is a length. */
#define S390_OPERAND_LENGTH 0x200
-#endif /* S390_H */
+/* This operand is optional. Only a single operand at the end of
+ the instruction may be optional. */
+#define S390_OPERAND_OPTIONAL 0x400
+
+ #endif /* S390_H */
diff --git a/contrib/binutils/include/opcode/sparc.h b/contrib/binutils/include/opcode/sparc.h
index c3364933a688..9e238be93a63 100644
--- a/contrib/binutils/include/opcode/sparc.h
+++ b/contrib/binutils/include/opcode/sparc.h
@@ -1,24 +1,24 @@
/* Definitions for opcode table for the sparc.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2005 Free Software Foundation, Inc.
-This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
-the GNU Binutils.
+ This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
+ the GNU Binutils.
-GAS/GDB 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 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 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.
+ GAS/GDB 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 or GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with GAS or GDB; see the file COPYING. If not, write to
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "ansidecl.h"
@@ -37,17 +37,18 @@ Boston, MA 02111-1307, USA. */
The values are indices into `sparc_opcode_archs' defined in sparc-opc.c.
Don't change this without updating sparc-opc.c. */
-enum sparc_opcode_arch_val {
+enum sparc_opcode_arch_val
+{
SPARC_OPCODE_ARCH_V6 = 0,
SPARC_OPCODE_ARCH_V7,
SPARC_OPCODE_ARCH_V8,
SPARC_OPCODE_ARCH_SPARCLET,
SPARC_OPCODE_ARCH_SPARCLITE,
- /* v9 variants must appear last */
+ /* V9 variants must appear last. */
SPARC_OPCODE_ARCH_V9,
- SPARC_OPCODE_ARCH_V9A, /* v9 with ultrasparc additions */
- SPARC_OPCODE_ARCH_V9B, /* v9 with ultrasparc and cheetah additions */
- SPARC_OPCODE_ARCH_BAD /* error return from sparc_opcode_lookup_arch */
+ SPARC_OPCODE_ARCH_V9A, /* V9 with ultrasparc additions. */
+ SPARC_OPCODE_ARCH_V9B, /* V9 with ultrasparc and cheetah additions. */
+ SPARC_OPCODE_ARCH_BAD /* Error return from sparc_opcode_lookup_arch. */
};
/* The highest architecture in the table. */
@@ -62,14 +63,15 @@ enum sparc_opcode_arch_val {
/* Table of cpu variants. */
-struct sparc_opcode_arch {
+typedef struct sparc_opcode_arch
+{
const char *name;
/* Mask of sparc_opcode_arch_val's supported.
EG: For v7 this would be
(SPARC_OPCODE_ARCH_MASK (..._V6) | SPARC_OPCODE_ARCH_MASK (..._V7)).
These are short's because sparc_opcode.architecture is. */
short supported;
-};
+} sparc_opcode_arch;
extern const struct sparc_opcode_arch sparc_opcode_archs[];
@@ -82,44 +84,43 @@ extern enum sparc_opcode_arch_val sparc_opcode_lookup_arch (const char *);
/* Non-zero if ARCH1 conflicts with ARCH2.
IE: ARCH1 as a supported bit set that ARCH2 doesn't, and vice versa. */
#define SPARC_OPCODE_CONFLICT_P(ARCH1, ARCH2) \
-(((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
- != SPARC_OPCODE_SUPPORTED (ARCH1)) \
- && ((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
+ (((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
+ != SPARC_OPCODE_SUPPORTED (ARCH1)) \
+ && ((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
!= SPARC_OPCODE_SUPPORTED (ARCH2)))
/* Structure of an opcode table entry. */
-struct sparc_opcode {
+typedef struct sparc_opcode
+{
const char *name;
- unsigned long match; /* Bits that must be set. */
- unsigned long lose; /* Bits that must not be set. */
+ unsigned long match; /* Bits that must be set. */
+ unsigned long lose; /* Bits that must not be set. */
const char *args;
- /* This was called "delayed" in versions before the flags. */
+ /* This was called "delayed" in versions before the flags. */
char flags;
short architecture; /* Bitmask of sparc_opcode_arch_val's. */
-};
-
-#define F_DELAYED 1 /* Delayed branch */
-#define F_ALIAS 2 /* Alias for a "real" instruction */
-#define F_UNBR 4 /* Unconditional branch */
-#define F_CONDBR 8 /* Conditional branch */
-#define F_JSR 16 /* Subroutine call */
-#define F_FLOAT 32 /* Floating point instruction (not a branch) */
-#define F_FBR 64 /* Floating point branch */
+} sparc_opcode;
+
+#define F_DELAYED 1 /* Delayed branch. */
+#define F_ALIAS 2 /* Alias for a "real" instruction. */
+#define F_UNBR 4 /* Unconditional branch. */
+#define F_CONDBR 8 /* Conditional branch. */
+#define F_JSR 16 /* Subroutine call. */
+#define F_FLOAT 32 /* Floating point instruction (not a branch). */
+#define F_FBR 64 /* Floating point branch. */
/* FIXME: Add F_ANACHRONISTIC flag for v9. */
-/*
-
-All sparc opcodes are 32 bits, except for the `set' instruction (really a
-macro), which is 64 bits. It is handled as a special case.
+/* All sparc opcodes are 32 bits, except for the `set' instruction (really a
+ macro), which is 64 bits. It is handled as a special case.
-The match component is a mask saying which bits must match a particular
-opcode in order for an instruction to be an instance of that opcode.
+ The match component is a mask saying which bits must match a particular
+ opcode in order for an instruction to be an instance of that opcode.
-The args component is a string containing one character for each operand of the
-instruction.
+ The args component is a string containing one character for each operand of the
+ instruction.
-Kinds of operands:
+ Kinds of operands:
# Number used by optimizer. It is ignored.
1 rs1 register.
2 rs2 register.
@@ -187,37 +188,35 @@ Kinds of operands:
_ Ancillary state register in rd (v9a)
/ Ancillary state register in rs1 (v9a)
-The following chars are unused: (note: ,[] are used as punctuation)
-[45]
-
-*/
-
-#define OP2(x) (((x)&0x7) << 22) /* op2 field of format2 insns */
-#define OP3(x) (((x)&0x3f) << 19) /* op3 field of format3 insns */
-#define OP(x) ((unsigned)((x)&0x3) << 30) /* op field of all insns */
-#define OPF(x) (((x)&0x1ff) << 5) /* opf field of float insns */
-#define OPF_LOW5(x) OPF((x)&0x1f) /* v9 */
-#define F3F(x, y, z) (OP(x) | OP3(y) | OPF(z)) /* format3 float insns */
-#define F3I(x) (((x)&0x1) << 13) /* immediate field of format 3 insns */
-#define F2(x, y) (OP(x) | OP2(y)) /* format 2 insns */
-#define F3(x, y, z) (OP(x) | OP3(y) | F3I(z)) /* format3 insns */
-#define F1(x) (OP(x))
-#define DISP30(x) ((x)&0x3fffffff)
-#define ASI(x) (((x)&0xff) << 5) /* asi field of format3 insns */
-#define RS2(x) ((x)&0x1f) /* rs2 field */
-#define SIMM13(x) ((x)&0x1fff) /* simm13 field */
-#define RD(x) (((x)&0x1f) << 25) /* destination register field */
-#define RS1(x) (((x)&0x1f) << 14) /* rs1 field */
-#define ASI_RS2(x) (SIMM13(x))
-#define MEMBAR(x) ((x)&0x7f)
-#define SLCPOP(x) (((x)&0x7f) << 6) /* sparclet cpop */
-
-#define ANNUL (1<<29)
-#define BPRED (1<<19) /* v9 */
-#define IMMED F3I(1)
-#define RD_G0 RD(~0)
-#define RS1_G0 RS1(~0)
-#define RS2_G0 RS2(~0)
+ The following chars are unused: (note: ,[] are used as punctuation)
+ [45]. */
+
+#define OP2(x) (((x) & 0x7) << 22) /* Op2 field of format2 insns. */
+#define OP3(x) (((x) & 0x3f) << 19) /* Op3 field of format3 insns. */
+#define OP(x) ((unsigned) ((x) & 0x3) << 30) /* Op field of all insns. */
+#define OPF(x) (((x) & 0x1ff) << 5) /* Opf field of float insns. */
+#define OPF_LOW5(x) OPF ((x) & 0x1f) /* V9. */
+#define F3F(x, y, z) (OP (x) | OP3 (y) | OPF (z)) /* Format3 float insns. */
+#define F3I(x) (((x) & 0x1) << 13) /* Immediate field of format 3 insns. */
+#define F2(x, y) (OP (x) | OP2(y)) /* Format 2 insns. */
+#define F3(x, y, z) (OP (x) | OP3(y) | F3I(z)) /* Format3 insns. */
+#define F1(x) (OP (x))
+#define DISP30(x) ((x) & 0x3fffffff)
+#define ASI(x) (((x) & 0xff) << 5) /* Asi field of format3 insns. */
+#define RS2(x) ((x) & 0x1f) /* Rs2 field. */
+#define SIMM13(x) ((x) & 0x1fff) /* Simm13 field. */
+#define RD(x) (((x) & 0x1f) << 25) /* Destination register field. */
+#define RS1(x) (((x) & 0x1f) << 14) /* Rs1 field. */
+#define ASI_RS2(x) (SIMM13 (x))
+#define MEMBAR(x) ((x) & 0x7f)
+#define SLCPOP(x) (((x) & 0x7f) << 6) /* Sparclet cpop. */
+
+#define ANNUL (1 << 29)
+#define BPRED (1 << 19) /* V9. */
+#define IMMED F3I (1)
+#define RD_G0 RD (~0)
+#define RS1_G0 RS1 (~0)
+#define RS2_G0 RS2 (~0)
extern const struct sparc_opcode sparc_opcodes[];
extern const int sparc_num_opcodes;
@@ -231,11 +230,8 @@ extern const char *sparc_decode_prefetch (int);
extern int sparc_encode_sparclet_cpreg (const char *);
extern const char *sparc_decode_sparclet_cpreg (int);
-/*
- * Local Variables:
- * fill-column: 131
- * comment-column: 0
- * End:
- */
+/* Local Variables:
+ fill-column: 131
+ comment-column: 0
+ End: */
-/* end of sparc.h */
diff --git a/contrib/binutils/include/partition.h b/contrib/binutils/include/partition.h
index 5d3623f716ea..d8b554f8f9a1 100644
--- a/contrib/binutils/include/partition.h
+++ b/contrib/binutils/include/partition.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* This package implements a partition of consecutive integers. The
elements are partitioned into classes. Each class is represented
@@ -64,13 +64,10 @@ typedef struct partition_def
struct partition_elem elements[1];
} *partition;
-extern partition partition_new PARAMS((int));
-extern void partition_delete PARAMS((partition));
-extern int partition_union PARAMS((partition,
- int,
- int));
-extern void partition_print PARAMS((partition,
- FILE*));
+extern partition partition_new (int);
+extern void partition_delete (partition);
+extern int partition_union (partition, int, int);
+extern void partition_print (partition, FILE*);
/* Returns the canonical element corresponding to the class containing
ELEMENT__ in PARTITION__. */
diff --git a/contrib/binutils/include/progress.h b/contrib/binutils/include/progress.h
index 23b0960078ac..53e0199ef91d 100644
--- a/contrib/binutils/include/progress.h
+++ b/contrib/binutils/include/progress.h
@@ -13,7 +13,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* The default definitions below are intended to be replaced by real
definitions, if building the tools for an interactive programming
diff --git a/contrib/binutils/include/safe-ctype.h b/contrib/binutils/include/safe-ctype.h
index 69a3f74cc6fc..e59b357ccfb6 100644
--- a/contrib/binutils/include/safe-ctype.h
+++ b/contrib/binutils/include/safe-ctype.h
@@ -16,8 +16,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* This is a compatible replacement of the standard C library's <ctype.h>
with the following properties:
diff --git a/contrib/binutils/include/sort.h b/contrib/binutils/include/sort.h
index 3f3a92f18f0a..582af81623b8 100644
--- a/contrib/binutils/include/sort.h
+++ b/contrib/binutils/include/sort.h
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#ifndef SORT_H
#define SORT_H
@@ -35,7 +35,7 @@ extern "C" {
/* Sort an array of pointers. */
-extern void sort_pointers PARAMS ((size_t, void **, void **));
+extern void sort_pointers (size_t, void **, void **);
#ifdef __cplusplus
}
diff --git a/contrib/binutils/include/splay-tree.h b/contrib/binutils/include/splay-tree.h
index 86707fc1d2ff..78d8f71c09f1 100644
--- a/contrib/binutils/include/splay-tree.h
+++ b/contrib/binutils/include/splay-tree.h
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* For an easily readable description of splay-trees, see:
@@ -52,50 +52,50 @@ typedef struct splay_tree_node_s *splay_tree_node;
/* The type of a function which compares two splay-tree keys. The
function should return values as for qsort. */
-typedef int (*splay_tree_compare_fn) PARAMS((splay_tree_key, splay_tree_key));
+typedef int (*splay_tree_compare_fn) (splay_tree_key, splay_tree_key);
/* The type of a function used to deallocate any resources associated
with the key. */
-typedef void (*splay_tree_delete_key_fn) PARAMS((splay_tree_key));
+typedef void (*splay_tree_delete_key_fn) (splay_tree_key);
/* The type of a function used to deallocate any resources associated
with the value. */
-typedef void (*splay_tree_delete_value_fn) PARAMS((splay_tree_value));
+typedef void (*splay_tree_delete_value_fn) (splay_tree_value);
/* The type of a function used to iterate over the tree. */
-typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
+typedef int (*splay_tree_foreach_fn) (splay_tree_node, void*);
/* The type of a function used to allocate memory for tree root and
node structures. The first argument is the number of bytes needed;
the second is a data pointer the splay tree functions pass through
to the allocator. This function must never return zero. */
-typedef PTR (*splay_tree_allocate_fn) PARAMS((int, void *));
+typedef void *(*splay_tree_allocate_fn) (int, void *);
/* The type of a function used to free memory allocated using the
corresponding splay_tree_allocate_fn. The first argument is the
memory to be freed; the latter is a data pointer the splay tree
functions pass through to the freer. */
-typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *));
+typedef void (*splay_tree_deallocate_fn) (void *, void *);
/* The nodes in the splay tree. */
struct splay_tree_node_s GTY(())
{
/* The key. */
- splay_tree_key GTY ((use_param1 (""))) key;
+ splay_tree_key GTY ((use_param1)) key;
/* The value. */
- splay_tree_value GTY ((use_param2 (""))) value;
+ splay_tree_value GTY ((use_param2)) value;
/* The left and right children, respectively. */
- splay_tree_node GTY ((use_params (""))) left;
- splay_tree_node GTY ((use_params (""))) right;
+ splay_tree_node GTY ((use_params)) left;
+ splay_tree_node GTY ((use_params)) right;
};
/* The splay tree itself. */
struct splay_tree_s GTY(())
{
/* The root of the tree. */
- splay_tree_node GTY ((use_params (""))) root;
+ splay_tree_node GTY ((use_params)) root;
/* The comparision function. */
splay_tree_compare_fn comp;
@@ -109,48 +109,33 @@ struct splay_tree_s GTY(())
/* Allocate/free functions, and a data pointer to pass to them. */
splay_tree_allocate_fn allocate;
splay_tree_deallocate_fn deallocate;
- PTR GTY((skip (""))) allocate_data;
+ void * GTY((skip)) allocate_data;
};
typedef struct splay_tree_s *splay_tree;
-extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn,
- splay_tree_delete_key_fn,
- splay_tree_delete_value_fn));
-extern splay_tree splay_tree_new_with_allocator
- PARAMS((splay_tree_compare_fn,
- splay_tree_delete_key_fn,
+extern splay_tree splay_tree_new (splay_tree_compare_fn,
+ splay_tree_delete_key_fn,
+ splay_tree_delete_value_fn);
+extern splay_tree splay_tree_new_with_allocator (splay_tree_compare_fn,
+ splay_tree_delete_key_fn,
splay_tree_delete_value_fn,
- splay_tree_allocate_fn,
- splay_tree_deallocate_fn,
- void *));
-extern void splay_tree_delete PARAMS((splay_tree));
-extern splay_tree_node splay_tree_insert
- PARAMS((splay_tree,
- splay_tree_key,
- splay_tree_value));
-extern void splay_tree_remove PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_lookup
- PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_predecessor
- PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_successor
- PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_max
- PARAMS((splay_tree));
-extern splay_tree_node splay_tree_min
- PARAMS((splay_tree));
-extern int splay_tree_foreach PARAMS((splay_tree,
- splay_tree_foreach_fn,
- void*));
-extern int splay_tree_compare_ints PARAMS((splay_tree_key,
- splay_tree_key));
-extern int splay_tree_compare_pointers PARAMS((splay_tree_key,
- splay_tree_key));
+ splay_tree_allocate_fn,
+ splay_tree_deallocate_fn,
+ void *);
+extern void splay_tree_delete (splay_tree);
+extern splay_tree_node splay_tree_insert (splay_tree,
+ splay_tree_key,
+ splay_tree_value);
+extern void splay_tree_remove (splay_tree, splay_tree_key);
+extern splay_tree_node splay_tree_lookup (splay_tree, splay_tree_key);
+extern splay_tree_node splay_tree_predecessor (splay_tree, splay_tree_key);
+extern splay_tree_node splay_tree_successor (splay_tree, splay_tree_key);
+extern splay_tree_node splay_tree_max (splay_tree);
+extern splay_tree_node splay_tree_min (splay_tree);
+extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*);
+extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key);
+extern int splay_tree_compare_pointers (splay_tree_key, splay_tree_key);
#ifdef __cplusplus
}
diff --git a/contrib/binutils/include/symcat.h b/contrib/binutils/include/symcat.h
index 61ce1e9b3413..03a12921042e 100644
--- a/contrib/binutils/include/symcat.h
+++ b/contrib/binutils/include/symcat.h
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef SYM_CAT_H
#define SYM_CAT_H
diff --git a/contrib/binutils/include/ternary.h b/contrib/binutils/include/ternary.h
index 40d442e6223e..31c1fcef6ad7 100644
--- a/contrib/binutils/include/ternary.h
+++ b/contrib/binutils/include/ternary.h
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifndef TERNARY_H_
#define TERNARY_H_
@@ -38,14 +38,14 @@ ternary_node;
already there, and replace is 0.
Otherwise, replaces if it it exists, inserts if it doesn't, and
returns the data you passed in. */
-PTR ternary_insert PARAMS ((ternary_tree *p, const char *s,
- PTR data, int replace));
+void *ternary_insert (ternary_tree *p, const char *s,
+ void *data, int replace);
/* Delete the ternary search tree rooted at P.
Does NOT delete the data you associated with the strings. */
-void ternary_cleanup PARAMS ((ternary_tree p));
+void ternary_cleanup (ternary_tree p);
/* Search the ternary tree for string S, returning the data associated
with it if found. */
-PTR ternary_search PARAMS ((const ternary_node *p, const char *s));
+void *ternary_search (const ternary_node *p, const char *s);
#endif
diff --git a/contrib/binutils/include/xregex2.h b/contrib/binutils/include/xregex2.h
index 2991daf9bcf3..d3d0da14a987 100644
--- a/contrib/binutils/include/xregex2.h
+++ b/contrib/binutils/include/xregex2.h
@@ -1,6 +1,9 @@
/* Definitions for data structures and routines for the regular
expression library, version 0.12.
- Copyright (C) 1985,1989-1993,1995-1998, 2000 Free Software Foundation, Inc.
+
+ Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1997,
+ 1998, 2000, 2005 Free Software Foundation, Inc.
+
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
@@ -16,8 +19,8 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA. */
#ifndef _REGEX_H
#define _REGEX_H 1
@@ -434,32 +437,21 @@ typedef struct
unfortunately clutters up the declarations a bit, but I think it's
worth it. */
-#if __STDC__
-
-# define _RE_ARGS(args) args
-
-#else /* not __STDC__ */
-
-# define _RE_ARGS(args) ()
-
-#endif /* not __STDC__ */
-
/* Sets the current default syntax to SYNTAX, and return the old syntax.
You can also simply assign to the `re_syntax_options' variable. */
-extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
+extern reg_syntax_t re_set_syntax (reg_syntax_t syntax);
/* Compile the regular expression PATTERN, with length LENGTH
and syntax given by the global `re_syntax_options', into the buffer
BUFFER. Return NULL if successful, and an error string if not. */
-extern const char *re_compile_pattern
- _RE_ARGS ((const char *pattern, size_t length,
- struct re_pattern_buffer *buffer));
+extern const char *re_compile_pattern (const char *pattern, size_t length,
+ struct re_pattern_buffer *buffer);
/* Compile a fastmap for the compiled pattern in BUFFER; used to
accelerate searches. Return 0 if successful and -2 if was an
internal error. */
-extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
+extern int re_compile_fastmap (struct re_pattern_buffer *buffer);
/* Search in the string STRING (with length LENGTH) for the pattern
@@ -467,31 +459,29 @@ extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
characters. Return the starting position of the match, -1 for no
match, or -2 for an internal error. Also return register
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
-extern int re_search
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, int range, struct re_registers *regs));
+extern int re_search (struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, int range,
+ struct re_registers *regs);
/* Like `re_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
-extern int re_search_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, int range, struct re_registers *regs, int stop));
+extern int re_search_2 (struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, int range, struct re_registers *regs,
+ int stop);
/* Like `re_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
-extern int re_match
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, struct re_registers *regs));
+extern int re_match (struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, struct re_registers *regs);
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
-extern int re_match_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, struct re_registers *regs, int stop));
+extern int re_match_2 (struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, struct re_registers *regs, int stop);
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
@@ -506,15 +496,16 @@ extern int re_match_2
Unless this function is called, the first search or match using
PATTERN_BUFFER will allocate its own register data, without
freeing the old data. */
-extern void re_set_registers
- _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
- unsigned num_regs, regoff_t *starts, regoff_t *ends));
+extern void re_set_registers (struct re_pattern_buffer *buffer,
+ struct re_registers *regs,
+ unsigned num_regs, regoff_t *starts,
+ regoff_t *ends);
#if defined _REGEX_RE_COMP || defined _LIBC
# ifndef _CRAY
/* 4.2 bsd compatibility. */
-extern char *re_comp _RE_ARGS ((const char *));
-extern int re_exec _RE_ARGS ((const char *));
+extern char *re_comp (const char *);
+extern int re_exec (const char *);
# endif
#endif
@@ -541,19 +532,22 @@ extern int re_exec _RE_ARGS ((const char *));
#endif
/* POSIX compatibility. */
-extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
- const char *__restrict __pattern,
- int __cflags));
+extern int regcomp (regex_t *__restrict __preg,
+ const char *__restrict __pattern,
+ int __cflags);
-extern int regexec _RE_ARGS ((const regex_t *__restrict __preg,
- const char *__restrict __string, size_t __nmatch,
- regmatch_t __pmatch[__restrict_arr],
- int __eflags));
+#if (__GNUC__)
+__extension__
+#endif
+extern int regexec (const regex_t *__restrict __preg,
+ const char *__restrict __string, size_t __nmatch,
+ regmatch_t __pmatch[__restrict_arr],
+ int __eflags);
-extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
- char *__errbuf, size_t __errbuf_size));
+extern size_t regerror (int __errcode, const regex_t *__preg,
+ char *__errbuf, size_t __errbuf_size);
-extern void regfree _RE_ARGS ((regex_t *__preg));
+extern void regfree (regex_t *__preg);
#ifdef __cplusplus
diff --git a/contrib/binutils/install-sh b/contrib/binutils/install-sh
index 0ec27bcd488d..4d4a9519eaf8 100755
--- a/contrib/binutils/install-sh
+++ b/contrib/binutils/install-sh
@@ -1,7 +1,8 @@
#!/bin/sh
-#
# install - install a program, script, or datafile
-#
+
+scriptversion=2005-05-14.22
+
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
@@ -41,13 +42,11 @@
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
-
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
-
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
@@ -59,236 +58,266 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chowncmd=
+chgrpcmd=
+stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd=$cpprog
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd=$stripprog
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "$0: no input file specified" >&2
- exit 1
-else
- :
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d "$dst" ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=$mkdirprog
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f "$src" ] || [ -d "$src" ]
- then
- :
- else
- echo "$0: $src does not exist" >&2
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "$0: no destination specified" >&2
- exit 1
- else
- :
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d "$dst" ]
- then
- dst=$dst/`basename "$src"`
- else
- :
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
- '
-IFS="${IFS-$defaultIFS}"
-
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp=$pathcomp$1
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c (ignored)
+-d create directories instead of installing files.
+-g GROUP $chgrpprog installed files to GROUP.
+-m MODE $chmodprog installed files to MODE.
+-o USER $chownprog installed files to USER.
+-s $stripprog installed files.
+-t DIRECTORY install into DIRECTORY.
+-T report an error if DSTFILE is a directory.
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t) dstarg=$2
shift
+ shift
+ continue;;
- if [ ! -d "$pathcomp" ] ;
- then
- $mkdirprog "$pathcomp"
- else
- :
- fi
-
- pathcomp=$pathcomp/
+ -T) no_target_directory=true
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ test -n "$dir_arg$dstarg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd "$dst" &&
- if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename "$dst"`
- else
- dstfile=`basename "$dst" $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename "$dst"`
- else
- :
- fi
-
-# Make a couple of temp file names in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
- rmtmp=$dstdir/#rm.$$#
-
-# Trap to clean up temp files at exit.
-
- trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
- trap '(exit $?); exit' 1 2 13 15
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd "$src" "$dsttmp" &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
-
-# Now remove or move aside any old file at destination location. We try this
-# two ways since rm can't unlink itself on some systems and the destination
-# file might be busy for other reasons. In this case, the final cleanup
-# might fail but the new file should still install successfully.
-
-{
- if [ -f "$dstdir/$dstfile" ]
- then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
- $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
- {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit
- }
- else
- :
- fi
-} &&
-
-# Now rename the file to the real destination.
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ mkdircmd=:
+ chmodcmd=
+ else
+ mkdircmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
-fi &&
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dstarg: Is a directory" >&2
+ exit 1
+ fi
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ shift
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp"
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test -d "$pathcomp" || exit
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $mkdircmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Copy the file name to the temp name.
+ $doit $cpprog "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ || {
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit 1
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ }
+ }
+ fi || { (exit 1); exit 1; }
+done
# The final little trick to "correctly" pass the exit status to the exit trap.
-
{
- (exit 0); exit
+ (exit 0); exit 0
}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
index e48196d83da3..a912aeab6e24 100644
--- a/contrib/binutils/ld/ChangeLog
+++ b/contrib/binutils/ld/ChangeLog
@@ -1,329 +1,359 @@
-2005-01-21 Nick Hudson <skrll@netbsd.org>
+2006-07-19 Alan Modra <amodra@bigpond.net.au>
- PR ld/676
- * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
- Handle bfd_elf32_hppa_nbsd_vec.
+ * 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.
-2004-07-28 Jason Thorpe <thorpej@wasabisystems.com>
+2006-07-04 Daniel Jacobowitz <dan@codesourcery.com>
- * emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
+ 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.
-2004-05-13 Joel Sherrill <joel@oarcorp.com>
+2006-06-12 Fred Fish <fnf@specifix.com>
- * configure.tgt (or32-*-rtems*): Switch to elf and
- support versioned targets.
+ * emulparams/elf32bmip.sh (OTHER_SECTIONS): Keep the
+ ".mdebug.<abi>" and ".gcc_compiled_long<size>" sections
+ generated by mips gcc.
-2004-05-13 Nick Clifton <nickc@redhat.com>
+2006-06-09 Alan Modra <amodra@bigpond.net.au>
- * po/fr.po: Updated French translation.
+ * 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.
-2004-05-05 Alexandre Oliva <aoliva@redhat.com>
+2006-06-08 Alan Modra <amodra@bigpond.net.au>
- * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
- elf32-frvfdpic.
+ * 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.
-2004-04-29 Alan Modra <amodra@bigpond.net.au>
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
- * pe-dll.c: Revert changes accidentally committed 2004-03-08.
- (fill_edata): Correct pointer arithmetic.
+ * po/Make-in (pdf, ps): New dummy targets.
-2004-04-21 Hans-Peter Nilsson <hp@axis.com>
+2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
- * NEWS: Mention change in DEFINED semantics.
+ * Makefile.am (TEXI2DVI): Add -I $(top_srcdir)/../libiberty.
+ * Makefile.in: Regenerate.
+
+2006-05-30 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2006-05-24 Nick Clifton <nickc@redhat.com>
+
+ * po/vi.po: Updated Vietnamese translation.
+
+2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * ld-mips-elf/textrel-1.d: Relax some patterns.
+
+2006-05-22 Nick Clifton <nickc@redhat.com>
+
+ * scripttempl/elf32crx.sc (.rdata): Add .rodata.*.
+
+2006-05-05 Alan Modra <amodra@bigpond.net.au>
+
+ * ld.texinfo: Document PowerPC and PowerPC64 options.
+ * gen-doc.texi: Enable.
+ * configdoc.texi: Regenerate.
+ * ld.info: Regenerate.
+
+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-16 Daniel Jacobowitz <dan@codesourcery.com>
-2004-04-20 Chris Demetriou <cgd@broadcom.com>
+ * po/POTFILES.in: Regenerated.
- * NEWS: Note that MIPS --embedded-relocs option is deprecated.
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
-2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ * config.in: Regenerated.
- * configure.host: Remove mips*-dec-bsd* target.
- * configure.tgt: Likewise.
+2006-04-14 David Heine <dlheine@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
-2004-04-09 Daniel Jacobowitz <drow@mvista.com>
+ * 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.
- Merge from mainline:
- 2004-03-30 Nick Clifton <nickc@redhat.com>
- * po/sv.po: Updated Swedish translation.
+2006-04-11 Diego Pettenò <flameeyes@gentoo.org>
- 2004-03-20 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb.
+ * 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.
- 2004-03-08 Danny Smith <dannysmith@users.sourceforge.net>
- * pe-dll.c (pe_dll_generate_implib): Skip sections marked as
- private when building implib.
+2006-04-07 Bernhard Fischer <aldot@gcc.gnu.org>
- 2004-03-01 Andreas Schwab <schwab@suse.de>
- * ld.texinfo (Options): Fix example for --wrap.
+ * ld.texinfo: Fix typo in documentation of --check-sections.
- 2004-02-25 Danny Smith <dannysmith@users.sourceforge.net>
- * pe-dll.c (fill_edata): Check that exported_symbol_sections is
- not NULL.
+2006-04-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
- 2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
- * ldlang.c (lang_check): Use %P, not %E, in error message.
+ * ldlang.c (load_symbols): Set as_needed and add_needed according
+ to the corresponding script's fields while processing it.
-2004-04-08 Richard Sandiford <rsandifo@redhat.com>
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
- * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
- * emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
- * emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
- * emultempl/irix.em: New file.
- * Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
- dependencies.
+ * 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.
-2004-04-08 Alan Modra <amodra@bigpond.net.au>
+ * ldmain.c (main): Set link_info.relax_pass to 1. Remove
+ link_info.need_relax_finalize.
- Apply from mainline.
- 2004-03-27 Alan Modra <amodra@bigpond.net.au>
- * emultempl/elf32.em: Update new bfd_elf_discard_info name.
- * emultempl/hppaelf.em: Likewise.
- * emultempl/ppc64elf.em: Likewise.
- * emultempl/sh64elf.em: Likewise.
+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.
- 2004-03-25 Alan Modra <amodra@bigpond.net.au>
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
- size_dynamic_sections call.
+2006-04-04 Eric Botcazou <ebotcazou@adacore.com>
- 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
- * lexsup.c (parse_args): Don't set unresolved_syms_in_objects
- or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
+ * 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.
- 2004-03-18 Alan Modra <amodra@bigpond.net.au>
- * ld.texinfo: Add --as-needed doco.
- * ldmain.c (as_needed): New global var.
- * ldmain.h (as_needed): Declare.
- * lexsup.c (option_values): Add OPTION_AS_NEEDED and
- OPTION_NO_AS_NEEDED.
- (ld_options): Likewise.
- (parse_args): Handle them.
- * ldlang.h (lang_input_statement_type): Add as_needed field.
- * ldlang.c (new_afile): Set p->as_needed.
- * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
- (gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
- (ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
- * ldlang.c (open_input_bfds): Remove useless cast.
- (lang_do_assignments_1): Likewise.
- (lang_for_each_input_section): Delete.
+2006-04-01 Danny Smith <dannysmith@users.sourceforge.net>
-2004-03-23 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.
- PR 51.
- * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
- link_info.wrap_char.
+2006-03-31 Jakub Jelinek <jakub@redhat.com>
-2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+ * 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.
- * configure.tgt: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
+2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
-2004-03-05 Nathan Sidwell <nathan@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.
+ * 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.
- * ldlang.c (lang_add_section): Don't force SEC_LOAD on
- SEC_THREAD_LOCAL.
- (IGNORE_SECTION): Ignore .tbss sections too.
- (lang_size_sections_1): .tbss sections do not advance dot.
+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.
-2004-02-23 Nathan Sidwell <nathan@codesourcery.com>
+2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
- * ldlang.h (struct lang_output_section_state): Change processed
- field's type.
- * ldexp.c (check, invalid): Remove.
- (fold_name): Move valid_p assignments. Create undefined symbol
- when needed. Directly exampine section's processd flag.
- * ldlang.c (lang_output_section_statement_lookup): Adjust
- processed field init.
- (lang_size_sections_1): Allow LOADADDR when determining section's
- VMA. Adjust error message. Fold data statement's expr.
- (lang_size_sections): Correctly increment lang_statement_iteration.
+ * scripttempl/avr.sc: Add *(.jumptables) *(.lowtext) sections.
+ Add KEEP() directives.
+ Add *(.data*) *(.rodata) and *(.rodata*) and *(.bss*) to .data and
+ .bss output sections.
-2004-02-23 Alan Modra <amodra@bigpond.net.au>
+2006-03-03 Richard Sandiford <richard@codesourcery.com>
- * ldexp.c (fold_tree): Follow indirect symbols.
+ * 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.
-2004-02-20 Nathan Sidwell <nathan@codesourcery.com>
+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.
- * ldgram.y (exp): Add two operand ALIGN.
- * ldexp.c (fold_binary): Add ALIGN_K case.
- * ld.texinfo (ALIGN): Document two operand version.
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
-2004-02-19 Nathan Sidwell <nathan@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.
- * ldlang.c (map_input_to_output_sections): Initialize sections
- mentioned in a data statement expression.
- (lang_do_assignments_1): Add data statement's expression's
- section's vma.
+2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
-2004-02-18 Nathan Sidwell <nathan@codesourcery.com>
+ * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
+ Use the traditional target.
- * ldgram.y (statement_anywhere): Add assert rule.
- * ldlang.c (exp_init_os): Add assert case.
+2006-02-13 Joseph S. Myers <joseph@codesourcery.com>
-2004-02-14 Andrew Cagney <cagney@redhat.com>
+ * configure.tgt (arm*b-*-linux-gnueabi): Change to
+ arm*b-*-linux-*eabi.
+ (arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi.
- * ldmain.c (remove_output): Call bfd_cache_close.
+2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
-2004-02-14 Richard Sandiford <rsandifo@redhat.com>
+ PR ld/2290
+ * NEWS: Updated for the Linux linker search order change.
- * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
- .MIPS.content* and .MIPS.events* sections.
+ * 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.
-2004-02-09 Daniel Jacobowitz <drow@mvista.com>
+2006-02-07 Paul Brook <paul@codesourcery.com>
- * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
- .note.gnu.arm.ident to after allocated sections. Mark its
- address as 0.
+ * emultempl/armelf.em: Include elf/arm.h.
+ (arm_elf_finish): Set low address bit if enty point is a Thumb
+ function.
-2004-02-09 Daniel Jacobowitz <drow@mvista.com>
+2006-02-01 Danny Smith <dannysmith@users.sourceforge.net>
- * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
- * emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
- * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
- * emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
- * emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
+ * 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.
-2004-02-05 Nick Clifton <nickc@redhat.com>
+2006-01-31 Danny Smith dannysmith@users.sourceforge.net
- * emultempl/pe.em (_after_open): Fix typo in previous delta.
+ * NEWS: Mention support for forward exports in PE-COFF dll's.
+ * ld.texinfo: Expand documentation of EXPORT statements in
+ PE-COFF .def files.
-2004-02-04 Danny Smith <dannysmith@users.sourceforge.net>
+2006-01-31 Filip Navara <navaraf@reactos.com>
- * emultempl/pe.em (_after_open): Fix thinko in 2003-12-18 patch.
+ * 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.
-2004-01-28 Alan Modra <amodra@bigpond.net.au>
+ * pe-dll.c (process_def_file): Don't crash on malformed
+ fastcall symbol names in .def file.
- * genscripts.sh: Fix typo.
+2006-01-30 Nick Clifton <nickc@redhat.com>
- * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.
+ * po/vi.po: Updated Vietnamese translation.
-2004-01-24 Jakub Jelinek <jakub@redhat.com>
+2006-01-27 Yitzchak Scott-Thoennes <sthoenna@efn.org>
- * emulparams/elf64_ia64.sh: Put .rela.opd into
- OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
+ * pe-dll.c (pe_dll_generate_implib): Issue "Creating library
+ file:" as informational message, not a warning.
-2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
+2006-01-18 Roger Sayle <roger@eyesopen.com>
- * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
- * ld.texinfo (--omagic): Note that writable text section
- does not conform to published PE-COFF specs.
- (--enable-auto-import): Likewise.
+ * emultempl/irix.em: Use lbasename instead of basename.
-2004-01-15 Alan Modra <amodra@bigpond.net.au>
+2006-01-16 Nick Clifton <nickc@redhat.com>
- * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define.
+ * po/zh_CN.po: New Chinese (simplified) translation.
+ * configure.in (ALL_LINGUAS): Add "zh_CH".
+ * configure: Regenerate.
-2004-01-13 Nick Clifton <nickc@redhat.com>
-
- * ldlang.c (lang_get_regions): Add extra parameter 'have_vma'
- which if true will prevent the LMA region being used as a
- replacement for a default VMA region.
- (lang_leave_output_section_statement): Pass extra parameter.
- (lang_leave_overlay): Likewise.
- * ld.texinfo (Output Section LMA): Document that the LMA
- region can be set to the VMA region if no VMA has been set.
- * ldlang.h (struct lang_output_section_phdr_list): Create a
- typedef for this type. Minor formatting fixes.
-
-2004-01-13 Nick Clifton <nickc@redhat.com>
-
- * ldlang.c (lang_size_sections_1): If dot is advanced, then
- assume that the section should be allocated.
-
-2004-01-13 Alan Modra <amodra@bigpond.net.au>
-
- * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
- sections. Do ignore SEC_NEVER_LOAD sections.
- (lang_size_sections_1): Remove test made redundant with the above.
+2006-01-16 Bernhard Fischer <aldot@gcc.gnu.org>
-2004-01-09 Alan Modra <amodra@bigpond.net.au>
+ * ld.texinfo (Options): Fix typo.
- * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
- program_header_size.
-
-2004-01-06 Alexandre Oliva <aoliva@redhat.com>
-
- 2003-11-28 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frvfd.sh (EMBEDDED): Clear.
- 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
- (MAXPAGESIZE): Set to 64Kb.
- (OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
- __ROFIXUP_END__. Don't map .rofixup.got any more.
- * emulparams/elf32frv.sh (NOP): Set.
- 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
- * configure.tgt: Add frv-*-*linux*.
- 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
- * Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
- (eelf32frvfd.c): New.
- * configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
- * emulparams/elf32frv.sh: Reverted previous two patches.
- * emulparams/elf32frvfd.sh: New.
- * Makefile.in: Rebuilt.
- 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
- .rofixup.got to .rofixup.
- 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
- * emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
- (TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
-
-2004-01-05 Jakub Jelinek <jakub@redhat.com>
-
- * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
- * emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
-
-2004-01-03 Alan Modra <amodra@bigpond.net.au>
-
- * ldexp.c (align_n): Make static.
- * ldexp.h (align_n): Delete declaration.
- * ldlang.h (lang_enter_output_section_statement): Remove
- block_value param.
- * ldlang.c (lang_enter_output_section_statement): Likewise.
- (TO_ADDR, TO_SIZE): Define.
- (opb_shift): New var.
- (init_opb): New function.
- (print_input_section): Call init_opb and use TO_ADDR.
- (print_data_statement, print_reloc_statement): Likewise.
- (print_padding_statement): Likewise.
- (size_input_section): Use TO_SIZE and TO_ADDR, and global opb_shift.
- (lang_check_section_addresses): Likewise.
- (lang_size_sections_1): Likewise.
- (lang_do_assignments_1): Likewise.
- (lang_set_startof): Likewise.
- (lang_one_common): Likewise. Combine power_of_two and opb_shift align.
- (lang_process): Call init_opb.
- (lang_abs_symbol_at_end_of): Use TO_ADDR and global opb_shift.
- (lang_enter_overlay_section): Adjust
- lang_enter_output_section_statement call.
- * ldgram.y: Likewise.
- * mri.c (mri_draw_tree): Likewise.
- * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Likewise.
- * emultempl/mmo.em (mmo_place_orphan): Likewise.
- * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Likewise.
-
- * ldfile.c (ldfile_set_output_arch): Add defarch param.
- * ldfile.h (ldfile_set_output_arch): Ditto.
- * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use
- ldfile_set_output_arch.
- * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * ldgram.y: Adjust ldfile_set_output_arch call.
- * emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/gld960c.em (gld960_set_output_arch): Ditto.
- * emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
- * emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
-
-2004-01-02 Bernardo Innocenti <bernie@develer.com>
-
- * configure.tgt: Add m68k-uClinux target.
-
-For older changes see ChangeLog-0203
+For older changes see ChangeLog-2005
Local Variables:
mode: change-log
diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am
index a2f1ac1afa96..3f5d1a6e710e 100644
--- a/contrib/binutils/ld/Makefile.am
+++ b/contrib/binutils/ld/Makefile.am
@@ -14,6 +14,7 @@ YFLAGS = -d
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)
# We put the scripts in the directory $(scriptdir)/ldscripts.
@@ -45,7 +46,7 @@ DOCVER = gen
# Options to extract the man page from ld.texinfo
MANCONF = -Dman
-TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
+TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
--release="binutils-$(VERSION)" --section=1
@@ -56,14 +57,8 @@ HOSTING_LIBS = @HOSTING_LIBS@
HOSTING_EMU = -m $(EMUL)
# Setup the testing framework, if you have one
-EXPECT = `if [ -f $$r/../expect/expect ] ; \
- then echo $$r/../expect/expect ; \
- else echo expect ; fi`
-
-RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
- then echo $${srcroot}/../dejagnu/runtest ; \
- else echo runtest ; fi`
-
+EXPECT = expect
+RUNTEST = runtest
RUNTESTFLAGS =
CC_FOR_TARGET = ` \
@@ -102,13 +97,15 @@ info_TEXINFOS = ld.texinfo
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
+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\""
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
ALL_EMULATIONS = \
- ea29k.o \
eaixppc.o \
eaixrs6.o \
ealpha.o \
@@ -121,13 +118,16 @@ ALL_EMULATIONS = \
earmelfb.o \
earmelf_fbsd.o \
earmelf_linux.o \
+ earmelf_linux_eabi.o \
earmelfb_linux.o \
+ earmelfb_linux_eabi.o \
earmelf_nbsd.o \
earmelfb_nbsd.o \
- earmelf_oabi.o \
+ earmelf_vxworks.o \
earmnto.o \
earmnbsd.o \
earmpe.o \
+ earmsymbian.o \
eavr2.o \
eavr1.o \
eavr3.o \
@@ -144,19 +144,25 @@ ALL_EMULATIONS = \
ed30velf.o \
edelta68.o \
eelf32_dlx.o \
- eebmon29k.o \
eelf32_i960.o \
eelf32_i860.o \
eelf32_sparc.o \
+ eelf32_sparc_vxworks.o \
eelf32b4300.o \
+ eelf32bfin.o \
+ eelf32bfinfd.o \
+ eelf32cr16c.o \
eelf32bmip.o \
eelf32bmipn32.o \
eelf32btsmip.o \
+ eelf32crx.o \
eelf32btsmipn32.o \
eelf32ltsmip.o \
eelf32ltsmipn32.o \
eelf32ebmip.o \
+ eelf32ebmipvxworks.o \
eelf32elmip.o \
+ eelf32elmipvxworks.o \
eelf32fr30.o \
eelf32frv.o \
eelf32i370.o \
@@ -168,8 +174,10 @@ ALL_EMULATIONS = \
eelf32lppc.o \
eelf32lppcnto.o \
eelf32lppcsim.o \
+ eelf32m32c.o \
eelf32mcore.o \
eelf32mipswindiss.o \
+ eelf32mt.o \
eelf32openrisc.o \
eelf32ppc.o \
eelf32ppc_fbsd.o \
@@ -177,7 +185,11 @@ ALL_EMULATIONS = \
eelf32ppcnto.o \
eelf32ppcsim.o \
eelf32ppcwindiss.o \
+ eelf32ppcvxworks.o \
eelf32vax.o \
+ eelf32xc16x.o \
+ eelf32xc16xl.o \
+ eelf32xc16xs.o \
eelf32xstormy16.o \
eelf32xtensa.o \
eelf_i386.o \
@@ -185,6 +197,7 @@ ALL_EMULATIONS = \
eelf_i386_chaos.o \
eelf_i386_fbsd.o \
eelf_i386_ldso.o \
+ eelf_i386_vxworks.o \
eelf_s390.o \
egld960.o \
egld960coff.o \
@@ -244,10 +257,10 @@ ALL_EMULATIONS = \
em68kelf.o \
em68kelfnbsd.o \
em68klinux.o \
- em68klynx.o \
em68knbsd.o \
em68kpsos.o \
em88kbcs.o \
+ emaxqcoff.o \
emcorepe.o \
emipsbig.o \
emipsbsd.o \
@@ -280,6 +293,13 @@ ALL_EMULATIONS = \
emsp430x167.o \
emsp430x168.o \
emsp430x169.o \
+ emsp430x1610.o \
+ emsp430x1611.o \
+ emsp430x1612.o \
+ emsp430x2101.o \
+ emsp430x2111.o \
+ emsp430x2121.o \
+ emsp430x2131.o \
emsp430x311.o \
emsp430x312.o \
emsp430x313.o \
@@ -291,12 +311,17 @@ ALL_EMULATIONS = \
emsp430x337.o \
emsp430x412.o \
emsp430x413.o \
+ emsp430x415.o \
+ emsp430x417.o \
emsp430xE423.o \
emsp430xE425.o \
emsp430xE427.o \
emsp430xW423.o \
emsp430xW425.o \
emsp430xW427.o \
+ emsp430xG437.o \
+ emsp430xG438.o \
+ emsp430xG439.o \
emsp430x435.o \
emsp430x436.o \
emsp430x437.o \
@@ -314,8 +339,8 @@ ALL_EMULATIONS = \
eppcmacos.o \
eppcnw.o \
eppcpe.o \
+ eppclynx.o \
eriscix.o \
- esa29200.o \
esh.o \
eshelf32.o \
eshlelf32.o \
@@ -332,10 +357,10 @@ ALL_EMULATIONS = \
eshlelf_nto.o \
eshl.o \
eshlelf.o \
+ eshlsymbian.o \
eshpe.o \
esparcaout.o \
esparclinux.o \
- esparclynx.o \
esparcnbsd.o \
est2000.o \
esun3.o \
@@ -353,7 +378,8 @@ ALL_EMULATIONS = \
evsta.o \
ew65.o \
ez8001.o \
- eelf32frvfd.o \
+ eelf32frvfd.o \
+ ez80.o \
ez8002.o
ALL_64_EMULATIONS = \
@@ -392,7 +418,7 @@ CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.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
+ ldwrite.h mri.h deffile.h pe-dll.h elf-hints-local.h
GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
@@ -403,6 +429,15 @@ OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
STAGESTUFF = *.o ldscripts/* e*.c
+# Disable -Werror, if it has been enabled, since old versions of bison/
+# yacc will produce working code which contain compile time warnings.
+ldgram.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+ldlex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+deffilep.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+
# At the moment this is just a list of those emulation template files
# that contain internationalised strings.
EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
@@ -440,14 +475,11 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
# These all start with e so 'make clean' can find them.
-GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
+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
@TDIRS@
-ea29k.c: $(srcdir)/emulparams/a29k.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} a29k "$(tdir_a29k)"
eaix5ppc.c: $(srcdir)/emulparams/aix5ppc.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} aix5ppc "$(tdir_aixppc)"
@@ -474,9 +506,6 @@ earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb "$(tdir_armelfb)"
-earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
- $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
$(srcdir)/emulparams/armelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
@@ -486,11 +515,22 @@ earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
+earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(srcdir)/emultempl/elf32.em $(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 \
$(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 \
+ $(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 \
@@ -502,6 +542,12 @@ earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
$(srcdir)/emultempl/elf32.em $(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 \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_vxworks "$(tdir_armelf)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -524,6 +570,11 @@ earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
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)/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 \
${GEN_DEPENDS}
@@ -574,15 +625,32 @@ ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
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 \
+ $(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 \
+ $(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}
${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
-eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
-eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
+eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
+ $(srcdir)/emultempl/elf32.em $(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 \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32xc16xl "$(tdir_xc16xl)"
+eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
+ $(srcdir)/emultempl/elf32.em $(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 \
+ $(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}
@@ -591,8 +659,9 @@ eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
$(srcdir)/emultempl/elf32.em $(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 $(srcdir)/emultempl/xtensaelf.em \
+ $(srcdir)/emulparams/xtensa-config.sh $(srcdir)/emultempl/elf32.em \
+ $(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 \
@@ -619,6 +688,11 @@ em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
+eelf32_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)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)"
eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
@@ -626,11 +700,14 @@ eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
+eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
+ $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
@@ -638,90 +715,111 @@ eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.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 \
+ $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32crx "$(tdir_elf32crx)"
eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.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/mipself.em \
$(srcdir)/emultempl/elf32.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/mipself.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.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}
+ ${GENSCRIPTS} elf32ebmipvxworks "$(tdir_elf32ebmipvxworks)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
$(srcdir)/emultempl/elf32.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}
+ ${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/irix.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
$(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.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}
${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
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}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(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)/emultempl/ppc32elf.em \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(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}
${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)/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/mipself.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
-eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
+eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -743,15 +841,18 @@ eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(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)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(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)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(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 \
@@ -824,6 +925,10 @@ eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
+eelf_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}
+ ${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}
${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
@@ -941,7 +1046,7 @@ 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/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(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}
@@ -1010,9 +1115,6 @@ em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
-em68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68klynx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68klynx "$(tdir_m68klynx)"
em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
@@ -1022,6 +1124,9 @@ em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
+emaxqcoff.c: $(srcdir)/emulparams/maxqcoff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/maxqcoff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} maxqcoff "$(tdir_maxqcoff)"
emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
@@ -1032,10 +1137,12 @@ 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)/scripttempl/mips.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/emultempl/generic.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}
@@ -1149,6 +1256,34 @@ emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1610 "$(tdir_msp430x1610)" msp430all
+emsp430x1611.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all
+emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all
+emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all
emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
@@ -1193,6 +1328,14 @@ emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x415 "$(tdir_msp430x415)" msp430all
+emsp430x417.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
${GEN_DEPENDS}
@@ -1217,6 +1360,18 @@ emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG437 "$(tdir_msp430xG437)" msp430all
+emsp430xG438.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG439 "$(tdir_msp430xG439)" msp430all
emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
@@ -1275,12 +1430,12 @@ eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \
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}
+ ${GENSCRIPTS} ppclynx "$(tdir_ppclynx)"
eriscix.c: $(srcdir)/emulparams/riscix.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} riscix "$(tdir_riscix)"
-esa29200.c: $(srcdir)/emulparams/sa29200.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sa29200 "$(tdir_sa29200)"
esh.c: $(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} sh "$(tdir_sh)"
@@ -1337,6 +1492,10 @@ eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(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}
+ ${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 \
@@ -1376,9 +1535,6 @@ esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
-esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
esparcnbsd.c: $(srcdir)/emulparams/sparcnbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparcnbsd "$(tdir_sparcnbsd)"
@@ -1430,6 +1586,10 @@ ev850.c: $(srcdir)/emulparams/v850.sh \
ew65.c: $(srcdir)/emulparams/w65.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
${GENSCRIPTS} w65 "$(tdir_w65)"
+ez80.c: $(srcdir)/emulparams/z80.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/z80.em \
+ $(srcdir)/scripttempl/z80.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} z80 "$(tdir_z80)"
ez8001.c: $(srcdir)/emulparams/z8001.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
${GENSCRIPTS} z8001 "$(tdir_z8001)"
@@ -1440,6 +1600,13 @@ 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
@@ -1462,10 +1629,6 @@ check-DEJAGNU: site.exp
r=`pwd`; export r; \
LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
EXPECT=$(EXPECT); export EXPECT; \
- if [ -f $(top_builddir)/../expect/expect ]; then \
- TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
- export TCL_LIBRARY; \
- fi; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
@@ -1537,21 +1700,15 @@ bootstrap: ld3$(EXEEXT)
# because almost all configs use "gen" version of manual.
# Set DOCVER above to change.
configdoc.texi: ${DOCVER}-doc.texi
- ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
+ cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
+ chmod u+w ./configdoc.texi
-ldver.texi: Makefile
+ldver.texi: $(srcdir)/../bfd/configure
rm -f $@
- echo '@set VERSION $(VERSION)' > $@
+ eval `grep '^ *VERSION=' $(srcdir)/../bfd/configure`; \
+ echo "@set VERSION $$VERSION" > $@
-ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
-
-ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
+$(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
@@ -1565,10 +1722,12 @@ ld.1: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
(rm -f $@.T$$$$ && exit 1)
rm -f ld.pod
-MAINTAINERCLEANFILES = ldver.texi
+MAINTAINERCLEANFILES = ldver.texi configdoc.texi
-# We want to reconfigure if configure.host or configure.tgt changes.
-CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
+# 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.
+CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \
+ $(srcdir)/../bfd/configure.in
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
@@ -1576,6 +1735,54 @@ mostlyclean-local:
-rm -rf tmpdir
CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
+.PHONY: install-html install-html-am install-html-recursive
+
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-html: install-html-recursive install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
.PHONY: install-exec-local install-data-local
install-exec-local: ld-new$(EXEEXT)
@@ -1601,19 +1808,23 @@ install-data-local:
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
-install: install-info
+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)
diststuff: info $(EXTRA_DIST)
+all: info ld.1
+
+# Both info (ld.info) and ld.1 depend on configdoc.texi and ldver.texi.
+# But info isn't a direct target. Make info-recursive to depend on
+# ld.1 to support parallel build.
+info-recursive: ld.1
DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
distclean-local:
rm -rf ldscripts
-Makefile: $(BFDDIR)/configure.in
-
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
@@ -1657,29 +1868,6 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
-@MAINT@.PHONY: mpw
-@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \
-@MAINT@ $(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \
-@MAINT@ $(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c
-@MAINT@
-@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-esh.c: esh.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
@@ -1688,10 +1876,10 @@ 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 ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
- ldfile.h ldemul.h ldmain.h ldemul-list.h
+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 \
@@ -1719,7 +1907,8 @@ 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
+ 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 \
@@ -1729,8 +1918,8 @@ ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
ldmisc.h ldgram.h ldmain.h
-lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.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 \
diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in
index 020064b54c39..e75b3c79c33b 100644
--- a/contrib/binutils/ld/Makefile.in
+++ b/contrib/binutils/ld/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,142 +12,266 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-
# $FreeBSD$
-
-SHELL = @SHELL@
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
-AS = @AS@
+noinst_PROGRAMS = ld-new$(EXEEXT)
+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
+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__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = po/Makefile.in
+PROGRAMS = $(noinst_PROGRAMS)
+am_ld_new_OBJECTS = ldgram.$(OBJEXT) ldlex.$(OBJEXT) lexsup.$(OBJEXT) \
+ ldlang.$(OBJEXT) mri.$(OBJEXT) ldctor.$(OBJEXT) \
+ ldmain.$(OBJEXT) ldwrite.$(OBJEXT) ldexp.$(OBJEXT) \
+ ldemul.$(OBJEXT) ldver.$(OBJEXT) ldmisc.$(OBJEXT) \
+ ldfile.$(OBJEXT) ldcref.$(OBJEXT)
+ld_new_OBJECTS = $(am_ld_new_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = ../bfd/libbfd.la
+am__DEPENDENCIES_3 = ../libiberty/libiberty.a
+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) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
+LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+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
+TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
+DVIS = ld.dvi
+PDFS = ld.pdf
+PSS = ld.ps
+HTMLS = ld.html
+TEXINFOS = ld.texinfo
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
+DVIPS = dvips
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)"
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DEJATOOL = $(PACKAGE)
+RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+DIST_SUBDIRS = $(SUBDIRS)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
-CC_FOR_BUILD = @CC_FOR_BUILD@
-CXXCPP = @CXXCPP@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMUL = @EMUL@
EMULATION_LIBPATH = @EMULATION_LIBPATH@
+EMULATION_OFILES = @EMULATION_OFILES@
+EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
EXEEXT = @EXEEXT@
-EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
+
+#stuff for self hosting (can be overridden in config file).
+HOSTING_CRT0 = @HOSTING_CRT0@
+HOSTING_LIBS = @HOSTING_LIBS@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+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@
+LDFLAGS = @LDFLAGS@
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+
+# Search path to override the default search path for -lfoo libraries.
+# If LIB_PATH is empty, the ones in the script (if any) are left alone.
+# (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
+# a cross-linker, in which case the default is empty. See genscripts.sh.)
+# Otherwise, they are replaced with the ones given in LIB_PATH,
+# which may have the form: LIB_PATH=/lib:/usr/local/lib. This can be set
+# when the linker is configured via the --with-lib-path configure switch.
+LIB_PATH = @LIB_PATH@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
-OBJDUMP = @OBJDUMP@
+NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRINGIFY = @STRINGIFY@
STRIP = @STRIP@
TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
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@
-bfdincludedir = @bfdincludedir@
-bfdlibdir = @bfdlibdir@
+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_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
l = @l@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
use_sysroot = @use_sysroot@
-
-INTLLIBS = @INTLLIBS@
-
AUTOMAKE_OPTIONS = cygnus dejagnu
-
SUBDIRS = po
-
tooldir = $(exec_prefix)/$(target_alias)
-
-YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
YFLAGS = -d
-LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
-
-WARN_CFLAGS = @WARN_CFLAGS@
AM_CFLAGS = $(WARN_CFLAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
scriptdir = $(tooldir)/lib
-
-EMUL = @EMUL@
-EMULATION_OFILES = @EMULATION_OFILES@
-EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
-
-# Search path to override the default search path for -lfoo libraries.
-# If LIB_PATH is empty, the ones in the script (if any) are left alone.
-# (The default is usually /lib:/usr/lib:/usr/local/lib, unless building
-# a cross-linker, in which case the default is empty. See genscripts.sh.)
-# Otherwise, they are replaced with the ones given in LIB_PATH,
-# which may have the form: LIB_PATH=/lib:/usr/local/lib. This can be set
-# when the linker is configured via the --with-lib-path configure switch.
-LIB_PATH = @LIB_PATH@
-
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
@@ -156,31 +282,16 @@ DOCVER = gen
# Options to extract the man page from ld.texinfo
MANCONF = -Dman
-
-TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
-
+TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
POD2MAN = pod2man --center="GNU Development Tools" \
--release="binutils-$(VERSION)" --section=1
-
-#stuff for self hosting (can be overridden in config file).
-HOSTING_CRT0 = @HOSTING_CRT0@
-HOSTING_LIBS = @HOSTING_LIBS@
HOSTING_EMU = -m $(EMUL)
# Setup the testing framework, if you have one
-EXPECT = `if [ -f $$r/../expect/expect ] ; \
- then echo $$r/../expect/expect ; \
- else echo expect ; fi`
-
-
-RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
- then echo $${srcroot}/../dejagnu/runtest ; \
- else echo runtest ; fi`
-
-
+EXPECT = expect
+RUNTEST = runtest
RUNTESTFLAGS =
-
CC_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
if [ -f $$r/../newlib/Makefile ] ; then \
@@ -196,7 +307,6 @@ CC_FOR_TARGET = ` \
fi; \
fi`
-
CXX = gcc
CXX_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
@@ -213,19 +323,15 @@ CXX_FOR_TARGET = ` \
fi; \
fi`
-
-noinst_PROGRAMS = ld-new
info_TEXINFOS = ld.texinfo
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
-
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(prefix)/share/locale\""
-
+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\""
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
-
ALL_EMULATIONS = \
- ea29k.o \
eaixppc.o \
eaixrs6.o \
ealpha.o \
@@ -238,13 +344,16 @@ ALL_EMULATIONS = \
earmelfb.o \
earmelf_fbsd.o \
earmelf_linux.o \
+ earmelf_linux_eabi.o \
earmelfb_linux.o \
+ earmelfb_linux_eabi.o \
earmelf_nbsd.o \
earmelfb_nbsd.o \
- earmelf_oabi.o \
+ earmelf_vxworks.o \
earmnto.o \
earmnbsd.o \
earmpe.o \
+ earmsymbian.o \
eavr2.o \
eavr1.o \
eavr3.o \
@@ -261,19 +370,25 @@ ALL_EMULATIONS = \
ed30velf.o \
edelta68.o \
eelf32_dlx.o \
- eebmon29k.o \
eelf32_i960.o \
eelf32_i860.o \
eelf32_sparc.o \
+ eelf32_sparc_vxworks.o \
eelf32b4300.o \
+ eelf32bfin.o \
+ eelf32bfinfd.o \
+ eelf32cr16c.o \
eelf32bmip.o \
eelf32bmipn32.o \
eelf32btsmip.o \
+ eelf32crx.o \
eelf32btsmipn32.o \
eelf32ltsmip.o \
eelf32ltsmipn32.o \
eelf32ebmip.o \
+ eelf32ebmipvxworks.o \
eelf32elmip.o \
+ eelf32elmipvxworks.o \
eelf32fr30.o \
eelf32frv.o \
eelf32i370.o \
@@ -285,8 +400,10 @@ ALL_EMULATIONS = \
eelf32lppc.o \
eelf32lppcnto.o \
eelf32lppcsim.o \
+ eelf32m32c.o \
eelf32mcore.o \
eelf32mipswindiss.o \
+ eelf32mt.o \
eelf32openrisc.o \
eelf32ppc.o \
eelf32ppc_fbsd.o \
@@ -294,7 +411,11 @@ ALL_EMULATIONS = \
eelf32ppcnto.o \
eelf32ppcsim.o \
eelf32ppcwindiss.o \
+ eelf32ppcvxworks.o \
eelf32vax.o \
+ eelf32xc16x.o \
+ eelf32xc16xl.o \
+ eelf32xc16xs.o \
eelf32xstormy16.o \
eelf32xtensa.o \
eelf_i386.o \
@@ -302,6 +423,7 @@ ALL_EMULATIONS = \
eelf_i386_chaos.o \
eelf_i386_fbsd.o \
eelf_i386_ldso.o \
+ eelf_i386_vxworks.o \
eelf_s390.o \
egld960.o \
egld960coff.o \
@@ -362,10 +484,10 @@ ALL_EMULATIONS = \
em68kelf.o \
em68kelfnbsd.o \
em68klinux.o \
- em68klynx.o \
em68knbsd.o \
em68kpsos.o \
em88kbcs.o \
+ emaxqcoff.o \
emcorepe.o \
emipsbig.o \
emipsbsd.o \
@@ -398,6 +520,13 @@ ALL_EMULATIONS = \
emsp430x167.o \
emsp430x168.o \
emsp430x169.o \
+ emsp430x1610.o \
+ emsp430x1611.o \
+ emsp430x1612.o \
+ emsp430x2101.o \
+ emsp430x2111.o \
+ emsp430x2121.o \
+ emsp430x2131.o \
emsp430x311.o \
emsp430x312.o \
emsp430x313.o \
@@ -409,12 +538,17 @@ ALL_EMULATIONS = \
emsp430x337.o \
emsp430x412.o \
emsp430x413.o \
+ emsp430x415.o \
+ emsp430x417.o \
emsp430xE423.o \
emsp430xE425.o \
emsp430xE427.o \
emsp430xW423.o \
emsp430xW425.o \
emsp430xW427.o \
+ emsp430xG437.o \
+ emsp430xG438.o \
+ emsp430xG439.o \
emsp430x435.o \
emsp430x436.o \
emsp430x437.o \
@@ -432,8 +566,8 @@ ALL_EMULATIONS = \
eppcmacos.o \
eppcnw.o \
eppcpe.o \
+ eppclynx.o \
eriscix.o \
- esa29200.o \
esh.o \
eshelf32.o \
eshlelf32.o \
@@ -450,10 +584,10 @@ ALL_EMULATIONS = \
eshlelf_nto.o \
eshl.o \
eshlelf.o \
+ eshlsymbian.o \
eshpe.o \
esparcaout.o \
esparclinux.o \
- esparclynx.o \
esparcnbsd.o \
est2000.o \
esun3.o \
@@ -471,10 +605,10 @@ ALL_EMULATIONS = \
evsta.o \
ew65.o \
ez8001.o \
- eelf32frvfd.o \
+ eelf32frvfd.o \
+ ez80.o \
ez8002.o
-
ALL_64_EMULATIONS = \
eelf64_aix.o \
eelf64_ia64.o \
@@ -501,204 +635,159 @@ ALL_64_EMULATIONS = \
eelf64lppc.o \
ehppa64linux.o
-
ALL_EMUL_EXTRA_OFILES = \
deffilep.o \
pe-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
-
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
-
+ ldwrite.h mri.h deffile.h pe-dll.h elf-hints-local.h
GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
-
OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
-
STAGESTUFF = *.o ldscripts/* e*.c
# At the moment this is just a list of those emulation template files
# that contain internationalised strings.
EMULATION_FILES = emultempl/pe.em emultempl/armcoff.em
-
POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
# These all start with e so 'make clean' can find them.
-
-GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
+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
# 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
-# This is the real libbfd.a created by libtool.
-TESTBFDLIB = @TESTBFDLIB@
-
-MAINTAINERCLEANFILES = ldver.texi
-
-# We want to reconfigure if configure.host or configure.tgt changes.
-CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
+# 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.
+CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt \
+ $(srcdir)/../bfd/configure.in
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
+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
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-noinst_PROGRAMS = ld-new$(EXEEXT)
-PROGRAMS = $(noinst_PROGRAMS)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-ld_new_OBJECTS = ldgram.$(OBJEXT) ldlex.$(OBJEXT) lexsup.$(OBJEXT) \
-ldlang.$(OBJEXT) mri.$(OBJEXT) ldctor.$(OBJEXT) ldmain.$(OBJEXT) \
-ldwrite.$(OBJEXT) ldexp.$(OBJEXT) ldemul.$(OBJEXT) ldver.$(OBJEXT) \
-ldmisc.$(OBJEXT) ldfile.$(OBJEXT) ldcref.$(OBJEXT)
-ld_new_LDFLAGS =
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LEXLIB = @LEXLIB@
-YLWRAP = $(top_srcdir)/../ylwrap
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
-TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
-INFO_DEPS = ld.info
-DVIS = ld.dvi
-TEXINFOS = ld.texinfo
-man1dir = $(mandir)/man1
-MANS = $(man_MANS)
-
-NROFF = nroff
-DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-NEWS TODO acinclude.m4 aclocal.m4 config.in configure configure.in \
-deffilep.c ldgram.c ldlex.c
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
-OBJECTS = $(ld_new_OBJECTS)
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
-all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .dvi .info .l .lo .o .obj .ps .s .texi .texinfo .txi .y
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+.SUFFIXES: .c .dvi .html .info .l .lo .o .obj .pdf .ps .texinfo .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 \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-config.h: stamp-h
+config.h: stamp-h1
@if test ! -f $@; then \
- rm -f stamp-h; \
- $(MAKE) stamp-h; \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
else :; fi
-stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
- $(SHELL) ./config.status
- @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
- @if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
- else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-
-mostlyclean-hdr:
-clean-hdr:
+stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
distclean-hdr:
- -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-noinstPROGRAMS:
+ -rm -f config.h stamp-h1
+po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
-
-maintainer-clean-noinstPROGRAMS:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+ldgram.h: ldgram.c
+ @if test ! -f $@; then \
+ rm -f ldgram.c; \
+ $(MAKE) ldgram.c; \
+ else :; fi
+deffilep.h: deffilep.c
+ @if test ! -f $@; then \
+ rm -f deffilep.c; \
+ $(MAKE) deffilep.c; \
+ else :; fi
+ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
+ @rm -f ld-new$(EXEEXT)
+ $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
mostlyclean-compile:
- -rm -f *.o core *.core
-rm -f *.$(OBJEXT)
-clean-compile:
-
distclean-compile:
-rm -f *.tab.c
-maintainer-clean-compile:
+.c.o:
+ $(COMPILE) -c $<
+
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+ $(LTCOMPILE) -c -o $@ $<
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.l.c:
+ $(LEXCOMPILE) $<
+ sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@
+ rm -f $(LEX_OUTPUT_ROOT).c
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.y.c:
+ $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
mostlyclean-libtool:
-rm -f *.lo
@@ -707,135 +796,116 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-
-maintainer-clean-libtool:
-
-ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
- @rm -f ld-new$(EXEEXT)
- $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
-.l.c:
- $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
-.y.c:
- $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
-deffilep.h: deffilep.c
-ldgram.h: ldgram.c
-
-
-ld.info: ld.texinfo
-ld.dvi: ld.texinfo
-
-
-DVIPS = dvips
-
-.texi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.texi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ -rm -f libtool
.texinfo.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ 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 $@ $<; \
+ then \
+ rc=0; \
+ cd $(srcdir); \
+ else \
+ rc=$$?; \
+ cd $(srcdir) && \
+ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+ fi; \
+ rm -rf $$backupdir; exit $$rc
.texinfo.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.txi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.txi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2DVI) $<
+
+.texinfo.pdf:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2PDF) $<
+
+.texinfo.html:
+ rm -rf $(@:.html=.htp)
+ if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $(@:.html=.htp) $<; \
+ then \
+ rm -rf $@; \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+ else \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ 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:
- $(DVIPS) $< -o $@
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) -o $@ $<
-install-info-am: $(INFO_DEPS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(infodir)
- @list='$(INFO_DEPS)'; \
- for file in $$list; do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
- if test -f $$d/$$ifile; then \
- echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
- $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
- else : ; fi; \
- done; \
- done
- @$(POST_INSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+uninstall-info-am:
+ @$(PRE_UNINSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
- echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
- install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
+ install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
done; \
- else : ; fi
-
-uninstall-info:
- $(PRE_UNINSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- ii=yes; \
- else ii=; fi; \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- test -z "$$ii" \
- || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
- done
+ else :; fi
@$(NORMAL_UNINSTALL)
- list='$(INFO_DEPS)'; \
+ @list='$(INFO_DEPS)'; \
for file in $$list; do \
- (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+ (if cd "$(DESTDIR)$(infodir)"; then \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+ else :; fi); \
done
dist-info: $(INFO_DEPS)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for base in $$list; do \
+ case $$base in \
+ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in `cd $$d && eval echo $$base*`; do \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ for file in $$d/$$base*; do \
+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+ test -f $(distdir)/$$relfile || \
+ cp -p $$file $(distdir)/$$relfile; \
done; \
done
mostlyclean-aminfo:
- -rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps \
- ld.log ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr \
- ld.cv ld.cn
-
-clean-aminfo:
-
-distclean-aminfo:
+ -rm -rf ld.aux ld.cp ld.cps ld.fn ld.fns ld.ky ld.log ld.pg ld.pgs ld.tmp \
+ ld.toc ld.tp ld.tps ld.vr ld.vrs ld.dvi ld.pdf ld.ps ld.html
maintainer-clean-aminfo:
- for i in $(INFO_DEPS); do \
- rm -f $$i; \
- if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
- rm -f $$i-[0-9]*; \
- fi; \
+ @list='$(INFO_DEPS)'; for i in $$list; do \
+ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
-clean-info: mostlyclean-aminfo
-install-man1:
- $(mkinstalldirs) $(DESTDIR)$(man1dir)
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
+clean-info: mostlyclean-aminfo
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
@@ -844,32 +914,37 @@ install-man1:
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
done
-
uninstall-man1:
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 1*) ;; \
+ *) ext='1' ;; \
+ esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
- rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
+ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
done
-install-man: $(MANS)
- @$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-man1
-uninstall-man:
- @$(NORMAL_UNINSTALL)
- $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -877,13 +952,14 @@ uninstall-man:
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -895,7 +971,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -903,13 +979,24 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
+ rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
@@ -919,163 +1006,125 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique
+tags: TAGS
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-clean-tags:
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
-
-DEJATOOL = $(PACKAGE)
-
-RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
site.exp: Makefile
@echo 'Making a new site.exp file...'
- @test ! -f site.bak || rm -f site.bak
- @echo '## these variables are automatically generated by make ##' > $@-t
- @echo '# Do not edit here. If you wish to override these values' >> $@-t
- @echo '# edit the last section' >> $@-t
- @echo 'set tool $(DEJATOOL)' >> $@-t
- @echo 'set srcdir $(srcdir)' >> $@-t
- @echo 'set objdir' `pwd` >> $@-t
- @echo 'set host_alias $(host_alias)' >> $@-t
- @echo 'set host_triplet $(host_triplet)' >> $@-t
- @echo 'set target_alias $(target_alias)' >> $@-t
- @echo 'set target_triplet $(target_triplet)' >> $@-t
- @echo 'set build_alias $(build_alias)' >> $@-t
- @echo 'set build_triplet $(build_triplet)' >> $@-t
- @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
- @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
+ @echo '## these variables are automatically generated by make ##' >site.tmp
+ @echo '# Do not edit here. If you wish to override these values' >>site.tmp
+ @echo '# edit the last section' >>site.tmp
+ @echo 'set srcdir $(srcdir)' >>site.tmp
+ @echo "set objdir `pwd`" >>site.tmp
+ @echo 'set build_alias "$(build_alias)"' >>site.tmp
+ @echo 'set build_triplet $(build_triplet)' >>site.tmp
+ @echo 'set host_alias "$(host_alias)"' >>site.tmp
+ @echo 'set host_triplet $(host_triplet)' >>site.tmp
+ @echo 'set target_alias "$(target_alias)"' >>site.tmp
+ @echo 'set target_triplet $(target_triplet)' >>site.tmp
+ @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+ @test ! -f site.exp || \
+ sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+ @-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
- @mv $@-t site.exp
-info-am: $(INFO_DEPS)
-info: info-recursive
-dvi-am: $(DVIS)
-dvi: dvi-recursive
+ @mv site.tmp site.exp
+
+distclean-DEJAGNU:
+ -rm -f site.exp site.bak
+ -l='$(DEJATOOL)'; for tool in $$l; do \
+ rm -f $$tool.sum $$tool.log; \
+ done
check-am:
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-all-recursive-am: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-install-exec-am: install-exec-local
+all-am: Makefile $(PROGRAMS) $(MANS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
install-exec: install-exec-recursive
-
-install-data-am: install-man install-data-local
install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-man
-uninstall: uninstall-recursive
-all-am: Makefile $(PROGRAMS) $(MANS) config.h
-all-redirect: all-recursive-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
-
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@@ -1083,66 +1132,136 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "ldlexldeffilephdeffilepcldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexl deffileph deffilepc ldgramh ldgramc $(MAINTAINERCLEANFILES)
-mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
- mostlyclean-compile mostlyclean-libtool \
- mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \
- mostlyclean-local
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f deffilep.c
+ -rm -f deffilep.h
+ -rm -f ldgram.c
+ -rm -f ldgram.h
+ -rm -f ldlex.c
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
-mostlyclean: mostlyclean-recursive
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
-clean-am: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
- clean-aminfo clean-tags clean-generic mostlyclean-am
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-DEJAGNU distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-local distclean-tags
-clean: clean-recursive
+dvi: dvi-recursive
-distclean-am: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
- distclean-libtool distclean-aminfo distclean-tags \
- distclean-generic clean-am distclean-local
- -rm -f libtool
+dvi-am: $(DVIS)
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-hdr \
- maintainer-clean-noinstPROGRAMS \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-aminfo maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+html: html-recursive
+
+html-am: $(HTMLS)
+
+info: info-recursive
+
+info-am: $(INFO_DEPS)
+
+install-data-am: install-data-local install-man
+
+install-exec-am: install-exec-local
+
+install-info: install-info-recursive
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+ if test -f $$ifile; then \
+ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
+ echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
+ $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
+ done; \
+ else : ; fi
+install-man: install-man1
+
+installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
-clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool install-info-am uninstall-info \
-mostlyclean-aminfo distclean-aminfo clean-aminfo \
-maintainer-clean-aminfo install-man1 uninstall-man1 install-man \
-uninstall-man install-data-recursive uninstall-data-recursive \
-install-exec-recursive uninstall-exec-recursive installdirs-recursive \
-uninstalldirs-recursive all-recursive check-recursive \
-installcheck-recursive info-recursive dvi-recursive \
-mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
-info-am info dvi-am dvi check check-am installcheck-am installcheck \
-install-info-am install-info all-recursive-am install-exec-local \
-install-exec-am install-exec install-data-local install-data-am \
-install-data install-am install uninstall-am uninstall all-redirect \
-all-am all installdirs-am installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+ maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am: $(PDFS)
+
+ps: ps-recursive
+
+ps-am: $(PSS)
+
+uninstall-am: uninstall-man
+
+uninstall-info: uninstall-info-recursive
+
+uninstall-man: uninstall-man1
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-DEJAGNU check-am clean clean-generic clean-info \
+ clean-libtool clean-noinstPROGRAMS clean-recursive ctags \
+ ctags-recursive dist-info distclean distclean-DEJAGNU \
+ distclean-compile distclean-generic distclean-hdr \
+ distclean-libtool distclean-local distclean-recursive \
+ distclean-tags dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-exec install-exec-am install-exec-local install-info \
+ install-info-am install-man install-man1 install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-aminfo \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-aminfo mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am uninstall-man \
+ uninstall-man1
+
+
+# Disable -Werror, if it has been enabled, since old versions of bison/
+# yacc will produce working code which contain compile time warnings.
+ldgram.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+ldlex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
+deffilep.o:
+ $(COMPILE) -c $< $(NO_WERROR)
po/POTFILES.in: @MAINT@ Makefile
for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
@@ -1175,9 +1294,6 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
@TDIRS@
-ea29k.c: $(srcdir)/emulparams/a29k.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} a29k "$(tdir_a29k)"
eaix5ppc.c: $(srcdir)/emulparams/aix5ppc.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} aix5ppc "$(tdir_aixppc)"
@@ -1204,9 +1320,6 @@ earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb "$(tdir_armelfb)"
-earmelf_oabi.c: $(srcdir)/emulparams/armelf_oabi.sh \
- $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
$(srcdir)/emulparams/armelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
@@ -1216,11 +1329,22 @@ earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
+earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(srcdir)/emultempl/elf32.em $(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 \
$(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 \
+ $(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 \
@@ -1232,6 +1356,12 @@ earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
$(srcdir)/emultempl/elf32.em $(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 \
+ $(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_vxworks "$(tdir_armelf)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -1254,6 +1384,11 @@ earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
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)/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 \
${GEN_DEPENDS}
@@ -1304,15 +1439,32 @@ ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
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 \
+ $(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 \
+ $(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}
${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
-eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
-eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
+eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
+ $(srcdir)/emultempl/elf32.em $(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 \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32xc16xl "$(tdir_xc16xl)"
+eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
+ $(srcdir)/emultempl/elf32.em $(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 \
+ $(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}
@@ -1321,8 +1473,9 @@ eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
$(srcdir)/emultempl/elf32.em $(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 $(srcdir)/emultempl/xtensaelf.em \
+ $(srcdir)/emulparams/xtensa-config.sh $(srcdir)/emultempl/elf32.em \
+ $(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 \
@@ -1349,6 +1502,11 @@ em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
+eelf32_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)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)"
eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
@@ -1356,11 +1514,14 @@ eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
+eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
+ $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
@@ -1368,90 +1529,111 @@ eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.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 \
+ $(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32crx "$(tdir_elf32crx)"
eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.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/mipself.em \
$(srcdir)/emultempl/elf32.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/mipself.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.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}
+ ${GENSCRIPTS} elf32ebmipvxworks "$(tdir_elf32ebmipvxworks)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
$(srcdir)/emultempl/elf32.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}
+ ${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/irix.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
$(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/mipself.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.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}
${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
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}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(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)/emultempl/ppc32elf.em \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(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}
${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)/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/mipself.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
-eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
+eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
- $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
+ $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -1473,15 +1655,18 @@ eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(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)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(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)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(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 \
@@ -1554,6 +1739,10 @@ eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
+eelf_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}
+ ${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}
${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
@@ -1674,7 +1863,7 @@ 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/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(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}
@@ -1743,9 +1932,6 @@ em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
-em68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68klynx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} m68klynx "$(tdir_m68klynx)"
em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
@@ -1755,6 +1941,9 @@ em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
${GENSCRIPTS} m88kbcs "$(tdir_m88kbcs)"
+emaxqcoff.c: $(srcdir)/emulparams/maxqcoff.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/maxqcoff.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} maxqcoff "$(tdir_maxqcoff)"
emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
@@ -1765,10 +1954,12 @@ 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)/scripttempl/mips.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/emultempl/generic.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}
@@ -1882,6 +2073,34 @@ emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1610 "$(tdir_msp430x1610)" msp430all
+emsp430x1611.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all
+emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all
+emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all
emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
@@ -1926,6 +2145,14 @@ emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x415 "$(tdir_msp430x415)" msp430all
+emsp430x417.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
${GEN_DEPENDS}
@@ -1950,6 +2177,18 @@ emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG437 "$(tdir_msp430xG437)" msp430all
+emsp430xG438.c: $(srcdir)/emulparams/msp430all.sh \
+ $(srcdir)/emultempl/generic.em $(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 \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xG439 "$(tdir_msp430xG439)" msp430all
emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
@@ -2008,12 +2247,12 @@ eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \
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}
+ ${GENSCRIPTS} ppclynx "$(tdir_ppclynx)"
eriscix.c: $(srcdir)/emulparams/riscix.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} riscix "$(tdir_riscix)"
-esa29200.c: $(srcdir)/emulparams/sa29200.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sa29200 "$(tdir_sa29200)"
esh.c: $(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} sh "$(tdir_sh)"
@@ -2070,6 +2309,10 @@ eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(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}
+ ${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 \
@@ -2109,9 +2352,6 @@ esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
esparclinux.c: $(srcdir)/emulparams/sparclinux.sh \
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparclinux "$(tdir_sparclinux)"
-esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} sparclynx "$(tdir_sparclynx)"
esparcnbsd.c: $(srcdir)/emulparams/sparcnbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sparcnbsd "$(tdir_sparcnbsd)"
@@ -2163,6 +2403,10 @@ ev850.c: $(srcdir)/emulparams/v850.sh \
ew65.c: $(srcdir)/emulparams/w65.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
${GENSCRIPTS} w65 "$(tdir_w65)"
+ez80.c: $(srcdir)/emulparams/z80.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/z80.em \
+ $(srcdir)/scripttempl/z80.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} z80 "$(tdir_z80)"
ez8001.c: $(srcdir)/emulparams/z8001.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
${GENSCRIPTS} z8001 "$(tdir_z8001)"
@@ -2173,6 +2417,13 @@ 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 \
@@ -2184,10 +2435,6 @@ check-DEJAGNU: site.exp
r=`pwd`; export r; \
LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \
EXPECT=$(EXPECT); export EXPECT; \
- if [ -f $(top_builddir)/../expect/expect ]; then \
- TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
- export TCL_LIBRARY; \
- fi; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
@@ -2259,21 +2506,15 @@ bootstrap: ld3$(EXEEXT)
# because almost all configs use "gen" version of manual.
# Set DOCVER above to change.
configdoc.texi: ${DOCVER}-doc.texi
- ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
- || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
+ cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
+ chmod u+w ./configdoc.texi
-ldver.texi: Makefile
+ldver.texi: $(srcdir)/../bfd/configure
rm -f $@
- echo '@set VERSION $(VERSION)' > $@
+ eval `grep '^ *VERSION=' $(srcdir)/../bfd/configure`; \
+ echo "@set VERSION $$VERSION" > $@
-ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
-
-ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
- TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
- MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
+$(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
@@ -2289,6 +2530,52 @@ ld.1: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
mostlyclean-local:
-rm -rf tmpdir
+.PHONY: install-html install-html-am install-html-recursive
+
+install-html: install-html-recursive install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
.PHONY: install-exec-local install-data-local
install-exec-local: ld-new$(EXEEXT)
@@ -2314,13 +2601,17 @@ install-data-local:
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
-install: install-info
+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.
+# But info isn't a direct target. Make info-recursive to depend on
+# ld.1 to support parallel build.
+info-recursive: ld.1
distclean-local:
rm -rf ldscripts
-Makefile: $(BFDDIR)/configure.in
-
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
@@ -2364,29 +2655,6 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
-@MAINT@.PHONY: mpw
-@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \
-@MAINT@ $(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \
-@MAINT@ $(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c
-@MAINT@
-@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-esh.c: esh.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-@MAINT@
-@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c
-@MAINT@ $(srcdir)/../move-if-change $< $@
-
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
@@ -2395,10 +2663,10 @@ 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 ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
- ldfile.h ldemul.h ldmain.h ldemul-list.h
+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 \
@@ -2426,7 +2694,8 @@ 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
+ 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 \
@@ -2436,8 +2705,8 @@ ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
ldmisc.h ldgram.h ldmain.h
-lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.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 \
@@ -2470,7 +2739,6 @@ deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
ldmisc.h deffile.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/binutils/ld/NEWS b/contrib/binutils/ld/NEWS
index 81512c4fb4b6..27fb0ae1154b 100644
--- a/contrib/binutils/ld/NEWS
+++ b/contrib/binutils/ld/NEWS
@@ -1,11 +1,87 @@
-*- text -*-
+* Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
+
+* Modify the Linux linker search order to better match ld.so search order.
+ Look for DT_NEEDED libraries in paths specified by ld.so.conf before
+ searching the default directories, rather than vice versa.
+ Use $prefix/etc/ld.so.conf if it exists, otherwise /etc/ld.so.conf.
+
+* PE-COFF: Forward exports from DLL's can now be specified in .def files
+ passed directly to ld.
+
+* Support for the Z80 processor family has been added.
+
+* Add support for the "@<file>" syntax to the command line, so that extra
+ switches can be read from <file>.
+
+Changes in 2.16:
+
+* Support for the R_ARM_V4BX relocation as defined in the ARM AAELF
+ specification has been added via the --fix-v4bx command-line option.
+
+* New linker script construct AS_NEEDED(), which sets the --as-needed flag
+ for input files listed inside of it.
+
+* A new command-line option, --sysroot, can be used to override the
+ default sysroot location. It only applies to toolchains that were
+ configured using --with-sysroot.
+
+* New linker script functions: ORIGIN() and LENGTH() which return information
+ about a specified memory region.
+
+* Port to MAXQ processor contributed by HCL Tech.
+
+* Added SEGMENT_START to the linker script language to permit the user to
+ override the base address for a segment from the command-line.
+
+* ELF: --warn-shared-textrel option to warn if adding a DT_TEXTREL to a shared
+ object.
+
+* Added SORT_BY_NAME and SORT_BY_ALIGNMENT to the linker script
+ language to permit sorting sections by section name or section
+ maximum alignment.
+
+* Added a new linker command line switch, --sort-section name|alignment,
+ to sort sections by section name or maximum alignment.
+
+* ELF: --add-needed/--no-add-needed options to control if a DT_NEEDED tag
+ should be added when a shared library comes from DT_NEEDED tags.
+
+* Support for the crx-elf target added.
+
+* Support for the sh-symbianelf target added.
+
+* A new linker command line switch has been added which allows the hash table
+ size to be set to a suitable prime value near to its argument. This switch
+ is --hash-size=<NUMBER>. Also if the switch --reduce-memory-overheads is
+ used, and --hash-size has not been used, then the default value will be set
+ to 1021.
+
+* Linker map files are now generated with an O(N) algorithm for finding symbols
+ that are defined in each section. This uses about 40% more memory for
+ symbols than the old O(N^2) algorithm. You can use the new
+ --reduce-memory-overheads option to select the old algorithm; this option
+ might also be used in the future to select similar tradeoffs.
+
+Changes in 2.15:
+
+* ELF: --as-needed/--no-as-needed options to control if a DT_NEEDED tag should
+ be added only when a shared library is referenced.
+
+* PE: --large-address-aware option to indicate executables support virtual
+ addresses greater than 2 gigabytes.
+
+* DWARF 2 support for i386pe added.
+
* The linker script operator DEFINED() will now yield 1 only for a symbol that
is defined before the statement where DEFINED is used.
* The MIPS --embedded-relocs (used to embed relocations into binaries for
Embedded-PIC code) is deprecated and will be removed in a future release.
+* cr16c support added by NSC.
+
* m32r Linux (ELF) support added by Renesas.
* Improved linker's handling of unresolved symbols. The switch
diff --git a/contrib/binutils/ld/acinclude.m4 b/contrib/binutils/ld/acinclude.m4
index 403aa0e2860b..71b09b9f6ac7 100644
--- a/contrib/binutils/ld/acinclude.m4
+++ b/contrib/binutils/ld/acinclude.m4
@@ -1,16 +1 @@
sinclude(../bfd/acinclude.m4)
-
-dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_SUBST(LIBTOOL)
-])
-
-dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
-])
diff --git a/contrib/binutils/ld/aclocal.m4 b/contrib/binutils/ld/aclocal.m4
index 7b50bb9050f1..cd4267338b72 100644
--- a/contrib/binutils/ld/aclocal.m4
+++ b/contrib/binutils/ld/aclocal.m4
@@ -1,105 +1,771 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p5
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-sinclude(../bfd/acinclude.m4)
-
-dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_SUBST(LIBTOOL)
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Copyright (C) 2002, 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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# 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.6])])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
])
-dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 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 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
-#serial 1
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-
-undefine([AC_ISC_POSIX])
-
-AC_DEFUN([AC_ISC_POSIX],
- [
- dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- ]
-)
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
-# serial 1
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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 3
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 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 8
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 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 12
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+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.
+#
+# 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 5
+
+# AM_PROG_LEX
+# -----------
+# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
+# "missing" invocation, for better error output.
+AC_DEFUN([AM_PROG_LEX],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
+AC_REQUIRE([AC_PROG_LEX])dnl
+if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+fi])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 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 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 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 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
#
-# Check to make sure that the build environment is sane.
+# 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 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 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 3
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 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 4
+
+# AM_SANITY_CHECK
+# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
@@ -109,7 +775,7 @@ if (
alias in your environment])
fi
- test "[$]2" = conftestfile
+ test "$[2]" = conftest.file
)
then
# Ok.
@@ -118,87 +784,130 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-rm -f conftest*
AC_MSG_RESULT(yes)])
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
+# Copyright (C) 2001, 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.
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- ;;
- esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+# Check how to create a tarball. -*- Autoconf -*-
-dnl AM_PROG_LEX
-dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
-AC_DEFUN([AM_PROG_LEX],
-[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
-AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
-AC_PROG_LEX
-AC_DECL_YYTEXT])
+# Copyright (C) 2004, 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.
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
+# serial 2
-# serial 1
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
-# Define a conditional.
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+m4_include([acinclude.m4])
diff --git a/contrib/binutils/ld/config.in b/contrib/binutils/ld/config.in
index f76bb42a07df..fa2e69fe1f29 100644
--- a/contrib/binutils/ld/config.in
+++ b/contrib/binutils/ld/config.in
@@ -1,177 +1,222 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
-/* Define to empty if the keyword does not work. */
-#undef const
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
+/* Additional extension a shared object might have. */
+#undef EXTRA_SHLIB_EXTENSION
-/* Define if you have alloca, as a function or macro. */
+/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
#undef HAVE_ALLOCA_H
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define to 1 if you have the declaration of `environ', and to 0 if you
+ don't. */
+#undef HAVE_DECL_ENVIRON
-/* 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 declaration of `free', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FREE
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_GETENV
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#undef YYTEXT_POINTER
+/* Is the prototype for getopt in <unistd.h> in the expected format? */
+#undef HAVE_DECL_GETOPT
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
+ */
+#undef HAVE_DECL_SBRK
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
+ */
+#undef HAVE_DECL_STRSTR
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the <elf-hints.h> header file. */
+#undef HAVE_ELF_HINTS_H
-/* Define if you have the getcwd function. */
+/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD
-/* Define if you have the getpagesize function. */
+/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
-/* Define if you have the munmap function. */
-#undef HAVE_MUNMAP
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
+/* Define to 1 if you have the `glob' function. */
+#undef HAVE_GLOB
-/* Define if you have the realpath function. */
-#undef HAVE_REALPATH
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the sbrk function. */
-#undef HAVE_SBRK
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
-/* Define if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+/* Define to 1 if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if you have the `realpath' function. */
+#undef HAVE_REALPATH
-/* Define if you have the <ndir.h> header file. */
-#undef HAVE_NDIR_H
+/* Define to 1 if you have the `sbrk' function. */
+#undef HAVE_SBRK
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
+/* 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 if you have the <stdlib.h> header file. */
+/* 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 <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define if you have the stpcpy function */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
-/* Define if you have the <strings.h> header file. */
+/* 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 if you have the <sys/dir.h> header file. */
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_DIR_H
-/* Define if you have the <sys/ndir.h> header file. */
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_NDIR_H
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <values.h> header file. */
+/* 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
+
/* Name of package */
#undef PACKAGE
-/* Version number of package */
-#undef VERSION
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
+/* 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
/* Use b modifier when opening binary files? */
#undef USE_BINARY_FOPEN
-/* Define if strstr is not declared in system header files. */
-#undef NEED_DECLARATION_STRSTR
-
-/* Define if free is not declared in system header files. */
-#undef NEED_DECLARATION_FREE
+/* Version number of package */
+#undef VERSION
-/* Define if sbrk is not declared in system header files. */
-#undef NEED_DECLARATION_SBRK
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#undef YYTEXT_POINTER
-/* Define if getenv is not declared in system header files. */
-#undef NEED_DECLARATION_GETENV
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
-/* Define if environ is not declared in system header files. */
-#undef NEED_DECLARATION_ENVIRON
+/* 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
-/* Additional extension a shared object might have. */
-#undef EXTRA_SHLIB_EXTENSION
+/* 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 410f9c26e564..0cd6f5c99d15 100755
--- a/contrib/binutils/ld/configure
+++ b/contrib/binutils/ld/configure
@@ -1,55 +1,325 @@
#! /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
+
+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'"
-# Defaults:
-ac_help=
+
+# 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-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-ac_help="$ac_help
- --with-lib-path=dir1:dir2... set default LIB_PATH"
-ac_help="$ac_help
- --enable-targets alternative target configurations"
-ac_help="$ac_help
- --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
-ac_help="$ac_help
- --with-sysroot[=DIR] Search for usr/lib et al within DIR."
-ac_help="$ac_help
- --enable-build-warnings enable build-time compiler warnings if gcc is used"
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
+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="ldmain.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# 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_files='TDIRS'
# 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
@@ -57,12 +327,16 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
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'
@@ -76,17 +350,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"
@@ -94,59 +360,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- \
@@ -155,96 +421,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
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$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 \
@@ -253,19 +470,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 \
@@ -279,26 +496,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 \
@@ -315,7 +532,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)
@@ -325,7 +542,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 \
@@ -336,63 +553,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-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
+ 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.
@@ -403,99 +614,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; }
-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
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 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
+
+# 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
-# 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
+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=ldmain.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ 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=..
@@ -505,123 +727,598 @@ 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; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(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_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+#
+# 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]
+ --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
+ --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
+ --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
+
+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-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
+ 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>
+ CPP C preprocessor
+
+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
+
+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
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ 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
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- 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
+
+
+
+
+
+
+
+
+
+
+
+
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:565: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 570 "configure"
-#include "confdefs.h"
-int main() {
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:598: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 603 "configure"
-#include "confdefs.h"
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
ac_aux_dir=
@@ -634,149 +1331,1163 @@ 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/'`
+
+
+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
+ 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/'`
-# 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; } ;;
-esac
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+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
-# 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
+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
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:675: checking host system type" >&5
+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
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
-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:696: 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
+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
-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:714: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+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
-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
+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
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+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
- echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:738: checking for strerror in -lcposix" >&5
-ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
- ac_save_LIBS="$LIBS"
-LIBS="-lcposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 746 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror();
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ 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); }
+
+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
+ 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 "$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 -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+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
+ 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.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
+ 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
+
+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
+ 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
+
+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*
-LIBS="$ac_save_LIBS"
+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
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lcposix"
+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
+
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ 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_search_strerror="none required"
+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 "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ 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_search_strerror="-l$ac_lib"
+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_exeext conftest.$ac_ext
+ done
fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
+fi
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
+am__api_version="1.9"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -784,233 +2495,585 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# 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:793: 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
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ 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 build environment is sane""... $ac_c" 1>&6
-echo "configure:846: checking whether build environment is sane" >&5
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
fi
- test "$2" = conftestfile
+ test "$2" = conftest.file
)
then
# Ok.
:
else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
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
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+for ac_prog in gawk mawk nawk awk
+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_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:903: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftestmake <<\EOF
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
-rm -f conftestmake
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
+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
+
+DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
-PACKAGE=ld
-VERSION=${BFD_VERSION}
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
fi
-cat >> confdefs.h <<EOF
+
+
+# Define the identity of the package.
+ PACKAGE=ld
+ VERSION=${BFD_VERSION}
+
+
+cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
-EOF
+_ACEOF
-cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
-EOF
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:949: checking for working aclocal" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
- echo "$ac_t""found" 1>&6
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ 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
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:962: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
+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
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
+ 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
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:975: checking for working automake" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
- echo "$ac_t""found" 1>&6
+ STRIP=$ac_ct_STRIP
else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$ac_t""missing" 1>&6
+ STRIP="$ac_cv_prog_STRIP"
fi
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:988: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
+ am_cv_CC_dependencies_compiler_type=none
fi
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1001: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
fi
+
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
@@ -1032,8 +3095,7 @@ no) enable_shared=no ;;
esac
else
enable_shared=yes
-fi
-
+fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
enableval="$enable_static"
@@ -1055,8 +3117,7 @@ no) enable_static=no ;;
esac
else
enable_static=yes
-fi
-
+fi;
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
@@ -1078,229 +3139,7 @@ no) enable_fast_install=no ;;
esac
else
enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1087: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1117: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1168: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1200: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1211 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1242: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1247: 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:1256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1275: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
+fi;
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
@@ -1308,13 +3147,12 @@ if test "${with_gnu_ld+set}" = set; then
test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi
-
+fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1318: checking for ld used by GCC" >&5
+ 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
@@ -1343,14 +3181,14 @@ echo "configure:1318: checking for ld used by GCC" >&5
;;
esac
elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1348: checking for GNU ld" >&5
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1351: checking for non-GNU ld" >&5
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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-:}"
@@ -1376,15 +3214,19 @@ fi
LD="$lt_cv_path_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
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1386: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
@@ -1393,27 +3235,27 @@ else
lt_cv_prog_gnu_ld=no
fi
fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+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 $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1403: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+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 $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1415: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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.
@@ -1446,33 +3288,24 @@ fi
fi
NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
+echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1453: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
+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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1474: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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=
@@ -1509,6 +3342,7 @@ cygwin* | mingw* |pw32*)
;;
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
@@ -1519,9 +3353,10 @@ darwin* | rhapsody*)
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -1579,17 +3414,10 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case $host_cpu in
- alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+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
@@ -1637,84 +3465,85 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+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
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1647: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1673: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
+# 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
+ ;;
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
+ 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;
+ ;;
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
+ 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
- ac_tool_prefix=
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
fi
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1716: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
/*)
@@ -1766,17 +3595,19 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1778: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
/*)
@@ -1828,9 +3659,11 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
else
@@ -1842,138 +3675,164 @@ fi
;;
esac
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1849: 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="${ac_tool_prefix}ranlib"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1881: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_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_ac_ct_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.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1916: 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="${ac_tool_prefix}strip"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $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_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_ac_ct_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.
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+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
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ STRIP=$ac_ct_STRIP
else
- STRIP=":"
-fi
+ STRIP="$ac_cv_prog_STRIP"
fi
@@ -1989,20 +3848,19 @@ 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
+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
-
+fi;
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
@@ -2011,8 +3869,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2015 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ 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*)
@@ -2045,7 +3907,11 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ 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"
@@ -2058,51 +3924,124 @@ ia64-*-hpux*)
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 $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2067: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
-# 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_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 <<EOF
-#line 2080 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
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_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 "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+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"
@@ -2114,54 +4053,61 @@ esac
# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
+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
-
# 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" \
@@ -2171,15 +4117,26 @@ 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 "configure: error: libtool configure failed" 1>&2; exit 1; }
+|| { { 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
- 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
@@ -2193,44 +4150,47 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# 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
-
+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 "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ 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.
+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 "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
+ *) { { 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
+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 ;;
@@ -2257,261 +4217,538 @@ if test "${with_sysroot+set}" = set; then
esac
else
-
+
use_sysroot=no
TARGET_SYSTEM_ROOT=
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
-fi
+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
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
+fi;
+
+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 "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
+ { { 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 "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
+ { { 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:
-# Extract the first word of "gcc", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2311: 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 "$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 "$ac_t""no" 1>&6
+ 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:2341: 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:2392: 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
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+ 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:2424: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 2435 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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:2466: 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
+ test -n "$ac_ct_CC" && break
+done
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2471: 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;
+ 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
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+ ;
+ 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. */
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
+int
+main ()
+{
-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:2499: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ;
+ 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"
@@ -2525,6 +4762,269 @@ 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
+
+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
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -2533,215 +5033,480 @@ fi
# 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:2542: 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
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ 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'
-ALL_LINGUAS="fr sv tr es da"
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2597: checking how to run the C preprocessor" >&5
+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
+ 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
+
+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 eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
+ 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.
- cat > conftest.$ac_ext <<EOF
-#line 2612 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2618: \"$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
- :
+ # 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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 2629 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2635: \"$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
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 2646 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2652: \"$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
- :
+ 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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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*
+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
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+
+ done
+ ac_cv_prog_CPP=$CPP
+
fi
- CPP="$ac_cv_prog_CPP"
+ CPP=$ac_cv_prog_CPP
else
- ac_cv_prog_CPP="$CPP"
+ ac_cv_prog_CPP=$CPP
fi
-echo "$ac_t""$CPP" 1>&6
-
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2679: 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: 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
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+ 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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+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
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2707: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 2712 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2720: \"$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*
+
+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 "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest*
+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 <<EOF
-#line 2737 "configure"
-#include "confdefs.h"
+ 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>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2750,16 +5515,19 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2755 "configure"
-#include "confdefs.h"
+ 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>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2768,269 +5536,530 @@ 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
+ if test "$cross_compiling" = yes; then
:
else
- cat > conftest.$ac_ext <<EOF
-#line 2776 "configure"
-#include "confdefs.h"
+ 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>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#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
-EOF
-if { (eval echo configure:2787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
+ 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 -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2811: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2816 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
+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. */
-; return 0; }
-EOF
-if { (eval echo configure:2865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+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 <<\EOF
-#define const
-EOF
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
fi
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2886: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 2893 "configure"
-#include "confdefs.h"
+ 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
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:2900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+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
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
+ *)
+ 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
+_ACEOF
+ ;;
esac
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2926: checking for off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+# 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 <<EOF
-#line 2931 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ 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
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
+ 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 "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2959: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 2964 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ 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
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_size_t=no
fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2994: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2999 "configure"
-#include "confdefs.h"
+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 = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3027: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3032 "configure"
-#include "confdefs.h"
-
+ 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
@@ -3052,137 +6081,217 @@ char *alloca ();
# endif
#endif
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
fi
-rm -f conftest*
+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
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
-if test $ac_cv_func_alloca_works = no; then
+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 <<\EOF
+# 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
-EOF
+_ACEOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3092: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3097 "configure"
-#include "confdefs.h"
+ 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
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
- rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+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
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3122: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3127 "configure"
-#include "confdefs.h"
+ 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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
+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
-EOF
+_ACEOF
- break
-else
- echo "$ac_t""no" 1>&6
+ break
fi
-done
+ done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3177: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3185 "configure"
-#include "confdefs.h"
+ 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;
@@ -3195,138 +6304,316 @@ find_stack_direction ()
else
return (&dummy > addr) ? 1 : -1;
}
+
+int
main ()
{
- exit (find_stack_direction() < 0);
+ exit (find_stack_direction () < 0);
}
-EOF
-if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ 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 -fr conftest*
+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
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
fi
-for ac_hdr in unistd.h
+
+
+for ac_header in stdlib.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3229: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3234 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3239: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3268: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3273 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3321: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3329 "configure"
-#include "confdefs.h"
+ 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:
@@ -3340,34 +6627,34 @@ else
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
+ 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
- propogated back to all the places they're supposed to be.
+ 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 <sys/types.h>
+
#include <fcntl.h>
#include <sys/mman.h>
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+#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. */
-# ifndef 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 */
-# ifdef HAVE_SYS_PARAM_H
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
@@ -3394,469 +6681,910 @@ else
#endif /* no HAVE_GETPAGESIZE */
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
-main()
+main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
+ 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);
}
-
-EOF
-if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ 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 -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
fi
+rm -f conftest.mmap
+
+
+
+
+
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+
+
+
+
+
+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
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3497: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3502 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3507: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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 \
+
+
+
+
+
+
+
+
+
+
+for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3537: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3542 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
if test "${ac_cv_func_stpcpy+set}" != "set"; then
- for ac_func in stpcpy
+
+for ac_func in stpcpy
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3594: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3599 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STPCPY 1
-EOF
+_ACEOF
fi
if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3656: checking for LC_MESSAGES" >&5
-if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3661 "configure"
-#include "confdefs.h"
+ 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() {
+int
+main ()
+{
return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LC_MESSAGES 1
-EOF
+_ACEOF
fi
fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3689: 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.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
USE_NLS=$enableval
else
USE_NLS=yes
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
- echo "$ac_t""$USE_NLS" 1>&6
-
USE_INCLUDED_LIBINTL=no
if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
+ echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
+echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3709: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
+# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
nls_cv_force_use_gnu_gettext=$withval
else
nls_cv_force_use_gnu_gettext=no
-fi
-
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+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=NONE
-
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3728: checking for libintl.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3733 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3738: \"$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"
+_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
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3755: checking for gettext in libc" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
- cat > conftest.$ac_ext <<EOF
-#line 3760 "configure"
-#include "confdefs.h"
+ 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() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libc=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+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 $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3783: checking for bindtextdomain in -lintl" >&5
-ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3791 "configure"
-#include "confdefs.h"
+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; }
-EOF
-if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3818: checking for gettext in libintl" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3823 "configure"
-#include "confdefs.h"
+ 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
+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() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libintl=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
- echo "$ac_t""no" 1>&6
+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
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GETTEXT 1
-EOF
+_ACEOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3858: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+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_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -3880,108 +7608,161 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
+
+for ac_func in dcgettext
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3892: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3897 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3947: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+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_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ 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"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3983: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+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_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4005,44 +7786,75 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- cat > conftest.$ac_ext <<EOF
-#line 4015 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CATOBJEXT=.mo
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CATOBJEXT=.mo
DATADIRNAME=lib
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
INSTOBJEXT=.mo
fi
fi
-
-else
- echo "$ac_t""no" 1>&6
+
fi
-
- if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
+
+
+ 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
@@ -4050,10 +7862,10 @@ fi
INTLOBJS="\$(GETTOBJS)"
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4055: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+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_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -4077,53 +7889,59 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4089: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+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_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ 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"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+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_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4147,12 +7965,14 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
@@ -4168,7 +7988,8 @@ fi
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
- echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
@@ -4193,25 +8014,32 @@ fi
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 $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4215: checking for catalogs to be installed" >&5
+ 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
@@ -4219,7 +8047,8 @@ echo "configure:4215: checking for catalogs to be installed" >&5
esac
done
LINGUAS=$NEW_LINGUAS
- echo "$ac_t""$LINGUAS" 1>&6
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
fi
if test -n "$LINGUAS"; then
@@ -4233,45 +8062,155 @@ echo "configure:4215: checking for catalogs to be installed" >&5
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
-
+
if test -f $srcdir/po2tbl.sed.in; then
if test "$CATOBJEXT" = ".cat"; then
- ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4243: checking for linux/version.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4248 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4253: \"$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"
+_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=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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: 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 eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+if test $ac_cv_header_linux_version_h = yes; then
msgformat=linux
else
- echo "$ac_t""no" 1>&6
-msgformat=xopen
+ msgformat=xopen
fi
+
sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
fi
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
@@ -4285,14 +8224,14 @@ fi
GT_NO=
GT_YES="#YES#"
fi
-
-
+
+
MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
+
l=
-
+
if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
@@ -4309,266 +8248,341 @@ fi
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
fi
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4318: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
for ac_prog in 'bison -y' byacc
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:4354: 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="yacc"
-missing_dir=`cd $ac_aux_dir && pwd`
for ac_prog in flex lex
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:4390: 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"
-fi
-fi
-LEX="$ac_cv_prog_LEX"
-if test -n "$LEX"; then
- echo "$ac_t""$LEX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$LEX" && break
+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
-test -n "$LEX" || LEX=""$missing_dir/missing flex""
-# Extract the first word of "flex", so it can be a program name with args.
-set dummy flex; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4423: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LEX"; then
- ac_cv_prog_LEX="$LEX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LEX="flex"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
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
+done
+test -n "$LEX" || LEX=":"
+
if test -z "$LEXLIB"
then
- case "$LEX" in
- flex*) ac_lib=fl ;;
- *) ac_lib=l ;;
- esac
- echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:4457: checking for yywrap in -l$ac_lib" >&5
-ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-l$ac_lib $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4465 "configure"
-#include "confdefs.h"
+ 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="-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; }
-EOF
-if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LEXLIB="-l$ac_lib"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
+ 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_fl_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+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_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
+ 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. */
-echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:4499: checking lex output file root" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+/* 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
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+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: $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
+
+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
+ 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.
-echo '%%
-%%' | $LEX
+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 "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
+ { { 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
fi
-
-echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
+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
-echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:4520: checking whether yytext is a pointer" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
# 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"
+ac_save_LIBS=$LIBS
LIBS="$LIBS $LEXLIB"
-cat > conftest.$ac_ext <<EOF
-#line 4532 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
`cat $LEX_OUTPUT_ROOT.c`
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+_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
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+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 "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define YYTEXT_POINTER 1
-EOF
+_ACEOF
fi
+fi
+if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+fi
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4562: 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
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
@@ -4577,8 +8591,9 @@ else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
+
MAINT=$MAINTAINER_MODE_TRUE
-
+
. ${srcdir}/configure.host
@@ -4588,504 +8603,1080 @@ fi
-for ac_hdr in string.h strings.h stdlib.h unistd.h
+
+
+
+
+
+for ac_header in string.h strings.h stdlib.h unistd.h elf-hints.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4596: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4601 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4606: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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 sbrk realpath
+
+
+
+for ac_func in sbrk realpath glob
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4635: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4640 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
+
+
+
+
+
ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4692: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4697 "configure"
-#include "confdefs.h"
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $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. */
#include <sys/types.h>
#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:4705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- ac_header_dirent=$ac_hdr; break
-else
- echo "$ac_t""no" 1>&6
+
+int
+main ()
+{
+if ((DIR *) 0)
+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
+ 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_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
fi
+
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4730: checking for opendir in -ldir" >&5
-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldir $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4738 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+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 opendir();
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ 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_search_opendir="none required"
+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 "$ac_cv_search_opendir" = no; then
+ for ac_lib in dir; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+/* 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 opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ 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_search_opendir="-l$ac_lib"
+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_exeext conftest.$ac_ext
+ done
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+LIBS=$ac_func_search_save_LIBS
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ldir"
-else
- echo "$ac_t""no" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
fi
else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4771: checking for opendir in -lx" >&5
-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lx $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4779 "configure"
-#include "confdefs.h"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+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 opendir();
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ 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_search_opendir="none required"
+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 "$ac_cv_search_opendir" = no; then
+ for ac_lib in x; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+/* 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 opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ 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_search_opendir="-l$ac_lib"
+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_exeext conftest.$ac_ext
+ done
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+LIBS=$ac_func_search_save_LIBS
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lx"
-else
- echo "$ac_t""no" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
fi
fi
+echo "$as_me:$LINENO: checking for a known getopt prototype in unistd.h" >&5
+echo $ECHO_N "checking for a known getopt prototype in unistd.h... $ECHO_C" >&6
+if test "${ld_cv_decl_getopt_unistd_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 <unistd.h>
+int
+main ()
+{
+extern int getopt (int, char *const*, const char *);
+ ;
+ 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
+ ld_cv_decl_getopt_unistd_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ld_cv_decl_getopt_unistd_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: result: $ld_cv_decl_getopt_unistd_h" >&5
+echo "${ECHO_T}$ld_cv_decl_getopt_unistd_h" >&6
+if test $ld_cv_decl_getopt_unistd_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DECL_GETOPT 1
+_ACEOF
+
+fi
+
case "${host}" in
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_BINARY_FOPEN 1
-EOF
+_ACEOF
;;
esac
-echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4823: checking whether strstr must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4828 "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+echo "$as_me:$LINENO: checking whether strstr is declared" >&5
+echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strstr+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 ()
+{
+#ifndef strstr
+ char *p = (char *) strstr;
#endif
-int main() {
-char *(*pfn) = (char *(*)) strstr
-; return 0; }
-EOF
-if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_strstr=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_strstr=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
-if test $bfd_cv_decl_needed_strstr = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRSTR 1
-EOF
-
-fi
-
-echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4870: checking whether free must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4875 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+ ;
+ 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_have_decl_strstr=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_strstr=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
+if test $ac_cv_have_decl_strstr = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether free is declared" >&5
+echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_free+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 ()
+{
+#ifndef free
+ char *p = (char *) free;
#endif
-int main() {
-char *(*pfn) = (char *(*)) free
-; return 0; }
-EOF
-if { (eval echo configure:4896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_free=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_free=yes
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
-if test $bfd_cv_decl_needed_free = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_FREE 1
-EOF
-
-fi
-
-echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:4917: checking whether sbrk must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4922 "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+ ;
+ 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_have_decl_free=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_free=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
+echo "${ECHO_T}$ac_cv_have_decl_free" >&6
+if test $ac_cv_have_decl_free = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREE 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREE 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether sbrk is declared" >&5
+echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_sbrk+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 ()
+{
+#ifndef sbrk
+ char *p = (char *) sbrk;
#endif
-int main() {
-char *(*pfn) = (char *(*)) sbrk
-; return 0; }
-EOF
-if { (eval echo configure:4943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_sbrk=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_sbrk=yes
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
-if test $bfd_cv_decl_needed_sbrk = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_SBRK 1
-EOF
+ ;
+ 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_have_decl_sbrk=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_sbrk=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5
+echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6
+if test $ac_cv_have_decl_sbrk = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether getenv is declared" >&5
+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getenv+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 ()
+{
+#ifndef getenv
+ char *p = (char *) getenv;
+#endif
-fi
+ ;
+ 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_have_decl_getenv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getenv=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
+if test $ac_cv_have_decl_getenv = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether environ is declared" >&5
+echo $ECHO_N "checking whether environ is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_environ+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 ()
+{
+#ifndef environ
+ char *p = (char *) environ;
+#endif
-echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4964: checking whether getenv must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ ;
+ 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_have_decl_environ=yes
else
- cat > conftest.$ac_ext <<EOF
-#line 4969 "configure"
-#include "confdefs.h"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *(*pfn) = (char *(*)) getenv
-; return 0; }
-EOF
-if { (eval echo configure:4990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_getenv=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_getenv=yes
+ac_cv_have_decl_environ=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_environ" >&5
+echo "${ECHO_T}$ac_cv_have_decl_environ" >&6
+if test $ac_cv_have_decl_environ = yes; then
-echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
-if test $bfd_cv_decl_needed_getenv = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_GETENV 1
-EOF
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ENVIRON 1
+_ACEOF
-fi
-echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:5011: checking whether environ must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
else
- cat > conftest.$ac_ext <<EOF
-#line 5016 "configure"
-#include "confdefs.h"
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ENVIRON 0
+_ACEOF
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *(*pfn) = (char *(*)) environ
-; return 0; }
-EOF
-if { (eval echo configure:5037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_environ=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_environ=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
-if test $bfd_cv_decl_needed_environ = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_ENVIRON 1
-EOF
fi
+
# When converting linker scripts into strings for use in emulation
# files, use astring.sed if the compiler supports ANSI string
# concatenation, or ostring.sed otherwise. This is to support the
# broken Microsoft MSVC compiler, which limits the length of string
# constants, while still supporting pre-ANSI compilers which do not
# support string concatenation.
-echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6
-echo "configure:5065: checking whether ANSI C string concatenation works" >&5
-if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5070 "configure"
-#include "confdefs.h"
+echo "$as_me:$LINENO: checking whether ANSI C string concatenation works" >&5
+echo $ECHO_N "checking whether ANSI C string concatenation works... $ECHO_C" >&6
+if test "${ld_cv_string_concatenation+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() {
+int
+main ()
+{
char *a = "a" "a";
-; return 0; }
-EOF
-if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ 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
ld_cv_string_concatenation=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ld_cv_string_concatenation=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ld_cv_string_concatenation=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ld_cv_string_concatenation" 1>&6
+echo "$as_me:$LINENO: result: $ld_cv_string_concatenation" >&5
+echo "${ECHO_T}$ld_cv_string_concatenation" >&6
if test "$ld_cv_string_concatenation" = "yes"; then
STRINGIFY=astring.sed
else
@@ -5193,443 +9784,1491 @@ case "$target_vendor" in
hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
*) EXTRA_SHLIB_EXTENSION= ;;
esac
+
+case "$target_os" in
+ lynxos) EXTRA_SHLIB_EXTENSION=".a" ;;
+esac
+
if test x${EXTRA_SHLIB_EXTENSION} != x ; then
- cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define EXTRA_SHLIB_EXTENSION "$EXTRA_SHLIB_EXTENSION"
-EOF
+_ACEOF
fi
-trap '' 1 2 15
-cat > confcache <<\EOF
+
+
+
+
+ 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
-# 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
-
DEFS=-DHAVE_CONFIG_H
-# 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
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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
+
+: ${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
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ 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
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+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%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@LN_S@%$LN_S%g
-s%@OBJEXT@%$OBJEXT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@RANLIB@%$RANLIB%g
-s%@STRIP@%$STRIP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@use_sysroot@%$use_sysroot%g
-s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
-s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@YACC@%$YACC%g
-s%@LEX@%$LEX%g
-s%@LEXLIB@%$LEXLIB%g
-s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@HDEFINES@%$HDEFINES%g
-s%@HOSTING_CRT0@%$HOSTING_CRT0%g
-s%@HOSTING_LIBS@%$HOSTING_LIBS%g
-s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
-s%@STRINGIFY@%$STRINGIFY%g
-s%@EMUL@%$EMUL%g
-/@TDIRS@/r $TDIRS
-s%@TDIRS@%%g
-s%@EMULATION_OFILES@%$EMULATION_OFILES%g
-s%@EMUL_EXTRA_OFILES@%$EMUL_EXTRA_OFILES%g
-s%@LIB_PATH@%$LIB_PATH%g
-s%@EMULATION_LIBPATH@%$EMULATION_LIBPATH%g
-s%@TESTBFDLIB@%$TESTBFDLIB%g
-CEOF
-EOF
+# 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'`
+
-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
+# 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
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ PATH_SEPARATOR=:
fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ 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
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ 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
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+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)
+ 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
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_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
-CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # 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" ;;
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_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" ;;
+ "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" ;;
+ "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;}
+ { (exit 1); exit 1; }; };;
esac
+done
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# 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
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+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
+}
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+# 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,@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,@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,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+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,@LN_S@,$LN_S,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LIBTOOL@,$LIBTOOL,;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,@XGETTEXT@,$XGETTEXT,;t t
+s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;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,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@l@,$l,;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,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s,@MAINT@,$MAINT,;t t
+s,@HDEFINES@,$HDEFINES,;t t
+s,@HOSTING_CRT0@,$HOSTING_CRT0,;t t
+s,@HOSTING_LIBS@,$HOSTING_LIBS,;t t
+s,@NATIVE_LIB_DIRS@,$NATIVE_LIB_DIRS,;t t
+s,@STRINGIFY@,$STRINGIFY,;t t
+s,@EMUL@,$EMUL,;t t
+s,@EMULATION_OFILES@,$EMULATION_OFILES,;t t
+s,@EMUL_EXTRA_OFILES@,$EMUL_EXTRA_OFILES,;t t
+s,@LIB_PATH@,$LIB_PATH,;t t
+s,@EMULATION_LIBPATH@,$EMULATION_LIBPATH,;t t
+s,@TESTBFDLIB@,$TESTBFDLIB,;t t
+s,@datarootdir@,$datarootdir,;t t
+s,@docdir@,$docdir,;t t
+s,@htmldir@,$htmldir,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+/@TDIRS@/r $TDIRS
+s,@TDIRS@,,;t t
+CEOF
+
+_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
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ 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
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_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
+ - | *:- | *:-:* ) # 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
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # 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
+ 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; }; }; }
- 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= ;;
+ 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
+
+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
+
+
+ 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
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; 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
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # 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; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ 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; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # 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
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ 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
+ 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; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
fi
-fi; done
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`(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'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ 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
+ 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=.
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
-exit 0
-EOF
+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.
+ 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
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$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 $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ 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 $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ default ) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (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/ld/configure.host b/contrib/binutils/ld/configure.host
index f2e1eb42f0b9..f9f080f60243 100644
--- a/contrib/binutils/ld/configure.host
+++ b/contrib/binutils/ld/configure.host
@@ -10,7 +10,7 @@
HDEFINES=
HOSTING_CRT0=/lib/crt0.o
-HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; echo --start-group $libgcc -lc --end-group`'
+HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; if [ -f ../gcc/libunwind.a ]; then libgcc="$libgcc ../gcc/libunwind.a"; else libunwind=\`${CC} -print-file-name=libunwind.a\`; if [ x"$libunwind" != xlibunwind.a ]; then libgcc="$libgcc $libunwind"; fi; fi; echo --start-group $libgcc -lc --end-group`'
#
# Generic configurations:
@@ -33,7 +33,7 @@ case "${host}" in
;;
*-*-linux*)
- HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
+ HOSTING_CRT0='-dynamic-linker `${CC} --help --verbose 2>&1 | egrep "ld[^ ]*\.so" | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
;;
@@ -67,6 +67,12 @@ case "${host}" in
fi
;;
+*-*-openbsd*)
+ HOSTING_CRT0="-dynamic-linker /usr/libexec/ld.so /usr/lib/crt0.o"
+ HOSTING_CRT0="$HOSTING_CRT0 /usr/lib/crtbegin.o"
+ HOSTING_LIBS="$HOSTING_LIBS /usr/lib/crtend.o"
+ ;;
+
esac
#
@@ -83,7 +89,7 @@ am33_2.0-*-linux*)
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
;;
-arm*-*-linux-gnu*)
+arm*-*-linux-*)
HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
;;
@@ -132,11 +138,6 @@ i[3-7]86-*-sco* | i[3-7]86-*-isc*)
HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o'
;;
-i[3-7]86-*-lynxos*)
- HOSTING_CRT0=/lib/init1.o
- HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
- ;;
-
i[3-7]86-pc-interix*)
HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o'
HOSTING_LIBS='-L $$X/local_bin -L $$INTERIX_ROOT/usr/lib '"$HOSTING_LIBS"' -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a'
@@ -146,15 +147,10 @@ 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`'
;;
-ia64-*-linux-gnu*)
+ia64-*-linux-*)
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
;;
-ia64-*-aix*)
- HOSTING_CRT0='-dynamic-linker `egrep "libc.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/libc.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
- HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
- ;;
-
mips*-sgi-irix4* | mips*-sgi-irix5*)
HOSTING_CRT0=/usr/lib/crt1.o
HOSTING_LIBS="$HOSTING_LIBS"' /usr/lib/crtn.o'
@@ -165,17 +161,12 @@ mips*-sgi-irix6*)
HOSTING_LIBS='-L/usr/lib32 '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors'
;;
-mips*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
+mips*-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
;;
-m68*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
- ;;
-
-m68*-*-lynxos*)
- HOSTING_CRT0=/lib/init1.o
- HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
+m68*-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
;;
m68*-motorola-sysv)
@@ -198,37 +189,42 @@ m88*-motorola-sysv3)
HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
;;
-powerpc64*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld64.so.1,"`
+powerpc64*-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld64.so.1,"`
;;
-powerpc*-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
+powerpc*-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
;;
-s390x-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld64.so.1,"`
+s390x-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld64.so.1,"`
;;
-s390-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
+s390-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
;;
-sparc*-*-solaris2*)
+sparc-*-solaris2*)
HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
;;
-sparc-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld-linux.so.2,"`
+sparc64-*-solaris2* | sparcv9-*-solaris2*)
+ HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/sparcv9/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
;;
-sparc64-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux.so.2,"`
+sparc-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld-linux.so.2,"`
;;
-x86_64-*-linux-gnu*)
- HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
+sparc64-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux.so.2,"`
+ ;;
+
+x86_64-*-linux-*)
+ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
;;
*-*-freebsd* | *-*-kfreebsd*-gnu)
@@ -240,6 +236,9 @@ x86_64-*-linux-gnu*)
*-*-netbsd*)
;;
+*-*-openbsd*)
+ ;;
+
alpha*-*-*)
HOSTING_CRT0=/usr/ccs/lib/crt0.o
;;
diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in
index 4358cbe0bb23..e020288c00c0 100644
--- a/contrib/binutils/ld/configure.in
+++ b/contrib/binutils/ld/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script
dnl
-AC_PREREQ(2.13)
+AC_PREREQ(2.57)
AC_INIT(ldmain.c)
AC_CANONICAL_SYSTEM
@@ -66,26 +66,7 @@ AC_SUBST(use_sysroot)
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-AC_ARG_ENABLE(build-warnings,
-[ --enable-build-warnings enable build-time compiler warnings if gcc is used],
-[case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi])dnl
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
-fi
-AC_SUBST(WARN_CFLAGS)
+AM_BINUTILS_WARNINGS
AM_CONFIG_HEADER(config.h:config.in)
@@ -101,7 +82,7 @@ fi
AC_PROG_CC
AC_PROG_INSTALL
-ALL_LINGUAS="fr sv tr es da"
+ALL_LINGUAS="fr sv tr es da vi zh_CN"
CY_GNU_GETTEXT
AC_EXEEXT
@@ -118,17 +99,23 @@ AC_SUBST(HOSTING_CRT0)
AC_SUBST(HOSTING_LIBS)
AC_SUBST(NATIVE_LIB_DIRS)
-AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
-AC_CHECK_FUNCS(sbrk realpath)
+AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h elf-hints.h)
+AC_CHECK_FUNCS(sbrk realpath glob)
AC_HEADER_DIRENT
+AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
+AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h,
+[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
+ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)])
+AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h)
+if test $ld_cv_decl_getopt_unistd_h = yes; then
+ AC_DEFINE([HAVE_DECL_GETOPT], 1,
+ [Is the prototype for getopt in <unistd.h> in the expected format?])
+fi
+
BFD_BINARY_FOPEN
-BFD_NEED_DECLARATION(strstr)
-BFD_NEED_DECLARATION(free)
-BFD_NEED_DECLARATION(sbrk)
-BFD_NEED_DECLARATION(getenv)
-BFD_NEED_DECLARATION(environ)
+AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ])
# When converting linker scripts into strings for use in emulation
# files, use astring.sed if the compiler supports ANSI string
@@ -256,10 +243,20 @@ case "$target_vendor" in
hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
*) EXTRA_SHLIB_EXTENSION= ;;
esac
+
+case "$target_os" in
+ lynxos) EXTRA_SHLIB_EXTENSION=".a" ;;
+esac
+
if test x${EXTRA_SHLIB_EXTENSION} != x ; then
AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION",
[Additional extension a shared object might have.])
fi
+dnl Required by html and install-html
+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])
diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt
index 9b2929180c53..d324e4ece25a 100644
--- a/contrib/binutils/ld/configure.tgt
+++ b/contrib/binutils/ld/configure.tgt
@@ -15,123 +15,122 @@
targ_extra_emuls=
targ_extra_ofiles=
+# Please try to keep this table in alphabetic order - it makes it
+# much easier to lookup a specific archictecture. Naturally any
+# architecture variants should be kept together even if their names
+# break the alpha sorting.
case "${targ}" in
-am33_2.0-*-linux*) targ_emul=elf32am33lin ;;
-arm-epoc-pe) targ_emul=arm_epoc_pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arm-*-wince) targ_emul=armpe ;
+alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+ targ_emul=elf64alpha_fbsd
+ targ_extra_emuls="elf64alpha alpha"
+ tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'` ;;
+alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
+ tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'` ;;
+alpha*-*-linux-*) targ_emul=elf64alpha targ_extra_emuls=alpha
+ tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` ;;
+alpha*-*-osf*) targ_emul=alpha ;;
+alpha*-*-gnu*) targ_emul=elf64alpha ;;
+alpha*-*-netware*) targ_emul=alpha ;;
+alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd ;;
+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-*-pe) targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
+armeb-*-aout) targ_emul=armaoutb ;;
+arm-*-coff) targ_emul=armcoff ;;
+arm-*-freebsd* | arm-*-kfreebsd*-gnu)
+ targ_emul=armelf_fbsd
+ targ_extra_emuls="armelf" ;;
+armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
+ targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
+arm-*-netbsdelf*) targ_emul=armelf_nbsd;
+ targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
+arm-*-netbsd*) targ_emul=armnbsd;
+ targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;;
+arm-*-nto*) targ_emul=armnto ;;
+arm-*-openbsd*) targ_emul=armnbsd ;;
+arm-*-rtems*) targ_emul=armelf ;;
+armeb-*-elf) targ_emul=armelfb ;;
+arm-*-elf | arm*-*-eabi*)
+ targ_emul=armelf ;;
+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-*-vxworks) targ_emul=armelf_vxworks ;;
+arm*-*-conix*) targ_emul=armelf ;;
+thumb-*-linux-* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+strongarm-*-coff) targ_emul=armcoff ;;
+strongarm-*-elf) targ_emul=armelf ;;
+strongarm-*-kaos*) targ_emul=armelf ;;
+thumb-*-coff) targ_emul=armcoff ;;
+thumb-*-elf) targ_emul=armelf ;;
+thumb-epoc-pe) targ_emul=arm_epoc_pe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arm-*-pe) targ_emul=armpe ;
+thumb-*-pe) targ_emul=armpe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arc-*-elf*) targ_emul=arcelf ;;
+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"
+ ;;
+bfin-*-elf) targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" ;;
+bfin-*-uclinux*) targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" ;;
+cr16c-*-elf*) targ_emul=elf32cr16c
+ ;;
cris-*-*aout*) targ_emul=crisaout
targ_extra_emuls="criself crislinux"
targ_extra_libpath=$targ_extra_emuls ;;
-cris-*-linux-gnu*) targ_emul=crislinux ;;
-cris-*-*) targ_emul=criself
+cris-*-linux-* | crisv32-*-linux-*)
+ targ_emul=crislinux ;;
+cris-*-* | crisv32-*-*) targ_emul=criself
targ_extra_emuls="crisaout crislinux"
- targ_extra_libpath=$targ_extra_emuls ;;
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+crx-*-elf*) targ_emul=elf32crx
+ ;;
d10v-*-*) targ_emul=d10velf ;;
d30v-*-*ext*) targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;;
d30v-*-*onchip*) targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;;
-d30v-*-*) targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o" ;;
-dlx-*-elf*) targ_emul=elf32_dlx ;;
-sparc64-*-aout*) targ_emul=sparcaout ;;
-sparc64-*-elf*) targ_emul=elf64_sparc ;;
-sparc-sun-sunos4*) targ_emul=sun4 ;;
-sparclite*-*-elf) targ_emul=elf32_sparc ;;
-sparclite*-*-coff) targ_emul=coff_sparc ;;
-sparclite*-fujitsu-*) targ_emul=sparcaout ;;
-sparc*-*-aout) targ_emul=sparcaout ;;
-sparc*-*-coff) targ_emul=coff_sparc ;;
-sparc*-*-elf) targ_emul=elf32_sparc ;;
-sparc*-*-sysv4*) targ_emul=elf32_sparc ;;
-sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
- targ_emul=elf64_sparc_fbsd
- targ_extra_emuls="elf64_sparc elf32_sparc"
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
+d30v-*-*) targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o"
;;
-sparc*-*-linux*aout*) targ_emul=sparclinux
- targ_extra_emuls="elf32_sparc sun4"
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
- tdir_sun4=sparc-sun-sunos4
+dlx-*-elf*) targ_emul=elf32_dlx
;;
-sparc64-*-linux-gnu*) targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc sparclinux sun4"
- targ_extra_libpath=elf32_sparc
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
- tdir_sparclinux=${tdir_elf32_sparc}aout
- tdir_sun4=sparc-sun-sunos4
+fr30-*-*) targ_emul=elf32fr30
;;
-sparc*-*-linux-gnu*) targ_emul=elf32_sparc
- targ_extra_emuls="sparclinux elf64_sparc sun4"
- targ_extra_libpath=elf64_sparc
- tdir_sparclinux=${targ_alias}aout
- tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
- tdir_sun4=sparc-sun-sunos4
+frv-*-*linux*) targ_emul=elf32frvfd ;;
+frv-*-*) targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd"
;;
-sparc*-*-lynxos*) targ_emul=sparclynx ;;
-sparc64-*-netbsd* | sparc64-*-openbsd*)
- targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc"
+h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
+ targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn" ;;
+h8300-*-elf* | h8300-*-rtems*)
+ targ_emul=h8300elf;
+ targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf" ;;
+h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
+ targ_emul=h8500
+ targ_extra_emuls="h8500s h8500b h8500m h8500c"
;;
-sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
-sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
-sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
- targ_emul=elf32_sparc ;;
-sparc-*-solaris2*) targ_emul=elf32_sparc
- targ_extra_emuls="elf64_sparc"
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
+hppa*64*-*-linux-*) targ_emul=hppa64linux ;;
+hppa*64*-*) targ_emul=elf64hppa ;;
+hppa*-*-linux-*) targ_emul=hppalinux ;;
+hppa*-*-*elf*) targ_emul=hppaelf ;;
+hppa*-*-lites*) targ_emul=hppaelf ;;
+hppa*-*-netbsd*) targ_emul=hppanbsd ;;
+hppa*-*-openbsd*) targ_emul=hppaobsd
;;
-sparcv9-*-solaris2* | sparc64-*-solaris2*)
- targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc"
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
+i370-*-elf* | i370-*-linux-*) targ_emul=elf32i370
;;
-sparc*-*-solaris2*) targ_emul=elf32_sparc ;;
-sparc*-wrs-vxworks*) targ_emul=sparcaout ;;
-sparc*-*-rtemsaout*) targ_emul=sparcaout ;;
-sparc*-*-rtemself*) targ_emul=elf32_sparc ;;
-sparc*-*-rtems*) targ_emul=elf32_sparc ;;
-i860-*-coff) targ_emul=coff_i860 ;;
-i860-stardent-sysv4* | i860-stardent-elf*)
- targ_emul=elf32_i860 ;;
-i960-wrs-vxworks5.0*) targ_emul=gld960 ;;
-i960-wrs-vxworks5*) targ_emul=gld960coff ;;
-i960-wrs-vxworks*) targ_emul=gld960 ;;
-i960-*-coff) targ_emul=gld960coff ;;
-i960-intel-nindy) targ_emul=gld960 ;;
-i960-*-rtems*) targ_emul=gld960coff ;;
-i960-*-elf*) targ_emul=elf32_i960 ;;
-ia64-*-elf*) targ_emul=elf64_ia64 ;;
-ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
- targ_emul=elf64_ia64_fbsd
- targ_extra_emuls="elf64_ia64" ;;
-ia64-*-netbsd*) targ_emul=elf64_ia64 ;;
-ia64-*-linux*) targ_emul=elf64_ia64 ;;
-ia64-*-aix*) targ_emul=elf64_aix ;;
-m32r*le-*-elf*) targ_emul=m32rlelf ;;
-m32r*-*-elf*) targ_emul=m32relf ;;
-m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;;
-m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;;
-m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
- targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
-m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
- targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
-m68*-sun-sunos[34]*) targ_emul=sun3 ;;
-m68*-wrs-vxworks*) targ_emul=sun3 ;;
-m68*-ericsson-ose) targ_emul=sun3 ;;
-m68*-apple-aux*) targ_emul=m68kaux ;;
-*-tandem-none) targ_emul=st2000 ;;
-i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
i[3-7]86-*-vsta) targ_emul=vsta ;;
-i[3-7]86-go32-rtems*) targ_emul=i386go32 ;;
i[3-7]86-*-go32) targ_emul=i386go32 ;;
i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
i[3-7]86-*-aix*) targ_emul=i386coff ;;
@@ -139,35 +138,31 @@ i[3-7]86-*-sco*) targ_emul=i386coff ;;
i[3-7]86-*-isc*) targ_emul=i386coff ;;
i[3-7]86-*-lynxos*) targ_emul=i386lynx ;;
i[3-7]86-*-coff) targ_emul=i386coff ;;
-i[3-7]86-*-rtemscoff*) targ_emul=i386coff ;;
-i[3-7]86-*-rtemself*) targ_emul=elf_i386 ;;
i[3-7]86-*-rtems*) targ_emul=elf_i386 ;;
i[3-7]86-*-aros*) targ_emul=elf_i386 ;;
+i[3-7]86-*-rdos*) targ_emul=elf_i386 ;;
i[3-7]86-*-bsd) targ_emul=i386bsd ;;
i[3-7]86-*-bsd386) targ_emul=i386bsd ;;
i[3-7]86-*-bsdi*) targ_emul=i386bsd ;;
i[3-7]86-*-aout) targ_emul=i386aout ;;
i[3-7]86-*-linux*aout*) targ_emul=i386linux
targ_extra_emuls=elf_i386
- tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
- ;;
+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;;
i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
-i[3-7]86-*-linux-gnu*) targ_emul=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
- tdir_i386linux=${targ_alias}aout
- ;;
-x86_64-*-linux-gnu*) targ_emul=elf_x86_64
+ tdir_i386linux=${targ_alias}aout ;;
+x86_64-*-linux-*) targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 i386linux"
targ_extra_libpath=elf_i386
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
- tdir_elf_i386=`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[45]*) targ_emul=elf_i386 ;;
i[3-7]86-*-solaris2*) targ_emul=elf_i386_ldso
- targ_extra_emuls="elf_i386"
+ targ_extra_emuls="elf_i386 elf_x86_64"
;;
i[3-7]86-*-unixware) targ_emul=elf_i386 ;;
i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
@@ -177,28 +172,25 @@ i[3-7]86-*-netbsdelf* | \
i[3-7]86-*-netbsd*-gnu* | \
i[3-7]86-*-knetbsd*-gnu)
targ_emul=elf_i386
- targ_extra_emuls=i386nbsd
- ;;
+ targ_extra_emuls=i386nbsd ;;
i[3-7]86-*-netbsdpe*) targ_emul=i386pe
- targ_extra_ofiles="deffilep.o pe-dll.o"
- ;;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
i[3-7]86-*-netbsd*) targ_emul=i386nbsd
- targ_extra_emuls=elf_i386
- ;;
+ targ_extra_emuls=elf_i386 ;;
x86_64-*-netbsd*) targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 i386nbsd"
tdir_elf_i386=`echo ${targ_alias} | \
sed -e 's/x86_64/i386/'`
case "${tdir_elf_i386}" in
- *-netbsdelf*) ;;
- *)
- tdir_elf_i386=`echo ${tdir_elf_i386} | \
- sed -e 's/netbsd/netbsdelf/'`
- ;;
- esac
- ;;
+ *-netbsdelf*) ;;
+ *) tdir_elf_i386=`echo ${tdir_elf_i386} | \
+ sed -e 's/netbsd/netbsdelf/'`;;
+ esac ;;
i[3-7]86-*-netware) targ_emul=i386nw ;;
i[3-7]86-*-elf*) targ_emul=elf_i386 ;;
+x86_64-*-elf*) targ_emul=elf_x86_64
+ targ_extra_emuls=elf_i386
+ ;;
i[3-7]86-*-kaos*) targ_emul=elf_i386 ;;
i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
targ_emul=i386bsd ;;
@@ -209,8 +201,7 @@ x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
targ_emul=elf_x86_64_fbsd
targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386"
tdir_elf_i386=`echo ${targ_alias} \
- | sed -e 's/x86_64/i386/'`
- ;;
+ | sed -e 's/x86_64/i386/'` ;;
i[3-7]86-*-sysv*) targ_emul=i386coff ;;
i[3-7]86-*-ptx*) targ_emul=i386coff ;;
i[3-7]86-*-mach*) targ_emul=i386mach ;;
@@ -230,129 +221,48 @@ 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 ;;
i[3-7]86-*-beos*) targ_emul=elf_i386_be ;;
-i[3-7]86-*-vxworks*) targ_emul=elf_i386 ;;
-i[3-7]86-*-chaos) targ_emul=elf_i386_chaos ;;
-m8*-*-*) targ_emul=m88kbcs ;;
-a29k-*-udi) targ_emul=sa29200 ;;
-a29k-*-ebmon) targ_emul=ebmon29k ;;
-a29k-*-*) targ_emul=a29k ;;
-# arm-*-riscix*) targ_emul=riscix ;;
-arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
-armeb-*-aout) targ_emul=armaoutb ;;
-arm-*-coff) targ_emul=armcoff ;;
-arm-*-freebsd* | arm-*-kfreebsd*-gnu)
- targ_emul=armelf_fbsd
- targ_extra_emuls="armelf" ;;
-armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
- targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
-arm-*-netbsdelf*) targ_emul=armelf_nbsd;
- targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
-arm-*-netbsd*) targ_emul=armnbsd;
- targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;;
-arm-*-nto*) targ_emul=armnto ;;
-arm-*-openbsd*) targ_emul=armnbsd ;;
-arm-*-rtems*) targ_emul=armelf ;;
-armeb-*-elf) targ_emul=armelfb ;;
-arm-*-elf | arm-*-vxworks)
- targ_emul=armelf ;;
-arm-*-kaos*) targ_emul=armelf ;;
-arm9e-*-elf) targ_emul=armelf ;;
-arm-*-oabi) targ_emul=armelf_oabi ;;
-arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
-arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-arm*-*-conix*) targ_emul=armelf ;;
-thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-strongarm-*-coff) targ_emul=armcoff ;;
-strongarm-*-elf) targ_emul=armelf ;;
-strongarm-*-kaos*) targ_emul=armelf ;;
-thumb-*-coff) targ_emul=armcoff ;;
-thumb-*-elf) targ_emul=armelf ;;
-thumb-*-oabi) targ_emul=armelf_oabi ;;
-thumb-epoc-pe) targ_emul=arm_epoc_pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-thumb-*-pe) targ_emul=armpe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-xscale-*-coff) targ_emul=armcoff ;;
-xscale-*-elf) targ_emul=armelf ;;
-h8300-*-hms* | h8300-*-coff* | h8300-*-rtems*)
- targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn"
- ;;
-h8300-*-elf*)
- targ_emul=h8300elf;
- targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf"
- ;;
-h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
- targ_emul=h8500
- targ_extra_emuls="h8500s h8500b h8500m h8500c"
- ;;
-sh-*-linux*)
- targ_emul=shlelf_linux
- targ_extra_emuls=shelf_linux
- targ_extra_libpath=shelf_linux
- ;;
-sh64eb-*-linux*) targ_emul=shelf32_linux
- targ_extra_emuls="shlelf32_linux"
- ;;
-sh64-*-linux*) targ_emul=shlelf32_linux
- targ_extra_emuls="shelf32_linux"
- targ_extra_libpath=shelf32_linux
+i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks ;;
+i[3-7]86-*-chaos) targ_emul=elf_i386_chaos
;;
-sh*eb-*-linux*)
- targ_emul=shelf_linux
- ;;
-sh*-*-linux*)
- targ_emul=shlelf_linux
- ;;
-sh5le-*-netbsd*)
- targ_emul=shlelf32_nbsd
- targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd"
- ;;
-sh5-*-netbsd*)
- targ_emul=shelf32_nbsd
- targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd"
- ;;
-sh64le-*-netbsd*)
- targ_emul=shlelf64_nbsd
- targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd"
- ;;
-sh64-*-netbsd*)
- targ_emul=shelf64_nbsd
- targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd"
- ;;
-sh*l*-*-netbsdelf*)
- targ_emul=shlelf_nbsd
- targ_extra_emuls=shelf_nbsd
+i860-*-coff) targ_emul=coff_i860 ;;
+i860-stardent-sysv4* | i860-stardent-elf*)
+ targ_emul=elf32_i860
;;
-sh*-*-netbsdelf*)
- targ_emul=shelf_nbsd
- targ_extra_emuls=shlelf_nbsd
+i960-wrs-vxworks5.0*) targ_emul=gld960 ;;
+i960-wrs-vxworks5*) targ_emul=gld960coff ;;
+i960-wrs-vxworks*) targ_emul=gld960 ;;
+i960-*-coff) targ_emul=gld960coff ;;
+i960-intel-nindy) targ_emul=gld960 ;;
+i960-*-rtems*) targ_emul=gld960coff ;;
+i960-*-elf*) targ_emul=elf32_i960
;;
-shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
- targ_emul=shlelf
- targ_extra_emuls="shelf shl sh"
+ia64-*-elf*) targ_emul=elf64_ia64 ;;
+ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
+ targ_emul=elf64_ia64_fbsd
+ targ_extra_emuls="elf64_ia64" ;;
+ia64-*-netbsd*) targ_emul=elf64_ia64 ;;
+ia64-*-linux*) targ_emul=elf64_ia64 ;;
+ia64-*-aix*) targ_emul=elf64_aix
;;
-sh-*-rtemscoff*) targ_emul=sh; targ_extra_emuls=shl ;;
-sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos* | sh-*-vxworks)
- targ_emul=shelf
- targ_extra_emuls="shlelf sh shl"
+ip2k-*-elf) targ_emul=elf32ip2k
;;
-sh-*-nto*) targ_emul=shelf_nto
- targ_extra_emuls=shlelf_nto
+iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10"
;;
-sh-*-pe) targ_emul=shpe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-sh-*-*) targ_emul=sh; targ_extra_emuls=shl ;;
-sh64le-*-elf*)
- targ_emul=shlelf
- targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
- targ_extra_libpath=$targ_extra_emuls
+m32c-*-elf) targ_emul=elf32m32c
;;
-sh64-*-elf*)
- targ_emul=shelf
- targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
- targ_extra_libpath=$targ_extra_emuls
+m32r*le-*-elf*) targ_emul=m32rlelf ;;
+m32r*-*-elf*) targ_emul=m32relf ;;
+m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;;
+m32r*-*-linux-*) targ_emul=m32relf_linux
;;
+m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
+ targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
+m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
+ targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
+m68*-sun-sunos[34]*) targ_emul=sun3 ;;
+m68*-wrs-vxworks*) targ_emul=sun3 ;;
+m68*-ericsson-ose) targ_emul=sun3 ;;
+m68*-apple-aux*) targ_emul=m68kaux ;;
m68k-sony-*) targ_emul=news ;;
m68k-hp-bsd*) targ_emul=hp300bsd ;;
m68*-motorola-sysv*) targ_emul=delta68 ;;
@@ -362,15 +272,12 @@ m68*-*-elf) targ_emul=m68kelf ;;
m68*-*-hpux*) targ_emul=hp3hpux ;;
m68k-*-linux*aout*) targ_emul=m68klinux
targ_extra_emuls=m68kelf
- tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
- ;;
-m68k-*-linux-gnu*) targ_emul=m68kelf
+ tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` ;;
+m68k-*-linux-*) targ_emul=m68kelf
targ_extra_emuls=m68klinux
- tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
- ;;
+ tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` ;;
m68k-*-uclinux*) targ_emul=m68kelf ;;
m68*-*-gnu*) targ_emul=m68kelf ;;
-m68*-*-lynxos*) targ_emul=m68klynx ;;
m68*-*-netbsd*4k*) targ_emul=m68k4knbsd
targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
m68*-*-netbsdelf*) targ_emul=m68kelfnbsd
@@ -380,22 +287,16 @@ m68*-*-netbsdaout* | m68*-*-netbsd*)
targ_extra_emuls="m68kelfnbsd m68k4knbsd" ;;
m68*-*-psos*) targ_emul=m68kpsos ;;
m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
-m68*-*-rtems*) targ_emul=m68kelf ;;
-hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;;
-hppa*64*-*) targ_emul=elf64hppa ;;
-hppa*-*-linux-gnu*) targ_emul=hppalinux ;;
-hppa*-*-*elf*) targ_emul=hppaelf ;;
-hppa*-*-lites*) targ_emul=hppaelf ;;
-hppa*-*-netbsd*) targ_emul=hppanbsd ;;
-hppa*-*-openbsd*) targ_emul=hppaobsd ;;
-hppa*-*-rtems*) targ_emul=hppaelf ;;
-vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
-vax-*-netbsdelf*) targ_emul=elf32vax
- targ_extra_emuls=vaxnbsd ;;
-vax-*-netbsdaout* | vax-*-netbsd*)
- targ_emul=vaxnbsd
- targ_extra_emuls=elf32vax ;;
-vax-*-linux-gnu*) targ_emul=elf32vax ;;
+m68*-*-rtems*) targ_emul=m68kelf
+ ;;
+m8*-*-*) targ_emul=m88kbcs
+ ;;
+maxq-*-coff) targ_emul=maxqcoff
+ ;;
+mcore-*-pe) targ_emul=mcorepe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+mcore-*-elf) targ_emul=elf32mcore
+ ;;
mips*-*-pe) targ_emul=mipspe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
mips*-dec-ultrix*) targ_emul=mipslit ;;
@@ -403,17 +304,16 @@ mips*-dec-osf*) targ_emul=mipslit ;;
mips*-sgi-irix5*) targ_emul=elf32bsmip ;;
mips*-sgi-irix6*) targ_emul=elf32bmipn32
targ_extra_emuls="elf32bsmip elf64bmip"
- targ_extra_libpath=$targ_extra_emuls
- ;;
+ targ_extra_libpath=$targ_extra_emuls ;;
mips*-sgi-irix*) targ_emul=mipsbig ;;
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
mips*-*-ecoff*) targ_emul=mipsidt ;;
-mips*el-*-netbsd*) targ_emul=elf32lmip
- targ_extra_emuls="elf32bmip"
- ;;
-mips*-*-netbsd*) targ_emul=elf32bmip
- targ_extra_emuls="elf32lmip"
+mips*el-*-netbsd*) targ_emul=elf32ltsmip
+ targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
;;
+mips*-*-netbsd*) targ_emul=elf32btsmip
+ targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
+ ;;
mips*-*-bsd*) targ_emul=mipsbig ;;
mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;;
mips*vr4300-*-elf*) targ_emul=elf32b4300 ;;
@@ -423,106 +323,99 @@ mips*vr5000el-*-elf*) targ_emul=elf32l4300 ;;
mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
mips*el-*-elf*) targ_emul=elf32elmip ;;
mips*-*-elf*) targ_emul=elf32ebmip ;;
-mips*el-*-rtems*) targ_emul=elf32elmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
-mips*el-*-vxworks*) targ_emul=elf32elmip ;;
-mips*-*-vxworks*) targ_emul=elf32ebmip
- targ_extra_emuls="elf32elmip" ;;
+mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
+ targ_extra_emuls="elf32ebmipvxworks" ;;
+mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
+ targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
-mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32
+mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
- ;;
-mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32
+ targ_extra_libpath="elf32ltsmip elf64ltsmip" ;;
+mips64*-*-linux-*) targ_emul=elf32btsmipn32
targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
- ;;
-mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
- targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
- ;;
-mips*-*-linux-gnu*) targ_emul=elf32btsmip
- targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
- ;;
+ targ_extra_libpath="elf32btsmip elf64btsmip" ;;
+mips*el-*-linux-*) targ_emul=elf32ltsmip
+ targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
+mips*-*-linux-*) targ_emul=elf32btsmip
+ targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
mips*-*-lnews*) targ_emul=mipslnews ;;
-mips*-*-sysv4*) targ_emul=elf32btsmip ;;
+mips*-*-sysv4*) targ_emul=elf32btsmip
+ ;;
mmix-*-*) targ_emul=mmo
targ_extra_emuls=elf64mmix
;;
+am33_2.0-*-linux*) targ_emul=elf32am33lin ;;
mn10200-*-*) targ_emul=mn10200 ;;
-mn10300-*-*) targ_emul=mn10300 ;;
-msp430-*-*) targ_emul=msp430x110
- targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449" ;;
-alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- targ_emul=elf64alpha_fbsd
- targ_extra_emuls="elf64alpha alpha"
- tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'`
+mn10300-*-*) targ_emul=mn10300
;;
-alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
- tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
+mt-*elf) targ_emul=elf32mt
;;
-alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
- tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
+msp430-*-*) targ_emul=msp430x110
+ targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x1610 msp430x1611 msp430x1612 msp430x2101 msp430x2111 msp430x2121 msp430x2131 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430x415 msp430x417 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430xG437 msp430xG438 msp430xG439 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449"
+ ;;
+ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
+ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
;;
-alpha*-*-osf*) targ_emul=alpha ;;
-alpha*-*-gnu*) targ_emul=elf64alpha ;;
-alpha*-*-netware*) targ_emul=alpha ;;
-alpha*-*-netbsd*) targ_emul=elf64alpha_nbsd ;;
-alpha*-*-openbsd*) targ_emul=elf64alpha ;;
-z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;;
-ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
-ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
openrisc-*-*) targ_emul=elf32openrisc ;;
or32-*-coff) targ_emul=or32 ;;
or32-*-elf) targ_emul=or32elf ;;
-or32-*-rtems*) targ_emul=or32elf ;;
-pdp11-*-*) targ_emul=pdp11 ;;
+or32-*-rtems*) targ_emul=or32elf
+ ;;
+pdp11-*-*) targ_emul=pdp11
+ ;;
pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
-pj*-*-*) targ_emul=pjelf ;;
+pj*-*-*) targ_emul=pjelf
+ ;;
powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
targ_emul=elf32ppc_fbsd;
targ_extra_emuls="elf32ppc elf32ppcsim";
targ_extra_libpath=elf32ppc;
- tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'`
- ;;
-powerpc*-*-linux*)
- case "${targ}" in
- *64*) targ_emul=elf64ppc
- targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim"
- targ_extra_libpath="elf32ppclinux elf32ppc"
- tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32ppclinux=$tdir_elf32ppc
- tdir_elf32ppcsim=$tdir_elf32ppc ;;
- *) 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
- ;;
- esac ;;
+ tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ;;
+powerpc*-*-linux*) case "${targ}" in
+ *64*) targ_emul=elf64ppc
+ targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim"
+ targ_extra_libpath="elf32ppclinux elf32ppc"
+ tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
+ tdir_elf32ppclinux=$tdir_elf32ppc
+ tdir_elf32ppcsim=$tdir_elf32ppc
+ ;;
+ *) 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 ;;
+ esac ;;
powerpc*le-*-elf* | powerpc*le-*-eabi* | powerpc*le-*-solaris* \
| powerpc*le-*-sysv* | powerpc*le-*-vxworks*)
- case "${targ}" in
- *64*) targ_emul=elf64lppc
- targ_extra_emuls="elf32lppc elf32lppcsim"
- tdir_elf32lppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32lppcsim=$tdir_elf32lppc ;;
- *) targ_emul=elf32lppc
- targ_extra_emuls="elf32ppcsim" ;;
- esac ;;
+ case "${targ}" in
+ *64*) targ_emul=elf64lppc
+ targ_extra_emuls="elf32lppc elf32lppcsim"
+ tdir_elf32lppc=`echo "${targ_alias}" | sed -e 's/64//'`
+ tdir_elf32lppcsim=$tdir_elf32lppc
+ ;;
+ *) targ_emul=elf32lppc
+ targ_extra_emuls="elf32ppcsim" ;;
+ esac ;;
powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
- | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-vxworks* | powerpc*-*-kaos*)
- case "${targ}" in
- *64*) targ_emul=elf64ppc
- targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
- tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32ppclinux=$tdir_elf32ppc
- tdir_elf32ppcsim=$tdir_elf32ppc ;;
- *) targ_emul=elf32ppc
- targ_extra_emuls="elf32ppclinux elf32ppcsim" ;;
- esac ;;
+ | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-kaos*)
+ case "${targ}" in
+ *64*) targ_emul=elf64ppc
+ targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
+ tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
+ tdir_elf32ppclinux=$tdir_elf32ppc
+ tdir_elf32ppcsim=$tdir_elf32ppc
+ ;;
+ *) targ_emul=elf32ppc
+ targ_extra_emuls="elf32ppclinux elf32ppcsim" ;;
+ esac ;;
+powerpc-*-vxworks*)
+ targ_emul=elf32ppcvxworks
+ targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;;
powerpc-*-nto*) targ_emul=elf32ppcnto ;;
powerpcle-*-nto*) targ_emul=elf32lppcnto ;;
-powerpcle-*-rtems*) targ_emul=elf32leppc ;;
powerpc-*-rtems*) targ_emul=elf32ppc ;;
powerpc-*-macos*) targ_emul=ppcmacos ;;
powerpc-*-netware*) targ_emul=ppcnw ;;
@@ -533,39 +426,151 @@ powerpc-*-aix5*) targ_emul=aix5ppc ;;
powerpc-*-aix*) targ_emul=aixppc ;;
powerpc-*-beos*) targ_emul=aixppc ;;
powerpc-*-windiss*) targ_emul=elf32ppcwindiss ;;
+powerpc-*-lynxos*) targ_emul=ppclynx ;;
rs6000-*-aix5*) targ_emul=aix5rs6 ;;
-rs6000-*-aix*) targ_emul=aixrs6 ;;
-tic30-*-*aout*) targ_emul=tic30aout ;;
-tic30-*-*coff*) targ_emul=tic30coff ;;
-tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
-tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
-tic80-*-*) targ_emul=tic80coff ;;
-v850-*-*) targ_emul=v850 ;;
-v850e-*-*) targ_emul=v850 ;;
-v850ea-*-*) targ_emul=v850 ;;
-iq2000-*-elf) targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10" ;;
-frv-*-*linux*) targ_emul=elf32frvfd ;;
-frv-*-*) targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd" ;;
-w65-*-*) targ_emul=w65 ;;
-xstormy16-*-*) targ_emul=elf32xstormy16 ;;
-xtensa-*-*) targ_emul=elf32xtensa;;
-fr30-*-*) targ_emul=elf32fr30 ;;
-mcore-*-pe) targ_emul=mcorepe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-mcore-*-elf) targ_emul=elf32mcore ;;
+rs6000-*-aix*) targ_emul=aixrs6
+ ;;
s390x-*-linux*) targ_emul=elf64_s390
targ_extra_emuls=elf_s390
targ_extra_libpath=$targ_extra_emuls
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/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 ;;
-*-*-ieee*) targ_emul=vanilla ;;
-ip2k-*-elf) targ_emul=elf32ip2k ;;
-
+ fi
+ ;;
+sh-*-linux*) targ_emul=shlelf_linux
+ targ_extra_emuls=shelf_linux
+ targ_extra_libpath=shelf_linux ;;
+sh64eb-*-linux*) targ_emul=shelf32_linux
+ targ_extra_emuls="shlelf32_linux" ;;
+sh64-*-linux*) targ_emul=shlelf32_linux
+ targ_extra_emuls="shelf32_linux"
+ targ_extra_libpath=shelf32_linux ;;
+sh*eb-*-linux*) targ_emul=shelf_linux ;;
+sh*-*-linux*) targ_emul=shlelf_linux ;;
+sh5le-*-netbsd*) targ_emul=shlelf32_nbsd
+ targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
+sh5-*-netbsd*) targ_emul=shelf32_nbsd
+ targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd" ;;
+sh64le-*-netbsd*) targ_emul=shlelf64_nbsd
+ targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
+sh64-*-netbsd*) targ_emul=shelf64_nbsd
+ targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd" ;;
+sh*l*-*-netbsdelf*) targ_emul=shlelf_nbsd
+ targ_extra_emuls=shelf_nbsd ;;
+sh*-*-netbsdelf*) targ_emul=shelf_nbsd
+ targ_extra_emuls=shlelf_nbsd ;;
+sh*-*-symbianelf*) targ_emul=shlsymbian ;;
+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)
+ targ_emul=shelf
+ targ_extra_emuls="shlelf sh shl" ;;
+sh-*-nto*) targ_emul=shelf_nto
+ targ_extra_emuls=shlelf_nto ;;
+sh-*-pe) targ_emul=shpe ;
+ targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+sh-*-*) targ_emul=sh; targ_extra_emuls=shl ;;
+sh64le-*-elf*) targ_emul=shlelf
+ targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
+ targ_extra_libpath=$targ_extra_emuls ;;
+sh64-*-elf*) targ_emul=shelf
+ targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
+ targ_extra_libpath=$targ_extra_emuls ;;
+sparc64-*-aout*) targ_emul=sparcaout ;;
+sparc64-*-elf*) targ_emul=elf64_sparc ;;
+sparc-sun-sunos4*) targ_emul=sun4 ;;
+sparclite*-*-elf) targ_emul=elf32_sparc ;;
+sparclite*-*-coff) targ_emul=coff_sparc ;;
+sparclite*-fujitsu-*) targ_emul=sparcaout ;;
+sparc*-*-aout) targ_emul=sparcaout ;;
+sparc*-*-coff) targ_emul=coff_sparc ;;
+sparc*-*-elf) targ_emul=elf32_sparc ;;
+sparc*-*-sysv4*) targ_emul=elf32_sparc ;;
+sparc*-*-vxworks*) targ_emul=elf32_sparc_vxworks ;;
+sparc64-*-freebsd* | sparcv9-*-freebsd* | sparc64-*-kfreebsd*-gnu | sparcv9-*-kfreebsd*-gnu)
+ targ_emul=elf64_sparc_fbsd
+ targ_extra_emuls="elf64_sparc elf32_sparc"
+ targ_extra_libpath=$targ_extra_emuls
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
+sparc*-*-linux*aout*) targ_emul=sparclinux
+ targ_extra_emuls="elf32_sparc sun4"
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
+ tdir_sun4=sparc-sun-sunos4 ;;
+sparc64-*-linux-*) targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc sparclinux sun4"
+ targ_extra_libpath=elf32_sparc
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
+ tdir_sparclinux=${tdir_elf32_sparc}aout
+ tdir_sun4=sparc-sun-sunos4 ;;
+sparc*-*-linux-*) targ_emul=elf32_sparc
+ targ_extra_emuls="sparclinux elf64_sparc sun4"
+ targ_extra_libpath=elf64_sparc
+ tdir_sparclinux=${targ_alias}aout
+ tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
+ tdir_sun4=sparc-sun-sunos4 ;;
+sparc64-*-netbsd* | sparc64-*-openbsd*)
+ targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc" ;;
+sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
+sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
+sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
+ targ_emul=elf32_sparc ;;
+sparc-*-solaris2*) targ_emul=elf32_sparc
+ targ_extra_emuls="elf64_sparc"
+ targ_extra_libpath=$targ_extra_emuls
+ tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` ;;
+sparcv9-*-solaris2* | sparc64-*-solaris2*)
+ targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc"
+ targ_extra_libpath=$targ_extra_emuls
+ tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` ;;
+sparc*-*-solaris2*) targ_emul=elf32_sparc ;;
+sparc*-wrs-vxworks*) targ_emul=sparcaout ;;
+sparc*-*-rtems*) targ_emul=elf32_sparc
+ ;;
+tic30-*-*aout*) targ_emul=tic30aout ;;
+tic30-*-*coff*) targ_emul=tic30coff ;;
+tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
+tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
+tic80-*-*) targ_emul=tic80coff
+ ;;
+v850-*-*) targ_emul=v850 ;;
+v850e-*-*) targ_emul=v850 ;;
+v850ea-*-*) targ_emul=v850
+ ;;
+vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
+vax-*-netbsdelf*) targ_emul=elf32vax
+ targ_extra_emuls=vaxnbsd ;;
+vax-*-netbsdaout* | vax-*-netbsd*)
+ targ_emul=vaxnbsd
+ targ_extra_emuls=elf32vax ;;
+vax-*-linux-*) targ_emul=elf32vax
+ ;;
+w65-*-*) targ_emul=w65
+ ;;
+xc16x-*-elf) targ_emul=elf32xc16x
+ targ_extra_emuls="elf32xc16xl elf32xc16xs"
+ ;;
+xstormy16-*-*) targ_emul=elf32xstormy16
+ ;;
+xtensa-*-*) targ_emul=elf32xtensa
+ ;;
+z80-*-coff) targ_emul=z80
+ ;;
+z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001
+ ;;
+*-*-ieee*) targ_emul=vanilla
+ ;;
+*-tandem-none) targ_emul=st2000
+ ;;
*)
echo 2>&1 "*** ld does not support target ${targ}"
echo 2>&1 "*** see ld/configure.tgt for supported targets"
diff --git a/contrib/binutils/ld/deffile.h b/contrib/binutils/ld/deffile.h
index f1e330169156..6db8bf79d035 100644
--- a/contrib/binutils/ld/deffile.h
+++ b/contrib/binutils/ld/deffile.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef DEFFILE_H
#define DEFFILE_H
@@ -36,7 +36,7 @@ typedef struct def_file_export {
char *internal_name; /* always set, may == name */
int ordinal; /* -1 if not specified */
int hint;
- char flag_private, flag_constant, flag_noname, flag_data;
+ char flag_private, flag_constant, flag_noname, flag_data, flag_forward;
} def_file_export;
typedef struct def_file_module {
diff --git a/contrib/binutils/ld/deffilep.y b/contrib/binutils/ld/deffilep.y
index 80cf5487f57e..5c699f394f89 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
+/* Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include <stdio.h>
#include "libiberty.h"
@@ -83,8 +83,7 @@ static void def_exports (const char *, const char *, int, int);
static void def_heapsize (int, int);
static void def_import (const char *, const char *, const char *, const char *,
int);
-static void def_library (const char *, int);
-static void def_name (const char *, int);
+static void def_image_name (const char *, int, int);
static void def_section (const char *, int);
static void def_section_alt (const char *, const char *);
static void def_stacksize (int, int);
@@ -122,8 +121,8 @@ start: start command
;
command:
- NAME opt_name opt_base { def_name ($2, $3); }
- | LIBRARY opt_name opt_base { def_library ($2, $3); }
+ NAME opt_name opt_base { def_image_name ($2, $3, 0); }
+ | LIBRARY opt_name opt_base { def_image_name ($2, $3, 1); }
| DESCRIPTION ID { def_description ($2);}
| STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
| HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}
@@ -647,23 +646,34 @@ def_file_add_directive (def_file *my_def, const char *param, int len)
/* Parser Callbacks. */
static void
-def_name (const char *name, int base)
+def_image_name (const char *name, int base, int is_dll)
{
- if (def->name)
- free (def->name);
- def->name = xstrdup (name);
- def->base_address = base;
- def->is_dll = 0;
-}
+ /* If a LIBRARY or NAME statement is specified without a name, there is nothing
+ to do here. We retain the output filename specified on command line. */
+ if (*name)
+ {
+ const char* image_name = lbasename (name);
+ if (image_name != name)
+ einfo ("%s:%d: Warning: path components stripped from %s, '%s'\n",
+ def_filename, linenumber, is_dll ? "LIBRARY" : "NAME",
+ name);
+ if (def->name)
+ free (def->name);
+ /* Append the default suffix, if none specified. */
+ if (strchr (image_name, '.') == 0)
+ {
+ const char * suffix = is_dll ? ".dll" : ".exe";
-static void
-def_library (const char *name, int base)
-{
- if (def->name)
- free (def->name);
- def->name = xstrdup (name);
+ def->name = xmalloc (strlen (image_name) + strlen (suffix) + 1);
+ sprintf (def->name, "%s%s", image_name, suffix);
+ }
+ else
+ def->name = xstrdup (image_name);
+ }
+
+ /* Honor a BASE address statement, even if LIBRARY string is empty. */
def->base_address = base;
- def->is_dll = 1;
+ def->is_dll = is_dll;
}
static void
diff --git a/contrib/binutils/ld/dep-in.sed b/contrib/binutils/ld/dep-in.sed
index 83418e2ae879..0bf6ffe39505 100644
--- a/contrib/binutils/ld/dep-in.sed
+++ b/contrib/binutils/ld/dep-in.sed
@@ -2,6 +2,7 @@
/\\$/N
/\\$/b loop
+s! \./! !g
s!@INCDIR@!$(INCDIR)!g
s!@TOPDIR@/include!$(INCDIR)!g
s!@BFDDIR@!$(BFDDIR)!g
diff --git a/contrib/binutils/ld/emulparams/armelf.sh b/contrib/binutils/ld/emulparams/armelf.sh
index 35a6d2325736..6dc50b271fa9 100644
--- a/contrib/binutils/ld/emulparams/armelf.sh
+++ b/contrib/binutils/ld/emulparams/armelf.sh
@@ -8,8 +8,15 @@ TEMPLATE_NAME=elf32
EXTRA_EM_FILE=armelf
OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
-OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
+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_READONLY_SECTIONS="
+ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
+ ${RELOCATING+ __exidx_start = .; }
+ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
+ ${RELOCATING+ __exidx_end = .; }"
DATA_START_SYMBOLS='__data_start = . ;';
diff --git a/contrib/binutils/ld/emulparams/armelf_fbsd.sh b/contrib/binutils/ld/emulparams/armelf_fbsd.sh
index 52da34557d16..ee9520dc4a90 100644
--- a/contrib/binutils/ld/emulparams/armelf_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/armelf_fbsd.sh
@@ -1,2 +1,3 @@
. ${srcdir}/emulparams/armelf.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+TARGET2_TYPE=got-rel
diff --git a/contrib/binutils/ld/emulparams/armelf_linux.sh b/contrib/binutils/ld/emulparams/armelf_linux.sh
index 88a2d19151d1..39b7f656409f 100644
--- a/contrib/binutils/ld/emulparams/armelf_linux.sh
+++ b/contrib/binutils/ld/emulparams/armelf_linux.sh
@@ -8,14 +8,17 @@ COMMONPAGESIZE=0x1000
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_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
+OTHER_END_SYMBOLS='__end__ = . ;'
OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
TEXT_START_ADDR=0x00008000
+TARGET2_TYPE=got-rel
# ARM does not support .s* sections.
NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/armelf_nbsd.sh b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
index 571483c69bfe..3d9483915356 100644
--- a/contrib/binutils/ld/emulparams/armelf_nbsd.sh
+++ b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
@@ -1,6 +1,7 @@
. ${srcdir}/emulparams/armelf.sh
MAXPAGESIZE=0x8000
TEXT_START_ADDR=0x00008000
+TARGET2_TYPE=got-rel
unset STACK_ADDR
unset EMBEDDED
diff --git a/contrib/binutils/ld/emulparams/armelf_oabi.sh b/contrib/binutils/ld/emulparams/armelf_oabi.sh
deleted file mode 100644
index 0c2c1d313c12..000000000000
--- a/contrib/binutils/ld/emulparams/armelf_oabi.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-MACHINE=
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearm-oabi"
-BIG_OUTPUT_FORMAT="elf32-bigarm-oabi"
-LITTLE_OUTPUT_FORMAT="elf32-littlearm-oabi"
-TEXT_START_ADDR=0x8000
-TEMPLATE_NAME=armelf_oabi
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
-OTHER_BSS_SYMBOLS='__bss_start__ = .;'
-OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
-
-
-ARCH=arm
-MACHINE=
-MAXPAGESIZE=256
-ENTRY=_start
-EMBEDDED=yes
-
-# This sets the stack to the top of the simulator memory (2^19 bytes).
-STACK_ADDR=0x80000
-
-# ARM does not support .s* sections.
-NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/armpe.sh b/contrib/binutils/ld/emulparams/armpe.sh
index aa605366e8c9..5db5faf3468d 100644
--- a/contrib/binutils/ld/emulparams/armpe.sh
+++ b/contrib/binutils/ld/emulparams/armpe.sh
@@ -11,3 +11,5 @@ TEMPLATE_NAME=pe
ENTRY="_mainCRTStartup"
SUBSYSTEM=PE_DEF_SUBSYSTEM
INITIAL_SYMBOL_CHAR=\"_\"
+
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/elf32bmip.sh b/contrib/binutils/ld/emulparams/elf32bmip.sh
index 94e1c9c9a242..614856573faa 100644
--- a/contrib/binutils/ld/emulparams/elf32bmip.sh
+++ b/contrib/binutils/ld/emulparams/elf32bmip.sh
@@ -11,12 +11,17 @@ MAXPAGESIZE=0x40000
COMMONPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
-test -n "${EMBEDDED}" || TEXT_DYNAMIC=
+TEXT_DYNAMIC=
INITIAL_READONLY_SECTIONS="
.reginfo ${RELOCATING-0} : { *(.reginfo) }
"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+# 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
+# of .got.
OTHER_GOT_SYMBOLS='
+ . = .;
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS="
@@ -29,9 +34,17 @@ OTHER_BSS_SYMBOLS='_fbss = .;'
OTHER_SECTIONS='
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+ .mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
+ .mdebug.abiN32 : { KEEP(*(.mdebug.abiN32)) }
+ .mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
+ .mdebug.abiO64 : { KEEP(*(.mdebug.abiO64)) }
+ .mdebug.eabi32 : { KEEP(*(.mdebug.eabi32)) }
+ .mdebug.eabi64 : { KEEP(*(.mdebug.eabi64)) }
+ .gcc_compiled_long32 : { KEEP(*(.gcc_compiled_long32)) }
+ .gcc_compiled_long64 : { KEEP(*(.gcc_compiled_long64)) }
'
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 f7b0d08f858f..b81ac49ec305 100644
--- a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
+++ b/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
@@ -30,13 +30,19 @@ fi
LIBPATH_SUFFIX=$ELFSIZE
GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
TEXT_START_ADDR=0x10000000
MAXPAGESIZE=0x100000
ENTRY=__start
# 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
+# inserting other sections between the assignment to _gp and the start
+# of .got.
OTHER_GOT_SYMBOLS='
+ . = .;
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS="
diff --git a/contrib/binutils/ld/emulparams/elf32btsmip.sh b/contrib/binutils/ld/emulparams/elf32btsmip.sh
index 4c5a9ab2735c..e29e045daa74 100644
--- a/contrib/binutils/ld/emulparams/elf32btsmip.sh
+++ b/contrib/binutils/ld/emulparams/elf32btsmip.sh
@@ -5,5 +5,6 @@
OUTPUT_FORMAT="elf32-tradbigmips"
BIG_OUTPUT_FORMAT="elf32-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
+unset DATA_ADDR
SHLIB_TEXT_START_ADDR=0
ENTRY=__start
diff --git a/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh
index d95cb7868563..587b8d3aca0a 100644
--- a/contrib/binutils/ld/emulparams/elf32ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppc.sh
@@ -1,41 +1,15 @@
# If you change this file, please also look at files which source this one:
# elf32lppc.sh elf32ppclinux.sh elf32ppcsim.sh
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=ppc32elf
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpc"
-TEXT_START_ADDR=0x01800000
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x1000
-ARCH=powerpc:common
-MACHINE=
+. ${srcdir}/emulparams/elf32ppccommon.sh
+# Yes, we want duplicate .got and .plt sections. The linker chooses the
+# appropriate one magically in ppc_after_open
+DATA_GOT=
+SDATA_GOT=
+SEPARATE_GOTPLT=0
BSS_PLT=
-EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
-OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS="
- .fixup ${RELOCATING-0} : { *(.fixup) }
- .got1 ${RELOCATING-0} : { *(.got1) }
- .got2 ${RELOCATING-0} : { *(.got2) }
-"
-OTHER_GOT_RELOC_SECTIONS="
- .rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
- .rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
-"
-
-# Treat a host that matches the target with the possible exception of "64"
-# in the name as if it were native.
-if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
- case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- NATIVE=yes
- ;;
- esac
-fi
-
-# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
-case "$EMULATION_NAME" in
- *64*) LIBPATH_SUFFIX=64 ;;
-esac
+GOT=".got ${RELOCATING-0} : SPECIAL { *(.got) }"
+PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }"
+GOTPLT="${PLT}"
+OTHER_TEXT_SECTIONS="*(.glink)"
+EXTRA_EM_FILE=ppc32elf
diff --git a/contrib/binutils/ld/emulparams/elf32ppccommon.sh b/contrib/binutils/ld/emulparams/elf32ppccommon.sh
new file mode 100644
index 000000000000..b5fbc8d8e898
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32ppccommon.sh
@@ -0,0 +1,49 @@
+# The PLT-agnostic parts of a generic 32-bit ELF PowerPC target. Included by:
+# elf32ppc.sh elf32ppcvxworks.sh
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-powerpc"
+TEXT_START_ADDR=0x01800000
+MAXPAGESIZE=0x10000
+COMMONPAGESIZE=0x1000
+ARCH=powerpc:common
+MACHINE=
+EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
+if test -z "${CREATE_SHLIB}"; then
+ SDATA_START_SYMBOLS="PROVIDE (_SDA_BASE_ = 32768);"
+ SDATA2_START_SYMBOLS="PROVIDE (_SDA2_BASE_ = 32768);"
+ SBSS_START_SYMBOLS="PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);"
+ SBSS_END_SYMBOLS="PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);"
+else
+ unset SDATA_START_SYMBOLS
+ unset SDATA2_START_SYMBOLS
+ unset SBSS_START_SYMBOLS
+ unset SBSS_END_SYMBOLS
+fi
+OTHER_END_SYMBOLS="__end = .;"
+OTHER_RELRO_SECTIONS="
+ .fixup ${RELOCATING-0} : { *(.fixup) }
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .got2 ${RELOCATING-0} : { *(.got2) }
+"
+OTHER_GOT_RELOC_SECTIONS="
+ .rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
+ .rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
+"
+
+# Treat a host that matches the target with the possible exception of "64"
+# in the name as if it were native.
+if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
+ case " $EMULATION_LIBPATH " in
+ *" ${EMULATION_NAME} "*)
+ NATIVE=yes
+ ;;
+ esac
+fi
+
+# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+case "$EMULATION_NAME" in
+ *64*) LIBPATH_SUFFIX=64 ;;
+esac
diff --git a/contrib/binutils/ld/emulparams/elf32ppclinux.sh b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
index 5ced00d1bec9..262731ab32e6 100644
--- a/contrib/binutils/ld/emulparams/elf32ppclinux.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
@@ -1,8 +1,8 @@
. ${srcdir}/emulparams/elf32ppc.sh
TEXT_START_ADDR=0x10000000
unset EXECUTABLE_SYMBOLS
-unset OTHER_BSS_END_SYMBOLS
+unset OTHER_END_SYMBOLS
test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }"
-OTHER_READWRITE_SECTIONS="
+OTHER_RELRO_SECTIONS="
.got1 ${RELOCATING-0} : { *(.got1) }
.got2 ${RELOCATING-0} : { *(.got2) }"
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64.sh b/contrib/binutils/ld/emulparams/elf64_ia64.sh
index 60c8c4c9ebf5..c5be56e8508f 100644
--- a/contrib/binutils/ld/emulparams/elf64_ia64.sh
+++ b/contrib/binutils/ld/emulparams/elf64_ia64.sh
@@ -33,3 +33,7 @@ test -n "$CREATE_PIE" && OTHER_GOT_RELOC_SECTIONS="
OTHER_READONLY_SECTIONS="${OTHER_READONLY_SECTIONS}
.IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info${RELOCATING+* .gnu.linkonce.ia64unwi.*}) }
.IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind${RELOCATING+* .gnu.linkonce.ia64unw.*}) }"
+# Intel C++ compiler, prior to 9.0, puts small data in .ctors and
+# .dtors. They have to be next to .sbss/.sbss2/.sdata/.sdata2.
+SMALL_DATA_CTOR=" "
+SMALL_DATA_DTOR=" "
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
index 47cde5c5db07..ab7e78f292a7 100644
--- a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
@@ -1,4 +1,6 @@
. ${srcdir}/emulparams/elf64_ia64.sh
TEXT_START_ADDR="0x2000000000000000"
unset DATA_ADDR
+unset SMALL_DATA_CTOR
+unset SMALL_DATA_DTOR
. ${srcdir}/emulparams/elf_fbsd.sh
diff --git a/contrib/binutils/ld/emulparams/elf64_s390.sh b/contrib/binutils/ld/emulparams/elf64_s390.sh
index 0c689a912f97..ea75d319838b 100644
--- a/contrib/binutils/ld/emulparams/elf64_s390.sh
+++ b/contrib/binutils/ld/emulparams/elf64_s390.sh
@@ -3,6 +3,7 @@ ELFSIZE=64
OUTPUT_FORMAT="elf64-s390"
TEXT_START_ADDR=0x80000000
MAXPAGESIZE=0x1000
+COMMONPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x80000000
ARCH="s390:64-bit"
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf64alpha.sh b/contrib/binutils/ld/emulparams/elf64alpha.sh
index 093c8dfd8e1b..47a0bb009c77 100644
--- a/contrib/binutils/ld/emulparams/elf64alpha.sh
+++ b/contrib/binutils/ld/emulparams/elf64alpha.sh
@@ -12,7 +12,13 @@ ARCH=alpha
MACHINE=
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
-DATA_PLT=
+
+# Yes, we want duplicate .plt sections. The linker chooses the
+# appropriate one magically in alpha_after_open.
+PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }"
+DATA_PLT=yes
+TEXT_PLT=yes
+
# Note that the number is always big-endian, thus we have to
# reverse the digit string.
NOP=0x0000fe2f1f04ff47 # unop; nop
diff --git a/contrib/binutils/ld/emulparams/elf64ppc.sh b/contrib/binutils/ld/emulparams/elf64ppc.sh
index c190b189f698..8285723fba01 100644
--- a/contrib/binutils/ld/emulparams/elf64ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf64ppc.sh
@@ -15,13 +15,13 @@ NOP=0x60000000
OTHER_TEXT_SECTIONS="*(.sfpr .glink)"
BSS_PLT=
OTHER_BSS_SYMBOLS="
- .tocbss ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.tocbss)}"
+ .tocbss ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.tocbss)}"
OTHER_PLT_RELOC_SECTIONS="
.rela.tocbss ${RELOCATING-0} : { *(.rela.tocbss) }"
if test x${RELOCATING+set} = xset; then
GOT="
- .got ALIGN(8) : { *(.got .toc) }"
+ .got : ALIGN(8) { *(.got .toc) }"
else
GOT="
.got 0 : { *(.got) }
@@ -30,8 +30,8 @@ fi
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)) }"
+ .toc1 ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) }
+ .opd ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }"
# 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 2382286b9afa..af7010b6836e 100644
--- a/contrib/binutils/ld/emulparams/elf_i386.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386.sh
@@ -11,3 +11,4 @@ TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
+SEPARATE_GOTPLT=12
diff --git a/contrib/binutils/ld/emulparams/elf_s390.sh b/contrib/binutils/ld/emulparams/elf_s390.sh
index e71067311143..8d057dc3df14 100644
--- a/contrib/binutils/ld/emulparams/elf_s390.sh
+++ b/contrib/binutils/ld/emulparams/elf_s390.sh
@@ -2,6 +2,7 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-s390"
TEXT_START_ADDR=0x00400000
MAXPAGESIZE=0x1000
+COMMONPAGESIZE=0x1000
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 6d3705828b2e..35240df04cf9 100644
--- a/contrib/binutils/ld/emulparams/elf_x86_64.sh
+++ b/contrib/binutils/ld/emulparams/elf_x86_64.sh
@@ -12,6 +12,8 @@ TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
+LARGE_SECTIONS=yes
+SEPARATE_GOTPLT=24
if [ "x${host}" = "x${target}" ]; then
case " $EMULATION_LIBPATH " in
diff --git a/contrib/binutils/ld/emulparams/i386freebsd.sh b/contrib/binutils/ld/emulparams/i386freebsd.sh
deleted file mode 100644
index 0d5e9ff9bd4d..000000000000
--- a/contrib/binutils/ld/emulparams/i386freebsd.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-SCRIPT_NAME=aout
-TEXT_START_ADDR=0x1020
-OUTPUT_FORMAT="a.out-i386-freebsd"
-TARGET_PAGE_SIZE=0x1000
-ARCH=i386
-EXECUTABLE_SYMBOLS='__DYNAMIC = 0;'
diff --git a/contrib/binutils/ld/emulparams/i386pe.sh b/contrib/binutils/ld/emulparams/i386pe.sh
index a8add23d6d1d..879379f9c5df 100644
--- a/contrib/binutils/ld/emulparams/i386pe.sh
+++ b/contrib/binutils/ld/emulparams/i386pe.sh
@@ -6,3 +6,4 @@ TEMPLATE_NAME=pe
ENTRY="_mainCRTStartup"
SUBSYSTEM=PE_DEF_SUBSYSTEM
INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/i386pe_posix.sh b/contrib/binutils/ld/emulparams/i386pe_posix.sh
index 37f51b5eeeaa..afa00de0cdf2 100644
--- a/contrib/binutils/ld/emulparams/i386pe_posix.sh
+++ b/contrib/binutils/ld/emulparams/i386pe_posix.sh
@@ -7,3 +7,4 @@ ENTRY="___PosixProcessStartup"
SUBSYSTEM=7
EXECUTABLE_NAME=a.out
INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/mipsidt.sh b/contrib/binutils/ld/emulparams/mipsidt.sh
index 63176f5fdeae..f381267679e0 100644
--- a/contrib/binutils/ld/emulparams/mipsidt.sh
+++ b/contrib/binutils/ld/emulparams/mipsidt.sh
@@ -7,5 +7,6 @@ ARCH=mips
ENTRY=start
TEXT_START_ADDR=0xa0012000
DATA_ADDR=.
-TEMPLATE_NAME=mipsecoff
+TEMPLATE_NAME=generic
+EXTRA_EM_FILE=mipsecoff
EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/mipsidtl.sh b/contrib/binutils/ld/emulparams/mipsidtl.sh
index 02279ded6359..52447ff09fda 100644
--- a/contrib/binutils/ld/emulparams/mipsidtl.sh
+++ b/contrib/binutils/ld/emulparams/mipsidtl.sh
@@ -7,5 +7,6 @@ ARCH=mips
ENTRY=start
TEXT_START_ADDR=0xa0012000
DATA_ADDR=.
-TEMPLATE_NAME=mipsecoff
+TEMPLATE_NAME=generic
+EXTRA_EM_FILE=mipsecoff
EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/mipspe.sh b/contrib/binutils/ld/emulparams/mipspe.sh
index 9dd9ce761efb..a5cfc2ef60e4 100644
--- a/contrib/binutils/ld/emulparams/mipspe.sh
+++ b/contrib/binutils/ld/emulparams/mipspe.sh
@@ -7,3 +7,4 @@ TEMPLATE_NAME=pe
SUBSYSTEM=PE_DEF_SUBSYSTEM
INITIAL_SYMBOL_CHAR=\"_\"
ENTRY="_mainCRTStartup"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/ppcpe.sh b/contrib/binutils/ld/emulparams/ppcpe.sh
index a2d09ef2238b..2e1e10207c88 100644
--- a/contrib/binutils/ld/emulparams/ppcpe.sh
+++ b/contrib/binutils/ld/emulparams/ppcpe.sh
@@ -5,3 +5,4 @@ TEMPLATE_NAME=pe
ENTRY="_mainCRTStartup"
SUBSYSTEM=PE_DEF_SUBSYSTEM
INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emultempl/alphaelf.em b/contrib/binutils/ld/emultempl/alphaelf.em
index 7e643231f413..62eca180769a 100644
--- a/contrib/binutils/ld/emultempl/alphaelf.em
+++ b/contrib/binutils/ld/emultempl/alphaelf.em
@@ -1,5 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
#
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em, and defines extra alpha
@@ -27,25 +27,76 @@ cat >>e${EMULATION_NAME}.c <<EOF
#include "elf/alpha.h"
#include "elf-bfd.h"
-static int elf64alpha_32bit = 0;
+static bfd_boolean limit_32bit;
+static bfd_boolean disable_relaxation;
+
+extern bfd_boolean elf64_alpha_use_secureplt;
+extern const bfd_target bfd_elf64_alpha_vec;
+extern const bfd_target bfd_elf64_alpha_freebsd_vec;
+
/* Set the start address as in the Tru64 ld. */
#define ALPHA_TEXT_START_32BIT 0x12000000
static void
+alpha_after_open (void)
+{
+ if (link_info.hash->creator == &bfd_elf64_alpha_vec
+ || link_info.hash->creator == &bfd_elf64_alpha_freebsd_vec)
+ {
+ unsigned int num_plt;
+ lang_output_section_statement_type *os;
+ lang_output_section_statement_type *plt_os[2];
+
+ num_plt = 0;
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ {
+ if (os->constraint == SPECIAL && strcmp (os->name, ".plt") == 0)
+ {
+ if (num_plt < 2)
+ plt_os[num_plt] = os;
+ ++num_plt;
+ }
+ }
+
+ if (num_plt == 2)
+ {
+ plt_os[0]->constraint = elf64_alpha_use_secureplt ? 0 : -1;
+ plt_os[1]->constraint = elf64_alpha_use_secureplt ? -1 : 0;
+ }
+ }
+
+ gld${EMULATION_NAME}_after_open ();
+}
+
+static void
alpha_after_parse (void)
{
- if (elf64alpha_32bit && !link_info.shared && !link_info.relocatable)
+ if (limit_32bit && !link_info.shared && !link_info.relocatable)
lang_section_start (".interp",
exp_binop ('+',
exp_intop (ALPHA_TEXT_START_32BIT),
- exp_nameop (SIZEOF_HEADERS, NULL)));
+ exp_nameop (SIZEOF_HEADERS, NULL)),
+ NULL);
+}
+
+static void
+alpha_before_allocation (void)
+{
+ /* Call main function; we're just extending it. */
+ gld${EMULATION_NAME}_before_allocation ();
+
+ /* Add -relax if -O, not -r, and not explicitly disabled. */
+ if (link_info.optimize && !link_info.relocatable && !disable_relaxation)
+ command_line.relax = TRUE;
}
static void
alpha_finish (void)
{
- if (elf64alpha_32bit)
+ if (limit_32bit)
elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT;
gld${EMULATION_NAME}_finish ();
@@ -56,25 +107,47 @@ EOF
# parse_args and list_options functions.
#
PARSE_AND_LIST_PROLOGUE='
-#define OPTION_TASO 300
+#define OPTION_TASO 300
+#define OPTION_NO_RELAX (OPTION_TASO + 1)
+#define OPTION_SECUREPLT (OPTION_NO_RELAX + 1)
+#define OPTION_NO_SECUREPLT (OPTION_SECUREPLT + 1)
'
PARSE_AND_LIST_LONGOPTS='
- {"taso", no_argument, NULL, OPTION_TASO},
+ { "taso", no_argument, NULL, OPTION_TASO },
+ { "no-relax", no_argument, NULL, OPTION_NO_RELAX },
+ { "secureplt", no_argument, NULL, OPTION_SECUREPLT },
+ { "no-secureplt", no_argument, NULL, OPTION_NO_SECUREPLT },
'
PARSE_AND_LIST_OPTIONS='
- fprintf (file, _(" -taso\t\t\tLoad executable in the lower 31-bit addressable\n"));
- fprintf (file, _("\t\t\t virtual address range\n"));
+ fprintf (file, _("\
+ --taso Load executable in the lower 31-bit addressable\n\
+ virtual address range.\n\
+ --no-relax Do not relax call and gp sequences.\n\
+ --secureplt Force PLT in text segment.\n\
+ --no-secureplt Force PLT in data segment.\n\
+"));
'
PARSE_AND_LIST_ARGS_CASES='
case OPTION_TASO:
- elf64alpha_32bit = 1;
+ limit_32bit = 1;
+ break;
+ case OPTION_NO_RELAX:
+ disable_relaxation = TRUE;
+ break;
+ case OPTION_SECUREPLT:
+ elf64_alpha_use_secureplt = TRUE;
+ break;
+ case OPTION_NO_SECUREPLT:
+ elf64_alpha_use_secureplt = FALSE;
break;
'
# Put these extra alpha routines in ld_${EMULATION_NAME}_emulation
#
+LDEMUL_AFTER_OPEN=alpha_after_open
LDEMUL_AFTER_PARSE=alpha_after_parse
+LDEMUL_BEFORE_ALLOCATION=alpha_before_allocation
LDEMUL_FINISH=alpha_finish
diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em
index 468c3b08beb7..d5fd67d8ce2e 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 Free Software Foundation, Inc.
+ 2004, 2005 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -22,7 +22,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_${EMULATION_NAME}
@@ -125,6 +125,8 @@ gld${EMULATION_NAME}_before_allocation (void)
/* We have seen it all. Allocate it, and carry on */
bfd_arm_allocate_interworking_sections (& link_info);
+
+ before_allocation_default ();
}
static void
@@ -191,6 +193,8 @@ gld${EMULATION_NAME}_finish (void)
}
else
einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
+
+ finish_default ();
}
static char *
diff --git a/contrib/binutils/ld/emultempl/armelf.em b/contrib/binutils/ld/emultempl/armelf.em
index 0c051ad62b89..bd74ab5705bf 100644
--- a/contrib/binutils/ld/emultempl/armelf.em
+++ b/contrib/binutils/ld/emultempl/armelf.em
@@ -1,5 +1,6 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
+# Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+# 2004, 2005
# Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
@@ -16,17 +17,24 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em, and defines extra arm-elf
# specific routines.
#
+test -z "$TARGET2_TYPE" && TARGET2_TYPE="rel"
cat >>e${EMULATION_NAME}.c <<EOF
-static int no_pipeline_knowledge = 0;
+#include "elf/arm.h"
+
static char *thumb_entry_symbol = NULL;
static bfd *bfd_for_interwork;
+static int byteswap_code = 0;
+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 void
gld${EMULATION_NAME}_before_parse (void)
@@ -65,20 +73,27 @@ arm_elf_after_open (void)
static void
arm_elf_set_bfd_for_interworking (lang_statement_union_type *statement)
{
- if (statement->header.type == lang_input_section_enum
- && !statement->input_section.ifile->just_syms_flag)
+ if (statement->header.type == lang_input_section_enum)
{
asection *i = statement->input_section.section;
- asection *output_section = i->output_section;
-
- ASSERT (output_section->owner == output_bfd);
- if ((output_section->flags & SEC_HAS_CONTENTS) != 0
- && (i->flags & SEC_NEVER_LOAD) == 0
- && ! i->owner->output_has_begun)
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0)
{
- bfd_for_interwork = i->owner;
- bfd_for_interwork->output_has_begun = TRUE;
+ asection *output_section = i->output_section;
+
+ ASSERT (output_section->owner == output_bfd);
+
+ /* Don't attach the interworking stubs to a dynamic object, to
+ an empty section, etc. */
+ if ((output_section->flags & SEC_HAS_CONTENTS) != 0
+ && (i->flags & SEC_NEVER_LOAD) == 0
+ && ! (i->owner->flags & DYNAMIC)
+ && ! i->owner->output_has_begun)
+ {
+ bfd_for_interwork = i->owner;
+ bfd_for_interwork->output_has_begun = TRUE;
+ }
}
}
}
@@ -117,7 +132,7 @@ arm_elf_before_allocation (void)
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, & link_info,
- no_pipeline_knowledge))
+ byteswap_code))
{
/* xgettext:c-format */
einfo (_("Errors encountered processing file %s"), is->filename);
@@ -137,11 +152,25 @@ arm_elf_finish (void)
/* Call the elf32.em routine. */
gld${EMULATION_NAME}_finish ();
- if (thumb_entry_symbol == NULL)
- return;
+ if (thumb_entry_symbol)
+ {
+ h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
+ FALSE, FALSE, TRUE);
+ }
+ else
+ {
+ struct elf_link_hash_entry * eh;
+
+ if (!entry_symbol.name)
+ return;
+
+ h = bfd_link_hash_lookup (link_info.hash, entry_symbol.name,
+ FALSE, FALSE, TRUE);
+ eh = (struct elf_link_hash_entry *)h;
+ if (!h || ELF_ST_TYPE(eh->type) != STT_ARM_TFUNC)
+ 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
@@ -167,7 +196,8 @@ arm_elf_finish (void)
sprintf_vma (buffer + 2, val);
- if (entry_symbol.name != NULL && entry_from_cmdline)
+ if (thumb_entry_symbol != NULL && 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;
@@ -177,6 +207,15 @@ arm_elf_finish (void)
thumb_entry_symbol);
}
+/* This is a convenitent 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);
+}
+
EOF
# Define some shell vars to insert bits of code into the standard elf
@@ -184,6 +223,12 @@ EOF
#
PARSE_AND_LIST_PROLOGUE='
#define OPTION_THUMB_ENTRY 301
+#define OPTION_BE8 302
+#define OPTION_TARGET1_REL 303
+#define OPTION_TARGET1_ABS 304
+#define OPTION_TARGET2 305
+#define OPTION_FIX_V4BX 306
+#define OPTION_USE_BLX 307
'
PARSE_AND_LIST_SHORTOPTS=p
@@ -191,27 +236,63 @@ PARSE_AND_LIST_SHORTOPTS=p
PARSE_AND_LIST_LONGOPTS='
{ "no-pipeline-knowledge", no_argument, NULL, '\'p\''},
{ "thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY},
+ { "be8", no_argument, NULL, OPTION_BE8},
+ { "target1-rel", no_argument, NULL, OPTION_TARGET1_REL},
+ { "target1-abs", no_argument, NULL, OPTION_TARGET1_ABS},
+ { "target2", required_argument, NULL, OPTION_TARGET2},
+ { "fix-v4bx", no_argument, NULL, OPTION_FIX_V4BX},
+ { "use-blx", no_argument, NULL, OPTION_USE_BLX},
'
PARSE_AND_LIST_OPTIONS='
- fprintf (file, _(" -p --no-pipeline-knowledge Stop the linker knowing about the pipeline length\n"));
fprintf (file, _(" --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"));
+ fprintf (file, _(" --be8 Oputput BE8 format image\n"));
+ fprintf (file, _(" --target1=rel Interpret R_ARM_TARGET1 as R_ARM_REL32\n"));
+ fprintf (file, _(" --target1=abs Interpret R_ARM_TARGET1 as R_ARM_ABS32\n"));
+ 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"));
'
PARSE_AND_LIST_ARGS_CASES='
case '\'p\'':
- no_pipeline_knowledge = 1;
+ /* Only here for backwards compatibility. */
break;
case OPTION_THUMB_ENTRY:
thumb_entry_symbol = optarg;
break;
+
+ case OPTION_BE8:
+ byteswap_code = 1;
+ break;
+
+ case OPTION_TARGET1_REL:
+ target1_is_rel = 1;
+ break;
+
+ case OPTION_TARGET1_ABS:
+ target1_is_rel = 0;
+ break;
+
+ case OPTION_TARGET2:
+ target2_type = optarg;
+ break;
+
+ case OPTION_FIX_V4BX:
+ fix_v4bx = 1;
+ break;
+
+ case OPTION_USE_BLX:
+ use_blx = 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_CREATE_OUTPUT_SECTION_STATEMENTS=arm_elf_create_output_section_statements
# Replace the elf before_parse function with our own.
LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
diff --git a/contrib/binutils/ld/emultempl/armelf_oabi.em b/contrib/binutils/ld/emultempl/armelf_oabi.em
deleted file mode 100644
index d75c65863308..000000000000
--- a/contrib/binutils/ld/emultempl/armelf_oabi.em
+++ /dev/null
@@ -1,176 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
-cat >e${EMULATION_NAME}.c <<EOF
-/* This file is is generated by a shell script. DO NOT EDIT! */
-
-/* emulate the original gld for the given ${EMULATION_NAME}
- Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
- Written by Steve Chamberlain steve@cygnus.com
-
-This file is part of GLD, the Gnu Linker.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#define bfd_elf32_arm_allocate_interworking_sections \
- bfd_elf32_arm_oabi_allocate_interworking_sections
-#define bfd_elf32_arm_get_bfd_for_interworking \
- bfd_elf32_arm_oabi_get_bfd_for_interworking
-#define bfd_elf32_arm_process_before_allocation \
- bfd_elf32_arm_oabi_process_before_allocation
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-#include "getopt.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-
-static void
-gld${EMULATION_NAME}_before_parse (void)
-{
-#ifndef TARGET_ /* I.e., if not generic. */
- ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown);
-#endif /* not TARGET_ */
-}
-
-/* This is called after the sections have been attached to output
- sections, but before any sizes or addresses have been set. */
-
-static void
-gld${EMULATION_NAME}_before_allocation (void)
-{
- /* we should be able to set the size of the interworking stub section */
-
- /* Here we rummage through the found bfds to collect glue information */
- /* FIXME: should this be based on a command line option? krk@cygnus.com */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info, 0))
- {
- /* xgettext:c-format */
- einfo (_("Errors encountered processing file %s"), is->filename);
- }
- }
- }
-
- /* We have seen it all. Allocate it, and carry on */
- bfd_elf32_arm_allocate_interworking_sections (& link_info);
-}
-
-static void
-gld${EMULATION_NAME}_after_open (void)
-{
-
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- /* The interworking bfd must be the last one to be processed */
- if (!is->next)
- bfd_elf32_arm_get_bfd_for_interworking (is->the_bfd, & link_info);
- }
-}
-
-static char *
-gld${EMULATION_NAME}_get_script (int *isfile)
-EOF
-
-if test -n "$COMPILE_IN"
-then
-# Scripts compiled in.
-
-# sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 0;
-
- if (link_info.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
-
-else
-# Scripts read from the filesystem.
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 1;
-
- if (link_info.relocatable && config.build_constructors)
- return "ldscripts/${EMULATION_NAME}.xu";
- else if (link_info.relocatable)
- return "ldscripts/${EMULATION_NAME}.xr";
- else if (!config.text_read_only)
- return "ldscripts/${EMULATION_NAME}.xbn";
- else if (!config.magic_demand_paged)
- return "ldscripts/${EMULATION_NAME}.xn";
- else
- return "ldscripts/${EMULATION_NAME}.x";
-}
-EOF
-
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
-{
- gld${EMULATION_NAME}_before_parse,
- syslib_default,
- hll_default,
- after_parse_default,
- gld${EMULATION_NAME}_after_open,
- after_allocation_default,
- set_output_arch_default,
- ldemul_default_target,
- gld${EMULATION_NAME}_before_allocation,
- gld${EMULATION_NAME}_get_script,
- "${EMULATION_NAME}",
- "${OUTPUT_FORMAT}",
- NULL, /* finish */
- NULL, /* create output section statements */
- NULL, /* open dynamic archive */
- NULL, /* place orphan */
- NULL, /* set symbols */
- NULL, /* parse args */
- NULL, /* add_options */
- NULL, /* handle_option */
- NULL, /* unrecognized file */
- NULL, /* list options */
- NULL, /* recognized file */
- NULL, /* find_potential_libraries */
- NULL /* new_vers_pattern */
-};
-EOF
diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em
index b970e5679e0a..192597960539 100644
--- a/contrib/binutils/ld/emultempl/elf32.em
+++ b/contrib/binutils/ld/emultempl/elf32.em
@@ -1,6 +1,3 @@
-# $FreeBSD$
-
-
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
# This file is now misnamed, because it supports both 32 bit and 64 bit
@@ -16,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 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
ELF support by Ian Lance Taylor <ian@cygnus.com>
@@ -34,10 +31,11 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 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 "libiberty.h"
@@ -55,17 +53,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldemul.h"
#include <ldgram.h>
#include "elf/common.h"
+#include "elf-bfd.h"
/* Declare functions used by various EXTRA_EM_FILEs. */
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
- (lang_input_statement_type *file, asection *s);
-static void gld${EMULATION_NAME}_finish (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;
EOF
+if [ "x${USE_LIBPATH}" = xyes ] ; then
+ case ${target} in
+ *-*-linux-* | *-*-k*bsd*-*)
+ cat >>e${EMULATION_NAME}.c <<EOF
+#ifdef HAVE_GLOB
+#include <glob.h>
+#endif
+EOF
+ ;;
+ esac
+fi
+
# Import any needed special functions and/or overrides.
#
if test -n "$EXTRA_EM_FILE" ; then
@@ -99,14 +110,30 @@ cat >>e${EMULATION_NAME}.c <<EOF
static bfd_boolean
gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *entry)
{
- if (!entry->as_needed
- || (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0)
- return FALSE;
+ int class = 0;
/* Tell the ELF linker that we don't want the output file to have a
DT_NEEDED entry for this file, unless it is used to resolve
references in a regular object. */
- bfd_elf_set_dyn_lib_class (entry->the_bfd, DYN_AS_NEEDED);
+ if (entry->as_needed)
+ class = DYN_AS_NEEDED;
+
+ /* Tell the ELF linker that we don't want the output file to have a
+ DT_NEEDED entry for any dynamic library in DT_NEEDED tags from
+ this file at all. */
+ if (!entry->add_needed)
+ class |= DYN_NO_ADD_NEEDED;
+
+ if (entry->just_syms_flag
+ && (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0)
+ einfo (_("%P%F: --just-symbols may not be used on DSO: %B\n"),
+ entry->the_bfd);
+
+ if (!class
+ || (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) == 0)
+ return FALSE;
+
+ bfd_elf_set_dyn_lib_class (entry->the_bfd, class);
/* Continue on with normal load_symbols processing. */
return FALSE;
@@ -121,7 +148,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
static struct bfd_link_needed_list *global_needed;
static struct stat global_stat;
-static bfd_boolean global_found;
+static lang_input_statement_type *global_found;
static struct bfd_link_needed_list *global_vercheck_needed;
static bfd_boolean global_vercheck_failed;
@@ -202,21 +229,34 @@ gld${EMULATION_NAME}_stat_needed (lang_input_statement_type *s)
const char *suffix;
const char *soname;
- if (global_found)
+ if (global_found != NULL)
return;
if (s->the_bfd == NULL)
return;
+ /* If this input file was an as-needed entry, and wasn't found to be
+ needed at the stage it was linked, then don't say we have loaded it. */
+ if ((bfd_elf_get_dyn_lib_class (s->the_bfd) & DYN_AS_NEEDED) != 0)
+ return;
+
if (bfd_stat (s->the_bfd, &st) != 0)
{
einfo ("%P:%B: bfd_stat failed: %E\n", s->the_bfd);
return;
}
+ /* Some operating systems, e.g. Windows, do not provide a meaningful
+ st_ino; they always set it to zero. (Windows does provide a
+ meaningful st_dev.) Do not indicate a duplicate library in that
+ case. While there is no guarantee that a system that provides
+ meaningful inode numbers will never set st_ino to zero, this is
+ merely an optimization, so we do not need to worry about false
+ negatives. */
if (st.st_dev == global_stat.st_dev
- && st.st_ino == global_stat.st_ino)
+ && st.st_ino == global_stat.st_ino
+ && st.st_ino != 0)
{
- global_found = TRUE;
+ global_found = s;
return;
}
@@ -245,16 +285,24 @@ gld${EMULATION_NAME}_stat_needed (lang_input_statement_type *s)
global_needed->name, global_needed->by, soname);
}
+struct dt_needed
+{
+ bfd *by;
+ const char *name;
+};
/* This function is called for each possible name for a dynamic object
named by a DT_NEEDED entry. The FORCE parameter indicates whether
to skip the check for a conflicting version. */
static bfd_boolean
-gld${EMULATION_NAME}_try_needed (const char *name, int force)
+gld${EMULATION_NAME}_try_needed (struct dt_needed *needed,
+ int force)
{
bfd *abfd;
+ const char *name = needed->name;
const char *soname;
+ int class;
abfd = bfd_openr (name, bfd_get_target (output_bfd));
if (abfd == NULL)
@@ -311,7 +359,7 @@ gld${EMULATION_NAME}_try_needed (const char *name, int force)
EOF
case ${target} in
- *-*-linux-gnu*)
+ *-*-linux-* | *-*-k*bsd*-*)
cat >>e${EMULATION_NAME}.c <<EOF
{
struct bfd_link_needed_list *l;
@@ -352,9 +400,9 @@ cat >>e${EMULATION_NAME}.c <<EOF
if (trace_file_tries)
info_msg (_("found %s at %s\n"), soname, name);
- global_found = FALSE;
+ global_found = NULL;
lang_for_each_input_file (gld${EMULATION_NAME}_stat_needed);
- if (global_found)
+ if (global_found != NULL)
{
/* Return TRUE to indicate that we found the file, even though
we aren't going to do anything with it. */
@@ -367,7 +415,16 @@ cat >>e${EMULATION_NAME}.c <<EOF
/* Tell the ELF linker that we don't want the output file to have a
DT_NEEDED entry for this file, unless it is used to resolve
references in a regular object. */
- bfd_elf_set_dyn_lib_class (abfd, DYN_DT_NEEDED);
+ class = DYN_DT_NEEDED;
+
+ /* Tell the ELF linker that we don't want the output file to have a
+ DT_NEEDED entry for this file at all if the entry is from a file
+ with DYN_NO_ADD_NEEDED. */
+ if (needed->by != NULL
+ && (bfd_elf_get_dyn_lib_class (needed->by) & DYN_NO_ADD_NEEDED) != 0)
+ class |= DYN_NO_NEEDED | DYN_NO_ADD_NEEDED;
+
+ bfd_elf_set_dyn_lib_class (abfd, class);
/* Add this file into the symbol table. */
if (! bfd_link_add_symbols (abfd, &link_info))
@@ -380,16 +437,23 @@ cat >>e${EMULATION_NAME}.c <<EOF
/* Search for a needed file in a path. */
static bfd_boolean
-gld${EMULATION_NAME}_search_needed (const char *path, const char *name, int force)
+gld${EMULATION_NAME}_search_needed (const char *path,
+ struct dt_needed *n, int force)
{
const char *s;
+ const char *name = n->name;
size_t len;
+ struct dt_needed needed;
if (name[0] == '/')
- return gld${EMULATION_NAME}_try_needed (name, force);
+ return gld${EMULATION_NAME}_try_needed (n, force);
if (path == NULL || *path == '\0')
return FALSE;
+
+ needed.by = n->by;
+ needed.name = n->name;
+
len = strlen (name);
while (1)
{
@@ -410,7 +474,8 @@ gld${EMULATION_NAME}_search_needed (const char *path, const char *name, int forc
}
strcpy (sset, name);
- if (gld${EMULATION_NAME}_try_needed (filename, force))
+ needed.name = filename;
+ if (gld${EMULATION_NAME}_try_needed (&needed, force))
return TRUE;
free (filename);
@@ -466,20 +531,23 @@ gld${EMULATION_NAME}_add_sysroot (const char *path)
EOF
case ${target} in
- *-*-freebsd*)
+ *-*-freebsd* | *-*-dragonfly*)
cat >>e${EMULATION_NAME}.c <<EOF
-/*
- * Read the system search path the FreeBSD way rather than like Linux.
- */
+/* Read the system search path the FreeBSD way rather than the Linux way. */
+#ifdef HAVE_ELF_HINTS_H
#include <elf-hints.h>
+#else
+#include "elf-hints-local.h"
+#endif
static bfd_boolean
gld${EMULATION_NAME}_check_ld_elf_hints (const char *name, int force)
{
static bfd_boolean initialized;
static char *ld_elf_hints;
+ struct dt_needed needed;
- if (! initialized)
+ if (!initialized)
{
FILE *f;
char *tmppath;
@@ -491,26 +559,20 @@ gld${EMULATION_NAME}_check_ld_elf_hints (const char *name, int force)
{
struct elfhints_hdr hdr;
- if (fread(&hdr, 1, sizeof(hdr), f) == sizeof(hdr) &&
- hdr.magic == ELFHINTS_MAGIC &&
- hdr.version == 1)
+ if (fread (&hdr, 1, sizeof (hdr), f) == sizeof (hdr)
+ && hdr.magic == ELFHINTS_MAGIC
+ && hdr.version == 1)
{
- if (fseek(f, hdr.strtab + hdr.dirlist, SEEK_SET) != -1)
+ if (fseek (f, hdr.strtab + hdr.dirlist, SEEK_SET) != -1)
{
char *b;
- b = (char *) xmalloc (hdr.dirlistlen + 1);
- if (fread(b, 1, hdr.dirlistlen + 1, f) !=
+ b = xmalloc (hdr.dirlistlen + 1);
+ if (fread (b, 1, hdr.dirlistlen + 1, f) ==
hdr.dirlistlen + 1)
- {
- free(b);
- b = NULL;
- }
- else
- {
- ld_elf_hints = gld${EMULATION_NAME}_add_sysroot (b);
- free (b);
- }
+ ld_elf_hints = gld${EMULATION_NAME}_add_sysroot (b);
+
+ free (b);
}
}
fclose (f);
@@ -522,98 +584,219 @@ gld${EMULATION_NAME}_check_ld_elf_hints (const char *name, int force)
if (ld_elf_hints == NULL)
return FALSE;
- return gld${EMULATION_NAME}_search_needed (ld_elf_hints, name, force);
+ needed.by = NULL;
+ needed.name = name;
+ return gld${EMULATION_NAME}_search_needed (ld_elf_hints, & needed,
+ force);
}
EOF
# FreeBSD
;;
- *-*-linux-gnu*)
+ *-*-linux-* | *-*-k*bsd*-*)
cat >>e${EMULATION_NAME}.c <<EOF
/* For a native linker, check the file /etc/ld.so.conf for directories
in which we may find shared libraries. /etc/ld.so.conf is really
only meaningful on Linux. */
+struct gld${EMULATION_NAME}_ld_so_conf
+{
+ char *path;
+ size_t len, alloc;
+};
+
static bfd_boolean
-gld${EMULATION_NAME}_check_ld_so_conf (const char *name, int force)
+gld${EMULATION_NAME}_parse_ld_so_conf
+ (struct gld${EMULATION_NAME}_ld_so_conf *info, const char *filename);
+
+static void
+gld${EMULATION_NAME}_parse_ld_so_conf_include
+ (struct gld${EMULATION_NAME}_ld_so_conf *info, const char *filename,
+ const char *pattern)
{
- static bfd_boolean initialized;
- static char *ld_so_conf;
+ char *newp = NULL;
+#ifdef HAVE_GLOB
+ glob_t gl;
+#endif
- if (! initialized)
+ if (pattern[0] != '/')
{
- FILE *f;
- char *tmppath;
+ char *p = strrchr (filename, '/');
+ size_t patlen = strlen (pattern) + 1;
- tmppath = concat (ld_sysroot, "/etc/ld.so.conf", NULL);
- f = fopen (tmppath, FOPEN_RT);
- free (tmppath);
- if (f != NULL)
+ newp = xmalloc (p - filename + 1 + patlen);
+ memcpy (newp, filename, p - filename + 1);
+ memcpy (newp + (p - filename + 1), pattern, patlen);
+ pattern = newp;
+ }
+
+#ifdef HAVE_GLOB
+ if (glob (pattern, 0, NULL, &gl) == 0)
+ {
+ size_t i;
+
+ for (i = 0; i < gl.gl_pathc; ++i)
+ gld${EMULATION_NAME}_parse_ld_so_conf (info, gl.gl_pathv[i]);
+ globfree (&gl);
+ }
+#else
+ /* If we do not have glob, treat the pattern as a literal filename. */
+ gld${EMULATION_NAME}_parse_ld_so_conf (info, pattern);
+#endif
+
+ if (newp)
+ free (newp);
+}
+
+static bfd_boolean
+gld${EMULATION_NAME}_parse_ld_so_conf
+ (struct gld${EMULATION_NAME}_ld_so_conf *info, const char *filename)
+{
+ FILE *f = fopen (filename, FOPEN_RT);
+ char *line;
+ size_t linelen;
+
+ if (f == NULL)
+ return FALSE;
+
+ linelen = 256;
+ line = xmalloc (linelen);
+ do
+ {
+ char *p = line, *q;
+
+ /* Normally this would use getline(3), but we need to be portable. */
+ while ((q = fgets (p, linelen - (p - line), f)) != NULL
+ && strlen (q) == linelen - (p - line) - 1
+ && line[linelen - 2] != '\n')
{
- char *b;
- size_t len, alloc;
- int c;
+ line = xrealloc (line, 2 * linelen);
+ p = line + linelen - 1;
+ linelen += linelen;
+ }
- len = 0;
- alloc = 100;
- b = (char *) xmalloc (alloc);
+ if (q == NULL && p == line)
+ break;
+
+ p = strchr (line, '\n');
+ if (p)
+ *p = '\0';
+
+ /* Because the file format does not know any form of quoting we
+ can search forward for the next '#' character and if found
+ make it terminating the line. */
+ p = strchr (line, '#');
+ if (p)
+ *p = '\0';
+
+ /* Remove leading whitespace. NUL is no whitespace character. */
+ p = line;
+ while (*p == ' ' || *p == '\f' || *p == '\r' || *p == '\t' || *p == '\v')
+ ++p;
- while ((c = getc (f)) != EOF)
+ /* If the line is blank it is ignored. */
+ if (p[0] == '\0')
+ continue;
+
+ if (!strncmp (p, "include", 7) && (p[7] == ' ' || p[7] == '\t'))
+ {
+ char *dir, c;
+ p += 8;
+ do
{
- if (len + 1 >= alloc)
- {
- alloc *= 2;
- b = (char *) xrealloc (b, alloc);
- }
- if (c != ':'
- && c != ' '
- && c != '\t'
- && c != '\n'
- && c != ',')
- {
- b[len] = c;
- ++len;
- }
- else
- {
- if (len > 0 && b[len - 1] != ':')
- {
- b[len] = ':';
- ++len;
- }
- }
- }
+ while (*p == ' ' || *p == '\t')
+ ++p;
+
+ if (*p == '\0')
+ break;
+
+ dir = p;
- if (len > 0 && b[len - 1] == ':')
- --len;
+ while (*p != ' ' && *p != '\t' && *p)
+ ++p;
- if (len > 0)
- b[len] = '\0';
+ c = *p;
+ *p++ = '\0';
+ if (dir[0] != '\0')
+ gld${EMULATION_NAME}_parse_ld_so_conf_include (info, filename,
+ dir);
+ }
+ while (c != '\0');
+ }
+ else
+ {
+ char *dir = p;
+ while (*p && *p != '=' && *p != ' ' && *p != '\t' && *p != '\f'
+ && *p != '\r' && *p != '\v')
+ ++p;
+
+ while (p != dir && p[-1] == '/')
+ --p;
+ if (info->path == NULL)
+ {
+ info->alloc = p - dir + 1 + 256;
+ info->path = xmalloc (info->alloc);
+ info->len = 0;
+ }
else
{
- free (b);
- b = NULL;
+ if (info->len + 1 + (p - dir) >= info->alloc)
+ {
+ info->alloc += p - dir + 256;
+ info->path = xrealloc (info->path, info->alloc);
+ }
+ info->path[info->len++] = ':';
}
+ memcpy (info->path + info->len, dir, p - dir);
+ info->len += p - dir;
+ info->path[info->len] = '\0';
+ }
+ }
+ while (! feof (f));
+ free (line);
+ fclose (f);
+ return TRUE;
+}
- fclose (f);
+static bfd_boolean
+gld${EMULATION_NAME}_check_ld_so_conf (const char *name, int force)
+{
+ static bfd_boolean initialized;
+ static char *ld_so_conf;
+ struct dt_needed needed;
- if (b)
- {
- char *d = gld${EMULATION_NAME}_add_sysroot (b);
- free (b);
- b = d;
- }
+ if (! initialized)
+ {
+ char *tmppath;
+ struct gld${EMULATION_NAME}_ld_so_conf info;
- ld_so_conf = b;
+ info.path = NULL;
+ info.len = info.alloc = 0;
+ tmppath = concat (ld_sysroot, "${prefix}/etc/ld.so.conf", NULL);
+ if (!gld${EMULATION_NAME}_parse_ld_so_conf (&info, tmppath))
+ {
+ free (tmppath);
+ tmppath = concat (ld_sysroot, "/etc/ld.so.conf", NULL);
+ gld${EMULATION_NAME}_parse_ld_so_conf (&info, tmppath);
}
+ free (tmppath);
+ if (info.path)
+ {
+ char *d = gld${EMULATION_NAME}_add_sysroot (info.path);
+ free (info.path);
+ ld_so_conf = d;
+ }
initialized = TRUE;
}
if (ld_so_conf == NULL)
return FALSE;
- return gld${EMULATION_NAME}_search_needed (ld_so_conf, name, force);
+
+ needed.by = NULL;
+ needed.name = name;
+ return gld${EMULATION_NAME}_search_needed (ld_so_conf, &needed, force);
}
EOF
@@ -628,43 +811,46 @@ cat >>e${EMULATION_NAME}.c <<EOF
static void
gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
{
- if (global_found)
+ const char *soname;
+
+ /* Stop looking if we've found a loaded lib. */
+ if (global_found != NULL
+ && (bfd_elf_get_dyn_lib_class (global_found->the_bfd)
+ & DYN_AS_NEEDED) == 0)
return;
- if (s->filename != NULL)
- {
- const char *f;
+ if (s->filename == NULL || s->the_bfd == NULL)
+ return;
- if (strcmp (s->filename, global_needed->name) == 0)
- {
- global_found = TRUE;
- return;
- }
+ /* Don't look for a second non-loaded as-needed lib. */
+ if (global_found != NULL
+ && (bfd_elf_get_dyn_lib_class (s->the_bfd) & DYN_AS_NEEDED) != 0)
+ return;
- if (s->search_dirs_flag)
- {
- f = strrchr (s->filename, '/');
- if (f != NULL
- && strcmp (f + 1, global_needed->name) == 0)
- {
- global_found = TRUE;
- return;
- }
- }
+ if (strcmp (s->filename, global_needed->name) == 0)
+ {
+ global_found = s;
+ return;
}
- if (s->the_bfd != NULL)
+ if (s->search_dirs_flag)
{
- const char *soname;
-
- soname = bfd_elf_get_dt_soname (s->the_bfd);
- if (soname != NULL
- && strcmp (soname, global_needed->name) == 0)
+ const char *f = strrchr (s->filename, '/');
+ if (f != NULL
+ && strcmp (f + 1, global_needed->name) == 0)
{
- global_found = TRUE;
+ global_found = s;
return;
}
}
+
+ soname = bfd_elf_get_dt_soname (s->the_bfd);
+ if (soname != NULL
+ && strcmp (soname, global_needed->name) == 0)
+ {
+ global_found = s;
+ return;
+ }
}
EOF
@@ -696,25 +882,48 @@ gld${EMULATION_NAME}_after_open (void)
for (l = needed; l != NULL; l = l->next)
{
struct bfd_link_needed_list *ll;
+ struct dt_needed n, nn;
int force;
+ /* If the lib that needs this one was --as-needed and wasn't
+ found to be needed, then this lib isn't needed either. */
+ if (l->by != NULL
+ && (bfd_elf_get_dyn_lib_class (l->by) & DYN_AS_NEEDED) != 0)
+ continue;
+
/* If we've already seen this file, skip it. */
for (ll = needed; ll != l; ll = ll->next)
- if (strcmp (ll->name, l->name) == 0)
+ if ((ll->by == NULL
+ || (bfd_elf_get_dyn_lib_class (ll->by) & DYN_AS_NEEDED) == 0)
+ && strcmp (ll->name, l->name) == 0)
break;
if (ll != l)
continue;
/* See if this file was included in the link explicitly. */
global_needed = l;
- global_found = FALSE;
+ global_found = NULL;
lang_for_each_input_file (gld${EMULATION_NAME}_check_needed);
- if (global_found)
+ if (global_found != NULL
+ && (bfd_elf_get_dyn_lib_class (global_found->the_bfd)
+ & DYN_AS_NEEDED) == 0)
continue;
+ n.by = l->by;
+ n.name = l->name;
+ nn.by = l->by;
if (trace_file_tries)
info_msg (_("%s needed by %B\n"), l->name, l->by);
+ /* As-needed libs specified on the command line (or linker script)
+ take priority over libs found in search dirs. */
+ if (global_found != NULL)
+ {
+ nn.name = global_found->filename;
+ if (gld${EMULATION_NAME}_try_needed (&nn, TRUE))
+ continue;
+ }
+
/* We need to find this file and include the symbol table. We
want to search for the file in the same way that the dynamic
linker will search. That means that we want to use
@@ -731,9 +940,13 @@ gld${EMULATION_NAME}_after_open (void)
size_t len;
search_dirs_type *search;
EOF
-if [ "x${USE_LIBPATH}" = xyes ] ; then
+if [ "x${NATIVE}" = xyes ] ; then
cat >>e${EMULATION_NAME}.c <<EOF
const char *lib_path;
+EOF
+fi
+if [ "x${USE_LIBPATH}" = xyes ] ; then
+cat >>e${EMULATION_NAME}.c <<EOF
struct bfd_link_needed_list *rp;
int found;
EOF
@@ -741,13 +954,13 @@ fi
cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
- l->name, force))
+ &n, force))
break;
EOF
if [ "x${USE_LIBPATH}" = xyes ] ; then
cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_search_needed (command_line.rpath,
- l->name, force))
+ &n, force))
break;
EOF
fi
@@ -757,12 +970,12 @@ cat >>e${EMULATION_NAME}.c <<EOF
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
}
lib_path = (const char *) getenv ("LD_LIBRARY_PATH");
- if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, force))
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n, force))
break;
EOF
fi
@@ -775,7 +988,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
char *tmpname = gld${EMULATION_NAME}_add_sysroot (rp->name);
found = (rp->by == l->by
&& gld${EMULATION_NAME}_search_needed (tmpname,
- l->name,
+ &n,
force));
free (tmpname);
}
@@ -784,26 +997,9 @@ cat >>e${EMULATION_NAME}.c <<EOF
EOF
fi
-cat >>e${EMULATION_NAME}.c <<EOF
- len = strlen (l->name);
- for (search = search_head; search != NULL; search = search->next)
- {
- char *filename;
-
- if (search->cmdline)
- continue;
- filename = (char *) xmalloc (strlen (search->name) + len + 2);
- sprintf (filename, "%s/%s", search->name, l->name);
- if (gld${EMULATION_NAME}_try_needed (filename, force))
- break;
- free (filename);
- }
- if (search != NULL)
- break;
-EOF
if [ "x${USE_LIBPATH}" = xyes ] ; then
case ${target} in
- *-*-freebsd*)
+ *-*-freebsd* | *-*-dragonfly*)
cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_check_ld_elf_hints (l->name, force))
break;
@@ -811,16 +1007,35 @@ EOF
# FreeBSD
;;
- *-*-linux-gnu*)
+ *-*-linux-* | *-*-k*bsd*-*)
+ # Linux
cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
break;
+
EOF
- # Linux
;;
esac
fi
cat >>e${EMULATION_NAME}.c <<EOF
+ len = strlen (l->name);
+ for (search = search_head; search != NULL; search = search->next)
+ {
+ char *filename;
+
+ if (search->cmdline)
+ continue;
+ filename = (char *) xmalloc (strlen (search->name) + len + 2);
+ sprintf (filename, "%s/%s", search->name, l->name);
+ nn.name = filename;
+ if (gld${EMULATION_NAME}_try_needed (&nn, force))
+ break;
+ free (filename);
+ }
+ if (search != NULL)
+ break;
+EOF
+cat >>e${EMULATION_NAME}.c <<EOF
}
if (force < 2)
@@ -841,16 +1056,14 @@ cat >>e${EMULATION_NAME}.c <<EOF
static void
gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
{
- struct bfd_link_hash_entry *h;
+ bfd_boolean provide = FALSE;
switch (exp->type.node_class)
{
case etree_provide:
- h = bfd_link_hash_lookup (link_info.hash, exp->assign.dst,
- FALSE, FALSE, FALSE);
- if (h == NULL)
- break;
-
+ provide = TRUE;
+ /* Fall thru */
+ case etree_assign:
/* We call record_link_assignment even if the symbol is defined.
This is because if it is defined by a dynamic object, we
actually want to use the value defined by the linker script,
@@ -858,14 +1071,11 @@ gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
symbols like etext). If the symbol is defined by a regular
object, then, as it happens, calling record_link_assignment
will do no harm. */
-
- /* Fall through. */
- case etree_assign:
if (strcmp (exp->assign.dst, ".") != 0)
{
- if (! (bfd_elf_record_link_assignment
- (output_bfd, &link_info, exp->assign.dst,
- exp->type.node_class == etree_provide ? TRUE : FALSE)))
+ if (!bfd_elf_record_link_assignment (output_bfd, &link_info,
+ exp->assign.dst, provide,
+ exp->assign.hidden))
einfo ("%P%F: failed to record assignment to %s: %E\n",
exp->assign.dst);
}
@@ -912,8 +1122,8 @@ if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation;
ELF_INTERPRETER_SET_DEFAULT="
if (sinterp != NULL)
{
- sinterp->contents = ${ELF_INTERPRETER_NAME};
- sinterp->_raw_size = strlen (sinterp->contents) + 1;
+ sinterp->contents = (unsigned char *) ${ELF_INTERPRETER_NAME};
+ sinterp->size = strlen ((char *) sinterp->contents) + 1;
}
"
@@ -950,13 +1160,14 @@ gld${EMULATION_NAME}_before_allocation (void)
(const char * const *) command_line.auxiliary_filters,
&link_info, &sinterp, lang_elf_version_info)))
einfo ("%P%F: failed to set dynamic section sizes: %E\n");
+
${ELF_INTERPRETER_SET_DEFAULT}
/* Let the user override the dynamic linker we are using. */
if (command_line.interpreter != NULL
&& sinterp != NULL)
{
sinterp->contents = (bfd_byte *) command_line.interpreter;
- sinterp->_raw_size = strlen (command_line.interpreter) + 1;
+ sinterp->size = strlen (command_line.interpreter) + 1;
}
/* Look for any sections named .gnu.warning. As a GNU extensions,
@@ -981,7 +1192,7 @@ ${ELF_INTERPRETER_SET_DEFAULT}
if (s == NULL)
continue;
- sz = bfd_section_size (is->the_bfd, s);
+ sz = s->size;
prefix_len = strlen (gnu_warning_prefix);
msg = xmalloc ((size_t) (prefix_len + sz + 1));
strcpy (msg, gnu_warning_prefix);
@@ -999,9 +1210,18 @@ ${ELF_INTERPRETER_SET_DEFAULT}
/* Clobber the section size, so that we don't waste copying the
warning into the output file. */
- s->_raw_size = 0;
+ 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;
}
}
+
+ before_allocation_default ();
+
+ if (!bfd_elf_size_dynsym_hash_dynstr (output_bfd, &link_info))
+ einfo ("%P%F: failed to set dynamic section sizes: %E\n");
}
EOF
@@ -1089,12 +1309,11 @@ fi
if test x"$LDEMUL_PLACE_ORPHAN" != xgld"$EMULATION_NAME"_place_orphan; then
cat >>e${EMULATION_NAME}.c <<EOF
-/* A variant of lang_output_section_find. Used by place_orphan. */
+/* A variant of lang_output_section_find used by place_orphan. */
static lang_output_section_statement_type *
output_rel_find (asection *sec, int isdyn)
{
- lang_statement_union_type *u;
lang_output_section_statement_type *lookup;
lang_output_section_statement_type *last = NULL;
lang_output_section_statement_type *last_alloc = NULL;
@@ -1102,10 +1321,12 @@ output_rel_find (asection *sec, int isdyn)
lang_output_section_statement_type *last_rel_alloc = NULL;
int rela = sec->name[4] == 'a';
- for (u = lang_output_section_statement.head; u; u = lookup->next)
+ for (lookup = &lang_output_section_statement.head->output_section_statement;
+ lookup != NULL;
+ lookup = lookup->next)
{
- lookup = &u->output_section_statement;
- if (strncmp (".rel", lookup->name, 4) == 0)
+ if (lookup->constraint != -1
+ && strncmp (".rel", lookup->name, 4) == 0)
{
int lookrela = lookup->name[4] == 'a';
@@ -1145,104 +1366,128 @@ output_rel_find (asection *sec, int isdyn)
return last;
}
-/* Find the last output section before given output statement.
- Used by place_orphan. */
-
-static asection *
-output_prev_sec_find (lang_output_section_statement_type *os)
-{
- asection *s = (asection *) NULL;
- lang_statement_union_type *u;
- lang_output_section_statement_type *lookup;
-
- for (u = lang_output_section_statement.head;
- u != (lang_statement_union_type *) NULL;
- u = lookup->next)
- {
- lookup = &u->output_section_statement;
- if (lookup == os)
- return s;
-
- if (lookup->bfd_section != NULL && lookup->bfd_section->owner != NULL)
- s = lookup->bfd_section;
- }
-
- return NULL;
-}
-
/* Place an orphan section. We use this to put random SHF_ALLOC
sections in the right segment. */
-struct orphan_save {
- lang_output_section_statement_type *os;
- asection **section;
- lang_statement_union_type **stmt;
- lang_statement_union_type **os_tail;
-};
-
static bfd_boolean
-gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
+gld${EMULATION_NAME}_place_orphan (asection *s)
{
- static struct orphan_save hold_text;
- static struct orphan_save hold_rodata;
- static struct orphan_save hold_data;
- static struct orphan_save hold_bss;
- static struct orphan_save hold_rel;
- static struct orphan_save hold_interp;
- static struct orphan_save hold_sdata;
- static int count = 1;
+ static struct orphan_save hold[] =
+ {
+ { ".text",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
+ 0, 0, 0, 0 },
+ { ".rodata",
+ 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 },
+ { 0,
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".interp",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".sdata",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_SMALL_DATA,
+ 0, 0, 0, 0 }
+ };
+ enum orphan_save_index
+ {
+ orphan_text = 0,
+ orphan_rodata,
+ orphan_data,
+ orphan_bss,
+ orphan_rel,
+ orphan_interp,
+ orphan_sdata
+ };
+ static int orphan_init_done = 0;
struct orphan_save *place;
- lang_statement_list_type *old;
- lang_statement_list_type add;
- etree_type *address;
const char *secname;
- const char *ps = NULL;
+ lang_output_section_statement_type *after;
lang_output_section_statement_type *os;
- lang_statement_union_type **os_tail;
- etree_type *load_base;
int isdyn = 0;
+ int iself = s->owner->xvec->flavour == bfd_target_elf_flavour;
+ unsigned int sh_type = iself ? elf_section_type (s) : SHT_NULL;
secname = bfd_get_section_name (s->owner, s);
+
if (! link_info.relocatable
&& link_info.combreloc
- && (s->flags & SEC_ALLOC)
- && strncmp (secname, ".rel", 4) == 0)
+ && (s->flags & SEC_ALLOC))
{
- if (secname[4] == 'a')
- secname = ".rela.dyn";
- else
- secname = ".rel.dyn";
- isdyn = 1;
+ if (iself)
+ switch (sh_type)
+ {
+ case SHT_RELA:
+ secname = ".rela.dyn";
+ isdyn = 1;
+ break;
+ case SHT_REL:
+ secname = ".rel.dyn";
+ isdyn = 1;
+ break;
+ default:
+ break;
+ }
+ else if (strncmp (secname, ".rel", 4) == 0)
+ {
+ secname = secname[4] == 'a' ? ".rela.dyn" : ".rel.dyn";
+ isdyn = 1;
+ }
}
- if (isdyn || (!config.unique_orphan_sections && !unique_section_p (secname)))
+ if (isdyn || (!config.unique_orphan_sections && !unique_section_p (s)))
{
/* Look through the script to see where to place this section. */
os = lang_output_section_find (secname);
if (os != NULL
&& (os->bfd_section == NULL
- || ((s->flags ^ os->bfd_section->flags)
- & (SEC_LOAD | SEC_ALLOC)) == 0))
+ || os->bfd_section->flags == 0
+ || (_bfd_elf_match_sections_by_type (output_bfd,
+ os->bfd_section,
+ s->owner, s)
+ && ((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. */
- lang_add_section (&os->children, s, os, file);
+ 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 (&os->children, s, os);
return TRUE;
}
}
- if (hold_text.os == NULL)
- hold_text.os = lang_output_section_find (".text");
+ 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;
+ }
/* If this is a final link, then always put .gnu.warning.SYMBOL
sections into the .text section to get them out of the way. */
if (link_info.executable
&& ! link_info.relocatable
&& strncmp (secname, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0
- && hold_text.os != NULL)
+ && hold[orphan_text].os != NULL)
{
- lang_add_section (&hold_text.os->children, s, hold_text.os, file);
+ lang_add_section (&hold[orphan_text].os->children, s,
+ hold[orphan_text].os);
return TRUE;
}
@@ -1251,223 +1496,60 @@ gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
right after the .interp section, so that the PT_NOTE segment is
stored right after the program headers where the OS can read it
in the first page. */
-#define HAVE_SECTION(hold, name) \
-(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL)
-
- if ((s->flags & SEC_EXCLUDE) != 0 && !link_info.relocatable)
- {
- if (s->output_section == NULL)
- s->output_section = bfd_abs_section_ptr;
- return TRUE;
- }
place = NULL;
if ((s->flags & SEC_ALLOC) == 0)
;
else if ((s->flags & SEC_LOAD) != 0
- && strncmp (secname, ".note", 5) == 0
- && HAVE_SECTION (hold_interp, ".interp"))
- place = &hold_interp;
- else if ((s->flags & SEC_HAS_CONTENTS) == 0
- && HAVE_SECTION (hold_bss, ".bss"))
- place = &hold_bss;
- else if ((s->flags & SEC_SMALL_DATA) != 0
- && HAVE_SECTION (hold_sdata, ".sdata"))
- place = &hold_sdata;
- else if ((s->flags & SEC_READONLY) == 0
- && HAVE_SECTION (hold_data, ".data"))
- place = &hold_data;
- else if (strncmp (secname, ".rel", 4) == 0
- && (s->flags & SEC_LOAD) != 0
- && (hold_rel.os != NULL
- || (hold_rel.os = output_rel_find (s, isdyn)) != NULL))
- place = &hold_rel;
- else if ((s->flags & (SEC_CODE | SEC_READONLY)) == SEC_READONLY
- && HAVE_SECTION (hold_rodata, ".rodata"))
- place = &hold_rodata;
- else if ((s->flags & (SEC_CODE | SEC_READONLY)) == (SEC_CODE | SEC_READONLY)
- && hold_text.os != NULL)
- place = &hold_text;
-
-#undef HAVE_SECTION
+ && ((iself && sh_type == SHT_NOTE)
+ || (!iself && strncmp (secname, ".note", 5) == 0)))
+ place = &hold[orphan_interp];
+ else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ place = &hold[orphan_bss];
+ else if ((s->flags & SEC_SMALL_DATA) != 0)
+ place = &hold[orphan_sdata];
+ 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))
+ && (s->flags & SEC_LOAD) != 0)
+ place = &hold[orphan_rel];
+ 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)
+ {
+ if (place->name != NULL)
+ place->os = lang_output_section_find (place->name);
+ else
+ place->os = output_rel_find (s, isdyn);
+ }
+ after = place->os;
+ if (after == NULL)
+ after = lang_output_section_find_by_flags
+ (s, &place->os, _bfd_elf_match_sections_by_type);
+ 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");
}
- /* Start building a list of statements for this section.
- First save the current statement pointer. */
- old = stat_ptr;
-
- /* If we have found an appropriate place for the output section
- statements for this orphan, add them to our own private list,
- inserting them later into the global statement list. */
- if (place != NULL)
- {
- stat_ptr = &add;
- lang_list_init (stat_ptr);
- }
-
- address = NULL;
- if (link_info.relocatable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
- address = exp_intop ((bfd_vma) 0);
-
- load_base = NULL;
- if (place != NULL && place->os->load_base != NULL)
- {
- etree_type *lma_from_vma;
- lma_from_vma = exp_binop ('-', place->os->load_base,
- exp_nameop (ADDR, place->os->name));
- load_base = exp_binop ('+', lma_from_vma,
- exp_nameop (ADDR, secname));
- }
-
- os_tail = lang_output_section_statement.tail;
- os = lang_enter_output_section_statement (secname, address, 0,
- (etree_type *) NULL,
- (etree_type *) NULL,
- load_base);
-
- if (config.build_constructors)
- {
- /* If the name of the section is representable in C, then create
- symbols to mark the start and the end of the section. */
- for (ps = secname; *ps != '\0'; ps++)
- if (! ISALNUM (*ps) && *ps != '_')
- break;
- if (*ps == '\0')
- {
- char *symname;
- etree_type *e_align;
-
- symname = (char *) xmalloc (ps - secname + sizeof "__start_");
- sprintf (symname, "__start_%s", secname);
- lang_add_assignment (exp_assop ('=', symname,
- exp_unop (ABSOLUTE,
- exp_nameop (NAME, "."))));
- }
- }
-
- lang_add_section (&os->children, s, os, file);
-
- lang_leave_output_section_statement
- ((bfd_vma) 0, "*default*",
- (struct lang_output_section_phdr_list *) NULL, NULL);
-
- if (config.build_constructors && *ps == '\0')
- {
- char *symname;
-
- /* lang_leave_ouput_section_statement resets stat_ptr. Put
- stat_ptr back where we want it. */
- if (place != NULL)
- stat_ptr = &add;
-
- symname = (char *) xmalloc (ps - secname + sizeof "__stop_");
- sprintf (symname, "__stop_%s", secname);
- lang_add_assignment (exp_assop ('=', symname,
- exp_nameop (NAME, ".")));
- }
-
- /* Restore the global list pointer. */
- stat_ptr = old;
-
- if (place != NULL && os->bfd_section != NULL)
- {
- asection *snew, **pps;
-
- snew = os->bfd_section;
-
- /* Shuffle the bfd section list to make the output file look
- neater. This is really only cosmetic. */
- if (place->section == NULL)
- {
- asection *bfd_section = place->os->bfd_section;
-
- /* If the output statement hasn't been used to place
- any input sections (and thus doesn't have an output
- bfd_section), look for the closest prior output statement
- having an output section. */
- if (bfd_section == NULL)
- bfd_section = output_prev_sec_find (place->os);
-
- if (bfd_section != NULL && bfd_section != snew)
- place->section = &bfd_section->next;
- }
-
- if (place->section != NULL)
- {
- /* Unlink the section. */
- for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
- ;
- bfd_section_list_remove (output_bfd, pps);
-
- /* Now tack it on to the "place->os" section list. */
- bfd_section_list_insert (output_bfd, place->section, snew);
- }
-
- /* Save the end of this list. Further ophans of this type will
- follow the one we've just added. */
- place->section = &snew->next;
-
- /* The following is non-cosmetic. We try to put the output
- statements in some sort of reasonable order here, because
- they determine the final load addresses of the orphan
- sections. In addition, placing output statements in the
- wrong order may require extra segments. For instance,
- given a typical situation of all read-only sections placed
- in one segment and following that a segment containing all
- the read-write sections, we wouldn't want to place an orphan
- read/write section before or amongst the read-only ones. */
- if (add.head != NULL)
- {
- lang_statement_union_type *newly_added_os;
-
- if (place->stmt == NULL)
- {
- /* Put the new statement list right at the head. */
- *add.tail = place->os->header.next;
- place->os->header.next = add.head;
-
- place->os_tail = &place->os->next;
- }
- else
- {
- /* Put it after the last orphan statement we added. */
- *add.tail = *place->stmt;
- *place->stmt = add.head;
- }
-
- /* Fix the global list pointer if we happened to tack our
- new list at the tail. */
- if (*old->tail == add.head)
- old->tail = add.tail;
-
- /* Save the end of this list. */
- place->stmt = add.tail;
-
- /* Do the same for the list of output section statements. */
- newly_added_os = *os_tail;
- *os_tail = NULL;
- newly_added_os->output_section_statement.next = *place->os_tail;
- *place->os_tail = newly_added_os;
- place->os_tail = &newly_added_os->output_section_statement.next;
-
- /* Fixing the global list pointer here is a little different.
- We added to the list in lang_enter_output_section_statement,
- trimmed off the new output_section_statment above when
- assigning *os_tail = NULL, but possibly added it back in
- the same place when assigning *place->os_tail. */
- if (*os_tail == NULL)
- lang_output_section_statement.tail = os_tail;
- }
- }
+ lang_insert_orphan (s, secname, after, place, NULL, NULL);
return TRUE;
}
@@ -1478,23 +1560,27 @@ if test x"$LDEMUL_FINISH" != xgld"$EMULATION_NAME"_finish; then
cat >>e${EMULATION_NAME}.c <<EOF
static void
-gld${EMULATION_NAME}_finish (void)
+gld${EMULATION_NAME}_layout_sections_again (void)
{
- if (bfd_elf_discard_info (output_bfd, &link_info))
- {
- lang_reset_memory_regions ();
+ lang_reset_memory_regions ();
- /* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, (bfd_vma) 0, NULL, TRUE);
+ /* Resize the sections. */
+ lang_size_sections (NULL, TRUE);
- /* Redo special stuff. */
- ldemul_after_allocation ();
+ /* Redo special stuff. */
+ ldemul_after_allocation ();
- /* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section,
- (fill_type *) 0, (bfd_vma) 0);
- }
+ /* 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 ();
+
+ finish_default ();
}
EOF
fi
@@ -1520,38 +1606,49 @@ cat >>e${EMULATION_NAME}.c <<EOF
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
+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
if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then : ; else
-echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xn >> 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
fi
if test -n "$GENERATE_PIE_SCRIPT" ; then
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+echo ' ; else if (link_info.pie && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DT_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdw >> e${EMULATION_NAME}.c
echo ' ; else if (link_info.pie && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xdc >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xdc >> e${EMULATION_NAME}.c
fi
-echo ' ; else if (link_info.pie) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xd >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.pie) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xd >> e${EMULATION_NAME}.c
fi
if test -n "$GENERATE_SHLIB_SCRIPT" ; then
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
+echo ' ; else if (link_info.shared && link_info.combreloc' >> e${EMULATION_NAME}.c
+echo ' && link_info.relro' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DT_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xsw >> e${EMULATION_NAME}.c
echo ' ; else if (link_info.shared && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c
fi
-echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.shared) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
fi
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.combreloc && link_info.relro' >> e${EMULATION_NAME}.c
+echo ' && (link_info.flags & DT_BIND_NOW)) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xw >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c
fi
-echo ' ; else return' >> e${EMULATION_NAME}.c
-sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
-echo '; }' >> e${EMULATION_NAME}.c
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
else
# Scripts read from the filesystem.
@@ -1577,6 +1674,9 @@ fi
if test -n "$GENERATE_PIE_SCRIPT" ; then
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
cat >>e${EMULATION_NAME}.c <<EOF
+ else if (link_info.pie && link_info.combreloc
+ && link_info.relro && (link_info.flags & DT_BIND_NOW))
+ return "ldscripts/${EMULATION_NAME}.xdw";
else if (link_info.pie && link_info.combreloc)
return "ldscripts/${EMULATION_NAME}.xdc";
EOF
@@ -1589,6 +1689,9 @@ fi
if test -n "$GENERATE_SHLIB_SCRIPT" ; then
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
cat >>e${EMULATION_NAME}.c <<EOF
+ else if (link_info.shared && link_info.combreloc
+ && link_info.relro && (link_info.flags & DT_BIND_NOW))
+ return "ldscripts/${EMULATION_NAME}.xsw";
else if (link_info.shared && link_info.combreloc)
return "ldscripts/${EMULATION_NAME}.xsc";
EOF
@@ -1600,6 +1703,9 @@ EOF
fi
if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
cat >>e${EMULATION_NAME}.c <<EOF
+ else if (link_info.combreloc && link_info.relro
+ && (link_info.flags & DT_BIND_NOW))
+ return "ldscripts/${EMULATION_NAME}.xw";
else if (link_info.combreloc)
return "ldscripts/${EMULATION_NAME}.xc";
EOF
@@ -1627,6 +1733,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
#define OPTION_ENABLE_NEW_DTAGS (OPTION_DISABLE_NEW_DTAGS + 1)
#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)
static void
gld${EMULATION_NAME}_add_options
@@ -1642,6 +1749,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
{"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
{"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},
{"Bgroup", no_argument, NULL, OPTION_GROUP},
EOF
fi
@@ -1694,6 +1802,10 @@ cat >>e${EMULATION_NAME}.c <<EOF
link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR;
break;
+ case OPTION_EXCLUDE_LIBS:
+ add_excluded_libs (optarg);
+ break;
+
case 'z':
if (strcmp (optarg, "initfirst") == 0)
link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
@@ -1739,6 +1851,10 @@ cat >>e${EMULATION_NAME}.c <<EOF
link_info.noexecstack = TRUE;
link_info.execstack = FALSE;
}
+ else if (strcmp (optarg, "relro") == 0)
+ link_info.relro = TRUE;
+ else if (strcmp (optarg, "norelro") == 0)
+ link_info.relro = FALSE;
/* What about the other Solaris -z options? FIXME. */
break;
EOF
@@ -1786,8 +1902,10 @@ 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"));
+ fprintf (file, _(" -z norelro\t\tDon't create RELRO program header\n"));
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"));
+ fprintf (file, _(" -z relro\t\tCreate RELRO program header\n"));
fprintf (file, _(" -z KEYWORD\t\tIgnored for Solaris compatibility\n"));
EOF
fi
diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em
index 4d17ca261ab6..985cdf8e24f4 100644
--- a/contrib/binutils/ld/emultempl/generic.em
+++ b/contrib/binutils/ld/emultempl/generic.em
@@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* emulate the original gld for the given ${EMULATION_NAME}
- Copyright 1991, 1992, 1994, 1996, 2000, 2001, 2002, 2003, 2004
+ Copyright 1991, 1992, 1994, 1996, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -22,7 +22,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_${EMULATION_NAME}
@@ -131,7 +131,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- ${LDEMUL_FINISH-NULL},
+ ${LDEMUL_FINISH-finish_default},
${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
${LDEMUL_OPEN_DYNAMIC_ARCHIVE-NULL},
${LDEMUL_PLACE_ORPHAN-NULL},
diff --git a/contrib/binutils/ld/emultempl/ia64elf.em b/contrib/binutils/ld/emultempl/ia64elf.em
index eee467b08095..ddc5370bfd99 100644
--- a/contrib/binutils/ld/emultempl/ia64elf.em
+++ b/contrib/binutils/ld/emultempl/ia64elf.em
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em, and defines extra ia64-elf
@@ -32,7 +32,7 @@ static int itanium = 0;
static void
gld${EMULATION_NAME}_after_parse (void)
{
- link_info.need_relax_finalize = TRUE;
+ link_info.relax_pass = 2;
bfd_elf${ELFSIZE}_ia64_after_parse (itanium);
}
diff --git a/contrib/binutils/ld/emultempl/linux.em b/contrib/binutils/ld/emultempl/linux.em
index d041b681df65..996a7ea11004 100644
--- a/contrib/binutils/ld/emultempl/linux.em
+++ b/contrib/binutils/ld/emultempl/linux.em
@@ -9,8 +9,8 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* Linux a.out emulation code for ${EMULATION_NAME}
- Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
Linux support by Eric Youngdale <ericy@cais.cais.com>
@@ -28,7 +28,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_${EMULATION_NAME}
@@ -121,6 +121,8 @@ gld${EMULATION_NAME}_before_allocation (void)
dynamic linking. */
if (! bfd_${EMULATION_NAME}_size_dynamic_sections (output_bfd, &link_info))
einfo ("%P%F: failed to set dynamic section sizes: %E\n");
+
+ before_allocation_default ();
}
static char *
@@ -190,7 +192,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL, /* finish */
+ finish_default,
gld${EMULATION_NAME}_create_output_section_statements,
gld${EMULATION_NAME}_open_dynamic_archive,
NULL, /* place orphan */
diff --git a/contrib/binutils/ld/emultempl/mipsecoff.em b/contrib/binutils/ld/emultempl/mipsecoff.em
index dde33c24be55..780cc60ceb00 100644
--- a/contrib/binutils/ld/emultempl/mipsecoff.em
+++ b/contrib/binutils/ld/emultempl/mipsecoff.em
@@ -1,51 +1,30 @@
# This shell script emits a C file. -*- C -*-
-# It does some substitutions.
+# Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004
+# 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.
+#
+
if [ -z "$MACHINE" ]; then
OUTPUT_ARCH=${ARCH}
else
OUTPUT_ARCH=${ARCH}:${MACHINE}
fi
-cat >e${EMULATION_NAME}.c <<EOF
-/* This file is is generated by a shell script. DO NOT EDIT! */
-
-/* Handle embedded relocs for MIPS.
- Copyright 1994, 1995, 1997, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
- Written by Ian Lance Taylor <ian@cygnus.com> based on generic.em.
-
-This file is part of GLD, the Gnu Linker.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define TARGET_IS_${EMULATION_NAME}
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "bfdlink.h"
-
-#include "ld.h"
-#include "ldmain.h"
-#include "ldmisc.h"
-
-#include "ldexp.h"
-#include "ldlang.h"
-#include "ldfile.h"
-#include "ldemul.h"
-
-static void check_sections (bfd *, asection *, void *);
-
+cat >>e${EMULATION_NAME}.c <<EOF
static void
gld${EMULATION_NAME}_before_parse (void)
{
@@ -53,196 +32,6 @@ gld${EMULATION_NAME}_before_parse (void)
ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
#endif /* not TARGET_ */
}
-
-/* This function is run after all the input files have been opened.
- We create a .rel.sdata section for each input file with a non zero
- .sdata section. The BFD backend will fill in these sections with
- magic numbers which can be used to relocate the data section at run
- time. This will only do the right thing if all the input files
- have been compiled using -membedded-pic. */
-
-static void
-gld${EMULATION_NAME}_after_open (void)
-{
- bfd *abfd;
-
- if (! command_line.embedded_relocs
- || link_info.relocatable)
- return;
-
- for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
- {
- asection *datasec;
-
- /* As first-order business, make sure that each input BFD is ECOFF. It
- better be, as we are directly calling an ECOFF backend function. */
- if (bfd_get_flavour (abfd) != bfd_target_ecoff_flavour)
- einfo ("%F%B: all input objects must be ECOFF for --embedded-relocs\n");
-
- datasec = bfd_get_section_by_name (abfd, ".sdata");
-
- /* Note that we assume that the reloc_count field has already
- been set up. We could call bfd_get_reloc_upper_bound, but
- that returns the size of a memory buffer rather than a reloc
- count. We do not want to call bfd_canonicalize_reloc,
- because although it would always work it would force us to
- read in the relocs into BFD canonical form, which would waste
- a significant amount of time and memory. */
- if (datasec != NULL && datasec->reloc_count > 0)
- {
- asection *relsec;
-
- relsec = bfd_make_section (abfd, ".rel.sdata");
- if (relsec == NULL
- || ! bfd_set_section_flags (abfd, relsec,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY))
- || ! bfd_set_section_alignment (abfd, relsec, 2)
- || ! bfd_set_section_size (abfd, relsec,
- datasec->reloc_count * 4))
- einfo ("%F%B: can not create .rel.sdata section: %E\n");
- }
-
- /* Double check that all other data sections are empty, as is
- required for embedded PIC code. */
- bfd_map_over_sections (abfd, check_sections, datasec);
- }
-}
-
-/* Check that of the data sections, only the .sdata section has
- relocs. This is called via bfd_map_over_sections. */
-
-static void
-check_sections (bfd *abfd, asection *sec, void *sdatasec)
-{
- if ((bfd_get_section_flags (abfd, sec) & SEC_CODE) == 0
- && sec != sdatasec
- && sec->reloc_count != 0)
- einfo ("%B%X: section %s has relocs; can not use --embedded-relocs\n",
- abfd, bfd_get_section_name (abfd, sec));
-}
-
-/* This function is called after the section sizes and offsets have
- been set. If we are generating embedded relocs, it calls a special
- BFD backend routine to do the work. */
-
-static void
-gld${EMULATION_NAME}_after_allocation (void)
-{
- bfd *abfd;
-
- if (! command_line.embedded_relocs
- || link_info.relocatable)
- return;
-
- for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
- {
- asection *datasec, *relsec;
- char *errmsg;
-
- datasec = bfd_get_section_by_name (abfd, ".sdata");
-
- if (datasec == NULL || datasec->reloc_count == 0)
- continue;
-
- relsec = bfd_get_section_by_name (abfd, ".rel.sdata");
- ASSERT (relsec != NULL);
-
- if (! bfd_mips_ecoff_create_embedded_relocs (abfd, &link_info,
- datasec, relsec,
- &errmsg))
- {
- if (errmsg == NULL)
- einfo ("%B%X: can not create runtime reloc information: %E\n",
- abfd);
- else
- einfo ("%X%B: can not create runtime reloc information: %s\n",
- abfd, errmsg);
- }
- }
-}
-
-static char *
-gld${EMULATION_NAME}_get_script (int *isfile)
EOF
-if test -n "$COMPILE_IN"
-then
-# Scripts compiled in.
-
-# sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 0;
-
- if (link_info.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
-
-else
-# Scripts read from the filesystem.
-
-cat >>e${EMULATION_NAME}.c <<EOF
-{
- *isfile = 1;
-
- if (link_info.relocatable && config.build_constructors)
- return "ldscripts/${EMULATION_NAME}.xu";
- else if (link_info.relocatable)
- return "ldscripts/${EMULATION_NAME}.xr";
- else if (!config.text_read_only)
- return "ldscripts/${EMULATION_NAME}.xbn";
- else if (!config.magic_demand_paged)
- return "ldscripts/${EMULATION_NAME}.xn";
- else
- return "ldscripts/${EMULATION_NAME}.x";
-}
-EOF
-
-fi
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
-{
- gld${EMULATION_NAME}_before_parse,
- syslib_default,
- hll_default,
- after_parse_default,
- gld${EMULATION_NAME}_after_open,
- gld${EMULATION_NAME}_after_allocation,
- set_output_arch_default,
- ldemul_default_target,
- before_allocation_default,
- gld${EMULATION_NAME}_get_script,
- "${EMULATION_NAME}",
- "${OUTPUT_FORMAT}",
- NULL, /* finish */
- NULL, /* create output section statements */
- NULL, /* open dynamic archive */
- NULL, /* place orphan */
- NULL, /* set symbols */
- NULL, /* parse args */
- NULL, /* add_options */
- NULL, /* handle_option */
- NULL, /* unrecognized file */
- NULL, /* list options */
- NULL, /* recognized file */
- NULL, /* find_potential_libraries */
- NULL /* new_vers_pattern */
-};
-EOF
+LDEMUL_BEFORE_PARSE=gld${EMULATION_NAME}_before_parse
diff --git a/contrib/binutils/ld/emultempl/mipself.em b/contrib/binutils/ld/emultempl/mipself.em
deleted file mode 100644
index a950fb11d4be..000000000000
--- a/contrib/binutils/ld/emultempl/mipself.em
+++ /dev/null
@@ -1,177 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-# Copyright 2002, 2003 Free Software Foundation, Inc.
-# Written by Mitch Lichtenberg <mpl@broadcom.com> and
-# Chris Demetriou <cgd@broadcom.com> based on m68kelf.em and mipsecoff.em.
-#
-# This file is part of GLD, the Gnu Linker.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-# This file is sourced from elf32.em, and defines some extra routines for m68k
-# embedded systems using ELF and for some other systems using m68k ELF. While
-# it is sourced from elf32.em for all m68k ELF configurations, here we include
-# only the features we want depending on the configuration.
-
-case ${target} in
- mips*-*-elf)
- echo "#define SUPPORT_EMBEDDED_RELOCS" >>e${EMULATION_NAME}.c
- ;;
-esac
-
-cat >>e${EMULATION_NAME}.c <<EOF
-
-#ifdef SUPPORT_EMBEDDED_RELOCS
-static void mips_elf${ELFSIZE}_check_sections (bfd *, asection *, void *);
-#endif
-
-/* This function is run after all the input files have been opened. */
-
-static void
-mips_elf${ELFSIZE}_after_open (void)
-{
- /* Call the standard elf routine. */
- gld${EMULATION_NAME}_after_open ();
-
-#ifdef SUPPORT_EMBEDDED_RELOCS
- if (command_line.embedded_relocs && (! link_info.relocatable))
- {
- bfd *abfd;
-
- /* In the embedded relocs mode we create a .rel.sdata section for
- each input file with a .sdata section which has has
- relocations. The BFD backend will fill in these sections
- with magic numbers which can be used to relocate the data
- section at run time. */
- for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
- {
- asection *datasec;
-
- /* As first-order business, make sure that each input BFD is
- ELF. We need to call a special BFD backend function to
- generate the embedded relocs, and we have that function
- only for ELF */
-
- if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
- einfo ("%F%B: all input objects must be ELF for --embedded-relocs\n");
-
- if (bfd_get_arch_size (abfd) != ${ELFSIZE})
- einfo ("%F%B: all input objects must be ${ELFSIZE}-bit ELF for --embedded-relocs\n");
-
- datasec = bfd_get_section_by_name (abfd, ".sdata");
-
- /* Note that we assume that the reloc_count field has already
- been set up. We could call bfd_get_reloc_upper_bound, but
- that returns the size of a memory buffer rather than a reloc
- count. We do not want to call bfd_canonicalize_reloc,
- because although it would always work it would force us to
- read in the relocs into BFD canonical form, which would waste
- a significant amount of time and memory. */
-
- if (datasec != NULL && datasec->reloc_count > 0)
- {
- asection *relsec;
-
- relsec = bfd_make_section (abfd, ".rel.sdata");
- if (relsec == NULL
- || ! bfd_set_section_flags (abfd, relsec,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY))
- || ! bfd_set_section_alignment (abfd, relsec,
- (${ELFSIZE} == 32) ? 2 : 3)
- || ! bfd_set_section_size (abfd, relsec,
- datasec->reloc_count
- * ((${ELFSIZE} / 8) + 8)))
- einfo ("%F%B: cannot create .rel.sdata section: %E\n");
- }
-
- /* Double check that all other data sections have no relocs,
- as is required for embedded PIC code. */
- bfd_map_over_sections (abfd, mips_elf${ELFSIZE}_check_sections,
- datasec);
- }
- }
-#endif /* SUPPORT_EMBEDDED_RELOCS */
-}
-
-#ifdef SUPPORT_EMBEDDED_RELOCS
-/* Check that of the data sections, only the .sdata section has
- relocs. This is called via bfd_map_over_sections. */
-
-static void
-mips_elf${ELFSIZE}_check_sections (bfd *abfd, asection *sec, void *sdatasec)
-{
- if ((bfd_get_section_flags (abfd, sec) & SEC_DATA)
- && sec != sdatasec
- && sec->reloc_count != 0)
- einfo ("%B%X: section %s has relocs; cannot use --embedded-relocs\n",
- abfd, bfd_get_section_name (abfd, sec));
-}
-#endif /* SUPPORT_EMBEDDED_RELOCS */
-
-/* This function is called after the section sizes and offsets have
- been set. If we are generating embedded relocs, it calls a special
- BFD backend routine to do the work. */
-
-static void
-mips_elf${ELFSIZE}_after_allocation (void)
-{
- /* Call the standard elf routine. */
- after_allocation_default ();
-
-#ifdef SUPPORT_EMBEDDED_RELOCS
- if (command_line.embedded_relocs && (! link_info.relocatable))
- {
- bfd *abfd;
-
- for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link_next)
- {
- asection *datasec, *relsec;
- char *errmsg;
-
- datasec = bfd_get_section_by_name (abfd, ".sdata");
-
- if (datasec == NULL || datasec->reloc_count == 0)
- continue;
-
- relsec = bfd_get_section_by_name (abfd, ".rel.sdata");
- ASSERT (relsec != NULL);
-
- if (! bfd_mips_elf${ELFSIZE}_create_embedded_relocs (abfd,
- &link_info,
- datasec,
- relsec,
- &errmsg))
- {
- if (errmsg == NULL)
- einfo ("%B%X: can not create runtime reloc information: %E\n",
- abfd);
- else
- einfo ("%X%B: can not create runtime reloc information: %s\n",
- abfd, errmsg);
- }
- }
- }
-#endif /* SUPPORT_EMBEDDED_RELOCS */
-}
-
-EOF
-
-# We have our own after_open and after_allocation functions, but they call
-# the standard routines, so give them a different name.
-LDEMUL_AFTER_OPEN=mips_elf${ELFSIZE}_after_open
-LDEMUL_AFTER_ALLOCATION=mips_elf${ELFSIZE}_after_allocation
diff --git a/contrib/binutils/ld/emultempl/needrelax.em b/contrib/binutils/ld/emultempl/needrelax.em
index 65e622bee740..aaa85d0b5b57 100644
--- a/contrib/binutils/ld/emultempl/needrelax.em
+++ b/contrib/binutils/ld/emultempl/needrelax.em
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em. It is used by targets for
diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em
index 7d6c2e8a6d1f..5afa8da00fef 100644
--- a/contrib/binutils/ld/emultempl/pe.em
+++ b/contrib/binutils/ld/emultempl/pe.em
@@ -1,5 +1,6 @@
# 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
@@ -9,8 +10,8 @@ rm -f e${EMULATION_NAME}.c
(echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
cat >>e${EMULATION_NAME}.c <<EOF
/* This file is part of GLD, the Gnu Linker.
- 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,
+ 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
@@ -24,7 +25,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* For WINDOWS_NT */
/* The original file generated returned different default scripts depending
@@ -62,6 +63,11 @@ cat >>e${EMULATION_NAME}.c <<EOF
#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/i386.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"
@@ -106,6 +112,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
static struct internal_extra_pe_aouthdr pe;
static int dll;
+static flagword real_flags = 0;
static int support_old_code = 0;
static char * thumb_entry_symbol = NULL;
static lang_assignment_statement_type *image_base_statement = 0;
@@ -129,14 +136,16 @@ gld_${EMULATION_NAME}_before_parse (void)
config.dynamic_link = TRUE;
config.has_shared = 1;
link_info.pei386_auto_import = -1;
- link_info.pei386_runtime_pseudo_reloc = FALSE;
+ 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
- lang_add_entry ("WinMainCRTStartup", FALSE);
+ lang_default_entry ("WinMainCRTStartup");
#else
- lang_add_entry ("_WinMainCRTStartup", FALSE);
+ lang_default_entry ("_WinMainCRTStartup");
#endif
+#else
+ lang_default_entry ("${ENTRY}");
#endif
#endif
}
@@ -182,6 +191,8 @@ gld_${EMULATION_NAME}_before_parse (void)
(OPTION_EXCLUDE_LIBS + 1)
#define OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC \
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC + 1)
+#define OPTION_LARGE_ADDRESS_AWARE \
+ (OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC + 1)
static void
gld${EMULATION_NAME}_add_options
@@ -235,6 +246,7 @@ gld${EMULATION_NAME}_add_options
{"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
+ {"large-address-aware", no_argument, NULL, OPTION_LARGE_ADDRESS_AWARE},
{NULL, no_argument, NULL, 0}
};
@@ -335,6 +347,8 @@ gld_${EMULATION_NAME}_list_options (FILE *file)
fprintf (file, _(" --enable-extra-pe-debug Enable verbose debug output when building\n\
or linking to DLLs (esp. auto-import)\n"));
#endif
+ fprintf (file, _(" --large-address-aware Executable supports virtual addresses\n\
+ greater than 2 gigabytes\n"));
}
@@ -361,8 +375,13 @@ static void
set_pe_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;
@@ -371,29 +390,23 @@ set_pe_subsystem (void)
}
v[] =
{
- { "native", 1, "NtProcessStartup" },
-#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
+ { "native", 1, "NtProcessStartup" },
{ "windows", 2, "WinMainCRTStartup" },
-#else
- { "windows", 2, "WinMainCRTStartup" },
-#endif
{ "console", 3, "mainCRTStartup" },
-#if 0
- /* The Microsoft linker does not recognize this. */
- { "os2", 5, "" },
-#endif
- { "posix", 7, "__PosixProcessStartup"},
- { "wince", 9, "_WinMainCRTStartup" },
- { 0, 0, 0 }
+ { "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
{
- char *end;
-
len = sver - optarg;
set_pe_name ("__major_subsystem_version__",
strtoul (sver + 1, &end, 0));
@@ -404,40 +417,62 @@ set_pe_subsystem (void)
einfo (_("%P: warning: bad version number in -subsystem option\n"));
}
- for (i = 0; v[i].name; i++)
+ /* Check for numeric subsystem. */
+ temp_subsystem = strtoul (optarg, & end, 0);
+ if ((*end == ':' || *end == '\0') && (temp_subsystem < 65536))
{
- if (strncmp (optarg, v[i].name, len) == 0
- && v[i].name[len] == '\0')
- {
- const char *initial_symbol_char;
- const char *entry;
-
- set_pe_name ("__subsystem__", v[i].value);
+ /* 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;
- initial_symbol_char = ${INITIAL_SYMBOL_CHAR};
- if (*initial_symbol_char == '\0')
- entry = v[i].entry;
- else
- {
- char *alc_entry;
-
- /* lang_add_entry expects its argument to be permanently
- allocated, so we don't free this string. */
- alc_entry = xmalloc (strlen (initial_symbol_char)
- + strlen (v[i].entry)
- + 1);
- strcpy (alc_entry, initial_symbol_char);
- strcat (alc_entry, v[i].entry);
- entry = alc_entry;
- }
+ /* If no match, use the default. */
+ if (v[i].name != NULL)
+ entry = v[i].entry;
+ else
+ entry = default_entry;
- lang_add_entry (entry, TRUE);
+ /* 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;
}
- einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
+ set_pe_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;
}
@@ -597,6 +632,9 @@ gld${EMULATION_NAME}_handle_option (int optc)
pe_dll_extra_pe_debug = 1;
break;
#endif
+ case OPTION_LARGE_ADDRESS_AWARE:
+ real_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
+ break;
}
return TRUE;
}
@@ -632,7 +670,7 @@ static unsigned long
compute_dll_image_base (const char *ofile)
{
unsigned long hash = strhash (ofile);
- return 0x60000000 | ((hash << 16) & 0x0FFC0000);
+ return 0x61300000 + ((hash << 16) & 0x0FFC0000);
}
#endif
@@ -651,7 +689,7 @@ gld_${EMULATION_NAME}_set_symbols (void)
{
if (link_info.relocatable)
init[IMAGEBASEOFF].value = 0;
- else if (init[DLLOFF].value || link_info.shared)
+ else if (init[DLLOFF].value || (link_info.shared && !link_info.pie))
#ifdef DLL_SUPPORT
init[IMAGEBASEOFF].value = (pe_enable_auto_image_base) ?
compute_dll_image_base (output_filename) : NT_DLL_IMAGE_BASE;
@@ -759,7 +797,7 @@ pe_fixup_stdcalls (void)
if (pe_dll_extra_pe_debug)
printf ("%s\n", __FUNCTION__);
- for (undef = link_info.hash->undefs; undef; undef=undef->und_next)
+ 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, '@');
@@ -828,17 +866,17 @@ static int
make_import_fixup (arelent *rel, asection *s)
{
struct bfd_symbol *sym = *rel->sym_ptr_ptr;
- int addend = 0;
+ char addend[4];
if (pe_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)))
+ 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);
- pe_create_import_fixup (rel, s, addend);
+ pe_create_import_fixup (rel, s, bfd_get_32 (s->owner, addend));
return 1;
}
@@ -851,22 +889,22 @@ pe_find_data_imports (void)
if (link_info.pei386_auto_import == 0)
return;
- for (undef = link_info.hash->undefs; undef; undef=undef->und_next)
+ 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];
+ {
+ /* C++ symbols are *long*. */
+ char buf[4096];
if (pe_dll_extra_pe_debug)
printf ("%s:%s\n", __FUNCTION__, undef->root.string);
- sprintf (buf, "__imp_%s", undef->root.string);
+ sprintf (buf, "__imp_%s", undef->root.string);
- sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
+ sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
- if (sym && sym->type == bfd_link_hash_defined)
- {
+ if (sym && sym->type == bfd_link_hash_defined)
+ {
bfd *b = sym->u.def.section->owner;
asymbol **symbols;
int nsyms, symsize, i;
@@ -904,8 +942,8 @@ pe_find_data_imports (void)
undef->root.string = sym->root.string;
undef->u.def.value = sym->u.def.value;
undef->u.def.section = sym->u.def.section;
- }
- }
+ }
+ }
}
}
@@ -931,8 +969,8 @@ gld_${EMULATION_NAME}_after_open (void)
printf ("%s()\n", __FUNCTION__);
- for (sym = link_info.hash->undefs; sym; sym=sym->und_next)
- printf ("-%s\n", sym->root.string);
+ 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)
@@ -949,6 +987,7 @@ gld_${EMULATION_NAME}_after_open (void)
pe_data (output_bfd)->pe_opthdr = pe;
pe_data (output_bfd)->dll = init[DLLOFF].value;
+ pe_data (output_bfd)->real_flags |= real_flags;
#ifdef DLL_SUPPORT
if (pe_enable_stdcall_fixup) /* -1=warn or 1=disable */
@@ -1051,7 +1090,7 @@ gld_${EMULATION_NAME}_after_open (void)
relocs = (arelent **) xmalloc ((size_t) relsize);
nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec,
- relocs, symbols);
+ relocs, symbols);
if (nrelocs < 0)
{
free (relocs);
@@ -1063,7 +1102,7 @@ gld_${EMULATION_NAME}_after_open (void)
{
struct bfd_symbol *s;
struct bfd_link_hash_entry * blhe;
- bfd *other_bfd;
+ char *other_bfd_filename;
char *n;
s = (relocs[i]->sym_ptr_ptr)[0];
@@ -1080,17 +1119,18 @@ gld_${EMULATION_NAME}_after_open (void)
|| blhe->type != bfd_link_hash_defined)
continue;
- other_bfd = blhe->u.def.section->owner;
+ 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 (is->the_bfd->my_archive->filename,
- other_bfd->my_archive->filename) == 0)
+ if (strcmp (bfd_get_filename (is->the_bfd->my_archive),
+ other_bfd_filename) == 0)
continue;
- /* Rename this implib to match the other. */
- n = (char *) xmalloc (strlen (other_bfd->my_archive->filename) + 1);
-
- strcpy (n, other_bfd->my_archive->filename);
-
+ /* 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;
}
@@ -1134,7 +1174,7 @@ gld_${EMULATION_NAME}_after_open (void)
is3 && is3->the_bfd->my_archive == arch;
is3 = (lang_input_statement_type *) is3->next)
{
- /* A MS dynamic import library can also contain static
+ /* 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. */
@@ -1250,6 +1290,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 */
+
+ before_allocation_default ();
}
#ifdef DLL_SUPPORT
@@ -1276,10 +1318,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
if (strcmp (ext, ".def") == 0 || strcmp (ext, ".DEF") == 0)
{
- if (pe_def_file == 0)
- pe_def_file = def_file_empty ();
-
- def_file_parse (entry->filename, pe_def_file);
+ pe_def_file = def_file_parse (entry->filename, pe_def_file);
if (pe_def_file)
{
@@ -1328,14 +1367,6 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
exp_assop ('=', "__image_base__", exp_intop (pe.ImageBase));
}
-#if 0
- /* Not sure if these *should* be set. */
- if (pe_def_file->version_major != -1)
- {
- pe.MajorImageVersion = pe_def_file->version_major;
- pe.MinorImageVersion = pe_def_file->version_minor;
- }
-#endif
if (pe_def_file->stack_reserve != -1
&& ! saw_option ("__size_of_stack_reserve__"))
{
@@ -1435,6 +1466,8 @@ gld_${EMULATION_NAME}_finish (void)
}
#endif /* defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) */
+ finish_default ();
+
#ifdef DLL_SUPPORT
if (link_info.shared
#if !defined(TARGET_IS_shpe) && !defined(TARGET_IS_mipspe)
@@ -1464,38 +1497,13 @@ gld_${EMULATION_NAME}_finish (void)
if (asec)
{
- asec->flags &= ~SEC_CODE;
- asec->flags |= SEC_DATA;
+ asec->flags &= ~SEC_CODE;
+ asec->flags |= SEC_DATA;
}
}
}
-/* Find the last output section before given output statement.
- Used by place_orphan. */
-
-static asection *
-output_prev_sec_find (lang_output_section_statement_type *os)
-{
- asection *s = (asection *) NULL;
- lang_statement_union_type *u;
- lang_output_section_statement_type *lookup;
-
- for (u = lang_output_section_statement.head;
- u != (lang_statement_union_type *) NULL;
- u = lookup->next)
- {
- lookup = &u->output_section_statement;
- if (lookup == os)
- return s;
-
- if (lookup->bfd_section != NULL && lookup->bfd_section->owner != NULL)
- s = lookup->bfd_section;
- }
-
- return NULL;
-}
-
/* Place an orphan section.
We use this to put sections in a reasonable place in the file, and
@@ -1509,244 +1517,131 @@ output_prev_sec_find (lang_output_section_statement_type *os)
default linker script using wildcards, and are sorted by
sort_sections. */
-struct orphan_save
-{
- lang_output_section_statement_type *os;
- asection **section;
- lang_statement_union_type **stmt;
-};
-
static bfd_boolean
-gld_${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
+gld_${EMULATION_NAME}_place_orphan (asection *s)
{
const char *secname;
- char *hold_section_name;
+ const char *orig_secname;
char *dollar = NULL;
- const char *ps = 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. */
- hold_section_name = xstrdup (secname);
- if (!link_info.relocatable)
+ orig_secname = secname;
+ if (!link_info.relocatable
+ && (dollar = strchr (secname, '$')) != NULL)
{
- dollar = strchr (hold_section_name, '$');
- if (dollar != NULL)
- *dollar = '\0';
+ 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 (hold_section_name);
+ 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. */
- lang_add_section (&add_child, s, os, file);
+ 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;
- static struct orphan_save hold_text;
- static struct orphan_save hold_rdata;
- static struct orphan_save hold_data;
- static struct orphan_save hold_bss;
- char *outsecname;
- lang_statement_list_type *old;
- lang_statement_list_type add;
+ 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. */
-#define HAVE_SECTION(hold, name) \
-(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL)
place = NULL;
if ((s->flags & SEC_ALLOC) == 0)
;
- else if ((s->flags & SEC_HAS_CONTENTS) == 0
- && HAVE_SECTION (hold_bss, ".bss"))
- place = &hold_bss;
- else if ((s->flags & SEC_READONLY) == 0
- && HAVE_SECTION (hold_data, ".data"))
- place = &hold_data;
- else if ((s->flags & SEC_CODE) == 0
- && (s->flags & SEC_READONLY) != 0
- && HAVE_SECTION (hold_rdata, ".rdata"))
- place = &hold_rdata;
- else if ((s->flags & SEC_READONLY) != 0
- && HAVE_SECTION (hold_text, ".text"))
- place = &hold_text;
-
-#undef HAVE_SECTION
-
- /* 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. */
- outsecname = xstrdup (hold_section_name);
- if (bfd_get_section_by_name (output_bfd, outsecname) != NULL)
- {
- unsigned int len;
- char *newname;
- unsigned int i;
-
- len = strlen (outsecname);
- newname = xmalloc (len + 5);
- strcpy (newname, outsecname);
- i = 0;
- do
- {
- sprintf (newname + len, "%d", i);
- ++i;
- }
- while (bfd_get_section_by_name (output_bfd, newname) != NULL);
-
- free (outsecname);
- outsecname = newname;
- }
-
- /* Start building a list of statements for this section. */
- old = stat_ptr;
- stat_ptr = &add;
- lang_list_init (stat_ptr);
+ 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];
- if (config.build_constructors)
+ after = NULL;
+ if (place != NULL)
{
- /* If the name of the section is representable in C, then create
- symbols to mark the start and the end of the section. */
- for (ps = outsecname; *ps != '\0'; ps++)
- if (! ISALNUM ((unsigned char) *ps) && *ps != '_')
- break;
- if (*ps == '\0')
- {
- char *symname;
- etree_type *e_align;
-
- symname = (char *) xmalloc (ps - outsecname + sizeof "___start_");
- sprintf (symname, "___start_%s", outsecname);
- e_align = exp_unop (ALIGN_K,
- exp_intop ((bfd_vma) 1 << s->alignment_power));
- lang_add_assignment (exp_assop ('=', symname, e_align));
- }
+ 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);
}
- if (link_info.relocatable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
- address = exp_intop ((bfd_vma) 0);
- else
+ /* 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)
{
- /* All sections in an executable must be aligned to a page
- boundary. */
- address = exp_unop (ALIGN_K,
- exp_nameop (NAME, "__section_alignment__"));
+ 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");
}
- os = lang_enter_output_section_statement (outsecname, address, 0,
- (etree_type *) NULL,
- (etree_type *) NULL,
- (etree_type *) NULL);
-
- lang_add_section (&add_child, s, os, file);
-
- lang_leave_output_section_statement
- ((bfd_vma) 0, "*default*",
- (struct lang_output_section_phdr_list *) NULL, NULL);
-
- if (config.build_constructors && *ps == '\0')
- {
- char *symname;
-
- /* lang_leave_ouput_section_statement resets stat_ptr.
- Put stat_ptr back where we want it. */
- if (place != NULL)
- stat_ptr = &add;
-
- symname = (char *) xmalloc (ps - outsecname + sizeof "___stop_");
- sprintf (symname, "___stop_%s", outsecname);
- lang_add_assignment (exp_assop ('=', symname,
- exp_nameop (NAME, ".")));
- }
-
- stat_ptr = old;
-
- if (place != NULL && os->bfd_section != NULL)
- {
- asection *snew, **pps;
-
- snew = os->bfd_section;
-
- /* Shuffle the bfd section list to make the output file look
- neater. This is really only cosmetic. */
- if (place->section == NULL)
- {
- asection *bfd_section = place->os->bfd_section;
-
- /* If the output statement hasn't been used to place
- any input sections (and thus doesn't have an output
- bfd_section), look for the closest prior output statement
- having an output section. */
- if (bfd_section == NULL)
- bfd_section = output_prev_sec_find (place->os);
-
- if (bfd_section != NULL && bfd_section != snew)
- place->section = &bfd_section->next;
- }
-
- if (place->section != NULL)
- {
- /* Unlink the section. */
- for (pps = &output_bfd->sections;
- *pps != snew;
- pps = &(*pps)->next)
- ;
- bfd_section_list_remove (output_bfd, pps);
-
- /* Now tack it on to the "place->os" section list. */
- bfd_section_list_insert (output_bfd, place->section, snew);
- }
-
- /* Save the end of this list. Further ophans of this type will
- follow the one we've just added. */
- place->section = &snew->next;
-
- /* The following is non-cosmetic. We try to put the output
- statements in some sort of reasonable order here, because
- they determine the final load addresses of the orphan
- sections. In addition, placing output statements in the
- wrong order may require extra segments. For instance,
- given a typical situation of all read-only sections placed
- in one segment and following that a segment containing all
- the read-write sections, we wouldn't want to place an orphan
- read/write section before or amongst the read-only ones. */
- if (add.head != NULL)
- {
- if (place->stmt == NULL)
- {
- /* Put the new statement list right at the head. */
- *add.tail = place->os->header.next;
- place->os->header.next = add.head;
- }
- else
- {
- /* Put it after the last orphan statement we added. */
- *add.tail = *place->stmt;
- *place->stmt = add.head;
- }
-
- /* Fix the global list pointer if we happened to tack our
- new list at the tail. */
- if (*old->tail == add.head)
- old->tail = add.tail;
-
- /* Save the end of this list. */
- place->stmt = add.tail;
- }
- }
+ /* 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);
}
{
@@ -1769,7 +1664,7 @@ gld_${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s
ls = &(*pl)->input_section;
- lname = bfd_get_section_name (ls->ifile->the_bfd, ls->section);
+ lname = bfd_get_section_name (ls->section->owner, ls->section);
if (strchr (lname, '$') == NULL)
{
if (found_dollar)
@@ -1778,7 +1673,7 @@ gld_${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s
else
{
found_dollar = TRUE;
- if (strcmp (secname, lname) < 0)
+ if (strcmp (orig_secname, lname) < 0)
break;
}
}
@@ -1791,8 +1686,6 @@ gld_${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s
}
}
- free (hold_section_name);
-
return TRUE;
}
@@ -1810,12 +1703,12 @@ gld_${EMULATION_NAME}_open_dynamic_archive
filename = entry->filename;
string = (char *) xmalloc (strlen (search->name)
- + strlen (filename)
- + sizeof "/lib.a.dll"
+ + strlen (filename)
+ + sizeof "/lib.a.dll"
#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);
+ + 1);
/* Try "libfoo.dll.a" first (preferred explicit import library for dll's. */
sprintf (string, "%s/lib%s.dll.a", search->name, filename);
@@ -1825,7 +1718,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive
/* 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))
- {
+ {
/* 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,
@@ -1835,50 +1728,50 @@ gld_${EMULATION_NAME}_open_dynamic_archive
-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))
- {
+ /* 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. */
+ 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;
- }
- }
- }
- }
- }
+ {
+ /* 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;
+ }
+ }
+ }
+ }
+ }
}
entry->filename = string;
@@ -1907,16 +1800,16 @@ cat >>e${EMULATION_NAME}.c <<EOF
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
+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
diff --git a/contrib/binutils/ld/emultempl/ppc32elf.em b/contrib/binutils/ld/emultempl/ppc32elf.em
index 46145932c3da..10f91074dfec 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 Free Software Foundation, Inc.
+# Copyright 2003, 2005 Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
#
@@ -15,10 +15,10 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra powerpc64-elf
+# This file is sourced from elf32.em, and defines extra powerpc32-elf
# specific routines.
#
cat >>e${EMULATION_NAME}.c <<EOF
@@ -26,17 +26,89 @@ cat >>e${EMULATION_NAME}.c <<EOF
#include "libbfd.h"
#include "elf32-ppc.h"
+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;
+
+static inline int
+is_ppc_elf32_vec(const bfd_target * vec)
+{
+ return (vec == &bfd_elf32_powerpc_vec
+ || vec == &bfd_elf32_powerpc_vxworks_vec
+ || vec == &bfd_elf32_powerpcle_vec);
+}
+
/* Whether to run tls optimization. */
static int notlsopt = 0;
+/* Whether to emit symbols for stubs. */
+static int emit_stub_syms = 0;
+
+/* Chooses the correct place for .plt and .got. */
+static int old_plt = 0;
+static int old_got = 0;
+
static void
-ppc_before_allocation (void)
+ppc_after_open (void)
{
- extern const bfd_target bfd_elf32_powerpc_vec;
- extern const bfd_target bfd_elf32_powerpcle_vec;
+ if (is_ppc_elf32_vec (link_info.hash->creator))
+ {
+ int new_plt;
+ int keep_new;
+ unsigned int num_plt;
+ unsigned int num_got;
+ lang_output_section_statement_type *os;
+ lang_output_section_statement_type *plt_os[2];
+ 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,
+ emit_stub_syms);
+ if (new_plt < 0)
+ einfo ("%X%P: select_plt_layout problem %E\n");
- if (link_info.hash->creator == &bfd_elf32_powerpc_vec
- || link_info.hash->creator == &bfd_elf32_powerpcle_vec)
+ num_got = 0;
+ num_plt = 0;
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ {
+ if (os->constraint == SPECIAL && strcmp (os->name, ".plt") == 0)
+ {
+ if (num_plt < 2)
+ plt_os[num_plt] = os;
+ ++num_plt;
+ }
+ if (os->constraint == SPECIAL && strcmp (os->name, ".got") == 0)
+ {
+ if (num_got < 2)
+ got_os[num_got] = os;
+ ++num_got;
+ }
+ }
+
+ keep_new = new_plt == 1 ? 0 : -1;
+ if (num_plt == 2)
+ {
+ plt_os[0]->constraint = keep_new;
+ plt_os[1]->constraint = ~keep_new;
+ }
+ if (num_got == 2)
+ {
+ if (old_got)
+ keep_new = -1;
+ got_os[0]->constraint = keep_new;
+ got_os[1]->constraint = ~keep_new;
+ }
+ }
+
+ gld${EMULATION_NAME}_after_open ();
+}
+
+static void
+ppc_before_allocation (void)
+{
+ if (is_ppc_elf32_vec (link_info.hash->creator))
{
if (ppc_elf_tls_setup (output_bfd, &link_info) && !notlsopt)
{
@@ -57,24 +129,46 @@ EOF
#
PARSE_AND_LIST_PROLOGUE='
#define OPTION_NO_TLS_OPT 301
+#define OPTION_OLD_PLT 302
+#define OPTION_OLD_GOT 303
+#define OPTION_STUBSYMS 304
'
PARSE_AND_LIST_LONGOPTS='
+ { "emit-stub-syms", no_argument, NULL, OPTION_STUBSYMS },
{ "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
+ { "bss-plt", no_argument, NULL, OPTION_OLD_PLT },
+ { "sdata-got", no_argument, NULL, OPTION_OLD_GOT },
'
PARSE_AND_LIST_OPTIONS='
fprintf (file, _("\
- --no-tls-optimize Don'\''t try to optimize TLS accesses.\n"
+ --emit-stub-syms Label linker stubs with a symbol.\n\
+ --no-tls-optimize Don'\''t try to optimize TLS accesses.\n\
+ --bss-plt Force old-style BSS PLT.\n\
+ --sdata-got Force GOT location just before .sdata.\n"
));
'
PARSE_AND_LIST_ARGS_CASES='
+ case OPTION_STUBSYMS:
+ emit_stub_syms = 1;
+ break;
+
case OPTION_NO_TLS_OPT:
notlsopt = 1;
break;
+
+ case OPTION_OLD_PLT:
+ old_plt = 1;
+ break;
+
+ case OPTION_OLD_GOT:
+ old_got = 1;
+ break;
'
-# Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation
+# Put these extra ppc32elf routines in ld_${EMULATION_NAME}_emulation
#
+LDEMUL_AFTER_OPEN=ppc_after_open
LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation
diff --git a/contrib/binutils/ld/emultempl/ppc64elf.em b/contrib/binutils/ld/emultempl/ppc64elf.em
index 4f408a9fa29e..ea337712ed1c 100644
--- a/contrib/binutils/ld/emultempl/ppc64elf.em
+++ b/contrib/binutils/ld/emultempl/ppc64elf.em
@@ -1,5 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
#
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# This file is sourced from elf32.em, and defines extra powerpc64-elf
@@ -44,13 +44,25 @@ static bfd_signed_vma group_size = 1;
static int dotsyms = 1;
/* Whether to run tls optimization. */
-static int notlsopt = 0;
+static int no_tls_opt = 0;
+
+/* Whether to run opd optimization. */
+static int no_opd_opt = 0;
+
+/* Whether to run toc optimization. */
+static int no_toc_opt = 0;
+
+/* Whether to allow multiple toc sections. */
+static int no_multi_toc = 0;
/* Whether to emit symbols for stubs. */
static int emit_stub_syms = 0;
static asection *toc_section = 0;
+/* Whether to canonicalize .opd so that there are no overlapping
+ .opd entries. */
+static int non_overlapping_opd = 0;
/* This is called before the input files are opened. We create a new
fake input file to hold the stub sections. */
@@ -76,54 +88,43 @@ ppc_create_output_section_statements (void)
bfd_get_arch (output_bfd),
bfd_get_mach (output_bfd)))
{
- einfo ("%X%P: can not create BFD %E\n");
+ einfo ("%F%P: can not create BFD %E\n");
return;
}
+ stub_file->the_bfd->flags |= BFD_LINKER_CREATED;
ldlang_add_file (stub_file);
ppc64_elf_init_stub_bfd (stub_file->the_bfd, &link_info);
}
static void
-ppc_after_open (void)
-{
- if (!ppc64_elf_mark_entry_syms (&link_info))
- {
- einfo ("%X%P: can not mark entry symbols %E\n");
- return;
- }
-
- gld${EMULATION_NAME}_after_open ();
-}
-
-static void
ppc_before_allocation (void)
{
if (stub_file != NULL)
{
- if (!ppc64_elf_edit_opd (output_bfd, &link_info))
- {
- einfo ("%X%P: can not edit opd %E\n");
- return;
- }
+ if (!ppc64_elf_edit_opd (output_bfd, &link_info, no_opd_opt,
+ non_overlapping_opd))
+ einfo ("%X%P: can not edit %s %E\n", "opd");
- if (ppc64_elf_tls_setup (output_bfd, &link_info) && !notlsopt)
+ if (ppc64_elf_tls_setup (output_bfd, &link_info) && !no_tls_opt)
{
/* Size the sections. This is premature, but we want to know the
TLS segment layout so that certain optimizations can be done. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, 0, NULL, TRUE);
+ expld.phase = lang_mark_phase_enum;
+ expld.dataseg.phase = exp_dataseg_none;
+ one_lang_size_sections_pass (NULL, TRUE);
if (!ppc64_elf_tls_optimize (output_bfd, &link_info))
- {
- einfo ("%X%P: TLS problem %E\n");
- return;
- }
+ einfo ("%X%P: TLS problem %E\n");
/* We must not cache anything from the preliminary sizing. */
- elf_tdata (output_bfd)->program_header_size = 0;
lang_reset_memory_regions ();
}
+
+ if (!no_toc_opt
+ && !link_info.relocatable
+ && !ppc64_elf_edit_toc (output_bfd, &link_info))
+ einfo ("%X%P: can not edit %s %E\n", "toc");
}
gld${EMULATION_NAME}_before_allocation ();
@@ -234,7 +235,7 @@ ppc_add_stub_section (const char *stub_sec_name, asection *input_section)
info.input_section = input_section;
lang_list_init (&info.add);
- lang_add_section (&info.add, stub_sec, os, stub_file);
+ lang_add_section (&info.add, stub_sec, os);
if (info.add.head == NULL)
goto err_ret;
@@ -259,17 +260,7 @@ ppc_layout_sections_again (void)
add even more stubs. */
need_laying_out = 0;
- lang_reset_memory_regions ();
-
- /* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, 0, NULL, TRUE);
-
- /* Recalculate TOC base. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section, NULL, 0);
+ gld${EMULATION_NAME}_layout_sections_again ();
}
@@ -286,24 +277,33 @@ gld${EMULATION_NAME}_after_allocation (void)
static void
build_toc_list (lang_statement_union_type *statement)
{
- if (statement->header.type == lang_input_section_enum
- && !statement->input_section.ifile->just_syms_flag
- && statement->input_section.section->output_section == toc_section)
- ppc64_elf_next_toc_section (&link_info, statement->input_section.section);
+ if (statement->header.type == lang_input_section_enum)
+ {
+ asection *i = statement->input_section.section;
+
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0
+ && i->output_section == toc_section)
+ ppc64_elf_next_toc_section (&link_info, i);
+ }
}
static void
build_section_lists (lang_statement_union_type *statement)
{
- if (statement->header.type == lang_input_section_enum
- && !statement->input_section.ifile->just_syms_flag
- && statement->input_section.section->output_section != NULL
- && statement->input_section.section->output_section->owner == output_bfd)
+ if (statement->header.type == lang_input_section_enum)
{
- if (!ppc64_elf_next_input_section (&link_info,
- statement->input_section.section))
- einfo ("%X%P: can not size stub section: %E\n");
+ asection *i = statement->input_section.section;
+
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0
+ && i->output_section != NULL
+ && i->output_section->owner == output_bfd)
+ {
+ if (!ppc64_elf_next_input_section (&link_info, i))
+ einfo ("%X%P: can not size stub section: %E\n");
+ }
}
}
@@ -311,7 +311,7 @@ build_section_lists (lang_statement_union_type *statement)
/* Final emulation specific call. */
static void
-gld${EMULATION_NAME}_finish (void)
+ppc_finish (void)
{
/* e_entry on PowerPC64 points to the function descriptor for
_start. If _start is missing, default to the first function
@@ -329,15 +329,12 @@ gld${EMULATION_NAME}_finish (void)
stubs. */
if (stub_file != NULL && !link_info.relocatable)
{
- int ret = ppc64_elf_setup_section_lists (output_bfd, &link_info);
- if (ret != 0)
+ int ret = ppc64_elf_setup_section_lists (output_bfd, &link_info,
+ no_multi_toc);
+ if (ret < 0)
+ einfo ("%X%P: can not size stub section: %E\n");
+ else if (ret > 0)
{
- if (ret < 0)
- {
- einfo ("%X%P: can not size stub section: %E\n");
- return;
- }
-
toc_section = bfd_get_section_by_name (output_bfd, ".got");
if (toc_section != NULL)
lang_for_each_statement (build_toc_list);
@@ -352,21 +349,27 @@ gld${EMULATION_NAME}_finish (void)
group_size,
&ppc_add_stub_section,
&ppc_layout_sections_again))
- {
- einfo ("%X%P: can not size stub section: %E\n");
- return;
- }
+ einfo ("%X%P: can not size stub section: %E\n");
}
}
if (need_laying_out)
ppc_layout_sections_again ();
+ if (link_info.relocatable)
+ {
+ asection *toc = bfd_get_section_by_name (output_bfd, ".toc");
+ if (toc != NULL
+ && bfd_section_size (output_bfd, toc) > 0x10000)
+ einfo ("%X%P: TOC section size exceeds 64k\n");
+ }
+
if (stub_added)
{
char *msg = NULL;
char *line, *endline;
+ emit_stub_syms |= link_info.emitrelocations;
if (!ppc64_elf_build_stubs (emit_stub_syms, &link_info,
config.stats ? &msg : NULL))
einfo ("%X%P: can not build stubs: %E\n");
@@ -381,6 +384,9 @@ gld${EMULATION_NAME}_finish (void)
if (msg != NULL)
free (msg);
}
+
+ ppc64_elf_restore_symbols (&link_info);
+ finish_default ();
}
@@ -420,6 +426,14 @@ gld${EMULATION_NAME}_new_vers_pattern (struct bfd_elf_version_expr *entry)
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;
+ dot_pat = xmalloc (len);
+ dot_pat[0] = '.';
+ memcpy (dot_pat + 1, entry->symbol, len - 1);
+ dot_entry->symbol = dot_pat;
+ }
return dot_entry;
}
@@ -455,6 +469,10 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_DOTSYMS (OPTION_STUBSYMS + 1)
#define OPTION_NO_DOTSYMS (OPTION_DOTSYMS + 1)
#define OPTION_NO_TLS_OPT (OPTION_NO_DOTSYMS + 1)
+#define OPTION_NO_OPD_OPT (OPTION_NO_TLS_OPT + 1)
+#define OPTION_NO_TOC_OPT (OPTION_NO_OPD_OPT + 1)
+#define OPTION_NO_MULTI_TOC (OPTION_NO_TOC_OPT + 1)
+#define OPTION_NON_OVERLAPPING_OPD (OPTION_NO_MULTI_TOC + 1)
'
PARSE_AND_LIST_LONGOPTS='
@@ -463,6 +481,10 @@ PARSE_AND_LIST_LONGOPTS='
{ "dotsyms", no_argument, NULL, OPTION_DOTSYMS },
{ "no-dotsyms", no_argument, NULL, OPTION_NO_DOTSYMS },
{ "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
+ { "no-opd-optimize", no_argument, NULL, OPTION_NO_OPD_OPT },
+ { "no-toc-optimize", no_argument, NULL, OPTION_NO_TOC_OPT },
+ { "no-multi-toc", no_argument, NULL, OPTION_NO_MULTI_TOC },
+ { "non-overlapping-opd", no_argument, NULL, OPTION_NON_OVERLAPPING_OPD },
'
PARSE_AND_LIST_OPTIONS='
@@ -490,6 +512,19 @@ PARSE_AND_LIST_OPTIONS='
fprintf (file, _("\
--no-tls-optimize Don'\''t try to optimize TLS accesses.\n"
));
+ fprintf (file, _("\
+ --no-opd-optimize Don'\''t optimize the OPD section.\n"
+ ));
+ fprintf (file, _("\
+ --no-toc-optimize Don'\''t optimize the TOC section.\n"
+ ));
+ fprintf (file, _("\
+ --no-multi-toc Disallow automatic multiple toc sections.\n"
+ ));
+ fprintf (file, _("\
+ --non-overlapping-opd Canonicalize .opd, so that there are no overlapping\n\
+ .opd entries.\n"
+ ));
'
PARSE_AND_LIST_ARGS_CASES='
@@ -515,15 +550,30 @@ PARSE_AND_LIST_ARGS_CASES='
break;
case OPTION_NO_TLS_OPT:
- notlsopt = 1;
+ no_tls_opt = 1;
+ break;
+
+ case OPTION_NO_OPD_OPT:
+ no_opd_opt = 1;
+ break;
+
+ case OPTION_NO_TOC_OPT:
+ no_toc_opt = 1;
+ break;
+
+ case OPTION_NO_MULTI_TOC:
+ no_multi_toc = 1;
+ break;
+
+ case OPTION_NON_OVERLAPPING_OPD:
+ non_overlapping_opd = 1;
break;
'
# Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation
#
-LDEMUL_AFTER_OPEN=ppc_after_open
LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation
LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation
-LDEMUL_FINISH=gld${EMULATION_NAME}_finish
+LDEMUL_FINISH=ppc_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/sunos.em b/contrib/binutils/ld/emultempl/sunos.em
index 358bc9aabb96..a480558c9069 100644
--- a/contrib/binutils/ld/emultempl/sunos.em
+++ b/contrib/binutils/ld/emultempl/sunos.em
@@ -9,8 +9,8 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* SunOS emulation code for ${EMULATION_NAME}
- Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
SunOS shared library support by Ian Lance Taylor <ian@cygnus.com>
@@ -28,7 +28,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_IS_${EMULATION_NAME}
@@ -671,7 +671,7 @@ gld${EMULATION_NAME}_before_allocation (void)
{
struct bfd_link_hash_entry *h;
- for (h = link_info.hash->undefs; h != NULL; h = h->und_next)
+ for (h = link_info.hash->undefs; h != NULL; h = h->u.undef.next)
{
if (h->type == bfd_link_hash_undefined
&& h->u.undef.abfd != NULL
@@ -744,7 +744,7 @@ gld${EMULATION_NAME}_before_allocation (void)
dynamic object. */
ASSERT (need_entries != 0);
- sneed->_raw_size = need_size;
+ sneed->size = need_size;
sneed->contents = (bfd_byte *) xmalloc (need_size);
need_contents = sneed->contents;
@@ -764,7 +764,7 @@ gld${EMULATION_NAME}_before_allocation (void)
option. */
if (command_line.rpath)
{
- srules->_raw_size = strlen (command_line.rpath);
+ srules->size = strlen (command_line.rpath);
srules->contents = (bfd_byte *) command_line.rpath;
}
else
@@ -776,7 +776,7 @@ gld${EMULATION_NAME}_before_allocation (void)
for (search = search_head; search != NULL; search = search->next)
if (search->cmdline)
size += strlen (search->name) + 1;
- srules->_raw_size = size;
+ srules->size = size;
if (size > 0)
{
char *p;
@@ -810,6 +810,8 @@ gld${EMULATION_NAME}_before_allocation (void)
else
hdyn->u.def.section = bfd_abs_section_ptr;
}
+
+ before_allocation_default ();
}
/* This is called by the before_allocation routine via
@@ -917,7 +919,7 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
bfd_put_32 (output_bfd, (bfd_vma) 0, need_pinfo + 4);
bfd_put_16 (output_bfd, (bfd_vma) 0, need_pinfo + 8);
bfd_put_16 (output_bfd, (bfd_vma) 0, need_pinfo + 10);
- strcpy (need_pnames, inp->filename);
+ strcpy ((char *) need_pnames, inp->filename);
}
else
{
@@ -932,7 +934,7 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
sscanf (verstr, ".so.%d.%d", &maj, &min);
bfd_put_16 (output_bfd, (bfd_vma) maj, need_pinfo + 8);
bfd_put_16 (output_bfd, (bfd_vma) min, need_pinfo + 10);
- strcpy (need_pnames, inp->local_sym_name + 2);
+ strcpy ((char *) need_pnames, inp->local_sym_name + 2);
}
c = (need_pinfo - need_contents) / NEED_ENTRY_SIZE;
@@ -943,7 +945,7 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
need_pinfo + 12);
need_pinfo += NEED_ENTRY_SIZE;
- need_pnames += strlen (need_pnames) + 1;
+ need_pnames += strlen ((char *) need_pnames) + 1;
}
}
@@ -1014,7 +1016,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL, /* finish */
+ finish_default,
gld${EMULATION_NAME}_create_output_section_statements,
NULL, /* open dynamic archive */
NULL, /* place orphan */
diff --git a/contrib/binutils/ld/emultempl/ticoff.em b/contrib/binutils/ld/emultempl/ticoff.em
index 8f86b04f0c7c..0382bbdd8658 100644
--- a/contrib/binutils/ld/emultempl/ticoff.em
+++ b/contrib/binutils/ld/emultempl/ticoff.em
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* For TI COFF */
/* Need to determine load and run pages for output sections */
@@ -165,7 +165,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
gld_${EMULATION_NAME}_get_script,
"${EMULATION_NAME}",
"${OUTPUT_FORMAT}",
- NULL, /* finish */
+ finish_default,
NULL, /* create output section statements */
NULL, /* open dynamic archive */
NULL, /* place orphan */
diff --git a/contrib/binutils/ld/emultempl/vanilla.em b/contrib/binutils/ld/emultempl/vanilla.em
index 21410836752d..212485268734 100644
--- a/contrib/binutils/ld/emultempl/vanilla.em
+++ b/contrib/binutils/ld/emultempl/vanilla.em
@@ -20,7 +20,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -68,7 +68,7 @@ struct ld_emulation_xfer_struct ld_vanilla_emulation =
vanilla_get_script,
"vanilla",
"a.out-sunos-big",
- NULL, /* finish */
+ finish_default,
NULL, /* create output section statements */
NULL, /* open dynamic archive */
NULL, /* place orphan */
diff --git a/contrib/binutils/ld/fdl.texi b/contrib/binutils/ld/fdl.texi
index c6409a3a1a33..cc3cd011e962 100644
--- a/contrib/binutils/ld/fdl.texi
+++ b/contrib/binutils/ld/fdl.texi
@@ -4,8 +4,8 @@
@center Version 1.1, March 2000
@display
-Copyright (C) 2000, Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/contrib/binutils/ld/gen-doc.texi b/contrib/binutils/ld/gen-doc.texi
index 5add195d2f9f..800f64e2fae4 100644
--- a/contrib/binutils/ld/gen-doc.texi
+++ b/contrib/binutils/ld/gen-doc.texi
@@ -9,6 +9,8 @@
@set HPPA
@set MMIX
@set MSP430
+@set POWERPC
+@set POWERPC64
@set TICOFF
@set WIN32
@set XTENSA
diff --git a/contrib/binutils/ld/genscripts.sh b/contrib/binutils/ld/genscripts.sh
index 01682036f335..e9d4f153a7a7 100755
--- a/contrib/binutils/ld/genscripts.sh
+++ b/contrib/binutils/ld/genscripts.sh
@@ -4,6 +4,7 @@
# Usage: genscripts_extra.sh \
# srcdir \
# libdir \
+# prefix \
# exec_prefix \
# host \
# target \
@@ -22,6 +23,7 @@
# /sources/ld \
# /usr/local/lib \
# /usr/local \
+# /usr/local \
# sparc-sun-sunos4.1.3 \
# sparc-sun-sunos4.1.3 \
# sparc-sun-sunos4.1.3 \
@@ -59,17 +61,18 @@
srcdir=$1
libdir=$2
-exec_prefix=$3
-host=$4
-target=$5
-target_alias=$6
-EMULATION_LIBPATH=$7
-NATIVE_LIB_DIRS=$8
-use_sysroot=$9
+prefix=$3
+exec_prefix=$4
+host=$5
+target=$6
+target_alias=$7
+EMULATION_LIBPATH=$8
+NATIVE_LIB_DIRS=$9
shift 9
-EMULATION_NAME=$1
-TOOL_LIB=$2
-CUSTOMIZER_SCRIPT=$3
+use_sysroot=$1
+EMULATION_NAME=$2
+TOOL_LIB=$3
+CUSTOMIZER_SCRIPT=$4
# Can't use ${TOOL_LIB:-$target_alias} here due to an Ultrix shell bug.
if [ "x${TOOL_LIB}" = "x" ] ; then
@@ -191,13 +194,12 @@ fi
LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
# We need it for testsuite.
-case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
+set $EMULATION_LIBPATH
+if [ "x$1" = "x$EMULATION_NAME" ]; then
test -d tmpdir || mkdir tmpdir
- test -f tmpdir/libpath.exp || \
+ rm -f tmpdir/libpath.exp
echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp
- ;;
-esac
+fi
# Generate 5 or 6 script files from a master script template in
# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6
@@ -283,7 +285,16 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
rm -f ${COMBRELOC}
+ LD_FLAG=w
+ RELRO_NOW=" "
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xw.tmp
+ ( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw
+ rm -f ${COMBRELOC}
COMBRELOC=
+ unset RELRO_NOW
fi
if test -n "$GENERATE_SHLIB_SCRIPT"; then
@@ -299,13 +310,22 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cshared
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xsc.tmp
( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
rm -f ${COMBRELOC}
+ LD_FLAG=wshared
+ RELRO_NOW=" "
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xsw.tmp
+ ( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw
+ rm -f ${COMBRELOC}
COMBRELOC=
+ unset RELRO_NOW
fi
unset CREATE_SHLIB
fi
@@ -323,13 +343,22 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cpie
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xdc.tmp
( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
rm -f ${COMBRELOC}
+ LD_FLAG=wpie
+ RELRO_NOW=" "
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xdw.tmp
+ ( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw
+ rm -f ${COMBRELOC}
COMBRELOC=
+ unset RELRO_NOW
fi
unset CREATE_PIE
fi
diff --git a/contrib/binutils/ld/ld.1 b/contrib/binutils/ld/ld.1
index 87ee2027ece5..26003aae5ff7 100644
--- a/contrib/binutils/ld/ld.1
+++ b/contrib/binutils/ld/ld.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -25,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" 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-
@@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "LD 1"
-.TH LD 1 "2004-05-17" "binutils-2.15" "GNU Development Tools"
+.TH LD 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
.SH "NAME"
ld \- Using LD, the GNU linker
.SH "SYNOPSIS"
@@ -173,7 +173,7 @@ 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
+\& ld \-o <output> /lib/crt0.o hello.o \-lc
.Ve
.PP
This tells \fBld\fR to produce a file called \fIoutput\fR as the
@@ -239,7 +239,7 @@ 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
+\& gcc \-Wl,\-\-startgroup foo.o bar.o \-Wl,\-\-endgroup
.Ve
.PP
This is important, because otherwise the compiler driver program may
@@ -247,6 +247,19 @@ 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
@@ -334,6 +347,16 @@ 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
@@ -355,7 +378,7 @@ 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 \f(CW@ref\fR{\s-1VERSION\s0}.
+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.
@@ -529,12 +552,40 @@ 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 and symbols are mapped into memory.
+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
@@ -590,6 +641,10 @@ 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
@@ -743,6 +798,9 @@ lookup caching possible.
.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.
@@ -781,6 +839,12 @@ 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
@@ -791,6 +855,9 @@ 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
@@ -840,9 +907,23 @@ This option affects \s-1ELF\s0 \s-1DT_NEEDED\s0 tags for dynamic libraries menti
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 reference from regular objects.
+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.
@@ -882,7 +963,11 @@ 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.
+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
@@ -897,7 +982,7 @@ platforms which support shared libraries.
.IX Item "--no-check-sections"
.PD
Asks the linker \fInot\fR to check section addresses after they have
-been assigned to see if there any overlaps. Normally the linker will
+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
@@ -938,7 +1023,7 @@ 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
+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]"
@@ -961,13 +1046,6 @@ 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\-\-embedded\-relocs\fR" 4
-.IX Item "--embedded-relocs"
-This option is only meaningful when linking \s-1MIPS\s0 embedded \s-1PIC\s0 code,
-generated by the \-membedded\-pic option to the \s-1GNU\s0 compiler and
-assembler. It causes the linker to create a table which may be used at
-runtime to relocate any data which was statically initialized to pointer
-values. See the code in testsuite/ld\-empic for details.
.IP "\fB\-\-fatal\-warnings\fR" 4
.IX Item "--fatal-warnings"
Treat all warnings as errors.
@@ -989,9 +1067,9 @@ it ends in a \f(CW\*(C`.exe\*(C'\fR suffix.
.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, nor should it be used with dynamic linking. The default
-behaviour (of not performing this garbage collection) can be restored by
-specifying \fB\-\-no\-gc\-sections\fR on the command line.
+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.
@@ -1055,6 +1133,14 @@ for \s-1HPPA\s0 shared libraries to have undefined symbols.
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
@@ -1238,6 +1324,14 @@ 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
@@ -1259,6 +1353,11 @@ many relocations. \fIcount\fR defaults to a value of 32768.
.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
@@ -1281,7 +1380,7 @@ line.
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.
+sign ("\fB=\fR"), and \fIorg\fR.
.IP "\fB\-Tbss\fR \fIorg\fR" 4
.IX Item "-Tbss org"
.PD 0
@@ -1452,6 +1551,9 @@ 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
@@ -1508,6 +1610,10 @@ 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
@@ -1520,6 +1626,27 @@ systems may not understand them. If you specify
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
@@ -1558,7 +1685,7 @@ file.
.IX Item "--disable-stdcall-fixup"
.PD
If the link finds a symbol that it cannot resolve, it will attempt to
-do ``fuzzy linking'' by looking for another defined symbol that differs
+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
@@ -1601,14 +1728,6 @@ These cygwin-excludes are: \f(CW\*(C`_cygwin_dll_entry@12\*(C'\fR,
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\-\-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. Symbols explicitly listed in a .def file are still exported,
-regardless of this option.
-[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
@@ -1639,29 +1758,37 @@ for dlls.
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 ``image version''. Defaults to 1.
+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 ``os version''. Defaults to 4.
+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 ``subsystem version''. Defaults to 4.
+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 ``image version''. Defaults to 0.
+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 ``os version''. Defaults to 0.
+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 ``subsystem version''. Defaults to 0.
+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"
@@ -1742,7 +1869,7 @@ a variable, or b) make the 'constant' index a variable. Thus:
.Sp
.Vb 3
\& extern type extern_array[];
-\& extern_array[1] -->
+\& extern_array[1] \-\->
\& { volatile type *t=extern_array; t[1] }
.Ve
.Sp
@@ -1750,7 +1877,7 @@ or
.Sp
.Vb 3
\& extern type extern_array[];
-\& extern_array[1] -->
+\& extern_array[1] \-\->
\& { volatile int t=1; extern_array[t] }
.Ve
.Sp
@@ -1759,15 +1886,15 @@ 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 }
+\& extern_struct.field \-\->
+\& { volatile struct s *t=&extern_struct; t\->field }
.Ve
.Sp
or
.Sp
.Vb 3
\& extern long long extern_ll;
-\& extern_ll -->
+\& extern_ll \-\->
\& { volatile long long * local_ll=&extern_ll; *local_ll }
.Ve
.Sp
@@ -1783,9 +1910,9 @@ constant offset' problem, you should consider typical real-world usage:
Original:
.Sp
.Vb 7
-\& --foo.h
+\& \-\-foo.h
\& extern int arr[];
-\& --foo.c
+\& \-\-foo.c
\& #include "foo.h"
\& void main(int argc, char **argv){
\& printf("%d\en",arr[1]);
@@ -1795,9 +1922,9 @@ Original:
Solution 1:
.Sp
.Vb 9
-\& --foo.h
+\& \-\-foo.h
\& extern int arr[];
-\& --foo.c
+\& \-\-foo.c
\& #include "foo.h"
\& void main(int argc, char **argv){
\& /* This workaround is for win32 and cygwin; do not "optimize" */
@@ -1809,8 +1936,8 @@ Solution 1:
Solution 2:
.Sp
.Vb 14
-\& --foo.h
-\& /* Note: auto-export is assumed (no __declspec(dllexport)) */
+\& \-\-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)
@@ -1818,7 +1945,7 @@ Solution 2:
\& #define FOO_IMPORT
\& #endif
\& extern FOO_IMPORT int arr[];
-\& --foo.c
+\& \-\-foo.c
\& #include "foo.h"
\& void main(int argc, char **argv){
\& printf("%d\en",arr[1]);
@@ -1876,9 +2003,24 @@ committed.
.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, and \f(CW\*(C`posix\*(C'\fR. You may optionally set the
-subsystem version also.
+\&\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
@@ -1926,4 +2068,4 @@ 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 ``\s-1GNU\s0 Free Documentation License''.
+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 dde4cfe2340e..b5a4f55746a0 100644
--- a/contrib/binutils/ld/ld.h
+++ b/contrib/binutils/ld/ld.h
@@ -1,5 +1,6 @@
/* ld.h -- general linker header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,13 +17,49 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LD_H
#define LD_H
#ifdef HAVE_LOCALE_H
+#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
@@ -64,13 +101,18 @@ typedef struct name_list {
}
name_list;
-/* A wildcard specification. This is only used in ldgram.y, but it
- winds up in ldgram.h, so we need to define it outside. */
+/* A wildcard specification. */
+
+typedef enum {
+ none, by_name, by_alignment, by_name_alignment, by_alignment_name
+} sort_type;
+
+extern sort_type sort_section;
struct wildcard_spec {
const char *name;
struct name_list *exclude_name_list;
- bfd_boolean sorted;
+ sort_type sorted;
};
struct wildcard_list {
@@ -78,11 +120,19 @@ struct wildcard_list {
struct wildcard_spec spec;
};
-/* Extra information we hold on sections */
-typedef struct user_section_struct {
- /* Pointer to the section where this data will go */
- struct lang_input_statement_struct *file;
-} section_userdata_type;
+struct map_symbol_def {
+ struct bfd_link_hash_entry *entry;
+ struct map_symbol_def *next;
+};
+
+/* The initial part of fat_user_section_struct has to be idential with
+ lean_user_section_struct. */
+typedef struct fat_user_section_struct {
+ /* For input sections, when writing a map file: head / tail of a linked
+ list of hash table entries for symbols defined in this section. */
+ struct map_symbol_def *map_symbol_def_head;
+ struct map_symbol_def **map_symbol_def_tail;
+} fat_section_userdata_type;
#define get_userdata(x) ((x)->userdata)
@@ -129,9 +179,6 @@ typedef struct {
files. */
bfd_boolean warn_mismatch;
- /* Remove unreferenced sections? */
- bfd_boolean gc_sections;
-
/* Name of shared object whose symbol table should be filtered with
this shared object. From the --filter option. */
char *filter_shlib;
@@ -154,6 +201,10 @@ 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;
+
} args_type;
extern args_type command_line;
@@ -216,16 +267,13 @@ typedef struct {
/* If set, only search library directories explicitly selected
on the command line. */
bfd_boolean only_cmd_line_lib_dirs;
+
+ /* The size of the hash table to use. */
+ bfd_size_type hash_table_size;
} ld_config_type;
extern ld_config_type config;
-typedef enum {
- lang_first_phase_enum,
- lang_allocating_phase_enum,
- lang_final_phase_enum
-} lang_phase_type;
-
extern FILE * saved_script_handle;
extern bfd_boolean force_make_executable;
@@ -234,6 +282,7 @@ extern int parsing_defsym;
extern int yyparse (void);
extern void add_cref (const char *, bfd *, asection *, bfd_vma);
+extern bfd_boolean handle_asneeded_cref (bfd *, enum notice_asneeded_action);
extern void output_cref (FILE *);
extern void check_nocrossrefs (void);
extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo
index 4310c12d8b3f..07bb0c3d93a0 100644
--- a/contrib/binutils/ld/ld.texinfo
+++ b/contrib/binutils/ld/ld.texinfo
@@ -1,11 +1,13 @@
\input texinfo
@setfilename ld.info
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+@c 2001, 2002, 2003, 2004, 2005 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
+@c man end
@c @smallbook
@@ -18,7 +20,6 @@
@c Configure for the generation of man pages
@set UsesEnvVars
@set GENERIC
-@set A29K
@set ARC
@set ARM
@set D10V
@@ -39,6 +40,8 @@
@set MSP430
@set PDP11
@set PJ
+@set POWERPC
+@set POWERPC64
@set SH
@set SPARC
@set TIC54X
@@ -152,6 +155,15 @@ section entitled ``GNU Free Documentation License''.
@ifset HPPA
* HPPA ELF32:: ld and HPPA 32-bit ELF
@end ifset
+@ifset M68HC11
+* M68HC11/68HC12:: ld and the Motorola 68HC11 and 68HC12 families
+@end ifset
+@ifset POWERPC
+* PowerPC ELF32:: ld and PowerPC 32-bit ELF Support
+@end ifset
+@ifset POWERPC64
+* PowerPC64 ELF64:: ld and PowerPC64 64-bit ELF Support
+@end ifset
@ifset TICOFF
* TI COFF:: ld and the TI COFF
@end ifset
@@ -338,6 +350,8 @@ Here is a table of the generic command line switches accepted by the GNU
linker:
@table @gcctabopt
+@include at-file.texi
+
@kindex -a@var{keyword}
@item -a@var{keyword}
This option is supported for HP/UX compatibility. The @var{keyword}
@@ -446,6 +460,17 @@ base 10; you may use a leading @samp{0x} for base 16, or a leading
@samp{0} for base 8). @xref{Entry Point}, for a discussion of defaults
and other ways of specifying the entry point.
+@kindex --exclude-libs
+@item --exclude-libs @var{lib},@var{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
+@code{--exclude-libs ALL} excludes symbols in all archive libraries from
+automatic export. This option is available only for the i386 PE targeted
+port of the linker and for ELF targeted ports. For i386 PE, symbols
+explicitly listed in a .def file are still exported, regardless of this
+option. For ELF targeted ports, symbols affected by this option will
+be treated as hidden.
+
@cindex dynamic symbol table
@kindex -E
@kindex --export-dynamic
@@ -661,12 +686,40 @@ information about the link, including the following:
@itemize @bullet
@item
-Where object files and symbols are mapped into memory.
+Where object files are mapped into memory.
@item
How common symbols are allocated.
@item
All archive members included in the link, with a mention of the symbol
which caused the archive member to be brought in.
+@item
+The values assigned to symbols.
+
+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:
+
+@smallexample
+ foo = 1
+ foo = foo * 4
+ foo = foo + 8
+@end smallexample
+
+will produce the following output in the link map if the @option{-M}
+option is used:
+
+@smallexample
+ 0x00000001 foo = 0x1
+ [0x0000000c] foo = (foo * 0x4)
+ [0x0000000c] foo = (foo + 0x8)
+@end smallexample
+
+See @ref{Expressions} for more information about expressions in linker
+scripts.
@end itemize
@kindex -n
@@ -727,6 +780,12 @@ in larger executables.
This option is currently only supported on ELF platforms.
+@kindex --force-dynamic
+@cindex forcing the creation of dynamic sections
+@item --force-dynamic
+Force the output file to have dynamic sections. This option is specific
+to VxWorks targets.
+
@cindex partial link
@cindex relocatable output
@kindex -r
@@ -888,6 +947,9 @@ lookup caching possible.
Disallows undefined symbols in object files. Undefined symbols in
shared libraries are still allowed.
+@item execstack
+Marks the object as requiring executable stack.
+
@item initfirst
This option is only meaningful when building a shared object.
It marks the object so that its runtime initialization will occur
@@ -926,6 +988,12 @@ Marks the object not available to @code{dlopen}.
@item nodump
Marks the object can not be dumped by @code{dldump}.
+@item noexecstack
+Marks the object as not requiring executable stack.
+
+@item norelro
+Don't create an ELF @code{PT_GNU_RELRO} segment header in the object.
+
@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
@@ -936,6 +1004,9 @@ first called.
@item origin
Marks the object may contain $ORIGIN.
+@item relro
+Create an ELF @code{PT_GNU_RELRO} segment header in the object.
+
@end table
Other keywords are ignored for Solaris compatibility.
@@ -980,10 +1051,23 @@ This option affects ELF DT_NEEDED tags for dynamic libraries mentioned
on the command line after the @option{--as-needed} option. Normally,
the linker will add a DT_NEEDED tag for each dynamic library mentioned
on the command line, regardless of whether the library is actually
-needed. @option{--as-needed} causes DT_NEEDED tags to only be emitted
-for libraries that satisfy some reference from regular objects.
+needed. @option{--as-needed} causes DT_NEEDED 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.
@option{--no-as-needed} restores the default behaviour.
+@kindex --add-needed
+@kindex --no-add-needed
+@item --add-needed
+@itemx --no-add-needed
+This option affects the treatment of dynamic libraries from ELF
+DT_NEEDED tags in dynamic libraries mentioned on the command line after
+the @option{--no-add-needed} option. Normally, the linker will add
+a DT_NEEDED tag for each dynamic library from DT_NEEDED tags.
+@option{--no-add-needed} causes DT_NEEDED tags will never be emitted
+for those libraries from DT_NEEDED tags. @option{--add-needed} restores
+the default behaviour.
+
@kindex -assert @var{keyword}
@item -assert @var{keyword}
This option is ignored for SunOS compatibility.
@@ -1022,7 +1106,11 @@ 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 @option{-l} options which follow it. This
-option also implies @option{--unresolved-symbols=report-all}.
+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.
@kindex -Bsymbolic
@item -Bsymbolic
@@ -1037,7 +1125,7 @@ platforms which support shared libraries.
@item --check-sections
@itemx --no-check-sections
Asks the linker @emph{not} to check section addresses after they have
-been assigned to see if there any overlaps. Normally the linker will
+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
@@ -1113,15 +1201,6 @@ generating dynamically linked ELF executables. The default dynamic
linker is normally correct; don't use this unless you know what you are
doing.
-@cindex MIPS embedded PIC code
-@kindex --embedded-relocs
-@item --embedded-relocs
-This option is only meaningful when linking MIPS embedded PIC code,
-generated by the -membedded-pic option to the @sc{gnu} compiler and
-assembler. It causes the linker to create a table which may be used at
-runtime to relocate any data which was statically initialized to pointer
-values. See the code in testsuite/ld-empic for details.
-
@kindex --fatal-warnings
@item --fatal-warnings
@@ -1145,9 +1224,9 @@ it ends in a @code{.exe} suffix.
@itemx --gc-sections
Enable garbage collection of unused input sections. It is ignored on
targets that do not support this option. This option is not compatible
-with @samp{-r}, nor should it be used with dynamic linking. The default
-behaviour (of not performing this garbage collection) can be restored by
-specifying @samp{--no-gc-sections} on the command line.
+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.
@cindex help
@cindex usage
@@ -1217,6 +1296,16 @@ 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.
+@kindex --default-symver
+@item --default-symver
+Create and use a default symbol version (the soname) for unversioned
+exported symbols.
+
+@kindex --default-imported-symver
+@item --default-imported-symver
+Create and use a default symbol version (the soname) for unversioned
+imported symbols.
+
@kindex --no-warn-mismatch
@item --no-warn-mismatch
Normally @command{ld} will give an error if you try to link together input
@@ -1299,6 +1388,12 @@ This option is only supported on a few targets.
@ifset XTENSA
@xref{Xtensa,, @command{ld} and Xtensa Processors}.
@end ifset
+@ifset M68HC11
+@xref{M68HC11/68HC12,,@command{ld} and the 68HC11 and 68HC12}.
+@end ifset
+@ifset POWERPC
+@xref{PowerPC ELF32,,@command{ld} and PowerPC 32-bit ELF Support}.
+@end ifset
On some platforms, the @samp{--relax} option performs global
optimizations that become possible when the linker resolves addressing
@@ -1440,6 +1535,16 @@ byte symbols, then all the two byte, then all the four byte, and then
everything else. This is to prevent gaps between symbols due to
alignment constraints.
+@kindex --sort-section name
+@item --sort-section name
+This option will apply @code{SORT_BY_NAME} to all wildcard section
+patterns in the linker script.
+
+@kindex --sort-section alignment
+@item --sort-section alignment
+This option will apply @code{SORT_BY_ALIGNMENT} to all wildcard section
+patterns in the linker script.
+
@kindex --split-by-file
@item --split-by-file [@var{size}]
Similar to @option{--split-by-reloc} but creates a new output section for
@@ -1464,6 +1569,12 @@ many relocations. @var{count} defaults to a value of 32768.
Compute and display statistics about the operation of the linker, such
as execution time and memory usage.
+@kindex --sysroot
+@item --sysroot=@var{directory}
+Use @var{directory} as the location of the sysroot, overriding the
+configure-time default. This option is only supported by linkers
+that were configured using @option{--with-sysroot}.
+
@kindex --traditional-format
@cindex traditional format
@item --traditional-format
@@ -1671,6 +1782,10 @@ The address will only be changed if it not explicitly specified; that
is, if the @code{SECTIONS} command does not specify a start address for
the section (@pxref{SECTIONS}).
+@kindex --warn-shared-textrel
+@item --warn-shared-textrel
+Warn if the linker adds a DT_TEXTREL to a shared object.
+
@kindex --warn-unresolved-symbols
@item --warn-unresolved-symbols
If the linker is going to report an unresolved symbol (see the option
@@ -1732,6 +1847,11 @@ you should not put the definition of @code{__real_malloc} in the same
file as @code{__wrap_malloc}; if you do, the assembler may resolve the
call before the linker has a chance to wrap it to @code{malloc}.
+@kindex --eh-frame-hdr
+@item --eh-frame-hdr
+Request creation of @code{.eh_frame_hdr} section and ELF
+@code{PT_GNU_EH_FRAME} segment header.
+
@kindex --enable-new-dtags
@kindex --disable-new-dtags
@item --enable-new-dtags
@@ -1743,6 +1863,29 @@ If you specify @option{--disable-new-dtags}, no new dynamic tags will be
created. By default, the new dynamic tags are not created. Note that
those options are only available for ELF systems.
+@kindex --hash-size=@var{number}
+@item --hash-size=@var{number}
+Set the default size of the linker's hash tables to a prime number
+close to @var{number}. 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.
+
+@kindex --reduce-memory-overheads
+@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.
+
+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 @option{--hash-size} switch
+has been used.
+
+The @option{--reduce-memory-overheads} switch may be also be used to
+enable other tradeoffs in future versions of the linker.
+
@end table
@c man end
@@ -1839,15 +1982,6 @@ 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 PE targeted port of the linker]
-@kindex --exclude-libs
-@item --exclude-libs @var{lib},@var{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
-@code{--exclude-libs ALL} excludes symbols in all archive libraries from
-automatic export. Symbols explicitly listed in a .def file are still exported,
-regardless of this option.
-[This option is specific to the i386 PE targeted port of the linker]
-
@kindex --file-alignment
@item --file-alignment
Specify the file alignment. Sections in the file will always begin at
@@ -1881,6 +2015,15 @@ If given, the stdcall suffixes (@@@var{nn}) will be stripped from
symbols before they are exported.
[This option is specific to the i386 PE targeted port of the linker]
+@kindex --large-address-aware
+@item --large-address-aware
+If given, the appropriate bit in the ``Charateristics'' 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
+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]
+
@kindex --major-image-version
@item --major-image-version @var{value}
Sets the major number of the ``image version''. Defaults to 1.
@@ -2131,14 +2274,43 @@ committed.
@itemx --subsystem @var{which}:@var{major}.@var{minor}
Specifies the subsystem under which your program will execute. The
legal values for @var{which} are @code{native}, @code{windows},
-@code{console}, and @code{posix}. You may optionally set the
-subsystem version also.
+@code{console}, @code{posix}, and @code{xbox}. You may optionally set
+the subsystem version also. Numeric values are also accepted for
+@var{which}.
[This option is specific to the i386 PE targeted port of the linker]
@end table
@c man end
+@ifset M68HC11
+@subsection Options specific to Motorola 68HC11 and 68HC12 targets
+
+@c man begin OPTIONS
+
+The 68HC11 and 68HC12 linkers support specific options to control the
+memory bank switching mapping and trampoline code generation.
+
+@table @gcctabopt
+
+@kindex --no-trampoline
+@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 @code{jsr}
+instruction (this happens when a pointer to a far function is taken).
+
+@kindex --bank-window
+@item --bank-window @var{name}
+This option indicates to the linker the name of the memory region in
+the @samp{MEMORY} 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.
+
+@end table
+
+@c man end
+@end ifset
+
@ifset UsesEnvVars
@node Environment
@section Environment Variables
@@ -2365,7 +2537,7 @@ at address @samp{0x8000000}. After the linker places the @samp{.data}
output section, the value of the location counter will be
@samp{0x8000000} plus the size of the @samp{.data} output section. The
effect is that the linker will place the @samp{.bss} output section
-immediately after the @samp{.data} output section in memory
+immediately after the @samp{.data} output section in memory.
The linker will ensure that each output section has the required
alignment, by increasing the location counter if necessary. In this
@@ -2475,6 +2647,18 @@ files should all be archives, and they are searched repeatedly until no
new undefined references are created. See the description of @samp{-(}
in @ref{Options,,Command Line Options}.
+@item AS_NEEDED(@var{file}, @var{file}, @dots{})
+@itemx AS_NEEDED(@var{file} @var{file} @dots{})
+@kindex AS_NEEDED(@var{files})
+This construct can appear only inside of the @code{INPUT} or @code{GROUP}
+commands, among other filenames. The files listed will be handled
+as if they appear directly in the @code{INPUT} or @code{GROUP} commands,
+with the exception of ELF shared libraries, that will be added only
+when they are actually needed. This construct essentially enables
+@option{--as-needed} option for all the files listed inside of it
+and restores previous @option{--as-needed} resp. @option{--no-as-needed}
+setting afterwards.
+
@item OUTPUT(@var{filename})
@kindex OUTPUT(@var{filename})
@cindex output file name in linker scripot
@@ -2627,11 +2811,13 @@ the @samp{-f} option.
@cindex symbol definition, scripts
@cindex variables, defining
You may assign a value to a symbol in a linker script. This will define
-the symbol as a global symbol.
+the symbol and place it into the symbol table with a global scope.
@menu
* Simple Assignments:: Simple Assignments
* PROVIDE:: PROVIDE
+* PROVIDE_HIDDEN:: PROVIDE_HIDDEN
+* Source Code Reference:: How to use a linker script defined symbol in source code
@end menu
@node Simple Assignments
@@ -2656,7 +2842,7 @@ The first case will define @var{symbol} to the value of
defined, and the value will be adjusted accordingly.
The special symbol name @samp{.} indicates the location counter. You
-may only use this within a @code{SECTIONS} command.
+may only use this within a @code{SECTIONS} command. @xref{Location Counter}.
The semicolon after @var{expression} is required.
@@ -2724,6 +2910,119 @@ underscore), the linker will silently use the definition in the program.
If the program references @samp{etext} but does not define it, the
linker will use the definition in the linker script.
+@node PROVIDE_HIDDEN
+@subsection PROVIDE_HIDDEN
+@cindex PROVIDE_HIDDEN
+Similar to @code{PROVIDE}. For ELF targeted ports, the symbol will be
+hidden and won't be exported.
+
+@node Source Code Reference
+@subsection Source Code Reference
+
+Accessing a linker script defined variable from source code is not
+intuitive. In particular a linker script symbol is not equivalent to
+a variable declaration in a high level language, it is instead a
+symbol that does not have a value.
+
+Before going further, it is important to note that compilers often
+transform names in the source code into different names when they are
+stored in the symbol table. For example, Fortran compilers commonly
+prepend or append an underscore, and C++ performs extensive @samp{name
+mangling}. Therefore there might be a discrepancy between the name
+of a variable as it is used in source code and the name of the same
+variable as it is defined in a linker script. For example in C a
+linker script variable might be referred to as:
+
+@smallexample
+ extern int foo;
+@end smallexample
+
+But in the linker script it might be defined as:
+
+@smallexample
+ _foo = 1000;
+@end smallexample
+
+In the remaining examples however it is assumed that no name
+transformation has taken place.
+
+When a symbol is declared in a high level language such as C, two
+things happen. The first is that the compiler reserves enough space
+in the program's memory to hold the @emph{value} of the symbol. The
+second is that the compiler creates an entry in the program's symbol
+table which holds the symbol's @emph{address}. ie the symbol table
+contains the address of the block of memory holding the symbol's
+value. So for example the following C declaration, at file scope:
+
+@smallexample
+ int foo = 1000;
+@end smallexample
+
+creates a entry called @samp{foo} in the symbol table. This entry
+holds the address of an @samp{int} sized block of memory where the
+number 1000 is initially stored.
+
+When a program references a symbol the compiler generates code that
+first accesses the symbol table to find the address of the symbol's
+memory block and then code to read the value from that memory block.
+So:
+
+@smallexample
+ foo = 1;
+@end smallexample
+
+looks up the symbol @samp{foo} in the symbol table, gets the address
+associated with this symbol and then writes the value 1 into that
+address. Whereas:
+
+@smallexample
+ int * a = & foo;
+@end smallexample
+
+looks up the symbol @samp{foo} in the symbol table, gets it address
+and then copies this address into the block of memory associated with
+the variable @samp{a}.
+
+Linker scripts symbol declarations, by contrast, create an entry in
+the symbol table but do not assign any memory to them. Thus they are
+an address without a value. So for example the linker script definition:
+
+@smallexample
+ foo = 1000;
+@end smallexample
+
+creates an entry in the symbol table called @samp{foo} which holds
+the address of memory location 1000, but nothing special is stored at
+address 1000. This means that you cannot access the @emph{value} of a
+linker script defined symbol - it has no value - all you can do is
+access the @emph{address} of a linker script defined symbol.
+
+Hence when you are using a linker script defined symbol in source code
+you should always take the address of the symbol, and never attempt to
+use its value. For example suppose you want to copy the contents of a
+section of memory called .ROM into a section called .FLASH and the
+linker script contains these declarations:
+
+@smallexample
+@group
+ start_of_ROM = .ROM;
+ end_of_ROM = .ROM + sizeof (.ROM) - 1;
+ start_of_FLASH = .FLASH;
+@end group
+@end smallexample
+
+Then the C source code to perform the copy would be:
+
+@smallexample
+@group
+ extern char start_of_ROM, end_of_ROM, start_of_FLASH;
+
+ memcpy (& start_of_FLASH, & start_of_ROM, & end_of_ROM - & start_of_ROM);
+@end group
+@end smallexample
+
+Note the use of the @samp{&} operators. These are correct.
+
@node SECTIONS
@section SECTIONS Command
@kindex SECTIONS
@@ -2787,7 +3086,7 @@ The full description of an output section looks like this:
@smallexample
@group
@var{section} [@var{address}] [(@var{type})] :
- [AT(@var{lma})] [SUBALIGN(@var{subsection_align})]
+ [AT(@var{lma})] [ALIGN(@var{section_align})] [SUBALIGN(@var{subsection_align})]
@{
@var{output-section-command}
@var{output-section-command}
@@ -2834,7 +3133,7 @@ The output section name @samp{/DISCARD/} is special; @ref{Output Section
Discarding}.
@node Output Section Address
-@subsection Output Section Description
+@subsection Output Section Address
@cindex address, section
@cindex section address
The @var{address} is an expression for the VMA (the virtual memory
@@ -3008,14 +3307,66 @@ sequence of input section descriptions is probably in error, because the
.data1 : @{ data.o(.data) @}
@end smallexample
-@cindex SORT
+@cindex SORT_BY_NAME
Normally, the linker will place files and sections matched by wildcards
in the order in which they are seen during the link. You can change
-this by using the @code{SORT} keyword, which appears before a wildcard
-pattern in parentheses (e.g., @code{SORT(.text*)}). When the
-@code{SORT} keyword is used, the linker will sort the files or sections
+this by using the @code{SORT_BY_NAME} keyword, which appears before a wildcard
+pattern in parentheses (e.g., @code{SORT_BY_NAME(.text*)}). When the
+@code{SORT_BY_NAME} keyword is used, the linker will sort the files or sections
into ascending order by name before placing them in the output file.
+@cindex SORT_BY_ALIGNMENT
+@code{SORT_BY_ALIGNMENT} is very similar to @code{SORT_BY_NAME}. The
+difference is @code{SORT_BY_ALIGNMENT} will sort sections into
+ascending order by alignment before placing them in the output file.
+
+@cindex SORT
+@code{SORT} is an alias for @code{SORT_BY_NAME}.
+
+When there are nested section sorting commands in linker script, there
+can be at most 1 level of nesting for section sorting commands.
+
+@enumerate
+@item
+@code{SORT_BY_NAME} (@code{SORT_BY_ALIGNMENT} (wildcard section pattern)).
+It will sort the input sections by name first, then by alignment if 2
+sections have the same name.
+@item
+@code{SORT_BY_ALIGNMENT} (@code{SORT_BY_NAME} (wildcard section pattern)).
+It will sort the input sections by alignment first, then by name if 2
+sections have the same alignment.
+@item
+@code{SORT_BY_NAME} (@code{SORT_BY_NAME} (wildcard section pattern)) is
+treated the same as @code{SORT_BY_NAME} (wildcard section pattern).
+@item
+@code{SORT_BY_ALIGNMENT} (@code{SORT_BY_ALIGNMENT} (wildcard section pattern))
+is treated the same as @code{SORT_BY_ALIGNMENT} (wildcard section pattern).
+@item
+All other nested section sorting commands are invalid.
+@end enumerate
+
+When both command line section sorting option and linker script
+section sorting command are used, section sorting command always
+takes precedence over the command line option.
+
+If the section sorting command in linker script isn't nested, the
+command line option will make the section sorting command to be
+treated as nested sorting command.
+
+@enumerate
+@item
+@code{SORT_BY_NAME} (wildcard section pattern ) with
+@option{--sort-sections alignment} is equivalent to
+@code{SORT_BY_NAME} (@code{SORT_BY_ALIGNMENT} (wildcard section pattern)).
+@item
+@code{SORT_BY_ALIGNMENT} (wildcard section pattern) with
+@option{--sort-section name} is equivalent to
+@code{SORT_BY_ALIGNMENT} (@code{SORT_BY_NAME} (wildcard section pattern)).
+@end enumerate
+
+If the section sorting command in linker script is nested, the
+command line option will be ignored.
+
If you ever get confused about where input sections are going, use the
@samp{-M} linker option to generate a map file. The map file shows
precisely how input sections are mapped to output sections.
@@ -3081,7 +3432,7 @@ When link-time garbage collection is in use (@samp{--gc-sections}),
it is often useful to mark sections that should not be eliminated.
This is accomplished by surrounding an input section's wildcard entry
with @code{KEEP()}, as in @code{KEEP(*(.init))} or
-@code{KEEP(SORT(*)(.ctors))}.
+@code{KEEP(SORT_BY_NAME(*)(.ctors))}.
@node Input Section Example
@subsubsection Input Section Example
@@ -3231,7 +3582,9 @@ linker to place constructor information in the output section where the
ignored for other object file formats.
The symbol @w{@code{__CTOR_LIST__}} marks the start of the global
-constructors, and the symbol @w{@code{__DTOR_LIST}} marks the end. The
+constructors, and the symbol @w{@code{__CTOR_END__}} marks the end.
+Similarly, @w{@code{__DTOR_LIST__}} and @w{@code{__DTOR_END__}} mark
+the start and end of the global destructors. The
first word in the list is the number of entries, followed by the address
of each constructor or destructor, followed by a zero word. The
compiler must arrange to actually run the code. For these object file
@@ -3265,9 +3618,9 @@ If you are using the @sc{gnu} C++ support for initialization priority,
which provides some control over the order in which global constructors
are run, you must sort the constructors at link time to ensure that they
are executed in the correct order. When using the @code{CONSTRUCTORS}
-command, use @samp{SORT(CONSTRUCTORS)} instead. When using the
-@code{.ctors} and @code{.dtors} sections, use @samp{*(SORT(.ctors))} and
-@samp{*(SORT(.dtors))} instead of just @samp{*(.ctors)} and
+command, use @samp{SORT_BY_NAME(CONSTRUCTORS)} instead. When using the
+@code{.ctors} and @code{.dtors} sections, use @samp{*(SORT_BY_NAME(.ctors))} and
+@samp{*(SORT_BY_NAME(.dtors))} instead of just @samp{*(.ctors)} and
@samp{*(.dtors)}.
Normally the compiler and linker will handle these issues automatically,
@@ -3309,7 +3662,7 @@ like this:
@smallexample
@group
@var{section} [@var{address}] [(@var{type})] :
- [AT(@var{lma})] [SUBALIGN(@var{subsection_align})]
+ [AT(@var{lma})] [ALIGN(@var{section_align})] [SUBALIGN(@var{subsection_align})]
@{
@var{output-section-command}
@var{output-section-command}
@@ -3324,6 +3677,7 @@ remaining section attributes.
@menu
* Output Section Type:: Output section type
* Output Section LMA:: Output section LMA
+* Forced Output Alignment:: Forced Output Alignment
* Forced Input Alignment:: Forced Input Alignment
* Output Section Region:: Output section region
* Output Section Phdr:: Output section phdr
@@ -3437,6 +3791,13 @@ for (dst = &_bstart; dst< &_bend; dst++)
@end group
@end smallexample
+@node Forced Output Alignment
+@subsubsection Forced Output Alignment
+@kindex ALIGN(@var{section_align})
+@cindex forcing output section alignment
+@cindex output section alignment
+You can increase an output section's alignment by using ALIGN.
+
@node Forced Input Alignment
@subsubsection Forced Input Alignment
@kindex SUBALIGN(@var{subsection_align})
@@ -3697,19 +4058,19 @@ attributes.
@kindex ORIGIN =
@kindex o =
@kindex org =
-The @var{origin} is an expression for the start address of the memory
-region. The expression must evaluate to a constant before memory
-allocation is performed, which means that you may not use any section
-relative symbols. The keyword @code{ORIGIN} may be abbreviated to
-@code{org} or @code{o} (but not, for example, @code{ORG}).
+The @var{origin} is an numerical expression for the start address of
+the memory region. The expression must evaluate to a constant and it
+cannot involve any symbols. The keyword @code{ORIGIN} may be
+abbreviated to @code{org} or @code{o} (but not, for example,
+@code{ORG}).
@kindex LENGTH =
@kindex len =
@kindex l =
The @var{len} is an expression for the size in bytes of the memory
region. As with the @var{origin} expression, the expression must
-evaluate to a constant before memory allocation is performed. The
-keyword @code{LENGTH} may be abbreviated to @code{len} or @code{l}.
+be numerical only and must evaluate to a constant. The keyword
+@code{LENGTH} may be abbreviated to @code{len} or @code{l}.
In the following example, we specify that there are two memory regions
available for allocation: one starting at @samp{0} for 256 kilobytes,
@@ -3740,6 +4101,16 @@ the next available address within the memory region. If the combined
output sections directed to a memory region are too large for the
region, the linker will issue an error message.
+It is possible to access the origin and length of a memory in an
+expression via the @code{ORIGIN(@var{memory})} and
+@code{LENGTH(@var{memory})} functions:
+
+@smallexample
+@group
+ _fstack = ORIGIN(ram) + LENGTH(ram) - 4;
+@end group
+@end smallexample
+
@node PHDRS
@section PHDRS Command
@kindex PHDRS
@@ -3937,6 +4308,10 @@ VERS_1.2 @{
VERS_2.0 @{
bar1; bar2;
+ extern "C++" @{
+ ns::*;
+ "int f(int, double)";
+ @}
@} VERS_1.2;
@end smallexample
@@ -3948,6 +4323,8 @@ of the shared library; this is done using wildcard patterns, so that any
symbol whose name begins with @samp{old}, @samp{original}, or @samp{new}
is matched. The wildcard patterns available are the same as those used
in the shell when matching filenames (also known as ``globbing'').
+However, if you specify the symbol name inside double quotes, then the
+name is treated as literal, rather than as a glob pattern.
Next, the version script defines node @samp{VERS_1.2}. This node
depends upon @samp{VERS_1.1}. The script binds the symbol @samp{foo2}
@@ -4057,6 +4434,16 @@ The linker will iterate over the list of symbols at the link time and
demangle them according to @samp{lang} before matching them to the
patterns specified in @samp{version-script-commands}.
+Demangled names may contains spaces and other special characters. As
+described above, you can use a glob pattern to match demangled names,
+or you can use a double-quoted string to match the string exactly. In
+the latter case, be aware that minor differences (such as differing
+whitespace) between the version script and the demangler output will
+cause a mismatch. As the exact string generated by the demangler
+might change in the future, even if the mangled name does not, you
+should check that all of your version directives are behaving as you
+expect when you upgrade.
+
@node Expressions
@section Expressions in Linker Scripts
@cindex expressions
@@ -4074,6 +4461,7 @@ expressions.
@menu
* Constants:: Constants
* Symbols:: Symbol Names
+* Orphan Sections:: Orphan Sections
* Location Counter:: The Location Counter
* Operators:: Operators
* Evaluation:: Evaluation
@@ -4135,6 +4523,22 @@ Since symbols can contain many non-alphabetic characters, it is safest
to delimit symbols with spaces. For example, @samp{A-B} is one symbol,
whereas @samp{A - B} is an expression involving subtraction.
+@node Orphan Sections
+@subsection Orphan Sections
+@cindex orphan
+Orphan sections are sections present in the input files which
+are not explicitly placed into the output file by the linker
+script. The linker will still copy these sections into the
+output file, but it has to guess as to where they should be
+placed. The linker uses a simple heuristic to do this. It
+attempts to place orphan sections after non-orphan sections of the
+same attribute, such as code vs data, loadable vs non-loadable, etc.
+If there is not enough room to do this then it places
+at the end of the file.
+
+For ELF targets, the attribute of the section includes section type as
+well as section flag.
+
@node Location Counter
@subsection The Location Counter
@kindex .
@@ -4206,6 +4610,74 @@ and it will have an extra 0x600 bytes worth of space after the end of
the values from the @samp{.data} input sections and before the end of
the @samp{.data} output section itself.
+@cindex dot outside sections
+Setting symbols to the value of the location counter outside of an
+output section statement can result in unexpected values if the linker
+needs to place orphan sections. For example, given the following:
+
+@smallexample
+SECTIONS
+@{
+ start_of_text = . ;
+ .text: @{ *(.text) @}
+ end_of_text = . ;
+
+ start_of_data = . ;
+ .data: @{ *(.data) @}
+ end_of_data = . ;
+@}
+@end smallexample
+
+If the linker needs to place some input section, e.g. @code{.rodata},
+not mentioned in the script, it might choose to place that section
+between @code{.text} and @code{.data}. You might think the linker
+should place @code{.rodata} on the blank line in the above script, but
+blank lines are of no particular significance to the linker. As well,
+the linker doesn't associate the above symbol names with their
+sections. Instead, it assumes that all assignments or other
+statements belong to the previous output section, except for the
+special case of an assignment to @code{.}. I.e., the linker will
+place the orphan @code{.rodata} section as if the script was written
+as follows:
+
+@smallexample
+SECTIONS
+@{
+ start_of_text = . ;
+ .text: @{ *(.text) @}
+ end_of_text = . ;
+
+ start_of_data = . ;
+ .rodata: @{ *(.rodata) @}
+ .data: @{ *(.data) @}
+ end_of_data = . ;
+@}
+@end smallexample
+
+This may or may not be the script author's intention for the value of
+@code{start_of_data}. One way to influence the orphan section
+placement is to assign the location counter to itself, as the linker
+assumes that an assignment to @code{.} is setting the start address of
+a following output section and thus should be grouped with that
+section. So you could write:
+
+@smallexample
+SECTIONS
+@{
+ start_of_text = . ;
+ .text: @{ *(.text) @}
+ end_of_text = . ;
+
+ . = . ;
+ start_of_data = . ;
+ .data: @{ *(.data) @}
+ end_of_data = . ;
+@}
+@end smallexample
+
+Now, the orphan @code{.rodata} section will be placed between
+@code{end_of_text} and @code{start_of_data}.
+
@need 2000
@node Operators
@subsection Operators
@@ -4477,6 +4949,21 @@ evaluation purposes.
. = DATA_SEGMENT_END(.);
@end smallexample
+@item DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp})
+@kindex DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp})
+This defines the end of the @code{PT_GNU_RELRO} segment when
+@samp{-z relro} option is used. Second argument is returned.
+When @samp{-z relro} option is not present, @code{DATA_SEGMENT_RELRO_END}
+does nothing, otherwise @code{DATA_SEGMENT_ALIGN} is padded so that
+@var{exp} + @var{offset} is aligned to the most commonly used page
+boundary for particular target. If present in the linker script,
+it must always come in between @code{DATA_SEGMENT_ALIGN} and
+@code{DATA_SEGMENT_END}.
+
+@smallexample
+ . = DATA_SEGMENT_RELRO_END(24, .);
+@end smallexample
+
@item DEFINED(@var{symbol})
@kindex DEFINED(@var{symbol})
@cindex symbol defaults
@@ -4500,6 +4987,10 @@ SECTIONS @{ @dots{}
@end group
@end smallexample
+@item LENGTH(@var{memory})
+@kindex LENGTH(@var{memory})
+Return the length of the memory region named @var{memory}.
+
@item LOADADDR(@var{section})
@kindex LOADADDR(@var{section})
@cindex section load address in expression
@@ -4524,6 +5015,20 @@ This function is closely related to @code{ALIGN(@var{exp})}; unless you
use the @code{MEMORY} command to define discontinuous memory for the
output file, the two functions are equivalent.
+@item ORIGIN(@var{memory})
+@kindex ORIGIN(@var{memory})
+Return the origin of the memory region named @var{memory}.
+
+@item SEGMENT_START(@var{segment}, @var{default})
+@kindex SEGMENT_START(@var{segment}, @var{default})
+Return the base address of the named @var{segment}. If an explicit
+value has been given for this segment (with a command-line @samp{-T}
+option) that value will be returned; otherwise the value will be
+@var{default}. At present, the @samp{-T} command-line option can only
+be used to set the base address for the ``text'', ``data'', and
+``bss'' sections, but you use @code{SEGMENT_START} with any segment
+name.
+
@item SIZEOF(@var{section})
@kindex SIZEOF(@var{section})
@cindex section size
@@ -4614,6 +5119,15 @@ functionality are not listed.
@ifset MSP430
* MSP430:: @command{ld} and MSP430
@end ifset
+@ifset M68HC11
+* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
+@end ifset
+@ifset POWERPC
+* PowerPC ELF32:: @command{ld} and PowerPC 32-bit ELF Support
+@end ifset
+@ifset POWERPC64
+* PowerPC64 ELF64:: @command{ld} and PowerPC64 64-bit ELF Support
+@end ifset
@ifset TICOFF
* TI COFF:: @command{ld} and TI COFF
@end ifset
@@ -4655,6 +5169,23 @@ page of memory, and changes them to use the eight-bit address form.
(That is: the linker turns @samp{mov.b @code{@@}@var{aa}:16} into
@samp{mov.b @code{@@}@var{aa}:8} whenever the address @var{aa} is in the
top page of memory).
+
+@item bit manipulation instructions
+@command{ld} finds all bit manipulation instructions like @code{band, bclr,
+biand, bild, bior, bist, bixor, bld, bnot, bor, bset, bst, btst, bxor}
+which use 32 bit and 16 bit absolute address form, but refer to the top
+page of memory, and changes them to use the 8 bit address form.
+(That is: the linker turns @samp{bset #xx:3,@code{@@}@var{aa}:32} into
+@samp{bset #xx:3,@code{@@}@var{aa}:8} whenever the address @var{aa} is in
+the top page of memory).
+
+@item system control instructions
+@command{ld} finds all @code{ldc.w, stc.w} instrcutions 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
+@samp{ldc.w @code{@@}@var{aa}:16,ccr} whenever the address @var{aa} is in
+the top page of memory).
@end table
@ifclear GENERIC
@@ -4737,8 +5268,59 @@ not itself call any subroutines).
@raisesections
@end ifclear
+@ifset M68HC11
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node M68HC11/68HC12
+@section @command{ld} and the Motorola 68HC11 and 68HC12 families
+
+@cindex M68HC11 and 68HC12 support
+
+@subsection Linker Relaxation
+
+For the Motorola 68HC11, @command{ld} can perform these global
+optimizations when you specify the @samp{--relax} command-line option.
+
+@table @emph
+@cindex relaxing on M68HC11
+@item relaxing address modes
+@command{ld} finds all @code{jsr} and @code{jmp} instructions whose
+targets are within eight bits, and turns them into eight-bit
+program-counter relative @code{bsr} and @code{bra} instructions,
+respectively.
+
+@command{ld} also looks at all 16-bit extended addressing modes and
+transforms them in a direct addressing mode when the address is in
+page 0 (between 0 and 0x0ff).
+
+@item relaxing gcc instruction group
+When @command{gcc} is called with @option{-mrelax}, it can emit group
+of instructions that the linker can optimize to use a 68HC11 direct
+addressing mode. These instructions consists of @code{bclr} or
+@code{bset} instructions.
+
+@end table
+
+@subsection Trampoline Generation
+
+@cindex trampoline generation on M68HC11
+@cindex trampoline generation on M68HC12
+For 68HC11 and 68HC12, @command{ld} can generate trampoline code to
+call a far function using a normal @code{jsr} instruction. The linker
+will also change the relocation to some far function to use the
+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.
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+@end ifset
+
@node ARM
-@section @command{ld}'s Support for Interworking Between ARM and Thumb Code
+@section @command{ld} and the ARM family
@cindex ARM interworking support
@kindex --support-old-code
@@ -4762,6 +5344,59 @@ But it also sets the bottom bit of the address, so that it can be
branched to using a BX instruction, and the program will start
executing in Thumb mode straight away.
+@cindex BE8
+@kindex --be8
+The @samp{--be8} switch instructs @command{ld} to generate BE8 format
+executables. This option is only valid when linking big-endian objects.
+The resulting image will contain big-endian data and little-endian code.
+
+@cindex TARGET1
+@kindex --target1-rel
+@kindex --target1-abs
+The @samp{R_ARM_TARGET1} relocation is typically used for entries in the
+@samp{.init_array} section. It is interpreted as either @samp{R_ARM_REL32}
+or @samp{R_ARM_ABS32}, depending on the target. The @samp{--target1-rel}
+and @samp{--target1-abs} switches override the default.
+
+@cindex TARGET2
+@kindex --target2=@var{type}
+The @samp{--target2=type} switch overrides the default definition of the
+@samp{R_ARM_TARGET2} relocation. Valid values for @samp{type}, their
+meanings, and target defaults are as follows:
+@table @samp
+@item rel
+@samp{R_ARM_REL32} (arm*-*-elf, arm*-*-eabi)
+@item abs
+@samp{R_ARM_ABS32} (arm*-*-symbianelf)
+@item got-rel
+@samp{R_ARM_GOT_PREL} (arm*-*-linux, arm*-*-*bsd)
+@end table
+
+@cindex FIX_V4BX
+@kindex --fix-v4bx
+The @samp{R_ARM_V4BX} relocation (defined by the ARM AAELF
+specification) enables objects compiled for the ARMv4 architecture to be
+interworking-safe when linked with other objects compiled for ARMv4t, but
+also allows pure ARMv4 binaries to be built from the same ARMv4 objects.
+
+In the latter case, the switch @option{--fix-v4bx} must be passed to the
+linker, which causes v4t @code{BX rM} instructions to be rewritten as
+@code{MOV PC,rM}, since v4 processors do not have a @code{BX} instruction.
+
+In the former case, the switch should not be used, and @samp{R_ARM_V4BX}
+relocations are ignored.
+
+@cindex USE_BLX
+@kindex --use-blx
+The @samp{--use-blx} switch enables the linker to use ARM/Thumb
+BLX instructions (available on ARMv5t and above) in various
+situations. Currently it is used to perform calls via the PLT from Thumb
+code using BLX rather than using BX and a mode-switching stub before
+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.
+
@ifclear GENERIC
@lowersections
@end ifclear
@@ -4884,6 +5519,183 @@ The last two sections are used by gcc.
@end ifclear
@end ifset
+@ifset POWERPC
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node PowerPC ELF32
+@section @command{ld} and PowerPC 32-bit ELF Support
+@cindex PowerPC long branches
+@kindex --relax on PowerPC
+Branches on PowerPC processors are limited to a signed 26-bit
+displacement, which may result in @command{ld} giving
+@samp{relocation truncated to fit} errors with very large programs.
+@samp{--relax} enables the generation of trampolines that can access
+the entire 32-bit address space. These trampolines are inserted at
+section boundaries, so may not themselves be reachable if an input
+section exceeds 33M in size.
+
+@cindex PowerPC ELF32 options
+@table @option
+@cindex PowerPC PLT
+@kindex --bss-plt
+@item --bss-plt
+Current PowerPC GCC accepts a @samp{-msecure-plt} option that
+generates code capable of using a newer PLT and GOT layout that has
+the security advantage of no executable section ever needing to be
+writable and no writable section ever being executable. PowerPC
+@command{ld} will generate this layout, including stubs to access the
+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.
+
+@cindex PowerPC GOT
+@kindex --sdata-got
+@item --sdata-got
+The new secure PLT and GOT are placed differently relative to other
+sections compared to older BSS PLT and GOT placement. The location of
+@code{.plt} must change because the new secure PLT is an initialized
+section while the old PLT is uninitialized. The reason for the
+@code{.got} change is more subtle: The new placement allows
+@code{.got} to be read-only in applications linked with
+@samp{-z relro -z now}. However, this placement means that
+@code{.sdata} cannot always be used in shared libraries, because the
+PowerPC ABI accesses @code{.sdata} in shared libraries from the GOT
+pointer. @samp{--sdata-got} forces the old GOT placement. PowerPC
+GCC doesn't use @code{.sdata} in shared libraries, so this option is
+really only useful for other compilers that may do so.
+
+@cindex PowerPC stub symbols
+@kindex --emit-stub-syms
+@item --emit-stub-syms
+This option causes @command{ld} to label linker stubs with a local
+symbol that encodes the stub type and destination.
+
+@cindex PowerPC TLS optimization
+@kindex --no-tls-optimize
+@item --no-tls-optimize
+PowerPC @command{ld} normally performs some optimization of code
+sequences used to access Thread-Local Storage. Use this option to
+disable the optimization.
+@end table
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+@end ifset
+
+@ifset POWERPC64
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node PowerPC64 ELF64
+@section @command{ld} and PowerPC64 64-bit ELF Support
+
+@cindex PowerPC64 ELF64 options
+@table @option
+@cindex PowerPC64 stub grouping
+@kindex --stub-group-size
+@item --stub-group-size
+Long branch stubs, PLT call stubs and TOC adjusting stubs are placed
+by @command{ld} in stub sections located between groups of input sections.
+@samp{--stub-group-size} specifies the maximum size of a group of input
+sections handled by one stub section. Since branch offsets are signed,
+a stub section may serve two groups of input sections, one group before
+the stub section, and one group after it. However, when using
+conditional branches that require stubs, it may be better (for branch
+prediction) that stub sections only serve one group of input sections.
+A negative value for @samp{N} chooses this scheme, ensuring that
+branches to stubs always use a negative offset. Two special values of
+@samp{N} are recognized, @samp{1} and @samp{-1}. These both instruct
+@command{ld} to automatically size input section groups for the branch types
+detected, with the same behaviour regarding stub placement as other
+positive or negative values of @samp{N} respectively.
+
+Note that @samp{--stub-group-size} does not split input sections. A
+single input section larger than the group size specified will of course
+create a larger group (of one section). If input sections are too
+large, it may not be possible for a branch to reach its stub.
+
+@cindex PowerPC64 stub symbols
+@kindex --emit-stub-syms
+@item --emit-stub-syms
+This option causes @command{ld} to label linker stubs with a local
+symbol that encodes the stub type and destination.
+
+@cindex PowerPC64 dot symbols
+@kindex --dotsyms
+@kindex --no-dotsyms
+@item --dotsyms, --no-dotsyms
+These two options control how @command{ld} interprets version patterns
+in a version script. Older PowerPC64 compilers emitted both a
+function descriptor symbol with the same name as the function, and a
+code entry symbol with the name prefixed by a dot (@samp{.}). To
+properly version a function @samp{foo}, the version script thus needs
+to control both @samp{foo} and @samp{.foo}. The option
+@samp{--dotsyms}, on by default, automatically adds the required
+dot-prefixed patterns. Use @samp{--no-dotsyms} to disable this
+feature.
+
+@cindex PowerPC64 TLS optimization
+@kindex --no-tls-optimize
+@item --no-tls-optimize
+PowerPC64 @command{ld} normally performs some optimization of code
+sequences used to access Thread-Local Storage. Use this option to
+disable the optimization.
+
+@cindex PowerPC64 OPD optimization
+@kindex --no-opd-optimize
+@item --no-opd-optimize
+PowerPC64 @command{ld} normally removes @code{.opd} section entries
+corresponding to deleted link-once functions, or functions removed by
+the action of @samp{--gc-sections} or linker scrip @code{/DISCARD/}.
+Use this option to disable @code{.opd} optimization.
+
+@cindex PowerPC64 OPD spacing
+@kindex --non-overlapping-opd
+@item --non-overlapping-opd
+Some PowerPC64 compilers have an option to generate compressed
+@code{.opd} entries spaced 16 bytes apart, overlapping the third word,
+the static chain pointer (unused in C) with the first word of the next
+entry. This option expands such entries to the full 24 bytes.
+
+@cindex PowerPC64 TOC optimization
+@kindex --no-toc-optimize
+@item --no-toc-optimize
+PowerPC64 @command{ld} normally removes unused @code{.toc} section
+entries. Such entries are detected by examining relocations that
+reference the TOC in code sections. A reloc in a deleted code section
+marks a TOC word as unneeded, while a reloc in a kept code section
+marks a TOC word as needed. Since the TOC may reference itself, TOC
+relocs are also examined. TOC words marked as both needed and
+unneeded will of course be kept. TOC words without any referencing
+reloc are assumed to be part of a multi-word entry, and are kept or
+discarded as per the nearest marked preceding word. This works
+reliably for compiler generated code, but may be incorrect if assembly
+code is used to insert TOC entries. Use this option to disable the
+optimization.
+
+@cindex PowerPC64 multi-TOC
+@kindex --no-multi-toc
+@item --no-multi-toc
+By default, PowerPC64 GCC generates code for a TOC model where TOC
+entries are accessed with a 16-bit offset from r2. This limits the
+total TOC size to 64K. PowerPC64 @command{ld} extends this limit by
+grouping code sections such that each group uses less than 64K for its
+TOC entries, then inserts r2 adjusting stubs between inter-group
+calls. @command{ld} does not split apart input sections, so cannot
+help if a single input file has a @code{.toc} section that exceeds
+64K, most likely from linking multiple files with @command{ld -r}.
+Use this option to turn off this feature.
+@end table
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+@end ifset
+
@ifset TICOFF
@ifclear GENERIC
@raisesections
@@ -4969,17 +5781,85 @@ Using a DEF file turns off the normal auto-export behavior, unless the
Here is an example of a DEF file for a shared library called @samp{xyz.dll}:
@example
-LIBRARY "xyz.dll" BASE=0x10000000
+LIBRARY "xyz.dll" BASE=0x20000000
EXPORTS
foo
bar
_bar = bar
+another_foo = abc.dll.afoo
+var1 DATA
@end example
-This example defines a base address and three symbols. The third
-symbol is an alias for the second. For the complete format
-specification see ld/deffilep.y in the binutils sources.
+This example defines a DLL with a non-default base address and five
+symbols in the export table. The third exported symbol @code{_bar} is an
+alias for the second. The fourth symbol, @code{another_foo} is resolved
+by "forwarding" to another module and treating it as an alias for
+@code{afoo} exported from the DLL @samp{abc.dll}. The final symbol
+@code{var1} is declared to be a data object.
+
+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
+@code{LIBRARY}. If @samp{<name>} does not include a suffix, the default
+executable suffix, @samp{.EXE} is appended.
+
+With either @code{LIBRARY <name>} or @code{NAME <name>} the optional
+specification @code{BASE = <number>} may be used to specify a
+non-default base address for the image.
+
+If neither @code{LIBRARY <name>} nor @code{NAME <name>} is specified,
+or they specify an empty string, the internal name is the same as the
+filename specified on the command line.
+
+The complete specification of an export symbol is:
+
+@example
+EXPORTS
+ ( ( ( <name1> [ = <name2> ] )
+ | ( <name1> = <module-name> . <external-name>))
+ [ @@ <integer> ] [NONAME] [DATA] [CONSTANT] [PRIVATE] ) *
+@end example
+
+Declares @samp{<name1>} as an exported symbol from the DLL, or declares
+@samp{<name1>} as an exported alias for @samp{<name2>}; or declares
+@samp{<name1>} as a "forward" alias for the symbol
+@samp{<external-name>} in the DLL @samp{<module-name>}.
+Optionally, the symbol may be exported by the specified ordinal
+@samp{<integer>} alias.
+
+The optional keywords that follow the declaration indicate:
+
+@code{NONAME}: Do not put the symbol name in the DLL's export table. It
+will still be exported by its ordinal alias (either the value specified
+by the .def specification or, otherwise, the value assigned by the
+linker). The symbol name, however, does remain visible in the import
+library (if any), unless @code{PRIVATE} is also specified.
+
+@code{DATA}: The symbol is a variable or object, rather than a function.
+The import lib will export only an indirect reference to @code{foo} as
+the symbol @code{_imp__foo} (ie, @code{foo} must be resolved as
+@code{*_imp__foo}).
+
+@code{CONSTANT}: Like @code{DATA}, but put the undecorated @code{foo} as
+well as @code{_imp__foo} into the import library. Both refer to the
+read-only import address table's pointer to the variable, not to the
+variable itself. This can be dangerous. If the user code fails to add
+the @code{dllimport} attribute and also fails to explicitly add the
+extra indirection that the use of the attribute enforces, the
+application will behave unexpectedly.
+
+@code{PRIVATE}: Put the symbol in the DLL's export table, but do not put
+it into the static import library used to resolve imports at link time. The
+symbol can still be imported using the @code{LoadLibrary/GetProcAddress}
+API at runtime or by by using the GNU ld extension of linking directly to
+the DLL without an import library.
+
+See ld/deffilep.y in the binutils sources for the full specification of
+other DEF file statements
@cindex creating a DEF file
While linking a shared dll, @command{ld} is able to create a DEF file
@@ -5247,6 +6127,24 @@ to handle the other symbols, then the both the new names @emph{and}
the original names for the renamed symbols will be exported.
In effect, you'd be aliasing those symbols, not renaming them,
which is probably not what you wanted.
+
+@cindex weak externals
+@item weak externals
+The Windows object format, PE, specifies a form of weak symbols called
+weak externals. When a weak symbol is linked and the symbol is not
+defined, the weak symbol becomes an alias for some other symbol. There
+are three variants of weak externals:
+@itemize
+@item Definition is searched for in objects and libraries, historically
+called lazy externals.
+@item Definition is searched for only in other objects, not in libraries.
+This form is not presently implemented.
+@item No search; the symbol is an alias. This form is not presently
+implemented.
+@end itemize
+As a GNU extension, weak symbols that do not specify an alternate symbol
+are supported. If the symbol is undefined when linking, the symbol
+uses a default value.
@end table
@ifclear GENERIC
@@ -5286,34 +6184,53 @@ interleaving might place the @code{.literal} sections from an initial
group of files followed by the @code{.text} sections of that group of
files. Then, the @code{.literal} sections from the rest of the files
and the @code{.text} sections from the rest of the files would follow.
-The non-interleaved order can still be specified as:
-
-@smallexample
-SECTIONS
-@{
- .text : @{
- *(.literal) *(.text)
- @}
-@}
-@end smallexample
-@cindex @code{--relax} on Xtensa
+@cindex @option{--relax} on Xtensa
@cindex relaxing on Xtensa
+Relaxation is enabled by default for the Xtensa version of @command{ld} and
+provides two important link-time optimizations. The first optimization
+is to combine identical literal values to reduce code size. A redundant
+literal will be removed and all the @code{L32R} instructions that use it
+will be changed to reference an identical literal, as long as the
+location of the replacement literal is within the offset range of all
+the @code{L32R} instructions. The second optimization is to remove
+unnecessary overhead from assembler-generated ``longcall'' sequences of
+@code{L32R}/@code{CALLX@var{n}} when the target functions are within
+range of direct @code{CALL@var{n}} instructions.
+
+For each of these cases where an indirect call sequence can be optimized
+to a direct call, the linker will change the @code{CALLX@var{n}}
+instruction to a @code{CALL@var{n}} instruction, remove the @code{L32R}
+instruction, and remove the literal referenced by the @code{L32R}
+instruction if it is not used for anything else. Removing the
+@code{L32R} instruction always reduces code size but can potentially
+hurt performance by changing the alignment of subsequent branch targets.
+By default, the linker will always preserve alignments, either by
+switching some instructions between 24-bit encodings and the equivalent
+density instructions or by inserting a no-op in place of the @code{L32R}
+instruction that was removed. If code size is more important than
+performance, the @option{--size-opt} option can be used to prevent the
+linker from widening density instructions or inserting no-ops, except in
+a few cases where no-ops are required for correctness.
+
+The following Xtensa-specific command-line options can be used to
+control the linker:
+
+@cindex Xtensa options
+@table @option
@kindex --no-relax
-The Xtensa version of @command{ld} enables the @option{--relax} option by
-default to attempt to reduce space in the output image by combining
-literals with identical values. It also provides the
-@option{--no-relax} option to disable this optimization. When enabled,
-the relaxation algorithm ensures that a literal will only be merged with
-another literal when the new merged literal location is within the
-offset range of all of its uses.
-
-The relaxation mechanism will also attempt to optimize
-assembler-generated ``longcall'' sequences of
-@code{L32R}/@code{CALLX@var{n}} when the target is known to fit into a
-@code{CALL@var{n}} instruction encoding. The current optimization
-converts the sequence into @code{NOP}/@code{CALL@var{n}} and removes the
-literal referenced by the @code{L32R} instruction.
+@item --no-relax
+Since the Xtensa version of @code{ld} enables the @option{--relax} option
+by default, the @option{--no-relax} option is provided to disable
+relaxation.
+
+@item --size-opt
+When optimizing indirect calls to direct calls, optimize for code size
+more than performance. With this option, the linker will not insert
+no-ops or widen density instructions to preserve branch target
+alignment. There may still be some cases where no-ops are required to
+preserve the correctness of the code.
+@end table
@ifclear GENERIC
@lowersections
diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c
index 3094735fa19f..ed9f8696d280 100644
--- a/contrib/binutils/ld/ldcref.c
+++ b/contrib/binutils/ld/ldcref.c
@@ -1,5 +1,5 @@
/* ldcref.c -- output a cross reference table
- Copyright 1996, 1997, 1998, 2000, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds routines that manage the cross reference table.
The table is used to generate cross reference reports. It is also
@@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "bfdlink.h"
#include "libiberty.h"
+#include "objalloc.h"
#include "ld.h"
#include "ldmain.h"
@@ -69,9 +70,9 @@ struct cref_hash_table {
/* Forward declarations. */
static void output_one_cref (FILE *, struct cref_hash_entry *);
-static void check_section_sym_xref (lang_input_statement_type *);
+static void check_local_sym_xref (lang_input_statement_type *);
static bfd_boolean check_nocrossref (struct cref_hash_entry *, void *);
-static void check_refs (const char *, asection *, bfd *,
+static void check_refs (const char *, bfd_boolean, asection *, bfd *,
struct lang_nocrossrefs *);
static void check_reloc_refs (bfd *, asection *, void *);
@@ -101,6 +102,15 @@ static bfd_boolean cref_initialized;
static size_t cref_symcount;
+/* Used to take a snapshot of the cref hash table when starting to
+ add syms from an as-needed library. */
+static struct bfd_hash_entry **old_table;
+static unsigned int old_size;
+static void *old_tab;
+static void *alloc_mark;
+static size_t tabsize, entsize, refsize;
+static size_t old_symcount;
+
/* Create an entry in a cref hash table. */
static struct bfd_hash_entry *
@@ -136,7 +146,7 @@ cref_hash_newfunc (struct bfd_hash_entry *entry,
}
/* Add a symbol to the cref hash table. This is called for every
- symbol that is seen during the link. */
+ global symbol that is seen during the link. */
void
add_cref (const char *name,
@@ -149,7 +159,8 @@ add_cref (const char *name,
if (! cref_initialized)
{
- if (! bfd_hash_table_init (&cref_table.root, cref_hash_newfunc))
+ if (!bfd_hash_table_init (&cref_table.root, cref_hash_newfunc,
+ sizeof (struct cref_hash_entry)))
einfo (_("%X%P: bfd_hash_table_init of cref table failed: %E\n"));
cref_initialized = TRUE;
}
@@ -164,7 +175,9 @@ add_cref (const char *name,
if (r == NULL)
{
- r = xmalloc (sizeof *r);
+ r = bfd_hash_allocate (&cref_table.root, sizeof *r);
+ if (r == NULL)
+ einfo (_("%X%P: cref alloc failed: %E\n"));
r->next = h->refs;
h->refs = r;
r->abfd = abfd;
@@ -181,6 +194,123 @@ add_cref (const char *name,
r->def = TRUE;
}
+/* Called before loading an as-needed library to take a snapshot of
+ the cref hash table, and after we have loaded or found that the
+ library was not needed. */
+
+bfd_boolean
+handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
+ enum notice_asneeded_action act)
+{
+ unsigned int i;
+
+ if (!cref_initialized)
+ return TRUE;
+
+ if (act == notice_as_needed)
+ {
+ char *old_ent, *old_ref;
+
+ for (i = 0; i < cref_table.root.size; i++)
+ {
+ struct bfd_hash_entry *p;
+ struct cref_hash_entry *c;
+ struct cref_ref *r;
+
+ for (p = cref_table.root.table[i]; p != NULL; p = p->next)
+ {
+ entsize += cref_table.root.entsize;
+ c = (struct cref_hash_entry *) p;
+ for (r = c->refs; r != NULL; r = r->next)
+ refsize += sizeof (struct cref_hash_entry);
+ }
+ }
+
+ tabsize = cref_table.root.size * sizeof (struct bfd_hash_entry *);
+ old_tab = xmalloc (tabsize + entsize + refsize);
+
+ alloc_mark = bfd_hash_allocate (&cref_table.root, 1);
+ if (alloc_mark == NULL)
+ return FALSE;
+
+ memcpy (old_tab, cref_table.root.table, tabsize);
+ old_ent = (char *) old_tab + tabsize;
+ old_ref = (char *) old_ent + entsize;
+ old_table = cref_table.root.table;
+ old_size = cref_table.root.size;
+ old_symcount = cref_symcount;
+
+ for (i = 0; i < cref_table.root.size; i++)
+ {
+ struct bfd_hash_entry *p;
+ struct cref_hash_entry *c;
+ struct cref_ref *r;
+
+ for (p = cref_table.root.table[i]; p != NULL; p = p->next)
+ {
+ memcpy (old_ent, p, cref_table.root.entsize);
+ old_ent = (char *) old_ent + cref_table.root.entsize;
+ c = (struct cref_hash_entry *) p;
+ for (r = c->refs; r != NULL; r = r->next)
+ {
+ memcpy (old_ref, r, sizeof (struct cref_hash_entry));
+ old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
+ }
+ }
+ }
+ return TRUE;
+ }
+
+ if (act == notice_not_needed)
+ {
+ char *old_ent, *old_ref;
+
+ if (old_tab == NULL)
+ {
+ /* The only way old_tab can be NULL is if the cref hash table
+ had not been initialised when notice_as_needed. */
+ bfd_hash_table_free (&cref_table.root);
+ cref_initialized = FALSE;
+ return TRUE;
+ }
+
+ old_ent = (char *) old_tab + tabsize;
+ old_ref = (char *) old_ent + entsize;
+ cref_table.root.table = old_table;
+ cref_table.root.size = old_size;
+ memcpy (cref_table.root.table, old_tab, tabsize);
+ cref_symcount = old_symcount;
+
+ for (i = 0; i < cref_table.root.size; i++)
+ {
+ struct bfd_hash_entry *p;
+ struct cref_hash_entry *c;
+ struct cref_ref *r;
+
+ for (p = cref_table.root.table[i]; p != NULL; p = p->next)
+ {
+ memcpy (p, old_ent, cref_table.root.entsize);
+ old_ent = (char *) old_ent + cref_table.root.entsize;
+ c = (struct cref_hash_entry *) p;
+ for (r = c->refs; r != NULL; r = r->next)
+ {
+ memcpy (r, old_ref, sizeof (struct cref_hash_entry));
+ old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
+ }
+ }
+ }
+
+ objalloc_free_block ((struct objalloc *) cref_table.root.memory,
+ alloc_mark);
+ }
+ else if (act != notice_needed)
+ return FALSE;
+
+ free (old_tab);
+ old_tab = NULL;
+ return TRUE;
+}
+
/* Copy the addresses of the hash table entries into an array. This
is called via cref_hash_traverse. We also fill in the demangled
name. */
@@ -330,39 +460,69 @@ check_nocrossrefs (void)
cref_hash_traverse (&cref_table, check_nocrossref, NULL);
- lang_for_each_file (check_section_sym_xref);
+ lang_for_each_file (check_local_sym_xref);
}
-/* Checks for prohibited cross references to section symbols. */
+/* Check for prohibited cross references to local and section symbols. */
static void
-check_section_sym_xref (lang_input_statement_type *statement)
+check_local_sym_xref (lang_input_statement_type *statement)
{
bfd *abfd;
- asection *sec;
+ lang_input_statement_type *li;
+ asymbol **asymbols, **syms;
abfd = statement->the_bfd;
if (abfd == NULL)
return;
- for (sec = abfd->sections; sec != NULL; sec = sec->next)
+ li = abfd->usrdata;
+ if (li != NULL && li->asymbols != NULL)
+ asymbols = li->asymbols;
+ else
{
- asection *outsec;
+ long symsize;
+ long symbol_count;
- outsec = sec->output_section;
- if (outsec != NULL)
+ symsize = bfd_get_symtab_upper_bound (abfd);
+ if (symsize < 0)
+ einfo (_("%B%F: could not read symbols; %E\n"), abfd);
+ asymbols = xmalloc (symsize);
+ symbol_count = bfd_canonicalize_symtab (abfd, asymbols);
+ if (symbol_count < 0)
+ einfo (_("%B%F: could not read symbols: %E\n"), abfd);
+ if (li != NULL)
+ {
+ li->asymbols = asymbols;
+ li->symbol_count = symbol_count;
+ }
+ }
+
+ for (syms = asymbols; *syms; ++syms)
+ {
+ asymbol *sym = *syms;
+ if (sym->flags & (BSF_GLOBAL | BSF_WARNING | BSF_INDIRECT | BSF_FILE))
+ continue;
+ if ((sym->flags & (BSF_LOCAL | BSF_SECTION_SYM)) != 0
+ && sym->section->output_section != NULL)
{
- const char *outsecname;
+ const char *outsecname, *symname;
struct lang_nocrossrefs *ncrs;
struct lang_nocrossref *ncr;
- outsecname = outsec->name;
+ outsecname = sym->section->output_section->name;
+ symname = NULL;
+ if ((sym->flags & BSF_SECTION_SYM) == 0)
+ symname = sym->name;
for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next)
for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next)
if (strcmp (ncr->name, outsecname) == 0)
- check_refs (NULL, sec, abfd, ncrs);
+ check_refs (symname, FALSE, sym->section, abfd, ncrs);
}
}
+
+ if (li == NULL)
+ free (asymbols);
}
/* Check one symbol to see if it is a prohibited cross reference. */
@@ -399,7 +559,8 @@ check_nocrossref (struct cref_hash_entry *h, void *ignore ATTRIBUTE_UNUSED)
for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next)
if (strcmp (ncr->name, defsecname) == 0)
for (ref = h->refs; ref != NULL; ref = ref->next)
- check_refs (hl->root.string, hl->u.def.section, ref->abfd, ncrs);
+ check_refs (hl->root.string, TRUE, hl->u.def.section,
+ ref->abfd, ncrs);
return TRUE;
}
@@ -412,6 +573,7 @@ struct check_refs_info {
asection *defsec;
struct lang_nocrossrefs *ncrs;
asymbol **asymbols;
+ bfd_boolean global;
};
/* This function is called for each symbol defined in a section which
@@ -421,6 +583,7 @@ struct check_refs_info {
static void
check_refs (const char *name,
+ bfd_boolean global,
asection *sec,
bfd *abfd,
struct lang_nocrossrefs *ncrs)
@@ -458,6 +621,7 @@ check_refs (const char *name,
}
info.sym_name = name;
+ info.global = global;
info.defsec = sec;
info.ncrs = ncrs;
info.asymbols = asymbols;
@@ -483,6 +647,7 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
const char *outdefsecname;
struct lang_nocrossref *ncr;
const char *symname;
+ bfd_boolean global;
long relsize;
arelent **relpp;
long relcount;
@@ -508,9 +673,13 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
/* This section is one for which cross references are prohibited.
Look through the relocations, and see if any of them are to
INFO->SYM_NAME. If INFO->SYMNAME is NULL, check for relocations
- against the section symbol. */
+ against the section symbol. If INFO->GLOBAL is TRUE, the
+ definition is global, check for relocations against the global
+ symbols. Otherwise check for relocations against the local and
+ section symbols. */
symname = info->sym_name;
+ global = info->global;
relsize = bfd_get_reloc_upper_bound (abfd, sec);
if (relsize < 0)
@@ -531,6 +700,14 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
if (q->sym_ptr_ptr != NULL
&& *q->sym_ptr_ptr != NULL
+ && ((global
+ && (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr))
+ || bfd_is_com_section (bfd_get_section (*q->sym_ptr_ptr))
+ || ((*q->sym_ptr_ptr)->flags & (BSF_GLOBAL
+ | BSF_WEAK)) != 0))
+ || (!global
+ && ((*q->sym_ptr_ptr)->flags & (BSF_LOCAL
+ | BSF_SECTION_SYM)) != 0))
&& (symname != NULL
? strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), symname) == 0
: (((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0
diff --git a/contrib/binutils/ld/ldctor.c b/contrib/binutils/ld/ldctor.c
index 34d5e5295a7a..3de4ef16051e 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 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
By Steve Chamberlain <sac@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -17,8 +17,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -49,7 +49,7 @@ struct set_info *sets;
RELOC is the relocation to use for an entry in the set. SECTION
and VALUE are the value to add. This is called during the first
phase of the link, when we are still gathering symbols together.
- We just record the information now. The ldctor_find_constructors
+ We just record the information now. The ldctor_build_sets
function will construct the sets. */
void
diff --git a/contrib/binutils/ld/ldctor.h b/contrib/binutils/ld/ldctor.h
index 436df6c0e3a0..5608ff7cbe97 100644
--- a/contrib/binutils/ld/ldctor.h
+++ b/contrib/binutils/ld/ldctor.h
@@ -16,8 +16,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
#ifndef LDCTOR_H
#define LDCTOR_H
diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c
index 760c55ddf6b9..fad1f184d596 100644
--- a/contrib/binutils/ld/ldemul.c
+++ b/contrib/binutils/ld/ldemul.c
@@ -1,5 +1,6 @@
/* ldemul.c -- clearing house for ld emulation states
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,12 +17,14 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
+#include "config.h"
#include "bfd.h"
#include "sysdep.h"
#include "getopt.h"
+#include "bfdlink.h"
#include "ld.h"
#include "ldmisc.h"
@@ -32,7 +35,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldmain.h"
#include "ldemul-list.h"
-ld_emulation_xfer_type *ld_emulation;
+static ld_emulation_xfer_type *ld_emulation;
void
ldemul_hll (char *name)
@@ -73,8 +76,7 @@ ldemul_after_allocation (void)
void
ldemul_before_allocation (void)
{
- if (ld_emulation->before_allocation)
- ld_emulation->before_allocation ();
+ ld_emulation->before_allocation ();
}
void
@@ -86,8 +88,7 @@ ldemul_set_output_arch (void)
void
ldemul_finish (void)
{
- if (ld_emulation->finish)
- ld_emulation->finish ();
+ ld_emulation->finish ();
}
void
@@ -120,10 +121,10 @@ ldemul_open_dynamic_archive (const char *arch, search_dirs_type *search,
}
bfd_boolean
-ldemul_place_orphan (lang_input_statement_type *file, asection *s)
+ldemul_place_orphan (asection *s)
{
if (ld_emulation->place_orphan)
- return (*ld_emulation->place_orphan) (file, s);
+ return (*ld_emulation->place_orphan) (s);
return FALSE;
}
@@ -210,6 +211,15 @@ after_allocation_default (void)
void
before_allocation_default (void)
{
+ if (!link_info.relocatable)
+ strip_excluded_output_sections ();
+}
+
+void
+finish_default (void)
+{
+ if (!link_info.relocatable)
+ _bfd_fix_excluded_sec_syms (output_bfd, &link_info);
}
void
diff --git a/contrib/binutils/ld/ldemul.h b/contrib/binutils/ld/ldemul.h
index 8feef6748c2d..1b9b79b0676c 100644
--- a/contrib/binutils/ld/ldemul.h
+++ b/contrib/binutils/ld/ldemul.h
@@ -1,5 +1,6 @@
/* ld-emul.h - Linker emulation header file
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
+ 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -17,6 +18,9 @@
#ifndef LDEMUL_H
#define LDEMUL_H
+/* Forward declaration for ldemul_add_options() and others. */
+struct option;
+
extern void ldemul_hll
(char *);
extern void ldemul_syslib
@@ -50,7 +54,7 @@ extern void ldemul_set_symbols
extern void ldemul_create_output_section_statements
(void);
extern bfd_boolean ldemul_place_orphan
- (struct lang_input_statement_struct *, asection *);
+ (asection *);
extern bfd_boolean ldemul_parse_args
(int, char **);
extern void ldemul_add_options
@@ -73,6 +77,10 @@ extern void after_allocation_default
(void);
extern void before_allocation_default
(void);
+extern void finish_default
+ (void);
+extern void finish_default
+ (void);
extern void set_output_arch_default
(void);
extern void syslib_default
@@ -139,7 +147,7 @@ typedef struct ld_emulation_xfer_struct {
the default action should be taken. This field may be NULL, in
which case the default action will always be taken. */
bfd_boolean (*place_orphan)
- (struct lang_input_statement_struct *, asection *);
+ (asection *);
/* Run after assigning parsing with the args, but before
reading the script. Used to initialize symbols used in the script. */
diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c
index 4d9a8575fb73..c9d707e793e6 100644
--- a/contrib/binutils/ld/ldexp.c
+++ b/contrib/binutils/ld/ldexp.c
@@ -1,25 +1,25 @@
/* This module handles expression trees.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004
+ 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
-This file is part of GLD, the Gnu Linker.
+ 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 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.
+ GLD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+ 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. */
/* This module is in charge of working out the contents of expressions.
@@ -41,12 +41,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "libiberty.h"
#include "safe-ctype.h"
-static etree_value_type exp_fold_tree_no_dot
- (etree_type *, lang_output_section_statement_type *, lang_phase_type);
-static bfd_vma align_n
- (bfd_vma, bfd_vma);
+static void exp_fold_tree_1 (etree_type *);
+static void exp_fold_tree_no_dot (etree_type *);
+static bfd_vma align_n (bfd_vma, bfd_vma);
-struct exp_data_seg exp_data_seg;
+segment_type *segments;
+
+struct ldexp_control expld;
/* Print the string representation of the given token. Surround it
with spaces if INFIX_P is TRUE. */
@@ -101,7 +102,11 @@ exp_print_token (token_code_type code, int infix_p)
{ MAX_K, "MAX_K" },
{ REL, "relocatable" },
{ DATA_SEGMENT_ALIGN, "DATA_SEGMENT_ALIGN" },
- { DATA_SEGMENT_END, "DATA_SEGMENT_END" }
+ { DATA_SEGMENT_RELRO_END, "DATA_SEGMENT_RELRO_END" },
+ { DATA_SEGMENT_END, "DATA_SEGMENT_END" },
+ { ORIGIN, "ORIGIN" },
+ { LENGTH, "LENGTH" },
+ { SEGMENT_START, "SEGMENT_START" }
};
unsigned int idx;
@@ -124,21 +129,19 @@ exp_print_token (token_code_type code, int infix_p)
}
static void
-make_abs (etree_value_type *ptr)
+make_abs (void)
{
- asection *s = ptr->section->bfd_section;
- ptr->value += s->vma;
- ptr->section = abs_output_section;
+ expld.result.value += expld.result.section->vma;
+ expld.result.section = bfd_abs_section_ptr;
}
-static etree_value_type
+static void
new_abs (bfd_vma value)
{
- etree_value_type new;
- new.valid_p = TRUE;
- new.section = abs_output_section;
- new.value = value;
- return new;
+ expld.result.valid_p = TRUE;
+ expld.result.section = bfd_abs_section_ptr;
+ expld.result.value = value;
+ expld.result.str = NULL;
}
etree_type *
@@ -176,109 +179,87 @@ exp_relop (asection *section, bfd_vma value)
return new;
}
-static etree_value_type
-new_rel (bfd_vma value,
- char *str,
- lang_output_section_statement_type *section)
+static void
+new_rel (bfd_vma value, char *str, asection *section)
{
- etree_value_type new;
- new.valid_p = TRUE;
- new.value = value;
- new.str = str;
- new.section = section;
- return new;
+ expld.result.valid_p = TRUE;
+ expld.result.value = value;
+ expld.result.str = str;
+ expld.result.section = section;
}
-static etree_value_type
-new_rel_from_section (bfd_vma value,
- lang_output_section_statement_type *section)
+static void
+new_rel_from_abs (bfd_vma value)
{
- etree_value_type new;
- new.valid_p = TRUE;
- new.value = value;
- new.str = NULL;
- new.section = section;
-
- new.value -= section->bfd_section->vma;
-
- return new;
+ expld.result.valid_p = TRUE;
+ expld.result.value = value - expld.section->vma;
+ expld.result.str = NULL;
+ expld.result.section = expld.section;
}
-static etree_value_type
-fold_unary (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot,
- bfd_vma *dotp)
+static void
+fold_unary (etree_type *tree)
{
- etree_value_type result;
-
- result = exp_fold_tree (tree->unary.child,
- current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
+ exp_fold_tree_1 (tree->unary.child);
+ if (expld.result.valid_p)
{
switch (tree->type.node_code)
{
case ALIGN_K:
- if (allocation_done != lang_first_phase_enum)
- result = new_rel_from_section (align_n (dot, result.value),
- current_section);
+ if (expld.phase != lang_first_phase_enum)
+ new_rel_from_abs (align_n (expld.dot, expld.result.value));
else
- result.valid_p = FALSE;
+ expld.result.valid_p = FALSE;
break;
case ABSOLUTE:
- if (allocation_done != lang_first_phase_enum)
- {
- result.value += result.section->bfd_section->vma;
- result.section = abs_output_section;
- }
- else
- result.valid_p = FALSE;
+ make_abs ();
break;
case '~':
- make_abs (&result);
- result.value = ~result.value;
+ make_abs ();
+ expld.result.value = ~expld.result.value;
break;
case '!':
- make_abs (&result);
- result.value = !result.value;
+ make_abs ();
+ expld.result.value = !expld.result.value;
break;
case '-':
- make_abs (&result);
- result.value = -result.value;
+ make_abs ();
+ expld.result.value = -expld.result.value;
break;
case NEXT:
/* Return next place aligned to value. */
- if (allocation_done == lang_allocating_phase_enum)
+ if (expld.phase != lang_first_phase_enum)
{
- make_abs (&result);
- result.value = align_n (dot, result.value);
+ make_abs ();
+ expld.result.value = align_n (expld.dot, expld.result.value);
}
else
- result.valid_p = FALSE;
+ expld.result.valid_p = FALSE;
break;
case DATA_SEGMENT_END:
- if (allocation_done != lang_first_phase_enum
- && current_section == abs_output_section
- && (exp_data_seg.phase == exp_dataseg_align_seen
- || exp_data_seg.phase == exp_dataseg_adjust
- || allocation_done != lang_allocating_phase_enum))
+ if (expld.phase != lang_first_phase_enum
+ && expld.section == bfd_abs_section_ptr
+ && (expld.dataseg.phase == exp_dataseg_align_seen
+ || expld.dataseg.phase == exp_dataseg_relro_seen
+ || expld.dataseg.phase == exp_dataseg_adjust
+ || expld.dataseg.phase == exp_dataseg_relro_adjust
+ || expld.phase == lang_final_phase_enum))
{
- if (exp_data_seg.phase == exp_dataseg_align_seen)
+ if (expld.dataseg.phase == exp_dataseg_align_seen
+ || expld.dataseg.phase == exp_dataseg_relro_seen)
{
- exp_data_seg.phase = exp_dataseg_end_seen;
- exp_data_seg.end = result.value;
+ expld.dataseg.phase = exp_dataseg_end_seen;
+ expld.dataseg.end = expld.result.value;
}
}
else
- result.valid_p = FALSE;
+ expld.result.valid_p = FALSE;
break;
default:
@@ -286,76 +267,90 @@ fold_unary (etree_type *tree,
break;
}
}
-
- return result;
}
-static etree_value_type
-fold_binary (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot,
- bfd_vma *dotp)
+static void
+fold_binary (etree_type *tree)
{
- etree_value_type result;
+ exp_fold_tree_1 (tree->binary.lhs);
- result = exp_fold_tree (tree->binary.lhs, current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
+ /* The SEGMENT_START operator is special because its first
+ operand is a string, not the name of a symbol. */
+ if (expld.result.valid_p && tree->type.node_code == SEGMENT_START)
+ {
+ const char *segment_name;
+ segment_type *seg;
+ /* Check to see if the user has overridden the default
+ value. */
+ segment_name = tree->binary.rhs->name.name;
+ for (seg = segments; seg; seg = seg->next)
+ if (strcmp (seg->name, segment_name) == 0)
+ {
+ seg->used = TRUE;
+ expld.result.value = seg->value;
+ expld.result.str = NULL;
+ expld.result.section = NULL;
+ break;
+ }
+ }
+ else if (expld.result.valid_p)
{
- etree_value_type other;
+ etree_value_type lhs = expld.result;
- other = exp_fold_tree (tree->binary.rhs,
- current_section,
- allocation_done, dot, dotp);
- if (other.valid_p)
+ exp_fold_tree_1 (tree->binary.rhs);
+ if (expld.result.valid_p)
{
/* If the values are from different sections, or this is an
absolute expression, make both the source arguments
absolute. However, adding or subtracting an absolute
value from a relative value is meaningful, and is an
exception. */
- if (current_section != abs_output_section
- && (other.section == abs_output_section
- || (result.section == abs_output_section
- && tree->type.node_code == '+'))
+ if (expld.section != bfd_abs_section_ptr
+ && lhs.section == bfd_abs_section_ptr
+ && tree->type.node_code == '+')
+ {
+ /* Keep the section of the rhs term. */
+ expld.result.value = lhs.value + expld.result.value;
+ return;
+ }
+ else if (expld.section != bfd_abs_section_ptr
+ && expld.result.section == bfd_abs_section_ptr
&& (tree->type.node_code == '+'
|| tree->type.node_code == '-'))
{
- if (other.section != abs_output_section)
- {
- /* Keep the section of the other term. */
- if (tree->type.node_code == '+')
- other.value = result.value + other.value;
- else
- other.value = result.value - other.value;
- return other;
- }
+ /* Keep the section of the lhs term. */
+ expld.result.section = lhs.section;
}
- else if (result.section != other.section
- || current_section == abs_output_section)
+ else if (expld.result.section != lhs.section
+ || expld.section == bfd_abs_section_ptr)
{
- make_abs (&result);
- make_abs (&other);
+ make_abs ();
+ lhs.value += lhs.section->vma;
}
switch (tree->type.node_code)
{
case '%':
- if (other.value == 0)
+ if (expld.result.value != 0)
+ expld.result.value = ((bfd_signed_vma) lhs.value
+ % (bfd_signed_vma) expld.result.value);
+ else if (expld.phase != lang_mark_phase_enum)
einfo (_("%F%S %% by zero\n"));
- result.value = ((bfd_signed_vma) result.value
- % (bfd_signed_vma) other.value);
break;
case '/':
- if (other.value == 0)
+ if (expld.result.value != 0)
+ expld.result.value = ((bfd_signed_vma) lhs.value
+ / (bfd_signed_vma) expld.result.value);
+ else if (expld.phase != lang_mark_phase_enum)
einfo (_("%F%S / by zero\n"));
- result.value = ((bfd_signed_vma) result.value
- / (bfd_signed_vma) other.value);
break;
-#define BOP(x,y) case x : result.value = result.value y other.value; break;
+#define BOP(x, y) \
+ case x: \
+ expld.result.value = lhs.value y expld.result.value; \
+ break;
+
BOP ('+', +);
BOP ('*', *);
BOP ('-', -);
@@ -374,45 +369,82 @@ fold_binary (etree_type *tree,
BOP (OROR, ||);
case MAX_K:
- if (result.value < other.value)
- result = other;
+ if (lhs.value > expld.result.value)
+ expld.result.value = lhs.value;
break;
case MIN_K:
- if (result.value > other.value)
- result = other;
+ if (lhs.value < expld.result.value)
+ expld.result.value = lhs.value;
break;
case ALIGN_K:
- result.value = align_n (result.value, other.value);
+ expld.result.value = align_n (lhs.value, expld.result.value);
break;
-
+
case DATA_SEGMENT_ALIGN:
- if (allocation_done != lang_first_phase_enum
- && current_section == abs_output_section
- && (exp_data_seg.phase == exp_dataseg_none
- || exp_data_seg.phase == exp_dataseg_adjust
- || allocation_done != lang_allocating_phase_enum))
+ if (expld.phase != lang_first_phase_enum
+ && expld.section == bfd_abs_section_ptr
+ && (expld.dataseg.phase == exp_dataseg_none
+ || expld.dataseg.phase == exp_dataseg_adjust
+ || expld.dataseg.phase == exp_dataseg_relro_adjust
+ || expld.phase == lang_final_phase_enum))
{
- bfd_vma maxpage = result.value;
+ bfd_vma maxpage = lhs.value;
+ bfd_vma commonpage = expld.result.value;
- result.value = align_n (dot, maxpage);
- if (exp_data_seg.phase != exp_dataseg_adjust)
+ expld.result.value = align_n (expld.dot, maxpage);
+ if (expld.dataseg.phase == exp_dataseg_relro_adjust)
+ expld.result.value = expld.dataseg.base;
+ else if (expld.dataseg.phase != exp_dataseg_adjust)
{
- result.value += dot & (maxpage - 1);
- if (allocation_done == lang_allocating_phase_enum)
+ expld.result.value += expld.dot & (maxpage - 1);
+ if (expld.phase == lang_allocating_phase_enum)
{
- exp_data_seg.phase = exp_dataseg_align_seen;
- exp_data_seg.base = result.value;
- exp_data_seg.pagesize = other.value;
+ expld.dataseg.phase = exp_dataseg_align_seen;
+ expld.dataseg.min_base = align_n (expld.dot, maxpage);
+ expld.dataseg.base = expld.result.value;
+ expld.dataseg.pagesize = commonpage;
+ expld.dataseg.maxpagesize = maxpage;
+ expld.dataseg.relro_end = 0;
}
}
- else if (other.value < maxpage)
- result.value += (dot + other.value - 1)
- & (maxpage - other.value);
+ else if (commonpage < maxpage)
+ expld.result.value += ((expld.dot + commonpage - 1)
+ & (maxpage - commonpage));
+ }
+ else
+ expld.result.valid_p = FALSE;
+ break;
+
+ case DATA_SEGMENT_RELRO_END:
+ if (expld.phase != lang_first_phase_enum
+ && (expld.dataseg.phase == exp_dataseg_align_seen
+ || expld.dataseg.phase == exp_dataseg_adjust
+ || expld.dataseg.phase == exp_dataseg_relro_adjust
+ || expld.phase == lang_final_phase_enum))
+ {
+ if (expld.dataseg.phase == exp_dataseg_align_seen
+ || expld.dataseg.phase == exp_dataseg_relro_adjust)
+ expld.dataseg.relro_end = lhs.value + expld.result.value;
+
+ if (expld.dataseg.phase == exp_dataseg_relro_adjust
+ && (expld.dataseg.relro_end
+ & (expld.dataseg.pagesize - 1)))
+ {
+ expld.dataseg.relro_end += expld.dataseg.pagesize - 1;
+ expld.dataseg.relro_end &= ~(expld.dataseg.pagesize - 1);
+ expld.result.value = (expld.dataseg.relro_end
+ - expld.result.value);
+ }
+ else
+ expld.result.value = lhs.value;
+
+ if (expld.dataseg.phase == exp_dataseg_align_seen)
+ expld.dataseg.phase = exp_dataseg_relro_seen;
}
else
- result.valid_p = FALSE;
+ expld.result.valid_p = FALSE;
break;
default:
@@ -420,54 +452,40 @@ fold_binary (etree_type *tree,
}
}
else
- {
- result.valid_p = FALSE;
- }
+ expld.result.valid_p = FALSE;
}
-
- return result;
}
-static etree_value_type
-fold_trinary (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot,
- bfd_vma *dotp)
+static void
+fold_trinary (etree_type *tree)
{
- etree_value_type result;
-
- result = exp_fold_tree (tree->trinary.cond, current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
- result = exp_fold_tree ((result.value
- ? tree->trinary.lhs
- : tree->trinary.rhs),
- current_section,
- allocation_done, dot, dotp);
-
- return result;
+ exp_fold_tree_1 (tree->trinary.cond);
+ if (expld.result.valid_p)
+ exp_fold_tree_1 (expld.result.value
+ ? tree->trinary.lhs
+ : tree->trinary.rhs);
}
-static etree_value_type
-fold_name (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot)
+static void
+fold_name (etree_type *tree)
{
- etree_value_type result;
+ memset (&expld.result, 0, sizeof (expld.result));
- result.valid_p = FALSE;
-
switch (tree->type.node_code)
{
case SIZEOF_HEADERS:
- if (allocation_done != lang_first_phase_enum)
- result = new_abs (bfd_sizeof_headers (output_bfd,
- link_info.relocatable));
+ if (expld.phase != lang_first_phase_enum)
+ {
+ bfd_vma hdr_size = 0;
+ /* 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);
+ new_abs (hdr_size);
+ }
break;
case DEFINED:
- if (allocation_done == lang_first_phase_enum)
+ if (expld.phase == lang_first_phase_enum)
lang_track_definedness (tree->name.name);
else
{
@@ -478,23 +496,22 @@ fold_name (etree_type *tree,
h = bfd_wrapped_link_hash_lookup (output_bfd, &link_info,
tree->name.name,
FALSE, FALSE, TRUE);
- result.value = (h != NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak
- || h->type == bfd_link_hash_common)
- && (def_iteration == lang_statement_iteration
- || def_iteration == -1));
- result.section = abs_output_section;
- result.valid_p = TRUE;
+ expld.result.value = (h != NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak
+ || h->type == bfd_link_hash_common)
+ && (def_iteration == lang_statement_iteration
+ || def_iteration == -1));
+ expld.result.section = bfd_abs_section_ptr;
+ expld.result.valid_p = TRUE;
}
break;
case NAME:
- if (tree->name.name[0] == '.' && tree->name.name[1] == 0)
- {
- if (allocation_done != lang_first_phase_enum)
- result = new_rel_from_section (dot, current_section);
- }
- else if (allocation_done != lang_first_phase_enum)
+ if (expld.phase == lang_first_phase_enum)
+ ;
+ else if (tree->name.name[0] == '.' && tree->name.name[1] == 0)
+ new_rel_from_abs (expld.dot);
+ else
{
struct bfd_link_hash_entry *h;
@@ -507,151 +524,153 @@ fold_name (etree_type *tree,
|| h->type == bfd_link_hash_defweak)
{
if (bfd_is_abs_section (h->u.def.section))
- result = new_abs (h->u.def.value);
- else if (allocation_done == lang_final_phase_enum
- || allocation_done == lang_allocating_phase_enum)
+ new_abs (h->u.def.value);
+ else
{
asection *output_section;
output_section = h->u.def.section->output_section;
if (output_section == NULL)
- einfo (_("%X%S: unresolvable symbol `%s' referenced in expression\n"),
- tree->name.name);
- else
{
- lang_output_section_statement_type *os;
-
- os = (lang_output_section_statement_lookup
- (bfd_get_section_name (output_bfd,
- output_section)));
-
- /* FIXME: Is this correct if this section is
- being linked with -R? */
- result = new_rel ((h->u.def.value
- + h->u.def.section->output_offset),
- NULL,
- os);
+ if (expld.phase != lang_mark_phase_enum)
+ einfo (_("%X%S: unresolvable symbol `%s'"
+ " referenced in expression\n"),
+ tree->name.name);
}
+ else
+ new_rel (h->u.def.value + h->u.def.section->output_offset,
+ NULL, output_section);
}
}
- else if (allocation_done == lang_final_phase_enum)
+ else if (expld.phase == lang_final_phase_enum
+ || expld.assigning_to_dot)
einfo (_("%F%S: undefined symbol `%s' referenced in expression\n"),
tree->name.name);
else 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);
+ if (h->u.undef.next == NULL && h != link_info.hash->undefs_tail)
+ bfd_link_add_undef (link_info.hash, h);
}
}
break;
case ADDR:
- if (allocation_done != lang_first_phase_enum)
+ if (expld.phase != lang_first_phase_enum)
{
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
- if (os && os->processed > 0)
- result = new_rel (0, NULL, os);
+ if (os != NULL && os->processed)
+ new_rel (0, NULL, os->bfd_section);
}
break;
case LOADADDR:
- if (allocation_done != lang_first_phase_enum)
+ if (expld.phase != lang_first_phase_enum)
{
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
- if (os && os->processed != 0)
+ if (os != NULL && os->processed)
{
if (os->load_base == NULL)
- result = new_rel (0, NULL, os);
+ new_rel (0, NULL, os->bfd_section);
else
- result = exp_fold_tree_no_dot (os->load_base,
- abs_output_section,
- allocation_done);
+ exp_fold_tree_1 (os->load_base);
}
}
break;
case SIZEOF:
- if (allocation_done != lang_first_phase_enum)
+ 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 && os->processed > 0)
- result = new_abs (os->bfd_section->_raw_size / opb);
+ if (os == NULL)
+ new_abs (0);
+ else if (os->processed)
+ new_abs (os->bfd_section->size / opb);
}
break;
+ case LENGTH:
+ {
+ lang_memory_region_type *mem;
+
+ mem = lang_memory_region_lookup (tree->name.name, FALSE);
+ if (mem != NULL)
+ new_abs (mem->length);
+ else
+ einfo (_("%F%S: undefined MEMORY region `%s'"
+ " referenced in expression\n"), tree->name.name);
+ }
+ break;
+
+ case ORIGIN:
+ {
+ lang_memory_region_type *mem;
+
+ mem = lang_memory_region_lookup (tree->name.name, FALSE);
+ if (mem != NULL)
+ new_abs (mem->origin);
+ else
+ einfo (_("%F%S: undefined MEMORY region `%s'"
+ " referenced in expression\n"), tree->name.name);
+ }
+ break;
+
default:
FAIL ();
break;
}
-
- return result;
}
-etree_value_type
-exp_fold_tree (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done,
- bfd_vma dot,
- bfd_vma *dotp)
+static void
+exp_fold_tree_1 (etree_type *tree)
{
- etree_value_type result;
-
if (tree == NULL)
{
- result.valid_p = FALSE;
- return result;
+ memset (&expld.result, 0, sizeof (expld.result));
+ return;
}
switch (tree->type.node_class)
{
case etree_value:
- result = new_rel (tree->value.value, tree->value.str, current_section);
+ new_rel (tree->value.value, tree->value.str, expld.section);
break;
case etree_rel:
- if (allocation_done != lang_final_phase_enum)
- result.valid_p = FALSE;
+ if (expld.phase != lang_first_phase_enum)
+ {
+ asection *output_section = tree->rel.section->output_section;
+ new_rel (tree->rel.value + tree->rel.section->output_offset,
+ NULL, output_section);
+ }
else
- result = new_rel ((tree->rel.value
- + tree->rel.section->output_section->vma
- + tree->rel.section->output_offset),
- NULL,
- current_section);
+ memset (&expld.result, 0, sizeof (expld.result));
break;
case etree_assert:
- result = exp_fold_tree (tree->assert_s.child,
- current_section,
- allocation_done, dot, dotp);
- if (result.valid_p)
- {
- if (! result.value)
- einfo ("%F%P: %s\n", tree->assert_s.message);
- return result;
- }
+ exp_fold_tree_1 (tree->assert_s.child);
+ if (expld.phase == lang_final_phase_enum && !expld.result.value)
+ einfo ("%X%P: %s\n", tree->assert_s.message);
break;
case etree_unary:
- result = fold_unary (tree, current_section, allocation_done,
- dot, dotp);
+ fold_unary (tree);
break;
case etree_binary:
- result = fold_binary (tree, current_section, allocation_done,
- dot, dotp);
+ fold_binary (tree);
break;
case etree_trinary:
- result = fold_trinary (tree, current_section, allocation_done,
- dot, dotp);
+ fold_trinary (tree);
break;
case etree_assign:
@@ -662,118 +681,128 @@ exp_fold_tree (etree_type *tree,
/* Assignment to dot can only be done during allocation. */
if (tree->type.node_class != etree_assign)
einfo (_("%F%S can not PROVIDE assignment to location counter\n"));
- if (allocation_done == lang_allocating_phase_enum
- || (allocation_done == lang_final_phase_enum
- && current_section == abs_output_section))
+ if (expld.phase == lang_mark_phase_enum
+ || expld.phase == lang_allocating_phase_enum
+ || (expld.phase == lang_final_phase_enum
+ && expld.section == bfd_abs_section_ptr))
{
- result = exp_fold_tree (tree->assign.src,
- current_section,
- allocation_done, dot,
- dotp);
- if (! result.valid_p)
- einfo (_("%F%S invalid assignment to location counter\n"));
+ /* Notify the folder that this is an assignment to dot. */
+ expld.assigning_to_dot = TRUE;
+ exp_fold_tree_1 (tree->assign.src);
+ expld.assigning_to_dot = FALSE;
+
+ if (!expld.result.valid_p)
+ {
+ if (expld.phase != lang_mark_phase_enum)
+ einfo (_("%F%S invalid assignment to location counter\n"));
+ }
+ else if (expld.dotp == NULL)
+ einfo (_("%F%S assignment to location counter"
+ " invalid outside of SECTION\n"));
else
{
- if (current_section == NULL)
- einfo (_("%F%S assignment to location counter invalid outside of SECTION\n"));
+ bfd_vma nextdot;
+
+ nextdot = expld.result.value + expld.section->vma;
+ if (nextdot < expld.dot
+ && expld.section != bfd_abs_section_ptr)
+ einfo (_("%F%S cannot move location counter backwards"
+ " (from %V to %V)\n"), expld.dot, nextdot);
else
{
- bfd_vma nextdot;
-
- nextdot = (result.value
- + current_section->bfd_section->vma);
- if (nextdot < dot
- && current_section != abs_output_section)
- einfo (_("%F%S cannot move location counter backwards (from %V to %V)\n"),
- dot, nextdot);
- else
- *dotp = nextdot;
+ expld.dot = nextdot;
+ *expld.dotp = nextdot;
}
}
}
+ else
+ memset (&expld.result, 0, sizeof (expld.result));
}
else
{
- result = exp_fold_tree (tree->assign.src,
- current_section, allocation_done,
- dot, dotp);
- if (result.valid_p)
- {
- bfd_boolean create;
- struct bfd_link_hash_entry *h;
+ struct bfd_link_hash_entry *h = NULL;
- if (tree->type.node_class == etree_assign)
- create = TRUE;
- else
- create = FALSE;
+ if (tree->type.node_class == etree_provide)
+ {
h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
- create, FALSE, TRUE);
+ FALSE, FALSE, TRUE);
+ if (h == NULL
+ || (h->type != bfd_link_hash_new
+ && h->type != bfd_link_hash_undefined
+ && h->type != bfd_link_hash_common))
+ {
+ /* Do nothing. The symbol was never referenced, or was
+ defined by some object. */
+ break;
+ }
+ }
+
+ exp_fold_tree_1 (tree->assign.src);
+ if (expld.result.valid_p)
+ {
if (h == NULL)
{
- if (create)
+ h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
+ TRUE, FALSE, TRUE);
+ if (h == NULL)
einfo (_("%P%F:%s: hash creation failed\n"),
tree->assign.dst);
}
- else if (tree->type.node_class == etree_provide
- && h->type != bfd_link_hash_new
- && h->type != bfd_link_hash_undefined
- && h->type != bfd_link_hash_common)
- {
- /* Do nothing. The symbol was defined by some
- object. */
- }
- else
- {
- /* FIXME: Should we worry if the symbol is already
- defined? */
- lang_update_definedness (tree->assign.dst, h);
- h->type = bfd_link_hash_defined;
- h->u.def.value = result.value;
- h->u.def.section = result.section->bfd_section;
- if (tree->type.node_class == etree_provide)
- tree->type.node_class = etree_provided;
- }
+
+ /* FIXME: Should we worry if the symbol is already
+ defined? */
+ lang_update_definedness (tree->assign.dst, h);
+ h->type = bfd_link_hash_defined;
+ h->u.def.value = expld.result.value;
+ h->u.def.section = expld.result.section;
+ if (tree->type.node_class == etree_provide)
+ tree->type.node_class = etree_provided;
}
}
break;
case etree_name:
- result = fold_name (tree, current_section, allocation_done, dot);
+ fold_name (tree);
break;
default:
FAIL ();
+ memset (&expld.result, 0, sizeof (expld.result));
break;
}
+}
- return result;
+void
+exp_fold_tree (etree_type *tree, asection *current_section, bfd_vma *dotp)
+{
+ expld.dot = *dotp;
+ expld.dotp = dotp;
+ expld.section = current_section;
+ exp_fold_tree_1 (tree);
}
-static etree_value_type
-exp_fold_tree_no_dot (etree_type *tree,
- lang_output_section_statement_type *current_section,
- lang_phase_type allocation_done)
+static void
+exp_fold_tree_no_dot (etree_type *tree)
{
- return exp_fold_tree (tree, current_section, allocation_done, 0, NULL);
+ expld.dot = 0;
+ expld.dotp = NULL;
+ expld.section = bfd_abs_section_ptr;
+ exp_fold_tree_1 (tree);
}
etree_type *
exp_binop (int code, etree_type *lhs, etree_type *rhs)
{
etree_type value, *new;
- etree_value_type r;
value.type.node_code = code;
value.binary.lhs = lhs;
value.binary.rhs = rhs;
value.type.node_class = etree_binary;
- r = exp_fold_tree_no_dot (&value,
- abs_output_section,
- lang_first_phase_enum);
- if (r.valid_p)
- {
- return exp_intop (r.value);
- }
+ exp_fold_tree_no_dot (&value);
+ if (expld.result.valid_p)
+ return exp_intop (expld.result.value);
+
new = stat_alloc (sizeof (new->binary));
memcpy (new, &value, sizeof (new->binary));
return new;
@@ -783,15 +812,15 @@ etree_type *
exp_trinop (int code, etree_type *cond, etree_type *lhs, etree_type *rhs)
{
etree_type value, *new;
- etree_value_type r;
+
value.type.node_code = code;
value.trinary.lhs = lhs;
value.trinary.cond = cond;
value.trinary.rhs = rhs;
value.type.node_class = etree_trinary;
- r = exp_fold_tree_no_dot (&value, NULL, lang_first_phase_enum);
- if (r.valid_p)
- return exp_intop (r.value);
+ exp_fold_tree_no_dot (&value);
+ if (expld.result.valid_p)
+ return exp_intop (expld.result.value);
new = stat_alloc (sizeof (new->trinary));
memcpy (new, &value, sizeof (new->trinary));
@@ -803,14 +832,12 @@ exp_unop (int code, etree_type *child)
{
etree_type value, *new;
- etree_value_type r;
value.unary.type.node_code = code;
value.unary.child = child;
value.unary.type.node_class = etree_unary;
- r = exp_fold_tree_no_dot (&value, abs_output_section,
- lang_first_phase_enum);
- if (r.valid_p)
- return exp_intop (r.value);
+ exp_fold_tree_no_dot (&value);
+ if (expld.result.valid_p)
+ return exp_intop (expld.result.value);
new = stat_alloc (sizeof (new->unary));
memcpy (new, &value, sizeof (new->unary));
@@ -821,14 +848,14 @@ etree_type *
exp_nameop (int code, const char *name)
{
etree_type value, *new;
- etree_value_type r;
+
value.name.type.node_code = code;
value.name.name = name;
value.name.type.node_class = etree_name;
- r = exp_fold_tree_no_dot (&value, NULL, lang_first_phase_enum);
- if (r.valid_p)
- return exp_intop (r.value);
+ exp_fold_tree_no_dot (&value);
+ if (expld.result.valid_p)
+ return exp_intop (expld.result.value);
new = stat_alloc (sizeof (new->name));
memcpy (new, &value, sizeof (new->name));
@@ -839,27 +866,20 @@ exp_nameop (int code, const char *name)
etree_type *
exp_assop (int code, const char *dst, etree_type *src)
{
- etree_type value, *new;
-
- value.assign.type.node_code = code;
+ etree_type *new;
- value.assign.src = src;
- value.assign.dst = dst;
- value.assign.type.node_class = etree_assign;
-
-#if 0
- if (exp_fold_tree_no_dot (&value, &result))
- return exp_intop (result);
-#endif
new = stat_alloc (sizeof (new->assign));
- memcpy (new, &value, sizeof (new->assign));
+ new->type.node_code = code;
+ new->type.node_class = etree_assign;
+ new->assign.src = src;
+ new->assign.dst = dst;
return new;
}
/* Handle PROVIDE. */
etree_type *
-exp_provide (const char *dst, etree_type *src)
+exp_provide (const char *dst, etree_type *src, bfd_boolean hidden)
{
etree_type *n;
@@ -868,6 +888,7 @@ exp_provide (const char *dst, etree_type *src)
n->assign.type.node_class = etree_provide;
n->assign.src = src;
n->assign.dst = dst;
+ n->assign.hidden = hidden;
return n;
}
@@ -909,13 +930,6 @@ exp_print_tree (etree_type *tree)
minfo ("%s+0x%v", tree->rel.section->name, tree->rel.value);
return;
case etree_assign:
-#if 0
- if (tree->assign.dst->sdefs != NULL)
- fprintf (config.map_file, "%s (%x) ", tree->assign.dst->name,
- tree->assign.dst->sdefs->value);
- else
- fprintf (config.map_file, "%s (UNDEFINED)", tree->assign.dst->name);
-#endif
fprintf (config.map_file, "%s", tree->assign.dst);
exp_print_token (tree->type.node_code, TRUE);
exp_print_tree (tree->assign.src);
@@ -956,9 +970,6 @@ exp_print_tree (etree_type *tree)
fprintf (config.map_file, ", %s)", tree->assert_s.message);
break;
- case etree_undef:
- fprintf (config.map_file, "????????");
- break;
case etree_name:
if (tree->type.node_code == NAME)
{
@@ -978,59 +989,51 @@ exp_print_tree (etree_type *tree)
}
bfd_vma
-exp_get_vma (etree_type *tree,
- bfd_vma def,
- char *name,
- lang_phase_type allocation_done)
+exp_get_vma (etree_type *tree, bfd_vma def, char *name)
{
- etree_value_type r;
-
if (tree != NULL)
{
- r = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
- if (! r.valid_p && name != NULL)
+ exp_fold_tree_no_dot (tree);
+ if (expld.result.valid_p)
+ return expld.result.value;
+ else if (name != NULL && expld.phase != lang_mark_phase_enum)
einfo (_("%F%S nonconstant expression for %s\n"), name);
- return r.value;
}
- else
- return def;
+ return def;
}
int
-exp_get_value_int (etree_type *tree,
- int def,
- char *name,
- lang_phase_type allocation_done)
+exp_get_value_int (etree_type *tree, int def, char *name)
{
- return exp_get_vma (tree, def, name, allocation_done);
+ return exp_get_vma (tree, def, name);
}
fill_type *
-exp_get_fill (etree_type *tree,
- fill_type *def,
- char *name,
- lang_phase_type allocation_done)
+exp_get_fill (etree_type *tree, fill_type *def, char *name)
{
fill_type *fill;
- etree_value_type r;
size_t len;
unsigned int val;
if (tree == NULL)
return def;
- r = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
- if (! r.valid_p && name != NULL)
- einfo (_("%F%S nonconstant expression for %s\n"), name);
+ exp_fold_tree_no_dot (tree);
+ if (!expld.result.valid_p)
+ {
+ if (name != NULL && expld.phase != lang_mark_phase_enum)
+ einfo (_("%F%S nonconstant expression for %s\n"), name);
+ return def;
+ }
- if (r.str != NULL && (len = strlen (r.str)) != 0)
+ if (expld.result.str != NULL && (len = strlen (expld.result.str)) != 0)
{
unsigned char *dst;
unsigned char *s;
fill = xmalloc ((len + 1) / 2 + sizeof (*fill) - 1);
fill->size = (len + 1) / 2;
dst = fill->data;
- s = r.str;
+ s = (unsigned char *) expld.result.str;
val = 0;
do
{
@@ -1053,7 +1056,7 @@ exp_get_fill (etree_type *tree,
else
{
fill = xmalloc (4 + sizeof (*fill) - 1);
- val = r.value;
+ val = expld.result.value;
fill->data[0] = (val >> 24) & 0xff;
fill->data[1] = (val >> 16) & 0xff;
fill->data[2] = (val >> 8) & 0xff;
@@ -1064,20 +1067,21 @@ exp_get_fill (etree_type *tree,
}
bfd_vma
-exp_get_abs_int (etree_type *tree,
- int def ATTRIBUTE_UNUSED,
- char *name,
- lang_phase_type allocation_done)
+exp_get_abs_int (etree_type *tree, int def, char *name)
{
- etree_value_type res;
- res = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
-
- if (res.valid_p)
- res.value += res.section->bfd_section->vma;
- else
- einfo (_("%F%S non constant expression for %s\n"), name);
+ if (tree != NULL)
+ {
+ exp_fold_tree_no_dot (tree);
- return res.value;
+ if (expld.result.valid_p)
+ {
+ expld.result.value += expld.result.section->vma;
+ return expld.result.value;
+ }
+ else if (name != NULL && expld.phase != lang_mark_phase_enum)
+ einfo (_("%F%S non constant expression for %s\n"), name);
+ }
+ return def;
}
static bfd_vma
diff --git a/contrib/binutils/ld/ldexp.h b/contrib/binutils/ld/ldexp.h
index 99e7073b2c4b..fed3a0da44c9 100644
--- a/contrib/binutils/ld/ldexp.h
+++ b/contrib/binutils/ld/ldexp.h
@@ -1,6 +1,6 @@
/* ldexp.h -
Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LDEXP_H
#define LDEXP_H
@@ -26,7 +26,7 @@
typedef struct {
bfd_vma value;
char *str;
- struct lang_output_section_statement_struct *section;
+ asection *section;
bfd_boolean valid_p;
} etree_value_type;
@@ -40,8 +40,6 @@ typedef struct {
etree_assign,
etree_provide,
etree_provided,
- etree_undef,
- etree_unspec,
etree_value,
etree_assert,
etree_rel
@@ -65,6 +63,7 @@ typedef union etree_union {
node_type type;
const char *dst;
union etree_union *src;
+ bfd_boolean hidden;
} assign;
struct {
node_type type;
@@ -91,15 +90,60 @@ typedef union etree_union {
} assert_s;
} etree_type;
-extern struct exp_data_seg {
- enum {
- exp_dataseg_none,
- exp_dataseg_align_seen,
- exp_dataseg_end_seen,
- exp_dataseg_adjust
- } phase;
- bfd_vma base, end, pagesize;
-} exp_data_seg;
+typedef enum {
+ lang_first_phase_enum,
+ lang_mark_phase_enum,
+ lang_allocating_phase_enum,
+ lang_final_phase_enum
+} lang_phase_type;
+
+struct ldexp_control {
+ /* Modify expression evaluation depending on this. */
+ lang_phase_type phase;
+
+ /* Principally used for diagnostics. */
+ bfd_boolean assigning_to_dot;
+
+ /* Working results. */
+ etree_value_type result;
+ bfd_vma dot;
+
+ /* Current dot and section passed to ldexp folder. */
+ bfd_vma *dotp;
+ asection *section;
+
+ /* State machine and results for DATASEG. */
+ struct {
+ enum {
+ exp_dataseg_none,
+ exp_dataseg_align_seen,
+ exp_dataseg_relro_seen,
+ exp_dataseg_end_seen,
+ exp_dataseg_relro_adjust,
+ exp_dataseg_adjust
+ } phase;
+
+ bfd_vma base, min_base, relro_end, end, pagesize, maxpagesize;
+ } dataseg;
+};
+
+extern struct ldexp_control expld;
+
+/* A maps from a segment name to a base address. */
+typedef struct segment_struct {
+ /* The next segment in the linked list. */
+ struct segment_struct *next;
+ /* The name of the sgement. */
+ const char *name;
+ /* The base address for the segment. */
+ bfd_vma value;
+ /* True if a SEGMENT_START directive corresponding to this segment
+ has been seen. */
+ bfd_boolean used;
+} segment_type;
+
+/* The segments specified by the user on the command-line. */
+extern segment_type *segments;
typedef struct _fill_type fill_type;
@@ -109,11 +153,8 @@ etree_type *exp_bigintop
(bfd_vma, char *);
etree_type *exp_relop
(asection *, bfd_vma);
-etree_value_type invalid
- (void);
-etree_value_type exp_fold_tree
- (etree_type *, struct lang_output_section_statement_struct *,
- lang_phase_type, bfd_vma, bfd_vma *);
+void exp_fold_tree
+ (etree_type *, asection *, bfd_vma *);
etree_type *exp_binop
(int, etree_type *, etree_type *);
etree_type *exp_trinop
@@ -125,18 +166,18 @@ etree_type *exp_nameop
etree_type *exp_assop
(int, const char *, etree_type *);
etree_type *exp_provide
- (const char *, etree_type *);
+ (const char *, etree_type *, bfd_boolean);
etree_type *exp_assert
(etree_type *, const char *);
void exp_print_tree
(etree_type *);
bfd_vma exp_get_vma
- (etree_type *, bfd_vma, char *, lang_phase_type);
+ (etree_type *, bfd_vma, char *);
int exp_get_value_int
- (etree_type *, int, char *, lang_phase_type);
+ (etree_type *, int, char *);
fill_type *exp_get_fill
- (etree_type *, fill_type *, char *, lang_phase_type);
+ (etree_type *, fill_type *, char *);
bfd_vma exp_get_abs_int
- (etree_type *, int, char *, lang_phase_type);
+ (etree_type *, int, char *);
#endif
diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c
index a6f0d603dde4..69d8fd91e44c 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 Free Software Foundation, Inc.
+ 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* ldfile.c: look after all the file stuff. */
@@ -44,20 +44,15 @@ unsigned long ldfile_output_machine;
enum bfd_architecture ldfile_output_architecture;
search_dirs_type * search_head;
-#ifndef MPW
#ifdef VMS
-char * slash = "";
+static char * slash = "";
#else
#if defined (_WIN32) && ! defined (__CYGWIN32__)
-char * slash = "\\";
+static char * slash = "\\";
#else
-char * slash = "/";
+static char * slash = "/";
#endif
#endif
-#else /* MPW */
-/* The MPW path char is a colon. */
-char * slash = ":";
-#endif /* MPW */
typedef struct search_arch
{
@@ -156,9 +151,10 @@ ldfile_try_open_bfd (const char *attempt,
/* If we are searching for this file, see if the architecture is
compatible with the output file. If it isn't, keep searching.
If we can't open the file as an object file, stop the search
- here. */
+ here. If we are statically linking, ensure that we don't link
+ a dynamic object. */
- if (entry->search_dirs_flag)
+ if (entry->search_dirs_flag || !entry->dynamic)
{
bfd *check;
@@ -172,6 +168,7 @@ ldfile_try_open_bfd (const char *attempt,
if (! bfd_check_format (check, bfd_object))
{
if (check == entry->the_bfd
+ && entry->search_dirs_flag
&& bfd_get_error () == bfd_error_file_not_recognized
&& ! ldemul_unrecognized_file (entry))
{
@@ -265,8 +262,18 @@ ldfile_try_open_bfd (const char *attempt,
return TRUE;
}
- if ((bfd_arch_get_compatible (check, output_bfd,
- command_line.accept_unknown_input_arch) == NULL)
+ if (!entry->dynamic && (entry->the_bfd->flags & DYNAMIC) != 0)
+ {
+ einfo (_("%F%P: attempted static link of dynamic object `%s'\n"),
+ attempt);
+ bfd_close (entry->the_bfd);
+ entry->the_bfd = NULL;
+ return FALSE;
+ }
+
+ if (entry->search_dirs_flag
+ && !bfd_arch_get_compatible (check, output_bfd,
+ command_line.accept_unknown_input_arch)
/* XCOFF archives can have 32 and 64 bit objects. */
&& ! (bfd_get_flavour (check) == bfd_target_xcoff_flavour
&& bfd_get_flavour (output_bfd) == bfd_target_xcoff_flavour
@@ -455,7 +462,7 @@ try_open (const char *name, const char *exten)
/* Try to open NAME; if that fails, look for it in any directories
specified with -L, without and with EXTEND appended. */
-FILE *
+static FILE *
ldfile_find_command_file (const char *name, const char *extend)
{
search_dirs_type *search;
@@ -500,61 +507,6 @@ ldfile_open_command_file (const char *name)
saved_script_handle = ldlex_input_stack;
}
-#ifdef GNU960
-static char *
-gnu960_map_archname (char *name)
-{
- struct tabentry { char *cmd_switch; char *arch; };
- static struct tabentry arch_tab[] =
- {
- "", "",
- "KA", "ka",
- "KB", "kb",
- "KC", "mc", /* Synonym for MC */
- "MC", "mc",
- "CA", "ca",
- "SA", "ka", /* Functionally equivalent to KA */
- "SB", "kb", /* Functionally equivalent to KB */
- NULL, ""
- };
- struct tabentry *tp;
-
- for (tp = arch_tab; tp->cmd_switch != NULL; tp++)
- {
- if (! strcmp (name,tp->cmd_switch))
- break;
- }
-
- if (tp->cmd_switch == NULL)
- einfo (_("%P%F: unknown architecture: %s\n"), name);
-
- return tp->arch;
-}
-
-void
-ldfile_add_arch (char *name)
-{
- search_arch_type *new = xmalloc (sizeof (search_arch_type));
-
- if (*name != '\0')
- {
- if (ldfile_output_machine_name[0] != '\0')
- {
- einfo (_("%P%F: target architecture respecified\n"));
- return;
- }
-
- ldfile_output_machine_name = name;
- }
-
- new->next = NULL;
- new->name = gnu960_map_archname (name);
- *search_arch_tail_ptr = new;
- search_arch_tail_ptr = &new->next;
-}
-
-#else /* not GNU960 */
-
void
ldfile_add_arch (const char *in_name)
{
@@ -574,7 +526,6 @@ ldfile_add_arch (const char *in_name)
search_arch_tail_ptr = &new->next;
}
-#endif
/* Set the output architecture. */
diff --git a/contrib/binutils/ld/ldfile.h b/contrib/binutils/ld/ldfile.h
index 6d5f09d11834..b9ace6b74dfd 100644
--- a/contrib/binutils/ld/ldfile.h
+++ b/contrib/binutils/ld/ldfile.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#ifndef LDFILE_H
#define LDFILE_H
@@ -54,8 +54,6 @@ extern void ldfile_open_file
(struct lang_input_statement_struct *);
extern bfd_boolean ldfile_try_open_bfd
(const char *, struct lang_input_statement_struct *);
-extern FILE *ldfile_find_command_file
- (const char *name, const char *extend);
extern void ldfile_set_output_arch
(const char *, enum bfd_architecture);
extern bfd_boolean ldfile_open_file_search
diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y
index 6c46c854473d..3829e6ae00a1 100644
--- a/contrib/binutils/ld/ldgram.y
+++ b/contrib/binutils/ld/ldgram.y
@@ -1,23 +1,23 @@
/* 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 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
-This file is part of GNU ld.
+ This file is part of GNU ld.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
%{
/*
@@ -46,10 +46,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
static enum section_type sectype;
+static lang_memory_region_type *region;
-lang_memory_region_type *region;
-
-bfd_boolean ldgram_want_filename = TRUE;
FILE *saved_script_handle = NULL;
bfd_boolean force_make_executable = FALSE;
@@ -94,7 +92,7 @@ static int error_index;
}
%type <etree> exp opt_exp_with_type mustbe_exp opt_at phdr_type phdr_val
-%type <etree> opt_exp_without_type opt_subalign
+%type <etree> opt_exp_without_type opt_subalign opt_align
%type <fill> fill_opt fill_exp
%type <name_list> exclude_name_list
%type <wildcard_list> file_NAME_list
@@ -128,11 +126,13 @@ static int error_index;
%token END
%left <token> '('
%token <token> ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE
-%token SECTIONS PHDRS SORT DATA_SEGMENT_ALIGN DATA_SEGMENT_END
+%token SECTIONS PHDRS DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END DATA_SEGMENT_END
+%token SORT_BY_NAME SORT_BY_ALIGNMENT
%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 NOLOAD DSECT COPY INFO OVERLAY
@@ -142,15 +142,15 @@ static int error_index;
%token STARTUP HLL SYSLIB FLOAT NOFLOAT NOCROSSREFS
%token ORIGIN FILL
%token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS
-%token ALIGNMOD AT SUBALIGN PROVIDE
-%type <token> assign_op atype attributes_opt
+%token ALIGNMOD AT SUBALIGN PROVIDE PROVIDE_HIDDEN AS_NEEDED
+%type <token> assign_op atype attributes_opt sect_constraint
%type <name> filename
%token CHIP LIST SECT ABSOLUTE LOAD NEWLINE ENDWORD ORDER NAMEWORD ASSERT_K
%token FORMAT PUBLIC DEFSYMEND BASE ALIAS TRUNCATE REL
%token INPUT_SCRIPT INPUT_MRI_SCRIPT INPUT_DEFSYM CASE EXTERN START
%token <name> VERS_TAG VERS_IDENTIFIER
%token GLOBAL LOCAL VERSIONK INPUT_VERSION_SCRIPT
-%token KEEP
+%token KEEP ONLY_IF_RO ONLY_IF_RW SPECIAL
%token EXCLUDE_FILE
%type <versyms> vers_defns
%type <versnode> vers_tag
@@ -370,6 +370,18 @@ input_list:
| input_list LNAME
{ lang_add_input_file($2,lang_input_file_is_l_enum,
(char *)NULL); }
+ | AS_NEEDED '('
+ { $<integer>$ = as_needed; as_needed = TRUE; }
+ input_list ')'
+ { as_needed = $<integer>3; }
+ | input_list ',' AS_NEEDED '('
+ { $<integer>$ = as_needed; as_needed = TRUE; }
+ input_list ')'
+ { as_needed = $<integer>5; }
+ | input_list AS_NEEDED '('
+ { $<integer>$ = as_needed; as_needed = TRUE; }
+ input_list ')'
+ { as_needed = $<integer>4; }
;
sections:
@@ -412,25 +424,55 @@ wildcard_spec:
wildcard_name
{
$$.name = $1;
- $$.sorted = FALSE;
+ $$.sorted = none;
$$.exclude_name_list = NULL;
}
| EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name
{
$$.name = $5;
- $$.sorted = FALSE;
+ $$.sorted = none;
$$.exclude_name_list = $3;
}
- | SORT '(' wildcard_name ')'
+ | SORT_BY_NAME '(' wildcard_name ')'
{
$$.name = $3;
- $$.sorted = TRUE;
+ $$.sorted = by_name;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_ALIGNMENT '(' wildcard_name ')'
+ {
+ $$.name = $3;
+ $$.sorted = by_alignment;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_NAME '(' SORT_BY_ALIGNMENT '(' wildcard_name ')' ')'
+ {
+ $$.name = $5;
+ $$.sorted = by_name_alignment;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_NAME '(' SORT_BY_NAME '(' wildcard_name ')' ')'
+ {
+ $$.name = $5;
+ $$.sorted = by_name;
$$.exclude_name_list = NULL;
}
- | SORT '(' EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name ')'
+ | SORT_BY_ALIGNMENT '(' SORT_BY_NAME '(' wildcard_name ')' ')'
+ {
+ $$.name = $5;
+ $$.sorted = by_alignment_name;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_ALIGNMENT '(' SORT_BY_ALIGNMENT '(' wildcard_name ')' ')'
+ {
+ $$.name = $5;
+ $$.sorted = by_alignment;
+ $$.exclude_name_list = NULL;
+ }
+ | SORT_BY_NAME '(' EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name ')'
{
$$.name = $7;
- $$.sorted = TRUE;
+ $$.sorted = by_name;
$$.exclude_name_list = $5;
}
;
@@ -481,7 +523,7 @@ input_section_spec_no_keep:
struct wildcard_spec tmp;
tmp.name = $1;
tmp.exclude_name_list = NULL;
- tmp.sorted = FALSE;
+ tmp.sorted = none;
lang_add_wild (&tmp, NULL, ldgram_had_keep);
}
| '[' file_NAME_list ']'
@@ -514,7 +556,7 @@ statement:
lang_add_attribute(lang_constructors_statement_enum);
}
- | SORT '(' CONSTRUCTORS ')'
+ | SORT_BY_NAME '(' CONSTRUCTORS ')'
{
constructors_sorted = TRUE;
lang_add_attribute (lang_constructors_statement_enum);
@@ -557,10 +599,7 @@ length:
fill_exp:
mustbe_exp
{
- $$ = exp_get_fill ($1,
- 0,
- "fill value",
- lang_first_phase_enum);
+ $$ = exp_get_fill ($1, 0, "fill value");
}
;
@@ -609,7 +648,11 @@ assignment:
}
| PROVIDE '(' NAME '=' mustbe_exp ')'
{
- lang_add_assignment (exp_provide ($3, $5));
+ lang_add_assignment (exp_provide ($3, $5, FALSE));
+ }
+ | PROVIDE_HIDDEN '(' NAME '=' mustbe_exp ')'
+ {
+ lang_add_assignment (exp_provide ($3, $5, TRUE));
}
;
@@ -638,18 +681,16 @@ memory_spec: NAME
origin_spec:
ORIGIN '=' mustbe_exp
- { region->current =
- region->origin =
- exp_get_vma($3, 0L,"origin", lang_first_phase_enum);
-}
+ {
+ region->origin = exp_get_vma ($3, 0, "origin");
+ region->current = region->origin;
+ }
;
length_spec:
LENGTH '=' mustbe_exp
- { region->length = exp_get_vma($3,
- ~((bfd_vma)0),
- "length",
- lang_first_phase_enum);
+ {
+ region->length = exp_get_vma ($3, -1, "length");
}
;
@@ -730,96 +771,111 @@ nocrossref_list:
}
;
-mustbe_exp: { ldlex_expression(); }
+mustbe_exp: { ldlex_expression (); }
exp
- { ldlex_popstate(); $$=$2;}
+ { ldlex_popstate (); $$=$2;}
;
exp :
'-' exp %prec UNARY
- { $$ = exp_unop('-', $2); }
+ { $$ = exp_unop ('-', $2); }
| '(' exp ')'
{ $$ = $2; }
| NEXT '(' exp ')' %prec UNARY
- { $$ = exp_unop((int) $1,$3); }
+ { $$ = exp_unop ((int) $1,$3); }
| '!' exp %prec UNARY
- { $$ = exp_unop('!', $2); }
+ { $$ = exp_unop ('!', $2); }
| '+' exp %prec UNARY
{ $$ = $2; }
| '~' exp %prec UNARY
- { $$ = exp_unop('~', $2);}
+ { $$ = exp_unop ('~', $2);}
| exp '*' exp
- { $$ = exp_binop('*', $1, $3); }
+ { $$ = exp_binop ('*', $1, $3); }
| exp '/' exp
- { $$ = exp_binop('/', $1, $3); }
+ { $$ = exp_binop ('/', $1, $3); }
| exp '%' exp
- { $$ = exp_binop('%', $1, $3); }
+ { $$ = exp_binop ('%', $1, $3); }
| exp '+' exp
- { $$ = exp_binop('+', $1, $3); }
+ { $$ = exp_binop ('+', $1, $3); }
| exp '-' exp
- { $$ = exp_binop('-' , $1, $3); }
+ { $$ = exp_binop ('-' , $1, $3); }
| exp LSHIFT exp
- { $$ = exp_binop(LSHIFT , $1, $3); }
+ { $$ = exp_binop (LSHIFT , $1, $3); }
| exp RSHIFT exp
- { $$ = exp_binop(RSHIFT , $1, $3); }
+ { $$ = exp_binop (RSHIFT , $1, $3); }
| exp EQ exp
- { $$ = exp_binop(EQ , $1, $3); }
+ { $$ = exp_binop (EQ , $1, $3); }
| exp NE exp
- { $$ = exp_binop(NE , $1, $3); }
+ { $$ = exp_binop (NE , $1, $3); }
| exp LE exp
- { $$ = exp_binop(LE , $1, $3); }
+ { $$ = exp_binop (LE , $1, $3); }
| exp GE exp
- { $$ = exp_binop(GE , $1, $3); }
+ { $$ = exp_binop (GE , $1, $3); }
| exp '<' exp
- { $$ = exp_binop('<' , $1, $3); }
+ { $$ = exp_binop ('<' , $1, $3); }
| exp '>' exp
- { $$ = exp_binop('>' , $1, $3); }
+ { $$ = exp_binop ('>' , $1, $3); }
| exp '&' exp
- { $$ = exp_binop('&' , $1, $3); }
+ { $$ = exp_binop ('&' , $1, $3); }
| exp '^' exp
- { $$ = exp_binop('^' , $1, $3); }
+ { $$ = exp_binop ('^' , $1, $3); }
| exp '|' exp
- { $$ = exp_binop('|' , $1, $3); }
+ { $$ = exp_binop ('|' , $1, $3); }
| exp '?' exp ':' exp
- { $$ = exp_trinop('?' , $1, $3, $5); }
+ { $$ = exp_trinop ('?' , $1, $3, $5); }
| exp ANDAND exp
- { $$ = exp_binop(ANDAND , $1, $3); }
+ { $$ = exp_binop (ANDAND , $1, $3); }
| exp OROR exp
- { $$ = exp_binop(OROR , $1, $3); }
+ { $$ = exp_binop (OROR , $1, $3); }
| DEFINED '(' NAME ')'
- { $$ = exp_nameop(DEFINED, $3); }
+ { $$ = exp_nameop (DEFINED, $3); }
| INT
{ $$ = exp_bigintop ($1.integer, $1.str); }
| SIZEOF_HEADERS
- { $$ = exp_nameop(SIZEOF_HEADERS,0); }
+ { $$ = exp_nameop (SIZEOF_HEADERS,0); }
| SIZEOF '(' NAME ')'
- { $$ = exp_nameop(SIZEOF,$3); }
+ { $$ = exp_nameop (SIZEOF,$3); }
| ADDR '(' NAME ')'
- { $$ = exp_nameop(ADDR,$3); }
+ { $$ = exp_nameop (ADDR,$3); }
| LOADADDR '(' NAME ')'
- { $$ = exp_nameop(LOADADDR,$3); }
+ { $$ = exp_nameop (LOADADDR,$3); }
| ABSOLUTE '(' exp ')'
- { $$ = exp_unop(ABSOLUTE, $3); }
+ { $$ = exp_unop (ABSOLUTE, $3); }
| ALIGN_K '(' exp ')'
- { $$ = exp_unop(ALIGN_K,$3); }
+ { $$ = exp_unop (ALIGN_K,$3); }
| ALIGN_K '(' exp ',' exp ')'
- { $$ = exp_binop(ALIGN_K,$3,$5); }
+ { $$ = exp_binop (ALIGN_K,$3,$5); }
| DATA_SEGMENT_ALIGN '(' exp ',' exp ')'
{ $$ = exp_binop (DATA_SEGMENT_ALIGN, $3, $5); }
+ | DATA_SEGMENT_RELRO_END '(' exp ',' exp ')'
+ { $$ = exp_binop (DATA_SEGMENT_RELRO_END, $5, $3); }
| DATA_SEGMENT_END '(' exp ')'
- { $$ = exp_unop(DATA_SEGMENT_END, $3); }
+ { $$ = exp_unop (DATA_SEGMENT_END, $3); }
+ | SEGMENT_START '(' NAME ',' exp ')'
+ { /* The operands to the expression node are
+ placed in the opposite order from the way
+ in which they appear in the script as
+ that allows us to reuse more code in
+ fold_binary. */
+ $$ = exp_binop (SEGMENT_START,
+ $5,
+ exp_nameop (NAME, $3)); }
| BLOCK '(' exp ')'
- { $$ = exp_unop(ALIGN_K,$3); }
+ { $$ = exp_unop (ALIGN_K,$3); }
| NAME
- { $$ = exp_nameop(NAME,$1); }
+ { $$ = exp_nameop (NAME,$1); }
| MAX_K '(' exp ',' exp ')'
{ $$ = exp_binop (MAX_K, $3, $5 ); }
| MIN_K '(' exp ',' exp ')'
{ $$ = exp_binop (MIN_K, $3, $5 ); }
| ASSERT_K '(' exp ',' NAME ')'
{ $$ = exp_assert ($3, $5); }
+ | ORIGIN '(' NAME ')'
+ { $$ = exp_nameop (ORIGIN, $3); }
+ | LENGTH '(' NAME ')'
+ { $$ = exp_nameop (LENGTH, $3); }
;
@@ -833,27 +889,41 @@ opt_at:
| { $$ = 0; }
;
+opt_align:
+ ALIGN_K '(' exp ')' { $$ = $3; }
+ | { $$ = 0; }
+ ;
+
opt_subalign:
SUBALIGN '(' exp ')' { $$ = $3; }
| { $$ = 0; }
;
+sect_constraint:
+ ONLY_IF_RO { $$ = ONLY_IF_RO; }
+ | ONLY_IF_RW { $$ = ONLY_IF_RW; }
+ | SPECIAL { $$ = SPECIAL; }
+ | { $$ = 0; }
+ ;
+
section: NAME { ldlex_expression(); }
opt_exp_with_type
opt_at
+ opt_align
opt_subalign { ldlex_popstate (); ldlex_script (); }
+ sect_constraint
'{'
{
lang_enter_output_section_statement($1, $3,
sectype,
- 0, $5, $4);
+ $5, $6, $4, $8);
}
statement_list_opt
'}' { ldlex_popstate (); ldlex_expression (); }
memspec_opt memspec_at_opt phdr_opt fill_opt
{
ldlex_popstate ();
- lang_leave_output_section_statement ($15, $12, $14, $13);
+ lang_leave_output_section_statement ($17, $14, $16, $15);
}
opt_comma
{}
@@ -1149,11 +1219,19 @@ vers_tag:
vers_defns:
VERS_IDENTIFIER
{
- $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, FALSE);
+ }
+ | NAME
+ {
+ $$ = lang_new_vers_pattern (NULL, $1, ldgram_vers_current_lang, TRUE);
}
| vers_defns ';' VERS_IDENTIFIER
{
- $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang);
+ $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, FALSE);
+ }
+ | vers_defns ';' NAME
+ {
+ $$ = lang_new_vers_pattern ($1, $3, ldgram_vers_current_lang, TRUE);
}
| vers_defns ';' EXTERN NAME '{'
{
@@ -1162,6 +1240,9 @@ vers_defns:
}
vers_defns opt_semicolon '}'
{
+ struct bfd_elf_version_expr *pat;
+ for (pat = $7; pat->next != NULL; pat = pat->next);
+ pat->next = $1;
$$ = $7;
ldgram_vers_current_lang = $<name>6;
}
@@ -1175,6 +1256,30 @@ vers_defns:
$$ = $5;
ldgram_vers_current_lang = $<name>4;
}
+ | GLOBAL
+ {
+ $$ = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang, FALSE);
+ }
+ | vers_defns ';' GLOBAL
+ {
+ $$ = lang_new_vers_pattern ($1, "global", ldgram_vers_current_lang, FALSE);
+ }
+ | LOCAL
+ {
+ $$ = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang, FALSE);
+ }
+ | vers_defns ';' LOCAL
+ {
+ $$ = lang_new_vers_pattern ($1, "local", ldgram_vers_current_lang, FALSE);
+ }
+ | EXTERN
+ {
+ $$ = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang, FALSE);
+ }
+ | vers_defns ';' EXTERN
+ {
+ $$ = lang_new_vers_pattern ($1, "extern", ldgram_vers_current_lang, FALSE);
+ }
;
opt_semicolon:
diff --git a/contrib/binutils/ld/ldint.texinfo b/contrib/binutils/ld/ldint.texinfo
index 54867648a52d..dc6e9a65ef38 100644
--- a/contrib/binutils/ld/ldint.texinfo
+++ b/contrib/binutils/ld/ldint.texinfo
@@ -699,7 +699,7 @@ require more work on behalf of loader than not doing it.
Version 1.1, March 2000
Copyright (C) 2000 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c
index 0c086014e2a0..b0a28d54a9fe 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
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -47,12 +47,14 @@
/* Locals variables. */
static struct obstack stat_obstack;
+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;
static bfd_boolean map_option_f;
static bfd_vma print_dot;
@@ -65,31 +67,32 @@ static struct bfd_hash_table lang_definedness_table;
/* Forward declarations. */
static void exp_init_os (etree_type *);
-static bfd_boolean wildcardp (const char *);
+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 *);
static void print_statement_list (lang_statement_union_type *,
lang_output_section_statement_type *);
static void print_statements (void);
+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);
-typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
- asection *, lang_input_statement_type *, void *);
-
/* 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 };
struct bfd_sym_chain entry_symbol = { NULL, NULL };
+static const char *entry_symbol_default = "start";
const char *entry_section = ".text";
bfd_boolean entry_from_cmdline;
bfd_boolean lang_has_input_file = FALSE;
@@ -97,12 +100,22 @@ bfd_boolean had_output_filename = FALSE;
bfd_boolean lang_float_flag = FALSE;
bfd_boolean delete_output_file_on_failure = FALSE;
struct lang_nocrossrefs *nocrossref_list;
-struct unique_sections *unique_section_list;
+static struct unique_sections *unique_section_list;
static bfd_boolean ldlang_sysrooted_script = FALSE;
+
+ /* Functions that traverse the linker script and might evaluate
+ DEFINED() need to increment this. */
int lang_statement_iteration = 0;
etree_type *base; /* Relocation base - or null */
+/* Return TRUE if the PATTERN argument is a wildcard pattern.
+ Although backslashes are treated specially if a pattern contains
+ wildcards, we do not consider the mere presence of a backslash to
+ be enough to cause the pattern to be treated as a wildcard.
+ That lets us handle DOS filenames more naturally. */
+#define wildcardp(pattern) (strpbrk ((pattern), "?*[") != NULL)
+
#define new_stat(x, y) \
(x##_type *) new_statement (x##_enum, sizeof (x##_type), y)
@@ -121,10 +134,17 @@ stat_alloc (size_t size)
}
bfd_boolean
-unique_section_p (const char *secnam)
+unique_section_p (const asection *sec)
{
struct unique_sections *unam;
+ const char *secnam;
+ if (link_info.relocatable
+ && sec->owner != NULL
+ && bfd_is_group_section (sec->owner, sec))
+ return TRUE;
+
+ secnam = sec->name;
for (unam = unique_section_list; unam; unam = unam->next)
if (wildcardp (unam->name)
? fnmatch (unam->name, secnam, 0) == 0
@@ -138,21 +158,71 @@ unique_section_p (const char *secnam)
/* Generic traversal routines for finding matching sections. */
+/* Try processing a section against a wildcard. This just calls
+ the callback unless the filename exclusion list is present
+ and excludes the file. It's hardly ever present so this
+ function is very fast. */
+
static void
-walk_wild_section (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
+walk_wild_consider_section (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ asection *s,
+ struct wildcard_list *sec,
+ callback_t callback,
+ void *data)
+{
+ bfd_boolean skip = FALSE;
+ struct name_list *list_tmp;
+
+ /* Don't process sections from files which were
+ excluded. */
+ for (list_tmp = sec->spec.exclude_name_list;
+ list_tmp;
+ list_tmp = list_tmp->next)
+ {
+ bfd_boolean is_wildcard = wildcardp (list_tmp->name);
+ if (is_wildcard)
+ skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
+ else
+ skip = strcmp (list_tmp->name, file->filename) == 0;
+
+ /* If this file is part of an archive, and the archive is
+ excluded, exclude this file. */
+ if (! skip && file->the_bfd != NULL
+ && file->the_bfd->my_archive != NULL
+ && file->the_bfd->my_archive->filename != NULL)
+ {
+ if (is_wildcard)
+ skip = fnmatch (list_tmp->name,
+ file->the_bfd->my_archive->filename,
+ 0) == 0;
+ else
+ skip = strcmp (list_tmp->name,
+ file->the_bfd->my_archive->filename) == 0;
+ }
+
+ if (skip)
+ break;
+ }
+
+ if (!skip)
+ (*callback) (ptr, sec, s, file, data);
+}
+
+/* Lowest common denominator routine that can handle everything correctly,
+ but slowly. */
+
+static void
+walk_wild_section_general (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
{
asection *s;
-
- if (file->just_syms_flag)
- return;
+ struct wildcard_list *sec;
for (s = file->the_bfd->sections; s != NULL; s = s->next)
{
- struct wildcard_list *sec;
-
sec = ptr->section_list;
if (sec == NULL)
(*callback) (ptr, sec, s, file, data);
@@ -160,39 +230,8 @@ walk_wild_section (lang_wild_statement_type *ptr,
while (sec != NULL)
{
bfd_boolean skip = FALSE;
- struct name_list *list_tmp;
-
- /* Don't process sections from files which were
- excluded. */
- for (list_tmp = sec->spec.exclude_name_list;
- list_tmp;
- list_tmp = list_tmp->next)
- {
- if (wildcardp (list_tmp->name))
- skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
- else
- skip = strcmp (list_tmp->name, file->filename) == 0;
-
- /* If this file is part of an archive, and the archive is
- excluded, exclude this file. */
- if (! skip && file->the_bfd != NULL
- && file->the_bfd->my_archive != NULL
- && file->the_bfd->my_archive->filename != NULL)
- {
- if (wildcardp (list_tmp->name))
- skip = fnmatch (list_tmp->name,
- file->the_bfd->my_archive->filename,
- 0) == 0;
- else
- skip = strcmp (list_tmp->name,
- file->the_bfd->my_archive->filename) == 0;
- }
-
- if (skip)
- break;
- }
- if (!skip && sec->spec.name != NULL)
+ if (sec->spec.name != NULL)
{
const char *sname = bfd_get_section_name (file->the_bfd, s);
@@ -203,13 +242,381 @@ walk_wild_section (lang_wild_statement_type *ptr,
}
if (!skip)
- (*callback) (ptr, sec, s, file, data);
+ walk_wild_consider_section (ptr, file, s, sec, callback, data);
sec = sec->next;
}
}
}
+/* Routines to find a single section given its name. If there's more
+ than one section with that name, we report that. */
+
+typedef struct
+{
+ asection *found_section;
+ bfd_boolean multiple_sections_found;
+} section_iterator_callback_data;
+
+static bfd_boolean
+section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
+{
+ section_iterator_callback_data *d = data;
+
+ if (d->found_section != NULL)
+ {
+ d->multiple_sections_found = TRUE;
+ return TRUE;
+ }
+
+ d->found_section = s;
+ return FALSE;
+}
+
+static asection *
+find_section (lang_input_statement_type *file,
+ struct wildcard_list *sec,
+ bfd_boolean *multiple_sections_found)
+{
+ section_iterator_callback_data cb_data = { NULL, FALSE };
+
+ 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;
+}
+
+/* Code for handling simple wildcards without going through fnmatch,
+ which can be expensive because of charset translations etc. */
+
+/* A simple wild is a literal string followed by a single '*',
+ where the literal part is at least 4 characters long. */
+
+static bfd_boolean
+is_simple_wild (const char *name)
+{
+ size_t len = strcspn (name, "*?[");
+ return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
+}
+
+static bfd_boolean
+match_simple_wild (const char *pattern, const char *name)
+{
+ /* The first four characters of the pattern are guaranteed valid
+ non-wildcard characters. So we can go faster. */
+ if (pattern[0] != name[0] || pattern[1] != name[1]
+ || pattern[2] != name[2] || pattern[3] != name[3])
+ return FALSE;
+
+ pattern += 4;
+ name += 4;
+ while (*pattern != '*')
+ if (*name++ != *pattern++)
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Specialized, optimized routines for handling different kinds of
+ wildcards */
+
+static void
+walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ /* We can just do a hash lookup for the section with the right name.
+ But if that lookup discovers more than one section with the name
+ (should be rare), we fall back to the general algorithm because
+ we would otherwise have to sort the sections to make sure they
+ get processed in the bfd's order. */
+ bfd_boolean multiple_sections_found;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
+
+ if (multiple_sections_found)
+ walk_wild_section_general (ptr, file, callback, data);
+ else if (s0)
+ walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
+}
+
+static void
+walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *wildsec0 = ptr->handler_data[0];
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
+ }
+}
+
+static void
+walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
+ bfd_boolean multiple_sections_found;
+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
+
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ /* Note that if the section was not found, s0 is NULL and
+ we'll simply never succeed the s == s0 test below. */
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ /* Recall that in this code path, a section cannot satisfy more
+ than one spec, so if s == s0 then it cannot match
+ wildspec1. */
+ if (s == s0)
+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
+ else
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec1, callback,
+ data);
+ }
+ }
+}
+
+static void
+walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
+ bfd_boolean multiple_sections_found;
+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
+
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ if (s == s0)
+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
+ else
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
+ else
+ {
+ skip = !match_simple_wild (wildsec2->spec.name, sname);
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
+ data);
+ }
+ }
+ }
+}
+
+static void
+walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ struct wildcard_list *sec1 = ptr->handler_data[1];
+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
+ struct wildcard_list *wildsec3 = ptr->handler_data[3];
+ bfd_boolean multiple_sections_found;
+ asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
+
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ s1 = find_section (file, sec1, &multiple_sections_found);
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ if (s == s0)
+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
+ else
+ if (s == s1)
+ walk_wild_consider_section (ptr, file, s, sec1, callback, data);
+ else
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
+ sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
+ data);
+ else
+ {
+ skip = !match_simple_wild (wildsec3->spec.name, sname);
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec3,
+ callback, data);
+ }
+ }
+ }
+}
+
+static void
+walk_wild_section (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ if (file->just_syms_flag)
+ return;
+
+ (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
+}
+
+/* Returns TRUE when name1 is a wildcard spec that might match
+ something name2 can match. We're conservative: we return FALSE
+ only if the prefixes of name1 and name2 are different up to the
+ first wildcard character. */
+
+static bfd_boolean
+wild_spec_can_overlap (const char *name1, const char *name2)
+{
+ size_t prefix1_len = strcspn (name1, "?*[");
+ size_t prefix2_len = strcspn (name2, "?*[");
+ size_t min_prefix_len;
+
+ /* Note that if there is no wildcard character, then we treat the
+ terminating 0 as part of the prefix. Thus ".text" won't match
+ ".text." or ".text.*", for example. */
+ if (name1[prefix1_len] == '\0')
+ prefix1_len++;
+ if (name2[prefix2_len] == '\0')
+ prefix2_len++;
+
+ min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
+
+ return memcmp (name1, name2, min_prefix_len) == 0;
+}
+
+/* Select specialized code to handle various kinds of wildcard
+ statements. */
+
+static void
+analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
+{
+ int sec_count = 0;
+ int wild_name_count = 0;
+ struct wildcard_list *sec;
+ int signature;
+ int data_counter;
+
+ ptr->walk_wild_section_handler = walk_wild_section_general;
+
+ /* 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
+ wildcard names are NULL. (Can this actually happen?
+ walk_wild_section used to test for it.) And bail out if any
+ of the wildcards are more complex than a simple string
+ ending in a single '*'. */
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ {
+ ++sec_count;
+ if (sec->spec.name == NULL)
+ return;
+ if (wildcardp (sec->spec.name))
+ {
+ ++wild_name_count;
+ if (!is_simple_wild (sec->spec.name))
+ return;
+ }
+ }
+
+ /* The zero-spec case would be easy to optimize but it doesn't
+ happen in practice. Likewise, more than 4 specs doesn't
+ happen in practice. */
+ if (sec_count == 0 || sec_count > 4)
+ return;
+
+ /* Check that no two specs can match the same section. */
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ {
+ struct wildcard_list *sec2;
+ for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
+ {
+ if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
+ return;
+ }
+ }
+
+ signature = (sec_count << 8) + wild_name_count;
+ switch (signature)
+ {
+ case 0x0100:
+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
+ break;
+ case 0x0101:
+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
+ break;
+ case 0x0201:
+ ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
+ break;
+ case 0x0302:
+ ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
+ break;
+ case 0x0402:
+ ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
+ break;
+ default:
+ return;
+ }
+
+ /* Now fill the data array with pointers to the specs, first the
+ specs with non-wildcard names, then the specs with wildcard
+ names. It's OK to process the specs in different order from the
+ given order, because we've already determined that no section
+ will match more than one spec. */
+ data_counter = 0;
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ if (!wildcardp (sec->spec.name))
+ ptr->handler_data[data_counter++] = sec;
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ if (wildcardp (sec->spec.name))
+ ptr->handler_data[data_counter++] = sec;
+}
+
/* Handle a wild statement for a single file F. */
static void
@@ -295,13 +702,11 @@ lang_for_each_statement_worker (void (*func) (lang_statement_union_type *),
break;
case lang_output_section_statement_enum:
lang_for_each_statement_worker
- (func,
- s->output_section_statement.children.head);
+ (func, s->output_section_statement.children.head);
break;
case lang_wild_statement_enum:
- lang_for_each_statement_worker
- (func,
- s->wild_statement.children.head);
+ lang_for_each_statement_worker (func,
+ s->wild_statement.children.head);
break;
case lang_group_statement_enum:
lang_for_each_statement_worker (func,
@@ -379,6 +784,7 @@ new_afile (const char *name,
else
{
p = stat_alloc (sizeof (lang_input_statement_type));
+ p->header.type = lang_input_statement_enum;
p->header.next = NULL;
}
@@ -445,6 +851,7 @@ new_afile (const char *name,
p->next = NULL;
p->symbol_count = 0;
p->dynamic = config.dynamic_link;
+ p->add_needed = add_needed;
p->as_needed = as_needed;
p->whole_archive = whole_archive;
p->loaded = FALSE;
@@ -463,6 +870,82 @@ lang_add_input_file (const char *name,
return new_afile (name, file_type, target, TRUE);
}
+struct out_section_hash_entry
+{
+ struct bfd_hash_entry root;
+ lang_statement_union_type s;
+};
+
+/* The hash table. */
+
+static struct bfd_hash_table output_section_statement_table;
+
+/* Support routines for the hash table used by lang_output_section_find,
+ 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,
+ struct bfd_hash_table *table,
+ const char *string)
+{
+ lang_output_section_statement_type **nextp;
+ struct out_section_hash_entry *ret;
+
+ if (entry == NULL)
+ {
+ entry = bfd_hash_allocate (table, sizeof (*ret));
+ if (entry == NULL)
+ return entry;
+ }
+
+ entry = bfd_hash_newfunc (entry, table, string);
+ if (entry == NULL)
+ return entry;
+
+ ret = (struct out_section_hash_entry *) entry;
+ memset (&ret->s, 0, sizeof (ret->s));
+ ret->s.header.type = lang_output_section_statement_enum;
+ ret->s.output_section_statement.subsection_alignment = -1;
+ ret->s.output_section_statement.section_alignment = -1;
+ ret->s.output_section_statement.block_value = 1;
+ lang_list_init (&ret->s.output_section_statement.children);
+ lang_statement_append (stat_ptr, &ret->s, &ret->s.header.next);
+
+ /* For every output section statement added to the list, except the
+ first one, lang_output_section_statement.tail points to the "next"
+ field of the last element of the list. */
+ if (lang_output_section_statement.head != NULL)
+ ret->s.output_section_statement.prev
+ = ((lang_output_section_statement_type *)
+ ((char *) lang_output_section_statement.tail
+ - offsetof (lang_output_section_statement_type, next)));
+
+ /* GCC's strict aliasing rules prevent us from just casting the
+ address, so we store the pointer in a variable and cast that
+ instead. */
+ nextp = &ret->s.output_section_statement.next;
+ lang_statement_append (&lang_output_section_statement,
+ &ret->s,
+ (lang_statement_union_type **) nextp);
+ return &ret->root;
+}
+
+static void
+output_section_statement_table_init (void)
+{
+ if (!bfd_hash_table_init_n (&output_section_statement_table,
+ output_section_statement_newfunc,
+ sizeof (struct out_section_hash_entry),
+ 61))
+ einfo (_("%P%F: can not create hash table: %E\n"));
+}
+
+static void
+output_section_statement_table_free (void)
+{
+ bfd_hash_table_free (&output_section_statement_table);
+}
+
/* Build enough state so that the parser can build its tree. */
void
@@ -472,6 +955,8 @@ lang_init (void)
stat_ptr = &statement_list;
+ output_section_statement_table_init ();
+
lang_list_init (stat_ptr);
lang_list_init (&input_file_chain);
@@ -490,12 +975,17 @@ lang_init (void)
simpler to re-use working machinery than using a linked list in terms
of code-complexity here in ld, besides the initialization which just
looks like other code here. */
- if (bfd_hash_table_init_n (&lang_definedness_table,
- lang_definedness_newfunc, 3) != TRUE)
- einfo (_("%P%F: out of memory during initialization"));
+ if (!bfd_hash_table_init_n (&lang_definedness_table,
+ lang_definedness_newfunc,
+ sizeof (struct lang_definedness_hash_entry),
+ 3))
+ einfo (_("%P%F: can not create hash table: %E\n"));
+}
- /* Callers of exp_fold_tree need to increment this. */
- lang_statement_iteration = 0;
+void
+lang_finish (void)
+{
+ output_section_statement_table_free ();
}
/*----------------------------------------------------------------------
@@ -515,7 +1005,8 @@ lang_init (void)
and so we issue a warning. */
static lang_memory_region_type *lang_memory_region_list;
-static lang_memory_region_type **lang_memory_region_list_tail = &lang_memory_region_list;
+static lang_memory_region_type **lang_memory_region_list_tail
+ = &lang_memory_region_list;
lang_memory_region_type *
lang_memory_region_lookup (const char *const name, bfd_boolean create)
@@ -531,24 +1022,11 @@ lang_memory_region_lookup (const char *const name, bfd_boolean create)
if (strcmp (p->name, name) == 0)
{
if (create)
- einfo (_("%P:%S: warning: redeclaration of memory region '%s'\n"), name);
+ einfo (_("%P:%S: warning: redeclaration of memory region '%s'\n"),
+ name);
return p;
}
-#if 0
- /* This code used to always use the first region in the list as the
- default region. I changed it to instead use a region
- encompassing all of memory as the default region. This permits
- NOLOAD sections to work reasonably without requiring a region.
- People should specify what region they mean, if they really want
- a region. */
- if (strcmp (name, DEFAULT_MEMORY_REGION) == 0)
- {
- if (lang_memory_region_list != NULL)
- return lang_memory_region_list;
- }
-#endif
-
if (!create && strcmp (name, DEFAULT_MEMORY_REGION))
einfo (_("%P:%S: warning: memory region %s not declared\n"), name);
@@ -594,53 +1072,510 @@ lang_memory_default (asection *section)
lang_output_section_statement_type *
lang_output_section_find (const char *const name)
{
- lang_statement_union_type *u;
- lang_output_section_statement_type *lookup;
+ struct out_section_hash_entry *entry;
+ unsigned long hash;
+
+ entry = ((struct out_section_hash_entry *)
+ bfd_hash_lookup (&output_section_statement_table, name,
+ FALSE, FALSE));
+ if (entry == NULL)
+ return NULL;
- for (u = lang_output_section_statement.head; u != NULL; u = lookup->next)
+ hash = entry->root.hash;
+ do
{
- lookup = &u->output_section_statement;
- if (strcmp (name, lookup->name) == 0)
- return lookup;
+ if (entry->s.output_section_statement.constraint != -1)
+ return &entry->s.output_section_statement;
+ entry = (struct out_section_hash_entry *) entry->root.next;
}
+ while (entry != NULL
+ && entry->root.hash == hash
+ && strcmp (name, entry->s.output_section_statement.name) == 0);
+
return NULL;
}
+static lang_output_section_statement_type *
+lang_output_section_statement_lookup_1 (const char *const name, int constraint)
+{
+ struct out_section_hash_entry *entry;
+ struct out_section_hash_entry *last_ent;
+ unsigned long hash;
+
+ entry = ((struct out_section_hash_entry *)
+ bfd_hash_lookup (&output_section_statement_table, name,
+ TRUE, FALSE));
+ if (entry == NULL)
+ {
+ einfo (_("%P%F: failed creating section `%s': %E\n"), name);
+ return NULL;
+ }
+
+ if (entry->s.output_section_statement.name != NULL)
+ {
+ /* We have a section of this name, but it might not have the correct
+ constraint. */
+ hash = entry->root.hash;
+ do
+ {
+ if (entry->s.output_section_statement.constraint != -1
+ && (constraint == 0
+ || (constraint == entry->s.output_section_statement.constraint
+ && constraint != SPECIAL)))
+ return &entry->s.output_section_statement;
+ last_ent = entry;
+ entry = (struct out_section_hash_entry *) entry->root.next;
+ }
+ while (entry != NULL
+ && entry->root.hash == hash
+ && strcmp (name, entry->s.output_section_statement.name) == 0);
+
+ entry
+ = ((struct out_section_hash_entry *)
+ output_section_statement_newfunc (NULL,
+ &output_section_statement_table,
+ name));
+ if (entry == NULL)
+ {
+ einfo (_("%P%F: failed creating section `%s': %E\n"), name);
+ return NULL;
+ }
+ entry->root = last_ent->root;
+ last_ent->root.next = &entry->root;
+ }
+
+ entry->s.output_section_statement.name = name;
+ entry->s.output_section_statement.constraint = constraint;
+ return &entry->s.output_section_statement;
+}
+
lang_output_section_statement_type *
lang_output_section_statement_lookup (const char *const name)
{
+ return lang_output_section_statement_lookup_1 (name, 0);
+}
+
+/* A variant of lang_output_section_find used by place_orphan.
+ Returns the output statement that should precede a new output
+ statement for SEC. If an exact match is found on certain flags,
+ sets *EXACT too. */
+
+lang_output_section_statement_type *
+lang_output_section_find_by_flags (const asection *sec,
+ lang_output_section_statement_type **exact,
+ lang_match_sec_type_func match_type)
+{
+ lang_output_section_statement_type *first, *look, *found;
+ flagword flags;
+
+ /* We know the first statement on this list is *ABS*. May as well
+ skip it. */
+ first = &lang_output_section_statement.head->output_section_statement;
+ first = first->next;
+
+ /* First try for an exact match. */
+ found = NULL;
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY
+ | SEC_CODE | SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
+ found = look;
+ }
+ if (found != NULL)
+ {
+ if (exact != NULL)
+ *exact = found;
+ return found;
+ }
+
+ if (sec->flags & SEC_CODE)
+ {
+ /* Try for a rw code section. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
+ | SEC_CODE | SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
+ found = look;
+ }
+ }
+ else if (sec->flags & (SEC_READONLY | SEC_THREAD_LOCAL))
+ {
+ /* .rodata can go after .text, .sdata2 after .rodata. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
+ | SEC_READONLY))
+ && !(look->flags & (SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
+ found = look;
+ }
+ }
+ else if (sec->flags & SEC_SMALL_DATA)
+ {
+ /* .sdata goes after .data, .sbss after .sdata. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
+ | SEC_THREAD_LOCAL))
+ || ((look->flags & SEC_SMALL_DATA)
+ && !(sec->flags & SEC_HAS_CONTENTS)))
+ found = look;
+ }
+ }
+ else if (sec->flags & SEC_HAS_CONTENTS)
+ {
+ /* .data goes after .rodata. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD
+ | SEC_SMALL_DATA | SEC_THREAD_LOCAL)))
+ found = look;
+ }
+ }
+ else
+ {
+ /* .bss goes last. */
+ for (look = first; look; look = look->next)
+ {
+ flags = look->flags;
+ if (look->bfd_section != NULL)
+ {
+ flags = look->bfd_section->flags;
+ if (match_type && !match_type (output_bfd, look->bfd_section,
+ sec->owner, sec))
+ continue;
+ }
+ flags ^= sec->flags;
+ if (!(flags & SEC_ALLOC))
+ found = look;
+ }
+ }
+
+ if (found || !match_type)
+ return found;
+
+ return lang_output_section_find_by_flags (sec, NULL, NULL);
+}
+
+/* Find the last output section before given output statement.
+ Used by place_orphan. */
+
+static asection *
+output_prev_sec_find (lang_output_section_statement_type *os)
+{
lang_output_section_statement_type *lookup;
- lookup = lang_output_section_find (name);
- if (lookup == NULL)
+ for (lookup = os->prev; lookup != NULL; lookup = lookup->prev)
{
- lookup = new_stat (lang_output_section_statement, stat_ptr);
- lookup->region = NULL;
- lookup->lma_region = NULL;
- lookup->fill = 0;
- lookup->block_value = 1;
- lookup->name = name;
+ if (lookup->constraint == -1)
+ continue;
- lookup->next = NULL;
- lookup->bfd_section = NULL;
- lookup->processed = 0;
- lookup->sectype = normal_section;
- lookup->addr_tree = NULL;
- lang_list_init (&lookup->children);
+ if (lookup->bfd_section != NULL && lookup->bfd_section->owner != NULL)
+ return lookup->bfd_section;
+ }
- lookup->memspec = NULL;
- lookup->flags = 0;
- lookup->subsection_alignment = -1;
- lookup->section_alignment = -1;
- lookup->load_base = NULL;
- lookup->update_dot_tree = NULL;
- lookup->phdrs = NULL;
+ return NULL;
+}
- lang_statement_append (&lang_output_section_statement,
- (lang_statement_union_type *) lookup,
- &lookup->next);
+lang_output_section_statement_type *
+lang_insert_orphan (asection *s,
+ const char *secname,
+ lang_output_section_statement_type *after,
+ struct orphan_save *place,
+ etree_type *address,
+ lang_statement_list_type *add_child)
+{
+ 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;
+
+ /* Start building a list of statements for this section.
+ First save the current statement pointer. */
+ old = stat_ptr;
+
+ /* If we have found an appropriate place for the output section
+ statements for this orphan, add them to our own private list,
+ inserting them later into the global statement list. */
+ if (after != NULL)
+ {
+ stat_ptr = &add;
+ lang_list_init (stat_ptr);
}
- return lookup;
+
+ ps = NULL;
+ if (config.build_constructors)
+ {
+ /* If the name of the section is representable in C, then create
+ symbols to mark the start and the end of the section. */
+ for (ps = secname; *ps != '\0'; ps++)
+ if (! ISALNUM ((unsigned char) *ps) && *ps != '_')
+ break;
+ if (*ps == '\0')
+ {
+ char *symname;
+ etree_type *e_align;
+
+ symname = (char *) xmalloc (ps - secname + sizeof "__start_" + 1);
+ symname[0] = bfd_get_symbol_leading_char (output_bfd);
+ sprintf (symname + (symname[0] != 0), "__start_%s", secname);
+ 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, ".")));
+ }
+ }
+
+ 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);
+
+ if (add_child == NULL)
+ add_child = &os->children;
+ lang_add_section (add_child, s, os);
+
+ lang_leave_output_section_statement (0, "*default*", NULL, NULL);
+
+ if (config.build_constructors && *ps == '\0')
+ {
+ char *symname;
+
+ /* lang_leave_ouput_section_statement resets stat_ptr.
+ Put stat_ptr back where we want it. */
+ if (after != NULL)
+ stat_ptr = &add;
+
+ 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, ".")));
+ }
+
+ /* Restore the global list pointer. */
+ if (after != NULL)
+ stat_ptr = old;
+
+ if (after != NULL && os->bfd_section != NULL)
+ {
+ asection *snew, *as;
+
+ snew = os->bfd_section;
+
+ /* Shuffle the bfd section list to make the output file look
+ neater. This is really only cosmetic. */
+ if (place->section == NULL
+ && after != (&lang_output_section_statement.head
+ ->output_section_statement))
+ {
+ asection *bfd_section = after->bfd_section;
+
+ /* If the output statement hasn't been used to place any input
+ sections (and thus doesn't have an output bfd_section),
+ look for the closest prior output statement having an
+ output section. */
+ if (bfd_section == NULL)
+ bfd_section = output_prev_sec_find (after);
+
+ if (bfd_section != NULL && bfd_section != snew)
+ place->section = &bfd_section->next;
+ }
+
+ if (place->section == NULL)
+ place->section = &output_bfd->sections;
+
+ as = *place->section;
+ if (as != snew && as->prev != snew)
+ {
+ /* Unlink the section. */
+ bfd_section_list_remove (output_bfd, snew);
+
+ /* Now tack it back on in the right place. */
+ bfd_section_list_insert_before (output_bfd, as, snew);
+ }
+
+ /* Save the end of this list. Further ophans of this type will
+ follow the one we've just added. */
+ place->section = &snew->next;
+
+ /* The following is non-cosmetic. We try to put the output
+ statements in some sort of reasonable order here, because they
+ determine the final load addresses of the orphan sections.
+ In addition, placing output statements in the wrong order may
+ require extra segments. For instance, given a typical
+ situation of all read-only sections placed in one segment and
+ following that a segment containing all the read-write
+ sections, we wouldn't want to place an orphan read/write
+ section before or amongst the read-only ones. */
+ if (add.head != NULL)
+ {
+ lang_output_section_statement_type *newly_added_os;
+
+ if (place->stmt == NULL)
+ {
+ lang_statement_union_type **where;
+ lang_statement_union_type **assign = NULL;
+ bfd_boolean ignore_first;
+
+ /* Look for a suitable place for the new statement list.
+ The idea is to skip over anything that might be inside
+ a SECTIONS {} statement in a script, before we find
+ another output_section_statement. Assignments to "dot"
+ before an output section statement are assumed to
+ belong to it. An exception to this rule is made for
+ the first assignment to dot, otherwise we might put an
+ orphan before . = . + SIZEOF_HEADERS or similar
+ assignments that set the initial address. */
+
+ ignore_first = after == (&lang_output_section_statement.head
+ ->output_section_statement);
+ for (where = &after->header.next;
+ *where != NULL;
+ where = &(*where)->header.next)
+ {
+ switch ((*where)->header.type)
+ {
+ case lang_assignment_statement_enum:
+ if (assign == NULL)
+ {
+ lang_assignment_statement_type *ass;
+ ass = &(*where)->assignment_statement;
+ if (ass->exp->type.node_class != etree_assert
+ && ass->exp->assign.dst[0] == '.'
+ && ass->exp->assign.dst[1] == 0
+ && !ignore_first)
+ assign = where;
+ }
+ ignore_first = FALSE;
+ continue;
+ case lang_wild_statement_enum:
+ case lang_input_section_enum:
+ case lang_object_symbols_statement_enum:
+ case lang_fill_statement_enum:
+ case lang_data_statement_enum:
+ case lang_reloc_statement_enum:
+ case lang_padding_statement_enum:
+ case lang_constructors_statement_enum:
+ assign = NULL;
+ continue;
+ case lang_output_section_statement_enum:
+ if (assign != NULL)
+ where = assign;
+ case lang_input_statement_enum:
+ case lang_address_statement_enum:
+ case lang_target_statement_enum:
+ case lang_output_statement_enum:
+ case lang_group_statement_enum:
+ case lang_afile_asection_pair_statement_enum:
+ break;
+ }
+ break;
+ }
+
+ *add.tail = *where;
+ *where = add.head;
+
+ place->os_tail = &after->next;
+ }
+ else
+ {
+ /* Put it after the last orphan statement we added. */
+ *add.tail = *place->stmt;
+ *place->stmt = add.head;
+ }
+
+ /* Fix the global list pointer if we happened to tack our
+ new list at the tail. */
+ if (*old->tail == add.head)
+ old->tail = add.tail;
+
+ /* Save the end of this list. */
+ place->stmt = add.tail;
+
+ /* Do the same for the list of output section statements. */
+ newly_added_os = *os_tail;
+ *os_tail = NULL;
+ newly_added_os->prev = (lang_output_section_statement_type *)
+ ((char *) place->os_tail
+ - offsetof (lang_output_section_statement_type, next));
+ newly_added_os->next = *place->os_tail;
+ if (newly_added_os->next != NULL)
+ newly_added_os->next->prev = newly_added_os;
+ *place->os_tail = newly_added_os;
+ place->os_tail = &newly_added_os->next;
+
+ /* Fixing the global list pointer here is a little different.
+ We added to the list in lang_enter_output_section_statement,
+ trimmed off the new output_section_statment above when
+ assigning *os_tail = NULL, but possibly added it back in
+ the same place when assigning *place->os_tail. */
+ if (*os_tail == NULL)
+ lang_output_section_statement.tail
+ = (lang_statement_union_type **) os_tail;
+ }
+ }
+ return os;
}
static void
@@ -666,6 +1601,30 @@ void
lang_map (void)
{
lang_memory_region_type *m;
+ bfd_boolean dis_header_printed = FALSE;
+ bfd *p;
+
+ LANG_FOR_EACH_INPUT_STATEMENT (file)
+ {
+ asection *s;
+
+ if ((file->the_bfd->flags & (BFD_LINKER_CREATED | DYNAMIC)) != 0
+ || file->just_syms_flag)
+ continue;
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ if (s->output_section == NULL
+ || s->output_section->owner != output_bfd)
+ {
+ if (! dis_header_printed)
+ {
+ fprintf (config.map_file, _("\nDiscarded input sections\n\n"));
+ dis_header_printed = TRUE;
+ }
+
+ print_input_section (s);
+ }
+ }
minfo (_("\nMemory Configuration\n\n"));
fprintf (config.map_file, "%-16s %-18s %-18s %s\n",
@@ -711,24 +1670,72 @@ lang_map (void)
fprintf (config.map_file, _("\nLinker script and memory map\n\n"));
+ if (! command_line.reduce_memory_overheads)
+ {
+ obstack_begin (&map_obstack, 1000);
+ for (p = link_info.input_bfds; p != (bfd *) NULL; p = p->link_next)
+ bfd_map_over_sections (p, init_map_userdata, 0);
+ bfd_link_hash_traverse (link_info.hash, sort_def_symbol, 0);
+ }
print_statements ();
}
+static void
+init_map_userdata (abfd, sec, data)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ void *data ATTRIBUTE_UNUSED;
+{
+ fat_section_userdata_type *new_data
+ = ((fat_section_userdata_type *) (stat_alloc
+ (sizeof (fat_section_userdata_type))));
+
+ ASSERT (get_userdata (sec) == NULL);
+ get_userdata (sec) = new_data;
+ new_data->map_symbol_def_tail = &new_data->map_symbol_def_head;
+}
+
+static bfd_boolean
+sort_def_symbol (hash_entry, info)
+ struct bfd_link_hash_entry *hash_entry;
+ void *info ATTRIBUTE_UNUSED;
+{
+ if (hash_entry->type == bfd_link_hash_defined
+ || hash_entry->type == bfd_link_hash_defweak)
+ {
+ struct fat_user_section_struct *ud;
+ struct map_symbol_def *def;
+
+ ud = get_userdata (hash_entry->u.def.section);
+ if (! ud)
+ {
+ /* ??? What do we have to do to initialize this beforehand? */
+ /* The first time we get here is bfd_abs_section... */
+ init_map_userdata (0, hash_entry->u.def.section, 0);
+ ud = get_userdata (hash_entry->u.def.section);
+ }
+ else if (!ud->map_symbol_def_tail)
+ ud->map_symbol_def_tail = &ud->map_symbol_def_head;
+
+ def = obstack_alloc (&map_obstack, sizeof *def);
+ def->entry = hash_entry;
+ *(ud->map_symbol_def_tail) = def;
+ ud->map_symbol_def_tail = &def->next;
+ }
+ return TRUE;
+}
+
/* Initialize an output section. */
static void
-init_os (lang_output_section_statement_type *s)
+init_os (lang_output_section_statement_type *s, asection *isec)
{
- section_userdata_type *new;
-
if (s->bfd_section != NULL)
return;
if (strcmp (s->name, DISCARD_SECTION_NAME) == 0)
einfo (_("%P%F: Illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
- new = stat_alloc (sizeof (section_userdata_type));
-
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);
@@ -738,11 +1745,15 @@ init_os (lang_output_section_statement_type *s)
output_bfd->xvec->name, s->name);
}
s->bfd_section->output_section = s->bfd_section;
-
- /* We initialize an output sections output offset to minus its own
- vma to allow us to output a section through itself. */
s->bfd_section->output_offset = 0;
- get_userdata (s->bfd_section) = new;
+ if (!command_line.reduce_memory_overheads)
+ {
+ fat_section_userdata_type *new
+ = stat_alloc (sizeof (fat_section_userdata_type));
+ memset (new, 0, sizeof (fat_section_userdata_type));
+ get_userdata (s->bfd_section) = new;
+ }
+
/* If there is a base address, make sure that any sections it might
mention are initialized. */
@@ -751,6 +1762,15 @@ init_os (lang_output_section_statement_type *s)
if (s->load_base != NULL)
exp_init_os (s->load_base);
+
+ /* If supplied an alignment, set it. */
+ if (s->section_alignment != -1)
+ s->bfd_section->alignment_power = s->section_alignment;
+
+ if (isec)
+ bfd_init_private_section_data (isec->owner, isec,
+ output_bfd, s->bfd_section,
+ &link_info);
}
/* Make sure that all output sections mentioned in an expression are
@@ -762,6 +1782,7 @@ exp_init_os (etree_type *exp)
switch (exp->type.node_class)
{
case etree_assign:
+ case etree_provide:
exp_init_os (exp->assign.src);
break;
@@ -779,7 +1800,7 @@ exp_init_os (etree_type *exp)
case etree_assert:
exp_init_os (exp->assert_s.child);
break;
-
+
case etree_unary:
exp_init_os (exp->unary.child);
break;
@@ -795,7 +1816,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);
+ init_os (os, NULL);
}
}
break;
@@ -805,175 +1826,21 @@ exp_init_os (etree_type *exp)
}
}
-/* Sections marked with the SEC_LINK_ONCE flag should only be linked
- once into the output. This routine checks each section, and
- arrange to discard it if a section of the same name has already
- been linked. If the section has COMDAT information, then it uses
- that to decide whether the section should be included. This code
- assumes that all relevant sections have the SEC_LINK_ONCE flag set;
- that is, it does not depend solely upon the section name.
- section_already_linked is called via bfd_map_over_sections. */
-
-/* This is the shape of the elements inside the already_linked hash
- table. It maps a name onto a list of already_linked elements with
- the same name. It's possible to get more than one element in a
- list if the COMDAT sections have different names. */
-
-struct already_linked_hash_entry
-{
- struct bfd_hash_entry root;
- struct already_linked *entry;
-};
-
-struct already_linked
-{
- struct already_linked *next;
- asection *sec;
-};
-
-/* The hash table. */
-
-static struct bfd_hash_table already_linked_table;
-
static void
section_already_linked (bfd *abfd, asection *sec, void *data)
{
lang_input_statement_type *entry = data;
- flagword flags;
- const char *name;
- struct already_linked *l;
- struct already_linked_hash_entry *already_linked_list;
/* If we are only reading symbols from this object, then we want to
discard all sections. */
if (entry->just_syms_flag)
{
- bfd_link_just_syms (sec, &link_info);
+ bfd_link_just_syms (abfd, sec, &link_info);
return;
}
- flags = bfd_get_section_flags (abfd, sec);
-
- if ((flags & SEC_LINK_ONCE) == 0)
- return;
-
- /* FIXME: When doing a relocatable link, we may have trouble
- copying relocations in other sections that refer to local symbols
- in the section being discarded. Those relocations will have to
- be converted somehow; as of this writing I'm not sure that any of
- the backends handle that correctly.
-
- It is tempting to instead not discard link once sections when
- doing a relocatable link (technically, they should be discarded
- whenever we are building constructors). However, that fails,
- because the linker winds up combining all the link once sections
- into a single large link once section, which defeats the purpose
- of having link once sections in the first place.
-
- Also, not merging link once sections in a relocatable link
- causes trouble for MIPS ELF, which relies on link once semantics
- to handle the .reginfo section correctly. */
-
- name = bfd_get_section_name (abfd, sec);
-
- already_linked_list =
- ((struct already_linked_hash_entry *)
- bfd_hash_lookup (&already_linked_table, name, TRUE, FALSE));
-
- for (l = already_linked_list->entry; l != NULL; l = l->next)
- {
- if (sec->comdat == NULL
- || l->sec->comdat == NULL
- || strcmp (sec->comdat->name, l->sec->comdat->name) == 0)
- {
- /* The section has already been linked. See if we should
- issue a warning. */
- switch (flags & SEC_LINK_DUPLICATES)
- {
- default:
- abort ();
-
- case SEC_LINK_DUPLICATES_DISCARD:
- break;
-
- case SEC_LINK_DUPLICATES_ONE_ONLY:
- if (sec->comdat == NULL)
- einfo (_("%P: %B: warning: ignoring duplicate section `%s'\n"),
- abfd, name);
- else
- einfo (_("%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n"),
- abfd, name, sec->comdat->name);
- break;
-
- case SEC_LINK_DUPLICATES_SAME_CONTENTS:
- /* FIXME: We should really dig out the contents of both
- sections and memcmp them. The COFF/PE spec says that
- the Microsoft linker does not implement this
- correctly, so I'm not going to bother doing it
- either. */
- /* Fall through. */
- case SEC_LINK_DUPLICATES_SAME_SIZE:
- if (bfd_section_size (abfd, sec)
- != bfd_section_size (l->sec->owner, l->sec))
- einfo (_("%P: %B: warning: duplicate section `%s' has different size\n"),
- abfd, name);
- break;
- }
-
- /* Set the output_section field so that lang_add_section
- does not create a lang_input_section structure for this
- section. Since there might be a symbol in the section
- being discarded, we must retain a pointer to the section
- which we are really going to use. */
- sec->output_section = bfd_abs_section_ptr;
- sec->kept_section = l->sec;
-
- if (flags & SEC_GROUP)
- bfd_discard_group (abfd, sec);
-
- return;
- }
- }
-
- /* This is the first section with this name. Record it. Allocate
- the memory from the same obstack as the hash table is kept in. */
-
- l = bfd_hash_allocate (&already_linked_table, sizeof *l);
-
- l->sec = sec;
- l->next = already_linked_list->entry;
- already_linked_list->entry = l;
-}
-
-/* Support routines for the hash table used by section_already_linked,
- initialize the table, fill in an entry and remove the table. */
-
-static struct bfd_hash_entry *
-already_linked_newfunc (struct bfd_hash_entry *entry ATTRIBUTE_UNUSED,
- struct bfd_hash_table *table,
- const char *string ATTRIBUTE_UNUSED)
-{
- struct already_linked_hash_entry *ret =
- bfd_hash_allocate (table, sizeof (struct already_linked_hash_entry));
-
- ret->entry = NULL;
-
- return &ret->root;
-}
-
-static void
-already_linked_table_init (void)
-{
- if (! bfd_hash_table_init_n (&already_linked_table,
- already_linked_newfunc,
- 42))
- einfo (_("%P%F: Failed to create hash table\n"));
-}
-
-static void
-already_linked_table_free (void)
-{
- bfd_hash_table_free (&already_linked_table);
+ if (!(abfd->flags & DYNAMIC))
+ bfd_section_already_linked (abfd, sec);
}
/* The wild routines.
@@ -982,25 +1849,6 @@ already_linked_table_free (void)
explicit actions, like foo.o(.text), bar.o(.text) and
foo.o(.text, .data). */
-/* Return TRUE if the PATTERN argument is a wildcard pattern.
- Although backslashes are treated specially if a pattern contains
- wildcards, we do not consider the mere presence of a backslash to
- be enough to cause the pattern to be treated as a wildcard.
- That lets us handle DOS filenames more naturally. */
-
-static bfd_boolean
-wildcardp (const char *pattern)
-{
- const char *s;
-
- for (s = pattern; *s != '\0'; ++s)
- if (*s == '?'
- || *s == '*'
- || *s == '[')
- return TRUE;
- return FALSE;
-}
-
/* Add SECTION to the output section OUTPUT. Do this by creating a
lang_input_section statement which is placed at PTR. FILE is the
input file which holds SECTION. */
@@ -1008,22 +1856,13 @@ wildcardp (const char *pattern)
void
lang_add_section (lang_statement_list_type *ptr,
asection *section,
- lang_output_section_statement_type *output,
- lang_input_statement_type *file)
+ lang_output_section_statement_type *output)
{
- flagword flags;
+ flagword flags = section->flags;
bfd_boolean discard;
- flags = bfd_get_section_flags (section->owner, section);
-
- discard = FALSE;
-
- /* Discard sections marked with SEC_EXCLUDE if we are doing a final
- link. Discard debugging sections marked with SEC_EXCLUDE on a
- relocatable link too. */
- if ((flags & SEC_EXCLUDE) != 0
- && ((flags & SEC_DEBUGGING) != 0 || !link_info.relocatable))
- discard = TRUE;
+ /* Discard sections marked with SEC_EXCLUDE. */
+ discard = (flags & SEC_EXCLUDE) != 0;
/* Discard input sections which are assigned to a section named
DISCARD_SECTION_NAME. */
@@ -1053,16 +1892,28 @@ lang_add_section (lang_statement_list_type *ptr,
flagword flags;
if (output->bfd_section == NULL)
- init_os (output);
+ init_os (output, section);
first = ! output->bfd_section->linker_has_input;
output->bfd_section->linker_has_input = 1;
+ if (!link_info.relocatable
+ && !stripped_excluded_sections)
+ {
+ asection *s = output->bfd_section->map_tail.s;
+ output->bfd_section->map_tail.s = section;
+ section->map_head.s = NULL;
+ section->map_tail.s = s;
+ if (s != NULL)
+ s->map_head.s = section;
+ else
+ output->bfd_section->map_head.s = section;
+ }
+
/* Add a section reference to the list. */
new = new_stat (lang_input_section, ptr);
new->section = section;
- new->ifile = file;
section->output_section = output->bfd_section;
flags = section->flags;
@@ -1085,32 +1936,32 @@ lang_add_section (lang_statement_list_type *ptr,
flags &= ~ (SEC_LINK_ONCE | SEC_LINK_DUPLICATES);
/* If this is not the first input section, and the SEC_READONLY
- flag is not currently set, then don't set it just because the
- input section has it set. */
+ flag is not currently set, then don't set it just because the
+ input section has it set. */
- if (! first && (section->output_section->flags & SEC_READONLY) == 0)
+ if (! first && (output->bfd_section->flags & SEC_READONLY) == 0)
flags &= ~ SEC_READONLY;
/* Keep SEC_MERGE and SEC_STRINGS only if they are the same. */
if (! first
- && ((section->output_section->flags & (SEC_MERGE | SEC_STRINGS))
+ && ((output->bfd_section->flags & (SEC_MERGE | SEC_STRINGS))
!= (flags & (SEC_MERGE | SEC_STRINGS))
|| ((flags & SEC_MERGE)
- && section->output_section->entsize != section->entsize)))
+ && output->bfd_section->entsize != section->entsize)))
{
- section->output_section->flags &= ~ (SEC_MERGE | SEC_STRINGS);
+ output->bfd_section->flags &= ~ (SEC_MERGE | SEC_STRINGS);
flags &= ~ (SEC_MERGE | SEC_STRINGS);
}
- section->output_section->flags |= flags;
+ output->bfd_section->flags |= flags;
if (flags & SEC_MERGE)
- section->output_section->entsize = section->entsize;
+ output->bfd_section->entsize = section->entsize;
/* If SEC_READONLY is not set in the input section, then clear
- it from the output section. */
+ it from the output section. */
if ((section->flags & SEC_READONLY) == 0)
- section->output_section->flags &= ~SEC_READONLY;
+ output->bfd_section->flags &= ~SEC_READONLY;
switch (output->sectype)
{
@@ -1130,24 +1981,61 @@ lang_add_section (lang_statement_list_type *ptr,
/* Copy over SEC_SMALL_DATA. */
if (section->flags & SEC_SMALL_DATA)
- section->output_section->flags |= SEC_SMALL_DATA;
+ output->bfd_section->flags |= SEC_SMALL_DATA;
if (section->alignment_power > output->bfd_section->alignment_power)
output->bfd_section->alignment_power = section->alignment_power;
- /* If supplied an alignment, then force it. */
- if (output->section_alignment != -1)
- output->bfd_section->alignment_power = output->section_alignment;
-
- if (section->flags & SEC_BLOCK)
+ if (bfd_get_arch (section->owner) == bfd_arch_tic54x
+ && (section->flags & SEC_TIC54X_BLOCK) != 0)
{
- section->output_section->flags |= SEC_BLOCK;
+ output->bfd_section->flags |= SEC_TIC54X_BLOCK;
/* FIXME: This value should really be obtained from the bfd... */
output->block_value = 128;
}
}
}
+/* 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
@@ -1162,7 +2050,8 @@ wild_sort (lang_wild_statement_type *wild,
const char *section_name;
lang_statement_union_type *l;
- if (!wild->filenames_sorted && (sec == NULL || !sec->spec.sorted))
+ if (!wild->filenames_sorted
+ && (sec == NULL || sec->spec.sorted == none))
return NULL;
section_name = bfd_get_section_name (file->the_bfd, section);
@@ -1175,7 +2064,7 @@ wild_sort (lang_wild_statement_type *wild,
ls = &l->input_section;
/* Sorting by filename takes precedence over sorting by section
- name. */
+ name. */
if (wild->filenames_sorted)
{
@@ -1184,9 +2073,9 @@ wild_sort (lang_wild_statement_type *wild,
int i;
/* The PE support for the .idata section as generated by
- dlltool assumes that files will be sorted by the name of
- the archive and then the name of the file within the
- archive. */
+ dlltool assumes that files will be sorted by the name of
+ the archive and then the name of the file within the
+ archive. */
if (file->the_bfd != NULL
&& bfd_my_archive (file->the_bfd) != NULL)
@@ -1200,15 +2089,14 @@ wild_sort (lang_wild_statement_type *wild,
fa = FALSE;
}
- if (ls->ifile->the_bfd != NULL
- && bfd_my_archive (ls->ifile->the_bfd) != NULL)
+ if (bfd_my_archive (ls->section->owner) != NULL)
{
- ln = bfd_get_filename (bfd_my_archive (ls->ifile->the_bfd));
+ ln = bfd_get_filename (bfd_my_archive (ls->section->owner));
la = TRUE;
}
else
{
- ln = ls->ifile->filename;
+ ln = ls->section->owner->filename;
la = FALSE;
}
@@ -1223,7 +2111,7 @@ wild_sort (lang_wild_statement_type *wild,
if (fa)
fn = file->filename;
if (la)
- ln = ls->ifile->filename;
+ ln = ls->section->owner->filename;
i = strcmp (fn, ln);
if (i > 0)
@@ -1234,16 +2122,11 @@ wild_sort (lang_wild_statement_type *wild,
}
/* Here either the files are not sorted by name, or we are
- looking at the sections for this file. */
+ looking at the sections for this file. */
- if (sec != NULL && sec->spec.sorted)
- {
- if (strcmp (section_name,
- bfd_get_section_name (ls->ifile->the_bfd,
- ls->section))
- < 0)
- break;
- }
+ if (sec != NULL && sec->spec.sorted != none)
+ if (compare_section (sec->spec.sorted, section, ls->section) < 0)
+ break;
}
return l;
@@ -1262,14 +2145,9 @@ output_section_callback (lang_wild_statement_type *ptr,
lang_statement_union_type *before;
/* Exclude sections that match UNIQUE_SECTION_LIST. */
- if (unique_section_p (bfd_get_section_name (file->the_bfd, section)))
+ if (unique_section_p (section))
return;
- /* If the wild pattern was marked KEEP, the member sections
- should be as well. */
- if (ptr->keep_sections)
- section->flags |= SEC_KEEP;
-
before = wild_sort (ptr, sec, file, section);
/* Here BEFORE points to the lang_input_section which
@@ -1279,8 +2157,7 @@ output_section_callback (lang_wild_statement_type *ptr,
if (before == NULL)
lang_add_section (&ptr->children, section,
- (lang_output_section_statement_type *) output,
- file);
+ (lang_output_section_statement_type *) output);
else
{
lang_statement_list_type list;
@@ -1288,8 +2165,7 @@ output_section_callback (lang_wild_statement_type *ptr,
lang_list_init (&list);
lang_add_section (&list, section,
- (lang_output_section_statement_type *) output,
- file);
+ (lang_output_section_statement_type *) output);
/* If we are discarding the section, LIST.HEAD will
be NULL. */
@@ -1308,6 +2184,24 @@ output_section_callback (lang_wild_statement_type *ptr,
}
}
+/* Check if all sections in a wild statement for a particular FILE
+ are readonly. */
+
+static void
+check_section_callback (lang_wild_statement_type *ptr ATTRIBUTE_UNUSED,
+ struct wildcard_list *sec ATTRIBUTE_UNUSED,
+ asection *section,
+ lang_input_statement_type *file ATTRIBUTE_UNUSED,
+ void *data)
+{
+ /* Exclude sections that match UNIQUE_SECTION_LIST. */
+ if (unique_section_p (section))
+ return;
+
+ if (section->output_section == NULL && (section->flags & SEC_READONLY) == 0)
+ ((lang_output_section_statement_type *) data)->all_input_readonly = FALSE;
+}
+
/* This is passed a file name which must have been seen already and
added to the statement tree. We will see if it has been opened
already and had its symbols read. If not then we'll read it. */
@@ -1335,8 +2229,8 @@ lookup_name (const char *name)
}
if (search == NULL)
- search = new_afile (name, lang_input_file_is_search_file_enum, default_target,
- FALSE);
+ search = new_afile (name, lang_input_file_is_search_file_enum,
+ 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
@@ -1352,6 +2246,67 @@ lookup_name (const char *name)
return search;
}
+/* Save LIST as a list of libraries whose symbols should not be exported. */
+
+struct excluded_lib
+{
+ char *name;
+ struct excluded_lib *next;
+};
+static struct excluded_lib *excluded_libs;
+
+void
+add_excluded_libs (const char *list)
+{
+ const char *p = list, *end;
+
+ while (*p != '\0')
+ {
+ struct excluded_lib *entry;
+ end = strpbrk (p, ",:");
+ if (end == NULL)
+ end = p + strlen (p);
+ entry = xmalloc (sizeof (*entry));
+ entry->next = excluded_libs;
+ entry->name = xmalloc (end - p + 1);
+ memcpy (entry->name, p, end - p);
+ entry->name[end - p] = '\0';
+ excluded_libs = entry;
+ if (*end == '\0')
+ break;
+ p = end + 1;
+ }
+}
+
+static void
+check_excluded_libs (bfd *abfd)
+{
+ struct excluded_lib *lib = excluded_libs;
+
+ while (lib)
+ {
+ int len = strlen (lib->name);
+ const char *filename = lbasename (abfd->filename);
+
+ if (strcmp (lib->name, "ALL") == 0)
+ {
+ abfd->no_export = TRUE;
+ return;
+ }
+
+ if (strncmp (lib->name, filename, len) == 0
+ && (filename[len] == '\0'
+ || (filename[len] == '.' && filename[len + 1] == 'a'
+ && filename[len + 2] == '\0')))
+ {
+ abfd->no_export = TRUE;
+ return;
+ }
+
+ lib = lib->next;
+ }
+}
+
/* Get the symbols for an input file. */
static bfd_boolean
@@ -1372,6 +2327,7 @@ load_symbols (lang_input_statement_type *entry,
lang_statement_list_type *hold;
bfd_boolean bad_load = TRUE;
bfd_boolean save_ldlang_sysrooted_script;
+ bfd_boolean save_as_needed, save_add_needed;
err = bfd_get_error ();
@@ -1405,13 +2361,22 @@ load_symbols (lang_input_statement_type *entry,
stat_ptr = place;
save_ldlang_sysrooted_script = ldlang_sysrooted_script;
ldlang_sysrooted_script = entry->sysrooted;
+ save_as_needed = as_needed;
+ as_needed = entry->as_needed;
+ save_add_needed = add_needed;
+ add_needed = entry->add_needed;
ldfile_assumed_script = TRUE;
parser_input = input_script;
+ /* We want to use the same -Bdynamic/-Bstatic as the one for
+ ENTRY. */
+ config.dynamic_link = entry->dynamic;
yyparse ();
ldfile_assumed_script = FALSE;
ldlang_sysrooted_script = save_ldlang_sysrooted_script;
+ as_needed = save_as_needed;
+ add_needed = save_add_needed;
stat_ptr = hold;
return ! bad_load;
@@ -1436,6 +2401,8 @@ load_symbols (lang_input_statement_type *entry,
break;
case bfd_archive:
+ check_excluded_libs (entry->the_bfd);
+
if (entry->whole_archive)
{
bfd *member = NULL;
@@ -1730,7 +2697,8 @@ open_output (const char *name)
/* Oh dear - we could not find any targets that
satisfy our requirements. */
if (winner == NULL)
- einfo (_("%P: warning: could not find any targets that match endianness requirement\n"));
+ einfo (_("%P: warning: could not find any targets"
+ " that match endianness requirement\n"));
else
output_target = winner->name;
}
@@ -1750,10 +2718,6 @@ open_output (const char *name)
delete_output_file_on_failure = TRUE;
-#if 0
- output->flags |= D_PAGED;
-#endif
-
if (! bfd_set_format (output, bfd_object))
einfo (_("%P%F:%s: can not make object file: %E\n"), name);
if (! bfd_set_arch_mach (output,
@@ -1763,7 +2727,7 @@ open_output (const char *name)
link_info.hash = bfd_link_hash_table_create (output);
if (link_info.hash == NULL)
- einfo (_("%P%F: can not create link hash table: %E\n"));
+ einfo (_("%P%F: can not create hash table: %E\n"));
bfd_set_gp_size (output, g_switch_value);
return output;
@@ -1873,8 +2837,8 @@ open_input_bfds (lang_statement_union_type *s, bfd_boolean force)
s->input_statement.target = current_target;
/* If we are being called from within a group, and this
- is an archive which has already been searched, then
- force it to be researched unless the whole archive
+ is an archive which has already been searched, then
+ force it to be researched unless the whole archive
has been loaded already. */
if (force
&& !s->input_statement.whole_archive
@@ -1901,31 +2865,6 @@ open_input_bfds (lang_statement_union_type *s, bfd_boolean force)
}
}
-/* If there are [COMMONS] statements, put a wild one into the bss
- section. */
-
-static void
-lang_reasonable_defaults (void)
-{
-#if 0
- lang_output_section_statement_lookup (".text");
- lang_output_section_statement_lookup (".data");
-
- default_common_section = lang_output_section_statement_lookup (".bss");
-
- if (!placed_commons)
- {
- lang_wild_statement_type *new =
- new_stat (lang_wild_statement,
- &default_common_section->children);
-
- new->section_name = "COMMON";
- new->filename = NULL;
- lang_list_init (&new->children);
- }
-#endif
-}
-
/* Add a symbol to a hash of symbols used in DEFINED (NAME) expressions. */
void
@@ -2061,26 +3000,144 @@ lang_place_undefineds (void)
insert_undefined (ptr->name);
}
+/* Check for all readonly or some readwrite sections. */
+
+static void
+check_input_sections
+ (lang_statement_union_type *s,
+ lang_output_section_statement_type *output_section_statement)
+{
+ for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
+ {
+ switch (s->header.type)
+ {
+ case lang_wild_statement_enum:
+ walk_wild (&s->wild_statement, check_section_callback,
+ output_section_statement);
+ if (! output_section_statement->all_input_readonly)
+ return;
+ break;
+ case lang_constructors_statement_enum:
+ check_input_sections (constructor_list.head,
+ output_section_statement);
+ if (! output_section_statement->all_input_readonly)
+ return;
+ break;
+ case lang_group_statement_enum:
+ check_input_sections (s->group_statement.children.head,
+ output_section_statement);
+ if (! output_section_statement->all_input_readonly)
+ return;
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+/* Update wildcard statements if needed. */
+
+static void
+update_wild_statements (lang_statement_union_type *s)
+{
+ struct wildcard_list *sec;
+
+ switch (sort_section)
+ {
+ default:
+ FAIL ();
+
+ case none:
+ break;
+
+ case by_name:
+ case by_alignment:
+ for (; s != NULL; s = s->header.next)
+ {
+ switch (s->header.type)
+ {
+ default:
+ break;
+
+ case lang_wild_statement_enum:
+ sec = s->wild_statement.section_list;
+ if (sec != NULL)
+ {
+ switch (sec->spec.sorted)
+ {
+ case none:
+ sec->spec.sorted = sort_section;
+ break;
+ case by_name:
+ if (sort_section == by_alignment)
+ sec->spec.sorted = by_name_alignment;
+ break;
+ case by_alignment:
+ if (sort_section == by_name)
+ sec->spec.sorted = by_alignment_name;
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+
+ case lang_constructors_statement_enum:
+ update_wild_statements (constructor_list.head);
+ break;
+
+ case lang_output_section_statement_enum:
+ update_wild_statements
+ (s->output_section_statement.children.head);
+ break;
+
+ case lang_group_statement_enum:
+ update_wild_statements (s->group_statement.children.head);
+ break;
+ }
+ }
+ break;
+ }
+}
+
/* Open input files and attach to output sections. */
static void
map_input_to_output_sections
(lang_statement_union_type *s, const char *target,
- lang_output_section_statement_type *output_section_statement)
+ lang_output_section_statement_type *os)
{
for (; s != NULL; s = s->header.next)
{
switch (s->header.type)
{
case lang_wild_statement_enum:
- wild (&s->wild_statement, target, output_section_statement);
+ wild (&s->wild_statement, target, os);
break;
case lang_constructors_statement_enum:
map_input_to_output_sections (constructor_list.head,
target,
- output_section_statement);
+ os);
break;
case lang_output_section_statement_enum:
+ if (s->output_section_statement.constraint)
+ {
+ if (s->output_section_statement.constraint != ONLY_IF_RW
+ && s->output_section_statement.constraint != ONLY_IF_RO)
+ break;
+ s->output_section_statement.all_input_readonly = TRUE;
+ check_input_sections (s->output_section_statement.children.head,
+ &s->output_section_statement);
+ if ((s->output_section_statement.all_input_readonly
+ && s->output_section_statement.constraint == ONLY_IF_RW)
+ || (!s->output_section_statement.all_input_readonly
+ && s->output_section_statement.constraint == ONLY_IF_RO))
+ {
+ s->output_section_statement.constraint = -1;
+ break;
+ }
+ }
+
map_input_to_output_sections (s->output_section_statement.children.head,
target,
&s->output_section_statement);
@@ -2093,27 +3150,32 @@ map_input_to_output_sections
case lang_group_statement_enum:
map_input_to_output_sections (s->group_statement.children.head,
target,
- output_section_statement);
+ os);
break;
case lang_data_statement_enum:
/* Make sure that any sections mentioned in the expression
are initialized. */
exp_init_os (s->data_statement.exp);
- /* FALLTHROUGH */
+ if (os != NULL && os->bfd_section == NULL)
+ init_os (os, NULL);
+ /* 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;
+ break;
case lang_fill_statement_enum:
case lang_input_section_enum:
case lang_object_symbols_statement_enum:
case lang_reloc_statement_enum:
case lang_padding_statement_enum:
case lang_input_statement_enum:
- if (output_section_statement != NULL
- && output_section_statement->bfd_section == NULL)
- init_os (output_section_statement);
+ if (os != NULL && os->bfd_section == NULL)
+ init_os (os, NULL);
break;
case lang_assignment_statement_enum:
- if (output_section_statement != NULL
- && output_section_statement->bfd_section == NULL)
- init_os (output_section_statement);
+ if (os != NULL && os->bfd_section == NULL)
+ init_os (os, NULL);
/* Make sure that any sections mentioned in the assignment
are initialized. */
@@ -2123,16 +3185,27 @@ map_input_to_output_sections
FAIL ();
break;
case lang_address_statement_enum:
- /* Mark the specified section with the supplied address. */
- {
- lang_output_section_statement_type *os =
- lang_output_section_statement_lookup
- (s->address_statement.section_name);
-
- if (os->bfd_section == NULL)
- init_os (os);
- os->addr_tree = s->address_statement.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
+ processed the segment marker. Originally, the linker
+ treated segment directives (like -Ttext on the
+ command-line) as section directives. We honor the
+ 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
+ || !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);
+ aos->addr_tree = s->address_statement.address;
+ }
break;
}
}
@@ -2142,35 +3215,74 @@ map_input_to_output_sections
added. For example, ldemul_before_allocation can remove dynamic
sections if they turn out to be not needed. Clean them up here. */
-static void
+void
strip_excluded_output_sections (void)
{
- lang_statement_union_type *u;
+ lang_output_section_statement_type *os;
- for (u = lang_output_section_statement.head;
- u != NULL;
- u = u->output_section_statement.next)
+ /* Run lang_size_sections (if not already done). */
+ if (expld.phase != lang_mark_phase_enum)
{
- lang_output_section_statement_type *os;
- asection *s;
+ expld.phase = lang_mark_phase_enum;
+ expld.dataseg.phase = exp_dataseg_none;
+ one_lang_size_sections_pass (NULL, FALSE);
+ lang_reset_memory_regions ();
+ }
- os = &u->output_section_statement;
- s = os->bfd_section;
- if (s != NULL && (s->flags & SEC_EXCLUDE) != 0)
- {
- asection **p;
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ {
+ asection *output_section;
+ bfd_boolean exclude;
- os->bfd_section = NULL;
+ if (os->constraint == -1)
+ continue;
- for (p = &output_bfd->sections; *p; p = &(*p)->next)
- if (*p == s)
+ output_section = os->bfd_section;
+ if (output_section == NULL)
+ continue;
+
+ exclude = (output_section->rawsize == 0
+ && (output_section->flags & SEC_KEEP) == 0
+ && !bfd_section_removed_from_list (output_bfd,
+ output_section));
+
+ /* Some sections have not yet been sized, notably .gnu.version,
+ .dynsym, .dynstr and .hash. These all have SEC_LINKER_CREATED
+ input sections, so don't drop output sections that have such
+ input sections unless they are also marked SEC_EXCLUDE. */
+ if (exclude && output_section->map_head.s != NULL)
+ {
+ asection *s;
+
+ for (s = output_section->map_head.s; s != NULL; s = s->map_head.s)
+ if ((s->flags & SEC_LINKER_CREATED) != 0
+ && (s->flags & SEC_EXCLUDE) == 0)
{
- bfd_section_list_remove (output_bfd, p);
- output_bfd->section_count--;
+ exclude = FALSE;
break;
}
}
+
+ /* TODO: Don't just junk map_head.s, turn them into link_orders. */
+ output_section->map_head.link_order = NULL;
+ output_section->map_tail.link_order = NULL;
+
+ if (exclude)
+ {
+ /* We don't set bfd_section to NULL since bfd_section of the
+ removed output section statement may still be used. */
+ os->ignored = TRUE;
+ output_section->flags |= SEC_EXCLUDE;
+ bfd_section_list_remove (output_bfd, output_section);
+ output_bfd->section_count--;
+ }
}
+
+ /* Stop future calls to lang_add_section from messing with map_head
+ and map_tail link_order fields. */
+ stripped_excluded_sections = TRUE;
}
static void
@@ -2200,14 +3312,14 @@ print_output_section_statement
++len;
}
- minfo ("0x%V %W", section->vma, section->_raw_size);
+ 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", lang_final_phase_enum);
+ "load base");
minfo (_(" load address 0x%V"), addr);
}
}
@@ -2219,29 +3331,117 @@ print_output_section_statement
output_section_statement);
}
+/* Scan for the use of the destination in the right hand side
+ of an expression. In such cases we will not compute the
+ 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)
+{
+ if (rhs == NULL || dst == NULL)
+ return FALSE;
+
+ switch (rhs->type.node_class)
+ {
+ case etree_binary:
+ return scan_for_self_assignment (dst, rhs->binary.lhs)
+ || scan_for_self_assignment (dst, rhs->binary.rhs);
+
+ case etree_trinary:
+ return scan_for_self_assignment (dst, rhs->trinary.lhs)
+ || scan_for_self_assignment (dst, rhs->trinary.rhs);
+
+ case etree_assign:
+ case etree_provided:
+ case etree_provide:
+ if (strcmp (dst, rhs->assign.dst) == 0)
+ return TRUE;
+ return scan_for_self_assignment (dst, rhs->assign.src);
+
+ case etree_unary:
+ return scan_for_self_assignment (dst, rhs->unary.child);
+
+ case etree_value:
+ if (rhs->value.str)
+ return strcmp (dst, rhs->value.str) == 0;
+ return FALSE;
+
+ case etree_name:
+ if (rhs->name.name)
+ return strcmp (dst, rhs->name.name) == 0;
+ return FALSE;
+
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+
static void
print_assignment (lang_assignment_statement_type *assignment,
lang_output_section_statement_type *output_section)
{
- int i;
- etree_value_type result;
+ unsigned int i;
+ bfd_boolean is_dot;
+ bfd_boolean computation_is_valid = TRUE;
+ etree_type *tree;
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
- result = exp_fold_tree (assignment->exp->assign.src, output_section,
- lang_final_phase_enum, print_dot, &print_dot);
- if (result.valid_p)
+ if (assignment->exp->type.node_class == etree_assert)
+ {
+ is_dot = FALSE;
+ tree = assignment->exp->assert_s.child;
+ computation_is_valid = TRUE;
+ }
+ else
+ {
+ const char *dst = assignment->exp->assign.dst;
+
+ is_dot = (dst[0] == '.' && dst[1] == 0);
+ tree = assignment->exp->assign.src;
+ computation_is_valid = is_dot || (scan_for_self_assignment (dst, tree) == FALSE);
+ }
+
+ exp_fold_tree (tree, output_section->bfd_section, &print_dot);
+ if (expld.result.valid_p)
{
- const char *dst;
bfd_vma value;
- value = result.value + result.section->bfd_section->vma;
- dst = assignment->exp->assign.dst;
+ if (computation_is_valid)
+ {
+ value = expld.result.value;
+
+ if (expld.result.section)
+ value += expld.result.section->vma;
- minfo ("0x%V", value);
- if (dst[0] == '.' && dst[1] == 0)
- print_dot = value;
+ minfo ("0x%V", value);
+ if (is_dot)
+ print_dot = value;
+ }
+ else
+ {
+ struct bfd_link_hash_entry *h;
+
+ h = bfd_link_hash_lookup (link_info.hash, assignment->exp->assign.dst,
+ FALSE, FALSE, TRUE);
+ if (h)
+ {
+ value = h->u.def.value;
+
+ if (expld.result.section)
+ value += expld.result.section->vma;
+
+ minfo ("[0x%V]", value);
+ }
+ else
+ minfo ("[unresolved]");
+ }
}
else
{
@@ -2252,9 +3452,7 @@ print_assignment (lang_assignment_statement_type *assignment,
}
minfo (" ");
-
exp_print_tree (assignment->exp);
-
print_nl ();
}
@@ -2268,7 +3466,7 @@ print_input_statement (lang_input_statement_type *statm)
}
/* Print all symbols defined in a particular section. This is called
- via bfd_link_hash_traverse. */
+ via bfd_link_hash_traverse, or by print_all_symbols. */
static bfd_boolean
print_one_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
@@ -2294,62 +3492,84 @@ print_one_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
return TRUE;
}
+static void
+print_all_symbols (sec)
+ asection *sec;
+{
+ struct fat_user_section_struct *ud = get_userdata (sec);
+ struct map_symbol_def *def;
+
+ if (!ud)
+ return;
+
+ *ud->map_symbol_def_tail = 0;
+ for (def = ud->map_symbol_def_head; def; def = def->next)
+ print_one_symbol (def->entry, sec);
+}
+
/* Print information about an input section to the map file. */
static void
-print_input_section (lang_input_section_type *in)
+print_input_section (asection *i)
{
- asection *i = in->section;
- bfd_size_type size = i->_cooked_size != 0 ? i->_cooked_size : i->_raw_size;
+ bfd_size_type size = i->size;
init_opb ();
- if (size != 0)
+
{
- print_space ();
+ int len;
+ bfd_vma addr;
+ print_space ();
minfo ("%s", i->name);
- if (i->output_section != NULL)
+ len = 1 + strlen (i->name);
+ if (len >= SECTION_NAME_MAP_LENGTH - 1)
{
- int len;
+ print_nl ();
+ len = 0;
+ }
+ while (len < SECTION_NAME_MAP_LENGTH)
+ {
+ print_space ();
+ ++len;
+ }
- 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;
- }
+ 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",
- i->output_section->vma + i->output_offset, TO_ADDR (size),
- i->owner);
+ minfo ("0x%V %W %B\n", addr, TO_ADDR (size), i->owner);
- if (i->_cooked_size != 0 && i->_cooked_size != i->_raw_size)
- {
- 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->_raw_size);
+ while (len > 0)
+ {
+ print_space ();
+ --len;
}
- bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
+ minfo (_("%W (size before relaxing)\n"), i->rawsize);
+ }
- print_dot = (i->output_section->vma + i->output_offset
- + TO_ADDR (size));
+ 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);
+
+ print_dot = addr + TO_ADDR (size);
}
}
}
@@ -2377,7 +3597,7 @@ print_data_statement (lang_data_statement_type *data)
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
- addr = data->output_vma;
+ addr = data->output_offset;
if (data->output_section != NULL)
addr += data->output_section->vma;
@@ -2444,7 +3664,7 @@ print_reloc_statement (lang_reloc_statement_type *reloc)
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
- addr = reloc->output_vma;
+ addr = reloc->output_offset;
if (reloc->output_section != NULL)
addr += reloc->output_section->vma;
@@ -2483,7 +3703,7 @@ print_padding_statement (lang_padding_statement_type *s)
addr = s->output_offset;
if (s->output_section != NULL)
addr += s->output_section->vma;
- minfo ("0x%V %W ", addr, s->size);
+ minfo ("0x%V %W ", addr, (bfd_vma) s->size);
if (s->fill->size != 0)
{
@@ -2611,7 +3831,7 @@ print_statement (lang_statement_union_type *s,
print_reloc_statement (&s->reloc_statement);
break;
case lang_input_section_enum:
- print_input_section (&s->input_section);
+ print_input_section (s->input_section.section);
break;
case lang_padding_statement_enum:
print_padding_statement (&s->padding_statement);
@@ -2683,16 +3903,22 @@ insert_pad (lang_statement_union_type **ptr,
bfd_vma dot)
{
static fill_type zero_fill = { 1, { 0 } };
- lang_statement_union_type *pad;
+ lang_statement_union_type *pad = NULL;
- pad = ((lang_statement_union_type *)
- ((char *) ptr - offsetof (lang_statement_union_type, header.next)));
- if (ptr != &statement_list.head
+ if (ptr != &statement_list.head)
+ pad = ((lang_statement_union_type *)
+ ((char *) ptr - offsetof (lang_statement_union_type, header.next)));
+ if (pad != NULL
&& pad->header.type == lang_padding_statement_enum
&& pad->padding_statement.output_section == output_section)
{
- /* Use the existing pad statement. The above test on output
- section is probably redundant, but it doesn't hurt to check. */
+ /* Use the existing pad statement. */
+ }
+ else if ((pad = *ptr) != NULL
+ && pad->header.type == lang_padding_statement_enum
+ && pad->padding_statement.output_section == output_section)
+ {
+ /* Use the existing pad statement. */
}
else
{
@@ -2708,21 +3934,23 @@ insert_pad (lang_statement_union_type **ptr,
}
pad->padding_statement.output_offset = dot - output_section->vma;
pad->padding_statement.size = alignment_needed;
- output_section->_raw_size += alignment_needed;
+ output_section->size += alignment_needed;
}
/* Work out how much this section will move the dot point. */
static bfd_vma
-size_input_section (lang_statement_union_type **this_ptr,
- lang_output_section_statement_type *output_section_statement,
- fill_type *fill,
- bfd_vma dot)
+size_input_section
+ (lang_statement_union_type **this_ptr,
+ lang_output_section_statement_type *output_section_statement,
+ fill_type *fill,
+ bfd_vma dot)
{
lang_input_section_type *is = &((*this_ptr)->input_section);
asection *i = is->section;
- if (!is->ifile->just_syms_flag)
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0)
{
unsigned int alignment_needed;
asection *o;
@@ -2752,11 +3980,8 @@ size_input_section (lang_statement_union_type **this_ptr,
i->output_offset = dot - o->vma;
/* Mark how big the output section must be to contain this now. */
- if (i->_cooked_size != 0)
- dot += TO_ADDR (i->_cooked_size);
- else
- dot += TO_ADDR (i->_raw_size);
- o->_raw_size = TO_SIZE (dot - o->vma);
+ dot += TO_ADDR (i->size);
+ o->size = TO_SIZE (dot - o->vma);
}
else
{
@@ -2766,67 +3991,91 @@ size_input_section (lang_statement_union_type **this_ptr,
return dot;
}
-#define IGNORE_SECTION(bfd, s) \
- (((bfd_get_section_flags (bfd, s) & SEC_THREAD_LOCAL) \
- ? ((bfd_get_section_flags (bfd, s) & (SEC_LOAD | SEC_NEVER_LOAD)) \
- != SEC_LOAD) \
- : ((bfd_get_section_flags (bfd, s) & (SEC_ALLOC | SEC_NEVER_LOAD)) \
- != SEC_ALLOC)) \
- || bfd_section_size (bfd, s) == 0)
+static int
+sort_sections_by_lma (const void *arg1, const void *arg2)
+{
+ const asection *sec1 = *(const asection **) arg1;
+ const asection *sec2 = *(const asection **) arg2;
+
+ if (bfd_section_lma (sec1->owner, sec1)
+ < bfd_section_lma (sec2->owner, sec2))
+ return -1;
+ else if (bfd_section_lma (sec1->owner, sec1)
+ > bfd_section_lma (sec2->owner, sec2))
+ return 1;
+
+ return 0;
+}
+
+#define IGNORE_SECTION(s) \
+ ((s->flags & SEC_NEVER_LOAD) != 0 \
+ || (s->flags & SEC_ALLOC) == 0 \
+ || ((s->flags & SEC_THREAD_LOCAL) != 0 \
+ && (s->flags & SEC_LOAD) == 0))
/* Check to see if any allocated sections overlap with other allocated
- sections. This can happen when the linker script specifically specifies
- the output section addresses of the two sections. */
+ sections. This can happen if a linker script specifies the output
+ section addresses of the two sections. */
static void
lang_check_section_addresses (void)
{
- asection *s;
+ asection *s, *os;
+ asection **sections, **spp;
+ unsigned int count;
+ bfd_vma s_start;
+ bfd_vma s_end;
+ bfd_vma os_start;
+ bfd_vma os_end;
+ bfd_size_type amt;
+
+ if (bfd_count_sections (output_bfd) <= 1)
+ return;
+
+ amt = bfd_count_sections (output_bfd) * sizeof (asection *);
+ sections = xmalloc (amt);
/* Scan all sections in the output list. */
+ count = 0;
for (s = output_bfd->sections; s != NULL; s = s->next)
{
- asection *os;
-
- /* Ignore sections which are not loaded or which have no contents. */
- if (IGNORE_SECTION (output_bfd, s))
+ /* Only consider loadable sections with real contents. */
+ if (IGNORE_SECTION (s) || s->size == 0)
continue;
- /* Once we reach section 's' stop our seach. This prevents two
- warning messages from being produced, one for 'section A overlaps
- section B' and one for 'section B overlaps section A'. */
- for (os = output_bfd->sections; os != s; os = os->next)
- {
- bfd_vma s_start;
- bfd_vma s_end;
- bfd_vma os_start;
- bfd_vma os_end;
-
- /* Only consider loadable sections with real contents. */
- if (IGNORE_SECTION (output_bfd, os))
- continue;
-
- /* We must check the sections' LMA addresses not their
- VMA addresses because overlay sections can have
- overlapping VMAs but they must have distinct LMAs. */
- s_start = bfd_section_lma (output_bfd, s);
- os_start = bfd_section_lma (output_bfd, os);
- s_end = s_start + TO_ADDR (bfd_section_size (output_bfd, s)) - 1;
- os_end = os_start + TO_ADDR (bfd_section_size (output_bfd, os)) - 1;
-
- /* Look for an overlap. */
- if ((s_end < os_start) || (s_start > os_end))
- continue;
+ sections[count] = s;
+ count++;
+ }
+
+ if (count <= 1)
+ return;
- einfo (
-_("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"),
- s->name, s_start, s_end, os->name, os_start, os_end);
+ qsort (sections, (size_t) count, sizeof (asection *),
+ sort_sections_by_lma);
- /* Once we have found one overlap for this section,
- stop looking for others. */
- break;
- }
+ spp = sections;
+ s = *spp++;
+ s_start = bfd_section_lma (output_bfd, s);
+ s_end = s_start + TO_ADDR (s->size) - 1;
+ for (count--; count; count--)
+ {
+ /* We must check the sections' LMA addresses not their VMA
+ addresses because overlay sections can have overlapping VMAs
+ but they must have distinct LMAs. */
+ os = s;
+ os_start = s_start;
+ os_end = s_end;
+ s = *spp++;
+ s_start = bfd_section_lma (output_bfd, s);
+ s_end = s_start + TO_ADDR (s->size) - 1;
+
+ /* Look for an overlap. */
+ if (s_end >= os_start && s_start <= os_end)
+ einfo (_("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"),
+ s->name, s_start, s_end, os->name, os_start, os_end);
}
+
+ free (sections);
}
/* Make sure the new address is within the region. We explicitly permit the
@@ -2847,7 +4096,8 @@ os_region_check (lang_output_section_statement_type *os,
{
if (tree != NULL)
{
- einfo (_("%X%P: address 0x%v of %B section %s is not within region %s\n"),
+ einfo (_("%X%P: address 0x%v of %B section %s"
+ " is not within region %s\n"),
region->current,
os->bfd_section->owner,
os->bfd_section->name,
@@ -2884,36 +4134,54 @@ lang_size_sections_1
{
case lang_output_section_statement_enum:
{
- bfd_vma after;
+ bfd_vma newdot, after;
lang_output_section_statement_type *os;
os = &s->output_section_statement;
+ if (os->addr_tree != NULL)
+ {
+ os->processed = FALSE;
+ exp_fold_tree (os->addr_tree, bfd_abs_section_ptr, &dot);
+
+ if (!expld.result.valid_p
+ && expld.phase != lang_mark_phase_enum)
+ einfo (_("%F%S: non constant or forward reference"
+ " address expression for section %s\n"),
+ os->name);
+
+ dot = expld.result.value + expld.result.section->vma;
+ }
+
if (os->bfd_section == NULL)
- /* This section was never actually created. */
+ /* This section was removed or never actually created. */
break;
/* If this is a COFF shared library section, use the size and
address from the input section. FIXME: This is COFF
specific; it would be cleaner if there were some other way
to do this, but nothing simple comes to mind. */
- if ((os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
+ if ((bfd_get_flavour (output_bfd) == bfd_target_ecoff_flavour
+ || bfd_get_flavour (output_bfd) == bfd_target_coff_flavour)
+ && (os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
{
asection *input;
if (os->children.head == NULL
|| os->children.head->header.next != NULL
- || os->children.head->header.type != lang_input_section_enum)
- einfo (_("%P%X: Internal error on COFF shared library section %s\n"),
- os->name);
+ || (os->children.head->header.type
+ != lang_input_section_enum))
+ einfo (_("%P%X: Internal error on COFF shared library"
+ " section %s\n"), os->name);
input = os->children.head->input_section.section;
bfd_set_section_vma (os->bfd_section->owner,
os->bfd_section,
bfd_section_vma (input->owner, input));
- os->bfd_section->_raw_size = input->_raw_size;
+ os->bfd_section->size = input->size;
break;
}
+ newdot = dot;
if (bfd_is_abs_section (os->bfd_section))
{
/* No matter what happens, an abs section starts at zero. */
@@ -2921,15 +4189,17 @@ lang_size_sections_1
}
else
{
+ int align;
+
if (os->addr_tree == NULL)
{
/* No address specified for this section, get one
from the region specification. */
if (os->region == NULL
- || (((bfd_get_section_flags (output_bfd, os->bfd_section)
- & (SEC_ALLOC | SEC_LOAD)) != 0)
+ || ((os->bfd_section->flags & (SEC_ALLOC | SEC_LOAD))
&& os->region->name[0] == '*'
- && strcmp (os->region->name, DEFAULT_MEMORY_REGION) == 0))
+ && strcmp (os->region->name,
+ DEFAULT_MEMORY_REGION) == 0))
{
os->region = lang_memory_default (os->bfd_section);
}
@@ -2937,106 +4207,95 @@ lang_size_sections_1
/* If a loadable section is using the default memory
region, and some non default memory regions were
defined, issue an error message. */
- if (!IGNORE_SECTION (output_bfd, os->bfd_section)
+ if (!os->ignored
+ && !IGNORE_SECTION (os->bfd_section)
&& ! link_info.relocatable
&& check_regions
- && strcmp (os->region->name, DEFAULT_MEMORY_REGION) == 0
+ && strcmp (os->region->name,
+ DEFAULT_MEMORY_REGION) == 0
&& lang_memory_region_list != NULL
&& (strcmp (lang_memory_region_list->name,
DEFAULT_MEMORY_REGION) != 0
- || lang_memory_region_list->next != NULL))
+ || lang_memory_region_list->next != NULL)
+ && expld.phase != lang_mark_phase_enum)
{
/* By default this is an error rather than just a
warning because if we allocate the section to the
default memory region we can end up creating an
excessively large binary, or even seg faulting when
attempting to perform a negative seek. See
- http://sources.redhat.com/ml/binutils/2003-04/msg00423.html
+ sources.redhat.com/ml/binutils/2003-04/msg00423.html
for an example of this. This behaviour can be
overridden by the using the --no-check-sections
switch. */
if (command_line.check_section_addresses)
- einfo (_("%P%F: error: no memory region specified for loadable section `%s'\n"),
+ einfo (_("%P%F: error: no memory region specified"
+ " for loadable section `%s'\n"),
bfd_get_section_name (output_bfd,
os->bfd_section));
else
- einfo (_("%P: warning: no memory region specified for loadable section `%s'\n"),
+ einfo (_("%P: warning: no memory region specified"
+ " for loadable section `%s'\n"),
bfd_get_section_name (output_bfd,
os->bfd_section));
}
- dot = os->region->current;
-
- if (os->section_alignment == -1)
- {
- bfd_vma olddot;
-
- olddot = dot;
- dot = align_power (dot,
- os->bfd_section->alignment_power);
-
- if (dot != olddot && config.warn_section_align)
- einfo (_("%P: warning: changing start of section %s by %u bytes\n"),
- os->name, (unsigned int) (dot - olddot));
- }
+ newdot = os->region->current;
+ align = os->bfd_section->alignment_power;
}
else
+ align = os->section_alignment;
+
+ /* Align to what the section needs. */
+ if (align > 0)
{
- etree_value_type r;
-
- os->processed = -1;
- r = exp_fold_tree (os->addr_tree,
- abs_output_section,
- lang_allocating_phase_enum,
- dot, &dot);
- os->processed = 0;
-
- if (!r.valid_p)
- einfo (_("%F%S: non constant or forward reference address expression for section %s\n"),
- os->name);
-
- dot = r.value + r.section->bfd_section->vma;
+ bfd_vma savedot = newdot;
+ newdot = align_power (newdot, align);
+
+ if (newdot != savedot
+ && (config.warn_section_align
+ || os->addr_tree != NULL)
+ && expld.phase != lang_mark_phase_enum)
+ einfo (_("%P: warning: changing start of section"
+ " %s by %lu bytes\n"),
+ os->name, (unsigned long) (newdot - savedot));
}
- /* The section starts here.
- First, align to what the section needs. */
-
- if (os->section_alignment != -1)
- dot = align_power (dot, os->section_alignment);
-
- bfd_set_section_vma (0, os->bfd_section, dot);
+ bfd_set_section_vma (0, os->bfd_section, newdot);
os->bfd_section->output_offset = 0;
}
lang_size_sections_1 (os->children.head, os, &os->children.head,
- os->fill, dot, relax, check_regions);
+ os->fill, newdot, relax, check_regions);
+
+ os->processed = TRUE;
+
+ if (bfd_is_abs_section (os->bfd_section) || os->ignored)
+ {
+ 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 = ((os->bfd_section->vma
- + TO_ADDR (os->bfd_section->_raw_size)
+ after = ((dot
+ + TO_ADDR (os->bfd_section->size)
+ os->block_value - 1)
& - (bfd_vma) os->block_value);
- if (bfd_is_abs_section (os->bfd_section))
- ASSERT (after == os->bfd_section->vma);
- else
- os->bfd_section->_raw_size
- = TO_SIZE (after - os->bfd_section->vma);
+ os->bfd_section->size = TO_SIZE (after - os->bfd_section->vma);
- dot = os->bfd_section->vma;
/* .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->_raw_size);
-
- os->processed = 1;
+ dot += TO_ADDR (os->bfd_section->size);
if (os->update_dot_tree != 0)
- exp_fold_tree (os->update_dot_tree, abs_output_section,
- lang_allocating_phase_enum, dot, &dot);
+ exp_fold_tree (os->update_dot_tree, bfd_abs_section_ptr, &dot);
/* Update dot in the region ?
We only do this if the section is going to be allocated,
@@ -3047,10 +4306,8 @@ lang_size_sections_1
addresses of sections after it. We have to update
dot. */
if (os->region != NULL
- && ((bfd_get_section_flags (output_bfd, os->bfd_section)
- & SEC_NEVER_LOAD) == 0
- || (bfd_get_section_flags (output_bfd, os->bfd_section)
- & (SEC_ALLOC | SEC_LOAD))))
+ && ((os->bfd_section->flags & SEC_NEVER_LOAD) == 0
+ || (os->bfd_section->flags & (SEC_ALLOC | SEC_LOAD))))
{
os->region->current = dot;
@@ -3069,7 +4326,7 @@ lang_size_sections_1
/* 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->_raw_size);
+ TO_ADDR (os->bfd_section->size);
if (check_regions)
os_region_check (os, os->lma_region, NULL,
os->bfd_section->lma);
@@ -3089,15 +4346,14 @@ lang_size_sections_1
{
unsigned int size = 0;
- s->data_statement.output_vma =
+ s->data_statement.output_offset =
dot - output_section_statement->bfd_section->vma;
s->data_statement.output_section =
output_section_statement->bfd_section;
/* We might refer to provided symbols in the expression, and
need to mark them as needed. */
- exp_fold_tree (s->data_statement.exp, abs_output_section,
- lang_allocating_phase_enum, dot, &dot);
+ exp_fold_tree (s->data_statement.exp, bfd_abs_section_ptr, &dot);
switch (s->data_statement.type)
{
@@ -3120,15 +4376,7 @@ lang_size_sections_1
if (size < TO_SIZE ((unsigned) 1))
size = TO_SIZE ((unsigned) 1);
dot += TO_ADDR (size);
- output_section_statement->bfd_section->_raw_size += size;
- /* The output section gets contents, and then we inspect for
- any flags set in the input script which override any ALLOC. */
- output_section_statement->bfd_section->flags |= SEC_HAS_CONTENTS;
- if (!(output_section_statement->flags & SEC_NEVER_LOAD))
- {
- output_section_statement->bfd_section->flags |=
- SEC_ALLOC | SEC_LOAD;
- }
+ output_section_statement->bfd_section->size += size;
}
break;
@@ -3136,43 +4384,38 @@ lang_size_sections_1
{
int size;
- s->reloc_statement.output_vma =
+ s->reloc_statement.output_offset =
dot - output_section_statement->bfd_section->vma;
s->reloc_statement.output_section =
output_section_statement->bfd_section;
size = bfd_get_reloc_size (s->reloc_statement.howto);
dot += TO_ADDR (size);
- output_section_statement->bfd_section->_raw_size += size;
+ output_section_statement->bfd_section->size += size;
}
break;
case lang_wild_statement_enum:
-
dot = lang_size_sections_1 (s->wild_statement.children.head,
output_section_statement,
&s->wild_statement.children.head,
fill, dot, relax, check_regions);
-
break;
case lang_object_symbols_statement_enum:
link_info.create_object_symbols_section =
output_section_statement->bfd_section;
break;
+
case lang_output_statement_enum:
case lang_target_statement_enum:
break;
+
case lang_input_section_enum:
{
asection *i;
i = (*prev)->input_section.section;
- if (! relax)
- {
- if (i->_cooked_size == 0)
- i->_cooked_size = i->_raw_size;
- }
- else
+ if (relax)
{
bfd_boolean again;
@@ -3185,31 +4428,33 @@ lang_size_sections_1
output_section_statement->fill, dot);
}
break;
+
case lang_input_statement_enum:
break;
+
case lang_fill_statement_enum:
s->fill_statement.output_section =
output_section_statement->bfd_section;
fill = s->fill_statement.fill;
break;
+
case lang_assignment_statement_enum:
{
bfd_vma newdot = dot;
exp_fold_tree (s->assignment_statement.exp,
- output_section_statement,
- lang_allocating_phase_enum,
- dot,
+ output_section_statement->bfd_section,
&newdot);
- if (newdot != dot)
+ if (newdot != dot && !output_section_statement->ignored)
{
if (output_section_statement == abs_output_section)
{
/* If we don't have an output section, then just adjust
the default memory address. */
- lang_memory_region_lookup (DEFAULT_MEMORY_REGION, FALSE)->current = newdot;
+ lang_memory_region_lookup (DEFAULT_MEMORY_REGION,
+ FALSE)->current = newdot;
}
else
{
@@ -3221,14 +4466,15 @@ lang_size_sections_1
/* Don't neuter the pad below when relaxing. */
s = s->header.next;
- }
-
- /* If dot is advanced, this implies that the section should
- have space allocated to it, unless the user has explicitly
- stated that the section should never be loaded. */
- if (!(output_section_statement->flags & (SEC_NEVER_LOAD | SEC_ALLOC)))
- output_section_statement->bfd_section->flags |= SEC_ALLOC;
+ /* If dot is advanced, this implies that the section
+ should have space allocated to it, unless the
+ user has explicitly stated that the section
+ should never be loaded. */
+ if (!(output_section_statement->flags
+ & (SEC_NEVER_LOAD | SEC_ALLOC)))
+ output_section_statement->bfd_section->flags |= SEC_ALLOC;
+ }
dot = newdot;
}
}
@@ -3271,54 +4517,89 @@ lang_size_sections_1
return dot;
}
-bfd_vma
-lang_size_sections
- (lang_statement_union_type *s,
- lang_output_section_statement_type *output_section_statement,
- lang_statement_union_type **prev,
- fill_type *fill,
- bfd_vma dot,
- bfd_boolean *relax,
- bfd_boolean check_regions)
+void
+one_lang_size_sections_pass (bfd_boolean *relax, bfd_boolean check_regions)
{
- bfd_vma result;
- asection *o;
-
- /* Callers of exp_fold_tree need to increment this. */
lang_statement_iteration++;
+ lang_size_sections_1 (statement_list.head, abs_output_section,
+ &statement_list.head, 0, 0, relax, check_regions);
+}
- exp_data_seg.phase = exp_dataseg_none;
- result = lang_size_sections_1 (s, output_section_statement, prev, fill,
- dot, relax, check_regions);
- if (exp_data_seg.phase == exp_dataseg_end_seen)
+void
+lang_size_sections (bfd_boolean *relax, bfd_boolean check_regions)
+{
+ expld.phase = lang_allocating_phase_enum;
+ expld.dataseg.phase = exp_dataseg_none;
+
+ one_lang_size_sections_pass (relax, check_regions);
+ if (expld.dataseg.phase == exp_dataseg_end_seen
+ && link_info.relro && expld.dataseg.relro_end)
+ {
+ /* If DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END pair was seen, try
+ to put expld.dataseg.relro on a (common) page boundary. */
+ bfd_vma old_min_base, relro_end, maxpage;
+
+ expld.dataseg.phase = exp_dataseg_relro_adjust;
+ old_min_base = expld.dataseg.min_base;
+ maxpage = expld.dataseg.maxpagesize;
+ expld.dataseg.base += (-expld.dataseg.relro_end
+ & (expld.dataseg.pagesize - 1));
+ /* Compute the expected PT_GNU_RELRO segment end. */
+ relro_end = (expld.dataseg.relro_end + expld.dataseg.pagesize - 1)
+ & ~(expld.dataseg.pagesize - 1);
+ if (old_min_base + maxpage < expld.dataseg.base)
+ {
+ expld.dataseg.base -= maxpage;
+ relro_end -= maxpage;
+ }
+ one_lang_size_sections_pass (relax, check_regions);
+ if (expld.dataseg.relro_end > relro_end)
+ {
+ /* The alignment of sections between DATA_SEGMENT_ALIGN
+ and DATA_SEGMENT_RELRO_END caused huge padding to be
+ inserted at DATA_SEGMENT_RELRO_END. Try some other base. */
+ asection *sec;
+ unsigned int max_alignment_power = 0;
+
+ /* Find maximum alignment power of sections between
+ DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END. */
+ for (sec = output_bfd->sections; sec; sec = sec->next)
+ if (sec->vma >= expld.dataseg.base
+ && sec->vma < expld.dataseg.relro_end
+ && sec->alignment_power > max_alignment_power)
+ max_alignment_power = sec->alignment_power;
+
+ if (((bfd_vma) 1 << max_alignment_power) < expld.dataseg.pagesize)
+ {
+ if (expld.dataseg.base - (1 << max_alignment_power)
+ < old_min_base)
+ expld.dataseg.base += expld.dataseg.pagesize;
+ expld.dataseg.base -= (1 << max_alignment_power);
+ one_lang_size_sections_pass (relax, check_regions);
+ }
+ }
+ link_info.relro_start = expld.dataseg.base;
+ link_info.relro_end = expld.dataseg.relro_end;
+ }
+ else if (expld.dataseg.phase == exp_dataseg_end_seen)
{
/* If DATA_SEGMENT_ALIGN DATA_SEGMENT_END pair was seen, check whether
a page could be saved in the data segment. */
bfd_vma first, last;
- first = -exp_data_seg.base & (exp_data_seg.pagesize - 1);
- last = exp_data_seg.end & (exp_data_seg.pagesize - 1);
+ first = -expld.dataseg.base & (expld.dataseg.pagesize - 1);
+ last = expld.dataseg.end & (expld.dataseg.pagesize - 1);
if (first && last
- && ((exp_data_seg.base & ~(exp_data_seg.pagesize - 1))
- != (exp_data_seg.end & ~(exp_data_seg.pagesize - 1)))
- && first + last <= exp_data_seg.pagesize)
+ && ((expld.dataseg.base & ~(expld.dataseg.pagesize - 1))
+ != (expld.dataseg.end & ~(expld.dataseg.pagesize - 1)))
+ && first + last <= expld.dataseg.pagesize)
{
- exp_data_seg.phase = exp_dataseg_adjust;
- lang_statement_iteration++;
- result = lang_size_sections_1 (s, output_section_statement, prev,
- fill, dot, relax, check_regions);
+ expld.dataseg.phase = exp_dataseg_adjust;
+ one_lang_size_sections_pass (relax, check_regions);
}
}
- /* Some backend relaxers want to refer to the output section size. Give
- them a section size that does not change on the next call while they
- relax. We can't set this at top because lang_reset_memory_regions
- which is called before we get here, sets _raw_size to 0 on relaxing
- rounds. */
- for (o = output_bfd->sections; o != NULL; o = o->next)
- o->_cooked_size = o->_raw_size;
-
- return result;
+ expld.phase = lang_final_phase_enum;
}
/* Worker function for lang_do_assignments. Recursiveness goes here. */
@@ -3346,54 +4627,48 @@ lang_do_assignments_1
lang_output_section_statement_type *os;
os = &(s->output_section_statement);
- if (os->bfd_section != NULL)
+ if (os->bfd_section != NULL && !os->ignored)
{
dot = os->bfd_section->vma;
lang_do_assignments_1 (os->children.head, os, os->fill, dot);
- dot = (os->bfd_section->vma
- + TO_ADDR (os->bfd_section->_raw_size));
-
+ /* .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)
+ if (os->bfd_section && !os->ignored)
{
os->bfd_section->lma
- = exp_get_abs_int (os->load_base, 0, "load base",
- lang_final_phase_enum);
+ = 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);
-
break;
case lang_object_symbols_statement_enum:
case lang_output_statement_enum:
case lang_target_statement_enum:
-#if 0
- case lang_common_statement_enum:
-#endif
break;
+
case lang_data_statement_enum:
- {
- etree_value_type value;
-
- value = exp_fold_tree (s->data_statement.exp,
- abs_output_section,
- lang_final_phase_enum, dot, &dot);
- if (!value.valid_p)
- einfo (_("%F%P: invalid data statement\n"));
- s->data_statement.value
- = value.value + value.section->bfd_section->vma;
- }
+ exp_fold_tree (s->data_statement.exp, bfd_abs_section_ptr, &dot);
+ if (expld.result.valid_p)
+ s->data_statement.value = (expld.result.value
+ + expld.result.section->vma);
+ else
+ einfo (_("%F%P: invalid data statement\n"));
{
unsigned int size;
switch (s->data_statement.type)
@@ -3421,16 +4696,12 @@ lang_do_assignments_1
break;
case lang_reloc_statement_enum:
- {
- etree_value_type value;
-
- value = exp_fold_tree (s->reloc_statement.addend_exp,
- abs_output_section,
- lang_final_phase_enum, dot, &dot);
- s->reloc_statement.addend_value = value.value;
- if (!value.valid_p)
- einfo (_("%F%P: invalid reloc statement\n"));
- }
+ exp_fold_tree (s->reloc_statement.addend_exp,
+ bfd_abs_section_ptr, &dot);
+ if (expld.result.valid_p)
+ s->reloc_statement.addend_value = expld.result.value;
+ else
+ einfo (_("%F%P: invalid reloc statement\n"));
dot += TO_ADDR (bfd_get_reloc_size (s->reloc_statement.howto));
break;
@@ -3438,28 +4709,24 @@ lang_do_assignments_1
{
asection *in = s->input_section.section;
- if (in->_cooked_size != 0)
- dot += TO_ADDR (in->_cooked_size);
- else
- dot += TO_ADDR (in->_raw_size);
+ if ((in->flags & SEC_EXCLUDE) == 0)
+ dot += TO_ADDR (in->size);
}
break;
case lang_input_statement_enum:
break;
+
case lang_fill_statement_enum:
fill = s->fill_statement.fill;
break;
- case lang_assignment_statement_enum:
- {
- exp_fold_tree (s->assignment_statement.exp,
- output_section_statement,
- lang_final_phase_enum,
- dot,
- &dot);
- }
+ case lang_assignment_statement_enum:
+ exp_fold_tree (s->assignment_statement.exp,
+ output_section_statement->bfd_section,
+ &dot);
break;
+
case lang_padding_statement_enum:
dot += TO_ADDR (s->padding_statement.size);
break;
@@ -3468,29 +4735,24 @@ lang_do_assignments_1
dot = lang_do_assignments_1 (s->group_statement.children.head,
output_section_statement,
fill, dot);
-
break;
default:
FAIL ();
break;
+
case lang_address_statement_enum:
break;
}
-
}
return dot;
}
void
-lang_do_assignments (lang_statement_union_type *s,
- lang_output_section_statement_type *output_section_statement,
- fill_type *fill,
- bfd_vma dot)
+lang_do_assignments (void)
{
- /* Callers of exp_fold_tree need to increment this. */
lang_statement_iteration++;
- lang_do_assignments_1 (s, output_section_statement, fill, dot);
+ lang_do_assignments_1 (statement_list.head, abs_output_section, NULL, 0);
}
/* Fix any .startof. or .sizeof. symbols. When the assemblers see the
@@ -3531,10 +4793,7 @@ lang_set_startof (void)
if (h != NULL && h->type == bfd_link_hash_undefined)
{
h->type = bfd_link_hash_defined;
- if (s->_cooked_size != 0)
- h->u.def.value = TO_ADDR (s->_cooked_size);
- else
- h->u.def.value = TO_ADDR (s->_raw_size);
+ h->u.def.value = TO_ADDR (s->size);
h->u.def.section = bfd_abs_section_ptr;
}
@@ -3543,7 +4802,7 @@ lang_set_startof (void)
}
static void
-lang_finish (void)
+lang_end (void)
{
struct bfd_link_hash_entry *h;
bfd_boolean warn;
@@ -3555,9 +4814,9 @@ lang_finish (void)
if (entry_symbol.name == NULL)
{
- /* No entry has been specified. Look for start, but don't warn
- if we don't find it. */
- entry_symbol.name = "start";
+ /* No entry has been specified. Look for the default entry, but
+ don't warn if we don't find it. */
+ entry_symbol.name = entry_symbol_default;
warn = FALSE;
}
@@ -3583,7 +4842,7 @@ lang_finish (void)
const char *send;
/* We couldn't find the entry symbol. Try parsing it as a
- number. */
+ number. */
val = bfd_scan_vma (entry_symbol.name, &send, 0);
if (*send == '\0')
{
@@ -3600,7 +4859,8 @@ lang_finish (void)
if (ts != NULL)
{
if (warn)
- einfo (_("%P: warning: cannot find entry symbol %s; defaulting to %V\n"),
+ einfo (_("%P: warning: cannot find entry symbol %s;"
+ " defaulting to %V\n"),
entry_symbol.name,
bfd_get_section_vma (output_bfd, ts));
if (! bfd_set_start_address (output_bfd,
@@ -3611,13 +4871,15 @@ lang_finish (void)
else
{
if (warn)
- einfo (_("%P: warning: cannot find entry symbol %s; not setting start address\n"),
+ einfo (_("%P: warning: cannot find entry symbol %s;"
+ " not setting start address\n"),
entry_symbol.name);
}
}
}
- bfd_hash_table_free (&lang_definedness_table);
+ /* Don't bfd_hash_table_free (&lang_definedness_table);
+ map file output may result in a call of lang_track_definedness. */
}
/* This is a small function used when we want to ignore errors from
@@ -3643,8 +4905,9 @@ lang_check (void)
for (file = file_chain.head; file != NULL; file = file->input_statement.next)
{
input_bfd = file->input_statement.the_bfd;
- compatible = bfd_arch_get_compatible (input_bfd, output_bfd,
- command_line.accept_unknown_input_arch);
+ compatible
+ = bfd_arch_get_compatible (input_bfd, output_bfd,
+ command_line.accept_unknown_input_arch);
/* In general it is not possible to perform a relocatable
link between differing object formats when the input
@@ -3657,7 +4920,8 @@ lang_check (void)
|| bfd_get_flavour (input_bfd) != bfd_get_flavour (output_bfd))
&& (bfd_get_file_flags (input_bfd) & HAS_RELOC) != 0)
{
- einfo (_("%P%F: Relocatable linking with relocations from format %s (%B) to format %s (%B) is not supported\n"),
+ einfo (_("%P%F: Relocatable linking with relocations from"
+ " format %s (%B) to format %s (%B) is not supported\n"),
bfd_get_target (input_bfd), input_bfd,
bfd_get_target (output_bfd), output_bfd);
/* einfo with %F exits. */
@@ -3666,7 +4930,8 @@ lang_check (void)
if (compatible == NULL)
{
if (command_line.warn_mismatch)
- einfo (_("%P: warning: %s architecture of input file `%B' is incompatible with %s output\n"),
+ einfo (_("%P: warning: %s architecture of input file `%B'"
+ " is incompatible with %s output\n"),
bfd_printable_name (input_bfd), input_bfd,
bfd_printable_name (output_bfd));
}
@@ -3678,17 +4943,17 @@ lang_check (void)
bfd_error_handler_type pfn = NULL;
/* If we aren't supposed to warn about mismatched input
- files, temporarily set the BFD error handler to a
- function which will do nothing. We still want to call
- bfd_merge_private_bfd_data, since it may set up
- information which is needed in the output file. */
+ files, temporarily set the BFD error handler to a
+ function which will do nothing. We still want to call
+ bfd_merge_private_bfd_data, since it may set up
+ information which is needed in the output file. */
if (! command_line.warn_mismatch)
pfn = bfd_set_error_handler (ignore_bfd_errors);
if (! bfd_merge_private_bfd_data (input_bfd, output_bfd))
{
if (command_line.warn_mismatch)
- einfo (_("%P%X: failed to merge target specific data of file %B\n"),
- input_bfd);
+ einfo (_("%P%X: failed to merge target specific data"
+ " of file %B\n"), input_bfd);
}
if (! command_line.warn_mismatch)
bfd_set_error_handler (pfn);
@@ -3742,8 +5007,8 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
section = h->u.c.p->section;
/* Increase the size of the section to align the common sym. */
- section->_cooked_size += ((bfd_vma) 1 << (power_of_two + opb_shift)) - 1;
- section->_cooked_size &= (- (bfd_vma) 1 << (power_of_two + opb_shift));
+ section->size += ((bfd_vma) 1 << (power_of_two + opb_shift)) - 1;
+ section->size &= (- (bfd_vma) 1 << (power_of_two + opb_shift));
/* Adjust the alignment if necessary. */
if (power_of_two > section->alignment_power)
@@ -3752,10 +5017,10 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
/* Change the symbol from common to defined. */
h->type = bfd_link_hash_defined;
h->u.def.section = section;
- h->u.def.value = section->_cooked_size;
+ h->u.def.value = section->size;
/* Increase the size of the section. */
- section->_cooked_size += size;
+ section->size += size;
/* Make sure the section is allocated in memory, and make sure that
it is no longer a common section. */
@@ -3828,12 +5093,12 @@ lang_place_orphans (void)
if (s->output_section == NULL)
{
/* This section of the file is not attached, root
- around for a sensible place for it to go. */
+ around for a sensible place for it to go. */
if (file->just_syms_flag)
- {
- abort ();
- }
+ bfd_link_just_syms (file->the_bfd, s, &link_info);
+ else if ((s->flags & SEC_EXCLUDE) != 0)
+ s->output_section = bfd_abs_section_ptr;
else if (strcmp (s->name, "COMMON") == 0)
{
/* This is a lonely common section which must have
@@ -3844,28 +5109,22 @@ lang_place_orphans (void)
{
if (default_common_section == NULL)
{
-#if 0
- /* This message happens when using the
- svr3.ifile linker script, so I have
- disabled it. */
- info_msg (_("%P: no [COMMON] command, defaulting to .bss\n"));
-#endif
default_common_section =
lang_output_section_statement_lookup (".bss");
}
lang_add_section (&default_common_section->children, s,
- default_common_section, file);
+ default_common_section);
}
}
- else if (ldemul_place_orphan (file, s))
+ else if (ldemul_place_orphan (s))
;
else
{
lang_output_section_statement_type *os;
os = lang_output_section_statement_lookup (s->name);
- lang_add_section (&os->children, s, os, file);
+ lang_add_section (&os->children, s, os);
}
}
}
@@ -4008,19 +5267,15 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
enum section_type sectype,
etree_type *align,
etree_type *subalign,
- etree_type *ebase)
+ etree_type *ebase,
+ int constraint)
{
lang_output_section_statement_type *os;
- current_section =
- os =
- lang_output_section_statement_lookup (output_section_statement_name);
+ os = lang_output_section_statement_lookup_1 (output_section_statement_name,
+ constraint);
+ current_section = os;
- /* Add this statement to tree. */
-#if 0
- add_statement (lang_output_section_statement_enum,
- output_section_statement);
-#endif
/* Make next things chain into subchain of this. */
if (os->addr_tree == NULL)
@@ -4036,9 +5291,9 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
stat_ptr = &os->children;
os->subsection_alignment =
- topower (exp_get_value_int (subalign, -1, "subsection alignment", 0));
+ topower (exp_get_value_int (subalign, -1, "subsection alignment"));
os->section_alignment =
- topower (exp_get_value_int (align, -1, "section alignment", 0));
+ topower (exp_get_value_int (align, -1, "section alignment"));
os->load_base = ebase;
return os;
@@ -4047,9 +5302,9 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
void
lang_final (void)
{
- lang_output_statement_type *new =
- new_stat (lang_output_statement, stat_ptr);
+ lang_output_statement_type *new;
+ new = new_stat (lang_output_statement, stat_ptr);
new->name = output_filename;
}
@@ -4060,6 +5315,7 @@ lang_reset_memory_regions (void)
{
lang_memory_region_type *p = lang_memory_region_list;
asection *o;
+ lang_output_section_statement_type *os;
for (p = lang_memory_region_list; p != NULL; p = p->next)
{
@@ -4067,12 +5323,20 @@ lang_reset_memory_regions (void)
p->current = p->origin;
}
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ os->processed = FALSE;
+
for (o = output_bfd->sections; o != NULL; o = o->next)
- o->_raw_size = 0;
+ {
+ /* Save the last size for possible use by bfd_relax_section. */
+ o->rawsize = o->size;
+ o->size = 0;
+ }
}
-/* If the wild pattern was marked KEEP, the member sections
- should be as well. */
+/* Worker for lang_gc_sections_1. */
static void
gc_section_callback (lang_wild_statement_type *ptr,
@@ -4081,18 +5345,12 @@ gc_section_callback (lang_wild_statement_type *ptr,
lang_input_statement_type *file ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
+ /* If the wild pattern was marked KEEP, the member sections
+ should be as well. */
if (ptr->keep_sections)
section->flags |= SEC_KEEP;
}
-/* Handle a wild statement, marking it against GC. */
-
-static void
-lang_gc_wild (lang_wild_statement_type *s)
-{
- walk_wild (s, gc_section_callback, NULL);
-}
-
/* Iterate over sections marking them against GC. */
static void
@@ -4103,7 +5361,7 @@ lang_gc_sections_1 (lang_statement_union_type *s)
switch (s->header.type)
{
case lang_wild_statement_enum:
- lang_gc_wild (&s->wild_statement);
+ walk_wild (&s->wild_statement, gc_section_callback, NULL);
break;
case lang_constructors_statement_enum:
lang_gc_sections_1 (constructor_list.head);
@@ -4147,13 +5405,58 @@ lang_gc_sections (void)
}
}
- bfd_gc_sections (output_bfd, &link_info);
+ /* SEC_EXCLUDE is ignored when doing a relocatable link, except in
+ the special case of debug info. (See bfd/stabs.c)
+ Twiddle the flag here, to simplify later linker code. */
+ if (link_info.relocatable)
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (f)
+ {
+ asection *sec;
+ for (sec = f->the_bfd->sections; sec != NULL; sec = sec->next)
+ if ((sec->flags & SEC_DEBUGGING) == 0)
+ sec->flags &= ~SEC_EXCLUDE;
+ }
+ }
+
+ if (link_info.gc_sections)
+ bfd_gc_sections (output_bfd, &link_info);
+}
+
+/* Relax all sections until bfd_relax_section gives up. */
+
+static void
+relax_sections (void)
+{
+ /* Keep relaxing until bfd_relax_section gives up. */
+ bfd_boolean relax_again;
+
+ do
+ {
+ relax_again = FALSE;
+
+ /* Note: pe-dll.c does something like this also. If you find
+ you need to change this code, you probably need to change
+ pe-dll.c also. DJ */
+
+ /* Do all the assignments with our current guesses as to
+ section sizes. */
+ lang_do_assignments ();
+
+ /* We must do this after lang_do_assignments, because it uses
+ size. */
+ lang_reset_memory_regions ();
+
+ /* Perform another relax pass - this time we know where the
+ globals are, so can make a better guess. */
+ lang_size_sections (&relax_again, FALSE);
+ }
+ while (relax_again);
}
void
lang_process (void)
{
- lang_reasonable_defaults ();
current_target = default_target;
/* Open the output file. */
@@ -4165,7 +5468,8 @@ lang_process (void)
/* Add to the hash table all undefineds on the command line. */
lang_place_undefineds ();
- already_linked_table_init ();
+ if (!bfd_section_already_linked_table_init ())
+ einfo (_("%P%F: Failed to create hash table\n"));
/* Create a bfd for each input file. */
current_target = default_target;
@@ -4177,7 +5481,7 @@ lang_process (void)
ldemul_after_open ();
- already_linked_table_free ();
+ bfd_section_already_linked_table_free ();
/* Make sure that we're not mixing architectures. We call this
after all the input files have been opened, but before we do any
@@ -4195,18 +5499,14 @@ lang_process (void)
ldctor_build_sets ();
/* Remove unreferenced sections if asked to. */
- if (command_line.gc_sections)
- lang_gc_sections ();
-
- /* If there were any SEC_MERGE sections, finish their merging, so that
- section sizes can be computed. This has to be done after GC of sections,
- so that GCed sections are not merged, but before assigning output
- sections, since removing whole input sections is hard then. */
- bfd_merge_sections (output_bfd, &link_info);
+ lang_gc_sections ();
/* Size up the common data. */
lang_common ();
+ /* Update wild statements. */
+ update_wild_statements (statement_list.head);
+
/* Run through the contours of the script and attach input sections
to the correct output sections. */
map_input_to_output_sections (statement_list.head, NULL, NULL);
@@ -4216,8 +5516,16 @@ lang_process (void)
if (! link_info.relocatable)
{
+ asection *found;
+
+ /* Merge SEC_MERGE sections. This has to be done after GC of
+ sections, so that GCed sections are not merged, but before
+ assigning dynamic symbols, since removing whole input sections
+ is hard then. */
+ bfd_merge_sections (output_bfd, &link_info);
+
/* Look for a text section and set the readonly attribute in it. */
- asection *found = bfd_get_section_by_name (output_bfd, ".text");
+ found = bfd_get_section_by_name (output_bfd, ".text");
if (found != NULL)
{
@@ -4232,61 +5540,32 @@ lang_process (void)
and other back-ends size dynamic sections. */
ldemul_before_allocation ();
- if (!link_info.relocatable)
- strip_excluded_output_sections ();
-
/* We must record the program headers before we try to fix the
section positions, since they will affect SIZEOF_HEADERS. */
lang_record_phdrs ();
/* Size up the sections. */
- lang_size_sections (statement_list.head, abs_output_section,
- &statement_list.head, 0, 0, NULL,
- command_line.relax ? FALSE : TRUE);
+ lang_size_sections (NULL, !command_line.relax);
/* Now run around and relax if we can. */
if (command_line.relax)
{
- /* Keep relaxing until bfd_relax_section gives up. */
- bfd_boolean relax_again;
-
- do
- {
- relax_again = FALSE;
+ /* We may need more than one relaxation pass. */
+ int i = link_info.relax_pass;
- /* Note: pe-dll.c does something like this also. If you find
- you need to change this code, you probably need to change
- pe-dll.c also. DJ */
+ /* The backend can use it to determine the current pass. */
+ link_info.relax_pass = 0;
- /* Do all the assignments with our current guesses as to
- section sizes. */
- lang_do_assignments (statement_list.head, abs_output_section,
- NULL, 0);
-
- /* We must do this after lang_do_assignments, because it uses
- _raw_size. */
- lang_reset_memory_regions ();
-
- /* Perform another relax pass - this time we know where the
- globals are, so can make a better guess. */
- lang_size_sections (statement_list.head, abs_output_section,
- &statement_list.head, 0, 0, &relax_again, FALSE);
-
- /* If the normal relax is done and the relax finalize pass
- is not performed yet, we perform another relax pass. */
- if (!relax_again && link_info.need_relax_finalize)
- {
- link_info.need_relax_finalize = FALSE;
- relax_again = TRUE;
- }
+ while (i--)
+ {
+ relax_sections ();
+ link_info.relax_pass++;
}
- while (relax_again);
/* Final extra sizing to report errors. */
- lang_do_assignments (statement_list.head, abs_output_section, NULL, 0);
+ lang_do_assignments ();
lang_reset_memory_regions ();
- lang_size_sections (statement_list.head, abs_output_section,
- &statement_list.head, 0, 0, NULL, TRUE);
+ lang_size_sections (NULL, TRUE);
}
/* See if anything special should be done now we know how big
@@ -4299,7 +5578,7 @@ lang_process (void)
/* Do all the assignments, now that we know the final resting places
of all the symbols. */
- lang_do_assignments (statement_list.head, abs_output_section, NULL, 0);
+ lang_do_assignments ();
/* Make sure that the section addresses make sense. */
if (! link_info.relocatable
@@ -4307,9 +5586,8 @@ lang_process (void)
lang_check_section_addresses ();
/* Final stuffs. */
-
ldemul_finish ();
- lang_finish ();
+ lang_end ();
}
/* EXPORTED TO YACC */
@@ -4348,21 +5626,24 @@ lang_add_wild (struct wildcard_spec *filespec,
if (filespec != NULL)
{
new->filename = filespec->name;
- new->filenames_sorted = filespec->sorted;
+ new->filenames_sorted = filespec->sorted == by_name;
}
new->section_list = section_list;
new->keep_sections = keep_sections;
lang_list_init (&new->children);
+ analyze_walk_wild_section_handler (new);
}
void
-lang_section_start (const char *name, etree_type *address)
+lang_section_start (const char *name, etree_type *address,
+ const segment_type *segment)
{
lang_address_statement_type *ad;
ad = new_stat (lang_address_statement, stat_ptr);
ad->section_name = name;
ad->address = address;
+ ad->segment = segment;
}
/* Set the start symbol to NAME. CMDLINE is nonzero if this is called
@@ -4382,14 +5663,23 @@ lang_add_entry (const char *name, bfd_boolean cmdline)
}
}
+/* Set the default start symbol to NAME. .em files should use this,
+ not lang_add_entry, to override the use of "start" if neither the
+ linker script nor the command line specifies an entry point. NAME
+ must be permanently allocated. */
+void
+lang_default_entry (const char *name)
+{
+ entry_symbol_default = name;
+}
+
void
lang_add_target (const char *name)
{
- lang_target_statement_type *new = new_stat (lang_target_statement,
- stat_ptr);
+ lang_target_statement_type *new;
+ new = new_stat (lang_target_statement, stat_ptr);
new->target = name;
-
}
void
@@ -4410,22 +5700,20 @@ lang_add_map (const char *name)
void
lang_add_fill (fill_type *fill)
{
- lang_fill_statement_type *new = new_stat (lang_fill_statement,
- stat_ptr);
+ lang_fill_statement_type *new;
+ new = new_stat (lang_fill_statement, stat_ptr);
new->fill = fill;
}
void
lang_add_data (int type, union etree_union *exp)
{
+ lang_data_statement_type *new;
- lang_data_statement_type *new = new_stat (lang_data_statement,
- stat_ptr);
-
+ new = new_stat (lang_data_statement, stat_ptr);
new->exp = exp;
new->type = type;
-
}
/* Create a new reloc statement. RELOC is the BFD relocation type to
@@ -4452,15 +5740,15 @@ lang_add_reloc (bfd_reloc_code_real_type reloc,
p->addend_value = 0;
p->output_section = NULL;
- p->output_vma = 0;
+ p->output_offset = 0;
}
lang_assignment_statement_type *
lang_add_assignment (etree_type *exp)
{
- lang_assignment_statement_type *new = new_stat (lang_assignment_statement,
- stat_ptr);
+ lang_assignment_statement_type *new;
+ new = new_stat (lang_assignment_statement, stat_ptr);
new->exp = exp;
return new;
}
@@ -4468,7 +5756,7 @@ lang_add_assignment (etree_type *exp)
void
lang_add_attribute (enum statement_enum attribute)
{
- new_statement (attribute, sizeof (lang_statement_union_type), stat_ptr);
+ new_statement (attribute, sizeof (lang_statement_header_type), stat_ptr);
}
void
@@ -4476,7 +5764,7 @@ lang_startup (const char *name)
{
if (startup_file != NULL)
{
- einfo (_("%P%Fmultiple STARTUP files\n"));
+ einfo (_("%P%F: multiple STARTUP files\n"));
}
first_file->filename = name;
first_file->local_sym_name = name;
@@ -4513,8 +5801,9 @@ lang_get_regions (lang_memory_region_type **region,
{
*lma_region = lang_memory_region_lookup (lma_memspec, FALSE);
- /* If no runtime region or VMA has been specified, but the load region has
- been specified, then use the load region for the runtime region as well. */
+ /* If no runtime region or VMA has been specified, but the load region
+ has been specified, then use the load region for the runtime region
+ as well. */
if (lma_memspec != NULL
&& ! have_vma
&& strcmp (memspec, DEFAULT_MEMORY_REGION) == 0)
@@ -4598,7 +5887,7 @@ lang_abs_symbol_at_end_of (const char *secname, const char *name)
h->u.def.value = 0;
else
h->u.def.value = (bfd_get_section_vma (output_bfd, sec)
- + TO_ADDR (bfd_section_size (output_bfd, sec)));
+ + TO_ADDR (sec->size));
h->u.def.section = bfd_abs_section_ptr;
}
@@ -4674,8 +5963,7 @@ lang_new_phdr (const char *name,
n = stat_alloc (sizeof (struct lang_phdr));
n->next = NULL;
n->name = name;
- n->type = exp_get_value_int (type, 0, "program header type",
- lang_final_phase_enum);
+ n->type = exp_get_value_int (type, 0, "program header type");
n->filehdr = filehdr;
n->phdrs = phdrs;
n->at = at;
@@ -4696,7 +5984,7 @@ lang_record_phdrs (void)
asection **secs;
lang_output_section_phdr_list *last;
struct lang_phdr *l;
- lang_statement_union_type *u;
+ lang_output_section_statement_type *os;
alc = 10;
secs = xmalloc (alc * sizeof (asection *));
@@ -4708,14 +5996,14 @@ lang_record_phdrs (void)
bfd_vma at;
c = 0;
- for (u = lang_output_section_statement.head;
- u != NULL;
- u = u->output_section_statement.next)
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
{
- lang_output_section_statement_type *os;
lang_output_section_phdr_list *pl;
- os = &u->output_section_statement;
+ if (os->constraint == -1)
+ continue;
pl = os->phdrs;
if (pl != NULL)
@@ -4751,14 +6039,12 @@ lang_record_phdrs (void)
if (l->flags == NULL)
flags = 0;
else
- flags = exp_get_vma (l->flags, 0, "phdr flags",
- lang_final_phase_enum);
+ flags = exp_get_vma (l->flags, 0, "phdr flags");
if (l->at == NULL)
at = 0;
else
- at = exp_get_vma (l->at, 0, "phdr load address",
- lang_final_phase_enum);
+ at = exp_get_vma (l->at, 0, "phdr load address");
if (! bfd_record_phdr (output_bfd, l->type,
l->flags != NULL, flags, l->at != NULL,
@@ -4769,21 +6055,22 @@ lang_record_phdrs (void)
free (secs);
/* Make sure all the phdr assignments succeeded. */
- for (u = lang_output_section_statement.head;
- u != NULL;
- u = u->output_section_statement.next)
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
{
lang_output_section_phdr_list *pl;
- if (u->output_section_statement.bfd_section == NULL)
+ if (os->constraint == -1
+ || os->bfd_section == NULL)
continue;
- for (pl = u->output_section_statement.phdrs;
+ for (pl = os->phdrs;
pl != NULL;
pl = pl->next)
if (! pl->used && strcmp (pl->name, "NONE") != 0)
einfo (_("%X%P: section `%s' assigned to non-existent phdr `%s'\n"),
- u->output_section_statement.name, pl->name);
+ os->name, pl->name);
}
}
@@ -4847,7 +6134,7 @@ lang_enter_overlay_section (const char *name)
etree_type *size;
lang_enter_output_section_statement (name, overlay_vma, normal_section,
- 0, overlay_subalign, 0);
+ 0, overlay_subalign, 0, 0);
/* If this is the first section, then base the VMA of future
sections on this one. This will work correctly even if `.' is
@@ -5036,8 +6323,8 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
while (expr && strcmp (expr->symbol, sym) == 0)
if (expr->mask == BFD_ELF_VERSION_C_TYPE)
goto out_ret;
- else
- expr = expr->next;
+ else
+ expr = expr->next;
}
/* Fallthrough */
case BFD_ELF_VERSION_C_TYPE:
@@ -5048,8 +6335,8 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
while (expr && strcmp (expr->symbol, cxx_sym) == 0)
if (expr->mask == BFD_ELF_VERSION_CXX_TYPE)
goto out_ret;
- else
- expr = expr->next;
+ else
+ expr = expr->next;
}
/* Fallthrough */
case BFD_ELF_VERSION_CXX_TYPE:
@@ -5060,8 +6347,8 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
while (expr && strcmp (expr->symbol, java_sym) == 0)
if (expr->mask == BFD_ELF_VERSION_JAVA_TYPE)
goto out_ret;
- else
- expr = expr->next;
+ else
+ expr = expr->next;
}
/* Fallthrough */
default:
@@ -5074,10 +6361,13 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
expr = head->remaining;
else
expr = prev->next;
- while (expr)
+ for (; expr; expr = expr->next)
{
const char *s;
+ if (!expr->pattern)
+ continue;
+
if (expr->pattern[0] == '*' && expr->pattern[1] == '\0')
break;
@@ -5089,7 +6379,6 @@ lang_vers_match (struct bfd_elf_version_expr_head *head,
s = sym;
if (fnmatch (expr->pattern, s, 0) == 0)
break;
- expr = expr->next;
}
out_ret:
@@ -5144,21 +6433,24 @@ realsymbol (const char *pattern)
}
}
-/* This is called for each variable name or match expression. */
+/* This is called for each variable name or match expression. NEW is
+ the name of the symbol to match, or, if LITERAL_P is FALSE, a glob
+ pattern to be matched against symbol names. */
struct bfd_elf_version_expr *
lang_new_vers_pattern (struct bfd_elf_version_expr *orig,
const char *new,
- const char *lang)
+ const char *lang,
+ bfd_boolean literal_p)
{
struct bfd_elf_version_expr *ret;
ret = xmalloc (sizeof *ret);
ret->next = orig;
- ret->pattern = new;
+ ret->pattern = literal_p ? NULL : new;
ret->symver = 0;
ret->script = 0;
- ret->symbol = realsymbol (new);
+ ret->symbol = literal_p ? new : realsymbol (new);
if (lang == NULL || strcasecmp (lang, "C") == 0)
ret->mask = BFD_ELF_VERSION_C_TYPE;
@@ -5310,7 +6602,8 @@ lang_register_vers_node (const char *name,
if ((name[0] == '\0' && lang_elf_version_info != NULL)
|| (lang_elf_version_info && lang_elf_version_info->name[0] == '\0'))
{
- einfo (_("%X%P: anonymous version tag cannot be combined with other version tags\n"));
+ einfo (_("%X%P: anonymous version tag cannot be combined"
+ " with other version tags\n"));
free (version);
return;
}
@@ -5338,16 +6631,17 @@ lang_register_vers_node (const char *name,
while (e2 && strcmp (e1->symbol, e2->symbol) == 0)
{
if (e1->mask == e2->mask)
- einfo (_("%X%P: duplicate expression `%s' in version information\n"),
- e1->symbol);
+ einfo (_("%X%P: duplicate expression `%s'"
+ " in version information\n"), e1->symbol);
e2 = e2->next;
}
}
else if (!e1->symbol)
for (e2 = t->locals.remaining; e2 != NULL; e2 = e2->next)
- if (strcmp (e1->pattern, e2->pattern) == 0 && e1->mask == e2->mask)
- einfo (_("%X%P: duplicate expression `%s' in version information\n"),
- e1->pattern);
+ if (strcmp (e1->pattern, e2->pattern) == 0
+ && e1->mask == e2->mask)
+ einfo (_("%X%P: duplicate expression `%s'"
+ " in version information\n"), e1->pattern);
}
}
@@ -5363,16 +6657,18 @@ lang_register_vers_node (const char *name,
while (e2 && strcmp (e1->symbol, e2->symbol) == 0)
{
if (e1->mask == e2->mask)
- einfo (_("%X%P: duplicate expression `%s' in version information\n"),
+ einfo (_("%X%P: duplicate expression `%s'"
+ " in version information\n"),
e1->symbol);
e2 = e2->next;
}
}
else if (!e1->symbol)
for (e2 = t->globals.remaining; e2 != NULL; e2 = e2->next)
- if (strcmp (e1->pattern, e2->pattern) == 0 && e1->mask == e2->mask)
- einfo (_("%X%P: duplicate expression `%s' in version information\n"),
- e1->pattern);
+ if (strcmp (e1->pattern, e2->pattern) == 0
+ && e1->mask == e2->mask)
+ einfo (_("%X%P: duplicate expression `%s'"
+ " in version information\n"), e1->pattern);
}
}
@@ -5430,7 +6726,7 @@ lang_do_version_exports_section (void)
if (sec == NULL)
continue;
- len = bfd_section_size (is->the_bfd, sec);
+ len = sec->size;
contents = xmalloc (len);
if (!bfd_get_section_contents (is->the_bfd, sec, contents, 0, len))
einfo (_("%X%P: unable to read .exports section contents\n"), sec);
@@ -5438,18 +6734,17 @@ lang_do_version_exports_section (void)
p = contents;
while (p < contents + len)
{
- greg = lang_new_vers_pattern (greg, p, NULL);
+ greg = lang_new_vers_pattern (greg, p, NULL, FALSE);
p = strchr (p, '\0') + 1;
}
/* Do not free the contents, as we used them creating the regex. */
/* Do not include this section in the link. */
- bfd_set_section_flags (is->the_bfd, sec,
- bfd_get_section_flags (is->the_bfd, sec) | SEC_EXCLUDE);
+ sec->flags |= SEC_EXCLUDE;
}
- lreg = lang_new_vers_pattern (NULL, "*", NULL);
+ lreg = lang_new_vers_pattern (NULL, "*", NULL, FALSE);
lang_register_vers_node (command_line.version_exports_section,
lang_new_vers_node (greg, lreg), NULL);
}
diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h
index 649fea16cc4c..8b0d492ed096 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
+ 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LDLANG_H
#define LDLANG_H
@@ -128,25 +128,15 @@ typedef struct lang_output_section_phdr_list
typedef struct lang_output_section_statement_struct
{
lang_statement_header_type header;
- union etree_union *addr_tree;
lang_statement_list_type children;
- const char *memspec;
- union lang_statement_union *next;
+ struct lang_output_section_statement_struct *next;
+ struct lang_output_section_statement_struct *prev;
const char *name;
-
- int processed;
-
asection *bfd_section;
- flagword flags; /* Or together of all input sections. */
- enum section_type sectype;
lang_memory_region_type *region;
lang_memory_region_type *lma_region;
- size_t block_value;
fill_type *fill;
-
- int subsection_alignment; /* Alignment of components. */
- int section_alignment; /* Alignment of start of section. */
-
+ union etree_union *addr_tree;
union etree_union *load_base;
/* If non-null, an expression to evaluate after setting the section's
@@ -156,6 +146,16 @@ typedef struct lang_output_section_statement_struct
union etree_union *update_dot_tree;
lang_output_section_phdr_list *phdrs;
+
+ unsigned int block_value;
+ int subsection_alignment; /* Alignment of components. */
+ int section_alignment; /* Alignment of start of section. */
+ int constraint;
+ flagword flags;
+ enum section_type sectype;
+ unsigned int processed : 1;
+ unsigned int all_input_readonly : 1;
+ unsigned int ignored : 1;
} lang_output_section_statement_type;
typedef struct
@@ -183,7 +183,7 @@ typedef struct
union etree_union *exp;
bfd_vma value;
asection *output_section;
- bfd_vma output_vma;
+ bfd_vma output_offset;
} lang_data_statement_type;
/* Generate a reloc in the output file. */
@@ -215,8 +215,8 @@ typedef struct
/* Output section where reloc should be performed. */
asection *output_section;
- /* VMA within output section. */
- bfd_vma output_vma;
+ /* Offset within output section. */
+ bfd_vma output_offset;
} lang_reloc_statement_type;
typedef struct lang_input_statement_struct
@@ -231,7 +231,6 @@ typedef struct lang_input_statement_struct
bfd *the_bfd;
- bfd_boolean closed;
file_ptr passive_position;
/* Symbol table of the file. */
@@ -245,47 +244,48 @@ typedef struct lang_input_statement_struct
/* Point to the next file, but skips archive contents. */
union lang_statement_union *next_real_file;
- bfd_boolean is_archive;
+ const char *target;
+
+ unsigned int closed : 1;
+ unsigned int is_archive : 1;
/* 1 means search a set of directories for this file. */
- bfd_boolean search_dirs_flag;
+ unsigned int search_dirs_flag : 1;
/* 1 means this was found in a search directory marked as sysrooted,
if search_dirs_flag is false, otherwise, that it should be
searched in ld_sysroot before any other location, as long as it
starts with a slash. */
- bfd_boolean sysrooted;
+ unsigned int sysrooted : 1;
/* 1 means this is base file of incremental load.
Do not load this file's text or data.
Also default text_start to after this file's bss. */
- bfd_boolean just_syms_flag;
+ unsigned int just_syms_flag : 1;
/* Whether to search for this entry as a dynamic archive. */
- bfd_boolean dynamic;
+ unsigned int dynamic : 1;
+
+ /* Whether DT_NEEDED tags should be added for dynamic libraries in
+ DT_NEEDED tags from this entry. */
+ unsigned int add_needed : 1;
/* Whether this entry should cause a DT_NEEDED tag only when
satisfying references from regular files, or always. */
- bfd_boolean as_needed;
+ unsigned int as_needed : 1;
/* Whether to include the entire contents of an archive. */
- bfd_boolean whole_archive;
+ unsigned int whole_archive : 1;
- bfd_boolean loaded;
+ unsigned int loaded : 1;
-#if 0
- unsigned int globals_in_this_file;
-#endif
- const char *target;
- bfd_boolean real;
+ unsigned int real : 1;
} lang_input_statement_type;
typedef struct
{
lang_statement_header_type header;
asection *section;
- lang_input_statement_type *ifile;
-
} lang_input_section_type;
typedef struct
@@ -295,7 +295,20 @@ typedef struct
union lang_statement_union *file;
} lang_afile_asection_pair_statement_type;
-typedef struct lang_wild_statement_struct
+typedef struct lang_wild_statement_struct lang_wild_statement_type;
+
+typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
+ asection *, lang_input_statement_type *, void *);
+
+typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
+ lang_input_statement_type *,
+ callback_t callback,
+ void *data);
+
+typedef bfd_boolean (*lang_match_sec_type_func) (bfd *, const asection *,
+ bfd *, const asection *);
+
+struct lang_wild_statement_struct
{
lang_statement_header_type header;
const char *filename;
@@ -303,13 +316,17 @@ typedef struct lang_wild_statement_struct
struct wildcard_list *section_list;
bfd_boolean keep_sections;
lang_statement_list_type children;
-} lang_wild_statement_type;
+
+ walk_wild_section_handler_t walk_wild_section_handler;
+ struct wildcard_list *handler_data[4];
+};
typedef struct lang_address_statement_struct
{
lang_statement_header_type header;
const char *section_name;
union etree_union *address;
+ const segment_type *segment;
} lang_address_statement_type;
typedef struct
@@ -404,7 +421,16 @@ struct lang_definedness_hash_entry
int iteration;
};
-extern struct unique_sections *unique_section_list;
+/* Used by place_orphan to keep track of orphan sections and statements. */
+
+struct orphan_save {
+ const char *name;
+ flagword flags;
+ lang_output_section_statement_type *os;
+ asection **section;
+ lang_statement_union_type **stmt;
+ lang_output_section_statement_type **os_tail;
+};
extern lang_output_section_statement_type *abs_output_section;
extern lang_statement_list_type lang_output_section_statement;
@@ -422,6 +448,8 @@ extern int lang_statement_iteration;
extern void lang_init
(void);
+extern void lang_finish
+ (void);
extern lang_memory_region_type *lang_memory_region_lookup
(const char *const, bfd_boolean);
extern lang_memory_region_type *lang_memory_region_default
@@ -438,15 +466,17 @@ extern lang_output_section_statement_type *lang_enter_output_section_statement
enum section_type sectype,
etree_type *align,
etree_type *subalign,
- etree_type *);
+ etree_type *, int);
extern void lang_final
(void);
extern void lang_process
(void);
extern void lang_section_start
- (const char *, union etree_union *);
+ (const char *, union etree_union *, const segment_type *);
extern void lang_add_entry
(const char *, bfd_boolean);
+extern void lang_default_entry
+ (const char *);
extern void lang_add_target
(const char *);
extern void lang_add_wild
@@ -480,8 +510,7 @@ extern void lang_for_each_file
extern void lang_reset_memory_regions
(void);
extern void lang_do_assignments
- (lang_statement_union_type *, lang_output_section_statement_type *,
- fill_type *, bfd_vma);
+ (void);
#define LANG_FOR_EACH_INPUT_STATEMENT(statement) \
lang_input_statement_type *statement; \
@@ -495,6 +524,12 @@ extern void ldlang_add_file
(lang_input_statement_type *);
extern lang_output_section_statement_type *lang_output_section_find
(const char * const);
+extern lang_output_section_statement_type *lang_output_section_find_by_flags
+ (const asection *, lang_output_section_statement_type **,
+ lang_match_sec_type_func);
+extern lang_output_section_statement_type *lang_insert_orphan
+ (asection *, const char *, lang_output_section_statement_type *,
+ struct orphan_save *, etree_type *, lang_statement_list_type *);
extern lang_input_statement_type *lang_add_input_file
(const char *, lang_input_file_enum_type, const char *);
extern void lang_add_keepsyms_file
@@ -517,19 +552,21 @@ extern void lang_for_each_statement
(void (*) (lang_statement_union_type *));
extern void *stat_alloc
(size_t);
+extern void strip_excluded_output_sections
+ (void);
extern void dprint_statement
(lang_statement_union_type *, int);
-extern bfd_vma lang_size_sections
- (lang_statement_union_type *, lang_output_section_statement_type *,
- lang_statement_union_type **, fill_type *, bfd_vma, bfd_boolean *,
- bfd_boolean);
+extern void lang_size_sections
+ (bfd_boolean *, bfd_boolean);
+extern void one_lang_size_sections_pass
+ (bfd_boolean *, bfd_boolean);
extern void lang_enter_group
(void);
extern void lang_leave_group
(void);
extern void lang_add_section
(lang_statement_list_type *, asection *,
- lang_output_section_statement_type *, lang_input_statement_type *);
+ lang_output_section_statement_type *);
extern void lang_new_phdr
(const char *, etree_type *, bfd_boolean, bfd_boolean, etree_type *,
etree_type *);
@@ -548,7 +585,7 @@ extern void lang_leave_overlay
extern struct bfd_elf_version_tree *lang_elf_version_info;
extern struct bfd_elf_version_expr *lang_new_vers_pattern
- (struct bfd_elf_version_expr *, const char *, const char *);
+ (struct bfd_elf_version_expr *, const char *, const char *, bfd_boolean);
extern struct bfd_elf_version_tree *lang_new_vers_node
(struct bfd_elf_version_expr *, struct bfd_elf_version_expr *);
extern struct bfd_elf_version_deps *lang_add_vers_depend
@@ -556,7 +593,7 @@ extern struct bfd_elf_version_deps *lang_add_vers_depend
extern void lang_register_vers_node
(const char *, struct bfd_elf_version_tree *, struct bfd_elf_version_deps *);
bfd_boolean unique_section_p
- (const char *);
+ (const asection *);
extern void lang_add_unique
(const char *);
extern const char *lang_get_output_target
@@ -566,4 +603,6 @@ extern int lang_symbol_definition_iteration (const char *);
extern void lang_update_definedness
(const char *, struct bfd_link_hash_entry *);
+extern void add_excluded_libs (const char *);
+
#endif
diff --git a/contrib/binutils/ld/ldlex.h b/contrib/binutils/ld/ldlex.h
index f956e9c32e0e..d35ead6a6489 100644
--- a/contrib/binutils/ld/ldlex.h
+++ b/contrib/binutils/ld/ldlex.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LDLEX_H
#define LDLEX_H
diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l
index aeac817c84f0..56ec39164b46 100644
--- a/contrib/binutils/ld/ldlex.l
+++ b/contrib/binutils/ld/ldlex.l
@@ -1,24 +1,24 @@
%{
/* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-This file is part of GLD, the Gnu Linker.
+ 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 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.
+ GLD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+ 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. */
/*
This was written by steve chamberlain
@@ -28,11 +28,6 @@ This was written by steve chamberlain
#include <stdio.h>
-#ifdef MPW
-/* Prevent enum redefinition problems. */
-#define TRUE_FALSE_ALREADY_DEFINED
-#endif /* MPW */
-
#include "bfd.h"
#include "sysdep.h"
#include "safe-ctype.h"
@@ -70,6 +65,8 @@ const char *lex_string = NULL;
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) yy_input (buf, &result, max_size)
+#define YY_NO_UNPUT
+
#define MAX_INCLUDE_DEPTH 10
static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
static const char *file_name_stack[MAX_INCLUDE_DEPTH];
@@ -239,88 +236,97 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<BOTH,SCRIPT,EXPRESSION,MRI>"/" { RTOKEN('/');}
<BOTH,SCRIPT,EXPRESSION,MRI>"%" { RTOKEN('%');}
<BOTH,SCRIPT,EXPRESSION,MRI>"<" { RTOKEN('<');}
-<BOTH,SCRIPT,EXPRESSION,MRI>"=" { RTOKEN('=');}
-<BOTH,SCRIPT,EXPRESSION,MRI>"}" { RTOKEN('}') ; }
-<BOTH,SCRIPT,EXPRESSION,MRI>"{" { RTOKEN('{'); }
-<BOTH,SCRIPT,EXPRESSION,MRI>")" { RTOKEN(')');}
-<BOTH,SCRIPT,EXPRESSION,MRI>"(" { RTOKEN('(');}
+<BOTH,SCRIPT,EXPRESSION,MRI>"=" { RTOKEN('=');}
+<BOTH,SCRIPT,EXPRESSION,MRI>"}" { RTOKEN('}') ; }
+<BOTH,SCRIPT,EXPRESSION,MRI>"{" { RTOKEN('{'); }
+<BOTH,SCRIPT,EXPRESSION,MRI>")" { RTOKEN(')');}
+<BOTH,SCRIPT,EXPRESSION,MRI>"(" { RTOKEN('(');}
<BOTH,SCRIPT,EXPRESSION,MRI>":" { RTOKEN(':'); }
<BOTH,SCRIPT,EXPRESSION,MRI>";" { RTOKEN(';');}
-<BOTH,SCRIPT>"MEMORY" { RTOKEN(MEMORY);}
-<BOTH,SCRIPT>"ORIGIN" { RTOKEN(ORIGIN);}
-<BOTH,SCRIPT>"VERSION" { RTOKEN(VERSIONK);}
+<BOTH,SCRIPT>"MEMORY" { RTOKEN(MEMORY);}
+<BOTH,SCRIPT,EXPRESSION>"ORIGIN" { RTOKEN(ORIGIN);}
+<BOTH,SCRIPT>"VERSION" { RTOKEN(VERSIONK);}
<EXPRESSION,BOTH,SCRIPT>"BLOCK" { RTOKEN(BLOCK);}
<EXPRESSION,BOTH,SCRIPT>"BIND" { RTOKEN(BIND);}
-<BOTH,SCRIPT>"LENGTH" { RTOKEN(LENGTH);}
-<EXPRESSION,BOTH,SCRIPT>"ALIGN" { RTOKEN(ALIGN_K);}
+<BOTH,SCRIPT,EXPRESSION>"LENGTH" { RTOKEN(LENGTH);}
+<EXPRESSION,BOTH,SCRIPT>"ALIGN" { RTOKEN(ALIGN_K);}
<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_ALIGN" { RTOKEN(DATA_SEGMENT_ALIGN);}
+<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_RELRO_END" { RTOKEN(DATA_SEGMENT_RELRO_END);}
<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>"ADDR" { RTOKEN(ADDR);}
+<EXPRESSION,BOTH,SCRIPT>"LOADADDR" { RTOKEN(LOADADDR);}
<EXPRESSION,BOTH>"MAX" { RTOKEN(MAX_K); }
<EXPRESSION,BOTH>"MIN" { RTOKEN(MIN_K); }
<EXPRESSION,BOTH>"ASSERT" { RTOKEN(ASSERT_K); }
<BOTH,SCRIPT>"ENTRY" { RTOKEN(ENTRY);}
<BOTH,SCRIPT,MRI>"EXTERN" { RTOKEN(EXTERN);}
-<EXPRESSION,BOTH,SCRIPT>"NEXT" { RTOKEN(NEXT);}
+<EXPRESSION,BOTH,SCRIPT>"NEXT" { RTOKEN(NEXT);}
<EXPRESSION,BOTH,SCRIPT>"sizeof_headers" { RTOKEN(SIZEOF_HEADERS);}
<EXPRESSION,BOTH,SCRIPT>"SIZEOF_HEADERS" { RTOKEN(SIZEOF_HEADERS);}
+<EXPRESSION,BOTH,SCRIPT>"SEGMENT_START" { RTOKEN(SEGMENT_START);}
<BOTH,SCRIPT>"MAP" { RTOKEN(MAP);}
-<EXPRESSION,BOTH,SCRIPT>"SIZEOF" { RTOKEN(SIZEOF);}
-<BOTH,SCRIPT>"TARGET" { RTOKEN(TARGET_K);}
+<EXPRESSION,BOTH,SCRIPT>"SIZEOF" { RTOKEN(SIZEOF);}
+<BOTH,SCRIPT>"TARGET" { RTOKEN(TARGET_K);}
<BOTH,SCRIPT>"SEARCH_DIR" { RTOKEN(SEARCH_DIR);}
-<BOTH,SCRIPT>"OUTPUT" { RTOKEN(OUTPUT);}
+<BOTH,SCRIPT>"OUTPUT" { RTOKEN(OUTPUT);}
<BOTH,SCRIPT>"INPUT" { RTOKEN(INPUT);}
<EXPRESSION,BOTH,SCRIPT>"GROUP" { RTOKEN(GROUP);}
-<EXPRESSION,BOTH,SCRIPT>"DEFINED" { RTOKEN(DEFINED);}
+<EXPRESSION,BOTH,SCRIPT>"AS_NEEDED" { RTOKEN(AS_NEEDED);}
+<EXPRESSION,BOTH,SCRIPT>"DEFINED" { RTOKEN(DEFINED);}
<BOTH,SCRIPT>"CREATE_OBJECT_SYMBOLS" { RTOKEN(CREATE_OBJECT_SYMBOLS);}
<BOTH,SCRIPT>"CONSTRUCTORS" { RTOKEN( CONSTRUCTORS);}
-<BOTH,SCRIPT>"FORCE_COMMON_ALLOCATION" { RTOKEN(FORCE_COMMON_ALLOCATION);}
+<BOTH,SCRIPT>"FORCE_COMMON_ALLOCATION" { RTOKEN(FORCE_COMMON_ALLOCATION);}
<BOTH,SCRIPT>"INHIBIT_COMMON_ALLOCATION" { RTOKEN(INHIBIT_COMMON_ALLOCATION);}
-<BOTH,SCRIPT>"SECTIONS" { RTOKEN(SECTIONS);}
+<BOTH,SCRIPT>"SECTIONS" { RTOKEN(SECTIONS);}
<BOTH,SCRIPT>"FILL" { RTOKEN(FILL);}
-<BOTH,SCRIPT>"STARTUP" { RTOKEN(STARTUP);}
+<BOTH,SCRIPT>"STARTUP" { RTOKEN(STARTUP);}
<BOTH,SCRIPT>"OUTPUT_FORMAT" { RTOKEN(OUTPUT_FORMAT);}
<BOTH,SCRIPT>"OUTPUT_ARCH" { RTOKEN( OUTPUT_ARCH);}
<BOTH,SCRIPT>"HLL" { RTOKEN(HLL);}
-<BOTH,SCRIPT>"SYSLIB" { RTOKEN(SYSLIB);}
+<BOTH,SCRIPT>"SYSLIB" { RTOKEN(SYSLIB);}
<BOTH,SCRIPT>"FLOAT" { RTOKEN(FLOAT);}
<BOTH,SCRIPT>"QUAD" { RTOKEN( QUAD);}
<BOTH,SCRIPT>"SQUAD" { RTOKEN( SQUAD);}
<BOTH,SCRIPT>"LONG" { RTOKEN( LONG);}
<BOTH,SCRIPT>"SHORT" { RTOKEN( SHORT);}
<BOTH,SCRIPT>"BYTE" { RTOKEN( BYTE);}
-<BOTH,SCRIPT>"NOFLOAT" { RTOKEN(NOFLOAT);}
+<BOTH,SCRIPT>"NOFLOAT" { RTOKEN(NOFLOAT);}
<EXPRESSION,BOTH,SCRIPT>"NOCROSSREFS" { RTOKEN(NOCROSSREFS);}
<BOTH,SCRIPT>"OVERLAY" { RTOKEN(OVERLAY); }
-<BOTH,SCRIPT>"SORT" { RTOKEN(SORT); }
+<BOTH,SCRIPT>"SORT_BY_NAME" { RTOKEN(SORT_BY_NAME); }
+<BOTH,SCRIPT>"SORT_BY_ALIGNMENT" { RTOKEN(SORT_BY_ALIGNMENT); }
+<BOTH,SCRIPT>"SORT" { RTOKEN(SORT_BY_NAME); }
<EXPRESSION,BOTH,SCRIPT>"NOLOAD" { RTOKEN(NOLOAD);}
<EXPRESSION,BOTH,SCRIPT>"DSECT" { RTOKEN(DSECT);}
<EXPRESSION,BOTH,SCRIPT>"COPY" { RTOKEN(COPY);}
<EXPRESSION,BOTH,SCRIPT>"INFO" { RTOKEN(INFO);}
<EXPRESSION,BOTH,SCRIPT>"OVERLAY" { RTOKEN(OVERLAY);}
+<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RO" { RTOKEN(ONLY_IF_RO); }
+<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RW" { RTOKEN(ONLY_IF_RW); }
+<EXPRESSION,BOTH,SCRIPT>"SPECIAL" { RTOKEN(SPECIAL); }
<BOTH,SCRIPT>"o" { RTOKEN(ORIGIN);}
<BOTH,SCRIPT>"org" { RTOKEN(ORIGIN);}
<BOTH,SCRIPT>"l" { RTOKEN( LENGTH);}
<BOTH,SCRIPT>"len" { RTOKEN( LENGTH);}
<BOTH,SCRIPT>"INCLUDE" { RTOKEN(INCLUDE);}
<BOTH,SCRIPT>"PHDRS" { RTOKEN (PHDRS); }
-<EXPRESSION,BOTH,SCRIPT>"AT" { RTOKEN(AT);}
-<EXPRESSION,BOTH,SCRIPT>"SUBALIGN" { RTOKEN(SUBALIGN);}
-<EXPRESSION,BOTH,SCRIPT>"PROVIDE" { RTOKEN(PROVIDE); }
+<EXPRESSION,BOTH,SCRIPT>"AT" { RTOKEN(AT);}
+<EXPRESSION,BOTH,SCRIPT>"SUBALIGN" { RTOKEN(SUBALIGN);}
+<EXPRESSION,BOTH,SCRIPT>"PROVIDE" { RTOKEN(PROVIDE); }
+<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>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); }
<MRI>"#".*\n? { ++ lineno; }
<MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); }
<MRI>"*".* { /* Mri comment line */ }
<MRI>";".* { /* Mri comment line */ }
<MRI>"END" { RTOKEN(ENDWORD); }
-<MRI>"ALIGNMOD" { RTOKEN(ALIGNMOD);}
-<MRI>"ALIGN" { RTOKEN(ALIGN_K);}
+<MRI>"ALIGNMOD" { RTOKEN(ALIGNMOD);}
+<MRI>"ALIGN" { RTOKEN(ALIGN_K);}
<MRI>"CHIP" { RTOKEN(CHIP); }
<MRI>"BASE" { RTOKEN(BASE); }
-<MRI>"ALIAS" { RTOKEN(ALIAS); }
-<MRI>"TRUNCATE" { RTOKEN(TRUNCATE); }
+<MRI>"ALIAS" { RTOKEN(ALIAS); }
+<MRI>"TRUNCATE" { RTOKEN(TRUNCATE); }
<MRI>"LOAD" { RTOKEN(LOAD); }
<MRI>"PUBLIC" { RTOKEN(PUBLIC); }
<MRI>"ORDER" { RTOKEN(ORDER); }
@@ -332,12 +338,12 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<MRI>"SECT" { RTOKEN(SECT); }
<EXPRESSION,BOTH,SCRIPT,MRI>"ABSOLUTE" { RTOKEN(ABSOLUTE); }
<MRI>"end" { RTOKEN(ENDWORD); }
-<MRI>"alignmod" { RTOKEN(ALIGNMOD);}
-<MRI>"align" { RTOKEN(ALIGN_K);}
+<MRI>"alignmod" { RTOKEN(ALIGNMOD);}
+<MRI>"align" { RTOKEN(ALIGN_K);}
<MRI>"chip" { RTOKEN(CHIP); }
<MRI>"base" { RTOKEN(BASE); }
-<MRI>"alias" { RTOKEN(ALIAS); }
-<MRI>"truncate" { RTOKEN(TRUNCATE); }
+<MRI>"alias" { RTOKEN(ALIAS); }
+<MRI>"truncate" { RTOKEN(TRUNCATE); }
<MRI>"load" { RTOKEN(LOAD); }
<MRI>"public" { RTOKEN(PUBLIC); }
<MRI>"order" { RTOKEN(ORDER); }
diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c
index d0e0b12a883d..fbc3081221ef 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
+ 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -50,7 +50,7 @@
#include <string.h>
#ifdef HAVE_SBRK
-#ifdef NEED_DECLARATION_SBRK
+#if !HAVE_DECL_SBRK
extern void *sbrk ();
#endif
#endif
@@ -68,7 +68,7 @@ const char *output_filename = "a.out";
char *program_name;
/* The prefix for system library directories. */
-char *ld_sysroot;
+const char *ld_sysroot;
/* The canonical representation of ld_sysroot. */
char * ld_canon_sysroot;
@@ -97,6 +97,10 @@ bfd_boolean whole_archive;
actually satisfies some reference in a regular object. */
bfd_boolean as_needed;
+/* Nonzero means never create DT_NEEDED entries for dynamic libraries
+ in DT_NEEDED tags. */
+bfd_boolean add_needed = TRUE;
+
/* TRUE if we should demangle symbol names. */
bfd_boolean demangling;
@@ -104,6 +108,10 @@ args_type command_line;
ld_config_type config;
+sort_type sort_section;
+
+static const char *get_sysroot
+ (int, char **);
static char *get_emulation
(int, char **);
static void set_scripts_dir
@@ -131,8 +139,8 @@ static bfd_boolean undefined_symbol
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma,
bfd_boolean);
static bfd_boolean reloc_overflow
- (struct bfd_link_info *, const char *, const char *, bfd_vma,
- bfd *, asection *, bfd_vma);
+ (struct bfd_link_info *, struct bfd_link_hash_entry *, const char *,
+ const char *, bfd_vma, bfd *, asection *, bfd_vma);
static bfd_boolean reloc_dangerous
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
static bfd_boolean unattached_reloc
@@ -153,7 +161,7 @@ static struct bfd_link_callbacks link_callbacks =
reloc_dangerous,
unattached_reloc,
notice,
- error_handler
+ einfo
};
struct bfd_link_info link_info;
@@ -166,7 +174,7 @@ remove_output (void)
if (output_bfd)
bfd_cache_close (output_bfd);
if (delete_output_file_on_failure)
- unlink (output_filename);
+ unlink_if_ordinary (output_filename);
}
}
@@ -190,53 +198,26 @@ main (int argc, char **argv)
START_PROGRESS (program_name, 0);
+ expandargv (&argc, &argv);
+
bfd_init ();
bfd_set_error_program_name (program_name);
xatexit (remove_output);
-#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE
- ld_sysroot = make_relative_prefix (program_name, BINDIR,
- TARGET_SYSTEM_ROOT);
-
- if (ld_sysroot)
+ /* Set up the sysroot directory. */
+ ld_sysroot = get_sysroot (argc, argv);
+ if (*ld_sysroot)
{
- struct stat s;
- int res = stat (ld_sysroot, &s) == 0 && S_ISDIR (s.st_mode);
-
- if (!res)
+ if (*TARGET_SYSTEM_ROOT == 0)
{
- free (ld_sysroot);
- ld_sysroot = NULL;
- }
- }
-
- if (! ld_sysroot)
- {
- ld_sysroot = make_relative_prefix (program_name, TOOLBINDIR,
- TARGET_SYSTEM_ROOT);
-
- if (ld_sysroot)
- {
- struct stat s;
- int res = stat (ld_sysroot, &s) == 0 && S_ISDIR (s.st_mode);
-
- if (!res)
- {
- free (ld_sysroot);
- ld_sysroot = NULL;
- }
+ einfo ("%P%F: this linker was not configured to use sysroots\n");
+ ld_sysroot = "";
}
+ else
+ ld_canon_sysroot = lrealpath (ld_sysroot);
}
-
- if (! ld_sysroot)
-#endif
- ld_sysroot = TARGET_SYSTEM_ROOT;
-
- if (ld_sysroot && *ld_sysroot)
- ld_canon_sysroot = lrealpath (ld_sysroot);
-
if (ld_canon_sysroot)
ld_canon_sysroot_len = strlen (ld_canon_sysroot);
else
@@ -267,6 +248,7 @@ main (int argc, char **argv)
config.has_shared = FALSE;
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;
@@ -274,6 +256,9 @@ main (int argc, char **argv)
command_line.warn_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
@@ -297,12 +282,15 @@ main (int argc, char **argv)
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;
@@ -325,7 +313,9 @@ main (int argc, char **argv)
link_info.spare_dynamic_tags = 5;
link_info.flags = 0;
link_info.flags_1 = 0;
- link_info.need_relax_finalize = FALSE;
+ link_info.relax_pass = 1;
+ link_info.warn_shared_textrel = FALSE;
+ link_info.gc_sections = FALSE;
ldfile_add_arch ("");
@@ -342,11 +332,14 @@ main (int argc, char **argv)
lang_has_input_file = FALSE;
parse_args (argc, argv);
+ if (config.hash_table_size != 0)
+ bfd_hash_set_default_size (config.hash_table_size);
+
ldemul_set_symbols ();
if (link_info.relocatable)
{
- if (command_line.gc_sections)
+ if (link_info.gc_sections)
einfo ("%P%F: --gc-sections and -r may not be used together\n");
else if (command_line.relax)
einfo (_("%P%F: --relax and -r may not be used together\n"));
@@ -481,6 +474,8 @@ main (int argc, char **argv)
if (nocrossref_list != NULL)
check_nocrossrefs ();
+ lang_finish ();
+
/* Even if we're producing relocatable output, some non-fatal errors should
be reported in the exit status. (What non-fatal errors, if any, do we
want to ignore for relocatable output?) */
@@ -568,6 +563,51 @@ main (int argc, char **argv)
return 0;
}
+/* If the configured sysroot is relocatable, try relocating it based on
+ default prefix FROM. Return the relocated directory if it exists,
+ otherwise return null. */
+
+static char *
+get_relative_sysroot (const char *from ATTRIBUTE_UNUSED)
+{
+#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE
+ char *path;
+ struct stat s;
+
+ path = make_relative_prefix (program_name, from, TARGET_SYSTEM_ROOT);
+ if (path)
+ {
+ if (stat (path, &s) == 0 && S_ISDIR (s.st_mode))
+ return path;
+ free (path);
+ }
+#endif
+ return 0;
+}
+
+/* Return the sysroot directory. Return "" if no sysroot is being used. */
+
+static const char *
+get_sysroot (int argc, char **argv)
+{
+ int i;
+ const char *path;
+
+ for (i = 1; i < argc; i++)
+ if (strncmp (argv[i], "--sysroot=", strlen ("--sysroot=")) == 0)
+ return argv[i] + strlen ("--sysroot=");
+
+ path = get_relative_sysroot (BINDIR);
+ if (path)
+ return path;
+
+ path = get_relative_sysroot (TOOLBINDIR);
+ if (path)
+ return path;
+
+ return TARGET_SYSTEM_ROOT;
+}
+
/* We need to find any explicitly given emulation in order to initialize the
state that's needed by the lex&yacc argument parser (parse_args). */
@@ -737,9 +777,10 @@ add_ysym (const char *name)
if (link_info.notice_hash == NULL)
{
link_info.notice_hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init_n (link_info.notice_hash,
- bfd_hash_newfunc,
- 61))
+ if (!bfd_hash_table_init_n (link_info.notice_hash,
+ bfd_hash_newfunc,
+ sizeof (struct bfd_hash_entry),
+ 61))
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
}
@@ -755,9 +796,10 @@ add_wrap (const char *name)
if (link_info.wrap_hash == NULL)
{
link_info.wrap_hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init_n (link_info.wrap_hash,
- bfd_hash_newfunc,
- 61))
+ if (!bfd_hash_table_init_n (link_info.wrap_hash,
+ bfd_hash_newfunc,
+ sizeof (struct bfd_hash_entry),
+ 61))
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
}
@@ -787,7 +829,8 @@ add_keepsyms_file (const char *filename)
}
link_info.keep_hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc))
+ if (!bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc,
+ sizeof (struct bfd_hash_entry)))
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
bufsize = 100;
@@ -835,7 +878,7 @@ add_keepsyms_file (const char *filename)
a link. */
static bfd_boolean
-add_archive_element (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+add_archive_element (struct bfd_link_info *info,
bfd *abfd,
const char *name)
{
@@ -866,7 +909,7 @@ add_archive_element (struct bfd_link_info *info ATTRIBUTE_UNUSED,
bfd *from;
int len;
- h = bfd_link_hash_lookup (link_info.hash, name, FALSE, FALSE, TRUE);
+ h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
if (h == NULL)
from = NULL;
@@ -1107,7 +1150,7 @@ constructor_callback (struct bfd_link_info *info,
/* Ensure that BFD_RELOC_CTOR exists now, so that we can give a
useful error message. */
if (bfd_reloc_type_lookup (output_bfd, BFD_RELOC_CTOR) == NULL
- && (link_info.relocatable
+ && (info->relocatable
|| bfd_reloc_type_lookup (abfd, BFD_RELOC_CTOR) == NULL))
einfo (_("%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"));
@@ -1163,11 +1206,11 @@ warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED,
return TRUE;
if (section != NULL)
- einfo ("%C: %s\n", abfd, section, address, warning);
+ einfo ("%C: %s%s\n", abfd, section, address, _("warning: "), warning);
else if (abfd == NULL)
- einfo ("%P: %s\n", warning);
+ einfo ("%P: %s%s\n", _("warning: "), warning);
else if (symbol == NULL)
- einfo ("%B: %s\n", abfd, warning);
+ einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
else
{
lang_input_statement_type *entry;
@@ -1205,7 +1248,7 @@ warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED,
bfd_map_over_sections (abfd, warning_find_reloc, &info);
if (! info.found)
- einfo ("%B: %s\n", abfd, warning);
+ einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
if (entry == NULL)
free (asymbols);
@@ -1253,7 +1296,8 @@ warning_find_reloc (bfd *abfd, asection *sec, void *iarg)
&& strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), info->symbol) == 0)
{
/* We found a reloc for the symbol we are looking for. */
- einfo ("%C: %s\n", abfd, sec, q->address, info->warning);
+ einfo ("%C: %s%s\n", abfd, sec, q->address, _("warning: "),
+ info->warning);
info->found = TRUE;
break;
}
@@ -1285,7 +1329,8 @@ undefined_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
if (hash == NULL)
{
hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init (hash, bfd_hash_newfunc))
+ if (!bfd_hash_table_init (hash, bfd_hash_newfunc,
+ sizeof (struct bfd_hash_entry)))
einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
}
@@ -1372,6 +1417,7 @@ int overflow_cutoff_limit = 10;
static bfd_boolean
reloc_overflow (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_hash_entry *entry,
const char *name,
const char *reloc_name,
bfd_vma addend,
@@ -1382,10 +1428,7 @@ reloc_overflow (struct bfd_link_info *info ATTRIBUTE_UNUSED,
if (overflow_cutoff_limit == -1)
return TRUE;
- if (abfd == NULL)
- einfo (_("%P%X: generated"));
- else
- einfo ("%X%C:", abfd, section, address);
+ einfo ("%X%C:", abfd, section, address);
if (overflow_cutoff_limit >= 0
&& overflow_cutoff_limit-- == 0)
@@ -1394,7 +1437,34 @@ reloc_overflow (struct bfd_link_info *info ATTRIBUTE_UNUSED,
return TRUE;
}
- einfo (_(" relocation truncated to fit: %s %T"), reloc_name, name);
+ if (entry)
+ {
+ while (entry->type == bfd_link_hash_indirect
+ || entry->type == bfd_link_hash_warning)
+ entry = entry->u.i.link;
+ switch (entry->type)
+ {
+ case bfd_link_hash_undefined:
+ case bfd_link_hash_undefweak:
+ einfo (_(" relocation truncated to fit: %s against undefined symbol `%T'"),
+ reloc_name, entry->root.string);
+ break;
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ einfo (_(" relocation truncated to fit: %s against symbol `%T' defined in %A section in %B"),
+ reloc_name, entry->root.string,
+ entry->u.def.section,
+ entry->u.def.section == bfd_abs_section_ptr
+ ? output_bfd : entry->u.def.section->owner);
+ break;
+ default:
+ abort ();
+ break;
+ }
+ }
+ else
+ einfo (_(" relocation truncated to fit: %s against `%T'"),
+ reloc_name, name);
if (addend != 0)
einfo ("+%v", addend);
einfo ("\n");
@@ -1410,11 +1480,8 @@ reloc_dangerous (struct bfd_link_info *info ATTRIBUTE_UNUSED,
asection *section,
bfd_vma address)
{
- if (abfd == NULL)
- einfo (_("%P%X: generated"));
- else
- einfo ("%X%C:", abfd, section, address);
- einfo (_("dangerous relocation: %s\n"), message);
+ einfo (_("%X%C: dangerous relocation: %s\n"),
+ abfd, section, address, message);
return TRUE;
}
@@ -1428,11 +1495,8 @@ unattached_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED,
asection *section,
bfd_vma address)
{
- if (abfd == NULL)
- einfo (_("%P%X: generated"));
- else
- einfo ("%X%C:", abfd, section, address);
- einfo (_(" reloc refers to symbol `%T' which is not being output\n"), name);
+ einfo (_("%X%C: reloc refers to symbol `%T' which is not being output\n"),
+ abfd, section, address, name);
return TRUE;
}
@@ -1447,6 +1511,13 @@ notice (struct bfd_link_info *info,
asection *section,
bfd_vma value)
{
+ if (name == NULL)
+ {
+ if (command_line.cref || nocrossref_list != NULL)
+ return handle_asneeded_cref (abfd, value);
+ return TRUE;
+ }
+
if (! info->notice_all
|| (info->notice_hash != NULL
&& bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL))
diff --git a/contrib/binutils/ld/ldmain.h b/contrib/binutils/ld/ldmain.h
index 8cab5fe1f22a..4f15d55b994b 100644
--- a/contrib/binutils/ld/ldmain.h
+++ b/contrib/binutils/ld/ldmain.h
@@ -1,6 +1,6 @@
/* ldmain.h -
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,14 +16,14 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LDMAIN_H
#define LDMAIN_H
extern char *program_name;
-extern char *ld_sysroot;
+extern const char *ld_sysroot;
extern char *ld_canon_sysroot;
extern int ld_canon_sysroot_len;
extern bfd *output_bfd;
@@ -33,6 +33,7 @@ extern bfd_boolean trace_file_tries;
extern bfd_boolean version_printed;
extern bfd_boolean whole_archive;
extern bfd_boolean as_needed;
+extern bfd_boolean add_needed;
extern bfd_boolean demangling;
extern int g_switch_value;
extern const char *output_filename;
diff --git a/contrib/binutils/ld/ldmisc.c b/contrib/binutils/ld/ldmisc.c
index def598d639a2..8af043aa2b24 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, 2002, 2003
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "bfdlink.h"
@@ -35,31 +35,35 @@
#include "ldlex.h"
#include "ldmain.h"
#include "ldfile.h"
+#include "elf-bfd.h"
/*
%% literal %
+ %A section name from a section
+ %B filename from a bfd
+ %C clever filename:linenumber with function
+ %D like %C, but no function name
+ %E current bfd error or errno
%F error is fatal
+ %G like %D, but only function name
+ %I filename from a lang_input_statement_type
%P print program name
+ %R info about a relent
%S print script file and linenumber
- %E current bfd error or errno
- %I filename from a lang_input_statement_type
- %B filename from a bfd
%T symbol name
- %X no object output, fail return
%V hex bfd_vma
- %v hex bfd_vma, no leading zeros
%W hex bfd_vma with 0x with no leading zeros taking up 8 spaces
- %C clever filename:linenumber with function
- %D like %C, but no function name
- %G like %D, but only function name
- %R info about a relent
- %s arbitrary string, like printf
+ %X no object output, fail return
%d integer, like printf
+ %ld long, like printf
+ %lu unsigned long, like printf
+ %s arbitrary string, like printf
%u integer, like printf
+ %v hex bfd_vma, no leading zeros
*/
static void
-vfinfo (FILE *fp, const char *fmt, va_list arg)
+vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
{
bfd_boolean fatal = FALSE;
@@ -76,10 +80,6 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
fmt++;
switch (*fmt++)
{
- default:
- fprintf (fp, "%%%c", fmt[-1]);
- break;
-
case '%':
/* literal % */
putc ('%', fp);
@@ -158,11 +158,38 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
}
break;
+ case 'A':
+ /* section name from a section */
+ {
+ asection *sec = va_arg (arg, asection *);
+ bfd *abfd = sec->owner;
+ const char *group = NULL;
+ struct coff_comdat_info *ci;
+
+ fprintf (fp, "%s", sec->name);
+ if (abfd != NULL
+ && bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && elf_next_in_group (sec) != NULL
+ && (sec->flags & SEC_GROUP) == 0)
+ group = elf_group_name (sec);
+ else if (abfd != NULL
+ && bfd_get_flavour (abfd) == bfd_target_coff_flavour
+ && (ci = bfd_coff_get_comdat_section (sec->owner,
+ sec)) != NULL)
+ group = ci->name;
+ if (group != NULL)
+ fprintf (fp, "[%s]", group);
+ }
+ break;
+
case 'B':
/* filename from a bfd */
{
bfd *abfd = va_arg (arg, bfd *);
- if (abfd->my_archive)
+
+ if (abfd == NULL)
+ fprintf (fp, "%s generated", program_name);
+ else if (abfd->my_archive)
fprintf (fp, "%s(%s)", abfd->my_archive->filename,
abfd->filename);
else
@@ -246,40 +273,62 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
section = va_arg (arg, asection *);
offset = va_arg (arg, bfd_vma);
- entry = (lang_input_statement_type *) abfd->usrdata;
- if (entry != (lang_input_statement_type *) NULL
- && entry->asymbols != (asymbol **) NULL)
- asymbols = entry->asymbols;
+ if (abfd == NULL)
+ {
+ entry = NULL;
+ asymbols = NULL;
+ }
else
{
- long symsize;
- long symbol_count;
-
- symsize = bfd_get_symtab_upper_bound (abfd);
- if (symsize < 0)
- einfo (_("%B%F: could not read symbols\n"), abfd);
- asymbols = xmalloc (symsize);
- symbol_count = bfd_canonicalize_symtab (abfd, asymbols);
- if (symbol_count < 0)
- einfo (_("%B%F: could not read symbols\n"), abfd);
- if (entry != (lang_input_statement_type *) NULL)
+ entry = (lang_input_statement_type *) abfd->usrdata;
+ if (entry != (lang_input_statement_type *) NULL
+ && entry->asymbols != (asymbol **) NULL)
+ asymbols = entry->asymbols;
+ else
{
- entry->asymbols = asymbols;
- entry->symbol_count = symbol_count;
+ long symsize;
+ long sym_count;
+
+ symsize = bfd_get_symtab_upper_bound (abfd);
+ if (symsize < 0)
+ einfo (_("%B%F: could not read symbols\n"), abfd);
+ asymbols = xmalloc (symsize);
+ sym_count = bfd_canonicalize_symtab (abfd, asymbols);
+ if (sym_count < 0)
+ einfo (_("%B%F: could not read symbols\n"), abfd);
+ if (entry != (lang_input_statement_type *) NULL)
+ {
+ entry->asymbols = asymbols;
+ entry->symbol_count = sym_count;
+ }
}
}
- lfinfo (fp, "%B(%s+0x%v)", abfd, section->name, offset);
+ /* The GNU Coding Standard requires that error messages
+ be of the form:
+
+ source-file-name:lineno: message
+ We do not always have a line number available so if
+ we cannot find them we print out the section name and
+ offset instread. */
discard_last = TRUE;
- if (bfd_find_nearest_line (abfd, section, asymbols, offset,
- &filename, &functionname,
- &linenumber))
+ if (abfd != NULL
+ && bfd_find_nearest_line (abfd, section, asymbols, offset,
+ &filename, &functionname,
+ &linenumber))
{
- bfd_boolean need_colon = TRUE;
-
if (functionname != NULL && fmt[-1] == 'C')
{
+ /* Detect the case where we are printing out a
+ message for the same function as the last
+ call to vinfo ("%C"). In this situation do
+ not print out the ABFD filename or the
+ function name again. Note - we do still
+ print out the source filename, as this will
+ allow programs that parse the linker's output
+ (eg emacs) to correctly locate multiple
+ errors in the same source file. */
if (last_bfd == NULL
|| last_file == NULL
|| last_function == NULL
@@ -288,9 +337,8 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
&& strcmp (last_file, filename) != 0)
|| strcmp (last_function, functionname) != 0)
{
- lfinfo (fp, _(": In function `%T':\n"),
- functionname);
- need_colon = FALSE;
+ lfinfo (fp, _("%B: In function `%T':\n"),
+ abfd, functionname);
last_bfd = abfd;
if (last_file != NULL)
@@ -304,19 +352,21 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
}
discard_last = FALSE;
}
+ else
+ lfinfo (fp, "%B:", abfd);
if (filename != NULL)
- {
- if (need_colon)
- putc (':', fp);
- fputs (filename, fp);
- }
+ fprintf (fp, "%s:", filename);
if (functionname != NULL && fmt[-1] == 'G')
- lfinfo (fp, ":%T", functionname);
+ lfinfo (fp, "%T", functionname);
else if (filename != NULL && linenumber != 0)
- fprintf (fp, ":%u", linenumber);
+ fprintf (fp, "%u", linenumber);
+ else
+ lfinfo (fp, "(%A+0x%v)", section, offset);
}
+ else
+ lfinfo (fp, "%B:(%A+0x%v)", abfd, section, offset);
if (asymbols != NULL && entry == NULL)
free (asymbols);
@@ -352,11 +402,30 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
/* unsigned integer, like printf */
fprintf (fp, "%u", va_arg (arg, unsigned int));
break;
+
+ case 'l':
+ if (*fmt == 'd')
+ {
+ fprintf (fp, "%ld", va_arg (arg, long));
+ ++fmt;
+ break;
+ }
+ else if (*fmt == 'u')
+ {
+ fprintf (fp, "%lu", va_arg (arg, unsigned long));
+ ++fmt;
+ break;
+ }
+ /* Fall thru */
+
+ default:
+ fprintf (fp, "%%%c", fmt[-1]);
+ break;
}
}
}
- if (config.fatal_warnings)
+ if (is_warning && config.fatal_warnings)
config.make_executable = FALSE;
if (fatal)
@@ -416,7 +485,7 @@ info_msg (const char *fmt, ...)
va_list arg;
va_start (arg, fmt);
- vfinfo (stdout, fmt, arg);
+ vfinfo (stdout, fmt, arg, FALSE);
va_end (arg);
}
@@ -428,7 +497,7 @@ einfo (const char *fmt, ...)
va_list arg;
va_start (arg, fmt);
- vfinfo (stderr, fmt, arg);
+ vfinfo (stderr, fmt, arg, TRUE);
va_end (arg);
}
@@ -446,7 +515,7 @@ minfo (const char *fmt, ...)
va_list arg;
va_start (arg, fmt);
- vfinfo (config.map_file, fmt, arg);
+ vfinfo (config.map_file, fmt, arg, FALSE);
va_end (arg);
}
@@ -456,7 +525,7 @@ lfinfo (FILE *file, const char *fmt, ...)
va_list arg;
va_start (arg, fmt);
- vfinfo (file, fmt, arg);
+ vfinfo (file, fmt, arg, FALSE);
va_end (arg);
}
@@ -489,64 +558,3 @@ ld_abort (const char *file, int line, const char *fn)
einfo (_("%P%F: please report this bug\n"));
xexit (1);
}
-
-bfd_boolean
-error_handler (int id, const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
-
- switch (id)
- {
- default:
- break;
-
- /* We can be called with
-
- error_handler (-LD_DEFINITION_IN_DISCARDED_SECTION, "", 0);
-
- to make this error non-fatal and
-
- error_handler (-LD_DEFINITION_IN_DISCARDED_SECTION, "", 1);
-
- to make this error fatal. */
- case -LD_DEFINITION_IN_DISCARDED_SECTION:
- case LD_DEFINITION_IN_DISCARDED_SECTION:
- {
- static struct bfd_hash_table *hash;
- static int fatal = 1;
- const char *name;
-
- if (id == -LD_DEFINITION_IN_DISCARDED_SECTION)
- {
- fatal = va_arg (arg, int);
- goto out;
- }
-
- name = va_arg (arg, const char *);
- /* Only warn once about a particular undefined symbol. */
- if (hash == NULL)
- {
- hash = xmalloc (sizeof (struct bfd_hash_table));
- if (! bfd_hash_table_init (hash, bfd_hash_newfunc))
- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
- }
-
- if (bfd_hash_lookup (hash, name, FALSE, FALSE) != NULL)
- goto out;
-
- if (bfd_hash_lookup (hash, name, TRUE, TRUE) == NULL)
- einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
-
- if (fatal)
- config.make_executable = FALSE;
- }
- break;
- }
- vfinfo (stderr, fmt, arg);
-
-out:
- va_end (arg);
- return TRUE;
-}
diff --git a/contrib/binutils/ld/ldmisc.h b/contrib/binutils/ld/ldmisc.h
index b2812fbd8280..cf7043354632 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
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2001, 2003, 2004
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,13 +16,12 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#ifndef LDMISC_H
#define LDMISC_H
-extern bfd_boolean error_handler (int, const char *, ...);
extern void einfo (const char *, ...);
extern void minfo (const char *, ...);
extern void info_msg (const char *, ...);
diff --git a/contrib/binutils/ld/ldver.c b/contrib/binutils/ld/ldver.c
index 710bf909ba50..48b914357ef2 100644
--- a/contrib/binutils/ld/ldver.c
+++ b/contrib/binutils/ld/ldver.c
@@ -1,22 +1,22 @@
/* ldver.c -- Print linker version.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
-This file is part of GLD, the Gnu Linker.
+ 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 free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include <stdio.h>
#include "bfd.h"
@@ -39,7 +39,7 @@ ldversion (int noisy)
if (noisy & 2)
{
- printf (_("Copyright 2002 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2005 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.h b/contrib/binutils/ld/ldver.h
index fd840a8b55d3..96e74ce66c1f 100644
--- a/contrib/binutils/ld/ldver.h
+++ b/contrib/binutils/ld/ldver.h
@@ -1,5 +1,6 @@
/* ldver.h -- Header file for ldver.c.
- Copyright 1991, 1992, 1993, 1996, 2003 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1996, 2001, 2003
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -15,6 +16,6 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
void ldversion (int);
diff --git a/contrib/binutils/ld/ldver.texi b/contrib/binutils/ld/ldver.texi
index 3610a96b9671..11d1801d6e65 100644
--- a/contrib/binutils/ld/ldver.texi
+++ b/contrib/binutils/ld/ldver.texi
@@ -1 +1 @@
-@set VERSION 2.15
+@set VERSION 2.17
diff --git a/contrib/binutils/ld/ldwrite.c b/contrib/binutils/ld/ldwrite.c
index e4bec32cac8b..ee9d74a796d6 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
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002,
+ 2003, 2004, 2005 Free Software Foundation, Inc.
Written by Steve Chamberlain sac@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -55,7 +55,7 @@ build_link_order (lang_statement_union_type *statement)
einfo (_("%P%F: bfd_new_link_order failed\n"));
link_order->type = bfd_data_link_order;
- link_order->offset = statement->data_statement.output_vma;
+ link_order->offset = statement->data_statement.output_offset;
link_order->u.data.contents = xmalloc (QUAD_SIZE);
value = statement->data_statement.value;
@@ -190,7 +190,7 @@ build_link_order (lang_statement_union_type *statement)
if (link_order == NULL)
einfo (_("%P%F: bfd_new_link_order failed\n"));
- link_order->offset = rs->output_vma;
+ link_order->offset = rs->output_offset;
link_order->size = bfd_get_reloc_size (rs->howto);
link_order->u.reloc.p = xmalloc (sizeof (struct bfd_link_order_reloc));
@@ -218,45 +218,46 @@ build_link_order (lang_statement_union_type *statement)
break;
case lang_input_section_enum:
- /* Create a new link_order in the output section with this
- attached */
- if (!statement->input_section.ifile->just_syms_flag)
- {
- asection *i = statement->input_section.section;
- asection *output_section = i->output_section;
+ {
+ /* Create a new link_order in the output section with this
+ attached */
+ asection *i = statement->input_section.section;
- ASSERT (output_section->owner == output_bfd);
+ if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+ && (i->flags & SEC_EXCLUDE) == 0)
+ {
+ asection *output_section = i->output_section;
- if ((output_section->flags & SEC_HAS_CONTENTS) != 0
- || ((output_section->flags & SEC_LOAD) != 0
- && (output_section->flags & SEC_THREAD_LOCAL)))
- {
- struct bfd_link_order *link_order;
+ ASSERT (output_section->owner == output_bfd);
- link_order = bfd_new_link_order (output_bfd, output_section);
+ if ((output_section->flags & SEC_HAS_CONTENTS) != 0
+ || ((output_section->flags & SEC_LOAD) != 0
+ && (output_section->flags & SEC_THREAD_LOCAL)))
+ {
+ struct bfd_link_order *link_order;
- if (i->flags & SEC_NEVER_LOAD)
- {
- /* We've got a never load section inside one which
- is going to be output, we'll change it into a
- fill. */
- link_order->type = bfd_data_link_order;
- link_order->u.data.contents = "";
- link_order->u.data.size = 1;
- }
- else
- {
- link_order->type = bfd_indirect_link_order;
- link_order->u.indirect.section = i;
- ASSERT (i->output_section == output_section);
- }
- if (i->_cooked_size)
- link_order->size = i->_cooked_size;
- else
- link_order->size = bfd_get_section_size_before_reloc (i);
- link_order->offset = i->output_offset;
- }
- }
+ link_order = bfd_new_link_order (output_bfd, output_section);
+
+ if (i->flags & SEC_NEVER_LOAD)
+ {
+ /* We've got a never load section inside one which
+ is going to be output, we'll change it into a
+ fill. */
+ link_order->type = bfd_data_link_order;
+ link_order->u.data.contents = (unsigned char *) "";
+ link_order->u.data.size = 1;
+ }
+ else
+ {
+ link_order->type = bfd_indirect_link_order;
+ link_order->u.indirect.section = i;
+ ASSERT (i->output_section == output_section);
+ }
+ link_order->size = i->size;
+ link_order->offset = i->output_offset;
+ }
+ }
+ }
break;
case lang_padding_statement_enum:
@@ -367,8 +368,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
n->vma = s->vma;
n->user_set_vma = s->user_set_vma;
n->lma = s->lma;
- n->_cooked_size = 0;
- n->_raw_size = 0;
+ n->size = 0;
n->output_offset = s->output_offset;
n->output_section = n;
n->orelocation = 0;
@@ -381,8 +381,8 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
static void
ds (asection *s)
{
- struct bfd_link_order *l = s->link_order_head;
- printf ("vma %x size %x\n", s->vma, s->_raw_size);
+ struct bfd_link_order *l = s->map_head.link_order;
+ printf ("vma %x size %x\n", s->vma, s->size);
while (l)
{
if (l->type == bfd_indirect_link_order)
@@ -413,7 +413,7 @@ sanity_check (bfd *abfd)
{
struct bfd_link_order *p;
bfd_vma prev = 0;
- for (p = s->link_order_head; p; p = p->next)
+ for (p = s->map_head.link_order; p; p = p->next)
{
if (p->offset > 100000)
abort ();
@@ -450,7 +450,7 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
/* Count up the relocations and line entries to see if anything
would be too big to fit. Accumulate section size too. */
- for (l = NULL, p = cursor->link_order_head; p != NULL; p = l->next)
+ for (l = NULL, p = cursor->map_head.link_order; p != NULL; p = l->next)
{
unsigned int thislines = 0;
unsigned int thisrelocs = 0;
@@ -468,10 +468,7 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
if (info->relocatable)
thisrelocs = sec->reloc_count;
- if (sec->_cooked_size != 0)
- thissize = sec->_cooked_size;
- else
- thissize = sec->_raw_size;
+ thissize = sec->size;
}
else if (info->relocatable
@@ -494,9 +491,9 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
/* Attach the link orders to the new section and snip
them off from the old section. */
- n->link_order_head = p;
- n->link_order_tail = cursor->link_order_tail;
- cursor->link_order_tail = l;
+ n->map_head.link_order = p;
+ n->map_tail.link_order = cursor->map_tail.link_order;
+ cursor->map_tail.link_order = l;
l->next = NULL;
l = p;
@@ -506,13 +503,8 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
dump ("before snip", cursor, n);
shift_offset = p->offset;
- if (cursor->_cooked_size != 0)
- {
- n->_cooked_size = cursor->_cooked_size - shift_offset;
- cursor->_cooked_size = shift_offset;
- }
- n->_raw_size = cursor->_raw_size - shift_offset;
- cursor->_raw_size = shift_offset;
+ n->size = cursor->size - shift_offset;
+ cursor->size = shift_offset;
vma += shift_offset;
n->lma = n->vma = vma;
diff --git a/contrib/binutils/ld/ldwrite.h b/contrib/binutils/ld/ldwrite.h
index 13617c0a4e73..1851a8676e4a 100644
--- a/contrib/binutils/ld/ldwrite.h
+++ b/contrib/binutils/ld/ldwrite.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
void ldwrite (void);
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c
index ea3a558362b4..f4c7dda9c880 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
+ 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -17,9 +17,10 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+#include "config.h"
#include "bfd.h"
#include "sysdep.h"
#include "libiberty.h"
@@ -55,6 +56,7 @@
static void set_default_dirlist (char *);
static void set_section_start (char *, char *);
+static void set_segment_start (const char *, char *);
static void help (void);
/* Non-zero if we are processing a --defsym from the command line. */
@@ -70,6 +72,7 @@ enum option_values
OPTION_DEFSYM,
OPTION_DEMANGLE,
OPTION_DYNAMIC_LINKER,
+ OPTION_SYSROOT,
OPTION_EB,
OPTION_EL,
OPTION_EMBEDDED_RELOCS,
@@ -91,6 +94,7 @@ enum option_values
OPTION_SHARED,
OPTION_SONAME,
OPTION_SORT_COMMON,
+ OPTION_SORT_SECTION,
OPTION_STATS,
OPTION_SYMBOLIC,
OPTION_TASK_LINK,
@@ -112,12 +116,15 @@ enum option_values
OPTION_SPLIT_BY_RELOC,
OPTION_SPLIT_BY_FILE ,
OPTION_WHOLE_ARCHIVE,
+ OPTION_ADD_NEEDED,
+ OPTION_NO_ADD_NEEDED,
OPTION_AS_NEEDED,
OPTION_NO_AS_NEEDED,
OPTION_WRAP,
OPTION_FORCE_EXE_SUFFIX,
OPTION_GC_SECTIONS,
OPTION_NO_GC_SECTIONS,
+ OPTION_HASH_SIZE,
OPTION_CHECK_SECTIONS,
OPTION_NO_CHECK_SECTIONS,
OPTION_NO_UNDEFINED,
@@ -130,6 +137,8 @@ enum option_values
OPTION_NO_ALLOW_SHLIB_UNDEFINED,
OPTION_ALLOW_MULTIPLE_DEFINITION,
OPTION_NO_UNDEFINED_VERSION,
+ OPTION_DEFAULT_SYMVER,
+ OPTION_DEFAULT_IMPORTED_SYMVER,
OPTION_DISCARD_NONE,
OPTION_SPARE_DYNAMIC_TAGS,
OPTION_NO_DEFINE_COMMON,
@@ -142,7 +151,9 @@ enum option_values
OPTION_PIE,
OPTION_UNRESOLVED_SYMBOLS,
OPTION_WARN_UNRESOLVED_SYMBOLS,
- OPTION_ERROR_UNRESOLVED_SYMBOLS
+ OPTION_ERROR_UNRESOLVED_SYMBOLS,
+ OPTION_WARN_SHARED_TEXTREL,
+ OPTION_REDUCE_MEMORY_OVERHEADS
};
/* The long options. This structure is used for both the option
@@ -182,270 +193,332 @@ struct ld_option
static const struct ld_option ld_options[] =
{
{ {NULL, required_argument, NULL, '\0'},
- 'a', N_("KEYWORD"), N_("Shared library control for HP/UX compatibility"),
- ONE_DASH },
+ 'a', N_("KEYWORD"), N_("Shared library control for HP/UX compatibility"),
+ ONE_DASH },
{ {"architecture", required_argument, NULL, 'A'},
- 'A', N_("ARCH"), N_("Set architecture") , TWO_DASHES },
+ 'A', N_("ARCH"), N_("Set architecture") , TWO_DASHES },
{ {"format", required_argument, NULL, 'b'},
- 'b', N_("TARGET"), N_("Specify target for following input files"), TWO_DASHES },
+ 'b', N_("TARGET"), N_("Specify target for following input files"),
+ TWO_DASHES },
{ {"mri-script", required_argument, NULL, 'c'},
- 'c', N_("FILE"), N_("Read MRI format linker script"), TWO_DASHES },
+ 'c', N_("FILE"), N_("Read MRI format linker script"), TWO_DASHES },
{ {"dc", no_argument, NULL, 'd'},
- 'd', NULL, N_("Force common symbols to be defined"), ONE_DASH },
+ 'd', NULL, N_("Force common symbols to be defined"), ONE_DASH },
{ {"dp", no_argument, NULL, 'd'},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"entry", required_argument, NULL, 'e'},
- 'e', N_("ADDRESS"), N_("Set start address"), TWO_DASHES },
+ 'e', N_("ADDRESS"), N_("Set start address"), TWO_DASHES },
{ {"export-dynamic", no_argument, NULL, OPTION_EXPORT_DYNAMIC},
- 'E', NULL, N_("Export all dynamic symbols"), TWO_DASHES },
+ 'E', NULL, N_("Export all dynamic symbols"), TWO_DASHES },
{ {"EB", no_argument, NULL, OPTION_EB},
- '\0', NULL, N_("Link big-endian objects"), ONE_DASH },
+ '\0', NULL, N_("Link big-endian objects"), ONE_DASH },
{ {"EL", no_argument, NULL, OPTION_EL},
- '\0', NULL, N_("Link little-endian objects"), ONE_DASH },
+ '\0', NULL, N_("Link little-endian objects"), ONE_DASH },
{ {"auxiliary", required_argument, NULL, 'f'},
- 'f', N_("SHLIB"), N_("Auxiliary filter for shared object symbol table"),
- TWO_DASHES },
+ 'f', N_("SHLIB"), N_("Auxiliary filter for shared object symbol table"),
+ TWO_DASHES },
{ {"filter", required_argument, NULL, 'F'},
- 'F', N_("SHLIB"), N_("Filter for shared object symbol table"), TWO_DASHES },
+ 'F', N_("SHLIB"), N_("Filter for shared object symbol table"),
+ TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
- 'g', NULL, N_("Ignored"), ONE_DASH },
+ 'g', NULL, N_("Ignored"), ONE_DASH },
{ {"gpsize", required_argument, NULL, 'G'},
- 'G', N_("SIZE"), N_("Small data size (if no size, same as --shared)"),
- TWO_DASHES },
+ 'G', N_("SIZE"), N_("Small data size (if no size, same as --shared)"),
+ TWO_DASHES },
{ {"soname", required_argument, NULL, OPTION_SONAME},
- 'h', N_("FILENAME"), N_("Set internal name of shared library"), ONE_DASH },
+ 'h', N_("FILENAME"), N_("Set internal name of shared library"), ONE_DASH },
{ {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
- 'I', N_("PROGRAM"), N_("Set PROGRAM as the dynamic linker to use"), TWO_DASHES },
+ 'I', N_("PROGRAM"), N_("Set PROGRAM as the dynamic linker to use"),
+ TWO_DASHES },
{ {"library", required_argument, NULL, 'l'},
- 'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES },
+ 'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES },
{ {"library-path", required_argument, NULL, 'L'},
- 'L', N_("DIRECTORY"), N_("Add DIRECTORY to library search path"), TWO_DASHES },
+ 'L', N_("DIRECTORY"), N_("Add DIRECTORY to library search path"),
+ TWO_DASHES },
+ { {"sysroot=<DIRECTORY>", required_argument, NULL, OPTION_SYSROOT},
+ '\0', NULL, N_("Override the default sysroot location"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
- 'm', N_("EMULATION"), N_("Set emulation"), ONE_DASH },
+ 'm', N_("EMULATION"), N_("Set emulation"), ONE_DASH },
{ {"print-map", no_argument, NULL, 'M'},
- 'M', NULL, N_("Print map file on standard output"), TWO_DASHES },
+ 'M', NULL, N_("Print map file on standard output"), TWO_DASHES },
{ {"nmagic", no_argument, NULL, 'n'},
- 'n', NULL, N_("Do not page align data"), TWO_DASHES },
+ 'n', NULL, N_("Do not page align data"), TWO_DASHES },
{ {"omagic", no_argument, NULL, 'N'},
- 'N', NULL, N_("Do not page align data, do not make text readonly"),
- EXACTLY_TWO_DASHES },
+ 'N', NULL, N_("Do not page align data, do not make text readonly"),
+ EXACTLY_TWO_DASHES },
{ {"no-omagic", no_argument, NULL, OPTION_NO_OMAGIC},
- '\0', NULL, N_("Page align data, make text readonly"), EXACTLY_TWO_DASHES },
+ '\0', NULL, N_("Page align data, make text readonly"),
+ EXACTLY_TWO_DASHES },
{ {"output", required_argument, NULL, 'o'},
- 'o', N_("FILE"), N_("Set output file name"), EXACTLY_TWO_DASHES },
+ 'o', N_("FILE"), N_("Set output file name"), EXACTLY_TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
- 'O', NULL, N_("Optimize output file"), ONE_DASH },
+ 'O', NULL, N_("Optimize output file"), ONE_DASH },
{ {"Qy", no_argument, NULL, OPTION_IGNORE},
- '\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },
+ '\0', NULL, N_("Ignored for SVR4 compatibility"), ONE_DASH },
{ {"emit-relocs", no_argument, NULL, 'q'},
- 'q', NULL, "Generate relocations in final output", TWO_DASHES },
+ 'q', NULL, "Generate relocations in final output", TWO_DASHES },
{ {"relocatable", no_argument, NULL, 'r'},
- 'r', NULL, N_("Generate relocatable output"), TWO_DASHES },
+ 'r', NULL, N_("Generate relocatable output"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
- 'i', NULL, NULL, ONE_DASH },
+ 'i', NULL, NULL, ONE_DASH },
{ {"just-symbols", required_argument, NULL, 'R'},
- 'R', N_("FILE"), N_("Just link symbols (if directory, same as --rpath)"),
- TWO_DASHES },
+ 'R', N_("FILE"), N_("Just link symbols (if directory, same as --rpath)"),
+ TWO_DASHES },
{ {"strip-all", no_argument, NULL, 's'},
- 's', NULL, N_("Strip all symbols"), TWO_DASHES },
+ 's', NULL, N_("Strip all symbols"), TWO_DASHES },
{ {"strip-debug", no_argument, NULL, 'S'},
- 'S', NULL, N_("Strip debugging symbols"), TWO_DASHES },
+ 'S', NULL, N_("Strip debugging symbols"), TWO_DASHES },
{ {"strip-discarded", no_argument, NULL, OPTION_STRIP_DISCARDED},
- '\0', NULL, N_("Strip symbols in discarded sections"), TWO_DASHES },
+ '\0', NULL, N_("Strip symbols in discarded sections"), TWO_DASHES },
{ {"no-strip-discarded", no_argument, NULL, OPTION_NO_STRIP_DISCARDED},
- '\0', NULL, N_("Do not strip symbols in discarded sections"), TWO_DASHES },
+ '\0', NULL, N_("Do not strip symbols in discarded sections"), TWO_DASHES },
{ {"trace", no_argument, NULL, 't'},
- 't', NULL, N_("Trace file opens"), TWO_DASHES },
+ 't', NULL, N_("Trace file opens"), TWO_DASHES },
{ {"script", required_argument, NULL, 'T'},
- 'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
+ 'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
{ {"undefined", required_argument, NULL, 'u'},
- 'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"), TWO_DASHES },
+ 'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"),
+ TWO_DASHES },
{ {"unique", optional_argument, NULL, OPTION_UNIQUE},
- '\0', N_("[=SECTION]"), N_("Don't merge input [SECTION | orphan] sections"), TWO_DASHES },
+ '\0', N_("[=SECTION]"),
+ N_("Don't merge input [SECTION | orphan] sections"), TWO_DASHES },
{ {"Ur", no_argument, NULL, OPTION_UR},
- '\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH },
+ '\0', NULL, N_("Build global constructor/destructor tables"), ONE_DASH },
{ {"version", no_argument, NULL, OPTION_VERSION},
- 'v', NULL, N_("Print version information"), TWO_DASHES },
+ 'v', NULL, N_("Print version information"), TWO_DASHES },
{ {NULL, no_argument, NULL, '\0'},
- 'V', NULL, N_("Print version and emulation information"), ONE_DASH },
+ 'V', NULL, N_("Print version and emulation information"), ONE_DASH },
{ {"discard-all", no_argument, NULL, 'x'},
- 'x', NULL, N_("Discard all local symbols"), TWO_DASHES },
+ 'x', NULL, N_("Discard all local symbols"), TWO_DASHES },
{ {"discard-locals", no_argument, NULL, 'X'},
- 'X', NULL, N_("Discard temporary local symbols (default)"), TWO_DASHES },
+ 'X', NULL, N_("Discard temporary local symbols (default)"), TWO_DASHES },
{ {"discard-none", no_argument, NULL, OPTION_DISCARD_NONE},
- '\0', NULL, N_("Don't discard any local symbols"), TWO_DASHES },
+ '\0', NULL, N_("Don't discard any local symbols"), TWO_DASHES },
{ {"trace-symbol", required_argument, NULL, 'y'},
- 'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES },
+ 'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
- 'Y', N_("PATH"), N_("Default search path for Solaris compatibility"), ONE_DASH },
+ 'Y', N_("PATH"), N_("Default search path for Solaris compatibility"),
+ ONE_DASH },
{ {"start-group", no_argument, NULL, '('},
- '(', NULL, N_("Start a group"), TWO_DASHES },
+ '(', NULL, N_("Start a group"), TWO_DASHES },
{ {"end-group", no_argument, NULL, ')'},
- ')', NULL, N_("End a group"), TWO_DASHES },
- { {"accept-unknown-input-arch", no_argument, NULL, OPTION_ACCEPT_UNKNOWN_INPUT_ARCH},
- '\0', NULL, N_("Accept input files whose architecture cannot be determined"), TWO_DASHES },
- { {"no-accept-unknown-input-arch", no_argument, NULL, OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH},
- '\0', NULL, N_("Reject input files whose architecture is unknown"), TWO_DASHES },
+ ')', NULL, N_("End a group"), TWO_DASHES },
+ { {"accept-unknown-input-arch", no_argument, NULL,
+ OPTION_ACCEPT_UNKNOWN_INPUT_ARCH},
+ '\0', NULL,
+ N_("Accept input files whose architecture cannot be determined"),
+ TWO_DASHES },
+ { {"no-accept-unknown-input-arch", no_argument, NULL,
+ OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH},
+ '\0', NULL, N_("Reject input files whose architecture is unknown"),
+ TWO_DASHES },
+ { {"add-needed", no_argument, NULL, OPTION_ADD_NEEDED},
+ '\0', NULL, N_("Set DT_NEEDED tags for DT_NEEDED entries in\n"
+ "\t\t\t\tfollowing dynamic libs"), TWO_DASHES },
+ { {"no-add-needed", no_argument, NULL, OPTION_NO_ADD_NEEDED},
+ '\0', NULL, N_("Do not set DT_NEEDED tags for DT_NEEDED entries\n"
+ "\t\t\t\tin following dynamic libs"), TWO_DASHES },
+ { {"as-needed", no_argument, NULL, OPTION_AS_NEEDED},
+ '\0', NULL, N_("Only set DT_NEEDED for following dynamic libs if used"),
+ TWO_DASHES },
+ { {"no-as-needed", no_argument, NULL, OPTION_NO_AS_NEEDED},
+ '\0', NULL, N_("Always set DT_NEEDED for following dynamic libs"),
+ TWO_DASHES },
{ {"assert", required_argument, NULL, OPTION_ASSERT},
- '\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH },
+ '\0', N_("KEYWORD"), N_("Ignored for SunOS compatibility"), ONE_DASH },
{ {"Bdynamic", no_argument, NULL, OPTION_CALL_SHARED},
- '\0', NULL, N_("Link against shared libraries"), ONE_DASH },
+ '\0', NULL, N_("Link against shared libraries"), ONE_DASH },
{ {"dy", no_argument, NULL, OPTION_CALL_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"call_shared", no_argument, NULL, OPTION_CALL_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"Bstatic", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, N_("Do not link against shared libraries"), ONE_DASH },
+ '\0', NULL, N_("Do not link against shared libraries"), ONE_DASH },
{ {"dn", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"non_shared", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"static", no_argument, NULL, OPTION_NON_SHARED},
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC},
- '\0', NULL, N_("Bind global references locally"), ONE_DASH },
+ '\0', NULL, N_("Bind global references locally"), ONE_DASH },
{ {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
- '\0', NULL, N_("Check section addresses for overlaps (default)"), TWO_DASHES },
+ '\0', NULL, N_("Check section addresses for overlaps (default)"),
+ TWO_DASHES },
{ {"no-check-sections", no_argument, NULL, OPTION_NO_CHECK_SECTIONS},
- '\0', NULL, N_("Do not check section addresses for overlaps"),
- TWO_DASHES },
+ '\0', NULL, N_("Do not check section addresses for overlaps"),
+ TWO_DASHES },
{ {"cref", no_argument, NULL, OPTION_CREF},
- '\0', NULL, N_("Output cross reference table"), TWO_DASHES },
+ '\0', NULL, N_("Output cross reference table"), TWO_DASHES },
{ {"defsym", required_argument, NULL, OPTION_DEFSYM},
- '\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES },
+ '\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES },
{ {"demangle", optional_argument, NULL, OPTION_DEMANGLE},
- '\0', N_("[=STYLE]"), N_("Demangle symbol names [using STYLE]"), TWO_DASHES },
+ '\0', N_("[=STYLE]"), N_("Demangle symbol names [using STYLE]"),
+ TWO_DASHES },
{ {"embedded-relocs", no_argument, NULL, OPTION_EMBEDDED_RELOCS},
- '\0', NULL, N_("Generate embedded relocs"), TWO_DASHES},
+ '\0', NULL, N_("Generate embedded relocs"), TWO_DASHES},
+ { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL},
+ '\0', NULL, N_("Treat warnings as errors"),
+ TWO_DASHES },
{ {"fini", required_argument, NULL, OPTION_FINI},
- '\0', N_("SYMBOL"), N_("Call SYMBOL at unload-time"), ONE_DASH },
+ '\0', N_("SYMBOL"), N_("Call SYMBOL at unload-time"), ONE_DASH },
{ {"force-exe-suffix", no_argument, NULL, OPTION_FORCE_EXE_SUFFIX},
- '\0', NULL, N_("Force generation of file with .exe suffix"), TWO_DASHES},
+ '\0', NULL, N_("Force generation of file with .exe suffix"), TWO_DASHES},
{ {"gc-sections", no_argument, NULL, OPTION_GC_SECTIONS},
- '\0', NULL, N_("Remove unused sections (on some targets)"),
- TWO_DASHES },
+ '\0', NULL, N_("Remove unused sections (on some targets)"),
+ TWO_DASHES },
{ {"no-gc-sections", no_argument, NULL, OPTION_NO_GC_SECTIONS},
- '\0', NULL, N_("Don't remove unused sections (default)"),
- TWO_DASHES },
+ '\0', NULL, N_("Don't remove unused sections (default)"),
+ TWO_DASHES },
+ { {"hash-size=<NUMBER>", required_argument, NULL, OPTION_HASH_SIZE},
+ '\0', NULL, N_("Set default hash table size close to <NUMBER>"),
+ TWO_DASHES },
{ {"help", no_argument, NULL, OPTION_HELP},
- '\0', NULL, N_("Print option help"), TWO_DASHES },
+ '\0', NULL, N_("Print option help"), TWO_DASHES },
{ {"init", required_argument, NULL, OPTION_INIT},
- '\0', N_("SYMBOL"), N_("Call SYMBOL at load-time"), ONE_DASH },
+ '\0', N_("SYMBOL"), N_("Call SYMBOL at load-time"), ONE_DASH },
{ {"Map", required_argument, NULL, OPTION_MAP},
- '\0', N_("FILE"), N_("Write a map file"), ONE_DASH },
+ '\0', N_("FILE"), N_("Write a map file"), ONE_DASH },
{ {"no-define-common", no_argument, NULL, OPTION_NO_DEFINE_COMMON},
- '\0', NULL, N_("Do not define Common storage"), TWO_DASHES },
+ '\0', NULL, N_("Do not define Common storage"), TWO_DASHES },
{ {"no-demangle", no_argument, NULL, OPTION_NO_DEMANGLE },
- '\0', NULL, N_("Do not demangle symbol names"), TWO_DASHES },
+ '\0', NULL, N_("Do not demangle symbol names"), TWO_DASHES },
{ {"no-keep-memory", no_argument, NULL, OPTION_NO_KEEP_MEMORY},
- '\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES },
+ '\0', NULL, N_("Use less memory and more disk I/O"), TWO_DASHES },
{ {"no-undefined", no_argument, NULL, OPTION_NO_UNDEFINED},
- '\0', NULL, N_("Do not allow unresolved references in object files"), TWO_DASHES },
+ '\0', NULL, N_("Do not allow unresolved references in object files"),
+ TWO_DASHES },
{ {"allow-shlib-undefined", no_argument, NULL, OPTION_ALLOW_SHLIB_UNDEFINED},
- '\0', NULL, N_("Allow unresolved references in shared libaries"), TWO_DASHES },
- { {"no-allow-shlib-undefined", no_argument, NULL, OPTION_NO_ALLOW_SHLIB_UNDEFINED},
- '\0', NULL, N_("Do not allow unresolved references in shared libs"), TWO_DASHES },
- { {"allow-multiple-definition", no_argument, NULL, OPTION_ALLOW_MULTIPLE_DEFINITION},
- '\0', NULL, N_("Allow multiple definitions"), TWO_DASHES },
+ '\0', NULL, N_("Allow unresolved references in shared libaries"),
+ TWO_DASHES },
+ { {"no-allow-shlib-undefined", no_argument, NULL,
+ OPTION_NO_ALLOW_SHLIB_UNDEFINED},
+ '\0', NULL, N_("Do not allow unresolved references in shared libs"),
+ TWO_DASHES },
+ { {"allow-multiple-definition", no_argument, NULL,
+ OPTION_ALLOW_MULTIPLE_DEFINITION},
+ '\0', NULL, N_("Allow multiple definitions"), TWO_DASHES },
{ {"no-undefined-version", no_argument, NULL, OPTION_NO_UNDEFINED_VERSION},
- '\0', NULL, N_("Disallow undefined version"), TWO_DASHES },
+ '\0', NULL, N_("Disallow undefined version"), TWO_DASHES },
+ { {"default-symver", no_argument, NULL, OPTION_DEFAULT_SYMVER},
+ '\0', NULL, N_("Create default symbol version"), TWO_DASHES },
+ { {"default-imported-symver", no_argument, NULL,
+ OPTION_DEFAULT_IMPORTED_SYMVER},
+ '\0', NULL, N_("Create default symbol version for imported symbols"),
+ TWO_DASHES },
{ {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
- '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
+ '\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
{ {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
- '\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES },
+ '\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES },
{ {"noinhibit-exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
- '\0', NULL, N_("Create an output file even if errors occur"), TWO_DASHES },
+ '\0', NULL, N_("Create an output file even if errors occur"),
+ TWO_DASHES },
{ {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
- '\0', NULL, NULL, NO_HELP },
+ '\0', NULL, NULL, NO_HELP },
{ {"nostdlib", no_argument, NULL, OPTION_NOSTDLIB},
- '\0', NULL, N_("Only use library directories specified on\n\t\t\t\tthe command line"), ONE_DASH },
+ '\0', NULL, N_("Only use library directories specified on\n"
+ "\t\t\t\tthe command line"), ONE_DASH },
{ {"oformat", required_argument, NULL, OPTION_OFORMAT},
- '\0', N_("TARGET"), N_("Specify target of output file"), EXACTLY_TWO_DASHES },
+ '\0', N_("TARGET"), N_("Specify target of output file"),
+ EXACTLY_TWO_DASHES },
{ {"qmagic", no_argument, NULL, OPTION_IGNORE},
- '\0', NULL, N_("Ignored for Linux compatibility"), ONE_DASH },
+ '\0', NULL, N_("Ignored for Linux compatibility"), ONE_DASH },
+ { {"reduce-memory-overheads", no_argument, NULL,
+ OPTION_REDUCE_MEMORY_OVERHEADS},
+ '\0', NULL, N_("Reduce memory overheads, possibly taking much longer"),
+ TWO_DASHES },
{ {"relax", no_argument, NULL, OPTION_RELAX},
- '\0', NULL, N_("Relax branches on certain targets"), TWO_DASHES },
+ '\0', NULL, N_("Relax branches on certain targets"), TWO_DASHES },
{ {"retain-symbols-file", required_argument, NULL,
- OPTION_RETAIN_SYMBOLS_FILE},
- '\0', N_("FILE"), N_("Keep only symbols listed in FILE"), TWO_DASHES },
+ OPTION_RETAIN_SYMBOLS_FILE},
+ '\0', N_("FILE"), N_("Keep only symbols listed in FILE"), TWO_DASHES },
{ {"rpath", required_argument, NULL, OPTION_RPATH},
- '\0', N_("PATH"), N_("Set runtime shared library search path"), ONE_DASH },
+ '\0', N_("PATH"), N_("Set runtime shared library search path"), ONE_DASH },
{ {"rpath-link", required_argument, NULL, OPTION_RPATH_LINK},
- '\0', N_("PATH"), N_("Set link time shared library search path"), ONE_DASH },
+ '\0', N_("PATH"), N_("Set link time shared library search path"),
+ ONE_DASH },
{ {"shared", no_argument, NULL, OPTION_SHARED},
- '\0', NULL, N_("Create a shared library"), ONE_DASH },
+ '\0', NULL, N_("Create a shared library"), ONE_DASH },
{ {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */
- '\0', NULL, NULL, ONE_DASH },
+ '\0', NULL, NULL, ONE_DASH },
{ {"pie", no_argument, NULL, OPTION_PIE},
- '\0', NULL, N_("Create a position independent executable"), ONE_DASH },
+ '\0', NULL, N_("Create a position independent executable"), ONE_DASH },
{ {"pic-executable", no_argument, NULL, OPTION_PIE},
- '\0', NULL, NULL, TWO_DASHES },
+ '\0', NULL, NULL, TWO_DASHES },
{ {"sort-common", no_argument, NULL, OPTION_SORT_COMMON},
- '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
+ '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
{ {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
- '\0', NULL, NULL, NO_HELP },
+ '\0', NULL, NULL, NO_HELP },
+ { {"sort-section", required_argument, NULL, OPTION_SORT_SECTION},
+ '\0', N_("name|alignment"),
+ N_("Sort sections by name or maximum alignment"), TWO_DASHES },
{ {"spare-dynamic-tags", required_argument, NULL, OPTION_SPARE_DYNAMIC_TAGS},
- '\0', N_("COUNT"), N_("How many tags to reserve in .dynamic section"), TWO_DASHES },
+ '\0', N_("COUNT"), N_("How many tags to reserve in .dynamic section"),
+ TWO_DASHES },
{ {"split-by-file", optional_argument, NULL, OPTION_SPLIT_BY_FILE},
- '\0', N_("[=SIZE]"), N_("Split output sections every SIZE octets"), TWO_DASHES },
+ '\0', N_("[=SIZE]"), N_("Split output sections every SIZE octets"),
+ TWO_DASHES },
{ {"split-by-reloc", optional_argument, NULL, OPTION_SPLIT_BY_RELOC},
- '\0', N_("[=COUNT]"), N_("Split output sections every COUNT relocs"), TWO_DASHES },
+ '\0', N_("[=COUNT]"), N_("Split output sections every COUNT relocs"),
+ TWO_DASHES },
{ {"stats", no_argument, NULL, OPTION_STATS},
- '\0', NULL, N_("Print memory usage statistics"), TWO_DASHES },
+ '\0', NULL, N_("Print memory usage statistics"), TWO_DASHES },
{ {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
- '\0', NULL, N_("Display target specific options"), TWO_DASHES },
+ '\0', NULL, N_("Display target specific options"), TWO_DASHES },
{ {"task-link", required_argument, NULL, OPTION_TASK_LINK},
- '\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES },
+ '\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES },
{ {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
- '\0', NULL, N_("Use same format as native linker"), TWO_DASHES },
+ '\0', NULL, N_("Use same format as native linker"), TWO_DASHES },
{ {"section-start", required_argument, NULL, OPTION_SECTION_START},
- '\0', N_("SECTION=ADDRESS"), N_("Set address of named section"), TWO_DASHES },
+ '\0', N_("SECTION=ADDRESS"), N_("Set address of named section"),
+ TWO_DASHES },
{ {"Tbss", required_argument, NULL, OPTION_TBSS},
- '\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH },
+ '\0', N_("ADDRESS"), N_("Set address of .bss section"), ONE_DASH },
{ {"Tdata", required_argument, NULL, OPTION_TDATA},
- '\0', N_("ADDRESS"), N_("Set address of .data section"), ONE_DASH },
+ '\0', N_("ADDRESS"), N_("Set address of .data section"), ONE_DASH },
{ {"Ttext", required_argument, NULL, OPTION_TTEXT},
- '\0', N_("ADDRESS"), N_("Set address of .text section"), ONE_DASH },
- { {"unresolved-symbols=<method>", required_argument, NULL, OPTION_UNRESOLVED_SYMBOLS},
- '\0', NULL, N_("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"),
- TWO_DASHES },
+ '\0', N_("ADDRESS"), N_("Set address of .text section"), ONE_DASH },
+ { {"unresolved-symbols=<method>", required_argument, NULL,
+ OPTION_UNRESOLVED_SYMBOLS},
+ '\0', NULL, N_("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"), TWO_DASHES },
{ {"verbose", no_argument, NULL, OPTION_VERBOSE},
- '\0', NULL, N_("Output lots of information during link"), TWO_DASHES },
+ '\0', NULL, N_("Output lots of information during link"), TWO_DASHES },
{ {"dll-verbose", no_argument, NULL, OPTION_VERBOSE}, /* Linux. */
- '\0', NULL, NULL, NO_HELP },
+ '\0', NULL, NULL, NO_HELP },
{ {"version-script", required_argument, NULL, OPTION_VERSION_SCRIPT },
- '\0', N_("FILE"), N_("Read version information script"), TWO_DASHES },
+ '\0', N_("FILE"), N_("Read version information script"), TWO_DASHES },
{ {"version-exports-section", required_argument, NULL,
OPTION_VERSION_EXPORTS_SECTION },
- '\0', N_("SYMBOL"), N_("Take export symbols list from .exports, using\n\t\t\t\tSYMBOL as the version."),
- TWO_DASHES },
+ '\0', N_("SYMBOL"), N_("Take export symbols list from .exports, using\n"
+ "\t\t\t\tSYMBOL as the version."), TWO_DASHES },
{ {"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
- '\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES },
+ '\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES },
{ {"warn-constructors", no_argument, NULL, OPTION_WARN_CONSTRUCTORS},
- '\0', NULL, N_("Warn if global constructors/destructors are seen"),
- TWO_DASHES },
+ '\0', NULL, N_("Warn if global constructors/destructors are seen"),
+ TWO_DASHES },
{ {"warn-multiple-gp", no_argument, NULL, OPTION_WARN_MULTIPLE_GP},
- '\0', NULL, N_("Warn if the multiple GP values are used"), TWO_DASHES },
+ '\0', NULL, N_("Warn if the multiple GP values are used"), TWO_DASHES },
{ {"warn-once", no_argument, NULL, OPTION_WARN_ONCE},
- '\0', NULL, N_("Warn only once per undefined symbol"), TWO_DASHES },
+ '\0', NULL, N_("Warn only once per undefined symbol"), TWO_DASHES },
{ {"warn-section-align", no_argument, NULL, OPTION_WARN_SECTION_ALIGN},
- '\0', NULL, N_("Warn if start of section changes due to alignment"),
- TWO_DASHES },
- { {"warn-unresolved-symbols", no_argument, NULL, OPTION_WARN_UNRESOLVED_SYMBOLS},
+ '\0', NULL, N_("Warn if start of section changes due to alignment"),
+ TWO_DASHES },
+ { {"warn-shared-textrel", no_argument, NULL, OPTION_WARN_SHARED_TEXTREL},
+ '\0', NULL, N_("Warn if shared object has DT_TEXTREL"),
+ TWO_DASHES },
+ { {"warn-unresolved-symbols", no_argument, NULL,
+ OPTION_WARN_UNRESOLVED_SYMBOLS},
'\0', NULL, N_("Report unresolved symbols as warnings"), TWO_DASHES },
- { {"error-unresolved-symbols", no_argument, NULL, OPTION_ERROR_UNRESOLVED_SYMBOLS},
+ { {"error-unresolved-symbols", no_argument, NULL,
+ OPTION_ERROR_UNRESOLVED_SYMBOLS},
'\0', NULL, N_("Report unresolved symbols as errors"), TWO_DASHES },
- { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL},
- '\0', NULL, N_("Treat warnings as errors"),
- TWO_DASHES },
{ {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
- '\0', NULL, N_("Include all objects from following archives"), TWO_DASHES },
- { {"as-needed", no_argument, NULL, OPTION_AS_NEEDED},
- '\0', NULL, N_("Only set DT_NEEDED for following dynamic libs if used"), TWO_DASHES },
- { {"no-as-needed", no_argument, NULL, OPTION_NO_AS_NEEDED},
- '\0', NULL, N_("Always set DT_NEEDED for following dynamic libs"), TWO_DASHES },
+ '\0', NULL, N_("Include all objects from following archives"),
+ TWO_DASHES },
{ {"wrap", required_argument, NULL, OPTION_WRAP},
- '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }
+ '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -678,6 +751,9 @@ parse_args (unsigned argc, char **argv)
case OPTION_DYNAMIC_LINKER:
command_line.interpreter = optarg;
break;
+ case OPTION_SYSROOT:
+ /* Already handled in ldmain.c. */
+ break;
case OPTION_EB:
command_line.endian = ENDIAN_BIG;
break;
@@ -734,7 +810,7 @@ parse_args (unsigned argc, char **argv)
/* Ignore. */
break;
case OPTION_GC_SECTIONS:
- command_line.gc_sections = TRUE;
+ link_info.gc_sections = TRUE;
break;
case OPTION_HELP:
help ();
@@ -777,19 +853,21 @@ parse_args (unsigned argc, char **argv)
demangling = FALSE;
break;
case OPTION_NO_GC_SECTIONS:
- command_line.gc_sections = FALSE;
+ link_info.gc_sections = FALSE;
break;
case OPTION_NO_KEEP_MEMORY:
link_info.keep_memory = FALSE;
break;
case OPTION_NO_UNDEFINED:
- link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_objects
+ = how_to_report_unresolved_symbols;
break;
case OPTION_ALLOW_SHLIB_UNDEFINED:
link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
break;
case OPTION_NO_ALLOW_SHLIB_UNDEFINED:
- link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_shared_libs
+ = how_to_report_unresolved_symbols;
break;
case OPTION_UNRESOLVED_SYMBOLS:
if (strcmp (optarg, "ignore-all") == 0)
@@ -799,17 +877,21 @@ parse_args (unsigned argc, char **argv)
}
else if (strcmp (optarg, "report-all") == 0)
{
- link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
- link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_objects
+ = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_shared_libs
+ = how_to_report_unresolved_symbols;
}
else if (strcmp (optarg, "ignore-in-object-files") == 0)
{
link_info.unresolved_syms_in_objects = RM_IGNORE;
- link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_shared_libs
+ = how_to_report_unresolved_symbols;
}
else if (strcmp (optarg, "ignore-in-shared-libs") == 0)
{
- link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
+ link_info.unresolved_syms_in_objects
+ = how_to_report_unresolved_symbols;
link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
}
else
@@ -822,20 +904,26 @@ parse_args (unsigned argc, char **argv)
if (link_info.unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)
link_info.unresolved_syms_in_shared_libs = RM_GENERATE_WARNING;
break;
-
+
case OPTION_ERROR_UNRESOLVED_SYMBOLS:
how_to_report_unresolved_symbols = RM_GENERATE_ERROR;
if (link_info.unresolved_syms_in_objects == RM_GENERATE_WARNING)
link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
if (link_info.unresolved_syms_in_shared_libs == RM_GENERATE_WARNING)
link_info.unresolved_syms_in_shared_libs = RM_GENERATE_ERROR;
- break;
+ break;
case OPTION_ALLOW_MULTIPLE_DEFINITION:
link_info.allow_multiple_definition = TRUE;
break;
case OPTION_NO_UNDEFINED_VERSION:
link_info.allow_undefined_version = FALSE;
break;
+ case OPTION_DEFAULT_SYMVER:
+ link_info.create_default_symver = TRUE;
+ break;
+ case OPTION_DEFAULT_IMPORTED_SYMVER:
+ link_info.default_imported_symver = TRUE;
+ break;
case OPTION_NO_WARN_MISMATCH:
command_line.warn_mismatch = FALSE;
break;
@@ -1008,6 +1096,15 @@ parse_args (unsigned argc, char **argv)
case OPTION_SORT_COMMON:
config.sort_common = TRUE;
break;
+ case OPTION_SORT_SECTION:
+ if (strcmp (optarg, N_("name")) == 0)
+ sort_section = by_name;
+ else if (strcmp (optarg, N_("alignment")) == 0)
+ sort_section = by_alignment;
+ else
+ einfo (_("%P%F: invalid section sorting option: %s\n"),
+ optarg);
+ break;
case OPTION_STATS:
config.stats = TRUE;
break;
@@ -1031,13 +1128,15 @@ parse_args (unsigned argc, char **argv)
/* Check for <something>=<somthing>... */
optarg2 = strchr (optarg, '=');
if (optarg2 == NULL)
- einfo (_("%P%F: invalid argument to option \"--section-start\"\n"));
+ einfo (_("%P%F: invalid argument to option"
+ " \"--section-start\"\n"));
optarg2++;
/* So far so good. Are all the args present? */
if ((*optarg == '\0') || (*optarg2 == '\0'))
- einfo (_("%P%F: missing argument(s) to option \"--section-start\"\n"));
+ einfo (_("%P%F: missing argument(s) to option"
+ " \"--section-start\"\n"));
/* We must copy the section name as set_section_start
doesn't do it for us. */
@@ -1055,13 +1154,13 @@ parse_args (unsigned argc, char **argv)
ldemul_list_emulation_options (stdout);
exit (0);
case OPTION_TBSS:
- set_section_start (".bss", optarg);
+ set_segment_start (".bss", optarg);
break;
case OPTION_TDATA:
- set_section_start (".data", optarg);
+ set_segment_start (".data", optarg);
break;
case OPTION_TTEXT:
- set_section_start (".text", optarg);
+ set_segment_start (".text", optarg);
break;
case OPTION_TRADITIONAL_FORMAT:
link_info.traditional_format = TRUE;
@@ -1141,9 +1240,18 @@ parse_args (unsigned argc, char **argv)
case OPTION_WARN_SECTION_ALIGN:
config.warn_section_align = TRUE;
break;
+ case OPTION_WARN_SHARED_TEXTREL:
+ link_info.warn_shared_textrel = TRUE;
+ break;
case OPTION_WHOLE_ARCHIVE:
whole_archive = TRUE;
break;
+ case OPTION_ADD_NEEDED:
+ add_needed = TRUE;
+ break;
+ case OPTION_NO_ADD_NEEDED:
+ add_needed = FALSE;
+ break;
case OPTION_AS_NEEDED:
/* XXX: --as-needed is broken on powerpc64 */
#ifndef __powerpc64__
@@ -1224,6 +1332,24 @@ parse_args (unsigned argc, char **argv)
case OPTION_FINI:
link_info.fini_function = optarg;
break;
+
+ case OPTION_REDUCE_MEMORY_OVERHEADS:
+ command_line.reduce_memory_overheads = TRUE;
+ if (config.hash_table_size == 0)
+ config.hash_table_size = 1021;
+ break;
+
+ case OPTION_HASH_SIZE:
+ {
+ bfd_size_type new_size;
+
+ new_size = strtoul (optarg, NULL, 0);
+ if (new_size)
+ config.hash_table_size = new_size;
+ else
+ einfo (_("%P%X: --hash-size needs a numeric argument\n"));
+ }
+ break;
}
}
@@ -1239,7 +1365,7 @@ parse_args (unsigned argc, char **argv)
if (link_info.unresolved_syms_in_objects == RM_NOT_YET_SET)
/* FIXME: Should we allow emulations a chance to set this ? */
link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
-
+
if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET)
/* FIXME: Should we allow emulations a chance to set this ? */
link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols;
@@ -1273,8 +1399,44 @@ set_section_start (char *sect, char *valstr)
bfd_vma val = bfd_scan_vma (valstr, &end, 16);
if (*end)
einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
- lang_section_start (sect, exp_intop (val));
+ lang_section_start (sect, exp_intop (val), NULL);
+}
+
+static void
+set_segment_start (const char *section, char *valstr)
+{
+ const char *name;
+ const char *end;
+ segment_type *seg;
+
+ bfd_vma val = bfd_scan_vma (valstr, &end, 16);
+ if (*end)
+ einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
+ /* If we already have an entry for this segment, update the existing
+ value. */
+ name = section + 1;
+ for (seg = segments; seg; seg = seg->next)
+ if (strcmp (seg->name, name) == 0)
+ {
+ seg->value = val;
+ return;
+ }
+ /* There was no existing value so we must create a new segment
+ entry. */
+ seg = stat_alloc (sizeof (*seg));
+ seg->name = name;
+ seg->value = val;
+ seg->used = FALSE;
+ /* Add it to the linked list of segments. */
+ seg->next = segments;
+ segments = seg;
+ /* Historically, -Ttext and friends set the base address of a
+ particular section. For backwards compatibility, we still do
+ that. If a SEGMENT_START directive is seen, the section address
+ assignment will be disabled. */
+ lang_section_start (section, exp_intop (val), seg);
}
+
/* Print help messages for the options. */
@@ -1283,6 +1445,7 @@ help (void)
{
unsigned i;
const char **targets, **pp;
+ int len;
printf (_("Usage: %s [options] file...\n"), program_name);
@@ -1292,7 +1455,6 @@ help (void)
if (ld_options[i].doc != NULL)
{
bfd_boolean comma;
- int len;
unsigned j;
printf (" ");
@@ -1365,6 +1527,10 @@ help (void)
printf ("%s\n", _(ld_options[i].doc));
}
}
+ printf (_(" @FILE"));
+ for (len = strlen (" @FILE"); len < 30; len++)
+ putchar (' ');
+ printf (_("Read options from FILE\n"));
/* Note: Various tools (such as libtool) depend upon the
format of the listings below - do not change them. */
diff --git a/contrib/binutils/ld/mri.c b/contrib/binutils/ld/mri.c
index f7edd8817ffe..5330df3b2adb 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, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -16,8 +16,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA.
This bit does the tree decoration when MRI style link scripts
are parsed.
@@ -44,14 +44,14 @@ struct section_name_struct {
int ok_to_load;
};
-unsigned int symbol_truncate = 10000;
-struct section_name_struct *order;
-struct section_name_struct *only_load;
-struct section_name_struct *address;
-struct section_name_struct *alias;
+static unsigned int symbol_truncate = 10000;
+static struct section_name_struct *order;
+static struct section_name_struct *only_load;
+static struct section_name_struct *address;
+static struct section_name_struct *alias;
-struct section_name_struct *alignment;
-struct section_name_struct *subalignment;
+static struct section_name_struct *alignment;
+static struct section_name_struct *subalignment;
static struct section_name_struct **
lookup (const char *name, struct section_name_struct **list)
@@ -120,19 +120,6 @@ mri_draw_tree (void)
if (done_tree)
return;
-#if 0 /* We don't bother with memory regions. */
- /* Create the regions. */
- {
- lang_memory_region_type *r;
-
- r = lang_memory_region_lookup("long");
- r->current = r->origin = exp_get_vma (base, (bfd_vma)0, "origin",
- lang_first_phase_enum);
- r->length = (bfd_size_type) exp_get_vma (0, ~(bfd_vma) 0, "length",
- lang_first_phase_enum);
- }
-#endif
-
/* Now build the statements for the ldlang machine. */
/* Attach the addresses of any which have addresses,
@@ -220,13 +207,13 @@ mri_draw_tree (void)
lang_enter_output_section_statement (p->name, base,
p->ok_to_load ? 0 : noload_section,
- align, subalign, NULL);
+ align, subalign, NULL, 0);
base = 0;
tmp = xmalloc (sizeof *tmp);
tmp->next = NULL;
tmp->spec.name = p->name;
tmp->spec.exclude_name_list = NULL;
- tmp->spec.sorted = FALSE;
+ tmp->spec.sorted = none;
lang_add_wild (NULL, tmp, FALSE);
/* If there is an alias for this section, add it too. */
@@ -237,7 +224,7 @@ mri_draw_tree (void)
tmp->next = NULL;
tmp->spec.name = aptr->name;
tmp->spec.exclude_name_list = NULL;
- tmp->spec.sorted = FALSE;
+ tmp->spec.sorted = none;
lang_add_wild (NULL, tmp, FALSE);
}
@@ -255,9 +242,6 @@ mri_load (const char *name)
{
base = 0;
lang_add_input_file (name, lang_input_file_is_file_enum, NULL);
-#if 0
- lang_leave_output_section_statement (0, "*default*");
-#endif
}
void
diff --git a/contrib/binutils/ld/mri.h b/contrib/binutils/ld/mri.h
index b430d20a056d..fcfba78b9407 100644
--- a/contrib/binutils/ld/mri.h
+++ b/contrib/binutils/ld/mri.h
@@ -15,13 +15,11 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef MRI_H
#define MRI_H
-extern unsigned int symbol_truncate;
-
extern void mri_output_section (const char *, etree_type *);
extern void mri_only_load (const char *);
extern void mri_base (etree_type *);
diff --git a/contrib/binutils/ld/pe-dll.c b/contrib/binutils/ld/pe-dll.c
index 45d00aedccb9..d4d42e4d36a2 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
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by DJ Delorie <dj@cygnus.com>
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -398,7 +398,7 @@ auto_export (bfd *abfd, def_file *d, const char *n)
libname = lbasename (abfd->my_archive->filename);
/* We should not re-export imported stuff. */
- if (strncmp (n, "_imp__", 6) == 0)
+ if (strncmp (n, "_imp_", 5) == 0)
return 0;
for (i = 0; i < d->num_exports; i++)
@@ -515,7 +515,7 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
s = bfd_get_section_by_name (b, ".drectve");
if (s)
{
- int size = bfd_get_section_size_before_reloc (s);
+ long size = s->size;
char *buf = xmalloc (size);
bfd_get_section_contents (b, s, buf, 0, size);
@@ -527,7 +527,7 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
/* If we are not building a DLL, when there are no exports
we do not build an export table at all. */
if (!pe_dll_export_everything && pe_def_file->num_exports == 0
- && !info->shared)
+ && info->executable)
return;
/* Now, maybe export everything else the default way. */
@@ -596,8 +596,13 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
have. */
int lead_at = (*pe_def_file->exports[i].name == '@');
char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at);
+ char *tmp_at = strchr (tmp, '@');
- *(strchr (tmp, '@')) = 0;
+ if (tmp_at)
+ *tmp_at = 0;
+ else
+ einfo (_("%XCannot export %s: invalid export name\n"),
+ pe_def_file->exports[i].name);
pe_def_file->exports[i].name = tmp;
}
}
@@ -680,6 +685,27 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
{
char *name;
+ /* Check for forward exports */
+ if (strchr (pe_def_file->exports[i].internal_name, '.'))
+ {
+ count_exported++;
+ if (!pe_def_file->exports[i].flag_noname)
+ count_exported_byname++;
+
+ pe_def_file->exports[i].flag_forward = 1;
+
+ if (pe_def_file->exports[i].ordinal != -1)
+ {
+ if (max_ordinal < pe_def_file->exports[i].ordinal)
+ max_ordinal = pe_def_file->exports[i].ordinal;
+ if (min_ordinal > pe_def_file->exports[i].ordinal)
+ min_ordinal = pe_def_file->exports[i].ordinal;
+ count_with_ordinals++;
+ }
+
+ continue;
+ }
+
name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
if (pe_details->underscored
&& (*pe_def_file->exports[i].internal_name != '@'))
@@ -757,7 +783,7 @@ build_filler_bfd (int include_edata)
bfd_get_arch (output_bfd),
bfd_get_mach (output_bfd)))
{
- einfo ("%X%P: can not create BFD %E\n");
+ einfo ("%X%P: can not create BFD: %E\n");
return;
}
@@ -837,7 +863,8 @@ generate_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
/* Now we need to assign ordinals to those that don't have them. */
for (i = 0; i < NE; i++)
{
- if (exported_symbol_sections[i])
+ if (exported_symbol_sections[i] ||
+ pe_def_file->exports[i].flag_forward)
{
if (pe_def_file->exports[i].ordinal != -1)
{
@@ -856,19 +883,26 @@ generate_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
}
name_table_size += strlen (pe_def_file->exports[i].name) + 1;
}
+
+ /* Reserve space for the forward name. */
+ if (pe_def_file->exports[i].flag_forward)
+ {
+ name_table_size += strlen (pe_def_file->exports[i].internal_name) + 1;
+ }
}
next_ordinal = min_ordinal;
for (i = 0; i < NE; i++)
- if (exported_symbol_sections[i])
- if (pe_def_file->exports[i].ordinal == -1)
- {
- while (exported_symbols[next_ordinal - min_ordinal] != -1)
- next_ordinal++;
+ if ((exported_symbol_sections[i] ||
+ pe_def_file->exports[i].flag_forward) &&
+ pe_def_file->exports[i].ordinal == -1)
+ {
+ while (exported_symbols[next_ordinal - min_ordinal] != -1)
+ next_ordinal++;
- exported_symbols[next_ordinal - min_ordinal] = i;
- pe_def_file->exports[i].ordinal = next_ordinal;
- }
+ exported_symbols[next_ordinal - min_ordinal] = i;
+ pe_def_file->exports[i].ordinal = next_ordinal;
+ }
/* OK, now we can allocate some memory. */
edata_sz = (40 /* directory */
@@ -920,7 +954,7 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
unsigned char *eaddresses;
unsigned char *enameptrs;
unsigned char *eordinals;
- unsigned char *enamestr;
+ char *enamestr;
time_t now;
time (&now);
@@ -932,7 +966,7 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
eaddresses = edata_d + 40;
enameptrs = eaddresses + 4 * export_table_size;
eordinals = enameptrs + 4 * count_exported_byname;
- enamestr = eordinals + 2 * count_exported_byname;
+ enamestr = (char *) eordinals + 2 * count_exported_byname;
#define ERVA(ptr) (((unsigned char *)(ptr) - edata_d) \
+ edata_s->output_section->vma - image_base)
@@ -967,15 +1001,28 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
for (s = 0; s < NE; s++)
{
struct bfd_section *ssec = exported_symbol_sections[s];
- if (ssec && pe_def_file->exports[s].ordinal != -1)
+ if (pe_def_file->exports[s].ordinal != -1 &&
+ (pe_def_file->exports[s].flag_forward || ssec != NULL))
{
- unsigned long srva = (exported_symbol_offsets[s]
- + ssec->output_section->vma
- + ssec->output_offset);
int ord = pe_def_file->exports[s].ordinal;
- bfd_put_32 (abfd, srva - image_base,
- eaddresses + 4 * (ord - min_ordinal));
+ if (pe_def_file->exports[s].flag_forward)
+ {
+ bfd_put_32 (abfd, ERVA (enamestr),
+ eaddresses + 4 * (ord - min_ordinal));
+
+ strcpy (enamestr, pe_def_file->exports[s].internal_name);
+ enamestr += strlen (pe_def_file->exports[s].internal_name) + 1;
+ }
+ else
+ {
+ unsigned long srva = (exported_symbol_offsets[s]
+ + ssec->output_section->vma
+ + ssec->output_offset);
+
+ bfd_put_32 (abfd, srva - image_base,
+ eaddresses + 4 * (ord - min_ordinal));
+ }
if (!pe_def_file->exports[s].flag_noname)
{
@@ -1178,9 +1225,6 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
free (relocs);
/* Warning: the allocated symbols are remembered in BFD and
reused later, so don't free them! */
-#if 0
- free (symbol);
-#endif
}
}
@@ -1252,7 +1296,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
if (page_ptr != (unsigned long) -1)
bfd_put_32 (abfd, reloc_sz - page_ptr, reloc_d + page_ptr + 4);
- while (reloc_sz < reloc_s->_raw_size)
+ while (reloc_sz < reloc_s->size)
reloc_d[reloc_sz++] = 0;
}
@@ -1674,7 +1718,7 @@ make_tail (bfd *parent)
bfd_set_section_size (abfd, id7, len);
d7 = xmalloc (len);
id7->contents = d7;
- strcpy (d7, dll_filename);
+ strcpy ((char *) d7, dll_filename);
bfd_set_symtab (abfd, symtab, symptr);
@@ -1897,7 +1941,7 @@ make_one (def_file_export *exp, bfd *parent)
memset (d6, 0, len);
d6[0] = exp->hint & 0xff;
d6[1] = exp->hint >> 8;
- strcpy (d6 + 2, exp->name);
+ strcpy ((char *) d6 + 2, exp->name);
}
bfd_set_symtab (abfd, symtab, symptr);
@@ -2037,9 +2081,6 @@ make_import_fixup_entry (const char *name,
symtab = xmalloc (6 * sizeof (asymbol *));
id3 = quick_section (abfd, ".idata$3", SEC_HAS_CONTENTS, 2);
-#if 0
- quick_symbol (abfd, U ("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0);
-#endif
quick_symbol (abfd, U ("_nm_thnk_"), name, "", UNDSEC, BSF_GLOBAL, 0);
quick_symbol (abfd, U (""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0);
quick_symbol (abfd, "", fixup_name, "", UNDSEC, BSF_GLOBAL, 0);
@@ -2231,7 +2272,7 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
if (!ISALNUM (dll_symname[i]))
dll_symname[i] = '_';
- unlink (impfilename);
+ unlink_if_ordinary (impfilename);
outarch = bfd_openw (impfilename, 0);
@@ -2243,8 +2284,8 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
}
/* xgettext:c-format */
- einfo (_("Creating library file: %s\n"), impfilename);
-
+ info_msg (_("Creating library file: %s\n"), impfilename);
+
bfd_set_format (outarch, bfd_archive);
outarch->has_armap = 1;
@@ -2278,10 +2319,10 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
head = ar_tail;
if (! bfd_set_archive_head (outarch, head))
- einfo ("%Xbfd_set_archive_head: %s\n", bfd_errmsg (bfd_get_error ()));
+ einfo ("%Xbfd_set_archive_head: %E\n");
if (! bfd_close (outarch))
- einfo ("%Xbfd_close %s: %s\n", impfilename, bfd_errmsg (bfd_get_error ()));
+ einfo ("%Xbfd_close %s: %E\n", impfilename);
while (head != NULL)
{
@@ -2303,7 +2344,7 @@ add_bfd_to_link (bfd *abfd, const char *name, struct bfd_link_info *link_info)
ldlang_add_file (fake_file);
if (!bfd_link_add_symbols (abfd, link_info))
- einfo ("%Xaddsym %s: %s\n", name, bfd_errmsg (bfd_get_error ()));
+ einfo ("%Xaddsym %s: %E\n", name);
}
void
@@ -2418,18 +2459,6 @@ pe_get32 (bfd *abfd, int where)
return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
}
-#if 0 /* This is not currently used. */
-
-static unsigned int
-pe_as16 (void *ptr)
-{
- unsigned char *b = ptr;
-
- return b[0] + (b[1] << 8);
-}
-
-#endif
-
static unsigned int
pe_as32 (void *ptr)
{
@@ -2445,7 +2474,8 @@ pe_implied_import_dll (const char *filename)
unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
unsigned long export_rva, export_size, nsections, secptr, expptr;
unsigned long exp_funcbase;
- unsigned char *expdata, *erva;
+ unsigned char *expdata;
+ char *erva;
unsigned long name_rvas, ordinals, nexp, ordbase;
const char *dll_name;
/* Initialization with start > end guarantees that is_data
@@ -2462,7 +2492,7 @@ pe_implied_import_dll (const char *filename)
dll = bfd_openr (filename, pe_details->target_name);
if (!dll)
{
- einfo ("%Xopen %s: %s\n", filename, bfd_errmsg (bfd_get_error ()));
+ einfo ("%Xopen %s: %E\n", filename);
return FALSE;
}
@@ -2555,7 +2585,7 @@ pe_implied_import_dll (const char *filename)
expdata = xmalloc (export_size);
bfd_seek (dll, (file_ptr) expptr, SEEK_SET);
bfd_bread (expdata, (bfd_size_type) export_size, dll);
- erva = expdata - export_rva;
+ erva = (char *) expdata - export_rva;
if (pe_def_file == 0)
pe_def_file = def_file_empty ();
@@ -2568,7 +2598,7 @@ pe_implied_import_dll (const char *filename)
/* Use internal dll name instead of filename
to enable symbolic dll linking. */
- dll_name = pe_as32 (expdata + 12) + erva;
+ dll_name = erva + pe_as32 (expdata + 12);
/* Check to see if the dll has already been added to
the definition list and if so return without error.
@@ -2653,19 +2683,19 @@ pe_dll_fill_sections (bfd *abfd, struct bfd_link_info *info)
bfd_set_section_size (filler_bfd, reloc_s, reloc_sz);
/* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, 0, NULL, TRUE);
+ lang_reset_memory_regions ();
+ lang_size_sections (NULL, TRUE);
/* Redo special stuff. */
ldemul_after_allocation ();
/* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section, NULL, 0);
+ lang_do_assignments ();
}
fill_edata (abfd, info);
- if (info->shared)
+ if (info->shared && !info->pie)
pe_data (abfd)->dll = 1;
edata_s->contents = edata_d;
@@ -2684,14 +2714,14 @@ pe_exe_fill_sections (bfd *abfd, struct bfd_link_info *info)
bfd_set_section_size (filler_bfd, reloc_s, reloc_sz);
/* Resize the sections. */
- lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, 0, NULL, TRUE);
+ lang_reset_memory_regions ();
+ lang_size_sections (NULL, TRUE);
/* Redo special stuff. */
ldemul_after_allocation ();
/* Do the assignments again. */
- lang_do_assignments (stat_ptr->head, abs_output_section, NULL, 0);
+ lang_do_assignments ();
}
reloc_s->contents = reloc_d;
}
diff --git a/contrib/binutils/ld/pe-dll.h b/contrib/binutils/ld/pe-dll.h
index 029bf339513c..c79e563b6985 100644
--- a/contrib/binutils/ld/pe-dll.h
+++ b/contrib/binutils/ld/pe-dll.h
@@ -1,5 +1,5 @@
/* pe-dll.h: Header file for routines used to build Windows DLLs.
- Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef PE_DLL_H
#define PE_DLL_H
diff --git a/contrib/binutils/ld/po/Make-in b/contrib/binutils/ld/po/Make-in
index 6b6cfda36139..dcd8cbac76e3 100644
--- a/contrib/binutils/ld/po/Make-in
+++ b/contrib/binutils/ld/po/Make-in
@@ -1,7 +1,8 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright 2003, 2006 Free Software Foundation, Inc.
#
-# This file file be copied and used freely without restrictions. It can
+# This file may be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
@@ -109,6 +110,7 @@ $(srcdir)/stamp-cat-id: $(PACKAGE).pot
install: install-exec install-data
install-exec:
install-info:
+install-html:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
@@ -184,7 +186,7 @@ check: all
cat-id-tbl.o: ../intl/libgettext.h
-dvi info tags TAGS ID:
+html dvi pdf ps info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
diff --git a/contrib/binutils/ld/po/POTFILES.in b/contrib/binutils/ld/po/POTFILES.in
index 55ae6ff2b997..5bb2e119c5ba 100644
--- a/contrib/binutils/ld/po/POTFILES.in
+++ b/contrib/binutils/ld/po/POTFILES.in
@@ -1,4 +1,5 @@
deffile.h
+elf-hints-local.h
emultempl/armcoff.em
emultempl/pe.em
ldcref.c
diff --git a/contrib/binutils/ld/po/ld.pot b/contrib/binutils/ld/po/ld.pot
index 371423c859d6..549ecf46adc5 100644
--- a/contrib/binutils/ld/po/ld.pot
+++ b/contrib/binutils/ld/po/ld.pot
@@ -7,7 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-07-11 13:58+0930\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-03-25 18:36+0100\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,10 +17,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: emultempl/armcoff.em:72
+#, c-format
msgid " --support-old-code Support interworking with old code\n"
msgstr ""
#: emultempl/armcoff.em:73
+#, c-format
msgid " --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"
msgstr ""
@@ -28,161 +31,191 @@ msgstr ""
msgid "Errors encountered processing file %s"
msgstr ""
-#: emultempl/armcoff.em:188 emultempl/pe.em:1396
+#: emultempl/armcoff.em:190 emultempl/pe.em:1460
msgid "%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"
msgstr ""
-#: emultempl/armcoff.em:193 emultempl/pe.em:1401
+#: emultempl/armcoff.em:195 emultempl/pe.em:1465
msgid "%P: warning: connot find thumb start symbol %s\n"
msgstr ""
-#: emultempl/pe.em:300
+#: emultempl/pe.em:304
+#, c-format
msgid ""
" --base_file <basefile> Generate a base file for relocatable "
"DLLs\n"
msgstr ""
-#: emultempl/pe.em:301
+#: emultempl/pe.em:305
+#, c-format
msgid ""
" --dll Set image base to the default for DLLs\n"
msgstr ""
-#: emultempl/pe.em:302
+#: emultempl/pe.em:306
+#, c-format
msgid " --file-alignment <size> Set file alignment\n"
msgstr ""
-#: emultempl/pe.em:303
+#: emultempl/pe.em:307
+#, c-format
msgid " --heap <size> Set initial size of the heap\n"
msgstr ""
-#: emultempl/pe.em:304
+#: emultempl/pe.em:308
+#, c-format
msgid ""
" --image-base <address> Set start address of the executable\n"
msgstr ""
-#: emultempl/pe.em:305
+#: emultempl/pe.em:309
+#, c-format
msgid ""
" --major-image-version <number> Set version number of the executable\n"
msgstr ""
-#: emultempl/pe.em:306
+#: emultempl/pe.em:310
+#, c-format
msgid " --major-os-version <number> Set minimum required OS version\n"
msgstr ""
-#: emultempl/pe.em:307
+#: emultempl/pe.em:311
+#, c-format
msgid ""
" --major-subsystem-version <number> Set minimum required OS subsystem "
"version\n"
msgstr ""
-#: emultempl/pe.em:308
+#: emultempl/pe.em:312
+#, c-format
msgid ""
" --minor-image-version <number> Set revision number of the executable\n"
msgstr ""
-#: emultempl/pe.em:309
+#: emultempl/pe.em:313
+#, c-format
msgid " --minor-os-version <number> Set minimum required OS revision\n"
msgstr ""
-#: emultempl/pe.em:310
+#: emultempl/pe.em:314
+#, c-format
msgid ""
" --minor-subsystem-version <number> Set minimum required OS subsystem "
"revision\n"
msgstr ""
-#: emultempl/pe.em:311
+#: emultempl/pe.em:315
+#, c-format
msgid " --section-alignment <size> Set section alignment\n"
msgstr ""
-#: emultempl/pe.em:312
+#: emultempl/pe.em:316
+#, c-format
msgid " --stack <size> Set size of the initial stack\n"
msgstr ""
-#: emultempl/pe.em:313
+#: emultempl/pe.em:317
+#, c-format
msgid ""
" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"
msgstr ""
-#: emultempl/pe.em:314
+#: emultempl/pe.em:318
+#, c-format
msgid ""
" --support-old-code Support interworking with old code\n"
msgstr ""
-#: emultempl/pe.em:315
+#: emultempl/pe.em:319
+#, c-format
msgid ""
" --thumb-entry=<symbol> Set the entry point to be Thumb "
"<symbol>\n"
msgstr ""
-#: emultempl/pe.em:317
+#: emultempl/pe.em:321
+#, c-format
msgid ""
" --add-stdcall-alias Export symbols with and without @nn\n"
msgstr ""
-#: emultempl/pe.em:318
+#: emultempl/pe.em:322
+#, c-format
msgid " --disable-stdcall-fixup Don't link _sym to _sym@nn\n"
msgstr ""
-#: emultempl/pe.em:319
+#: emultempl/pe.em:323
+#, c-format
msgid ""
" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"
msgstr ""
-#: emultempl/pe.em:320
+#: emultempl/pe.em:324
+#, c-format
msgid ""
" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"
msgstr ""
-#: emultempl/pe.em:321
+#: emultempl/pe.em:325
+#, c-format
msgid ""
" --exclude-libs lib,lib,... Exclude libraries from automatic "
"export\n"
msgstr ""
-#: emultempl/pe.em:322
+#: emultempl/pe.em:326
+#, c-format
msgid ""
" --export-all-symbols Automatically export all globals to "
"DLL\n"
msgstr ""
-#: emultempl/pe.em:323
+#: emultempl/pe.em:327
+#, c-format
msgid " --kill-at Remove @nn from exported symbols\n"
msgstr ""
-#: emultempl/pe.em:324
+#: emultempl/pe.em:328
+#, c-format
msgid " --out-implib <file> Generate import library\n"
msgstr ""
-#: emultempl/pe.em:325
+#: emultempl/pe.em:329
+#, c-format
msgid ""
" --output-def <file> Generate a .DEF file for the built DLL\n"
msgstr ""
-#: emultempl/pe.em:326
+#: emultempl/pe.em:330
+#, c-format
msgid " --warn-duplicate-exports Warn about duplicate exports.\n"
msgstr ""
-#: emultempl/pe.em:327
+#: emultempl/pe.em:331
+#, c-format
msgid ""
" --compat-implib Create backward compatible import "
"libs;\n"
" create __imp_<SYMBOL> as well.\n"
msgstr ""
-#: emultempl/pe.em:329
+#: emultempl/pe.em:333
+#, c-format
msgid ""
" --enable-auto-image-base Automatically choose image base for "
"DLLs\n"
" unless user specifies one\n"
msgstr ""
-#: emultempl/pe.em:331
+#: emultempl/pe.em:335
+#, c-format
msgid ""
" --disable-auto-image-base Do not auto-choose image base. "
"(default)\n"
msgstr ""
-#: emultempl/pe.em:332
+#: emultempl/pe.em:336
+#, c-format
msgid ""
" --dll-search-prefix=<string> When linking dynamically to a dll "
"without\n"
@@ -191,19 +224,22 @@ msgid ""
" in preference to lib<basename>.dll \n"
msgstr ""
-#: emultempl/pe.em:335
+#: emultempl/pe.em:339
+#, c-format
msgid ""
" --enable-auto-import Do sophistcated linking of _sym to\n"
" __imp_sym for DATA references\n"
msgstr ""
-#: emultempl/pe.em:337
+#: emultempl/pe.em:341
+#, c-format
msgid ""
" --disable-auto-import Do not auto-import DATA items from "
"DLLs\n"
msgstr ""
-#: emultempl/pe.em:338
+#: emultempl/pe.em:342
+#, c-format
msgid ""
" --enable-runtime-pseudo-reloc Work around auto-import limitations by\n"
" adding pseudo-relocations resolved "
@@ -211,14 +247,16 @@ msgid ""
" runtime.\n"
msgstr ""
-#: emultempl/pe.em:341
+#: emultempl/pe.em:345
+#, c-format
msgid ""
" --disable-runtime-pseudo-reloc Do not add runtime pseudo-relocations "
"for\n"
" auto-imported DATA.\n"
msgstr ""
-#: emultempl/pe.em:343
+#: emultempl/pe.em:347
+#, c-format
msgid ""
" --enable-extra-pe-debug Enable verbose debug output when "
"building\n"
@@ -226,7 +264,14 @@ msgid ""
"import)\n"
msgstr ""
-#: emultempl/pe.em:412
+#: emultempl/pe.em:350
+#, c-format
+msgid ""
+" --large-address-aware Executable supports virtual addresses\n"
+" greater than 2 gigabytes\n"
+msgstr ""
+
+#: emultempl/pe.em:417
msgid "%P: warning: bad version number in -subsystem option\n"
msgstr ""
@@ -234,105 +279,108 @@ msgstr ""
msgid "%P%F: invalid subsystem type %s\n"
msgstr ""
-#: emultempl/pe.em:460
+#: emultempl/pe.em:487
msgid "%P%F: invalid hex number for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:477
+#: emultempl/pe.em:504
msgid "%P%F: strange hex info for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:494
+#: emultempl/pe.em:521
#, c-format
msgid "%s: Can't open base file %s\n"
msgstr ""
-#: emultempl/pe.em:707
+#: emultempl/pe.em:737
msgid "%P: warning, file alignment > section alignment.\n"
msgstr ""
-#: emultempl/pe.em:794 emultempl/pe.em:821
+#: emultempl/pe.em:824 emultempl/pe.em:851
#, c-format
msgid "Warning: resolving %s by linking to %s\n"
msgstr ""
-#: emultempl/pe.em:799 emultempl/pe.em:826
+#: emultempl/pe.em:829 emultempl/pe.em:856
msgid "Use --enable-stdcall-fixup to disable these warnings\n"
msgstr ""
-#: emultempl/pe.em:800 emultempl/pe.em:827
+#: emultempl/pe.em:830 emultempl/pe.em:857
msgid "Use --disable-stdcall-fixup to disable these fixups\n"
msgstr ""
-#: emultempl/pe.em:846
+#: emultempl/pe.em:876
#, c-format
msgid "%C: Cannot get section contents - auto-import exception\n"
msgstr ""
-#: emultempl/pe.em:883
+#: emultempl/pe.em:913
#, c-format
msgid "Info: resolving %s by linking to %s (auto-import)\n"
msgstr ""
-#: emultempl/pe.em:954
+#: emultempl/pe.em:986
msgid "%F%P: PE operations on non PE file.\n"
msgstr ""
-#: emultempl/pe.em:1188
+#: emultempl/pe.em:1261
#, c-format
msgid "Errors encountered processing file %s\n"
msgstr ""
-#: emultempl/pe.em:1211
+#: emultempl/pe.em:1284
#, c-format
msgid "Errors encountered processing file %s for interworking"
msgstr ""
-#: emultempl/pe.em:1273 ldlang.c:1904 ldlang.c:4397 ldlang.c:4428
-#: ldmain.c:1122
+#: emultempl/pe.em:1345 ldexp.c:522 ldlang.c:2946 ldlang.c:5800 ldlang.c:5831
+#: ldmain.c:1167
msgid "%P%F: bfd_link_hash_lookup failed: %E\n"
msgstr ""
-#: ldcref.c:153
+#: ldcref.c:154
msgid "%X%P: bfd_hash_table_init of cref table failed: %E\n"
msgstr ""
-#: ldcref.c:159
+#: ldcref.c:160
msgid "%X%P: cref_hash_lookup failed: %E\n"
msgstr ""
-#: ldcref.c:225
+#: ldcref.c:226
+#, c-format
msgid ""
"\n"
"Cross Reference Table\n"
"\n"
msgstr ""
-#: ldcref.c:226
+#: ldcref.c:227
msgid "Symbol"
msgstr ""
-#: ldcref.c:234
+#: ldcref.c:235
+#, c-format
msgid "File\n"
msgstr ""
-#: ldcref.c:238
+#: ldcref.c:239
+#, c-format
msgid "No symbols\n"
msgstr ""
-#: ldcref.c:384
-msgid "%P: symbol `%T' missing from main hash table\n"
-msgstr ""
-
-#: ldcref.c:448
+#: ldcref.c:360 ldcref.c:482
msgid "%B%F: could not read symbols; %E\n"
msgstr ""
-#: ldcref.c:452 ldmain.c:1187 ldmain.c:1191
+#: ldcref.c:364 ldcref.c:486 ldmain.c:1232 ldmain.c:1236
msgid "%B%F: could not read symbols: %E\n"
msgstr ""
-#: ldcref.c:517 ldcref.c:524 ldmain.c:1234 ldmain.c:1241
+#: ldcref.c:415
+msgid "%P: symbol `%T' missing from main hash table\n"
+msgstr ""
+
+#: ldcref.c:557 ldcref.c:564 ldmain.c:1279 ldmain.c:1286
msgid "%B%F: could not read relocs: %E\n"
msgstr ""
@@ -340,7 +388,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:543
+#: ldcref.c:591
msgid "%X%C: prohibited cross reference from %s to `%T' in %s\n"
msgstr ""
@@ -367,1243 +415,1333 @@ msgid ""
"\n"
msgstr ""
-#: ldemul.c:247
+#: ldemul.c:236
#, c-format
msgid "%S SYSLIB ignored\n"
msgstr ""
-#: ldemul.c:254
+#: ldemul.c:242
#, c-format
msgid "%S HLL ignored\n"
msgstr ""
-#: ldemul.c:275
+#: ldemul.c:262
msgid "%P: unrecognised emulation mode: %s\n"
msgstr ""
-#: ldemul.c:276
+#: ldemul.c:263
msgid "Supported emulations: "
msgstr ""
-#: ldemul.c:320
+#: ldemul.c:305
+#, c-format
msgid " no emulation specific options.\n"
msgstr ""
-#: ldexp.c:148
-msgid "%F%P: %s uses undefined section %s\n"
-msgstr ""
-
-#: ldexp.c:150
-msgid "%F%P: %s forward reference of section %s\n"
-msgstr ""
-
-#: ldexp.c:355
+#: ldexp.c:338
#, c-format
msgid "%F%S %% by zero\n"
msgstr ""
-#: ldexp.c:362
+#: ldexp.c:346
#, c-format
msgid "%F%S / by zero\n"
msgstr ""
-#: ldexp.c:533
+#: ldexp.c:536
#, c-format
msgid "%X%S: unresolvable symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:553
+#: ldexp.c:547
#, c-format
msgid "%F%S: undefined symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:677
+#: ldexp.c:608 ldexp.c:621
+#, c-format
+msgid "%F%S: undefined MEMORY region `%s' referenced in expression\n"
+msgstr ""
+
+#: ldexp.c:683
#, c-format
msgid "%F%S can not PROVIDE assignment to location counter\n"
msgstr ""
-#: ldexp.c:687
+#: ldexp.c:697
#, c-format
msgid "%F%S invalid assignment to location counter\n"
msgstr ""
-#: ldexp.c:691
+#: ldexp.c:700
#, c-format
msgid "%F%S assignment to location counter invalid outside of SECTION\n"
msgstr ""
-#: ldexp.c:700
+#: ldexp.c:709
msgid "%F%S cannot move location counter backwards (from %V to %V)\n"
msgstr ""
-#: ldexp.c:727
+#: ldexp.c:748
msgid "%P%F:%s: hash creation failed\n"
msgstr ""
-#: ldexp.c:1003 ldexp.c:1035
+#: ldexp.c:1000 ldexp.c:1025
#, c-format
msgid "%F%S nonconstant expression for %s\n"
msgstr ""
-#: ldexp.c:1089
+#: ldexp.c:1082
#, c-format
msgid "%F%S non constant expression for %s\n"
msgstr ""
-#: ldfile.c:144
+#: ldfile.c:139
#, c-format
msgid "attempt to open %s failed\n"
msgstr ""
-#: ldfile.c:146
+#: ldfile.c:141
#, c-format
msgid "attempt to open %s succeeded\n"
msgstr ""
-#: ldfile.c:152
+#: ldfile.c:147
msgid "%F%P: invalid BFD target `%s'\n"
msgstr ""
-#: ldfile.c:258 ldfile.c:275
+#: ldfile.c:255 ldfile.c:282
msgid "%P: skipping incompatible %s when searching for %s\n"
msgstr ""
-#: ldfile.c:377
-msgid "%F%P: cannot open %s for %s: %E\n"
+#: ldfile.c:267
+msgid "%F%P: attempted static link of dynamic object `%s'\n"
msgstr ""
-#: ldfile.c:380
-msgid "%F%P: cannot open %s: %E\n"
+#: ldfile.c:384
+msgid "%F%P: %s (%s): No such file: %E\n"
msgstr ""
-#: ldfile.c:410
+#: ldfile.c:387
+msgid "%F%P: %s: No such file: %E\n"
+msgstr ""
+
+#: ldfile.c:417
msgid "%F%P: cannot find %s inside %s\n"
msgstr ""
-#: ldfile.c:413
+#: ldfile.c:420
msgid "%F%P: cannot find %s\n"
msgstr ""
-#: ldfile.c:430 ldfile.c:446
+#: ldfile.c:437 ldfile.c:453
#, c-format
msgid "cannot find script file %s\n"
msgstr ""
-#: ldfile.c:432 ldfile.c:448
+#: ldfile.c:439 ldfile.c:455
#, c-format
msgid "opened script file %s\n"
msgstr ""
-#: ldfile.c:492
+#: ldfile.c:499
msgid "%P%F: cannot open linker script file %s: %E\n"
msgstr ""
-#: ldfile.c:529
-msgid "%P%F: unknown architecture: %s\n"
+#: ldfile.c:546
+msgid "%P%F: cannot represent machine `%s'\n"
+msgstr ""
+
+#: ldlang.c:940 ldlang.c:982 ldlang.c:2695
+msgid "%P%F: can not create hash table: %E\n"
msgstr ""
-#: ldfile.c:543
-msgid "%P%F: target architecture respecified\n"
+#: ldlang.c:1025
+msgid "%P:%S: warning: redeclaration of memory region '%s'\n"
msgstr ""
-#: ldfile.c:594
-msgid "%P%F: cannot represent machine `%s'\n"
+#: ldlang.c:1031
+msgid "%P:%S: warning: memory region %s not declared\n"
+msgstr ""
+
+#: ldlang.c:1108 ldlang.c:1135
+msgid "%P%F: failed creating section `%s': %E\n"
msgstr ""
-#: ldlang.c:640
+#: ldlang.c:1601
msgid ""
"\n"
"Memory Configuration\n"
"\n"
msgstr ""
-#: ldlang.c:642
+#: ldlang.c:1603
msgid "Name"
msgstr ""
-#: ldlang.c:642
+#: ldlang.c:1603
msgid "Origin"
msgstr ""
-#: ldlang.c:642
+#: ldlang.c:1603
msgid "Length"
msgstr ""
-#: ldlang.c:642
+#: ldlang.c:1603
msgid "Attributes"
msgstr ""
-#: ldlang.c:682
+#: ldlang.c:1643
+#, c-format
msgid ""
"\n"
"Linker script and memory map\n"
"\n"
msgstr ""
-#: ldlang.c:698
+#: ldlang.c:1709
msgid "%P%F: Illegal use of `%s' section\n"
msgstr ""
-#: ldlang.c:707
+#: ldlang.c:1716
msgid "%P%F: output format %s cannot represent section called %s\n"
msgstr ""
-#: ldlang.c:867
-msgid "%P: %B: warning: ignoring duplicate section `%s'\n"
-msgstr ""
-
-#: ldlang.c:870
-msgid "%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n"
-msgstr ""
-
-#: ldlang.c:884
-msgid "%P: %B: warning: duplicate section `%s' has different size\n"
-msgstr ""
-
-#: ldlang.c:936
-msgid "%P%F: Failed to create hash table\n"
-msgstr ""
-
-#: ldlang.c:1351
+#: ldlang.c:2313
msgid "%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1352
+#: ldlang.c:2314
msgid "%B: matching formats:"
msgstr ""
-#: ldlang.c:1359
+#: ldlang.c:2321
msgid "%F%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1418
+#: ldlang.c:2385
msgid "%F%B: member %B in archive is not an object\n"
msgstr ""
-#: ldlang.c:1429 ldlang.c:1443
+#: ldlang.c:2396 ldlang.c:2410
msgid "%F%B: could not read symbols: %E\n"
msgstr ""
-#: ldlang.c:1698
+#: ldlang.c:2665
msgid ""
"%P: warning: could not find any targets that match endianness requirement\n"
msgstr ""
-#: ldlang.c:1711
+#: ldlang.c:2679
msgid "%P%F: target %s not found\n"
msgstr ""
-#: ldlang.c:1713
+#: ldlang.c:2681
msgid "%P%F: cannot open output file %s: %E\n"
msgstr ""
-#: ldlang.c:1723
+#: ldlang.c:2687
msgid "%P%F:%s: can not make object file: %E\n"
msgstr ""
-#: ldlang.c:1727
+#: ldlang.c:2691
msgid "%P%F:%s: can not set architecture: %E\n"
msgstr ""
-#: ldlang.c:1731
-msgid "%P%F: can not create link hash table: %E\n"
+#: ldlang.c:2839
+msgid "%P%F: bfd_hash_lookup failed creating symbol %s\n"
msgstr ""
-#: ldlang.c:2069
+#: ldlang.c:2857
+msgid "%P%F: bfd_hash_allocate failed creating symbol %s\n"
+msgstr ""
+
+#: ldlang.c:3288
msgid " load address 0x%V"
msgstr ""
-#: ldlang.c:2204
+#: ldlang.c:3528
msgid "%W (size before relaxing)\n"
msgstr ""
-#: ldlang.c:2288
+#: ldlang.c:3615
#, c-format
msgid "Address of section %s set to "
msgstr ""
-#: ldlang.c:2443
+#: ldlang.c:3768
#, c-format
msgid "Fail with %d\n"
msgstr ""
-#: ldlang.c:2683
+#: ldlang.c:4040
msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"
msgstr ""
-#: ldlang.c:2711
+#: ldlang.c:4065
msgid "%X%P: address 0x%v of %B section %s is not within region %s\n"
msgstr ""
-#: ldlang.c:2719
+#: ldlang.c:4074
msgid "%X%P: region %s is full (%B section %s)\n"
msgstr ""
-#: ldlang.c:2770
+#: ldlang.c:4114
+#, c-format
+msgid ""
+"%F%S: non constant or forward reference address expression for section %s\n"
+msgstr ""
+
+#: ldlang.c:4139
msgid "%P%X: Internal error on COFF shared library section %s\n"
msgstr ""
-#: ldlang.c:2826
+#: ldlang.c:4197
msgid "%P%F: error: no memory region specified for loadable section `%s'\n"
msgstr ""
-#: ldlang.c:2830
+#: ldlang.c:4202
msgid "%P: warning: no memory region specified for loadable section `%s'\n"
msgstr ""
-#: ldlang.c:2846
-msgid "%P: warning: changing start of section %s by %u bytes\n"
+#: ldlang.c:4224
+msgid "%P: warning: changing start of section %s by %lu bytes\n"
msgstr ""
-#: ldlang.c:2859
-#, c-format
-msgid "%F%S: non constant address expression for section %s\n"
-msgstr ""
-
-#: ldlang.c:3036
+#: ldlang.c:4388
msgid "%P%F: can't relax section: %E\n"
msgstr ""
-#: ldlang.c:3232
+#: ldlang.c:4636
msgid "%F%P: invalid data statement\n"
msgstr ""
-#: ldlang.c:3269
+#: ldlang.c:4669
msgid "%F%P: invalid reloc statement\n"
msgstr ""
-#: ldlang.c:3408
+#: ldlang.c:4802
msgid "%P%F:%s: can't set start address\n"
msgstr ""
-#: ldlang.c:3421 ldlang.c:3439
+#: ldlang.c:4815 ldlang.c:4834
msgid "%P%F: can't set start address\n"
msgstr ""
-#: ldlang.c:3433
+#: ldlang.c:4827
msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n"
msgstr ""
-#: ldlang.c:3444
+#: ldlang.c:4839
msgid "%P: warning: cannot find entry symbol %s; not setting start address\n"
msgstr ""
-#: ldlang.c:3488
+#: ldlang.c:4888
msgid ""
"%P%F: Relocatable linking with relocations from format %s (%B) to format %s "
"(%B) is not supported\n"
msgstr ""
-#: ldlang.c:3497
+#: ldlang.c:4898
msgid ""
"%P: warning: %s architecture of input file `%B' is incompatible with %s "
"output\n"
msgstr ""
-#: ldlang.c:3518
-msgid "%E%X: failed to merge target specific data of file %B\n"
+#: ldlang.c:4920
+msgid "%P%X: failed to merge target specific data of file %B\n"
msgstr ""
-#: ldlang.c:3604
+#: ldlang.c:5004
msgid ""
"\n"
"Allocating common symbols\n"
msgstr ""
-#: ldlang.c:3605
+#: ldlang.c:5005
msgid ""
"Common symbol size file\n"
"\n"
msgstr ""
-#. This message happens when using the
-#. svr3.ifile linker script, so I have
-#. disabled it.
-#: ldlang.c:3681
-msgid "%P: no [COMMON] command, defaulting to .bss\n"
+#: ldlang.c:5131
+msgid "%P%F: invalid syntax in flags\n"
msgstr ""
-#: ldlang.c:3737
-msgid "%P%F: invalid syntax in flags\n"
+#: ldlang.c:5406
+msgid "%P%F: Failed to create hash table\n"
msgstr ""
-#: ldlang.c:4325
-msgid "%P%Fmultiple STARTUP files\n"
+#: ldlang.c:5722
+msgid "%P%F: multiple STARTUP files\n"
msgstr ""
-#: ldlang.c:4368
+#: ldlang.c:5770
msgid "%X%P:%S: section has both a load address and a load region\n"
msgstr ""
-#: ldlang.c:4608
+#: ldlang.c:6007
msgid "%F%P: bfd_record_phdr failed: %E\n"
msgstr ""
-#: ldlang.c:4627
+#: ldlang.c:6027
msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n"
msgstr ""
-#: ldlang.c:4919
+#: ldlang.c:6418
msgid "%X%P: unknown language `%s' in version information\n"
msgstr ""
-#: ldlang.c:4969
+#: ldlang.c:6560
msgid ""
"%X%P: anonymous version tag cannot be combined with other version tags\n"
msgstr ""
-#: ldlang.c:4977
+#: ldlang.c:6569
msgid "%X%P: duplicate version tag `%s'\n"
msgstr ""
-#: ldlang.c:4990 ldlang.c:5003
+#: ldlang.c:6589 ldlang.c:6598 ldlang.c:6615 ldlang.c:6625
msgid "%X%P: duplicate expression `%s' in version information\n"
msgstr ""
-#: ldlang.c:5043
+#: ldlang.c:6665
msgid "%X%P: unable to find version dependency `%s'\n"
msgstr ""
-#: ldlang.c:5065
+#: ldlang.c:6687
msgid "%X%P: unable to read .exports section contents\n"
msgstr ""
-#: ldmain.c:247
+#: ldmain.c:232
msgid "%X%P: can't set BFD default target to `%s': %E\n"
msgstr ""
-#: ldmain.c:349
-msgid "%P%F: -r and --mpc860c0 may not be used together\n"
-msgstr ""
-
-#: ldmain.c:351
+#: ldmain.c:345
msgid "%P%F: --relax and -r may not be used together\n"
msgstr ""
-#: ldmain.c:353
+#: ldmain.c:347
msgid "%P%F: -r and -shared may not be used together\n"
msgstr ""
-#: ldmain.c:359
+#: ldmain.c:353
msgid "%P%F: -F may not be used without -shared\n"
msgstr ""
-#: ldmain.c:361
+#: ldmain.c:355
msgid "%P%F: -f may not be used without -shared\n"
msgstr ""
-#: ldmain.c:403
+#: ldmain.c:397
msgid "using external linker script:"
msgstr ""
-#: ldmain.c:405
+#: ldmain.c:399
msgid "using internal linker script:"
msgstr ""
-#: ldmain.c:439
+#: ldmain.c:433
msgid "%P%F: no input files\n"
msgstr ""
-#: ldmain.c:443
+#: ldmain.c:437
msgid "%P: mode %s\n"
msgstr ""
-#: ldmain.c:459
+#: ldmain.c:453
msgid "%P%F: cannot open map file %s: %E\n"
msgstr ""
-#: ldmain.c:489
+#: ldmain.c:485
msgid "%P: link errors found, deleting executable `%s'\n"
msgstr ""
-#: ldmain.c:498
+#: ldmain.c:494
msgid "%F%B: final close failed: %E\n"
msgstr ""
-#: ldmain.c:524
+#: ldmain.c:520
msgid "%X%P: unable to open for source of copy `%s'\n"
msgstr ""
-#: ldmain.c:527
+#: ldmain.c:523
msgid "%X%P: unable to open for destination of copy `%s'\n"
msgstr ""
-#: ldmain.c:534
+#: ldmain.c:530
msgid "%P: Error writing file `%s'\n"
msgstr ""
-#: ldmain.c:539 pe-dll.c:1443
+#: ldmain.c:535 pe-dll.c:1494
#, c-format
msgid "%P: Error closing file `%s'\n"
msgstr ""
-#: ldmain.c:555
+#: ldmain.c:551
#, c-format
msgid "%s: total time in link: %ld.%06ld\n"
msgstr ""
-#: ldmain.c:558
+#: ldmain.c:554
#, c-format
msgid "%s: data size %ld\n"
msgstr ""
-#: ldmain.c:596
+#: ldmain.c:637
msgid "%P%F: missing argument to -m\n"
msgstr ""
-#: ldmain.c:741 ldmain.c:759 ldmain.c:789
+#: ldmain.c:784 ldmain.c:803 ldmain.c:834
msgid "%P%F: bfd_hash_table_init failed: %E\n"
msgstr ""
-#: ldmain.c:745 ldmain.c:763
+#: ldmain.c:788 ldmain.c:807
msgid "%P%F: bfd_hash_lookup failed: %E\n"
msgstr ""
-#: ldmain.c:777
+#: ldmain.c:821
msgid "%X%P: error: duplicate retain-symbols-file\n"
msgstr ""
-#: ldmain.c:819
+#: ldmain.c:864
msgid "%P%F: bfd_hash_lookup for insertion failed: %E\n"
msgstr ""
-#: ldmain.c:824
+#: ldmain.c:869
msgid "%P: `-retain-symbols-file' overrides `-s' and `-S'\n"
msgstr ""
-#: ldmain.c:899
+#: ldmain.c:944
+#, c-format
msgid ""
"Archive member included because of file (symbol)\n"
"\n"
msgstr ""
-#: ldmain.c:969
+#: ldmain.c:1014
msgid "%X%C: multiple definition of `%T'\n"
msgstr ""
-#: ldmain.c:972
+#: ldmain.c:1017
msgid "%D: first defined here\n"
msgstr ""
-#: ldmain.c:976
+#: ldmain.c:1021
msgid "%P: Disabling relaxation: it will not work with multiple definitions\n"
msgstr ""
-#: ldmain.c:1006
+#: ldmain.c:1051
msgid "%B: warning: definition of `%T' overriding common\n"
msgstr ""
-#: ldmain.c:1009
+#: ldmain.c:1054
msgid "%B: warning: common is here\n"
msgstr ""
-#: ldmain.c:1016
+#: ldmain.c:1061
msgid "%B: warning: common of `%T' overridden by definition\n"
msgstr ""
-#: ldmain.c:1019
+#: ldmain.c:1064
msgid "%B: warning: defined here\n"
msgstr ""
-#: ldmain.c:1026
+#: ldmain.c:1071
msgid "%B: warning: common of `%T' overridden by larger common\n"
msgstr ""
-#: ldmain.c:1029
+#: ldmain.c:1074
msgid "%B: warning: larger common is here\n"
msgstr ""
-#: ldmain.c:1033
+#: ldmain.c:1078
msgid "%B: warning: common of `%T' overriding smaller common\n"
msgstr ""
-#: ldmain.c:1036
+#: ldmain.c:1081
msgid "%B: warning: smaller common is here\n"
msgstr ""
-#: ldmain.c:1040
+#: ldmain.c:1085
msgid "%B: warning: multiple common of `%T'\n"
msgstr ""
-#: ldmain.c:1042
+#: ldmain.c:1087
msgid "%B: warning: previous common is here\n"
msgstr ""
-#: ldmain.c:1062 ldmain.c:1100
+#: ldmain.c:1107 ldmain.c:1145
msgid "%P: warning: global constructor %s used\n"
msgstr ""
-#: ldmain.c:1110
+#: ldmain.c:1155
msgid "%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"
msgstr ""
-#: ldmain.c:1287 ldmisc.c:533
+#. We found a reloc for the symbol we are looking for.
+#: ldmain.c:1209 ldmain.c:1211 ldmain.c:1213 ldmain.c:1251 ldmain.c:1299
+msgid "warning: "
+msgstr ""
+
+#: ldmain.c:1334
msgid "%F%P: bfd_hash_table_init failed: %E\n"
msgstr ""
-#: ldmain.c:1294 ldmisc.c:540
+#: ldmain.c:1341
msgid "%F%P: bfd_hash_lookup failed: %E\n"
msgstr ""
-#: ldmain.c:1314
-msgid "%C: undefined reference to `%T'\n"
+#: ldmain.c:1362
+msgid "%X%C: undefined reference to `%T'\n"
+msgstr ""
+
+#: ldmain.c:1365
+msgid "%C: warning: undefined reference to `%T'\n"
msgstr ""
-#: ldmain.c:1320
-msgid "%D: more undefined references to `%T' follow\n"
+#: ldmain.c:1371
+msgid "%X%D: more undefined references to `%T' follow\n"
msgstr ""
-#: ldmain.c:1327
-msgid "%B: undefined reference to `%T'\n"
+#: ldmain.c:1374
+msgid "%D: warning: more undefined references to `%T' follow\n"
msgstr ""
-#: ldmain.c:1333
-msgid "%B: more undefined references to `%T' follow\n"
+#: ldmain.c:1385
+msgid "%X%B: undefined reference to `%T'\n"
msgstr ""
-#: ldmain.c:1364 ldmain.c:1392 ldmain.c:1410
-msgid "%P%X: generated"
+#: ldmain.c:1388
+msgid "%B: warning: undefined reference to `%T'\n"
msgstr ""
-#: ldmain.c:1371
+#: ldmain.c:1394
+msgid "%X%B: more undefined references to `%T' follow\n"
+msgstr ""
+
+#: ldmain.c:1397
+msgid "%B: warning: more undefined references to `%T' follow\n"
+msgstr ""
+
+#: ldmain.c:1436
msgid " additional relocation overflows omitted from the output\n"
msgstr ""
-#: ldmain.c:1375
-msgid " relocation truncated to fit: %s %T"
+#: ldmain.c:1449
+msgid " relocation truncated to fit: %s against undefined symbol `%T'"
+msgstr ""
+
+#: ldmain.c:1454
+msgid ""
+" relocation truncated to fit: %s against symbol `%T' defined in %A section "
+"in %B"
msgstr ""
-#: ldmain.c:1395
+#: ldmain.c:1466
+msgid " relocation truncated to fit: %s against `%T'"
+msgstr ""
+
+#: ldmain.c:1483
#, c-format
-msgid "dangerous relocation: %s\n"
+msgid "%X%C: dangerous relocation: %s\n"
msgstr ""
-#: ldmain.c:1413
-msgid " reloc refers to symbol `%T' which is not being output\n"
+#: ldmain.c:1498
+msgid "%X%C: reloc refers to symbol `%T' which is not being output\n"
msgstr ""
#: ldmisc.c:147
+#, c-format
msgid "no symbol"
msgstr ""
-#: ldmisc.c:211
+#: ldmisc.c:238
#, c-format
msgid "built in linker script:%u"
msgstr ""
-#: ldmisc.c:260 ldmisc.c:264
+#: ldmisc.c:294 ldmisc.c:298
msgid "%B%F: could not read symbols\n"
msgstr ""
-#: ldmisc.c:291
-msgid ": In function `%T':\n"
+#: ldmisc.c:340
+msgid "%B: In function `%T'"
msgstr ""
-#: ldmisc.c:438
+#: ldmisc.c:510
msgid "%F%P: internal error %s %d\n"
msgstr ""
-#: ldmisc.c:484
+#: ldmisc.c:556
msgid "%P: internal error: aborting at %s line %d in %s\n"
msgstr ""
-#: ldmisc.c:487
+#: ldmisc.c:559
msgid "%P: internal error: aborting at %s line %d\n"
msgstr ""
-#: ldmisc.c:489
+#: ldmisc.c:561
msgid "%P%F: please report this bug\n"
msgstr ""
#. Output for noisy == 2 is intended to follow the GNU standards.
-#: ldver.c:39
+#: ldver.c:38
#, c-format
msgid "GNU ld version %s\n"
msgstr ""
-#: ldver.c:43
-msgid "Copyright 2002 Free Software Foundation, Inc.\n"
+#: ldver.c:42
+#, c-format
+msgid "Copyright 2005 Free Software Foundation, Inc.\n"
msgstr ""
-#: ldver.c:44
+#: ldver.c:43
+#, 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:53
+#: ldver.c:52
+#, c-format
msgid " Supported emulations:\n"
msgstr ""
-#: ldwrite.c:54 ldwrite.c:190
+#: ldwrite.c:55 ldwrite.c:191
msgid "%P%F: bfd_new_link_order failed\n"
msgstr ""
-#: ldwrite.c:310
+#: ldwrite.c:344
+msgid "%F%P: cannot create split section name for %s\n"
+msgstr ""
+
+#: ldwrite.c:356
msgid "%F%P: clone section failed: %E\n"
msgstr ""
-#: ldwrite.c:348
+#: ldwrite.c:394
#, c-format
msgid "%8x something else\n"
msgstr ""
-#: ldwrite.c:525
+#: ldwrite.c:564
msgid "%F%P: final link failed: %E\n"
msgstr ""
-#: lexsup.c:179 lexsup.c:284
+#: lexsup.c:196 lexsup.c:328
msgid "KEYWORD"
msgstr ""
-#: lexsup.c:179
+#: lexsup.c:196
msgid "Shared library control for HP/UX compatibility"
msgstr ""
-#: lexsup.c:182
+#: lexsup.c:199
msgid "ARCH"
msgstr ""
-#: lexsup.c:182
+#: lexsup.c:199
msgid "Set architecture"
msgstr ""
-#: lexsup.c:184 lexsup.c:357
+#: lexsup.c:201 lexsup.c:422
msgid "TARGET"
msgstr ""
-#: lexsup.c:184
+#: lexsup.c:201
msgid "Specify target for following input files"
msgstr ""
-#: lexsup.c:186 lexsup.c:229 lexsup.c:241 lexsup.c:254 lexsup.c:329
-#: lexsup.c:364 lexsup.c:408
+#: lexsup.c:204 lexsup.c:253 lexsup.c:265 lexsup.c:278 lexsup.c:381
+#: lexsup.c:434 lexsup.c:491
msgid "FILE"
msgstr ""
-#: lexsup.c:186
+#: lexsup.c:204
msgid "Read MRI format linker script"
msgstr ""
-#: lexsup.c:188
+#: lexsup.c:206
msgid "Force common symbols to be defined"
msgstr ""
-#: lexsup.c:192 lexsup.c:398 lexsup.c:400 lexsup.c:402
+#: lexsup.c:210 lexsup.c:476 lexsup.c:478 lexsup.c:480
msgid "ADDRESS"
msgstr ""
-#: lexsup.c:192
+#: lexsup.c:210
msgid "Set start address"
msgstr ""
-#: lexsup.c:194
+#: lexsup.c:212
msgid "Export all dynamic symbols"
msgstr ""
-#: lexsup.c:196
+#: lexsup.c:214
msgid "Link big-endian objects"
msgstr ""
-#: lexsup.c:198
+#: lexsup.c:216
msgid "Link little-endian objects"
msgstr ""
-#: lexsup.c:200 lexsup.c:203
+#: lexsup.c:218 lexsup.c:221
msgid "SHLIB"
msgstr ""
-#: lexsup.c:200
+#: lexsup.c:218
msgid "Auxiliary filter for shared object symbol table"
msgstr ""
-#: lexsup.c:203
+#: lexsup.c:221
msgid "Filter for shared object symbol table"
msgstr ""
-#: lexsup.c:205
+#: lexsup.c:224
msgid "Ignored"
msgstr ""
-#: lexsup.c:207
+#: lexsup.c:226
msgid "SIZE"
msgstr ""
-#: lexsup.c:207
+#: lexsup.c:226
msgid "Small data size (if no size, same as --shared)"
msgstr ""
-#: lexsup.c:210
+#: lexsup.c:229
msgid "FILENAME"
msgstr ""
-#: lexsup.c:210
+#: lexsup.c:229
msgid "Set internal name of shared library"
msgstr ""
-#: lexsup.c:212
+#: lexsup.c:231
msgid "PROGRAM"
msgstr ""
-#: lexsup.c:212
+#: lexsup.c:231
msgid "Set PROGRAM as the dynamic linker to use"
msgstr ""
-#: lexsup.c:214
+#: lexsup.c:234
msgid "LIBNAME"
msgstr ""
-#: lexsup.c:214
+#: lexsup.c:234
msgid "Search for library LIBNAME"
msgstr ""
-#: lexsup.c:216
+#: lexsup.c:236
msgid "DIRECTORY"
msgstr ""
-#: lexsup.c:216
+#: lexsup.c:236
msgid "Add DIRECTORY to library search path"
msgstr ""
-#: lexsup.c:218
+#: lexsup.c:239
+msgid "Override the default sysroot location"
+msgstr ""
+
+#: lexsup.c:241
msgid "EMULATION"
msgstr ""
-#: lexsup.c:218
+#: lexsup.c:241
msgid "Set emulation"
msgstr ""
-#: lexsup.c:220
+#: lexsup.c:243
msgid "Print map file on standard output"
msgstr ""
-#: lexsup.c:222
+#: lexsup.c:245
msgid "Do not page align data"
msgstr ""
-#: lexsup.c:224
+#: lexsup.c:247
msgid "Do not page align data, do not make text readonly"
msgstr ""
-#: lexsup.c:227
+#: lexsup.c:250
msgid "Page align data, make text readonly"
msgstr ""
-#: lexsup.c:229
+#: lexsup.c:253
msgid "Set output file name"
msgstr ""
-#: lexsup.c:231
+#: lexsup.c:255
msgid "Optimize output file"
msgstr ""
-#: lexsup.c:233
+#: lexsup.c:257
msgid "Ignored for SVR4 compatibility"
msgstr ""
-#: lexsup.c:237
+#: lexsup.c:261
msgid "Generate relocatable output"
msgstr ""
-#: lexsup.c:241
+#: lexsup.c:265
msgid "Just link symbols (if directory, same as --rpath)"
msgstr ""
-#: lexsup.c:244
+#: lexsup.c:268
msgid "Strip all symbols"
msgstr ""
-#: lexsup.c:246
+#: lexsup.c:270
msgid "Strip debugging symbols"
msgstr ""
-#: lexsup.c:248
+#: lexsup.c:272
msgid "Strip symbols in discarded sections"
msgstr ""
-#: lexsup.c:250
+#: lexsup.c:274
msgid "Do not strip symbols in discarded sections"
msgstr ""
-#: lexsup.c:252
+#: lexsup.c:276
msgid "Trace file opens"
msgstr ""
-#: lexsup.c:254
+#: lexsup.c:278
msgid "Read linker script"
msgstr ""
-#: lexsup.c:256 lexsup.c:272 lexsup.c:315 lexsup.c:327 lexsup.c:392
-#: lexsup.c:411 lexsup.c:431
+#: lexsup.c:280 lexsup.c:298 lexsup.c:364 lexsup.c:379 lexsup.c:469
+#: lexsup.c:494 lexsup.c:521
msgid "SYMBOL"
msgstr ""
-#: lexsup.c:256
+#: lexsup.c:280
msgid "Start with undefined reference to SYMBOL"
msgstr ""
-#: lexsup.c:258
+#: lexsup.c:283
msgid "[=SECTION]"
msgstr ""
-#: lexsup.c:258
+#: lexsup.c:284
msgid "Don't merge input [SECTION | orphan] sections"
msgstr ""
-#: lexsup.c:260
+#: lexsup.c:286
msgid "Build global constructor/destructor tables"
msgstr ""
-#: lexsup.c:262
+#: lexsup.c:288
msgid "Print version information"
msgstr ""
-#: lexsup.c:264
+#: lexsup.c:290
msgid "Print version and emulation information"
msgstr ""
-#: lexsup.c:266
+#: lexsup.c:292
msgid "Discard all local symbols"
msgstr ""
-#: lexsup.c:268
+#: lexsup.c:294
msgid "Discard temporary local symbols (default)"
msgstr ""
-#: lexsup.c:270
+#: lexsup.c:296
msgid "Don't discard any local symbols"
msgstr ""
-#: lexsup.c:272
+#: lexsup.c:298
msgid "Trace mentions of SYMBOL"
msgstr ""
-#: lexsup.c:274 lexsup.c:366 lexsup.c:368
+#: lexsup.c:300 lexsup.c:436 lexsup.c:438
msgid "PATH"
msgstr ""
-#: lexsup.c:274
+#: lexsup.c:300
msgid "Default search path for Solaris compatibility"
msgstr ""
-#: lexsup.c:276
+#: lexsup.c:303
msgid "Start a group"
msgstr ""
-#: lexsup.c:278
+#: lexsup.c:305
msgid "End a group"
msgstr ""
-#: lexsup.c:280
+#: lexsup.c:309
msgid "Accept input files whose architecture cannot be determined"
msgstr ""
-#: lexsup.c:282
+#: lexsup.c:313
msgid "Reject input files whose architecture is unknown"
msgstr ""
-#: lexsup.c:284
+#: lexsup.c:316
+msgid ""
+"Set DT_NEEDED tags for DT_NEEDED entries in\n"
+"\t\t\t\tfollowing dynamic libs"
+msgstr ""
+
+#: lexsup.c:319
+msgid ""
+"Do not set DT_NEEDED tags for DT_NEEDED entries\n"
+"\t\t\t\tin following dynamic libs"
+msgstr ""
+
+#: lexsup.c:322
+msgid "Only set DT_NEEDED for following dynamic libs if used"
+msgstr ""
+
+#: lexsup.c:325
+msgid "Always set DT_NEEDED for following dynamic libs"
+msgstr ""
+
+#: lexsup.c:328
msgid "Ignored for SunOS compatibility"
msgstr ""
-#: lexsup.c:286
+#: lexsup.c:330
msgid "Link against shared libraries"
msgstr ""
-#: lexsup.c:292
+#: lexsup.c:336
msgid "Do not link against shared libraries"
msgstr ""
-#: lexsup.c:300
+#: lexsup.c:344
msgid "Bind global references locally"
msgstr ""
-#: lexsup.c:302
+#: lexsup.c:346
msgid "Check section addresses for overlaps (default)"
msgstr ""
-#: lexsup.c:304
+#: lexsup.c:349
msgid "Do not check section addresses for overlaps"
msgstr ""
-#: lexsup.c:307
+#: lexsup.c:352
msgid "Output cross reference table"
msgstr ""
-#: lexsup.c:309
+#: lexsup.c:354
msgid "SYMBOL=EXPRESSION"
msgstr ""
-#: lexsup.c:309
+#: lexsup.c:354
msgid "Define a symbol"
msgstr ""
-#: lexsup.c:311
+#: lexsup.c:356
msgid "[=STYLE]"
msgstr ""
-#: lexsup.c:311
+#: lexsup.c:356
msgid "Demangle symbol names [using STYLE]"
msgstr ""
-#: lexsup.c:313
+#: lexsup.c:359
msgid "Generate embedded relocs"
msgstr ""
-#: lexsup.c:315
+#: lexsup.c:361
+msgid "Treat warnings as errors"
+msgstr ""
+
+#: lexsup.c:364
msgid "Call SYMBOL at unload-time"
msgstr ""
-#: lexsup.c:317
+#: lexsup.c:366
msgid "Force generation of file with .exe suffix"
msgstr ""
-#: lexsup.c:319
+#: lexsup.c:368
msgid "Remove unused sections (on some targets)"
msgstr ""
-#: lexsup.c:322
+#: lexsup.c:371
msgid "Don't remove unused sections (default)"
msgstr ""
-#: lexsup.c:325
+#: lexsup.c:374
+msgid "Set default hash table size close to <NUMBER>"
+msgstr ""
+
+#: lexsup.c:377
msgid "Print option help"
msgstr ""
-#: lexsup.c:327
+#: lexsup.c:379
msgid "Call SYMBOL at load-time"
msgstr ""
-#: lexsup.c:329
+#: lexsup.c:381
msgid "Write a map file"
msgstr ""
-#: lexsup.c:331
+#: lexsup.c:383
msgid "Do not define Common storage"
msgstr ""
-#: lexsup.c:333
+#: lexsup.c:385
msgid "Do not demangle symbol names"
msgstr ""
-#: lexsup.c:335
+#: lexsup.c:387
msgid "Use less memory and more disk I/O"
msgstr ""
-#: lexsup.c:337
-msgid "Allow no undefined symbols"
+#: lexsup.c:389
+msgid "Do not allow unresolved references in object files"
msgstr ""
-#: lexsup.c:339
-msgid "Allow undefined symbols in shared objects (the default)"
+#: lexsup.c:392
+msgid "Allow unresolved references in shared libaries"
msgstr ""
-#: lexsup.c:341
-msgid "Do not allow undefined symbols in shared objects"
+#: lexsup.c:396
+msgid "Do not allow unresolved references in shared libs"
msgstr ""
-#: lexsup.c:343
+#: lexsup.c:400
msgid "Allow multiple definitions"
msgstr ""
-#: lexsup.c:345
+#: lexsup.c:402
msgid "Disallow undefined version"
msgstr ""
-#: lexsup.c:347
+#: lexsup.c:404
+msgid "Create default symbol version"
+msgstr ""
+
+#: lexsup.c:407
+msgid "Create default symbol version for imported symbols"
+msgstr ""
+
+#: lexsup.c:410
msgid "Don't warn about mismatched input files"
msgstr ""
-#: lexsup.c:349
+#: lexsup.c:412
msgid "Turn off --whole-archive"
msgstr ""
-#: lexsup.c:351
+#: lexsup.c:414
msgid "Create an output file even if errors occur"
msgstr ""
-#: lexsup.c:355
+#: lexsup.c:419
msgid ""
"Only use library directories specified on\n"
"\t\t\t\tthe command line"
msgstr ""
-#: lexsup.c:357
+#: lexsup.c:422
msgid "Specify target of output file"
msgstr ""
-#: lexsup.c:359
+#: lexsup.c:425
msgid "Ignored for Linux compatibility"
msgstr ""
-#: lexsup.c:361
+#: lexsup.c:428
+msgid "Reduce memory overheads, possibly taking much longer"
+msgstr ""
+
+#: lexsup.c:431
msgid "Relax branches on certain targets"
msgstr ""
-#: lexsup.c:364
+#: lexsup.c:434
msgid "Keep only symbols listed in FILE"
msgstr ""
-#: lexsup.c:366
+#: lexsup.c:436
msgid "Set runtime shared library search path"
msgstr ""
-#: lexsup.c:368
+#: lexsup.c:438
msgid "Set link time shared library search path"
msgstr ""
-#: lexsup.c:370
+#: lexsup.c:441
msgid "Create a shared library"
msgstr ""
-#: lexsup.c:374
+#: lexsup.c:445
msgid "Create a position independent executable"
msgstr ""
-#: lexsup.c:378
+#: lexsup.c:449
msgid "Sort common symbols by size"
msgstr ""
-#: lexsup.c:382
+#: lexsup.c:453
+msgid "name|alignment"
+msgstr ""
+
+#: lexsup.c:454
+msgid "Sort sections by name or maximum alignment"
+msgstr ""
+
+#: lexsup.c:456
msgid "COUNT"
msgstr ""
-#: lexsup.c:382
+#: lexsup.c:456
msgid "How many tags to reserve in .dynamic section"
msgstr ""
-#: lexsup.c:384
+#: lexsup.c:459
msgid "[=SIZE]"
msgstr ""
-#: lexsup.c:384
+#: lexsup.c:459
msgid "Split output sections every SIZE octets"
msgstr ""
-#: lexsup.c:386
+#: lexsup.c:462
msgid "[=COUNT]"
msgstr ""
-#: lexsup.c:386
+#: lexsup.c:462
msgid "Split output sections every COUNT relocs"
msgstr ""
-#: lexsup.c:388
+#: lexsup.c:465
msgid "Print memory usage statistics"
msgstr ""
-#: lexsup.c:390
+#: lexsup.c:467
msgid "Display target specific options"
msgstr ""
-#: lexsup.c:392
+#: lexsup.c:469
msgid "Do task level linking"
msgstr ""
-#: lexsup.c:394
+#: lexsup.c:471
msgid "Use same format as native linker"
msgstr ""
-#: lexsup.c:396
+#: lexsup.c:473
msgid "SECTION=ADDRESS"
msgstr ""
-#: lexsup.c:396
+#: lexsup.c:473
msgid "Set address of named section"
msgstr ""
-#: lexsup.c:398
+#: lexsup.c:476
msgid "Set address of .bss section"
msgstr ""
-#: lexsup.c:400
+#: lexsup.c:478
msgid "Set address of .data section"
msgstr ""
-#: lexsup.c:402
+#: lexsup.c:480
msgid "Set address of .text section"
msgstr ""
-#: lexsup.c:404
+#: lexsup.c:483
+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
msgid "Output lots of information during link"
msgstr ""
-#: lexsup.c:408
+#: lexsup.c:491
msgid "Read version information script"
msgstr ""
-#: lexsup.c:411
+#: lexsup.c:494
msgid ""
"Take export symbols list from .exports, using\n"
"\t\t\t\tSYMBOL as the version."
msgstr ""
-#: lexsup.c:414
+#: lexsup.c:497
msgid "Warn about duplicate common symbols"
msgstr ""
-#: lexsup.c:416
+#: lexsup.c:499
msgid "Warn if global constructors/destructors are seen"
msgstr ""
-#: lexsup.c:419
+#: lexsup.c:502
msgid "Warn if the multiple GP values are used"
msgstr ""
-#: lexsup.c:421
+#: lexsup.c:504
msgid "Warn only once per undefined symbol"
msgstr ""
-#: lexsup.c:423
+#: lexsup.c:506
msgid "Warn if start of section changes due to alignment"
msgstr ""
-#: lexsup.c:426
-msgid "Treat warnings as errors"
+#: lexsup.c:509
+msgid "Warn if shared object has DT_TEXTREL"
msgstr ""
-#: lexsup.c:429
-msgid "Include all objects from following archives"
+#: lexsup.c:513
+msgid "Report unresolved symbols as warnings"
msgstr ""
-#: lexsup.c:431
-msgid "Use wrapper functions for SYMBOL"
+#: lexsup.c:516
+msgid "Report unresolved symbols as errors"
msgstr ""
-#: lexsup.c:433
-msgid "[=WORDS]"
+#: lexsup.c:518
+msgid "Include all objects from following archives"
msgstr ""
-#: lexsup.c:433
-msgid ""
-"Modify problematic branches in last WORDS (1-10,\n"
-"\t\t\t\tdefault 5) words of a page"
+#: lexsup.c:521
+msgid "Use wrapper functions for SYMBOL"
msgstr ""
-#: lexsup.c:602
+#: lexsup.c:668
msgid "%P: unrecognized option '%s'\n"
msgstr ""
-#: lexsup.c:604
+#: lexsup.c:670
msgid "%P%F: use the --help option for usage information\n"
msgstr ""
-#: lexsup.c:622
+#: lexsup.c:688
msgid "%P%F: unrecognized -a option `%s'\n"
msgstr ""
-#: lexsup.c:635
+#: lexsup.c:701
msgid "%P%F: unrecognized -assert option `%s'\n"
msgstr ""
-#: lexsup.c:678
+#: lexsup.c:744
msgid "%F%P: unknown demangling style `%s'"
msgstr ""
-#: lexsup.c:737
+#: lexsup.c:806
msgid "%P%F: invalid number `%s'\n"
msgstr ""
+#: lexsup.c:898
+msgid "%P%F: bad --unresolved-symbols option: %s\n"
+msgstr ""
+
#. This can happen if the user put "-rpath,a" on the command
#. line. (Or something similar. The comma is important).
#. Getopt becomes confused and thinks that this is a -r option
@@ -1612,138 +1750,167 @@ 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:849
+#: lexsup.c:969
msgid "%P%F: bad -rpath option\n"
msgstr ""
-#: lexsup.c:953
+#: lexsup.c:1081
msgid "%P%F: -shared not supported\n"
msgstr ""
-#: lexsup.c:962
+#: lexsup.c:1090
msgid "%P%F: -pie not supported\n"
msgstr ""
-#: lexsup.c:994
+#: lexsup.c:1100
+msgid "name"
+msgstr ""
+
+#: lexsup.c:1102
+msgid "alignment"
+msgstr ""
+
+#: lexsup.c:1105
+msgid "%P%F: invalid section sorting option: %s\n"
+msgstr ""
+
+#: lexsup.c:1131
msgid "%P%F: invalid argument to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:1000
+#: lexsup.c:1138
msgid "%P%F: missing argument(s) to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:1158
+#: lexsup.c:1312
msgid "%P%F: may not nest groups (--help for usage)\n"
msgstr ""
-#: lexsup.c:1165
+#: lexsup.c:1319
msgid "%P%F: group ended before it began (--help for usage)\n"
msgstr ""
-#: lexsup.c:1179
-msgid "%P%F: invalid argument to option \"mpc860c0\"\n"
+#: lexsup.c:1347
+msgid "%P%X: --hash-size needs a numeric argument\n"
msgstr ""
-#: lexsup.c:1234
+#: lexsup.c:1398 lexsup.c:1411
msgid "%P%F: invalid hex number `%s'\n"
msgstr ""
-#: lexsup.c:1246
+#: lexsup.c:1447
#, c-format
msgid "Usage: %s [options] file...\n"
msgstr ""
-#: lexsup.c:1248
+#: lexsup.c:1449
+#, c-format
msgid "Options:\n"
msgstr ""
+#: lexsup.c:1527
+#, c-format
+msgid " @FILE"
+msgstr ""
+
+#: lexsup.c:1530
+#, 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:1331
+#: lexsup.c:1535
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: lexsup.c:1339
+#: lexsup.c:1543
#, c-format
msgid "%s: supported emulations: "
msgstr ""
-#: lexsup.c:1344
+#: lexsup.c:1548
#, c-format
msgid "%s: emulation specific options:\n"
msgstr ""
-#: lexsup.c:1348
+#: lexsup.c:1552
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: mri.c:307
+#: mri.c:291
msgid "%P%F: unknown format type %s\n"
msgstr ""
-#: pe-dll.c:301
+#: pe-dll.c:303
#, c-format
msgid "%XUnsupported PEI architecture: %s\n"
msgstr ""
-#: pe-dll.c:650
+#: pe-dll.c:604
#, c-format
-msgid "%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"
+msgid "%XCannot export %s: invalid export name\n"
msgstr ""
#: pe-dll.c:657
#, c-format
+msgid "%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"
+msgstr ""
+
+#: pe-dll.c:664
+#, c-format
msgid "Warning, duplicate EXPORT: %s\n"
msgstr ""
-#: pe-dll.c:723
+#: pe-dll.c:751
#, c-format
msgid "%XCannot export %s: symbol not defined\n"
msgstr ""
-#: pe-dll.c:729
+#: pe-dll.c:757
#, c-format
msgid "%XCannot export %s: symbol wrong type (%d vs %d)\n"
msgstr ""
-#: pe-dll.c:736
+#: pe-dll.c:764
#, c-format
msgid "%XCannot export %s: symbol not found\n"
msgstr ""
-#: pe-dll.c:848
+#: pe-dll.c:877
#, c-format
msgid "%XError, ordinal used twice: %d (%s vs %s)\n"
msgstr ""
-#: pe-dll.c:1165
+#: pe-dll.c:1219
#, c-format
msgid "%XError: %d-bit reloc in dll\n"
msgstr ""
-#: pe-dll.c:1296
+#: pe-dll.c:1347
#, c-format
msgid "%s: Can't open output def file %s\n"
msgstr ""
-#: pe-dll.c:1439
+#: pe-dll.c:1490
+#, c-format
msgid "; no contents available\n"
msgstr ""
-#: pe-dll.c:2203
+#: pe-dll.c:2252
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:2233
+#: pe-dll.c:2282
#, c-format
msgid "%XCan't open .lib file: %s\n"
msgstr ""
-#: pe-dll.c:2238
+#: pe-dll.c:2287
#, 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 187a289d1f57..ac0c7256e2ea 100644
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ b/contrib/binutils/ld/scripttempl/elf.sc
@@ -3,6 +3,8 @@
# 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 ...
@@ -10,20 +12,27 @@
# OTHER_TEXT_SECTIONS - these get put in .text when relocating
# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
# (e.g., .PARISC.global)
-# OTHER_BSS_SECTIONS - other than .bss .sbss ...
+# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
+# (e.g. PPC32 .fixup, .got[12])
# 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.
+# DATA_END_SYMBOLS - symbols that appear at the end of the
+# writeable data sections.
# 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.
@@ -36,7 +45,13 @@
# 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.
+# OTHER_SYMBOLS - symbols to place right at the end of the script.
+# ETEXT_NAME - name of a symbol for the end of the text section,
+# normally etext.
+# 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.
@@ -62,6 +77,9 @@
# .debug_info .gnu.linkonce.wi.foo
# .tdata .gnu.linkonce.td.foo
# .tbss .gnu.linkonce.tb.foo
+# .lrodata .gnu.linkonce.lr.foo
+# .ldata .gnu.linkonce.l.foo
+# .lbss .gnu.linkonce.lb.foo
#
# Each of these can also have corresponding .rel.* and .rela.* sections.
@@ -72,30 +90,44 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI
test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=.
+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
DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
+DATA_SEGMENT_RELRO_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 (.);"
+ DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
fi
INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-test -z "$GOT" && GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
+if test -z "$PLT"; then
+ PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+fi
+test -n "${DATA_PLT-${BSS_PLT-text}}" && TEXT_PLT=yes
+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=".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* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.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 = .);}
+ ${RELOCATING+${SBSS_START_SYMBOLS}}
+ ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
*(.dynsbss)
*(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
*(.scommon)
- ${RELOCATING+PROVIDE (__sbss_end = .);}
- ${RELOCATING+PROVIDE (___sbss_end = .);}
+ ${RELOCATING+${SBSS_END_SYMBOLS}}
}"
SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
SDATA="/* We want the small data sections together, so single-instruction offsets
@@ -104,9 +136,14 @@ if test -z "${NO_SMALL_DATA}"; then
.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.*}) }"
+ SDATA2=".sdata2 ${RELOCATING-0} :
+ {
+ ${RELOCATING+${SDATA2_START_SYMBOLS}}
+ *(.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.*}) }
@@ -115,7 +152,43 @@ if test -z "${NO_SMALL_DATA}"; then
.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
+if test -z "${DATA_GOT}"; then
+ if test -n "${NO_SMALL_DATA}"; then
+ DATA_GOT=" "
+ fi
+fi
+if test -z "${SDATA_GOT}"; then
+ if test -z "${NO_SMALL_DATA}"; then
+ SDATA_GOT=" "
+ fi
+fi
+test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
+test "${LARGE_SECTIONS}" = "yes" && REL_LARGE="
+ .rel.ldata ${RELOCATING-0} : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) }
+ .rela.ldata ${RELOCATING-0} : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) }
+ .rel.lbss ${RELOCATING-0} : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) }
+ .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="
+ .lbss ${RELOCATING-0} :
+ {
+ *(.dynlbss)
+ *(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*})
+ *(LARGE_COMMON)
+ }
+ .lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
+ {
+ *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*})
+ }
+ .ldata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
+ {
+ *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*})
+ ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
+ }"
CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
@@ -132,7 +205,7 @@ CTOR=".ctors ${CONSTRUCTING-0} :
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 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 */
@@ -170,8 +243,6 @@ 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
@@ -211,6 +282,8 @@ eval $COMBRELOCCAT <<EOF
.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+* .rel.gnu.linkonce.d.rel.ro.*}) }
+ .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+* .rela.gnu.linkonce.d.rel.ro.*}) }
.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.*}) }
@@ -230,6 +303,7 @@ eval $COMBRELOCCAT <<EOF
${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.*}) }
+ ${REL_LARGE}
EOF
if [ -n "$COMBRELOC" ]; then
cat <<EOF
@@ -259,11 +333,13 @@ cat <<EOF
${RELOCATING+${INIT_END}}
} =${NOP-0}
- ${DATA_PLT-${BSS_PLT-${PLT}}}
+ ${TEXT_PLT+${PLT}}
+ ${TINY_READONLY_SECTION}
.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}}
@@ -274,15 +350,17 @@ cat <<EOF
KEEP (*(.fini))
${RELOCATING+${FINI_END}}
} =${NOP-0}
- ${RELOCATING+PROVIDE (__etext = .);}
- ${RELOCATING+PROVIDE (_etext = .);}
- ${RELOCATING+PROVIDE (etext = .);}
+ ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
+ ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
+ ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
${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 { *(.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. */
@@ -290,50 +368,69 @@ cat <<EOF
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}}
- .preinit_array ${RELOCATING-0} : { *(.preinit_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}}
+ /* Exception handling */
+ .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.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} :
+ {
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_start = .);}}
+ KEEP (*(.preinit_array))
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_end = .);}}
+ }
+ .init_array ${RELOCATING-0} :
+ {
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_start = .);}}
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_end = .);}}
+ }
+ .fini_array ${RELOCATING-0} :
+ {
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_start = .);}}
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
+ }
+ ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
+ .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}}
- .init_array ${RELOCATING-0} : { *(.init_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}}
+ ${RELOCATING+${DATARELRO}}
+ ${OTHER_RELRO_SECTIONS}
+ ${TEXT_DYNAMIC-${DYNAMIC}}
+ ${DATA_GOT+${RELRO_NOW+${GOT}}}
+ ${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
+ ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
+ ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
+ ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
+ ${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}}
- .fini_array ${RELOCATING-0} : { *(.fini_array) }
- ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
+ ${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) }
- .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
- .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
- .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) }
- .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }
${WRITABLE_RODATA+${RODATA}}
${OTHER_READWRITE_SECTIONS}
- ${TEXT_DYNAMIC-${DYNAMIC}}
- ${RELOCATING+${CTOR}}
- ${RELOCATING+${DTOR}}
- .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
- ${DATA_PLT+${PLT}}
- ${RELOCATING+${OTHER_GOT_SYMBOLS}}
- ${GOT}
- ${OTHER_GOT_SECTIONS}
- ${CREATE_SHLIB+${SDATA2}}
- ${CREATE_SHLIB+${SBSS2}}
+ ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
+ ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
+ ${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS}}}
+ ${SDATA_GOT+${GOT}}
+ ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
${SDATA}
${OTHER_SDATA_SECTIONS}
- ${RELOCATING+_edata = .;}
- ${RELOCATING+PROVIDE (edata = .);}
+ ${RELOCATING+${DATA_END_SYMBOLS-_edata = .; PROVIDE (edata = .);}}
${RELOCATING+__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
${SBSS}
@@ -345,14 +442,17 @@ cat <<EOF
*(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});}
+ .bss section disappears because there are no input sections.
+ FIXME: Why do we need it? When there is no .bss section, we don't
+ pad the .data section. */
+ ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
}
- ${OTHER_BSS_SECTIONS}
- ${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${RELOCATING+_end = .;}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
- ${RELOCATING+PROVIDE (end = .);}
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${LARGE_SECTIONS}
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${RELOCATING+${OTHER_END_SYMBOLS}}
+ ${RELOCATING+${END_SYMBOLS-_end = .; PROVIDE (end = .);}}
${RELOCATING+${DATA_SEGMENT_END}}
/* Stabs debugging sections. */
@@ -396,9 +496,12 @@ cat <<EOF
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
+ ${TINY_DATA_SECTION}
+ ${TINY_BSS_SECTION}
+
${STACK_ADDR+${STACK}}
${OTHER_SECTIONS}
- ${RELOCATING+${OTHER_END_SYMBOLS}}
+ ${RELOCATING+${OTHER_SYMBOLS}}
${RELOCATING+${STACKNOTE}}
}
EOF
diff --git a/contrib/binutils/ld/scripttempl/mips.sc b/contrib/binutils/ld/scripttempl/mips.sc
index d60aeedfeebc..972351f754b3 100644
--- a/contrib/binutils/ld/scripttempl/mips.sc
+++ b/contrib/binutils/ld/scripttempl/mips.sc
@@ -29,9 +29,6 @@ SECTIONS
*(.init)
${RELOCATING+ eprol = .};
*(.text)
- ${RELOCATING+PROVIDE (__runtime_reloc_start = .);}
- *(.rel.sdata)
- ${RELOCATING+PROVIDE (__runtime_reloc_stop = .);}
*(.fini)
${RELOCATING+ etext = .};
${RELOCATING+ _etext = .};
diff --git a/contrib/binutils/ld/scripttempl/pe.sc b/contrib/binutils/ld/scripttempl/pe.sc
index da09eb430481..c9931b51489c 100644
--- a/contrib/binutils/ld/scripttempl/pe.sc
+++ b/contrib/binutils/ld/scripttempl/pe.sc
@@ -24,7 +24,11 @@ if test "${RELOCATING}"; then
SORT(*)(.idata$5)
SORT(*)(.idata$6)
SORT(*)(.idata$7)'
- R_CRT='*(SORT(.CRT$*))'
+ 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$)
@@ -46,11 +50,13 @@ ${OUTPUT_ARCH+OUTPUT_ARCH(${OUTPUT_ARCH})}
${LIB_SEARCH_DIRS}
-ENTRY(${ENTRY})
-
SECTIONS
{
- .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
+ ${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)
@@ -58,9 +64,9 @@ SECTIONS
*(.glue_7t)
*(.glue_7)
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0); }
+ LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); }
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor); LONG (0); }
+ LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); }
${RELOCATING+ *(.fini)}
/* ??? Why is .gcc_exc here? */
${RELOCATING+ *(.gcc_exc)}
@@ -80,6 +86,7 @@ SECTIONS
*(.data)
*(.data2)
${R_DATA}
+ *(.jcr)
${RELOCATING+__data_end__ = . ;}
${RELOCATING+*(.data_cygwin_nocopy)}
}
@@ -130,12 +137,28 @@ SECTIONS
}
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
{
- ${R_CRT}
+ ${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__)} :
@@ -159,13 +182,91 @@ SECTIONS
.stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
{
- [ .stab ]
+ *(.stab)
}
.stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
{
- [ .stabstr ]
+ *(.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/ld/sysdep.h b/contrib/binutils/ld/sysdep.h
index f164e74e1f0a..4c5e99451d56 100644
--- a/contrib/binutils/ld/sysdep.h
+++ b/contrib/binutils/ld/sysdep.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GLD; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef LD_SYSDEP_H
#define LD_SYSDEP_H
@@ -77,19 +77,19 @@ extern char *strrchr ();
#include "fopen-same.h"
#endif
-#ifdef NEED_DECLARATION_STRSTR
+#if !HAVE_DECL_STRSTR
extern char *strstr ();
#endif
-#ifdef NEED_DECLARATION_FREE
+#if !HAVE_DECL_FREE
extern void free ();
#endif
-#ifdef NEED_DECLARATION_GETENV
+#if !HAVE_DECL_GETENV
extern char *getenv ();
#endif
-#ifdef NEED_DECLARATION_ENVIRON
+#if !HAVE_DECL_ENVIRON
extern char **environ;
#endif
diff --git a/contrib/binutils/libiberty/ChangeLog b/contrib/binutils/libiberty/ChangeLog
index 08b7d5b6b110..fb328da633cc 100644
--- a/contrib/binutils/libiberty/ChangeLog
+++ b/contrib/binutils/libiberty/ChangeLog
@@ -1,3 +1,1115 @@
+2006-03-29 Jim Blandy <jimb@codesourcery.com>
+
+ * 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.
+ (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.
+
+2006-04-10 Jim Blandy <jimb@codesourcery.com>
+
+ * pex-common.c (temp_file): New function, containing guts of
+ pex-style temporary file name generation.
+ (pex_run): Use it.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.in: Add install-html, install-html-am, and
+ install-html-recursive targets. Define mkdir_p and
+ NORMAL_INSTALL.
+ * configure.ac: AC_SUBST datarootdir, docdir, htmldir.
+ * configure: Regenerate.
+ * testsuite/Makefile.in: Add install-html and html targets.
+
+2006-03-31 Mark Mitchell <mark@codesourcery.com>
+
+ * pex-win32.c (<errno.h>): Include.
+ (fix_argv): Remove.
+ (argv_to_cmdline): New function.
+ (std_suffixes): New variable.
+ (no_suffixes): Likewise.
+ (find_executable): New function.
+ (win32_spawn): Likewise.
+ (spawn_script): Use win32_spawn instead of _spawnv[p].
+ (pex_win32_exec_child): Replace MSVCRT calls with Win32 API calls.
+ (pex_win32_wait): Likewise.
+
+2006-03-24 Jim Blandy <jimb@codesourcery.com>
+
+ * pex-common.c (pex_run): Simplify output name handling.
+
+2006-03-12 Jim Blandy <jimb@red-bean.com>
+
+ * pex-common.h (struct pex_obj): Doc fixes.
+
+2006-03-11 Jim Blandy <jimb@red-bean.com>
+
+ * functions.texi: Regenerate.
+
+2006-02-21 Ben Elliston <bje@au.ibm.com>
+
+ * pexecute.c (pwait): Syntax fix for previous change.
+
+2006-02-17 Uttam Pawar <uttamp@us.ibm.com>
+
+ * pexecute.c (pwait): Free vector pointer.
+ * partition.c (partition_print): Free class_elements pointer.
+
+2006-02-11 Roger Sayle <roger@eyesopen.com>
+ R. Scott Bailey <scott.bailey@eds.com>
+ Bill Northcott <w.northcott@unsw.edu.au>
+
+ PR bootstrap/16787
+ * floatformat.c: Include <float.h> where available.
+ (NAN): Use value of DBL_QNAN if defined, and NAN isn't.
+
+2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * configure.ac: Add -Wc++-compat to ac_libibety_warn_cflags where
+ supported.
+ * configure: Regenerated.
+
+2006-01-20 Carlos O'Donell <carlos@codesourcery.com>
+
+ * testsuite/Makefile.in: Add test-expandargv test.
+ * testsuite/test-expandargv.c: New test.
+ * argv.c (expandargv): Check for errors with ferror,
+ rather than just by looking at return value from fread.
+
+2005-12-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * floatformat.c (floatformat_i387_ext_is_valid): Use explicit cast
+ to convert from "from".
+ (floatformat_to_double): Likewise.
+ (floatformat_from_double): Use explicit cast to convert from "to".
+
+2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
+
+ PR java/9861
+ * cp-demangle.c (d_bare_function_type): Recognize new 'J' qualifer
+ and include return type when found.
+ (d_print_comp)[DEMANGLE_COMPONENT_FUNCTION_TYPE]: Add
+ conditional logic to change printing order of return type.when
+ the DMGL_RET_POSTFIX option is present.
+ (java_demangle_v3): Add DMGL_RET_POSTFIX option to d_demangle
+ call.
+ * testsuite/test-demangle.c (main): Recognize option --ret-postfix
+ * testsuite/demangle-expected: Test cases to verify extended encoding.
+ Updated comment to document --ret-postfix option.
+
+2005-11-06 Richard Guenther <rguenther@suse.de>
+
+ * splay-tree.c (rotate_left): New function.
+ (rotate_right): Likewise.
+ (splay_tree_splay_helper): Remove.
+ (splay_tree_splay): Re-implement.
+
+2005-10-31 Mark Kettenis <kettenis@gnu.org>
+
+ * floatformat.c (floatformat_vax_aingle, floatformat_vax_double):
+ New variables.
+
+2005-10-07 Mark Mitchell <mark@codesourcery.com>
+
+ * at-file.texi: Fix typo.
+
+2005-10-03 Mark Mitchell <mark@codesourcery.com>
+
+ * at-file.texi: New file.
+
+2005-09-27 Mark Mitchell <mark@codesourcery.com>
+
+ * argv.c (expandargv): Do not use xmalloc_failed.
+
+2005-09-26 Mark Mitchell <mark@codesourcery.com>
+
+ * argv.c (safe-ctype.h): Include it.
+ (ISBLANK): Remove.
+ (stdio.h): Include.
+ (buildargv): Use ISSPACE instead of ISBLANK.
+ (expandargv): New function.
+ * Makefile.in: Regenerated.
+
+2005-09-14 Christopher Faylor <cgf@timesys.com>
+
+ * pex-win32.c: Include "windows.h".
+ (backslashify): New function.
+ (fix_argv): Use backslashify to convert path to windows format.
+ Allocate one more place in new argv for potential executable from '#!'
+ parsing.
+ (tack_on_executable): New function. Conditional on USE_MINGW_MSYS
+ (openkey): Ditto.
+ (mingw_rootify): Ditto.
+ (msys_rootify): Ditto.
+ (spawn_script): New function.
+ (pex_win32_exec_child): Save translated argv in newargv. Pass to
+ spawn_script if spawnv* fails.
+ (main): New function. Conditional on MAIN. Useful for testing.
+
+2005-08-17 Mark Kettenis <kettenis@gnu.org>
+
+ * floatformat.c (floatformat_always_valid): Change type of last
+ argument to `void *'.
+ (floatformat_i387_ext_is_valid): Likewise.
+ (floatformat_to_double): Change type of second argument to `const
+ void *'.
+ (floatformat_from_double): Change type of last argument to `void
+ *'.
+ (floatformat_is_valid): Change type of last argument to `const
+ void *'.
+ (ieee_test): Remove redundant casts.
+
+2005-08-17 Kelley Cook <kcook@gcc.gnu.org>
+
+ * strverscmp.c: Update FSF address.
+ * testsuite/Makefile.in: Likewise.
+ * testsuite/test-demangle.c: Likewise.
+ * testsuite/test-pexecute.c: Likewise.
+
+2005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * getopt.c: Include ansidecl.h before system headers.
+
+2005-07-22 Ben Elliston <bje@gnu.org>
+
+ * getopt.c: Include "ansidecl.h".
+ (_getopt_initialize): Mark argc and argv parameters as unused.
+
+2005-07-22 Ben Elliston <bje@gnu.org>
+
+ * regex.c (regcomp): Change type of `i' from unsigned to int.
+
+2005-07-22 Ben Elliston <bje@gnu.org>
+
+ Recover patch lost in the sourceware repository:
+ 2005-07-09 Ben Elliston <bje@au.ibm.com>
+ * memcpy.c: Remove ANSI_PROTOTYPES conditional code.
+ * memmove.c: Likewise.
+ * objalloc.c: Likewise.
+
+2005-07-22 Ben Elliston <bje@gnu.org>
+
+ * configure.ac: Check for a getopt(3) declaration.
+ * configure, config.in: Regenerate.
+
+2005-07-15 Ben Elliston <bje@au.ibm.com>
+
+ * regex.c (TRANSLATE): Cast rhs of ternary expression to char.
+
+2005-07-12 Ben Elliston <bje@au.ibm.com>
+
+ * floatformat.c (floatformat_to_double): Add a comment about a
+ potential source of warnings when compiling this file.
+
+2005-07-12 Ben Elliston <bje@au.ibm.com>
+
+ * pexecute.c (pexecute): Cast string litrals to char *.
+ * regex.c (re_comp): Cast a call to gettext() to char *.
+
+2005-07-07 Kelley Cook <kcook@gcc.gnu.org>
+
+ * config.table: Delete file. Move former contents into ...
+ * configure.ac: ... here and escape any brackets for m4.
+ * Makefile.in (config.status): Remove dependency on config.table.
+ * configure: Regenerate.
+
+2005-07-07 Kelley Cook <kcook@gcc.gnu.org>
+
+ * config.in: Regenerate for 6/20 change.
+
+2005-07-03 Steve Ellcey <sje@cup.hp.com>
+
+ PR other/13906
+ * md5.c (md5_process_bytes): Check alignment.
+
+2005-07-01 Ian Lance Taylor <ian@airs.com>
+
+ PR other/22268
+ * cp-demangle.c (d_expr_primary): Don't run off the end of the
+ string while looking for the end of a literal value.
+ * testsuite/demangle-expected: Add test case.
+
+2005-06-30 Daniel Berlin <dberlin@dberlin.org>
+
+ * hashtab.c (EMPTY_ENTRY): Moved and renamed.
+ (DELETED_ENTRY): Ditto.
+
+2005-06-20 Geoffrey Keating <geoffk@apple.com>
+
+ * strverscmp.c: New.
+ * Makefile.in (CFILES): Add strverscmp.c.
+ (CONFIGURED_OFILES): Add strverscmp.o.
+ (strverscmp.o): New rule.
+ (stamp-functions): Add $(srcdir) to files in source directory.
+ * configure.ac (funcs): Add strverscmp.
+ (AC_CHECK_FUNCS): Add strverscmp.
+ * configure: Regenerate.
+ * functions.texi: Regenerate.
+
+2005-05-28 Eli Zaretskii <eliz@gnu.org>
+
+ * configure.ac: Add snprintf and vsnprintf to AC_CHEK_DECLS.
+ * config.in, configure: Regenerate.
+
+2005-05-25 Richard Henderson <rth@redhat.com>
+
+ * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_HIDDEN_ALIAS.
+ (d_make_comp, d_print_comp): Likewise.
+ (d_special_name): Generate one.
+ * testsuite/demangle-expected: Add a hidden alias test.
+
+2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * configure.ac: Check declarations for calloc(), getenv(),
+ malloc(), realloc() and sbrk().
+ * config.in: Regenerate.
+ * configure: Likewise.
+
+ * alloca.c (C_alloca): Change "new" to "new_storage". Use XNEWVEC
+ instead of xmalloc.
+ * choose-temp.c (choose_temp_base): Use XNEWVEC instea od xmalloc.
+ * concat.c (liiberty_concat_ptr): Surround definition with an
+ extern "C" block, if __cplusplus.
+ (concat): Use XNEWVEC instead of xmalloc.
+ (reconcat): Likewise.
+ * cp-demangle.c (struct d_print_template): Rename member
+ "template" to "template_decl". Adjust use throughout the file.
+ (d_print_resize): Properly cast return value of realloc().
+ (cplus_demangle_print): Same for malloc().
+ (d_demangle): Likewise.
+ * cp-demint.c (cplus_demangle_fill_builtin_type): Rename parameter
+ "typename" to "type_name".
+ * cplus-dem.c (grow_vect): Use XRESIZEVEC instead of xrealloc().
+ (work_stuff_copy_to_from): Use XNEWVEC insteand of xmalloc().
+ (demangle_template_value_parm): Likewise.
+ (demangle_template): Likewise.
+ (recursively_demangle): Likewise.
+ (do_hpacc_template_literal): Likewise.
+ (do_arg): Likewise.
+ (remember_type): Likewise.
+ (remember_Ktype): Likewise.
+ (register_Btype): Likewise.
+ (string_need): Use XRESIZEVEC instead of xrealloc().
+ * dyn-string.c (dyn_string_init): Use XNEWVEC.
+ (dyn_string_new): Use XNEW.
+ (dyn_string_resize): Use XRESIZEVEC.
+ * fnmatch.c (fnmatch): Rename local variable "not" to "negate".
+ * getopt.c (getenv): Declare only if !__cplusplus and !getenv.
+ Otherwise include <stdlib.h>.
+ (exchange): Cast return value of malloc().
+ * hashtab.c (htab_size): Define as both macro and non-inline
+ function.
+ (htab_elements): Likewise.
+ * getpwd.c (getpwd): Use XNEWVEC.
+ (htab_create_alloc_ex): Use C90 prototype-style.
+ * lrealpath.c (lrealpath): Appropriately cast return value of
+ malloc().
+ * make-relative-prefix.c (save_string): Likewise.
+ * make-temp-file.c (try_dir): Rename from "try". Adjust use in
+ the file.
+ (choose_tmpdir): Use XNEWVEC.
+ * mkstemps.c (mkstemps): Rename parameter "template" to "pattern".
+ * pex-common.c (pex_init_common): Use XNEW.
+ (pex_add_remove): Use XRESIZEVEC.
+ (pex_run): Likewise.
+ (pex_get_status_and_time): Likewise.
+ * pex-djgpp.c (pex_djgpp_exec_child): Likewise.
+ * pex-msdos.c (pex_init): Use XNEW.
+ (pex_msdos_exec_child): Likewise.
+ (pex_msdos_exec_child): Use XRESIZEVEC.
+ * pex-unix.c (pex_wait): Use XNEW.
+ * pex-win32.c (fix_argv): Use XNEWVEC.
+ * pexecute.c (pwait): Likewise.
+ * setenv.c (setenv): Properly cast return value of malloc().
+ * sigsetmask.c (sigsetmask): Rename local variables "old" and
+ "new" to "old_sig" and "new_sig".
+ * sort.c (main): Use XNEWVEC.
+ * spaces.c (spaces): Cast return value of malloc().
+ * strndup.c (strndup): Likewise.
+ * ternary.c (ternary_insert): Use XNEW.
+ * xmalloc.c (malloc, realloc, calloc, sbrk): Surround declaration
+ with an extern "C" block if __cplusplus.
+ * xstrdup.c (xstrdup): Cast return value of memcpy().
+ * xstrerror.c (strerror): Enclose declaration in an extern "C"
+ block if __cplusplus.
+ * xstrndup.c (xstrndup): Use XNEW. Cast return value of memcpy().
+
+2005-05-16 Andreas Jaeger <aj@suse.de>
+
+ * getpwd.c: Remove unneeded prototype getcwd and move getwd so
+ that it's only declared if needed.
+
+ * getopt1.c: Change order of includes so that __GNU_LIBRARY__ is
+ defined.
+
+2005-05-15 Andreas Jaeger <aj@suse.de>
+
+ * functions.texi: Regenerated.
+
+2005-05-15 Eli Zaretskii <eliz@gnu.org>
+
+ * pexecute.txh: Enclose multi-word data types in @deftypefn in
+ braces. Minor wording fixes. Use --- for em-dash. Use
+ @enumerate in enumerated lists.
+
+ * fopen_unlocked.c: Enclose multi-word data types in @deftypefn in
+ braces.
+
+2005-05-11 Eli Zaretskii <eliz@gnu.org>
+
+ * pex-djgpp.c: Include string.h, fcntl.h, unistd.h, and
+ sys/stat.h.
+ (pex_init): Fix last argument to pex_init_common.
+ (pex_djgpp_exec_child): Remove leading underscore from _open,
+ _dup, _dup2, _close, and _spawnv/_spawnvp. Replace `program',
+ which is undeclared, with `executable', which was unused. Remove
+ unused variable `e'. Fix casting of last arg to spawnv/spawnvp.
+ (pex_djgpp_wait): Declare arguments with ATTRIBUTE_UNUSED.
+
+2005-05-11 Paul Brook <paul@codesourcery.com>
+
+ * Makefile.in: Regenerate dependencies.
+
+2005-05-10 Nick Clifton <nickc@redhat.com>
+
+ * Update the address and phone number of the FSF organization in
+ the GPL notices in the following files:
+ COPYING.LIB, Makefile.in, _doprnt.c, argv.c, asprintf.c,
+ choose-temp.c, clock.c, concat.c, copying-lib.texi, cp-demangle.c,
+ cp-demangle.h, cp-demint.c, cplus-dem.c, dyn-string.c, fdmatch.c,
+ fibheap.c, floatformat.c, fnmatch.c, fopen_unlocked.c,
+ gather-docs, getopt.c, getopt1.c, getruntime.c, hashtab.c, hex.c,
+ lbasename.c, lrealpath.c, maint-tool, make-relative-prefix.c,
+ make-temp-file.c, md5.c, mempcpy.c, mkstemps.c, objalloc.c,
+ obstack.c, partition.c, pex-common.c, pex-common.h, pex-djgpp.c,
+ pex-msdos.c, pex-one.c, pex-unix.c, pex-win32.c, pexecute.c,
+ physmem.c, putenv.c, regex.c, safe-ctype.c, setenv.c, snprintf.c,
+ sort.c, spaces.c, splay-tree.c, stpcpy.c, stpncpy.c, strndup.c,
+ strtod.c, ternary.c, unlink-if-ordinary.c, vasprintf.c,
+ vsnprintf.c, vsprintf.c, xexit.c, xmalloc.c, xstrndup.c
+
+2005-05-06 Kelley Cook <kcook@gcc.gnu.org>
+
+ * aclocal.m4 (AC_DEFINE_NOAUTOHEADER): Remove.
+ * configure.ac: Replace any AC_DEFINE_NOAUTOHEADER with AC_DEFINE.
+ * configure: Regenerate.
+
+2005-05-06 Kelley Cook <kcook@gcc.gnu.org>
+
+ * configure.ac: Use AC_C_BIGENDIAN instead of AC_C_BIGENDIAN_CROSS.
+ Use AC_CHECK_SIZEOF instead of AC_COMPILE_CHECK_SIZEOF.
+ * aclocal.m4: Don't include accross.m4.
+ * configure, config.in: Regenerate.
+
+2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * fopen_unlocked.c (unlock_std_streams): New.
+
+ * functions.texi: Regenerate.
+
+2005-04-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * fopen_unlocked.c (unlock_stream): New.
+ Consolidate unlocking code into a helper function.
+
+ * functions.texi: Regenerate.
+
+2005-04-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * asprintf.c: Include config.h.
+ * basename.c: Likewise.
+ * fdmatch.c: Likewise.
+ * hex.c: Likewise.
+ * lbasename.c: Likewise.
+ * spaces.c: Likewise.
+ * xatexit.c:Likewise.
+ * configure.ac: Do check declarations for basename, ffs, asprintf
+ and vasprintf for real.
+ * configure: Regenerate.
+
+2005-04-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * argv.c (dupargv): Allocate space of argv[argc], not
+ sizeof(char *) of that amount. Cast result to char *.
+
+2005-04-12 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * regex.c (wcs_re_match_2_internal, byte_re_match_2_internal):
+ Replace not with negate.
+
+2005-04-12 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * configure.ac: Check declarations for basename, ffs, asprintf,
+ vasprintf.
+ * configure: Regenerate.
+ * config.in: Likewise.
+
+2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (CFILES): Add fopen_unlocked.c.
+ (REQUIRED_OFILES): Add ./fopen_unlocked.o.
+ Regenerate dependencies.
+
+ * configure.ac: Check for stdio_ext.h and __fsetlocking.
+
+ * fopen_unlocked.c: New file.
+
+ * functions.texi, configure, config.in: Regenerate.
+
+2005-04-04 Ian Lance Taylor <ian@airs.com>
+
+ * testsuite/test-pexecute.c (TEST_PEX_RUN): Move variable
+ declaration before statement.
+
+2005-04-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * bcmp.c: Fix warnings and implement using memcmp.
+ * bcopy.c: Fix warnings.
+ * bzero.c: Fix warnings and implement using memset.
+
+ * configure.ac (ac_libiberty_warn_cflags): Add -Wwrite-strings
+ -Wstrict-prototypes.
+ * configure, config.in: Regenerate.
+
+ * bsearch.c, index.c, rindex.c, strstr.c, strtol.c, waitpid.c: Fix
+ warnings and reconcile interfaces with relevant standards.
+
+2005-04-02 Ian Lance Taylor <ian@airs.com>
+
+ * cp-demangle.c: Update copyright.
+
+2005-03-31 Joseph S. Myers <joseph@codesourcery.com>
+
+ * gettimeofday.c: Add "Supplemental" to @deftypefn.
+ * functions.texi: Regenerate.
+
+2005-03-28 Ian Lance Taylor <ian@airs.com>
+
+ * pex-common.c: New file.
+ * pex-one.c: New file.
+ * pexecute.c: New file.
+ * pex-common.h: Include <stdio.h>.
+ (struct pex_obj): Define.
+ (struct pex_funcs): Define.
+ (pex_init_common): Declare.
+ * pex-unix.c: Rewrite.
+ * pex-win32.c: Rewrite.
+ * pex-djgpp.c: Rewrite.
+ * pex-msdos.c: Rewrite.
+ * testsuite/text-pexecute.c: New file.
+ * pexecute.txh: Rewrite.
+ * configure.ac: Check for wait3 and wait4. Set CHECK to
+ really-check rather than check-cplus-dem.
+ * functions.texi: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (CFILES): Add pexecute.c, pex-common.c, pex-one.c.
+ (REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
+ * testsuite/Makefile.in (really-check): New target.
+ (check-pexecute, test-pexecute): New targets.
+ * configure: Rebuild.
+
+2005-03-28 Mark Kettenis <kettenis@gnu.org>
+
+ * unlink-if-ordinary.c: Include <sys/types.h>.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 7/n.
+ * regex.c (PARAMS): Remove definition.
+ (PREFIX): Unconditionaly define using ISO C ## operator.
+ (init_syntax_once, extract_number, extract_number_and_incr,
+ print_fastmap, print_partial_compiled_pattern,
+ print_compiled_pattern, print_double_string, printchar,
+ convert_mbs_to_wcs, re_set_syntax, regex_grow_registers,
+ regex_compile, store_op1, store_op2, insert_op1, insert_op2,
+ at_begline_loc_p, at_endline_p, group_in_compile_stack,
+ insert_space, wcs_compile_range, byte_compile_range,
+ truncate_wchar, re_compile_fastmap, re_compile_fastmap,
+ re_set_registers, re_search, re_search_2, re_search_3, re_match,
+ re_match_2, count_mbs_length, wcs_re_match_2_internal,
+ byte_re_match_2_internal, group_match_null_string_p,
+ alt_match_null_string_p, common_op_match_null_string_p,
+ bcmp_translate, re_compile_pattern, re_comp, re_exec, regcomp,
+ regexec, regerror, regfree): Use ISO C prototype style.
+ * partition.c: (elem_compare): Likewise.
+ * cp-demangle.c (print_usage): Likewise.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 5/n.
+ * random.c (srandom, initstate, setstate, random): Use ISO C
+ prototypes.
+ * putenv.c (putenv): Likewise.
+ * physmem.c (physmem_available, physmem_total, main): Likewise.
+ * pex-win32.c (fix_argv, pexecute, pwait): Likewise.
+ * pex-unix.c (pexecute, pwait): Likewise.
+ * pex-msdos.c (pexecute, pwait): Likewise.
+ * pex-djgpp.c (pexecute, pwait): Likewise.
+ * partition.c (partition_new, partition_delete, partition_union)
+ (elem_compare, partition_print): Likewise.
+ * obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
+ _obstack_allocated_p, _obstack_free, obstack_free,
+ _obstack_memory_used, print_and_abort, obstack_next_free,
+ obstack_object_size, obstack_base): Likewise. Remove codes
+ predicated on !defined(__STDC__).
+ * objalloc.c (objalloc_create, _objalloc_alloc, objalloc_free,
+ objalloc_free_block): Use ISO C prototypes.
+ * mkstemps.c (mkstemps): Likewise.
+ * memset.c (memset): Likewise.
+ * mempcpy.c (mempcpy): Likewise.
+ * rename.c (rename): Likewise.
+ * rindex.c (rindex): Likewise.
+ * setenv.c (setenv, unsetenv): Likewise.
+ * sigsetmask.c (sigsetmask): Likewise.
+ * snprintf.c (snprintf): Likewise.
+ * sort.c (sort_pointers, xmalloc): Likewise.
+ * spaces.c (spaces): Likewise.
+ * splay-tree.c (splay_tree_delete_helper,
+ splay_tree_splay_helper, splay_tree_splay,
+ splay_tree_foreach_helper, splay_tree_xmalloc_allocate,
+ splay_tree_new, splay_tree_xmalloc_allocate,
+ splay_tree_new_with_allocator, splay_tree_delete,
+ splay_tree_insert, splay_tree_remove, splay_tree_lookup,
+ splay_tree_max, splay_tree_min, splay_tree_predecessor,
+ splay_tree_successor, splay_tree_foreach,
+ splay_tree_compare_ints, splay_tree_compare_pointers): Likewise.
+ * stpcpy.c (stpcpy): Likewise.
+ * stpncpy.c (stpncpy): Likewise.
+ * strcasecmp.c (strcasecmp): Likewise.
+ * strchr.c (strchr): Likewise.
+ * strdup.c (strdup): Likewise.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 6/n.
+ * strerror.c (init_error_tables, errno_max, strerror, strerrno,
+ strtoerrno, main): Use ISO C prototype style.
+ * strncasecmp.c (strncasecmp): Likewise.
+ * strncmp.c (strncmp): Likewise.
+ * strndup.c (strndup): Likewise.
+ * strrchr.c (strrchr): Likewise.
+ * strsignal.c (init_signal_tables, signo_max, strsignal,
+ strsigno, strtosigno, psignal, main): Likewise.
+ * strstr.c (strstr): Likewise.
+ * strtod.c (strtod, atof): Likewise.
+ * strtol.c (strtol): Likewise.
+ * strtoul.c (strtoul): Likewise.
+ * ternary.c (ternary_insert, ternary_cleanup, ternary_search,
+ ternary_recursivesearch): Likewise.
+ * tmpnam.c (tmpnam): Likewise.
+ * unlink-if-ordinary.c (unlink_if_ordinary): Likewise.
+ * vasprintf.c (int_vasprintf, vasprintf, checkit, main): Likewise.
+ * vfork.c (vfork): Likewise.
+ * vfprintf.c (vfprintf): Likewise.
+ * vprintf.c (vprintf): Likewise.
+ * vsnprintf.c (vsnprintf, checkit, main): Likewise.
+ * vsprintf.c (vsprintf): Likewise.
+ * waitpid.c (waitpid): Likewise.
+ * xatexit.c (xatexit, xatexit_cleanup): Likewise.
+ * xexit.c (xexit): Likewise.
+ * xmalloc.c (xmalloc_set_program_name, xmalloc_failed, xmalloc,
+ xcalloc, xrealloc): Likewise.
+ * xmemdup.c (xmemdup): Likewise.
+ * xstrdup.c (xstrdup): Likewise.
+ * xstrerror.c (xstrerror): Likewise.
+ * xstrndup.c (xstrndup): Likewise.
+
+2005-03-27 Andreas Jaeger <aj@suse.de>
+
+ * configure.ac (ac_c_preproc_warn_flag): Remove -Wtraditional
+ flags.
+ * configure: Regenerated.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * getopt1.c (getopt_long_only): Fix thinko.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 4/n.
+ * hashtab.c (higher_prime_index, hash_pointer, eq_pointer,
+ htab_size, htab_elements, htab_mod_1, htab_mod, htab_mod_m2,
+ htab_create_alloc, htab_set_functions_ex, htab_create,
+ htab_try_create, htab_delete, htab_empty,
+ find_empty_slot_for_expand, htab_expand, htab_find_with_hash,
+ htab_find, htab_find_slot_with_hash, htab_find_slot,
+ htab_remove_elt, htab_remove_elt_with_hash, htab_clear_slot,
+ htab_traverse_noresize, htab_traverse, htab_collisions,
+ htab_hash_string, iterative_hash): Use ISO C prototype.
+ * hex.c (hex_init): Likewise.
+ * index.c (index): Likewise.
+ * insque.c (insque, remque): Likewise.
+ * lbasename.c (lbasename): Likewise.
+ * lrealpath.c (lrealpath): Likewise.
+ * make-relative-prefix.c (save_string, split_directories,
+ free_split_directories, make_relative_prefix): Likewise.
+ * make-temp-file.c (try, choose_tmpdir, make_temp_file): Likewise.
+ * md5.c (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
+ md5_buffer, md5_process_bytes, md5_process_block): Likewise.
+ * memchr.c (memchr): Likewise.
+ * memcpy.c (memcpy): Likewise.
+ * memmove.c (memmove): Likewise.
+ * gettimeofday.c (gettimeofday): Likewise.
+ * getruntime.c (get_run_time): Likewise.
+ * getpwd.c (getpwd, getpwd): Likewise.
+ * getpagesize.c (getpagesize): Likewise.
+ * getopt1.c (getopt_long, getopt_long_only, main): Likewise.
+ * getopt.c (my_index, exchange, _getopt_initialize,
+ _getopt_internal, getopt, main): Likewise.
+ * getcwd.c (getcwd): Likewise.
+ * fnmatch.c (fnmatch): Likewise.
+ * floatformat.c (floatformat_always_valid,
+ floatformat_i387_ext_is_valid, get_field, floatformat_to_double,
+ put_field, floatformat_from_double, floatformat_is_valid,
+ ieee_test, main): Likewise.
+ * fibheap.c (fibheap_new, fibnode_new, fibheap_compare,
+ fibheap_comp_data, fibheap_insert, fibheap_min, fibheap_min_key,
+ fibheap_union, fibheap_extract_min, fibheap_replace_key_data,
+ fibheap_replace_key, fibheap_replace_data, fibheap_delete_node,
+ fibheap_delete, fibheap_empty, fibheap_extr_min_node,
+ fibheap_ins_root, fibheap_rem_root, fibheap_consolidate,
+ fibheap_link, fibheap_cut, fibheap_cascading_cut,
+ fibnode_insert_after, fibnode_remove): Likewise.
+ * ffs.c (ffs): Likewise.
+ * fdmatch.c (fdmatch): Likewise.
+ * dyn-string.c (dyn_string_init, dyn_string_new,
+ dyn_string_delete, dyn_string_release, dyn_string_resize,
+ dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
+ dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
+ dyn_string_insert_cstr, dyn_string_insert_char,
+ dyn_string_append, dyn_string_append_cstr,
+ dyn_string_append_char, dyn_string_substring, dyn_string_eq):
+ Likewise.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 3/n.
+ * cplus-dem.c (set_cplus_marker_for_demangling, consume_count,
+ consume_count_with_underscores, code_for_qualifier,
+ qualifier_string, demangle_qualifier, cplus_demangle_opname,
+ cplus_mangle_opname, cplus_demangle_set_style,
+ cplus_demangle_name_to_style, cplus_demangle, grow_vect,
+ ada_demangle, internal_cplus_demangle, squangle_mop_up,
+ work_stuff_copy_to_from, delete_non_B_K_work_stuff,
+ delete_work_stuff, mop_up, demangle_signature,
+ demangle_method_args, demangle_template_template_parm,
+ demangle_expression, demangle_integral_value,
+ demangle_real_value, demangle_template_value_parm,
+ demangle_template, arm_pt, demangle_arm_hp_template,
+ demangle_class_name, demangle_class, iterate_demangle_function,
+ demangle_prefix, gnu_special, recursively_demangle, arm_special,
+ demangle_qualified, get_count, do_type, demangle_fund_type,
+ do_hpacc_template_const_value, do_hpacc_template_literal,
+ snarf_numeric_literal, do_arg, remember_type, remember_Ktype,
+ register_Btype, remember_Btype, forget_B_and_K_types,
+ forget_types, demangle_args, demangle_nested_args,
+ demangle_function_name, string_need, string_delete, string_init,
+ string_clear, string_empty, string_append, string_appends,
+ string_appendn, string_prepend, string_prepends, string_prependn,
+ string_append_template_idx): Use ISO C prootype style.
+ * cp-demint.c (cplus_demangle_fill_component,
+ cplus_demangle_fill_builtin_type, cplus_demangle_fill_operator,
+ cplus_demangle_v3_components): Likewise.
+
+2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 2/n.
+ * cp-demangle.h: Remove uses of PARAMS.
+ * cp-demangle.c: Likewise.
+ (d_dump, cplus_demangle_fill_name,
+ cplus_demangle_fill_extended_operator, cplus_demangle_fill_ctor,
+ cplus_demangle_fill_dtor, d_make_empty, d_make_comp, d_make_name,
+ d_make_builtin_type, d_make_operator, d_make_extended_operator,
+ d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
+ cplus_demangle_mangled_name, has_return_type,
+ is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
+ d_prefix, d_unqualified_name, d_source_name, d_number,
+ d_identifier, d_operator_name, d_special_name, d_call_offset,
+ d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
+ d_function_type, d_bare_function_type, d_class_enum_type,
+ d_array_type, d_pointer_to_member_type, d_template_param,
+ d_template_args, d_template_arg, d_expression, d_expr_primary,
+ d_local_name, d_discriminator, d_add_substitution,
+ d_substitution, d_print_resize, d_print_append_char,
+ d_print_append_buffer, d_print_error, cplus_demangle_print,
+ d_print_comp, d_print_java_identifier, d_print_mod_list,
+ d_print_mod, d_print_function_type, d_print_array_type,
+ d_print_expr_op, d_print_cast, cplus_demangle_init_info,
+ d_demangle, __cxa_demangle, cplus_demangle_v3, java_demangle_v3,
+ is_ctor_or_dtor, is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor,
+ print_usage, main):
+
+2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to ISO C prototype style 1/n.
+ * _doprnt.c: Remove conditional #include <varargs.h> on
+ ANSI_PROTOTYPES as the latter is always assumed.
+ (_doprnt, checkit, main): Use ISO C prototype.
+ * alloca.c (find_stack_direction, C_alloca): Use ISO C prototype.
+ * argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
+ (dupargv, freeargv, buildargv, main): Use ISO C prototype.
+ * atexit.c (atexit): Likewise
+ * asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
+ (asprintf): Use ISO C prototype.
+ * basename.c (basename): Likewise
+ * bcmp.c (bcmp): Likewise.
+ * bcopy.c (bcopy): Likewise.
+ * bzero.c (bzero): Likewise.
+ * bsearch.c (bsearch): Likewise. Improve const-correctness.
+ * choose-temp.c (choose_temp_base): Likewise.
+ * calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
+ (calloc): Use ISO C prototype.
+ * clock.c (clock): Likewise.
+ * concat.c: Remove conditional #include on ANSI_PROTOTYPES.
+ (vconcat_length, vconcat_copy, concat_length, concat_copy,
+ concat_copy2, concat, reconcat, main): Use ISO C prototype.
+ * copysign.c (copysign): Likewise.
+
+2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (CFILES): Add strndup.c and xstrndup.c.
+ (REQUIRED_OFILES): Add xstrndup.o.
+ (CONFIGURED_OFILES): Add strndup.o.
+ Regenerate dependencies.
+
+ * configure.ac (funcs, AC_CHECK_FUNCS): Add strndup.
+
+ * strndup.c, xstrndup.c: New.
+
+ * config.in, configure, functions.texi: Regenerate.
+
+2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * xmemdup.c, xstrdup.c: Expose the tail call.
+
+2005-03-09 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.ac (funcs): Add gettimeofday.
+ * configure: Regenerated.
+ * gettimeofday.c: New file.
+ * Makefile.in (CFILES): Add gettimeofday.
+ (CONFIGURED_OFILES): Add gettimeofday.o.
+ (./gettimeofday.o): New rule.
+
+2005-03-09 Ian Lance Taylor <ian@airs.com>
+
+ * pex-os2.c: Remove.
+ * configure.ac: Remove *-*-os2-emx* case when setting pexecute.
+ * Makefile.in (CFILES): Remove pex-os2.c.
+ (CONFIGURED_OFILES): Remove pex-os2.o.
+ (pex-os2.o): Remove target.
+ * configure: Rebuild.
+
+2005-03-07 Ian Lance Taylor <ian@airs.com>
+
+ * mpw-config.in: Remove.
+ * mpw-make.sed: Remove.
+ * mpw.c: Remove.
+ * Makefile.in (CFILES): Remove pex-mpw.c.
+ (CONFIGURED_OFILES): Remove pex-mpw.o.
+ (mpw.o, pex-mpw.o): Remove targets.
+ * maint-tool (undoc): Remove reference to mpw.c.
+
+2005-03-06 DJ Delorie <dj@redhat.com>
+
+ * configure.ac (target_header_dir): vfork is a stub under djgpp.
+ * configure: Regenerated.
+
+2005-03-01 Jan Beulich <jbeulich@novell.com>
+
+ * Makefile.in (CFILES): Add unlink-if-ordinary.c
+ (REQUIRED_OFILES): Add unlink-if-ordinary.o.
+ Add dependencies and rule for unlink-if-ordinary.o.
+ * unlink-if-ordinary.c: New.
+
+2005-03-01 Ben Elliston <bje@au.ibm.com>
+
+ * hashtab.c (htab_find_slot_with_hash): Make function
+ documentation clearer.
+
+2005-02-13 Jason Merrill <jason@redhat.com>
+
+ * cp-demangle.c (__cxa_demangle): Change resolution of ambiguous
+ arguments.
+
+2005-01-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
+
+ * hex.c (hex_value): Group 'unsigned int' together to get correct
+ markup.
+ * functions.texi: Regenerated.
+
+2004-12-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.in: Undo to 2004-12-17.
+ * aclocal.m4: Likewise.
+ * config.table: Likewise.
+ * configure.ac: Likewise.
+ * maint-tool: Likewise.
+ * configure: Likewise.
+
+2004-12-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR bootstrap/19072
+ * Makefile.in (enable_shared): New substitute.
+ (LTTARGETLIB): New.
+ (PREFIXTARGETLIB): New.
+ (LTTESTLIB): New.
+ (PREFIXTESTLIB): New.
+ (CCLD): New.
+ (LINK): New.
+ ($(TARGETLIB)): Use $(LINK) to create libraries and create
+ targets by hand.
+ ($(TESTLIB)): Likewise.
+ (mostlyclean): Don't remove .libs. Remove the libtool object
+ directory.
+
+ * config.table (enable_shared): Removed.
+
+ * configure.ac (enable_static): Set to yes.
+ (AC_PROG_LIBTOOL): Removed.
+ (AM_DISABLE_SHARED): Uncommented.
+ (AM_PROG_LIBTOOL): Likewise.
+ (LIBOBJS): Add `./' to avoid VPATH.
+ (LTLIBOBJS): Likewise.
+ (enable_shared): Substitute.
+ * configure: Regenerated.
+
+2004-12-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.in (top_builddir): Set to `.'.
+ (OUTPUT_OPTION): Removed.
+ (LIBTOOL): New.
+ (LTLIBOBJS): New.
+ (EXTRA_LTOFILES): New.
+ (FLAGS_TO_PASS): Add EXTRA_LTOFILES.
+ (all): Remove stamp-picdir.
+ (LTCOMPILE): New.
+ (.c.lo): New rule.
+ (REQUIRED_LTOFILES): New.
+ (CONFIGURED_LTOFILES): New.
+ ($(TARGETLIB)): Check .libs for PIC object files. Depend on
+ $(REQUIRED_LTOFILES) $(EXTRA_LTOFILES) $(LTLIBOBJS).
+ (stamp-picdir): Completely removed.
+ (maint-missing): Pass $(REQUIRED_LTOFILES)
+ $(CONFIGURED_LTOFILES) instead of (REQUIRED_OFILES)
+ $(CONFIGURED_OFILES)
+ (maint-buildall): Depend on $(REQUIRED_LTOFILES)
+ $(CONFIGURED_LTOFILES).
+ (mostlyclean): Also remove *.lo .libs.
+ Run "make maint-deps".
+
+ * aclocal.m4: Include ../libtool.m4.
+
+ * config.table: Don't check --enable-shared.
+
+ * configure.ac (AC_PROG_LIBTOOL): Add.
+ (AC_PROG_CC_C_O): Removed.
+ (OUTPUT_OPTION): Removed.
+ (NO_MINUS_C_MINUS_O): Removed.
+ (ltpexecute): New substitute.
+ (LIBOBJS): Cleanup.
+ * configure: Regenerated.
+
+ * maint-tool: Updated for .lo/libtool.
+
+2004-12-11 Ben Elliston <bje@au.ibm.com>
+
+ * configure.ac: Invoke AC_CHECK_SIZEOF for sizeof (int).
+ * configure: Regenerate.
+ * config.in: Likewise.
+
+2004-12-07 DJ Delorie <dj@redhat.com>
+
+ * splay-tree.c (splay_tree_delete_helper): Redesign the logic so
+ that recursion (and thus large stack space) is not needed.
+
+2004-11-29 Matt Kraai <kraai@alumni.cmu.edu>
+
+ * pex-unix.c: Fix the spelling of longjmp.
+
+2004-11-23 Ian Lance Taylor <ian@wasabisystems.com>
+
+ PR other/18623
+ * cp-demangle.c (d_call_offset): Remove useless local variables
+ offset and virtual_offset.
+ * cplus-dem.c (ada_demangle): Remove useless local variable
+ at_start_name.
+ (demangle_template): Remove useless local variable start.
+
+2004-11-19 Roger Sayle <roger@eyesopen.com>
+
+ * objalloc.c, strsignal.c, xstrerror.c: Include "config.h" before
+ "ansidecl.h" to avoid redeclaration errors with native compilers.
+ * regex.c: Protect config.h from multiple inclusion.
+
+2004-11-12 Mike Stump <mrs@apple.com>
+
+ * Makefile.in (libiberty.html): Fix html generation.
+
+2004-09-08 Adam Nemet <anemet@lnxw.com>
+
+ * vasprintf.c: Accept __va_copy in addition to va_copy.
+
+2004-09-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
+2004-09-02 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Do not enable multilibs for build-side libiberty.
+
+2004-06-29 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * lrealpath.c (lrealpath): Add _WIN32 support.
+
+2004-06-28 Zack Weinberg <zack@codesourcery.com>
+
+ * cp-demangle.h: Declare cplus_demangle_operators,
+ cplus_demangle_builtin_types, cplus_demangle_mangled_name, and
+ cplus_demangle_type as static if IN_GLIBCPP_V3.
+
+2004-06-28 Ian Lance Taylor <ian@wasabisystems.com>
+
+ PR other/16240
+ * cp-demangle.c (d_expr_primary): Check for a failure return from
+ cplus_demangle_type.
+ * testsuite/demangle-expected: Add test case.
+
+2004-05-31 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * pex-win32.c (fix_argv): Expand comment.
+
+2004-05-25 Daniel Jacobowitz <drow@false.org>
+
+ * Makefile.in: Add .NOEXPORT.
+
+2004-04-29 Douglas B Rupp <rupp@gnat.com>
+
+ * mkstemps.c (mkstemps) [VMS]: Remove special open option. Update
+ copyright.
+
+2004-04-26 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * configure.ac (UNSIGNED_64BIT_TYPE): Unquote the definition.
+ * configure: Regenerate.
+
+2004-04-22 Richard Henderson <rth@redhat.com>
+
+ * hashtab.c: Include limits.h, stdint.h, ansidecl.h.
+ (CHAR_BIT): Provide default.
+ (struct prime_ent, prime_tab): New.
+ (higher_prime_index): Rename from higher_prime_number, return index.
+ (htab_mod_1): New.
+ (htab_mod, htab_mod_m2): Use it.
+ (htab_create_alloc, htab_create_alloc_ex): Store prime index.
+ (htab_expand): Likewise.
+ * configure.ac: Check for stdint.h.
+ (UNSIGNED_64BIT_TYPE): New define and checks to fill it in.
+ * config.in, configure: Rebuild.
+
+2004-04-13 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * strerror.c: Include config.h, and redefine sys_nerr and
+ sys_errlist, before including ansidecl.h and libiberty.h.
+
+2004-04-13 Jeff Law <law@redhat.com>
+
+ * hashtab.c (htab_remove_elt_with_hash): New function.
+ (htab_remove_elt): Implement in terms of htab_remove_elt_with_hash.
+
+2004-03-31 Richard Henderson <rth@redhat.com>
+
+ * hashtab.c (htab_size): Move to top of file; mark inline.
+ (htab_elements): Likewise.
+ (htab_mod, htab_mod_m2): New.
+ (htab_delete): Refactor htab->size and htab->entries.
+ (htab_empty): Likewise.
+ (find_empty_slot_for_expand): Use htab_size, htab_mod, htab_mod_m2.
+ (htab_find_with_hash, htab_find_slot_with_hash): Likewise.
+ (htab_clear_slot): Use htab_size, htab_elements.
+ (htab_traverse_noresize, htab_traverse): Likewise.
+
+2004-03-17 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * pex-unix.c (pexecute): Use vfork instead of fork, with
+ appropriate changes to make this safe.
+ * pex-common.h (STDERR_FILE_NO): Define.
+
+ * Makefile.in: Clean up REQUIRED_OFILES and CONFIGURED_OFILES for
+ an 80 column screen. Run maint-deps.
+
+2004-03-09 Kelley Cook <kcook@gcc.gnu.org>
+
+ * configure.ac: Bump version to 2.59. Apply suggested autoupdates.
+ * acconfig.h: Delete redundant file.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
+2004-03-09 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure: Regenerate for config/accross.m4 correction.
+
+2004-03-07 Andreas Jaeger <aj@suse.de>
+
+ * testsuite/test-demangle.c: Include <string.h> and <stdlib.h> for
+ prototypes.
+ (main): Initialize style.
+
+2004-02-24 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * cp-demangle.h (enum d_builtin_type_print): Add D_PRINT_UNSIGNED,
+ D_PRINT_UNSIGNED_LONG, D_PRINT_LONG_LONG,
+ D_PRINT_UNSIGNED_LONG_LONG, D_PRINT_FLOAT.
+ * cp-demangle.c (cplus_demangle_builtin_types): Change char and
+ short types to D_PRINT_DEFAULT. Change other integer types to use
+ new D_PRINT_* values where appropriate. Change float types to
+ D_PRINT_FLOAT.
+ (d_print_comp) [LITERAL, LITERAL_NEG]: Handle new D_PRINT_*
+ values.
+ * testsuite/demangle-expected: Adjust two test cases.
+
+ * cp-demangle.c (d_print_function_type): Print a space before the
+ parenthesis around the function type in more cases.
+ * testsuite/demangle-expected: Adjust one test case.
+
+ * cp-demangle.c (d_print_comp) [UNARY]: Don't emit extra
+ parentheses around a cast.
+ * testsuite/demangle-expected: Adjust two test cases to match new
+ output.
+
+ * cp-demangle.c (__cxa_demangle): Pass DMGL_PARAMS to d_demangle.
+
+ * cp-demangle.c (d_print_comp) [RESTRICT, VOLATILE, CONST]: Don't
+ push more than one of the same CV-qualifier on the top of the
+ stack.
+ (d_print_comp) [ARRAY_TYPE]: If the array itself is CV-qualified,
+ move the CV-qualifiers to apply to the element type instead.
+ (d_print_array_type): When checking the modifiers, keep looking
+ past ones which have been printed already.
+ * testsuite/demangle-expected: Add three test cases.
+
+2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * cp-demangle.c (__cxa_demangle): Adjust last patch to handle
+ empty string correctly.
+
+ * cp-demangle.c (__cxa_demangle): It is not an error if status is
+ not NULL. It is an error if the mangled name is the same as a
+ built-in type name.
+ (main): If IN_GLIBCPP_V3 is defined, test __cxa_demangle rather
+ than cplus_demangle_v3.
+
+ * dyn-string.c: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
+ the associated #define of RETURN_ON_ALLOCATION_FAILURE.
+
2004-02-16 Matt Kraai <kraai@alumni.cmu.edu>
* regex.c: Include <ansidecl.h>.
@@ -470,7 +1582,7 @@
2003-08-12 Nathanael Nerode <neroden@gcc.gnu.org>
- * cp-demangle.c: Clarify what package(s) this is part of.
+ * cp-demangle.c: Clarify what package(s) this is part of.
2003-07-05 Danny Smith <dannysmith@users.sourceforge.net>
diff --git a/contrib/binutils/libiberty/Makefile.in b/contrib/binutils/libiberty/Makefile.in
index bbb5c2a7929b..95a82784b0b7 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
+# Copyright (C) 1990, 91-99, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation
#
# This file is part of the libiberty library.
@@ -16,8 +16,8 @@
#
# You should have received a copy of the GNU Library General Public
# License along with libiberty; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+# Boston, MA 02110-1301, USA.
#
# This file was written by K. Richard Pixley <rich@cygnus.com>.
@@ -132,7 +132,9 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
cp-demint.c cplus-dem.c \
dyn-string.c \
fdmatch.c ffs.c fibheap.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 \
index.c insque.c \
lbasename.c \
@@ -141,60 +143,67 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c \
mempcpy.c memset.c mkstemps.c \
objalloc.c obstack.c \
- partition.c \
- pex-djgpp.c pex-mpw.c pex-msdos.c pex-os2.c \
+ partition.c pexecute.c \
+ pex-common.c pex-djgpp.c pex-msdos.c pex-one.c \
pex-unix.c pex-win32.c \
physmem.c putenv.c \
random.c regex.c rename.c rindex.c \
safe-ctype.c setenv.c sigsetmask.c snprintf.c sort.c spaces.c \
splay-tree.c stpcpy.c stpncpy.c strcasecmp.c strchr.c strdup.c \
strerror.c strncasecmp.c strncmp.c strrchr.c strsignal.c \
- strstr.c strtod.c strtol.c strtoul.c \
+ strstr.c strtod.c strtol.c strtoul.c strndup.c strverscmp.c \
ternary.c tmpnam.c \
+ unlink-if-ordinary.c \
vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \
waitpid.c \
- xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
+ xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c \
+ xstrndup.c
# These are always included in the library. The first four are listed
# first and by compile time to optimize parallel builds.
-REQUIRED_OFILES = ./regex.o ./cplus-dem.o ./cp-demangle.o ./cp-demint.o ./md5.o \
- ./alloca.o ./argv.o \
- ./choose-temp.o ./concat.o \
+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 \
- ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o \
- ./hashtab.o ./hex.o \
- ./lbasename.o \
- ./lrealpath.o \
- ./make-relative-prefix.o \
- ./make-temp-file.o \
- ./objalloc.o ./obstack.o \
- ./partition.o ./physmem.o @pexecute@ \
- ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o \
+ ./fdmatch.o ./fibheap.o ./floatformat.o ./fnmatch.o \
+ ./fopen_unlocked.o \
+ ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o \
+ ./hashtab.o ./hex.o \
+ ./lbasename.o ./lrealpath.o \
+ ./make-relative-prefix.o ./make-temp-file.o \
+ ./objalloc.o ./obstack.o \
+ ./partition.o ./pexecute.o ./physmem.o \
+ ./pex-common.o ./pex-one.o @pexecute@ \
+ ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o \
./strsignal.o \
./ternary.o \
- ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o
+ ./unlink-if-ordinary.o \
+ ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o \
+ ./xstrerror.o ./xstrndup.o
# These are all the objects that configure may add to the library via
# $funcs or EXTRA_OFILES. This list exists here only for "make
# maint-missing" and "make check".
-CONFIGURED_OFILES = ./asprintf.o ./atexit.o \
- ./basename.o ./bcmp.o ./bcopy.o ./bsearch.o ./bzero.o \
- ./calloc.o ./clock.o ./copysign.o \
+CONFIGURED_OFILES = ./asprintf.o ./atexit.o \
+ ./basename.o ./bcmp.o ./bcopy.o ./bsearch.o ./bzero.o \
+ ./calloc.o ./clock.o ./copysign.o \
./_doprnt.o \
./ffs.o \
- ./getcwd.o ./getpagesize.o \
+ ./getcwd.o ./getpagesize.o ./gettimeofday.o \
./index.o ./insque.o \
- ./memchr.o ./memcmp.o ./memcpy.o ./memmove.o ./mempcpy.o ./memset.o ./mkstemps.o \
- ./pex-djgpp.o ./pex-mpw.o ./pex-msdos.o ./pex-os2.o \
- ./pex-unix.o ./pex-win32.o \
+ ./memchr.o ./memcmp.o ./memcpy.o ./memmove.o ./mempcpy.o \
+ ./memset.o ./mkstemps.o \
+ ./pex-djgpp.o ./pex-msdos.o \
+ ./pex-unix.o ./pex-win32.o \
./putenv.o \
- ./random.o ./rename.o ./rindex.o \
- ./setenv.o ./sigsetmask.o ./snprintf.o ./stpcpy.o ./stpncpy.o ./strcasecmp.o \
- ./strchr.o ./strdup.o ./strncasecmp.o ./strncmp.o ./strrchr.o ./strstr.o \
- ./strtod.o ./strtol.o ./strtoul.o \
+ ./random.o ./rename.o ./rindex.o \
+ ./setenv.o ./sigsetmask.o ./snprintf.o ./stpcpy.o ./stpncpy.o \
+ ./strcasecmp.o ./strchr.o ./strdup.o ./strncasecmp.o \
+ ./strncmp.o ./strndup.o ./strrchr.o ./strstr.o \
+ ./strtod.o ./strtol.o ./strtoul.o ./strverscmp.o \
./tmpnam.o \
- ./vasprintf.o ./vfork.o ./vfprintf.o ./vprintf.o ./vsnprintf.o ./vsprintf.o \
+ ./vasprintf.o ./vfork.o ./vfprintf.o ./vprintf.o ./vsnprintf.o \
+ ./vsprintf.o \
./waitpid.o
# These files are installed if the library has been configured to do so.
@@ -236,7 +245,62 @@ info: libiberty.info info-subdir
install-info: install-info-subdir
clean-info: clean-info-subdir
dvi: libiberty.dvi dvi-subdir
-html: libiberty.html
+
+# html, install-html targets
+HTMLS = libiberty.html
+
+html: $(HTMLS)
+
+.PHONY: install-html install-html-am install-html-recursive
+
+NORMAL_INSTALL = :
+mkdir_p = mkdir -p --
+
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-html: install-html-recursive install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+ f=$(html__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
+
+install-html-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
TEXISRC = \
$(srcdir)/libiberty.texi \
@@ -256,12 +320,12 @@ libiberty.dvi : $(srcdir)/libiberty.texi $(TEXISRC)
texi2dvi $(srcdir)/libiberty.texi
libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
- $(MAKEINFO) --html -I$(srcdir) $(srcdir)/libiberty.texi
+ $(MAKEINFO) --no-split --html -I$(srcdir) -o $@ $<
@MAINT@$(srcdir)/functions.texi : stamp-functions
@MAINT@ @true
-@MAINT@stamp-functions : $(CFILES) $(TEXIFILES) $(srcdir)/gather-docs Makefile
+@MAINT@stamp-functions : $(CFILES:%=$(srcdir)/%) $(TEXIFILES:%=$(srcdir)/%) $(srcdir)/gather-docs Makefile
@MAINT@@HAVE_PERL@ $(PERL) $(srcdir)/gather-docs $(srcdir) $(srcdir)/functions.texi $(CFILES) $(TEXIFILES)
@MAINT@ echo stamp > stamp-functions
@@ -392,7 +456,7 @@ config.h: stamp-h ; @true
stamp-h: $(srcdir)/config.in config.status Makefile
CONFIG_FILES= CONFIG_HEADERS=config.h:$(srcdir)/config.in $(SHELL) ./config.status
-config.status: $(srcdir)/configure $(srcdir)/config.table
+config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
# Depending on config.h makes sure that config.status has been re-run
@@ -411,6 +475,10 @@ maintainer-clean-subdir: config.h
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS): stamp-picdir
$(CONFIGURED_OFILES): stamp-picdir
+# Don't export variables to the environment, in order to not confuse
+# configure.
+.NOEXPORT:
+
# The dependencies in the remainder of this file are automatically
# generated by "make maint-deps". Manual edits will be lost.
@@ -428,13 +496,15 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/alloca.c $(OUTPUT_OPTION)
-./argv.o: $(srcdir)/argv.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+./argv.o: $(srcdir)/argv.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/argv.c -o pic/$@; \
else true; fi
$(COMPILE.c) $(srcdir)/argv.c $(OUTPUT_OPTION)
-./asprintf.o: $(srcdir)/asprintf.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+./asprintf.o: $(srcdir)/asprintf.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/asprintf.c -o pic/$@; \
else true; fi
@@ -446,8 +516,8 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/atexit.c $(OUTPUT_OPTION)
-./basename.o: $(srcdir)/basename.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
+./basename.o: $(srcdir)/basename.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/basename.c -o pic/$@; \
else true; fi
@@ -540,7 +610,8 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/dyn-string.c $(OUTPUT_OPTION)
-./fdmatch.o: $(srcdir)/fdmatch.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+./fdmatch.o: $(srcdir)/fdmatch.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/fdmatch.c -o pic/$@; \
else true; fi
@@ -573,13 +644,20 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/fnmatch.c $(OUTPUT_OPTION)
+./fopen_unlocked.o: $(srcdir)/fopen_unlocked.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/fopen_unlocked.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/fopen_unlocked.c $(OUTPUT_OPTION)
+
./getcwd.o: $(srcdir)/getcwd.c config.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/getcwd.c -o pic/$@; \
else true; fi
$(COMPILE.c) $(srcdir)/getcwd.c $(OUTPUT_OPTION)
-./getopt.o: $(srcdir)/getopt.c config.h $(INCDIR)/getopt.h
+./getopt.o: $(srcdir)/getopt.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/getopt.c -o pic/$@; \
else true; fi
@@ -611,6 +689,13 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/getruntime.c $(OUTPUT_OPTION)
+./gettimeofday.o: $(srcdir)/gettimeofday.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/gettimeofday.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/gettimeofday.c $(OUTPUT_OPTION)
+
./hashtab.o: $(srcdir)/hashtab.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
@@ -618,7 +703,7 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/hashtab.c $(OUTPUT_OPTION)
-./hex.o: $(srcdir)/hex.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+./hex.o: $(srcdir)/hex.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/hex.c -o pic/$@; \
@@ -637,8 +722,9 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/insque.c $(OUTPUT_OPTION)
-./lbasename.o: $(srcdir)/lbasename.c $(INCDIR)/ansidecl.h $(INCDIR)/filenames.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+./lbasename.o: $(srcdir)/lbasename.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/lbasename.c -o pic/$@; \
else true; fi
@@ -713,12 +799,6 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/mkstemps.c $(OUTPUT_OPTION)
-./mpw.o: $(srcdir)/mpw.c
- if [ x"$(PICFLAG)" != x ]; then \
- $(COMPILE.c) $(PICFLAG) $(srcdir)/mpw.c -o pic/$@; \
- else true; fi
- $(COMPILE.c) $(srcdir)/mpw.c $(OUTPUT_OPTION)
-
./msdos.o: $(srcdir)/msdos.c
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/msdos.c -o pic/$@; \
@@ -745,19 +825,19 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/partition.c $(OUTPUT_OPTION)
-./pex-djgpp.o: $(srcdir)/pex-djgpp.c config.h $(INCDIR)/ansidecl.h \
+./pex-common.o: $(srcdir)/pex-common.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(srcdir)/pex-common.h
if [ x"$(PICFLAG)" != x ]; then \
- $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-djgpp.c -o pic/$@; \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-common.c -o pic/$@; \
else true; fi
- $(COMPILE.c) $(srcdir)/pex-djgpp.c $(OUTPUT_OPTION)
+ $(COMPILE.c) $(srcdir)/pex-common.c $(OUTPUT_OPTION)
-./pex-mpw.o: $(srcdir)/pex-mpw.c config.h $(INCDIR)/ansidecl.h \
+./pex-djgpp.o: $(srcdir)/pex-djgpp.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(srcdir)/pex-common.h
if [ x"$(PICFLAG)" != x ]; then \
- $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-mpw.c -o pic/$@; \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-djgpp.c -o pic/$@; \
else true; fi
- $(COMPILE.c) $(srcdir)/pex-mpw.c $(OUTPUT_OPTION)
+ $(COMPILE.c) $(srcdir)/pex-djgpp.c $(OUTPUT_OPTION)
./pex-msdos.o: $(srcdir)/pex-msdos.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(srcdir)/pex-common.h \
@@ -767,12 +847,12 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/pex-msdos.c $(OUTPUT_OPTION)
-./pex-os2.o: $(srcdir)/pex-os2.c config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
+./pex-one.o: $(srcdir)/pex-one.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
- $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-os2.c -o pic/$@; \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-one.c -o pic/$@; \
else true; fi
- $(COMPILE.c) $(srcdir)/pex-os2.c $(OUTPUT_OPTION)
+ $(COMPILE.c) $(srcdir)/pex-one.c $(OUTPUT_OPTION)
./pex-unix.o: $(srcdir)/pex-unix.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(srcdir)/pex-common.h
@@ -788,6 +868,13 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/pex-win32.c $(OUTPUT_OPTION)
+./pexecute.o: $(srcdir)/pexecute.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pexecute.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pexecute.c $(OUTPUT_OPTION)
+
./physmem.o: $(srcdir)/physmem.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
@@ -807,7 +894,8 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/random.c $(OUTPUT_OPTION)
-./regex.o: $(srcdir)/regex.c config.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+./regex.o: $(srcdir)/regex.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/regex.c -o pic/$@; \
else true; fi
@@ -857,7 +945,8 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/sort.c $(OUTPUT_OPTION)
-./spaces.o: $(srcdir)/spaces.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+./spaces.o: $(srcdir)/spaces.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/spaces.c -o pic/$@; \
else true; fi
@@ -919,6 +1008,12 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/strncmp.c $(OUTPUT_OPTION)
+./strndup.o: $(srcdir)/strndup.c $(INCDIR)/ansidecl.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/strndup.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/strndup.c $(OUTPUT_OPTION)
+
./strrchr.o: $(srcdir)/strrchr.c $(INCDIR)/ansidecl.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/strrchr.c -o pic/$@; \
@@ -957,6 +1052,13 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/strtoul.c $(OUTPUT_OPTION)
+./strverscmp.o: $(srcdir)/strverscmp.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/strverscmp.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/strverscmp.c $(OUTPUT_OPTION)
+
./ternary.o: $(srcdir)/ternary.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/ternary.h
if [ x"$(PICFLAG)" != x ]; then \
@@ -970,6 +1072,13 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/tmpnam.c $(OUTPUT_OPTION)
+./unlink-if-ordinary.o: $(srcdir)/unlink-if-ordinary.c config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/unlink-if-ordinary.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/unlink-if-ordinary.c $(OUTPUT_OPTION)
+
./vasprintf.o: $(srcdir)/vasprintf.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
@@ -1008,13 +1117,14 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/vsprintf.c $(OUTPUT_OPTION)
-./waitpid.o: $(srcdir)/waitpid.c config.h
+./waitpid.o: $(srcdir)/waitpid.c config.h $(INCDIR)/ansidecl.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/waitpid.c -o pic/$@; \
else true; fi
$(COMPILE.c) $(srcdir)/waitpid.c $(OUTPUT_OPTION)
-./xatexit.o: $(srcdir)/xatexit.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+./xatexit.o: $(srcdir)/xatexit.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/xatexit.c -o pic/$@; \
else true; fi
@@ -1054,3 +1164,10 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/xstrerror.c $(OUTPUT_OPTION)
+./xstrndup.o: $(srcdir)/xstrndup.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/xstrndup.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/xstrndup.c $(OUTPUT_OPTION)
+
diff --git a/contrib/binutils/libiberty/_doprnt.c b/contrib/binutils/libiberty/_doprnt.c
index 8ce14158c991..ca97bc8c5d43 100644
--- a/contrib/binutils/libiberty/_doprnt.c
+++ b/contrib/binutils/libiberty/_doprnt.c
@@ -14,18 +14,14 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "config.h"
#include "ansidecl.h"
#include "safe-ctype.h"
#include <stdio.h>
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@@ -79,10 +75,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
} while (0)
int
-_doprnt (format, ap, stream)
- const char * format;
- va_list ap;
- FILE * stream;
+_doprnt (const char *format, va_list ap, FILE *stream)
{
const char * ptr = format;
char specifier[128];
@@ -223,10 +216,10 @@ _doprnt (format, ap, stream)
fflush(stdin); \
} while (0)
-static int checkit PARAMS ((const char * format, ...)) ATTRIBUTE_PRINTF_1;
+static int checkit (const char * format, ...) ATTRIBUTE_PRINTF_1;
static int
-checkit VPARAMS ((const char* format, ...))
+checkit (const char* format, ...)
{
int result;
VA_OPEN (args, format);
@@ -239,7 +232,7 @@ checkit VPARAMS ((const char* format, ...))
}
int
-main ()
+main (void)
{
RESULT(checkit ("<%d>\n", 0x12345678));
RESULT(printf ("<%d>\n", 0x12345678));
diff --git a/contrib/binutils/libiberty/aclocal.m4 b/contrib/binutils/libiberty/aclocal.m4
index f33e0c6218dc..0b49d0321228 100644
--- a/contrib/binutils/libiberty/aclocal.m4
+++ b/contrib/binutils/libiberty/aclocal.m4
@@ -1,4 +1,3 @@
-sinclude(../config/accross.m4)
sinclude(../config/acx.m4)
sinclude(../config/no-executables.m4)
@@ -120,15 +119,6 @@ if test $libiberty_cv_decl_needed_$1 = yes; then
fi
])dnl
-# Work around a bug in autoheader. This can go away when we switch to
-# autoconf >2.50. The use of define instead of AC_DEFUN is
-# deliberate.
-define(AC_DEFINE_NOAUTOHEADER,
-[cat >> confdefs.h <<\EOF
-[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
-EOF
-])
-
# We always want a C version of alloca() compiled into libiberty,
# because native-compiler support for the real alloca is so !@#$%
# unreliable that GCC has decided to use it only when being compiled
diff --git a/contrib/binutils/libiberty/alloca.c b/contrib/binutils/libiberty/alloca.c
index 918235df4652..9b2e9cb12b63 100644
--- a/contrib/binutils/libiberty/alloca.c
+++ b/contrib/binutils/libiberty/alloca.c
@@ -57,9 +57,15 @@ the possibility of a GCC built-in function.
/* These variables are used by the ASTRDUP implementation that relies
on C_alloca. */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
const char *libiberty_optr;
char *libiberty_nptr;
unsigned long libiberty_len;
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
@@ -97,7 +103,7 @@ static int stack_dir; /* 1 or -1 once known. */
#define STACK_DIR stack_dir
static void
-find_stack_direction ()
+find_stack_direction (void)
{
static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */
@@ -153,8 +159,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
/* @undocumented C_alloca */
PTR
-C_alloca (size)
- size_t size;
+C_alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
@@ -192,20 +197,20 @@ C_alloca (size)
/* Allocate combined header + user data storage. */
{
- register PTR new = xmalloc (sizeof (header) + size);
+ register void *new_storage = XNEWVEC (char, sizeof (header) + size);
/* Address of header. */
- if (new == 0)
+ if (new_storage == 0)
abort();
- ((header *) new)->h.next = last_alloca_header;
- ((header *) new)->h.deep = depth;
+ ((header *) new_storage)->h.next = last_alloca_header;
+ ((header *) new_storage)->h.deep = depth;
- last_alloca_header = (header *) new;
+ last_alloca_header = (header *) new_storage;
/* User storage begins just after header. */
- return (PTR) ((char *) new + sizeof (header));
+ return (PTR) ((char *) new_storage + sizeof (header));
}
}
diff --git a/contrib/binutils/libiberty/argv.c b/contrib/binutils/libiberty/argv.c
index 31d8ef55e266..11ca549a8ea9 100644
--- a/contrib/binutils/libiberty/argv.c
+++ b/contrib/binutils/libiberty/argv.c
@@ -15,39 +15,26 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* Create and destroy argument vectors. An argument vector is simply an
array of string pointers, terminated by a NULL pointer. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "ansidecl.h"
#include "libiberty.h"
-
-#define ISBLANK(ch) ((ch) == ' ' || (ch) == '\t')
+#include "safe-ctype.h"
/* Routines imported from standard C runtime libraries. */
-#ifdef ANSI_PROTOTYPES
-
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
-
-#else /* !ANSI_PROTOTYPES */
-
-#if !defined _WIN32 || defined __GNUC__
-extern char *memcpy (); /* Copy memory region */
-extern int strlen (); /* Count length of string */
-extern char *malloc (); /* Standard memory allocater */
-extern char *realloc (); /* Standard memory reallocator */
-extern void free (); /* Free malloc'd memory */
-extern char *strdup (); /* Duplicate a string */
-#endif
-
-#endif /* ANSI_PROTOTYPES */
-
+#include <stdio.h>
#ifndef NULL
#define NULL 0
@@ -75,8 +62,7 @@ argument vector.
*/
char **
-dupargv (argv)
- char **argv;
+dupargv (char **argv)
{
int argc;
char **copy;
@@ -94,7 +80,7 @@ dupargv (argv)
for (argc = 0; argv[argc] != NULL; argc++)
{
int len = strlen (argv[argc]);
- copy[argc] = malloc (sizeof (char *) * (len + 1));
+ copy[argc] = (char *) malloc (len + 1);
if (copy[argc] == NULL)
{
freeargv (copy);
@@ -119,8 +105,7 @@ itself.
*/
-void freeargv (vector)
-char **vector;
+void freeargv (char **vector)
{
register char **scan;
@@ -174,8 +159,7 @@ returned, as appropriate.
*/
-char **buildargv (input)
- const char *input;
+char **buildargv (const char *input)
{
char *arg;
char *copybuf;
@@ -228,7 +212,7 @@ char **buildargv (input)
arg = copybuf;
while (*input != EOS)
{
- if (ISBLANK (*input) && !squote && !dquote && !bsquote)
+ if (ISSPACE (*input) && !squote && !dquote && !bsquote)
{
break;
}
@@ -294,7 +278,7 @@ char **buildargv (input)
argc++;
argv[argc] = NULL;
- while (ISBLANK (*input))
+ while (ISSPACE (*input))
{
input++;
}
@@ -304,6 +288,126 @@ char **buildargv (input)
return (argv);
}
+/*
+
+@deftypefn Extension void expandargv (int *@var{argcp}, char ***@var{argvp})
+
+The @var{argcp} and @code{argvp} arguments are pointers to the usual
+@code{argc} and @code{argv} arguments to @code{main}. This function
+looks for arguments that begin with the character @samp{@@}. Any such
+arguments are interpreted as ``response files''. The contents of the
+response file are interpreted as additional command line options. In
+particular, the file is separated into whitespace-separated strings;
+each such string is taken as a command-line option. The new options
+are inserted in place of the option naming the response file, and
+@code{*argcp} and @code{*argvp} will be updated. If the value of
+@code{*argvp} is modified by this function, then the new value has
+been dynamically allocated and can be deallocated by the caller with
+@code{freeargv}. However, most callers will simply call
+@code{expandargv} near the beginning of @code{main} and allow the
+operating system to free the memory when the program exits.
+
+@end deftypefn
+
+*/
+
+void
+expandargv (argcp, argvp)
+ int *argcp;
+ char ***argvp;
+{
+ /* The argument we are currently processing. */
+ int i = 0;
+ /* Non-zero if ***argvp has been dynamically allocated. */
+ int argv_dynamic = 0;
+ /* Loop over the arguments, handling response files. We always skip
+ ARGVP[0], as that is the name of the program being run. */
+ while (++i < *argcp)
+ {
+ /* The name of the response file. */
+ const char *filename;
+ /* The response file. */
+ FILE *f;
+ /* An upper bound on the number of characters in the response
+ file. */
+ long pos;
+ /* The number of characters in the response file, when actually
+ read. */
+ size_t len;
+ /* A dynamically allocated buffer used to hold options read from a
+ response file. */
+ char *buffer;
+ /* Dynamically allocated storage for the options read from the
+ response file. */
+ char **file_argv;
+ /* The number of options read from the response file, if any. */
+ size_t file_argc;
+ /* We are only interested in options of the form "@file". */
+ filename = (*argvp)[i];
+ if (filename[0] != '@')
+ continue;
+ /* Read the contents of the file. */
+ f = fopen (++filename, "r");
+ if (!f)
+ continue;
+ if (fseek (f, 0L, SEEK_END) == -1)
+ goto error;
+ pos = ftell (f);
+ if (pos == -1)
+ goto error;
+ if (fseek (f, 0L, SEEK_SET) == -1)
+ goto error;
+ buffer = (char *) xmalloc (pos * sizeof (char) + 1);
+ len = fread (buffer, sizeof (char), pos, f);
+ if (len != (size_t) pos
+ /* On Windows, fread may return a value smaller than POS,
+ due to CR/LF->CR translation when reading text files.
+ That does not in-and-of itself indicate failure. */
+ && ferror (f))
+ goto error;
+ /* Add a NUL terminator. */
+ buffer[len] = '\0';
+ /* Parse the string. */
+ file_argv = buildargv (buffer);
+ /* If *ARGVP is not already dynamically allocated, copy it. */
+ if (!argv_dynamic)
+ {
+ *argvp = dupargv (*argvp);
+ if (!*argvp)
+ {
+ fputs ("\nout of memory\n", stderr);
+ xexit (1);
+ }
+ }
+ /* Count the number of arguments. */
+ file_argc = 0;
+ while (file_argv[file_argc] && *file_argv[file_argc])
+ ++file_argc;
+ /* Now, insert FILE_ARGV into ARGV. The "+1" below handles the
+ NULL terminator at the end of ARGV. */
+ *argvp = ((char **)
+ xrealloc (*argvp,
+ (*argcp + file_argc + 1) * sizeof (char *)));
+ memmove (*argvp + i + file_argc, *argvp + i + 1,
+ (*argcp - i) * sizeof (char *));
+ memcpy (*argvp + i, file_argv, file_argc * sizeof (char *));
+ /* The original option has been replaced by all the new
+ options. */
+ *argcp += file_argc - 1;
+ /* Free up memory allocated to process the response file. We do
+ not use freeargv because the individual options in FILE_ARGV
+ are now in the main ARGV. */
+ free (file_argv);
+ free (buffer);
+ /* Rescan all of the arguments just read to support response
+ files that include other response files. */
+ --i;
+ error:
+ /* We're all done with the file now. */
+ fclose (f);
+ }
+}
+
#ifdef MAIN
/* Simple little test driver. */
@@ -325,7 +429,8 @@ static const char *const tests[] =
NULL
};
-int main ()
+int
+main (void)
{
char **argv;
const char *const *test;
diff --git a/contrib/binutils/libiberty/asprintf.c b/contrib/binutils/libiberty/asprintf.c
index cd0543aa7ad4..3cf50526609a 100644
--- a/contrib/binutils/libiberty/asprintf.c
+++ b/contrib/binutils/libiberty/asprintf.c
@@ -16,17 +16,16 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+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
#include "ansidecl.h"
#include "libiberty.h"
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
/*
@@ -45,7 +44,7 @@ not be allocated, minus one is returned and @code{NULL} is stored in
*/
int
-asprintf VPARAMS ((char **buf, const char *fmt, ...))
+asprintf (char **buf, const char *fmt, ...)
{
int status;
VA_OPEN (ap, fmt);
diff --git a/contrib/binutils/libiberty/at-file.texi b/contrib/binutils/libiberty/at-file.texi
new file mode 100644
index 000000000000..080d1951d62d
--- /dev/null
+++ b/contrib/binutils/libiberty/at-file.texi
@@ -0,0 +1,15 @@
+@c This file is designed to be included in manuals that use
+@c expandargv.
+
+@item @@@var{file}
+Read command-line options from @var{file}. The options read are
+inserted in place of the original @@@var{file} option. If @var{file}
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+
+Options in @var{file} 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 @var{file} may itself contain additional
+@@@var{file} options; any such options will be processed recursively.
diff --git a/contrib/binutils/libiberty/atexit.c b/contrib/binutils/libiberty/atexit.c
index e14de29ab1d1..e091f0139eed 100644
--- a/contrib/binutils/libiberty/atexit.c
+++ b/contrib/binutils/libiberty/atexit.c
@@ -16,8 +16,7 @@ Causes function @var{f} to be called at exit. Returns 0.
#ifdef HAVE_ON_EXIT
int
-atexit(f)
- void (*f)();
+atexit(void (*f)(void))
{
/* If the system doesn't provide a definition for atexit, use on_exit
if the system provides that. */
diff --git a/contrib/binutils/libiberty/basename.c b/contrib/binutils/libiberty/basename.c
index 69a982d7dca8..0f2c069f0ccf 100644
--- a/contrib/binutils/libiberty/basename.c
+++ b/contrib/binutils/libiberty/basename.c
@@ -12,6 +12,9 @@ Behavior is undefined if the pathname ends in a directory separator.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "ansidecl.h"
#include "libiberty.h"
#include "safe-ctype.h"
@@ -37,8 +40,7 @@ Behavior is undefined if the pathname ends in a directory separator.
#endif /* DIR_SEPARATOR_2 */
char *
-basename (name)
- const char *name;
+basename (const char *name)
{
const char *base;
diff --git a/contrib/binutils/libiberty/bcmp.c b/contrib/binutils/libiberty/bcmp.c
index 1895773d52d4..c639f9895bcf 100644
--- a/contrib/binutils/libiberty/bcmp.c
+++ b/contrib/binutils/libiberty/bcmp.c
@@ -15,22 +15,13 @@ result mean @var{x} sorts before @var{y}).
*/
+#include <stddef.h>
+
+extern int memcmp(const void *, const void *, size_t);
int
-bcmp (from, to, count)
- char *from, *to;
- int count;
+bcmp (const void *s1, const void *s2, size_t count)
{
- int rtnval = 0;
-
- while (count-- > 0)
- {
- if (*from++ != *to++)
- {
- rtnval = 1;
- break;
- }
- }
- return (rtnval);
+ return memcmp (s1, s2, count);
}
diff --git a/contrib/binutils/libiberty/bcopy.c b/contrib/binutils/libiberty/bcopy.c
index 70fa7e328cc6..1e2eca9c6417 100644
--- a/contrib/binutils/libiberty/bcopy.c
+++ b/contrib/binutils/libiberty/bcopy.c
@@ -9,19 +9,23 @@ Copies @var{length} bytes from memory region @var{in} to region
*/
+#include <stddef.h>
+
void
-bcopy (src, dest, len)
- register char *src, *dest;
- int len;
+bcopy (const void *src, void *dest, size_t len)
{
if (dest < src)
- while (len--)
- *dest++ = *src++;
+ {
+ const char *firsts = src;
+ char *firstd = dest;
+ while (len--)
+ *firstd++ = *firsts++;
+ }
else
{
- char *lasts = src + (len-1);
- char *lastd = dest + (len-1);
+ const char *lasts = (const char *)src + (len-1);
+ char *lastd = (char *)dest + (len-1);
while (len--)
- *(char *)lastd-- = *(char *)lasts--;
+ *lastd-- = *lasts--;
}
}
diff --git a/contrib/binutils/libiberty/bsearch.c b/contrib/binutils/libiberty/bsearch.c
index b3283f9285fa..771d5de7b12a 100644
--- a/contrib/binutils/libiberty/bsearch.c
+++ b/contrib/binutils/libiberty/bsearch.c
@@ -67,24 +67,21 @@ is respectively less than, matching, or greater than the array member.
* look at item 3.
*/
void *
-bsearch(key, base0, nmemb, size, compar)
- register void *key;
- void *base0;
- size_t nmemb;
- register size_t size;
- register int (*compar)();
+bsearch (register const void *key, const void *base0,
+ size_t nmemb, register size_t size,
+ register int (*compar)(const void *, const void *))
{
- register char *base = base0;
+ register const char *base = (const char *) base0;
register int lim, cmp;
- register void *p;
+ register const void *p;
for (lim = nmemb; lim != 0; lim >>= 1) {
p = base + (lim >> 1) * size;
cmp = (*compar)(key, p);
if (cmp == 0)
- return (p);
+ return (void *)p;
if (cmp > 0) { /* key > p: move right */
- base = (char *)p + size;
+ base = (const char *)p + size;
lim--;
} /* else move left */
}
diff --git a/contrib/binutils/libiberty/bzero.c b/contrib/binutils/libiberty/bzero.c
index 8874118698e4..44ad73da4d6e 100644
--- a/contrib/binutils/libiberty/bzero.c
+++ b/contrib/binutils/libiberty/bzero.c
@@ -12,14 +12,12 @@ is deprecated in favor of @code{memset}.
*/
+#include <stddef.h>
+
+extern void *memset(void *, int, size_t);
void
-bzero (to, count)
- char *to;
- int count;
+bzero (void *to, size_t count)
{
- while (count-- > 0)
- {
- *to++ = 0;
- }
+ memset (to, 0, count);
}
diff --git a/contrib/binutils/libiberty/calloc.c b/contrib/binutils/libiberty/calloc.c
index 50736823077c..f4bd27b1cd2a 100644
--- a/contrib/binutils/libiberty/calloc.c
+++ b/contrib/binutils/libiberty/calloc.c
@@ -13,19 +13,14 @@ Uses @code{malloc} to allocate storage for @var{nelem} objects of
*/
#include "ansidecl.h"
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
/* For systems with larger pointers than ints, this must be declared. */
-PTR malloc PARAMS ((size_t));
-void bzero PARAMS ((PTR, size_t));
+PTR malloc (size_t);
+void bzero (PTR, size_t);
PTR
-calloc (nelem, elsize)
- size_t nelem, elsize;
+calloc (size_t nelem, size_t elsize)
{
register PTR ptr;
diff --git a/contrib/binutils/libiberty/choose-temp.c b/contrib/binutils/libiberty/choose-temp.c
index 5c2c6140dbf5..0cba9905d5bb 100644
--- a/contrib/binutils/libiberty/choose-temp.c
+++ b/contrib/binutils/libiberty/choose-temp.c
@@ -14,8 +14,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If not,
-write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include "libiberty.h"
-extern char *choose_tmpdir PARAMS ((void));
+extern char *choose_tmpdir (void);
/* Name of temporary file.
mktemp requires 6 trailing X's. */
@@ -54,14 +54,14 @@ not recommended.
*/
char *
-choose_temp_base ()
+choose_temp_base (void)
{
const char *base = choose_tmpdir ();
char *temp_filename;
int len;
len = strlen (base);
- temp_filename = xmalloc (len + TEMP_FILE_LEN + 1);
+ temp_filename = XNEWVEC (char, len + TEMP_FILE_LEN + 1);
strcpy (temp_filename, base);
strcpy (temp_filename + len, TEMP_FILE);
diff --git a/contrib/binutils/libiberty/clock.c b/contrib/binutils/libiberty/clock.c
index 3ea70c31c603..07d902e8a160 100644
--- a/contrib/binutils/libiberty/clock.c
+++ b/contrib/binutils/libiberty/clock.c
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does not cause
@@ -67,7 +67,7 @@ number of seconds used.
/* FIXME: should be able to declare as clock_t. */
long
-clock ()
+clock (void)
{
#ifdef HAVE_GETRUSAGE
struct rusage rusage;
diff --git a/contrib/binutils/libiberty/concat.c b/contrib/binutils/libiberty/concat.c
index 98b20e16a11a..1f329ea0e15d 100644
--- a/contrib/binutils/libiberty/concat.c
+++ b/contrib/binutils/libiberty/concat.c
@@ -15,8 +15,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/*
@@ -51,11 +51,7 @@ NOTES
#include "libiberty.h"
#include <sys/types.h> /* size_t */
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
# if HAVE_STRING_H
# include <string.h>
@@ -69,11 +65,9 @@ NOTES
#include <stdlib.h>
#endif
-static inline unsigned long vconcat_length PARAMS ((const char *, va_list));
+static inline unsigned long vconcat_length (const char *, va_list);
static inline unsigned long
-vconcat_length (first, args)
- const char *first;
- va_list args;
+vconcat_length (const char *first, va_list args)
{
unsigned long length = 0;
const char *arg;
@@ -84,12 +78,8 @@ vconcat_length (first, args)
return length;
}
-static inline char *vconcat_copy PARAMS ((char *, const char *, va_list));
static inline char *
-vconcat_copy (dst, first, args)
- char *dst;
- const char *first;
- va_list args;
+vconcat_copy (char *dst, const char *first, va_list args)
{
char *end = dst;
const char *arg;
@@ -108,7 +98,7 @@ vconcat_copy (dst, first, args)
/* @undocumented concat_length */
unsigned long
-concat_length VPARAMS ((const char *first, ...))
+concat_length (const char *first, ...)
{
unsigned long length;
@@ -123,7 +113,7 @@ concat_length VPARAMS ((const char *first, ...))
/* @undocumented concat_copy */
char *
-concat_copy VPARAMS ((char *dst, const char *first, ...))
+concat_copy (char *dst, const char *first, ...)
{
char *save_dst;
@@ -137,12 +127,18 @@ concat_copy VPARAMS ((char *dst, const char *first, ...))
return save_dst;
}
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
char *libiberty_concat_ptr;
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
/* @undocumented concat_copy2 */
char *
-concat_copy2 VPARAMS ((const char *first, ...))
+concat_copy2 (const char *first, ...)
{
VA_OPEN (args, first);
VA_FIXEDARG (args, const char *, first);
@@ -153,14 +149,14 @@ concat_copy2 VPARAMS ((const char *first, ...))
}
char *
-concat VPARAMS ((const char *first, ...))
+concat (const char *first, ...)
{
char *newstr;
/* First compute the size of the result and get sufficient memory. */
VA_OPEN (args, first);
VA_FIXEDARG (args, const char *, first);
- newstr = (char *) xmalloc (vconcat_length (first, args) + 1);
+ newstr = XNEWVEC (char, vconcat_length (first, args) + 1);
VA_CLOSE (args);
/* Now copy the individual pieces to the result string. */
@@ -190,7 +186,7 @@ loop:
*/
char *
-reconcat VPARAMS ((char *optr, const char *first, ...))
+reconcat (char *optr, const char *first, ...)
{
char *newstr;
@@ -198,7 +194,7 @@ reconcat VPARAMS ((char *optr, const char *first, ...))
VA_OPEN (args, first);
VA_FIXEDARG (args, char *, optr);
VA_FIXEDARG (args, const char *, first);
- newstr = (char *) xmalloc (vconcat_length (first, args) + 1);
+ newstr = XNEWVEC (char, vconcat_length (first, args) + 1);
VA_CLOSE (args);
/* Now copy the individual pieces to the result string. */
@@ -221,7 +217,7 @@ reconcat VPARAMS ((char *optr, const char *first, ...))
#include <stdio.h>
int
-main ()
+main (void)
{
printf ("\"\" = \"%s\"\n", concat (NULLP));
printf ("\"a\" = \"%s\"\n", concat ("a", NULLP));
diff --git a/contrib/binutils/libiberty/config.in b/contrib/binutils/libiberty/config.in
index 8e5071aec7ba..436a58d7e79c 100644
--- a/contrib/binutils/libiberty/config.in
+++ b/contrib/binutils/libiberty/config.in
@@ -1,10 +1,4 @@
/* config.in. Generated from configure.ac by autoheader. */
-/* Define to `unsigned long' if <sys/types.h> doesn't define. */
-#undef uintptr_t
-
-
-/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
-#undef BYTEORDER
/* 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. */
@@ -43,6 +37,57 @@
/* Define to 1 if you have the `clock' function. */
#undef HAVE_CLOCK
+/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_ASPRINTF
+
+/* 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 declaration of `calloc', and to 0 if you don't.
+ */
+#undef HAVE_DECL_CALLOC
+
+/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
+#undef HAVE_DECL_FFS
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_GETENV
+
+/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
+ */
+#undef HAVE_DECL_GETOPT
+
+/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
+ */
+#undef HAVE_DECL_MALLOC
+
+/* Define to 1 if you have the declaration of `realloc', and to 0 if you
+ don't. */
+#undef HAVE_DECL_REALLOC
+
+/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
+ */
+#undef HAVE_DECL_SBRK
+
+/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_SNPRINTF
+
+/* Define to 1 if you have the declaration of `strverscmp', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRVERSCMP
+
+/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_VASPRINTF
+
+/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_VSNPRINTF
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -154,6 +199,9 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -184,6 +232,9 @@
/* Define to 1 if you have the `strncasecmp' function. */
#undef HAVE_STRNCASECMP
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR
@@ -202,6 +253,9 @@
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
+/* Define to 1 if you have the `strverscmp' function. */
+#undef HAVE_STRVERSCMP
+
/* Define to 1 if you have the `sysconf' function. */
#undef HAVE_SYSCONF
@@ -301,6 +355,12 @@
/* Define to 1 if you have the `vsprintf' function. */
#undef HAVE_VSPRINTF
+/* Define to 1 if you have the `wait3' function. */
+#undef HAVE_WAIT3
+
+/* Define to 1 if you have the `wait4' function. */
+#undef HAVE_WAIT4
+
/* Define to 1 if you have the `waitpid' function. */
#undef HAVE_WAITPID
@@ -316,9 +376,8 @@
/* Define if you have the _system_configuration variable. */
#undef HAVE__SYSTEM_CONFIGURATION
-/* Define if the host machine stores words of multi-word integers in
- big-endian order. */
-#undef HOST_WORDS_BIG_ENDIAN
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
/* Define if canonicalize_file_name is not declared in system header files. */
#undef NEED_DECLARATION_CANONICALIZE_FILE_NAME
@@ -344,6 +403,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* The size of a `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
/* 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
@@ -356,15 +418,21 @@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
-/* whether byteorder is bigendian */
+/* Define to an unsigned 64-bit type available in the compiler. */
+#undef UNSIGNED_64BIT_TYPE
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
- if it is not supported. */
+/* 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 `int' if <sys/types.h> does not define. */
#undef pid_t
diff --git a/contrib/binutils/libiberty/config.table b/contrib/binutils/libiberty/config.table
deleted file mode 100644
index 1867cfeaafa0..000000000000
--- a/contrib/binutils/libiberty/config.table
+++ /dev/null
@@ -1,68 +0,0 @@
-# Don't build the shared library for build.
-if [ -n "${with_build_subdir}" ]; then
- enable_shared=no
-fi
-
-frag=
-case "${host}" in
- rs6000-ibm-aix3.1 | rs6000-ibm-aix)
- frag=mh-aix ;;
- *-*-cxux7*) frag=mh-cxux7 ;;
- *-*-freebsd2.1.*) frag=mh-fbsd21 ;;
- *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;;
- i370-*-opened*) frag=mh-openedition ;;
- i[34567]86-*-windows*) frag=mh-windows ;;
-esac
-
-if [ -n "${frag}" ]; then
- frags=${libiberty_topdir}/libiberty/config/$frag
-else
- frags=
-fi
-
-# If they didn't specify --enable-shared, don't generate shared libs.
-case "${enable_shared}" in
- yes) shared=yes ;;
- no) shared=no ;;
- "") shared=no ;;
- *) shared=yes ;;
-esac
-if [ "${shared}" = "yes" ]; then
- frag=
- case "${host}" in
- *-*-cygwin*) ;;
- alpha*-*-linux*) frag=mh-elfalphapic ;;
- arm*-*-*) frag=mh-armpic ;;
- hppa*-*-*) frag=mh-papic ;;
- i[34567]86-*-* | x86_64-*-*)
- frag=mh-x86pic ;;
- powerpc*-*-aix*) ;;
- powerpc*-*-*) frag=mh-ppcpic ;;
- sparc*-*-*) frag=mh-sparcpic ;;
- s390*-*-*) frag=mh-s390pic ;;
- *) frag=mh-${host_cpu}pic ;;
- esac
- if [ -n "${frag}" ]; then
- frags="${frags} ${libiberty_topdir}/config/${frag}"
- fi
-fi
-
-echo "# Warning: this fragment is automatically generated" > temp-frag
-
-for frag in ${frags}; do
- if [ -f ${frag} ]; then
- echo "Appending ${frag} to xhost-mkfrag"
- echo "# Following fragment copied from ${frag}" >> temp-frag
- cat ${frag} >> temp-frag
- fi
-done
-
-# record if we want to build shared libs.
-if [ "${shared}" = "yes" ]; then
- echo enable_shared = yes >> temp-frag
-else
- echo enable_shared = no >> temp-frag
-fi
-
-frag=xhost-mkfrag
-${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
diff --git a/contrib/binutils/libiberty/configure b/contrib/binutils/libiberty/configure
index 2f65976692d4..ed7423a006e7 100755
--- a/contrib/binutils/libiberty/configure
+++ b/contrib/binutils/libiberty/configure
@@ -1,9 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57.
+# Generated by GNU Autoconf 2.59.
#
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# 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.
## --------------------- ##
@@ -20,9 +19,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
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 (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -41,7 +41,7 @@ for as_var in \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ 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
@@ -218,16 +218,17 @@ 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="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -308,7 +309,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 libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP ac_libiberty_warn_cflags NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST 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 libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP ac_libiberty_warn_cflags NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST datarootdir docdir htmldir LTLIBOBJS'
ac_subst_files='host_makefile_frag'
# Initialize some variables set by options.
@@ -667,7 +668,7 @@ done
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+ localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
@@ -707,10 +708,10 @@ if test -z "$srcdir"; then
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -802,9 +803,9 @@ _ACEOF
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -901,12 +902,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# 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.
@@ -917,7 +951,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
+ test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
@@ -931,8 +965,7 @@ test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-Free Software Foundation, Inc.
+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
@@ -944,7 +977,7 @@ 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.57. Invocation command line was
+generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1021,19 +1054,19 @@ do
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.
+ 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
+ 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.
@@ -1067,12 +1100,12 @@ _ASBOX
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"
+ "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"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
@@ -1101,7 +1134,7 @@ _ASBOX
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
@@ -1120,7 +1153,7 @@ _ASBOX
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
- rm -f core core.* *.core &&
+ rm -f core *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
@@ -1200,7 +1233,7 @@ fi
# 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
+ 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"
@@ -1217,13 +1250,13 @@ echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
,);;
*)
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:$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:$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:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
@@ -1272,6 +1305,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of
# keeping the changes in LD private, export them just because LD is
@@ -2030,7 +2064,6 @@ ac_compiler=`set X $ac_compile; echo $2`
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2064,7 +2097,6 @@ if test x$gcc_no_link = xyes; then
EXEEXT=
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2084,8 +2116,8 @@ 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" >&5
-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+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
@@ -2105,23 +2137,23 @@ 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.
- ;;
+ # This is the source file.
+ ;;
[ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
+ # 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;;
+ 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;;
+ break;;
esac
done
else
@@ -2195,8 +2227,8 @@ for ac_file in conftest.exe conftest conftest.*; do
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;;
+ export ac_cv_exeext
+ break;;
* ) break;;
esac
done
@@ -2222,7 +2254,6 @@ if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2273,7 +2304,6 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2293,11 +2323,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -2310,7 +2350,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
@@ -2326,7 +2366,6 @@ if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2343,11 +2382,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -2360,7 +2409,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+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
@@ -2387,7 +2436,6 @@ else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2415,6 +2463,16 @@ static char *f (char * (*g) (char **, int), char **p, ...)
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);};
@@ -2441,11 +2499,21 @@ 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>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -2458,7 +2526,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext
+rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
@@ -2486,19 +2554,28 @@ cat >conftest.$ac_ext <<_ACEOF
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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 \
- ''\
- '#include <stdlib.h>' \
+ '' \
'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 ();' \
@@ -2506,14 +2583,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdlib.h>
$ac_declaration
+#include <stdlib.h>
int
main ()
{
@@ -2524,11 +2600,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -2541,9 +2627,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
continue
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2560,11 +2645,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -2576,7 +2671,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
@@ -2590,7 +2685,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+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'
@@ -2625,7 +2720,6 @@ do
# 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
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2636,7 +2730,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2648,6 +2742,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
@@ -2668,7 +2763,6 @@ 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
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2686,6 +2780,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
@@ -2732,7 +2827,6 @@ do
# 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
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2743,7 +2837,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2755,6 +2849,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
@@ -2775,7 +2870,6 @@ 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
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2793,6 +2887,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
@@ -2834,8 +2929,65 @@ 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
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="-Wc++-compat"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.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_cv_prog_cc_w_cxx_compat=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_w_cxx_compat=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
+
+
if test x$GCC = xyes; then
- ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
+ ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
+fi
+if test $ac_cv_prog_cc_w_cxx_compat = yes ; then
+ ac_libiberty_warn_cflags="${ac_libiberty_warn_cflags} -Wc++-compat"
fi
@@ -2852,7 +3004,6 @@ if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2903,11 +3054,11 @@ then
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); };
then
- # cc works too.
- :
+ # cc works too.
+ :
else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
fi
fi
@@ -2939,14 +3090,12 @@ 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
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3009,11 +3158,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3026,7 +3185,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_const=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+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
@@ -3046,7 +3205,6 @@ else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3061,11 +3219,21 @@ $ac_kw foo_t foo () {return 0; }
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3077,23 +3245,27 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+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) ;;
- no)
-cat >>confdefs.h <<\_ACEOF
-#define inline
-_ACEOF
- ;;
- *) cat >>confdefs.h <<_ACEOF
-#define inline $ac_cv_c_inline
+ *)
+ 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
_ACEOF
- ;;
+ ;;
esac
echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
@@ -3101,10 +3273,8 @@ echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
if test "${ac_cv_c_bigendian+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_c_bigendian=unknown
-# See if sys/param.h defines the BYTE_ORDER macro.
+ # See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3112,24 +3282,35 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
+
int
main ()
{
-
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
bogus endian macros
#endif
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3137,7 +3318,6 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(exit $ac_status); }; }; then
# It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3145,24 +3325,35 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
+
int
main ()
{
-
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3175,25 +3366,84 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_bigendian=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-if test $ac_cv_c_bigendian = unknown; then
+# It does not; compile a test program.
if test "$cross_compiling" = yes; then
- echo $ac_n "cross-compiling... " 2>&6
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ 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
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+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
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-main () {
+int
+main ()
+{
/* Are we little or big endian? From Harbison&Steele. */
union
{
@@ -3224,70 +3474,29 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_c_bigendian=yes
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-if test $ac_cv_c_bigendian = unknown; then
-echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
-echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
-
-cat >conftest.c <<EOF
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
-int main() { _ascii (); _ebcdic (); return 0; }
-EOF
- if test -f conftest.c ; then
- if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
- if test `grep -l BIGenDianSyS conftest.o` ; then
- echo $ac_n ' big endian probe OK, ' 1>&6
- ac_cv_c_bigendian=yes
- fi
- if test `grep -l LiTTleEnDian conftest.o` ; then
- echo $ac_n ' little endian probe OK, ' 1>&6
- if test $ac_cv_c_bigendian = yes ; then
- ac_cv_c_bigendian=unknown;
- else
- ac_cv_c_bigendian=no
- fi
- fi
- echo $ac_n 'guessing bigendian ... ' >&6
- fi
- fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-fi
-if test $ac_cv_c_bigendian = yes; then
+case $ac_cv_c_bigendian in
+ yes)
cat >>confdefs.h <<\_ACEOF
#define WORDS_BIGENDIAN 1
_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HOST_WORDS_BIG_ENDIAN 1
-_ACEOF
-
- BYTEORDER=4321
-else
- BYTEORDER=1234
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define BYTEORDER $BYTEORDER
-_ACEOF
-
-if test $ac_cv_c_bigendian = unknown; then
- { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5
-echo "$as_me: error: unknown endianess - sorry" >&2;}
- { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; }
-fi
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
@@ -3307,6 +3516,7 @@ fi
# 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
@@ -3323,6 +3533,7 @@ do
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.
@@ -3330,20 +3541,20 @@ case $as_dir/ in
# 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
+ 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
;;
@@ -3374,7 +3585,75 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-. ${srcdir}/config.table
+# Don't build the shared library for build.
+if [ -n "${with_build_subdir}" ]; then
+ enable_shared=no
+fi
+
+frag=
+case "${host}" in
+ rs6000-ibm-aix3.1 | rs6000-ibm-aix)
+ frag=mh-aix ;;
+ *-*-cxux7*) frag=mh-cxux7 ;;
+ *-*-freebsd2.1.*) frag=mh-fbsd21 ;;
+ *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;;
+ i370-*-opened*) frag=mh-openedition ;;
+ i[34567]86-*-windows*) frag=mh-windows ;;
+esac
+
+if [ -n "${frag}" ]; then
+ frags=${libiberty_topdir}/libiberty/config/$frag
+else
+ frags=
+fi
+
+# If they didn't specify --enable-shared, don't generate shared libs.
+case "${enable_shared}" in
+ yes) shared=yes ;;
+ no) shared=no ;;
+ "") shared=no ;;
+ *) shared=yes ;;
+esac
+if [ "${shared}" = "yes" ]; then
+ frag=
+ case "${host}" in
+ *-*-cygwin*) ;;
+ alpha*-*-linux*) frag=mh-elfalphapic ;;
+ arm*-*-*) frag=mh-armpic ;;
+ hppa*-*-*) frag=mh-papic ;;
+ i[34567]86-*-* | x86_64-*-*)
+ frag=mh-x86pic ;;
+ powerpc*-*-aix*) ;;
+ powerpc*-*-*) frag=mh-ppcpic ;;
+ sparc*-*-*) frag=mh-sparcpic ;;
+ s390*-*-*) frag=mh-s390pic ;;
+ *) frag=mh-${host_cpu}pic ;;
+ esac
+ if [ -n "${frag}" ]; then
+ frags="${frags} ${libiberty_topdir}/config/${frag}"
+ fi
+fi
+
+echo "# Warning: this fragment is automatically generated" > temp-frag
+
+for frag in ${frags}; do
+ if [ -f ${frag} ]; then
+ echo "Appending ${frag} to xhost-mkfrag"
+ echo "# Following fragment copied from ${frag}" >> temp-frag
+ cat ${frag} >> temp-frag
+ fi
+done
+
+# record if we want to build shared libs.
+if [ "${shared}" = "yes" ]; then
+ echo enable_shared = yes >> temp-frag
+else
+ echo enable_shared = no >> temp-frag
+fi
+
+frag=xhost-mkfrag
+${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
+
host_makefile_frag=${frag}
@@ -3404,7 +3683,9 @@ host_makefile_frag=${frag}
-for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h
+
+
+for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -3413,7 +3694,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3431,6 +3711,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
@@ -3463,7 +3744,6 @@ if test "${ac_cv_header_sys_wait_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3490,11 +3770,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3507,7 +3797,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_sys_wait_h=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
@@ -3525,7 +3815,6 @@ if test "${ac_cv_header_time+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3546,11 +3835,21 @@ return 0;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3563,7 +3862,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_time=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
@@ -3582,7 +3881,6 @@ if test "${libiberty_cv_declare_errno+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3599,11 +3897,21 @@ int x = errno;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3616,7 +3924,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
libiberty_cv_declare_errno=yes
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
@@ -3629,6 +3937,7 @@ _ACEOF
fi
+# Determine the size of an int for struct fibnode.
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
@@ -3650,7 +3959,6 @@ if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3671,11 +3979,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3688,12 +4006,11 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+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
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3715,7 +4032,6 @@ 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
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3740,7 +4056,6 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3752,9 +4067,9 @@ cat >>conftest.$ac_ext <<_ACEOF
# 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'))
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
@@ -3765,7 +4080,7 @@ main ()
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
+ || toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
@@ -3790,7 +4105,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -3815,7 +4130,7 @@ fi
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.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
@@ -3824,7 +4139,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3842,6 +4156,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
@@ -3869,13 +4184,427 @@ fi
done
+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 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
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3895,11 +4624,21 @@ if (sizeof (uintptr_t))
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3912,7 +4651,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_uintptr_t=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+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
@@ -3926,6 +4665,170 @@ _ACEOF
fi
+
+# Look for a 64-bit type.
+echo "$as_me:$LINENO: checking for a 64-bit type" >&5
+echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6
+if test "${liberty_cv_uint64+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 HAVE_STDINT_H
+#include <stdint.h>
+#endif
+int
+main ()
+{
+extern uint64_t foo;
+ ;
+ 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
+ liberty_cv_uint64=uint64_t
+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. */
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+int
+main ()
+{
+extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];
+ ;
+ 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
+ liberty_cv_uint64="unsigned long"
+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. */
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+int
+main ()
+{
+extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];
+ ;
+ 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
+ liberty_cv_uint64="unsigned long long"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+liberty_cv_uint64=none
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5
+echo "${ECHO_T}$liberty_cv_uint64" >&6
+if test "$liberty_cv_uint64" != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define UNSIGNED_64BIT_TYPE $liberty_cv_uint64
+_ACEOF
+
+fi
+
# Given the above check, we always have uintptr_t or a fallback
# definition. So define HAVE_UINTPTR_T in case any imported code
# relies on it.
@@ -3941,7 +4844,6 @@ if test "${ac_cv_type_pid_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3961,11 +4863,21 @@ if (sizeof (pid_t))
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -3978,7 +4890,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_pid_t=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
echo "${ECHO_T}$ac_cv_type_pid_t" >&6
@@ -4008,6 +4920,7 @@ funcs="$funcs clock"
funcs="$funcs ffs"
funcs="$funcs getcwd"
funcs="$funcs getpagesize"
+funcs="$funcs gettimeofday"
funcs="$funcs index"
funcs="$funcs insque"
funcs="$funcs memchr"
@@ -4030,11 +4943,13 @@ funcs="$funcs strcasecmp"
funcs="$funcs strchr"
funcs="$funcs strdup"
funcs="$funcs strncasecmp"
+funcs="$funcs strndup"
funcs="$funcs strrchr"
funcs="$funcs strstr"
funcs="$funcs strtod"
funcs="$funcs strtol"
funcs="$funcs strtoul"
+funcs="$funcs strverscmp"
funcs="$funcs tmpnam"
funcs="$funcs vasprintf"
funcs="$funcs vfprintf"
@@ -4049,7 +4964,7 @@ vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
-checkfuncs="$checkfuncs getsysinfo table sysctl"
+checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking"
# These are neither executed nor required, but they help keep
# autoheader happy without adding a bunch of text to acconfig.h.
@@ -4117,15 +5032,21 @@ if test "x" = "y"; then
+
+
+
+
+
+
for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
- getcwd getpagesize index insque mkstemps memchr memcmp memcpy \
+ getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
memmove mempcpy memset putenv random rename rindex sigsetmask \
- strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \
- strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \
+ strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
+ strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \
vsprintf waitpid getrusage on_exit psignal strerror strsignal \
sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
- pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \
- realpath canonicalize_file_name
+ pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl wait3 wait4 \
+ realpath canonicalize_file_name __fsetlocking
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -4139,7 +5060,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4186,11 +5106,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -4203,7 +5133,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+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
@@ -4215,6 +5146,428 @@ _ACEOF
fi
done
+ echo "$as_me:$LINENO: checking whether basename is declared" >&5
+echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_basename+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 ()
+{
+#ifndef basename
+ char *p = (char *) basename;
+#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_have_decl_basename=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_basename=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
+echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
+if test $ac_cv_have_decl_basename = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_BASENAME 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_BASENAME 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether ffs is declared" >&5
+echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_ffs+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 ()
+{
+#ifndef ffs
+ char *p = (char *) ffs;
+#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_have_decl_ffs=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_ffs=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5
+echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6
+if test $ac_cv_have_decl_ffs = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFS 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFS 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether asprintf is declared" >&5
+echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_asprintf+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 ()
+{
+#ifndef asprintf
+ char *p = (char *) asprintf;
+#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_have_decl_asprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_asprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6
+if test $ac_cv_have_decl_asprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ASPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ASPRINTF 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5
+echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_vasprintf+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 ()
+{
+#ifndef vasprintf
+ char *p = (char *) vasprintf;
+#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_have_decl_vasprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_vasprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6
+if test $ac_cv_have_decl_vasprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VASPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VASPRINTF 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
+echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_snprintf+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 ()
+{
+#ifndef snprintf
+ char *p = (char *) snprintf;
+#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_have_decl_snprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_snprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
+if test $ac_cv_have_decl_snprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
+echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_vsnprintf+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 ()
+{
+#ifndef vsnprintf
+ char *p = (char *) vsnprintf;
+#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_have_decl_vsnprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_vsnprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
+if test $ac_cv_have_decl_vsnprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 0
+_ACEOF
+
+
+fi
+
+
cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_ERRLIST 1
@@ -4250,12 +5603,54 @@ if test -n "${with_target_subdir}"; then
# newlib provide and which ones we will be expected to provide.
if test "x${with_newlib}" = "xyes"; then
- LIBOBJS="$LIBOBJS asprintf.$ac_objext"
- LIBOBJS="$LIBOBJS basename.$ac_objext"
- LIBOBJS="$LIBOBJS insque.$ac_objext"
- LIBOBJS="$LIBOBJS random.$ac_objext"
- LIBOBJS="$LIBOBJS strdup.$ac_objext"
- LIBOBJS="$LIBOBJS vasprintf.$ac_objext"
+ 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
+ "insque.$ac_objext" | \
+ *" insque.$ac_objext" | \
+ "insque.$ac_objext "* | \
+ *" insque.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS insque.$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
+ "strdup.$ac_objext" | \
+ *" strdup.$ac_objext" | \
+ "strdup.$ac_objext "* | \
+ *" strdup.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "vasprintf.$ac_objext" | \
+ *" vasprintf.$ac_objext" | \
+ "vasprintf.$ac_objext "* | \
+ *" vasprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
+esac
+
for f in $funcs; do
case "$f" in
@@ -4275,9 +5670,9 @@ _ACEOF
# dont have to check them here.
# Of the functions in $checkfuncs, newlib only has strerror.
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_STRERROR 1
-EOF
+_ACEOF
setobjs=yes
@@ -4310,7 +5705,7 @@ fi;
else
# Not a target library, so we set things up to run the test suite.
- CHECK=check-cplus-dem
+ CHECK=really-check
fi
@@ -4319,13 +5714,13 @@ fi
case "${host}" in
*-*-cygwin* | *-*-mingw*)
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_ERRLIST 1
-EOF
+_ACEOF
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_NERR 1
-EOF
+_ACEOF
;;
esac
@@ -4337,16 +5732,86 @@ if test -z "${setobjs}"; then
# Handle VxWorks configuration specially, since on VxWorks the
# libraries are actually on the target board, not in the file
# system.
- LIBOBJS="$LIBOBJS basename.$ac_objext"
- LIBOBJS="$LIBOBJS getpagesize.$ac_objext"
- LIBOBJS="$LIBOBJS insque.$ac_objext"
- LIBOBJS="$LIBOBJS random.$ac_objext"
- LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
- LIBOBJS="$LIBOBJS strncasecmp.$ac_objext"
- LIBOBJS="$LIBOBJS strdup.$ac_objext"
- LIBOBJS="$LIBOBJS vfork.$ac_objext"
- LIBOBJS="$LIBOBJS waitpid.$ac_objext"
- LIBOBJS="$LIBOBJS vasprintf.$ac_objext"
+ case $LIBOBJS in
+ "basename.$ac_objext" | \
+ *" basename.$ac_objext" | \
+ "basename.$ac_objext "* | \
+ *" basename.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS basename.$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
+ "insque.$ac_objext" | \
+ *" insque.$ac_objext" | \
+ "insque.$ac_objext "* | \
+ *" insque.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS insque.$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
+ "strcasecmp.$ac_objext" | \
+ *" strcasecmp.$ac_objext" | \
+ "strcasecmp.$ac_objext "* | \
+ *" strcasecmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "strncasecmp.$ac_objext" | \
+ *" strncasecmp.$ac_objext" | \
+ "strncasecmp.$ac_objext "* | \
+ *" strncasecmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "strdup.$ac_objext" | \
+ *" strdup.$ac_objext" | \
+ "strdup.$ac_objext "* | \
+ *" strdup.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "vfork.$ac_objext" | \
+ *" vfork.$ac_objext" | \
+ "vfork.$ac_objext "* | \
+ *" vfork.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "waitpid.$ac_objext" | \
+ *" waitpid.$ac_objext" | \
+ "waitpid.$ac_objext "* | \
+ *" waitpid.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "vasprintf.$ac_objext" | \
+ *" vasprintf.$ac_objext" | \
+ "vasprintf.$ac_objext "* | \
+ *" vasprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
+esac
+
for f in $funcs; do
case "$f" in
basename | getpagesize | insque | random | strcasecmp)
@@ -4367,9 +5832,9 @@ _ACEOF
# don't have to check them here.
# Of the functions in $checkfuncs, VxWorks only has strerror.
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_STRERROR 1
-EOF
+_ACEOF
setobjs=yes
@@ -4399,7 +5864,14 @@ if test -z "${setobjs}"; then
if test -n "${with_target_subdir}"
then
funcs="`echo $funcs | sed -e 's/random//'`"
- LIBOBJS="$LIBOBJS random.$ac_objext"
+ case $LIBOBJS in
+ "random.$ac_objext" | \
+ *" random.$ac_objext" | \
+ "random.$ac_objext "* | \
+ *" random.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
+esac
+
vars="`echo $vars | sed -e 's/sys_siglist//'`"
checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
fi
@@ -4412,6 +5884,11 @@ if test -z "${setobjs}"; then
libiberty_cv_var_sys_errlist=yes
;;
+ *-*-msdosdjgpp*)
+ # vfork and fork are stubs.
+ ac_cv_func_vfork_works=no
+ ;;
+
*-*-uwin*)
# Under some versions of uwin, vfork is notoriously buggy and the test
# can hang configure; on other versions, vfork exists just as a stub.
@@ -4448,7 +5925,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4472,11 +5948,21 @@ strerror ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -4488,7 +5974,8 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_strerror" = no; then
for ac_lib in cposix; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
@@ -4498,7 +5985,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4522,11 +6008,21 @@ strerror ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -4539,7 +6035,8 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
done
fi
LIBS=$ac_func_search_save_LIBS
@@ -4566,7 +6063,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4613,11 +6109,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -4630,7 +6136,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+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
@@ -4640,7 +6147,14 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
_ACEOF
else
- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ case $LIBOBJS in
+ "$ac_func.$ac_objext" | \
+ *" $ac_func.$ac_objext" | \
+ "$ac_func.$ac_objext "* | \
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
+esac
+
fi
done
@@ -4651,7 +6165,6 @@ if test "${ac_cv_os_cray+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4689,7 +6202,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4736,11 +6248,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -4753,7 +6275,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+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
@@ -4777,7 +6300,6 @@ else
ac_cv_c_stack_direction=0
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4820,7 +6342,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_c_stack_direction=-1
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+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
@@ -4842,7 +6364,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4860,6 +6381,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
@@ -4902,7 +6424,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4949,11 +6470,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -4966,7 +6497,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+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
@@ -4996,9 +6528,9 @@ else
/* Some systems only have a dummy stub for fork() */
int main ()
{
- if (fork() < 0)
- exit (1);
- exit (0);
+ if (fork() < 0)
+ exit (1);
+ exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
@@ -5021,7 +6553,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_fork_works=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+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_fork_works" >&5
@@ -5054,7 +6586,6 @@ else
ac_cv_func_vfork_works=cross
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5176,7 +6707,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_vfork_works=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+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_vfork_works" >&5
@@ -5184,7 +6715,7 @@ echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
- ac_cv_func_vfork_works=ac_cv_func_vfork
+ ac_cv_func_vfork_works=$ac_cv_func_vfork
{ echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
@@ -5211,7 +6742,14 @@ _ACEOF
fi
if test $ac_cv_func_vfork_works = no; then
- LIBOBJS="$LIBOBJS vfork.$ac_objext"
+ case $LIBOBJS in
+ "vfork.$ac_objext" | \
+ *" vfork.$ac_objext" | \
+ "vfork.$ac_objext "* | \
+ *" vfork.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
+esac
+
fi
# We only need _doprnt if we might use it to implement v*printf.
if test $ac_cv_func_vprintf != yes \
@@ -5232,7 +6770,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5279,11 +6816,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -5296,7 +6843,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+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
@@ -5306,7 +6854,14 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
_ACEOF
else
- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ case $LIBOBJS in
+ "$ac_func.$ac_objext" | \
+ *" $ac_func.$ac_objext" | \
+ "$ac_func.$ac_objext "* | \
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
+esac
+
fi
done
@@ -5327,7 +6882,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5374,11 +6928,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -5391,7 +6955,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+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
@@ -5417,7 +6982,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5434,11 +6998,21 @@ extern int $v []; p = $v;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -5451,7 +7025,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "libiberty_cv_var_$v=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
@@ -5473,7 +7048,6 @@ echo "${ECHO_T}no" >&6
echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5490,11 +7064,21 @@ double x = _system_configuration.physmem;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -5514,7 +7098,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
for ac_func in $checkfuncs
@@ -5531,7 +7115,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5578,11 +7161,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -5595,7 +7188,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+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
@@ -5607,13 +7201,928 @@ _ACEOF
fi
done
+ echo "$as_me:$LINENO: checking whether basename is declared" >&5
+echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_basename+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 ()
+{
+#ifndef basename
+ char *p = (char *) basename;
+#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_have_decl_basename=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_basename=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
+echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
+if test $ac_cv_have_decl_basename = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_BASENAME 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_BASENAME 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether ffs is declared" >&5
+echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_ffs+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 ()
+{
+#ifndef ffs
+ char *p = (char *) ffs;
+#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_have_decl_ffs=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_ffs=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5
+echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6
+if test $ac_cv_have_decl_ffs = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFS 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFS 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether asprintf is declared" >&5
+echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_asprintf+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 ()
+{
+#ifndef asprintf
+ char *p = (char *) asprintf;
+#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_have_decl_asprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_asprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6
+if test $ac_cv_have_decl_asprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ASPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ASPRINTF 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5
+echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_vasprintf+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 ()
+{
+#ifndef vasprintf
+ char *p = (char *) vasprintf;
+#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_have_decl_vasprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_vasprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6
+if test $ac_cv_have_decl_vasprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VASPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VASPRINTF 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
+echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_snprintf+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 ()
+{
+#ifndef snprintf
+ char *p = (char *) snprintf;
+#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_have_decl_snprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_snprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
+if test $ac_cv_have_decl_snprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
+echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_vsnprintf+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 ()
+{
+#ifndef vsnprintf
+ char *p = (char *) vsnprintf;
+#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_have_decl_vsnprintf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_vsnprintf=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
+if test $ac_cv_have_decl_vsnprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 0
+_ACEOF
+
+
+fi
+
+
+ echo "$as_me:$LINENO: checking whether calloc is declared" >&5
+echo $ECHO_N "checking whether calloc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_calloc+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 ()
+{
+#ifndef calloc
+ char *p = (char *) calloc;
+#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_have_decl_calloc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_calloc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_calloc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_calloc" >&6
+if test $ac_cv_have_decl_calloc = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CALLOC 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CALLOC 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether getenv is declared" >&5
+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getenv+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 ()
+{
+#ifndef getenv
+ char *p = (char *) getenv;
+#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_have_decl_getenv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getenv=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
+if test $ac_cv_have_decl_getenv = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether getopt is declared" >&5
+echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getopt+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 ()
+{
+#ifndef getopt
+ char *p = (char *) getopt;
+#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_have_decl_getopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getopt=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
+if test $ac_cv_have_decl_getopt = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETOPT 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETOPT 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether malloc is declared" >&5
+echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_malloc+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 ()
+{
+#ifndef malloc
+ char *p = (char *) malloc;
+#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_have_decl_malloc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_malloc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
+if test $ac_cv_have_decl_malloc = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MALLOC 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MALLOC 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether realloc is declared" >&5
+echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_realloc+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 ()
+{
+#ifndef realloc
+ char *p = (char *) realloc;
+#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_have_decl_realloc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_realloc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
+if test $ac_cv_have_decl_realloc = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_REALLOC 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_REALLOC 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether sbrk is declared" >&5
+echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_sbrk+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 ()
+{
+#ifndef sbrk
+ char *p = (char *) sbrk;
+#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_have_decl_sbrk=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_sbrk=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5
+echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6
+if test $ac_cv_have_decl_sbrk = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 0
+_ACEOF
+
+
+fi
+
+
+ echo "$as_me:$LINENO: checking whether strverscmp is declared" >&5
+echo $ECHO_N "checking whether strverscmp is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strverscmp+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 ()
+{
+#ifndef strverscmp
+ char *p = (char *) strverscmp;
+#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_have_decl_strverscmp=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_strverscmp=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strverscmp" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strverscmp" >&6
+if test $ac_cv_have_decl_strverscmp = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRVERSCMP 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRVERSCMP 0
+_ACEOF
+
+
+fi
+
+
echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5645,11 +8154,21 @@ char *(*pfn) = (char *(*)) canonicalize_file_name
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&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 -s conftest.$ac_objext'
+ { 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=$?
@@ -5662,7 +8181,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
libiberty_cv_decl_needed_canonicalize_file_name=yes
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
@@ -5682,7 +8201,6 @@ case "${host}" in
*-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;;
*-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;;
*-*-msdos*) pexecute=./pex-msdos.o ;;
- *-*-os2-emx*) pexecute=./pex-os2.o ;;
*) pexecute=./pex-unix.o ;;
esac
@@ -5692,7 +8210,7 @@ if test x$gcc_no_link = xyes; then
ac_cv_func_mmap_fixed_mapped=no
fi
fi
-if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
+if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then
for ac_header in stdlib.h unistd.h
@@ -5704,7 +8222,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5722,6 +8239,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
@@ -5763,7 +8281,6 @@ echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5810,11 +8327,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&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 -s conftest$ac_exeext'
+ { 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=$?
@@ -5827,7 +8354,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+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
@@ -5848,7 +8376,6 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5956,9 +8483,9 @@ main ()
data2 = (char *) malloc (2 * pagesize);
if (!data2)
exit (1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
exit (1);
for (i = 0; i < pagesize; ++i)
if (*(data + i) != *(data2 + i))
@@ -6001,7 +8528,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_mmap_fixed_mapped=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+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
@@ -6026,7 +8553,6 @@ else
ac_cv_func_strncmp_works=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6114,14 +8640,21 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_strncmp_works=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f core core.* *.core
fi
echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5
echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6
if test $ac_cv_func_strncmp_works = no ; then
- LIBOBJS="$LIBOBJS strncmp.$ac_objext"
+ case $LIBOBJS in
+ "strncmp.$ac_objext" | \
+ *" strncmp.$ac_objext" | \
+ "strncmp.$ac_objext "* | \
+ *" strncmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;;
+esac
+
fi
@@ -6144,9 +8677,15 @@ for l in x $LIBOBJS; do
done
LIBOBJS="$L"
+
+
+
+
# We need multilib support, but only if configuring for the target.
ac_config_files="$ac_config_files Makefile testsuite/Makefile"
+
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
@@ -6175,13 +8714,13 @@ _ACEOF
# `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"
+ "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"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
} |
@@ -6211,13 +8750,13 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# 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[ ]*=/{
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
+s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
-s/^[^=]*=[ ]*$//;
+s/^[^=]*=[ ]*$//;
}'
fi
@@ -6228,7 +8767,7 @@ 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$//'`
+ 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'
@@ -6272,9 +8811,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
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 (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -6293,7 +8833,7 @@ for as_var in \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ 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
@@ -6472,16 +9012,17 @@ 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="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -6508,7 +9049,7 @@ _ASBOX
cat >&5 <<_CSEOF
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.57. Invocation command line was
+generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -6552,9 +9093,9 @@ Usage: $0 [OPTIONS] [FILE]...
-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
+ instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+ instantiate the configuration header FILE
Configuration files:
$config_files
@@ -6571,11 +9112,10 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.57,
+configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+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
@@ -6674,7 +9214,6 @@ srcdir=${srcdir}
host=${host}
target=${target}
with_target_subdir=${with_target_subdir}
-with_build_subdir=${with_build_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
@@ -6819,6 +9358,9 @@ s,@CHECK@,$CHECK,;t t
s,@target_header_dir@,$target_header_dir,;t t
s,@pexecute@,$pexecute,;t t
s,@INSTALL_DEST@,$INSTALL_DEST,;t t
+s,@datarootdir@,$datarootdir,;t t
+s,@docdir@,$docdir,;t t
+s,@htmldir@,$htmldir,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
/@host_makefile_frag@/r $host_makefile_frag
s,@host_makefile_frag@,,;t t
@@ -6851,9 +9393,9 @@ _ACEOF
(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"
+ 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"
+ 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
@@ -6871,21 +9413,21 @@ 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
- | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ 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=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
# 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 ||
+ 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; }
@@ -6901,10 +9443,10 @@ echo X"$ac_file" |
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 ||
+ 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; }
@@ -6942,12 +9484,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# 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
case $INSTALL in
@@ -6969,7 +9544,7 @@ echo "$as_me: creating $ac_file" >&6;}
configure_input="$ac_file. "
fi
configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
+ sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
@@ -6978,24 +9553,24 @@ echo "$as_me: creating $ac_file" >&6;}
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
+ # 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;;
+ 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
+ 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;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
_ACEOF
@@ -7037,12 +9612,12 @@ cat >>$CONFIG_STATUS <<\_ACEOF
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'
@@ -7051,11 +9626,11 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.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,:.*,,'` ;;
+ 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=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
@@ -7069,28 +9644,29 @@ echo "$as_me: creating $ac_file" >&6;}
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
+ # 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;;
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ 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
+ 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;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
# Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
_ACEOF
@@ -7113,9 +9689,9 @@ s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
_ACEOF
# If some macros were called several times there might be several times
@@ -7129,13 +9705,13 @@ rm -f confdef2sed.sed
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
_ACEOF
# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo ' :' >>$CONFIG_STATUS
rm -f conftest.tail
@@ -7144,7 +9720,7 @@ do
# Write a limited-size here document to $tmp/defines.sed.
echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -7171,7 +9747,7 @@ do
# Write a limited-size here document to $tmp/undefs.sed.
echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -7205,10 +9781,10 @@ echo "$as_me: $ac_file is unchanged" >&6;}
else
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 ||
+ 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; }
@@ -7224,10 +9800,10 @@ echo X"$ac_file" |
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 ||
+ 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; }
@@ -7259,16 +9835,41 @@ for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$ac_dest" |
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
+ 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=.
if test "$ac_dir" != .; then
@@ -7294,12 +9895,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# 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 "$as_me:$LINENO: executing $ac_dest commands" >&5
@@ -7307,7 +9941,7 @@ echo "$as_me: executing $ac_dest commands" >&6;}
case $ac_dest in
default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then
- if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
+ if test -n "${with_target_subdir}"; then
# FIXME: We shouldn't need to set ac_file
ac_file=Makefile
LD="${ORIGINAL_LD_FOR_MULTILIBS}"
diff --git a/contrib/binutils/libiberty/copying-lib.texi b/contrib/binutils/libiberty/copying-lib.texi
index 940f70e0d631..79e1038783d5 100644
--- a/contrib/binutils/libiberty/copying-lib.texi
+++ b/contrib/binutils/libiberty/copying-lib.texi
@@ -6,7 +6,7 @@
@display
Copyright @copyright{} 1991, 1999 Free Software Foundation, Inc.
-59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -544,7 +544,7 @@ Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
@end smallexample
diff --git a/contrib/binutils/libiberty/copysign.c b/contrib/binutils/libiberty/copysign.c
index d288be239eb4..6793f22e8cca 100644
--- a/contrib/binutils/libiberty/copysign.c
+++ b/contrib/binutils/libiberty/copysign.c
@@ -132,8 +132,7 @@ typedef union
#if defined(__IEEE_BIG_ENDIAN) || defined(__IEEE_LITTLE_ENDIAN)
double
-copysign (x, y)
- double x, y;
+copysign (double x, double y)
{
__ieee_double_shape_type a,b;
b.value = y;
@@ -145,8 +144,7 @@ copysign (x, y)
#else
double
-copysign (x, y)
- double x, y;
+copysign (double x, double y)
{
if ((x < 0 && y > 0) || (x > 0 && y < 0))
return -x;
diff --git a/contrib/binutils/libiberty/cp-demangle.c b/contrib/binutils/libiberty/cp-demangle.c
index bb543fa0c2fb..109d533b524e 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 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 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.
@@ -25,7 +25,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* This code implements a demangler for the g++ V3 ABI. The ABI is
@@ -109,39 +109,34 @@
#define CP_STATIC_IF_GLIBCPP_V3 static
#define cplus_demangle_fill_name d_fill_name
-static int
-d_fill_name PARAMS ((struct demangle_component *, const char *, int));
+static int d_fill_name (struct demangle_component *, const char *, int);
#define cplus_demangle_fill_extended_operator d_fill_extended_operator
static int
-d_fill_extended_operator PARAMS ((struct demangle_component *, int,
- struct demangle_component *));
+d_fill_extended_operator (struct demangle_component *, int,
+ struct demangle_component *);
#define cplus_demangle_fill_ctor d_fill_ctor
static int
-d_fill_ctor PARAMS ((struct demangle_component *, enum gnu_v3_ctor_kinds,
- struct demangle_component *));
+d_fill_ctor (struct demangle_component *, enum gnu_v3_ctor_kinds,
+ struct demangle_component *);
#define cplus_demangle_fill_dtor d_fill_dtor
static int
-d_fill_dtor PARAMS ((struct demangle_component *, enum gnu_v3_dtor_kinds,
- struct demangle_component *));
+d_fill_dtor (struct demangle_component *, enum gnu_v3_dtor_kinds,
+ struct demangle_component *);
#define cplus_demangle_mangled_name d_mangled_name
-static struct demangle_component *
-d_mangled_name PARAMS ((struct d_info *, int));
+static struct demangle_component *d_mangled_name (struct d_info *, int);
#define cplus_demangle_type d_type
-static struct demangle_component *
-d_type PARAMS ((struct d_info *));
+static struct demangle_component *d_type (struct d_info *);
#define cplus_demangle_print d_print
-static char *
-d_print PARAMS ((int, const struct demangle_component *, int, size_t *));
+static char *d_print (int, const struct demangle_component *, int, size_t *);
#define cplus_demangle_init_info d_init_info
-static void
-d_init_info PARAMS ((const char *, int, size_t, struct d_info *));
+static void d_init_info (const char *, int, size_t, struct d_info *);
#else /* ! defined(IN_GLIBCPP_V3) */
#define CP_STATIC_IF_GLIBCPP_V3
@@ -215,7 +210,7 @@ struct d_print_template
/* Next template on the list. */
struct d_print_template *next;
/* This template. */
- const struct demangle_component *template;
+ const struct demangle_component *template_decl;
};
/* A list of type modifiers. This is used while printing. */
@@ -286,187 +281,157 @@ struct d_print_info
((dpi)->buf == NULL || (dpi)->len == 0 ? '\0' : (dpi)->buf[(dpi)->len - 1])
#ifdef CP_DEMANGLE_DEBUG
-static void
-d_dump PARAMS ((struct demangle_component *, int));
+static void d_dump (struct demangle_component *, int);
#endif
static struct demangle_component *
-d_make_empty PARAMS ((struct d_info *));
+d_make_empty (struct d_info *);
static struct demangle_component *
-d_make_comp PARAMS ((struct d_info *, enum demangle_component_type,
- struct demangle_component *,
- struct demangle_component *));
+d_make_comp (struct d_info *, enum demangle_component_type,
+ struct demangle_component *,
+ struct demangle_component *);
static struct demangle_component *
-d_make_name PARAMS ((struct d_info *, const char *, int));
+d_make_name (struct d_info *, const char *, int);
static struct demangle_component *
-d_make_builtin_type PARAMS ((struct d_info *,
- const struct demangle_builtin_type_info *));
+d_make_builtin_type (struct d_info *,
+ const struct demangle_builtin_type_info *);
static struct demangle_component *
-d_make_operator PARAMS ((struct d_info *,
- const struct demangle_operator_info *));
+d_make_operator (struct d_info *,
+ const struct demangle_operator_info *);
static struct demangle_component *
-d_make_extended_operator PARAMS ((struct d_info *, int,
- struct demangle_component *));
+d_make_extended_operator (struct d_info *, int,
+ struct demangle_component *);
static struct demangle_component *
-d_make_ctor PARAMS ((struct d_info *, enum gnu_v3_ctor_kinds,
- struct demangle_component *));
+d_make_ctor (struct d_info *, enum gnu_v3_ctor_kinds,
+ struct demangle_component *);
static struct demangle_component *
-d_make_dtor PARAMS ((struct d_info *, enum gnu_v3_dtor_kinds,
- struct demangle_component *));
+d_make_dtor (struct d_info *, enum gnu_v3_dtor_kinds,
+ struct demangle_component *);
static struct demangle_component *
-d_make_template_param PARAMS ((struct d_info *, long));
+d_make_template_param (struct d_info *, long);
static struct demangle_component *
-d_make_sub PARAMS ((struct d_info *, const char *, int));
+d_make_sub (struct d_info *, const char *, int);
static int
-has_return_type PARAMS ((struct demangle_component *));
+has_return_type (struct demangle_component *);
static int
-is_ctor_dtor_or_conversion PARAMS ((struct demangle_component *));
+is_ctor_dtor_or_conversion (struct demangle_component *);
-static struct demangle_component *
-d_encoding PARAMS ((struct d_info *, int));
+static struct demangle_component *d_encoding (struct d_info *, int);
-static struct demangle_component *
-d_name PARAMS ((struct d_info *));
+static struct demangle_component *d_name (struct d_info *);
-static struct demangle_component *
-d_nested_name PARAMS ((struct d_info *));
+static struct demangle_component *d_nested_name (struct d_info *);
-static struct demangle_component *
-d_prefix PARAMS ((struct d_info *));
+static struct demangle_component *d_prefix (struct d_info *);
-static struct demangle_component *
-d_unqualified_name PARAMS ((struct d_info *));
+static struct demangle_component *d_unqualified_name (struct d_info *);
-static struct demangle_component *
-d_source_name PARAMS ((struct d_info *));
+static struct demangle_component *d_source_name (struct d_info *);
-static long
-d_number PARAMS ((struct d_info *));
+static long d_number (struct d_info *);
-static struct demangle_component *
-d_identifier PARAMS ((struct d_info *, int));
+static struct demangle_component *d_identifier (struct d_info *, int);
-static struct demangle_component *
-d_operator_name PARAMS ((struct d_info *));
+static struct demangle_component *d_operator_name (struct d_info *);
-static struct demangle_component *
-d_special_name PARAMS ((struct d_info *));
+static struct demangle_component *d_special_name (struct d_info *);
-static int
-d_call_offset PARAMS ((struct d_info *, int));
+static int d_call_offset (struct d_info *, int);
-static struct demangle_component *
-d_ctor_dtor_name PARAMS ((struct d_info *));
+static struct demangle_component *d_ctor_dtor_name (struct d_info *);
static struct demangle_component **
-d_cv_qualifiers PARAMS ((struct d_info *, struct demangle_component **, int));
+d_cv_qualifiers (struct d_info *, struct demangle_component **, int);
static struct demangle_component *
-d_function_type PARAMS ((struct d_info *));
+d_function_type (struct d_info *);
static struct demangle_component *
-d_bare_function_type PARAMS ((struct d_info *, int));
+d_bare_function_type (struct d_info *, int);
static struct demangle_component *
-d_class_enum_type PARAMS ((struct d_info *));
+d_class_enum_type (struct d_info *);
-static struct demangle_component *
-d_array_type PARAMS ((struct d_info *));
+static struct demangle_component *d_array_type (struct d_info *);
static struct demangle_component *
-d_pointer_to_member_type PARAMS ((struct d_info *));
+d_pointer_to_member_type (struct d_info *);
static struct demangle_component *
-d_template_param PARAMS ((struct d_info *));
+d_template_param (struct d_info *);
-static struct demangle_component *
-d_template_args PARAMS ((struct d_info *));
+static struct demangle_component *d_template_args (struct d_info *);
static struct demangle_component *
-d_template_arg PARAMS ((struct d_info *));
+d_template_arg (struct d_info *);
-static struct demangle_component *
-d_expression PARAMS ((struct d_info *));
+static struct demangle_component *d_expression (struct d_info *);
-static struct demangle_component *
-d_expr_primary PARAMS ((struct d_info *));
+static struct demangle_component *d_expr_primary (struct d_info *);
-static struct demangle_component *
-d_local_name PARAMS ((struct d_info *));
+static struct demangle_component *d_local_name (struct d_info *);
-static int
-d_discriminator PARAMS ((struct d_info *));
+static int d_discriminator (struct d_info *);
static int
-d_add_substitution PARAMS ((struct d_info *, struct demangle_component *));
+d_add_substitution (struct d_info *, struct demangle_component *);
-static struct demangle_component *
-d_substitution PARAMS ((struct d_info *, int));
+static struct demangle_component *d_substitution (struct d_info *, int);
-static void
-d_print_resize PARAMS ((struct d_print_info *, size_t));
+static void d_print_resize (struct d_print_info *, size_t);
-static void
-d_print_append_char PARAMS ((struct d_print_info *, int));
+static void d_print_append_char (struct d_print_info *, int);
static void
-d_print_append_buffer PARAMS ((struct d_print_info *, const char *, size_t));
+d_print_append_buffer (struct d_print_info *, const char *, size_t);
-static void
-d_print_error PARAMS ((struct d_print_info *));
+static void d_print_error (struct d_print_info *);
static void
-d_print_comp PARAMS ((struct d_print_info *,
- const struct demangle_component *));
+d_print_comp (struct d_print_info *, const struct demangle_component *);
static void
-d_print_java_identifier PARAMS ((struct d_print_info *, const char *, int));
+d_print_java_identifier (struct d_print_info *, const char *, int);
static void
-d_print_mod_list PARAMS ((struct d_print_info *, struct d_print_mod *, int));
+d_print_mod_list (struct d_print_info *, struct d_print_mod *, int);
static void
-d_print_mod PARAMS ((struct d_print_info *,
- const struct demangle_component *));
+d_print_mod (struct d_print_info *, const struct demangle_component *);
static void
-d_print_function_type PARAMS ((struct d_print_info *,
- const struct demangle_component *,
- struct d_print_mod *));
+d_print_function_type (struct d_print_info *,
+ const struct demangle_component *,
+ struct d_print_mod *);
static void
-d_print_array_type PARAMS ((struct d_print_info *,
- const struct demangle_component *,
- struct d_print_mod *));
+d_print_array_type (struct d_print_info *,
+ const struct demangle_component *,
+ struct d_print_mod *);
static void
-d_print_expr_op PARAMS ((struct d_print_info *,
- const struct demangle_component *));
+d_print_expr_op (struct d_print_info *, const struct demangle_component *);
static void
-d_print_cast PARAMS ((struct d_print_info *,
- const struct demangle_component *));
+d_print_cast (struct d_print_info *, const struct demangle_component *);
-static char *
-d_demangle PARAMS ((const char *, int, size_t *));
+static char *d_demangle (const char *, int, size_t *);
#ifdef CP_DEMANGLE_DEBUG
static void
-d_dump (dc, indent)
- struct demangle_component *dc;
- int indent;
+d_dump (struct demangle_component *dc, int indent)
{
int i;
@@ -555,6 +520,9 @@ d_dump (dc, indent)
case DEMANGLE_COMPONENT_REFTEMP:
printf ("reference temporary\n");
break;
+ case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
+ printf ("hidden alias\n");
+ break;
case DEMANGLE_COMPONENT_RESTRICT:
printf ("restrict\n");
break;
@@ -645,10 +613,7 @@ d_dump (dc, indent)
CP_STATIC_IF_GLIBCPP_V3
int
-cplus_demangle_fill_name (p, s, len)
- struct demangle_component *p;
- const char *s;
- int len;
+cplus_demangle_fill_name (struct demangle_component *p, const char *s, int len)
{
if (p == NULL || s == NULL || len == 0)
return 0;
@@ -662,10 +627,8 @@ cplus_demangle_fill_name (p, s, len)
CP_STATIC_IF_GLIBCPP_V3
int
-cplus_demangle_fill_extended_operator (p, args, name)
- struct demangle_component *p;
- int args;
- struct demangle_component *name;
+cplus_demangle_fill_extended_operator (struct demangle_component *p, int args,
+ struct demangle_component *name)
{
if (p == NULL || args < 0 || name == NULL)
return 0;
@@ -679,10 +642,9 @@ cplus_demangle_fill_extended_operator (p, args, name)
CP_STATIC_IF_GLIBCPP_V3
int
-cplus_demangle_fill_ctor (p, kind, name)
- struct demangle_component *p;
- enum gnu_v3_ctor_kinds kind;
- struct demangle_component *name;
+cplus_demangle_fill_ctor (struct demangle_component *p,
+ enum gnu_v3_ctor_kinds kind,
+ struct demangle_component *name)
{
if (p == NULL
|| name == NULL
@@ -699,10 +661,9 @@ cplus_demangle_fill_ctor (p, kind, name)
CP_STATIC_IF_GLIBCPP_V3
int
-cplus_demangle_fill_dtor (p, kind, name)
- struct demangle_component *p;
- enum gnu_v3_dtor_kinds kind;
- struct demangle_component *name;
+cplus_demangle_fill_dtor (struct demangle_component *p,
+ enum gnu_v3_dtor_kinds kind,
+ struct demangle_component *name)
{
if (p == NULL
|| name == NULL
@@ -718,8 +679,7 @@ cplus_demangle_fill_dtor (p, kind, name)
/* Add a new component. */
static struct demangle_component *
-d_make_empty (di)
- struct d_info *di;
+d_make_empty (struct d_info *di)
{
struct demangle_component *p;
@@ -733,11 +693,9 @@ d_make_empty (di)
/* Add a new generic component. */
static struct demangle_component *
-d_make_comp (di, type, left, right)
- struct d_info *di;
- enum demangle_component_type type;
- struct demangle_component *left;
- struct demangle_component *right;
+d_make_comp (struct d_info *di, enum demangle_component_type type,
+ struct demangle_component *left,
+ struct demangle_component *right)
{
struct demangle_component *p;
@@ -778,6 +736,7 @@ d_make_comp (di, type, left, right)
case DEMANGLE_COMPONENT_JAVA_CLASS:
case DEMANGLE_COMPONENT_GUARD:
case DEMANGLE_COMPONENT_REFTEMP:
+ case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
case DEMANGLE_COMPONENT_POINTER:
case DEMANGLE_COMPONENT_REFERENCE:
case DEMANGLE_COMPONENT_COMPLEX:
@@ -826,10 +785,7 @@ d_make_comp (di, type, left, right)
/* Add a new name component. */
static struct demangle_component *
-d_make_name (di, s, len)
- struct d_info *di;
- const char *s;
- int len;
+d_make_name (struct d_info *di, const char *s, int len)
{
struct demangle_component *p;
@@ -842,9 +798,8 @@ d_make_name (di, s, len)
/* Add a new builtin type component. */
static struct demangle_component *
-d_make_builtin_type (di, type)
- struct d_info *di;
- const struct demangle_builtin_type_info *type;
+d_make_builtin_type (struct d_info *di,
+ const struct demangle_builtin_type_info *type)
{
struct demangle_component *p;
@@ -862,9 +817,7 @@ d_make_builtin_type (di, type)
/* Add a new operator component. */
static struct demangle_component *
-d_make_operator (di, op)
- struct d_info *di;
- const struct demangle_operator_info *op;
+d_make_operator (struct d_info *di, const struct demangle_operator_info *op)
{
struct demangle_component *p;
@@ -880,10 +833,8 @@ d_make_operator (di, op)
/* Add a new extended operator component. */
static struct demangle_component *
-d_make_extended_operator (di, args, name)
- struct d_info *di;
- int args;
- struct demangle_component *name;
+d_make_extended_operator (struct d_info *di, int args,
+ struct demangle_component *name)
{
struct demangle_component *p;
@@ -896,10 +847,8 @@ d_make_extended_operator (di, args, name)
/* Add a new constructor component. */
static struct demangle_component *
-d_make_ctor (di, kind, name)
- struct d_info *di;
- enum gnu_v3_ctor_kinds kind;
- struct demangle_component *name;
+d_make_ctor (struct d_info *di, enum gnu_v3_ctor_kinds kind,
+ struct demangle_component *name)
{
struct demangle_component *p;
@@ -912,10 +861,8 @@ d_make_ctor (di, kind, name)
/* Add a new destructor component. */
static struct demangle_component *
-d_make_dtor (di, kind, name)
- struct d_info *di;
- enum gnu_v3_dtor_kinds kind;
- struct demangle_component *name;
+d_make_dtor (struct d_info *di, enum gnu_v3_dtor_kinds kind,
+ struct demangle_component *name)
{
struct demangle_component *p;
@@ -928,9 +875,7 @@ d_make_dtor (di, kind, name)
/* Add a new template parameter. */
static struct demangle_component *
-d_make_template_param (di, i)
- struct d_info *di;
- long i;
+d_make_template_param (struct d_info *di, long i)
{
struct demangle_component *p;
@@ -946,10 +891,7 @@ d_make_template_param (di, i)
/* Add a new standard substitution component. */
static struct demangle_component *
-d_make_sub (di, name, len)
- struct d_info *di;
- const char *name;
- int len;
+d_make_sub (struct d_info *di, const char *name, int len)
{
struct demangle_component *p;
@@ -969,9 +911,7 @@ d_make_sub (di, name, len)
CP_STATIC_IF_GLIBCPP_V3
struct demangle_component *
-cplus_demangle_mangled_name (di, top_level)
- struct d_info *di;
- int top_level;
+cplus_demangle_mangled_name (struct d_info *di, int top_level)
{
if (d_next_char (di) != '_')
return NULL;
@@ -990,8 +930,7 @@ cplus_demangle_mangled_name (di, top_level)
return types. */
static int
-has_return_type (dc)
- struct demangle_component *dc;
+has_return_type (struct demangle_component *dc)
{
if (dc == NULL)
return 0;
@@ -1012,8 +951,7 @@ has_return_type (dc)
conversion operator. */
static int
-is_ctor_dtor_or_conversion (dc)
- struct demangle_component *dc;
+is_ctor_dtor_or_conversion (struct demangle_component *dc)
{
if (dc == NULL)
return 0;
@@ -1041,9 +979,7 @@ is_ctor_dtor_or_conversion (dc)
we would not correctly demangle names in local scopes. */
static struct demangle_component *
-d_encoding (di, top_level)
- struct d_info *di;
- int top_level;
+d_encoding (struct d_info *di, int top_level)
{
char peek = d_peek_char (di);
@@ -1105,8 +1041,7 @@ d_encoding (di, top_level)
*/
static struct demangle_component *
-d_name (di)
- struct d_info *di;
+d_name (struct d_info *di)
{
char peek = d_peek_char (di);
struct demangle_component *dc;
@@ -1183,8 +1118,7 @@ d_name (di)
*/
static struct demangle_component *
-d_nested_name (di)
- struct d_info *di;
+d_nested_name (struct d_info *di)
{
struct demangle_component *ret;
struct demangle_component **pret;
@@ -1218,8 +1152,7 @@ d_nested_name (di)
*/
static struct demangle_component *
-d_prefix (di)
- struct d_info *di;
+d_prefix (struct d_info *di)
{
struct demangle_component *ret = NULL;
@@ -1278,8 +1211,7 @@ d_prefix (di)
*/
static struct demangle_component *
-d_unqualified_name (di)
- struct d_info *di;
+d_unqualified_name (struct d_info *di)
{
char peek;
@@ -1304,8 +1236,7 @@ d_unqualified_name (di)
/* <source-name> ::= <(positive length) number> <identifier> */
static struct demangle_component *
-d_source_name (di)
- struct d_info *di;
+d_source_name (struct d_info *di)
{
long len;
struct demangle_component *ret;
@@ -1321,8 +1252,7 @@ d_source_name (di)
/* number ::= [n] <(non-negative decimal integer)> */
static long
-d_number (di)
- struct d_info *di;
+d_number (struct d_info *di)
{
int negative;
char peek;
@@ -1355,9 +1285,7 @@ d_number (di)
/* identifier ::= <(unqualified source code identifier)> */
static struct demangle_component *
-d_identifier (di, len)
- struct d_info *di;
- int len;
+d_identifier (struct d_info *di, int len)
{
const char *name;
@@ -1460,8 +1388,7 @@ const struct demangle_operator_info cplus_demangle_operators[] =
};
static struct demangle_component *
-d_operator_name (di)
- struct d_info *di;
+d_operator_name (struct d_info *di)
{
char c1;
char c2;
@@ -1516,11 +1443,11 @@ d_operator_name (di)
::= TF <type>
::= TJ <type>
::= GR <name>
+ ::= GA <encoding>
*/
static struct demangle_component *
-d_special_name (di)
- struct d_info *di;
+d_special_name (struct d_info *di)
{
char c;
@@ -1607,6 +1534,10 @@ d_special_name (di)
return d_make_comp (di, DEMANGLE_COMPONENT_REFTEMP, d_name (di),
NULL);
+ case 'A':
+ return d_make_comp (di, DEMANGLE_COMPONENT_HIDDEN_ALIAS,
+ d_encoding (di, 0), NULL);
+
default:
return NULL;
}
@@ -1629,24 +1560,19 @@ d_special_name (di)
display it in verbose mode. */
static int
-d_call_offset (di, c)
- struct d_info *di;
- int c;
+d_call_offset (struct d_info *di, int c)
{
- long offset;
- long virtual_offset;
-
if (c == '\0')
c = d_next_char (di);
if (c == 'h')
- offset = d_number (di);
+ d_number (di);
else if (c == 'v')
{
- offset = d_number (di);
+ d_number (di);
if (d_next_char (di) != '_')
return 0;
- virtual_offset = d_number (di);
+ d_number (di);
}
else
return 0;
@@ -1666,8 +1592,7 @@ d_call_offset (di, c)
*/
static struct demangle_component *
-d_ctor_dtor_name (di)
- struct d_info *di;
+d_ctor_dtor_name (struct d_info *di)
{
if (di->last_name != NULL)
{
@@ -1748,38 +1673,39 @@ CP_STATIC_IF_GLIBCPP_V3
const struct demangle_builtin_type_info
cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT] =
{
- /* a */ { NL ("signed char"), NL ("signed char"), D_PRINT_INT },
+ /* a */ { NL ("signed char"), NL ("signed char"), D_PRINT_DEFAULT },
/* b */ { NL ("bool"), NL ("boolean"), D_PRINT_BOOL },
- /* c */ { NL ("char"), NL ("byte"), D_PRINT_INT },
- /* d */ { NL ("double"), NL ("double"), D_PRINT_DEFAULT },
- /* e */ { NL ("long double"), NL ("long double"), D_PRINT_DEFAULT },
- /* f */ { NL ("float"), NL ("float"), D_PRINT_DEFAULT },
- /* g */ { NL ("__float128"), NL ("__float128"), D_PRINT_DEFAULT },
- /* h */ { NL ("unsigned char"), NL ("unsigned char"), D_PRINT_INT },
+ /* c */ { NL ("char"), NL ("byte"), D_PRINT_DEFAULT },
+ /* d */ { NL ("double"), NL ("double"), D_PRINT_FLOAT },
+ /* e */ { NL ("long double"), NL ("long double"), D_PRINT_FLOAT },
+ /* f */ { NL ("float"), NL ("float"), D_PRINT_FLOAT },
+ /* g */ { NL ("__float128"), NL ("__float128"), D_PRINT_FLOAT },
+ /* h */ { NL ("unsigned char"), NL ("unsigned char"), D_PRINT_DEFAULT },
/* i */ { NL ("int"), NL ("int"), D_PRINT_INT },
- /* j */ { NL ("unsigned int"), NL ("unsigned"), D_PRINT_INT },
+ /* j */ { NL ("unsigned int"), NL ("unsigned"), D_PRINT_UNSIGNED },
/* k */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
/* l */ { NL ("long"), NL ("long"), D_PRINT_LONG },
- /* m */ { NL ("unsigned long"), NL ("unsigned long"), D_PRINT_LONG },
+ /* m */ { NL ("unsigned long"), NL ("unsigned long"), D_PRINT_UNSIGNED_LONG },
/* n */ { NL ("__int128"), NL ("__int128"), D_PRINT_DEFAULT },
- /* o */ { NL ("unsigned __int128"), NL ("unsigned __int128"), D_PRINT_DEFAULT },
+ /* o */ { NL ("unsigned __int128"), NL ("unsigned __int128"),
+ D_PRINT_DEFAULT },
/* p */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
/* q */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
/* r */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
- /* s */ { NL ("short"), NL ("short"), D_PRINT_INT },
- /* t */ { NL ("unsigned short"), NL ("unsigned short"), D_PRINT_INT },
+ /* s */ { NL ("short"), NL ("short"), D_PRINT_DEFAULT },
+ /* t */ { NL ("unsigned short"), NL ("unsigned short"), D_PRINT_DEFAULT },
/* u */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT },
/* v */ { NL ("void"), NL ("void"), D_PRINT_VOID },
- /* w */ { NL ("wchar_t"), NL ("char"), D_PRINT_INT },
- /* x */ { NL ("long long"), NL ("long"), D_PRINT_DEFAULT },
- /* y */ { NL ("unsigned long long"), NL ("unsigned long long"), D_PRINT_DEFAULT },
+ /* w */ { NL ("wchar_t"), NL ("char"), D_PRINT_DEFAULT },
+ /* x */ { NL ("long long"), NL ("long"), D_PRINT_LONG_LONG },
+ /* y */ { NL ("unsigned long long"), NL ("unsigned long long"),
+ D_PRINT_UNSIGNED_LONG_LONG },
/* z */ { NL ("..."), NL ("..."), D_PRINT_DEFAULT },
};
CP_STATIC_IF_GLIBCPP_V3
struct demangle_component *
-cplus_demangle_type (di)
- struct d_info *di;
+cplus_demangle_type (struct d_info *di)
{
char peek;
struct demangle_component *ret;
@@ -1948,10 +1874,8 @@ cplus_demangle_type (di)
/* <CV-qualifiers> ::= [r] [V] [K] */
static struct demangle_component **
-d_cv_qualifiers (di, pret, member_fn)
- struct d_info *di;
- struct demangle_component **pret;
- int member_fn;
+d_cv_qualifiers (struct d_info *di,
+ struct demangle_component **pret, int member_fn)
{
char peek;
@@ -1997,8 +1921,7 @@ d_cv_qualifiers (di, pret, member_fn)
/* <function-type> ::= F [Y] <bare-function-type> E */
static struct demangle_component *
-d_function_type (di)
- struct d_info *di;
+d_function_type (struct d_info *di)
{
struct demangle_component *ret;
@@ -2016,23 +1939,30 @@ d_function_type (di)
return ret;
}
-/* <bare-function-type> ::= <type>+ */
+/* <bare-function-type> ::= [J]<type>+ */
static struct demangle_component *
-d_bare_function_type (di, has_return_type)
- struct d_info *di;
- int has_return_type;
+d_bare_function_type (struct d_info *di, int has_return_type)
{
struct demangle_component *return_type;
struct demangle_component *tl;
struct demangle_component **ptl;
+ char peek;
+
+ /* Detect special qualifier indicating that the first argument
+ is the return type. */
+ peek = d_peek_char (di);
+ if (peek == 'J')
+ {
+ d_advance (di, 1);
+ has_return_type = 1;
+ }
return_type = NULL;
tl = NULL;
ptl = &tl;
while (1)
{
- char peek;
struct demangle_component *type;
peek = d_peek_char (di);
@@ -2076,8 +2006,7 @@ d_bare_function_type (di, has_return_type)
/* <class-enum-type> ::= <name> */
static struct demangle_component *
-d_class_enum_type (di)
- struct d_info *di;
+d_class_enum_type (struct d_info *di)
{
return d_name (di);
}
@@ -2087,8 +2016,7 @@ d_class_enum_type (di)
*/
static struct demangle_component *
-d_array_type (di)
- struct d_info *di;
+d_array_type (struct d_info *di)
{
char peek;
struct demangle_component *dim;
@@ -2131,8 +2059,7 @@ d_array_type (di)
/* <pointer-to-member-type> ::= M <(class) type> <(member) type> */
static struct demangle_component *
-d_pointer_to_member_type (di)
- struct d_info *di;
+d_pointer_to_member_type (struct d_info *di)
{
struct demangle_component *cl;
struct demangle_component *mem;
@@ -2169,8 +2096,7 @@ d_pointer_to_member_type (di)
*/
static struct demangle_component *
-d_template_param (di)
- struct d_info *di;
+d_template_param (struct d_info *di)
{
long param;
@@ -2198,8 +2124,7 @@ d_template_param (di)
/* <template-args> ::= I <template-arg>+ E */
static struct demangle_component *
-d_template_args (di)
- struct d_info *di;
+d_template_args (struct d_info *di)
{
struct demangle_component *hold_last_name;
struct demangle_component *al;
@@ -2246,8 +2171,7 @@ d_template_args (di)
*/
static struct demangle_component *
-d_template_arg (di)
- struct d_info *di;
+d_template_arg (struct d_info *di)
{
struct demangle_component *ret;
@@ -2279,8 +2203,7 @@ d_template_arg (di)
*/
static struct demangle_component *
-d_expression (di)
- struct d_info *di;
+d_expression (struct d_info *di)
{
char peek;
@@ -2380,8 +2303,7 @@ d_expression (di)
*/
static struct demangle_component *
-d_expr_primary (di)
- struct d_info *di;
+d_expr_primary (struct d_info *di)
{
struct demangle_component *ret;
@@ -2424,7 +2346,11 @@ d_expr_primary (di)
}
s = d_str (di);
while (d_peek_char (di) != 'E')
- d_advance (di, 1);
+ {
+ if (d_peek_char (di) == '\0')
+ return NULL;
+ d_advance (di, 1);
+ }
ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s));
}
if (d_next_char (di) != 'E')
@@ -2437,8 +2363,7 @@ d_expr_primary (di)
*/
static struct demangle_component *
-d_local_name (di)
- struct d_info *di;
+d_local_name (struct d_info *di)
{
struct demangle_component *function;
@@ -2476,8 +2401,7 @@ d_local_name (di)
We should print it out in verbose mode. */
static int
-d_discriminator (di)
- struct d_info *di;
+d_discriminator (struct d_info *di)
{
long discrim;
@@ -2493,9 +2417,7 @@ d_discriminator (di)
/* Add a new substitution. */
static int
-d_add_substitution (di, dc)
- struct d_info *di;
- struct demangle_component *dc;
+d_add_substitution (struct d_info *di, struct demangle_component *dc)
{
if (dc == NULL)
return 0;
@@ -2551,9 +2473,7 @@ static const struct d_standard_sub_info standard_subs[] =
};
static struct demangle_component *
-d_substitution (di, prefix)
- struct d_info *di;
- int prefix;
+d_substitution (struct d_info *di, int prefix)
{
char c;
@@ -2640,9 +2560,7 @@ d_substitution (di, prefix)
/* Resize the print buffer. */
static void
-d_print_resize (dpi, add)
- struct d_print_info *dpi;
- size_t add;
+d_print_resize (struct d_print_info *dpi, size_t add)
{
size_t need;
@@ -2655,7 +2573,7 @@ d_print_resize (dpi, add)
char *newbuf;
newalc = dpi->alc * 2;
- newbuf = realloc (dpi->buf, newalc);
+ newbuf = (char *) realloc (dpi->buf, newalc);
if (newbuf == NULL)
{
free (dpi->buf);
@@ -2671,9 +2589,7 @@ d_print_resize (dpi, add)
/* Append a character to the print buffer. */
static void
-d_print_append_char (dpi, c)
- struct d_print_info *dpi;
- int c;
+d_print_append_char (struct d_print_info *dpi, int c)
{
if (dpi->buf != NULL)
{
@@ -2692,10 +2608,7 @@ d_print_append_char (dpi, c)
/* Append a buffer to the print buffer. */
static void
-d_print_append_buffer (dpi, s, l)
- struct d_print_info *dpi;
- const char *s;
- size_t l;
+d_print_append_buffer (struct d_print_info *dpi, const char *s, size_t l)
{
if (dpi->buf != NULL)
{
@@ -2714,8 +2627,7 @@ d_print_append_buffer (dpi, s, l)
/* Indicate that an error occurred during printing. */
static void
-d_print_error (dpi)
- struct d_print_info *dpi;
+d_print_error (struct d_print_info *dpi)
{
free (dpi->buf);
dpi->buf = NULL;
@@ -2731,18 +2643,15 @@ d_print_error (dpi)
CP_STATIC_IF_GLIBCPP_V3
char *
-cplus_demangle_print (options, dc, estimate, palc)
- int options;
- const struct demangle_component *dc;
- int estimate;
- size_t *palc;
+cplus_demangle_print (int options, const struct demangle_component *dc,
+ int estimate, size_t *palc)
{
struct d_print_info dpi;
dpi.options = options;
dpi.alc = estimate + 1;
- dpi.buf = malloc (dpi.alc);
+ dpi.buf = (char *) malloc (dpi.alc);
if (dpi.buf == NULL)
{
*palc = 1;
@@ -2770,9 +2679,8 @@ cplus_demangle_print (options, dc, estimate, palc)
/* Subroutine to handle components. */
static void
-d_print_comp (dpi, dc)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
+d_print_comp (struct d_print_info *dpi,
+ const struct demangle_component *dc)
{
if (dc == NULL)
{
@@ -2844,7 +2752,7 @@ d_print_comp (dpi, dc)
{
dpt.next = dpi->templates;
dpi->templates = &dpt;
- dpt.template = typed_name;
+ dpt.template_decl = typed_name;
}
/* If typed_name is a DEMANGLE_COMPONENT_LOCAL_NAME, then
@@ -2940,7 +2848,7 @@ d_print_comp (dpi, dc)
return;
}
i = dc->u.s_number.number;
- for (a = d_right (dpi->templates->template);
+ for (a = d_right (dpi->templates->template_decl);
a != NULL;
a = d_right (a))
{
@@ -3045,6 +2953,11 @@ d_print_comp (dpi, dc)
d_print_comp (dpi, d_left (dc));
return;
+ case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
+ d_append_string_constant (dpi, "hidden alias for ");
+ d_print_comp (dpi, d_left (dc));
+ return;
+
case DEMANGLE_COMPONENT_SUB_STD:
d_append_buffer (dpi, dc->u.s_string.string, dc->u.s_string.len);
return;
@@ -3052,6 +2965,30 @@ d_print_comp (dpi, dc)
case DEMANGLE_COMPONENT_RESTRICT:
case DEMANGLE_COMPONENT_VOLATILE:
case DEMANGLE_COMPONENT_CONST:
+ {
+ struct d_print_mod *pdpm;
+
+ /* When printing arrays, it's possible to have cases where the
+ same CV-qualifier gets pushed on the stack multiple times.
+ We only need to print it once. */
+
+ for (pdpm = dpi->modifiers; pdpm != NULL; pdpm = pdpm->next)
+ {
+ if (! pdpm->printed)
+ {
+ if (pdpm->mod->type != DEMANGLE_COMPONENT_RESTRICT
+ && pdpm->mod->type != DEMANGLE_COMPONENT_VOLATILE
+ && pdpm->mod->type != DEMANGLE_COMPONENT_CONST)
+ break;
+ if (pdpm->mod->type == dc->type)
+ {
+ d_print_comp (dpi, d_left (dc));
+ return;
+ }
+ }
+ }
+ }
+ /* Fall through. */
case DEMANGLE_COMPONENT_RESTRICT_THIS:
case DEMANGLE_COMPONENT_VOLATILE_THIS:
case DEMANGLE_COMPONENT_CONST_THIS:
@@ -3097,13 +3034,16 @@ d_print_comp (dpi, dc)
case DEMANGLE_COMPONENT_FUNCTION_TYPE:
{
+ if ((dpi->options & DMGL_RET_POSTFIX) != 0)
+ d_print_function_type (dpi, dc, dpi->modifiers);
+
+ /* Print return type if present */
if (d_left (dc) != NULL)
{
struct d_print_mod dpm;
/* We must pass this type down as a modifier in order to
print it in the right location. */
-
dpm.next = dpi->modifiers;
dpi->modifiers = &dpm;
dpm.mod = dc;
@@ -3117,34 +3057,79 @@ d_print_comp (dpi, dc)
if (dpm.printed)
return;
- d_append_char (dpi, ' ');
+ /* In standard prefix notation, there is a space between the
+ return type and the function signature. */
+ if ((dpi->options & DMGL_RET_POSTFIX) == 0)
+ d_append_char (dpi, ' ');
}
- d_print_function_type (dpi, dc, dpi->modifiers);
+ if ((dpi->options & DMGL_RET_POSTFIX) == 0)
+ d_print_function_type (dpi, dc, dpi->modifiers);
return;
}
case DEMANGLE_COMPONENT_ARRAY_TYPE:
{
- struct d_print_mod dpm;
+ struct d_print_mod *hold_modifiers;
+ struct d_print_mod adpm[4];
+ unsigned int i;
+ struct d_print_mod *pdpm;
/* We must pass this type down as a modifier in order to print
- multi-dimensional arrays correctly. */
+ multi-dimensional arrays correctly. If the array itself is
+ CV-qualified, we act as though the element type were
+ CV-qualified. We do this by copying the modifiers down
+ rather than fiddling pointers, so that we don't wind up
+ with a d_print_mod higher on the stack pointing into our
+ stack frame after we return. */
- dpm.next = dpi->modifiers;
- dpi->modifiers = &dpm;
- dpm.mod = dc;
- dpm.printed = 0;
- dpm.templates = dpi->templates;
+ hold_modifiers = dpi->modifiers;
+
+ adpm[0].next = hold_modifiers;
+ dpi->modifiers = &adpm[0];
+ adpm[0].mod = dc;
+ adpm[0].printed = 0;
+ adpm[0].templates = dpi->templates;
+
+ i = 1;
+ pdpm = hold_modifiers;
+ while (pdpm != NULL
+ && (pdpm->mod->type == DEMANGLE_COMPONENT_RESTRICT
+ || pdpm->mod->type == DEMANGLE_COMPONENT_VOLATILE
+ || pdpm->mod->type == DEMANGLE_COMPONENT_CONST))
+ {
+ if (! pdpm->printed)
+ {
+ if (i >= sizeof adpm / sizeof adpm[0])
+ {
+ d_print_error (dpi);
+ return;
+ }
+
+ adpm[i] = *pdpm;
+ adpm[i].next = dpi->modifiers;
+ dpi->modifiers = &adpm[i];
+ pdpm->printed = 1;
+ ++i;
+ }
+
+ pdpm = pdpm->next;
+ }
d_print_comp (dpi, d_right (dc));
- dpi->modifiers = dpm.next;
+ dpi->modifiers = hold_modifiers;
- if (dpm.printed)
+ if (adpm[0].printed)
return;
+ while (i > 1)
+ {
+ --i;
+ d_print_mod (dpi, adpm[i].mod);
+ }
+
d_print_array_type (dpi, dc, dpi->modifiers);
return;
@@ -3214,15 +3199,13 @@ d_print_comp (dpi, dc)
d_print_expr_op (dpi, d_left (dc));
else
{
- d_append_string_constant (dpi, "((");
+ d_append_char (dpi, '(');
d_print_cast (dpi, d_left (dc));
d_append_char (dpi, ')');
}
d_append_char (dpi, '(');
d_print_comp (dpi, d_right (dc));
d_append_char (dpi, ')');
- if (d_left (dc)->type == DEMANGLE_COMPONENT_CAST)
- d_append_char (dpi, ')');
return;
case DEMANGLE_COMPONENT_BINARY:
@@ -3286,62 +3269,86 @@ d_print_comp (dpi, dc)
case DEMANGLE_COMPONENT_LITERAL:
case DEMANGLE_COMPONENT_LITERAL_NEG:
- /* For some builtin types, produce simpler output. */
- if (d_left (dc)->type == DEMANGLE_COMPONENT_BUILTIN_TYPE)
- {
- switch (d_left (dc)->u.s_builtin.type->print)
- {
- case D_PRINT_INT:
- if (d_right (dc)->type == DEMANGLE_COMPONENT_NAME)
- {
- if (dc->type == DEMANGLE_COMPONENT_LITERAL_NEG)
- d_append_char (dpi, '-');
- d_print_comp (dpi, d_right (dc));
- return;
- }
- break;
+ {
+ enum d_builtin_type_print tp;
- case D_PRINT_LONG:
- if (d_right (dc)->type == DEMANGLE_COMPONENT_NAME)
- {
- if (dc->type == DEMANGLE_COMPONENT_LITERAL_NEG)
- d_append_char (dpi, '-');
- d_print_comp (dpi, d_right (dc));
- d_append_char (dpi, 'l');
- return;
- }
- break;
+ /* For some builtin types, produce simpler output. */
+ tp = D_PRINT_DEFAULT;
+ if (d_left (dc)->type == DEMANGLE_COMPONENT_BUILTIN_TYPE)
+ {
+ tp = d_left (dc)->u.s_builtin.type->print;
+ switch (tp)
+ {
+ case D_PRINT_INT:
+ case D_PRINT_UNSIGNED:
+ case D_PRINT_LONG:
+ case D_PRINT_UNSIGNED_LONG:
+ case D_PRINT_LONG_LONG:
+ case D_PRINT_UNSIGNED_LONG_LONG:
+ if (d_right (dc)->type == DEMANGLE_COMPONENT_NAME)
+ {
+ if (dc->type == DEMANGLE_COMPONENT_LITERAL_NEG)
+ d_append_char (dpi, '-');
+ d_print_comp (dpi, d_right (dc));
+ switch (tp)
+ {
+ default:
+ break;
+ case D_PRINT_UNSIGNED:
+ d_append_char (dpi, 'u');
+ break;
+ case D_PRINT_LONG:
+ d_append_char (dpi, 'l');
+ break;
+ case D_PRINT_UNSIGNED_LONG:
+ d_append_string_constant (dpi, "ul");
+ break;
+ case D_PRINT_LONG_LONG:
+ d_append_string_constant (dpi, "ll");
+ break;
+ case D_PRINT_UNSIGNED_LONG_LONG:
+ d_append_string_constant (dpi, "ull");
+ break;
+ }
+ return;
+ }
+ break;
- case D_PRINT_BOOL:
- if (d_right (dc)->type == DEMANGLE_COMPONENT_NAME
- && d_right (dc)->u.s_name.len == 1
- && dc->type == DEMANGLE_COMPONENT_LITERAL)
- {
- switch (d_right (dc)->u.s_name.s[0])
- {
- case '0':
- d_append_string_constant (dpi, "false");
- return;
- case '1':
- d_append_string_constant (dpi, "true");
- return;
- default:
- break;
- }
- }
- break;
+ case D_PRINT_BOOL:
+ if (d_right (dc)->type == DEMANGLE_COMPONENT_NAME
+ && d_right (dc)->u.s_name.len == 1
+ && dc->type == DEMANGLE_COMPONENT_LITERAL)
+ {
+ switch (d_right (dc)->u.s_name.s[0])
+ {
+ case '0':
+ d_append_string_constant (dpi, "false");
+ return;
+ case '1':
+ d_append_string_constant (dpi, "true");
+ return;
+ default:
+ break;
+ }
+ }
+ break;
- default:
- break;
- }
- }
+ default:
+ break;
+ }
+ }
- d_append_char (dpi, '(');
- d_print_comp (dpi, d_left (dc));
- d_append_char (dpi, ')');
- if (dc->type == DEMANGLE_COMPONENT_LITERAL_NEG)
- d_append_char (dpi, '-');
- d_print_comp (dpi, d_right (dc));
+ d_append_char (dpi, '(');
+ d_print_comp (dpi, d_left (dc));
+ d_append_char (dpi, ')');
+ if (dc->type == DEMANGLE_COMPONENT_LITERAL_NEG)
+ d_append_char (dpi, '-');
+ if (tp == D_PRINT_FLOAT)
+ d_append_char (dpi, '[');
+ d_print_comp (dpi, d_right (dc));
+ if (tp == D_PRINT_FLOAT)
+ d_append_char (dpi, ']');
+ }
return;
default:
@@ -3356,10 +3363,7 @@ d_print_comp (dpi, dc)
__U<hex-char>+_. */
static void
-d_print_java_identifier (dpi, name, len)
- struct d_print_info *dpi;
- const char *name;
- int len;
+d_print_java_identifier (struct d_print_info *dpi, const char *name, int len)
{
const char *p;
const char *end;
@@ -3409,10 +3413,8 @@ d_print_java_identifier (dpi, name, len)
qualifiers on this after printing a function. */
static void
-d_print_mod_list (dpi, mods, suffix)
- struct d_print_info *dpi;
- struct d_print_mod *mods;
- int suffix;
+d_print_mod_list (struct d_print_info *dpi,
+ struct d_print_mod *mods, int suffix)
{
struct d_print_template *hold_dpt;
@@ -3488,9 +3490,8 @@ d_print_mod_list (dpi, mods, suffix)
/* Print a modifier. */
static void
-d_print_mod (dpi, mod)
- struct d_print_info *dpi;
- const struct demangle_component *mod;
+d_print_mod (struct d_print_info *dpi,
+ const struct demangle_component *mod)
{
switch (mod->type)
{
@@ -3544,18 +3545,19 @@ d_print_mod (dpi, mod)
/* Print a function type, except for the return type. */
static void
-d_print_function_type (dpi, dc, mods)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
- struct d_print_mod *mods;
+d_print_function_type (struct d_print_info *dpi,
+ const struct demangle_component *dc,
+ struct d_print_mod *mods)
{
int need_paren;
int saw_mod;
+ int need_space;
struct d_print_mod *p;
struct d_print_mod *hold_modifiers;
need_paren = 0;
saw_mod = 0;
+ need_space = 0;
for (p = mods; p != NULL; p = p->next)
{
if (p->printed)
@@ -3564,15 +3566,18 @@ d_print_function_type (dpi, dc, mods)
saw_mod = 1;
switch (p->mod->type)
{
+ case DEMANGLE_COMPONENT_POINTER:
+ case DEMANGLE_COMPONENT_REFERENCE:
+ need_paren = 1;
+ break;
case DEMANGLE_COMPONENT_RESTRICT:
case DEMANGLE_COMPONENT_VOLATILE:
case DEMANGLE_COMPONENT_CONST:
case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
- case DEMANGLE_COMPONENT_POINTER:
- case DEMANGLE_COMPONENT_REFERENCE:
case DEMANGLE_COMPONENT_COMPLEX:
case DEMANGLE_COMPONENT_IMAGINARY:
case DEMANGLE_COMPONENT_PTRMEM_TYPE:
+ need_space = 1;
need_paren = 1;
break;
case DEMANGLE_COMPONENT_RESTRICT_THIS:
@@ -3591,18 +3596,14 @@ d_print_function_type (dpi, dc, mods)
if (need_paren)
{
- switch (d_last_char (dpi))
+ if (! need_space)
{
- case ' ':
- case '(':
- case '*':
- break;
-
- default:
- d_append_char (dpi, ' ');
- break;
+ if (d_last_char (dpi) != '('
+ && d_last_char (dpi) != '*')
+ need_space = 1;
}
-
+ if (need_space && d_last_char (dpi) != ' ')
+ d_append_char (dpi, ' ');
d_append_char (dpi, '(');
}
@@ -3629,10 +3630,9 @@ d_print_function_type (dpi, dc, mods)
/* Print an array type, except for the element type. */
static void
-d_print_array_type (dpi, dc, mods)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
- struct d_print_mod *mods;
+d_print_array_type (struct d_print_info *dpi,
+ const struct demangle_component *dc,
+ struct d_print_mod *mods)
{
int need_space;
@@ -3645,19 +3645,19 @@ d_print_array_type (dpi, dc, mods)
need_paren = 0;
for (p = mods; p != NULL; p = p->next)
{
- if (p->printed)
- break;
-
- if (p->mod->type == DEMANGLE_COMPONENT_ARRAY_TYPE)
+ if (! p->printed)
{
- need_space = 0;
- break;
- }
- else
- {
- need_paren = 1;
- need_space = 1;
- break;
+ if (p->mod->type == DEMANGLE_COMPONENT_ARRAY_TYPE)
+ {
+ need_space = 0;
+ break;
+ }
+ else
+ {
+ need_paren = 1;
+ need_space = 1;
+ break;
+ }
}
}
@@ -3684,9 +3684,8 @@ d_print_array_type (dpi, dc, mods)
/* Print an operator in an expression. */
static void
-d_print_expr_op (dpi, dc)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
+d_print_expr_op (struct d_print_info *dpi,
+ const struct demangle_component *dc)
{
if (dc->type == DEMANGLE_COMPONENT_OPERATOR)
d_append_buffer (dpi, dc->u.s_operator.op->name,
@@ -3698,9 +3697,8 @@ d_print_expr_op (dpi, dc)
/* Print a cast. */
static void
-d_print_cast (dpi, dc)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
+d_print_cast (struct d_print_info *dpi,
+ const struct demangle_component *dc)
{
if (d_left (dc)->type != DEMANGLE_COMPONENT_TEMPLATE)
d_print_comp (dpi, d_left (dc));
@@ -3719,7 +3717,7 @@ d_print_cast (dpi, dc)
dpt.next = dpi->templates;
dpi->templates = &dpt;
- dpt.template = d_left (dc);
+ dpt.template_decl = d_left (dc);
d_print_comp (dpi, d_left (d_left (dc)));
@@ -3744,11 +3742,8 @@ d_print_cast (dpi, dc)
CP_STATIC_IF_GLIBCPP_V3
void
-cplus_demangle_init_info (mangled, options, len, di)
- const char *mangled;
- int options;
- size_t len;
- struct d_info *di;
+cplus_demangle_init_info (const char *mangled, int options, size_t len,
+ struct d_info *di)
{
di->s = mangled;
di->send = mangled + len;
@@ -3781,10 +3776,7 @@ cplus_demangle_init_info (mangled, options, len, di)
a memory allocation failure. On failure, this returns NULL. */
static char *
-d_demangle (mangled, options, palc)
- const char* mangled;
- int options;
- size_t *palc;
+d_demangle (const char* mangled, int options, size_t *palc)
{
size_t len;
int type;
@@ -3806,7 +3798,7 @@ d_demangle (mangled, options, palc)
{
char *r;
- r = malloc (40 + len - 11);
+ r = (char *) malloc (40 + len - 11);
if (r == NULL)
*palc = 1;
else
@@ -3908,7 +3900,7 @@ d_demangle (mangled, options, palc)
#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3)
-extern char *__cxa_demangle PARAMS ((const char *, char *, size_t *, int *));
+extern char *__cxa_demangle (const char *, char *, size_t *, int *);
/* ia64 ABI-mandated entry point in the C++ runtime library for
performing demangling. MANGLED_NAME is a NUL-terminated character
@@ -3937,38 +3929,37 @@ extern char *__cxa_demangle PARAMS ((const char *, char *, size_t *, int *));
GNU extensions. */
char *
-__cxa_demangle (mangled_name, output_buffer, length, status)
- const char *mangled_name;
- char *output_buffer;
- size_t *length;
- int *status;
+__cxa_demangle (const char *mangled_name, char *output_buffer,
+ size_t *length, int *status)
{
char *demangled;
size_t alc;
- if (status == NULL)
- return NULL;
-
if (mangled_name == NULL)
{
- *status = -3;
+ if (status != NULL)
+ *status = -3;
return NULL;
}
if (output_buffer != NULL && length == NULL)
{
- *status = -3;
+ if (status != NULL)
+ *status = -3;
return NULL;
}
- demangled = d_demangle (mangled_name, DMGL_TYPES, &alc);
+ demangled = d_demangle (mangled_name, DMGL_PARAMS | DMGL_TYPES, &alc);
if (demangled == NULL)
{
- if (alc == 1)
- *status = -1;
- else
- *status = -2;
+ if (status != NULL)
+ {
+ if (alc == 1)
+ *status = -1;
+ else
+ *status = -2;
+ }
return NULL;
}
@@ -3992,7 +3983,8 @@ __cxa_demangle (mangled_name, output_buffer, length, status)
}
}
- *status = 0;
+ if (status != NULL)
+ *status = 0;
return demangled;
}
@@ -4004,9 +3996,7 @@ __cxa_demangle (mangled_name, output_buffer, length, status)
demangled name. Otherwise, return NULL. */
char *
-cplus_demangle_v3 (mangled, options)
- const char* mangled;
- int options;
+cplus_demangle_v3 (const char* mangled, int options)
{
size_t alc;
@@ -4021,8 +4011,7 @@ cplus_demangle_v3 (mangled, options)
of JArray<TYPE> with TYPE[]. */
char *
-java_demangle_v3 (mangled)
- const char* mangled;
+java_demangle_v3 (const char* mangled)
{
size_t alc;
char *demangled;
@@ -4030,7 +4019,8 @@ java_demangle_v3 (mangled)
char *from;
char *to;
- demangled = d_demangle (mangled, DMGL_JAVA | DMGL_PARAMS, &alc);
+ demangled = d_demangle (mangled, DMGL_JAVA | DMGL_PARAMS | DMGL_RET_POSTFIX,
+ &alc);
if (demangled == NULL)
return NULL;
@@ -4072,10 +4062,9 @@ java_demangle_v3 (mangled)
*DTOR_KIND appropriately. */
static int
-is_ctor_or_dtor (mangled, ctor_kind, dtor_kind)
- const char *mangled;
- enum gnu_v3_ctor_kinds *ctor_kind;
- enum gnu_v3_dtor_kinds *dtor_kind;
+is_ctor_or_dtor (const char *mangled,
+ enum gnu_v3_ctor_kinds *ctor_kind,
+ enum gnu_v3_dtor_kinds *dtor_kind)
{
struct d_info di;
struct demangle_component *dc;
@@ -4158,8 +4147,7 @@ is_ctor_or_dtor (mangled, ctor_kind, dtor_kind)
name. A non-zero return indicates the type of constructor. */
enum gnu_v3_ctor_kinds
-is_gnu_v3_mangled_ctor (name)
- const char *name;
+is_gnu_v3_mangled_ctor (const char *name)
{
enum gnu_v3_ctor_kinds ctor_kind;
enum gnu_v3_dtor_kinds dtor_kind;
@@ -4174,8 +4162,7 @@ is_gnu_v3_mangled_ctor (name)
name. A non-zero return indicates the type of destructor. */
enum gnu_v3_dtor_kinds
-is_gnu_v3_mangled_dtor (name)
- const char *name;
+is_gnu_v3_mangled_dtor (const char *name)
{
enum gnu_v3_ctor_kinds ctor_kind;
enum gnu_v3_dtor_kinds dtor_kind;
@@ -4192,7 +4179,7 @@ is_gnu_v3_mangled_dtor (name)
#include "getopt.h"
#include "dyn-string.h"
-static void print_usage PARAMS ((FILE* fp, int exit_value));
+static void print_usage (FILE* fp, int exit_value);
#define IS_ALPHA(CHAR) \
(((CHAR) >= 'a' && (CHAR) <= 'z') \
@@ -4209,9 +4196,7 @@ const char* program_name;
/* Prints usage summary to FP and then exits with EXIT_VALUE. */
static void
-print_usage (fp, exit_value)
- FILE* fp;
- int exit_value;
+print_usage (FILE* fp, int exit_value)
{
fprintf (fp, "Usage: %s [options] [names ...]\n", program_name);
fprintf (fp, "Options:\n");
@@ -4238,9 +4223,7 @@ static const struct option long_options[] =
with their demangled equivalents. */
int
-main (argc, argv)
- int argc;
- char *argv[];
+main (int argc, char *argv[])
{
int i;
int opt_char;
@@ -4298,7 +4281,11 @@ main (argc, argv)
if (dyn_string_length (mangled) > 0)
{
+#ifdef IN_GLIBCPP_V3
+ s = __cxa_demangle (dyn_string_buf (mangled), NULL, NULL, NULL);
+#else
s = cplus_demangle_v3 (dyn_string_buf (mangled), options);
+#endif
if (s != NULL)
{
@@ -4330,9 +4317,16 @@ main (argc, argv)
for (i = optind; i < argc; ++i)
{
char *s;
+#ifdef IN_GLIBCPP_V3
+ int status;
+#endif
/* Attempt to demangle. */
+#ifdef IN_GLIBCPP_V3
+ s = __cxa_demangle (argv[i], NULL, NULL, &status);
+#else
s = cplus_demangle_v3 (argv[i], options);
+#endif
/* If it worked, print the demangled name. */
if (s != NULL)
@@ -4341,7 +4335,13 @@ main (argc, argv)
free (s);
}
else
- fprintf (stderr, "Failed: %s\n", argv[i]);
+ {
+#ifdef IN_GLIBCPP_V3
+ fprintf (stderr, "Failed: %s (status %d)\n", argv[i], status);
+#else
+ fprintf (stderr, "Failed: %s\n", argv[i]);
+#endif
+ }
}
}
diff --git a/contrib/binutils/libiberty/cp-demangle.h b/contrib/binutils/libiberty/cp-demangle.h
index d3c57ce37664..2517a57e69b7 100644
--- a/contrib/binutils/libiberty/cp-demangle.h
+++ b/contrib/binutils/libiberty/cp-demangle.h
@@ -25,7 +25,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* This file provides some definitions shared by cp-demangle.c and
@@ -53,10 +53,20 @@ enum d_builtin_type_print
D_PRINT_DEFAULT,
/* Print as integer. */
D_PRINT_INT,
- /* Print as long, with trailing `l'. */
+ /* Print as unsigned integer, with trailing "u". */
+ D_PRINT_UNSIGNED,
+ /* Print as long, with trailing "l". */
D_PRINT_LONG,
+ /* Print as unsigned long, with trailing "ul". */
+ D_PRINT_UNSIGNED_LONG,
+ /* Print as long long, with trailing "ll". */
+ D_PRINT_LONG_LONG,
+ /* Print as unsigned long long, with trailing "ull". */
+ D_PRINT_UNSIGNED_LONG_LONG,
/* Print as bool. */
D_PRINT_BOOL,
+ /* Print as float--put value in square brackets. */
+ D_PRINT_FLOAT,
/* Print in usual way, but here to detect void. */
D_PRINT_VOID
};
@@ -121,19 +131,31 @@ struct d_info
/* Functions and arrays in cp-demangle.c which are referenced by
functions in cp-demint.c. */
+#ifdef IN_GLIBCPP_V3
+#define CP_STATIC_IF_GLIBCPP_V3 static
+#else
+#define CP_STATIC_IF_GLIBCPP_V3 extern
+#endif
-extern const struct demangle_operator_info cplus_demangle_operators[];
+CP_STATIC_IF_GLIBCPP_V3
+const struct demangle_operator_info cplus_demangle_operators[];
#define D_BUILTIN_TYPE_COUNT (26)
-extern const struct demangle_builtin_type_info
+CP_STATIC_IF_GLIBCPP_V3
+const struct demangle_builtin_type_info
cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT];
-extern struct demangle_component *
-cplus_demangle_mangled_name PARAMS ((struct d_info *, int));
+CP_STATIC_IF_GLIBCPP_V3
+struct demangle_component *
+cplus_demangle_mangled_name (struct d_info *, int);
-extern struct demangle_component *
-cplus_demangle_type PARAMS ((struct d_info *));
+CP_STATIC_IF_GLIBCPP_V3
+struct demangle_component *
+cplus_demangle_type (struct d_info *);
extern void
-cplus_demangle_init_info PARAMS ((const char *, int, size_t, struct d_info *));
+cplus_demangle_init_info (const char *, int, size_t, struct d_info *);
+
+/* cp-demangle.c needs to define this a little differently */
+#undef CP_STATIC_IF_GLIBCPP_V3
diff --git a/contrib/binutils/libiberty/cp-demint.c b/contrib/binutils/libiberty/cp-demint.c
index 533202dd1048..2e8f8d2d0579 100644
--- a/contrib/binutils/libiberty/cp-demint.c
+++ b/contrib/binutils/libiberty/cp-demint.c
@@ -25,7 +25,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* This file implements a few interface functions which are provided
@@ -56,11 +56,10 @@
/* Fill in most component types. */
int
-cplus_demangle_fill_component (p, type, left, right)
- struct demangle_component *p;
- enum demangle_component_type type;
- struct demangle_component *left;
- struct demangle_component *right;
+cplus_demangle_fill_component (struct demangle_component *p,
+ enum demangle_component_type type,
+ struct demangle_component *left,
+ struct demangle_component *right)
{
if (p == NULL)
return 0;
@@ -130,20 +129,19 @@ cplus_demangle_fill_component (p, type, left, right)
/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE. */
int
-cplus_demangle_fill_builtin_type (p, typename)
- struct demangle_component *p;
- const char *typename;
+cplus_demangle_fill_builtin_type (struct demangle_component *p,
+ const char *type_name)
{
int len;
unsigned int i;
- if (p == NULL || typename == NULL)
+ if (p == NULL || type_name == NULL)
return 0;
- len = strlen (typename);
+ len = strlen (type_name);
for (i = 0; i < D_BUILTIN_TYPE_COUNT; ++i)
{
if (len == cplus_demangle_builtin_types[i].len
- && strcmp (typename, cplus_demangle_builtin_types[i].name) == 0)
+ && strcmp (type_name, cplus_demangle_builtin_types[i].name) == 0)
{
p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE;
p->u.s_builtin.type = &cplus_demangle_builtin_types[i];
@@ -156,10 +154,8 @@ cplus_demangle_fill_builtin_type (p, typename)
/* Fill in a DEMANGLE_COMPONENT_OPERATOR. */
int
-cplus_demangle_fill_operator (p, opname, args)
- struct demangle_component *p;
- const char *opname;
- int args;
+cplus_demangle_fill_operator (struct demangle_component *p,
+ const char *opname, int args)
{
int len;
unsigned int i;
@@ -184,10 +180,7 @@ cplus_demangle_fill_operator (p, opname, args)
/* Translate a mangled name into components. */
struct demangle_component *
-cplus_demangle_v3_components (mangled, options, mem)
- const char *mangled;
- int options;
- void **mem;
+cplus_demangle_v3_components (const char *mangled, int options, void **mem)
{
size_t len;
int type;
diff --git a/contrib/binutils/libiberty/cplus-dem.c b/contrib/binutils/libiberty/cplus-dem.c
index f3c4464f184a..8b60434a8882 100644
--- a/contrib/binutils/libiberty/cplus-dem.c
+++ b/contrib/binutils/libiberty/cplus-dem.c
@@ -27,8 +27,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* This file exports two functions; cplus_mangle_opname and cplus_demangle.
@@ -62,7 +62,7 @@ char * realloc ();
#include "libiberty.h"
-static char *ada_demangle PARAMS ((const char *, int));
+static char *ada_demangle (const char *, int);
#define min(X,Y) (((X) < (Y)) ? (X) : (Y))
@@ -70,7 +70,7 @@ static char *ada_demangle PARAMS ((const char *, int));
that will be output when using the `%d' format with `printf'. */
#define INTBUF_SIZE 32
-extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
+extern void fancy_abort (void) ATTRIBUTE_NORETURN;
/* In order to allow a single demangler executable to demangle strings
using various common values of CPLUS_MARKER, as well as any specific
@@ -99,8 +99,7 @@ static char cplus_markers[] = { CPLUS_MARKER, '.', '$', '\0' };
static char char_str[2] = { '\000', '\000' };
void
-set_cplus_marker_for_demangling (ch)
- int ch;
+set_cplus_marker_for_demangling (int ch)
{
cplus_markers[0] = ch;
}
@@ -327,163 +326,127 @@ const struct demangler_engine libiberty_demanglers[] =
/* Prototypes for local functions */
-static void
-delete_work_stuff PARAMS ((struct work_stuff *));
+static void delete_work_stuff (struct work_stuff *);
-static void
-delete_non_B_K_work_stuff PARAMS ((struct work_stuff *));
+static void delete_non_B_K_work_stuff (struct work_stuff *);
-static char *
-mop_up PARAMS ((struct work_stuff *, string *, int));
+static char *mop_up (struct work_stuff *, string *, int);
-static void
-squangle_mop_up PARAMS ((struct work_stuff *));
+static void squangle_mop_up (struct work_stuff *);
-static void
-work_stuff_copy_to_from PARAMS ((struct work_stuff *, struct work_stuff *));
+static void work_stuff_copy_to_from (struct work_stuff *, struct work_stuff *);
#if 0
static int
-demangle_method_args PARAMS ((struct work_stuff *, const char **, string *));
+demangle_method_args (struct work_stuff *, const char **, string *);
#endif
static char *
-internal_cplus_demangle PARAMS ((struct work_stuff *, const char *));
+internal_cplus_demangle (struct work_stuff *, const char *);
static int
-demangle_template_template_parm PARAMS ((struct work_stuff *work,
- const char **, string *));
+demangle_template_template_parm (struct work_stuff *work,
+ const char **, string *);
static int
-demangle_template PARAMS ((struct work_stuff *work, const char **, string *,
- string *, int, int));
+demangle_template (struct work_stuff *work, const char **, string *,
+ string *, int, int);
static int
-arm_pt PARAMS ((struct work_stuff *, const char *, int, const char **,
- const char **));
+arm_pt (struct work_stuff *, const char *, int, const char **,
+ const char **);
static int
-demangle_class_name PARAMS ((struct work_stuff *, const char **, string *));
+demangle_class_name (struct work_stuff *, const char **, string *);
static int
-demangle_qualified PARAMS ((struct work_stuff *, const char **, string *,
- int, int));
+demangle_qualified (struct work_stuff *, const char **, string *,
+ int, int);
-static int
-demangle_class PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_class (struct work_stuff *, const char **, string *);
-static int
-demangle_fund_type PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_fund_type (struct work_stuff *, const char **, string *);
-static int
-demangle_signature PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_signature (struct work_stuff *, const char **, string *);
-static int
-demangle_prefix PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_prefix (struct work_stuff *, const char **, string *);
-static int
-gnu_special PARAMS ((struct work_stuff *, const char **, string *));
+static int gnu_special (struct work_stuff *, const char **, string *);
-static int
-arm_special PARAMS ((const char **, string *));
+static int arm_special (const char **, string *);
-static void
-string_need PARAMS ((string *, int));
+static void string_need (string *, int);
-static void
-string_delete PARAMS ((string *));
+static void string_delete (string *);
static void
-string_init PARAMS ((string *));
+string_init (string *);
-static void
-string_clear PARAMS ((string *));
+static void string_clear (string *);
#if 0
-static int
-string_empty PARAMS ((string *));
+static int string_empty (string *);
#endif
-static void
-string_append PARAMS ((string *, const char *));
+static void string_append (string *, const char *);
-static void
-string_appends PARAMS ((string *, string *));
+static void string_appends (string *, string *);
-static void
-string_appendn PARAMS ((string *, const char *, int));
+static void string_appendn (string *, const char *, int);
-static void
-string_prepend PARAMS ((string *, const char *));
+static void string_prepend (string *, const char *);
-static void
-string_prependn PARAMS ((string *, const char *, int));
+static void string_prependn (string *, const char *, int);
-static void
-string_append_template_idx PARAMS ((string *, int));
+static void string_append_template_idx (string *, int);
-static int
-get_count PARAMS ((const char **, int *));
+static int get_count (const char **, int *);
-static int
-consume_count PARAMS ((const char **));
+static int consume_count (const char **);
-static int
-consume_count_with_underscores PARAMS ((const char**));
+static int consume_count_with_underscores (const char**);
-static int
-demangle_args PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_args (struct work_stuff *, const char **, string *);
-static int
-demangle_nested_args PARAMS ((struct work_stuff*, const char**, string*));
+static int demangle_nested_args (struct work_stuff*, const char**, string*);
-static int
-do_type PARAMS ((struct work_stuff *, const char **, string *));
+static int do_type (struct work_stuff *, const char **, string *);
-static int
-do_arg PARAMS ((struct work_stuff *, const char **, string *));
+static int do_arg (struct work_stuff *, const char **, string *);
static void
-demangle_function_name PARAMS ((struct work_stuff *, const char **, string *,
- const char *));
+demangle_function_name (struct work_stuff *, const char **, string *,
+ const char *);
static int
-iterate_demangle_function PARAMS ((struct work_stuff *,
- const char **, string *, const char *));
+iterate_demangle_function (struct work_stuff *,
+ const char **, string *, const char *);
-static void
-remember_type PARAMS ((struct work_stuff *, const char *, int));
+static void remember_type (struct work_stuff *, const char *, int);
-static void
-remember_Btype PARAMS ((struct work_stuff *, const char *, int, int));
+static void remember_Btype (struct work_stuff *, const char *, int, int);
-static int
-register_Btype PARAMS ((struct work_stuff *));
+static int register_Btype (struct work_stuff *);
-static void
-remember_Ktype PARAMS ((struct work_stuff *, const char *, int));
+static void remember_Ktype (struct work_stuff *, const char *, int);
-static void
-forget_types PARAMS ((struct work_stuff *));
+static void forget_types (struct work_stuff *);
-static void
-forget_B_and_K_types PARAMS ((struct work_stuff *));
+static void forget_B_and_K_types (struct work_stuff *);
-static void
-string_prepends PARAMS ((string *, string *));
+static void string_prepends (string *, string *);
static int
-demangle_template_value_parm PARAMS ((struct work_stuff*, const char**,
- string*, type_kind_t));
+demangle_template_value_parm (struct work_stuff*, const char**,
+ string*, type_kind_t);
static int
-do_hpacc_template_const_value PARAMS ((struct work_stuff *, const char **, string *));
+do_hpacc_template_const_value (struct work_stuff *, const char **, string *);
static int
-do_hpacc_template_literal PARAMS ((struct work_stuff *, const char **, string *));
+do_hpacc_template_literal (struct work_stuff *, const char **, string *);
-static int
-snarf_numeric_literal PARAMS ((const char **, string *));
+static int snarf_numeric_literal (const char **, string *);
/* There is a TYPE_QUAL value for each type qualifier. They can be
combined by bitwise-or to form the complete set of qualifiers for a
@@ -494,36 +457,28 @@ snarf_numeric_literal PARAMS ((const char **, string *));
#define TYPE_QUAL_VOLATILE 0x2
#define TYPE_QUAL_RESTRICT 0x4
-static int
-code_for_qualifier PARAMS ((int));
+static int code_for_qualifier (int);
-static const char*
-qualifier_string PARAMS ((int));
+static const char* qualifier_string (int);
-static const char*
-demangle_qualifier PARAMS ((int));
+static const char* demangle_qualifier (int);
-static int
-demangle_expression PARAMS ((struct work_stuff *, const char **, string *,
- type_kind_t));
+static int demangle_expression (struct work_stuff *, const char **, string *,
+ type_kind_t);
static int
-demangle_integral_value PARAMS ((struct work_stuff *, const char **,
- string *));
+demangle_integral_value (struct work_stuff *, const char **, string *);
static int
-demangle_real_value PARAMS ((struct work_stuff *, const char **, string *));
+demangle_real_value (struct work_stuff *, const char **, string *);
static void
-demangle_arm_hp_template PARAMS ((struct work_stuff *, const char **, int,
- string *));
+demangle_arm_hp_template (struct work_stuff *, const char **, int, string *);
static void
-recursively_demangle PARAMS ((struct work_stuff *, const char **, string *,
- int));
+recursively_demangle (struct work_stuff *, const char **, string *, int);
-static void
-grow_vect PARAMS ((char **, size_t *, size_t, int));
+static void grow_vect (char **, size_t *, size_t, int);
/* Translate count to integer, consuming tokens in the process.
Conversion terminates on the first non-digit character.
@@ -534,8 +489,7 @@ grow_vect PARAMS ((char **, size_t *, size_t, int));
Overflow consumes the rest of the digits, and returns -1. */
static int
-consume_count (type)
- const char **type;
+consume_count (const char **type)
{
int count = 0;
@@ -574,8 +528,7 @@ consume_count (type)
failure, since 0 can be a valid value. */
static int
-consume_count_with_underscores (mangled)
- const char **mangled;
+consume_count_with_underscores (const char **mangled)
{
int idx;
@@ -608,8 +561,7 @@ consume_count_with_underscores (mangled)
corresponding to this qualifier. */
static int
-code_for_qualifier (c)
- int c;
+code_for_qualifier (int c)
{
switch (c)
{
@@ -634,8 +586,7 @@ code_for_qualifier (c)
TYPE_QUALS. */
static const char*
-qualifier_string (type_quals)
- int type_quals;
+qualifier_string (int type_quals)
{
switch (type_quals)
{
@@ -676,17 +627,13 @@ qualifier_string (type_quals)
called with a valid qualifier code. */
static const char*
-demangle_qualifier (c)
- int c;
+demangle_qualifier (int c)
{
return qualifier_string (code_for_qualifier (c));
}
int
-cplus_demangle_opname (opname, result, options)
- const char *opname;
- char *result;
- int options;
+cplus_demangle_opname (const char *opname, char *result, int options)
{
int len, len1, ret;
string type;
@@ -819,9 +766,7 @@ cplus_demangle_opname (opname, result, options)
if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */
const char *
-cplus_mangle_opname (opname, options)
- const char *opname;
- int options;
+cplus_mangle_opname (const char *opname, int options)
{
size_t i;
int len;
@@ -841,8 +786,7 @@ cplus_mangle_opname (opname, options)
allow for any demangler initialization that maybe necessary. */
enum demangling_styles
-cplus_demangle_set_style (style)
- enum demangling_styles style;
+cplus_demangle_set_style (enum demangling_styles style)
{
const struct demangler_engine *demangler = libiberty_demanglers;
@@ -859,8 +803,7 @@ cplus_demangle_set_style (style)
/* Do string name to style translation */
enum demangling_styles
-cplus_demangle_name_to_style (name)
- const char *name;
+cplus_demangle_name_to_style (const char *name)
{
const struct demangler_engine *demangler = libiberty_demanglers;
@@ -900,9 +843,7 @@ cplus_demangle_name_to_style (name)
MANGLED. */
char *
-cplus_demangle (mangled, options)
- const char *mangled;
- int options;
+cplus_demangle (const char *mangled, int options)
{
char *ret;
struct work_stuff work[1];
@@ -944,18 +885,14 @@ cplus_demangle (mangled, options)
updating *OLD_VECT and *SIZE as necessary. */
static void
-grow_vect (old_vect, size, min_size, element_size)
- char **old_vect;
- size_t *size;
- size_t min_size;
- int element_size;
+grow_vect (char **old_vect, size_t *size, size_t min_size, int element_size)
{
if (*size < min_size)
{
*size *= 2;
if (*size < min_size)
*size = min_size;
- *old_vect = (void *) xrealloc (*old_vect, *size * element_size);
+ *old_vect = XRESIZEVAR (char, *old_vect, *size * element_size);
}
}
@@ -968,15 +905,12 @@ grow_vect (old_vect, size, min_size, element_size)
The resulting string is valid until the next call of ada_demangle. */
static char *
-ada_demangle (mangled, option)
- const char *mangled;
- int option ATTRIBUTE_UNUSED;
+ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
{
int i, j;
int len0;
const char* p;
char *demangled = NULL;
- int at_start_name;
int changed;
size_t demangled_size = 0;
@@ -1029,15 +963,12 @@ ada_demangle (mangled, option)
i += 1, j += 1)
demangled[j] = mangled[i];
- at_start_name = 1;
while (i < len0)
{
- at_start_name = 0;
-
if (i < len0 - 2 && mangled[i] == '_' && mangled[i + 1] == '_')
{
demangled[j] = '.';
- changed = at_start_name = 1;
+ changed = 1;
i += 2; j += 1;
}
else
@@ -1077,9 +1008,7 @@ ada_demangle (mangled, option)
calls go directly to this routine to avoid resetting that info. */
static char *
-internal_cplus_demangle (work, mangled)
- struct work_stuff *work;
- const char *mangled;
+internal_cplus_demangle (struct work_stuff *work, const char *mangled)
{
string decl;
@@ -1144,8 +1073,7 @@ internal_cplus_demangle (work, mangled)
/* Clear out and squangling related storage */
static void
-squangle_mop_up (work)
- struct work_stuff *work;
+squangle_mop_up (struct work_stuff *work)
{
/* clean up the B and K type mangling types. */
forget_B_and_K_types (work);
@@ -1163,9 +1091,7 @@ squangle_mop_up (work)
/* Copy the work state and storage. */
static void
-work_stuff_copy_to_from (to, from)
- struct work_stuff *to;
- struct work_stuff *from;
+work_stuff_copy_to_from (struct work_stuff *to, struct work_stuff *from)
{
int i;
@@ -1176,56 +1102,52 @@ work_stuff_copy_to_from (to, from)
/* Deep-copy dynamic storage. */
if (from->typevec_size)
- to->typevec
- = (char **) xmalloc (from->typevec_size * sizeof (to->typevec[0]));
+ to->typevec = XNEWVEC (char *, from->typevec_size);
for (i = 0; i < from->ntypes; i++)
{
int len = strlen (from->typevec[i]) + 1;
- to->typevec[i] = xmalloc (len);
+ to->typevec[i] = XNEWVEC (char, len);
memcpy (to->typevec[i], from->typevec[i], len);
}
if (from->ksize)
- to->ktypevec
- = (char **) xmalloc (from->ksize * sizeof (to->ktypevec[0]));
+ to->ktypevec = XNEWVEC (char *, from->ksize);
for (i = 0; i < from->numk; i++)
{
int len = strlen (from->ktypevec[i]) + 1;
- to->ktypevec[i] = xmalloc (len);
+ to->ktypevec[i] = XNEWVEC (char, len);
memcpy (to->ktypevec[i], from->ktypevec[i], len);
}
if (from->bsize)
- to->btypevec
- = (char **) xmalloc (from->bsize * sizeof (to->btypevec[0]));
+ to->btypevec = XNEWVEC (char *, from->bsize);
for (i = 0; i < from->numb; i++)
{
int len = strlen (from->btypevec[i]) + 1;
- to->btypevec[i] = xmalloc (len);
+ to->btypevec[i] = XNEWVEC (char , len);
memcpy (to->btypevec[i], from->btypevec[i], len);
}
if (from->ntmpl_args)
- to->tmpl_argvec
- = (char **) xmalloc (from->ntmpl_args * sizeof (to->tmpl_argvec[0]));
+ to->tmpl_argvec = XNEWVEC (char *, from->ntmpl_args);
for (i = 0; i < from->ntmpl_args; i++)
{
int len = strlen (from->tmpl_argvec[i]) + 1;
- to->tmpl_argvec[i] = xmalloc (len);
+ to->tmpl_argvec[i] = XNEWVEC (char, len);
memcpy (to->tmpl_argvec[i], from->tmpl_argvec[i], len);
}
if (from->previous_argument)
{
- to->previous_argument = (string*) xmalloc (sizeof (string));
+ to->previous_argument = XNEW (string);
string_init (to->previous_argument);
string_appends (to->previous_argument, from->previous_argument);
}
@@ -1235,8 +1157,7 @@ work_stuff_copy_to_from (to, from)
/* Delete dynamic stuff in work_stuff that is not to be re-used. */
static void
-delete_non_B_K_work_stuff (work)
- struct work_stuff *work;
+delete_non_B_K_work_stuff (struct work_stuff *work)
{
/* Discard the remembered types, if any. */
@@ -1269,8 +1190,7 @@ delete_non_B_K_work_stuff (work)
/* Delete all dynamic storage in work_stuff. */
static void
-delete_work_stuff (work)
- struct work_stuff *work;
+delete_work_stuff (struct work_stuff *work)
{
delete_non_B_K_work_stuff (work);
squangle_mop_up (work);
@@ -1280,10 +1200,7 @@ delete_work_stuff (work)
/* Clear out any mangled storage */
static char *
-mop_up (work, declp, success)
- struct work_stuff *work;
- string *declp;
- int success;
+mop_up (struct work_stuff *work, string *declp, int success)
{
char *demangled = NULL;
@@ -1335,10 +1252,8 @@ DESCRIPTION
argument list. */
static int
-demangle_signature (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_signature (struct work_stuff *work,
+ const char **mangled, string *declp)
{
int success = 1;
int func_done = 0;
@@ -1628,10 +1543,8 @@ demangle_signature (work, mangled, declp)
#if 0
static int
-demangle_method_args (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_method_args (struct work_stuff *work, const char **mangled,
+ string *declp)
{
int success = 0;
@@ -1651,10 +1564,8 @@ demangle_method_args (work, mangled, declp)
#endif
static int
-demangle_template_template_parm (work, mangled, tname)
- struct work_stuff *work;
- const char **mangled;
- string *tname;
+demangle_template_template_parm (struct work_stuff *work,
+ const char **mangled, string *tname)
{
int i;
int r;
@@ -1715,11 +1626,8 @@ demangle_template_template_parm (work, mangled, tname)
}
static int
-demangle_expression (work, mangled, s, tk)
- struct work_stuff *work;
- const char** mangled;
- string* s;
- type_kind_t tk;
+demangle_expression (struct work_stuff *work, const char **mangled,
+ string *s, type_kind_t tk)
{
int need_operator = 0;
int success;
@@ -1775,10 +1683,8 @@ demangle_expression (work, mangled, s, tk)
}
static int
-demangle_integral_value (work, mangled, s)
- struct work_stuff *work;
- const char** mangled;
- string* s;
+demangle_integral_value (struct work_stuff *work,
+ const char **mangled, string *s)
{
int success;
@@ -1873,10 +1779,8 @@ demangle_integral_value (work, mangled, s)
/* Demangle the real value in MANGLED. */
static int
-demangle_real_value (work, mangled, s)
- struct work_stuff *work;
- const char **mangled;
- string* s;
+demangle_real_value (struct work_stuff *work,
+ const char **mangled, string *s)
{
if (**mangled == 'E')
return demangle_expression (work, mangled, s, tk_real);
@@ -1916,11 +1820,8 @@ demangle_real_value (work, mangled, s)
}
static int
-demangle_template_value_parm (work, mangled, s, tk)
- struct work_stuff *work;
- const char **mangled;
- string* s;
- type_kind_t tk;
+demangle_template_value_parm (struct work_stuff *work, const char **mangled,
+ string *s, type_kind_t tk)
{
int success = 1;
@@ -1990,7 +1891,7 @@ demangle_template_value_parm (work, mangled, s, tk)
string_appendn (s, "0", 1);
else
{
- char *p = xmalloc (symbol_len + 1), *q;
+ char *p = XNEWVEC (char, symbol_len + 1), *q;
strncpy (p, *mangled, symbol_len);
p [symbol_len] = '\0';
/* We use cplus_demangle here, rather than
@@ -2028,26 +1929,20 @@ demangle_template_value_parm (work, mangled, s, tk)
types. */
static int
-demangle_template (work, mangled, tname, trawname, is_type, remember)
- struct work_stuff *work;
- const char **mangled;
- string *tname;
- string *trawname;
- int is_type;
- int remember;
+demangle_template (struct work_stuff *work, const char **mangled,
+ string *tname, string *trawname,
+ int is_type, int remember)
{
int i;
int r;
int need_comma = 0;
int success = 0;
- const char *start;
int is_java_array = 0;
string temp;
(*mangled)++;
if (is_type)
{
- start = *mangled;
/* get template name */
if (**mangled == 'z')
{
@@ -2102,7 +1997,7 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
if (!is_type)
{
/* Create an array for saving the template argument values. */
- work->tmpl_argvec = (char**) xmalloc (r * sizeof (char *));
+ work->tmpl_argvec = XNEWVEC (char *, r);
work->ntmpl_args = r;
for (i = 0; i < r; i++)
work->tmpl_argvec[i] = 0;
@@ -2127,7 +2022,7 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
{
/* Save the template argument. */
int len = temp.p - temp.b;
- work->tmpl_argvec[i] = xmalloc (len + 1);
+ work->tmpl_argvec[i] = XNEWVEC (char, len + 1);
memcpy (work->tmpl_argvec[i], temp.b, len);
work->tmpl_argvec[i][len] = '\0';
}
@@ -2155,7 +2050,7 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
{
/* Save the template argument. */
int len = r2;
- work->tmpl_argvec[i] = xmalloc (len + 1);
+ work->tmpl_argvec[i] = XNEWVEC (char, len + 1);
memcpy (work->tmpl_argvec[i], *mangled, len);
work->tmpl_argvec[i][len] = '\0';
}
@@ -2201,7 +2096,7 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
if (!is_type)
{
int len = s->p - s->b;
- work->tmpl_argvec[i] = xmalloc (len + 1);
+ work->tmpl_argvec[i] = XNEWVEC (char, len + 1);
memcpy (work->tmpl_argvec[i], s->b, len);
work->tmpl_argvec[i][len] = '\0';
@@ -2245,11 +2140,8 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
}
static int
-arm_pt (work, mangled, n, anchor, args)
- struct work_stuff *work;
- const char *mangled;
- int n;
- const char **anchor, **args;
+arm_pt (struct work_stuff *work, const char *mangled,
+ int n, const char **anchor, const char **args)
{
/* Check if ARM template with "__pt__" in it ("parameterized type") */
/* Allow HP also here, because HP's cfront compiler follows ARM to some extent */
@@ -2302,11 +2194,8 @@ arm_pt (work, mangled, n, anchor, args)
}
static void
-demangle_arm_hp_template (work, mangled, n, declp)
- struct work_stuff *work;
- const char **mangled;
- int n;
- string *declp;
+demangle_arm_hp_template (struct work_stuff *work, const char **mangled,
+ int n, string *declp)
{
const char *p;
const char *args;
@@ -2483,10 +2372,8 @@ demangle_arm_hp_template (work, mangled, n, declp)
already been dealt with */
static int
-demangle_class_name (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_class_name (struct work_stuff *work, const char **mangled,
+ string *declp)
{
int n;
int success = 0;
@@ -2539,10 +2426,7 @@ DESCRIPTION
*/
static int
-demangle_class (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_class (struct work_stuff *work, const char **mangled, string *declp)
{
int success = 0;
int btype;
@@ -2594,11 +2478,8 @@ demangle_class (work, mangled, declp)
demangle_signature. */
static int
-iterate_demangle_function (work, mangled, declp, scan)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
- const char *scan;
+iterate_demangle_function (struct work_stuff *work, const char **mangled,
+ string *declp, const char *scan)
{
const char *mangle_init = *mangled;
int success = 0;
@@ -2697,10 +2578,8 @@ DESCRIPTION
*/
static int
-demangle_prefix (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_prefix (struct work_stuff *work, const char **mangled,
+ string *declp)
{
int success = 1;
const char *scan;
@@ -2908,10 +2787,7 @@ DESCRIPTION
*/
static int
-gnu_special (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+gnu_special (struct work_stuff *work, const char **mangled, string *declp)
{
int n;
int success = 1;
@@ -3112,16 +2988,13 @@ gnu_special (work, mangled, declp)
}
static void
-recursively_demangle(work, mangled, result, namelength)
- struct work_stuff *work;
- const char **mangled;
- string *result;
- int namelength;
+recursively_demangle(struct work_stuff *work, const char **mangled,
+ string *result, int namelength)
{
char * recurse = (char *)NULL;
char * recurse_dem = (char *)NULL;
- recurse = (char *) xmalloc (namelength + 1);
+ recurse = XNEWVEC (char, namelength + 1);
memcpy (recurse, *mangled, namelength);
recurse[namelength] = '\000';
@@ -3164,9 +3037,7 @@ DESCRIPTION
*/
static int
-arm_special (mangled, declp)
- const char **mangled;
- string *declp;
+arm_special (const char **mangled, string *declp)
{
int n;
int success = 1;
@@ -3249,12 +3120,8 @@ BUGS
*/
static int
-demangle_qualified (work, mangled, result, isfuncname, append)
- struct work_stuff *work;
- const char **mangled;
- string *result;
- int isfuncname;
- int append;
+demangle_qualified (struct work_stuff *work, const char **mangled,
+ string *result, int isfuncname, int append)
{
int qualifiers = 0;
int success = 1;
@@ -3476,9 +3343,7 @@ DESCRIPTION
*/
static int
-get_count (type, count)
- const char **type;
- int *count;
+get_count (const char **type, int *count)
{
const char *p;
int n;
@@ -3514,10 +3379,7 @@ get_count (type, count)
value returned is really a type_kind_t. */
static int
-do_type (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
+do_type (struct work_stuff *work, const char **mangled, string *result)
{
int n;
int done;
@@ -3826,10 +3688,8 @@ do_type (work, mangled, result)
The value returned is really a type_kind_t. */
static int
-demangle_fund_type (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
+demangle_fund_type (struct work_stuff *work,
+ const char **mangled, string *result)
{
int done = 0;
int success = 1;
@@ -4028,10 +3888,8 @@ demangle_fund_type (work, mangled, result)
**mangled points to 'S' or 'U' */
static int
-do_hpacc_template_const_value (work, mangled, result)
- struct work_stuff *work ATTRIBUTE_UNUSED;
- const char **mangled;
- string *result;
+do_hpacc_template_const_value (struct work_stuff *work ATTRIBUTE_UNUSED,
+ const char **mangled, string *result)
{
int unsigned_const;
@@ -4085,10 +3943,8 @@ do_hpacc_template_const_value (work, mangled, result)
**mangled is pointing to the 'A' */
static int
-do_hpacc_template_literal (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
+do_hpacc_template_literal (struct work_stuff *work, const char **mangled,
+ string *result)
{
int literal_len = 0;
char * recurse;
@@ -4109,7 +3965,7 @@ do_hpacc_template_literal (work, mangled, result)
string_append (result, "&");
/* Now recursively demangle the literal name */
- recurse = (char *) xmalloc (literal_len + 1);
+ recurse = XNEWVEC (char, literal_len + 1);
memcpy (recurse, *mangled, literal_len);
recurse[literal_len] = '\000';
@@ -4131,9 +3987,7 @@ do_hpacc_template_literal (work, mangled, result)
}
static int
-snarf_numeric_literal (args, arg)
- const char ** args;
- string * arg;
+snarf_numeric_literal (const char **args, string *arg)
{
if (**args == '-')
{
@@ -4162,10 +4016,7 @@ snarf_numeric_literal (args, arg)
and free'd should anything go wrong. */
static int
-do_arg (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
+do_arg (struct work_stuff *work, const char **mangled, string *result)
{
/* Remember where we started so that we can record the type, for
non-squangling type remembering. */
@@ -4216,7 +4067,7 @@ do_arg (work, mangled, result)
if (work->previous_argument)
string_delete (work->previous_argument);
else
- work->previous_argument = (string*) xmalloc (sizeof (string));
+ work->previous_argument = XNEW (string);
if (!do_type (work, mangled, work->previous_argument))
return 0;
@@ -4228,10 +4079,7 @@ do_arg (work, mangled, result)
}
static void
-remember_type (work, start, len)
- struct work_stuff *work;
- const char *start;
- int len;
+remember_type (struct work_stuff *work, const char *start, int len)
{
char *tem;
@@ -4243,18 +4091,16 @@ remember_type (work, start, len)
if (work -> typevec_size == 0)
{
work -> typevec_size = 3;
- work -> typevec
- = (char **) xmalloc (sizeof (char *) * work -> typevec_size);
+ work -> typevec = XNEWVEC (char *, work->typevec_size);
}
else
{
work -> typevec_size *= 2;
work -> typevec
- = (char **) xrealloc ((char *)work -> typevec,
- sizeof (char *) * work -> typevec_size);
+ = XRESIZEVEC (char *, work->typevec, work->typevec_size);
}
}
- tem = xmalloc (len + 1);
+ tem = XNEWVEC (char, len + 1);
memcpy (tem, start, len);
tem[len] = '\0';
work -> typevec[work -> ntypes++] = tem;
@@ -4263,10 +4109,7 @@ remember_type (work, start, len)
/* Remember a K type class qualifier. */
static void
-remember_Ktype (work, start, len)
- struct work_stuff *work;
- const char *start;
- int len;
+remember_Ktype (struct work_stuff *work, const char *start, int len)
{
char *tem;
@@ -4275,18 +4118,16 @@ remember_Ktype (work, start, len)
if (work -> ksize == 0)
{
work -> ksize = 5;
- work -> ktypevec
- = (char **) xmalloc (sizeof (char *) * work -> ksize);
+ work -> ktypevec = XNEWVEC (char *, work->ksize);
}
else
{
work -> ksize *= 2;
work -> ktypevec
- = (char **) xrealloc ((char *)work -> ktypevec,
- sizeof (char *) * work -> ksize);
+ = XRESIZEVEC (char *, work->ktypevec, work->ksize);
}
}
- tem = xmalloc (len + 1);
+ tem = XNEWVEC (char, len + 1);
memcpy (tem, start, len);
tem[len] = '\0';
work -> ktypevec[work -> numk++] = tem;
@@ -4297,8 +4138,7 @@ remember_Ktype (work, start, len)
registers map<temp<char> > as B0, and temp<char> as B1 */
static int
-register_Btype (work)
- struct work_stuff *work;
+register_Btype (struct work_stuff *work)
{
int ret;
@@ -4307,15 +4147,13 @@ register_Btype (work)
if (work -> bsize == 0)
{
work -> bsize = 5;
- work -> btypevec
- = (char **) xmalloc (sizeof (char *) * work -> bsize);
+ work -> btypevec = XNEWVEC (char *, work->bsize);
}
else
{
work -> bsize *= 2;
work -> btypevec
- = (char **) xrealloc ((char *)work -> btypevec,
- sizeof (char *) * work -> bsize);
+ = XRESIZEVEC (char *, work->btypevec, work->bsize);
}
}
ret = work -> numb++;
@@ -4326,14 +4164,12 @@ register_Btype (work)
/* Store a value into a previously registered B code type. */
static void
-remember_Btype (work, start, len, index)
- struct work_stuff *work;
- const char *start;
- int len, index;
+remember_Btype (struct work_stuff *work, const char *start,
+ int len, int index)
{
char *tem;
- tem = xmalloc (len + 1);
+ tem = XNEWVEC (char, len + 1);
memcpy (tem, start, len);
tem[len] = '\0';
work -> btypevec[index] = tem;
@@ -4341,8 +4177,7 @@ remember_Btype (work, start, len, index)
/* Lose all the info related to B and K type codes. */
static void
-forget_B_and_K_types (work)
- struct work_stuff *work;
+forget_B_and_K_types (struct work_stuff *work)
{
int i;
@@ -4369,8 +4204,7 @@ forget_B_and_K_types (work)
/* Forget the remembered types, but not the type vector itself. */
static void
-forget_types (work)
- struct work_stuff *work;
+forget_types (struct work_stuff *work)
{
int i;
@@ -4428,10 +4262,8 @@ forget_types (work)
*/
static int
-demangle_args (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_args (struct work_stuff *work, const char **mangled,
+ string *declp)
{
string arg;
int need_comma = 0;
@@ -4553,10 +4385,8 @@ demangle_args (work, mangled, declp)
and method pointers or references, not top-level declarations. */
static int
-demangle_nested_args (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_nested_args (struct work_stuff *work, const char **mangled,
+ string *declp)
{
string* saved_previous_argument;
int result;
@@ -4592,11 +4422,8 @@ demangle_nested_args (work, mangled, declp)
}
static void
-demangle_function_name (work, mangled, declp, scan)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
- const char *scan;
+demangle_function_name (struct work_stuff *work, const char **mangled,
+ string *declp, const char *scan)
{
size_t i;
string type;
@@ -4753,9 +4580,7 @@ demangle_function_name (work, mangled, declp, scan)
/* a mini string-handling package */
static void
-string_need (s, n)
- string *s;
- int n;
+string_need (string *s, int n)
{
int tem;
@@ -4765,7 +4590,7 @@ string_need (s, n)
{
n = 32;
}
- s->p = s->b = xmalloc (n);
+ s->p = s->b = XNEWVEC (char, n);
s->e = s->b + n;
}
else if (s->e - s->p < n)
@@ -4773,15 +4598,14 @@ string_need (s, n)
tem = s->p - s->b;
n += tem;
n *= 2;
- s->b = xrealloc (s->b, n);
+ s->b = XRESIZEVEC (char, s->b, n);
s->p = s->b + tem;
s->e = s->b + n;
}
}
static void
-string_delete (s)
- string *s;
+string_delete (string *s)
{
if (s->b != NULL)
{
@@ -4791,15 +4615,13 @@ string_delete (s)
}
static void
-string_init (s)
- string *s;
+string_init (string *s)
{
s->b = s->p = s->e = NULL;
}
static void
-string_clear (s)
- string *s;
+string_clear (string *s)
{
s->p = s->b;
}
@@ -4807,8 +4629,7 @@ string_clear (s)
#if 0
static int
-string_empty (s)
- string *s;
+string_empty (string *s)
{
return (s->b == s->p);
}
@@ -4816,9 +4637,7 @@ string_empty (s)
#endif
static void
-string_append (p, s)
- string *p;
- const char *s;
+string_append (string *p, const char *s)
{
int n;
if (s == NULL || *s == '\0')
@@ -4830,8 +4649,7 @@ string_append (p, s)
}
static void
-string_appends (p, s)
- string *p, *s;
+string_appends (string *p, string *s)
{
int n;
@@ -4845,10 +4663,7 @@ string_appends (p, s)
}
static void
-string_appendn (p, s, n)
- string *p;
- const char *s;
- int n;
+string_appendn (string *p, const char *s, int n)
{
if (n != 0)
{
@@ -4859,9 +4674,7 @@ string_appendn (p, s, n)
}
static void
-string_prepend (p, s)
- string *p;
- const char *s;
+string_prepend (string *p, const char *s)
{
if (s != NULL && *s != '\0')
{
@@ -4870,8 +4683,7 @@ string_prepend (p, s)
}
static void
-string_prepends (p, s)
- string *p, *s;
+string_prepends (string *p, string *s)
{
if (s->b != s->p)
{
@@ -4880,10 +4692,7 @@ string_prepends (p, s)
}
static void
-string_prependn (p, s, n)
- string *p;
- const char *s;
- int n;
+string_prependn (string *p, const char *s, int n)
{
char *q;
@@ -4900,9 +4709,7 @@ string_prependn (p, s, n)
}
static void
-string_append_template_idx (s, idx)
- string *s;
- int idx;
+string_append_template_idx (string *s, int idx)
{
char buf[INTBUF_SIZE + 1 /* 'T' */];
sprintf(buf, "T%d", idx);
diff --git a/contrib/binutils/libiberty/dyn-string.c b/contrib/binutils/libiberty/dyn-string.c
index 1da76c2110da..9de50eda0e86 100644
--- a/contrib/binutils/libiberty/dyn-string.c
+++ b/contrib/binutils/libiberty/dyn-string.c
@@ -1,5 +1,5 @@
/* An abstract string datatype.
- Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
@@ -25,8 +25,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -45,15 +45,6 @@ Boston, MA 02111-1307, USA. */
#include "libiberty.h"
#include "dyn-string.h"
-/* If this file is being compiled for inclusion in the C++ runtime
- library, as part of the demangler implementation, we don't want to
- abort if an allocation fails. Instead, percolate an error code up
- through the call chain. */
-
-#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3)
-#define RETURN_ON_ALLOCATION_FAILURE
-#endif
-
/* Performs in-place initialization of a dyn_string struct. This
function can be used with a dyn_string struct on the stack or
embedded in another object. The contents of of the string itself
@@ -65,9 +56,7 @@ Boston, MA 02111-1307, USA. */
fails, returns 0. Otherwise returns 1. */
int
-dyn_string_init (ds_struct_ptr, space)
- struct dyn_string *ds_struct_ptr;
- int space;
+dyn_string_init (struct dyn_string *ds_struct_ptr, int space)
{
/* We need at least one byte in which to store the terminating NUL. */
if (space == 0)
@@ -78,7 +67,7 @@ dyn_string_init (ds_struct_ptr, space)
if (ds_struct_ptr->s == NULL)
return 0;
#else
- ds_struct_ptr->s = (char *) xmalloc (space);
+ ds_struct_ptr->s = XNEWVEC (char, space);
#endif
ds_struct_ptr->allocated = space;
ds_struct_ptr->length = 0;
@@ -94,8 +83,7 @@ dyn_string_init (ds_struct_ptr, space)
returns the newly allocated string. */
dyn_string_t
-dyn_string_new (space)
- int space;
+dyn_string_new (int space)
{
dyn_string_t result;
#ifdef RETURN_ON_ALLOCATION_FAILURE
@@ -108,7 +96,7 @@ dyn_string_new (space)
return NULL;
}
#else
- result = (dyn_string_t) xmalloc (sizeof (struct dyn_string));
+ result = XNEW (struct dyn_string);
dyn_string_init (result, space);
#endif
return result;
@@ -117,8 +105,7 @@ dyn_string_new (space)
/* Free the memory used by DS. */
void
-dyn_string_delete (ds)
- dyn_string_t ds;
+dyn_string_delete (dyn_string_t ds)
{
free (ds->s);
free (ds);
@@ -129,8 +116,7 @@ dyn_string_delete (ds)
DS is then set to the empty string. Deletes DS itself. */
char*
-dyn_string_release (ds)
- dyn_string_t ds;
+dyn_string_release (dyn_string_t ds)
{
/* Store the old buffer. */
char* result = ds->s;
@@ -150,9 +136,7 @@ dyn_string_release (ds)
operation fails, deletes DS and returns NULL. */
dyn_string_t
-dyn_string_resize (ds, space)
- dyn_string_t ds;
- int space;
+dyn_string_resize (dyn_string_t ds, int space)
{
int new_allocated = ds->allocated;
@@ -175,7 +159,7 @@ dyn_string_resize (ds, space)
return NULL;
}
#else
- ds->s = (char *) xrealloc (ds->s, ds->allocated);
+ ds->s = XRESIZEVEC (char, ds->s, ds->allocated);
#endif
}
@@ -185,8 +169,7 @@ dyn_string_resize (ds, space)
/* Sets the contents of DS to the empty string. */
void
-dyn_string_clear (ds)
- dyn_string_t ds;
+dyn_string_clear (dyn_string_t ds)
{
/* A dyn_string always has room for at least the NUL terminator. */
ds->s[0] = '\0';
@@ -198,9 +181,7 @@ dyn_string_clear (ds)
RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
-dyn_string_copy (dest, src)
- dyn_string_t dest;
- dyn_string_t src;
+dyn_string_copy (dyn_string_t dest, dyn_string_t src)
{
if (dest == src)
abort ();
@@ -220,9 +201,7 @@ dyn_string_copy (dest, src)
and returns 0. */
int
-dyn_string_copy_cstr (dest, src)
- dyn_string_t dest;
- const char *src;
+dyn_string_copy_cstr (dyn_string_t dest, const char *src)
{
int length = strlen (src);
/* Make room in DEST. */
@@ -241,9 +220,7 @@ dyn_string_copy_cstr (dest, src)
returns 0. */
int
-dyn_string_prepend (dest, src)
- dyn_string_t dest;
- dyn_string_t src;
+dyn_string_prepend (dyn_string_t dest, dyn_string_t src)
{
return dyn_string_insert (dest, 0, src);
}
@@ -253,9 +230,7 @@ dyn_string_prepend (dest, src)
if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
-dyn_string_prepend_cstr (dest, src)
- dyn_string_t dest;
- const char *src;
+dyn_string_prepend_cstr (dyn_string_t dest, const char *src)
{
return dyn_string_insert_cstr (dest, 0, src);
}
@@ -266,10 +241,7 @@ dyn_string_prepend_cstr (dest, src)
and returns 0. */
int
-dyn_string_insert (dest, pos, src)
- dyn_string_t dest;
- int pos;
- dyn_string_t src;
+dyn_string_insert (dyn_string_t dest, int pos, dyn_string_t src)
{
int i;
@@ -294,10 +266,7 @@ dyn_string_insert (dest, pos, src)
and returns 0. */
int
-dyn_string_insert_cstr (dest, pos, src)
- dyn_string_t dest;
- int pos;
- const char *src;
+dyn_string_insert_cstr (dyn_string_t dest, int pos, const char *src)
{
int i;
int length = strlen (src);
@@ -319,10 +288,7 @@ dyn_string_insert_cstr (dest, pos, src)
RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
-dyn_string_insert_char (dest, pos, c)
- dyn_string_t dest;
- int pos;
- int c;
+dyn_string_insert_char (dyn_string_t dest, int pos, int c)
{
int i;
@@ -343,9 +309,7 @@ dyn_string_insert_char (dest, pos, c)
returns 0. */
int
-dyn_string_append (dest, s)
- dyn_string_t dest;
- dyn_string_t s;
+dyn_string_append (dyn_string_t dest, dyn_string_t s)
{
if (dyn_string_resize (dest, dest->length + s->length) == 0)
return 0;
@@ -359,9 +323,7 @@ dyn_string_append (dest, s)
deletes DEST and returns 0. */
int
-dyn_string_append_cstr (dest, s)
- dyn_string_t dest;
- const char *s;
+dyn_string_append_cstr (dyn_string_t dest, const char *s)
{
int len = strlen (s);
@@ -378,9 +340,7 @@ dyn_string_append_cstr (dest, s)
if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
-dyn_string_append_char (dest, c)
- dyn_string_t dest;
- int c;
+dyn_string_append_char (dyn_string_t dest, int c)
{
/* Make room for the extra character. */
if (dyn_string_resize (dest, dest->length + 1) == NULL)
@@ -401,11 +361,8 @@ dyn_string_append_char (dest, c)
deletes DEST and returns 0. */
int
-dyn_string_substring (dest, src, start, end)
- dyn_string_t dest;
- dyn_string_t src;
- int start;
- int end;
+dyn_string_substring (dyn_string_t dest, dyn_string_t src,
+ int start, int end)
{
int i;
int length = end - start;
@@ -430,9 +387,7 @@ dyn_string_substring (dest, src, start, end)
/* Returns non-zero if DS1 and DS2 have the same contents. */
int
-dyn_string_eq (ds1, ds2)
- dyn_string_t ds1;
- dyn_string_t ds2;
+dyn_string_eq (dyn_string_t ds1, dyn_string_t ds2)
{
/* If DS1 and DS2 have different lengths, they must not be the same. */
if (ds1->length != ds2->length)
diff --git a/contrib/binutils/libiberty/fdmatch.c b/contrib/binutils/libiberty/fdmatch.c
index 979c214d5d4d..f613cb3c01ea 100644
--- a/contrib/binutils/libiberty/fdmatch.c
+++ b/contrib/binutils/libiberty/fdmatch.c
@@ -14,8 +14,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/*
@@ -41,14 +41,15 @@ BUGS
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "ansidecl.h"
#include "libiberty.h"
#include <sys/types.h>
#include <sys/stat.h>
-int fdmatch (fd1, fd2)
- int fd1;
- int fd2;
+int fdmatch (int fd1, int fd2)
{
struct stat sbuf1;
struct stat sbuf2;
diff --git a/contrib/binutils/libiberty/ffs.c b/contrib/binutils/libiberty/ffs.c
index de047e217eb3..603cbe8ed994 100644
--- a/contrib/binutils/libiberty/ffs.c
+++ b/contrib/binutils/libiberty/ffs.c
@@ -11,8 +11,7 @@ value 1). If @var{valu} is zero, zero is returned.
*/
int
-ffs (valu)
- register int valu;
+ffs (register int valu)
{
register int bit;
diff --git a/contrib/binutils/libiberty/fibheap.c b/contrib/binutils/libiberty/fibheap.c
index bcecf80251f2..c032149c0c24 100644
--- a/contrib/binutils/libiberty/fibheap.c
+++ b/contrib/binutils/libiberty/fibheap.c
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -37,32 +37,31 @@ Boston, MA 02111-1307, USA. */
#define FIBHEAPKEY_MIN LONG_MIN
-static void fibheap_ins_root PARAMS ((fibheap_t, fibnode_t));
-static void fibheap_rem_root PARAMS ((fibheap_t, fibnode_t));
-static void fibheap_consolidate PARAMS ((fibheap_t));
-static void fibheap_link PARAMS ((fibheap_t, fibnode_t, fibnode_t));
-static void fibheap_cut PARAMS ((fibheap_t, fibnode_t, fibnode_t));
-static void fibheap_cascading_cut PARAMS ((fibheap_t, fibnode_t));
-static fibnode_t fibheap_extr_min_node PARAMS ((fibheap_t));
-static int fibheap_compare PARAMS ((fibheap_t, fibnode_t, fibnode_t));
-static int fibheap_comp_data PARAMS ((fibheap_t, fibheapkey_t, void *,
- fibnode_t));
-static fibnode_t fibnode_new PARAMS ((void));
-static void fibnode_insert_after PARAMS ((fibnode_t, fibnode_t));
+static void fibheap_ins_root (fibheap_t, fibnode_t);
+static void fibheap_rem_root (fibheap_t, fibnode_t);
+static void fibheap_consolidate (fibheap_t);
+static void fibheap_link (fibheap_t, fibnode_t, fibnode_t);
+static void fibheap_cut (fibheap_t, fibnode_t, fibnode_t);
+static void fibheap_cascading_cut (fibheap_t, fibnode_t);
+static fibnode_t fibheap_extr_min_node (fibheap_t);
+static int fibheap_compare (fibheap_t, fibnode_t, fibnode_t);
+static int fibheap_comp_data (fibheap_t, fibheapkey_t, void *, fibnode_t);
+static fibnode_t fibnode_new (void);
+static void fibnode_insert_after (fibnode_t, fibnode_t);
#define fibnode_insert_before(a, b) fibnode_insert_after (a->left, b)
-static fibnode_t fibnode_remove PARAMS ((fibnode_t));
+static fibnode_t fibnode_remove (fibnode_t);
/* Create a new fibonacci heap. */
fibheap_t
-fibheap_new ()
+fibheap_new (void)
{
return (fibheap_t) xcalloc (1, sizeof (struct fibheap));
}
/* Create a new fibonacci heap node. */
static fibnode_t
-fibnode_new ()
+fibnode_new (void)
{
fibnode_t node;
@@ -74,10 +73,7 @@ fibnode_new ()
}
static inline int
-fibheap_compare (heap, a, b)
- fibheap_t heap ATTRIBUTE_UNUSED;
- fibnode_t a;
- fibnode_t b;
+fibheap_compare (fibheap_t heap ATTRIBUTE_UNUSED, fibnode_t a, fibnode_t b)
{
if (a->key < b->key)
return -1;
@@ -87,11 +83,7 @@ fibheap_compare (heap, a, b)
}
static inline int
-fibheap_comp_data (heap, key, data, b)
- fibheap_t heap;
- fibheapkey_t key;
- void *data;
- fibnode_t b;
+fibheap_comp_data (fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b)
{
struct fibnode a;
@@ -103,10 +95,7 @@ fibheap_comp_data (heap, key, data, b)
/* Insert DATA, with priority KEY, into HEAP. */
fibnode_t
-fibheap_insert (heap, key, data)
- fibheap_t heap;
- fibheapkey_t key;
- void *data;
+fibheap_insert (fibheap_t heap, fibheapkey_t key, void *data)
{
fibnode_t node;
@@ -132,8 +121,7 @@ fibheap_insert (heap, key, data)
/* Return the data of the minimum node (if we know it). */
void *
-fibheap_min (heap)
- fibheap_t heap;
+fibheap_min (fibheap_t heap)
{
/* If there is no min, we can't easily return it. */
if (heap->min == NULL)
@@ -143,8 +131,7 @@ fibheap_min (heap)
/* Return the key of the minimum node (if we know it). */
fibheapkey_t
-fibheap_min_key (heap)
- fibheap_t heap;
+fibheap_min_key (fibheap_t heap)
{
/* If there is no min, we can't easily return it. */
if (heap->min == NULL)
@@ -154,9 +141,7 @@ fibheap_min_key (heap)
/* Union HEAPA and HEAPB into a new heap. */
fibheap_t
-fibheap_union (heapa, heapb)
- fibheap_t heapa;
- fibheap_t heapb;
+fibheap_union (fibheap_t heapa, fibheap_t heapb)
{
fibnode_t a_root, b_root, temp;
@@ -190,8 +175,7 @@ fibheap_union (heapa, heapb)
/* Extract the data of the minimum node from HEAP. */
void *
-fibheap_extract_min (heap)
- fibheap_t heap;
+fibheap_extract_min (fibheap_t heap)
{
fibnode_t z;
void *ret = NULL;
@@ -211,11 +195,8 @@ fibheap_extract_min (heap)
/* Replace both the KEY and the DATA associated with NODE. */
void *
-fibheap_replace_key_data (heap, node, key, data)
- fibheap_t heap;
- fibnode_t node;
- fibheapkey_t key;
- void *data;
+fibheap_replace_key_data (fibheap_t heap, fibnode_t node,
+ fibheapkey_t key, void *data)
{
void *odata;
fibheapkey_t okey;
@@ -253,20 +234,14 @@ fibheap_replace_key_data (heap, node, key, data)
/* Replace the DATA associated with NODE. */
void *
-fibheap_replace_data (heap, node, data)
- fibheap_t heap;
- fibnode_t node;
- void *data;
+fibheap_replace_data (fibheap_t heap, fibnode_t node, void *data)
{
return fibheap_replace_key_data (heap, node, node->key, data);
}
/* Replace the KEY associated with NODE. */
fibheapkey_t
-fibheap_replace_key (heap, node, key)
- fibheap_t heap;
- fibnode_t node;
- fibheapkey_t key;
+fibheap_replace_key (fibheap_t heap, fibnode_t node, fibheapkey_t key)
{
int okey = node->key;
fibheap_replace_key_data (heap, node, key, node->data);
@@ -275,9 +250,7 @@ fibheap_replace_key (heap, node, key)
/* Delete NODE from HEAP. */
void *
-fibheap_delete_node (heap, node)
- fibheap_t heap;
- fibnode_t node;
+fibheap_delete_node (fibheap_t heap, fibnode_t node)
{
void *ret = node->data;
@@ -290,8 +263,7 @@ fibheap_delete_node (heap, node)
/* Delete HEAP. */
void
-fibheap_delete (heap)
- fibheap_t heap;
+fibheap_delete (fibheap_t heap)
{
while (heap->min != NULL)
free (fibheap_extr_min_node (heap));
@@ -301,16 +273,14 @@ fibheap_delete (heap)
/* Determine if HEAP is empty. */
int
-fibheap_empty (heap)
- fibheap_t heap;
+fibheap_empty (fibheap_t heap)
{
return heap->nodes == 0;
}
/* Extract the minimum node of the heap. */
static fibnode_t
-fibheap_extr_min_node (heap)
- fibheap_t heap;
+fibheap_extr_min_node (fibheap_t heap)
{
fibnode_t ret = heap->min;
fibnode_t x, y, orig;
@@ -346,9 +316,7 @@ fibheap_extr_min_node (heap)
/* Insert NODE into the root list of HEAP. */
static void
-fibheap_ins_root (heap, node)
- fibheap_t heap;
- fibnode_t node;
+fibheap_ins_root (fibheap_t heap, fibnode_t node)
{
/* If the heap is currently empty, the new node becomes the singleton
circular root list. */
@@ -367,9 +335,7 @@ fibheap_ins_root (heap, node)
/* Remove NODE from the rootlist of HEAP. */
static void
-fibheap_rem_root (heap, node)
- fibheap_t heap;
- fibnode_t node;
+fibheap_rem_root (fibheap_t heap, fibnode_t node)
{
if (node->left == node)
heap->root = NULL;
@@ -379,8 +345,7 @@ fibheap_rem_root (heap, node)
/* Consolidate the heap. */
static void
-fibheap_consolidate (heap)
- fibheap_t heap;
+fibheap_consolidate (fibheap_t heap)
{
fibnode_t a[1 + 8 * sizeof (long)];
fibnode_t w;
@@ -427,10 +392,8 @@ fibheap_consolidate (heap)
/* Make NODE a child of PARENT. */
static void
-fibheap_link (heap, node, parent)
- fibheap_t heap ATTRIBUTE_UNUSED;
- fibnode_t node;
- fibnode_t parent;
+fibheap_link (fibheap_t heap ATTRIBUTE_UNUSED,
+ fibnode_t node, fibnode_t parent)
{
if (parent->child == NULL)
parent->child = node;
@@ -443,10 +406,7 @@ fibheap_link (heap, node, parent)
/* Remove NODE from PARENT's child list. */
static void
-fibheap_cut (heap, node, parent)
- fibheap_t heap;
- fibnode_t node;
- fibnode_t parent;
+fibheap_cut (fibheap_t heap, fibnode_t node, fibnode_t parent)
{
fibnode_remove (node);
parent->degree--;
@@ -456,9 +416,7 @@ fibheap_cut (heap, node, parent)
}
static void
-fibheap_cascading_cut (heap, y)
- fibheap_t heap;
- fibnode_t y;
+fibheap_cascading_cut (fibheap_t heap, fibnode_t y)
{
fibnode_t z;
@@ -478,9 +436,7 @@ fibheap_cascading_cut (heap, y)
}
static void
-fibnode_insert_after (a, b)
- fibnode_t a;
- fibnode_t b;
+fibnode_insert_after (fibnode_t a, fibnode_t b)
{
if (a == a->right)
{
@@ -499,8 +455,7 @@ fibnode_insert_after (a, b)
}
static fibnode_t
-fibnode_remove (node)
- fibnode_t node;
+fibnode_remove (fibnode_t node)
{
fibnode_t ret;
diff --git a/contrib/binutils/libiberty/floatformat.c b/contrib/binutils/libiberty/floatformat.c
index a0f65354e482..bd31efac7c17 100644
--- a/contrib/binutils/libiberty/floatformat.c
+++ b/contrib/binutils/libiberty/floatformat.c
@@ -1,5 +1,6 @@
/* IEEE floating point support routines, for GDB, the GNU Debugger.
- Copyright (C) 1991, 1994, 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1991, 1994, 1999, 2000, 2003, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -15,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This is needed to pick up the NAN macro on some systems. */
#define _GNU_SOURCE
@@ -30,6 +31,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <string.h>
#endif
+/* On some platforms, <float.h> provides DBL_QNAN. */
+#ifdef STDC_HEADERS
+#include <float.h>
+#endif
+
#include "ansidecl.h"
#include "libiberty.h"
#include "floatformat.h"
@@ -43,21 +49,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#ifndef NAN
+#ifdef DBL_QNAN
+#define NAN DBL_QNAN
+#else
#define NAN (0.0 / 0.0)
#endif
+#endif
-static unsigned long get_field PARAMS ((const unsigned char *,
- enum floatformat_byteorders,
- unsigned int,
- unsigned int,
- unsigned int));
-static int floatformat_always_valid PARAMS ((const struct floatformat *fmt,
- const char *from));
+static unsigned long get_field (const unsigned char *,
+ enum floatformat_byteorders,
+ unsigned int,
+ unsigned int,
+ unsigned int);
+static int floatformat_always_valid (const struct floatformat *fmt,
+ const void *from);
static int
-floatformat_always_valid (fmt, from)
- const struct floatformat *fmt ATTRIBUTE_UNUSED;
- const char *from ATTRIBUTE_UNUSED;
+floatformat_always_valid (const struct floatformat *fmt ATTRIBUTE_UNUSED,
+ const void *from ATTRIBUTE_UNUSED)
{
return 1;
}
@@ -108,12 +117,35 @@ const struct floatformat floatformat_ieee_double_littlebyte_bigword =
floatformat_always_valid
};
-static int floatformat_i387_ext_is_valid PARAMS ((const struct floatformat *fmt, const char *from));
+/* floatformat for VAX. Not quite IEEE, but close enough. */
+
+const struct floatformat floatformat_vax_f =
+{
+ floatformat_vax, 32, 0, 1, 8, 129, 0, 9, 23,
+ floatformat_intbit_no,
+ "floatformat_vax_f",
+ floatformat_always_valid
+};
+const struct floatformat floatformat_vax_d =
+{
+ floatformat_vax, 64, 0, 1, 8, 129, 0, 9, 55,
+ floatformat_intbit_no,
+ "floatformat_vax_d",
+ floatformat_always_valid
+};
+const struct floatformat floatformat_vax_g =
+{
+ floatformat_vax, 64, 0, 1, 11, 1025, 0, 12, 52,
+ floatformat_intbit_no,
+ "floatformat_vax_g",
+ floatformat_always_valid
+};
+
+static int floatformat_i387_ext_is_valid (const struct floatformat *fmt,
+ const void *from);
static int
-floatformat_i387_ext_is_valid (fmt, from)
- const struct floatformat *fmt;
- const char *from;
+floatformat_i387_ext_is_valid (const struct floatformat *fmt, const void *from)
{
/* In the i387 double-extended format, if the exponent is all ones,
then the integer bit must be set. If the exponent is neither 0
@@ -121,12 +153,12 @@ floatformat_i387_ext_is_valid (fmt, from)
zero can it be zero, and then it must be zero. */
unsigned long exponent, int_bit;
const unsigned char *ufrom = (const unsigned char *) from;
-
+
exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize,
fmt->exp_start, fmt->exp_len);
int_bit = get_field (ufrom, fmt->byteorder, fmt->totalsize,
fmt->man_start, 1);
-
+
if ((exponent == 0) != (int_bit == 0))
return 0;
else
@@ -220,12 +252,8 @@ const struct floatformat floatformat_ia64_quad_little =
/* 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 (data, order, total_len, start, len)
- const unsigned char *data;
- enum floatformat_byteorders order;
- unsigned int total_len;
- unsigned int start;
- unsigned int len;
+get_field (const unsigned char *data, enum floatformat_byteorders order,
+ unsigned int total_len, unsigned int start, unsigned int len)
{
unsigned long result;
unsigned int cur_byte;
@@ -273,12 +301,10 @@ get_field (data, order, total_len, start, len)
Store the double in *TO. */
void
-floatformat_to_double (fmt, from, to)
- const struct floatformat *fmt;
- const char *from;
- double *to;
+floatformat_to_double (const struct floatformat *fmt,
+ const void *from, double *to)
{
- const unsigned char *ufrom = (const unsigned char *)from;
+ const unsigned char *ufrom = (const unsigned char *) from;
double dto;
long exponent;
unsigned long mant;
@@ -315,6 +341,13 @@ floatformat_to_double (fmt, from, to)
mant_bits_left -= mant_bits;
}
+ /* On certain systems (such as GNU/Linux), the use of the
+ INFINITY macro below may generate a warning that can not be
+ silenced due to a bug in GCC (PR preprocessor/11931). The
+ preprocessor fails to recognise the __extension__ keyword in
+ conjunction with the GNU/C99 extension for hexadecimal
+ floating point constants and will issue a warning when
+ compiling with -pedantic. */
if (nan)
dto = NAN;
else
@@ -381,22 +414,18 @@ floatformat_to_double (fmt, from, to)
*to = dto;
}
-static void put_field PARAMS ((unsigned char *, enum floatformat_byteorders,
- unsigned int,
- unsigned int,
- unsigned int,
- unsigned long));
+static void put_field (unsigned char *, enum floatformat_byteorders,
+ unsigned int,
+ unsigned int,
+ unsigned int,
+ unsigned long);
/* Set 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 void
-put_field (data, order, total_len, start, len, stuff_to_put)
- unsigned char *data;
- enum floatformat_byteorders order;
- unsigned int total_len;
- unsigned int start;
- unsigned int len;
- unsigned long stuff_to_put;
+put_field (unsigned char *data, enum floatformat_byteorders order,
+ unsigned int total_len, unsigned int start, unsigned int len,
+ unsigned long stuff_to_put)
{
unsigned int cur_byte;
int cur_bitshift;
@@ -443,17 +472,15 @@ put_field (data, order, total_len, start, len, stuff_to_put)
restrictions. */
void
-floatformat_from_double (fmt, from, to)
- const struct floatformat *fmt;
- const double *from;
- char *to;
+floatformat_from_double (const struct floatformat *fmt,
+ const double *from, void *to)
{
double dfrom;
int exponent;
double mant;
unsigned int mant_bits, mant_off;
int mant_bits_left;
- unsigned char *uto = (unsigned char *)to;
+ unsigned char *uto = (unsigned char *) to;
dfrom = *from;
memset (uto, 0, fmt->totalsize / FLOATFORMAT_CHAR_BIT);
@@ -541,9 +568,7 @@ floatformat_from_double (fmt, from, to)
/* Return non-zero iff the data at FROM is a valid number in format FMT. */
int
-floatformat_is_valid (fmt, from)
- const struct floatformat *fmt;
- const char *from;
+floatformat_is_valid (const struct floatformat *fmt, const void *from)
{
return fmt->is_valid (fmt, from);
}
@@ -556,20 +581,17 @@ floatformat_is_valid (fmt, from)
/* This is to be run on a host which uses IEEE floating point. */
void
-ieee_test (n)
- double n;
+ieee_test (double n)
{
double result;
- floatformat_to_double (&floatformat_ieee_double_little, (char *) &n,
- &result);
+ floatformat_to_double (&floatformat_ieee_double_little, &n, &result);
if ((n != result && (! isnan (n) || ! isnan (result)))
|| (n < 0 && result >= 0)
|| (n >= 0 && result < 0))
printf ("Differ(to): %.20g -> %.20g\n", n, result);
- floatformat_from_double (&floatformat_ieee_double_little, &n,
- (char *) &result);
+ floatformat_from_double (&floatformat_ieee_double_little, &n, &result);
if ((n != result && (! isnan (n) || ! isnan (result)))
|| (n < 0 && result >= 0)
|| (n >= 0 && result < 0))
@@ -597,7 +619,7 @@ ieee_test (n)
}
int
-main ()
+main (void)
{
ieee_test (0.0);
ieee_test (0.5);
diff --git a/contrib/binutils/libiberty/fnmatch.c b/contrib/binutils/libiberty/fnmatch.c
index eb898ee14d82..fc897be2c6f7 100644
--- a/contrib/binutils/libiberty/fnmatch.c
+++ b/contrib/binutils/libiberty/fnmatch.c
@@ -15,8 +15,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#if defined (CONFIG_BROKETS)
@@ -65,10 +65,7 @@ extern int errno;
/* Match STRING against the filename pattern PATTERN, returning zero if
it matches, nonzero if not. */
int
-fnmatch (pattern, string, flags)
- const char *pattern;
- const char *string;
- int flags;
+fnmatch (const char *pattern, const char *string, int flags)
{
register const char *p = pattern, *n = string;
register unsigned char c;
@@ -127,7 +124,7 @@ fnmatch (pattern, string, flags)
case '[':
{
/* Nonzero if the sense of the character class is inverted. */
- register int not;
+ register int negate;
if (*n == '\0')
return FNM_NOMATCH;
@@ -136,8 +133,8 @@ fnmatch (pattern, string, flags)
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
return FNM_NOMATCH;
- not = (*p == '!' || *p == '^');
- if (not)
+ negate = (*p == '!' || *p == '^');
+ if (negate)
++p;
c = *p++;
@@ -180,7 +177,7 @@ fnmatch (pattern, string, flags)
if (c == ']')
break;
}
- if (!not)
+ if (!negate)
return FNM_NOMATCH;
break;
@@ -197,7 +194,7 @@ fnmatch (pattern, string, flags)
/* XXX 1003.2d11 is unclear if this is right. */
++p;
}
- if (not)
+ if (negate)
return FNM_NOMATCH;
}
break;
diff --git a/contrib/binutils/libiberty/functions.texi b/contrib/binutils/libiberty/functions.texi
index aac4424fd8f2..fa92d702d79e 100644
--- a/contrib/binutils/libiberty/functions.texi
+++ b/contrib/binutils/libiberty/functions.texi
@@ -3,7 +3,7 @@
@c Edit the *.c files, configure with --enable-maintainer-mode,
@c and let gather-docs build you a new copy.
-@c safe-ctype.c:24
+@c safe-ctype.c:25
@defvr Extension HOST_CHARSET
This macro indicates the basic character set and encoding used by the
host: more precisely, the encoding used for character constants in
@@ -43,7 +43,7 @@ the possibility of a GCC built-in function.
@end deftypefn
-@c asprintf.c:33
+@c asprintf.c:32
@deftypefn Extension int asprintf (char **@var{resptr}, const char *@var{format}, ...)
Like @code{sprintf}, but instead of passing a pointer to a buffer, you
@@ -104,7 +104,7 @@ is respectively less than, matching, or greater than the array member.
@end deftypefn
-@c argv.c:139
+@c argv.c:124
@deftypefn Extension char** buildargv (char *@var{sp})
Given a pointer to a string, parse the string extracting fields
@@ -158,7 +158,7 @@ not recommended.
@end deftypefn
-@c make-temp-file.c:88
+@c make-temp-file.c:87
@deftypefn Replacement char* choose_tmpdir ()
Returns a pointer to a directory path suitable for creating temporary
@@ -185,7 +185,7 @@ pointer encountered. Pointers to empty strings are ignored.
@end deftypefn
-@c argv.c:65
+@c argv.c:52
@deftypefn Extension char** dupargv (char **@var{vector})
Duplicate an argument vector. Simply scans through @var{vector},
@@ -196,7 +196,7 @@ argument vector.
@end deftypefn
-@c strerror.c:566
+@c strerror.c:567
@deftypefn Extension int errno_max (void)
Returns the maximum @code{errno} value for which a corresponding
@@ -214,6 +214,26 @@ symbolic name or message.
@end deftypefn
+@c argv.c:293
+@deftypefn Extension void expandargv (int *@var{argcp}, char ***@var{argvp})
+
+The @var{argcp} and @code{argvp} arguments are pointers to the usual
+@code{argc} and @code{argv} arguments to @code{main}. This function
+looks for arguments that begin with the character @samp{@@}. Any such
+arguments are interpreted as ``response files''. The contents of the
+response file are interpreted as additional command line options. In
+particular, the file is separated into whitespace-separated strings;
+each such string is taken as a command-line option. The new options
+are inserted in place of the option naming the response file, and
+@code{*argcp} and @code{*argvp} will be updated. If the value of
+@code{*argvp} is modified by this function, then the new value has
+been dynamically allocated and can be deallocated by the caller with
+@code{freeargv}. However, most callers will simply call
+@code{expandargv} near the beginning of @code{main} and allow the
+operating system to free the memory when the program exits.
+
+@end deftypefn
+
@c fdmatch.c:23
@deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2})
@@ -229,6 +249,16 @@ and inode numbers.
@end deftypefn
+@c fopen_unlocked.c:48
+@deftypefn Extension {FILE *} fdopen_unlocked (int @var{fildes}, const char * @var{mode})
+
+Opens and returns a @code{FILE} pointer via @code{fdopen}. If the
+operating system supports it, ensure that the stream is setup to avoid
+any multi-threaded locking. Otherwise return the @code{FILE} pointer
+unchanged.
+
+@end deftypefn
+
@c ffs.c:3
@deftypefn Supplemental int ffs (int @var{valu})
@@ -288,7 +318,17 @@ Ignores case when performing the comparison.
@end deftypefn
-@c argv.c:111
+@c fopen_unlocked.c:39
+@deftypefn Extension {FILE *} fopen_unlocked (const char *@var{path}, const char * @var{mode})
+
+Opens and returns a @code{FILE} pointer via @code{fopen}. If the
+operating system supports it, ensure that the stream is setup to avoid
+any multi-threaded locking. Otherwise return the @code{FILE} pointer
+unchanged.
+
+@end deftypefn
+
+@c argv.c:97
@deftypefn Extension void freeargv (char **@var{vector})
Free an argument vector that was built using @code{buildargv}. Simply
@@ -298,6 +338,16 @@ itself.
@end deftypefn
+@c fopen_unlocked.c:57
+@deftypefn Extension {FILE *} freopen_unlocked (const char * @var{path}, const char * @var{mode}, FILE * @var{stream})
+
+Opens and returns a @code{FILE} pointer via @code{freopen}. If the
+operating system supports it, ensure that the stream is setup to avoid
+any multi-threaded locking. Otherwise return the @code{FILE} pointer
+unchanged.
+
+@end deftypefn
+
@c getruntime.c:82
@deftypefn Replacement long get_run_time (void)
@@ -339,7 +389,15 @@ between calls to @code{getpwd}.
@end deftypefn
-@c hex.c:30
+@c gettimeofday.c:12
+@deftypefn Supplemental int gettimeofday (struct timeval *@var{tp}, void *@var{tz})
+
+Writes the current time to @var{tp}. This implementation requires
+that @var{tz} be NULL. Returns 0 on success, -1 on failure.
+
+@end deftypefn
+
+@c hex.c:33
@deftypefn Extension void hex_init (void)
Initializes the array mapping the current character set to
@@ -349,7 +407,7 @@ default ASCII-based table will normally be used on ASCII systems.
@end deftypefn
-@c hex.c:39
+@c hex.c:42
@deftypefn Extension int hex_p (int @var{c})
Evaluates to non-zero if the given character is a valid hex character,
@@ -358,8 +416,8 @@ or zero if it is not. Note that the value you pass will be cast to
@end deftypefn
-@c hex.c:47
-@deftypefn Extension unsigned int hex_value (int @var{c})
+@c hex.c:50
+@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
@@ -404,7 +462,7 @@ struct qelem @{
@end deftypefn
-@c safe-ctype.c:45
+@c safe-ctype.c:46
@deffn Extension ISALPHA (@var{c})
@deffnx Extension ISALNUM (@var{c})
@deffnx Extension ISBLANK (@var{c})
@@ -454,7 +512,7 @@ false for characters with numeric values from 128 to 255.
@end itemize
@end deffn
-@c safe-ctype.c:94
+@c safe-ctype.c:95
@deffn Extension ISIDNUM (@var{c})
@deffnx Extension ISIDST (@var{c})
@deffnx Extension IS_VSPACE (@var{c})
@@ -527,7 +585,7 @@ relative prefix can be found, return @code{NULL}.
@end deftypefn
-@c make-temp-file.c:138
+@c make-temp-file.c:137
@deftypefn Replacement char* make_temp_file (const char *@var{suffix})
Return a temporary file name (as a string) or @code{NULL} if unable to
@@ -593,63 +651,289 @@ Sets the first @var{count} bytes of @var{s} to the constant byte
@end deftypefn
@c mkstemps.c:54
-@deftypefn Replacement int mkstemps (char *@var{template}, int @var{suffix_len})
+@deftypefn Replacement int mkstemps (char *@var{pattern}, int @var{suffix_len})
-Generate a unique temporary file name from @var{template}.
-@var{template} has the form:
+Generate a unique temporary file name from @var{pattern}.
+@var{pattern} has the form:
@example
@var{path}/ccXXXXXX@var{suffix}
@end example
@var{suffix_len} tells us how long @var{suffix} is (it can be zero
-length). The last six characters of @var{template} before @var{suffix}
+length). The last six characters of @var{pattern} before @var{suffix}
must be @samp{XXXXXX}; they are replaced with a string that makes the
filename unique. Returns a file descriptor open on the file for
reading and writing.
@end deftypefn
-@c pexecute.txh:1
-@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:231
+@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
+@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}.
+@var{count} is the number of results expected. The results will be
+placed into @var{vector}. The results are in the order of the calls
+to @code{pex_run}. Returns 0 on error, 1 on success.
+
+@end deftypefn
+
+@c pexecute.txh:215
+@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
+@var{obj}. @var{count} is the number of results expected. The
+results will be placed into @var{vector}. The results are in the
+order of the calls to @code{pex_run}. Returns 0 on error, 1 on
+success.
-Executes a program.
+@code{struct pex_time} has the following fields of the type
+@code{unsigned long}: @code{user_seconds},
+@code{user_microseconds}, @code{system_seconds},
+@code{system_microseconds}. On systems which do not support reporting
+process times, all the fields will be set to @code{0}.
-@var{program} and @var{argv} are the arguments to
-@code{execv}/@code{execvp}.
+@end deftypefn
+
+@c pexecute.txh:2
+@deftypefn Extension {struct pex_obj *} pex_init (int @var{flags}, const char *@var{pname}, const char *@var{tempbase})
+
+Prepare to execute one or more programs, with standard output of each
+program fed to standard input of the next. This is a system
+independent interface to execute a pipeline.
+
+@var{flags} is a bitwise combination of the following:
+
+@table @code
+
+@vindex PEX_RECORD_TIMES
+@item PEX_RECORD_TIMES
+Record subprocess times if possible.
+
+@vindex PEX_USE_PIPES
+@item PEX_USE_PIPES
+Use pipes for communication between processes, if possible.
+
+@vindex PEX_SAVE_TEMPS
+@item PEX_SAVE_TEMPS
+Don't delete temporary files used for communication between
+processes.
+
+@end table
+
+@var{pname} is the name of program to be executed, used in error
+messages. @var{tempbase} is a base name to use for any required
+temporary files; it may be @code{NULL} to use a randomly chosen name.
+
+@end deftypefn
+
+@c pexecute.txh:133
+@deftypefn Extension {FILE *} pex_input_file (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{in_name})
-@var{this_pname} is name of the calling program (i.e., @code{argv[0]}).
+Return a stream for a temporary file to pass to the first program in
+the pipeline as input.
-@var{temp_base} is the path name, sans suffix, of a temporary file to
-use if needed. This is currently only needed for MS-DOS ports that
-don't use @code{go32} (do any still exist?). Ports that don't need it
-can pass @code{NULL}.
+The name of the input file is chosen according to the same rules
+@code{pex_run} uses to choose output file names, based on
+@var{in_name}, @var{obj} and the @code{PEX_SUFFIX} bit in @var{flags}.
-(@code{@var{flags} & PEXECUTE_SEARCH}) is non-zero if @env{PATH}
-should be searched (??? It's not clear that GCC passes this flag
-correctly). (@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the
-first process in chain. (@code{@var{flags} & PEXECUTE_FIRST}) is
-nonzero for the last process in chain. The first/last flags could be
-simplified to only mark the last of a chain of processes but that
-requires the caller to always mark the last one (and not give up
-early if some error occurs). It's more robust to require the caller
-to mark both ends of the chain.
+Don't call @code{fclose} on the returned stream; the first call to
+@code{pex_run} closes it automatically.
-The result is the pid on systems like Unix where we
-@code{fork}/@code{exec} and on systems like WIN32 and OS/2 where we
-use @code{spawn}. It is up to the caller to wait for the child.
+If @var{flags} includes @code{PEX_BINARY_OUTPUT}, open the stream in
+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
+@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
+the first program in the pipeline; @var{fp} is opened for writing.
+You must have passed @code{PEX_USE_PIPES} to the @code{pex_init} call
+that returned @var{obj}.
+
+You must close @var{fp} using @code{fclose} yourself when you have
+finished writing data to the pipeline.
-The result is the @code{WEXITSTATUS} on systems like MS-DOS where we
-@code{spawn} and wait for the child here.
+The file descriptor underlying @var{fp} is marked not to be inherited
+by child processes.
-Upon failure, @var{errmsg_fmt} and @var{errmsg_arg} are set to the
-text of the error message with an optional argument (if not needed,
-@var{errmsg_arg} is set to @code{NULL}), and @minus{}1 is returned.
-@code{errno} is available to the caller to use.
+On systems that do not support pipes, this function returns
+@code{NULL}, and sets @code{errno} to @code{EINVAL}. If you would
+like to write code that is portable to all systems the @code{pex}
+functions support, consider using @code{pex_input_file} instead.
+
+There are two opportunities for deadlock using
+@code{pex_input_pipe}:
+
+@itemize @bullet
+@item
+Most systems' pipes can buffer only a fixed amount of data; a process
+that writes to a full pipe blocks. Thus, if you write to @file{fp}
+before starting the first process, you run the risk of blocking when
+there is no child process yet to read the data and allow you to
+continue. @code{pex_input_pipe} makes no promises about the
+size of the pipe's buffer, so if you need to write any data at all
+before starting the first process in the pipeline, consider using
+@code{pex_input_file} instead.
+
+@item
+Using @code{pex_input_pipe} and @code{pex_read_output} together
+may also cause 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 @var{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.
+
+@end itemize
@end deftypefn
-@c strsignal.c:547
+@c pexecute.txh:237
+@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
+single program. The return value and most of the parameters are as
+for a call to @code{pex_run}. @var{flags} is restricted to a
+combination of @code{PEX_SEARCH}, @code{PEX_STDERR_TO_STDOUT}, and
+@code{PEX_BINARY_OUTPUT}. @var{outname} is interpreted as if
+@code{PEX_LAST} were set. On a successful return, @code{*@var{status}} will
+be set to the exit status of the program.
+
+@end deftypefn
+
+@c pexecute.txh:194
+@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
+output 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:33
+@deftypefn Extension {const char *} pex_run (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{outname}, const char *@var{errname}, int *@var{err})
+
+Execute one program in a pipeline. On success this returns
+@code{NULL}. On failure it returns an error message, a statically
+allocated string.
+
+@var{obj} is returned by a previous call to @code{pex_init}.
+
+@var{flags} is a bitwise combination of the following:
+
+@table @code
+
+@vindex PEX_LAST
+@item PEX_LAST
+This must be set on the last program in the pipeline. In particular,
+it should be set when executing a single program. The standard output
+of the program will be sent to @var{outname}, or, if @var{outname} is
+@code{NULL}, to the standard output of the calling program. Do @emph{not}
+set this bit if you want to call @code{pex_read_output}
+(described below). After a call to @code{pex_run} with this bit set,
+@var{pex_run} may no longer be called with the same @var{obj}.
+
+@vindex PEX_SEARCH
+@item PEX_SEARCH
+Search for the program using the user's executable search path.
+
+@vindex PEX_SUFFIX
+@item PEX_SUFFIX
+@var{outname} is a suffix. See the description of @var{outname},
+below.
+
+@vindex PEX_STDERR_TO_STDOUT
+@item PEX_STDERR_TO_STDOUT
+Send the program's standard error to standard output, if possible.
+
+@vindex PEX_BINARY_INPUT
+@vindex PEX_BINARY_OUTPUT
+@item PEX_BINARY_INPUT
+@itemx PEX_BINARY_OUTPUT
+The standard input (output) 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}.
+@end table
+
+@var{executable} is the program to execute. @var{argv} is the set of
+arguments to pass to the program; normally @code{@var{argv}[0]} will
+be a copy of @var{executable}.
+
+@var{outname} is used to set the name of the file to use for standard
+output. There are two cases in which no output file will be used:
+
+@enumerate
+@item
+if @code{PEX_LAST} is not set in @var{flags}, and @code{PEX_USE_PIPES}
+was set in the call to @code{pex_init}, and the system supports pipes
+
+@item
+if @code{PEX_LAST} is set in @var{flags}, and @var{outname} is
+@code{NULL}
+@end enumerate
+
+@noindent
+Otherwise the code will use a file to hold standard
+output. If @code{PEX_LAST} is not set, this file is considered to be
+a temporary file, and it will be removed when no longer needed, unless
+@code{PEX_SAVE_TEMPS} was set in the call to @code{pex_init}.
+
+There are two cases to consider when setting the name of the file to
+hold standard output.
+
+@enumerate
+@item
+@code{PEX_SUFFIX} is set in @var{flags}. In this case
+@var{outname} may not be @code{NULL}. If the @var{tempbase} parameter
+to @code{pex_init} was not @code{NULL}, then the output file name is
+the concatenation of @var{tempbase} and @var{outname}. If
+@var{tempbase} was @code{NULL}, then the output file name is a random
+file name ending in @var{outname}.
+
+@item
+@code{PEX_SUFFIX} was not set in @var{flags}. In this
+case, if @var{outname} is not @code{NULL}, it is used as the output
+file name. If @var{outname} is @code{NULL}, and @var{tempbase} was
+not NULL, the output file name is randomly chosen using
+@var{tempbase}. Otherwise the output file name is chosen completely
+at random.
+@end enumerate
+
+@var{errname} is the file name to use for standard error output. If
+it is @code{NULL}, standard error is the same as the caller's.
+Otherwise, standard error is written to the named file.
+
+On an error return, the code sets @code{*@var{err}} to an @code{errno}
+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)
+
+This is the old interface to execute one or more programs. It is
+still supported for compatibility purposes, but is no longer
+documented.
+
+@end deftypefn
+
+@c strsignal.c:539
@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
Print @var{message} to the standard error, followed by a colon,
@@ -668,23 +952,10 @@ name is unset/removed.
@end deftypefn
-@c pexecute.txh:39
+@c pexecute.txh:257
@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
-Waits for a program started by @code{pexecute} to finish.
-
-@var{pid} is the process id of the task to wait for. @var{status} is
-the `status' argument to wait. @var{flags} is currently unused
-(allows future enhancement without breaking upward compatibility).
-Pass 0 for now.
-
-The result is the pid of the child reaped, or -1 for failure
-(@code{errno} says why).
-
-On systems that don't support waiting for a particular child,
-@var{pid} is ignored. On systems like MS-DOS that don't really
-multitask @code{pwait} is just a mechanism to provide a consistent
-interface for the caller.
+Another part of the old execution interface.
@end deftypefn
@@ -703,7 +974,7 @@ control over the state of the random number generator.
@end deftypefn
-@c concat.c:177
+@c concat.c:173
@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @dots{}, @code{NULL})
Same as @code{concat}, except that if @var{optr} is not @code{NULL} it
@@ -746,7 +1017,7 @@ environment. This implementation is not safe for multithreaded code.
@end deftypefn
-@c strsignal.c:353
+@c strsignal.c:348
@deftypefn Extension int signo_max (void)
Returns the maximum signal value for which a corresponding symbolic
@@ -857,7 +1128,7 @@ valid until the next call to @code{strerrno}.
@end deftypefn
-@c strerror.c:602
+@c strerror.c:603
@deftypefn Supplemental char* strerror (int @var{errnoval})
Maps an @code{errno} number to an error message string, the contents
@@ -893,6 +1164,15 @@ Compares the first @var{n} bytes of two strings, returning a value as
@end deftypefn
+@c strndup.c:23
+@deftypefn Extension char* strndup (const char *@var{s}, size_t @var{n})
+
+Returns a pointer to a copy of @var{s} with at most @var{n} characters
+in memory obtained from @code{malloc}, or @code{NULL} if insufficient
+memory was available. The result is always NUL terminated.
+
+@end deftypefn
+
@c strrchr.c:6
@deftypefn Supplemental char* strrchr (const char *@var{s}, int @var{c})
@@ -902,7 +1182,7 @@ null character, the results are undefined.
@end deftypefn
-@c strsignal.c:388
+@c strsignal.c:383
@deftypefn Supplemental {const char *} strsignal (int @var{signo})
Maps an signal number to an signal message string, the contents of
@@ -923,7 +1203,7 @@ call to @code{strsignal}.
@end deftypefn
-@c strsignal.c:452
+@c strsignal.c:446
@deftypefn Extension {const char*} strsigno (int @var{signo})
Given an signal number, returns a pointer to a string containing the
@@ -965,7 +1245,7 @@ the location referenced by @var{endptr}.
@end deftypefn
-@c strerror.c:730
+@c strerror.c:729
@deftypefn Extension int strtoerrno (const char *@var{name})
Given the symbolic name of a error number (e.g., @code{EACCES}), map it
@@ -989,7 +1269,7 @@ that the converted value is unsigned.
@end deftypefn
-@c strsignal.c:507
+@c strsignal.c:500
@deftypefn Extension int strtosigno (const char *@var{name})
Given the symbolic name of a signal, map it to a signal number. If no
@@ -997,6 +1277,53 @@ translation is found, returns 0.
@end deftypefn
+@c strverscmp.c:25
+@deftypefun int strverscmp (const char *@var{s1}, const char *@var{s2})
+The @code{strverscmp} function compares the string @var{s1} against
+@var{s2}, considering them as holding indices/version numbers. Return
+value follows the same conventions as found in the @code{strverscmp}
+function. In fact, if @var{s1} and @var{s2} contain no digits,
+@code{strverscmp} behaves like @code{strcmp}.
+
+Basically, we compare strings normally (character by character), until
+we find a digit in each string - then we enter a special comparison
+mode, where each sequence of digits is taken as a whole. If we reach the
+end of these two parts without noticing a difference, we return to the
+standard comparison mode. There are two types of numeric parts:
+"integral" and "fractional" (those begin with a '0'). The types
+of the numeric parts affect the way we sort them:
+
+@itemize @bullet
+@item
+integral/integral: we compare values as you would expect.
+
+@item
+fractional/integral: the fractional part is less than the integral one.
+Again, no surprise.
+
+@item
+fractional/fractional: the things become a bit more complex.
+If the common prefix contains only leading zeroes, the longest part is less
+than the other one; else the comparison behaves normally.
+@end itemize
+
+@smallexample
+strverscmp ("no digit", "no digit")
+ @result{} 0 // @r{same behavior as strcmp.}
+strverscmp ("item#99", "item#100")
+ @result{} <0 // @r{same prefix, but 99 < 100.}
+strverscmp ("alpha1", "alpha001")
+ @result{} >0 // @r{fractional part inferior to integral one.}
+strverscmp ("part1_f012", "part1_f01")
+ @result{} >0 // @r{two fractional parts.}
+strverscmp ("foo.009", "foo.0")
+ @result{} <0 // @r{idem, but with leading zeroes only.}
+@end smallexample
+
+This function is especially useful when dealing with filename sorting,
+because filenames frequently hold indices/version numbers.
+@end deftypefun
+
@c tmpnam.c:3
@deftypefn Supplemental char* tmpnam (char *@var{s})
@@ -1008,7 +1335,35 @@ not be used in new projects. Use @code{mkstemp} instead.
@end deftypefn
-@c vasprintf.c:48
+@c unlink-if-ordinary.c:27
+@deftypefn Supplemental int unlink_if_ordinary (const char*)
+
+Unlinks the named file, unless it is special (e.g. a device file).
+Returns 0 when the file was unlinked, a negative value (and errno set) when
+there was an error deleting the file, and a positive value if no attempt
+was made to unlink the file because it is special.
+
+@end deftypefn
+
+@c fopen_unlocked.c:31
+@deftypefn Extension void unlock_std_streams (void)
+
+If the OS supports it, ensure that the standard I/O streams,
+@code{stdin}, @code{stdout} and @code{stderr} are setup to avoid any
+multi-threaded locking. Otherwise do nothing.
+
+@end deftypefn
+
+@c fopen_unlocked.c:23
+@deftypefn Extension void unlock_stream (FILE * @var{stream})
+
+If the OS supports it, ensure that the supplied stream is setup to
+avoid any multi-threaded locking. Otherwise leave the @code{FILE}
+pointer unchanged. If the @var{stream} is @code{NULL} do nothing.
+
+@end deftypefn
+
+@c vasprintf.c:47
@deftypefn Extension int vasprintf (char **@var{resptr}, const char *@var{format}, va_list @var{args})
Like @code{vsprintf}, but instead of passing a pointer to a buffer,
@@ -1153,4 +1508,13 @@ will never return a @code{NULL} pointer.
@end deftypefn
+@c xstrndup.c:23
+@deftypefn Replacement char* xstrndup (const char *@var{s}, size_t @var{n})
+
+Returns a pointer to a copy of @var{s} with at most @var{n} characters
+without fail, using @code{xmalloc} to obtain memory. The result is
+always NUL terminated.
+
+@end deftypefn
+
diff --git a/contrib/binutils/libiberty/gather-docs b/contrib/binutils/libiberty/gather-docs
index b272c02ef2a9..be4dbbfc1e2a 100644
--- a/contrib/binutils/libiberty/gather-docs
+++ b/contrib/binutils/libiberty/gather-docs
@@ -17,8 +17,8 @@
#
# You should have received a copy of the GNU Library General Public
# License along with libiberty; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+# Boston, MA 02110-1301, USA.
#
# Originally written by DJ Delorie <dj@redhat.com>
diff --git a/contrib/binutils/libiberty/getcwd.c b/contrib/binutils/libiberty/getcwd.c
index a19d26796d57..28f26eb179ff 100644
--- a/contrib/binutils/libiberty/getcwd.c
+++ b/contrib/binutils/libiberty/getcwd.c
@@ -38,9 +38,7 @@ extern int errno;
#endif
char *
-getcwd (buf, len)
- char *buf;
- size_t len;
+getcwd (char *buf, size_t len)
{
char ourbuf[MAXPATHLEN];
char *result;
diff --git a/contrib/binutils/libiberty/getpagesize.c b/contrib/binutils/libiberty/getpagesize.c
index eed9680378a7..1c3a26304eae 100644
--- a/contrib/binutils/libiberty/getpagesize.c
+++ b/contrib/binutils/libiberty/getpagesize.c
@@ -61,7 +61,7 @@ BUGS
#endif /* GNU_OUR_PAGESIZE */
int
-getpagesize ()
+getpagesize (void)
{
return (GNU_OUR_PAGESIZE);
}
@@ -76,7 +76,7 @@ getpagesize ()
#endif
extern unsigned long lib$getsyi(const unsigned short *,...);
-int getpagesize ()
+int getpagesize (void)
{
long pagsiz = 0L;
unsigned short itmcod = SYI$_PAGE_SIZE;
diff --git a/contrib/binutils/libiberty/getpwd.c b/contrib/binutils/libiberty/getpwd.c
index 31c7d20f307c..fa5c132fd6b6 100644
--- a/contrib/binutils/libiberty/getpwd.c
+++ b/contrib/binutils/libiberty/getpwd.c
@@ -39,10 +39,6 @@ extern int errno;
#include <limits.h>
#endif
-/* Prototype these in case the system headers don't provide them. */
-extern char *getpwd ();
-extern char *getwd ();
-
#include "libiberty.h"
/* Virtually every UN*X system now in common use (except for pre-4.3-tahoe
@@ -50,6 +46,8 @@ extern char *getwd ();
the few exceptions to the general rule here. */
#if !defined(HAVE_GETCWD) && defined(HAVE_GETWD)
+/* Prototype in case the system headers doesn't provide it. */
+extern char *getwd ();
#define getcwd(buf,len) getwd(buf)
#endif
@@ -67,7 +65,7 @@ extern char *getwd ();
yield 0 and set errno. */
char *
-getpwd ()
+getpwd (void)
{
static char *pwd;
static int failure_errno;
@@ -86,7 +84,7 @@ getpwd ()
&& dotstat.st_dev == pwdstat.st_dev))
/* The shortcut didn't work. Try the slow, ``sure'' way. */
- for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2)
+ for (s = GUESSPATHLEN; !getcwd (p = XNEWVEC (char, s), s); s *= 2)
{
int e = errno;
free (p);
@@ -114,12 +112,12 @@ getpwd ()
#endif
char *
-getpwd ()
+getpwd (void)
{
static char *pwd = 0;
if (!pwd)
- pwd = getcwd (xmalloc (MAXPATHLEN + 1), MAXPATHLEN + 1
+ pwd = getcwd (XNEWVEC (char, MAXPATHLEN + 1), MAXPATHLEN + 1
#ifdef VMS
, 0
#endif
diff --git a/contrib/binutils/libiberty/getruntime.c b/contrib/binutils/libiberty/getruntime.c
index 3f7dc0d117a7..82f3d2e41858 100644
--- a/contrib/binutils/libiberty/getruntime.c
+++ b/contrib/binutils/libiberty/getruntime.c
@@ -14,8 +14,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#include "config.h"
@@ -90,7 +90,7 @@ process started.
*/
long
-get_run_time ()
+get_run_time (void)
{
#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
struct rusage rusage;
diff --git a/contrib/binutils/libiberty/hashtab.c b/contrib/binutils/libiberty/hashtab.c
index 231fbc0dd7ad..a5671a0a7680 100644
--- a/contrib/binutils/libiberty/hashtab.c
+++ b/contrib/binutils/libiberty/hashtab.c
@@ -1,5 +1,6 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This file is part of the libiberty library.
@@ -15,8 +16,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* This package implements basic hash table functionality. It is possible
to search for an entry, create an entry and destroy an entry.
@@ -40,34 +41,37 @@ Boston, MA 02111-1307, USA. */
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
-
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
#include <stdio.h>
#include "libiberty.h"
+#include "ansidecl.h"
#include "hashtab.h"
-/* This macro defines reserved value for empty table entry. */
-
-#define EMPTY_ENTRY ((PTR) 0)
-
-/* This macro defines reserved value for table entry which contained
- a deleted element. */
-
-#define DELETED_ENTRY ((PTR) 1)
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
-static unsigned long higher_prime_number PARAMS ((unsigned long));
-static hashval_t hash_pointer PARAMS ((const void *));
-static int eq_pointer PARAMS ((const void *, const void *));
-static int htab_expand PARAMS ((htab_t));
-static PTR *find_empty_slot_for_expand PARAMS ((htab_t, hashval_t));
+static unsigned int higher_prime_index (unsigned long);
+static hashval_t htab_mod_1 (hashval_t, hashval_t, hashval_t, int);
+static hashval_t htab_mod (hashval_t, htab_t);
+static hashval_t htab_mod_m2 (hashval_t, htab_t);
+static hashval_t hash_pointer (const void *);
+static int eq_pointer (const void *, const void *);
+static int htab_expand (htab_t);
+static PTR *find_empty_slot_for_expand (htab_t, hashval_t);
/* At some point, we could make these be NULL, and modify the
hash-table routines to handle NULL specially; that would avoid
@@ -75,76 +79,122 @@ static PTR *find_empty_slot_for_expand PARAMS ((htab_t, hashval_t));
htab_hash htab_hash_pointer = hash_pointer;
htab_eq htab_eq_pointer = eq_pointer;
-/* The following function returns a nearest prime number which is
- greater than N, and near a power of two. */
-
-static unsigned long
-higher_prime_number (n)
- unsigned long n;
-{
- /* These are primes that are near, but slightly smaller than, a
- power of two. */
- static const unsigned long primes[] = {
- (unsigned long) 7,
- (unsigned long) 13,
- (unsigned long) 31,
- (unsigned long) 61,
- (unsigned long) 127,
- (unsigned long) 251,
- (unsigned long) 509,
- (unsigned long) 1021,
- (unsigned long) 2039,
- (unsigned long) 4093,
- (unsigned long) 8191,
- (unsigned long) 16381,
- (unsigned long) 32749,
- (unsigned long) 65521,
- (unsigned long) 131071,
- (unsigned long) 262139,
- (unsigned long) 524287,
- (unsigned long) 1048573,
- (unsigned long) 2097143,
- (unsigned long) 4194301,
- (unsigned long) 8388593,
- (unsigned long) 16777213,
- (unsigned long) 33554393,
- (unsigned long) 67108859,
- (unsigned long) 134217689,
- (unsigned long) 268435399,
- (unsigned long) 536870909,
- (unsigned long) 1073741789,
- (unsigned long) 2147483647,
- /* 4294967291L */
- ((unsigned long) 2147483647) + ((unsigned long) 2147483644),
- };
-
- const unsigned long *low = &primes[0];
- const unsigned long *high = &primes[sizeof(primes) / sizeof(primes[0])];
+/* Table of primes and multiplicative inverses.
+
+ Note that these are not minimally reduced inverses. Unlike when generating
+ code to divide by a constant, we want to be able to use the same algorithm
+ all the time. All of these inverses (are implied to) have bit 32 set.
+
+ For the record, here's the function that computed the table; it's a
+ vastly simplified version of the function of the same name from gcc. */
+
+#if 0
+unsigned int
+ceil_log2 (unsigned int x)
+{
+ int i;
+ for (i = 31; i >= 0 ; --i)
+ if (x > (1u << i))
+ return i+1;
+ abort ();
+}
+
+unsigned int
+choose_multiplier (unsigned int d, unsigned int *mlp, unsigned char *shiftp)
+{
+ unsigned long long mhigh;
+ double nx;
+ int lgup, post_shift;
+ int pow, pow2;
+ int n = 32, precision = 32;
+
+ lgup = ceil_log2 (d);
+ pow = n + lgup;
+ pow2 = n + lgup - precision;
+
+ nx = ldexp (1.0, pow) + ldexp (1.0, pow2);
+ mhigh = nx / d;
+
+ *shiftp = lgup - 1;
+ *mlp = mhigh;
+ return mhigh >> 32;
+}
+#endif
+
+struct prime_ent
+{
+ hashval_t prime;
+ hashval_t inv;
+ hashval_t inv_m2; /* inverse of prime-2 */
+ hashval_t shift;
+};
+
+static struct prime_ent const prime_tab[] = {
+ { 7, 0x24924925, 0x9999999b, 2 },
+ { 13, 0x3b13b13c, 0x745d1747, 3 },
+ { 31, 0x08421085, 0x1a7b9612, 4 },
+ { 61, 0x0c9714fc, 0x15b1e5f8, 5 },
+ { 127, 0x02040811, 0x0624dd30, 6 },
+ { 251, 0x05197f7e, 0x073260a5, 7 },
+ { 509, 0x01824366, 0x02864fc8, 8 },
+ { 1021, 0x00c0906d, 0x014191f7, 9 },
+ { 2039, 0x0121456f, 0x0161e69e, 10 },
+ { 4093, 0x00300902, 0x00501908, 11 },
+ { 8191, 0x00080041, 0x00180241, 12 },
+ { 16381, 0x000c0091, 0x00140191, 13 },
+ { 32749, 0x002605a5, 0x002a06e6, 14 },
+ { 65521, 0x000f00e2, 0x00110122, 15 },
+ { 131071, 0x00008001, 0x00018003, 16 },
+ { 262139, 0x00014002, 0x0001c004, 17 },
+ { 524287, 0x00002001, 0x00006001, 18 },
+ { 1048573, 0x00003001, 0x00005001, 19 },
+ { 2097143, 0x00004801, 0x00005801, 20 },
+ { 4194301, 0x00000c01, 0x00001401, 21 },
+ { 8388593, 0x00001e01, 0x00002201, 22 },
+ { 16777213, 0x00000301, 0x00000501, 23 },
+ { 33554393, 0x00001381, 0x00001481, 24 },
+ { 67108859, 0x00000141, 0x000001c1, 25 },
+ { 134217689, 0x000004e1, 0x00000521, 26 },
+ { 268435399, 0x00000391, 0x000003b1, 27 },
+ { 536870909, 0x00000019, 0x00000029, 28 },
+ { 1073741789, 0x0000008d, 0x00000095, 29 },
+ { 2147483647, 0x00000003, 0x00000007, 30 },
+ /* Avoid "decimal constant so large it is unsigned" for 4294967291. */
+ { 0xfffffffb, 0x00000006, 0x00000008, 31 }
+};
+
+/* The following function returns an index into the above table of the
+ nearest prime number which is greater than N, and near a power of two. */
+
+static unsigned int
+higher_prime_index (unsigned long n)
+{
+ unsigned int low = 0;
+ unsigned int high = sizeof(prime_tab) / sizeof(prime_tab[0]);
while (low != high)
{
- const unsigned long *mid = low + (high - low) / 2;
- if (n > *mid)
+ unsigned int mid = low + (high - low) / 2;
+ if (n > prime_tab[mid].prime)
low = mid + 1;
else
high = mid;
}
/* If we've run out of primes, abort. */
- if (n > *low)
+ if (n > prime_tab[low].prime)
{
fprintf (stderr, "Cannot find prime bigger than %lu\n", n);
abort ();
}
- return *low;
+ return low;
}
/* Returns a hash code for P. */
static hashval_t
-hash_pointer (p)
- const PTR p;
+hash_pointer (const PTR p)
{
return (hashval_t) ((long)p >> 3);
}
@@ -152,30 +202,98 @@ hash_pointer (p)
/* Returns non-zero if P1 and P2 are equal. */
static int
-eq_pointer (p1, p2)
- const PTR p1;
- const PTR p2;
+eq_pointer (const PTR p1, const PTR p2)
{
return p1 == p2;
}
+
+/* The parens around the function names in the next two definitions
+ are essential in order to prevent macro expansions of the name.
+ The bodies, however, are expanded as expected, so they are not
+ recursive definitions. */
+
+/* Return the current size of given hash table. */
+
+#define htab_size(htab) ((htab)->size)
+
+size_t
+(htab_size) (htab_t htab)
+{
+ return htab_size (htab);
+}
+
+/* Return the current number of elements in given hash table. */
+
+#define htab_elements(htab) ((htab)->n_elements - (htab)->n_deleted)
+
+size_t
+(htab_elements) (htab_t htab)
+{
+ return htab_elements (htab);
+}
+
+/* Return X % Y. */
+
+static inline hashval_t
+htab_mod_1 (hashval_t x, hashval_t y, hashval_t inv, int shift)
+{
+ /* The multiplicative inverses computed above are for 32-bit types, and
+ requires that we be able to compute a highpart multiply. */
+#ifdef UNSIGNED_64BIT_TYPE
+ __extension__ typedef UNSIGNED_64BIT_TYPE ull;
+ if (sizeof (hashval_t) * CHAR_BIT <= 32)
+ {
+ hashval_t t1, t2, t3, t4, q, r;
+
+ t1 = ((ull)x * inv) >> 32;
+ t2 = x - t1;
+ t3 = t2 >> 1;
+ t4 = t1 + t3;
+ q = t4 >> shift;
+ r = x - (q * y);
+
+ return r;
+ }
+#endif
+
+ /* Otherwise just use the native division routines. */
+ return x % y;
+}
+
+/* Compute the primary hash for HASH given HTAB's current size. */
+
+static inline hashval_t
+htab_mod (hashval_t hash, htab_t htab)
+{
+ const struct prime_ent *p = &prime_tab[htab->size_prime_index];
+ return htab_mod_1 (hash, p->prime, p->inv, p->shift);
+}
+
+/* Compute the secondary hash for HASH given HTAB's current size. */
+
+static inline hashval_t
+htab_mod_m2 (hashval_t hash, htab_t htab)
+{
+ const struct prime_ent *p = &prime_tab[htab->size_prime_index];
+ return 1 + htab_mod_1 (hash, p->prime - 2, p->inv_m2, p->shift);
+}
+
/* This function creates table with length slightly longer than given
source length. Created hash table is initiated as empty (all the
- hash table entries are EMPTY_ENTRY). The function returns the
+ hash table entries are HTAB_EMPTY_ENTRY). The function returns the
created hash table, or NULL if memory allocation fails. */
htab_t
-htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
- size_t size;
- htab_hash hash_f;
- htab_eq eq_f;
- htab_del del_f;
- htab_alloc alloc_f;
- htab_free free_f;
+htab_create_alloc (size_t size, htab_hash hash_f, htab_eq eq_f,
+ htab_del del_f, htab_alloc alloc_f, htab_free free_f)
{
htab_t result;
+ unsigned int size_prime_index;
+
+ size_prime_index = higher_prime_index (size);
+ size = prime_tab[size_prime_index].prime;
- size = higher_prime_number (size);
result = (htab_t) (*alloc_f) (1, sizeof (struct htab));
if (result == NULL)
return NULL;
@@ -187,6 +305,7 @@ htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
return NULL;
}
result->size = size;
+ result->size_prime_index = size_prime_index;
result->hash_f = hash_f;
result->eq_f = eq_f;
result->del_f = del_f;
@@ -199,19 +318,17 @@ htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
an extra argument. */
htab_t
-htab_create_alloc_ex (size, hash_f, eq_f, del_f, alloc_arg, alloc_f,
- free_f)
- size_t size;
- htab_hash hash_f;
- htab_eq eq_f;
- htab_del del_f;
- PTR alloc_arg;
- htab_alloc_with_arg alloc_f;
- htab_free_with_arg free_f;
+htab_create_alloc_ex (size_t size, htab_hash hash_f, htab_eq eq_f,
+ htab_del del_f, void *alloc_arg,
+ htab_alloc_with_arg alloc_f,
+ htab_free_with_arg free_f)
{
htab_t result;
+ unsigned int size_prime_index;
+
+ size_prime_index = higher_prime_index (size);
+ size = prime_tab[size_prime_index].prime;
- size = higher_prime_number (size);
result = (htab_t) (*alloc_f) (alloc_arg, 1, sizeof (struct htab));
if (result == NULL)
return NULL;
@@ -223,6 +340,7 @@ htab_create_alloc_ex (size, hash_f, eq_f, del_f, alloc_arg, alloc_f,
return NULL;
}
result->size = size;
+ result->size_prime_index = size_prime_index;
result->hash_f = hash_f;
result->eq_f = eq_f;
result->del_f = del_f;
@@ -235,14 +353,9 @@ htab_create_alloc_ex (size, hash_f, eq_f, del_f, alloc_arg, alloc_f,
/* Update the function pointers and allocation parameter in the htab_t. */
void
-htab_set_functions_ex (htab, hash_f, eq_f, del_f, alloc_arg, alloc_f, free_f)
- htab_t htab;
- htab_hash hash_f;
- htab_eq eq_f;
- htab_del del_f;
- PTR alloc_arg;
- htab_alloc_with_arg alloc_f;
- htab_free_with_arg free_f;
+htab_set_functions_ex (htab_t htab, htab_hash hash_f, htab_eq eq_f,
+ htab_del del_f, PTR alloc_arg,
+ htab_alloc_with_arg alloc_f, htab_free_with_arg free_f)
{
htab->hash_f = hash_f;
htab->eq_f = eq_f;
@@ -256,21 +369,13 @@ htab_set_functions_ex (htab, hash_f, eq_f, del_f, alloc_arg, alloc_f, free_f)
#undef htab_create
htab_t
-htab_create (size, hash_f, eq_f, del_f)
- size_t size;
- htab_hash hash_f;
- htab_eq eq_f;
- htab_del del_f;
+htab_create (size_t size, htab_hash hash_f, htab_eq eq_f, htab_del del_f)
{
return htab_create_alloc (size, hash_f, eq_f, del_f, xcalloc, free);
}
htab_t
-htab_try_create (size, hash_f, eq_f, del_f)
- size_t size;
- htab_hash hash_f;
- htab_eq eq_f;
- htab_del del_f;
+htab_try_create (size_t size, htab_hash hash_f, htab_eq eq_f, htab_del del_f)
{
return htab_create_alloc (size, hash_f, eq_f, del_f, calloc, free);
}
@@ -279,25 +384,25 @@ htab_try_create (size, hash_f, eq_f, del_f)
Naturally the hash table must already exist. */
void
-htab_delete (htab)
- htab_t htab;
+htab_delete (htab_t htab)
{
+ size_t size = htab_size (htab);
+ PTR *entries = htab->entries;
int i;
if (htab->del_f)
- for (i = htab->size - 1; i >= 0; i--)
- if (htab->entries[i] != EMPTY_ENTRY
- && htab->entries[i] != DELETED_ENTRY)
- (*htab->del_f) (htab->entries[i]);
+ for (i = size - 1; i >= 0; i--)
+ if (entries[i] != HTAB_EMPTY_ENTRY && entries[i] != HTAB_DELETED_ENTRY)
+ (*htab->del_f) (entries[i]);
if (htab->free_f != NULL)
{
- (*htab->free_f) (htab->entries);
+ (*htab->free_f) (entries);
(*htab->free_f) (htab);
}
else if (htab->free_with_arg_f != NULL)
{
- (*htab->free_with_arg_f) (htab->alloc_arg, htab->entries);
+ (*htab->free_with_arg_f) (htab->alloc_arg, entries);
(*htab->free_with_arg_f) (htab->alloc_arg, htab);
}
}
@@ -305,18 +410,18 @@ htab_delete (htab)
/* This function clears all entries in the given hash table. */
void
-htab_empty (htab)
- htab_t htab;
+htab_empty (htab_t htab)
{
+ size_t size = htab_size (htab);
+ PTR *entries = htab->entries;
int i;
if (htab->del_f)
- for (i = htab->size - 1; i >= 0; i--)
- if (htab->entries[i] != EMPTY_ENTRY
- && htab->entries[i] != DELETED_ENTRY)
- (*htab->del_f) (htab->entries[i]);
+ for (i = size - 1; i >= 0; i--)
+ if (entries[i] != HTAB_EMPTY_ENTRY && entries[i] != HTAB_DELETED_ENTRY)
+ (*htab->del_f) (entries[i]);
- memset (htab->entries, 0, htab->size * sizeof (PTR));
+ memset (entries, 0, size * sizeof (PTR));
}
/* Similar to htab_find_slot, but without several unwanted side effects:
@@ -327,21 +432,19 @@ htab_empty (htab)
HASH is the hash value for the element to be inserted. */
static PTR *
-find_empty_slot_for_expand (htab, hash)
- htab_t htab;
- hashval_t hash;
+find_empty_slot_for_expand (htab_t htab, hashval_t hash)
{
- size_t size = htab->size;
- unsigned int index = hash % size;
+ hashval_t index = htab_mod (hash, htab);
+ size_t size = htab_size (htab);
PTR *slot = htab->entries + index;
hashval_t hash2;
- if (*slot == EMPTY_ENTRY)
+ if (*slot == HTAB_EMPTY_ENTRY)
return slot;
- else if (*slot == DELETED_ENTRY)
+ else if (*slot == HTAB_DELETED_ENTRY)
abort ();
- hash2 = 1 + hash % (size - 2);
+ hash2 = htab_mod_m2 (hash, htab);
for (;;)
{
index += hash2;
@@ -349,9 +452,9 @@ find_empty_slot_for_expand (htab, hash)
index -= size;
slot = htab->entries + index;
- if (*slot == EMPTY_ENTRY)
+ if (*slot == HTAB_EMPTY_ENTRY)
return slot;
- else if (*slot == DELETED_ENTRY)
+ else if (*slot == HTAB_DELETED_ENTRY)
abort ();
}
}
@@ -365,26 +468,33 @@ find_empty_slot_for_expand (htab, hash)
expanded. If all goes well, it will return a non-zero value. */
static int
-htab_expand (htab)
- htab_t htab;
+htab_expand (htab_t htab)
{
PTR *oentries;
PTR *olimit;
PTR *p;
PTR *nentries;
- size_t nsize;
+ size_t nsize, osize, elts;
+ unsigned int oindex, nindex;
oentries = htab->entries;
- olimit = oentries + htab->size;
+ oindex = htab->size_prime_index;
+ osize = htab->size;
+ olimit = oentries + osize;
+ elts = htab_elements (htab);
/* Resize only when table after removal of unused elements is either
too full or too empty. */
- if ((htab->n_elements - htab->n_deleted) * 2 > htab->size
- || ((htab->n_elements - htab->n_deleted) * 8 < htab->size
- && htab->size > 32))
- nsize = higher_prime_number ((htab->n_elements - htab->n_deleted) * 2);
+ if (elts * 2 > osize || (elts * 8 < osize && osize > 32))
+ {
+ nindex = higher_prime_index (elts * 2);
+ nsize = prime_tab[nindex].prime;
+ }
else
- nsize = htab->size;
+ {
+ nindex = oindex;
+ nsize = osize;
+ }
if (htab->alloc_with_arg_f != NULL)
nentries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize,
@@ -395,7 +505,7 @@ htab_expand (htab)
return 0;
htab->entries = nentries;
htab->size = nsize;
-
+ htab->size_prime_index = nindex;
htab->n_elements -= htab->n_deleted;
htab->n_deleted = 0;
@@ -404,7 +514,7 @@ htab_expand (htab)
{
PTR x = *p;
- if (x != EMPTY_ENTRY && x != DELETED_ENTRY)
+ if (x != HTAB_EMPTY_ENTRY && x != HTAB_DELETED_ENTRY)
{
PTR *q = find_empty_slot_for_expand (htab, (*htab->hash_f) (x));
@@ -426,27 +536,22 @@ htab_expand (htab)
element. It cannot be used to insert or delete an element. */
PTR
-htab_find_with_hash (htab, element, hash)
- htab_t htab;
- const PTR element;
- hashval_t hash;
+htab_find_with_hash (htab_t htab, const PTR element, hashval_t hash)
{
- unsigned int index;
- hashval_t hash2;
+ hashval_t index, hash2;
size_t size;
PTR entry;
htab->searches++;
- size = htab->size;
- index = hash % size;
+ size = htab_size (htab);
+ index = htab_mod (hash, htab);
entry = htab->entries[index];
- if (entry == EMPTY_ENTRY
- || (entry != DELETED_ENTRY && (*htab->eq_f) (entry, element)))
+ if (entry == HTAB_EMPTY_ENTRY
+ || (entry != HTAB_DELETED_ENTRY && (*htab->eq_f) (entry, element)))
return entry;
- hash2 = 1 + hash % (size - 2);
-
+ hash2 = htab_mod_m2 (hash, htab);
for (;;)
{
htab->collisions++;
@@ -455,8 +560,8 @@ htab_find_with_hash (htab, element, hash)
index -= size;
entry = htab->entries[index];
- if (entry == EMPTY_ENTRY
- || (entry != DELETED_ENTRY && (*htab->eq_f) (entry, element)))
+ if (entry == HTAB_EMPTY_ENTRY
+ || (entry != HTAB_DELETED_ENTRY && (*htab->eq_f) (entry, element)))
return entry;
}
}
@@ -465,53 +570,50 @@ htab_find_with_hash (htab, element, hash)
element. */
PTR
-htab_find (htab, element)
- htab_t htab;
- const PTR element;
+htab_find (htab_t htab, const PTR element)
{
return htab_find_with_hash (htab, element, (*htab->hash_f) (element));
}
/* This function searches for a hash table slot containing an entry
equal to the given element. To delete an entry, call this with
- INSERT = 0, then call htab_clear_slot on the slot returned (possibly
- after doing some checks). To insert an entry, call this with
- INSERT = 1, then write the value you want into the returned slot.
- When inserting an entry, NULL may be returned if memory allocation
- fails. */
+ insert=NO_INSERT, then call htab_clear_slot on the slot returned
+ (possibly after doing some checks). To insert an entry, call this
+ with insert=INSERT, then write the value you want into the returned
+ slot. When inserting an entry, NULL may be returned if memory
+ allocation fails. */
PTR *
-htab_find_slot_with_hash (htab, element, hash, insert)
- htab_t htab;
- const PTR element;
- hashval_t hash;
- enum insert_option insert;
+htab_find_slot_with_hash (htab_t htab, const PTR element,
+ hashval_t hash, enum insert_option insert)
{
PTR *first_deleted_slot;
- unsigned int index;
- hashval_t hash2;
+ hashval_t index, hash2;
size_t size;
PTR entry;
- if (insert == INSERT && htab->size * 3 <= htab->n_elements * 4
- && htab_expand (htab) == 0)
- return NULL;
+ size = htab_size (htab);
+ if (insert == INSERT && size * 3 <= htab->n_elements * 4)
+ {
+ if (htab_expand (htab) == 0)
+ return NULL;
+ size = htab_size (htab);
+ }
- size = htab->size;
- index = hash % size;
+ index = htab_mod (hash, htab);
htab->searches++;
first_deleted_slot = NULL;
entry = htab->entries[index];
- if (entry == EMPTY_ENTRY)
+ if (entry == HTAB_EMPTY_ENTRY)
goto empty_entry;
- else if (entry == DELETED_ENTRY)
+ else if (entry == HTAB_DELETED_ENTRY)
first_deleted_slot = &htab->entries[index];
else if ((*htab->eq_f) (entry, element))
return &htab->entries[index];
- hash2 = 1 + hash % (size - 2);
+ hash2 = htab_mod_m2 (hash, htab);
for (;;)
{
htab->collisions++;
@@ -520,9 +622,9 @@ htab_find_slot_with_hash (htab, element, hash, insert)
index -= size;
entry = htab->entries[index];
- if (entry == EMPTY_ENTRY)
+ if (entry == HTAB_EMPTY_ENTRY)
goto empty_entry;
- else if (entry == DELETED_ENTRY)
+ else if (entry == HTAB_DELETED_ENTRY)
{
if (!first_deleted_slot)
first_deleted_slot = &htab->entries[index];
@@ -538,7 +640,7 @@ htab_find_slot_with_hash (htab, element, hash, insert)
if (first_deleted_slot)
{
htab->n_deleted--;
- *first_deleted_slot = EMPTY_ENTRY;
+ *first_deleted_slot = HTAB_EMPTY_ENTRY;
return first_deleted_slot;
}
@@ -550,34 +652,40 @@ htab_find_slot_with_hash (htab, element, hash, insert)
element. */
PTR *
-htab_find_slot (htab, element, insert)
- htab_t htab;
- const PTR element;
- enum insert_option insert;
+htab_find_slot (htab_t htab, const PTR element, enum insert_option insert)
{
return htab_find_slot_with_hash (htab, element, (*htab->hash_f) (element),
insert);
}
/* This function deletes an element with the given value from hash
+ table (the hash is computed from the element). If there is no matching
+ element in the hash table, this function does nothing. */
+
+void
+htab_remove_elt (htab_t htab, PTR element)
+{
+ htab_remove_elt_with_hash (htab, element, (*htab->hash_f) (element));
+}
+
+
+/* This function deletes an element with the given value from hash
table. If there is no matching element in the hash table, this
function does nothing. */
void
-htab_remove_elt (htab, element)
- htab_t htab;
- PTR element;
+htab_remove_elt_with_hash (htab_t htab, PTR element, hashval_t hash)
{
PTR *slot;
- slot = htab_find_slot (htab, element, NO_INSERT);
- if (*slot == EMPTY_ENTRY)
+ slot = htab_find_slot_with_hash (htab, element, hash, NO_INSERT);
+ if (*slot == HTAB_EMPTY_ENTRY)
return;
if (htab->del_f)
(*htab->del_f) (*slot);
- *slot = DELETED_ENTRY;
+ *slot = HTAB_DELETED_ENTRY;
htab->n_deleted++;
}
@@ -586,18 +694,16 @@ htab_remove_elt (htab, element)
again. */
void
-htab_clear_slot (htab, slot)
- htab_t htab;
- PTR *slot;
+htab_clear_slot (htab_t htab, PTR *slot)
{
- if (slot < htab->entries || slot >= htab->entries + htab->size
- || *slot == EMPTY_ENTRY || *slot == DELETED_ENTRY)
+ if (slot < htab->entries || slot >= htab->entries + htab_size (htab)
+ || *slot == HTAB_EMPTY_ENTRY || *slot == HTAB_DELETED_ENTRY)
abort ();
if (htab->del_f)
(*htab->del_f) (*slot);
- *slot = DELETED_ENTRY;
+ *slot = HTAB_DELETED_ENTRY;
htab->n_deleted++;
}
@@ -607,22 +713,19 @@ htab_clear_slot (htab, slot)
argument. */
void
-htab_traverse_noresize (htab, callback, info)
- htab_t htab;
- htab_trav callback;
- PTR info;
+htab_traverse_noresize (htab_t htab, htab_trav callback, PTR info)
{
PTR *slot;
PTR *limit;
-
+
slot = htab->entries;
- limit = slot + htab->size;
+ limit = slot + htab_size (htab);
do
{
PTR x = *slot;
- if (x != EMPTY_ENTRY && x != DELETED_ENTRY)
+ if (x != HTAB_EMPTY_ENTRY && x != HTAB_DELETED_ENTRY)
if (!(*callback) (slot, info))
break;
}
@@ -633,41 +736,19 @@ htab_traverse_noresize (htab, callback, info)
too empty to improve effectivity of subsequent calls. */
void
-htab_traverse (htab, callback, info)
- htab_t htab;
- htab_trav callback;
- PTR info;
+htab_traverse (htab_t htab, htab_trav callback, PTR info)
{
- if ((htab->n_elements - htab->n_deleted) * 8 < htab->size)
+ if (htab_elements (htab) * 8 < htab_size (htab))
htab_expand (htab);
htab_traverse_noresize (htab, callback, info);
}
-/* Return the current size of given hash table. */
-
-size_t
-htab_size (htab)
- htab_t htab;
-{
- return htab->size;
-}
-
-/* Return the current number of elements in given hash table. */
-
-size_t
-htab_elements (htab)
- htab_t htab;
-{
- return htab->n_elements - htab->n_deleted;
-}
-
/* Return the fraction of fixed collisions during all work with given
hash table. */
double
-htab_collisions (htab)
- htab_t htab;
+htab_collisions (htab_t htab)
{
if (htab->searches == 0)
return 0.0;
@@ -701,8 +782,7 @@ htab_collisions (htab)
function they just started using for Perl's hashes. */
hashval_t
-htab_hash_string (p)
- const PTR p;
+htab_hash_string (const PTR p)
{
const unsigned char *str = (const unsigned char *) p;
hashval_t r = 0;
@@ -791,10 +871,11 @@ acceptable. Do NOT use for cryptographic purposes.
--------------------------------------------------------------------
*/
-hashval_t iterative_hash (k_in, length, initval)
- const PTR k_in; /* the key */
- register size_t length; /* the length of the key */
- register hashval_t initval; /* the previous hash, or an arbitrary value */
+hashval_t
+iterative_hash (const PTR k_in /* the key */,
+ register size_t length /* the length of the key */,
+ register hashval_t initval /* the previous hash, or
+ an arbitrary value */)
{
register const unsigned char *k = (const unsigned char *)k_in;
register hashval_t a,b,c,len;
diff --git a/contrib/binutils/libiberty/hex.c b/contrib/binutils/libiberty/hex.c
index e4c5dfa2f1dc..86ba0b5b872f 100644
--- a/contrib/binutils/libiberty/hex.c
+++ b/contrib/binutils/libiberty/hex.c
@@ -14,10 +14,13 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#include <stdio.h> /* for EOF */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "libiberty.h"
#include "safe-ctype.h" /* for HOST_CHARSET_ASCII */
@@ -44,7 +47,7 @@ or zero if it is not. Note that the value you pass will be cast to
@end deftypefn
-@deftypefn Extension unsigned int hex_value (int @var{c})
+@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
@@ -153,7 +156,7 @@ unsigned char _hex_value[_hex_array_size];
#endif /* not ASCII */
void
-hex_init ()
+hex_init (void)
{
#ifndef HEX_TABLE_INITIALIZED
int i;
diff --git a/contrib/binutils/libiberty/index.c b/contrib/binutils/libiberty/index.c
index a2e272783b90..acd0a45fc029 100644
--- a/contrib/binutils/libiberty/index.c
+++ b/contrib/binutils/libiberty/index.c
@@ -12,12 +12,10 @@ deprecated in new programs in favor of @code{strchr}.
*/
-extern char * strchr();
+extern char * strchr(const char *, int);
char *
-index (s, c)
- char *s;
- int c;
+index (const char *s, int c)
{
return strchr (s, c);
}
diff --git a/contrib/binutils/libiberty/insque.c b/contrib/binutils/libiberty/insque.c
index c0c1180d4211..3473bb92b31f 100644
--- a/contrib/binutils/libiberty/insque.c
+++ b/contrib/binutils/libiberty/insque.c
@@ -33,9 +33,7 @@ struct qelem {
void
-insque (elem, pred)
- struct qelem *elem;
- struct qelem *pred;
+insque (struct qelem *elem, struct qelem *pred)
{
elem -> q_forw = pred -> q_forw;
pred -> q_forw -> q_back = elem;
@@ -45,8 +43,7 @@ insque (elem, pred)
void
-remque (elem)
- struct qelem *elem;
+remque (struct qelem *elem)
{
elem -> q_forw -> q_back = elem -> q_back;
elem -> q_back -> q_forw = elem -> q_forw;
diff --git a/contrib/binutils/libiberty/lbasename.c b/contrib/binutils/libiberty/lbasename.c
index 200a87f23871..56fcd6250729 100644
--- a/contrib/binutils/libiberty/lbasename.c
+++ b/contrib/binutils/libiberty/lbasename.c
@@ -15,8 +15,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/*
@@ -37,14 +37,16 @@ and a path ending in @code{/} returns the empty string after it.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "ansidecl.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "filenames.h"
const char *
-lbasename (name)
- const char *name;
+lbasename (const char *name)
{
const char *base;
diff --git a/contrib/binutils/libiberty/libiberty.texi b/contrib/binutils/libiberty/libiberty.texi
index b57e3c530e16..d3701e69dfa6 100644
--- a/contrib/binutils/libiberty/libiberty.texi
+++ b/contrib/binutils/libiberty/libiberty.texi
@@ -315,7 +315,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-@node Index
+@node Index
@unnumbered Index
@printindex cp
diff --git a/contrib/binutils/libiberty/lrealpath.c b/contrib/binutils/libiberty/lrealpath.c
index b001b38ef663..b27c8de990e9 100644
--- a/contrib/binutils/libiberty/lrealpath.c
+++ b/contrib/binutils/libiberty/lrealpath.c
@@ -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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/*
@@ -64,11 +64,16 @@ extern char *canonicalize_file_name (const char *);
# define REALPATH_LIMIT MAXPATHLEN
# endif
# endif
+#else
+ /* cygwin has realpath, so it won't get here. */
+# if defined (_WIN32)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h> /* for GetFullPathName */
+# endif
#endif
char *
-lrealpath (filename)
- const char *filename;
+lrealpath (const char *filename)
{
/* Method 1: The system has a compile time upper bound on a filename
path. Use that and realpath() to canonicalize the name. This is
@@ -112,7 +117,7 @@ lrealpath (filename)
{
/* PATH_MAX is bounded. */
char *buf, *rp, *ret;
- buf = malloc (path_max);
+ buf = (char *) malloc (path_max);
if (buf == NULL)
return NULL;
rp = realpath (filename, buf);
@@ -123,6 +128,30 @@ lrealpath (filename)
}
#endif
+ /* The MS Windows method. If we don't have realpath, we assume we
+ don't have symlinks and just canonicalize to a Windows absolute
+ path. GetFullPath converts ../ and ./ in relative paths to
+ absolute paths, filling in current drive if one is not given
+ or using the current directory of a specified drive (eg, "E:foo").
+ It also converts all forward slashes to back slashes. */
+#if defined (_WIN32)
+ {
+ char buf[MAX_PATH];
+ char* basename;
+ DWORD len = GetFullPathName (filename, MAX_PATH, buf, &basename);
+ if (len == 0 || len > MAX_PATH - 1)
+ return strdup (filename);
+ else
+ {
+ /* The file system is case-preserving but case-insensitive,
+ Canonicalize to lowercase, using the codepage associated
+ with the process locale. */
+ CharLowerBuff (buf, len);
+ return strdup (buf);
+ }
+ }
+#endif
+
/* This system is a lost cause, just duplicate the filename. */
return strdup (filename);
}
diff --git a/contrib/binutils/libiberty/maint-tool b/contrib/binutils/libiberty/maint-tool
index bfc530422475..5584d9b55948 100644
--- a/contrib/binutils/libiberty/maint-tool
+++ b/contrib/binutils/libiberty/maint-tool
@@ -17,8 +17,8 @@
#
# You should have received a copy of the GNU Library General Public
# License along with libiberty; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+# Boston, MA 02110-1301, USA.
#
# Originally written by DJ Delorie <dj@redhat.com>
@@ -145,7 +145,6 @@ sub undoc {
next unless /^\# *define/;
s/\# *define *//;
}
- next if $filename =~ /mpw\.c/;
s/ VPARAMS//;
s/ *\177.*//;
diff --git a/contrib/binutils/libiberty/make-relative-prefix.c b/contrib/binutils/libiberty/make-relative-prefix.c
index dc4f8d5259d0..66ddcaa471bf 100644
--- a/contrib/binutils/libiberty/make-relative-prefix.c
+++ b/contrib/binutils/libiberty/make-relative-prefix.c
@@ -16,8 +16,8 @@ for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
/*
@@ -95,16 +95,14 @@ relative prefix can be found, return @code{NULL}.
#define DIR_UP ".."
-static char *save_string PARAMS ((const char *, int));
-static char **split_directories PARAMS ((const char *, int *));
-static void free_split_directories PARAMS ((char **));
+static char *save_string (const char *, int);
+static char **split_directories (const char *, int *);
+static void free_split_directories (char **);
static char *
-save_string (s, len)
- const char *s;
- int len;
+save_string (const char *s, int len)
{
- char *result = malloc (len + 1);
+ char *result = (char *) malloc (len + 1);
memcpy (result, s, len);
result[len] = 0;
@@ -114,9 +112,7 @@ save_string (s, len)
/* Split a filename into component directories. */
static char **
-split_directories (name, ptr_num_dirs)
- const char *name;
- int *ptr_num_dirs;
+split_directories (const char *name, int *ptr_num_dirs)
{
int num_dirs = 0;
char **dirs;
@@ -201,8 +197,7 @@ split_directories (name, ptr_num_dirs)
/* Release storage held by split directories. */
static void
-free_split_directories (dirs)
- char **dirs;
+free_split_directories (char **dirs)
{
int i = 0;
@@ -223,10 +218,8 @@ free_split_directories (dirs)
If no relative prefix can be found, return NULL. */
char *
-make_relative_prefix (progname, bin_prefix, prefix)
- const char *progname;
- const char *bin_prefix;
- const char *prefix;
+make_relative_prefix (const char *progname,
+ const char *bin_prefix, const char *prefix)
{
char **prog_dirs, **bin_dirs, **prefix_dirs;
int prog_num, bin_num, prefix_num;
diff --git a/contrib/binutils/libiberty/make-temp-file.c b/contrib/binutils/libiberty/make-temp-file.c
index 883350479fce..5e21414ad8ee 100644
--- a/contrib/binutils/libiberty/make-temp-file.c
+++ b/contrib/binutils/libiberty/make-temp-file.c
@@ -14,8 +14,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If not,
-write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include "libiberty.h"
-extern int mkstemps PARAMS ((char *, int));
+extern int mkstemps (char *, int);
/* '/' works just fine on MS-DOS based systems. */
#ifndef DIR_SEPARATOR
@@ -61,11 +61,10 @@ extern int mkstemps PARAMS ((char *, int));
If success, DIR is returned.
Otherwise NULL is returned. */
-static inline const char *try PARAMS ((const char *, const char *));
+static inline const char *try_dir (const char *, const char *);
static inline const char *
-try (dir, base)
- const char *dir, *base;
+try_dir (const char *dir, const char *base)
{
if (base != 0)
return base;
@@ -95,7 +94,7 @@ files in.
*/
char *
-choose_tmpdir ()
+choose_tmpdir (void)
{
const char *base = 0;
char *tmpdir;
@@ -104,18 +103,18 @@ choose_tmpdir ()
if (memoized_tmpdir)
return memoized_tmpdir;
- base = try (getenv ("TMPDIR"), base);
- base = try (getenv ("TMP"), base);
- base = try (getenv ("TEMP"), base);
+ base = try_dir (getenv ("TMPDIR"), base);
+ base = try_dir (getenv ("TMP"), base);
+ base = try_dir (getenv ("TEMP"), base);
#ifdef P_tmpdir
- base = try (P_tmpdir, base);
+ base = try_dir (P_tmpdir, base);
#endif
/* Try /var/tmp, /usr/tmp, then /tmp. */
- base = try (vartmp, base);
- base = try (usrtmp, base);
- base = try (tmp, base);
+ base = try_dir (vartmp, base);
+ base = try_dir (usrtmp, base);
+ base = try_dir (tmp, base);
/* If all else fails, use the current directory! */
if (base == 0)
@@ -124,7 +123,7 @@ choose_tmpdir ()
/* Append DIR_SEPARATOR to the directory we've chosen
and return it. */
len = strlen (base);
- tmpdir = xmalloc (len + 2);
+ tmpdir = XNEWVEC (char, len + 2);
strcpy (tmpdir, base);
tmpdir[len] = DIR_SEPARATOR;
tmpdir[len+1] = '\0';
@@ -146,8 +145,7 @@ string is @code{malloc}ed, and the temporary file has been created.
*/
char *
-make_temp_file (suffix)
- const char *suffix;
+make_temp_file (const char *suffix)
{
const char *base = choose_tmpdir ();
char *temp_filename;
@@ -160,7 +158,7 @@ make_temp_file (suffix)
base_len = strlen (base);
suffix_len = strlen (suffix);
- temp_filename = xmalloc (base_len
+ temp_filename = XNEWVEC (char, base_len
+ TEMP_FILE_LEN
+ suffix_len + 1);
strcpy (temp_filename, base);
diff --git a/contrib/binutils/libiberty/md5.c b/contrib/binutils/libiberty/md5.c
index e458f2a6a641..83e0beb339fa 100644
--- a/contrib/binutils/libiberty/md5.c
+++ b/contrib/binutils/libiberty/md5.c
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */
@@ -62,8 +62,7 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
/* Initialize structure containing state of computation.
(RFC 1321, 3.3: Step 3) */
void
-md5_init_ctx (ctx)
- struct md5_ctx *ctx;
+md5_init_ctx (struct md5_ctx *ctx)
{
ctx->A = (md5_uint32) 0x67452301;
ctx->B = (md5_uint32) 0xefcdab89;
@@ -80,9 +79,7 @@ md5_init_ctx (ctx)
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-md5_read_ctx (ctx, resbuf)
- const struct md5_ctx *ctx;
- void *resbuf;
+md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
{
((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
@@ -98,9 +95,7 @@ md5_read_ctx (ctx, resbuf)
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-md5_finish_ctx (ctx, resbuf)
- struct md5_ctx *ctx;
- void *resbuf;
+md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
{
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
@@ -129,9 +124,7 @@ md5_finish_ctx (ctx, resbuf)
resulting message digest number will be written into the 16 bytes
beginning at RESBLOCK. */
int
-md5_stream (stream, resblock)
- FILE *stream;
- void *resblock;
+md5_stream (FILE *stream, void *resblock)
{
/* Important: BLOCKSIZE must be a multiple of 64. */
#define BLOCKSIZE 4096
@@ -186,10 +179,7 @@ md5_stream (stream, resblock)
output yields to the wanted ASCII representation of the message
digest. */
void *
-md5_buffer (buffer, len, resblock)
- const char *buffer;
- size_t len;
- void *resblock;
+md5_buffer (const char *buffer, size_t len, void *resblock)
{
struct md5_ctx ctx;
@@ -205,10 +195,7 @@ md5_buffer (buffer, len, resblock)
void
-md5_process_bytes (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct md5_ctx *ctx;
+md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
@@ -236,6 +223,23 @@ md5_process_bytes (buffer, len, ctx)
/* Process available complete blocks. */
if (len > 64)
{
+#if !_STRING_ARCH_unaligned
+/* To check alignment gcc has an appropriate operator. Other
+ compilers don't. */
+# if __GNUC__ >= 2
+# define UNALIGNED_P(p) (((md5_uintptr) p) % __alignof__ (md5_uint32) != 0)
+# else
+# define UNALIGNED_P(p) (((md5_uintptr) p) % sizeof (md5_uint32) != 0)
+# endif
+ if (UNALIGNED_P (buffer))
+ while (len > 64)
+ {
+ md5_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx);
+ buffer = (const char *) buffer + 64;
+ len -= 64;
+ }
+ else
+#endif
md5_process_block (buffer, len & ~63, ctx);
buffer = (const void *) ((const char *) buffer + (len & ~63));
len &= 63;
@@ -263,10 +267,7 @@ md5_process_bytes (buffer, len, ctx)
It is assumed that LEN % 64 == 0. */
void
-md5_process_block (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct md5_ctx *ctx;
+md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
{
md5_uint32 correct_words[16];
const md5_uint32 *words = (const md5_uint32 *) buffer;
diff --git a/contrib/binutils/libiberty/memchr.c b/contrib/binutils/libiberty/memchr.c
index 3948125963d2..451f817d3203 100644
--- a/contrib/binutils/libiberty/memchr.c
+++ b/contrib/binutils/libiberty/memchr.c
@@ -15,17 +15,10 @@ returned.
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
PTR
-memchr (src_void, c, length)
- register const PTR src_void;
- int c;
- size_t length;
+memchr (register const PTR src_void, int c, size_t length)
{
const unsigned char *src = (const unsigned char *)src_void;
diff --git a/contrib/binutils/libiberty/memcmp.c b/contrib/binutils/libiberty/memcmp.c
index 92f2b6e64257..39edfca98a6d 100644
--- a/contrib/binutils/libiberty/memcmp.c
+++ b/contrib/binutils/libiberty/memcmp.c
@@ -16,17 +16,10 @@ as if comparing unsigned char arrays.
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
int
-memcmp (str1, str2, count)
- const PTR str1;
- const PTR str2;
- size_t count;
+memcmp (const PTR str1, const PTR str2, size_t count)
{
register const unsigned char *s1 = (const unsigned char*)str1;
register const unsigned char *s2 = (const unsigned char*)str2;
diff --git a/contrib/binutils/libiberty/memcpy.c b/contrib/binutils/libiberty/memcpy.c
index 5eece7a0a001..9b5b24295df6 100644
--- a/contrib/binutils/libiberty/memcpy.c
+++ b/contrib/binutils/libiberty/memcpy.c
@@ -13,19 +13,12 @@ Copies @var{length} bytes from memory region @var{in} to region
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-void bcopy PARAMS((const void*, void*, size_t));
+void bcopy (const void*, void*, size_t);
PTR
-memcpy (out, in, length)
- PTR out;
- const PTR in;
- size_t length;
+memcpy (PTR out, const PTR in, size_t length)
{
bcopy(in, out, length);
return out;
diff --git a/contrib/binutils/libiberty/memmove.c b/contrib/binutils/libiberty/memmove.c
index 00ac053401bf..06a24fc26885 100644
--- a/contrib/binutils/libiberty/memmove.c
+++ b/contrib/binutils/libiberty/memmove.c
@@ -13,19 +13,12 @@ Copies @var{count} bytes from memory area @var{from} to memory area
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-void bcopy PARAMS ((const void*, void*, size_t));
+void bcopy (const void*, void*, size_t);
PTR
-memmove (s1, s2, n)
- PTR s1;
- const PTR s2;
- size_t n;
+memmove (PTR s1, const PTR s2, size_t n)
{
bcopy (s2, s1, n);
return s1;
diff --git a/contrib/binutils/libiberty/memset.c b/contrib/binutils/libiberty/memset.c
index 5119f858ad06..1951ad6bd610 100644
--- a/contrib/binutils/libiberty/memset.c
+++ b/contrib/binutils/libiberty/memset.c
@@ -13,17 +13,10 @@ Sets the first @var{count} bytes of @var{s} to the constant byte
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
PTR
-memset (dest, val, len)
- PTR dest;
- register int val;
- register size_t len;
+memset (PTR dest, register int val, register size_t len)
{
register unsigned char *ptr = (unsigned char*)dest;
while (len-- > 0)
diff --git a/contrib/binutils/libiberty/mkstemps.c b/contrib/binutils/libiberty/mkstemps.c
index 1f6600a15b91..89b37d9f4805 100644
--- a/contrib/binutils/libiberty/mkstemps.c
+++ b/contrib/binutils/libiberty/mkstemps.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1998, 2004 Free Software Foundation, Inc.
This file is derived from mkstemp.c from the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -13,8 +13,8 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -51,17 +51,17 @@ typedef unsigned long gcc_uint64_t;
/*
-@deftypefn Replacement int mkstemps (char *@var{template}, int @var{suffix_len})
+@deftypefn Replacement int mkstemps (char *@var{pattern}, int @var{suffix_len})
-Generate a unique temporary file name from @var{template}.
-@var{template} has the form:
+Generate a unique temporary file name from @var{pattern}.
+@var{pattern} has the form:
@example
@var{path}/ccXXXXXX@var{suffix}
@end example
@var{suffix_len} tells us how long @var{suffix} is (it can be zero
-length). The last six characters of @var{template} before @var{suffix}
+length). The last six characters of @var{pattern} before @var{suffix}
must be @samp{XXXXXX}; they are replaced with a string that makes the
filename unique. Returns a file descriptor open on the file for
reading and writing.
@@ -71,9 +71,7 @@ reading and writing.
*/
int
-mkstemps (template, suffix_len)
- char *template;
- int suffix_len;
+mkstemps (char *pattern, int suffix_len)
{
static const char letters[]
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
@@ -85,15 +83,15 @@ mkstemps (template, suffix_len)
size_t len;
int count;
- len = strlen (template);
+ len = strlen (pattern);
if ((int) len < 6 + suffix_len
- || strncmp (&template[len - 6 - suffix_len], "XXXXXX", 6))
+ || strncmp (&pattern[len - 6 - suffix_len], "XXXXXX", 6))
{
return -1;
}
- XXXXXX = &template[len - 6 - suffix_len];
+ XXXXXX = &pattern[len - 6 - suffix_len];
#ifdef HAVE_GETTIMEOFDAY
/* Get some more or less random data. */
@@ -121,11 +119,7 @@ mkstemps (template, suffix_len)
v /= 62;
XXXXXX[5] = letters[v % 62];
-#ifdef VMS
- fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd");
-#else
- fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600);
-#endif
+ fd = open (pattern, O_RDWR|O_CREAT|O_EXCL, 0600);
if (fd >= 0)
/* The file does not exist. */
return fd;
@@ -137,6 +131,6 @@ mkstemps (template, suffix_len)
}
/* We return the null string if we can't find a unique file name. */
- template[0] = '\0';
+ pattern[0] = '\0';
return -1;
}
diff --git a/contrib/binutils/libiberty/objalloc.c b/contrib/binutils/libiberty/objalloc.c
index 50995691e330..3ddac2ce4cbf 100644
--- a/contrib/binutils/libiberty/objalloc.c
+++ b/contrib/binutils/libiberty/objalloc.c
@@ -14,11 +14,11 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
-#include "ansidecl.h"
#include "config.h"
+#include "ansidecl.h"
#include "objalloc.h"
@@ -30,17 +30,15 @@ Boston, MA 02111-1307, USA. */
#include <unixlib.h>
#else
-#ifdef ANSI_PROTOTYPES
/* Get a definition for size_t. */
#include <stddef.h>
-#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else
/* For systems with larger pointers than ints, this must be declared. */
-extern PTR malloc PARAMS ((size_t));
-extern void free PARAMS ((PTR));
+extern PTR malloc (size_t);
+extern void free (PTR);
#endif
#endif
@@ -85,7 +83,7 @@ struct objalloc_chunk
/* Create an objalloc structure. */
struct objalloc *
-objalloc_create ()
+objalloc_create (void)
{
struct objalloc *ret;
struct objalloc_chunk *chunk;
@@ -114,9 +112,7 @@ objalloc_create ()
/* Allocate space from an objalloc structure. */
PTR
-_objalloc_alloc (o, len)
- struct objalloc *o;
- unsigned long len;
+_objalloc_alloc (struct objalloc *o, unsigned long len)
{
/* We avoid confusion from zero sized objects by always allocating
at least 1 byte. */
@@ -171,8 +167,7 @@ _objalloc_alloc (o, len)
/* Free an entire objalloc structure. */
void
-objalloc_free (o)
- struct objalloc *o;
+objalloc_free (struct objalloc *o)
{
struct objalloc_chunk *l;
@@ -193,9 +188,7 @@ objalloc_free (o)
recently allocated blocks. */
void
-objalloc_free_block (o, block)
- struct objalloc *o;
- PTR block;
+objalloc_free_block (struct objalloc *o, PTR block)
{
struct objalloc_chunk *p, *small;
char *b = (char *) block;
diff --git a/contrib/binutils/libiberty/obstack.c b/contrib/binutils/libiberty/obstack.c
index 02560c9e032e..a6dbaf095dfb 100644
--- a/contrib/binutils/libiberty/obstack.c
+++ b/contrib/binutils/libiberty/obstack.c
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifdef HAVE_CONFIG_H
@@ -52,11 +52,7 @@
#ifndef ELIDE_CODE
-#if defined (__STDC__) && __STDC__
#define POINTER void *
-#else
-#define POINTER char *
-#endif
/* Determine default alignment. */
struct fooalign {char x; double d;};
@@ -81,13 +77,8 @@ union fooround {long x; double d;};
jump to the handler pointed to by `obstack_alloc_failed_handler'.
This variable by default points to the internal function
`print_and_abort'. */
-#if defined (__STDC__) && __STDC__
static void print_and_abort (void);
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
-#else
-static void print_and_abort ();
-void (*obstack_alloc_failed_handler) () = print_and_abort;
-#endif
/* Exit value used when `print_and_abort' is used. */
#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
@@ -148,17 +139,8 @@ struct obstack *_obstack;
free up some memory, then call this again. */
int
-_obstack_begin (h, size, alignment, chunkfun, freefun)
- struct obstack *h;
- int size;
- int alignment;
-#if defined (__STDC__) && __STDC__
- POINTER (*chunkfun) (long);
- void (*freefun) (void *);
-#else
- POINTER (*chunkfun) ();
- void (*freefun) ();
-#endif
+_obstack_begin (struct obstack *h, int size, int alignment,
+ POINTER (*chunkfun) (long), void (*freefun) (void *))
{
register struct _obstack_chunk *chunk; /* points to new chunk */
@@ -181,13 +163,8 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
size = 4096 - extra;
}
-#if defined (__STDC__) && __STDC__
h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
-#else
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
-#endif
h->chunk_size = size;
h->alignment_mask = alignment - 1;
h->use_extra_arg = 0;
@@ -206,18 +183,9 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
}
int
-_obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
- struct obstack *h;
- int size;
- int alignment;
-#if defined (__STDC__) && __STDC__
- POINTER (*chunkfun) (POINTER, long);
- void (*freefun) (POINTER, POINTER);
-#else
- POINTER (*chunkfun) ();
- void (*freefun) ();
-#endif
- POINTER arg;
+_obstack_begin_1 (struct obstack *h, int size, int alignment,
+ POINTER (*chunkfun) (POINTER, long),
+ void (*freefun) (POINTER, POINTER), POINTER arg)
{
register struct _obstack_chunk *chunk; /* points to new chunk */
@@ -240,13 +208,8 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
size = 4096 - extra;
}
-#if defined(__STDC__) && __STDC__
h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
-#else
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
-#endif
h->chunk_size = size;
h->alignment_mask = alignment - 1;
h->extra_arg = arg;
@@ -272,9 +235,7 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
to the beginning of the new one. */
void
-_obstack_newchunk (h, length)
- struct obstack *h;
- int length;
+_obstack_newchunk (struct obstack *h, int length)
{
register struct _obstack_chunk *old_chunk = h->chunk;
register struct _obstack_chunk *new_chunk;
@@ -335,16 +296,12 @@ _obstack_newchunk (h, length)
This is here for debugging.
If you use it in a program, you are probably losing. */
-#if defined (__STDC__) && __STDC__
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
obstack.h because it is just for debugging. */
int _obstack_allocated_p (struct obstack *h, POINTER obj);
-#endif
int
-_obstack_allocated_p (h, obj)
- struct obstack *h;
- POINTER obj;
+_obstack_allocated_p (struct obstack *h, POINTER obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
@@ -370,9 +327,7 @@ _obstack_allocated_p (h, obj)
This is the first one, called from non-ANSI code. */
void
-_obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
+_obstack_free (struct obstack *h, POINTER obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
@@ -404,9 +359,7 @@ _obstack_free (h, obj)
/* This function is used from ANSI code. */
void
-obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
+obstack_free (struct obstack *h, POINTER obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
@@ -436,8 +389,7 @@ obstack_free (h, obj)
}
int
-_obstack_memory_used (h)
- struct obstack *h;
+_obstack_memory_used (struct obstack *h)
{
register struct _obstack_chunk* lp;
register int nbytes = 0;
@@ -462,7 +414,7 @@ _obstack_memory_used (h)
#endif
static void
-print_and_abort ()
+print_and_abort (void)
{
fputs (_("memory exhausted\n"), stderr);
exit (obstack_exit_failure);
@@ -475,119 +427,84 @@ print_and_abort ()
/* Now define the functional versions of the obstack macros.
Define them to simply use the corresponding macros to do the job. */
-#if defined (__STDC__) && __STDC__
-/* These function definitions do not work with non-ANSI preprocessors;
- they won't pass through the macro names in parentheses. */
-
/* The function names appear in parentheses in order to prevent
the macro-definitions of the names from being expanded there. */
-POINTER (obstack_base) (obstack)
- struct obstack *obstack;
+POINTER (obstack_base) (struct obstack *obstack)
{
return obstack_base (obstack);
}
-POINTER (obstack_next_free) (obstack)
- struct obstack *obstack;
+POINTER (obstack_next_free) (struct obstack *obstack)
{
return obstack_next_free (obstack);
}
-int (obstack_object_size) (obstack)
- struct obstack *obstack;
+int (obstack_object_size) (struct obstack *obstack)
{
return obstack_object_size (obstack);
}
-int (obstack_room) (obstack)
- struct obstack *obstack;
+int (obstack_room) (struct obstack *obstack)
{
return obstack_room (obstack);
}
-int (obstack_make_room) (obstack, length)
- struct obstack *obstack;
- int length;
+int (obstack_make_room) (struct obstack *obstack, int length)
{
return obstack_make_room (obstack, length);
}
-void (obstack_grow) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
+void (obstack_grow) (struct obstack *obstack, POINTER pointer, int length)
{
obstack_grow (obstack, pointer, length);
}
-void (obstack_grow0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
+void (obstack_grow0) (struct obstack *obstack, POINTER pointer, int length)
{
obstack_grow0 (obstack, pointer, length);
}
-void (obstack_1grow) (obstack, character)
- struct obstack *obstack;
- int character;
+void (obstack_1grow) (struct obstack *obstack, int character)
{
obstack_1grow (obstack, character);
}
-void (obstack_blank) (obstack, length)
- struct obstack *obstack;
- int length;
+void (obstack_blank) (struct obstack *obstack, int length)
{
obstack_blank (obstack, length);
}
-void (obstack_1grow_fast) (obstack, character)
- struct obstack *obstack;
- int character;
+void (obstack_1grow_fast) (struct obstack *obstack, int character)
{
obstack_1grow_fast (obstack, character);
}
-void (obstack_blank_fast) (obstack, length)
- struct obstack *obstack;
- int length;
+void (obstack_blank_fast) (struct obstack *obstack, int length)
{
obstack_blank_fast (obstack, length);
}
-POINTER (obstack_finish) (obstack)
- struct obstack *obstack;
+POINTER (obstack_finish) (struct obstack *obstack)
{
return obstack_finish (obstack);
}
-POINTER (obstack_alloc) (obstack, length)
- struct obstack *obstack;
- int length;
+POINTER (obstack_alloc) (struct obstack *obstack, int length)
{
return obstack_alloc (obstack, length);
}
-POINTER (obstack_copy) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
+POINTER (obstack_copy) (struct obstack *obstack, POINTER pointer, int length)
{
return obstack_copy (obstack, pointer, length);
}
-POINTER (obstack_copy0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
+POINTER (obstack_copy0) (struct obstack *obstack, POINTER pointer, int length)
{
return obstack_copy0 (obstack, pointer, length);
}
-#endif /* __STDC__ */
-
#endif /* 0 */
#endif /* !ELIDE_CODE */
diff --git a/contrib/binutils/libiberty/partition.c b/contrib/binutils/libiberty/partition.c
index 071547220790..5f0745c91424 100644
--- a/contrib/binutils/libiberty/partition.c
+++ b/contrib/binutils/libiberty/partition.c
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -34,14 +34,13 @@
#include "libiberty.h"
#include "partition.h"
-static int elem_compare PARAMS ((const void *, const void *));
+static int elem_compare (const void *, const void *);
/* Creates a partition of NUM_ELEMENTS elements. Initially each
element is in a class by itself. */
partition
-partition_new (num_elements)
- int num_elements;
+partition_new (int num_elements)
{
int e;
@@ -62,8 +61,7 @@ partition_new (num_elements)
/* Freeds a partition. */
void
-partition_delete (part)
- partition part;
+partition_delete (partition part)
{
free (part);
}
@@ -74,10 +72,7 @@ partition_delete (part)
resulting union class. */
int
-partition_union (part, elem1, elem2)
- partition part;
- int elem1;
- int elem2;
+partition_union (partition part, int elem1, int elem2)
{
struct partition_elem *elements = part->elements;
struct partition_elem *e1;
@@ -126,9 +121,7 @@ partition_union (part, elem1, elem2)
pointer to each. Used to qsort such an array. */
static int
-elem_compare (elem1, elem2)
- const void *elem1;
- const void *elem2;
+elem_compare (const void *elem1, const void *elem2)
{
int e1 = * (const int *) elem1;
int e2 = * (const int *) elem2;
@@ -144,9 +137,7 @@ elem_compare (elem1, elem2)
class are sorted. */
void
-partition_print (part, fp)
- partition part;
- FILE *fp;
+partition_print (partition part, FILE *fp)
{
char *done;
int num_elements = part->num_elements;
@@ -186,6 +177,7 @@ partition_print (part, fp)
}
fputc (']', fp);
+ free (class_elements);
free (done);
}
diff --git a/contrib/binutils/libiberty/pexecute.c b/contrib/binutils/libiberty/pexecute.c
new file mode 100644
index 000000000000..97f157447b71
--- /dev/null
+++ b/contrib/binutils/libiberty/pexecute.c
@@ -0,0 +1,124 @@
+/* Utilities to execute a program in a subprocess (possibly linked by pipes
+ with other subprocesses), and wait for it.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If not,
+write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
+/* pexecute is an old routine. This implementation uses the newer
+ pex_init/pex_run/pex_get_status/pex_free routines. Don't use
+ pexecute in new code. Use the newer routines instead. */
+
+#include "config.h"
+#include "libiberty.h"
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+/* We only permit a single pexecute chain to execute at a time. This
+ was always true anyhow, though it wasn't documented. */
+
+static struct pex_obj *pex;
+static int idx;
+
+int
+pexecute (const char *program, char * const *argv, const char *pname,
+ const char *temp_base, char **errmsg_fmt, char **errmsg_arg,
+ int flags)
+{
+ const char *errmsg;
+ int err;
+
+ if ((flags & PEXECUTE_FIRST) != 0)
+ {
+ if (pex != NULL)
+ {
+ *errmsg_fmt = (char *) "pexecute already in progress";
+ *errmsg_arg = NULL;
+ return -1;
+ }
+ pex = pex_init (PEX_USE_PIPES, pname, temp_base);
+ idx = 0;
+ }
+ else
+ {
+ if (pex == NULL)
+ {
+ *errmsg_fmt = (char *) "pexecute not in progress";
+ *errmsg_arg = NULL;
+ return -1;
+ }
+ }
+
+ errmsg = pex_run (pex,
+ (((flags & PEXECUTE_LAST) != 0 ? PEX_LAST : 0)
+ | ((flags & PEXECUTE_SEARCH) != 0 ? PEX_SEARCH : 0)),
+ program, argv, NULL, NULL, &err);
+ if (errmsg != NULL)
+ {
+ *errmsg_fmt = (char *) errmsg;
+ *errmsg_arg = NULL;
+ return -1;
+ }
+
+ /* Instead of a PID, we just return a one-based index into the
+ status values. We avoid zero just because the old pexecute would
+ never return it. */
+ return ++idx;
+}
+
+int
+pwait (int pid, int *status, int flags ATTRIBUTE_UNUSED)
+{
+ /* The PID returned by pexecute is one-based. */
+ --pid;
+
+ if (pex == NULL || pid < 0 || pid >= idx)
+ return -1;
+
+ if (pid == 0 && idx == 1)
+ {
+ if (!pex_get_status (pex, 1, status))
+ return -1;
+ }
+ else
+ {
+ int *vector;
+
+ vector = XNEWVEC (int, idx);
+ if (!pex_get_status (pex, idx, vector))
+ {
+ free (vector);
+ return -1;
+ }
+ *status = vector[pid];
+ free (vector);
+ }
+
+ /* Assume that we are done after the caller has retrieved the last
+ exit status. The original implementation did not require that
+ the exit statuses be retrieved in order, but this implementation
+ does. */
+ if (pid + 1 == idx)
+ {
+ pex_free (pex);
+ pex = NULL;
+ idx = 0;
+ }
+
+ return pid + 1;
+}
diff --git a/contrib/binutils/libiberty/physmem.c b/contrib/binutils/libiberty/physmem.c
index f64e07c74d4f..09fbf3f8c83e 100644
--- a/contrib/binutils/libiberty/physmem.c
+++ b/contrib/binutils/libiberty/physmem.c
@@ -1,5 +1,5 @@
/* Calculate the size of physical memory.
- Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 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
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert. */
@@ -80,7 +80,7 @@ typedef WINBOOL (WINAPI *PFN_MS_EX) (lMEMORYSTATUSEX*);
/* Return the total amount of physical memory. */
double
-physmem_total ()
+physmem_total (void)
{
#if defined _SC_PHYS_PAGES && defined _SC_PAGESIZE
{ /* This works on linux-gnu, solaris2 and cygwin. */
@@ -184,7 +184,7 @@ physmem_total ()
/* Return the amount of physical memory available. */
double
-physmem_available ()
+physmem_available (void)
{
#if defined _SC_AVPHYS_PAGES && defined _SC_PAGESIZE
{ /* This works on linux-gnu, solaris2 and cygwin. */
@@ -290,7 +290,7 @@ physmem_available ()
# include <stdlib.h>
int
-main ()
+main (void)
{
printf ("%12.f %12.f\n", physmem_total (), physmem_available ());
exit (0);
diff --git a/contrib/binutils/libiberty/putenv.c b/contrib/binutils/libiberty/putenv.c
index 6d027dc5aaa6..248f50e92033 100644
--- a/contrib/binutils/libiberty/putenv.c
+++ b/contrib/binutils/libiberty/putenv.c
@@ -13,8 +13,8 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/*
@@ -67,8 +67,7 @@ extern char *alloca ();
/* Put STRING, which is of the form "NAME=VALUE", in the environment. */
int
-putenv (string)
- const char *string;
+putenv (const char *string)
{
const char *const name_end = strchr (string, '=');
diff --git a/contrib/binutils/libiberty/random.c b/contrib/binutils/libiberty/random.c
index 48035f0821f2..c306698a5389 100644
--- a/contrib/binutils/libiberty/random.c
+++ b/contrib/binutils/libiberty/random.c
@@ -80,7 +80,7 @@ control over the state of the random number generator.
#endif
-long int random ();
+long int random (void);
/* An improved random number generation package. In addition to the standard
rand()/srand() like interface, this package also has a special state info
@@ -227,8 +227,7 @@ static long int *end_ptr = &randtbl[sizeof(randtbl) / sizeof(randtbl[0])];
introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
for default usage relies on values produced by this routine. */
void
-srandom (x)
- unsigned int x;
+srandom (unsigned int x)
{
state[0] = x;
if (rand_type != TYPE_0)
@@ -255,10 +254,7 @@ srandom (x)
setstate so that it doesn't matter when initstate is called.
Returns a pointer to the old state. */
PTR
-initstate (seed, arg_state, n)
- unsigned int seed;
- PTR arg_state;
- unsigned long n;
+initstate (unsigned int seed, PTR arg_state, unsigned long n)
{
PTR ostate = (PTR) &state[-1];
@@ -324,8 +320,7 @@ initstate (seed, arg_state, n)
Returns a pointer to the old state information. */
PTR
-setstate (arg_state)
- PTR arg_state;
+setstate (PTR arg_state)
{
register long int *new_state = (long int *) arg_state;
register int type = new_state[0] % MAX_TYPES;
@@ -378,7 +373,7 @@ setstate (arg_state)
pointer if the front one has wrapped. Returns a 31-bit random number. */
long int
-random ()
+random (void)
{
if (rand_type == TYPE_0)
{
diff --git a/contrib/binutils/libiberty/regex.c b/contrib/binutils/libiberty/regex.c
index 522b0eedf442..fa1df197ce9d 100644
--- a/contrib/binutils/libiberty/regex.c
+++ b/contrib/binutils/libiberty/regex.c
@@ -2,7 +2,9 @@
version 0.12.
(Implements POSIX draft P1003.2/D11.2, except for some of the
internationalization features.)
- Copyright (C) 1993-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,8 +19,8 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA. */
/* This file has been modified for usage in libiberty. It includes "xregex.h"
instead of <regex.h>. The "xregex.h" header file renames all external
@@ -32,20 +34,14 @@
#undef _GNU_SOURCE
#define _GNU_SOURCE
-#ifdef HAVE_CONFIG_H
-# include <config.h>
+#ifndef INSIDE_RECURSION
+# ifdef HAVE_CONFIG_H
+# include <config.h>
+# endif
#endif
#include <ansidecl.h>
-#ifndef PARAMS
-# if defined __GNUC__ || (defined __STDC__ && __STDC__)
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif /* GCC. */
-#endif /* Not PARAMS. */
-
#ifndef INSIDE_RECURSION
# if defined STDC_HEADERS && !defined emacs
@@ -275,10 +271,10 @@ extern char *re_syntax_table;
static char re_syntax_table[CHAR_SET_SIZE];
-static void init_syntax_once PARAMS ((void));
+static void init_syntax_once (void);
static void
-init_syntax_once ()
+init_syntax_once (void)
{
register int c;
static int done = 0;
@@ -409,44 +405,44 @@ typedef char boolean;
# define false 0
# define true 1
-static reg_errcode_t byte_regex_compile _RE_ARGS ((const char *pattern, size_t size,
- reg_syntax_t syntax,
- struct re_pattern_buffer *bufp));
-
-static int byte_re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp,
- const char *string1, int size1,
- const char *string2, int size2,
- int pos,
- struct re_registers *regs,
- int stop));
-static int byte_re_search_2 PARAMS ((struct re_pattern_buffer *bufp,
- const char *string1, int size1,
- const char *string2, int size2,
- int startpos, int range,
- struct re_registers *regs, int stop));
-static int byte_re_compile_fastmap PARAMS ((struct re_pattern_buffer *bufp));
+static reg_errcode_t byte_regex_compile (const char *pattern, size_t size,
+ reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp);
+
+static int byte_re_match_2_internal (struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int pos,
+ struct re_registers *regs,
+ int stop);
+static int byte_re_search_2 (struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int startpos, int range,
+ struct re_registers *regs, int stop);
+static int byte_re_compile_fastmap (struct re_pattern_buffer *bufp);
#ifdef MBS_SUPPORT
-static reg_errcode_t wcs_regex_compile _RE_ARGS ((const char *pattern, size_t size,
- reg_syntax_t syntax,
- struct re_pattern_buffer *bufp));
-
-
-static int wcs_re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp,
- const char *cstring1, int csize1,
- const char *cstring2, int csize2,
- int pos,
- struct re_registers *regs,
- int stop,
- wchar_t *string1, int size1,
- wchar_t *string2, int size2,
- int *mbs_offset1, int *mbs_offset2));
-static int wcs_re_search_2 PARAMS ((struct re_pattern_buffer *bufp,
- const char *string1, int size1,
- const char *string2, int size2,
- int startpos, int range,
- struct re_registers *regs, int stop));
-static int wcs_re_compile_fastmap PARAMS ((struct re_pattern_buffer *bufp));
+static reg_errcode_t wcs_regex_compile (const char *pattern, size_t size,
+ reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp);
+
+
+static int wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
+ const char *cstring1, int csize1,
+ const char *cstring2, int csize2,
+ int pos,
+ struct re_registers *regs,
+ int stop,
+ wchar_t *string1, int size1,
+ wchar_t *string2, int size2,
+ int *mbs_offset1, int *mbs_offset2);
+static int wcs_re_search_2 (struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int startpos, int range,
+ struct re_registers *regs, int stop);
+static int wcs_re_compile_fastmap (struct re_pattern_buffer *bufp);
#endif
/* These are the command codes that appear in compiled regular
@@ -614,11 +610,7 @@ typedef enum
# define UCHAR_T unsigned char
# define COMPILED_BUFFER_VAR bufp->buffer
# define OFFSET_ADDRESS_SIZE 2
-# if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-# define PREFIX(name) byte_##name
-# else
-# define PREFIX(name) byte_/**/name
-# endif
+# define PREFIX(name) byte_##name
# define ARG_PREFIX(name) name
# define PUT_CHAR(c) putchar (c)
#else
@@ -628,13 +620,8 @@ typedef enum
# define COMPILED_BUFFER_VAR wc_buffer
# define OFFSET_ADDRESS_SIZE 1 /* the size which STORE_NUMBER macro use */
# define CHAR_CLASS_SIZE ((__alignof__(wctype_t)+sizeof(wctype_t))/sizeof(CHAR_T)+1)
-# if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-# define PREFIX(name) wcs_##name
-# define ARG_PREFIX(name) c##name
-# else
-# define PREFIX(name) wcs_/**/name
-# define ARG_PREFIX(name) c/**/name
-# endif
+# define PREFIX(name) wcs_##name
+# define ARG_PREFIX(name) c##name
/* Should we use wide stream?? */
# define PUT_CHAR(c) printf ("%C", c);
# define TRUE 1
@@ -701,11 +688,9 @@ typedef enum
# endif
# ifdef DEBUG
-static void PREFIX(extract_number) _RE_ARGS ((int *dest, UCHAR_T *source));
+static void PREFIX(extract_number) (int *dest, UCHAR_T *source);
static void
-PREFIX(extract_number) (dest, source)
- int *dest;
- UCHAR_T *source;
+PREFIX(extract_number) (int *dest, UCHAR_T *source)
{
# ifdef WCHAR
*dest = *source;
@@ -733,12 +718,10 @@ PREFIX(extract_number) (dest, source)
} while (0)
# ifdef DEBUG
-static void PREFIX(extract_number_and_incr) _RE_ARGS ((int *destination,
- UCHAR_T **source));
+static void PREFIX(extract_number_and_incr) (int *destination,
+ UCHAR_T **source);
static void
-PREFIX(extract_number_and_incr) (destination, source)
- int *destination;
- UCHAR_T **source;
+PREFIX(extract_number_and_incr) (int *destination, UCHAR_T **source)
{
PREFIX(extract_number) (destination, *source);
*source += OFFSET_ADDRESS_SIZE;
@@ -789,8 +772,7 @@ static int debug;
# ifndef DEFINED_ONCE
void
-print_fastmap (fastmap)
- char *fastmap;
+print_fastmap (char *fastmap)
{
unsigned was_a_range = 0;
unsigned i = 0;
@@ -822,9 +804,7 @@ print_fastmap (fastmap)
the START pointer into it and ending just before the pointer END. */
void
-PREFIX(print_partial_compiled_pattern) (start, end)
- UCHAR_T *start;
- UCHAR_T *end;
+PREFIX(print_partial_compiled_pattern) (UCHAR_T *start, UCHAR_T *end)
{
int mcnt, mcnt2;
UCHAR_T *p1;
@@ -1157,8 +1137,7 @@ PREFIX(print_partial_compiled_pattern) (start, end)
void
-PREFIX(print_compiled_pattern) (bufp)
- struct re_pattern_buffer *bufp;
+PREFIX(print_compiled_pattern) (struct re_pattern_buffer *bufp)
{
UCHAR_T *buffer = (UCHAR_T*) bufp->buffer;
@@ -1190,12 +1169,8 @@ PREFIX(print_compiled_pattern) (bufp)
void
-PREFIX(print_double_string) (where, string1, size1, string2, size2)
- const CHAR_T *where;
- const CHAR_T *string1;
- const CHAR_T *string2;
- int size1;
- int size2;
+PREFIX(print_double_string) (const CHAR_T *where, const CHAR_T *string1,
+ int size1, const CHAR_T *string2, int size2)
{
int this_char;
@@ -1228,8 +1203,7 @@ PREFIX(print_double_string) (where, string1, size1, string2, size2)
# ifndef DEFINED_ONCE
void
-printchar (c)
- int c;
+printchar (int c)
{
putc (c, stderr);
}
@@ -1266,11 +1240,8 @@ static size_t convert_mbs_to_wcs (CHAR_T *dest, const unsigned char* src,
size_t len, int *offset_buffer,
char *is_binary);
static size_t
-convert_mbs_to_wcs (dest, src, len, offset_buffer, is_binary)
- CHAR_T *dest;
- const unsigned char* src;
- size_t len; /* the length of multibyte string. */
-
+convert_mbs_to_wcs (CHAR_T *dest, const unsigned char*src, size_t len,
+ int *offset_buffer, char *is_binary)
/* It hold correspondances between src(char string) and
dest(wchar_t string) for optimization.
e.g. src = "xxxyzz"
@@ -1280,8 +1251,6 @@ convert_mbs_to_wcs (dest, src, len, offset_buffer, is_binary)
offset_buffer = {0, 0+3("xxx"), 0+3+1("y"), 0+3+1+2("zz")}
= {0, 3, 4, 6}
*/
- int *offset_buffer;
- char *is_binary;
{
wchar_t *pdest = dest;
const unsigned char *psrc = src;
@@ -1352,8 +1321,7 @@ reg_syntax_t re_syntax_options;
defined in regex.h. We return the old syntax. */
reg_syntax_t
-re_set_syntax (syntax)
- reg_syntax_t syntax;
+re_set_syntax (reg_syntax_t syntax)
{
reg_syntax_t ret = re_syntax_options;
@@ -1872,35 +1840,35 @@ static CHAR_T PREFIX(reg_unset_dummy);
# define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
/* Subroutine declarations and macros for regex_compile. */
-static void PREFIX(store_op1) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc, int arg));
-static void PREFIX(store_op2) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc,
- int arg1, int arg2));
-static void PREFIX(insert_op1) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc,
- int arg, UCHAR_T *end));
-static void PREFIX(insert_op2) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc,
- int arg1, int arg2, UCHAR_T *end));
-static boolean PREFIX(at_begline_loc_p) _RE_ARGS ((const CHAR_T *pattern,
- const CHAR_T *p,
- reg_syntax_t syntax));
-static boolean PREFIX(at_endline_loc_p) _RE_ARGS ((const CHAR_T *p,
- const CHAR_T *pend,
- reg_syntax_t syntax));
+static void PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg);
+static void PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc,
+ int arg1, int arg2);
+static void PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc,
+ int arg, UCHAR_T *end);
+static void PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc,
+ int arg1, int arg2, UCHAR_T *end);
+static boolean PREFIX(at_begline_loc_p) (const CHAR_T *pattern,
+ const CHAR_T *p,
+ reg_syntax_t syntax);
+static boolean PREFIX(at_endline_loc_p) (const CHAR_T *p,
+ const CHAR_T *pend,
+ reg_syntax_t syntax);
# ifdef WCHAR
-static reg_errcode_t wcs_compile_range _RE_ARGS ((CHAR_T range_start,
- const CHAR_T **p_ptr,
- const CHAR_T *pend,
- char *translate,
- reg_syntax_t syntax,
- UCHAR_T *b,
- CHAR_T *char_set));
-static void insert_space _RE_ARGS ((int num, CHAR_T *loc, CHAR_T *end));
+static reg_errcode_t wcs_compile_range (CHAR_T range_start,
+ const CHAR_T **p_ptr,
+ const CHAR_T *pend,
+ char *translate,
+ reg_syntax_t syntax,
+ UCHAR_T *b,
+ CHAR_T *char_set);
+static void insert_space (int num, CHAR_T *loc, CHAR_T *end);
# else /* BYTE */
-static reg_errcode_t byte_compile_range _RE_ARGS ((unsigned int range_start,
- const char **p_ptr,
- const char *pend,
- char *translate,
- reg_syntax_t syntax,
- unsigned char *b));
+static reg_errcode_t byte_compile_range (unsigned int range_start,
+ const char **p_ptr,
+ const char *pend,
+ char *translate,
+ reg_syntax_t syntax,
+ unsigned char *b);
# endif /* WCHAR */
/* Fetch the next character in the uncompiled pattern---translating it
@@ -1952,7 +1920,7 @@ static reg_errcode_t byte_compile_range _RE_ARGS ((unsigned int range_start,
? (char) translate[(unsigned char) (d)] : (d))
# else /* BYTE */
# define TRANSLATE(d) \
- (translate ? (char) translate[(unsigned char) (d)] : (d))
+ (translate ? (char) translate[(unsigned char) (d)] : (char) (d))
# endif /* WCHAR */
# endif
@@ -2258,8 +2226,7 @@ static PREFIX(register_info_type) *PREFIX(reg_info_dummy);
but don't make them smaller. */
static void
-PREFIX(regex_grow_registers) (num_regs)
- int num_regs;
+PREFIX(regex_grow_registers) (int num_regs)
{
if (num_regs > regs_allocated_size)
{
@@ -2280,9 +2247,8 @@ PREFIX(regex_grow_registers) (num_regs)
# endif /* not MATCH_MAY_ALLOCATE */
# ifndef DEFINED_ONCE
-static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
- compile_stack,
- regnum_t regnum));
+static boolean group_in_compile_stack (compile_stack_type compile_stack,
+ regnum_t regnum);
# endif /* not DEFINED_ONCE */
/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
@@ -2313,11 +2279,9 @@ static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
# endif /* WCHAR */
static reg_errcode_t
-PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
- const char *ARG_PREFIX(pattern);
- size_t ARG_PREFIX(size);
- reg_syntax_t syntax;
- struct re_pattern_buffer *bufp;
+PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
+ size_t ARG_PREFIX(size), reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp)
{
/* We fetch characters from PATTERN here. Even though PATTERN is
`char *' (i.e., signed), we declare these variables as unsigned, so
@@ -4262,10 +4226,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
/* ifdef WCHAR, integer parameter is 1 wchar_t. */
static void
-PREFIX(store_op1) (op, loc, arg)
- re_opcode_t op;
- UCHAR_T *loc;
- int arg;
+PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg)
{
*loc = (UCHAR_T) op;
STORE_NUMBER (loc + 1, arg);
@@ -4276,10 +4237,7 @@ PREFIX(store_op1) (op, loc, arg)
/* ifdef WCHAR, integer parameter is 1 wchar_t. */
static void
-PREFIX(store_op2) (op, loc, arg1, arg2)
- re_opcode_t op;
- UCHAR_T *loc;
- int arg1, arg2;
+PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc, int arg1, int arg2)
{
*loc = (UCHAR_T) op;
STORE_NUMBER (loc + 1, arg1);
@@ -4292,11 +4250,7 @@ PREFIX(store_op2) (op, loc, arg1, arg2)
/* ifdef WCHAR, integer parameter is 1 wchar_t. */
static void
-PREFIX(insert_op1) (op, loc, arg, end)
- re_opcode_t op;
- UCHAR_T *loc;
- int arg;
- UCHAR_T *end;
+PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc, int arg, UCHAR_T *end)
{
register UCHAR_T *pfrom = end;
register UCHAR_T *pto = end + 1 + OFFSET_ADDRESS_SIZE;
@@ -4312,11 +4266,8 @@ PREFIX(insert_op1) (op, loc, arg, end)
/* ifdef WCHAR, integer parameter is 1 wchar_t. */
static void
-PREFIX(insert_op2) (op, loc, arg1, arg2, end)
- re_opcode_t op;
- UCHAR_T *loc;
- int arg1, arg2;
- UCHAR_T *end;
+PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc, int arg1,
+ int arg2, UCHAR_T *end)
{
register UCHAR_T *pfrom = end;
register UCHAR_T *pto = end + 1 + 2 * OFFSET_ADDRESS_SIZE;
@@ -4333,9 +4284,8 @@ PREFIX(insert_op2) (op, loc, arg1, arg2, end)
least one character before the ^. */
static boolean
-PREFIX(at_begline_loc_p) (pattern, p, syntax)
- const CHAR_T *pattern, *p;
- reg_syntax_t syntax;
+PREFIX(at_begline_loc_p) (const CHAR_T *pattern, const CHAR_T *p,
+ reg_syntax_t syntax)
{
const CHAR_T *prev = p - 2;
boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
@@ -4352,9 +4302,8 @@ PREFIX(at_begline_loc_p) (pattern, p, syntax)
at least one character after the $, i.e., `P < PEND'. */
static boolean
-PREFIX(at_endline_loc_p) (p, pend, syntax)
- const CHAR_T *p, *pend;
- reg_syntax_t syntax;
+PREFIX(at_endline_loc_p) (const CHAR_T *p, const CHAR_T *pend,
+ reg_syntax_t syntax)
{
const CHAR_T *next = p;
boolean next_backslash = *next == '\\';
@@ -4375,9 +4324,7 @@ PREFIX(at_endline_loc_p) (p, pend, syntax)
false if it's not. */
static boolean
-group_in_compile_stack (compile_stack, regnum)
- compile_stack_type compile_stack;
- regnum_t regnum;
+group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum)
{
int this_element;
@@ -4397,10 +4344,7 @@ group_in_compile_stack (compile_stack, regnum)
/* This insert space, which size is "num", into the pattern at "loc".
"end" must point the end of the allocated buffer. */
static void
-insert_space (num, loc, end)
- int num;
- CHAR_T *loc;
- CHAR_T *end;
+insert_space (int num, CHAR_T *loc, CHAR_T *end)
{
register CHAR_T *pto = end;
register CHAR_T *pfrom = end - num;
@@ -4412,13 +4356,9 @@ insert_space (num, loc, end)
#ifdef WCHAR
static reg_errcode_t
-wcs_compile_range (range_start_char, p_ptr, pend, translate, syntax, b,
- char_set)
- CHAR_T range_start_char;
- const CHAR_T **p_ptr, *pend;
- CHAR_T *char_set, *b;
- RE_TRANSLATE_TYPE translate;
- reg_syntax_t syntax;
+wcs_compile_range (CHAR_T range_start_char, const CHAR_T **p_ptr,
+ const CHAR_T *pend, RE_TRANSLATE_TYPE translate,
+ reg_syntax_t syntax, CHAR_T *b, CHAR_T *char_set)
{
const CHAR_T *p = *p_ptr;
CHAR_T range_start, range_end;
@@ -4499,12 +4439,9 @@ wcs_compile_range (range_start_char, p_ptr, pend, translate, syntax, b,
`regex_compile' itself. */
static reg_errcode_t
-byte_compile_range (range_start_char, p_ptr, pend, translate, syntax, b)
- unsigned int range_start_char;
- const char **p_ptr, *pend;
- RE_TRANSLATE_TYPE translate;
- reg_syntax_t syntax;
- unsigned char *b;
+byte_compile_range (unsigned int range_start_char, const char **p_ptr,
+ const char *pend, RE_TRANSLATE_TYPE translate,
+ reg_syntax_t syntax, unsigned char *b)
{
unsigned this_char;
const char *p = *p_ptr;
@@ -4585,8 +4522,7 @@ byte_compile_range (range_start_char, p_ptr, pend, translate, syntax, b)
static unsigned char truncate_wchar (CHAR_T c);
static unsigned char
-truncate_wchar (c)
- CHAR_T c;
+truncate_wchar (CHAR_T c)
{
unsigned char buf[MB_CUR_MAX];
mbstate_t state;
@@ -4602,8 +4538,7 @@ truncate_wchar (c)
#endif /* WCHAR */
static int
-PREFIX(re_compile_fastmap) (bufp)
- struct re_pattern_buffer *bufp;
+PREFIX(re_compile_fastmap) (struct re_pattern_buffer *bufp)
{
int j, k;
#ifdef MATCH_MAY_ALLOCATE
@@ -4922,8 +4857,7 @@ PREFIX(re_compile_fastmap) (bufp)
#else /* not INSIDE_RECURSION */
int
-re_compile_fastmap (bufp)
- struct re_pattern_buffer *bufp;
+re_compile_fastmap (struct re_pattern_buffer *bufp)
{
# ifdef MBS_SUPPORT
if (MB_CUR_MAX != 1)
@@ -4951,11 +4885,9 @@ weak_alias (__re_compile_fastmap, re_compile_fastmap)
freeing the old data. */
void
-re_set_registers (bufp, regs, num_regs, starts, ends)
- struct re_pattern_buffer *bufp;
- struct re_registers *regs;
- unsigned num_regs;
- regoff_t *starts, *ends;
+re_set_registers (struct re_pattern_buffer *bufp,
+ struct re_registers *regs, unsigned num_regs,
+ regoff_t *starts, regoff_t *ends)
{
if (num_regs)
{
@@ -4981,11 +4913,8 @@ weak_alias (__re_set_registers, re_set_registers)
doesn't let you say where to stop matching. */
int
-re_search (bufp, string, size, startpos, range, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int size, startpos, range;
- struct re_registers *regs;
+re_search (struct re_pattern_buffer *bufp, const char *string, int size,
+ int startpos, int range, struct re_registers *regs)
{
return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
regs, size);
@@ -5017,14 +4946,9 @@ weak_alias (__re_search, re_search)
stack overflow). */
int
-re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int startpos;
- int range;
- struct re_registers *regs;
- int stop;
+re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
+ const char *string2, int size2, int startpos, int range,
+ struct re_registers *regs, int stop)
{
# ifdef MBS_SUPPORT
if (MB_CUR_MAX != 1)
@@ -5080,15 +5004,10 @@ weak_alias (__re_search_2, re_search_2)
static int
-PREFIX(re_search_2) (bufp, string1, size1, string2, size2, startpos, range,
- regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int startpos;
- int range;
- struct re_registers *regs;
- int stop;
+PREFIX(re_search_2) (struct re_pattern_buffer *bufp, const char *string1,
+ int size1, const char *string2, int size2,
+ int startpos, int range,
+ struct re_registers *regs, int stop)
{
int val;
register char *fastmap = bufp->fastmap;
@@ -5471,11 +5390,8 @@ PREFIX(re_search_2) (bufp, string1, size1, string2, size2, startpos, range,
/* re_match is like re_match_2 except it takes only a single string. */
int
-re_match (bufp, string, size, pos, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int size, pos;
- struct re_registers *regs;
+re_match (struct re_pattern_buffer *bufp, const char *string,
+ int size, int pos, struct re_registers *regs)
{
int result;
# ifdef MBS_SUPPORT
@@ -5502,17 +5418,17 @@ weak_alias (__re_match, re_match)
#endif /* not INSIDE_RECURSION */
#ifdef INSIDE_RECURSION
-static boolean PREFIX(group_match_null_string_p) _RE_ARGS ((UCHAR_T **p,
- UCHAR_T *end,
- PREFIX(register_info_type) *reg_info));
-static boolean PREFIX(alt_match_null_string_p) _RE_ARGS ((UCHAR_T *p,
- UCHAR_T *end,
- PREFIX(register_info_type) *reg_info));
-static boolean PREFIX(common_op_match_null_string_p) _RE_ARGS ((UCHAR_T **p,
- UCHAR_T *end,
- PREFIX(register_info_type) *reg_info));
-static int PREFIX(bcmp_translate) _RE_ARGS ((const CHAR_T *s1, const CHAR_T *s2,
- int len, char *translate));
+static boolean PREFIX(group_match_null_string_p) (UCHAR_T **p,
+ UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info);
+static boolean PREFIX(alt_match_null_string_p) (UCHAR_T *p,
+ UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info);
+static boolean PREFIX(common_op_match_null_string_p) (UCHAR_T **p,
+ UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info);
+static int PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2,
+ int len, char *translate);
#else /* not INSIDE_RECURSION */
/* re_match_2 matches the compiled pattern in BUFP against the
@@ -5529,13 +5445,9 @@ static int PREFIX(bcmp_translate) _RE_ARGS ((const CHAR_T *s1, const CHAR_T *s2,
matched substring. */
int
-re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int pos;
- struct re_registers *regs;
- int stop;
+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
+ const char *string2, int size2, int pos,
+ struct re_registers *regs, int stop)
{
int result;
# ifdef MBS_SUPPORT
@@ -5564,7 +5476,7 @@ weak_alias (__re_match_2, re_match_2)
#ifdef INSIDE_RECURSION
#ifdef WCHAR
-static int count_mbs_length PARAMS ((int *, int));
+static int count_mbs_length (int *, int);
/* This check the substring (from 0, to length) of the multibyte string,
to which offset_buffer correspond. And count how many wchar_t_characters
@@ -5572,9 +5484,7 @@ static int count_mbs_length PARAMS ((int *, int));
See convert_mbs_to_wcs. */
static int
-count_mbs_length(offset_buffer, length)
- int *offset_buffer;
- int length;
+count_mbs_length(int *offset_buffer, int length)
{
int upper, lower;
@@ -5615,33 +5525,26 @@ count_mbs_length(offset_buffer, length)
afterwards. */
#ifdef WCHAR
static int
-wcs_re_match_2_internal (bufp, cstring1, csize1, cstring2, csize2, pos,
- regs, stop, string1, size1, string2, size2,
- mbs_offset1, mbs_offset2)
- struct re_pattern_buffer *bufp;
- const char *cstring1, *cstring2;
- int csize1, csize2;
- int pos;
- struct re_registers *regs;
- int stop;
+wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
+ const char *cstring1, int csize1,
+ const char *cstring2, int csize2,
+ int pos,
+ struct re_registers *regs,
+ int stop,
/* string1 == string2 == NULL means string1/2, size1/2 and
mbs_offset1/2 need seting up in this function. */
/* We need wchar_t* buffers correspond to cstring1, cstring2. */
- wchar_t *string1, *string2;
- /* We need the size of wchar_t buffers correspond to csize1, csize2. */
- int size1, size2;
+ wchar_t *string1, int size1,
+ wchar_t *string2, int size2,
/* offset buffer for optimizatoin. See convert_mbs_to_wc. */
- int *mbs_offset1, *mbs_offset2;
+ int *mbs_offset1, int *mbs_offset2)
#else /* BYTE */
static int
-byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
- regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int pos;
- struct re_registers *regs;
- int stop;
+byte_re_match_2_internal (struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int pos,
+ struct re_registers *regs, int stop)
#endif /* BYTE */
{
/* General temporaries. */
@@ -6271,9 +6174,9 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
uint32_t nrules;
# endif /* _LIBC */
#endif /* WCHAR */
- boolean not = (re_opcode_t) *(p - 1) == charset_not;
+ boolean negate = (re_opcode_t) *(p - 1) == charset_not;
- DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
+ DEBUG_PRINT2 ("EXECUTING charset%s.\n", negate ? "_not" : "");
PREFETCH ();
c = TRANSLATE (*d); /* The character to match. */
#ifdef WCHAR
@@ -6640,20 +6543,20 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
if (c == *workp)
goto char_set_matched;
- not = !not;
+ negate = !negate;
char_set_matched:
- if (not) goto fail;
+ if (negate) goto fail;
#else
/* Cast to `unsigned' instead of `unsigned char' in case the
bit list is a full 32 bytes long. */
if (c < (unsigned) (*p * BYTEWIDTH)
&& p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
- not = !not;
+ negate = !negate;
p += 1 + *p;
- if (!not) goto fail;
+ if (!negate) goto fail;
#undef WORK_BUFFER_SIZE
#endif /* WCHAR */
SET_REGS_MATCHED ();
@@ -7143,15 +7046,15 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
else if ((re_opcode_t) p1[3] == charset
|| (re_opcode_t) p1[3] == charset_not)
{
- int not = (re_opcode_t) p1[3] == charset_not;
+ int negate = (re_opcode_t) p1[3] == charset_not;
if (c < (unsigned) (p1[4] * BYTEWIDTH)
&& p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
- not = !not;
+ negate = !negate;
- /* `not' is equal to 1 if c would match, which means
+ /* `negate' is equal to 1 if c would match, which means
that we can't change to pop_failure_jump. */
- if (!not)
+ if (!negate)
{
p[-3] = (unsigned char) pop_failure_jump;
DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
@@ -7591,9 +7494,8 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
We don't handle duplicates properly (yet). */
static boolean
-PREFIX(group_match_null_string_p) (p, end, reg_info)
- UCHAR_T **p, *end;
- PREFIX(register_info_type) *reg_info;
+PREFIX(group_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info)
{
int mcnt;
/* Point to after the args to the start_memory. */
@@ -7703,9 +7605,8 @@ PREFIX(group_match_null_string_p) (p, end, reg_info)
byte past the last. The alternative can contain groups. */
static boolean
-PREFIX(alt_match_null_string_p) (p, end, reg_info)
- UCHAR_T *p, *end;
- PREFIX(register_info_type) *reg_info;
+PREFIX(alt_match_null_string_p) (UCHAR_T *p, UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info)
{
int mcnt;
UCHAR_T *p1 = p;
@@ -7740,9 +7641,8 @@ PREFIX(alt_match_null_string_p) (p, end, reg_info)
Sets P to one after the op and its arguments, if any. */
static boolean
-PREFIX(common_op_match_null_string_p) (p, end, reg_info)
- UCHAR_T **p, *end;
- PREFIX(register_info_type) *reg_info;
+PREFIX(common_op_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info)
{
int mcnt;
boolean ret;
@@ -7828,10 +7728,8 @@ PREFIX(common_op_match_null_string_p) (p, end, reg_info)
bytes; nonzero otherwise. */
static int
-PREFIX(bcmp_translate) (s1, s2, len, translate)
- const CHAR_T *s1, *s2;
- register int len;
- RE_TRANSLATE_TYPE translate;
+PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2, register int len,
+ RE_TRANSLATE_TYPE translate)
{
register const UCHAR_T *p1 = (const UCHAR_T *) s1;
register const UCHAR_T *p2 = (const UCHAR_T *) s2;
@@ -7864,10 +7762,8 @@ PREFIX(bcmp_translate) (s1, s2, len, translate)
We call regex_compile to do the actual compilation. */
const char *
-re_compile_pattern (pattern, length, bufp)
- const char *pattern;
- size_t length;
- struct re_pattern_buffer *bufp;
+re_compile_pattern (const char *pattern, size_t length,
+ struct re_pattern_buffer *bufp)
{
reg_errcode_t ret;
@@ -7913,15 +7809,14 @@ char *
regcomp/regexec below without link errors. */
weak_function
#endif
-re_comp (s)
- const char *s;
+re_comp (const char *s)
{
reg_errcode_t ret;
if (!s)
{
if (!re_comp_buf.buffer)
- return gettext ("No previous regular expression");
+ return (char *) gettext ("No previous regular expression");
return 0;
}
@@ -7962,8 +7857,7 @@ int
#ifdef _LIBC
weak_function
#endif
-re_exec (s)
- const char *s;
+re_exec (const char *s)
{
const int len = strlen (s);
return
@@ -8012,10 +7906,7 @@ re_exec (s)
the return codes and their meanings.) */
int
-regcomp (preg, pattern, cflags)
- regex_t *preg;
- const char *pattern;
- int cflags;
+regcomp (regex_t *preg, const char *pattern, int cflags)
{
reg_errcode_t ret;
reg_syntax_t syntax
@@ -8032,7 +7923,7 @@ regcomp (preg, pattern, cflags)
if (cflags & REG_ICASE)
{
- unsigned i;
+ int i;
preg->translate
= (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
@@ -8042,7 +7933,7 @@ regcomp (preg, pattern, cflags)
/* Map uppercase characters to corresponding lowercase ones. */
for (i = 0; i < CHAR_SET_SIZE; i++)
- preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : (int) i;
+ preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
}
else
preg->translate = NULL;
@@ -8108,12 +7999,8 @@ weak_alias (__regcomp, regcomp)
We return 0 if we find a match and REG_NOMATCH if not. */
int
-regexec (preg, string, nmatch, pmatch, eflags)
- const regex_t *preg;
- const char *string;
- size_t nmatch;
- regmatch_t pmatch[];
- int eflags;
+regexec (const regex_t *preg, const char *string, size_t nmatch,
+ regmatch_t pmatch[], int eflags)
{
int ret;
struct re_registers regs;
@@ -8175,11 +8062,8 @@ weak_alias (__regexec, regexec)
from either regcomp or regexec. We don't use PREG here. */
size_t
-regerror (errcode, preg, errbuf, errbuf_size)
- int errcode;
- const regex_t *preg ATTRIBUTE_UNUSED;
- char *errbuf;
- size_t errbuf_size;
+regerror (int errcode, const regex_t *preg ATTRIBUTE_UNUSED,
+ char *errbuf, size_t errbuf_size)
{
const char *msg;
size_t msg_size;
@@ -8222,8 +8106,7 @@ weak_alias (__regerror, regerror)
/* Free dynamically allocated space used by PREG. */
void
-regfree (preg)
- regex_t *preg;
+regfree (regex_t *preg)
{
if (preg->buffer != NULL)
free (preg->buffer);
diff --git a/contrib/binutils/libiberty/rename.c b/contrib/binutils/libiberty/rename.c
index 399980ab7d7e..ad342ffca65c 100644
--- a/contrib/binutils/libiberty/rename.c
+++ b/contrib/binutils/libiberty/rename.c
@@ -22,9 +22,7 @@ exists, it is removed.
#endif
int
-rename (zfrom, zto)
- const char *zfrom;
- const char *zto;
+rename (const char *zfrom, const char *zto)
{
if (link (zfrom, zto) < 0)
{
diff --git a/contrib/binutils/libiberty/rindex.c b/contrib/binutils/libiberty/rindex.c
index ef9cdc59877d..194ef9fad786 100644
--- a/contrib/binutils/libiberty/rindex.c
+++ b/contrib/binutils/libiberty/rindex.c
@@ -12,12 +12,10 @@ deprecated in new programs in favor of @code{strrchr}.
*/
-extern char *strrchr ();
+extern char *strrchr (const char *, int);
char *
-rindex (s, c)
- char *s;
- int c;
+rindex (const char *s, int c)
{
return strrchr (s, c);
}
diff --git a/contrib/binutils/libiberty/safe-ctype.c b/contrib/binutils/libiberty/safe-ctype.c
index 91a0e9a25898..0972b4b354fa 100644
--- a/contrib/binutils/libiberty/safe-ctype.c
+++ b/contrib/binutils/libiberty/safe-ctype.c
@@ -1,6 +1,7 @@
/* <ctype.h> replacement macros.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc.
Contributed by Zack Weinberg <zackw@stanford.edu>.
This file is part of the libiberty library.
@@ -16,8 +17,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/*
diff --git a/contrib/binutils/libiberty/setenv.c b/contrib/binutils/libiberty/setenv.c
index 8394fafe4e16..355af5a9dd67 100644
--- a/contrib/binutils/libiberty/setenv.c
+++ b/contrib/binutils/libiberty/setenv.c
@@ -13,8 +13,8 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/*
@@ -80,10 +80,7 @@ static char **last_environ;
int
-setenv (name, value, replace)
- const char *name;
- const char *value;
- int replace;
+setenv (const char *name, const char *value, int replace)
{
register char **ep = 0;
register size_t size;
@@ -118,7 +115,7 @@ setenv (name, value, replace)
return -1;
}
- new_environ[size] = malloc (namelen + 1 + vallen);
+ new_environ[size] = (char *) malloc (namelen + 1 + vallen);
if (new_environ[size] == NULL)
{
free ((char *) new_environ);
@@ -145,13 +142,13 @@ setenv (name, value, replace)
if (len + 1 < namelen + 1 + vallen)
{
/* The existing string is too short; malloc a new one. */
- char *new = malloc (namelen + 1 + vallen);
- if (new == NULL)
+ char *new_string = (char *) malloc (namelen + 1 + vallen);
+ if (new_string == NULL)
{
UNLOCK;
return -1;
}
- *ep = new;
+ *ep = new_string;
}
memcpy (*ep, name, namelen);
(*ep)[namelen] = '=';
@@ -164,8 +161,7 @@ setenv (name, value, replace)
}
void
-unsetenv (name)
- const char *name;
+unsetenv (const char *name)
{
const size_t len = strlen (name);
char **ep;
diff --git a/contrib/binutils/libiberty/sigsetmask.c b/contrib/binutils/libiberty/sigsetmask.c
index 4de3e4b1eb82..3b708b16adb4 100644
--- a/contrib/binutils/libiberty/sigsetmask.c
+++ b/contrib/binutils/libiberty/sigsetmask.c
@@ -21,21 +21,20 @@ be the value @code{1}).
#include <sys/types.h>
#include <signal.h>
-extern void abort PARAMS ((void)) ATTRIBUTE_NORETURN;
+extern void abort (void) ATTRIBUTE_NORETURN;
#ifdef SIG_SETMASK
int
-sigsetmask (set)
- int set;
+sigsetmask (int set)
{
- sigset_t new;
- sigset_t old;
+ sigset_t new_sig;
+ sigset_t old_sig;
- sigemptyset (&new);
+ sigemptyset (&new_sig);
if (set != 0) {
abort(); /* FIXME, we don't know how to translate old mask to new */
}
- sigprocmask(SIG_SETMASK, &new, &old);
+ sigprocmask(SIG_SETMASK, &new_sig, &old_sig);
return 1; /* FIXME, we always return 1 as old value. */
}
#endif
diff --git a/contrib/binutils/libiberty/sort.c b/contrib/binutils/libiberty/sort.c
index 90c97e04e07f..3738dd733e58 100644
--- a/contrib/binutils/libiberty/sort.c
+++ b/contrib/binutils/libiberty/sort.c
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -44,10 +44,7 @@ Boston, MA 02111-1307, USA. */
/* POINTERS and WORK are both arrays of N pointers. When this
function returns POINTERS will be sorted in ascending order. */
-void sort_pointers (n, pointers, work)
- size_t n;
- void **pointers;
- void **work;
+void sort_pointers (size_t n, void **pointers, void **work)
{
/* The type of a single digit. This can be any unsigned integral
type. When changing this, DIGIT_MAX should be changed as
@@ -140,8 +137,7 @@ void sort_pointers (n, pointers, work)
#include <stdio.h>
-void *xmalloc (n)
- size_t n;
+void *xmalloc (size_t n)
{
return malloc (n);
}
@@ -159,8 +155,8 @@ int main (int argc, char **argv)
else
k = 10;
- pointers = xmalloc (k * sizeof (void *));
- work = xmalloc (k * sizeof (void *));
+ pointers = XNEWVEC (void*, k);
+ work = XNEWVEC (void*, k);
for (i = 0; i < k; ++i)
{
diff --git a/contrib/binutils/libiberty/spaces.c b/contrib/binutils/libiberty/spaces.c
index bfead7ed7a4a..67481c9bcd8f 100644
--- a/contrib/binutils/libiberty/spaces.c
+++ b/contrib/binutils/libiberty/spaces.c
@@ -14,8 +14,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/*
@@ -29,6 +29,9 @@ valid until at least the next call.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "ansidecl.h"
#include "libiberty.h"
@@ -37,13 +40,12 @@ valid until at least the next call.
#include <unixlib.h>
#else
/* For systems with larger pointers than ints, these must be declared. */
-extern PTR malloc PARAMS ((size_t));
-extern void free PARAMS ((PTR));
+extern PTR malloc (size_t);
+extern void free (PTR);
#endif
const char *
-spaces (count)
- int count;
+spaces (int count)
{
register char *t;
static char *buf;
@@ -55,7 +57,7 @@ spaces (count)
{
free (buf);
}
- buf = malloc (count + 1);
+ buf = (char *) malloc (count + 1);
if (buf == (char *) 0)
return 0;
for (t = buf + count ; t != buf ; )
diff --git a/contrib/binutils/libiberty/splay-tree.c b/contrib/binutils/libiberty/splay-tree.c
index fc98db167f32..060f900ae0a0 100644
--- a/contrib/binutils/libiberty/splay-tree.c
+++ b/contrib/binutils/libiberty/splay-tree.c
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* For an easily readable description of splay-trees, see:
@@ -37,166 +37,164 @@ Boston, MA 02111-1307, USA. */
#include "libiberty.h"
#include "splay-tree.h"
-static void splay_tree_delete_helper PARAMS((splay_tree,
- splay_tree_node));
-static void splay_tree_splay PARAMS((splay_tree,
- splay_tree_key));
-static splay_tree_node splay_tree_splay_helper
- PARAMS((splay_tree,
- splay_tree_key,
- splay_tree_node*,
- splay_tree_node*,
- splay_tree_node*));
-static int splay_tree_foreach_helper PARAMS((splay_tree,
- splay_tree_node,
- splay_tree_foreach_fn,
- void*));
+static void splay_tree_delete_helper (splay_tree, splay_tree_node);
+static inline void rotate_left (splay_tree_node *,
+ splay_tree_node, splay_tree_node);
+static inline void rotate_right (splay_tree_node *,
+ splay_tree_node, splay_tree_node);
+static void splay_tree_splay (splay_tree, splay_tree_key);
+static int splay_tree_foreach_helper (splay_tree, splay_tree_node,
+ splay_tree_foreach_fn, void*);
/* Deallocate NODE (a member of SP), and all its sub-trees. */
static void
-splay_tree_delete_helper (sp, node)
- splay_tree sp;
- splay_tree_node node;
+splay_tree_delete_helper (splay_tree sp, splay_tree_node node)
{
+ splay_tree_node pending = 0;
+ splay_tree_node active = 0;
+
if (!node)
return;
- splay_tree_delete_helper (sp, node->left);
- splay_tree_delete_helper (sp, node->right);
-
- if (sp->delete_key)
- (*sp->delete_key)(node->key);
- if (sp->delete_value)
- (*sp->delete_value)(node->value);
-
- (*sp->deallocate) ((char*) node, sp->allocate_data);
-}
-
-/* Help splay SP around KEY. PARENT and GRANDPARENT are the parent
- and grandparent, respectively, of NODE. */
+#define KDEL(x) if (sp->delete_key) (*sp->delete_key)(x);
+#define VDEL(x) if (sp->delete_value) (*sp->delete_value)(x);
-static splay_tree_node
-splay_tree_splay_helper (sp, key, node, parent, grandparent)
- splay_tree sp;
- splay_tree_key key;
- splay_tree_node *node;
- splay_tree_node *parent;
- splay_tree_node *grandparent;
-{
- splay_tree_node *next;
- splay_tree_node n;
- int comparison;
-
- n = *node;
-
- if (!n)
- return *parent;
+ KDEL (node->key);
+ VDEL (node->value);
- comparison = (*sp->comp) (key, n->key);
+ /* We use the "key" field to hold the "next" pointer. */
+ node->key = (splay_tree_key)pending;
+ pending = (splay_tree_node)node;
- if (comparison == 0)
- /* We've found the target. */
- next = 0;
- else if (comparison < 0)
- /* The target is to the left. */
- next = &n->left;
- else
- /* The target is to the right. */
- next = &n->right;
+ /* Now, keep processing the pending list until there aren't any
+ more. This is a little more complicated than just recursing, but
+ it doesn't toast the stack for large trees. */
- if (next)
+ while (pending)
{
- /* Continue down the tree. */
- n = splay_tree_splay_helper (sp, key, next, node, parent);
+ active = pending;
+ pending = 0;
+ while (active)
+ {
+ splay_tree_node temp;
- /* The recursive call will change the place to which NODE
- points. */
- if (*node != n)
- return n;
- }
+ /* active points to a node which has its key and value
+ deallocated, we just need to process left and right. */
- if (!parent)
- /* NODE is the root. We are done. */
- return n;
+ if (active->left)
+ {
+ KDEL (active->left->key);
+ VDEL (active->left->value);
+ active->left->key = (splay_tree_key)pending;
+ pending = (splay_tree_node)(active->left);
+ }
+ if (active->right)
+ {
+ KDEL (active->right->key);
+ VDEL (active->right->value);
+ active->right->key = (splay_tree_key)pending;
+ pending = (splay_tree_node)(active->right);
+ }
- /* First, handle the case where there is no grandparent (i.e.,
- *PARENT is the root of the tree.) */
- if (!grandparent)
- {
- if (n == (*parent)->left)
- {
- *node = n->right;
- n->right = *parent;
+ temp = active;
+ active = (splay_tree_node)(temp->key);
+ (*sp->deallocate) ((char*) temp, sp->allocate_data);
}
- else
- {
- *node = n->left;
- n->left = *parent;
- }
- *parent = n;
- return n;
}
+#undef KDEL
+#undef VDEL
+}
- /* Next handle the cases where both N and *PARENT are left children,
- or where both are right children. */
- if (n == (*parent)->left && *parent == (*grandparent)->left)
- {
- splay_tree_node p = *parent;
-
- (*grandparent)->left = p->right;
- p->right = *grandparent;
- p->left = n->right;
- n->right = p;
- *grandparent = n;
- return n;
- }
- else if (n == (*parent)->right && *parent == (*grandparent)->right)
- {
- splay_tree_node p = *parent;
-
- (*grandparent)->right = p->left;
- p->left = *grandparent;
- p->right = n->left;
- n->left = p;
- *grandparent = n;
- return n;
- }
+/* Rotate the edge joining the left child N with its parent P. PP is the
+ grandparents pointer to P. */
- /* Finally, deal with the case where N is a left child, but *PARENT
- is a right child, or vice versa. */
- if (n == (*parent)->left)
- {
- (*parent)->left = n->right;
- n->right = *parent;
- (*grandparent)->right = n->left;
- n->left = *grandparent;
- *grandparent = n;
- return n;
- }
- else
- {
- (*parent)->right = n->left;
- n->left = *parent;
- (*grandparent)->left = n->right;
- n->right = *grandparent;
- *grandparent = n;
- return n;
- }
+static inline void
+rotate_left (splay_tree_node *pp, splay_tree_node p, splay_tree_node n)
+{
+ splay_tree_node tmp;
+ tmp = n->right;
+ n->right = p;
+ p->left = tmp;
+ *pp = n;
+}
+
+/* Rotate the edge joining the right child N with its parent P. PP is the
+ grandparents pointer to P. */
+
+static inline void
+rotate_right (splay_tree_node *pp, splay_tree_node p, splay_tree_node n)
+{
+ splay_tree_node tmp;
+ tmp = n->left;
+ n->left = p;
+ p->right = tmp;
+ *pp = n;
}
-/* Splay SP around KEY. */
+/* Bottom up splay of key. */
static void
-splay_tree_splay (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_splay (splay_tree sp, splay_tree_key key)
{
if (sp->root == 0)
return;
- splay_tree_splay_helper (sp, key, &sp->root,
- /*grandparent=*/0, /*parent=*/0);
+ do {
+ int cmp1, cmp2;
+ splay_tree_node n, c;
+
+ n = sp->root;
+ cmp1 = (*sp->comp) (key, n->key);
+
+ /* Found. */
+ if (cmp1 == 0)
+ return;
+
+ /* Left or right? If no child, then we're done. */
+ if (cmp1 < 0)
+ c = n->left;
+ else
+ c = n->right;
+ if (!c)
+ return;
+
+ /* Next one left or right? If found or no child, we're done
+ after one rotation. */
+ cmp2 = (*sp->comp) (key, c->key);
+ if (cmp2 == 0
+ || (cmp2 < 0 && !c->left)
+ || (cmp2 > 0 && !c->right))
+ {
+ if (cmp1 < 0)
+ rotate_left (&sp->root, n, c);
+ else
+ rotate_right (&sp->root, n, c);
+ return;
+ }
+
+ /* Now we have the four cases of double-rotation. */
+ if (cmp1 < 0 && cmp2 < 0)
+ {
+ rotate_left (&n->left, c, c->left);
+ rotate_left (&sp->root, n, n->left);
+ }
+ else if (cmp1 > 0 && cmp2 > 0)
+ {
+ rotate_right (&n->right, c, c->right);
+ rotate_right (&sp->root, n, n->right);
+ }
+ else if (cmp1 < 0 && cmp2 > 0)
+ {
+ rotate_right (&n->left, c, c->right);
+ rotate_left (&sp->root, n, n->left);
+ }
+ else if (cmp1 > 0 && cmp2 < 0)
+ {
+ rotate_left (&n->right, c, c->left);
+ rotate_right (&sp->root, n, n->right);
+ }
+ } while (1);
}
/* Call FN, passing it the DATA, for every node below NODE, all of
@@ -205,11 +203,8 @@ splay_tree_splay (sp, key)
value is returned. Otherwise, this function returns 0. */
static int
-splay_tree_foreach_helper (sp, node, fn, data)
- splay_tree sp;
- splay_tree_node node;
- splay_tree_foreach_fn fn;
- void* data;
+splay_tree_foreach_helper (splay_tree sp, splay_tree_node node,
+ splay_tree_foreach_fn fn, void *data)
{
int val;
@@ -230,17 +225,13 @@ splay_tree_foreach_helper (sp, node, fn, data)
/* An allocator and deallocator based on xmalloc. */
static void *
-splay_tree_xmalloc_allocate (size, data)
- int size;
- void *data ATTRIBUTE_UNUSED;
+splay_tree_xmalloc_allocate (int size, void *data ATTRIBUTE_UNUSED)
{
return (void *) xmalloc (size);
}
static void
-splay_tree_xmalloc_deallocate (object, data)
- void *object;
- void *data ATTRIBUTE_UNUSED;
+splay_tree_xmalloc_deallocate (void *object, void *data ATTRIBUTE_UNUSED)
{
free (object);
}
@@ -252,10 +243,9 @@ splay_tree_xmalloc_deallocate (object, data)
nodes added. */
splay_tree
-splay_tree_new (compare_fn, delete_key_fn, delete_value_fn)
- splay_tree_compare_fn compare_fn;
- splay_tree_delete_key_fn delete_key_fn;
- splay_tree_delete_value_fn delete_value_fn;
+splay_tree_new (splay_tree_compare_fn compare_fn,
+ splay_tree_delete_key_fn delete_key_fn,
+ splay_tree_delete_value_fn delete_value_fn)
{
return (splay_tree_new_with_allocator
(compare_fn, delete_key_fn, delete_value_fn,
@@ -268,14 +258,12 @@ splay_tree_new (compare_fn, delete_key_fn, delete_value_fn)
values. */
splay_tree
-splay_tree_new_with_allocator (compare_fn, delete_key_fn, delete_value_fn,
- allocate_fn, deallocate_fn, allocate_data)
- splay_tree_compare_fn compare_fn;
- splay_tree_delete_key_fn delete_key_fn;
- splay_tree_delete_value_fn delete_value_fn;
- splay_tree_allocate_fn allocate_fn;
- splay_tree_deallocate_fn deallocate_fn;
- void *allocate_data;
+splay_tree_new_with_allocator (splay_tree_compare_fn compare_fn,
+ splay_tree_delete_key_fn delete_key_fn,
+ splay_tree_delete_value_fn delete_value_fn,
+ splay_tree_allocate_fn allocate_fn,
+ splay_tree_deallocate_fn deallocate_fn,
+ void *allocate_data)
{
splay_tree sp = (splay_tree) (*allocate_fn) (sizeof (struct splay_tree_s),
allocate_data);
@@ -293,8 +281,7 @@ splay_tree_new_with_allocator (compare_fn, delete_key_fn, delete_value_fn,
/* Deallocate SP. */
void
-splay_tree_delete (sp)
- splay_tree sp;
+splay_tree_delete (splay_tree sp)
{
splay_tree_delete_helper (sp, sp->root);
(*sp->deallocate) ((char*) sp, sp->allocate_data);
@@ -305,10 +292,7 @@ splay_tree_delete (sp)
with the new value. Returns the new node. */
splay_tree_node
-splay_tree_insert (sp, key, value)
- splay_tree sp;
- splay_tree_key key;
- splay_tree_value value;
+splay_tree_insert (splay_tree sp, splay_tree_key key, splay_tree_value value)
{
int comparison = 0;
@@ -360,9 +344,7 @@ splay_tree_insert (sp, key, value)
/* Remove KEY from SP. It is not an error if it did not exist. */
void
-splay_tree_remove (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_remove (splay_tree sp, splay_tree_key key)
{
splay_tree_splay (sp, key);
@@ -402,9 +384,7 @@ splay_tree_remove (sp, key)
otherwise. */
splay_tree_node
-splay_tree_lookup (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_lookup (splay_tree sp, splay_tree_key key)
{
splay_tree_splay (sp, key);
@@ -417,8 +397,7 @@ splay_tree_lookup (sp, key)
/* Return the node in SP with the greatest key. */
splay_tree_node
-splay_tree_max (sp)
- splay_tree sp;
+splay_tree_max (splay_tree sp)
{
splay_tree_node n = sp->root;
@@ -434,8 +413,7 @@ splay_tree_max (sp)
/* Return the node in SP with the smallest key. */
splay_tree_node
-splay_tree_min (sp)
- splay_tree sp;
+splay_tree_min (splay_tree sp)
{
splay_tree_node n = sp->root;
@@ -452,9 +430,7 @@ splay_tree_min (sp)
predecessor. KEY need not be present in the tree. */
splay_tree_node
-splay_tree_predecessor (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_predecessor (splay_tree sp, splay_tree_key key)
{
int comparison;
splay_tree_node node;
@@ -485,9 +461,7 @@ splay_tree_predecessor (sp, key)
successor. KEY need not be present in the tree. */
splay_tree_node
-splay_tree_successor (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_successor (splay_tree sp, splay_tree_key key)
{
int comparison;
splay_tree_node node;
@@ -520,10 +494,7 @@ splay_tree_successor (sp, key)
Otherwise, this function returns 0. */
int
-splay_tree_foreach (sp, fn, data)
- splay_tree sp;
- splay_tree_foreach_fn fn;
- void *data;
+splay_tree_foreach (splay_tree sp, splay_tree_foreach_fn fn, void *data)
{
return splay_tree_foreach_helper (sp, sp->root, fn, data);
}
@@ -531,9 +502,7 @@ splay_tree_foreach (sp, fn, data)
/* Splay-tree comparison function, treating the keys as ints. */
int
-splay_tree_compare_ints (k1, k2)
- splay_tree_key k1;
- splay_tree_key k2;
+splay_tree_compare_ints (splay_tree_key k1, splay_tree_key k2)
{
if ((int) k1 < (int) k2)
return -1;
@@ -546,9 +515,7 @@ splay_tree_compare_ints (k1, k2)
/* Splay-tree comparison function, treating the keys as pointers. */
int
-splay_tree_compare_pointers (k1, k2)
- splay_tree_key k1;
- splay_tree_key k2;
+splay_tree_compare_pointers (splay_tree_key k1, splay_tree_key k2)
{
if ((char*) k1 < (char*) k2)
return -1;
diff --git a/contrib/binutils/libiberty/strcasecmp.c b/contrib/binutils/libiberty/strcasecmp.c
index d2608dc0b878..131d81c2ce78 100644
--- a/contrib/binutils/libiberty/strcasecmp.c
+++ b/contrib/binutils/libiberty/strcasecmp.c
@@ -25,11 +25,7 @@ static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
#endif /* LIBC_SCCS and not lint */
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
/*
* This array is designed for mapping upper and lower case letter
@@ -73,8 +69,7 @@ static const unsigned char charmap[] = {
};
int
-strcasecmp(s1, s2)
- const char *s1, *s2;
+strcasecmp(const char *s1, const char *s2)
{
register unsigned char u1, u2;
diff --git a/contrib/binutils/libiberty/strchr.c b/contrib/binutils/libiberty/strchr.c
index 1f71c5143d08..935805ef4f4d 100644
--- a/contrib/binutils/libiberty/strchr.c
+++ b/contrib/binutils/libiberty/strchr.c
@@ -16,9 +16,7 @@ null character, the results are undefined.
#include <ansidecl.h>
char *
-strchr (s, c)
- register const char *s;
- int c;
+strchr (register const char *s, int c)
{
do {
if (*s == c)
diff --git a/contrib/binutils/libiberty/strdup.c b/contrib/binutils/libiberty/strdup.c
index a3f17d3bcb1e..78c2093b61a3 100644
--- a/contrib/binutils/libiberty/strdup.c
+++ b/contrib/binutils/libiberty/strdup.c
@@ -10,19 +10,14 @@ Returns a pointer to a copy of @var{s} in memory obtained from
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-extern size_t strlen PARAMS ((const char*));
-extern PTR malloc PARAMS ((size_t));
-extern PTR memcpy PARAMS ((PTR, const PTR, size_t));
+extern size_t strlen (const char*);
+extern PTR malloc (size_t);
+extern PTR memcpy (PTR, const PTR, size_t);
char *
-strdup(s)
- const char *s;
+strdup(const char *s)
{
size_t len = strlen (s) + 1;
char *result = (char*) malloc (len);
diff --git a/contrib/binutils/libiberty/strerror.c b/contrib/binutils/libiberty/strerror.c
index 83a5992b4dd9..0efadc3d65eb 100644
--- a/contrib/binutils/libiberty/strerror.c
+++ b/contrib/binutils/libiberty/strerror.c
@@ -2,9 +2,6 @@
Written by Fred Fish. fnf@cygnus.com
This file is in the public domain. --Per Bothner. */
-#include "ansidecl.h"
-#include "libiberty.h"
-
#include "config.h"
#ifdef HAVE_SYS_ERRLIST
@@ -17,6 +14,9 @@
#define sys_errlist sys_errlist__
#endif
+#include "ansidecl.h"
+#include "libiberty.h"
+
#include <stdio.h>
#include <errno.h>
@@ -43,7 +43,7 @@ extern PTR memset ();
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
-static void init_error_tables PARAMS ((void));
+static void init_error_tables (void);
/* Translation table for errno values. See intro(2) in most UNIX systems
Programmers Reference Manuals.
@@ -503,7 +503,7 @@ BUGS
*/
static void
-init_error_tables ()
+init_error_tables (void)
{
const struct error_info *eip;
int nbytes;
@@ -584,7 +584,7 @@ symbolic name or message.
*/
int
-errno_max ()
+errno_max (void)
{
int maxsize;
@@ -623,8 +623,7 @@ next call to @code{strerror}.
*/
char *
-strerror (errnoval)
- int errnoval;
+strerror (int errnoval)
{
const char *msg;
static char buf[32];
@@ -690,8 +689,7 @@ valid until the next call to @code{strerrno}.
*/
const char *
-strerrno (errnoval)
- int errnoval;
+strerrno (int errnoval)
{
const char *name;
static char buf[32];
@@ -738,8 +736,7 @@ to an errno value. If no translation is found, returns 0.
*/
int
-strtoerrno (name)
- const char *name;
+strtoerrno (const char *name)
{
int errnoval = 0;
@@ -779,7 +776,7 @@ strtoerrno (name)
#include <stdio.h>
int
-main ()
+main (void)
{
int errn;
int errnmax;
diff --git a/contrib/binutils/libiberty/strncasecmp.c b/contrib/binutils/libiberty/strncasecmp.c
index 10feee82198e..47700dde5183 100644
--- a/contrib/binutils/libiberty/strncasecmp.c
+++ b/contrib/binutils/libiberty/strncasecmp.c
@@ -25,11 +25,7 @@ static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
#endif /* LIBC_SCCS and not lint */
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
/*
* This array is designed for mapping upper and lower case letter
@@ -72,9 +68,7 @@ static const unsigned char charmap[] = {
};
int
-strncasecmp(s1, s2, n)
- const char *s1, *s2;
- register size_t n;
+strncasecmp(const char *s1, const char *s2, register size_t n)
{
register unsigned char u1, u2;
diff --git a/contrib/binutils/libiberty/strncmp.c b/contrib/binutils/libiberty/strncmp.c
index ad87e1fde8ba..916c2f07a8a8 100644
--- a/contrib/binutils/libiberty/strncmp.c
+++ b/contrib/binutils/libiberty/strncmp.c
@@ -13,16 +13,10 @@ Compares the first @var{n} bytes of two strings, returning a value as
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
int
-strncmp(s1, s2, n)
- const char *s1, *s2;
- register size_t n;
+strncmp(const char *s1, const char *s2, register size_t n)
{
register unsigned char u1, u2;
diff --git a/contrib/binutils/libiberty/strrchr.c b/contrib/binutils/libiberty/strrchr.c
index bc380c4c5d30..5cf7c14d8b74 100644
--- a/contrib/binutils/libiberty/strrchr.c
+++ b/contrib/binutils/libiberty/strrchr.c
@@ -16,9 +16,7 @@ null character, the results are undefined.
#include <ansidecl.h>
char *
-strrchr (s, c)
- register const char *s;
- int c;
+strrchr (register const char *s, int c)
{
char *rtnval = 0;
diff --git a/contrib/binutils/libiberty/strsignal.c b/contrib/binutils/libiberty/strsignal.c
index a8a7d341fefa..c3a16ab9bdca 100644
--- a/contrib/binutils/libiberty/strsignal.c
+++ b/contrib/binutils/libiberty/strsignal.c
@@ -2,11 +2,10 @@
Written by Fred Fish. fnf@cygnus.com
This file is in the public domain. */
+#include "config.h"
#include "ansidecl.h"
#include "libiberty.h"
-#include "config.h"
-
/* 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
@@ -42,18 +41,14 @@ extern PTR memset ();
#undef sys_nsig
#ifndef NULL
-# ifdef ANSI_PROTOTYPES
-# define NULL (void *) 0
-# else
-# define NULL 0
-# endif
+# define NULL (void *) 0
#endif
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
-static void init_signal_tables PARAMS ((void));
+static void init_signal_tables (void);
/* Translation table for signal values.
@@ -289,7 +284,7 @@ BUGS
*/
static void
-init_signal_tables ()
+init_signal_tables (void)
{
const struct signal_info *eip;
int nbytes;
@@ -370,7 +365,7 @@ symbolic name or message.
*/
int
-signo_max ()
+signo_max (void)
{
int maxsize;
@@ -410,8 +405,7 @@ call to @code{strsignal}.
#ifndef HAVE_STRSIGNAL
const char *
-strsignal (signo)
- int signo;
+strsignal (int signo)
{
const char *msg;
static char buf[32];
@@ -470,8 +464,7 @@ valid until the next call to @code{strsigno}.
*/
const char *
-strsigno (signo)
- int signo;
+strsigno (int signo)
{
const char *name;
static char buf[32];
@@ -514,8 +507,7 @@ translation is found, returns 0.
*/
int
-strtosigno (name)
- const char *name;
+strtosigno (const char *name)
{
int signo = 0;
@@ -557,9 +549,7 @@ followed by a newline.
#ifndef HAVE_PSIGNAL
void
-psignal (signo, message)
- unsigned signo;
- char *message;
+psignal (unsigned signo, char *message)
{
if (signal_names == NULL)
{
@@ -586,7 +576,7 @@ psignal (signo, message)
#include <stdio.h>
int
-main ()
+main (void)
{
int signo;
int maxsigno;
diff --git a/contrib/binutils/libiberty/strstr.c b/contrib/binutils/libiberty/strstr.c
index a059c7f5dcb3..60902ea40ee8 100644
--- a/contrib/binutils/libiberty/strstr.c
+++ b/contrib/binutils/libiberty/strstr.c
@@ -20,24 +20,22 @@ length, the function returns @var{string}.
/* FIXME: The above description is ANSI compiliant. This routine has not
been validated to comply with it. -fnf */
+#include <stddef.h>
+
+extern char *strchr (const char *, int);
+extern int strncmp (const void *, const void *, size_t);
+extern size_t strlen (const char *);
+
char *
-strstr (s1, s2)
- char *s1, *s2;
+strstr (const char *s1, const char *s2)
{
- register char *p = s1;
- extern char *strchr ();
- extern int strncmp ();
-#if __GNUC__ >= 2
- extern __SIZE_TYPE__ strlen (const char *);
-#endif
- register int len = strlen (s2);
+ const char *p = s1;
+ const size_t len = strlen (s2);
for (; (p = strchr (p, *s2)) != 0; p++)
{
if (strncmp (p, s2, len) == 0)
- {
- return (p);
- }
+ return (char *)p;
}
return (0);
}
diff --git a/contrib/binutils/libiberty/strtod.c b/contrib/binutils/libiberty/strtod.c
index 97fc9339344b..adbc33b0da07 100644
--- a/contrib/binutils/libiberty/strtod.c
+++ b/contrib/binutils/libiberty/strtod.c
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does not cause
@@ -40,16 +40,14 @@ the location referenced by @var{endptr}.
#include "ansidecl.h"
#include "safe-ctype.h"
-extern double atof ();
+extern double atof (const char *);
/* Disclaimer: this is currently just used by CHILL in GDB and therefore
has not been tested well. It may have been tested for nothing except
that it compiles. */
double
-strtod (str, ptr)
- char *str;
- char **ptr;
+strtod (char *str, char **ptr)
{
char *p;
diff --git a/contrib/binutils/libiberty/strtol.c b/contrib/binutils/libiberty/strtol.c
index d9f54cc8f7ac..acc7882192bb 100644
--- a/contrib/binutils/libiberty/strtol.c
+++ b/contrib/binutils/libiberty/strtol.c
@@ -85,10 +85,7 @@ extern int errno;
* alphabets and digits are each contiguous.
*/
long
-strtol(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
+strtol(const char *nptr, char **endptr, register int base)
{
register const char *s = nptr;
register unsigned long acc;
@@ -147,7 +144,7 @@ strtol(nptr, endptr, base)
break;
if (c >= base)
break;
- if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
+ if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;
diff --git a/contrib/binutils/libiberty/strtoul.c b/contrib/binutils/libiberty/strtoul.c
index 66420f268b28..ba80063531e5 100644
--- a/contrib/binutils/libiberty/strtoul.c
+++ b/contrib/binutils/libiberty/strtoul.c
@@ -58,10 +58,7 @@ extern int errno;
* alphabets and digits are each contiguous.
*/
unsigned long
-strtoul(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
+strtoul(const char *nptr, char **endptr, register int base)
{
register const char *s = nptr;
register unsigned long acc;
diff --git a/contrib/binutils/libiberty/ternary.c b/contrib/binutils/libiberty/ternary.c
index 056d2cee11ee..8fc561a45315 100644
--- a/contrib/binutils/libiberty/ternary.c
+++ b/contrib/binutils/libiberty/ternary.c
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -34,11 +34,7 @@
insertions. */
PTR
-ternary_insert (root, s, data, replace)
- ternary_tree *root;
- const char *s;
- PTR data;
- int replace;
+ternary_insert (ternary_tree *root, const char *s, PTR data, int replace)
{
int diff;
ternary_tree curr, *pcurr;
@@ -78,7 +74,7 @@ ternary_insert (root, s, data, replace)
for (;;)
{
/* Allocate the memory for the node, and fill it in */
- *pcurr = (ternary_tree) xmalloc (sizeof (ternary_node));
+ *pcurr = XNEW (ternary_node);
curr = *pcurr;
curr->splitchar = *s;
curr->lokid = curr->hikid = curr->eqkid = 0;
@@ -98,8 +94,7 @@ ternary_insert (root, s, data, replace)
/* Free the ternary search tree rooted at p. */
void
-ternary_cleanup (p)
- ternary_tree p;
+ternary_cleanup (ternary_tree p)
{
if (p)
{
@@ -113,9 +108,7 @@ ternary_cleanup (p)
/* Non-recursive find of a string in the ternary tree */
PTR
-ternary_search (p, s)
- const ternary_node *p;
- const char *s;
+ternary_search (const ternary_node *p, const char *s)
{
const ternary_node *curr;
int diff, spchar;
@@ -147,9 +140,7 @@ ternary_search (p, s)
/* For those who care, the recursive version of the search. Useful if
you want a starting point for pmsearch or nearsearch. */
static PTR
-ternary_recursivesearch (p, s)
- const ternary_node *p;
- const char *s;
+ternary_recursivesearch (const ternary_node *p, const char *s)
{
if (!p)
return 0;
diff --git a/contrib/binutils/libiberty/tmpnam.c b/contrib/binutils/libiberty/tmpnam.c
index 406878c49a3e..cc343336642f 100644
--- a/contrib/binutils/libiberty/tmpnam.c
+++ b/contrib/binutils/libiberty/tmpnam.c
@@ -24,11 +24,10 @@ not be used in new projects. Use @code{mkstemp} instead.
static char tmpnam_buffer[L_tmpnam];
static int tmpnam_counter;
-extern int getpid ();
+extern int getpid (void);
char *
-tmpnam (s)
- char *s;
+tmpnam (char *s)
{
int pid = getpid ();
diff --git a/contrib/binutils/libiberty/unlink-if-ordinary.c b/contrib/binutils/libiberty/unlink-if-ordinary.c
new file mode 100644
index 000000000000..c03b4dd7c706
--- /dev/null
+++ b/contrib/binutils/libiberty/unlink-if-ordinary.c
@@ -0,0 +1,72 @@
+/* unlink-if-ordinary.c - remove link to a file unless it is special
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+
+This file is part of the libiberty library. This library is free
+software; you can redistribute it and/or modify it under the
+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 library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+As a special exception, if you link this library with files
+compiled with a GNU compiler to produce an executable, this does not cause
+the resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why
+the executable file might be covered by the GNU General Public License. */
+
+/*
+
+@deftypefn Supplemental int unlink_if_ordinary (const char*)
+
+Unlinks the named file, unless it is special (e.g. a device file).
+Returns 0 when the file was unlinked, a negative value (and errno set) when
+there was an error deleting the file, and a positive value if no attempt
+was made to unlink the file because it is special.
+
+@end deftypefn
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#include "libiberty.h"
+
+#ifndef S_ISLNK
+#ifdef S_IFLNK
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#else
+#define S_ISLNK(m) 0
+#define lstat stat
+#endif
+#endif
+
+int
+unlink_if_ordinary (const char *name)
+{
+ struct stat st;
+
+ if (lstat (name, &st) == 0
+ && (S_ISREG (st.st_mode) || S_ISLNK (st.st_mode)))
+ return unlink (name);
+
+ return 1;
+}
diff --git a/contrib/binutils/libiberty/vasprintf.c b/contrib/binutils/libiberty/vasprintf.c
index d3d4f3a1553b..b6cb94e7a22d 100644
--- a/contrib/binutils/libiberty/vasprintf.c
+++ b/contrib/binutils/libiberty/vasprintf.c
@@ -15,17 +15,16 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+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
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
+#if !defined (va_copy) && defined (__va_copy)
+# define va_copy(d,s) __va_copy((d),(s))
#endif
#include <stdio.h>
#ifdef HAVE_STRING_H
@@ -59,13 +58,10 @@ not be allocated, minus one is returned and @code{NULL} is stored in
*/
-static int int_vasprintf PARAMS ((char **, const char *, va_list));
+static int int_vasprintf (char **, const char *, va_list);
static int
-int_vasprintf (result, format, args)
- char **result;
- const char *format;
- va_list args;
+int_vasprintf (char **result, const char *format, va_list args)
{
const char *p = format;
/* Add one to make sure that it is never zero, which might cause malloc
@@ -153,13 +149,11 @@ int_vasprintf (result, format, args)
}
int
-vasprintf (result, format, args)
- char **result;
- const char *format;
+vasprintf (char **result, const char *format,
#if defined (_BSD_VA_LIST_) && defined (__FreeBSD__)
- _BSD_VA_LIST_ args;
+ _BSD_VA_LIST_ args)
#else
- va_list args;
+ va_list args)
#endif
{
return int_vasprintf (result, format, args);
@@ -167,7 +161,7 @@ vasprintf (result, format, args)
#ifdef TEST
static void ATTRIBUTE_PRINTF_1
-checkit VPARAMS ((const char *format, ...))
+checkit (const char *format, ...)
{
char *result;
VA_OPEN (args, format);
@@ -184,10 +178,10 @@ checkit VPARAMS ((const char *format, ...))
free (result);
}
-extern int main PARAMS ((void));
+extern int main (void);
int
-main ()
+main (void)
{
checkit ("%d", 0x12345678);
checkit ("%200d", 5);
diff --git a/contrib/binutils/libiberty/vfork.c b/contrib/binutils/libiberty/vfork.c
index 4aa5c21d4271..eb4ff622b44f 100644
--- a/contrib/binutils/libiberty/vfork.c
+++ b/contrib/binutils/libiberty/vfork.c
@@ -13,10 +13,10 @@ Emulates @code{vfork} by calling @code{fork} and returning its value.
#include "ansidecl.h"
-extern int fork PARAMS ((void));
+extern int fork (void);
int
-vfork ()
+vfork (void)
{
return (fork ());
}
diff --git a/contrib/binutils/libiberty/vfprintf.c b/contrib/binutils/libiberty/vfprintf.c
index 18f09d47d324..9bd3ed555d07 100644
--- a/contrib/binutils/libiberty/vfprintf.c
+++ b/contrib/binutils/libiberty/vfprintf.c
@@ -4,19 +4,12 @@
*/
#include "ansidecl.h"
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <stdio.h>
#undef vfprintf
int
-vfprintf (stream, format, ap)
- FILE * stream;
- const char * format;
- va_list ap;
+vfprintf (FILE *stream, const char *format, va_list ap)
{
return _doprnt (format, ap, stream);
}
diff --git a/contrib/binutils/libiberty/vprintf.c b/contrib/binutils/libiberty/vprintf.c
index 9487896ea5ef..c2553167babc 100644
--- a/contrib/binutils/libiberty/vprintf.c
+++ b/contrib/binutils/libiberty/vprintf.c
@@ -16,17 +16,11 @@ nonstandard but common function @code{_doprnt}.
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <stdio.h>
#undef vprintf
int
-vprintf (format, ap)
- const char *format;
- va_list ap;
+vprintf (const char *format, va_list ap)
{
return vfprintf (stdout, format, ap);
}
diff --git a/contrib/binutils/libiberty/vsprintf.c b/contrib/binutils/libiberty/vsprintf.c
index 9f09d7e27588..99e704493f58 100644
--- a/contrib/binutils/libiberty/vsprintf.c
+++ b/contrib/binutils/libiberty/vsprintf.c
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does not cause
@@ -27,21 +27,14 @@ This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <stdio.h>
#undef vsprintf
#if defined _IOSTRG && defined _IOWRT
int
-vsprintf (buf, format, ap)
- char *buf;
- const char *format;
- va_list ap;
+vsprintf (char *buf, const char *format, va_list ap)
{
FILE b;
int ret;
diff --git a/contrib/binutils/libiberty/waitpid.c b/contrib/binutils/libiberty/waitpid.c
index 6e31f25e3058..fd519d7696e0 100644
--- a/contrib/binutils/libiberty/waitpid.c
+++ b/contrib/binutils/libiberty/waitpid.c
@@ -13,6 +13,7 @@ does the return value. The third argument is unused in @libib{}.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include "ansidecl.h"
/* On some systems (such as WindISS), you must include <sys/types.h>
to get the definition of "pid_t" before you include <sys/wait.h>. */
@@ -23,9 +24,7 @@ does the return value. The third argument is unused in @libib{}.
#endif
pid_t
-waitpid (pid, stat_loc, options)
- pid_t pid;
- int *stat_loc, options;
+waitpid (pid_t pid, int *stat_loc, int options ATTRIBUTE_UNUSED)
{
for (;;)
{
diff --git a/contrib/binutils/libiberty/xatexit.c b/contrib/binutils/libiberty/xatexit.c
index 075599c61f95..6fdad9ed806a 100644
--- a/contrib/binutils/libiberty/xatexit.c
+++ b/contrib/binutils/libiberty/xatexit.c
@@ -22,36 +22,35 @@ failure. If you use @code{xatexit} to register functions, you must use
/* Adapted from newlib/libc/stdlib/{,at}exit.[ch].
If you use xatexit, you must call xexit instead of exit. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "ansidecl.h"
#include "libiberty.h"
#include <stdio.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
#if VMS
#include <stdlib.h>
#include <unixlib.h>
#else
/* For systems with larger pointers than ints, this must be declared. */
-PTR malloc PARAMS ((size_t));
+PTR malloc (size_t);
#endif
-static void xatexit_cleanup PARAMS ((void));
+static void xatexit_cleanup (void);
/* Pointer to function run by xexit. */
-extern void (*_xexit_cleanup) PARAMS ((void));
+extern void (*_xexit_cleanup) (void);
#define XATEXIT_SIZE 32
struct xatexit {
struct xatexit *next; /* next in list */
int ind; /* next index in this table */
- void (*fns[XATEXIT_SIZE]) PARAMS ((void)); /* the table itself */
+ void (*fns[XATEXIT_SIZE]) (void); /* the table itself */
};
/* Allocate one struct statically to guarantee that we can register
@@ -65,8 +64,7 @@ static struct xatexit *xatexit_head = &xatexit_first;
Return 0 if successful, -1 if not. */
int
-xatexit (fn)
- void (*fn) PARAMS ((void));
+xatexit (void (*fn) (void))
{
register struct xatexit *p;
@@ -90,7 +88,7 @@ xatexit (fn)
/* Call any cleanup functions. */
static void
-xatexit_cleanup ()
+xatexit_cleanup (void)
{
register struct xatexit *p;
register int n;
diff --git a/contrib/binutils/libiberty/xexit.c b/contrib/binutils/libiberty/xexit.c
index a65690f09c30..421e5e238419 100644
--- a/contrib/binutils/libiberty/xexit.c
+++ b/contrib/binutils/libiberty/xexit.c
@@ -14,8 +14,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If not, write
-to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/*
@@ -41,11 +41,10 @@ Termination is handled via the system's normal @code{exit} call.
/* This variable is set by xatexit if it is called. This way, xmalloc
doesn't drag xatexit into the link. */
-void (*_xexit_cleanup) PARAMS ((void));
+void (*_xexit_cleanup) (void);
void
-xexit (code)
- int code;
+xexit (int code)
{
if (_xexit_cleanup != NULL)
(*_xexit_cleanup) ();
diff --git a/contrib/binutils/libiberty/xmalloc.c b/contrib/binutils/libiberty/xmalloc.c
index c3fe1a84f4d2..3e97aab563f0 100644
--- a/contrib/binutils/libiberty/xmalloc.c
+++ b/contrib/binutils/libiberty/xmalloc.c
@@ -14,8 +14,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/*
@@ -68,23 +68,30 @@ function will be called to print an error message and terminate execution.
#include <stdio.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#define ptrdiff_t long
-#endif
#if VMS
#include <stdlib.h>
#include <unixlib.h>
#else
/* For systems with larger pointers than ints, these must be declared. */
-PTR malloc PARAMS ((size_t));
-PTR realloc PARAMS ((PTR, size_t));
-PTR calloc PARAMS ((size_t, size_t));
-PTR sbrk PARAMS ((ptrdiff_t));
-#endif
+# if HAVE_STDLIB_H && HAVE_UNISTD_H && HAVE_DECL_MALLOC \
+ && HAVE_DECL_REALLOC && HAVE_DECL_CALLOC && HAVE_DECL_SBRK
+# include <stdlib.h>
+# include <unistd.h>
+# else
+# ifdef __cplusplus
+extern "C" {
+# endif /* __cplusplus */
+void *malloc (size_t);
+void *realloc (void *, size_t);
+void *calloc (size_t, size_t);
+void *sbrk (ptrdiff_t);
+# ifdef __cplusplus
+}
+# endif /* __cplusplus */
+# endif /* HAVE_STDLIB_H ... */
+#endif /* VMS */
/* The program name if set. */
static const char *name = "";
@@ -96,8 +103,7 @@ static char *first_break = NULL;
#endif /* HAVE_SBRK */
void
-xmalloc_set_program_name (s)
- const char *s;
+xmalloc_set_program_name (const char *s)
{
name = s;
#ifdef HAVE_SBRK
@@ -108,8 +114,7 @@ xmalloc_set_program_name (s)
}
void
-xmalloc_failed (size)
- size_t size;
+xmalloc_failed (size_t size)
{
#ifdef HAVE_SBRK
extern char **environ;
@@ -133,8 +138,7 @@ xmalloc_failed (size)
}
PTR
-xmalloc (size)
- size_t size;
+xmalloc (size_t size)
{
PTR newmem;
@@ -148,8 +152,7 @@ xmalloc (size)
}
PTR
-xcalloc (nelem, elsize)
- size_t nelem, elsize;
+xcalloc (size_t nelem, size_t elsize)
{
PTR newmem;
@@ -164,9 +167,7 @@ xcalloc (nelem, elsize)
}
PTR
-xrealloc (oldmem, size)
- PTR oldmem;
- size_t size;
+xrealloc (PTR oldmem, size_t size)
{
PTR newmem;
diff --git a/contrib/binutils/libiberty/xmemdup.c b/contrib/binutils/libiberty/xmemdup.c
index 9e9d66b715db..d4831163a204 100644
--- a/contrib/binutils/libiberty/xmemdup.c
+++ b/contrib/binutils/libiberty/xmemdup.c
@@ -24,15 +24,15 @@ allocated, the remaining memory is zeroed.
#include <sys/types.h> /* For size_t. */
#ifdef HAVE_STRING_H
#include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
#endif
PTR
-xmemdup (input, copy_size, alloc_size)
- const PTR input;
- size_t copy_size;
- size_t alloc_size;
+xmemdup (const PTR input, size_t copy_size, size_t alloc_size)
{
PTR output = xcalloc (1, alloc_size);
- memcpy (output, input, copy_size);
- return output;
+ return (PTR) memcpy (output, input, copy_size);
}
diff --git a/contrib/binutils/libiberty/xstrdup.c b/contrib/binutils/libiberty/xstrdup.c
index 5aa084a76879..9ac2ea038f34 100644
--- a/contrib/binutils/libiberty/xstrdup.c
+++ b/contrib/binutils/libiberty/xstrdup.c
@@ -19,16 +19,18 @@ obtain memory.
#endif
#ifdef HAVE_STRING_H
#include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
#endif
#include "ansidecl.h"
#include "libiberty.h"
char *
-xstrdup (s)
- const char *s;
+xstrdup (const char *s)
{
register size_t len = strlen (s) + 1;
- register char *ret = xmalloc (len);
- memcpy (ret, s, len);
- return ret;
+ register char *ret = XNEWVEC (char, len);
+ return (char *) memcpy (ret, s, len);
}
diff --git a/contrib/binutils/libiberty/xstrerror.c b/contrib/binutils/libiberty/xstrerror.c
index 9000d178f9c2..2ea2200e9fcf 100644
--- a/contrib/binutils/libiberty/xstrerror.c
+++ b/contrib/binutils/libiberty/xstrerror.c
@@ -15,19 +15,32 @@ will never return a @code{NULL} pointer.
#include <stdio.h>
-#include "libiberty.h"
#include "config.h"
+#include "libiberty.h"
#ifdef VMS
-#include <errno.h>
-#if !defined (__STRICT_ANSI__) && !defined (__HIDE_FORBIDDEN_NAMES)
-extern char *strerror PARAMS ((int,...));
-#define DONT_DECLARE_STRERROR
-#endif
-#endif /* VMS */
+# include <errno.h>
+# if !defined (__STRICT_ANSI__) && !defined (__HIDE_FORBIDDEN_NAMES)
+# ifdef __cplusplus
+extern "C" {
+# endif /* __cplusplus */
+extern char *strerror (int,...);
+# define DONT_DECLARE_STRERROR
+# ifdef __cplusplus
+}
+# endif /* __cplusplus */
+# endif
+#endif /* VMS */
+
#ifndef DONT_DECLARE_STRERROR
-extern char *strerror PARAMS ((int));
+# ifdef __cplusplus
+extern "C" {
+# endif /* __cplusplus */
+extern char *strerror (int);
+# ifdef __cplusplus
+}
+# endif /* __cplusplus */
#endif
/* If strerror returns NULL, we'll format the number into a static buffer. */
@@ -38,15 +51,14 @@ static char xstrerror_buf[sizeof ERRSTR_FMT + 20];
/* Like strerror, but result is never a null pointer. */
char *
-xstrerror (errnum)
- int errnum;
+xstrerror (int errnum)
{
char *errstr;
#ifdef VMS
- char *(*vmslib_strerror) PARAMS ((int,...));
+ char *(*vmslib_strerror) (int,...);
/* Override any possibly-conflicting declaration from system header. */
- vmslib_strerror = (char *(*) PARAMS ((int,...))) strerror;
+ vmslib_strerror = (char *(*) (int,...)) strerror;
/* Second argument matters iff first is EVMSERR, but it's simpler to
pass it unconditionally. `vaxc$errno' is declared in <errno.h>
and maintained by the run-time library in parallel to `errno'.
diff --git a/contrib/binutils/libtool.m4 b/contrib/binutils/libtool.m4
index d2e36088dee3..cbd74d57161e 100644
--- a/contrib/binutils/libtool.m4
+++ b/contrib/binutils/libtool.m4
@@ -15,7 +15,7 @@
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+## 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
@@ -103,6 +103,8 @@ AC_REQUIRE([AC_OBJEXT])dnl
AC_REQUIRE([AC_EXEEXT])dnl
dnl
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
@@ -189,6 +191,48 @@ ia64-*-hpux*)
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 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"
+ ;;
+ 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"
@@ -237,6 +281,65 @@ ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
esac
])
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# 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
+ 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
+])
+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])])
@@ -565,6 +668,7 @@ cygwin* | mingw* |pw32*)
;;
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
@@ -575,9 +679,10 @@ darwin* | rhapsody*)
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -635,17 +740,10 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case $host_cpu in
- alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+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
@@ -738,8 +836,9 @@ AC_DEFUN([AC_CHECK_LIBM],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
# These system don't have libm
+ # on darwin the libm is a symbolic link to libSystem.dylib
;;
*-ncr-sysv4.3*)
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
diff --git a/contrib/binutils/ltcf-c.sh b/contrib/binutils/ltcf-c.sh
index d60a3baa19bc..7a91c40a5c6e 100644
--- a/contrib/binutils/ltcf-c.sh
+++ b/contrib/binutils/ltcf-c.sh
@@ -17,7 +17,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 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
@@ -185,7 +185,7 @@ EOF
whole_archive_flag_spec='-all_load $convenience'
;;
- netbsd*)
+ netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@@ -223,6 +223,10 @@ EOF
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'
@@ -409,7 +413,7 @@ else
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd*)
+ freebsd* | kfreebsd*-gnu)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -456,7 +460,7 @@ else
link_all_deplibs=yes
;;
- netbsd*)
+ 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
diff --git a/contrib/binutils/ltcf-cxx.sh b/contrib/binutils/ltcf-cxx.sh
index 9059b1a002f1..fa8dbd08d633 100644
--- a/contrib/binutils/ltcf-cxx.sh
+++ b/contrib/binutils/ltcf-cxx.sh
@@ -22,7 +22,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 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
@@ -244,7 +244,7 @@ case $host_os in
# C++ shared libraries reported to be fairly broken before switch to ELF
ld_shlibs=no
;;
- freebsd*)
+ freebsd* | kfreebsd*-gnu)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
ld_shlibs=yes
@@ -404,7 +404,7 @@ case $host_os in
;;
esac
;;
- netbsd*)
+ netbsd* | knetbsd*-gnu)
# NetBSD uses g++ - do we need to do anything?
;;
osf3*)
@@ -652,6 +652,9 @@ case $host_os in
;;
esac
;;
+ tpf*)
+ ld_shlibs=yes
+ ;;
unixware*)
# FIXME: insert proper C++ library support
ld_shlibs=no
@@ -759,7 +762,7 @@ else
;;
esac
;;
- freebsd*)
+ freebsd* | kfreebsd*-gnu)
# FreeBSD uses GNU C++
;;
gnu*)
diff --git a/contrib/binutils/ltcf-gcj.sh b/contrib/binutils/ltcf-gcj.sh
index 2d704975c86f..51faf04598b8 100644
--- a/contrib/binutils/ltcf-gcj.sh
+++ b/contrib/binutils/ltcf-gcj.sh
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 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
@@ -178,7 +178,7 @@ EOF
$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*)
+ netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@@ -402,7 +402,7 @@ else
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd*)
+ freebsd* | kfreebsd*-gnu)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -433,7 +433,7 @@ else
link_all_deplibs=yes
;;
- netbsd*)
+ 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
diff --git a/contrib/binutils/ltconfig b/contrib/binutils/ltconfig
index 0a8c7d2f4c43..15f986c76d13 100755
--- a/contrib/binutils/ltconfig
+++ b/contrib/binutils/ltconfig
@@ -17,7 +17,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 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
@@ -1164,6 +1164,17 @@ gnu*)
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.
@@ -1360,6 +1371,18 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
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'
@@ -2188,7 +2211,7 @@ case $ltmain in
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 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
@@ -2612,7 +2635,7 @@ EOF
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# */
#
# #include <stdio.h> /* for printf() */
diff --git a/contrib/binutils/ltmain.sh b/contrib/binutils/ltmain.sh
index c3547e5a5616..d5173bc46324 100644
--- a/contrib/binutils/ltmain.sh
+++ b/contrib/binutils/ltmain.sh
@@ -17,7 +17,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 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
@@ -3550,7 +3550,7 @@ EOF
# Now hardcode the library paths
rpath=
hardcode_libdirs=
- for libdir in $compile_rpath $finalize_rpath; do
+ for libdir in $compile_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
@@ -4234,6 +4234,63 @@ fi\
# fi
# done
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # 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
+ do
+ $echo "X$obj" | $Xsed -e 's%^.*/%%'
+ 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
+
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ 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`
+ 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"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+
eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` &&
@@ -4247,6 +4304,7 @@ fi\
objlist=
concat_cmds=
save_oldobjs=$oldobjs
+
for obj in $save_oldobjs
do
oldobjs="$objlist $obj"
diff --git a/contrib/binutils/missing b/contrib/binutils/missing
index 25c96676defa..894e786e16c1 100644
--- a/contrib/binutils/missing
+++ b/contrib/binutils/missing
@@ -1,6 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -15,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., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# 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
@@ -38,18 +42,24 @@ else
configure_ac=configure.in
fi
+msg="missing on your system"
+
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -74,11 +84,15 @@ Supported PROGRAM values:
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing 0.4 - GNU automake"
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
;;
-*)
@@ -87,14 +101,44 @@ Supported PROGRAM values:
exit 1
;;
- aclocal*)
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
fi
+ ;;
+esac
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+ aclocal*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
@@ -102,13 +146,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoconf)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
@@ -116,13 +155,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoheader)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
@@ -140,13 +174,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
automake*)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
@@ -156,14 +185,9 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autom4te)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
@@ -185,7 +209,7 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
bison|yacc)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
@@ -215,7 +239,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
lex|flex)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
@@ -237,13 +261,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
help2man)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
@@ -262,32 +281,30 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
touch $file
;;
tar)
shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
@@ -323,10 +340,10 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
*)
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
+ it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
@@ -334,3 +351,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
esac
exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/contrib/binutils/mkinstalldirs b/contrib/binutils/mkinstalldirs
index d2d5f21b6112..259dbfcd3578 100755
--- a/contrib/binutils/mkinstalldirs
+++ b/contrib/binutils/mkinstalldirs
@@ -1,21 +1,33 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+
+scriptversion=2005-06-29.22
+
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
-# Public domain
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
errstatus=0
-dirmode=""
+dirmode=
usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
- echo "$usage" 1>&2
- exit 0
+ echo "$usage"
+ exit $?
;;
-m) # -m PERM arg
shift
@@ -23,6 +35,10 @@ while test $# -gt 0 ; do
dirmode=$1
shift
;;
+ --version)
+ echo "$0 $scriptversion"
+ exit $?
+ ;;
--) # stop option processing
shift
break
@@ -50,30 +66,58 @@ case $# in
0) exit 0 ;;
esac
+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error. This is a problem when calling mkinstalldirs
+# from a parallel make. We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
- if mkdir -p -- . 2>/dev/null; then
+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
+ else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ test -d ./-p && rmdir ./-p
+ test -d ./--version && rmdir ./--version
fi
;;
*)
- if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+ test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
+ else
+ # Clean up after NextStep and OpenStep mkdir.
+ for d in ./-m ./-p ./--version "./$dirmode";
+ do
+ test -d $d && rmdir $d
+ done
fi
;;
esac
for file
do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ case $file in
+ /*) pathcomp=/ ;;
+ *) pathcomp= ;;
+ esac
+ oIFS=$IFS
+ IFS=/
+ set fnord $file
shift
+ IFS=$oIFS
- pathcomp=
for d
do
- pathcomp="$pathcomp$d"
+ test "x$d" = x && continue
+
+ pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
@@ -84,21 +128,21 @@ do
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
- errstatus=$lasterr
+ errstatus=$lasterr
else
- if test ! -z "$dirmode"; then
+ if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
+ lasterr=
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
fi
fi
- pathcomp="$pathcomp/"
+ pathcomp=$pathcomp/
done
done
@@ -107,5 +151,8 @@ exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
# End:
-# mkinstalldirs ends here
diff --git a/contrib/binutils/move-if-change b/contrib/binutils/move-if-change
index ee1b348beebd..ff74a556d2d7 100755
--- a/contrib/binutils/move-if-change
+++ b/contrib/binutils/move-if-change
@@ -1,32 +1,22 @@
#!/bin/sh
+# Like mv $1 $2, but if the files are the same, just delete $1.
+# Status is zero if successful, nonzero otherwise.
-# Copyright (C) 1996 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+usage="$0: usage: $0 SOURCE DEST"
-if
-test -r $2
-then
-if
-cmp $1 $2 > /dev/null
-then
-echo $2 is unchanged
-rm -f $1
-else
-mv -f $1 $2
-fi
+case $# in
+2) ;;
+*) echo "$usage" >&2; exit 1;;
+esac
+
+for arg in "$1" "$2"; do
+ case $arg in
+ -*) echo "$usage" >&2; exit 1;;
+ esac
+done
+
+if test -r "$2" && cmp -s "$1" "$2"; then
+ rm -f "$1"
else
-mv -f $1 $2
+ mv -f "$1" "$2"
fi
diff --git a/contrib/binutils/opcodes/ChangeLog b/contrib/binutils/opcodes/ChangeLog
index 39a516d6a85e..aa7e202640d6 100644
--- a/contrib/binutils/opcodes/ChangeLog
+++ b/contrib/binutils/opcodes/ChangeLog
@@ -1,215 +1,305 @@
-2005-03-07 Aldy Hernandez <aldyh@redhat.com>
+2006-06-09 Nick Clifton <nickc@redhat.com>
- * ppc-opc.c (powerpc_opcodes): Fix encoding of efscfd.
+ * po/fi.po: Updated Finnish translation.
-2004-12-11 David O'Brien <obrien@FreeBSD.org>
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
- Merge from mainline:
- 2004-04-20 Jakub Jelinek <jakub@redhat.com>
- * sparc-opc.c (fmoviccx, fmovfccx, fmovccx): Define.
- (fmovicc, fmovfcc, fmovcc): Remove fpsize argument, change opcode to
- suffix. Use fmov*x macros, create all 3 fpsize variants in one
- macro. Adjust all users.
+ * po/Make-in (pdf, ps): New dummy targets.
-2004-10-06 Aldy Hernandez <aldyh@redhat.com>
+2006-05-30 Nick Clifton <nickc@redhat.com>
- * ppc-opc.c (powerpc_opcodes): Add efscfd, efdabs, efdnabs,
- efdneg, efdadd, efdsub, efdmul, efddiv, efdcmpgt, efdcmplt,
- efdcmpeq, efdtstgt, efdtstlt, efdtsteq, efdcfsi, efdcfsid,
- efdcfui, efdcfuid, efdcfsf, efdcfuf, efdctsi, efdctsidz, efdctsiz,
- efdctui, efdctuidz, efdctuiz, efdctsf, efdctuf, efdctuf, efdcfs.
+ * po/es.po: Updated Spanish translation.
-2004-07-30 Michal Ludvig <mludvig@suse.cz>
+2006-05-26 Richard Sandiford <richard@codesourcery.com>
- * i386-dis.c (GRPPADLCK): Renamed to GRPPADLCK1
- (GRPPADLCK2): New define.
- (twobyte_has_modrm): True for 0xA6.
- (grps): GRPPADLCK2 for opcode 0xA6.
+ * 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.
-2004-05-13 Nick Clifton <nickc@redhat.com>
+2006-05-24 Nick Clifton <nickc@redhat.com>
- * po/fr.po: Updated French translation.
+ * po/ga.po: Updated Irish translation.
-2004-05-05 Alan Modra <amodra@bigpond.net.au>
+2006-05-22 Nick Clifton <nickc@redhat.com>
- PR 146.
- * ppc-opc.c (PPCVEC): Remove PPC_OPCODE_PPC.
+ * crx-dis.c (EXTRACT): Make macro work on 64-bit hosts.
-2004-04-09 Daniel Jacobowitz <drow@mvista.com>
+2006-05-22 Nick Clifton <nickc@redhat.com>
- Merge from mainline:
- 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
- * m32r-asm.c: Regenerate.
+ * po/nl.po: Updated translation.
- 2004-03-08 Nick Clifton <nickc@redhat.com>
- * po/de.po: Updated German translation.
+2006-05-18 Alan Modra <amodra@bigpond.net.au>
- 2004-02-26 Andrew Stubbs <andrew.stubbs@superh.com>
- * sh-opc.h: Move fsca and fsrra instructions from sh4a to sh4.
- Also correct mistake in the comment.
+ * avr-dis.c (avr_operand): Warning fix.
- 2004-02-26 Andrew Stubbs <andrew.stubbs@superh.com>
- * sh-dis.c (print_insn_sh): Add REG_N_D nibble type to
- ensure that double registers have even numbers.
- Add REG_N_B01 for nn01 (binary 01) nibble to ensure
- that reserved instruction 0xfffd does not decode the same
- as 0xfdfd (ftrv).
- * sh-opc.h: Add REG_N_D nibble type and use it whereever
- REG_N refers to a double register.
- Add REG_N_B01 nibble type and use it instead of REG_NM
- in ftrv.
- Adjust the bit patterns in a few comments.
+2006-05-04 Thiemo Seufer <ths@mips.com>
-2004-04-08 Alan Modra <amodra@bigpond.net.au>
+ * mips-opc.c (mips_builtin_opcodes): Fix mftr argument order.
- Apply from mainline.
- 2004-02-25 Aldy Hernandez <aldyh@redhat.com>
- * ppc-opc.c (powerpc_opcodes): Change mask for dcbt and dcbtst.
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
- 2004-02-20 Aldy Hernandez <aldyh@redhat.com>
- * ppc-opc.c (powerpc_opcodes): Move mfmcsrr0 before mfdc_dat.
+ * po/POTFILES.in: Regenerated.
- 2004-02-20 Aldy Hernandez <aldyh@redhat.com>
- * ppc-opc.c (powerpc_opcodes): Add m*ivor35.
+2006-04-12 Hochstein <hochstein@algo.informatik.tu-darmstadt.de>
- 2004-02-20 Aldy Hernandez <aldyh@redhat.com>
- * ppc-opc.c (powerpc_opcodes): Add mfivor32, mfivor33, mfivor34,
- mtivor32, mtivor33, mtivor34.
+ 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.
- 2004-02-19 Aldy Hernandez <aldyh@redhat.com>
- * ppc-opc.c (powerpc_opcodes): Add mfmcar.
+2006-04-10 DJ Delorie <dj@redhat.com>
-2004-03-15 Aldy Hernandez <aldyh@redhat.com>
-
- * ppc-opc.c (powerpc_opcodes): Add BOOKE versions of mfsprg.
+ * m32c-asm.c: Regenerate.
-2004-03-16 Alan Modra <amodra@bigpond.net.au>
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
- * ppc-dis.c (print_insn_powerpc): Don't print tabs. Handle
- PPC_OPERANDS_GPR_0.
- * ppc-opc.c (RA0): Define.
- (RAQ, RAL, RAM, RAS, RSQ, RTQ, RSO): Use PPC_OPERAND_GPR_0.
- (RAOPT): Rename from RAO. Update all uses.
- (powerpc_opcodes): Use RA0 as appropriate.
+ * Makefile.am: Add install-html target.
+ * Makefile.in: Regenerate.
-2004-03-15 Alan Modra <amodra@bigpond.net.au>
+2006-04-06 Nick Clifton <nickc@redhat.com>
- * sparc-dis.c (print_insn_sparc): Update getword prototype.
+ * po/vi/po: Updated Vietnamese translation.
-2004-03-13 Alan Modra <amodra@bigpond.net.au>
+2006-03-31 Paul Koning <ni1d@arrl.net>
- Apply the following patches from mainline
- 2004-03-12 Michal Ludvig <mludvig@suse.cz>
- * i386-dis.c (GRPPLOCK): Delete.
- (grps): Delete GRPPLOCK entry.
+ * pdp11-opc.c (pdp11_opcodes): Fix opcode for SEC instruction.
- 2004-03-12 Alan Modra <amodra@bigpond.net.au>
- * i386-dis.c (OP_M, OP_0f0e, OP_0fae, NOP_Fixup): New functions.
- (M, Mp): Use OP_M.
- (None, PADLOCK_SPECIAL, PADLOCK_0): Delete.
- (GRPPADLCK): Define.
- (dis386): Use NOP_Fixup on "nop".
- (dis386_twobyte): Use GRPPADLCK on opcode 0xa7.
- (twobyte_has_modrm): Set for 0xa7.
- (padlock_table): Delete. Move to..
- (grps): ..here, using OP_0f07. Use OP_Ofae on lfence, mfence
- and clflush.
- (print_insn): Revert PADLOCK_SPECIAL code.
- (OP_E): Delete sfence, lfence, mfence checks.
+2006-03-16 Bernd Schmidt <bernd.schmidt@analog.com>
- 2004-03-12 Jakub Jelinek <jakub@redhat.com>
- * i386-dis.c (grps): Use INVLPG_Fixup instead of OP_E for invlpg.
- (INVLPG_Fixup): New function.
- (PNI_Fixup): Remove ATTRIBUTE_UNUSED from sizeflag.
+ * bfin-dis.c (decode_dsp32shiftimm_0): Simplify and correct the
+ logic to identify halfword shifts.
- 2004-03-12 Alan Modra <amodra@bigpond.net.au>
- * i386-dis.c (grps): Use clflush by default for 0x0fae/7.
- (OP_E): Twiddle clflush to sfence here.
+2006-03-16 Paul Brook <paul@codesourcery.com>
-2004-03-12 Michal Ludvig <mludvig@suse.cz>
+ * arm-dis.c (arm_opcodes): Rename swi to svc.
+ (thumb_opcodes): Ditto.
- * i386-dis.c (PADLOCK_SPECIAL, PADLOCK_0): New defines.
- (dis386_twobyte): Opcode 0xa7 is PADLOCK_0.
- (padlock_table): New struct with PadLock instructions.
- (print_insn): Handle PADLOCK_SPECIAL.
+2006-03-13 DJ Delorie <dj@redhat.com>
-2004-02-10 Petko Manolov <petkan@nucleusys.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.
- * arm-opc.h Maverick accumulator register opcode fixes.
+2006-03-10 DJ Delorie <dj@redhat.com>
-2004-02-13 Ben Elliston <bje@wasabisystems.com>
+ * m32c-desc.c: Regenerate with mul.l, mulu.l.
+ * m32c-opc.c: Likewise.
+ * m32c-opc.h: Likewise.
- * m32r-dis.c: Regenerate.
-2004-01-27 Michael Snyder <msnyder@redhat.com>
+2006-03-09 Nick Clifton <nickc@redhat.com>
- * sh-opc.h (sh_table): "fsrra", not "fssra".
+ * po/sv.po: Updated Swedish translation.
-2004-01-23 Andrew Over <andrew.over@cs.anu.edu.au>
+2006-03-07 H.J. Lu <hongjiu.lu@intel.com>
- * sparc-opc.c (fdtox, fstox, fqtox, fxtod, fxtos, fxtoq): Tighten
- contraints.
+ 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.
-2004-01-19 Andrew Over <andrew.over@cs.anu.edu.au>
+2006-03-05 Nick Clifton <nickc@redhat.com>
- * sparc-opc.c (sparc_opcodes) <f[dsq]tox, fxto[dsq]>: Fix args.
+ * 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.
-2004-01-19 Alan Modra <amodra@bigpond.net.au>
+2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
- * i386-dis.c (OP_E): Print scale factor on intel mode sib when not
- 1. Don't print scale factor on AT&T mode when index missing.
+ * xc16x-asm.c: Regenerate.
+ * xc16x-dis.c: Regenerate.
-2004-01-16 Alexandre Oliva <aoliva@redhat.com>
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
- * m10300-opc.c (mov): 8- and 24-bit immediates are zero-extended
- when loaded into XR registers.
+ * po/Make-in: Add html target.
-2004-01-14 Richard Sandiford <rsandifo@redhat.com>
+2006-02-27 H.J. Lu <hongjiu.lu@intel.com>
- * frv-desc.h: Regenerate.
- * frv-desc.c: Regenerate.
- * frv-opc.c: 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.
+ (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.
-2004-01-13 Michael Snyder <msnyder@redhat.com>
+2006-02-24 David S. Miller <davem@sunset.davemloft.net>
- * sh-dis.c (print_insn_sh): Allocate 4 bytes for insn.
+ * 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.
-2004-01-09 Paul Brook <paul@codesourcery.com>
+2006-02-24 DJ Delorie <dj@redhat.com>
- * arm-opc.h (arm_opcodes): Move generic mcrr after known
- specific opcodes.
+ * m32c-desc.c: Regenerate with linker relaxation attributes.
+ * m32c-desc.h: Likewise.
+ * m32c-dis.c: Likewise.
+ * m32c-opc.c: Likewise.
-2004-01-07 Daniel Jacobowitz <drow@mvista.com>
+2006-02-24 Paul Brook <paul@codesourcery.com>
- * Makefile.am (libopcodes_la_DEPENDENCIES)
- (libopcodes_la_LIBADD): Revert 2003-05-17 change. Add explanatory
- comment about the problem.
- * Makefile.in: Regenerate.
+ * 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.
-2004-01-06 Alexandre Oliva <aoliva@redhat.com>
-
- 2003-12-19 Alexandre Oliva <aoliva@redhat.com>
- * frv-asm.c (parse_ulo16, parse_uhi16, parse_d12): Fix some
- cut&paste errors in shifting/truncating numerical operands.
- 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
- * frv-asm.c (parse_ulo16): Parse gotofflo and gotofffuncdesclo.
- (parse_uslo16): Likewise.
- (parse_uhi16): Parse gotoffhi and gotofffuncdeschi.
- (parse_d12): Parse gotoff12 and gotofffuncdesc12.
- (parse_s12): Likewise.
- 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
- * frv-asm.c (parse_ulo16): Parse gotlo and gotfuncdesclo.
- (parse_uslo16): Likewise.
- (parse_uhi16): Parse gothi and gotfuncdeschi.
- (parse_d12): Parse got12 and gotfuncdesc12.
- (parse_s12): Likewise.
-
-2004-01-02 Albert Bartoszko <albar@nt.kegel.com.pl>
-
- * msp430-dis.c (msp430_doubleoperand): Check for an 'add'
- instruction which looks similar to an 'rla' instruction.
-
-For older changes see ChangeLog-0203
+For older changes see ChangeLog-2005
Local Variables:
mode: change-log
diff --git a/contrib/binutils/opcodes/Makefile.am b/contrib/binutils/opcodes/Makefile.am
index ea621f2d3660..57bdb4a716a3 100644
--- a/contrib/binutils/opcodes/Makefile.am
+++ b/contrib/binutils/opcodes/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
-AUTOMAKE_OPTIONS = cygnus
+AUTOMAKE_OPTIONS = 1.9 cygnus
SUBDIRS = po
@@ -9,11 +9,15 @@ BFDDIR = $(srcdir)/../bfd
MKDEP = gcc -MM
WARN_CFLAGS = @WARN_CFLAGS@
+NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS)
bfdlibdir = @bfdlibdir@
bfdincludedir = @bfdincludedir@
+.PHONY: install-html
+install-html:
+
bfdlib_LTLIBRARIES = libopcodes.la
# This is where bfd.h lives.
@@ -24,7 +28,7 @@ LIBIBERTY = ../libiberty/libiberty.a
# Header files.
HFILES = \
- arm-opc.h \
+ cgen-ops.h cgen-types.h \
fr30-desc.h fr30-opc.h \
frv-desc.h frv-opc.h \
h8500-opc.h \
@@ -32,19 +36,21 @@ HFILES = \
ia64-opc.h \
ip2k-desc.h ip2k-opc.h \
iq2000-desc.h iq2000-opc.h \
+ m32c-desc.h m32c-opc.h \
m32r-desc.h m32r-opc.h \
mcore-opc.h \
+ mt-desc.h mt-opc.h \
openrisc-desc.h openrisc-opc.h \
sh-opc.h \
sh64-opc.h \
sysdep.h \
w65-opc.h \
+ xc16x-desc.h xc16x-opc.h \
xstormy16-desc.h xstormy16-opc.h \
z8k-opc.h
# C source files that correspond to .o's.
CFILES = \
- a29k-dis.c \
alpha-dis.c \
alpha-opc.c \
arc-dis.c \
@@ -52,11 +58,15 @@ CFILES = \
arc-ext.c \
arm-dis.c \
avr-dis.c \
+ bfin-dis.c \
cgen-asm.c \
+ cgen-bitset.c \
cgen-dis.c \
cgen-opc.c \
cris-dis.c \
cris-opc.c \
+ crx-dis.c \
+ crx-opc.c \
d10v-dis.c \
d10v-opc.c \
d30v-dis.c \
@@ -103,6 +113,11 @@ CFILES = \
iq2000-dis.c \
iq2000-ibld.c \
iq2000-opc.c \
+ m32c-asm.c \
+ m32c-desc.c \
+ m32c-dis.c \
+ m32c-ibld.c \
+ m32c-opc.c \
m32r-asm.c \
m32r-desc.c \
m32r-dis.c \
@@ -114,6 +129,7 @@ CFILES = \
m68k-dis.c \
m68k-opc.c \
m88k-dis.c \
+ maxq-dis.c \
mcore-dis.c \
mips-dis.c \
mips-opc.c \
@@ -124,6 +140,11 @@ CFILES = \
m10300-opc.c \
mmix-dis.c \
mmix-opc.c \
+ mt-asm.c \
+ mt-desc.c \
+ mt-dis.c \
+ mt-ibld.c \
+ mt-opc.c \
ns32k-dis.c \
openrisc-asm.c \
openrisc-desc.c \
@@ -156,17 +177,22 @@ CFILES = \
v850-opc.c \
vax-dis.c \
w65-dis.c \
+ xc16x-asm.c \
+ xc16x-desc.c \
+ xc16x-dis.c \
+ xc16x-ibld.c \
+ xc16x-opc.c \
xstormy16-asm.c \
xstormy16-desc.c \
xstormy16-dis.c \
xstormy16-ibld.c \
xstormy16-opc.c \
xtensa-dis.c \
+ z80-dis.c \
z8k-dis.c \
z8kgen.c
ALL_MACHINES = \
- a29k-dis.lo \
alpha-dis.lo \
alpha-opc.lo \
arc-dis.lo \
@@ -174,11 +200,15 @@ ALL_MACHINES = \
arc-ext.lo \
arm-dis.lo \
avr-dis.lo \
+ bfin-dis.lo \
cgen-asm.lo \
+ cgen-bitset.lo \
cgen-dis.lo \
cgen-opc.lo \
cris-dis.lo \
cris-opc.lo \
+ crx-dis.lo \
+ crx-opc.lo \
d10v-dis.lo \
d10v-opc.lo \
d30v-dis.lo \
@@ -214,6 +244,11 @@ ALL_MACHINES = \
iq2000-dis.lo \
iq2000-ibld.lo \
iq2000-opc.lo \
+ m32c-asm.lo \
+ m32c-desc.lo \
+ m32c-dis.lo \
+ m32c-ibld.lo \
+ m32c-opc.lo \
m32r-asm.lo \
m32r-desc.lo \
m32r-dis.lo \
@@ -229,6 +264,7 @@ ALL_MACHINES = \
m10200-opc.lo \
m10300-dis.lo \
m10300-opc.lo \
+ maxq-dis.lo \
mcore-dis.lo \
mips-dis.lo \
mips-opc.lo \
@@ -236,6 +272,11 @@ ALL_MACHINES = \
mmix-dis.lo \
mmix-opc.lo \
msp430-dis.lo \
+ mt-asm.lo \
+ mt-desc.lo \
+ mt-dis.lo \
+ mt-ibld.lo \
+ mt-opc.lo \
ns32k-dis.lo \
openrisc-asm.lo \
openrisc-desc.lo \
@@ -267,16 +308,26 @@ ALL_MACHINES = \
v850-opc.lo \
vax-dis.lo \
w65-dis.lo \
+ xc16x-asm.lo \
+ xc16x-desc.lo \
+ xc16x-dis.lo \
+ xc16x-ibld.lo \
+ xc16x-opc.lo \
xstormy16-asm.lo \
xstormy16-desc.lo \
xstormy16-dis.lo \
xstormy16-ibld.lo \
xstormy16-opc.lo \
xtensa-dis.lo \
+ z80-dis.lo \
z8k-dis.lo
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
disassemble.lo: disassemble.c $(INCDIR)/dis-asm.h
@@ -315,11 +366,6 @@ po/POTFILES.in: @MAINT@ Makefile
for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
-# We should reconfigure whenever bfd/configure.in changes, because
-# that's where the version number comes from.
-config.status: $(srcdir)/configure $(srcdir)/../bfd/configure.in
- $(SHELL) ./config.status --recheck
-
install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libopcodes
@$(NORMAL_INSTALL)
@@ -345,14 +391,14 @@ uninstall_libopcodes:
rm -f $(DESTDIR)$(bfdincludedir)/dis-asm.h
CLEANFILES = \
- stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
- stamp-iq2000 stamp-xstormy16 \
+ stamp-ip2k stamp-m32c stamp-m32r stamp-fr30 stamp-frv \
+ stamp-openrisc stamp-iq2000 stamp-mt stamp-xstormy16 stamp-xc16x\
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
CGENDIR = @cgendir@
CPUDIR = $(CGENDIR)/cpu
-CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+CGEN = "`if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi` -l ${cgendir}/guile.scm -s"
CGENFLAGS = -v
CGENDEPS = \
@@ -362,23 +408,29 @@ CGENDEPS = \
$(CGENDIR)/opc-opinst.scm \
cgen-asm.in cgen-dis.in cgen-ibld.in
-CGEN_CPUS = fr30 frv ip2k m32r openrisc xstormy16
+CGEN_CPUS = fr30 frv ip2k m32c m32r mt openrisc xc16x xstormy16
if CGEN_MAINT
IP2K_DEPS = stamp-ip2k
+M32C_DEPS = stamp-m32c
M32R_DEPS = stamp-m32r
FR30_DEPS = stamp-fr30
FRV_DEPS = stamp-frv
+MT_DEPS = stamp-mt
OPENRISC_DEPS = stamp-openrisc
IQ2000_DEPS = stamp-iq2000
+XC16X_DEPS = stamp-xc16x
XSTORMY16_DEPS = stamp-xstormy16
else
IP2K_DEPS =
+M32C_DEPS =
M32R_DEPS =
FR30_DEPS =
FRV_DEPS =
+MT_DEPS =
OPENRISC_DEPS =
IQ2000_DEPS =
+XC16X_DEPS =
XSTORMY16_DEPS =
endif
@@ -404,11 +456,37 @@ stamp-ip2k: $(CGENDEPS) $(CPUDIR)/ip2k.cpu $(CPUDIR)/ip2k.opc
$(MAKE) run-cgen arch=ip2k prefix=ip2k options= \
archfile=$(CPUDIR)/ip2k.cpu opcfile=$(CPUDIR)/ip2k.opc extrafiles=
+$(srcdir)/m32c-desc.h $(srcdir)/m32c-desc.c $(srcdir)/m32c-opc.h $(srcdir)/m32c-opc.c $(srcdir)/m32c-ibld.c $(srcdir)/m32c-asm.c $(srcdir)/m32c-dis.c: $(M32C_DEPS)
+# @true
+stamp-m32c: $(CGENDEPS) $(srcdir)/../cpu/m32c.cpu $(srcdir)/../cpu/m32c.opc
+ $(MAKE) run-cgen arch=m32c prefix=m32c options= \
+ archfile=$(srcdir)/../cpu/m32c.cpu \
+ opcfile=$(srcdir)/../cpu/m32c.opc extrafiles=
+m32c_opc_h = m32c-opc.h cgen-types.h cgen-ops.h
+m32c-asm.lo: m32c-asm.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h m32c-desc.h \
+ $(INCDIR)/opcode/cgen.h $(m32c_opc_h) opintl.h
+m32c-desc.lo: m32c-desc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h m32c-desc.h \
+ $(INCDIR)/opcode/cgen.h $(m32c_opc_h) opintl.h
+m32c-dis.lo: m32c-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen.h \
+ $(m32c_opc_h) opintl.h
+m32c-ibld.lo: m32c-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen.h \
+ $(m32c_opc_h) opintl.h
+m32c-opc.lo: m32c-opc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h m32c-desc.h \
+ $(INCDIR)/opcode/cgen.h $(m32c_opc_h)
+
$(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
@true
-stamp-m32r: $(CGENDEPS) $(CPUDIR)/m32r.cpu $(CPUDIR)/m32r.opc
+stamp-m32r: $(CGENDEPS) $(srcdir)/../cpu/m32r.cpu $(srcdir)/../cpu/m32r.opc
$(MAKE) run-cgen arch=m32r prefix=m32r options=opinst \
- archfile=$(CPUDIR)/m32r.cpu opcfile=$(CPUDIR)/m32r.opc extrafiles=opinst
+ archfile=$(srcdir)/../cpu/m32r.cpu \
+ opcfile=$(srcdir)/../cpu/m32r.opc extrafiles=opinst
$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
@true
@@ -418,12 +496,17 @@ stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS)
@true
-# .cpu and .opc files for frv are kept in a different directory, but cgen has no switch to specify that location, so
-# copy those file to the regular place.
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)/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
+ $(MAKE) run-cgen arch=mt prefix=mt options= \
+ archfile=$(srcdir)/../cpu/mt.cpu \
+ opcfile=$(srcdir)/../cpu/mt.opc extrafiles=
+
$(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS)
@true
stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
@@ -432,10 +515,12 @@ stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
@true
-stamp-iq2000: $(CGENDEPS) $(CPUDIR)/iq2000.cpu $(CPUDIR)/iq2000.opc \
- $(CPUDIR)/iq2000m.cpu $(CPUDIR)/iq10.cpu
+stamp-iq2000: $(CGENDEPS) $(srcdir)/../cpu/iq2000.cpu \
+ $(srcdir)/../cpu/iq2000.opc $(srcdir)/../cpu/iq2000m.cpu \
+ $(srcdir)/../cpu/iq10.cpu
$(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= \
- archfile=$(CPUDIR)/iq2000.cpu opcfile=$(CPUDIR)/iq2000.opc extrafiles=
+ archfile=$(srcdir)/../cpu/iq2000.cpu \
+ opcfile=$(srcdir)/../cpu/iq2000.opc extrafiles=
$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
@true
@@ -443,6 +528,12 @@ stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
$(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= \
archfile=$(CPUDIR)/xstormy16.cpu opcfile=$(CPUDIR)/xstormy16.opc extrafiles=
+$(srcdir)/xc16x-desc.h $(srcdir)/xc16x-desc.c $(srcdir)/xc16x-opc.h $(srcdir)/xc16x-opc.c $(srcdir)/xc16x-ibld.c $(srcdir)/xc16x-asm.c $(srcdir)/xc16x-dis.c: $(XC16X_DEPS)
+ @true
+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=
+
ia64-gen: ia64-gen.o
$(LINK) ia64-gen.o $(LIBIBERTY)
@@ -461,8 +552,6 @@ s390-opc.tab: s390-mkopc s390-opc.txt
sh-dis.lo: sh-dis.c
$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $<
-Makefile: $(BFDDIR)/configure.in
-
# This dependency stuff is copied from BFD.
DEP: dep.sed $(CFILES) $(HFILES) config.h
@@ -511,8 +600,6 @@ dep-am: DEP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-a29k-dis.lo: a29k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/a29k.h
alpha-dis.lo: alpha-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/alpha.h
alpha-opc.lo: alpha-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -524,30 +611,42 @@ arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.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)/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
arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h arm-opc.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- opintl.h $(INCDIR)/safe-ctype.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arm.h \
+ opintl.h $(INCDIR)/safe-ctype.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
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
+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 opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.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)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.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)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.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
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
+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
@@ -567,40 +666,44 @@ dis-init.lo: dis-init.c sysdep.h config.h $(INCDIR)/ansidecl.h \
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
fr30-desc.lo: fr30-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- fr30-desc.h $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
+ fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h fr30-opc.h $(INCDIR)/libiberty.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.h \
- frv-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- frv-desc.h $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+ frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h \
- frv-opc.h $(INCDIR)/libiberty.h $(INCDIR)/elf/frv.h \
- $(INCDIR)/elf/reloc-macros.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
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
@@ -634,8 +737,8 @@ ia64-opc-i.lo: ia64-opc-i.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
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 $(INCDIR)/libiberty.h \
- sysdep.h config.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
+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
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
@@ -644,60 +747,89 @@ ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
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.h \
- ip2k-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- ip2k-desc.h $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
+ ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h \
- ip2k-opc.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.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)/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
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
- iq2000-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- iq2000-desc.h $(INCDIR)/opcode/cgen.h iq2000-opc.h \
- opintl.h
+ iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h \
- iq2000-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h $(INCDIR)/libiberty.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
+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
+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 \
+ 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
+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 \
+ $(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
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
m32r-desc.lo: m32r-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- m32r-desc.h $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
m32r-opc.lo: m32r-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h $(INCDIR)/libiberty.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.h \
- m32r-opc.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h
m68hc11-dis.lo: m68hc11-dis.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/symcat.h
@@ -711,6 +843,8 @@ m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.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
+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
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
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -736,28 +870,49 @@ mmix-dis.lo: mmix-dis.c $(INCDIR)/opcode/mmix.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
opintl.h
mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
+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
+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 \
+ $(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 \
+ mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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 \
+ 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
openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(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
openrisc-desc.lo: openrisc-desc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h opintl.h $(INCDIR)/libiberty.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 \
- openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
- opintl.h
+ openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h opintl.h
openrisc-ibld.lo: openrisc-ibld.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
- opintl.h $(INCDIR)/safe-ctype.h
+ openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h opintl.h $(INCDIR)/safe-ctype.h
openrisc-opc.lo: openrisc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h $(INCDIR)/libiberty.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
@@ -782,7 +937,7 @@ s390-dis.lo: s390-dis.c $(INCDIR)/ansidecl.h sysdep.h \
config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
$(INCDIR)/opcode/s390.h
sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ sh-opc.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/dis-asm.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 \
@@ -821,26 +976,48 @@ 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
xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(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
xstormy16-desc.lo: xstormy16-desc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ xstormy16-opc.h opintl.h $(INCDIR)/libiberty.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.h \
- xstormy16-opc.h opintl.h
+ $(INCDIR)/libiberty.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h
xstormy16-ibld.lo: xstormy16-ibld.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
- opintl.h $(INCDIR)/safe-ctype.h
+ xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ xstormy16-opc.h opintl.h $(INCDIR)/safe-ctype.h
xstormy16-opc.lo: xstormy16-opc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h $(INCDIR)/libiberty.h
+ $(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
xtensa-dis.lo: xtensa-dis.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/ansidecl.h sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h sysdep.h \
+ config.h $(INCDIR)/dis-asm.h $(BFD_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
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
z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h \
diff --git a/contrib/binutils/opcodes/Makefile.in b/contrib/binutils/opcodes/Makefile.in
index 559194dab78b..78faab920aeb 100644
--- a/contrib/binutils/opcodes/Makefile.in
+++ b/contrib/binutils/opcodes/Makefile.in
@@ -1,6 +1,8 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,120 +12,230 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+@SET_MAKE@
-SHELL = @SHELL@
+
+SOURCES = libopcodes.c $(libopcodes_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-build_alias = @build_alias@
build_triplet = @build@
-host_alias = @host_alias@
host_triplet = @host@
-target_alias = @target_alias@
target_triplet = @target@
+DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub \
+ ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/config.in $(srcdir)/../mkinstalldirs \
+ $(top_srcdir)/po/Make-in $(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__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = po/Makefile.in
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+libopcodes_a_AR = $(AR) $(ARFLAGS)
+libopcodes_a_LIBADD =
+libopcodes_a_SOURCES = libopcodes.c
+libopcodes_a_OBJECTS = libopcodes.$(OBJEXT)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(bfdlibdir)"
+bfdlibLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(bfdlib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+am_libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo dis-init.lo
+libopcodes_la_OBJECTS = $(am_libopcodes_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) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = libopcodes.c $(libopcodes_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
AR = @AR@
-AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
BFD_MACHINES = @BFD_MACHINES@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CC_FOR_BUILD = @CC_FOR_BUILD@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
+CFLAGS = @CFLAGS@
+CGEN_MAINT_FALSE = @CGEN_MAINT_FALSE@
+CGEN_MAINT_TRUE = @CGEN_MAINT_TRUE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
-DLLTOOL = @DLLTOOL@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@
+INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
-OBJDUMP = @OBJDUMP@
+NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
archdefs = @archdefs@
+bfdincludedir = @bfdincludedir@
+bfdlibdir = @bfdlibdir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
cgendir = @cgendir@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_noncanonical = @host_noncanonical@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
l = @l@
-
-AUTOMAKE_OPTIONS = cygnus
-
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_noncanonical = @target_noncanonical@
+target_os = @target_os@
+target_vendor = @target_vendor@
+AUTOMAKE_OPTIONS = 1.9 cygnus
SUBDIRS = po
-
INCDIR = $(srcdir)/../include
BFDDIR = $(srcdir)/../bfd
MKDEP = gcc -MM
-
-WARN_CFLAGS = @WARN_CFLAGS@
AM_CFLAGS = $(WARN_CFLAGS)
-
-bfdlibdir = @bfdlibdir@
-bfdincludedir = @bfdincludedir@
-
bfdlib_LTLIBRARIES = libopcodes.la
# This is where bfd.h lives.
@@ -134,7 +246,7 @@ LIBIBERTY = ../libiberty/libiberty.a
# Header files.
HFILES = \
- arm-opc.h \
+ cgen-ops.h cgen-types.h \
fr30-desc.h fr30-opc.h \
frv-desc.h frv-opc.h \
h8500-opc.h \
@@ -142,20 +254,22 @@ HFILES = \
ia64-opc.h \
ip2k-desc.h ip2k-opc.h \
iq2000-desc.h iq2000-opc.h \
+ m32c-desc.h m32c-opc.h \
m32r-desc.h m32r-opc.h \
mcore-opc.h \
+ mt-desc.h mt-opc.h \
openrisc-desc.h openrisc-opc.h \
sh-opc.h \
sh64-opc.h \
sysdep.h \
w65-opc.h \
+ xc16x-desc.h xc16x-opc.h \
xstormy16-desc.h xstormy16-opc.h \
z8k-opc.h
# C source files that correspond to .o's.
CFILES = \
- a29k-dis.c \
alpha-dis.c \
alpha-opc.c \
arc-dis.c \
@@ -163,11 +277,15 @@ CFILES = \
arc-ext.c \
arm-dis.c \
avr-dis.c \
+ bfin-dis.c \
cgen-asm.c \
+ cgen-bitset.c \
cgen-dis.c \
cgen-opc.c \
cris-dis.c \
cris-opc.c \
+ crx-dis.c \
+ crx-opc.c \
d10v-dis.c \
d10v-opc.c \
d30v-dis.c \
@@ -214,6 +332,11 @@ CFILES = \
iq2000-dis.c \
iq2000-ibld.c \
iq2000-opc.c \
+ m32c-asm.c \
+ m32c-desc.c \
+ m32c-dis.c \
+ m32c-ibld.c \
+ m32c-opc.c \
m32r-asm.c \
m32r-desc.c \
m32r-dis.c \
@@ -225,6 +348,7 @@ CFILES = \
m68k-dis.c \
m68k-opc.c \
m88k-dis.c \
+ maxq-dis.c \
mcore-dis.c \
mips-dis.c \
mips-opc.c \
@@ -235,6 +359,11 @@ CFILES = \
m10300-opc.c \
mmix-dis.c \
mmix-opc.c \
+ mt-asm.c \
+ mt-desc.c \
+ mt-dis.c \
+ mt-ibld.c \
+ mt-opc.c \
ns32k-dis.c \
openrisc-asm.c \
openrisc-desc.c \
@@ -267,18 +396,22 @@ CFILES = \
v850-opc.c \
vax-dis.c \
w65-dis.c \
+ xc16x-asm.c \
+ xc16x-desc.c \
+ xc16x-dis.c \
+ xc16x-ibld.c \
+ xc16x-opc.c \
xstormy16-asm.c \
xstormy16-desc.c \
xstormy16-dis.c \
xstormy16-ibld.c \
xstormy16-opc.c \
xtensa-dis.c \
+ z80-dis.c \
z8k-dis.c \
z8kgen.c
-
ALL_MACHINES = \
- a29k-dis.lo \
alpha-dis.lo \
alpha-opc.lo \
arc-dis.lo \
@@ -286,11 +419,15 @@ ALL_MACHINES = \
arc-ext.lo \
arm-dis.lo \
avr-dis.lo \
+ bfin-dis.lo \
cgen-asm.lo \
+ cgen-bitset.lo \
cgen-dis.lo \
cgen-opc.lo \
cris-dis.lo \
cris-opc.lo \
+ crx-dis.lo \
+ crx-opc.lo \
d10v-dis.lo \
d10v-opc.lo \
d30v-dis.lo \
@@ -326,6 +463,11 @@ ALL_MACHINES = \
iq2000-dis.lo \
iq2000-ibld.lo \
iq2000-opc.lo \
+ m32c-asm.lo \
+ m32c-desc.lo \
+ m32c-dis.lo \
+ m32c-ibld.lo \
+ m32c-opc.lo \
m32r-asm.lo \
m32r-desc.lo \
m32r-dis.lo \
@@ -341,6 +483,7 @@ ALL_MACHINES = \
m10200-opc.lo \
m10300-dis.lo \
m10300-opc.lo \
+ maxq-dis.lo \
mcore-dis.lo \
mips-dis.lo \
mips-opc.lo \
@@ -348,6 +491,11 @@ ALL_MACHINES = \
mmix-dis.lo \
mmix-opc.lo \
msp430-dis.lo \
+ mt-asm.lo \
+ mt-desc.lo \
+ mt-dis.lo \
+ mt-ibld.lo \
+ mt-opc.lo \
ns32k-dis.lo \
openrisc-asm.lo \
openrisc-desc.lo \
@@ -379,19 +527,26 @@ ALL_MACHINES = \
v850-opc.lo \
vax-dis.lo \
w65-dis.lo \
+ xc16x-asm.lo \
+ xc16x-desc.lo \
+ xc16x-dis.lo \
+ xc16x-ibld.lo \
+ xc16x-opc.lo \
xstormy16-asm.lo \
xstormy16-desc.lo \
xstormy16-dis.lo \
xstormy16-ibld.lo \
xstormy16-opc.lo \
xtensa-dis.lo \
+ z80-dis.lo \
z8k-dis.lo
-
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
-
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
@@ -406,22 +561,17 @@ libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# the build directory so that we don't have to convert all the
# programs that use libopcodes.a simultaneously. This is a hack which
# should be removed if everything else starts using libtool. FIXME.
-
noinst_LIBRARIES = libopcodes.a
-
POTFILES = $(HFILES) $(CFILES)
-
CLEANFILES = \
- stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
- stamp-iq2000 stamp-xstormy16 \
+ stamp-ip2k stamp-m32c stamp-m32r stamp-fr30 stamp-frv \
+ stamp-openrisc stamp-iq2000 stamp-mt stamp-xstormy16 stamp-xc16x\
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
-
CGENDIR = @cgendir@
CPUDIR = $(CGENDIR)/cpu
-CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+CGEN = "`if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi` -l ${cgendir}/guile.scm -s"
CGENFLAGS = -v
-
CGENDEPS = \
$(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
$(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \
@@ -429,140 +579,114 @@ CGENDEPS = \
$(CGENDIR)/opc-opinst.scm \
cgen-asm.in cgen-dis.in cgen-ibld.in
-
-CGEN_CPUS = fr30 frv ip2k m32r openrisc xstormy16
-@CGEN_MAINT_TRUE@IP2K_DEPS = @CGEN_MAINT_TRUE@stamp-ip2k
+CGEN_CPUS = fr30 frv ip2k m32c m32r mt openrisc xc16x xstormy16
@CGEN_MAINT_FALSE@IP2K_DEPS =
-@CGEN_MAINT_TRUE@M32R_DEPS = @CGEN_MAINT_TRUE@stamp-m32r
+@CGEN_MAINT_TRUE@IP2K_DEPS = stamp-ip2k
+@CGEN_MAINT_FALSE@M32C_DEPS =
+@CGEN_MAINT_TRUE@M32C_DEPS = stamp-m32c
@CGEN_MAINT_FALSE@M32R_DEPS =
-@CGEN_MAINT_TRUE@FR30_DEPS = @CGEN_MAINT_TRUE@stamp-fr30
+@CGEN_MAINT_TRUE@M32R_DEPS = stamp-m32r
@CGEN_MAINT_FALSE@FR30_DEPS =
-@CGEN_MAINT_TRUE@FRV_DEPS = @CGEN_MAINT_TRUE@stamp-frv
+@CGEN_MAINT_TRUE@FR30_DEPS = stamp-fr30
@CGEN_MAINT_FALSE@FRV_DEPS =
-@CGEN_MAINT_TRUE@OPENRISC_DEPS = @CGEN_MAINT_TRUE@stamp-openrisc
+@CGEN_MAINT_TRUE@FRV_DEPS = stamp-frv
+@CGEN_MAINT_FALSE@MT_DEPS =
+@CGEN_MAINT_TRUE@MT_DEPS = stamp-mt
@CGEN_MAINT_FALSE@OPENRISC_DEPS =
-@CGEN_MAINT_TRUE@IQ2000_DEPS = @CGEN_MAINT_TRUE@stamp-iq2000
+@CGEN_MAINT_TRUE@OPENRISC_DEPS = stamp-openrisc
@CGEN_MAINT_FALSE@IQ2000_DEPS =
-@CGEN_MAINT_TRUE@XSTORMY16_DEPS = @CGEN_MAINT_TRUE@stamp-xstormy16
+@CGEN_MAINT_TRUE@IQ2000_DEPS = stamp-iq2000
+@CGEN_MAINT_FALSE@XC16X_DEPS =
+@CGEN_MAINT_TRUE@XC16X_DEPS = stamp-xc16x
@CGEN_MAINT_FALSE@XSTORMY16_DEPS =
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-libopcodes_a_LIBADD =
-libopcodes_a_SOURCES = libopcodes.a.c
-libopcodes_a_OBJECTS = libopcodes.a.$(OBJEXT)
-LTLIBRARIES = $(bfdlib_LTLIBRARIES)
-
-libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo dis-init.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-acinclude.m4 aclocal.m4 config.in configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
-OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
+@CGEN_MAINT_TRUE@XSTORMY16_DEPS = stamp-xstormy16
+m32c_opc_h = m32c-opc.h cgen-types.h cgen-ops.h
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
-all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+.SUFFIXES: .c .lo .o .obj
+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 \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-config.h: stamp-h
+config.h: stamp-h1
@if test ! -f $@; then \
- rm -f stamp-h; \
- $(MAKE) stamp-h; \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
else :; fi
-stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
- $(SHELL) ./config.status
- @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
- @if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
- else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-mostlyclean-hdr:
-
-clean-hdr:
+stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
distclean-hdr:
- -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-noinstLIBRARIES:
+ -rm -f config.h stamp-h1
+po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
+clean-bfdlibLTLIBRARIES:
+ -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES)
+ @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libopcodes.la: $(libopcodes_la_OBJECTS) $(libopcodes_la_DEPENDENCIES)
+ $(LINK) -rpath $(bfdlibdir) $(libopcodes_la_LDFLAGS) $(libopcodes_la_OBJECTS) $(libopcodes_la_LIBADD) $(LIBS)
mostlyclean-compile:
- -rm -f *.o core *.core
-rm -f *.$(OBJEXT)
-clean-compile:
-
distclean-compile:
-rm -f *.tab.c
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.c.o:
+ $(COMPILE) -c $<
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+.c.lo:
+ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -571,20 +695,8 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-
-maintainer-clean-libtool:
-
-mostlyclean-bfdlibLTLIBRARIES:
-
-clean-bfdlibLTLIBRARIES:
- -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES)
-
-distclean-bfdlibLTLIBRARIES:
-
-maintainer-clean-bfdlibLTLIBRARIES:
-
-libopcodes.la: $(libopcodes_la_OBJECTS) $(libopcodes_la_DEPENDENCIES)
- $(LINK) -rpath $(bfdlibdir) $(libopcodes_la_LDFLAGS) $(libopcodes_la_OBJECTS) $(libopcodes_la_LIBADD) $(LIBS)
+ -rm -f libtool
+uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -592,13 +704,14 @@ libopcodes.la: $(libopcodes_la_OBJECTS) $(libopcodes_la_DEPENDENCIES)
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -610,7 +723,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -618,13 +731,24 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" = "." && dot_seen=yes; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
+ rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
@@ -634,203 +758,183 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique
+tags: TAGS
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-clean-tags:
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-am:
check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-all-recursive-am: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-install-exec-am:
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(bfdlibdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
install-exec: install-exec-recursive
-
-install-data-am: install-bfdlibLTLIBRARIES
install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-bfdlibLTLIBRARIES
-uninstall: uninstall-recursive
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h
-all-redirect: all-recursive-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(bfdlibdir)
-
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \
- mostlyclean-compile mostlyclean-libtool \
- mostlyclean-bfdlibLTLIBRARIES mostlyclean-tags \
- mostlyclean-generic
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
-mostlyclean: mostlyclean-recursive
+clean-am: clean-bfdlibLTLIBRARIES clean-generic clean-libtool \
+ clean-noinstLIBRARIES mostlyclean-am
-clean-am: clean-hdr clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-bfdlibLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags
-clean: clean-recursive
+dvi: dvi-recursive
-distclean-am: distclean-hdr distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-bfdlibLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
+dvi-am:
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-hdr \
- maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-bfdlibLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-bfdlibLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-bfdlibLTLIBRARIES \
-distclean-bfdlibLTLIBRARIES clean-bfdlibLTLIBRARIES \
-maintainer-clean-bfdlibLTLIBRARIES uninstall-bfdlibLTLIBRARIES \
-install-bfdlibLTLIBRARIES install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info all-recursive-am install-exec-am install-exec \
-install-data-am install-data install-am install uninstall-am uninstall \
-all-redirect all-am all installdirs-am installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+ps-am:
+
+uninstall-am: uninstall-bfdlibLTLIBRARIES
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-bfdlibLTLIBRARIES clean-generic \
+ clean-libtool clean-noinstLIBRARIES clean-recursive ctags \
+ ctags-recursive distclean distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-recursive \
+ distclean-tags dvi dvi-am html html-am info info-am install \
+ install-am install-bfdlibLTLIBRARIES install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-bfdlibLTLIBRARIES uninstall-info-am
+
+
+.PHONY: install-html
+install-html:
disassemble.lo: disassemble.c $(INCDIR)/dis-asm.h
$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $(srcdir)/disassemble.c
@@ -849,11 +953,6 @@ po/POTFILES.in: @MAINT@ Makefile
for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
-# We should reconfigure whenever bfd/configure.in changes, because
-# that's where the version number comes from.
-config.status: $(srcdir)/configure $(srcdir)/../bfd/configure.in
- $(SHELL) ./config.status --recheck
-
install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libopcodes
@$(NORMAL_INSTALL)
@@ -900,11 +999,36 @@ stamp-ip2k: $(CGENDEPS) $(CPUDIR)/ip2k.cpu $(CPUDIR)/ip2k.opc
$(MAKE) run-cgen arch=ip2k prefix=ip2k options= \
archfile=$(CPUDIR)/ip2k.cpu opcfile=$(CPUDIR)/ip2k.opc extrafiles=
+$(srcdir)/m32c-desc.h $(srcdir)/m32c-desc.c $(srcdir)/m32c-opc.h $(srcdir)/m32c-opc.c $(srcdir)/m32c-ibld.c $(srcdir)/m32c-asm.c $(srcdir)/m32c-dis.c: $(M32C_DEPS)
+# @true
+stamp-m32c: $(CGENDEPS) $(srcdir)/../cpu/m32c.cpu $(srcdir)/../cpu/m32c.opc
+ $(MAKE) run-cgen arch=m32c prefix=m32c options= \
+ archfile=$(srcdir)/../cpu/m32c.cpu \
+ opcfile=$(srcdir)/../cpu/m32c.opc extrafiles=
+m32c-asm.lo: m32c-asm.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h m32c-desc.h \
+ $(INCDIR)/opcode/cgen.h $(m32c_opc_h) opintl.h
+m32c-desc.lo: m32c-desc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h m32c-desc.h \
+ $(INCDIR)/opcode/cgen.h $(m32c_opc_h) opintl.h
+m32c-dis.lo: m32c-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen.h \
+ $(m32c_opc_h) opintl.h
+m32c-ibld.lo: m32c-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen.h \
+ $(m32c_opc_h) opintl.h
+m32c-opc.lo: m32c-opc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h m32c-desc.h \
+ $(INCDIR)/opcode/cgen.h $(m32c_opc_h)
+
$(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
@true
-stamp-m32r: $(CGENDEPS) $(CPUDIR)/m32r.cpu $(CPUDIR)/m32r.opc
+stamp-m32r: $(CGENDEPS) $(srcdir)/../cpu/m32r.cpu $(srcdir)/../cpu/m32r.opc
$(MAKE) run-cgen arch=m32r prefix=m32r options=opinst \
- archfile=$(CPUDIR)/m32r.cpu opcfile=$(CPUDIR)/m32r.opc extrafiles=opinst
+ archfile=$(srcdir)/../cpu/m32r.cpu \
+ opcfile=$(srcdir)/../cpu/m32r.opc extrafiles=opinst
$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
@true
@@ -914,12 +1038,17 @@ stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS)
@true
-# .cpu and .opc files for frv are kept in a different directory, but cgen has no switch to specify that location, so
-# copy those file to the regular place.
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)/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
+ $(MAKE) run-cgen arch=mt prefix=mt options= \
+ archfile=$(srcdir)/../cpu/mt.cpu \
+ opcfile=$(srcdir)/../cpu/mt.opc extrafiles=
+
$(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS)
@true
stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
@@ -928,10 +1057,12 @@ stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
@true
-stamp-iq2000: $(CGENDEPS) $(CPUDIR)/iq2000.cpu $(CPUDIR)/iq2000.opc \
- $(CPUDIR)/iq2000m.cpu $(CPUDIR)/iq10.cpu
+stamp-iq2000: $(CGENDEPS) $(srcdir)/../cpu/iq2000.cpu \
+ $(srcdir)/../cpu/iq2000.opc $(srcdir)/../cpu/iq2000m.cpu \
+ $(srcdir)/../cpu/iq10.cpu
$(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= \
- archfile=$(CPUDIR)/iq2000.cpu opcfile=$(CPUDIR)/iq2000.opc extrafiles=
+ archfile=$(srcdir)/../cpu/iq2000.cpu \
+ opcfile=$(srcdir)/../cpu/iq2000.opc extrafiles=
$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
@true
@@ -939,6 +1070,12 @@ stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
$(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= \
archfile=$(CPUDIR)/xstormy16.cpu opcfile=$(CPUDIR)/xstormy16.opc extrafiles=
+$(srcdir)/xc16x-desc.h $(srcdir)/xc16x-desc.c $(srcdir)/xc16x-opc.h $(srcdir)/xc16x-opc.c $(srcdir)/xc16x-ibld.c $(srcdir)/xc16x-asm.c $(srcdir)/xc16x-dis.c: $(XC16X_DEPS)
+ @true
+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=
+
ia64-gen: ia64-gen.o
$(LINK) ia64-gen.o $(LIBIBERTY)
@@ -957,8 +1094,6 @@ s390-opc.tab: s390-mkopc s390-opc.txt
sh-dis.lo: sh-dis.c
$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $<
-Makefile: $(BFDDIR)/configure.in
-
# This dependency stuff is copied from BFD.
DEP: dep.sed $(CFILES) $(HFILES) config.h
@@ -1007,8 +1142,6 @@ dep-am: DEP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-a29k-dis.lo: a29k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/a29k.h
alpha-dis.lo: alpha-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/alpha.h
alpha-opc.lo: alpha-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -1020,30 +1153,42 @@ arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.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)/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
arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h arm-opc.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- opintl.h $(INCDIR)/safe-ctype.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arm.h \
+ opintl.h $(INCDIR)/safe-ctype.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
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
+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 opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.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)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.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)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.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
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
+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
@@ -1063,40 +1208,44 @@ dis-init.lo: dis-init.c sysdep.h config.h $(INCDIR)/ansidecl.h \
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
fr30-desc.lo: fr30-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- fr30-desc.h $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
+ fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h
fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h fr30-opc.h $(INCDIR)/libiberty.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.h \
- frv-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- frv-desc.h $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+ frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h \
- frv-opc.h $(INCDIR)/libiberty.h $(INCDIR)/elf/frv.h \
- $(INCDIR)/elf/reloc-macros.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
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
@@ -1130,8 +1279,8 @@ ia64-opc-i.lo: ia64-opc-i.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
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 $(INCDIR)/libiberty.h \
- sysdep.h config.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
+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
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
@@ -1140,60 +1289,89 @@ ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
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.h \
- ip2k-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- ip2k-desc.h $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
+ ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h \
- ip2k-opc.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.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)/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
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
- iq2000-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- iq2000-desc.h $(INCDIR)/opcode/cgen.h iq2000-opc.h \
- opintl.h
+ iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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.h \
- iq2000-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h iq2000-opc.h $(INCDIR)/libiberty.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
+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
+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 \
+ 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
+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 \
+ $(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
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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
m32r-desc.lo: m32r-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.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 \
+ $(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 \
- m32r-desc.h $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h
m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
m32r-opc.lo: m32r-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h $(INCDIR)/libiberty.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.h \
- m32r-opc.h
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h m32r-opc.h
m68hc11-dis.lo: m68hc11-dis.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/symcat.h
@@ -1207,6 +1385,8 @@ m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.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
+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
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
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -1232,28 +1412,49 @@ mmix-dis.lo: mmix-dis.c $(INCDIR)/opcode/mmix.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
opintl.h
mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
+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
+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 \
+ $(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 \
+ mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.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 \
+ 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
openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(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
openrisc-desc.lo: openrisc-desc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h opintl.h $(INCDIR)/libiberty.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 \
- openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
- opintl.h
+ openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h opintl.h
openrisc-ibld.lo: openrisc-ibld.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
- opintl.h $(INCDIR)/safe-ctype.h
+ openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h opintl.h $(INCDIR)/safe-ctype.h
openrisc-opc.lo: openrisc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h $(INCDIR)/libiberty.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
@@ -1278,7 +1479,7 @@ s390-dis.lo: s390-dis.c $(INCDIR)/ansidecl.h sysdep.h \
config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
$(INCDIR)/opcode/s390.h
sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ sh-opc.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/dis-asm.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 \
@@ -1317,32 +1518,53 @@ 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
xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(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
xstormy16-desc.lo: xstormy16-desc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ xstormy16-opc.h opintl.h $(INCDIR)/libiberty.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.h \
- xstormy16-opc.h opintl.h
+ $(INCDIR)/libiberty.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h
xstormy16-ibld.lo: xstormy16-ibld.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
- opintl.h $(INCDIR)/safe-ctype.h
+ xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ xstormy16-opc.h opintl.h $(INCDIR)/safe-ctype.h
xstormy16-opc.lo: xstormy16-opc.c sysdep.h config.h \
$(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h $(INCDIR)/libiberty.h
+ $(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
xtensa-dis.lo: xtensa-dis.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/ansidecl.h sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h sysdep.h \
+ config.h $(INCDIR)/dis-asm.h $(BFD_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
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
z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.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.
.NOEXPORT:
diff --git a/contrib/binutils/opcodes/aclocal.m4 b/contrib/binutils/opcodes/aclocal.m4
index 92732d34f683..d5f315805a9c 100644
--- a/contrib/binutils/opcodes/aclocal.m4
+++ b/contrib/binutils/opcodes/aclocal.m4
@@ -1,113 +1,750 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p5
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-sinclude(../bfd/acinclude.m4)
-
-dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_DEFUN([AM_DISABLE_SHARED],)
-AC_SUBST(LIBTOOL)
+# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Copyright (C) 2002, 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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# 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_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 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 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
-dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
-dnl AM_INSTALL_LIBBFD already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([AM_INSTALL_LIBBFD],)
-AC_SUBST(bfdlibdir)
-AC_SUBST(bfdincludedir)
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
])
-#serial 1
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-
-undefine([AC_ISC_POSIX])
-
-AC_DEFUN([AC_ISC_POSIX],
- [
- dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- ]
-)
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-# serial 1
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 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 8
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+# Do all the work for Automake. -*- Autoconf -*-
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 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 12
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+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
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 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 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 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 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 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 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
-# Check to make sure that the build environment is sane.
+# 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
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 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 4
+# AM_SANITY_CHECK
+# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
@@ -117,7 +754,7 @@ if (
alias in your environment])
fi
- test "[$]2" = conftestfile
+ test "$[2]" = conftest.file
)
then
# Ok.
@@ -126,78 +763,130 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-rm -f conftest*
AC_MSG_RESULT(yes)])
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
+# Copyright (C) 2001, 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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
fi
-AC_SUBST($1)])
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- ;;
- esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
+# Check how to create a tarball. -*- Autoconf -*-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
+# Copyright (C) 2004, 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 1
+# serial 2
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
-# Define a conditional.
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+m4_include([acinclude.m4])
diff --git a/contrib/binutils/opcodes/alpha-dis.c b/contrib/binutils/opcodes/alpha-dis.c
index 49b5f20d2e76..39f0d78206ce 100644
--- a/contrib/binutils/opcodes/alpha-dis.c
+++ b/contrib/binutils/opcodes/alpha-dis.c
@@ -1,5 +1,6 @@
/* alpha-dis.c -- Disassemble Alpha AXP instructions
- Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2001, 2002
+ Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>,
patterned after the PPC opcode handling written by Ian Lance Taylor.
@@ -17,8 +18,8 @@ the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
#include <stdio.h>
#include "sysdep.h"
diff --git a/contrib/binutils/opcodes/alpha-opc.c b/contrib/binutils/opcodes/alpha-opc.c
index 537159757214..897de4068291 100644
--- a/contrib/binutils/opcodes/alpha-opc.c
+++ b/contrib/binutils/opcodes/alpha-opc.c
@@ -1,5 +1,6 @@
/* alpha-opc.c -- Alpha AXP opcode list
- Copyright 1996, 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@cygnus.com>,
patterned after the PPC opcode handling written by Ian Lance Taylor.
@@ -17,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <stdio.h>
#include "sysdep.h"
@@ -53,28 +54,147 @@
_Alpha 21164 Microprocessor Hardware Reference Manual_, Digital
Order Number EC-QAEQB-TE, preliminary revision dated April 1995. */
-/* Local insertion and extraction functions */
-
-static unsigned insert_rba PARAMS((unsigned, int, const char **));
-static unsigned insert_rca PARAMS((unsigned, int, const char **));
-static unsigned insert_za PARAMS((unsigned, int, const char **));
-static unsigned insert_zb PARAMS((unsigned, int, const char **));
-static unsigned insert_zc PARAMS((unsigned, int, const char **));
-static unsigned insert_bdisp PARAMS((unsigned, int, const char **));
-static unsigned insert_jhint PARAMS((unsigned, int, const char **));
-static unsigned insert_ev6hwjhint PARAMS((unsigned, int, const char **));
-
-static int extract_rba PARAMS((unsigned, int *));
-static int extract_rca PARAMS((unsigned, int *));
-static int extract_za PARAMS((unsigned, int *));
-static int extract_zb PARAMS((unsigned, int *));
-static int extract_zc PARAMS((unsigned, int *));
-static int extract_bdisp PARAMS((unsigned, int *));
-static int extract_jhint PARAMS((unsigned, int *));
-static int extract_ev6hwjhint PARAMS((unsigned, int *));
+/* The RB field when it is the same as the RA field in the same insn.
+ This operand is marked fake. The insertion function just copies
+ the RA field into the RB field, and the extraction function just
+ checks that the fields are the same. */
+static unsigned
+insert_rba (unsigned insn,
+ int value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
+{
+ return insn | (((insn >> 21) & 0x1f) << 16);
+}
+
+static int
+extract_rba (unsigned insn, int *invalid)
+{
+ if (invalid != (int *) NULL
+ && ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
+ *invalid = 1;
+ return 0;
+}
+
+/* The same for the RC field. */
+
+static unsigned
+insert_rca (unsigned insn,
+ int value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
+{
+ return insn | ((insn >> 21) & 0x1f);
+}
+
+static int
+extract_rca (unsigned insn, int *invalid)
+{
+ if (invalid != (int *) NULL
+ && ((insn >> 21) & 0x1f) != (insn & 0x1f))
+ *invalid = 1;
+ return 0;
+}
+
+/* Fake arguments in which the registers must be set to ZERO. */
+
+static unsigned
+insert_za (unsigned insn,
+ int value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
+{
+ return insn | (31 << 21);
+}
+
+static int
+extract_za (unsigned insn, int *invalid)
+{
+ if (invalid != (int *) NULL && ((insn >> 21) & 0x1f) != 31)
+ *invalid = 1;
+ return 0;
+}
+
+static unsigned
+insert_zb (unsigned insn,
+ int value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
+{
+ return insn | (31 << 16);
+}
+
+static int
+extract_zb (unsigned insn, int *invalid)
+{
+ if (invalid != (int *) NULL && ((insn >> 16) & 0x1f) != 31)
+ *invalid = 1;
+ return 0;
+}
+
+static unsigned
+insert_zc (unsigned insn,
+ int value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
+{
+ return insn | 31;
+}
+
+static int
+extract_zc (unsigned insn, int *invalid)
+{
+ if (invalid != (int *) NULL && (insn & 0x1f) != 31)
+ *invalid = 1;
+ return 0;
+}
+
+
+/* The displacement field of a Branch format insn. */
+
+static unsigned
+insert_bdisp (unsigned insn, int value, const char **errmsg)
+{
+ if (errmsg != (const char **)NULL && (value & 3))
+ *errmsg = _("branch operand unaligned");
+ return insn | ((value / 4) & 0x1FFFFF);
+}
+
+static int
+extract_bdisp (unsigned insn, int *invalid ATTRIBUTE_UNUSED)
+{
+ return 4 * (((insn & 0x1FFFFF) ^ 0x100000) - 0x100000);
+}
+
+/* The hint field of a JMP/JSR insn. */
+
+static unsigned
+insert_jhint (unsigned insn, int value, const char **errmsg)
+{
+ if (errmsg != (const char **)NULL && (value & 3))
+ *errmsg = _("jump hint unaligned");
+ return insn | ((value / 4) & 0x3FFF);
+}
+
+static int
+extract_jhint (unsigned insn, int *invalid ATTRIBUTE_UNUSED)
+{
+ return 4 * (((insn & 0x3FFF) ^ 0x2000) - 0x2000);
+}
+
+/* The hint field of an EV6 HW_JMP/JSR insn. */
+
+static unsigned
+insert_ev6hwjhint (unsigned insn, int value, const char **errmsg)
+{
+ if (errmsg != (const char **)NULL && (value & 3))
+ *errmsg = _("jump hint unaligned");
+ return insn | ((value / 4) & 0x1FFF);
+}
+
+static int
+extract_ev6hwjhint (unsigned insn, int *invalid ATTRIBUTE_UNUSED)
+{
+ return 4 * (((insn & 0x1FFF) ^ 0x1000) - 0x1000);
+}
-/* The operands table */
+/* The operands table. */
const struct alpha_operand alpha_operands[] =
{
@@ -83,7 +203,7 @@ const struct alpha_operand alpha_operands[] =
#define UNUSED 0
{ 0, 0, 0, 0, 0, 0 },
- /* The plain integer register fields */
+ /* The plain integer register fields. */
#define RA (UNUSED + 1)
{ 5, 21, 0, AXP_OPERAND_IR, 0, 0 },
#define RB (RA + 1)
@@ -91,7 +211,7 @@ const struct alpha_operand alpha_operands[] =
#define RC (RB + 1)
{ 5, 0, 0, AXP_OPERAND_IR, 0, 0 },
- /* The plain fp register fields */
+ /* The plain fp register fields. */
#define FA (RC + 1)
{ 5, 21, 0, AXP_OPERAND_FPR, 0, 0 },
#define FB (FA + 1)
@@ -99,7 +219,7 @@ const struct alpha_operand alpha_operands[] =
#define FC (FB + 1)
{ 5, 0, 0, AXP_OPERAND_FPR, 0, 0 },
- /* The integer registers when they are ZERO */
+ /* The integer registers when they are ZERO. */
#define ZA (FC + 1)
{ 5, 21, 0, AXP_OPERAND_FAKE, insert_za, extract_za },
#define ZB (ZA + 1)
@@ -107,53 +227,53 @@ const struct alpha_operand alpha_operands[] =
#define ZC (ZB + 1)
{ 5, 0, 0, AXP_OPERAND_FAKE, insert_zc, extract_zc },
- /* The RB field when it needs parentheses */
+ /* The RB field when it needs parentheses. */
#define PRB (ZC + 1)
{ 5, 16, 0, AXP_OPERAND_IR|AXP_OPERAND_PARENS, 0, 0 },
- /* The RB field when it needs parentheses _and_ a preceding comma */
+ /* The RB field when it needs parentheses _and_ a preceding comma. */
#define CPRB (PRB + 1)
{ 5, 16, 0,
AXP_OPERAND_IR|AXP_OPERAND_PARENS|AXP_OPERAND_COMMA, 0, 0 },
- /* The RB field when it must be the same as the RA field */
+ /* The RB field when it must be the same as the RA field. */
#define RBA (CPRB + 1)
{ 5, 16, 0, AXP_OPERAND_FAKE, insert_rba, extract_rba },
- /* The RC field when it must be the same as the RB field */
+ /* The RC field when it must be the same as the RB field. */
#define RCA (RBA + 1)
{ 5, 0, 0, AXP_OPERAND_FAKE, insert_rca, extract_rca },
- /* The RC field when it can *default* to RA */
+ /* The RC field when it can *default* to RA. */
#define DRC1 (RCA + 1)
{ 5, 0, 0,
AXP_OPERAND_IR|AXP_OPERAND_DEFAULT_FIRST, 0, 0 },
- /* The RC field when it can *default* to RB */
+ /* The RC field when it can *default* to RB. */
#define DRC2 (DRC1 + 1)
{ 5, 0, 0,
AXP_OPERAND_IR|AXP_OPERAND_DEFAULT_SECOND, 0, 0 },
- /* The FC field when it can *default* to RA */
+ /* The FC field when it can *default* to RA. */
#define DFC1 (DRC2 + 1)
{ 5, 0, 0,
AXP_OPERAND_FPR|AXP_OPERAND_DEFAULT_FIRST, 0, 0 },
- /* The FC field when it can *default* to RB */
+ /* The FC field when it can *default* to RB. */
#define DFC2 (DFC1 + 1)
{ 5, 0, 0,
AXP_OPERAND_FPR|AXP_OPERAND_DEFAULT_SECOND, 0, 0 },
- /* The unsigned 8-bit literal of Operate format insns */
+ /* The unsigned 8-bit literal of Operate format insns. */
#define LIT (DFC2 + 1)
{ 8, 13, -LIT, AXP_OPERAND_UNSIGNED, 0, 0 },
/* The signed 16-bit displacement of Memory format insns. From here
- we can't tell what relocation should be used, so don't use a default. */
+ we can't tell what relocation should be used, so don't use a default. */
#define MDISP (LIT + 1)
{ 16, 0, -MDISP, AXP_OPERAND_SIGNED, 0, 0 },
- /* The signed "23-bit" aligned displacement of Branch format insns */
+ /* The signed "23-bit" aligned displacement of Branch format insns. */
#define BDISP (MDISP + 1)
{ 21, 0, BFD_RELOC_23_PCREL_S2,
AXP_OPERAND_RELATIVE, insert_bdisp, extract_bdisp },
@@ -162,23 +282,23 @@ const struct alpha_operand alpha_operands[] =
#define PALFN (BDISP + 1)
{ 26, 0, -PALFN, AXP_OPERAND_UNSIGNED, 0, 0 },
- /* The optional signed "16-bit" aligned displacement of the JMP/JSR hint */
+ /* The optional signed "16-bit" aligned displacement of the JMP/JSR hint. */
#define JMPHINT (PALFN + 1)
{ 14, 0, BFD_RELOC_ALPHA_HINT,
AXP_OPERAND_RELATIVE|AXP_OPERAND_DEFAULT_ZERO|AXP_OPERAND_NOOVERFLOW,
insert_jhint, extract_jhint },
- /* The optional hint to RET/JSR_COROUTINE */
+ /* The optional hint to RET/JSR_COROUTINE. */
#define RETHINT (JMPHINT + 1)
{ 14, 0, -RETHINT,
AXP_OPERAND_UNSIGNED|AXP_OPERAND_DEFAULT_ZERO, 0, 0 },
- /* The 12-bit displacement for the ev[46] hw_{ld,st} (pal1b/pal1f) insns */
+ /* The 12-bit displacement for the ev[46] hw_{ld,st} (pal1b/pal1f) insns. */
#define EV4HWDISP (RETHINT + 1)
#define EV6HWDISP (EV4HWDISP)
{ 12, 0, -EV4HWDISP, AXP_OPERAND_SIGNED, 0, 0 },
- /* The 5-bit index for the ev4 hw_m[ft]pr (pal19/pal1d) insns */
+ /* The 5-bit index for the ev4 hw_m[ft]pr (pal19/pal1d) insns. */
#define EV4HWINDEX (EV4HWDISP + 1)
{ 5, 0, -EV4HWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
@@ -187,20 +307,20 @@ const struct alpha_operand alpha_operands[] =
#define EV4EXTHWINDEX (EV4HWINDEX + 1)
{ 8, 0, -EV4EXTHWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
- /* The 10-bit displacement for the ev5 hw_{ld,st} (pal1b/pal1f) insns */
+ /* The 10-bit displacement for the ev5 hw_{ld,st} (pal1b/pal1f) insns. */
#define EV5HWDISP (EV4EXTHWINDEX + 1)
{ 10, 0, -EV5HWDISP, AXP_OPERAND_SIGNED, 0, 0 },
- /* The 16-bit index for the ev5 hw_m[ft]pr (pal19/pal1d) insns */
+ /* The 16-bit index for the ev5 hw_m[ft]pr (pal19/pal1d) insns. */
#define EV5HWINDEX (EV5HWDISP + 1)
{ 16, 0, -EV5HWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
/* The 16-bit combined index/scoreboard mask for the ev6
- hw_m[ft]pr (pal19/pal1d) insns */
+ hw_m[ft]pr (pal19/pal1d) insns. */
#define EV6HWINDEX (EV5HWINDEX + 1)
{ 16, 0, -EV6HWINDEX, AXP_OPERAND_UNSIGNED, 0, 0 },
- /* The 13-bit branch hint for the ev6 hw_jmp/jsr (pal1e) insn */
+ /* The 13-bit branch hint for the ev6 hw_jmp/jsr (pal1e) insn. */
#define EV6HWJMPHINT (EV6HWINDEX+ 1)
{ 8, 0, -EV6HWJMPHINT,
AXP_OPERAND_RELATIVE|AXP_OPERAND_DEFAULT_ZERO|AXP_OPERAND_NOOVERFLOW,
@@ -209,230 +329,57 @@ const struct alpha_operand alpha_operands[] =
const unsigned alpha_num_operands = sizeof(alpha_operands)/sizeof(*alpha_operands);
-/* The RB field when it is the same as the RA field in the same insn.
- This operand is marked fake. The insertion function just copies
- the RA field into the RB field, and the extraction function just
- checks that the fields are the same. */
-
-static unsigned
-insert_rba(insn, value, errmsg)
- unsigned insn;
- int value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
-{
- return insn | (((insn >> 21) & 0x1f) << 16);
-}
-
-static int
-extract_rba(insn, invalid)
- unsigned insn;
- int *invalid;
-{
- if (invalid != (int *) NULL
- && ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
- *invalid = 1;
- return 0;
-}
-
-
-/* The same for the RC field */
-
-static unsigned
-insert_rca(insn, value, errmsg)
- unsigned insn;
- int value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
-{
- return insn | ((insn >> 21) & 0x1f);
-}
-
-static int
-extract_rca(insn, invalid)
- unsigned insn;
- int *invalid;
-{
- if (invalid != (int *) NULL
- && ((insn >> 21) & 0x1f) != (insn & 0x1f))
- *invalid = 1;
- return 0;
-}
-
-
-/* Fake arguments in which the registers must be set to ZERO */
-
-static unsigned
-insert_za(insn, value, errmsg)
- unsigned insn;
- int value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
-{
- return insn | (31 << 21);
-}
-
-static int
-extract_za(insn, invalid)
- unsigned insn;
- int *invalid;
-{
- if (invalid != (int *) NULL && ((insn >> 21) & 0x1f) != 31)
- *invalid = 1;
- return 0;
-}
-
-static unsigned
-insert_zb(insn, value, errmsg)
- unsigned insn;
- int value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
-{
- return insn | (31 << 16);
-}
-
-static int
-extract_zb(insn, invalid)
- unsigned insn;
- int *invalid;
-{
- if (invalid != (int *) NULL && ((insn >> 16) & 0x1f) != 31)
- *invalid = 1;
- return 0;
-}
-
-static unsigned
-insert_zc(insn, value, errmsg)
- unsigned insn;
- int value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
-{
- return insn | 31;
-}
-
-static int
-extract_zc(insn, invalid)
- unsigned insn;
- int *invalid;
-{
- if (invalid != (int *) NULL && (insn & 0x1f) != 31)
- *invalid = 1;
- return 0;
-}
-
-
-/* The displacement field of a Branch format insn. */
-
-static unsigned
-insert_bdisp(insn, value, errmsg)
- unsigned insn;
- int value;
- const char **errmsg;
-{
- if (errmsg != (const char **)NULL && (value & 3))
- *errmsg = _("branch operand unaligned");
- return insn | ((value / 4) & 0x1FFFFF);
-}
-
-static int
-extract_bdisp(insn, invalid)
- unsigned insn;
- int *invalid ATTRIBUTE_UNUSED;
-{
- return 4 * (((insn & 0x1FFFFF) ^ 0x100000) - 0x100000);
-}
-
-
-/* The hint field of a JMP/JSR insn. */
-
-static unsigned
-insert_jhint(insn, value, errmsg)
- unsigned insn;
- int value;
- const char **errmsg;
-{
- if (errmsg != (const char **)NULL && (value & 3))
- *errmsg = _("jump hint unaligned");
- return insn | ((value / 4) & 0x3FFF);
-}
-
-static int
-extract_jhint(insn, invalid)
- unsigned insn;
- int *invalid ATTRIBUTE_UNUSED;
-{
- return 4 * (((insn & 0x3FFF) ^ 0x2000) - 0x2000);
-}
-
-/* The hint field of an EV6 HW_JMP/JSR insn. */
-
-static unsigned
-insert_ev6hwjhint(insn, value, errmsg)
- unsigned insn;
- int value;
- const char **errmsg;
-{
- if (errmsg != (const char **)NULL && (value & 3))
- *errmsg = _("jump hint unaligned");
- return insn | ((value / 4) & 0x1FFF);
-}
-
-static int
-extract_ev6hwjhint(insn, invalid)
- unsigned insn;
- int *invalid ATTRIBUTE_UNUSED;
-{
- return 4 * (((insn & 0x1FFF) ^ 0x1000) - 0x1000);
-}
-
-/* Macros used to form opcodes */
+/* Macros used to form opcodes. */
-/* The main opcode */
+/* The main opcode. */
#define OP(x) (((x) & 0x3F) << 26)
#define OP_MASK 0xFC000000
-/* Branch format instructions */
+/* Branch format instructions. */
#define BRA_(oo) OP(oo)
#define BRA_MASK OP_MASK
#define BRA(oo) BRA_(oo), BRA_MASK
-/* Floating point format instructions */
+/* Floating point format instructions. */
#define FP_(oo,fff) (OP(oo) | (((fff) & 0x7FF) << 5))
#define FP_MASK (OP_MASK | 0xFFE0)
#define FP(oo,fff) FP_(oo,fff), FP_MASK
-/* Memory format instructions */
+/* Memory format instructions. */
#define MEM_(oo) OP(oo)
#define MEM_MASK OP_MASK
#define MEM(oo) MEM_(oo), MEM_MASK
-/* Memory/Func Code format instructions */
+/* Memory/Func Code format instructions. */
#define MFC_(oo,ffff) (OP(oo) | ((ffff) & 0xFFFF))
#define MFC_MASK (OP_MASK | 0xFFFF)
#define MFC(oo,ffff) MFC_(oo,ffff), MFC_MASK
-/* Memory/Branch format instructions */
+/* Memory/Branch format instructions. */
#define MBR_(oo,h) (OP(oo) | (((h) & 3) << 14))
#define MBR_MASK (OP_MASK | 0xC000)
#define MBR(oo,h) MBR_(oo,h), MBR_MASK
/* Operate format instructions. The OPRL variant specifies a
- literal second argument. */
+ literal second argument. */
#define OPR_(oo,ff) (OP(oo) | (((ff) & 0x7F) << 5))
#define OPRL_(oo,ff) (OPR_((oo),(ff)) | 0x1000)
#define OPR_MASK (OP_MASK | 0x1FE0)
#define OPR(oo,ff) OPR_(oo,ff), OPR_MASK
#define OPRL(oo,ff) OPRL_(oo,ff), OPR_MASK
-/* Generic PALcode format instructions */
+/* Generic PALcode format instructions. */
#define PCD_(oo) OP(oo)
#define PCD_MASK OP_MASK
#define PCD(oo) PCD_(oo), PCD_MASK
-/* Specific PALcode instructions */
+/* Specific PALcode instructions. */
#define SPCD_(oo,ffff) (OP(oo) | ((ffff) & 0x3FFFFFF))
#define SPCD_MASK 0xFFFFFFFF
#define SPCD(oo,ffff) SPCD_(oo,ffff), SPCD_MASK
-/* Hardware memory (hw_{ld,st}) instructions */
+/* Hardware memory (hw_{ld,st}) instructions. */
#define EV4HWMEM_(oo,f) (OP(oo) | (((f) & 0xF) << 12))
#define EV4HWMEM_MASK (OP_MASK | 0xF000)
#define EV4HWMEM(oo,f) EV4HWMEM_(oo,f), EV4HWMEM_MASK
@@ -458,7 +405,7 @@ extract_ev6hwjhint(insn, invalid)
#define CIX AXP_OPCODE_CIX
#define MAX AXP_OPCODE_MAX
-/* Common combinations of arguments */
+/* Common combinations of arguments. */
#define ARG_NONE { 0 }
#define ARG_BRA { RA, BDISP }
#define ARG_FBRA { FA, BDISP }
@@ -518,10 +465,10 @@ extract_ev6hwjhint(insn, invalid)
EV56 UNA opcodes that were introduced as of the ev56 with
presumably undefined results on previous implementations
- that were not assigned to a particular extension.
-*/
+ that were not assigned to a particular extension. */
-const struct alpha_opcode alpha_opcodes[] = {
+const struct alpha_opcode alpha_opcodes[] =
+{
{ "halt", SPCD(0x00,0x0000), BASE, ARG_NONE },
{ "draina", SPCD(0x00,0x0002), BASE, ARG_NONE },
{ "bpt", SPCD(0x00,0x0080), BASE, ARG_NONE },
diff --git a/contrib/binutils/opcodes/arc-dis.c b/contrib/binutils/opcodes/arc-dis.c
index 194a75ac9fe4..ba48eeffe649 100644
--- a/contrib/binutils/opcodes/arc-dis.c
+++ b/contrib/binutils/opcodes/arc-dis.c
@@ -1,5 +1,5 @@
/* Instruction printing code for the ARC.
- Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002
+ Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2005
Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
@@ -15,7 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#include "ansidecl.h"
#include "libiberty.h"
@@ -34,6 +35,28 @@
#define dbg (0)
#endif
+/* Classification of the opcodes for the decoder to print
+ the instructions. */
+
+typedef enum
+{
+ CLASS_A4_ARITH,
+ CLASS_A4_OP3_GENERAL,
+ CLASS_A4_FLAG,
+ /* All branches other than JC. */
+ CLASS_A4_BRANCH,
+ CLASS_A4_JC ,
+ /* All loads other than immediate
+ indexed loads. */
+ CLASS_A4_LD0,
+ CLASS_A4_LD1,
+ CLASS_A4_ST,
+ CLASS_A4_SR,
+ /* All single operand instructions. */
+ CLASS_A4_OP3_SUBOPC3F,
+ CLASS_A4_LR
+} a4_decoding_class;
+
#define BIT(word,n) ((word) & (1 << n))
#define BITS(word,s,e) (((word) << (31 - e)) >> (s + (31 - e)))
#define OPCODE(word) (BITS ((word), 27, 31))
@@ -122,15 +145,15 @@
} \
while (0)
-#define IS_SMALL(x) (((field##x) < 256) && ((field##x) > -257))
-#define IS_REG(x) (field##x##isReg)
-#define WRITE_FORMAT_LB_Rx_RB(x) WRITE_FORMAT(x,"[","]","","")
-#define WRITE_FORMAT_x_COMMA_LB(x) WRITE_FORMAT(x,"",",[","",",[")
-#define WRITE_FORMAT_COMMA_x_RB(x) WRITE_FORMAT(x,",","]",",","]")
-#define WRITE_FORMAT_x_RB(x) WRITE_FORMAT(x,"","]","","]")
-#define WRITE_FORMAT_COMMA_x(x) WRITE_FORMAT(x,",","",",","")
-#define WRITE_FORMAT_x_COMMA(x) WRITE_FORMAT(x,"",",","",",")
-#define WRITE_FORMAT_x(x) WRITE_FORMAT(x,"","","","")
+#define IS_SMALL(x) (((field##x) < 256) && ((field##x) > -257))
+#define IS_REG(x) (field##x##isReg)
+#define WRITE_FORMAT_LB_Rx_RB(x) WRITE_FORMAT (x, "[","]","","")
+#define WRITE_FORMAT_x_COMMA_LB(x) WRITE_FORMAT (x, "",",[","",",[")
+#define WRITE_FORMAT_COMMA_x_RB(x) WRITE_FORMAT (x, ",","]",",","]")
+#define WRITE_FORMAT_x_RB(x) WRITE_FORMAT (x, "","]","","]")
+#define WRITE_FORMAT_COMMA_x(x) WRITE_FORMAT (x, ",","",",","")
+#define WRITE_FORMAT_x_COMMA(x) WRITE_FORMAT (x, "",",","",",")
+#define WRITE_FORMAT_x(x) WRITE_FORMAT (x, "","","","")
#define WRITE_FORMAT(x,cb1,ca1,cb,ca) strcat (formatString, \
(IS_REG (x) ? cb1"%r"ca1 : \
usesAuxReg ? cb"%a"ca : \
@@ -145,25 +168,8 @@
static char comment_prefix[] = "\t; ";
-static const char *core_reg_name PARAMS ((struct arcDisState *, int));
-static const char *aux_reg_name PARAMS ((struct arcDisState *, int));
-static const char *cond_code_name PARAMS ((struct arcDisState *, int));
-static const char *instruction_name
- PARAMS ((struct arcDisState *, int, int, int *));
-static void mwerror PARAMS ((struct arcDisState *, const char *));
-static const char *post_address PARAMS ((struct arcDisState *, int));
-static void write_comments_
- PARAMS ((struct arcDisState *, int, int, long int));
-static void write_instr_name_
- PARAMS ((struct arcDisState *, const char *, int, int, int, int, int, int));
-static int dsmOneArcInst PARAMS ((bfd_vma, struct arcDisState *));
-static const char *_coreRegName PARAMS ((void *, int));
-static int decodeInstr PARAMS ((bfd_vma, disassemble_info *));
-
static const char *
-core_reg_name (state, val)
- struct arcDisState * state;
- int val;
+core_reg_name (struct arcDisState * state, int val)
{
if (state->coreRegName)
return (*state->coreRegName)(state->_this, val);
@@ -171,9 +177,7 @@ core_reg_name (state, val)
}
static const char *
-aux_reg_name (state, val)
- struct arcDisState * state;
- int val;
+aux_reg_name (struct arcDisState * state, int val)
{
if (state->auxRegName)
return (*state->auxRegName)(state->_this, val);
@@ -181,9 +185,7 @@ aux_reg_name (state, val)
}
static const char *
-cond_code_name (state, val)
- struct arcDisState * state;
- int val;
+cond_code_name (struct arcDisState * state, int val)
{
if (state->condCodeName)
return (*state->condCodeName)(state->_this, val);
@@ -191,11 +193,10 @@ cond_code_name (state, val)
}
static const char *
-instruction_name (state, op1, op2, flags)
- struct arcDisState * state;
- int op1;
- int op2;
- int * flags;
+instruction_name (struct arcDisState * state,
+ int op1,
+ int op2,
+ int * flags)
{
if (state->instName)
return (*state->instName)(state->_this, op1, op2, flags);
@@ -203,18 +204,14 @@ instruction_name (state, op1, op2, flags)
}
static void
-mwerror (state, msg)
- struct arcDisState * state;
- const char * msg;
+mwerror (struct arcDisState * state, const char * msg)
{
if (state->err != 0)
(*state->err)(state->_this, (msg));
}
static const char *
-post_address (state, addr)
- struct arcDisState * state;
- int addr;
+post_address (struct arcDisState * state, int addr)
{
static char id[3 * ARRAY_SIZE (state->addresses)];
int j, i = state->acnt;
@@ -233,22 +230,16 @@ post_address (state, addr)
return "";
}
-static void my_sprintf PARAMS ((struct arcDisState *, char *, const char *,
- ...));
-
static void
-my_sprintf VPARAMS ((struct arcDisState *state, char *buf, const char *format,
- ...))
+arc_sprintf (struct arcDisState *state, char *buf, const char *format, ...)
{
char *bp;
const char *p;
int size, leading_zero, regMap[2];
long auxNum;
+ va_list ap;
- VA_OPEN (ap, format);
- VA_FIXEDARG (ap, struct arcDisState *, state);
- VA_FIXEDARG (ap, char *, buf);
- VA_FIXEDARG (ap, const char *, format);
+ va_start (ap, format);
bp = buf;
*bp = 0;
@@ -389,7 +380,7 @@ my_sprintf VPARAMS ((struct arcDisState *state, char *buf, const char *format,
if (ext)
sprintf (bp, "%s", ext);
else
- my_sprintf (state, bp, "%h", val);
+ arc_sprintf (state, bp, "%h", val);
}
break;
}
@@ -411,15 +402,14 @@ my_sprintf VPARAMS ((struct arcDisState *state, char *buf, const char *format,
}
DOCOMM: *bp = 0;
- VA_CLOSE (ap);
+ va_end (ap);
}
static void
-write_comments_(state, shimm, is_limm, limm_value)
- struct arcDisState * state;
- int shimm;
- int is_limm;
- long limm_value;
+write_comments_(struct arcDisState * state,
+ int shimm,
+ int is_limm,
+ long limm_value)
{
if (state->commentBuffer != 0)
{
@@ -444,25 +434,25 @@ write_comments_(state, shimm, is_limm, limm_value)
}
}
-#define write_comments2(x) write_comments_(state, x, is_limm, limm_value)
-#define write_comments() write_comments2(0)
+#define write_comments2(x) write_comments_ (state, x, is_limm, limm_value)
+#define write_comments() write_comments2 (0)
-static const char *condName[] = {
+static const char *condName[] =
+{
/* 0..15. */
"" , "z" , "nz" , "p" , "n" , "c" , "nc" , "v" ,
"nv" , "gt" , "ge" , "lt" , "le" , "hi" , "ls" , "pnz"
};
static void
-write_instr_name_(state, instrName, cond, condCodeIsPartOfName, flag, signExtend, addrWriteBack, directMem)
- struct arcDisState * state;
- const char * instrName;
- int cond;
- int condCodeIsPartOfName;
- int flag;
- int signExtend;
- int addrWriteBack;
- int directMem;
+write_instr_name_(struct arcDisState * state,
+ const char * instrName,
+ int cond,
+ int condCodeIsPartOfName,
+ int flag,
+ int signExtend,
+ int addrWriteBack,
+ int directMem)
{
strcpy (state->instrBuffer, instrName);
@@ -516,7 +506,8 @@ write_instr_name_(state, instrName, cond, condCodeIsPartOfName, flag, signExtend
} \
while (0)
-enum {
+enum
+{
op_LD0 = 0, op_LD1 = 1, op_ST = 2, op_3 = 3,
op_BC = 4, op_BLC = 5, op_LPC = 6, op_JC = 7,
op_ADD = 8, op_ADC = 9, op_SUB = 10, op_SBC = 11,
@@ -526,12 +517,10 @@ enum {
extern disassemble_info tm_print_insn_info;
static int
-dsmOneArcInst (addr, state)
- bfd_vma addr;
- struct arcDisState * state;
+dsmOneArcInst (bfd_vma addr, struct arcDisState * state)
{
int condCodeIsPartOfName = 0;
- int decodingClass;
+ a4_decoding_class decodingClass;
const char * instrName;
int repeatsOp = 0;
int fieldAisReg = 1;
@@ -572,7 +561,7 @@ dsmOneArcInst (addr, state)
state->_opcode = OPCODE (state->words[0]);
instrName = 0;
- decodingClass = 0; /* default! */
+ decodingClass = CLASS_A4_ARITH; /* default! */
repeatsOp = 0;
condCodeIsPartOfName=0;
state->commNum = 0;
@@ -606,18 +595,18 @@ dsmOneArcInst (addr, state)
state->flow = invalid_instr;
break;
}
- decodingClass = 5;
+ decodingClass = CLASS_A4_LD0;
break;
case op_LD1:
if (BIT (state->words[0],13))
{
instrName = "lr";
- decodingClass = 10;
+ decodingClass = CLASS_A4_LR;
}
else
{
- switch (BITS (state->words[0],10,11))
+ switch (BITS (state->words[0], 10, 11))
{
case 0:
instrName = "ld";
@@ -636,19 +625,19 @@ dsmOneArcInst (addr, state)
state->flow = invalid_instr;
break;
}
- decodingClass = 6;
+ decodingClass = CLASS_A4_LD1;
}
break;
case op_ST:
- if (BIT (state->words[0],25))
+ if (BIT (state->words[0], 25))
{
instrName = "sr";
- decodingClass = 8;
+ decodingClass = CLASS_A4_SR;
}
else
{
- switch (BITS (state->words[0],22,23))
+ switch (BITS (state->words[0], 22, 23))
{
case 0:
instrName = "st";
@@ -664,17 +653,17 @@ dsmOneArcInst (addr, state)
state->flow = invalid_instr;
break;
}
- decodingClass = 7;
+ decodingClass = CLASS_A4_ST;
}
break;
case op_3:
- decodingClass = 1; /* default for opcode 3... */
+ decodingClass = CLASS_A4_OP3_GENERAL; /* default for opcode 3... */
switch (FIELDC (state->words[0]))
{
case 0:
instrName = "flag";
- decodingClass = 2;
+ decodingClass = CLASS_A4_FLAG;
break;
case 1:
instrName = "asr";
@@ -702,8 +691,8 @@ dsmOneArcInst (addr, state)
break;
case 0x3f:
{
- decodingClass = 9;
- switch( FIELDD (state->words[0]) )
+ decodingClass = CLASS_A4_OP3_SUBOPC3F;
+ switch (FIELDD (state->words[0]))
{
case 0:
instrName = "brk";
@@ -763,7 +752,7 @@ dsmOneArcInst (addr, state)
}
}
condCodeIsPartOfName = 1;
- decodingClass = ((state->_opcode == op_JC) ? 4 : 3);
+ decodingClass = ((state->_opcode == op_JC) ? CLASS_A4_JC : CLASS_A4_BRANCH );
state->isBranch = 1;
break;
@@ -771,7 +760,6 @@ dsmOneArcInst (addr, state)
case op_ADC:
case op_AND:
repeatsOp = (FIELDC (state->words[0]) == FIELDB (state->words[0]));
- decodingClass = 0;
switch (state->_opcode)
{
@@ -799,9 +787,9 @@ dsmOneArcInst (addr, state)
case op_XOR:
if (state->words[0] == 0x7fffffff)
{
- /* nop encoded as xor -1, -1, -1 */
+ /* NOP encoded as xor -1, -1, -1. */
instrName = "nop";
- decodingClass = 9;
+ decodingClass = CLASS_A4_OP3_SUBOPC3F;
}
else
instrName = "xor";
@@ -828,7 +816,7 @@ dsmOneArcInst (addr, state)
switch (decodingClass)
{
- case 0:
+ case CLASS_A4_ARITH:
CHECK_FIELD_A ();
CHECK_FIELD_B ();
if (!repeatsOp)
@@ -843,7 +831,7 @@ dsmOneArcInst (addr, state)
if (!repeatsOp)
WRITE_FORMAT_COMMA_x (C);
WRITE_NOP_COMMENT ();
- my_sprintf (state, state->operandBuffer, formatString,
+ arc_sprintf (state, state->operandBuffer, formatString,
fieldA, fieldB, fieldC);
}
else
@@ -851,13 +839,13 @@ dsmOneArcInst (addr, state)
WRITE_FORMAT_x (B);
if (!repeatsOp)
WRITE_FORMAT_COMMA_x (C);
- my_sprintf (state, state->operandBuffer, formatString,
+ arc_sprintf (state, state->operandBuffer, formatString,
fieldB, fieldC);
}
write_comments ();
break;
- case 1:
+ case CLASS_A4_OP3_GENERAL:
CHECK_FIELD_A ();
CHECK_FIELD_B ();
CHECK_FLAG_COND_NULLIFY ();
@@ -868,31 +856,31 @@ dsmOneArcInst (addr, state)
WRITE_FORMAT_x (A);
WRITE_FORMAT_COMMA_x (B);
WRITE_NOP_COMMENT ();
- my_sprintf (state, state->operandBuffer, formatString,
+ arc_sprintf (state, state->operandBuffer, formatString,
fieldA, fieldB);
}
else
{
WRITE_FORMAT_x (B);
- my_sprintf (state, state->operandBuffer, formatString, fieldB);
+ arc_sprintf (state, state->operandBuffer, formatString, fieldB);
}
write_comments ();
break;
- case 2:
+ case CLASS_A4_FLAG:
CHECK_FIELD_B ();
CHECK_FLAG_COND_NULLIFY ();
- flag = 0; /* this is the FLAG instruction -- it's redundant */
+ flag = 0; /* This is the FLAG instruction -- it's redundant. */
write_instr_name ();
WRITE_FORMAT_x (B);
- my_sprintf (state, state->operandBuffer, formatString, fieldB);
+ arc_sprintf (state, state->operandBuffer, formatString, fieldB);
write_comments ();
break;
- case 3:
+ case CLASS_A4_BRANCH:
fieldA = BITS (state->words[0],7,26) << 2;
- fieldA = (fieldA << 10) >> 10; /* make it signed */
+ fieldA = (fieldA << 10) >> 10; /* Make it signed. */
fieldA += addr + 4;
CHECK_FLAG_COND_NULLIFY ();
flag = 0;
@@ -909,13 +897,13 @@ dsmOneArcInst (addr, state)
lr dest<- func addr; j [dest]" */
}
- strcat (formatString, "%s"); /* address/label name */
- my_sprintf (state, state->operandBuffer, formatString,
+ strcat (formatString, "%s"); /* Address/label name. */
+ arc_sprintf (state, state->operandBuffer, formatString,
post_address (state, fieldA));
write_comments ();
break;
- case 4:
+ case CLASS_A4_JC:
/* For op_JC -- jump to address specified.
Also covers jump and link--bit 9 of the instr. word
selects whether linked, thus "is_linked" is set above. */
@@ -926,12 +914,12 @@ dsmOneArcInst (addr, state)
if (!fieldBisReg)
{
fieldAisReg = 0;
- fieldA = (fieldB >> 25) & 0x7F; /* flags */
+ fieldA = (fieldB >> 25) & 0x7F; /* Flags. */
fieldB = (fieldB & 0xFFFFFF) << 2;
state->flow = is_linked ? direct_call : direct_jump;
add_target (fieldB);
- /* screwy JLcc requires .jd mode to execute correctly
- * but we pretend it is .nd (no delay slot). */
+ /* Screwy JLcc requires .jd mode to execute correctly
+ but we pretend it is .nd (no delay slot). */
if (is_linked && state->nullifyMode == BR_exec_when_jump)
state->nullifyMode = BR_exec_when_no_jump;
}
@@ -939,29 +927,29 @@ dsmOneArcInst (addr, state)
{
state->flow = is_linked ? indirect_call : indirect_jump;
/* We should also treat this as indirect call if NOT linked
- * but the preceding instruction was a "lr blink,[status]"
- * and we have a delay slot with "add blink,blink,2".
- * For now we can't detect such. */
+ but the preceding instruction was a "lr blink,[status]"
+ and we have a delay slot with "add blink,blink,2".
+ For now we can't detect such. */
state->register_for_indirect_jump = fieldB;
}
write_instr_name ();
strcat (formatString,
- IS_REG (B) ? "[%r]" : "%s"); /* address/label name */
+ IS_REG (B) ? "[%r]" : "%s"); /* Address/label name. */
if (fieldA != 0)
{
fieldAisReg = 0;
WRITE_FORMAT_COMMA_x (A);
}
if (IS_REG (B))
- my_sprintf (state, state->operandBuffer, formatString, fieldB, fieldA);
+ arc_sprintf (state, state->operandBuffer, formatString, fieldB, fieldA);
else
- my_sprintf (state, state->operandBuffer, formatString,
+ arc_sprintf (state, state->operandBuffer, formatString,
post_address (state, fieldB), fieldA);
write_comments ();
break;
- case 5:
+ case CLASS_A4_LD0:
/* LD instruction.
B and C can be regs, or one (both?) can be limm. */
CHECK_FIELD_A ();
@@ -982,9 +970,9 @@ dsmOneArcInst (addr, state)
state->_offset += fieldC;
state->_mem_load = 1;
- directMem = BIT (state->words[0],5);
- addrWriteBack = BIT (state->words[0],3);
- signExtend = BIT (state->words[0],0);
+ directMem = BIT (state->words[0], 5);
+ addrWriteBack = BIT (state->words[0], 3);
+ signExtend = BIT (state->words[0], 0);
write_instr_name ();
WRITE_FORMAT_x_COMMA_LB(A);
@@ -994,12 +982,12 @@ dsmOneArcInst (addr, state)
fieldB = fieldC;
WRITE_FORMAT_x_RB (C);
- my_sprintf (state, state->operandBuffer, formatString,
+ arc_sprintf (state, state->operandBuffer, formatString,
fieldA, fieldB, fieldC);
write_comments ();
break;
- case 6:
+ case CLASS_A4_LD1:
/* LD instruction. */
CHECK_FIELD_B ();
CHECK_FIELD_A ();
@@ -1013,7 +1001,7 @@ dsmOneArcInst (addr, state)
state->_mem_load = 1;
if (fieldBisReg)
state->ea_reg1 = fieldB;
- /* field B is either a shimm (same as fieldC) or limm (different!)
+ /* Field B is either a shimm (same as fieldC) or limm (different!)
Say ea is not present, so only one of us will do the name lookup. */
else
state->_offset += fieldB, state->_ea_present = 0;
@@ -1040,12 +1028,12 @@ dsmOneArcInst (addr, state)
else
WRITE_FORMAT_RB ();
}
- my_sprintf (state, state->operandBuffer, formatString,
+ arc_sprintf (state, state->operandBuffer, formatString,
fieldA, fieldB, fieldC);
write_comments ();
break;
- case 7:
+ case CLASS_A4_ST:
/* ST instruction. */
CHECK_FIELD_B();
CHECK_FIELD_C();
@@ -1058,26 +1046,26 @@ dsmOneArcInst (addr, state)
state->_offset = fieldA;
if (fieldBisReg)
state->ea_reg1 = fieldB;
- /* field B is either a shimm (same as fieldA) or limm (different!)
+ /* Field B is either a shimm (same as fieldA) or limm (different!)
Say ea is not present, so only one of us will do the name lookup.
(for is_limm we do the name translation here). */
else
state->_offset += fieldB, state->_ea_present = 0;
- directMem = BIT(state->words[0],26);
- addrWriteBack = BIT(state->words[0],24);
+ directMem = BIT (state->words[0], 26);
+ addrWriteBack = BIT (state->words[0], 24);
- write_instr_name();
+ write_instr_name ();
WRITE_FORMAT_x_COMMA_LB(C);
if (!fieldBisReg)
{
fieldB = state->_offset;
- WRITE_FORMAT_x_RB(B);
+ WRITE_FORMAT_x_RB (B);
}
else
{
- WRITE_FORMAT_x(B);
+ WRITE_FORMAT_x (B);
if (fieldBisReg && fieldA != 0)
{
fieldAisReg = 0;
@@ -1086,49 +1074,44 @@ dsmOneArcInst (addr, state)
else
WRITE_FORMAT_RB();
}
- my_sprintf (state, state->operandBuffer, formatString,
+ arc_sprintf (state, state->operandBuffer, formatString,
fieldC, fieldB, fieldA);
- write_comments2(fieldA);
+ write_comments2 (fieldA);
break;
- case 8:
+
+ case CLASS_A4_SR:
/* SR instruction */
CHECK_FIELD_B();
CHECK_FIELD_C();
- write_instr_name();
+ write_instr_name ();
WRITE_FORMAT_x_COMMA_LB(C);
/* Try to print B as an aux reg if it is not a core reg. */
usesAuxReg = 1;
- WRITE_FORMAT_x(B);
- WRITE_FORMAT_RB();
- my_sprintf (state, state->operandBuffer, formatString, fieldC, fieldB);
- write_comments();
+ WRITE_FORMAT_x (B);
+ WRITE_FORMAT_RB ();
+ arc_sprintf (state, state->operandBuffer, formatString, fieldC, fieldB);
+ write_comments ();
break;
- case 9:
- write_instr_name();
+ case CLASS_A4_OP3_SUBOPC3F:
+ write_instr_name ();
state->operandBuffer[0] = '\0';
break;
- case 10:
+ case CLASS_A4_LR:
/* LR instruction */
- CHECK_FIELD_A();
- CHECK_FIELD_B();
+ CHECK_FIELD_A ();
+ CHECK_FIELD_B ();
- write_instr_name();
- WRITE_FORMAT_x_COMMA_LB(A);
+ write_instr_name ();
+ WRITE_FORMAT_x_COMMA_LB (A);
/* Try to print B as an aux reg if it is not a core reg. */
usesAuxReg = 1;
- WRITE_FORMAT_x(B);
- WRITE_FORMAT_RB();
- my_sprintf (state, state->operandBuffer, formatString, fieldA, fieldB);
- write_comments();
- break;
-
- case 11:
- CHECK_COND();
- write_instr_name();
- state->operandBuffer[0] = '\0';
+ WRITE_FORMAT_x (B);
+ WRITE_FORMAT_RB ();
+ arc_sprintf (state, state->operandBuffer, formatString, fieldA, fieldB);
+ write_comments ();
break;
default:
@@ -1142,23 +1125,23 @@ dsmOneArcInst (addr, state)
/* Returns the name the user specified core extension register. */
+
static const char *
-_coreRegName(arg, regval)
- void * arg ATTRIBUTE_UNUSED;
- int regval;
+_coreRegName(void * arg ATTRIBUTE_UNUSED, int regval)
{
return arcExtMap_coreRegName (regval);
}
/* Returns the name the user specified AUX extension register. */
+
static const char *
_auxRegName(void *_this ATTRIBUTE_UNUSED, int regval)
{
return arcExtMap_auxRegName(regval);
}
-
/* Returns the name the user specified condition code name. */
+
static const char *
_condCodeName(void *_this ATTRIBUTE_UNUSED, int regval)
{
@@ -1166,6 +1149,7 @@ _condCodeName(void *_this ATTRIBUTE_UNUSED, int regval)
}
/* Returns the name the user specified extension instruction. */
+
static const char *
_instName (void *_this ATTRIBUTE_UNUSED, int majop, int minop, int *flags)
{
@@ -1174,15 +1158,15 @@ _instName (void *_this ATTRIBUTE_UNUSED, int majop, int minop, int *flags)
/* Decode an instruction returning the size of the instruction
in bytes or zero if unrecognized. */
+
static int
-decodeInstr (address, info)
- bfd_vma address; /* Address of this instruction. */
- disassemble_info * info;
+decodeInstr (bfd_vma address, /* Address of this instruction. */
+ disassemble_info * info)
{
int status;
bfd_byte buffer[4];
- struct arcDisState s; /* ARC Disassembler state */
- void *stream = info->stream; /* output stream */
+ struct arcDisState s; /* ARC Disassembler state. */
+ void *stream = info->stream; /* Output stream. */
fprintf_ftype func = info->fprintf_func;
int bytes;
@@ -1199,9 +1183,9 @@ decodeInstr (address, info)
s.words[0] = bfd_getl32(buffer);
else
s.words[0] = bfd_getb32(buffer);
- /* always read second word in case of limm */
+ /* Always read second word in case of limm. */
- /* we ignore the result since last insn may not have a limm */
+ /* We ignore the result since last insn may not have a limm. */
status = (*info->read_memory_func) (address + 4, buffer, 4, info);
if (info->endian == BFD_ENDIAN_LITTLE)
s.words[1] = bfd_getl32(buffer);
@@ -1214,23 +1198,24 @@ decodeInstr (address, info)
s.condCodeName = _condCodeName;
s.instName = _instName;
- /* disassemble */
- bytes = dsmOneArcInst(address, (void *)&s);
+ /* Disassemble. */
+ bytes = dsmOneArcInst (address, (void *)& s);
- /* display the disassembly instruction */
- (*func) (stream, "%08x ", s.words[0]);
+ /* Display the disassembly instruction. */
+ (*func) (stream, "%08lx ", s.words[0]);
(*func) (stream, " ");
-
(*func) (stream, "%-10s ", s.instrBuffer);
- if (__TRANSLATION_REQUIRED(s))
+ if (__TRANSLATION_REQUIRED (s))
{
bfd_vma addr = s.addresses[s.operandBuffer[1] - '0'];
+
(*info->print_address_func) ((bfd_vma) addr, info);
(*func) (stream, "\n");
}
else
(*func) (stream, "%s",s.operandBuffer);
+
return s.instructionLen;
}
diff --git a/contrib/binutils/opcodes/arc-dis.h b/contrib/binutils/opcodes/arc-dis.h
index 04bfbbb00fe8..c1120d13d351 100644
--- a/contrib/binutils/opcodes/arc-dis.h
+++ b/contrib/binutils/opcodes/arc-dis.h
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef ARCDIS_H
#define ARCDIS_H
diff --git a/contrib/binutils/opcodes/arc-ext.c b/contrib/binutils/opcodes/arc-ext.c
index fd43d29ab3fd..07419bf158c0 100644
--- a/contrib/binutils/opcodes/arc-ext.c
+++ b/contrib/binutils/opcodes/arc-ext.c
@@ -1,5 +1,6 @@
/* ARC target-dependent stuff. Extension structure access functions
- Copyright 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1995, 1997, 2000, 2001, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -15,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
#include <stdlib.h>
@@ -58,7 +59,7 @@ arcExtMap_coreRegName(int value)
{
if (value < 32)
return 0;
- return (const char *) arc_extension_map.coreRegisters[value-32];
+ return arc_extension_map.coreRegisters[value-32];
}
/* Get the name of an extension condition code. */
@@ -68,7 +69,7 @@ arcExtMap_condCodeName(int value)
{
if (value < 16)
return 0;
- return (const char *) arc_extension_map.condCodes[value-16];
+ return arc_extension_map.condCodes[value-16];
}
/* Get the name of an extension aux register. */
@@ -187,7 +188,7 @@ arcExtMap_add(void *base, unsigned long length)
else
opcode -= 0x10;
insn -> flags = (char) *(p+4);
- strcpy(insn_name, (p+5));
+ strcpy (insn_name, (char *) (p+5));
insn -> name = insn_name;
arc_extension_map.instructions[(int) opcode] = insn;
}
@@ -197,7 +198,7 @@ arcExtMap_add(void *base, unsigned long length)
{
char * core_name = (char *) xmalloc(((int)*p-3) * sizeof(char));
- strcpy(core_name, (p+3));
+ strcpy(core_name, (char *) (p+3));
arc_extension_map.coreRegisters[p[2]-32] = core_name;
}
break;
@@ -205,7 +206,7 @@ arcExtMap_add(void *base, unsigned long length)
case EXT_COND_CODE:
{
char * cc_name = (char *) xmalloc( ((int)*p-3) * sizeof(char));
- strcpy(cc_name, (p+3));
+ strcpy(cc_name, (char *) (p+3));
arc_extension_map.condCodes[p[2]-16] = cc_name;
}
break;
@@ -217,7 +218,7 @@ arcExtMap_add(void *base, unsigned long length)
(struct ExtAuxRegister *)malloc(sizeof(struct ExtAuxRegister));
char * aux_name = (char *) xmalloc ( ((int)*p-6) * sizeof(char));
- strcpy (aux_name, (p+6));
+ strcpy (aux_name, (char *) (p+6));
newAuxRegister->name = aux_name;
newAuxRegister->address = p[2]<<24 | p[3]<<16 | p[4]<<8 | p[5];
newAuxRegister->next = arc_extension_map.auxRegisters;
@@ -248,7 +249,7 @@ build_ARC_extmap (text_bfd)
for (p = text_bfd->sections; p != NULL; p = p->next)
if (!strcmp (p->name, ".arcextmap"))
{
- count = p->_raw_size;
+ count = bfd_get_section_size (p);
arcExtMap = (char *) xmalloc (count);
if (bfd_get_section_contents (text_bfd, p, (PTR) arcExtMap, 0, count))
{
diff --git a/contrib/binutils/opcodes/arc-ext.h b/contrib/binutils/opcodes/arc-ext.h
index bfe9750b60c3..c5888fbd7be7 100644
--- a/contrib/binutils/opcodes/arc-ext.h
+++ b/contrib/binutils/opcodes/arc-ext.h
@@ -1,5 +1,5 @@
/* ARC target-dependent stuff. Extension data structures.
- Copyright 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1995, 1997, 2000, 2001, 2005 Free Software Foundation, Inc.
This file is part of GDB.
@@ -15,15 +15,15 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef ARCEXT_H
#define ARCEXT_H
-enum {EXT_INSTRUCTION = 0};
-enum {EXT_CORE_REGISTER = 1};
-enum {EXT_AUX_REGISTER = 2};
-enum {EXT_COND_CODE = 3};
+enum {EXT_INSTRUCTION = 0,
+ EXT_CORE_REGISTER = 1,
+ EXT_AUX_REGISTER = 2,
+ EXT_COND_CODE = 3};
enum {NUM_EXT_INST = (0x1f-0x10+1) + (0x3f-0x09+1)};
enum {NUM_EXT_CORE = 59-32+1};
@@ -46,8 +46,8 @@ struct arcExtMap
{
struct ExtAuxRegister *auxRegisters;
struct ExtInstruction *instructions[NUM_EXT_INST];
- unsigned char *coreRegisters[NUM_EXT_CORE];
- unsigned char *condCodes[NUM_EXT_COND];
+ char *coreRegisters[NUM_EXT_CORE];
+ char *condCodes[NUM_EXT_COND];
};
extern int arcExtMap_add(void*, unsigned long);
diff --git a/contrib/binutils/opcodes/arc-opc.c b/contrib/binutils/opcodes/arc-opc.c
index 614fff033f7e..7de071fee631 100644
--- a/contrib/binutils/opcodes/arc-opc.c
+++ b/contrib/binutils/opcodes/arc-opc.c
@@ -1,5 +1,5 @@
/* Opcode table for the ARC.
- Copyright 1994, 1995, 1997, 1998, 2000, 2001
+ Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2004, 2005
Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
@@ -15,21 +15,77 @@
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. */
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
#include <stdio.h>
#include "ansidecl.h"
#include "bfd.h"
#include "opcode/arc.h"
+#include "opintl.h"
+enum operand {OP_NONE,OP_REG,OP_SHIMM,OP_LIMM};
+
+#define OPERANDS 3
+
+enum operand ls_operand[OPERANDS];
+
+struct arc_opcode *arc_ext_opcodes;
+struct arc_ext_operand_value *arc_ext_operands;
+
+#define LS_VALUE 0
+#define LS_DEST 0
+#define LS_BASE 1
+#define LS_OFFSET 2
+
+/* Given a format letter, yields the index into `arc_operands'.
+ eg: arc_operand_map['a'] = REGA. */
+unsigned char arc_operand_map[256];
+
+/* Nonzero if we've seen an 'f' suffix (in certain insns). */
+static int flag_p;
+
+/* Nonzero if we've finished processing the 'f' suffix. */
+static int flagshimm_handled_p;
+
+/* Nonzero if we've seen a 'a' suffix (address writeback). */
+static int addrwb_p;
+
+/* Nonzero if we've seen a 'q' suffix (condition code). */
+static int cond_p;
+
+/* Nonzero if we've inserted a nullify condition. */
+static int nullify_p;
+
+/* The value of the a nullify condition we inserted. */
+static int nullify;
+
+/* Nonzero if we've inserted jumpflags. */
+static int jumpflags_p;
+
+/* Nonzero if we've inserted a shimm. */
+static int shimm_p;
+
+/* The value of the shimm we inserted (each insn only gets one but it can
+ appear multiple times). */
+static int shimm;
+
+/* Nonzero if we've inserted a limm (during assembly) or seen a limm
+ (during disassembly). */
+static int limm_p;
+
+/* The value of the limm we inserted. Each insn only gets one but it can
+ appear multiple times. */
+static long limm;
+
#define INSERT_FN(fn) \
-static arc_insn fn PARAMS ((arc_insn, const struct arc_operand *, \
- int, const struct arc_operand_value *, long, \
- const char **))
+static arc_insn fn (arc_insn, const struct arc_operand *, \
+ int, const struct arc_operand_value *, long, \
+ const char **)
+
#define EXTRACT_FN(fn) \
-static long fn PARAMS ((arc_insn *, const struct arc_operand *, \
- int, const struct arc_operand_value **, int *))
+static long fn (arc_insn *, const struct arc_operand *, \
+ int, const struct arc_operand_value **, int *)
INSERT_FN (insert_reg);
INSERT_FN (insert_shimmfinish);
@@ -60,20 +116,6 @@ EXTRACT_FN (extract_reladdr);
EXTRACT_FN (extract_jumpflags);
EXTRACT_FN (extract_unopmacro);
-enum operand {OP_NONE,OP_REG,OP_SHIMM,OP_LIMM};
-
-#define OPERANDS 3
-
-enum operand ls_operand[OPERANDS];
-
-struct arc_opcode *arc_ext_opcodes;
-struct arc_ext_operand_value *arc_ext_operands;
-
-#define LS_VALUE 0
-#define LS_DEST 0
-#define LS_BASE 1
-#define LS_OFFSET 2
-
/* Various types of ARC operands, including insn suffixes. */
/* Insn format values:
@@ -124,39 +166,39 @@ struct arc_ext_operand_value *arc_ext_operands;
const struct arc_operand arc_operands[] =
{
-/* place holder (??? not sure if needed). */
+/* Place holder (??? not sure if needed). */
#define UNUSED 0
{ 0, 0, 0, 0, 0, 0 },
-/* register A or shimm/limm indicator. */
+/* Register A or shimm/limm indicator. */
#define REGA (UNUSED + 1)
{ 'a', 6, ARC_SHIFT_REGA, ARC_OPERAND_SIGNED | ARC_OPERAND_ERROR, insert_reg, extract_reg },
-/* register B or shimm/limm indicator. */
+/* Register B or shimm/limm indicator. */
#define REGB (REGA + 1)
{ 'b', 6, ARC_SHIFT_REGB, ARC_OPERAND_SIGNED | ARC_OPERAND_ERROR, insert_reg, extract_reg },
-/* register C or shimm/limm indicator. */
+/* Register C or shimm/limm indicator. */
#define REGC (REGB + 1)
{ 'c', 6, ARC_SHIFT_REGC, ARC_OPERAND_SIGNED | ARC_OPERAND_ERROR, insert_reg, extract_reg },
-/* fake operand used to insert shimm value into most instructions. */
+/* Fake operand used to insert shimm value into most instructions. */
#define SHIMMFINISH (REGC + 1)
{ 'S', 9, 0, ARC_OPERAND_SIGNED + ARC_OPERAND_FAKE, insert_shimmfinish, 0 },
-/* fake operand used to insert limm value into most instructions. */
+/* Fake operand used to insert limm value into most instructions. */
#define LIMMFINISH (SHIMMFINISH + 1)
{ 'L', 32, 32, ARC_OPERAND_ADDRESS + ARC_OPERAND_LIMM + ARC_OPERAND_FAKE, insert_limmfinish, 0 },
-/* shimm operand when there is no reg indicator (st). */
+/* Shimm operand when there is no reg indicator (st). */
#define ST_OFFSET (LIMMFINISH + 1)
{ 'o', 9, 0, ARC_OPERAND_LIMM | ARC_OPERAND_SIGNED | ARC_OPERAND_STORE, insert_offset, extract_st_offset },
-/* shimm operand when there is no reg indicator (ld). */
+/* Shimm operand when there is no reg indicator (ld). */
#define LD_OFFSET (ST_OFFSET + 1)
{ 'O', 9, 0,ARC_OPERAND_LIMM | ARC_OPERAND_SIGNED | ARC_OPERAND_LOAD, insert_offset, extract_ld_offset },
-/* operand for base. */
+/* Operand for base. */
#define BASE (LD_OFFSET + 1)
{ 's', 6, ARC_SHIFT_REGB, ARC_OPERAND_LIMM | ARC_OPERAND_SIGNED, insert_base, extract_reg},
@@ -176,88 +218,88 @@ const struct arc_operand arc_operands[] =
#define SYNTAX_LD (SYNTAX_ST + 1)
{ '3', 9, 0, ARC_OPERAND_FAKE | ARC_OPERAND_ERROR, insert_ld_syntax, extract_ld_syntax },
-/* flag update bit (insertion is defered until we know how). */
+/* Flag update bit (insertion is defered until we know how). */
#define FLAG (SYNTAX_LD + 1)
{ 'f', 1, 8, ARC_OPERAND_SUFFIX, insert_flag, extract_flag },
-/* fake utility operand to finish 'f' suffix handling. */
+/* Fake utility operand to finish 'f' suffix handling. */
#define FLAGFINISH (FLAG + 1)
{ 'F', 1, 8, ARC_OPERAND_FAKE, insert_flagfinish, 0 },
-/* fake utility operand to set the 'f' flag for the "flag" insn. */
+/* Fake utility operand to set the 'f' flag for the "flag" insn. */
#define FLAGINSN (FLAGFINISH + 1)
{ 'G', 1, 8, ARC_OPERAND_FAKE, insert_flag, 0 },
-/* branch delay types. */
+/* Branch delay types. */
#define DELAY (FLAGINSN + 1)
{ 'n', 2, 5, ARC_OPERAND_SUFFIX , insert_nullify, 0 },
-/* conditions. */
+/* Conditions. */
#define COND (DELAY + 1)
{ 'q', 5, 0, ARC_OPERAND_SUFFIX, insert_cond, extract_cond },
-/* set `cond_p' to 1 to ensure a constant is treated as a limm. */
+/* Set `cond_p' to 1 to ensure a constant is treated as a limm. */
#define FORCELIMM (COND + 1)
{ 'Q', 0, 0, ARC_OPERAND_FAKE, insert_forcelimm, 0 },
-/* branch address; b, bl, and lp insns. */
+/* Branch address; b, bl, and lp insns. */
#define BRANCH (FORCELIMM + 1)
{ 'B', 20, 7, (ARC_OPERAND_RELATIVE_BRANCH + ARC_OPERAND_SIGNED) | ARC_OPERAND_ERROR, insert_reladdr, extract_reladdr },
-/* jump address; j insn (this is basically the same as 'L' except that the
+/* Jump address; j insn (this is basically the same as 'L' except that the
value is right shifted by 2). */
#define JUMP (BRANCH + 1)
{ 'J', 24, 32, ARC_OPERAND_ERROR | (ARC_OPERAND_ABSOLUTE_BRANCH + ARC_OPERAND_LIMM + ARC_OPERAND_FAKE), insert_absaddr, 0 },
-/* jump flags; j{,l} insn value or'ed into 'J' addr for flag values. */
+/* Jump flags; j{,l} insn value or'ed into 'J' addr for flag values. */
#define JUMPFLAGS (JUMP + 1)
{ 'j', 6, 26, ARC_OPERAND_JUMPFLAGS | ARC_OPERAND_ERROR, insert_jumpflags, extract_jumpflags },
-/* size field, stored in bit 1,2. */
+/* Size field, stored in bit 1,2. */
#define SIZE1 (JUMPFLAGS + 1)
{ 'z', 2, 1, ARC_OPERAND_SUFFIX, 0, 0 },
-/* size field, stored in bit 10,11. */
+/* Size field, stored in bit 10,11. */
#define SIZE10 (SIZE1 + 1)
{ 'Z', 2, 10, ARC_OPERAND_SUFFIX, 0, 0 },
-/* size field, stored in bit 22,23. */
+/* Size field, stored in bit 22,23. */
#define SIZE22 (SIZE10 + 1)
{ 'y', 2, 22, ARC_OPERAND_SUFFIX, 0, 0 },
-/* sign extend field, stored in bit 0. */
+/* Sign extend field, stored in bit 0. */
#define SIGN0 (SIZE22 + 1)
{ 'x', 1, 0, ARC_OPERAND_SUFFIX, 0, 0 },
-/* sign extend field, stored in bit 9. */
+/* Sign extend field, stored in bit 9. */
#define SIGN9 (SIGN0 + 1)
{ 'X', 1, 9, ARC_OPERAND_SUFFIX, 0, 0 },
-/* address write back, stored in bit 3. */
+/* Address write back, stored in bit 3. */
#define ADDRESS3 (SIGN9 + 1)
{ 'w', 1, 3, ARC_OPERAND_SUFFIX, insert_addr_wb, 0},
-/* address write back, stored in bit 12. */
+/* Address write back, stored in bit 12. */
#define ADDRESS12 (ADDRESS3 + 1)
{ 'W', 1, 12, ARC_OPERAND_SUFFIX, insert_addr_wb, 0},
-/* address write back, stored in bit 24. */
+/* Address write back, stored in bit 24. */
#define ADDRESS24 (ADDRESS12 + 1)
{ 'v', 1, 24, ARC_OPERAND_SUFFIX, insert_addr_wb, 0},
-/* cache bypass, stored in bit 5. */
+/* Cache bypass, stored in bit 5. */
#define CACHEBYPASS5 (ADDRESS24 + 1)
{ 'e', 1, 5, ARC_OPERAND_SUFFIX, 0, 0 },
-/* cache bypass, stored in bit 14. */
+/* Cache bypass, stored in bit 14. */
#define CACHEBYPASS14 (CACHEBYPASS5 + 1)
{ 'E', 1, 14, ARC_OPERAND_SUFFIX, 0, 0 },
-/* cache bypass, stored in bit 26. */
+/* Cache bypass, stored in bit 26. */
#define CACHEBYPASS26 (CACHEBYPASS14 + 1)
{ 'D', 1, 26, ARC_OPERAND_SUFFIX, 0, 0 },
-/* unop macro, used to copy REGB to REGC. */
+/* Unop macro, used to copy REGB to REGC. */
#define UNOPMACRO (CACHEBYPASS26 + 1)
{ 'U', 6, ARC_SHIFT_REGC, ARC_OPERAND_FAKE, insert_unopmacro, extract_unopmacro },
@@ -275,410 +317,22 @@ const struct arc_operand arc_operands[] =
#define AUXREG (REG + 1)
{ 'A', 9, 0, ARC_MOD_AUXREG, 0, 0 },
-/* end of list place holder. */
+/* End of list place holder. */
{ 0, 0, 0, 0, 0, 0 }
};
-/* Given a format letter, yields the index into `arc_operands'.
- eg: arc_operand_map['a'] = REGA. */
-unsigned char arc_operand_map[256];
-
-/* ARC instructions.
-
- Longer versions of insns must appear before shorter ones (if gas sees
- "lsr r2,r3,1" when it's parsing "lsr %a,%b" it will think the ",1" is
- junk). This isn't necessary for `ld' because of the trailing ']'.
-
- Instructions that are really macros based on other insns must appear
- before the real insn so they're chosen when disassembling. Eg: The `mov'
- insn is really the `and' insn. */
-
-struct arc_opcode arc_opcodes[] =
-{
- /* Base case instruction set (core versions 5-8) */
-
- /* "mov" is really an "and". */
- { "mov%.q%.f %a,%b%F%S%L%U", I(-1), I(12), ARC_MACH_5, 0, 0 },
- /* "asl" is really an "add". */
- { "asl%.q%.f %a,%b%F%S%L%U", I(-1), I(8), ARC_MACH_5, 0, 0 },
- /* "lsl" is really an "add". */
- { "lsl%.q%.f %a,%b%F%S%L%U", I(-1), I(8), ARC_MACH_5, 0, 0 },
- /* "nop" is really an "xor". */
- { "nop", 0x7fffffff, 0x7fffffff, ARC_MACH_5, 0, 0 },
- /* "rlc" is really an "adc". */
- { "rlc%.q%.f %a,%b%F%S%L%U", I(-1), I(9), ARC_MACH_5, 0, 0 },
- { "adc%.q%.f %a,%b,%c%F%S%L", I(-1), I(9), ARC_MACH_5, 0, 0 },
- { "add%.q%.f %a,%b,%c%F%S%L", I(-1), I(8), ARC_MACH_5, 0, 0 },
- { "and%.q%.f %a,%b,%c%F%S%L", I(-1), I(12), ARC_MACH_5, 0, 0 },
- { "asr%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(1), ARC_MACH_5, 0, 0 },
- { "bic%.q%.f %a,%b,%c%F%S%L", I(-1), I(14), ARC_MACH_5, 0, 0 },
- { "b%q%.n %B", I(-1), I(4), ARC_MACH_5 | ARC_OPCODE_COND_BRANCH, 0, 0 },
- { "bl%q%.n %B", I(-1), I(5), ARC_MACH_5 | ARC_OPCODE_COND_BRANCH, 0, 0 },
- { "extb%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(7), ARC_MACH_5, 0, 0 },
- { "extw%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(8), ARC_MACH_5, 0, 0 },
- { "flag%.q %b%G%S%L", I(-1)|A(-1)|C(-1), I(3)|A(ARC_REG_SHIMM_UPDATE)|C(0), ARC_MACH_5, 0, 0 },
- { "brk", 0x1ffffe00, 0x1ffffe00, ARC_MACH_7, 0, 0 },
- { "sleep", 0x1ffffe01, 0x1ffffe01, ARC_MACH_7, 0, 0 },
- { "swi", 0x1ffffe02, 0x1ffffe02, ARC_MACH_8, 0, 0 },
- /* %Q: force cond_p=1 -> no shimm values. This insn allows an
- optional flags spec. */
- { "j%q%Q%.n%.f %b%F%J,%j", I(-1)|A(-1)|C(-1)|R(-1,7,1), I(7)|A(0)|C(0)|R(0,7,1), ARC_MACH_5 | ARC_OPCODE_COND_BRANCH, 0, 0 },
- { "j%q%Q%.n%.f %b%F%J", I(-1)|A(-1)|C(-1)|R(-1,7,1), I(7)|A(0)|C(0)|R(0,7,1), ARC_MACH_5 | ARC_OPCODE_COND_BRANCH, 0, 0 },
- /* This insn allows an optional flags spec. */
- { "jl%q%Q%.n%.f %b%F%J,%j", I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1), I(7)|A(0)|C(0)|R(0,7,1)|R(1,9,1), ARC_MACH_6 | ARC_OPCODE_COND_BRANCH, 0, 0 },
- { "jl%q%Q%.n%.f %b%F%J", I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1), I(7)|A(0)|C(0)|R(0,7,1)|R(1,9,1), ARC_MACH_6 | ARC_OPCODE_COND_BRANCH, 0, 0 },
- /* Put opcode 1 ld insns first so shimm gets prefered over limm.
- "[%b]" is before "[%b,%o]" so 0 offsets don't get printed. */
- { "ld%Z%.X%.W%.E %a,[%s]%S%L%1", I(-1)|R(-1,13,1)|R(-1,0,511), I(1)|R(0,13,1)|R(0,0,511), ARC_MACH_5, 0, 0 },
- { "ld%z%.x%.w%.e %a,[%s]%S%L%1", I(-1)|R(-1,4,1)|R(-1,6,7), I(0)|R(0,4,1)|R(0,6,7), ARC_MACH_5, 0, 0 },
- { "ld%z%.x%.w%.e %a,[%s,%O]%S%L%1", I(-1)|R(-1,4,1)|R(-1,6,7), I(0)|R(0,4,1)|R(0,6,7), ARC_MACH_5, 0, 0 },
- { "ld%Z%.X%.W%.E %a,[%s,%O]%S%L%3", I(-1)|R(-1,13,1), I(1)|R(0,13,1), ARC_MACH_5, 0, 0 },
- { "lp%q%.n %B", I(-1), I(6), ARC_MACH_5, 0, 0 },
- { "lr %a,[%Ab]%S%L", I(-1)|C(-1), I(1)|C(0x10), ARC_MACH_5, 0, 0 },
- { "lsr%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(2), ARC_MACH_5, 0, 0 },
- { "or%.q%.f %a,%b,%c%F%S%L", I(-1), I(13), ARC_MACH_5, 0, 0 },
- { "ror%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(3), ARC_MACH_5, 0, 0 },
- { "rrc%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(4), ARC_MACH_5, 0, 0 },
- { "sbc%.q%.f %a,%b,%c%F%S%L", I(-1), I(11), ARC_MACH_5, 0, 0 },
- { "sexb%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(5), ARC_MACH_5, 0, 0 },
- { "sexw%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(6), ARC_MACH_5, 0, 0 },
- { "sr %c,[%Ab]%S%L", I(-1)|A(-1), I(2)|A(0x10), ARC_MACH_5, 0, 0 },
- /* "[%b]" is before "[%b,%o]" so 0 offsets don't get printed. */
- { "st%y%.v%.D %c,[%s]%L%S%0", I(-1)|R(-1,25,1)|R(-1,21,1), I(2)|R(0,25,1)|R(0,21,1), ARC_MACH_5, 0, 0 },
- { "st%y%.v%.D %c,[%s,%o]%S%L%2", I(-1)|R(-1,25,1)|R(-1,21,1), I(2)|R(0,25,1)|R(0,21,1), ARC_MACH_5, 0, 0 },
- { "sub%.q%.f %a,%b,%c%F%S%L", I(-1), I(10), ARC_MACH_5, 0, 0 },
- { "xor%.q%.f %a,%b,%c%F%S%L", I(-1), I(15), ARC_MACH_5, 0, 0 }
-};
-
-const int arc_opcodes_count = sizeof (arc_opcodes) / sizeof (arc_opcodes[0]);
-
-const struct arc_operand_value arc_reg_names[] =
-{
- /* Core register set r0-r63. */
-
- /* r0-r28 - general purpose registers. */
- { "r0", 0, REG, 0 }, { "r1", 1, REG, 0 }, { "r2", 2, REG, 0 },
- { "r3", 3, REG, 0 }, { "r4", 4, REG, 0 }, { "r5", 5, REG, 0 },
- { "r6", 6, REG, 0 }, { "r7", 7, REG, 0 }, { "r8", 8, REG, 0 },
- { "r9", 9, REG, 0 }, { "r10", 10, REG, 0 }, { "r11", 11, REG, 0 },
- { "r12", 12, REG, 0 }, { "r13", 13, REG, 0 }, { "r14", 14, REG, 0 },
- { "r15", 15, REG, 0 }, { "r16", 16, REG, 0 }, { "r17", 17, REG, 0 },
- { "r18", 18, REG, 0 }, { "r19", 19, REG, 0 }, { "r20", 20, REG, 0 },
- { "r21", 21, REG, 0 }, { "r22", 22, REG, 0 }, { "r23", 23, REG, 0 },
- { "r24", 24, REG, 0 }, { "r25", 25, REG, 0 }, { "r26", 26, REG, 0 },
- { "r27", 27, REG, 0 }, { "r28", 28, REG, 0 },
- /* Maskable interrupt link register. */
- { "ilink1", 29, REG, 0 },
- /* Maskable interrupt link register. */
- { "ilink2", 30, REG, 0 },
- /* Branch-link register. */
- { "blink", 31, REG, 0 },
-
- /* r32-r59 reserved for extensions. */
- { "r32", 32, REG, 0 }, { "r33", 33, REG, 0 }, { "r34", 34, REG, 0 },
- { "r35", 35, REG, 0 }, { "r36", 36, REG, 0 }, { "r37", 37, REG, 0 },
- { "r38", 38, REG, 0 }, { "r39", 39, REG, 0 }, { "r40", 40, REG, 0 },
- { "r41", 41, REG, 0 }, { "r42", 42, REG, 0 }, { "r43", 43, REG, 0 },
- { "r44", 44, REG, 0 }, { "r45", 45, REG, 0 }, { "r46", 46, REG, 0 },
- { "r47", 47, REG, 0 }, { "r48", 48, REG, 0 }, { "r49", 49, REG, 0 },
- { "r50", 50, REG, 0 }, { "r51", 51, REG, 0 }, { "r52", 52, REG, 0 },
- { "r53", 53, REG, 0 }, { "r54", 54, REG, 0 }, { "r55", 55, REG, 0 },
- { "r56", 56, REG, 0 }, { "r57", 57, REG, 0 }, { "r58", 58, REG, 0 },
- { "r59", 59, REG, 0 },
-
- /* Loop count register (24 bits). */
- { "lp_count", 60, REG, 0 },
- /* Short immediate data indicator setting flags. */
- { "r61", 61, REG, ARC_REGISTER_READONLY },
- /* Long immediate data indicator setting flags. */
- { "r62", 62, REG, ARC_REGISTER_READONLY },
- /* Short immediate data indicator not setting flags. */
- { "r63", 63, REG, ARC_REGISTER_READONLY },
-
- /* Small-data base register. */
- { "gp", 26, REG, 0 },
- /* Frame pointer. */
- { "fp", 27, REG, 0 },
- /* Stack pointer. */
- { "sp", 28, REG, 0 },
-
- { "r29", 29, REG, 0 },
- { "r30", 30, REG, 0 },
- { "r31", 31, REG, 0 },
- { "r60", 60, REG, 0 },
-
- /* Auxiliary register set. */
-
- /* Auxiliary register address map:
- 0xffffffff-0xffffff00 (-1..-256) - customer shimm allocation
- 0xfffffeff-0x80000000 - customer limm allocation
- 0x7fffffff-0x00000100 - ARC limm allocation
- 0x000000ff-0x00000000 - ARC shimm allocation */
-
- /* Base case auxiliary registers (shimm address). */
- { "status", 0x00, AUXREG, 0 },
- { "semaphore", 0x01, AUXREG, 0 },
- { "lp_start", 0x02, AUXREG, 0 },
- { "lp_end", 0x03, AUXREG, 0 },
- { "identity", 0x04, AUXREG, ARC_REGISTER_READONLY },
- { "debug", 0x05, AUXREG, 0 },
-};
-
-const int arc_reg_names_count =
- sizeof (arc_reg_names) / sizeof (arc_reg_names[0]);
-
-/* The suffix table.
- Operands with the same name must be stored together. */
-
-const struct arc_operand_value arc_suffixes[] =
-{
- /* Entry 0 is special, default values aren't printed by the disassembler. */
- { "", 0, -1, 0 },
-
- /* Base case condition codes. */
- { "al", 0, COND, 0 },
- { "ra", 0, COND, 0 },
- { "eq", 1, COND, 0 },
- { "z", 1, COND, 0 },
- { "ne", 2, COND, 0 },
- { "nz", 2, COND, 0 },
- { "pl", 3, COND, 0 },
- { "p", 3, COND, 0 },
- { "mi", 4, COND, 0 },
- { "n", 4, COND, 0 },
- { "cs", 5, COND, 0 },
- { "c", 5, COND, 0 },
- { "lo", 5, COND, 0 },
- { "cc", 6, COND, 0 },
- { "nc", 6, COND, 0 },
- { "hs", 6, COND, 0 },
- { "vs", 7, COND, 0 },
- { "v", 7, COND, 0 },
- { "vc", 8, COND, 0 },
- { "nv", 8, COND, 0 },
- { "gt", 9, COND, 0 },
- { "ge", 10, COND, 0 },
- { "lt", 11, COND, 0 },
- { "le", 12, COND, 0 },
- { "hi", 13, COND, 0 },
- { "ls", 14, COND, 0 },
- { "pnz", 15, COND, 0 },
-
- /* Condition codes 16-31 reserved for extensions. */
-
- { "f", 1, FLAG, 0 },
-
- { "nd", ARC_DELAY_NONE, DELAY, 0 },
- { "d", ARC_DELAY_NORMAL, DELAY, 0 },
- { "jd", ARC_DELAY_JUMP, DELAY, 0 },
-
- { "b", 1, SIZE1, 0 },
- { "b", 1, SIZE10, 0 },
- { "b", 1, SIZE22, 0 },
- { "w", 2, SIZE1, 0 },
- { "w", 2, SIZE10, 0 },
- { "w", 2, SIZE22, 0 },
- { "x", 1, SIGN0, 0 },
- { "x", 1, SIGN9, 0 },
- { "a", 1, ADDRESS3, 0 },
- { "a", 1, ADDRESS12, 0 },
- { "a", 1, ADDRESS24, 0 },
-
- { "di", 1, CACHEBYPASS5, 0 },
- { "di", 1, CACHEBYPASS14, 0 },
- { "di", 1, CACHEBYPASS26, 0 },
-};
-
-const int arc_suffixes_count =
- sizeof (arc_suffixes) / sizeof (arc_suffixes[0]);
-
-/* Indexed by first letter of opcode. Points to chain of opcodes with same
- first letter. */
-static struct arc_opcode *opcode_map[26 + 1];
-
-/* Indexed by insn code. Points to chain of opcodes with same insn code. */
-static struct arc_opcode *icode_map[32];
-
-/* Configuration flags. */
-
-/* Various ARC_HAVE_XXX bits. */
-static int cpu_type;
-
-/* Translate a bfd_mach_arc_xxx value to a ARC_MACH_XXX value. */
-
-int
-arc_get_opcode_mach (bfd_mach, big_p)
- int bfd_mach, big_p;
-{
- static int mach_type_map[] =
- {
- ARC_MACH_5,
- ARC_MACH_6,
- ARC_MACH_7,
- ARC_MACH_8
- };
- return mach_type_map[bfd_mach - bfd_mach_arc_5] | (big_p ? ARC_MACH_BIG : 0);
-}
-
-/* Initialize any tables that need it.
- Must be called once at start up (or when first needed).
-
- FLAGS is a set of bits that say what version of the cpu we have,
- and in particular at least (one of) ARC_MACH_XXX. */
-
-void
-arc_opcode_init_tables (flags)
- int flags;
-{
- static int init_p = 0;
-
- cpu_type = flags;
-
- /* We may be intentionally called more than once (for example gdb will call
- us each time the user switches cpu). These tables only need to be init'd
- once though. */
- if (!init_p)
- {
- register int i,n;
-
- memset (arc_operand_map, 0, sizeof (arc_operand_map));
- n = sizeof (arc_operands) / sizeof (arc_operands[0]);
- for (i = 0; i < n; ++i)
- arc_operand_map[arc_operands[i].fmt] = i;
-
- memset (opcode_map, 0, sizeof (opcode_map));
- memset (icode_map, 0, sizeof (icode_map));
- /* Scan the table backwards so macros appear at the front. */
- for (i = arc_opcodes_count - 1; i >= 0; --i)
- {
- int opcode_hash = ARC_HASH_OPCODE (arc_opcodes[i].syntax);
- int icode_hash = ARC_HASH_ICODE (arc_opcodes[i].value);
-
- arc_opcodes[i].next_asm = opcode_map[opcode_hash];
- opcode_map[opcode_hash] = &arc_opcodes[i];
-
- arc_opcodes[i].next_dis = icode_map[icode_hash];
- icode_map[icode_hash] = &arc_opcodes[i];
- }
-
- init_p = 1;
- }
-}
-
-/* Return non-zero if OPCODE is supported on the specified cpu.
- Cpu selection is made when calling `arc_opcode_init_tables'. */
-
-int
-arc_opcode_supported (opcode)
- const struct arc_opcode *opcode;
-{
- if (ARC_OPCODE_CPU (opcode->flags) <= cpu_type)
- return 1;
- return 0;
-}
-
-/* Return the first insn in the chain for assembling INSN. */
-
-const struct arc_opcode *
-arc_opcode_lookup_asm (insn)
- const char *insn;
-{
- return opcode_map[ARC_HASH_OPCODE (insn)];
-}
-
-/* Return the first insn in the chain for disassembling INSN. */
-
-const struct arc_opcode *
-arc_opcode_lookup_dis (insn)
- unsigned int insn;
-{
- return icode_map[ARC_HASH_ICODE (insn)];
-}
-
-/* Nonzero if we've seen an 'f' suffix (in certain insns). */
-static int flag_p;
-
-/* Nonzero if we've finished processing the 'f' suffix. */
-static int flagshimm_handled_p;
-
-/* Nonzero if we've seen a 'a' suffix (address writeback). */
-static int addrwb_p;
-
-/* Nonzero if we've seen a 'q' suffix (condition code). */
-static int cond_p;
-
-/* Nonzero if we've inserted a nullify condition. */
-static int nullify_p;
-
-/* The value of the a nullify condition we inserted. */
-static int nullify;
-
-/* Nonzero if we've inserted jumpflags. */
-static int jumpflags_p;
-
-/* Nonzero if we've inserted a shimm. */
-static int shimm_p;
-
-/* The value of the shimm we inserted (each insn only gets one but it can
- appear multiple times). */
-static int shimm;
-
-/* Nonzero if we've inserted a limm (during assembly) or seen a limm
- (during disassembly). */
-static int limm_p;
-
-/* The value of the limm we inserted. Each insn only gets one but it can
- appear multiple times. */
-static long limm;
-
-/* Insertion functions. */
-
-/* Called by the assembler before parsing an instruction. */
-
-void
-arc_opcode_init_insert ()
-{
- int i;
-
- for(i = 0; i < OPERANDS; i++)
- ls_operand[i] = OP_NONE;
-
- flag_p = 0;
- flagshimm_handled_p = 0;
- cond_p = 0;
- addrwb_p = 0;
- shimm_p = 0;
- limm_p = 0;
- jumpflags_p = 0;
- nullify_p = 0;
- nullify = 0; /* the default is important. */
-}
-
-/* Called by the assembler to see if the insn has a limm operand.
- Also called by the disassembler to see if the insn contains a limm. */
-
-int
-arc_opcode_limm_p (limmp)
- long *limmp;
-{
- if (limmp)
- *limmp = limm;
- return limm_p;
-}
-
/* Insert a value into a register field.
If REG is NULL, then this is actually a constant.
We must also handle auxiliary registers for lr/sr insns. */
static arc_insn
-insert_reg (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods;
- const struct arc_operand_value *reg;
- long value;
- const char **errmsg;
+insert_reg (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods,
+ const struct arc_operand_value *reg,
+ long value,
+ const char **errmsg)
{
static char buf[100];
enum operand op_type = OP_NONE;
@@ -700,7 +354,7 @@ insert_reg (insn, operand, mods, reg, value, errmsg)
int marker;
op_type = OP_SHIMM;
- /* forget about shimm as dest mlm. */
+ /* Forget about shimm as dest mlm. */
if ('a' != operand->fmt)
{
@@ -711,7 +365,7 @@ insert_reg (insn, operand, mods, reg, value, errmsg)
}
else
{
- /* don't request flag setting on shimm as dest. */
+ /* Don't request flag setting on shimm as dest. */
marker = ARC_REG_SHIMM;
}
insn |= marker << operand->shift;
@@ -727,9 +381,7 @@ insert_reg (insn, operand, mods, reg, value, errmsg)
/* The constant is stored later. */
}
else
- {
- *errmsg = "unable to fit different valued constants into instruction";
- }
+ *errmsg = _("unable to fit different valued constants into instruction");
}
else
{
@@ -738,18 +390,18 @@ insert_reg (insn, operand, mods, reg, value, errmsg)
if (reg->type == AUXREG)
{
if (!(mods & ARC_MOD_AUXREG))
- *errmsg = "auxiliary register not allowed here";
+ *errmsg = _("auxiliary register not allowed here");
else
{
- if ((insn & I(-1)) == I(2)) /* check for use validity. */
+ if ((insn & I(-1)) == I(2)) /* Check for use validity. */
{
if (reg->flags & ARC_REGISTER_READONLY)
- *errmsg = "attempt to set readonly register";
+ *errmsg = _("attempt to set readonly register");
}
else
{
if (reg->flags & ARC_REGISTER_WRITEONLY)
- *errmsg = "attempt to read writeonly register";
+ *errmsg = _("attempt to read writeonly register");
}
insn |= ARC_REG_SHIMM << operand->shift;
insn |= reg->value << arc_operands[reg->type].shift;
@@ -761,17 +413,17 @@ insert_reg (insn, operand, mods, reg, value, errmsg)
if ('a' == operand->fmt || ((insn & I(-1)) < I(2)))
{
if (reg->flags & ARC_REGISTER_READONLY)
- *errmsg = "attempt to set readonly register";
+ *errmsg = _("attempt to set readonly register");
}
if ('a' != operand->fmt)
{
if (reg->flags & ARC_REGISTER_WRITEONLY)
- *errmsg = "attempt to read writeonly register";
+ *errmsg = _("attempt to read writeonly register");
}
/* We should never get an invalid register number here. */
if ((unsigned int) reg->value > 60)
{
- sprintf (buf, "invalid register number `%d'", reg->value);
+ sprintf (buf, _("invalid register number `%d'"), reg->value);
*errmsg = buf;
}
insn |= reg->value << operand->shift;
@@ -804,13 +456,12 @@ insert_reg (insn, operand, mods, reg, value, errmsg)
/* Called when we see an 'f' flag. */
static arc_insn
-insert_flag (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand ATTRIBUTE_UNUSED;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_flag (arc_insn insn,
+ const struct arc_operand *operand ATTRIBUTE_UNUSED,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
/* We can't store anything in the insn until we've parsed the registers.
Just record the fact that we've got this flag. `insert_reg' will use it
@@ -822,13 +473,12 @@ insert_flag (insn, operand, mods, reg, value, errmsg)
/* Called when we see an nullify condition. */
static arc_insn
-insert_nullify (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_nullify (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
nullify_p = 1;
insn |= (value & ((1 << operand->bits) - 1)) << operand->shift;
@@ -841,13 +491,12 @@ insert_nullify (insn, operand, mods, reg, value, errmsg)
we've parsed the registers. */
static arc_insn
-insert_flagfinish (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_flagfinish (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
if (flag_p && !flagshimm_handled_p)
{
@@ -862,13 +511,12 @@ insert_flagfinish (insn, operand, mods, reg, value, errmsg)
/* Called when we see a conditional flag (eg: .eq). */
static arc_insn
-insert_cond (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_cond (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
cond_p = 1;
insn |= (value & ((1 << operand->bits) - 1)) << operand->shift;
@@ -882,39 +530,36 @@ insert_cond (insn, operand, mods, reg, value, errmsg)
??? The mechanism is sound. Access to it is a bit klunky right now. */
static arc_insn
-insert_forcelimm (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand ATTRIBUTE_UNUSED;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_forcelimm (arc_insn insn,
+ const struct arc_operand *operand ATTRIBUTE_UNUSED,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
cond_p = 1;
return insn;
}
static arc_insn
-insert_addr_wb (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_addr_wb (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
addrwb_p = 1 << operand->shift;
return insn;
}
static arc_insn
-insert_base (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods;
- const struct arc_operand_value *reg;
- long value;
- const char **errmsg;
+insert_base (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods,
+ const struct arc_operand_value *reg,
+ long value,
+ const char **errmsg)
{
if (reg != NULL)
{
@@ -927,10 +572,10 @@ insert_base (insn, operand, mods, reg, value, errmsg)
{
if (shimm_p && value != shimm)
{
- /* convert the previous shimm operand to a limm. */
+ /* Convert the previous shimm operand to a limm. */
limm_p = 1;
limm = shimm;
- insn &= ~C(-1); /* we know where the value is in insn. */
+ insn &= ~C(-1); /* We know where the value is in insn. */
insn |= C(ARC_REG_LIMM);
ls_operand[LS_VALUE] = OP_LIMM;
}
@@ -938,12 +583,13 @@ insert_base (insn, operand, mods, reg, value, errmsg)
shimm_p = 1;
shimm = value;
ls_operand[LS_BASE] = OP_SHIMM;
+ ls_operand[LS_OFFSET] = OP_SHIMM;
}
else
{
if (limm_p && value != limm)
{
- *errmsg = "too many long constants";
+ *errmsg = _("too many long constants");
return insn;
}
limm_p = 1;
@@ -959,13 +605,12 @@ insert_base (insn, operand, mods, reg, value, errmsg)
match operand syntax here. we catch bad combinations later. */
static arc_insn
-insert_offset (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods;
- const struct arc_operand_value *reg;
- long value;
- const char **errmsg;
+insert_offset (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods,
+ const struct arc_operand_value *reg,
+ long value,
+ const char **errmsg)
{
long minval, maxval;
@@ -974,9 +619,9 @@ insert_offset (insn, operand, mods, reg, value, errmsg)
arc_insn myinsn;
myinsn = insert_reg (0,operand,mods,reg,value,errmsg) >> operand->shift;
ls_operand[LS_OFFSET] = OP_REG;
- if (operand->flags & ARC_OPERAND_LOAD) /* not if store, catch it later. */
- if ((insn & I(-1)) != I(1)) /* not if opcode == 1, catch it later. */
- insn |= C(myinsn);
+ if (operand->flags & ARC_OPERAND_LOAD) /* Not if store, catch it later. */
+ if ((insn & I(-1)) != I(1)) /* Not if opcode == 1, catch it later. */
+ insn |= C (myinsn);
}
else
{
@@ -995,9 +640,8 @@ insert_offset (insn, operand, mods, reg, value, errmsg)
if ((cond_p && !limm_p) || (value < minval || value > maxval))
{
if (limm_p && value != limm)
- {
- *errmsg = "too many long constants";
- }
+ *errmsg = _("too many long constants");
+
else
{
limm_p = 1;
@@ -1015,27 +659,30 @@ insert_offset (insn, operand, mods, reg, value, errmsg)
*errmsg = "need too many limms";
else if (shimm_p && value != shimm)
{
- /* check for bad operand combinations before we lose info about them. */
+ /* Check for bad operand combinations
+ before we lose info about them. */
if ((insn & I(-1)) == I(1))
{
- *errmsg = "to many shimms in load";
+ *errmsg = _("to many shimms in load");
goto out;
}
if (limm_p && operand->flags & ARC_OPERAND_LOAD)
{
- *errmsg = "too many long constants";
+ *errmsg = _("too many long constants");
goto out;
}
- /* convert what we thought was a shimm to a limm. */
+ /* Convert what we thought was a shimm to a limm. */
limm_p = 1;
limm = shimm;
- if (ls_operand[LS_VALUE] == OP_SHIMM && operand->flags & ARC_OPERAND_STORE)
+ if (ls_operand[LS_VALUE] == OP_SHIMM
+ && operand->flags & ARC_OPERAND_STORE)
{
insn &= ~C(-1);
insn |= C(ARC_REG_LIMM);
ls_operand[LS_VALUE] = OP_LIMM;
}
- if (ls_operand[LS_BASE] == OP_SHIMM && operand->flags & ARC_OPERAND_STORE)
+ if (ls_operand[LS_BASE] == OP_SHIMM
+ && operand->flags & ARC_OPERAND_STORE)
{
insn &= ~B(-1);
insn |= B(ARC_REG_LIMM);
@@ -1054,12 +701,11 @@ insert_offset (insn, operand, mods, reg, value, errmsg)
/* Used in st insns to do final disasemble syntax check. */
static long
-extract_st_syntax (insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand ATTRIBUTE_UNUSED;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value **opval ATTRIBUTE_UNUSED;
- int *invalid;
+extract_st_syntax (arc_insn *insn,
+ const struct arc_operand *operand ATTRIBUTE_UNUSED,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
+ int *invalid)
{
#define ST_SYNTAX(V,B,O) \
((ls_operand[LS_VALUE] == (V) && \
@@ -1085,36 +731,34 @@ extract_st_syntax (insn, operand, mods, opval, invalid)
}
int
-arc_limm_fixup_adjust(insn)
- arc_insn insn;
+arc_limm_fixup_adjust (arc_insn insn)
{
int retval = 0;
- /* check for st shimm,[limm]. */
+ /* Check for st shimm,[limm]. */
if ((insn & (I(-1) | C(-1) | B(-1))) ==
(I(2) | C(ARC_REG_SHIMM) | B(ARC_REG_LIMM)))
{
retval = insn & 0x1ff;
- if (retval & 0x100) /* sign extend 9 bit offset. */
+ if (retval & 0x100) /* Sign extend 9 bit offset. */
retval |= ~0x1ff;
}
- return -retval; /* negate offset for return. */
+ return -retval; /* Negate offset for return. */
}
/* Used in st insns to do final syntax check. */
static arc_insn
-insert_st_syntax (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand ATTRIBUTE_UNUSED;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_st_syntax (arc_insn insn,
+ const struct arc_operand *operand ATTRIBUTE_UNUSED,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
- if (ST_SYNTAX(OP_SHIMM,OP_REG,OP_NONE) && shimm != 0)
+ if (ST_SYNTAX (OP_SHIMM,OP_REG,OP_NONE) && shimm != 0)
{
- /* change an illegal insn into a legal one, it's easier to
+ /* Change an illegal insn into a legal one, it's easier to
do it here than to try to handle it during operand scan. */
limm_p = 1;
limm = shimm;
@@ -1125,15 +769,15 @@ insert_st_syntax (insn, operand, mods, reg, value, errmsg)
ls_operand[LS_VALUE] = OP_LIMM;
}
- if (ST_SYNTAX(OP_REG,OP_SHIMM,OP_NONE) || ST_SYNTAX(OP_LIMM,OP_SHIMM,OP_NONE))
+ if (ST_SYNTAX (OP_REG, OP_SHIMM, OP_NONE)
+ || ST_SYNTAX (OP_LIMM, OP_SHIMM, OP_NONE))
{
- /* try to salvage this syntax. */
- if (shimm & 0x1) /* odd shimms won't work. */
+ /* Try to salvage this syntax. */
+ if (shimm & 0x1) /* Odd shimms won't work. */
{
- if (limm_p) /* do we have a limm already? */
- {
- *errmsg = "impossible store";
- }
+ if (limm_p) /* Do we have a limm already? */
+ *errmsg = _("impossible store");
+
limm_p = 1;
limm = shimm;
shimm = 0;
@@ -1151,56 +795,54 @@ insert_st_syntax (insn, operand, mods, reg, value, errmsg)
}
}
if (ST_SYNTAX(OP_SHIMM,OP_LIMM,OP_NONE))
- {
- limm += arc_limm_fixup_adjust(insn);
- }
- if (!(ST_SYNTAX(OP_REG,OP_REG,OP_NONE)
- || ST_SYNTAX(OP_REG,OP_LIMM,OP_NONE)
- || ST_SYNTAX(OP_REG,OP_REG,OP_SHIMM)
- || ST_SYNTAX(OP_REG,OP_SHIMM,OP_SHIMM)
- || (ST_SYNTAX(OP_SHIMM,OP_SHIMM,OP_NONE) && (shimm == 0))
- || ST_SYNTAX(OP_SHIMM,OP_LIMM,OP_NONE)
- || ST_SYNTAX(OP_SHIMM,OP_REG,OP_NONE)
- || ST_SYNTAX(OP_SHIMM,OP_REG,OP_SHIMM)
- || ST_SYNTAX(OP_SHIMM,OP_SHIMM,OP_SHIMM)
- || ST_SYNTAX(OP_LIMM,OP_SHIMM,OP_SHIMM)
- || ST_SYNTAX(OP_LIMM,OP_REG,OP_NONE)
- || ST_SYNTAX(OP_LIMM,OP_REG,OP_SHIMM)))
- *errmsg = "st operand error";
+ limm += arc_limm_fixup_adjust(insn);
+
+ if (! (ST_SYNTAX (OP_REG,OP_REG,OP_NONE)
+ || ST_SYNTAX (OP_REG,OP_LIMM,OP_NONE)
+ || ST_SYNTAX (OP_REG,OP_REG,OP_SHIMM)
+ || ST_SYNTAX (OP_REG,OP_SHIMM,OP_SHIMM)
+ || (ST_SYNTAX (OP_SHIMM,OP_SHIMM,OP_NONE) && (shimm == 0))
+ || ST_SYNTAX (OP_SHIMM,OP_LIMM,OP_NONE)
+ || ST_SYNTAX (OP_SHIMM,OP_REG,OP_NONE)
+ || ST_SYNTAX (OP_SHIMM,OP_REG,OP_SHIMM)
+ || ST_SYNTAX (OP_SHIMM,OP_SHIMM,OP_SHIMM)
+ || ST_SYNTAX (OP_LIMM,OP_SHIMM,OP_SHIMM)
+ || ST_SYNTAX (OP_LIMM,OP_REG,OP_NONE)
+ || ST_SYNTAX (OP_LIMM,OP_REG,OP_SHIMM)))
+ *errmsg = _("st operand error");
if (addrwb_p)
{
if (ls_operand[LS_BASE] != OP_REG)
- *errmsg = "address writeback not allowed";
+ *errmsg = _("address writeback not allowed");
insn |= addrwb_p;
}
if (ST_SYNTAX(OP_SHIMM,OP_REG,OP_NONE) && shimm)
- *errmsg = "store value must be zero";
+ *errmsg = _("store value must be zero");
return insn;
}
/* Used in ld insns to do final syntax check. */
static arc_insn
-insert_ld_syntax (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand ATTRIBUTE_UNUSED;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_ld_syntax (arc_insn insn,
+ const struct arc_operand *operand ATTRIBUTE_UNUSED,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
-#define LD_SYNTAX(D,B,O) \
-((ls_operand[LS_DEST] == (D) && \
- ls_operand[LS_BASE] == (B) && \
- ls_operand[LS_OFFSET] == (O)))
+#define LD_SYNTAX(D, B, O) \
+ ( (ls_operand[LS_DEST] == (D) \
+ && ls_operand[LS_BASE] == (B) \
+ && ls_operand[LS_OFFSET] == (O)))
- int test = insn & I(-1);
+ int test = insn & I (-1);
- if (!(test == I(1)))
+ if (!(test == I (1)))
{
if ((ls_operand[LS_DEST] == OP_SHIMM || ls_operand[LS_BASE] == OP_SHIMM
|| ls_operand[LS_OFFSET] == OP_SHIMM))
- *errmsg = "invalid load/shimm insn";
+ *errmsg = _("invalid load/shimm insn");
}
if (!(LD_SYNTAX(OP_REG,OP_REG,OP_NONE)
|| LD_SYNTAX(OP_REG,OP_REG,OP_REG)
@@ -1209,11 +851,11 @@ insert_ld_syntax (insn, operand, mods, reg, value, errmsg)
|| (LD_SYNTAX(OP_REG,OP_REG,OP_LIMM) && !(test == I(1)))
|| LD_SYNTAX(OP_REG,OP_SHIMM,OP_SHIMM)
|| (LD_SYNTAX(OP_REG,OP_LIMM,OP_NONE) && (test == I(1)))))
- *errmsg = "ld operand error";
+ *errmsg = _("ld operand error");
if (addrwb_p)
{
if (ls_operand[LS_BASE] != OP_REG)
- *errmsg = "address writeback not allowed";
+ *errmsg = _("address writeback not allowed");
insn |= addrwb_p;
}
return insn;
@@ -1222,12 +864,11 @@ insert_ld_syntax (insn, operand, mods, reg, value, errmsg)
/* Used in ld insns to do final syntax check. */
static long
-extract_ld_syntax (insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand ATTRIBUTE_UNUSED;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value **opval ATTRIBUTE_UNUSED;
- int *invalid;
+extract_ld_syntax (arc_insn *insn,
+ const struct arc_operand *operand ATTRIBUTE_UNUSED,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
+ int *invalid)
{
int test = insn[0] & I(-1);
@@ -1237,14 +878,14 @@ extract_ld_syntax (insn, operand, mods, opval, invalid)
|| ls_operand[LS_OFFSET] == OP_SHIMM))
*invalid = 1;
}
- if (!((LD_SYNTAX(OP_REG,OP_REG,OP_NONE) && (test == I(1)))
- || LD_SYNTAX(OP_REG,OP_REG,OP_REG)
- || LD_SYNTAX(OP_REG,OP_REG,OP_SHIMM)
- || (LD_SYNTAX(OP_REG,OP_REG,OP_LIMM) && !(test == I(1)))
- || (LD_SYNTAX(OP_REG,OP_LIMM,OP_REG) && !(test == I(1)))
- || (LD_SYNTAX(OP_REG,OP_SHIMM,OP_NONE) && (shimm == 0))
- || LD_SYNTAX(OP_REG,OP_SHIMM,OP_SHIMM)
- || (LD_SYNTAX(OP_REG,OP_LIMM,OP_NONE) && (test == I(1)))))
+ if (!( (LD_SYNTAX (OP_REG, OP_REG, OP_NONE) && (test == I(1)))
+ || LD_SYNTAX (OP_REG, OP_REG, OP_REG)
+ || LD_SYNTAX (OP_REG, OP_REG, OP_SHIMM)
+ || (LD_SYNTAX (OP_REG, OP_REG, OP_LIMM) && !(test == I(1)))
+ || (LD_SYNTAX (OP_REG, OP_LIMM, OP_REG) && !(test == I(1)))
+ || (LD_SYNTAX (OP_REG, OP_SHIMM, OP_NONE) && (shimm == 0))
+ || LD_SYNTAX (OP_REG, OP_SHIMM, OP_SHIMM)
+ || (LD_SYNTAX (OP_REG, OP_LIMM, OP_NONE) && (test == I(1)))))
*invalid = 1;
return 0;
}
@@ -1253,13 +894,12 @@ extract_ld_syntax (insn, operand, mods, opval, invalid)
value (if present) into the insn. */
static arc_insn
-insert_shimmfinish (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_shimmfinish (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
if (shimm_p)
insn |= (shimm & ((1 << operand->bits) - 1)) << operand->shift;
@@ -1279,50 +919,39 @@ insert_shimmfinish (insn, operand, mods, reg, value, errmsg)
a 2 word quantity. That's too much so we don't handle them. */
static arc_insn
-insert_limmfinish (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand ATTRIBUTE_UNUSED;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_limmfinish (arc_insn insn,
+ const struct arc_operand *operand ATTRIBUTE_UNUSED,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
-#if 0
- if (limm_p)
- ; /* nothing to do, gas does it. */
-#endif
return insn;
}
static arc_insn
-insert_jumpflags (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value;
- const char **errmsg;
+insert_jumpflags (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value,
+ const char **errmsg)
{
if (!flag_p)
- {
- *errmsg = "jump flags, but no .f seen";
- }
- if (!limm_p)
- {
- *errmsg = "jump flags, but no limm addr";
- }
- if (limm & 0xfc000000)
- {
- *errmsg = "flag bits of jump address limm lost";
- }
- if (limm & 0x03000000)
- {
- *errmsg = "attempt to set HR bits";
- }
- if ((value & ((1 << operand->bits) - 1)) != value)
- {
- *errmsg = "bad jump flags value";
- }
+ *errmsg = _("jump flags, but no .f seen");
+
+ else if (!limm_p)
+ *errmsg = _("jump flags, but no limm addr");
+
+ else if (limm & 0xfc000000)
+ *errmsg = _("flag bits of jump address limm lost");
+
+ else if (limm & 0x03000000)
+ *errmsg = _("attempt to set HR bits");
+
+ else if ((value & ((1 << operand->bits) - 1)) != value)
+ *errmsg = _("bad jump flags value");
+
jumpflags_p = 1;
limm = ((limm & ((1 << operand->shift) - 1))
| ((value & ((1 << operand->bits) - 1)) << operand->shift));
@@ -1332,13 +961,12 @@ insert_jumpflags (insn, operand, mods, reg, value, errmsg)
/* Called at the end of unary operand macros to copy the B field to C. */
static arc_insn
-insert_unopmacro (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_unopmacro (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
insn |= ((insn >> ARC_SHIFT_REGB) & ARC_MASK_REG) << operand->shift;
return insn;
@@ -1347,16 +975,15 @@ insert_unopmacro (insn, operand, mods, reg, value, errmsg)
/* Insert a relative address for a branch insn (b, bl, or lp). */
static arc_insn
-insert_reladdr (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value;
- const char **errmsg;
+insert_reladdr (arc_insn insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value,
+ const char **errmsg)
{
if (value & 3)
- *errmsg = "branch address not on 4 byte boundary";
+ *errmsg = _("branch address not on 4 byte boundary");
insn |= ((value >> 2) & ((1 << operand->bits) - 1)) << operand->shift;
return insn;
}
@@ -1376,30 +1003,23 @@ insert_reladdr (insn, operand, mods, reg, value, errmsg)
set the default correctly, though. */
static arc_insn
-insert_absaddr (insn, operand, mods, reg, value, errmsg)
- arc_insn insn;
- const struct arc_operand *operand ATTRIBUTE_UNUSED;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value *reg ATTRIBUTE_UNUSED;
- long value ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_absaddr (arc_insn insn,
+ const struct arc_operand *operand ATTRIBUTE_UNUSED,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value *reg ATTRIBUTE_UNUSED,
+ long value ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if (limm_p)
{
- /* if it is a jump and link, .jd must be specified. */
- if (insn & R(-1,9,1))
+ /* If it is a jump and link, .jd must be specified. */
+ if (insn & R (-1, 9, 1))
{
if (!nullify_p)
- {
- insn |= 0x02 << 5; /* default nullify to .jd. */
- }
- else
- {
- if (nullify != 0x02)
- {
- *errmsg = "must specify .jd or no nullify suffix";
- }
- }
+ insn |= 0x02 << 5; /* Default nullify to .jd. */
+
+ else if (nullify != 0x02)
+ *errmsg = _("must specify .jd or no nullify suffix");
}
}
return insn;
@@ -1412,14 +1032,36 @@ insert_absaddr (insn, operand, mods, reg, value, errmsg)
a suffix table entry for the "false" case, so values of zero must be
obtained from the return value (*OPVAL == NULL). */
-static const struct arc_operand_value *lookup_register (int type, long regno);
-
/* Called by the disassembler before printing an instruction. */
void
-arc_opcode_init_extract ()
+arc_opcode_init_extract (void)
{
- arc_opcode_init_insert();
+ arc_opcode_init_insert ();
+}
+
+static const struct arc_operand_value *
+lookup_register (int type, long regno)
+{
+ const struct arc_operand_value *r,*end;
+ struct arc_ext_operand_value *ext_oper = arc_ext_operands;
+
+ while (ext_oper)
+ {
+ if (ext_oper->operand.type == type && ext_oper->operand.value == regno)
+ return (&ext_oper->operand);
+ ext_oper = ext_oper->next;
+ }
+
+ if (type == REG)
+ return &arc_reg_names[regno];
+
+ /* ??? This is a little slow and can be speeded up. */
+ for (r = arc_reg_names, end = arc_reg_names + arc_reg_names_count;
+ r < end; ++r)
+ if (type == r->type && regno == r->value)
+ return r;
+ return 0;
}
/* As we're extracting registers, keep an eye out for the 'f' indicator
@@ -1430,12 +1072,11 @@ arc_opcode_init_extract ()
constants with special names. */
static long
-extract_reg (insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand;
- int mods;
- const struct arc_operand_value **opval;
- int *invalid ATTRIBUTE_UNUSED;
+extract_reg (arc_insn *insn,
+ const struct arc_operand *operand,
+ int mods,
+ const struct arc_operand_value **opval,
+ int *invalid ATTRIBUTE_UNUSED)
{
int regno;
long value;
@@ -1448,7 +1089,7 @@ extract_reg (insn, operand, mods, opval, invalid)
if (regno == ARC_REG_SHIMM)
{
op_type = OP_SHIMM;
- /* always return zero if dest is a shimm mlm. */
+ /* Always return zero if dest is a shimm mlm. */
if ('a' != operand->fmt)
{
@@ -1461,16 +1102,13 @@ extract_reg (insn, operand, mods, opval, invalid)
flagshimm_handled_p = 1;
}
else
- {
- value = 0;
- }
+ value = 0;
}
else if (regno == ARC_REG_SHIMM_UPDATE)
{
op_type = OP_SHIMM;
- /* always return zero if dest is a shimm mlm. */
-
+ /* Always return zero if dest is a shimm mlm. */
if ('a' != operand->fmt)
{
value = *insn & 511;
@@ -1478,9 +1116,8 @@ extract_reg (insn, operand, mods, opval, invalid)
value -= 512;
}
else
- {
- value = 0;
- }
+ value = 0;
+
flag_p = 1;
flagshimm_handled_p = 1;
}
@@ -1489,17 +1126,18 @@ extract_reg (insn, operand, mods, opval, invalid)
op_type = OP_LIMM;
value = insn[1];
limm_p = 1;
- /* if this is a jump instruction (j,jl), show new pc correctly. */
+
+ /* If this is a jump instruction (j,jl), show new pc correctly. */
if (0x07 == ((*insn & I(-1)) >> 27))
- {
- value = (value & 0xffffff);
- }
+ value = (value & 0xffffff);
}
+
/* It's a register, set OPVAL (that's the only way we distinguish registers
from constants here). */
else
{
const struct arc_operand_value *reg = lookup_register (REG, regno);
+
op_type = OP_REG;
if (reg == NULL)
@@ -1520,6 +1158,7 @@ extract_reg (insn, operand, mods, opval, invalid)
if (reg != NULL && opval != NULL)
*opval = reg;
}
+
switch(operand->fmt)
{
case 'a':
@@ -1546,12 +1185,11 @@ extract_reg (insn, operand, mods, opval, invalid)
This value is actually stored in the register field. */
static long
-extract_flag (insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value **opval;
- int *invalid ATTRIBUTE_UNUSED;
+extract_flag (arc_insn *insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value **opval,
+ int *invalid ATTRIBUTE_UNUSED)
{
int f;
const struct arc_operand_value *val;
@@ -1577,12 +1215,11 @@ extract_flag (insn, operand, mods, opval, invalid)
zero. */
static long
-extract_cond (insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value **opval;
- int *invalid ATTRIBUTE_UNUSED;
+extract_cond (arc_insn *insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value **opval,
+ int *invalid ATTRIBUTE_UNUSED)
{
long cond;
const struct arc_operand_value *val;
@@ -1604,12 +1241,11 @@ extract_cond (insn, operand, mods, opval, invalid)
We return the value as a real address (not right shifted by 2). */
static long
-extract_reladdr (insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value **opval ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_reladdr (arc_insn *insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
long addr;
@@ -1620,14 +1256,14 @@ extract_reladdr (insn, operand, mods, opval, invalid)
return addr << 2;
}
-/* extract the flags bits from a j or jl long immediate. */
+/* Extract the flags bits from a j or jl long immediate. */
+
static long
-extract_jumpflags(insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value **opval ATTRIBUTE_UNUSED;
- int *invalid;
+extract_jumpflags (arc_insn *insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
+ int *invalid)
{
if (!flag_p || !limm_p)
*invalid = 1;
@@ -1635,15 +1271,14 @@ extract_jumpflags(insn, operand, mods, opval, invalid)
? (insn[1] >> operand->shift) & ((1 << operand->bits) -1): 0);
}
-/* extract st insn's offset. */
+/* Extract st insn's offset. */
static long
-extract_st_offset (insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value **opval ATTRIBUTE_UNUSED;
- int *invalid;
+extract_st_offset (arc_insn *insn,
+ const struct arc_operand *operand,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
+ int *invalid)
{
int value = 0;
@@ -1656,21 +1291,19 @@ extract_st_offset (insn, operand, mods, opval, invalid)
ls_operand[LS_OFFSET] = OP_SHIMM;
}
else
- {
- *invalid = 1;
- }
- return(value);
+ *invalid = 1;
+
+ return value;
}
-/* extract ld insn's offset. */
+/* Extract ld insn's offset. */
static long
-extract_ld_offset (insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand;
- int mods;
- const struct arc_operand_value **opval;
- int *invalid;
+extract_ld_offset (arc_insn *insn,
+ const struct arc_operand *operand,
+ int mods,
+ const struct arc_operand_value **opval,
+ int *invalid)
{
int test = insn[0] & I(-1);
int value;
@@ -1682,9 +1315,10 @@ extract_ld_offset (insn, operand, mods, opval, invalid)
value -= 512;
if (value)
ls_operand[LS_OFFSET] = OP_SHIMM;
- return(value);
+
+ return value;
}
- /* if it isn't in the insn, it's concealed behind reg 'c'. */
+ /* If it isn't in the insn, it's concealed behind reg 'c'. */
return extract_reg (insn, &arc_operands[arc_operand_map['c']],
mods, opval, invalid);
}
@@ -1694,12 +1328,11 @@ extract_ld_offset (insn, operand, mods, opval, invalid)
and we don't want the disassembler to confuse them. */
static long
-extract_unopmacro (insn, operand, mods, opval, invalid)
- arc_insn *insn;
- const struct arc_operand *operand ATTRIBUTE_UNUSED;
- int mods ATTRIBUTE_UNUSED;
- const struct arc_operand_value **opval ATTRIBUTE_UNUSED;
- int *invalid;
+extract_unopmacro (arc_insn *insn,
+ const struct arc_operand *operand ATTRIBUTE_UNUSED,
+ int mods ATTRIBUTE_UNUSED,
+ const struct arc_operand_value **opval ATTRIBUTE_UNUSED,
+ int *invalid)
{
/* This misses the case where B == ARC_REG_SHIMM_UPDATE &&
C == ARC_REG_SHIMM (or vice versa). No big deal. Those insns will get
@@ -1710,98 +1343,404 @@ extract_unopmacro (insn, operand, mods, opval, invalid)
*invalid = 1;
return 0;
}
+
+/* ARC instructions.
-/* Utility for the extraction functions to return the index into
- `arc_suffixes'. */
+ Longer versions of insns must appear before shorter ones (if gas sees
+ "lsr r2,r3,1" when it's parsing "lsr %a,%b" it will think the ",1" is
+ junk). This isn't necessary for `ld' because of the trailing ']'.
-const struct arc_operand_value *
-arc_opcode_lookup_suffix (type, value)
- const struct arc_operand *type;
- int value;
+ Instructions that are really macros based on other insns must appear
+ before the real insn so they're chosen when disassembling. Eg: The `mov'
+ insn is really the `and' insn. */
+
+struct arc_opcode arc_opcodes[] =
{
- register const struct arc_operand_value *v,*end;
- struct arc_ext_operand_value *ext_oper = arc_ext_operands;
+ /* Base case instruction set (core versions 5-8). */
- while (ext_oper)
+ /* "mov" is really an "and". */
+ { "mov%.q%.f %a,%b%F%S%L%U", I(-1), I(12), ARC_MACH_5, 0, 0 },
+ /* "asl" is really an "add". */
+ { "asl%.q%.f %a,%b%F%S%L%U", I(-1), I(8), ARC_MACH_5, 0, 0 },
+ /* "lsl" is really an "add". */
+ { "lsl%.q%.f %a,%b%F%S%L%U", I(-1), I(8), ARC_MACH_5, 0, 0 },
+ /* "nop" is really an "xor". */
+ { "nop", 0x7fffffff, 0x7fffffff, ARC_MACH_5, 0, 0 },
+ /* "rlc" is really an "adc". */
+ { "rlc%.q%.f %a,%b%F%S%L%U", I(-1), I(9), ARC_MACH_5, 0, 0 },
+ { "adc%.q%.f %a,%b,%c%F%S%L", I(-1), I(9), ARC_MACH_5, 0, 0 },
+ { "add%.q%.f %a,%b,%c%F%S%L", I(-1), I(8), ARC_MACH_5, 0, 0 },
+ { "and%.q%.f %a,%b,%c%F%S%L", I(-1), I(12), ARC_MACH_5, 0, 0 },
+ { "asr%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(1), ARC_MACH_5, 0, 0 },
+ { "bic%.q%.f %a,%b,%c%F%S%L", I(-1), I(14), ARC_MACH_5, 0, 0 },
+ { "b%q%.n %B", I(-1), I(4), ARC_MACH_5 | ARC_OPCODE_COND_BRANCH, 0, 0 },
+ { "bl%q%.n %B", I(-1), I(5), ARC_MACH_5 | ARC_OPCODE_COND_BRANCH, 0, 0 },
+ { "extb%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(7), ARC_MACH_5, 0, 0 },
+ { "extw%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(8), ARC_MACH_5, 0, 0 },
+ { "flag%.q %b%G%S%L", I(-1)|A(-1)|C(-1), I(3)|A(ARC_REG_SHIMM_UPDATE)|C(0), ARC_MACH_5, 0, 0 },
+ { "brk", 0x1ffffe00, 0x1ffffe00, ARC_MACH_7, 0, 0 },
+ { "sleep", 0x1ffffe01, 0x1ffffe01, ARC_MACH_7, 0, 0 },
+ { "swi", 0x1ffffe02, 0x1ffffe02, ARC_MACH_8, 0, 0 },
+ /* %Q: force cond_p=1 -> no shimm values. This insn allows an
+ optional flags spec. */
+ { "j%q%Q%.n%.f %b%F%J,%j", I(-1)|A(-1)|C(-1)|R(-1,7,1), I(7)|A(0)|C(0)|R(0,7,1), ARC_MACH_5 | ARC_OPCODE_COND_BRANCH, 0, 0 },
+ { "j%q%Q%.n%.f %b%F%J", I(-1)|A(-1)|C(-1)|R(-1,7,1), I(7)|A(0)|C(0)|R(0,7,1), ARC_MACH_5 | ARC_OPCODE_COND_BRANCH, 0, 0 },
+ /* This insn allows an optional flags spec. */
+ { "jl%q%Q%.n%.f %b%F%J,%j", I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1), I(7)|A(0)|C(0)|R(0,7,1)|R(1,9,1), ARC_MACH_6 | ARC_OPCODE_COND_BRANCH, 0, 0 },
+ { "jl%q%Q%.n%.f %b%F%J", I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1), I(7)|A(0)|C(0)|R(0,7,1)|R(1,9,1), ARC_MACH_6 | ARC_OPCODE_COND_BRANCH, 0, 0 },
+ /* Put opcode 1 ld insns first so shimm gets prefered over limm.
+ "[%b]" is before "[%b,%o]" so 0 offsets don't get printed. */
+ { "ld%Z%.X%.W%.E %a,[%s]%S%L%1", I(-1)|R(-1,13,1)|R(-1,0,511), I(1)|R(0,13,1)|R(0,0,511), ARC_MACH_5, 0, 0 },
+ { "ld%z%.x%.w%.e %a,[%s]%S%L%1", I(-1)|R(-1,4,1)|R(-1,6,7), I(0)|R(0,4,1)|R(0,6,7), ARC_MACH_5, 0, 0 },
+ { "ld%z%.x%.w%.e %a,[%s,%O]%S%L%1", I(-1)|R(-1,4,1)|R(-1,6,7), I(0)|R(0,4,1)|R(0,6,7), ARC_MACH_5, 0, 0 },
+ { "ld%Z%.X%.W%.E %a,[%s,%O]%S%L%3", I(-1)|R(-1,13,1), I(1)|R(0,13,1), ARC_MACH_5, 0, 0 },
+ { "lp%q%.n %B", I(-1), I(6), ARC_MACH_5, 0, 0 },
+ { "lr %a,[%Ab]%S%L", I(-1)|C(-1), I(1)|C(0x10), ARC_MACH_5, 0, 0 },
+ { "lsr%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(2), ARC_MACH_5, 0, 0 },
+ { "or%.q%.f %a,%b,%c%F%S%L", I(-1), I(13), ARC_MACH_5, 0, 0 },
+ { "ror%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(3), ARC_MACH_5, 0, 0 },
+ { "rrc%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(4), ARC_MACH_5, 0, 0 },
+ { "sbc%.q%.f %a,%b,%c%F%S%L", I(-1), I(11), ARC_MACH_5, 0, 0 },
+ { "sexb%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(5), ARC_MACH_5, 0, 0 },
+ { "sexw%.q%.f %a,%b%F%S%L", I(-1)|C(-1), I(3)|C(6), ARC_MACH_5, 0, 0 },
+ { "sr %c,[%Ab]%S%L", I(-1)|A(-1), I(2)|A(0x10), ARC_MACH_5, 0, 0 },
+ /* "[%b]" is before "[%b,%o]" so 0 offsets don't get printed. */
+ { "st%y%.v%.D %c,[%s]%L%S%0", I(-1)|R(-1,25,1)|R(-1,21,1), I(2)|R(0,25,1)|R(0,21,1), ARC_MACH_5, 0, 0 },
+ { "st%y%.v%.D %c,[%s,%o]%S%L%2", I(-1)|R(-1,25,1)|R(-1,21,1), I(2)|R(0,25,1)|R(0,21,1), ARC_MACH_5, 0, 0 },
+ { "sub%.q%.f %a,%b,%c%F%S%L", I(-1), I(10), ARC_MACH_5, 0, 0 },
+ { "xor%.q%.f %a,%b,%c%F%S%L", I(-1), I(15), ARC_MACH_5, 0, 0 }
+};
+
+const int arc_opcodes_count = sizeof (arc_opcodes) / sizeof (arc_opcodes[0]);
+
+const struct arc_operand_value arc_reg_names[] =
+{
+ /* Core register set r0-r63. */
+
+ /* r0-r28 - general purpose registers. */
+ { "r0", 0, REG, 0 }, { "r1", 1, REG, 0 }, { "r2", 2, REG, 0 },
+ { "r3", 3, REG, 0 }, { "r4", 4, REG, 0 }, { "r5", 5, REG, 0 },
+ { "r6", 6, REG, 0 }, { "r7", 7, REG, 0 }, { "r8", 8, REG, 0 },
+ { "r9", 9, REG, 0 }, { "r10", 10, REG, 0 }, { "r11", 11, REG, 0 },
+ { "r12", 12, REG, 0 }, { "r13", 13, REG, 0 }, { "r14", 14, REG, 0 },
+ { "r15", 15, REG, 0 }, { "r16", 16, REG, 0 }, { "r17", 17, REG, 0 },
+ { "r18", 18, REG, 0 }, { "r19", 19, REG, 0 }, { "r20", 20, REG, 0 },
+ { "r21", 21, REG, 0 }, { "r22", 22, REG, 0 }, { "r23", 23, REG, 0 },
+ { "r24", 24, REG, 0 }, { "r25", 25, REG, 0 }, { "r26", 26, REG, 0 },
+ { "r27", 27, REG, 0 }, { "r28", 28, REG, 0 },
+ /* Maskable interrupt link register. */
+ { "ilink1", 29, REG, 0 },
+ /* Maskable interrupt link register. */
+ { "ilink2", 30, REG, 0 },
+ /* Branch-link register. */
+ { "blink", 31, REG, 0 },
+
+ /* r32-r59 reserved for extensions. */
+ { "r32", 32, REG, 0 }, { "r33", 33, REG, 0 }, { "r34", 34, REG, 0 },
+ { "r35", 35, REG, 0 }, { "r36", 36, REG, 0 }, { "r37", 37, REG, 0 },
+ { "r38", 38, REG, 0 }, { "r39", 39, REG, 0 }, { "r40", 40, REG, 0 },
+ { "r41", 41, REG, 0 }, { "r42", 42, REG, 0 }, { "r43", 43, REG, 0 },
+ { "r44", 44, REG, 0 }, { "r45", 45, REG, 0 }, { "r46", 46, REG, 0 },
+ { "r47", 47, REG, 0 }, { "r48", 48, REG, 0 }, { "r49", 49, REG, 0 },
+ { "r50", 50, REG, 0 }, { "r51", 51, REG, 0 }, { "r52", 52, REG, 0 },
+ { "r53", 53, REG, 0 }, { "r54", 54, REG, 0 }, { "r55", 55, REG, 0 },
+ { "r56", 56, REG, 0 }, { "r57", 57, REG, 0 }, { "r58", 58, REG, 0 },
+ { "r59", 59, REG, 0 },
+
+ /* Loop count register (24 bits). */
+ { "lp_count", 60, REG, 0 },
+ /* Short immediate data indicator setting flags. */
+ { "r61", 61, REG, ARC_REGISTER_READONLY },
+ /* Long immediate data indicator setting flags. */
+ { "r62", 62, REG, ARC_REGISTER_READONLY },
+ /* Short immediate data indicator not setting flags. */
+ { "r63", 63, REG, ARC_REGISTER_READONLY },
+
+ /* Small-data base register. */
+ { "gp", 26, REG, 0 },
+ /* Frame pointer. */
+ { "fp", 27, REG, 0 },
+ /* Stack pointer. */
+ { "sp", 28, REG, 0 },
+
+ { "r29", 29, REG, 0 },
+ { "r30", 30, REG, 0 },
+ { "r31", 31, REG, 0 },
+ { "r60", 60, REG, 0 },
+
+ /* Auxiliary register set. */
+
+ /* Auxiliary register address map:
+ 0xffffffff-0xffffff00 (-1..-256) - customer shimm allocation
+ 0xfffffeff-0x80000000 - customer limm allocation
+ 0x7fffffff-0x00000100 - ARC limm allocation
+ 0x000000ff-0x00000000 - ARC shimm allocation */
+
+ /* Base case auxiliary registers (shimm address). */
+ { "status", 0x00, AUXREG, 0 },
+ { "semaphore", 0x01, AUXREG, 0 },
+ { "lp_start", 0x02, AUXREG, 0 },
+ { "lp_end", 0x03, AUXREG, 0 },
+ { "identity", 0x04, AUXREG, ARC_REGISTER_READONLY },
+ { "debug", 0x05, AUXREG, 0 },
+};
+
+const int arc_reg_names_count =
+ sizeof (arc_reg_names) / sizeof (arc_reg_names[0]);
+
+/* The suffix table.
+ Operands with the same name must be stored together. */
+
+const struct arc_operand_value arc_suffixes[] =
+{
+ /* Entry 0 is special, default values aren't printed by the disassembler. */
+ { "", 0, -1, 0 },
+
+ /* Base case condition codes. */
+ { "al", 0, COND, 0 },
+ { "ra", 0, COND, 0 },
+ { "eq", 1, COND, 0 },
+ { "z", 1, COND, 0 },
+ { "ne", 2, COND, 0 },
+ { "nz", 2, COND, 0 },
+ { "pl", 3, COND, 0 },
+ { "p", 3, COND, 0 },
+ { "mi", 4, COND, 0 },
+ { "n", 4, COND, 0 },
+ { "cs", 5, COND, 0 },
+ { "c", 5, COND, 0 },
+ { "lo", 5, COND, 0 },
+ { "cc", 6, COND, 0 },
+ { "nc", 6, COND, 0 },
+ { "hs", 6, COND, 0 },
+ { "vs", 7, COND, 0 },
+ { "v", 7, COND, 0 },
+ { "vc", 8, COND, 0 },
+ { "nv", 8, COND, 0 },
+ { "gt", 9, COND, 0 },
+ { "ge", 10, COND, 0 },
+ { "lt", 11, COND, 0 },
+ { "le", 12, COND, 0 },
+ { "hi", 13, COND, 0 },
+ { "ls", 14, COND, 0 },
+ { "pnz", 15, COND, 0 },
+
+ /* Condition codes 16-31 reserved for extensions. */
+
+ { "f", 1, FLAG, 0 },
+
+ { "nd", ARC_DELAY_NONE, DELAY, 0 },
+ { "d", ARC_DELAY_NORMAL, DELAY, 0 },
+ { "jd", ARC_DELAY_JUMP, DELAY, 0 },
+
+ { "b", 1, SIZE1, 0 },
+ { "b", 1, SIZE10, 0 },
+ { "b", 1, SIZE22, 0 },
+ { "w", 2, SIZE1, 0 },
+ { "w", 2, SIZE10, 0 },
+ { "w", 2, SIZE22, 0 },
+ { "x", 1, SIGN0, 0 },
+ { "x", 1, SIGN9, 0 },
+ { "a", 1, ADDRESS3, 0 },
+ { "a", 1, ADDRESS12, 0 },
+ { "a", 1, ADDRESS24, 0 },
+
+ { "di", 1, CACHEBYPASS5, 0 },
+ { "di", 1, CACHEBYPASS14, 0 },
+ { "di", 1, CACHEBYPASS26, 0 },
+};
+
+const int arc_suffixes_count =
+ sizeof (arc_suffixes) / sizeof (arc_suffixes[0]);
+
+/* Indexed by first letter of opcode. Points to chain of opcodes with same
+ first letter. */
+static struct arc_opcode *opcode_map[26 + 1];
+
+/* Indexed by insn code. Points to chain of opcodes with same insn code. */
+static struct arc_opcode *icode_map[32];
+
+/* Configuration flags. */
+
+/* Various ARC_HAVE_XXX bits. */
+static int cpu_type;
+
+/* Translate a bfd_mach_arc_xxx value to a ARC_MACH_XXX value. */
+
+int
+arc_get_opcode_mach (int bfd_mach, int big_p)
+{
+ static int mach_type_map[] =
+ {
+ ARC_MACH_5,
+ ARC_MACH_6,
+ ARC_MACH_7,
+ ARC_MACH_8
+ };
+ return mach_type_map[bfd_mach - bfd_mach_arc_5] | (big_p ? ARC_MACH_BIG : 0);
+}
+
+/* Initialize any tables that need it.
+ Must be called once at start up (or when first needed).
+
+ FLAGS is a set of bits that say what version of the cpu we have,
+ and in particular at least (one of) ARC_MACH_XXX. */
+
+void
+arc_opcode_init_tables (int flags)
+{
+ static int init_p = 0;
+
+ cpu_type = flags;
+
+ /* We may be intentionally called more than once (for example gdb will call
+ us each time the user switches cpu). These tables only need to be init'd
+ once though. */
+ if (!init_p)
{
- if (type == &arc_operands[ext_oper->operand.type]
- && value == ext_oper->operand.value)
- return (&ext_oper->operand);
- ext_oper = ext_oper->next;
+ int i,n;
+
+ memset (arc_operand_map, 0, sizeof (arc_operand_map));
+ n = sizeof (arc_operands) / sizeof (arc_operands[0]);
+ for (i = 0; i < n; ++i)
+ arc_operand_map[arc_operands[i].fmt] = i;
+
+ memset (opcode_map, 0, sizeof (opcode_map));
+ memset (icode_map, 0, sizeof (icode_map));
+ /* Scan the table backwards so macros appear at the front. */
+ for (i = arc_opcodes_count - 1; i >= 0; --i)
+ {
+ int opcode_hash = ARC_HASH_OPCODE (arc_opcodes[i].syntax);
+ int icode_hash = ARC_HASH_ICODE (arc_opcodes[i].value);
+
+ arc_opcodes[i].next_asm = opcode_map[opcode_hash];
+ opcode_map[opcode_hash] = &arc_opcodes[i];
+
+ arc_opcodes[i].next_dis = icode_map[icode_hash];
+ icode_map[icode_hash] = &arc_opcodes[i];
+ }
+
+ init_p = 1;
}
+}
- /* ??? This is a little slow and can be speeded up. */
+/* Return non-zero if OPCODE is supported on the specified cpu.
+ Cpu selection is made when calling `arc_opcode_init_tables'. */
- for (v = arc_suffixes, end = arc_suffixes + arc_suffixes_count; v < end; ++v)
- if (type == &arc_operands[v->type]
- && value == v->value)
- return v;
+int
+arc_opcode_supported (const struct arc_opcode *opcode)
+{
+ if (ARC_OPCODE_CPU (opcode->flags) <= cpu_type)
+ return 1;
return 0;
}
-static const struct arc_operand_value *
-lookup_register (type, regno)
- int type;
- long regno;
+/* Return the first insn in the chain for assembling INSN. */
+
+const struct arc_opcode *
+arc_opcode_lookup_asm (const char *insn)
+{
+ return opcode_map[ARC_HASH_OPCODE (insn)];
+}
+
+/* Return the first insn in the chain for disassembling INSN. */
+
+const struct arc_opcode *
+arc_opcode_lookup_dis (unsigned int insn)
+{
+ return icode_map[ARC_HASH_ICODE (insn)];
+}
+
+/* Called by the assembler before parsing an instruction. */
+
+void
+arc_opcode_init_insert (void)
{
- register const struct arc_operand_value *r,*end;
+ int i;
+
+ for(i = 0; i < OPERANDS; i++)
+ ls_operand[i] = OP_NONE;
+
+ flag_p = 0;
+ flagshimm_handled_p = 0;
+ cond_p = 0;
+ addrwb_p = 0;
+ shimm_p = 0;
+ limm_p = 0;
+ jumpflags_p = 0;
+ nullify_p = 0;
+ nullify = 0; /* The default is important. */
+}
+
+/* Called by the assembler to see if the insn has a limm operand.
+ Also called by the disassembler to see if the insn contains a limm. */
+
+int
+arc_opcode_limm_p (long *limmp)
+{
+ if (limmp)
+ *limmp = limm;
+ return limm_p;
+}
+
+/* Utility for the extraction functions to return the index into
+ `arc_suffixes'. */
+
+const struct arc_operand_value *
+arc_opcode_lookup_suffix (const struct arc_operand *type, int value)
+{
+ const struct arc_operand_value *v,*end;
struct arc_ext_operand_value *ext_oper = arc_ext_operands;
while (ext_oper)
{
- if (ext_oper->operand.type == type && ext_oper->operand.value == regno)
+ if (type == &arc_operands[ext_oper->operand.type]
+ && value == ext_oper->operand.value)
return (&ext_oper->operand);
ext_oper = ext_oper->next;
}
- if (type == REG)
- return &arc_reg_names[regno];
-
/* ??? This is a little slow and can be speeded up. */
-
- for (r = arc_reg_names, end = arc_reg_names + arc_reg_names_count;
- r < end; ++r)
- if (type == r->type && regno == r->value)
- return r;
+ for (v = arc_suffixes, end = arc_suffixes + arc_suffixes_count; v < end; ++v)
+ if (type == &arc_operands[v->type]
+ && value == v->value)
+ return v;
return 0;
}
int
-arc_insn_is_j(insn)
- arc_insn insn;
+arc_insn_is_j (arc_insn insn)
{
return (insn & (I(-1))) == I(0x7);
}
int
-arc_insn_not_jl(insn)
- arc_insn insn;
+arc_insn_not_jl (arc_insn insn)
{
return ((insn & (I(-1)|A(-1)|C(-1)|R(-1,7,1)|R(-1,9,1)))
!= (I(0x7) | R(-1,9,1)));
}
int
-arc_operand_type(int opertype)
+arc_operand_type (int opertype)
{
switch (opertype)
{
case 0:
- return(COND);
+ return COND;
break;
case 1:
- return(REG);
+ return REG;
break;
case 2:
- return(AUXREG);
+ return AUXREG;
break;
}
return -1;
}
struct arc_operand_value *
-get_ext_suffix(s)
- char *s;
+get_ext_suffix (char *s)
{
struct arc_ext_operand_value *suffix = arc_ext_operands;
@@ -1816,7 +1755,7 @@ get_ext_suffix(s)
}
int
-arc_get_noshortcut_flag()
+arc_get_noshortcut_flag (void)
{
return ARC_REGISTER_NOSHORT_CUT;
}
diff --git a/contrib/binutils/opcodes/arm-dis.c b/contrib/binutils/opcodes/arm-dis.c
index e918dafa28bb..bc5b52cf9c08 100644
--- a/contrib/binutils/opcodes/arm-dis.c
+++ b/contrib/binutils/opcodes/arm-dis.c
@@ -1,5 +1,5 @@
/* Instruction printing code for the ARM
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modification by James G. Smith (jsmith@cygnus.co.uk)
@@ -18,26 +18,23 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
+
#include "dis-asm.h"
-#define DEFINE_TABLE
-#include "arm-opc.h"
-#include "coff/internal.h"
-#include "libcoff.h"
+#include "opcode/arm.h"
#include "opintl.h"
#include "safe-ctype.h"
/* FIXME: This shouldn't be done here. */
+#include "coff/internal.h"
+#include "libcoff.h"
#include "elf-bfd.h"
#include "elf/internal.h"
#include "elf/arm.h"
-#ifndef streq
-#define streq(a,b) (strcmp ((a), (b)) == 0)
-#endif
-
+/* FIXME: Belongs in global header. */
#ifndef strneq
#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
#endif
@@ -46,19 +43,1043 @@
#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
#endif
-static char * arm_conditional[] =
+struct opcode32
+{
+ unsigned long arch; /* Architecture defining this insn. */
+ unsigned long value, mask; /* Recognise insn if (op&mask)==value. */
+ const char *assembler; /* How to disassemble this insn. */
+};
+
+struct opcode16
+{
+ unsigned long arch; /* Architecture defining this insn. */
+ unsigned short value, mask; /* Recognise insn if (op&mask)==value. */
+ const char *assembler; /* How to disassemble this insn. */
+};
+
+/* print_insn_coprocessor recognizes the following format control codes:
+
+ %% %
+
+ %c print condition code (always bits 28-31)
+ %A print address for ldc/stc/ldf/stf instruction
+ %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
+ %Q print floating point precision in ldf/stf insn
+ %R print floating point rounding mode
+
+ %<bitfield>r print as an ARM register
+ %<bitfield>d print the bitfield in decimal
+ %<bitfield>x print the bitfield in hex
+ %<bitfield>X print the bitfield as 1 hex digit without leading "0x"
+ %<bitfield>f print a floating point constant if >7 else a
+ floating point register
+ %<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
+
+ %<code>y print a single precision VFP reg.
+ Codes: 0=>Sm, 1=>Sd, 2=>Sn, 3=>multi-list, 4=>Sm pair
+ %<code>z print a double precision VFP reg
+ Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
+ %<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
+
+ %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. */
+
+/* Common coprocessor opcodes shared between Arm and Thumb-2. */
+
+static const struct opcode32 coprocessor_opcodes[] =
+{
+ /* XScale instructions. */
+ {ARM_CEXT_XSCALE, 0x0e200010, 0x0fff0ff0, "mia%c\tacc0, %0-3r, %12-15r"},
+ {ARM_CEXT_XSCALE, 0x0e280010, 0x0fff0ff0, "miaph%c\tacc0, %0-3r, %12-15r"},
+ {ARM_CEXT_XSCALE, 0x0e2c0010, 0x0ffc0ff0, "mia%17'T%17`B%16'T%16`B%c\tacc0, %0-3r, %12-15r"},
+ {ARM_CEXT_XSCALE, 0x0c400000, 0x0ff00fff, "mar%c\tacc0, %12-15r, %16-19r"},
+ {ARM_CEXT_XSCALE, 0x0c500000, 0x0ff00fff, "mra%c\t%12-15r, %16-19r, acc0"},
+
+ /* Intel Wireless MMX technology instructions. */
+#define FIRST_IWMMXT_INSN 0x0e130130
+#define IWMMXT_INSN_COUNT 47
+ {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"},
+ {ARM_CEXT_XSCALE, 0x0e100070, 0x0f300ff0, "textrm%3?su%22-23w%c\t%12-15r, %16-19g, #%0-2d"},
+ {ARM_CEXT_XSCALE, 0x0e600010, 0x0ff00f38, "tinsr%6-7w%c\t%16-19g, %12-15r, #%0-2d"},
+ {ARM_CEXT_XSCALE, 0x0e000110, 0x0ff00fff, "tmcr%c\t%16-19G, %12-15r"},
+ {ARM_CEXT_XSCALE, 0x0c400000, 0x0ff00ff0, "tmcrr%c\t%0-3g, %12-15r, %16-19r"},
+ {ARM_CEXT_XSCALE, 0x0e2c0010, 0x0ffc0e10, "tmia%17?tb%16?tb%c\t%5-8g, %0-3r, %12-15r"},
+ {ARM_CEXT_XSCALE, 0x0e200010, 0x0fff0e10, "tmia%c\t%5-8g, %0-3r, %12-15r"},
+ {ARM_CEXT_XSCALE, 0x0e280010, 0x0fff0e10, "tmiaph%c\t%5-8g, %0-3r, %12-15r"},
+ {ARM_CEXT_XSCALE, 0x0e100030, 0x0f300fff, "tmovmsk%22-23w%c\t%12-15r, %16-19g"},
+ {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, 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, 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, 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, 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, 0x0e000160, 0x0f100ff0, "wmax%21?su%22-23w%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, 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, 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, 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, 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, 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, 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, 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"},
+ {ARM_CEXT_XSCALE, 0x0e100000, 0x0ff00ff0, "wxor%c\t%12-15g, %16-19g, %0-3g"},
+
+ /* Floating point coprocessor (FPA) instructions */
+ {FPU_FPA_EXT_V1, 0x0e000100, 0x0ff08f10, "adf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e100100, 0x0ff08f10, "muf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e200100, 0x0ff08f10, "suf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e300100, 0x0ff08f10, "rsf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e400100, 0x0ff08f10, "dvf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e500100, 0x0ff08f10, "rdf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e600100, 0x0ff08f10, "pow%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e700100, 0x0ff08f10, "rpw%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e800100, 0x0ff08f10, "rmf%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e900100, 0x0ff08f10, "fml%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0ea00100, 0x0ff08f10, "fdv%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0eb00100, 0x0ff08f10, "frd%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0ec00100, 0x0ff08f10, "pol%c%P%R\t%12-14f, %16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e008100, 0x0ff08f10, "mvf%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e108100, 0x0ff08f10, "mnf%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e208100, 0x0ff08f10, "abs%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e308100, 0x0ff08f10, "rnd%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e408100, 0x0ff08f10, "sqt%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e508100, 0x0ff08f10, "log%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e608100, 0x0ff08f10, "lgn%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e708100, 0x0ff08f10, "exp%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e808100, 0x0ff08f10, "sin%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e908100, 0x0ff08f10, "cos%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0ea08100, 0x0ff08f10, "tan%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0eb08100, 0x0ff08f10, "asn%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0ec08100, 0x0ff08f10, "acs%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0ed08100, 0x0ff08f10, "atn%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0ee08100, 0x0ff08f10, "urd%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0ef08100, 0x0ff08f10, "nrm%c%P%R\t%12-14f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0e000110, 0x0ff00f1f, "flt%c%P%R\t%16-18f, %12-15r"},
+ {FPU_FPA_EXT_V1, 0x0e100110, 0x0fff0f98, "fix%c%R\t%12-15r, %0-2f"},
+ {FPU_FPA_EXT_V1, 0x0e200110, 0x0fff0fff, "wfs%c\t%12-15r"},
+ {FPU_FPA_EXT_V1, 0x0e300110, 0x0fff0fff, "rfs%c\t%12-15r"},
+ {FPU_FPA_EXT_V1, 0x0e400110, 0x0fff0fff, "wfc%c\t%12-15r"},
+ {FPU_FPA_EXT_V1, 0x0e500110, 0x0fff0fff, "rfc%c\t%12-15r"},
+ {FPU_FPA_EXT_V1, 0x0e90f110, 0x0ff8fff0, "cmf%c\t%16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0eb0f110, 0x0ff8fff0, "cnf%c\t%16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0ed0f110, 0x0ff8fff0, "cmfe%c\t%16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0ef0f110, 0x0ff8fff0, "cnfe%c\t%16-18f, %0-3f"},
+ {FPU_FPA_EXT_V1, 0x0c000100, 0x0e100f00, "stf%c%Q\t%12-14f, %A"},
+ {FPU_FPA_EXT_V1, 0x0c100100, 0x0e100f00, "ldf%c%Q\t%12-14f, %A"},
+ {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"},
+
+ /* 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, 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"},
+
+ /* Cirrus coprocessor instructions. */
+ {ARM_CEXT_MAVERICK, 0x0d100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0c100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0d500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0c500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0d100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0c100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0d500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0c500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0d000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0c000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0d400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0c400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0d000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0c000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0d400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0c400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
+ {ARM_CEXT_MAVERICK, 0x0e000450, 0x0ff00ff0, "cfmvsr%c\tmvf%16-19d, %12-15r"},
+ {ARM_CEXT_MAVERICK, 0x0e100450, 0x0ff00ff0, "cfmvrs%c\t%12-15r, mvf%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e000410, 0x0ff00ff0, "cfmvdlr%c\tmvd%16-19d, %12-15r"},
+ {ARM_CEXT_MAVERICK, 0x0e100410, 0x0ff00ff0, "cfmvrdl%c\t%12-15r, mvd%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e000430, 0x0ff00ff0, "cfmvdhr%c\tmvd%16-19d, %12-15r"},
+ {ARM_CEXT_MAVERICK, 0x0e100430, 0x0ff00fff, "cfmvrdh%c\t%12-15r, mvd%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e000510, 0x0ff00fff, "cfmv64lr%c\tmvdx%16-19d, %12-15r"},
+ {ARM_CEXT_MAVERICK, 0x0e100510, 0x0ff00fff, "cfmvr64l%c\t%12-15r, mvdx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e000530, 0x0ff00fff, "cfmv64hr%c\tmvdx%16-19d, %12-15r"},
+ {ARM_CEXT_MAVERICK, 0x0e100530, 0x0ff00fff, "cfmvr64h%c\t%12-15r, mvdx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e200440, 0x0ff00fff, "cfmval32%c\tmvax%12-15d, mvfx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e100440, 0x0ff00fff, "cfmv32al%c\tmvfx%12-15d, mvax%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e200460, 0x0ff00fff, "cfmvam32%c\tmvax%12-15d, mvfx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e100460, 0x0ff00fff, "cfmv32am%c\tmvfx%12-15d, mvax%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e200480, 0x0ff00fff, "cfmvah32%c\tmvax%12-15d, mvfx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e100480, 0x0ff00fff, "cfmv32ah%c\tmvfx%12-15d, mvax%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e2004a0, 0x0ff00fff, "cfmva32%c\tmvax%12-15d, mvfx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e1004a0, 0x0ff00fff, "cfmv32a%c\tmvfx%12-15d, mvax%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e2004c0, 0x0ff00fff, "cfmva64%c\tmvax%12-15d, mvdx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e1004c0, 0x0ff00fff, "cfmv64a%c\tmvdx%12-15d, mvax%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e2004e0, 0x0fff0fff, "cfmvsc32%c\tdspsc, mvdx%12-15d"},
+ {ARM_CEXT_MAVERICK, 0x0e1004e0, 0x0fff0fff, "cfmv32sc%c\tmvdx%12-15d, dspsc"},
+ {ARM_CEXT_MAVERICK, 0x0e000400, 0x0ff00fff, "cfcpys%c\tmvf%12-15d, mvf%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e000420, 0x0ff00fff, "cfcpyd%c\tmvd%12-15d, mvd%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e000460, 0x0ff00fff, "cfcvtsd%c\tmvd%12-15d, mvf%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e000440, 0x0ff00fff, "cfcvtds%c\tmvf%12-15d, mvd%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e000480, 0x0ff00fff, "cfcvt32s%c\tmvf%12-15d, mvfx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e0004a0, 0x0ff00fff, "cfcvt32d%c\tmvd%12-15d, mvfx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e0004c0, 0x0ff00fff, "cfcvt64s%c\tmvf%12-15d, mvdx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e0004e0, 0x0ff00fff, "cfcvt64d%c\tmvd%12-15d, mvdx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e100580, 0x0ff00fff, "cfcvts32%c\tmvfx%12-15d, mvf%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e1005a0, 0x0ff00fff, "cfcvtd32%c\tmvfx%12-15d, mvd%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e1005c0, 0x0ff00fff, "cftruncs32%c\tmvfx%12-15d, mvf%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e1005e0, 0x0ff00fff, "cftruncd32%c\tmvfx%12-15d, mvd%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e000550, 0x0ff00ff0, "cfrshl32%c\tmvfx%16-19d, mvfx%0-3d, %12-15r"},
+ {ARM_CEXT_MAVERICK, 0x0e000570, 0x0ff00ff0, "cfrshl64%c\tmvdx%16-19d, mvdx%0-3d, %12-15r"},
+ {ARM_CEXT_MAVERICK, 0x0e000500, 0x0ff00f10, "cfsh32%c\tmvfx%12-15d, mvfx%16-19d, #%I"},
+ {ARM_CEXT_MAVERICK, 0x0e200500, 0x0ff00f10, "cfsh64%c\tmvdx%12-15d, mvdx%16-19d, #%I"},
+ {ARM_CEXT_MAVERICK, 0x0e100490, 0x0ff00ff0, "cfcmps%c\t%12-15r, mvf%16-19d, mvf%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e1004b0, 0x0ff00ff0, "cfcmpd%c\t%12-15r, mvd%16-19d, mvd%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e100590, 0x0ff00ff0, "cfcmp32%c\t%12-15r, mvfx%16-19d, mvfx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e1005b0, 0x0ff00ff0, "cfcmp64%c\t%12-15r, mvdx%16-19d, mvdx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e300400, 0x0ff00fff, "cfabss%c\tmvf%12-15d, mvf%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e300420, 0x0ff00fff, "cfabsd%c\tmvd%12-15d, mvd%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e300440, 0x0ff00fff, "cfnegs%c\tmvf%12-15d, mvf%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e300460, 0x0ff00fff, "cfnegd%c\tmvd%12-15d, mvd%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e300480, 0x0ff00ff0, "cfadds%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e3004a0, 0x0ff00ff0, "cfaddd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e3004c0, 0x0ff00ff0, "cfsubs%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e3004e0, 0x0ff00ff0, "cfsubd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e100400, 0x0ff00ff0, "cfmuls%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e100420, 0x0ff00ff0, "cfmuld%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e300500, 0x0ff00fff, "cfabs32%c\tmvfx%12-15d, mvfx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e300520, 0x0ff00fff, "cfabs64%c\tmvdx%12-15d, mvdx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e300540, 0x0ff00fff, "cfneg32%c\tmvfx%12-15d, mvfx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e300560, 0x0ff00fff, "cfneg64%c\tmvdx%12-15d, mvdx%16-19d"},
+ {ARM_CEXT_MAVERICK, 0x0e300580, 0x0ff00ff0, "cfadd32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e3005a0, 0x0ff00ff0, "cfadd64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e3005c0, 0x0ff00ff0, "cfsub32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e3005e0, 0x0ff00ff0, "cfsub64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e100500, 0x0ff00ff0, "cfmul32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e100520, 0x0ff00ff0, "cfmul64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e100540, 0x0ff00ff0, "cfmac32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e100560, 0x0ff00ff0, "cfmsc32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e000600, 0x0ff00f10, "cfmadd32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e100600, 0x0ff00f10, "cfmsub32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e200600, 0x0ff00f10, "cfmadda32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {ARM_CEXT_MAVERICK, 0x0e300600, 0x0ff00f10, "cfmsuba32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
+
+ /* Generic coprocessor instructions */
+ {ARM_EXT_V2, 0x0c400000, 0x0ff00000, "mcrr%c\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
+ {ARM_EXT_V2, 0x0c500000, 0x0ff00000, "mrrc%c\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
+ {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"},
+
+ /* 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"},
+
+ /* 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}"},
+ {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. */
+
+/* print_insn_arm recognizes the following format control codes:
+
+ %% %
+
+ %a print address for ldr/str instruction
+ %s print address for ldr/str halfword/signextend instruction
+ %b print branch destination
+ %c print condition code (always bits 28-31)
+ %m print register mask for ldm/stm instruction
+ %o print operand2 (immediate or register + shift)
+ %p print 'p' iff bits 12-15 are 15
+ %t print 't' iff bit 21 set and bit 24 clear
+ %B print arm BLX(1) destination
+ %C print the PSR sub type.
+ %U print barrier type.
+ %P print address for pli instruction.
+
+ %<bitfield>r print as an ARM register
+ %<bitfield>d print the bitfield in decimal
+ %<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
+
+ %e print arm SMI operand (bits 0..7,8..19).
+ %E print the LSB and WIDTH fields of a BFI or BFC instruction.
+ %V print the 16-bit immediate field of a MOVT or MOVW instruction. */
+
+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"},
+
+ /* V7 instructions. */
+ {ARM_EXT_V7, 0xf450f000, 0xfd70f000, "pli\t%P"},
+ {ARM_EXT_V7, 0x0320f0f0, 0x0ffffff0, "dbg%c\t#%0-3d"},
+ {ARM_EXT_V7, 0xf57ff050, 0xfffffff0, "dmb\t%U"},
+ {ARM_EXT_V7, 0xf57ff040, 0xfffffff0, "dsb\t%U"},
+ {ARM_EXT_V7, 0xf57ff060, 0xfffffff0, "isb\t%U"},
+
+ /* ARM V6T2 instructions. */
+ {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, 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, 0x07a00050, 0x0fa00070, "%22?usbfx%c\t%12-15r, %0-3r, #%7-11d, #%16-20W"},
+
+ /* ARM V6Z instructions. */
+ {ARM_EXT_V6Z, 0x01600070, 0x0ff000f0, "smc%c\t%e"},
+
+ /* ARM V6K instructions. */
+ {ARM_EXT_V6K, 0xf57ff01f, 0xffffffff, "clrex"},
+ {ARM_EXT_V6K, 0x01d00f9f, 0x0ff00fff, "ldrexb%c\t%12-15r, [%16-19r]"},
+ {ARM_EXT_V6K, 0x01b00f9f, 0x0ff00fff, "ldrexd%c\t%12-15r, [%16-19r]"},
+ {ARM_EXT_V6K, 0x01f00f9f, 0x0ff00fff, "ldrexh%c\t%12-15r, [%16-19r]"},
+ {ARM_EXT_V6K, 0x01c00f90, 0x0ff00ff0, "strexb%c\t%12-15r, %0-3r, [%16-19r]"},
+ {ARM_EXT_V6K, 0x01a00f90, 0x0ff00ff0, "strexd%c\t%12-15r, %0-3r, [%16-19r]"},
+ {ARM_EXT_V6K, 0x01e00f90, 0x0ff00ff0, "strexh%c\t%12-15r, %0-3r, [%16-19r]"},
+
+ /* ARM V6K NOP hints. */
+ {ARM_EXT_V6K, 0x0320f001, 0x0fffffff, "yield%c"},
+ {ARM_EXT_V6K, 0x0320f002, 0x0fffffff, "wfe%c"},
+ {ARM_EXT_V6K, 0x0320f003, 0x0fffffff, "wfi%c"},
+ {ARM_EXT_V6K, 0x0320f004, 0x0fffffff, "sev%c"},
+ {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, 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, 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"},
+ {ARM_EXT_V6, 0x06200f30, 0x0ff00ff0, "qaddsubx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06200f70, 0x0ff00ff0, "qsub16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06200ff0, 0x0ff00ff0, "qsub8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06200f50, 0x0ff00ff0, "qsubaddx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06100f10, 0x0ff00ff0, "sadd16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06100f90, 0x0ff00ff0, "sadd8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06100f30, 0x0ff00ff0, "saddaddx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06300f10, 0x0ff00ff0, "shadd16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06300f90, 0x0ff00ff0, "shadd8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06300f30, 0x0ff00ff0, "shaddsubx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06300f70, 0x0ff00ff0, "shsub16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06300ff0, 0x0ff00ff0, "shsub8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06300f50, 0x0ff00ff0, "shsubaddx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06100f70, 0x0ff00ff0, "ssub16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06100ff0, 0x0ff00ff0, "ssub8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06100f50, 0x0ff00ff0, "ssubaddx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06500f10, 0x0ff00ff0, "uadd16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06500f90, 0x0ff00ff0, "uadd8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06500f30, 0x0ff00ff0, "uaddsubx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06700f10, 0x0ff00ff0, "uhadd16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06700f90, 0x0ff00ff0, "uhadd8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06700f30, 0x0ff00ff0, "uhaddsubx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06700f70, 0x0ff00ff0, "uhsub16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06700ff0, 0x0ff00ff0, "uhsub8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06700f50, 0x0ff00ff0, "uhsubaddx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06600f10, 0x0ff00ff0, "uqadd16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06600f90, 0x0ff00ff0, "uqadd8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06600f30, 0x0ff00ff0, "uqaddsubx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06600f70, 0x0ff00ff0, "uqsub16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06600ff0, 0x0ff00ff0, "uqsub8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06600f50, 0x0ff00ff0, "uqsubaddx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06500f70, 0x0ff00ff0, "usub16%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06500ff0, 0x0ff00ff0, "usub8%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06500f50, 0x0ff00ff0, "usubaddx%c\t%12-15r, %16-19r, %0-3r"},
+ {ARM_EXT_V6, 0x06bf0f30, 0x0fff0ff0, "rev%c\t\%12-15r, %0-3r"},
+ {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, 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, 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, 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, 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, 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, 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, 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"},
+ {ARM_EXT_V6, 0x0700f050, 0x0ff0f0d0, "smusd%5'x%c\t%16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V6, 0x07000010, 0x0ff000d0, "smlad%5'x%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
+ {ARM_EXT_V6, 0x07400010, 0x0ff000d0, "smlald%5'x%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V6, 0x07000050, 0x0ff000d0, "smlsd%5'x%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
+ {ARM_EXT_V6, 0x07400050, 0x0ff000d0, "smlsld%5'x%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
+ {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, 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, 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, 0x06e00f30, 0x0ff00ff0, "usat16%c\t%12-15r, #%16-19d, %0-3r"},
+
+ /* V5J instruction. */
+ {ARM_EXT_V5J, 0x012fff20, 0x0ffffff0, "bxj%c\t%0-3r"},
+
+ /* V5 Instructions. */
+ {ARM_EXT_V5, 0xe1200070, 0xfff000f0, "bkpt\t0x%16-19X%12-15X%8-11X%0-3X"},
+ {ARM_EXT_V5, 0xfa000000, 0xfe000000, "blx\t%B"},
+ {ARM_EXT_V5, 0x012fff30, 0x0ffffff0, "blx%c\t%0-3r"},
+ {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, 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"},
+ {ARM_EXT_V5ExP, 0x010000c0, 0x0ff000f0, "smlabt%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
+ {ARM_EXT_V5ExP, 0x010000e0, 0x0ff000f0, "smlatt%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
+
+ {ARM_EXT_V5ExP, 0x01200080, 0x0ff000f0, "smlawb%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
+ {ARM_EXT_V5ExP, 0x012000c0, 0x0ff000f0, "smlawt%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
+
+ {ARM_EXT_V5ExP, 0x01400080, 0x0ff000f0, "smlalbb%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V5ExP, 0x014000a0, 0x0ff000f0, "smlaltb%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V5ExP, 0x014000c0, 0x0ff000f0, "smlalbt%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V5ExP, 0x014000e0, 0x0ff000f0, "smlaltt%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
+
+ {ARM_EXT_V5ExP, 0x01600080, 0x0ff0f0f0, "smulbb%c\t%16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V5ExP, 0x016000a0, 0x0ff0f0f0, "smultb%c\t%16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V5ExP, 0x016000c0, 0x0ff0f0f0, "smulbt%c\t%16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V5ExP, 0x016000e0, 0x0ff0f0f0, "smultt%c\t%16-19r, %0-3r, %8-11r"},
+
+ {ARM_EXT_V5ExP, 0x012000a0, 0x0ff0f0f0, "smulwb%c\t%16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V5ExP, 0x012000e0, 0x0ff0f0f0, "smulwt%c\t%16-19r, %0-3r, %8-11r"},
+
+ {ARM_EXT_V5ExP, 0x01000050, 0x0ff00ff0, "qadd%c\t%12-15r, %0-3r, %16-19r"},
+ {ARM_EXT_V5ExP, 0x01400050, 0x0ff00ff0, "qdadd%c\t%12-15r, %0-3r, %16-19r"},
+ {ARM_EXT_V5ExP, 0x01200050, 0x0ff00ff0, "qsub%c\t%12-15r, %0-3r, %16-19r"},
+ {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_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, 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, 0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
+ {ARM_EXT_V1, 0x0f000000, 0x0f000000, "svc%c\t%0-23x"},
+
+ /* The rest. */
+ {ARM_EXT_V1, 0x00000000, 0x00000000, "undefined instruction %0-31x"},
+ {0, 0x00000000, 0x00000000, 0}
+};
+
+/* print_insn_thumb16 recognizes the following format control codes:
+
+ %S print Thumb register (bits 3..5 as high number if bit 6 set)
+ %D print Thumb register (bits 0..2 as high number if bit 7 set)
+ %<bitfield>I print bitfield as a signed decimal
+ (top bit of range being the sign bit)
+ %N print Thumb register mask (with LR)
+ %O print Thumb register mask (with PC)
+ %M print Thumb register mask
+ %b print CZB's 6-bit unsigned branch destination
+ %s print Thumb right-shift immediate (6..10; 0 == 32).
+ %<bitfield>r print bitfield as an ARM register
+ %<bitfield>d print bitfield as a decimal
+ %<bitfield>H print (bitfield * 2) as a decimal
+ %<bitfield>W print (bitfield * 4) as a decimal
+ %<bitfield>a print (bitfield * 4) as a pc-rel offset + decoded symbol
+ %<bitfield>B print Thumb branch destination (signed displacement)
+ %<bitfield>c print bitfield as a condition code
+ %<bitnum>'c print specified char iff bit is one
+ %<bitnum>?ab print a if bit is one else print b. */
+
+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 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 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 V5 ISA extends Thumb. */
+ {ARM_EXT_V5T, 0xbe00, 0xff00, "bkpt\t%0-7x"},
+ /* 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 V4T ISA (Thumb v1). */
+ {ARM_EXT_V4T, 0x46C0, 0xFFFF, "nop\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"},
+ /* format 13 */
+ {ARM_EXT_V4T, 0xB000, 0xFF80, "add\tsp, #%0-6W"},
+ {ARM_EXT_V4T, 0xB080, 0xFF80, "sub\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"},
+ /* format 14 */
+ {ARM_EXT_V4T, 0xB400, 0xFE00, "push\t%N"},
+ {ARM_EXT_V4T, 0xBC00, 0xFE00, "pop\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"},
+ /* 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]"},
+ /* 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]"},
+ /* 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"},
+ /* 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"},
+ /* format 6 */
+ {ARM_EXT_V4T, 0x4800, 0xF800, "ldr\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]"},
+ /* 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]"},
+ /* 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]"},
+ /* 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"},
+ /* format 15 */
+ {ARM_EXT_V4T, 0xC000, 0xF800, "stmia\t%8-10r!, %M"},
+ {ARM_EXT_V4T, 0xC800, 0xF800, "ldmia\t%8-10r!, %M"},
+ /* format 17 */
+ {ARM_EXT_V4T, 0xDF00, 0xFF00, "svc\t%0-7d"},
+ /* format 16 */
+ {ARM_EXT_V4T, 0xD000, 0xF000, "b%8-11c.n\t%0-7B"},
+ /* format 18 */
+ {ARM_EXT_V4T, 0xE000, 0xF800, "b.n\t%0-10B"},
+
+ /* The E800 .. FFFF range is unconditionally redirected to the
+ 32-bit table, because even in pre-V6T2 ISAs, BL and BLX(1) pairs
+ are processed via that table. Thus, we can never encounter a
+ bare "second half of BL/BLX(1)" instruction here. */
+ {ARM_EXT_V1, 0x0000, 0x0000, "undefined"},
+ {0, 0, 0, 0}
+};
+
+/* Thumb32 opcodes use the same table structure as the ARM opcodes.
+ We adopt the convention that hw1 is the high 16 bits of .value and
+ .mask, hw2 the low 16 bits.
+
+ print_insn_thumb32 recognizes the following format control codes:
+
+ %% %
+
+ %I print a 12-bit immediate from hw1[10],hw2[14:12,7:0]
+ %M print a modified 12-bit immediate (same location)
+ %J print a 16-bit immediate from hw1[3:0,10],hw2[14:12,7:0]
+ %K print a 16-bit immediate from hw2[3:0],hw1[3:0],hw2[11:4]
+ %S print a possibly-shifted Rm
+
+ %a print the address of a plain load/store
+ %w print the width and signedness of a core load/store
+ %m print register mask for ldm/stm
+
+ %E print the lsb and width fields of a bfc/bfi instruction
+ %F print the lsb and width fields of a sbfx/ubfx instruction
+ %b print a conditional branch offset
+ %B print an unconditional branch offset
+ %s print the shift field of an SSAT instruction
+ %R print the rotation field of an SXT instruction
+ %U print barrier type.
+ %P print address for pli instruction.
+
+ %<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"
+
+ With one exception at the bottom (done because BL and BLX(1) need
+ to come dead last), this table was machine-sorted first in
+ decreasing order of number of bits set in the mask, then in
+ increasing numeric order of mask, then in increasing numeric order
+ of opcode. This order is not the clearest for a human reader, but
+ is guaranteed never to catch a special-case bit pattern with a more
+ general mask, which is important, because this instruction encoding
+ makes heavy use of special-case bit patterns. */
+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"},
+
+ /* 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"},
+
+ /* 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"},
+
+ /* 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"},
+
+ /* Fallback. */
+ {ARM_EXT_V1, 0x00000000, 0x00000000, "undefined"},
+ {0, 0, 0, 0}
+};
+
+static const char *const arm_conditional[] =
{"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
- "hi", "ls", "ge", "lt", "gt", "le", "", "nv"};
+ "hi", "ls", "ge", "lt", "gt", "le", "", "<und>"};
+
+static const char *const arm_fp_const[] =
+{"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0"};
+
+static const char *const arm_shift[] =
+{"lsl", "lsr", "asr", "ror"};
typedef struct
{
- const char * name;
- const char * description;
- const char * reg_names[16];
+ const char *name;
+ const char *description;
+ const char *reg_names[16];
}
arm_regname;
-static arm_regname regnames[] =
+static const arm_regname regnames[] =
{
{ "raw" , "Select raw register names",
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}},
@@ -72,22 +1093,28 @@ static arm_regname regnames[] =
{ "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "IP", "SP", "LR", "PC" }},
{ "special-atpcs", "Select special register names used in the ATPCS",
{ "a1", "a2", "a3", "a4", "v1", "v2", "v3", "WR", "v5", "SB", "SL", "FP", "IP", "SP", "LR", "PC" }},
- { "iwmmxt_regnames", "Select register names used on the Intel Wireless MMX technology coprocessor",
- { "wr0", "wr1", "wr2", "wr3", "wr4", "wr5", "wr6", "wr7", "wr8", "wr9", "wr10", "wr11", "wr12", "wr13", "wr14", "wr15"}},
- { "iwmmxt_Cregnames", "Select control register names used on the Intel Wireless MMX technology coprocessor",
- {"wcid", "wcon", "wcssf", "wcasf", "reserved", "reserved", "reserved", "reserved", "wcgr0", "wcgr1", "wcgr2", "wcgr3", "reserved", "reserved", "reserved", "reserved"}}
};
-static char * iwmmxt_wwnames[] =
+static const char *const iwmmxt_wwnames[] =
{"b", "h", "w", "d"};
-static char * iwmmxt_wwssnames[] =
+static const char *const iwmmxt_wwssnames[] =
{"b", "bus", "b", "bss",
"h", "hus", "h", "hss",
"w", "wus", "w", "wss",
"d", "dus", "d", "dss"
};
+static const char *const iwmmxt_regnames[] =
+{ "wr0", "wr1", "wr2", "wr3", "wr4", "wr5", "wr6", "wr7",
+ "wr8", "wr9", "wr10", "wr11", "wr12", "wr13", "wr14", "wr15"
+};
+
+static const char *const iwmmxt_cregnames[] =
+{ "wcid", "wcon", "wcssf", "wcasf", "reserved", "reserved", "reserved", "reserved",
+ "wcgr0", "wcgr1", "wcgr2", "wcgr3", "reserved", "reserved", "reserved", "reserved"
+};
+
/* Default to GCC register name set. */
static unsigned int regname_selected = 1;
@@ -96,43 +1123,16 @@ static unsigned int regname_selected = 1;
static bfd_boolean force_thumb = FALSE;
-static char * arm_fp_const[] =
-{"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0"};
-
-static char * arm_shift[] =
-{"lsl", "lsr", "asr", "ror"};
-
-/* Forward declarations. */
-static void arm_decode_shift
- PARAMS ((long, fprintf_ftype, void *));
-static int print_insn_arm
- PARAMS ((bfd_vma, struct disassemble_info *, long));
-static int print_insn_thumb
- PARAMS ((bfd_vma, struct disassemble_info *, long));
-static void parse_disassembler_options
- PARAMS ((char *));
-static int print_insn
- PARAMS ((bfd_vma, struct disassemble_info *, bfd_boolean));
-static int set_iwmmxt_regnames
- PARAMS ((void));
-
-int get_arm_regname_num_options
- PARAMS ((void));
-int set_arm_regname_option
- PARAMS ((int));
-int get_arm_regnames
- PARAMS ((int, const char **, const char **, const char ***));
/* Functions. */
int
-get_arm_regname_num_options ()
+get_arm_regname_num_options (void)
{
return NUM_ARM_REGNAMES;
}
int
-set_arm_regname_option (option)
- int option;
+set_arm_regname_option (int option)
{
int old = regname_selected;
regname_selected = option;
@@ -140,11 +1140,8 @@ set_arm_regname_option (option)
}
int
-get_arm_regnames (option, setname, setdescription, register_names)
- int option;
- const char **setname;
- const char **setdescription;
- const char ***register_names;
+get_arm_regnames (int option, const char **setname, const char **setdescription,
+ const char *const **register_names)
{
*setname = regnames[option].name;
*setdescription = regnames[option].description;
@@ -153,10 +1150,7 @@ get_arm_regnames (option, setname, setdescription, register_names)
}
static void
-arm_decode_shift (given, func, stream)
- long given;
- fprintf_ftype func;
- void * stream;
+arm_decode_shift (long given, fprintf_ftype func, void *stream)
{
func (stream, "%s", arm_regnames[given & 0xf]);
@@ -186,48 +1180,47 @@ arm_decode_shift (given, func, stream)
}
}
-static int
-set_iwmmxt_regnames ()
-{
- const char * setname;
- const char * setdesc;
- const char ** regnames;
- int iwmmxt_regnames = 0;
- int num_regnames = get_arm_regname_num_options ();
-
- get_arm_regnames (iwmmxt_regnames, &setname,
- &setdesc, &regnames);
- while ((strcmp ("iwmmxt_regnames", setname))
- && (iwmmxt_regnames < num_regnames))
- get_arm_regnames (++iwmmxt_regnames, &setname, &setdesc, &regnames);
-
- return iwmmxt_regnames;
-}
-
-/* Print one instruction from PC on INFO->STREAM.
- Return the size of the instruction (always 4 on ARM). */
+/* Print one coprocessor instruction on INFO->STREAM.
+ Return TRUE if the instuction matched, FALSE if this is not a
+ recognised coprocessor instruction. */
-static int
-print_insn_arm (pc, info, given)
- bfd_vma pc;
- struct disassemble_info *info;
- long given;
+static bfd_boolean
+print_insn_coprocessor (struct disassemble_info *info, long given,
+ bfd_boolean thumb)
{
- const struct arm_opcode *insn;
+ const struct opcode32 *insn;
void *stream = info->stream;
- fprintf_ftype func = info->fprintf_func;
- static int iwmmxt_regnames = 0;
+ fprintf_ftype func = info->fprintf_func;
+ unsigned long mask;
+ unsigned long value;
- for (insn = arm_opcodes; insn->assembler; insn++)
+ 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)
insn = insn + IWMMXT_INSN_COUNT;
- if ((given & insn->mask) == insn->value)
+ mask = insn->mask;
+ value = insn->value;
+ if (thumb)
{
- char * c;
+ /* The high 4 bits are 0xe for Arm conditional instructions, and
+ 0xe for arm unconditional instructions. The rest of the
+ encoding is the same. */
+ mask |= 0xf0000000;
+ value |= 0xe0000000;
+ }
+ else
+ {
+ /* Only match unconditional instuctions against unconditional
+ patterns. */
+ if ((given & 0xf0000000) == 0xf0000000)
+ mask |= 0xf0000000;
+ }
+ if ((given & mask) == value)
+ {
+ const char *c;
for (c = insn->assembler; *c; c++)
{
@@ -239,210 +1232,6 @@ print_insn_arm (pc, info, given)
func (stream, "%%");
break;
- case 'a':
- if (((given & 0x000f0000) == 0x000f0000)
- && ((given & 0x02000000) == 0))
- {
- int offset = given & 0xfff;
-
- func (stream, "[pc");
-
- if (given & 0x01000000)
- {
- if ((given & 0x00800000) == 0)
- offset = - offset;
-
- /* Pre-indexed. */
- func (stream, ", #%d]", offset);
-
- offset += pc + 8;
-
- /* Cope with the possibility of write-back
- being used. Probably a very dangerous thing
- for the programmer to do, but who are we to
- argue ? */
- if (given & 0x00200000)
- func (stream, "!");
- }
- else
- {
- /* Post indexed. */
- func (stream, "], #%d", offset);
-
- /* ie ignore the offset. */
- offset = pc + 8;
- }
-
- func (stream, "\t; ");
- info->print_address_func (offset, info);
- }
- else
- {
- func (stream, "[%s",
- arm_regnames[(given >> 16) & 0xf]);
- if ((given & 0x01000000) != 0)
- {
- if ((given & 0x02000000) == 0)
- {
- int offset = given & 0xfff;
- if (offset)
- func (stream, ", #%s%d",
- (((given & 0x00800000) == 0)
- ? "-" : ""), offset);
- }
- else
- {
- func (stream, ", %s",
- (((given & 0x00800000) == 0)
- ? "-" : ""));
- arm_decode_shift (given, func, stream);
- }
-
- func (stream, "]%s",
- ((given & 0x00200000) != 0) ? "!" : "");
- }
- else
- {
- if ((given & 0x02000000) == 0)
- {
- int offset = given & 0xfff;
- if (offset)
- func (stream, "], #%s%d",
- (((given & 0x00800000) == 0)
- ? "-" : ""), offset);
- else
- func (stream, "]");
- }
- else
- {
- func (stream, "], %s",
- (((given & 0x00800000) == 0)
- ? "-" : ""));
- arm_decode_shift (given, func, stream);
- }
- }
- }
- break;
-
- case 's':
- if ((given & 0x004f0000) == 0x004f0000)
- {
- /* PC relative with immediate offset. */
- int offset = ((given & 0xf00) >> 4) | (given & 0xf);
-
- if ((given & 0x00800000) == 0)
- offset = -offset;
-
- func (stream, "[pc, #%d]\t; ", offset);
-
- (*info->print_address_func)
- (offset + pc + 8, info);
- }
- else
- {
- func (stream, "[%s",
- arm_regnames[(given >> 16) & 0xf]);
- if ((given & 0x01000000) != 0)
- {
- /* Pre-indexed. */
- if ((given & 0x00400000) == 0x00400000)
- {
- /* Immediate. */
- int offset = ((given & 0xf00) >> 4) | (given & 0xf);
- if (offset)
- func (stream, ", #%s%d",
- (((given & 0x00800000) == 0)
- ? "-" : ""), offset);
- }
- else
- {
- /* Register. */
- func (stream, ", %s%s",
- (((given & 0x00800000) == 0)
- ? "-" : ""),
- arm_regnames[given & 0xf]);
- }
-
- func (stream, "]%s",
- ((given & 0x00200000) != 0) ? "!" : "");
- }
- else
- {
- /* Post-indexed. */
- if ((given & 0x00400000) == 0x00400000)
- {
- /* Immediate. */
- int offset = ((given & 0xf00) >> 4) | (given & 0xf);
- if (offset)
- func (stream, "], #%s%d",
- (((given & 0x00800000) == 0)
- ? "-" : ""), offset);
- else
- func (stream, "]");
- }
- else
- {
- /* Register. */
- func (stream, "], %s%s",
- (((given & 0x00800000) == 0)
- ? "-" : ""),
- arm_regnames[given & 0xf]);
- }
- }
- }
- break;
-
- case 'b':
- (*info->print_address_func)
- (BDISP (given) * 4 + pc + 8, info);
- break;
-
- case 'c':
- func (stream, "%s",
- arm_conditional [(given >> 28) & 0xf]);
- break;
-
- case 'm':
- {
- int started = 0;
- int reg;
-
- func (stream, "{");
- for (reg = 0; reg < 16; reg++)
- if ((given & (1 << reg)) != 0)
- {
- if (started)
- func (stream, ", ");
- started = 1;
- func (stream, "%s", arm_regnames[reg]);
- }
- func (stream, "}");
- }
- break;
-
- case 'o':
- if ((given & 0x02000000) != 0)
- {
- int rotate = (given & 0xf00) >> 7;
- int immed = (given & 0xff);
- immed = (((immed << (32 - rotate))
- | (immed >> rotate)) & 0xffffffff);
- func (stream, "#%d\t; 0x%x", immed, immed);
- }
- else
- arm_decode_shift (given, func, stream);
- break;
-
- case 'p':
- if ((given & 0x0000f000) == 0x0000f000)
- func (stream, "p");
- break;
-
- case 't':
- if ((given & 0x01200000) == 0x00200000)
- func (stream, "t");
- break;
-
case 'A':
func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
@@ -476,27 +1265,9 @@ print_insn_arm (pc, info, given)
}
break;
- case 'B':
- /* Print ARM V5 BLX(1) address: pc+25 bits. */
- {
- bfd_vma address;
- bfd_vma offset = 0;
-
- if (given & 0x00800000)
- /* Is signed, hi bits should be ones. */
- offset = (-1) ^ 0x00ffffff;
-
- /* Offset is (SignExtend(offset field)<<2). */
- offset += given & 0x00ffffff;
- offset <<= 2;
- address = offset + pc + 8;
-
- if (given & 0x01000000)
- /* H bit allows addressing to 2-byte boundaries. */
- address += 2;
-
- info->print_address_func (address, info);
- }
+ case 'c':
+ func (stream, "%s",
+ arm_conditional [(given >> 28) & 0xf]);
break;
case 'I':
@@ -518,18 +1289,6 @@ print_insn_arm (pc, info, given)
break;
- case 'C':
- func (stream, "_");
- if (given & 0x80000)
- func (stream, "f");
- if (given & 0x40000)
- func (stream, "s");
- if (given & 0x20000)
- func (stream, "x");
- if (given & 0x10000)
- func (stream, "c");
- break;
-
case 'F':
switch (given & 0x00408000)
{
@@ -636,44 +1395,7 @@ print_insn_arm (pc, info, given)
reg = given >> bitstart;
reg &= (2 << (bitend - bitstart)) - 1;
- func (stream, "%d", reg);
- }
- break;
- case 'W':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "%d", reg + 1);
- }
- break;
- case 'x':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "0x%08x", reg);
-
- /* Some SWI instructions have special
- meanings. */
- if ((given & 0x0fffffff) == 0x0FF00000)
- func (stream, "\t; IMB");
- else if ((given & 0x0fffffff) == 0x0FF00001)
- func (stream, "\t; IMBRange");
- }
- break;
- case 'X':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "%01x", reg & 0xf);
+ func (stream, "%ld", reg);
}
break;
case 'f':
@@ -687,7 +1409,7 @@ print_insn_arm (pc, info, given)
func (stream, "#%s",
arm_fp_const[reg & 7]);
else
- func (stream, "f%d", reg);
+ func (stream, "f%ld", reg);
}
break;
@@ -716,34 +1438,18 @@ print_insn_arm (pc, info, given)
case 'g':
{
long reg;
- int current_regnames;
-
- if (! iwmmxt_regnames)
- iwmmxt_regnames = set_iwmmxt_regnames ();
- current_regnames = set_arm_regname_option
- (iwmmxt_regnames);
-
reg = given >> bitstart;
reg &= (2 << (bitend - bitstart)) - 1;
- func (stream, "%s", arm_regnames[reg]);
- set_arm_regname_option (current_regnames);
+ func (stream, "%s", iwmmxt_regnames[reg]);
}
break;
case 'G':
{
long reg;
- int current_regnames;
-
- if (! iwmmxt_regnames)
- iwmmxt_regnames = set_iwmmxt_regnames ();
- current_regnames = set_arm_regname_option
- (iwmmxt_regnames + 1);
-
reg = given >> bitstart;
reg &= (2 << (bitend - bitstart)) - 1;
- func (stream, "%s", arm_regnames[reg]);
- set_arm_regname_option (current_regnames);
+ func (stream, "%s", iwmmxt_cregnames[reg]);
}
break;
@@ -830,6 +1536,8 @@ print_insn_arm (pc, info, given)
break;
}
+ break;
+
case '`':
c++;
if ((given & (1 << bitstart)) == 0)
@@ -908,248 +1616,1204 @@ print_insn_arm (pc, info, given)
else
func (stream, "%c", *c);
}
- return 4;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static void
+print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
+{
+ void *stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ if (((given & 0x000f0000) == 0x000f0000)
+ && ((given & 0x02000000) == 0))
+ {
+ int offset = given & 0xfff;
+
+ func (stream, "[pc");
+
+ if (given & 0x01000000)
+ {
+ if ((given & 0x00800000) == 0)
+ offset = - offset;
+
+ /* Pre-indexed. */
+ func (stream, ", #%d]", offset);
+
+ offset += pc + 8;
+
+ /* Cope with the possibility of write-back
+ being used. Probably a very dangerous thing
+ for the programmer to do, but who are we to
+ argue ? */
+ if (given & 0x00200000)
+ func (stream, "!");
+ }
+ else
+ {
+ /* Post indexed. */
+ func (stream, "], #%d", offset);
+
+ /* ie ignore the offset. */
+ offset = pc + 8;
+ }
+
+ func (stream, "\t; ");
+ info->print_address_func (offset, info);
+ }
+ else
+ {
+ func (stream, "[%s",
+ arm_regnames[(given >> 16) & 0xf]);
+ if ((given & 0x01000000) != 0)
+ {
+ if ((given & 0x02000000) == 0)
+ {
+ int offset = given & 0xfff;
+ if (offset)
+ func (stream, ", #%s%d",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""), offset);
+ }
+ else
+ {
+ func (stream, ", %s",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""));
+ arm_decode_shift (given, func, stream);
+ }
+
+ func (stream, "]%s",
+ ((given & 0x00200000) != 0) ? "!" : "");
+ }
+ else
+ {
+ if ((given & 0x02000000) == 0)
+ {
+ int offset = given & 0xfff;
+ if (offset)
+ func (stream, "], #%s%d",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""), offset);
+ else
+ func (stream, "]");
+ }
+ else
+ {
+ func (stream, "], %s",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""));
+ arm_decode_shift (given, func, stream);
+ }
+ }
+ }
+}
+
+/* Print one ARM instruction from PC on INFO->STREAM. */
+
+static void
+print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
+{
+ const struct opcode32 *insn;
+ void *stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ if (print_insn_coprocessor (info, given, FALSE))
+ return;
+
+ for (insn = arm_opcodes; insn->assembler; insn++)
+ {
+ if (insn->value == FIRST_IWMMXT_INSN
+ && info->mach != bfd_mach_arm_XScale
+ && info->mach != bfd_mach_arm_iWMMXt)
+ insn = insn + IWMMXT_INSN_COUNT;
+
+ if ((given & insn->mask) == insn->value
+ /* Special case: an instruction with all bits set in the condition field
+ (0xFnnn_nnnn) is only matched if all those bits are set in insn->mask,
+ or by the catchall at the end of the table. */
+ && ((given & 0xF0000000) != 0xF0000000
+ || (insn->mask & 0xF0000000) == 0xF0000000
+ || (insn->mask == 0 && insn->value == 0)))
+ {
+ const char *c;
+
+ for (c = insn->assembler; *c; c++)
+ {
+ if (*c == '%')
+ {
+ switch (*++c)
+ {
+ case '%':
+ func (stream, "%%");
+ break;
+
+ case 'a':
+ print_arm_address (pc, info, given);
+ break;
+
+ case 'P':
+ /* Set P address bit and use normal address
+ printing routine. */
+ print_arm_address (pc, info, given | (1 << 24));
+ break;
+
+ case 's':
+ if ((given & 0x004f0000) == 0x004f0000)
+ {
+ /* PC relative with immediate offset. */
+ int offset = ((given & 0xf00) >> 4) | (given & 0xf);
+
+ if ((given & 0x00800000) == 0)
+ offset = -offset;
+
+ func (stream, "[pc, #%d]\t; ", offset);
+ info->print_address_func (offset + pc + 8, info);
+ }
+ else
+ {
+ func (stream, "[%s",
+ arm_regnames[(given >> 16) & 0xf]);
+ if ((given & 0x01000000) != 0)
+ {
+ /* Pre-indexed. */
+ if ((given & 0x00400000) == 0x00400000)
+ {
+ /* Immediate. */
+ int offset = ((given & 0xf00) >> 4) | (given & 0xf);
+ if (offset)
+ func (stream, ", #%s%d",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""), offset);
+ }
+ else
+ {
+ /* Register. */
+ func (stream, ", %s%s",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""),
+ arm_regnames[given & 0xf]);
+ }
+
+ func (stream, "]%s",
+ ((given & 0x00200000) != 0) ? "!" : "");
+ }
+ else
+ {
+ /* Post-indexed. */
+ if ((given & 0x00400000) == 0x00400000)
+ {
+ /* Immediate. */
+ int offset = ((given & 0xf00) >> 4) | (given & 0xf);
+ if (offset)
+ func (stream, "], #%s%d",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""), offset);
+ else
+ func (stream, "]");
+ }
+ else
+ {
+ /* Register. */
+ func (stream, "], %s%s",
+ (((given & 0x00800000) == 0)
+ ? "-" : ""),
+ arm_regnames[given & 0xf]);
+ }
+ }
+ }
+ break;
+
+ case 'b':
+ {
+ int disp = (((given & 0xffffff) ^ 0x800000) - 0x800000);
+ info->print_address_func (disp*4 + pc + 8, info);
+ }
+ break;
+
+ case 'c':
+ func (stream, "%s",
+ arm_conditional [(given >> 28) & 0xf]);
+ break;
+
+ case 'm':
+ {
+ int started = 0;
+ int reg;
+
+ func (stream, "{");
+ for (reg = 0; reg < 16; reg++)
+ if ((given & (1 << reg)) != 0)
+ {
+ if (started)
+ func (stream, ", ");
+ started = 1;
+ func (stream, "%s", arm_regnames[reg]);
+ }
+ func (stream, "}");
+ }
+ break;
+
+ case 'o':
+ if ((given & 0x02000000) != 0)
+ {
+ int rotate = (given & 0xf00) >> 7;
+ int immed = (given & 0xff);
+ immed = (((immed << (32 - rotate))
+ | (immed >> rotate)) & 0xffffffff);
+ func (stream, "#%d\t; 0x%x", immed, immed);
+ }
+ else
+ arm_decode_shift (given, func, stream);
+ break;
+
+ case 'p':
+ if ((given & 0x0000f000) == 0x0000f000)
+ func (stream, "p");
+ break;
+
+ case 't':
+ if ((given & 0x01200000) == 0x00200000)
+ func (stream, "t");
+ break;
+
+ case 'A':
+ func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
+
+ if ((given & (1 << 24)) != 0)
+ {
+ int offset = given & 0xff;
+
+ if (offset)
+ func (stream, ", #%s%d]%s",
+ ((given & 0x00800000) == 0 ? "-" : ""),
+ offset * 4,
+ ((given & 0x00200000) != 0 ? "!" : ""));
+ else
+ func (stream, "]");
+ }
+ else
+ {
+ int offset = given & 0xff;
+
+ func (stream, "]");
+
+ if (given & (1 << 21))
+ {
+ if (offset)
+ func (stream, ", #%s%d",
+ ((given & 0x00800000) == 0 ? "-" : ""),
+ offset * 4);
+ }
+ else
+ func (stream, ", {%d}", offset);
+ }
+ break;
+
+ case 'B':
+ /* Print ARM V5 BLX(1) address: pc+25 bits. */
+ {
+ bfd_vma address;
+ bfd_vma offset = 0;
+
+ if (given & 0x00800000)
+ /* Is signed, hi bits should be ones. */
+ offset = (-1) ^ 0x00ffffff;
+
+ /* Offset is (SignExtend(offset field)<<2). */
+ offset += given & 0x00ffffff;
+ offset <<= 2;
+ address = offset + pc + 8;
+
+ if (given & 0x01000000)
+ /* H bit allows addressing to 2-byte boundaries. */
+ address += 2;
+
+ info->print_address_func (address, info);
+ }
+ break;
+
+ case 'C':
+ func (stream, "_");
+ if (given & 0x80000)
+ func (stream, "f");
+ if (given & 0x40000)
+ func (stream, "s");
+ if (given & 0x20000)
+ func (stream, "x");
+ if (given & 0x10000)
+ func (stream, "c");
+ break;
+
+ case 'U':
+ switch (given & 0xf)
+ {
+ case 0xf: func(stream, "sy"); break;
+ case 0x7: func(stream, "un"); break;
+ case 0xe: func(stream, "st"); break;
+ case 0x6: func(stream, "unst"); break;
+ default:
+ func(stream, "#%d", (int)given & 0xf);
+ break;
+ }
+ break;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ int bitstart = *c++ - '0';
+ int bitend = 0;
+ while (*c >= '0' && *c <= '9')
+ bitstart = (bitstart * 10) + *c++ - '0';
+
+ switch (*c)
+ {
+ case '-':
+ c++;
+
+ while (*c >= '0' && *c <= '9')
+ bitend = (bitend * 10) + *c++ - '0';
+
+ if (!bitend)
+ abort ();
+
+ switch (*c)
+ {
+ case 'r':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ func (stream, "%s", arm_regnames[reg]);
+ }
+ break;
+ case 'd':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ func (stream, "%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 ();
+ }
+ break;
+
+ case '`':
+ c++;
+ if ((given & (1 << bitstart)) == 0)
+ func (stream, "%c", *c);
+ break;
+ case '\'':
+ c++;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c);
+ break;
+ case '?':
+ ++c;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c++);
+ else
+ func (stream, "%c", *++c);
+ break;
+ default:
+ abort ();
+ }
+ break;
+
+ case 'e':
+ {
+ int imm;
+
+ imm = (given & 0xf) | ((given & 0xfff00) >> 4);
+ func (stream, "%d", imm);
+ }
+ break;
+
+ case 'E':
+ /* LSB and WIDTH fields of BFI or BFC. The machine-
+ language instruction encodes LSB and MSB. */
+ {
+ long msb = (given & 0x001f0000) >> 16;
+ long lsb = (given & 0x00000f80) >> 7;
+
+ long width = msb - lsb + 1;
+ if (width > 0)
+ func (stream, "#%lu, #%lu", lsb, width);
+ else
+ func (stream, "(invalid: %lu:%lu)", lsb, msb);
+ }
+ break;
+
+ case 'V':
+ /* 16-bit unsigned immediate from a MOVT or MOVW
+ instruction, encoded in bits 0:11 and 15:19. */
+ {
+ long hi = (given & 0x000f0000) >> 4;
+ long lo = (given & 0x00000fff);
+ long imm16 = hi | lo;
+ func (stream, "#%lu\t; 0x%lx", imm16, imm16);
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ }
+ else
+ func (stream, "%c", *c);
+ }
+ return;
}
}
abort ();
}
-/* Print one instruction from PC on INFO->STREAM.
- Return the size of the instruction. */
+/* Print one 16-bit Thumb instruction from PC on INFO->STREAM. */
-static int
-print_insn_thumb (pc, info, given)
- bfd_vma pc;
- struct disassemble_info *info;
- long given;
+static void
+print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
{
- const struct thumb_opcode *insn;
+ const struct opcode16 *insn;
void *stream = info->stream;
fprintf_ftype func = info->fprintf_func;
for (insn = thumb_opcodes; insn->assembler; insn++)
- {
- if ((given & insn->mask) == insn->value)
- {
- char * c = insn->assembler;
+ if ((given & insn->mask) == insn->value)
+ {
+ const char *c = insn->assembler;
+ for (; *c; c++)
+ {
+ int domaskpc = 0;
+ int domasklr = 0;
- /* Special processing for Thumb 2 instruction BL sequence: */
- if (!*c) /* Check for empty (not NULL) assembler string. */
- {
- long offset;
+ if (*c != '%')
+ {
+ func (stream, "%c", *c);
+ continue;
+ }
+
+ switch (*++c)
+ {
+ case '%':
+ func (stream, "%%");
+ break;
- info->bytes_per_chunk = 4;
- info->bytes_per_line = 4;
+ case 'S':
+ {
+ long reg;
- offset = BDISP23 (given);
- offset = offset * 2 + pc + 4;
+ reg = (given >> 3) & 0x7;
+ if (given & (1 << 6))
+ reg += 8;
- if ((given & 0x10000000) == 0)
+ func (stream, "%s", arm_regnames[reg]);
+ }
+ break;
+
+ case 'D':
{
- func (stream, "blx\t");
- offset &= 0xfffffffc;
+ long reg;
+
+ reg = given & 0x7;
+ if (given & (1 << 7))
+ reg += 8;
+
+ func (stream, "%s", arm_regnames[reg]);
}
- else
- func (stream, "bl\t");
-
- info->print_address_func (offset, info);
- return 4;
- }
- else
- {
- info->bytes_per_chunk = 2;
- info->bytes_per_line = 4;
-
- given &= 0xffff;
-
- for (; *c; c++)
- {
- if (*c == '%')
- {
- int domaskpc = 0;
- int domasklr = 0;
-
- switch (*++c)
- {
- case '%':
- func (stream, "%%");
- break;
-
- case 'S':
- {
- long reg;
-
- reg = (given >> 3) & 0x7;
- if (given & (1 << 6))
- reg += 8;
-
- func (stream, "%s", arm_regnames[reg]);
- }
- break;
-
- case 'D':
- {
- long reg;
-
- reg = given & 0x7;
- if (given & (1 << 7))
- reg += 8;
-
- func (stream, "%s", arm_regnames[reg]);
- }
- break;
-
- case 'T':
- func (stream, "%s",
- arm_conditional [(given >> 8) & 0xf]);
- break;
-
- case 'N':
- if (given & (1 << 8))
- domasklr = 1;
- /* Fall through. */
- case 'O':
- if (*c == 'O' && (given & (1 << 8)))
- domaskpc = 1;
- /* Fall through. */
- case 'M':
- {
- int started = 0;
- int reg;
-
- func (stream, "{");
-
- /* It would be nice if we could spot
- ranges, and generate the rS-rE format: */
- for (reg = 0; (reg < 8); reg++)
- if ((given & (1 << reg)) != 0)
- {
- if (started)
- func (stream, ", ");
- started = 1;
- func (stream, "%s", arm_regnames[reg]);
- }
-
- if (domasklr)
- {
- if (started)
- func (stream, ", ");
- started = 1;
- func (stream, arm_regnames[14] /* "lr" */);
- }
-
- if (domaskpc)
- {
- if (started)
- func (stream, ", ");
- func (stream, arm_regnames[15] /* "pc" */);
- }
-
- func (stream, "}");
- }
- break;
-
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- {
- int bitstart = *c++ - '0';
- int bitend = 0;
-
- while (*c >= '0' && *c <= '9')
- bitstart = (bitstart * 10) + *c++ - '0';
-
- switch (*c)
- {
- case '-':
- {
- long reg;
-
- c++;
- while (*c >= '0' && *c <= '9')
- bitend = (bitend * 10) + *c++ - '0';
- if (!bitend)
- abort ();
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
- switch (*c)
- {
- case 'r':
- func (stream, "%s", arm_regnames[reg]);
- break;
-
- case 'd':
- func (stream, "%d", reg);
- break;
-
- case 'H':
- func (stream, "%d", reg << 1);
- break;
-
- case 'W':
- func (stream, "%d", reg << 2);
- break;
-
- case 'a':
- /* PC-relative address -- the bottom two
- bits of the address are dropped
- before the calculation. */
- info->print_address_func
- (((pc + 4) & ~3) + (reg << 2), info);
- break;
-
- case 'x':
- func (stream, "0x%04x", reg);
- break;
-
- case 'I':
- reg = ((reg ^ (1 << bitend)) - (1 << bitend));
- func (stream, "%d", reg);
- break;
-
- case 'B':
- reg = ((reg ^ (1 << bitend)) - (1 << bitend));
- (*info->print_address_func)
- (reg * 2 + pc + 4, info);
- break;
-
- default:
- abort ();
- }
- }
- break;
-
- case '\'':
- c++;
- if ((given & (1 << bitstart)) != 0)
- func (stream, "%c", *c);
- break;
-
- case '?':
- ++c;
- if ((given & (1 << bitstart)) != 0)
- func (stream, "%c", *c++);
- else
- func (stream, "%c", *++c);
- break;
-
- default:
- abort ();
- }
- }
- break;
-
- default:
- abort ();
- }
- }
- else
- func (stream, "%c", *c);
- }
- }
- return 2;
- }
+ break;
+
+ case 'N':
+ if (given & (1 << 8))
+ domasklr = 1;
+ /* Fall through. */
+ case 'O':
+ if (*c == 'O' && (given & (1 << 8)))
+ domaskpc = 1;
+ /* Fall through. */
+ case 'M':
+ {
+ int started = 0;
+ int reg;
+
+ func (stream, "{");
+
+ /* It would be nice if we could spot
+ ranges, and generate the rS-rE format: */
+ for (reg = 0; (reg < 8); reg++)
+ if ((given & (1 << reg)) != 0)
+ {
+ if (started)
+ func (stream, ", ");
+ started = 1;
+ func (stream, "%s", arm_regnames[reg]);
+ }
+
+ if (domasklr)
+ {
+ if (started)
+ func (stream, ", ");
+ started = 1;
+ func (stream, arm_regnames[14] /* "lr" */);
+ }
+
+ if (domaskpc)
+ {
+ if (started)
+ func (stream, ", ");
+ func (stream, arm_regnames[15] /* "pc" */);
+ }
+
+ func (stream, "}");
+ }
+ break;
+
+ case 'b':
+ /* Print ARM V6T2 CZB address: pc+4+6 bits. */
+ {
+ bfd_vma address = (pc + 4
+ + ((given & 0x00f8) >> 2)
+ + ((given & 0x0200) >> 3));
+ info->print_address_func (address, info);
+ }
+ break;
+
+ case 's':
+ /* Right shift immediate -- bits 6..10; 1-31 print
+ as themselves, 0 prints as 32. */
+ {
+ long imm = (given & 0x07c0) >> 6;
+ if (imm == 0)
+ imm = 32;
+ func (stream, "#%ld", imm);
+ }
+ break;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ int bitstart = *c++ - '0';
+ int bitend = 0;
+
+ while (*c >= '0' && *c <= '9')
+ bitstart = (bitstart * 10) + *c++ - '0';
+
+ switch (*c)
+ {
+ case '-':
+ {
+ long reg;
+
+ c++;
+ while (*c >= '0' && *c <= '9')
+ bitend = (bitend * 10) + *c++ - '0';
+ if (!bitend)
+ abort ();
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+ switch (*c)
+ {
+ case 'r':
+ func (stream, "%s", arm_regnames[reg]);
+ break;
+
+ case 'd':
+ func (stream, "%ld", reg);
+ break;
+
+ case 'H':
+ func (stream, "%ld", reg << 1);
+ break;
+
+ case 'W':
+ func (stream, "%ld", reg << 2);
+ break;
+
+ case 'a':
+ /* PC-relative address -- the bottom two
+ bits of the address are dropped
+ before the calculation. */
+ info->print_address_func
+ (((pc + 4) & ~3) + (reg << 2), info);
+ break;
+
+ case 'x':
+ func (stream, "0x%04lx", reg);
+ break;
+
+ case 'B':
+ reg = ((reg ^ (1 << bitend)) - (1 << bitend));
+ info->print_address_func (reg * 2 + pc + 4, info);
+ 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]);
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ break;
+
+ case '\'':
+ c++;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c);
+ break;
+
+ case '?':
+ ++c;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c++);
+ else
+ func (stream, "%c", *++c);
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ return;
+ }
+
+ /* No match. */
+ abort ();
+}
+
+/* Return the name of an V7M special register. */
+static const char *
+psr_name (int regno)
+{
+ switch (regno)
+ {
+ case 0: return "APSR";
+ case 1: return "IAPSR";
+ case 2: return "EAPSR";
+ case 3: return "PSR";
+ case 5: return "IPSR";
+ case 6: return "EPSR";
+ case 7: return "IEPSR";
+ case 8: return "MSP";
+ case 9: return "PSP";
+ case 16: return "PRIMASK";
+ case 17: return "BASEPRI";
+ case 18: return "BASEPRI_MASK";
+ case 19: return "FAULTMASK";
+ case 20: return "CONTROL";
+ default: return "<unknown>";
}
+}
+
+/* Print one 32-bit Thumb instruction from PC on INFO->STREAM. */
+
+static void
+print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
+{
+ const struct opcode32 *insn;
+ void *stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ if (print_insn_coprocessor (info, given, TRUE))
+ return;
+
+ for (insn = thumb32_opcodes; insn->assembler; insn++)
+ if ((given & insn->mask) == insn->value)
+ {
+ const char *c = insn->assembler;
+ for (; *c; c++)
+ {
+ if (*c != '%')
+ {
+ func (stream, "%c", *c);
+ continue;
+ }
+
+ switch (*++c)
+ {
+ case '%':
+ func (stream, "%%");
+ break;
+
+ case 'I':
+ {
+ unsigned int imm12 = 0;
+ imm12 |= (given & 0x000000ffu);
+ imm12 |= (given & 0x00007000u) >> 4;
+ imm12 |= (given & 0x04000000u) >> 15;
+ func (stream, "#%u\t; 0x%x", imm12, imm12);
+ }
+ break;
+
+ case 'M':
+ {
+ unsigned int bits = 0, imm, imm8, mod;
+ bits |= (given & 0x000000ffu);
+ bits |= (given & 0x00007000u) >> 4;
+ bits |= (given & 0x04000000u) >> 15;
+ imm8 = (bits & 0x0ff);
+ mod = (bits & 0xf00) >> 8;
+ switch (mod)
+ {
+ case 0: imm = imm8; break;
+ case 1: imm = ((imm8<<16) | imm8); break;
+ case 2: imm = ((imm8<<24) | (imm8 << 8)); break;
+ case 3: imm = ((imm8<<24) | (imm8 << 16) | (imm8 << 8) | imm8); break;
+ default:
+ mod = (bits & 0xf80) >> 7;
+ imm8 = (bits & 0x07f) | 0x80;
+ imm = (((imm8 << (32 - mod)) | (imm8 >> mod)) & 0xffffffff);
+ }
+ func (stream, "#%u\t; 0x%x", imm, imm);
+ }
+ break;
+
+ case 'J':
+ {
+ unsigned int imm = 0;
+ imm |= (given & 0x000000ffu);
+ imm |= (given & 0x00007000u) >> 4;
+ imm |= (given & 0x04000000u) >> 15;
+ imm |= (given & 0x000f0000u) >> 4;
+ func (stream, "#%u\t; 0x%x", imm, imm);
+ }
+ break;
+
+ case 'K':
+ {
+ unsigned int imm = 0;
+ imm |= (given & 0x000f0000u) >> 16;
+ imm |= (given & 0x00000ff0u) >> 0;
+ imm |= (given & 0x0000000fu) << 12;
+ func (stream, "#%u\t; 0x%x", imm, imm);
+ }
+ break;
+
+ case 'S':
+ {
+ unsigned int reg = (given & 0x0000000fu);
+ unsigned int stp = (given & 0x00000030u) >> 4;
+ unsigned int imm = 0;
+ imm |= (given & 0x000000c0u) >> 6;
+ imm |= (given & 0x00007000u) >> 10;
+
+ func (stream, "%s", arm_regnames[reg]);
+ switch (stp)
+ {
+ case 0:
+ if (imm > 0)
+ func (stream, ", lsl #%u", imm);
+ break;
+
+ case 1:
+ if (imm == 0)
+ imm = 32;
+ func (stream, ", lsr #%u", imm);
+ break;
+
+ case 2:
+ if (imm == 0)
+ imm = 32;
+ func (stream, ", asr #%u", imm);
+ break;
+
+ case 3:
+ if (imm == 0)
+ func (stream, ", rrx");
+ else
+ func (stream, ", ror #%u", imm);
+ }
+ }
+ break;
+
+ case 'a':
+ {
+ unsigned int Rn = (given & 0x000f0000) >> 16;
+ unsigned int U = (given & 0x00800000) >> 23;
+ unsigned int op = (given & 0x00000f00) >> 8;
+ unsigned int i12 = (given & 0x00000fff);
+ unsigned int i8 = (given & 0x000000ff);
+ bfd_boolean writeback = FALSE, postind = FALSE;
+ int offset = 0;
+
+ func (stream, "[%s", arm_regnames[Rn]);
+ if (U) /* 12-bit positive immediate offset */
+ offset = i12;
+ else if (Rn == 15) /* 12-bit negative immediate offset */
+ offset = -(int)i12;
+ else if (op == 0x0) /* shifted register offset */
+ {
+ unsigned int Rm = (i8 & 0x0f);
+ unsigned int sh = (i8 & 0x30) >> 4;
+ func (stream, ", %s", arm_regnames[Rm]);
+ if (sh)
+ func (stream, ", lsl #%u", sh);
+ func (stream, "]");
+ break;
+ }
+ else switch (op)
+ {
+ case 0xE: /* 8-bit positive immediate offset */
+ offset = i8;
+ break;
+
+ case 0xC: /* 8-bit negative immediate offset */
+ offset = -i8;
+ break;
+
+ case 0xF: /* 8-bit + preindex with wb */
+ offset = i8;
+ writeback = TRUE;
+ break;
+
+ case 0xD: /* 8-bit - preindex with wb */
+ offset = -i8;
+ writeback = TRUE;
+ break;
+
+ case 0xB: /* 8-bit + postindex */
+ offset = i8;
+ postind = TRUE;
+ break;
+
+ case 0x9: /* 8-bit - postindex */
+ offset = -i8;
+ postind = TRUE;
+ break;
+
+ default:
+ func (stream, ", <undefined>]");
+ goto skip;
+ }
+
+ if (postind)
+ func (stream, "], #%d", offset);
+ else
+ {
+ if (offset)
+ func (stream, ", #%d", offset);
+ func (stream, writeback ? "]!" : "]");
+ }
+
+ if (Rn == 15)
+ {
+ func (stream, "\t; ");
+ info->print_address_func (((pc + 4) & ~3) + offset, info);
+ }
+ }
+ skip:
+ break;
+
+ case 'A':
+ {
+ unsigned int P = (given & 0x01000000) >> 24;
+ unsigned int U = (given & 0x00800000) >> 23;
+ unsigned int W = (given & 0x00400000) >> 21;
+ unsigned int Rn = (given & 0x000f0000) >> 16;
+ unsigned int off = (given & 0x000000ff);
+
+ func (stream, "[%s", arm_regnames[Rn]);
+ if (P)
+ {
+ if (off || !U)
+ func (stream, ", #%c%u", U ? '+' : '-', off * 4);
+ func (stream, "]");
+ if (W)
+ func (stream, "!");
+ }
+ else
+ {
+ func (stream, "], ");
+ if (W)
+ func (stream, "#%c%u", U ? '+' : '-', off * 4);
+ else
+ func (stream, "{%u}", off);
+ }
+ }
+ break;
+
+ case 'w':
+ {
+ unsigned int Sbit = (given & 0x01000000) >> 24;
+ unsigned int type = (given & 0x00600000) >> 21;
+ switch (type)
+ {
+ case 0: func (stream, Sbit ? "sb" : "b"); break;
+ case 1: func (stream, Sbit ? "sh" : "h"); break;
+ case 2:
+ if (Sbit)
+ func (stream, "??");
+ break;
+ case 3:
+ func (stream, "??");
+ break;
+ }
+ }
+ break;
+
+ case 'm':
+ {
+ int started = 0;
+ int reg;
+
+ func (stream, "{");
+ for (reg = 0; reg < 16; reg++)
+ if ((given & (1 << reg)) != 0)
+ {
+ if (started)
+ func (stream, ", ");
+ started = 1;
+ func (stream, "%s", arm_regnames[reg]);
+ }
+ func (stream, "}");
+ }
+ break;
+
+ case 'E':
+ {
+ unsigned int msb = (given & 0x0000001f);
+ unsigned int lsb = 0;
+ lsb |= (given & 0x000000c0u) >> 6;
+ lsb |= (given & 0x00007000u) >> 10;
+ func (stream, "#%u, #%u", lsb, msb - lsb + 1);
+ }
+ break;
+
+ case 'F':
+ {
+ unsigned int width = (given & 0x0000001f) + 1;
+ unsigned int lsb = 0;
+ lsb |= (given & 0x000000c0u) >> 6;
+ lsb |= (given & 0x00007000u) >> 10;
+ func (stream, "#%u, #%u", lsb, width);
+ }
+ break;
+
+ case 'b':
+ {
+ unsigned int S = (given & 0x04000000u) >> 26;
+ unsigned int J1 = (given & 0x00002000u) >> 13;
+ unsigned int J2 = (given & 0x00000800u) >> 11;
+ int offset = 0;
+
+ offset |= !S << 20;
+ offset |= J2 << 19;
+ offset |= J1 << 18;
+ offset |= (given & 0x003f0000) >> 4;
+ offset |= (given & 0x000007ff) << 1;
+ offset -= (1 << 20);
+
+ info->print_address_func (pc + 4 + offset, info);
+ }
+ break;
+
+ case 'B':
+ {
+ unsigned int S = (given & 0x04000000u) >> 26;
+ unsigned int I1 = (given & 0x00002000u) >> 13;
+ unsigned int I2 = (given & 0x00000800u) >> 11;
+ int offset = 0;
+
+ offset |= !S << 24;
+ offset |= !(I1 ^ S) << 23;
+ offset |= !(I2 ^ S) << 22;
+ offset |= (given & 0x03ff0000u) >> 4;
+ offset |= (given & 0x000007ffu) << 1;
+ offset -= (1 << 24);
+ offset += pc + 4;
+
+ /* BLX target addresses are always word aligned. */
+ if ((given & 0x00001000u) == 0)
+ offset &= ~2u;
+
+ info->print_address_func (offset, info);
+ }
+ break;
+
+ case 's':
+ {
+ unsigned int shift = 0;
+ shift |= (given & 0x000000c0u) >> 6;
+ shift |= (given & 0x00007000u) >> 10;
+ if (given & 0x00200000u)
+ func (stream, ", asr #%u", shift);
+ else if (shift)
+ func (stream, ", lsl #%u", shift);
+ /* else print nothing - lsl #0 */
+ }
+ break;
+
+ case 'R':
+ {
+ unsigned int rot = (given & 0x00000030) >> 4;
+ if (rot)
+ func (stream, ", ror #%u", rot * 8);
+ }
+ break;
+
+ case 'U':
+ switch (given & 0xf)
+ {
+ case 0xf: func(stream, "sy"); break;
+ case 0x7: func(stream, "un"); break;
+ case 0xe: func(stream, "st"); break;
+ case 0x6: func(stream, "unst"); break;
+ default:
+ func(stream, "#%d", (int)given & 0xf);
+ break;
+ }
+ break;
+
+ case 'C':
+ if ((given & 0xff) == 0)
+ {
+ func (stream, "%cPSR_", (given & 0x100000) ? 'S' : 'C');
+ if (given & 0x800)
+ func (stream, "f");
+ if (given & 0x400)
+ func (stream, "s");
+ if (given & 0x200)
+ func (stream, "x");
+ if (given & 0x100)
+ func (stream, "c");
+ }
+ else
+ {
+ func (stream, psr_name (given & 0xff));
+ }
+ break;
+
+ case 'D':
+ if ((given & 0xff) == 0)
+ func (stream, "%cPSR", (given & 0x100000) ? 'S' : 'C');
+ else
+ func (stream, psr_name (given & 0xff));
+ 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;
+ 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;
+
+ switch (*c)
+ {
+ case 'd': func (stream, "%u", val); break;
+ case 'W': func (stream, "%u", 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]);
+ break;
+
+ case '\'':
+ if (val)
+ func (stream, "%c", c[1]);
+ c++;
+ break;
+
+ case '`':
+ if (!val)
+ func (stream, "%c", c[1]);
+ c++;
+ break;
+
+ case '?':
+ func (stream, "%c", val ? c[1] : c[2]);
+ c += 2;
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ return;
+ }
/* No match. */
abort ();
@@ -1175,8 +2839,7 @@ arm_symbol_is_valid (asymbol * sym,
/* Parse an individual disassembler option. */
void
-parse_arm_disassembler_option (option)
- char * option;
+parse_arm_disassembler_option (char *option)
{
if (option == NULL)
return;
@@ -1213,8 +2876,7 @@ parse_arm_disassembler_option (option)
or commas. (Whitespace separators supported for backwards compatibility). */
static void
-parse_disassembler_options (options)
- char * options;
+parse_disassembler_options (char *options)
{
if (options == NULL)
return;
@@ -1236,15 +2898,14 @@ parse_disassembler_options (options)
the relevant number of data bytes exist. */
static int
-print_insn (pc, info, little)
- bfd_vma pc;
- struct disassemble_info * info;
- bfd_boolean little;
+print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
{
- unsigned char b[4];
- long given;
- int status;
- int is_thumb;
+ unsigned char b[4];
+ long given;
+ int status;
+ int is_thumb;
+ int size;
+ void (*printer) (bfd_vma, struct disassemble_info *, long);
if (info->disassembler_options)
{
@@ -1281,61 +2942,64 @@ print_insn (pc, info, little)
}
}
- info->bytes_per_chunk = 4;
info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
+ info->bytes_per_line = 4;
- if (little)
+ if (!is_thumb)
{
- status = info->read_memory_func (pc, (bfd_byte *) &b[0], 4, info);
- if (status != 0 && is_thumb)
- {
- info->bytes_per_chunk = 2;
-
- status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
- b[3] = b[2] = 0;
- }
-
- if (status != 0)
- {
- info->memory_error_func (status, pc, info);
- return -1;
- }
-
- given = (b[0]) | (b[1] << 8) | (b[2] << 16) | (b[3] << 24);
+ /* In ARM mode endianness is a straightforward issue: the instruction
+ is four bytes long and is either ordered 0123 or 3210. */
+ printer = print_insn_arm;
+ info->bytes_per_chunk = 4;
+ size = 4;
+
+ status = info->read_memory_func (pc, (bfd_byte *)b, 4, info);
+ if (little)
+ given = (b[0]) | (b[1] << 8) | (b[2] << 16) | (b[3] << 24);
+ else
+ given = (b[3]) | (b[2] << 8) | (b[1] << 16) | (b[0] << 24);
}
else
{
- status = info->read_memory_func
- (pc & ~ 0x3, (bfd_byte *) &b[0], 4, info);
- if (status != 0)
- {
- info->memory_error_func (status, pc, info);
- return -1;
- }
+ /* In Thumb mode we have the additional wrinkle of two
+ instruction lengths. Fortunately, the bits that determine
+ the length of the current instruction are always to be found
+ in the first two bytes. */
+ printer = print_insn_thumb16;
+ info->bytes_per_chunk = 2;
+ size = 2;
+
+ status = info->read_memory_func (pc, (bfd_byte *)b, 2, info);
+ if (little)
+ given = (b[0]) | (b[1] << 8);
+ else
+ given = (b[1]) | (b[0] << 8);
- if (is_thumb)
+ if (!status)
{
- if (pc & 0x2)
+ /* These bit patterns signal a four-byte Thumb
+ instruction. */
+ if ((given & 0xF800) == 0xF800
+ || (given & 0xF800) == 0xF000
+ || (given & 0xF800) == 0xE800)
{
- given = (b[2] << 8) | b[3];
-
- status = info->read_memory_func
- ((pc + 4) & ~ 0x3, (bfd_byte *) b, 4, info);
- if (status != 0)
- {
- info->memory_error_func (status, pc + 4, info);
- return -1;
- }
+ status = info->read_memory_func (pc + 2, (bfd_byte *)b, 2, info);
+ if (little)
+ given = (b[0]) | (b[1] << 8) | (given << 16);
+ else
+ given = (b[1]) | (b[0] << 8) | (given << 16);
- given |= (b[0] << 24) | (b[1] << 16);
+ printer = print_insn_thumb32;
+ size = 4;
}
- else
- given = (b[0] << 8) | b[1] | (b[2] << 24) | (b[3] << 16);
}
- else
- given = (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | (b[3]);
}
+ if (status)
+ {
+ info->memory_error_func (status, pc, info);
+ return -1;
+ }
if (info->flags & INSN_HAS_RELOC)
/* If the instruction has a reloc associated with it, then
the offset field in the instruction will actually be the
@@ -1344,32 +3008,24 @@ print_insn (pc, info, little)
addresses, since the addend is not currently pc-relative. */
pc = 0;
- if (is_thumb)
- status = print_insn_thumb (pc, info, given);
- else
- status = print_insn_arm (pc, info, given);
-
- return status;
+ printer (pc, info, given);
+ return size;
}
int
-print_insn_big_arm (pc, info)
- bfd_vma pc;
- struct disassemble_info * info;
+print_insn_big_arm (bfd_vma pc, struct disassemble_info *info)
{
return print_insn (pc, info, FALSE);
}
int
-print_insn_little_arm (pc, info)
- bfd_vma pc;
- struct disassemble_info * info;
+print_insn_little_arm (bfd_vma pc, struct disassemble_info *info)
{
return print_insn (pc, info, TRUE);
}
void
-print_arm_disassembler_options (FILE * stream)
+print_arm_disassembler_options (FILE *stream)
{
int i;
diff --git a/contrib/binutils/opcodes/arm-opc.h b/contrib/binutils/opcodes/arm-opc.h
deleted file mode 100644
index 574bc1f7a82b..000000000000
--- a/contrib/binutils/opcodes/arm-opc.h
+++ /dev/null
@@ -1,717 +0,0 @@
-/* Opcode table for the ARM.
-
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2003
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-struct arm_opcode {
- unsigned long value, mask; /* recognise instruction if (op&mask)==value */
- char *assembler; /* how to disassemble this instruction */
-};
-
-struct thumb_opcode
-{
- unsigned short value, mask; /* recognise instruction if (op&mask)==value */
- char * assembler; /* how to disassemble this instruction */
-};
-
-/* format of the assembler string :
-
- %% %
- %<bitfield>d print the bitfield in decimal
- %<bitfield>x print the bitfield in hex
- %<bitfield>X print the bitfield as 1 hex digit without leading "0x"
- %<bitfield>w print the bitfield plus one in decimal
- %<bitfield>r print as an ARM register
- %<bitfield>f print a floating point constant if >7 else a
- floating point register
- %<code>y print a single precision VFP reg.
- Codes: 0=>Sm, 1=>Sd, 2=>Sn, 3=>multi-list, 4=>Sm pair
- %<code>z print a double precision VFP reg
- Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
- %c print condition code (always bits 28-31)
- %P print floating point precision in arithmetic insn
- %Q print floating point precision in ldf/stf insn
- %R print floating point rounding mode
- %<bitnum>'c print specified char iff bit is one
- %<bitnum>`c print specified char iff bit is zero
- %<bitnum>?ab print a if bit is one else print b
- %p print 'p' iff bits 12-15 are 15
- %t print 't' iff bit 21 set and bit 24 clear
- %o print operand2 (immediate or register + shift)
- %a print address for ldr/str instruction
- %s print address for ldr/str halfword/signextend instruction
- %b print branch destination
- %B print arm BLX(1) destination
- %A print address for ldc/stc/ldf/stf instruction
- %m print register mask for ldm/stm instruction
- %C print the PSR sub type.
- %F print the COUNT field of a LFM/SFM instruction.
-IWMMXT specific format options:
- %<bitfield>g print as an iWMMXt 64-bit register
- %<bitfield>G print as an iWMMXt general purpose or control register
- %<bitfield>w print as an iWMMXt width field - [bhwd]ss/us
- %Z print the Immediate of a WSHUFH instruction.
- %L print as an iWMMXt N/M width field.
- %l like 'A' except use byte offsets for 'B' & 'H' versions
-Thumb specific format options:
- %D print Thumb register (bits 0..2 as high number if bit 7 set)
- %S print Thumb register (bits 3..5 as high number if bit 6 set)
- %<bitfield>I print bitfield as a signed decimal
- (top bit of range being the sign bit)
- %M print Thumb register mask
- %N print Thumb register mask (with LR)
- %O print Thumb register mask (with PC)
- %T print Thumb condition code (always bits 8-11)
- %I print cirrus signed shift immediate: bits 0..3|4..6
- %<bitfield>B print Thumb branch destination (signed displacement)
- %<bitfield>W print (bitfield * 4) as a decimal
- %<bitfield>H print (bitfield * 2) as a decimal
- %<bitfield>a print (bitfield * 4) as a pc-rel offset + decoded symbol
-*/
-
-/* Note: There is a partial ordering in this table - it must be searched from
- the top to obtain a correct match. */
-
-static const struct arm_opcode arm_opcodes[] =
-{
- /* ARM instructions. */
- {0xe1a00000, 0xffffffff, "nop\t\t\t(mov r0,r0)"},
- {0x012FFF10, 0x0ffffff0, "bx%c\t%0-3r"},
- {0x00000090, 0x0fe000f0, "mul%c%20's\t%16-19r, %0-3r, %8-11r"},
- {0x00200090, 0x0fe000f0, "mla%c%20's\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0x01000090, 0x0fb00ff0, "swp%c%22'b\t%12-15r, %0-3r, [%16-19r]"},
- {0x00800090, 0x0fa000f0, "%22?sumull%c%20's\t%12-15r, %16-19r, %0-3r, %8-11r"},
- {0x00a00090, 0x0fa000f0, "%22?sumlal%c%20's\t%12-15r, %16-19r, %0-3r, %8-11r"},
-
- /* ARM V6 instructions. */
- {0xfc500000, 0xfff00000, "mrrc2\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
- {0xfc400000, 0xfff00000, "mcrr2\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
- {0xf1080000, 0xfffdfe3f, "cpsie\t%8'a%7'i%6'f"},
- {0xf1080000, 0xfffdfe20, "cpsie\t%8'a%7'i%6'f,#%0-4d"},
- {0xf10C0000, 0xfffdfe3f, "cpsid\t%8'a%7'i%6'f"},
- {0xf10C0000, 0xfffdfe20, "cpsid\t%8'a%7'i%6'f,#%0-4d"},
- {0xf1000000, 0xfff1fe20, "cps\t#%0-4d"},
- {0x06800010, 0x0ff00ff0, "pkhbt%c\t%12-15r, %16-19r, %0-3r"},
- {0x06800010, 0x0ff00070, "pkhbt%c\t%12-15r, %16-19r, %0-3r, LSL #%7-11d"},
- {0x06800050, 0x0ff00ff0, "pkhtb%c\t%12-15r, %16-19r, %0-3r, ASR #32"},
- {0x06800050, 0x0ff00070, "pkhtb%c\t%12-15r, %16-19r, %0-3r, ASR #%7-11d"},
- {0x01900f9f, 0x0ff00fff, "ldrex%c\tr%12-15d, [%16-19r]"},
- {0x06200f10, 0x0ff00ff0, "qadd16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06200f90, 0x0ff00ff0, "qadd8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06200f30, 0x0ff00ff0, "qaddsubx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06200f70, 0x0ff00ff0, "qsub16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06200ff0, 0x0ff00ff0, "qsub8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06200f50, 0x0ff00ff0, "qsubaddx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06100f10, 0x0ff00ff0, "sadd16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06100f90, 0x0ff00ff0, "sadd8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06100f30, 0x0ff00ff0, "saddaddx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06300f10, 0x0ff00ff0, "shadd16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06300f90, 0x0ff00ff0, "shadd8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06300f30, 0x0ff00ff0, "shaddsubx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06300f70, 0x0ff00ff0, "shsub16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06300ff0, 0x0ff00ff0, "shsub8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06300f50, 0x0ff00ff0, "shsubaddx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06100f70, 0x0ff00ff0, "ssub16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06100ff0, 0x0ff00ff0, "ssub8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06100f50, 0x0ff00ff0, "ssubaddx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06500f10, 0x0ff00ff0, "uadd16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06500f90, 0x0ff00ff0, "uadd8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06500f30, 0x0ff00ff0, "uaddsubx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06700f10, 0x0ff00ff0, "uhadd16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06700f90, 0x0ff00ff0, "uhadd8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06700f30, 0x0ff00ff0, "uhaddsubx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06700f70, 0x0ff00ff0, "uhsub16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06700ff0, 0x0ff00ff0, "uhsub8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06700f50, 0x0ff00ff0, "uhsubaddx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06600f10, 0x0ff00ff0, "uqadd16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06600f90, 0x0ff00ff0, "uqadd8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06600f30, 0x0ff00ff0, "uqaddsubx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06600f70, 0x0ff00ff0, "uqsub16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06600ff0, 0x0ff00ff0, "uqsub8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06600f50, 0x0ff00ff0, "uqsubaddx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06500f70, 0x0ff00ff0, "usub16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06500ff0, 0x0ff00ff0, "usub8%c\t%12-15r, %16-19r, %0-3r"},
- {0x06500f50, 0x0ff00ff0, "usubaddx%c\t%12-15r, %16-19r, %0-3r"},
- {0x06bf0f30, 0x0fff0ff0, "rev%c\t\%12-15r, %0-3r"},
- {0x06bf0fb0, 0x0fff0ff0, "rev16%c\t\%12-15r, %0-3r"},
- {0x06ff0fb0, 0x0fff0ff0, "revsh%c\t\%12-15r, %0-3r"},
- {0xf8100a00, 0xfe50ffff, "rfe%23?id%24?ba\t\%16-19r%21'!"},
- {0x06bf0070, 0x0fff0ff0, "sxth%c %12-15r,%0-3r"},
- {0x06bf0470, 0x0fff0ff0, "sxth%c %12-15r,%0-3r, ROR #8"},
- {0x06bf0870, 0x0fff0ff0, "sxth%c %12-15r,%0-3r, ROR #16"},
- {0x06bf0c70, 0x0fff0ff0, "sxth%c %12-15r,%0-3r, ROR #24"},
- {0x068f0070, 0x0fff0ff0, "sxtb16%c %12-15r,%0-3r"},
- {0x068f0470, 0x0fff0ff0, "sxtb16%c %12-15r,%0-3r, ROR #8"},
- {0x068f0870, 0x0fff0ff0, "sxtb16%c %12-15r,%0-3r, ROR #16"},
- {0x068f0c70, 0x0fff0ff0, "sxtb16%c %12-15r,%0-3r, ROR #24"},
- {0x06af0070, 0x0fff0ff0, "sxtb%c %12-15r,%0-3r"},
- {0x06af0470, 0x0fff0ff0, "sxtb%c %12-15r,%0-3r, ROR #8"},
- {0x06af0870, 0x0fff0ff0, "sxtb%c %12-15r,%0-3r, ROR #16"},
- {0x06af0c70, 0x0fff0ff0, "sxtb%c %12-15r,%0-3r, ROR #24"},
- {0x06ff0070, 0x0fff0ff0, "uxth%c %12-15r,%0-3r"},
- {0x06ff0470, 0x0fff0ff0, "uxth%c %12-15r,%0-3r, ROR #8"},
- {0x06ff0870, 0x0fff0ff0, "uxth%c %12-15r,%0-3r, ROR #16"},
- {0x06ff0c70, 0x0fff0ff0, "uxth%c %12-15r,%0-3r, ROR #24"},
- {0x06cf0070, 0x0fff0ff0, "uxtb16%c %12-15r,%0-3r"},
- {0x06cf0470, 0x0fff0ff0, "uxtb16%c %12-15r,%0-3r, ROR #8"},
- {0x06cf0870, 0x0fff0ff0, "uxtb16%c %12-15r,%0-3r, ROR #16"},
- {0x06cf0c70, 0x0fff0ff0, "uxtb16%c %12-15r,%0-3r, ROR #24"},
- {0x06ef0070, 0x0fff0ff0, "uxtb%c %12-15r,%0-3r"},
- {0x06ef0470, 0x0fff0ff0, "uxtb%c %12-15r,%0-3r, ROR #8"},
- {0x06ef0870, 0x0fff0ff0, "uxtb%c %12-15r,%0-3r, ROR #16"},
- {0x06ef0c70, 0x0fff0ff0, "uxtb%c %12-15r,%0-3r, ROR #24"},
- {0x06b00070, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r"},
- {0x06b00470, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {0x06b00870, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {0x06b00c70, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
- {0x06800070, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06800470, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {0x06800870, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {0x06800c70, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
- {0x06a00070, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r"},
- {0x06a00470, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {0x06a00870, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {0x06a00c70, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
- {0x06f00070, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r"},
- {0x06f00470, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {0x06f00870, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {0x06f00c70, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
- {0x06c00070, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r"},
- {0x06c00470, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {0x06c00870, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {0x06c00c70, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
- {0x06e00070, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r"},
- {0x06e00470, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {0x06e00870, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {0x06e00c70, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
- {0x068000b0, 0x0ff00ff0, "sel%c\t%12-15r, %16-19r, %0-3r"},
- {0xf1010000, 0xfffffc00, "setend\t%9?ble"},
- {0x0700f010, 0x0ff0f0d0, "smuad%5'x%c\t%16-19r, %0-3r, %8-11r"},
- {0x0700f050, 0x0ff0f0d0, "smusd%5'x%c\t%16-19r, %0-3r, %8-11r"},
- {0x07000010, 0x0ff000d0, "smlad%5'x%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0x07400010, 0x0ff000d0, "smlald%5'x%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
- {0x07000050, 0x0ff000d0, "smlsd%5'x%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0x07400050, 0x0ff000d0, "smlsld%5'x%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
- {0x0750f010, 0x0ff0f0d0, "smmul%5'r%c\t%16-19r, %0-3r, %8-11r"},
- {0x07500010, 0x0ff000d0, "smmla%5'r%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0x075000d0, 0x0ff000d0, "smmls%5'r%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0xf84d0500, 0xfe5fffe0, "srs%23?id%24?ba\t#%0-4d%21'!"},
- {0x06a00010, 0x0fe00ff0, "ssat%c\t%12-15r, #%16-20W, %0-3r"},
- {0x06a00010, 0x0fe00070, "ssat%c\t%12-15r, #%16-20W, %0-3r, LSL #%7-11d"},
- {0x06a00050, 0x0fe00070, "ssat%c\t%12-15r, #%16-20W, %0-3r, ASR #%7-11d"},
- {0x06a00f30, 0x0ff00ff0, "ssat16%c\t%12-15r, #%16-19W, %0-3r"},
- {0x01800f90, 0x0ff00ff0, "strex%c\t%12-15r, %0-3r, [%16-19r]"},
- {0x00400090, 0x0ff000f0, "umaal%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
- {0x0780f010, 0x0ff0f0f0, "usad8%c\t%16-19r, %0-3r, %8-11r"},
- {0x07800010, 0x0ff000f0, "usada8%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0x06e00010, 0x0fe00ff0, "usat%c\t%12-15r, #%16-20d, %0-3r"},
- {0x06e00010, 0x0fe00070, "usat%c\t%12-15r, #%16-20d, %0-3r, LSL #%7-11d"},
- {0x06e00050, 0x0fe00070, "usat%c\t%12-15r, #%16-20d, %0-3r, ASR #%7-11d"},
- {0x06e00f30, 0x0ff00ff0, "usat16%c\t%12-15r, #%16-19d, %0-3r"},
-
- /* V5J instruction. */
- {0x012fff20, 0x0ffffff0, "bxj%c\t%0-3r"},
-
- /* XScale instructions. */
- {0x0e200010, 0x0fff0ff0, "mia%c\tacc0, %0-3r, %12-15r"},
- {0x0e280010, 0x0fff0ff0, "miaph%c\tacc0, %0-3r, %12-15r"},
- {0x0e2c0010, 0x0ffc0ff0, "mia%17'T%17`B%16'T%16`B%c\tacc0, %0-3r, %12-15r"},
- {0x0c400000, 0x0ff00fff, "mar%c\tacc0, %12-15r, %16-19r"},
- {0x0c500000, 0x0ff00fff, "mra%c\t%12-15r, %16-19r, acc0"},
- {0xf450f000, 0xfc70f000, "pld\t%a"},
-
- /* Intel Wireless MMX technology instructions. */
-#define FIRST_IWMMXT_INSN 0x0e130130
-#define IWMMXT_INSN_COUNT 47
- {0x0e130130, 0x0f3f0fff, "tandc%22-23w%c\t%12-15r"},
- {0x0e400010, 0x0ff00f3f, "tbcst%6-7w%c\t%16-19g, %12-15r"},
- {0x0e130170, 0x0f3f0ff8, "textrc%22-23w%c\t%12-15r, #%0-2d"},
- {0x0e100070, 0x0f300ff0, "textrm%3?su%22-23w%c\t%12-15r, %16-19g, #%0-2d"},
- {0x0e600010, 0x0ff00f38, "tinsr%6-7w%c\t%16-19g, %12-15r, #%0-2d"},
- {0x0e000110, 0x0ff00fff, "tmcr%c\t%16-19G, %12-15r"},
- {0x0c400000, 0x0ff00ff0, "tmcrr%c\t%0-3g, %12-15r, %16-19r"},
- {0x0e2c0010, 0x0ffc0e10, "tmia%17?tb%16?tb%c\t%5-8g, %0-3r, %12-15r"},
- {0x0e200010, 0x0fff0e10, "tmia%c\t%5-8g, %0-3r, %12-15r"},
- {0x0e280010, 0x0fff0e10, "tmiaph%c\t%5-8g, %0-3r, %12-15r"},
- {0x0e100030, 0x0f300fff, "tmovmsk%22-23w%c\t%12-15r, %16-19g"},
- {0x0e100110, 0x0ff00ff0, "tmrc%c\t%12-15r, %16-19G"},
- {0x0c500000, 0x0ff00ff0, "tmrrc%c\t%12-15r, %16-19r, %0-3g"},
- {0x0e130150, 0x0f3f0fff, "torc%22-23w%c\t%12-15r"},
- {0x0e0001c0, 0x0f300fff, "wacc%22-23w%c\t%12-15g, %16-19g"},
- {0x0e000180, 0x0f000ff0, "wadd%20-23w%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e000020, 0x0f800ff0, "waligni%c\t%12-15g, %16-19g, %0-3g, #%20-22d"},
- {0x0e800020, 0x0fc00ff0, "walignr%20-21d%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e200000, 0x0fe00ff0, "wand%20'n%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e800000, 0x0fa00ff0, "wavg2%22?hb%20'r%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e000060, 0x0f300ff0, "wcmpeq%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e100060, 0x0f100ff0, "wcmpgt%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {0xfc100100, 0xfe500f00, "wldrw\t%12-15G, %A"},
- {0x0c100000, 0x0e100e00, "wldr%L%c\t%12-15g, %l"},
- {0x0e400100, 0x0fc00ff0, "wmac%21?su%20'z%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e800100, 0x0fd00ff0, "wmadd%21?su%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e000160, 0x0f100ff0, "wmax%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e100160, 0x0f100ff0, "wmin%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e000000, 0x0ff00ff0, "wor%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e000080, 0x0f000ff0, "wpack%20-23w%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e300040, 0x0f300ff0, "wror%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e300148, 0x0f300ffc, "wror%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
- {0x0e000120, 0x0fa00ff0, "wsad%22?hb%20'z%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e0001e0, 0x0f000ff0, "wshufh%c\t%12-15g, %16-19g, #%Z"},
- {0x0e100040, 0x0f300ff0, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e100148, 0x0f300ffc, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
- {0x0e000040, 0x0f300ff0, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e000148, 0x0f300ffc, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
- {0x0e200040, 0x0f300ff0, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e200148, 0x0f300ffc, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
- {0xfc000100, 0xfe500f00, "wstrw\t%12-15G, %A"},
- {0x0c000000, 0x0e100e00, "wstr%L%c\t%12-15g, %l"},
- {0x0e0001a0, 0x0f000ff0, "wsub%20-23w%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e0000c0, 0x0f100fff, "wunpckeh%21?su%22-23w%c\t%12-15g, %16-19g"},
- {0x0e0000e0, 0x0f100fff, "wunpckel%21?su%22-23w%c\t%12-15g, %16-19g"},
- {0x0e1000c0, 0x0f300ff0, "wunpckih%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e1000e0, 0x0f300ff0, "wunpckil%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {0x0e100000, 0x0ff00ff0, "wxor%c\t%12-15g, %16-19g, %0-3g"},
-
- /* V5 Instructions. */
- {0xe1200070, 0xfff000f0, "bkpt\t0x%16-19X%12-15X%8-11X%0-3X"},
- {0xfa000000, 0xfe000000, "blx\t%B"},
- {0x012fff30, 0x0ffffff0, "blx%c\t%0-3r"},
- {0x016f0f10, 0x0fff0ff0, "clz%c\t%12-15r, %0-3r"},
- {0xfc100000, 0xfe100000, "ldc2%22'l\t%8-11d, cr%12-15d, %A"},
- {0xfc000000, 0xfe100000, "stc2%22'l\t%8-11d, cr%12-15d, %A"},
- {0xfe000000, 0xff000010, "cdp2\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
- {0xfe000010, 0xff100010, "mcr2\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
- {0xfe100010, 0xff100010, "mrc2\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
-
- /* V5E "El Segundo" Instructions. */
- {0x000000d0, 0x0e1000f0, "ldr%cd\t%12-15r, %s"},
- {0x000000f0, 0x0e1000f0, "str%cd\t%12-15r, %s"},
- {0x01000080, 0x0ff000f0, "smlabb%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0x010000a0, 0x0ff000f0, "smlatb%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0x010000c0, 0x0ff000f0, "smlabt%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0x010000e0, 0x0ff000f0, "smlatt%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
-
- {0x01200080, 0x0ff000f0, "smlawb%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {0x012000c0, 0x0ff000f0, "smlawt%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
-
- {0x01400080, 0x0ff000f0, "smlalbb%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
- {0x014000a0, 0x0ff000f0, "smlaltb%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
- {0x014000c0, 0x0ff000f0, "smlalbt%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
- {0x014000e0, 0x0ff000f0, "smlaltt%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
-
- {0x01600080, 0x0ff0f0f0, "smulbb%c\t%16-19r, %0-3r, %8-11r"},
- {0x016000a0, 0x0ff0f0f0, "smultb%c\t%16-19r, %0-3r, %8-11r"},
- {0x016000c0, 0x0ff0f0f0, "smulbt%c\t%16-19r, %0-3r, %8-11r"},
- {0x016000e0, 0x0ff0f0f0, "smultt%c\t%16-19r, %0-3r, %8-11r"},
-
- {0x012000a0, 0x0ff0f0f0, "smulwb%c\t%16-19r, %0-3r, %8-11r"},
- {0x012000e0, 0x0ff0f0f0, "smulwt%c\t%16-19r, %0-3r, %8-11r"},
-
- {0x01000050, 0x0ff00ff0, "qadd%c\t%12-15r, %0-3r, %16-19r"},
- {0x01400050, 0x0ff00ff0, "qdadd%c\t%12-15r, %0-3r, %16-19r"},
- {0x01200050, 0x0ff00ff0, "qsub%c\t%12-15r, %0-3r, %16-19r"},
- {0x01600050, 0x0ff00ff0, "qdsub%c\t%12-15r, %0-3r, %16-19r"},
-
- /* ARM Instructions. */
- {0x00000090, 0x0e100090, "str%c%6's%5?hb\t%12-15r, %s"},
- {0x00100090, 0x0e100090, "ldr%c%6's%5?hb\t%12-15r, %s"},
- {0x00000000, 0x0de00000, "and%c%20's\t%12-15r, %16-19r, %o"},
- {0x00200000, 0x0de00000, "eor%c%20's\t%12-15r, %16-19r, %o"},
- {0x00400000, 0x0de00000, "sub%c%20's\t%12-15r, %16-19r, %o"},
- {0x00600000, 0x0de00000, "rsb%c%20's\t%12-15r, %16-19r, %o"},
- {0x00800000, 0x0de00000, "add%c%20's\t%12-15r, %16-19r, %o"},
- {0x00a00000, 0x0de00000, "adc%c%20's\t%12-15r, %16-19r, %o"},
- {0x00c00000, 0x0de00000, "sbc%c%20's\t%12-15r, %16-19r, %o"},
- {0x00e00000, 0x0de00000, "rsc%c%20's\t%12-15r, %16-19r, %o"},
- {0x0120f000, 0x0db0f000, "msr%c\t%22?SCPSR%C, %o"},
- {0x010f0000, 0x0fbf0fff, "mrs%c\t%12-15r, %22?SCPSR"},
- {0x01000000, 0x0de00000, "tst%c%p\t%16-19r, %o"},
- {0x01200000, 0x0de00000, "teq%c%p\t%16-19r, %o"},
- {0x01400000, 0x0de00000, "cmp%c%p\t%16-19r, %o"},
- {0x01600000, 0x0de00000, "cmn%c%p\t%16-19r, %o"},
- {0x01800000, 0x0de00000, "orr%c%20's\t%12-15r, %16-19r, %o"},
- {0x01a00000, 0x0de00000, "mov%c%20's\t%12-15r, %o"},
- {0x01c00000, 0x0de00000, "bic%c%20's\t%12-15r, %16-19r, %o"},
- {0x01e00000, 0x0de00000, "mvn%c%20's\t%12-15r, %o"},
- {0x04000000, 0x0e100000, "str%c%22'b%t\t%12-15r, %a"},
- {0x06000000, 0x0e100ff0, "str%c%22'b%t\t%12-15r, %a"},
- {0x04000000, 0x0c100010, "str%c%22'b%t\t%12-15r, %a"},
- {0x06000010, 0x0e000010, "undefined"},
- {0x04100000, 0x0c100000, "ldr%c%22'b%t\t%12-15r, %a"},
- {0x08000000, 0x0e100000, "stm%c%23?id%24?ba\t%16-19r%21'!, %m%22'^"},
- {0x08100000, 0x0e100000, "ldm%c%23?id%24?ba\t%16-19r%21'!, %m%22'^"},
- {0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
- {0x0f000000, 0x0f000000, "swi%c\t%0-23x"},
-
- /* Floating point coprocessor (FPA) instructions */
- {0x0e000100, 0x0ff08f10, "adf%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e100100, 0x0ff08f10, "muf%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e200100, 0x0ff08f10, "suf%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e300100, 0x0ff08f10, "rsf%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e400100, 0x0ff08f10, "dvf%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e500100, 0x0ff08f10, "rdf%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e600100, 0x0ff08f10, "pow%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e700100, 0x0ff08f10, "rpw%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e800100, 0x0ff08f10, "rmf%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e900100, 0x0ff08f10, "fml%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0ea00100, 0x0ff08f10, "fdv%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0eb00100, 0x0ff08f10, "frd%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0ec00100, 0x0ff08f10, "pol%c%P%R\t%12-14f, %16-18f, %0-3f"},
- {0x0e008100, 0x0ff08f10, "mvf%c%P%R\t%12-14f, %0-3f"},
- {0x0e108100, 0x0ff08f10, "mnf%c%P%R\t%12-14f, %0-3f"},
- {0x0e208100, 0x0ff08f10, "abs%c%P%R\t%12-14f, %0-3f"},
- {0x0e308100, 0x0ff08f10, "rnd%c%P%R\t%12-14f, %0-3f"},
- {0x0e408100, 0x0ff08f10, "sqt%c%P%R\t%12-14f, %0-3f"},
- {0x0e508100, 0x0ff08f10, "log%c%P%R\t%12-14f, %0-3f"},
- {0x0e608100, 0x0ff08f10, "lgn%c%P%R\t%12-14f, %0-3f"},
- {0x0e708100, 0x0ff08f10, "exp%c%P%R\t%12-14f, %0-3f"},
- {0x0e808100, 0x0ff08f10, "sin%c%P%R\t%12-14f, %0-3f"},
- {0x0e908100, 0x0ff08f10, "cos%c%P%R\t%12-14f, %0-3f"},
- {0x0ea08100, 0x0ff08f10, "tan%c%P%R\t%12-14f, %0-3f"},
- {0x0eb08100, 0x0ff08f10, "asn%c%P%R\t%12-14f, %0-3f"},
- {0x0ec08100, 0x0ff08f10, "acs%c%P%R\t%12-14f, %0-3f"},
- {0x0ed08100, 0x0ff08f10, "atn%c%P%R\t%12-14f, %0-3f"},
- {0x0ee08100, 0x0ff08f10, "urd%c%P%R\t%12-14f, %0-3f"},
- {0x0ef08100, 0x0ff08f10, "nrm%c%P%R\t%12-14f, %0-3f"},
- {0x0e000110, 0x0ff00f1f, "flt%c%P%R\t%16-18f, %12-15r"},
- {0x0e100110, 0x0fff0f98, "fix%c%R\t%12-15r, %0-2f"},
- {0x0e200110, 0x0fff0fff, "wfs%c\t%12-15r"},
- {0x0e300110, 0x0fff0fff, "rfs%c\t%12-15r"},
- {0x0e400110, 0x0fff0fff, "wfc%c\t%12-15r"},
- {0x0e500110, 0x0fff0fff, "rfc%c\t%12-15r"},
- {0x0e90f110, 0x0ff8fff0, "cmf%c\t%16-18f, %0-3f"},
- {0x0eb0f110, 0x0ff8fff0, "cnf%c\t%16-18f, %0-3f"},
- {0x0ed0f110, 0x0ff8fff0, "cmfe%c\t%16-18f, %0-3f"},
- {0x0ef0f110, 0x0ff8fff0, "cnfe%c\t%16-18f, %0-3f"},
- {0x0c000100, 0x0e100f00, "stf%c%Q\t%12-14f, %A"},
- {0x0c100100, 0x0e100f00, "ldf%c%Q\t%12-14f, %A"},
- {0x0c000200, 0x0e100f00, "sfm%c\t%12-14f, %F, %A"},
- {0x0c100200, 0x0e100f00, "lfm%c\t%12-14f, %F, %A"},
-
- /* Floating point coprocessor (VFP) instructions */
- {0x0eb00bc0, 0x0fff0ff0, "fabsd%c\t%1z, %0z"},
- {0x0eb00ac0, 0x0fbf0fd0, "fabss%c\t%1y, %0y"},
- {0x0e300b00, 0x0ff00ff0, "faddd%c\t%1z, %2z, %0z"},
- {0x0e300a00, 0x0fb00f50, "fadds%c\t%1y, %2y, %1y"},
- {0x0eb40b40, 0x0fff0f70, "fcmp%7'ed%c\t%1z, %0z"},
- {0x0eb40a40, 0x0fbf0f50, "fcmp%7'es%c\t%1y, %0y"},
- {0x0eb50b40, 0x0fff0f70, "fcmp%7'ezd%c\t%1z"},
- {0x0eb50a40, 0x0fbf0f70, "fcmp%7'ezs%c\t%1y"},
- {0x0eb00b40, 0x0fff0ff0, "fcpyd%c\t%1z, %0z"},
- {0x0eb00a40, 0x0fbf0fd0, "fcpys%c\t%1y, %0y"},
- {0x0eb70ac0, 0x0fff0fd0, "fcvtds%c\t%1z, %0y"},
- {0x0eb70bc0, 0x0fbf0ff0, "fcvtsd%c\t%1y, %0z"},
- {0x0e800b00, 0x0ff00ff0, "fdivd%c\t%1z, %2z, %0z"},
- {0x0e800a00, 0x0fb00f50, "fdivs%c\t%1y, %2y, %0y"},
- {0x0d100b00, 0x0f700f00, "fldd%c\t%1z, %A"},
- {0x0c900b00, 0x0fd00f00, "fldmia%0?xd%c\t%16-19r%21'!, %3z"},
- {0x0d300b00, 0x0ff00f00, "fldmdb%0?xd%c\t%16-19r!, %3z"},
- {0x0d100a00, 0x0f300f00, "flds%c\t%1y, %A"},
- {0x0c900a00, 0x0f900f00, "fldmias%c\t%16-19r%21'!, %3y"},
- {0x0d300a00, 0x0fb00f00, "fldmdbs%c\t%16-19r!, %3y"},
- {0x0e000b00, 0x0ff00ff0, "fmacd%c\t%1z, %2z, %0z"},
- {0x0e000a00, 0x0fb00f50, "fmacs%c\t%1y, %2y, %0y"},
- {0x0e200b10, 0x0ff00fff, "fmdhr%c\t%2z, %12-15r"},
- {0x0e000b10, 0x0ff00fff, "fmdlr%c\t%2z, %12-15r"},
- {0x0c400b10, 0x0ff00ff0, "fmdrr%c\t%0z, %12-15r, %16-19r"},
- {0x0e300b10, 0x0ff00fff, "fmrdh%c\t%12-15r, %2z"},
- {0x0e100b10, 0x0ff00fff, "fmrdl%c\t%12-15r, %2z"},
- {0x0c500b10, 0x0ff00ff0, "fmrrd%c\t%12-15r, %16-19r, %0z"},
- {0x0c500a10, 0x0ff00fd0, "fmrrs%c\t%12-15r, %16-19r, %4y"},
- {0x0e100a10, 0x0ff00f7f, "fmrs%c\t%12-15r, %2y"},
- {0x0ef1fa10, 0x0fffffff, "fmstat%c"},
- {0x0ef00a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpsid"},
- {0x0ef10a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpscr"},
- {0x0ef80a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpexc"},
- {0x0ef90a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpinst\t@ Impl def"},
- {0x0efa0a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpinst2\t@ Impl def"},
- {0x0ef00a10, 0x0ff00fff, "fmrx%c\t%12-15r, <impl def 0x%16-19x>"},
- {0x0e100b00, 0x0ff00ff0, "fmscd%c\t%1z, %2z, %0z"},
- {0x0e100a00, 0x0fb00f50, "fmscs%c\t%1y, %2y, %0y"},
- {0x0e000a10, 0x0ff00f7f, "fmsr%c\t%2y, %12-15r"},
- {0x0c400a10, 0x0ff00fd0, "fmsrr%c\t%12-15r, %16-19r, %4y"},
- {0x0e200b00, 0x0ff00ff0, "fmuld%c\t%1z, %2z, %0z"},
- {0x0e200a00, 0x0fb00f50, "fmuls%c\t%1y, %2y, %0y"},
- {0x0ee00a10, 0x0fff0fff, "fmxr%c\tfpsid, %12-15r"},
- {0x0ee10a10, 0x0fff0fff, "fmxr%c\tfpscr, %12-15r"},
- {0x0ee80a10, 0x0fff0fff, "fmxr%c\tfpexc, %12-15r"},
- {0x0ee90a10, 0x0fff0fff, "fmxr%c\tfpinst, %12-15r\t@ Impl def"},
- {0x0eea0a10, 0x0fff0fff, "fmxr%c\tfpinst2, %12-15r\t@ Impl def"},
- {0x0ee00a10, 0x0ff00fff, "fmxr%c\t<impl def 0x%16-19x>, %12-15r"},
- {0x0eb10b40, 0x0fff0ff0, "fnegd%c\t%1z, %0z"},
- {0x0eb10a40, 0x0fbf0fd0, "fnegs%c\t%1y, %0y"},
- {0x0e000b40, 0x0ff00ff0, "fnmacd%c\t%1z, %2z, %0z"},
- {0x0e000a40, 0x0fb00f50, "fnmacs%c\t%1y, %2y, %0y"},
- {0x0e100b40, 0x0ff00ff0, "fnmscd%c\t%1z, %2z, %0z"},
- {0x0e100a40, 0x0fb00f50, "fnmscs%c\t%1y, %2y, %0y"},
- {0x0e200b40, 0x0ff00ff0, "fnmuld%c\t%1z, %2z, %0z"},
- {0x0e200a40, 0x0fb00f50, "fnmuls%c\t%1y, %2y, %0y"},
- {0x0eb80bc0, 0x0fff0fd0, "fsitod%c\t%1z, %0y"},
- {0x0eb80ac0, 0x0fbf0fd0, "fsitos%c\t%1y, %0y"},
- {0x0eb10bc0, 0x0fff0ff0, "fsqrtd%c\t%1z, %0z"},
- {0x0eb10ac0, 0x0fbf0fd0, "fsqrts%c\t%1y, %0y"},
- {0x0d000b00, 0x0f700f00, "fstd%c\t%1z, %A"},
- {0x0c800b00, 0x0fd00f00, "fstmia%0?xd%c\t%16-19r%21'!, %3z"},
- {0x0d200b00, 0x0ff00f00, "fstmdb%0?xd%c\t%16-19r!, %3z"},
- {0x0d000a00, 0x0f300f00, "fsts%c\t%1y, %A"},
- {0x0c800a00, 0x0f900f00, "fstmias%c\t%16-19r%21'!, %3y"},
- {0x0d200a00, 0x0fb00f00, "fstmdbs%c\t%16-19r!, %3y"},
- {0x0e300b40, 0x0ff00ff0, "fsubd%c\t%1z, %2z, %0z"},
- {0x0e300a40, 0x0fb00f50, "fsubs%c\t%1y, %2y, %0y"},
- {0x0ebc0b40, 0x0fbe0f70, "fto%16?sui%7'zd%c\t%1y, %0z"},
- {0x0ebc0a40, 0x0fbe0f50, "fto%16?sui%7'zs%c\t%1y, %0y"},
- {0x0eb80b40, 0x0fff0fd0, "fuitod%c\t%1z, %0y"},
- {0x0eb80a40, 0x0fbf0fd0, "fuitos%c\t%1y, %0y"},
-
- /* Cirrus coprocessor instructions. */
- {0x0d100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
- {0x0c100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
- {0x0d500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
- {0x0c500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
- {0x0d100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
- {0x0c100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
- {0x0d500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
- {0x0c500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
- {0x0d000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
- {0x0c000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
- {0x0d400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
- {0x0c400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
- {0x0d000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
- {0x0c000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
- {0x0d400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
- {0x0c400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
- {0x0e000450, 0x0ff00ff0, "cfmvsr%c\tmvf%16-19d, %12-15r"},
- {0x0e100450, 0x0ff00ff0, "cfmvrs%c\t%12-15r, mvf%16-19d"},
- {0x0e000410, 0x0ff00ff0, "cfmvdlr%c\tmvd%16-19d, %12-15r"},
- {0x0e100410, 0x0ff00ff0, "cfmvrdl%c\t%12-15r, mvd%16-19d"},
- {0x0e000430, 0x0ff00ff0, "cfmvdhr%c\tmvd%16-19d, %12-15r"},
- {0x0e100430, 0x0ff00fff, "cfmvrdh%c\t%12-15r, mvd%16-19d"},
- {0x0e000510, 0x0ff00fff, "cfmv64lr%c\tmvdx%16-19d, %12-15r"},
- {0x0e100510, 0x0ff00fff, "cfmvr64l%c\t%12-15r, mvdx%16-19d"},
- {0x0e000530, 0x0ff00fff, "cfmv64hr%c\tmvdx%16-19d, %12-15r"},
- {0x0e100530, 0x0ff00fff, "cfmvr64h%c\t%12-15r, mvdx%16-19d"},
- {0x0e200440, 0x0ff00fff, "cfmval32%c\tmvax%12-15d, mvfx%16-19d"},
- {0x0e100440, 0x0ff00fff, "cfmv32al%c\tmvfx%12-15d, mvax%16-19d"},
- {0x0e200460, 0x0ff00fff, "cfmvam32%c\tmvax%12-15d, mvfx%16-19d"},
- {0x0e100460, 0x0ff00fff, "cfmv32am%c\tmvfx%12-15d, mvax%16-19d"},
- {0x0e200480, 0x0ff00fff, "cfmvah32%c\tmvax%12-15d, mvfx%16-19d"},
- {0x0e100480, 0x0ff00fff, "cfmv32ah%c\tmvfx%12-15d, mvax%16-19d"},
- {0x0e2004a0, 0x0ff00fff, "cfmva32%c\tmvax%12-15d, mvfx%16-19d"},
- {0x0e1004a0, 0x0ff00fff, "cfmv32a%c\tmvfx%12-15d, mvax%16-19d"},
- {0x0e2004c0, 0x0ff00fff, "cfmva64%c\tmvax%12-15d, mvdx%16-19d"},
- {0x0e1004c0, 0x0ff00fff, "cfmv64a%c\tmvdx%12-15d, mvax%16-19d"},
- {0x0e2004e0, 0x0fff0fff, "cfmvsc32%c\tdspsc, mvdx%12-15d"},
- {0x0e1004e0, 0x0fff0fff, "cfmv32sc%c\tmvdx%12-15d, dspsc"},
- {0x0e000400, 0x0ff00fff, "cfcpys%c\tmvf%12-15d, mvf%16-19d"},
- {0x0e000420, 0x0ff00fff, "cfcpyd%c\tmvd%12-15d, mvd%16-19d"},
- {0x0e000460, 0x0ff00fff, "cfcvtsd%c\tmvd%12-15d, mvf%16-19d"},
- {0x0e000440, 0x0ff00fff, "cfcvtds%c\tmvf%12-15d, mvd%16-19d"},
- {0x0e000480, 0x0ff00fff, "cfcvt32s%c\tmvf%12-15d, mvfx%16-19d"},
- {0x0e0004a0, 0x0ff00fff, "cfcvt32d%c\tmvd%12-15d, mvfx%16-19d"},
- {0x0e0004c0, 0x0ff00fff, "cfcvt64s%c\tmvf%12-15d, mvdx%16-19d"},
- {0x0e0004e0, 0x0ff00fff, "cfcvt64d%c\tmvd%12-15d, mvdx%16-19d"},
- {0x0e100580, 0x0ff00fff, "cfcvts32%c\tmvfx%12-15d, mvf%16-19d"},
- {0x0e1005a0, 0x0ff00fff, "cfcvtd32%c\tmvfx%12-15d, mvd%16-19d"},
- {0x0e1005c0, 0x0ff00fff, "cftruncs32%c\tmvfx%12-15d, mvf%16-19d"},
- {0x0e1005e0, 0x0ff00fff, "cftruncd32%c\tmvfx%12-15d, mvd%16-19d"},
- {0x0e000550, 0x0ff00ff0, "cfrshl32%c\tmvfx%16-19d, mvfx%0-3d, %12-15r"},
- {0x0e000570, 0x0ff00ff0, "cfrshl64%c\tmvdx%16-19d, mvdx%0-3d, %12-15r"},
- {0x0e000500, 0x0ff00f00, "cfsh32%c\tmvfx%12-15d, mvfx%16-19d, #%I"},
- {0x0e200500, 0x0ff00f00, "cfsh64%c\tmvdx%12-15d, mvdx%16-19d, #%I"},
- {0x0e100490, 0x0ff00ff0, "cfcmps%c\t%12-15r, mvf%16-19d, mvf%0-3d"},
- {0x0e1004b0, 0x0ff00ff0, "cfcmpd%c\t%12-15r, mvd%16-19d, mvd%0-3d"},
- {0x0e100590, 0x0ff00ff0, "cfcmp32%c\t%12-15r, mvfx%16-19d, mvfx%0-3d"},
- {0x0e1005b0, 0x0ff00ff0, "cfcmp64%c\t%12-15r, mvdx%16-19d, mvdx%0-3d"},
- {0x0e300400, 0x0ff00fff, "cfabss%c\tmvf%12-15d, mvf%16-19d"},
- {0x0e300420, 0x0ff00fff, "cfabsd%c\tmvd%12-15d, mvd%16-19d"},
- {0x0e300440, 0x0ff00fff, "cfnegs%c\tmvf%12-15d, mvf%16-19d"},
- {0x0e300460, 0x0ff00fff, "cfnegd%c\tmvd%12-15d, mvd%16-19d"},
- {0x0e300480, 0x0ff00ff0, "cfadds%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
- {0x0e3004a0, 0x0ff00ff0, "cfaddd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
- {0x0e3004c0, 0x0ff00ff0, "cfsubs%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
- {0x0e3004e0, 0x0ff00ff0, "cfsubd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
- {0x0e100400, 0x0ff00ff0, "cfmuls%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
- {0x0e100420, 0x0ff00ff0, "cfmuld%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
- {0x0e300500, 0x0ff00fff, "cfabs32%c\tmvfx%12-15d, mvfx%16-19d"},
- {0x0e300520, 0x0ff00fff, "cfabs64%c\tmvdx%12-15d, mvdx%16-19d"},
- {0x0e300540, 0x0ff00fff, "cfneg32%c\tmvfx%12-15d, mvfx%16-19d"},
- {0x0e300560, 0x0ff00fff, "cfneg64%c\tmvdx%12-15d, mvdx%16-19d"},
- {0x0e300580, 0x0ff00ff0, "cfadd32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
- {0x0e3005a0, 0x0ff00ff0, "cfadd64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
- {0x0e3005c0, 0x0ff00ff0, "cfsub32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
- {0x0e3005e0, 0x0ff00ff0, "cfsub64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
- {0x0e100500, 0x0ff00ff0, "cfmul32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
- {0x0e100520, 0x0ff00ff0, "cfmul64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
- {0x0e100540, 0x0ff00ff0, "cfmac32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
- {0x0e100560, 0x0ff00ff0, "cfmsc32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
- {0x0e000600, 0x0ff00f00, "cfmadd32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
- {0x0e100600, 0x0ff00f00, "cfmsub32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
- {0x0e200600, 0x0ff00f00, "cfmadda32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
- {0x0e300600, 0x0ff00f00, "cfmsuba32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
-
- /* Generic coprocessor instructions */
- {0x0c400000, 0x0ff00000, "mcrr%c\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
- {0x0c500000, 0x0ff00000, "mrrc%c\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
- {0x0e000000, 0x0f000010, "cdp%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
- {0x0e100010, 0x0f100010, "mrc%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
- {0x0e000010, 0x0f100010, "mcr%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
- {0x0c000000, 0x0e100000, "stc%c%22'l\t%8-11d, cr%12-15d, %A"},
- {0x0c100000, 0x0e100000, "ldc%c%22'l\t%8-11d, cr%12-15d, %A"},
-
- /* The rest. */
- {0x00000000, 0x00000000, "undefined instruction %0-31x"},
- {0x00000000, 0x00000000, 0}
-};
-
-#define BDISP(x) ((((x) & 0xffffff) ^ 0x800000) - 0x800000) /* 26 bit */
-
-static const struct thumb_opcode thumb_opcodes[] =
-{
- /* Thumb instructions. */
-
- /* ARM V6. */
- {0xb660, 0xfff8, "cpsie\t%2'a%1'i%0'f"},
- {0xb670, 0xfff8, "cpsid\t%2'a%1'i%0'f"},
- {0x4600, 0xffc0, "cpy\t%0-2r, %3-5r"},
- {0xba00, 0xffc0, "rev\t%0-2r, %3-5r"},
- {0xba40, 0xffc0, "rev16\t%0-2r, %3-5r"},
- {0xbac0, 0xffc0, "revsh\t%0-2r, %3-5r"},
- {0xb650, 0xfff7, "setend\t%3?ble\t"},
- {0xb200, 0xffc0, "sxth\t%0-2r, %3-5r"},
- {0xb240, 0xffc0, "sxtb\t%0-2r, %3-5r"},
- {0xb280, 0xffc0, "uxth\t%0-2r, %3-5r"},
- {0xb2c0, 0xffc0, "uxtb\t%0-2r, %3-5r"},
-
- /* ARM V5 ISA extends Thumb. */
- {0xbe00, 0xff00, "bkpt\t%0-7x"},
- {0x4780, 0xff87, "blx\t%3-6r"}, /* note: 4 bit register number. */
- /* Note: this is BLX(2). BLX(1) is done in arm-dis.c/print_insn_thumb()
- as an extension of the special processing there for Thumb BL.
- BL and BLX(1) involve 2 successive 16-bit instructions, which must
- always appear together in the correct order. So, the empty
- string is put in this table, and the string interpreter takes <empty>
- to mean it has a pair of BL-ish instructions. */
- {0x46C0, 0xFFFF, "nop\t\t\t(mov r8, r8)"},
- /* Format 5 instructions do not update the PSR. */
- {0x1C00, 0xFFC0, "mov\t%0-2r, %3-5r\t\t(add %0-2r, %3-5r, #%6-8d)"},
- /* Format 4. */
- {0x4000, 0xFFC0, "and\t%0-2r, %3-5r"},
- {0x4040, 0xFFC0, "eor\t%0-2r, %3-5r"},
- {0x4080, 0xFFC0, "lsl\t%0-2r, %3-5r"},
- {0x40C0, 0xFFC0, "lsr\t%0-2r, %3-5r"},
- {0x4100, 0xFFC0, "asr\t%0-2r, %3-5r"},
- {0x4140, 0xFFC0, "adc\t%0-2r, %3-5r"},
- {0x4180, 0xFFC0, "sbc\t%0-2r, %3-5r"},
- {0x41C0, 0xFFC0, "ror\t%0-2r, %3-5r"},
- {0x4200, 0xFFC0, "tst\t%0-2r, %3-5r"},
- {0x4240, 0xFFC0, "neg\t%0-2r, %3-5r"},
- {0x4280, 0xFFC0, "cmp\t%0-2r, %3-5r"},
- {0x42C0, 0xFFC0, "cmn\t%0-2r, %3-5r"},
- {0x4300, 0xFFC0, "orr\t%0-2r, %3-5r"},
- {0x4340, 0xFFC0, "mul\t%0-2r, %3-5r"},
- {0x4380, 0xFFC0, "bic\t%0-2r, %3-5r"},
- {0x43C0, 0xFFC0, "mvn\t%0-2r, %3-5r"},
- /* format 13 */
- {0xB000, 0xFF80, "add\tsp, #%0-6W"},
- {0xB080, 0xFF80, "sub\tsp, #%0-6W"},
- /* format 5 */
- {0x4700, 0xFF80, "bx\t%S"},
- {0x4400, 0xFF00, "add\t%D, %S"},
- {0x4500, 0xFF00, "cmp\t%D, %S"},
- {0x4600, 0xFF00, "mov\t%D, %S"},
- /* format 14 */
- {0xB400, 0xFE00, "push\t%N"},
- {0xBC00, 0xFE00, "pop\t%O"},
- /* format 2 */
- {0x1800, 0xFE00, "add\t%0-2r, %3-5r, %6-8r"},
- {0x1A00, 0xFE00, "sub\t%0-2r, %3-5r, %6-8r"},
- {0x1C00, 0xFE00, "add\t%0-2r, %3-5r, #%6-8d"},
- {0x1E00, 0xFE00, "sub\t%0-2r, %3-5r, #%6-8d"},
- /* format 8 */
- {0x5200, 0xFE00, "strh\t%0-2r, [%3-5r, %6-8r]"},
- {0x5A00, 0xFE00, "ldrh\t%0-2r, [%3-5r, %6-8r]"},
- {0x5600, 0xF600, "ldrs%11?hb\t%0-2r, [%3-5r, %6-8r]"},
- /* format 7 */
- {0x5000, 0xFA00, "str%10'b\t%0-2r, [%3-5r, %6-8r]"},
- {0x5800, 0xFA00, "ldr%10'b\t%0-2r, [%3-5r, %6-8r]"},
- /* format 1 */
- {0x0000, 0xF800, "lsl\t%0-2r, %3-5r, #%6-10d"},
- {0x0800, 0xF800, "lsr\t%0-2r, %3-5r, #%6-10d"},
- {0x1000, 0xF800, "asr\t%0-2r, %3-5r, #%6-10d"},
- /* format 3 */
- {0x2000, 0xF800, "mov\t%8-10r, #%0-7d"},
- {0x2800, 0xF800, "cmp\t%8-10r, #%0-7d"},
- {0x3000, 0xF800, "add\t%8-10r, #%0-7d"},
- {0x3800, 0xF800, "sub\t%8-10r, #%0-7d"},
- /* format 6 */
- {0x4800, 0xF800, "ldr\t%8-10r, [pc, #%0-7W]\t(%0-7a)"}, /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
- /* format 9 */
- {0x6000, 0xF800, "str\t%0-2r, [%3-5r, #%6-10W]"},
- {0x6800, 0xF800, "ldr\t%0-2r, [%3-5r, #%6-10W]"},
- {0x7000, 0xF800, "strb\t%0-2r, [%3-5r, #%6-10d]"},
- {0x7800, 0xF800, "ldrb\t%0-2r, [%3-5r, #%6-10d]"},
- /* format 10 */
- {0x8000, 0xF800, "strh\t%0-2r, [%3-5r, #%6-10H]"},
- {0x8800, 0xF800, "ldrh\t%0-2r, [%3-5r, #%6-10H]"},
- /* format 11 */
- {0x9000, 0xF800, "str\t%8-10r, [sp, #%0-7W]"},
- {0x9800, 0xF800, "ldr\t%8-10r, [sp, #%0-7W]"},
- /* format 12 */
- {0xA000, 0xF800, "add\t%8-10r, pc, #%0-7W\t(adr %8-10r,%0-7a)"},
- {0xA800, 0xF800, "add\t%8-10r, sp, #%0-7W"},
- /* format 15 */
- {0xC000, 0xF800, "stmia\t%8-10r!,%M"},
- {0xC800, 0xF800, "ldmia\t%8-10r!,%M"},
- /* format 18 */
- {0xE000, 0xF800, "b\t%0-10B"},
- {0xE800, 0xF800, "undefined"},
- /* format 19 */
- {0xF000, 0xF800, ""}, /* special processing required in disassembler */
- {0xF800, 0xF800, "second half of BL instruction %0-15x"},
- /* format 16 */
- {0xD000, 0xFF00, "beq\t%0-7B"},
- {0xD100, 0xFF00, "bne\t%0-7B"},
- {0xD200, 0xFF00, "bcs\t%0-7B"},
- {0xD300, 0xFF00, "bcc\t%0-7B"},
- {0xD400, 0xFF00, "bmi\t%0-7B"},
- {0xD500, 0xFF00, "bpl\t%0-7B"},
- {0xD600, 0xFF00, "bvs\t%0-7B"},
- {0xD700, 0xFF00, "bvc\t%0-7B"},
- {0xD800, 0xFF00, "bhi\t%0-7B"},
- {0xD900, 0xFF00, "bls\t%0-7B"},
- {0xDA00, 0xFF00, "bge\t%0-7B"},
- {0xDB00, 0xFF00, "blt\t%0-7B"},
- {0xDC00, 0xFF00, "bgt\t%0-7B"},
- {0xDD00, 0xFF00, "ble\t%0-7B"},
- /* format 17 */
- {0xDE00, 0xFF00, "bal\t%0-7B"},
- {0xDF00, 0xFF00, "swi\t%0-7d"},
- /* format 9 */
- {0x6000, 0xF800, "str\t%0-2r, [%3-5r, #%6-10W]"},
- {0x6800, 0xF800, "ldr\t%0-2r, [%3-5r, #%6-10W]"},
- {0x7000, 0xF800, "strb\t%0-2r, [%3-5r, #%6-10d]"},
- {0x7800, 0xF800, "ldrb\t%0-2r, [%3-5r, #%6-10d]"},
- /* the rest */
- {0x0000, 0x0000, "undefined instruction %0-15x"},
- {0x0000, 0x0000, 0}
-};
-
-#define BDISP23(x) ((((((x) & 0x07ff) << 11) | (((x) & 0x07ff0000) >> 16)) \
- ^ 0x200000) - 0x200000) /* 23bit */
-
diff --git a/contrib/binutils/opcodes/cgen-asm.c b/contrib/binutils/opcodes/cgen-asm.c
index 7231e2d7aedf..2609de3927a0 100644
--- a/contrib/binutils/opcodes/cgen-asm.c
+++ b/contrib/binutils/opcodes/cgen-asm.c
@@ -1,6 +1,7 @@
/* CGEN generic assembler support code.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU Binutils and GDB, the GNU debugger.
@@ -16,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
#include <stdio.h>
diff --git a/contrib/binutils/opcodes/cgen-asm.in b/contrib/binutils/opcodes/cgen-asm.in
index 420f640ec3be..ea7fb3b9b7a9 100644
--- a/contrib/binutils/opcodes/cgen-asm.in
+++ b/contrib/binutils/opcodes/cgen-asm.in
@@ -1,26 +1,27 @@
/* 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
+ 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 Free Software Foundation, Inc.
+ 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 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 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.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation, Inc.,
+ 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. */
@@ -421,30 +422,3 @@ const CGEN_INSN *
return NULL;
}
}
-
-#if 0 /* This calls back to GAS which we can't do without care. */
-
-/* Record each member of OPVALS in the assembler's symbol table.
- This lets GAS parse registers for us.
- ??? Interesting idea but not currently used. */
-
-/* Record each member of OPVALS in the assembler's symbol table.
- FIXME: Not currently used. */
-
-void
-@arch@_cgen_asm_hash_keywords (CGEN_CPU_DESC cd, CGEN_KEYWORD *opvals)
-{
- CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
- const CGEN_KEYWORD_ENTRY * ke;
-
- while ((ke = cgen_keyword_search_next (& search)) != NULL)
- {
-#if 0 /* Unnecessary, should be done in the search routine. */
- if (! @arch@_cgen_opval_supported (ke))
- continue;
-#endif
- cgen_asm_record_register (cd, ke->name, ke->value);
- }
-}
-
-#endif /* 0 */
diff --git a/contrib/binutils/opcodes/cgen-dis.c b/contrib/binutils/opcodes/cgen-dis.c
index ca621dec2d3e..cf23ebcabf20 100644
--- a/contrib/binutils/opcodes/cgen-dis.c
+++ b/contrib/binutils/opcodes/cgen-dis.c
@@ -1,6 +1,6 @@
/* CGEN generic disassembler support code.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of the GNU Binutils and GDB, the GNU debugger.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
#include <stdio.h>
diff --git a/contrib/binutils/opcodes/cgen-dis.in b/contrib/binutils/opcodes/cgen-dis.in
index 1a3c0fa59d6b..5f29e2852f88 100644
--- a/contrib/binutils/opcodes/cgen-dis.in
+++ b/contrib/binutils/opcodes/cgen-dis.in
@@ -1,27 +1,27 @@
/* 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
+ 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
-Free Software Foundation, Inc.
+ 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 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 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.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation, Inc.,
+ 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. */
@@ -43,20 +43,20 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
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);
+ (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);
+ (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 *, char *, unsigned);
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, bfd_byte *, unsigned);
static int default_print_insn
- (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *) ATTRIBUTE_UNUSED;
static int read_insn
- (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, bfd_byte *, int, CGEN_EXTRACT_INFO *,
unsigned long *);
-/* -- disassembler routines inserted here */
+/* -- disassembler routines inserted here. */
/* Default print handler. */
@@ -101,7 +101,7 @@ print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
/* Print the operand as directed by the attributes. */
if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
- ; /* nothing to do */
+ ; /* 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))
@@ -177,12 +177,13 @@ static int
read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
bfd_vma pc,
disassemble_info *info,
- char *buf,
+ 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);
@@ -207,7 +208,7 @@ static int
print_insn (CGEN_CPU_DESC cd,
bfd_vma pc,
disassemble_info *info,
- char *buf,
+ bfd_byte *buf,
unsigned int buflen)
{
CGEN_INSN_INT insn_value;
@@ -231,7 +232,7 @@ print_insn (CGEN_CPU_DESC cd,
/* The instructions are stored in hash lists.
Pick the first one and keep trying until we find the right one. */
- insn_list = CGEN_DIS_LOOKUP_INSN (cd, buf, insn_value);
+ insn_list = CGEN_DIS_LOOKUP_INSN (cd, (char *) buf, insn_value);
while (insn_list != NULL)
{
const CGEN_INSN *insn = insn_list->insn;
@@ -287,13 +288,13 @@ print_insn (CGEN_CPU_DESC cd,
length = CGEN_EXTRACT_FN (cd, insn)
(cd, insn, &ex_info, insn_value_cropped, &fields, pc);
- /* length < 0 -> error */
+ /* 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 */
+ /* Length is in bits, result is in bytes. */
return length / 8;
}
}
@@ -315,7 +316,7 @@ print_insn (CGEN_CPU_DESC cd,
static int
default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
{
- char buf[CGEN_MAX_INSN_SIZE];
+ bfd_byte buf[CGEN_MAX_INSN_SIZE];
int buflen;
int status;
@@ -343,9 +344,10 @@ default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
Print one instruction from PC on INFO->STREAM.
Return the size of the instruction (in bytes). */
-typedef struct cpu_desc_list {
+typedef struct cpu_desc_list
+{
struct cpu_desc_list *next;
- int isa;
+ CGEN_BITSET *isa;
int mach;
int endian;
CGEN_CPU_DESC cd;
@@ -357,11 +359,12 @@ print_insn_@arch@ (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 int prev_isa;
+ static CGEN_BITSET *prev_isa;
static int prev_mach;
static int prev_endian;
int length;
- int isa,mach;
+ CGEN_BITSET *isa;
+ int mach;
int endian = (info->endian == BFD_ENDIAN_BIG
? CGEN_ENDIAN_BIG
: CGEN_ENDIAN_LITTLE);
@@ -384,25 +387,34 @@ print_insn_@arch@ (bfd_vma pc, disassemble_info *info)
#endif
#ifdef CGEN_COMPUTE_ISA
- isa = CGEN_COMPUTE_ISA (info);
+ {
+ 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
- && (isa != prev_isa
+ && (cgen_bitset_compare (isa, prev_isa) != 0
|| mach != prev_mach
|| endian != prev_endian))
{
cd = 0;
for (cl = cd_list; cl; cl = cl->next)
{
- if (cl->isa == isa &&
+ if (cgen_bitset_compare (cl->isa, isa) == 0 &&
cl->mach == mach &&
cl->endian == endian)
{
cd = cl->cd;
+ prev_isa = cd->isas;
break;
}
}
@@ -418,7 +430,7 @@ print_insn_@arch@ (bfd_vma pc, disassemble_info *info)
abort ();
mach_name = arch_type->printable_name;
- prev_isa = isa;
+ prev_isa = cgen_bitset_copy (isa);
prev_mach = mach;
prev_endian = endian;
cd = @arch@_cgen_cpu_open (CGEN_CPU_OPEN_ISAS, prev_isa,
@@ -428,10 +440,10 @@ print_insn_@arch@ (bfd_vma pc, disassemble_info *info)
if (!cd)
abort ();
- /* save this away for future reference */
+ /* Save this away for future reference. */
cl = xmalloc (sizeof (struct cpu_desc_list));
cl->cd = cd;
- cl->isa = isa;
+ cl->isa = prev_isa;
cl->mach = mach;
cl->endian = endian;
cl->next = cd_list;
diff --git a/contrib/binutils/opcodes/cgen-ibld.in b/contrib/binutils/opcodes/cgen-ibld.in
index 316f183c41e4..626e655fef7c 100644
--- a/contrib/binutils/opcodes/cgen-ibld.in
+++ b/contrib/binutils/opcodes/cgen-ibld.in
@@ -1,25 +1,26 @@
/* Instruction building/extraction support for @arch@. -*- C -*-
-THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
-- the resultant file is machine generated, cgen-ibld.in isn't
+ 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 Free Software Foundation, Inc.
+ 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 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 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.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation, Inc.,
+ 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. */
@@ -35,9 +36,9 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "opintl.h"
#include "safe-ctype.h"
-#undef min
+#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef max
+#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
/* Used by the ifield rtx function. */
@@ -136,12 +137,6 @@ insert_normal (CGEN_CPU_DESC cd,
if (length == 0)
return NULL;
-#if 0
- if (CGEN_INT_INSN_P
- && word_offset != 0)
- abort ();
-#endif
-
if (word_length > 32)
abort ();
@@ -173,13 +168,21 @@ insert_normal (CGEN_CPU_DESC cd,
else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
{
unsigned long maxval = mask;
-
- if ((unsigned long) value > maxval)
+ 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 (%lu not between 0 and %lu)"),
- value, maxval);
+ _("operand out of range (0x%lx not between 0 and 0x%lx)"),
+ val, maxval);
return errbuf;
}
}
@@ -286,7 +289,7 @@ insert_insn_normal (CGEN_CPU_DESC cd,
#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. */
+ because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
@@ -304,6 +307,7 @@ put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
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);
}
}
@@ -374,9 +378,7 @@ extract_1 (CGEN_CPU_DESC cd,
{
unsigned long x;
int shift;
-#if 0
- int big_p = CGEN_CPU_INSN_ENDIAN (cd) == CGEN_ENDIAN_BIG;
-#endif
+
x = cgen_get_insn_value (cd, bufp, word_length);
if (CGEN_INSN_LSB0_P)
@@ -439,12 +441,6 @@ extract_normal (CGEN_CPU_DESC cd,
return 1;
}
-#if 0
- if (CGEN_INT_INSN_P
- && word_offset != 0)
- abort ();
-#endif
-
if (word_length > 32)
abort ();
@@ -452,9 +448,8 @@ extract_normal (CGEN_CPU_DESC cd,
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;
+ 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? */
@@ -539,4 +534,4 @@ extract_insn_normal (CGEN_CPU_DESC cd,
return CGEN_INSN_BITSIZE (insn);
}
-/* machine generated code added here */
+/* Machine generated code added here. */
diff --git a/contrib/binutils/opcodes/cgen-opc.c b/contrib/binutils/opcodes/cgen-opc.c
index 882b34898bed..d34aac826cf6 100644
--- a/contrib/binutils/opcodes/cgen-opc.c
+++ b/contrib/binutils/opcodes/cgen-opc.c
@@ -1,6 +1,6 @@
/* CGEN generic opcode support.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
Free Software Foundation, Inc.
This file is part of the GNU Binutils and GDB, the GNU debugger.
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
#include <stdio.h>
@@ -157,7 +157,7 @@ cgen_keyword_search_init (CGEN_KEYWORD *kt, const char *spec)
{
CGEN_KEYWORD_SEARCH search;
- /* FIXME: Need to specify format of PARAMS. */
+ /* FIXME: Need to specify format of params. */
if (spec != NULL)
abort ();
@@ -483,7 +483,7 @@ cgen_lookup_insn (CGEN_CPU_DESC cd,
/* The instructions are stored in hash lists.
Pick the first one and keep trying until we find the right one. */
- insn_list = cgen_dis_lookup_insn (cd, buf, base_insn);
+ insn_list = cgen_dis_lookup_insn (cd, (char *) buf, base_insn);
while (insn_list != NULL)
{
insn = insn_list->insn;
diff --git a/contrib/binutils/opcodes/cgen.sh b/contrib/binutils/opcodes/cgen.sh
index 5a340b6e527f..1f331be546f8 100644
--- a/contrib/binutils/opcodes/cgen.sh
+++ b/contrib/binutils/opcodes/cgen.sh
@@ -1,7 +1,7 @@
#! /bin/sh
# CGEN generic assembler support code.
#
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright 2000, 2003, 2005 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils and GDB, the GNU debugger.
#
@@ -17,7 +17,7 @@
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+# 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#
# Generate CGEN opcode files: arch-desc.[ch], arch-opc.[ch],
# arch-asm.c, arch-dis.c, arch-opinst.c, arch-ibld.[ch].
@@ -47,7 +47,7 @@ set -e
action=$1
srcdir=$2
-cgen=$3
+cgen="$3"
cgendir=$4
cgenflags=$5
arch=$6
@@ -93,7 +93,7 @@ opcodes)
rm -f tmp-dis.c tmp-dis.in1
# Run CGEN.
- ${cgen} -s ${cgendir}/cgen-opc.scm \
+ ${cgen} ${cgendir}/cgen-opc.scm \
-s ${cgendir} \
${cgenflags} \
-f "${options}" \
diff --git a/contrib/binutils/opcodes/config.in b/contrib/binutils/opcodes/config.in
index 5caef5503ed9..9d143c337287 100644
--- a/contrib/binutils/opcodes/config.in
+++ b/contrib/binutils/opcodes/config.in
@@ -1,132 +1,166 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-#undef C_ALLOCA
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
-/* Define to empty if the keyword does not work. */
-#undef const
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
-/* Define if you have alloca, as a function or macro. */
+/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
#undef HAVE_ALLOCA_H
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define to 1 if you have the declaration of `basename', and to 0 if you
+ don't. */
+#undef HAVE_DECL_BASENAME
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
-/* Define if you have the munmap function. */
+/* 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 if you have the putenv function. */
+/* 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 if you have the setenv function. */
+/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
-/* Define if you have the setlocale function. */
+/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
-/* Define if you have the stpcpy function. */
+/* 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 if you have the strcasecmp function. */
+/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
-/* Define if you have the strchr function. */
+/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
+/* Define to 1 if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
-/* Define if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
-/* Define if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
-/* Define if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
/* Name of package */
#undef PACKAGE
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* 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 if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
+/* 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 as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
+/* 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 4a95a9a6060c..b692e8381603 100755
--- a/contrib/binutils/opcodes/configure
+++ b/contrib/binutils/opcodes/configure
@@ -1,55 +1,325 @@
#! /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
-# Defaults:
-ac_help=
+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
+
+
+# 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-shared[=PKGS] build shared libraries [default=no]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-ac_help="$ac_help
- --enable-targets alternative target configurations"
-ac_help="$ac_help
- --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
-ac_help="$ac_help
- --enable-build-warnings Enable build-time compiler warnings if gcc is used"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-install-libbfd controls installation of libbfd and related headers"
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
- --enable-cgen-maint[=dir] build cgen generated files"
+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="z8k-dis.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# 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_files=''
# 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
@@ -57,12 +327,16 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
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'
@@ -76,17 +350,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"
@@ -94,59 +360,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- \
@@ -155,96 +421,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
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$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 \
@@ -253,19 +470,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 \
@@ -279,26 +496,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 \
@@ -315,7 +532,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)
@@ -325,7 +542,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 \
@@ -336,63 +553,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-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
+ 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.
@@ -403,99 +614,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; }
-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
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 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
+
+# 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
-# 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
+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=z8k-dis.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ 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=..
@@ -505,123 +727,599 @@ 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; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(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_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+#
+# 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]
+ --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
+ --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-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
+ --disable-nls do not use Native Language Support
+ --enable-cgen-maint=dir build cgen generated files
+
+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
+
+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>
+ CPP C preprocessor
+
+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
+
+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
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ 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
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- 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
+
+
+
+
+
+
+
+
+
+
+
+
+
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:565: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 570 "configure"
-#include "confdefs.h"
-int main() {
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:598: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 603 "configure"
-#include "confdefs.h"
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
ac_aux_dir=
@@ -634,146 +1332,1159 @@ 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/'`
+
+
+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
+ 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/'`
-# 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; } ;;
-esac
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+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
-# 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
+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
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:675: checking host system type" >&5
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
+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
-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:696: 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
+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
-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:714: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+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
-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
+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 "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+ 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
- echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:738: checking for strerror in -lcposix" >&5
-ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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_save_LIBS="$LIBS"
-LIBS="-lcposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 746 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror();
+ 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
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ 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); }
+
+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
+ 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 "$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 -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+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
+ 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.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
+ 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
+
+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
+ 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
+
+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*
-LIBS="$ac_save_LIBS"
+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
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lcposix"
+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
+
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ 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_search_strerror="none required"
+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 "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ 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_search_strerror="-l$ac_lib"
+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_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
+fi
# We currently only use the version number for the name of any shared
@@ -781,6 +2492,7 @@ fi
# number that BFD is using.
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
+am__api_version="1.9"
# 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:
@@ -788,336 +2500,742 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# 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:797: 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
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ 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 build environment is sane""... $ac_c" 1>&6
-echo "configure:850: checking whether build environment is sane" >&5
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
-echo timestamp > conftestfile
+echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
+ set X `ls -t $srcdir/configure conftest.file`
fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
fi
- test "$2" = conftestfile
+ test "$2" = conftest.file
)
then
# Ok.
:
else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
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
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+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_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+ test -n "$AWK" && break
+done
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:907: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftestmake <<\EOF
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
-rm -f conftestmake
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
+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
+
+DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
-PACKAGE=opcodes
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
-VERSION=${BFD_VERSION}
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
fi
-cat >> confdefs.h <<EOF
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=opcodes
+ VERSION=${BFD_VERSION}
+
+
+cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
-EOF
+_ACEOF
+
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
-EOF
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:953: checking for working aclocal" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
- echo "$ac_t""found" 1>&6
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ 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
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:966: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
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
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:979: checking for working automake" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
- echo "$ac_t""found" 1>&6
+ 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
- AUTOMAKE="$missing_dir/missing automake"
- echo "$ac_t""missing" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:992: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
+ STRIP=$ac_ct_STRIP
else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1005: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
+ am_cv_CC_dependencies_compiler_type=none
fi
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
else
- ac_tool_prefix=
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
fi
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+
+
+
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1028: 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="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+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"
+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"; 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
+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
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1060: 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="${ac_tool_prefix}ranlib"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1092: 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_ac_ct_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.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
@@ -1142,8 +3260,7 @@ no) enable_shared=no ;;
esac
else
enable_shared=no
-fi
-
+fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
@@ -1166,8 +3283,7 @@ no) enable_static=no ;;
esac
else
enable_static=yes
-fi
-
+fi;
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
@@ -1189,229 +3305,7 @@ no) enable_fast_install=no ;;
esac
else
enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1198: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1228: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1279: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1311: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1322 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1353: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1358: 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:1367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1386: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
+fi;
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
@@ -1419,13 +3313,12 @@ if test "${with_gnu_ld+set}" = set; then
test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi
-
+fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1429: checking for ld used by GCC" >&5
+ 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
@@ -1454,14 +3347,14 @@ echo "configure:1429: checking for ld used by GCC" >&5
;;
esac
elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1459: checking for GNU ld" >&5
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1462: checking for non-GNU ld" >&5
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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-:}"
@@ -1487,15 +3380,19 @@ fi
LD="$lt_cv_path_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
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1497: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
@@ -1504,27 +3401,27 @@ else
lt_cv_prog_gnu_ld=no
fi
fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+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 $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1514: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+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 $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1526: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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.
@@ -1557,33 +3454,24 @@ fi
fi
NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
+echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1564: 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
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1585: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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=
@@ -1620,6 +3508,7 @@ cygwin* | mingw* |pw32*)
;;
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
@@ -1630,9 +3519,10 @@ darwin* | rhapsody*)
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd* )
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -1690,17 +3580,10 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case $host_cpu in
- alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+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
@@ -1748,78 +3631,85 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+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
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1758: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
+# 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
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1784: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
fi
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
+if test -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
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1821: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
/*)
@@ -1871,17 +3761,19 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1883: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
/*)
@@ -1933,9 +3825,11 @@ fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
else
@@ -1947,138 +3841,164 @@ fi
;;
esac
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1954: 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="${ac_tool_prefix}ranlib"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1986: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_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_ac_ct_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.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2021: 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="${ac_tool_prefix}strip"
- 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="${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"
+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"; then
-if test -n "$ac_tool_prefix"; 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2053: 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_ac_ct_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.
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+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
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+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 "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ STRIP=$ac_ct_STRIP
else
- STRIP=":"
-fi
+ STRIP="$ac_cv_prog_STRIP"
fi
@@ -2094,20 +4014,19 @@ 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
+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
-
+fi;
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
@@ -2116,8 +4035,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2120 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ 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*)
@@ -2150,7 +4073,11 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ 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"
@@ -2163,51 +4090,124 @@ ia64-*-hpux*)
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 $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2172: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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
-# 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_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 <<EOF
-#line 2185 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
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_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 "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+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"
@@ -2219,54 +4219,61 @@ esac
# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
+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
-
# 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" \
@@ -2276,15 +4283,26 @@ 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 "configure: error: libtool configure failed" 1>&2; exit 1; }
+|| { { 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
- 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
@@ -2298,75 +4316,109 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# 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 "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ 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.
+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 "configure: error: bad value ${enableval} for opcodes commonbfdlib option" 1>&2; exit 1; } ;;
+ *) { { 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
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
+fi;
+
+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 "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
+ { { 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 $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2360: 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
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
@@ -2375,11 +4427,27 @@ else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
+
MAINT=$MAINTAINER_MODE_TRUE
-
-echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
-echo "configure:2383: checking whether to install libbfd" >&5
+
+ 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"
@@ -2390,10 +4458,10 @@ else
else
install_libbfd_p=no
fi
-fi
+fi;
+ echo "$as_me:$LINENO: result: $install_libbfd_p" >&5
+echo "${ECHO_T}$install_libbfd_p" >&6
- echo "$ac_t""$install_libbfd_p" 1>&6
-
if test $install_libbfd_p = yes; then
INSTALL_LIBBFD_TRUE=
@@ -2402,427 +4470,1158 @@ 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_alias)/$(target_alias)/lib'
- bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
+ bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
+ bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
fi
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2420: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+# 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 "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+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
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+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
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
+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
-# host-specific stuff:
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2456: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 "$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 "$ac_t""no" 1>&6
+ 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:2486: 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:2537: 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:2569: 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
+
+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. */
-cat > conftest.$ac_ext << EOF
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
-#line 2580 "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
+ 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. */
-main(){return(0);}
-EOF
-if { (eval echo configure:2585: \"$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
+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
- ac_cv_prog_cc_cross=yes
+ CFLAGS="-g"
fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
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 "$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
-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:2611: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2616: 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;
+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
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+_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
- ac_cv_prog_gcc=no
-fi
+ 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
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+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
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
else
- GCC=
+ 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_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2644: 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
+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
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
+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
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
+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 "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
+ 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
-ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl"
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2678: checking how to run the C preprocessor" >&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
+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 eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
+ # 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.
- cat > conftest.$ac_ext <<EOF
-#line 2693 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2699: \"$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
- :
+ # 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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 2710 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2716: \"$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
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 2727 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2733: \"$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
- :
+ 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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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*
+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
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+
+ done
+ ac_cv_prog_CPP=$CPP
+
fi
- CPP="$ac_cv_prog_CPP"
+ CPP=$ac_cv_prog_CPP
else
- ac_cv_prog_CPP="$CPP"
+ ac_cv_prog_CPP=$CPP
fi
-echo "$ac_t""$CPP" 1>&6
-
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2760: 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: 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
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+ 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
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+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 "$ac_t""no" 1>&6
+ { { 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
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2788: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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
- cat > conftest.$ac_ext <<EOF
-#line 2793 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2801: \"$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*
+
+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 "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest*
+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 <<EOF
-#line 2818 "configure"
-#include "confdefs.h"
+ 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>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2831,16 +5630,19 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2836 "configure"
-#include "confdefs.h"
+ 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>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -2849,269 +5651,530 @@ 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
+ if test "$cross_compiling" = yes; then
:
else
- cat > conftest.$ac_ext <<EOF
-#line 2857 "configure"
-#include "confdefs.h"
+ 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>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#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
-EOF
-if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
+ 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 -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
-EOF
+_ACEOF
fi
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2892: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2897 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
+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. */
-; return 0; }
-EOF
-if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+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 <<\EOF
-#define const
-EOF
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
fi
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2967: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 2974 "configure"
-#include "confdefs.h"
+ 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
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:2981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+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
+
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
+ *)
+ 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
+_ACEOF
+ ;;
esac
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3007: checking for off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+# 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 <<EOF
-#line 3012 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ 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
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
+ 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 "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3040: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3045 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+ 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
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
+ 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 "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3075: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3080 "configure"
-#include "confdefs.h"
+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 = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
+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
-EOF
+_ACEOF
fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3108: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3113 "configure"
-#include "confdefs.h"
-
+ 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
@@ -3133,137 +6196,217 @@ char *alloca ();
# endif
#endif
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
fi
-rm -f conftest*
+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
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
-if test $ac_cv_func_alloca_works = no; then
+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 <<\EOF
+# 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
-EOF
+_ACEOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3173: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3178 "configure"
-#include "confdefs.h"
+ 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
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
- rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+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
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3203: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3208 "configure"
-#include "confdefs.h"
+ 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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
+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
-EOF
+_ACEOF
- break
-else
- echo "$ac_t""no" 1>&6
+ break
fi
-done
+ done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3258: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3266 "configure"
-#include "confdefs.h"
+ 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;
@@ -3276,138 +6419,316 @@ find_stack_direction ()
else
return (&dummy > addr) ? 1 : -1;
}
+
+int
main ()
{
- exit (find_stack_direction() < 0);
+ exit (find_stack_direction () < 0);
}
-EOF
-if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ 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 -fr conftest*
+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
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
fi
-for ac_hdr in unistd.h
+
+
+for ac_header in stdlib.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3310: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3315 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3320: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3349: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3354 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3402: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3410 "configure"
-#include "confdefs.h"
+ 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:
@@ -3421,34 +6742,34 @@ else
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
+ 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
- propogated back to all the places they're supposed to be.
+ 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 <sys/types.h>
+
#include <fcntl.h>
#include <sys/mman.h>
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+#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. */
-# ifndef 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 */
-# ifdef HAVE_SYS_PARAM_H
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
@@ -3475,469 +6796,910 @@ else
#endif /* no HAVE_GETPAGESIZE */
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
-main()
+main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
+ 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);
}
-
-EOF
-if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ 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 -fr conftest*
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
fi
+rm -f conftest.mmap
+
+
+
+
+
+
+
+
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+
+
+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
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3578: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3583 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3588: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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 \
+
+
+
+
+
+
+
+
+
+
+for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3618: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3623 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
if test "${ac_cv_func_stpcpy+set}" != "set"; then
- for ac_func in stpcpy
+
+for ac_func in stpcpy
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3675: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3680 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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. */
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STPCPY 1
-EOF
+_ACEOF
fi
if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3737: checking for LC_MESSAGES" >&5
-if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3742 "configure"
-#include "confdefs.h"
+ 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() {
+int
+main ()
+{
return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+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 <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LC_MESSAGES 1
-EOF
+_ACEOF
fi
fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3770: 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.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
USE_NLS=$enableval
else
USE_NLS=yes
-fi
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
- echo "$ac_t""$USE_NLS" 1>&6
-
USE_INCLUDED_LIBINTL=no
if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
+ echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
+echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3790: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
+# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
nls_cv_force_use_gnu_gettext=$withval
else
nls_cv_force_use_gnu_gettext=no
-fi
-
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+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=NONE
-
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3809: checking for libintl.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3814 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3819: \"$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"
+_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
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3836: checking for gettext in libc" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+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 <<EOF
-#line 3841 "configure"
-#include "confdefs.h"
+ 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() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libc=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+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 $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3864: checking for bindtextdomain in -lintl" >&5
-ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ 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_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3872 "configure"
-#include "confdefs.h"
+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; }
-EOF
-if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3899: checking for gettext in libintl" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3904 "configure"
-#include "confdefs.h"
+ 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
+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() {
+int
+main ()
+{
return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gettext_libintl=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
- echo "$ac_t""no" 1>&6
+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
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GETTEXT 1
-EOF
+_ACEOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3939: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+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_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -3961,108 +7723,161 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
+
+for ac_func in dcgettext
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3973: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3978 "configure"
-#include "confdefs.h"
+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. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
+ 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
-int main() {
+#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
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+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
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4028: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+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_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ 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"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4064: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+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_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4086,44 +7901,75 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- cat > conftest.$ac_ext <<EOF
-#line 4096 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-int main() {
+int
+main ()
+{
extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ 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 "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CATOBJEXT=.mo
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CATOBJEXT=.mo
DATADIRNAME=lib
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
INSTOBJEXT=.mo
fi
fi
-
-else
- echo "$ac_t""no" 1>&6
+
fi
-
- if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
+
+
+ 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
@@ -4131,10 +7977,10 @@ fi
INTLOBJS="\$(GETTOBJS)"
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4136: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+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_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
/*)
@@ -4158,53 +8004,59 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4170: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+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_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GMSGFMT" in
- /*)
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ 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"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
+ echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$ac_t""no" 1>&6
+ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4206: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+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_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
/*)
@@ -4228,12 +8080,14 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
+ echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
@@ -4249,7 +8103,8 @@ fi
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
- echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
@@ -4274,25 +8129,32 @@ fi
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 $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4296: checking for catalogs to be installed" >&5
+ 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
@@ -4300,7 +8162,8 @@ echo "configure:4296: checking for catalogs to be installed" >&5
esac
done
LINGUAS=$NEW_LINGUAS
- echo "$ac_t""$LINGUAS" 1>&6
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
fi
if test -n "$LINGUAS"; then
@@ -4314,45 +8177,155 @@ echo "configure:4296: checking for catalogs to be installed" >&5
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
-
+
if test -f $srcdir/po2tbl.sed.in; then
if test "$CATOBJEXT" = ".cat"; then
- ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4324: checking for linux/version.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4329 "configure"
-#include "confdefs.h"
+ 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>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4334: \"$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"
+_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=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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: 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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+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
- echo "$ac_t""no" 1>&6
-msgformat=xopen
+ msgformat=xopen
fi
+
sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
fi
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
@@ -4366,14 +8339,14 @@ fi
GT_NO=
GT_YES="#YES#"
fi
-
-
+
+
MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
+
l=
-
+
if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
@@ -4390,7 +8363,7 @@ fi
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
fi
-
+
. ${srcdir}/../bfd/configure.host
@@ -4407,10 +8380,10 @@ fi
if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
- echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4412: checking for build system executable suffix" >&5
-if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking for build system executable suffix" >&5
+echo $ECHO_N "checking for build system executable suffix... $ECHO_C" >&6
+if test "${bfd_cv_build_exeext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.c
@@ -4425,8 +8398,8 @@ else
rm -f conftest*
test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
fi
-
-echo "$ac_t""$bfd_cv_build_exeext" 1>&6
+echo "$as_me:$LINENO: result: $bfd_cv_build_exeext" >&5
+echo "${ECHO_T}$bfd_cv_build_exeext" >&6
EXEEXT_FOR_BUILD=""
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
@@ -4440,105 +8413,305 @@ fi
# 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:4449: 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
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ 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'
-for ac_hdr in string.h strings.h stdlib.h
+
+
+
+for ac_header in string.h strings.h stdlib.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4506: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4511 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4516: \"$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"
+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
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
fi
-rm -f conftest*
+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
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+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
- echo "$ac_t""no" 1>&6
+ 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
+echo "$as_me:$LINENO: checking whether basename is declared" >&5
+echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_basename+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 ()
+{
+#ifndef basename
+ char *p = (char *) basename;
+#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_have_decl_basename=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_basename=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
+echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
+if test $ac_cv_have_decl_basename = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_BASENAME 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_BASENAME 0
+_ACEOF
+
+
+fi
+
+
+
cgen_maint=no
cgendir='$(srcdir)/../cgen'
@@ -4556,8 +8729,7 @@ if test "${enable_cgen_maint+set}" = set; then
cgendir=${cgen_maint}/lib/cgen
;;
esac
-fi
-
+fi;
if test x${cgen_maint} = xyes; then
CGEN_MAINT_TRUE=
@@ -4568,6 +8740,7 @@ else
fi
+
using_cgen=no
# Horrible hacks to build DLLs on Windows.
@@ -4610,11 +8783,11 @@ do
. $srcdir/../bfd/config.bfd
selarchs="$selarchs $targ_archs"
fi
-done
+done
# Utility var, documents generic cgen support files.
-cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo"
+cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo cgen-bitset.lo"
# We don't do any links based on the target system, just makefile config.
@@ -4628,18 +8801,18 @@ if test x${all_targets} = xfalse ; then
ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
archdefs="$archdefs -DARCH_$ad"
case "$arch" in
- bfd_a29k_arch) ta="$ta a29k-dis.lo" ;;
- bfd_alliant_arch) ;;
bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo arc-ext.lo" ;;
bfd_arm_arch) ta="$ta arm-dis.lo" ;;
bfd_avr_arch) ta="$ta avr-dis.lo" ;;
- bfd_convex_arch) ;;
- bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo" ;;
+ bfd_bfin_arch) ta="$ta bfin-dis.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" ;;
bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
bfd_dlx_arch) ta="$ta dlx-dis.lo" ;;
bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;;
+ bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
bfd_h8300_arch) ta="$ta h8300-dis.lo" ;;
bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
@@ -4650,16 +8823,19 @@ if test x${all_targets} = xfalse ; then
bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;;
bfd_ip2k_arch) ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;;
bfd_iq2000_arch) ta="$ta iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo" using_cgen=yes ;;
+ bfd_m32c_arch) ta="$ta m32c-asm.lo m32c-desc.lo m32c-dis.lo m32c-ibld.lo m32c-opc.lo" using_cgen=yes ;;
bfd_m32r_arch) ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
bfd_m68hc11_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
bfd_m68hc12_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;;
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_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
bfd_mmix_arch) ta="$ta mmix-dis.lo mmix-opc.lo" ;;
bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
+ bfd_mt_arch) ta="$ta mt-asm.lo mt-desc.lo mt-dis.lo mt-ibld.lo mt-opc.lo" using_cgen=yes ;;
bfd_msp430_arch) ta="$ta msp430-dis.lo" ;;
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
@@ -4699,13 +8875,16 @@ if test x${all_targets} = xfalse ; then
bfd_vax_arch) ta="$ta vax-dis.lo" ;;
bfd_w65_arch) ta="$ta w65-dis.lo" ;;
bfd_we32k_arch) ;;
+ bfd_xc16x_arch) ta="$ta xc16x-asm.lo xc16x-desc.lo xc16x-dis.lo xc16x-ibld.lo xc16x-opc.lo" using_cgen=yes ;;
bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;;
bfd_xtensa_arch) ta="$ta xtensa-dis.lo" ;;
+ bfd_z80_arch) ta="$ta z80-dis.lo" ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
- bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
"") ;;
- *) { echo "configure: error: *** unknown target architecture $arch" 1>&2; exit 1; } ;;
+ *) { { echo "$as_me:$LINENO: error: *** unknown target architecture $arch" >&5
+echo "$as_me: error: *** unknown target architecture $arch" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
done
@@ -4743,431 +8922,1486 @@ fi
-trap '' 1 2 15
-cat > confcache <<\EOF
+ 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
-# 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
-
DEFS=-DHAVE_CONFIG_H
-# 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
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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 "${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
+echo "$as_me: error: conditional \"INSTALL_LIBBFD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${CGEN_MAINT_TRUE}" && test -z "${CGEN_MAINT_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"CGEN_MAINT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CGEN_MAINT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+: ${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
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ 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
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+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%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@CC@%$CC%g
-s%@LN_S@%$LN_S%g
-s%@OBJEXT@%$OBJEXT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@STRIP@%$STRIP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g
-s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g
-s%@bfdlibdir@%$bfdlibdir%g
-s%@bfdincludedir@%$bfdincludedir%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
-s%@HDEFINES@%$HDEFINES%g
-s%@CGEN_MAINT_TRUE@%$CGEN_MAINT_TRUE%g
-s%@CGEN_MAINT_FALSE@%$CGEN_MAINT_FALSE%g
-s%@cgendir@%$cgendir%g
-s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
-s%@WIN32LIBADD@%$WIN32LIBADD%g
-s%@archdefs@%$archdefs%g
-s%@BFD_MACHINES@%$BFD_MACHINES%g
-CEOF
-EOF
+# 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
-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
+# 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
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ 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 ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ 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
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ 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
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+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)
+ 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
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_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
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_ACEOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # 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" ;;
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+_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" ;;
+ "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" ;;
+ "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;}
+ { (exit 1); exit 1; }; };;
esac
+done
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# 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
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+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
+}
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+# 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,@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,@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,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+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,@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,@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,@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,@XGETTEXT@,$XGETTEXT,;t t
+s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;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,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@l@,$l,;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
+s,@CGEN_MAINT_TRUE@,$CGEN_MAINT_TRUE,;t t
+s,@CGEN_MAINT_FALSE@,$CGEN_MAINT_FALSE,;t t
+s,@cgendir@,$cgendir,;t t
+s,@WIN32LDFLAGS@,$WIN32LDFLAGS,;t t
+s,@WIN32LIBADD@,$WIN32LIBADD,;t t
+s,@archdefs@,$archdefs,;t t
+s,@BFD_MACHINES@,$BFD_MACHINES,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_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
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ 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
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_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
+ - | *:- | *:-:* ) # 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
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # 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
+ 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=.
+
+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
- 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 $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
+
+
+ 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
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; 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
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # 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; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ 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; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # 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
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ 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
+ 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; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
fi
-fi; done
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`(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'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ 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
+ 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=.
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
-exit 0
-EOF
+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.
+ 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
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$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 $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ 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 $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ default ) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (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/opcodes/configure.in b/contrib/binutils/opcodes/configure.in
index 89199243a2f4..d19d23cdbdca 100644
--- a/contrib/binutils/opcodes/configure.in
+++ b/contrib/binutils/opcodes/configure.in
@@ -1,10 +1,11 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.13)
-AC_INIT(z8k-dis.c)
+AC_PREREQ(2.59)
+AC_INIT
+AC_CONFIG_SRCDIR([z8k-dis.c])
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_ISC_POSIX
# We currently only use the version number for the name of any shared
@@ -30,7 +31,7 @@ AM_PROG_LIBTOOL
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
[case "${enableval}" in
- yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
+ yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all'])
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
@@ -43,26 +44,7 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
esac])dnl
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-AC_ARG_ENABLE(build-warnings,
-[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
-[case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi])dnl
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
-fi
-AC_SUBST(WARN_CFLAGS)
+AM_BINUTILS_WARNINGS
AM_CONFIG_HEADER(config.h:config.in)
@@ -78,7 +60,7 @@ AC_EXEEXT
AC_PROG_CC
-ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl"
+ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl fi vi ga zh_CN"
CY_GNU_GETTEXT
. ${srcdir}/../bfd/configure.host
@@ -90,6 +72,8 @@ AC_PROG_INSTALL
AC_CHECK_HEADERS(string.h strings.h stdlib.h)
+AC_CHECK_DECLS(basename)
+
cgen_maint=no
cgendir='$(srcdir)/../cgen'
@@ -155,7 +139,7 @@ done
# Utility var, documents generic cgen support files.
-cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo"
+cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo cgen-bitset.lo"
# We don't do any links based on the target system, just makefile config.
@@ -169,18 +153,18 @@ if test x${all_targets} = xfalse ; then
ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
archdefs="$archdefs -DARCH_$ad"
case "$arch" in
- bfd_a29k_arch) ta="$ta a29k-dis.lo" ;;
- bfd_alliant_arch) ;;
bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo arc-ext.lo" ;;
bfd_arm_arch) ta="$ta arm-dis.lo" ;;
bfd_avr_arch) ta="$ta avr-dis.lo" ;;
- bfd_convex_arch) ;;
- bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo" ;;
+ bfd_bfin_arch) ta="$ta bfin-dis.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" ;;
bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
bfd_dlx_arch) ta="$ta dlx-dis.lo" ;;
bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;;
+ bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
bfd_h8300_arch) ta="$ta h8300-dis.lo" ;;
bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
@@ -191,16 +175,19 @@ if test x${all_targets} = xfalse ; then
bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;;
bfd_ip2k_arch) ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;;
bfd_iq2000_arch) ta="$ta iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo" using_cgen=yes ;;
+ bfd_m32c_arch) ta="$ta m32c-asm.lo m32c-desc.lo m32c-dis.lo m32c-ibld.lo m32c-opc.lo" using_cgen=yes ;;
bfd_m32r_arch) ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
bfd_m68hc11_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
bfd_m68hc12_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;;
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_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
bfd_mmix_arch) ta="$ta mmix-dis.lo mmix-opc.lo" ;;
bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
+ bfd_mt_arch) ta="$ta mt-asm.lo mt-desc.lo mt-dis.lo mt-ibld.lo mt-opc.lo" using_cgen=yes ;;
bfd_msp430_arch) ta="$ta msp430-dis.lo" ;;
bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
@@ -240,10 +227,11 @@ if test x${all_targets} = xfalse ; then
bfd_vax_arch) ta="$ta vax-dis.lo" ;;
bfd_w65_arch) ta="$ta w65-dis.lo" ;;
bfd_we32k_arch) ;;
+ bfd_xc16x_arch) ta="$ta xc16x-asm.lo xc16x-desc.lo xc16x-dis.lo xc16x-ibld.lo xc16x-opc.lo" using_cgen=yes ;;
bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;;
bfd_xtensa_arch) ta="$ta xtensa-dis.lo" ;;
+ bfd_z80_arch) ta="$ta z80-dis.lo" ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
- bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
"") ;;
*) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
@@ -284,5 +272,6 @@ fi
AC_SUBST(archdefs)
AC_SUBST(BFD_MACHINES)
-AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
-[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
+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/dep-in.sed b/contrib/binutils/opcodes/dep-in.sed
index 94da2adc3409..081f99c1e087 100644
--- a/contrib/binutils/opcodes/dep-in.sed
+++ b/contrib/binutils/opcodes/dep-in.sed
@@ -4,6 +4,7 @@ s/\\\n */ /g
t loop
s!\.o:!.lo:!
+s! \./! !g
s! @BFD_H@! $(BFD_H)!g
s!@INCDIR@!$(INCDIR)!g
s!@TOPDIR@/include!$(INCDIR)!g
diff --git a/contrib/binutils/opcodes/dis-buf.c b/contrib/binutils/opcodes/dis-buf.c
index 83fbfbd7d21e..c2589ba03f1b 100644
--- a/contrib/binutils/opcodes/dis-buf.c
+++ b/contrib/binutils/opcodes/dis-buf.c
@@ -1,20 +1,21 @@
/* Disassemble from a buffer, for GNU.
- Copyright 1993, 1994, 1996, 1997, 1998, 1999, 2000
+ Copyright 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 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 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#include "sysdep.h"
#include "dis-asm.h"
@@ -24,11 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Get LENGTH bytes from info's buffer, at target address memaddr.
Transfer them to myaddr. */
int
-buffer_read_memory (memaddr, myaddr, length, info)
- bfd_vma memaddr;
- bfd_byte *myaddr;
- unsigned int length;
- struct disassemble_info *info;
+buffer_read_memory (bfd_vma memaddr,
+ bfd_byte *myaddr,
+ unsigned int length,
+ struct disassemble_info *info)
{
unsigned int opb = info->octets_per_byte;
unsigned int end_addr_offset = length / opb;
@@ -46,20 +46,25 @@ buffer_read_memory (memaddr, myaddr, length, info)
/* Print an error message. We can assume that this is in response to
an error return from buffer_read_memory. */
+
void
-perror_memory (status, memaddr, info)
- int status;
- bfd_vma memaddr;
- struct disassemble_info *info;
+perror_memory (int status,
+ bfd_vma memaddr,
+ struct disassemble_info *info)
{
if (status != EIO)
/* Can't happen. */
info->fprintf_func (info->stream, _("Unknown error %d\n"), status);
else
- /* Actually, address between memaddr and memaddr + len was
- out of bounds. */
- info->fprintf_func (info->stream,
- _("Address 0x%x is out of bounds.\n"), memaddr);
+ {
+ char buf[30];
+
+ /* Actually, address between memaddr and memaddr + len was
+ out of bounds. */
+ sprintf_vma (buf, memaddr);
+ info->fprintf_func (info->stream,
+ _("Address 0x%s is out of bounds.\n"), buf);
+ }
}
/* This could be in a separate file, to save miniscule amounts of space
@@ -70,9 +75,7 @@ perror_memory (status, memaddr, info)
addresses). */
void
-generic_print_address (addr, info)
- bfd_vma addr;
- struct disassemble_info *info;
+generic_print_address (bfd_vma addr, struct disassemble_info *info)
{
char buf[30];
@@ -80,39 +83,11 @@ generic_print_address (addr, info)
(*info->fprintf_func) (info->stream, "0x%s", buf);
}
-#if 0
-/* Just concatenate the address as hex. This is included for
- completeness even though both GDB and objdump provide their own (to
- print symbolic addresses). */
-
-void generic_strcat_address PARAMS ((bfd_vma, char *, int));
-
-void
-generic_strcat_address (addr, buf, len)
- bfd_vma addr;
- char *buf;
- int len;
-{
- if (buf != (char *)NULL && len > 0)
- {
- char tmpBuf[30];
-
- sprintf_vma (tmpBuf, addr);
- if ((strlen (buf) + strlen (tmpBuf)) <= (unsigned int) len)
- strcat (buf, tmpBuf);
- else
- strncat (buf, tmpBuf, (len - strlen(buf)));
- }
- return;
-}
-#endif
-
/* Just return true. */
int
-generic_symbol_at_address (addr, info)
- bfd_vma addr ATTRIBUTE_UNUSED;
- struct disassemble_info *info ATTRIBUTE_UNUSED;
+generic_symbol_at_address (bfd_vma addr ATTRIBUTE_UNUSED,
+ struct disassemble_info *info ATTRIBUTE_UNUSED)
{
return 1;
}
diff --git a/contrib/binutils/opcodes/dis-init.c b/contrib/binutils/opcodes/dis-init.c
index 35a5ee720b80..8bb069a1ada6 100644
--- a/contrib/binutils/opcodes/dis-init.c
+++ b/contrib/binutils/opcodes/dis-init.c
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "sysdep.h"
#include "dis-asm.h"
diff --git a/contrib/binutils/opcodes/disassemble.c b/contrib/binutils/opcodes/disassemble.c
index d5b17be32531..3ea45830334e 100644
--- a/contrib/binutils/opcodes/disassemble.c
+++ b/contrib/binutils/opcodes/disassemble.c
@@ -1,34 +1,37 @@
/* Select disassembly routine for specified architecture.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 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 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
#include "dis-asm.h"
#ifdef ARCH_all
-#define ARCH_a29k
#define ARCH_alpha
#define ARCH_arc
#define ARCH_arm
#define ARCH_avr
+#define ARCH_bfin
#define ARCH_cris
+#define ARCH_crx
#define ARCH_d10v
#define ARCH_d30v
#define ARCH_dlx
+#define ARCH_fr30
+#define ARCH_frv
#define ARCH_h8300
#define ARCH_h8500
#define ARCH_hppa
@@ -36,19 +39,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_i386
#define ARCH_i860
#define ARCH_i960
-#define ARCH_ip2k
#define ARCH_ia64
-#define ARCH_fr30
+#define ARCH_ip2k
+#define ARCH_iq2000
+#define ARCH_m32c
#define ARCH_m32r
-#define ARCH_m68k
#define ARCH_m68hc11
#define ARCH_m68hc12
+#define ARCH_m68k
#define ARCH_m88k
+#define ARCH_maxq
#define ARCH_mcore
#define ARCH_mips
#define ARCH_mmix
#define ARCH_mn10200
#define ARCH_mn10300
+#define ARCH_mt
#define ARCH_msp430
#define ARCH_ns32k
#define ARCH_openrisc
@@ -68,13 +74,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_vax
#define ARCH_w65
#define ARCH_xstormy16
+#define ARCH_xc16x
#define ARCH_xtensa
+#define ARCH_z80
#define ARCH_z8k
-#define ARCH_frv
-#define ARCH_iq2000
#define INCLUDE_SHMEDIA
#endif
+#ifdef ARCH_m32c
+#include "m32c-desc.h"
+#endif
disassembler_ftype
disassembler (abfd)
@@ -87,12 +96,6 @@ disassembler (abfd)
{
/* If you add a case to this table, also add it to the
ARCH_all definition right above this function. */
-#ifdef ARCH_a29k
- case bfd_arch_a29k:
- /* As far as I know we only handle big-endian 29k objects. */
- disassemble = print_insn_big_a29k;
- break;
-#endif
#ifdef ARCH_alpha
case bfd_arch_alpha:
disassemble = print_insn_alpha;
@@ -118,11 +121,21 @@ disassembler (abfd)
disassemble = print_insn_avr;
break;
#endif
+#ifdef ARCH_bfin
+ case bfd_arch_bfin:
+ disassemble = print_insn_bfin;
+ break;
+#endif
#ifdef ARCH_cris
case bfd_arch_cris:
disassemble = cris_get_disassembler (abfd);
break;
#endif
+#ifdef ARCH_crx
+ case bfd_arch_crx:
+ disassemble = print_insn_crx;
+ break;
+#endif
#ifdef ARCH_d10v
case bfd_arch_d10v:
disassemble = print_insn_d10v;
@@ -146,7 +159,8 @@ disassembler (abfd)
disassemble = print_insn_h8300h;
else if (bfd_get_mach (abfd) == bfd_mach_h8300s
|| bfd_get_mach (abfd) == bfd_mach_h8300sn
- || bfd_get_mach (abfd) == bfd_mach_h8300sx)
+ || bfd_get_mach (abfd) == bfd_mach_h8300sx
+ || bfd_get_mach (abfd) == bfd_mach_h8300sxn)
disassemble = print_insn_h8300s;
else
disassemble = print_insn_h8300;
@@ -220,6 +234,16 @@ disassembler (abfd)
disassemble = print_insn_m88k;
break;
#endif
+#ifdef ARCH_maxq
+ case bfd_arch_maxq:
+ disassemble = print_insn_maxq_little;
+ break;
+#endif
+#ifdef ARCH_mt
+ case bfd_arch_mt:
+ disassemble = print_insn_mt;
+ break;
+#endif
#ifdef ARCH_msp430
case bfd_arch_msp430:
disassemble = print_insn_msp430;
@@ -347,11 +371,21 @@ disassembler (abfd)
disassemble = print_insn_xstormy16;
break;
#endif
+#ifdef ARCH_xc16x
+ case bfd_arch_xc16x:
+ disassemble = print_insn_xc16x;
+ break;
+#endif
#ifdef ARCH_xtensa
case bfd_arch_xtensa:
disassemble = print_insn_xtensa;
break;
#endif
+#ifdef ARCH_z80
+ case bfd_arch_z80:
+ disassemble = print_insn_z80;
+ break;
+#endif
#ifdef ARCH_z8k
case bfd_arch_z8k:
if (bfd_get_mach(abfd) == bfd_mach_z8001)
@@ -375,6 +409,11 @@ disassembler (abfd)
disassemble = print_insn_iq2000;
break;
#endif
+#ifdef ARCH_m32c
+ case bfd_arch_m32c:
+ disassemble = print_insn_m32c;
+ break;
+#endif
default:
return 0;
}
@@ -409,6 +448,30 @@ disassemble_init_for_target (struct disassemble_info * info)
#ifdef ARCH_arm
case bfd_arch_arm:
info->symbol_is_valid = arm_symbol_is_valid;
+ info->disassembler_needs_relocs = TRUE;
+ break;
+#endif
+#ifdef ARCH_ia64
+ case bfd_arch_ia64:
+ info->skip_zeroes = 16;
+ break;
+#endif
+#ifdef ARCH_tic4x
+ case bfd_arch_tic4x:
+ info->skip_zeroes = 32;
+ break;
+#endif
+#ifdef ARCH_m32c
+ case bfd_arch_m32c:
+ info->endian = BFD_ENDIAN_BIG;
+ if (! info->insn_sets)
+ {
+ info->insn_sets = cgen_bitset_create (ISA_MAX);
+ if (info->mach == bfd_mach_m16c)
+ cgen_bitset_set (info->insn_sets, ISA_M16C);
+ else
+ cgen_bitset_set (info->insn_sets, ISA_M32C);
+ }
break;
#endif
default:
diff --git a/contrib/binutils/opcodes/i386-dis.c b/contrib/binutils/opcodes/i386-dis.c
index df89d458c167..f73e883e779c 100644
--- a/contrib/binutils/opcodes/i386-dis.c
+++ b/contrib/binutils/opcodes/i386-dis.c
@@ -1,45 +1,41 @@
/* Print i386 instructions for GDB, the GNU debugger.
Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-This file is part of GDB.
+ This file is part of GDB.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-/*
- * 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
- * July 1988
- * modified by John Hassey (hassey@dg-rtp.dg.com)
- * x86-64 support added by Jan Hubicka (jh@suse.cz)
- * VIA PadLock support by Michal Ludvig (mludvig@suse.cz)
- */
+/* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
+ July 1988
+ modified by John Hassey (hassey@dg-rtp.dg.com)
+ x86-64 support added by Jan Hubicka (jh@suse.cz)
+ VIA PadLock support by Michal Ludvig (mludvig@suse.cz). */
-/*
- * The main tables describing the instructions is essentially a copy
- * of the "Opcode Map" chapter (Appendix A) of the Intel 80386
- * Programmers Manual. Usually, there is a capital letter, followed
- * by a small letter. The capital letter tell the addressing mode,
- * and the small letter tells about the operand size. Refer to
- * the Intel manual for details.
- */
+/* The main tables describing the instructions is essentially a copy
+ of the "Opcode Map" chapter (Appendix A) of the Intel 80386
+ Programmers Manual. Usually, there is a capital letter, followed
+ by a small letter. The capital letter tell the addressing mode,
+ and the small letter tells about the operand size. Refer to
+ the Intel manual for details. */
#include "dis-asm.h"
#include "sysdep.h"
#include "opintl.h"
-#define MAXLEN 20
+#define MAXLEN 15
#include <setjmp.h>
@@ -92,6 +88,7 @@ static void OP_EX (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);
@@ -99,8 +96,12 @@ static void OP_3DNowSuffix (int, int);
static void OP_SIMD_Suffix (int, int);
static void SIMD_Fixup (int, int);
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);
struct dis_private {
/* Points to first byte not fetched. */
@@ -115,8 +116,14 @@ struct dis_private {
when we can. */
#define FWAIT_OPCODE (0x9b)
-/* Set to 1 for 64bit mode disassembly. */
-static int mode_64bit;
+enum address_mode
+{
+ mode_16bit,
+ mode_32bit,
+ mode_64bit
+};
+
+enum address_mode address_mode;
/* Flags for the prefixes for the current instruction. See below. */
static int prefixes;
@@ -173,10 +180,13 @@ 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);
- status = (*info->read_memory_func) (start,
- priv->max_fetched,
- addr - priv->max_fetched,
- info);
+ if (addr <= priv->the_buffer + MAXLEN)
+ status = (*info->read_memory_func) (start,
+ priv->max_fetched,
+ addr - priv->max_fetched,
+ info);
+ else
+ status = -1;
if (status != 0)
{
/* If we did manage to read at least one byte, then
@@ -197,16 +207,22 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#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 indirEb OP_indirE, b_mode
-#define indirEv OP_indirE, v_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, 0 /* 32 or 48 bit memory operand for LDS, LES 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
@@ -216,11 +232,13 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#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
@@ -259,7 +277,6 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define eSI OP_IMREG, eSI_reg
#define eDI OP_IMREG, eDI_reg
#define AL OP_IMREG, al_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
@@ -273,10 +290,8 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define Sw OP_SEG, w_mode
#define Ap OP_DIR, 0
-#define Ob OP_OFF, b_mode
-#define Ob64 OP_OFF64, b_mode
-#define Ov OP_OFF, v_mode
-#define Ov64 OP_OFF64, v_mode
+#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
@@ -296,9 +311,19 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#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
+/* 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
@@ -312,11 +337,16 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define w_mode 3 /* word operand */
#define d_mode 4 /* double word operand */
#define q_mode 5 /* quad word operand */
-#define x_mode 6
-#define m_mode 7 /* d_mode in 32bit, q_mode in 64bit mode. */
-#define cond_jump_mode 8
-#define loop_jcxz_mode 9
-#define dq_mode 10 /* operand size depends on REX prefixes. */
+#define t_mode 6 /* ten-byte operand */
+#define x_mode 7 /* 16-byte XMM operand */
+#define m_mode 8 /* d_mode in 32bit, q_mode in 64bit mode. */
+#define cond_jump_mode 9
+#define loop_jcxz_mode 10
+#define dq_mode 11 /* operand size depends on REX prefixes. */
+#define dqw_mode 12 /* registers like dq_mode, memory like w_mode. */
+#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 es_reg 100
#define cs_reg 101
@@ -367,6 +397,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define USE_GROUPS 2
#define USE_PREFIX_USER_TABLE 3
#define X86_64_SPECIAL 4
+#define IS_3BYTE_OPCODE 5
#define FLOAT NULL, NULL, FLOATCODE, NULL, 0, NULL, 0
@@ -432,6 +463,9 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#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
+
typedef void (*op_rtn) (int bytemode, int sizeflag);
struct dis386 {
@@ -447,9 +481,14 @@ struct dis386 {
/* Upper case letters in the instruction names here are macros.
'A' => print 'b' if no register operands or suffix_always is true
'B' => print 'b' if suffix_always is true
+ 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
+ . size prefix
'E' => print 'e' if 32-bit form of jcxz
'F' => print 'w' or 'l' depending on address size prefix (loop 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'
'L' => print 'l' if suffix_always is true
'N' => print 'n' if instruction has no wait "prefix"
'O' => print 'd', or 'o'
@@ -461,9 +500,11 @@ struct dis386 {
'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
- 'X' => print 's', 'd' depending on data16 prefix (for XMM)
+ 'V' => print 'q' in 64bit mode and behave as 'S' otherwise
'W' => print 'b' or 'w' ("w" or "de" 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
Many of the above letters print nothing in Intel mode. See "putop"
for the details.
@@ -501,7 +542,7 @@ static const struct dis386 dis386[] = {
{ "adcB", AL, Ib, XX },
{ "adcS", eAX, Iv, XX },
{ "push{T|}", ss, XX, XX },
- { "popT|}", ss, XX, XX },
+ { "pop{T|}", ss, XX, XX },
/* 18 */
{ "sbbB", Eb, Gb, XX },
{ "sbbS", Ev, Gv, XX },
@@ -566,23 +607,23 @@ static const struct dis386 dis386[] = {
{ "dec{S|}", RMeSI, XX, XX },
{ "dec{S|}", RMeDI, XX, XX },
/* 50 */
- { "pushS", RMrAX, XX, XX },
- { "pushS", RMrCX, XX, XX },
- { "pushS", RMrDX, XX, XX },
- { "pushS", RMrBX, XX, XX },
- { "pushS", RMrSP, XX, XX },
- { "pushS", RMrBP, XX, XX },
- { "pushS", RMrSI, XX, XX },
- { "pushS", RMrDI, XX, XX },
+ { "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 },
/* 58 */
- { "popS", RMrAX, XX, XX },
- { "popS", RMrCX, XX, XX },
- { "popS", RMrDX, XX, XX },
- { "popS", RMrBX, XX, XX },
- { "popS", RMrSP, XX, XX },
- { "popS", RMrBP, XX, XX },
- { "popS", RMrSI, XX, XX },
- { "popS", RMrDI, XX, XX },
+ { "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 },
/* 60 */
{ "pusha{P|}", XX, XX, XX },
{ "popa{P|}", XX, XX, XX },
@@ -597,10 +638,10 @@ static const struct dis386 dis386[] = {
{ "imulS", Gv, Ev, Iv },
{ "pushT", sIb, XX, XX },
{ "imulS", Gv, Ev, sIb },
- { "ins{b||b|}", Yb, indirDX, XX },
- { "ins{R||R|}", Yv, indirDX, XX },
- { "outs{b||b|}", indirDX, Xb, XX },
- { "outs{R||R|}", indirDX, Xv, XX },
+ { "ins{b||b|}", Ybr, indirDX, XX },
+ { "ins{R||R|}", Yvr, indirDX, XX },
+ { "outs{b||b|}", indirDXr, Xb, XX },
+ { "outs{R||R|}", indirDXr, Xv, XX },
/* 70 */
{ "joH", Jb, XX, cond_jump_flag },
{ "jnoH", Jb, XX, cond_jump_flag },
@@ -633,10 +674,10 @@ static const struct dis386 dis386[] = {
{ "movS", Ev, Gv, XX },
{ "movB", Gb, Eb, XX },
{ "movS", Gv, Ev, XX },
- { "movQ", Ev, Sw, XX },
+ { "movQ", Sv, Sw, XX },
{ "leaS", Gv, M, XX },
- { "movQ", Sw, Ev, XX },
- { "popU", Ev, XX, XX },
+ { "movQ", Sw, Sv, XX },
+ { "popU", stackEv, XX, XX },
/* 90 */
{ "nop", NOP_Fixup, 0, XX, XX },
{ "xchgS", RMeCX, eAX, XX },
@@ -649,28 +690,28 @@ static const struct dis386 dis386[] = {
/* 98 */
{ "cW{tR||tR|}", XX, XX, XX },
{ "cR{tO||tO|}", XX, XX, XX },
- { "lcall{T|}", Ap, 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 },
/* a0 */
- { "movB", AL, Ob64, XX },
- { "movS", eAX, Ov64, XX },
- { "movB", Ob64, AL, XX },
- { "movS", Ov64, eAX, XX },
- { "movs{b||b|}", Yb, Xb, XX },
- { "movs{R||R|}", Yv, Xv, XX },
+ { "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 },
/* a8 */
{ "testB", AL, Ib, XX },
{ "testS", eAX, Iv, XX },
- { "stosB", Yb, AL, XX },
- { "stosS", Yv, eAX, XX },
- { "lodsB", AL, Xb, XX },
- { "lodsS", eAX, Xv, 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 },
/* b0 */
@@ -739,7 +780,7 @@ static const struct dis386 dis386[] = {
/* e8 */
{ "callT", Jv, XX, XX },
{ "jmpT", Jv, XX, XX },
- { "ljmp{T|}", Ap, XX, XX },
+ { "Jjmp{T|}", Ap, XX, XX },
{ "jmp", Jb, XX, XX },
{ "inB", AL, indirDX, XX },
{ "inS", eAX, indirDX, XX },
@@ -803,10 +844,10 @@ static const struct dis386 dis386_twobyte[] = {
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
/* 20 */
- { "movL", Rm, Cm, XX },
- { "movL", Rm, Dm, XX },
- { "movL", Cm, Rm, XX },
- { "movL", Dm, Rm, XX },
+ { "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 },
@@ -830,9 +871,9 @@ static const struct dis386 dis386_twobyte[] = {
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
/* 38 */
+ { THREE_BYTE_0 },
{ "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { THREE_BYTE_1 },
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
@@ -857,7 +898,7 @@ static const struct dis386 dis386_twobyte[] = {
{ "cmovle", Gv, Ev, XX },
{ "cmovg", Gv, Ev, XX },
/* 50 */
- { "movmskpX", Gd, XS, XX },
+ { "movmskpX", Gdq, XS, XX },
{ PREGRP13 },
{ PREGRP12 },
{ PREGRP11 },
@@ -902,8 +943,8 @@ static const struct dis386 dis386_twobyte[] = {
{ "pcmpeqd", MX, EM, XX },
{ "emms", XX, XX, XX },
/* 78 */
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "vmread", Em, Gm, XX },
+ { "vmwrite", Gm, Em, XX },
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
{ PREGRP28 },
@@ -987,8 +1028,8 @@ static const struct dis386 dis386_twobyte[] = {
{ "xaddS", Ev, Gv, XX },
{ PREGRP1 },
{ "movntiS", Ev, Gv, XX },
- { "pinsrw", MX, Ed, Ib },
- { "pextrw", Gd, MS, Ib },
+ { "pinsrw", MX, Edqw, Ib },
+ { "pextrw", Gdq, MS, Ib },
{ "shufpX", XM, EX, Ib },
{ GRP9 },
/* c8 */
@@ -1008,7 +1049,7 @@ static const struct dis386 dis386_twobyte[] = {
{ "paddq", MX, EM, XX },
{ "pmullw", MX, EM, XX },
{ PREGRP21 },
- { "pmovmskb", Gd, MS, XX },
+ { "pmovmskb", Gdq, MS, XX },
/* d8 */
{ "psubusb", MX, EM, XX },
{ "psubusw", MX, EM, XX },
@@ -1085,11 +1126,11 @@ static const unsigned char twobyte_has_modrm[256] = {
/* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
/* 10 */ 1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, /* 1f */
/* 20 */ 1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 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 */
/* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
/* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
- /* 70 */ 1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1, /* 7f */
+ /* 70 */ 1,1,1,1,1,1,1,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 */ 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 */
@@ -1108,7 +1149,7 @@ static const unsigned char twobyte_uses_SSE_prefix[256] = {
/* 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 */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 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 */
@@ -1260,25 +1301,25 @@ static const struct dis386 grps[][8] = {
},
/* GRP2b_one */
{
- { "rolA", Eb, XX, XX },
- { "rorA", Eb, XX, XX },
- { "rclA", Eb, XX, XX },
- { "rcrA", Eb, XX, XX },
- { "shlA", Eb, XX, XX },
- { "shrA", Eb, XX, XX },
+ { "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, XX, XX },
+ { "sarA", Eb, I1, XX },
},
/* GRP2S_one */
{
- { "rolQ", Ev, XX, XX },
- { "rorQ", Ev, XX, XX },
- { "rclQ", Ev, XX, XX },
- { "rcrQ", Ev, XX, XX },
- { "shlQ", Ev, XX, XX },
- { "shrQ", Ev, XX, XX },
+ { "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, XX, XX },
+ { "sarQ", Ev, I1, XX },
},
/* GRP2b_cl */
{
@@ -1340,10 +1381,10 @@ static const struct dis386 grps[][8] = {
{ "incQ", Ev, XX, XX },
{ "decQ", Ev, XX, XX },
{ "callT", indirEv, XX, XX },
- { "lcallT", indirEv, XX, XX },
+ { "JcallT", indirEp, XX, XX },
{ "jmpT", indirEv, XX, XX },
- { "ljmpT", indirEv, XX, XX },
- { "pushU", Ev, XX, XX },
+ { "JjmpT", indirEp, XX, XX },
+ { "pushU", stackEv, XX, XX },
{ "(bad)", XX, XX, XX },
},
/* GRP6 */
@@ -1359,10 +1400,10 @@ static const struct dis386 grps[][8] = {
},
/* GRP7 */
{
- { "sgdtQ", M, XX, XX },
- { "sidtQ", PNI_Fixup, 0, XX, XX },
- { "lgdtQ", M, XX, XX },
- { "lidtQ", M, XX, XX },
+ { "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 },
@@ -1382,13 +1423,13 @@ static const struct dis386 grps[][8] = {
/* GRP9 */
{
{ "(bad)", XX, XX, XX },
- { "cmpxchg8b", Ev, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(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 */
{
@@ -1458,14 +1499,14 @@ static const struct dis386 grps[][8] = {
},
/* GRPPADLCK1 */
{
- { "xstorerng", OP_0f07, 0, XX, XX },
- { "xcryptecb", OP_0f07, 0, XX, XX },
- { "xcryptcbc", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
- { "xcryptcfb", OP_0f07, 0, XX, XX },
- { "xcryptofb", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
+ { "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 },
},
/* GRPPADLCK2 */
{
@@ -1658,10 +1699,10 @@ static const struct dis386 prefix_user_table[][4] = {
},
/* PREGRP25 */
{
- { "movntq", Ev, MX, XX },
- { "(bad)", Ev, XM, XX },
- { "movntdq", Ev, XM, XX },
- { "(bad)", Ev, XM, XX },
+ { "movntq", EM, MX, XX },
+ { "(bad)", EM, XM, XX },
+ { "movntdq", EM, XM, XX },
+ { "(bad)", EM, XM, XX },
},
/* PREGRP26 */
{
@@ -1721,6 +1762,79 @@ static const struct dis386 x86_64_table[][2] = {
},
};
+static const struct dis386 three_byte_table[][32] = {
+ /* 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 }
+ },
+ /* 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 }
+ },
+};
+
#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
static void
@@ -1754,7 +1868,7 @@ ckprefix (void)
case 0x4d:
case 0x4e:
case 0x4f:
- if (mode_64bit)
+ if (address_mode == mode_64bit)
newrex = *codep;
else
return;
@@ -1796,7 +1910,7 @@ ckprefix (void)
/* fwait is really an instruction. If there are prefixes
before the fwait, they belong to the fwait, *not* to the
following instruction. */
- if (prefixes)
+ if (prefixes || rex)
{
prefixes |= PREFIX_FWAIT;
codep++;
@@ -1810,8 +1924,8 @@ ckprefix (void)
/* Rex is ignored when followed by another prefix. */
if (rex)
{
- oappend (prefix_name (rex, 0));
- oappend (" ");
+ rex_used = rex;
+ return;
}
rex = newrex;
codep++;
@@ -1880,10 +1994,10 @@ prefix_name (int pref, int sizeflag)
case 0x66:
return (sizeflag & DFLAG) ? "data16" : "data32";
case 0x67:
- if (mode_64bit)
+ if (address_mode == mode_64bit)
return (sizeflag & AFLAG) ? "addr32" : "addr64";
else
- return ((sizeflag & AFLAG) && !mode_64bit) ? "addr16" : "addr32";
+ return (sizeflag & AFLAG) ? "addr16" : "addr32";
case FWAIT_OPCODE:
return "fwait";
default:
@@ -1893,6 +2007,7 @@ prefix_name (int pref, int sizeflag)
static char op1out[100], op2out[100], op3out[100];
static int op_ad, op_index[3];
+static int two_source_ops;
static bfd_vma op_address[3];
static bfd_vma op_riprel[3];
static bfd_vma start_pc;
@@ -1944,16 +2059,18 @@ print_insn (bfd_vma pc, disassemble_info *info)
{
const struct dis386 *dp;
int i;
- int two_source_ops;
char *first, *second, *third;
int needcomma;
- unsigned char uses_SSE_prefix;
+ unsigned char uses_SSE_prefix, uses_LOCK_prefix;
int sizeflag;
const char *p;
struct dis_private priv;
- mode_64bit = (info->mach == bfd_mach_x86_64_intel_syntax
- || info->mach == bfd_mach_x86_64);
+ if (info->mach == bfd_mach_x86_64_intel_syntax
+ || info->mach == bfd_mach_x86_64)
+ address_mode = mode_64bit;
+ else
+ address_mode = mode_32bit;
if (intel_syntax == (char) -1)
intel_syntax = (info->mach == bfd_mach_i386_i386_intel_syntax
@@ -1973,17 +2090,17 @@ print_insn (bfd_vma pc, disassemble_info *info)
{
if (strncmp (p, "x86-64", 6) == 0)
{
- mode_64bit = 1;
+ address_mode = mode_64bit;
priv.orig_sizeflag = AFLAG | DFLAG;
}
else if (strncmp (p, "i386", 4) == 0)
{
- mode_64bit = 0;
+ address_mode = mode_32bit;
priv.orig_sizeflag = AFLAG | DFLAG;
}
else if (strncmp (p, "i8086", 5) == 0)
{
- mode_64bit = 0;
+ address_mode = mode_16bit;
priv.orig_sizeflag = 0;
}
else if (strncmp (p, "intel", 5) == 0)
@@ -2099,13 +2216,14 @@ print_insn (bfd_vma pc, disassemble_info *info)
FETCH_DATA (info, codep + 1);
two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
- if ((prefixes & PREFIX_FWAIT)
- && ((*codep < 0xd8) || (*codep > 0xdf)))
+ if (((prefixes & PREFIX_FWAIT)
+ && ((*codep < 0xd8) || (*codep > 0xdf)))
+ || (rex && rex_used))
{
const char *name;
- /* fwait not followed by floating point instruction. Print the
- first prefix, which is probably fwait itself. */
+ /* fwait not followed by floating point instruction, or rex followed
+ by other prefixes. Print the first prefix. */
name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
if (name == NULL)
name = INTERNAL_DISASSEMBLER_ERROR;
@@ -2119,12 +2237,14 @@ print_insn (bfd_vma pc, disassemble_info *info)
dp = &dis386_twobyte[*++codep];
need_modrm = twobyte_has_modrm[*codep];
uses_SSE_prefix = twobyte_uses_SSE_prefix[*codep];
+ uses_LOCK_prefix = (*codep & ~0x02) == 0x20;
}
else
{
dp = &dis386[*codep];
need_modrm = onebyte_has_modrm[*codep];
uses_SSE_prefix = 0;
+ uses_LOCK_prefix = 0;
}
codep++;
@@ -2138,7 +2258,7 @@ print_insn (bfd_vma pc, disassemble_info *info)
oappend ("repnz ");
used_prefixes |= PREFIX_REPNZ;
}
- if (prefixes & PREFIX_LOCK)
+ if (!uses_LOCK_prefix && (prefixes & PREFIX_LOCK))
{
oappend ("lock ");
used_prefixes |= PREFIX_LOCK;
@@ -2149,7 +2269,7 @@ print_insn (bfd_vma pc, disassemble_info *info)
sizeflag ^= AFLAG;
if (dp->bytemode3 != loop_jcxz_mode || intel_syntax)
{
- if ((sizeflag & AFLAG) || mode_64bit)
+ if ((sizeflag & AFLAG) || address_mode == mode_64bit)
oappend ("addr32 ");
else
oappend ("addr16 ");
@@ -2172,7 +2292,15 @@ print_insn (bfd_vma pc, disassemble_info *info)
}
}
- if (need_modrm)
+ if (dp->name == NULL && dp->bytemode1 == 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;
+ }
+ else if (need_modrm)
{
FETCH_DATA (info, codep + 1);
mod = (*codep >> 6) & 3;
@@ -2216,7 +2344,8 @@ print_insn (bfd_vma pc, disassemble_info *info)
break;
case X86_64_SPECIAL:
- dp = &x86_64_table[dp->bytemode2][mode_64bit];
+ index = address_mode == mode_64bit ? 1 : 0;
+ dp = &x86_64_table[dp->bytemode2][index];
break;
default:
@@ -2343,9 +2472,9 @@ static const char *float_mem[] = {
"(bad)",
"fst{s||s|}",
"fstp{s||s|}",
- "fldenv",
+ "fldenvIC",
"fldcw",
- "fNstenv",
+ "fNstenvIC",
"fNstcw",
/* da */
"fiadd{l||l|}",
@@ -2376,12 +2505,12 @@ static const char *float_mem[] = {
"fdivr{l||l|}",
/* dd */
"fld{l||l|}",
- "fisttpll",
+ "fisttp{ll||ll|}",
"fst{l||l|}",
"fstp{l||l|}",
- "frstor",
+ "frstorIC",
"(bad)",
- "fNsave",
+ "fNsaveIC",
"fNstsw",
/* de */
"fiadd",
@@ -2400,7 +2529,82 @@ static const char *float_mem[] = {
"fbld",
"fild{ll||ll|}",
"fbstp",
- "fistpll",
+ "fistp{ll||ll|}",
+};
+
+static const unsigned char float_mem_mode[] = {
+ /* d8 */
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ /* d9 */
+ d_mode,
+ 0,
+ d_mode,
+ d_mode,
+ 0,
+ w_mode,
+ 0,
+ w_mode,
+ /* da */
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ /* db */
+ d_mode,
+ d_mode,
+ d_mode,
+ d_mode,
+ 0,
+ t_mode,
+ 0,
+ t_mode,
+ /* dc */
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ /* dd */
+ q_mode,
+ q_mode,
+ q_mode,
+ q_mode,
+ 0,
+ 0,
+ 0,
+ w_mode,
+ /* de */
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ /* df */
+ w_mode,
+ w_mode,
+ w_mode,
+ w_mode,
+ t_mode,
+ q_mode,
+ t_mode,
+ q_mode
};
#define ST OP_ST, 0
@@ -2579,14 +2783,12 @@ dofloat (int sizeflag)
if (mod != 3)
{
- putop (float_mem[(floatop - 0xd8) * 8 + reg], sizeflag);
+ int fp_indx = (floatop - 0xd8) * 8 + reg;
+
+ putop (float_mem[fp_indx], sizeflag);
obufp = op1out;
- if (floatop == 0xdb)
- OP_E (x_mode, sizeflag);
- else if (floatop == 0xdd)
- OP_E (d_mode, sizeflag);
- else
- OP_E (v_mode, sizeflag);
+ op_ad = 2;
+ OP_E (float_mem_mode[fp_indx], sizeflag);
return;
}
/* Skip mod/rm byte. */
@@ -2607,9 +2809,12 @@ dofloat (int sizeflag)
putop (dp->name, sizeflag);
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);
}
@@ -2618,7 +2823,7 @@ dofloat (int sizeflag)
static void
OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
- oappend ("%st");
+ oappend ("%st" + intel_syntax);
}
static void
@@ -2633,7 +2838,7 @@ static int
putop (const char *template, int sizeflag)
{
const char *p;
- int alt;
+ int alt = 0;
for (p = template; *p; p++)
{
@@ -2646,7 +2851,7 @@ putop (const char *template, int sizeflag)
alt = 0;
if (intel_syntax)
alt += 1;
- if (mode_64bit)
+ if (address_mode == mode_64bit)
alt += 2;
while (alt != 0)
{
@@ -2664,7 +2869,10 @@ putop (const char *template, int sizeflag)
}
alt--;
}
- break;
+ /* Fall through. */
+ case 'I':
+ alt = 1;
+ continue;
case '|':
while (*++p != '}')
{
@@ -2686,8 +2894,20 @@ putop (const char *template, int sizeflag)
if (sizeflag & SUFFIX_ALWAYS)
*obufp++ = 'b';
break;
+ case 'C':
+ if (intel_syntax && !alt)
+ break;
+ if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = intel_syntax ? 'd' : 'l';
+ else
+ *obufp++ = intel_syntax ? 'w' : 's';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ break;
case 'E': /* For jcxz/jecxz */
- if (mode_64bit)
+ if (address_mode == mode_64bit)
{
if (sizeflag & AFLAG)
*obufp++ = 'r';
@@ -2705,9 +2925,9 @@ putop (const char *template, int sizeflag)
if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
{
if (sizeflag & AFLAG)
- *obufp++ = mode_64bit ? 'q' : 'l';
+ *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
else
- *obufp++ = mode_64bit ? 'l' : 'w';
+ *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
used_prefixes |= (prefixes & PREFIX_ADDR);
}
break;
@@ -2726,6 +2946,20 @@ putop (const char *template, int sizeflag)
*obufp++ = 'n';
}
break;
+ case 'J':
+ if (intel_syntax)
+ break;
+ *obufp++ = 'l';
+ break;
+ case 'Z':
+ if (intel_syntax)
+ break;
+ if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
+ {
+ *obufp++ = 'q';
+ break;
+ }
+ /* Fall through. */
case 'L':
if (intel_syntax)
break;
@@ -2748,7 +2982,7 @@ putop (const char *template, int sizeflag)
case 'T':
if (intel_syntax)
break;
- if (mode_64bit)
+ if (address_mode == mode_64bit && (sizeflag & DFLAG))
{
*obufp++ = 'q';
break;
@@ -2770,21 +3004,22 @@ putop (const char *template, int sizeflag)
*obufp++ = 'l';
else
*obufp++ = 'w';
- used_prefixes |= (prefixes & PREFIX_DATA);
}
+ used_prefixes |= (prefixes & PREFIX_DATA);
}
break;
case 'U':
if (intel_syntax)
break;
- if (mode_64bit)
+ if (address_mode == mode_64bit && (sizeflag & DFLAG))
{
- *obufp++ = 'q';
+ if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
+ *obufp++ = 'q';
break;
}
/* Fall through. */
case 'Q':
- if (intel_syntax)
+ if (intel_syntax && !alt)
break;
USED_REX (REX_MODE64);
if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
@@ -2794,11 +3029,11 @@ putop (const char *template, int sizeflag)
else
{
if (sizeflag & DFLAG)
- *obufp++ = 'l';
+ *obufp++ = intel_syntax ? 'd' : 'l';
else
*obufp++ = 'w';
- used_prefixes |= (prefixes & PREFIX_DATA);
}
+ used_prefixes |= (prefixes & PREFIX_DATA);
}
break;
case 'R':
@@ -2833,6 +3068,16 @@ putop (const char *template, int sizeflag)
if (!(rex & REX_MODE64))
used_prefixes |= (prefixes & PREFIX_DATA);
break;
+ case 'V':
+ if (intel_syntax)
+ break;
+ if (address_mode == mode_64bit && (sizeflag & DFLAG))
+ {
+ if (sizeflag & SUFFIX_ALWAYS)
+ *obufp++ = 'q';
+ break;
+ }
+ /* Fall through. */
case 'S':
if (intel_syntax)
break;
@@ -2897,6 +3142,7 @@ putop (const char *template, int sizeflag)
used_prefixes |= (prefixes & PREFIX_DATA);
break;
}
+ alt = 0;
}
*obufp = 0;
return 0;
@@ -2955,7 +3201,7 @@ OP_indirE (int bytemode, int sizeflag)
static void
print_operand_value (char *buf, int hex, bfd_vma disp)
{
- if (mode_64bit)
+ if (address_mode == mode_64bit)
{
if (hex)
{
@@ -3010,6 +3256,67 @@ print_operand_value (char *buf, int hex, bfd_vma disp)
}
static void
+intel_operand_size (int bytemode, int sizeflag)
+{
+ switch (bytemode)
+ {
+ case b_mode:
+ oappend ("BYTE PTR ");
+ break;
+ case w_mode:
+ case dqw_mode:
+ oappend ("WORD PTR ");
+ break;
+ case stack_v_mode:
+ if (address_mode == mode_64bit && (sizeflag & DFLAG))
+ {
+ oappend ("QWORD PTR ");
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ }
+ /* FALLTHRU */
+ case v_mode:
+ case dq_mode:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ oappend ("QWORD PTR ");
+ else if ((sizeflag & DFLAG) || bytemode == dq_mode)
+ oappend ("DWORD PTR ");
+ else
+ oappend ("WORD PTR ");
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case d_mode:
+ oappend ("DWORD PTR ");
+ break;
+ case q_mode:
+ oappend ("QWORD PTR ");
+ break;
+ case m_mode:
+ if (address_mode == mode_64bit)
+ oappend ("QWORD PTR ");
+ else
+ oappend ("DWORD PTR ");
+ break;
+ case f_mode:
+ if (sizeflag & DFLAG)
+ oappend ("FWORD PTR ");
+ else
+ oappend ("DWORD PTR ");
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case t_mode:
+ oappend ("TBYTE PTR ");
+ break;
+ case x_mode:
+ oappend ("XMMWORD PTR ");
+ break;
+ default:
+ break;
+ }
+}
+
+static void
OP_E (int bytemode, int sizeflag)
{
bfd_vma disp;
@@ -3044,17 +3351,27 @@ OP_E (int bytemode, int sizeflag)
oappend (names64[rm + add]);
break;
case m_mode:
- if (mode_64bit)
+ if (address_mode == mode_64bit)
oappend (names64[rm + add]);
else
oappend (names32[rm + add]);
break;
+ case stack_v_mode:
+ if (address_mode == mode_64bit && (sizeflag & DFLAG))
+ {
+ oappend (names64[rm + add]);
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ }
+ bytemode = v_mode;
+ /* FALLTHRU */
case v_mode:
case dq_mode:
+ case dqw_mode:
USED_REX (REX_MODE64);
if (rex & REX_MODE64)
oappend (names64[rm + add]);
- else if ((sizeflag & DFLAG) || bytemode == dq_mode)
+ else if ((sizeflag & DFLAG) || bytemode != v_mode)
oappend (names32[rm + add]);
else
oappend (names16[rm + add]);
@@ -3070,9 +3387,11 @@ OP_E (int bytemode, int sizeflag)
}
disp = 0;
+ if (intel_syntax)
+ intel_operand_size (bytemode, sizeflag);
append_seg ();
- if ((sizeflag & AFLAG) || mode_64bit) /* 32 bit address mode */
+ if ((sizeflag & AFLAG) || address_mode == mode_64bit) /* 32 bit address mode */
{
int havesib;
int havebase;
@@ -3088,17 +3407,17 @@ OP_E (int bytemode, int sizeflag)
{
havesib = 1;
FETCH_DATA (the_info, codep + 1);
- scale = (*codep >> 6) & 3;
index = (*codep >> 3) & 7;
+ if (address_mode == mode_64bit || index != 0x4)
+ /* When INDEX == 0x4 in 32 bit mode, SCALE is ignored. */
+ scale = (*codep >> 6) & 3;
base = *codep & 7;
USED_REX (REX_EXTY);
- USED_REX (REX_EXTZ);
if (rex & REX_EXTY)
index += 8;
- if (rex & REX_EXTZ)
- base += 8;
codep++;
}
+ base += add;
switch (mod)
{
@@ -3106,7 +3425,7 @@ OP_E (int bytemode, int sizeflag)
if ((base & 7) == 5)
{
havebase = 0;
- if (mode_64bit && !havesib && (sizeflag & AFLAG))
+ if (address_mode == mode_64bit && !havesib)
riprel = 1;
disp = get32s ();
}
@@ -3136,65 +3455,24 @@ OP_E (int bytemode, int sizeflag)
if (havebase || (havesib && (index != 4 || scale != 0)))
{
- if (intel_syntax)
- {
- switch (bytemode)
- {
- case b_mode:
- oappend ("BYTE PTR ");
- break;
- case w_mode:
- oappend ("WORD PTR ");
- break;
- case v_mode:
- oappend ("DWORD PTR ");
- break;
- case d_mode:
- oappend ("QWORD PTR ");
- break;
- case m_mode:
- if (mode_64bit)
- oappend ("DWORD PTR ");
- else
- oappend ("QWORD PTR ");
- break;
- case x_mode:
- oappend ("XWORD PTR ");
- break;
- default:
- break;
- }
- }
*obufp++ = open_char;
if (intel_syntax && riprel)
oappend ("rip + ");
*obufp = '\0';
- USED_REX (REX_EXTZ);
- if (!havesib && (rex & REX_EXTZ))
- base += 8;
if (havebase)
- oappend (mode_64bit && (sizeflag & AFLAG)
+ oappend (address_mode == mode_64bit && (sizeflag & AFLAG)
? names64[base] : names32[base]);
if (havesib)
{
if (index != 4)
{
- if (intel_syntax)
+ if (!intel_syntax || havebase)
{
- if (havebase)
- {
- *obufp++ = separator_char;
- *obufp = '\0';
- }
- sprintf (scratchbuf, "%s",
- mode_64bit && (sizeflag & AFLAG)
- ? names64[index] : names32[index]);
+ *obufp++ = separator_char;
+ *obufp = '\0';
}
- else
- sprintf (scratchbuf, ",%s",
- mode_64bit && (sizeflag & AFLAG)
- ? names64[index] : names32[index]);
- oappend (scratchbuf);
+ oappend (address_mode == mode_64bit && (sizeflag & AFLAG)
+ ? names64[index] : names32[index]);
}
if (scale != 0 || (!intel_syntax && index != 4))
{
@@ -3204,22 +3482,23 @@ OP_E (int bytemode, int sizeflag)
oappend (scratchbuf);
}
}
- if (intel_syntax)
- if (mod != 0 || (base & 7) == 5)
- {
- /* Don't print zero displacements. */
- if (disp != 0)
- {
- if ((bfd_signed_vma) disp > 0)
- {
- *obufp++ = '+';
- *obufp = '\0';
- }
-
- print_operand_value (scratchbuf, 0, disp);
- oappend (scratchbuf);
- }
- }
+ if (intel_syntax && disp)
+ {
+ if ((bfd_signed_vma) disp > 0)
+ {
+ *obufp++ = '+';
+ *obufp = '\0';
+ }
+ else if (mod != 1)
+ {
+ *obufp++ = '-';
+ *obufp = '\0';
+ disp = - (bfd_signed_vma) disp;
+ }
+
+ print_operand_value (scratchbuf, mod != 1, disp);
+ oappend (scratchbuf);
+ }
*obufp++ = close_char;
*obufp = '\0';
@@ -3246,7 +3525,7 @@ OP_E (int bytemode, int sizeflag)
switch (mod)
{
case 0:
- if ((rm & 7) == 6)
+ if (rm == 6)
{
disp = get16 ();
if ((disp & 0x8000) != 0)
@@ -3267,20 +3546,51 @@ OP_E (int bytemode, int sizeflag)
}
if (!intel_syntax)
- if (mod != 0 || (rm & 7) == 6)
+ if (mod != 0 || rm == 6)
{
print_operand_value (scratchbuf, 0, disp);
oappend (scratchbuf);
}
- if (mod != 0 || (rm & 7) != 6)
+ if (mod != 0 || rm != 6)
{
*obufp++ = open_char;
*obufp = '\0';
- oappend (index16[rm + add]);
+ oappend (index16[rm]);
+ if (intel_syntax && disp)
+ {
+ if ((bfd_signed_vma) disp > 0)
+ {
+ *obufp++ = '+';
+ *obufp = '\0';
+ }
+ else if (mod != 1)
+ {
+ *obufp++ = '-';
+ *obufp = '\0';
+ disp = - (bfd_signed_vma) disp;
+ }
+
+ print_operand_value (scratchbuf, mod != 1, disp);
+ oappend (scratchbuf);
+ }
+
*obufp++ = close_char;
*obufp = '\0';
}
+ else if (intel_syntax)
+ {
+ if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
+ | PREFIX_ES | PREFIX_FS | PREFIX_GS))
+ ;
+ else
+ {
+ oappend (names_seg[ds_reg - es_reg]);
+ oappend (":");
+ }
+ print_operand_value (scratchbuf, 1, disp & 0xffff);
+ oappend (scratchbuf);
+ }
}
}
@@ -3310,15 +3620,23 @@ OP_G (int bytemode, int sizeflag)
oappend (names64[reg + add]);
break;
case v_mode:
+ case dq_mode:
+ case dqw_mode:
USED_REX (REX_MODE64);
if (rex & REX_MODE64)
oappend (names64[reg + add]);
- else if (sizeflag & DFLAG)
+ else if ((sizeflag & DFLAG) || bytemode != v_mode)
oappend (names32[reg + add]);
else
oappend (names16[reg + add]);
used_prefixes |= (prefixes & PREFIX_DATA);
break;
+ case m_mode:
+ if (address_mode == mode_64bit)
+ oappend (names64[reg + add]);
+ else
+ oappend (names32[reg + add]);
+ break;
default:
oappend (INTERNAL_DISASSEMBLER_ERROR);
break;
@@ -3394,7 +3712,7 @@ static void
set_op (bfd_vma op, int riprel)
{
op_index[op_ad] = op_ad;
- if (mode_64bit)
+ if (address_mode == mode_64bit)
{
op_address[op_ad] = op;
op_riprel[op_ad] = riprel;
@@ -3442,7 +3760,7 @@ OP_REG (int code, int sizeflag)
break;
case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
- if (mode_64bit)
+ if (address_mode == mode_64bit && (sizeflag & DFLAG))
{
s = names64[code - rAX_reg + add];
break;
@@ -3528,7 +3846,7 @@ OP_I (int bytemode, int sizeflag)
mask = 0xff;
break;
case q_mode:
- if (mode_64bit)
+ if (address_mode == mode_64bit)
{
op = get32s ();
break;
@@ -3554,6 +3872,10 @@ OP_I (int bytemode, int sizeflag)
mask = 0xfffff;
op = get16 ();
break;
+ case const_1_mode:
+ if (intel_syntax)
+ oappend ("1");
+ return;
default:
oappend (INTERNAL_DISASSEMBLER_ERROR);
return;
@@ -3572,7 +3894,7 @@ OP_I64 (int bytemode, int sizeflag)
bfd_signed_vma op;
bfd_signed_vma mask = -1;
- if (!mode_64bit)
+ if (address_mode != mode_64bit)
{
OP_I (bytemode, sizeflag);
return;
@@ -3681,7 +4003,7 @@ OP_J (int bytemode, int sizeflag)
disp -= 0x100;
break;
case v_mode:
- if (sizeflag & DFLAG)
+ if ((sizeflag & DFLAG) || (rex & REX_MODE64))
disp = get32s ();
else
{
@@ -3725,20 +4047,22 @@ OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
}
used_prefixes |= (prefixes & PREFIX_DATA);
if (intel_syntax)
- sprintf (scratchbuf, "0x%x,0x%x", seg, offset);
+ sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
else
sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
oappend (scratchbuf);
}
static void
-OP_OFF (int bytemode ATTRIBUTE_UNUSED, int sizeflag)
+OP_OFF (int bytemode, int sizeflag)
{
bfd_vma off;
+ if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
+ intel_operand_size (bytemode, sizeflag);
append_seg ();
- if ((sizeflag & AFLAG) || mode_64bit)
+ if ((sizeflag & AFLAG) || address_mode == mode_64bit)
off = get32 ();
else
off = get16 ();
@@ -3757,16 +4081,18 @@ OP_OFF (int bytemode ATTRIBUTE_UNUSED, int sizeflag)
}
static void
-OP_OFF64 (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
+OP_OFF64 (int bytemode, int sizeflag)
{
bfd_vma off;
- if (!mode_64bit)
+ if (address_mode != mode_64bit)
{
OP_OFF (bytemode, sizeflag);
return;
}
+ if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
+ intel_operand_size (bytemode, sizeflag);
append_seg ();
off = get64 ();
@@ -3788,13 +4114,10 @@ static void
ptr_reg (int code, int sizeflag)
{
const char *s;
- if (intel_syntax)
- oappend ("[");
- else
- oappend ("(");
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ *obufp++ = open_char;
+ used_prefixes |= (prefixes & PREFIX_ADDR);
+ if (address_mode == mode_64bit)
{
if (!(sizeflag & AFLAG))
s = names32[code - eAX_reg];
@@ -3806,15 +4129,15 @@ ptr_reg (int code, int sizeflag)
else
s = names16[code - eAX_reg];
oappend (s);
- if (intel_syntax)
- oappend ("]");
- else
- oappend (")");
+ *obufp++ = close_char;
+ *obufp = 0;
}
static void
OP_ESreg (int code, int sizeflag)
{
+ if (intel_syntax)
+ intel_operand_size (codep[-1] & 1 ? v_mode : b_mode, sizeflag);
oappend ("%es:" + intel_syntax);
ptr_reg (code, sizeflag);
}
@@ -3822,6 +4145,11 @@ OP_ESreg (int code, int sizeflag)
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);
if ((prefixes
& (PREFIX_CS
| PREFIX_DS
@@ -3838,9 +4166,16 @@ static void
OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
int add = 0;
- USED_REX (REX_EXTX);
if (rex & REX_EXTX)
- add = 8;
+ {
+ USED_REX (REX_EXTX);
+ add = 8;
+ }
+ else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
+ {
+ used_prefixes |= PREFIX_LOCK;
+ add = 8;
+ }
sprintf (scratchbuf, "%%cr%d", reg + add);
oappend (scratchbuf + intel_syntax);
}
@@ -3878,15 +4213,17 @@ OP_Rd (int bytemode, int sizeflag)
static void
OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
- int add = 0;
- USED_REX (REX_EXTX);
- if (rex & REX_EXTX)
- add = 8;
used_prefixes |= (prefixes & PREFIX_DATA);
if (prefixes & PREFIX_DATA)
- sprintf (scratchbuf, "%%xmm%d", reg + add);
+ {
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add = 8;
+ sprintf (scratchbuf, "%%xmm%d", reg + add);
+ }
else
- sprintf (scratchbuf, "%%mm%d", reg + add);
+ sprintf (scratchbuf, "%%mm%d", reg);
oappend (scratchbuf + intel_syntax);
}
@@ -3904,24 +4241,32 @@ OP_XMM (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
static void
OP_EM (int bytemode, int sizeflag)
{
- int add = 0;
if (mod != 3)
{
+ if (intel_syntax && bytemode == v_mode)
+ {
+ 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)
- add = 8;
/* Skip mod/rm byte. */
MODRM_CHECK;
codep++;
used_prefixes |= (prefixes & PREFIX_DATA);
if (prefixes & PREFIX_DATA)
- sprintf (scratchbuf, "%%xmm%d", rm + add);
+ {
+ int add = 0;
+
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add = 8;
+ sprintf (scratchbuf, "%%xmm%d", rm + add);
+ }
else
- sprintf (scratchbuf, "%%mm%d", rm + add);
+ sprintf (scratchbuf, "%%mm%d", rm);
oappend (scratchbuf + intel_syntax);
}
@@ -3931,6 +4276,17 @@ OP_EX (int bytemode, int sizeflag)
int add = 0;
if (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;
+ }
+ }
OP_E (bytemode, sizeflag);
return;
}
@@ -4174,41 +4530,157 @@ SIMD_Fixup (int extrachar, int sizeflag ATTRIBUTE_UNUSED)
static void
PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
{
- if (mod == 3 && reg == 1)
+ if (mod == 3 && reg == 1 && rm <= 1)
{
- char *p = obuf + strlen (obuf);
-
/* Override "sidt". */
+ size_t olen = strlen (obuf);
+ char *p = obuf + olen - 4;
+ const char **names = (address_mode == mode_64bit
+ ? names64 : names32);
+
+ /* We might have a suffix when disassembling with -Msuffix. */
+ if (*p == 'i')
+ --p;
+
+ /* Remove "addr16/addr32" if we aren't in Intel mode. */
+ if (!intel_syntax
+ && (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))
+ p -= 7;
+
if (rm)
{
/* mwait %eax,%ecx */
- strcpy (p - 4, "mwait %eax,%ecx");
+ strcpy (p, "mwait");
+ if (!intel_syntax)
+ strcpy (op1out, names[0]);
}
else
{
/* monitor %eax,%ecx,%edx" */
- strcpy (p - 4, "monitor %eax,%ecx,%edx");
+ strcpy (p, "monitor");
+ if (!intel_syntax)
+ {
+ const char **op1_names;
+ if (!(prefixes & PREFIX_ADDR))
+ op1_names = (address_mode == mode_16bit
+ ? names16 : names);
+ else
+ {
+ op1_names = (address_mode != mode_32bit
+ ? names32 : names16);
+ used_prefixes |= PREFIX_ADDR;
+ }
+ strcpy (op1out, op1_names[0]);
+ strcpy (op3out, names[2]);
+ }
+ }
+ if (!intel_syntax)
+ {
+ strcpy (op2out, names[1]);
+ two_source_ops = 1;
}
codep++;
}
else
- OP_E (0, sizeflag);
+ OP_M (0, sizeflag);
}
static void
-INVLPG_Fixup (int bytemode, int sizeflag)
+SVME_Fixup (int bytemode, int sizeflag)
{
- if (*codep == 0xf8)
+ const char *alt;
+ char *p;
+
+ switch (*codep)
{
- char *p = obuf + strlen (obuf);
+ case 0xd8:
+ alt = "vmrun";
+ break;
+ case 0xd9:
+ alt = "vmmcall";
+ break;
+ case 0xda:
+ alt = "vmload";
+ break;
+ case 0xdb:
+ alt = "vmsave";
+ break;
+ case 0xdc:
+ alt = "stgi";
+ break;
+ case 0xdd:
+ alt = "clgi";
+ break;
+ case 0xde:
+ alt = "skinit";
+ break;
+ case 0xdf:
+ alt = "invlpga";
+ break;
+ default:
+ OP_M (bytemode, sizeflag);
+ return;
+ }
+ /* Override "lidt". */
+ p = obuf + strlen (obuf) - 4;
+ /* We might have a suffix. */
+ if (*p == 'i')
+ --p;
+ strcpy (p, alt);
+ if (!(prefixes & PREFIX_ADDR))
+ {
+ ++codep;
+ return;
+ }
+ used_prefixes |= PREFIX_ADDR;
+ switch (*codep++)
+ {
+ case 0xdf:
+ strcpy (op2out, names32[1]);
+ two_source_ops = 1;
+ /* Fall through. */
+ case 0xd8:
+ case 0xda:
+ case 0xdb:
+ *obufp++ = open_char;
+ if (address_mode == mode_64bit || (sizeflag & AFLAG))
+ alt = names32[0];
+ else
+ alt = names16[0];
+ strcpy (obufp, alt);
+ obufp += strlen (alt);
+ *obufp++ = close_char;
+ *obufp = '\0';
+ break;
+ }
+}
- /* Override "invlpg". */
- strcpy (p - 6, "swapgs");
- codep++;
+static void
+INVLPG_Fixup (int bytemode, int sizeflag)
+{
+ const char *alt;
+
+ switch (*codep)
+ {
+ case 0xf8:
+ alt = "swapgs";
+ break;
+ case 0xf9:
+ alt = "rdtscp";
+ break;
+ default:
+ OP_M (bytemode, sizeflag);
+ return;
}
- else
- OP_E (bytemode, sizeflag);
+ /* Override "invlpg". */
+ strcpy (obuf + strlen (obuf) - 6, alt);
+ codep++;
}
static void
@@ -4218,3 +4690,172 @@ BadOp (void)
codep = insn_codep + 1;
oappend ("(bad)");
}
+
+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)
+ {
+ /* Override "sgdt". */
+ char *p = obuf + strlen (obuf) - 4;
+
+ /* We might have a suffix when disassembling with -Msuffix. */
+ if (*p == 'g')
+ --p;
+
+ switch (rm)
+ {
+ case 1:
+ strcpy (p, "vmcall");
+ break;
+ case 2:
+ strcpy (p, "vmlaunch");
+ break;
+ case 3:
+ strcpy (p, "vmresume");
+ break;
+ case 4:
+ strcpy (p, "vmxoff");
+ break;
+ }
+
+ codep++;
+ }
+ else
+ OP_E (0, sizeflag);
+}
+
+static void
+OP_VMX (int bytemode, int sizeflag)
+{
+ used_prefixes |= (prefixes & (PREFIX_DATA | PREFIX_REPZ));
+ if (prefixes & PREFIX_DATA)
+ strcpy (obuf, "vmclear");
+ else if (prefixes & PREFIX_REPZ)
+ strcpy (obuf, "vmxon");
+ else
+ strcpy (obuf, "vmptrld");
+ OP_E (bytemode, sizeflag);
+}
+
+static void
+REP_Fixup (int bytemode, int sizeflag)
+{
+ /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
+ lods and stos. */
+ size_t ilen = 0;
+
+ if (prefixes & PREFIX_REPZ)
+ switch (*insn_codep)
+ {
+ case 0x6e: /* outsb */
+ case 0x6f: /* outsw/outsl */
+ case 0xa4: /* movsb */
+ case 0xa5: /* movsw/movsl/movsq */
+ if (!intel_syntax)
+ ilen = 5;
+ else
+ ilen = 4;
+ break;
+ case 0xaa: /* stosb */
+ case 0xab: /* stosw/stosl/stosq */
+ case 0xac: /* lodsb */
+ case 0xad: /* lodsw/lodsl/lodsq */
+ if (!intel_syntax && (sizeflag & SUFFIX_ALWAYS))
+ ilen = 5;
+ else
+ ilen = 4;
+ break;
+ case 0x6c: /* insb */
+ case 0x6d: /* insl/insw */
+ if (!intel_syntax)
+ ilen = 4;
+ else
+ ilen = 3;
+ break;
+ default:
+ abort ();
+ break;
+ }
+
+ if (ilen != 0)
+ {
+ size_t olen;
+ char *p;
+
+ olen = strlen (obuf);
+ p = obuf + olen - ilen - 1 - 4;
+ /* Handle "repz [addr16|addr32]". */
+ if ((prefixes & PREFIX_ADDR))
+ p -= 1 + 6;
+
+ memmove (p + 3, p + 4, olen - (p + 3 - obuf));
+ }
+
+ switch (bytemode)
+ {
+ case al_reg:
+ case eAX_reg:
+ case indir_dx_reg:
+ OP_IMREG (bytemode, sizeflag);
+ break;
+ case eDI_reg:
+ OP_ESreg (bytemode, sizeflag);
+ break;
+ case eSI_reg:
+ OP_DSreg (bytemode, sizeflag);
+ break;
+ default:
+ abort ();
+ break;
+ }
+}
diff --git a/contrib/binutils/opcodes/ia64-asmtab.c b/contrib/binutils/opcodes/ia64-asmtab.c
index 2465d3938501..6350fd42066d 100644
--- a/contrib/binutils/opcodes/ia64-asmtab.c
+++ b/contrib/binutils/opcodes/ia64-asmtab.c
@@ -28,10 +28,11 @@ static const char * const ia64_strings[] = {
"sa", "se", "setf", "shl", "shladd", "shladdp4", "shr", "shrp", "sig",
"spill", "spnt", "sptk", "srlz", "ssm", "sss", "st1", "st16", "st2",
"st4", "st8", "stf", "stf8", "stfd", "stfe", "stfs", "sub", "sum", "sxt1",
- "sxt2", "sxt4", "sync", "tak", "tbit", "thash", "tnat", "tpa", "trunc",
- "ttag", "u", "unc", "unord", "unpack1", "unpack2", "unpack4", "uss",
- "uus", "uuu", "w", "wexit", "wtop", "x", "xchg1", "xchg2", "xchg4",
- "xchg8", "xf", "xma", "xmpy", "xor", "xuf", "z", "zxt1", "zxt2", "zxt4",
+ "sxt2", "sxt4", "sync", "tak", "tbit", "tf", "thash", "tnat", "tpa",
+ "trunc", "ttag", "u", "unc", "unord", "unpack1", "unpack2", "unpack4",
+ "uss", "uus", "uuu", "vmsw", "w", "wexit", "wtop", "x", "xchg1", "xchg2",
+ "xchg4", "xchg8", "xf", "xma", "xmpy", "xor", "xuf", "z", "zxt1", "zxt2",
+ "zxt4",
};
static const struct ia64_dependency
@@ -39,8 +40,8 @@ dependencies[] = {
{ "ALAT", 0, 0, 0, -1, NULL, },
{ "AR[BSP]", 26, 0, 2, 17, NULL, },
{ "AR[BSPSTORE]", 26, 0, 2, 18, NULL, },
- { "AR[CFLG]", 26, 0, 2, 27, NULL, },
{ "AR[CCV]", 26, 0, 2, 32, NULL, },
+ { "AR[CFLG]", 26, 0, 2, 27, NULL, },
{ "AR[CSD]", 26, 0, 2, 25, NULL, },
{ "AR[EC]", 26, 0, 2, 66, NULL, },
{ "AR[EFLAG]", 26, 0, 2, 24, NULL, },
@@ -81,7 +82,7 @@ dependencies[] = {
{ "CPUID#", 7, 0, 5, -1, NULL, },
{ "CR[CMCV]", 27, 0, 3, 74, NULL, },
{ "CR[DCR]", 27, 0, 3, 0, NULL, },
- { "CR[EOI]", 27, 0, 7, 67, "SC Section 10.8.3.4", },
+ { "CR[EOI]", 27, 0, 7, 67, "SC Section 5.8.3.4, \"End of External Interrupt Register (EOI Ð CR67)\" on page 2:119", },
{ "CR[GPTA]", 27, 0, 3, 9, NULL, },
{ "CR[IFA]", 27, 0, 1, 20, NULL, },
{ "CR[IFA]", 27, 0, 3, 20, NULL, },
@@ -102,13 +103,14 @@ dependencies[] = {
{ "CR[ITM]", 27, 0, 3, 1, NULL, },
{ "CR[ITV]", 27, 0, 3, 72, NULL, },
{ "CR[IVA]", 27, 0, 4, 2, NULL, },
- { "CR[IVR]", 27, 0, 7, 65, "SC Section 10.8.3.2", },
- { "CR[LID]", 27, 0, 7, 64, "SC Section 10.8.3.1", },
+ { "CR[IVR]", 27, 0, 7, 65, "SC Section 5.8.3.2, \"External Interrupt Vector Register (IVR Ð CR65)\" on page 2:118", },
+ { "CR[LID]", 27, 0, 7, 64, "SC Section 5.8.3.1, \"Local ID (LID Ð CR64)\" on page 2:117", },
{ "CR[LRR%], % in 0 - 1", 9, 0, 3, -1, NULL, },
{ "CR[PMV]", 27, 0, 3, 73, NULL, },
{ "CR[PTA]", 27, 0, 3, 8, NULL, },
{ "CR[TPR]", 27, 0, 3, 66, NULL, },
- { "CR[TPR]", 27, 0, 7, 66, "SC Section 10.8.3.3", },
+ { "CR[TPR]", 27, 0, 7, 66, "SC Section 5.8.3.3, \"Task Priority Register (TPR Ð CR66)\" on page 2:119", },
+ { "CR[TPR]", 27, 0, 1, 66, NULL, },
{ "CR%, % in 3-7, 10-15, 18, 26-63, 75-79, 82-127", 10, 0, 0, -1, NULL, },
{ "DBR#", 11, 0, 2, -1, NULL, },
{ "DBR#", 11, 0, 3, -1, NULL, },
@@ -151,7 +153,7 @@ dependencies[] = {
{ "PKR#", 19, 0, 2, -1, NULL, },
{ "PKR#", 19, 0, 2, -1, NULL, },
{ "PMC#", 20, 0, 2, -1, NULL, },
- { "PMC#", 20, 0, 7, -1, "SC+3 Section 12.1.1", },
+ { "PMC#", 20, 0, 7, -1, "SC Section 7.2.1, \"Generic Performance Counter Registers\" for PMC[0].fr on page 2:150", },
{ "PMD#", 21, 0, 2, -1, NULL, },
{ "PR0", 0, 0, 0, -1, NULL, },
{ "PR%, % in 1 - 15", 22, 0, 2, -1, NULL, },
@@ -166,54 +168,67 @@ dependencies[] = {
{ "PSR.ac", 28, 0, 1, 3, NULL, },
{ "PSR.ac", 28, 0, 3, 3, NULL, },
{ "PSR.ac", 28, 0, 2, 3, NULL, },
+ { "PSR.ac", 28, 0, 2, 3, NULL, },
{ "PSR.be", 28, 0, 1, 1, NULL, },
{ "PSR.be", 28, 0, 3, 1, NULL, },
{ "PSR.be", 28, 0, 2, 1, NULL, },
+ { "PSR.be", 28, 0, 2, 1, NULL, },
{ "PSR.bn", 28, 0, 2, 44, NULL, },
{ "PSR.cpl", 28, 0, 1, 32, NULL, },
- { "PSR.da", 28, 0, 3, 38, NULL, },
+ { "PSR.cpl", 28, 0, 2, 32, NULL, },
+ { "PSR.da", 28, 0, 2, 38, NULL, },
{ "PSR.db", 28, 0, 3, 24, NULL, },
{ "PSR.db", 28, 0, 2, 24, NULL, },
- { "PSR.db", 28, 0, 3, 24, NULL, },
- { "PSR.dd", 28, 0, 3, 39, NULL, },
+ { "PSR.db", 28, 0, 2, 24, NULL, },
+ { "PSR.dd", 28, 0, 2, 39, NULL, },
{ "PSR.dfh", 28, 0, 3, 19, NULL, },
{ "PSR.dfh", 28, 0, 2, 19, NULL, },
+ { "PSR.dfh", 28, 0, 2, 19, NULL, },
{ "PSR.dfl", 28, 0, 3, 18, NULL, },
{ "PSR.dfl", 28, 0, 2, 18, NULL, },
+ { "PSR.dfl", 28, 0, 2, 18, NULL, },
{ "PSR.di", 28, 0, 3, 22, NULL, },
{ "PSR.di", 28, 0, 2, 22, NULL, },
+ { "PSR.di", 28, 0, 2, 22, NULL, },
{ "PSR.dt", 28, 0, 3, 17, NULL, },
{ "PSR.dt", 28, 0, 2, 17, NULL, },
- { "PSR.ed", 28, 0, 3, 43, NULL, },
+ { "PSR.dt", 28, 0, 2, 17, NULL, },
+ { "PSR.ed", 28, 0, 2, 43, NULL, },
{ "PSR.i", 28, 0, 2, 14, NULL, },
- { "PSR.i", 28, 0, 3, 14, NULL, },
{ "PSR.ia", 28, 0, 0, 14, NULL, },
{ "PSR.ic", 28, 0, 2, 13, NULL, },
{ "PSR.ic", 28, 0, 3, 13, NULL, },
+ { "PSR.ic", 28, 0, 2, 13, NULL, },
{ "PSR.id", 28, 0, 0, 14, NULL, },
{ "PSR.is", 28, 0, 0, 14, NULL, },
- { "PSR.it", 28, 0, 3, 14, NULL, },
+ { "PSR.it", 28, 0, 2, 14, NULL, },
{ "PSR.lp", 28, 0, 2, 25, NULL, },
{ "PSR.lp", 28, 0, 3, 25, NULL, },
- { "PSR.lp", 28, 0, 3, 25, NULL, },
- { "PSR.mc", 28, 0, 0, 35, NULL, },
+ { "PSR.lp", 28, 0, 2, 25, NULL, },
+ { "PSR.mc", 28, 0, 2, 35, NULL, },
{ "PSR.mfh", 28, 0, 2, 5, NULL, },
{ "PSR.mfl", 28, 0, 2, 4, NULL, },
{ "PSR.pk", 28, 0, 3, 15, NULL, },
{ "PSR.pk", 28, 0, 2, 15, NULL, },
+ { "PSR.pk", 28, 0, 2, 15, NULL, },
{ "PSR.pp", 28, 0, 2, 21, NULL, },
{ "PSR.ri", 28, 0, 0, 41, NULL, },
{ "PSR.rt", 28, 0, 2, 27, NULL, },
{ "PSR.rt", 28, 0, 3, 27, NULL, },
- { "PSR.rt", 28, 0, 3, 27, NULL, },
+ { "PSR.rt", 28, 0, 2, 27, NULL, },
{ "PSR.si", 28, 0, 2, 23, NULL, },
{ "PSR.si", 28, 0, 3, 23, NULL, },
+ { "PSR.si", 28, 0, 2, 23, NULL, },
{ "PSR.sp", 28, 0, 2, 20, NULL, },
{ "PSR.sp", 28, 0, 3, 20, NULL, },
- { "PSR.ss", 28, 0, 3, 40, NULL, },
+ { "PSR.sp", 28, 0, 2, 20, NULL, },
+ { "PSR.ss", 28, 0, 2, 40, NULL, },
{ "PSR.tb", 28, 0, 3, 26, NULL, },
{ "PSR.tb", 28, 0, 2, 26, NULL, },
+ { "PSR.tb", 28, 0, 2, 26, NULL, },
{ "PSR.up", 28, 0, 2, 2, NULL, },
+ { "PSR.vm", 28, 0, 1, 46, NULL, },
+ { "PSR.vm", 28, 0, 2, 46, NULL, },
{ "RR#", 25, 0, 3, -1, NULL, },
{ "RR#", 25, 0, 2, -1, NULL, },
{ "RSE", 29, 0, 2, -1, NULL, },
@@ -255,6 +270,7 @@ dependencies[] = {
{ "AR[PFS]", 26, 1, 2, 64, NULL, },
{ "AR[RNAT]", 26, 1, 2, 19, NULL, },
{ "AR[RSC]", 26, 1, 2, 16, NULL, },
+ { "AR[SSD]", 26, 1, 2, 26, NULL, },
{ "AR[UNAT]{%}, % in 0 - 63", 2, 1, 2, -1, NULL, },
{ "AR%, % in 8-15, 20, 22-23, 31, 33-35, 37-39, 41-43, 45-47, 67-111", 3, 1, 0, -1, NULL, },
{ "AR%, % in 48 - 63, 112-127", 4, 1, 2, -1, NULL, },
@@ -266,7 +282,7 @@ dependencies[] = {
{ "CPUID#", 7, 1, 0, -1, NULL, },
{ "CR[CMCV]", 27, 1, 2, 74, NULL, },
{ "CR[DCR]", 27, 1, 2, 0, NULL, },
- { "CR[EOI]", 27, 1, 7, 67, "SC Section 10.8.3.4", },
+ { "CR[EOI]", 27, 1, 7, 67, "SC Section 5.8.3.4, \"End of External Interrupt Register (EOI Ð CR67)\" on page 2:119", },
{ "CR[GPTA]", 27, 1, 2, 9, NULL, },
{ "CR[IFA]", 27, 1, 2, 20, NULL, },
{ "CR[IFS]", 27, 1, 2, 23, NULL, },
@@ -365,1229 +381,1364 @@ dependencies[] = {
{ "PSR.ss", 28, 1, 2, 40, NULL, },
{ "PSR.tb", 28, 1, 2, 26, NULL, },
{ "PSR.up", 28, 1, 2, 2, NULL, },
+ { "PSR.vm", 28, 1, 2, 46, NULL, },
{ "RR#", 25, 1, 2, -1, NULL, },
{ "RSE", 29, 1, 2, -1, NULL, },
{ "PR63", 24, 2, 6, -1, NULL, },
};
-static const short dep0[] = {
- 96, 267, 2139, 2312,
+static const unsigned short dep0[] = {
+ 97, 282, 2140, 2327,
};
-static const short dep1[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312, 4135,
- 20613,
+static const unsigned short dep1[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173,
+ 2327, 4135, 20616,
};
-static const short dep2[] = {
- 96, 267, 2165, 2166, 2168, 2169, 2171, 2172, 2174, 2329, 2332, 2333, 2336,
- 2337, 2340, 2341,
+static const unsigned short dep2[] = {
+ 97, 282, 2166, 2167, 2169, 2170, 2172, 2173, 2175, 2344, 2347, 2348, 2351,
+ 2352, 2355, 2356,
};
-static const short dep3[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2329, 2332,
- 2333, 2336, 2337, 2340, 2341, 4135, 20613,
+static const unsigned short dep3[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173,
+ 2344, 2347, 2348, 2351, 2352, 2355, 2356, 4135, 20616,
};
-static const short dep4[] = {
- 96, 267, 22645, 22646, 22648, 22649, 22651, 22652, 22654, 22809, 22812, 22813,
- 22816, 22817, 22820, 22821,
+static const unsigned short dep4[] = {
+ 97, 282, 22646, 22647, 22649, 22650, 22652, 22653, 22655, 22824, 22827, 22828,
+ 22831, 22832, 22835, 22836,
};
-static const short dep5[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
- 22809, 22812, 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep5[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173,
+ 4135, 20616, 22824, 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep6[] = {
- 96, 267, 2165, 2166, 2168, 2169, 2171, 2172, 2174, 2329, 2330, 2332, 2334,
- 2336, 2338, 2340,
+static const unsigned short dep6[] = {
+ 97, 282, 2166, 2167, 2169, 2170, 2172, 2173, 2175, 2344, 2345, 2347, 2349,
+ 2351, 2353, 2355,
};
-static const short dep7[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2329, 2330,
- 2333, 2334, 2337, 2338, 2341, 4135, 20613,
+static const unsigned short dep7[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173,
+ 2344, 2345, 2348, 2349, 2352, 2353, 2356, 4135, 20616,
};
-static const short dep8[] = {
- 96, 267, 2165, 2166, 2168, 2169, 2171, 2172, 2174, 2329, 2331, 2333, 2335,
- 2337, 2339, 2341,
+static const unsigned short dep8[] = {
+ 97, 282, 2166, 2167, 2169, 2170, 2172, 2173, 2175, 2344, 2346, 2348, 2350,
+ 2352, 2354, 2356,
};
-static const short dep9[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2329, 2331,
- 2332, 2335, 2336, 2339, 2340, 4135, 20613,
+static const unsigned short dep9[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173,
+ 2344, 2346, 2347, 2350, 2351, 2354, 2355, 4135, 20616,
};
-static const short dep10[] = {
- 96, 267, 2165, 2166, 2168, 2169, 2171, 2172, 2174, 2329, 2330, 2331, 2332,
- 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2341,
+static const unsigned short dep10[] = {
+ 97, 282, 2166, 2167, 2169, 2170, 2172, 2173, 2175, 2344, 2345, 2346, 2347,
+ 2348, 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356,
};
-static const short dep11[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2329, 2330,
- 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2341, 4135, 20613,
-
+static const unsigned short dep11[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173,
+ 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356,
+ 4135, 20616,
};
-static const short dep12[] = {
- 96, 267, 2379,
+static const unsigned short dep12[] = {
+ 97, 282, 2395,
};
-static const short dep13[] = {
- 40, 41, 96, 156, 174, 175, 267, 2082, 2083, 2165, 2167, 2168, 2170, 2171,
- 2173, 2174, 4135,
+static const unsigned short dep13[] = {
+ 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 282, 2082, 2083, 2166, 2168,
+ 2169, 2171, 2172, 2174, 2175, 4135,
};
-static const short dep14[] = {
- 96, 155, 267, 310, 2379, 28852, 29002,
+static const unsigned short dep14[] = {
+ 97, 163, 282, 325, 2395, 28866, 29018,
};
-static const short dep15[] = {
+static const unsigned short dep15[] = {
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, 28, 29, 30, 31, 32, 33, 40, 41, 96, 144, 156, 174, 175,
- 267, 310, 2082, 2083, 2165, 2167, 2168, 2170, 2171, 2173, 2174, 4135, 28852,
- 29002,
+ 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 40, 41, 97, 150, 152, 158, 162,
+ 164, 175, 185, 186, 188, 282, 325, 2082, 2083, 2166, 2168, 2169, 2171, 2172,
+ 2174, 2175, 4135, 28866, 29018,
};
-static const short dep16[] = {
- 1, 6, 40, 96, 134, 182, 187, 226, 267, 297, 2379, 28852, 29002,
+static const unsigned short dep16[] = {
+ 1, 6, 40, 97, 137, 196, 201, 241, 282, 312, 2395, 28866, 29018,
};
-static const short dep17[] = {
- 1, 25, 27, 38, 40, 41, 96, 156, 158, 159, 174, 175, 182, 187, 226, 267, 297,
- 2082, 2083, 2165, 2167, 2168, 2170, 2171, 2173, 2174, 4135, 28852, 29002,
-
+static const unsigned short dep17[] = {
+ 1, 25, 27, 38, 40, 41, 97, 158, 162, 164, 166, 167, 175, 185, 186, 188, 196,
+ 201, 241, 282, 312, 2082, 2083, 2166, 2168, 2169, 2171, 2172, 2174, 2175,
+ 4135, 28866, 29018,
};
-static const short dep18[] = {
- 1, 40, 51, 96, 182, 226, 233, 267, 28852, 29002,
+static const unsigned short dep18[] = {
+ 1, 40, 51, 97, 196, 241, 248, 282, 28866, 29018,
};
-static const short dep19[] = {
- 1, 38, 40, 41, 96, 153, 174, 182, 226, 233, 267, 4135, 28852, 29002,
+static const unsigned short dep19[] = {
+ 1, 38, 40, 41, 97, 158, 160, 161, 162, 175, 185, 190, 191, 196, 241, 248,
+ 282, 4135, 28866, 29018,
};
-static const short dep20[] = {
- 40, 96, 226, 267,
+static const unsigned short dep20[] = {
+ 40, 97, 241, 282,
};
-static const short dep21[] = {
- 96, 174, 226, 267,
+static const unsigned short dep21[] = {
+ 97, 158, 162, 175, 185, 241, 282,
};
-static const short dep22[] = {
- 1, 40, 96, 128, 129, 131, 132, 133, 134, 135, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 155, 156, 159, 160, 161,
- 162, 163, 164, 165, 166, 169, 170, 171, 172, 173, 174, 175, 176, 177, 182,
- 226, 267, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
- 307, 308, 309, 310, 311, 312, 313, 315, 316, 318, 319, 320, 321, 322, 323,
- 324, 325, 326, 327, 328, 28852, 29002,
+static const unsigned short dep22[] = {
+ 1, 40, 97, 131, 135, 136, 138, 139, 142, 143, 146, 149, 152, 155, 156, 157,
+ 158, 161, 162, 163, 164, 167, 168, 169, 170, 173, 174, 175, 178, 181, 184,
+ 185, 188, 189, 191, 196, 241, 282, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 330, 331, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 28866, 29018,
};
-static const short dep23[] = {
- 1, 38, 40, 41, 50, 51, 55, 58, 72, 96, 134, 174, 182, 226, 267, 294, 295,
- 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 315, 316, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
- 328, 4135, 28852, 29002,
+static const unsigned short dep23[] = {
+ 1, 38, 40, 41, 50, 51, 55, 58, 73, 97, 137, 138, 158, 162, 175, 185, 190,
+ 191, 196, 241, 282, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 330, 331, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 4135, 28866, 29018,
};
-static const short dep24[] = {
- 96, 133, 267, 296,
+static const unsigned short dep24[] = {
+ 97, 136, 282, 311,
};
-static const short dep25[] = {
- 96, 134, 174, 267, 296,
+static const unsigned short dep25[] = {
+ 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 311,
};
-static const short dep26[] = {
- 96, 134, 267, 297,
+static const unsigned short dep26[] = {
+ 97, 137, 282, 312,
};
-static const short dep27[] = {
- 25, 26, 96, 97, 100, 104, 107, 134, 156, 174, 267, 297,
+static const unsigned short dep27[] = {
+ 25, 26, 97, 98, 101, 105, 108, 137, 138, 158, 162, 164, 175, 185, 282, 312,
+
};
-static const short dep28[] = {
- 40, 41, 96, 174, 267, 2165, 2167, 2168, 2170, 2171, 2173, 2174, 4135,
+static const unsigned short dep28[] = {
+ 97, 190, 282, 344,
};
-static const short dep29[] = {
- 1, 25, 40, 96, 182, 214, 215, 226, 267, 2082, 2270, 2273, 2379, 28852, 29002,
-
+static const unsigned short dep29[] = {
+ 97, 98, 101, 105, 108, 137, 138, 158, 162, 164, 175, 185, 282, 344,
};
-static const short dep30[] = {
- 1, 6, 38, 40, 41, 96, 134, 156, 174, 175, 182, 214, 216, 226, 267, 2082, 2083,
- 2165, 2167, 2168, 2170, 2171, 2173, 2174, 2271, 2273, 4135, 28852, 29002,
+static const unsigned short dep30[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2166, 2168, 2169, 2171, 2172, 2174, 2175,
+ 4135,
+};
+
+static const unsigned short dep31[] = {
+ 1, 25, 40, 97, 196, 228, 229, 241, 282, 2082, 2285, 2288, 2395, 28866, 29018,
};
-static const short dep31[] = {
- 96, 267,
+static const unsigned short dep32[] = {
+ 1, 6, 38, 40, 41, 97, 137, 138, 158, 162, 164, 175, 185, 186, 188, 196, 228,
+ 230, 241, 282, 2082, 2083, 2166, 2168, 2169, 2171, 2172, 2174, 2175, 2286,
+ 2288, 4135, 28866, 29018,
};
-static const short dep32[] = {
- 96, 174, 267, 2082, 2084,
+static const unsigned short dep33[] = {
+ 97, 282,
};
-static const short dep33[] = {
- 40, 41, 96, 156, 174, 175, 267, 2165, 2167, 2168, 2170, 2171, 2173, 2174,
- 4135,
+static const unsigned short dep34[] = {
+ 97, 158, 162, 175, 185, 282, 2082, 2084,
};
-static const short dep34[] = {
- 6, 37, 38, 39, 96, 124, 125, 187, 226, 267, 292, 293, 2379,
+static const unsigned short dep35[] = {
+ 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 282, 2166, 2168, 2169, 2171,
+ 2172, 2174, 2175, 4135,
};
-static const short dep35[] = {
- 6, 37, 40, 41, 96, 156, 174, 175, 187, 226, 267, 292, 293, 331, 2165, 2167,
- 2168, 2170, 2171, 2173, 2174, 4135,
+static const unsigned short dep36[] = {
+ 6, 37, 38, 39, 97, 125, 126, 201, 241, 282, 307, 308, 2395,
};
-static const short dep36[] = {
- 24, 96, 213, 267, 2379,
+static const unsigned short dep37[] = {
+ 6, 37, 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 201, 241, 282, 307,
+ 308, 347, 2166, 2168, 2169, 2171, 2172, 2174, 2175, 4135,
};
-static const short dep37[] = {
- 24, 40, 41, 96, 156, 174, 175, 213, 267, 2165, 2167, 2168, 2170, 2171, 2173,
- 2174, 4135,
+static const unsigned short dep38[] = {
+ 24, 97, 227, 282, 2395,
};
-static const short dep38[] = {
- 6, 24, 37, 38, 39, 96, 124, 125, 187, 213, 226, 267, 292, 293, 2379,
+static const unsigned short dep39[] = {
+ 24, 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 227, 282, 2166, 2168, 2169,
+ 2171, 2172, 2174, 2175, 4135,
};
-static const short dep39[] = {
- 6, 24, 37, 40, 41, 96, 156, 174, 175, 187, 213, 226, 267, 292, 293, 331, 2165,
- 2167, 2168, 2170, 2171, 2173, 2174, 4135,
+static const unsigned short dep40[] = {
+ 6, 24, 37, 38, 39, 97, 125, 126, 201, 227, 241, 282, 307, 308, 2395,
};
-static const short dep40[] = {
- 1, 6, 38, 40, 41, 96, 134, 156, 174, 175, 182, 214, 216, 226, 267, 2165, 2167,
- 2168, 2170, 2171, 2173, 2174, 2271, 2273, 4135, 28852, 29002,
+static const unsigned short dep41[] = {
+ 6, 24, 37, 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 201, 227, 241, 282,
+ 307, 308, 347, 2166, 2168, 2169, 2171, 2172, 2174, 2175, 4135,
};
-static const short dep41[] = {
- 96, 174, 267,
+static const unsigned short dep42[] = {
+ 1, 6, 38, 40, 41, 97, 137, 138, 158, 162, 164, 175, 185, 186, 188, 196, 228,
+ 230, 241, 282, 2166, 2168, 2169, 2171, 2172, 2174, 2175, 2286, 2288, 4135,
+ 28866, 29018,
};
-static const short dep42[] = {
- 15, 96, 196, 197, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
- 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22809, 22812, 22813, 22816,
- 22817, 22820, 22821,
+static const unsigned short dep43[] = {
+ 97, 158, 162, 175, 185, 282,
};
-static const short dep43[] = {
- 11, 19, 20, 40, 41, 96, 174, 196, 198, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 22809, 22812,
- 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep44[] = {
+ 15, 97, 210, 211, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
+ 22646, 22647, 22648, 22650, 22651, 22653, 22654, 22824, 22827, 22828, 22831,
+ 22832, 22835, 22836,
};
-static const short dep44[] = {
- 15, 16, 17, 18, 96, 196, 197, 199, 200, 202, 203, 205, 206, 267, 2135, 2310,
- 18593, 18594, 18746, 18747, 18749, 18750, 22645, 22646, 22647, 22649, 22650,
- 22652, 22653, 22809, 22812, 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep45[] = {
+ 11, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763,
+ 18764, 18766, 22824, 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep45[] = {
- 11, 12, 13, 14, 19, 20, 40, 41, 96, 174, 196, 198, 199, 201, 202, 204, 205,
- 207, 267, 2134, 2135, 2136, 2165, 2166, 2169, 2172, 2310, 4135, 16524, 16526,
- 18746, 18748, 18749, 18751, 22809, 22812, 22813, 22816, 22817, 22820, 22821,
-
+static const unsigned short dep46[] = {
+ 15, 16, 17, 18, 97, 210, 211, 213, 214, 216, 217, 219, 220, 282, 2136, 2325,
+ 18601, 18602, 18761, 18762, 18764, 18765, 22646, 22647, 22648, 22650, 22651,
+ 22653, 22654, 22824, 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep46[] = {
- 16, 96, 199, 200, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
- 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22809, 22812, 22813, 22816,
- 22817, 22820, 22821,
+static const unsigned short dep47[] = {
+ 11, 12, 13, 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 213, 215,
+ 216, 218, 219, 221, 282, 2135, 2136, 2137, 2166, 2167, 2170, 2173, 2325, 4135,
+ 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766, 22824, 22827, 22828,
+ 22831, 22832, 22835, 22836,
};
-static const short dep47[] = {
- 12, 19, 20, 40, 41, 96, 174, 199, 201, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 22809, 22812,
- 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep48[] = {
+ 16, 97, 213, 214, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
+ 22646, 22647, 22648, 22650, 22651, 22653, 22654, 22824, 22827, 22828, 22831,
+ 22832, 22835, 22836,
};
-static const short dep48[] = {
- 17, 96, 202, 203, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
- 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22809, 22812, 22813, 22816,
- 22817, 22820, 22821,
+static const unsigned short dep49[] = {
+ 12, 19, 20, 40, 41, 97, 158, 162, 175, 185, 213, 215, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763,
+ 18764, 18766, 22824, 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep49[] = {
- 13, 19, 20, 40, 41, 96, 174, 202, 204, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 22809, 22812,
- 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep50[] = {
+ 17, 97, 216, 217, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
+ 22646, 22647, 22648, 22650, 22651, 22653, 22654, 22824, 22827, 22828, 22831,
+ 22832, 22835, 22836,
};
-static const short dep50[] = {
- 18, 96, 205, 206, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
- 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22809, 22812, 22813, 22816,
- 22817, 22820, 22821,
+static const unsigned short dep51[] = {
+ 13, 19, 20, 40, 41, 97, 158, 162, 175, 185, 216, 218, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763,
+ 18764, 18766, 22824, 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep51[] = {
- 14, 19, 20, 40, 41, 96, 174, 205, 207, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 22809, 22812,
- 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep52[] = {
+ 18, 97, 219, 220, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
+ 22646, 22647, 22648, 22650, 22651, 22653, 22654, 22824, 22827, 22828, 22831,
+ 22832, 22835, 22836,
};
-static const short dep52[] = {
- 15, 96, 196, 197, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
+static const unsigned short dep53[] = {
+ 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 219, 221, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763,
+ 18764, 18766, 22824, 22827, 22828, 22831, 22832, 22835, 22836,
+};
+
+static const unsigned short dep54[] = {
+ 15, 97, 210, 211, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
};
-static const short dep53[] = {
- 11, 19, 20, 40, 41, 96, 174, 196, 198, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751,
+static const unsigned short dep55[] = {
+ 11, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763,
+ 18764, 18766,
};
-static const short dep54[] = {
- 15, 16, 17, 18, 96, 196, 197, 199, 200, 202, 203, 205, 206, 267, 2135, 2310,
- 18593, 18594, 18746, 18747, 18749, 18750,
+static const unsigned short dep56[] = {
+ 15, 16, 17, 18, 97, 210, 211, 213, 214, 216, 217, 219, 220, 282, 2136, 2325,
+ 18601, 18602, 18761, 18762, 18764, 18765,
};
-static const short dep55[] = {
- 11, 12, 13, 14, 19, 20, 40, 41, 96, 174, 196, 198, 199, 201, 202, 204, 205,
- 207, 267, 2134, 2135, 2136, 2165, 2166, 2169, 2172, 2310, 4135, 16524, 16526,
- 18746, 18748, 18749, 18751,
+static const unsigned short dep57[] = {
+ 11, 12, 13, 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 213, 215,
+ 216, 218, 219, 221, 282, 2135, 2136, 2137, 2166, 2167, 2170, 2173, 2325, 4135,
+ 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766,
};
-static const short dep56[] = {
- 16, 96, 199, 200, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
+static const unsigned short dep58[] = {
+ 16, 97, 213, 214, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
};
-static const short dep57[] = {
- 12, 19, 20, 40, 41, 96, 174, 199, 201, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751,
+static const unsigned short dep59[] = {
+ 12, 19, 20, 40, 41, 97, 158, 162, 175, 185, 213, 215, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763,
+ 18764, 18766,
};
-static const short dep58[] = {
- 17, 96, 202, 203, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
+static const unsigned short dep60[] = {
+ 17, 97, 216, 217, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
};
-static const short dep59[] = {
- 13, 19, 20, 40, 41, 96, 174, 202, 204, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751,
+static const unsigned short dep61[] = {
+ 13, 19, 20, 40, 41, 97, 158, 162, 175, 185, 216, 218, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763,
+ 18764, 18766,
};
-static const short dep60[] = {
- 18, 96, 205, 206, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
+static const unsigned short dep62[] = {
+ 18, 97, 219, 220, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
};
-static const short dep61[] = {
- 14, 19, 20, 40, 41, 96, 174, 205, 207, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751,
+static const unsigned short dep63[] = {
+ 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 219, 221, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763,
+ 18764, 18766,
};
-static const short dep62[] = {
- 96, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
+static const unsigned short dep64[] = {
+ 97, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
};
-static const short dep63[] = {
- 40, 41, 96, 174, 267, 2134, 2135, 2136, 2165, 2166, 2169, 2172, 2310, 4135,
- 16524, 16526, 18746, 18748, 18749, 18751,
+static const unsigned short dep65[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2135, 2136, 2137, 2166, 2167, 2170, 2173,
+ 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766,
};
-static const short dep64[] = {
- 11, 96, 192, 267,
+static const unsigned short dep66[] = {
+ 11, 97, 206, 282,
};
-static const short dep65[] = {
- 11, 40, 41, 96, 174, 192, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep67[] = {
+ 11, 40, 41, 97, 158, 162, 175, 185, 206, 282, 2166, 2167, 2170, 2173, 4135,
+
};
-static const short dep66[] = {
- 11, 40, 41, 96, 174, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep68[] = {
+ 11, 40, 41, 97, 158, 162, 175, 185, 282, 2166, 2167, 2170, 2173, 4135,
};
-static const short dep67[] = {
- 12, 96, 193, 267,
+static const unsigned short dep69[] = {
+ 12, 97, 207, 282,
};
-static const short dep68[] = {
- 11, 40, 41, 96, 174, 193, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep70[] = {
+ 11, 40, 41, 97, 158, 162, 175, 185, 207, 282, 2166, 2167, 2170, 2173, 4135,
+
};
-static const short dep69[] = {
- 13, 96, 194, 267,
+static const unsigned short dep71[] = {
+ 13, 97, 208, 282,
};
-static const short dep70[] = {
- 11, 40, 41, 96, 174, 194, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep72[] = {
+ 11, 40, 41, 97, 158, 162, 175, 185, 208, 282, 2166, 2167, 2170, 2173, 4135,
+
};
-static const short dep71[] = {
- 14, 96, 195, 267,
+static const unsigned short dep73[] = {
+ 14, 97, 209, 282,
};
-static const short dep72[] = {
- 11, 40, 41, 96, 174, 195, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep74[] = {
+ 11, 40, 41, 97, 158, 162, 175, 185, 209, 282, 2166, 2167, 2170, 2173, 4135,
+
};
-static const short dep73[] = {
- 15, 96, 197, 198, 267,
+static const unsigned short dep75[] = {
+ 15, 97, 211, 212, 282,
};
-static const short dep74[] = {
- 40, 41, 96, 174, 197, 198, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep76[] = {
+ 40, 41, 97, 158, 162, 175, 185, 211, 212, 282, 2166, 2167, 2170, 2173, 4135,
+
};
-static const short dep75[] = {
- 40, 41, 96, 174, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep77[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2166, 2167, 2170, 2173, 4135,
};
-static const short dep76[] = {
- 16, 96, 200, 201, 267,
+static const unsigned short dep78[] = {
+ 16, 97, 214, 215, 282,
};
-static const short dep77[] = {
- 40, 41, 96, 174, 200, 201, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep79[] = {
+ 40, 41, 97, 158, 162, 175, 185, 214, 215, 282, 2166, 2167, 2170, 2173, 4135,
+
};
-static const short dep78[] = {
- 17, 96, 203, 204, 267,
+static const unsigned short dep80[] = {
+ 17, 97, 217, 218, 282,
};
-static const short dep79[] = {
- 40, 41, 96, 174, 203, 204, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep81[] = {
+ 40, 41, 97, 158, 162, 175, 185, 217, 218, 282, 2166, 2167, 2170, 2173, 4135,
+
};
-static const short dep80[] = {
- 18, 96, 206, 207, 267,
+static const unsigned short dep82[] = {
+ 18, 97, 220, 221, 282,
};
-static const short dep81[] = {
- 40, 41, 96, 174, 206, 207, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep83[] = {
+ 40, 41, 97, 158, 162, 175, 185, 220, 221, 282, 2166, 2167, 2170, 2173, 4135,
+
};
-static const short dep82[] = {
- 15, 19, 20, 40, 41, 96, 156, 174, 175, 267, 2165, 2166, 2169, 2172, 4135,
-
+static const unsigned short dep84[] = {
+ 15, 19, 20, 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 282, 2166, 2167,
+ 2170, 2173, 4135,
};
-static const short dep83[] = {
- 15, 16, 19, 20, 40, 41, 96, 156, 174, 175, 267, 2165, 2166, 2169, 2172, 4135,
-
+static const unsigned short dep85[] = {
+ 15, 16, 19, 20, 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 282, 2166,
+ 2167, 2170, 2173, 4135,
};
-static const short dep84[] = {
- 15, 17, 19, 20, 40, 41, 96, 156, 174, 175, 267, 2165, 2166, 2169, 2172, 4135,
-
+static const unsigned short dep86[] = {
+ 15, 17, 19, 20, 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 282, 2166,
+ 2167, 2170, 2173, 4135,
};
-static const short dep85[] = {
- 15, 18, 19, 20, 40, 41, 96, 156, 174, 175, 267, 2165, 2166, 2169, 2172, 4135,
-
+static const unsigned short dep87[] = {
+ 15, 18, 19, 20, 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 282, 2166,
+ 2167, 2170, 2173, 4135,
};
-static const short dep86[] = {
- 15, 96, 196, 197, 267,
+static const unsigned short dep88[] = {
+ 15, 97, 210, 211, 282,
};
-static const short dep87[] = {
- 11, 19, 20, 40, 41, 96, 174, 196, 198, 267, 2165, 2166, 2169, 2172, 4135,
-
+static const unsigned short dep89[] = {
+ 11, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 282, 2166, 2167, 2170,
+ 2173, 4135,
};
-static const short dep88[] = {
- 15, 16, 17, 18, 96, 196, 197, 199, 200, 202, 203, 205, 206, 267,
+static const unsigned short dep90[] = {
+ 15, 16, 17, 18, 97, 210, 211, 213, 214, 216, 217, 219, 220, 282,
};
-static const short dep89[] = {
- 11, 12, 13, 14, 19, 20, 40, 41, 96, 174, 196, 198, 199, 201, 202, 204, 205,
- 207, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep91[] = {
+ 11, 12, 13, 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 213, 215,
+ 216, 218, 219, 221, 282, 2166, 2167, 2170, 2173, 4135,
};
-static const short dep90[] = {
- 16, 96, 199, 200, 267,
+static const unsigned short dep92[] = {
+ 16, 97, 213, 214, 282,
};
-static const short dep91[] = {
- 12, 19, 20, 40, 41, 96, 174, 199, 201, 267, 2165, 2166, 2169, 2172, 4135,
-
+static const unsigned short dep93[] = {
+ 12, 19, 20, 40, 41, 97, 158, 162, 175, 185, 213, 215, 282, 2166, 2167, 2170,
+ 2173, 4135,
};
-static const short dep92[] = {
- 17, 96, 202, 203, 267,
+static const unsigned short dep94[] = {
+ 17, 97, 216, 217, 282,
};
-static const short dep93[] = {
- 13, 19, 20, 40, 41, 96, 174, 202, 204, 267, 2165, 2166, 2169, 2172, 4135,
-
+static const unsigned short dep95[] = {
+ 13, 19, 20, 40, 41, 97, 158, 162, 175, 185, 216, 218, 282, 2166, 2167, 2170,
+ 2173, 4135,
};
-static const short dep94[] = {
- 18, 96, 205, 206, 267,
+static const unsigned short dep96[] = {
+ 18, 97, 219, 220, 282,
};
-static const short dep95[] = {
- 14, 19, 20, 40, 41, 96, 174, 205, 207, 267, 2165, 2166, 2169, 2172, 4135,
-
+static const unsigned short dep97[] = {
+ 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 219, 221, 282, 2166, 2167, 2170,
+ 2173, 4135,
};
-static const short dep96[] = {
- 15, 96, 196, 197, 267, 2165, 2166, 2167, 2169, 2170, 2172, 2173, 2329, 2332,
- 2333, 2336, 2337, 2340, 2341,
+static const unsigned short dep98[] = {
+ 15, 97, 210, 211, 282, 2166, 2167, 2168, 2170, 2171, 2173, 2174, 2344, 2347,
+ 2348, 2351, 2352, 2355, 2356,
};
-static const short dep97[] = {
- 11, 19, 20, 40, 41, 96, 174, 196, 198, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2329, 2332, 2333, 2336, 2337, 2340, 2341, 4135, 16524, 16526,
-
+static const unsigned short dep99[] = {
+ 11, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2344, 2347, 2348, 2351, 2352, 2355, 2356, 4135, 16528,
+ 16530, 16531, 16533,
};
-static const short dep98[] = {
- 15, 16, 17, 18, 96, 196, 197, 199, 200, 202, 203, 205, 206, 267, 2165, 2166,
- 2167, 2169, 2170, 2172, 2173, 2329, 2332, 2333, 2336, 2337, 2340, 2341,
+static const unsigned short dep100[] = {
+ 15, 16, 17, 18, 97, 210, 211, 213, 214, 216, 217, 219, 220, 282, 2166, 2167,
+ 2168, 2170, 2171, 2173, 2174, 2344, 2347, 2348, 2351, 2352, 2355, 2356,
};
-static const short dep99[] = {
- 11, 12, 13, 14, 19, 20, 40, 41, 96, 174, 196, 198, 199, 201, 202, 204, 205,
- 207, 267, 2134, 2135, 2136, 2165, 2166, 2169, 2172, 2329, 2332, 2333, 2336,
- 2337, 2340, 2341, 4135, 16524, 16526,
+static const unsigned short dep101[] = {
+ 11, 12, 13, 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 213, 215,
+ 216, 218, 219, 221, 282, 2135, 2136, 2137, 2166, 2167, 2170, 2173, 2344, 2347,
+ 2348, 2351, 2352, 2355, 2356, 4135, 16528, 16530, 16531, 16533,
};
-static const short dep100[] = {
- 16, 96, 199, 200, 267, 2165, 2166, 2167, 2169, 2170, 2172, 2173, 2329, 2332,
- 2333, 2336, 2337, 2340, 2341,
+static const unsigned short dep102[] = {
+ 16, 97, 213, 214, 282, 2166, 2167, 2168, 2170, 2171, 2173, 2174, 2344, 2347,
+ 2348, 2351, 2352, 2355, 2356,
};
-static const short dep101[] = {
- 12, 19, 20, 40, 41, 96, 174, 199, 201, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2329, 2332, 2333, 2336, 2337, 2340, 2341, 4135, 16524, 16526,
-
+static const unsigned short dep103[] = {
+ 12, 19, 20, 40, 41, 97, 158, 162, 175, 185, 213, 215, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2344, 2347, 2348, 2351, 2352, 2355, 2356, 4135, 16528,
+ 16530, 16531, 16533,
};
-static const short dep102[] = {
- 17, 96, 202, 203, 267, 2165, 2166, 2167, 2169, 2170, 2172, 2173, 2329, 2332,
- 2333, 2336, 2337, 2340, 2341,
+static const unsigned short dep104[] = {
+ 17, 97, 216, 217, 282, 2166, 2167, 2168, 2170, 2171, 2173, 2174, 2344, 2347,
+ 2348, 2351, 2352, 2355, 2356,
};
-static const short dep103[] = {
- 13, 19, 20, 40, 41, 96, 174, 202, 204, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2329, 2332, 2333, 2336, 2337, 2340, 2341, 4135, 16524, 16526,
-
+static const unsigned short dep105[] = {
+ 13, 19, 20, 40, 41, 97, 158, 162, 175, 185, 216, 218, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2344, 2347, 2348, 2351, 2352, 2355, 2356, 4135, 16528,
+ 16530, 16531, 16533,
};
-static const short dep104[] = {
- 18, 96, 205, 206, 267, 2165, 2166, 2167, 2169, 2170, 2172, 2173, 2329, 2332,
- 2333, 2336, 2337, 2340, 2341,
+static const unsigned short dep106[] = {
+ 18, 97, 219, 220, 282, 2166, 2167, 2168, 2170, 2171, 2173, 2174, 2344, 2347,
+ 2348, 2351, 2352, 2355, 2356,
};
-static const short dep105[] = {
- 14, 19, 20, 40, 41, 96, 174, 205, 207, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 2329, 2332, 2333, 2336, 2337, 2340, 2341, 4135, 16524, 16526,
-
+static const unsigned short dep107[] = {
+ 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 219, 221, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 2344, 2347, 2348, 2351, 2352, 2355, 2356, 4135, 16528,
+ 16530, 16531, 16533,
};
-static const short dep106[] = {
- 15, 96, 196, 197, 267, 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22809,
- 22812, 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep108[] = {
+ 15, 97, 210, 211, 282, 22646, 22647, 22648, 22650, 22651, 22653, 22654, 22824,
+ 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep107[] = {
- 11, 19, 20, 40, 41, 96, 174, 196, 198, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 4135, 16524, 16526, 22809, 22812, 22813, 22816, 22817, 22820,
- 22821,
+static const unsigned short dep109[] = {
+ 11, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 4135, 16528, 16530, 16531, 16533, 22824, 22827, 22828,
+ 22831, 22832, 22835, 22836,
};
-static const short dep108[] = {
- 15, 16, 17, 18, 96, 196, 197, 199, 200, 202, 203, 205, 206, 267, 22645, 22646,
- 22647, 22649, 22650, 22652, 22653, 22809, 22812, 22813, 22816, 22817, 22820,
- 22821,
+static const unsigned short dep110[] = {
+ 15, 16, 17, 18, 97, 210, 211, 213, 214, 216, 217, 219, 220, 282, 22646, 22647,
+ 22648, 22650, 22651, 22653, 22654, 22824, 22827, 22828, 22831, 22832, 22835,
+ 22836,
};
-static const short dep109[] = {
- 11, 12, 13, 14, 19, 20, 40, 41, 96, 174, 196, 198, 199, 201, 202, 204, 205,
- 207, 267, 2134, 2135, 2136, 2165, 2166, 2169, 2172, 4135, 16524, 16526, 22809,
- 22812, 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep111[] = {
+ 11, 12, 13, 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 210, 212, 213, 215,
+ 216, 218, 219, 221, 282, 2135, 2136, 2137, 2166, 2167, 2170, 2173, 4135, 16528,
+ 16530, 16531, 16533, 22824, 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep110[] = {
- 16, 96, 199, 200, 267, 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22809,
- 22812, 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep112[] = {
+ 16, 97, 213, 214, 282, 22646, 22647, 22648, 22650, 22651, 22653, 22654, 22824,
+ 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep111[] = {
- 12, 19, 20, 40, 41, 96, 174, 199, 201, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 4135, 16524, 16526, 22809, 22812, 22813, 22816, 22817, 22820,
- 22821,
+static const unsigned short dep113[] = {
+ 12, 19, 20, 40, 41, 97, 158, 162, 175, 185, 213, 215, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 4135, 16528, 16530, 16531, 16533, 22824, 22827, 22828,
+ 22831, 22832, 22835, 22836,
};
-static const short dep112[] = {
- 17, 96, 202, 203, 267, 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22809,
- 22812, 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep114[] = {
+ 17, 97, 216, 217, 282, 22646, 22647, 22648, 22650, 22651, 22653, 22654, 22824,
+ 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep113[] = {
- 13, 19, 20, 40, 41, 96, 174, 202, 204, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 4135, 16524, 16526, 22809, 22812, 22813, 22816, 22817, 22820,
- 22821,
+static const unsigned short dep115[] = {
+ 13, 19, 20, 40, 41, 97, 158, 162, 175, 185, 216, 218, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 4135, 16528, 16530, 16531, 16533, 22824, 22827, 22828,
+ 22831, 22832, 22835, 22836,
};
-static const short dep114[] = {
- 18, 96, 205, 206, 267, 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22809,
- 22812, 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep116[] = {
+ 18, 97, 219, 220, 282, 22646, 22647, 22648, 22650, 22651, 22653, 22654, 22824,
+ 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep115[] = {
- 14, 19, 20, 40, 41, 96, 174, 205, 207, 267, 2134, 2135, 2136, 2165, 2166,
- 2169, 2172, 4135, 16524, 16526, 22809, 22812, 22813, 22816, 22817, 22820,
- 22821,
+static const unsigned short dep117[] = {
+ 14, 19, 20, 40, 41, 97, 158, 162, 175, 185, 219, 221, 282, 2135, 2136, 2137,
+ 2166, 2167, 2170, 2173, 4135, 16528, 16530, 16531, 16533, 22824, 22827, 22828,
+ 22831, 22832, 22835, 22836,
};
-static const short dep116[] = {
- 96, 267, 2165, 2166, 2167, 2169, 2170, 2172, 2173, 2329, 2332, 2333, 2336,
- 2337, 2340, 2341,
+static const unsigned short dep118[] = {
+ 97, 282, 2166, 2167, 2168, 2170, 2171, 2173, 2174, 2344, 2347, 2348, 2351,
+ 2352, 2355, 2356,
};
-static const short dep117[] = {
- 40, 41, 96, 174, 267, 2134, 2135, 2136, 2165, 2166, 2169, 2172, 2329, 2332,
- 2333, 2336, 2337, 2340, 2341, 4135, 16524, 16526,
+static const unsigned short dep119[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2135, 2136, 2137, 2166, 2167, 2170, 2173,
+ 2344, 2347, 2348, 2351, 2352, 2355, 2356, 4135, 16528, 16530, 16531, 16533,
+
};
-static const short dep118[] = {
- 96, 267, 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22809, 22812, 22813,
- 22816, 22817, 22820, 22821,
+static const unsigned short dep120[] = {
+ 97, 282, 22646, 22647, 22648, 22650, 22651, 22653, 22654, 22824, 22827, 22828,
+ 22831, 22832, 22835, 22836,
};
-static const short dep119[] = {
- 40, 41, 96, 174, 267, 2134, 2135, 2136, 2165, 2166, 2169, 2172, 4135, 16524,
- 16526, 22809, 22812, 22813, 22816, 22817, 22820, 22821,
+static const unsigned short dep121[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2135, 2136, 2137, 2166, 2167, 2170, 2173,
+ 4135, 16528, 16530, 16531, 16533, 22824, 22827, 22828, 22831, 22832, 22835,
+ 22836,
};
-static const short dep120[] = {
- 19, 20, 40, 41, 96, 174, 267, 2134, 2135, 2136, 2165, 2166, 2169, 2172, 2310,
- 4135, 16524, 16526, 18746, 18748, 18749, 18751,
+static const unsigned short dep122[] = {
+ 19, 20, 40, 41, 97, 158, 162, 175, 185, 282, 2135, 2136, 2137, 2166, 2167,
+ 2170, 2173, 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766,
+
};
-static const short dep121[] = {
- 40, 41, 96, 156, 174, 175, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172,
- 4135, 20613,
+static const unsigned short dep123[] = {
+ 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 282, 2138, 2139, 2140, 2166,
+ 2167, 2170, 2173, 4135, 20616,
};
-static const short dep122[] = {
- 96, 267, 2083, 2084, 2271, 2272,
+static const unsigned short dep124[] = {
+ 97, 282, 2083, 2084, 2286, 2287,
};
-static const short dep123[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2270, 2272,
- 4135, 20613,
+static const unsigned short dep125[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173,
+ 2285, 2287, 4135, 20616,
};
-static const short dep124[] = {
- 40, 41, 96, 174, 267, 2082, 2084, 2165, 2166, 2169, 2172, 2312, 4135, 20613,
-
+static const unsigned short dep126[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2082, 2084, 2166, 2167, 2170, 2173, 2327,
+ 4135, 20616,
};
-static const short dep125[] = {
- 96, 267, 14454, 14456, 14457, 14459, 14460, 14462, 14620, 14621, 14624, 14625,
- 14628, 14629,
+static const unsigned short dep127[] = {
+ 97, 282, 14455, 14457, 14458, 14460, 14461, 14463, 14635, 14636, 14639, 14640,
+ 14643, 14644,
};
-static const short dep126[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 4135, 14620, 14621, 14624, 14625,
- 14628, 14629, 20613, 24693, 24694, 24697, 24700,
+static const unsigned short dep128[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 4135, 14635, 14636,
+ 14639, 14640, 14643, 14644, 20616, 24694, 24695, 24698, 24701,
};
-static const short dep127[] = {
- 96, 121, 123, 124, 126, 267, 288, 289, 292, 293,
+static const unsigned short dep129[] = {
+ 97, 122, 124, 125, 127, 282, 303, 304, 307, 308,
};
-static const short dep128[] = {
- 40, 41, 96, 174, 267, 288, 289, 292, 293, 4135, 24693, 24694, 24697, 24700,
+static const unsigned short dep130[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 303, 304, 307, 308, 4135, 24694, 24695,
+ 24698, 24701,
+};
+
+static const unsigned short dep131[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2166, 2167, 2170, 2173, 2327, 4135, 20616,
};
-static const short dep129[] = {
- 40, 41, 96, 174, 267, 2165, 2166, 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep132[] = {
+ 40, 41, 97, 119, 122, 125, 158, 162, 175, 185, 282, 2327, 4135, 20616, 24694,
+
};
-static const short dep130[] = {
- 40, 41, 96, 118, 121, 124, 174, 267, 2312, 4135, 20613, 24693,
+static const unsigned short dep133[] = {
+ 6, 24, 26, 27, 97, 201, 227, 230, 282, 2081, 2284,
};
-static const short dep131[] = {
- 6, 24, 26, 27, 96, 187, 213, 216, 267, 2081, 2269,
+static const unsigned short dep134[] = {
+ 40, 41, 97, 158, 162, 175, 185, 201, 227, 229, 282, 2138, 2139, 2140, 2166,
+ 2167, 2170, 2173, 2284, 4135, 20616,
};
-static const short dep132[] = {
- 40, 41, 96, 174, 187, 213, 215, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172,
- 2269, 4135, 20613,
+static const unsigned short dep135[] = {
+ 6, 24, 25, 26, 40, 41, 97, 158, 162, 175, 185, 282, 2081, 2166, 2167, 2170,
+ 2173, 2327, 4135, 20616,
};
-static const short dep133[] = {
- 6, 24, 25, 26, 40, 41, 96, 174, 267, 2081, 2165, 2166, 2169, 2172, 2312, 4135,
- 20613,
+static const unsigned short dep136[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2166, 2167, 2170, 2173, 2344, 2347, 2348,
+ 2351, 2352, 2355, 2356, 4135,
};
-static const short dep134[] = {
- 0, 40, 41, 96, 156, 174, 175, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep137[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2166, 2167, 2170, 2173, 4135, 22824,
+ 22827, 22828, 22831, 22832, 22835, 22836,
};
-static const short dep135[] = {
- 0, 96, 181, 267,
+static const unsigned short dep138[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2166, 2167, 2170, 2173, 2344, 2345, 2348,
+ 2349, 2352, 2353, 2356, 4135,
};
-static const short dep136[] = {
- 0, 40, 41, 96, 156, 174, 175, 181, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep139[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2166, 2167, 2170, 2173, 2344, 2346, 2347,
+ 2350, 2351, 2354, 2355, 4135,
};
-static const short dep137[] = {
- 40, 41, 96, 174, 181, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep140[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2166, 2167, 2170, 2173, 2344, 2345, 2346,
+ 2347, 2348, 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 4135,
};
-static const short dep138[] = {
- 2, 28, 96, 183, 217, 267, 28852, 29002,
+static const unsigned short dep141[] = {
+ 0, 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 282, 2166, 2167, 2170, 2173,
+ 4135,
+};
+
+static const unsigned short dep142[] = {
+ 0, 97, 195, 282,
};
-static const short dep139[] = {
- 1, 2, 28, 29, 96, 168, 169, 174, 183, 217, 267, 28852, 29002,
+static const unsigned short dep143[] = {
+ 0, 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 195, 282, 2166, 2167, 2170,
+ 2173, 4135,
};
-static const short dep140[] = {
- 1, 28, 29, 38, 40, 41, 96, 168, 169, 174, 183, 217, 267, 4135, 28852, 29002,
+static const unsigned short dep144[] = {
+ 40, 41, 97, 158, 162, 175, 185, 195, 282, 2166, 2167, 2170, 2173, 4135,
+};
+
+static const unsigned short dep145[] = {
+ 2, 28, 97, 197, 231, 282, 28866, 29018,
+};
+
+static const unsigned short dep146[] = {
+ 1, 2, 28, 29, 97, 158, 162, 175, 177, 178, 185, 197, 231, 282, 28866, 29018,
};
-static const short dep141[] = {
- 0, 40, 41, 96, 174, 181, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep147[] = {
+ 1, 28, 29, 38, 40, 41, 97, 158, 162, 175, 177, 178, 185, 197, 231, 282, 4135,
+ 28866, 29018,
+};
+
+static const unsigned short dep148[] = {
+ 0, 40, 41, 97, 158, 162, 175, 185, 195, 282, 2166, 2167, 2170, 2173, 4135,
+
};
-static const short dep142[] = {
+static const unsigned short dep149[] = {
1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 28, 29, 30, 31, 96, 182, 183, 184, 185, 186, 188, 189, 190, 191, 192, 193,
- 194, 195, 197, 198, 200, 201, 203, 204, 206, 207, 208, 209, 210, 211, 217,
- 218, 219, 267, 2071, 2081, 2260, 2269, 28852, 29002,
+ 28, 29, 30, 31, 97, 196, 197, 198, 199, 200, 202, 203, 204, 205, 206, 207,
+ 208, 209, 211, 212, 214, 215, 217, 218, 220, 221, 222, 223, 224, 225, 231,
+ 232, 233, 234, 282, 2071, 2081, 2274, 2284, 28866, 29018,
+};
+
+static const unsigned short dep150[] = {
+ 29, 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 196, 197, 198, 199,
+ 200, 202, 203, 204, 205, 206, 207, 208, 209, 211, 212, 214, 215, 217, 218,
+ 220, 221, 222, 223, 224, 225, 231, 232, 233, 234, 282, 2138, 2139, 2140, 2166,
+ 2167, 2170, 2173, 2274, 2284, 4135, 20616, 28866, 29018,
};
-static const short dep143[] = {
- 29, 40, 41, 96, 134, 174, 182, 183, 184, 185, 186, 188, 189, 190, 191, 192,
- 193, 194, 195, 197, 198, 200, 201, 203, 204, 206, 207, 208, 209, 210, 211,
- 217, 218, 219, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2260, 2269,
- 4135, 20613, 28852, 29002,
+static const unsigned short dep151[] = {
+ 97, 282, 14464, 14466, 14468, 14470, 14505, 14506, 14525, 14645, 14646, 14666,
+ 14667, 14669, 14670, 14679,
};
-static const short dep144[] = {
- 96, 267, 14463, 14465, 14466, 14468, 14497, 14498, 14513, 14630, 14631, 14651,
- 14652, 14654, 14655, 14664,
+static const unsigned short dep152[] = {
+ 40, 41, 97, 158, 162, 175, 183, 184, 185, 282, 2166, 2167, 2170, 2173, 4135,
+ 14645, 14646, 14666, 14667, 14669, 14670, 14679,
};
-static const short dep145[] = {
- 40, 41, 96, 173, 174, 267, 2165, 2166, 2169, 2172, 4135, 14630, 14631, 14651,
- 14652, 14654, 14655, 14664,
+static const unsigned short dep153[] = {
+ 14464, 14466, 14468, 14470, 14505, 14506, 14525, 14645, 14646, 14666, 14667,
+ 14669, 14670, 14679,
};
-static const short dep146[] = {
- 14463, 14465, 14466, 14468, 14497, 14498, 14513, 14630, 14631, 14651, 14652,
- 14654, 14655, 14664,
+static const unsigned short dep154[] = {
+ 183, 184, 14645, 14646, 14666, 14667, 14669, 14670, 14679,
};
-static const short dep147[] = {
- 173, 14630, 14631, 14651, 14652, 14654, 14655, 14664,
+static const unsigned short dep155[] = {
+ 97, 282, 14465, 14466, 14469, 14470, 14480, 14481, 14483, 14484, 14486, 14487,
+ 14489, 14490, 14493, 14495, 14496, 14505, 14506, 14507, 14508, 14510, 14515,
+ 14516, 14518, 14519, 14525, 14645, 14646, 14652, 14653, 14654, 14655, 14657,
+ 14659, 14666, 14667, 14669, 14670, 14671, 14672, 14675, 14676, 14679,
};
-static const short dep148[] = {
- 96, 267, 14464, 14465, 14467, 14468, 14476, 14477, 14478, 14479, 14480, 14481,
- 14482, 14483, 14485, 14488, 14489, 14497, 14498, 14499, 14500, 14501, 14506,
- 14507, 14508, 14509, 14513, 14630, 14631, 14637, 14638, 14639, 14640, 14642,
- 14644, 14651, 14652, 14654, 14655, 14656, 14657, 14660, 14661, 14664,
+static const unsigned short dep156[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2166, 2167, 2170,
+ 2173, 4135, 14645, 14646, 14652, 14653, 14654, 14655, 14657, 14659, 14666,
+ 14667, 14669, 14670, 14671, 14672, 14675, 14676, 14679, 34888,
};
-static const short dep149[] = {
- 40, 41, 72, 96, 134, 174, 267, 2165, 2166, 2169, 2172, 4135, 14630, 14631,
- 14637, 14638, 14639, 14640, 14642, 14644, 14651, 14652, 14654, 14655, 14656,
- 14657, 14660, 14661, 14664,
+static const unsigned short dep157[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2166, 2167, 2170,
+ 2173, 4135, 14645, 14646, 14652, 14653, 14654, 14655, 14657, 14659, 14666,
+ 14667, 14669, 14670, 14671, 14672, 14675, 14676, 14679,
};
-static const short dep150[] = {
+static const unsigned short dep158[] = {
1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 28, 29, 30, 31, 40, 41, 96, 134, 171, 174, 267, 2071, 2081, 2165, 2166, 2169,
- 2172, 2312, 4135, 20613, 28852,
+ 28, 29, 30, 31, 40, 41, 97, 137, 138, 158, 162, 175, 180, 181, 185, 190, 191,
+ 282, 2071, 2081, 2166, 2167, 2170, 2173, 2327, 4135, 20616, 28866,
};
-static const short dep151[] = {
+static const unsigned short dep159[] = {
43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63,
- 64, 65, 67, 69, 70, 71, 72, 93, 95, 96, 228, 229, 230, 231, 232, 233, 234,
- 235, 236, 237, 238, 240, 241, 242, 243, 244, 246, 248, 249, 250, 266, 267,
- 2116, 2295,
+ 64, 65, 67, 69, 70, 71, 72, 73, 94, 96, 97, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 255, 256, 257, 258, 259, 261, 263, 264, 265, 281,
+ 282, 2116, 2310,
};
-static const short dep152[] = {
- 40, 41, 95, 96, 134, 153, 174, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 240, 241, 242, 243, 244, 246, 248, 249, 250, 266, 267, 2137, 2138,
- 2139, 2165, 2166, 2169, 2172, 2295, 4135, 20613,
+static const unsigned short dep160[] = {
+ 40, 41, 96, 97, 137, 138, 158, 160, 161, 162, 175, 185, 190, 191, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 255, 256, 257, 258, 259, 261,
+ 263, 264, 265, 281, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2310, 4135,
+ 20616,
};
-static const short dep153[] = {
- 59, 94, 96, 239, 266, 267, 2139, 2312,
+static const unsigned short dep161[] = {
+ 59, 95, 97, 254, 281, 282, 2140, 2327,
};
-static const short dep154[] = {
+static const unsigned short dep162[] = {
40, 41, 43, 44, 46, 48, 49, 51, 52, 53, 54, 56, 57, 60, 61, 63, 64, 65, 66,
- 67, 69, 70, 71, 93, 94, 96, 134, 153, 174, 239, 266, 267, 2107, 2116, 2165,
- 2166, 2169, 2172, 2312, 4135, 20613,
+ 67, 69, 70, 71, 94, 95, 97, 137, 138, 158, 160, 161, 162, 175, 185, 190, 191,
+ 254, 281, 282, 2107, 2116, 2166, 2167, 2170, 2173, 2327, 4135, 20616,
};
-static const short dep155[] = {
- 2, 28, 41, 96, 183, 217, 226, 267, 2139, 2312, 28852, 29002,
+static const unsigned short dep163[] = {
+ 2, 28, 41, 97, 197, 231, 241, 282, 2140, 2327, 28866, 29018,
};
-static const short dep156[] = {
- 2, 25, 26, 28, 29, 38, 40, 41, 96, 168, 169, 174, 183, 217, 226, 267, 2312,
- 4135, 20613, 28852, 29002,
+static const unsigned short dep164[] = {
+ 2, 25, 26, 28, 29, 38, 40, 41, 97, 158, 162, 175, 177, 178, 185, 197, 231,
+ 241, 282, 2327, 4135, 20616, 28866, 29018,
};
-static const short dep157[] = {
- 96, 128, 129, 131, 132, 136, 137, 140, 141, 142, 143, 144, 145, 146, 147,
- 149, 152, 153, 157, 158, 161, 162, 163, 164, 165, 167, 168, 170, 171, 172,
- 173, 175, 176, 177, 267, 294, 295, 299, 301, 302, 303, 304, 306, 308, 312,
- 315, 316, 318, 319, 320, 321, 323, 324, 325, 327, 328,
+static const unsigned short dep165[] = {
+ 97, 129, 130, 133, 134, 140, 141, 144, 145, 147, 148, 150, 151, 153, 154,
+ 157, 159, 160, 165, 166, 169, 170, 171, 172, 174, 176, 177, 179, 180, 182,
+ 183, 186, 187, 189, 282, 309, 310, 314, 316, 317, 318, 319, 321, 323, 327,
+ 330, 331, 333, 334, 335, 336, 338, 339, 340, 342, 343,
};
-static const short dep158[] = {
- 40, 41, 72, 96, 134, 174, 267, 294, 295, 299, 301, 302, 303, 304, 306, 308,
- 312, 315, 316, 318, 319, 320, 321, 323, 324, 325, 327, 328, 2137, 2138, 2139,
- 2165, 2166, 2169, 2172, 4135, 20613,
+static const unsigned short dep166[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 309, 310, 314, 316,
+ 317, 318, 319, 321, 323, 327, 330, 331, 333, 334, 335, 336, 338, 339, 340,
+ 342, 343, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 4135, 20616, 34888,
};
-static const short dep159[] = {
- 96, 127, 129, 130, 132, 161, 162, 177, 267, 294, 295, 315, 316, 318, 319,
- 328,
+static const unsigned short dep167[] = {
+ 97, 128, 130, 132, 134, 169, 170, 189, 282, 309, 310, 330, 331, 333, 334,
+ 343,
};
-static const short dep160[] = {
- 40, 41, 96, 173, 174, 267, 294, 295, 315, 316, 318, 319, 328, 2137, 2138,
- 2139, 2165, 2166, 2169, 2172, 4135, 20613,
+static const unsigned short dep168[] = {
+ 40, 41, 97, 158, 162, 175, 183, 184, 185, 282, 309, 310, 330, 331, 333, 334,
+ 343, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 4135, 20616,
};
-static const short dep161[] = {
- 40, 41, 96, 129, 132, 134, 137, 138, 141, 143, 145, 147, 149, 150, 152, 156,
- 157, 159, 160, 161, 162, 164, 165, 167, 169, 170, 172, 174, 176, 177, 267,
- 2165, 2166, 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep169[] = {
+ 40, 41, 97, 130, 131, 134, 135, 137, 138, 141, 142, 145, 146, 148, 149, 151,
+ 152, 154, 155, 157, 158, 159, 161, 162, 164, 165, 167, 168, 169, 170, 172,
+ 173, 174, 175, 176, 178, 179, 181, 182, 184, 185, 187, 188, 189, 190, 191,
+ 282, 2166, 2167, 2170, 2173, 2327, 4135, 20616,
};
-static const short dep162[] = {
- 40, 41, 96, 129, 132, 161, 162, 174, 177, 267, 2165, 2166, 2169, 2172, 2312,
- 4135, 20613,
+static const unsigned short dep170[] = {
+ 40, 41, 97, 130, 131, 134, 135, 158, 162, 169, 170, 175, 185, 189, 282, 2166,
+ 2167, 2170, 2173, 2327, 4135, 20616,
};
-static const short dep163[] = {
- 40, 41, 75, 76, 81, 83, 96, 110, 134, 163, 174, 178, 267, 2137, 2138, 2139,
- 2165, 2166, 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep171[] = {
+ 40, 41, 70, 76, 77, 82, 84, 97, 111, 137, 138, 153, 155, 158, 162, 171, 173,
+ 175, 185, 192, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135,
+ 20616,
};
-static const short dep164[] = {
- 40, 41, 75, 76, 81, 83, 96, 110, 134, 135, 136, 138, 139, 163, 174, 178, 267,
- 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
+static const unsigned short dep172[] = {
+ 40, 41, 70, 76, 77, 82, 84, 97, 111, 137, 138, 139, 140, 142, 143, 153, 155,
+ 158, 162, 171, 173, 175, 185, 192, 282, 2138, 2139, 2140, 2166, 2167, 2170,
+ 2173, 4135, 20616,
};
-static const short dep165[] = {
- 76, 77, 96, 100, 101, 254, 255, 267, 269, 270,
+static const unsigned short dep173[] = {
+ 77, 78, 97, 101, 102, 269, 270, 282, 284, 285,
};
-static const short dep166[] = {
- 40, 41, 47, 62, 77, 79, 85, 96, 98, 101, 134, 153, 174, 178, 254, 255, 267,
- 269, 270, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
+static const unsigned short dep174[] = {
+ 40, 41, 47, 62, 78, 80, 86, 97, 99, 102, 137, 138, 158, 160, 161, 162, 175,
+ 185, 190, 191, 192, 269, 270, 282, 284, 285, 2138, 2139, 2140, 2166, 2167,
+ 2170, 2173, 4135, 20616,
};
-static const short dep167[] = {
- 40, 41, 47, 62, 77, 79, 96, 98, 101, 103, 105, 134, 153, 174, 178, 254, 255,
- 267, 269, 270, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
+static const unsigned short dep175[] = {
+ 40, 41, 47, 62, 78, 80, 97, 99, 102, 104, 106, 137, 138, 158, 160, 161, 162,
+ 175, 185, 190, 191, 192, 269, 270, 282, 284, 285, 2138, 2139, 2140, 2166,
+ 2167, 2170, 2173, 4135, 20616,
};
-static const short dep168[] = {
- 96, 267, 12466, 12467, 12617,
+static const unsigned short dep176[] = {
+ 97, 282, 12480, 12481, 12633,
};
-static const short dep169[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135,
- 12617, 20613,
+static const unsigned short dep177[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 4135, 12633, 20616,
};
-static const short dep170[] = {
- 96, 267, 6218, 6219, 6396,
+static const unsigned short dep178[] = {
+ 97, 282, 6219, 6220, 6411,
};
-static const short dep171[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135,
- 6396, 20613,
+static const unsigned short dep179[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 4135, 6411, 20616,
};
-static const short dep172[] = {
- 96, 267, 6236, 6409,
+static const unsigned short dep180[] = {
+ 97, 282, 6237, 6424,
};
-static const short dep173[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135,
- 6409, 20613,
+static const unsigned short dep181[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 4135, 6424, 20616,
};
-static const short dep174[] = {
- 96, 267, 6254, 6255, 6256, 6257, 6420, 6422, 8469,
+static const unsigned short dep182[] = {
+ 97, 282, 6255, 6256, 6257, 6258, 6435, 6437, 8484,
};
-static const short dep175[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135,
- 6257, 6421, 6422, 8303, 8468, 20613,
+static const unsigned short dep183[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 4135, 6258, 6436, 6437, 8304, 8483, 20616,
};
-static const short dep176[] = {
- 96, 267, 6258, 6259, 6423,
+static const unsigned short dep184[] = {
+ 97, 282, 6259, 6260, 6438,
};
-static const short dep177[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135,
- 6423, 20613,
+static const unsigned short dep185[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 4135, 6438, 20616,
};
-static const short dep178[] = {
- 96, 267, 6260, 6424,
+static const unsigned short dep186[] = {
+ 97, 282, 6261, 6439,
};
-static const short dep179[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135,
- 6424, 20613,
+static const unsigned short dep187[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 4135, 6439, 20616,
};
-static const short dep180[] = {
- 96, 267, 10349, 10515,
+static const unsigned short dep188[] = {
+ 97, 282, 10350, 10530,
};
-static const short dep181[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135,
- 10515, 20613,
+static const unsigned short dep189[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 4135, 10530, 20616,
};
-static const short dep182[] = {
- 76, 77, 81, 82, 96, 100, 101, 254, 255, 257, 258, 267, 269, 270,
+static const unsigned short dep190[] = {
+ 77, 78, 82, 83, 97, 101, 102, 269, 270, 272, 273, 282, 284, 285,
};
-static const short dep183[] = {
- 40, 41, 47, 62, 77, 79, 82, 85, 96, 98, 101, 134, 153, 174, 178, 254, 255,
- 257, 259, 267, 269, 270, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
-
+static const unsigned short dep191[] = {
+ 40, 41, 47, 62, 78, 80, 83, 86, 97, 99, 102, 137, 138, 158, 160, 161, 162,
+ 175, 185, 190, 191, 192, 269, 270, 272, 274, 282, 284, 285, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 4135, 20616,
};
-static const short dep184[] = {
- 76, 77, 96, 100, 101, 103, 104, 254, 255, 267, 269, 270, 271, 272,
+static const unsigned short dep192[] = {
+ 77, 78, 97, 101, 102, 104, 105, 269, 270, 282, 284, 285, 286, 287,
};
-static const short dep185[] = {
- 40, 41, 47, 62, 77, 79, 96, 98, 101, 103, 105, 134, 153, 174, 178, 254, 255,
- 267, 269, 270, 271, 272, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
-
+static const unsigned short dep193[] = {
+ 40, 41, 47, 62, 78, 80, 97, 99, 102, 104, 106, 137, 138, 158, 160, 161, 162,
+ 175, 185, 190, 191, 192, 269, 270, 282, 284, 285, 286, 287, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 4135, 20616,
};
-static const short dep186[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312,
- 4135, 12467, 20613,
+static const unsigned short dep194[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 2327, 4135, 12481, 20616,
};
-static const short dep187[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312,
- 4135, 6218, 20613,
+static const unsigned short dep195[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 2327, 4135, 6219, 20616,
};
-static const short dep188[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312,
- 4135, 6236, 20613,
+static const unsigned short dep196[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 2327, 4135, 6237, 20616,
};
-static const short dep189[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312,
- 4135, 6256, 8302, 20613,
+static const unsigned short dep197[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 2327, 4135, 6257, 8303, 20616,
};
-static const short dep190[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312,
- 4135, 6258, 20613,
+static const unsigned short dep198[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 2327, 4135, 6259, 20616,
};
-static const short dep191[] = {
- 40, 41, 96, 134, 173, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172,
- 2312, 4135, 6259, 6260, 20613,
+static const unsigned short dep199[] = {
+ 40, 41, 97, 137, 138, 158, 162, 175, 183, 184, 185, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 2327, 4135, 6260, 6261, 20616,
};
-static const short dep192[] = {
- 40, 41, 96, 134, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312,
- 4135, 10349, 20613,
+static const unsigned short dep200[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173,
+ 2327, 4135, 10350, 20616,
};
-static const short dep193[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312, 4135,
- 6186, 20613,
+static const unsigned short dep201[] = {
+ 40, 41, 97, 158, 162, 175, 185, 190, 191, 282, 2138, 2139, 2140, 2166, 2167,
+ 2170, 2173, 2327, 4135, 6186, 20616,
};
-static const short dep194[] = {
- 76, 78, 79, 96, 97, 98, 99, 253, 254, 267, 268, 269,
+static const unsigned short dep202[] = {
+ 77, 79, 80, 97, 98, 99, 100, 268, 269, 282, 283, 284,
};
-static const short dep195[] = {
- 40, 41, 77, 78, 82, 84, 96, 99, 101, 103, 106, 134, 174, 178, 253, 255, 267,
- 268, 270, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
+static const unsigned short dep203[] = {
+ 40, 41, 78, 79, 83, 85, 97, 100, 102, 104, 107, 137, 138, 158, 162, 175, 185,
+ 190, 191, 192, 268, 270, 282, 283, 285, 2138, 2139, 2140, 2166, 2167, 2170,
+ 2173, 4135, 20616,
};
-static const short dep196[] = {
- 76, 78, 79, 80, 96, 97, 98, 99, 102, 253, 254, 256, 267, 268, 269,
+static const unsigned short dep204[] = {
+ 77, 79, 80, 81, 97, 98, 99, 100, 103, 268, 269, 271, 282, 283, 284,
};
-static const short dep197[] = {
- 40, 41, 77, 78, 80, 82, 84, 96, 99, 101, 102, 103, 106, 134, 174, 178, 253,
- 255, 256, 267, 268, 270, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
-
+static const unsigned short dep205[] = {
+ 40, 41, 78, 79, 81, 83, 85, 97, 100, 102, 103, 104, 107, 137, 138, 158, 162,
+ 175, 185, 190, 191, 192, 268, 270, 271, 282, 283, 285, 2138, 2139, 2140, 2166,
+ 2167, 2170, 2173, 4135, 20616,
};
-static const short dep198[] = {
- 76, 78, 79, 83, 84, 85, 96, 97, 98, 99, 253, 254, 259, 260, 267, 268, 269,
+static const unsigned short dep206[] = {
+ 77, 79, 80, 84, 85, 86, 97, 98, 99, 100, 268, 269, 274, 275, 282, 283, 284,
};
-static const short dep199[] = {
- 40, 41, 77, 78, 82, 84, 96, 99, 101, 134, 174, 178, 253, 255, 258, 260, 267,
- 268, 270, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
+static const unsigned short dep207[] = {
+ 40, 41, 78, 79, 83, 85, 97, 100, 102, 137, 138, 158, 162, 175, 185, 190, 191,
+ 192, 268, 270, 273, 275, 282, 283, 285, 2138, 2139, 2140, 2166, 2167, 2170,
+ 2173, 4135, 20616,
};
-static const short dep200[] = {
- 76, 78, 79, 96, 97, 98, 99, 105, 106, 107, 253, 254, 267, 268, 269, 272, 273,
-
+static const unsigned short dep208[] = {
+ 77, 79, 80, 97, 98, 99, 100, 106, 107, 108, 268, 269, 282, 283, 284, 287,
+ 288,
};
-static const short dep201[] = {
- 40, 41, 77, 78, 96, 99, 101, 103, 106, 134, 174, 178, 253, 255, 267, 268,
- 270, 271, 273, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 4135, 20613,
+static const unsigned short dep209[] = {
+ 40, 41, 78, 79, 97, 100, 102, 104, 107, 137, 138, 158, 162, 175, 185, 190,
+ 191, 192, 268, 270, 282, 283, 285, 286, 288, 2138, 2139, 2140, 2166, 2167,
+ 2170, 2173, 4135, 20616,
};
-static const short dep202[] = {
- 40, 41, 46, 70, 96, 174, 178, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172,
- 2312, 4135, 20613,
+static const unsigned short dep210[] = {
+ 40, 41, 46, 70, 97, 158, 162, 175, 185, 190, 191, 192, 282, 2138, 2139, 2140,
+ 2166, 2167, 2170, 2173, 2327, 4135, 20616,
};
-static const short dep203[] = {
- 40, 41, 96, 174, 178, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312,
- 4135, 20613,
+static const unsigned short dep211[] = {
+ 40, 41, 97, 158, 162, 175, 185, 190, 191, 192, 282, 2138, 2139, 2140, 2166,
+ 2167, 2170, 2173, 2327, 4135, 20616,
};
-static const short dep204[] = {
- 40, 41, 76, 81, 83, 96, 134, 174, 178, 267, 2137, 2138, 2139, 2165, 2166,
- 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep212[] = {
+ 40, 41, 70, 77, 82, 84, 97, 137, 138, 153, 155, 158, 162, 175, 185, 190, 191,
+ 192, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135, 20616,
};
-static const short dep205[] = {
- 40, 41, 96, 156, 174, 175, 267, 2134, 2135, 2136, 2137, 2138, 2139, 2165,
- 2166, 2169, 2172, 4135, 16524, 16526, 20613,
+static const unsigned short dep213[] = {
+ 40, 41, 97, 158, 162, 164, 175, 185, 186, 188, 282, 2135, 2136, 2137, 2138,
+ 2139, 2140, 2166, 2167, 2170, 2173, 4135, 16528, 16530, 16531, 16533, 20616,
+
};
-static const short dep206[] = {
- 40, 41, 76, 81, 83, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172,
- 4135, 20613,
+static const unsigned short dep214[] = {
+ 40, 41, 70, 77, 82, 84, 97, 153, 155, 158, 162, 175, 185, 192, 282, 2138,
+ 2139, 2140, 2166, 2167, 2170, 2173, 4135, 20616,
};
-static const short dep207[] = {
- 40, 41, 77, 78, 96, 99, 134, 174, 253, 255, 267, 268, 270, 2137, 2138, 2139,
- 2165, 2166, 2169, 2172, 4135, 20613,
+static const unsigned short dep215[] = {
+ 40, 41, 78, 79, 97, 100, 137, 138, 158, 162, 175, 185, 190, 191, 268, 270,
+ 282, 283, 285, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 4135, 20616,
};
-static const short dep208[] = {
- 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136, 138,
- 139, 146, 163, 174, 178, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2312,
- 4135, 20613,
+static const unsigned short dep216[] = {
+ 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135, 20616,
};
-static const short dep209[] = {
- 5, 96, 186, 267, 2139, 2312,
+static const unsigned short dep217[] = {
+ 5, 97, 200, 282, 2140, 2327,
};
-static const short dep210[] = {
- 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136, 138,
- 139, 146, 163, 174, 178, 186, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172,
- 2312, 4135, 20613,
+static const unsigned short dep218[] = {
+ 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 200, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135, 20616,
+
};
-static const short dep211[] = {
- 40, 41, 44, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136,
- 138, 139, 146, 148, 163, 174, 178, 267, 2137, 2138, 2139, 2165, 2166, 2169,
- 2172, 2312, 4135, 20613,
+static const unsigned short dep219[] = {
+ 40, 41, 44, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135,
+ 137, 138, 139, 140, 142, 143, 153, 155, 156, 158, 162, 171, 173, 175, 185,
+ 190, 191, 192, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135,
+ 20616,
};
-static const short dep212[] = {
- 0, 96, 181, 267, 2139, 2312,
+static const unsigned short dep220[] = {
+ 0, 97, 195, 282, 2140, 2327,
};
-static const short dep213[] = {
- 0, 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136,
- 138, 139, 146, 163, 174, 178, 181, 267, 2137, 2138, 2139, 2165, 2166, 2169,
- 2172, 2312, 4135, 20613,
+static const unsigned short dep221[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135,
+ 137, 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190,
+ 191, 192, 195, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135,
+ 20616,
};
-static const short dep214[] = {
- 0, 40, 41, 44, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135,
- 136, 138, 139, 146, 148, 163, 174, 178, 181, 267, 2137, 2138, 2139, 2165,
- 2166, 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep222[] = {
+ 0, 40, 41, 44, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133,
+ 135, 137, 138, 139, 140, 142, 143, 153, 155, 156, 158, 162, 171, 173, 175,
+ 185, 190, 191, 192, 195, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327,
+ 4135, 20616,
};
-static const short dep215[] = {
- 31, 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136,
- 138, 139, 146, 163, 174, 178, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172,
- 2312, 4135, 20613,
+static const unsigned short dep223[] = {
+ 31, 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135,
+ 137, 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190,
+ 191, 192, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135, 20616,
+
+};
+
+static const unsigned short dep224[] = {
+ 0, 97, 195, 282, 2327, 26715,
};
-static const short dep216[] = {
- 0, 96, 181, 267, 2312, 26714,
+static const unsigned short dep225[] = {
+ 0, 97, 109, 195, 282, 289,
+};
+
+static const unsigned short dep226[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 195, 282, 289, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 4135, 20616,
+
};
-static const short dep217[] = {
- 0, 96, 108, 181, 267, 274,
+static const unsigned short dep227[] = {
+ 0, 5, 40, 41, 70, 76, 77, 82, 84, 97, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 195, 282, 289, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 4135, 20616,
+
};
-static const short dep218[] = {
- 0, 40, 41, 75, 76, 81, 83, 96, 110, 127, 128, 130, 131, 134, 135, 136, 138,
- 139, 146, 163, 174, 178, 181, 267, 274, 2137, 2138, 2139, 2165, 2166, 2169,
- 2172, 4135, 20613,
+static const unsigned short dep228[] = {
+ 0, 31, 97, 109, 195, 234, 282, 289,
};
-static const short dep219[] = {
- 0, 5, 40, 41, 75, 76, 81, 83, 96, 110, 127, 128, 130, 131, 134, 135, 136,
- 138, 139, 146, 163, 174, 178, 181, 267, 274, 2137, 2138, 2139, 2165, 2166,
- 2169, 2172, 4135, 20613,
+static const unsigned short dep229[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 195, 234, 282, 289, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 4135, 20616,
+
};
-static const short dep220[] = {
- 0, 31, 96, 108, 181, 219, 267, 274,
+static const unsigned short dep230[] = {
+ 0, 97, 109, 195, 282, 289, 2140, 2327,
};
-static const short dep221[] = {
- 0, 40, 41, 75, 76, 81, 83, 96, 110, 127, 128, 130, 131, 134, 135, 136, 138,
- 139, 146, 163, 174, 178, 181, 219, 267, 274, 2137, 2138, 2139, 2165, 2166,
- 2169, 2172, 4135, 20613,
+static const unsigned short dep231[] = {
+ 0, 3, 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135,
+ 137, 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190,
+ 191, 192, 195, 282, 289, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135,
+ 20616,
};
-static const short dep222[] = {
- 0, 96, 108, 181, 267, 274, 2139, 2312,
+static const unsigned short dep232[] = {
+ 0, 3, 5, 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133,
+ 135, 137, 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185,
+ 190, 191, 192, 195, 282, 289, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327,
+ 4135, 20616,
};
-static const short dep223[] = {
- 0, 4, 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135,
- 136, 138, 139, 146, 163, 174, 178, 181, 267, 274, 2137, 2138, 2139, 2165,
- 2166, 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep233[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135,
+ 137, 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190,
+ 191, 192, 195, 282, 289, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135,
+ 20616,
};
-static const short dep224[] = {
- 0, 4, 5, 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135,
- 136, 138, 139, 146, 163, 174, 178, 181, 267, 274, 2137, 2138, 2139, 2165,
- 2166, 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep234[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2135, 2136, 2137, 2166, 2167, 2170, 2173,
+ 2327, 4135, 16528, 16530, 16531, 16533, 20616,
};
-static const short dep225[] = {
- 0, 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136,
- 138, 139, 146, 163, 174, 178, 181, 267, 274, 2137, 2138, 2139, 2165, 2166,
- 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep235[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 195, 282, 289, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135,
+ 20616,
};
-static const short dep226[] = {
- 40, 41, 96, 174, 267, 2134, 2135, 2136, 2165, 2166, 2169, 2172, 2312, 4135,
- 16524, 16526, 20613,
+static const unsigned short dep236[] = {
+ 0, 31, 97, 109, 195, 234, 282, 289, 2140, 2327,
};
-static const short dep227[] = {
- 0, 40, 41, 75, 76, 81, 83, 96, 110, 127, 128, 130, 131, 134, 135, 136, 138,
- 139, 146, 163, 174, 178, 181, 267, 274, 2137, 2138, 2139, 2165, 2166, 2169,
- 2172, 2312, 4135, 20613,
+static const unsigned short dep237[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 195, 234, 282, 289, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2327, 4135,
+ 20616,
};
-static const short dep228[] = {
- 0, 31, 96, 108, 181, 219, 267, 274, 2139, 2312,
+static const unsigned short dep238[] = {
+ 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2325, 4135, 16528, 16530,
+ 16531, 16533, 18761, 18763, 18764, 18766, 20616,
};
-static const short dep229[] = {
- 0, 40, 41, 75, 76, 81, 83, 96, 110, 127, 128, 130, 131, 134, 135, 136, 138,
- 139, 146, 163, 174, 178, 181, 219, 267, 274, 2137, 2138, 2139, 2165, 2166,
- 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep239[] = {
+ 40, 41, 44, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135,
+ 137, 138, 139, 140, 142, 143, 153, 155, 156, 158, 162, 171, 173, 175, 185,
+ 190, 191, 192, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2325, 4135,
+ 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766, 20616,
};
-static const short dep230[] = {
- 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136, 138,
- 139, 146, 163, 174, 178, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2310,
- 4135, 16524, 16526, 18746, 18748, 18749, 18751, 20613,
+static const unsigned short dep240[] = {
+ 0, 97, 195, 282, 2136, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
};
-static const short dep231[] = {
- 40, 41, 44, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136,
- 138, 139, 146, 148, 163, 174, 178, 267, 2137, 2138, 2139, 2165, 2166, 2169,
- 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 20613,
+static const unsigned short dep241[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135,
+ 137, 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190,
+ 191, 192, 195, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2325, 4135,
+ 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766, 20616,
};
-static const short dep232[] = {
- 0, 96, 181, 267, 2135, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
+static const unsigned short dep242[] = {
+ 0, 40, 41, 44, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133,
+ 135, 137, 138, 139, 140, 142, 143, 153, 155, 156, 158, 162, 171, 173, 175,
+ 185, 190, 191, 192, 195, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2325,
+ 4135, 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766, 20616,
};
-static const short dep233[] = {
- 0, 40, 41, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135, 136,
- 138, 139, 146, 163, 174, 178, 181, 267, 2137, 2138, 2139, 2165, 2166, 2169,
- 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 20613,
+static const unsigned short dep243[] = {
+ 0, 97, 195, 282, 2137, 2325, 18601, 18602, 18761, 18762, 18764, 18765,
};
-static const short dep234[] = {
- 0, 40, 41, 44, 75, 76, 81, 83, 96, 108, 110, 127, 128, 130, 131, 134, 135,
- 136, 138, 139, 146, 148, 163, 174, 178, 181, 267, 2137, 2138, 2139, 2165,
- 2166, 2169, 2172, 2310, 4135, 16524, 16526, 18746, 18748, 18749, 18751, 20613,
+static const unsigned short dep244[] = {
+ 97, 282, 2136, 2140, 2325, 2327, 18601, 18602, 18761, 18762, 18764, 18765,
};
-static const short dep235[] = {
- 0, 96, 181, 267, 2136, 2310, 18593, 18594, 18746, 18747, 18749, 18750,
+static const unsigned short dep245[] = {
+ 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2325, 2327, 4135, 16528,
+ 16530, 16531, 16533, 18761, 18763, 18764, 18766, 20616,
+};
+
+static const unsigned short dep246[] = {
+ 40, 41, 44, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135,
+ 137, 138, 139, 140, 142, 143, 153, 155, 156, 158, 162, 171, 173, 175, 185,
+ 190, 191, 192, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2325, 2327,
+ 4135, 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766, 20616,
};
-static const short dep236[] = {
- 0, 40, 41, 75, 76, 81, 83, 96, 110, 127, 128, 130, 131, 134, 135, 136, 138,
- 139, 146, 163, 174, 178, 181, 267, 274, 2134, 2135, 2136, 2137, 2138, 2139,
- 2165, 2166, 2169, 2172, 4135, 16524, 16526, 20613,
+static const unsigned short dep247[] = {
+ 0, 97, 195, 282, 2136, 2140, 2325, 2327, 18601, 18602, 18761, 18762, 18764,
+ 18765,
};
-static const short dep237[] = {
- 40, 41, 75, 96, 134, 148, 174, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep248[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133, 135,
+ 137, 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190,
+ 191, 192, 195, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2325, 2327,
+ 4135, 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766, 20616,
};
-static const short dep238[] = {
- 40, 41, 75, 96, 134, 135, 139, 148, 174, 267, 2165, 2166, 2169, 2172, 4135,
+static const unsigned short dep249[] = {
+ 0, 40, 41, 44, 70, 76, 77, 82, 84, 97, 109, 111, 128, 129, 131, 132, 133,
+ 135, 137, 138, 139, 140, 142, 143, 153, 155, 156, 158, 162, 171, 173, 175,
+ 185, 190, 191, 192, 195, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173, 2325,
+ 2327, 4135, 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766, 20616,
};
-static const short dep239[] = {
- 40, 41, 75, 96, 134, 148, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172,
- 2312, 4135, 20613,
+static const unsigned short dep250[] = {
+ 0, 97, 195, 282, 2137, 2140, 2325, 2327, 18601, 18602, 18761, 18762, 18764,
+ 18765,
+};
+
+static const unsigned short dep251[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 195, 282, 289, 2135, 2136, 2137, 2138, 2139, 2140, 2166, 2167, 2170,
+ 2173, 4135, 16528, 16530, 16531, 16533, 20616,
};
-static const short dep240[] = {
- 40, 41, 75, 96, 134, 135, 139, 148, 174, 267, 2137, 2138, 2139, 2165, 2166,
- 2169, 2172, 2312, 4135, 20613,
+static const unsigned short dep252[] = {
+ 40, 41, 70, 76, 77, 82, 84, 97, 137, 138, 139, 140, 142, 143, 153, 155, 156,
+ 158, 162, 171, 173, 175, 185, 192, 282, 2166, 2167, 2170, 2173, 4135,
};
-static const short dep241[] = {
- 40, 41, 96, 174, 267, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2310, 4135,
- 16524, 16526, 18746, 18748, 18749, 18751, 20613,
+static const unsigned short dep253[] = {
+ 40, 41, 70, 76, 77, 82, 84, 97, 137, 138, 139, 140, 142, 143, 153, 155, 156,
+ 158, 162, 171, 173, 175, 185, 192, 282, 2138, 2139, 2140, 2166, 2167, 2170,
+ 2173, 2327, 4135, 20616,
};
-static const short dep242[] = {
+static const unsigned short dep254[] = {
+ 40, 41, 97, 158, 162, 175, 185, 282, 2138, 2139, 2140, 2166, 2167, 2170, 2173,
+ 2325, 4135, 16528, 16530, 16531, 16533, 18761, 18763, 18764, 18766, 20616,
+
+};
+
+static const unsigned short dep255[] = {
+ 0, 40, 41, 70, 76, 77, 82, 84, 97, 111, 128, 129, 131, 132, 133, 135, 137,
+ 138, 139, 140, 142, 143, 153, 155, 158, 162, 171, 173, 175, 185, 190, 191,
+ 192, 195, 282, 289, 2135, 2136, 2137, 2138, 2139, 2140, 2166, 2167, 2170,
+ 2173, 2327, 4135, 16528, 16530, 16531, 16533, 20616,
+};
+
+static const unsigned short dep256[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 24, 26, 27, 28, 29, 30, 31, 96, 182, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 192, 193, 194, 195, 197, 198, 200, 201, 203, 204, 206, 207, 208,
- 209, 210, 211, 213, 216, 217, 218, 219, 267, 2071, 2081, 2139, 2260, 2269,
- 2312, 28852, 29002,
+ 22, 24, 26, 27, 28, 29, 30, 31, 97, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 211, 212, 214, 215, 217, 218, 220, 221, 222,
+ 223, 224, 225, 227, 230, 231, 232, 233, 234, 282, 2071, 2081, 2140, 2274,
+ 2284, 2327, 28866, 29018,
};
-static const short dep243[] = {
+static const unsigned short dep257[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 24, 25, 26, 28, 29, 30, 31, 40, 41, 96, 134, 171, 174, 182, 183, 184,
- 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 197, 198, 200, 201,
- 203, 204, 206, 207, 208, 209, 210, 211, 213, 215, 217, 218, 219, 267, 2071,
- 2081, 2137, 2138, 2139, 2165, 2166, 2169, 2172, 2260, 2269, 2312, 4135, 20613,
- 28852, 29002,
+ 22, 24, 25, 26, 28, 29, 30, 31, 40, 41, 97, 137, 138, 158, 162, 175, 180,
+ 181, 185, 190, 191, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 211, 212, 214, 215, 217, 218, 220, 221, 222, 223, 224, 225,
+ 227, 229, 231, 232, 233, 234, 282, 2071, 2081, 2138, 2139, 2140, 2166, 2167,
+ 2170, 2173, 2274, 2284, 2327, 4135, 20616, 28866, 29018,
};
#define NELS(X) (sizeof(X)/sizeof(X[0]))
@@ -1607,16 +1758,16 @@ op_dependencies[] = {
{ NELS(dep23), dep23, NELS(dep22), dep22, },
{ NELS(dep25), dep25, NELS(dep24), dep24, },
{ NELS(dep27), dep27, NELS(dep26), dep26, },
- { NELS(dep28), dep28, NELS(dep12), dep12, },
- { NELS(dep30), dep30, NELS(dep29), dep29, },
+ { NELS(dep29), dep29, NELS(dep28), dep28, },
+ { NELS(dep30), dep30, NELS(dep12), dep12, },
{ NELS(dep32), dep32, NELS(dep31), dep31, },
- { NELS(dep33), dep33, NELS(dep12), dep12, },
- { NELS(dep35), dep35, NELS(dep34), dep34, },
+ { NELS(dep34), dep34, NELS(dep33), dep33, },
+ { NELS(dep35), dep35, NELS(dep12), dep12, },
{ NELS(dep37), dep37, NELS(dep36), dep36, },
{ NELS(dep39), dep39, NELS(dep38), dep38, },
- { NELS(dep40), dep40, NELS(dep29), dep29, },
- { NELS(dep41), dep41, NELS(dep31), dep31, },
- { NELS(dep43), dep43, NELS(dep42), dep42, },
+ { NELS(dep41), dep41, NELS(dep40), dep40, },
+ { NELS(dep42), dep42, NELS(dep31), dep31, },
+ { NELS(dep43), dep43, NELS(dep33), dep33, },
{ NELS(dep45), dep45, NELS(dep44), dep44, },
{ NELS(dep47), dep47, NELS(dep46), dep46, },
{ NELS(dep49), dep49, NELS(dep48), dep48, },
@@ -1628,20 +1779,20 @@ op_dependencies[] = {
{ NELS(dep61), dep61, NELS(dep60), dep60, },
{ NELS(dep63), dep63, NELS(dep62), dep62, },
{ NELS(dep65), dep65, NELS(dep64), dep64, },
- { NELS(dep66), dep66, NELS(dep31), dep31, },
- { NELS(dep68), dep68, NELS(dep67), dep67, },
+ { NELS(dep67), dep67, NELS(dep66), dep66, },
+ { NELS(dep68), dep68, NELS(dep33), dep33, },
{ NELS(dep70), dep70, NELS(dep69), dep69, },
{ NELS(dep72), dep72, NELS(dep71), dep71, },
{ NELS(dep74), dep74, NELS(dep73), dep73, },
- { NELS(dep75), dep75, NELS(dep31), dep31, },
- { NELS(dep77), dep77, NELS(dep76), dep76, },
+ { NELS(dep76), dep76, NELS(dep75), dep75, },
+ { NELS(dep77), dep77, NELS(dep33), dep33, },
{ NELS(dep79), dep79, NELS(dep78), dep78, },
{ NELS(dep81), dep81, NELS(dep80), dep80, },
- { NELS(dep82), dep82, NELS(dep31), dep31, },
- { NELS(dep83), dep83, NELS(dep31), dep31, },
- { NELS(dep84), dep84, NELS(dep31), dep31, },
- { NELS(dep85), dep85, NELS(dep31), dep31, },
- { NELS(dep87), dep87, NELS(dep86), dep86, },
+ { NELS(dep83), dep83, NELS(dep82), dep82, },
+ { NELS(dep84), dep84, NELS(dep33), dep33, },
+ { NELS(dep85), dep85, NELS(dep33), dep33, },
+ { NELS(dep86), dep86, NELS(dep33), dep33, },
+ { NELS(dep87), dep87, NELS(dep33), dep33, },
{ NELS(dep89), dep89, NELS(dep88), dep88, },
{ NELS(dep91), dep91, NELS(dep90), dep90, },
{ NELS(dep93), dep93, NELS(dep92), dep92, },
@@ -1658,94 +1809,105 @@ op_dependencies[] = {
{ NELS(dep115), dep115, NELS(dep114), dep114, },
{ NELS(dep117), dep117, NELS(dep116), dep116, },
{ NELS(dep119), dep119, NELS(dep118), dep118, },
- { NELS(dep120), dep120, NELS(dep62), dep62, },
- { NELS(dep121), dep121, NELS(dep31), dep31, },
- { NELS(dep123), dep123, NELS(dep122), dep122, },
- { NELS(dep124), dep124, NELS(dep0), dep0, },
- { NELS(dep126), dep126, NELS(dep125), dep125, },
+ { NELS(dep121), dep121, NELS(dep120), dep120, },
+ { NELS(dep122), dep122, NELS(dep64), dep64, },
+ { NELS(dep123), dep123, NELS(dep33), dep33, },
+ { NELS(dep125), dep125, NELS(dep124), dep124, },
+ { NELS(dep126), dep126, NELS(dep0), dep0, },
{ NELS(dep128), dep128, NELS(dep127), dep127, },
- { NELS(dep129), dep129, NELS(dep0), dep0, },
- { NELS(dep130), dep130, NELS(dep0), dep0, },
- { NELS(dep132), dep132, NELS(dep131), dep131, },
- { NELS(dep133), dep133, NELS(dep0), dep0, },
- { NELS(dep134), dep134, NELS(dep31), dep31, },
- { NELS(dep136), dep136, NELS(dep135), dep135, },
- { NELS(dep137), dep137, NELS(dep135), dep135, },
- { NELS(dep139), dep139, NELS(dep138), dep138, },
- { NELS(dep140), dep140, NELS(dep138), dep138, },
- { NELS(dep141), dep141, NELS(dep135), dep135, },
+ { NELS(dep130), dep130, NELS(dep129), dep129, },
+ { NELS(dep131), dep131, NELS(dep0), dep0, },
+ { NELS(dep132), dep132, NELS(dep0), dep0, },
+ { NELS(dep134), dep134, NELS(dep133), dep133, },
+ { NELS(dep135), dep135, NELS(dep0), dep0, },
+ { NELS(dep136), dep136, NELS(dep2), dep2, },
+ { NELS(dep137), dep137, NELS(dep4), dep4, },
+ { NELS(dep138), dep138, NELS(dep6), dep6, },
+ { NELS(dep139), dep139, NELS(dep8), dep8, },
+ { NELS(dep140), dep140, NELS(dep10), dep10, },
+ { NELS(dep141), dep141, NELS(dep33), dep33, },
{ NELS(dep143), dep143, NELS(dep142), dep142, },
- { NELS(dep145), dep145, NELS(dep144), dep144, },
- { NELS(dep147), dep147, NELS(dep146), dep146, },
- { NELS(dep149), dep149, NELS(dep148), dep148, },
- { NELS(dep150), dep150, NELS(dep0), dep0, },
+ { NELS(dep144), dep144, NELS(dep142), dep142, },
+ { NELS(dep146), dep146, NELS(dep145), dep145, },
+ { NELS(dep147), dep147, NELS(dep145), dep145, },
+ { NELS(dep148), dep148, NELS(dep142), dep142, },
+ { NELS(dep150), dep150, NELS(dep149), dep149, },
{ NELS(dep152), dep152, NELS(dep151), dep151, },
{ NELS(dep154), dep154, NELS(dep153), dep153, },
{ NELS(dep156), dep156, NELS(dep155), dep155, },
- { NELS(dep158), dep158, NELS(dep157), dep157, },
+ { NELS(dep157), dep157, NELS(dep155), dep155, },
+ { NELS(dep158), dep158, NELS(dep0), dep0, },
{ NELS(dep160), dep160, NELS(dep159), dep159, },
- { NELS(dep161), dep161, NELS(dep0), dep0, },
- { NELS(dep162), dep162, NELS(dep0), dep0, },
- { NELS(dep163), dep163, NELS(dep0), dep0, },
- { NELS(dep164), dep164, NELS(dep31), dep31, },
+ { NELS(dep162), dep162, NELS(dep161), dep161, },
+ { NELS(dep164), dep164, NELS(dep163), dep163, },
{ NELS(dep166), dep166, NELS(dep165), dep165, },
- { NELS(dep167), dep167, NELS(dep165), dep165, },
- { NELS(dep169), dep169, NELS(dep168), dep168, },
- { NELS(dep171), dep171, NELS(dep170), dep170, },
- { NELS(dep173), dep173, NELS(dep172), dep172, },
- { NELS(dep175), dep175, NELS(dep174), dep174, },
+ { NELS(dep168), dep168, NELS(dep167), dep167, },
+ { NELS(dep169), dep169, NELS(dep0), dep0, },
+ { NELS(dep170), dep170, NELS(dep0), dep0, },
+ { NELS(dep171), dep171, NELS(dep0), dep0, },
+ { NELS(dep172), dep172, NELS(dep33), dep33, },
+ { NELS(dep174), dep174, NELS(dep173), dep173, },
+ { NELS(dep175), dep175, NELS(dep173), dep173, },
{ NELS(dep177), dep177, NELS(dep176), dep176, },
{ NELS(dep179), dep179, NELS(dep178), dep178, },
{ NELS(dep181), dep181, NELS(dep180), dep180, },
{ NELS(dep183), dep183, NELS(dep182), dep182, },
{ NELS(dep185), dep185, NELS(dep184), dep184, },
- { NELS(dep186), dep186, NELS(dep0), dep0, },
- { NELS(dep187), dep187, NELS(dep0), dep0, },
- { NELS(dep188), dep188, NELS(dep0), dep0, },
- { NELS(dep189), dep189, NELS(dep0), dep0, },
- { NELS(dep190), dep190, NELS(dep0), dep0, },
- { NELS(dep191), dep191, NELS(dep0), dep0, },
- { NELS(dep192), dep192, NELS(dep0), dep0, },
- { NELS(dep193), dep193, NELS(dep0), dep0, },
- { NELS(dep195), dep195, NELS(dep194), dep194, },
- { NELS(dep197), dep197, NELS(dep196), dep196, },
- { NELS(dep199), dep199, NELS(dep198), dep198, },
- { NELS(dep201), dep201, NELS(dep200), dep200, },
- { NELS(dep202), dep202, NELS(dep0), dep0, },
- { NELS(dep203), dep203, NELS(dep0), dep0, },
- { NELS(dep204), dep204, NELS(dep0), dep0, },
- { NELS(dep205), dep205, NELS(dep31), dep31, },
- { NELS(dep206), dep206, NELS(dep31), dep31, },
- { NELS(dep207), dep207, NELS(dep194), dep194, },
- { NELS(dep208), dep208, NELS(dep0), dep0, },
- { NELS(dep210), dep210, NELS(dep209), dep209, },
+ { NELS(dep187), dep187, NELS(dep186), dep186, },
+ { NELS(dep189), dep189, NELS(dep188), dep188, },
+ { NELS(dep191), dep191, NELS(dep190), dep190, },
+ { NELS(dep193), dep193, NELS(dep192), dep192, },
+ { NELS(dep194), dep194, NELS(dep0), dep0, },
+ { NELS(dep195), dep195, NELS(dep0), dep0, },
+ { NELS(dep196), dep196, NELS(dep0), dep0, },
+ { NELS(dep197), dep197, NELS(dep0), dep0, },
+ { NELS(dep198), dep198, NELS(dep0), dep0, },
+ { NELS(dep199), dep199, NELS(dep0), dep0, },
+ { NELS(dep200), dep200, NELS(dep0), dep0, },
+ { NELS(dep201), dep201, NELS(dep0), dep0, },
+ { NELS(dep203), dep203, NELS(dep202), dep202, },
+ { NELS(dep205), dep205, NELS(dep204), dep204, },
+ { NELS(dep207), dep207, NELS(dep206), dep206, },
+ { NELS(dep209), dep209, NELS(dep208), dep208, },
+ { NELS(dep210), dep210, NELS(dep0), dep0, },
{ NELS(dep211), dep211, NELS(dep0), dep0, },
- { NELS(dep213), dep213, NELS(dep212), dep212, },
- { NELS(dep214), dep214, NELS(dep212), dep212, },
- { NELS(dep215), dep215, NELS(dep0), dep0, },
- { NELS(dep213), dep213, NELS(dep216), dep216, },
+ { NELS(dep212), dep212, NELS(dep0), dep0, },
+ { NELS(dep213), dep213, NELS(dep33), dep33, },
+ { NELS(dep214), dep214, NELS(dep33), dep33, },
+ { NELS(dep215), dep215, NELS(dep202), dep202, },
+ { NELS(dep216), dep216, NELS(dep0), dep0, },
{ NELS(dep218), dep218, NELS(dep217), dep217, },
- { NELS(dep219), dep219, NELS(dep217), dep217, },
+ { NELS(dep219), dep219, NELS(dep0), dep0, },
{ NELS(dep221), dep221, NELS(dep220), dep220, },
- { NELS(dep223), dep223, NELS(dep222), dep222, },
- { NELS(dep224), dep224, NELS(dep222), dep222, },
- { NELS(dep225), dep225, NELS(dep222), dep222, },
- { NELS(dep226), dep226, NELS(dep0), dep0, },
- { NELS(dep227), dep227, NELS(dep222), dep222, },
+ { NELS(dep222), dep222, NELS(dep220), dep220, },
+ { NELS(dep223), dep223, NELS(dep0), dep0, },
+ { NELS(dep221), dep221, NELS(dep224), dep224, },
+ { NELS(dep226), dep226, NELS(dep225), dep225, },
+ { NELS(dep227), dep227, NELS(dep225), dep225, },
{ NELS(dep229), dep229, NELS(dep228), dep228, },
- { NELS(dep230), dep230, NELS(dep62), dep62, },
- { NELS(dep231), dep231, NELS(dep62), dep62, },
- { NELS(dep233), dep233, NELS(dep232), dep232, },
- { NELS(dep234), dep234, NELS(dep232), dep232, },
- { NELS(dep233), dep233, NELS(dep235), dep235, },
- { NELS(dep236), dep236, NELS(dep217), dep217, },
- { NELS(dep237), dep237, NELS(dep31), dep31, },
- { NELS(dep238), dep238, NELS(dep31), dep31, },
- { NELS(dep239), dep239, NELS(dep0), dep0, },
- { NELS(dep240), dep240, NELS(dep0), dep0, },
- { NELS(dep241), dep241, NELS(dep62), dep62, },
+ { NELS(dep231), dep231, NELS(dep230), dep230, },
+ { NELS(dep232), dep232, NELS(dep230), dep230, },
+ { NELS(dep233), dep233, NELS(dep230), dep230, },
+ { NELS(dep234), dep234, NELS(dep0), dep0, },
+ { NELS(dep235), dep235, NELS(dep230), dep230, },
+ { NELS(dep237), dep237, NELS(dep236), dep236, },
+ { NELS(dep238), dep238, NELS(dep64), dep64, },
+ { NELS(dep239), dep239, NELS(dep64), dep64, },
+ { NELS(dep241), dep241, NELS(dep240), dep240, },
+ { NELS(dep242), dep242, NELS(dep240), dep240, },
+ { NELS(dep241), dep241, NELS(dep243), dep243, },
+ { NELS(dep245), dep245, NELS(dep244), dep244, },
+ { NELS(dep246), dep246, NELS(dep244), dep244, },
+ { NELS(dep248), dep248, NELS(dep247), dep247, },
+ { NELS(dep249), dep249, NELS(dep247), dep247, },
+ { NELS(dep248), dep248, NELS(dep250), dep250, },
+ { NELS(dep251), dep251, NELS(dep225), dep225, },
+ { NELS(dep252), dep252, NELS(dep33), dep33, },
+ { NELS(dep253), dep253, NELS(dep0), dep0, },
+ { NELS(dep254), dep254, NELS(dep64), dep64, },
+ { NELS(dep255), dep255, NELS(dep230), dep230, },
{ 0, NULL, 0, NULL, },
- { NELS(dep243), dep243, NELS(dep242), dep242, },
+ { NELS(dep257), dep257, NELS(dep256), dep256, },
};
static const struct ia64_completer_table
@@ -1758,154 +1920,156 @@ completer_table[] = {
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 88 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 95 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 95 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 455, -1, 0, 1, 6 },
- { 0x0, 0x0, 0, 518, -1, 0, 1, 17 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 151 },
- { 0x0, 0x0, 0, 617, -1, 0, 1, 17 },
- { 0x0, 0x0, 0, 1836, -1, 0, 1, 10 },
+ { 0x0, 0x0, 0, 594, -1, 0, 1, 6 },
+ { 0x0, 0x0, 0, 657, -1, 0, 1, 18 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 162 },
+ { 0x0, 0x0, 0, 756, -1, 0, 1, 18 },
+ { 0x0, 0x0, 0, 2198, -1, 0, 1, 10 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 9 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 13 },
{ 0x1, 0x1, 0, -1, -1, 13, 1, 0 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, 2014, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, 958, -1, 0, 1, 122 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 44 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 78 },
- { 0x0, 0x0, 0, 1878, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2057, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 1882, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, 1884, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2066, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2069, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2091, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 2094, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 24 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 24 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 24 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 24 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 35 },
- { 0x0, 0x0, 0, 2102, -1, 0, 1, 29 },
- { 0x0, 0x0, 0, 1181, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 151 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 77 },
- { 0x0, 0x0, 0, 1216, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1225, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1234, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1236, -1, 0, 1, 125 },
- { 0x0, 0x0, 0, 1245, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1254, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1263, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1272, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1281, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1290, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1300, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1310, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1320, -1, 0, 1, 124 },
- { 0x0, 0x0, 0, 1329, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1335, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1341, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1347, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1353, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1359, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1365, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1371, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1377, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1383, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1389, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1395, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1401, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1407, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1413, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1419, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1425, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1431, -1, 0, 1, 140 },
- { 0x0, 0x0, 0, 1435, -1, 0, 1, 146 },
- { 0x0, 0x0, 0, 1439, -1, 0, 1, 148 },
- { 0x0, 0x0, 0, 1443, -1, 0, 1, 148 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 79 },
- { 0x0, 0x0, 0, 253, -1, 0, 1, 40 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, 2406, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, 1140, -1, 0, 1, 129 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 45 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 84 },
+ { 0x0, 0x0, 0, 2246, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, 2473, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, 2250, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, 2252, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, 2482, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, 2485, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, 2507, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, 2510, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 25 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 25 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 25 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 25 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 36 },
+ { 0x0, 0x0, 0, 2518, -1, 0, 1, 30 },
+ { 0x0, 0x0, 0, 1409, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 162 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 83 },
+ { 0x0, 0x0, 0, 1457, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1466, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1475, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1477, -1, 0, 1, 132 },
+ { 0x0, 0x0, 0, 1479, -1, 0, 1, 132 },
+ { 0x0, 0x0, 0, 1488, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1497, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1506, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1515, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1524, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1533, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1543, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1553, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1563, -1, 0, 1, 131 },
+ { 0x0, 0x0, 0, 1572, -1, 0, 1, 147 },
+ { 0x0, 0x0, 0, 1578, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1584, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1590, -1, 0, 1, 147 },
+ { 0x0, 0x0, 0, 1596, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1602, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1608, -1, 0, 1, 147 },
+ { 0x0, 0x0, 0, 1614, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1620, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1626, -1, 0, 1, 147 },
+ { 0x0, 0x0, 0, 1632, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1638, -1, 0, 1, 147 },
+ { 0x0, 0x0, 0, 1644, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1650, -1, 0, 1, 147 },
+ { 0x0, 0x0, 0, 1656, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1662, -1, 0, 1, 147 },
+ { 0x0, 0x0, 0, 1668, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1674, -1, 0, 1, 152 },
+ { 0x0, 0x0, 0, 1678, -1, 0, 1, 158 },
+ { 0x0, 0x0, 0, 1682, -1, 0, 1, 159 },
+ { 0x0, 0x0, 0, 1686, -1, 0, 1, 159 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 85 },
+ { 0x0, 0x0, 0, 258, -1, 0, 1, 41 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 67 },
- { 0x1, 0x1, 0, 984, -1, 20, 1, 67 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 34 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 68 },
+ { 0x1, 0x1, 0, 1166, -1, 20, 1, 68 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 69 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 70 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 70 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 71 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 72 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 86 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 87 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 89 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 90 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 91 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 92 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 73 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 93 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 94 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 96 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 97 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 98 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 99 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 100 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 101 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 102 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 103 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 104 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 105 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 106 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 107 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 108 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 109 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 110 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 111 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 112 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 113 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 152 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 152 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 152 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 71 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 114 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 115 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 116 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 117 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 118 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 119 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 120 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 163 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 163 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 163 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 72 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 151 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 162 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2394, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2395, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2858, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2859, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 1848, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 1849, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2210, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2211, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2409, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2873, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
@@ -1913,299 +2077,436 @@ completer_table[] = {
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2410, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2411, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2412, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2413, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2874, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2875, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2876, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2877, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2396, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, 2397, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2860, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2861, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 11 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 84 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 83 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 91 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 89 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x1, 0x1, 0, -1, -1, 13, 1, 0 },
- { 0x0, 0x0, 0, 2415, -1, 0, 1, 0 },
+ { 0x0, 0x0, 0, 2879, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 84 },
- { 0x0, 0x0, 0, 1711, -1, 0, 1, 131 },
- { 0x0, 0x0, 0, 1713, -1, 0, 1, 138 },
- { 0x0, 0x0, 0, 1715, -1, 0, 1, 132 },
- { 0x0, 0x0, 0, 1717, -1, 0, 1, 131 },
- { 0x0, 0x0, 0, 1719, -1, 0, 1, 138 },
- { 0x0, 0x0, 0, 1721, -1, 0, 1, 131 },
- { 0x0, 0x0, 0, 1723, -1, 0, 1, 138 },
- { 0x0, 0x0, 0, 1726, -1, 0, 1, 131 },
- { 0x0, 0x0, 0, 1729, -1, 0, 1, 138 },
- { 0x0, 0x0, 0, 1732, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1733, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1734, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1735, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1736, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1737, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1738, -1, 0, 1, 145 },
- { 0x0, 0x0, 0, 1739, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 90 },
+ { 0x0, 0x0, 0, 1966, -1, 0, 1, 138 },
+ { 0x0, 0x0, 0, 1968, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1970, -1, 0, 1, 139 },
+ { 0x0, 0x0, 0, 1972, -1, 0, 1, 139 },
+ { 0x0, 0x0, 0, 1974, -1, 0, 1, 138 },
+ { 0x0, 0x0, 0, 1976, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1978, -1, 0, 1, 138 },
+ { 0x0, 0x0, 0, 1980, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1983, -1, 0, 1, 138 },
+ { 0x0, 0x0, 0, 1986, -1, 0, 1, 145 },
+ { 0x0, 0x0, 0, 1989, -1, 0, 1, 157 },
+ { 0x0, 0x0, 0, 1990, -1, 0, 1, 161 },
+ { 0x0, 0x0, 0, 1991, -1, 0, 1, 157 },
+ { 0x0, 0x0, 0, 1992, -1, 0, 1, 161 },
+ { 0x0, 0x0, 0, 1993, -1, 0, 1, 157 },
+ { 0x0, 0x0, 0, 1994, -1, 0, 1, 161 },
+ { 0x0, 0x0, 0, 1995, -1, 0, 1, 157 },
+ { 0x0, 0x0, 0, 1996, -1, 0, 1, 161 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 82 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 88 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 120 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 118 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 120 },
- { 0x0, 0x0, 0, -1, -1, 0, 1, 119 },
- { 0x0, 0x0, 0, 1444, -1, 0, 1, 136 },
- { 0x0, 0x0, 0, 1445, -1, 0, 1, 136 },
- { 0x0, 0x0, 0, 1446, -1, 0, 1, 136 },
- { 0x0, 0x0, 0, 1447, -1, 0, 1, 136 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 127 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 125 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 127 },
+ { 0x0, 0x0, 0, -1, -1, 0, 1, 126 },
+ { 0x0, 0x0, 0, 1687, -1, 0, 1, 143 },
+ { 0x0, 0x0, 0, 1688, -1, 0, 1, 143 },
+ { 0x0, 0x0, 0, 1689, -1, 0, 1, 143 },
+ { 0x0, 0x0, 0, 1690, -1, 0, 1, 143 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
{ 0x0, 0x0, 0, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 1, 220, -1, 0, 1, 12 },
+ { 0x0, 0x0, 1, 224, -1, 0, 1, 12 },
+ { 0x0, 0x0, 1, 225, -1, 0, 1, 14 },
{ 0x1, 0x1, 2, -1, -1, 27, 1, 12 },
- { 0x0, 0x0, 3, -1, 1123, 0, 0, -1 },
- { 0x0, 0x0, 3, -1, 1124, 0, 0, -1 },
- { 0x1, 0x1, 3, 2285, 1209, 33, 1, 127 },
- { 0x1, 0x1, 3, 2286, 1218, 33, 1, 127 },
- { 0x1, 0x1, 3, 2287, 1227, 33, 1, 127 },
- { 0x1, 0x1, 3, 2288, 1238, 33, 1, 127 },
- { 0x1, 0x1, 3, 2289, 1247, 33, 1, 127 },
- { 0x1, 0x1, 3, 2290, 1256, 33, 1, 127 },
- { 0x1, 0x1, 3, 2291, 1265, 33, 1, 127 },
- { 0x1, 0x1, 3, 2292, 1274, 33, 1, 127 },
- { 0x1, 0x1, 3, 2293, 1283, 33, 1, 127 },
- { 0x1, 0x1, 3, 2294, 1292, 33, 1, 127 },
- { 0x1, 0x1, 3, 2295, 1302, 33, 1, 127 },
- { 0x1, 0x1, 3, 2296, 1312, 33, 1, 127 },
- { 0x1, 0x1, 3, 2297, 1325, 33, 1, 142 },
- { 0x1, 0x1, 3, 2298, 1331, 33, 1, 142 },
- { 0x1, 0x1, 3, 2299, 1337, 33, 1, 142 },
- { 0x1, 0x1, 3, 2300, 1343, 33, 1, 142 },
- { 0x1, 0x1, 3, 2301, 1349, 33, 1, 142 },
- { 0x1, 0x1, 3, 2302, 1355, 33, 1, 142 },
- { 0x1, 0x1, 3, 2303, 1361, 33, 1, 142 },
- { 0x1, 0x1, 3, 2304, 1367, 33, 1, 142 },
- { 0x1, 0x1, 3, 2305, 1373, 33, 1, 142 },
- { 0x1, 0x1, 3, 2306, 1379, 33, 1, 142 },
- { 0x1, 0x1, 3, 2307, 1385, 33, 1, 142 },
- { 0x1, 0x1, 3, 2308, 1391, 33, 1, 142 },
- { 0x1, 0x1, 3, 2309, 1397, 33, 1, 142 },
- { 0x1, 0x1, 3, 2310, 1403, 33, 1, 142 },
- { 0x1, 0x1, 3, 2311, 1409, 33, 1, 142 },
- { 0x1, 0x1, 3, 2312, 1415, 33, 1, 142 },
- { 0x1, 0x1, 3, 2313, 1421, 33, 1, 142 },
- { 0x1, 0x1, 3, 2314, 1427, 33, 1, 142 },
- { 0x1, 0x1, 3, -1, -1, 27, 1, 40 },
- { 0x0, 0x0, 4, 1850, 1194, 0, 1, 135 },
- { 0x0, 0x0, 4, 1851, 1196, 0, 1, 134 },
- { 0x0, 0x0, 4, 1852, 1198, 0, 1, 134 },
- { 0x0, 0x0, 4, 1853, 1200, 0, 1, 134 },
- { 0x0, 0x0, 4, 1854, 1202, 0, 1, 134 },
- { 0x0, 0x0, 4, 1855, 1204, 0, 1, 136 },
- { 0x0, 0x0, 4, 1856, 1206, 0, 1, 136 },
- { 0x1, 0x1, 4, -1, 1213, 33, 1, 130 },
- { 0x5, 0x5, 4, 413, 1212, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1222, 33, 1, 130 },
- { 0x5, 0x5, 4, 414, 1221, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1231, 33, 1, 130 },
- { 0x5, 0x5, 4, 415, 1230, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1235, 32, 1, 125 },
- { 0x1, 0x1, 4, -1, 1242, 33, 1, 130 },
- { 0x5, 0x5, 4, 416, 1241, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1251, 33, 1, 130 },
- { 0x5, 0x5, 4, 417, 1250, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1260, 33, 1, 130 },
- { 0x5, 0x5, 4, 418, 1259, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1269, 33, 1, 130 },
- { 0x5, 0x5, 4, 419, 1268, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1278, 33, 1, 130 },
- { 0x5, 0x5, 4, 420, 1277, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1287, 33, 1, 130 },
- { 0x5, 0x5, 4, 421, 1286, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1297, 33, 1, 130 },
- { 0x5, 0x5, 4, 888, 1295, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1307, 33, 1, 130 },
- { 0x5, 0x5, 4, 889, 1305, 32, 1, 124 },
- { 0x1, 0x1, 4, -1, 1317, 33, 1, 130 },
- { 0x5, 0x5, 4, 890, 1315, 32, 1, 124 },
- { 0x1, 0x21, 10, 1748, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1749, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, 1750, -1, 0, 1, 3 },
- { 0x1, 0x1, 10, 1751, -1, 12, 1, 3 },
- { 0x1, 0x1, 10, 1752, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1753, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, 351, -1, 0, 1, 3 },
- { 0x1, 0x1, 10, 1779, -1, 12, 1, 3 },
- { 0x1, 0x1, 10, 355, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1781, -1, 12, 1, 3 },
- { 0x1, 0x21, 10, 1758, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1759, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, -1, 1788, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1789, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1790, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1791, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1792, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1793, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1794, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1795, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1796, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1797, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1798, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1799, 0, 0, -1 },
- { 0x1, 0x21, 10, 1760, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1761, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, 1762, -1, 0, 1, 3 },
- { 0x1, 0x1, 10, 1763, -1, 12, 1, 3 },
- { 0x1, 0x1, 10, 1764, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1765, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, 375, -1, 0, 1, 3 },
- { 0x1, 0x1, 10, 1803, -1, 12, 1, 3 },
- { 0x1, 0x1, 10, 379, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1805, -1, 12, 1, 3 },
- { 0x1, 0x21, 10, 1770, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 10, 1771, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, -1, 1812, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1813, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1814, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1815, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1816, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1817, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1818, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1819, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1820, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1821, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1822, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1823, 0, 0, -1 },
- { 0x1, 0x1, 10, 1772, -1, 36, 1, 3 },
- { 0x1000001, 0x1000001, 10, 1773, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, -1, 1824, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1826, 0, 0, -1 },
- { 0x1, 0x1, 10, 1774, -1, 36, 1, 3 },
- { 0x1000001, 0x1000001, 10, 1775, -1, 12, 1, 3 },
- { 0x0, 0x0, 10, -1, 1828, 0, 0, -1 },
- { 0x0, 0x0, 10, -1, 1830, 0, 0, -1 },
+ { 0x1, 0x1, 2, -1, -1, 27, 1, 14 },
+ { 0x0, 0x0, 3, -1, 1340, 0, 0, -1 },
+ { 0x0, 0x0, 3, -1, 1341, 0, 0, -1 },
+ { 0x1, 0x1, 3, 2749, 1450, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2750, 1459, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2751, 1468, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2752, 1481, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2753, 1490, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2754, 1499, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2755, 1508, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2756, 1517, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2757, 1526, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2758, 1535, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2759, 1545, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2760, 1555, 33, 1, 134 },
+ { 0x1, 0x1, 3, 2761, 1568, 33, 1, 149 },
+ { 0x1, 0x1, 3, 2762, 1574, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2763, 1580, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2764, 1586, 33, 1, 149 },
+ { 0x1, 0x1, 3, 2765, 1592, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2766, 1598, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2767, 1604, 33, 1, 149 },
+ { 0x1, 0x1, 3, 2768, 1610, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2769, 1616, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2770, 1622, 33, 1, 149 },
+ { 0x1, 0x1, 3, 2771, 1628, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2772, 1634, 33, 1, 149 },
+ { 0x1, 0x1, 3, 2773, 1640, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2774, 1646, 33, 1, 149 },
+ { 0x1, 0x1, 3, 2775, 1652, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2776, 1658, 33, 1, 149 },
+ { 0x1, 0x1, 3, 2777, 1664, 33, 1, 154 },
+ { 0x1, 0x1, 3, 2778, 1670, 33, 1, 154 },
+ { 0x1, 0x1, 3, -1, -1, 27, 1, 41 },
+ { 0x0, 0x0, 4, 2212, 1425, 0, 1, 142 },
+ { 0x0, 0x0, 4, 2213, 1427, 0, 1, 142 },
+ { 0x0, 0x0, 4, 2214, 1429, 0, 1, 141 },
+ { 0x0, 0x0, 4, 2215, 1431, 0, 1, 141 },
+ { 0x0, 0x0, 4, 2216, 1433, 0, 1, 141 },
+ { 0x0, 0x0, 4, 2217, 1435, 0, 1, 141 },
+ { 0x0, 0x0, 4, 2218, 1437, 0, 1, 141 },
+ { 0x0, 0x0, 4, 2219, 1439, 0, 1, 141 },
+ { 0x0, 0x0, 4, 2220, 1441, 0, 1, 141 },
+ { 0x0, 0x0, 4, 2221, 1443, 0, 1, 141 },
+ { 0x0, 0x0, 4, 2222, 1445, 0, 1, 143 },
+ { 0x0, 0x0, 4, 2223, 1447, 0, 1, 143 },
+ { 0x1, 0x1, 4, -1, 1454, 33, 1, 137 },
+ { 0x5, 0x5, 4, 552, 1453, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1463, 33, 1, 137 },
+ { 0x5, 0x5, 4, 553, 1462, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1472, 33, 1, 137 },
+ { 0x5, 0x5, 4, 554, 1471, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1476, 32, 1, 132 },
+ { 0x1, 0x1, 4, -1, 1478, 32, 1, 132 },
+ { 0x1, 0x1, 4, -1, 1485, 33, 1, 137 },
+ { 0x5, 0x5, 4, 555, 1484, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1494, 33, 1, 137 },
+ { 0x5, 0x5, 4, 556, 1493, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1503, 33, 1, 137 },
+ { 0x5, 0x5, 4, 557, 1502, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1512, 33, 1, 137 },
+ { 0x5, 0x5, 4, 558, 1511, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1521, 33, 1, 137 },
+ { 0x5, 0x5, 4, 559, 1520, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1530, 33, 1, 137 },
+ { 0x5, 0x5, 4, 560, 1529, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1540, 33, 1, 137 },
+ { 0x5, 0x5, 4, 1036, 1538, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1550, 33, 1, 137 },
+ { 0x5, 0x5, 4, 1037, 1548, 32, 1, 131 },
+ { 0x1, 0x1, 4, -1, 1560, 33, 1, 137 },
+ { 0x5, 0x5, 4, 1038, 1558, 32, 1, 131 },
+ { 0x1, 0x21, 10, 2013, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2014, -1, 12, 1, 3 },
+ { 0x1, 0x21, 10, 420, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2074, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, -1, 2075, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2076, 0, 0, -1 },
+ { 0x0, 0x0, 10, 2017, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 2018, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 2019, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2020, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 430, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 2080, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 434, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2082, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 438, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 2084, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 442, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2086, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 446, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 2088, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 450, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2090, -1, 12, 1, 3 },
+ { 0x1, 0x21, 10, 2033, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2034, -1, 12, 1, 3 },
+ { 0x1, 0x21, 10, 460, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2096, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, -1, 2097, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2098, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2101, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2102, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2103, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2104, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2105, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2106, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2107, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2108, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2109, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2110, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2111, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2112, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2113, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2114, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2115, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2116, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2117, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2118, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2119, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2120, 0, 0, -1 },
+ { 0x1, 0x21, 10, 2037, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2038, -1, 12, 1, 3 },
+ { 0x1, 0x21, 10, 468, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2122, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, -1, 2123, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2124, 0, 0, -1 },
+ { 0x0, 0x0, 10, 2041, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 2042, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 2043, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2044, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 478, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 2128, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 482, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2130, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 486, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 2132, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 490, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2134, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, 494, -1, 0, 1, 3 },
+ { 0x1, 0x1, 10, 2136, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 498, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2138, -1, 12, 1, 3 },
+ { 0x1, 0x21, 10, 2057, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2058, -1, 12, 1, 3 },
+ { 0x1, 0x21, 10, 508, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 10, 2144, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, -1, 2145, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2146, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2149, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2150, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2151, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2152, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2153, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2154, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2155, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2156, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2157, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2158, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2159, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2160, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2161, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2162, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2163, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2164, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2165, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2166, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2167, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2168, 0, 0, -1 },
+ { 0x1, 0x1, 10, 2061, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 10, 2062, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 2063, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 10, 2064, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, -1, 2169, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2171, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2173, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2175, 0, 0, -1 },
+ { 0x1, 0x1, 10, 2065, -1, 36, 1, 78 },
+ { 0x1000001, 0x1000001, 10, 2066, -1, 12, 1, 78 },
+ { 0x1, 0x1, 10, 2067, -1, 36, 1, 78 },
+ { 0x1000001, 0x1000001, 10, 2068, -1, 12, 1, 78 },
+ { 0x0, 0x0, 10, -1, 2177, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2179, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2181, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2183, 0, 0, -1 },
+ { 0x1, 0x1, 10, 2069, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 10, 2070, -1, 12, 1, 3 },
+ { 0x1, 0x1, 10, 2071, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 10, 2072, -1, 12, 1, 3 },
+ { 0x0, 0x0, 10, -1, 2185, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2187, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2189, 0, 0, -1 },
+ { 0x0, 0x0, 10, -1, 2191, 0, 0, -1 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x200001, 0x4200001, 11, 2015, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 300, -1, 33, 1, 3 },
+ { 0x0, 0x0, 11, 2077, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 2078, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 2021, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 1776, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1777, -1, 12, 1, 3 },
+ { 0x0, 0x0, 11, 308, -1, 0, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x200001, 0x200001, 11, 2023, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 310, -1, 33, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 2025, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x0, 0x0, 11, 312, -1, 0, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x1, 0x1, 11, 1754, -1, 12, 1, 3 },
+ { 0x200001, 0x200001, 11, 2027, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 293, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 314, -1, 33, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x200001, 0x200001, 11, 1756, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 2029, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x1, 0x1, 11, 295, -1, 33, 1, 3 },
- { 0x0, 0x0, 11, 1782, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1783, -1, 12, 1, 3 },
- { 0x1, 0x1, 11, 1784, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 11, 1785, -1, 12, 1, 3 },
+ { 0x0, 0x0, 11, 316, -1, 0, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x200001, 0x200001, 11, 2031, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 1786, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1787, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 318, -1, 33, 1, 3 },
+ { 0x0, 0x0, 11, 2091, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 2092, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 2093, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 11, 2094, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 1800, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1801, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x200001, 0x4200001, 11, 2035, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 322, -1, 33, 1, 3 },
+ { 0x0, 0x0, 11, 2099, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 2100, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x1, 0x1, 11, 1766, -1, 12, 1, 3 },
+ { 0x200001, 0x4200001, 11, 2039, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 317, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 348, -1, 33, 1, 3 },
+ { 0x0, 0x0, 11, 2125, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 2126, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x200001, 0x200001, 11, 1768, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x1, 0x1, 11, 319, -1, 33, 1, 3 },
- { 0x0, 0x0, 11, 1806, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1807, -1, 12, 1, 3 },
- { 0x1, 0x1, 11, 1808, -1, 33, 1, 3 },
- { 0x200001, 0x200001, 11, 1809, -1, 12, 1, 3 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
{ 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
- { 0x0, 0x0, 11, 1810, -1, 0, 1, 3 },
- { 0x1, 0x1, 11, 1811, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 2045, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x0, 0x0, 11, 356, -1, 0, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x200001, 0x200001, 11, 2047, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 358, -1, 33, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 2049, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x0, 0x0, 11, 360, -1, 0, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x200001, 0x200001, 11, 2051, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 362, -1, 33, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 2053, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x0, 0x0, 11, 364, -1, 0, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x200001, 0x200001, 11, 2055, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 366, -1, 33, 1, 3 },
+ { 0x0, 0x0, 11, 2139, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 2140, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 2141, -1, 33, 1, 3 },
+ { 0x200001, 0x200001, 11, 2142, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x200001, 0x4200001, 11, 2059, -1, 12, 1, 3 },
+ { 0x2, 0x3, 11, -1, -1, 37, 1, 5 },
+ { 0x1, 0x1, 11, 370, -1, 33, 1, 3 },
+ { 0x0, 0x0, 11, 2147, -1, 0, 1, 3 },
+ { 0x1, 0x1, 11, 2148, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
+ { 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
{ 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
{ 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
- { 0x1, 0x1, 11, 1825, -1, 36, 1, 3 },
- { 0x1000001, 0x1000001, 11, 1827, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 2170, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 11, 2172, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 2174, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 11, 2176, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, -1, -1, 36, 1, 80 },
+ { 0x1, 0x1, 11, -1, -1, 36, 1, 80 },
+ { 0x1, 0x1, 11, -1, -1, 36, 1, 80 },
+ { 0x1, 0x1, 11, -1, -1, 36, 1, 80 },
+ { 0x1, 0x1, 11, 2178, -1, 36, 1, 78 },
+ { 0x1000001, 0x1000001, 11, 2180, -1, 12, 1, 78 },
+ { 0x1, 0x1, 11, 2182, -1, 36, 1, 78 },
+ { 0x1000001, 0x1000001, 11, 2184, -1, 12, 1, 78 },
{ 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
{ 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
- { 0x1, 0x1, 11, 1829, -1, 36, 1, 3 },
- { 0x1000001, 0x1000001, 11, 1831, -1, 12, 1, 3 },
- { 0x0, 0x0, 12, -1, -1, 0, 1, 14 },
- { 0x0, 0x0, 12, -1, -1, 0, 1, 14 },
- { 0x0, 0x0, 12, -1, -1, 0, 1, 14 },
- { 0x1, 0x1, 13, 262, 1211, 34, 1, 124 },
- { 0x1, 0x1, 13, 264, 1220, 34, 1, 124 },
- { 0x1, 0x1, 13, 266, 1229, 34, 1, 124 },
- { 0x1, 0x1, 13, 269, 1240, 34, 1, 124 },
- { 0x1, 0x1, 13, 271, 1249, 34, 1, 124 },
- { 0x1, 0x1, 13, 273, 1258, 34, 1, 124 },
- { 0x1, 0x1, 13, 275, 1267, 34, 1, 124 },
- { 0x1, 0x1, 13, 277, 1276, 34, 1, 124 },
- { 0x1, 0x1, 13, 279, 1285, 34, 1, 124 },
- { 0x1, 0x1, 13, 281, 1294, 34, 1, 124 },
- { 0x1, 0x1, 13, 283, 1304, 34, 1, 124 },
- { 0x1, 0x1, 13, 285, 1314, 34, 1, 124 },
- { 0x0, 0x0, 19, -1, 656, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 657, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 658, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 659, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 660, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 661, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 662, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 663, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 664, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 665, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 666, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 667, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 668, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 669, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 670, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 671, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 672, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 673, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 674, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 675, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 676, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 677, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 678, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 679, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 680, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 681, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 682, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 683, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 684, 0, 0, -1 },
- { 0x0, 0x0, 19, -1, 685, 0, 0, -1 },
- { 0x0, 0x0, 20, -1, 2363, 0, 0, -1 },
- { 0x0, 0x0, 20, -1, 2364, 0, 0, -1 },
- { 0x0, 0x0, 20, -1, 2379, 0, 0, -1 },
- { 0x0, 0x0, 20, -1, 2380, 0, 0, -1 },
- { 0x0, 0x0, 20, -1, 2385, 0, 0, -1 },
- { 0x0, 0x0, 20, -1, 2386, 0, 0, -1 },
- { 0x0, 0x0, 21, 692, 2375, 0, 0, -1 },
- { 0x0, 0x0, 21, 693, 2377, 0, 0, -1 },
- { 0x0, 0x0, 23, -1, 2373, 0, 0, -1 },
- { 0x0, 0x0, 23, -1, 2374, 0, 0, -1 },
+ { 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
+ { 0x1, 0x1, 11, -1, -1, 36, 1, 5 },
+ { 0x1, 0x1, 11, 2186, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 11, 2188, -1, 12, 1, 3 },
+ { 0x1, 0x1, 11, 2190, -1, 36, 1, 3 },
+ { 0x1000001, 0x1000001, 11, 2192, -1, 12, 1, 3 },
+ { 0x0, 0x0, 12, -1, -1, 0, 1, 15 },
+ { 0x0, 0x0, 12, -1, -1, 0, 1, 15 },
+ { 0x0, 0x0, 12, -1, -1, 0, 1, 15 },
+ { 0x1, 0x1, 13, 272, 1452, 34, 1, 131 },
+ { 0x1, 0x1, 13, 274, 1461, 34, 1, 131 },
+ { 0x1, 0x1, 13, 276, 1470, 34, 1, 131 },
+ { 0x1, 0x1, 13, 280, 1483, 34, 1, 131 },
+ { 0x1, 0x1, 13, 282, 1492, 34, 1, 131 },
+ { 0x1, 0x1, 13, 284, 1501, 34, 1, 131 },
+ { 0x1, 0x1, 13, 286, 1510, 34, 1, 131 },
+ { 0x1, 0x1, 13, 288, 1519, 34, 1, 131 },
+ { 0x1, 0x1, 13, 290, 1528, 34, 1, 131 },
+ { 0x1, 0x1, 13, 292, 1537, 34, 1, 131 },
+ { 0x1, 0x1, 13, 294, 1547, 34, 1, 131 },
+ { 0x1, 0x1, 13, 296, 1557, 34, 1, 131 },
+ { 0x0, 0x0, 19, -1, 795, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 796, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 797, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 798, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 799, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 800, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 801, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 802, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 803, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 804, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 805, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 806, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 807, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 808, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 809, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 810, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 811, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 812, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 813, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 814, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 815, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 816, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 817, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 818, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 819, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 820, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 821, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 822, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 823, 0, 0, -1 },
+ { 0x0, 0x0, 19, -1, 824, 0, 0, -1 },
+ { 0x0, 0x0, 20, -1, 2827, 0, 0, -1 },
+ { 0x0, 0x0, 20, -1, 2828, 0, 0, -1 },
+ { 0x0, 0x0, 20, -1, 2843, 0, 0, -1 },
+ { 0x0, 0x0, 20, -1, 2844, 0, 0, -1 },
+ { 0x0, 0x0, 20, -1, 2849, 0, 0, -1 },
+ { 0x0, 0x0, 20, -1, 2850, 0, 0, -1 },
+ { 0x0, 0x0, 21, 831, 2839, 0, 0, -1 },
+ { 0x0, 0x0, 21, 832, 2841, 0, 0, -1 },
+ { 0x0, 0x0, 23, -1, 2837, 0, 0, -1 },
+ { 0x0, 0x0, 23, -1, 2838, 0, 0, -1 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
- { 0x1, 0x1, 24, 1055, -1, 35, 1, 6 },
+ { 0x1, 0x1, 24, 1272, -1, 35, 1, 6 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 6 },
@@ -2254,45 +2555,21 @@ completer_table[] = {
{ 0x1, 0x1, 24, -1, -1, 35, 1, 8 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 8 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 8 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 15 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, 1076, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 16 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, 1293, -1, 35, 1, 18 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
@@ -2329,18 +2606,18 @@ completer_table[] = {
{ 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 19 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 20 },
@@ -2365,33 +2642,6 @@ completer_table[] = {
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, 1109, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
- { 0x1, 0x1, 24, -1, -1, 35, 1, 17 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
@@ -2404,1138 +2654,1363 @@ completer_table[] = {
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
{ 0x1, 0x1, 24, -1, -1, 35, 1, 21 },
- { 0x1, 0x1, 24, -1, -1, 33, 1, 76 },
- { 0x1, 0x1, 24, -1, -1, 33, 1, 76 },
- { 0x1, 0x1, 24, 1125, 1214, 35, 1, 130 },
- { 0x1, 0x1, 24, 1126, 1223, 35, 1, 130 },
- { 0x1, 0x1, 24, 1127, 1232, 35, 1, 130 },
- { 0x1, 0x1, 24, 1128, 1243, 35, 1, 130 },
- { 0x1, 0x1, 24, 1129, 1252, 35, 1, 130 },
- { 0x1, 0x1, 24, 1130, 1261, 35, 1, 130 },
- { 0x1, 0x1, 24, 1131, 1270, 35, 1, 130 },
- { 0x1, 0x1, 24, 1132, 1279, 35, 1, 130 },
- { 0x1, 0x1, 24, 1133, 1288, 35, 1, 130 },
- { 0x1, 0x1, 24, 1134, 1298, 35, 1, 130 },
- { 0x1, 0x1, 24, 1135, 1308, 35, 1, 130 },
- { 0x1, 0x1, 24, 1136, 1318, 35, 1, 130 },
- { 0x1, 0x1, 24, 1137, 1327, 35, 1, 144 },
- { 0x1, 0x1, 24, 1138, 1333, 35, 1, 144 },
- { 0x1, 0x1, 24, 1139, 1339, 35, 1, 144 },
- { 0x1, 0x1, 24, 1140, 1345, 35, 1, 144 },
- { 0x1, 0x1, 24, 1141, 1351, 35, 1, 144 },
- { 0x1, 0x1, 24, 1142, 1357, 35, 1, 144 },
- { 0x1, 0x1, 24, 1143, 1363, 35, 1, 144 },
- { 0x1, 0x1, 24, 1144, 1369, 35, 1, 144 },
- { 0x1, 0x1, 24, 1145, 1375, 35, 1, 144 },
- { 0x1, 0x1, 24, 1146, 1381, 35, 1, 144 },
- { 0x1, 0x1, 24, 1147, 1387, 35, 1, 144 },
- { 0x1, 0x1, 24, 1148, 1393, 35, 1, 144 },
- { 0x1, 0x1, 24, 1149, 1399, 35, 1, 144 },
- { 0x1, 0x1, 24, 1150, 1405, 35, 1, 144 },
- { 0x1, 0x1, 24, 1151, 1411, 35, 1, 144 },
- { 0x1, 0x1, 24, 1152, 1417, 35, 1, 144 },
- { 0x1, 0x1, 24, 1153, 1423, 35, 1, 144 },
- { 0x1, 0x1, 24, 1154, 1429, 35, 1, 144 },
- { 0x0, 0x0, 33, 2357, 2355, 0, 0, -1 },
- { 0x0, 0x0, 33, 2360, 2358, 0, 0, -1 },
- { 0x0, 0x0, 33, 2366, 2365, 0, 0, -1 },
- { 0x0, 0x0, 33, 2368, 2367, 0, 0, -1 },
- { 0x0, 0x0, 33, 2382, 2381, 0, 0, -1 },
- { 0x0, 0x0, 33, 2384, 2383, 0, 0, -1 },
- { 0x0, 0x0, 35, -1, 2376, 0, 0, -1 },
- { 0x0, 0x0, 35, -1, 2378, 0, 0, -1 },
- { 0x1, 0x1, 38, -1, 1922, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 1957, 37, 1, 29 },
- { 0x0, 0x0, 38, -1, 1960, 0, 0, -1 },
- { 0x1, 0x1, 38, -1, -1, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 1965, 37, 1, 29 },
- { 0x0, 0x0, 38, -1, 1968, 0, 0, -1 },
- { 0x1, 0x1, 38, -1, -1, 37, 1, 29 },
- { 0x0, 0x0, 38, -1, 1971, 0, 0, -1 },
- { 0x1, 0x1, 38, -1, -1, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 1974, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 1977, 37, 1, 29 },
- { 0x1, 0x1, 38, -1, 2010, 37, 1, 29 },
- { 0x3, 0x3, 38, -1, -1, 30, 1, 137 },
- { 0x0, 0x0, 38, 960, -1, 0, 1, 95 },
- { 0x0, 0x0, 38, -1, -1, 0, 1, 104 },
- { 0x0, 0x0, 38, 966, -1, 0, 1, 116 },
- { 0x3, 0x3, 38, -1, -1, 30, 1, 150 },
- { 0x0, 0x0, 38, 967, -1, 0, 1, 40 },
- { 0x0, 0x0, 40, -1, 825, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 833, 0, 0, -1 },
- { 0x0, 0x0, 40, 969, 829, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 483, 33, 1, 6 },
- { 0x18000001, 0x18000001, 40, -1, 491, 6, 1, 7 },
- { 0x3, 0x3, 40, 970, 487, 33, 1, 6 },
- { 0x0, 0x0, 40, -1, 837, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 503, 33, 1, 8 },
- { 0x0, 0x0, 40, -1, 841, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 515, 33, 1, 15 },
- { 0x0, 0x0, 40, -1, 846, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 850, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 538, 33, 1, 17 },
- { 0x3, 0x3, 40, -1, 542, 33, 1, 17 },
- { 0x0, 0x0, 40, -1, 854, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 858, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 562, 33, 1, 18 },
- { 0x18000001, 0x18000001, 40, -1, 566, 6, 1, 18 },
- { 0x0, 0x0, 40, -1, 862, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 578, 33, 1, 19 },
- { 0x0, 0x0, 40, -1, 866, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 870, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 598, 33, 1, 20 },
- { 0x18000001, 0x18000001, 40, -1, 602, 6, 1, 20 },
- { 0x0, 0x0, 40, -1, 874, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 614, 33, 1, 21 },
- { 0x0, 0x0, 40, -1, 879, 0, 0, -1 },
- { 0x0, 0x0, 40, -1, 883, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 637, 33, 1, 17 },
- { 0x3, 0x3, 40, -1, 641, 33, 1, 17 },
- { 0x0, 0x0, 40, -1, 887, 0, 0, -1 },
- { 0x3, 0x3, 40, -1, 653, 33, 1, 21 },
- { 0x0, 0x0, 41, 712, 824, 0, 0, -1 },
- { 0x0, 0x0, 41, 713, 832, 0, 0, -1 },
- { 0x0, 0x0, 41, 714, 828, 0, 0, -1 },
- { 0x1, 0x1, 41, 715, 482, 34, 1, 6 },
- { 0x10000001, 0x10000001, 41, 716, 490, 6, 1, 7 },
- { 0x1, 0x1, 41, 717, 486, 34, 1, 6 },
- { 0x0, 0x0, 41, 718, 836, 0, 0, -1 },
- { 0x1, 0x1, 41, 719, 502, 34, 1, 8 },
- { 0x0, 0x0, 41, 720, 840, 0, 0, -1 },
- { 0x1, 0x1, 41, 721, 514, 34, 1, 15 },
- { 0x0, 0x0, 41, 722, 845, 0, 0, -1 },
- { 0x0, 0x0, 41, 723, 849, 0, 0, -1 },
- { 0x1, 0x1, 41, 724, 537, 34, 1, 17 },
- { 0x1, 0x1, 41, 725, 541, 34, 1, 17 },
- { 0x0, 0x0, 41, 726, 853, 0, 0, -1 },
- { 0x0, 0x0, 41, 727, 857, 0, 0, -1 },
- { 0x1, 0x1, 41, 728, 561, 34, 1, 18 },
- { 0x10000001, 0x10000001, 41, 729, 565, 6, 1, 18 },
- { 0x0, 0x0, 41, 730, 861, 0, 0, -1 },
- { 0x1, 0x1, 41, 731, 577, 34, 1, 19 },
- { 0x0, 0x0, 41, 732, 865, 0, 0, -1 },
- { 0x0, 0x0, 41, 733, 869, 0, 0, -1 },
- { 0x1, 0x1, 41, 734, 597, 34, 1, 20 },
- { 0x10000001, 0x10000001, 41, 735, 601, 6, 1, 20 },
- { 0x0, 0x0, 41, 736, 873, 0, 0, -1 },
- { 0x1, 0x1, 41, 737, 613, 34, 1, 21 },
- { 0x0, 0x0, 41, 738, 878, 0, 0, -1 },
- { 0x0, 0x0, 41, 739, 882, 0, 0, -1 },
- { 0x1, 0x1, 41, 740, 636, 34, 1, 17 },
- { 0x1, 0x1, 41, 741, 640, 34, 1, 17 },
- { 0x0, 0x0, 41, 742, 886, 0, 0, -1 },
- { 0x1, 0x1, 41, 743, 652, 34, 1, 21 },
- { 0x800001, 0x800001, 41, -1, 974, 4, 1, 16 },
- { 0x1, 0x1, 41, 1868, 972, 4, 1, 16 },
- { 0x1, 0x1, 41, 809, 977, 4, 1, 22 },
- { 0x2, 0x3, 41, -1, 982, 20, 1, 67 },
- { 0x1, 0x1, 41, 1869, 980, 21, 1, 67 },
- { 0x0, 0x0, 42, -1, -1, 0, 1, 80 },
- { 0x0, 0x0, 42, -1, -1, 0, 1, 80 },
- { 0x0, 0x0, 42, -1, -1, 0, 1, 123 },
- { 0x1, 0x1, 44, 1155, 286, 38, 1, 1 },
- { 0x0, 0x0, 44, -1, 345, 0, 0, -1 },
- { 0x1, 0x1, 44, 1158, 296, 38, 1, 1 },
- { 0x0, 0x0, 44, -1, 365, 0, 0, -1 },
- { 0x0, 0x0, 44, -1, 299, 0, 0, -1 },
- { 0x0, 0x0, 44, -1, 309, 0, 0, -1 },
- { 0x1, 0x1, 44, 1163, 310, 38, 1, 1 },
- { 0x0, 0x0, 44, -1, 369, 0, 0, -1 },
- { 0x1, 0x1, 44, 1166, 320, 38, 1, 1 },
- { 0x0, 0x0, 44, -1, 389, 0, 0, -1 },
- { 0x0, 0x0, 44, -1, 323, 0, 0, -1 },
- { 0x0, 0x0, 44, -1, 333, 0, 0, -1 },
- { 0x0, 0x0, 44, 1037, 1929, 0, 0, -1 },
- { 0x0, 0x0, 44, 1038, 2462, 0, 1, 54 },
- { 0x0, 0x0, 44, 1039, 1981, 0, 0, -1 },
- { 0x0, 0x0, 44, 1040, -1, 0, 1, 49 },
- { 0x0, 0x0, 44, 942, -1, 0, 1, 0 },
- { 0x0, 0x0, 44, 943, -1, 0, 1, 0 },
- { 0x0, 0x0, 44, 944, -1, 0, 1, 0 },
- { 0x1, 0x1, 45, -1, 1433, 30, 1, 147 },
- { 0x1, 0x1, 45, 815, 1432, 30, 1, 146 },
- { 0x1, 0x1, 45, -1, 1437, 30, 1, 149 },
- { 0x1, 0x1, 45, 816, 1436, 30, 1, 148 },
- { 0x1, 0x1, 45, -1, 1441, 30, 1, 149 },
- { 0x1, 0x1, 45, 817, 1440, 30, 1, 148 },
- { 0x3, 0x3, 46, -1, 978, 3, 1, 22 },
- { 0x1, 0x1, 47, 1889, -1, 30, 1, 137 },
- { 0x1, 0x1, 47, 1920, -1, 30, 1, 150 },
- { 0x0, 0x0, 49, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 49, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 49, -1, -1, 0, 1, 40 },
- { 0x1, 0x1, 56, -1, 1434, 31, 1, 147 },
- { 0x1, 0x1, 56, -1, 1438, 31, 1, 149 },
- { 0x1, 0x1, 56, -1, 1442, 31, 1, 149 },
- { 0x0, 0x0, 56, -1, -1, 0, 1, 94 },
- { 0x2, 0x3, 56, -1, -1, 27, 1, 94 },
- { 0x1, 0x1, 56, -1, -1, 28, 1, 94 },
- { 0x0, 0x0, 65, 13, 453, 0, 1, 6 },
- { 0x0, 0x0, 65, 1056, 456, 0, 1, 6 },
- { 0x1, 0x1, 65, 1057, 458, 33, 1, 6 },
- { 0x1, 0x1, 65, 1058, 460, 34, 1, 6 },
- { 0x3, 0x3, 65, 1059, 462, 33, 1, 6 },
- { 0x0, 0x0, 65, 1060, 464, 0, 1, 6 },
- { 0x1, 0x1, 65, 1061, 466, 33, 1, 6 },
- { 0x1, 0x1, 65, 1062, 468, 34, 1, 6 },
- { 0x3, 0x3, 65, 1063, 470, 33, 1, 6 },
- { 0x1, 0x1, 65, 1064, 472, 6, 1, 7 },
- { 0x8000001, 0x8000001, 65, 1065, 474, 6, 1, 7 },
- { 0x10000001, 0x10000001, 65, 1066, 476, 6, 1, 7 },
- { 0x18000001, 0x18000001, 65, 1067, 478, 6, 1, 7 },
- { 0x0, 0x0, 65, 1068, 492, 0, 1, 8 },
- { 0x1, 0x1, 65, 1069, 494, 33, 1, 8 },
- { 0x1, 0x1, 65, 1070, 496, 34, 1, 8 },
- { 0x3, 0x3, 65, 1071, 498, 33, 1, 8 },
- { 0x0, 0x0, 65, 1072, 504, 0, 1, 15 },
- { 0x1, 0x1, 65, 1073, 506, 33, 1, 15 },
- { 0x1, 0x1, 65, 1074, 508, 34, 1, 15 },
- { 0x3, 0x3, 65, 1075, 510, 33, 1, 15 },
- { 0x0, 0x0, 65, 14, 516, 0, 1, 17 },
- { 0x0, 0x0, 65, 1077, 519, 0, 1, 17 },
- { 0x1, 0x1, 65, 1078, 521, 33, 1, 17 },
- { 0x1, 0x1, 65, 1079, 523, 34, 1, 17 },
- { 0x3, 0x3, 65, 1080, 525, 33, 1, 17 },
- { 0x0, 0x0, 65, 1081, 527, 0, 1, 17 },
- { 0x1, 0x1, 65, 1082, 529, 33, 1, 17 },
- { 0x1, 0x1, 65, 1083, 531, 34, 1, 17 },
- { 0x3, 0x3, 65, 1084, 533, 33, 1, 17 },
- { 0x0, 0x0, 65, 1085, 543, 0, 1, 18 },
- { 0x1, 0x1, 65, 1086, 545, 33, 1, 18 },
- { 0x1, 0x1, 65, 1087, 547, 34, 1, 18 },
- { 0x3, 0x3, 65, 1088, 549, 33, 1, 18 },
- { 0x1, 0x1, 65, 1089, 551, 6, 1, 18 },
- { 0x8000001, 0x8000001, 65, 1090, 553, 6, 1, 18 },
- { 0x10000001, 0x10000001, 65, 1091, 555, 6, 1, 18 },
- { 0x18000001, 0x18000001, 65, 1092, 557, 6, 1, 18 },
- { 0x0, 0x0, 65, 1093, 567, 0, 1, 19 },
- { 0x1, 0x1, 65, 1094, 569, 33, 1, 19 },
- { 0x1, 0x1, 65, 1095, 571, 34, 1, 19 },
- { 0x3, 0x3, 65, 1096, 573, 33, 1, 19 },
- { 0x0, 0x0, 65, 1097, 579, 0, 1, 20 },
- { 0x1, 0x1, 65, 1098, 581, 33, 1, 20 },
- { 0x1, 0x1, 65, 1099, 583, 34, 1, 20 },
- { 0x3, 0x3, 65, 1100, 585, 33, 1, 20 },
- { 0x1, 0x1, 65, 1101, 587, 6, 1, 20 },
- { 0x8000001, 0x8000001, 65, 1102, 589, 6, 1, 20 },
- { 0x10000001, 0x10000001, 65, 1103, 591, 6, 1, 20 },
- { 0x18000001, 0x18000001, 65, 1104, 593, 6, 1, 20 },
- { 0x0, 0x0, 65, 1105, 603, 0, 1, 21 },
- { 0x1, 0x1, 65, 1106, 605, 33, 1, 21 },
- { 0x1, 0x1, 65, 1107, 607, 34, 1, 21 },
- { 0x3, 0x3, 65, 1108, 609, 33, 1, 21 },
- { 0x0, 0x0, 65, 16, 615, 0, 1, 17 },
- { 0x0, 0x0, 65, 1110, 618, 0, 1, 17 },
- { 0x1, 0x1, 65, 1111, 620, 33, 1, 17 },
- { 0x1, 0x1, 65, 1112, 622, 34, 1, 17 },
- { 0x3, 0x3, 65, 1113, 624, 33, 1, 17 },
- { 0x0, 0x0, 65, 1114, 626, 0, 1, 17 },
- { 0x1, 0x1, 65, 1115, 628, 33, 1, 17 },
- { 0x1, 0x1, 65, 1116, 630, 34, 1, 17 },
- { 0x3, 0x3, 65, 1117, 632, 33, 1, 17 },
- { 0x0, 0x0, 65, 1118, 642, 0, 1, 21 },
- { 0x1, 0x1, 65, 1119, 644, 33, 1, 21 },
- { 0x1, 0x1, 65, 1120, 646, 34, 1, 21 },
- { 0x3, 0x3, 65, 1121, 648, 33, 1, 21 },
- { 0x3, 0x3, 66, 422, 1296, 33, 1, 129 },
- { 0x3, 0x3, 66, 423, 1306, 33, 1, 129 },
- { 0x3, 0x3, 66, 424, 1316, 33, 1, 129 },
- { 0x0, 0x0, 66, -1, 1321, 0, 1, 140 },
- { 0x0, 0x0, 66, -1, 1322, 0, 1, 140 },
- { 0x0, 0x0, 66, -1, 1323, 0, 1, 140 },
- { 0x0, 0x0, 107, 898, 1953, 0, 0, -1 },
- { 0x0, 0x0, 107, 899, 2400, 0, 1, 29 },
- { 0x0, 0x0, 107, 900, 1994, 0, 0, -1 },
- { 0x0, 0x0, 107, 901, 2404, 0, 1, 29 },
- { 0x0, 0x0, 109, -1, 1955, 0, 0, -1 },
- { 0x1, 0x1, 109, -1, 2401, 27, 1, 29 },
- { 0x0, 0x0, 109, -1, 1996, 0, 0, -1 },
- { 0x1, 0x1, 109, -1, 2405, 27, 1, 29 },
- { 0x0, 0x0, 110, 903, -1, 0, 1, 115 },
- { 0x1, 0x1, 111, -1, -1, 27, 1, 115 },
- { 0x0, 0x0, 112, 921, 2423, 0, 1, 1 },
- { 0x0, 0x0, 112, 1024, 290, 0, 0, -1 },
- { 0x0, 0x0, 112, 1001, 353, 0, 0, -1 },
- { 0x0, 0x0, 112, -1, 361, 0, 0, -1 },
- { 0x0, 0x0, 112, 922, 2431, 0, 1, 1 },
- { 0x0, 0x0, 112, -1, 303, 0, 0, -1 },
- { 0x0, 0x0, 112, 1029, 304, 0, 0, -1 },
- { 0x0, 0x0, 112, 923, 2443, 0, 1, 1 },
- { 0x0, 0x0, 112, 1031, 314, 0, 0, -1 },
- { 0x0, 0x0, 112, 1008, 377, 0, 0, -1 },
- { 0x0, 0x0, 112, -1, 385, 0, 0, -1 },
- { 0x0, 0x0, 112, 1167, 2450, 0, 1, 1 },
- { 0x0, 0x0, 112, -1, 327, 0, 0, -1 },
- { 0x0, 0x0, 112, 1036, 328, 0, 0, -1 },
- { 0x0, 0x0, 112, -1, 1939, 0, 0, -1 },
- { 0x1, 0x9, 112, -1, 2469, 33, 1, 54 },
- { 0x2, 0x3, 112, 1180, 1990, 27, 1, 49 },
- { 0x1, 0x1, 114, 1156, 2424, 37, 1, 1 },
- { 0x1, 0x1, 114, 1159, 2432, 37, 1, 1 },
- { 0x1, 0x1, 114, 1164, 2444, 37, 1, 1 },
- { 0x0, 0x0, 114, -1, 2455, 0, 1, 1 },
- { 0x0, 0x0, 115, 945, 2421, 0, 1, 1 },
- { 0x0, 0x0, 115, 1000, 288, 0, 0, -1 },
- { 0x0, 0x0, 115, -1, 357, 0, 0, -1 },
- { 0x0, 0x0, 115, 1026, 359, 0, 0, -1 },
- { 0x0, 0x0, 115, -1, 2430, 0, 1, 1 },
- { 0x0, 0x0, 115, 1028, 301, 0, 0, -1 },
- { 0x0, 0x0, 115, 1005, 306, 0, 0, -1 },
- { 0x0, 0x0, 115, 947, 2441, 0, 1, 1 },
- { 0x0, 0x0, 115, 1007, 312, 0, 0, -1 },
- { 0x0, 0x0, 115, -1, 381, 0, 0, -1 },
- { 0x0, 0x0, 115, 1033, 383, 0, 0, -1 },
- { 0x0, 0x0, 115, -1, 2449, 0, 1, 1 },
- { 0x0, 0x0, 115, 1035, 325, 0, 0, -1 },
- { 0x0, 0x0, 115, 1012, 330, 0, 0, -1 },
- { 0x0, 0x0, 115, 918, 1937, 0, 0, -1 },
- { 0x0, 0x0, 115, 919, 2468, 0, 1, 54 },
- { 0x0, 0x0, 115, 920, 1989, 0, 1, 49 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, 1326, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 18 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 35, 1, 22 },
+ { 0x1, 0x1, 24, -1, -1, 33, 1, 82 },
+ { 0x1, 0x1, 24, -1, -1, 33, 1, 82 },
+ { 0x1, 0x1, 24, 1342, 1455, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1343, 1464, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1344, 1473, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1345, 1486, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1346, 1495, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1347, 1504, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1348, 1513, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1349, 1522, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1350, 1531, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1351, 1541, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1352, 1551, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1353, 1561, 35, 1, 137 },
+ { 0x1, 0x1, 24, 1354, 1570, 35, 1, 151 },
+ { 0x1, 0x1, 24, 1355, 1576, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1356, 1582, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1357, 1588, 35, 1, 151 },
+ { 0x1, 0x1, 24, 1358, 1594, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1359, 1600, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1360, 1606, 35, 1, 151 },
+ { 0x1, 0x1, 24, 1361, 1612, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1362, 1618, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1363, 1624, 35, 1, 151 },
+ { 0x1, 0x1, 24, 1364, 1630, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1365, 1636, 35, 1, 151 },
+ { 0x1, 0x1, 24, 1366, 1642, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1367, 1648, 35, 1, 151 },
+ { 0x1, 0x1, 24, 1368, 1654, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1369, 1660, 35, 1, 151 },
+ { 0x1, 0x1, 24, 1370, 1666, 35, 1, 156 },
+ { 0x1, 0x1, 24, 1371, 1672, 35, 1, 156 },
+ { 0x0, 0x0, 33, 2821, 2819, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2824, 2822, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2830, 2829, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2832, 2831, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2846, 2845, 0, 0, -1 },
+ { 0x0, 0x0, 33, 2848, 2847, 0, 0, -1 },
+ { 0x0, 0x0, 35, -1, 2840, 0, 0, -1 },
+ { 0x0, 0x0, 35, -1, 2842, 0, 0, -1 },
+ { 0x1, 0x1, 38, -1, 2290, 37, 1, 30 },
+ { 0x1, 0x1, 38, -1, 2349, 37, 1, 30 },
+ { 0x0, 0x0, 38, -1, 2352, 0, 0, -1 },
+ { 0x1, 0x1, 38, -1, -1, 37, 1, 30 },
+ { 0x1, 0x1, 38, -1, 2357, 37, 1, 30 },
+ { 0x0, 0x0, 38, -1, 2360, 0, 0, -1 },
+ { 0x1, 0x1, 38, -1, -1, 37, 1, 30 },
+ { 0x0, 0x0, 38, -1, 2363, 0, 0, -1 },
+ { 0x1, 0x1, 38, -1, -1, 37, 1, 30 },
+ { 0x1, 0x1, 38, -1, 2366, 37, 1, 30 },
+ { 0x1, 0x1, 38, -1, 2369, 37, 1, 30 },
+ { 0x1, 0x1, 38, -1, 2402, 37, 1, 30 },
+ { 0x3, 0x3, 38, -1, -1, 30, 1, 144 },
+ { 0x0, 0x0, 38, 1142, -1, 0, 1, 102 },
+ { 0x0, 0x0, 38, -1, -1, 0, 1, 111 },
+ { 0x0, 0x0, 38, 1148, -1, 0, 1, 123 },
+ { 0x3, 0x3, 38, -1, -1, 30, 1, 160 },
+ { 0x0, 0x0, 38, 1149, -1, 0, 1, 41 },
+ { 0x0, 0x0, 40, -1, 973, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 981, 0, 0, -1 },
+ { 0x0, 0x0, 40, 1151, 977, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 622, 33, 1, 6 },
+ { 0x18000001, 0x18000001, 40, -1, 630, 6, 1, 7 },
+ { 0x3, 0x3, 40, 1152, 626, 33, 1, 6 },
+ { 0x0, 0x0, 40, -1, 985, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 642, 33, 1, 8 },
+ { 0x0, 0x0, 40, -1, 989, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 654, 33, 1, 16 },
+ { 0x0, 0x0, 40, -1, 994, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 998, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 677, 33, 1, 18 },
+ { 0x3, 0x3, 40, -1, 681, 33, 1, 18 },
+ { 0x0, 0x0, 40, -1, 1002, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 1006, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 701, 33, 1, 19 },
+ { 0x18000001, 0x18000001, 40, -1, 705, 6, 1, 19 },
+ { 0x0, 0x0, 40, -1, 1010, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 717, 33, 1, 20 },
+ { 0x0, 0x0, 40, -1, 1014, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 1018, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 737, 33, 1, 21 },
+ { 0x18000001, 0x18000001, 40, -1, 741, 6, 1, 21 },
+ { 0x0, 0x0, 40, -1, 1022, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 753, 33, 1, 22 },
+ { 0x0, 0x0, 40, -1, 1027, 0, 0, -1 },
+ { 0x0, 0x0, 40, -1, 1031, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 776, 33, 1, 18 },
+ { 0x3, 0x3, 40, -1, 780, 33, 1, 18 },
+ { 0x0, 0x0, 40, -1, 1035, 0, 0, -1 },
+ { 0x3, 0x3, 40, -1, 792, 33, 1, 22 },
+ { 0x0, 0x0, 41, 851, 972, 0, 0, -1 },
+ { 0x0, 0x0, 41, 852, 980, 0, 0, -1 },
+ { 0x0, 0x0, 41, 853, 976, 0, 0, -1 },
+ { 0x1, 0x1, 41, 854, 621, 34, 1, 6 },
+ { 0x10000001, 0x10000001, 41, 855, 629, 6, 1, 7 },
+ { 0x1, 0x1, 41, 856, 625, 34, 1, 6 },
+ { 0x0, 0x0, 41, 857, 984, 0, 0, -1 },
+ { 0x1, 0x1, 41, 858, 641, 34, 1, 8 },
+ { 0x0, 0x0, 41, 859, 988, 0, 0, -1 },
+ { 0x1, 0x1, 41, 860, 653, 34, 1, 16 },
+ { 0x0, 0x0, 41, 861, 993, 0, 0, -1 },
+ { 0x0, 0x0, 41, 862, 997, 0, 0, -1 },
+ { 0x1, 0x1, 41, 863, 676, 34, 1, 18 },
+ { 0x1, 0x1, 41, 864, 680, 34, 1, 18 },
+ { 0x0, 0x0, 41, 865, 1001, 0, 0, -1 },
+ { 0x0, 0x0, 41, 866, 1005, 0, 0, -1 },
+ { 0x1, 0x1, 41, 867, 700, 34, 1, 19 },
+ { 0x10000001, 0x10000001, 41, 868, 704, 6, 1, 19 },
+ { 0x0, 0x0, 41, 869, 1009, 0, 0, -1 },
+ { 0x1, 0x1, 41, 870, 716, 34, 1, 20 },
+ { 0x0, 0x0, 41, 871, 1013, 0, 0, -1 },
+ { 0x0, 0x0, 41, 872, 1017, 0, 0, -1 },
+ { 0x1, 0x1, 41, 873, 736, 34, 1, 21 },
+ { 0x10000001, 0x10000001, 41, 874, 740, 6, 1, 21 },
+ { 0x0, 0x0, 41, 875, 1021, 0, 0, -1 },
+ { 0x1, 0x1, 41, 876, 752, 34, 1, 22 },
+ { 0x0, 0x0, 41, 877, 1026, 0, 0, -1 },
+ { 0x0, 0x0, 41, 878, 1030, 0, 0, -1 },
+ { 0x1, 0x1, 41, 879, 775, 34, 1, 18 },
+ { 0x1, 0x1, 41, 880, 779, 34, 1, 18 },
+ { 0x0, 0x0, 41, 881, 1034, 0, 0, -1 },
+ { 0x1, 0x1, 41, 882, 791, 34, 1, 22 },
+ { 0x800001, 0x800001, 41, -1, 1156, 4, 1, 17 },
+ { 0x1, 0x1, 41, 2236, 1154, 4, 1, 17 },
+ { 0x1, 0x1, 41, 957, 1159, 4, 1, 23 },
+ { 0x2, 0x3, 41, -1, 1164, 20, 1, 68 },
+ { 0x1, 0x1, 41, 2237, 1162, 21, 1, 68 },
+ { 0x0, 0x0, 42, -1, -1, 0, 1, 86 },
+ { 0x0, 0x0, 42, -1, -1, 0, 1, 86 },
+ { 0x0, 0x0, 42, -1, -1, 0, 1, 130 },
+ { 0x1, 0x1, 44, 1372, 297, 38, 1, 1 },
+ { 0x1, 0x1, 44, 1373, 299, 38, 1, 1 },
+ { 0x0, 0x0, 44, -1, 302, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 424, 0, 0, -1 },
+ { 0x1, 0x1, 44, 1377, 319, 38, 1, 1 },
+ { 0x1, 0x1, 44, 1378, 321, 38, 1, 1 },
+ { 0x0, 0x0, 44, -1, 324, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 464, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 326, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 344, 0, 0, -1 },
+ { 0x1, 0x1, 44, 1384, 345, 38, 1, 1 },
+ { 0x1, 0x1, 44, 1385, 347, 38, 1, 1 },
+ { 0x0, 0x0, 44, -1, 350, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 472, 0, 0, -1 },
+ { 0x1, 0x1, 44, 1389, 367, 38, 1, 1 },
+ { 0x1, 0x1, 44, 1390, 369, 38, 1, 1 },
+ { 0x0, 0x0, 44, -1, 372, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 512, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 374, 0, 0, -1 },
+ { 0x0, 0x0, 44, -1, 392, 0, 0, -1 },
+ { 0x0, 0x0, 44, 1248, 2297, 0, 0, -1 },
+ { 0x0, 0x0, 44, 1249, 2305, 0, 1, 55 },
+ { 0x0, 0x0, 44, 1250, 2972, 0, 1, 55 },
+ { 0x0, 0x0, 44, 1251, 2373, 0, 0, -1 },
+ { 0x0, 0x0, 44, 1252, -1, 0, 1, 50 },
+ { 0x0, 0x0, 44, 1120, -1, 0, 1, 0 },
+ { 0x0, 0x0, 44, 1121, -1, 0, 1, 0 },
+ { 0x0, 0x0, 44, 1122, -1, 0, 1, 0 },
+ { 0x1, 0x1, 45, -1, 1676, 30, 1, 158 },
+ { 0x1, 0x1, 45, 963, 1675, 30, 1, 158 },
+ { 0x1, 0x1, 45, -1, 1680, 30, 1, 159 },
+ { 0x1, 0x1, 45, 964, 1679, 30, 1, 159 },
+ { 0x1, 0x1, 45, -1, 1684, 30, 1, 159 },
+ { 0x1, 0x1, 45, 965, 1683, 30, 1, 159 },
+ { 0x3, 0x3, 46, -1, 1160, 3, 1, 23 },
+ { 0x1, 0x1, 47, 2257, -1, 30, 1, 144 },
+ { 0x1, 0x1, 47, 2288, -1, 30, 1, 160 },
+ { 0x0, 0x0, 49, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 49, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 49, -1, -1, 0, 1, 41 },
+ { 0x1, 0x1, 56, -1, 1677, 31, 1, 158 },
+ { 0x1, 0x1, 56, -1, 1681, 31, 1, 159 },
+ { 0x1, 0x1, 56, -1, 1685, 31, 1, 159 },
+ { 0x0, 0x0, 56, -1, -1, 0, 1, 101 },
+ { 0x2, 0x3, 56, -1, -1, 27, 1, 101 },
+ { 0x1, 0x1, 56, -1, -1, 28, 1, 101 },
+ { 0x0, 0x0, 65, 14, 592, 0, 1, 6 },
+ { 0x0, 0x0, 65, 1273, 595, 0, 1, 6 },
+ { 0x1, 0x1, 65, 1274, 597, 33, 1, 6 },
+ { 0x1, 0x1, 65, 1275, 599, 34, 1, 6 },
+ { 0x3, 0x3, 65, 1276, 601, 33, 1, 6 },
+ { 0x0, 0x0, 65, 1277, 603, 0, 1, 6 },
+ { 0x1, 0x1, 65, 1278, 605, 33, 1, 6 },
+ { 0x1, 0x1, 65, 1279, 607, 34, 1, 6 },
+ { 0x3, 0x3, 65, 1280, 609, 33, 1, 6 },
+ { 0x1, 0x1, 65, 1281, 611, 6, 1, 7 },
+ { 0x8000001, 0x8000001, 65, 1282, 613, 6, 1, 7 },
+ { 0x10000001, 0x10000001, 65, 1283, 615, 6, 1, 7 },
+ { 0x18000001, 0x18000001, 65, 1284, 617, 6, 1, 7 },
+ { 0x0, 0x0, 65, 1285, 631, 0, 1, 8 },
+ { 0x1, 0x1, 65, 1286, 633, 33, 1, 8 },
+ { 0x1, 0x1, 65, 1287, 635, 34, 1, 8 },
+ { 0x3, 0x3, 65, 1288, 637, 33, 1, 8 },
+ { 0x0, 0x0, 65, 1289, 643, 0, 1, 16 },
+ { 0x1, 0x1, 65, 1290, 645, 33, 1, 16 },
+ { 0x1, 0x1, 65, 1291, 647, 34, 1, 16 },
+ { 0x3, 0x3, 65, 1292, 649, 33, 1, 16 },
+ { 0x0, 0x0, 65, 15, 655, 0, 1, 18 },
+ { 0x0, 0x0, 65, 1294, 658, 0, 1, 18 },
+ { 0x1, 0x1, 65, 1295, 660, 33, 1, 18 },
+ { 0x1, 0x1, 65, 1296, 662, 34, 1, 18 },
+ { 0x3, 0x3, 65, 1297, 664, 33, 1, 18 },
+ { 0x0, 0x0, 65, 1298, 666, 0, 1, 18 },
+ { 0x1, 0x1, 65, 1299, 668, 33, 1, 18 },
+ { 0x1, 0x1, 65, 1300, 670, 34, 1, 18 },
+ { 0x3, 0x3, 65, 1301, 672, 33, 1, 18 },
+ { 0x0, 0x0, 65, 1302, 682, 0, 1, 19 },
+ { 0x1, 0x1, 65, 1303, 684, 33, 1, 19 },
+ { 0x1, 0x1, 65, 1304, 686, 34, 1, 19 },
+ { 0x3, 0x3, 65, 1305, 688, 33, 1, 19 },
+ { 0x1, 0x1, 65, 1306, 690, 6, 1, 19 },
+ { 0x8000001, 0x8000001, 65, 1307, 692, 6, 1, 19 },
+ { 0x10000001, 0x10000001, 65, 1308, 694, 6, 1, 19 },
+ { 0x18000001, 0x18000001, 65, 1309, 696, 6, 1, 19 },
+ { 0x0, 0x0, 65, 1310, 706, 0, 1, 20 },
+ { 0x1, 0x1, 65, 1311, 708, 33, 1, 20 },
+ { 0x1, 0x1, 65, 1312, 710, 34, 1, 20 },
+ { 0x3, 0x3, 65, 1313, 712, 33, 1, 20 },
+ { 0x0, 0x0, 65, 1314, 718, 0, 1, 21 },
+ { 0x1, 0x1, 65, 1315, 720, 33, 1, 21 },
+ { 0x1, 0x1, 65, 1316, 722, 34, 1, 21 },
+ { 0x3, 0x3, 65, 1317, 724, 33, 1, 21 },
+ { 0x1, 0x1, 65, 1318, 726, 6, 1, 21 },
+ { 0x8000001, 0x8000001, 65, 1319, 728, 6, 1, 21 },
+ { 0x10000001, 0x10000001, 65, 1320, 730, 6, 1, 21 },
+ { 0x18000001, 0x18000001, 65, 1321, 732, 6, 1, 21 },
+ { 0x0, 0x0, 65, 1322, 742, 0, 1, 22 },
+ { 0x1, 0x1, 65, 1323, 744, 33, 1, 22 },
+ { 0x1, 0x1, 65, 1324, 746, 34, 1, 22 },
+ { 0x3, 0x3, 65, 1325, 748, 33, 1, 22 },
+ { 0x0, 0x0, 65, 17, 754, 0, 1, 18 },
+ { 0x0, 0x0, 65, 1327, 757, 0, 1, 18 },
+ { 0x1, 0x1, 65, 1328, 759, 33, 1, 18 },
+ { 0x1, 0x1, 65, 1329, 761, 34, 1, 18 },
+ { 0x3, 0x3, 65, 1330, 763, 33, 1, 18 },
+ { 0x0, 0x0, 65, 1331, 765, 0, 1, 18 },
+ { 0x1, 0x1, 65, 1332, 767, 33, 1, 18 },
+ { 0x1, 0x1, 65, 1333, 769, 34, 1, 18 },
+ { 0x3, 0x3, 65, 1334, 771, 33, 1, 18 },
+ { 0x0, 0x0, 65, 1335, 781, 0, 1, 22 },
+ { 0x1, 0x1, 65, 1336, 783, 33, 1, 22 },
+ { 0x1, 0x1, 65, 1337, 785, 34, 1, 22 },
+ { 0x3, 0x3, 65, 1338, 787, 33, 1, 22 },
+ { 0x3, 0x3, 66, 561, 1539, 33, 1, 136 },
+ { 0x3, 0x3, 66, 562, 1549, 33, 1, 136 },
+ { 0x3, 0x3, 66, 563, 1559, 33, 1, 136 },
+ { 0x0, 0x0, 66, -1, 1564, 0, 1, 147 },
+ { 0x0, 0x0, 66, -1, 1565, 0, 1, 152 },
+ { 0x0, 0x0, 66, -1, 1566, 0, 1, 152 },
+ { 0x0, 0x0, 107, 1046, 2345, 0, 0, -1 },
+ { 0x0, 0x0, 107, 1047, 2864, 0, 1, 30 },
+ { 0x0, 0x0, 107, 1048, 2386, 0, 0, -1 },
+ { 0x0, 0x0, 107, 1049, 2868, 0, 1, 30 },
+ { 0x0, 0x0, 109, -1, 2347, 0, 0, -1 },
+ { 0x1, 0x1, 109, -1, 2865, 27, 1, 30 },
+ { 0x0, 0x0, 109, -1, 2388, 0, 0, -1 },
+ { 0x1, 0x1, 109, -1, 2869, 27, 1, 30 },
+ { 0x0, 0x0, 110, 1051, -1, 0, 1, 122 },
+ { 0x1, 0x1, 111, -1, -1, 27, 1, 122 },
+ { 0x0, 0x0, 112, 1082, 2894, 0, 1, 1 },
+ { 0x0, 0x0, 112, 1083, 2897, 0, 1, 1 },
+ { 0x0, 0x0, 112, 1224, 305, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1225, 309, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1185, 440, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1186, 448, 0, 0, -1 },
+ { 0x0, 0x0, 112, -1, 456, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1084, 2910, 0, 1, 1 },
+ { 0x0, 0x0, 112, 1085, 2913, 0, 1, 1 },
+ { 0x0, 0x0, 112, -1, 330, 0, 0, -1 },
+ { 0x0, 0x0, 112, -1, 334, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1233, 335, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1234, 339, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1086, 2934, 0, 1, 1 },
+ { 0x0, 0x0, 112, 1087, 2937, 0, 1, 1 },
+ { 0x0, 0x0, 112, 1237, 353, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1238, 357, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1198, 488, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1199, 496, 0, 0, -1 },
+ { 0x0, 0x0, 112, -1, 504, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1391, 2948, 0, 1, 1 },
+ { 0x0, 0x0, 112, 1392, 2950, 0, 1, 1 },
+ { 0x0, 0x0, 112, -1, 378, 0, 0, -1 },
+ { 0x0, 0x0, 112, -1, 382, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1246, 383, 0, 0, -1 },
+ { 0x0, 0x0, 112, 1247, 387, 0, 0, -1 },
+ { 0x0, 0x0, 112, -1, 2315, 0, 0, -1 },
+ { 0x1, 0x9, 112, -1, 2319, 33, 1, 55 },
+ { 0x1, 0x9, 112, -1, 2981, 33, 1, 55 },
+ { 0x2, 0x3, 112, 1408, 2382, 27, 1, 50 },
+ { 0x1, 0x1, 114, 1374, 2895, 37, 1, 1 },
+ { 0x1, 0x1, 114, 1375, 2898, 37, 1, 1 },
+ { 0x1, 0x1, 114, 1379, 2911, 37, 1, 1 },
+ { 0x1, 0x1, 114, 1380, 2914, 37, 1, 1 },
+ { 0x1, 0x1, 114, 1386, 2935, 37, 1, 1 },
+ { 0x1, 0x1, 114, 1387, 2938, 37, 1, 1 },
+ { 0x0, 0x0, 114, -1, 2958, 0, 1, 1 },
+ { 0x0, 0x0, 114, -1, 2959, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1123, 2890, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1124, 2892, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1183, 303, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1184, 307, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 444, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 452, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1228, 454, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 2908, 0, 1, 1 },
+ { 0x0, 0x0, 115, -1, 2909, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1231, 328, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1232, 332, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1192, 337, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1193, 341, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1127, 2930, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1128, 2932, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1196, 351, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1197, 355, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 492, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 500, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1241, 502, 0, 0, -1 },
+ { 0x0, 0x0, 115, -1, 2946, 0, 1, 1 },
+ { 0x0, 0x0, 115, -1, 2947, 0, 1, 1 },
+ { 0x0, 0x0, 115, 1244, 376, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1245, 380, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1205, 385, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1206, 389, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1078, 2313, 0, 0, -1 },
+ { 0x0, 0x0, 115, 1079, 2317, 0, 1, 55 },
+ { 0x0, 0x0, 115, 1080, 2980, 0, 1, 55 },
+ { 0x0, 0x0, 115, 1081, 2381, 0, 1, 50 },
{ 0x1, 0x1, 115, -1, -1, 27, 1, 0 },
{ 0x1, 0x1, 115, -1, -1, 27, 1, 0 },
{ 0x1, 0x1, 115, -1, -1, 27, 1, 0 },
- { 0x1, 0x1, 116, -1, 2422, 37, 1, 1 },
- { 0x0, 0x0, 116, -1, 2435, 0, 1, 1 },
- { 0x1, 0x1, 116, -1, 2442, 37, 1, 1 },
- { 0x0, 0x0, 116, -1, 2454, 0, 1, 1 },
- { 0x0, 0x0, 117, 994, -1, 0, 1, 0 },
- { 0x0, 0x0, 117, 995, -1, 0, 1, 0 },
- { 0x0, 0x0, 117, 996, -1, 0, 1, 0 },
- { 0x3, 0x3, 117, 954, -1, 34, 1, 33 },
- { 0x3, 0x3, 117, 955, -1, 34, 1, 40 },
- { 0x1, 0x1, 119, -1, -1, 35, 1, 33 },
- { 0x1, 0x1, 119, -1, -1, 35, 1, 40 },
- { 0x0, 0x0, 120, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 120, -1, -1, 0, 1, 66 },
- { 0x1, 0x1, 120, -1, -1, 36, 1, 122 },
- { 0x0, 0x0, 120, -1, -1, 0, 1, 40 },
- { 0x1, 0x1, 120, -1, -1, 27, 1, 96 },
- { 0x0, 0x0, 120, -1, -1, 0, 1, 105 },
- { 0x0, 0x0, 120, -1, -1, 0, 1, 73 },
- { 0x0, 0x0, 120, -1, -1, 0, 1, 73 },
+ { 0x1, 0x1, 116, -1, 2891, 37, 1, 1 },
+ { 0x1, 0x1, 116, -1, 2893, 37, 1, 1 },
+ { 0x0, 0x0, 116, -1, 2918, 0, 1, 1 },
+ { 0x0, 0x0, 116, -1, 2919, 0, 1, 1 },
+ { 0x1, 0x1, 116, -1, 2931, 37, 1, 1 },
+ { 0x1, 0x1, 116, -1, 2933, 37, 1, 1 },
+ { 0x0, 0x0, 116, -1, 2956, 0, 1, 1 },
+ { 0x0, 0x0, 116, -1, 2957, 0, 1, 1 },
+ { 0x0, 0x0, 117, 1176, -1, 0, 1, 0 },
+ { 0x0, 0x0, 117, 1177, -1, 0, 1, 0 },
+ { 0x0, 0x0, 117, 1178, -1, 0, 1, 0 },
+ { 0x3, 0x3, 117, 1136, -1, 34, 1, 34 },
+ { 0x3, 0x3, 117, 1137, -1, 34, 1, 41 },
+ { 0x1, 0x1, 119, -1, -1, 35, 1, 34 },
+ { 0x1, 0x1, 119, -1, -1, 35, 1, 41 },
+ { 0x0, 0x0, 120, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 120, -1, -1, 0, 1, 67 },
+ { 0x1, 0x1, 120, -1, -1, 36, 1, 129 },
+ { 0x0, 0x0, 120, -1, -1, 0, 1, 41 },
+ { 0x1, 0x1, 120, -1, -1, 27, 1, 103 },
+ { 0x0, 0x0, 120, -1, -1, 0, 1, 112 },
+ { 0x0, 0x0, 120, -1, -1, 0, 1, 74 },
{ 0x0, 0x0, 120, -1, -1, 0, 1, 74 },
- { 0x0, 0x0, 120, -1, -1, 0, 1, 40 },
- { 0x1, 0x1, 120, -1, -1, 27, 1, 117 },
- { 0x1, 0x1, 120, -1, -1, 27, 1, 40 },
- { 0x0, 0x0, 120, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 121, -1, 2356, 0, 0, -1 },
- { 0x0, 0x0, 121, -1, 2359, 0, 0, -1 },
- { 0x1, 0x1, 122, -1, -1, 35, 1, 16 },
- { 0x1, 0x1, 122, -1, -1, 35, 1, 16 },
- { 0x1, 0x1, 122, -1, -1, 35, 1, 16 },
- { 0x1, 0x1, 122, -1, -1, 35, 1, 16 },
- { 0x1, 0x1, 122, -1, -1, 35, 1, 22 },
- { 0x1, 0x1, 122, -1, -1, 35, 1, 22 },
- { 0x1, 0x1, 122, -1, -1, 35, 1, 22 },
- { 0x1, 0x1, 122, -1, -1, 35, 1, 22 },
- { 0x1, 0x1, 122, -1, -1, 23, 1, 67 },
- { 0x1, 0x1, 122, -1, -1, 23, 1, 67 },
- { 0x1, 0x1, 122, -1, -1, 23, 1, 67 },
- { 0x1, 0x1, 122, -1, -1, 23, 1, 67 },
- { 0x1, 0x1, 122, 779, -1, 23, 1, 67 },
- { 0x9, 0x9, 122, 780, -1, 20, 1, 67 },
- { 0x0, 0x0, 126, 1837, -1, 0, 1, 0 },
- { 0x0, 0x0, 126, 1838, -1, 0, 1, 0 },
- { 0x1, 0x1, 126, -1, -1, 28, 1, 33 },
- { 0x1, 0x1, 126, -1, -1, 27, 1, 33 },
+ { 0x0, 0x0, 120, -1, -1, 0, 1, 75 },
+ { 0x0, 0x0, 120, -1, -1, 0, 1, 41 },
+ { 0x1, 0x1, 120, -1, -1, 27, 1, 124 },
+ { 0x1, 0x1, 120, -1, -1, 27, 1, 41 },
+ { 0x0, 0x0, 120, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 121, -1, 2820, 0, 0, -1 },
+ { 0x0, 0x0, 121, -1, 2823, 0, 0, -1 },
+ { 0x1, 0x1, 122, -1, -1, 35, 1, 17 },
+ { 0x1, 0x1, 122, -1, -1, 35, 1, 17 },
+ { 0x1, 0x1, 122, -1, -1, 35, 1, 17 },
+ { 0x1, 0x1, 122, -1, -1, 35, 1, 17 },
+ { 0x1, 0x1, 122, -1, -1, 35, 1, 23 },
+ { 0x1, 0x1, 122, -1, -1, 35, 1, 23 },
+ { 0x1, 0x1, 122, -1, -1, 35, 1, 23 },
+ { 0x1, 0x1, 122, -1, -1, 35, 1, 23 },
+ { 0x1, 0x1, 122, -1, -1, 23, 1, 68 },
+ { 0x1, 0x1, 122, -1, -1, 23, 1, 68 },
+ { 0x1, 0x1, 122, -1, -1, 23, 1, 68 },
+ { 0x1, 0x1, 122, -1, -1, 23, 1, 68 },
+ { 0x1, 0x1, 122, 918, -1, 23, 1, 68 },
+ { 0x9, 0x9, 122, 919, -1, 20, 1, 68 },
+ { 0x0, 0x0, 126, 2199, -1, 0, 1, 0 },
+ { 0x0, 0x0, 126, 2200, -1, 0, 1, 0 },
+ { 0x1, 0x1, 126, -1, -1, 28, 1, 34 },
+ { 0x1, 0x1, 126, -1, -1, 27, 1, 34 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
- { 0x0, 0x0, 126, -1, -1, 0, 1, 114 },
+ { 0x0, 0x0, 126, -1, -1, 0, 1, 121 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 126, -1, -1, 29, 1, 0 },
- { 0x0, 0x0, 126, 952, -1, 0, 1, 33 },
- { 0x0, 0x0, 126, 1046, -1, 0, 1, 40 },
- { 0x0, 0x0, 140, 1017, 2419, 0, 1, 1 },
- { 0x0, 0x0, 140, 905, 289, 0, 0, -1 },
- { 0x0, 0x0, 140, 927, 294, 0, 0, -1 },
- { 0x0, 0x0, 140, 928, 358, 0, 0, -1 },
- { 0x0, 0x0, 140, -1, 2429, 0, 1, 1 },
- { 0x0, 0x0, 140, 930, 300, 0, 0, -1 },
- { 0x0, 0x0, 140, -1, 307, 0, 0, -1 },
- { 0x0, 0x0, 140, 1019, 2439, 0, 1, 1 },
- { 0x0, 0x0, 140, 912, 313, 0, 0, -1 },
- { 0x0, 0x0, 140, 934, 318, 0, 0, -1 },
- { 0x0, 0x0, 140, 935, 382, 0, 0, -1 },
- { 0x0, 0x0, 140, -1, 2448, 0, 1, 1 },
- { 0x0, 0x0, 140, 937, 324, 0, 0, -1 },
- { 0x0, 0x0, 140, -1, 331, 0, 0, -1 },
- { 0x0, 0x0, 140, 2486, 1933, 0, 0, -1 },
- { 0x1, 0x1, 140, 2487, 2464, 33, 1, 54 },
- { 0x0, 0x0, 140, 2488, 1983, 0, 0, -1 },
- { 0x1, 0x1, 140, 2489, -1, 28, 1, 49 },
- { 0x1, 0x1, 141, -1, 2420, 37, 1, 1 },
- { 0x0, 0x0, 141, -1, 2434, 0, 1, 1 },
- { 0x1, 0x1, 141, -1, 2440, 37, 1, 1 },
- { 0x0, 0x0, 141, -1, 2453, 0, 1, 1 },
- { 0x1, 0x1, 144, 778, 976, 3, 1, 22 },
- { 0x0, 0x0, 145, 1839, -1, 0, 1, 33 },
- { 0x0, 0x0, 146, 784, 2416, 0, 1, 1 },
- { 0x0, 0x0, 146, -1, 291, 0, 0, -1 },
- { 0x0, 0x0, 146, 906, 292, 0, 0, -1 },
- { 0x0, 0x0, 146, 907, 360, 0, 0, -1 },
- { 0x0, 0x0, 146, 786, 2426, 0, 1, 1 },
- { 0x0, 0x0, 146, 909, 302, 0, 0, -1 },
- { 0x0, 0x0, 146, 931, 305, 0, 0, -1 },
- { 0x0, 0x0, 146, 790, 2436, 0, 1, 1 },
- { 0x0, 0x0, 146, -1, 315, 0, 0, -1 },
- { 0x0, 0x0, 146, 913, 316, 0, 0, -1 },
- { 0x0, 0x0, 146, 914, 384, 0, 0, -1 },
- { 0x0, 0x0, 146, 792, 2446, 0, 1, 1 },
- { 0x0, 0x0, 146, 916, 326, 0, 0, -1 },
- { 0x0, 0x0, 146, 938, 329, 0, 0, -1 },
- { 0x0, 0x0, 146, 1013, 1931, 0, 0, -1 },
- { 0x1, 0x1, 146, 1014, 2463, 36, 1, 54 },
- { 0x0, 0x0, 146, 1015, 1982, 0, 0, -1 },
- { 0x1, 0x1, 146, 1016, -1, 27, 1, 49 },
- { 0x1, 0x1, 147, -1, 2418, 37, 1, 1 },
- { 0x1, 0x1, 147, -1, 2428, 37, 1, 1 },
- { 0x1, 0x1, 147, -1, 2438, 37, 1, 1 },
- { 0x0, 0x0, 147, -1, 2452, 0, 1, 1 },
- { 0x0, 0x0, 148, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 148, 953, -1, 0, 1, 40 },
- { 0x0, 0x0, 149, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 149, -1, -1, 0, 1, 66 },
- { 0x0, 0x0, 149, -1, 2456, 0, 1, 63 },
- { 0x0, 0x0, 149, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 149, -1, -1, 0, 1, 81 },
- { 0x0, 0x0, 149, -1, -1, 0, 1, 81 },
- { 0x0, 0x0, 149, -1, -1, 0, 1, 85 },
- { 0x0, 0x0, 149, -1, -1, 0, 1, 40 },
- { 0x1, 0x1, 150, -1, 454, 12, 1, 6 },
- { 0x1, 0x1, 150, -1, 457, 12, 1, 6 },
- { 0x200001, 0x200001, 150, -1, 459, 12, 1, 6 },
- { 0x400001, 0x400001, 150, -1, 461, 12, 1, 6 },
- { 0x600001, 0x600001, 150, -1, 463, 12, 1, 6 },
- { 0x1, 0x1, 150, -1, 465, 12, 1, 6 },
- { 0x200001, 0x200001, 150, -1, 467, 12, 1, 6 },
- { 0x400001, 0x400001, 150, -1, 469, 12, 1, 6 },
- { 0x600001, 0x600001, 150, -1, 471, 12, 1, 6 },
- { 0x41, 0x41, 150, -1, 473, 6, 1, 7 },
- { 0x8000041, 0x8000041, 150, -1, 475, 6, 1, 7 },
- { 0x10000041, 0x10000041, 150, -1, 477, 6, 1, 7 },
- { 0x18000041, 0x18000041, 150, -1, 479, 6, 1, 7 },
- { 0x1, 0x1, 150, -1, 493, 12, 1, 8 },
- { 0x200001, 0x200001, 150, -1, 495, 12, 1, 8 },
- { 0x400001, 0x400001, 150, -1, 497, 12, 1, 8 },
- { 0x600001, 0x600001, 150, -1, 499, 12, 1, 8 },
- { 0x1, 0x1, 150, -1, 505, 12, 1, 15 },
- { 0x200001, 0x200001, 150, -1, 507, 12, 1, 15 },
- { 0x400001, 0x400001, 150, -1, 509, 12, 1, 15 },
- { 0x600001, 0x600001, 150, -1, 511, 12, 1, 15 },
- { 0x1, 0x1, 150, -1, 517, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 520, 12, 1, 17 },
- { 0x200001, 0x200001, 150, -1, 522, 12, 1, 17 },
- { 0x400001, 0x400001, 150, -1, 524, 12, 1, 17 },
- { 0x600001, 0x600001, 150, -1, 526, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 528, 12, 1, 17 },
- { 0x200001, 0x200001, 150, -1, 530, 12, 1, 17 },
- { 0x400001, 0x400001, 150, -1, 532, 12, 1, 17 },
- { 0x600001, 0x600001, 150, -1, 534, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 544, 12, 1, 18 },
- { 0x200001, 0x200001, 150, -1, 546, 12, 1, 18 },
- { 0x400001, 0x400001, 150, -1, 548, 12, 1, 18 },
- { 0x600001, 0x600001, 150, -1, 550, 12, 1, 18 },
- { 0x41, 0x41, 150, -1, 552, 6, 1, 18 },
- { 0x8000041, 0x8000041, 150, -1, 554, 6, 1, 18 },
- { 0x10000041, 0x10000041, 150, -1, 556, 6, 1, 18 },
- { 0x18000041, 0x18000041, 150, -1, 558, 6, 1, 18 },
- { 0x1, 0x1, 150, -1, 568, 12, 1, 19 },
- { 0x200001, 0x200001, 150, -1, 570, 12, 1, 19 },
- { 0x400001, 0x400001, 150, -1, 572, 12, 1, 19 },
- { 0x600001, 0x600001, 150, -1, 574, 12, 1, 19 },
- { 0x1, 0x1, 150, -1, 580, 12, 1, 20 },
- { 0x200001, 0x200001, 150, -1, 582, 12, 1, 20 },
- { 0x400001, 0x400001, 150, -1, 584, 12, 1, 20 },
- { 0x600001, 0x600001, 150, -1, 586, 12, 1, 20 },
- { 0x41, 0x41, 150, -1, 588, 6, 1, 20 },
- { 0x8000041, 0x8000041, 150, -1, 590, 6, 1, 20 },
- { 0x10000041, 0x10000041, 150, -1, 592, 6, 1, 20 },
- { 0x18000041, 0x18000041, 150, -1, 594, 6, 1, 20 },
- { 0x1, 0x1, 150, -1, 604, 12, 1, 21 },
- { 0x200001, 0x200001, 150, -1, 606, 12, 1, 21 },
- { 0x400001, 0x400001, 150, -1, 608, 12, 1, 21 },
- { 0x600001, 0x600001, 150, -1, 610, 12, 1, 21 },
- { 0x1, 0x1, 150, -1, 616, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 619, 12, 1, 17 },
- { 0x200001, 0x200001, 150, -1, 621, 12, 1, 17 },
- { 0x400001, 0x400001, 150, -1, 623, 12, 1, 17 },
- { 0x600001, 0x600001, 150, -1, 625, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 627, 12, 1, 17 },
- { 0x200001, 0x200001, 150, -1, 629, 12, 1, 17 },
- { 0x400001, 0x400001, 150, -1, 631, 12, 1, 17 },
- { 0x600001, 0x600001, 150, -1, 633, 12, 1, 17 },
- { 0x1, 0x1, 150, -1, 643, 12, 1, 21 },
- { 0x200001, 0x200001, 150, -1, 645, 12, 1, 21 },
- { 0x400001, 0x400001, 150, -1, 647, 12, 1, 21 },
- { 0x600001, 0x600001, 150, -1, 649, 12, 1, 21 },
- { 0x0, 0x0, 155, -1, -1, 0, 1, 124 },
- { 0x0, 0x0, 159, 654, -1, 0, 1, 75 },
- { 0x0, 0x0, 159, 655, -1, 0, 1, 75 },
- { 0x9, 0x9, 159, -1, 1215, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1224, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1233, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1244, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1253, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1262, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1271, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1280, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1289, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1299, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1309, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1319, 32, 1, 130 },
- { 0x9, 0x9, 159, -1, 1328, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1334, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1340, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1346, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1352, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1358, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1364, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1370, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1376, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1382, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1388, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1394, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1400, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1406, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1412, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1418, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1424, 32, 1, 144 },
- { 0x9, 0x9, 159, -1, 1430, 32, 1, 144 },
- { 0x0, 0x0, 160, 1041, 287, 0, 0, -1 },
- { 0x1, 0x1, 160, -1, 2425, 38, 1, 1 },
- { 0x0, 0x0, 160, 785, 344, 0, 0, -1 },
- { 0x0, 0x0, 160, 1042, 297, 0, 0, -1 },
- { 0x1, 0x1, 160, -1, 2433, 38, 1, 1 },
- { 0x0, 0x0, 160, 787, 364, 0, 0, -1 },
- { 0x0, 0x0, 160, 788, 298, 0, 0, -1 },
- { 0x0, 0x0, 160, 789, 308, 0, 0, -1 },
- { 0x0, 0x0, 160, 1043, 311, 0, 0, -1 },
- { 0x1, 0x1, 160, -1, 2445, 38, 1, 1 },
- { 0x0, 0x0, 160, 791, 368, 0, 0, -1 },
- { 0x0, 0x0, 160, -1, 321, 0, 0, -1 },
- { 0x1, 0x1, 160, -1, 2451, 38, 1, 1 },
- { 0x0, 0x0, 160, 793, 388, 0, 0, -1 },
- { 0x0, 0x0, 160, 794, 322, 0, 0, -1 },
- { 0x0, 0x0, 160, 795, 332, 0, 0, -1 },
- { 0x0, 0x0, 161, 1186, 1941, 0, 0, -1 },
- { 0x0, 0x0, 161, 1187, 2474, 0, 1, 54 },
- { 0x0, 0x0, 161, 1188, 1985, 0, 0, -1 },
- { 0x1, 0x1, 161, 1189, -1, 29, 1, 49 },
- { 0x0, 0x0, 162, -1, 1951, 0, 0, -1 },
- { 0x1, 0x9, 162, -1, 2481, 33, 1, 54 },
- { 0x6, 0x7, 162, -1, 1992, 27, 1, 49 },
- { 0x0, 0x0, 163, 1175, 1949, 0, 0, -1 },
- { 0x0, 0x0, 163, 1176, 2480, 0, 1, 54 },
- { 0x1, 0x1, 163, 1177, 1991, 29, 1, 49 },
- { 0x1, 0x1, 164, 1191, -1, 27, 1, 33 },
- { 0x0, 0x0, 165, 1832, 1945, 0, 0, -1 },
- { 0x1, 0x1, 165, 1833, 2476, 33, 1, 54 },
- { 0x0, 0x0, 165, 1834, 1987, 0, 0, -1 },
- { 0x3, 0x3, 165, 1835, -1, 28, 1, 49 },
- { 0x0, 0x0, 166, 1182, 1943, 0, 0, -1 },
- { 0x1, 0x1, 166, 1183, 2475, 36, 1, 54 },
- { 0x0, 0x0, 166, 1184, 1986, 0, 0, -1 },
- { 0x5, 0x5, 166, 1185, -1, 27, 1, 49 },
- { 0x0, 0x0, 167, -1, 2457, 0, 1, 63 },
- { 0x1, 0x1, 169, -1, -1, 28, 1, 33 },
- { 0x1, 0x1, 170, 2315, -1, 27, 1, 33 },
- { 0x1, 0x1, 170, 2316, -1, 27, 1, 33 },
- { 0x1, 0x1, 171, 1460, -1, 28, 1, 135 },
- { 0x1, 0x1, 171, 1461, -1, 28, 1, 135 },
- { 0x1, 0x1, 171, 1462, -1, 28, 1, 134 },
- { 0x1, 0x1, 171, 1463, -1, 28, 1, 134 },
- { 0x1, 0x1, 171, 1464, -1, 28, 1, 134 },
- { 0x1, 0x1, 171, 1465, -1, 28, 1, 134 },
- { 0x1, 0x1, 171, 1466, -1, 28, 1, 134 },
- { 0x1, 0x1, 171, 1467, -1, 28, 1, 134 },
- { 0x1, 0x1, 171, 1468, -1, 28, 1, 134 },
- { 0x1, 0x1, 171, 1469, -1, 28, 1, 134 },
- { 0x1, 0x1, 171, 1470, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1471, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1472, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1473, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1474, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1475, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1476, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1477, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1478, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1479, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1480, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1481, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1482, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1483, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1484, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1485, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1486, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1487, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1488, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1489, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1490, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1491, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1492, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1493, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1494, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1495, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1496, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1497, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1498, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1499, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1500, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1501, -1, 28, 1, 125 },
- { 0x1, 0x1, 171, 1502, -1, 28, 1, 125 },
- { 0x1, 0x1, 171, 1503, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1504, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1505, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1506, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1507, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1508, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1509, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1510, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1511, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1512, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1513, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1514, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1515, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1516, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1517, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1518, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1519, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1520, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1521, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1522, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1523, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1524, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1525, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1526, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1527, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1528, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1529, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1530, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1531, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1532, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1533, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1534, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1535, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1536, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1537, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1538, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1539, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1540, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1541, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1542, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1543, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1544, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1545, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1546, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1547, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1548, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1549, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1550, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1551, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1552, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1553, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1554, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1555, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1556, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1557, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1558, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1559, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1560, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1561, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1562, -1, 28, 1, 129 },
- { 0x1, 0x1, 171, 1563, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1564, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1565, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1566, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1567, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1568, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1569, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1570, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1571, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1572, -1, 28, 1, 129 },
- { 0x1, 0x1, 171, 1573, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1574, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1575, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1576, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1577, -1, 28, 1, 126 },
- { 0x1, 0x1, 171, 1578, -1, 28, 1, 127 },
- { 0x1, 0x1, 171, 1579, -1, 28, 1, 128 },
- { 0x1, 0x1, 171, 1580, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1581, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1582, -1, 28, 1, 129 },
- { 0x1, 0x1, 171, 1583, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1584, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1585, -1, 28, 1, 130 },
- { 0x1, 0x1, 171, 1586, -1, 28, 1, 124 },
- { 0x1, 0x1, 171, 1587, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1588, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1589, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1590, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1591, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1592, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1593, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1594, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1595, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1596, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1597, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1598, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1599, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1600, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1601, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1602, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1603, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1604, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1605, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1606, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1607, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1608, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1609, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1610, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1611, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1612, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1613, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1614, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1615, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1616, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1617, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1618, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1619, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1620, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1621, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1622, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1623, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1624, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1625, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1626, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1627, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1628, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1629, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1630, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1631, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1632, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1633, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1634, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1635, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1636, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1637, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1638, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1639, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1640, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1641, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1642, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1643, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1644, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1645, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1646, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1647, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1648, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1649, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1650, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1651, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1652, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1653, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1654, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1655, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1656, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1657, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1658, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1659, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1660, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1661, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1662, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1663, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1664, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1665, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1666, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1667, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1668, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1669, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1670, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1671, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1672, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1673, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1674, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1675, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1676, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1677, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1678, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1679, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1680, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1681, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1682, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1683, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1684, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1685, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1686, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1687, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1688, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1689, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1690, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1691, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1692, -1, 28, 1, 141 },
- { 0x1, 0x1, 171, 1693, -1, 28, 1, 142 },
- { 0x1, 0x1, 171, 1694, -1, 28, 1, 143 },
- { 0x1, 0x1, 171, 1695, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1696, -1, 28, 1, 144 },
- { 0x1, 0x1, 171, 1697, -1, 28, 1, 140 },
- { 0x1, 0x1, 171, 1448, -1, 28, 1, 146 },
- { 0x1, 0x1, 171, 1449, -1, 28, 1, 147 },
- { 0x1, 0x1, 171, 1450, -1, 28, 1, 147 },
- { 0x1, 0x1, 171, 1451, -1, 28, 1, 146 },
- { 0x1, 0x1, 171, 1452, -1, 28, 1, 148 },
- { 0x1, 0x1, 171, 1453, -1, 28, 1, 149 },
- { 0x1, 0x1, 171, 1454, -1, 28, 1, 149 },
- { 0x1, 0x1, 171, 1455, -1, 28, 1, 148 },
- { 0x1, 0x1, 171, 1456, -1, 28, 1, 148 },
- { 0x1, 0x1, 171, 1457, -1, 28, 1, 149 },
- { 0x1, 0x1, 171, 1458, -1, 28, 1, 149 },
- { 0x1, 0x1, 171, 1459, -1, 28, 1, 148 },
- { 0x1, 0x1, 171, 1740, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1741, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1742, -1, 28, 1, 136 },
- { 0x1, 0x1, 171, 1743, -1, 28, 1, 136 },
- { 0x1, 0x1, 172, 1698, -1, 29, 1, 146 },
- { 0x1, 0x1, 172, 1699, -1, 29, 1, 147 },
- { 0x1, 0x1, 172, 1700, -1, 29, 1, 147 },
- { 0x1, 0x1, 172, 1701, -1, 29, 1, 146 },
- { 0x1, 0x1, 172, 1702, -1, 29, 1, 148 },
- { 0x1, 0x1, 172, 1703, -1, 29, 1, 149 },
- { 0x1, 0x1, 172, 1704, -1, 29, 1, 149 },
- { 0x1, 0x1, 172, 1705, -1, 29, 1, 148 },
- { 0x1, 0x1, 172, 1706, -1, 29, 1, 148 },
- { 0x1, 0x1, 172, 1707, -1, 29, 1, 149 },
- { 0x1, 0x1, 172, 1708, -1, 29, 1, 149 },
- { 0x1, 0x1, 172, 1709, -1, 29, 1, 148 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 261, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1890, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 263, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1891, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 265, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1892, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 125 },
- { 0x3, 0x3, 173, 267, -1, 28, 1, 125 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 268, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1893, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 270, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1894, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 272, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1895, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 274, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1896, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 276, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1897, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 278, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1898, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 129 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 280, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1899, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 129 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 282, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1900, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 126 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 127 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 128 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 129 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 284, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 130 },
- { 0x3, 0x3, 173, 1901, -1, 28, 1, 124 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
+ { 0x0, 0x0, 126, 1134, -1, 0, 1, 34 },
+ { 0x0, 0x0, 126, 1262, -1, 0, 1, 41 },
+ { 0x0, 0x0, 140, 1212, 2886, 0, 1, 1 },
+ { 0x0, 0x0, 140, 1213, 2888, 0, 1, 1 },
+ { 0x0, 0x0, 140, 1054, 304, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1055, 432, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1094, 313, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1095, 317, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1096, 453, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 2906, 0, 1, 1 },
+ { 0x0, 0x0, 140, -1, 2907, 0, 1, 1 },
+ { 0x0, 0x0, 140, 1099, 327, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1100, 331, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 338, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 342, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1216, 2926, 0, 1, 1 },
+ { 0x0, 0x0, 140, 1217, 2928, 0, 1, 1 },
+ { 0x0, 0x0, 140, 1067, 352, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1068, 480, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1107, 361, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1108, 365, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1109, 501, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 2944, 0, 1, 1 },
+ { 0x0, 0x0, 140, -1, 2945, 0, 1, 1 },
+ { 0x0, 0x0, 140, 1112, 375, 0, 0, -1 },
+ { 0x0, 0x0, 140, 1113, 379, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 386, 0, 0, -1 },
+ { 0x0, 0x0, 140, -1, 390, 0, 0, -1 },
+ { 0x0, 0x0, 140, 3012, 2301, 0, 0, -1 },
+ { 0x1, 0x1, 140, 3013, 2309, 33, 1, 55 },
+ { 0x1, 0x1, 140, 3014, 2974, 33, 1, 55 },
+ { 0x0, 0x0, 140, 3015, 2375, 0, 0, -1 },
+ { 0x1, 0x1, 140, 3016, -1, 28, 1, 50 },
+ { 0x1, 0x1, 141, -1, 2887, 37, 1, 1 },
+ { 0x1, 0x1, 141, -1, 2889, 37, 1, 1 },
+ { 0x0, 0x0, 141, -1, 2916, 0, 1, 1 },
+ { 0x0, 0x0, 141, -1, 2917, 0, 1, 1 },
+ { 0x1, 0x1, 141, -1, 2927, 37, 1, 1 },
+ { 0x1, 0x1, 141, -1, 2929, 37, 1, 1 },
+ { 0x0, 0x0, 141, -1, 2954, 0, 1, 1 },
+ { 0x0, 0x0, 141, -1, 2955, 0, 1, 1 },
+ { 0x1, 0x1, 144, 917, 1158, 3, 1, 23 },
+ { 0x0, 0x0, 145, 2201, -1, 0, 1, 34 },
+ { 0x0, 0x0, 146, 923, 2880, 0, 1, 1 },
+ { 0x0, 0x0, 146, 924, 2883, 0, 1, 1 },
+ { 0x0, 0x0, 146, -1, 306, 0, 0, -1 },
+ { 0x0, 0x0, 146, -1, 436, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1056, 311, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1057, 315, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1058, 455, 0, 0, -1 },
+ { 0x0, 0x0, 146, 927, 2900, 0, 1, 1 },
+ { 0x0, 0x0, 146, 928, 2903, 0, 1, 1 },
+ { 0x0, 0x0, 146, 1061, 329, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1062, 333, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1101, 336, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1102, 340, 0, 0, -1 },
+ { 0x0, 0x0, 146, 933, 2920, 0, 1, 1 },
+ { 0x0, 0x0, 146, 934, 2923, 0, 1, 1 },
+ { 0x0, 0x0, 146, -1, 354, 0, 0, -1 },
+ { 0x0, 0x0, 146, -1, 484, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1069, 359, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1070, 363, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1071, 503, 0, 0, -1 },
+ { 0x0, 0x0, 146, 937, 2940, 0, 1, 1 },
+ { 0x0, 0x0, 146, 938, 2942, 0, 1, 1 },
+ { 0x0, 0x0, 146, 1074, 377, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1075, 381, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1114, 384, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1115, 388, 0, 0, -1 },
+ { 0x0, 0x0, 146, 1207, 2299, 0, 0, -1 },
+ { 0x1, 0x1, 146, 1208, 2307, 36, 1, 55 },
+ { 0x1, 0x1, 146, 1209, 2973, 36, 1, 55 },
+ { 0x0, 0x0, 146, 1210, 2374, 0, 0, -1 },
+ { 0x1, 0x1, 146, 1211, -1, 27, 1, 50 },
+ { 0x1, 0x1, 147, -1, 2882, 37, 1, 1 },
+ { 0x1, 0x1, 147, -1, 2885, 37, 1, 1 },
+ { 0x1, 0x1, 147, -1, 2902, 37, 1, 1 },
+ { 0x1, 0x1, 147, -1, 2905, 37, 1, 1 },
+ { 0x1, 0x1, 147, -1, 2922, 37, 1, 1 },
+ { 0x1, 0x1, 147, -1, 2925, 37, 1, 1 },
+ { 0x0, 0x0, 147, -1, 2952, 0, 1, 1 },
+ { 0x0, 0x0, 147, -1, 2953, 0, 1, 1 },
+ { 0x0, 0x0, 148, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 148, 1135, -1, 0, 1, 41 },
+ { 0x0, 0x0, 149, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 149, -1, -1, 0, 1, 67 },
+ { 0x0, 0x0, 149, -1, 2960, 0, 1, 64 },
+ { 0x0, 0x0, 149, -1, 2961, 0, 1, 64 },
+ { 0x0, 0x0, 149, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 149, -1, -1, 0, 1, 87 },
+ { 0x0, 0x0, 149, -1, -1, 0, 1, 87 },
+ { 0x0, 0x0, 149, -1, -1, 0, 1, 92 },
+ { 0x0, 0x0, 149, -1, -1, 0, 1, 41 },
+ { 0x1, 0x1, 150, -1, 593, 12, 1, 6 },
+ { 0x1, 0x1, 150, -1, 596, 12, 1, 6 },
+ { 0x200001, 0x200001, 150, -1, 598, 12, 1, 6 },
+ { 0x400001, 0x400001, 150, -1, 600, 12, 1, 6 },
+ { 0x600001, 0x600001, 150, -1, 602, 12, 1, 6 },
+ { 0x1, 0x1, 150, -1, 604, 12, 1, 6 },
+ { 0x200001, 0x200001, 150, -1, 606, 12, 1, 6 },
+ { 0x400001, 0x400001, 150, -1, 608, 12, 1, 6 },
+ { 0x600001, 0x600001, 150, -1, 610, 12, 1, 6 },
+ { 0x41, 0x41, 150, -1, 612, 6, 1, 7 },
+ { 0x8000041, 0x8000041, 150, -1, 614, 6, 1, 7 },
+ { 0x10000041, 0x10000041, 150, -1, 616, 6, 1, 7 },
+ { 0x18000041, 0x18000041, 150, -1, 618, 6, 1, 7 },
+ { 0x1, 0x1, 150, -1, 632, 12, 1, 8 },
+ { 0x200001, 0x200001, 150, -1, 634, 12, 1, 8 },
+ { 0x400001, 0x400001, 150, -1, 636, 12, 1, 8 },
+ { 0x600001, 0x600001, 150, -1, 638, 12, 1, 8 },
+ { 0x1, 0x1, 150, -1, 644, 12, 1, 16 },
+ { 0x200001, 0x200001, 150, -1, 646, 12, 1, 16 },
+ { 0x400001, 0x400001, 150, -1, 648, 12, 1, 16 },
+ { 0x600001, 0x600001, 150, -1, 650, 12, 1, 16 },
+ { 0x1, 0x1, 150, -1, 656, 12, 1, 18 },
+ { 0x1, 0x1, 150, -1, 659, 12, 1, 18 },
+ { 0x200001, 0x200001, 150, -1, 661, 12, 1, 18 },
+ { 0x400001, 0x400001, 150, -1, 663, 12, 1, 18 },
+ { 0x600001, 0x600001, 150, -1, 665, 12, 1, 18 },
+ { 0x1, 0x1, 150, -1, 667, 12, 1, 18 },
+ { 0x200001, 0x200001, 150, -1, 669, 12, 1, 18 },
+ { 0x400001, 0x400001, 150, -1, 671, 12, 1, 18 },
+ { 0x600001, 0x600001, 150, -1, 673, 12, 1, 18 },
+ { 0x1, 0x1, 150, -1, 683, 12, 1, 19 },
+ { 0x200001, 0x200001, 150, -1, 685, 12, 1, 19 },
+ { 0x400001, 0x400001, 150, -1, 687, 12, 1, 19 },
+ { 0x600001, 0x600001, 150, -1, 689, 12, 1, 19 },
+ { 0x41, 0x41, 150, -1, 691, 6, 1, 19 },
+ { 0x8000041, 0x8000041, 150, -1, 693, 6, 1, 19 },
+ { 0x10000041, 0x10000041, 150, -1, 695, 6, 1, 19 },
+ { 0x18000041, 0x18000041, 150, -1, 697, 6, 1, 19 },
+ { 0x1, 0x1, 150, -1, 707, 12, 1, 20 },
+ { 0x200001, 0x200001, 150, -1, 709, 12, 1, 20 },
+ { 0x400001, 0x400001, 150, -1, 711, 12, 1, 20 },
+ { 0x600001, 0x600001, 150, -1, 713, 12, 1, 20 },
+ { 0x1, 0x1, 150, -1, 719, 12, 1, 21 },
+ { 0x200001, 0x200001, 150, -1, 721, 12, 1, 21 },
+ { 0x400001, 0x400001, 150, -1, 723, 12, 1, 21 },
+ { 0x600001, 0x600001, 150, -1, 725, 12, 1, 21 },
+ { 0x41, 0x41, 150, -1, 727, 6, 1, 21 },
+ { 0x8000041, 0x8000041, 150, -1, 729, 6, 1, 21 },
+ { 0x10000041, 0x10000041, 150, -1, 731, 6, 1, 21 },
+ { 0x18000041, 0x18000041, 150, -1, 733, 6, 1, 21 },
+ { 0x1, 0x1, 150, -1, 743, 12, 1, 22 },
+ { 0x200001, 0x200001, 150, -1, 745, 12, 1, 22 },
+ { 0x400001, 0x400001, 150, -1, 747, 12, 1, 22 },
+ { 0x600001, 0x600001, 150, -1, 749, 12, 1, 22 },
+ { 0x1, 0x1, 150, -1, 755, 12, 1, 18 },
+ { 0x1, 0x1, 150, -1, 758, 12, 1, 18 },
+ { 0x200001, 0x200001, 150, -1, 760, 12, 1, 18 },
+ { 0x400001, 0x400001, 150, -1, 762, 12, 1, 18 },
+ { 0x600001, 0x600001, 150, -1, 764, 12, 1, 18 },
+ { 0x1, 0x1, 150, -1, 766, 12, 1, 18 },
+ { 0x200001, 0x200001, 150, -1, 768, 12, 1, 18 },
+ { 0x400001, 0x400001, 150, -1, 770, 12, 1, 18 },
+ { 0x600001, 0x600001, 150, -1, 772, 12, 1, 18 },
+ { 0x1, 0x1, 150, -1, 782, 12, 1, 22 },
+ { 0x200001, 0x200001, 150, -1, 784, 12, 1, 22 },
+ { 0x400001, 0x400001, 150, -1, 786, 12, 1, 22 },
+ { 0x600001, 0x600001, 150, -1, 788, 12, 1, 22 },
+ { 0x0, 0x0, 155, -1, -1, 0, 1, 131 },
+ { 0x0, 0x0, 159, 793, -1, 0, 1, 81 },
+ { 0x0, 0x0, 159, 794, -1, 0, 1, 81 },
+ { 0x9, 0x9, 159, -1, 1456, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1465, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1474, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1487, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1496, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1505, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1514, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1523, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1532, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1542, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1552, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1562, 32, 1, 137 },
+ { 0x9, 0x9, 159, -1, 1571, 32, 1, 151 },
+ { 0x9, 0x9, 159, -1, 1577, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1583, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1589, 32, 1, 151 },
+ { 0x9, 0x9, 159, -1, 1595, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1601, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1607, 32, 1, 151 },
+ { 0x9, 0x9, 159, -1, 1613, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1619, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1625, 32, 1, 151 },
+ { 0x9, 0x9, 159, -1, 1631, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1637, 32, 1, 151 },
+ { 0x9, 0x9, 159, -1, 1643, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1649, 32, 1, 151 },
+ { 0x9, 0x9, 159, -1, 1655, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1661, 32, 1, 151 },
+ { 0x9, 0x9, 159, -1, 1667, 32, 1, 156 },
+ { 0x9, 0x9, 159, -1, 1673, 32, 1, 156 },
+ { 0x0, 0x0, 160, 1253, 298, 0, 0, -1 },
+ { 0x0, 0x0, 160, 1254, 422, 0, 0, -1 },
+ { 0x1, 0x1, 160, -1, 2896, 38, 1, 1 },
+ { 0x1, 0x1, 160, 925, 2899, 38, 1, 1 },
+ { 0x0, 0x0, 160, 926, 423, 0, 0, -1 },
+ { 0x0, 0x0, 160, 1255, 320, 0, 0, -1 },
+ { 0x0, 0x0, 160, 1256, 462, 0, 0, -1 },
+ { 0x1, 0x1, 160, -1, 2912, 38, 1, 1 },
+ { 0x1, 0x1, 160, 929, 2915, 38, 1, 1 },
+ { 0x0, 0x0, 160, 930, 463, 0, 0, -1 },
+ { 0x0, 0x0, 160, 931, 325, 0, 0, -1 },
+ { 0x0, 0x0, 160, 932, 343, 0, 0, -1 },
+ { 0x0, 0x0, 160, 1257, 346, 0, 0, -1 },
+ { 0x0, 0x0, 160, 1258, 470, 0, 0, -1 },
+ { 0x1, 0x1, 160, -1, 2936, 38, 1, 1 },
+ { 0x1, 0x1, 160, 935, 2939, 38, 1, 1 },
+ { 0x0, 0x0, 160, 936, 471, 0, 0, -1 },
+ { 0x0, 0x0, 160, -1, 368, 0, 0, -1 },
+ { 0x0, 0x0, 160, -1, 510, 0, 0, -1 },
+ { 0x1, 0x1, 160, -1, 2949, 38, 1, 1 },
+ { 0x1, 0x1, 160, 939, 2951, 38, 1, 1 },
+ { 0x0, 0x0, 160, 940, 511, 0, 0, -1 },
+ { 0x0, 0x0, 160, 941, 373, 0, 0, -1 },
+ { 0x0, 0x0, 160, 942, 391, 0, 0, -1 },
+ { 0x0, 0x0, 161, 1415, 2321, 0, 0, -1 },
+ { 0x0, 0x0, 161, 1416, 2329, 0, 1, 55 },
+ { 0x0, 0x0, 161, 1417, 2990, 0, 1, 55 },
+ { 0x0, 0x0, 161, 1418, 2377, 0, 0, -1 },
+ { 0x1, 0x1, 161, 1419, -1, 29, 1, 50 },
+ { 0x0, 0x0, 162, -1, 2339, 0, 0, -1 },
+ { 0x1, 0x9, 162, -1, 2343, 33, 1, 55 },
+ { 0x1, 0x9, 162, -1, 2999, 33, 1, 55 },
+ { 0x6, 0x7, 162, -1, 2384, 27, 1, 50 },
+ { 0x0, 0x0, 163, 1401, 2337, 0, 0, -1 },
+ { 0x0, 0x0, 163, 1402, 2341, 0, 1, 55 },
+ { 0x0, 0x0, 163, 1403, 2998, 0, 1, 55 },
+ { 0x1, 0x1, 163, 1404, 2383, 29, 1, 50 },
+ { 0x1, 0x1, 164, 1422, -1, 27, 1, 34 },
+ { 0x0, 0x0, 165, 2193, 2325, 0, 0, -1 },
+ { 0x1, 0x1, 165, 2194, 2333, 33, 1, 55 },
+ { 0x1, 0x1, 165, 2195, 2992, 33, 1, 55 },
+ { 0x0, 0x0, 165, 2196, 2379, 0, 0, -1 },
+ { 0x3, 0x3, 165, 2197, -1, 28, 1, 50 },
+ { 0x0, 0x0, 166, 1410, 2323, 0, 0, -1 },
+ { 0x1, 0x1, 166, 1411, 2331, 36, 1, 55 },
+ { 0x1, 0x1, 166, 1412, 2991, 36, 1, 55 },
+ { 0x0, 0x0, 166, 1413, 2378, 0, 0, -1 },
+ { 0x5, 0x5, 166, 1414, -1, 27, 1, 50 },
+ { 0x0, 0x0, 167, -1, 2962, 0, 1, 64 },
+ { 0x0, 0x0, 167, -1, 2963, 0, 1, 64 },
+ { 0x1, 0x1, 169, -1, -1, 28, 1, 34 },
+ { 0x1, 0x1, 170, 2779, -1, 27, 1, 34 },
+ { 0x1, 0x1, 170, 2780, -1, 27, 1, 34 },
+ { 0x1, 0x1, 171, 1703, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1704, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1705, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1706, -1, 28, 1, 142 },
+ { 0x1, 0x1, 171, 1707, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1708, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1709, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1710, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1711, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1712, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1713, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1714, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1715, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1716, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1717, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1718, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1719, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1720, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1721, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1722, -1, 28, 1, 141 },
+ { 0x1, 0x1, 171, 1723, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1724, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1725, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1726, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1727, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1728, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1729, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1730, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1731, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1732, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1733, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1734, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1735, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1736, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1737, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1738, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1739, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1740, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1741, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1742, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1743, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1744, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1745, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1746, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1747, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1748, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1749, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1750, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1751, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1752, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1753, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1754, -1, 28, 1, 132 },
+ { 0x1, 0x1, 171, 1755, -1, 28, 1, 132 },
+ { 0x1, 0x1, 171, 1756, -1, 28, 1, 132 },
+ { 0x1, 0x1, 171, 1757, -1, 28, 1, 132 },
+ { 0x1, 0x1, 171, 1758, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1759, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1760, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1761, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1762, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1763, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1764, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1765, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1766, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1767, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1768, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1769, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1770, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1771, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1772, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1773, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1774, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1775, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1776, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1777, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1778, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1779, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1780, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1781, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1782, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1783, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1784, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1785, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1786, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1787, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1788, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1789, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1790, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1791, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1792, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1793, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1794, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1795, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1796, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1797, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1798, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1799, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1800, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1801, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1802, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1803, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1804, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1805, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1806, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1807, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1808, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1809, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1810, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1811, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1812, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1813, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1814, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1815, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1816, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1817, -1, 28, 1, 136 },
+ { 0x1, 0x1, 171, 1818, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1819, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1820, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1821, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1822, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1823, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1824, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1825, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1826, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1827, -1, 28, 1, 136 },
+ { 0x1, 0x1, 171, 1828, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1829, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1830, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1831, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1832, -1, 28, 1, 133 },
+ { 0x1, 0x1, 171, 1833, -1, 28, 1, 134 },
+ { 0x1, 0x1, 171, 1834, -1, 28, 1, 135 },
+ { 0x1, 0x1, 171, 1835, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1836, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1837, -1, 28, 1, 136 },
+ { 0x1, 0x1, 171, 1838, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1839, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1840, -1, 28, 1, 137 },
+ { 0x1, 0x1, 171, 1841, -1, 28, 1, 131 },
+ { 0x1, 0x1, 171, 1842, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1843, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1844, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1845, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1846, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1847, -1, 28, 1, 150 },
+ { 0x1, 0x1, 171, 1848, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1849, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1850, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1851, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1852, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1853, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1854, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1855, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1856, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1857, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1858, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1859, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1860, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1861, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1862, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1863, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1864, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1865, -1, 28, 1, 150 },
+ { 0x1, 0x1, 171, 1866, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1867, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1868, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1869, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1870, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1871, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1872, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1873, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1874, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1875, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1876, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1877, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1878, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1879, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1880, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1881, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1882, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1883, -1, 28, 1, 150 },
+ { 0x1, 0x1, 171, 1884, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1885, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1886, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1887, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1888, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1889, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1890, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1891, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1892, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1893, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1894, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1895, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1896, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1897, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1898, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1899, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1900, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1901, -1, 28, 1, 150 },
+ { 0x1, 0x1, 171, 1902, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1903, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1904, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1905, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1906, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1907, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1908, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1909, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1910, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1911, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1912, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1913, -1, 28, 1, 150 },
+ { 0x1, 0x1, 171, 1914, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1915, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1916, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1917, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1918, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1919, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1920, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1921, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1922, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1923, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1924, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1925, -1, 28, 1, 150 },
+ { 0x1, 0x1, 171, 1926, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1927, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1928, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1929, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1930, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1931, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1932, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1933, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1934, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1935, -1, 28, 1, 148 },
+ { 0x1, 0x1, 171, 1936, -1, 28, 1, 149 },
+ { 0x1, 0x1, 171, 1937, -1, 28, 1, 150 },
+ { 0x1, 0x1, 171, 1938, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1939, -1, 28, 1, 151 },
+ { 0x1, 0x1, 171, 1940, -1, 28, 1, 147 },
+ { 0x1, 0x1, 171, 1941, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1942, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1943, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1944, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1945, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1946, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1947, -1, 28, 1, 153 },
+ { 0x1, 0x1, 171, 1948, -1, 28, 1, 154 },
+ { 0x1, 0x1, 171, 1949, -1, 28, 1, 155 },
+ { 0x1, 0x1, 171, 1950, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1951, -1, 28, 1, 156 },
+ { 0x1, 0x1, 171, 1952, -1, 28, 1, 152 },
+ { 0x1, 0x1, 171, 1691, -1, 28, 1, 158 },
+ { 0x1, 0x1, 171, 1692, -1, 28, 1, 158 },
+ { 0x1, 0x1, 171, 1693, -1, 28, 1, 158 },
+ { 0x1, 0x1, 171, 1694, -1, 28, 1, 158 },
+ { 0x1, 0x1, 171, 1695, -1, 28, 1, 159 },
+ { 0x1, 0x1, 171, 1696, -1, 28, 1, 159 },
+ { 0x1, 0x1, 171, 1697, -1, 28, 1, 159 },
+ { 0x1, 0x1, 171, 1698, -1, 28, 1, 159 },
+ { 0x1, 0x1, 171, 1699, -1, 28, 1, 159 },
+ { 0x1, 0x1, 171, 1700, -1, 28, 1, 159 },
+ { 0x1, 0x1, 171, 1701, -1, 28, 1, 159 },
+ { 0x1, 0x1, 171, 1702, -1, 28, 1, 159 },
+ { 0x1, 0x1, 171, 1997, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1998, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 1999, -1, 28, 1, 143 },
+ { 0x1, 0x1, 171, 2000, -1, 28, 1, 143 },
+ { 0x1, 0x1, 172, 1953, -1, 29, 1, 158 },
+ { 0x1, 0x1, 172, 1954, -1, 29, 1, 158 },
+ { 0x1, 0x1, 172, 1955, -1, 29, 1, 158 },
+ { 0x1, 0x1, 172, 1956, -1, 29, 1, 158 },
+ { 0x1, 0x1, 172, 1957, -1, 29, 1, 159 },
+ { 0x1, 0x1, 172, 1958, -1, 29, 1, 159 },
+ { 0x1, 0x1, 172, 1959, -1, 29, 1, 159 },
+ { 0x1, 0x1, 172, 1960, -1, 29, 1, 159 },
+ { 0x1, 0x1, 172, 1961, -1, 29, 1, 159 },
+ { 0x1, 0x1, 172, 1962, -1, 29, 1, 159 },
+ { 0x1, 0x1, 172, 1963, -1, 29, 1, 159 },
+ { 0x1, 0x1, 172, 1964, -1, 29, 1, 159 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1902, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1903, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1904, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1905, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1906, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1907, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1908, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1909, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1910, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1911, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1912, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1913, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1914, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1915, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1916, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1917, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1918, -1, 28, 1, 140 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 142 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 141 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 144 },
- { 0x3, 0x3, 173, 1919, -1, 28, 1, 140 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
- { 0x3, 0x3, 173, 803, -1, 28, 1, 147 },
- { 0x3, 0x3, 173, 804, -1, 28, 1, 146 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
- { 0x3, 0x3, 173, 805, -1, 28, 1, 149 },
- { 0x3, 0x3, 173, 806, -1, 28, 1, 148 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
- { 0x3, 0x3, 173, 807, -1, 28, 1, 149 },
- { 0x3, 0x3, 173, 808, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
- { 0x3, 0x3, 173, 1857, -1, 28, 1, 131 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
- { 0x3, 0x3, 173, 1858, -1, 28, 1, 138 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 271, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2258, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 273, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2259, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 275, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2260, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 132 },
+ { 0x3, 0x3, 173, 277, -1, 28, 1, 132 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 132 },
- { 0x3, 0x3, 173, 1859, -1, 28, 1, 132 },
+ { 0x3, 0x3, 173, 278, -1, 28, 1, 132 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
- { 0x3, 0x3, 173, 1860, -1, 28, 1, 131 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
- { 0x3, 0x3, 173, 1861, -1, 28, 1, 138 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
- { 0x3, 0x3, 173, 1862, -1, 28, 1, 131 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
- { 0x3, 0x3, 173, 1863, -1, 28, 1, 138 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 279, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2261, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 281, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2262, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 283, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2263, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 285, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2264, -1, 28, 1, 131 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
- { 0x3, 0x3, 173, 1864, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 287, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2265, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 289, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2266, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 291, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2267, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 293, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2268, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 133 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 134 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 135 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 295, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 137 },
+ { 0x3, 0x3, 173, 2269, -1, 28, 1, 131 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, 2270, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2271, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2272, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, 2273, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2274, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2275, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, 2276, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2277, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2278, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, 2279, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2280, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, 2281, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2282, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, 2283, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2284, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 148 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 149 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 150 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 151 },
+ { 0x3, 0x3, 173, 2285, -1, 28, 1, 147 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2286, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 153 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 154 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 155 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 156 },
+ { 0x3, 0x3, 173, 2287, -1, 28, 1, 152 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 158 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 158 },
+ { 0x3, 0x3, 173, 951, -1, 28, 1, 158 },
+ { 0x3, 0x3, 173, 952, -1, 28, 1, 158 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 159 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 159 },
+ { 0x3, 0x3, 173, 953, -1, 28, 1, 159 },
+ { 0x3, 0x3, 173, 954, -1, 28, 1, 159 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 159 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 159 },
+ { 0x3, 0x3, 173, 955, -1, 28, 1, 159 },
+ { 0x3, 0x3, 173, 956, -1, 28, 1, 159 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 139 },
- { 0x3, 0x3, 173, 1865, -1, 28, 1, 138 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, 2224, -1, 28, 1, 138 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, 2225, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 139 },
+ { 0x3, 0x3, 173, 2226, -1, 28, 1, 139 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 139 },
+ { 0x3, 0x3, 173, 2227, -1, 28, 1, 139 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
+ { 0x3, 0x3, 173, 2228, -1, 28, 1, 138 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, 2229, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
+ { 0x3, 0x3, 173, 2230, -1, 28, 1, 138 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, 2231, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 138 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 140 },
+ { 0x3, 0x3, 173, 2232, -1, 28, 1, 138 },
{ 0x3, 0x3, 173, -1, -1, 28, 1, 145 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
- { 0x3, 0x3, 173, -1, -1, 28, 1, 136 },
- { 0x0, 0x0, 174, -1, 335, 0, 0, -1 },
- { 0x0, 0x0, 174, 2514, 2483, 0, 1, 1 },
- { 0x0, 0x0, 174, -1, 339, 0, 0, -1 },
- { 0x0, 0x0, 174, 2516, 2485, 0, 1, 1 },
- { 0x11, 0x31, 175, 2417, 342, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 343, 12, 1, 4 },
- { 0x1, 0x1, 175, -1, 346, 37, 1, 4 },
- { 0x2000001, 0x2000001, 175, -1, 347, 12, 1, 4 },
- { 0x11, 0x11, 175, -1, 348, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 349, 12, 1, 4 },
- { 0x1, 0x1, 175, 1778, 350, 37, 1, 4 },
- { 0x2000001, 0x2000001, 175, -1, 352, 12, 1, 4 },
- { 0x11, 0x11, 175, 1780, 354, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 356, 12, 1, 4 },
- { 0x11, 0x31, 175, 2427, 362, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 363, 12, 1, 4 },
- { 0x11, 0x31, 175, 2437, 366, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 367, 12, 1, 4 },
- { 0x1, 0x1, 175, -1, 370, 37, 1, 4 },
- { 0x2000001, 0x2000001, 175, -1, 371, 12, 1, 4 },
- { 0x11, 0x11, 175, -1, 372, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 373, 12, 1, 4 },
- { 0x1, 0x1, 175, 1802, 374, 37, 1, 4 },
- { 0x2000001, 0x2000001, 175, -1, 376, 12, 1, 4 },
- { 0x11, 0x11, 175, 1804, 378, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 380, 12, 1, 4 },
- { 0x11, 0x31, 175, 2447, 386, 33, 1, 4 },
- { 0x2200001, 0x2200001, 175, -1, 387, 12, 1, 4 },
- { 0x1, 0x1, 175, -1, 390, 33, 1, 4 },
- { 0x200001, 0x200001, 175, -1, 391, 12, 1, 4 },
- { 0x1, 0x1, 175, -1, 394, 33, 1, 4 },
- { 0x200001, 0x200001, 175, -1, 395, 12, 1, 4 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 146 },
+ { 0x3, 0x3, 173, 2233, -1, 28, 1, 145 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 157 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 161 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 157 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 161 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 157 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 161 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 157 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 161 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 157 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 161 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
+ { 0x3, 0x3, 173, -1, -1, 28, 1, 143 },
+ { 0x0, 0x0, 174, -1, 394, 0, 0, -1 },
+ { 0x0, 0x0, 174, -1, 396, 0, 0, -1 },
+ { 0x0, 0x0, 174, 3042, 3002, 0, 1, 1 },
+ { 0x0, 0x0, 174, 3043, 3003, 0, 1, 1 },
+ { 0x0, 0x0, 174, -1, 402, 0, 0, -1 },
+ { 0x0, 0x0, 174, -1, 404, 0, 0, -1 },
+ { 0x0, 0x0, 174, 3046, 3006, 0, 1, 76 },
+ { 0x0, 0x0, 174, 3047, 3007, 0, 1, 76 },
+ { 0x0, 0x0, 174, -1, 410, 0, 0, -1 },
+ { 0x0, 0x0, 174, -1, 412, 0, 0, -1 },
+ { 0x0, 0x0, 174, 3050, 3010, 0, 1, 1 },
+ { 0x0, 0x0, 174, 3051, 3011, 0, 1, 1 },
+ { 0x11, 0x31, 175, 2881, 417, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 418, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2073, 419, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 421, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 425, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 426, 12, 1, 4 },
+ { 0x11, 0x11, 175, -1, 427, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 428, 12, 1, 4 },
+ { 0x1, 0x1, 175, 2079, 429, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 431, 12, 1, 4 },
+ { 0x11, 0x11, 175, 2081, 433, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 435, 12, 1, 4 },
+ { 0x1, 0x1, 175, 2083, 437, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 439, 12, 1, 4 },
+ { 0x11, 0x11, 175, 2085, 441, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 443, 12, 1, 4 },
+ { 0x1, 0x1, 175, 2087, 445, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 447, 12, 1, 4 },
+ { 0x11, 0x11, 175, 2089, 449, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 451, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2901, 457, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 458, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2095, 459, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 461, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2921, 465, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 466, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2121, 467, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 469, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 473, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 474, 12, 1, 4 },
+ { 0x11, 0x11, 175, -1, 475, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 476, 12, 1, 4 },
+ { 0x1, 0x1, 175, 2127, 477, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 479, 12, 1, 4 },
+ { 0x11, 0x11, 175, 2129, 481, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 483, 12, 1, 4 },
+ { 0x1, 0x1, 175, 2131, 485, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 487, 12, 1, 4 },
+ { 0x11, 0x11, 175, 2133, 489, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 491, 12, 1, 4 },
+ { 0x1, 0x1, 175, 2135, 493, 37, 1, 4 },
+ { 0x2000001, 0x2000001, 175, -1, 495, 12, 1, 4 },
+ { 0x11, 0x11, 175, 2137, 497, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 499, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2941, 505, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 506, 12, 1, 4 },
+ { 0x11, 0x31, 175, 2143, 507, 33, 1, 4 },
+ { 0x2200001, 0x2200001, 175, -1, 509, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 513, 33, 1, 4 },
+ { 0x200001, 0x200001, 175, -1, 514, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 515, 33, 1, 4 },
+ { 0x200001, 0x200001, 175, -1, 516, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 521, 33, 1, 79 },
+ { 0x200001, 0x200001, 175, -1, 522, 12, 1, 79 },
+ { 0x1, 0x1, 175, -1, 523, 33, 1, 79 },
+ { 0x200001, 0x200001, 175, -1, 524, 12, 1, 79 },
+ { 0x1, 0x1, 175, -1, 529, 33, 1, 4 },
+ { 0x200001, 0x200001, 175, -1, 530, 12, 1, 4 },
+ { 0x1, 0x1, 175, -1, 531, 33, 1, 4 },
+ { 0x200001, 0x200001, 175, -1, 532, 12, 1, 4 },
+ { 0x2200001, 0x6200001, 176, 2884, -1, 12, 1, 4 },
+ { 0x11, 0x11, 176, 2016, -1, 33, 1, 4 },
+ { 0x1, 0x1, 176, -1, -1, 33, 1, 5 },
+ { 0x4200001, 0x4200001, 176, -1, -1, 12, 1, 5 },
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
- { 0x1, 0x1, 176, 1755, -1, 37, 1, 4 },
+ { 0x1, 0x1, 176, 2022, -1, 37, 1, 4 },
+ { 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
+ { 0x11, 0x11, 176, 2024, -1, 33, 1, 4 },
+ { 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
+ { 0x1, 0x1, 176, 2026, -1, 37, 1, 4 },
+ { 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
+ { 0x11, 0x11, 176, 2028, -1, 33, 1, 4 },
+ { 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
+ { 0x1, 0x1, 176, 2030, -1, 37, 1, 4 },
{ 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
- { 0x11, 0x11, 176, 1757, -1, 33, 1, 4 },
+ { 0x11, 0x11, 176, 2032, -1, 33, 1, 4 },
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x11, 0x11, 176, -1, -1, 33, 1, 4 },
{ 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
+ { 0x2200001, 0x6200001, 176, 2904, -1, 12, 1, 4 },
+ { 0x11, 0x11, 176, 2036, -1, 33, 1, 4 },
+ { 0x1, 0x1, 176, -1, -1, 33, 1, 5 },
+ { 0x4200001, 0x4200001, 176, -1, -1, 12, 1, 5 },
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x0, 0x0, 176, -1, -1, 0, 1, 5 },
@@ -3550,16 +4025,40 @@ completer_table[] = {
{ 0x200001, 0x200001, 176, -1, -1, 12, 1, 5 },
{ 0x0, 0x0, 176, -1, -1, 0, 1, 5 },
{ 0x1, 0x1, 176, -1, -1, 12, 1, 5 },
+ { 0x1, 0x1, 176, -1, -1, 33, 1, 5 },
+ { 0x200001, 0x200001, 176, -1, -1, 12, 1, 5 },
+ { 0x0, 0x0, 176, -1, -1, 0, 1, 5 },
+ { 0x1, 0x1, 176, -1, -1, 12, 1, 5 },
+ { 0x1, 0x1, 176, -1, -1, 33, 1, 5 },
+ { 0x200001, 0x200001, 176, -1, -1, 12, 1, 5 },
+ { 0x0, 0x0, 176, -1, -1, 0, 1, 5 },
+ { 0x1, 0x1, 176, -1, -1, 12, 1, 5 },
+ { 0x2200001, 0x6200001, 176, 2924, -1, 12, 1, 4 },
+ { 0x11, 0x11, 176, 2040, -1, 33, 1, 4 },
+ { 0x1, 0x1, 176, -1, -1, 33, 1, 5 },
+ { 0x4200001, 0x4200001, 176, -1, -1, 12, 1, 5 },
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
- { 0x1, 0x1, 176, 1767, -1, 37, 1, 4 },
+ { 0x1, 0x1, 176, 2046, -1, 37, 1, 4 },
{ 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
- { 0x11, 0x11, 176, 1769, -1, 33, 1, 4 },
+ { 0x11, 0x11, 176, 2048, -1, 33, 1, 4 },
+ { 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
+ { 0x1, 0x1, 176, 2050, -1, 37, 1, 4 },
+ { 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
+ { 0x11, 0x11, 176, 2052, -1, 33, 1, 4 },
+ { 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
+ { 0x1, 0x1, 176, 2054, -1, 37, 1, 4 },
+ { 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
+ { 0x11, 0x11, 176, 2056, -1, 33, 1, 4 },
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x11, 0x11, 176, -1, -1, 33, 1, 4 },
{ 0x2200001, 0x2200001, 176, -1, -1, 12, 1, 4 },
+ { 0x2200001, 0x6200001, 176, 2943, -1, 12, 1, 4 },
+ { 0x11, 0x11, 176, 2060, -1, 33, 1, 4 },
+ { 0x1, 0x1, 176, -1, -1, 33, 1, 5 },
+ { 0x4200001, 0x4200001, 176, -1, -1, 12, 1, 5 },
{ 0x1, 0x1, 176, -1, -1, 37, 1, 4 },
{ 0x2000001, 0x2000001, 176, -1, -1, 12, 1, 4 },
{ 0x0, 0x0, 176, -1, -1, 0, 1, 5 },
@@ -3574,3989 +4073,4702 @@ completer_table[] = {
{ 0x200001, 0x200001, 176, -1, -1, 12, 1, 5 },
{ 0x0, 0x0, 176, -1, -1, 0, 1, 5 },
{ 0x1, 0x1, 176, -1, -1, 12, 1, 5 },
+ { 0x1, 0x1, 176, -1, -1, 33, 1, 5 },
+ { 0x200001, 0x200001, 176, -1, -1, 12, 1, 5 },
+ { 0x0, 0x0, 176, -1, -1, 0, 1, 5 },
+ { 0x1, 0x1, 176, -1, -1, 12, 1, 5 },
+ { 0x1, 0x1, 176, -1, -1, 33, 1, 5 },
+ { 0x200001, 0x200001, 176, -1, -1, 12, 1, 5 },
+ { 0x0, 0x0, 176, -1, -1, 0, 1, 5 },
+ { 0x1, 0x1, 176, -1, -1, 12, 1, 5 },
+ { 0x9, 0x9, 176, -1, -1, 33, 1, 5 },
+ { 0x1, 0x1, 176, 397, -1, 33, 1, 4 },
+ { 0x1200001, 0x1200001, 176, -1, -1, 12, 1, 5 },
+ { 0x200001, 0x200001, 176, 398, -1, 12, 1, 4 },
{ 0x9, 0x9, 176, -1, -1, 33, 1, 5 },
- { 0x1, 0x1, 176, 336, -1, 33, 1, 4 },
+ { 0x1, 0x1, 176, 399, -1, 33, 1, 4 },
{ 0x1200001, 0x1200001, 176, -1, -1, 12, 1, 5 },
- { 0x200001, 0x200001, 176, 337, -1, 12, 1, 4 },
+ { 0x200001, 0x200001, 176, 400, -1, 12, 1, 4 },
+ { 0x9, 0x9, 176, -1, -1, 33, 1, 80 },
+ { 0x1, 0x1, 176, 405, -1, 33, 1, 79 },
+ { 0x1200001, 0x1200001, 176, -1, -1, 12, 1, 80 },
+ { 0x200001, 0x200001, 176, 406, -1, 12, 1, 79 },
+ { 0x9, 0x9, 176, -1, -1, 33, 1, 80 },
+ { 0x1, 0x1, 176, 407, -1, 33, 1, 79 },
+ { 0x1200001, 0x1200001, 176, -1, -1, 12, 1, 80 },
+ { 0x200001, 0x200001, 176, 408, -1, 12, 1, 79 },
{ 0x9, 0x9, 176, -1, -1, 33, 1, 5 },
- { 0x1, 0x1, 176, 340, -1, 33, 1, 4 },
+ { 0x1, 0x1, 176, 413, -1, 33, 1, 4 },
{ 0x1200001, 0x1200001, 176, -1, -1, 12, 1, 5 },
- { 0x200001, 0x200001, 176, 341, -1, 12, 1, 4 },
- { 0x0, 0x0, 177, -1, 1947, 0, 0, -1 },
- { 0x9, 0x9, 177, -1, 2477, 33, 1, 49 },
- { 0x0, 0x0, 177, -1, 1988, 0, 0, -1 },
- { 0x7, 0x7, 177, -1, -1, 27, 1, 49 },
+ { 0x200001, 0x200001, 176, 414, -1, 12, 1, 4 },
+ { 0x9, 0x9, 176, -1, -1, 33, 1, 5 },
+ { 0x1, 0x1, 176, 415, -1, 33, 1, 4 },
+ { 0x1200001, 0x1200001, 176, -1, -1, 12, 1, 5 },
+ { 0x200001, 0x200001, 176, 416, -1, 12, 1, 4 },
+ { 0x0, 0x0, 177, -1, 2327, 0, 0, -1 },
+ { 0x9, 0x9, 177, -1, 2335, 33, 1, 50 },
+ { 0x9, 0x9, 177, -1, 2993, 33, 1, 50 },
+ { 0x0, 0x0, 177, -1, 2380, 0, 0, -1 },
+ { 0x7, 0x7, 177, -1, -1, 27, 1, 50 },
{ 0x1, 0x1, 197, -1, -1, 27, 1, 10 },
{ 0x1, 0x1, 211, -1, -1, 29, 1, 0 },
{ 0x1, 0x1, 211, -1, -1, 29, 1, 0 },
- { 0x2, 0x3, 211, 987, -1, 27, 1, 33 },
- { 0x0, 0x0, 211, 988, -1, 0, 1, 33 },
- { 0x0, 0x0, 211, 989, -1, 0, 1, 0 },
- { 0x0, 0x0, 211, 990, -1, 0, 1, 0 },
- { 0x0, 0x0, 211, 991, -1, 0, 1, 0 },
- { 0x0, 0x0, 211, 992, -1, 0, 1, 0 },
- { 0x0, 0x0, 211, 2499, -1, 0, 1, 93 },
- { 0x0, 0x0, 211, 2500, -1, 0, 1, 93 },
- { 0x0, 0x0, 211, 2501, 819, 0, 0, -1 },
+ { 0x2, 0x3, 211, 1169, -1, 27, 1, 34 },
+ { 0x0, 0x0, 211, 1170, -1, 0, 1, 34 },
+ { 0x0, 0x0, 211, 1171, -1, 0, 1, 0 },
+ { 0x0, 0x0, 211, 1172, -1, 0, 1, 0 },
+ { 0x0, 0x0, 211, 1173, -1, 0, 1, 0 },
+ { 0x0, 0x0, 211, 1174, -1, 0, 1, 0 },
+ { 0x0, 0x0, 211, 3026, -1, 0, 1, 100 },
+ { 0x0, 0x0, 211, 3027, -1, 0, 1, 100 },
+ { 0x0, 0x0, 211, 3028, 967, 0, 0, -1 },
{ 0x1, 0x1, 212, -1, -1, 27, 1, 0 },
{ 0x1, 0x1, 212, -1, -1, 27, 1, 0 },
- { 0x1, 0x1, 213, -1, 1195, 32, 1, 135 },
- { 0x1, 0x1, 213, -1, 1197, 32, 1, 134 },
- { 0x1, 0x1, 213, -1, 1199, 32, 1, 134 },
- { 0x1, 0x1, 213, -1, 1201, 32, 1, 134 },
- { 0x1, 0x1, 213, -1, 1203, 32, 1, 134 },
- { 0x1, 0x1, 213, -1, 1205, 32, 1, 136 },
- { 0x1, 0x1, 213, -1, 1207, 32, 1, 136 },
- { 0x1, 0x1, 213, -1, 1710, 32, 1, 131 },
- { 0x1, 0x1, 213, -1, 1712, 32, 1, 138 },
- { 0x1, 0x1, 213, -1, 1714, 32, 1, 132 },
- { 0x1, 0x1, 213, -1, 1716, 32, 1, 131 },
- { 0x1, 0x1, 213, -1, 1718, 32, 1, 138 },
- { 0x1, 0x1, 213, -1, 1720, 32, 1, 131 },
- { 0x1, 0x1, 213, -1, 1722, 32, 1, 138 },
- { 0x1, 0x1, 213, 2319, 1724, 32, 1, 131 },
- { 0x1, 0x1, 213, 2320, 1727, 32, 1, 138 },
- { 0x0, 0x0, 214, -1, 2361, 0, 0, -1 },
- { 0x0, 0x0, 214, -1, 2362, 0, 0, -1 },
- { 0x0, 0x0, 214, -1, 2387, 0, 0, -1 },
- { 0x5, 0x5, 214, -1, 2390, 20, 1, 67 },
- { 0x0, 0x0, 218, 1847, 818, 0, 0, -1 },
- { 0x0, 0x0, 219, -1, 957, 0, 0, -1 },
- { 0x0, 0x0, 219, -1, 1048, 0, 0, -1 },
- { 0x0, 0x0, 219, -1, -1, 0, 1, 121 },
- { 0x0, 0x0, 219, -1, -1, 0, 1, 66 },
- { 0x1, 0x1, 219, 694, 1921, 36, 1, 65 },
- { 0x1, 0x1, 219, 695, 1956, 36, 1, 65 },
- { 0x0, 0x0, 219, 696, 1959, 0, 0, -1 },
- { 0x1, 0x1, 219, 697, -1, 36, 1, 65 },
- { 0x0, 0x0, 219, 1192, -1, 0, 1, 33 },
- { 0x1, 0x1, 219, 698, 1964, 36, 1, 65 },
- { 0x0, 0x0, 219, 699, 1967, 0, 0, -1 },
- { 0x1, 0x1, 219, 700, -1, 36, 1, 65 },
- { 0x0, 0x0, 219, 701, 1970, 0, 0, -1 },
- { 0x1, 0x1, 219, 702, -1, 36, 1, 65 },
- { 0x1, 0x1, 219, 703, 1973, 36, 1, 65 },
- { 0x1, 0x1, 219, 704, 1976, 36, 1, 65 },
- { 0x0, 0x0, 219, 1193, -1, 0, 1, 33 },
- { 0x1, 0x1, 219, 705, 2009, 36, 1, 65 },
- { 0x1, 0x1, 219, 706, -1, 31, 1, 137 },
- { 0x1, 0x1, 219, 223, 1208, 32, 1, 126 },
- { 0x1, 0x1, 219, 224, 1217, 32, 1, 126 },
- { 0x1, 0x1, 219, 225, 1226, 32, 1, 126 },
- { 0x1, 0x1, 219, 226, 1237, 32, 1, 126 },
- { 0x1, 0x1, 219, 227, 1246, 32, 1, 126 },
- { 0x1, 0x1, 219, 228, 1255, 32, 1, 126 },
- { 0x1, 0x1, 219, 229, 1264, 32, 1, 126 },
- { 0x1, 0x1, 219, 230, 1273, 32, 1, 126 },
- { 0x1, 0x1, 219, 231, 1282, 32, 1, 126 },
- { 0x1, 0x1, 219, 232, 1291, 32, 1, 126 },
- { 0x1, 0x1, 219, 233, 1301, 32, 1, 126 },
- { 0x1, 0x1, 219, 234, 1311, 32, 1, 126 },
- { 0x1, 0x1, 219, 235, 1324, 32, 1, 141 },
- { 0x1, 0x1, 219, 236, 1330, 32, 1, 141 },
- { 0x1, 0x1, 219, 237, 1336, 32, 1, 141 },
- { 0x1, 0x1, 219, 238, 1342, 32, 1, 141 },
- { 0x1, 0x1, 219, 239, 1348, 32, 1, 141 },
- { 0x1, 0x1, 219, 240, 1354, 32, 1, 141 },
- { 0x1, 0x1, 219, 241, 1360, 32, 1, 141 },
- { 0x1, 0x1, 219, 242, 1366, 32, 1, 141 },
- { 0x1, 0x1, 219, 243, 1372, 32, 1, 141 },
- { 0x1, 0x1, 219, 244, 1378, 32, 1, 141 },
- { 0x1, 0x1, 219, 245, 1384, 32, 1, 141 },
- { 0x1, 0x1, 219, 246, 1390, 32, 1, 141 },
- { 0x1, 0x1, 219, 247, 1396, 32, 1, 141 },
- { 0x1, 0x1, 219, 248, 1402, 32, 1, 141 },
- { 0x1, 0x1, 219, 249, 1408, 32, 1, 141 },
- { 0x1, 0x1, 219, 250, 1414, 32, 1, 141 },
- { 0x1, 0x1, 219, 251, 1420, 32, 1, 141 },
- { 0x1, 0x1, 219, 252, 1426, 32, 1, 141 },
- { 0x1, 0x1, 219, 710, -1, 31, 1, 150 },
- { 0x0, 0x0, 220, 2012, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2013, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 24, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2015, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2016, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2017, -1, 0, 1, 44 },
- { 0x0, 0x0, 220, 2018, -1, 0, 1, 39 },
- { 0x1, 0x1, 220, 2019, -1, 12, 1, 58 },
- { 0x0, 0x0, 220, 2020, -1, 0, 1, 53 },
- { 0x1000001, 0x1000001, 220, 2021, -1, 12, 1, 58 },
- { 0x1, 0x1, 220, 2022, -1, 36, 1, 53 },
- { 0x200001, 0x200001, 220, 2023, -1, 12, 1, 58 },
- { 0x1, 0x1, 220, 2024, -1, 33, 1, 53 },
- { 0x1200001, 0x1200001, 220, 2025, -1, 12, 1, 48 },
- { 0x9, 0x9, 220, 2026, -1, 33, 1, 48 },
- { 0x1, 0x1, 220, 2027, -1, 12, 1, 58 },
- { 0x0, 0x0, 220, 2028, -1, 0, 1, 53 },
- { 0x200001, 0x1200001, 220, 2029, -1, 12, 1, 58 },
- { 0x1, 0x9, 220, 2030, -1, 33, 1, 53 },
- { 0x1, 0x1, 220, 2031, -1, 12, 1, 58 },
- { 0x0, 0x0, 220, 2032, -1, 0, 1, 53 },
- { 0x1000001, 0x1000001, 220, 2033, -1, 12, 1, 58 },
- { 0x1, 0x1, 220, 2034, -1, 36, 1, 53 },
- { 0x200001, 0x200001, 220, 2035, -1, 12, 1, 58 },
- { 0x1, 0x1, 220, 2036, -1, 33, 1, 53 },
- { 0x1200001, 0x1200001, 220, 2037, -1, 12, 1, 48 },
- { 0x9, 0x9, 220, 2038, -1, 33, 1, 48 },
- { 0x1, 0x1, 220, 2039, -1, 12, 1, 58 },
- { 0x0, 0x0, 220, 2040, -1, 0, 1, 53 },
- { 0x200001, 0x1200001, 220, 2041, -1, 12, 1, 58 },
- { 0x1, 0x9, 220, 2042, -1, 33, 1, 53 },
- { 0x1, 0x1, 220, 2043, -1, 28, 1, 28 },
- { 0x0, 0x0, 220, 2044, -1, 0, 1, 28 },
- { 0x3, 0x3, 220, 2045, -1, 27, 1, 28 },
- { 0x1, 0x1, 220, 2046, -1, 27, 1, 28 },
- { 0x0, 0x0, 220, 2047, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2048, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2049, -1, 0, 1, 28 },
- { 0x1, 0x1, 220, 2050, -1, 36, 1, 65 },
- { 0x1, 0x1, 220, 2051, -1, 37, 1, 28 },
- { 0x0, 0x0, 220, 2052, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2053, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2054, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2055, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2056, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 36, -1, 0, 1, 28 },
- { 0x1, 0x1, 220, 2058, -1, 36, 1, 65 },
- { 0x1, 0x1, 220, 2059, -1, 37, 1, 28 },
- { 0x0, 0x0, 220, 2060, -1, 0, 1, 28 },
- { 0x1, 0x1, 220, 2061, -1, 36, 1, 65 },
- { 0x1, 0x1, 220, 2062, -1, 37, 1, 28 },
- { 0x0, 0x0, 220, 2063, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2064, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2065, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 41, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2067, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2068, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 42, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2070, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2071, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2072, -1, 0, 1, 48 },
- { 0x1, 0x1, 220, 2073, -1, 27, 1, 48 },
- { 0x1, 0x1, 220, 2074, -1, 28, 1, 48 },
- { 0x3, 0x3, 220, 2075, -1, 27, 1, 48 },
- { 0x1, 0x1, 220, 2076, -1, 29, 1, 48 },
- { 0x5, 0x5, 220, 2077, -1, 27, 1, 48 },
- { 0x3, 0x3, 220, 2078, -1, 28, 1, 48 },
- { 0x7, 0x7, 220, 2079, -1, 27, 1, 48 },
- { 0x0, 0x0, 220, 2080, -1, 0, 1, 48 },
- { 0x0, 0x0, 220, 2081, -1, 0, 1, 48 },
- { 0x0, 0x0, 220, 2082, -1, 0, 1, 48 },
- { 0x0, 0x0, 220, 2083, -1, 0, 1, 48 },
- { 0x1, 0x1, 220, 2084, -1, 28, 1, 28 },
- { 0x0, 0x0, 220, 2085, -1, 0, 1, 28 },
- { 0x3, 0x3, 220, 2086, -1, 27, 1, 28 },
- { 0x1, 0x1, 220, 2087, -1, 27, 1, 28 },
- { 0x0, 0x0, 220, 2088, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2089, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2090, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 51, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2092, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2093, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 56, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 2095, -1, 0, 1, 23 },
- { 0x0, 0x0, 220, 2096, -1, 0, 1, 23 },
- { 0x0, 0x0, 220, 2097, -1, 0, 1, 23 },
- { 0x0, 0x0, 220, 2098, -1, 0, 1, 23 },
- { 0x0, 0x0, 220, 2099, -1, 0, 1, 34 },
- { 0x0, 0x0, 220, 2100, -1, 0, 1, 65 },
- { 0x0, 0x0, 220, 2101, -1, 0, 1, 28 },
- { 0x0, 0x0, 220, 63, -1, 0, 1, 28 },
- { 0x1, 0x1, 221, 2103, -1, 34, 1, 65 },
- { 0x1, 0x1, 221, 2104, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2105, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2106, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2107, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2108, -1, 34, 1, 45 },
- { 0x1, 0x1, 221, 2109, -1, 34, 1, 41 },
- { 0x400001, 0x400001, 221, 2110, -1, 12, 1, 60 },
- { 0x1, 0x1, 221, 2111, -1, 34, 1, 55 },
- { 0x1400001, 0x1400001, 221, 2112, -1, 12, 1, 60 },
- { 0x5, 0x5, 221, 2113, -1, 34, 1, 55 },
- { 0x600001, 0x600001, 221, 2114, -1, 12, 1, 60 },
- { 0x3, 0x3, 221, 2115, -1, 33, 1, 55 },
- { 0x1600001, 0x1600001, 221, 2116, -1, 12, 1, 50 },
- { 0xb, 0xb, 221, 2117, -1, 33, 1, 50 },
- { 0x400001, 0x400001, 221, 2118, -1, 12, 1, 60 },
- { 0x1, 0x1, 221, 2119, -1, 34, 1, 55 },
- { 0x600001, 0x1600001, 221, 2120, -1, 12, 1, 60 },
- { 0x3, 0xb, 221, 2121, -1, 33, 1, 55 },
- { 0x400001, 0x400001, 221, 2122, -1, 12, 1, 60 },
- { 0x1, 0x1, 221, 2123, -1, 34, 1, 55 },
- { 0x1400001, 0x1400001, 221, 2124, -1, 12, 1, 60 },
- { 0x5, 0x5, 221, 2125, -1, 34, 1, 55 },
- { 0x600001, 0x600001, 221, 2126, -1, 12, 1, 60 },
- { 0x3, 0x3, 221, 2127, -1, 33, 1, 55 },
- { 0x1600001, 0x1600001, 221, 2128, -1, 12, 1, 50 },
- { 0xb, 0xb, 221, 2129, -1, 33, 1, 50 },
- { 0x400001, 0x400001, 221, 2130, -1, 12, 1, 60 },
- { 0x1, 0x1, 221, 2131, -1, 34, 1, 55 },
- { 0x600001, 0x1600001, 221, 2132, -1, 12, 1, 60 },
- { 0x3, 0xb, 221, 2133, -1, 33, 1, 55 },
- { 0x41, 0x41, 221, 2134, -1, 28, 1, 30 },
- { 0x1, 0x1, 221, 2135, -1, 34, 1, 30 },
- { 0x83, 0x83, 221, 2136, -1, 27, 1, 30 },
- { 0x81, 0x81, 221, 2137, -1, 27, 1, 30 },
- { 0x1, 0x1, 221, 2138, -1, 34, 1, 65 },
- { 0x1, 0x1, 221, 2139, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2140, -1, 34, 1, 30 },
- { 0x5, 0x5, 221, 2141, -1, 34, 1, 65 },
- { 0x9, 0x9, 221, 2142, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2143, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2144, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2145, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2146, -1, 34, 1, 65 },
- { 0x1, 0x1, 221, 2147, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2148, -1, 34, 1, 30 },
- { 0x5, 0x5, 221, 2149, -1, 34, 1, 65 },
- { 0x9, 0x9, 221, 2150, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2151, -1, 34, 1, 30 },
- { 0x5, 0x5, 221, 2152, -1, 34, 1, 65 },
- { 0x9, 0x9, 221, 2153, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2154, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2155, -1, 34, 1, 65 },
- { 0x1, 0x1, 221, 2156, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2157, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2158, -1, 34, 1, 65 },
- { 0x1, 0x1, 221, 2159, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2160, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2161, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2162, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2163, -1, 34, 1, 50 },
- { 0x81, 0x81, 221, 2164, -1, 27, 1, 50 },
- { 0x41, 0x41, 221, 2165, -1, 28, 1, 50 },
- { 0x83, 0x83, 221, 2166, -1, 27, 1, 50 },
- { 0x21, 0x21, 221, 2167, -1, 29, 1, 50 },
- { 0x85, 0x85, 221, 2168, -1, 27, 1, 50 },
- { 0x43, 0x43, 221, 2169, -1, 28, 1, 50 },
- { 0x87, 0x87, 221, 2170, -1, 27, 1, 50 },
- { 0x1, 0x1, 221, 2171, -1, 34, 1, 50 },
- { 0x1, 0x1, 221, 2172, -1, 34, 1, 50 },
- { 0x1, 0x1, 221, 2173, -1, 34, 1, 50 },
- { 0x1, 0x1, 221, 2174, -1, 34, 1, 50 },
- { 0x41, 0x41, 221, 2175, -1, 28, 1, 30 },
- { 0x1, 0x1, 221, 2176, -1, 34, 1, 30 },
- { 0x83, 0x83, 221, 2177, -1, 27, 1, 30 },
- { 0x81, 0x81, 221, 2178, -1, 27, 1, 30 },
- { 0x1, 0x1, 221, 2179, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2180, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2181, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2182, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2183, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2184, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2185, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2186, -1, 34, 1, 25 },
- { 0x1, 0x1, 221, 2187, -1, 34, 1, 25 },
- { 0x1, 0x1, 221, 2188, -1, 34, 1, 25 },
- { 0x1, 0x1, 221, 2189, -1, 34, 1, 25 },
- { 0x1, 0x1, 221, 2190, -1, 34, 1, 36 },
- { 0x1, 0x1, 221, 2191, -1, 34, 1, 65 },
- { 0x1, 0x1, 221, 2192, -1, 34, 1, 30 },
- { 0x1, 0x1, 221, 2193, -1, 34, 1, 30 },
- { 0x1, 0x1, 222, 2194, -1, 35, 1, 65 },
- { 0x1, 0x1, 222, 2195, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2196, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2197, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2198, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2199, -1, 35, 1, 46 },
- { 0x1, 0x1, 222, 2200, -1, 35, 1, 42 },
- { 0x800001, 0x800001, 222, 2201, -1, 12, 1, 61 },
- { 0x1, 0x1, 222, 2202, -1, 35, 1, 56 },
- { 0x1800001, 0x1800001, 222, 2203, -1, 12, 1, 61 },
- { 0x3, 0x3, 222, 2204, -1, 35, 1, 56 },
- { 0xa00001, 0xa00001, 222, 2205, -1, 12, 1, 61 },
- { 0x5, 0x5, 222, 2206, -1, 33, 1, 56 },
- { 0x1a00001, 0x1a00001, 222, 2207, -1, 12, 1, 51 },
- { 0xd, 0xd, 222, 2208, -1, 33, 1, 51 },
- { 0x800001, 0x800001, 222, 2209, -1, 12, 1, 61 },
- { 0x1, 0x1, 222, 2210, -1, 35, 1, 56 },
- { 0xa00001, 0x1a00001, 222, 2211, -1, 12, 1, 61 },
- { 0x5, 0xd, 222, 2212, -1, 33, 1, 56 },
- { 0x800001, 0x800001, 222, 2213, -1, 12, 1, 61 },
- { 0x1, 0x1, 222, 2214, -1, 35, 1, 56 },
- { 0x1800001, 0x1800001, 222, 2215, -1, 12, 1, 61 },
- { 0x3, 0x3, 222, 2216, -1, 35, 1, 56 },
- { 0xa00001, 0xa00001, 222, 2217, -1, 12, 1, 61 },
- { 0x5, 0x5, 222, 2218, -1, 33, 1, 56 },
- { 0x1a00001, 0x1a00001, 222, 2219, -1, 12, 1, 51 },
- { 0xd, 0xd, 222, 2220, -1, 33, 1, 51 },
- { 0x800001, 0x800001, 222, 2221, -1, 12, 1, 61 },
- { 0x1, 0x1, 222, 2222, -1, 35, 1, 56 },
- { 0xa00001, 0x1a00001, 222, 2223, -1, 12, 1, 61 },
- { 0x5, 0xd, 222, 2224, -1, 33, 1, 56 },
- { 0x81, 0x81, 222, 2225, -1, 28, 1, 31 },
- { 0x1, 0x1, 222, 2226, -1, 35, 1, 31 },
- { 0x103, 0x103, 222, 2227, -1, 27, 1, 31 },
- { 0x101, 0x101, 222, 2228, -1, 27, 1, 31 },
- { 0x1, 0x1, 222, 2229, -1, 35, 1, 65 },
- { 0x1, 0x1, 222, 2230, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2231, -1, 35, 1, 31 },
- { 0x3, 0x3, 222, 2232, -1, 35, 1, 65 },
- { 0x5, 0x5, 222, 2233, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2234, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2235, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2236, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2237, -1, 35, 1, 65 },
- { 0x1, 0x1, 222, 2238, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2239, -1, 35, 1, 31 },
- { 0x3, 0x3, 222, 2240, -1, 35, 1, 65 },
- { 0x5, 0x5, 222, 2241, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2242, -1, 35, 1, 31 },
- { 0x3, 0x3, 222, 2243, -1, 35, 1, 65 },
- { 0x5, 0x5, 222, 2244, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2245, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2246, -1, 35, 1, 65 },
- { 0x1, 0x1, 222, 2247, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2248, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2249, -1, 35, 1, 65 },
- { 0x1, 0x1, 222, 2250, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2251, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2252, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2253, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2254, -1, 35, 1, 51 },
- { 0x101, 0x101, 222, 2255, -1, 27, 1, 51 },
- { 0x81, 0x81, 222, 2256, -1, 28, 1, 51 },
- { 0x103, 0x103, 222, 2257, -1, 27, 1, 51 },
- { 0x41, 0x41, 222, 2258, -1, 29, 1, 51 },
- { 0x105, 0x105, 222, 2259, -1, 27, 1, 51 },
- { 0x83, 0x83, 222, 2260, -1, 28, 1, 51 },
- { 0x107, 0x107, 222, 2261, -1, 27, 1, 51 },
- { 0x1, 0x1, 222, 2262, -1, 35, 1, 51 },
- { 0x1, 0x1, 222, 2263, -1, 35, 1, 51 },
- { 0x1, 0x1, 222, 2264, -1, 35, 1, 51 },
- { 0x1, 0x1, 222, 2265, -1, 35, 1, 51 },
- { 0x81, 0x81, 222, 2266, -1, 28, 1, 31 },
- { 0x1, 0x1, 222, 2267, -1, 35, 1, 31 },
- { 0x103, 0x103, 222, 2268, -1, 27, 1, 31 },
- { 0x101, 0x101, 222, 2269, -1, 27, 1, 31 },
- { 0x1, 0x1, 222, 2270, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2271, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2272, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2273, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2274, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2275, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2276, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2277, -1, 35, 1, 26 },
- { 0x1, 0x1, 222, 2278, -1, 35, 1, 26 },
- { 0x1, 0x1, 222, 2279, -1, 35, 1, 26 },
- { 0x1, 0x1, 222, 2280, -1, 35, 1, 26 },
- { 0x1, 0x1, 222, 2281, -1, 35, 1, 37 },
- { 0x1, 0x1, 222, 2282, -1, 35, 1, 65 },
- { 0x1, 0x1, 222, 2283, -1, 35, 1, 31 },
- { 0x1, 0x1, 222, 2284, -1, 35, 1, 31 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1875, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 47 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 43 },
- { 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 62 },
- { 0x3, 0x3, 223, 2458, -1, 34, 1, 57 },
- { 0x1c00001, 0x1c00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0x7, 223, 2459, -1, 34, 1, 57 },
- { 0xe00001, 0xe00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0x7, 223, 2460, -1, 33, 1, 57 },
- { 0x1e00001, 0x1e00001, 223, -1, -1, 12, 1, 52 },
- { 0xf, 0xf, 223, 2461, -1, 33, 1, 52 },
- { 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 62 },
- { 0x3, 0x3, 223, 2466, -1, 34, 1, 57 },
- { 0xe00001, 0x1e00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0xf, 223, 2467, -1, 33, 1, 57 },
- { 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 62 },
- { 0x3, 0x3, 223, 2470, -1, 34, 1, 57 },
- { 0x1c00001, 0x1c00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0x7, 223, 2471, -1, 34, 1, 57 },
- { 0xe00001, 0xe00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0x7, 223, 2472, -1, 33, 1, 57 },
- { 0x1e00001, 0x1e00001, 223, -1, -1, 12, 1, 52 },
- { 0xf, 0xf, 223, 2473, -1, 33, 1, 52 },
- { 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 62 },
- { 0x3, 0x3, 223, 2478, -1, 34, 1, 57 },
- { 0xe00001, 0x1e00001, 223, -1, -1, 12, 1, 62 },
- { 0x7, 0xf, 223, 2479, -1, 33, 1, 57 },
- { 0xc1, 0xc1, 223, -1, -1, 28, 1, 32 },
- { 0x3, 0x3, 223, 2398, -1, 34, 1, 32 },
- { 0x183, 0x183, 223, -1, -1, 27, 1, 32 },
- { 0x181, 0x181, 223, 2399, -1, 27, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1876, -1, 34, 1, 32 },
- { 0x7, 0x7, 223, -1, -1, 34, 1, 65 },
- { 0xb, 0xb, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1877, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1880, -1, 34, 1, 32 },
- { 0x7, 0x7, 223, -1, -1, 34, 1, 65 },
- { 0xb, 0xb, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1881, -1, 34, 1, 32 },
- { 0x7, 0x7, 223, -1, -1, 34, 1, 65 },
- { 0xb, 0xb, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1883, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1885, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1886, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 52 },
- { 0x181, 0x181, 223, -1, -1, 27, 1, 52 },
- { 0xc1, 0xc1, 223, -1, -1, 28, 1, 52 },
- { 0x183, 0x183, 223, -1, -1, 27, 1, 52 },
- { 0x61, 0x61, 223, -1, -1, 29, 1, 52 },
- { 0x185, 0x185, 223, -1, -1, 27, 1, 52 },
- { 0xc3, 0xc3, 223, -1, -1, 28, 1, 52 },
- { 0x187, 0x187, 223, -1, -1, 27, 1, 52 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 52 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 52 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 52 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 52 },
- { 0xc1, 0xc1, 223, -1, -1, 28, 1, 32 },
- { 0x3, 0x3, 223, 2402, -1, 34, 1, 32 },
- { 0x183, 0x183, 223, -1, -1, 27, 1, 32 },
- { 0x181, 0x181, 223, 2403, -1, 27, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 27 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 27 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 27 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 27 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 38 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 65 },
- { 0x3, 0x3, 223, -1, -1, 34, 1, 32 },
- { 0x3, 0x3, 223, 1888, -1, 34, 1, 32 },
- { 0x3, 0x3, 224, 401, 1210, 32, 1, 128 },
- { 0x3, 0x3, 224, 402, 1219, 32, 1, 128 },
- { 0x3, 0x3, 224, 403, 1228, 32, 1, 128 },
- { 0x3, 0x3, 224, 404, 1239, 32, 1, 128 },
- { 0x3, 0x3, 224, 405, 1248, 32, 1, 128 },
- { 0x3, 0x3, 224, 406, 1257, 32, 1, 128 },
- { 0x3, 0x3, 224, 407, 1266, 32, 1, 128 },
- { 0x3, 0x3, 224, 408, 1275, 32, 1, 128 },
- { 0x3, 0x3, 224, 409, 1284, 32, 1, 128 },
- { 0x3, 0x3, 224, 410, 1293, 32, 1, 128 },
- { 0x3, 0x3, 224, 411, 1303, 32, 1, 128 },
- { 0x3, 0x3, 224, 412, 1313, 32, 1, 128 },
- { 0x3, 0x3, 224, 425, 1326, 32, 1, 143 },
- { 0x3, 0x3, 224, 426, 1332, 32, 1, 143 },
- { 0x3, 0x3, 224, 427, 1338, 32, 1, 143 },
- { 0x3, 0x3, 224, 428, 1344, 32, 1, 143 },
- { 0x3, 0x3, 224, 429, 1350, 32, 1, 143 },
- { 0x3, 0x3, 224, 430, 1356, 32, 1, 143 },
- { 0x3, 0x3, 224, 431, 1362, 32, 1, 143 },
- { 0x3, 0x3, 224, 432, 1368, 32, 1, 143 },
- { 0x3, 0x3, 224, 433, 1374, 32, 1, 143 },
- { 0x3, 0x3, 224, 434, 1380, 32, 1, 143 },
- { 0x3, 0x3, 224, 435, 1386, 32, 1, 143 },
- { 0x3, 0x3, 224, 436, 1392, 32, 1, 143 },
- { 0x3, 0x3, 224, 437, 1398, 32, 1, 143 },
- { 0x3, 0x3, 224, 438, 1404, 32, 1, 143 },
- { 0x3, 0x3, 224, 439, 1410, 32, 1, 143 },
- { 0x3, 0x3, 224, 440, 1416, 32, 1, 143 },
- { 0x3, 0x3, 224, 441, 1422, 32, 1, 143 },
- { 0x3, 0x3, 224, 442, 1428, 32, 1, 143 },
- { 0x1, 0x1, 225, -1, -1, 28, 1, 33 },
- { 0x1, 0x1, 225, -1, -1, 28, 1, 33 },
- { 0x0, 0x0, 232, 810, -1, 0, 1, 137 },
- { 0x0, 0x0, 232, 811, -1, 0, 1, 150 },
- { 0x1, 0x1, 233, -1, 1725, 33, 1, 133 },
- { 0x1, 0x1, 233, -1, 1728, 33, 1, 139 },
- { 0x0, 0x0, 233, -1, 1730, 0, 1, 145 },
- { 0x0, 0x0, 233, -1, 1731, 0, 1, 145 },
- { 0x0, 0x0, 234, 744, 823, 0, 0, -1 },
- { 0x0, 0x0, 234, 745, 831, 0, 0, -1 },
- { 0x0, 0x0, 234, 746, 827, 0, 0, -1 },
- { 0x1, 0x1, 234, 747, 481, 33, 1, 6 },
- { 0x8000001, 0x8000001, 234, 748, 489, 6, 1, 7 },
- { 0x1, 0x1, 234, 749, 485, 33, 1, 6 },
- { 0x0, 0x0, 234, 750, 835, 0, 0, -1 },
- { 0x1, 0x1, 234, 751, 501, 33, 1, 8 },
- { 0x0, 0x0, 234, 752, 839, 0, 0, -1 },
- { 0x1, 0x1, 234, 753, 513, 33, 1, 15 },
- { 0x0, 0x0, 234, 754, 844, 0, 0, -1 },
- { 0x0, 0x0, 234, 755, 848, 0, 0, -1 },
- { 0x1, 0x1, 234, 756, 536, 33, 1, 17 },
- { 0x1, 0x1, 234, 757, 540, 33, 1, 17 },
- { 0x0, 0x0, 234, 758, 852, 0, 0, -1 },
- { 0x0, 0x0, 234, 759, 856, 0, 0, -1 },
- { 0x1, 0x1, 234, 760, 560, 33, 1, 18 },
- { 0x8000001, 0x8000001, 234, 761, 564, 6, 1, 18 },
- { 0x0, 0x0, 234, 762, 860, 0, 0, -1 },
- { 0x1, 0x1, 234, 763, 576, 33, 1, 19 },
- { 0x0, 0x0, 234, 764, 864, 0, 0, -1 },
- { 0x0, 0x0, 234, 765, 868, 0, 0, -1 },
- { 0x1, 0x1, 234, 766, 596, 33, 1, 20 },
- { 0x8000001, 0x8000001, 234, 767, 600, 6, 1, 20 },
- { 0x0, 0x0, 234, 768, 872, 0, 0, -1 },
- { 0x1, 0x1, 234, 769, 612, 33, 1, 21 },
- { 0x0, 0x0, 234, 770, 877, 0, 0, -1 },
- { 0x0, 0x0, 234, 771, 881, 0, 0, -1 },
- { 0x1, 0x1, 234, 772, 635, 33, 1, 17 },
- { 0x1, 0x1, 234, 773, 639, 33, 1, 17 },
- { 0x0, 0x0, 234, 774, 885, 0, 0, -1 },
- { 0x1, 0x1, 234, 775, 651, 33, 1, 21 },
- { 0x0, 0x0, 235, 2323, 822, 0, 0, -1 },
- { 0x0, 0x0, 235, 2324, 830, 0, 0, -1 },
- { 0x0, 0x0, 235, 2325, 826, 0, 0, -1 },
- { 0x0, 0x0, 235, 2326, 480, 0, 1, 6 },
- { 0x1, 0x1, 235, 2327, 488, 6, 1, 7 },
- { 0x0, 0x0, 235, 2328, 484, 0, 1, 6 },
- { 0x0, 0x0, 235, 2329, 834, 0, 0, -1 },
- { 0x0, 0x0, 235, 2330, 500, 0, 1, 8 },
- { 0x0, 0x0, 235, 2331, 838, 0, 0, -1 },
- { 0x0, 0x0, 235, 2332, 512, 0, 1, 15 },
- { 0x0, 0x0, 235, 2333, 843, 0, 0, -1 },
- { 0x0, 0x0, 235, 2334, 847, 0, 0, -1 },
- { 0x0, 0x0, 235, 2335, 535, 0, 1, 17 },
- { 0x0, 0x0, 235, 2336, 539, 0, 1, 17 },
- { 0x0, 0x0, 235, 2337, 851, 0, 0, -1 },
- { 0x0, 0x0, 235, 2338, 855, 0, 0, -1 },
- { 0x0, 0x0, 235, 2339, 559, 0, 1, 18 },
- { 0x1, 0x1, 235, 2340, 563, 6, 1, 18 },
- { 0x0, 0x0, 235, 2341, 859, 0, 0, -1 },
- { 0x0, 0x0, 235, 2342, 575, 0, 1, 19 },
- { 0x0, 0x0, 235, 2343, 863, 0, 0, -1 },
- { 0x0, 0x0, 235, 2344, 867, 0, 0, -1 },
- { 0x0, 0x0, 235, 2345, 595, 0, 1, 20 },
- { 0x1, 0x1, 235, 2346, 599, 6, 1, 20 },
- { 0x0, 0x0, 235, 2347, 871, 0, 0, -1 },
- { 0x0, 0x0, 235, 2348, 611, 0, 1, 21 },
- { 0x0, 0x0, 235, 2349, 876, 0, 0, -1 },
- { 0x0, 0x0, 235, 2350, 880, 0, 0, -1 },
- { 0x0, 0x0, 235, 2351, 634, 0, 1, 17 },
- { 0x0, 0x0, 235, 2352, 638, 0, 1, 17 },
- { 0x0, 0x0, 235, 2353, 884, 0, 0, -1 },
- { 0x0, 0x0, 235, 2354, 650, 0, 1, 21 },
- { 0x1, 0x1, 235, 776, 973, 27, 1, 16 },
- { 0x0, 0x0, 235, 777, 971, 0, 1, 16 },
- { 0x0, 0x0, 235, 1021, 975, 0, 1, 22 },
- { 0x0, 0x1, 235, 983, 981, 20, 1, 67 },
- { 0x0, 0x0, 235, 110, 979, 0, 1, 67 },
+ { 0x1, 0x1, 213, -1, 1426, 32, 1, 142 },
+ { 0x1, 0x1, 213, -1, 1428, 32, 1, 142 },
+ { 0x1, 0x1, 213, -1, 1430, 32, 1, 141 },
+ { 0x1, 0x1, 213, -1, 1432, 32, 1, 141 },
+ { 0x1, 0x1, 213, -1, 1434, 32, 1, 141 },
+ { 0x1, 0x1, 213, -1, 1436, 32, 1, 141 },
+ { 0x1, 0x1, 213, -1, 1438, 32, 1, 141 },
+ { 0x1, 0x1, 213, -1, 1440, 32, 1, 141 },
+ { 0x1, 0x1, 213, -1, 1442, 32, 1, 141 },
+ { 0x1, 0x1, 213, -1, 1444, 32, 1, 141 },
+ { 0x1, 0x1, 213, -1, 1446, 32, 1, 143 },
+ { 0x1, 0x1, 213, -1, 1448, 32, 1, 143 },
+ { 0x1, 0x1, 213, -1, 1965, 32, 1, 138 },
+ { 0x1, 0x1, 213, -1, 1967, 32, 1, 145 },
+ { 0x1, 0x1, 213, -1, 1969, 32, 1, 139 },
+ { 0x1, 0x1, 213, -1, 1971, 32, 1, 139 },
+ { 0x1, 0x1, 213, -1, 1973, 32, 1, 138 },
+ { 0x1, 0x1, 213, -1, 1975, 32, 1, 145 },
+ { 0x1, 0x1, 213, -1, 1977, 32, 1, 138 },
+ { 0x1, 0x1, 213, -1, 1979, 32, 1, 145 },
+ { 0x1, 0x1, 213, 2783, 1981, 32, 1, 138 },
+ { 0x1, 0x1, 213, 2784, 1984, 32, 1, 145 },
+ { 0x0, 0x0, 214, -1, 2825, 0, 0, -1 },
+ { 0x0, 0x0, 214, -1, 2826, 0, 0, -1 },
+ { 0x0, 0x0, 214, -1, 2851, 0, 0, -1 },
+ { 0x5, 0x5, 214, -1, 2854, 20, 1, 68 },
+ { 0x0, 0x0, 218, 2209, 966, 0, 0, -1 },
+ { 0x0, 0x0, 219, -1, 1139, 0, 0, -1 },
+ { 0x0, 0x0, 219, -1, 1264, 0, 0, -1 },
+ { 0x0, 0x0, 219, -1, -1, 0, 1, 128 },
+ { 0x0, 0x0, 219, -1, -1, 0, 1, 67 },
+ { 0x1, 0x1, 219, 833, 2289, 36, 1, 66 },
+ { 0x1, 0x1, 219, 834, 2348, 36, 1, 66 },
+ { 0x0, 0x0, 219, 835, 2351, 0, 0, -1 },
+ { 0x1, 0x1, 219, 836, -1, 36, 1, 66 },
+ { 0x0, 0x0, 219, 1423, -1, 0, 1, 34 },
+ { 0x1, 0x1, 219, 837, 2356, 36, 1, 66 },
+ { 0x0, 0x0, 219, 838, 2359, 0, 0, -1 },
+ { 0x1, 0x1, 219, 839, -1, 36, 1, 66 },
+ { 0x0, 0x0, 219, 840, 2362, 0, 0, -1 },
+ { 0x1, 0x1, 219, 841, -1, 36, 1, 66 },
+ { 0x1, 0x1, 219, 842, 2365, 36, 1, 66 },
+ { 0x1, 0x1, 219, 843, 2368, 36, 1, 66 },
+ { 0x0, 0x0, 219, 1424, -1, 0, 1, 34 },
+ { 0x1, 0x1, 219, 844, 2401, 36, 1, 66 },
+ { 0x1, 0x1, 219, 845, -1, 31, 1, 144 },
+ { 0x1, 0x1, 219, 228, 1449, 32, 1, 133 },
+ { 0x1, 0x1, 219, 229, 1458, 32, 1, 133 },
+ { 0x1, 0x1, 219, 230, 1467, 32, 1, 133 },
+ { 0x1, 0x1, 219, 231, 1480, 32, 1, 133 },
+ { 0x1, 0x1, 219, 232, 1489, 32, 1, 133 },
+ { 0x1, 0x1, 219, 233, 1498, 32, 1, 133 },
+ { 0x1, 0x1, 219, 234, 1507, 32, 1, 133 },
+ { 0x1, 0x1, 219, 235, 1516, 32, 1, 133 },
+ { 0x1, 0x1, 219, 236, 1525, 32, 1, 133 },
+ { 0x1, 0x1, 219, 237, 1534, 32, 1, 133 },
+ { 0x1, 0x1, 219, 238, 1544, 32, 1, 133 },
+ { 0x1, 0x1, 219, 239, 1554, 32, 1, 133 },
+ { 0x1, 0x1, 219, 240, 1567, 32, 1, 148 },
+ { 0x1, 0x1, 219, 241, 1573, 32, 1, 153 },
+ { 0x1, 0x1, 219, 242, 1579, 32, 1, 153 },
+ { 0x1, 0x1, 219, 243, 1585, 32, 1, 148 },
+ { 0x1, 0x1, 219, 244, 1591, 32, 1, 153 },
+ { 0x1, 0x1, 219, 245, 1597, 32, 1, 153 },
+ { 0x1, 0x1, 219, 246, 1603, 32, 1, 148 },
+ { 0x1, 0x1, 219, 247, 1609, 32, 1, 153 },
+ { 0x1, 0x1, 219, 248, 1615, 32, 1, 153 },
+ { 0x1, 0x1, 219, 249, 1621, 32, 1, 148 },
+ { 0x1, 0x1, 219, 250, 1627, 32, 1, 153 },
+ { 0x1, 0x1, 219, 251, 1633, 32, 1, 148 },
+ { 0x1, 0x1, 219, 252, 1639, 32, 1, 153 },
+ { 0x1, 0x1, 219, 253, 1645, 32, 1, 148 },
+ { 0x1, 0x1, 219, 254, 1651, 32, 1, 153 },
+ { 0x1, 0x1, 219, 255, 1657, 32, 1, 148 },
+ { 0x1, 0x1, 219, 256, 1663, 32, 1, 153 },
+ { 0x1, 0x1, 219, 257, 1669, 32, 1, 153 },
+ { 0x1, 0x1, 219, 849, -1, 31, 1, 160 },
+ { 0x0, 0x0, 220, 2404, -1, 0, 1, 66 },
+ { 0x0, 0x0, 220, 2405, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 25, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2407, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2408, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2409, -1, 0, 1, 45 },
+ { 0x0, 0x0, 220, 2410, -1, 0, 1, 40 },
+ { 0x1, 0x1, 220, 2411, -1, 12, 1, 59 },
+ { 0x0, 0x0, 220, 2412, -1, 0, 1, 54 },
+ { 0x1000001, 0x1000001, 220, 2413, -1, 12, 1, 59 },
+ { 0x1, 0x1, 220, 2414, -1, 36, 1, 54 },
+ { 0x200001, 0x200001, 220, 2415, -1, 12, 1, 59 },
+ { 0x1, 0x1, 220, 2416, -1, 33, 1, 54 },
+ { 0x1200001, 0x1200001, 220, 2417, -1, 12, 1, 49 },
+ { 0x9, 0x9, 220, 2418, -1, 33, 1, 49 },
+ { 0x0, 0x0, 220, 2419, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2420, -1, 0, 1, 54 },
+ { 0x0, 0x0, 220, 2421, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2422, -1, 0, 1, 54 },
+ { 0x0, 0x0, 220, 2423, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2424, -1, 0, 1, 54 },
+ { 0x0, 0x0, 220, 2425, -1, 0, 1, 49 },
+ { 0x0, 0x0, 220, 2426, -1, 0, 1, 49 },
+ { 0x1, 0x1, 220, 2427, -1, 12, 1, 59 },
+ { 0x0, 0x0, 220, 2428, -1, 0, 1, 54 },
+ { 0x200001, 0x1200001, 220, 2429, -1, 12, 1, 59 },
+ { 0x1, 0x9, 220, 2430, -1, 33, 1, 54 },
+ { 0x0, 0x0, 220, 2431, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2432, -1, 0, 1, 54 },
+ { 0x0, 0x0, 220, 2433, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2434, -1, 0, 1, 54 },
+ { 0x1, 0x1, 220, 2435, -1, 12, 1, 59 },
+ { 0x0, 0x0, 220, 2436, -1, 0, 1, 54 },
+ { 0x1000001, 0x1000001, 220, 2437, -1, 12, 1, 59 },
+ { 0x1, 0x1, 220, 2438, -1, 36, 1, 54 },
+ { 0x200001, 0x200001, 220, 2439, -1, 12, 1, 59 },
+ { 0x1, 0x1, 220, 2440, -1, 33, 1, 54 },
+ { 0x1200001, 0x1200001, 220, 2441, -1, 12, 1, 49 },
+ { 0x9, 0x9, 220, 2442, -1, 33, 1, 49 },
+ { 0x0, 0x0, 220, 2443, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2444, -1, 0, 1, 54 },
+ { 0x0, 0x0, 220, 2445, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2446, -1, 0, 1, 54 },
+ { 0x0, 0x0, 220, 2447, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2448, -1, 0, 1, 54 },
+ { 0x0, 0x0, 220, 2449, -1, 0, 1, 49 },
+ { 0x0, 0x0, 220, 2450, -1, 0, 1, 49 },
+ { 0x1, 0x1, 220, 2451, -1, 12, 1, 59 },
+ { 0x0, 0x0, 220, 2452, -1, 0, 1, 54 },
+ { 0x200001, 0x1200001, 220, 2453, -1, 12, 1, 59 },
+ { 0x1, 0x9, 220, 2454, -1, 33, 1, 54 },
+ { 0x0, 0x0, 220, 2455, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2456, -1, 0, 1, 54 },
+ { 0x0, 0x0, 220, 2457, -1, 0, 1, 59 },
+ { 0x0, 0x0, 220, 2458, -1, 0, 1, 54 },
+ { 0x1, 0x1, 220, 2459, -1, 28, 1, 29 },
+ { 0x0, 0x0, 220, 2460, -1, 0, 1, 29 },
+ { 0x3, 0x3, 220, 2461, -1, 27, 1, 29 },
+ { 0x1, 0x1, 220, 2462, -1, 27, 1, 29 },
+ { 0x0, 0x0, 220, 2463, -1, 0, 1, 66 },
+ { 0x0, 0x0, 220, 2464, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2465, -1, 0, 1, 29 },
+ { 0x1, 0x1, 220, 2466, -1, 36, 1, 66 },
+ { 0x1, 0x1, 220, 2467, -1, 37, 1, 29 },
+ { 0x0, 0x0, 220, 2468, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2469, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2470, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2471, -1, 0, 1, 66 },
+ { 0x0, 0x0, 220, 2472, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 37, -1, 0, 1, 29 },
+ { 0x1, 0x1, 220, 2474, -1, 36, 1, 66 },
+ { 0x1, 0x1, 220, 2475, -1, 37, 1, 29 },
+ { 0x0, 0x0, 220, 2476, -1, 0, 1, 29 },
+ { 0x1, 0x1, 220, 2477, -1, 36, 1, 66 },
+ { 0x1, 0x1, 220, 2478, -1, 37, 1, 29 },
+ { 0x0, 0x0, 220, 2479, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2480, -1, 0, 1, 66 },
+ { 0x0, 0x0, 220, 2481, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 42, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2483, -1, 0, 1, 66 },
+ { 0x0, 0x0, 220, 2484, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 43, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2486, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2487, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2488, -1, 0, 1, 49 },
+ { 0x1, 0x1, 220, 2489, -1, 27, 1, 49 },
+ { 0x1, 0x1, 220, 2490, -1, 28, 1, 49 },
+ { 0x3, 0x3, 220, 2491, -1, 27, 1, 49 },
+ { 0x1, 0x1, 220, 2492, -1, 29, 1, 49 },
+ { 0x5, 0x5, 220, 2493, -1, 27, 1, 49 },
+ { 0x3, 0x3, 220, 2494, -1, 28, 1, 49 },
+ { 0x7, 0x7, 220, 2495, -1, 27, 1, 49 },
+ { 0x0, 0x0, 220, 2496, -1, 0, 1, 49 },
+ { 0x0, 0x0, 220, 2497, -1, 0, 1, 49 },
+ { 0x0, 0x0, 220, 2498, -1, 0, 1, 49 },
+ { 0x0, 0x0, 220, 2499, -1, 0, 1, 49 },
+ { 0x1, 0x1, 220, 2500, -1, 28, 1, 29 },
+ { 0x0, 0x0, 220, 2501, -1, 0, 1, 29 },
+ { 0x3, 0x3, 220, 2502, -1, 27, 1, 29 },
+ { 0x1, 0x1, 220, 2503, -1, 27, 1, 29 },
+ { 0x0, 0x0, 220, 2504, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2505, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2506, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 52, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2508, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2509, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 57, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 2511, -1, 0, 1, 24 },
+ { 0x0, 0x0, 220, 2512, -1, 0, 1, 24 },
+ { 0x0, 0x0, 220, 2513, -1, 0, 1, 24 },
+ { 0x0, 0x0, 220, 2514, -1, 0, 1, 24 },
+ { 0x0, 0x0, 220, 2515, -1, 0, 1, 35 },
+ { 0x0, 0x0, 220, 2516, -1, 0, 1, 66 },
+ { 0x0, 0x0, 220, 2517, -1, 0, 1, 29 },
+ { 0x0, 0x0, 220, 64, -1, 0, 1, 29 },
+ { 0x1, 0x1, 221, 2519, -1, 34, 1, 66 },
+ { 0x1, 0x1, 221, 2520, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2521, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2522, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2523, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2524, -1, 34, 1, 46 },
+ { 0x1, 0x1, 221, 2525, -1, 34, 1, 42 },
+ { 0x400001, 0x400001, 221, 2526, -1, 12, 1, 61 },
+ { 0x1, 0x1, 221, 2527, -1, 34, 1, 56 },
+ { 0x1400001, 0x1400001, 221, 2528, -1, 12, 1, 61 },
+ { 0x5, 0x5, 221, 2529, -1, 34, 1, 56 },
+ { 0x600001, 0x600001, 221, 2530, -1, 12, 1, 61 },
+ { 0x3, 0x3, 221, 2531, -1, 33, 1, 56 },
+ { 0x1600001, 0x1600001, 221, 2532, -1, 12, 1, 51 },
+ { 0xb, 0xb, 221, 2533, -1, 33, 1, 51 },
+ { 0x1, 0x1, 221, 2534, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2535, -1, 34, 1, 56 },
+ { 0x1, 0x1, 221, 2536, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2537, -1, 34, 1, 56 },
+ { 0x1, 0x1, 221, 2538, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2539, -1, 34, 1, 56 },
+ { 0x1, 0x1, 221, 2540, -1, 34, 1, 51 },
+ { 0x1, 0x1, 221, 2541, -1, 34, 1, 51 },
+ { 0x400001, 0x400001, 221, 2542, -1, 12, 1, 61 },
+ { 0x1, 0x1, 221, 2543, -1, 34, 1, 56 },
+ { 0x600001, 0x1600001, 221, 2544, -1, 12, 1, 61 },
+ { 0x3, 0xb, 221, 2545, -1, 33, 1, 56 },
+ { 0x1, 0x1, 221, 2546, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2547, -1, 34, 1, 56 },
+ { 0x1, 0x1, 221, 2548, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2549, -1, 34, 1, 56 },
+ { 0x400001, 0x400001, 221, 2550, -1, 12, 1, 61 },
+ { 0x1, 0x1, 221, 2551, -1, 34, 1, 56 },
+ { 0x1400001, 0x1400001, 221, 2552, -1, 12, 1, 61 },
+ { 0x5, 0x5, 221, 2553, -1, 34, 1, 56 },
+ { 0x600001, 0x600001, 221, 2554, -1, 12, 1, 61 },
+ { 0x3, 0x3, 221, 2555, -1, 33, 1, 56 },
+ { 0x1600001, 0x1600001, 221, 2556, -1, 12, 1, 51 },
+ { 0xb, 0xb, 221, 2557, -1, 33, 1, 51 },
+ { 0x1, 0x1, 221, 2558, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2559, -1, 34, 1, 56 },
+ { 0x1, 0x1, 221, 2560, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2561, -1, 34, 1, 56 },
+ { 0x1, 0x1, 221, 2562, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2563, -1, 34, 1, 56 },
+ { 0x1, 0x1, 221, 2564, -1, 34, 1, 51 },
+ { 0x1, 0x1, 221, 2565, -1, 34, 1, 51 },
+ { 0x400001, 0x400001, 221, 2566, -1, 12, 1, 61 },
+ { 0x1, 0x1, 221, 2567, -1, 34, 1, 56 },
+ { 0x600001, 0x1600001, 221, 2568, -1, 12, 1, 61 },
+ { 0x3, 0xb, 221, 2569, -1, 33, 1, 56 },
+ { 0x1, 0x1, 221, 2570, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2571, -1, 34, 1, 56 },
+ { 0x1, 0x1, 221, 2572, -1, 34, 1, 61 },
+ { 0x1, 0x1, 221, 2573, -1, 34, 1, 56 },
+ { 0x41, 0x41, 221, 2574, -1, 28, 1, 31 },
+ { 0x1, 0x1, 221, 2575, -1, 34, 1, 31 },
+ { 0x83, 0x83, 221, 2576, -1, 27, 1, 31 },
+ { 0x81, 0x81, 221, 2577, -1, 27, 1, 31 },
+ { 0x1, 0x1, 221, 2578, -1, 34, 1, 66 },
+ { 0x1, 0x1, 221, 2579, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2580, -1, 34, 1, 31 },
+ { 0x5, 0x5, 221, 2581, -1, 34, 1, 66 },
+ { 0x9, 0x9, 221, 2582, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2583, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2584, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2585, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2586, -1, 34, 1, 66 },
+ { 0x1, 0x1, 221, 2587, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2588, -1, 34, 1, 31 },
+ { 0x5, 0x5, 221, 2589, -1, 34, 1, 66 },
+ { 0x9, 0x9, 221, 2590, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2591, -1, 34, 1, 31 },
+ { 0x5, 0x5, 221, 2592, -1, 34, 1, 66 },
+ { 0x9, 0x9, 221, 2593, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2594, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2595, -1, 34, 1, 66 },
+ { 0x1, 0x1, 221, 2596, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2597, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2598, -1, 34, 1, 66 },
+ { 0x1, 0x1, 221, 2599, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2600, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2601, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2602, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2603, -1, 34, 1, 51 },
+ { 0x81, 0x81, 221, 2604, -1, 27, 1, 51 },
+ { 0x41, 0x41, 221, 2605, -1, 28, 1, 51 },
+ { 0x83, 0x83, 221, 2606, -1, 27, 1, 51 },
+ { 0x21, 0x21, 221, 2607, -1, 29, 1, 51 },
+ { 0x85, 0x85, 221, 2608, -1, 27, 1, 51 },
+ { 0x43, 0x43, 221, 2609, -1, 28, 1, 51 },
+ { 0x87, 0x87, 221, 2610, -1, 27, 1, 51 },
+ { 0x1, 0x1, 221, 2611, -1, 34, 1, 51 },
+ { 0x1, 0x1, 221, 2612, -1, 34, 1, 51 },
+ { 0x1, 0x1, 221, 2613, -1, 34, 1, 51 },
+ { 0x1, 0x1, 221, 2614, -1, 34, 1, 51 },
+ { 0x41, 0x41, 221, 2615, -1, 28, 1, 31 },
+ { 0x1, 0x1, 221, 2616, -1, 34, 1, 31 },
+ { 0x83, 0x83, 221, 2617, -1, 27, 1, 31 },
+ { 0x81, 0x81, 221, 2618, -1, 27, 1, 31 },
+ { 0x1, 0x1, 221, 2619, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2620, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2621, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2622, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2623, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2624, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2625, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2626, -1, 34, 1, 26 },
+ { 0x1, 0x1, 221, 2627, -1, 34, 1, 26 },
+ { 0x1, 0x1, 221, 2628, -1, 34, 1, 26 },
+ { 0x1, 0x1, 221, 2629, -1, 34, 1, 26 },
+ { 0x1, 0x1, 221, 2630, -1, 34, 1, 37 },
+ { 0x1, 0x1, 221, 2631, -1, 34, 1, 66 },
+ { 0x1, 0x1, 221, 2632, -1, 34, 1, 31 },
+ { 0x1, 0x1, 221, 2633, -1, 34, 1, 31 },
+ { 0x1, 0x1, 222, 2634, -1, 35, 1, 66 },
+ { 0x1, 0x1, 222, 2635, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2636, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2637, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2638, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2639, -1, 35, 1, 47 },
+ { 0x1, 0x1, 222, 2640, -1, 35, 1, 43 },
+ { 0x800001, 0x800001, 222, 2641, -1, 12, 1, 62 },
+ { 0x1, 0x1, 222, 2642, -1, 35, 1, 57 },
+ { 0x1800001, 0x1800001, 222, 2643, -1, 12, 1, 62 },
+ { 0x3, 0x3, 222, 2644, -1, 35, 1, 57 },
+ { 0xa00001, 0xa00001, 222, 2645, -1, 12, 1, 62 },
+ { 0x5, 0x5, 222, 2646, -1, 33, 1, 57 },
+ { 0x1a00001, 0x1a00001, 222, 2647, -1, 12, 1, 52 },
+ { 0xd, 0xd, 222, 2648, -1, 33, 1, 52 },
+ { 0x1, 0x1, 222, 2649, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2650, -1, 35, 1, 57 },
+ { 0x1, 0x1, 222, 2651, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2652, -1, 35, 1, 57 },
+ { 0x1, 0x1, 222, 2653, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2654, -1, 35, 1, 57 },
+ { 0x1, 0x1, 222, 2655, -1, 35, 1, 52 },
+ { 0x1, 0x1, 222, 2656, -1, 35, 1, 52 },
+ { 0x800001, 0x800001, 222, 2657, -1, 12, 1, 62 },
+ { 0x1, 0x1, 222, 2658, -1, 35, 1, 57 },
+ { 0xa00001, 0x1a00001, 222, 2659, -1, 12, 1, 62 },
+ { 0x5, 0xd, 222, 2660, -1, 33, 1, 57 },
+ { 0x1, 0x1, 222, 2661, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2662, -1, 35, 1, 57 },
+ { 0x1, 0x1, 222, 2663, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2664, -1, 35, 1, 57 },
+ { 0x800001, 0x800001, 222, 2665, -1, 12, 1, 62 },
+ { 0x1, 0x1, 222, 2666, -1, 35, 1, 57 },
+ { 0x1800001, 0x1800001, 222, 2667, -1, 12, 1, 62 },
+ { 0x3, 0x3, 222, 2668, -1, 35, 1, 57 },
+ { 0xa00001, 0xa00001, 222, 2669, -1, 12, 1, 62 },
+ { 0x5, 0x5, 222, 2670, -1, 33, 1, 57 },
+ { 0x1a00001, 0x1a00001, 222, 2671, -1, 12, 1, 52 },
+ { 0xd, 0xd, 222, 2672, -1, 33, 1, 52 },
+ { 0x1, 0x1, 222, 2673, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2674, -1, 35, 1, 57 },
+ { 0x1, 0x1, 222, 2675, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2676, -1, 35, 1, 57 },
+ { 0x1, 0x1, 222, 2677, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2678, -1, 35, 1, 57 },
+ { 0x1, 0x1, 222, 2679, -1, 35, 1, 52 },
+ { 0x1, 0x1, 222, 2680, -1, 35, 1, 52 },
+ { 0x800001, 0x800001, 222, 2681, -1, 12, 1, 62 },
+ { 0x1, 0x1, 222, 2682, -1, 35, 1, 57 },
+ { 0xa00001, 0x1a00001, 222, 2683, -1, 12, 1, 62 },
+ { 0x5, 0xd, 222, 2684, -1, 33, 1, 57 },
+ { 0x1, 0x1, 222, 2685, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2686, -1, 35, 1, 57 },
+ { 0x1, 0x1, 222, 2687, -1, 35, 1, 62 },
+ { 0x1, 0x1, 222, 2688, -1, 35, 1, 57 },
+ { 0x81, 0x81, 222, 2689, -1, 28, 1, 32 },
+ { 0x1, 0x1, 222, 2690, -1, 35, 1, 32 },
+ { 0x103, 0x103, 222, 2691, -1, 27, 1, 32 },
+ { 0x101, 0x101, 222, 2692, -1, 27, 1, 32 },
+ { 0x1, 0x1, 222, 2693, -1, 35, 1, 66 },
+ { 0x1, 0x1, 222, 2694, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2695, -1, 35, 1, 32 },
+ { 0x3, 0x3, 222, 2696, -1, 35, 1, 66 },
+ { 0x5, 0x5, 222, 2697, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2698, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2699, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2700, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2701, -1, 35, 1, 66 },
+ { 0x1, 0x1, 222, 2702, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2703, -1, 35, 1, 32 },
+ { 0x3, 0x3, 222, 2704, -1, 35, 1, 66 },
+ { 0x5, 0x5, 222, 2705, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2706, -1, 35, 1, 32 },
+ { 0x3, 0x3, 222, 2707, -1, 35, 1, 66 },
+ { 0x5, 0x5, 222, 2708, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2709, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2710, -1, 35, 1, 66 },
+ { 0x1, 0x1, 222, 2711, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2712, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2713, -1, 35, 1, 66 },
+ { 0x1, 0x1, 222, 2714, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2715, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2716, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2717, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2718, -1, 35, 1, 52 },
+ { 0x101, 0x101, 222, 2719, -1, 27, 1, 52 },
+ { 0x81, 0x81, 222, 2720, -1, 28, 1, 52 },
+ { 0x103, 0x103, 222, 2721, -1, 27, 1, 52 },
+ { 0x41, 0x41, 222, 2722, -1, 29, 1, 52 },
+ { 0x105, 0x105, 222, 2723, -1, 27, 1, 52 },
+ { 0x83, 0x83, 222, 2724, -1, 28, 1, 52 },
+ { 0x107, 0x107, 222, 2725, -1, 27, 1, 52 },
+ { 0x1, 0x1, 222, 2726, -1, 35, 1, 52 },
+ { 0x1, 0x1, 222, 2727, -1, 35, 1, 52 },
+ { 0x1, 0x1, 222, 2728, -1, 35, 1, 52 },
+ { 0x1, 0x1, 222, 2729, -1, 35, 1, 52 },
+ { 0x81, 0x81, 222, 2730, -1, 28, 1, 32 },
+ { 0x1, 0x1, 222, 2731, -1, 35, 1, 32 },
+ { 0x103, 0x103, 222, 2732, -1, 27, 1, 32 },
+ { 0x101, 0x101, 222, 2733, -1, 27, 1, 32 },
+ { 0x1, 0x1, 222, 2734, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2735, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2736, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2737, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2738, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2739, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2740, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2741, -1, 35, 1, 27 },
+ { 0x1, 0x1, 222, 2742, -1, 35, 1, 27 },
+ { 0x1, 0x1, 222, 2743, -1, 35, 1, 27 },
+ { 0x1, 0x1, 222, 2744, -1, 35, 1, 27 },
+ { 0x1, 0x1, 222, 2745, -1, 35, 1, 38 },
+ { 0x1, 0x1, 222, 2746, -1, 35, 1, 66 },
+ { 0x1, 0x1, 222, 2747, -1, 35, 1, 32 },
+ { 0x1, 0x1, 222, 2748, -1, 35, 1, 32 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 66 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, 2243, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 48 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 44 },
+ { 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 63 },
+ { 0x3, 0x3, 223, 2964, -1, 34, 1, 58 },
+ { 0x1c00001, 0x1c00001, 223, -1, -1, 12, 1, 63 },
+ { 0x7, 0x7, 223, 2965, -1, 34, 1, 58 },
+ { 0xe00001, 0xe00001, 223, -1, -1, 12, 1, 63 },
+ { 0x7, 0x7, 223, 2966, -1, 33, 1, 58 },
+ { 0x1e00001, 0x1e00001, 223, -1, -1, 12, 1, 53 },
+ { 0xf, 0xf, 223, 2967, -1, 33, 1, 53 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2968, -1, 34, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2969, -1, 34, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2970, -1, 34, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 53 },
+ { 0x3, 0x3, 223, 2971, -1, 34, 1, 53 },
+ { 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 63 },
+ { 0x3, 0x3, 223, 2976, -1, 34, 1, 58 },
+ { 0xe00001, 0x1e00001, 223, -1, -1, 12, 1, 63 },
+ { 0x7, 0xf, 223, 2977, -1, 33, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2978, -1, 34, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2979, -1, 34, 1, 58 },
+ { 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 63 },
+ { 0x3, 0x3, 223, 2982, -1, 34, 1, 58 },
+ { 0x1c00001, 0x1c00001, 223, -1, -1, 12, 1, 63 },
+ { 0x7, 0x7, 223, 2983, -1, 34, 1, 58 },
+ { 0xe00001, 0xe00001, 223, -1, -1, 12, 1, 63 },
+ { 0x7, 0x7, 223, 2984, -1, 33, 1, 58 },
+ { 0x1e00001, 0x1e00001, 223, -1, -1, 12, 1, 53 },
+ { 0xf, 0xf, 223, 2985, -1, 33, 1, 53 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2986, -1, 34, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2987, -1, 34, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2988, -1, 34, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 53 },
+ { 0x3, 0x3, 223, 2989, -1, 34, 1, 53 },
+ { 0xc00001, 0xc00001, 223, -1, -1, 12, 1, 63 },
+ { 0x3, 0x3, 223, 2994, -1, 34, 1, 58 },
+ { 0xe00001, 0x1e00001, 223, -1, -1, 12, 1, 63 },
+ { 0x7, 0xf, 223, 2995, -1, 33, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2996, -1, 34, 1, 58 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 63 },
+ { 0x3, 0x3, 223, 2997, -1, 34, 1, 58 },
+ { 0xc1, 0xc1, 223, -1, -1, 28, 1, 33 },
+ { 0x3, 0x3, 223, 2862, -1, 34, 1, 33 },
+ { 0x183, 0x183, 223, -1, -1, 27, 1, 33 },
+ { 0x181, 0x181, 223, 2863, -1, 27, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 66 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, 2244, -1, 34, 1, 33 },
+ { 0x7, 0x7, 223, -1, -1, 34, 1, 66 },
+ { 0xb, 0xb, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, 2245, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 66 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, 2248, -1, 34, 1, 33 },
+ { 0x7, 0x7, 223, -1, -1, 34, 1, 66 },
+ { 0xb, 0xb, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, 2249, -1, 34, 1, 33 },
+ { 0x7, 0x7, 223, -1, -1, 34, 1, 66 },
+ { 0xb, 0xb, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, 2251, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 66 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, 2253, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 66 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, 2254, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 53 },
+ { 0x181, 0x181, 223, -1, -1, 27, 1, 53 },
+ { 0xc1, 0xc1, 223, -1, -1, 28, 1, 53 },
+ { 0x183, 0x183, 223, -1, -1, 27, 1, 53 },
+ { 0x61, 0x61, 223, -1, -1, 29, 1, 53 },
+ { 0x185, 0x185, 223, -1, -1, 27, 1, 53 },
+ { 0xc3, 0xc3, 223, -1, -1, 28, 1, 53 },
+ { 0x187, 0x187, 223, -1, -1, 27, 1, 53 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 53 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 53 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 53 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 53 },
+ { 0xc1, 0xc1, 223, -1, -1, 28, 1, 33 },
+ { 0x3, 0x3, 223, 2866, -1, 34, 1, 33 },
+ { 0x183, 0x183, 223, -1, -1, 27, 1, 33 },
+ { 0x181, 0x181, 223, 2867, -1, 27, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 28 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 28 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 28 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 28 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 39 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 66 },
+ { 0x3, 0x3, 223, -1, -1, 34, 1, 33 },
+ { 0x3, 0x3, 223, 2256, -1, 34, 1, 33 },
+ { 0x3, 0x3, 224, 540, 1451, 32, 1, 135 },
+ { 0x3, 0x3, 224, 541, 1460, 32, 1, 135 },
+ { 0x3, 0x3, 224, 542, 1469, 32, 1, 135 },
+ { 0x3, 0x3, 224, 543, 1482, 32, 1, 135 },
+ { 0x3, 0x3, 224, 544, 1491, 32, 1, 135 },
+ { 0x3, 0x3, 224, 545, 1500, 32, 1, 135 },
+ { 0x3, 0x3, 224, 546, 1509, 32, 1, 135 },
+ { 0x3, 0x3, 224, 547, 1518, 32, 1, 135 },
+ { 0x3, 0x3, 224, 548, 1527, 32, 1, 135 },
+ { 0x3, 0x3, 224, 549, 1536, 32, 1, 135 },
+ { 0x3, 0x3, 224, 550, 1546, 32, 1, 135 },
+ { 0x3, 0x3, 224, 551, 1556, 32, 1, 135 },
+ { 0x3, 0x3, 224, 564, 1569, 32, 1, 150 },
+ { 0x3, 0x3, 224, 565, 1575, 32, 1, 155 },
+ { 0x3, 0x3, 224, 566, 1581, 32, 1, 155 },
+ { 0x3, 0x3, 224, 567, 1587, 32, 1, 150 },
+ { 0x3, 0x3, 224, 568, 1593, 32, 1, 155 },
+ { 0x3, 0x3, 224, 569, 1599, 32, 1, 155 },
+ { 0x3, 0x3, 224, 570, 1605, 32, 1, 150 },
+ { 0x3, 0x3, 224, 571, 1611, 32, 1, 155 },
+ { 0x3, 0x3, 224, 572, 1617, 32, 1, 155 },
+ { 0x3, 0x3, 224, 573, 1623, 32, 1, 150 },
+ { 0x3, 0x3, 224, 574, 1629, 32, 1, 155 },
+ { 0x3, 0x3, 224, 575, 1635, 32, 1, 150 },
+ { 0x3, 0x3, 224, 576, 1641, 32, 1, 155 },
+ { 0x3, 0x3, 224, 577, 1647, 32, 1, 150 },
+ { 0x3, 0x3, 224, 578, 1653, 32, 1, 155 },
+ { 0x3, 0x3, 224, 579, 1659, 32, 1, 150 },
+ { 0x3, 0x3, 224, 580, 1665, 32, 1, 155 },
+ { 0x3, 0x3, 224, 581, 1671, 32, 1, 155 },
+ { 0x1, 0x1, 225, -1, -1, 28, 1, 34 },
+ { 0x1, 0x1, 225, -1, -1, 28, 1, 34 },
+ { 0x0, 0x0, 232, 958, -1, 0, 1, 144 },
+ { 0x0, 0x0, 232, 959, -1, 0, 1, 160 },
+ { 0x1, 0x1, 233, -1, 1982, 33, 1, 140 },
+ { 0x1, 0x1, 233, -1, 1985, 33, 1, 146 },
+ { 0x0, 0x0, 233, -1, 1987, 0, 1, 157 },
+ { 0x0, 0x0, 233, -1, 1988, 0, 1, 161 },
+ { 0x0, 0x0, 234, 883, 971, 0, 0, -1 },
+ { 0x0, 0x0, 234, 884, 979, 0, 0, -1 },
+ { 0x0, 0x0, 234, 885, 975, 0, 0, -1 },
+ { 0x1, 0x1, 234, 886, 620, 33, 1, 6 },
+ { 0x8000001, 0x8000001, 234, 887, 628, 6, 1, 7 },
+ { 0x1, 0x1, 234, 888, 624, 33, 1, 6 },
+ { 0x0, 0x0, 234, 889, 983, 0, 0, -1 },
+ { 0x1, 0x1, 234, 890, 640, 33, 1, 8 },
+ { 0x0, 0x0, 234, 891, 987, 0, 0, -1 },
+ { 0x1, 0x1, 234, 892, 652, 33, 1, 16 },
+ { 0x0, 0x0, 234, 893, 992, 0, 0, -1 },
+ { 0x0, 0x0, 234, 894, 996, 0, 0, -1 },
+ { 0x1, 0x1, 234, 895, 675, 33, 1, 18 },
+ { 0x1, 0x1, 234, 896, 679, 33, 1, 18 },
+ { 0x0, 0x0, 234, 897, 1000, 0, 0, -1 },
+ { 0x0, 0x0, 234, 898, 1004, 0, 0, -1 },
+ { 0x1, 0x1, 234, 899, 699, 33, 1, 19 },
+ { 0x8000001, 0x8000001, 234, 900, 703, 6, 1, 19 },
+ { 0x0, 0x0, 234, 901, 1008, 0, 0, -1 },
+ { 0x1, 0x1, 234, 902, 715, 33, 1, 20 },
+ { 0x0, 0x0, 234, 903, 1012, 0, 0, -1 },
+ { 0x0, 0x0, 234, 904, 1016, 0, 0, -1 },
+ { 0x1, 0x1, 234, 905, 735, 33, 1, 21 },
+ { 0x8000001, 0x8000001, 234, 906, 739, 6, 1, 21 },
+ { 0x0, 0x0, 234, 907, 1020, 0, 0, -1 },
+ { 0x1, 0x1, 234, 908, 751, 33, 1, 22 },
+ { 0x0, 0x0, 234, 909, 1025, 0, 0, -1 },
+ { 0x0, 0x0, 234, 910, 1029, 0, 0, -1 },
+ { 0x1, 0x1, 234, 911, 774, 33, 1, 18 },
+ { 0x1, 0x1, 234, 912, 778, 33, 1, 18 },
+ { 0x0, 0x0, 234, 913, 1033, 0, 0, -1 },
+ { 0x1, 0x1, 234, 914, 790, 33, 1, 22 },
+ { 0x0, 0x0, 235, 2787, 970, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2788, 978, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2789, 974, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2790, 619, 0, 1, 6 },
+ { 0x1, 0x1, 235, 2791, 627, 6, 1, 7 },
+ { 0x0, 0x0, 235, 2792, 623, 0, 1, 6 },
+ { 0x0, 0x0, 235, 2793, 982, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2794, 639, 0, 1, 8 },
+ { 0x0, 0x0, 235, 2795, 986, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2796, 651, 0, 1, 16 },
+ { 0x0, 0x0, 235, 2797, 991, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2798, 995, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2799, 674, 0, 1, 18 },
+ { 0x0, 0x0, 235, 2800, 678, 0, 1, 18 },
+ { 0x0, 0x0, 235, 2801, 999, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2802, 1003, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2803, 698, 0, 1, 19 },
+ { 0x1, 0x1, 235, 2804, 702, 6, 1, 19 },
+ { 0x0, 0x0, 235, 2805, 1007, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2806, 714, 0, 1, 20 },
+ { 0x0, 0x0, 235, 2807, 1011, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2808, 1015, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2809, 734, 0, 1, 21 },
+ { 0x1, 0x1, 235, 2810, 738, 6, 1, 21 },
+ { 0x0, 0x0, 235, 2811, 1019, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2812, 750, 0, 1, 22 },
+ { 0x0, 0x0, 235, 2813, 1024, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2814, 1028, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2815, 773, 0, 1, 18 },
+ { 0x0, 0x0, 235, 2816, 777, 0, 1, 18 },
+ { 0x0, 0x0, 235, 2817, 1032, 0, 0, -1 },
+ { 0x0, 0x0, 235, 2818, 789, 0, 1, 22 },
+ { 0x1, 0x1, 235, 915, 1155, 27, 1, 17 },
+ { 0x0, 0x0, 235, 916, 1153, 0, 1, 17 },
+ { 0x0, 0x0, 235, 1220, 1157, 0, 1, 23 },
+ { 0x0, 0x1, 235, 1165, 1163, 20, 1, 68 },
+ { 0x0, 0x0, 235, 111, 1161, 0, 1, 68 },
{ 0x1, 0x1, 238, -1, -1, 29, 1, 0 },
{ 0x0, 0x0, 238, -1, -1, 0, 1, 0 },
- { 0x1, 0x1, 238, 2495, -1, 27, 1, 0 },
- { 0x1, 0x1, 238, 2496, -1, 27, 1, 0 },
- { 0x1, 0x1, 238, 2497, -1, 27, 1, 0 },
- { 0x1, 0x1, 238, 2498, -1, 27, 1, 0 },
- { 0x0, 0x0, 260, -1, 1952, 0, 0, -1 },
- { 0x0, 0x0, 260, -1, 1954, 0, 0, -1 },
- { 0x1, 0x1, 260, -1, -1, 28, 1, 29 },
- { 0x1, 0x1, 260, -1, -1, 28, 1, 29 },
- { 0x0, 0x0, 260, -1, 1993, 0, 0, -1 },
- { 0x0, 0x0, 260, -1, 1995, 0, 0, -1 },
- { 0x1, 0x1, 260, -1, -1, 28, 1, 29 },
- { 0x1, 0x1, 260, -1, -1, 28, 1, 29 },
- { 0x0, 0x0, 262, 22, -1, 0, 1, 0 },
- { 0x0, 0x0, 262, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 262, -1, -1, 0, 1, 0 },
- { 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
- { 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
- { 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
- { 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
- { 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
- { 0x0, 0x0, 262, 178, -1, 0, 1, 0 },
- { 0x0, 0x1, 262, -1, -1, 29, 1, 0 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 64 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 64 },
- { 0x0, 0x0, 263, -1, 1928, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1930, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1932, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1934, 0, 0, -1 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 49 },
- { 0x0, 0x0, 263, -1, 1936, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1938, 0, 0, -1 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x0, 0x0, 263, -1, 1940, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1942, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1944, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1946, 0, 0, -1 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 49 },
- { 0x0, 0x0, 263, -1, 1948, 0, 0, -1 },
- { 0x0, 0x0, 263, -1, 1950, 0, 0, -1 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, -1, -1, 12, 1, 59 },
- { 0x1, 0x1, 263, 334, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, 392, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, 338, -1, 12, 1, 2 },
- { 0x1, 0x1, 263, 396, -1, 12, 1, 2 },
- { 0x0, 0x0, 264, -1, 1935, 0, 0, -1 },
- { 0x9, 0x9, 264, -1, 2465, 33, 1, 49 },
- { 0x0, 0x0, 264, 1173, 1984, 0, 0, -1 },
- { 0x3, 0x3, 264, 1174, -1, 27, 1, 49 },
- { 0x0, 0x0, 268, 2392, -1, 0, 1, 0 },
- { 0x3, 0x3, 269, -1, -1, 27, 1, 0 },
- { 0x3, 0x3, 269, -1, -1, 27, 1, 0 },
- { 0x3, 0x3, 269, -1, -1, 27, 1, 0 },
- { 0x3, 0x3, 269, -1, -1, 27, 1, 0 },
- { 0x1, 0x1, 270, 2491, -1, 28, 1, 0 },
- { 0x1, 0x1, 270, 2492, -1, 28, 1, 0 },
- { 0x1, 0x1, 270, 2493, -1, 28, 1, 0 },
- { 0x1, 0x1, 270, 2494, -1, 28, 1, 0 },
- { 0x1, 0x1, 271, -1, -1, 27, 1, 93 },
- { 0x1, 0x1, 271, -1, -1, 27, 1, 93 },
- { 0x0, 0x0, 271, -1, 820, 0, 0, -1 },
- { 0x0, 0x0, 272, 2504, 2369, 0, 0, -1 },
- { 0x0, 0x0, 272, 2505, 2371, 0, 0, -1 },
- { 0x0, 0x0, 273, -1, 2370, 0, 0, -1 },
- { 0x0, 0x0, 273, -1, 2372, 0, 0, -1 },
- { 0x0, 0x0, 274, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 274, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 274, -1, -1, 0, 1, 40 },
- { 0x0, 0x0, 279, -1, -1, 0, 1, 33 },
- { 0x0, 0x0, 283, -1, 1958, 0, 1, 29 },
- { 0x0, 0x0, 284, -1, -1, 0, 1, 0 },
- { 0x0, 0x0, 284, -1, -1, 0, 1, 71 },
- { 0x0, 0x0, 284, 1744, 2482, 0, 1, 1 },
- { 0x0, 0x0, 284, -1, 393, 0, 0, -1 },
- { 0x0, 0x0, 284, 1746, 2484, 0, 1, 1 },
- { 0x0, 0x0, 284, -1, 397, 0, 0, -1 },
+ { 0x1, 0x1, 238, 3022, -1, 27, 1, 0 },
+ { 0x1, 0x1, 238, 3023, -1, 27, 1, 0 },
+ { 0x1, 0x1, 238, 3024, -1, 27, 1, 0 },
+ { 0x1, 0x1, 238, 3025, -1, 27, 1, 0 },
+ { 0x0, 0x0, 261, -1, 2344, 0, 0, -1 },
+ { 0x0, 0x0, 261, -1, 2346, 0, 0, -1 },
+ { 0x1, 0x1, 261, -1, -1, 28, 1, 30 },
+ { 0x1, 0x1, 261, -1, -1, 28, 1, 30 },
+ { 0x0, 0x0, 261, -1, 2385, 0, 0, -1 },
+ { 0x0, 0x0, 261, -1, 2387, 0, 0, -1 },
+ { 0x1, 0x1, 261, -1, -1, 28, 1, 30 },
+ { 0x1, 0x1, 261, -1, -1, 28, 1, 30 },
+ { 0x0, 0x0, 263, 23, -1, 0, 1, 0 },
+ { 0x0, 0x0, 263, -1, -1, 0, 1, 0 },
+ { 0x0, 0x0, 263, -1, -1, 0, 1, 0 },
+ { 0x0, 0x1, 263, -1, -1, 29, 1, 0 },
+ { 0x0, 0x1, 263, -1, -1, 29, 1, 0 },
+ { 0x0, 0x1, 263, -1, -1, 29, 1, 0 },
+ { 0x0, 0x1, 263, -1, -1, 29, 1, 0 },
+ { 0x0, 0x1, 263, -1, -1, 29, 1, 0 },
+ { 0x0, 0x0, 263, 180, -1, 0, 1, 0 },
+ { 0x0, 0x1, 263, -1, -1, 29, 1, 0 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 301, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 323, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 349, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 371, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 65 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 65 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 65 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 65 },
+ { 0x0, 0x0, 264, -1, 2296, 0, 0, -1 },
+ { 0x0, 0x0, 264, -1, 2298, 0, 0, -1 },
+ { 0x0, 0x0, 264, -1, 2300, 0, 0, -1 },
+ { 0x0, 0x0, 264, -1, 2302, 0, 0, -1 },
+ { 0x1, 0x1, 264, -1, 2304, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, 2306, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, 2308, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, 2310, 12, 1, 50 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 50 },
+ { 0x0, 0x0, 264, -1, 2312, 0, 0, -1 },
+ { 0x0, 0x0, 264, -1, 2314, 0, 0, -1 },
+ { 0x1, 0x1, 264, -1, 2316, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, 2318, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x0, 0x0, 264, -1, 2320, 0, 0, -1 },
+ { 0x0, 0x0, 264, -1, 2322, 0, 0, -1 },
+ { 0x0, 0x0, 264, -1, 2324, 0, 0, -1 },
+ { 0x0, 0x0, 264, -1, 2326, 0, 0, -1 },
+ { 0x1, 0x1, 264, -1, 2328, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, 2330, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, 2332, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, 2334, 12, 1, 50 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 50 },
+ { 0x0, 0x0, 264, -1, 2336, 0, 0, -1 },
+ { 0x0, 0x0, 264, -1, 2338, 0, 0, -1 },
+ { 0x1, 0x1, 264, -1, 2340, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, 2342, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x1, 0x1, 264, -1, -1, 12, 1, 60 },
+ { 0x1, 0x1, 264, 393, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 395, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 517, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 519, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 401, -1, 12, 1, 77 },
+ { 0x1, 0x1, 264, 403, -1, 12, 1, 77 },
+ { 0x1, 0x1, 264, 525, -1, 12, 1, 77 },
+ { 0x1, 0x1, 264, 527, -1, 12, 1, 77 },
+ { 0x1, 0x1, 264, 409, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 411, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 533, -1, 12, 1, 2 },
+ { 0x1, 0x1, 264, 535, -1, 12, 1, 2 },
+ { 0x0, 0x0, 265, -1, 2303, 0, 0, -1 },
+ { 0x9, 0x9, 265, -1, 2311, 33, 1, 50 },
+ { 0x9, 0x9, 265, -1, 2975, 33, 1, 50 },
+ { 0x0, 0x0, 265, 1399, 2376, 0, 0, -1 },
+ { 0x3, 0x3, 265, 1400, -1, 27, 1, 50 },
+ { 0x0, 0x0, 269, 2856, -1, 0, 1, 0 },
+ { 0x3, 0x3, 270, -1, -1, 27, 1, 0 },
+ { 0x3, 0x3, 270, -1, -1, 27, 1, 0 },
+ { 0x3, 0x3, 270, -1, -1, 27, 1, 0 },
+ { 0x3, 0x3, 270, -1, -1, 27, 1, 0 },
+ { 0x1, 0x1, 271, 3018, -1, 28, 1, 0 },
+ { 0x1, 0x1, 271, 3019, -1, 28, 1, 0 },
+ { 0x1, 0x1, 271, 3020, -1, 28, 1, 0 },
+ { 0x1, 0x1, 271, 3021, -1, 28, 1, 0 },
+ { 0x1, 0x1, 273, -1, -1, 27, 1, 100 },
+ { 0x1, 0x1, 273, -1, -1, 27, 1, 100 },
+ { 0x0, 0x0, 273, -1, 968, 0, 0, -1 },
+ { 0x0, 0x0, 274, 3031, 2833, 0, 0, -1 },
+ { 0x0, 0x0, 274, 3032, 2835, 0, 0, -1 },
+ { 0x0, 0x0, 275, -1, 2834, 0, 0, -1 },
+ { 0x0, 0x0, 275, -1, 2836, 0, 0, -1 },
+ { 0x0, 0x0, 276, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 276, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 276, -1, -1, 0, 1, 41 },
+ { 0x0, 0x0, 281, -1, -1, 0, 1, 34 },
+ { 0x0, 0x0, 285, -1, 2350, 0, 1, 30 },
+ { 0x0, 0x0, 286, -1, -1, 0, 1, 0 },
+ { 0x0, 0x0, 286, -1, -1, 0, 1, 72 },
+ { 0x0, 0x0, 286, 2001, 3000, 0, 1, 1 },
+ { 0x0, 0x0, 286, 2002, 3001, 0, 1, 1 },
+ { 0x0, 0x0, 286, -1, 518, 0, 0, -1 },
+ { 0x0, 0x0, 286, -1, 520, 0, 0, -1 },
+ { 0x0, 0x0, 286, 2005, 3004, 0, 1, 76 },
+ { 0x0, 0x0, 286, 2006, 3005, 0, 1, 76 },
+ { 0x0, 0x0, 286, -1, 526, 0, 0, -1 },
+ { 0x0, 0x0, 286, -1, 528, 0, 0, -1 },
+ { 0x0, 0x0, 286, 2009, 3008, 0, 1, 1 },
+ { 0x0, 0x0, 286, 2010, 3009, 0, 1, 1 },
+ { 0x0, 0x0, 286, -1, 534, 0, 0, -1 },
+ { 0x0, 0x0, 286, -1, 536, 0, 0, -1 },
};
static const struct ia64_main_table
main_table[] = {
{ 5, 1, 1, 0x0000010000000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 0, },
{ 5, 1, 1, 0x0000010008000000ull, 0x000001eff8000000ull, { 24, 25, 26, 4, 0 }, 0x0, 1, },
- { 5, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 24, 66, 27, 0, 0 }, 0x0, 2, },
- { 5, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 24, 63, 26, 0, 0 }, 0x0, 3, },
- { 6, 1, 1, 0x0000012000000000ull, 0x000001e000000000ull, { 24, 66, 27, 0, 0 }, 0x0, 4, },
+ { 5, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 24, 67, 27, 0, 0 }, 0x0, 2, },
+ { 5, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 24, 64, 26, 0, 0 }, 0x0, 3, },
+ { 6, 1, 1, 0x0000012000000000ull, 0x000001e000000000ull, { 24, 67, 27, 0, 0 }, 0x0, 4, },
{ 7, 1, 1, 0x0000010040000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 5, },
- { 7, 1, 1, 0x0000010c00000000ull, 0x000001ee00000000ull, { 24, 63, 26, 0, 0 }, 0x0, 6, },
- { 8, 1, 1, 0x0000010800000000ull, 0x000001ee00000000ull, { 24, 63, 26, 0, 0 }, 0x0, 7, },
- { 9, 3, 1, 0x0000002c00000000ull, 0x000001ee00000000ull, { 24, 3, 52, 53, 54 }, 0x221, 8, },
- { 10, 1, 1, 0x0000010060000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 9, },
- { 10, 1, 1, 0x0000010160000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 10, },
- { 11, 1, 1, 0x0000010068000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 11, },
- { 11, 1, 1, 0x0000010168000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 12, },
- { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011ffull, { 16, 0, 0, 0, 0 }, 0x40, 821, },
- { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x0, 686, },
- { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x40, 687, },
- { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x200, 1866, },
- { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x240, 1867, },
- { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 15, 16, 0, 0, 0 }, 0x0, 443, },
- { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 15, 16, 0, 0, 0 }, 0x40, 444, },
- { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011ffull, { 81, 0, 0, 0, 0 }, 0x40, 842, },
- { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x0, 688, },
- { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x40, 689, },
- { 14, 4, 0, 0x0000008000000080ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x210, 2502, },
- { 14, 4, 0, 0x0000008000000080ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x250, 2503, },
- { 14, 4, 0, 0x0000008000000140ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x30, 451, },
- { 14, 4, 0, 0x0000008000000140ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x70, 452, },
- { 14, 4, 0, 0x0000008000000180ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x230, 449, },
- { 14, 4, 0, 0x0000008000000180ull, 0x000001ee000011c0ull, { 81, 0, 0, 0, 0 }, 0x270, 450, },
- { 14, 4, 1, 0x000000a000000000ull, 0x000001ee00001000ull, { 15, 81, 0, 0, 0 }, 0x0, 445, },
- { 14, 4, 1, 0x000000a000000000ull, 0x000001ee00001000ull, { 15, 81, 0, 0, 0 }, 0x40, 446, },
- { 15, 4, 0, 0x0000000000000000ull, 0x000001e1f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 398, },
- { 15, 5, 0, 0x0000000000000000ull, 0x000001e3f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 812, },
- { 15, 2, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 65, 0, 0, 0, 0 }, 0x2, 956, },
- { 15, 3, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 1047, },
- { 15, 6, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 69, 0, 0, 0, 0 }, 0x0, 2506, },
- { 15, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 65, 0, 0, 0, 0 }, 0x0, 15, },
- { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011ffull, { 82, 0, 0, 0, 0 }, 0x40, 875, },
- { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x0, 690, },
- { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x40, 691, },
- { 16, 6, 1, 0x000001a000000000ull, 0x000001ee00001000ull, { 15, 82, 0, 0, 0 }, 0x0, 447, },
- { 16, 6, 1, 0x000001a000000000ull, 0x000001ee00001000ull, { 15, 82, 0, 0, 0 }, 0x40, 448, },
- { 17, 4, 0, 0x0000004080000000ull, 0x000001e9f8000018ull, { 16, 77, 0, 0, 0 }, 0x20, 2388, },
- { 17, 4, 0, 0x000000e000000000ull, 0x000001e800000018ull, { 81, 77, 0, 0, 0 }, 0x20, 2389, },
- { 18, 4, 0, 0x0000000060000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x2c, 219, },
- { 22, 2, 0, 0x0000000200000000ull, 0x000001ee00000000ull, { 25, 80, 0, 0, 0 }, 0x0, 1871, },
- { 22, 3, 0, 0x0000000800000000ull, 0x000001ee00000000ull, { 24, 81, 0, 0, 0 }, 0x0, 221, },
- { 22, 3, 0, 0x0000000c00000000ull, 0x000001ee00000000ull, { 18, 81, 0, 0, 0 }, 0x0, 222, },
- { 22, 3, 0, 0x0000002200000000ull, 0x000001ee00000000ull, { 25, 80, 0, 0, 0 }, 0x0, 1872, },
- { 22, 3, 0, 0x0000002600000000ull, 0x000001ee00000000ull, { 19, 80, 0, 0, 0 }, 0x0, 1873, },
- { 22, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 25, 80, 0, 0, 0 }, 0x0, 1874, },
- { 25, 4, 0, 0x0000000020000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x224, 17, },
- { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x0, 1023, },
- { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 22, 26, 25, 0 }, 0x0, 999, },
- { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 23, 26, 25, 0 }, 0x0, 925, },
- { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x0, 904, },
- { 26, 1, 2, 0x0000018200000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x40, 1157, },
- { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x0, 926, },
- { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 26, 7, 0 }, 0x40, 1025, },
- { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x40, 1002, },
- { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x0, 1027, },
- { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 23, 57, 26, 0 }, 0x0, 1003, },
- { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 22, 57, 26, 0 }, 0x0, 929, },
- { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x0, 908, },
- { 26, 1, 2, 0x0000018a00000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x40, 1160, },
- { 26, 1, 2, 0x000001a800000000ull, 0x000001ee00001000ull, { 22, 23, 59, 26, 0 }, 0x0, 1018, },
- { 26, 1, 2, 0x000001a800000000ull, 0x000001ee00001000ull, { 23, 22, 59, 26, 0 }, 0x0, 946, },
- { 26, 1, 2, 0x000001c200000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x40, 1161, },
- { 26, 1, 2, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 22, 7, 26, 0 }, 0x40, 1004, },
- { 26, 1, 2, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 22, 26, 7, 0 }, 0x40, 910, },
- { 26, 1, 2, 0x000001ca00000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x40, 1162, },
- { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x0, 1030, },
- { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 22, 26, 25, 0 }, 0x0, 1006, },
- { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 23, 26, 25, 0 }, 0x0, 932, },
- { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x0, 911, },
- { 27, 1, 2, 0x0000018600000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x40, 1165, },
- { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x0, 933, },
- { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 26, 7, 0 }, 0x40, 1032, },
- { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x40, 1009, },
- { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x0, 1034, },
- { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 23, 57, 26, 0 }, 0x0, 1010, },
- { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 22, 57, 26, 0 }, 0x0, 936, },
- { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x0, 915, },
- { 27, 1, 2, 0x0000018e00000000ull, 0x000001ee00001000ull, { 22, 23, 55, 26, 0 }, 0x40, 1168, },
- { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 23, 56, 26, 0 }, 0x0, 1044, },
- { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 23, 58, 26, 0 }, 0x0, 1020, },
- { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 22, 58, 26, 0 }, 0x0, 948, },
- { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 22, 56, 26, 0 }, 0x0, 924, },
- { 27, 1, 2, 0x000001c600000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x40, 1169, },
- { 27, 1, 2, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 22, 7, 26, 0 }, 0x40, 1011, },
- { 27, 1, 2, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 22, 26, 7, 0 }, 0x40, 917, },
- { 27, 1, 2, 0x000001ce00000000ull, 0x000001ee00001000ull, { 23, 22, 55, 26, 0 }, 0x40, 1170, },
- { 28, 3, 1, 0x0000008808000000ull, 0x000001fff8000000ull, { 24, 33, 25, 1, 2 }, 0x0, 254, },
- { 29, 3, 1, 0x0000008008000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 255, },
- { 30, 3, 1, 0x0000008048000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 256, },
- { 31, 3, 1, 0x0000008088000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 257, },
- { 32, 3, 1, 0x00000080c8000000ull, 0x000001fff8000000ull, { 24, 33, 25, 2, 0 }, 0x0, 258, },
- { 34, 4, 0, 0x0000000010000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x224, 18, },
- { 36, 2, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 985, },
- { 37, 2, 1, 0x00000000c8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 986, },
- { 39, 2, 1, 0x0000008000000000ull, 0x000001e000000000ull, { 24, 25, 26, 47, 72 }, 0x0, 19, },
- { 39, 2, 1, 0x000000a600000000ull, 0x000001ee04000000ull, { 24, 25, 45, 73, 0 }, 0x0, 2511, },
- { 39, 2, 1, 0x000000a604000000ull, 0x000001ee04000000ull, { 24, 55, 45, 73, 0 }, 0x0, 2512, },
- { 39, 2, 1, 0x000000ae00000000ull, 0x000001ee00000000ull, { 24, 48, 26, 46, 73 }, 0x0, 20, },
- { 43, 4, 0, 0x0000000080000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x20, 21, },
- { 48, 2, 1, 0x000000a400000000ull, 0x000001ee00002000ull, { 24, 26, 76, 73, 0 }, 0x0, 2406, },
- { 50, 5, 1, 0x0000000080000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 23, },
- { 51, 5, 1, 0x0000010008000000ull, 0x000001fff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 1923, },
- { 52, 5, 1, 0x00000000b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1924, },
- { 52, 5, 1, 0x00000000b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 25, },
- { 53, 5, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1925, },
- { 53, 5, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 26, },
- { 54, 5, 1, 0x0000000160000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 27, },
- { 55, 5, 1, 0x0000000168000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 28, },
- { 57, 3, 0, 0x0000002180000000ull, 0x000001fff8000000ull, { 26, 0, 0, 0, 0 }, 0x0, 29, },
- { 58, 5, 0, 0x0000000040000000ull, 0x000001eff8000000ull, { 79, 0, 0, 0, 0 }, 0x0, 1926, },
- { 58, 5, 0, 0x0000000040000000ull, 0x000001eff8000000ull, { 79, 0, 0, 0, 0 }, 0x40, 30, },
- { 59, 5, 2, 0x000000a000000000ull, 0x000001e000001000ull, { 22, 23, 19, 60, 0 }, 0x0, 1049, },
- { 59, 5, 2, 0x000000a000000000ull, 0x000001e000001000ull, { 23, 22, 19, 60, 0 }, 0x40, 1190, },
- { 60, 5, 0, 0x0000000028000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 1927, },
- { 60, 5, 0, 0x0000000028000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x40, 31, },
- { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 22, 23, 19, 20, 0 }, 0x0, 796, },
- { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 22, 23, 19, 20, 0 }, 0x40, 797, },
- { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 22, 23, 20, 19, 0 }, 0x0, 939, },
- { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 22, 23, 20, 19, 0 }, 0x40, 940, },
- { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 23, 22, 19, 20, 0 }, 0x0, 1171, },
- { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 23, 22, 19, 20, 0 }, 0x40, 1172, },
- { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 23, 22, 20, 19, 0 }, 0x0, 1178, },
- { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 23, 22, 20, 19, 0 }, 0x40, 1179, },
- { 62, 5, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 894, },
- { 62, 5, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x40, 895, },
- { 62, 5, 1, 0x00000000e0000000ull, 0x000001e3f8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 2509, },
- { 62, 5, 1, 0x0000010008000000ull, 0x000001fff80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 2510, },
- { 63, 3, 1, 0x0000008488000000ull, 0x000001fff8000000ull, { 24, 33, 71, 0, 0 }, 0x0, 259, },
- { 64, 3, 1, 0x00000084c8000000ull, 0x000001fff8000000ull, { 24, 33, 71, 0, 0 }, 0x0, 260, },
- { 67, 3, 0, 0x0000000060000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x21, 32, },
- { 68, 5, 1, 0x0000010000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1961, },
- { 68, 5, 1, 0x0000010000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 33, },
- { 69, 5, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1962, },
- { 69, 5, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 34, },
- { 70, 5, 1, 0x0000000080000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1879, },
- { 71, 5, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1963, },
- { 71, 5, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 35, },
- { 72, 5, 1, 0x00000001c8000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1022, },
- { 73, 5, 1, 0x0000010000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 1966, },
- { 74, 5, 1, 0x0000014000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1969, },
- { 74, 5, 1, 0x0000014000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 37, },
- { 75, 5, 1, 0x0000000088000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 38, },
- { 76, 5, 1, 0x0000000088000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 39, },
- { 77, 5, 1, 0x0000018000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1972, },
- { 77, 5, 1, 0x0000018000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 40, },
- { 78, 5, 1, 0x0000018000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 1975, },
- { 79, 5, 1, 0x0000010008000000ull, 0x000001fff80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 1978, },
- { 80, 5, 1, 0x0000000170000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 43, },
- { 81, 5, 1, 0x0000002080000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 44, },
- { 82, 5, 1, 0x0000000140000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 45, },
- { 83, 5, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1979, },
- { 83, 5, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 46, },
- { 84, 5, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1980, },
- { 84, 5, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 47, },
- { 85, 5, 1, 0x0000002180000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 798, },
- { 85, 5, 1, 0x0000002180000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 799, },
- { 85, 5, 1, 0x0000002188000000ull, 0x000001eff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 941, },
- { 86, 5, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 896, },
- { 86, 5, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x40, 897, },
- { 87, 5, 1, 0x0000013000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1997, },
- { 87, 5, 1, 0x0000013000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 48, },
- { 88, 5, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1998, },
- { 88, 5, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 49, },
- { 89, 5, 1, 0x0000002080000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1887, },
- { 90, 5, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1999, },
- { 90, 5, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 50, },
- { 91, 5, 1, 0x0000013000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 2000, },
- { 92, 5, 1, 0x0000017000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2001, },
- { 92, 5, 1, 0x0000017000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 52, },
- { 93, 5, 1, 0x0000002088000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 53, },
- { 94, 5, 1, 0x0000002088000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 54, },
- { 95, 5, 1, 0x000001b000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2002, },
- { 95, 5, 1, 0x000001b000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 55, },
- { 96, 5, 1, 0x000001b000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 2003, },
- { 97, 5, 2, 0x0000002200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x0, 2004, },
- { 97, 5, 2, 0x0000002200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x40, 57, },
- { 98, 5, 2, 0x0000003200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x0, 2005, },
- { 98, 5, 2, 0x0000003200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x40, 58, },
- { 99, 5, 2, 0x0000000200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x0, 2006, },
- { 99, 5, 2, 0x0000000200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x40, 59, },
- { 100, 5, 2, 0x0000001200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x0, 2007, },
- { 100, 5, 2, 0x0000001200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x40, 60, },
- { 101, 5, 1, 0x000001c000000000ull, 0x000001f000000000ull, { 18, 20, 21, 19, 0 }, 0x0, 61, },
- { 102, 5, 0, 0x0000000020000000ull, 0x000001eff8000000ull, { 50, 51, 0, 0, 0 }, 0x0, 2008, },
- { 102, 5, 0, 0x0000000020000000ull, 0x000001eff8000000ull, { 50, 51, 0, 0, 0 }, 0x40, 62, },
- { 103, 5, 1, 0x0000014008000000ull, 0x000001fff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 2011, },
- { 104, 5, 1, 0x00000001a0000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 64, },
- { 105, 5, 1, 0x00000001e0000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1840, },
- { 106, 3, 0, 0x0000000100000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 65, },
- { 108, 5, 1, 0x0000000178000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 66, },
- { 113, 3, 1, 0x0000008708000000ull, 0x000001ffc8000000ull, { 24, 19, 0, 0, 0 }, 0x0, 2317, },
- { 118, 4, 0, 0x0000004008000000ull, 0x000001e1f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 399, },
- { 118, 5, 0, 0x000000000c000000ull, 0x000001e3fc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 813, },
- { 118, 2, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x2, 959, },
- { 118, 3, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 1050, },
- { 118, 6, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 69, 0, 0, 0, 0 }, 0x0, 2507, },
- { 118, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 65, 0, 0, 0, 0 }, 0x0, 67, },
- { 123, 3, 0, 0x0000000080000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 68, },
- { 123, 3, 0, 0x0000000090000000ull, 0x000001eff8000000ull, { 24, 0, 0, 0, 0 }, 0x0, 781, },
- { 123, 3, 0, 0x0000000098000000ull, 0x000001eff8000000ull, { 18, 0, 0, 0, 0 }, 0x0, 782, },
- { 124, 3, 0, 0x0000002170000000ull, 0x000001eff8000000ull, { 25, 0, 0, 0, 0 }, 0xc, 707, },
- { 125, 3, 1, 0x0000002070000000ull, 0x000001eff8000000ull, { 30, 25, 0, 0, 0 }, 0x8, 708, },
- { 125, 3, 1, 0x0000002078000000ull, 0x000001eff8000000ull, { 31, 25, 0, 0, 0 }, 0x8, 961, },
- { 127, 3, 1, 0x0000008000000000ull, 0x000001fff8000000ull, { 24, 33, 0, 0, 0 }, 0x0, 69, },
- { 127, 3, 1, 0x0000009000000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x400, 70, },
- { 127, 3, 1, 0x000000a000000000ull, 0x000001eff0000000ull, { 24, 33, 62, 0, 0 }, 0x400, 71, },
- { 128, 3, 2, 0x0000008a08000000ull, 0x000001fff8000000ull, { 24, 1, 33, 0, 0 }, 0x0, 72, },
- { 129, 3, 1, 0x0000008040000000ull, 0x000001fff8000000ull, { 24, 33, 0, 0, 0 }, 0x0, 73, },
- { 129, 3, 1, 0x0000009040000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x400, 74, },
- { 129, 3, 1, 0x000000a040000000ull, 0x000001eff0000000ull, { 24, 33, 62, 0, 0 }, 0x400, 75, },
- { 130, 3, 1, 0x0000008080000000ull, 0x000001fff8000000ull, { 24, 33, 0, 0, 0 }, 0x0, 76, },
- { 130, 3, 1, 0x0000009080000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x400, 77, },
- { 130, 3, 1, 0x000000a080000000ull, 0x000001eff0000000ull, { 24, 33, 62, 0, 0 }, 0x400, 78, },
- { 131, 3, 1, 0x00000080c0000000ull, 0x000001fff8000000ull, { 24, 33, 0, 0, 0 }, 0x0, 79, },
- { 131, 3, 1, 0x00000080c0000000ull, 0x000001fff8000000ull, { 24, 33, 83, 0, 0 }, 0x0, 1122, },
- { 131, 3, 1, 0x00000090c0000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x400, 80, },
- { 131, 3, 1, 0x000000a0c0000000ull, 0x000001eff0000000ull, { 24, 33, 62, 0, 0 }, 0x400, 81, },
- { 132, 3, 1, 0x000000c6c0000000ull, 0x000001fff8000000ull, { 18, 33, 0, 0, 0 }, 0x0, 891, },
- { 132, 3, 1, 0x000000d6c0000000ull, 0x000001fff8000000ull, { 18, 33, 25, 0, 0 }, 0x400, 892, },
- { 132, 3, 1, 0x000000e6c0000000ull, 0x000001eff0000000ull, { 18, 33, 62, 0, 0 }, 0x400, 893, },
- { 133, 3, 1, 0x000000c040000000ull, 0x000001fff8000000ull, { 18, 33, 0, 0, 0 }, 0x0, 82, },
- { 133, 3, 1, 0x000000d040000000ull, 0x000001fff8000000ull, { 18, 33, 25, 0, 0 }, 0x400, 83, },
- { 133, 3, 1, 0x000000e040000000ull, 0x000001eff0000000ull, { 18, 33, 62, 0, 0 }, 0x400, 84, },
- { 134, 3, 1, 0x000000c0c0000000ull, 0x000001fff8000000ull, { 18, 33, 0, 0, 0 }, 0x0, 85, },
- { 134, 3, 1, 0x000000d0c0000000ull, 0x000001fff8000000ull, { 18, 33, 25, 0, 0 }, 0x400, 86, },
- { 134, 3, 1, 0x000000e0c0000000ull, 0x000001eff0000000ull, { 18, 33, 62, 0, 0 }, 0x400, 87, },
- { 135, 3, 1, 0x000000c000000000ull, 0x000001fff8000000ull, { 18, 33, 0, 0, 0 }, 0x0, 88, },
- { 135, 3, 1, 0x000000d000000000ull, 0x000001fff8000000ull, { 18, 33, 25, 0, 0 }, 0x400, 89, },
- { 135, 3, 1, 0x000000e000000000ull, 0x000001eff0000000ull, { 18, 33, 62, 0, 0 }, 0x400, 90, },
- { 136, 3, 2, 0x000000c048000000ull, 0x000001fff8000000ull, { 18, 19, 33, 0, 0 }, 0x0, 91, },
- { 136, 3, 2, 0x000000d048000000ull, 0x000001fff8000000ull, { 18, 19, 33, 6, 0 }, 0x400, 92, },
- { 137, 3, 2, 0x000000c0c8000000ull, 0x000001fff8000000ull, { 18, 19, 33, 0, 0 }, 0x0, 93, },
- { 137, 3, 2, 0x000000d0c8000000ull, 0x000001fff8000000ull, { 18, 19, 33, 6, 0 }, 0x400, 94, },
- { 138, 3, 2, 0x000000c088000000ull, 0x000001fff8000000ull, { 18, 19, 33, 0, 0 }, 0x0, 95, },
- { 138, 3, 2, 0x000000d088000000ull, 0x000001fff8000000ull, { 18, 19, 33, 5, 0 }, 0x400, 96, },
- { 139, 3, 1, 0x000000c080000000ull, 0x000001fff8000000ull, { 18, 33, 0, 0, 0 }, 0x0, 97, },
- { 139, 3, 1, 0x000000d080000000ull, 0x000001fff8000000ull, { 18, 33, 25, 0, 0 }, 0x400, 98, },
- { 139, 3, 1, 0x000000e080000000ull, 0x000001eff0000000ull, { 18, 33, 62, 0, 0 }, 0x400, 99, },
- { 142, 3, 0, 0x000000cb00000000ull, 0x000001fff8000000ull, { 33, 0, 0, 0, 0 }, 0x0, 100, },
- { 142, 3, 0, 0x000000db00000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x400, 101, },
- { 142, 3, 0, 0x000000eb00000000ull, 0x000001eff0000000ull, { 33, 62, 0, 0, 0 }, 0x400, 102, },
- { 143, 3, 0, 0x0000000050000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x21, 103, },
- { 151, 3, 0, 0x0000000110000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 104, },
- { 152, 2, 1, 0x000000e880000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1841, },
- { 153, 2, 1, 0x000000ea80000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1842, },
- { 154, 2, 1, 0x000000f880000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1843, },
- { 155, 1, 1, 0x0000010800000000ull, 0x000001fff80fe000ull, { 24, 26, 0, 0, 0 }, 0x0, 105, },
- { 155, 1, 1, 0x0000010800000000ull, 0x000001ee07f00000ull, { 24, 63, 0, 0, 0 }, 0x40, 106, },
- { 155, 1, 1, 0x0000012000000000ull, 0x000001e000300000ull, { 24, 66, 0, 0, 0 }, 0x40, 107, },
- { 155, 5, 1, 0x0000000080000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 108, },
- { 155, 2, 1, 0x0000000e00100000ull, 0x000001ee00f00000ull, { 15, 25, 0, 0, 0 }, 0x40, 109, },
- { 155, 2, 1, 0x0000000e00000000ull, 0x000001ee00f00000ull, { 15, 25, 78, 0, 0 }, 0x0, 2391, },
- { 155, 2, 1, 0x0000000188000000ull, 0x000001eff8000000ull, { 24, 16, 0, 0, 0 }, 0x0, 111, },
- { 155, 2, 1, 0x0000000600000000ull, 0x000001ee00000000ull, { 9, 25, 64, 0, 0 }, 0x0, 112, },
- { 155, 2, 1, 0x0000000400000000ull, 0x000001ee00000000ull, { 10, 68, 0, 0, 0 }, 0x0, 113, },
- { 155, 2, 1, 0x0000000180000000ull, 0x000001eff8000000ull, { 24, 8, 0, 0, 0 }, 0x0, 114, },
- { 155, 2, 1, 0x0000000198000000ull, 0x000001eff8000000ull, { 24, 9, 0, 0, 0 }, 0x0, 115, },
- { 155, 2, 1, 0x0000000150000000ull, 0x000001eff8000000ull, { 14, 25, 0, 0, 0 }, 0x0, 962, },
- { 155, 2, 1, 0x0000000050000000ull, 0x000001eff8000000ull, { 14, 55, 0, 0, 0 }, 0x0, 963, },
- { 155, 2, 1, 0x0000000190000000ull, 0x000001eff8000000ull, { 24, 14, 0, 0, 0 }, 0x0, 964, },
- { 155, 3, 1, 0x0000000140000000ull, 0x000001eff8000000ull, { 14, 55, 0, 0, 0 }, 0x0, 1051, },
- { 155, 3, 1, 0x0000002150000000ull, 0x000001eff8000000ull, { 14, 25, 0, 0, 0 }, 0x0, 1052, },
- { 155, 3, 1, 0x0000002110000000ull, 0x000001eff8000000ull, { 24, 14, 0, 0, 0 }, 0x0, 1053, },
- { 155, 3, 1, 0x0000002160000000ull, 0x000001eff8000000ull, { 17, 25, 0, 0, 0 }, 0x8, 116, },
- { 155, 3, 1, 0x0000002120000000ull, 0x000001eff8000000ull, { 24, 17, 0, 0, 0 }, 0x8, 117, },
- { 155, 3, 1, 0x0000002168000000ull, 0x000001eff8000000ull, { 12, 25, 0, 0, 0 }, 0x8, 118, },
- { 155, 3, 1, 0x0000002148000000ull, 0x000001eff8000000ull, { 13, 25, 0, 0, 0 }, 0x0, 119, },
- { 155, 3, 1, 0x0000002128000000ull, 0x000001eff8000000ull, { 24, 11, 0, 0, 0 }, 0x8, 120, },
- { 155, 3, 1, 0x0000002108000000ull, 0x000001eff8000000ull, { 24, 13, 0, 0, 0 }, 0x0, 121, },
- { 155, 3, 1, 0x0000002000000000ull, 0x000001eff8000000ull, { 38, 25, 0, 0, 0 }, 0x8, 122, },
- { 155, 3, 1, 0x0000002008000000ull, 0x000001eff8000000ull, { 29, 25, 0, 0, 0 }, 0x8, 123, },
- { 155, 3, 1, 0x0000002010000000ull, 0x000001eff8000000ull, { 32, 25, 0, 0, 0 }, 0x8, 124, },
- { 155, 3, 1, 0x0000002018000000ull, 0x000001eff8000000ull, { 35, 25, 0, 0, 0 }, 0x8, 125, },
- { 155, 3, 1, 0x0000002020000000ull, 0x000001eff8000000ull, { 36, 25, 0, 0, 0 }, 0x8, 126, },
- { 155, 3, 1, 0x0000002028000000ull, 0x000001eff8000000ull, { 37, 25, 0, 0, 0 }, 0x8, 127, },
- { 155, 3, 1, 0x0000002030000000ull, 0x000001eff8000000ull, { 34, 25, 0, 0, 0 }, 0x8, 128, },
- { 155, 3, 1, 0x0000002080000000ull, 0x000001eff8000000ull, { 24, 38, 0, 0, 0 }, 0x8, 129, },
- { 155, 3, 1, 0x0000002088000000ull, 0x000001eff8000000ull, { 24, 29, 0, 0, 0 }, 0x8, 130, },
- { 155, 3, 1, 0x0000002090000000ull, 0x000001eff8000000ull, { 24, 32, 0, 0, 0 }, 0x8, 131, },
- { 155, 3, 1, 0x0000002098000000ull, 0x000001eff8000000ull, { 24, 35, 0, 0, 0 }, 0x8, 132, },
- { 155, 3, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 24, 36, 0, 0, 0 }, 0x8, 133, },
- { 155, 3, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 24, 37, 0, 0, 0 }, 0x0, 134, },
- { 155, 3, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 24, 34, 0, 0, 0 }, 0x8, 135, },
- { 155, 3, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 24, 28, 0, 0, 0 }, 0x0, 136, },
- { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 24, 14, 0, 0, 0 }, 0x0, 137, },
- { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 14, 55, 0, 0, 0 }, 0x0, 138, },
- { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 14, 25, 0, 0, 0 }, 0x0, 139, },
- { 156, 6, 1, 0x000000c000000000ull, 0x000001e000100000ull, { 24, 70, 0, 0, 0 }, 0x0, 140, },
- { 157, 2, 1, 0x000000eca0000000ull, 0x000001fff0000000ull, { 24, 25, 74, 0, 0 }, 0x0, 141, },
- { 158, 2, 1, 0x000000eea0000000ull, 0x000001fff0000000ull, { 24, 25, 75, 0, 0 }, 0x0, 142, },
- { 168, 4, 0, 0x0000004000000000ull, 0x000001e1f8000000ull, { 65, 0, 0, 0, 0 }, 0x0, 400, },
- { 168, 5, 0, 0x0000000008000000ull, 0x000001e3fc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 814, },
- { 168, 2, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x2, 965, },
- { 168, 3, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 65, 0, 0, 0, 0 }, 0x0, 1054, },
- { 168, 6, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 69, 0, 0, 0, 0 }, 0x0, 2508, },
- { 168, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 65, 0, 0, 0, 0 }, 0x0, 143, },
- { 175, 1, 1, 0x0000010070000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 144, },
- { 175, 1, 1, 0x0000010170000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 145, },
- { 178, 2, 1, 0x000000ea00000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2490, },
- { 179, 2, 1, 0x000000f820000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2393, },
- { 180, 1, 1, 0x0000010400000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 146, },
- { 181, 1, 1, 0x0000010600000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 147, },
- { 182, 1, 1, 0x0000011400000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 148, },
- { 183, 1, 1, 0x0000010450000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 149, },
- { 184, 1, 1, 0x0000010650000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 150, },
- { 185, 1, 1, 0x0000010470000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 151, },
- { 186, 1, 1, 0x0000010670000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 152, },
- { 187, 1, 1, 0x0000010520000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 800, },
- { 188, 1, 1, 0x0000010720000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 801, },
- { 189, 1, 1, 0x0000011520000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 802, },
- { 190, 2, 1, 0x000000e850000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2407, },
- { 191, 2, 1, 0x000000ea70000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 153, },
- { 192, 2, 1, 0x000000e810000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2408, },
- { 193, 2, 1, 0x000000ea30000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 154, },
- { 194, 2, 1, 0x000000ead0000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1844, },
- { 195, 2, 1, 0x000000e230000000ull, 0x000001ff30000000ull, { 24, 25, 26, 42, 0 }, 0x0, 155, },
- { 196, 2, 1, 0x000000e690000000ull, 0x000001fff0000000ull, { 24, 26, 0, 0, 0 }, 0x0, 156, },
- { 198, 3, 1, 0x00000021c0000000ull, 0x000001eff8000000ull, { 24, 26, 25, 0, 0 }, 0x0, 1845, },
- { 198, 3, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 24, 26, 49, 0, 0 }, 0x0, 1846, },
- { 198, 3, 0, 0x0000002188000000ull, 0x000001eff8000000ull, { 26, 49, 0, 0, 0 }, 0x0, 1870, },
- { 199, 2, 1, 0x000000e8b0000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 157, },
- { 200, 2, 1, 0x000000e240000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 158, },
- { 200, 2, 1, 0x000000ee50000000ull, 0x000001fff0000000ull, { 24, 25, 39, 0, 0 }, 0x0, 159, },
- { 201, 2, 1, 0x000000f040000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 160, },
- { 201, 2, 1, 0x000000fc50000000ull, 0x000001fff0000000ull, { 24, 25, 39, 0, 0 }, 0x0, 161, },
- { 202, 1, 1, 0x0000010680000000ull, 0x000001ffe0000000ull, { 24, 25, 41, 26, 0 }, 0x0, 162, },
- { 203, 2, 1, 0x000000e220000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 163, },
- { 203, 2, 1, 0x000000e630000000ull, 0x000001fff0000000ull, { 24, 26, 43, 0, 0 }, 0x0, 164, },
- { 204, 2, 1, 0x000000f020000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 165, },
- { 204, 2, 1, 0x000000f430000000ull, 0x000001fff0000000ull, { 24, 26, 43, 0, 0 }, 0x0, 166, },
- { 205, 1, 1, 0x00000106c0000000ull, 0x000001ffe0000000ull, { 24, 25, 41, 26, 0 }, 0x0, 167, },
- { 206, 1, 1, 0x0000010420000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 168, },
- { 207, 1, 1, 0x0000010620000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 169, },
- { 208, 1, 1, 0x0000011420000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 170, },
- { 209, 3, 0, 0x0000002048000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0x8, 993, },
- { 209, 3, 0, 0x0000002050000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0xc, 902, },
- { 209, 3, 0, 0x00000021a0000000ull, 0x000001eff8000000ull, { 26, 0, 0, 0, 0 }, 0x8, 783, },
- { 210, 3, 0, 0x0000002060000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0x8, 709, },
- { 215, 4, 0, 0x0000000040000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x22c, 171, },
- { 216, 3, 0, 0x0000000038000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x8, 172, },
- { 217, 3, 0, 0x0000000028000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x0, 173, },
- { 226, 3, 1, 0x000000c708000000ull, 0x000001ffc8000000ull, { 18, 25, 0, 0, 0 }, 0x0, 2318, },
- { 227, 2, 1, 0x000000a600000000ull, 0x000001ee04000000ull, { 24, 25, 45, 0, 0 }, 0x140, 174, },
- { 227, 2, 1, 0x000000f240000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 175, },
- { 228, 1, 1, 0x0000010080000000ull, 0x000001efe0000000ull, { 24, 25, 40, 26, 0 }, 0x0, 176, },
- { 229, 1, 1, 0x00000100c0000000ull, 0x000001efe0000000ull, { 24, 25, 40, 26, 0 }, 0x0, 177, },
- { 230, 2, 1, 0x000000a400000000ull, 0x000001ee00002000ull, { 24, 26, 76, 0, 0 }, 0x140, 2414, },
- { 230, 2, 1, 0x000000f220000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 179, },
- { 231, 2, 1, 0x000000ac00000000ull, 0x000001ee00000000ull, { 24, 25, 26, 44, 0 }, 0x0, 180, },
- { 236, 3, 0, 0x0000000180000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 711, },
- { 237, 3, 0, 0x0000000030000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x8, 181, },
- { 239, 3, 1, 0x0000008c00000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 182, },
- { 239, 3, 1, 0x000000ac00000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 183, },
- { 240, 3, 1, 0x0000008c08000000ull, 0x000001fff8000000ull, { 33, 25, 1, 0, 0 }, 0x0, 184, },
- { 241, 3, 1, 0x0000008c40000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 185, },
- { 241, 3, 1, 0x000000ac40000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 186, },
- { 242, 3, 1, 0x0000008c80000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 187, },
- { 242, 3, 1, 0x000000ac80000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 188, },
- { 243, 3, 1, 0x0000008cc0000000ull, 0x000001fff8000000ull, { 33, 25, 0, 0, 0 }, 0x0, 189, },
- { 243, 3, 1, 0x000000acc0000000ull, 0x000001eff0000000ull, { 33, 25, 61, 0, 0 }, 0x400, 190, },
- { 244, 3, 1, 0x000000cec0000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 2321, },
- { 244, 3, 1, 0x000000eec0000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 2322, },
- { 245, 3, 1, 0x000000cc40000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 191, },
- { 245, 3, 1, 0x000000ec40000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 192, },
- { 246, 3, 1, 0x000000ccc0000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 193, },
- { 246, 3, 1, 0x000000ecc0000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 194, },
- { 247, 3, 1, 0x000000cc00000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 195, },
- { 247, 3, 1, 0x000000ec00000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 196, },
- { 248, 3, 1, 0x000000cc80000000ull, 0x000001fff8000000ull, { 33, 19, 0, 0, 0 }, 0x0, 197, },
- { 248, 3, 1, 0x000000ec80000000ull, 0x000001eff0000000ull, { 33, 19, 61, 0, 0 }, 0x400, 198, },
- { 249, 1, 1, 0x0000010028000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 199, },
- { 249, 1, 1, 0x0000010020000000ull, 0x000001eff8000000ull, { 24, 25, 26, 4, 0 }, 0x0, 200, },
- { 249, 1, 1, 0x0000010128000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 201, },
- { 250, 3, 0, 0x0000000020000000ull, 0x000001ee78000000ull, { 67, 0, 0, 0, 0 }, 0x0, 202, },
- { 251, 2, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 203, },
- { 252, 2, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 204, },
- { 253, 2, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 205, },
- { 254, 3, 0, 0x0000000198000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 968, },
- { 255, 3, 1, 0x00000020f8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x8, 206, },
- { 256, 2, 2, 0x000000a000000000ull, 0x000001fe00003000ull, { 22, 23, 26, 76, 0 }, 0x0, 2513, },
- { 256, 2, 2, 0x000000a000000000ull, 0x000001fe00003000ull, { 23, 22, 26, 76, 0 }, 0x40, 1745, },
- { 257, 3, 1, 0x00000020d0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 207, },
- { 258, 2, 2, 0x000000a000002000ull, 0x000001fe00003000ull, { 22, 23, 26, 0, 0 }, 0x0, 2515, },
- { 258, 2, 2, 0x000000a000002000ull, 0x000001fe00003000ull, { 23, 22, 26, 0, 0 }, 0x40, 1747, },
- { 259, 3, 1, 0x00000020f0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x8, 208, },
- { 261, 3, 1, 0x00000020d8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 209, },
- { 265, 2, 1, 0x000000e840000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 949, },
- { 266, 2, 1, 0x000000ea40000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 950, },
- { 267, 2, 1, 0x000000f840000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 951, },
- { 275, 3, 1, 0x0000008208000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 210, },
- { 276, 3, 1, 0x0000008248000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 211, },
- { 277, 3, 1, 0x0000008288000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 212, },
- { 278, 3, 1, 0x00000082c8000000ull, 0x000001fff8000000ull, { 24, 33, 25, 0, 0 }, 0x0, 213, },
- { 280, 5, 1, 0x000001d000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 997, },
- { 280, 5, 1, 0x000001d000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 1045, },
- { 281, 5, 1, 0x000001d000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 998, },
- { 282, 1, 1, 0x0000010078000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 214, },
- { 282, 1, 1, 0x0000010178000000ull, 0x000001eff8000000ull, { 24, 55, 26, 0, 0 }, 0x0, 215, },
- { 285, 2, 1, 0x0000000080000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 216, },
- { 286, 2, 1, 0x0000000088000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 217, },
- { 287, 2, 1, 0x0000000090000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 218, },
+ { 7, 1, 1, 0x0000010c00000000ull, 0x000001ee00000000ull, { 24, 64, 26, 0, 0 }, 0x0, 6, },
+ { 8, 1, 1, 0x0000010800000000ull, 0x000001ee00000000ull, { 24, 64, 26, 0, 0 }, 0x0, 7, },
+ { 9, 3, 1, 0x0000002c00000000ull, 0x000001ee00000000ull, { 24, 3, 53, 54, 55 }, 0x221, 8, },
+ { 9, 3, 1, 0x0000002c00000000ull, 0x000001ee00000000ull, { 24, 53, 54, 55, 0 }, 0x261, 9, },
+ { 10, 1, 1, 0x0000010060000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 10, },
+ { 10, 1, 1, 0x0000010160000000ull, 0x000001eff8000000ull, { 24, 56, 26, 0, 0 }, 0x0, 11, },
+ { 11, 1, 1, 0x0000010068000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 12, },
+ { 11, 1, 1, 0x0000010168000000ull, 0x000001eff8000000ull, { 24, 56, 26, 0, 0 }, 0x0, 13, },
+ { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011ffull, { 16, 0, 0, 0, 0 }, 0x40, 969, },
+ { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x0, 825, },
+ { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x40, 826, },
+ { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x200, 2234, },
+ { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 16, 0, 0, 0, 0 }, 0x240, 2235, },
+ { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 15, 16, 0, 0, 0 }, 0x0, 582, },
+ { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 15, 16, 0, 0, 0 }, 0x40, 583, },
+ { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011ffull, { 82, 0, 0, 0, 0 }, 0x40, 990, },
+ { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x0, 827, },
+ { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x40, 828, },
+ { 14, 4, 0, 0x0000008000000080ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x210, 3029, },
+ { 14, 4, 0, 0x0000008000000080ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x250, 3030, },
+ { 14, 4, 0, 0x0000008000000140ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x30, 590, },
+ { 14, 4, 0, 0x0000008000000140ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x70, 591, },
+ { 14, 4, 0, 0x0000008000000180ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x230, 588, },
+ { 14, 4, 0, 0x0000008000000180ull, 0x000001ee000011c0ull, { 82, 0, 0, 0, 0 }, 0x270, 589, },
+ { 14, 4, 1, 0x000000a000000000ull, 0x000001ee00001000ull, { 15, 82, 0, 0, 0 }, 0x0, 584, },
+ { 14, 4, 1, 0x000000a000000000ull, 0x000001ee00001000ull, { 15, 82, 0, 0, 0 }, 0x40, 585, },
+ { 15, 4, 0, 0x0000000000000000ull, 0x000001e1f8000000ull, { 66, 0, 0, 0, 0 }, 0x0, 537, },
+ { 15, 5, 0, 0x0000000000000000ull, 0x000001e3f8000000ull, { 66, 0, 0, 0, 0 }, 0x0, 960, },
+ { 15, 2, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 66, 0, 0, 0, 0 }, 0x2, 1138, },
+ { 15, 3, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 66, 0, 0, 0, 0 }, 0x0, 1263, },
+ { 15, 6, 0, 0x0000000000000000ull, 0x000001eff8000000ull, { 70, 0, 0, 0, 0 }, 0x0, 3033, },
+ { 15, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 66, 0, 0, 0, 0 }, 0x0, 16, },
+ { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011ffull, { 83, 0, 0, 0, 0 }, 0x40, 1023, },
+ { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011c0ull, { 83, 0, 0, 0, 0 }, 0x0, 829, },
+ { 16, 6, 0, 0x0000018000000000ull, 0x000001ee000011c0ull, { 83, 0, 0, 0, 0 }, 0x40, 830, },
+ { 16, 6, 1, 0x000001a000000000ull, 0x000001ee00001000ull, { 15, 83, 0, 0, 0 }, 0x0, 586, },
+ { 16, 6, 1, 0x000001a000000000ull, 0x000001ee00001000ull, { 15, 83, 0, 0, 0 }, 0x40, 587, },
+ { 17, 4, 0, 0x0000004080000000ull, 0x000001e9f8000018ull, { 16, 78, 0, 0, 0 }, 0x20, 2852, },
+ { 17, 4, 0, 0x000000e000000000ull, 0x000001e800000018ull, { 82, 78, 0, 0, 0 }, 0x20, 2853, },
+ { 18, 4, 0, 0x0000000060000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x2c, 222, },
+ { 22, 2, 0, 0x0000000200000000ull, 0x000001ee00000000ull, { 25, 81, 0, 0, 0 }, 0x0, 2239, },
+ { 22, 3, 0, 0x0000000800000000ull, 0x000001ee00000000ull, { 24, 82, 0, 0, 0 }, 0x0, 226, },
+ { 22, 3, 0, 0x0000000c00000000ull, 0x000001ee00000000ull, { 18, 82, 0, 0, 0 }, 0x0, 227, },
+ { 22, 3, 0, 0x0000002200000000ull, 0x000001ee00000000ull, { 25, 81, 0, 0, 0 }, 0x0, 2240, },
+ { 22, 3, 0, 0x0000002600000000ull, 0x000001ee00000000ull, { 19, 81, 0, 0, 0 }, 0x0, 2241, },
+ { 22, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 25, 81, 0, 0, 0 }, 0x0, 2242, },
+ { 25, 4, 0, 0x0000000020000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x224, 18, },
+ { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x0, 1222, },
+ { 26, 1, 1, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 25, 26, 0, 0 }, 0x40, 1223, },
+ { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 22, 26, 25, 0 }, 0x0, 1181, },
+ { 26, 1, 1, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 26, 25, 0, 0 }, 0x40, 1182, },
+ { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 23, 26, 25, 0 }, 0x0, 1090, },
+ { 26, 1, 1, 0x0000018000000000ull, 0x000001fe00001000ull, { 22, 26, 25, 0, 0 }, 0x40, 1091, },
+ { 26, 1, 2, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x0, 1052, },
+ { 26, 1, 1, 0x0000018000000000ull, 0x000001fe00001000ull, { 23, 25, 26, 0, 0 }, 0x40, 1053, },
+ { 26, 1, 2, 0x0000018200000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x40, 1376, },
+ { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x0, 1092, },
+ { 26, 1, 1, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 7, 26, 0, 0 }, 0x40, 1093, },
+ { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 26, 7, 0 }, 0x40, 1226, },
+ { 26, 1, 1, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 26, 7, 0, 0 }, 0x40, 1227, },
+ { 26, 1, 2, 0x0000019000000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x40, 1187, },
+ { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 23, 56, 26, 0 }, 0x0, 1229, },
+ { 26, 1, 1, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 56, 26, 0, 0 }, 0x40, 1230, },
+ { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 23, 58, 26, 0 }, 0x0, 1188, },
+ { 26, 1, 1, 0x0000018800000000ull, 0x000001ee00001000ull, { 22, 58, 26, 0, 0 }, 0x40, 1189, },
+ { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 22, 58, 26, 0 }, 0x0, 1097, },
+ { 26, 1, 1, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 58, 26, 0, 0 }, 0x40, 1098, },
+ { 26, 1, 2, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 22, 56, 26, 0 }, 0x0, 1059, },
+ { 26, 1, 1, 0x0000018800000000ull, 0x000001ee00001000ull, { 23, 56, 26, 0, 0 }, 0x40, 1060, },
+ { 26, 1, 2, 0x0000018a00000000ull, 0x000001ee00001000ull, { 22, 23, 56, 26, 0 }, 0x40, 1381, },
+ { 26, 1, 2, 0x000001a800000000ull, 0x000001ee00001000ull, { 22, 23, 60, 26, 0 }, 0x0, 1214, },
+ { 26, 1, 1, 0x000001a800000000ull, 0x000001ee00001000ull, { 22, 60, 26, 0, 0 }, 0x40, 1215, },
+ { 26, 1, 2, 0x000001a800000000ull, 0x000001ee00001000ull, { 23, 22, 60, 26, 0 }, 0x0, 1125, },
+ { 26, 1, 1, 0x000001a800000000ull, 0x000001ee00001000ull, { 23, 60, 26, 0, 0 }, 0x40, 1126, },
+ { 26, 1, 2, 0x000001c200000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x40, 1382, },
+ { 26, 1, 2, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 22, 7, 26, 0 }, 0x40, 1190, },
+ { 26, 1, 1, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 7, 26, 0, 0 }, 0x40, 1191, },
+ { 26, 1, 2, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 22, 26, 7, 0 }, 0x40, 1063, },
+ { 26, 1, 1, 0x000001d000000000ull, 0x000001fe00001000ull, { 23, 26, 7, 0, 0 }, 0x40, 1064, },
+ { 26, 1, 2, 0x000001ca00000000ull, 0x000001ee00001000ull, { 23, 22, 56, 26, 0 }, 0x40, 1383, },
+ { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x0, 1235, },
+ { 27, 1, 1, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 25, 26, 0, 0 }, 0x40, 1236, },
+ { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 22, 26, 25, 0 }, 0x0, 1194, },
+ { 27, 1, 1, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 26, 25, 0, 0 }, 0x40, 1195, },
+ { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 23, 26, 25, 0 }, 0x0, 1103, },
+ { 27, 1, 1, 0x0000018400000000ull, 0x000001fe00001000ull, { 22, 26, 25, 0, 0 }, 0x40, 1104, },
+ { 27, 1, 2, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x0, 1065, },
+ { 27, 1, 1, 0x0000018400000000ull, 0x000001fe00001000ull, { 23, 25, 26, 0, 0 }, 0x40, 1066, },
+ { 27, 1, 2, 0x0000018600000000ull, 0x000001fe00001000ull, { 22, 23, 25, 26, 0 }, 0x40, 1388, },
+ { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x0, 1105, },
+ { 27, 1, 1, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 7, 26, 0, 0 }, 0x40, 1106, },
+ { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 26, 7, 0 }, 0x40, 1239, },
+ { 27, 1, 1, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 26, 7, 0, 0 }, 0x40, 1240, },
+ { 27, 1, 2, 0x0000019400000000ull, 0x000001fe00001000ull, { 22, 23, 7, 26, 0 }, 0x40, 1200, },
+ { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 23, 56, 26, 0 }, 0x0, 1242, },
+ { 27, 1, 1, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 56, 26, 0, 0 }, 0x40, 1243, },
+ { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 23, 58, 26, 0 }, 0x0, 1201, },
+ { 27, 1, 1, 0x0000018c00000000ull, 0x000001ee00001000ull, { 22, 58, 26, 0, 0 }, 0x40, 1202, },
+ { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 22, 58, 26, 0 }, 0x0, 1110, },
+ { 27, 1, 1, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 58, 26, 0, 0 }, 0x40, 1111, },
+ { 27, 1, 2, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 22, 56, 26, 0 }, 0x0, 1072, },
+ { 27, 1, 1, 0x0000018c00000000ull, 0x000001ee00001000ull, { 23, 56, 26, 0, 0 }, 0x40, 1073, },
+ { 27, 1, 2, 0x0000018e00000000ull, 0x000001ee00001000ull, { 22, 23, 56, 26, 0 }, 0x40, 1393, },
+ { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 23, 57, 26, 0 }, 0x0, 1259, },
+ { 27, 1, 1, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 57, 26, 0, 0 }, 0x40, 1260, },
+ { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 23, 59, 26, 0 }, 0x0, 1218, },
+ { 27, 1, 1, 0x000001ac00000000ull, 0x000001ee00001000ull, { 22, 59, 26, 0, 0 }, 0x40, 1219, },
+ { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 22, 59, 26, 0 }, 0x0, 1129, },
+ { 27, 1, 1, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 59, 26, 0, 0 }, 0x40, 1130, },
+ { 27, 1, 2, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 22, 57, 26, 0 }, 0x0, 1088, },
+ { 27, 1, 1, 0x000001ac00000000ull, 0x000001ee00001000ull, { 23, 57, 26, 0, 0 }, 0x40, 1089, },
+ { 27, 1, 2, 0x000001c600000000ull, 0x000001fe00001000ull, { 23, 22, 25, 26, 0 }, 0x40, 1394, },
+ { 27, 1, 2, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 22, 7, 26, 0 }, 0x40, 1203, },
+ { 27, 1, 1, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 7, 26, 0, 0 }, 0x40, 1204, },
+ { 27, 1, 2, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 22, 26, 7, 0 }, 0x40, 1076, },
+ { 27, 1, 1, 0x000001d400000000ull, 0x000001fe00001000ull, { 23, 26, 7, 0, 0 }, 0x40, 1077, },
+ { 27, 1, 2, 0x000001ce00000000ull, 0x000001ee00001000ull, { 23, 22, 56, 26, 0 }, 0x40, 1395, },
+ { 28, 3, 1, 0x0000008808000000ull, 0x000001fff8000000ull, { 24, 28, 25, 1, 2 }, 0x0, 259, },
+ { 28, 3, 1, 0x0000008808000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x40, 260, },
+ { 29, 3, 1, 0x0000008008000000ull, 0x000001fff8000000ull, { 24, 28, 25, 2, 0 }, 0x0, 261, },
+ { 29, 3, 1, 0x0000008008000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x40, 262, },
+ { 30, 3, 1, 0x0000008048000000ull, 0x000001fff8000000ull, { 24, 28, 25, 2, 0 }, 0x0, 263, },
+ { 30, 3, 1, 0x0000008048000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x40, 264, },
+ { 31, 3, 1, 0x0000008088000000ull, 0x000001fff8000000ull, { 24, 28, 25, 2, 0 }, 0x0, 265, },
+ { 31, 3, 1, 0x0000008088000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x40, 266, },
+ { 32, 3, 1, 0x00000080c8000000ull, 0x000001fff8000000ull, { 24, 28, 25, 2, 0 }, 0x0, 267, },
+ { 32, 3, 1, 0x00000080c8000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x40, 268, },
+ { 34, 4, 0, 0x0000000010000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x224, 19, },
+ { 36, 2, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 1167, },
+ { 37, 2, 1, 0x00000000c8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 1168, },
+ { 39, 2, 1, 0x0000008000000000ull, 0x000001e000000000ull, { 24, 25, 26, 47, 73 }, 0x0, 20, },
+ { 39, 2, 1, 0x000000a600000000ull, 0x000001ee04000000ull, { 24, 25, 45, 74, 0 }, 0x0, 3038, },
+ { 39, 2, 1, 0x000000a604000000ull, 0x000001ee04000000ull, { 24, 56, 45, 74, 0 }, 0x0, 3039, },
+ { 39, 2, 1, 0x000000ae00000000ull, 0x000001ee00000000ull, { 24, 48, 26, 46, 74 }, 0x0, 21, },
+ { 43, 4, 0, 0x0000000080000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x20, 22, },
+ { 48, 2, 1, 0x000000a400000000ull, 0x000001ee00002000ull, { 24, 26, 77, 74, 0 }, 0x0, 2870, },
+ { 50, 5, 1, 0x0000000080000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 24, },
+ { 51, 5, 1, 0x0000010008000000ull, 0x000001fff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 2291, },
+ { 52, 5, 1, 0x00000000b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2292, },
+ { 52, 5, 1, 0x00000000b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 26, },
+ { 53, 5, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2293, },
+ { 53, 5, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 27, },
+ { 54, 5, 1, 0x0000000160000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 28, },
+ { 55, 5, 1, 0x0000000168000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 29, },
+ { 57, 3, 0, 0x0000002180000000ull, 0x000001fff8000000ull, { 26, 0, 0, 0, 0 }, 0x0, 30, },
+ { 58, 5, 0, 0x0000000040000000ull, 0x000001eff8000000ull, { 80, 0, 0, 0, 0 }, 0x0, 2294, },
+ { 58, 5, 0, 0x0000000040000000ull, 0x000001eff8000000ull, { 80, 0, 0, 0, 0 }, 0x40, 31, },
+ { 59, 5, 2, 0x000000a000000000ull, 0x000001e000001000ull, { 22, 23, 19, 61, 0 }, 0x0, 1265, },
+ { 59, 5, 1, 0x000000a000000000ull, 0x000001e000001000ull, { 22, 19, 61, 0, 0 }, 0x40, 1266, },
+ { 59, 5, 2, 0x000000a000000000ull, 0x000001e000001000ull, { 23, 22, 19, 61, 0 }, 0x40, 1420, },
+ { 59, 5, 1, 0x000000a000000000ull, 0x000001e000001000ull, { 23, 19, 61, 0, 0 }, 0x40, 1421, },
+ { 60, 5, 0, 0x0000000028000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 2295, },
+ { 60, 5, 0, 0x0000000028000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x40, 32, },
+ { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 22, 23, 19, 20, 0 }, 0x0, 943, },
+ { 61, 5, 1, 0x0000008000000000ull, 0x000001fe00001000ull, { 22, 19, 20, 0, 0 }, 0x40, 944, },
+ { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 22, 23, 19, 20, 0 }, 0x40, 945, },
+ { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 22, 23, 20, 19, 0 }, 0x0, 1116, },
+ { 61, 5, 1, 0x0000009000000000ull, 0x000001fe00001000ull, { 22, 20, 19, 0, 0 }, 0x40, 1117, },
+ { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 22, 23, 20, 19, 0 }, 0x40, 1118, },
+ { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 23, 22, 19, 20, 0 }, 0x0, 1396, },
+ { 61, 5, 1, 0x0000008000000000ull, 0x000001fe00001000ull, { 23, 19, 20, 0, 0 }, 0x40, 1397, },
+ { 61, 5, 2, 0x0000008000000000ull, 0x000001fe00001000ull, { 23, 22, 19, 20, 0 }, 0x40, 1398, },
+ { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 23, 22, 20, 19, 0 }, 0x0, 1405, },
+ { 61, 5, 1, 0x0000009000000000ull, 0x000001fe00001000ull, { 23, 20, 19, 0, 0 }, 0x40, 1406, },
+ { 61, 5, 2, 0x0000009000000000ull, 0x000001fe00001000ull, { 23, 22, 20, 19, 0 }, 0x40, 1407, },
+ { 62, 5, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 1042, },
+ { 62, 5, 1, 0x00000000c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x40, 1043, },
+ { 62, 5, 1, 0x00000000e0000000ull, 0x000001e3f8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 3036, },
+ { 62, 5, 1, 0x0000010008000000ull, 0x000001fff80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 3037, },
+ { 63, 3, 1, 0x0000008488000000ull, 0x000001fff8000000ull, { 24, 28, 72, 0, 0 }, 0x0, 269, },
+ { 64, 3, 1, 0x00000084c8000000ull, 0x000001fff8000000ull, { 24, 28, 72, 0, 0 }, 0x0, 270, },
+ { 67, 3, 0, 0x0000000060000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x21, 33, },
+ { 68, 5, 1, 0x0000010000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2353, },
+ { 68, 5, 1, 0x0000010000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 34, },
+ { 69, 5, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2354, },
+ { 69, 5, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 35, },
+ { 70, 5, 1, 0x0000000080000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2247, },
+ { 71, 5, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2355, },
+ { 71, 5, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 36, },
+ { 72, 5, 1, 0x00000001c8000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 1221, },
+ { 73, 5, 1, 0x0000010000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 2358, },
+ { 74, 5, 1, 0x0000014000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2361, },
+ { 74, 5, 1, 0x0000014000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 38, },
+ { 75, 5, 1, 0x0000000088000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 39, },
+ { 76, 5, 1, 0x0000000088000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 40, },
+ { 77, 5, 1, 0x0000018000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2364, },
+ { 77, 5, 1, 0x0000018000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 41, },
+ { 78, 5, 1, 0x0000018000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 2367, },
+ { 79, 5, 1, 0x0000010008000000ull, 0x000001fff80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 2370, },
+ { 80, 5, 1, 0x0000000170000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 44, },
+ { 81, 5, 1, 0x0000002080000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 45, },
+ { 82, 5, 1, 0x0000000140000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 46, },
+ { 83, 5, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2371, },
+ { 83, 5, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 47, },
+ { 84, 5, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2372, },
+ { 84, 5, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 48, },
+ { 85, 5, 1, 0x0000002180000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 946, },
+ { 85, 5, 1, 0x0000002180000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 947, },
+ { 85, 5, 1, 0x0000002188000000ull, 0x000001eff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 1119, },
+ { 86, 5, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x0, 1044, },
+ { 86, 5, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 18, 19, 0, 0, 0 }, 0x40, 1045, },
+ { 87, 5, 1, 0x0000013000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2389, },
+ { 87, 5, 1, 0x0000013000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 49, },
+ { 88, 5, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2390, },
+ { 88, 5, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 50, },
+ { 89, 5, 1, 0x0000002080000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2255, },
+ { 90, 5, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2391, },
+ { 90, 5, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 18, 19, 20, 0, 0 }, 0x40, 51, },
+ { 91, 5, 1, 0x0000013000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 2392, },
+ { 92, 5, 1, 0x0000017000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2393, },
+ { 92, 5, 1, 0x0000017000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 53, },
+ { 93, 5, 1, 0x0000002088000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 54, },
+ { 94, 5, 1, 0x0000002088000000ull, 0x000001e3f80fe000ull, { 18, 20, 0, 0, 0 }, 0x40, 55, },
+ { 95, 5, 1, 0x000001b000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 2394, },
+ { 95, 5, 1, 0x000001b000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 56, },
+ { 96, 5, 1, 0x000001b000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 2395, },
+ { 97, 5, 2, 0x0000002200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x0, 2396, },
+ { 97, 5, 2, 0x0000002200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x40, 58, },
+ { 98, 5, 2, 0x0000003200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x0, 2397, },
+ { 98, 5, 2, 0x0000003200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x40, 59, },
+ { 99, 5, 2, 0x0000000200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x0, 2398, },
+ { 99, 5, 2, 0x0000000200000000ull, 0x000001fe00000000ull, { 18, 23, 19, 20, 0 }, 0x40, 60, },
+ { 100, 5, 2, 0x0000001200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x0, 2399, },
+ { 100, 5, 2, 0x0000001200000000ull, 0x000001fe00000000ull, { 18, 23, 20, 0, 0 }, 0x40, 61, },
+ { 101, 5, 1, 0x000001c000000000ull, 0x000001f000000000ull, { 18, 20, 21, 19, 0 }, 0x0, 62, },
+ { 102, 5, 0, 0x0000000020000000ull, 0x000001eff8000000ull, { 51, 52, 0, 0, 0 }, 0x0, 2400, },
+ { 102, 5, 0, 0x0000000020000000ull, 0x000001eff8000000ull, { 51, 52, 0, 0, 0 }, 0x40, 63, },
+ { 103, 5, 1, 0x0000014008000000ull, 0x000001fff8000000ull, { 18, 20, 19, 0, 0 }, 0x40, 2403, },
+ { 104, 5, 1, 0x00000001a0000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 65, },
+ { 105, 5, 1, 0x00000001e0000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 2202, },
+ { 106, 3, 0, 0x0000000100000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 66, },
+ { 108, 5, 1, 0x0000000178000000ull, 0x000001e3f8000000ull, { 18, 19, 20, 0, 0 }, 0x0, 67, },
+ { 113, 3, 1, 0x0000008708000000ull, 0x000001ffc8000000ull, { 24, 19, 0, 0, 0 }, 0x0, 2781, },
+ { 118, 4, 0, 0x0000004008000000ull, 0x000001e1f8000000ull, { 66, 0, 0, 0, 0 }, 0x0, 538, },
+ { 118, 5, 0, 0x000000000c000000ull, 0x000001e3fc000000ull, { 66, 0, 0, 0, 0 }, 0x0, 961, },
+ { 118, 2, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 66, 0, 0, 0, 0 }, 0x2, 1141, },
+ { 118, 3, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 66, 0, 0, 0, 0 }, 0x0, 1267, },
+ { 118, 6, 0, 0x000000000c000000ull, 0x000001effc000000ull, { 70, 0, 0, 0, 0 }, 0x0, 3034, },
+ { 118, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 66, 0, 0, 0, 0 }, 0x0, 68, },
+ { 123, 3, 0, 0x0000000080000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 69, },
+ { 123, 3, 0, 0x0000000090000000ull, 0x000001eff8000000ull, { 24, 0, 0, 0, 0 }, 0x0, 920, },
+ { 123, 3, 0, 0x0000000098000000ull, 0x000001eff8000000ull, { 18, 0, 0, 0, 0 }, 0x0, 921, },
+ { 124, 3, 0, 0x0000002170000000ull, 0x000001eff8000000ull, { 25, 0, 0, 0, 0 }, 0xc, 846, },
+ { 125, 3, 1, 0x0000002070000000ull, 0x000001eff8000000ull, { 31, 25, 0, 0, 0 }, 0x8, 847, },
+ { 125, 3, 1, 0x0000002078000000ull, 0x000001eff8000000ull, { 32, 25, 0, 0, 0 }, 0x8, 1143, },
+ { 127, 3, 1, 0x0000008000000000ull, 0x000001fff8000000ull, { 24, 28, 0, 0, 0 }, 0x0, 70, },
+ { 127, 3, 1, 0x0000009000000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x400, 71, },
+ { 127, 3, 1, 0x000000a000000000ull, 0x000001eff0000000ull, { 24, 28, 63, 0, 0 }, 0x400, 72, },
+ { 128, 3, 2, 0x0000008a08000000ull, 0x000001fff8000000ull, { 24, 1, 28, 0, 0 }, 0x0, 73, },
+ { 128, 3, 1, 0x0000008a08000000ull, 0x000001fff8000000ull, { 24, 28, 0, 0, 0 }, 0x40, 74, },
+ { 129, 3, 1, 0x0000008040000000ull, 0x000001fff8000000ull, { 24, 28, 0, 0, 0 }, 0x0, 75, },
+ { 129, 3, 1, 0x0000009040000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x400, 76, },
+ { 129, 3, 1, 0x000000a040000000ull, 0x000001eff0000000ull, { 24, 28, 63, 0, 0 }, 0x400, 77, },
+ { 130, 3, 1, 0x0000008080000000ull, 0x000001fff8000000ull, { 24, 28, 0, 0, 0 }, 0x0, 78, },
+ { 130, 3, 1, 0x0000009080000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x400, 79, },
+ { 130, 3, 1, 0x000000a080000000ull, 0x000001eff0000000ull, { 24, 28, 63, 0, 0 }, 0x400, 80, },
+ { 131, 3, 1, 0x00000080c0000000ull, 0x000001fff8000000ull, { 24, 28, 0, 0, 0 }, 0x0, 81, },
+ { 131, 3, 1, 0x00000080c0000000ull, 0x000001fff8000000ull, { 24, 28, 84, 0, 0 }, 0x0, 1339, },
+ { 131, 3, 1, 0x00000090c0000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x400, 82, },
+ { 131, 3, 1, 0x000000a0c0000000ull, 0x000001eff0000000ull, { 24, 28, 63, 0, 0 }, 0x400, 83, },
+ { 132, 3, 1, 0x000000c6c0000000ull, 0x000001fff8000000ull, { 18, 28, 0, 0, 0 }, 0x0, 1039, },
+ { 132, 3, 1, 0x000000d6c0000000ull, 0x000001fff8000000ull, { 18, 28, 25, 0, 0 }, 0x400, 1040, },
+ { 132, 3, 1, 0x000000e6c0000000ull, 0x000001eff0000000ull, { 18, 28, 63, 0, 0 }, 0x400, 1041, },
+ { 133, 3, 1, 0x000000c040000000ull, 0x000001fff8000000ull, { 18, 28, 0, 0, 0 }, 0x0, 84, },
+ { 133, 3, 1, 0x000000d040000000ull, 0x000001fff8000000ull, { 18, 28, 25, 0, 0 }, 0x400, 85, },
+ { 133, 3, 1, 0x000000e040000000ull, 0x000001eff0000000ull, { 18, 28, 63, 0, 0 }, 0x400, 86, },
+ { 134, 3, 1, 0x000000c0c0000000ull, 0x000001fff8000000ull, { 18, 28, 0, 0, 0 }, 0x0, 87, },
+ { 134, 3, 1, 0x000000d0c0000000ull, 0x000001fff8000000ull, { 18, 28, 25, 0, 0 }, 0x400, 88, },
+ { 134, 3, 1, 0x000000e0c0000000ull, 0x000001eff0000000ull, { 18, 28, 63, 0, 0 }, 0x400, 89, },
+ { 135, 3, 1, 0x000000c000000000ull, 0x000001fff8000000ull, { 18, 28, 0, 0, 0 }, 0x0, 90, },
+ { 135, 3, 1, 0x000000d000000000ull, 0x000001fff8000000ull, { 18, 28, 25, 0, 0 }, 0x400, 91, },
+ { 135, 3, 1, 0x000000e000000000ull, 0x000001eff0000000ull, { 18, 28, 63, 0, 0 }, 0x400, 92, },
+ { 136, 3, 2, 0x000000c048000000ull, 0x000001fff8000000ull, { 18, 19, 28, 0, 0 }, 0x0, 93, },
+ { 136, 3, 2, 0x000000d048000000ull, 0x000001fff8000000ull, { 18, 19, 28, 6, 0 }, 0x400, 94, },
+ { 137, 3, 2, 0x000000c0c8000000ull, 0x000001fff8000000ull, { 18, 19, 28, 0, 0 }, 0x0, 95, },
+ { 137, 3, 2, 0x000000d0c8000000ull, 0x000001fff8000000ull, { 18, 19, 28, 6, 0 }, 0x400, 96, },
+ { 138, 3, 2, 0x000000c088000000ull, 0x000001fff8000000ull, { 18, 19, 28, 0, 0 }, 0x0, 97, },
+ { 138, 3, 2, 0x000000d088000000ull, 0x000001fff8000000ull, { 18, 19, 28, 5, 0 }, 0x400, 98, },
+ { 139, 3, 1, 0x000000c080000000ull, 0x000001fff8000000ull, { 18, 28, 0, 0, 0 }, 0x0, 99, },
+ { 139, 3, 1, 0x000000d080000000ull, 0x000001fff8000000ull, { 18, 28, 25, 0, 0 }, 0x400, 100, },
+ { 139, 3, 1, 0x000000e080000000ull, 0x000001eff0000000ull, { 18, 28, 63, 0, 0 }, 0x400, 101, },
+ { 142, 3, 0, 0x000000cb00000000ull, 0x000001fff8000000ull, { 28, 0, 0, 0, 0 }, 0x0, 102, },
+ { 142, 3, 0, 0x000000db00000000ull, 0x000001fff8000000ull, { 28, 25, 0, 0, 0 }, 0x400, 103, },
+ { 142, 3, 0, 0x000000eb00000000ull, 0x000001eff0000000ull, { 28, 63, 0, 0, 0 }, 0x400, 104, },
+ { 143, 3, 0, 0x0000000050000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x21, 105, },
+ { 151, 3, 0, 0x0000000110000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 106, },
+ { 152, 2, 1, 0x000000e880000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2203, },
+ { 153, 2, 1, 0x000000ea80000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2204, },
+ { 154, 2, 1, 0x000000f880000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2205, },
+ { 155, 1, 1, 0x0000010800000000ull, 0x000001fff80fe000ull, { 24, 26, 0, 0, 0 }, 0x0, 107, },
+ { 155, 1, 1, 0x0000012000000000ull, 0x000001e000300000ull, { 24, 67, 0, 0, 0 }, 0x40, 108, },
+ { 155, 5, 1, 0x0000000080000000ull, 0x000001e3f8000000ull, { 18, 20, 0, 0, 0 }, 0xc0, 109, },
+ { 155, 2, 1, 0x0000000e00100000ull, 0x000001ee00f00000ull, { 15, 25, 0, 0, 0 }, 0x40, 110, },
+ { 155, 2, 1, 0x0000000e00000000ull, 0x000001ee00f00000ull, { 15, 25, 79, 0, 0 }, 0x0, 2855, },
+ { 155, 2, 1, 0x0000000188000000ull, 0x000001eff8000000ull, { 24, 16, 0, 0, 0 }, 0x0, 112, },
+ { 155, 2, 1, 0x0000000600000000ull, 0x000001ee00000000ull, { 9, 25, 65, 0, 0 }, 0x0, 113, },
+ { 155, 2, 1, 0x00000016ff001fc0ull, 0x000001feff001fc0ull, { 9, 25, 0, 0, 0 }, 0x40, 114, },
+ { 155, 2, 1, 0x0000000400000000ull, 0x000001ee00000000ull, { 10, 69, 0, 0, 0 }, 0x0, 115, },
+ { 155, 2, 1, 0x0000000180000000ull, 0x000001eff8000000ull, { 24, 8, 0, 0, 0 }, 0x0, 116, },
+ { 155, 2, 1, 0x0000000198000000ull, 0x000001eff8000000ull, { 24, 9, 0, 0, 0 }, 0x0, 117, },
+ { 155, 2, 1, 0x0000000150000000ull, 0x000001eff8000000ull, { 14, 25, 0, 0, 0 }, 0x0, 1144, },
+ { 155, 2, 1, 0x0000000050000000ull, 0x000001eff8000000ull, { 14, 56, 0, 0, 0 }, 0x0, 1145, },
+ { 155, 2, 1, 0x0000000190000000ull, 0x000001eff8000000ull, { 24, 14, 0, 0, 0 }, 0x0, 1146, },
+ { 155, 3, 1, 0x0000000140000000ull, 0x000001eff8000000ull, { 14, 56, 0, 0, 0 }, 0x0, 1268, },
+ { 155, 3, 1, 0x0000002150000000ull, 0x000001eff8000000ull, { 14, 25, 0, 0, 0 }, 0x0, 1269, },
+ { 155, 3, 1, 0x0000002110000000ull, 0x000001eff8000000ull, { 24, 14, 0, 0, 0 }, 0x0, 1270, },
+ { 155, 3, 1, 0x0000002160000000ull, 0x000001eff8000000ull, { 17, 25, 0, 0, 0 }, 0x8, 118, },
+ { 155, 3, 1, 0x0000002120000000ull, 0x000001eff8000000ull, { 24, 17, 0, 0, 0 }, 0x8, 119, },
+ { 155, 3, 1, 0x0000002168000000ull, 0x000001eff8000000ull, { 12, 25, 0, 0, 0 }, 0x8, 120, },
+ { 155, 3, 1, 0x0000002148000000ull, 0x000001eff8000000ull, { 13, 25, 0, 0, 0 }, 0x0, 121, },
+ { 155, 3, 1, 0x0000002128000000ull, 0x000001eff8000000ull, { 24, 11, 0, 0, 0 }, 0x8, 122, },
+ { 155, 3, 1, 0x0000002108000000ull, 0x000001eff8000000ull, { 24, 13, 0, 0, 0 }, 0x0, 123, },
+ { 155, 3, 1, 0x0000002000000000ull, 0x000001eff8000000ull, { 38, 25, 0, 0, 0 }, 0x8, 124, },
+ { 155, 3, 1, 0x0000002008000000ull, 0x000001eff8000000ull, { 30, 25, 0, 0, 0 }, 0x8, 125, },
+ { 155, 3, 1, 0x0000002010000000ull, 0x000001eff8000000ull, { 33, 25, 0, 0, 0 }, 0x8, 126, },
+ { 155, 3, 1, 0x0000002018000000ull, 0x000001eff8000000ull, { 35, 25, 0, 0, 0 }, 0x8, 127, },
+ { 155, 3, 1, 0x0000002020000000ull, 0x000001eff8000000ull, { 36, 25, 0, 0, 0 }, 0x8, 128, },
+ { 155, 3, 1, 0x0000002028000000ull, 0x000001eff8000000ull, { 37, 25, 0, 0, 0 }, 0x8, 129, },
+ { 155, 3, 1, 0x0000002030000000ull, 0x000001eff8000000ull, { 34, 25, 0, 0, 0 }, 0x8, 130, },
+ { 155, 3, 1, 0x0000002080000000ull, 0x000001eff8000000ull, { 24, 38, 0, 0, 0 }, 0x8, 131, },
+ { 155, 3, 1, 0x0000002088000000ull, 0x000001eff8000000ull, { 24, 30, 0, 0, 0 }, 0x8, 132, },
+ { 155, 3, 1, 0x0000002090000000ull, 0x000001eff8000000ull, { 24, 33, 0, 0, 0 }, 0x8, 133, },
+ { 155, 3, 1, 0x0000002098000000ull, 0x000001eff8000000ull, { 24, 35, 0, 0, 0 }, 0x8, 134, },
+ { 155, 3, 1, 0x00000020a0000000ull, 0x000001eff8000000ull, { 24, 36, 0, 0, 0 }, 0x8, 135, },
+ { 155, 3, 1, 0x00000020a8000000ull, 0x000001eff8000000ull, { 24, 37, 0, 0, 0 }, 0x0, 136, },
+ { 155, 3, 1, 0x00000020b0000000ull, 0x000001eff8000000ull, { 24, 34, 0, 0, 0 }, 0x8, 137, },
+ { 155, 3, 1, 0x00000020b8000000ull, 0x000001eff8000000ull, { 24, 29, 0, 0, 0 }, 0x0, 138, },
+ { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 24, 14, 0, 0, 0 }, 0x0, 139, },
+ { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 14, 56, 0, 0, 0 }, 0x0, 140, },
+ { 155, 7, 1, 0x0000000000000000ull, 0x0000000000000000ull, { 14, 25, 0, 0, 0 }, 0x0, 141, },
+ { 156, 6, 1, 0x000000c000000000ull, 0x000001e000100000ull, { 24, 71, 0, 0, 0 }, 0x0, 142, },
+ { 157, 2, 1, 0x000000eca0000000ull, 0x000001fff0000000ull, { 24, 25, 75, 0, 0 }, 0x0, 143, },
+ { 158, 2, 1, 0x000000eea0000000ull, 0x000001fff0000000ull, { 24, 25, 76, 0, 0 }, 0x0, 144, },
+ { 168, 4, 0, 0x0000004000000000ull, 0x000001e1f8000000ull, { 66, 0, 0, 0, 0 }, 0x0, 539, },
+ { 168, 5, 0, 0x0000000008000000ull, 0x000001e3fc000000ull, { 66, 0, 0, 0, 0 }, 0x0, 962, },
+ { 168, 2, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 66, 0, 0, 0, 0 }, 0x2, 1147, },
+ { 168, 3, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 66, 0, 0, 0, 0 }, 0x0, 1271, },
+ { 168, 6, 0, 0x0000000008000000ull, 0x000001effc000000ull, { 70, 0, 0, 0, 0 }, 0x0, 3035, },
+ { 168, 7, 0, 0x0000000000000000ull, 0x0000000000000000ull, { 66, 0, 0, 0, 0 }, 0x0, 145, },
+ { 175, 1, 1, 0x0000010070000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 146, },
+ { 175, 1, 1, 0x0000010170000000ull, 0x000001eff8000000ull, { 24, 56, 26, 0, 0 }, 0x0, 147, },
+ { 178, 2, 1, 0x000000ea00000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 3017, },
+ { 179, 2, 1, 0x000000f820000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2857, },
+ { 180, 1, 1, 0x0000010400000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 148, },
+ { 181, 1, 1, 0x0000010600000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 149, },
+ { 182, 1, 1, 0x0000011400000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 150, },
+ { 183, 1, 1, 0x0000010450000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 151, },
+ { 184, 1, 1, 0x0000010650000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 152, },
+ { 185, 1, 1, 0x0000010470000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 153, },
+ { 186, 1, 1, 0x0000010670000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 154, },
+ { 187, 1, 1, 0x0000010520000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 948, },
+ { 188, 1, 1, 0x0000010720000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 949, },
+ { 189, 1, 1, 0x0000011520000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 950, },
+ { 190, 2, 1, 0x000000e850000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2871, },
+ { 191, 2, 1, 0x000000ea70000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 155, },
+ { 192, 2, 1, 0x000000e810000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2872, },
+ { 193, 2, 1, 0x000000ea30000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 156, },
+ { 194, 2, 1, 0x000000ead0000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 2206, },
+ { 195, 2, 1, 0x000000e230000000ull, 0x000001ff30000000ull, { 24, 25, 26, 42, 0 }, 0x0, 157, },
+ { 196, 2, 1, 0x000000e690000000ull, 0x000001fff0000000ull, { 24, 26, 0, 0, 0 }, 0x0, 158, },
+ { 198, 3, 1, 0x00000021c0000000ull, 0x000001eff8000000ull, { 24, 26, 25, 0, 0 }, 0x0, 2207, },
+ { 198, 3, 1, 0x00000020c0000000ull, 0x000001eff8000000ull, { 24, 26, 49, 0, 0 }, 0x0, 2208, },
+ { 198, 3, 0, 0x0000002188000000ull, 0x000001eff8000000ull, { 26, 49, 0, 0, 0 }, 0x0, 2238, },
+ { 199, 2, 1, 0x000000e8b0000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 159, },
+ { 200, 2, 1, 0x000000e240000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 160, },
+ { 200, 2, 1, 0x000000ee50000000ull, 0x000001fff0000000ull, { 24, 25, 39, 0, 0 }, 0x0, 161, },
+ { 201, 2, 1, 0x000000f040000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 162, },
+ { 201, 2, 1, 0x000000fc50000000ull, 0x000001fff0000000ull, { 24, 25, 39, 0, 0 }, 0x0, 163, },
+ { 202, 1, 1, 0x0000010680000000ull, 0x000001ffe0000000ull, { 24, 25, 41, 26, 0 }, 0x0, 164, },
+ { 203, 2, 1, 0x000000e220000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 165, },
+ { 203, 2, 1, 0x000000e630000000ull, 0x000001fff0000000ull, { 24, 26, 43, 0, 0 }, 0x0, 166, },
+ { 204, 2, 1, 0x000000f020000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 167, },
+ { 204, 2, 1, 0x000000f430000000ull, 0x000001fff0000000ull, { 24, 26, 43, 0, 0 }, 0x0, 168, },
+ { 205, 1, 1, 0x00000106c0000000ull, 0x000001ffe0000000ull, { 24, 25, 41, 26, 0 }, 0x0, 169, },
+ { 206, 1, 1, 0x0000010420000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 170, },
+ { 207, 1, 1, 0x0000010620000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 171, },
+ { 208, 1, 1, 0x0000011420000000ull, 0x000001fff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 172, },
+ { 209, 3, 0, 0x0000002048000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0x8, 1175, },
+ { 209, 3, 0, 0x0000002050000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0xc, 1050, },
+ { 209, 3, 0, 0x00000021a0000000ull, 0x000001eff8000000ull, { 26, 0, 0, 0, 0 }, 0x8, 922, },
+ { 210, 3, 0, 0x0000002060000000ull, 0x000001eff8000000ull, { 26, 25, 0, 0, 0 }, 0x8, 848, },
+ { 215, 4, 0, 0x0000000040000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x22c, 173, },
+ { 216, 3, 0, 0x0000000038000000ull, 0x000001ee78000000ull, { 68, 0, 0, 0, 0 }, 0x8, 174, },
+ { 217, 3, 0, 0x0000000028000000ull, 0x000001ee78000000ull, { 68, 0, 0, 0, 0 }, 0x0, 175, },
+ { 226, 3, 1, 0x000000c708000000ull, 0x000001ffc8000000ull, { 18, 25, 0, 0, 0 }, 0x0, 2782, },
+ { 227, 2, 1, 0x000000a600000000ull, 0x000001ee04000000ull, { 24, 25, 45, 0, 0 }, 0x140, 176, },
+ { 227, 2, 1, 0x000000f240000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 177, },
+ { 228, 1, 1, 0x0000010080000000ull, 0x000001efe0000000ull, { 24, 25, 40, 26, 0 }, 0x0, 178, },
+ { 229, 1, 1, 0x00000100c0000000ull, 0x000001efe0000000ull, { 24, 25, 40, 26, 0 }, 0x0, 179, },
+ { 230, 2, 1, 0x000000a400000000ull, 0x000001ee00002000ull, { 24, 26, 77, 0, 0 }, 0x140, 2878, },
+ { 230, 2, 1, 0x000000f220000000ull, 0x000001fff0000000ull, { 24, 26, 25, 0, 0 }, 0x0, 181, },
+ { 231, 2, 1, 0x000000ac00000000ull, 0x000001ee00000000ull, { 24, 25, 26, 44, 0 }, 0x0, 182, },
+ { 236, 3, 0, 0x0000000180000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 850, },
+ { 237, 3, 0, 0x0000000030000000ull, 0x000001ee78000000ull, { 68, 0, 0, 0, 0 }, 0x8, 183, },
+ { 239, 3, 1, 0x0000008c00000000ull, 0x000001fff8000000ull, { 28, 25, 0, 0, 0 }, 0x0, 184, },
+ { 239, 3, 1, 0x000000ac00000000ull, 0x000001eff0000000ull, { 28, 25, 62, 0, 0 }, 0x400, 185, },
+ { 240, 3, 1, 0x0000008c08000000ull, 0x000001fff8000000ull, { 28, 25, 1, 0, 0 }, 0x0, 186, },
+ { 240, 3, 1, 0x0000008c08000000ull, 0x000001fff8000000ull, { 28, 25, 0, 0, 0 }, 0x40, 187, },
+ { 241, 3, 1, 0x0000008c40000000ull, 0x000001fff8000000ull, { 28, 25, 0, 0, 0 }, 0x0, 188, },
+ { 241, 3, 1, 0x000000ac40000000ull, 0x000001eff0000000ull, { 28, 25, 62, 0, 0 }, 0x400, 189, },
+ { 242, 3, 1, 0x0000008c80000000ull, 0x000001fff8000000ull, { 28, 25, 0, 0, 0 }, 0x0, 190, },
+ { 242, 3, 1, 0x000000ac80000000ull, 0x000001eff0000000ull, { 28, 25, 62, 0, 0 }, 0x400, 191, },
+ { 243, 3, 1, 0x0000008cc0000000ull, 0x000001fff8000000ull, { 28, 25, 0, 0, 0 }, 0x0, 192, },
+ { 243, 3, 1, 0x000000acc0000000ull, 0x000001eff0000000ull, { 28, 25, 62, 0, 0 }, 0x400, 193, },
+ { 244, 3, 1, 0x000000cec0000000ull, 0x000001fff8000000ull, { 28, 19, 0, 0, 0 }, 0x0, 2785, },
+ { 244, 3, 1, 0x000000eec0000000ull, 0x000001eff0000000ull, { 28, 19, 62, 0, 0 }, 0x400, 2786, },
+ { 245, 3, 1, 0x000000cc40000000ull, 0x000001fff8000000ull, { 28, 19, 0, 0, 0 }, 0x0, 194, },
+ { 245, 3, 1, 0x000000ec40000000ull, 0x000001eff0000000ull, { 28, 19, 62, 0, 0 }, 0x400, 195, },
+ { 246, 3, 1, 0x000000ccc0000000ull, 0x000001fff8000000ull, { 28, 19, 0, 0, 0 }, 0x0, 196, },
+ { 246, 3, 1, 0x000000ecc0000000ull, 0x000001eff0000000ull, { 28, 19, 62, 0, 0 }, 0x400, 197, },
+ { 247, 3, 1, 0x000000cc00000000ull, 0x000001fff8000000ull, { 28, 19, 0, 0, 0 }, 0x0, 198, },
+ { 247, 3, 1, 0x000000ec00000000ull, 0x000001eff0000000ull, { 28, 19, 62, 0, 0 }, 0x400, 199, },
+ { 248, 3, 1, 0x000000cc80000000ull, 0x000001fff8000000ull, { 28, 19, 0, 0, 0 }, 0x0, 200, },
+ { 248, 3, 1, 0x000000ec80000000ull, 0x000001eff0000000ull, { 28, 19, 62, 0, 0 }, 0x400, 201, },
+ { 249, 1, 1, 0x0000010028000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 202, },
+ { 249, 1, 1, 0x0000010020000000ull, 0x000001eff8000000ull, { 24, 25, 26, 4, 0 }, 0x0, 203, },
+ { 249, 1, 1, 0x0000010128000000ull, 0x000001eff8000000ull, { 24, 56, 26, 0, 0 }, 0x0, 204, },
+ { 250, 3, 0, 0x0000000020000000ull, 0x000001ee78000000ull, { 68, 0, 0, 0, 0 }, 0x0, 205, },
+ { 251, 2, 1, 0x00000000a0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 206, },
+ { 252, 2, 1, 0x00000000a8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 207, },
+ { 253, 2, 1, 0x00000000b0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 208, },
+ { 254, 3, 0, 0x0000000198000000ull, 0x000001eff8000000ull, { 0, 0, 0, 0, 0 }, 0x0, 1150, },
+ { 255, 3, 1, 0x00000020f8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x8, 209, },
+ { 256, 2, 2, 0x000000a000000000ull, 0x000001fe00003000ull, { 22, 23, 26, 77, 0 }, 0x0, 3040, },
+ { 256, 2, 1, 0x000000a000000000ull, 0x000001fe00003000ull, { 22, 26, 77, 0, 0 }, 0x40, 3041, },
+ { 256, 2, 2, 0x000000a000000000ull, 0x000001fe00003000ull, { 23, 22, 26, 77, 0 }, 0x40, 2003, },
+ { 256, 2, 1, 0x000000a000000000ull, 0x000001fe00003000ull, { 23, 26, 77, 0, 0 }, 0x40, 2004, },
+ { 257, 2, 2, 0x000000a000082000ull, 0x000001fe00083000ull, { 22, 23, 50, 0, 0 }, 0x0, 3044, },
+ { 257, 2, 1, 0x000000a000082000ull, 0x000001fe00083000ull, { 22, 50, 0, 0, 0 }, 0x40, 3045, },
+ { 257, 2, 2, 0x000000a000082000ull, 0x000001fe00083000ull, { 23, 22, 50, 0, 0 }, 0x40, 2007, },
+ { 257, 2, 1, 0x000000a000082000ull, 0x000001fe00083000ull, { 23, 50, 0, 0, 0 }, 0x40, 2008, },
+ { 258, 3, 1, 0x00000020d0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 210, },
+ { 259, 2, 2, 0x000000a000002000ull, 0x000001fe00003000ull, { 22, 23, 26, 0, 0 }, 0x0, 3048, },
+ { 259, 2, 1, 0x000000a000002000ull, 0x000001fe00003000ull, { 22, 26, 0, 0, 0 }, 0x40, 3049, },
+ { 259, 2, 2, 0x000000a000002000ull, 0x000001fe00003000ull, { 23, 22, 26, 0, 0 }, 0x40, 2011, },
+ { 259, 2, 1, 0x000000a000002000ull, 0x000001fe00003000ull, { 23, 26, 0, 0, 0 }, 0x40, 2012, },
+ { 260, 3, 1, 0x00000020f0000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x8, 211, },
+ { 262, 3, 1, 0x00000020d8000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 212, },
+ { 266, 2, 1, 0x000000e840000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1131, },
+ { 267, 2, 1, 0x000000ea40000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1132, },
+ { 268, 2, 1, 0x000000f840000000ull, 0x000001fff0000000ull, { 24, 25, 26, 0, 0 }, 0x0, 1133, },
+ { 272, 4, 0, 0x00000000c0000000ull, 0x000001e1f8000000ull, { 0, 0, 0, 0, 0 }, 0x28, 223, },
+ { 277, 3, 1, 0x0000008208000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x0, 213, },
+ { 278, 3, 1, 0x0000008248000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x0, 214, },
+ { 279, 3, 1, 0x0000008288000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x0, 215, },
+ { 280, 3, 1, 0x00000082c8000000ull, 0x000001fff8000000ull, { 24, 28, 25, 0, 0 }, 0x0, 216, },
+ { 282, 5, 1, 0x000001d000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x0, 1179, },
+ { 282, 5, 1, 0x000001d000000000ull, 0x000001fc00000000ull, { 18, 20, 21, 19, 0 }, 0x40, 1261, },
+ { 283, 5, 1, 0x000001d000000000ull, 0x000001fc000fe000ull, { 18, 20, 21, 0, 0 }, 0x40, 1180, },
+ { 284, 1, 1, 0x0000010078000000ull, 0x000001eff8000000ull, { 24, 25, 26, 0, 0 }, 0x0, 217, },
+ { 284, 1, 1, 0x0000010178000000ull, 0x000001eff8000000ull, { 24, 56, 26, 0, 0 }, 0x0, 218, },
+ { 287, 2, 1, 0x0000000080000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 219, },
+ { 288, 2, 1, 0x0000000088000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 220, },
+ { 289, 2, 1, 0x0000000090000000ull, 0x000001eff8000000ull, { 24, 26, 0, 0, 0 }, 0x0, 221, },
};
static const char dis_table[] = {
-0xa0, 0xc4, 0xd8, 0xa0, 0x2d, 0x88, 0xa0, 0x2b, 0x70, 0xa0, 0x1a, 0xb0,
-0x98, 0xb0, 0x01, 0x40, 0x90, 0x50, 0x90, 0x28, 0x24, 0x31, 0xf8, 0x24,
-0x31, 0xf0, 0x90, 0x28, 0x24, 0x31, 0xe8, 0x24, 0x31, 0xe0, 0x90, 0x50,
-0x90, 0x28, 0x24, 0x31, 0xd0, 0x24, 0x31, 0xc8, 0x90, 0x28, 0x24, 0x31,
-0xc0, 0x24, 0x31, 0xb8, 0xa8, 0x0b, 0x48, 0x15, 0x20, 0x97, 0x20, 0x95,
-0xc8, 0x9a, 0xb8, 0x05, 0x38, 0x91, 0x18, 0x90, 0xa0, 0x90, 0x60, 0x80,
-0x90, 0x20, 0x34, 0x3c, 0xa4, 0x21, 0xb0, 0x34, 0x39, 0x80, 0xa4, 0x2f,
-0x70, 0x35, 0xf3, 0x90, 0x50, 0x90, 0x28, 0x80, 0x35, 0xe9, 0x80, 0x34,
-0x1d, 0x81, 0x33, 0xb9, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x20,
-0xc8, 0x34, 0x1a, 0xa4, 0x1d, 0xc0, 0x34, 0x17, 0x90, 0x38, 0xa4, 0x31,
-0x70, 0x36, 0x34, 0xa4, 0x31, 0x18, 0x36, 0x28, 0x90, 0x70, 0x90, 0x38,
-0xa4, 0x2f, 0xf0, 0x36, 0x09, 0xa4, 0x2f, 0xc8, 0x36, 0x04, 0x80, 0xa4,
-0x20, 0xa8, 0x34, 0x16, 0x92, 0x18, 0x91, 0xc0, 0x80, 0x91, 0x80, 0x90,
-0xf8, 0xdb, 0x84, 0x60, 0xef, 0x00, 0xc0, 0xc0, 0x80, 0xa4, 0x3b, 0x28,
-0x8c, 0x3c, 0x88, 0x84, 0x37, 0x9b, 0xc0, 0xc0, 0x80, 0xa4, 0x3b, 0x18,
-0x8c, 0x3c, 0x68, 0x84, 0x37, 0x99, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0,
-0x81, 0x37, 0x4d, 0x50, 0xc0, 0xc0, 0x81, 0x37, 0x4b, 0xa4, 0x1d, 0xd0,
-0x33, 0xbb, 0x80, 0x90, 0x28, 0x80, 0x33, 0xb7, 0x80, 0x34, 0x1f, 0x81,
-0x90, 0x38, 0xa4, 0x21, 0x30, 0x34, 0x22, 0xa4, 0x21, 0x00, 0x34, 0x1c,
-0xc0, 0x40, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x1d, 0xa8, 0x33, 0xb6, 0xa4,
-0x1d, 0x98, 0x33, 0xb4, 0x18, 0x24, 0x21, 0xa8, 0x83, 0x90, 0xa8, 0xd3,
-0x82, 0xc0, 0xc0, 0xc0, 0x80, 0xa4, 0x3a, 0xf8, 0x37, 0x85, 0xc0, 0xc0,
-0x80, 0xa4, 0x3a, 0xe8, 0x37, 0x81, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0,
-0x81, 0x37, 0x47, 0x50, 0xc0, 0xc0, 0x81, 0x37, 0x45, 0x92, 0xb8, 0x99,
-0x84, 0x21, 0x20, 0x90, 0x78, 0x90, 0x50, 0x10, 0x10, 0x80, 0xa4, 0x2f,
-0x68, 0x35, 0xf2, 0x82, 0x35, 0xe8, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38,
-0xa4, 0x31, 0x68, 0x36, 0x33, 0xa4, 0x31, 0x10, 0x36, 0x27, 0x80, 0x90,
-0x38, 0xa4, 0x2f, 0xe8, 0x36, 0x08, 0xa4, 0x2f, 0xc0, 0x36, 0x03, 0x83,
-0x90, 0xa8, 0xd3, 0x82, 0xc0, 0xc0, 0xc0, 0x80, 0xa4, 0x3a, 0xc8, 0x37,
-0x79, 0xc0, 0xc0, 0x80, 0xa4, 0x3a, 0xb8, 0x37, 0x75, 0xd3, 0x82, 0x40,
-0x50, 0xc0, 0xc0, 0x81, 0x37, 0x41, 0x50, 0xc0, 0xc0, 0x81, 0x37, 0x3f,
-0x18, 0x24, 0x21, 0x28, 0x83, 0x90, 0xa8, 0xd3, 0x82, 0xc0, 0xc0, 0xc0,
-0x80, 0xa4, 0x3a, 0x98, 0x37, 0x6d, 0xc0, 0xc0, 0x80, 0xa4, 0x3a, 0x88,
-0x37, 0x69, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0, 0x81, 0x37, 0x3b, 0x50,
-0xc0, 0xc0, 0x81, 0x37, 0x39, 0x94, 0x50, 0x92, 0xf8, 0x99, 0x84, 0x1e,
-0x00, 0x90, 0x78, 0x90, 0x50, 0x10, 0x10, 0x80, 0xa4, 0x2f, 0x60, 0x35,
-0xf1, 0x82, 0x35, 0xe7, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x31,
-0x60, 0x36, 0x32, 0xa4, 0x31, 0x08, 0x36, 0x26, 0x80, 0x90, 0x38, 0xa4,
-0x2f, 0xe0, 0x36, 0x07, 0xa4, 0x2f, 0xb8, 0x36, 0x02, 0x83, 0x90, 0xe8,
-0xd3, 0x83, 0xc0, 0xc0, 0xc0, 0x80, 0xa4, 0x3b, 0x38, 0x8c, 0x3c, 0xa8,
-0x84, 0x37, 0x9d, 0xc0, 0xc0, 0x80, 0xa4, 0x3b, 0x20, 0x8c, 0x3c, 0x78,
-0x84, 0x37, 0x9a, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0, 0x81, 0x37, 0x4f,
-0x50, 0xc0, 0xc0, 0x81, 0x37, 0x4c, 0x18, 0x24, 0x1d, 0xf8, 0x83, 0x90,
-0xa8, 0xd3, 0x82, 0xc0, 0xc0, 0xc0, 0x80, 0xa4, 0x3b, 0x08, 0x37, 0x89,
-0xc0, 0xc0, 0x80, 0xa4, 0x3a, 0xf0, 0x37, 0x83, 0xd3, 0x82, 0x40, 0x50,
-0xc0, 0xc0, 0x81, 0x37, 0x49, 0x50, 0xc0, 0xc0, 0x81, 0x37, 0x46, 0x92,
-0xb8, 0x99, 0x84, 0x1d, 0xf0, 0x90, 0x78, 0x90, 0x50, 0x10, 0x10, 0x80,
-0xa4, 0x2f, 0x58, 0x35, 0xf0, 0x82, 0x35, 0xe6, 0x90, 0x80, 0x10, 0x10,
-0x90, 0x38, 0xa4, 0x31, 0x58, 0x36, 0x31, 0xa4, 0x31, 0x00, 0x36, 0x25,
-0x80, 0x90, 0x38, 0xa4, 0x2f, 0xd8, 0x36, 0x06, 0xa4, 0x2f, 0xb0, 0x36,
-0x01, 0x83, 0x90, 0xa8, 0xd3, 0x82, 0xc0, 0xc0, 0xc0, 0x80, 0xa4, 0x3a,
-0xd8, 0x37, 0x7d, 0xc0, 0xc0, 0x80, 0xa4, 0x3a, 0xc0, 0x37, 0x77, 0xd3,
-0x82, 0x40, 0x50, 0xc0, 0xc0, 0x81, 0x37, 0x43, 0x50, 0xc0, 0xc0, 0x81,
-0x37, 0x40, 0x18, 0x20, 0x01, 0x48, 0x83, 0x90, 0xa8, 0xd3, 0x82, 0xc0,
-0xc0, 0xc0, 0x80, 0xa4, 0x3a, 0xa8, 0x37, 0x71, 0xc0, 0xc0, 0x80, 0xa4,
-0x3a, 0x90, 0x37, 0x6b, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0, 0x81, 0x37,
-0x3d, 0x50, 0xc0, 0xc0, 0x81, 0x37, 0x3a, 0xda, 0x06, 0xe0, 0xef, 0x40,
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x21, 0x98, 0x34, 0x31, 0x80, 0x34, 0x2e,
-0x90, 0x38, 0xa4, 0x21, 0x40, 0x34, 0x2c, 0x80, 0x34, 0x29, 0x90, 0x60,
-0x90, 0x38, 0xa4, 0x21, 0x80, 0x34, 0x32, 0x80, 0x34, 0x2f, 0x90, 0x38,
-0xa4, 0x21, 0x58, 0x34, 0x2d, 0x80, 0x34, 0x2a, 0xc8, 0x40, 0x19, 0x00,
-0x91, 0x58, 0x90, 0x60, 0x82, 0x90, 0x20, 0x35, 0xe5, 0xa4, 0x2f, 0x18,
-0x35, 0xe4, 0x90, 0xc0, 0x80, 0x90, 0x90, 0x90, 0x48, 0xc9, 0xe1, 0x87,
-0x80, 0x85, 0x36, 0x1d, 0xc9, 0xe1, 0x86, 0xc0, 0x85, 0x36, 0x1a, 0x80,
-0x36, 0x19, 0x10, 0x10, 0x81, 0x35, 0xf5, 0x90, 0xa8, 0x10, 0x10, 0x90,
-0x28, 0x81, 0x36, 0x13, 0x90, 0x38, 0xa4, 0x30, 0x70, 0x36, 0x0f, 0xa4,
-0x30, 0x60, 0x36, 0x0d, 0x90, 0x70, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x30,
-0x88, 0x36, 0x12, 0x80, 0x36, 0x10, 0x90, 0x60, 0x90, 0x28, 0x24, 0x30,
-0xc0, 0xa4, 0x30, 0xb0, 0x36, 0x17, 0x80, 0xa4, 0x30, 0xa0, 0x36, 0x15,
-0x80, 0x90, 0xf8, 0x90, 0x90, 0x90, 0x50, 0x90, 0x28, 0x80, 0x37, 0x31,
-0x80, 0x37, 0x38, 0x80, 0xa4, 0x39, 0xb0, 0x37, 0x37, 0x90, 0x28, 0x81,
-0x37, 0x35, 0x80, 0xa4, 0x39, 0x98, 0x37, 0x34, 0x83, 0x37, 0x32, 0x98,
-0xe8, 0x01, 0xb0, 0x90, 0x88, 0x90, 0x60, 0xa4, 0x2f, 0x08, 0x10, 0x10,
-0x10, 0x10, 0x83, 0x33, 0x8f, 0x24, 0x2f, 0x00, 0x90, 0x28, 0x24, 0x2e,
-0xf8, 0x24, 0x2e, 0xf0, 0x90, 0x88, 0x90, 0x60, 0xa4, 0x2e, 0xe0, 0x10,
-0x10, 0x10, 0x10, 0x83, 0x33, 0x8e, 0x24, 0x2e, 0xd8, 0x90, 0x28, 0x24,
-0x2e, 0xd0, 0x24, 0x2e, 0xc8, 0xa8, 0x09, 0x00, 0x0e, 0x20, 0x96, 0x48,
-0x95, 0xe8, 0x93, 0x38, 0x91, 0xa0, 0x90, 0xd0, 0x90, 0x70, 0x90, 0x38,
-0xa4, 0x1d, 0x20, 0x33, 0xa5, 0xa4, 0x1d, 0x10, 0x33, 0xa3, 0x90, 0x38,
-0xa4, 0x1d, 0x00, 0x33, 0xa1, 0x80, 0x33, 0x9f, 0x90, 0x60, 0x90, 0x28,
-0x24, 0x1c, 0xc0, 0xa4, 0x1c, 0xb0, 0x33, 0x97, 0x90, 0x38, 0xa4, 0x1c,
-0xa0, 0x33, 0x95, 0xa4, 0x1c, 0xe8, 0x33, 0x9e, 0x90, 0xe0, 0x90, 0x70,
-0x90, 0x38, 0xa4, 0x1c, 0xd8, 0x33, 0x9c, 0xa4, 0x1c, 0xc8, 0x33, 0x9a,
-0x90, 0x38, 0xa4, 0x2e, 0x80, 0x35, 0xd6, 0xa4, 0x2e, 0x20, 0x35, 0xca,
-0x90, 0x70, 0x90, 0x38, 0xa4, 0x2b, 0x60, 0x35, 0x78, 0xa4, 0x2b, 0x30,
-0x35, 0x72, 0x10, 0x10, 0xa4, 0x1c, 0x90, 0x33, 0x93, 0x99, 0x60, 0x02,
-0x70, 0x90, 0x90, 0x90, 0x50, 0x90, 0x28, 0x24, 0x1d, 0x50, 0x80, 0x33,
-0xb1, 0x80, 0xa4, 0x1d, 0x58, 0x33, 0xaf, 0x90, 0x50, 0x90, 0x28, 0x24,
-0x1d, 0x60, 0x80, 0x33, 0xb2, 0x90, 0x38, 0xa4, 0x1d, 0x68, 0x33, 0xb0,
-0xa4, 0x1d, 0x30, 0x33, 0xa7, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4,
-0x2d, 0xb8, 0x35, 0xbf, 0xa4, 0x2d, 0x18, 0x35, 0xac, 0x90, 0x38, 0xa4,
-0x2c, 0xb0, 0x35, 0x9d, 0xa4, 0x2c, 0x20, 0x35, 0x8c, 0x81, 0xa4, 0x1d,
-0x40, 0x33, 0xa9, 0xe4, 0xa1, 0xca, 0xc0, 0x37, 0x2d, 0x18, 0x24, 0x1c,
-0x88, 0xe4, 0xe1, 0xc9, 0x40, 0x37, 0x27, 0x92, 0x40, 0x91, 0x08, 0x10,
-0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2e, 0x78, 0x35, 0xd5,
-0xa4, 0x2e, 0x18, 0x35, 0xc9, 0x80, 0x90, 0x38, 0xa4, 0x2b, 0x58, 0x35,
-0x77, 0xa4, 0x2b, 0x28, 0x35, 0x71, 0x18, 0x20, 0x00, 0xf8, 0x80, 0x90,
-0x70, 0x90, 0x38, 0xa4, 0x2d, 0xa8, 0x35, 0xbe, 0xa4, 0x2d, 0x10, 0x35,
-0xaa, 0x90, 0x38, 0xa4, 0x2c, 0xa0, 0x35, 0x9c, 0xa4, 0x2c, 0x18, 0x35,
-0x8a, 0xe4, 0xa1, 0xc7, 0xc0, 0x37, 0x21, 0x18, 0x24, 0x1c, 0x80, 0xe4,
-0xe1, 0xc6, 0x40, 0x37, 0x1b, 0x92, 0x90, 0x92, 0x40, 0x91, 0x08, 0x10,
-0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2e, 0x70, 0x35, 0xd4,
-0xa4, 0x2e, 0x10, 0x35, 0xc8, 0x80, 0x90, 0x38, 0xa4, 0x2b, 0x50, 0x35,
-0x76, 0xa4, 0x2b, 0x20, 0x35, 0x70, 0x18, 0x20, 0x00, 0xf8, 0x80, 0x90,
-0x70, 0x90, 0x38, 0xa4, 0x2d, 0x98, 0x35, 0xbd, 0xa4, 0x2d, 0x08, 0x35,
-0xa8, 0x90, 0x38, 0xa4, 0x2c, 0x90, 0x35, 0x9b, 0xa4, 0x2c, 0x10, 0x35,
-0x88, 0xe4, 0xa1, 0xcb, 0x00, 0x37, 0x2f, 0x10, 0x10, 0xe4, 0xe1, 0xc9,
-0x80, 0x37, 0x29, 0x92, 0x50, 0x99, 0x1c, 0x1d, 0x70, 0x10, 0x10, 0x90,
-0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2e, 0x68, 0x35, 0xd3, 0xa4, 0x2e,
-0x08, 0x35, 0xc7, 0x80, 0x90, 0x38, 0xa4, 0x2b, 0x48, 0x35, 0x75, 0xa4,
-0x2b, 0x18, 0x35, 0x6f, 0x18, 0x20, 0x00, 0xf8, 0x80, 0x90, 0x70, 0x90,
-0x38, 0xa4, 0x2d, 0x88, 0x35, 0xbc, 0xa4, 0x2d, 0x00, 0x35, 0xa6, 0x90,
-0x38, 0xa4, 0x2c, 0x80, 0x35, 0x9a, 0xa4, 0x2c, 0x08, 0x35, 0x86, 0xe4,
-0xa1, 0xc8, 0x00, 0x37, 0x23, 0x10, 0x10, 0xe4, 0xe1, 0xc6, 0x80, 0x37,
-0x1d, 0xc0, 0x40, 0x80, 0x10, 0x10, 0x81, 0x90, 0x90, 0x90, 0x48, 0xc9,
-0xe1, 0x5f, 0x00, 0x85, 0x35, 0x80, 0xc9, 0xe1, 0x5f, 0x80, 0x85, 0x35,
-0x7d, 0x80, 0x35, 0x7b, 0x80, 0xd8, 0x47, 0x80, 0x0d, 0xc0, 0xc0, 0x80,
-0x10, 0x10, 0x82, 0x90, 0x58, 0xd5, 0x81, 0x80, 0x80, 0x37, 0x17, 0x80,
-0x37, 0x15, 0xd5, 0x81, 0x80, 0x80, 0x37, 0x13, 0x80, 0x37, 0x11, 0xc0,
-0x80, 0x10, 0x10, 0x82, 0x90, 0x58, 0xd5, 0x81, 0x80, 0x80, 0x37, 0x18,
-0x80, 0x37, 0x16, 0xd5, 0x81, 0x80, 0x80, 0x37, 0x14, 0x80, 0x37, 0x12,
-0xc0, 0x80, 0x83, 0xa4, 0x38, 0x78, 0x37, 0x10, 0xa0, 0x57, 0xc0, 0xa0,
-0x41, 0xe0, 0xa8, 0x1e, 0xb0, 0x34, 0x88, 0xa0, 0x12, 0x38, 0xa0, 0x0b,
-0x48, 0x96, 0x00, 0x9a, 0xf0, 0x05, 0xc0, 0x91, 0x70, 0x90, 0xb8, 0x90,
-0x70, 0x90, 0x38, 0xa4, 0x14, 0x80, 0x33, 0x8d, 0xa4, 0x14, 0x90, 0x33,
-0x8c, 0x10, 0x10, 0xa4, 0x14, 0x88, 0x33, 0x8b, 0x90, 0x70, 0x90, 0x38,
-0xa4, 0x14, 0x50, 0x33, 0x72, 0xa4, 0x14, 0x60, 0x33, 0x71, 0x10, 0x10,
-0xa4, 0x14, 0x58, 0x33, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4,
-0x14, 0x20, 0x33, 0x57, 0xa4, 0x14, 0x30, 0x33, 0x56, 0x10, 0x10, 0xa4,
-0x14, 0x28, 0x33, 0x55, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xf0, 0x33,
-0x3b, 0xa4, 0x14, 0x00, 0x33, 0x3a, 0x10, 0x10, 0xa4, 0x13, 0xf8, 0x33,
-0x39, 0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x68,
-0x33, 0x88, 0xa4, 0x14, 0x78, 0x33, 0x8a, 0x10, 0x10, 0xa4, 0x14, 0x70,
-0x33, 0x89, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x38, 0x33, 0x6d, 0xa4,
-0x14, 0x48, 0x33, 0x6f, 0x10, 0x10, 0xa4, 0x14, 0x40, 0x33, 0x6e, 0x90,
-0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x08, 0x33, 0x52, 0xa4, 0x14,
-0x18, 0x33, 0x54, 0x10, 0x10, 0xa4, 0x14, 0x10, 0x33, 0x53, 0x90, 0x70,
-0x90, 0x38, 0xa4, 0x13, 0xd8, 0x33, 0x36, 0xa4, 0x13, 0xe8, 0x33, 0x38,
-0x10, 0x10, 0xa4, 0x13, 0xe0, 0x33, 0x37, 0xe4, 0xe1, 0x55, 0x40, 0x35,
-0x5f, 0x9a, 0xf0, 0x05, 0x00, 0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90,
-0x38, 0xa4, 0x13, 0xa0, 0x33, 0x85, 0xa4, 0x13, 0x98, 0x33, 0x87, 0x10,
-0x10, 0xa4, 0x13, 0x90, 0x33, 0x86, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13,
-0x88, 0x33, 0x6a, 0xa4, 0x13, 0x80, 0x33, 0x6c, 0x10, 0x10, 0xa4, 0x13,
-0x78, 0x33, 0x6b, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x70,
-0x33, 0x4f, 0xa4, 0x13, 0x68, 0x33, 0x51, 0x10, 0x10, 0xa4, 0x13, 0x60,
-0x33, 0x50, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x58, 0x33, 0x33, 0xa4,
-0x13, 0x50, 0x33, 0x35, 0x10, 0x10, 0xa4, 0x13, 0x48, 0x33, 0x34, 0x91,
-0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x82, 0x80, 0x33,
-0x84, 0x10, 0x10, 0x80, 0x33, 0x83, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33,
-0x67, 0x80, 0x33, 0x69, 0x10, 0x10, 0x80, 0x33, 0x68, 0x90, 0x88, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x33, 0x4c, 0x80, 0x33, 0x4e, 0x10, 0x10, 0x80,
-0x33, 0x4d, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x30, 0x80, 0x33, 0x32,
-0x10, 0x10, 0x80, 0x33, 0x31, 0xe4, 0xe1, 0x42, 0xc0, 0x35, 0x1f, 0x95,
-0x40, 0x9a, 0x90, 0x05, 0x00, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90,
-0x28, 0x80, 0x33, 0x7f, 0x80, 0x33, 0x81, 0x10, 0x10, 0x80, 0x33, 0x80,
-0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x64, 0x80, 0x33, 0x66, 0x10, 0x10,
-0x80, 0x33, 0x65, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x30,
-0x33, 0x49, 0xa4, 0x13, 0x40, 0x33, 0x4b, 0x10, 0x10, 0xa4, 0x13, 0x38,
-0x33, 0x4a, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x00, 0x33, 0x2d, 0xa4,
-0x13, 0x10, 0x33, 0x2f, 0x10, 0x10, 0xa4, 0x13, 0x08, 0x33, 0x2e, 0x91,
-0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x7c, 0x80, 0x33,
-0x7e, 0x10, 0x10, 0x80, 0x33, 0x7d, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33,
-0x61, 0x80, 0x33, 0x63, 0x10, 0x10, 0x80, 0x33, 0x62, 0x90, 0xb8, 0x90,
-0x70, 0x90, 0x38, 0xa4, 0x13, 0x18, 0x33, 0x46, 0xa4, 0x13, 0x28, 0x33,
-0x48, 0x10, 0x10, 0xa4, 0x13, 0x20, 0x33, 0x47, 0x90, 0x70, 0x90, 0x38,
-0xa4, 0x12, 0xe8, 0x33, 0x2a, 0xa4, 0x12, 0xf8, 0x33, 0x2c, 0x10, 0x10,
-0xa4, 0x12, 0xf0, 0x33, 0x2b, 0xe4, 0xe1, 0x54, 0xc0, 0x35, 0x5d, 0x98,
-0xb8, 0x01, 0x68, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80,
-0x33, 0x27, 0x80, 0x33, 0x29, 0x10, 0x10, 0x80, 0x33, 0x28, 0x90, 0x60,
-0x90, 0x30, 0x60, 0xa0, 0x97, 0x00, 0x60, 0xa0, 0x96, 0xc0, 0x90, 0x30,
-0x60, 0xa0, 0x96, 0x80, 0x60, 0xa0, 0x96, 0x40, 0xe4, 0xe1, 0x41, 0xc0,
-0x35, 0x1b, 0xa0, 0x08, 0x08, 0x94, 0xe0, 0x9a, 0x60, 0x04, 0xa0, 0x91,
-0x40, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xc0, 0x33, 0x76,
-0xa4, 0x13, 0xd0, 0x33, 0x7b, 0x10, 0x10, 0xa4, 0x13, 0xc8, 0x33, 0x7a,
-0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x5b, 0x80, 0x33, 0x60, 0x10, 0x10,
-0x80, 0x33, 0x5f, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x40,
-0x80, 0x33, 0x45, 0x10, 0x10, 0x80, 0x33, 0x44, 0x90, 0x50, 0x90, 0x28,
-0x80, 0x33, 0x21, 0x80, 0x33, 0x26, 0x10, 0x10, 0x80, 0x33, 0x25, 0x91,
-0x40, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xa8, 0x33, 0x73,
-0xa4, 0x13, 0xb8, 0x33, 0x75, 0x10, 0x10, 0xa4, 0x13, 0xb0, 0x33, 0x74,
-0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x58, 0x80, 0x33, 0x5a, 0x10, 0x10,
-0x80, 0x33, 0x59, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x3d,
-0x80, 0x33, 0x3f, 0x10, 0x10, 0x80, 0x33, 0x3e, 0x90, 0x50, 0x90, 0x28,
-0x80, 0x33, 0x1e, 0x80, 0x33, 0x20, 0x10, 0x10, 0x80, 0x33, 0x1f, 0xe4,
-0xe1, 0x54, 0x40, 0x35, 0x5b, 0x9a, 0x60, 0x02, 0xe0, 0x91, 0x40, 0x90,
-0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x18, 0xe8, 0x33, 0x77, 0xa4, 0x18,
-0xe0, 0x33, 0x79, 0x10, 0x10, 0xa4, 0x18, 0xd8, 0x33, 0x78, 0x90, 0x50,
-0x90, 0x28, 0x80, 0x33, 0x5c, 0x80, 0x33, 0x5e, 0x10, 0x10, 0x80, 0x33,
-0x5d, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x41, 0x80, 0x33,
-0x43, 0x10, 0x10, 0x80, 0x33, 0x42, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33,
-0x22, 0x80, 0x33, 0x24, 0x10, 0x10, 0x80, 0x33, 0x23, 0x81, 0x90, 0x50,
-0x90, 0x28, 0x24, 0x18, 0xc0, 0x24, 0x18, 0xd0, 0x10, 0x10, 0x24, 0x18,
-0xc8, 0xe4, 0xe1, 0x40, 0xc0, 0x35, 0x17, 0x93, 0x90, 0x99, 0xb8, 0x03,
-0x50, 0x90, 0xe8, 0x90, 0x88, 0x90, 0x40, 0x80, 0xa4, 0x14, 0xb0, 0x32,
-0xa8, 0x10, 0x10, 0xa4, 0x14, 0xa8, 0x32, 0xa7, 0x90, 0x28, 0x81, 0x32,
-0xa4, 0x10, 0x10, 0x80, 0x32, 0xa3, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32,
-0xa0, 0x10, 0x10, 0x80, 0x32, 0x9f, 0x90, 0x28, 0x81, 0x32, 0x9c, 0x10,
-0x10, 0x80, 0x32, 0x9b, 0x90, 0xe8, 0x90, 0x88, 0x90, 0x40, 0x80, 0xa4,
-0x14, 0x98, 0x32, 0xa5, 0x10, 0x10, 0xa4, 0x14, 0xa0, 0x32, 0xa6, 0x90,
-0x28, 0x81, 0x32, 0xa1, 0x10, 0x10, 0x80, 0x32, 0xa2, 0x90, 0x60, 0x90,
-0x28, 0x81, 0x32, 0x9d, 0x10, 0x10, 0x80, 0x32, 0x9e, 0x90, 0x28, 0x81,
-0x32, 0x99, 0x10, 0x10, 0x80, 0x32, 0x9a, 0xe4, 0xe1, 0x53, 0xc0, 0x35,
-0x59, 0x88, 0x00, 0x88, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, 0x81, 0x32,
-0x97, 0x10, 0x10, 0x80, 0x32, 0x98, 0xe4, 0xe1, 0x3f, 0xc0, 0x35, 0x13,
-0xa0, 0x0e, 0x80, 0xa0, 0x09, 0x08, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40,
-0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x17, 0x80,
-0x33, 0x16, 0x10, 0x10, 0x80, 0x33, 0x15, 0x90, 0x50, 0x90, 0x28, 0x80,
-0x32, 0xfc, 0x80, 0x32, 0xfb, 0x10, 0x10, 0x80, 0x32, 0xfa, 0x90, 0x88,
-0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe1, 0x80, 0x32, 0xe0, 0x10, 0x10,
-0x80, 0x32, 0xdf, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xc6, 0x80, 0x32,
-0xc5, 0x10, 0x10, 0x80, 0x32, 0xc4, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50,
-0x90, 0x28, 0x80, 0x33, 0x12, 0x80, 0x33, 0x14, 0x10, 0x10, 0x80, 0x33,
-0x13, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xf7, 0x80, 0x32, 0xf9, 0x10,
-0x10, 0x80, 0x32, 0xf8, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32,
-0xdc, 0x80, 0x32, 0xde, 0x10, 0x10, 0x80, 0x32, 0xdd, 0x90, 0x50, 0x90,
-0x28, 0x80, 0x32, 0xc1, 0x80, 0x32, 0xc3, 0x10, 0x10, 0x80, 0x32, 0xc2,
-0xe4, 0xe1, 0x4c, 0xc0, 0x35, 0x47, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10,
-0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x0f, 0x80, 0x33, 0x11,
-0x10, 0x10, 0x80, 0x33, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xf4,
-0x80, 0x32, 0xf6, 0x10, 0x10, 0x80, 0x32, 0xf5, 0x90, 0x88, 0x90, 0x50,
-0x90, 0x28, 0x80, 0x32, 0xd9, 0x80, 0x32, 0xdb, 0x10, 0x10, 0x80, 0x32,
-0xda, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xbe, 0x80, 0x32, 0xc0, 0x10,
-0x10, 0x80, 0x32, 0xbf, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28,
-0x80, 0x33, 0x0c, 0x80, 0x33, 0x0e, 0x10, 0x10, 0x80, 0x33, 0x0d, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x32, 0xf1, 0x80, 0x32, 0xf3, 0x10, 0x10, 0x80,
-0x32, 0xf2, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xd6, 0x80,
-0x32, 0xd8, 0x10, 0x10, 0x80, 0x32, 0xd7, 0x90, 0x50, 0x90, 0x28, 0x80,
-0x32, 0xbb, 0x80, 0x32, 0xbd, 0x10, 0x10, 0x80, 0x32, 0xbc, 0xe4, 0xe1,
-0x3c, 0x40, 0x34, 0xfb, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10,
-0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x09, 0x80, 0x33, 0x0b,
-0x10, 0x10, 0x80, 0x33, 0x0a, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xee,
-0x80, 0x32, 0xf0, 0x10, 0x10, 0x80, 0x32, 0xef, 0x90, 0x88, 0x90, 0x50,
-0x90, 0x28, 0x80, 0x32, 0xd3, 0x80, 0x32, 0xd5, 0x10, 0x10, 0x80, 0x32,
-0xd4, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xb8, 0x80, 0x32, 0xba, 0x10,
-0x10, 0x80, 0x32, 0xb9, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28,
-0x80, 0x33, 0x06, 0x80, 0x33, 0x08, 0x10, 0x10, 0x80, 0x33, 0x07, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x32, 0xeb, 0x80, 0x32, 0xed, 0x10, 0x10, 0x80,
-0x32, 0xec, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xd0, 0x80,
-0x32, 0xd2, 0x10, 0x10, 0x80, 0x32, 0xd1, 0x90, 0x50, 0x90, 0x28, 0x80,
-0x32, 0xb5, 0x80, 0x32, 0xb7, 0x10, 0x10, 0x80, 0x32, 0xb6, 0xe4, 0xe1,
-0x4b, 0xc0, 0x35, 0x43, 0x88, 0x00, 0xb0, 0x10, 0x10, 0x10, 0x10, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x32, 0xb2, 0x80, 0x32, 0xb4, 0x10, 0x10, 0x80,
-0x32, 0xb3, 0xe4, 0xe1, 0x3b, 0xc0, 0x34, 0xf9, 0x96, 0xe8, 0x94, 0x80,
+0xa0, 0xc7, 0xc8, 0xa0, 0x2e, 0xd8, 0xa0, 0x2c, 0xc0, 0xa0, 0x1c, 0x00,
+0x98, 0xb0, 0x02, 0x50, 0x90, 0x50, 0x90, 0x28, 0x24, 0x39, 0x28, 0x24,
+0x39, 0x20, 0x90, 0x28, 0x24, 0x39, 0x18, 0x24, 0x39, 0x10, 0x91, 0x60,
+0x90, 0x28, 0x24, 0x39, 0x00, 0x10, 0x10, 0x58, 0x41, 0x61, 0xc7, 0xc0,
+0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
+0x10, 0x10, 0x52, 0xc0, 0xc0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
+0x10, 0x10, 0x10, 0x24, 0x24, 0x70, 0x90, 0x28, 0x24, 0x38, 0xf0, 0x24,
+0x38, 0xe8, 0xa8, 0x0b, 0x48, 0x15, 0x20, 0x97, 0x20, 0x95, 0xc8, 0x9a,
+0xb8, 0x05, 0x38, 0x91, 0x18, 0x90, 0xa0, 0x90, 0x60, 0x80, 0x90, 0x20,
+0x34, 0xa6, 0xa4, 0x25, 0x00, 0x34, 0xa3, 0x80, 0xa4, 0x36, 0xa0, 0x36,
+0xd9, 0x90, 0x50, 0x90, 0x28, 0x80, 0x36, 0xcf, 0x80, 0x34, 0x86, 0x81,
+0x33, 0xe2, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x24, 0x10, 0x34,
+0x83, 0xa4, 0x1f, 0x08, 0x34, 0x80, 0x90, 0x38, 0xa4, 0x38, 0xa0, 0x37,
+0x1a, 0xa4, 0x38, 0x48, 0x37, 0x0e, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x37,
+0x20, 0x36, 0xef, 0xa4, 0x36, 0xf8, 0x36, 0xea, 0x80, 0xa4, 0x23, 0xf0,
+0x34, 0x7f, 0x92, 0x18, 0x91, 0xc0, 0x80, 0x91, 0x80, 0x90, 0xf8, 0xdb,
+0x84, 0x60, 0xf9, 0x40, 0xc0, 0xc0, 0x80, 0xa4, 0x42, 0x68, 0x8c, 0x43,
+0xc8, 0x84, 0x38, 0x83, 0xc0, 0xc0, 0x80, 0xa4, 0x42, 0x58, 0x8c, 0x43,
+0xa8, 0x84, 0x38, 0x81, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0, 0x81, 0x38,
+0x35, 0x50, 0xc0, 0xc0, 0x81, 0x38, 0x33, 0xa4, 0x1f, 0x18, 0x33, 0xe4,
+0x80, 0x90, 0x28, 0x80, 0x33, 0xe0, 0x80, 0x34, 0x88, 0x81, 0x90, 0x38,
+0xa4, 0x24, 0x80, 0x34, 0x8b, 0xa4, 0x24, 0x48, 0x34, 0x85, 0xc0, 0x40,
+0x10, 0x10, 0x90, 0x38, 0xa4, 0x1e, 0xf0, 0x33, 0xdf, 0xa4, 0x1e, 0xe0,
+0x33, 0xdd, 0x18, 0x24, 0x24, 0xf8, 0x83, 0x90, 0xa8, 0xd3, 0x82, 0xc0,
+0xc0, 0xc0, 0x80, 0xa4, 0x42, 0x38, 0x38, 0x6d, 0xc0, 0xc0, 0x80, 0xa4,
+0x42, 0x28, 0x38, 0x69, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0, 0x81, 0x38,
+0x2f, 0x50, 0xc0, 0xc0, 0x81, 0x38, 0x2d, 0x92, 0xb8, 0x99, 0x84, 0x24,
+0x68, 0x90, 0x78, 0x90, 0x50, 0x10, 0x10, 0x80, 0xa4, 0x36, 0x98, 0x36,
+0xd8, 0x82, 0x36, 0xce, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x38,
+0x98, 0x37, 0x19, 0xa4, 0x38, 0x40, 0x37, 0x0d, 0x80, 0x90, 0x38, 0xa4,
+0x37, 0x18, 0x36, 0xee, 0xa4, 0x36, 0xf0, 0x36, 0xe9, 0x83, 0x90, 0xa8,
+0xd3, 0x82, 0xc0, 0xc0, 0xc0, 0x80, 0xa4, 0x42, 0x08, 0x38, 0x61, 0xc0,
+0xc0, 0x80, 0xa4, 0x41, 0xf8, 0x38, 0x5d, 0xd3, 0x82, 0x40, 0x50, 0xc0,
+0xc0, 0x81, 0x38, 0x29, 0x50, 0xc0, 0xc0, 0x81, 0x38, 0x27, 0x18, 0x24,
+0x24, 0x78, 0x83, 0x90, 0xa8, 0xd3, 0x82, 0xc0, 0xc0, 0xc0, 0x80, 0xa4,
+0x41, 0xd8, 0x38, 0x55, 0xc0, 0xc0, 0x80, 0xa4, 0x41, 0xc8, 0x38, 0x51,
+0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0, 0x81, 0x38, 0x23, 0x50, 0xc0, 0xc0,
+0x81, 0x38, 0x21, 0x94, 0x50, 0x92, 0xf8, 0x99, 0x84, 0x1f, 0x48, 0x90,
+0x78, 0x90, 0x50, 0x10, 0x10, 0x80, 0xa4, 0x36, 0x90, 0x36, 0xd7, 0x82,
+0x36, 0xcd, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x38, 0x90, 0x37,
+0x18, 0xa4, 0x38, 0x38, 0x37, 0x0c, 0x80, 0x90, 0x38, 0xa4, 0x37, 0x10,
+0x36, 0xed, 0xa4, 0x36, 0xe8, 0x36, 0xe8, 0x83, 0x90, 0xe8, 0xd3, 0x83,
+0xc0, 0xc0, 0xc0, 0x80, 0xa4, 0x42, 0x78, 0x8c, 0x43, 0xe8, 0x84, 0x38,
+0x85, 0xc0, 0xc0, 0x80, 0xa4, 0x42, 0x60, 0x8c, 0x43, 0xb8, 0x84, 0x38,
+0x82, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0, 0x81, 0x38, 0x37, 0x50, 0xc0,
+0xc0, 0x81, 0x38, 0x34, 0x18, 0x24, 0x1f, 0x40, 0x83, 0x90, 0xa8, 0xd3,
+0x82, 0xc0, 0xc0, 0xc0, 0x80, 0xa4, 0x42, 0x48, 0x38, 0x71, 0xc0, 0xc0,
+0x80, 0xa4, 0x42, 0x30, 0x38, 0x6b, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0,
+0x81, 0x38, 0x31, 0x50, 0xc0, 0xc0, 0x81, 0x38, 0x2e, 0x92, 0xb8, 0x99,
+0x84, 0x1f, 0x38, 0x90, 0x78, 0x90, 0x50, 0x10, 0x10, 0x80, 0xa4, 0x36,
+0x88, 0x36, 0xd6, 0x82, 0x36, 0xcc, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38,
+0xa4, 0x38, 0x88, 0x37, 0x17, 0xa4, 0x38, 0x30, 0x37, 0x0b, 0x80, 0x90,
+0x38, 0xa4, 0x37, 0x08, 0x36, 0xec, 0xa4, 0x36, 0xe0, 0x36, 0xe7, 0x83,
+0x90, 0xa8, 0xd3, 0x82, 0xc0, 0xc0, 0xc0, 0x80, 0xa4, 0x42, 0x18, 0x38,
+0x65, 0xc0, 0xc0, 0x80, 0xa4, 0x42, 0x00, 0x38, 0x5f, 0xd3, 0x82, 0x40,
+0x50, 0xc0, 0xc0, 0x81, 0x38, 0x2b, 0x50, 0xc0, 0xc0, 0x81, 0x38, 0x28,
+0x18, 0x20, 0x01, 0x48, 0x83, 0x90, 0xa8, 0xd3, 0x82, 0xc0, 0xc0, 0xc0,
+0x80, 0xa4, 0x41, 0xe8, 0x38, 0x59, 0xc0, 0xc0, 0x80, 0xa4, 0x41, 0xd0,
+0x38, 0x53, 0xd3, 0x82, 0x40, 0x50, 0xc0, 0xc0, 0x81, 0x38, 0x25, 0x50,
+0xc0, 0xc0, 0x81, 0x38, 0x22, 0xda, 0x06, 0xe0, 0xf9, 0x80, 0x90, 0x60,
+0x90, 0x38, 0xa4, 0x24, 0xe8, 0x34, 0x9b, 0x80, 0x34, 0x98, 0x90, 0x38,
+0xa4, 0x24, 0x90, 0x34, 0x96, 0x80, 0x34, 0x93, 0x90, 0x60, 0x90, 0x38,
+0xa4, 0x24, 0xd0, 0x34, 0x9c, 0x80, 0x34, 0x99, 0x90, 0x38, 0xa4, 0x24,
+0xa8, 0x34, 0x97, 0x80, 0x34, 0x94, 0xc8, 0x40, 0x19, 0x00, 0x91, 0x58,
+0x90, 0x60, 0x82, 0x90, 0x20, 0x36, 0xcb, 0xa4, 0x36, 0x48, 0x36, 0xca,
+0x90, 0xc0, 0x80, 0x90, 0x90, 0x90, 0x48, 0xc9, 0xe1, 0xc1, 0x00, 0x85,
+0x37, 0x03, 0xc9, 0xe1, 0xc0, 0x40, 0x85, 0x37, 0x00, 0x80, 0x36, 0xff,
+0x10, 0x10, 0x81, 0x36, 0xdb, 0x90, 0xa8, 0x10, 0x10, 0x90, 0x28, 0x81,
+0x36, 0xf9, 0x90, 0x38, 0xa4, 0x37, 0xa0, 0x36, 0xf5, 0xa4, 0x37, 0x90,
+0x36, 0xf3, 0x90, 0x70, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x37, 0xb8, 0x36,
+0xf8, 0x80, 0x36, 0xf6, 0x90, 0x60, 0x90, 0x28, 0x24, 0x37, 0xf0, 0xa4,
+0x37, 0xe0, 0x36, 0xfd, 0x80, 0xa4, 0x37, 0xd0, 0x36, 0xfb, 0x80, 0x90,
+0xf8, 0x90, 0x90, 0x90, 0x50, 0x90, 0x28, 0x80, 0x38, 0x17, 0x80, 0x38,
+0x20, 0x80, 0xa4, 0x40, 0xf0, 0x38, 0x1f, 0x90, 0x28, 0x81, 0x38, 0x1d,
+0x80, 0xa4, 0x40, 0xd8, 0x38, 0x1c, 0x90, 0x28, 0x82, 0x38, 0x1a, 0x81,
+0xa4, 0x40, 0xc0, 0x38, 0x19, 0x98, 0xe8, 0x01, 0xb0, 0x90, 0x88, 0x90,
+0x60, 0xa4, 0x36, 0x38, 0x10, 0x10, 0x10, 0x10, 0x83, 0x33, 0xb7, 0x24,
+0x36, 0x30, 0x90, 0x28, 0x24, 0x36, 0x28, 0x24, 0x36, 0x20, 0x90, 0x88,
+0x90, 0x60, 0xa4, 0x36, 0x10, 0x10, 0x10, 0x10, 0x10, 0x83, 0x33, 0xb6,
+0x24, 0x36, 0x08, 0x90, 0x28, 0x24, 0x36, 0x00, 0x24, 0x35, 0xf8, 0xa8,
+0x09, 0x00, 0x0e, 0x20, 0x96, 0x48, 0x95, 0xe8, 0x93, 0x38, 0x91, 0xa0,
+0x90, 0xd0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x1e, 0x60, 0x33, 0xcd, 0xa4,
+0x1e, 0x50, 0x33, 0xcb, 0x90, 0x38, 0xa4, 0x1e, 0x40, 0x33, 0xc9, 0x80,
+0x33, 0xc7, 0x90, 0x60, 0x90, 0x28, 0x24, 0x1e, 0x00, 0xa4, 0x1d, 0xf0,
+0x33, 0xbf, 0x90, 0x38, 0xa4, 0x1d, 0xe0, 0x33, 0xbd, 0xa4, 0x1e, 0x28,
+0x33, 0xc6, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x1e, 0x18, 0x33,
+0xc4, 0xa4, 0x1e, 0x08, 0x33, 0xc2, 0x90, 0x38, 0xa4, 0x35, 0xb0, 0x36,
+0xbc, 0xa4, 0x35, 0x50, 0x36, 0xb0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x32,
+0x90, 0x36, 0x5e, 0xa4, 0x32, 0x60, 0x36, 0x58, 0x10, 0x10, 0xa4, 0x1d,
+0xd0, 0x33, 0xbb, 0x99, 0x60, 0x02, 0x70, 0x90, 0x90, 0x90, 0x50, 0x90,
+0x28, 0x24, 0x1e, 0x90, 0x80, 0x33, 0xda, 0x80, 0xa4, 0x1e, 0x98, 0x33,
+0xd8, 0x90, 0x50, 0x90, 0x28, 0x24, 0x1e, 0xa0, 0x80, 0x33, 0xdb, 0x90,
+0x38, 0xa4, 0x1e, 0xa8, 0x33, 0xd9, 0xa4, 0x1e, 0x70, 0x33, 0xcf, 0x90,
+0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x34, 0xe8, 0x36, 0xa5, 0xa4, 0x34,
+0x48, 0x36, 0x92, 0x90, 0x38, 0xa4, 0x33, 0xe0, 0x36, 0x83, 0xa4, 0x33,
+0x50, 0x36, 0x72, 0x81, 0xa4, 0x1e, 0x80, 0x33, 0xd1, 0xe4, 0xa2, 0x04,
+0x40, 0x38, 0x13, 0x18, 0x24, 0x1d, 0xc8, 0xe4, 0xe2, 0x02, 0xc0, 0x38,
+0x0d, 0x92, 0x40, 0x91, 0x08, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90,
+0x38, 0xa4, 0x35, 0xa8, 0x36, 0xbb, 0xa4, 0x35, 0x48, 0x36, 0xaf, 0x80,
+0x90, 0x38, 0xa4, 0x32, 0x88, 0x36, 0x5d, 0xa4, 0x32, 0x58, 0x36, 0x57,
+0x18, 0x20, 0x00, 0xf8, 0x80, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x34, 0xd8,
+0x36, 0xa4, 0xa4, 0x34, 0x40, 0x36, 0x90, 0x90, 0x38, 0xa4, 0x33, 0xd0,
+0x36, 0x82, 0xa4, 0x33, 0x48, 0x36, 0x70, 0xe4, 0xa2, 0x01, 0x40, 0x38,
+0x07, 0x18, 0x24, 0x1d, 0xc0, 0xe4, 0xe1, 0xff, 0xc0, 0x38, 0x01, 0x92,
+0x90, 0x92, 0x40, 0x91, 0x08, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90,
+0x38, 0xa4, 0x35, 0xa0, 0x36, 0xba, 0xa4, 0x35, 0x40, 0x36, 0xae, 0x80,
+0x90, 0x38, 0xa4, 0x32, 0x80, 0x36, 0x5c, 0xa4, 0x32, 0x50, 0x36, 0x56,
+0x18, 0x20, 0x00, 0xf8, 0x80, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x34, 0xc8,
+0x36, 0xa3, 0xa4, 0x34, 0x38, 0x36, 0x8e, 0x90, 0x38, 0xa4, 0x33, 0xc0,
+0x36, 0x81, 0xa4, 0x33, 0x40, 0x36, 0x6e, 0xe4, 0xa2, 0x04, 0x80, 0x38,
+0x15, 0x10, 0x10, 0xe4, 0xe2, 0x03, 0x00, 0x38, 0x0f, 0x92, 0x50, 0x99,
+0x1c, 0x1e, 0xb0, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4,
+0x35, 0x98, 0x36, 0xb9, 0xa4, 0x35, 0x38, 0x36, 0xad, 0x80, 0x90, 0x38,
+0xa4, 0x32, 0x78, 0x36, 0x5b, 0xa4, 0x32, 0x48, 0x36, 0x55, 0x18, 0x20,
+0x00, 0xf8, 0x80, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x34, 0xb8, 0x36, 0xa2,
+0xa4, 0x34, 0x30, 0x36, 0x8c, 0x90, 0x38, 0xa4, 0x33, 0xb0, 0x36, 0x80,
+0xa4, 0x33, 0x38, 0x36, 0x6c, 0xe4, 0xa2, 0x01, 0x80, 0x38, 0x09, 0x10,
+0x10, 0xe4, 0xe2, 0x00, 0x00, 0x38, 0x03, 0xc0, 0x40, 0x80, 0x10, 0x10,
+0x81, 0x90, 0x90, 0x90, 0x48, 0xc9, 0xe1, 0x98, 0x80, 0x85, 0x36, 0x66,
+0xc9, 0xe1, 0x99, 0x00, 0x85, 0x36, 0x63, 0x80, 0x36, 0x61, 0x80, 0xd8,
+0x47, 0x80, 0x0d, 0xc0, 0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58, 0xd5,
+0x81, 0x80, 0x80, 0x37, 0xfd, 0x80, 0x37, 0xfb, 0xd5, 0x81, 0x80, 0x80,
+0x37, 0xf9, 0x80, 0x37, 0xf7, 0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58,
+0xd5, 0x81, 0x80, 0x80, 0x37, 0xfe, 0x80, 0x37, 0xfc, 0xd5, 0x81, 0x80,
+0x80, 0x37, 0xfa, 0x80, 0x37, 0xf8, 0xc0, 0x80, 0x83, 0xa4, 0x3f, 0xa8,
+0x37, 0xf6, 0xa0, 0x59, 0x60, 0xa0, 0x41, 0xe0, 0xa8, 0x1e, 0xb0, 0x34,
+0x88, 0xa0, 0x12, 0x38, 0xa0, 0x0b, 0x48, 0x96, 0x00, 0x9a, 0xf0, 0x05,
+0xc0, 0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x15, 0x58,
+0x33, 0xb5, 0xa4, 0x15, 0x78, 0x33, 0xb4, 0x10, 0x10, 0xa4, 0x15, 0x68,
+0x33, 0xb3, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0xf8, 0x33, 0x9a, 0xa4,
+0x15, 0x18, 0x33, 0x99, 0x10, 0x10, 0xa4, 0x15, 0x08, 0x33, 0x98, 0x90,
+0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x98, 0x33, 0x7f, 0xa4, 0x14,
+0xb8, 0x33, 0x7e, 0x10, 0x10, 0xa4, 0x14, 0xa8, 0x33, 0x7d, 0x90, 0x70,
+0x90, 0x38, 0xa4, 0x14, 0x38, 0x33, 0x63, 0xa4, 0x14, 0x58, 0x33, 0x62,
+0x10, 0x10, 0xa4, 0x14, 0x48, 0x33, 0x61, 0x91, 0x70, 0x90, 0xb8, 0x90,
+0x70, 0x90, 0x38, 0xa4, 0x15, 0x28, 0x33, 0xb0, 0xa4, 0x15, 0x48, 0x33,
+0xb2, 0x10, 0x10, 0xa4, 0x15, 0x38, 0x33, 0xb1, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x14, 0xc8, 0x33, 0x95, 0xa4, 0x14, 0xe8, 0x33, 0x97, 0x10, 0x10,
+0xa4, 0x14, 0xd8, 0x33, 0x96, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4,
+0x14, 0x68, 0x33, 0x7a, 0xa4, 0x14, 0x88, 0x33, 0x7c, 0x10, 0x10, 0xa4,
+0x14, 0x78, 0x33, 0x7b, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x08, 0x33,
+0x5e, 0xa4, 0x14, 0x28, 0x33, 0x60, 0x10, 0x10, 0xa4, 0x14, 0x18, 0x33,
+0x5f, 0xe4, 0xe1, 0x8b, 0x40, 0x36, 0x41, 0x9a, 0xf0, 0x05, 0x00, 0x91,
+0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xa0, 0x33, 0xad,
+0xa4, 0x13, 0x98, 0x33, 0xaf, 0x10, 0x10, 0xa4, 0x13, 0x90, 0x33, 0xae,
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x88, 0x33, 0x92, 0xa4, 0x13, 0x80,
+0x33, 0x94, 0x10, 0x10, 0xa4, 0x13, 0x78, 0x33, 0x93, 0x90, 0xb8, 0x90,
+0x70, 0x90, 0x38, 0xa4, 0x13, 0x70, 0x33, 0x77, 0xa4, 0x13, 0x68, 0x33,
+0x79, 0x10, 0x10, 0xa4, 0x13, 0x60, 0x33, 0x78, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x13, 0x58, 0x33, 0x5b, 0xa4, 0x13, 0x50, 0x33, 0x5d, 0x10, 0x10,
+0xa4, 0x13, 0x48, 0x33, 0x5c, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90,
+0x28, 0x80, 0x33, 0xaa, 0x80, 0x33, 0xac, 0x10, 0x10, 0x80, 0x33, 0xab,
+0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x8f, 0x80, 0x33, 0x91, 0x10, 0x10,
+0x80, 0x33, 0x90, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x74,
+0x80, 0x33, 0x76, 0x10, 0x10, 0x80, 0x33, 0x75, 0x90, 0x50, 0x90, 0x28,
+0x80, 0x33, 0x58, 0x80, 0x33, 0x5a, 0x10, 0x10, 0x80, 0x33, 0x59, 0xe4,
+0xe1, 0x66, 0x40, 0x35, 0xc1, 0x95, 0x40, 0x9a, 0x90, 0x05, 0x00, 0x91,
+0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xa7, 0x80, 0x33,
+0xa9, 0x10, 0x10, 0x80, 0x33, 0xa8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33,
+0x8c, 0x80, 0x33, 0x8e, 0x10, 0x10, 0x80, 0x33, 0x8d, 0x90, 0xb8, 0x90,
+0x70, 0x90, 0x38, 0xa4, 0x13, 0x30, 0x33, 0x71, 0xa4, 0x13, 0x40, 0x33,
+0x73, 0x10, 0x10, 0xa4, 0x13, 0x38, 0x33, 0x72, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x13, 0x00, 0x33, 0x55, 0xa4, 0x13, 0x10, 0x33, 0x57, 0x10, 0x10,
+0xa4, 0x13, 0x08, 0x33, 0x56, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90,
+0x28, 0x80, 0x33, 0xa4, 0x80, 0x33, 0xa6, 0x10, 0x10, 0x80, 0x33, 0xa5,
+0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x89, 0x80, 0x33, 0x8b, 0x10, 0x10,
+0x80, 0x33, 0x8a, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x18,
+0x33, 0x6e, 0xa4, 0x13, 0x28, 0x33, 0x70, 0x10, 0x10, 0xa4, 0x13, 0x20,
+0x33, 0x6f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x12, 0xe8, 0x33, 0x52, 0xa4,
+0x12, 0xf8, 0x33, 0x54, 0x10, 0x10, 0xa4, 0x12, 0xf0, 0x33, 0x53, 0xe4,
+0xe1, 0x8a, 0x40, 0x36, 0x3d, 0x98, 0xb8, 0x01, 0x68, 0x10, 0x10, 0x10,
+0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x4f, 0x80, 0x33, 0x51, 0x10,
+0x10, 0x80, 0x33, 0x50, 0x90, 0x60, 0x90, 0x30, 0x60, 0xa0, 0x97, 0x00,
+0x60, 0xa0, 0x96, 0xc0, 0x90, 0x30, 0x60, 0xa0, 0x96, 0x80, 0x60, 0xa0,
+0x96, 0x40, 0xe4, 0xe1, 0x64, 0x40, 0x35, 0xb9, 0xa0, 0x08, 0x08, 0x94,
+0xe0, 0x9a, 0x60, 0x04, 0xa0, 0x91, 0x40, 0x90, 0xb8, 0x90, 0x70, 0x90,
+0x38, 0xa4, 0x13, 0xd8, 0x33, 0x9e, 0xa4, 0x13, 0xf8, 0x33, 0xa3, 0x10,
+0x10, 0xa4, 0x13, 0xe8, 0x33, 0xa2, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33,
+0x83, 0x80, 0x33, 0x88, 0x10, 0x10, 0x80, 0x33, 0x87, 0x90, 0x88, 0x90,
+0x50, 0x90, 0x28, 0x80, 0x33, 0x68, 0x80, 0x33, 0x6d, 0x10, 0x10, 0x80,
+0x33, 0x6c, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x49, 0x80, 0x33, 0x4e,
+0x10, 0x10, 0x80, 0x33, 0x4d, 0x91, 0x40, 0x90, 0xb8, 0x90, 0x70, 0x90,
+0x38, 0xa4, 0x13, 0xa8, 0x33, 0x9b, 0xa4, 0x13, 0xc8, 0x33, 0x9d, 0x10,
+0x10, 0xa4, 0x13, 0xb8, 0x33, 0x9c, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33,
+0x80, 0x80, 0x33, 0x82, 0x10, 0x10, 0x80, 0x33, 0x81, 0x90, 0x88, 0x90,
+0x50, 0x90, 0x28, 0x80, 0x33, 0x65, 0x80, 0x33, 0x67, 0x10, 0x10, 0x80,
+0x33, 0x66, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x46, 0x80, 0x33, 0x48,
+0x10, 0x10, 0x80, 0x33, 0x47, 0xe4, 0xe1, 0x89, 0x40, 0x36, 0x39, 0x9a,
+0x60, 0x02, 0xe0, 0x91, 0x40, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4,
+0x1a, 0x20, 0x33, 0x9f, 0xa4, 0x1a, 0x10, 0x33, 0xa1, 0x10, 0x10, 0xa4,
+0x1a, 0x00, 0x33, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x84, 0x80,
+0x33, 0x86, 0x10, 0x10, 0x80, 0x33, 0x85, 0x90, 0x88, 0x90, 0x50, 0x90,
+0x28, 0x80, 0x33, 0x69, 0x80, 0x33, 0x6b, 0x10, 0x10, 0x80, 0x33, 0x6a,
+0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x4a, 0x80, 0x33, 0x4c, 0x10, 0x10,
+0x80, 0x33, 0x4b, 0x81, 0x90, 0x50, 0x90, 0x28, 0x24, 0x19, 0xd0, 0x24,
+0x19, 0xf0, 0x10, 0x10, 0x24, 0x19, 0xe0, 0xe4, 0xe1, 0x62, 0x40, 0x35,
+0xb1, 0x93, 0x90, 0x99, 0xb8, 0x03, 0x50, 0x90, 0xe8, 0x90, 0x88, 0x90,
+0x40, 0x80, 0xa4, 0x15, 0xb8, 0x32, 0xca, 0x10, 0x10, 0xa4, 0x15, 0xa8,
+0x32, 0xc9, 0x90, 0x28, 0x81, 0x32, 0xc6, 0x10, 0x10, 0x80, 0x32, 0xc5,
+0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0xc2, 0x10, 0x10, 0x80, 0x32, 0xc1,
+0x90, 0x28, 0x81, 0x32, 0xbe, 0x10, 0x10, 0x80, 0x32, 0xbd, 0x90, 0xe8,
+0x90, 0x88, 0x90, 0x40, 0x80, 0xa4, 0x15, 0x88, 0x32, 0xc7, 0x10, 0x10,
+0xa4, 0x15, 0x98, 0x32, 0xc8, 0x90, 0x28, 0x81, 0x32, 0xc3, 0x10, 0x10,
+0x80, 0x32, 0xc4, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0xbf, 0x10, 0x10,
+0x80, 0x32, 0xc0, 0x90, 0x28, 0x81, 0x32, 0xbb, 0x10, 0x10, 0x80, 0x32,
+0xbc, 0xe4, 0xe1, 0x88, 0x40, 0x36, 0x35, 0x88, 0x00, 0x88, 0x10, 0x10,
+0x10, 0x10, 0x90, 0x28, 0x81, 0x32, 0xb9, 0x10, 0x10, 0x80, 0x32, 0xba,
+0xe4, 0xe1, 0x60, 0x40, 0x35, 0xa9, 0xa0, 0x0e, 0x80, 0xa0, 0x09, 0x08,
+0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50,
+0x90, 0x28, 0x80, 0x33, 0x39, 0x80, 0x33, 0x38, 0x10, 0x10, 0x80, 0x33,
+0x37, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x1e, 0x80, 0x33, 0x1d, 0x10,
+0x10, 0x80, 0x33, 0x1c, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33,
+0x03, 0x80, 0x33, 0x02, 0x10, 0x10, 0x80, 0x33, 0x01, 0x90, 0x50, 0x90,
+0x28, 0x80, 0x32, 0xe8, 0x80, 0x32, 0xe7, 0x10, 0x10, 0x80, 0x32, 0xe6,
+0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x34, 0x80,
+0x33, 0x36, 0x10, 0x10, 0x80, 0x33, 0x35, 0x90, 0x50, 0x90, 0x28, 0x80,
+0x33, 0x19, 0x80, 0x33, 0x1b, 0x10, 0x10, 0x80, 0x33, 0x1a, 0x90, 0x88,
+0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xfe, 0x80, 0x33, 0x00, 0x10, 0x10,
+0x80, 0x32, 0xff, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe3, 0x80, 0x32,
+0xe5, 0x10, 0x10, 0x80, 0x32, 0xe4, 0xe4, 0xe1, 0x7a, 0x40, 0x36, 0x11,
+0x9a, 0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28,
+0x80, 0x33, 0x31, 0x80, 0x33, 0x33, 0x10, 0x10, 0x80, 0x33, 0x32, 0x90,
+0x50, 0x90, 0x28, 0x80, 0x33, 0x16, 0x80, 0x33, 0x18, 0x10, 0x10, 0x80,
+0x33, 0x17, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xfb, 0x80,
+0x32, 0xfd, 0x10, 0x10, 0x80, 0x32, 0xfc, 0x90, 0x50, 0x90, 0x28, 0x80,
+0x32, 0xe0, 0x80, 0x32, 0xe2, 0x10, 0x10, 0x80, 0x32, 0xe1, 0x91, 0x10,
+0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x2e, 0x80, 0x33, 0x30,
+0x10, 0x10, 0x80, 0x33, 0x2f, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x13,
+0x80, 0x33, 0x15, 0x10, 0x10, 0x80, 0x33, 0x14, 0x90, 0x88, 0x90, 0x50,
+0x90, 0x28, 0x80, 0x32, 0xf8, 0x80, 0x32, 0xfa, 0x10, 0x10, 0x80, 0x32,
+0xf9, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xdd, 0x80, 0x32, 0xdf, 0x10,
+0x10, 0x80, 0x32, 0xde, 0xe4, 0xe1, 0x59, 0x40, 0x35, 0x79, 0x94, 0x80,
0x9a, 0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28,
-0x80, 0x33, 0x00, 0x80, 0x33, 0x05, 0x10, 0x10, 0x80, 0x33, 0x04, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x32, 0xe5, 0x80, 0x32, 0xea, 0x10, 0x10, 0x80,
-0x32, 0xe9, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xca, 0x80,
-0x32, 0xcf, 0x10, 0x10, 0x80, 0x32, 0xce, 0x90, 0x50, 0x90, 0x28, 0x80,
-0x32, 0xac, 0x80, 0x32, 0xb1, 0x10, 0x10, 0x80, 0x32, 0xb0, 0x91, 0x10,
-0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xfd, 0x80, 0x32, 0xff,
-0x10, 0x10, 0x80, 0x32, 0xfe, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe2,
-0x80, 0x32, 0xe4, 0x10, 0x10, 0x80, 0x32, 0xe3, 0x90, 0x88, 0x90, 0x50,
-0x90, 0x28, 0x80, 0x32, 0xc7, 0x80, 0x32, 0xc9, 0x10, 0x10, 0x80, 0x32,
-0xc8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xa9, 0x80, 0x32, 0xab, 0x10,
-0x10, 0x80, 0x32, 0xaa, 0xe4, 0xe1, 0x4a, 0xc0, 0x35, 0x3f, 0x88, 0x02,
-0x28, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x01,
-0x80, 0x33, 0x03, 0x10, 0x10, 0x80, 0x33, 0x02, 0x90, 0x50, 0x90, 0x28,
-0x80, 0x32, 0xe6, 0x80, 0x32, 0xe8, 0x10, 0x10, 0x80, 0x32, 0xe7, 0x90,
-0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xcb, 0x80, 0x32, 0xcd, 0x10,
-0x10, 0x80, 0x32, 0xcc, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xad, 0x80,
-0x32, 0xaf, 0x10, 0x10, 0x80, 0x32, 0xae, 0xe4, 0xe1, 0x3b, 0x40, 0x34,
-0xf7, 0x90, 0x40, 0xe5, 0x21, 0x49, 0xc0, 0x35, 0x3b, 0xe5, 0x21, 0x3a,
-0xc0, 0x34, 0xf5, 0x9e, 0xb4, 0x20, 0xa0, 0x93, 0x70, 0x91, 0xd8, 0xd5,
-0x07, 0x80, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x38, 0x08, 0x84,
-0x37, 0x0b, 0xa4, 0x35, 0xe8, 0x36, 0xd5, 0x90, 0x28, 0x24, 0x35, 0x28,
-0xa4, 0x33, 0xa8, 0x36, 0x8d, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c,
-0x37, 0xe8, 0x84, 0x37, 0x09, 0xa4, 0x35, 0xd8, 0x36, 0xd3, 0x90, 0x28,
-0x24, 0x35, 0x18, 0xa4, 0x33, 0x98, 0x36, 0x8b, 0xd5, 0x06, 0x80, 0xd0,
-0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xf5, 0xa4, 0x35, 0xb8, 0x36, 0xcf,
-0x90, 0x28, 0x24, 0x34, 0xf8, 0xa4, 0x33, 0x78, 0x36, 0x87, 0xd0, 0xc3,
-0x40, 0x90, 0x28, 0x80, 0x36, 0xf1, 0xa4, 0x35, 0xa8, 0x36, 0xcd, 0x90,
-0x28, 0x24, 0x34, 0xe8, 0xa4, 0x33, 0x68, 0x36, 0x85, 0x91, 0x98, 0xd5,
-0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xe9, 0xa4, 0x35,
-0x88, 0x36, 0xc9, 0x90, 0x28, 0x24, 0x34, 0xc8, 0xa4, 0x33, 0x48, 0x36,
-0x81, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xe5, 0xa4, 0x35, 0x78,
-0x36, 0xc7, 0x90, 0x28, 0x24, 0x34, 0xb8, 0xa4, 0x33, 0x38, 0x36, 0x7f,
-0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xdd, 0xa4,
-0x35, 0x58, 0x36, 0xc3, 0x90, 0x28, 0x24, 0x34, 0x98, 0xa4, 0x33, 0x18,
-0x36, 0x7b, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xd9, 0xa4, 0x35,
-0x48, 0x36, 0xc1, 0x90, 0x28, 0x24, 0x34, 0x88, 0xa4, 0x33, 0x08, 0x36,
-0x79, 0x93, 0x70, 0x91, 0xd8, 0xd5, 0x07, 0x80, 0xd0, 0xc4, 0x40, 0x90,
-0x48, 0x80, 0x8c, 0x38, 0x28, 0x84, 0x37, 0x0d, 0xa4, 0x35, 0xf8, 0x36,
-0xd7, 0x90, 0x28, 0x24, 0x35, 0x38, 0xa4, 0x33, 0xb8, 0x36, 0x8f, 0xd0,
-0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 0xf8, 0x84, 0x37, 0x0a, 0xa4,
-0x35, 0xe0, 0x36, 0xd4, 0x90, 0x28, 0x24, 0x35, 0x20, 0xa4, 0x33, 0xa0,
-0x36, 0x8c, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36,
-0xf9, 0xa4, 0x35, 0xc8, 0x36, 0xd1, 0x90, 0x28, 0x24, 0x35, 0x08, 0xa4,
-0x33, 0x88, 0x36, 0x89, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xf3,
-0xa4, 0x35, 0xb0, 0x36, 0xce, 0x90, 0x28, 0x24, 0x34, 0xf0, 0xa4, 0x33,
-0x70, 0x36, 0x86, 0x91, 0x98, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90,
-0x28, 0x80, 0x36, 0xed, 0xa4, 0x35, 0x98, 0x36, 0xcb, 0x90, 0x28, 0x24,
-0x34, 0xd8, 0xa4, 0x33, 0x58, 0x36, 0x83, 0xd0, 0xc3, 0x40, 0x90, 0x28,
-0x80, 0x36, 0xe7, 0xa4, 0x35, 0x80, 0x36, 0xc8, 0x90, 0x28, 0x24, 0x34,
-0xc0, 0xa4, 0x33, 0x40, 0x36, 0x80, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40,
-0x90, 0x28, 0x80, 0x36, 0xe1, 0xa4, 0x35, 0x68, 0x36, 0xc5, 0x90, 0x28,
-0x24, 0x34, 0xa8, 0xa4, 0x33, 0x28, 0x36, 0x7d, 0xd0, 0xc3, 0x40, 0x90,
-0x28, 0x80, 0x36, 0xdb, 0xa4, 0x35, 0x50, 0x36, 0xc2, 0x90, 0x28, 0x24,
-0x34, 0x90, 0xa4, 0x33, 0x10, 0x36, 0x7a, 0x99, 0x08, 0x01, 0xf0, 0x81,
-0x90, 0x78, 0xd4, 0xc2, 0x00, 0xa4, 0x20, 0x48, 0x34, 0x01, 0xa4, 0x1f,
-0xc8, 0x33, 0xf1, 0xd4, 0xc2, 0x00, 0xa4, 0x1f, 0xd8, 0x34, 0x03, 0xa4,
-0x1f, 0x58, 0x33, 0xf3, 0x81, 0x90, 0x78, 0xd4, 0xc2, 0x00, 0xa4, 0x1f,
-0xf8, 0x34, 0x07, 0xa4, 0x1f, 0x78, 0x33, 0xf7, 0xd4, 0xc2, 0x00, 0xa4,
-0x1f, 0xe8, 0x34, 0x05, 0xa4, 0x1f, 0x68, 0x33, 0xf5, 0xa8, 0x0b, 0x18,
-0x13, 0xa8, 0x96, 0x80, 0x93, 0x40, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0,
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0xb8, 0x32, 0x58, 0x24, 0x12, 0xb0,
-0x90, 0x38, 0xa4, 0x11, 0xe0, 0x32, 0x3d, 0x24, 0x11, 0xd8, 0x90, 0x60,
-0x90, 0x38, 0xa4, 0x11, 0x08, 0x32, 0x22, 0x24, 0x11, 0x00, 0x90, 0x38,
-0xa4, 0x10, 0x30, 0x32, 0x07, 0x24, 0x10, 0x28, 0x90, 0xc0, 0x90, 0x60,
-0x90, 0x38, 0xa4, 0x12, 0xa8, 0x32, 0x53, 0x24, 0x12, 0xa0, 0x90, 0x38,
-0xa4, 0x11, 0xd0, 0x32, 0x38, 0x24, 0x11, 0xc8, 0x90, 0x60, 0x90, 0x38,
-0xa4, 0x10, 0xf8, 0x32, 0x1d, 0x24, 0x10, 0xf0, 0x90, 0x38, 0xa4, 0x10,
-0x20, 0x32, 0x02, 0x24, 0x10, 0x18, 0xe4, 0xe1, 0x96, 0xc0, 0x36, 0x5d,
-0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12,
-0x90, 0x32, 0x50, 0x24, 0x12, 0x88, 0x90, 0x38, 0xa4, 0x11, 0xb8, 0x32,
-0x35, 0x24, 0x11, 0xb0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xe0, 0x32,
-0x1a, 0x24, 0x10, 0xd8, 0x90, 0x38, 0xa4, 0x10, 0x08, 0x31, 0xff, 0x24,
-0x10, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x78, 0x32,
-0x4d, 0x24, 0x12, 0x70, 0x90, 0x38, 0xa4, 0x11, 0xa0, 0x32, 0x32, 0x24,
-0x11, 0x98, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xc8, 0x32, 0x17, 0x24,
-0x10, 0xc0, 0x90, 0x38, 0xa4, 0x0f, 0xf0, 0x31, 0xfc, 0x24, 0x0f, 0xe8,
-0xe4, 0xe1, 0x95, 0x40, 0x36, 0x57, 0x93, 0x78, 0x99, 0x90, 0x03, 0x00,
-0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x60, 0x32, 0x4a, 0x24,
-0x12, 0x58, 0x90, 0x38, 0xa4, 0x11, 0x88, 0x32, 0x2f, 0x24, 0x11, 0x80,
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xb0, 0x32, 0x14, 0x24, 0x10, 0xa8,
-0x90, 0x38, 0xa4, 0x0f, 0xd8, 0x31, 0xf9, 0x24, 0x0f, 0xd0, 0x90, 0xc0,
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x48, 0x32, 0x47, 0x24, 0x12, 0x40,
-0x90, 0x38, 0xa4, 0x11, 0x70, 0x32, 0x2c, 0x24, 0x11, 0x68, 0x90, 0x60,
-0x90, 0x38, 0xa4, 0x10, 0x98, 0x32, 0x11, 0x24, 0x10, 0x90, 0x90, 0x38,
-0xa4, 0x0f, 0xc0, 0x31, 0xf6, 0x24, 0x0f, 0xb8, 0xec, 0xa1, 0x03, 0xc0,
-0x02, 0x00, 0x34, 0x11, 0xa4, 0x32, 0x78, 0x36, 0x51, 0x88, 0x00, 0x88,
-0x10, 0x10, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x0f, 0xa8, 0x31, 0xf3, 0x24,
-0x0f, 0xa0, 0xe9, 0x61, 0x03, 0x00, 0x02, 0x00, 0x34, 0x0d, 0xe3, 0x61,
-0x92, 0x40, 0x36, 0x4b, 0x95, 0x08, 0x93, 0x40, 0x99, 0x90, 0x03, 0x00,
-0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x30, 0x32, 0x41, 0x24,
-0x12, 0x28, 0x90, 0x38, 0xa4, 0x11, 0x58, 0x32, 0x26, 0x24, 0x11, 0x50,
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x80, 0x32, 0x0b, 0x24, 0x10, 0x78,
-0x90, 0x38, 0xa4, 0x0f, 0x90, 0x31, 0xed, 0x24, 0x0f, 0x88, 0x90, 0xc0,
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x00, 0x32, 0x3e, 0x24, 0x11, 0xf8,
-0x90, 0x38, 0xa4, 0x11, 0x28, 0x32, 0x23, 0x24, 0x11, 0x20, 0x90, 0x60,
-0x90, 0x38, 0xa4, 0x10, 0x50, 0x32, 0x08, 0x24, 0x10, 0x48, 0x90, 0x38,
-0xa4, 0x0f, 0x60, 0x31, 0xea, 0x24, 0x0f, 0x58, 0xe4, 0xe1, 0x97, 0x00,
-0x36, 0x5f, 0x88, 0x01, 0x88, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4,
-0x12, 0x20, 0x32, 0x42, 0x24, 0x12, 0x18, 0x90, 0x38, 0xa4, 0x11, 0x48,
-0x32, 0x27, 0x24, 0x11, 0x40, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x70,
-0x32, 0x0c, 0x24, 0x10, 0x68, 0x90, 0x38, 0xa4, 0x0f, 0x80, 0x31, 0xee,
-0x24, 0x0f, 0x78, 0xe4, 0xe1, 0x95, 0x80, 0x36, 0x59, 0x92, 0xd0, 0x99,
-0x50, 0x02, 0x80, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xe9,
-0x24, 0x0f, 0x40, 0x90, 0x28, 0x80, 0x31, 0xe5, 0x24, 0x0f, 0x20, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x31, 0xe1, 0x24, 0x0f, 0x00, 0x90, 0x28, 0x80,
-0x31, 0xdd, 0x24, 0x0e, 0xe0, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80,
-0x31, 0xe6, 0x24, 0x0f, 0x38, 0x90, 0x28, 0x80, 0x31, 0xe2, 0x24, 0x0f,
-0x18, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xde, 0x24, 0x0e, 0xf8, 0x90,
-0x28, 0x80, 0x31, 0xda, 0x24, 0x0e, 0xd8, 0xec, 0xe1, 0x94, 0x21, 0x04,
-0xc0, 0x36, 0x53, 0x88, 0x00, 0x78, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28,
-0x80, 0x31, 0xd8, 0x24, 0x0e, 0xc8, 0xec, 0xe1, 0x92, 0xa1, 0x02, 0xc0,
-0x36, 0x4d, 0xe5, 0xa1, 0x3a, 0x40, 0x34, 0xe7, 0xa0, 0x2a, 0x10, 0xa8,
-0x16, 0x60, 0x29, 0xd8, 0xa0, 0x0c, 0x48, 0xa0, 0x0a, 0xc8, 0x95, 0x60,
+0x80, 0x33, 0x2b, 0x80, 0x33, 0x2d, 0x10, 0x10, 0x80, 0x33, 0x2c, 0x90,
+0x50, 0x90, 0x28, 0x80, 0x33, 0x10, 0x80, 0x33, 0x12, 0x10, 0x10, 0x80,
+0x33, 0x11, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xf5, 0x80,
+0x32, 0xf7, 0x10, 0x10, 0x80, 0x32, 0xf6, 0x90, 0x50, 0x90, 0x28, 0x80,
+0x32, 0xda, 0x80, 0x32, 0xdc, 0x10, 0x10, 0x80, 0x32, 0xdb, 0x91, 0x10,
+0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x28, 0x80, 0x33, 0x2a,
+0x10, 0x10, 0x80, 0x33, 0x29, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x0d,
+0x80, 0x33, 0x0f, 0x10, 0x10, 0x80, 0x33, 0x0e, 0x90, 0x88, 0x90, 0x50,
+0x90, 0x28, 0x80, 0x32, 0xf2, 0x80, 0x32, 0xf4, 0x10, 0x10, 0x80, 0x32,
+0xf3, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xd7, 0x80, 0x32, 0xd9, 0x10,
+0x10, 0x80, 0x32, 0xd8, 0xe4, 0xe1, 0x78, 0x40, 0x36, 0x09, 0x88, 0x00,
+0xb0, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xd4,
+0x80, 0x32, 0xd6, 0x10, 0x10, 0x80, 0x32, 0xd5, 0xe4, 0xe1, 0x58, 0x40,
+0x35, 0x75, 0x96, 0xe8, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10,
+0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x22, 0x80, 0x33, 0x27,
+0x10, 0x10, 0x80, 0x33, 0x26, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x07,
+0x80, 0x33, 0x0c, 0x10, 0x10, 0x80, 0x33, 0x0b, 0x90, 0x88, 0x90, 0x50,
+0x90, 0x28, 0x80, 0x32, 0xec, 0x80, 0x32, 0xf1, 0x10, 0x10, 0x80, 0x32,
+0xf0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xce, 0x80, 0x32, 0xd3, 0x10,
+0x10, 0x80, 0x32, 0xd2, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28,
+0x80, 0x33, 0x1f, 0x80, 0x33, 0x21, 0x10, 0x10, 0x80, 0x33, 0x20, 0x90,
+0x50, 0x90, 0x28, 0x80, 0x33, 0x04, 0x80, 0x33, 0x06, 0x10, 0x10, 0x80,
+0x33, 0x05, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe9, 0x80,
+0x32, 0xeb, 0x10, 0x10, 0x80, 0x32, 0xea, 0x90, 0x50, 0x90, 0x28, 0x80,
+0x32, 0xcb, 0x80, 0x32, 0xcd, 0x10, 0x10, 0x80, 0x32, 0xcc, 0xe4, 0xe1,
+0x76, 0x40, 0x36, 0x01, 0x88, 0x02, 0x28, 0x91, 0x10, 0x90, 0x88, 0x90,
+0x50, 0x90, 0x28, 0x80, 0x33, 0x23, 0x80, 0x33, 0x25, 0x10, 0x10, 0x80,
+0x33, 0x24, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x08, 0x80, 0x33, 0x0a,
+0x10, 0x10, 0x80, 0x33, 0x09, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80,
+0x32, 0xed, 0x80, 0x32, 0xef, 0x10, 0x10, 0x80, 0x32, 0xee, 0x90, 0x50,
+0x90, 0x28, 0x80, 0x32, 0xcf, 0x80, 0x32, 0xd1, 0x10, 0x10, 0x80, 0x32,
+0xd0, 0xe4, 0xe1, 0x57, 0x40, 0x35, 0x71, 0x90, 0x40, 0xe5, 0x21, 0x74,
+0x40, 0x35, 0xf9, 0xe5, 0x21, 0x56, 0x40, 0x35, 0x6d, 0x9e, 0xb4, 0x23,
+0xe8, 0x93, 0x70, 0x91, 0xd8, 0xd5, 0x07, 0x80, 0xd0, 0xc4, 0x40, 0x90,
+0x48, 0x80, 0x8c, 0x3f, 0x38, 0x84, 0x37, 0xf1, 0xa4, 0x3d, 0x18, 0x37,
+0xbb, 0x90, 0x28, 0x24, 0x3c, 0x58, 0xa4, 0x3a, 0xd8, 0x37, 0x73, 0xd0,
+0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x3f, 0x18, 0x84, 0x37, 0xef, 0xa4,
+0x3d, 0x08, 0x37, 0xb9, 0x90, 0x28, 0x24, 0x3c, 0x48, 0xa4, 0x3a, 0xc8,
+0x37, 0x71, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x37,
+0xdb, 0xa4, 0x3c, 0xe8, 0x37, 0xb5, 0x90, 0x28, 0x24, 0x3c, 0x28, 0xa4,
+0x3a, 0xa8, 0x37, 0x6d, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x37, 0xd7,
+0xa4, 0x3c, 0xd8, 0x37, 0xb3, 0x90, 0x28, 0x24, 0x3c, 0x18, 0xa4, 0x3a,
+0x98, 0x37, 0x6b, 0x91, 0x98, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90,
+0x28, 0x80, 0x37, 0xcf, 0xa4, 0x3c, 0xb8, 0x37, 0xaf, 0x90, 0x28, 0x24,
+0x3b, 0xf8, 0xa4, 0x3a, 0x78, 0x37, 0x67, 0xd0, 0xc3, 0x40, 0x90, 0x28,
+0x80, 0x37, 0xcb, 0xa4, 0x3c, 0xa8, 0x37, 0xad, 0x90, 0x28, 0x24, 0x3b,
+0xe8, 0xa4, 0x3a, 0x68, 0x37, 0x65, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40,
+0x90, 0x28, 0x80, 0x37, 0xc3, 0xa4, 0x3c, 0x88, 0x37, 0xa9, 0x90, 0x28,
+0x24, 0x3b, 0xc8, 0xa4, 0x3a, 0x48, 0x37, 0x61, 0xd0, 0xc3, 0x40, 0x90,
+0x28, 0x80, 0x37, 0xbf, 0xa4, 0x3c, 0x78, 0x37, 0xa7, 0x90, 0x28, 0x24,
+0x3b, 0xb8, 0xa4, 0x3a, 0x38, 0x37, 0x5f, 0x93, 0x70, 0x91, 0xd8, 0xd5,
+0x07, 0x80, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x3f, 0x58, 0x84,
+0x37, 0xf3, 0xa4, 0x3d, 0x28, 0x37, 0xbd, 0x90, 0x28, 0x24, 0x3c, 0x68,
+0xa4, 0x3a, 0xe8, 0x37, 0x75, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c,
+0x3f, 0x28, 0x84, 0x37, 0xf0, 0xa4, 0x3d, 0x10, 0x37, 0xba, 0x90, 0x28,
+0x24, 0x3c, 0x50, 0xa4, 0x3a, 0xd0, 0x37, 0x72, 0xd5, 0x06, 0x80, 0xd0,
+0xc3, 0x40, 0x90, 0x28, 0x80, 0x37, 0xdf, 0xa4, 0x3c, 0xf8, 0x37, 0xb7,
+0x90, 0x28, 0x24, 0x3c, 0x38, 0xa4, 0x3a, 0xb8, 0x37, 0x6f, 0xd0, 0xc3,
+0x40, 0x90, 0x28, 0x80, 0x37, 0xd9, 0xa4, 0x3c, 0xe0, 0x37, 0xb4, 0x90,
+0x28, 0x24, 0x3c, 0x20, 0xa4, 0x3a, 0xa0, 0x37, 0x6c, 0x91, 0x98, 0xd5,
+0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x37, 0xd3, 0xa4, 0x3c,
+0xc8, 0x37, 0xb1, 0x90, 0x28, 0x24, 0x3c, 0x08, 0xa4, 0x3a, 0x88, 0x37,
+0x69, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x37, 0xcd, 0xa4, 0x3c, 0xb0,
+0x37, 0xae, 0x90, 0x28, 0x24, 0x3b, 0xf0, 0xa4, 0x3a, 0x70, 0x37, 0x66,
+0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x37, 0xc7, 0xa4,
+0x3c, 0x98, 0x37, 0xab, 0x90, 0x28, 0x24, 0x3b, 0xd8, 0xa4, 0x3a, 0x58,
+0x37, 0x63, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x37, 0xc1, 0xa4, 0x3c,
+0x80, 0x37, 0xa8, 0x90, 0x28, 0x24, 0x3b, 0xc0, 0xa4, 0x3a, 0x40, 0x37,
+0x60, 0x99, 0xd8, 0x03, 0x90, 0x81, 0x90, 0xe0, 0x5b, 0x41, 0x40, 0x03,
+0x40, 0x51, 0x40, 0xc0, 0xa4, 0x23, 0x80, 0x34, 0x60, 0xd1, 0x42, 0x00,
+0xa4, 0x22, 0x80, 0x34, 0x40, 0xa4, 0x21, 0x80, 0x34, 0x20, 0x5b, 0x41,
+0x40, 0x03, 0x40, 0x51, 0x40, 0xc0, 0xa4, 0x22, 0xa0, 0x34, 0x64, 0xd1,
+0x42, 0x00, 0xa4, 0x21, 0xa0, 0x34, 0x44, 0xa4, 0x20, 0xa0, 0x34, 0x24,
+0x81, 0x90, 0xe0, 0x5b, 0x41, 0x40, 0x03, 0x40, 0x51, 0x40, 0xc0, 0xa4,
+0x22, 0xe0, 0x34, 0x6c, 0xd1, 0x42, 0x00, 0xa4, 0x21, 0xe0, 0x34, 0x4c,
+0xa4, 0x20, 0xe0, 0x34, 0x2c, 0x5b, 0x41, 0x40, 0x03, 0x40, 0x51, 0x40,
+0xc0, 0xa4, 0x22, 0xc0, 0x34, 0x68, 0xd1, 0x42, 0x00, 0xa4, 0x21, 0xc0,
+0x34, 0x48, 0xa4, 0x20, 0xc0, 0x34, 0x28, 0xa8, 0x0b, 0x18, 0x13, 0xa8,
+0x96, 0x80, 0x93, 0x40, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60,
+0x90, 0x38, 0xa4, 0x12, 0xb8, 0x32, 0x58, 0x24, 0x12, 0xb0, 0x90, 0x38,
+0xa4, 0x11, 0xe0, 0x32, 0x3d, 0x24, 0x11, 0xd8, 0x90, 0x60, 0x90, 0x38,
+0xa4, 0x11, 0x08, 0x32, 0x22, 0x24, 0x11, 0x00, 0x90, 0x38, 0xa4, 0x10,
+0x30, 0x32, 0x07, 0x24, 0x10, 0x28, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38,
+0xa4, 0x12, 0xa8, 0x32, 0x53, 0x24, 0x12, 0xa0, 0x90, 0x38, 0xa4, 0x11,
+0xd0, 0x32, 0x38, 0x24, 0x11, 0xc8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10,
+0xf8, 0x32, 0x1d, 0x24, 0x10, 0xf0, 0x90, 0x38, 0xa4, 0x10, 0x20, 0x32,
+0x02, 0x24, 0x10, 0x18, 0xe4, 0xe1, 0xd0, 0x40, 0x37, 0x43, 0x99, 0x90,
+0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x90, 0x32,
+0x50, 0x24, 0x12, 0x88, 0x90, 0x38, 0xa4, 0x11, 0xb8, 0x32, 0x35, 0x24,
+0x11, 0xb0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xe0, 0x32, 0x1a, 0x24,
+0x10, 0xd8, 0x90, 0x38, 0xa4, 0x10, 0x08, 0x31, 0xff, 0x24, 0x10, 0x00,
+0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x78, 0x32, 0x4d, 0x24,
+0x12, 0x70, 0x90, 0x38, 0xa4, 0x11, 0xa0, 0x32, 0x32, 0x24, 0x11, 0x98,
+0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xc8, 0x32, 0x17, 0x24, 0x10, 0xc0,
+0x90, 0x38, 0xa4, 0x0f, 0xf0, 0x31, 0xfc, 0x24, 0x0f, 0xe8, 0xe4, 0xe1,
+0xce, 0xc0, 0x37, 0x3d, 0x93, 0x78, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0,
+0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x60, 0x32, 0x4a, 0x24, 0x12, 0x58,
+0x90, 0x38, 0xa4, 0x11, 0x88, 0x32, 0x2f, 0x24, 0x11, 0x80, 0x90, 0x60,
+0x90, 0x38, 0xa4, 0x10, 0xb0, 0x32, 0x14, 0x24, 0x10, 0xa8, 0x90, 0x38,
+0xa4, 0x0f, 0xd8, 0x31, 0xf9, 0x24, 0x0f, 0xd0, 0x90, 0xc0, 0x90, 0x60,
+0x90, 0x38, 0xa4, 0x12, 0x48, 0x32, 0x47, 0x24, 0x12, 0x40, 0x90, 0x38,
+0xa4, 0x11, 0x70, 0x32, 0x2c, 0x24, 0x11, 0x68, 0x90, 0x60, 0x90, 0x38,
+0xa4, 0x10, 0x98, 0x32, 0x11, 0x24, 0x10, 0x90, 0x90, 0x38, 0xa4, 0x0f,
+0xc0, 0x31, 0xf6, 0x24, 0x0f, 0xb8, 0xec, 0xa1, 0x1e, 0x00, 0x02, 0x00,
+0x34, 0x7a, 0xa4, 0x39, 0xa8, 0x37, 0x37, 0x88, 0x00, 0x88, 0x10, 0x10,
+0x10, 0x10, 0x90, 0x38, 0xa4, 0x0f, 0xa8, 0x31, 0xf3, 0x24, 0x0f, 0xa0,
+0xe9, 0x61, 0x1d, 0x40, 0x02, 0x00, 0x34, 0x76, 0xe3, 0x61, 0xcb, 0xc0,
+0x37, 0x31, 0x95, 0x08, 0x93, 0x40, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0,
+0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x30, 0x32, 0x41, 0x24, 0x12, 0x28,
+0x90, 0x38, 0xa4, 0x11, 0x58, 0x32, 0x26, 0x24, 0x11, 0x50, 0x90, 0x60,
+0x90, 0x38, 0xa4, 0x10, 0x80, 0x32, 0x0b, 0x24, 0x10, 0x78, 0x90, 0x38,
+0xa4, 0x0f, 0x90, 0x31, 0xed, 0x24, 0x0f, 0x88, 0x90, 0xc0, 0x90, 0x60,
+0x90, 0x38, 0xa4, 0x12, 0x00, 0x32, 0x3e, 0x24, 0x11, 0xf8, 0x90, 0x38,
+0xa4, 0x11, 0x28, 0x32, 0x23, 0x24, 0x11, 0x20, 0x90, 0x60, 0x90, 0x38,
+0xa4, 0x10, 0x50, 0x32, 0x08, 0x24, 0x10, 0x48, 0x90, 0x38, 0xa4, 0x0f,
+0x60, 0x31, 0xea, 0x24, 0x0f, 0x58, 0xe4, 0xe1, 0xd0, 0x80, 0x37, 0x45,
+0x88, 0x01, 0x88, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x20,
+0x32, 0x42, 0x24, 0x12, 0x18, 0x90, 0x38, 0xa4, 0x11, 0x48, 0x32, 0x27,
+0x24, 0x11, 0x40, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x70, 0x32, 0x0c,
+0x24, 0x10, 0x68, 0x90, 0x38, 0xa4, 0x0f, 0x80, 0x31, 0xee, 0x24, 0x0f,
+0x78, 0xe4, 0xe1, 0xcf, 0x00, 0x37, 0x3f, 0x92, 0xd0, 0x99, 0x50, 0x02,
+0x80, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xe9, 0x24, 0x0f,
+0x40, 0x90, 0x28, 0x80, 0x31, 0xe5, 0x24, 0x0f, 0x20, 0x90, 0x50, 0x90,
+0x28, 0x80, 0x31, 0xe1, 0x24, 0x0f, 0x00, 0x90, 0x28, 0x80, 0x31, 0xdd,
+0x24, 0x0e, 0xe0, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xe6,
+0x24, 0x0f, 0x38, 0x90, 0x28, 0x80, 0x31, 0xe2, 0x24, 0x0f, 0x18, 0x90,
+0x50, 0x90, 0x28, 0x80, 0x31, 0xde, 0x24, 0x0e, 0xf8, 0x90, 0x28, 0x80,
+0x31, 0xda, 0x24, 0x0e, 0xd8, 0xec, 0xe1, 0xcd, 0xa1, 0x1f, 0x00, 0x37,
+0x39, 0x88, 0x00, 0x78, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, 0x80, 0x31,
+0xd8, 0x24, 0x0e, 0xc8, 0xec, 0xe1, 0xcc, 0x21, 0x1d, 0x00, 0x37, 0x33,
+0xe5, 0xa1, 0x55, 0x40, 0x35, 0x51, 0xa0, 0x2a, 0x10, 0xa8, 0x16, 0x60,
+0x29, 0xd8, 0xa0, 0x0c, 0x48, 0xa0, 0x0a, 0xc8, 0x95, 0x60, 0x92, 0xb0,
+0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xa1, 0x80,
+0x31, 0xa0, 0x10, 0x10, 0x80, 0x31, 0x9f, 0x90, 0x70, 0x90, 0x38, 0xa4,
+0x08, 0x98, 0x31, 0xb3, 0xa4, 0x08, 0x90, 0x31, 0xb2, 0x10, 0x10, 0xa4,
+0x08, 0x88, 0x31, 0xb1, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09,
+0xb8, 0x31, 0xd7, 0xa4, 0x09, 0xb0, 0x31, 0xd6, 0x10, 0x10, 0xa4, 0x09,
+0xa8, 0x31, 0xd5, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x28, 0x31, 0xc5,
+0xa4, 0x09, 0x20, 0x31, 0xc4, 0x10, 0x10, 0xa4, 0x09, 0x18, 0x31, 0xc3,
+0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x9c, 0x80,
+0x31, 0x9e, 0x10, 0x10, 0x80, 0x31, 0x9d, 0x90, 0x70, 0x90, 0x38, 0xa4,
+0x08, 0x70, 0x31, 0xae, 0xa4, 0x08, 0x80, 0x31, 0xb0, 0x10, 0x10, 0xa4,
+0x08, 0x78, 0x31, 0xaf, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09,
+0x90, 0x31, 0xd2, 0xa4, 0x09, 0xa0, 0x31, 0xd4, 0x10, 0x10, 0xa4, 0x09,
+0x98, 0x31, 0xd3, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x00, 0x31, 0xc0,
+0xa4, 0x09, 0x10, 0x31, 0xc2, 0x10, 0x10, 0xa4, 0x09, 0x08, 0x31, 0xc1,
0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31,
-0xa1, 0x80, 0x31, 0xa0, 0x10, 0x10, 0x80, 0x31, 0x9f, 0x90, 0x70, 0x90,
-0x38, 0xa4, 0x08, 0x98, 0x31, 0xb3, 0xa4, 0x08, 0x90, 0x31, 0xb2, 0x10,
-0x10, 0xa4, 0x08, 0x88, 0x31, 0xb1, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38,
-0xa4, 0x09, 0xb8, 0x31, 0xd7, 0xa4, 0x09, 0xb0, 0x31, 0xd6, 0x10, 0x10,
-0xa4, 0x09, 0xa8, 0x31, 0xd5, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x28,
-0x31, 0xc5, 0xa4, 0x09, 0x20, 0x31, 0xc4, 0x10, 0x10, 0xa4, 0x09, 0x18,
-0x31, 0xc3, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31,
-0x9c, 0x80, 0x31, 0x9e, 0x10, 0x10, 0x80, 0x31, 0x9d, 0x90, 0x70, 0x90,
-0x38, 0xa4, 0x08, 0x70, 0x31, 0xae, 0xa4, 0x08, 0x80, 0x31, 0xb0, 0x10,
-0x10, 0xa4, 0x08, 0x78, 0x31, 0xaf, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38,
-0xa4, 0x09, 0x90, 0x31, 0xd2, 0xa4, 0x09, 0xa0, 0x31, 0xd4, 0x10, 0x10,
-0xa4, 0x09, 0x98, 0x31, 0xd3, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x00,
-0x31, 0xc0, 0xa4, 0x09, 0x10, 0x31, 0xc2, 0x10, 0x10, 0xa4, 0x09, 0x08,
-0x31, 0xc1, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28,
-0x80, 0x31, 0x99, 0x80, 0x31, 0x9b, 0x10, 0x10, 0x80, 0x31, 0x9a, 0x90,
-0x70, 0x90, 0x38, 0xa4, 0x08, 0x58, 0x31, 0xab, 0xa4, 0x08, 0x68, 0x31,
-0xad, 0x10, 0x10, 0xa4, 0x08, 0x60, 0x31, 0xac, 0x90, 0xb8, 0x90, 0x70,
-0x90, 0x38, 0xa4, 0x09, 0x78, 0x31, 0xcf, 0xa4, 0x09, 0x88, 0x31, 0xd1,
-0x10, 0x10, 0xa4, 0x09, 0x80, 0x31, 0xd0, 0x90, 0x70, 0x90, 0x38, 0xa4,
-0x08, 0xe8, 0x31, 0xbd, 0xa4, 0x08, 0xf8, 0x31, 0xbf, 0x10, 0x10, 0xa4,
-0x08, 0xf0, 0x31, 0xbe, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28,
-0x80, 0x31, 0x96, 0x80, 0x31, 0x98, 0x10, 0x10, 0x80, 0x31, 0x97, 0x90,
-0x70, 0x90, 0x38, 0xa4, 0x08, 0x40, 0x31, 0xa8, 0xa4, 0x08, 0x50, 0x31,
-0xaa, 0x10, 0x10, 0xa4, 0x08, 0x48, 0x31, 0xa9, 0x90, 0xb8, 0x90, 0x70,
-0x90, 0x38, 0xa4, 0x09, 0x60, 0x31, 0xcc, 0xa4, 0x09, 0x70, 0x31, 0xce,
-0x10, 0x10, 0xa4, 0x09, 0x68, 0x31, 0xcd, 0x90, 0x70, 0x90, 0x38, 0xa4,
-0x08, 0xd0, 0x31, 0xba, 0xa4, 0x08, 0xe0, 0x31, 0xbc, 0x10, 0x10, 0xa4,
-0x08, 0xd8, 0x31, 0xbb, 0x10, 0x10, 0x90, 0xa8, 0x10, 0x10, 0x10, 0x10,
-0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x8d, 0x80, 0x31, 0x8f, 0x10, 0x10,
-0x80, 0x31, 0x8e, 0x90, 0x60, 0x90, 0x30, 0x60, 0xa0, 0x2a, 0xc0, 0x60,
-0xa0, 0x2a, 0x80, 0x90, 0x30, 0x60, 0xa0, 0x2a, 0x40, 0x60, 0xa0, 0x2a,
-0x00, 0x97, 0xf0, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x31, 0x93, 0x80, 0x31, 0x95, 0x10, 0x10, 0x80,
-0x31, 0x94, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x28, 0x31, 0xa5, 0xa4,
-0x08, 0x38, 0x31, 0xa7, 0x10, 0x10, 0xa4, 0x08, 0x30, 0x31, 0xa6, 0x90,
-0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x48, 0x31, 0xc9, 0xa4, 0x09,
-0x58, 0x31, 0xcb, 0x10, 0x10, 0xa4, 0x09, 0x50, 0x31, 0xca, 0x90, 0x70,
-0x90, 0x38, 0xa4, 0x08, 0xb8, 0x31, 0xb7, 0xa4, 0x08, 0xc8, 0x31, 0xb9,
-0x10, 0x10, 0xa4, 0x08, 0xc0, 0x31, 0xb8, 0x91, 0x40, 0x90, 0x88, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x31, 0x90, 0x80, 0x31, 0x92, 0x10, 0x10, 0x80,
-0x31, 0x91, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x10, 0x31, 0xa2, 0xa4,
-0x08, 0x20, 0x31, 0xa4, 0x10, 0x10, 0xa4, 0x08, 0x18, 0x31, 0xa3, 0x90,
-0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x30, 0x31, 0xc6, 0xa4, 0x09,
-0x40, 0x31, 0xc8, 0x10, 0x10, 0xa4, 0x09, 0x38, 0x31, 0xc7, 0x90, 0x70,
-0x90, 0x38, 0xa4, 0x08, 0xa0, 0x31, 0xb4, 0xa4, 0x08, 0xb0, 0x31, 0xb6,
-0x10, 0x10, 0xa4, 0x08, 0xa8, 0x31, 0xb5, 0x10, 0x10, 0x91, 0x40, 0x90,
-0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xcb, 0x80, 0x30, 0xca, 0x90,
-0x28, 0x80, 0x30, 0xc9, 0x80, 0x30, 0xc8, 0x90, 0x50, 0x90, 0x28, 0x80,
-0x30, 0xc4, 0x80, 0x30, 0xc7, 0x90, 0x28, 0x80, 0x30, 0xc6, 0x80, 0x30,
-0xc5, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbc, 0x80, 0x30,
-0xc3, 0x90, 0x28, 0x80, 0x30, 0xc2, 0x80, 0x30, 0xc1, 0x90, 0x50, 0x90,
-0x28, 0x80, 0x30, 0xbd, 0x80, 0x30, 0xc0, 0x90, 0x28, 0x80, 0x30, 0xbf,
-0x80, 0x30, 0xbe, 0x91, 0x88, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28,
-0x81, 0x31, 0x3b, 0x10, 0x10, 0x80, 0x31, 0x3a, 0x90, 0x28, 0x81, 0x31,
-0x3d, 0x10, 0x10, 0x80, 0x31, 0x3c, 0x90, 0x60, 0x90, 0x28, 0x81, 0x31,
-0x41, 0x10, 0x10, 0x80, 0x31, 0x40, 0x90, 0x28, 0x81, 0x31, 0x3f, 0x10,
-0x10, 0x80, 0x31, 0x3e, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, 0x81,
-0x31, 0x38, 0x10, 0x10, 0x80, 0x31, 0x39, 0xa0, 0x0b, 0x90, 0xa0, 0x0a,
-0xc8, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90,
-0x28, 0x80, 0x31, 0x56, 0x80, 0x31, 0x55, 0x10, 0x10, 0x80, 0x31, 0x54,
-0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xe8, 0x31, 0x68, 0xa4, 0x06, 0xe0,
-0x31, 0x67, 0x10, 0x10, 0xa4, 0x06, 0xd8, 0x31, 0x66, 0x90, 0xb8, 0x90,
-0x70, 0x90, 0x38, 0xa4, 0x08, 0x08, 0x31, 0x8c, 0xa4, 0x08, 0x00, 0x31,
-0x8b, 0x10, 0x10, 0xa4, 0x07, 0xf8, 0x31, 0x8a, 0x90, 0x70, 0x90, 0x38,
-0xa4, 0x07, 0x78, 0x31, 0x7a, 0xa4, 0x07, 0x70, 0x31, 0x79, 0x10, 0x10,
-0xa4, 0x07, 0x68, 0x31, 0x78, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90,
-0x28, 0x80, 0x31, 0x51, 0x80, 0x31, 0x53, 0x10, 0x10, 0x80, 0x31, 0x52,
-0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xc0, 0x31, 0x63, 0xa4, 0x06, 0xd0,
-0x31, 0x65, 0x10, 0x10, 0xa4, 0x06, 0xc8, 0x31, 0x64, 0x90, 0xb8, 0x90,
-0x70, 0x90, 0x38, 0xa4, 0x07, 0xe0, 0x31, 0x87, 0xa4, 0x07, 0xf0, 0x31,
-0x89, 0x10, 0x10, 0xa4, 0x07, 0xe8, 0x31, 0x88, 0x90, 0x70, 0x90, 0x38,
-0xa4, 0x07, 0x50, 0x31, 0x75, 0xa4, 0x07, 0x60, 0x31, 0x77, 0x10, 0x10,
-0xa4, 0x07, 0x58, 0x31, 0x76, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x31, 0x4e, 0x80, 0x31, 0x50, 0x10, 0x10, 0x80,
-0x31, 0x4f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xa8, 0x31, 0x60, 0xa4,
-0x06, 0xb8, 0x31, 0x62, 0x10, 0x10, 0xa4, 0x06, 0xb0, 0x31, 0x61, 0x90,
-0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xc8, 0x31, 0x84, 0xa4, 0x07,
-0xd8, 0x31, 0x86, 0x10, 0x10, 0xa4, 0x07, 0xd0, 0x31, 0x85, 0x90, 0x70,
-0x90, 0x38, 0xa4, 0x07, 0x38, 0x31, 0x72, 0xa4, 0x07, 0x48, 0x31, 0x74,
-0x10, 0x10, 0xa4, 0x07, 0x40, 0x31, 0x73, 0x91, 0x40, 0x90, 0x88, 0x90,
-0x50, 0x90, 0x28, 0x80, 0x31, 0x4b, 0x80, 0x31, 0x4d, 0x10, 0x10, 0x80,
-0x31, 0x4c, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0x90, 0x31, 0x5d, 0xa4,
-0x06, 0xa0, 0x31, 0x5f, 0x10, 0x10, 0xa4, 0x06, 0x98, 0x31, 0x5e, 0x90,
-0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xb0, 0x31, 0x81, 0xa4, 0x07,
-0xc0, 0x31, 0x83, 0x10, 0x10, 0xa4, 0x07, 0xb8, 0x31, 0x82, 0x90, 0x70,
-0x90, 0x38, 0xa4, 0x07, 0x20, 0x31, 0x6f, 0xa4, 0x07, 0x30, 0x31, 0x71,
-0x10, 0x10, 0xa4, 0x07, 0x28, 0x31, 0x70, 0x10, 0x10, 0x80, 0x10, 0x10,
-0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x42, 0x80, 0x31, 0x44,
-0x10, 0x10, 0x80, 0x31, 0x43, 0x80, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40,
-0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x48, 0x80, 0x31, 0x4a,
-0x10, 0x10, 0x80, 0x31, 0x49, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0x78,
-0x31, 0x5a, 0xa4, 0x06, 0x88, 0x31, 0x5c, 0x10, 0x10, 0xa4, 0x06, 0x80,
-0x31, 0x5b, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x98, 0x31,
-0x7e, 0xa4, 0x07, 0xa8, 0x31, 0x80, 0x10, 0x10, 0xa4, 0x07, 0xa0, 0x31,
-0x7f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x08, 0x31, 0x6c, 0xa4, 0x07,
-0x18, 0x31, 0x6e, 0x10, 0x10, 0xa4, 0x07, 0x10, 0x31, 0x6d, 0x91, 0x40,
-0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x45, 0x80, 0x31, 0x47,
-0x10, 0x10, 0x80, 0x31, 0x46, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0x60,
-0x31, 0x57, 0xa4, 0x06, 0x70, 0x31, 0x59, 0x10, 0x10, 0xa4, 0x06, 0x68,
-0x31, 0x58, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x80, 0x31,
-0x7b, 0xa4, 0x07, 0x90, 0x31, 0x7d, 0x10, 0x10, 0xa4, 0x07, 0x88, 0x31,
-0x7c, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xf0, 0x31, 0x69, 0xa4, 0x07,
-0x00, 0x31, 0x6b, 0x10, 0x10, 0xa4, 0x06, 0xf8, 0x31, 0x6a, 0x10, 0x10,
-0x91, 0x40, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbb, 0x80,
-0x30, 0xba, 0x90, 0x28, 0x80, 0x30, 0xb9, 0x80, 0x30, 0xb8, 0x90, 0x50,
-0x90, 0x28, 0x80, 0x30, 0xb4, 0x80, 0x30, 0xb7, 0x90, 0x28, 0x80, 0x30,
-0xb6, 0x80, 0x30, 0xb5, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30,
-0xac, 0x80, 0x30, 0xb3, 0x90, 0x28, 0x80, 0x30, 0xb2, 0x80, 0x30, 0xb1,
-0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xad, 0x80, 0x30, 0xb0, 0x90, 0x28,
-0x80, 0x30, 0xaf, 0x80, 0x30, 0xae, 0xc3, 0xc0, 0x30, 0x42, 0x9c, 0xe8,
-0x07, 0x60, 0x91, 0x90, 0x90, 0xf0, 0x10, 0x10, 0x80, 0x88, 0x00, 0x80,
-0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xcf, 0x80, 0x33, 0xd0, 0x81, 0x33,
-0xc6, 0xd0, 0x41, 0x80, 0x24, 0x1f, 0x48, 0x24, 0x1f, 0x50, 0x10, 0x10,
-0x80, 0x90, 0x58, 0x80, 0x90, 0x28, 0x24, 0x1e, 0x48, 0x24, 0x1e, 0x50,
-0x81, 0x24, 0x1e, 0x08, 0x92, 0x68, 0x91, 0x00, 0x80, 0x90, 0x90, 0x90,
-0x30, 0x80, 0x24, 0x1e, 0xb8, 0x90, 0x38, 0xa4, 0x1e, 0xb0, 0x33, 0xdd,
-0x80, 0x33, 0xdc, 0x80, 0x90, 0x28, 0x80, 0x33, 0xe6, 0xa4, 0x1e, 0x98,
-0x33, 0xe5, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x80, 0x33, 0xe0,
-0xa4, 0x1e, 0xa8, 0x33, 0xdf, 0x90, 0x28, 0x80, 0x33, 0xdb, 0xa4, 0x1e,
-0xa0, 0x33, 0xda, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xe4, 0x80, 0x33,
-0xe3, 0x90, 0x28, 0x24, 0x1f, 0x40, 0x24, 0x1f, 0x38, 0x90, 0x58, 0x80,
-0x10, 0x10, 0x80, 0x10, 0x10, 0x80, 0x33, 0xd2, 0x80, 0x90, 0x40, 0x10,
-0x10, 0x80, 0x24, 0x1e, 0x18, 0x80, 0x10, 0x10, 0x80, 0x33, 0xd1, 0x91,
-0x58, 0x91, 0x00, 0x90, 0x80, 0x81, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33,
-0xcd, 0x80, 0x33, 0xce, 0x81, 0x33, 0xc5, 0x81, 0x90, 0x50, 0x90, 0x28,
-0x80, 0x33, 0xcb, 0x80, 0x33, 0xcc, 0x81, 0x33, 0xc4, 0x83, 0x90, 0x28,
-0x24, 0x1e, 0x38, 0x24, 0x1e, 0x40, 0x90, 0xe8, 0x81, 0x90, 0x88, 0x90,
-0x38, 0x10, 0x10, 0x80, 0x33, 0xde, 0x90, 0x28, 0x80, 0x33, 0xd9, 0x80,
-0x33, 0xd8, 0x80, 0x90, 0x28, 0x80, 0x33, 0xe2, 0x80, 0x33, 0xe1, 0x82,
-0x10, 0x10, 0x80, 0x24, 0x1e, 0x10, 0x97, 0x10, 0x9e, 0x10, 0x06, 0x98,
-0x93, 0x00, 0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03,
-0x80, 0x30, 0x71, 0x24, 0x03, 0x78, 0x90, 0x38, 0xa4, 0x04, 0x10, 0x30,
-0x83, 0x24, 0x04, 0x08, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x30, 0x30,
-0xa7, 0x24, 0x05, 0x28, 0x90, 0x38, 0xa4, 0x04, 0xa0, 0x30, 0x95, 0x24,
-0x04, 0x98, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x70, 0x30,
-0x6c, 0x24, 0x03, 0x68, 0x90, 0x38, 0xa4, 0x04, 0x00, 0x30, 0x7e, 0x24,
-0x03, 0xf8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x20, 0x30, 0xa2, 0x24,
-0x05, 0x18, 0x90, 0x38, 0xa4, 0x04, 0x90, 0x30, 0x90, 0x24, 0x04, 0x88,
-0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x58, 0x30,
-0x69, 0x24, 0x03, 0x50, 0x90, 0x38, 0xa4, 0x03, 0xe8, 0x30, 0x7b, 0x24,
-0x03, 0xe0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x08, 0x30, 0x9f, 0x24,
-0x05, 0x00, 0x90, 0x38, 0xa4, 0x04, 0x78, 0x30, 0x8d, 0x24, 0x04, 0x70,
-0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x40, 0x30, 0x66, 0x24,
-0x03, 0x38, 0x90, 0x38, 0xa4, 0x03, 0xd0, 0x30, 0x78, 0x24, 0x03, 0xc8,
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xf0, 0x30, 0x9c, 0x24, 0x04, 0xe8,
-0x90, 0x38, 0xa4, 0x04, 0x60, 0x30, 0x8a, 0x24, 0x04, 0x58, 0x10, 0x10,
-0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x02, 0xf8, 0x30, 0x5d,
-0x24, 0x02, 0xf0, 0xd7, 0x42, 0x00, 0xa4, 0x32, 0x28, 0x36, 0x47, 0xa4,
-0x32, 0x08, 0x36, 0x43, 0x9c, 0xe0, 0x06, 0x90, 0x93, 0x00, 0x91, 0x80,
-0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x28, 0x30, 0x63, 0x24,
-0x03, 0x20, 0x90, 0x38, 0xa4, 0x03, 0xb8, 0x30, 0x75, 0x24, 0x03, 0xb0,
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xd8, 0x30, 0x99, 0x24, 0x04, 0xd0,
-0x90, 0x38, 0xa4, 0x04, 0x48, 0x30, 0x87, 0x24, 0x04, 0x40, 0x90, 0xc0,
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x10, 0x30, 0x60, 0x24, 0x03, 0x08,
-0x90, 0x38, 0xa4, 0x03, 0xa0, 0x30, 0x72, 0x24, 0x03, 0x98, 0x90, 0x60,
-0x90, 0x38, 0xa4, 0x04, 0xc0, 0x30, 0x96, 0x24, 0x04, 0xb8, 0x90, 0x38,
-0xa4, 0x04, 0x30, 0x30, 0x84, 0x24, 0x04, 0x28, 0x10, 0x10, 0x90, 0xe0,
-0x90, 0x70, 0x90, 0x38, 0xa4, 0x02, 0x88, 0x30, 0x52, 0xa4, 0x02, 0x78,
-0x30, 0x50, 0x90, 0x38, 0xa4, 0x02, 0x70, 0x30, 0x4b, 0xa4, 0x02, 0x60,
-0x30, 0x4d, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x02, 0x50, 0x30, 0x43, 0xa4,
-0x02, 0x40, 0x30, 0x49, 0x90, 0x38, 0xa4, 0x02, 0x38, 0x30, 0x44, 0xa4,
-0x02, 0x28, 0x30, 0x46, 0x91, 0x48, 0x80, 0x90, 0xa0, 0x90, 0x50, 0x90,
-0x28, 0x80, 0x30, 0x56, 0x24, 0x02, 0xa8, 0x90, 0x28, 0x80, 0x30, 0x58,
-0x24, 0x02, 0xb8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0x5c, 0x24, 0x02,
-0xd8, 0x90, 0x28, 0x80, 0x30, 0x5a, 0x24, 0x02, 0xc8, 0x80, 0x10, 0x10,
-0x10, 0x10, 0x90, 0x28, 0x80, 0x30, 0x53, 0x24, 0x02, 0xa0, 0xd7, 0x42,
-0x00, 0xa4, 0x32, 0x30, 0x36, 0x48, 0xa4, 0x32, 0x10, 0x36, 0x44, 0xa0,
-0x14, 0x90, 0xa0, 0x10, 0xb8, 0xa0, 0x0c, 0x88, 0x9e, 0x88, 0x09, 0xd0,
-0x94, 0xf0, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1,
-0x31, 0xc0, 0x85, 0x34, 0xe3, 0xcb, 0x61, 0x2a, 0x80, 0x85, 0x34, 0xb9,
-0x9a, 0x00, 0x03, 0xf8, 0x91, 0x98, 0x80, 0x91, 0x10, 0x90, 0xa0, 0x90,
-0x68, 0x90, 0x20, 0x38, 0xad, 0xc9, 0xe2, 0x2a, 0xc0, 0x85, 0x34, 0xe1,
-0xa4, 0x45, 0x48, 0x38, 0xaa, 0x90, 0x38, 0xa4, 0x45, 0x10, 0x38, 0xa3,
-0xa4, 0x45, 0x00, 0x38, 0xa1, 0x90, 0x48, 0x10, 0x10, 0xa4, 0x44, 0xc8,
-0x38, 0x9a, 0x10, 0x10, 0x80, 0x38, 0x96, 0x81, 0x10, 0x10, 0x80, 0xa4,
-0x44, 0x98, 0x38, 0x94, 0x91, 0xb0, 0x91, 0x60, 0x90, 0xe0, 0x90, 0x70,
-0x90, 0x38, 0xa4, 0x45, 0x38, 0x38, 0xa8, 0xa4, 0x45, 0x28, 0x38, 0xa6,
-0x90, 0x38, 0xa4, 0x44, 0xf0, 0x38, 0x9f, 0xa4, 0x44, 0xe0, 0x38, 0x9d,
-0x90, 0x48, 0x10, 0x10, 0xa4, 0x44, 0xb8, 0x38, 0x98, 0x10, 0x10, 0x80,
-0x38, 0x95, 0x90, 0x28, 0x80, 0x38, 0x8e, 0x80, 0x38, 0x8d, 0x81, 0x10,
-0x10, 0x80, 0xa4, 0x44, 0x88, 0x38, 0x92, 0xcb, 0x61, 0x2a, 0x40, 0x85,
-0x34, 0xb8, 0x90, 0xd8, 0x88, 0x00, 0x90, 0x84, 0x90, 0x38, 0xc1, 0xc0,
-0x85, 0x38, 0xb1, 0xc9, 0xe1, 0x31, 0x80, 0x85, 0x34, 0xdf, 0xcb, 0x61,
-0x2a, 0x00, 0x85, 0x34, 0xb7, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9,
-0xe1, 0x31, 0x40, 0x85, 0x34, 0xdd, 0xcb, 0x61, 0x29, 0xc0, 0x85, 0x34,
-0xb6, 0x91, 0xf8, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9,
-0xe1, 0x30, 0xc0, 0x85, 0x34, 0xd9, 0xcb, 0x61, 0x29, 0x40, 0x85, 0x34,
-0xb4, 0x88, 0x01, 0x00, 0x90, 0xa0, 0x81, 0x90, 0x70, 0x80, 0x90, 0x20,
-0x38, 0xa4, 0xc9, 0xe1, 0x30, 0x80, 0x85, 0x34, 0xd7, 0x81, 0x38, 0x9b,
-0x81, 0x10, 0x10, 0x80, 0xa4, 0x44, 0x78, 0x38, 0x90, 0xcb, 0x61, 0x29,
-0x00, 0x85, 0x34, 0xb3, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10,
-0xc9, 0xe1, 0x30, 0x40, 0x85, 0x34, 0xd5, 0xcb, 0x61, 0x28, 0xc0, 0x85,
-0x34, 0xb2, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x30, 0x00,
-0x85, 0x34, 0xd3, 0xcb, 0x61, 0x28, 0x80, 0x85, 0x34, 0xb1, 0x92, 0x38,
-0x81, 0x91, 0x68, 0x91, 0x18, 0x90, 0x80, 0x90, 0x40, 0x80, 0xa4, 0x46,
-0x00, 0x38, 0xc1, 0x80, 0xa4, 0x45, 0xf8, 0x38, 0xbe, 0x90, 0x28, 0x81,
-0x38, 0xbd, 0x90, 0x38, 0xa4, 0x45, 0xd8, 0x38, 0xbc, 0xa4, 0x45, 0xc8,
-0x38, 0xba, 0x90, 0x28, 0x80, 0x38, 0xb8, 0x80, 0x38, 0xb7, 0x80, 0x90,
-0x40, 0x10, 0x10, 0x80, 0x24, 0x45, 0xb0, 0x10, 0x10, 0x90, 0x38, 0xa4,
-0x45, 0xa0, 0x38, 0xb5, 0xa4, 0x45, 0x90, 0x38, 0xb3, 0x90, 0x50, 0x80,
-0xc9, 0xa2, 0x2b, 0xc0, 0x85, 0x38, 0xb0, 0x80, 0x38, 0xae, 0x9a, 0xd0,
-0x03, 0xe0, 0x91, 0x60, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10,
-0xc9, 0xe1, 0x2f, 0x80, 0x85, 0x34, 0xcf, 0xcb, 0x61, 0x28, 0x00, 0x85,
-0x34, 0xaf, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2f, 0x40,
-0x85, 0x34, 0xcd, 0xcb, 0x61, 0x27, 0xc0, 0x85, 0x34, 0xae, 0x90, 0xb0,
-0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2f, 0x00, 0x85, 0x34,
-0xcb, 0xcb, 0x61, 0x27, 0x80, 0x85, 0x34, 0xad, 0x88, 0x00, 0x68, 0x84,
-0x10, 0x10, 0xc9, 0xe1, 0x2e, 0xc0, 0x85, 0x34, 0xc9, 0xcb, 0x61, 0x27,
-0x40, 0x85, 0x34, 0xac, 0x90, 0x90, 0x90, 0x48, 0xcb, 0xa1, 0x25, 0x80,
-0x85, 0x34, 0x9b, 0xcb, 0xa1, 0x25, 0x40, 0x85, 0x34, 0x9a, 0x90, 0x48,
-0xcb, 0xa1, 0x25, 0x00, 0x85, 0x34, 0x99, 0xcb, 0xa1, 0x24, 0xc0, 0x85,
-0x34, 0x98, 0xcb, 0xa2, 0x22, 0xc0, 0x80, 0x38, 0x8c, 0x92, 0x40, 0x91,
-0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x24, 0x10, 0x84, 0x24, 0x24, 0x88,
-0x8c, 0x24, 0x08, 0x84, 0x24, 0x24, 0x80, 0x90, 0x48, 0x8c, 0x24, 0x00,
-0x84, 0x24, 0x24, 0x78, 0x8c, 0x23, 0xf8, 0x84, 0x24, 0x24, 0x70, 0x90,
-0x90, 0x90, 0x48, 0x8c, 0x23, 0xe8, 0x84, 0x24, 0x24, 0x60, 0x8c, 0x23,
-0xe0, 0x84, 0x24, 0x24, 0x58, 0x90, 0x48, 0x8c, 0x23, 0xd8, 0x84, 0x24,
-0x24, 0x50, 0x8c, 0x23, 0xd0, 0x84, 0x24, 0x24, 0x48, 0x91, 0x20, 0x90,
-0x90, 0x90, 0x48, 0x8c, 0x23, 0xc0, 0x84, 0x24, 0x24, 0x38, 0x8c, 0x23,
-0xb8, 0x84, 0x24, 0x24, 0x30, 0x90, 0x48, 0x8c, 0x23, 0xb0, 0x84, 0x24,
-0x24, 0x28, 0x8c, 0x23, 0xa8, 0x84, 0x24, 0x24, 0x20, 0x90, 0x38, 0xa4,
-0x23, 0x90, 0x34, 0x73, 0xa4, 0x23, 0x80, 0x34, 0x71, 0xa0, 0x0f, 0x50,
-0xa0, 0x09, 0x08, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, 0x90, 0xc8, 0x98,
-0x50, 0x00, 0x80, 0xe5, 0x22, 0x21, 0xc0, 0x38, 0x83, 0xe5, 0x22, 0x1d,
-0xc0, 0x38, 0x81, 0xcb, 0x61, 0x17, 0xc0, 0x85, 0x34, 0x6e, 0x98, 0x50,
-0x00, 0x80, 0xe5, 0x22, 0x19, 0xc0, 0x38, 0x63, 0xe5, 0x22, 0x15, 0xc0,
-0x38, 0x61, 0xcb, 0x61, 0x17, 0x80, 0x85, 0x34, 0x6d, 0x90, 0x48, 0xcb,
-0xa1, 0x17, 0x40, 0x85, 0x34, 0x6c, 0xcb, 0xa1, 0x17, 0x00, 0x85, 0x34,
-0x6b, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x0e,
-0xc0, 0x38, 0x47, 0xe5, 0x22, 0x08, 0xc0, 0x38, 0x2f, 0xcb, 0x61, 0x16,
-0x80, 0x85, 0x34, 0x69, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x02, 0xc0,
-0x38, 0x17, 0xe5, 0x21, 0xfc, 0xc0, 0x37, 0xff, 0xcb, 0x61, 0x16, 0x40,
-0x85, 0x34, 0x68, 0x90, 0x48, 0xcb, 0xa1, 0x16, 0x00, 0x85, 0x34, 0x67,
-0xcb, 0xa1, 0x15, 0xc0, 0x85, 0x34, 0x66, 0x92, 0x20, 0x91, 0x30, 0x90,
-0xb8, 0xd5, 0x03, 0x00, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0xa0, 0x84, 0x30,
-0x3e, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0x80, 0x84, 0x30, 0x3c, 0xd5, 0x02,
-0x00, 0xc0, 0xc0, 0x81, 0x30, 0x28, 0xc0, 0xc0, 0x81, 0x30, 0x24, 0x90,
-0x78, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x1c, 0xc0, 0xc0, 0x81,
-0x30, 0x18, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x10, 0xc0, 0xc0,
-0x81, 0x30, 0x0c, 0x91, 0x70, 0x90, 0xd8, 0xd5, 0x03, 0x80, 0xc8, 0xe1,
-0xf8, 0xc0, 0x81, 0x8c, 0x01, 0xc0, 0x84, 0x30, 0x40, 0xc8, 0xe1, 0xf9,
-0xc0, 0x81, 0x8c, 0x01, 0x90, 0x84, 0x30, 0x3d, 0xd5, 0x02, 0x80, 0xc8,
-0xe1, 0xf8, 0x40, 0x81, 0x30, 0x2c, 0xc8, 0xe1, 0xf5, 0x40, 0x81, 0x30,
-0x26, 0x90, 0x98, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xef, 0x40, 0x81, 0x30,
-0x20, 0xc8, 0xe1, 0xf0, 0x40, 0x81, 0x30, 0x1a, 0xd5, 0x02, 0x80, 0xc8,
-0xe1, 0xee, 0xc0, 0x81, 0x30, 0x14, 0xc8, 0xe1, 0xeb, 0xc0, 0x81, 0x30,
-0x0e, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00,
-0x80, 0xe5, 0x22, 0x1b, 0xc0, 0x38, 0x6b, 0xe5, 0x22, 0x1c, 0xc0, 0x38,
-0x7d, 0xcb, 0x61, 0x15, 0x40, 0x85, 0x34, 0x64, 0x98, 0x50, 0x00, 0x80,
-0xe5, 0x22, 0x13, 0xc0, 0x38, 0x4b, 0xe5, 0x22, 0x14, 0xc0, 0x38, 0x5d,
-0xcb, 0x61, 0x15, 0x00, 0x85, 0x34, 0x63, 0x90, 0x48, 0xcb, 0xa1, 0x14,
-0xc0, 0x85, 0x34, 0x62, 0xcb, 0xa1, 0x14, 0x80, 0x85, 0x34, 0x61, 0x91,
-0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x0c, 0xc0, 0x38,
-0x3f, 0xe5, 0x22, 0x06, 0xc0, 0x38, 0x27, 0xcb, 0x61, 0x12, 0xc0, 0x85,
-0x34, 0x50, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x00, 0xc0, 0x38, 0x0f,
-0xe5, 0x21, 0xfa, 0xc0, 0x37, 0xf7, 0xcb, 0x61, 0x12, 0x80, 0x85, 0x34,
-0x4f, 0x90, 0x48, 0xcb, 0xa1, 0x12, 0x40, 0x85, 0x34, 0x4e, 0xcb, 0xa1,
-0x12, 0x00, 0x85, 0x34, 0x4d, 0x91, 0x00, 0x90, 0x80, 0x90, 0x40, 0xe5,
-0x20, 0x02, 0x40, 0x30, 0x0a, 0xe5, 0x20, 0x01, 0x80, 0x30, 0x07, 0x90,
-0x40, 0xe5, 0x20, 0x00, 0xc0, 0x30, 0x04, 0xe5, 0x20, 0x00, 0x00, 0x30,
-0x01, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x21, 0xf2, 0xc0, 0x37, 0xc5, 0xe5,
-0x21, 0xf4, 0x00, 0x37, 0xdb, 0x90, 0x40, 0xe5, 0x21, 0xe9, 0x40, 0x37,
-0x9f, 0xe5, 0x21, 0xea, 0x80, 0x37, 0xb5, 0x80, 0x99, 0x28, 0x02, 0xf0,
-0x8c, 0x21, 0xf8, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x22, 0x1e, 0xc0, 0x38,
-0x79, 0xe5, 0x22, 0x1d, 0x40, 0x38, 0x7f, 0x90, 0x40, 0xe5, 0x22, 0x16,
-0xc0, 0x38, 0x59, 0xe5, 0x22, 0x15, 0x40, 0x38, 0x5f, 0x91, 0x48, 0x90,
-0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x0d, 0xc0, 0x38, 0x43, 0xe5,
-0x22, 0x07, 0xc0, 0x38, 0x2b, 0xcb, 0x61, 0x10, 0x80, 0x85, 0x34, 0x46,
-0x90, 0x40, 0xe5, 0x22, 0x01, 0xc0, 0x38, 0x13, 0xe5, 0x21, 0xfb, 0xc0,
-0x37, 0xfb, 0x90, 0x48, 0xcb, 0xa1, 0x10, 0x00, 0x85, 0x34, 0x44, 0xcb,
-0xa1, 0x10, 0x40, 0x85, 0x34, 0x45, 0x10, 0x10, 0x90, 0x80, 0x90, 0x40,
-0xe5, 0x21, 0xf6, 0x40, 0x37, 0xd7, 0xe5, 0x21, 0xf4, 0xc0, 0x37, 0xdf,
-0x90, 0x40, 0xe5, 0x21, 0xec, 0xc0, 0x37, 0xb1, 0xe5, 0x21, 0xeb, 0x40,
-0x37, 0xb9,
+0x99, 0x80, 0x31, 0x9b, 0x10, 0x10, 0x80, 0x31, 0x9a, 0x90, 0x70, 0x90,
+0x38, 0xa4, 0x08, 0x58, 0x31, 0xab, 0xa4, 0x08, 0x68, 0x31, 0xad, 0x10,
+0x10, 0xa4, 0x08, 0x60, 0x31, 0xac, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x09, 0x78, 0x31, 0xcf, 0xa4, 0x09, 0x88, 0x31, 0xd1, 0x10, 0x10,
+0xa4, 0x09, 0x80, 0x31, 0xd0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xe8,
+0x31, 0xbd, 0xa4, 0x08, 0xf8, 0x31, 0xbf, 0x10, 0x10, 0xa4, 0x08, 0xf0,
+0x31, 0xbe, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31,
+0x96, 0x80, 0x31, 0x98, 0x10, 0x10, 0x80, 0x31, 0x97, 0x90, 0x70, 0x90,
+0x38, 0xa4, 0x08, 0x40, 0x31, 0xa8, 0xa4, 0x08, 0x50, 0x31, 0xaa, 0x10,
+0x10, 0xa4, 0x08, 0x48, 0x31, 0xa9, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x09, 0x60, 0x31, 0xcc, 0xa4, 0x09, 0x70, 0x31, 0xce, 0x10, 0x10,
+0xa4, 0x09, 0x68, 0x31, 0xcd, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xd0,
+0x31, 0xba, 0xa4, 0x08, 0xe0, 0x31, 0xbc, 0x10, 0x10, 0xa4, 0x08, 0xd8,
+0x31, 0xbb, 0x10, 0x10, 0x90, 0xa8, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50,
+0x90, 0x28, 0x80, 0x31, 0x8d, 0x80, 0x31, 0x8f, 0x10, 0x10, 0x80, 0x31,
+0x8e, 0x90, 0x60, 0x90, 0x30, 0x60, 0xa0, 0x2a, 0xc0, 0x60, 0xa0, 0x2a,
+0x80, 0x90, 0x30, 0x60, 0xa0, 0x2a, 0x40, 0x60, 0xa0, 0x2a, 0x00, 0x97,
+0xf0, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90,
+0x28, 0x80, 0x31, 0x93, 0x80, 0x31, 0x95, 0x10, 0x10, 0x80, 0x31, 0x94,
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x28, 0x31, 0xa5, 0xa4, 0x08, 0x38,
+0x31, 0xa7, 0x10, 0x10, 0xa4, 0x08, 0x30, 0x31, 0xa6, 0x90, 0xb8, 0x90,
+0x70, 0x90, 0x38, 0xa4, 0x09, 0x48, 0x31, 0xc9, 0xa4, 0x09, 0x58, 0x31,
+0xcb, 0x10, 0x10, 0xa4, 0x09, 0x50, 0x31, 0xca, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x08, 0xb8, 0x31, 0xb7, 0xa4, 0x08, 0xc8, 0x31, 0xb9, 0x10, 0x10,
+0xa4, 0x08, 0xc0, 0x31, 0xb8, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90,
+0x28, 0x80, 0x31, 0x90, 0x80, 0x31, 0x92, 0x10, 0x10, 0x80, 0x31, 0x91,
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x10, 0x31, 0xa2, 0xa4, 0x08, 0x20,
+0x31, 0xa4, 0x10, 0x10, 0xa4, 0x08, 0x18, 0x31, 0xa3, 0x90, 0xb8, 0x90,
+0x70, 0x90, 0x38, 0xa4, 0x09, 0x30, 0x31, 0xc6, 0xa4, 0x09, 0x40, 0x31,
+0xc8, 0x10, 0x10, 0xa4, 0x09, 0x38, 0x31, 0xc7, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x08, 0xa0, 0x31, 0xb4, 0xa4, 0x08, 0xb0, 0x31, 0xb6, 0x10, 0x10,
+0xa4, 0x08, 0xa8, 0x31, 0xb5, 0x10, 0x10, 0x91, 0x40, 0x90, 0xa0, 0x90,
+0x50, 0x90, 0x28, 0x80, 0x30, 0xcb, 0x80, 0x30, 0xca, 0x90, 0x28, 0x80,
+0x30, 0xc9, 0x80, 0x30, 0xc8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xc4,
+0x80, 0x30, 0xc7, 0x90, 0x28, 0x80, 0x30, 0xc6, 0x80, 0x30, 0xc5, 0x90,
+0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbc, 0x80, 0x30, 0xc3, 0x90,
+0x28, 0x80, 0x30, 0xc2, 0x80, 0x30, 0xc1, 0x90, 0x50, 0x90, 0x28, 0x80,
+0x30, 0xbd, 0x80, 0x30, 0xc0, 0x90, 0x28, 0x80, 0x30, 0xbf, 0x80, 0x30,
+0xbe, 0x91, 0x88, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x81, 0x31,
+0x3b, 0x10, 0x10, 0x80, 0x31, 0x3a, 0x90, 0x28, 0x81, 0x31, 0x3d, 0x10,
+0x10, 0x80, 0x31, 0x3c, 0x90, 0x60, 0x90, 0x28, 0x81, 0x31, 0x41, 0x10,
+0x10, 0x80, 0x31, 0x40, 0x90, 0x28, 0x81, 0x31, 0x3f, 0x10, 0x10, 0x80,
+0x31, 0x3e, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, 0x81, 0x31, 0x38,
+0x10, 0x10, 0x80, 0x31, 0x39, 0xa0, 0x0b, 0x90, 0xa0, 0x0a, 0xc8, 0x95,
+0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80,
+0x31, 0x56, 0x80, 0x31, 0x55, 0x10, 0x10, 0x80, 0x31, 0x54, 0x90, 0x70,
+0x90, 0x38, 0xa4, 0x06, 0xe8, 0x31, 0x68, 0xa4, 0x06, 0xe0, 0x31, 0x67,
+0x10, 0x10, 0xa4, 0x06, 0xd8, 0x31, 0x66, 0x90, 0xb8, 0x90, 0x70, 0x90,
+0x38, 0xa4, 0x08, 0x08, 0x31, 0x8c, 0xa4, 0x08, 0x00, 0x31, 0x8b, 0x10,
+0x10, 0xa4, 0x07, 0xf8, 0x31, 0x8a, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07,
+0x78, 0x31, 0x7a, 0xa4, 0x07, 0x70, 0x31, 0x79, 0x10, 0x10, 0xa4, 0x07,
+0x68, 0x31, 0x78, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80,
+0x31, 0x51, 0x80, 0x31, 0x53, 0x10, 0x10, 0x80, 0x31, 0x52, 0x90, 0x70,
+0x90, 0x38, 0xa4, 0x06, 0xc0, 0x31, 0x63, 0xa4, 0x06, 0xd0, 0x31, 0x65,
+0x10, 0x10, 0xa4, 0x06, 0xc8, 0x31, 0x64, 0x90, 0xb8, 0x90, 0x70, 0x90,
+0x38, 0xa4, 0x07, 0xe0, 0x31, 0x87, 0xa4, 0x07, 0xf0, 0x31, 0x89, 0x10,
+0x10, 0xa4, 0x07, 0xe8, 0x31, 0x88, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07,
+0x50, 0x31, 0x75, 0xa4, 0x07, 0x60, 0x31, 0x77, 0x10, 0x10, 0xa4, 0x07,
+0x58, 0x31, 0x76, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90,
+0x28, 0x80, 0x31, 0x4e, 0x80, 0x31, 0x50, 0x10, 0x10, 0x80, 0x31, 0x4f,
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xa8, 0x31, 0x60, 0xa4, 0x06, 0xb8,
+0x31, 0x62, 0x10, 0x10, 0xa4, 0x06, 0xb0, 0x31, 0x61, 0x90, 0xb8, 0x90,
+0x70, 0x90, 0x38, 0xa4, 0x07, 0xc8, 0x31, 0x84, 0xa4, 0x07, 0xd8, 0x31,
+0x86, 0x10, 0x10, 0xa4, 0x07, 0xd0, 0x31, 0x85, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x07, 0x38, 0x31, 0x72, 0xa4, 0x07, 0x48, 0x31, 0x74, 0x10, 0x10,
+0xa4, 0x07, 0x40, 0x31, 0x73, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90,
+0x28, 0x80, 0x31, 0x4b, 0x80, 0x31, 0x4d, 0x10, 0x10, 0x80, 0x31, 0x4c,
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0x90, 0x31, 0x5d, 0xa4, 0x06, 0xa0,
+0x31, 0x5f, 0x10, 0x10, 0xa4, 0x06, 0x98, 0x31, 0x5e, 0x90, 0xb8, 0x90,
+0x70, 0x90, 0x38, 0xa4, 0x07, 0xb0, 0x31, 0x81, 0xa4, 0x07, 0xc0, 0x31,
+0x83, 0x10, 0x10, 0xa4, 0x07, 0xb8, 0x31, 0x82, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x07, 0x20, 0x31, 0x6f, 0xa4, 0x07, 0x30, 0x31, 0x71, 0x10, 0x10,
+0xa4, 0x07, 0x28, 0x31, 0x70, 0x10, 0x10, 0x80, 0x10, 0x10, 0x10, 0x10,
+0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x42, 0x80, 0x31, 0x44, 0x10, 0x10,
+0x80, 0x31, 0x43, 0x80, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88,
+0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x48, 0x80, 0x31, 0x4a, 0x10, 0x10,
+0x80, 0x31, 0x49, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0x78, 0x31, 0x5a,
+0xa4, 0x06, 0x88, 0x31, 0x5c, 0x10, 0x10, 0xa4, 0x06, 0x80, 0x31, 0x5b,
+0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x98, 0x31, 0x7e, 0xa4,
+0x07, 0xa8, 0x31, 0x80, 0x10, 0x10, 0xa4, 0x07, 0xa0, 0x31, 0x7f, 0x90,
+0x70, 0x90, 0x38, 0xa4, 0x07, 0x08, 0x31, 0x6c, 0xa4, 0x07, 0x18, 0x31,
+0x6e, 0x10, 0x10, 0xa4, 0x07, 0x10, 0x31, 0x6d, 0x91, 0x40, 0x90, 0x88,
+0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x45, 0x80, 0x31, 0x47, 0x10, 0x10,
+0x80, 0x31, 0x46, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0x60, 0x31, 0x57,
+0xa4, 0x06, 0x70, 0x31, 0x59, 0x10, 0x10, 0xa4, 0x06, 0x68, 0x31, 0x58,
+0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x80, 0x31, 0x7b, 0xa4,
+0x07, 0x90, 0x31, 0x7d, 0x10, 0x10, 0xa4, 0x07, 0x88, 0x31, 0x7c, 0x90,
+0x70, 0x90, 0x38, 0xa4, 0x06, 0xf0, 0x31, 0x69, 0xa4, 0x07, 0x00, 0x31,
+0x6b, 0x10, 0x10, 0xa4, 0x06, 0xf8, 0x31, 0x6a, 0x10, 0x10, 0x91, 0x40,
+0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbb, 0x80, 0x30, 0xba,
+0x90, 0x28, 0x80, 0x30, 0xb9, 0x80, 0x30, 0xb8, 0x90, 0x50, 0x90, 0x28,
+0x80, 0x30, 0xb4, 0x80, 0x30, 0xb7, 0x90, 0x28, 0x80, 0x30, 0xb6, 0x80,
+0x30, 0xb5, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xac, 0x80,
+0x30, 0xb3, 0x90, 0x28, 0x80, 0x30, 0xb2, 0x80, 0x30, 0xb1, 0x90, 0x50,
+0x90, 0x28, 0x80, 0x30, 0xad, 0x80, 0x30, 0xb0, 0x90, 0x28, 0x80, 0x30,
+0xaf, 0x80, 0x30, 0xae, 0xc3, 0xc0, 0x30, 0x42, 0x9c, 0xe8, 0x07, 0x60,
+0x91, 0x90, 0x90, 0xf0, 0x10, 0x10, 0x80, 0x88, 0x00, 0x80, 0x90, 0x50,
+0x90, 0x28, 0x80, 0x33, 0xf8, 0x80, 0x33, 0xf9, 0x81, 0x33, 0xef, 0xd0,
+0x41, 0x80, 0x24, 0x20, 0x90, 0x24, 0x20, 0x98, 0x10, 0x10, 0x80, 0x90,
+0x58, 0x80, 0x90, 0x28, 0x24, 0x1f, 0x90, 0x24, 0x1f, 0x98, 0x81, 0x24,
+0x1f, 0x50, 0x92, 0x68, 0x91, 0x00, 0x80, 0x90, 0x90, 0x90, 0x30, 0x80,
+0x24, 0x20, 0x00, 0x90, 0x38, 0xa4, 0x1f, 0xf8, 0x34, 0x06, 0x80, 0x34,
+0x05, 0x80, 0x90, 0x28, 0x80, 0x34, 0x0f, 0xa4, 0x1f, 0xe0, 0x34, 0x0e,
+0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x80, 0x34, 0x09, 0xa4, 0x1f,
+0xf0, 0x34, 0x08, 0x90, 0x28, 0x80, 0x34, 0x04, 0xa4, 0x1f, 0xe8, 0x34,
+0x03, 0x90, 0x50, 0x90, 0x28, 0x80, 0x34, 0x0d, 0x80, 0x34, 0x0c, 0x90,
+0x28, 0x24, 0x20, 0x88, 0x24, 0x20, 0x80, 0x90, 0x58, 0x80, 0x10, 0x10,
+0x80, 0x10, 0x10, 0x80, 0x33, 0xfb, 0x80, 0x90, 0x40, 0x10, 0x10, 0x80,
+0x24, 0x1f, 0x60, 0x80, 0x10, 0x10, 0x80, 0x33, 0xfa, 0x91, 0x58, 0x91,
+0x00, 0x90, 0x80, 0x81, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xf6, 0x80,
+0x33, 0xf7, 0x81, 0x33, 0xee, 0x81, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33,
+0xf4, 0x80, 0x33, 0xf5, 0x81, 0x33, 0xed, 0x83, 0x90, 0x28, 0x24, 0x1f,
+0x80, 0x24, 0x1f, 0x88, 0x90, 0xe8, 0x81, 0x90, 0x88, 0x90, 0x38, 0x10,
+0x10, 0x80, 0x34, 0x07, 0x90, 0x28, 0x80, 0x34, 0x02, 0x80, 0x34, 0x01,
+0x80, 0x90, 0x28, 0x80, 0x34, 0x0b, 0x80, 0x34, 0x0a, 0x82, 0x10, 0x10,
+0x80, 0x24, 0x1f, 0x58, 0x97, 0x10, 0x9e, 0x10, 0x06, 0x98, 0x93, 0x00,
+0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x80, 0x30,
+0x71, 0x24, 0x03, 0x78, 0x90, 0x38, 0xa4, 0x04, 0x10, 0x30, 0x83, 0x24,
+0x04, 0x08, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x30, 0x30, 0xa7, 0x24,
+0x05, 0x28, 0x90, 0x38, 0xa4, 0x04, 0xa0, 0x30, 0x95, 0x24, 0x04, 0x98,
+0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x70, 0x30, 0x6c, 0x24,
+0x03, 0x68, 0x90, 0x38, 0xa4, 0x04, 0x00, 0x30, 0x7e, 0x24, 0x03, 0xf8,
+0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x20, 0x30, 0xa2, 0x24, 0x05, 0x18,
+0x90, 0x38, 0xa4, 0x04, 0x90, 0x30, 0x90, 0x24, 0x04, 0x88, 0x91, 0x80,
+0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x58, 0x30, 0x69, 0x24,
+0x03, 0x50, 0x90, 0x38, 0xa4, 0x03, 0xe8, 0x30, 0x7b, 0x24, 0x03, 0xe0,
+0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x08, 0x30, 0x9f, 0x24, 0x05, 0x00,
+0x90, 0x38, 0xa4, 0x04, 0x78, 0x30, 0x8d, 0x24, 0x04, 0x70, 0x90, 0xc0,
+0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x40, 0x30, 0x66, 0x24, 0x03, 0x38,
+0x90, 0x38, 0xa4, 0x03, 0xd0, 0x30, 0x78, 0x24, 0x03, 0xc8, 0x90, 0x60,
+0x90, 0x38, 0xa4, 0x04, 0xf0, 0x30, 0x9c, 0x24, 0x04, 0xe8, 0x90, 0x38,
+0xa4, 0x04, 0x60, 0x30, 0x8a, 0x24, 0x04, 0x58, 0x10, 0x10, 0x80, 0x10,
+0x10, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x02, 0xf8, 0x30, 0x5d, 0x24, 0x02,
+0xf0, 0xd7, 0x42, 0x00, 0xa4, 0x39, 0x58, 0x37, 0x2d, 0xa4, 0x39, 0x38,
+0x37, 0x29, 0x9c, 0xe0, 0x06, 0x90, 0x93, 0x00, 0x91, 0x80, 0x90, 0xc0,
+0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x28, 0x30, 0x63, 0x24, 0x03, 0x20,
+0x90, 0x38, 0xa4, 0x03, 0xb8, 0x30, 0x75, 0x24, 0x03, 0xb0, 0x90, 0x60,
+0x90, 0x38, 0xa4, 0x04, 0xd8, 0x30, 0x99, 0x24, 0x04, 0xd0, 0x90, 0x38,
+0xa4, 0x04, 0x48, 0x30, 0x87, 0x24, 0x04, 0x40, 0x90, 0xc0, 0x90, 0x60,
+0x90, 0x38, 0xa4, 0x03, 0x10, 0x30, 0x60, 0x24, 0x03, 0x08, 0x90, 0x38,
+0xa4, 0x03, 0xa0, 0x30, 0x72, 0x24, 0x03, 0x98, 0x90, 0x60, 0x90, 0x38,
+0xa4, 0x04, 0xc0, 0x30, 0x96, 0x24, 0x04, 0xb8, 0x90, 0x38, 0xa4, 0x04,
+0x30, 0x30, 0x84, 0x24, 0x04, 0x28, 0x10, 0x10, 0x90, 0xe0, 0x90, 0x70,
+0x90, 0x38, 0xa4, 0x02, 0x88, 0x30, 0x52, 0xa4, 0x02, 0x78, 0x30, 0x50,
+0x90, 0x38, 0xa4, 0x02, 0x70, 0x30, 0x4b, 0xa4, 0x02, 0x60, 0x30, 0x4d,
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x02, 0x50, 0x30, 0x43, 0xa4, 0x02, 0x40,
+0x30, 0x49, 0x90, 0x38, 0xa4, 0x02, 0x38, 0x30, 0x44, 0xa4, 0x02, 0x28,
+0x30, 0x46, 0x91, 0x48, 0x80, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80,
+0x30, 0x56, 0x24, 0x02, 0xa8, 0x90, 0x28, 0x80, 0x30, 0x58, 0x24, 0x02,
+0xb8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0x5c, 0x24, 0x02, 0xd8, 0x90,
+0x28, 0x80, 0x30, 0x5a, 0x24, 0x02, 0xc8, 0x80, 0x10, 0x10, 0x10, 0x10,
+0x90, 0x28, 0x80, 0x30, 0x53, 0x24, 0x02, 0xa0, 0xd7, 0x42, 0x00, 0xa4,
+0x39, 0x60, 0x37, 0x2e, 0xa4, 0x39, 0x40, 0x37, 0x2a, 0xa0, 0x14, 0x68,
+0xa0, 0x10, 0x90, 0xa0, 0x0c, 0x60, 0x9e, 0x88, 0x09, 0xd0, 0x94, 0xf0,
+0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x4c, 0x40,
+0x85, 0x35, 0x4d, 0xcb, 0x61, 0x45, 0x00, 0x85, 0x35, 0x23, 0x9a, 0x00,
+0x03, 0xf8, 0x91, 0x98, 0x80, 0x91, 0x10, 0x90, 0xa0, 0x90, 0x68, 0x90,
+0x20, 0x3a, 0x75, 0xc9, 0xe2, 0x9c, 0xc0, 0x85, 0x35, 0x4b, 0xa4, 0x53,
+0x88, 0x3a, 0x72, 0x90, 0x38, 0xa4, 0x53, 0x50, 0x3a, 0x6b, 0xa4, 0x53,
+0x40, 0x3a, 0x69, 0x90, 0x48, 0x10, 0x10, 0xa4, 0x53, 0x08, 0x3a, 0x62,
+0x10, 0x10, 0x80, 0x3a, 0x5e, 0x81, 0x10, 0x10, 0x80, 0xa4, 0x52, 0xd8,
+0x3a, 0x5c, 0x91, 0xb0, 0x91, 0x60, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38,
+0xa4, 0x53, 0x78, 0x3a, 0x70, 0xa4, 0x53, 0x68, 0x3a, 0x6e, 0x90, 0x38,
+0xa4, 0x53, 0x30, 0x3a, 0x67, 0xa4, 0x53, 0x20, 0x3a, 0x65, 0x90, 0x48,
+0x10, 0x10, 0xa4, 0x52, 0xf8, 0x3a, 0x60, 0x10, 0x10, 0x80, 0x3a, 0x5d,
+0x90, 0x28, 0x80, 0x3a, 0x56, 0x80, 0x3a, 0x55, 0x81, 0x10, 0x10, 0x80,
+0xa4, 0x52, 0xc8, 0x3a, 0x5a, 0xcb, 0x61, 0x44, 0xc0, 0x85, 0x35, 0x22,
+0x90, 0xd8, 0x88, 0x00, 0x90, 0x84, 0x90, 0x38, 0xc1, 0xc0, 0x85, 0x3a,
+0x78, 0xc9, 0xe1, 0x4c, 0x00, 0x85, 0x35, 0x49, 0xcb, 0x61, 0x44, 0x80,
+0x85, 0x35, 0x21, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x4b,
+0xc0, 0x85, 0x35, 0x47, 0xcb, 0x61, 0x44, 0x40, 0x85, 0x35, 0x20, 0x91,
+0xf8, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x4b,
+0x40, 0x85, 0x35, 0x43, 0xcb, 0x61, 0x43, 0xc0, 0x85, 0x35, 0x1e, 0x88,
+0x01, 0x00, 0x90, 0xa0, 0x81, 0x90, 0x70, 0x80, 0x90, 0x20, 0x3a, 0x6c,
+0xc9, 0xe1, 0x4b, 0x00, 0x85, 0x35, 0x41, 0x81, 0x3a, 0x63, 0x81, 0x10,
+0x10, 0x80, 0xa4, 0x52, 0xb8, 0x3a, 0x58, 0xcb, 0x61, 0x43, 0x80, 0x85,
+0x35, 0x1d, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1,
+0x4a, 0xc0, 0x85, 0x35, 0x3f, 0xcb, 0x61, 0x43, 0x40, 0x85, 0x35, 0x1c,
+0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x4a, 0x80, 0x85, 0x35,
+0x3d, 0xcb, 0x61, 0x43, 0x00, 0x85, 0x35, 0x1b, 0x92, 0x38, 0x81, 0x91,
+0x68, 0x91, 0x18, 0x90, 0x80, 0x90, 0x40, 0x80, 0xa4, 0x54, 0x38, 0x3a,
+0x88, 0x80, 0xa4, 0x54, 0x30, 0x3a, 0x85, 0x90, 0x28, 0x81, 0x3a, 0x84,
+0x90, 0x38, 0xa4, 0x54, 0x10, 0x3a, 0x83, 0xa4, 0x54, 0x00, 0x3a, 0x81,
+0x90, 0x28, 0x80, 0x3a, 0x7f, 0x80, 0x3a, 0x7e, 0x80, 0x90, 0x40, 0x10,
+0x10, 0x80, 0x24, 0x53, 0xe8, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x53, 0xd8,
+0x3a, 0x7c, 0xa4, 0x53, 0xc8, 0x3a, 0x7a, 0x90, 0x28, 0x80, 0x3a, 0x77,
+0x80, 0x3a, 0x76, 0x9a, 0xd0, 0x03, 0xe0, 0x91, 0x60, 0x90, 0xb0, 0x88,
+0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x4a, 0x00, 0x85, 0x35, 0x39,
+0xcb, 0x61, 0x42, 0x80, 0x85, 0x35, 0x19, 0x88, 0x00, 0x68, 0x84, 0x10,
+0x10, 0xc9, 0xe1, 0x49, 0xc0, 0x85, 0x35, 0x37, 0xcb, 0x61, 0x42, 0x40,
+0x85, 0x35, 0x18, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9,
+0xe1, 0x49, 0x80, 0x85, 0x35, 0x35, 0xcb, 0x61, 0x42, 0x00, 0x85, 0x35,
+0x17, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x49, 0x40, 0x85,
+0x35, 0x33, 0xcb, 0x61, 0x41, 0xc0, 0x85, 0x35, 0x16, 0x90, 0x90, 0x90,
+0x48, 0xcb, 0xa1, 0x40, 0x00, 0x85, 0x35, 0x05, 0xcb, 0xa1, 0x3f, 0xc0,
+0x85, 0x35, 0x04, 0x90, 0x48, 0xcb, 0xa1, 0x3f, 0x80, 0x85, 0x35, 0x03,
+0xcb, 0xa1, 0x3f, 0x40, 0x85, 0x35, 0x02, 0xcb, 0xa2, 0x94, 0xc0, 0x80,
+0x3a, 0x54, 0x92, 0x40, 0x91, 0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x27,
+0x60, 0x84, 0x24, 0x27, 0xd8, 0x8c, 0x27, 0x58, 0x84, 0x24, 0x27, 0xd0,
+0x90, 0x48, 0x8c, 0x27, 0x50, 0x84, 0x24, 0x27, 0xc8, 0x8c, 0x27, 0x48,
+0x84, 0x24, 0x27, 0xc0, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x27, 0x38, 0x84,
+0x24, 0x27, 0xb0, 0x8c, 0x27, 0x30, 0x84, 0x24, 0x27, 0xa8, 0x90, 0x48,
+0x8c, 0x27, 0x28, 0x84, 0x24, 0x27, 0xa0, 0x8c, 0x27, 0x20, 0x84, 0x24,
+0x27, 0x98, 0x91, 0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x27, 0x10, 0x84,
+0x24, 0x27, 0x88, 0x8c, 0x27, 0x08, 0x84, 0x24, 0x27, 0x80, 0x90, 0x48,
+0x8c, 0x27, 0x00, 0x84, 0x24, 0x27, 0x78, 0x8c, 0x26, 0xf8, 0x84, 0x24,
+0x27, 0x70, 0x90, 0x38, 0xa4, 0x26, 0xe0, 0x34, 0xdd, 0xa4, 0x26, 0xd0,
+0x34, 0xdb, 0xa0, 0x0f, 0x50, 0xa0, 0x09, 0x08, 0x9a, 0x30, 0x04, 0x40,
+0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x92, 0xc0,
+0x3a, 0x43, 0xe5, 0x22, 0x8a, 0xc0, 0x3a, 0x3f, 0xcb, 0x61, 0x32, 0x40,
+0x85, 0x34, 0xd8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x82, 0xc0, 0x3a,
+0x03, 0xe5, 0x22, 0x7a, 0xc0, 0x39, 0xff, 0xcb, 0x61, 0x32, 0x00, 0x85,
+0x34, 0xd7, 0x90, 0x48, 0xcb, 0xa1, 0x31, 0xc0, 0x85, 0x34, 0xd6, 0xcb,
+0xa1, 0x31, 0x80, 0x85, 0x34, 0xd5, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50,
+0x00, 0x80, 0xe5, 0x22, 0x6c, 0xc0, 0x39, 0xcb, 0xe5, 0x22, 0x60, 0xc0,
+0x39, 0x9b, 0xcb, 0x61, 0x31, 0x00, 0x85, 0x34, 0xd3, 0x98, 0x50, 0x00,
+0x80, 0xe5, 0x22, 0x54, 0xc0, 0x39, 0x6b, 0xe5, 0x22, 0x48, 0xc0, 0x39,
+0x3b, 0xcb, 0x61, 0x30, 0xc0, 0x85, 0x34, 0xd2, 0x90, 0x48, 0xcb, 0xa1,
+0x30, 0x80, 0x85, 0x34, 0xd1, 0xcb, 0xa1, 0x30, 0x40, 0x85, 0x34, 0xd0,
+0x92, 0x20, 0x91, 0x30, 0x90, 0xb8, 0xd5, 0x03, 0x00, 0xc0, 0xc0, 0x81,
+0x8c, 0x01, 0xa0, 0x84, 0x30, 0x3e, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0x80,
+0x84, 0x30, 0x3c, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x28, 0xc0,
+0xc0, 0x81, 0x30, 0x24, 0x90, 0x78, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81,
+0x30, 0x1c, 0xc0, 0xc0, 0x81, 0x30, 0x18, 0xd5, 0x02, 0x00, 0xc0, 0xc0,
+0x81, 0x30, 0x10, 0xc0, 0xc0, 0x81, 0x30, 0x0c, 0x91, 0x70, 0x90, 0xd8,
+0xd5, 0x03, 0x80, 0xc8, 0xe2, 0x40, 0xc0, 0x81, 0x8c, 0x01, 0xc0, 0x84,
+0x30, 0x40, 0xc8, 0xe2, 0x42, 0xc0, 0x81, 0x8c, 0x01, 0x90, 0x84, 0x30,
+0x3d, 0xd5, 0x02, 0x80, 0xc8, 0xe2, 0x3f, 0xc0, 0x81, 0x30, 0x2c, 0xc8,
+0xe2, 0x3a, 0x40, 0x81, 0x30, 0x26, 0x90, 0x98, 0xd5, 0x02, 0x80, 0xc8,
+0xe2, 0x2f, 0x40, 0x81, 0x30, 0x20, 0xc8, 0xe2, 0x31, 0x40, 0x81, 0x30,
+0x1a, 0xd5, 0x02, 0x80, 0xc8, 0xe2, 0x2e, 0x40, 0x81, 0x30, 0x14, 0xc8,
+0xe2, 0x28, 0xc0, 0x81, 0x30, 0x0e, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90,
+0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x86, 0xc0, 0x3a, 0x13,
+0xe5, 0x22, 0x88, 0xc0, 0x3a, 0x37, 0xcb, 0x61, 0x2f, 0xc0, 0x85, 0x34,
+0xce, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x76, 0xc0, 0x39, 0xd3, 0xe5,
+0x22, 0x78, 0xc0, 0x39, 0xf7, 0xcb, 0x61, 0x2f, 0x80, 0x85, 0x34, 0xcd,
+0x90, 0x48, 0xcb, 0xa1, 0x2f, 0x40, 0x85, 0x34, 0xcc, 0xcb, 0xa1, 0x2f,
+0x00, 0x85, 0x34, 0xcb, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80,
+0xe5, 0x22, 0x68, 0xc0, 0x39, 0xbb, 0xe5, 0x22, 0x5c, 0xc0, 0x39, 0x8b,
+0xcb, 0x61, 0x2d, 0x40, 0x85, 0x34, 0xba, 0x98, 0x50, 0x00, 0x80, 0xe5,
+0x22, 0x50, 0xc0, 0x39, 0x5b, 0xe5, 0x22, 0x44, 0xc0, 0x39, 0x2b, 0xcb,
+0x61, 0x2d, 0x00, 0x85, 0x34, 0xb9, 0x90, 0x48, 0xcb, 0xa1, 0x2c, 0xc0,
+0x85, 0x34, 0xb8, 0xcb, 0xa1, 0x2c, 0x80, 0x85, 0x34, 0xb7, 0x91, 0x00,
+0x90, 0x80, 0x90, 0x40, 0xe5, 0x20, 0x02, 0x40, 0x30, 0x0a, 0xe5, 0x20,
+0x01, 0x80, 0x30, 0x07, 0x90, 0x40, 0xe5, 0x20, 0x00, 0xc0, 0x30, 0x04,
+0xe5, 0x20, 0x00, 0x00, 0x30, 0x01, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x22,
+0x35, 0xc0, 0x38, 0xcd, 0xe5, 0x22, 0x38, 0x00, 0x38, 0xf5, 0x90, 0x40,
+0xe5, 0x22, 0x24, 0x40, 0x38, 0x87, 0xe5, 0x22, 0x26, 0x80, 0x38, 0xaf,
+0x80, 0x99, 0x28, 0x02, 0xf0, 0x8c, 0x25, 0x48, 0x90, 0x80, 0x90, 0x40,
+0xe5, 0x22, 0x8c, 0xc0, 0x3a, 0x2f, 0xe5, 0x22, 0x89, 0xc0, 0x3a, 0x3b,
+0x90, 0x40, 0xe5, 0x22, 0x7c, 0xc0, 0x39, 0xef, 0xe5, 0x22, 0x79, 0xc0,
+0x39, 0xfb, 0x91, 0x48, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22,
+0x6a, 0xc0, 0x39, 0xc3, 0xe5, 0x22, 0x5e, 0xc0, 0x39, 0x93, 0xcb, 0x61,
+0x2b, 0x00, 0x85, 0x34, 0xb0, 0x90, 0x40, 0xe5, 0x22, 0x52, 0xc0, 0x39,
+0x63, 0xe5, 0x22, 0x46, 0xc0, 0x39, 0x33, 0x90, 0x48, 0xcb, 0xa1, 0x2a,
+0x80, 0x85, 0x34, 0xae, 0xcb, 0xa1, 0x2a, 0xc0, 0x85, 0x34, 0xaf, 0x10,
+0x10, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x22, 0x3c, 0x40, 0x38, 0xed, 0xe5,
+0x22, 0x39, 0x40, 0x38, 0xfb, 0x90, 0x40, 0xe5, 0x22, 0x2a, 0xc0, 0x38,
+0xa7, 0xe5, 0x22, 0x27, 0xc0, 0x38, 0xb5,
};
static const struct ia64_dis_names ia64_dis_names[] = {
-{ 0x51, 40, 0, 10 },
-{ 0x31, 40, 1, 20 },
-{ 0x11, 41, 0, 19 },
-{ 0x29, 40, 0, 12 },
-{ 0x19, 40, 1, 24 },
-{ 0x9, 41, 0, 23 },
-{ 0x15, 40, 0, 14 },
-{ 0xd, 40, 1, 28 },
-{ 0x5, 41, 0, 27 },
-{ 0xb, 40, 0, 16 },
-{ 0x7, 40, 1, 32 },
-{ 0x3, 41, 0, 31 },
-{ 0x51, 38, 1, 58 },
-{ 0x50, 38, 0, 34 },
-{ 0xd1, 38, 1, 57 },
-{ 0xd0, 38, 0, 33 },
-{ 0x31, 38, 1, 68 },
-{ 0x30, 38, 1, 44 },
-{ 0x11, 39, 1, 67 },
-{ 0x10, 39, 0, 43 },
-{ 0x71, 38, 1, 66 },
-{ 0x70, 38, 1, 42 },
-{ 0x31, 39, 1, 65 },
-{ 0x30, 39, 0, 41 },
-{ 0x29, 38, 1, 60 },
-{ 0x28, 38, 0, 36 },
-{ 0x69, 38, 1, 59 },
-{ 0x68, 38, 0, 35 },
-{ 0x19, 38, 1, 72 },
-{ 0x18, 38, 1, 48 },
-{ 0x9, 39, 1, 71 },
-{ 0x8, 39, 0, 47 },
-{ 0x39, 38, 1, 70 },
-{ 0x38, 38, 1, 46 },
-{ 0x19, 39, 1, 69 },
-{ 0x18, 39, 0, 45 },
-{ 0x15, 38, 1, 62 },
-{ 0x14, 38, 0, 38 },
-{ 0x35, 38, 1, 61 },
-{ 0x34, 38, 0, 37 },
-{ 0xd, 38, 1, 76 },
-{ 0xc, 38, 1, 52 },
-{ 0x5, 39, 1, 75 },
-{ 0x4, 39, 0, 51 },
-{ 0x1d, 38, 1, 74 },
-{ 0x1c, 38, 1, 50 },
-{ 0xd, 39, 1, 73 },
-{ 0xc, 39, 0, 49 },
-{ 0xb, 38, 1, 64 },
-{ 0xa, 38, 0, 40 },
-{ 0x1b, 38, 1, 63 },
-{ 0x1a, 38, 0, 39 },
-{ 0x7, 38, 1, 80 },
-{ 0x6, 38, 1, 56 },
-{ 0x3, 39, 1, 79 },
-{ 0x2, 39, 0, 55 },
-{ 0xf, 38, 1, 78 },
-{ 0xe, 38, 1, 54 },
-{ 0x7, 39, 1, 77 },
-{ 0x6, 39, 0, 53 },
-{ 0x8, 37, 0, 82 },
-{ 0x18, 37, 0, 81 },
-{ 0x1, 37, 1, 86 },
-{ 0x2, 37, 0, 85 },
-{ 0x3, 37, 1, 84 },
-{ 0x4, 37, 0, 83 },
-{ 0x1, 293, 0, 87 },
-{ 0x20, 246, 0, 98 },
-{ 0x220, 246, 0, 94 },
-{ 0x1220, 246, 0, 91 },
-{ 0xa20, 246, 0, 92 },
-{ 0x620, 246, 0, 93 },
-{ 0x120, 246, 0, 95 },
-{ 0xa0, 246, 0, 96 },
-{ 0x60, 246, 0, 97 },
-{ 0x10, 246, 0, 102 },
-{ 0x90, 246, 0, 99 },
-{ 0x50, 246, 0, 100 },
-{ 0x30, 246, 0, 101 },
-{ 0x8, 246, 0, 103 },
-{ 0x4, 246, 0, 104 },
-{ 0x2, 246, 0, 105 },
-{ 0x1, 246, 0, 106 },
-{ 0x1, 367, 0, 108 },
-{ 0x3, 367, 0, 107 },
-{ 0x2, 373, 0, 109 },
-{ 0x1, 373, 0, 110 },
-{ 0x2, 369, 0, 111 },
-{ 0x1, 369, 0, 112 },
-{ 0x2, 371, 0, 113 },
-{ 0x1, 371, 0, 114 },
-{ 0x2, 375, 0, 115 },
-{ 0x1, 375, 0, 116 },
-{ 0x1, 225, 0, 143 },
-{ 0x5, 225, 0, 141 },
-{ 0x3, 225, 0, 142 },
-{ 0x140, 234, 0, 119 },
-{ 0x540, 234, 0, 117 },
-{ 0x340, 234, 0, 118 },
-{ 0xc0, 234, 0, 131 },
-{ 0x2c0, 234, 0, 129 },
-{ 0x1c0, 234, 0, 130 },
-{ 0x20, 234, 0, 146 },
-{ 0xa0, 234, 0, 144 },
-{ 0x60, 234, 0, 145 },
-{ 0x10, 234, 0, 158 },
-{ 0x50, 234, 0, 156 },
-{ 0x30, 234, 0, 157 },
-{ 0x8, 234, 0, 170 },
-{ 0x28, 234, 0, 168 },
-{ 0x18, 234, 0, 169 },
-{ 0x4, 234, 0, 180 },
-{ 0x2, 234, 0, 181 },
-{ 0x1, 234, 0, 182 },
-{ 0x140, 228, 0, 122 },
-{ 0x540, 228, 0, 120 },
-{ 0x340, 228, 0, 121 },
-{ 0xc0, 228, 0, 134 },
-{ 0x2c0, 228, 0, 132 },
-{ 0x1c0, 228, 0, 133 },
-{ 0x20, 228, 0, 149 },
-{ 0xa0, 228, 0, 147 },
-{ 0x60, 228, 0, 148 },
-{ 0x10, 228, 0, 161 },
-{ 0x50, 228, 0, 159 },
-{ 0x30, 228, 0, 160 },
-{ 0x8, 228, 0, 173 },
-{ 0x28, 228, 0, 171 },
-{ 0x18, 228, 0, 172 },
-{ 0x4, 228, 0, 183 },
-{ 0x2, 228, 0, 184 },
-{ 0x1, 228, 0, 185 },
-{ 0x140, 231, 0, 125 },
-{ 0x540, 231, 0, 123 },
-{ 0x340, 231, 0, 124 },
-{ 0xc0, 231, 0, 137 },
-{ 0x2c0, 231, 0, 135 },
-{ 0x1c0, 231, 0, 136 },
-{ 0x20, 231, 0, 152 },
-{ 0xa0, 231, 0, 150 },
-{ 0x60, 231, 0, 151 },
-{ 0x10, 231, 0, 164 },
-{ 0x50, 231, 0, 162 },
-{ 0x30, 231, 0, 163 },
-{ 0x8, 231, 0, 176 },
-{ 0x28, 231, 0, 174 },
-{ 0x18, 231, 0, 175 },
-{ 0x4, 231, 0, 186 },
-{ 0x2, 231, 0, 187 },
-{ 0x1, 231, 0, 188 },
-{ 0x140, 243, 0, 128 },
-{ 0x540, 243, 0, 126 },
-{ 0x340, 243, 0, 127 },
-{ 0xc0, 243, 0, 140 },
-{ 0x2c0, 243, 0, 138 },
-{ 0x1c0, 243, 0, 139 },
-{ 0x20, 243, 0, 155 },
-{ 0xa0, 243, 0, 153 },
-{ 0x60, 243, 0, 154 },
-{ 0x10, 243, 0, 167 },
-{ 0x50, 243, 0, 165 },
-{ 0x30, 243, 0, 166 },
-{ 0x8, 243, 0, 179 },
-{ 0x28, 243, 0, 177 },
-{ 0x18, 243, 0, 178 },
-{ 0x4, 243, 0, 189 },
-{ 0x2, 243, 0, 190 },
-{ 0x1, 243, 0, 191 },
-{ 0x8, 347, 0, 192 },
-{ 0x4, 347, 0, 193 },
-{ 0x2, 347, 0, 194 },
-{ 0x1, 347, 0, 195 },
-{ 0x20, 245, 0, 203 },
-{ 0x220, 245, 0, 199 },
-{ 0x1220, 245, 0, 196 },
-{ 0xa20, 245, 0, 197 },
-{ 0x620, 245, 0, 198 },
-{ 0x120, 245, 0, 200 },
-{ 0xa0, 245, 0, 201 },
-{ 0x60, 245, 0, 202 },
-{ 0x10, 245, 0, 207 },
-{ 0x90, 245, 0, 204 },
-{ 0x50, 245, 0, 205 },
-{ 0x30, 245, 0, 206 },
-{ 0x8, 245, 0, 208 },
-{ 0x4, 245, 0, 209 },
-{ 0x2, 245, 0, 210 },
-{ 0x1, 245, 0, 211 },
-{ 0x20, 244, 0, 219 },
-{ 0x220, 244, 0, 215 },
-{ 0x1220, 244, 0, 212 },
-{ 0xa20, 244, 0, 213 },
-{ 0x620, 244, 0, 214 },
-{ 0x120, 244, 0, 216 },
-{ 0xa0, 244, 0, 217 },
-{ 0x60, 244, 0, 218 },
-{ 0x10, 244, 0, 223 },
-{ 0x90, 244, 0, 220 },
-{ 0x50, 244, 0, 221 },
-{ 0x30, 244, 0, 222 },
-{ 0x8, 244, 0, 224 },
-{ 0x4, 244, 0, 225 },
-{ 0x2, 244, 0, 226 },
-{ 0x1, 244, 0, 227 },
-{ 0x140, 236, 0, 230 },
-{ 0x540, 236, 0, 228 },
-{ 0x340, 236, 0, 229 },
-{ 0xc0, 236, 0, 239 },
-{ 0x2c0, 236, 0, 237 },
-{ 0x1c0, 236, 0, 238 },
-{ 0x20, 236, 0, 248 },
-{ 0xa0, 236, 0, 246 },
-{ 0x60, 236, 0, 247 },
-{ 0x10, 236, 0, 257 },
-{ 0x50, 236, 0, 255 },
-{ 0x30, 236, 0, 256 },
-{ 0x8, 236, 0, 266 },
-{ 0x28, 236, 0, 264 },
-{ 0x18, 236, 0, 265 },
-{ 0x4, 236, 0, 273 },
-{ 0x2, 236, 0, 274 },
-{ 0x1, 236, 0, 275 },
-{ 0x140, 238, 0, 233 },
-{ 0x540, 238, 0, 231 },
-{ 0x340, 238, 0, 232 },
-{ 0xc0, 238, 0, 242 },
-{ 0x2c0, 238, 0, 240 },
-{ 0x1c0, 238, 0, 241 },
-{ 0x20, 238, 0, 251 },
-{ 0xa0, 238, 0, 249 },
-{ 0x60, 238, 0, 250 },
-{ 0x10, 238, 0, 260 },
-{ 0x50, 238, 0, 258 },
-{ 0x30, 238, 0, 259 },
-{ 0x8, 238, 0, 269 },
-{ 0x28, 238, 0, 267 },
-{ 0x18, 238, 0, 268 },
-{ 0x4, 238, 0, 276 },
-{ 0x2, 238, 0, 277 },
-{ 0x1, 238, 0, 278 },
-{ 0x140, 240, 0, 236 },
-{ 0x540, 240, 0, 234 },
-{ 0x340, 240, 0, 235 },
-{ 0xc0, 240, 0, 245 },
-{ 0x2c0, 240, 0, 243 },
-{ 0x1c0, 240, 0, 244 },
-{ 0x20, 240, 0, 254 },
-{ 0xa0, 240, 0, 252 },
-{ 0x60, 240, 0, 253 },
-{ 0x10, 240, 0, 263 },
-{ 0x50, 240, 0, 261 },
-{ 0x30, 240, 0, 262 },
-{ 0x8, 240, 0, 272 },
-{ 0x28, 240, 0, 270 },
-{ 0x18, 240, 0, 271 },
-{ 0x4, 240, 0, 279 },
-{ 0x2, 240, 0, 280 },
-{ 0x1, 240, 0, 281 },
-{ 0x140, 235, 0, 284 },
-{ 0x540, 235, 0, 282 },
-{ 0x340, 235, 0, 283 },
-{ 0xc0, 235, 0, 293 },
-{ 0x2c0, 235, 0, 291 },
-{ 0x1c0, 235, 0, 292 },
-{ 0x20, 235, 0, 302 },
-{ 0xa0, 235, 0, 300 },
-{ 0x60, 235, 0, 301 },
-{ 0x10, 235, 0, 311 },
-{ 0x50, 235, 0, 309 },
-{ 0x30, 235, 0, 310 },
-{ 0x8, 235, 0, 320 },
-{ 0x28, 235, 0, 318 },
-{ 0x18, 235, 0, 319 },
-{ 0x4, 235, 0, 327 },
-{ 0x2, 235, 0, 328 },
-{ 0x1, 235, 0, 329 },
-{ 0x140, 237, 0, 287 },
-{ 0x540, 237, 0, 285 },
-{ 0x340, 237, 0, 286 },
-{ 0xc0, 237, 0, 296 },
-{ 0x2c0, 237, 0, 294 },
-{ 0x1c0, 237, 0, 295 },
-{ 0x20, 237, 0, 305 },
-{ 0xa0, 237, 0, 303 },
-{ 0x60, 237, 0, 304 },
-{ 0x10, 237, 0, 314 },
-{ 0x50, 237, 0, 312 },
-{ 0x30, 237, 0, 313 },
-{ 0x8, 237, 0, 323 },
-{ 0x28, 237, 0, 321 },
-{ 0x18, 237, 0, 322 },
-{ 0x4, 237, 0, 330 },
-{ 0x2, 237, 0, 331 },
-{ 0x1, 237, 0, 332 },
-{ 0x140, 239, 0, 290 },
-{ 0x540, 239, 0, 288 },
-{ 0x340, 239, 0, 289 },
-{ 0xc0, 239, 0, 299 },
-{ 0x2c0, 239, 0, 297 },
-{ 0x1c0, 239, 0, 298 },
-{ 0x20, 239, 0, 308 },
-{ 0xa0, 239, 0, 306 },
-{ 0x60, 239, 0, 307 },
-{ 0x10, 239, 0, 317 },
-{ 0x50, 239, 0, 315 },
-{ 0x30, 239, 0, 316 },
-{ 0x8, 239, 0, 326 },
-{ 0x28, 239, 0, 324 },
-{ 0x18, 239, 0, 325 },
-{ 0x4, 239, 0, 333 },
-{ 0x2, 239, 0, 334 },
-{ 0x1, 239, 0, 335 },
-{ 0x1, 366, 0, 337 },
-{ 0x3, 366, 0, 336 },
-{ 0x2, 372, 0, 338 },
-{ 0x1, 372, 0, 339 },
-{ 0x2, 368, 0, 340 },
-{ 0x1, 368, 0, 341 },
-{ 0x2, 370, 0, 342 },
-{ 0x1, 370, 0, 343 },
-{ 0x2, 374, 0, 344 },
-{ 0x1, 374, 0, 345 },
-{ 0x1, 224, 0, 372 },
-{ 0x5, 224, 0, 370 },
-{ 0x3, 224, 0, 371 },
-{ 0x140, 233, 0, 348 },
-{ 0x540, 233, 0, 346 },
-{ 0x340, 233, 0, 347 },
-{ 0xc0, 233, 0, 360 },
-{ 0x2c0, 233, 0, 358 },
-{ 0x1c0, 233, 0, 359 },
-{ 0x20, 233, 0, 375 },
-{ 0xa0, 233, 0, 373 },
-{ 0x60, 233, 0, 374 },
-{ 0x10, 233, 0, 387 },
-{ 0x50, 233, 0, 385 },
-{ 0x30, 233, 0, 386 },
-{ 0x8, 233, 0, 399 },
-{ 0x28, 233, 0, 397 },
-{ 0x18, 233, 0, 398 },
-{ 0x4, 233, 0, 409 },
-{ 0x2, 233, 0, 410 },
-{ 0x1, 233, 0, 411 },
-{ 0x140, 227, 0, 351 },
-{ 0x540, 227, 0, 349 },
-{ 0x340, 227, 0, 350 },
-{ 0xc0, 227, 0, 363 },
-{ 0x2c0, 227, 0, 361 },
-{ 0x1c0, 227, 0, 362 },
-{ 0x20, 227, 0, 378 },
-{ 0xa0, 227, 0, 376 },
-{ 0x60, 227, 0, 377 },
-{ 0x10, 227, 0, 390 },
-{ 0x50, 227, 0, 388 },
-{ 0x30, 227, 0, 389 },
-{ 0x8, 227, 0, 402 },
-{ 0x28, 227, 0, 400 },
-{ 0x18, 227, 0, 401 },
-{ 0x4, 227, 0, 412 },
-{ 0x2, 227, 0, 413 },
-{ 0x1, 227, 0, 414 },
-{ 0x140, 230, 0, 354 },
-{ 0x540, 230, 0, 352 },
-{ 0x340, 230, 0, 353 },
-{ 0xc0, 230, 0, 366 },
-{ 0x2c0, 230, 0, 364 },
-{ 0x1c0, 230, 0, 365 },
-{ 0x20, 230, 0, 381 },
-{ 0xa0, 230, 0, 379 },
-{ 0x60, 230, 0, 380 },
-{ 0x10, 230, 0, 393 },
-{ 0x50, 230, 0, 391 },
-{ 0x30, 230, 0, 392 },
-{ 0x8, 230, 0, 405 },
-{ 0x28, 230, 0, 403 },
-{ 0x18, 230, 0, 404 },
-{ 0x4, 230, 0, 415 },
-{ 0x2, 230, 0, 416 },
-{ 0x1, 230, 0, 417 },
-{ 0x140, 242, 0, 357 },
-{ 0x540, 242, 0, 355 },
-{ 0x340, 242, 0, 356 },
-{ 0xc0, 242, 0, 369 },
-{ 0x2c0, 242, 0, 367 },
-{ 0x1c0, 242, 0, 368 },
-{ 0x20, 242, 0, 384 },
-{ 0xa0, 242, 0, 382 },
-{ 0x60, 242, 0, 383 },
-{ 0x10, 242, 0, 396 },
-{ 0x50, 242, 0, 394 },
-{ 0x30, 242, 0, 395 },
-{ 0x8, 242, 0, 408 },
-{ 0x28, 242, 0, 406 },
-{ 0x18, 242, 0, 407 },
-{ 0x4, 242, 0, 418 },
-{ 0x2, 242, 0, 419 },
-{ 0x1, 242, 0, 420 },
-{ 0x1, 223, 0, 447 },
-{ 0x5, 223, 0, 445 },
-{ 0x3, 223, 0, 446 },
-{ 0x140, 232, 0, 423 },
-{ 0x540, 232, 0, 421 },
-{ 0x340, 232, 0, 422 },
-{ 0xc0, 232, 0, 435 },
-{ 0x2c0, 232, 0, 433 },
-{ 0x1c0, 232, 0, 434 },
-{ 0x20, 232, 0, 450 },
-{ 0xa0, 232, 0, 448 },
-{ 0x60, 232, 0, 449 },
-{ 0x10, 232, 0, 462 },
-{ 0x50, 232, 0, 460 },
-{ 0x30, 232, 0, 461 },
-{ 0x8, 232, 0, 474 },
-{ 0x28, 232, 0, 472 },
-{ 0x18, 232, 0, 473 },
-{ 0x4, 232, 0, 484 },
-{ 0x2, 232, 0, 485 },
-{ 0x1, 232, 0, 486 },
-{ 0x140, 226, 0, 426 },
-{ 0x540, 226, 0, 424 },
-{ 0x340, 226, 0, 425 },
-{ 0xc0, 226, 0, 438 },
-{ 0x2c0, 226, 0, 436 },
-{ 0x1c0, 226, 0, 437 },
-{ 0x20, 226, 0, 453 },
-{ 0xa0, 226, 0, 451 },
-{ 0x60, 226, 0, 452 },
-{ 0x10, 226, 0, 465 },
-{ 0x50, 226, 0, 463 },
-{ 0x30, 226, 0, 464 },
-{ 0x8, 226, 0, 477 },
-{ 0x28, 226, 0, 475 },
-{ 0x18, 226, 0, 476 },
-{ 0x4, 226, 0, 487 },
-{ 0x2, 226, 0, 488 },
-{ 0x1, 226, 0, 489 },
-{ 0x140, 229, 0, 429 },
-{ 0x540, 229, 0, 427 },
-{ 0x340, 229, 0, 428 },
-{ 0xc0, 229, 0, 441 },
-{ 0x2c0, 229, 0, 439 },
-{ 0x1c0, 229, 0, 440 },
-{ 0x20, 229, 0, 456 },
-{ 0xa0, 229, 0, 454 },
-{ 0x60, 229, 0, 455 },
-{ 0x10, 229, 0, 468 },
-{ 0x50, 229, 0, 466 },
-{ 0x30, 229, 0, 467 },
-{ 0x8, 229, 0, 480 },
-{ 0x28, 229, 0, 478 },
-{ 0x18, 229, 0, 479 },
-{ 0x4, 229, 0, 490 },
-{ 0x2, 229, 0, 491 },
-{ 0x1, 229, 0, 492 },
-{ 0x140, 241, 0, 432 },
-{ 0x540, 241, 0, 430 },
-{ 0x340, 241, 0, 431 },
-{ 0xc0, 241, 0, 444 },
-{ 0x2c0, 241, 0, 442 },
-{ 0x1c0, 241, 0, 443 },
-{ 0x20, 241, 0, 459 },
-{ 0xa0, 241, 0, 457 },
-{ 0x60, 241, 0, 458 },
-{ 0x10, 241, 0, 471 },
-{ 0x50, 241, 0, 469 },
-{ 0x30, 241, 0, 470 },
-{ 0x8, 241, 0, 483 },
-{ 0x28, 241, 0, 481 },
-{ 0x18, 241, 0, 482 },
-{ 0x4, 241, 0, 493 },
-{ 0x2, 241, 0, 494 },
-{ 0x1, 241, 0, 495 },
-{ 0x8, 365, 0, 497 },
-{ 0x18, 365, 0, 496 },
-{ 0x4, 365, 0, 499 },
-{ 0xc, 365, 0, 498 },
-{ 0x2, 365, 0, 506 },
-{ 0x1, 365, 0, 507 },
-{ 0x4, 363, 0, 501 },
-{ 0xc, 363, 0, 500 },
-{ 0x2, 363, 0, 508 },
-{ 0x1, 363, 0, 509 },
-{ 0x4, 361, 0, 503 },
-{ 0xc, 361, 0, 502 },
-{ 0x2, 361, 0, 510 },
-{ 0x1, 361, 0, 511 },
-{ 0x4, 358, 0, 505 },
-{ 0xc, 358, 0, 504 },
-{ 0x2, 358, 0, 512 },
-{ 0x1, 358, 0, 513 },
-{ 0xa00, 222, 0, 528 },
-{ 0x2a00, 222, 0, 526 },
-{ 0x1a00, 222, 0, 527 },
-{ 0x600, 222, 0, 540 },
-{ 0x2600, 222, 0, 516 },
-{ 0xa600, 222, 0, 514 },
-{ 0x6600, 222, 0, 515 },
-{ 0x1600, 222, 0, 538 },
-{ 0xe00, 222, 0, 539 },
-{ 0x100, 222, 0, 552 },
-{ 0x500, 222, 0, 550 },
-{ 0x300, 222, 0, 551 },
-{ 0x80, 222, 0, 555 },
-{ 0x280, 222, 0, 553 },
-{ 0x180, 222, 0, 554 },
-{ 0x40, 222, 0, 567 },
-{ 0x140, 222, 0, 565 },
-{ 0xc0, 222, 0, 566 },
-{ 0x20, 222, 0, 579 },
-{ 0xa0, 222, 0, 577 },
-{ 0x60, 222, 0, 578 },
-{ 0x10, 222, 0, 591 },
-{ 0x50, 222, 0, 589 },
-{ 0x30, 222, 0, 590 },
-{ 0x8, 222, 0, 603 },
-{ 0x28, 222, 0, 601 },
-{ 0x18, 222, 0, 602 },
-{ 0x4, 222, 0, 613 },
-{ 0x2, 222, 0, 614 },
-{ 0x1, 222, 0, 615 },
-{ 0x500, 218, 0, 531 },
-{ 0x1500, 218, 0, 529 },
-{ 0xd00, 218, 0, 530 },
-{ 0x300, 218, 0, 543 },
-{ 0x1300, 218, 0, 519 },
-{ 0x5300, 218, 0, 517 },
-{ 0x3300, 218, 0, 518 },
-{ 0xb00, 218, 0, 541 },
-{ 0x700, 218, 0, 542 },
-{ 0x80, 218, 0, 558 },
-{ 0x280, 218, 0, 556 },
-{ 0x180, 218, 0, 557 },
-{ 0x40, 218, 0, 570 },
-{ 0x140, 218, 0, 568 },
-{ 0xc0, 218, 0, 569 },
-{ 0x20, 218, 0, 582 },
-{ 0xa0, 218, 0, 580 },
-{ 0x60, 218, 0, 581 },
-{ 0x10, 218, 0, 594 },
-{ 0x50, 218, 0, 592 },
-{ 0x30, 218, 0, 593 },
-{ 0x8, 218, 0, 606 },
-{ 0x28, 218, 0, 604 },
-{ 0x18, 218, 0, 605 },
-{ 0x4, 218, 0, 616 },
-{ 0x2, 218, 0, 617 },
-{ 0x1, 218, 0, 618 },
-{ 0x500, 215, 0, 534 },
-{ 0x1500, 215, 0, 532 },
-{ 0xd00, 215, 0, 533 },
-{ 0x300, 215, 0, 546 },
-{ 0x1300, 215, 0, 522 },
-{ 0x5300, 215, 0, 520 },
-{ 0x3300, 215, 0, 521 },
-{ 0xb00, 215, 0, 544 },
-{ 0x700, 215, 0, 545 },
-{ 0x80, 215, 0, 561 },
-{ 0x280, 215, 0, 559 },
-{ 0x180, 215, 0, 560 },
-{ 0x40, 215, 0, 573 },
-{ 0x140, 215, 0, 571 },
-{ 0xc0, 215, 0, 572 },
-{ 0x20, 215, 0, 585 },
-{ 0xa0, 215, 0, 583 },
-{ 0x60, 215, 0, 584 },
-{ 0x10, 215, 0, 597 },
-{ 0x50, 215, 0, 595 },
-{ 0x30, 215, 0, 596 },
-{ 0x8, 215, 0, 609 },
-{ 0x28, 215, 0, 607 },
-{ 0x18, 215, 0, 608 },
-{ 0x4, 215, 0, 619 },
-{ 0x2, 215, 0, 620 },
-{ 0x1, 215, 0, 621 },
-{ 0x500, 211, 0, 537 },
-{ 0x1500, 211, 0, 535 },
-{ 0xd00, 211, 0, 536 },
-{ 0x300, 211, 0, 549 },
-{ 0x1300, 211, 0, 525 },
-{ 0x5300, 211, 0, 523 },
-{ 0x3300, 211, 0, 524 },
-{ 0xb00, 211, 0, 547 },
-{ 0x700, 211, 0, 548 },
-{ 0x80, 211, 0, 564 },
-{ 0x280, 211, 0, 562 },
-{ 0x180, 211, 0, 563 },
-{ 0x40, 211, 0, 576 },
-{ 0x140, 211, 0, 574 },
-{ 0xc0, 211, 0, 575 },
-{ 0x20, 211, 0, 588 },
-{ 0xa0, 211, 0, 586 },
-{ 0x60, 211, 0, 587 },
-{ 0x10, 211, 0, 600 },
-{ 0x50, 211, 0, 598 },
-{ 0x30, 211, 0, 599 },
-{ 0x8, 211, 0, 612 },
-{ 0x28, 211, 0, 610 },
-{ 0x18, 211, 0, 611 },
-{ 0x4, 211, 0, 622 },
-{ 0x2, 211, 0, 623 },
-{ 0x1, 211, 0, 624 },
-{ 0x8, 196, 0, 625 },
-{ 0x4, 196, 0, 626 },
-{ 0x2, 196, 0, 627 },
-{ 0x1, 196, 0, 628 },
-{ 0x2, 134, 0, 631 },
-{ 0xa, 134, 0, 629 },
-{ 0x6, 134, 0, 630 },
-{ 0x1, 134, 0, 637 },
-{ 0x5, 134, 0, 635 },
-{ 0x3, 134, 0, 636 },
-{ 0x2, 133, 0, 634 },
-{ 0xa, 133, 0, 632 },
-{ 0x6, 133, 0, 633 },
-{ 0x1, 133, 0, 640 },
-{ 0x5, 133, 0, 638 },
-{ 0x3, 133, 0, 639 },
-{ 0x4, 398, 0, 641 },
-{ 0x2, 398, 0, 642 },
-{ 0x1, 398, 0, 643 },
-{ 0x4, 397, 0, 644 },
-{ 0x2, 397, 0, 645 },
-{ 0x1, 397, 0, 646 },
-{ 0x4, 396, 0, 647 },
-{ 0x2, 396, 0, 648 },
-{ 0x1, 396, 0, 649 },
-{ 0x4, 395, 0, 650 },
-{ 0x2, 395, 0, 651 },
-{ 0x1, 395, 0, 652 },
-{ 0x2, 92, 0, 655 },
-{ 0xa, 92, 0, 653 },
-{ 0x6, 92, 0, 654 },
-{ 0x1, 92, 0, 670 },
-{ 0x5, 92, 0, 668 },
-{ 0x3, 92, 0, 669 },
-{ 0x2, 96, 0, 658 },
-{ 0xa, 96, 0, 656 },
-{ 0x6, 96, 0, 657 },
-{ 0x1, 96, 0, 673 },
-{ 0x5, 96, 0, 671 },
-{ 0x3, 96, 0, 672 },
-{ 0x2, 95, 0, 661 },
-{ 0xa, 95, 0, 659 },
-{ 0x6, 95, 0, 660 },
-{ 0x1, 95, 0, 676 },
-{ 0x5, 95, 0, 674 },
-{ 0x3, 95, 0, 675 },
-{ 0x2, 94, 0, 664 },
-{ 0xa, 94, 0, 662 },
-{ 0x6, 94, 0, 663 },
-{ 0x1, 94, 0, 679 },
-{ 0x5, 94, 0, 677 },
-{ 0x3, 94, 0, 678 },
-{ 0x2, 93, 0, 667 },
-{ 0xa, 93, 0, 665 },
-{ 0x6, 93, 0, 666 },
-{ 0x1, 93, 0, 682 },
-{ 0x5, 93, 0, 680 },
-{ 0x3, 93, 0, 681 },
-{ 0x4, 359, 0, 686 },
-{ 0xc, 359, 0, 685 },
-{ 0x2, 359, 0, 695 },
-{ 0x1, 359, 0, 696 },
-{ 0x8, 364, 0, 684 },
-{ 0x18, 364, 0, 683 },
-{ 0x4, 364, 0, 688 },
-{ 0xc, 364, 0, 687 },
-{ 0x2, 364, 0, 697 },
-{ 0x1, 364, 0, 698 },
-{ 0x4, 362, 0, 690 },
-{ 0xc, 362, 0, 689 },
-{ 0x2, 362, 0, 699 },
-{ 0x1, 362, 0, 700 },
-{ 0x4, 360, 0, 692 },
-{ 0xc, 360, 0, 691 },
-{ 0x2, 360, 0, 701 },
-{ 0x1, 360, 0, 702 },
-{ 0x4, 357, 0, 694 },
-{ 0xc, 357, 0, 693 },
-{ 0x2, 357, 0, 703 },
-{ 0x1, 357, 0, 704 },
-{ 0xa00, 221, 0, 719 },
-{ 0x2a00, 221, 0, 717 },
-{ 0x1a00, 221, 0, 718 },
-{ 0x600, 221, 0, 731 },
-{ 0x2600, 221, 0, 707 },
-{ 0xa600, 221, 0, 705 },
-{ 0x6600, 221, 0, 706 },
-{ 0x1600, 221, 0, 729 },
-{ 0xe00, 221, 0, 730 },
-{ 0x100, 221, 0, 743 },
-{ 0x500, 221, 0, 741 },
-{ 0x300, 221, 0, 742 },
-{ 0x80, 221, 0, 746 },
-{ 0x280, 221, 0, 744 },
-{ 0x180, 221, 0, 745 },
-{ 0x40, 221, 0, 758 },
-{ 0x140, 221, 0, 756 },
-{ 0xc0, 221, 0, 757 },
-{ 0x20, 221, 0, 770 },
-{ 0xa0, 221, 0, 768 },
-{ 0x60, 221, 0, 769 },
-{ 0x10, 221, 0, 782 },
-{ 0x50, 221, 0, 780 },
-{ 0x30, 221, 0, 781 },
-{ 0x8, 221, 0, 794 },
-{ 0x28, 221, 0, 792 },
-{ 0x18, 221, 0, 793 },
-{ 0x4, 221, 0, 804 },
-{ 0x2, 221, 0, 805 },
-{ 0x1, 221, 0, 806 },
-{ 0x500, 217, 0, 722 },
-{ 0x1500, 217, 0, 720 },
-{ 0xd00, 217, 0, 721 },
-{ 0x300, 217, 0, 734 },
-{ 0x1300, 217, 0, 710 },
-{ 0x5300, 217, 0, 708 },
-{ 0x3300, 217, 0, 709 },
-{ 0xb00, 217, 0, 732 },
-{ 0x700, 217, 0, 733 },
-{ 0x80, 217, 0, 749 },
-{ 0x280, 217, 0, 747 },
-{ 0x180, 217, 0, 748 },
-{ 0x40, 217, 0, 761 },
-{ 0x140, 217, 0, 759 },
-{ 0xc0, 217, 0, 760 },
-{ 0x20, 217, 0, 773 },
-{ 0xa0, 217, 0, 771 },
-{ 0x60, 217, 0, 772 },
-{ 0x10, 217, 0, 785 },
-{ 0x50, 217, 0, 783 },
-{ 0x30, 217, 0, 784 },
-{ 0x8, 217, 0, 797 },
-{ 0x28, 217, 0, 795 },
-{ 0x18, 217, 0, 796 },
-{ 0x4, 217, 0, 807 },
-{ 0x2, 217, 0, 808 },
-{ 0x1, 217, 0, 809 },
-{ 0x500, 214, 0, 725 },
-{ 0x1500, 214, 0, 723 },
-{ 0xd00, 214, 0, 724 },
-{ 0x300, 214, 0, 737 },
-{ 0x1300, 214, 0, 713 },
-{ 0x5300, 214, 0, 711 },
-{ 0x3300, 214, 0, 712 },
-{ 0xb00, 214, 0, 735 },
-{ 0x700, 214, 0, 736 },
-{ 0x80, 214, 0, 752 },
-{ 0x280, 214, 0, 750 },
-{ 0x180, 214, 0, 751 },
-{ 0x40, 214, 0, 764 },
-{ 0x140, 214, 0, 762 },
-{ 0xc0, 214, 0, 763 },
-{ 0x20, 214, 0, 776 },
-{ 0xa0, 214, 0, 774 },
-{ 0x60, 214, 0, 775 },
-{ 0x10, 214, 0, 788 },
-{ 0x50, 214, 0, 786 },
-{ 0x30, 214, 0, 787 },
-{ 0x8, 214, 0, 800 },
-{ 0x28, 214, 0, 798 },
-{ 0x18, 214, 0, 799 },
-{ 0x4, 214, 0, 810 },
-{ 0x2, 214, 0, 811 },
-{ 0x1, 214, 0, 812 },
-{ 0x500, 210, 0, 728 },
-{ 0x1500, 210, 0, 726 },
-{ 0xd00, 210, 0, 727 },
-{ 0x300, 210, 0, 740 },
-{ 0x1300, 210, 0, 716 },
-{ 0x5300, 210, 0, 714 },
-{ 0x3300, 210, 0, 715 },
-{ 0xb00, 210, 0, 738 },
-{ 0x700, 210, 0, 739 },
-{ 0x80, 210, 0, 755 },
-{ 0x280, 210, 0, 753 },
-{ 0x180, 210, 0, 754 },
-{ 0x40, 210, 0, 767 },
-{ 0x140, 210, 0, 765 },
-{ 0xc0, 210, 0, 766 },
-{ 0x20, 210, 0, 779 },
-{ 0xa0, 210, 0, 777 },
-{ 0x60, 210, 0, 778 },
-{ 0x10, 210, 0, 791 },
-{ 0x50, 210, 0, 789 },
-{ 0x30, 210, 0, 790 },
-{ 0x8, 210, 0, 803 },
-{ 0x28, 210, 0, 801 },
-{ 0x18, 210, 0, 802 },
-{ 0x4, 210, 0, 813 },
-{ 0x2, 210, 0, 814 },
-{ 0x1, 210, 0, 815 },
-{ 0x8, 212, 0, 858 },
-{ 0x28, 212, 0, 856 },
-{ 0x18, 212, 0, 857 },
-{ 0x4, 212, 0, 919 },
-{ 0x2, 212, 0, 920 },
-{ 0x1, 212, 0, 921 },
-{ 0xa00, 219, 0, 831 },
-{ 0x2a00, 219, 0, 829 },
-{ 0x1a00, 219, 0, 830 },
-{ 0x600, 219, 0, 843 },
-{ 0x2600, 219, 0, 819 },
-{ 0xa600, 219, 0, 817 },
-{ 0x6600, 219, 0, 818 },
-{ 0x1600, 219, 0, 841 },
-{ 0xe00, 219, 0, 842 },
-{ 0x100, 219, 0, 855 },
-{ 0x500, 219, 0, 853 },
-{ 0x300, 219, 0, 854 },
-{ 0x80, 219, 0, 861 },
-{ 0x280, 219, 0, 859 },
-{ 0x180, 219, 0, 860 },
-{ 0x40, 219, 0, 873 },
-{ 0x140, 219, 0, 871 },
-{ 0xc0, 219, 0, 872 },
-{ 0x20, 219, 0, 885 },
-{ 0xa0, 219, 0, 883 },
-{ 0x60, 219, 0, 884 },
-{ 0x10, 219, 0, 897 },
-{ 0x50, 219, 0, 895 },
-{ 0x30, 219, 0, 896 },
-{ 0x8, 219, 0, 909 },
-{ 0x28, 219, 0, 907 },
-{ 0x18, 219, 0, 908 },
-{ 0x4, 219, 0, 922 },
-{ 0x2, 219, 0, 923 },
-{ 0x1, 219, 1, 924 },
-{ 0x1, 220, 0, 816 },
-{ 0x500, 216, 0, 834 },
-{ 0x1500, 216, 0, 832 },
-{ 0xd00, 216, 0, 833 },
-{ 0x300, 216, 0, 846 },
-{ 0x1300, 216, 0, 822 },
-{ 0x5300, 216, 0, 820 },
-{ 0x3300, 216, 0, 821 },
-{ 0xb00, 216, 0, 844 },
-{ 0x700, 216, 0, 845 },
-{ 0x80, 216, 0, 864 },
-{ 0x280, 216, 0, 862 },
-{ 0x180, 216, 0, 863 },
-{ 0x40, 216, 0, 876 },
-{ 0x140, 216, 0, 874 },
-{ 0xc0, 216, 0, 875 },
-{ 0x20, 216, 0, 888 },
-{ 0xa0, 216, 0, 886 },
-{ 0x60, 216, 0, 887 },
-{ 0x10, 216, 0, 900 },
-{ 0x50, 216, 0, 898 },
-{ 0x30, 216, 0, 899 },
-{ 0x8, 216, 0, 912 },
-{ 0x28, 216, 0, 910 },
-{ 0x18, 216, 0, 911 },
-{ 0x4, 216, 0, 925 },
-{ 0x2, 216, 0, 926 },
-{ 0x1, 216, 0, 927 },
-{ 0x500, 213, 0, 837 },
-{ 0x1500, 213, 0, 835 },
-{ 0xd00, 213, 0, 836 },
-{ 0x300, 213, 0, 849 },
-{ 0x1300, 213, 0, 825 },
-{ 0x5300, 213, 0, 823 },
-{ 0x3300, 213, 0, 824 },
-{ 0xb00, 213, 0, 847 },
-{ 0x700, 213, 0, 848 },
-{ 0x80, 213, 0, 867 },
-{ 0x280, 213, 0, 865 },
-{ 0x180, 213, 0, 866 },
-{ 0x40, 213, 0, 879 },
-{ 0x140, 213, 0, 877 },
-{ 0xc0, 213, 0, 878 },
-{ 0x20, 213, 0, 891 },
-{ 0xa0, 213, 0, 889 },
-{ 0x60, 213, 0, 890 },
-{ 0x10, 213, 0, 903 },
-{ 0x50, 213, 0, 901 },
-{ 0x30, 213, 0, 902 },
-{ 0x8, 213, 0, 915 },
-{ 0x28, 213, 0, 913 },
-{ 0x18, 213, 0, 914 },
-{ 0x4, 213, 0, 928 },
-{ 0x2, 213, 0, 929 },
-{ 0x1, 213, 0, 930 },
-{ 0x500, 209, 0, 840 },
-{ 0x1500, 209, 0, 838 },
-{ 0xd00, 209, 0, 839 },
-{ 0x300, 209, 0, 852 },
-{ 0x1300, 209, 0, 828 },
-{ 0x5300, 209, 0, 826 },
-{ 0x3300, 209, 0, 827 },
-{ 0xb00, 209, 0, 850 },
-{ 0x700, 209, 0, 851 },
-{ 0x80, 209, 0, 870 },
-{ 0x280, 209, 0, 868 },
-{ 0x180, 209, 0, 869 },
-{ 0x40, 209, 0, 882 },
-{ 0x140, 209, 0, 880 },
-{ 0xc0, 209, 0, 881 },
-{ 0x20, 209, 0, 894 },
-{ 0xa0, 209, 0, 892 },
-{ 0x60, 209, 0, 893 },
-{ 0x10, 209, 0, 906 },
-{ 0x50, 209, 0, 904 },
-{ 0x30, 209, 0, 905 },
-{ 0x8, 209, 0, 918 },
-{ 0x28, 209, 0, 916 },
-{ 0x18, 209, 0, 917 },
-{ 0x4, 209, 0, 931 },
-{ 0x2, 209, 0, 932 },
-{ 0x1, 209, 0, 933 },
-{ 0x2, 114, 0, 935 },
-{ 0x1, 114, 0, 936 },
-{ 0x1, 49, 0, 937 },
-{ 0x3, 48, 0, 938 },
-{ 0x1, 384, 0, 939 },
-{ 0x1, 390, 0, 940 },
-{ 0x2, 343, 0, 943 },
-{ 0x1, 343, 0, 944 },
-{ 0x2, 341, 0, 945 },
-{ 0x1, 341, 0, 946 },
-{ 0x1, 340, 0, 947 },
-{ 0x1, 285, 0, 952 },
-{ 0x1, 284, 0, 953 },
-{ 0x1, 283, 0, 954 },
-{ 0x1, 282, 0, 955 },
-{ 0x1, 208, 0, 956 },
-{ 0x1, 207, 0, 957 },
-{ 0x1, 281, 0, 958 },
-{ 0x1, 280, 0, 959 },
-{ 0x1, 279, 0, 960 },
-{ 0x1, 278, 0, 961 },
-{ 0x1, 277, 0, 962 },
-{ 0x1, 276, 0, 963 },
-{ 0x1, 275, 0, 964 },
-{ 0x2, 206, 0, 965 },
-{ 0x1, 206, 0, 966 },
-{ 0x2, 323, 0, 972 },
-{ 0x1, 323, 0, 973 },
-{ 0x1, 274, 0, 974 },
-{ 0x1, 273, 0, 975 },
-{ 0x1, 272, 0, 976 },
-{ 0x1, 271, 0, 977 },
-{ 0x1, 8, 0, 978 },
-{ 0x1, 270, 0, 979 },
-{ 0x1, 269, 0, 980 },
-{ 0x1, 268, 0, 981 },
-{ 0x1, 267, 0, 982 },
-{ 0x1, 345, 0, 983 },
-{ 0x1, 356, 0, 984 },
-{ 0x1, 346, 0, 985 },
-{ 0x1, 379, 0, 986 },
-{ 0x1, 266, 0, 990 },
-{ 0x1, 205, 0, 991 },
-{ 0x1, 135, 0, 994 },
-{ 0x2, 248, 0, 998 },
-{ 0x1, 248, 0, 999 },
-{ 0x1, 194, 0, 1000 },
-{ 0x5, 47, 0, 1002 },
-{ 0x3, 47, 0, 1003 },
-{ 0x5, 46, 0, 1004 },
-{ 0x3, 46, 0, 1005 },
-{ 0x1, 322, 0, 1006 },
-{ 0x1, 330, 0, 1007 },
-{ 0x1, 328, 0, 1008 },
-{ 0x1, 349, 0, 1009 },
-{ 0x1, 329, 0, 1010 },
-{ 0x1, 327, 0, 1011 },
-{ 0x2, 335, 0, 1012 },
-{ 0x1, 335, 0, 1014 },
-{ 0x2, 333, 0, 1013 },
-{ 0x1, 333, 0, 1015 },
-{ 0x2, 353, 0, 1016 },
-{ 0x1, 353, 0, 1019 },
-{ 0x2, 334, 0, 1017 },
-{ 0x1, 334, 0, 1020 },
-{ 0x2, 332, 0, 1018 },
-{ 0x1, 332, 0, 1021 },
-{ 0x1, 295, 0, 1022 },
-{ 0x1, 294, 0, 1023 },
-{ 0x1, 326, 0, 1024 },
-{ 0x1, 317, 0, 1025 },
-{ 0x1, 319, 0, 1026 },
-{ 0x1, 316, 0, 1027 },
-{ 0x1, 318, 0, 1028 },
-{ 0x2, 394, 0, 1029 },
-{ 0x1, 394, 0, 1032 },
-{ 0x2, 393, 0, 1030 },
-{ 0x1, 393, 0, 1033 },
-{ 0x2, 392, 0, 1031 },
-{ 0x1, 392, 0, 1034 },
-{ 0x1, 305, 0, 1035 },
-{ 0x2, 304, 0, 1036 },
-{ 0x1, 304, 0, 1037 },
-{ 0x2, 251, 0, 1038 },
-{ 0x1, 251, 0, 1041 },
-{ 0x2, 250, 0, 1039 },
-{ 0x1, 250, 0, 1042 },
-{ 0x2, 249, 0, 1040 },
-{ 0x1, 249, 0, 1043 },
-{ 0x2, 320, 0, 1044 },
-{ 0x1, 320, 0, 1045 },
-{ 0x2, 321, 0, 1046 },
-{ 0x1, 321, 0, 1047 },
-{ 0xa, 388, 1, 1053 },
-{ 0xa, 389, 0, 1052 },
-{ 0x1a, 388, 1, 1049 },
-{ 0x32, 389, 0, 1048 },
-{ 0x6, 388, 1, 1057 },
-{ 0x6, 389, 0, 1056 },
-{ 0x1, 388, 1, 1063 },
-{ 0x1, 389, 0, 1062 },
-{ 0x9, 388, 1, 1055 },
-{ 0x9, 389, 0, 1054 },
-{ 0x19, 388, 1, 1051 },
-{ 0x31, 389, 0, 1050 },
-{ 0x5, 388, 1, 1059 },
-{ 0x5, 389, 0, 1058 },
-{ 0x3, 388, 1, 1061 },
-{ 0x3, 389, 0, 1060 },
-{ 0xa, 385, 1, 1069 },
-{ 0xa, 386, 0, 1068 },
-{ 0x1a, 385, 1, 1065 },
-{ 0x32, 386, 0, 1064 },
-{ 0x6, 385, 1, 1073 },
-{ 0x6, 386, 0, 1072 },
-{ 0x1, 385, 1, 1079 },
-{ 0x1, 386, 0, 1078 },
-{ 0x9, 385, 1, 1071 },
-{ 0x9, 386, 0, 1070 },
-{ 0x19, 385, 1, 1067 },
-{ 0x31, 386, 0, 1066 },
-{ 0x5, 385, 1, 1075 },
-{ 0x5, 386, 0, 1074 },
-{ 0x3, 385, 1, 1077 },
-{ 0x3, 386, 0, 1076 },
-{ 0x1, 103, 0, 1080 },
-{ 0x1, 102, 0, 1081 },
-{ 0x1, 348, 1, 1083 },
-{ 0x1, 101, 0, 1082 },
-{ 0x2, 352, 1, 1085 },
-{ 0x2, 105, 0, 1084 },
-{ 0x1, 352, 1, 1087 },
-{ 0x1, 105, 0, 1086 },
-{ 0x1, 354, 0, 1088 },
-{ 0x1, 100, 0, 1089 },
-{ 0x2, 99, 0, 1090 },
-{ 0x2, 98, 0, 1091 },
-{ 0x1, 406, 1, 1097 },
-{ 0x1, 204, 0, 992 },
-{ 0x1, 405, 0, 1098 },
-{ 0x1, 404, 1, 1099 },
-{ 0x1, 203, 0, 1001 },
-{ 0x1, 265, 0, 1100 },
-{ 0x1, 264, 1, 1101 },
-{ 0x1, 247, 0, 993 },
-{ 0x1, 263, 0, 1102 },
-{ 0x1, 262, 1, 1103 },
-{ 0x1, 383, 0, 995 },
-{ 0x1, 261, 1, 1104 },
-{ 0x1, 355, 0, 997 },
-{ 0x1, 260, 0, 1105 },
-{ 0x1, 259, 0, 1106 },
-{ 0x1, 258, 1, 1107 },
-{ 0x2, 355, 0, 996 },
-{ 0x10, 257, 0, 1111 },
-{ 0x90, 257, 0, 1109 },
-{ 0x190, 257, 0, 1108 },
-{ 0x50, 257, 0, 1110 },
-{ 0x30, 257, 0, 1113 },
-{ 0x70, 257, 0, 1112 },
-{ 0x8, 257, 0, 1115 },
-{ 0x18, 257, 0, 1114 },
-{ 0x4, 257, 0, 1116 },
-{ 0x1, 257, 0, 1119 },
-{ 0x3, 257, 0, 1118 },
-{ 0x1, 256, 1, 1120 },
-{ 0x2, 257, 0, 1117 },
-{ 0x3, 45, 0, 1121 },
-{ 0x1, 199, 1, 1122 },
-{ 0x1, 200, 1, 987 },
-{ 0x1, 201, 0, 88 },
-{ 0x1, 298, 1, 1123 },
-{ 0x1, 299, 1, 988 },
-{ 0x1, 300, 0, 89 },
-{ 0x1, 33, 1, 1124 },
-{ 0x1, 34, 1, 989 },
-{ 0x1, 35, 0, 90 },
-{ 0x1, 188, 0, 1125 },
-{ 0x4, 399, 0, 1126 },
-{ 0x2, 399, 0, 1127 },
-{ 0x1, 399, 1, 1129 },
-{ 0x1, 400, 0, 1128 },
-{ 0x8, 401, 0, 1130 },
-{ 0x4, 401, 0, 1131 },
-{ 0x1, 401, 1, 1133 },
-{ 0x2, 401, 0, 1132 },
-{ 0x8, 177, 0, 1134 },
-{ 0x4, 177, 0, 1135 },
-{ 0x2, 177, 0, 1136 },
-{ 0x1, 177, 1, 1138 },
-{ 0x1, 178, 0, 1137 },
-{ 0x10, 179, 0, 1139 },
-{ 0x8, 179, 0, 1140 },
-{ 0x4, 179, 0, 1141 },
-{ 0x1, 179, 1, 1143 },
-{ 0x2, 179, 0, 1142 },
-{ 0x220, 149, 0, 1144 },
-{ 0x120, 149, 0, 1145 },
-{ 0xa0, 149, 0, 1146 },
-{ 0x60, 149, 1, 1148 },
-{ 0x4, 150, 0, 1147 },
-{ 0x110, 149, 0, 1154 },
-{ 0x90, 149, 0, 1155 },
-{ 0x50, 149, 0, 1156 },
-{ 0x30, 149, 1, 1158 },
-{ 0x2, 150, 0, 1157 },
-{ 0x8, 149, 0, 1159 },
-{ 0x4, 149, 0, 1160 },
-{ 0x2, 149, 0, 1161 },
-{ 0x1, 149, 1, 1163 },
-{ 0x1, 150, 0, 1162 },
-{ 0x440, 151, 0, 1149 },
-{ 0x240, 151, 0, 1150 },
-{ 0x140, 151, 0, 1151 },
-{ 0xc0, 151, 1, 1153 },
-{ 0x40, 151, 0, 1152 },
-{ 0x220, 151, 0, 1164 },
-{ 0x120, 151, 0, 1165 },
-{ 0xa0, 151, 0, 1166 },
-{ 0x60, 151, 1, 1168 },
-{ 0x20, 151, 0, 1167 },
-{ 0x10, 151, 0, 1169 },
-{ 0x8, 151, 0, 1170 },
-{ 0x4, 151, 0, 1171 },
-{ 0x1, 151, 1, 1173 },
-{ 0x2, 151, 0, 1172 },
-{ 0x8, 173, 0, 1174 },
-{ 0x4, 173, 0, 1175 },
-{ 0x2, 173, 0, 1176 },
-{ 0x1, 173, 1, 1178 },
-{ 0x1, 174, 0, 1177 },
-{ 0x220, 145, 0, 1179 },
-{ 0x120, 145, 0, 1180 },
-{ 0xa0, 145, 0, 1181 },
-{ 0x60, 145, 1, 1183 },
-{ 0x4, 146, 0, 1182 },
-{ 0x110, 145, 0, 1189 },
-{ 0x90, 145, 0, 1190 },
-{ 0x50, 145, 0, 1191 },
-{ 0x30, 145, 1, 1193 },
-{ 0x2, 146, 0, 1192 },
-{ 0x8, 145, 0, 1194 },
-{ 0x4, 145, 0, 1195 },
-{ 0x2, 145, 0, 1196 },
-{ 0x1, 145, 1, 1198 },
-{ 0x1, 146, 0, 1197 },
-{ 0x440, 191, 0, 1184 },
-{ 0x240, 191, 0, 1185 },
-{ 0x140, 191, 0, 1186 },
-{ 0xc0, 191, 1, 1188 },
-{ 0x40, 191, 0, 1187 },
-{ 0x220, 191, 0, 1199 },
-{ 0x120, 191, 0, 1200 },
-{ 0xa0, 191, 0, 1201 },
-{ 0x60, 191, 1, 1203 },
-{ 0x20, 191, 0, 1202 },
-{ 0x10, 191, 0, 1204 },
-{ 0x8, 191, 0, 1205 },
-{ 0x4, 191, 0, 1206 },
-{ 0x1, 191, 1, 1208 },
-{ 0x2, 191, 0, 1207 },
-{ 0x8, 165, 0, 1209 },
-{ 0x4, 165, 0, 1210 },
-{ 0x2, 165, 0, 1211 },
-{ 0x1, 165, 1, 1213 },
-{ 0x1, 166, 0, 1212 },
-{ 0x10, 172, 0, 1214 },
-{ 0x8, 172, 0, 1215 },
-{ 0x4, 172, 0, 1216 },
-{ 0x1, 172, 1, 1218 },
-{ 0x2, 172, 0, 1217 },
-{ 0x220, 136, 0, 1219 },
-{ 0x120, 136, 0, 1220 },
-{ 0xa0, 136, 0, 1221 },
-{ 0x60, 136, 1, 1223 },
-{ 0x4, 137, 0, 1222 },
-{ 0x110, 136, 0, 1244 },
-{ 0x90, 136, 0, 1245 },
-{ 0x50, 136, 0, 1246 },
-{ 0x30, 136, 1, 1248 },
-{ 0x2, 137, 0, 1247 },
-{ 0x8, 136, 0, 1249 },
-{ 0x4, 136, 0, 1250 },
-{ 0x2, 136, 0, 1251 },
-{ 0x1, 136, 1, 1253 },
-{ 0x1, 137, 0, 1252 },
-{ 0x440, 144, 0, 1224 },
-{ 0x240, 144, 0, 1225 },
-{ 0x140, 144, 0, 1226 },
-{ 0xc0, 144, 1, 1228 },
-{ 0x40, 144, 0, 1227 },
-{ 0x220, 144, 0, 1254 },
-{ 0x120, 144, 0, 1255 },
-{ 0xa0, 144, 0, 1256 },
-{ 0x60, 144, 1, 1258 },
-{ 0x20, 144, 0, 1257 },
-{ 0x10, 144, 0, 1259 },
-{ 0x8, 144, 0, 1260 },
-{ 0x4, 144, 0, 1261 },
-{ 0x1, 144, 1, 1263 },
-{ 0x2, 144, 0, 1262 },
-{ 0x440, 107, 0, 1229 },
-{ 0x240, 107, 0, 1230 },
-{ 0x140, 107, 0, 1231 },
-{ 0xc0, 107, 1, 1233 },
-{ 0x40, 107, 0, 1232 },
-{ 0x220, 107, 0, 1264 },
-{ 0x120, 107, 0, 1265 },
-{ 0xa0, 107, 0, 1266 },
-{ 0x60, 107, 1, 1268 },
-{ 0x20, 107, 0, 1267 },
-{ 0x10, 107, 0, 1269 },
-{ 0x8, 107, 0, 1270 },
-{ 0x1, 107, 1, 1273 },
-{ 0x2, 107, 0, 1272 },
-{ 0x440, 152, 1, 1239 },
-{ 0x441, 132, 0, 1234 },
-{ 0x240, 152, 1, 1240 },
-{ 0x241, 132, 0, 1235 },
-{ 0x140, 152, 1, 1241 },
-{ 0x141, 132, 0, 1236 },
-{ 0xc0, 152, 1, 1243 },
-{ 0x40, 152, 1, 1242 },
-{ 0xc1, 132, 1, 1238 },
-{ 0x41, 132, 0, 1237 },
-{ 0x220, 152, 1, 1284 },
-{ 0x221, 132, 0, 1274 },
-{ 0x120, 152, 1, 1285 },
-{ 0x121, 132, 0, 1275 },
-{ 0xa0, 152, 1, 1286 },
-{ 0xa1, 132, 0, 1276 },
-{ 0x60, 152, 1, 1288 },
-{ 0x20, 152, 1, 1287 },
-{ 0x61, 132, 1, 1278 },
-{ 0x21, 132, 0, 1277 },
-{ 0x10, 152, 1, 1289 },
-{ 0x11, 132, 0, 1279 },
-{ 0x8, 152, 1, 1290 },
-{ 0x9, 132, 0, 1280 },
-{ 0x4, 152, 1, 1291 },
-{ 0x5, 132, 0, 1281 },
-{ 0x1, 152, 1, 1293 },
-{ 0x2, 152, 1, 1292 },
-{ 0x3, 132, 1, 1283 },
-{ 0x1, 132, 0, 1282 },
-{ 0x1, 117, 1, 1297 },
-{ 0x1, 118, 0, 1296 },
-{ 0x3, 117, 1, 1295 },
-{ 0x3, 118, 0, 1294 },
-{ 0x1108, 121, 1, 1378 },
-{ 0x1108, 125, 0, 1298 },
-{ 0x908, 121, 1, 1379 },
-{ 0x908, 125, 0, 1299 },
-{ 0x508, 121, 1, 1380 },
-{ 0x508, 125, 0, 1300 },
-{ 0x308, 121, 1, 1382 },
-{ 0x18, 122, 1, 1381 },
-{ 0x308, 125, 1, 1302 },
-{ 0x18, 126, 0, 1301 },
-{ 0x88, 121, 1, 1398 },
-{ 0x88, 125, 0, 1338 },
-{ 0x48, 121, 1, 1399 },
-{ 0x48, 125, 0, 1339 },
-{ 0x28, 121, 1, 1400 },
-{ 0x28, 125, 0, 1340 },
-{ 0x18, 121, 1, 1402 },
-{ 0x8, 122, 1, 1401 },
-{ 0x18, 125, 1, 1342 },
-{ 0x8, 126, 0, 1341 },
-{ 0x884, 121, 1, 1383 },
-{ 0x442, 123, 1, 1328 },
-{ 0x884, 125, 1, 1313 },
-{ 0x442, 127, 0, 1303 },
-{ 0x484, 121, 1, 1384 },
-{ 0x242, 123, 1, 1329 },
-{ 0x484, 125, 1, 1314 },
-{ 0x242, 127, 0, 1304 },
-{ 0x284, 121, 1, 1385 },
-{ 0x142, 123, 1, 1330 },
-{ 0x284, 125, 1, 1315 },
-{ 0x142, 127, 0, 1305 },
-{ 0x184, 121, 1, 1387 },
-{ 0xc, 122, 1, 1386 },
-{ 0xc2, 123, 1, 1332 },
-{ 0x6, 124, 1, 1331 },
-{ 0x184, 125, 1, 1317 },
-{ 0xc, 126, 1, 1316 },
-{ 0xc2, 127, 1, 1307 },
-{ 0x6, 128, 0, 1306 },
-{ 0x44, 121, 1, 1403 },
-{ 0x22, 123, 1, 1368 },
-{ 0x44, 125, 1, 1353 },
-{ 0x22, 127, 0, 1343 },
-{ 0x24, 121, 1, 1404 },
-{ 0x12, 123, 1, 1369 },
-{ 0x24, 125, 1, 1354 },
-{ 0x12, 127, 0, 1344 },
-{ 0x14, 121, 1, 1405 },
-{ 0xa, 123, 1, 1370 },
-{ 0x14, 125, 1, 1355 },
-{ 0xa, 127, 0, 1345 },
-{ 0xc, 121, 1, 1407 },
-{ 0x4, 122, 1, 1406 },
-{ 0x6, 123, 1, 1372 },
-{ 0x2, 124, 1, 1371 },
-{ 0xc, 125, 1, 1357 },
-{ 0x4, 126, 1, 1356 },
-{ 0x6, 127, 1, 1347 },
-{ 0x2, 128, 0, 1346 },
-{ 0x442, 121, 1, 1388 },
-{ 0x221, 123, 1, 1333 },
-{ 0x442, 125, 1, 1318 },
-{ 0x221, 127, 0, 1308 },
-{ 0x242, 121, 1, 1389 },
-{ 0x121, 123, 1, 1334 },
-{ 0x242, 125, 1, 1319 },
-{ 0x121, 127, 0, 1309 },
-{ 0x142, 121, 1, 1390 },
-{ 0xa1, 123, 1, 1335 },
-{ 0x142, 125, 1, 1320 },
-{ 0xa1, 127, 0, 1310 },
-{ 0xc2, 121, 1, 1392 },
-{ 0x6, 122, 1, 1391 },
-{ 0x61, 123, 1, 1337 },
-{ 0x3, 124, 1, 1336 },
-{ 0xc2, 125, 1, 1322 },
-{ 0x6, 126, 1, 1321 },
-{ 0x61, 127, 1, 1312 },
-{ 0x3, 128, 0, 1311 },
-{ 0x22, 121, 1, 1408 },
-{ 0x11, 123, 1, 1373 },
-{ 0x22, 125, 1, 1358 },
-{ 0x11, 127, 0, 1348 },
-{ 0x12, 121, 1, 1409 },
-{ 0x9, 123, 1, 1374 },
-{ 0x12, 125, 1, 1359 },
-{ 0x9, 127, 0, 1349 },
-{ 0xa, 121, 1, 1410 },
-{ 0x5, 123, 1, 1375 },
-{ 0xa, 125, 1, 1360 },
-{ 0x5, 127, 0, 1350 },
-{ 0x6, 121, 1, 1412 },
-{ 0x2, 122, 1, 1411 },
-{ 0x3, 123, 1, 1377 },
-{ 0x1, 124, 1, 1376 },
-{ 0x6, 125, 1, 1362 },
-{ 0x2, 126, 1, 1361 },
-{ 0x3, 127, 1, 1352 },
-{ 0x1, 128, 0, 1351 },
-{ 0x221, 121, 1, 1393 },
-{ 0x221, 125, 0, 1323 },
-{ 0x121, 121, 1, 1394 },
-{ 0x121, 125, 0, 1324 },
-{ 0xa1, 121, 1, 1395 },
-{ 0xa1, 125, 0, 1325 },
-{ 0x61, 121, 1, 1397 },
-{ 0x3, 122, 1, 1396 },
-{ 0x61, 125, 1, 1327 },
-{ 0x3, 126, 0, 1326 },
-{ 0x11, 121, 1, 1413 },
-{ 0x11, 125, 0, 1363 },
-{ 0x9, 121, 1, 1414 },
-{ 0x9, 125, 0, 1364 },
-{ 0x5, 121, 1, 1415 },
-{ 0x5, 125, 0, 1365 },
-{ 0x3, 121, 1, 1417 },
-{ 0x1, 122, 1, 1416 },
-{ 0x3, 125, 1, 1367 },
-{ 0x1, 126, 0, 1366 },
-{ 0x442, 163, 0, 1418 },
-{ 0x242, 163, 0, 1419 },
-{ 0x142, 163, 0, 1420 },
-{ 0xc2, 163, 1, 1422 },
-{ 0x6, 164, 1, 1421 },
-{ 0x1, 391, 0, 941 },
-{ 0x22, 163, 0, 1428 },
-{ 0x12, 163, 0, 1429 },
-{ 0xa, 163, 0, 1430 },
-{ 0x6, 163, 1, 1432 },
-{ 0x2, 164, 1, 1431 },
-{ 0x2, 324, 0, 970 },
-{ 0x221, 163, 0, 1423 },
-{ 0x121, 163, 0, 1424 },
-{ 0xa1, 163, 0, 1425 },
-{ 0x61, 163, 1, 1427 },
-{ 0x3, 164, 1, 1426 },
-{ 0x1, 387, 0, 942 },
-{ 0x11, 163, 0, 1433 },
-{ 0x9, 163, 0, 1434 },
-{ 0x5, 163, 0, 1435 },
-{ 0x3, 163, 1, 1437 },
-{ 0x1, 164, 1, 1436 },
-{ 0x1, 324, 0, 971 },
-{ 0x4, 169, 0, 1438 },
-{ 0x1, 169, 0, 1440 },
-{ 0x1, 176, 0, 1441 },
-{ 0x1, 175, 1, 1442 },
-{ 0x2, 169, 0, 1439 },
-{ 0x1, 154, 0, 1443 },
-{ 0x880, 160, 0, 1444 },
-{ 0x480, 160, 0, 1445 },
-{ 0x280, 160, 0, 1446 },
-{ 0x180, 160, 1, 1448 },
-{ 0x80, 161, 0, 1447 },
-{ 0x440, 160, 1, 1459 },
-{ 0x88, 162, 0, 1449 },
-{ 0x240, 160, 1, 1460 },
-{ 0x48, 162, 0, 1450 },
-{ 0x140, 160, 1, 1461 },
-{ 0x28, 162, 0, 1451 },
-{ 0xc0, 160, 1, 1463 },
-{ 0x40, 161, 1, 1462 },
-{ 0x18, 162, 1, 1453 },
-{ 0x8, 162, 0, 1452 },
-{ 0x220, 160, 1, 1464 },
-{ 0x44, 162, 0, 1454 },
-{ 0x120, 160, 1, 1465 },
-{ 0x24, 162, 0, 1455 },
-{ 0xa0, 160, 1, 1466 },
-{ 0x14, 162, 0, 1456 },
-{ 0x60, 160, 1, 1468 },
-{ 0x20, 161, 1, 1467 },
-{ 0xc, 162, 1, 1458 },
-{ 0x4, 162, 0, 1457 },
-{ 0x110, 160, 0, 1469 },
-{ 0x90, 160, 0, 1470 },
-{ 0x50, 160, 0, 1471 },
-{ 0x30, 160, 1, 1473 },
-{ 0x10, 161, 1, 1472 },
-{ 0x1, 342, 0, 934 },
-{ 0x88, 160, 0, 1474 },
-{ 0x48, 160, 0, 1475 },
-{ 0x28, 160, 0, 1476 },
-{ 0x18, 160, 1, 1478 },
-{ 0x8, 161, 1, 1477 },
-{ 0xc, 325, 0, 967 },
-{ 0x44, 160, 1, 1489 },
-{ 0x22, 162, 0, 1479 },
-{ 0x24, 160, 1, 1490 },
-{ 0x12, 162, 0, 1480 },
-{ 0x14, 160, 1, 1491 },
-{ 0xa, 162, 0, 1481 },
-{ 0xc, 160, 1, 1493 },
-{ 0x4, 161, 1, 1492 },
-{ 0x6, 162, 1, 1483 },
-{ 0x2, 162, 1, 1482 },
-{ 0x6, 325, 0, 968 },
-{ 0x22, 160, 1, 1494 },
-{ 0x11, 162, 0, 1484 },
-{ 0x12, 160, 1, 1495 },
-{ 0x9, 162, 0, 1485 },
-{ 0xa, 160, 1, 1496 },
-{ 0x5, 162, 0, 1486 },
-{ 0x6, 160, 1, 1498 },
-{ 0x2, 161, 1, 1497 },
-{ 0x3, 162, 1, 1488 },
-{ 0x1, 162, 1, 1487 },
-{ 0x3, 325, 0, 969 },
-{ 0x11, 160, 0, 1499 },
-{ 0x9, 160, 0, 1500 },
-{ 0x5, 160, 0, 1501 },
-{ 0x3, 160, 1, 1503 },
-{ 0x1, 161, 0, 1502 },
-{ 0x8, 156, 0, 1504 },
-{ 0x4, 156, 0, 1505 },
-{ 0x2, 156, 0, 1506 },
-{ 0x1, 156, 1, 1508 },
-{ 0x1, 157, 1, 1507 },
-{ 0x1, 289, 0, 948 },
-{ 0x8, 158, 0, 1509 },
-{ 0x4, 158, 0, 1510 },
-{ 0x2, 158, 0, 1511 },
-{ 0x1, 158, 1, 1513 },
-{ 0x1, 159, 1, 1512 },
-{ 0x1, 288, 0, 949 },
-{ 0x8, 167, 0, 1514 },
-{ 0x4, 167, 0, 1515 },
-{ 0x2, 167, 0, 1516 },
-{ 0x1, 167, 1, 1518 },
-{ 0x1, 168, 1, 1517 },
-{ 0x1, 287, 0, 950 },
-{ 0x8, 170, 0, 1519 },
-{ 0x4, 170, 0, 1520 },
-{ 0x2, 170, 0, 1521 },
-{ 0x1, 170, 1, 1523 },
-{ 0x1, 171, 1, 1522 },
-{ 0x1, 286, 0, 951 },
-{ 0x8, 182, 0, 1524 },
-{ 0x4, 182, 0, 1525 },
-{ 0x2, 182, 0, 1526 },
-{ 0x1, 182, 1, 1528 },
-{ 0x1, 183, 0, 1527 },
-{ 0x8, 180, 0, 1529 },
-{ 0x4, 180, 0, 1530 },
-{ 0x2, 180, 0, 1531 },
-{ 0x1, 180, 1, 1533 },
-{ 0x1, 181, 0, 1532 },
-{ 0x1, 198, 0, 1534 },
-{ 0x1, 297, 0, 1535 },
-{ 0x1, 32, 0, 1536 },
-{ 0x8, 115, 0, 1537 },
-{ 0x4, 115, 0, 1538 },
-{ 0x2, 115, 0, 1539 },
-{ 0x1, 115, 1, 1541 },
-{ 0x1, 116, 0, 1540 },
-{ 0x8, 119, 0, 1542 },
-{ 0x4, 119, 0, 1543 },
-{ 0x2, 119, 0, 1544 },
-{ 0x1, 119, 1, 1546 },
-{ 0x1, 120, 0, 1545 },
-{ 0x8, 189, 0, 1547 },
-{ 0x4, 189, 0, 1548 },
-{ 0x2, 189, 0, 1549 },
-{ 0x1, 189, 1, 1551 },
-{ 0x1, 190, 0, 1550 },
-{ 0x1, 131, 0, 1552 },
-{ 0x442, 129, 0, 1553 },
-{ 0x242, 129, 0, 1554 },
-{ 0x142, 129, 0, 1555 },
-{ 0xc2, 129, 1, 1557 },
-{ 0x6, 130, 0, 1556 },
-{ 0x22, 129, 0, 1563 },
-{ 0x12, 129, 0, 1564 },
-{ 0xa, 129, 0, 1565 },
-{ 0x6, 129, 1, 1567 },
-{ 0x2, 130, 1, 1566 },
-{ 0x1, 99, 0, 1092 },
-{ 0x221, 129, 0, 1558 },
-{ 0x121, 129, 0, 1559 },
-{ 0xa1, 129, 0, 1560 },
-{ 0x61, 129, 1, 1562 },
-{ 0x3, 130, 0, 1561 },
-{ 0x11, 129, 0, 1568 },
-{ 0x9, 129, 0, 1569 },
-{ 0x5, 129, 0, 1570 },
-{ 0x3, 129, 1, 1572 },
-{ 0x1, 130, 1, 1571 },
-{ 0x1, 98, 0, 1093 },
-{ 0x1, 195, 0, 1573 },
-{ 0x1, 153, 0, 1574 },
-{ 0x1, 113, 0, 1575 },
-{ 0x1, 112, 0, 1576 },
-{ 0x4, 192, 0, 1577 },
-{ 0x2, 192, 0, 1578 },
-{ 0x1, 192, 0, 1579 },
-{ 0x1, 155, 0, 1580 },
-{ 0x2, 193, 0, 1581 },
-{ 0x1, 193, 0, 1582 },
-{ 0x4, 143, 0, 1583 },
-{ 0x2, 143, 0, 1584 },
-{ 0x1, 143, 0, 1585 },
-{ 0x4, 140, 0, 1586 },
-{ 0x1, 148, 0, 1589 },
-{ 0x1, 147, 1, 1590 },
-{ 0x2, 140, 0, 1587 },
-{ 0x1, 106, 0, 1591 },
-{ 0x1, 255, 1, 1592 },
-{ 0x1, 140, 0, 1588 },
-{ 0x8, 108, 0, 1593 },
-{ 0x4, 108, 0, 1594 },
-{ 0x2, 108, 0, 1595 },
-{ 0x1, 108, 1, 1597 },
-{ 0x1, 109, 0, 1596 },
-{ 0x8, 110, 0, 1598 },
-{ 0x4, 110, 0, 1599 },
-{ 0x2, 110, 0, 1600 },
-{ 0x1, 110, 1, 1602 },
-{ 0x1, 111, 1, 1601 },
-{ 0x1, 382, 0, 1094 },
-{ 0x8, 138, 0, 1603 },
-{ 0x4, 138, 0, 1604 },
-{ 0x2, 138, 0, 1605 },
-{ 0x1, 138, 1, 1607 },
-{ 0x1, 139, 1, 1606 },
-{ 0x1, 381, 0, 1095 },
-{ 0x8, 141, 0, 1608 },
-{ 0x4, 141, 0, 1609 },
-{ 0x2, 141, 0, 1610 },
-{ 0x1, 141, 1, 1612 },
-{ 0x1, 142, 1, 1611 },
-{ 0x1, 380, 0, 1096 },
-{ 0x8, 186, 0, 1613 },
-{ 0x4, 186, 0, 1614 },
-{ 0x2, 186, 0, 1615 },
-{ 0x1, 186, 1, 1617 },
-{ 0x1, 187, 0, 1616 },
-{ 0x8, 184, 0, 1618 },
-{ 0x4, 184, 0, 1619 },
-{ 0x2, 184, 0, 1620 },
-{ 0x1, 184, 1, 1622 },
-{ 0x1, 185, 0, 1621 },
-{ 0x8, 43, 0, 1627 },
-{ 0x18, 43, 0, 1623 },
-{ 0x4, 43, 0, 1628 },
-{ 0xc, 43, 0, 1624 },
-{ 0x2, 43, 0, 1629 },
-{ 0x6, 43, 0, 1625 },
-{ 0x1, 43, 0, 1630 },
-{ 0x3, 43, 0, 1626 },
-{ 0x51, 29, 0, 1632 },
-{ 0xd1, 29, 0, 1631 },
-{ 0x31, 29, 1, 1642 },
-{ 0x11, 30, 0, 1641 },
-{ 0x71, 29, 1, 1640 },
-{ 0x31, 30, 0, 1639 },
-{ 0x29, 29, 0, 1634 },
-{ 0x69, 29, 0, 1633 },
-{ 0x19, 29, 1, 1646 },
-{ 0x9, 30, 0, 1645 },
-{ 0x39, 29, 1, 1644 },
-{ 0x19, 30, 0, 1643 },
-{ 0x15, 29, 0, 1636 },
-{ 0x35, 29, 0, 1635 },
-{ 0xd, 29, 1, 1650 },
-{ 0x5, 30, 0, 1649 },
-{ 0x1d, 29, 1, 1648 },
-{ 0xd, 30, 0, 1647 },
-{ 0xb, 29, 0, 1638 },
-{ 0x1b, 29, 0, 1637 },
-{ 0x7, 29, 1, 1654 },
-{ 0x3, 30, 0, 1653 },
-{ 0xf, 29, 1, 1652 },
-{ 0x7, 30, 0, 1651 },
-{ 0xa2, 27, 0, 1656 },
-{ 0x1a2, 27, 0, 1655 },
-{ 0x62, 27, 1, 1666 },
-{ 0x22, 28, 0, 1665 },
-{ 0xe2, 27, 1, 1664 },
-{ 0x62, 28, 0, 1663 },
-{ 0x52, 27, 0, 1658 },
-{ 0xd2, 27, 0, 1657 },
-{ 0x32, 27, 1, 1670 },
-{ 0x12, 28, 0, 1669 },
-{ 0x72, 27, 1, 1668 },
-{ 0x32, 28, 0, 1667 },
-{ 0x2a, 27, 0, 1660 },
-{ 0x6a, 27, 0, 1659 },
-{ 0x1a, 27, 1, 1674 },
-{ 0xa, 28, 0, 1673 },
-{ 0x3a, 27, 1, 1672 },
-{ 0x1a, 28, 0, 1671 },
-{ 0x16, 27, 0, 1662 },
-{ 0x36, 27, 0, 1661 },
-{ 0xe, 27, 1, 1678 },
-{ 0x6, 28, 0, 1677 },
-{ 0x1e, 27, 1, 1676 },
-{ 0xe, 28, 0, 1675 },
-{ 0x51, 27, 0, 1680 },
-{ 0xd1, 27, 0, 1679 },
-{ 0x31, 27, 1, 1690 },
-{ 0x11, 28, 0, 1689 },
-{ 0x71, 27, 1, 1688 },
-{ 0x31, 28, 0, 1687 },
-{ 0x29, 27, 0, 1682 },
-{ 0x69, 27, 0, 1681 },
-{ 0x19, 27, 1, 1694 },
-{ 0x9, 28, 0, 1693 },
-{ 0x39, 27, 1, 1692 },
-{ 0x19, 28, 0, 1691 },
-{ 0x15, 27, 0, 1684 },
-{ 0x35, 27, 0, 1683 },
-{ 0xd, 27, 1, 1698 },
-{ 0x5, 28, 0, 1697 },
-{ 0x1d, 27, 1, 1696 },
-{ 0xd, 28, 0, 1695 },
-{ 0xb, 27, 0, 1686 },
-{ 0x1b, 27, 0, 1685 },
-{ 0x7, 27, 1, 1702 },
-{ 0x3, 28, 0, 1701 },
-{ 0xf, 27, 1, 1700 },
-{ 0x7, 28, 0, 1699 },
-{ 0x51, 25, 0, 1704 },
-{ 0xd1, 25, 0, 1703 },
-{ 0x31, 25, 1, 1714 },
-{ 0x11, 26, 0, 1713 },
-{ 0x71, 25, 1, 1712 },
-{ 0x31, 26, 0, 1711 },
-{ 0x29, 25, 0, 1706 },
-{ 0x69, 25, 0, 1705 },
-{ 0x19, 25, 1, 1718 },
-{ 0x9, 26, 0, 1717 },
-{ 0x39, 25, 1, 1716 },
-{ 0x19, 26, 0, 1715 },
-{ 0x15, 25, 0, 1708 },
-{ 0x35, 25, 0, 1707 },
-{ 0xd, 25, 1, 1722 },
-{ 0x5, 26, 0, 1721 },
-{ 0x1d, 25, 1, 1720 },
-{ 0xd, 26, 0, 1719 },
-{ 0xb, 25, 0, 1710 },
-{ 0x1b, 25, 0, 1709 },
-{ 0x7, 25, 1, 1726 },
-{ 0x3, 26, 0, 1725 },
-{ 0xf, 25, 1, 1724 },
-{ 0x7, 26, 0, 1723 },
-{ 0xa2, 23, 0, 1728 },
-{ 0x1a2, 23, 0, 1727 },
-{ 0x62, 23, 1, 1738 },
-{ 0x22, 24, 0, 1737 },
-{ 0xe2, 23, 1, 1736 },
-{ 0x62, 24, 0, 1735 },
-{ 0x52, 23, 0, 1730 },
-{ 0xd2, 23, 0, 1729 },
-{ 0x32, 23, 1, 1742 },
-{ 0x12, 24, 0, 1741 },
-{ 0x72, 23, 1, 1740 },
-{ 0x32, 24, 0, 1739 },
-{ 0x2a, 23, 0, 1732 },
-{ 0x6a, 23, 0, 1731 },
-{ 0x1a, 23, 1, 1746 },
-{ 0xa, 24, 0, 1745 },
-{ 0x3a, 23, 1, 1744 },
-{ 0x1a, 24, 0, 1743 },
-{ 0x16, 23, 0, 1734 },
-{ 0x36, 23, 0, 1733 },
-{ 0xe, 23, 1, 1750 },
-{ 0x6, 24, 0, 1749 },
-{ 0x1e, 23, 1, 1748 },
-{ 0xe, 24, 0, 1747 },
-{ 0x51, 23, 0, 1752 },
-{ 0xd1, 23, 0, 1751 },
-{ 0x31, 23, 1, 1762 },
-{ 0x11, 24, 0, 1761 },
-{ 0x71, 23, 1, 1760 },
-{ 0x31, 24, 0, 1759 },
-{ 0x29, 23, 0, 1754 },
-{ 0x69, 23, 0, 1753 },
-{ 0x19, 23, 1, 1766 },
-{ 0x9, 24, 0, 1765 },
-{ 0x39, 23, 1, 1764 },
-{ 0x19, 24, 0, 1763 },
-{ 0x15, 23, 0, 1756 },
-{ 0x35, 23, 0, 1755 },
-{ 0xd, 23, 1, 1770 },
-{ 0x5, 24, 0, 1769 },
-{ 0x1d, 23, 1, 1768 },
-{ 0xd, 24, 0, 1767 },
-{ 0xb, 23, 0, 1758 },
-{ 0x1b, 23, 0, 1757 },
-{ 0x7, 23, 1, 1774 },
-{ 0x3, 24, 0, 1773 },
-{ 0xf, 23, 1, 1772 },
-{ 0x7, 24, 0, 1771 },
-{ 0x51, 21, 1, 1800 },
-{ 0x50, 21, 0, 1776 },
-{ 0xd1, 21, 1, 1799 },
-{ 0xd0, 21, 0, 1775 },
-{ 0x31, 21, 1, 1810 },
-{ 0x30, 21, 1, 1786 },
-{ 0x11, 22, 1, 1809 },
-{ 0x10, 22, 0, 1785 },
-{ 0x71, 21, 1, 1808 },
-{ 0x70, 21, 1, 1784 },
-{ 0x31, 22, 1, 1807 },
-{ 0x30, 22, 0, 1783 },
-{ 0x29, 21, 1, 1802 },
-{ 0x28, 21, 0, 1778 },
-{ 0x69, 21, 1, 1801 },
-{ 0x68, 21, 0, 1777 },
-{ 0x19, 21, 1, 1814 },
-{ 0x18, 21, 1, 1790 },
-{ 0x9, 22, 1, 1813 },
-{ 0x8, 22, 0, 1789 },
-{ 0x39, 21, 1, 1812 },
-{ 0x38, 21, 1, 1788 },
-{ 0x19, 22, 1, 1811 },
-{ 0x18, 22, 0, 1787 },
-{ 0x15, 21, 1, 1804 },
-{ 0x14, 21, 0, 1780 },
-{ 0x35, 21, 1, 1803 },
-{ 0x34, 21, 0, 1779 },
-{ 0xd, 21, 1, 1818 },
-{ 0xc, 21, 1, 1794 },
-{ 0x5, 22, 1, 1817 },
-{ 0x4, 22, 0, 1793 },
-{ 0x1d, 21, 1, 1816 },
-{ 0x1c, 21, 1, 1792 },
-{ 0xd, 22, 1, 1815 },
-{ 0xc, 22, 0, 1791 },
-{ 0xb, 21, 1, 1806 },
-{ 0xa, 21, 0, 1782 },
-{ 0x1b, 21, 1, 1805 },
-{ 0x1a, 21, 0, 1781 },
-{ 0x7, 21, 1, 1822 },
-{ 0x6, 21, 1, 1798 },
-{ 0x3, 22, 1, 1821 },
-{ 0x2, 22, 0, 1797 },
-{ 0xf, 21, 1, 1820 },
-{ 0xe, 21, 1, 1796 },
-{ 0x7, 22, 1, 1819 },
-{ 0x6, 22, 0, 1795 },
-{ 0x8, 20, 0, 1824 },
-{ 0x18, 20, 0, 1823 },
-{ 0x1, 20, 1, 1828 },
-{ 0x2, 20, 0, 1827 },
-{ 0x3, 20, 1, 1826 },
-{ 0x4, 20, 0, 1825 },
-{ 0x1, 197, 0, 1829 },
-{ 0x1, 296, 0, 1830 },
-{ 0x14, 42, 0, 1833 },
-{ 0x34, 42, 0, 1831 },
-{ 0xc, 42, 0, 1834 },
-{ 0x1c, 42, 0, 1832 },
-{ 0x2, 42, 0, 1837 },
-{ 0x6, 42, 0, 1835 },
-{ 0x1, 42, 0, 1838 },
-{ 0x3, 42, 0, 1836 },
-{ 0x51, 18, 0, 1840 },
-{ 0xd1, 18, 0, 1839 },
-{ 0x31, 18, 1, 1850 },
-{ 0x11, 19, 0, 1849 },
-{ 0x71, 18, 1, 1848 },
-{ 0x31, 19, 0, 1847 },
-{ 0x29, 18, 0, 1842 },
-{ 0x69, 18, 0, 1841 },
-{ 0x19, 18, 1, 1854 },
-{ 0x9, 19, 0, 1853 },
-{ 0x39, 18, 1, 1852 },
-{ 0x19, 19, 0, 1851 },
-{ 0x15, 18, 0, 1844 },
-{ 0x35, 18, 0, 1843 },
-{ 0xd, 18, 1, 1858 },
-{ 0x5, 19, 0, 1857 },
-{ 0x1d, 18, 1, 1856 },
-{ 0xd, 19, 0, 1855 },
-{ 0xb, 18, 0, 1846 },
-{ 0x1b, 18, 0, 1845 },
-{ 0x7, 18, 1, 1862 },
-{ 0x3, 19, 0, 1861 },
-{ 0xf, 18, 1, 1860 },
-{ 0x7, 19, 0, 1859 },
-{ 0x1, 31, 0, 1863 },
-{ 0x1, 104, 0, 1864 },
-{ 0x2, 44, 0, 1865 },
-{ 0x1, 44, 0, 1866 },
-{ 0x1, 344, 0, 1867 },
-{ 0x2, 51, 0, 1868 },
-{ 0x1, 51, 0, 1869 },
-{ 0x1, 97, 0, 1870 },
-{ 0x51, 16, 0, 1872 },
-{ 0xd1, 16, 0, 1871 },
-{ 0x31, 16, 1, 1882 },
-{ 0x11, 17, 0, 1881 },
-{ 0x71, 16, 1, 1880 },
-{ 0x31, 17, 0, 1879 },
-{ 0x29, 16, 0, 1874 },
-{ 0x69, 16, 0, 1873 },
-{ 0x19, 16, 1, 1886 },
-{ 0x9, 17, 0, 1885 },
-{ 0x39, 16, 1, 1884 },
-{ 0x19, 17, 0, 1883 },
-{ 0x15, 16, 0, 1876 },
-{ 0x35, 16, 0, 1875 },
-{ 0xd, 16, 1, 1890 },
-{ 0x5, 17, 0, 1889 },
-{ 0x1d, 16, 1, 1888 },
-{ 0xd, 17, 0, 1887 },
-{ 0xb, 16, 0, 1878 },
-{ 0x1b, 16, 0, 1877 },
-{ 0x7, 16, 1, 1894 },
-{ 0x3, 17, 0, 1893 },
-{ 0xf, 16, 1, 1892 },
-{ 0x7, 17, 0, 1891 },
-{ 0xa20, 14, 0, 1896 },
-{ 0x1a20, 14, 0, 1895 },
-{ 0x620, 14, 1, 1906 },
-{ 0x220, 15, 0, 1905 },
-{ 0xe20, 14, 1, 1904 },
-{ 0x620, 15, 0, 1903 },
-{ 0x520, 14, 0, 1898 },
-{ 0xd20, 14, 0, 1897 },
-{ 0x320, 14, 1, 1910 },
-{ 0x120, 15, 0, 1909 },
-{ 0x720, 14, 1, 1908 },
-{ 0x320, 15, 0, 1907 },
-{ 0x2a0, 14, 0, 1900 },
-{ 0x6a0, 14, 0, 1899 },
-{ 0x1a0, 14, 1, 1914 },
-{ 0xa0, 15, 0, 1913 },
-{ 0x3a0, 14, 1, 1912 },
-{ 0x1a0, 15, 0, 1911 },
-{ 0x160, 14, 0, 1902 },
-{ 0x360, 14, 0, 1901 },
-{ 0xe0, 14, 1, 1918 },
-{ 0x60, 15, 0, 1917 },
-{ 0x1e0, 14, 1, 1916 },
-{ 0xe0, 15, 0, 1915 },
-{ 0x51, 14, 1, 1944 },
-{ 0x50, 14, 0, 1920 },
-{ 0xd1, 14, 1, 1943 },
-{ 0xd0, 14, 0, 1919 },
-{ 0x31, 14, 1, 1954 },
-{ 0x30, 14, 1, 1930 },
-{ 0x11, 15, 1, 1953 },
-{ 0x10, 15, 0, 1929 },
-{ 0x71, 14, 1, 1952 },
-{ 0x70, 14, 1, 1928 },
-{ 0x31, 15, 1, 1951 },
-{ 0x30, 15, 0, 1927 },
-{ 0x29, 14, 1, 1946 },
-{ 0x28, 14, 0, 1922 },
-{ 0x69, 14, 1, 1945 },
-{ 0x68, 14, 0, 1921 },
-{ 0x19, 14, 1, 1958 },
-{ 0x18, 14, 1, 1934 },
-{ 0x9, 15, 1, 1957 },
-{ 0x8, 15, 0, 1933 },
-{ 0x39, 14, 1, 1956 },
-{ 0x38, 14, 1, 1932 },
-{ 0x19, 15, 1, 1955 },
-{ 0x18, 15, 0, 1931 },
-{ 0x15, 14, 1, 1948 },
-{ 0x14, 14, 0, 1924 },
-{ 0x35, 14, 1, 1947 },
-{ 0x34, 14, 0, 1923 },
-{ 0xd, 14, 1, 1962 },
-{ 0xc, 14, 1, 1938 },
-{ 0x5, 15, 1, 1961 },
-{ 0x4, 15, 0, 1937 },
-{ 0x1d, 14, 1, 1960 },
-{ 0x1c, 14, 1, 1936 },
-{ 0xd, 15, 1, 1959 },
-{ 0xc, 15, 0, 1935 },
-{ 0xb, 14, 1, 1950 },
-{ 0xa, 14, 0, 1926 },
-{ 0x1b, 14, 1, 1949 },
-{ 0x1a, 14, 0, 1925 },
-{ 0x7, 14, 1, 1966 },
-{ 0x6, 14, 1, 1942 },
-{ 0x3, 15, 1, 1965 },
-{ 0x2, 15, 0, 1941 },
-{ 0xf, 14, 1, 1964 },
-{ 0xe, 14, 1, 1940 },
-{ 0x7, 15, 1, 1963 },
-{ 0x6, 15, 0, 1939 },
-{ 0x8, 13, 0, 1968 },
-{ 0x18, 13, 0, 1967 },
-{ 0x1, 13, 1, 1972 },
-{ 0x2, 13, 0, 1971 },
-{ 0x3, 13, 1, 1970 },
-{ 0x4, 13, 0, 1969 },
-{ 0x1, 84, 1, 2048 },
-{ 0x1, 85, 1, 2047 },
-{ 0x1, 86, 1, 2046 },
-{ 0x1, 87, 1, 2045 },
-{ 0x39, 40, 1, 22 },
-{ 0x19, 41, 0, 21 },
-{ 0x3, 84, 1, 2044 },
-{ 0x3, 85, 1, 2043 },
-{ 0x3, 86, 1, 2042 },
-{ 0x3, 87, 1, 2041 },
-{ 0x69, 40, 0, 11 },
-{ 0x14, 79, 1, 2038 },
-{ 0xa, 83, 1, 2037 },
-{ 0xd1, 40, 0, 9 },
-{ 0x34, 79, 1, 1974 },
-{ 0xe, 91, 0, 1973 },
-{ 0xc, 79, 1, 2118 },
-{ 0x6, 83, 0, 2117 },
-{ 0x2, 79, 1, 1980 },
-{ 0x2, 82, 0, 1979 },
-{ 0x12, 79, 1, 1978 },
-{ 0x6, 82, 0, 1977 },
-{ 0xa, 79, 1, 2040 },
-{ 0x5, 83, 1, 2039 },
-{ 0x71, 40, 1, 18 },
-{ 0x31, 41, 0, 17 },
-{ 0x1a, 79, 1, 1976 },
-{ 0x7, 91, 0, 1975 },
-{ 0x6, 79, 1, 2120 },
-{ 0x3, 83, 0, 2119 },
-{ 0x1, 79, 1, 2128 },
-{ 0x1, 80, 1, 2127 },
-{ 0x1, 81, 1, 2126 },
-{ 0x1, 82, 0, 2125 },
-{ 0x3, 79, 1, 2124 },
-{ 0x3, 80, 1, 2123 },
-{ 0x3, 81, 1, 2122 },
-{ 0x3, 82, 0, 2121 },
-{ 0x8, 60, 1, 2060 },
-{ 0x2, 63, 1, 2057 },
-{ 0x1, 65, 1, 2059 },
-{ 0x1, 66, 1, 2058 },
-{ 0xf, 40, 1, 30 },
-{ 0x7, 41, 0, 29 },
-{ 0x18, 60, 1, 2056 },
-{ 0x6, 63, 1, 2053 },
-{ 0x3, 65, 1, 2055 },
-{ 0x3, 66, 1, 2054 },
-{ 0x1b, 40, 0, 15 },
-{ 0x14, 60, 1, 2050 },
-{ 0xa, 64, 1, 2049 },
-{ 0x35, 40, 0, 13 },
-{ 0x34, 60, 1, 1982 },
-{ 0xe, 70, 0, 1981 },
-{ 0xc, 60, 1, 2130 },
-{ 0x6, 64, 0, 2129 },
-{ 0x2, 60, 1, 1988 },
-{ 0x4, 63, 0, 1987 },
-{ 0x12, 60, 1, 1986 },
-{ 0xc, 63, 0, 1985 },
-{ 0xa, 60, 1, 2052 },
-{ 0x5, 64, 1, 2051 },
-{ 0x1d, 40, 1, 26 },
-{ 0xd, 41, 0, 25 },
-{ 0x1a, 60, 1, 1984 },
-{ 0x7, 70, 0, 1983 },
-{ 0x6, 60, 1, 2132 },
-{ 0x3, 64, 0, 2131 },
-{ 0x1, 60, 1, 2140 },
-{ 0x1, 61, 1, 2139 },
-{ 0x1, 62, 1, 2138 },
-{ 0x1, 63, 0, 2137 },
-{ 0x3, 60, 1, 2136 },
-{ 0x3, 61, 1, 2135 },
-{ 0x3, 62, 1, 2134 },
-{ 0x3, 63, 0, 2133 },
-{ 0x28, 76, 1, 2064 },
-{ 0x44, 77, 1, 2061 },
-{ 0x88, 77, 1, 2063 },
-{ 0x28, 78, 0, 2062 },
-{ 0x68, 76, 1, 1992 },
-{ 0x188, 77, 1, 1991 },
-{ 0x38, 89, 1, 1990 },
-{ 0x38, 90, 0, 1989 },
-{ 0x18, 76, 1, 2144 },
-{ 0x14, 77, 1, 2141 },
-{ 0x28, 77, 1, 2143 },
-{ 0x18, 78, 0, 2142 },
-{ 0x14, 76, 1, 2068 },
-{ 0x24, 77, 1, 2067 },
-{ 0x48, 77, 1, 2065 },
-{ 0x14, 78, 0, 2066 },
-{ 0x34, 76, 1, 1996 },
-{ 0x64, 77, 1, 1995 },
-{ 0x1c, 89, 1, 1994 },
-{ 0x1c, 90, 0, 1993 },
-{ 0xc, 76, 1, 2148 },
-{ 0xc, 77, 1, 2147 },
-{ 0x18, 77, 1, 2145 },
-{ 0xc, 78, 0, 2146 },
-{ 0xa, 76, 1, 2072 },
-{ 0x11, 77, 1, 2069 },
-{ 0x22, 77, 1, 2071 },
-{ 0xa, 78, 0, 2070 },
-{ 0x1a, 76, 1, 2000 },
-{ 0x62, 77, 1, 1999 },
-{ 0xe, 89, 1, 1998 },
-{ 0xe, 90, 0, 1997 },
-{ 0x6, 76, 1, 2152 },
-{ 0x5, 77, 1, 2149 },
-{ 0xa, 77, 1, 2151 },
-{ 0x6, 78, 0, 2150 },
-{ 0x5, 76, 1, 2076 },
-{ 0x9, 77, 1, 2075 },
-{ 0x12, 77, 1, 2073 },
-{ 0x5, 78, 0, 2074 },
-{ 0xd, 76, 1, 2004 },
-{ 0x19, 77, 1, 2003 },
-{ 0x7, 89, 1, 2002 },
-{ 0x7, 90, 0, 2001 },
-{ 0x3, 76, 1, 2156 },
-{ 0x3, 77, 1, 2155 },
-{ 0x6, 77, 1, 2153 },
-{ 0x3, 78, 0, 2154 },
-{ 0x28, 57, 1, 2080 },
-{ 0x44, 58, 1, 2077 },
-{ 0x88, 58, 1, 2079 },
-{ 0x28, 59, 0, 2078 },
-{ 0x68, 57, 1, 2008 },
-{ 0x188, 58, 1, 2007 },
-{ 0x38, 68, 1, 2006 },
-{ 0x38, 69, 0, 2005 },
-{ 0x18, 57, 1, 2160 },
-{ 0x14, 58, 1, 2157 },
-{ 0x28, 58, 1, 2159 },
-{ 0x18, 59, 0, 2158 },
-{ 0x14, 57, 1, 2084 },
-{ 0x24, 58, 1, 2083 },
-{ 0x48, 58, 1, 2081 },
-{ 0x14, 59, 0, 2082 },
-{ 0x34, 57, 1, 2012 },
-{ 0x64, 58, 1, 2011 },
-{ 0x1c, 68, 1, 2010 },
-{ 0x1c, 69, 0, 2009 },
-{ 0xc, 57, 1, 2164 },
-{ 0xc, 58, 1, 2163 },
-{ 0x18, 58, 1, 2161 },
-{ 0xc, 59, 0, 2162 },
-{ 0xa, 57, 1, 2088 },
-{ 0x11, 58, 1, 2085 },
-{ 0x22, 58, 1, 2087 },
-{ 0xa, 59, 0, 2086 },
-{ 0x1a, 57, 1, 2016 },
-{ 0x62, 58, 1, 2015 },
-{ 0xe, 68, 1, 2014 },
-{ 0xe, 69, 0, 2013 },
-{ 0x6, 57, 1, 2168 },
-{ 0x5, 58, 1, 2165 },
-{ 0xa, 58, 1, 2167 },
-{ 0x6, 59, 0, 2166 },
-{ 0x5, 57, 1, 2092 },
-{ 0x9, 58, 1, 2091 },
-{ 0x12, 58, 1, 2089 },
-{ 0x5, 59, 0, 2090 },
-{ 0xd, 57, 1, 2020 },
-{ 0x19, 58, 1, 2019 },
-{ 0x7, 68, 1, 2018 },
-{ 0x7, 69, 0, 2017 },
-{ 0x3, 57, 1, 2172 },
-{ 0x3, 58, 1, 2171 },
-{ 0x6, 58, 1, 2169 },
-{ 0x3, 59, 0, 2170 },
-{ 0x8, 71, 1, 2104 },
-{ 0x2, 72, 1, 2103 },
-{ 0x2, 73, 1, 2102 },
-{ 0x2, 74, 0, 2101 },
-{ 0x18, 71, 1, 2100 },
-{ 0x6, 72, 1, 2099 },
-{ 0x6, 73, 1, 2098 },
-{ 0x6, 74, 0, 2097 },
-{ 0x14, 71, 1, 2094 },
-{ 0xa, 75, 0, 2093 },
-{ 0x34, 71, 1, 2022 },
-{ 0xe, 88, 0, 2021 },
-{ 0xc, 71, 1, 2174 },
-{ 0x6, 75, 0, 2173 },
-{ 0x2, 71, 1, 2028 },
-{ 0x4, 74, 0, 2027 },
-{ 0x12, 71, 1, 2026 },
-{ 0xc, 74, 0, 2025 },
-{ 0xa, 71, 1, 2096 },
-{ 0x5, 75, 0, 2095 },
-{ 0x1a, 71, 1, 2024 },
-{ 0x7, 88, 0, 2023 },
-{ 0x6, 71, 1, 2176 },
-{ 0x3, 75, 0, 2175 },
-{ 0x1, 71, 1, 2184 },
-{ 0x1, 72, 1, 2183 },
-{ 0x1, 73, 1, 2182 },
-{ 0x1, 74, 0, 2181 },
-{ 0x3, 71, 1, 2180 },
-{ 0x3, 72, 1, 2179 },
-{ 0x3, 73, 1, 2178 },
-{ 0x3, 74, 0, 2177 },
-{ 0x8, 52, 1, 2116 },
-{ 0x2, 53, 1, 2115 },
-{ 0x2, 54, 1, 2114 },
-{ 0x2, 55, 0, 2113 },
-{ 0x18, 52, 1, 2112 },
-{ 0x6, 53, 1, 2111 },
-{ 0x6, 54, 1, 2110 },
-{ 0x6, 55, 0, 2109 },
-{ 0x14, 52, 1, 2106 },
-{ 0xa, 56, 0, 2105 },
-{ 0x34, 52, 1, 2030 },
-{ 0xe, 67, 0, 2029 },
-{ 0xc, 52, 1, 2186 },
-{ 0x6, 56, 0, 2185 },
-{ 0x2, 52, 1, 2036 },
-{ 0x4, 55, 0, 2035 },
-{ 0x12, 52, 1, 2034 },
-{ 0xc, 55, 0, 2033 },
-{ 0xa, 52, 1, 2108 },
-{ 0x5, 56, 0, 2107 },
-{ 0x1a, 52, 1, 2032 },
-{ 0x7, 67, 0, 2031 },
-{ 0x6, 52, 1, 2188 },
-{ 0x3, 56, 0, 2187 },
-{ 0x1, 52, 1, 2196 },
-{ 0x1, 53, 1, 2195 },
-{ 0x1, 54, 1, 2194 },
-{ 0x1, 55, 0, 2193 },
-{ 0x3, 52, 1, 2192 },
-{ 0x3, 53, 1, 2191 },
-{ 0x3, 54, 1, 2190 },
-{ 0x3, 55, 0, 2189 },
-{ 0x1, 4, 0, 2197 },
-{ 0x1, 254, 0, 2198 },
-{ 0x1, 336, 0, 2199 },
-{ 0x1, 331, 0, 2200 },
-{ 0x2, 315, 0, 2201 },
-{ 0x1, 315, 0, 2204 },
-{ 0x2, 314, 0, 2202 },
-{ 0x1, 314, 0, 2205 },
-{ 0x2, 313, 0, 2203 },
-{ 0x1, 313, 0, 2206 },
-{ 0x1, 312, 0, 2207 },
-{ 0x1, 311, 0, 2208 },
-{ 0x2, 310, 0, 2209 },
-{ 0x1, 310, 0, 2211 },
-{ 0x2, 309, 0, 2210 },
-{ 0x1, 309, 0, 2212 },
-{ 0x1, 339, 0, 2219 },
-{ 0x8, 338, 0, 2213 },
-{ 0x4, 338, 0, 2215 },
-{ 0x2, 338, 0, 2217 },
-{ 0x1, 338, 0, 2220 },
-{ 0x8, 337, 0, 2214 },
-{ 0x4, 337, 0, 2216 },
-{ 0x2, 337, 0, 2218 },
-{ 0x1, 337, 0, 2221 },
-{ 0x1, 308, 0, 2228 },
-{ 0x8, 307, 0, 2222 },
-{ 0x4, 307, 0, 2224 },
-{ 0x2, 307, 0, 2226 },
-{ 0x1, 307, 0, 2229 },
-{ 0x8, 306, 0, 2223 },
-{ 0x4, 306, 0, 2225 },
-{ 0x2, 306, 1, 2227 },
-{ 0x4, 107, 0, 1271 },
-{ 0x1, 306, 0, 2230 },
-{ 0x1, 6, 0, 2231 },
-{ 0x1, 7, 0, 2232 },
-{ 0x1, 253, 0, 2233 },
-{ 0x1, 252, 0, 2234 },
-{ 0x1, 403, 0, 2235 },
-{ 0x1, 303, 0, 2236 },
-{ 0x1, 12, 0, 2237 },
-{ 0x1, 10, 0, 2238 },
-{ 0x1, 378, 0, 2239 },
-{ 0x1, 351, 0, 2240 },
-{ 0x1, 350, 0, 2241 },
-{ 0x1, 402, 0, 2242 },
-{ 0x1, 302, 0, 2243 },
-{ 0x1, 11, 0, 2244 },
-{ 0x1, 9, 0, 2245 },
-{ 0x1, 5, 0, 2246 },
-{ 0x1, 377, 0, 2247 },
-{ 0x1, 376, 0, 2248 },
-{ 0x1, 1, 0, 2249 },
-{ 0x1, 0, 0, 2250 },
+{ 0x51, 41, 0, 10 },
+{ 0x31, 41, 1, 20 },
+{ 0x11, 42, 0, 19 },
+{ 0x29, 41, 0, 12 },
+{ 0x19, 41, 1, 24 },
+{ 0x9, 42, 0, 23 },
+{ 0x15, 41, 0, 14 },
+{ 0xd, 41, 1, 28 },
+{ 0x5, 42, 0, 27 },
+{ 0xb, 41, 0, 16 },
+{ 0x7, 41, 1, 32 },
+{ 0x3, 42, 0, 31 },
+{ 0x51, 39, 1, 58 },
+{ 0x50, 39, 0, 34 },
+{ 0xd1, 39, 1, 57 },
+{ 0xd0, 39, 0, 33 },
+{ 0x31, 39, 1, 68 },
+{ 0x30, 39, 1, 44 },
+{ 0x11, 40, 1, 67 },
+{ 0x10, 40, 0, 43 },
+{ 0x71, 39, 1, 66 },
+{ 0x70, 39, 1, 42 },
+{ 0x31, 40, 1, 65 },
+{ 0x30, 40, 0, 41 },
+{ 0x29, 39, 1, 60 },
+{ 0x28, 39, 0, 36 },
+{ 0x69, 39, 1, 59 },
+{ 0x68, 39, 0, 35 },
+{ 0x19, 39, 1, 72 },
+{ 0x18, 39, 1, 48 },
+{ 0x9, 40, 1, 71 },
+{ 0x8, 40, 0, 47 },
+{ 0x39, 39, 1, 70 },
+{ 0x38, 39, 1, 46 },
+{ 0x19, 40, 1, 69 },
+{ 0x18, 40, 0, 45 },
+{ 0x15, 39, 1, 62 },
+{ 0x14, 39, 0, 38 },
+{ 0x35, 39, 1, 61 },
+{ 0x34, 39, 0, 37 },
+{ 0xd, 39, 1, 76 },
+{ 0xc, 39, 1, 52 },
+{ 0x5, 40, 1, 75 },
+{ 0x4, 40, 0, 51 },
+{ 0x1d, 39, 1, 74 },
+{ 0x1c, 39, 1, 50 },
+{ 0xd, 40, 1, 73 },
+{ 0xc, 40, 0, 49 },
+{ 0xb, 39, 1, 64 },
+{ 0xa, 39, 0, 40 },
+{ 0x1b, 39, 1, 63 },
+{ 0x1a, 39, 0, 39 },
+{ 0x7, 39, 1, 80 },
+{ 0x6, 39, 1, 56 },
+{ 0x3, 40, 1, 79 },
+{ 0x2, 40, 0, 55 },
+{ 0xf, 39, 1, 78 },
+{ 0xe, 39, 1, 54 },
+{ 0x7, 40, 1, 77 },
+{ 0x6, 40, 0, 53 },
+{ 0x8, 38, 0, 82 },
+{ 0x18, 38, 0, 81 },
+{ 0x1, 38, 1, 86 },
+{ 0x2, 38, 0, 85 },
+{ 0x3, 38, 1, 84 },
+{ 0x4, 38, 0, 83 },
+{ 0x1, 336, 0, 87 },
+{ 0x20, 289, 0, 98 },
+{ 0x220, 289, 0, 94 },
+{ 0x1220, 289, 0, 91 },
+{ 0xa20, 289, 0, 92 },
+{ 0x620, 289, 0, 93 },
+{ 0x120, 289, 0, 95 },
+{ 0xa0, 289, 0, 96 },
+{ 0x60, 289, 0, 97 },
+{ 0x10, 289, 0, 102 },
+{ 0x90, 289, 0, 99 },
+{ 0x50, 289, 0, 100 },
+{ 0x30, 289, 0, 101 },
+{ 0x8, 289, 0, 103 },
+{ 0x4, 289, 0, 104 },
+{ 0x2, 289, 0, 105 },
+{ 0x1, 289, 0, 106 },
+{ 0x1, 411, 0, 108 },
+{ 0x3, 411, 0, 107 },
+{ 0x2, 417, 0, 109 },
+{ 0x1, 417, 0, 110 },
+{ 0x2, 413, 0, 111 },
+{ 0x1, 413, 0, 112 },
+{ 0x2, 415, 0, 113 },
+{ 0x1, 415, 0, 114 },
+{ 0x2, 419, 0, 115 },
+{ 0x1, 419, 0, 116 },
+{ 0x1, 268, 0, 143 },
+{ 0x5, 268, 0, 141 },
+{ 0x3, 268, 0, 142 },
+{ 0x140, 277, 0, 119 },
+{ 0x540, 277, 0, 117 },
+{ 0x340, 277, 0, 118 },
+{ 0xc0, 277, 0, 131 },
+{ 0x2c0, 277, 0, 129 },
+{ 0x1c0, 277, 0, 130 },
+{ 0x20, 277, 0, 146 },
+{ 0xa0, 277, 0, 144 },
+{ 0x60, 277, 0, 145 },
+{ 0x10, 277, 0, 158 },
+{ 0x50, 277, 0, 156 },
+{ 0x30, 277, 0, 157 },
+{ 0x8, 277, 0, 170 },
+{ 0x28, 277, 0, 168 },
+{ 0x18, 277, 0, 169 },
+{ 0x4, 277, 0, 180 },
+{ 0x2, 277, 0, 181 },
+{ 0x1, 277, 0, 182 },
+{ 0x140, 271, 0, 122 },
+{ 0x540, 271, 0, 120 },
+{ 0x340, 271, 0, 121 },
+{ 0xc0, 271, 0, 134 },
+{ 0x2c0, 271, 0, 132 },
+{ 0x1c0, 271, 0, 133 },
+{ 0x20, 271, 0, 149 },
+{ 0xa0, 271, 0, 147 },
+{ 0x60, 271, 0, 148 },
+{ 0x10, 271, 0, 161 },
+{ 0x50, 271, 0, 159 },
+{ 0x30, 271, 0, 160 },
+{ 0x8, 271, 0, 173 },
+{ 0x28, 271, 0, 171 },
+{ 0x18, 271, 0, 172 },
+{ 0x4, 271, 0, 183 },
+{ 0x2, 271, 0, 184 },
+{ 0x1, 271, 0, 185 },
+{ 0x140, 274, 0, 125 },
+{ 0x540, 274, 0, 123 },
+{ 0x340, 274, 0, 124 },
+{ 0xc0, 274, 0, 137 },
+{ 0x2c0, 274, 0, 135 },
+{ 0x1c0, 274, 0, 136 },
+{ 0x20, 274, 0, 152 },
+{ 0xa0, 274, 0, 150 },
+{ 0x60, 274, 0, 151 },
+{ 0x10, 274, 0, 164 },
+{ 0x50, 274, 0, 162 },
+{ 0x30, 274, 0, 163 },
+{ 0x8, 274, 0, 176 },
+{ 0x28, 274, 0, 174 },
+{ 0x18, 274, 0, 175 },
+{ 0x4, 274, 0, 186 },
+{ 0x2, 274, 0, 187 },
+{ 0x1, 274, 0, 188 },
+{ 0x140, 286, 0, 128 },
+{ 0x540, 286, 0, 126 },
+{ 0x340, 286, 0, 127 },
+{ 0xc0, 286, 0, 140 },
+{ 0x2c0, 286, 0, 138 },
+{ 0x1c0, 286, 0, 139 },
+{ 0x20, 286, 0, 155 },
+{ 0xa0, 286, 0, 153 },
+{ 0x60, 286, 0, 154 },
+{ 0x10, 286, 0, 167 },
+{ 0x50, 286, 0, 165 },
+{ 0x30, 286, 0, 166 },
+{ 0x8, 286, 0, 179 },
+{ 0x28, 286, 0, 177 },
+{ 0x18, 286, 0, 178 },
+{ 0x4, 286, 0, 189 },
+{ 0x2, 286, 0, 190 },
+{ 0x1, 286, 0, 191 },
+{ 0x8, 390, 0, 192 },
+{ 0x4, 390, 0, 193 },
+{ 0x2, 390, 0, 194 },
+{ 0x1, 390, 0, 195 },
+{ 0x20, 288, 0, 203 },
+{ 0x220, 288, 0, 199 },
+{ 0x1220, 288, 0, 196 },
+{ 0xa20, 288, 0, 197 },
+{ 0x620, 288, 0, 198 },
+{ 0x120, 288, 0, 200 },
+{ 0xa0, 288, 0, 201 },
+{ 0x60, 288, 0, 202 },
+{ 0x10, 288, 0, 207 },
+{ 0x90, 288, 0, 204 },
+{ 0x50, 288, 0, 205 },
+{ 0x30, 288, 0, 206 },
+{ 0x8, 288, 0, 208 },
+{ 0x4, 288, 0, 209 },
+{ 0x2, 288, 0, 210 },
+{ 0x1, 288, 0, 211 },
+{ 0x20, 287, 0, 219 },
+{ 0x220, 287, 0, 215 },
+{ 0x1220, 287, 0, 212 },
+{ 0xa20, 287, 0, 213 },
+{ 0x620, 287, 0, 214 },
+{ 0x120, 287, 0, 216 },
+{ 0xa0, 287, 0, 217 },
+{ 0x60, 287, 0, 218 },
+{ 0x10, 287, 0, 223 },
+{ 0x90, 287, 0, 220 },
+{ 0x50, 287, 0, 221 },
+{ 0x30, 287, 0, 222 },
+{ 0x8, 287, 0, 224 },
+{ 0x4, 287, 0, 225 },
+{ 0x2, 287, 0, 226 },
+{ 0x1, 287, 0, 227 },
+{ 0x140, 279, 0, 230 },
+{ 0x540, 279, 0, 228 },
+{ 0x340, 279, 0, 229 },
+{ 0xc0, 279, 0, 239 },
+{ 0x2c0, 279, 0, 237 },
+{ 0x1c0, 279, 0, 238 },
+{ 0x20, 279, 0, 248 },
+{ 0xa0, 279, 0, 246 },
+{ 0x60, 279, 0, 247 },
+{ 0x10, 279, 0, 257 },
+{ 0x50, 279, 0, 255 },
+{ 0x30, 279, 0, 256 },
+{ 0x8, 279, 0, 266 },
+{ 0x28, 279, 0, 264 },
+{ 0x18, 279, 0, 265 },
+{ 0x4, 279, 0, 273 },
+{ 0x2, 279, 0, 274 },
+{ 0x1, 279, 0, 275 },
+{ 0x140, 281, 0, 233 },
+{ 0x540, 281, 0, 231 },
+{ 0x340, 281, 0, 232 },
+{ 0xc0, 281, 0, 242 },
+{ 0x2c0, 281, 0, 240 },
+{ 0x1c0, 281, 0, 241 },
+{ 0x20, 281, 0, 251 },
+{ 0xa0, 281, 0, 249 },
+{ 0x60, 281, 0, 250 },
+{ 0x10, 281, 0, 260 },
+{ 0x50, 281, 0, 258 },
+{ 0x30, 281, 0, 259 },
+{ 0x8, 281, 0, 269 },
+{ 0x28, 281, 0, 267 },
+{ 0x18, 281, 0, 268 },
+{ 0x4, 281, 0, 276 },
+{ 0x2, 281, 0, 277 },
+{ 0x1, 281, 0, 278 },
+{ 0x140, 283, 0, 236 },
+{ 0x540, 283, 0, 234 },
+{ 0x340, 283, 0, 235 },
+{ 0xc0, 283, 0, 245 },
+{ 0x2c0, 283, 0, 243 },
+{ 0x1c0, 283, 0, 244 },
+{ 0x20, 283, 0, 254 },
+{ 0xa0, 283, 0, 252 },
+{ 0x60, 283, 0, 253 },
+{ 0x10, 283, 0, 263 },
+{ 0x50, 283, 0, 261 },
+{ 0x30, 283, 0, 262 },
+{ 0x8, 283, 0, 272 },
+{ 0x28, 283, 0, 270 },
+{ 0x18, 283, 0, 271 },
+{ 0x4, 283, 0, 279 },
+{ 0x2, 283, 0, 280 },
+{ 0x1, 283, 0, 281 },
+{ 0x140, 278, 0, 284 },
+{ 0x540, 278, 0, 282 },
+{ 0x340, 278, 0, 283 },
+{ 0xc0, 278, 0, 293 },
+{ 0x2c0, 278, 0, 291 },
+{ 0x1c0, 278, 0, 292 },
+{ 0x20, 278, 0, 302 },
+{ 0xa0, 278, 0, 300 },
+{ 0x60, 278, 0, 301 },
+{ 0x10, 278, 0, 311 },
+{ 0x50, 278, 0, 309 },
+{ 0x30, 278, 0, 310 },
+{ 0x8, 278, 0, 320 },
+{ 0x28, 278, 0, 318 },
+{ 0x18, 278, 0, 319 },
+{ 0x4, 278, 0, 327 },
+{ 0x2, 278, 0, 328 },
+{ 0x1, 278, 0, 329 },
+{ 0x140, 280, 0, 287 },
+{ 0x540, 280, 0, 285 },
+{ 0x340, 280, 0, 286 },
+{ 0xc0, 280, 0, 296 },
+{ 0x2c0, 280, 0, 294 },
+{ 0x1c0, 280, 0, 295 },
+{ 0x20, 280, 0, 305 },
+{ 0xa0, 280, 0, 303 },
+{ 0x60, 280, 0, 304 },
+{ 0x10, 280, 0, 314 },
+{ 0x50, 280, 0, 312 },
+{ 0x30, 280, 0, 313 },
+{ 0x8, 280, 0, 323 },
+{ 0x28, 280, 0, 321 },
+{ 0x18, 280, 0, 322 },
+{ 0x4, 280, 0, 330 },
+{ 0x2, 280, 0, 331 },
+{ 0x1, 280, 0, 332 },
+{ 0x140, 282, 0, 290 },
+{ 0x540, 282, 0, 288 },
+{ 0x340, 282, 0, 289 },
+{ 0xc0, 282, 0, 299 },
+{ 0x2c0, 282, 0, 297 },
+{ 0x1c0, 282, 0, 298 },
+{ 0x20, 282, 0, 308 },
+{ 0xa0, 282, 0, 306 },
+{ 0x60, 282, 0, 307 },
+{ 0x10, 282, 0, 317 },
+{ 0x50, 282, 0, 315 },
+{ 0x30, 282, 0, 316 },
+{ 0x8, 282, 0, 326 },
+{ 0x28, 282, 0, 324 },
+{ 0x18, 282, 0, 325 },
+{ 0x4, 282, 0, 333 },
+{ 0x2, 282, 0, 334 },
+{ 0x1, 282, 0, 335 },
+{ 0x1, 410, 0, 337 },
+{ 0x3, 410, 0, 336 },
+{ 0x2, 416, 0, 338 },
+{ 0x1, 416, 0, 339 },
+{ 0x2, 412, 0, 340 },
+{ 0x1, 412, 0, 341 },
+{ 0x2, 414, 0, 342 },
+{ 0x1, 414, 0, 343 },
+{ 0x2, 418, 0, 344 },
+{ 0x1, 418, 0, 345 },
+{ 0x1, 267, 0, 372 },
+{ 0x5, 267, 0, 370 },
+{ 0x3, 267, 0, 371 },
+{ 0x140, 276, 0, 348 },
+{ 0x540, 276, 0, 346 },
+{ 0x340, 276, 0, 347 },
+{ 0xc0, 276, 0, 360 },
+{ 0x2c0, 276, 0, 358 },
+{ 0x1c0, 276, 0, 359 },
+{ 0x20, 276, 0, 375 },
+{ 0xa0, 276, 0, 373 },
+{ 0x60, 276, 0, 374 },
+{ 0x10, 276, 0, 387 },
+{ 0x50, 276, 0, 385 },
+{ 0x30, 276, 0, 386 },
+{ 0x8, 276, 0, 399 },
+{ 0x28, 276, 0, 397 },
+{ 0x18, 276, 0, 398 },
+{ 0x4, 276, 0, 409 },
+{ 0x2, 276, 0, 410 },
+{ 0x1, 276, 0, 411 },
+{ 0x140, 270, 0, 351 },
+{ 0x540, 270, 0, 349 },
+{ 0x340, 270, 0, 350 },
+{ 0xc0, 270, 0, 363 },
+{ 0x2c0, 270, 0, 361 },
+{ 0x1c0, 270, 0, 362 },
+{ 0x20, 270, 0, 378 },
+{ 0xa0, 270, 0, 376 },
+{ 0x60, 270, 0, 377 },
+{ 0x10, 270, 0, 390 },
+{ 0x50, 270, 0, 388 },
+{ 0x30, 270, 0, 389 },
+{ 0x8, 270, 0, 402 },
+{ 0x28, 270, 0, 400 },
+{ 0x18, 270, 0, 401 },
+{ 0x4, 270, 0, 412 },
+{ 0x2, 270, 0, 413 },
+{ 0x1, 270, 0, 414 },
+{ 0x140, 273, 0, 354 },
+{ 0x540, 273, 0, 352 },
+{ 0x340, 273, 0, 353 },
+{ 0xc0, 273, 0, 366 },
+{ 0x2c0, 273, 0, 364 },
+{ 0x1c0, 273, 0, 365 },
+{ 0x20, 273, 0, 381 },
+{ 0xa0, 273, 0, 379 },
+{ 0x60, 273, 0, 380 },
+{ 0x10, 273, 0, 393 },
+{ 0x50, 273, 0, 391 },
+{ 0x30, 273, 0, 392 },
+{ 0x8, 273, 0, 405 },
+{ 0x28, 273, 0, 403 },
+{ 0x18, 273, 0, 404 },
+{ 0x4, 273, 0, 415 },
+{ 0x2, 273, 0, 416 },
+{ 0x1, 273, 0, 417 },
+{ 0x140, 285, 0, 357 },
+{ 0x540, 285, 0, 355 },
+{ 0x340, 285, 0, 356 },
+{ 0xc0, 285, 0, 369 },
+{ 0x2c0, 285, 0, 367 },
+{ 0x1c0, 285, 0, 368 },
+{ 0x20, 285, 0, 384 },
+{ 0xa0, 285, 0, 382 },
+{ 0x60, 285, 0, 383 },
+{ 0x10, 285, 0, 396 },
+{ 0x50, 285, 0, 394 },
+{ 0x30, 285, 0, 395 },
+{ 0x8, 285, 0, 408 },
+{ 0x28, 285, 0, 406 },
+{ 0x18, 285, 0, 407 },
+{ 0x4, 285, 0, 418 },
+{ 0x2, 285, 0, 419 },
+{ 0x1, 285, 0, 420 },
+{ 0x1, 266, 0, 447 },
+{ 0x5, 266, 0, 445 },
+{ 0x3, 266, 0, 446 },
+{ 0x140, 275, 0, 423 },
+{ 0x540, 275, 0, 421 },
+{ 0x340, 275, 0, 422 },
+{ 0xc0, 275, 0, 435 },
+{ 0x2c0, 275, 0, 433 },
+{ 0x1c0, 275, 0, 434 },
+{ 0x20, 275, 0, 450 },
+{ 0xa0, 275, 0, 448 },
+{ 0x60, 275, 0, 449 },
+{ 0x10, 275, 0, 462 },
+{ 0x50, 275, 0, 460 },
+{ 0x30, 275, 0, 461 },
+{ 0x8, 275, 0, 474 },
+{ 0x28, 275, 0, 472 },
+{ 0x18, 275, 0, 473 },
+{ 0x4, 275, 0, 484 },
+{ 0x2, 275, 0, 485 },
+{ 0x1, 275, 0, 486 },
+{ 0x140, 269, 0, 426 },
+{ 0x540, 269, 0, 424 },
+{ 0x340, 269, 0, 425 },
+{ 0xc0, 269, 0, 438 },
+{ 0x2c0, 269, 0, 436 },
+{ 0x1c0, 269, 0, 437 },
+{ 0x20, 269, 0, 453 },
+{ 0xa0, 269, 0, 451 },
+{ 0x60, 269, 0, 452 },
+{ 0x10, 269, 0, 465 },
+{ 0x50, 269, 0, 463 },
+{ 0x30, 269, 0, 464 },
+{ 0x8, 269, 0, 477 },
+{ 0x28, 269, 0, 475 },
+{ 0x18, 269, 0, 476 },
+{ 0x4, 269, 0, 487 },
+{ 0x2, 269, 0, 488 },
+{ 0x1, 269, 0, 489 },
+{ 0x140, 272, 0, 429 },
+{ 0x540, 272, 0, 427 },
+{ 0x340, 272, 0, 428 },
+{ 0xc0, 272, 0, 441 },
+{ 0x2c0, 272, 0, 439 },
+{ 0x1c0, 272, 0, 440 },
+{ 0x20, 272, 0, 456 },
+{ 0xa0, 272, 0, 454 },
+{ 0x60, 272, 0, 455 },
+{ 0x10, 272, 0, 468 },
+{ 0x50, 272, 0, 466 },
+{ 0x30, 272, 0, 467 },
+{ 0x8, 272, 0, 480 },
+{ 0x28, 272, 0, 478 },
+{ 0x18, 272, 0, 479 },
+{ 0x4, 272, 0, 490 },
+{ 0x2, 272, 0, 491 },
+{ 0x1, 272, 0, 492 },
+{ 0x140, 284, 0, 432 },
+{ 0x540, 284, 0, 430 },
+{ 0x340, 284, 0, 431 },
+{ 0xc0, 284, 0, 444 },
+{ 0x2c0, 284, 0, 442 },
+{ 0x1c0, 284, 0, 443 },
+{ 0x20, 284, 0, 459 },
+{ 0xa0, 284, 0, 457 },
+{ 0x60, 284, 0, 458 },
+{ 0x10, 284, 0, 471 },
+{ 0x50, 284, 0, 469 },
+{ 0x30, 284, 0, 470 },
+{ 0x8, 284, 0, 483 },
+{ 0x28, 284, 0, 481 },
+{ 0x18, 284, 0, 482 },
+{ 0x4, 284, 0, 493 },
+{ 0x2, 284, 0, 494 },
+{ 0x1, 284, 0, 495 },
+{ 0x8, 409, 0, 497 },
+{ 0x18, 409, 0, 496 },
+{ 0x4, 409, 0, 499 },
+{ 0xc, 409, 0, 498 },
+{ 0x2, 409, 0, 506 },
+{ 0x1, 409, 0, 507 },
+{ 0x4, 407, 0, 501 },
+{ 0xc, 407, 0, 500 },
+{ 0x2, 407, 0, 508 },
+{ 0x1, 407, 0, 509 },
+{ 0x4, 405, 0, 503 },
+{ 0xc, 405, 0, 502 },
+{ 0x2, 405, 0, 510 },
+{ 0x1, 405, 0, 511 },
+{ 0x4, 401, 0, 505 },
+{ 0xc, 401, 0, 504 },
+{ 0x2, 401, 0, 512 },
+{ 0x1, 401, 0, 513 },
+{ 0xa00, 265, 0, 528 },
+{ 0x2a00, 265, 0, 526 },
+{ 0x1a00, 265, 0, 527 },
+{ 0x600, 265, 0, 540 },
+{ 0x2600, 265, 0, 516 },
+{ 0xa600, 265, 0, 514 },
+{ 0x6600, 265, 0, 515 },
+{ 0x1600, 265, 0, 538 },
+{ 0xe00, 265, 0, 539 },
+{ 0x100, 265, 0, 552 },
+{ 0x500, 265, 0, 550 },
+{ 0x300, 265, 0, 551 },
+{ 0x80, 265, 0, 555 },
+{ 0x280, 265, 0, 553 },
+{ 0x180, 265, 0, 554 },
+{ 0x40, 265, 0, 567 },
+{ 0x140, 265, 0, 565 },
+{ 0xc0, 265, 0, 566 },
+{ 0x20, 265, 0, 579 },
+{ 0xa0, 265, 0, 577 },
+{ 0x60, 265, 0, 578 },
+{ 0x10, 265, 0, 591 },
+{ 0x50, 265, 0, 589 },
+{ 0x30, 265, 0, 590 },
+{ 0x8, 265, 0, 603 },
+{ 0x28, 265, 0, 601 },
+{ 0x18, 265, 0, 602 },
+{ 0x4, 265, 0, 613 },
+{ 0x2, 265, 0, 614 },
+{ 0x1, 265, 0, 615 },
+{ 0x500, 261, 0, 531 },
+{ 0x1500, 261, 0, 529 },
+{ 0xd00, 261, 0, 530 },
+{ 0x300, 261, 0, 543 },
+{ 0x1300, 261, 0, 519 },
+{ 0x5300, 261, 0, 517 },
+{ 0x3300, 261, 0, 518 },
+{ 0xb00, 261, 0, 541 },
+{ 0x700, 261, 0, 542 },
+{ 0x80, 261, 0, 558 },
+{ 0x280, 261, 0, 556 },
+{ 0x180, 261, 0, 557 },
+{ 0x40, 261, 0, 570 },
+{ 0x140, 261, 0, 568 },
+{ 0xc0, 261, 0, 569 },
+{ 0x20, 261, 0, 582 },
+{ 0xa0, 261, 0, 580 },
+{ 0x60, 261, 0, 581 },
+{ 0x10, 261, 0, 594 },
+{ 0x50, 261, 0, 592 },
+{ 0x30, 261, 0, 593 },
+{ 0x8, 261, 0, 606 },
+{ 0x28, 261, 0, 604 },
+{ 0x18, 261, 0, 605 },
+{ 0x4, 261, 0, 616 },
+{ 0x2, 261, 0, 617 },
+{ 0x1, 261, 0, 618 },
+{ 0x500, 258, 0, 534 },
+{ 0x1500, 258, 0, 532 },
+{ 0xd00, 258, 0, 533 },
+{ 0x300, 258, 0, 546 },
+{ 0x1300, 258, 0, 522 },
+{ 0x5300, 258, 0, 520 },
+{ 0x3300, 258, 0, 521 },
+{ 0xb00, 258, 0, 544 },
+{ 0x700, 258, 0, 545 },
+{ 0x80, 258, 0, 561 },
+{ 0x280, 258, 0, 559 },
+{ 0x180, 258, 0, 560 },
+{ 0x40, 258, 0, 573 },
+{ 0x140, 258, 0, 571 },
+{ 0xc0, 258, 0, 572 },
+{ 0x20, 258, 0, 585 },
+{ 0xa0, 258, 0, 583 },
+{ 0x60, 258, 0, 584 },
+{ 0x10, 258, 0, 597 },
+{ 0x50, 258, 0, 595 },
+{ 0x30, 258, 0, 596 },
+{ 0x8, 258, 0, 609 },
+{ 0x28, 258, 0, 607 },
+{ 0x18, 258, 0, 608 },
+{ 0x4, 258, 0, 619 },
+{ 0x2, 258, 0, 620 },
+{ 0x1, 258, 0, 621 },
+{ 0x500, 253, 0, 537 },
+{ 0x1500, 253, 0, 535 },
+{ 0xd00, 253, 0, 536 },
+{ 0x300, 253, 0, 549 },
+{ 0x1300, 253, 0, 525 },
+{ 0x5300, 253, 0, 523 },
+{ 0x3300, 253, 0, 524 },
+{ 0xb00, 253, 0, 547 },
+{ 0x700, 253, 0, 548 },
+{ 0x80, 253, 0, 564 },
+{ 0x280, 253, 0, 562 },
+{ 0x180, 253, 0, 563 },
+{ 0x40, 253, 0, 576 },
+{ 0x140, 253, 0, 574 },
+{ 0xc0, 253, 0, 575 },
+{ 0x20, 253, 0, 588 },
+{ 0xa0, 253, 0, 586 },
+{ 0x60, 253, 0, 587 },
+{ 0x10, 253, 0, 600 },
+{ 0x50, 253, 0, 598 },
+{ 0x30, 253, 0, 599 },
+{ 0x8, 253, 0, 612 },
+{ 0x28, 253, 0, 610 },
+{ 0x18, 253, 0, 611 },
+{ 0x4, 253, 0, 622 },
+{ 0x2, 253, 0, 623 },
+{ 0x1, 253, 0, 624 },
+{ 0x8, 238, 0, 625 },
+{ 0x4, 238, 0, 626 },
+{ 0x2, 238, 0, 627 },
+{ 0x1, 238, 0, 628 },
+{ 0x2, 176, 0, 631 },
+{ 0xa, 176, 0, 629 },
+{ 0x6, 176, 0, 630 },
+{ 0x1, 176, 0, 637 },
+{ 0x5, 176, 0, 635 },
+{ 0x3, 176, 0, 636 },
+{ 0x2, 175, 0, 634 },
+{ 0xa, 175, 0, 632 },
+{ 0x6, 175, 0, 633 },
+{ 0x1, 175, 0, 640 },
+{ 0x5, 175, 0, 638 },
+{ 0x3, 175, 0, 639 },
+{ 0x4, 451, 0, 641 },
+{ 0x2, 451, 0, 642 },
+{ 0x1, 451, 0, 643 },
+{ 0x4, 450, 0, 644 },
+{ 0x2, 450, 0, 645 },
+{ 0x1, 450, 0, 646 },
+{ 0x4, 449, 0, 647 },
+{ 0x2, 449, 0, 648 },
+{ 0x1, 449, 0, 649 },
+{ 0x4, 448, 0, 650 },
+{ 0x2, 448, 0, 651 },
+{ 0x1, 448, 0, 652 },
+{ 0x2, 123, 1, 658 },
+{ 0x2, 124, 0, 657 },
+{ 0xa, 123, 1, 654 },
+{ 0xa, 124, 0, 653 },
+{ 0x6, 123, 1, 656 },
+{ 0x6, 124, 0, 655 },
+{ 0x1, 123, 1, 688 },
+{ 0x1, 124, 0, 687 },
+{ 0x5, 123, 1, 684 },
+{ 0x5, 124, 0, 683 },
+{ 0x3, 123, 1, 686 },
+{ 0x3, 124, 0, 685 },
+{ 0x2, 131, 1, 664 },
+{ 0x2, 132, 0, 663 },
+{ 0xa, 131, 1, 660 },
+{ 0xa, 132, 0, 659 },
+{ 0x6, 131, 1, 662 },
+{ 0x6, 132, 0, 661 },
+{ 0x1, 131, 1, 694 },
+{ 0x1, 132, 0, 693 },
+{ 0x5, 131, 1, 690 },
+{ 0x5, 132, 0, 689 },
+{ 0x3, 131, 1, 692 },
+{ 0x3, 132, 0, 691 },
+{ 0x2, 129, 1, 670 },
+{ 0x2, 130, 0, 669 },
+{ 0xa, 129, 1, 666 },
+{ 0xa, 130, 0, 665 },
+{ 0x6, 129, 1, 668 },
+{ 0x6, 130, 0, 667 },
+{ 0x1, 129, 1, 700 },
+{ 0x1, 130, 0, 699 },
+{ 0x5, 129, 1, 696 },
+{ 0x5, 130, 0, 695 },
+{ 0x3, 129, 1, 698 },
+{ 0x3, 130, 0, 697 },
+{ 0x2, 127, 1, 676 },
+{ 0x2, 128, 0, 675 },
+{ 0xa, 127, 1, 672 },
+{ 0xa, 128, 0, 671 },
+{ 0x6, 127, 1, 674 },
+{ 0x6, 128, 0, 673 },
+{ 0x1, 127, 1, 706 },
+{ 0x1, 128, 0, 705 },
+{ 0x5, 127, 1, 702 },
+{ 0x5, 128, 0, 701 },
+{ 0x3, 127, 1, 704 },
+{ 0x3, 128, 0, 703 },
+{ 0x2, 125, 1, 682 },
+{ 0x2, 126, 0, 681 },
+{ 0xa, 125, 1, 678 },
+{ 0xa, 126, 0, 677 },
+{ 0x6, 125, 1, 680 },
+{ 0x6, 126, 0, 679 },
+{ 0x1, 125, 1, 712 },
+{ 0x1, 126, 0, 711 },
+{ 0x5, 125, 1, 708 },
+{ 0x5, 126, 0, 707 },
+{ 0x3, 125, 1, 710 },
+{ 0x3, 126, 0, 709 },
+{ 0x4, 402, 1, 718 },
+{ 0x4, 403, 0, 717 },
+{ 0xc, 402, 1, 716 },
+{ 0xc, 403, 0, 715 },
+{ 0x2, 402, 1, 728 },
+{ 0x2, 403, 0, 727 },
+{ 0x1, 402, 1, 730 },
+{ 0x1, 403, 0, 729 },
+{ 0x8, 408, 0, 714 },
+{ 0x18, 408, 0, 713 },
+{ 0x4, 408, 0, 720 },
+{ 0xc, 408, 0, 719 },
+{ 0x2, 408, 0, 731 },
+{ 0x1, 408, 0, 732 },
+{ 0x4, 406, 0, 722 },
+{ 0xc, 406, 0, 721 },
+{ 0x2, 406, 0, 733 },
+{ 0x1, 406, 0, 734 },
+{ 0x4, 404, 0, 724 },
+{ 0xc, 404, 0, 723 },
+{ 0x2, 404, 0, 735 },
+{ 0x1, 404, 0, 736 },
+{ 0x4, 400, 0, 726 },
+{ 0xc, 400, 0, 725 },
+{ 0x2, 400, 0, 737 },
+{ 0x1, 400, 0, 738 },
+{ 0xa00, 264, 0, 753 },
+{ 0x2a00, 264, 0, 751 },
+{ 0x1a00, 264, 0, 752 },
+{ 0x600, 264, 0, 765 },
+{ 0x2600, 264, 0, 741 },
+{ 0xa600, 264, 0, 739 },
+{ 0x6600, 264, 0, 740 },
+{ 0x1600, 264, 0, 763 },
+{ 0xe00, 264, 0, 764 },
+{ 0x100, 264, 0, 777 },
+{ 0x500, 264, 0, 775 },
+{ 0x300, 264, 0, 776 },
+{ 0x80, 264, 0, 780 },
+{ 0x280, 264, 0, 778 },
+{ 0x180, 264, 0, 779 },
+{ 0x40, 264, 0, 792 },
+{ 0x140, 264, 0, 790 },
+{ 0xc0, 264, 0, 791 },
+{ 0x20, 264, 0, 804 },
+{ 0xa0, 264, 0, 802 },
+{ 0x60, 264, 0, 803 },
+{ 0x10, 264, 0, 816 },
+{ 0x50, 264, 0, 814 },
+{ 0x30, 264, 0, 815 },
+{ 0x8, 264, 0, 828 },
+{ 0x28, 264, 0, 826 },
+{ 0x18, 264, 0, 827 },
+{ 0x4, 264, 0, 838 },
+{ 0x2, 264, 0, 839 },
+{ 0x1, 264, 0, 840 },
+{ 0x500, 260, 0, 756 },
+{ 0x1500, 260, 0, 754 },
+{ 0xd00, 260, 0, 755 },
+{ 0x300, 260, 0, 768 },
+{ 0x1300, 260, 0, 744 },
+{ 0x5300, 260, 0, 742 },
+{ 0x3300, 260, 0, 743 },
+{ 0xb00, 260, 0, 766 },
+{ 0x700, 260, 0, 767 },
+{ 0x80, 260, 0, 783 },
+{ 0x280, 260, 0, 781 },
+{ 0x180, 260, 0, 782 },
+{ 0x40, 260, 0, 795 },
+{ 0x140, 260, 0, 793 },
+{ 0xc0, 260, 0, 794 },
+{ 0x20, 260, 0, 807 },
+{ 0xa0, 260, 0, 805 },
+{ 0x60, 260, 0, 806 },
+{ 0x10, 260, 0, 819 },
+{ 0x50, 260, 0, 817 },
+{ 0x30, 260, 0, 818 },
+{ 0x8, 260, 0, 831 },
+{ 0x28, 260, 0, 829 },
+{ 0x18, 260, 0, 830 },
+{ 0x4, 260, 0, 841 },
+{ 0x2, 260, 0, 842 },
+{ 0x1, 260, 0, 843 },
+{ 0x500, 257, 0, 759 },
+{ 0x1500, 257, 0, 757 },
+{ 0xd00, 257, 0, 758 },
+{ 0x300, 257, 0, 771 },
+{ 0x1300, 257, 0, 747 },
+{ 0x5300, 257, 0, 745 },
+{ 0x3300, 257, 0, 746 },
+{ 0xb00, 257, 0, 769 },
+{ 0x700, 257, 0, 770 },
+{ 0x80, 257, 0, 786 },
+{ 0x280, 257, 0, 784 },
+{ 0x180, 257, 0, 785 },
+{ 0x40, 257, 0, 798 },
+{ 0x140, 257, 0, 796 },
+{ 0xc0, 257, 0, 797 },
+{ 0x20, 257, 0, 810 },
+{ 0xa0, 257, 0, 808 },
+{ 0x60, 257, 0, 809 },
+{ 0x10, 257, 0, 822 },
+{ 0x50, 257, 0, 820 },
+{ 0x30, 257, 0, 821 },
+{ 0x8, 257, 0, 834 },
+{ 0x28, 257, 0, 832 },
+{ 0x18, 257, 0, 833 },
+{ 0x4, 257, 0, 844 },
+{ 0x2, 257, 0, 845 },
+{ 0x1, 257, 0, 846 },
+{ 0x500, 252, 0, 762 },
+{ 0x1500, 252, 0, 760 },
+{ 0xd00, 252, 0, 761 },
+{ 0x300, 252, 0, 774 },
+{ 0x1300, 252, 0, 750 },
+{ 0x5300, 252, 0, 748 },
+{ 0x3300, 252, 0, 749 },
+{ 0xb00, 252, 0, 772 },
+{ 0x700, 252, 0, 773 },
+{ 0x80, 252, 0, 789 },
+{ 0x280, 252, 0, 787 },
+{ 0x180, 252, 0, 788 },
+{ 0x40, 252, 0, 801 },
+{ 0x140, 252, 0, 799 },
+{ 0xc0, 252, 0, 800 },
+{ 0x20, 252, 0, 813 },
+{ 0xa0, 252, 0, 811 },
+{ 0x60, 252, 0, 812 },
+{ 0x10, 252, 0, 825 },
+{ 0x50, 252, 0, 823 },
+{ 0x30, 252, 0, 824 },
+{ 0x8, 252, 0, 837 },
+{ 0x28, 252, 0, 835 },
+{ 0x18, 252, 0, 836 },
+{ 0x4, 252, 0, 847 },
+{ 0x2, 252, 0, 848 },
+{ 0x1, 252, 0, 849 },
+{ 0x8, 254, 1, 895 },
+{ 0x8, 255, 0, 894 },
+{ 0x28, 254, 1, 891 },
+{ 0x28, 255, 0, 890 },
+{ 0x18, 254, 1, 893 },
+{ 0x18, 255, 0, 892 },
+{ 0x4, 254, 1, 957 },
+{ 0x4, 255, 0, 956 },
+{ 0x2, 254, 1, 959 },
+{ 0x2, 255, 0, 958 },
+{ 0x1, 254, 1, 961 },
+{ 0x1, 255, 0, 960 },
+{ 0xa00, 262, 0, 865 },
+{ 0x2a00, 262, 0, 863 },
+{ 0x1a00, 262, 0, 864 },
+{ 0x600, 262, 0, 877 },
+{ 0x2600, 262, 0, 853 },
+{ 0xa600, 262, 0, 851 },
+{ 0x6600, 262, 0, 852 },
+{ 0x1600, 262, 0, 875 },
+{ 0xe00, 262, 0, 876 },
+{ 0x100, 262, 0, 889 },
+{ 0x500, 262, 0, 887 },
+{ 0x300, 262, 0, 888 },
+{ 0x80, 262, 0, 898 },
+{ 0x280, 262, 0, 896 },
+{ 0x180, 262, 0, 897 },
+{ 0x40, 262, 0, 910 },
+{ 0x140, 262, 0, 908 },
+{ 0xc0, 262, 0, 909 },
+{ 0x20, 262, 0, 922 },
+{ 0xa0, 262, 0, 920 },
+{ 0x60, 262, 0, 921 },
+{ 0x10, 262, 0, 934 },
+{ 0x50, 262, 0, 932 },
+{ 0x30, 262, 0, 933 },
+{ 0x8, 262, 0, 946 },
+{ 0x28, 262, 0, 944 },
+{ 0x18, 262, 0, 945 },
+{ 0x4, 262, 0, 962 },
+{ 0x2, 262, 0, 963 },
+{ 0x1, 262, 1, 964 },
+{ 0x1, 263, 0, 850 },
+{ 0x500, 259, 0, 868 },
+{ 0x1500, 259, 0, 866 },
+{ 0xd00, 259, 0, 867 },
+{ 0x300, 259, 0, 880 },
+{ 0x1300, 259, 0, 856 },
+{ 0x5300, 259, 0, 854 },
+{ 0x3300, 259, 0, 855 },
+{ 0xb00, 259, 0, 878 },
+{ 0x700, 259, 0, 879 },
+{ 0x80, 259, 0, 901 },
+{ 0x280, 259, 0, 899 },
+{ 0x180, 259, 0, 900 },
+{ 0x40, 259, 0, 913 },
+{ 0x140, 259, 0, 911 },
+{ 0xc0, 259, 0, 912 },
+{ 0x20, 259, 0, 925 },
+{ 0xa0, 259, 0, 923 },
+{ 0x60, 259, 0, 924 },
+{ 0x10, 259, 0, 937 },
+{ 0x50, 259, 0, 935 },
+{ 0x30, 259, 0, 936 },
+{ 0x8, 259, 0, 949 },
+{ 0x28, 259, 0, 947 },
+{ 0x18, 259, 0, 948 },
+{ 0x4, 259, 0, 965 },
+{ 0x2, 259, 0, 966 },
+{ 0x1, 259, 0, 967 },
+{ 0x500, 256, 0, 871 },
+{ 0x1500, 256, 0, 869 },
+{ 0xd00, 256, 0, 870 },
+{ 0x300, 256, 0, 883 },
+{ 0x1300, 256, 0, 859 },
+{ 0x5300, 256, 0, 857 },
+{ 0x3300, 256, 0, 858 },
+{ 0xb00, 256, 0, 881 },
+{ 0x700, 256, 0, 882 },
+{ 0x80, 256, 0, 904 },
+{ 0x280, 256, 0, 902 },
+{ 0x180, 256, 0, 903 },
+{ 0x40, 256, 0, 916 },
+{ 0x140, 256, 0, 914 },
+{ 0xc0, 256, 0, 915 },
+{ 0x20, 256, 0, 928 },
+{ 0xa0, 256, 0, 926 },
+{ 0x60, 256, 0, 927 },
+{ 0x10, 256, 0, 940 },
+{ 0x50, 256, 0, 938 },
+{ 0x30, 256, 0, 939 },
+{ 0x8, 256, 0, 952 },
+{ 0x28, 256, 0, 950 },
+{ 0x18, 256, 0, 951 },
+{ 0x4, 256, 0, 968 },
+{ 0x2, 256, 0, 969 },
+{ 0x1, 256, 0, 970 },
+{ 0x500, 251, 0, 874 },
+{ 0x1500, 251, 0, 872 },
+{ 0xd00, 251, 0, 873 },
+{ 0x300, 251, 0, 886 },
+{ 0x1300, 251, 0, 862 },
+{ 0x5300, 251, 0, 860 },
+{ 0x3300, 251, 0, 861 },
+{ 0xb00, 251, 0, 884 },
+{ 0x700, 251, 0, 885 },
+{ 0x80, 251, 0, 907 },
+{ 0x280, 251, 0, 905 },
+{ 0x180, 251, 0, 906 },
+{ 0x40, 251, 0, 919 },
+{ 0x140, 251, 0, 917 },
+{ 0xc0, 251, 0, 918 },
+{ 0x20, 251, 0, 931 },
+{ 0xa0, 251, 0, 929 },
+{ 0x60, 251, 0, 930 },
+{ 0x10, 251, 0, 943 },
+{ 0x50, 251, 0, 941 },
+{ 0x30, 251, 0, 942 },
+{ 0x8, 251, 0, 955 },
+{ 0x28, 251, 0, 953 },
+{ 0x18, 251, 0, 954 },
+{ 0x4, 251, 0, 971 },
+{ 0x2, 251, 0, 972 },
+{ 0x1, 251, 0, 973 },
+{ 0x2, 150, 0, 975 },
+{ 0x1, 150, 0, 976 },
+{ 0x1, 50, 0, 977 },
+{ 0x3, 49, 0, 978 },
+{ 0x1, 428, 0, 979 },
+{ 0x1, 442, 0, 980 },
+{ 0x2, 386, 0, 983 },
+{ 0x1, 386, 0, 984 },
+{ 0x2, 384, 0, 985 },
+{ 0x1, 384, 0, 986 },
+{ 0x1, 383, 0, 987 },
+{ 0x1, 328, 0, 992 },
+{ 0x1, 327, 0, 993 },
+{ 0x1, 326, 0, 994 },
+{ 0x1, 325, 0, 995 },
+{ 0x1, 250, 0, 996 },
+{ 0x1, 249, 0, 997 },
+{ 0x1, 324, 0, 998 },
+{ 0x1, 323, 0, 999 },
+{ 0x1, 322, 0, 1000 },
+{ 0x1, 321, 0, 1001 },
+{ 0x1, 320, 0, 1002 },
+{ 0x1, 319, 0, 1003 },
+{ 0x1, 318, 0, 1004 },
+{ 0x2, 248, 0, 1005 },
+{ 0x1, 248, 0, 1006 },
+{ 0x2, 366, 0, 1012 },
+{ 0x1, 366, 0, 1013 },
+{ 0x1, 317, 0, 1014 },
+{ 0x1, 316, 0, 1015 },
+{ 0x1, 315, 0, 1016 },
+{ 0x1, 314, 0, 1017 },
+{ 0x1, 8, 1, 1019 },
+{ 0x1, 9, 0, 1018 },
+{ 0x1, 313, 0, 1020 },
+{ 0x1, 312, 0, 1021 },
+{ 0x1, 311, 0, 1022 },
+{ 0x1, 310, 0, 1023 },
+{ 0x1, 388, 0, 1024 },
+{ 0x1, 399, 0, 1025 },
+{ 0x1, 389, 0, 1026 },
+{ 0x1, 423, 0, 1027 },
+{ 0x1, 309, 0, 1031 },
+{ 0x1, 247, 0, 1032 },
+{ 0x1, 177, 0, 1035 },
+{ 0x2, 291, 0, 1039 },
+{ 0x1, 291, 0, 1040 },
+{ 0x1, 236, 0, 1041 },
+{ 0x5, 48, 0, 1043 },
+{ 0x3, 48, 0, 1044 },
+{ 0x5, 47, 0, 1045 },
+{ 0x3, 47, 0, 1046 },
+{ 0x1, 365, 0, 1047 },
+{ 0x1, 373, 0, 1048 },
+{ 0x1, 371, 0, 1049 },
+{ 0x1, 392, 0, 1050 },
+{ 0x1, 372, 0, 1051 },
+{ 0x1, 370, 0, 1052 },
+{ 0x2, 378, 0, 1053 },
+{ 0x1, 378, 0, 1055 },
+{ 0x2, 376, 0, 1054 },
+{ 0x1, 376, 0, 1056 },
+{ 0x2, 396, 0, 1057 },
+{ 0x1, 396, 0, 1060 },
+{ 0x2, 377, 0, 1058 },
+{ 0x1, 377, 0, 1061 },
+{ 0x2, 375, 0, 1059 },
+{ 0x1, 375, 0, 1062 },
+{ 0x1, 338, 0, 1063 },
+{ 0x1, 337, 0, 1064 },
+{ 0x1, 369, 0, 1065 },
+{ 0x1, 360, 0, 1066 },
+{ 0x1, 362, 0, 1067 },
+{ 0x1, 359, 0, 1068 },
+{ 0x1, 361, 0, 1069 },
+{ 0x2, 446, 0, 1070 },
+{ 0x1, 446, 0, 1073 },
+{ 0x2, 445, 0, 1071 },
+{ 0x1, 445, 0, 1074 },
+{ 0x2, 444, 0, 1072 },
+{ 0x1, 444, 0, 1075 },
+{ 0x1, 348, 0, 1076 },
+{ 0x2, 347, 0, 1077 },
+{ 0x1, 347, 0, 1078 },
+{ 0x2, 294, 0, 1079 },
+{ 0x1, 294, 0, 1082 },
+{ 0x2, 293, 0, 1080 },
+{ 0x1, 293, 0, 1083 },
+{ 0x2, 292, 0, 1081 },
+{ 0x1, 292, 0, 1084 },
+{ 0x2, 363, 0, 1085 },
+{ 0x1, 363, 0, 1086 },
+{ 0x2, 364, 0, 1087 },
+{ 0x1, 364, 0, 1088 },
+{ 0xa, 438, 1, 1100 },
+{ 0xa, 439, 1, 1099 },
+{ 0xa, 440, 1, 1098 },
+{ 0xa, 441, 0, 1097 },
+{ 0x1a, 438, 1, 1092 },
+{ 0x1a, 439, 1, 1091 },
+{ 0x32, 440, 1, 1090 },
+{ 0x32, 441, 0, 1089 },
+{ 0x6, 438, 1, 1108 },
+{ 0x6, 439, 1, 1107 },
+{ 0x6, 440, 1, 1106 },
+{ 0x6, 441, 0, 1105 },
+{ 0x1, 438, 1, 1120 },
+{ 0x1, 439, 1, 1119 },
+{ 0x1, 440, 1, 1118 },
+{ 0x1, 441, 0, 1117 },
+{ 0x9, 438, 1, 1104 },
+{ 0x9, 439, 1, 1103 },
+{ 0x9, 440, 1, 1102 },
+{ 0x9, 441, 0, 1101 },
+{ 0x19, 438, 1, 1096 },
+{ 0x19, 439, 1, 1095 },
+{ 0x31, 440, 1, 1094 },
+{ 0x31, 441, 0, 1093 },
+{ 0x5, 438, 1, 1112 },
+{ 0x5, 439, 1, 1111 },
+{ 0x5, 440, 1, 1110 },
+{ 0x5, 441, 0, 1109 },
+{ 0x3, 438, 1, 1116 },
+{ 0x3, 439, 1, 1115 },
+{ 0x3, 440, 1, 1114 },
+{ 0x3, 441, 0, 1113 },
+{ 0xa, 429, 1, 1132 },
+{ 0xa, 430, 1, 1131 },
+{ 0xa, 431, 1, 1130 },
+{ 0xa, 432, 0, 1129 },
+{ 0x1a, 429, 1, 1124 },
+{ 0x1a, 430, 1, 1123 },
+{ 0x32, 431, 1, 1122 },
+{ 0x32, 432, 0, 1121 },
+{ 0x6, 429, 1, 1140 },
+{ 0x6, 430, 1, 1139 },
+{ 0x6, 431, 1, 1138 },
+{ 0x6, 432, 0, 1137 },
+{ 0x1, 429, 1, 1152 },
+{ 0x1, 430, 1, 1151 },
+{ 0x1, 431, 1, 1150 },
+{ 0x1, 432, 0, 1149 },
+{ 0x9, 429, 1, 1136 },
+{ 0x9, 430, 1, 1135 },
+{ 0x9, 431, 1, 1134 },
+{ 0x9, 432, 0, 1133 },
+{ 0x19, 429, 1, 1128 },
+{ 0x19, 430, 1, 1127 },
+{ 0x31, 431, 1, 1126 },
+{ 0x31, 432, 0, 1125 },
+{ 0x5, 429, 1, 1144 },
+{ 0x5, 430, 1, 1143 },
+{ 0x5, 431, 1, 1142 },
+{ 0x5, 432, 0, 1141 },
+{ 0x3, 429, 1, 1148 },
+{ 0x3, 430, 1, 1147 },
+{ 0x3, 431, 1, 1146 },
+{ 0x3, 432, 0, 1145 },
+{ 0xa, 433, 1, 1164 },
+{ 0xa, 434, 1, 1163 },
+{ 0xa, 435, 1, 1162 },
+{ 0xa, 436, 0, 1161 },
+{ 0x1a, 433, 1, 1156 },
+{ 0x1a, 434, 1, 1155 },
+{ 0x32, 435, 1, 1154 },
+{ 0x32, 436, 0, 1153 },
+{ 0x6, 433, 1, 1172 },
+{ 0x6, 434, 1, 1171 },
+{ 0x6, 435, 1, 1170 },
+{ 0x6, 436, 0, 1169 },
+{ 0x1, 433, 1, 1184 },
+{ 0x1, 434, 1, 1183 },
+{ 0x1, 435, 1, 1182 },
+{ 0x1, 436, 0, 1181 },
+{ 0x9, 433, 1, 1168 },
+{ 0x9, 434, 1, 1167 },
+{ 0x9, 435, 1, 1166 },
+{ 0x9, 436, 0, 1165 },
+{ 0x19, 433, 1, 1160 },
+{ 0x19, 434, 1, 1159 },
+{ 0x31, 435, 1, 1158 },
+{ 0x31, 436, 0, 1157 },
+{ 0x5, 433, 1, 1176 },
+{ 0x5, 434, 1, 1175 },
+{ 0x5, 435, 1, 1174 },
+{ 0x5, 436, 0, 1173 },
+{ 0x3, 433, 1, 1180 },
+{ 0x3, 434, 1, 1179 },
+{ 0x3, 435, 1, 1178 },
+{ 0x3, 436, 0, 1177 },
+{ 0x1, 139, 0, 1185 },
+{ 0x1, 138, 0, 1186 },
+{ 0x1, 391, 1, 1188 },
+{ 0x1, 137, 0, 1187 },
+{ 0x2, 395, 1, 1190 },
+{ 0x2, 141, 0, 1189 },
+{ 0x1, 395, 1, 1192 },
+{ 0x1, 141, 0, 1191 },
+{ 0x1, 397, 0, 1193 },
+{ 0x1, 136, 0, 1194 },
+{ 0x2, 135, 0, 1195 },
+{ 0x2, 134, 0, 1196 },
+{ 0x1, 459, 1, 1202 },
+{ 0x1, 246, 0, 1033 },
+{ 0x1, 458, 0, 1203 },
+{ 0x1, 457, 1, 1204 },
+{ 0x1, 245, 0, 1042 },
+{ 0x1, 308, 0, 1205 },
+{ 0x1, 307, 1, 1206 },
+{ 0x1, 290, 0, 1034 },
+{ 0x1, 306, 0, 1207 },
+{ 0x1, 305, 1, 1208 },
+{ 0x1, 427, 0, 1036 },
+{ 0x1, 304, 1, 1209 },
+{ 0x1, 398, 0, 1038 },
+{ 0x1, 303, 0, 1210 },
+{ 0x1, 302, 0, 1211 },
+{ 0x1, 301, 0, 1212 },
+{ 0x1, 300, 1, 1213 },
+{ 0x2, 398, 0, 1037 },
+{ 0x10, 299, 0, 1217 },
+{ 0x90, 299, 0, 1215 },
+{ 0x190, 299, 0, 1214 },
+{ 0x50, 299, 0, 1216 },
+{ 0x30, 299, 0, 1219 },
+{ 0x70, 299, 0, 1218 },
+{ 0x8, 299, 0, 1221 },
+{ 0x18, 299, 0, 1220 },
+{ 0x4, 299, 0, 1222 },
+{ 0x1, 299, 0, 1225 },
+{ 0x3, 299, 0, 1224 },
+{ 0x1, 298, 1, 1226 },
+{ 0x2, 299, 0, 1223 },
+{ 0x3, 46, 0, 1227 },
+{ 0x1, 241, 1, 1228 },
+{ 0x1, 242, 1, 1028 },
+{ 0x1, 243, 0, 88 },
+{ 0x1, 341, 1, 1229 },
+{ 0x1, 342, 1, 1029 },
+{ 0x1, 343, 0, 89 },
+{ 0x1, 34, 1, 1230 },
+{ 0x1, 35, 1, 1030 },
+{ 0x1, 36, 0, 90 },
+{ 0x1, 230, 0, 1231 },
+{ 0x4, 452, 0, 1232 },
+{ 0x2, 452, 0, 1233 },
+{ 0x1, 452, 1, 1235 },
+{ 0x1, 453, 0, 1234 },
+{ 0x8, 454, 0, 1236 },
+{ 0x4, 454, 0, 1237 },
+{ 0x1, 454, 1, 1239 },
+{ 0x2, 454, 0, 1238 },
+{ 0x8, 219, 0, 1240 },
+{ 0x4, 219, 0, 1241 },
+{ 0x2, 219, 0, 1242 },
+{ 0x1, 219, 1, 1244 },
+{ 0x1, 220, 0, 1243 },
+{ 0x10, 221, 0, 1245 },
+{ 0x8, 221, 0, 1246 },
+{ 0x4, 221, 0, 1247 },
+{ 0x1, 221, 1, 1249 },
+{ 0x2, 221, 0, 1248 },
+{ 0x220, 191, 0, 1250 },
+{ 0x120, 191, 0, 1251 },
+{ 0xa0, 191, 0, 1252 },
+{ 0x60, 191, 1, 1254 },
+{ 0x4, 192, 0, 1253 },
+{ 0x110, 191, 0, 1260 },
+{ 0x90, 191, 0, 1261 },
+{ 0x50, 191, 0, 1262 },
+{ 0x30, 191, 1, 1264 },
+{ 0x2, 192, 0, 1263 },
+{ 0x8, 191, 0, 1265 },
+{ 0x4, 191, 0, 1266 },
+{ 0x2, 191, 0, 1267 },
+{ 0x1, 191, 1, 1269 },
+{ 0x1, 192, 0, 1268 },
+{ 0x440, 193, 0, 1255 },
+{ 0x240, 193, 0, 1256 },
+{ 0x140, 193, 0, 1257 },
+{ 0xc0, 193, 1, 1259 },
+{ 0x40, 193, 0, 1258 },
+{ 0x220, 193, 0, 1270 },
+{ 0x120, 193, 0, 1271 },
+{ 0xa0, 193, 0, 1272 },
+{ 0x60, 193, 1, 1274 },
+{ 0x20, 193, 0, 1273 },
+{ 0x10, 193, 0, 1275 },
+{ 0x8, 193, 0, 1276 },
+{ 0x4, 193, 0, 1277 },
+{ 0x1, 193, 1, 1279 },
+{ 0x2, 193, 0, 1278 },
+{ 0x8, 215, 0, 1280 },
+{ 0x4, 215, 0, 1281 },
+{ 0x2, 215, 0, 1282 },
+{ 0x1, 215, 1, 1284 },
+{ 0x1, 216, 0, 1283 },
+{ 0x220, 187, 0, 1285 },
+{ 0x120, 187, 0, 1286 },
+{ 0xa0, 187, 0, 1287 },
+{ 0x60, 187, 1, 1289 },
+{ 0x4, 188, 0, 1288 },
+{ 0x110, 187, 0, 1295 },
+{ 0x90, 187, 0, 1296 },
+{ 0x50, 187, 0, 1297 },
+{ 0x30, 187, 1, 1299 },
+{ 0x2, 188, 0, 1298 },
+{ 0x8, 187, 0, 1300 },
+{ 0x4, 187, 0, 1301 },
+{ 0x2, 187, 0, 1302 },
+{ 0x1, 187, 1, 1304 },
+{ 0x1, 188, 0, 1303 },
+{ 0x440, 233, 0, 1290 },
+{ 0x240, 233, 0, 1291 },
+{ 0x140, 233, 0, 1292 },
+{ 0xc0, 233, 1, 1294 },
+{ 0x40, 233, 0, 1293 },
+{ 0x220, 233, 0, 1305 },
+{ 0x120, 233, 0, 1306 },
+{ 0xa0, 233, 0, 1307 },
+{ 0x60, 233, 1, 1309 },
+{ 0x20, 233, 0, 1308 },
+{ 0x10, 233, 0, 1310 },
+{ 0x8, 233, 0, 1311 },
+{ 0x4, 233, 0, 1312 },
+{ 0x1, 233, 1, 1314 },
+{ 0x2, 233, 0, 1313 },
+{ 0x8, 207, 0, 1315 },
+{ 0x4, 207, 0, 1316 },
+{ 0x2, 207, 0, 1317 },
+{ 0x1, 207, 1, 1319 },
+{ 0x1, 208, 0, 1318 },
+{ 0x10, 214, 0, 1320 },
+{ 0x8, 214, 0, 1321 },
+{ 0x4, 214, 0, 1322 },
+{ 0x1, 214, 1, 1324 },
+{ 0x2, 214, 0, 1323 },
+{ 0x220, 178, 0, 1325 },
+{ 0x120, 178, 0, 1326 },
+{ 0xa0, 178, 0, 1327 },
+{ 0x60, 178, 1, 1329 },
+{ 0x4, 179, 0, 1328 },
+{ 0x110, 178, 0, 1350 },
+{ 0x90, 178, 0, 1351 },
+{ 0x50, 178, 0, 1352 },
+{ 0x30, 178, 1, 1354 },
+{ 0x2, 179, 0, 1353 },
+{ 0x8, 178, 0, 1355 },
+{ 0x4, 178, 0, 1356 },
+{ 0x2, 178, 0, 1357 },
+{ 0x1, 178, 1, 1359 },
+{ 0x1, 179, 0, 1358 },
+{ 0x440, 186, 0, 1330 },
+{ 0x240, 186, 0, 1331 },
+{ 0x140, 186, 0, 1332 },
+{ 0xc0, 186, 1, 1334 },
+{ 0x40, 186, 0, 1333 },
+{ 0x220, 186, 0, 1360 },
+{ 0x120, 186, 0, 1361 },
+{ 0xa0, 186, 0, 1362 },
+{ 0x60, 186, 1, 1364 },
+{ 0x20, 186, 0, 1363 },
+{ 0x10, 186, 0, 1365 },
+{ 0x8, 186, 0, 1366 },
+{ 0x4, 186, 0, 1367 },
+{ 0x1, 186, 1, 1369 },
+{ 0x2, 186, 0, 1368 },
+{ 0x440, 143, 0, 1335 },
+{ 0x240, 143, 0, 1336 },
+{ 0x140, 143, 0, 1337 },
+{ 0xc0, 143, 1, 1339 },
+{ 0x40, 143, 0, 1338 },
+{ 0x220, 143, 0, 1370 },
+{ 0x120, 143, 0, 1371 },
+{ 0xa0, 143, 0, 1372 },
+{ 0x60, 143, 1, 1374 },
+{ 0x20, 143, 0, 1373 },
+{ 0x10, 143, 0, 1375 },
+{ 0x8, 143, 0, 1376 },
+{ 0x1, 143, 1, 1379 },
+{ 0x2, 143, 0, 1378 },
+{ 0x440, 194, 1, 1345 },
+{ 0x441, 174, 0, 1340 },
+{ 0x240, 194, 1, 1346 },
+{ 0x241, 174, 0, 1341 },
+{ 0x140, 194, 1, 1347 },
+{ 0x141, 174, 0, 1342 },
+{ 0xc0, 194, 1, 1349 },
+{ 0x40, 194, 1, 1348 },
+{ 0xc1, 174, 1, 1344 },
+{ 0x41, 174, 0, 1343 },
+{ 0x220, 194, 1, 1390 },
+{ 0x221, 174, 0, 1380 },
+{ 0x120, 194, 1, 1391 },
+{ 0x121, 174, 0, 1381 },
+{ 0xa0, 194, 1, 1392 },
+{ 0xa1, 174, 0, 1382 },
+{ 0x60, 194, 1, 1394 },
+{ 0x20, 194, 1, 1393 },
+{ 0x61, 174, 1, 1384 },
+{ 0x21, 174, 0, 1383 },
+{ 0x10, 194, 1, 1395 },
+{ 0x11, 174, 0, 1385 },
+{ 0x8, 194, 1, 1396 },
+{ 0x9, 174, 0, 1386 },
+{ 0x4, 194, 1, 1397 },
+{ 0x5, 174, 0, 1387 },
+{ 0x1, 194, 1, 1399 },
+{ 0x2, 194, 1, 1398 },
+{ 0x3, 174, 1, 1389 },
+{ 0x1, 174, 0, 1388 },
+{ 0x1, 153, 1, 1407 },
+{ 0x1, 154, 1, 1406 },
+{ 0x1, 155, 1, 1405 },
+{ 0x1, 156, 0, 1404 },
+{ 0x3, 153, 1, 1403 },
+{ 0x3, 154, 1, 1402 },
+{ 0x3, 155, 1, 1401 },
+{ 0x3, 156, 0, 1400 },
+{ 0x1108, 159, 1, 1569 },
+{ 0x1108, 160, 1, 1568 },
+{ 0x1108, 165, 1, 1409 },
+{ 0x1108, 166, 0, 1408 },
+{ 0x908, 159, 1, 1571 },
+{ 0x908, 160, 1, 1570 },
+{ 0x908, 165, 1, 1411 },
+{ 0x908, 166, 0, 1410 },
+{ 0x508, 159, 1, 1573 },
+{ 0x508, 160, 1, 1572 },
+{ 0x508, 165, 1, 1413 },
+{ 0x508, 166, 0, 1412 },
+{ 0x308, 159, 1, 1577 },
+{ 0x308, 160, 1, 1576 },
+{ 0x108, 160, 1, 1574 },
+{ 0x18, 161, 1, 1575 },
+{ 0x308, 165, 1, 1417 },
+{ 0x308, 166, 1, 1416 },
+{ 0x108, 166, 1, 1414 },
+{ 0x18, 167, 0, 1415 },
+{ 0x88, 159, 1, 1609 },
+{ 0x88, 160, 1, 1608 },
+{ 0x88, 165, 1, 1489 },
+{ 0x88, 166, 0, 1488 },
+{ 0x48, 159, 1, 1611 },
+{ 0x48, 160, 1, 1610 },
+{ 0x48, 165, 1, 1491 },
+{ 0x48, 166, 0, 1490 },
+{ 0x28, 159, 1, 1613 },
+{ 0x28, 160, 1, 1612 },
+{ 0x28, 165, 1, 1493 },
+{ 0x28, 166, 0, 1492 },
+{ 0x18, 159, 1, 1617 },
+{ 0x18, 160, 1, 1616 },
+{ 0x8, 160, 1, 1614 },
+{ 0x8, 161, 1, 1615 },
+{ 0x18, 165, 1, 1497 },
+{ 0x18, 166, 1, 1496 },
+{ 0x8, 166, 1, 1494 },
+{ 0x8, 167, 0, 1495 },
+{ 0x884, 159, 1, 1579 },
+{ 0x884, 160, 1, 1578 },
+{ 0x442, 162, 1, 1469 },
+{ 0x442, 163, 1, 1468 },
+{ 0x884, 165, 1, 1439 },
+{ 0x884, 166, 1, 1438 },
+{ 0x442, 168, 1, 1419 },
+{ 0x442, 169, 0, 1418 },
+{ 0x484, 159, 1, 1581 },
+{ 0x484, 160, 1, 1580 },
+{ 0x242, 162, 1, 1471 },
+{ 0x242, 163, 1, 1470 },
+{ 0x484, 165, 1, 1441 },
+{ 0x484, 166, 1, 1440 },
+{ 0x242, 168, 1, 1421 },
+{ 0x242, 169, 0, 1420 },
+{ 0x284, 159, 1, 1583 },
+{ 0x284, 160, 1, 1582 },
+{ 0x142, 162, 1, 1473 },
+{ 0x142, 163, 1, 1472 },
+{ 0x284, 165, 1, 1443 },
+{ 0x284, 166, 1, 1442 },
+{ 0x142, 168, 1, 1423 },
+{ 0x142, 169, 0, 1422 },
+{ 0x184, 159, 1, 1587 },
+{ 0x184, 160, 1, 1586 },
+{ 0x84, 160, 1, 1584 },
+{ 0xc, 161, 1, 1585 },
+{ 0xc2, 162, 1, 1477 },
+{ 0xc2, 163, 1, 1476 },
+{ 0x42, 163, 1, 1474 },
+{ 0x6, 164, 1, 1475 },
+{ 0x184, 165, 1, 1447 },
+{ 0x184, 166, 1, 1446 },
+{ 0x84, 166, 1, 1444 },
+{ 0xc, 167, 1, 1445 },
+{ 0xc2, 168, 1, 1427 },
+{ 0xc2, 169, 1, 1426 },
+{ 0x42, 169, 1, 1424 },
+{ 0x6, 170, 0, 1425 },
+{ 0x44, 159, 1, 1619 },
+{ 0x44, 160, 1, 1618 },
+{ 0x22, 162, 1, 1549 },
+{ 0x22, 163, 1, 1548 },
+{ 0x44, 165, 1, 1519 },
+{ 0x44, 166, 1, 1518 },
+{ 0x22, 168, 1, 1499 },
+{ 0x22, 169, 0, 1498 },
+{ 0x24, 159, 1, 1621 },
+{ 0x24, 160, 1, 1620 },
+{ 0x12, 162, 1, 1551 },
+{ 0x12, 163, 1, 1550 },
+{ 0x24, 165, 1, 1521 },
+{ 0x24, 166, 1, 1520 },
+{ 0x12, 168, 1, 1501 },
+{ 0x12, 169, 0, 1500 },
+{ 0x14, 159, 1, 1623 },
+{ 0x14, 160, 1, 1622 },
+{ 0xa, 162, 1, 1553 },
+{ 0xa, 163, 1, 1552 },
+{ 0x14, 165, 1, 1523 },
+{ 0x14, 166, 1, 1522 },
+{ 0xa, 168, 1, 1503 },
+{ 0xa, 169, 0, 1502 },
+{ 0xc, 159, 1, 1627 },
+{ 0xc, 160, 1, 1626 },
+{ 0x4, 160, 1, 1624 },
+{ 0x4, 161, 1, 1625 },
+{ 0x6, 162, 1, 1557 },
+{ 0x6, 163, 1, 1556 },
+{ 0x2, 163, 1, 1554 },
+{ 0x2, 164, 1, 1555 },
+{ 0xc, 165, 1, 1527 },
+{ 0xc, 166, 1, 1526 },
+{ 0x4, 166, 1, 1524 },
+{ 0x4, 167, 1, 1525 },
+{ 0x6, 168, 1, 1507 },
+{ 0x6, 169, 1, 1506 },
+{ 0x2, 169, 1, 1504 },
+{ 0x2, 170, 0, 1505 },
+{ 0x442, 159, 1, 1589 },
+{ 0x442, 160, 1, 1588 },
+{ 0x221, 162, 1, 1479 },
+{ 0x221, 163, 1, 1478 },
+{ 0x442, 165, 1, 1449 },
+{ 0x442, 166, 1, 1448 },
+{ 0x221, 168, 1, 1429 },
+{ 0x221, 169, 0, 1428 },
+{ 0x242, 159, 1, 1591 },
+{ 0x242, 160, 1, 1590 },
+{ 0x121, 162, 1, 1481 },
+{ 0x121, 163, 1, 1480 },
+{ 0x242, 165, 1, 1451 },
+{ 0x242, 166, 1, 1450 },
+{ 0x121, 168, 1, 1431 },
+{ 0x121, 169, 0, 1430 },
+{ 0x142, 159, 1, 1593 },
+{ 0x142, 160, 1, 1592 },
+{ 0xa1, 162, 1, 1483 },
+{ 0xa1, 163, 1, 1482 },
+{ 0x142, 165, 1, 1453 },
+{ 0x142, 166, 1, 1452 },
+{ 0xa1, 168, 1, 1433 },
+{ 0xa1, 169, 0, 1432 },
+{ 0xc2, 159, 1, 1597 },
+{ 0xc2, 160, 1, 1596 },
+{ 0x42, 160, 1, 1594 },
+{ 0x6, 161, 1, 1595 },
+{ 0x61, 162, 1, 1487 },
+{ 0x61, 163, 1, 1486 },
+{ 0x21, 163, 1, 1484 },
+{ 0x3, 164, 1, 1485 },
+{ 0xc2, 165, 1, 1457 },
+{ 0xc2, 166, 1, 1456 },
+{ 0x42, 166, 1, 1454 },
+{ 0x6, 167, 1, 1455 },
+{ 0x61, 168, 1, 1437 },
+{ 0x61, 169, 1, 1436 },
+{ 0x21, 169, 1, 1434 },
+{ 0x3, 170, 0, 1435 },
+{ 0x22, 159, 1, 1629 },
+{ 0x22, 160, 1, 1628 },
+{ 0x11, 162, 1, 1559 },
+{ 0x11, 163, 1, 1558 },
+{ 0x22, 165, 1, 1529 },
+{ 0x22, 166, 1, 1528 },
+{ 0x11, 168, 1, 1509 },
+{ 0x11, 169, 0, 1508 },
+{ 0x12, 159, 1, 1631 },
+{ 0x12, 160, 1, 1630 },
+{ 0x9, 162, 1, 1561 },
+{ 0x9, 163, 1, 1560 },
+{ 0x12, 165, 1, 1531 },
+{ 0x12, 166, 1, 1530 },
+{ 0x9, 168, 1, 1511 },
+{ 0x9, 169, 0, 1510 },
+{ 0xa, 159, 1, 1633 },
+{ 0xa, 160, 1, 1632 },
+{ 0x5, 162, 1, 1563 },
+{ 0x5, 163, 1, 1562 },
+{ 0xa, 165, 1, 1533 },
+{ 0xa, 166, 1, 1532 },
+{ 0x5, 168, 1, 1513 },
+{ 0x5, 169, 0, 1512 },
+{ 0x6, 159, 1, 1637 },
+{ 0x6, 160, 1, 1636 },
+{ 0x2, 160, 1, 1634 },
+{ 0x2, 161, 1, 1635 },
+{ 0x3, 162, 1, 1567 },
+{ 0x3, 163, 1, 1566 },
+{ 0x1, 163, 1, 1564 },
+{ 0x1, 164, 1, 1565 },
+{ 0x6, 165, 1, 1537 },
+{ 0x6, 166, 1, 1536 },
+{ 0x2, 166, 1, 1534 },
+{ 0x2, 167, 1, 1535 },
+{ 0x3, 168, 1, 1517 },
+{ 0x3, 169, 1, 1516 },
+{ 0x1, 169, 1, 1514 },
+{ 0x1, 170, 0, 1515 },
+{ 0x221, 159, 1, 1599 },
+{ 0x221, 160, 1, 1598 },
+{ 0x221, 165, 1, 1459 },
+{ 0x221, 166, 0, 1458 },
+{ 0x121, 159, 1, 1601 },
+{ 0x121, 160, 1, 1600 },
+{ 0x121, 165, 1, 1461 },
+{ 0x121, 166, 0, 1460 },
+{ 0xa1, 159, 1, 1603 },
+{ 0xa1, 160, 1, 1602 },
+{ 0xa1, 165, 1, 1463 },
+{ 0xa1, 166, 0, 1462 },
+{ 0x61, 159, 1, 1607 },
+{ 0x61, 160, 1, 1606 },
+{ 0x21, 160, 1, 1604 },
+{ 0x3, 161, 1, 1605 },
+{ 0x61, 165, 1, 1467 },
+{ 0x61, 166, 1, 1466 },
+{ 0x21, 166, 1, 1464 },
+{ 0x3, 167, 0, 1465 },
+{ 0x11, 159, 1, 1639 },
+{ 0x11, 160, 1, 1638 },
+{ 0x11, 165, 1, 1539 },
+{ 0x11, 166, 0, 1538 },
+{ 0x9, 159, 1, 1641 },
+{ 0x9, 160, 1, 1640 },
+{ 0x9, 165, 1, 1541 },
+{ 0x9, 166, 0, 1540 },
+{ 0x5, 159, 1, 1643 },
+{ 0x5, 160, 1, 1642 },
+{ 0x5, 165, 1, 1543 },
+{ 0x5, 166, 0, 1542 },
+{ 0x3, 159, 1, 1647 },
+{ 0x3, 160, 1, 1646 },
+{ 0x1, 160, 1, 1644 },
+{ 0x1, 161, 1, 1645 },
+{ 0x3, 165, 1, 1547 },
+{ 0x3, 166, 1, 1546 },
+{ 0x1, 166, 1, 1544 },
+{ 0x1, 167, 0, 1545 },
+{ 0x442, 205, 0, 1648 },
+{ 0x242, 205, 0, 1649 },
+{ 0x142, 205, 0, 1650 },
+{ 0xc2, 205, 1, 1652 },
+{ 0x6, 206, 1, 1651 },
+{ 0x1, 443, 0, 981 },
+{ 0x22, 205, 0, 1658 },
+{ 0x12, 205, 0, 1659 },
+{ 0xa, 205, 0, 1660 },
+{ 0x6, 205, 1, 1662 },
+{ 0x2, 206, 1, 1661 },
+{ 0x2, 367, 0, 1010 },
+{ 0x221, 205, 0, 1653 },
+{ 0x121, 205, 0, 1654 },
+{ 0xa1, 205, 0, 1655 },
+{ 0x61, 205, 1, 1657 },
+{ 0x3, 206, 1, 1656 },
+{ 0x1, 437, 0, 982 },
+{ 0x11, 205, 0, 1663 },
+{ 0x9, 205, 0, 1664 },
+{ 0x5, 205, 0, 1665 },
+{ 0x3, 205, 1, 1667 },
+{ 0x1, 206, 1, 1666 },
+{ 0x1, 367, 0, 1011 },
+{ 0x4, 211, 0, 1668 },
+{ 0x1, 211, 0, 1670 },
+{ 0x1, 218, 0, 1671 },
+{ 0x1, 217, 1, 1672 },
+{ 0x2, 211, 0, 1669 },
+{ 0x1, 196, 0, 1673 },
+{ 0x880, 202, 0, 1674 },
+{ 0x480, 202, 0, 1675 },
+{ 0x280, 202, 0, 1676 },
+{ 0x180, 202, 1, 1678 },
+{ 0x80, 203, 0, 1677 },
+{ 0x440, 202, 1, 1689 },
+{ 0x88, 204, 0, 1679 },
+{ 0x240, 202, 1, 1690 },
+{ 0x48, 204, 0, 1680 },
+{ 0x140, 202, 1, 1691 },
+{ 0x28, 204, 0, 1681 },
+{ 0xc0, 202, 1, 1693 },
+{ 0x40, 203, 1, 1692 },
+{ 0x18, 204, 1, 1683 },
+{ 0x8, 204, 0, 1682 },
+{ 0x220, 202, 1, 1694 },
+{ 0x44, 204, 0, 1684 },
+{ 0x120, 202, 1, 1695 },
+{ 0x24, 204, 0, 1685 },
+{ 0xa0, 202, 1, 1696 },
+{ 0x14, 204, 0, 1686 },
+{ 0x60, 202, 1, 1698 },
+{ 0x20, 203, 1, 1697 },
+{ 0xc, 204, 1, 1688 },
+{ 0x4, 204, 0, 1687 },
+{ 0x110, 202, 0, 1699 },
+{ 0x90, 202, 0, 1700 },
+{ 0x50, 202, 0, 1701 },
+{ 0x30, 202, 1, 1703 },
+{ 0x10, 203, 1, 1702 },
+{ 0x1, 385, 0, 974 },
+{ 0x88, 202, 0, 1704 },
+{ 0x48, 202, 0, 1705 },
+{ 0x28, 202, 0, 1706 },
+{ 0x18, 202, 1, 1708 },
+{ 0x8, 203, 1, 1707 },
+{ 0xc, 368, 0, 1007 },
+{ 0x44, 202, 1, 1719 },
+{ 0x22, 204, 0, 1709 },
+{ 0x24, 202, 1, 1720 },
+{ 0x12, 204, 0, 1710 },
+{ 0x14, 202, 1, 1721 },
+{ 0xa, 204, 0, 1711 },
+{ 0xc, 202, 1, 1723 },
+{ 0x4, 203, 1, 1722 },
+{ 0x6, 204, 1, 1713 },
+{ 0x2, 204, 1, 1712 },
+{ 0x6, 368, 0, 1008 },
+{ 0x22, 202, 1, 1724 },
+{ 0x11, 204, 0, 1714 },
+{ 0x12, 202, 1, 1725 },
+{ 0x9, 204, 0, 1715 },
+{ 0xa, 202, 1, 1726 },
+{ 0x5, 204, 0, 1716 },
+{ 0x6, 202, 1, 1728 },
+{ 0x2, 203, 1, 1727 },
+{ 0x3, 204, 1, 1718 },
+{ 0x1, 204, 1, 1717 },
+{ 0x3, 368, 0, 1009 },
+{ 0x11, 202, 0, 1729 },
+{ 0x9, 202, 0, 1730 },
+{ 0x5, 202, 0, 1731 },
+{ 0x3, 202, 1, 1733 },
+{ 0x1, 203, 0, 1732 },
+{ 0x8, 198, 0, 1734 },
+{ 0x4, 198, 0, 1735 },
+{ 0x2, 198, 0, 1736 },
+{ 0x1, 198, 1, 1738 },
+{ 0x1, 199, 1, 1737 },
+{ 0x1, 332, 0, 988 },
+{ 0x8, 200, 0, 1739 },
+{ 0x4, 200, 0, 1740 },
+{ 0x2, 200, 0, 1741 },
+{ 0x1, 200, 1, 1743 },
+{ 0x1, 201, 1, 1742 },
+{ 0x1, 331, 0, 989 },
+{ 0x8, 209, 0, 1744 },
+{ 0x4, 209, 0, 1745 },
+{ 0x2, 209, 0, 1746 },
+{ 0x1, 209, 1, 1748 },
+{ 0x1, 210, 1, 1747 },
+{ 0x1, 330, 0, 990 },
+{ 0x8, 212, 0, 1749 },
+{ 0x4, 212, 0, 1750 },
+{ 0x2, 212, 0, 1751 },
+{ 0x1, 212, 1, 1753 },
+{ 0x1, 213, 1, 1752 },
+{ 0x1, 329, 0, 991 },
+{ 0x8, 224, 0, 1754 },
+{ 0x4, 224, 0, 1755 },
+{ 0x2, 224, 0, 1756 },
+{ 0x1, 224, 1, 1758 },
+{ 0x1, 225, 0, 1757 },
+{ 0x8, 222, 0, 1759 },
+{ 0x4, 222, 0, 1760 },
+{ 0x2, 222, 0, 1761 },
+{ 0x1, 222, 1, 1763 },
+{ 0x1, 223, 0, 1762 },
+{ 0x1, 240, 0, 1764 },
+{ 0x1, 340, 0, 1765 },
+{ 0x1, 33, 0, 1766 },
+{ 0x8, 151, 0, 1767 },
+{ 0x4, 151, 0, 1768 },
+{ 0x2, 151, 0, 1769 },
+{ 0x1, 151, 1, 1771 },
+{ 0x1, 152, 0, 1770 },
+{ 0x8, 157, 0, 1772 },
+{ 0x4, 157, 0, 1773 },
+{ 0x2, 157, 0, 1774 },
+{ 0x1, 157, 1, 1776 },
+{ 0x1, 158, 0, 1775 },
+{ 0x8, 231, 0, 1777 },
+{ 0x4, 231, 0, 1778 },
+{ 0x2, 231, 0, 1779 },
+{ 0x1, 231, 1, 1781 },
+{ 0x1, 232, 0, 1780 },
+{ 0x1, 173, 0, 1782 },
+{ 0x442, 171, 0, 1783 },
+{ 0x242, 171, 0, 1784 },
+{ 0x142, 171, 0, 1785 },
+{ 0xc2, 171, 1, 1787 },
+{ 0x6, 172, 0, 1786 },
+{ 0x22, 171, 0, 1793 },
+{ 0x12, 171, 0, 1794 },
+{ 0xa, 171, 0, 1795 },
+{ 0x6, 171, 1, 1797 },
+{ 0x2, 172, 1, 1796 },
+{ 0x1, 135, 0, 1197 },
+{ 0x221, 171, 0, 1788 },
+{ 0x121, 171, 0, 1789 },
+{ 0xa1, 171, 0, 1790 },
+{ 0x61, 171, 1, 1792 },
+{ 0x3, 172, 0, 1791 },
+{ 0x11, 171, 0, 1798 },
+{ 0x9, 171, 0, 1799 },
+{ 0x5, 171, 0, 1800 },
+{ 0x3, 171, 1, 1802 },
+{ 0x1, 172, 1, 1801 },
+{ 0x1, 134, 0, 1198 },
+{ 0x1, 237, 0, 1803 },
+{ 0x1, 195, 0, 1804 },
+{ 0x1, 149, 0, 1805 },
+{ 0x1, 148, 0, 1806 },
+{ 0x4, 234, 0, 1807 },
+{ 0x2, 234, 0, 1808 },
+{ 0x1, 234, 0, 1809 },
+{ 0x1, 197, 0, 1810 },
+{ 0x2, 235, 0, 1811 },
+{ 0x1, 235, 0, 1812 },
+{ 0x4, 185, 0, 1813 },
+{ 0x2, 185, 0, 1814 },
+{ 0x1, 185, 0, 1815 },
+{ 0x4, 182, 0, 1816 },
+{ 0x1, 190, 0, 1819 },
+{ 0x1, 189, 1, 1820 },
+{ 0x2, 182, 0, 1817 },
+{ 0x1, 142, 0, 1821 },
+{ 0x1, 297, 1, 1822 },
+{ 0x1, 182, 0, 1818 },
+{ 0x8, 144, 0, 1823 },
+{ 0x4, 144, 0, 1824 },
+{ 0x2, 144, 0, 1825 },
+{ 0x1, 144, 1, 1827 },
+{ 0x1, 145, 0, 1826 },
+{ 0x8, 146, 0, 1828 },
+{ 0x4, 146, 0, 1829 },
+{ 0x2, 146, 0, 1830 },
+{ 0x1, 146, 1, 1832 },
+{ 0x1, 147, 1, 1831 },
+{ 0x1, 426, 0, 1199 },
+{ 0x8, 180, 0, 1833 },
+{ 0x4, 180, 0, 1834 },
+{ 0x2, 180, 0, 1835 },
+{ 0x1, 180, 1, 1837 },
+{ 0x1, 181, 1, 1836 },
+{ 0x1, 425, 0, 1200 },
+{ 0x8, 183, 0, 1838 },
+{ 0x4, 183, 0, 1839 },
+{ 0x2, 183, 0, 1840 },
+{ 0x1, 183, 1, 1842 },
+{ 0x1, 184, 1, 1841 },
+{ 0x1, 424, 0, 1201 },
+{ 0x8, 228, 0, 1843 },
+{ 0x4, 228, 0, 1844 },
+{ 0x2, 228, 0, 1845 },
+{ 0x1, 228, 1, 1847 },
+{ 0x1, 229, 0, 1846 },
+{ 0x8, 226, 0, 1848 },
+{ 0x4, 226, 0, 1849 },
+{ 0x2, 226, 0, 1850 },
+{ 0x1, 226, 1, 1852 },
+{ 0x1, 227, 0, 1851 },
+{ 0x8, 44, 0, 1857 },
+{ 0x18, 44, 0, 1853 },
+{ 0x4, 44, 0, 1858 },
+{ 0xc, 44, 0, 1854 },
+{ 0x2, 44, 0, 1859 },
+{ 0x6, 44, 0, 1855 },
+{ 0x1, 44, 0, 1860 },
+{ 0x3, 44, 0, 1856 },
+{ 0x51, 30, 0, 1862 },
+{ 0xd1, 30, 0, 1861 },
+{ 0x31, 30, 1, 1872 },
+{ 0x11, 31, 0, 1871 },
+{ 0x71, 30, 1, 1870 },
+{ 0x31, 31, 0, 1869 },
+{ 0x29, 30, 0, 1864 },
+{ 0x69, 30, 0, 1863 },
+{ 0x19, 30, 1, 1876 },
+{ 0x9, 31, 0, 1875 },
+{ 0x39, 30, 1, 1874 },
+{ 0x19, 31, 0, 1873 },
+{ 0x15, 30, 0, 1866 },
+{ 0x35, 30, 0, 1865 },
+{ 0xd, 30, 1, 1880 },
+{ 0x5, 31, 0, 1879 },
+{ 0x1d, 30, 1, 1878 },
+{ 0xd, 31, 0, 1877 },
+{ 0xb, 30, 0, 1868 },
+{ 0x1b, 30, 0, 1867 },
+{ 0x7, 30, 1, 1884 },
+{ 0x3, 31, 0, 1883 },
+{ 0xf, 30, 1, 1882 },
+{ 0x7, 31, 0, 1881 },
+{ 0xa2, 28, 0, 1886 },
+{ 0x1a2, 28, 0, 1885 },
+{ 0x62, 28, 1, 1896 },
+{ 0x22, 29, 0, 1895 },
+{ 0xe2, 28, 1, 1894 },
+{ 0x62, 29, 0, 1893 },
+{ 0x52, 28, 0, 1888 },
+{ 0xd2, 28, 0, 1887 },
+{ 0x32, 28, 1, 1900 },
+{ 0x12, 29, 0, 1899 },
+{ 0x72, 28, 1, 1898 },
+{ 0x32, 29, 0, 1897 },
+{ 0x2a, 28, 0, 1890 },
+{ 0x6a, 28, 0, 1889 },
+{ 0x1a, 28, 1, 1904 },
+{ 0xa, 29, 0, 1903 },
+{ 0x3a, 28, 1, 1902 },
+{ 0x1a, 29, 0, 1901 },
+{ 0x16, 28, 0, 1892 },
+{ 0x36, 28, 0, 1891 },
+{ 0xe, 28, 1, 1908 },
+{ 0x6, 29, 0, 1907 },
+{ 0x1e, 28, 1, 1906 },
+{ 0xe, 29, 0, 1905 },
+{ 0x51, 28, 0, 1910 },
+{ 0xd1, 28, 0, 1909 },
+{ 0x31, 28, 1, 1920 },
+{ 0x11, 29, 0, 1919 },
+{ 0x71, 28, 1, 1918 },
+{ 0x31, 29, 0, 1917 },
+{ 0x29, 28, 0, 1912 },
+{ 0x69, 28, 0, 1911 },
+{ 0x19, 28, 1, 1924 },
+{ 0x9, 29, 0, 1923 },
+{ 0x39, 28, 1, 1922 },
+{ 0x19, 29, 0, 1921 },
+{ 0x15, 28, 0, 1914 },
+{ 0x35, 28, 0, 1913 },
+{ 0xd, 28, 1, 1928 },
+{ 0x5, 29, 0, 1927 },
+{ 0x1d, 28, 1, 1926 },
+{ 0xd, 29, 0, 1925 },
+{ 0xb, 28, 0, 1916 },
+{ 0x1b, 28, 0, 1915 },
+{ 0x7, 28, 1, 1932 },
+{ 0x3, 29, 0, 1931 },
+{ 0xf, 28, 1, 1930 },
+{ 0x7, 29, 0, 1929 },
+{ 0x51, 26, 0, 1934 },
+{ 0xd1, 26, 0, 1933 },
+{ 0x31, 26, 1, 1944 },
+{ 0x11, 27, 0, 1943 },
+{ 0x71, 26, 1, 1942 },
+{ 0x31, 27, 0, 1941 },
+{ 0x29, 26, 0, 1936 },
+{ 0x69, 26, 0, 1935 },
+{ 0x19, 26, 1, 1948 },
+{ 0x9, 27, 0, 1947 },
+{ 0x39, 26, 1, 1946 },
+{ 0x19, 27, 0, 1945 },
+{ 0x15, 26, 0, 1938 },
+{ 0x35, 26, 0, 1937 },
+{ 0xd, 26, 1, 1952 },
+{ 0x5, 27, 0, 1951 },
+{ 0x1d, 26, 1, 1950 },
+{ 0xd, 27, 0, 1949 },
+{ 0xb, 26, 0, 1940 },
+{ 0x1b, 26, 0, 1939 },
+{ 0x7, 26, 1, 1956 },
+{ 0x3, 27, 0, 1955 },
+{ 0xf, 26, 1, 1954 },
+{ 0x7, 27, 0, 1953 },
+{ 0xa2, 24, 0, 1958 },
+{ 0x1a2, 24, 0, 1957 },
+{ 0x62, 24, 1, 1968 },
+{ 0x22, 25, 0, 1967 },
+{ 0xe2, 24, 1, 1966 },
+{ 0x62, 25, 0, 1965 },
+{ 0x52, 24, 0, 1960 },
+{ 0xd2, 24, 0, 1959 },
+{ 0x32, 24, 1, 1972 },
+{ 0x12, 25, 0, 1971 },
+{ 0x72, 24, 1, 1970 },
+{ 0x32, 25, 0, 1969 },
+{ 0x2a, 24, 0, 1962 },
+{ 0x6a, 24, 0, 1961 },
+{ 0x1a, 24, 1, 1976 },
+{ 0xa, 25, 0, 1975 },
+{ 0x3a, 24, 1, 1974 },
+{ 0x1a, 25, 0, 1973 },
+{ 0x16, 24, 0, 1964 },
+{ 0x36, 24, 0, 1963 },
+{ 0xe, 24, 1, 1980 },
+{ 0x6, 25, 0, 1979 },
+{ 0x1e, 24, 1, 1978 },
+{ 0xe, 25, 0, 1977 },
+{ 0x51, 24, 0, 1982 },
+{ 0xd1, 24, 0, 1981 },
+{ 0x31, 24, 1, 1992 },
+{ 0x11, 25, 0, 1991 },
+{ 0x71, 24, 1, 1990 },
+{ 0x31, 25, 0, 1989 },
+{ 0x29, 24, 0, 1984 },
+{ 0x69, 24, 0, 1983 },
+{ 0x19, 24, 1, 1996 },
+{ 0x9, 25, 0, 1995 },
+{ 0x39, 24, 1, 1994 },
+{ 0x19, 25, 0, 1993 },
+{ 0x15, 24, 0, 1986 },
+{ 0x35, 24, 0, 1985 },
+{ 0xd, 24, 1, 2000 },
+{ 0x5, 25, 0, 1999 },
+{ 0x1d, 24, 1, 1998 },
+{ 0xd, 25, 0, 1997 },
+{ 0xb, 24, 0, 1988 },
+{ 0x1b, 24, 0, 1987 },
+{ 0x7, 24, 1, 2004 },
+{ 0x3, 25, 0, 2003 },
+{ 0xf, 24, 1, 2002 },
+{ 0x7, 25, 0, 2001 },
+{ 0x51, 22, 1, 2030 },
+{ 0x50, 22, 0, 2006 },
+{ 0xd1, 22, 1, 2029 },
+{ 0xd0, 22, 0, 2005 },
+{ 0x31, 22, 1, 2040 },
+{ 0x30, 22, 1, 2016 },
+{ 0x11, 23, 1, 2039 },
+{ 0x10, 23, 0, 2015 },
+{ 0x71, 22, 1, 2038 },
+{ 0x70, 22, 1, 2014 },
+{ 0x31, 23, 1, 2037 },
+{ 0x30, 23, 0, 2013 },
+{ 0x29, 22, 1, 2032 },
+{ 0x28, 22, 0, 2008 },
+{ 0x69, 22, 1, 2031 },
+{ 0x68, 22, 0, 2007 },
+{ 0x19, 22, 1, 2044 },
+{ 0x18, 22, 1, 2020 },
+{ 0x9, 23, 1, 2043 },
+{ 0x8, 23, 0, 2019 },
+{ 0x39, 22, 1, 2042 },
+{ 0x38, 22, 1, 2018 },
+{ 0x19, 23, 1, 2041 },
+{ 0x18, 23, 0, 2017 },
+{ 0x15, 22, 1, 2034 },
+{ 0x14, 22, 0, 2010 },
+{ 0x35, 22, 1, 2033 },
+{ 0x34, 22, 0, 2009 },
+{ 0xd, 22, 1, 2048 },
+{ 0xc, 22, 1, 2024 },
+{ 0x5, 23, 1, 2047 },
+{ 0x4, 23, 0, 2023 },
+{ 0x1d, 22, 1, 2046 },
+{ 0x1c, 22, 1, 2022 },
+{ 0xd, 23, 1, 2045 },
+{ 0xc, 23, 0, 2021 },
+{ 0xb, 22, 1, 2036 },
+{ 0xa, 22, 0, 2012 },
+{ 0x1b, 22, 1, 2035 },
+{ 0x1a, 22, 0, 2011 },
+{ 0x7, 22, 1, 2052 },
+{ 0x6, 22, 1, 2028 },
+{ 0x3, 23, 1, 2051 },
+{ 0x2, 23, 0, 2027 },
+{ 0xf, 22, 1, 2050 },
+{ 0xe, 22, 1, 2026 },
+{ 0x7, 23, 1, 2049 },
+{ 0x6, 23, 0, 2025 },
+{ 0x8, 21, 0, 2054 },
+{ 0x18, 21, 0, 2053 },
+{ 0x1, 21, 1, 2058 },
+{ 0x2, 21, 0, 2057 },
+{ 0x3, 21, 1, 2056 },
+{ 0x4, 21, 0, 2055 },
+{ 0x1, 239, 0, 2059 },
+{ 0x1, 339, 0, 2060 },
+{ 0x14, 43, 0, 2063 },
+{ 0x34, 43, 0, 2061 },
+{ 0xc, 43, 0, 2064 },
+{ 0x1c, 43, 0, 2062 },
+{ 0x2, 43, 0, 2067 },
+{ 0x6, 43, 0, 2065 },
+{ 0x1, 43, 0, 2068 },
+{ 0x3, 43, 0, 2066 },
+{ 0x51, 19, 0, 2070 },
+{ 0xd1, 19, 0, 2069 },
+{ 0x31, 19, 1, 2080 },
+{ 0x11, 20, 0, 2079 },
+{ 0x71, 19, 1, 2078 },
+{ 0x31, 20, 0, 2077 },
+{ 0x29, 19, 0, 2072 },
+{ 0x69, 19, 0, 2071 },
+{ 0x19, 19, 1, 2084 },
+{ 0x9, 20, 0, 2083 },
+{ 0x39, 19, 1, 2082 },
+{ 0x19, 20, 0, 2081 },
+{ 0x15, 19, 0, 2074 },
+{ 0x35, 19, 0, 2073 },
+{ 0xd, 19, 1, 2088 },
+{ 0x5, 20, 0, 2087 },
+{ 0x1d, 19, 1, 2086 },
+{ 0xd, 20, 0, 2085 },
+{ 0xb, 19, 0, 2076 },
+{ 0x1b, 19, 0, 2075 },
+{ 0x7, 19, 1, 2092 },
+{ 0x3, 20, 0, 2091 },
+{ 0xf, 19, 1, 2090 },
+{ 0x7, 20, 0, 2089 },
+{ 0x1, 32, 0, 2093 },
+{ 0x2, 447, 0, 2094 },
+{ 0x1, 447, 0, 2095 },
+{ 0x1, 140, 0, 2096 },
+{ 0x2, 45, 0, 2097 },
+{ 0x1, 45, 0, 2098 },
+{ 0x1, 387, 0, 2099 },
+{ 0x2, 52, 0, 2100 },
+{ 0x1, 52, 0, 2101 },
+{ 0x1, 133, 0, 2102 },
+{ 0x51, 17, 0, 2104 },
+{ 0xd1, 17, 0, 2103 },
+{ 0x31, 17, 1, 2114 },
+{ 0x11, 18, 0, 2113 },
+{ 0x71, 17, 1, 2112 },
+{ 0x31, 18, 0, 2111 },
+{ 0x29, 17, 0, 2106 },
+{ 0x69, 17, 0, 2105 },
+{ 0x19, 17, 1, 2118 },
+{ 0x9, 18, 0, 2117 },
+{ 0x39, 17, 1, 2116 },
+{ 0x19, 18, 0, 2115 },
+{ 0x15, 17, 0, 2108 },
+{ 0x35, 17, 0, 2107 },
+{ 0xd, 17, 1, 2122 },
+{ 0x5, 18, 0, 2121 },
+{ 0x1d, 17, 1, 2120 },
+{ 0xd, 18, 0, 2119 },
+{ 0xb, 17, 0, 2110 },
+{ 0x1b, 17, 0, 2109 },
+{ 0x7, 17, 1, 2126 },
+{ 0x3, 18, 0, 2125 },
+{ 0xf, 17, 1, 2124 },
+{ 0x7, 18, 0, 2123 },
+{ 0xa20, 15, 0, 2128 },
+{ 0x1a20, 15, 0, 2127 },
+{ 0x620, 15, 1, 2138 },
+{ 0x220, 16, 0, 2137 },
+{ 0xe20, 15, 1, 2136 },
+{ 0x620, 16, 0, 2135 },
+{ 0x520, 15, 0, 2130 },
+{ 0xd20, 15, 0, 2129 },
+{ 0x320, 15, 1, 2142 },
+{ 0x120, 16, 0, 2141 },
+{ 0x720, 15, 1, 2140 },
+{ 0x320, 16, 0, 2139 },
+{ 0x2a0, 15, 0, 2132 },
+{ 0x6a0, 15, 0, 2131 },
+{ 0x1a0, 15, 1, 2146 },
+{ 0xa0, 16, 0, 2145 },
+{ 0x3a0, 15, 1, 2144 },
+{ 0x1a0, 16, 0, 2143 },
+{ 0x160, 15, 0, 2134 },
+{ 0x360, 15, 0, 2133 },
+{ 0xe0, 15, 1, 2150 },
+{ 0x60, 16, 0, 2149 },
+{ 0x1e0, 15, 1, 2148 },
+{ 0xe0, 16, 0, 2147 },
+{ 0x51, 15, 1, 2176 },
+{ 0x50, 15, 0, 2152 },
+{ 0xd1, 15, 1, 2175 },
+{ 0xd0, 15, 0, 2151 },
+{ 0x31, 15, 1, 2186 },
+{ 0x30, 15, 1, 2162 },
+{ 0x11, 16, 1, 2185 },
+{ 0x10, 16, 0, 2161 },
+{ 0x71, 15, 1, 2184 },
+{ 0x70, 15, 1, 2160 },
+{ 0x31, 16, 1, 2183 },
+{ 0x30, 16, 0, 2159 },
+{ 0x29, 15, 1, 2178 },
+{ 0x28, 15, 0, 2154 },
+{ 0x69, 15, 1, 2177 },
+{ 0x68, 15, 0, 2153 },
+{ 0x19, 15, 1, 2190 },
+{ 0x18, 15, 1, 2166 },
+{ 0x9, 16, 1, 2189 },
+{ 0x8, 16, 0, 2165 },
+{ 0x39, 15, 1, 2188 },
+{ 0x38, 15, 1, 2164 },
+{ 0x19, 16, 1, 2187 },
+{ 0x18, 16, 0, 2163 },
+{ 0x15, 15, 1, 2180 },
+{ 0x14, 15, 0, 2156 },
+{ 0x35, 15, 1, 2179 },
+{ 0x34, 15, 0, 2155 },
+{ 0xd, 15, 1, 2194 },
+{ 0xc, 15, 1, 2170 },
+{ 0x5, 16, 1, 2193 },
+{ 0x4, 16, 0, 2169 },
+{ 0x1d, 15, 1, 2192 },
+{ 0x1c, 15, 1, 2168 },
+{ 0xd, 16, 1, 2191 },
+{ 0xc, 16, 0, 2167 },
+{ 0xb, 15, 1, 2182 },
+{ 0xa, 15, 0, 2158 },
+{ 0x1b, 15, 1, 2181 },
+{ 0x1a, 15, 0, 2157 },
+{ 0x7, 15, 1, 2198 },
+{ 0x6, 15, 1, 2174 },
+{ 0x3, 16, 1, 2197 },
+{ 0x2, 16, 0, 2173 },
+{ 0xf, 15, 1, 2196 },
+{ 0xe, 15, 1, 2172 },
+{ 0x7, 16, 1, 2195 },
+{ 0x6, 16, 0, 2171 },
+{ 0x8, 14, 0, 2200 },
+{ 0x18, 14, 0, 2199 },
+{ 0x1, 14, 1, 2204 },
+{ 0x2, 14, 0, 2203 },
+{ 0x3, 14, 1, 2202 },
+{ 0x4, 14, 0, 2201 },
+{ 0x1, 109, 1, 2356 },
+{ 0x1, 110, 1, 2355 },
+{ 0x1, 111, 1, 2354 },
+{ 0x1, 112, 1, 2353 },
+{ 0x1, 113, 1, 2352 },
+{ 0x1, 114, 1, 2351 },
+{ 0x1, 115, 1, 2350 },
+{ 0x1, 116, 1, 2349 },
+{ 0x39, 41, 1, 22 },
+{ 0x19, 42, 0, 21 },
+{ 0x3, 109, 1, 2348 },
+{ 0x3, 110, 1, 2347 },
+{ 0x3, 111, 1, 2346 },
+{ 0x3, 112, 1, 2345 },
+{ 0x3, 113, 1, 2344 },
+{ 0x3, 114, 1, 2343 },
+{ 0x3, 115, 1, 2342 },
+{ 0x3, 116, 1, 2341 },
+{ 0x69, 41, 0, 11 },
+{ 0x14, 100, 1, 2336 },
+{ 0x22, 101, 1, 2333 },
+{ 0x44, 101, 1, 2335 },
+{ 0xa, 108, 1, 2334 },
+{ 0xd1, 41, 0, 9 },
+{ 0x34, 100, 1, 2208 },
+{ 0xc4, 101, 1, 2207 },
+{ 0x1c, 107, 1, 2205 },
+{ 0xe, 122, 0, 2206 },
+{ 0xc, 100, 1, 2496 },
+{ 0xa, 101, 1, 2493 },
+{ 0x14, 101, 1, 2495 },
+{ 0x6, 108, 0, 2494 },
+{ 0x2, 100, 1, 2220 },
+{ 0x2, 101, 1, 2219 },
+{ 0x2, 106, 1, 2218 },
+{ 0x2, 107, 0, 2217 },
+{ 0x12, 100, 1, 2216 },
+{ 0x42, 101, 1, 2215 },
+{ 0x6, 106, 1, 2214 },
+{ 0x6, 107, 0, 2213 },
+{ 0xa, 100, 1, 2340 },
+{ 0x12, 101, 1, 2339 },
+{ 0x24, 101, 1, 2337 },
+{ 0x5, 108, 1, 2338 },
+{ 0x71, 41, 1, 18 },
+{ 0x31, 42, 0, 17 },
+{ 0x1a, 100, 1, 2212 },
+{ 0x32, 101, 1, 2211 },
+{ 0x1a, 107, 1, 2209 },
+{ 0x7, 122, 0, 2210 },
+{ 0x6, 100, 1, 2500 },
+{ 0x6, 101, 1, 2499 },
+{ 0xc, 101, 1, 2497 },
+{ 0x3, 108, 0, 2498 },
+{ 0x1, 100, 1, 2516 },
+{ 0x1, 101, 1, 2515 },
+{ 0x1, 102, 1, 2514 },
+{ 0x1, 103, 1, 2513 },
+{ 0x1, 104, 1, 2512 },
+{ 0x1, 105, 1, 2511 },
+{ 0x1, 106, 1, 2510 },
+{ 0x1, 107, 0, 2509 },
+{ 0x3, 100, 1, 2508 },
+{ 0x3, 101, 1, 2507 },
+{ 0x3, 102, 1, 2506 },
+{ 0x3, 103, 1, 2505 },
+{ 0x3, 104, 1, 2504 },
+{ 0x3, 105, 1, 2503 },
+{ 0x3, 106, 1, 2502 },
+{ 0x3, 107, 0, 2501 },
+{ 0x8, 67, 1, 2380 },
+{ 0x8, 68, 1, 2379 },
+{ 0x2, 73, 1, 2374 },
+{ 0x2, 74, 1, 2373 },
+{ 0x1, 76, 1, 2378 },
+{ 0x1, 77, 1, 2377 },
+{ 0x1, 78, 1, 2376 },
+{ 0x1, 79, 1, 2375 },
+{ 0xf, 41, 1, 30 },
+{ 0x7, 42, 0, 29 },
+{ 0x18, 67, 1, 2372 },
+{ 0x18, 68, 1, 2371 },
+{ 0x6, 73, 1, 2366 },
+{ 0x6, 74, 1, 2365 },
+{ 0x3, 76, 1, 2370 },
+{ 0x3, 77, 1, 2369 },
+{ 0x3, 78, 1, 2368 },
+{ 0x3, 79, 1, 2367 },
+{ 0x1b, 41, 0, 15 },
+{ 0x14, 67, 1, 2360 },
+{ 0x22, 68, 1, 2357 },
+{ 0x44, 68, 1, 2359 },
+{ 0xa, 75, 1, 2358 },
+{ 0x35, 41, 0, 13 },
+{ 0x34, 67, 1, 2224 },
+{ 0xc4, 68, 1, 2223 },
+{ 0x38, 74, 1, 2221 },
+{ 0xe, 85, 0, 2222 },
+{ 0xc, 67, 1, 2520 },
+{ 0xa, 68, 1, 2517 },
+{ 0x14, 68, 1, 2519 },
+{ 0x6, 75, 0, 2518 },
+{ 0x2, 67, 1, 2236 },
+{ 0x2, 68, 1, 2235 },
+{ 0x4, 73, 1, 2234 },
+{ 0x4, 74, 0, 2233 },
+{ 0x12, 67, 1, 2232 },
+{ 0x42, 68, 1, 2231 },
+{ 0xc, 73, 1, 2230 },
+{ 0xc, 74, 0, 2229 },
+{ 0xa, 67, 1, 2364 },
+{ 0x12, 68, 1, 2363 },
+{ 0x24, 68, 1, 2361 },
+{ 0x5, 75, 1, 2362 },
+{ 0x1d, 41, 1, 26 },
+{ 0xd, 42, 0, 25 },
+{ 0x1a, 67, 1, 2228 },
+{ 0x32, 68, 1, 2227 },
+{ 0x34, 74, 1, 2225 },
+{ 0x7, 85, 0, 2226 },
+{ 0x6, 67, 1, 2524 },
+{ 0x6, 68, 1, 2523 },
+{ 0xc, 68, 1, 2521 },
+{ 0x3, 75, 0, 2522 },
+{ 0x1, 67, 1, 2540 },
+{ 0x1, 68, 1, 2539 },
+{ 0x1, 69, 1, 2538 },
+{ 0x1, 70, 1, 2537 },
+{ 0x1, 71, 1, 2536 },
+{ 0x1, 72, 1, 2535 },
+{ 0x1, 73, 1, 2534 },
+{ 0x1, 74, 0, 2533 },
+{ 0x3, 67, 1, 2532 },
+{ 0x3, 68, 1, 2531 },
+{ 0x3, 69, 1, 2530 },
+{ 0x3, 70, 1, 2529 },
+{ 0x3, 71, 1, 2528 },
+{ 0x3, 72, 1, 2527 },
+{ 0x3, 73, 1, 2526 },
+{ 0x3, 74, 0, 2525 },
+{ 0x28, 95, 1, 2388 },
+{ 0x44, 96, 1, 2383 },
+{ 0x88, 96, 1, 2387 },
+{ 0x44, 97, 1, 2382 },
+{ 0x88, 97, 1, 2386 },
+{ 0x44, 98, 1, 2381 },
+{ 0x88, 98, 1, 2385 },
+{ 0x28, 99, 0, 2384 },
+{ 0x68, 95, 1, 2244 },
+{ 0x188, 96, 1, 2243 },
+{ 0x188, 97, 1, 2242 },
+{ 0x188, 98, 1, 2241 },
+{ 0x38, 118, 1, 2240 },
+{ 0x38, 119, 1, 2239 },
+{ 0x38, 120, 1, 2238 },
+{ 0x38, 121, 0, 2237 },
+{ 0x18, 95, 1, 2548 },
+{ 0x14, 96, 1, 2543 },
+{ 0x28, 96, 1, 2547 },
+{ 0x14, 97, 1, 2542 },
+{ 0x28, 97, 1, 2546 },
+{ 0x14, 98, 1, 2541 },
+{ 0x28, 98, 1, 2545 },
+{ 0x18, 99, 0, 2544 },
+{ 0x14, 95, 1, 2396 },
+{ 0x24, 96, 1, 2395 },
+{ 0x48, 96, 1, 2391 },
+{ 0x24, 97, 1, 2394 },
+{ 0x48, 97, 1, 2390 },
+{ 0x24, 98, 1, 2393 },
+{ 0x48, 98, 1, 2389 },
+{ 0x14, 99, 0, 2392 },
+{ 0x34, 95, 1, 2252 },
+{ 0x64, 96, 1, 2251 },
+{ 0x64, 97, 1, 2250 },
+{ 0x64, 98, 1, 2249 },
+{ 0x1c, 118, 1, 2248 },
+{ 0x1c, 119, 1, 2247 },
+{ 0x1c, 120, 1, 2246 },
+{ 0x1c, 121, 0, 2245 },
+{ 0xc, 95, 1, 2556 },
+{ 0xc, 96, 1, 2555 },
+{ 0x18, 96, 1, 2551 },
+{ 0xc, 97, 1, 2554 },
+{ 0x18, 97, 1, 2550 },
+{ 0xc, 98, 1, 2553 },
+{ 0x18, 98, 1, 2549 },
+{ 0xc, 99, 0, 2552 },
+{ 0xa, 95, 1, 2404 },
+{ 0x11, 96, 1, 2399 },
+{ 0x22, 96, 1, 2403 },
+{ 0x11, 97, 1, 2398 },
+{ 0x22, 97, 1, 2402 },
+{ 0x11, 98, 1, 2397 },
+{ 0x22, 98, 1, 2401 },
+{ 0xa, 99, 0, 2400 },
+{ 0x1a, 95, 1, 2260 },
+{ 0x62, 96, 1, 2259 },
+{ 0x62, 97, 1, 2258 },
+{ 0x62, 98, 1, 2257 },
+{ 0xe, 118, 1, 2256 },
+{ 0xe, 119, 1, 2255 },
+{ 0xe, 120, 1, 2254 },
+{ 0xe, 121, 0, 2253 },
+{ 0x6, 95, 1, 2564 },
+{ 0x5, 96, 1, 2559 },
+{ 0xa, 96, 1, 2563 },
+{ 0x5, 97, 1, 2558 },
+{ 0xa, 97, 1, 2562 },
+{ 0x5, 98, 1, 2557 },
+{ 0xa, 98, 1, 2561 },
+{ 0x6, 99, 0, 2560 },
+{ 0x5, 95, 1, 2412 },
+{ 0x9, 96, 1, 2411 },
+{ 0x12, 96, 1, 2407 },
+{ 0x9, 97, 1, 2410 },
+{ 0x12, 97, 1, 2406 },
+{ 0x9, 98, 1, 2409 },
+{ 0x12, 98, 1, 2405 },
+{ 0x5, 99, 0, 2408 },
+{ 0xd, 95, 1, 2268 },
+{ 0x19, 96, 1, 2267 },
+{ 0x19, 97, 1, 2266 },
+{ 0x19, 98, 1, 2265 },
+{ 0x7, 118, 1, 2264 },
+{ 0x7, 119, 1, 2263 },
+{ 0x7, 120, 1, 2262 },
+{ 0x7, 121, 0, 2261 },
+{ 0x3, 95, 1, 2572 },
+{ 0x3, 96, 1, 2571 },
+{ 0x6, 96, 1, 2567 },
+{ 0x3, 97, 1, 2570 },
+{ 0x6, 97, 1, 2566 },
+{ 0x3, 98, 1, 2569 },
+{ 0x6, 98, 1, 2565 },
+{ 0x3, 99, 0, 2568 },
+{ 0x28, 62, 1, 2420 },
+{ 0x44, 63, 1, 2415 },
+{ 0x88, 63, 1, 2419 },
+{ 0x44, 64, 1, 2414 },
+{ 0x88, 64, 1, 2418 },
+{ 0x44, 65, 1, 2413 },
+{ 0x88, 65, 1, 2417 },
+{ 0x28, 66, 0, 2416 },
+{ 0x68, 62, 1, 2276 },
+{ 0x188, 63, 1, 2275 },
+{ 0x188, 64, 1, 2274 },
+{ 0x188, 65, 1, 2273 },
+{ 0x38, 81, 1, 2272 },
+{ 0x38, 82, 1, 2271 },
+{ 0x38, 83, 1, 2270 },
+{ 0x38, 84, 0, 2269 },
+{ 0x18, 62, 1, 2580 },
+{ 0x14, 63, 1, 2575 },
+{ 0x28, 63, 1, 2579 },
+{ 0x14, 64, 1, 2574 },
+{ 0x28, 64, 1, 2578 },
+{ 0x14, 65, 1, 2573 },
+{ 0x28, 65, 1, 2577 },
+{ 0x18, 66, 0, 2576 },
+{ 0x14, 62, 1, 2428 },
+{ 0x24, 63, 1, 2427 },
+{ 0x48, 63, 1, 2423 },
+{ 0x24, 64, 1, 2426 },
+{ 0x48, 64, 1, 2422 },
+{ 0x24, 65, 1, 2425 },
+{ 0x48, 65, 1, 2421 },
+{ 0x14, 66, 0, 2424 },
+{ 0x34, 62, 1, 2284 },
+{ 0x64, 63, 1, 2283 },
+{ 0x64, 64, 1, 2282 },
+{ 0x64, 65, 1, 2281 },
+{ 0x1c, 81, 1, 2280 },
+{ 0x1c, 82, 1, 2279 },
+{ 0x1c, 83, 1, 2278 },
+{ 0x1c, 84, 0, 2277 },
+{ 0xc, 62, 1, 2588 },
+{ 0xc, 63, 1, 2587 },
+{ 0x18, 63, 1, 2583 },
+{ 0xc, 64, 1, 2586 },
+{ 0x18, 64, 1, 2582 },
+{ 0xc, 65, 1, 2585 },
+{ 0x18, 65, 1, 2581 },
+{ 0xc, 66, 0, 2584 },
+{ 0xa, 62, 1, 2436 },
+{ 0x11, 63, 1, 2431 },
+{ 0x22, 63, 1, 2435 },
+{ 0x11, 64, 1, 2430 },
+{ 0x22, 64, 1, 2434 },
+{ 0x11, 65, 1, 2429 },
+{ 0x22, 65, 1, 2433 },
+{ 0xa, 66, 0, 2432 },
+{ 0x1a, 62, 1, 2292 },
+{ 0x62, 63, 1, 2291 },
+{ 0x62, 64, 1, 2290 },
+{ 0x62, 65, 1, 2289 },
+{ 0xe, 81, 1, 2288 },
+{ 0xe, 82, 1, 2287 },
+{ 0xe, 83, 1, 2286 },
+{ 0xe, 84, 0, 2285 },
+{ 0x6, 62, 1, 2596 },
+{ 0x5, 63, 1, 2591 },
+{ 0xa, 63, 1, 2595 },
+{ 0x5, 64, 1, 2590 },
+{ 0xa, 64, 1, 2594 },
+{ 0x5, 65, 1, 2589 },
+{ 0xa, 65, 1, 2593 },
+{ 0x6, 66, 0, 2592 },
+{ 0x5, 62, 1, 2444 },
+{ 0x9, 63, 1, 2443 },
+{ 0x12, 63, 1, 2439 },
+{ 0x9, 64, 1, 2442 },
+{ 0x12, 64, 1, 2438 },
+{ 0x9, 65, 1, 2441 },
+{ 0x12, 65, 1, 2437 },
+{ 0x5, 66, 0, 2440 },
+{ 0xd, 62, 1, 2300 },
+{ 0x19, 63, 1, 2299 },
+{ 0x19, 64, 1, 2298 },
+{ 0x19, 65, 1, 2297 },
+{ 0x7, 81, 1, 2296 },
+{ 0x7, 82, 1, 2295 },
+{ 0x7, 83, 1, 2294 },
+{ 0x7, 84, 0, 2293 },
+{ 0x3, 62, 1, 2604 },
+{ 0x3, 63, 1, 2603 },
+{ 0x6, 63, 1, 2599 },
+{ 0x3, 64, 1, 2602 },
+{ 0x6, 64, 1, 2598 },
+{ 0x3, 65, 1, 2601 },
+{ 0x6, 65, 1, 2597 },
+{ 0x3, 66, 0, 2600 },
+{ 0x8, 86, 1, 2468 },
+{ 0x8, 87, 1, 2467 },
+{ 0x2, 88, 1, 2466 },
+{ 0x2, 89, 1, 2465 },
+{ 0x2, 90, 1, 2464 },
+{ 0x2, 91, 1, 2463 },
+{ 0x2, 92, 1, 2462 },
+{ 0x2, 93, 0, 2461 },
+{ 0x18, 86, 1, 2460 },
+{ 0x18, 87, 1, 2459 },
+{ 0x6, 88, 1, 2458 },
+{ 0x6, 89, 1, 2457 },
+{ 0x6, 90, 1, 2456 },
+{ 0x6, 91, 1, 2455 },
+{ 0x6, 92, 1, 2454 },
+{ 0x6, 93, 0, 2453 },
+{ 0x14, 86, 1, 2448 },
+{ 0x22, 87, 1, 2445 },
+{ 0x44, 87, 1, 2447 },
+{ 0xa, 94, 0, 2446 },
+{ 0x34, 86, 1, 2304 },
+{ 0xc4, 87, 1, 2303 },
+{ 0x38, 93, 1, 2301 },
+{ 0xe, 117, 0, 2302 },
+{ 0xc, 86, 1, 2608 },
+{ 0xa, 87, 1, 2605 },
+{ 0x14, 87, 1, 2607 },
+{ 0x6, 94, 0, 2606 },
+{ 0x2, 86, 1, 2316 },
+{ 0x2, 87, 1, 2315 },
+{ 0x4, 92, 1, 2314 },
+{ 0x4, 93, 0, 2313 },
+{ 0x12, 86, 1, 2312 },
+{ 0x42, 87, 1, 2311 },
+{ 0xc, 92, 1, 2310 },
+{ 0xc, 93, 0, 2309 },
+{ 0xa, 86, 1, 2452 },
+{ 0x12, 87, 1, 2451 },
+{ 0x24, 87, 1, 2449 },
+{ 0x5, 94, 0, 2450 },
+{ 0x1a, 86, 1, 2308 },
+{ 0x32, 87, 1, 2307 },
+{ 0x34, 93, 1, 2305 },
+{ 0x7, 117, 0, 2306 },
+{ 0x6, 86, 1, 2612 },
+{ 0x6, 87, 1, 2611 },
+{ 0xc, 87, 1, 2609 },
+{ 0x3, 94, 0, 2610 },
+{ 0x1, 86, 1, 2628 },
+{ 0x1, 87, 1, 2627 },
+{ 0x1, 88, 1, 2626 },
+{ 0x1, 89, 1, 2625 },
+{ 0x1, 90, 1, 2624 },
+{ 0x1, 91, 1, 2623 },
+{ 0x1, 92, 1, 2622 },
+{ 0x1, 93, 0, 2621 },
+{ 0x3, 86, 1, 2620 },
+{ 0x3, 87, 1, 2619 },
+{ 0x3, 88, 1, 2618 },
+{ 0x3, 89, 1, 2617 },
+{ 0x3, 90, 1, 2616 },
+{ 0x3, 91, 1, 2615 },
+{ 0x3, 92, 1, 2614 },
+{ 0x3, 93, 0, 2613 },
+{ 0x8, 53, 1, 2492 },
+{ 0x8, 54, 1, 2491 },
+{ 0x2, 55, 1, 2490 },
+{ 0x2, 56, 1, 2489 },
+{ 0x2, 57, 1, 2488 },
+{ 0x2, 58, 1, 2487 },
+{ 0x2, 59, 1, 2486 },
+{ 0x2, 60, 0, 2485 },
+{ 0x18, 53, 1, 2484 },
+{ 0x18, 54, 1, 2483 },
+{ 0x6, 55, 1, 2482 },
+{ 0x6, 56, 1, 2481 },
+{ 0x6, 57, 1, 2480 },
+{ 0x6, 58, 1, 2479 },
+{ 0x6, 59, 1, 2478 },
+{ 0x6, 60, 0, 2477 },
+{ 0x14, 53, 1, 2472 },
+{ 0x22, 54, 1, 2469 },
+{ 0x44, 54, 1, 2471 },
+{ 0xa, 61, 0, 2470 },
+{ 0x34, 53, 1, 2320 },
+{ 0xc4, 54, 1, 2319 },
+{ 0x38, 60, 1, 2317 },
+{ 0xe, 80, 0, 2318 },
+{ 0xc, 53, 1, 2632 },
+{ 0xa, 54, 1, 2629 },
+{ 0x14, 54, 1, 2631 },
+{ 0x6, 61, 0, 2630 },
+{ 0x2, 53, 1, 2332 },
+{ 0x2, 54, 1, 2331 },
+{ 0x4, 59, 1, 2330 },
+{ 0x4, 60, 0, 2329 },
+{ 0x12, 53, 1, 2328 },
+{ 0x42, 54, 1, 2327 },
+{ 0xc, 59, 1, 2326 },
+{ 0xc, 60, 0, 2325 },
+{ 0xa, 53, 1, 2476 },
+{ 0x12, 54, 1, 2475 },
+{ 0x24, 54, 1, 2473 },
+{ 0x5, 61, 0, 2474 },
+{ 0x1a, 53, 1, 2324 },
+{ 0x32, 54, 1, 2323 },
+{ 0x34, 60, 1, 2321 },
+{ 0x7, 80, 0, 2322 },
+{ 0x6, 53, 1, 2636 },
+{ 0x6, 54, 1, 2635 },
+{ 0xc, 54, 1, 2633 },
+{ 0x3, 61, 0, 2634 },
+{ 0x1, 53, 1, 2652 },
+{ 0x1, 54, 1, 2651 },
+{ 0x1, 55, 1, 2650 },
+{ 0x1, 56, 1, 2649 },
+{ 0x1, 57, 1, 2648 },
+{ 0x1, 58, 1, 2647 },
+{ 0x1, 59, 1, 2646 },
+{ 0x1, 60, 0, 2645 },
+{ 0x3, 53, 1, 2644 },
+{ 0x3, 54, 1, 2643 },
+{ 0x3, 55, 1, 2642 },
+{ 0x3, 56, 1, 2641 },
+{ 0x3, 57, 1, 2640 },
+{ 0x3, 58, 1, 2639 },
+{ 0x3, 59, 1, 2638 },
+{ 0x3, 60, 0, 2637 },
+{ 0x1, 4, 0, 2653 },
+{ 0x1, 296, 0, 2654 },
+{ 0x1, 379, 0, 2655 },
+{ 0x1, 374, 0, 2656 },
+{ 0x2, 358, 0, 2657 },
+{ 0x1, 358, 0, 2660 },
+{ 0x2, 357, 0, 2658 },
+{ 0x1, 357, 0, 2661 },
+{ 0x2, 356, 0, 2659 },
+{ 0x1, 356, 0, 2662 },
+{ 0x1, 355, 0, 2663 },
+{ 0x1, 354, 0, 2664 },
+{ 0x2, 353, 0, 2665 },
+{ 0x1, 353, 0, 2667 },
+{ 0x2, 352, 0, 2666 },
+{ 0x1, 352, 0, 2668 },
+{ 0x1, 382, 0, 2675 },
+{ 0x8, 381, 0, 2669 },
+{ 0x4, 381, 0, 2671 },
+{ 0x2, 381, 0, 2673 },
+{ 0x1, 381, 0, 2676 },
+{ 0x8, 380, 0, 2670 },
+{ 0x4, 380, 0, 2672 },
+{ 0x2, 380, 0, 2674 },
+{ 0x1, 380, 0, 2677 },
+{ 0x1, 351, 0, 2684 },
+{ 0x8, 350, 0, 2678 },
+{ 0x4, 350, 0, 2680 },
+{ 0x2, 350, 0, 2682 },
+{ 0x1, 350, 0, 2685 },
+{ 0x8, 349, 0, 2679 },
+{ 0x4, 349, 0, 2681 },
+{ 0x2, 349, 1, 2683 },
+{ 0x4, 143, 0, 1377 },
+{ 0x1, 349, 0, 2686 },
+{ 0x1, 6, 0, 2687 },
+{ 0x1, 7, 0, 2688 },
+{ 0x1, 295, 0, 2689 },
+{ 0x1, 456, 0, 2690 },
+{ 0x1, 346, 0, 2691 },
+{ 0x1, 13, 0, 2692 },
+{ 0x1, 11, 0, 2693 },
+{ 0x1, 422, 0, 2694 },
+{ 0x1, 394, 0, 2695 },
+{ 0x1, 393, 0, 2696 },
+{ 0x1, 455, 0, 2697 },
+{ 0x1, 345, 0, 2698 },
+{ 0x1, 12, 0, 2699 },
+{ 0x1, 10, 0, 2700 },
+{ 0x1, 5, 0, 2701 },
+{ 0x1, 421, 0, 2702 },
+{ 0x1, 420, 0, 2703 },
+{ 0x1, 1, 0, 2704 },
+{ 0x1, 0, 0, 2705 },
};
diff --git a/contrib/binutils/opcodes/ia64-asmtab.h b/contrib/binutils/opcodes/ia64-asmtab.h
index 822007a3b78a..5e568e0b3006 100644
--- a/contrib/binutils/opcodes/ia64-asmtab.h
+++ b/contrib/binutils/opcodes/ia64-asmtab.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef IA64_ASMTAB_H
#define IA64_ASMTAB_H
diff --git a/contrib/binutils/opcodes/ia64-dis.c b/contrib/binutils/opcodes/ia64-dis.c
index 4c63815289c3..c40622686fa9 100644
--- a/contrib/binutils/opcodes/ia64-dis.c
+++ b/contrib/binutils/opcodes/ia64-dis.c
@@ -1,5 +1,5 @@
/* ia64-dis.c -- Disassemble ia64 instructions
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <assert.h>
#include <string.h>
@@ -109,7 +109,7 @@ print_insn_ia64 (bfd_vma memaddr, struct disassemble_info *info)
if (slotnum == 0)
(*info->fprintf_func) (info->stream, "[%s] ", tname);
else
- (*info->fprintf_func) (info->stream, " ", tname);
+ (*info->fprintf_func) (info->stream, " ");
unit = ia64_templ_desc[template].exec_unit[slotnum];
@@ -237,11 +237,11 @@ print_insn_ia64 (bfd_vma memaddr, struct disassemble_info *info)
if (str)
(*info->fprintf_func) (info->stream, "%s", str);
else if (odesc->flags & IA64_OPND_FLAG_DECIMAL_SIGNED)
- (*info->fprintf_func) (info->stream, "%lld", value);
+ (*info->fprintf_func) (info->stream, "%lld", (long long) value);
else if (odesc->flags & IA64_OPND_FLAG_DECIMAL_UNSIGNED)
- (*info->fprintf_func) (info->stream, "%llu", value);
+ (*info->fprintf_func) (info->stream, "%llu", (long long) value);
else
- (*info->fprintf_func) (info->stream, "0x%llx", value);
+ (*info->fprintf_func) (info->stream, "0x%llx", (long long) value);
break;
case IA64_OPND_CLASS_REL:
@@ -268,6 +268,6 @@ print_insn_ia64 (bfd_vma memaddr, struct disassemble_info *info)
return retval;
decoding_failed:
- (*info->fprintf_func) (info->stream, " data8 %#011llx", insn);
+ (*info->fprintf_func) (info->stream, " data8 %#011llx", (long long) insn);
goto failed;
}
diff --git a/contrib/binutils/opcodes/ia64-gen.c b/contrib/binutils/opcodes/ia64-gen.c
index a4e2cecd20bf..556228319a85 100644
--- a/contrib/binutils/opcodes/ia64-gen.c
+++ b/contrib/binutils/opcodes/ia64-gen.c
@@ -1,5 +1,6 @@
/* ia64-gen.c -- Generate a shrunk set of opcode tables
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2006
+ Free Software Foundation, Inc.
Written by Bob Manson, Cygnus Solutions, <manson@cygnus.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
/* While the ia64-opc-* set of opcode tables are easy to maintain,
they waste a tremendous amount of space. ia64-gen rearranges the
@@ -53,9 +54,19 @@
#include <libintl.h>
#define _(String) gettext (String)
+/* This is a copy of fprintf_vma from bfd/bfd-in2.h. We have to use this
+ always, because we might be compiled without BFD64 defined, if configured
+ for a 32-bit target and --enable-targets=all is used. This will work for
+ both 32-bit and 64-bit hosts. */
+#define _opcode_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
+#define _opcode_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
+#define opcode_fprintf_vma(s,x) \
+ fprintf ((s), "%08lx%08lx", _opcode_int64_high (x), _opcode_int64_low (x))
+
const char * program_name = NULL;
int debug = 0;
+#define NELEMS(a) (sizeof (a) / sizeof ((a)[0]))
#define tmalloc(X) (X *) xmalloc (sizeof (X))
/* The main opcode table entry. Each entry is a unique combination of
@@ -237,8 +248,8 @@ static int dlistlen = 0;
static int dlisttotlen = 0;
-static void fail (const char *, ...);
-static void warn (const char *, ...);
+static void fail (const char *, ...) ATTRIBUTE_PRINTF_1;
+static void warn (const char *, ...) ATTRIBUTE_PRINTF_1;
static struct rdep * insert_resource (const char *, enum ia64_dependency_mode);
static int deplist_equals (struct deplist *, struct deplist *);
static short insert_deplist (int, unsigned short *);
@@ -1134,7 +1145,13 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
else if (strcmp (ic->name, "invala") == 0)
resolved = strcmp (idesc->name, ic->name) == 0;
else if (strncmp (idesc->name, "st", 2) == 0
- && strstr (format, "M5") != NULL)
+ && (strstr (format, "M5") != NULL
+ || strstr (format, "M10") != NULL))
+ resolved = idesc->flags & IA64_OPCODE_POSTINC;
+ else if (strncmp (idesc->name, "ld", 2) == 0
+ && (strstr (format, "M2 M3") != NULL
+ || strstr (format, "M12") != NULL
+ || strstr (format, "M7 M8") != NULL))
resolved = idesc->flags & IA64_OPCODE_POSTINC;
else
resolved = 0;
@@ -1392,6 +1409,8 @@ lookup_regindex (const char *name, int specifier)
return 44;
else if (strstr (name, ".ia"))
return 45;
+ else if (strstr (name, ".vm"))
+ return 46;
else
abort ();
default:
@@ -1552,7 +1571,20 @@ print_dependency_table ()
rdeps[i]->name, specifier,
(int)rdeps[i]->mode, (int)rdeps[i]->semantics, regindex);
if (rdeps[i]->semantics == IA64_DVS_OTHER)
- printf ("\"%s\", ", rdeps[i]->extra);
+ {
+ const char *quote, *rest;
+
+ putchar ('\"');
+ rest = rdeps[i]->extra;
+ quote = strchr (rest, '\"');
+ while (quote != NULL)
+ {
+ printf ("%.*s\\\"", (int) (quote - rest), rest);
+ rest = quote + 1;
+ quote = strchr (rest, '\"');
+ }
+ printf ("%s\", ", rest);
+ }
else
printf ("NULL, ");
printf("},\n");
@@ -1563,7 +1595,7 @@ print_dependency_table ()
for (i=0;i < dlistlen;i++)
{
int len = 2;
- printf ("static const short dep%d[] = {\n ", i);
+ printf ("static const unsigned short dep%d[] = {\n ", i);
for (j=0;j < dlists[i]->len; j++)
{
len += printf ("%d, ", dlists[i]->deps[j]);
@@ -1906,7 +1938,7 @@ gen_dis_table (ent)
if ((needed_bytes + insn_list_len) > tot_insn_list_len)
{
tot_insn_list_len += 256;
- insn_list = (char *) xrealloc (insn_list, tot_insn_list_len);
+ insn_list = (unsigned char *) xrealloc (insn_list, tot_insn_list_len);
}
our_offset = insn_list_len;
insn_list_len += needed_bytes;
@@ -2057,7 +2089,7 @@ gen_dis_table (ent)
/* Store the address of the entry being branched to. */
while (currbits >= 0)
{
- char *byte = insn_list + our_offset + bitsused / 8;
+ unsigned char *byte = insn_list + our_offset + bitsused / 8;
if (idest & (1 << currbits))
*byte |= (1 << (7 - (bitsused % 8)));
@@ -2693,9 +2725,9 @@ print_main_table (void)
ptr->name->num,
ptr->opcode->type,
ptr->opcode->num_outputs);
- fprintf_vma (stdout, ptr->opcode->opcode);
+ opcode_fprintf_vma (stdout, ptr->opcode->opcode);
printf ("ull, 0x");
- fprintf_vma (stdout, ptr->opcode->mask);
+ opcode_fprintf_vma (stdout, ptr->opcode->mask);
printf ("ull, { %d, %d, %d, %d, %d }, 0x%x, %d, },\n",
ptr->opcode->operands[0],
ptr->opcode->operands[1],
@@ -2719,7 +2751,26 @@ shrink (table)
int curr_opcode;
for (curr_opcode = 0; table[curr_opcode].name != NULL; curr_opcode++)
- add_opcode_entry (table + curr_opcode);
+ {
+ add_opcode_entry (table + curr_opcode);
+ if (table[curr_opcode].num_outputs == 2
+ && ((table[curr_opcode].operands[0] == IA64_OPND_P1
+ && table[curr_opcode].operands[1] == IA64_OPND_P2)
+ || (table[curr_opcode].operands[0] == IA64_OPND_P2
+ && table[curr_opcode].operands[1] == IA64_OPND_P1)))
+ {
+ struct ia64_opcode *alias = tmalloc(struct ia64_opcode);
+ unsigned i;
+
+ *alias = table[curr_opcode];
+ for (i = 2; i < NELEMS (alias->operands); ++i)
+ alias->operands[i - 1] = alias->operands[i];
+ alias->operands[NELEMS (alias->operands) - 1] = IA64_OPND_NIL;
+ --alias->num_outputs;
+ alias->flags |= PSEUDO;
+ add_opcode_entry (alias);
+ }
+ }
}
diff --git a/contrib/binutils/opcodes/ia64-ic.tbl b/contrib/binutils/opcodes/ia64-ic.tbl
index 45e3bd5eb054..50cbff0e5b3d 100644
--- a/contrib/binutils/opcodes/ia64-ic.tbl
+++ b/contrib/binutils/opcodes/ia64-ic.tbl
@@ -20,10 +20,10 @@ fpcmp-s0; fpcmp[Field(sf)==s0]
fpcmp-s1; fpcmp[Field(sf)==s1]
fpcmp-s2; fpcmp[Field(sf)==s2]
fpcmp-s3; fpcmp[Field(sf)==s3]
-fr-readers; IC:fp-arith, IC:fp-non-arith, IC:pr-writers-fp, chk.s[Format in {M21}], getf, IC:mem-writers-fp
+fr-readers; IC:fp-arith, IC:fp-non-arith, IC:mem-writers-fp, IC:pr-writers-fp, chk.s[Format in {M21}], getf
fr-writers; IC:fp-arith, IC:fp-non-arith\fclass, IC:mem-readers-fp, setf
gr-readers; IC:gr-readers-writers, IC:mem-readers, IC:mem-writers, chk.s, cmp, cmp4, fc, itc.i, itc.d, itr.i, itr.d, IC:mov-to-AR-gr, IC:mov-to-BR, IC:mov-to-CR, IC:mov-to-IND, IC:mov-from-IND, IC:mov-to-PR-allreg, IC:mov-to-PSR-l, IC:mov-to-PSR-um, IC:probe-all, ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, setf, tbit, tnat
-gr-readers-writers; IC:mov-from-IND, add, addl, addp4, adds, and, andcm, IC:czx, dep\dep[Format in {I13}], extr, IC:mem-readers-int, IC:ld-all-postinc, IC:lfetch-postinc, IC:mix, IC:mux, or, IC:pack, IC:padd, IC:pavg, IC:pavgsub, IC:pcmp, IC:pmax, IC:pmin, IC:pmpy, IC:pmpyshr, popcnt, IC:probe-nofault, IC:psad, IC:pshl, IC:pshladd, IC:pshr, IC:pshradd, IC:psub, shl, shladd, shladdp4, shr, shrp, IC:st-postinc, sub, IC:sxt, tak, thash, tpa, ttag, IC:unpack, xor, IC:zxt
+gr-readers-writers; IC:mov-from-IND, add, addl, addp4, adds, and, andcm, clz, IC:czx, dep\dep[Format in {I13}], extr, IC:mem-readers-int, IC:ld-all-postinc, IC:lfetch-postinc, IC:mix, IC:mux, or, IC:pack, IC:padd, IC:pavg, IC:pavgsub, IC:pcmp, IC:pmax, IC:pmin, IC:pmpy, IC:pmpyshr, popcnt, IC:probe-nofault, IC:psad, IC:pshl, IC:pshladd, IC:pshr, IC:pshradd, IC:psub, shl, shladd, shladdp4, shr, shrp, shrp4, IC:st-postinc, sub, IC:sxt, tak, thash, tpa, ttag, IC:unpack, xor, IC:zxt
gr-writers; alloc, dep, getf, IC:gr-readers-writers, IC:mem-readers-int, IC:mov-from-AR, IC:mov-from-BR, IC:mov-from-CR, IC:mov-from-PR, IC:mov-from-PSR, IC:mov-from-PSR-um, IC:mov-ip, movl
indirect-brp; brp[Format in {B7}]
indirect-brs; br.call[Format in {B5}], br.cond[Format in {B4}], br.ia, br.ret
@@ -127,8 +127,9 @@ mov-from-IND-MSR; IC:mov-from-IND[Field(ireg) == msr]
mov-from-IND-PKR; IC:mov-from-IND[Field(ireg) == pkr]
mov-from-IND-PMC; IC:mov-from-IND[Field(ireg) == pmc]
mov-from-IND-PMD; IC:mov-from-IND[Field(ireg) == pmd]
-mov-from-IND-priv; IC:mov-from-IND[Field(ireg) in {dbr ibr msr pkr pmc rr}]
+mov-from-IND-priv; IC:mov-from-IND[Field(ireg) in {dbr ibr pkr pmc rr}]
mov-from-IND-RR; IC:mov-from-IND[Field(ireg) == rr]
+mov-from-interruption-CR; IC:mov-from-CR-ITIR, IC:mov-from-CR-IFS, IC:mov-from-CR-IIM, IC:mov-from-CR-IIP, IC:mov-from-CR-IPSR, IC:mov-from-CR-ISR, IC:mov-from-CR-IFA, IC:mov-from-CR-IHA, IC:mov-from-CR-IIPA
mov-from-PR; mov_pr[Format in {I25}]
mov-from-PSR; mov_psr[Format in {M36}]
mov-from-PSR-um; mov_um[Format in {M36}]
@@ -194,12 +195,14 @@ mov-to-IND-PMC; IC:mov-to-IND[Field(ireg) == pmc]
mov-to-IND-PMD; IC:mov-to-IND[Field(ireg) == pmd]
mov-to-IND-priv; IC:mov-to-IND
mov-to-IND-RR; IC:mov-to-IND[Field(ireg) == rr]
+mov-to-interruption-CR; IC:mov-to-CR-ITIR, IC:mov-to-CR-IFS, IC:mov-to-CR-IIM, IC:mov-to-CR-IIP, IC:mov-to-CR-IPSR, IC:mov-to-CR-ISR, IC:mov-to-CR-IFA, IC:mov-to-CR-IHA, IC:mov-to-CR-IIPA
mov-to-PR; IC:mov-to-PR-allreg, IC:mov-to-PR-rotreg
mov-to-PR-allreg; mov_pr[Format in {I23}]
mov-to-PR-rotreg; mov_pr[Format in {I24}]
mov-to-PSR-l; mov_psr[Format in {M35}]
mov-to-PSR-um; mov_um[Format in {M35}]
mux; mux1, mux2
+non-access; fc, lfetch, IC:probe-all, tpa, tak
none; -
pack; pack2, pack4
padd; padd1, padd2, padd4
@@ -212,19 +215,19 @@ pmpy; pmpy2
pmpyshr; pmpyshr2
pr-and-writers; IC:pr-gen-writers-int[Field(ctype) in {and andcm}], IC:pr-gen-writers-int[Field(ctype) in {or.andcm and.orcm}]
pr-gen-writers-fp; fclass, fcmp
-pr-gen-writers-int; cmp, cmp4, tbit, tnat
+pr-gen-writers-int; cmp, cmp4, tbit, tf, tnat
pr-norm-writers-fp; IC:pr-gen-writers-fp[Field(ctype)==]
pr-norm-writers-int; IC:pr-gen-writers-int[Field(ctype)==]
pr-or-writers; IC:pr-gen-writers-int[Field(ctype) in {or orcm}], IC:pr-gen-writers-int[Field(ctype) in {or.andcm and.orcm}]
pr-readers-br; br.call, br.cond, brl.call, brl.cond, br.ret, br.wexit, br.wtop, break.b, hint.b, nop.b, IC:ReservedBQP
-pr-readers-nobr-nomovpr; add, addl, addp4, adds, and, andcm, break.f, break.i, break.m, break.x, chk.s, IC:chk-a, cmp, cmp4, IC:cmpxchg, IC:czx, dep, extr, IC:fp-arith, IC:fp-non-arith, fc, fchkf, fclrf, fcmp, IC:fetchadd, fpcmp, fsetc, fwb, getf, hint.f, hint.i, hint.m, hint.x, IC:invala-all, itc.i, itc.d, itr.i, itr.d, IC:ld, IC:ldf, IC:ldfp, IC:lfetch-all, mf, IC:mix, IC:mov-from-AR-M, IC:mov-from-AR-IM, IC:mov-from-AR-I, IC:mov-to-AR-M, IC:mov-to-AR-I, IC:mov-to-AR-IM, IC:mov-to-BR, IC:mov-from-BR, IC:mov-to-CR, IC:mov-from-CR, IC:mov-to-IND, IC:mov-from-IND, IC:mov-ip, IC:mov-to-PSR-l, IC:mov-to-PSR-um, IC:mov-from-PSR, IC:mov-from-PSR-um, movl, IC:mux, nop.f, nop.i, nop.m, nop.x, or, IC:pack, IC:padd, IC:pavg, IC:pavgsub, IC:pcmp, IC:pmax, IC:pmin, IC:pmpy, IC:pmpyshr, popcnt, IC:probe-all, IC:psad, IC:pshl, IC:pshladd, IC:pshr, IC:pshradd, IC:psub, ptc.e, ptc.g, ptc.ga, ptc.l, ptr.d, ptr.i, IC:ReservedQP, rsm, setf, shl, shladd, shladdp4, shr, shrp, srlz.i, srlz.d, ssm, IC:st, IC:stf, sub, sum, IC:sxt, sync, tak, tbit, thash, tnat, tpa, ttag, IC:unpack, IC:xchg, xma, xmpy, xor, IC:zxt
+pr-readers-nobr-nomovpr; add, addl, addp4, adds, and, andcm, break.f, break.i, break.m, break.x, chk.s, IC:chk-a, cmp, cmp4, IC:cmpxchg, clz, IC:czx, dep, extr, IC:fp-arith, IC:fp-non-arith, fc, fchkf, fclrf, fcmp, IC:fetchadd, fpcmp, fsetc, fwb, getf, hint.f, hint.i, hint.m, hint.x, IC:invala-all, itc.i, itc.d, itr.i, itr.d, IC:ld, IC:ldf, IC:ldfp, IC:lfetch-all, mf, IC:mix, IC:mov-from-AR-M, IC:mov-from-AR-IM, IC:mov-from-AR-I, IC:mov-to-AR-M, IC:mov-to-AR-I, IC:mov-to-AR-IM, IC:mov-to-BR, IC:mov-from-BR, IC:mov-to-CR, IC:mov-from-CR, IC:mov-to-IND, IC:mov-from-IND, IC:mov-ip, IC:mov-to-PSR-l, IC:mov-to-PSR-um, IC:mov-from-PSR, IC:mov-from-PSR-um, movl, IC:mux, nop.f, nop.i, nop.m, nop.x, or, IC:pack, IC:padd, IC:pavg, IC:pavgsub, IC:pcmp, IC:pmax, IC:pmin, IC:pmpy, IC:pmpyshr, popcnt, IC:probe-all, IC:psad, IC:pshl, IC:pshladd, IC:pshr, IC:pshradd, IC:psub, ptc.e, ptc.g, ptc.ga, ptc.l, ptr.d, ptr.i, IC:ReservedQP, rsm, setf, shl, shladd, shladdp4, shr, shrp, shrp4, srlz.i, srlz.d, ssm, IC:st, IC:stf, sub, sum, IC:sxt, sync, tak, tbit, tf, thash, tnat, tpa, ttag, IC:unpack, IC:xchg, xma, xmpy, xor, IC:zxt
pr-unc-writers-fp; IC:pr-gen-writers-fp[Field(ctype)==unc]+11, fprcpa+11, fprsqrta+11, frcpa+11, frsqrta+11
pr-unc-writers-int; IC:pr-gen-writers-int[Field(ctype)==unc]+11
pr-writers; IC:pr-writers-int, IC:pr-writers-fp
pr-writers-fp; IC:pr-norm-writers-fp, IC:pr-unc-writers-fp
pr-writers-int; IC:pr-norm-writers-int, IC:pr-unc-writers-int, IC:pr-and-writers, IC:pr-or-writers
predicatable-instructions; IC:mov-from-PR, IC:mov-to-PR, IC:pr-readers-br, IC:pr-readers-nobr-nomovpr
-priv-ops; IC:mov-to-IND-priv, bsw, itc.i, itc.d, itr.i, itr.d, IC:mov-to-CR, IC:mov-from-CR, IC:mov-to-PSR-l, IC:mov-from-PSR, IC:mov-from-IND-priv, ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, rfi, rsm, ssm, tak, tpa
+priv-ops; IC:mov-to-IND-priv, bsw, itc.i, itc.d, itr.i, itr.d, IC:mov-to-CR, IC:mov-from-CR, IC:mov-to-PSR-l, IC:mov-from-PSR, IC:mov-from-IND-priv, ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, rfi, rsm, ssm, tak, tpa, vmsw
probe-all; IC:probe-fault, IC:probe-nofault
probe-fault; probe[Format in {M40}]
probe-nofault; probe[Format in {M38 M39}]
@@ -244,7 +247,7 @@ stf; stfs, stfd, stfe, stf8, stf.spill
sxt; sxt1, sxt2, sxt4
sys-mask-writers-partial; rsm, ssm
unpack; unpack1, unpack2, unpack4
-unpredicatable-instructions; alloc, br.cloop, br.ctop, br.cexit, br.ia, brp, bsw, clrrrb, cover, epc, flushrs, loadrs, rfi
+unpredicatable-instructions; alloc, br.cloop, br.ctop, br.cexit, br.ia, brp, bsw, clrrrb, cover, epc, flushrs, loadrs, rfi, vmsw
user-mask-writers-partial; rum, sum
xchg; xchg1, xchg2, xchg4, xchg8
zxt; zxt1, zxt2, zxt4
diff --git a/contrib/binutils/opcodes/ia64-opc-a.c b/contrib/binutils/opcodes/ia64-opc-a.c
index c9e316234f85..e8650946fc61 100644
--- a/contrib/binutils/opcodes/ia64-opc-a.c
+++ b/contrib/binutils/opcodes/ia64-opc-a.c
@@ -1,5 +1,6 @@
/* ia64-opc-a.c -- IA-64 `A' opcode table.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2004
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "ia64-opc.h"
@@ -107,7 +108,8 @@ struct ia64_opcode ia64_opcodes_a[] =
{"or", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 2), {R1, IMM8, R3}, EMPTY},
{"xor", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 3), {R1, IMM8, R3}, EMPTY},
{"mov", A, OpX2aVeImm14 (8, 2, 0, 0), {R1, R3}, EMPTY},
- {"mov", A, OpX2aVeR3a (8, 2, 0, 0), {R1, IMM14}, PSEUDO, 0, NULL},
+ /* A mov immediate pseudo for adds was deleted. It failed for immediate
+ operands requiring relocs, e.g. @pltoff(a). */
{"adds", A, OpX2aVe (8, 2, 0), {R1, IMM14, R3}, EMPTY},
{"addp4", A, OpX2aVe (8, 3, 0), {R1, IMM14, R3}, EMPTY},
{"padd1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 0), {R1, R2, R3}, EMPTY},
diff --git a/contrib/binutils/opcodes/ia64-opc-b.c b/contrib/binutils/opcodes/ia64-opc-b.c
index fc57ab669d10..dbc74e1bb86e 100644
--- a/contrib/binutils/opcodes/ia64-opc-b.c
+++ b/contrib/binutils/opcodes/ia64-opc-b.c
@@ -1,5 +1,6 @@
/* ia64-opc-b.c -- IA-64 `B' opcode table.
- Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002, 2005, 2006
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "ia64-opc.h"
@@ -197,6 +198,8 @@ struct ia64_opcode ia64_opcodes_b[] =
{"bsw.0", B0, OpX6 (0, 0x0c), {0, }, NO_PRED | LAST | PRIV, 0, NULL},
{"bsw.1", B0, OpX6 (0, 0x0d), {0, }, NO_PRED | LAST | PRIV, 0, NULL},
{"epc", B0, OpX6 (0, 0x10), {0, }, NO_PRED, 0, NULL},
+ {"vmsw.0", B0, OpX6 (0, 0x18), {0, }, NO_PRED | PRIV, 0, NULL},
+ {"vmsw.1", B0, OpX6 (0, 0x19), {0, }, NO_PRED | PRIV, 0, NULL},
{"break.b", B0, OpX6 (0, 0x00), {IMMU21}, EMPTY},
diff --git a/contrib/binutils/opcodes/ia64-opc-d.c b/contrib/binutils/opcodes/ia64-opc-d.c
index d916085242e3..f0bd064cb9a0 100644
--- a/contrib/binutils/opcodes/ia64-opc-d.c
+++ b/contrib/binutils/opcodes/ia64-opc-d.c
@@ -1,5 +1,5 @@
/* ia64-opc-d.c -- IA-64 `D' opcode table.
- Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
struct ia64_opcode ia64_opcodes_d[] =
{
diff --git a/contrib/binutils/opcodes/ia64-opc-f.c b/contrib/binutils/opcodes/ia64-opc-f.c
index 89dbcdee1841..0b13c9c98dad 100644
--- a/contrib/binutils/opcodes/ia64-opc-f.c
+++ b/contrib/binutils/opcodes/ia64-opc-f.c
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "ia64-opc.h"
diff --git a/contrib/binutils/opcodes/ia64-opc-i.c b/contrib/binutils/opcodes/ia64-opc-i.c
index 86440f7b57f6..69cd969f6f16 100644
--- a/contrib/binutils/opcodes/ia64-opc-i.c
+++ b/contrib/binutils/opcodes/ia64-opc-i.c
@@ -1,5 +1,6 @@
/* ia64-opc-i.c -- IA-64 `I' opcode table.
- Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002, 2005, 2006
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "ia64-opc.h"
@@ -36,6 +37,7 @@
#define bWh(x) (((ia64_insn) ((x) & 0x3)) << 20)
#define bX(x) (((ia64_insn) ((x) & 0x1)) << 33)
#define bXb(x) (((ia64_insn) ((x) & 0x1)) << 22)
+#define bXc(x) (((ia64_insn) ((x) & 0x1)) << 19)
#define bX2(x) (((ia64_insn) ((x) & 0x3)) << 34)
#define bX2a(x) (((ia64_insn) ((x) & 0x3)) << 34)
#define bX2b(x) (((ia64_insn) ((x) & 0x3)) << 28)
@@ -58,6 +60,7 @@
#define mWh bWh (-1)
#define mX bX (-1)
#define mXb bXb (-1)
+#define mXc bXc (-1)
#define mX2 bX2 (-1)
#define mX2a bX2a (-1)
#define mX2b bX2b (-1)
@@ -83,6 +86,9 @@
#define OpX2TaTbYaC(a,b,c,d,e,f) \
(bOp (a) | bX2 (b) | bTa (c) | bTb (d) | bYa (e) | bC (f)), \
(mOp | mX2 | mTa | mTb | mYa | mC)
+#define OpX2TaTbYaXcC(a,b,c,d,e,f,g) \
+ (bOp (a) | bX2 (b) | bTa (c) | bTb (d) | bYa (e) | bXc (f) | bC (g)), \
+ (mOp | mX2 | mTa | mTb | mYa | mXc | mC)
#define OpX3(a,b) (bOp (a) | bX3 (b)), (mOp | mX3)
#define OpX3X6(a,b,c) (bOp (a) | bX3 (b) | bX6(c)), \
(mOp | mX3 | mX6)
@@ -95,6 +101,8 @@
(bOp (a) | bX3 (b) | bXb (c) | bIh (d) | bWh (e) | bTag13 (f)), \
(mOp | mX3 | mXb | mIh | mWh | mTag13)
+#define FULL17 ((ia64_insn)0x10ff001fc0LL)
+
/* Used to initialise unused fields in ia64_opcode struct,
in order to stop gcc from complaining. */
#define EMPTY 0,0,NULL
@@ -126,6 +134,8 @@ struct ia64_opcode ia64_opcodes_i[] =
#undef MOV
{"mov", I, OpX3X6 (0, 0, 0x31), {R1, B2}, EMPTY},
{"mov", I, OpX3 (0, 3), {PR, R2, IMM17}, EMPTY},
+ /* Don't remove one of the seemingly redundant FULL17-s. */
+ {"mov", I, FULL17 | OpX3 (0, 3) | FULL17, {PR, R2}, PSEUDO, 0, NULL},
{"mov", I, OpX3 (0, 2), {PR_ROT, IMM44}, EMPTY},
{"mov", I, OpX3X6 (0, 0, 0x30), {R1, IP}, EMPTY},
{"mov", I, OpX3X6 (0, 0, 0x33), {R1, PR}, EMPTY},
@@ -160,6 +170,28 @@ struct ia64_opcode ia64_opcodes_i[] =
{"dep.z", I, OpX2XYb (5, 1, 1, 0), {R1, R2, CPOS6a, LEN6}, EMPTY},
{"dep.z", I, OpX2XYb (5, 1, 1, 1), {R1, IMM8, CPOS6a, LEN6}, EMPTY},
{"dep", I, OpX2X (5, 3, 1), {R1, IMM1, R3, CPOS6b, LEN6}, EMPTY},
+#define TF(a,b,c) \
+ I2, OpX2TaTbYaXcC (5, 0, a, b, 1, 1, c), {P1, P2, IMMU5b}, EMPTY
+#define TFCM(a,b,c) \
+ I2, OpX2TaTbYaXcC (5, 0, a, b, 1, 1, c), {P2, P1, IMMU5b}, PSEUDO, 0, NULL
+ {"tf.z", TF (0, 0, 0)},
+ {"tf.nz", TFCM (0, 0, 0)},
+ {"tf.z.unc", TF (0, 0, 1)},
+ {"tf.nz.unc", TFCM (0, 0, 1)},
+ {"tf.z.and", TF (0, 1, 0)},
+ {"tf.nz.andcm", TFCM (0, 1, 0)},
+ {"tf.nz.and", TF (0, 1, 1)},
+ {"tf.z.andcm", TFCM (0, 1, 1)},
+ {"tf.z.or", TF (1, 0, 0)},
+ {"tf.nz.orcm", TFCM (1, 0, 0)},
+ {"tf.nz.or", TF (1, 0, 1)},
+ {"tf.z.orcm", TFCM (1, 0, 1)},
+ {"tf.z.or.andcm", TF (1, 1, 0)},
+ {"tf.nz.and.orcm", TFCM (1, 1, 0)},
+ {"tf.nz.or.andcm", TF (1, 1, 1)},
+ {"tf.z.and.orcm", TFCM (1, 1, 1)},
+#undef TF
+#undef TFCM
#define TBIT(a,b,c,d) \
I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P1, P2, R3, POS6}, EMPTY
#define TBITCM(a,b,c,d) \
@@ -181,6 +213,7 @@ struct ia64_opcode ia64_opcodes_i[] =
{"tbit.nz.or.andcm", TBIT (1, 1, 0, 1)},
{"tbit.z.and.orcm", TBITCM (1, 1, 0, 1)},
#undef TBIT
+#undef TBITCM
#define TNAT(a,b,c,d) \
I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P1, P2, R3}, EMPTY
#define TNATCM(a,b,c,d) \
@@ -202,6 +235,7 @@ struct ia64_opcode ia64_opcodes_i[] =
{"tnat.nz.or.andcm", TNAT (1, 1, 1, 1)},
{"tnat.z.and.orcm", TNATCM (1, 1, 1, 1)},
#undef TNAT
+#undef TNATCM
{"pmpyshr2", I, OpZaZbVeX2aX2b (7, 0, 1, 0, 0, 3), {R1, R2, R3, CNT2c}, EMPTY},
{"pmpyshr2.u", I, OpZaZbVeX2aX2b (7, 0, 1, 0, 0, 1), {R1, R2, R3, CNT2c}, EMPTY},
diff --git a/contrib/binutils/opcodes/ia64-opc-m.c b/contrib/binutils/opcodes/ia64-opc-m.c
index 8e9454ba3c36..d7903861f3c0 100644
--- a/contrib/binutils/opcodes/ia64-opc-m.c
+++ b/contrib/binutils/opcodes/ia64-opc-m.c
@@ -1,5 +1,5 @@
/* ia64-opc-m.c -- IA-64 `M' opcode table.
- Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002, 2005 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "ia64-opc.h"
@@ -110,6 +110,7 @@ struct ia64_opcode ia64_opcodes_m[] =
{"mov", M, OpX3X6b (1, 0, 0x24), {R1, CR3}, PRIV, 0, NULL},
{"alloc", M, OpX3 (1, 6), {R1, AR_PFS, SOF, SOL, SOR}, FIRST|NO_PRED|MOD_RRBS, 0, NULL},
+ {"alloc", M, OpX3 (1, 6), {R1, SOF, SOL, SOR}, PSEUDO|FIRST|NO_PRED|MOD_RRBS, 0, NULL},
{"mov", M, OpX3X6b (1, 0, 0x2d), {PSR_L, R2}, PRIV, 0, NULL},
{"mov", M, OpX3X6b (1, 0, 0x29), {PSR_UM, R2}, EMPTY},
@@ -176,8 +177,11 @@ struct ia64_opcode ia64_opcodes_m[] =
{"ld8.nt1", M, OpMXX6aHint (4, 0, 0, 0x03, 1), {R1, MR3}, EMPTY},
{"ld8.nta", M, OpMXX6aHint (4, 0, 0, 0x03, 3), {R1, MR3}, EMPTY},
{"ld16", M2, OpMXX6aHint (4, 0, 1, 0x28, 0), {R1, AR_CSD, MR3}, EMPTY},
+ {"ld16", M, OpMXX6aHint (4, 0, 1, 0x28, 0), {R1, MR3}, PSEUDO, 0, NULL},
{"ld16.nt1", M2, OpMXX6aHint (4, 0, 1, 0x28, 1), {R1, AR_CSD, MR3}, EMPTY},
+ {"ld16.nt1", M, OpMXX6aHint (4, 0, 1, 0x28, 1), {R1, MR3}, PSEUDO, 0, NULL},
{"ld16.nta", M2, OpMXX6aHint (4, 0, 1, 0x28, 3), {R1, AR_CSD, MR3}, EMPTY},
+ {"ld16.nta", M, OpMXX6aHint (4, 0, 1, 0x28, 3), {R1, MR3}, PSEUDO, 0, NULL},
{"ld1.s", M, OpMXX6aHint (4, 0, 0, 0x04, 0), {R1, MR3}, EMPTY},
{"ld1.s.nt1", M, OpMXX6aHint (4, 0, 0, 0x04, 1), {R1, MR3}, EMPTY},
{"ld1.s.nta", M, OpMXX6aHint (4, 0, 0, 0x04, 3), {R1, MR3}, EMPTY},
@@ -239,8 +243,11 @@ struct ia64_opcode ia64_opcodes_m[] =
{"ld8.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x17, 1), {R1, MR3}, EMPTY},
{"ld8.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x17, 3), {R1, MR3}, EMPTY},
{"ld16.acq", M2, OpMXX6aHint (4, 0, 1, 0x2c, 0), {R1, AR_CSD, MR3}, EMPTY},
+ {"ld16.acq", M, OpMXX6aHint (4, 0, 1, 0x2c, 0), {R1, MR3}, PSEUDO, 0, NULL},
{"ld16.acq.nt1", M2, OpMXX6aHint (4, 0, 1, 0x2c, 1), {R1, AR_CSD, MR3}, EMPTY},
+ {"ld16.acq.nt1", M, OpMXX6aHint (4, 0, 1, 0x2c, 1), {R1, MR3}, PSEUDO, 0, NULL},
{"ld16.acq.nta", M2, OpMXX6aHint (4, 0, 1, 0x2c, 3), {R1, AR_CSD, MR3}, EMPTY},
+ {"ld16.acq.nta", M, OpMXX6aHint (4, 0, 1, 0x2c, 3), {R1, MR3}, PSEUDO, 0, NULL},
{"ld8.fill", M, OpMXX6aHint (4, 0, 0, 0x1b, 0), {R1, MR3}, EMPTY},
{"ld8.fill.nt1", M, OpMXX6aHint (4, 0, 0, 0x1b, 1), {R1, MR3}, EMPTY},
{"ld8.fill.nta", M, OpMXX6aHint (4, 0, 0, 0x1b, 3), {R1, MR3}, EMPTY},
@@ -409,7 +416,9 @@ struct ia64_opcode ia64_opcodes_m[] =
{"st8", M, OpMXX6aHint (4, 0, 0, 0x33, 0), {MR3, R2}, EMPTY},
{"st8.nta", M, OpMXX6aHint (4, 0, 0, 0x33, 3), {MR3, R2}, EMPTY},
{"st16", M, OpMXX6aHint (4, 0, 1, 0x30, 0), {MR3, R2, AR_CSD}, EMPTY},
+ {"st16", M, OpMXX6aHint (4, 0, 1, 0x30, 0), {MR3, R2}, PSEUDO, 0, NULL},
{"st16.nta", M, OpMXX6aHint (4, 0, 1, 0x30, 3), {MR3, R2, AR_CSD}, EMPTY},
+ {"st16.nta", M, OpMXX6aHint (4, 0, 1, 0x30, 3), {MR3, R2}, PSEUDO, 0, NULL},
{"st1.rel", M, OpMXX6aHint (4, 0, 0, 0x34, 0), {MR3, R2}, EMPTY},
{"st1.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x34, 3), {MR3, R2}, EMPTY},
{"st2.rel", M, OpMXX6aHint (4, 0, 0, 0x35, 0), {MR3, R2}, EMPTY},
@@ -419,44 +428,56 @@ struct ia64_opcode ia64_opcodes_m[] =
{"st8.rel", M, OpMXX6aHint (4, 0, 0, 0x37, 0), {MR3, R2}, EMPTY},
{"st8.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x37, 3), {MR3, R2}, EMPTY},
{"st16.rel", M, OpMXX6aHint (4, 0, 1, 0x34, 0), {MR3, R2, AR_CSD}, EMPTY},
+ {"st16.rel", M, OpMXX6aHint (4, 0, 1, 0x34, 0), {MR3, R2}, PSEUDO, 0, NULL},
{"st16.rel.nta", M, OpMXX6aHint (4, 0, 1, 0x34, 3), {MR3, R2, AR_CSD}, EMPTY},
+ {"st16.rel.nta", M, OpMXX6aHint (4, 0, 1, 0x34, 3), {MR3, R2}, PSEUDO, 0, NULL},
{"st8.spill", M, OpMXX6aHint (4, 0, 0, 0x3b, 0), {MR3, R2}, EMPTY},
{"st8.spill.nta", M, OpMXX6aHint (4, 0, 0, 0x3b, 3), {MR3, R2}, EMPTY},
#define CMPXCHG(c,h) M, OpMXX6aHint (4, 0, 1, c, h), {R1, MR3, R2, AR_CCV}, EMPTY
+#define CMPXCHG_P(c,h) M, OpMXX6aHint (4, 0, 1, c, h), {R1, MR3, R2}, PSEUDO, 0, NULL
#define CMPXCHG16(c,h) M, OpMXX6aHint (4, 0, 1, c, h), {R1, MR3, R2, AR_CSD, AR_CCV}, EMPTY
- {"cmpxchg1.acq", CMPXCHG (0x00, 0)},
- {"cmpxchg1.acq.nt1", CMPXCHG (0x00, 1)},
- {"cmpxchg1.acq.nta", CMPXCHG (0x00, 3)},
- {"cmpxchg2.acq", CMPXCHG (0x01, 0)},
- {"cmpxchg2.acq.nt1", CMPXCHG (0x01, 1)},
- {"cmpxchg2.acq.nta", CMPXCHG (0x01, 3)},
- {"cmpxchg4.acq", CMPXCHG (0x02, 0)},
- {"cmpxchg4.acq.nt1", CMPXCHG (0x02, 1)},
- {"cmpxchg4.acq.nta", CMPXCHG (0x02, 3)},
- {"cmpxchg8.acq", CMPXCHG (0x03, 0)},
- {"cmpxchg8.acq.nt1", CMPXCHG (0x03, 1)},
- {"cmpxchg8.acq.nta", CMPXCHG (0x03, 3)},
- {"cmp8xchg16.acq", CMPXCHG16 (0x20, 0)},
- {"cmp8xchg16.acq.nt1", CMPXCHG16 (0x20, 1)},
- {"cmp8xchg16.acq.nta", CMPXCHG16 (0x20, 3)},
- {"cmpxchg1.rel", CMPXCHG (0x04, 0)},
- {"cmpxchg1.rel.nt1", CMPXCHG (0x04, 1)},
- {"cmpxchg1.rel.nta", CMPXCHG (0x04, 3)},
- {"cmpxchg2.rel", CMPXCHG (0x05, 0)},
- {"cmpxchg2.rel.nt1", CMPXCHG (0x05, 1)},
- {"cmpxchg2.rel.nta", CMPXCHG (0x05, 3)},
- {"cmpxchg4.rel", CMPXCHG (0x06, 0)},
- {"cmpxchg4.rel.nt1", CMPXCHG (0x06, 1)},
- {"cmpxchg4.rel.nta", CMPXCHG (0x06, 3)},
- {"cmpxchg8.rel", CMPXCHG (0x07, 0)},
- {"cmpxchg8.rel.nt1", CMPXCHG (0x07, 1)},
- {"cmpxchg8.rel.nta", CMPXCHG (0x07, 3)},
- {"cmp8xchg16.rel", CMPXCHG16 (0x24, 0)},
- {"cmp8xchg16.rel.nt1", CMPXCHG16 (0x24, 1)},
- {"cmp8xchg16.rel.nta", CMPXCHG16 (0x24, 3)},
+#define CMPXCHG16_P(c,h) M, OpMXX6aHint (4, 0, 1, c, h), {R1, MR3, R2}, PSEUDO, 0, NULL
+#define CMPXCHG_acq 0
+#define CMPXCHG_rel 4
+#define CMPXCHG_1 0
+#define CMPXCHG_2 1
+#define CMPXCHG_4 2
+#define CMPXCHG_8 3
+#define CMPXCHGn(n, s) \
+ {"cmpxchg"#n"."#s, CMPXCHG (CMPXCHG_##n|CMPXCHG_##s, 0)}, \
+ {"cmpxchg"#n"."#s, CMPXCHG_P (CMPXCHG_##n|CMPXCHG_##s, 0)}, \
+ {"cmpxchg"#n"."#s".nt1", CMPXCHG (CMPXCHG_##n|CMPXCHG_##s, 1)}, \
+ {"cmpxchg"#n"."#s".nt1", CMPXCHG_P (CMPXCHG_##n|CMPXCHG_##s, 1)}, \
+ {"cmpxchg"#n"."#s".nta", CMPXCHG (CMPXCHG_##n|CMPXCHG_##s, 3)}, \
+ {"cmpxchg"#n"."#s".nta", CMPXCHG_P (CMPXCHG_##n|CMPXCHG_##s, 3)}
+#define CMP8XCHG16(s) \
+ {"cmp8xchg16."#s, CMPXCHG16 (0x20|CMPXCHG_##s, 0)}, \
+ {"cmp8xchg16."#s, CMPXCHG16_P (0x20|CMPXCHG_##s, 0)}, \
+ {"cmp8xchg16."#s".nt1", CMPXCHG16 (0x20|CMPXCHG_##s, 1)}, \
+ {"cmp8xchg16."#s".nt1", CMPXCHG16_P (0x20|CMPXCHG_##s, 1)}, \
+ {"cmp8xchg16."#s".nta", CMPXCHG16 (0x20|CMPXCHG_##s, 3)}, \
+ {"cmp8xchg16."#s".nta", CMPXCHG16_P (0x20|CMPXCHG_##s, 3)}
+#define CMPXCHG_ALL(s) CMPXCHGn(1, s), \
+ CMPXCHGn(2, s), \
+ CMPXCHGn(4, s), \
+ CMPXCHGn(8, s), \
+ CMP8XCHG16(s)
+ CMPXCHG_ALL(acq),
+ CMPXCHG_ALL(rel),
#undef CMPXCHG
+#undef CMPXCHG_P
#undef CMPXCHG16
+#undef CMPXCHG16_P
+#undef CMPXCHG_acq
+#undef CMPXCHG_rel
+#undef CMPXCHG_1
+#undef CMPXCHG_2
+#undef CMPXCHG_4
+#undef CMPXCHG_8
+#undef CMPXCHGn
+#undef CMPXCHG16
+#undef CMPXCHG_ALL
{"xchg1", M, OpMXX6aHint (4, 0, 1, 0x08, 0), {R1, MR3, R2}, EMPTY},
{"xchg1.nt1", M, OpMXX6aHint (4, 0, 1, 0x08, 1), {R1, MR3, R2}, EMPTY},
{"xchg1.nta", M, OpMXX6aHint (4, 0, 1, 0x08, 3), {R1, MR3, R2}, EMPTY},
diff --git a/contrib/binutils/opcodes/ia64-opc-x.c b/contrib/binutils/opcodes/ia64-opc-x.c
index e1d434519aed..fcbe92e434b7 100644
--- a/contrib/binutils/opcodes/ia64-opc-x.c
+++ b/contrib/binutils/opcodes/ia64-opc-x.c
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "ia64-opc.h"
diff --git a/contrib/binutils/opcodes/ia64-opc.c b/contrib/binutils/opcodes/ia64-opc.c
index fc90213a6b54..5f2cfc738914 100644
--- a/contrib/binutils/opcodes/ia64-opc.c
+++ b/contrib/binutils/opcodes/ia64-opc.c
@@ -1,5 +1,5 @@
/* ia64-opc.c -- Functions to access the compacted opcode table
- Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
Written by Bob Manson of Cygnus Solutions, <manson@cygnus.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,12 +16,12 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "ansidecl.h"
-#include "libiberty.h"
#include "sysdep.h"
+#include "libiberty.h"
#include "ia64-asmtab.h"
#include "ia64-asmtab.c"
@@ -365,7 +365,7 @@ locate_opcode_ent (ia64_insn opcode, enum ia64_insn_type type)
unsigned int op;
int currbitnum = bitpos[currstatenum];
int oplen;
- int opval[3];
+ int opval[3] = {0};
int next_op;
int currbit;
diff --git a/contrib/binutils/opcodes/ia64-opc.h b/contrib/binutils/opcodes/ia64-opc.h
index f9476d8c0f03..617de5e8fad2 100644
--- a/contrib/binutils/opcodes/ia64-opc.h
+++ b/contrib/binutils/opcodes/ia64-opc.h
@@ -1,5 +1,6 @@
/* ia64-opc.h -- IA-64 opcode table.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002, 2005, 2006
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the
- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifndef IA64_OPC_H
#define IA64_OPC_H
@@ -112,6 +113,7 @@
#define IMMU24 IA64_OPND_IMMU24
#define IMMU62 IA64_OPND_IMMU62
#define IMMU64 IA64_OPND_IMMU64
+#define IMMU5b IA64_OPND_IMMU5b
#define IMMU7a IA64_OPND_IMMU7a
#define IMMU7b IA64_OPND_IMMU7b
#define IMMU9 IA64_OPND_IMMU9
diff --git a/contrib/binutils/opcodes/ia64-raw.tbl b/contrib/binutils/opcodes/ia64-raw.tbl
index 476721c510e9..d158fbe2c24d 100644
--- a/contrib/binutils/opcodes/ia64-raw.tbl
+++ b/contrib/binutils/opcodes/ia64-raw.tbl
@@ -2,8 +2,8 @@ Resource Name; Writers; Readers; Semantics of Dependency
ALAT; chk.a.clr, IC:mem-readers-alat, IC:mem-writers, IC:invala-all; IC:mem-readers-alat, IC:mem-writers, IC:chk-a, invala.e; none
AR[BSP]; br.call, brl.call, br.ret, cover, IC:mov-to-AR-BSPSTORE, rfi; br.call, brl.call, br.ia, br.ret, cover, flushrs, loadrs, IC:mov-from-AR-BSP, rfi; impliedF
AR[BSPSTORE]; alloc, loadrs, flushrs, IC:mov-to-AR-BSPSTORE; alloc, br.ia, flushrs, IC:mov-from-AR-BSPSTORE; impliedF
-AR[CFLG]; IC:mov-to-AR-CFLG; br.ia, IC:mov-from-AR-CFLG; impliedF
AR[CCV]; IC:mov-to-AR-CCV; br.ia, IC:cmpxchg, IC:mov-from-AR-CCV; impliedF
+AR[CFLG]; IC:mov-to-AR-CFLG; br.ia, IC:mov-from-AR-CFLG; impliedF
AR[CSD]; ld16, IC:mov-to-AR-CSD; br.ia, cmp8xchg16, IC:mov-from-AR-CSD, st16; impliedF
AR[EC]; IC:mod-sched-brs, br.ret, IC:mov-to-AR-EC; br.call, brl.call, br.ia, IC:mod-sched-brs, IC:mov-from-AR-EC; impliedF
AR[EFLAG]; IC:mov-to-AR-EFLAG; br.ia, IC:mov-from-AR-EFLAG; impliedF
@@ -44,7 +44,7 @@ CFM; alloc; IC:cfm-readers; none
CPUID#; IC:none; IC:mov-from-IND-CPUID+3; specific
CR[CMCV]; IC:mov-to-CR-CMCV; IC:mov-from-CR-CMCV; data
CR[DCR]; IC:mov-to-CR-DCR; IC:mov-from-CR-DCR, IC:mem-readers-spec; data
-CR[EOI]; IC:mov-to-CR-EOI; IC:none; SC Section 10.8.3.4
+CR[EOI]; IC:mov-to-CR-EOI; IC:none; SC Section 5.8.3.4, "End of External Interrupt Register (EOI Ð CR67)" on page 2:119
CR[GPTA]; IC:mov-to-CR-GPTA; IC:mov-from-CR-GPTA, thash; data
CR[IFA]; IC:mov-to-CR-IFA; itc.i, itc.d, itr.i, itr.d; implied
CR[IFA]; IC:mov-to-CR-IFA; IC:mov-from-CR-IFA; data
@@ -65,24 +65,25 @@ CR[ITIR]; IC:mov-to-CR-ITIR; itc.i, itc.d, itr.i, itr.d; implied
CR[ITM]; IC:mov-to-CR-ITM; IC:mov-from-CR-ITM; data
CR[ITV]; IC:mov-to-CR-ITV; IC:mov-from-CR-ITV; data
CR[IVA]; IC:mov-to-CR-IVA; IC:mov-from-CR-IVA; instr
-CR[IVR]; IC:none; IC:mov-from-CR-IVR; SC Section 10.8.3.2
-CR[LID]; IC:mov-to-CR-LID; IC:mov-from-CR-LID; SC Section 10.8.3.1
+CR[IVR]; IC:none; IC:mov-from-CR-IVR; SC Section 5.8.3.2, "External Interrupt Vector Register (IVR Ð CR65)" on page 2:118
+CR[LID]; IC:mov-to-CR-LID; IC:mov-from-CR-LID; SC Section 5.8.3.1, "Local ID (LID Ð CR64)" on page 2:117
CR[LRR%], % in 0 - 1; IC:mov-to-CR-LRR+1; IC:mov-from-CR-LRR+1; data
CR[PMV]; IC:mov-to-CR-PMV; IC:mov-from-CR-PMV; data
-CR[PTA]; IC:mov-to-CR-PTA; IC:mov-from-CR-PTA, thash; data
+CR[PTA]; IC:mov-to-CR-PTA; IC:mov-from-CR-PTA, IC:mem-readers, IC:mem-writers, IC:non-access, thash; data
CR[TPR]; IC:mov-to-CR-TPR; IC:mov-from-CR-TPR, IC:mov-from-CR-IVR; data
-CR[TPR]; IC:mov-to-CR-TPR; IC:mov-to-PSR-l, rfi, rsm, ssm; SC Section 10.8.3.3
+CR[TPR]; IC:mov-to-CR-TPR; IC:mov-to-PSR-l+17, ssm+17; SC Section 5.8.3.3, "Task Priority Register (TPR Ð CR66)" on page 2:119
+CR[TPR]; IC:mov-to-CR-TPR; rfi; implied
CR%, % in 3-7, 10-15, 18, 26-63, 75-79, 82-127; IC:none; IC:mov-from-CR-rv+1; none
DBR#; IC:mov-to-IND-DBR+3; IC:mov-from-IND-DBR+3; impliedF
DBR#; IC:mov-to-IND-DBR+3; IC:probe-all, IC:lfetch-all, IC:mem-readers, IC:mem-writers; data
-DTC; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, itc.i, itc.d, itr.i, itr.d; IC:mem-readers, IC:mem-writers, fc, IC:probe-all, tak, tpa; data
+DTC; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, itc.i, itc.d, itr.i, itr.d; IC:mem-readers, IC:mem-writers, IC:non-access; data
DTC; itc.i, itc.d, itr.i, itr.d; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, itc.i, itc.d, itr.i, itr.d; impliedF
DTC; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d; none
DTC; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d; itc.i, itc.d, itr.i, itr.d; impliedF
DTC_LIMIT*; ptc.g, ptc.ga; ptc.g, ptc.ga; impliedF
-DTR; itr.d; IC:mem-readers, IC:mem-writers, fc, IC:probe-all, tak, tpa; data
+DTR; itr.d; IC:mem-readers, IC:mem-writers, IC:non-access; data
DTR; itr.d; ptc.g, ptc.ga, ptc.l, ptr.d, itr.d; impliedF
-DTR; ptr.d; IC:mem-readers, IC:mem-writers, fc, IC:probe-all, tak, tpa; data
+DTR; ptr.d; IC:mem-readers, IC:mem-writers, IC:non-access; data
DTR; ptr.d; ptc.g, ptc.ga, ptc.l, ptr.d; none
DTR; ptr.d; itr.d, itc.d; impliedF
FR%, % in 0 - 1; IC:none; IC:fr-readers+1; none
@@ -96,17 +97,17 @@ InService*; IC:mov-to-CR-EOI; IC:mov-from-CR-IVR; data
InService*; IC:mov-from-CR-IVR; IC:mov-from-CR-IVR; impliedF
InService*; IC:mov-to-CR-EOI; IC:mov-to-CR-EOI; impliedF
IP; IC:all; IC:all; none
-ITC; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d; epc; instr
+ITC; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d; epc, vmsw; instr
ITC; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d; itc.i, itc.d, itr.i, itr.d; impliedF
ITC; ptc.e, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d; ptr.i, ptr.d, ptc.e, ptc.g, ptc.ga, ptc.l; none
-ITC; itc.i, itc.d, itr.i, itr.d; epc; instr
+ITC; itc.i, itc.d, itr.i, itr.d; epc, vmsw; instr
ITC; itc.i, itc.d, itr.i, itr.d; itc.d, itc.i, itr.d, itr.i, ptr.d, ptr.i, ptc.g, ptc.ga, ptc.l; impliedF
ITC_LIMIT*; ptc.g, ptc.ga; ptc.g, ptc.ga; impliedF
ITR; itr.i; itr.i, itc.i, ptc.g, ptc.ga, ptc.l, ptr.i; impliedF
-ITR; itr.i; epc; instr
+ITR; itr.i; epc, vmsw; instr
ITR; ptr.i; itc.i, itr.i; impliedF
ITR; ptr.i; ptc.g, ptc.ga, ptc.l, ptr.i; none
-ITR; ptr.i; epc; instr
+ITR; ptr.i; epc, vmsw; instr
memory; IC:mem-writers; IC:mem-readers; none
MSR#; IC:mov-to-IND-MSR+5; IC:mov-from-IND-MSR+5; specific
PKR#; IC:mov-to-IND-PKR+3; IC:mem-readers, IC:mem-writers, IC:mov-from-IND-PKR+4, IC:probe-all; data
@@ -114,7 +115,7 @@ PKR#; IC:mov-to-IND-PKR+3; IC:mov-to-IND-PKR+4; none
PKR#; IC:mov-to-IND-PKR+3; IC:mov-from-IND-PKR+3; impliedF
PKR#; IC:mov-to-IND-PKR+3; IC:mov-to-IND-PKR+3; impliedF
PMC#; IC:mov-to-IND-PMC+3; IC:mov-from-IND-PMC+3; impliedF
-PMC#; IC:mov-to-IND-PMC+3; IC:mov-from-IND-PMD+3; SC+3 Section 12.1.1
+PMC#; IC:mov-to-IND-PMC+3; IC:mov-from-IND-PMD+3; SC Section 7.2.1, "Generic Performance Counter Registers" for PMC[0].fr on page 2:150
PMD#; IC:mov-to-IND-PMD+3; IC:mov-from-IND-PMD+3; impliedF
PR0; IC:pr-writers+1; IC:pr-readers-br+1, IC:pr-readers-nobr-nomovpr+1, IC:mov-from-PR+12, IC:mov-to-PR+12; none
PR%, % in 1 - 15; IC:pr-writers+1, IC:mov-to-PR-allreg+7; IC:pr-readers-nobr-nomovpr+1, IC:mov-from-PR, IC:mov-to-PR+12; impliedF
@@ -127,56 +128,69 @@ PR63; IC:mod-sched-brs, IC:pr-writers+1, IC:mov-to-PR-allreg+7, IC:mov-to-PR-rot
PR63; IC:pr-writers-fp+1, IC:mod-sched-brs; IC:pr-readers-br+1; impliedF
PR63; IC:pr-writers-int+1, IC:mov-to-PR-allreg+7, IC:mov-to-PR-rotreg; IC:pr-readers-br+1; none
PSR.ac; IC:user-mask-writers-partial+7, IC:mov-to-PSR-um; IC:mem-readers, IC:mem-writers; implied
-PSR.ac; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mem-readers, IC:mem-writers; data
-PSR.ac; IC:user-mask-writers-partial+7, IC:mov-to-PSR-um, IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR, IC:mov-from-PSR-um; impliedF
+PSR.ac; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mem-readers, IC:mem-writers; data
+PSR.ac; IC:user-mask-writers-partial+7, IC:mov-to-PSR-um, IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR, IC:mov-from-PSR-um; impliedF
+PSR.ac; rfi; IC:mem-readers, IC:mem-writers, IC:mov-from-PSR, IC:mov-from-PSR-um; impliedF
PSR.be; IC:user-mask-writers-partial+7, IC:mov-to-PSR-um; IC:mem-readers, IC:mem-writers; implied
-PSR.be; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mem-readers, IC:mem-writers; data
-PSR.be; IC:user-mask-writers-partial+7, IC:mov-to-PSR-um, IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR, IC:mov-from-PSR-um; impliedF
+PSR.be; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mem-readers, IC:mem-writers; data
+PSR.be; IC:user-mask-writers-partial+7, IC:mov-to-PSR-um, IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR, IC:mov-from-PSR-um; impliedF
+PSR.be; rfi; IC:mem-readers, IC:mem-writers, IC:mov-from-PSR, IC:mov-from-PSR-um; impliedF
PSR.bn; bsw, rfi; IC:gr-readers+10, IC:gr-writers+10; impliedF
-PSR.cpl; epc, br.ret, rfi; IC:priv-ops, br.call, brl.call, epc, IC:mov-from-AR-ITC, IC:mov-to-AR-ITC, IC:mov-to-AR-RSC, IC:mov-to-AR-K, IC:mov-from-IND-PMD, IC:probe-all, IC:mem-readers, IC:mem-writers, IC:lfetch-all; implied
-PSR.da; rfi; IC:mem-readers, IC:lfetch-fault, IC:mem-writers, IC:probe-fault; data
-PSR.db; IC:mov-to-PSR-l; IC:mem-readers, IC:mem-writers, IC:probe-fault; data
+PSR.cpl; epc, br.ret; IC:priv-ops, br.call, brl.call, epc, IC:mov-from-AR-ITC, IC:mov-to-AR-ITC, IC:mov-to-AR-RSC, IC:mov-to-AR-K, IC:mov-from-IND-PMD, IC:probe-all, IC:mem-readers, IC:mem-writers, IC:lfetch-all; implied
+PSR.cpl; rfi; IC:priv-ops, br.call, brl.call, epc, IC:mov-from-AR-ITC, IC:mov-to-AR-ITC, IC:mov-to-AR-RSC, IC:mov-to-AR-K, IC:mov-from-IND-PMD, IC:probe-all, IC:mem-readers, IC:mem-writers, IC:lfetch-all; impliedF
+PSR.da; rfi; IC:mem-readers, IC:lfetch-all, IC:mem-writers, IC:probe-fault; impliedF
+PSR.db; IC:mov-to-PSR-l; IC:lfetch-all, IC:mem-readers, IC:mem-writers, IC:probe-fault; data
PSR.db; IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
-PSR.db; rfi; IC:mem-readers, IC:mem-writers, IC:mov-from-PSR, IC:probe-fault; data
-PSR.dd; rfi; IC:mem-readers, IC:probe-fault, IC:mem-writers, IC:lfetch-fault; data
-PSR.dfh; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:fr-readers+8, IC:fr-writers+8; data
-PSR.dfh; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
-PSR.dfl; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:fr-writers+8, IC:fr-readers+8; data
-PSR.dfl; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
-PSR.di; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; br.ia; data
-PSR.di; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
-PSR.dt; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mem-readers, IC:mem-writers; data
-PSR.dt; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
-PSR.ed; rfi; IC:lfetch-all, IC:mem-readers-spec; data
-PSR.i; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
-PSR.i; rfi; IC:mov-from-PSR; data
-PSR.ia; rfi; IC:none; none
-PSR.ic; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
-PSR.ic; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; cover, itc.i, itc.d, itr.i, itr.d, IC:mov-from-CR-ITIR, IC:mov-from-CR-IFS, IC:mov-from-CR-IIM, IC:mov-from-CR-IIP, IC:mov-from-CR-IPSR, IC:mov-from-CR-ISR, IC:mov-from-CR-IFA, IC:mov-from-CR-IHA, IC:mov-from-CR-IIPA, IC:mov-to-CR-ITIR, IC:mov-to-CR-IFS, IC:mov-to-CR-IIM, IC:mov-to-CR-IIP, IC:mov-to-CR-IPSR, IC:mov-to-CR-ISR, IC:mov-to-CR-IFA, IC:mov-to-CR-IHA, IC:mov-to-CR-IIPA; data
-PSR.id; rfi; IC:none; none
+PSR.db; rfi; IC:lfetch-all, IC:mem-readers, IC:mem-writers, IC:mov-from-PSR, IC:probe-fault; impliedF
+PSR.dd; rfi; IC:lfetch-all, IC:mem-readers, IC:probe-fault, IC:mem-writers; impliedF
+PSR.dfh; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:fr-readers+8, IC:fr-writers+8; data
+PSR.dfh; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
+PSR.dfh; rfi; IC:fr-readers+8, IC:fr-writers+8, IC:mov-from-PSR; impliedF
+PSR.dfl; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:fr-writers+8, IC:fr-readers+8; data
+PSR.dfl; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
+PSR.dfl; rfi; IC:fr-writers+8, IC:fr-readers+8, IC:mov-from-PSR; impliedF
+PSR.di; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; br.ia; data
+PSR.di; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
+PSR.di; rfi; br.ia, IC:mov-from-PSR; impliedF
+PSR.dt; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mem-readers, IC:mem-writers, IC:non-access; data
+PSR.dt; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
+PSR.dt; rfi; IC:mem-readers, IC:mem-writers, IC:non-access, IC:mov-from-PSR; impliedF
+PSR.ed; rfi; IC:lfetch-all, IC:mem-readers-spec; impliedF
+PSR.i; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
+PSR.ia; rfi; IC:all; none
+PSR.ic; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
+PSR.ic; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; cover, itc.i, itc.d, itr.i, itr.d, IC:mov-from-interruption-CR, IC:mov-to-interruption-CR; data
+PSR.ic; rfi; IC:mov-from-PSR, cover, itc.i, itc.d, itr.i, itr.d, IC:mov-from-interruption-CR, IC:mov-to-interruption-CR; impliedF
+PSR.id; rfi; IC:all; none
PSR.is; br.ia, rfi; IC:none; none
-PSR.it; rfi; IC:branches, IC:mov-from-PSR, chk, epc, fchkf; data
+PSR.it; rfi; IC:branches, IC:mov-from-PSR, chk, epc, fchkf, vmsw; impliedF
PSR.lp; IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
PSR.lp; IC:mov-to-PSR-l; br.ret; data
-PSR.lp; rfi; IC:mov-from-PSR, br.ret; data
-PSR.mc; rfi; IC:mov-from-PSR; none
+PSR.lp; rfi; IC:mov-from-PSR, br.ret; impliedF
+PSR.mc; rfi; IC:mov-from-PSR; impliedF
PSR.mfh; IC:fr-writers+9, IC:user-mask-writers-partial+7, IC:mov-to-PSR-um, IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR-um, IC:mov-from-PSR; impliedF
PSR.mfl; IC:fr-writers+9, IC:user-mask-writers-partial+7, IC:mov-to-PSR-um, IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR-um, IC:mov-from-PSR; impliedF
-PSR.pk; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mem-readers, IC:mem-writers, IC:probe-all; data
-PSR.pk; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
+PSR.pk; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:lfetch-all, IC:mem-readers, IC:mem-writers, IC:probe-all; data
+PSR.pk; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
+PSR.pk; rfi; IC:lfetch-all, IC:mem-readers, IC:mem-writers, IC:mov-from-PSR, IC:probe-all; impliedF
PSR.pp; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
-PSR.ri; rfi; IC:none; none
+PSR.ri; rfi; IC:all; none
PSR.rt; IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
PSR.rt; IC:mov-to-PSR-l; alloc, flushrs, loadrs; data
-PSR.rt; rfi; IC:mov-from-PSR, alloc, flushrs, loadrs; data
-PSR.si; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
-PSR.si; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-AR-ITC; data
-PSR.sp; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
-PSR.sp; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-IND-PMD, IC:mov-to-PSR-um, rum, sum; data
-PSR.ss; rfi; IC:all; data
-PSR.tb; IC:mov-to-PSR-l, rfi; IC:branches, chk, fchkf; data
-PSR.tb; IC:mov-to-PSR-l, rfi; IC:mov-from-PSR; impliedF
+PSR.rt; rfi; IC:mov-from-PSR, alloc, flushrs, loadrs; impliedF
+PSR.si; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
+PSR.si; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-AR-ITC; data
+PSR.si; rfi; IC:mov-from-AR-ITC, IC:mov-from-PSR; impliedF
+PSR.sp; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
+PSR.sp; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l; IC:mov-from-IND-PMD, IC:mov-to-PSR-um, rum, sum; data
+PSR.sp; rfi; IC:mov-from-IND-PMD, IC:mov-from-PSR, IC:mov-to-PSR-um, rum, sum; impliedF
+PSR.ss; rfi; IC:all; impliedF
+PSR.tb; IC:mov-to-PSR-l; IC:branches, chk, fchkf; data
+PSR.tb; IC:mov-to-PSR-l; IC:mov-from-PSR; impliedF
+PSR.tb; rfi; IC:branches, chk, fchkf, IC:mov-from-PSR; impliedF
PSR.up; IC:user-mask-writers-partial+7, IC:mov-to-PSR-um, IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:mov-from-PSR-um, IC:mov-from-PSR; impliedF
-RR#; IC:mov-to-IND-RR+6; IC:mem-readers, IC:mem-writers, itc.i, itc.d, itr.i, itr.d, IC:probe-all, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, tak, thash, tpa, ttag; data
+PSR.vm; vmsw; IC:mem-readers, IC:mem-writers, IC:mov-from-AR-ITC, IC:mov-from-IND-CPUID, IC:mov-to-AR-ITC, IC:priv-ops\vmsw, cover, thash, ttag; implied
+PSR.vm; rfi; IC:mem-readers, IC:mem-writers, IC:mov-from-AR-ITC, IC:mov-from-IND-CPUID, IC:mov-to-AR-ITC, IC:priv-ops\vmsw, cover, thash, ttag; impliedF
+RR#; IC:mov-to-IND-RR+6; IC:mem-readers, IC:mem-writers, itc.i, itc.d, itr.i, itr.d, IC:non-access, ptc.g, ptc.ga, ptc.l, ptr.i, ptr.d, thash, ttag; data
RR#; IC:mov-to-IND-RR+6; IC:mov-from-IND-RR+6; impliedF
RSE; IC:rse-writers+14; IC:rse-readers+14; impliedF
diff --git a/contrib/binutils/opcodes/ia64-waw.tbl b/contrib/binutils/opcodes/ia64-waw.tbl
index 98daebfc6227..a555dab400da 100644
--- a/contrib/binutils/opcodes/ia64-waw.tbl
+++ b/contrib/binutils/opcodes/ia64-waw.tbl
@@ -6,10 +6,10 @@ AR[CCV]; IC:mov-to-AR-CCV; IC:mov-to-AR-CCV; impliedF
AR[CFLG]; IC:mov-to-AR-CFLG; IC:mov-to-AR-CFLG; impliedF
AR[CSD]; ld16, IC:mov-to-AR-CSD; ld16, IC:mov-to-AR-CSD; impliedF
AR[EC]; br.ret, IC:mod-sched-brs, IC:mov-to-AR-EC; br.ret, IC:mod-sched-brs, IC:mov-to-AR-EC; impliedF
-AR[EFLAG]; mov-to-AR-EFLAG; mov-to-AR-EFLAG; impliedF
-AR[FCR]; mov-to-AR-FCR; mov-to-AR-FCR; impliedF
-AR[FDR]; mov-to-AR-FDR; mov-to-AR-FDR; impliedF
-AR[FIR]; mov-to-AR-FIR; mov-to-AR-FIR; impliedF
+AR[EFLAG]; IC:mov-to-AR-EFLAG; IC:mov-to-AR-EFLAG; impliedF
+AR[FCR]; IC:mov-to-AR-FCR; IC:mov-to-AR-FCR; impliedF
+AR[FDR]; IC:mov-to-AR-FDR; IC:mov-to-AR-FDR; impliedF
+AR[FIR]; IC:mov-to-AR-FIR; IC:mov-to-AR-FIR; impliedF
AR[FPSR].sf0.controls; IC:mov-to-AR-FPSR, fsetc.s0; IC:mov-to-AR-FPSR, fsetc.s0; impliedF
AR[FPSR].sf1.controls; IC:mov-to-AR-FPSR, fsetc.s1; IC:mov-to-AR-FPSR, fsetc.s1; impliedF
AR[FPSR].sf2.controls; IC:mov-to-AR-FPSR, fsetc.s2; IC:mov-to-AR-FPSR, fsetc.s2; impliedF
@@ -32,6 +32,7 @@ AR[PFS]; br.call, brl.call; br.call, brl.call; none
AR[PFS]; br.call, brl.call; IC:mov-to-AR-PFS; impliedF
AR[RNAT]; alloc, flushrs, loadrs, IC:mov-to-AR-RNAT, IC:mov-to-AR-BSPSTORE; alloc, flushrs, loadrs, IC:mov-to-AR-RNAT, IC:mov-to-AR-BSPSTORE; impliedF
AR[RSC]; IC:mov-to-AR-RSC; IC:mov-to-AR-RSC; impliedF
+AR[SSD]; IC:mov-to-AR-SSD; IC:mov-to-AR-SSD; impliedF
AR[UNAT]{%}, % in 0 - 63; IC:mov-to-AR-UNAT, st8.spill; IC:mov-to-AR-UNAT, st8.spill; impliedF
AR%, % in 8-15, 20, 22-23, 31, 33-35, 37-39, 41-43, 45-47, 67-111; IC:none; IC:none; none
AR%, % in 48 - 63, 112-127; IC:mov-to-AR-ig+1; IC:mov-to-AR-ig+1; impliedF
@@ -42,7 +43,7 @@ CFM; IC:mod-sched-brs, br.call, brl.call, br.ret, alloc, clrrrb, cover, rfi; IC:
CPUID#; IC:none; IC:none; none
CR[CMCV]; IC:mov-to-CR-CMCV; IC:mov-to-CR-CMCV; impliedF
CR[DCR]; IC:mov-to-CR-DCR; IC:mov-to-CR-DCR; impliedF
-CR[EOI]; IC:mov-to-CR-EOI; IC:mov-to-CR-EOI; SC Section 10.8.3.4
+CR[EOI]; IC:mov-to-CR-EOI; IC:mov-to-CR-EOI; SC Section 5.8.3.4, "End of External Interrupt Register (EOI Ð CR67)" on page 2:119
CR[GPTA]; IC:mov-to-CR-GPTA; IC:mov-to-CR-GPTA; impliedF
CR[IFA]; IC:mov-to-CR-IFA; IC:mov-to-CR-IFA; impliedF
CR[IFS]; IC:mov-to-CR-IFS, cover; IC:mov-to-CR-IFS, cover; impliedF
@@ -131,5 +132,6 @@ PSR.sp; IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:sys-mask-writers
PSR.ss; rfi; rfi; impliedF
PSR.tb; IC:mov-to-PSR-l, rfi; IC:mov-to-PSR-l, rfi; impliedF
PSR.up; IC:user-mask-writers-partial+7, IC:mov-to-PSR-um, IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; IC:user-mask-writers-partial+7, IC:mov-to-PSR-um, IC:sys-mask-writers-partial+7, IC:mov-to-PSR-l, rfi; impliedF
+PSR.vm; rfi, vmsw; rfi, vmsw; impliedF
RR#; IC:mov-to-IND-RR+6; IC:mov-to-IND-RR+6; impliedF
RSE; IC:rse-writers+14; IC:rse-writers+14; impliedF
diff --git a/contrib/binutils/opcodes/opintl.h b/contrib/binutils/opcodes/opintl.h
index d19b66449eea..0041d667d8cf 100644
--- a/contrib/binutils/opcodes/opintl.h
+++ b/contrib/binutils/opcodes/opintl.h
@@ -7,8 +7,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#ifdef ENABLE_NLS
# include <libintl.h>
diff --git a/contrib/binutils/opcodes/po/Make-in b/contrib/binutils/opcodes/po/Make-in
index 6176dbf78c3c..199100da8d86 100644
--- a/contrib/binutils/opcodes/po/Make-in
+++ b/contrib/binutils/opcodes/po/Make-in
@@ -1,7 +1,8 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
#
-# This file file be copied and used freely without restrictions. It can
+# This file may be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
@@ -109,6 +110,7 @@ $(srcdir)/stamp-cat-id: $(PACKAGE).pot
install: install-exec install-data
install-exec:
install-info:
+install-html:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
@@ -184,7 +186,7 @@ check: all
cat-id-tbl.o: ../intl/libgettext.h
-dvi info tags TAGS ID:
+html dvi pdf ps info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
diff --git a/contrib/binutils/opcodes/po/POTFILES.in b/contrib/binutils/opcodes/po/POTFILES.in
index 333c612130b3..67e98c43cb16 100644
--- a/contrib/binutils/opcodes/po/POTFILES.in
+++ b/contrib/binutils/opcodes/po/POTFILES.in
@@ -1,17 +1,21 @@
-a29k-dis.c
alpha-dis.c
alpha-opc.c
arc-dis.c
arc-ext.c
arc-opc.c
arm-dis.c
-arm-opc.h
avr-dis.c
+bfin-dis.c
cgen-asm.c
+cgen-bitset.c
cgen-dis.c
cgen-opc.c
+cgen-ops.h
+cgen-types.h
cris-dis.c
cris-opc.c
+crx-dis.c
+crx-opc.c
d10v-dis.c
d10v-opc.c
d30v-dis.c
@@ -73,6 +77,13 @@ m10200-dis.c
m10200-opc.c
m10300-dis.c
m10300-opc.c
+m32c-asm.c
+m32c-desc.c
+m32c-desc.h
+m32c-dis.c
+m32c-ibld.c
+m32c-opc.c
+m32c-opc.h
m32r-asm.c
m32r-desc.c
m32r-desc.h
@@ -86,6 +97,7 @@ m68hc11-opc.c
m68k-dis.c
m68k-opc.c
m88k-dis.c
+maxq-dis.c
mcore-dis.c
mcore-opc.h
mips16-opc.c
@@ -93,6 +105,13 @@ mips-dis.c
mips-opc.c
mmix-dis.c
mmix-opc.c
+mt-asm.c
+mt-desc.c
+mt-desc.h
+mt-dis.c
+mt-ibld.c
+mt-opc.c
+mt-opc.h
ns32k-dis.c
openrisc-asm.c
openrisc-desc.c
@@ -131,6 +150,13 @@ v850-opc.c
vax-dis.c
w65-dis.c
w65-opc.h
+xc16x-asm.c
+xc16x-desc.c
+xc16x-desc.h
+xc16x-dis.c
+xc16x-ibld.c
+xc16x-opc.c
+xc16x-opc.h
xstormy16-asm.c
xstormy16-desc.c
xstormy16-desc.h
@@ -139,6 +165,7 @@ xstormy16-ibld.c
xstormy16-opc.c
xstormy16-opc.h
xtensa-dis.c
+z80-dis.c
z8k-dis.c
z8kgen.c
z8k-opc.h
diff --git a/contrib/binutils/opcodes/po/opcodes.pot b/contrib/binutils/opcodes/po/opcodes.pot
index 15fdff07f02c..e387290cd4a4 100644
--- a/contrib/binutils/opcodes/po/opcodes.pot
+++ b/contrib/binutils/opcodes/po/opcodes.pot
@@ -1,12 +1,14 @@
# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-07-17 14:54+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-10-25 10:50+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"
@@ -14,64 +16,152 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: alpha-opc.c:335
+#: alpha-opc.c:155
msgid "branch operand unaligned"
msgstr ""
-#: alpha-opc.c:358 alpha-opc.c:380
+#: alpha-opc.c:171 alpha-opc.c:187
msgid "jump hint unaligned"
msgstr ""
-#: arc-dis.c:52
+#: arc-dis.c:75
msgid "Illegal limm reference in last instruction!\n"
msgstr ""
-#: arm-dis.c:554
+#: arc-opc.c:384
+msgid "unable to fit different valued constants into instruction"
+msgstr ""
+
+#: arc-opc.c:393
+msgid "auxiliary register not allowed here"
+msgstr ""
+
+#: arc-opc.c:399 arc-opc.c:416
+msgid "attempt to set readonly register"
+msgstr ""
+
+#: arc-opc.c:404 arc-opc.c:421
+msgid "attempt to read writeonly register"
+msgstr ""
+
+#: arc-opc.c:426
+#, c-format
+msgid "invalid register number `%d'"
+msgstr ""
+
+#: arc-opc.c:592 arc-opc.c:643 arc-opc.c:671
+msgid "too many long constants"
+msgstr ""
+
+#: arc-opc.c:666
+msgid "to many shimms in load"
+msgstr ""
+
+#. Do we have a limm already?
+#: arc-opc.c:779
+msgid "impossible store"
+msgstr ""
+
+#: arc-opc.c:812
+msgid "st operand error"
+msgstr ""
+
+#: arc-opc.c:816 arc-opc.c:858
+msgid "address writeback not allowed"
+msgstr ""
+
+#: arc-opc.c:820
+msgid "store value must be zero"
+msgstr ""
+
+#: arc-opc.c:845
+msgid "invalid load/shimm insn"
+msgstr ""
+
+#: arc-opc.c:854
+msgid "ld operand error"
+msgstr ""
+
+#: arc-opc.c:941
+msgid "jump flags, but no .f seen"
+msgstr ""
+
+#: arc-opc.c:944
+msgid "jump flags, but no limm addr"
+msgstr ""
+
+#: arc-opc.c:947
+msgid "flag bits of jump address limm lost"
+msgstr ""
+
+#: arc-opc.c:950
+msgid "attempt to set HR bits"
+msgstr ""
+
+#: arc-opc.c:953
+msgid "bad jump flags value"
+msgstr ""
+
+#: arc-opc.c:986
+msgid "branch address not on 4 byte boundary"
+msgstr ""
+
+#: arc-opc.c:1022
+msgid "must specify .jd or no nullify suffix"
+msgstr ""
+
+#: arm-dis.c:1302
msgid "<illegal precision>"
msgstr ""
-#: arm-dis.c:1162
+#. XXX - should break 'option' at following delimiter.
+#: arm-dis.c:2746
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr ""
-#: arm-dis.c:1169
+#. XXX - should break 'option' at following delimiter.
+#: arm-dis.c:2754
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr ""
-#: arm-dis.c:1343
+#: arm-dis.c:2916
+#, c-format
msgid ""
"\n"
"The following ARM specific disassembler options are supported for use with\n"
"the -M switch:\n"
msgstr ""
-#: avr-dis.c:117 avr-dis.c:127
+#: avr-dis.c:109 avr-dis.c:119
+#, c-format
msgid "undefined"
msgstr ""
-#: avr-dis.c:179
+#: avr-dis.c:176
+#, c-format
msgid "Internal disassembler error"
msgstr ""
-#: avr-dis.c:227
+#: avr-dis.c:225
#, c-format
msgid "unknown constraint `%c'"
msgstr ""
-#: cgen-asm.c:348 fr30-ibld.c:195 frv-ibld.c:195 ip2k-ibld.c:195
-#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
+#: 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
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr ""
-#: cgen-asm.c:369
+#: cgen-asm.c:358
#, c-format
msgid "operand out of range (%lu not between %lu and %lu)"
msgstr ""
-#: d30v-dis.c:312
+#: d30v-dis.c:252
#, c-format
msgid "<unknown register %d>"
msgstr ""
@@ -82,402 +172,512 @@ msgstr ""
msgid "Unknown error %d\n"
msgstr ""
-#: dis-buf.c:62
+#: dis-buf.c:66
#, c-format
-msgid "Address 0x%x is out of bounds.\n"
+msgid "Address 0x%s is out of bounds.\n"
+msgstr ""
+
+#: fr30-asm.c:92 m32c-asm.c:782 m32c-asm.c:789
+msgid "Register number is not valid"
+msgstr ""
+
+#: fr30-asm.c:94
+msgid "Register must be between r0 and r7"
+msgstr ""
+
+#: fr30-asm.c:96
+msgid "Register must be between r8 and r15"
+msgstr ""
+
+#: fr30-asm.c:115 m32c-asm.c:820
+msgid "Register list is not valid"
msgstr ""
-#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325
-#: openrisc-asm.c:244 xstormy16-asm.c:284
+#: 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
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr ""
-#: fr30-asm.c:373 frv-asm.c:676 ip2k-asm.c:624 iq2000-asm.c:510 m32r-asm.c:375
-#: openrisc-asm.c:294 xstormy16-asm.c:334
+#: 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
msgid "missing mnemonic in syntax string"
msgstr ""
#. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:812
-#: frv-asm.c:816 frv-asm.c:903 frv-asm.c:1005 ip2k-asm.c:760 ip2k-asm.c:764
-#: ip2k-asm.c:851 ip2k-asm.c:953 iq2000-asm.c:646 iq2000-asm.c:650
-#: iq2000-asm.c:737 iq2000-asm.c:839 m32r-asm.c:511 m32r-asm.c:515
-#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
-#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:470
-#: xstormy16-asm.c:474 xstormy16-asm.c:561 xstormy16-asm.c:663
+#: 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
msgid "unrecognized instruction"
msgstr ""
-#: fr30-asm.c:556 frv-asm.c:859 ip2k-asm.c:807 iq2000-asm.c:693 m32r-asm.c:558
-#: openrisc-asm.c:477 xstormy16-asm.c:517
+#: 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
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr ""
-#: fr30-asm.c:566 frv-asm.c:869 ip2k-asm.c:817 iq2000-asm.c:703 m32r-asm.c:568
-#: openrisc-asm.c:487 xstormy16-asm.c:527
+#: 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
#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
msgstr ""
-#: fr30-asm.c:594 frv-asm.c:897 ip2k-asm.c:845 iq2000-asm.c:731 m32r-asm.c:596
-#: openrisc-asm.c:515 xstormy16-asm.c:555
+#: 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
msgid "junk at end of line"
msgstr ""
-#: fr30-asm.c:701 frv-asm.c:1004 ip2k-asm.c:952 iq2000-asm.c:838
-#: m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:662
+#: 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
msgid "unrecognized form of instruction"
msgstr ""
-#: fr30-asm.c:713 frv-asm.c:1016 ip2k-asm.c:964 iq2000-asm.c:850
-#: m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:674
+#: 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
#, c-format
msgid "bad instruction `%.50s...'"
msgstr ""
-#: fr30-asm.c:716 frv-asm.c:1019 ip2k-asm.c:967 iq2000-asm.c:853
-#: m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:677
+#: 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
#, 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 m32r-dis.c:41
-#: mmix-dis.c:284 openrisc-dis.c:41 xstormy16-dis.c:41
+#: 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
msgid "*unknown*"
msgstr ""
-#: fr30-dis.c:320 frv-dis.c:371 ip2k-dis.c:329 iq2000-dis.c:192 m32r-dis.c:251
-#: openrisc-dis.c:138 xstormy16-dis.c:171
+#: 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
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr ""
-#: fr30-ibld.c:166 frv-ibld.c:166 ip2k-ibld.c:166 iq2000-ibld.c:166
-#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
+#: 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
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
msgstr ""
-#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179
-#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
+#: 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
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr ""
-#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713
-#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
+#: 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
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr ""
-#: fr30-ibld.c:937 frv-ibld.c:1121 ip2k-ibld.c:684 iq2000-ibld.c:890
-#: m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
+#: 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
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr ""
-#: fr30-ibld.c:1086 frv-ibld.c:1375 ip2k-ibld.c:761 iq2000-ibld.c:1024
-#: m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
+#: 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
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1215 frv-ibld.c:1609 ip2k-ibld.c:818 iq2000-ibld.c:1138
-#: m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
+#: 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
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr ""
-#: fr30-ibld.c:1349 frv-ibld.c:1852 ip2k-ibld.c:880 iq2000-ibld.c:1261
-#: m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
+#: 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
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1471 frv-ibld.c:2083 ip2k-ibld.c:930 iq2000-ibld.c:1372
-#: m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
+#: 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
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr ""
-#: frv-asm.c:365
+#: frv-asm.c:607
+msgid "missing `]'"
+msgstr ""
+
+#: frv-asm.c:610 frv-asm.c:620
+msgid "Special purpose register number is out of range"
+msgstr ""
+
+#: frv-asm.c:907
+msgid "Value of A operand must be 0 or 1"
+msgstr ""
+
+#: frv-asm.c:943
msgid "register number must be even"
msgstr ""
-#: h8300-dis.c:377
+#. -- 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
+msgid "missing `)'"
+msgstr ""
+
+#: h8300-dis.c:325
#, c-format
msgid "Hmmmm 0x%x"
msgstr ""
-#: h8300-dis.c:760
+#: h8300-dis.c:706
#, c-format
msgid "Don't understand 0x%x \n"
msgstr ""
-#: h8500-dis.c:143
+#: h8500-dis.c:122
#, c-format
msgid "can't cope with insert %d\n"
msgstr ""
#. Couldn't understand anything.
-#: h8500-dis.c:350
+#: h8500-dis.c:322
#, c-format
msgid "%02x\t\t*unknown*"
msgstr ""
-#: i386-dis.c:1699
+#: i386-dis.c:1742
msgid "<internal disassembler error>"
msgstr ""
-#: ia64-gen.c:295
+#: ia64-gen.c:297
#, c-format
msgid "%s: Error: "
msgstr ""
-#: ia64-gen.c:308
+#: ia64-gen.c:310
#, c-format
msgid "%s: Warning: "
msgstr ""
-#: ia64-gen.c:494 ia64-gen.c:728
+#: ia64-gen.c:496 ia64-gen.c:730
#, c-format
msgid "multiple note %s not handled\n"
msgstr ""
-#: ia64-gen.c:605
+#: ia64-gen.c:607
msgid "can't find ia64-ic.tbl for reading\n"
msgstr ""
-#: ia64-gen.c:810
+#: ia64-gen.c:812
#, c-format
msgid "can't find %s for reading\n"
msgstr ""
-#: ia64-gen.c:1034
+#: ia64-gen.c:1036
#, c-format
msgid ""
"most recent format '%s'\n"
"appears more restrictive than '%s'\n"
msgstr ""
-#: ia64-gen.c:1045
+#: ia64-gen.c:1047
#, c-format
msgid "overlapping field %s->%s\n"
msgstr ""
-#: ia64-gen.c:1236
+#: ia64-gen.c:1244
#, c-format
msgid "overwriting note %d with note %d (IC:%s)\n"
msgstr ""
-#: ia64-gen.c:1435
+#: ia64-gen.c:1443
#, c-format
msgid "don't know how to specify %% dependency %s\n"
msgstr ""
-#: ia64-gen.c:1457
+#: ia64-gen.c:1465
#, c-format
msgid "Don't know how to specify # dependency %s\n"
msgstr ""
-#: ia64-gen.c:1496
+#: ia64-gen.c:1504
#, c-format
msgid "IC:%s [%s] has no terminals or sub-classes\n"
msgstr ""
-#: ia64-gen.c:1499
+#: ia64-gen.c:1507
#, c-format
msgid "IC:%s has no terminals or sub-classes\n"
msgstr ""
-#: ia64-gen.c:1508
+#: ia64-gen.c:1516
#, c-format
msgid "no insns mapped directly to terminal IC %s [%s]"
msgstr ""
-#: ia64-gen.c:1511
+#: ia64-gen.c:1519
#, c-format
msgid "no insns mapped directly to terminal IC %s\n"
msgstr ""
-#: ia64-gen.c:1522
+#: ia64-gen.c:1530
#, c-format
msgid "class %s is defined but not used\n"
msgstr ""
-#: ia64-gen.c:1533
+#: ia64-gen.c:1541
#, c-format
msgid "Warning: rsrc %s (%s) has no chks%s\n"
msgstr ""
-#: ia64-gen.c:1537
+#: ia64-gen.c:1545
#, c-format
msgid "rsrc %s (%s) has no regs\n"
msgstr ""
-#: ia64-gen.c:2436
+#: ia64-gen.c:2444
#, c-format
msgid "IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"
msgstr ""
-#: ia64-gen.c:2464
+#: ia64-gen.c:2472
#, c-format
msgid "IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"
msgstr ""
-#: ia64-gen.c:2478
+#: ia64-gen.c:2486
#, c-format
msgid "opcode %s has no class (ops %d %d %d)\n"
msgstr ""
-#: ia64-gen.c:2789
+#: 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:92
+#: ip2k-asm.c:80
msgid "W keyword invalid in FR operand slot."
msgstr ""
#. Invalid offset present.
-#: ip2k-asm.c:122
+#: ip2k-asm.c:105
msgid "offset(IP) is not a valid form"
msgstr ""
#. Found something there in front of (DP) but it's out
#. of range.
-#: ip2k-asm.c:175
+#: ip2k-asm.c:153
msgid "(DP) offset out of range."
msgstr ""
#. Found something there in front of (SP) but it's out
#. of range.
-#: ip2k-asm.c:221
+#: ip2k-asm.c:194
msgid "(SP) offset out of range."
msgstr ""
-#: ip2k-asm.c:241
+#: ip2k-asm.c:210
msgid "illegal use of parentheses"
msgstr ""
-#: ip2k-asm.c:248
+#: ip2k-asm.c:217
msgid "operand out of range (not between 1 and 255)"
msgstr ""
#. Something is very wrong. opindex has to be one of the above.
-#: ip2k-asm.c:273
+#: ip2k-asm.c:241
msgid "parse_addr16: invalid opindex."
msgstr ""
-#: ip2k-asm.c:353
+#: ip2k-asm.c:295
msgid "Byte address required. - must be even."
msgstr ""
-#: ip2k-asm.c:362
+#: ip2k-asm.c:304
msgid "cgen_parse_address returned a symbol. Literal required."
msgstr ""
-#: ip2k-asm.c:420
-#, c-format
-msgid "%operator operand is not a symbol"
+#: ip2k-asm.c:359
+msgid "percent-operator operand is not a symbol"
msgstr ""
-#: ip2k-asm.c:474
+#: ip2k-asm.c:412
msgid "Attempt to find bit index of 0"
msgstr ""
-#: iq2000-asm.c:110 iq2000-asm.c:141
+#: iq2000-asm.c:111 iq2000-asm.c:141
msgid "immediate value cannot be register"
msgstr ""
-#: iq2000-asm.c:120 iq2000-asm.c:151
+#: iq2000-asm.c:122 iq2000-asm.c:152
msgid "immediate value out of range"
msgstr ""
-#: iq2000-asm.c:180
+#: iq2000-asm.c:181
msgid "21-bit offset out of range"
msgstr ""
-#: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305
-msgid "missing `)'"
+#: m10200-dis.c:156 m10300-dis.c:580
+#, c-format
+msgid "unknown\t0x%04lx"
msgstr ""
-#: m10200-dis.c:199
+#: m10200-dis.c:326
#, c-format
-msgid "unknown\t0x%02x"
+msgid "unknown\t0x%02lx"
msgstr ""
-#: m10200-dis.c:339
-#, c-format
-msgid "unknown\t0x%04lx"
+#: m32c-asm.c:116
+msgid "imm:6 immediate is out of range"
msgstr ""
-#: m10300-dis.c:766
+#: m32c-asm.c:146
#, c-format
-msgid "unknown\t0x%04x"
+msgid "%dsp8() takes a symbolic address, not a number"
msgstr ""
-#: m68k-dis.c:429
+#: m32c-asm.c:159 m32c-asm.c:163 m32c-asm.c:229
+msgid "dsp:8 immediate is out of range"
+msgstr ""
+
+#: m32c-asm.c:184 m32c-asm.c:188
+msgid "Immediate is out of range -8 to 7"
+msgstr ""
+
+#: m32c-asm.c:259
#, c-format
-msgid "<internal error in opcode table: %s %s>\n"
+msgid "%dsp16() takes a symbolic address, not a number"
+msgstr ""
+
+#: m32c-asm.c:282 m32c-asm.c:289 m32c-asm.c:352
+msgid "dsp:16 immediate is out of range"
+msgstr ""
+
+#: m32c-asm.c:378
+msgid "dsp:20 immediate is out of range"
+msgstr ""
+
+#: m32c-asm.c:404
+msgid "dsp:24 immediate is out of range"
+msgstr ""
+
+#: m32c-asm.c:437
+msgid "immediate is out of range 1-2"
+msgstr ""
+
+#: m32c-asm.c:455
+msgid "immediate is out of range 1-8"
msgstr ""
-#: m68k-dis.c:1007
+#: m32c-asm.c:491
+msgid "immediate is out of range 2-9"
+msgstr ""
+
+#: m32c-asm.c:509
+msgid "Bit number for indexing general register is out of range 0-15"
+msgstr ""
+
+#: m32c-asm.c:541 m32c-asm.c:576
+msgid "bit,base is out of range"
+msgstr ""
+
+#: m32c-asm.c:712
+msgid "not a valid r0l/r0h pair"
+msgstr ""
+
+#: m32c-asm.c:742
+msgid "Invalid size specifier"
+msgstr ""
+
+#: m68k-dis.c:1162
#, c-format
msgid "<function code %d>"
msgstr ""
-#: m88k-dis.c:746
+#: m68k-dis.c:1313
+#, c-format
+msgid "<internal error in opcode table: %s %s>\n"
+msgstr ""
+
+#: m88k-dis.c:679
#, c-format
-msgid "# <dis error: %08x>"
+msgid "# <dis error: %08lx>"
msgstr ""
-#: mips-dis.c:703
+#: mips-dis.c:718
msgid "# internal error, incomplete extension sequence (+)"
msgstr ""
-#: mips-dis.c:746
+#: mips-dis.c:805
#, c-format
msgid "# internal error, undefined extension sequence (+%c)"
msgstr ""
-#: mips-dis.c:1004
+#: mips-dis.c:1153
#, c-format
msgid "# internal error, undefined modifier(%c)"
msgstr ""
-#: mips-dis.c:1755
+#: mips-dis.c:1663
#, c-format
msgid "# internal disassembler error, unrecognised modifier (%c)"
msgstr ""
-#: mips-dis.c:1767
+#: mips-dis.c:1894
+#, c-format
msgid ""
"\n"
"The following MIPS specific disassembler options are supported for use\n"
"with the -M switch (multiple options should be separated by commas):\n"
msgstr ""
-#: mips-dis.c:1771
+#: mips-dis.c:1898
+#, c-format
msgid ""
"\n"
" gpr-names=ABI Print GPR names according to specified ABI.\n"
" Default: based on binary being disassembled.\n"
msgstr ""
-#: mips-dis.c:1775
+#: mips-dis.c:1902
+#, c-format
msgid ""
"\n"
" fpr-names=ABI Print FPR names according to specified ABI.\n"
" Default: numeric.\n"
msgstr ""
-#: mips-dis.c:1779
+#: mips-dis.c:1906
+#, c-format
msgid ""
"\n"
" cp0-names=ARCH Print CP0 register names according to\n"
@@ -485,7 +685,8 @@ msgid ""
" Default: based on binary being disassembled.\n"
msgstr ""
-#: mips-dis.c:1784
+#: mips-dis.c:1911
+#, c-format
msgid ""
"\n"
" hwr-names=ARCH Print HWR names according to specified \n"
@@ -493,173 +694,203 @@ msgid ""
" Default: based on binary being disassembled.\n"
msgstr ""
-#: mips-dis.c:1789
+#: mips-dis.c:1916
+#, c-format
msgid ""
"\n"
" reg-names=ABI Print GPR and FPR names according to\n"
" specified ABI.\n"
msgstr ""
-#: mips-dis.c:1793
+#: mips-dis.c:1920
+#, c-format
msgid ""
"\n"
" reg-names=ARCH Print CP0 register and HWR names according to\n"
" specified architecture.\n"
msgstr ""
-#: mips-dis.c:1797
+#: mips-dis.c:1924
+#, c-format
msgid ""
"\n"
" For the options above, the following values are supported for \"ABI\":\n"
" "
msgstr ""
-#: mips-dis.c:1802 mips-dis.c:1810 mips-dis.c:1812
+#: mips-dis.c:1929 mips-dis.c:1937 mips-dis.c:1939
+#, c-format
msgid "\n"
msgstr ""
-#: mips-dis.c:1804
+#: mips-dis.c:1931
+#, c-format
msgid ""
"\n"
" For the options above, The following values are supported for \"ARCH\":\n"
" "
msgstr ""
-#: mmix-dis.c:34
+#: mmix-dis.c:35
#, c-format
msgid "Bad case %d (%s) in %s:%d\n"
msgstr ""
-#: mmix-dis.c:44
+#: mmix-dis.c:45
#, c-format
msgid "Internal: Non-debugged code (test-case missing): %s:%d"
msgstr ""
-#: mmix-dis.c:53
+#: mmix-dis.c:54
msgid "(unknown)"
msgstr ""
-#: mmix-dis.c:519
+#: mmix-dis.c:513
#, c-format
msgid "*unknown operands type: %d*"
msgstr ""
+#: ms1-asm.c:84 ms1-asm.c:162
+msgid "Operand out of range. Must be between -32768 and 32767."
+msgstr ""
+
+#: ms1-asm.c:121
+msgid "Biiiig Trouble in parse_imm16!"
+msgstr ""
+
+#: ms1-asm.c:129
+#, c-format
+msgid "%operator operand is not a symbol"
+msgstr ""
+
+#: ms1-asm.c:367
+msgid "invalid operand. type may have values 0,1,2 only."
+msgstr ""
+
#. I and Z are output operands and can`t be immediate
-#. * A is an address and we can`t have the address of
-#. * an immediate either. We don't know how much to increase
-#. * aoffsetp by since whatever generated this is broken
-#. * anyway!
-#.
-#: ns32k-dis.c:631
+#. A is an address and we can`t have the address of
+#. an immediate either. We don't know how much to increase
+#. aoffsetp by since whatever generated this is broken
+#. anyway!
+#: ns32k-dis.c:535
+#, c-format
msgid "$<undefined>"
msgstr ""
-#: ppc-opc.c:781 ppc-opc.c:809
+#: ppc-opc.c:800 ppc-opc.c:828
msgid "invalid conditional option"
msgstr ""
-#: ppc-opc.c:811
+#: ppc-opc.c:830
msgid "attempt to set y bit when using + or - modifier"
msgstr ""
-#: ppc-opc.c:840
+#: ppc-opc.c:858
msgid "offset not a multiple of 16"
msgstr ""
-#: ppc-opc.c:860
+#: ppc-opc.c:877
msgid "offset not a multiple of 2"
msgstr ""
-#: ppc-opc.c:862
+#: ppc-opc.c:879
msgid "offset greater than 62"
msgstr ""
-#: ppc-opc.c:881 ppc-opc.c:927 ppc-opc.c:975
+#: ppc-opc.c:898 ppc-opc.c:943 ppc-opc.c:987
msgid "offset not a multiple of 4"
msgstr ""
-#: ppc-opc.c:883
+#: ppc-opc.c:900
msgid "offset greater than 124"
msgstr ""
-#: ppc-opc.c:902
+#: ppc-opc.c:919
msgid "offset not a multiple of 8"
msgstr ""
-#: ppc-opc.c:904
+#: ppc-opc.c:921
msgid "offset greater than 248"
msgstr ""
-#: ppc-opc.c:950
+#: ppc-opc.c:964
msgid "offset not between -2048 and 2047"
msgstr ""
-#: ppc-opc.c:973
+#: ppc-opc.c:985
msgid "offset not between -8192 and 8191"
msgstr ""
-#: ppc-opc.c:1011
+#: ppc-opc.c:1013
+msgid "invalid mask field"
+msgstr ""
+
+#: ppc-opc.c:1039
msgid "ignoring invalid mfcr mask"
msgstr ""
-#: ppc-opc.c:1059
+#: ppc-opc.c:1081
msgid "ignoring least significant bits in branch offset"
msgstr ""
-#: ppc-opc.c:1090 ppc-opc.c:1125
+#: ppc-opc.c:1111 ppc-opc.c:1146
msgid "illegal bitmask"
msgstr ""
-#: ppc-opc.c:1192
+#: ppc-opc.c:1211
msgid "value out of range"
msgstr ""
-#: ppc-opc.c:1262
+#: ppc-opc.c:1279
msgid "index register in load range"
msgstr ""
-#: ppc-opc.c:1279
+#: ppc-opc.c:1295
msgid "source and target register operands must be different"
msgstr ""
-#: ppc-opc.c:1294
+#: ppc-opc.c:1310
msgid "invalid register operand when updating"
msgstr ""
-#: ppc-opc.c:1335
+#: ppc-opc.c:1349
msgid "target register operand must be even"
msgstr ""
-#: ppc-opc.c:1350
+#: ppc-opc.c:1363
msgid "source register operand must be even"
msgstr ""
-#. Mark as non-valid instruction.
-#: sparc-dis.c:760
-msgid "unknown"
+#: ppc-opc.c:1420
+msgid "invalid sprg number"
msgstr ""
-#: sparc-dis.c:835
+#: sparc-dis.c:269
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:846
+#: sparc-dis.c:280
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:895
+#: sparc-dis.c:330
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr ""
-#: v850-dis.c:221
+#. Mark as non-valid instruction.
+#: sparc-dis.c:984
+msgid "unknown"
+msgstr ""
+
+#: v850-dis.c:237
#, c-format
msgid "unknown operand shift: %x\n"
msgstr ""
-#: v850-dis.c:233
+#: v850-dis.c:251
#, c-format
msgid "unknown pop reg: %d\n"
msgstr ""
@@ -669,86 +900,86 @@ msgstr ""
#. v850_insert_operand() in gas/config/tc-v850.c. Error messages
#. containing the string 'out of range' will be ignored unless a
#. specific command line option is given to GAS.
-#: v850-opc.c:68
+#: v850-opc.c:46
msgid "displacement value is not in range and is not aligned"
msgstr ""
-#: v850-opc.c:69
+#: v850-opc.c:47
msgid "displacement value is out of range"
msgstr ""
-#: v850-opc.c:70
+#: v850-opc.c:48
msgid "displacement value is not aligned"
msgstr ""
-#: v850-opc.c:72
+#: v850-opc.c:50
msgid "immediate value is out of range"
msgstr ""
-#: v850-opc.c:83
+#: v850-opc.c:58
msgid "branch value not in range and to odd offset"
msgstr ""
-#: v850-opc.c:85 v850-opc.c:117
+#: v850-opc.c:60 v850-opc.c:87
msgid "branch value out of range"
msgstr ""
-#: v850-opc.c:88 v850-opc.c:120
+#: v850-opc.c:63 v850-opc.c:90
msgid "branch to odd offset"
msgstr ""
-#: v850-opc.c:115
+#: v850-opc.c:85
msgid "branch value not in range and to an odd offset"
msgstr ""
-#: v850-opc.c:346
+#: v850-opc.c:277
msgid "invalid register for stack adjustment"
msgstr ""
-#: v850-opc.c:370
+#: v850-opc.c:297
msgid "immediate value not in range and not even"
msgstr ""
-#: v850-opc.c:375
+#: v850-opc.c:302
msgid "immediate value must be even"
msgstr ""
-#: xstormy16-asm.c:76
+#: xstormy16-asm.c:70
msgid "Bad register in preincrement"
msgstr ""
-#: xstormy16-asm.c:81
+#: xstormy16-asm.c:75
msgid "Bad register in postincrement"
msgstr ""
-#: xstormy16-asm.c:83
+#: xstormy16-asm.c:77
msgid "Bad register name"
msgstr ""
-#: xstormy16-asm.c:87
+#: xstormy16-asm.c:81
msgid "Label conflicts with register name"
msgstr ""
-#: xstormy16-asm.c:91
+#: xstormy16-asm.c:85
msgid "Label conflicts with `Rx'"
msgstr ""
-#: xstormy16-asm.c:93
+#: xstormy16-asm.c:87
msgid "Bad immediate expression"
msgstr ""
-#: xstormy16-asm.c:115
+#: xstormy16-asm.c:108
msgid "No relocation for small immediate"
msgstr ""
-#: xstormy16-asm.c:125
+#: xstormy16-asm.c:118
msgid "Small operand was not an immediate number"
msgstr ""
-#: xstormy16-asm.c:164
+#: xstormy16-asm.c:156
msgid "Operand is not a symbol"
msgstr ""
-#: xstormy16-asm.c:172
+#: xstormy16-asm.c:164
msgid "Syntax error: No trailing ')'"
msgstr ""
diff --git a/contrib/binutils/opcodes/ppc-dis.c b/contrib/binutils/opcodes/ppc-dis.c
index 9dc586de8c4a..35875d1ac33f 100644
--- a/contrib/binutils/opcodes/ppc-dis.c
+++ b/contrib/binutils/opcodes/ppc-dis.c
@@ -1,6 +1,5 @@
-/* $FreeBSD$ */
/* ppc-dis.c -- Disassemble PowerPC instructions
- Copyright 1994, 1995, 2000, 2001, 2002, 2003, 2004
+ Copyright 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
@@ -18,7 +17,7 @@ the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include <stdio.h>
#include "sysdep.h"
@@ -33,11 +32,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
static int print_insn_powerpc (bfd_vma, struct disassemble_info *, int, int);
-struct dis_private {
- /* Stash the result of parsing disassembler_options here. */
- int dialect;
-};
-
/* Determine which set of machines to disassemble for. PPC403/601 or
BookE. For convenience, also disassemble instructions supported
by the AltiVec vector unit. */
@@ -45,8 +39,7 @@ struct dis_private {
static int
powerpc_dialect (struct disassemble_info *info)
{
- int dialect = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
- void *pd = &info->private_data;
+ int dialect = PPC_OPCODE_PPC;
if (BFD_DEFAULT_TARGET_SIZE == 64)
dialect |= PPC_OPCODE_64;
@@ -57,31 +50,30 @@ powerpc_dialect (struct disassemble_info *info)
else if ((info->mach == bfd_mach_ppc_e500)
|| (info->disassembler_options
&& strstr (info->disassembler_options, "e500") != NULL))
- {
- dialect |= PPC_OPCODE_BOOKE
- | PPC_OPCODE_SPE | PPC_OPCODE_ISEL
- | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
- | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK
- | PPC_OPCODE_RFMCI;
- /* efs* and AltiVec conflict. */
- dialect &= ~PPC_OPCODE_ALTIVEC;
- }
+ dialect |= (PPC_OPCODE_BOOKE
+ | PPC_OPCODE_SPE | PPC_OPCODE_ISEL
+ | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK
+ | PPC_OPCODE_RFMCI);
else if (info->disassembler_options
&& strstr (info->disassembler_options, "efs") != NULL)
- {
- dialect |= PPC_OPCODE_EFS;
- /* efs* and AltiVec conflict. */
- dialect &= ~PPC_OPCODE_ALTIVEC;
- }
+ dialect |= PPC_OPCODE_EFS;
+ else if (info->disassembler_options
+ && strstr (info->disassembler_options, "e300") != NULL)
+ dialect |= PPC_OPCODE_E300 | PPC_OPCODE_CLASSIC | PPC_OPCODE_COMMON;
else
dialect |= (PPC_OPCODE_403 | PPC_OPCODE_601 | PPC_OPCODE_CLASSIC
- | PPC_OPCODE_COMMON);
+ | PPC_OPCODE_COMMON | PPC_OPCODE_ALTIVEC);
if (info->disassembler_options
&& strstr (info->disassembler_options, "power4") != NULL)
dialect |= PPC_OPCODE_POWER4;
if (info->disassembler_options
+ && strstr (info->disassembler_options, "power5") != NULL)
+ dialect |= PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5;
+
+ if (info->disassembler_options
&& strstr (info->disassembler_options, "any") != NULL)
dialect |= PPC_OPCODE_ANY;
@@ -93,7 +85,7 @@ powerpc_dialect (struct disassemble_info *info)
dialect |= PPC_OPCODE_64;
}
- ((struct dis_private *) pd)->dialect = dialect;
+ info->private_data = (char *) 0 + dialect;
return dialect;
}
@@ -102,8 +94,7 @@ powerpc_dialect (struct disassemble_info *info)
int
print_insn_big_powerpc (bfd_vma memaddr, struct disassemble_info *info)
{
- void *pd = &info->private_data;
- int dialect = ((struct dis_private *) pd)->dialect;
+ int dialect = (char *) info->private_data - (char *) 0;
return print_insn_powerpc (memaddr, info, 1, dialect);
}
@@ -112,8 +103,7 @@ print_insn_big_powerpc (bfd_vma memaddr, struct disassemble_info *info)
int
print_insn_little_powerpc (bfd_vma memaddr, struct disassemble_info *info)
{
- void *pd = &info->private_data;
- int dialect = ((struct dis_private *) pd)->dialect;
+ int dialect = (char *) info->private_data - (char *) 0;
return print_insn_powerpc (memaddr, info, 0, dialect);
}
@@ -257,7 +247,7 @@ print_insn_powerpc (bfd_vma memaddr,
else
{
if (operand->bits == 3)
- (*info->fprintf_func) (info->stream, "cr%d", value);
+ (*info->fprintf_func) (info->stream, "cr%ld", value);
else
{
static const char *cbnames[4] = { "lt", "gt", "eq", "so" };
@@ -311,9 +301,11 @@ The following PPC specific disassembler options are supported for use with\n\
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, " efs Disassemble the EFS instructions\n");
fprintf (stream, " power4 Disassemble the Power4 instructions\n");
+ fprintf (stream, " power5 Disassemble the Power5 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 8cf90878befd..84e6d6a04e9d 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
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with this file; see the file COPYING. If not, write to the Free
- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <stdio.h>
#include "sysdep.h"
@@ -84,6 +84,8 @@ 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 **);
static long extract_spr (unsigned long, int, int *);
+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 **);
@@ -109,12 +111,12 @@ const struct powerpc_operand powerpc_operands[] =
/* The zero index is used to indicate the end of the list of
operands. */
#define UNUSED 0
- { 0, 0, 0, 0, 0 },
+ { 0, 0, NULL, NULL, 0 },
/* The BA field in an XL form instruction. */
#define BA UNUSED + 1
#define BA_MASK (0x1f << 16)
- { 5, 16, 0, 0, PPC_OPERAND_CR },
+ { 5, 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. */
@@ -124,7 +126,7 @@ const struct powerpc_operand powerpc_operands[] =
/* The BB field in an XL form instruction. */
#define BB BAT + 1
#define BB_MASK (0x1f << 11)
- { 5, 11, 0, 0, PPC_OPERAND_CR },
+ { 5, 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. */
@@ -167,21 +169,21 @@ const struct powerpc_operand powerpc_operands[] =
/* The BF field in an X or XL form instruction. */
#define BF BDPA + 1
- { 3, 23, 0, 0, PPC_OPERAND_CR },
+ { 3, 23, NULL, NULL, PPC_OPERAND_CR },
/* An optional BF field. This is used for comparison instructions,
in which an omitted BF field is taken as zero. */
#define OBF BF + 1
- { 3, 23, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
+ { 3, 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, 0, 0, PPC_OPERAND_CR },
+ { 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, 0, 0, PPC_OPERAND_CR },
+ { 5, 16, NULL, NULL, PPC_OPERAND_CR },
/* The BO field in a B form instruction. Certain values are
illegal. */
@@ -194,38 +196,41 @@ const struct powerpc_operand powerpc_operands[] =
#define BOE BO + 1
{ 5, 21, insert_boe, extract_boe, 0 },
+#define BH BOE + 1
+ { 2, 11, NULL, NULL, PPC_OPERAND_OPTIONAL },
+
/* The BT field in an X or XL form instruction. */
-#define BT BOE + 1
- { 5, 21, 0, 0, PPC_OPERAND_CR },
+#define BT BH + 1
+ { 5, 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, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
+ { 3, 18, NULL, NULL, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
/* The CRB field in an X form instruction. */
#define CRB CR + 1
- { 5, 6, 0, 0, 0 },
+ { 5, 6, NULL, NULL, 0 },
/* The CRFD field in an X form instruction. */
#define CRFD CRB + 1
- { 3, 23, 0, 0, PPC_OPERAND_CR },
+ { 3, 23, NULL, NULL, PPC_OPERAND_CR },
/* The CRFS field in an X form instruction. */
#define CRFS CRFD + 1
- { 3, 0, 0, 0, PPC_OPERAND_CR },
+ { 3, 0, NULL, NULL, PPC_OPERAND_CR },
/* The CT field in an X form instruction. */
#define CT CRFS + 1
- { 5, 21, 0, 0, PPC_OPERAND_OPTIONAL },
+ { 5, 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, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+ { 16, 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. */
@@ -251,40 +256,40 @@ const struct powerpc_operand powerpc_operands[] =
/* The E field in a wrteei instruction. */
#define E DS + 1
- { 1, 15, 0, 0, 0 },
+ { 1, 15, NULL, NULL, 0 },
/* The FL1 field in a POWER SC form instruction. */
#define FL1 E + 1
- { 4, 12, 0, 0, 0 },
+ { 4, 12, NULL, NULL, 0 },
/* The FL2 field in a POWER SC form instruction. */
#define FL2 FL1 + 1
- { 3, 2, 0, 0, 0 },
+ { 3, 2, NULL, NULL, 0 },
/* The FLM field in an XFL form instruction. */
#define FLM FL2 + 1
- { 8, 17, 0, 0, 0 },
+ { 8, 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, 0, 0, PPC_OPERAND_FPR },
+ { 5, 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, 0, 0, PPC_OPERAND_FPR },
+ { 5, 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, 0, 0, PPC_OPERAND_FPR },
+ { 5, 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, 0, 0, PPC_OPERAND_FPR },
+ { 5, 21, NULL, NULL, PPC_OPERAND_FPR },
/* The FXM field in an XFX instruction. */
#define FXM FRS + 1
@@ -297,11 +302,15 @@ const struct powerpc_operand powerpc_operands[] =
/* The L field in a D or X form instruction. */
#define L FXM4 + 1
- { 1, 21, 0, 0, PPC_OPERAND_OPTIONAL },
+ { 1, 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 },
- /* The LEV field in a POWER SC form instruction. */
-#define LEV L + 1
- { 7, 5, 0, 0, 0 },
+ /* The LEV field in an SC form instruction. */
+#define LEV SVC_LEV + 1
+ { 7, 5, NULL, NULL, PPC_OPERAND_OPTIONAL },
/* The LI field in an I form instruction. The lower two bits are
forced to zero. */
@@ -315,24 +324,24 @@ const struct powerpc_operand powerpc_operands[] =
/* The LS field in an X (sync) form instruction. */
#define LS LIA + 1
- { 2, 21, 0, 0, PPC_OPERAND_OPTIONAL },
+ { 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, 0, 0, 0 },
+ { 5, 6, NULL, NULL, 0 },
/* The ME field in an M form instruction. */
#define ME MB + 1
#define ME_MASK (0x1f << 1)
- { 5, 1, 0, 0, 0 },
+ { 5, 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, 0, 0, PPC_OPERAND_OPTIONAL | PPC_OPERAND_NEXT },
+ { 5, 6, NULL, NULL, PPC_OPERAND_OPTIONAL | PPC_OPERAND_NEXT },
{ 32, 0, insert_mbe, extract_mbe, 0 },
/* The MB or ME field in an MD or MDS form instruction. The high
@@ -344,7 +353,7 @@ const struct powerpc_operand powerpc_operands[] =
/* The MO field in an mbar instruction. */
#define MO MB6 + 1
- { 5, 21, 0, 0, PPC_OPERAND_OPTIONAL },
+ { 5, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
/* The NB field in an X form instruction. The value 32 is stored as
0. */
@@ -360,42 +369,42 @@ const struct powerpc_operand powerpc_operands[] =
/* 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, 0, 0, PPC_OPERAND_GPR },
+ { 5, 16, NULL, NULL, PPC_OPERAND_GPR },
/* As above, but 0 in the RA field means zero, not r0. */
#define RA0 RA + 1
- { 5, 16, 0, 0, PPC_OPERAND_GPR_0 },
+ { 5, 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, 0, PPC_OPERAND_GPR_0 },
+ { 5, 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, 0, PPC_OPERAND_GPR_0 },
+ { 5, 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, 0, PPC_OPERAND_GPR_0 },
+ { 5, 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, 0, PPC_OPERAND_GPR_0 },
+ { 5, 16, insert_ras, NULL, PPC_OPERAND_GPR_0 },
/* The RA field of the tlbwe instruction, which is optional. */
#define RAOPT RAS + 1
- { 5, 16, 0, 0, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL },
+ { 5, 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, 0, 0, PPC_OPERAND_GPR },
+ { 5, 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
@@ -409,26 +418,27 @@ const struct powerpc_operand powerpc_operands[] =
#define RS RBS + 1
#define RT RS
#define RT_MASK (0x1f << 21)
- { 5, 21, 0, 0, PPC_OPERAND_GPR },
+ { 5, 21, NULL, NULL, PPC_OPERAND_GPR },
/* The RS field of the DS form stq instruction, which has special
value restrictions. */
#define RSQ RS + 1
- { 5, 21, insert_rsq, 0, PPC_OPERAND_GPR_0 },
+ { 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, 0, PPC_OPERAND_GPR_0 },
+ { 5, 21, insert_rtq, NULL, PPC_OPERAND_GPR_0 },
/* The RS field of the tlbwe instruction, which is optional. */
#define RSO RTQ + 1
- { 5, 21, 0, 0, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL },
+#define RTO RSO
+ { 5, 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, 0, 0, 0 },
+ { 5, 11, NULL, NULL, 0 },
/* The SH field in an MD form instruction. This is split. */
#define SH6 SH + 1
@@ -437,16 +447,16 @@ const struct powerpc_operand powerpc_operands[] =
/* The SH field of the tlbwe instruction, which is optional. */
#define SHO SH6 + 1
- { 5, 11,0, 0, PPC_OPERAND_OPTIONAL },
+ { 5, 11,NULL, NULL, PPC_OPERAND_OPTIONAL },
/* The SI field in a D form instruction. */
#define SI SHO + 1
- { 16, 0, 0, 0, PPC_OPERAND_SIGNED },
+ { 16, 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, 0, 0, PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
+ { 16, 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. */
@@ -458,25 +468,24 @@ const struct powerpc_operand powerpc_operands[] =
/* The BAT index number in an XFX form m[ft]ibat[lu] instruction. */
#define SPRBAT SPR + 1
#define SPRBAT_MASK (0x3 << 17)
- { 2, 17, 0, 0, 0 },
+ { 2, 17, NULL, NULL, 0 },
/* The SPRG register number in an XFX form m[ft]sprg instruction. */
#define SPRG SPRBAT + 1
-#define SPRG_MASK (0x3 << 16)
- { 2, 16, 0, 0, 0 },
+ { 5, 16, insert_sprg, extract_sprg, 0 },
/* The SR field in an X form instruction. */
#define SR SPRG + 1
- { 4, 16, 0, 0, 0 },
+ { 4, 16, NULL, NULL, 0 },
/* The STRM field in an X AltiVec form instruction. */
#define STRM SR + 1
#define STRM_MASK (0x3 << 21)
- { 2, 21, 0, 0, 0 },
+ { 2, 21, NULL, NULL, 0 },
/* The SV field in a POWER SC form instruction. */
#define SV STRM + 1
- { 14, 2, 0, 0, 0 },
+ { 14, 2, NULL, NULL, 0 },
/* The TBR field in an XFX form instruction. This is like the SPR
field, but it is optional. */
@@ -486,52 +495,52 @@ const struct powerpc_operand powerpc_operands[] =
/* The TO field in a D or X form instruction. */
#define TO TBR + 1
#define TO_MASK (0x1f << 21)
- { 5, 21, 0, 0, 0 },
+ { 5, 21, NULL, NULL, 0 },
/* The U field in an X form instruction. */
#define U TO + 1
- { 4, 12, 0, 0, 0 },
+ { 4, 12, NULL, NULL, 0 },
/* The UI field in a D form instruction. */
#define UI U + 1
- { 16, 0, 0, 0, 0 },
+ { 16, 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, 0, 0, PPC_OPERAND_VR },
+ { 5, 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, 0, 0, PPC_OPERAND_VR },
+ { 5, 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, 0, 0, PPC_OPERAND_VR },
+ { 5, 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, 0, 0, PPC_OPERAND_VR },
+ { 5, 21, NULL, NULL, PPC_OPERAND_VR },
/* The SIMM field in a VX form instruction. */
#define SIMM VD + 1
- { 5, 16, 0, 0, PPC_OPERAND_SIGNED},
+ { 5, 16, NULL, NULL, PPC_OPERAND_SIGNED},
/* The UIMM field in a VX form instruction. */
#define UIMM SIMM + 1
- { 5, 16, 0, 0, 0 },
+ { 5, 16, NULL, NULL, 0 },
/* The SHB field in a VA form instruction. */
#define SHB UIMM + 1
- { 4, 6, 0, 0, 0 },
+ { 4, 6, NULL, NULL, 0 },
/* The other UIMM field in a EVX form instruction. */
#define EVUIMM SHB + 1
- { 5, 11, 0, 0, 0 },
+ { 5, 11, NULL, NULL, 0 },
/* The other UIMM field in a half word EVX form instruction. */
#define EVUIMM_2 EVUIMM + 1
@@ -548,11 +557,11 @@ const struct powerpc_operand powerpc_operands[] =
/* The WS field. */
#define WS EVUIMM_8 + 1
#define WS_MASK (0x7 << 11)
- { 3, 11, 0, 0, 0 },
+ { 3, 11, NULL, NULL, 0 },
/* The L field in an mtmsrd instruction */
#define MTMSRD_L WS + 1
- { 1, 16, 0, 0, PPC_OPERAND_OPTIONAL },
+ { 1, 16, NULL, NULL, PPC_OPERAND_OPTIONAL },
};
@@ -995,17 +1004,33 @@ insert_fxm (unsigned long insn,
int dialect,
const char **errmsg)
{
+ /* If we're handling the mfocrf and mtocrf insns ensure that exactly
+ one bit of the mask field is set. */
+ if ((insn & (1 << 20)) != 0)
+ {
+ if (value == 0 || (value & -value) != value)
+ {
+ *errmsg = _("invalid mask field");
+ value = 0;
+ }
+ }
+
/* If the optional field on mfcr is missing that means we want to use
the old form of the instruction that moves the whole cr. In that
case we'll have VALUE zero. There doesn't seem to be a way to
distinguish this from the case where someone writes mfcr %r3,0. */
- if (value == 0)
+ else if (value == 0)
;
/* If only one bit of the FXM field is set, we can use the new form
of the instruction, which is faster. Unlike the Power4 branch hint
- encoding, this is not backward compatible. */
- else if ((dialect & PPC_OPCODE_POWER4) != 0 && (value & -value) == value)
+ encoding, this is not backward compatible. Do not generate the
+ new form unless -mpower4 has been given, or -many and the two
+ operand form of mfcr was used. */
+ else if ((value & -value) == value
+ && ((dialect & PPC_OPCODE_POWER4) != 0
+ || ((dialect & PPC_OPCODE_ANY) != 0
+ && (insn & (0x3ff << 1)) == 19 << 1)))
insn |= 1 << 20;
/* Any other value on mfcr is an error. */
@@ -1020,7 +1045,7 @@ insert_fxm (unsigned long insn,
static long
extract_fxm (unsigned long insn,
- int dialect,
+ int dialect ATTRIBUTE_UNUSED,
int *invalid)
{
long mask = (insn >> 12) & 0xff;
@@ -1028,14 +1053,9 @@ extract_fxm (unsigned long insn,
/* Is this a Power4 insn? */
if ((insn & (1 << 20)) != 0)
{
- if ((dialect & PPC_OPCODE_POWER4) == 0)
+ /* Exactly one bit of MASK should be set. */
+ if (mask == 0 || (mask & -mask) != mask)
*invalid = 1;
- else
- {
- /* Exactly one bit of MASK should be set. */
- if (mask == 0 || (mask & -mask) != mask)
- *invalid = 1;
- }
}
/* Check that non-power4 form of mfcr has a zero MASK. */
@@ -1383,6 +1403,47 @@ extract_spr (unsigned long insn,
return ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
}
+/* Some dialects have 8 SPRG registers instead of the standard 4. */
+
+static unsigned long
+insert_sprg (unsigned long insn,
+ long value,
+ int dialect,
+ const char **errmsg)
+{
+ /* This check uses PPC_OPCODE_403 because PPC405 is later defined
+ as a synonym. If ever a 405 specific dialect is added this
+ check should use that instead. */
+ if (value > 7
+ || (value > 3
+ && (dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_403)) == 0))
+ *errmsg = _("invalid sprg number");
+
+ /* If this is mfsprg4..7 then use spr 260..263 which can be read in
+ user mode. Anything else must use spr 272..279. */
+ if (value <= 3 || (insn & 0x100) != 0)
+ value |= 0x10;
+
+ return insn | ((value & 0x17) << 16);
+}
+
+static long
+extract_sprg (unsigned long insn,
+ int dialect,
+ int *invalid)
+{
+ unsigned long val = (insn >> 16) & 0x1f;
+
+ /* mfsprg can use 260..263 and 272..279. mtsprg only uses spr 272..279
+ If not BOOKE or 405, then both use only 272..275. */
+ if (val <= 3
+ || (val < 0x10 && (insn & 0x100) != 0)
+ || (val - 0x10 > 3
+ && (dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_403)) == 0))
+ *invalid = 1;
+ return val & 7;
+}
+
/* The TBR field in an XFX instruction. This is just like SPR, but it
is optional. When TBR is omitted, it must be inserted as 268 (the
magic number of the TB register). These functions treat 0
@@ -1585,8 +1646,8 @@ extract_tbr (unsigned long insn,
/* An XRTRA_MASK, but with L bit clear. */
#define XRTLRA_MASK (XRTRA_MASK & ~((unsigned long) 1 << 21))
-/* An X form comparison instruction. */
-#define XCMPL(op, xop, l) (X ((op), (xop)) | ((((unsigned long)(l)) & 1) << 21))
+/* An X form instruction with the L bit specified. */
+#define XOPL(op, xop, l) (X ((op), (xop)) | ((((unsigned long)(l)) & 1) << 21))
/* The mask for an X form comparison instruction. */
#define XCMP_MASK (X_MASK | (((unsigned long)1) << 22))
@@ -1651,6 +1712,9 @@ extract_tbr (unsigned long insn,
#define XLYBB_MASK (XLYLK_MASK | BB_MASK)
#define XLBOCBBB_MASK (XLOCB_MASK | BB_MASK)
+/* A mask for branch instructions using the BH field. */
+#define XLBH_MASK (XL_MASK | (0x1c << 11))
+
/* An XL_MASK with the BO and BB fields fixed. */
#define XLBOBB_MASK (XL_MASK | BO_MASK | BB_MASK)
@@ -1670,11 +1734,12 @@ extract_tbr (unsigned long insn,
#define XS_MASK XS (0x3f, 0x1ff, 1)
/* A mask for the FXM version of an XFX form instruction. */
-#define XFXFXM_MASK (X_MASK | (1 << 11))
+#define XFXFXM_MASK (X_MASK | (1 << 11) | (1 << 20))
/* An XFX form instruction with the FXM field filled in. */
-#define XFXM(op, xop, fxm) \
- (X ((op), (xop)) | ((((unsigned long)(fxm)) & 0xff) << 12))
+#define XFXM(op, xop, fxm, p4) \
+ (X ((op), (xop)) | ((((unsigned long)(fxm)) & 0xff) << 12) \
+ | ((unsigned long)(p4) << 20))
/* An XFX form instruction with the SPR field filled in. */
#define XSPR(op, xop, spr) \
@@ -1687,7 +1752,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 &~ SPRG_MASK)
+#define XSPRG_MASK (XSPR_MASK & ~(0x17 << 16))
/* An X form instruction with everything filled in except the E field. */
#define XE_MASK (0xffff7fff)
@@ -1757,6 +1822,7 @@ extract_tbr (unsigned long insn,
#define PPCCOM PPC_OPCODE_PPC | PPC_OPCODE_COMMON
#define NOPOWER4 PPC_OPCODE_NOPOWER4 | PPCCOM
#define POWER4 PPC_OPCODE_POWER4
+#define POWER5 PPC_OPCODE_POWER5
#define PPC32 PPC_OPCODE_32 | PPC_OPCODE_PPC
#define PPC64 PPC_OPCODE_64 | PPC_OPCODE_PPC
#define PPC403 PPC_OPCODE_403
@@ -1778,6 +1844,7 @@ extract_tbr (unsigned long insn,
#define BOOKE PPC_OPCODE_BOOKE
#define BOOKE64 PPC_OPCODE_BOOKE64
#define CLASSIC PPC_OPCODE_CLASSIC
+#define PPCE300 PPC_OPCODE_E300
#define PPCSPE PPC_OPCODE_SPE
#define PPCISEL PPC_OPCODE_ISEL
#define PPCEFS PPC_OPCODE_EFS
@@ -2688,9 +2755,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bcla+", B(16,1,1), B_MASK, PPCCOM, { BOE, BI, BDPA } },
{ "bcla", B(16,1,1), B_MASK, COM, { BO, BI, BDA } },
-{ "sc", SC(17,1,0), 0xffffffff, PPC, { 0 } },
-{ "svc", SC(17,0,0), SC_MASK, POWER, { LEV, FL1, FL2 } },
-{ "svcl", SC(17,0,1), SC_MASK, POWER, { LEV, FL1, FL2 } },
+{ "sc", SC(17,1,0), SC_MASK, PPC, { LEV } },
+{ "svc", SC(17,0,0), SC_MASK, POWER, { SVC_LEV, FL1, FL2 } },
+{ "svcl", SC(17,0,1), SC_MASK, POWER, { SVC_LEV, FL1, FL2 } },
{ "svca", SC(17,1,0), SC_MASK, PWRCOM, { SV } },
{ "svcla", SC(17,1,1), SC_MASK, POWER, { SV } },
@@ -2913,12 +2980,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bdzflrl", XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bdzflrl-",XLO(19,BODZF,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bdzflrl+",XLO(19,BODZFP,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "bclr", XLLK(19,16,0), XLYBB_MASK, PPCCOM, { BO, BI } },
-{ "bclrl", XLLK(19,16,1), XLYBB_MASK, PPCCOM, { BO, BI } },
{ "bclr+", XLYLK(19,16,1,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bclrl+", XLYLK(19,16,1,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bclr-", XLYLK(19,16,0,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bclrl-", XLYLK(19,16,0,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
+{ "bclr", XLLK(19,16,0), XLBH_MASK, PPCCOM, { BO, BI, BH } },
+{ "bclrl", XLLK(19,16,1), XLBH_MASK, PPCCOM, { BO, BI, BH } },
{ "bcr", XLLK(19,16,0), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bcrl", XLLK(19,16,1), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bclre", XLLK(19,17,0), XLBB_MASK, BOOKE64, { BO, BI } },
@@ -2947,6 +3014,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "crand", XL(19,257), XL_MASK, COM, { BT, BA, BB } },
+{ "hrfid", XL(19,274), 0xffffffff, POWER5, { 0 } },
+
{ "crset", XL(19,289), XL_MASK, PPCCOM, { BT, BAT, BBA } },
{ "creqv", XL(19,289), XL_MASK, COM, { BT, BA, BB } },
@@ -3097,12 +3166,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bfctrl-", XLO(19,BOFM4,528,1), XLBOBB_MASK, POWER4, { BI } },
{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bfctrl+", XLO(19,BOFP4,528,1), XLBOBB_MASK, POWER4, { BI } },
-{ "bcctr", XLLK(19,528,0), XLYBB_MASK, PPCCOM, { BO, BI } },
{ "bcctr-", XLYLK(19,528,0,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bcctr+", XLYLK(19,528,1,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
-{ "bcctrl", XLLK(19,528,1), XLYBB_MASK, PPCCOM, { BO, BI } },
{ "bcctrl-", XLYLK(19,528,0,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bcctrl+", XLYLK(19,528,1,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
+{ "bcctr", XLLK(19,528,0), XLBH_MASK, PPCCOM, { BO, BI, BH } },
+{ "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 } },
@@ -3181,8 +3250,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "rldcr", MDS(30,9,0), MDS_MASK, PPC64, { RA, RS, RB, ME6 } },
{ "rldcr.", MDS(30,9,1), MDS_MASK, PPC64, { RA, RS, RB, ME6 } },
-{ "cmpw", XCMPL(31,0,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
-{ "cmpd", XCMPL(31,0,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
+{ "cmpw", XOPL(31,0,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
+{ "cmpd", XOPL(31,0,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
{ "cmp", X(31,0), XCMP_MASK, PPC, { BF, L, RA, RB } },
{ "cmp", X(31,0), XCMPL_MASK, PWRCOM, { BF, RA, RB } },
@@ -3251,6 +3320,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "iseleq", X(31,79), X_MASK, PPCISEL, { RT, RA, RB } },
{ "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), XFXFXM_MASK, POWER4, { RT, FXM4 } },
@@ -3258,7 +3328,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "ldx", X(31,21), X_MASK, PPC64, { RT, RA0, RB } },
-{ "icbt", X(31,22), X_MASK, BOOKE, { CT, RA, RB } },
+{ "icbt", X(31,22), X_MASK, BOOKE|PPCE300, { CT, RA, RB } },
{ "icbt", X(31,262), XRT_MASK, PPC403, { RA, RB } },
{ "lwzx", X(31,23), X_MASK, PPCCOM, { RT, RA0, RB } },
@@ -3287,8 +3357,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lwzxe", X(31,31), X_MASK, BOOKE64, { RT, RA0, RB } },
-{ "cmplw", XCMPL(31,32,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
-{ "cmpld", XCMPL(31,32,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
+{ "cmplw", XOPL(31,32,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
+{ "cmpld", XOPL(31,32,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
{ "cmpl", X(31,32), XCMP_MASK, PPC, { BF, L, RA, RB } },
{ "cmpl", X(31,32), XCMPL_MASK, PWRCOM, { BF, RA, RB } },
@@ -3373,6 +3443,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lbzux", X(31,119), X_MASK, COM, { RT, RAL, RB } },
+{ "popcntb", X(31,122), XRB_MASK, POWER5, { RA, RS } },
+
{ "not", XRC(31,124,0), X_MASK, COM, { RA, RS, RBS } },
{ "nor", XRC(31,124,0), X_MASK, COM, { RA, RS, RB } },
{ "not.", XRC(31,124,1), X_MASK, COM, { RA, RS, RBS } },
@@ -3406,7 +3478,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "dcbtstlse",X(31,142),X_MASK, PPCCHLK64, { CT, RA, RB }},
-{ "mtcr", XFXM(31,144,0xff), XRARB_MASK, COM, { RS }},
+{ "mtocrf", XFXM(31,144,0,1), XFXFXM_MASK, COM, { FXM, RS } },
+{ "mtcr", XFXM(31,144,0xff,0), XRARB_MASK, COM, { RS }},
{ "mtcrf", X(31,144), XFXFXM_MASK, COM, { FXM, RS } },
{ "mtmsr", X(31,146), XRARB_MASK, COM, { RS } },
@@ -3542,7 +3615,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "addo.", XO(31,266,1,1), XO_MASK, PPCCOM, { RT, RA, RB } },
{ "caxo.", XO(31,266,1,1), XO_MASK, PWRCOM, { RT, RA, RB } },
-{ "tlbiel", X(31,274), XRTRA_MASK, POWER4, { RB } },
+{ "tlbiel", X(31,274), XRTLRA_MASK, POWER4, { RB, L } },
{ "mfapidi", X(31,275), X_MASK, BOOKE, { RT, RA } },
@@ -3657,25 +3730,21 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfbar", XSPR(31,339,159), XSPR_MASK, PPC860, { RT } },
{ "mfvrsave", XSPR(31,339,256), XSPR_MASK, PPCVEC, { RT } },
{ "mfusprg0", XSPR(31,339,256), XSPR_MASK, BOOKE, { RT } },
-{ "mfsprg4", XSPR(31,339,260), XSPR_MASK, PPC405, { RT } },
-{ "mfsprg4", XSPR(31,339,260), XSPR_MASK, BOOKE, { RT } },
-{ "mfsprg5", XSPR(31,339,261), XSPR_MASK, PPC405, { RT } },
-{ "mfsprg5", XSPR(31,339,261), XSPR_MASK, BOOKE, { RT } },
-{ "mfsprg6", XSPR(31,339,262), XSPR_MASK, PPC405, { RT } },
-{ "mfsprg6", XSPR(31,339,262), XSPR_MASK, BOOKE, { RT } },
-{ "mfsprg7", XSPR(31,339,263), XSPR_MASK, PPC405, { RT } },
-{ "mfsprg7", XSPR(31,339,263), XSPR_MASK, BOOKE, { RT } },
{ "mftb", X(31,371), X_MASK, CLASSIC, { RT, TBR } },
{ "mftb", XSPR(31,339,268), XSPR_MASK, BOOKE, { RT } },
{ "mftbl", XSPR(31,371,268), XSPR_MASK, CLASSIC, { RT } },
{ "mftbl", XSPR(31,339,268), XSPR_MASK, BOOKE, { RT } },
{ "mftbu", XSPR(31,371,269), XSPR_MASK, CLASSIC, { RT } },
{ "mftbu", XSPR(31,339,269), XSPR_MASK, BOOKE, { RT } },
-{ "mfsprg", XSPR(31,339,272), XSPRG_MASK, PPC, { RT, SPRG } },
+{ "mfsprg", XSPR(31,339,256), XSPRG_MASK, PPC, { RT, SPRG } },
{ "mfsprg0", XSPR(31,339,272), XSPR_MASK, PPC, { RT } },
{ "mfsprg1", XSPR(31,339,273), XSPR_MASK, PPC, { RT } },
{ "mfsprg2", XSPR(31,339,274), XSPR_MASK, PPC, { RT } },
{ "mfsprg3", XSPR(31,339,275), XSPR_MASK, PPC, { RT } },
+{ "mfsprg4", XSPR(31,339,260), XSPR_MASK, PPC405 | BOOKE, { RT } },
+{ "mfsprg5", XSPR(31,339,261), XSPR_MASK, PPC405 | BOOKE, { RT } },
+{ "mfsprg6", XSPR(31,339,262), XSPR_MASK, PPC405 | BOOKE, { RT } },
+{ "mfsprg7", XSPR(31,339,263), XSPR_MASK, PPC405 | BOOKE, { RT } },
{ "mfasr", XSPR(31,339,280), XSPR_MASK, PPC64, { RT } },
{ "mfear", XSPR(31,339,282), XSPR_MASK, PPC, { RT } },
{ "mfpir", XSPR(31,339,286), XSPR_MASK, BOOKE, { RT } },
@@ -3978,7 +4047,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtbar", XSPR(31,467,159), XSPR_MASK, PPC860, { RS } },
{ "mtvrsave", XSPR(31,467,256), XSPR_MASK, PPCVEC, { RS } },
{ "mtusprg0", XSPR(31,467,256), XSPR_MASK, BOOKE, { RS } },
-{ "mtsprg", XSPR(31,467,272), XSPRG_MASK,PPC, { SPRG, RS } },
+{ "mtsprg", XSPR(31,467,256), XSPRG_MASK,PPC, { SPRG, RS } },
{ "mtsprg0", XSPR(31,467,272), XSPR_MASK, PPC, { RS } },
{ "mtsprg1", XSPR(31,467,273), XSPR_MASK, PPC, { RS } },
{ "mtsprg2", XSPR(31,467,274), XSPR_MASK, PPC, { RS } },
@@ -4278,10 +4347,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mbar", X(31,854), X_MASK, BOOKE, { MO } },
{ "eieio", X(31,854), 0xffffffff, PPC, { 0 } },
-{ "tlbsx", XRC(31,914,0), X_MASK, BOOKE, { RA, RB } },
-{ "tlbsx", XRC(31,914,0), X_MASK, PPC403, { RT, RA, RB } },
-{ "tlbsx.", XRC(31,914,1), X_MASK, BOOKE, { RA, RB } },
-{ "tlbsx.", XRC(31,914,1), X_MASK, PPC403, { RT, RA, 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 } },
@@ -4306,8 +4373,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbrehi", XTLB(31,946,0), XTLB_MASK, PPC403, { RT, RA } },
{ "tlbrelo", XTLB(31,946,1), XTLB_MASK, PPC403, { RT, RA } },
-{ "tlbre", X(31,946), X_MASK, BOOKE, { 0 } },
-{ "tlbre", X(31,946), X_MASK, PPC403, { RS, RA, SH } },
+{ "tlbre", X(31,946), X_MASK, PPC403|BOOKE, { RSO, RAOPT, SHO } },
{ "sraiq", XRC(31,952,0), X_MASK, M601, { RA, RS, SH } },
{ "sraiq.", XRC(31,952,1), X_MASK, M601, { RA, RS, SH } },
@@ -4338,6 +4404,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbli", X(31,1010), XRTRA_MASK, PPC, { 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 } },
@@ -4455,6 +4522,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "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 } },
+
{ "fmsubs", A(59,28,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
{ "fmsubs.", A(59,28,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
@@ -4526,6 +4596,9 @@ 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 } },
+
{ "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 } },
@@ -4579,6 +4652,15 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fabs", XRC(63,264,0), XRA_MASK, COM, { FRT, FRB } },
{ "fabs.", XRC(63,264,1), XRA_MASK, COM, { 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 } },
+{ "friz.", XRC(63,424,1), XRA_MASK, POWER5, { FRT, FRB } },
+{ "frip", XRC(63,456,0), XRA_MASK, POWER5, { FRT, FRB } },
+{ "frip.", XRC(63,456,1), XRA_MASK, POWER5, { FRT, FRB } },
+{ "frim", XRC(63,488,0), XRA_MASK, POWER5, { FRT, FRB } },
+{ "frim.", XRC(63,488,1), XRA_MASK, POWER5, { FRT, FRB } },
+
{ "mffs", XRC(63,583,0), XRARB_MASK, COM, { FRT } },
{ "mffs.", XRC(63,583,1), XRARB_MASK, COM, { FRT } },
diff --git a/contrib/binutils/opcodes/s390-dis.c b/contrib/binutils/opcodes/s390-dis.c
index 42f5151d3f00..9b0a063b9369 100644
--- a/contrib/binutils/opcodes/s390-dis.c
+++ b/contrib/binutils/opcodes/s390-dis.c
@@ -1,5 +1,5 @@
/* s390-dis.c -- Disassemble S390 instructions
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of GDB, GAS and the GNU binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <stdio.h>
#include "ansidecl.h"
@@ -29,15 +29,10 @@ static int init_flag = 0;
static int opc_index[256];
static int current_arch_mask = 0;
-static void init_disasm PARAMS ((struct disassemble_info *));
-static unsigned int s390_extract_operand
- PARAMS ((unsigned char *, const struct s390_operand *));
-
/* Set up index table for first opcode byte. */
static void
-init_disasm (info)
- struct disassemble_info *info;
+init_disasm (struct disassemble_info *info)
{
const struct s390_opcode *opcode;
const struct s390_opcode *opcode_end;
@@ -68,9 +63,7 @@ init_disasm (info)
/* Extracts an operand value from an instruction. */
static inline unsigned int
-s390_extract_operand (insn, operand)
- unsigned char *insn;
- const struct s390_operand *operand;
+s390_extract_operand (unsigned char *insn, const struct s390_operand *operand)
{
unsigned int val;
int bits;
@@ -102,7 +95,7 @@ s390_extract_operand (insn, operand)
if (operand->flags & S390_OPERAND_PCREL)
val <<= 1;
- /* Length x in an instructions has real length x+1. */
+ /* Length x in an instructions has real length x + 1. */
if (operand->flags & S390_OPERAND_LENGTH)
val++;
return val;
@@ -111,9 +104,7 @@ s390_extract_operand (insn, operand)
/* Print a S390 instruction. */
int
-print_insn_s390 (memaddr, info)
- bfd_vma memaddr;
- struct disassemble_info *info;
+print_insn_s390 (bfd_vma memaddr, struct disassemble_info *info)
{
bfd_byte buffer[6];
const struct s390_opcode *opcode;
@@ -215,7 +206,7 @@ print_insn_s390 (memaddr, info)
else if (operand->flags & S390_OPERAND_SIGNED)
(*info->fprintf_func) (info->stream, "%i", (int) value);
else
- (*info->fprintf_func) (info->stream, "%i", value);
+ (*info->fprintf_func) (info->stream, "%u", value);
if (operand->flags & S390_OPERAND_DISP)
{
diff --git a/contrib/binutils/opcodes/s390-mkopc.c b/contrib/binutils/opcodes/s390-mkopc.c
index 34188e6216f4..5a794fdd5dc8 100644
--- a/contrib/binutils/opcodes/s390-mkopc.c
+++ b/contrib/binutils/opcodes/s390-mkopc.c
@@ -1,5 +1,5 @@
/* s390-mkopc.c -- Generates opcode table out of s390-opc.txt
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <stdio.h>
#include <stdlib.h>
@@ -35,7 +35,8 @@ enum s390_opcode_cpu_val
S390_OPCODE_G5 = 0,
S390_OPCODE_G6,
S390_OPCODE_Z900,
- S390_OPCODE_Z990
+ S390_OPCODE_Z990,
+ S390_OPCODE_Z9_109
};
struct op_struct
@@ -195,6 +196,8 @@ main (void)
min_cpu = S390_OPCODE_Z900;
else if (strcmp (cpu_string, "z990") == 0)
min_cpu = S390_OPCODE_Z990;
+ else if (strcmp (cpu_string, "z9-109") == 0)
+ min_cpu = S390_OPCODE_Z9_109;
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 1a4b276a6432..aa2e5a35ad53 100644
--- a/contrib/binutils/opcodes/s390-opc.c
+++ b/contrib/binutils/opcodes/s390-opc.c
@@ -1,5 +1,5 @@
/* s390-opc.c -- S390 opcode list
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of GDB, GAS, and the GNU binutils.
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <stdio.h>
#include "ansidecl.h"
@@ -127,7 +127,13 @@ const struct s390_operand s390_operands[] =
#define J16_16 38 /* PC relative jump offset at 16 */
{ 16, 16, S390_OPERAND_PCREL },
#define J32_16 39 /* PC relative long offset at 16 */
- { 32, 16, S390_OPERAND_PCREL }
+ { 32, 16, S390_OPERAND_PCREL },
+#define I32_16 40 /* 32 bit signed value starting at 16 */
+ { 32, 16, S390_OPERAND_SIGNED },
+#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 }
};
@@ -151,11 +157,12 @@ const struct s390_operand s390_operands[] =
c - control register
d - displacement, 12 bit
f - floating pointer register
- i - signed integer, 4 or 8 bit
+ i - signed integer, 4, 8, 16 or 32 bit
l - length, 4 or 8 bit
p - pc relative
r - general purpose register
- u - unsigned integer, 4 or 8 bit
+ u - unsigned integer, 4, 8, 16 or 32 bit
+ m - mode field, 4 bit
0 - operand skipped.
The order of the letters reflects the layout of the format in
storage and not the order of the paramaters of the instructions.
@@ -178,6 +185,8 @@ const struct s390_operand s390_operands[] =
#define INSTR_RIL_0P 6, { J32_16,0,0,0,0 } /* e.g. jg */
#define INSTR_RIL_RP 6, { R_8,J32_16,0,0,0,0 } /* e.g. brasl */
#define INSTR_RIL_UP 6, { U4_8,J32_16,0,0,0,0 } /* e.g. brcl */
+#define INSTR_RIL_RI 6, { R_8,I32_16,0,0,0,0 } /* e.g. afi */
+#define INSTR_RIL_RU 6, { R_8,U32_16,0,0,0,0 } /* e.g. alfi */
#define INSTR_RI_0P 4, { J16_16,0,0,0,0,0 } /* e.g. j */
#define INSTR_RI_RI 4, { R_8,I16_16,0,0,0,0 } /* e.g. ahi */
#define INSTR_RI_RP 4, { R_8,J16_16,0,0,0,0 } /* e.g. brct */
@@ -200,6 +209,7 @@ const struct s390_operand s390_operands[] =
#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_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 */
#define INSTR_RR_R0 2, { R_8, 0,0,0,0,0 } /* e.g. spm */
@@ -207,12 +217,14 @@ const struct s390_operand s390_operands[] =
#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_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 */
#define INSTR_RSL_R0RD 6, { R_8,D_20,B_16,0,0,0 } /* e.g. tp */
#define INSTR_RSI_RRP 4, { R_8,R_12,J16_16,0,0,0 } /* e.g. brxh */
#define INSTR_RSY_RRRD 6, { R_8,R_12,D20_20,B_16,0,0 } /* e.g. stmy */
#define INSTR_RSY_RURD 6, { R_8,U4_12,D20_20,B_16,0,0 } /* e.g. icmh */
#define INSTR_RSY_AARD 6, { A_8,A_12,D20_20,B_16,0,0 } /* e.g. lamy */
+#define INSTR_RSY_CCRD 6, { C_8,C_12,D20_20,B_16,0,0 } /* e.g. lamy */
#define INSTR_RS_AARD 4, { A_8,A_12,D_20,B_16,0,0 } /* e.g. lam */
#define INSTR_RS_CCRD 4, { C_8,C_12,D_20,B_16,0,0 } /* e.g. lctl */
#define INSTR_RS_R0RD 4, { R_8,D_20,B_16,0,0,0 } /* e.g. sll */
@@ -239,12 +251,15 @@ const struct s390_operand s390_operands[] =
#define INSTR_SS_RRRDRD3 6, { R_8,R_12,D_20,B_16,D_36,B_32 } /* e.g. lmd */
#define INSTR_S_00 4, { 0,0,0,0,0,0 } /* e.g. hsch */
#define INSTR_S_RD 4, { D_20,B_16,0,0,0,0 } /* e.g. lpsw */
+#define INSTR_SSF_RRDRD 6, { D_20,B_16,D_36,B_32,R_8,0 } /* e.g. mvcos */
#define MASK_E { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RIE_RRP { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RIL_0P { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RIL_RP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RIL_UP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RIL_RI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RIL_RU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RI_0P { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RI_RI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RI_RP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
@@ -267,6 +282,7 @@ const struct s390_operand s390_operands[] =
#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_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 }
#define MASK_RR_R0 { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
@@ -274,6 +290,7 @@ const struct s390_operand s390_operands[] =
#define MASK_RR_U0 { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RR_UR { 0xff, 0x00, 0x00, 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 }
#define MASK_RSL_R0RD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSI_RRP { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
@@ -285,6 +302,7 @@ const struct s390_operand s390_operands[] =
#define MASK_RSY_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSY_RURD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSY_AARD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSY_CCRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RXE_FRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RXE_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RXF_FRRDF { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
@@ -306,6 +324,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 }
/* The opcode formats table (blueprints for .insn pseudo mnemonic). */
@@ -315,6 +334,7 @@ const struct s390_opcode s390_opformats[] =
{ "ri", OP8(0x00LL), MASK_RI_RI, INSTR_RI_RI, 3, 0 },
{ "rie", OP8(0x00LL), MASK_RIE_RRP, INSTR_RIE_RRP, 3, 0 },
{ "ril", OP8(0x00LL), MASK_RIL_RP, INSTR_RIL_RP, 3, 0 },
+ { "rilu", OP8(0x00LL), MASK_RIL_RU, INSTR_RIL_RU, 3, 0 },
{ "rr", OP8(0x00LL), MASK_RR_RR, INSTR_RR_RR, 3, 0 },
{ "rre", OP8(0x00LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0 },
{ "rrf", OP8(0x00LL), MASK_RRF_RURR, INSTR_RRF_RURR, 3, 0 },
@@ -331,6 +351,7 @@ const struct s390_opcode s390_opformats[] =
{ "siy", OP8(0x00LL), MASK_SIY_URD, INSTR_SIY_URD, 3, 3 },
{ "ss", OP8(0x00LL), MASK_SS_RRRDRD, INSTR_SS_RRRDRD,3, 0 },
{ "sse", OP8(0x00LL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 3, 0 },
+ { "ssf", OP8(0x00LL), MASK_SSF_RRDRD, INSTR_SSF_RRDRD,3, 0 },
};
const int s390_num_opformats =
diff --git a/contrib/binutils/opcodes/s390-opc.txt b/contrib/binutils/opcodes/s390-opc.txt
index be08c829dd7b..bbe1588e142a 100644
--- a/contrib/binutils/opcodes/s390-opc.txt
+++ b/contrib/binutils/opcodes/s390-opc.txt
@@ -1,5 +1,5 @@
# S/390 opcodes list. Use s390-mkopc to convert it into the opcode table.
-# Copyright 2000, 2001 Free Software Foundation, Inc.
+# Copyright 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
# Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
5a a RX_RRRD "add" g5 esa,zarch
6a ad RX_FRRD "add normalized (long)" g5 esa,zarch
@@ -464,7 +464,7 @@ b920 cgr RRE_RR "compare 64" z900 zarch
b930 cgfr RRE_RR "compare 64<32" z900 zarch
b908 agr RRE_RR "add 64" z900 zarch
b918 agfr RRE_RR "add 64<32" z900 zarch
-b909 sgr RRE_RR "subtract 64" z900 zarch zarch
+b909 sgr RRE_RR "subtract 64" z900 zarch
b919 sgfr RRE_RR "subtract 64<32" z900 zarch
b90a algr RRE_RR "add logical 64" z900 zarch
b91a algfr RRE_RR "add logical 64<32" z900 zarch
@@ -510,8 +510,8 @@ ef lmd SS_RRRDRD3 "load multiple disjoint" z900 zarch
eb000000000f tracg RSE_RRRD "trace 64" z900 zarch
e30000000003 lrag RXE_RRRD "load real address 64" z900 zarch
e50000000002 strag SSE_RDRD "store read address" z900 zarch
-eb0000000025 stctg RSE_RRRD "store control 64" z900 zarch
-eb000000002f lctlg RSE_RRRD "load control 64" z900 zarch
+eb0000000025 stctg RSE_CCRD "store control 64" z900 zarch
+eb000000002f lctlg RSE_CCRD "load control 64" z900 zarch
eb0000000030 csg RSE_RRRD "compare and swap 64" z900 zarch
eb000000003e cdsg RSE_RRRD "compare double and swap 64" z900 zarch
eb0000000020 clmh RSE_RURD "compare logical characters under mask high" z900 zarch
@@ -648,7 +648,6 @@ ed0000000024 lde RXE_FRRD "load lengthened short to long hfp" g5 esa,zarch
b361 lnxr RRE_FF "load negative long hfp" g5 esa,zarch
b360 lpxr RRE_FF "load positive long hfp" g5 esa,zarch
b366 lexr RRE_FF "load rounded extended to short hfp" g5 esa,zarch
-35 ledr RR_FF "load rounded long to short hfp" g5 esa,zarch
b337 meer RRE_FF "multiply short hfp" g5 esa,zarch
ed0000000037 mee RXE_FRRD "multiply short hfp" g5 esa,zarch
b336 sqxr RRE_FF "square root extended hfp" g5 esa,zarch
@@ -726,8 +725,8 @@ e3000000001a algf RXY_RRRD "add logical with long offset 64<32" z990 zarch
e3000000001b slgf RXY_RRRD "subtract logical with long offset 64<32" z990 zarch
e3000000001c msgf RXY_RRRD "multiply single with long offset 64<32" z990 zarch
e3000000001d dsgf RXY_RRRD "divide single 64<32" z990 zarch
-e3000000001e lrv RXY_RRRD "load reversed 32" z990 zarch
-e3000000001f lrvh RXY_RRRD "load reversed 16" z990 zarch
+e3000000001e lrv RXY_RRRD "load reversed 32" z990 esa,zarch
+e3000000001f lrvh RXY_RRRD "load reversed 16" z990 esa,zarch
e30000000020 cg RXY_RRRD "compare with long offset 64" z990 zarch
e30000000021 clg RXY_RRRD "compare logical with long offset 64" z990 zarch
e30000000024 stg RXY_RRRD "store with long offset 64" z990 zarch
@@ -735,7 +734,7 @@ e3000000002e cvdg RXY_RRRD "convert to decimal with long offset 64" z990 zarch
e3000000002f strvg RXY_RRRD "store reversed 64" z990 zarch
e30000000030 cgf RXY_RRRD "compare with long offset 64<32" z990 zarch
e30000000031 clgf RXY_RRRD "compare logical with long offset 64<32" z990 zarch
-e3000000003e strv RXY_RRRD "store reversed 32" z990 zarch
+e3000000003e strv RXY_RRRD "store reversed 32" z990 esa,zarch
e3000000003f strvh RXY_RRRD "store reversed 64" z990 zarch
e30000000046 bctg RXY_RRRD "branch on count 64" z990 zarch
e30000000080 ng RXY_RRRD "and with long offset 64" z990 zarch
@@ -749,10 +748,10 @@ e3000000008e stpq RXY_RRRD "store pair to quadword" z990 zarch
e3000000008f lpq RXY_RRRD "load pair from quadword" z990 zarch
e30000000090 llgc RXY_RRRD "load logical character" z990 zarch
e30000000091 llgh RXY_RRRD "load logical halfword" z990 zarch
-e30000000096 ml RXY_RRRD "multiply logical 32" z990 zarch
-e30000000097 dl RXY_RRRD "divide logical 32" z990 zarch
-e30000000098 alc RXY_RRRD "add logical with carry 32" z990 zarch
-e30000000099 slb RXY_RRRD "subtract logical with borrow 32" z990 zarch
+e30000000096 ml RXY_RRRD "multiply logical 32" z990 esa,zarch
+e30000000097 dl RXY_RRRD "divide logical 32" z990 esa,zarch
+e30000000098 alc RXY_RRRD "add logical with carry 32" z990 esa,zarch
+e30000000099 slb RXY_RRRD "subtract logical with borrow 32" z990 esa,zarch
eb0000000004 lmg RSY_RRRD "load multiple with long offset 64" z990 zarch
eb000000000a srag RSY_RRRD "shift right single 64" z990 zarch
eb000000000b slag RSY_RRRD "shift left single 64" z990 zarch
@@ -760,19 +759,19 @@ eb000000000c srlg RSY_RRRD "shift right single logical 64" z990 zarch
eb000000000d sllg RSY_RRRD "shift left single logical 64" z990 zarch
eb000000000f tracg RSY_RRRD "trace 64" z990 zarch
eb000000001c rllg RSY_RRRD "rotate left single logical 64" z990 zarch
-eb000000001d rll RSY_RRRD "rotate left single logical 32" z990 zarch
+eb000000001d rll RSY_RRRD "rotate left single logical 32" z990 esa,zarch
eb0000000020 clmh RSY_RURD "compare logical characters under mask high with long offset" z990 zarch
eb0000000024 stmg RSY_RRRD "store multiple with long offset 64" z990 zarch
-eb0000000025 stctg RSY_RRRD "store control 64" z990 zarch
+eb0000000025 stctg RSY_CCRD "store control 64" z990 zarch
eb0000000026 stmh RSY_RRRD "store multiple high" z990 zarch
eb000000002c stcmh RSY_RURD "store characters under mask high with long offset" z990 zarch
-eb000000002f lctlg RSY_RRRD "load control 64" z990 zarch
+eb000000002f lctlg RSY_CCRD "load control 64" z990 zarch
eb0000000030 csg RSY_RRRD "compare and swap with long offset 64" z990 zarch
eb000000003e cdsg RSY_RRRD "compare double and swap with long offset 64" z990 zarch
eb0000000044 bxhg RSY_RRRD "branch on index high 64" z990 zarch
eb0000000045 bxleg RSY_RRRD "branch on index low or equal 64" z990 zarch
eb0000000080 icmh RSY_RURD "insert characters under mask high with long offset" z990 zarch
-eb000000008e mvclu RSY_RRRD "move long unicode" z990 zarch
+eb000000008e mvclu RSY_RRRD "move long unicode" z990 esa,zarch
eb000000008f clclu RSY_RRRD "compare logical long unicode with long offset" z990 zarch
eb0000000096 lmh RSY_RRRD "load multiple high" z990 zarch
# new z990 instructions
@@ -781,7 +780,7 @@ b98e idte RRF_R0RR "invalidate dat table entry" z990 zarch
b33e madr RRF_F0FF "multiply and add long hfp" z990 esa,zarch
ed000000003e mad RXF_FRRDF "multiply and add long hfp" z990 esa,zarch
b32e maer RRF_F0FF "multiply and add short hfp" z990 esa,zarch
-ed000000002e mae RXF_FRRDF "multiply and add shoft hfp" z990 esa,zarch
+ed000000002e mae RXF_FRRDF "multiply and add short hfp" z990 esa,zarch
b33f msdr RRF_F0FF "multiply and subtract long hfp" z990 esa,zarch
ed000000003f msd RXF_FRRDF "multiply and subtract long hfp" z990 esa,zarch
b32f mser RRF_F0FF "mutliply and subtract short hfp" z990 esa,zarch
@@ -791,3 +790,76 @@ b92f kmc RRE_RR "cipher message with chaining" z990 esa,zarch
b93e kimd RRE_RR "compute intermediate message digest" z990 esa,zarch
b93f klmd RRE_RR "compute last message digest" z990 esa,zarch
b91e kmac RRE_RR "compute message authentication code" z990 esa,zarch
+# z9-109 extended immediate instructions
+c209 afi RIL_RI "add immediate 32" z9-109 zarch
+c208 agfi RIL_RI "add immediate 64<32" z9-109 zarch
+c20b alfi RIL_RU "add logical immediate 32" z9-109 zarch
+c20a algfi RIL_RU "add logical immediate 64<32" z9-109 zarch
+c00a nihf RIL_RU "and immediate high" z9-109 zarch
+c00b nilf RIL_RU "and immediate low" z9-109 zarch
+c20d cfi RIL_RI "compare immediate 32" z9-109 zarch
+c20c cgfi RIL_RI "compare immediate 64<32" z9-109 zarch
+c20f clfi RIL_RU "compare logical immediate 32" z9-109 zarch
+c20e clgfi RIL_RU "compare logical immediate 64<32" z9-109 zarch
+c006 xihf RIL_RU "exclusive or immediate high" z9-109 zarch
+c007 xilf RIL_RU "exclusive or immediate low" z9-109 zarch
+c008 iihf RIL_RU "insert immediate high" z9-109 zarch
+c009 iilf RIL_RU "insert immediate low" z9-109 zarch
+# z9-109 misc instruction
+b983 flogr RRE_RR "find leftmost one" z9-109 zarch
+e30000000012 lt RXY_RRRD "load and test 32" z9-109 zarch
+e30000000002 ltg RXY_RRRD "load and test 64" z9-109 zarch
+b926 lbr RRE_RR "load byte 32" z9-109 zarch
+b906 lgbr RRE_RR "load byte 64" z9-109 zarch
+b927 lhr RRE_RR "load halfword 32" z9-109 zarch
+b907 lghr RRE_RR "load halfword 64" z9-109 zarch
+c001 lgfi RIL_RI "load immediate 64<32" z9-109 zarch
+e30000000094 llc RXY_RRRD "load logical character 32" z9-109 zarch
+b994 llcr RRE_RR "load logical character 32" z9-109 zarch
+b984 llgcr RRE_RR "load logical character 64" z9-109 zarch
+e30000000095 llh RXY_RRRD "load logical halfword 32" z9-109 zarch
+b995 llhr RRE_RR "load logical halfword 32" z9-109 zarch
+b985 llghr RRE_RR "load logical halfword 64" z9-109 zarch
+c00e llihf RIL_RU "load logical immediate high" z9-109 zarch
+c00f llilf RIL_RU "load logical immediate low" z9-109 zarch
+c00c oihf RIL_RU "or immediate high" z9-109 zarch
+c00d oilf RIL_RU "or immediate low" z9-109 zarch
+c205 slfi RIL_RU "subtract logical immediate 32" z9-109 zarch
+c204 slgfi RIL_RU "subtract logical immediate 64<32" z9-109 zarch
+# z9-109 store facility list extended
+b2b0 stfle S_RD "store facility list extended" z9-109 zarch
+# z9-109 store clock fast
+b27c stckf S_RD "store clock fast" z9-109 zarch
+# z9-109 move with optional specifications instruction
+c800 mvcos SSF_RRDRD "move with optional specifications" z9-109 zarch
+# z9-109 load page-table-entry address instruction
+b9aa lptea RRF_RURR "load page-table-entry address" z9-109 zarch
+# z9-109 conditional sske facility, sske instruction entered twice
+b22b sske RRF_M0RR "set storage key extended" z9-109 zarch
+# z9-109 etf2-enhancement facility, instructions entered twice
+b993 troo RRF_M0RR "translate one to one" z9-109 esa,zarch
+b992 trot RRF_M0RR "translate one to two" z9-109 esa,zarch
+b991 trto RRF_M0RR "translate two to one" z9-109 esa,zarch
+b990 trtt RRF_M0RR "translate two to two" z9-109 esa,zarch
+# z9-109 etf3-enhancement facility, some instructions entered twice
+b9b1 cu24 RRF_M0RR "convert utf-16 to utf-32" z9-109 zarch
+b2a6 cu21 RRF_M0RR "convert utf-16 to utf-8" z9-109 zarch
+b2a6 cuutf RRF_M0RR "convert unicode to utf-8" z9-109 zarch
+b9b3 cu42 RRF_M0RR "convert utf-32 to utf-16" z9-109 zarch
+b9b2 cu41 RRF_M0RR "convert utf-32 to utf-8" z9-109 zarch
+b2a7 cu12 RRF_M0RR "convert utf-8 to utf-16" z9-109 zarch
+b2a7 cutfu RRF_M0RR "convert utf-8 to unicode" z9-109 zarch
+b9b0 cu14 RRF_M0RR "convert utf-8 to utf-32" z9-109 zarch
+# z9-109 unnormalized hfp multiply & multiply and add
+b33b myr RRF_F0FF "multiply unnormalized long hfp" z9-109 zarch
+b33d myhr RRF_F0FF "multiply unnormalized long hfp high" z9-109 zarch
+b339 mylr RRF_F0FF "multiply unnormalized long hfp low" z9-109 zarch
+ed000000003b my RXF_FRRDF "multiply unnormalized long hfp" z9-109 zarch
+ed000000003d myh RXF_FRRDF "multiply unnormalized long hfp high" z9-109 zarch
+ed0000000039 myl RXF_FRRDF "multiply unnormalized long hfp low" z9-109 zarch
+b33a mayr RRF_F0FF "multiply and add unnormalized long hfp" z9-109 zarch
+b33c mayhr RRF_F0FF "multiply and add unnormalized long hfp high" z9-109 zarch
+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
diff --git a/contrib/binutils/opcodes/sh-dis.c b/contrib/binutils/opcodes/sh-dis.c
index 2512f966d358..381fa4da8d99 100644
--- a/contrib/binutils/opcodes/sh-dis.c
+++ b/contrib/binutils/opcodes/sh-dis.c
@@ -1,5 +1,5 @@
/* Disassemble SH instructions.
- Copyright 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#include <stdio.h>
#include "sysdep.h"
@@ -28,18 +29,12 @@
#define INCLUDE_SHMEDIA
#endif
-static void print_movxy
- PARAMS ((const sh_opcode_info *, int, int, fprintf_ftype, void *));
-static void print_insn_ddt PARAMS ((int, struct disassemble_info *));
-static void print_dsp_reg PARAMS ((int, fprintf_ftype, void *));
-static void print_insn_ppi PARAMS ((int, struct disassemble_info *));
-
static void
-print_movxy (op, rn, rm, fprintf_fn, stream)
- const sh_opcode_info *op;
- int rn, rm;
- fprintf_ftype fprintf_fn;
- void *stream;
+print_movxy (const sh_opcode_info *op,
+ int rn,
+ int rm,
+ fprintf_ftype fprintf_fn,
+ void *stream)
{
int n;
@@ -113,9 +108,7 @@ print_movxy (op, rn, rm, fprintf_fn, stream)
Return nonzero if a field b of a parallel processing insns follows. */
static void
-print_insn_ddt (insn, info)
- int insn;
- struct disassemble_info *info;
+print_insn_ddt (int insn, struct disassemble_info *info)
{
fprintf_ftype fprintf_fn = info->fprintf_func;
void *stream = info->stream;
@@ -202,10 +195,7 @@ print_insn_ddt (insn, info)
}
static void
-print_dsp_reg (rm, fprintf_fn, stream)
- int rm;
- fprintf_ftype fprintf_fn;
- void *stream;
+print_dsp_reg (int rm, fprintf_ftype fprintf_fn, void *stream)
{
switch (rm)
{
@@ -246,9 +236,7 @@ print_dsp_reg (rm, fprintf_fn, stream)
}
static void
-print_insn_ppi (field_b, info)
- int field_b;
- struct disassemble_info *info;
+print_insn_ppi (int field_b, struct disassemble_info *info)
{
static char *sx_tab[] = { "x0", "x1", "a0", "a1" };
static char *sy_tab[] = { "y0", "y1", "m0", "m1" };
@@ -275,23 +263,20 @@ print_insn_ppi (field_b, info)
static char *sg_tab[] = { "m0", "m1", "a0", "a1" };
if (field_b & 0x2000)
- {
- fprintf_fn (stream, "p%s %s,%s,%s\t",
- (field_b & 0x1000) ? "add" : "sub",
- sx_tab[(field_b >> 6) & 3],
- sy_tab[(field_b >> 4) & 3],
- du_tab[(field_b >> 0) & 3]);
- }
+ fprintf_fn (stream, "p%s %s,%s,%s\t",
+ (field_b & 0x1000) ? "add" : "sub",
+ sx_tab[(field_b >> 6) & 3],
+ sy_tab[(field_b >> 4) & 3],
+ du_tab[(field_b >> 0) & 3]);
+
else if ((field_b & 0xf0) == 0x10
&& info->mach != bfd_mach_sh_dsp
&& info->mach != bfd_mach_sh3_dsp)
- {
- fprintf_fn (stream, "pclr %s \t", du_tab[(field_b >> 0) & 3]);
- }
+ fprintf_fn (stream, "pclr %s \t", du_tab[(field_b >> 0) & 3]);
+
else if ((field_b & 0xf3) != 0)
- {
- fprintf_fn (stream, ".word 0x%x\t", field_b);
- }
+ fprintf_fn (stream, ".word 0x%x\t", field_b);
+
fprintf_fn (stream, "pmuls%c%s,%s,%s",
field_b & 0x2000 ? ' ' : '\t',
se_tab[(field_b >> 10) & 3],
@@ -390,19 +375,21 @@ print_insn_ppi (field_b, info)
fprintf_fn (stream, ".word 0x%x", field_b);
}
+/* FIXME mvs: movx insns print as ".word 0x%03x", insn & 0xfff
+ (ie. the upper nibble is missing). */
+
int
-print_insn_sh (memaddr, info)
- bfd_vma memaddr;
- struct disassemble_info *info;
+print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
{
fprintf_ftype fprintf_fn = info->fprintf_func;
void *stream = info->stream;
unsigned char insn[4];
- unsigned char nibs[4];
+ unsigned char nibs[8];
int status;
bfd_vma relmask = ~(bfd_vma) 0;
const sh_opcode_info *op;
- int target_arch;
+ unsigned int target_arch;
+ int allow_op32;
switch (info->mach)
{
@@ -415,35 +402,6 @@ print_insn_sh (memaddr, info)
&& bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
target_arch = arch_sh4;
break;
- case bfd_mach_sh2:
- target_arch = arch_sh2;
- break;
- case bfd_mach_sh2e:
- target_arch = arch_sh2e;
- break;
- case bfd_mach_sh_dsp:
- target_arch = arch_sh_dsp;
- break;
- case bfd_mach_sh3:
- target_arch = arch_sh3;
- break;
- case bfd_mach_sh3_dsp:
- target_arch = arch_sh3_dsp;
- break;
- case bfd_mach_sh3e:
- target_arch = arch_sh3e;
- break;
- case bfd_mach_sh4:
- case bfd_mach_sh4_nofpu:
- target_arch = arch_sh4;
- break;
- case bfd_mach_sh4a:
- case bfd_mach_sh4a_nofpu:
- target_arch = arch_sh4a;
- break;
- case bfd_mach_sh4al_dsp:
- target_arch = arch_sh4al_dsp;
- break;
case bfd_mach_sh5:
#ifdef INCLUDE_SHMEDIA
status = print_insn_sh64 (memaddr, info);
@@ -455,7 +413,7 @@ print_insn_sh (memaddr, info)
target_arch = arch_sh4;
break;
default:
- abort ();
+ target_arch = sh_get_arch_from_bfd_mach (info->mach);
}
status = info->read_memory_func (memaddr, insn, 2, info);
@@ -482,8 +440,33 @@ print_insn_sh (memaddr, info)
nibs[2] = (insn[1] >> 4) & 0xf;
nibs[3] = insn[1] & 0xf;
}
+ status = info->read_memory_func (memaddr + 2, insn + 2, 2, info);
+ if (status != 0)
+ allow_op32 = 0;
+ else
+ {
+ allow_op32 = 1;
+
+ if (info->endian == BFD_ENDIAN_LITTLE)
+ {
+ nibs[4] = (insn[3] >> 4) & 0xf;
+ nibs[5] = insn[3] & 0xf;
+
+ nibs[6] = (insn[2] >> 4) & 0xf;
+ nibs[7] = insn[2] & 0xf;
+ }
+ else
+ {
+ nibs[4] = (insn[2] >> 4) & 0xf;
+ nibs[5] = insn[2] & 0xf;
+
+ nibs[6] = (insn[3] >> 4) & 0xf;
+ nibs[7] = insn[3] & 0xf;
+ }
+ }
- if (nibs[0] == 0xf && (nibs[1] & 4) == 0 && target_arch & arch_sh_dsp_up)
+ if (nibs[0] == 0xf && (nibs[1] & 4) == 0
+ && SH_MERGE_ARCH_SET_VALID (target_arch, arch_sh_dsp_up))
{
if (nibs[1] & 8)
{
@@ -518,10 +501,17 @@ print_insn_sh (memaddr, info)
int rb = 0;
int disp_pc;
bfd_vma disp_pc_addr = 0;
+ int disp = 0;
+ int has_disp = 0;
+ int max_n = SH_MERGE_ARCH_SET (op->arch, arch_op32) ? 8 : 4;
+
+ if (!allow_op32
+ && SH_MERGE_ARCH_SET (op->arch, arch_op32))
+ goto fail;
- if ((op->arch & target_arch) == 0)
+ if (!SH_MERGE_ARCH_SET_VALID (op->arch, target_arch))
goto fail;
- for (n = 0; n < 4; n++)
+ for (n = 0; n < max_n; n++)
{
int i = op->nibbles[n];
@@ -545,6 +535,64 @@ print_insn_sh (memaddr, info)
imm |= ~0xfff;
imm = imm * 2 + 4;
goto ok;
+ case IMM0_3c:
+ if (nibs[3] & 0x8)
+ goto fail;
+ imm = nibs[3] & 0x7;
+ break;
+ case IMM0_3s:
+ if (!(nibs[3] & 0x8))
+ goto fail;
+ imm = nibs[3] & 0x7;
+ break;
+ case IMM0_3Uc:
+ if (nibs[2] & 0x8)
+ goto fail;
+ imm = nibs[2] & 0x7;
+ break;
+ case IMM0_3Us:
+ if (!(nibs[2] & 0x8))
+ goto fail;
+ imm = nibs[2] & 0x7;
+ break;
+ case DISP0_12:
+ case DISP1_12:
+ disp = (nibs[5] << 8) | (nibs[6] << 4) | nibs[7];
+ has_disp = 1;
+ goto ok;
+ case DISP0_12BY2:
+ case DISP1_12BY2:
+ disp = ((nibs[5] << 8) | (nibs[6] << 4) | nibs[7]) << 1;
+ relmask = ~(bfd_vma) 1;
+ has_disp = 1;
+ goto ok;
+ case DISP0_12BY4:
+ case DISP1_12BY4:
+ disp = ((nibs[5] << 8) | (nibs[6] << 4) | nibs[7]) << 2;
+ relmask = ~(bfd_vma) 3;
+ has_disp = 1;
+ goto ok;
+ case DISP0_12BY8:
+ case DISP1_12BY8:
+ disp = ((nibs[5] << 8) | (nibs[6] << 4) | nibs[7]) << 3;
+ relmask = ~(bfd_vma) 7;
+ has_disp = 1;
+ goto ok;
+ case IMM0_20_4:
+ break;
+ case IMM0_20:
+ imm = ((nibs[2] << 16) | (nibs[4] << 12) | (nibs[5] << 8)
+ | (nibs[6] << 4) | nibs[7]);
+ if (imm & 0x80000)
+ imm -= 0x100000;
+ goto ok;
+ case IMM0_20BY8:
+ imm = ((nibs[2] << 16) | (nibs[4] << 12) | (nibs[5] << 8)
+ | (nibs[6] << 4) | nibs[7]);
+ imm <<= 8;
+ if (imm & 0x8000000)
+ imm -= 0x10000000;
+ goto ok;
case IMM0_4:
case IMM1_4:
imm = nibs[3];
@@ -560,6 +608,10 @@ print_insn_sh (memaddr, info)
case IMM0_8:
case IMM1_8:
imm = (nibs[2] << 4) | nibs[3];
+ disp = imm;
+ has_disp = 1;
+ if (imm & 0x80)
+ imm -= 0x100;
goto ok;
case PCRELIMM_8BY2:
imm = ((nibs[2] << 4) | nibs[3]) << 1;
@@ -580,7 +632,7 @@ print_insn_sh (memaddr, info)
case REG_N_D:
if ((nibs[n] & 1) != 0)
goto fail;
- /* fall through */
+ /* Fall through. */
case REG_N:
rn = nibs[n];
break;
@@ -616,6 +668,14 @@ print_insn_sh (memaddr, info)
}
ok:
+ /* sh2a has D_REG but not X_REG. We don't know the pattern
+ doesn't match unless we check the output args to see if they
+ make sense. */
+ if (target_arch == arch_sh2a
+ && ((op->arg[0] == DX_REG_M && (rm & 1) != 0)
+ || (op->arg[1] == DX_REG_N && (rn & 1) != 0)))
+ goto fail;
+
fprintf_fn (stream, "%s\t", op->name);
disp_pc = 0;
for (n = 0; n < 3 && op->arg[n] != A_END; n++)
@@ -625,7 +685,7 @@ print_insn_sh (memaddr, info)
switch (op->arg[n])
{
case A_IMM:
- fprintf_fn (stream, "#%d", (char) (imm));
+ fprintf_fn (stream, "#%d", imm);
break;
case A_R0:
fprintf_fn (stream, "r0");
@@ -646,7 +706,7 @@ print_insn_sh (memaddr, info)
fprintf_fn (stream, "@r%d", rn);
break;
case A_DISP_REG_N:
- fprintf_fn (stream, "@(%d,r%d)", imm, rn);
+ fprintf_fn (stream, "@(%d,r%d)", has_disp?disp:imm, rn);
break;
case AS_PMOD_N:
fprintf_fn (stream, "@r%d+r8", rn);
@@ -664,7 +724,7 @@ print_insn_sh (memaddr, info)
fprintf_fn (stream, "@r%d", rm);
break;
case A_DISP_REG_M:
- fprintf_fn (stream, "@(%d,r%d)", imm, rm);
+ fprintf_fn (stream, "@(%d,r%d)", has_disp?disp:imm, rm);
break;
case A_REG_B:
fprintf_fn (stream, "r%d_bank", rb);
@@ -681,7 +741,19 @@ print_insn_sh (memaddr, info)
fprintf_fn (stream, "@(r0,r%d)", rm);
break;
case A_DISP_GBR:
- fprintf_fn (stream, "@(%d,gbr)", imm);
+ fprintf_fn (stream, "@(%d,gbr)", has_disp?disp:imm);
+ break;
+ case A_TBR:
+ fprintf_fn (stream, "tbr");
+ break;
+ case A_DISP2_TBR:
+ fprintf_fn (stream, "@@(%d,tbr)", has_disp?disp:imm);
+ break;
+ case A_INC_R15:
+ fprintf_fn (stream, "@r15+");
+ break;
+ case A_DEC_R15:
+ fprintf_fn (stream, "@-r15");
break;
case A_R0_GBR:
fprintf_fn (stream, "@(r0,gbr)");
@@ -850,11 +922,17 @@ print_insn_sh (memaddr, info)
else
val = bfd_getb32 (bytes);
}
- fprintf_fn (stream, "\t! 0x%x", val);
+ if ((*info->symbol_at_address_func) (val, info))
+ {
+ fprintf_fn (stream, "\t! 0x");
+ (*info->print_address_func) (val, info);
+ }
+ else
+ fprintf_fn (stream, "\t! 0x%x", val);
}
}
- return 2;
+ return SH_MERGE_ARCH_SET (op->arch, arch_op32) ? 4 : 2;
fail:
;
diff --git a/contrib/binutils/opcodes/sh-opc.h b/contrib/binutils/opcodes/sh-opc.h
index 0ef1fab42a62..bb03b2b80427 100644
--- a/contrib/binutils/opcodes/sh-opc.h
+++ b/contrib/binutils/opcodes/sh-opc.h
@@ -1,6 +1,6 @@
/* Definitions for SH opcodes.
- Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2003
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1999, 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
@@ -14,7 +14,9 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "bfd.h"
typedef enum
{
@@ -72,7 +74,22 @@ typedef enum
PPI3NC,
PDC,
PPIC,
- REPEAT
+ REPEAT,
+ IMM0_3c, /* xxxx 0iii */
+ IMM0_3s, /* xxxx 1iii */
+ IMM0_3Uc, /* 0iii xxxx */
+ IMM0_3Us, /* 1iii xxxx */
+ IMM0_20_4,
+ IMM0_20, /* follows IMM0_20_4 */
+ IMM0_20BY8, /* follows IMM0_20_4 */
+ DISP0_12,
+ DISP0_12BY2,
+ DISP0_12BY4,
+ DISP0_12BY8,
+ DISP1_12,
+ DISP1_12BY2,
+ DISP1_12BY4,
+ DISP1_12BY8
}
sh_nibble_type;
@@ -107,6 +124,11 @@ typedef enum
A_REG_B,
A_SR,
A_VBR,
+ A_TBR,
+ A_DISP_TBR,
+ A_DISP2_TBR,
+ A_DEC_R15,
+ A_INC_R15,
A_MOD,
A_RE,
A_RS,
@@ -176,68 +198,208 @@ typedef enum
}
sh_dsp_reg_nums;
-#define arch_sh1 0x0001
-#define arch_sh2 0x0002
-#define arch_sh3 0x0004
-#define arch_sh3e 0x0008
-#define arch_sh4 0x0010
-#define arch_sh2e 0x0020
-#define arch_sh4a 0x0040
-#define arch_sh_dsp 0x0100
-#define arch_sh3_dsp 0x0200
-#define arch_sh4al_dsp 0x0400
-#define arch_sh4_nofpu 0x1000
-#define arch_sh4a_nofpu 0x2000
-
-#define arch_sh1_up (arch_sh1 | arch_sh2_up)
-#define arch_sh2_up (arch_sh2 | arch_sh2e_up | arch_sh3_up | arch_sh_dsp)
-#define arch_sh2e_up (arch_sh2e | arch_sh3e_up)
-#define arch_sh3_up (arch_sh3 | arch_sh3e_up | arch_sh3_dsp_up \
- | arch_sh4_nofp_up)
-#define arch_sh3e_up (arch_sh3e | arch_sh4_up)
-#define arch_sh4_up (arch_sh4 | arch_sh4a_up)
-#define arch_sh4a_up (arch_sh4a)
-
-#define arch_sh_dsp_up (arch_sh_dsp | arch_sh3_dsp_up)
-#define arch_sh3_dsp_up (arch_sh3_dsp | arch_sh4al_dsp_up)
-#define arch_sh4al_dsp_up (arch_sh4al_dsp)
-
-#define arch_sh4_nofp_up (arch_sh4_nofpu | arch_sh4_up | arch_sh4a_nofp_up)
-#define arch_sh4a_nofp_up (arch_sh4a_nofpu | arch_sh4a_up | arch_sh4al_dsp_up)
+/* Return a mask with bits LO to HI (inclusive) set. */
+#define MASK(LO,HI) ( LO < 1 ? ((1 << (HI + 1)) - 1) \
+ : HI > 30 ? (-1 << LO) \
+ : LO == HI ? (1 << LO) \
+ : (((1 << (HI + 1)) - 1) & (-1 << LO)))
+
+#define arch_sh1_base (1 << 0)
+#define arch_sh2_base (1 << 1)
+#define arch_sh2a_sh3_base (1 << 2)
+#define arch_sh3_base (1 << 3)
+#define arch_sh2a_sh4_base (1 << 4)
+#define arch_sh4_base (1 << 5)
+#define arch_sh4a_base (1 << 6)
+#define arch_sh2a_base (1 << 7)
+#define arch_sh_base_mask MASK (0, 7)
+
+/* Bits 8 ... 24 are currently free. */
+
+/* This is an annotation on instruction types, but we
+ abuse the arch field in instructions to denote it. */
+#define arch_op32 (1 << 25) /* This is a 32-bit opcode. */
+#define arch_opann_mask MASK (25, 25)
+
+#define arch_sh_no_mmu (1 << 26)
+#define arch_sh_has_mmu (1 << 27)
+#define arch_sh_mmu_mask MASK (26, 27)
+
+#define arch_sh_no_co (1 << 28) /* Neither FPU nor DSP co-processor. */
+#define arch_sh_sp_fpu (1 << 29) /* Single precision FPU. */
+#define arch_sh_dp_fpu (1 << 30) /* Double precision FPU. */
+#define arch_sh_has_dsp (1 << 31)
+#define arch_sh_co_mask MASK (28, 31)
+
+
+#define arch_sh1 (arch_sh1_base |arch_sh_no_mmu |arch_sh_no_co)
+#define arch_sh2 (arch_sh2_base |arch_sh_no_mmu |arch_sh_no_co)
+#define arch_sh2a (arch_sh2a_base |arch_sh_no_mmu |arch_sh_dp_fpu)
+#define arch_sh2a_nofpu (arch_sh2a_base |arch_sh_no_mmu |arch_sh_no_co)
+#define arch_sh2e (arch_sh2_base |arch_sh_no_mmu |arch_sh_sp_fpu)
+#define arch_sh_dsp (arch_sh2_base |arch_sh_no_mmu |arch_sh_has_dsp)
+#define arch_sh3_nommu (arch_sh3_base |arch_sh_no_mmu |arch_sh_no_co)
+#define arch_sh3 (arch_sh3_base |arch_sh_has_mmu|arch_sh_no_co)
+#define arch_sh3e (arch_sh3_base |arch_sh_has_mmu|arch_sh_sp_fpu)
+#define arch_sh3_dsp (arch_sh3_base |arch_sh_has_mmu|arch_sh_has_dsp)
+#define arch_sh4 (arch_sh4_base |arch_sh_has_mmu|arch_sh_dp_fpu)
+#define arch_sh4a (arch_sh4a_base |arch_sh_has_mmu|arch_sh_dp_fpu)
+#define arch_sh4al_dsp (arch_sh4a_base |arch_sh_has_mmu|arch_sh_has_dsp)
+#define arch_sh4_nofpu (arch_sh4_base |arch_sh_has_mmu|arch_sh_no_co)
+#define arch_sh4a_nofpu (arch_sh4a_base |arch_sh_has_mmu|arch_sh_no_co)
+#define arch_sh4_nommu_nofpu (arch_sh4_base |arch_sh_no_mmu |arch_sh_no_co)
+#define arch_sh2a_nofpu_or_sh4_nommu_nofpu (arch_sh2a_sh4_base|arch_sh_no_mmu |arch_sh_no_co)
+#define arch_sh2a_nofpu_or_sh3_nommu (arch_sh2a_sh3_base|arch_sh_no_mmu |arch_sh_no_co)
+#define arch_sh2a_or_sh3e (arch_sh2a_sh4_base|arch_sh_no_mmu |arch_sh_sp_fpu)
+#define arch_sh2a_or_sh4 (arch_sh2a_sh4_base|arch_sh_no_mmu |arch_sh_dp_fpu)
+
+#define SH_MERGE_ARCH_SET(SET1, SET2) ((SET1) & (SET2))
+#define SH_VALID_BASE_ARCH_SET(SET) (((SET) & arch_sh_base_mask) != 0)
+#define SH_VALID_MMU_ARCH_SET(SET) (((SET) & arch_sh_mmu_mask) != 0)
+#define SH_VALID_CO_ARCH_SET(SET) (((SET) & arch_sh_co_mask) != 0)
+#define SH_VALID_ARCH_SET(SET) \
+ (SH_VALID_BASE_ARCH_SET (SET) \
+ && SH_VALID_MMU_ARCH_SET (SET) \
+ && SH_VALID_CO_ARCH_SET (SET))
+#define SH_MERGE_ARCH_SET_VALID(SET1, SET2) \
+ SH_VALID_ARCH_SET (SH_MERGE_ARCH_SET (SET1, SET2))
+
+#define SH_ARCH_SET_HAS_FPU(SET) \
+ (((SET) & (arch_sh_sp_fpu | arch_sh_dp_fpu)) != 0)
+#define SH_ARCH_SET_HAS_DSP(SET) \
+ (((SET) & arch_sh_has_dsp) != 0)
+
+/* This is returned from the functions below when an error occurs
+ (in addition to a call to BFD_FAIL). The value should allow
+ the tools to continue to function in most cases - there may
+ be some confusion between DSP and FPU etc. */
+#define SH_ARCH_UNKNOWN_ARCH 0xffffffff
+
+/* These are defined in bfd/cpu-sh.c . */
+unsigned int sh_get_arch_from_bfd_mach (unsigned long mach);
+unsigned int sh_get_arch_up_from_bfd_mach (unsigned long mach);
+unsigned long sh_get_bfd_mach_from_arch_set (unsigned int arch_set);
+bfd_boolean sh_merge_bfd_arch (bfd *ibfd, bfd *obfd);
+
+/* Below are the 'architecture sets'.
+ They describe the following inheritance graph:
+
+ SH1
+ |
+ SH2
+ .------------'|`--------------------------------.
+ / | \
+SH-DSP SH3-nommu/SH2A-nofpu SH2E
+ | | |`--------------------. |
+ | | | \|
+ | SH3-nommu SH4-nm-nf/SH2A-nofpu SH3E/SH2A
+ | |\ | | \ | |
+ | | `------. | SH2A-nofpu `----+---.|
+ | | \| \ | SH4/SH2A
+ | SH3 SH4-nommu-nofpu `---------+--. | |
+ | /|\ | | \| |
+ | .-----------' | `--------+---------------------. | SH2A |
+ |/ | / \| |
+ | | .-------' | |
+ | |/ | |
+SH3-dsp SH4-nofpu SH3E |
+ | |`-------------------------------. | .-----'
+ | | \|/
+ | SH4A-nofpu SH4
+ | .------------' `-------------------------------. |
+ |/ \|
+SH4AL-dsp SH4A
+*/
+
+/* Central branches. */
+#define arch_sh_up (arch_sh1 \
+ | arch_sh2_up)
+#define arch_sh2_up (arch_sh2 \
+ | arch_sh2e_up \
+ | arch_sh2a_nofpu_or_sh3_nommu_up \
+ | arch_sh_dsp_up)
+#define arch_sh2a_nofpu_or_sh3_nommu_up (arch_sh2a_nofpu_or_sh3_nommu \
+ | arch_sh2a_nofpu_or_sh4_nommu_nofpu_up \
+ | arch_sh2a_or_sh3e_up \
+ | arch_sh3_nommu_up)
+#define arch_sh2a_nofpu_or_sh4_nommu_nofpu_up (arch_sh2a_nofpu_or_sh4_nommu_nofpu \
+ | arch_sh2a_nofpu_up \
+ | arch_sh2a_or_sh4_up \
+ | arch_sh4_nommu_nofpu_up)
+#define arch_sh2a_nofpu_up (arch_sh2a_nofpu \
+ | arch_sh2a_up)
+#define arch_sh3_nommu_up (arch_sh3_nommu \
+ | arch_sh3_up \
+ | arch_sh4_nommu_nofpu_up)
+#define arch_sh3_up (arch_sh3 \
+ | arch_sh3e_up \
+ | arch_sh3_dsp_up \
+ | arch_sh4_nofpu_up)
+#define arch_sh4_nommu_nofpu_up (arch_sh4_nommu_nofpu \
+ | arch_sh4_nofpu_up)
+#define arch_sh4_nofpu_up (arch_sh4_nofpu \
+ | arch_sh4_up \
+ | arch_sh4a_nofpu_up)
+#define arch_sh4a_nofpu_up (arch_sh4a_nofpu \
+ | arch_sh4a_up \
+ | arch_sh4al_dsp_up)
+
+/* Right branches. */
+#define arch_sh2e_up (arch_sh2e \
+ | arch_sh2a_or_sh3e_up)
+#define arch_sh2a_or_sh3e_up (arch_sh2a_or_sh3e \
+ | arch_sh2a_or_sh4_up \
+ | arch_sh3e_up)
+#define arch_sh2a_or_sh4_up (arch_sh2a_or_sh4 \
+ | arch_sh2a_up \
+ | arch_sh4_up)
+#define arch_sh2a_up (arch_sh2a)
+#define arch_sh3e_up (arch_sh3e \
+ | arch_sh4_up)
+#define arch_sh4_up (arch_sh4 \
+ | arch_sh4a_up)
+#define arch_sh4a_up (arch_sh4a)
+
+/* Left branch. */
+#define arch_sh_dsp_up (arch_sh_dsp \
+ | arch_sh3_dsp_up)
+#define arch_sh3_dsp_up (arch_sh3_dsp \
+ | arch_sh4al_dsp_up)
+#define arch_sh4al_dsp_up (arch_sh4al_dsp)
typedef struct
{
char *name;
sh_arg_type arg[4];
- sh_nibble_type nibbles[5];
- int arch;
+ sh_nibble_type nibbles[9];
+ unsigned int arch;
} sh_opcode_info;
#ifdef DEFINE_TABLE
const sh_opcode_info sh_table[] =
{
-/* 0111nnnni8*1.... add #<imm>,<REG_N> */{"add",{A_IMM,A_REG_N},{HEX_7,REG_N,IMM0_8}, arch_sh1_up},
+/* 0111nnnni8*1.... add #<imm>,<REG_N> */{"add",{A_IMM,A_REG_N},{HEX_7,REG_N,IMM0_8}, arch_sh_up},
-/* 0011nnnnmmmm1100 add <REG_M>,<REG_N> */{"add",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_C}, arch_sh1_up},
+/* 0011nnnnmmmm1100 add <REG_M>,<REG_N> */{"add",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_C}, arch_sh_up},
-/* 0011nnnnmmmm1110 addc <REG_M>,<REG_N>*/{"addc",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_E}, arch_sh1_up},
+/* 0011nnnnmmmm1110 addc <REG_M>,<REG_N>*/{"addc",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_E}, arch_sh_up},
-/* 0011nnnnmmmm1111 addv <REG_M>,<REG_N>*/{"addv",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_F}, arch_sh1_up},
+/* 0011nnnnmmmm1111 addv <REG_M>,<REG_N>*/{"addv",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_F}, arch_sh_up},
-/* 11001001i8*1.... and #<imm>,R0 */{"and",{A_IMM,A_R0},{HEX_C,HEX_9,IMM0_8}, arch_sh1_up},
+/* 11001001i8*1.... and #<imm>,R0 */{"and",{A_IMM,A_R0},{HEX_C,HEX_9,IMM0_8}, arch_sh_up},
-/* 0010nnnnmmmm1001 and <REG_M>,<REG_N> */{"and",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_9}, arch_sh1_up},
+/* 0010nnnnmmmm1001 and <REG_M>,<REG_N> */{"and",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_9}, arch_sh_up},
-/* 11001101i8*1.... and.b #<imm>,@(R0,GBR)*/{"and.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_D,IMM0_8}, arch_sh1_up},
+/* 11001101i8*1.... and.b #<imm>,@(R0,GBR)*/{"and.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_D,IMM0_8}, arch_sh_up},
-/* 1010i12......... bra <bdisp12> */{"bra",{A_BDISP12},{HEX_A,BRANCH_12}, arch_sh1_up},
+/* 1010i12......... bra <bdisp12> */{"bra",{A_BDISP12},{HEX_A,BRANCH_12}, arch_sh_up},
-/* 1011i12......... bsr <bdisp12> */{"bsr",{A_BDISP12},{HEX_B,BRANCH_12}, arch_sh1_up},
+/* 1011i12......... bsr <bdisp12> */{"bsr",{A_BDISP12},{HEX_B,BRANCH_12}, arch_sh_up},
-/* 10001001i8p1.... bt <bdisp8> */{"bt",{A_BDISP8},{HEX_8,HEX_9,BRANCH_8}, arch_sh1_up},
+/* 10001001i8p1.... bt <bdisp8> */{"bt",{A_BDISP8},{HEX_8,HEX_9,BRANCH_8}, arch_sh_up},
-/* 10001011i8p1.... bf <bdisp8> */{"bf",{A_BDISP8},{HEX_8,HEX_B,BRANCH_8}, arch_sh1_up},
+/* 10001011i8p1.... bf <bdisp8> */{"bf",{A_BDISP8},{HEX_8,HEX_B,BRANCH_8}, arch_sh_up},
/* 10001101i8p1.... bt.s <bdisp8> */{"bt.s",{A_BDISP8},{HEX_8,HEX_D,BRANCH_8}, arch_sh2_up},
@@ -249,55 +411,59 @@ const sh_opcode_info sh_table[] =
/* 0000000010001000 clrdmxy */{"clrdmxy",{0},{HEX_0,HEX_0,HEX_8,HEX_8}, arch_sh4al_dsp_up},
-/* 0000000000101000 clrmac */{"clrmac",{0},{HEX_0,HEX_0,HEX_2,HEX_8}, arch_sh1_up},
+/* 0000000000101000 clrmac */{"clrmac",{0},{HEX_0,HEX_0,HEX_2,HEX_8}, arch_sh_up},
+
+/* 0000000001001000 clrs */{"clrs",{0},{HEX_0,HEX_0,HEX_4,HEX_8}, arch_sh_up},
-/* 0000000001001000 clrs */{"clrs",{0},{HEX_0,HEX_0,HEX_4,HEX_8}, arch_sh1_up},
+/* 0000000000001000 clrt */{"clrt",{0},{HEX_0,HEX_0,HEX_0,HEX_8}, arch_sh_up},
-/* 0000000000001000 clrt */{"clrt",{0},{HEX_0,HEX_0,HEX_0,HEX_8}, arch_sh1_up},
+/* 10001000i8*1.... cmp/eq #<imm>,R0 */{"cmp/eq",{A_IMM,A_R0},{HEX_8,HEX_8,IMM0_8}, arch_sh_up},
-/* 10001000i8*1.... cmp/eq #<imm>,R0 */{"cmp/eq",{A_IMM,A_R0},{HEX_8,HEX_8,IMM0_8}, arch_sh1_up},
+/* 0011nnnnmmmm0000 cmp/eq <REG_M>,<REG_N>*/{"cmp/eq",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_0}, arch_sh_up},
-/* 0011nnnnmmmm0000 cmp/eq <REG_M>,<REG_N>*/{"cmp/eq",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_0}, arch_sh1_up},
+/* 0011nnnnmmmm0011 cmp/ge <REG_M>,<REG_N>*/{"cmp/ge",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_3}, arch_sh_up},
-/* 0011nnnnmmmm0011 cmp/ge <REG_M>,<REG_N>*/{"cmp/ge",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_3}, arch_sh1_up},
+/* 0011nnnnmmmm0111 cmp/gt <REG_M>,<REG_N>*/{"cmp/gt",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_7}, arch_sh_up},
-/* 0011nnnnmmmm0111 cmp/gt <REG_M>,<REG_N>*/{"cmp/gt",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_7}, arch_sh1_up},
+/* 0011nnnnmmmm0110 cmp/hi <REG_M>,<REG_N>*/{"cmp/hi",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_6}, arch_sh_up},
-/* 0011nnnnmmmm0110 cmp/hi <REG_M>,<REG_N>*/{"cmp/hi",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_6}, arch_sh1_up},
+/* 0011nnnnmmmm0010 cmp/hs <REG_M>,<REG_N>*/{"cmp/hs",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_2}, arch_sh_up},
-/* 0011nnnnmmmm0010 cmp/hs <REG_M>,<REG_N>*/{"cmp/hs",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_2}, arch_sh1_up},
+/* 0100nnnn00010101 cmp/pl <REG_N> */{"cmp/pl",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_5}, arch_sh_up},
-/* 0100nnnn00010101 cmp/pl <REG_N> */{"cmp/pl",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_5}, arch_sh1_up},
+/* 0100nnnn00010001 cmp/pz <REG_N> */{"cmp/pz",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_1}, arch_sh_up},
-/* 0100nnnn00010001 cmp/pz <REG_N> */{"cmp/pz",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_1}, arch_sh1_up},
+/* 0010nnnnmmmm1100 cmp/str <REG_M>,<REG_N>*/{"cmp/str",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_C}, arch_sh_up},
-/* 0010nnnnmmmm1100 cmp/str <REG_M>,<REG_N>*/{"cmp/str",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_C}, arch_sh1_up},
+/* 0010nnnnmmmm0111 div0s <REG_M>,<REG_N>*/{"div0s",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_7}, arch_sh_up},
-/* 0010nnnnmmmm0111 div0s <REG_M>,<REG_N>*/{"div0s",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_7}, arch_sh1_up},
+/* 0000000000011001 div0u */{"div0u",{0},{HEX_0,HEX_0,HEX_1,HEX_9}, arch_sh_up},
-/* 0000000000011001 div0u */{"div0u",{0},{HEX_0,HEX_0,HEX_1,HEX_9}, arch_sh1_up},
+/* 0011nnnnmmmm0100 div1 <REG_M>,<REG_N>*/{"div1",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_4}, arch_sh_up},
-/* 0011nnnnmmmm0100 div1 <REG_M>,<REG_N>*/{"div1",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_4}, arch_sh1_up},
+/* 0110nnnnmmmm1110 exts.b <REG_M>,<REG_N>*/{"exts.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_E}, arch_sh_up},
-/* 0110nnnnmmmm1110 exts.b <REG_M>,<REG_N>*/{"exts.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_E}, arch_sh1_up},
+/* 0110nnnnmmmm1111 exts.w <REG_M>,<REG_N>*/{"exts.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_F}, arch_sh_up},
-/* 0110nnnnmmmm1111 exts.w <REG_M>,<REG_N>*/{"exts.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_F}, arch_sh1_up},
+/* 0110nnnnmmmm1100 extu.b <REG_M>,<REG_N>*/{"extu.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_C}, arch_sh_up},
-/* 0110nnnnmmmm1100 extu.b <REG_M>,<REG_N>*/{"extu.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_C}, arch_sh1_up},
+/* 0110nnnnmmmm1101 extu.w <REG_M>,<REG_N>*/{"extu.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_D}, arch_sh_up},
-/* 0110nnnnmmmm1101 extu.w <REG_M>,<REG_N>*/{"extu.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_D}, arch_sh1_up},
+/* 0000nnnn11100011 icbi @<REG_N> */{"icbi",{A_IND_N},{HEX_0,REG_N,HEX_E,HEX_3}, arch_sh4a_nofpu_up},
-/* 0000nnnn11100011 icbi @<REG_N> */{"icbi",{A_IND_N},{HEX_0,REG_N,HEX_E,HEX_3}, arch_sh4a_nofp_up},
+/* 0100nnnn00101011 jmp @<REG_N> */{"jmp",{A_IND_N},{HEX_4,REG_N,HEX_2,HEX_B}, arch_sh_up},
-/* 0100nnnn00101011 jmp @<REG_N> */{"jmp",{A_IND_N},{HEX_4,REG_N,HEX_2,HEX_B}, arch_sh1_up},
+/* 0100nnnn00001011 jsr @<REG_N> */{"jsr",{A_IND_N},{HEX_4,REG_N,HEX_0,HEX_B}, arch_sh_up},
-/* 0100nnnn00001011 jsr @<REG_N> */{"jsr",{A_IND_N},{HEX_4,REG_N,HEX_0,HEX_B}, arch_sh1_up},
+/* 0100nnnn00001110 ldc <REG_N>,SR */{"ldc",{A_REG_N,A_SR},{HEX_4,REG_N,HEX_0,HEX_E}, arch_sh_up},
-/* 0100nnnn00001110 ldc <REG_N>,SR */{"ldc",{A_REG_N,A_SR},{HEX_4,REG_N,HEX_0,HEX_E}, arch_sh1_up},
+/* 0100nnnn00011110 ldc <REG_N>,GBR */{"ldc",{A_REG_N,A_GBR},{HEX_4,REG_N,HEX_1,HEX_E}, arch_sh_up},
-/* 0100nnnn00011110 ldc <REG_N>,GBR */{"ldc",{A_REG_N,A_GBR},{HEX_4,REG_N,HEX_1,HEX_E}, arch_sh1_up},
+/* 0100nnnn00111010 ldc <REG_N>,SGR */{"ldc",{A_REG_N,A_SGR},{HEX_4,REG_N,HEX_3,HEX_A}, arch_sh4_nommu_nofpu_up},
-/* 0100nnnn00101110 ldc <REG_N>,VBR */{"ldc",{A_REG_N,A_VBR},{HEX_4,REG_N,HEX_2,HEX_E}, arch_sh1_up},
+/* 0100mmmm01001010 ldc <REG_M>,TBR */{"ldc",{A_REG_M,A_TBR},{HEX_4,REG_M,HEX_4,HEX_A}, arch_sh2a_nofpu_up},
+
+/* 0100nnnn00101110 ldc <REG_N>,VBR */{"ldc",{A_REG_N,A_VBR},{HEX_4,REG_N,HEX_2,HEX_E}, arch_sh_up},
/* 0100nnnn01011110 ldc <REG_N>,MOD */{"ldc",{A_REG_N,A_MOD},{HEX_4,REG_N,HEX_5,HEX_E}, arch_sh_dsp_up},
@@ -305,19 +471,21 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn01101110 ldc <REG_N>,RS */{"ldc",{A_REG_N,A_RS},{HEX_4,REG_N,HEX_6,HEX_E}, arch_sh_dsp_up},
-/* 0100nnnn00111110 ldc <REG_N>,SSR */{"ldc",{A_REG_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_E}, arch_sh3_up},
+/* 0100nnnn00111110 ldc <REG_N>,SSR */{"ldc",{A_REG_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_E}, arch_sh3_nommu_up},
+
+/* 0100nnnn01001110 ldc <REG_N>,SPC */{"ldc",{A_REG_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_E}, arch_sh3_nommu_up},
-/* 0100nnnn01001110 ldc <REG_N>,SPC */{"ldc",{A_REG_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_E}, arch_sh3_up},
+/* 0100nnnn11111010 ldc <REG_N>,DBR */{"ldc",{A_REG_N,A_DBR},{HEX_4,REG_N,HEX_F,HEX_A}, arch_sh4_nommu_nofpu_up},
-/* 0100nnnn11111010 ldc <REG_N>,DBR */{"ldc",{A_REG_N,A_DBR},{HEX_4,REG_N,HEX_F,HEX_A}, arch_sh4_nofp_up},
+/* 0100nnnn1xxx1110 ldc <REG_N>,Rn_BANK */{"ldc",{A_REG_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_E}, arch_sh3_nommu_up},
-/* 0100nnnn1xxx1110 ldc <REG_N>,Rn_BANK */{"ldc",{A_REG_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_E}, arch_sh3_up},
+/* 0100nnnn00000111 ldc.l @<REG_N>+,SR */{"ldc.l",{A_INC_N,A_SR},{HEX_4,REG_N,HEX_0,HEX_7}, arch_sh_up},
-/* 0100nnnn00000111 ldc.l @<REG_N>+,SR */{"ldc.l",{A_INC_N,A_SR},{HEX_4,REG_N,HEX_0,HEX_7}, arch_sh1_up},
+/* 0100nnnn00010111 ldc.l @<REG_N>+,GBR */{"ldc.l",{A_INC_N,A_GBR},{HEX_4,REG_N,HEX_1,HEX_7}, arch_sh_up},
-/* 0100nnnn00010111 ldc.l @<REG_N>+,GBR */{"ldc.l",{A_INC_N,A_GBR},{HEX_4,REG_N,HEX_1,HEX_7}, arch_sh1_up},
+/* 0100nnnn00100111 ldc.l @<REG_N>+,VBR */{"ldc.l",{A_INC_N,A_VBR},{HEX_4,REG_N,HEX_2,HEX_7}, arch_sh_up},
-/* 0100nnnn00100111 ldc.l @<REG_N>+,VBR */{"ldc.l",{A_INC_N,A_VBR},{HEX_4,REG_N,HEX_2,HEX_7}, arch_sh1_up},
+/* 0100nnnn00110110 ldc.l @<REG_N>+,SGR */{"ldc.l",{A_INC_N,A_SGR},{HEX_4,REG_N,HEX_3,HEX_6}, arch_sh4_nommu_nofpu_up},
/* 0100nnnn01010111 ldc.l @<REG_N>+,MOD */{"ldc.l",{A_INC_N,A_MOD},{HEX_4,REG_N,HEX_5,HEX_7}, arch_sh_dsp_up},
@@ -325,13 +493,13 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn01100111 ldc.l @<REG_N>+,RS */{"ldc.l",{A_INC_N,A_RS},{HEX_4,REG_N,HEX_6,HEX_7}, arch_sh_dsp_up},
-/* 0100nnnn00110111 ldc.l @<REG_N>+,SSR */{"ldc.l",{A_INC_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_7}, arch_sh3_up},
+/* 0100nnnn00110111 ldc.l @<REG_N>+,SSR */{"ldc.l",{A_INC_N,A_SSR},{HEX_4,REG_N,HEX_3,HEX_7}, arch_sh3_nommu_up},
-/* 0100nnnn01000111 ldc.l @<REG_N>+,SPC */{"ldc.l",{A_INC_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_7}, arch_sh3_up},
+/* 0100nnnn01000111 ldc.l @<REG_N>+,SPC */{"ldc.l",{A_INC_N,A_SPC},{HEX_4,REG_N,HEX_4,HEX_7}, arch_sh3_nommu_up},
-/* 0100nnnn11110110 ldc.l @<REG_N>+,DBR */{"ldc.l",{A_INC_N,A_DBR},{HEX_4,REG_N,HEX_F,HEX_6}, arch_sh4_nofp_up},
+/* 0100nnnn11110110 ldc.l @<REG_N>+,DBR */{"ldc.l",{A_INC_N,A_DBR},{HEX_4,REG_N,HEX_F,HEX_6}, arch_sh4_nommu_nofpu_up},
-/* 0100nnnn1xxx0111 ldc.l <REG_N>,Rn_BANK */{"ldc.l",{A_INC_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_7}, arch_sh3_up},
+/* 0100nnnn1xxx0111 ldc.l @<REG_N>+,Rn_BANK */{"ldc.l",{A_INC_N,A_REG_B},{HEX_4,REG_N,REG_B,HEX_7}, arch_sh3_nommu_up},
/* 0100mmmm00110100 ldrc <REG_M> */{"ldrc",{A_REG_M},{HEX_4,REG_M,HEX_3,HEX_4}, arch_sh4al_dsp_up},
/* 10001010i8*1.... ldrc #<imm> */{"ldrc",{A_IMM},{HEX_8,HEX_A,IMM0_8}, arch_sh4al_dsp_up},
@@ -340,11 +508,11 @@ const sh_opcode_info sh_table[] =
/* 10001100i8p2.... ldrs @(<disp>,PC) */{"ldrs",{A_DISP_PC},{HEX_8,HEX_C,PCRELIMM_8BY2}, arch_sh_dsp_up},
-/* 0100nnnn00001010 lds <REG_N>,MACH */{"lds",{A_REG_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_A}, arch_sh1_up},
+/* 0100nnnn00001010 lds <REG_N>,MACH */{"lds",{A_REG_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_A}, arch_sh_up},
-/* 0100nnnn00011010 lds <REG_N>,MACL */{"lds",{A_REG_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_A}, arch_sh1_up},
+/* 0100nnnn00011010 lds <REG_N>,MACL */{"lds",{A_REG_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_A}, arch_sh_up},
-/* 0100nnnn00101010 lds <REG_N>,PR */{"lds",{A_REG_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_A}, arch_sh1_up},
+/* 0100nnnn00101010 lds <REG_N>,PR */{"lds",{A_REG_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_A}, arch_sh_up},
/* 0100nnnn01101010 lds <REG_N>,DSR */{"lds",{A_REG_N,A_DSR},{HEX_4,REG_N,HEX_6,HEX_A}, arch_sh_dsp_up},
@@ -362,11 +530,11 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn01101010 lds <REG_M>,FPSCR */{"lds",{A_REG_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_A}, arch_sh2e_up},
-/* 0100nnnn00000110 lds.l @<REG_N>+,MACH*/{"lds.l",{A_INC_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_6}, arch_sh1_up},
+/* 0100nnnn00000110 lds.l @<REG_N>+,MACH*/{"lds.l",{A_INC_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_6}, arch_sh_up},
-/* 0100nnnn00010110 lds.l @<REG_N>+,MACL*/{"lds.l",{A_INC_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_6}, arch_sh1_up},
+/* 0100nnnn00010110 lds.l @<REG_N>+,MACL*/{"lds.l",{A_INC_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_6}, arch_sh_up},
-/* 0100nnnn00100110 lds.l @<REG_N>+,PR */{"lds.l",{A_INC_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_6}, arch_sh1_up},
+/* 0100nnnn00100110 lds.l @<REG_N>+,PR */{"lds.l",{A_INC_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_6}, arch_sh_up},
/* 0100nnnn01100110 lds.l @<REG_N>+,DSR */{"lds.l",{A_INC_N,A_DSR},{HEX_4,REG_N,HEX_6,HEX_6}, arch_sh_dsp_up},
@@ -386,136 +554,154 @@ const sh_opcode_info sh_table[] =
/* 0000000000111000 ldtlb */{"ldtlb",{0},{HEX_0,HEX_0,HEX_3,HEX_8}, arch_sh3_up},
-/* 0100nnnnmmmm1111 mac.w @<REG_M>+,@<REG_N>+*/{"mac.w",{A_INC_M,A_INC_N},{HEX_4,REG_N,REG_M,HEX_F}, arch_sh1_up},
+/* 0100nnnnmmmm1111 mac.w @<REG_M>+,@<REG_N>+*/{"mac.w",{A_INC_M,A_INC_N},{HEX_4,REG_N,REG_M,HEX_F}, arch_sh_up},
-/* 1110nnnni8*1.... mov #<imm>,<REG_N> */{"mov",{A_IMM,A_REG_N},{HEX_E,REG_N,IMM0_8}, arch_sh1_up},
+/* 1110nnnni8*1.... mov #<imm>,<REG_N> */{"mov",{A_IMM,A_REG_N},{HEX_E,REG_N,IMM0_8}, arch_sh_up},
-/* 0110nnnnmmmm0011 mov <REG_M>,<REG_N> */{"mov",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_3}, arch_sh1_up},
+/* 0110nnnnmmmm0011 mov <REG_M>,<REG_N> */{"mov",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_3}, arch_sh_up},
-/* 0000nnnnmmmm0100 mov.b <REG_M>,@(R0,<REG_N>)*/{"mov.b",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_4}, arch_sh1_up},
+/* 0000nnnnmmmm0100 mov.b <REG_M>,@(R0,<REG_N>)*/{"mov.b",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_4}, arch_sh_up},
-/* 0010nnnnmmmm0100 mov.b <REG_M>,@-<REG_N>*/{"mov.b",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_4}, arch_sh1_up},
+/* 0010nnnnmmmm0100 mov.b <REG_M>,@-<REG_N>*/{"mov.b",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_4}, arch_sh_up},
-/* 0010nnnnmmmm0000 mov.b <REG_M>,@<REG_N>*/{"mov.b",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_0}, arch_sh1_up},
+/* 0010nnnnmmmm0000 mov.b <REG_M>,@<REG_N>*/{"mov.b",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_0}, arch_sh_up},
-/* 10000100mmmmi4*1 mov.b @(<disp>,<REG_M>),R0*/{"mov.b",{A_DISP_REG_M,A_R0},{HEX_8,HEX_4,REG_M,IMM0_4}, arch_sh1_up},
+/* 10000100mmmmi4*1 mov.b @(<disp>,<REG_M>),R0*/{"mov.b",{A_DISP_REG_M,A_R0},{HEX_8,HEX_4,REG_M,IMM0_4}, arch_sh_up},
-/* 11000100i8*1.... mov.b @(<disp>,GBR),R0*/{"mov.b",{A_DISP_GBR,A_R0},{HEX_C,HEX_4,IMM0_8}, arch_sh1_up},
+/* 11000100i8*1.... mov.b @(<disp>,GBR),R0*/{"mov.b",{A_DISP_GBR,A_R0},{HEX_C,HEX_4,IMM0_8}, arch_sh_up},
-/* 0000nnnnmmmm1100 mov.b @(R0,<REG_M>),<REG_N>*/{"mov.b",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_C}, arch_sh1_up},
+/* 0000nnnnmmmm1100 mov.b @(R0,<REG_M>),<REG_N>*/{"mov.b",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_C}, arch_sh_up},
-/* 0110nnnnmmmm0100 mov.b @<REG_M>+,<REG_N>*/{"mov.b",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_4}, arch_sh1_up},
+/* 0110nnnnmmmm0100 mov.b @<REG_M>+,<REG_N>*/{"mov.b",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_4}, arch_sh_up},
-/* 0110nnnnmmmm0000 mov.b @<REG_M>,<REG_N>*/{"mov.b",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_0}, arch_sh1_up},
+/* 0110nnnnmmmm0000 mov.b @<REG_M>,<REG_N>*/{"mov.b",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_0}, arch_sh_up},
-/* 10000000mmmmi4*1 mov.b R0,@(<disp>,<REG_M>)*/{"mov.b",{A_R0,A_DISP_REG_M},{HEX_8,HEX_0,REG_M,IMM1_4}, arch_sh1_up},
+/* 10000000mmmmi4*1 mov.b R0,@(<disp>,<REG_M>)*/{"mov.b",{A_R0,A_DISP_REG_M},{HEX_8,HEX_0,REG_M,IMM1_4}, arch_sh_up},
-/* 11000000i8*1.... mov.b R0,@(<disp>,GBR)*/{"mov.b",{A_R0,A_DISP_GBR},{HEX_C,HEX_0,IMM1_8}, arch_sh1_up},
+/* 11000000i8*1.... mov.b R0,@(<disp>,GBR)*/{"mov.b",{A_R0,A_DISP_GBR},{HEX_C,HEX_0,IMM1_8}, arch_sh_up},
-/* 0001nnnnmmmmi4*4 mov.l <REG_M>,@(<disp>,<REG_N>)*/{"mov.l",{ A_REG_M,A_DISP_REG_N},{HEX_1,REG_N,REG_M,IMM1_4BY4}, arch_sh1_up},
+/* 0100nnnn10001011 mov.b R0,@<REG_N>+ */{"mov.b",{A_R0,A_INC_N},{HEX_4,REG_N,HEX_8,HEX_B}, arch_sh2a_nofpu_up},
+/* 0100nnnn11001011 mov.b @-<REG_M>,R0 */{"mov.b",{A_DEC_M,A_R0},{HEX_4,REG_M,HEX_C,HEX_B}, arch_sh2a_nofpu_up},
+/* 0011nnnnmmmm0001 0000dddddddddddd mov.b <REG_M>,@(<DISP12>,<REG_N>) */
+{"mov.b",{A_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_0,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 0100dddddddddddd mov.b @(<DISP12>,<REG_M>),<REG_N> */
+{"mov.b",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_4,DISP0_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0001nnnnmmmmi4*4 mov.l <REG_M>,@(<disp>,<REG_N>)*/{"mov.l",{ A_REG_M,A_DISP_REG_N},{HEX_1,REG_N,REG_M,IMM1_4BY4}, arch_sh_up},
-/* 0000nnnnmmmm0110 mov.l <REG_M>,@(R0,<REG_N>)*/{"mov.l",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_6}, arch_sh1_up},
+/* 0000nnnnmmmm0110 mov.l <REG_M>,@(R0,<REG_N>)*/{"mov.l",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_6}, arch_sh_up},
-/* 0010nnnnmmmm0110 mov.l <REG_M>,@-<REG_N>*/{"mov.l",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_6}, arch_sh1_up},
+/* 0010nnnnmmmm0110 mov.l <REG_M>,@-<REG_N>*/{"mov.l",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_6}, arch_sh_up},
-/* 0010nnnnmmmm0010 mov.l <REG_M>,@<REG_N>*/{"mov.l",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_2}, arch_sh1_up},
+/* 0010nnnnmmmm0010 mov.l <REG_M>,@<REG_N>*/{"mov.l",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_2}, arch_sh_up},
-/* 0101nnnnmmmmi4*4 mov.l @(<disp>,<REG_M>),<REG_N>*/{"mov.l",{A_DISP_REG_M,A_REG_N},{HEX_5,REG_N,REG_M,IMM0_4BY4}, arch_sh1_up},
+/* 0101nnnnmmmmi4*4 mov.l @(<disp>,<REG_M>),<REG_N>*/{"mov.l",{A_DISP_REG_M,A_REG_N},{HEX_5,REG_N,REG_M,IMM0_4BY4}, arch_sh_up},
-/* 11000110i8*4.... mov.l @(<disp>,GBR),R0*/{"mov.l",{A_DISP_GBR,A_R0},{HEX_C,HEX_6,IMM0_8BY4}, arch_sh1_up},
+/* 11000110i8*4.... mov.l @(<disp>,GBR),R0*/{"mov.l",{A_DISP_GBR,A_R0},{HEX_C,HEX_6,IMM0_8BY4}, arch_sh_up},
-/* 1101nnnni8p4.... mov.l @(<disp>,PC),<REG_N>*/{"mov.l",{A_DISP_PC,A_REG_N},{HEX_D,REG_N,PCRELIMM_8BY4}, arch_sh1_up},
+/* 1101nnnni8p4.... mov.l @(<disp>,PC),<REG_N>*/{"mov.l",{A_DISP_PC,A_REG_N},{HEX_D,REG_N,PCRELIMM_8BY4}, arch_sh_up},
-/* 0000nnnnmmmm1110 mov.l @(R0,<REG_M>),<REG_N>*/{"mov.l",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_E}, arch_sh1_up},
+/* 0000nnnnmmmm1110 mov.l @(R0,<REG_M>),<REG_N>*/{"mov.l",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_E}, arch_sh_up},
-/* 0110nnnnmmmm0110 mov.l @<REG_M>+,<REG_N>*/{"mov.l",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_6}, arch_sh1_up},
+/* 0110nnnnmmmm0110 mov.l @<REG_M>+,<REG_N>*/{"mov.l",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_6}, arch_sh_up},
-/* 0110nnnnmmmm0010 mov.l @<REG_M>,<REG_N>*/{"mov.l",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_2}, arch_sh1_up},
+/* 0110nnnnmmmm0010 mov.l @<REG_M>,<REG_N>*/{"mov.l",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_2}, arch_sh_up},
-/* 11000010i8*4.... mov.l R0,@(<disp>,GBR)*/{"mov.l",{A_R0,A_DISP_GBR},{HEX_C,HEX_2,IMM1_8BY4}, arch_sh1_up},
+/* 11000010i8*4.... mov.l R0,@(<disp>,GBR)*/{"mov.l",{A_R0,A_DISP_GBR},{HEX_C,HEX_2,IMM1_8BY4}, arch_sh_up},
-/* 0000nnnnmmmm0101 mov.w <REG_M>,@(R0,<REG_N>)*/{"mov.w",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_5}, arch_sh1_up},
+/* 0100nnnn10101011 mov.l R0,@<REG_N>+ */{"mov.l",{A_R0,A_INC_N},{HEX_4,REG_N,HEX_A,HEX_B}, arch_sh2a_nofpu_up},
+/* 0100nnnn11001011 mov.l @-<REG_M>,R0 */{"mov.l",{A_DEC_M,A_R0},{HEX_4,REG_M,HEX_E,HEX_B}, arch_sh2a_nofpu_up},
+/* 0011nnnnmmmm0001 0010dddddddddddd mov.l <REG_M>,@(<DISP12>,<REG_N>) */
+{"mov.l",{A_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_2,DISP1_12BY4}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 0110dddddddddddd mov.l @(<DISP12>,<REG_M>),<REG_N> */
+{"mov.l",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_6,DISP0_12BY4}, arch_sh2a_nofpu_up | arch_op32},
+/* 0000nnnnmmmm0101 mov.w <REG_M>,@(R0,<REG_N>)*/{"mov.w",{ A_REG_M,A_IND_R0_REG_N},{HEX_0,REG_N,REG_M,HEX_5}, arch_sh_up},
-/* 0010nnnnmmmm0101 mov.w <REG_M>,@-<REG_N>*/{"mov.w",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_5}, arch_sh1_up},
+/* 0010nnnnmmmm0101 mov.w <REG_M>,@-<REG_N>*/{"mov.w",{ A_REG_M,A_DEC_N},{HEX_2,REG_N,REG_M,HEX_5}, arch_sh_up},
-/* 0010nnnnmmmm0001 mov.w <REG_M>,@<REG_N>*/{"mov.w",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_1}, arch_sh1_up},
+/* 0010nnnnmmmm0001 mov.w <REG_M>,@<REG_N>*/{"mov.w",{ A_REG_M,A_IND_N},{HEX_2,REG_N,REG_M,HEX_1}, arch_sh_up},
-/* 10000101mmmmi4*2 mov.w @(<disp>,<REG_M>),R0*/{"mov.w",{A_DISP_REG_M,A_R0},{HEX_8,HEX_5,REG_M,IMM0_4BY2}, arch_sh1_up},
+/* 10000101mmmmi4*2 mov.w @(<disp>,<REG_M>),R0*/{"mov.w",{A_DISP_REG_M,A_R0},{HEX_8,HEX_5,REG_M,IMM0_4BY2}, arch_sh_up},
-/* 11000101i8*2.... mov.w @(<disp>,GBR),R0*/{"mov.w",{A_DISP_GBR,A_R0},{HEX_C,HEX_5,IMM0_8BY2}, arch_sh1_up},
+/* 11000101i8*2.... mov.w @(<disp>,GBR),R0*/{"mov.w",{A_DISP_GBR,A_R0},{HEX_C,HEX_5,IMM0_8BY2}, arch_sh_up},
-/* 1001nnnni8p2.... mov.w @(<disp>,PC),<REG_N>*/{"mov.w",{A_DISP_PC,A_REG_N},{HEX_9,REG_N,PCRELIMM_8BY2}, arch_sh1_up},
+/* 1001nnnni8p2.... mov.w @(<disp>,PC),<REG_N>*/{"mov.w",{A_DISP_PC,A_REG_N},{HEX_9,REG_N,PCRELIMM_8BY2}, arch_sh_up},
-/* 0000nnnnmmmm1101 mov.w @(R0,<REG_M>),<REG_N>*/{"mov.w",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_D}, arch_sh1_up},
+/* 0000nnnnmmmm1101 mov.w @(R0,<REG_M>),<REG_N>*/{"mov.w",{A_IND_R0_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_D}, arch_sh_up},
-/* 0110nnnnmmmm0101 mov.w @<REG_M>+,<REG_N>*/{"mov.w",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_5}, arch_sh1_up},
+/* 0110nnnnmmmm0101 mov.w @<REG_M>+,<REG_N>*/{"mov.w",{A_INC_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_5}, arch_sh_up},
-/* 0110nnnnmmmm0001 mov.w @<REG_M>,<REG_N>*/{"mov.w",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_1}, arch_sh1_up},
+/* 0110nnnnmmmm0001 mov.w @<REG_M>,<REG_N>*/{"mov.w",{A_IND_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_1}, arch_sh_up},
-/* 10000001mmmmi4*2 mov.w R0,@(<disp>,<REG_M>)*/{"mov.w",{A_R0,A_DISP_REG_M},{HEX_8,HEX_1,REG_M,IMM1_4BY2}, arch_sh1_up},
+/* 10000001mmmmi4*2 mov.w R0,@(<disp>,<REG_M>)*/{"mov.w",{A_R0,A_DISP_REG_M},{HEX_8,HEX_1,REG_M,IMM1_4BY2}, arch_sh_up},
-/* 11000001i8*2.... mov.w R0,@(<disp>,GBR)*/{"mov.w",{A_R0,A_DISP_GBR},{HEX_C,HEX_1,IMM1_8BY2}, arch_sh1_up},
+/* 11000001i8*2.... mov.w R0,@(<disp>,GBR)*/{"mov.w",{A_R0,A_DISP_GBR},{HEX_C,HEX_1,IMM1_8BY2}, arch_sh_up},
-/* 11000111i8p4.... mova @(<disp>,PC),R0*/{"mova",{A_DISP_PC,A_R0},{HEX_C,HEX_7,PCRELIMM_8BY4}, arch_sh1_up},
-/* 0000nnnn11000011 movca.l R0,@<REG_N> */{"movca.l",{A_R0,A_IND_N},{HEX_0,REG_N,HEX_C,HEX_3}, arch_sh4_nofp_up},
+/* 0100nnnn10011011 mov.w R0,@<REG_N>+ */{"mov.w",{A_R0,A_INC_N},{HEX_4,REG_N,HEX_9,HEX_B}, arch_sh2a_nofpu_up},
+/* 0100nnnn11011011 mov.w @-<REG_M>,R0 */{"mov.w",{A_DEC_M,A_R0},{HEX_4,REG_M,HEX_D,HEX_B}, arch_sh2a_nofpu_up},
+/* 0011nnnnmmmm0001 0001dddddddddddd mov.w <REG_M>,@(<DISP12>,<REG_N>) */
+{"mov.w",{A_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_1,DISP1_12BY2}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 0101dddddddddddd mov.w @(<DISP12>,<REG_M>),<REG_N> */
+{"mov.w",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_5,DISP0_12BY2}, arch_sh2a_nofpu_up | arch_op32},
+/* 11000111i8p4.... mova @(<disp>,PC),R0*/{"mova",{A_DISP_PC,A_R0},{HEX_C,HEX_7,PCRELIMM_8BY4}, arch_sh_up},
+/* 0000nnnn11000011 movca.l R0,@<REG_N> */{"movca.l",{A_R0,A_IND_N},{HEX_0,REG_N,HEX_C,HEX_3}, arch_sh4_nommu_nofpu_up},
-/* 0000nnnn01110011 movco.l r0,@<REG_N> */{"movco.l",{A_R0,A_IND_N},{HEX_0,REG_N,HEX_7,HEX_3}, arch_sh4a_nofp_up},
-/* 0000mmmm01100011 movli.l @<REG_M>,r0 */{"movli.l",{A_IND_M,A_R0},{HEX_0,REG_M,HEX_6,HEX_3}, arch_sh4a_nofp_up},
+/* 0000nnnn01110011 movco.l r0,@<REG_N> */{"movco.l",{A_R0,A_IND_N},{HEX_0,REG_N,HEX_7,HEX_3}, arch_sh4a_nofpu_up},
+/* 0000mmmm01100011 movli.l @<REG_M>,r0 */{"movli.l",{A_IND_M,A_R0},{HEX_0,REG_M,HEX_6,HEX_3}, arch_sh4a_nofpu_up},
-/* 0000nnnn00101001 movt <REG_N> */{"movt",{A_REG_N},{HEX_0,REG_N,HEX_2,HEX_9}, arch_sh1_up},
+/* 0000nnnn00101001 movt <REG_N> */{"movt",{A_REG_N},{HEX_0,REG_N,HEX_2,HEX_9}, arch_sh_up},
-/* 0100mmmm10101001 movua.l @<REG_M>,r0 */{"movua.l",{A_IND_M,A_R0},{HEX_4,REG_M,HEX_A,HEX_9}, arch_sh4a_nofp_up},
-/* 0100mmmm11101001 movua.l @<REG_M>+,r0 */{"movua.l",{A_INC_M,A_R0},{HEX_4,REG_M,HEX_E,HEX_9}, arch_sh4a_nofp_up},
+/* 0100mmmm10101001 movua.l @<REG_M>,r0 */{"movua.l",{A_IND_M,A_R0},{HEX_4,REG_M,HEX_A,HEX_9}, arch_sh4a_nofpu_up},
+/* 0100mmmm11101001 movua.l @<REG_M>+,r0 */{"movua.l",{A_INC_M,A_R0},{HEX_4,REG_M,HEX_E,HEX_9}, arch_sh4a_nofpu_up},
-/* 0010nnnnmmmm1111 muls.w <REG_M>,<REG_N>*/{"muls.w",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_F}, arch_sh1_up},
-/* 0010nnnnmmmm1111 muls <REG_M>,<REG_N>*/{"muls",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_F}, arch_sh1_up},
+/* 0010nnnnmmmm1111 muls.w <REG_M>,<REG_N>*/{"muls.w",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_F}, arch_sh_up},
+/* 0010nnnnmmmm1111 muls <REG_M>,<REG_N>*/{"muls",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_F}, arch_sh_up},
/* 0000nnnnmmmm0111 mul.l <REG_M>,<REG_N>*/{"mul.l",{ A_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_7}, arch_sh2_up},
-/* 0010nnnnmmmm1110 mulu.w <REG_M>,<REG_N>*/{"mulu.w",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_E}, arch_sh1_up},
-/* 0010nnnnmmmm1110 mulu <REG_M>,<REG_N>*/{"mulu",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_E}, arch_sh1_up},
+/* 0010nnnnmmmm1110 mulu.w <REG_M>,<REG_N>*/{"mulu.w",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_E}, arch_sh_up},
+/* 0010nnnnmmmm1110 mulu <REG_M>,<REG_N>*/{"mulu",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_E}, arch_sh_up},
-/* 0110nnnnmmmm1011 neg <REG_M>,<REG_N> */{"neg",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_B}, arch_sh1_up},
+/* 0110nnnnmmmm1011 neg <REG_M>,<REG_N> */{"neg",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_B}, arch_sh_up},
-/* 0110nnnnmmmm1010 negc <REG_M>,<REG_N>*/{"negc",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_A}, arch_sh1_up},
+/* 0110nnnnmmmm1010 negc <REG_M>,<REG_N>*/{"negc",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_A}, arch_sh_up},
-/* 0000000000001001 nop */{"nop",{0},{HEX_0,HEX_0,HEX_0,HEX_9}, arch_sh1_up},
+/* 0000000000001001 nop */{"nop",{0},{HEX_0,HEX_0,HEX_0,HEX_9}, arch_sh_up},
-/* 0110nnnnmmmm0111 not <REG_M>,<REG_N> */{"not",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_7}, arch_sh1_up},
-/* 0000nnnn10010011 ocbi @<REG_N> */{"ocbi",{A_IND_N},{HEX_0,REG_N,HEX_9,HEX_3}, arch_sh4_nofp_up},
+/* 0110nnnnmmmm0111 not <REG_M>,<REG_N> */{"not",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_7}, arch_sh_up},
+/* 0000nnnn10010011 ocbi @<REG_N> */{"ocbi",{A_IND_N},{HEX_0,REG_N,HEX_9,HEX_3}, arch_sh4_nommu_nofpu_up},
-/* 0000nnnn10100011 ocbp @<REG_N> */{"ocbp",{A_IND_N},{HEX_0,REG_N,HEX_A,HEX_3}, arch_sh4_nofp_up},
+/* 0000nnnn10100011 ocbp @<REG_N> */{"ocbp",{A_IND_N},{HEX_0,REG_N,HEX_A,HEX_3}, arch_sh4_nommu_nofpu_up},
-/* 0000nnnn10110011 ocbwb @<REG_N> */{"ocbwb",{A_IND_N},{HEX_0,REG_N,HEX_B,HEX_3}, arch_sh4_nofp_up},
+/* 0000nnnn10110011 ocbwb @<REG_N> */{"ocbwb",{A_IND_N},{HEX_0,REG_N,HEX_B,HEX_3}, arch_sh4_nommu_nofpu_up},
-/* 11001011i8*1.... or #<imm>,R0 */{"or",{A_IMM,A_R0},{HEX_C,HEX_B,IMM0_8}, arch_sh1_up},
+/* 11001011i8*1.... or #<imm>,R0 */{"or",{A_IMM,A_R0},{HEX_C,HEX_B,IMM0_8}, arch_sh_up},
-/* 0010nnnnmmmm1011 or <REG_M>,<REG_N> */{"or",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_B}, arch_sh1_up},
+/* 0010nnnnmmmm1011 or <REG_M>,<REG_N> */{"or",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_B}, arch_sh_up},
-/* 11001111i8*1.... or.b #<imm>,@(R0,GBR)*/{"or.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_F,IMM0_8}, arch_sh1_up},
+/* 11001111i8*1.... or.b #<imm>,@(R0,GBR)*/{"or.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_F,IMM0_8}, arch_sh_up},
-/* 0000nnnn10000011 pref @<REG_N> */{"pref",{A_IND_N},{HEX_0,REG_N,HEX_8,HEX_3}, arch_sh4_nofp_up},
+/* 0000nnnn10000011 pref @<REG_N> */{"pref",{A_IND_N},{HEX_0,REG_N,HEX_8,HEX_3}, arch_sh2a_nofpu_or_sh4_nommu_nofpu_up},
-/* 0000nnnn11010011 prefi @<REG_N> */{"prefi",{A_IND_N},{HEX_0,REG_N,HEX_D,HEX_3}, arch_sh4a_nofp_up},
+/* 0000nnnn11010011 prefi @<REG_N> */{"prefi",{A_IND_N},{HEX_0,REG_N,HEX_D,HEX_3}, arch_sh4a_nofpu_up},
-/* 0100nnnn00100100 rotcl <REG_N> */{"rotcl",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_4}, arch_sh1_up},
+/* 0100nnnn00100100 rotcl <REG_N> */{"rotcl",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_4}, arch_sh_up},
-/* 0100nnnn00100101 rotcr <REG_N> */{"rotcr",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_5}, arch_sh1_up},
+/* 0100nnnn00100101 rotcr <REG_N> */{"rotcr",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_5}, arch_sh_up},
-/* 0100nnnn00000100 rotl <REG_N> */{"rotl",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_4}, arch_sh1_up},
+/* 0100nnnn00000100 rotl <REG_N> */{"rotl",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_4}, arch_sh_up},
-/* 0100nnnn00000101 rotr <REG_N> */{"rotr",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_5}, arch_sh1_up},
+/* 0100nnnn00000101 rotr <REG_N> */{"rotr",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_5}, arch_sh_up},
-/* 0000000000101011 rte */{"rte",{0},{HEX_0,HEX_0,HEX_2,HEX_B}, arch_sh1_up},
+/* 0000000000101011 rte */{"rte",{0},{HEX_0,HEX_0,HEX_2,HEX_B}, arch_sh_up},
-/* 0000000000001011 rts */{"rts",{0},{HEX_0,HEX_0,HEX_0,HEX_B}, arch_sh1_up},
+/* 0000000000001011 rts */{"rts",{0},{HEX_0,HEX_0,HEX_0,HEX_B}, arch_sh_up},
/* 0000000010011000 setdmx */{"setdmx",{0},{HEX_0,HEX_0,HEX_9,HEX_8}, arch_sh4al_dsp_up},
/* 0000000011001000 setdmy */{"setdmy",{0},{HEX_0,HEX_0,HEX_C,HEX_8}, arch_sh4al_dsp_up},
-/* 0000000001011000 sets */{"sets",{0},{HEX_0,HEX_0,HEX_5,HEX_8}, arch_sh1_up},
-/* 0000000000011000 sett */{"sett",{0},{HEX_0,HEX_0,HEX_1,HEX_8}, arch_sh1_up},
+/* 0000000001011000 sets */{"sets",{0},{HEX_0,HEX_0,HEX_5,HEX_8}, arch_sh_up},
+/* 0000000000011000 sett */{"sett",{0},{HEX_0,HEX_0,HEX_1,HEX_8}, arch_sh_up},
/* 0100nnnn00010100 setrc <REG_N> */{"setrc",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_4}, arch_sh_dsp_up},
@@ -525,37 +711,37 @@ const sh_opcode_info sh_table[] =
/* repeat start end #<imm> */{"repeat",{A_DISP_PC,A_DISP_PC,A_IMM},{REPEAT,HEX_2,IMM0_8,HEX_8}, arch_sh_dsp_up},
-/* 0100nnnnmmmm1100 shad <REG_M>,<REG_N>*/{"shad",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_C}, arch_sh3_up},
+/* 0100nnnnmmmm1100 shad <REG_M>,<REG_N>*/{"shad",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_C}, arch_sh2a_nofpu_or_sh3_nommu_up},
-/* 0100nnnnmmmm1101 shld <REG_M>,<REG_N>*/{"shld",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_D}, arch_sh3_up},
+/* 0100nnnnmmmm1101 shld <REG_M>,<REG_N>*/{"shld",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_D}, arch_sh2a_nofpu_or_sh3_nommu_up},
-/* 0100nnnn00100000 shal <REG_N> */{"shal",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_0}, arch_sh1_up},
+/* 0100nnnn00100000 shal <REG_N> */{"shal",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_0}, arch_sh_up},
-/* 0100nnnn00100001 shar <REG_N> */{"shar",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_1}, arch_sh1_up},
+/* 0100nnnn00100001 shar <REG_N> */{"shar",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_1}, arch_sh_up},
-/* 0100nnnn00000000 shll <REG_N> */{"shll",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_0}, arch_sh1_up},
+/* 0100nnnn00000000 shll <REG_N> */{"shll",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_0}, arch_sh_up},
-/* 0100nnnn00101000 shll16 <REG_N> */{"shll16",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_8}, arch_sh1_up},
+/* 0100nnnn00101000 shll16 <REG_N> */{"shll16",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_8}, arch_sh_up},
-/* 0100nnnn00001000 shll2 <REG_N> */{"shll2",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_8}, arch_sh1_up},
+/* 0100nnnn00001000 shll2 <REG_N> */{"shll2",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_8}, arch_sh_up},
-/* 0100nnnn00011000 shll8 <REG_N> */{"shll8",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_8}, arch_sh1_up},
+/* 0100nnnn00011000 shll8 <REG_N> */{"shll8",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_8}, arch_sh_up},
-/* 0100nnnn00000001 shlr <REG_N> */{"shlr",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_1}, arch_sh1_up},
+/* 0100nnnn00000001 shlr <REG_N> */{"shlr",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_1}, arch_sh_up},
-/* 0100nnnn00101001 shlr16 <REG_N> */{"shlr16",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_9}, arch_sh1_up},
+/* 0100nnnn00101001 shlr16 <REG_N> */{"shlr16",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_9}, arch_sh_up},
-/* 0100nnnn00001001 shlr2 <REG_N> */{"shlr2",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_9}, arch_sh1_up},
+/* 0100nnnn00001001 shlr2 <REG_N> */{"shlr2",{A_REG_N},{HEX_4,REG_N,HEX_0,HEX_9}, arch_sh_up},
-/* 0100nnnn00011001 shlr8 <REG_N> */{"shlr8",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_9}, arch_sh1_up},
+/* 0100nnnn00011001 shlr8 <REG_N> */{"shlr8",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_9}, arch_sh_up},
-/* 0000000000011011 sleep */{"sleep",{0},{HEX_0,HEX_0,HEX_1,HEX_B}, arch_sh1_up},
+/* 0000000000011011 sleep */{"sleep",{0},{HEX_0,HEX_0,HEX_1,HEX_B}, arch_sh_up},
-/* 0000nnnn00000010 stc SR,<REG_N> */{"stc",{A_SR,A_REG_N},{HEX_0,REG_N,HEX_0,HEX_2}, arch_sh1_up},
+/* 0000nnnn00000010 stc SR,<REG_N> */{"stc",{A_SR,A_REG_N},{HEX_0,REG_N,HEX_0,HEX_2}, arch_sh_up},
-/* 0000nnnn00010010 stc GBR,<REG_N> */{"stc",{A_GBR,A_REG_N},{HEX_0,REG_N,HEX_1,HEX_2}, arch_sh1_up},
+/* 0000nnnn00010010 stc GBR,<REG_N> */{"stc",{A_GBR,A_REG_N},{HEX_0,REG_N,HEX_1,HEX_2}, arch_sh_up},
-/* 0000nnnn00100010 stc VBR,<REG_N> */{"stc",{A_VBR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_2}, arch_sh1_up},
+/* 0000nnnn00100010 stc VBR,<REG_N> */{"stc",{A_VBR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_2}, arch_sh_up},
/* 0000nnnn01010010 stc MOD,<REG_N> */{"stc",{A_MOD,A_REG_N},{HEX_0,REG_N,HEX_5,HEX_2}, arch_sh_dsp_up},
@@ -563,19 +749,21 @@ const sh_opcode_info sh_table[] =
/* 0000nnnn01100010 stc RS,<REG_N> */{"stc",{A_RS,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_2}, arch_sh_dsp_up},
-/* 0000nnnn00110010 stc SSR,<REG_N> */{"stc",{A_SSR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_2}, arch_sh3_up},
+/* 0000nnnn00110010 stc SSR,<REG_N> */{"stc",{A_SSR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_2}, arch_sh3_nommu_up},
-/* 0000nnnn01000010 stc SPC,<REG_N> */{"stc",{A_SPC,A_REG_N},{HEX_0,REG_N,HEX_4,HEX_2}, arch_sh3_up},
+/* 0000nnnn01000010 stc SPC,<REG_N> */{"stc",{A_SPC,A_REG_N},{HEX_0,REG_N,HEX_4,HEX_2}, arch_sh3_nommu_up},
-/* 0000nnnn00111010 stc SGR,<REG_N> */{"stc",{A_SGR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_A}, arch_sh4_nofp_up},
+/* 0000nnnn00111010 stc SGR,<REG_N> */{"stc",{A_SGR,A_REG_N},{HEX_0,REG_N,HEX_3,HEX_A}, arch_sh4_nommu_nofpu_up},
-/* 0000nnnn11111010 stc DBR,<REG_N> */{"stc",{A_DBR,A_REG_N},{HEX_0,REG_N,HEX_F,HEX_A}, arch_sh4_nofp_up},
+/* 0000nnnn11111010 stc DBR,<REG_N> */{"stc",{A_DBR,A_REG_N},{HEX_0,REG_N,HEX_F,HEX_A}, arch_sh4_nommu_nofpu_up},
-/* 0000nnnn1xxx0010 stc Rn_BANK,<REG_N> */{"stc",{A_REG_B,A_REG_N},{HEX_0,REG_N,REG_B,HEX_2}, arch_sh3_up},
+/* 0000nnnn1xxx0010 stc Rn_BANK,<REG_N> */{"stc",{A_REG_B,A_REG_N},{HEX_0,REG_N,REG_B,HEX_2}, arch_sh3_nommu_up},
-/* 0100nnnn00000011 stc.l SR,@-<REG_N> */{"stc.l",{A_SR,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_3}, arch_sh1_up},
+/* 0000nnnn01001010 stc TBR,<REG_N> */ {"stc",{A_TBR,A_REG_N},{HEX_0,REG_N,HEX_4,HEX_A}, arch_sh2a_nofpu_up},
-/* 0100nnnn00100011 stc.l VBR,@-<REG_N> */{"stc.l",{A_VBR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_3}, arch_sh1_up},
+/* 0100nnnn00000011 stc.l SR,@-<REG_N> */{"stc.l",{A_SR,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_3}, arch_sh_up},
+
+/* 0100nnnn00100011 stc.l VBR,@-<REG_N> */{"stc.l",{A_VBR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_3}, arch_sh_up},
/* 0100nnnn01010011 stc.l MOD,@-<REG_N> */{"stc.l",{A_MOD,A_DEC_N},{HEX_4,REG_N,HEX_5,HEX_3}, arch_sh_dsp_up},
@@ -583,23 +771,23 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn01100011 stc.l RS,@-<REG_N> */{"stc.l",{A_RS,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_3}, arch_sh_dsp_up},
-/* 0100nnnn00110011 stc.l SSR,@-<REG_N> */{"stc.l",{A_SSR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_3}, arch_sh3_up},
+/* 0100nnnn00110011 stc.l SSR,@-<REG_N> */{"stc.l",{A_SSR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_3}, arch_sh3_nommu_up},
-/* 0100nnnn01000011 stc.l SPC,@-<REG_N> */{"stc.l",{A_SPC,A_DEC_N},{HEX_4,REG_N,HEX_4,HEX_3}, arch_sh3_up},
+/* 0100nnnn01000011 stc.l SPC,@-<REG_N> */{"stc.l",{A_SPC,A_DEC_N},{HEX_4,REG_N,HEX_4,HEX_3}, arch_sh3_nommu_up},
-/* 0100nnnn00010011 stc.l GBR,@-<REG_N> */{"stc.l",{A_GBR,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_3}, arch_sh1_up},
+/* 0100nnnn00010011 stc.l GBR,@-<REG_N> */{"stc.l",{A_GBR,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_3}, arch_sh_up},
-/* 0100nnnn00110010 stc.l SGR,@-<REG_N> */{"stc.l",{A_SGR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_2}, arch_sh4_nofp_up},
+/* 0100nnnn00110010 stc.l SGR,@-<REG_N> */{"stc.l",{A_SGR,A_DEC_N},{HEX_4,REG_N,HEX_3,HEX_2}, arch_sh4_nommu_nofpu_up},
-/* 0100nnnn11110010 stc.l DBR,@-<REG_N> */{"stc.l",{A_DBR,A_DEC_N},{HEX_4,REG_N,HEX_F,HEX_2}, arch_sh4_nofp_up},
+/* 0100nnnn11110010 stc.l DBR,@-<REG_N> */{"stc.l",{A_DBR,A_DEC_N},{HEX_4,REG_N,HEX_F,HEX_2}, arch_sh4_nommu_nofpu_up},
-/* 0100nnnn1xxx0011 stc.l Rn_BANK,@-<REG_N> */{"stc.l",{A_REG_B,A_DEC_N},{HEX_4,REG_N,REG_B,HEX_3}, arch_sh3_up},
+/* 0100nnnn1xxx0011 stc.l Rn_BANK,@-<REG_N> */{"stc.l",{A_REG_B,A_DEC_N},{HEX_4,REG_N,REG_B,HEX_3}, arch_sh3_nommu_up},
-/* 0000nnnn00001010 sts MACH,<REG_N> */{"sts",{A_MACH,A_REG_N},{HEX_0,REG_N,HEX_0,HEX_A}, arch_sh1_up},
+/* 0000nnnn00001010 sts MACH,<REG_N> */{"sts",{A_MACH,A_REG_N},{HEX_0,REG_N,HEX_0,HEX_A}, arch_sh_up},
-/* 0000nnnn00011010 sts MACL,<REG_N> */{"sts",{A_MACL,A_REG_N},{HEX_0,REG_N,HEX_1,HEX_A}, arch_sh1_up},
+/* 0000nnnn00011010 sts MACL,<REG_N> */{"sts",{A_MACL,A_REG_N},{HEX_0,REG_N,HEX_1,HEX_A}, arch_sh_up},
-/* 0000nnnn00101010 sts PR,<REG_N> */{"sts",{A_PR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_A}, arch_sh1_up},
+/* 0000nnnn00101010 sts PR,<REG_N> */{"sts",{A_PR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_A}, arch_sh_up},
/* 0000nnnn01101010 sts DSR,<REG_N> */{"sts",{A_DSR,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_A}, arch_sh_dsp_up},
@@ -617,11 +805,11 @@ const sh_opcode_info sh_table[] =
/* 0000nnnn01101010 sts FPSCR,<REG_N> */{"sts",{FPSCR_M,A_REG_N},{HEX_0,REG_N,HEX_6,HEX_A}, arch_sh2e_up},
-/* 0100nnnn00000010 sts.l MACH,@-<REG_N>*/{"sts.l",{A_MACH,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_2}, arch_sh1_up},
+/* 0100nnnn00000010 sts.l MACH,@-<REG_N>*/{"sts.l",{A_MACH,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_2}, arch_sh_up},
-/* 0100nnnn00010010 sts.l MACL,@-<REG_N>*/{"sts.l",{A_MACL,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_2}, arch_sh1_up},
+/* 0100nnnn00010010 sts.l MACL,@-<REG_N>*/{"sts.l",{A_MACL,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_2}, arch_sh_up},
-/* 0100nnnn00100010 sts.l PR,@-<REG_N> */{"sts.l",{A_PR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_2}, arch_sh1_up},
+/* 0100nnnn00100010 sts.l PR,@-<REG_N> */{"sts.l",{A_PR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_2}, arch_sh_up},
/* 0100nnnn01100110 sts.l DSR,@-<REG_N> */{"sts.l",{A_DSR,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_2}, arch_sh_dsp_up},
@@ -639,37 +827,35 @@ const sh_opcode_info sh_table[] =
/* 0100nnnn01100010 sts.l FPSCR,@-<REG_N>*/{"sts.l",{FPSCR_M,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_2}, arch_sh2e_up},
-/* 0011nnnnmmmm1000 sub <REG_M>,<REG_N> */{"sub",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_8}, arch_sh1_up},
-
-/* 0011nnnnmmmm1010 subc <REG_M>,<REG_N>*/{"subc",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_A}, arch_sh1_up},
+/* 0011nnnnmmmm1000 sub <REG_M>,<REG_N> */{"sub",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_8}, arch_sh_up},
-/* 0011nnnnmmmm1011 subv <REG_M>,<REG_N>*/{"subv",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_B}, arch_sh1_up},
+/* 0011nnnnmmmm1010 subc <REG_M>,<REG_N>*/{"subc",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_A}, arch_sh_up},
-/* 0110nnnnmmmm1000 swap.b <REG_M>,<REG_N>*/{"swap.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_8}, arch_sh1_up},
+/* 0011nnnnmmmm1011 subv <REG_M>,<REG_N>*/{"subv",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_B}, arch_sh_up},
-/* 0110nnnnmmmm1001 swap.w <REG_M>,<REG_N>*/{"swap.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_9}, arch_sh1_up},
+/* 0110nnnnmmmm1000 swap.b <REG_M>,<REG_N>*/{"swap.b",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_8}, arch_sh_up},
-/* 0000000010101011 synco */{"synco",{0},{HEX_0,HEX_0,HEX_A,HEX_B}, arch_sh4a_nofp_up},
+/* 0110nnnnmmmm1001 swap.w <REG_M>,<REG_N>*/{"swap.w",{ A_REG_M,A_REG_N},{HEX_6,REG_N,REG_M,HEX_9}, arch_sh_up},
-/* 0100nnnn00011011 tas.b @<REG_N> */{"tas.b",{A_IND_N},{HEX_4,REG_N,HEX_1,HEX_B}, arch_sh1_up},
+/* 0000000010101011 synco */{"synco",{0},{HEX_0,HEX_0,HEX_A,HEX_B}, arch_sh4a_nofpu_up},
-/* 11000011i8*1.... trapa #<imm> */{"trapa",{A_IMM},{HEX_C,HEX_3,IMM0_8}, arch_sh1_up},
+/* 0100nnnn00011011 tas.b @<REG_N> */{"tas.b",{A_IND_N},{HEX_4,REG_N,HEX_1,HEX_B}, arch_sh_up},
-/* 11001000i8*1.... tst #<imm>,R0 */{"tst",{A_IMM,A_R0},{HEX_C,HEX_8,IMM0_8}, arch_sh1_up},
+/* 11000011i8*1.... trapa #<imm> */{"trapa",{A_IMM},{HEX_C,HEX_3,IMM0_8}, arch_sh_up},
-/* 0010nnnnmmmm1000 tst <REG_M>,<REG_N> */{"tst",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_8}, arch_sh1_up},
+/* 11001000i8*1.... tst #<imm>,R0 */{"tst",{A_IMM,A_R0},{HEX_C,HEX_8,IMM0_8}, arch_sh_up},
-/* 11001100i8*1.... tst.b #<imm>,@(R0,GBR)*/{"tst.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_C,IMM0_8}, arch_sh1_up},
+/* 0010nnnnmmmm1000 tst <REG_M>,<REG_N> */{"tst",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_8}, arch_sh_up},
-/* 11001010i8*1.... xor #<imm>,R0 */{"xor",{A_IMM,A_R0},{HEX_C,HEX_A,IMM0_8}, arch_sh1_up},
+/* 11001100i8*1.... tst.b #<imm>,@(R0,GBR)*/{"tst.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_C,IMM0_8}, arch_sh_up},
-/* 0010nnnnmmmm1010 xor <REG_M>,<REG_N> */{"xor",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_A}, arch_sh1_up},
+/* 11001010i8*1.... xor #<imm>,R0 */{"xor",{A_IMM,A_R0},{HEX_C,HEX_A,IMM0_8}, arch_sh_up},
-/* 11001110i8*1.... xor.b #<imm>,@(R0,GBR)*/{"xor.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_E,IMM0_8}, arch_sh1_up},
+/* 0010nnnnmmmm1010 xor <REG_M>,<REG_N> */{"xor",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_A}, arch_sh_up},
-/* 0010nnnnmmmm1101 xtrct <REG_M>,<REG_N>*/{"xtrct",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_D}, arch_sh1_up},
+/* 11001110i8*1.... xor.b #<imm>,@(R0,GBR)*/{"xor.b",{A_IMM,A_R0_GBR},{HEX_C,HEX_E,IMM0_8}, arch_sh_up},
-/* 0000nnnnmmmm0111 mul.l <REG_M>,<REG_N>*/{"mul.l",{ A_REG_M,A_REG_N},{HEX_0,REG_N,REG_M,HEX_7}, arch_sh1_up},
+/* 0010nnnnmmmm1101 xtrct <REG_M>,<REG_N>*/{"xtrct",{ A_REG_M,A_REG_N},{HEX_2,REG_N,REG_M,HEX_D}, arch_sh_up},
/* 0100nnnn00010000 dt <REG_N> */{"dt",{A_REG_N},{HEX_4,REG_N,HEX_1,HEX_0}, arch_sh2_up},
@@ -747,17 +933,17 @@ const sh_opcode_info sh_table[] =
/* nnmm000001 movy.w @<REG_Ayx>,<DSP_REG_YX> */ {"movy.w",{AYX_IND_N,DSP_REG_YX},{PPI,MOVY_NOPX,HEX_0,HEX_1}, arch_sh4al_dsp_up},
/* nnmm000010 movy.w @<REG_Ayx>+,<DSP_REG_YX> */{"movy.w",{AYX_INC_N,DSP_REG_YX},{PPI,MOVY_NOPX,HEX_0,HEX_2}, arch_sh4al_dsp_up},
-/* nnmm000011 movy.w @<REG_Ayx>+r8,<DSP_REG_YX> */{"movy.w",{AYX_PMOD_N,DSP_REG_YX},{PPI,MOVY_NOPX,HEX_0,HEX_3}, arch_sh4al_dsp_up},
+/* nnmm000011 movy.w @<REG_Ayx>+r9,<DSP_REG_YX> */{"movy.w",{AYX_PMOD_N,DSP_REG_YX},{PPI,MOVY_NOPX,HEX_0,HEX_3}, arch_sh4al_dsp_up},
/* nnmm010001 movy.w <DSP_REG_AY>,@<REG_Ayx> */ {"movy.w",{DSP_REG_AY,AYX_IND_N},{PPI,MOVY_NOPX,HEX_1,HEX_1}, arch_sh4al_dsp_up},
/* nnmm010010 movy.w <DSP_REG_AY>,@<REG_Ayx>+ */{"movy.w",{DSP_REG_AY,AYX_INC_N},{PPI,MOVY_NOPX,HEX_1,HEX_2}, arch_sh4al_dsp_up},
-/* nnmm010011 movy.w <DSP_REG_AY>,@<REG_Ayx>+r8 */{"movy.w",{DSP_REG_AY,AYX_PMOD_N},{PPI,MOVY_NOPX,HEX_1,HEX_3}, arch_sh4al_dsp_up},
+/* nnmm010011 movy.w <DSP_REG_AY>,@<REG_Ayx>+r9 */{"movy.w",{DSP_REG_AY,AYX_PMOD_N},{PPI,MOVY_NOPX,HEX_1,HEX_3}, arch_sh4al_dsp_up},
/* nnmm100001 movy.l @<REG_Ayx>,<DSP_REG_YX> */ {"movy.l",{AYX_IND_N,DSP_REG_YX},{PPI,MOVY_NOPX,HEX_2,HEX_1}, arch_sh4al_dsp_up},
/* nnmm100010 movy.l @<REG_Ayx>+,<DSP_REG_YX> */{"movy.l",{AYX_INC_N,DSP_REG_YX},{PPI,MOVY_NOPX,HEX_2,HEX_2}, arch_sh4al_dsp_up},
-/* nnmm100011 movy.l @<REG_Ayx>+r8,<DSP_REG_YX> */{"movy.l",{AYX_PMOD_N,DSP_REG_YX},{PPI,MOVY_NOPX,HEX_2,HEX_3}, arch_sh4al_dsp_up},
+/* nnmm100011 movy.l @<REG_Ayx>+r9,<DSP_REG_YX> */{"movy.l",{AYX_PMOD_N,DSP_REG_YX},{PPI,MOVY_NOPX,HEX_2,HEX_3}, arch_sh4al_dsp_up},
/* nnmm110001 movy.l <DSP_REG_AY>,@<REG_Ayx> */ {"movy.l",{DSP_REG_AY,AYX_IND_N},{PPI,MOVY_NOPX,HEX_3,HEX_1}, arch_sh4al_dsp_up},
/* nnmm110010 movy.l <DSP_REG_AY>,@<REG_Ayx>+ */{"movy.l",{DSP_REG_AY,AYX_INC_N},{PPI,MOVY_NOPX,HEX_3,HEX_2}, arch_sh4al_dsp_up},
-/* nnmm110011 movy.l <DSP_REG_AY>,@<REG_Ayx>+r8 */{"movy.l",{DSP_REG_AY,AYX_PMOD_N},{PPI,MOVY_NOPX,HEX_3,HEX_3}, arch_sh4al_dsp_up},
+/* nnmm110011 movy.l <DSP_REG_AY>,@<REG_Ayx>+r9 */{"movy.l",{DSP_REG_AY,AYX_PMOD_N},{PPI,MOVY_NOPX,HEX_3,HEX_3}, arch_sh4al_dsp_up},
/* 01aaeeffxxyyggnn pmuls Se,Sf,Dg */ {"pmuls",{DSP_REG_E,DSP_REG_F,DSP_REG_G},{PPI,PMUL}, arch_sh_dsp_up},
/* 10100000xxyynnnn psubc <DSP_REG_X>,<DSP_REG_Y>,<DSP_REG_N> */
@@ -844,23 +1030,23 @@ const sh_opcode_info sh_table[] =
{"pswap", {DSP_REG_Y,DSP_REG_N},{PPI,PPIC,HEX_B,HEX_D,HEX_4}, arch_sh4al_dsp_up},
/* 1111nnnn01011101 fabs <F_REG_N> */{"fabs",{F_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh2e_up},
-/* 1111nnn001011101 fabs <D_REG_N> */{"fabs",{D_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh4_up},
+/* 1111nnn001011101 fabs <D_REG_N> */{"fabs",{D_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm0000 fadd <F_REG_M>,<F_REG_N>*/{"fadd",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh2e_up},
-/* 1111nnn0mmm00000 fadd <D_REG_M>,<D_REG_N>*/{"fadd",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh4_up},
+/* 1111nnn0mmm00000 fadd <D_REG_M>,<D_REG_N>*/{"fadd",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_0}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm0100 fcmp/eq <F_REG_M>,<F_REG_N>*/{"fcmp/eq",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh2e_up},
-/* 1111nnn0mmm00100 fcmp/eq <D_REG_M>,<D_REG_N>*/{"fcmp/eq",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh4_up},
+/* 1111nnn0mmm00100 fcmp/eq <D_REG_M>,<D_REG_N>*/{"fcmp/eq",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_4}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm0101 fcmp/gt <F_REG_M>,<F_REG_N>*/{"fcmp/gt",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh2e_up},
-/* 1111nnn0mmm00101 fcmp/gt <D_REG_M>,<D_REG_N>*/{"fcmp/gt",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh4_up},
+/* 1111nnn0mmm00101 fcmp/gt <D_REG_M>,<D_REG_N>*/{"fcmp/gt",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_5}, arch_sh2a_or_sh4_up},
-/* 1111nnn010111101 fcnvds <D_REG_N>,FPUL*/{"fcnvds",{D_REG_N,FPUL_M},{HEX_F,REG_N_D,HEX_B,HEX_D}, arch_sh4_up},
+/* 1111nnn010111101 fcnvds <D_REG_N>,FPUL*/{"fcnvds",{D_REG_N,FPUL_M},{HEX_F,REG_N_D,HEX_B,HEX_D}, arch_sh2a_or_sh4_up},
-/* 1111nnn010101101 fcnvsd FPUL,<D_REG_N>*/{"fcnvsd",{FPUL_M,D_REG_N},{HEX_F,REG_N_D,HEX_A,HEX_D}, arch_sh4_up},
+/* 1111nnn010101101 fcnvsd FPUL,<D_REG_N>*/{"fcnvsd",{FPUL_M,D_REG_N},{HEX_F,REG_N_D,HEX_A,HEX_D}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm0011 fdiv <F_REG_M>,<F_REG_N>*/{"fdiv",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh2e_up},
-/* 1111nnn0mmm00011 fdiv <D_REG_M>,<D_REG_N>*/{"fdiv",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh4_up},
+/* 1111nnn0mmm00011 fdiv <D_REG_M>,<D_REG_N>*/{"fdiv",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_3}, arch_sh2a_or_sh4_up},
/* 1111nnmm11101101 fipr <V_REG_M>,<V_REG_N>*/{"fipr",{V_REG_M,V_REG_N},{HEX_F,REG_NM,HEX_E,HEX_D}, arch_sh4_up},
@@ -871,42 +1057,41 @@ const sh_opcode_info sh_table[] =
/* 1111nnnn00011101 flds <F_REG_N>,FPUL*/{"flds",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_1,HEX_D}, arch_sh2e_up},
/* 1111nnnn00101101 float FPUL,<F_REG_N>*/{"float",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh2e_up},
-/* 1111nnn000101101 float FPUL,<D_REG_N>*/{"float",{FPUL_M,D_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh4_up},
+/* 1111nnn000101101 float FPUL,<D_REG_N>*/{"float",{FPUL_M,D_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm1110 fmac FR0,<F_REG_M>,<F_REG_N>*/{"fmac",{F_FR0,F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_E}, arch_sh2e_up},
/* 1111nnnnmmmm1100 fmov <F_REG_M>,<F_REG_N>*/{"fmov",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh2e_up},
-/* 1111nnn1mmmm1100 fmov <DX_REG_M>,<DX_REG_N>*/{"fmov",{DX_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh4_up},
+/* 1111nnn1mmmm1100 fmov <DX_REG_M>,<DX_REG_N>*/{"fmov",{DX_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_C}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm1000 fmov @<REG_M>,<F_REG_N>*/{"fmov",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh2e_up},
-/* 1111nnn1mmmm1000 fmov @<REG_M>,<DX_REG_N>*/{"fmov",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up},
+/* 1111nnn1mmmm1000 fmov @<REG_M>,<DX_REG_N>*/{"fmov",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm1010 fmov <F_REG_M>,@<REG_N>*/{"fmov",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh2e_up},
-/* 1111nnnnmmm11010 fmov <DX_REG_M>,@<REG_N>*/{"fmov",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh4_up},
+/* 1111nnnnmmm11010 fmov <DX_REG_M>,@<REG_N>*/{"fmov",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm1001 fmov @<REG_M>+,<F_REG_N>*/{"fmov",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh2e_up},
-/* 1111nnn1mmmm1001 fmov @<REG_M>+,<DX_REG_N>*/{"fmov",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh4_up},
+/* 1111nnn1mmmm1001 fmov @<REG_M>+,<DX_REG_N>*/{"fmov",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm1011 fmov <F_REG_M>,@-<REG_N>*/{"fmov",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh2e_up},
-/* 1111nnnnmmm11011 fmov <DX_REG_M>,@-<REG_N>*/{"fmov",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh4_up},
+/* 1111nnnnmmm11011 fmov <DX_REG_M>,@-<REG_N>*/{"fmov",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm0110 fmov @(R0,<REG_M>),<F_REG_N>*/{"fmov",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh2e_up},
-/* 1111nnn1mmmm0110 fmov @(R0,<REG_M>),<DX_REG_N>*/{"fmov",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh4_up},
+/* 1111nnn1mmmm0110 fmov @(R0,<REG_M>),<DX_REG_N>*/{"fmov",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh2a_or_sh4_up},
/* 1111nnnnmmmm0111 fmov <F_REG_M>,@(R0,<REG_N>)*/{"fmov",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh2e_up},
-/* 1111nnnnmmm10111 fmov <DX_REG_M>,@(R0,<REG_N>)*/{"fmov",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up},
-
-/* 1111nnn1mmmm1000 fmov.d @<REG_M>,<DX_REG_N>*/{"fmov.d",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh4_up},
-
-/* 1111nnnnmmm11010 fmov.d <DX_REG_M>,@<REG_N>*/{"fmov.d",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh4_up},
-
-/* 1111nnn1mmmm1001 fmov.d @<REG_M>+,<DX_REG_N>*/{"fmov.d",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh4_up},
-
-/* 1111nnnnmmm11011 fmov.d <DX_REG_M>,@-<REG_N>*/{"fmov.d",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh4_up},
-
-/* 1111nnn1mmmm0110 fmov.d @(R0,<REG_M>),<DX_REG_N>*/{"fmov.d",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh4_up},
-
-/* 1111nnnnmmm10111 fmov.d <DX_REG_M>,@(R0,<REG_N>)*/{"fmov.d",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh4_up},
+/* 1111nnnnmmm10111 fmov <DX_REG_M>,@(R0,<REG_N>)*/{"fmov",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh2a_or_sh4_up},
+
+/* 1111nnn1mmmm1000 fmov.d @<REG_M>,<DX_REG_N>*/{"fmov.d",{A_IND_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh2a_or_sh4_up},
+/* 1111nnnnmmm11010 fmov.d <DX_REG_M>,@<REG_N>*/{"fmov.d",{DX_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}, arch_sh2a_or_sh4_up},
+/* 1111nnn1mmmm1001 fmov.d @<REG_M>+,<DX_REG_N>*/{"fmov.d",{A_INC_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_9}, arch_sh2a_or_sh4_up},
+/* 1111nnnnmmm11011 fmov.d <DX_REG_M>,@-<REG_N>*/{"fmov.d",{DX_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}, arch_sh2a_or_sh4_up},
+/* 1111nnn1mmmm0110 fmov.d @(R0,<REG_M>),<DX_REG_N>*/{"fmov.d",{A_IND_R0_REG_M,DX_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh2a_or_sh4_up},
+/* 1111nnnnmmm10111 fmov.d <DX_REG_M>,@(R0,<REG_N>)*/{"fmov.d",{DX_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh2a_or_sh4_up},
+/* 0011nnnnmmmm0001 0011dddddddddddd fmov.d <DX_REG_M>,@(<DISP12>,<REG_N>) */
+{"fmov.d",{DX_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_3,DISP1_12BY8}, arch_sh2a_up | arch_op32},
+/* 0011nnnnmmmm0001 0111dddddddddddd fmov.d @(<DISP12>,<REG_M>),<DX_REG_N> */
+{"fmov.d",{A_DISP_REG_M,DX_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_7,DISP0_12BY8}, arch_sh2a_up | arch_op32},
/* 1111nnnnmmmm1000 fmov.s @<REG_M>,<F_REG_N>*/{"fmov.s",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}, arch_sh2e_up},
@@ -919,12 +1104,16 @@ const sh_opcode_info sh_table[] =
/* 1111nnnnmmmm0110 fmov.s @(R0,<REG_M>),<F_REG_N>*/{"fmov.s",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}, arch_sh2e_up},
/* 1111nnnnmmmm0111 fmov.s <F_REG_M>,@(R0,<REG_N>)*/{"fmov.s",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}, arch_sh2e_up},
+/* 0011nnnnmmmm0001 0011dddddddddddd fmov.s <F_REG_M>,@(<DISP12>,<REG_N>) */
+{"fmov.s",{F_REG_M,A_DISP_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_3,DISP1_12BY4}, arch_sh2a_up | arch_op32},
+/* 0011nnnnmmmm0001 0111dddddddddddd fmov.s @(<DISP12>,<REG_M>),<F_REG_N> */
+{"fmov.s",{A_DISP_REG_M,F_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_7,DISP0_12BY4}, arch_sh2a_up | arch_op32},
/* 1111nnnnmmmm0010 fmul <F_REG_M>,<F_REG_N>*/{"fmul",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh2e_up},
-/* 1111nnn0mmm00010 fmul <D_REG_M>,<D_REG_N>*/{"fmul",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh4_up},
+/* 1111nnn0mmm00010 fmul <D_REG_M>,<D_REG_N>*/{"fmul",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_2}, arch_sh2a_or_sh4_up},
/* 1111nnnn01001101 fneg <F_REG_N> */{"fneg",{F_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh2e_up},
-/* 1111nnn001001101 fneg <D_REG_N> */{"fneg",{D_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh4_up},
+/* 1111nnn001001101 fneg <D_REG_N> */{"fneg",{D_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}, arch_sh2a_or_sh4_up},
/* 1111011111111101 fpchg */{"fpchg",{0},{HEX_F,HEX_7,HEX_F,HEX_D}, arch_sh4a_up},
@@ -932,23 +1121,77 @@ const sh_opcode_info sh_table[] =
/* 1111nnn011111101 fsca FPUL,<D_REG_N> */{"fsca",{FPUL_M,D_REG_N},{HEX_F,REG_N_D,HEX_F,HEX_D}, arch_sh4_up},
-/* 1111001111111101 fschg */{"fschg",{0},{HEX_F,HEX_3,HEX_F,HEX_D}, arch_sh4_up},
+/* 1111001111111101 fschg */{"fschg",{0},{HEX_F,HEX_3,HEX_F,HEX_D}, arch_sh2a_or_sh4_up},
-/* 1111nnnn01101101 fsqrt <F_REG_N> */{"fsqrt",{F_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh3e_up},
-/* 1111nnn001101101 fsqrt <D_REG_N> */{"fsqrt",{D_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh4_up},
+/* 1111nnnn01101101 fsqrt <F_REG_N> */{"fsqrt",{F_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh2a_or_sh3e_up},
+/* 1111nnn001101101 fsqrt <D_REG_N> */{"fsqrt",{D_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}, arch_sh2a_or_sh4_up},
/* 1111nnnn01111101 fsrra <F_REG_N> */{"fsrra",{F_REG_N},{HEX_F,REG_N,HEX_7,HEX_D}, arch_sh4_up},
/* 1111nnnn00001101 fsts FPUL,<F_REG_N>*/{"fsts",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_0,HEX_D}, arch_sh2e_up},
/* 1111nnnnmmmm0001 fsub <F_REG_M>,<F_REG_N>*/{"fsub",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh2e_up},
-/* 1111nnn0mmm00001 fsub <D_REG_M>,<D_REG_N>*/{"fsub",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh4_up},
+/* 1111nnn0mmm00001 fsub <D_REG_M>,<D_REG_N>*/{"fsub",{D_REG_M,D_REG_N},{HEX_F,REG_N,REG_M,HEX_1}, arch_sh2a_or_sh4_up},
/* 1111nnnn00111101 ftrc <F_REG_N>,FPUL*/{"ftrc",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh2e_up},
-/* 1111nnnn00111101 ftrc <D_REG_N>,FPUL*/{"ftrc",{D_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh4_up},
+/* 1111nnnn00111101 ftrc <D_REG_N>,FPUL*/{"ftrc",{D_REG_N,FPUL_M},{HEX_F,REG_N,HEX_3,HEX_D}, arch_sh2a_or_sh4_up},
/* 1111nn0111111101 ftrv XMTRX_M4,<V_REG_n>*/{"ftrv",{XMTRX_M4,V_REG_N},{HEX_F,REG_N_B01,HEX_F,HEX_D}, arch_sh4_up},
+ /* 10000110nnnn0iii bclr #<imm>, <REG_N> */ {"bclr",{A_IMM, A_REG_N},{HEX_8,HEX_6,REG_N,IMM0_3c}, arch_sh2a_nofpu_up},
+ /* 0011nnnn0iii1001 0000dddddddddddd bclr.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bclr.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_0,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+ /* 10000111nnnn1iii bld #<imm>, <REG_N> */ {"bld",{A_IMM, A_REG_N},{HEX_8,HEX_7,REG_N,IMM0_3s}, arch_sh2a_nofpu_up},
+ /* 0011nnnn0iii1001 0011dddddddddddd bld.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bld.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_3,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+ /* 10000110nnnn1iii bset #<imm>, <REG_N> */ {"bset",{A_IMM, A_REG_N},{HEX_8,HEX_6,REG_N,IMM0_3s}, arch_sh2a_nofpu_up},
+ /* 0011nnnn0iii1001 0001dddddddddddd bset.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bset.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_1,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+ /* 10000111nnnn0iii bst #<imm>, <REG_N> */ {"bst",{A_IMM, A_REG_N},{HEX_8,HEX_7,REG_N,IMM0_3c}, arch_sh2a_nofpu_up},
+ /* 0011nnnn0iii1001 0010dddddddddddd bst.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bst.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_2,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+ /* 0100nnnn10010001 clips.b <REG_N> */ {"clips.b",{A_REG_N},{HEX_4,REG_N,HEX_9,HEX_1}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10010101 clips.w <REG_N> */ {"clips.w",{A_REG_N},{HEX_4,REG_N,HEX_9,HEX_5}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10000001 clipu.b <REG_N> */ {"clipu.b",{A_REG_N},{HEX_4,REG_N,HEX_8,HEX_1}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10000101 clipu.w <REG_N> */ {"clipu.w",{A_REG_N},{HEX_4,REG_N,HEX_8,HEX_5}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10010100 divs R0,<REG_N> */ {"divs",{A_R0,A_REG_N},{HEX_4,REG_N,HEX_9,HEX_4}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10000100 divu R0,<REG_N> */ {"divu",{A_R0,A_REG_N},{HEX_4,REG_N,HEX_8,HEX_4}, arch_sh2a_nofpu_up},
+ /* 0100mmmm01001011 jsr/n @<REG_M> */ {"jsr/n",{A_IND_M},{HEX_4,REG_M,HEX_4,HEX_B}, arch_sh2a_nofpu_up},
+ /* 10000011dddddddd jsr/n @@(<disp>,TBR) */ {"jsr/n",{A_DISP2_TBR},{HEX_8,HEX_3,IMM0_8BY4}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11100101 ldbank @<REG_M>,R0 */ {"ldbank",{A_IND_M,A_R0},{HEX_4,REG_M,HEX_E,HEX_5}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11110001 movml.l <REG_M>,@-R15 */ {"movml.l",{A_REG_M,A_DEC_R15},{HEX_4,REG_M,HEX_F,HEX_1}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11110101 movml.l @R15+,<REG_M> */ {"movml.l",{A_INC_R15,A_REG_M},{HEX_4,REG_M,HEX_F,HEX_5}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11110000 movml.l <REG_M>,@-R15 */ {"movmu.l",{A_REG_M,A_DEC_R15},{HEX_4,REG_M,HEX_F,HEX_0}, arch_sh2a_nofpu_up},
+ /* 0100mmmm11110100 movml.l @R15+,<REG_M> */ {"movmu.l",{A_INC_R15,A_REG_M},{HEX_4,REG_M,HEX_F,HEX_4}, arch_sh2a_nofpu_up},
+ /* 0000nnnn00111001 movrt <REG_N> */ {"movrt",{A_REG_N},{HEX_0,REG_N,HEX_3,HEX_9}, arch_sh2a_nofpu_up},
+ /* 0100nnnn10000000 mulr R0,<REG_N> */ {"mulr",{A_R0,A_REG_N},{HEX_4,REG_N,HEX_8,HEX_0}, arch_sh2a_nofpu_up},
+ /* 0000000001101000 nott */ {"nott",{A_END},{HEX_0,HEX_0,HEX_6,HEX_8}, arch_sh2a_nofpu_up},
+ /* 0000000001011011 resbank */ {"resbank",{A_END},{HEX_0,HEX_0,HEX_5,HEX_B}, arch_sh2a_nofpu_up},
+ /* 0000000001101011 rts/n */ {"rts/n",{A_END},{HEX_0,HEX_0,HEX_6,HEX_B}, arch_sh2a_nofpu_up},
+ /* 0000mmmm01111011 rtv/n <REG_M>*/ {"rtv/n",{A_REG_M},{HEX_0,REG_M,HEX_7,HEX_B}, arch_sh2a_nofpu_up},
+ /* 0100nnnn11100001 stbank R0,@<REG_N>*/ {"stbank",{A_R0,A_IND_N},{HEX_4,REG_N,HEX_E,HEX_1}, arch_sh2a_nofpu_up},
+
+/* 0011nnnn0iii1001 0100dddddddddddd band.b #<imm>,@(<DISP12>,<REG_N>) */
+{"band.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_4,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 1100dddddddddddd bandnot.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bandnot.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_C,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 1011dddddddddddd bldnot.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bldnot.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_B,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 0101dddddddddddd bor.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bor.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_5,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 1101dddddddddddd bornot.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bornot.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_D,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnn0iii1001 0110dddddddddddd bxor.b #<imm>,@(<DISP12>,<REG_N>) */
+{"bxor.b",{A_IMM,A_DISP_REG_N},{HEX_3,REG_N,IMM0_3Uc,HEX_9,HEX_6,DISP1_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0000nnnniiii0000 iiiiiiiiiiiiiiii movi20 #<imm>,<REG_N> */
+{"movi20",{A_IMM,A_REG_N},{HEX_0,REG_N,IMM0_20_4,HEX_0,IMM0_20}, arch_sh2a_nofpu_up | arch_op32},
+/* 0000nnnniiii0001 iiiiiiiiiiiiiiii movi20s #<imm>,<REG_N> */
+{"movi20s",{A_IMM,A_REG_N},{HEX_0,REG_N,IMM0_20_4,HEX_1,IMM0_20BY8}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 1000dddddddddddd movu.b @(<DISP12>,<REG_M>),<REG_N> */
+{"movu.b",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_8,DISP0_12}, arch_sh2a_nofpu_up | arch_op32},
+/* 0011nnnnmmmm0001 1001dddddddddddd movu.w @(<DISP12>,<REG_M>),<REG_N> */
+{"movu.w",{A_DISP_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_1,HEX_9,DISP0_12BY2}, arch_sh2a_nofpu_up | arch_op32},
+
{ 0, {0}, {0}, 0 }
};
diff --git a/contrib/binutils/opcodes/sparc-dis.c b/contrib/binutils/opcodes/sparc-dis.c
index 6f360c66051b..bfa7ea29931e 100644
--- a/contrib/binutils/opcodes/sparc-dis.c
+++ b/contrib/binutils/opcodes/sparc-dis.c
@@ -1,6 +1,6 @@
/* Print SPARC instructions.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2000, 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
@@ -14,7 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#include <stdio.h>
@@ -34,7 +35,7 @@
#define V9_P(insn) (((insn)->architecture & MASK_V9) != 0)
/* The sorted opcode table. */
-static const struct sparc_opcode **sorted_opcodes;
+static const sparc_opcode **sorted_opcodes;
/* For faster lookup, after insns are sorted they are hashed. */
/* ??? I think there is room for even more improvement. */
@@ -46,18 +47,13 @@ static const struct sparc_opcode **sorted_opcodes;
static int opcode_bits[4] = { 0x01c00000, 0x0, 0x01f80000, 0x01f80000 };
#define HASH_INSN(INSN) \
((((INSN) >> 24) & 0xc0) | (((INSN) & opcode_bits[((INSN) >> 30) & 3]) >> 19))
-struct opcode_hash
+typedef struct sparc_opcode_hash
{
- struct opcode_hash *next;
- const struct sparc_opcode *opcode;
-};
-static struct opcode_hash *opcode_hash_table[HASH_SIZE];
+ struct sparc_opcode_hash *next;
+ const sparc_opcode *opcode;
+} sparc_opcode_hash;
-static void build_hash_table
- PARAMS ((const struct sparc_opcode **, struct opcode_hash **, int));
-static int is_delayed_branch PARAMS ((unsigned long));
-static int compare_opcodes PARAMS ((const PTR, const PTR));
-static int compute_arch_mask PARAMS ((unsigned long));
+static sparc_opcode_hash *opcode_hash_table[HASH_SIZE];
/* Sign-extend a value which is N bits long. */
#define SEX(value, bits) \
@@ -65,16 +61,16 @@ static int compute_arch_mask PARAMS ((unsigned long));
>> ((8 * sizeof (int)) - bits) )
static char *reg_names[] =
-{ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
- "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
- "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
- "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
- "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
+{ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
+ "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
+ "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
+ "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
+ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
+ "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
- "f32", "f33", "f34", "f35", "f36", "f37", "f38", "f39",
- "f40", "f41", "f42", "f43", "f44", "f45", "f46", "f47",
+ "f32", "f33", "f34", "f35", "f36", "f37", "f38", "f39",
+ "f40", "f41", "f42", "f43", "f44", "f45", "f46", "f47",
"f48", "f49", "f50", "f51", "f52", "f53", "f54", "f55",
"f56", "f57", "f58", "f59", "f60", "f61", "f62", "f63",
/* psr, wim, tbr, fpsr, cpsr are v8 only. */
@@ -89,11 +85,22 @@ static char *v9_priv_reg_names[] =
{
"tpc", "tnpc", "tstate", "tt", "tick", "tba", "pstate", "tl",
"pil", "cwp", "cansave", "canrestore", "cleanwin", "otherwin",
- "wstate", "fq"
+ "wstate", "fq", "gl"
/* "ver" - special cased */
};
/* These are ordered according to there register number in
+ rdhpr and wrhpr insns. */
+static char *v9_hpriv_reg_names[] =
+{
+ "hpstate", "htstate", "resv2", "hintp", "resv4", "htba", "hver",
+ "resv7", "resv8", "resv9", "resv10", "resv11", "resv12", "resv13",
+ "resv14", "resv15", "resv16", "resv17", "resv18", "resv19", "resv20",
+ "resv21", "resv22", "resv23", "resv24", "resv25", "resv26", "resv27",
+ "resv28", "resv29", "resv30", "hstick_cmpr"
+};
+
+/* These are ordered according to there register number in
rd and wr insns (-16). */
static char *v9a_asr_reg_names[] =
{
@@ -104,21 +111,21 @@ static char *v9a_asr_reg_names[] =
/* Macros used to extract instruction fields. Not all fields have
macros defined here, only those which are actually used. */
-#define X_RD(i) (((i) >> 25) & 0x1f)
-#define X_RS1(i) (((i) >> 14) & 0x1f)
-#define X_LDST_I(i) (((i) >> 13) & 1)
-#define X_ASI(i) (((i) >> 5) & 0xff)
-#define X_RS2(i) (((i) >> 0) & 0x1f)
-#define X_IMM(i,n) (((i) >> 0) & ((1 << (n)) - 1))
-#define X_SIMM(i,n) SEX (X_IMM ((i), (n)), (n))
-#define X_DISP22(i) (((i) >> 0) & 0x3fffff)
-#define X_IMM22(i) X_DISP22 (i)
-#define X_DISP30(i) (((i) >> 0) & 0x3fffffff)
+#define X_RD(i) (((i) >> 25) & 0x1f)
+#define X_RS1(i) (((i) >> 14) & 0x1f)
+#define X_LDST_I(i) (((i) >> 13) & 1)
+#define X_ASI(i) (((i) >> 5) & 0xff)
+#define X_RS2(i) (((i) >> 0) & 0x1f)
+#define X_IMM(i,n) (((i) >> 0) & ((1 << (n)) - 1))
+#define X_SIMM(i,n) SEX (X_IMM ((i), (n)), (n))
+#define X_DISP22(i) (((i) >> 0) & 0x3fffff)
+#define X_IMM22(i) X_DISP22 (i)
+#define X_DISP30(i) (((i) >> 0) & 0x3fffffff)
/* These are for v9. */
-#define X_DISP16(i) (((((i) >> 20) & 3) << 14) | (((i) >> 0) & 0x3fff))
-#define X_DISP19(i) (((i) >> 0) & 0x7ffff)
-#define X_MEMBAR(i) ((i) & 0x7f)
+#define X_DISP16(i) (((((i) >> 20) & 3) << 14) | (((i) >> 0) & 0x3fff))
+#define X_DISP19(i) (((i) >> 0) & 0x7ffff)
+#define X_MEMBAR(i) ((i) & 0x7f)
/* Here is the union which was used to extract instruction fields
before the shift and mask macros were written.
@@ -176,23 +183,22 @@ static char *v9a_asr_reg_names[] =
unsigned int adisp30:30;
#define disp30 call.adisp30
} call;
- };
-
- */
+ }; */
/* Nonzero if INSN is the opcode for a delayed branch. */
+
static int
-is_delayed_branch (insn)
- unsigned long insn;
+is_delayed_branch (unsigned long insn)
{
- struct opcode_hash *op;
+ sparc_opcode_hash *op;
for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next)
{
- const struct sparc_opcode *opcode = op->opcode;
+ const sparc_opcode *opcode = op->opcode;
+
if ((opcode->match & insn) == opcode->match
&& (opcode->lose & insn) == 0)
- return (opcode->flags & F_DELAYED);
+ return opcode->flags & F_DELAYED;
}
return 0;
}
@@ -203,6 +209,236 @@ is_delayed_branch (insn)
to compare_opcodes. */
static unsigned int current_arch_mask;
+/* Given BFD mach number, return a mask of SPARC_OPCODE_ARCH_FOO values. */
+
+static int
+compute_arch_mask (unsigned long mach)
+{
+ switch (mach)
+ {
+ case 0 :
+ case bfd_mach_sparc :
+ return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V8);
+ case bfd_mach_sparc_sparclet :
+ return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLET);
+ case bfd_mach_sparc_sparclite :
+ case bfd_mach_sparc_sparclite_le :
+ /* sparclites insns are recognized by default (because that's how
+ they've always been treated, for better or worse). Kludge this by
+ indicating generic v8 is also selected. */
+ return (SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLITE)
+ | SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V8));
+ case bfd_mach_sparc_v8plus :
+ case bfd_mach_sparc_v9 :
+ return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9);
+ case bfd_mach_sparc_v8plusa :
+ case bfd_mach_sparc_v9a :
+ return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9A);
+ case bfd_mach_sparc_v8plusb :
+ case bfd_mach_sparc_v9b :
+ return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9B);
+ }
+ abort ();
+}
+
+/* Compare opcodes A and B. */
+
+static int
+compare_opcodes (const void * a, const void * b)
+{
+ sparc_opcode *op0 = * (sparc_opcode **) a;
+ sparc_opcode *op1 = * (sparc_opcode **) b;
+ unsigned long int match0 = op0->match, match1 = op1->match;
+ unsigned long int lose0 = op0->lose, lose1 = op1->lose;
+ register unsigned int i;
+
+ /* If one (and only one) insn isn't supported by the current architecture,
+ prefer the one that is. If neither are supported, but they're both for
+ the same architecture, continue processing. Otherwise (both unsupported
+ and for different architectures), prefer lower numbered arch's (fudged
+ by comparing the bitmasks). */
+ if (op0->architecture & current_arch_mask)
+ {
+ if (! (op1->architecture & current_arch_mask))
+ return -1;
+ }
+ else
+ {
+ if (op1->architecture & current_arch_mask)
+ return 1;
+ else if (op0->architecture != op1->architecture)
+ return op0->architecture - op1->architecture;
+ }
+
+ /* If a bit is set in both match and lose, there is something
+ wrong with the opcode table. */
+ if (match0 & lose0)
+ {
+ fprintf
+ (stderr,
+ /* xgettext:c-format */
+ _("Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
+ op0->name, match0, lose0);
+ op0->lose &= ~op0->match;
+ lose0 = op0->lose;
+ }
+
+ if (match1 & lose1)
+ {
+ fprintf
+ (stderr,
+ /* xgettext:c-format */
+ _("Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
+ op1->name, match1, lose1);
+ op1->lose &= ~op1->match;
+ lose1 = op1->lose;
+ }
+
+ /* Because the bits that are variable in one opcode are constant in
+ another, it is important to order the opcodes in the right order. */
+ for (i = 0; i < 32; ++i)
+ {
+ unsigned long int x = 1 << i;
+ int x0 = (match0 & x) != 0;
+ int x1 = (match1 & x) != 0;
+
+ if (x0 != x1)
+ return x1 - x0;
+ }
+
+ for (i = 0; i < 32; ++i)
+ {
+ unsigned long int x = 1 << i;
+ int x0 = (lose0 & x) != 0;
+ int x1 = (lose1 & x) != 0;
+
+ if (x0 != x1)
+ return x1 - x0;
+ }
+
+ /* They are functionally equal. So as long as the opcode table is
+ valid, we can put whichever one first we want, on aesthetic grounds. */
+
+ /* Our first aesthetic ground is that aliases defer to real insns. */
+ {
+ int alias_diff = (op0->flags & F_ALIAS) - (op1->flags & F_ALIAS);
+
+ if (alias_diff != 0)
+ /* Put the one that isn't an alias first. */
+ return alias_diff;
+ }
+
+ /* Except for aliases, two "identical" instructions had
+ better have the same opcode. This is a sanity check on the table. */
+ i = strcmp (op0->name, op1->name);
+ if (i)
+ {
+ if (op0->flags & F_ALIAS) /* If they're both aliases, be arbitrary. */
+ return i;
+ else
+ fprintf (stderr,
+ /* xgettext:c-format */
+ _("Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"),
+ op0->name, op1->name);
+ }
+
+ /* Fewer arguments are preferred. */
+ {
+ int length_diff = strlen (op0->args) - strlen (op1->args);
+
+ if (length_diff != 0)
+ /* Put the one with fewer arguments first. */
+ return length_diff;
+ }
+
+ /* Put 1+i before i+1. */
+ {
+ char *p0 = (char *) strchr (op0->args, '+');
+ char *p1 = (char *) strchr (op1->args, '+');
+
+ if (p0 && p1)
+ {
+ /* There is a plus in both operands. Note that a plus
+ sign cannot be the first character in args,
+ so the following [-1]'s are valid. */
+ if (p0[-1] == 'i' && p1[1] == 'i')
+ /* op0 is i+1 and op1 is 1+i, so op1 goes first. */
+ return 1;
+ if (p0[1] == 'i' && p1[-1] == 'i')
+ /* op0 is 1+i and op1 is i+1, so op0 goes first. */
+ return -1;
+ }
+ }
+
+ /* Put 1,i before i,1. */
+ {
+ int i0 = strncmp (op0->args, "i,1", 3) == 0;
+ int i1 = strncmp (op1->args, "i,1", 3) == 0;
+
+ if (i0 ^ i1)
+ return i0 - i1;
+ }
+
+ /* They are, as far as we can tell, identical.
+ Since qsort may have rearranged the table partially, there is
+ no way to tell which one was first in the opcode table as
+ written, so just say there are equal. */
+ /* ??? This is no longer true now that we sort a vector of pointers,
+ not the table itself. */
+ return 0;
+}
+
+/* Build a hash table from the opcode table.
+ OPCODE_TABLE is a sorted list of pointers into the opcode table. */
+
+static void
+build_hash_table (const sparc_opcode **opcode_table,
+ sparc_opcode_hash **hash_table,
+ int num_opcodes)
+{
+ int i;
+ int hash_count[HASH_SIZE];
+ static sparc_opcode_hash *hash_buf = NULL;
+
+ /* Start at the end of the table and work backwards so that each
+ chain is sorted. */
+
+ memset (hash_table, 0, HASH_SIZE * sizeof (hash_table[0]));
+ memset (hash_count, 0, HASH_SIZE * sizeof (hash_count[0]));
+ if (hash_buf != NULL)
+ free (hash_buf);
+ hash_buf = xmalloc (sizeof (* hash_buf) * num_opcodes);
+ for (i = num_opcodes - 1; i >= 0; --i)
+ {
+ int hash = HASH_INSN (opcode_table[i]->match);
+ sparc_opcode_hash *h = &hash_buf[i];
+
+ h->next = hash_table[hash];
+ h->opcode = opcode_table[i];
+ hash_table[hash] = h;
+ ++hash_count[hash];
+ }
+
+#if 0 /* for debugging */
+ {
+ int min_count = num_opcodes, max_count = 0;
+ int total;
+
+ for (i = 0; i < HASH_SIZE; ++i)
+ {
+ if (hash_count[i] < min_count)
+ min_count = hash_count[i];
+ if (hash_count[i] > max_count)
+ max_count = hash_count[i];
+ total += hash_count[i];
+ }
+
+ printf ("Opcode hash table stats: min %d, max %d, ave %f\n",
+ min_count, max_count, (double) total / HASH_SIZE);
+ }
+#endif
+}
+
/* Print one instruction from MEMADDR on INFO->STREAM.
We suffix the instruction with a comment that gives the absolute
@@ -212,14 +448,12 @@ static unsigned int current_arch_mask;
on that register. */
int
-print_insn_sparc (memaddr, info)
- bfd_vma memaddr;
- disassemble_info *info;
+print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
{
FILE *stream = info->stream;
bfd_byte buffer[4];
unsigned long insn;
- register struct opcode_hash *op;
+ sparc_opcode_hash *op;
/* Nonzero of opcode table has been initialized. */
static int opcodes_initialized = 0;
/* bfd mach number of last call. */
@@ -234,8 +468,8 @@ print_insn_sparc (memaddr, info)
current_arch_mask = compute_arch_mask (info->mach);
if (!opcodes_initialized)
- sorted_opcodes = (const struct sparc_opcode **)
- xmalloc (sparc_num_opcodes * sizeof (struct sparc_opcode *));
+ sorted_opcodes =
+ xmalloc (sparc_num_opcodes * sizeof (sparc_opcode *));
/* Reset the sorted table so we can resort it. */
for (i = 0; i < sparc_num_opcodes; ++i)
sorted_opcodes[i] = &sparc_opcodes[i];
@@ -250,6 +484,7 @@ print_insn_sparc (memaddr, info)
{
int status =
(*info->read_memory_func) (memaddr, buffer, sizeof (buffer), info);
+
if (status != 0)
{
(*info->memory_error_func) (status, memaddr, info);
@@ -273,7 +508,7 @@ print_insn_sparc (memaddr, info)
for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next)
{
- const struct sparc_opcode *opcode = op->opcode;
+ const sparc_opcode *opcode = op->opcode;
/* If the insn isn't supported by the current architecture, skip it. */
if (! (opcode->architecture & current_arch_mask))
@@ -290,7 +525,7 @@ print_insn_sparc (memaddr, info)
/* Nonzero means that we have found a plus sign in the args
field of the opcode table. */
int found_plus = 0;
-
+
/* Nonzero means we have an annulled branch. */
int is_annulled = 0;
@@ -313,7 +548,7 @@ print_insn_sparc (memaddr, info)
(*info->fprintf_func) (stream, opcode->name);
{
- register const char *s;
+ const char *s;
if (opcode->args[0] != ',')
(*info->fprintf_func) (stream, " ");
@@ -347,13 +582,13 @@ print_insn_sparc (memaddr, info)
}
(*info->fprintf_func) (stream, " ");
-
+
switch (*s)
{
case '+':
found_plus = 1;
+ /* Fall through. */
- /* note fall-through */
default:
(*info->fprintf_func) (stream, "%c", *s);
break;
@@ -383,24 +618,24 @@ print_insn_sparc (memaddr, info)
case 'e':
freg (X_RS1 (insn));
break;
- case 'v': /* double/even */
- case 'V': /* quad/multiple of 4 */
+ case 'v': /* Double/even. */
+ case 'V': /* Quad/multiple of 4. */
fregx (X_RS1 (insn));
break;
case 'f':
freg (X_RS2 (insn));
break;
- case 'B': /* double/even */
- case 'R': /* quad/multiple of 4 */
+ case 'B': /* Double/even. */
+ case 'R': /* Quad/multiple of 4. */
fregx (X_RS2 (insn));
break;
case 'g':
freg (X_RD (insn));
break;
- case 'H': /* double/even */
- case 'J': /* quad/multiple of 4 */
+ case 'H': /* Double/even. */
+ case 'J': /* Quad/multiple of 4. */
fregx (X_RD (insn));
break;
#undef freg
@@ -426,9 +661,9 @@ print_insn_sparc (memaddr, info)
& ((int) X_IMM22 (insn) << 10)));
break;
- case 'i': /* 13 bit immediate */
- case 'I': /* 11 bit immediate */
- case 'j': /* 10 bit immediate */
+ case 'i': /* 13 bit immediate. */
+ case 'I': /* 11 bit immediate. */
+ case 'j': /* 10 bit immediate. */
{
int imm;
@@ -448,7 +683,7 @@ print_insn_sparc (memaddr, info)
not before it. */
if (found_plus)
imm_added_to_rs1 = 1;
-
+
if (imm <= 9)
(*info->fprintf_func) (stream, "%d", imm);
else
@@ -456,8 +691,8 @@ print_insn_sparc (memaddr, info)
}
break;
- case 'X': /* 5 bit unsigned immediate */
- case 'Y': /* 6 bit unsigned immediate */
+ case 'X': /* 5 bit unsigned immediate. */
+ case 'Y': /* 6 bit unsigned immediate. */
{
int imm = X_IMM (insn, *s == 'X' ? 5 : 6);
@@ -469,7 +704,7 @@ print_insn_sparc (memaddr, info)
break;
case '3':
- (info->fprintf_func) (stream, "%d", X_IMM (insn, 3));
+ (info->fprintf_func) (stream, "%ld", X_IMM (insn, 3));
break;
case 'K':
@@ -532,7 +767,7 @@ print_insn_sparc (memaddr, info)
case 'o':
(*info->fprintf_func) (stream, "%%asi");
break;
-
+
case 'W':
(*info->fprintf_func) (stream, "%%tick");
break;
@@ -544,7 +779,7 @@ print_insn_sparc (memaddr, info)
case '?':
if (X_RS1 (insn) == 31)
(*info->fprintf_func) (stream, "%%ver");
- else if ((unsigned) X_RS1 (insn) < 16)
+ else if ((unsigned) X_RS1 (insn) < 17)
(*info->fprintf_func) (stream, "%%%s",
v9_priv_reg_names[X_RS1 (insn)]);
else
@@ -552,13 +787,29 @@ print_insn_sparc (memaddr, info)
break;
case '!':
- if ((unsigned) X_RD (insn) < 15)
+ if ((unsigned) X_RD (insn) < 17)
(*info->fprintf_func) (stream, "%%%s",
v9_priv_reg_names[X_RD (insn)]);
else
(*info->fprintf_func) (stream, "%%reserved");
break;
+ case '$':
+ if ((unsigned) X_RS1 (insn) < 32)
+ (*info->fprintf_func) (stream, "%%%s",
+ v9_hpriv_reg_names[X_RS1 (insn)]);
+ else
+ (*info->fprintf_func) (stream, "%%reserved");
+ break;
+
+ case '%':
+ if ((unsigned) X_RD (insn) < 32)
+ (*info->fprintf_func) (stream, "%%%s",
+ v9_hpriv_reg_names[X_RD (insn)]);
+ else
+ (*info->fprintf_func) (stream, "%%reserved");
+ break;
+
case '/':
if (X_RS1 (insn) < 16 || X_RS1 (insn) > 25)
(*info->fprintf_func) (stream, "%%reserved");
@@ -582,18 +833,18 @@ print_insn_sparc (memaddr, info)
if (name)
(*info->fprintf_func) (stream, "%s", name);
else
- (*info->fprintf_func) (stream, "%d", X_RD (insn));
+ (*info->fprintf_func) (stream, "%ld", X_RD (insn));
break;
}
-
+
case 'M':
- (*info->fprintf_func) (stream, "%%asr%d", X_RS1 (insn));
+ (*info->fprintf_func) (stream, "%%asr%ld", X_RS1 (insn));
break;
-
+
case 'm':
- (*info->fprintf_func) (stream, "%%asr%d", X_RD (insn));
+ (*info->fprintf_func) (stream, "%%asr%ld", X_RD (insn));
break;
-
+
case 'L':
info->target = memaddr + SEX (X_DISP30 (insn), 30) * 4;
(*info->print_address_func) (info->target, info);
@@ -616,7 +867,7 @@ print_insn_sparc (memaddr, info)
if (name)
(*info->fprintf_func) (stream, "%s", name);
else
- (*info->fprintf_func) (stream, "(%d)", X_ASI (insn));
+ (*info->fprintf_func) (stream, "(%ld)", X_ASI (insn));
break;
}
@@ -649,7 +900,7 @@ print_insn_sparc (memaddr, info)
break;
case 'x':
- (*info->fprintf_func) (stream, "%d",
+ (*info->fprintf_func) (stream, "%ld",
((X_LDST_I (insn) << 8)
+ X_ASI (insn)));
break;
@@ -725,7 +976,7 @@ print_insn_sparc (memaddr, info)
&& X_RD (prev_insn) == X_RS1 (insn))
{
(*info->fprintf_func) (stream, "\t! ");
- info->target =
+ info->target =
((unsigned) 0xFFFFFFFF
& ((int) X_IMM22 (prev_insn) << 10));
if (imm_added_to_rs1)
@@ -741,7 +992,7 @@ print_insn_sparc (memaddr, info)
if (opcode->flags & (F_UNBR|F_CONDBR|F_JSR))
{
- /* FIXME -- check is_annulled flag */
+ /* FIXME -- check is_annulled flag. */
if (opcode->flags & F_UNBR)
info->insn_type = dis_branch;
if (opcode->flags & F_CONDBR)
@@ -760,234 +1011,3 @@ print_insn_sparc (memaddr, info)
(*info->fprintf_func) (stream, _("unknown"));
return sizeof (buffer);
}
-
-/* Given BFD mach number, return a mask of SPARC_OPCODE_ARCH_FOO values. */
-
-static int
-compute_arch_mask (mach)
- unsigned long mach;
-{
- switch (mach)
- {
- case 0 :
- case bfd_mach_sparc :
- return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V8);
- case bfd_mach_sparc_sparclet :
- return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLET);
- case bfd_mach_sparc_sparclite :
- case bfd_mach_sparc_sparclite_le :
- /* sparclites insns are recognized by default (because that's how
- they've always been treated, for better or worse). Kludge this by
- indicating generic v8 is also selected. */
- return (SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLITE)
- | SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V8));
- case bfd_mach_sparc_v8plus :
- case bfd_mach_sparc_v9 :
- return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9);
- case bfd_mach_sparc_v8plusa :
- case bfd_mach_sparc_v9a :
- return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9A);
- case bfd_mach_sparc_v8plusb :
- case bfd_mach_sparc_v9b :
- return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9B);
- }
- abort ();
-}
-
-/* Compare opcodes A and B. */
-
-static int
-compare_opcodes (a, b)
- const PTR a;
- const PTR b;
-{
- struct sparc_opcode *op0 = * (struct sparc_opcode **) a;
- struct sparc_opcode *op1 = * (struct sparc_opcode **) b;
- unsigned long int match0 = op0->match, match1 = op1->match;
- unsigned long int lose0 = op0->lose, lose1 = op1->lose;
- register unsigned int i;
-
- /* If one (and only one) insn isn't supported by the current architecture,
- prefer the one that is. If neither are supported, but they're both for
- the same architecture, continue processing. Otherwise (both unsupported
- and for different architectures), prefer lower numbered arch's (fudged
- by comparing the bitmasks). */
- if (op0->architecture & current_arch_mask)
- {
- if (! (op1->architecture & current_arch_mask))
- return -1;
- }
- else
- {
- if (op1->architecture & current_arch_mask)
- return 1;
- else if (op0->architecture != op1->architecture)
- return op0->architecture - op1->architecture;
- }
-
- /* If a bit is set in both match and lose, there is something
- wrong with the opcode table. */
- if (match0 & lose0)
- {
- fprintf
- (stderr,
- /* xgettext:c-format */
- _("Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
- op0->name, match0, lose0);
- op0->lose &= ~op0->match;
- lose0 = op0->lose;
- }
-
- if (match1 & lose1)
- {
- fprintf
- (stderr,
- /* xgettext:c-format */
- _("Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"),
- op1->name, match1, lose1);
- op1->lose &= ~op1->match;
- lose1 = op1->lose;
- }
-
- /* Because the bits that are variable in one opcode are constant in
- another, it is important to order the opcodes in the right order. */
- for (i = 0; i < 32; ++i)
- {
- unsigned long int x = 1 << i;
- int x0 = (match0 & x) != 0;
- int x1 = (match1 & x) != 0;
-
- if (x0 != x1)
- return x1 - x0;
- }
-
- for (i = 0; i < 32; ++i)
- {
- unsigned long int x = 1 << i;
- int x0 = (lose0 & x) != 0;
- int x1 = (lose1 & x) != 0;
-
- if (x0 != x1)
- return x1 - x0;
- }
-
- /* They are functionally equal. So as long as the opcode table is
- valid, we can put whichever one first we want, on aesthetic grounds. */
-
- /* Our first aesthetic ground is that aliases defer to real insns. */
- {
- int alias_diff = (op0->flags & F_ALIAS) - (op1->flags & F_ALIAS);
- if (alias_diff != 0)
- /* Put the one that isn't an alias first. */
- return alias_diff;
- }
-
- /* Except for aliases, two "identical" instructions had
- better have the same opcode. This is a sanity check on the table. */
- i = strcmp (op0->name, op1->name);
- if (i)
- {
- if (op0->flags & F_ALIAS) /* If they're both aliases, be arbitrary. */
- return i;
- else
- fprintf (stderr,
- /* xgettext:c-format */
- _("Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"),
- op0->name, op1->name);
- }
-
- /* Fewer arguments are preferred. */
- {
- int length_diff = strlen (op0->args) - strlen (op1->args);
- if (length_diff != 0)
- /* Put the one with fewer arguments first. */
- return length_diff;
- }
-
- /* Put 1+i before i+1. */
- {
- char *p0 = (char *) strchr (op0->args, '+');
- char *p1 = (char *) strchr (op1->args, '+');
-
- if (p0 && p1)
- {
- /* There is a plus in both operands. Note that a plus
- sign cannot be the first character in args,
- so the following [-1]'s are valid. */
- if (p0[-1] == 'i' && p1[1] == 'i')
- /* op0 is i+1 and op1 is 1+i, so op1 goes first. */
- return 1;
- if (p0[1] == 'i' && p1[-1] == 'i')
- /* op0 is 1+i and op1 is i+1, so op0 goes first. */
- return -1;
- }
- }
-
- /* Put 1,i before i,1. */
- {
- int i0 = strncmp (op0->args, "i,1", 3) == 0;
- int i1 = strncmp (op1->args, "i,1", 3) == 0;
-
- if (i0 ^ i1)
- return i0 - i1;
- }
-
- /* They are, as far as we can tell, identical.
- Since qsort may have rearranged the table partially, there is
- no way to tell which one was first in the opcode table as
- written, so just say there are equal. */
- /* ??? This is no longer true now that we sort a vector of pointers,
- not the table itself. */
- return 0;
-}
-
-/* Build a hash table from the opcode table.
- OPCODE_TABLE is a sorted list of pointers into the opcode table. */
-
-static void
-build_hash_table (opcode_table, hash_table, num_opcodes)
- const struct sparc_opcode **opcode_table;
- struct opcode_hash **hash_table;
- int num_opcodes;
-{
- register int i;
- int hash_count[HASH_SIZE];
- static struct opcode_hash *hash_buf = NULL;
-
- /* Start at the end of the table and work backwards so that each
- chain is sorted. */
-
- memset (hash_table, 0, HASH_SIZE * sizeof (hash_table[0]));
- memset (hash_count, 0, HASH_SIZE * sizeof (hash_count[0]));
- if (hash_buf != NULL)
- free (hash_buf);
- hash_buf = (struct opcode_hash *) xmalloc (sizeof (struct opcode_hash) * num_opcodes);
- for (i = num_opcodes - 1; i >= 0; --i)
- {
- register int hash = HASH_INSN (opcode_table[i]->match);
- register struct opcode_hash *h = &hash_buf[i];
- h->next = hash_table[hash];
- h->opcode = opcode_table[i];
- hash_table[hash] = h;
- ++hash_count[hash];
- }
-
-#if 0 /* for debugging */
- {
- int min_count = num_opcodes, max_count = 0;
- int total;
-
- for (i = 0; i < HASH_SIZE; ++i)
- {
- if (hash_count[i] < min_count)
- min_count = hash_count[i];
- if (hash_count[i] > max_count)
- max_count = hash_count[i];
- total += hash_count[i];
- }
-
- printf ("Opcode hash table stats: min %d, max %d, ave %f\n",
- min_count, max_count, (double) total / HASH_SIZE);
- }
-#endif
-}
diff --git a/contrib/binutils/opcodes/sparc-opc.c b/contrib/binutils/opcodes/sparc-opc.c
index 94708988eafa..e23bbae1b782 100644
--- a/contrib/binutils/opcodes/sparc-opc.c
+++ b/contrib/binutils/opcodes/sparc-opc.c
@@ -1,24 +1,24 @@
/* Table of opcodes for the sparc.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2002, 2004
+ 2000, 2002, 2004, 2005
Free Software Foundation, Inc.
-This file is part of the BFD library.
+ This file is part of the BFD library.
-BFD 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.
+ BFD 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.
-BFD 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.
+ BFD 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 software; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this software; see the file COPYING. If not, write to
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* FIXME-someday: perhaps the ,a's and such should be embedded in the
instruction's name rather than the args. This would make gas faster, pinsn
@@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */
#define v6 (MASK_V6 | MASK_V7 | MASK_V8 | MASK_SPARCLET \
| MASK_SPARCLITE | MASK_V9 | MASK_V9A | MASK_V9B)
-/* v6 insns not supported on the sparclet */
+/* v6 insns not supported on the sparclet. */
#define v6notlet (MASK_V6 | MASK_V7 | MASK_V8 \
| MASK_SPARCLITE | MASK_V9 | MASK_V9A | MASK_V9B)
#define v7 (MASK_V7 | MASK_V8 | MASK_SPARCLET \
@@ -60,17 +60,18 @@ Boston, MA 02111-1307, USA. */
#define v9 (MASK_V9 | MASK_V9A | MASK_V9B)
#define v9a (MASK_V9A | MASK_V9B)
#define v9b (MASK_V9B)
-/* v6 insns not supported by v9 */
+/* v6 insns not supported by v9. */
#define v6notv9 (MASK_V6 | MASK_V7 | MASK_V8 \
| MASK_SPARCLET | MASK_SPARCLITE)
/* v9a instructions which would appear to be aliases to v9's impdep's
- otherwise */
+ otherwise. */
#define v9notv9a (MASK_V9)
/* Table of opcode architectures.
The order is defined in opcode/sparc.h. */
-const struct sparc_opcode_arch sparc_opcode_archs[] = {
+const struct sparc_opcode_arch sparc_opcode_archs[] =
+{
{ "v6", MASK_V6 },
{ "v7", MASK_V6 | MASK_V7 },
{ "v8", MASK_V6 | MASK_V7 | MASK_V8 },
@@ -88,84 +89,79 @@ const struct sparc_opcode_arch sparc_opcode_archs[] = {
/* Given NAME, return it's architecture entry. */
enum sparc_opcode_arch_val
-sparc_opcode_lookup_arch (name)
- const char *name;
+sparc_opcode_lookup_arch (const char *name)
{
const struct sparc_opcode_arch *p;
for (p = &sparc_opcode_archs[0]; p->name; ++p)
- {
- if (strcmp (name, p->name) == 0)
- return (enum sparc_opcode_arch_val) (p - &sparc_opcode_archs[0]);
- }
+ if (strcmp (name, p->name) == 0)
+ return (enum sparc_opcode_arch_val) (p - &sparc_opcode_archs[0]);
return SPARC_OPCODE_ARCH_BAD;
}
/* Branch condition field. */
-#define COND(x) (((x)&0xf)<<25)
+#define COND(x) (((x) & 0xf) << 25)
/* v9: Move (MOVcc and FMOVcc) condition field. */
-#define MCOND(x,i_or_f) ((((i_or_f)&1)<<18)|(((x)>>11)&(0xf<<14))) /* v9 */
+#define MCOND(x,i_or_f) ((((i_or_f) & 1) << 18) | (((x) >> 11) & (0xf << 14))) /* v9 */
/* v9: Move register (MOVRcc and FMOVRcc) condition field. */
-#define RCOND(x) (((x)&0x7)<<10) /* v9 */
-
-#define CONDA (COND(0x8))
-#define CONDCC (COND(0xd))
-#define CONDCS (COND(0x5))
-#define CONDE (COND(0x1))
-#define CONDG (COND(0xa))
-#define CONDGE (COND(0xb))
-#define CONDGU (COND(0xc))
-#define CONDL (COND(0x3))
-#define CONDLE (COND(0x2))
-#define CONDLEU (COND(0x4))
-#define CONDN (COND(0x0))
-#define CONDNE (COND(0x9))
-#define CONDNEG (COND(0x6))
-#define CONDPOS (COND(0xe))
-#define CONDVC (COND(0xf))
-#define CONDVS (COND(0x7))
+#define RCOND(x) (((x) & 0x7) << 10) /* v9 */
+
+#define CONDA (COND (0x8))
+#define CONDCC (COND (0xd))
+#define CONDCS (COND (0x5))
+#define CONDE (COND (0x1))
+#define CONDG (COND (0xa))
+#define CONDGE (COND (0xb))
+#define CONDGU (COND (0xc))
+#define CONDL (COND (0x3))
+#define CONDLE (COND (0x2))
+#define CONDLEU (COND (0x4))
+#define CONDN (COND (0x0))
+#define CONDNE (COND (0x9))
+#define CONDNEG (COND (0x6))
+#define CONDPOS (COND (0xe))
+#define CONDVC (COND (0xf))
+#define CONDVS (COND (0x7))
#define CONDNZ CONDNE
#define CONDZ CONDE
#define CONDGEU CONDCC
#define CONDLU CONDCS
-#define FCONDA (COND(0x8))
-#define FCONDE (COND(0x9))
-#define FCONDG (COND(0x6))
-#define FCONDGE (COND(0xb))
-#define FCONDL (COND(0x4))
-#define FCONDLE (COND(0xd))
-#define FCONDLG (COND(0x2))
-#define FCONDN (COND(0x0))
-#define FCONDNE (COND(0x1))
-#define FCONDO (COND(0xf))
-#define FCONDU (COND(0x7))
-#define FCONDUE (COND(0xa))
-#define FCONDUG (COND(0x5))
-#define FCONDUGE (COND(0xc))
-#define FCONDUL (COND(0x3))
-#define FCONDULE (COND(0xe))
+#define FCONDA (COND (0x8))
+#define FCONDE (COND (0x9))
+#define FCONDG (COND (0x6))
+#define FCONDGE (COND (0xb))
+#define FCONDL (COND (0x4))
+#define FCONDLE (COND (0xd))
+#define FCONDLG (COND (0x2))
+#define FCONDN (COND (0x0))
+#define FCONDNE (COND (0x1))
+#define FCONDO (COND (0xf))
+#define FCONDU (COND (0x7))
+#define FCONDUE (COND (0xa))
+#define FCONDUG (COND (0x5))
+#define FCONDUGE (COND (0xc))
+#define FCONDUL (COND (0x3))
+#define FCONDULE (COND (0xe))
#define FCONDNZ FCONDNE
#define FCONDZ FCONDE
-#define ICC (0) /* v9 */
-#define XCC (1<<12) /* v9 */
-#define FCC(x) (((x)&0x3)<<11) /* v9 */
-#define FBFCC(x) (((x)&0x3)<<20) /* v9 */
+#define ICC (0) /* v9 */
+#define XCC (1 << 12) /* v9 */
+#define FCC(x) (((x) & 0x3) << 11) /* v9 */
+#define FBFCC(x) (((x) & 0x3) << 20) /* v9 */
/* The order of the opcodes in the table is significant:
-
+
* The assembler requires that all instances of the same mnemonic must
be consecutive. If they aren't, the assembler will bomb at runtime.
- * The disassembler should not care about the order of the opcodes.
-
-*/
+ * The disassembler should not care about the order of the opcodes. */
/* Entries for commutative arithmetic operations. */
/* ??? More entries can make use of this. */
@@ -696,6 +692,10 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "retry", F3(2, 0x3e, 0)|RD(1), F3(~2, ~0x3e, ~0)|RD(~1)|RS1_G0|SIMM13(~0), "", 0, v9 },
{ "saved", F3(2, 0x31, 0)|RD(0), F3(~2, ~0x31, ~0)|RD(~0)|RS1_G0|SIMM13(~0), "", 0, v9 },
{ "restored", F3(2, 0x31, 0)|RD(1), F3(~2, ~0x31, ~0)|RD(~1)|RS1_G0|SIMM13(~0), "", 0, v9 },
+{ "allclean", F3(2, 0x31, 0)|RD(2), F3(~2, ~0x31, ~0)|RD(~2)|RS1_G0|SIMM13(~0), "", 0, v9 },
+{ "otherw", F3(2, 0x31, 0)|RD(3), F3(~2, ~0x31, ~0)|RD(~3)|RS1_G0|SIMM13(~0), "", 0, v9 },
+{ "normalw", F3(2, 0x31, 0)|RD(4), F3(~2, ~0x31, ~0)|RD(~4)|RS1_G0|SIMM13(~0), "", 0, v9 },
+{ "invalw", F3(2, 0x31, 0)|RD(5), F3(~2, ~0x31, ~0)|RD(~5)|RS1_G0|SIMM13(~0), "", 0, v9 },
{ "sir", F3(2, 0x30, 1)|RD(0xf), F3(~2, ~0x30, ~1)|RD(~0xf)|RS1_G0, "i", 0, v9 },
{ "flush", F3(2, 0x3b, 0), F3(~2, ~0x3b, ~0)|ASI(~0), "1+2", 0, v8 },
@@ -882,6 +882,13 @@ const struct sparc_opcode sparc_opcodes[] = {
{ "wrpr", F3(2, 0x32, 1), F3(~2, ~0x32, ~1), "i,1,!", F_ALIAS, v9 }, /* wrpr i,r1,%priv */
{ "wrpr", F3(2, 0x32, 1), F3(~2, ~0x32, ~1)|RS1(~0), "i,!", 0, v9 }, /* wrpr i,%priv */
+{ "rdhpr", F3(2, 0x29, 0), F3(~2, ~0x29, ~0)|SIMM13(~0), "$,d", 0, v9 }, /* rdhpr %hpriv,r */
+{ "wrhpr", F3(2, 0x33, 0), F3(~2, ~0x33, ~0), "1,2,%", 0, v9 }, /* wrhpr r1,r2,%hpriv */
+{ "wrhpr", F3(2, 0x33, 0), F3(~2, ~0x33, ~0)|SIMM13(~0), "1,%", 0, v9 }, /* wrhpr r1,%hpriv */
+{ "wrhpr", F3(2, 0x33, 1), F3(~2, ~0x33, ~1), "1,i,%", 0, v9 }, /* wrhpr r1,i,%hpriv */
+{ "wrhpr", F3(2, 0x33, 1), F3(~2, ~0x33, ~1), "i,1,%", F_ALIAS, v9 }, /* wrhpr i,r1,%hpriv */
+{ "wrhpr", F3(2, 0x33, 1), F3(~2, ~0x33, ~1)|RS1(~0), "i,%", 0, v9 }, /* wrhpr i,%hpriv */
+
/* ??? This group seems wrong. A three operand move? */
{ "mov", F3(2, 0x30, 0), F3(~2, ~0x30, ~0)|ASI(~0), "1,2,m", F_ALIAS, v8 }, /* wr r,r,%asrX */
{ "mov", F3(2, 0x30, 1), F3(~2, ~0x30, ~1), "1,i,m", F_ALIAS, v8 }, /* wr r,i,%asrX */
@@ -1348,13 +1355,13 @@ fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
/* Coprocessor branches. */
#define CBR(opcode, mask, lose, flags, arch) \
- { opcode, (mask), ANNUL|(lose), "l", flags|F_DELAYED, arch }, \
- { opcode, (mask)|ANNUL, (lose), ",a l", flags|F_DELAYED, arch }
+ { opcode, (mask), ANNUL | (lose), "l", flags | F_DELAYED, arch }, \
+ { opcode, (mask) | ANNUL, (lose), ",a l", flags | F_DELAYED, arch }
/* Floating point branches. */
#define FBR(opcode, mask, lose, flags) \
- { opcode, (mask), ANNUL|(lose), "l", flags|F_DELAYED|F_FBR, v6 }, \
- { opcode, (mask)|ANNUL, (lose), ",a l", flags|F_DELAYED|F_FBR, v6 }
+ { opcode, (mask), ANNUL | (lose), "l", flags | F_DELAYED | F_FBR, v6 }, \
+ { opcode, (mask) | ANNUL, (lose), ",a l", flags | F_DELAYED | F_FBR, v6 }
/* V9 extended floating point branches. */
#define FBRX(opcode, mask, lose, flags) /* v9 */ \
@@ -1829,13 +1836,8 @@ typedef struct
/* Look up NAME in TABLE. */
-static int lookup_name PARAMS ((const arg *, const char *));
-static const char *lookup_value PARAMS ((const arg *, int));
-
static int
-lookup_name (table, name)
- const arg *table;
- const char *name;
+lookup_name (const arg *table, const char *name)
{
const arg *p;
@@ -1849,9 +1851,7 @@ lookup_name (table, name)
/* Look up VALUE in TABLE. */
static const char *
-lookup_value (table, value)
- const arg *table;
- int value;
+lookup_value (const arg *table, int value)
{
const arg *p;
@@ -1859,7 +1859,7 @@ lookup_value (table, value)
if (value == p->value)
return p->name;
- return (char *) 0;
+ return NULL;
}
/* Handle ASI's. */
@@ -1907,8 +1907,7 @@ static arg asi_table[] =
/* Return the value for ASI NAME, or -1 if not found. */
int
-sparc_encode_asi (name)
- const char *name;
+sparc_encode_asi (const char *name)
{
return lookup_name (asi_table, name);
}
@@ -1916,8 +1915,7 @@ sparc_encode_asi (name)
/* Return the name for ASI value VALUE or NULL if not found. */
const char *
-sparc_decode_asi (value)
- int value;
+sparc_decode_asi (int value)
{
return lookup_value (asi_table, value);
}
@@ -1939,8 +1937,7 @@ static arg membar_table[] =
/* Return the value for membar arg NAME, or -1 if not found. */
int
-sparc_encode_membar (name)
- const char *name;
+sparc_encode_membar (const char *name)
{
return lookup_name (membar_table, name);
}
@@ -1948,8 +1945,7 @@ sparc_encode_membar (name)
/* Return the name for membar value VALUE or NULL if not found. */
const char *
-sparc_decode_membar (value)
- int value;
+sparc_decode_membar (int value)
{
return lookup_value (membar_table, value);
}
@@ -1970,8 +1966,7 @@ static arg prefetch_table[] =
/* Return the value for prefetch arg NAME, or -1 if not found. */
int
-sparc_encode_prefetch (name)
- const char *name;
+sparc_encode_prefetch (const char *name)
{
return lookup_name (prefetch_table, name);
}
@@ -1979,8 +1974,7 @@ sparc_encode_prefetch (name)
/* Return the name for prefetch value VALUE or NULL if not found. */
const char *
-sparc_decode_prefetch (value)
- int value;
+sparc_decode_prefetch (int value)
{
return lookup_value (prefetch_table, value);
}
@@ -2002,8 +1996,7 @@ static arg sparclet_cpreg_table[] =
/* Return the value for sparclet cpreg arg NAME, or -1 if not found. */
int
-sparc_encode_sparclet_cpreg (name)
- const char *name;
+sparc_encode_sparclet_cpreg (const char *name)
{
return lookup_name (sparclet_cpreg_table, name);
}
@@ -2011,8 +2004,7 @@ sparc_encode_sparclet_cpreg (name)
/* Return the name for sparclet cpreg value VALUE or NULL if not found. */
const char *
-sparc_decode_sparclet_cpreg (value)
- int value;
+sparc_decode_sparclet_cpreg (int value)
{
return lookup_value (sparclet_cpreg_table, value);
}
diff --git a/contrib/binutils/opcodes/sysdep.h b/contrib/binutils/opcodes/sysdep.h
index ce9adde399e1..4f1efb233397 100644
--- a/contrib/binutils/opcodes/sysdep.h
+++ b/contrib/binutils/opcodes/sysdep.h
@@ -2,21 +2,22 @@
Copyright 1995, 1997, 2000 Free Software Foundation, Inc.
Written by Ken Raeburn.
-This file is part of libopcodes, the opcodes library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ This file is part of libopcodes, the opcodes 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. */
/* Do system-dependent stuff, mainly driven by autoconf-detected info.
diff --git a/contrib/binutils/symlink-tree b/contrib/binutils/symlink-tree
index 22132c76afda..a9d50831b885 100755
--- a/contrib/binutils/symlink-tree
+++ b/contrib/binutils/symlink-tree
@@ -15,8 +15,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# Foundation, Inc., 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
diff --git a/contrib/binutils/ylwrap b/contrib/binutils/ylwrap
index 2288ccde3ac1..102bd893f761 100755
--- a/contrib/binutils/ylwrap
+++ b/contrib/binutils/ylwrap
@@ -1,6 +1,11 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -15,58 +20,84 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
-# Usage:
-# ylwrap PROGRAM INPUT [OUTPUT DESIRED]... -- [ARGS]...
-# * PROGRAM is program to run.
-# * INPUT is the input file
-# * OUTPUT is file PROG generates
-# * DESIRED is file we actually want
-# * ARGS are passed to PROG
-# Any number of OUTPUT,DESIRED pairs may be used.
+# 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 program to run.
-prog="$1"
-shift
-# Make any relative path in $prog absolute.
-case "$prog" in
- /* | [A-Za-z]:\\*) ;;
- */*) prog="`pwd`/$prog" ;;
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case "$1" in
+ '')
+ echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
+ exit 1
+ ;;
+ --basedir)
+ basedir=$2
+ shift 2
+ ;;
+ -h|--h*)
+ cat <<\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+ INPUT is the input file
+ OUTPUT is one file PROG generates
+ DESIRED is the file we actually want instead of OUTPUT
+ PROGRAM is program to run
+ ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v|--v*)
+ echo "ylwrap $scriptversion"
+ exit $?
+ ;;
esac
+
# The input.
input="$1"
shift
case "$input" in
- /* | [A-Za-z]:\\*)
+ [\\/]* | ?:[\\/]*)
# Absolute path; do nothing.
;;
- *)
- # Relative path. Make it absolute. Why? Because otherwise any
- # debugging info in the generated file will point to the wrong
- # place. This is really gross.
+ *)
+ # Relative path. Make it absolute.
input="`pwd`/$input"
;;
esac
-# We don't want to use the absolute path if the input in the current
-# directory like when making a tar ball.
-input_base=`echo $input | sed -e 's|.*/||'`
-if test -f $input_base && cmp $input_base $input >/dev/null 2>&1; then
- input=$input_base
-fi
-
pairlist=
while test "$#" -ne 0; do
- if test "$1" = "--"; then
- shift
- break
- fi
- pairlist="$pairlist $1"
- shift
+ if test "$1" = "--"; then
+ shift
+ break
+ fi
+ pairlist="$pairlist $1"
+ shift
done
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+ [\\/]* | ?:[\\/]*) ;;
+ *[\\/]*) prog="`pwd`/$prog" ;;
+esac
+
# FIXME: add hostname here for parallel makes that run commands on
# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$
@@ -74,50 +105,119 @@ trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
mkdir $dirname || exit 1
cd $dirname
-case "$input" in
- /* | [A-Za-z]:\\*)
- # Absolute path; do nothing.
- ;;
- *)
- # Make a symbolic link, hard link or hardcopy.
- ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null 2>&1 || cp ../"$input" .
- ;;
+
+case $# in
+ 0) $prog "$input" ;;
+ *) $prog "$@" "$input" ;;
esac
-$prog ${1+"$@"} "$input"
-status=$?
-
-if test $status -eq 0; then
- set X $pairlist
- shift
- first=yes
- while test "$#" -ne 0; do
- if test -f "$1"; then
- # If $2 is an absolute path name, then just use that,
- # otherwise prepend `../'.
- case "$2" in
- /* | [A-Za-z]:\\*) target="$2";;
- *) target="../$2";;
- esac
- mv "$1" "$target" || status=$?
+ret=$?
+
+if test $ret -eq 0; then
+ set X $pairlist
+ shift
+ first=yes
+ # Since DOS filename conventions don't allow two dots,
+ # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+ # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+ y_tab_nodot="no"
+ if test -f y_tab.c || test -f y_tab.h; then
+ y_tab_nodot="yes"
+ fi
+
+ # The directory holding the input.
+ input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+ # Quote $INPUT_DIR so we can use it in a regexp.
+ # FIXME: really we should care about more than `.' and `\'.
+ input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+ while test "$#" -ne 0; do
+ from="$1"
+ # Handle y_tab.c and y_tab.h output by DOS
+ if test $y_tab_nodot = "yes"; then
+ if test $from = "y.tab.c"; then
+ from="y_tab.c"
else
- # A missing file is only an error for the first file. This
- # is a blatant hack to let us support using "yacc -d". If -d
- # is not specified, we don't want an error when the header
- # file is "missing".
- if test $first = yes; then
- status=1
- fi
+ if test $from = "y.tab.h"; then
+ from="y_tab.h"
+ fi
+ fi
+ fi
+ if test -f "$from"; then
+ # If $2 is an absolute path name, then just use that,
+ # otherwise prepend `../'.
+ case "$2" in
+ [\\/]* | ?:[\\/]*) target="$2";;
+ *) target="../$2";;
+ esac
+
+ # We do not want to overwrite a header file if it hasn't
+ # changed. This avoid useless recompilations. However the
+ # parser itself (the first file) should always be updated,
+ # because it is the destination of the .y.c rule in the
+ # Makefile. Divert the output of all other files to a temporary
+ # file so we can compare them to existing versions.
+ if test $first = no; then
+ realtarget="$target"
+ target="tmp-`echo $target | sed s/.*[\\/]//g`"
fi
- shift
- shift
- first=no
- done
+ # Edit out `#line' or `#' directives.
+ #
+ # We don't want the resulting debug information to point at
+ # an absolute srcdir; it is better for it to just mention the
+ # .y file with no path.
+ #
+ # We want to use the real output file name, not yy.lex.c for
+ # instance.
+ #
+ # We want the include guards to be adjusted too.
+ FROM=`echo "$from" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+ TARGET=`echo "$2" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+
+ sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
+ -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
+
+ # Check whether header files must be updated.
+ if test $first = no; then
+ if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+ echo "$2" is unchanged
+ rm -f "$target"
+ else
+ echo updating "$2"
+ mv -f "$target" "$realtarget"
+ fi
+ fi
+ else
+ # A missing file is only an error for the first file. This
+ # is a blatant hack to let us support using "yacc -d". If -d
+ # is not specified, we don't want an error when the header
+ # file is "missing".
+ if test $first = yes; then
+ ret=1
+ fi
+ fi
+ shift
+ shift
+ first=no
+ done
else
- status=$?
+ ret=$?
fi
# Remove the directory.
cd ..
rm -rf $dirname
-exit $status
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End: